commit 457391b0380335d5e9a5babdec90ac53928b23b4 Author: Linus Torvalds Date: Sun Apr 23 12:02:52 2023 -0700 Linux 6.3 commit 0da6e5fd6c3726723e275603426e09178940dace Author: Linus Torvalds Date: Sun Apr 23 09:56:20 2023 -0700 gcc: disable '-Warray-bounds' for gcc-13 too We started disabling '-Warray-bounds' for gcc-12 originally on s390, because it resulted in some warnings that weren't realistically fixable (commit 8b202ee21839: "s390: disable -Warray-bounds"). That s390-specific issue was then found to be less common elsewhere, but generic (see f0be87c42cbd: "gcc-12: disable '-Warray-bounds' universally for now"), and then later expanded the version check was expanded to gcc-11 (5a41237ad1d4: "gcc: disable -Warray-bounds for gcc-11 too"). And it turns out that I was much too optimistic in thinking that it's all going to go away, and here we are with gcc-13 showing all the same issues. So instead of expanding this one version at a time, let's just disable it for gcc-11+, and put an end limit to it only when we actually find a solution. Yes, I'm sure some of this is because the kernel just does odd things (like our "container_of()" use, but also knowingly playing games with things like linker tables and array layouts). And yes, some of the warnings are likely signs of real bugs, but when there are hundreds of false positives, that doesn't really help. Oh well. Signed-off-by: Linus Torvalds commit 8296ac9256aa1e9305033720de77ee5419a80f6f Merge: 5ad250f1fe92f 9cedc5e89a59d Author: Linus Torvalds Date: Sun Apr 23 08:22:25 2023 -0700 Merge tag 'kbuild-fixes-v6.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Fix the prefix in the kernel source tarball - Fix a typo in the copyright file in Debian package * tag 'kbuild-fixes-v6.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: use proper prefix for tarballs to fix rpm-pkg build error kbuild: deb-pkg: Fix a spell typo in mkdebian script commit 5ad250f1fe92f21de09dabcd329e681d15aed9a4 Merge: 97249f05b2738 e3c026be4d3ca Author: Linus Torvalds Date: Sun Apr 23 08:15:33 2023 -0700 Merge tag 'irq_urgent_for_v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Borislav Petkov: - Remove an over-zealous sanity check of the array of MSI-X vectors to be allocated for a device * tag 'irq_urgent_for_v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: PCI/MSI: Remove over-zealous hardware size check in pci_msix_validate_entries() commit 97249f05b27385b7f870d8e2e6062e26e5f132e8 Merge: d6b78224c65e3 c22ef5684b64a Author: Linus Torvalds Date: Sun Apr 23 08:03:57 2023 -0700 Merge tag 'x86_urgent_for_v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Borislav Petkov - Fix for older binutils which do not support C-syntax constant suffixes * tag 'x86_urgent_for_v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/alternatives: Do not use integer constant suffixes in inline asm commit d6b78224c65e395db6aa66ea74522d9899c8aefb Merge: 622322f53c6d9 5dc63e56a9cf8 Author: Linus Torvalds Date: Sun Apr 23 07:46:52 2023 -0700 Merge tag 'input-for-v6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: - a check in pegasus-notetaker driver to validate the type of pipe when probing a new device - a fix for Cypress touch controller to correctly parse maximum number of touches. * tag 'input-for-v6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: cyttsp5 - fix sensing configuration data structure Input: pegasus-notetaker - check pipe type when probing commit 9cedc5e89a59da72bfecdb76bfaa5a28a273029d Author: Masahiro Yamada Date: Thu Apr 20 02:04:24 2023 +0900 kbuild: use proper prefix for tarballs to fix rpm-pkg build error Since commit f8d94c4e403c ("kbuild: do not create intermediate *.tar for source tarballs"), 'make rpm-pkg' fails because the prefix of the source tarball is 'linux.tar/' instead of 'linux/'. $(basename $@) strips only '.gz' from the filename linux.tar.gz. You need to strip two suffixes from compressed tarballs and one suffix from uncompressed tarballs (for example 'perf-6.3.0.tar' generated by 'make perf-tar-src-pkg'). One tricky fix might be --prefix=$(firstword $(subst .tar, ,$@))/ but I think it is better to hard-code the prefix. Fixes: f8d94c4e403c ("kbuild: do not create intermediate *.tar for source tarballs") Reported-by: Jiwei Sun Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 8b824220bd6641976676ae7a1e925db63eb89c4b Author: Woody Suwalski Date: Fri Mar 31 10:15:40 2023 -0400 kbuild: deb-pkg: Fix a spell typo in mkdebian script Signed-off-by: Woody Suwalski Signed-off-by: Masahiro Yamada commit 622322f53c6d9ddd3c2a4aad852b3e1adbd56da7 Merge: 2caeeb9d4a1bc 6dcbd0a69c84a Author: Linus Torvalds Date: Sat Apr 22 19:11:47 2023 -0700 Merge tag 'mips-fixes_6.3_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fix from Thomas Bogendoerfer: "Fix for link errors" * tag 'mips-fixes_6.3_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: Define RUNTIME_DISCARD_EXIT in LD script commit 2caeeb9d4a1bccd923b7918427f9e9ef7151ddd8 Merge: 84ebdb8e0d9ca 265b97cbc22e0 Author: Linus Torvalds Date: Sat Apr 22 09:27:46 2023 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "Two serious ARM fixes: - Plug a buffer overflow due to the use of the user-provided register width for firmware regs. Outright reject accesses where the user register width does not match the kernel representation. - Protect non-atomic RMW operations on vCPU flags against preemption, as an update to the flags by an intervening preemption could be lost" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: arm64: Fix buffer overflow in kvm_arm_set_fw_reg() KVM: arm64: Make vcpu flag updates non-preemptible commit 84ebdb8e0d9ca261d73677f345814505af172ae0 Merge: 8e41e0a575664 023fc150a39ff Author: Linus Torvalds Date: Sat Apr 22 09:18:35 2023 -0700 Merge tag '6.3-rc7-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Three small smb3 client fixes: - two important fixes for unbuffered read regression with the iov_iter changes (e.g. read soon after mount in some multichannel scenarios) - DFS prefix path fix (also for stable)" * tag '6.3-rc7-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: Reapply lost fix from commit 30b2b2196d6e cifs: Fix unbuffered read cifs: avoid dup prefix path in dfs_get_automount_devname() commit 265b97cbc22e0f67f79a71443b60dc1237ca5ee6 Merge: 0bf9601f8ef07 a25bc8486f9c0 Author: Paolo Bonzini Date: Fri Apr 21 19:19:02 2023 -0400 Merge tag 'kvmarm-fixes-6.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.3, part #4 - Plug a buffer overflow due to the use of the user-provided register width for firmware regs. Outright reject accesses where the user register width does not match the kernel representation. - Protect non-atomic RMW operations on vCPU flags against preemption, as an update to the flags by an intervening preemption could be lost. commit 6dcbd0a69c84a8ae7a442840a8cf6b1379dc8f16 Author: Jiaxun Yang Date: Sat Apr 8 21:33:48 2023 +0100 MIPS: Define RUNTIME_DISCARD_EXIT in LD script MIPS's exit sections are discarded at runtime as well. Fixes link error: `.exit.text' referenced in section `__jump_table' of fs/fuse/inode.o: defined in discarded section `.exit.text' of fs/fuse/inode.o Fixes: 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv") Reported-by: "kernelci.org bot" Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 8e41e0a575664d26bb87e012c39435c4c3914ed9 Author: Linus Torvalds Date: Fri Apr 21 13:39:10 2023 -0700 Revert "ACPICA: Events: Support fixed PCIe wake event" This reverts commit 5c62d5aab8752e5ee7bfbe75ed6060db1c787f98. This broke wake-on-lan for multiple people, and for much too long. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217069 Link: https://lore.kernel.org/all/754225a2-95a9-2c36-1886-7da1a78308c2@loongson.cn/ Link: https://github.com/acpica/acpica/pull/866 Cc: Rafael J. Wysocki Cc: Jianmin Lv Cc: Huacai Chen Cc: Bob Moore Cc: stable@kernel.org # 6.2 Signed-off-by: Linus Torvalds commit c337b23f32c87320dffd389e4f0f793db35f0a9b Merge: 334e5a8206af9 ef9cddfe57d86 Author: Linus Torvalds Date: Fri Apr 21 10:47:21 2023 -0700 Merge tag 'for-6.3-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "Two patches fixing the problem with aync discard. The default settings had a low IOPS limit and processing a large batch to discard would take a long time. On laptops this can cause increased power consumption due to disk activity. As async discard has been on by default since 6.2 this likely affects a lot of users. Summary: - increase the default IOPS limit 10x which reportedly helped - setting the sysfs IOPS value to 0 now does not throttle anymore allowing the discards to be processed at full speed. Previously there was an arbitrary 6 hour target for processing the pending batch" * tag 'for-6.3-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: reinterpret async discard iops_limit=0 as no delay btrfs: set default discard iops_limit to 1000 commit 334e5a8206af93818fd384300666cc203f08f035 Merge: 8fd06d441e35c 81ea1222f2fa5 Author: Linus Torvalds Date: Fri Apr 21 10:05:52 2023 -0700 Merge tag 'block-6.3-2023-04-21' of git://git.kernel.dk/linux Pull block fix from Jens Axboe: "Just a single revert of a patch from the 6.3 series" * tag 'block-6.3-2023-04-21' of git://git.kernel.dk/linux: Revert "block: Merge bio before checking ->cached_rq" commit 8fd06d441e35cc9543b410f9cb9aaa8e54ece38d Merge: bdc83e00f0a19 a042d7feae7ef Author: Linus Torvalds Date: Fri Apr 21 10:00:18 2023 -0700 Merge tag 'char-misc-6.3-final' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are some last-minute tiny driver fixes for 6.3-final. They include fixes for some fpga and iio drivers: - fpga bridge driver fix - fpga dfl error reporting fix - fpga m10bmc driver fix - fpga xilinx driver fix - iio light driver fix - iio dac fwhandle leak fix - iio adc driver fix All of these have been in linux-next for a few weeks with no reported problems" * tag 'char-misc-6.3-final' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: iio: light: tsl2772: fix reading proximity-diodes from device tree fpga: bridge: properly initialize bridge device before populating children iio: dac: ad5755: Add missing fwnode_handle_put() iio: adc: at91-sama5d2_adc: fix an error code in at91_adc_allocate_trigger() fpga: xilinx-pr-decoupler: Use readl wrapper instead of pure readl fpga: dfl-pci: Drop redundant pci_enable_pcie_error_reporting() fpga: m10bmc-sec: Fix rsu_send_data() to return FW_UPLOAD_ERR_HW_ERROR commit bdc83e00f0a195b85e7879b65a4ca7a6520fe135 Merge: a14e151910dd9 2ce987d7eeb16 Author: Linus Torvalds Date: Fri Apr 21 09:50:47 2023 -0700 Merge tag 'gpio-fixes-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - use raw_spinlocks in regmaps that are used in interrupt context in gpio-104-idi-48 and gpio-104-dio-48e * tag 'gpio-fixes-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: 104-idi-48: Enable use_raw_spinlock for idi48_regmap_config gpio: 104-dio-48e: Enable use_raw_spinlock for dio48e_regmap_config commit a14e151910dd967311dbdfe6d95dcd04e777db84 Merge: 5a43001c01691 2ae147d643d32 Author: Linus Torvalds Date: Fri Apr 21 09:34:49 2023 -0700 Merge tag 'sound-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Just a few fixes: all small and device-specific (ASoC FSL, SOF, and HD-audio quirks), should be safe to apply at the last minute" * tag 'sound-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek: fix mute/micmute LEDs for a HP ProBook ASoC: fsl_asrc_dma: fix potential null-ptr-deref ASoC: fsl_sai: Fix pins setting for i.MX8QM platform ALSA: hda/realtek: Remove specific patch for Dell Precision 3260 ASoC: max98373: change power down sequence for smart amp ASoC: SOF: pm: Tear down pipelines only if DSP was active ASoC: SOF: ipc4-topology: Clarify bind failure caused by missing fw_module commit 5a43001c01691dcbd396541e6faa2c0077378f48 Author: Ekaterina Orlova Date: Fri Apr 21 15:35:39 2023 +0100 ASN.1: Fix check for strdup() success It seems there is a misprint in the check of strdup() return code that can lead to NULL pointer dereference. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 4520c6a49af8 ("X.509: Add simple ASN.1 grammar compiler") Signed-off-by: Ekaterina Orlova Cc: David Woodhouse Cc: James Bottomley Cc: Jarkko Sakkinen Cc: keyrings@vger.kernel.org Cc: linux-kbuild@vger.kernel.org Link: https://lore.kernel.org/r/20230315172130.140-1-vorobushek.ok@gmail.com/ Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit 2af3e53a4dc08657f1b46f97f04ff4a0ab3cad8d Merge: b7bc77e2f2c71 00a4bd000e78a Author: Linus Torvalds Date: Thu Apr 20 19:15:58 2023 -0700 Merge tag 'drm-fixes-2023-04-21' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "This is the regular and hopefully last round of fixes for 6.3. Pretty small, a few amdgpu, one i915, one nouveau, one rockchip and one gpu scheduler fix: nouveau: - fix dma-resv timeout rockchip: - fix suspend/resume sched: - fix timeout handling i915: - Fix fast wake AUX sync len amdgpu: - GPU reset fix - DCN 3.1.5 line buffer fix - Display fix for single channel memory configs - Fix a possible divide by 0" * tag 'drm-fixes-2023-04-21' of git://anongit.freedesktop.org/drm/drm: drm/amd/display: fix a divided-by-zero error drm/amd/display: limit timing for single dimm memory drm/amd/display: set dcn315 lb bpp to 48 drm/amdgpu: Fix desktop freezed after gpu-reset drm/rockchip: vop2: Use regcache_sync() to fix suspend/resume drm/nouveau: fix incorrect conversion to dma_resv_wait_timeout() drm/rockchip: vop2: fix suspend/resume drm/i915: Fix fast wake AUX sync len drm/sched: Check scheduler ready before calling timeout handling commit 00a4bd000e78a3a898e60bdc13e2852c8044a38c Merge: 3b1f2be527ce0 0b5dfe12755f8 Author: Dave Airlie Date: Fri Apr 21 11:13:24 2023 +1000 Merge tag 'amd-drm-fixes-6.3-2023-04-19' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.3-2023-04-19: amdgpu: - GPU reset fix - DCN 3.1.5 line buffer fix - Display fix for single channel memory configs - Fix a possible divide by 0 Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230420031717.7790-1-alexander.deucher@amd.com commit 3b1f2be527ce04e7d8dce6fad6be16fa59058713 Merge: f126f41cec1b6 e1c71f8f91804 Author: Dave Airlie Date: Fri Apr 21 10:37:23 2023 +1000 Merge tag 'drm-intel-fixes-2023-04-19' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v6.3 final: - Fix fast wake AUX sync len Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87354w1b76.fsf@intel.com commit f126f41cec1b6fa04c1d06517ec8f3e19908c5f7 Merge: 6a8f57ae2eb07 b63a553e8f5aa Author: Dave Airlie Date: Fri Apr 21 09:57:37 2023 +1000 Merge tag 'drm-misc-fixes-2023-04-20-2' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull: * nouveau: fix dma-resv timeout * rockchip: fix suspend/resume * sched: fix timeout handling Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230420083114.GA17651@linux-uq9g commit b7bc77e2f2c714c82aa723445d98fa4c2fb63e90 Merge: 0f2a4af27b649 0d21e71a91deb Author: Linus Torvalds Date: Thu Apr 20 15:36:23 2023 -0700 Merge tag 'pci-v6.3-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull pci fix from Bjorn Helgaas: - Previously we ignored PCI devices if the DT "status" property or the ACPI _STA method said it was not present. Per spec, _STA cannot be used for that purpose, and using it that way caused regressions, so skip the _STA check (Rob Herring) * tag 'pci-v6.3-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: PCI: Restrict device disabled status check to DT commit ef9cddfe57d86aac6b509b550136395669159b30 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 e9f59429b87d35cf23ae9ca19629bd686a1c0304 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 0f2a4af27b649c13ba76431552fe49c60120d0f6 Author: Toke Høiland-Jørgensen Date: Thu Apr 13 23:41:18 2023 +0200 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 Link: https://lore.kernel.org/r/20230413214118.153781-1-toke@toke.dk 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: Linus Torvalds commit 6a66fdd29ea1695d615fcc93dccfb6dbe2f53b1d Merge: 23309d600db1a d966c3cab924f Author: Linus Torvalds Date: Thu Apr 20 12:46:18 2023 -0700 Merge tag 'rust-fixes-6.3' of https://github.com/Rust-for-Linux/linux Pull Rust fixes from Miguel Ojeda: "Most of these are straightforward. The last one is more complex, but it only touches Rust + GCC builds which are for the moment best-effort. - Code: Missing 'extern "C"' fix. - Scripts: 'is_rust_module.sh' and 'generate_rust_analyzer.py' fixes. - A couple trivial fixes - Build: Rust + GCC build fix and 'grep' warning fix" * tag 'rust-fixes-6.3' of https://github.com/Rust-for-Linux/linux: rust: allow to use INIT_STACK_ALL_ZERO rust: fix regexp in scripts/is_rust_module.sh rust: build: Fix grep warning scripts: generate_rust_analyzer: Handle sub-modules with no Makefile rust: kernel: Mark rust_fmt_argument as extern "C" rust: sort uml documentation arch support table rust: str: fix requierments->requirements typo commit 0d21e71a91debc87e88437a2cf9c6f34f8bf012f Author: Rob Herring Date: Wed Apr 19 14:35:13 2023 -0500 PCI: Restrict device disabled status check to DT Commit 6fffbc7ae137 ("PCI: Honor firmware's device disabled status") checked the firmware device status for both DT and ACPI devices. That caused a regression in some ACPI systems. The exact reason isn't clear. It's possibly a firmware bug. For now, at least, refactor the check to be for DT based systems only. Note that the original implementation leaked a refcount which is now correctly handled. [bhelgaas: Per ACPI r6.5, sec 6.3.7, for devices on an enumerable bus, _STA must return with bit[0] ("device is present") set] Link: https://lore.kernel.org/all/m2fs9lgndw.fsf@gmail.com/ Fixes: 6fffbc7ae137 ("PCI: Honor firmware's device disabled status") Link: https://lore.kernel.org/r/20230419193513.708818-1-robh@kernel.org Link: https://bugzilla.kernel.org/show_bug.cgi?id=217317 Reported-by: Donald Hunter Reported-by: Vitaly Kuznetsov Tested-by: Donald Hunter Tested-by: Vitaly Kuznetsov Signed-off-by: Rob Herring Signed-off-by: Bjorn Helgaas Cc: Binbin Zhou Cc: Liu Peibao Cc: Huacai Chen commit 23309d600db1abb73b77ca35db96133b7fc35959 Merge: cb0856346a60f 927cdea5d2095 Author: Linus Torvalds Date: Thu Apr 20 11:03:51 2023 -0700 Merge tag 'net-6.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from netfilter and bpf. There are a few fixes for new code bugs, including the Mellanox one noted in the last networking pull. No known regressions outstanding. Current release - regressions: - sched: clear actions pointer in miss cookie init fail - mptcp: fix accept vs worker race - bpf: fix bpf_arch_text_poke() with new_addr == NULL on s390 - eth: bnxt_en: fix a possible NULL pointer dereference in unload path - eth: veth: take into account peer device for NETDEV_XDP_ACT_NDO_XMIT xdp_features flag Current release - new code bugs: - eth: revert "net/mlx5: Enable management PF initialization" Previous releases - regressions: - netfilter: fix recent physdev match breakage - bpf: fix incorrect verifier pruning due to missing register precision taints - eth: virtio_net: fix overflow inside xdp_linearize_page() - eth: cxgb4: fix use after free bugs caused by circular dependency problem - eth: mlxsw: pci: fix possible crash during initialization Previous releases - always broken: - sched: sch_qfq: prevent slab-out-of-bounds in qfq_activate_agg - netfilter: validate catch-all set elements - bridge: don't notify FDB entries with "master dynamic" - eth: bonding: fix memory leak when changing bond type to ethernet - eth: i40e: fix accessing vsi->active_filters without holding lock Misc: - Mat is back as MPTCP co-maintainer" * tag 'net-6.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (33 commits) net: bridge: switchdev: don't notify FDB entries with "master dynamic" Revert "net/mlx5: Enable management PF initialization" MAINTAINERS: Resume MPTCP co-maintainer role mailmap: add entries for Mat Martineau e1000e: Disable TSO on i219-LM card to increase speed bnxt_en: fix free-runnig PHC mode net: dsa: microchip: ksz8795: Correctly handle huge frame configuration bpf: Fix incorrect verifier pruning due to missing register precision taints hamradio: drop ISA_DMA_API dependency mlxsw: pci: Fix possible crash during initialization mptcp: fix accept vs worker race mptcp: stops worker on unaccepted sockets at listener close net: rpl: fix rpl header size calculation net: vmxnet3: Fix NULL pointer dereference in vmxnet3_rq_rx_complete() bonding: Fix memory leak when changing bond type to Ethernet veth: take into account peer device for NETDEV_XDP_ACT_NDO_XMIT xdp_features flag mlxfw: fix null-ptr-deref in mlxfw_mfa2_tlv_next() bnxt_en: Fix a possible NULL pointer dereference in unload path bnxt_en: Do not initialize PTP on older P3/P4 chips netfilter: nf_tables: tighten netlink attribute requirements for catch-all elements ... commit 81ea1222f2fa5006f4b9759c2fe1ec154109622d Author: Ming Lei Date: Thu Apr 20 19:20:18 2023 +0800 Revert "block: Merge bio before checking ->cached_rq" This reverts commit 23f3e3272e7a4d9fb870485cd6df1e4f9539282c. blk-mq sched bio merge still needs request to grab queue usage counter, so we can't simply call blk_mq_attempt_bio_merge() when queue usage counter isn't held. Fixes: 23f3e3272e7a ("block: Merge bio before checking ->cached_rq") Cc: Xiao Ni Reported-by: Yi Zhang Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20230420112018.1108058-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 927cdea5d2095287ddd5246e5aa68eb5d68db2be Author: Vladimir Oltean Date: Tue Apr 18 18:59:02 2023 +0300 net: bridge: switchdev: don't notify FDB entries with "master dynamic" There is a structural problem in switchdev, where the flag bits in struct switchdev_notifier_fdb_info (added_by_user, is_local etc) only represent a simplified / denatured view of what's in struct net_bridge_fdb_entry :: flags (BR_FDB_ADDED_BY_USER, BR_FDB_LOCAL etc). Each time we want to pass more information about struct net_bridge_fdb_entry :: flags to struct switchdev_notifier_fdb_info (here, BR_FDB_STATIC), we find that FDB entries were already notified to switchdev with no regard to this flag, and thus, switchdev drivers had no indication whether the notified entries were static or not. For example, this command: ip link add br0 type bridge && ip link set swp0 master br0 bridge fdb add dev swp0 00:01:02:03:04:05 master dynamic has never worked as intended with switchdev. It causes a struct net_bridge_fdb_entry to be passed to br_switchdev_fdb_notify() which has a single flag set: BR_FDB_ADDED_BY_USER. This is further passed to the switchdev notifier chain, where interested drivers have no choice but to assume this is a static (does not age) and sticky (does not migrate) FDB entry. So currently, all drivers offload it to hardware as such, as can be seen below ("offload" is set). bridge fdb get 00:01:02:03:04:05 dev swp0 master 00:01:02:03:04:05 dev swp0 offload master br0 The software FDB entry expires $ageing_time centiseconds after the kernel last sees a packet with this MAC SA, and the bridge notifies its deletion as well, so it eventually disappears from hardware too. This is a problem, because it is actually desirable to start offloading "master dynamic" FDB entries correctly - they should expire $ageing_time centiseconds after the *hardware* port last sees a packet with this MAC SA - and this is how the current incorrect behavior was discovered. With an offloaded data plane, it can be expected that software only sees exception path packets, so an otherwise active dynamic FDB entry would be aged out by software sooner than it should. With the change in place, these FDB entries are no longer offloaded: bridge fdb get 00:01:02:03:04:05 dev swp0 master 00:01:02:03:04:05 dev swp0 master br0 and this also constitutes a better way (assuming a backport to stable kernels) for user space to determine whether the kernel has the capability of doing something sane with these or not. As opposed to "master dynamic" FDB entries, on the current behavior of which no one currently depends on (which can be deduced from the lack of kselftests), Ido Schimmel explains that entries with the "extern_learn" flag (BR_FDB_ADDED_BY_EXT_LEARN) should still be notified to switchdev, since the spectrum driver listens to them (and this is kind of okay, because although they are treated identically to "static", they are expected to not age, and to roam). Fixes: 6b26b51b1d13 ("net: bridge: Add support for notifying devices about FDB add/del") Link: https://lore.kernel.org/netdev/20230327115206.jk5q5l753aoelwus@skbuf/ Signed-off-by: Vladimir Oltean Reviewed-by: Jesse Brandeburg Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Link: https://lore.kernel.org/r/20230418155902.898627-1-vladimir.oltean@nxp.com Signed-off-by: Paolo Abeni commit 2ae147d643d326f74d93ba4f72a405f25f2677ea Author: Andy Chi Date: Thu Apr 20 11:59:41 2023 +0800 ALSA: hda/realtek: fix mute/micmute LEDs for a HP ProBook There is a HP ProBook 455 G10 which using ALC236 codec and need the ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF quirk to make mute LED and micmute LED work. Signed-off-by: Andy Chi Cc: Link: https://lore.kernel.org/r/20230420035942.66817-1-andy.chi@canonical.com Signed-off-by: Takashi Iwai commit 990cbca00226ff15fa2b24caffd099d05f2e2395 Merge: bc66b591903e1 86a24e99c9723 Author: Takashi Iwai Date: Thu Apr 20 07:11:30 2023 +0200 Merge tag 'asoc-fix-v6.3-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.3 A few remaining small fixes for v6.3, all small driver specific ones. commit f52cc627b832e08a7bcf1b7e81e650ec308fe1d8 Author: Jakub Kicinski Date: Thu Apr 13 15:25:47 2023 -0700 Revert "net/mlx5: Enable management PF initialization" This reverts commit fe998a3c77b9f989a30a2a01fb00d3729a6d53a4. Paul reports that it causes a regression with IB on CX4 and FW 12.18.1000. In addition I think that the concept of "management PF" is not fully accepted and requires a discussion. Fixes: fe998a3c77b9 ("net/mlx5: Enable management PF initialization") Reported-by: Paul Moore Link: https://lore.kernel.org/all/CAHC9VhQ7A4+msL38WpbOMYjAqLp0EtOjeLh4Dc6SQtD6OUvCQg@mail.gmail.com/ Link: https://lore.kernel.org/r/20230413222547.56901-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 9d94769081a65aacd54552dbdeeca2544f70442b Merge: 52b37ae8aa679 71b547f561247 Author: Jakub Kicinski Date: Wed Apr 19 18:22:18 2023 -0700 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== bpf 2023-04-19 We've added 3 non-merge commits during the last 6 day(s) which contain a total of 3 files changed, 34 insertions(+), 9 deletions(-). The main changes are: 1) Fix a crash on s390's bpf_arch_text_poke() under a NULL new_addr, from Ilya Leoshkevich. 2) Fix a bug in BPF verifier's precision tracker, from Daniel Borkmann and Andrii Nakryiko. 3) Fix a regression in veth's xdp_features which led to a broken BPF CI selftest, from Lorenzo Bianconi. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: bpf: Fix incorrect verifier pruning due to missing register precision taints veth: take into account peer device for NETDEV_XDP_ACT_NDO_XMIT xdp_features flag s390/bpf: Fix bpf_arch_text_poke() with new_addr == NULL ==================== Link: https://lore.kernel.org/r/20230419195847.27060-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 52b37ae8aa6797a8183e8554672797045e81d9ae Author: Mat Martineau Date: Tue Apr 18 16:13:18 2023 -0700 MAINTAINERS: Resume MPTCP co-maintainer role I'm returning to the MPTCP maintainer role I held for most of the subsytem's history. This time I'm using my kernel.org email address. Acked-by: Matthieu Baerts Link: https://lore.kernel.org/mptcp/af85e467-8d0a-4eba-b5f8-e2f2c5d24984@tessares.net/ Signed-off-by: Mat Martineau Link: https://lore.kernel.org/r/20230418231318.115331-1-martineau@kernel.org Signed-off-by: Jakub Kicinski commit 7b3aba7ea336d069b30b91502d47792c280bae2b Author: Matthieu Baerts Date: Tue Apr 18 10:36:59 2023 +0200 mailmap: add entries for Mat Martineau Map Mat's old corporate addresses to his kernel.org one. Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Link: https://lore.kernel.org/r/20230418-upstream-net-20230418-mailmap-mat-v1-1-13ca5dc83037@tessares.net Signed-off-by: Jakub Kicinski commit 7b97174d0ef798ba7f802c07527ae378923e5ebc Merge: 67d47b95119ad c86c00c693550 Author: Jakub Kicinski Date: Wed Apr 19 17:57:05 2023 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2023-04-17 (i40e) This series contains updates to i40e only. Alex moves setting of active filters to occur under lock and checks/takes error path in rebuild if re-initializing the misc interrupt vector failed. * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: i40e: fix i40e_setup_misc_vector() error handling i40e: fix accessing vsi->active_filters without holding lock ==================== Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230417205245.1030733-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit cb0856346a60fe3eb837ba5e73588a41f81ac05f Merge: 23990b1affd2d ef832747a82df Author: Linus Torvalds Date: Wed Apr 19 17:55:45 2023 -0700 Merge tag 'mm-hotfixes-stable-2023-04-19-16-36' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "22 hotfixes. 19 are cc:stable and the remainder address issues which were introduced during this merge cycle, or aren't considered suitable for -stable backporting. 19 are for MM and the remainder are for other subsystems" * tag 'mm-hotfixes-stable-2023-04-19-16-36' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (22 commits) nilfs2: initialize unused bytes in segment summary blocks mm: page_alloc: skip regions with hugetlbfs pages when allocating 1G pages mm/mmap: regression fix for unmapped_area{_topdown} maple_tree: fix mas_empty_area() search maple_tree: make maple state reusable after mas_empty_area_rev() mm: kmsan: handle alloc failures in kmsan_ioremap_page_range() mm: kmsan: handle alloc failures in kmsan_vmap_pages_range_noflush() tools/Makefile: do missed s/vm/mm/ mm: fix memory leak on mm_init error handling mm/page_alloc: fix potential deadlock on zonelist_update_seq seqlock kernel/sys.c: fix and improve control flow in __sys_setres[ug]id() Revert "userfaultfd: don't fail on unrecognized features" writeback, cgroup: fix null-ptr-deref write in bdi_split_work_to_wbs maple_tree: fix a potential memory leak, OOB access, or other unpredictable bug tools/mm/page_owner_sort.c: fix TGID output when cull=tg is used mailmap: update jtoppins' entry to reference correct email mm/mempolicy: fix use-after-free of VMA iterator mm/huge_memory.c: warn with pr_warn_ratelimited instead of VM_WARN_ON_ONCE_FOLIO mm/mprotect: fix do_mprotect_pkey() return on error mm/khugepaged: check again on anon uffd-wp during isolation ... commit 67d47b95119ad589b0a0b16b88b1dd9a04061ced Author: Sebastian Basierski Date: Mon Apr 17 13:53:45 2023 -0700 e1000e: Disable TSO on i219-LM card to increase speed While using i219-LM card currently it was only possible to achieve about 60% of maximum speed due to regression introduced in Linux 5.8. This was caused by TSO not being disabled by default despite commit f29801030ac6 ("e1000e: Disable TSO for buffer overrun workaround"). Fix that by disabling TSO during driver probe. Fixes: f29801030ac6 ("e1000e: Disable TSO for buffer overrun workaround") Signed-off-by: Sebastian Basierski Signed-off-by: Mateusz Palczewski Tested-by: Naama Meir Signed-off-by: Tony Nguyen Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230417205345.1030801-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 8c154d272c3e03b100baaf1df473f22a78fa403e Author: Vadim Fedorenko Date: Tue Apr 18 13:25:11 2023 -0700 bnxt_en: fix free-runnig PHC mode The patch in fixes changed the way real-time mode is chosen for PHC on the NIC. Apparently there is one more use case of the check outside of ptp part of the driver which was not converted to the new macro and is making a lot of noise in free-running mode. Fixes: 131db4991622 ("bnxt_en: reset PHC frequency in free-running mode") Signed-off-by: Vadim Fedorenko Reviewed-by: Michael Chan Reviewed-by: Pavan Chebbi Link: https://lore.kernel.org/r/20230418202511.1544735-1-vadfed@meta.com Signed-off-by: Jakub Kicinski commit 23990b1affd2dc8f5e59048d4d4bef05f6e1c544 Merge: 72b4fb4c883d5 359f5b0d4e26b Author: Linus Torvalds Date: Wed Apr 19 13:49:31 2023 -0700 Merge tag 'spi-fix-v6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fix from Mark Brown: "A small fix in the error handling for the rockchip driver, ensuring we don't leak clock enables if we fail to request the interrupt for the device" * tag 'spi-fix-v6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: spi-rockchip: Fix missing unwind goto in rockchip_sfc_probe() commit 72b4fb4c883d5deac74f5267e486f5dee1bffd5f Merge: 789b4a41c247e 7c7504067c709 Author: Linus Torvalds Date: Wed Apr 19 13:35:48 2023 -0700 Merge tag 'regulator-fix-v6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "A few driver specific fixes, one build coverage issue and a couple of 'someone typed in the wrong number' style errors in describing devices to the subsystem" * tag 'regulator-fix-v6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: sm5703: Fix missing n_voltages for fixed regulators regulator: fan53555: Fix wrong TCS_SLEW_MASK regulator: fan53555: Explicitly include bits header commit 3d2f8f1f184c60508f7af3022536651d7ac2dd07 Author: Christophe JAILLET Date: Mon Apr 17 20:19:33 2023 +0200 net: dsa: microchip: ksz8795: Correctly handle huge frame configuration Because of the logic in place, SW_HUGE_PACKET can never be set. (If the first condition is true, then the 2nd one is also true, but is not executed) Change the logic and update each bit individually. Fixes: 29d1e85f45e0 ("net: dsa: microchip: ksz8: add MTU configuration support") Signed-off-by: Christophe JAILLET Reviewed-by: Oleksij Rempel Reviewed-by: Simon Horman Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/43107d9e8b5b8b05f0cbd4e1f47a2bb88c8747b2.1681755535.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski commit d966c3cab924fb750fefef11e77a6fa07dd5420e Author: Andrea Righi Date: Fri Feb 10 22:51:41 2023 +0100 rust: allow to use INIT_STACK_ALL_ZERO With CONFIG_INIT_STACK_ALL_ZERO enabled, bindgen passes -ftrivial-auto-var-init=zero to clang, that triggers the following error: error: '-ftrivial-auto-var-init=zero' hasn't been enabled; enable it at your own peril for benchmarking purpose only with '-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang' However, this additional option that is currently required by clang is deprecated since clang-16 and going to be removed in the future, likely with clang-18. So, make sure bindgen is using this extra option if the major version of the libclang used by bindgen is < 16. In this way we can enable CONFIG_INIT_STACK_ALL_ZERO with CONFIG_RUST without triggering any build error. Link: https://github.com/llvm/llvm-project/issues/44842 Link: https://github.com/llvm/llvm-project/blob/llvmorg-16.0.0-rc2/clang/docs/ReleaseNotes.rst#deprecated-compiler-flags Signed-off-by: Andrea Righi Reviewed-by: Kees Cook [Changed to < 16, added link and reworded] Signed-off-by: Miguel Ojeda commit ccc4505454db10402d5284f22d8b7db62e636fc5 Author: Andrea Righi Date: Fri Feb 10 16:26:22 2023 +0100 rust: fix regexp in scripts/is_rust_module.sh nm can use "R" or "r" to show read-only data sections, but scripts/is_rust_module.sh can only recognize "r", so with some versions of binutils it can fail to detect if a module is a Rust module or not. Right now we're using this script only to determine if we need to skip BTF generation (that is disabled globally if CONFIG_RUST is enabled), but it's still nice to fix this script to do the proper job. Moreover, with this patch applied I can also relax the constraint of "RUST depends on !DEBUG_INFO_BTF" and build a kernel with Rust and BTF enabled at the same time (of course BTF generation is still skipped for Rust modules). [ Miguel: The actual reason is likely to be a change on the Rust compiler between 1.61.0 and 1.62.0: echo '#[used] static S: () = ();' | rustup run 1.61.0 rustc --emit=obj --crate-type=lib - && nm rust_out.o echo '#[used] static S: () = ();' | rustup run 1.62.0 rustc --emit=obj --crate-type=lib - && nm rust_out.o Gives: 0000000000000000 r _ZN8rust_out1S17h48027ce0da975467E 0000000000000000 R _ZN8rust_out1S17h58e1f3d9c0e97cefE See https://godbolt.org/z/KE6jneoo4. ] Signed-off-by: Andrea Righi Reviewed-by: Vincenzo Palazzo Reviewed-by: Eric Curtin Reviewed-by: Martin Rodriguez Reboredo Signed-off-by: Miguel Ojeda commit 71b547f561247897a0a14f3082730156c0533fed Author: Daniel Borkmann Date: Tue Apr 11 15:24:13 2023 +0000 bpf: Fix incorrect verifier pruning due to missing register precision taints Juan Jose et al reported an issue found via fuzzing where the verifier's pruning logic prematurely marks a program path as safe. Consider the following program: 0: (b7) r6 = 1024 1: (b7) r7 = 0 2: (b7) r8 = 0 3: (b7) r9 = -2147483648 4: (97) r6 %= 1025 5: (05) goto pc+0 6: (bd) if r6 <= r9 goto pc+2 7: (97) r6 %= 1 8: (b7) r9 = 0 9: (bd) if r6 <= r9 goto pc+1 10: (b7) r6 = 0 11: (b7) r0 = 0 12: (63) *(u32 *)(r10 -4) = r0 13: (18) r4 = 0xffff888103693400 // map_ptr(ks=4,vs=48) 15: (bf) r1 = r4 16: (bf) r2 = r10 17: (07) r2 += -4 18: (85) call bpf_map_lookup_elem#1 19: (55) if r0 != 0x0 goto pc+1 20: (95) exit 21: (77) r6 >>= 10 22: (27) r6 *= 8192 23: (bf) r1 = r0 24: (0f) r0 += r6 25: (79) r3 = *(u64 *)(r0 +0) 26: (7b) *(u64 *)(r1 +0) = r3 27: (95) exit The verifier treats this as safe, leading to oob read/write access due to an incorrect verifier conclusion: func#0 @0 0: R1=ctx(off=0,imm=0) R10=fp0 0: (b7) r6 = 1024 ; R6_w=1024 1: (b7) r7 = 0 ; R7_w=0 2: (b7) r8 = 0 ; R8_w=0 3: (b7) r9 = -2147483648 ; R9_w=-2147483648 4: (97) r6 %= 1025 ; R6_w=scalar() 5: (05) goto pc+0 6: (bd) if r6 <= r9 goto pc+2 ; R6_w=scalar(umin=18446744071562067969,var_off=(0xffffffff00000000; 0xffffffff)) R9_w=-2147483648 7: (97) r6 %= 1 ; R6_w=scalar() 8: (b7) r9 = 0 ; R9=0 9: (bd) if r6 <= r9 goto pc+1 ; R6=scalar(umin=1) R9=0 10: (b7) r6 = 0 ; R6_w=0 11: (b7) r0 = 0 ; R0_w=0 12: (63) *(u32 *)(r10 -4) = r0 last_idx 12 first_idx 9 regs=1 stack=0 before 11: (b7) r0 = 0 13: R0_w=0 R10=fp0 fp-8=0000???? 13: (18) r4 = 0xffff8ad3886c2a00 ; R4_w=map_ptr(off=0,ks=4,vs=48,imm=0) 15: (bf) r1 = r4 ; R1_w=map_ptr(off=0,ks=4,vs=48,imm=0) R4_w=map_ptr(off=0,ks=4,vs=48,imm=0) 16: (bf) r2 = r10 ; R2_w=fp0 R10=fp0 17: (07) r2 += -4 ; R2_w=fp-4 18: (85) call bpf_map_lookup_elem#1 ; R0=map_value_or_null(id=1,off=0,ks=4,vs=48,imm=0) 19: (55) if r0 != 0x0 goto pc+1 ; R0=0 20: (95) exit from 19 to 21: R0=map_value(off=0,ks=4,vs=48,imm=0) R6=0 R7=0 R8=0 R9=0 R10=fp0 fp-8=mmmm???? 21: (77) r6 >>= 10 ; R6_w=0 22: (27) r6 *= 8192 ; R6_w=0 23: (bf) r1 = r0 ; R0=map_value(off=0,ks=4,vs=48,imm=0) R1_w=map_value(off=0,ks=4,vs=48,imm=0) 24: (0f) r0 += r6 last_idx 24 first_idx 19 regs=40 stack=0 before 23: (bf) r1 = r0 regs=40 stack=0 before 22: (27) r6 *= 8192 regs=40 stack=0 before 21: (77) r6 >>= 10 regs=40 stack=0 before 19: (55) if r0 != 0x0 goto pc+1 parent didn't have regs=40 stack=0 marks: R0_rw=map_value_or_null(id=1,off=0,ks=4,vs=48,imm=0) R6_rw=P0 R7=0 R8=0 R9=0 R10=fp0 fp-8=mmmm???? last_idx 18 first_idx 9 regs=40 stack=0 before 18: (85) call bpf_map_lookup_elem#1 regs=40 stack=0 before 17: (07) r2 += -4 regs=40 stack=0 before 16: (bf) r2 = r10 regs=40 stack=0 before 15: (bf) r1 = r4 regs=40 stack=0 before 13: (18) r4 = 0xffff8ad3886c2a00 regs=40 stack=0 before 12: (63) *(u32 *)(r10 -4) = r0 regs=40 stack=0 before 11: (b7) r0 = 0 regs=40 stack=0 before 10: (b7) r6 = 0 25: (79) r3 = *(u64 *)(r0 +0) ; R0_w=map_value(off=0,ks=4,vs=48,imm=0) R3_w=scalar() 26: (7b) *(u64 *)(r1 +0) = r3 ; R1_w=map_value(off=0,ks=4,vs=48,imm=0) R3_w=scalar() 27: (95) exit from 9 to 11: R1=ctx(off=0,imm=0) R6=0 R7=0 R8=0 R9=0 R10=fp0 11: (b7) r0 = 0 ; R0_w=0 12: (63) *(u32 *)(r10 -4) = r0 last_idx 12 first_idx 11 regs=1 stack=0 before 11: (b7) r0 = 0 13: R0_w=0 R10=fp0 fp-8=0000???? 13: (18) r4 = 0xffff8ad3886c2a00 ; R4_w=map_ptr(off=0,ks=4,vs=48,imm=0) 15: (bf) r1 = r4 ; R1_w=map_ptr(off=0,ks=4,vs=48,imm=0) R4_w=map_ptr(off=0,ks=4,vs=48,imm=0) 16: (bf) r2 = r10 ; R2_w=fp0 R10=fp0 17: (07) r2 += -4 ; R2_w=fp-4 18: (85) call bpf_map_lookup_elem#1 frame 0: propagating r6 last_idx 19 first_idx 11 regs=40 stack=0 before 18: (85) call bpf_map_lookup_elem#1 regs=40 stack=0 before 17: (07) r2 += -4 regs=40 stack=0 before 16: (bf) r2 = r10 regs=40 stack=0 before 15: (bf) r1 = r4 regs=40 stack=0 before 13: (18) r4 = 0xffff8ad3886c2a00 regs=40 stack=0 before 12: (63) *(u32 *)(r10 -4) = r0 regs=40 stack=0 before 11: (b7) r0 = 0 parent didn't have regs=40 stack=0 marks: R1=ctx(off=0,imm=0) R6_r=P0 R7=0 R8=0 R9=0 R10=fp0 last_idx 9 first_idx 9 regs=40 stack=0 before 9: (bd) if r6 <= r9 goto pc+1 parent didn't have regs=40 stack=0 marks: R1=ctx(off=0,imm=0) R6_rw=Pscalar() R7_w=0 R8_w=0 R9_rw=0 R10=fp0 last_idx 8 first_idx 0 regs=40 stack=0 before 8: (b7) r9 = 0 regs=40 stack=0 before 7: (97) r6 %= 1 regs=40 stack=0 before 6: (bd) if r6 <= r9 goto pc+2 regs=40 stack=0 before 5: (05) goto pc+0 regs=40 stack=0 before 4: (97) r6 %= 1025 regs=40 stack=0 before 3: (b7) r9 = -2147483648 regs=40 stack=0 before 2: (b7) r8 = 0 regs=40 stack=0 before 1: (b7) r7 = 0 regs=40 stack=0 before 0: (b7) r6 = 1024 19: safe frame 0: propagating r6 last_idx 9 first_idx 0 regs=40 stack=0 before 6: (bd) if r6 <= r9 goto pc+2 regs=40 stack=0 before 5: (05) goto pc+0 regs=40 stack=0 before 4: (97) r6 %= 1025 regs=40 stack=0 before 3: (b7) r9 = -2147483648 regs=40 stack=0 before 2: (b7) r8 = 0 regs=40 stack=0 before 1: (b7) r7 = 0 regs=40 stack=0 before 0: (b7) r6 = 1024 from 6 to 9: safe verification time 110 usec stack depth 4 processed 36 insns (limit 1000000) max_states_per_insn 0 total_states 3 peak_states 3 mark_read 2 The verifier considers this program as safe by mistakenly pruning unsafe code paths. In the above func#0, code lines 0-10 are of interest. In line 0-3 registers r6 to r9 are initialized with known scalar values. In line 4 the register r6 is reset to an unknown scalar given the verifier does not track modulo operations. Due to this, the verifier can also not determine precisely which branches in line 6 and 9 are taken, therefore it needs to explore them both. As can be seen, the verifier starts with exploring the false/fall-through paths first. The 'from 19 to 21' path has both r6=0 and r9=0 and the pointer arithmetic on r0 += r6 is therefore considered safe. Given the arithmetic, r6 is correctly marked for precision tracking where backtracking kicks in where it walks back the current path all the way where r6 was set to 0 in the fall-through branch. Next, the pruning logics pops the path 'from 9 to 11' from the stack. Also here, the state of the registers is the same, that is, r6=0 and r9=0, so that at line 19 the path can be pruned as it is considered safe. It is interesting to note that the conditional in line 9 turned r6 into a more precise state, that is, in the fall-through path at the beginning of line 10, it is R6=scalar(umin=1), and in the branch-taken path (which is analyzed here) at the beginning of line 11, r6 turned into a known const r6=0 as r9=0 prior to that and therefore (unsigned) r6 <= 0 concludes that r6 must be 0 (**): [...] ; R6_w=scalar() 9: (bd) if r6 <= r9 goto pc+1 ; R6=scalar(umin=1) R9=0 [...] from 9 to 11: R1=ctx(off=0,imm=0) R6=0 R7=0 R8=0 R9=0 R10=fp0 [...] The next path is 'from 6 to 9'. The verifier considers the old and current state equivalent, and therefore prunes the search incorrectly. Looking into the two states which are being compared by the pruning logic at line 9, the old state consists of R6_rwD=Pscalar() R9_rwD=0 R10=fp0 and the new state consists of R1=ctx(off=0,imm=0) R6_w=scalar(umax=18446744071562067968) R7_w=0 R8_w=0 R9_w=-2147483648 R10=fp0. While r6 had the reg->precise flag correctly set in the old state, r9 did not. Both r6'es are considered as equivalent given the old one is a superset of the current, more precise one, however, r9's actual values (0 vs 0x80000000) mismatch. Given the old r9 did not have reg->precise flag set, the verifier does not consider the register as contributing to the precision state of r6, and therefore it considered both r9 states as equivalent. However, for this specific pruned path (which is also the actual path taken at runtime), register r6 will be 0x400 and r9 0x80000000 when reaching line 21, thus oob-accessing the map. The purpose of precision tracking is to initially mark registers (including spilled ones) as imprecise to help verifier's pruning logic finding equivalent states it can then prune if they don't contribute to the program's safety aspects. For example, if registers are used for pointer arithmetic or to pass constant length to a helper, then the verifier sets reg->precise flag and backtracks the BPF program instruction sequence and chain of verifier states to ensure that the given register or stack slot including their dependencies are marked as precisely tracked scalar. This also includes any other registers and slots that contribute to a tracked state of given registers/stack slot. This backtracking relies on recorded jmp_history and is able to traverse entire chain of parent states. This process ends only when all the necessary registers/slots and their transitive dependencies are marked as precise. The backtrack_insn() is called from the current instruction up to the first instruction, and its purpose is to compute a bitmask of registers and stack slots that need precision tracking in the parent's verifier state. For example, if a current instruction is r6 = r7, then r6 needs precision after this instruction and r7 needs precision before this instruction, that is, in the parent state. Hence for the latter r7 is marked and r6 unmarked. For the class of jmp/jmp32 instructions, backtrack_insn() today only looks at call and exit instructions and for all other conditionals the masks remain as-is. However, in the given situation register r6 has a dependency on r9 (as described above in **), so also that one needs to be marked for precision tracking. In other words, if an imprecise register influences a precise one, then the imprecise register should also be marked precise. Meaning, in the parent state both dest and src register need to be tracked for precision and therefore the marking must be more conservative by setting reg->precise flag for both. The precision propagation needs to cover both for the conditional: if the src reg was marked but not the dst reg and vice versa. After the fix the program is correctly rejected: func#0 @0 0: R1=ctx(off=0,imm=0) R10=fp0 0: (b7) r6 = 1024 ; R6_w=1024 1: (b7) r7 = 0 ; R7_w=0 2: (b7) r8 = 0 ; R8_w=0 3: (b7) r9 = -2147483648 ; R9_w=-2147483648 4: (97) r6 %= 1025 ; R6_w=scalar() 5: (05) goto pc+0 6: (bd) if r6 <= r9 goto pc+2 ; R6_w=scalar(umin=18446744071562067969,var_off=(0xffffffff80000000; 0x7fffffff),u32_min=-2147483648) R9_w=-2147483648 7: (97) r6 %= 1 ; R6_w=scalar() 8: (b7) r9 = 0 ; R9=0 9: (bd) if r6 <= r9 goto pc+1 ; R6=scalar(umin=1) R9=0 10: (b7) r6 = 0 ; R6_w=0 11: (b7) r0 = 0 ; R0_w=0 12: (63) *(u32 *)(r10 -4) = r0 last_idx 12 first_idx 9 regs=1 stack=0 before 11: (b7) r0 = 0 13: R0_w=0 R10=fp0 fp-8=0000???? 13: (18) r4 = 0xffff9290dc5bfe00 ; R4_w=map_ptr(off=0,ks=4,vs=48,imm=0) 15: (bf) r1 = r4 ; R1_w=map_ptr(off=0,ks=4,vs=48,imm=0) R4_w=map_ptr(off=0,ks=4,vs=48,imm=0) 16: (bf) r2 = r10 ; R2_w=fp0 R10=fp0 17: (07) r2 += -4 ; R2_w=fp-4 18: (85) call bpf_map_lookup_elem#1 ; R0=map_value_or_null(id=1,off=0,ks=4,vs=48,imm=0) 19: (55) if r0 != 0x0 goto pc+1 ; R0=0 20: (95) exit from 19 to 21: R0=map_value(off=0,ks=4,vs=48,imm=0) R6=0 R7=0 R8=0 R9=0 R10=fp0 fp-8=mmmm???? 21: (77) r6 >>= 10 ; R6_w=0 22: (27) r6 *= 8192 ; R6_w=0 23: (bf) r1 = r0 ; R0=map_value(off=0,ks=4,vs=48,imm=0) R1_w=map_value(off=0,ks=4,vs=48,imm=0) 24: (0f) r0 += r6 last_idx 24 first_idx 19 regs=40 stack=0 before 23: (bf) r1 = r0 regs=40 stack=0 before 22: (27) r6 *= 8192 regs=40 stack=0 before 21: (77) r6 >>= 10 regs=40 stack=0 before 19: (55) if r0 != 0x0 goto pc+1 parent didn't have regs=40 stack=0 marks: R0_rw=map_value_or_null(id=1,off=0,ks=4,vs=48,imm=0) R6_rw=P0 R7=0 R8=0 R9=0 R10=fp0 fp-8=mmmm???? last_idx 18 first_idx 9 regs=40 stack=0 before 18: (85) call bpf_map_lookup_elem#1 regs=40 stack=0 before 17: (07) r2 += -4 regs=40 stack=0 before 16: (bf) r2 = r10 regs=40 stack=0 before 15: (bf) r1 = r4 regs=40 stack=0 before 13: (18) r4 = 0xffff9290dc5bfe00 regs=40 stack=0 before 12: (63) *(u32 *)(r10 -4) = r0 regs=40 stack=0 before 11: (b7) r0 = 0 regs=40 stack=0 before 10: (b7) r6 = 0 25: (79) r3 = *(u64 *)(r0 +0) ; R0_w=map_value(off=0,ks=4,vs=48,imm=0) R3_w=scalar() 26: (7b) *(u64 *)(r1 +0) = r3 ; R1_w=map_value(off=0,ks=4,vs=48,imm=0) R3_w=scalar() 27: (95) exit from 9 to 11: R1=ctx(off=0,imm=0) R6=0 R7=0 R8=0 R9=0 R10=fp0 11: (b7) r0 = 0 ; R0_w=0 12: (63) *(u32 *)(r10 -4) = r0 last_idx 12 first_idx 11 regs=1 stack=0 before 11: (b7) r0 = 0 13: R0_w=0 R10=fp0 fp-8=0000???? 13: (18) r4 = 0xffff9290dc5bfe00 ; R4_w=map_ptr(off=0,ks=4,vs=48,imm=0) 15: (bf) r1 = r4 ; R1_w=map_ptr(off=0,ks=4,vs=48,imm=0) R4_w=map_ptr(off=0,ks=4,vs=48,imm=0) 16: (bf) r2 = r10 ; R2_w=fp0 R10=fp0 17: (07) r2 += -4 ; R2_w=fp-4 18: (85) call bpf_map_lookup_elem#1 frame 0: propagating r6 last_idx 19 first_idx 11 regs=40 stack=0 before 18: (85) call bpf_map_lookup_elem#1 regs=40 stack=0 before 17: (07) r2 += -4 regs=40 stack=0 before 16: (bf) r2 = r10 regs=40 stack=0 before 15: (bf) r1 = r4 regs=40 stack=0 before 13: (18) r4 = 0xffff9290dc5bfe00 regs=40 stack=0 before 12: (63) *(u32 *)(r10 -4) = r0 regs=40 stack=0 before 11: (b7) r0 = 0 parent didn't have regs=40 stack=0 marks: R1=ctx(off=0,imm=0) R6_r=P0 R7=0 R8=0 R9=0 R10=fp0 last_idx 9 first_idx 9 regs=40 stack=0 before 9: (bd) if r6 <= r9 goto pc+1 parent didn't have regs=240 stack=0 marks: R1=ctx(off=0,imm=0) R6_rw=Pscalar() R7_w=0 R8_w=0 R9_rw=P0 R10=fp0 last_idx 8 first_idx 0 regs=240 stack=0 before 8: (b7) r9 = 0 regs=40 stack=0 before 7: (97) r6 %= 1 regs=40 stack=0 before 6: (bd) if r6 <= r9 goto pc+2 regs=240 stack=0 before 5: (05) goto pc+0 regs=240 stack=0 before 4: (97) r6 %= 1025 regs=240 stack=0 before 3: (b7) r9 = -2147483648 regs=40 stack=0 before 2: (b7) r8 = 0 regs=40 stack=0 before 1: (b7) r7 = 0 regs=40 stack=0 before 0: (b7) r6 = 1024 19: safe from 6 to 9: R1=ctx(off=0,imm=0) R6_w=scalar(umax=18446744071562067968) R7_w=0 R8_w=0 R9_w=-2147483648 R10=fp0 9: (bd) if r6 <= r9 goto pc+1 last_idx 9 first_idx 0 regs=40 stack=0 before 6: (bd) if r6 <= r9 goto pc+2 regs=240 stack=0 before 5: (05) goto pc+0 regs=240 stack=0 before 4: (97) r6 %= 1025 regs=240 stack=0 before 3: (b7) r9 = -2147483648 regs=40 stack=0 before 2: (b7) r8 = 0 regs=40 stack=0 before 1: (b7) r7 = 0 regs=40 stack=0 before 0: (b7) r6 = 1024 last_idx 9 first_idx 0 regs=200 stack=0 before 6: (bd) if r6 <= r9 goto pc+2 regs=240 stack=0 before 5: (05) goto pc+0 regs=240 stack=0 before 4: (97) r6 %= 1025 regs=240 stack=0 before 3: (b7) r9 = -2147483648 regs=40 stack=0 before 2: (b7) r8 = 0 regs=40 stack=0 before 1: (b7) r7 = 0 regs=40 stack=0 before 0: (b7) r6 = 1024 11: R6=scalar(umax=18446744071562067968) R9=-2147483648 11: (b7) r0 = 0 ; R0_w=0 12: (63) *(u32 *)(r10 -4) = r0 last_idx 12 first_idx 11 regs=1 stack=0 before 11: (b7) r0 = 0 13: R0_w=0 R10=fp0 fp-8=0000???? 13: (18) r4 = 0xffff9290dc5bfe00 ; R4_w=map_ptr(off=0,ks=4,vs=48,imm=0) 15: (bf) r1 = r4 ; R1_w=map_ptr(off=0,ks=4,vs=48,imm=0) R4_w=map_ptr(off=0,ks=4,vs=48,imm=0) 16: (bf) r2 = r10 ; R2_w=fp0 R10=fp0 17: (07) r2 += -4 ; R2_w=fp-4 18: (85) call bpf_map_lookup_elem#1 ; R0_w=map_value_or_null(id=3,off=0,ks=4,vs=48,imm=0) 19: (55) if r0 != 0x0 goto pc+1 ; R0_w=0 20: (95) exit from 19 to 21: R0=map_value(off=0,ks=4,vs=48,imm=0) R6=scalar(umax=18446744071562067968) R7=0 R8=0 R9=-2147483648 R10=fp0 fp-8=mmmm???? 21: (77) r6 >>= 10 ; R6_w=scalar(umax=18014398507384832,var_off=(0x0; 0x3fffffffffffff)) 22: (27) r6 *= 8192 ; R6_w=scalar(smax=9223372036854767616,umax=18446744073709543424,var_off=(0x0; 0xffffffffffffe000),s32_max=2147475456,u32_max=-8192) 23: (bf) r1 = r0 ; R0=map_value(off=0,ks=4,vs=48,imm=0) R1_w=map_value(off=0,ks=4,vs=48,imm=0) 24: (0f) r0 += r6 last_idx 24 first_idx 21 regs=40 stack=0 before 23: (bf) r1 = r0 regs=40 stack=0 before 22: (27) r6 *= 8192 regs=40 stack=0 before 21: (77) r6 >>= 10 parent didn't have regs=40 stack=0 marks: R0_rw=map_value(off=0,ks=4,vs=48,imm=0) R6_r=Pscalar(umax=18446744071562067968) R7=0 R8=0 R9=-2147483648 R10=fp0 fp-8=mmmm???? last_idx 19 first_idx 11 regs=40 stack=0 before 19: (55) if r0 != 0x0 goto pc+1 regs=40 stack=0 before 18: (85) call bpf_map_lookup_elem#1 regs=40 stack=0 before 17: (07) r2 += -4 regs=40 stack=0 before 16: (bf) r2 = r10 regs=40 stack=0 before 15: (bf) r1 = r4 regs=40 stack=0 before 13: (18) r4 = 0xffff9290dc5bfe00 regs=40 stack=0 before 12: (63) *(u32 *)(r10 -4) = r0 regs=40 stack=0 before 11: (b7) r0 = 0 parent didn't have regs=40 stack=0 marks: R1=ctx(off=0,imm=0) R6_rw=Pscalar(umax=18446744071562067968) R7_w=0 R8_w=0 R9_w=-2147483648 R10=fp0 last_idx 9 first_idx 0 regs=40 stack=0 before 9: (bd) if r6 <= r9 goto pc+1 regs=240 stack=0 before 6: (bd) if r6 <= r9 goto pc+2 regs=240 stack=0 before 5: (05) goto pc+0 regs=240 stack=0 before 4: (97) r6 %= 1025 regs=240 stack=0 before 3: (b7) r9 = -2147483648 regs=40 stack=0 before 2: (b7) r8 = 0 regs=40 stack=0 before 1: (b7) r7 = 0 regs=40 stack=0 before 0: (b7) r6 = 1024 math between map_value pointer and register with unbounded min value is not allowed verification time 886 usec stack depth 4 processed 49 insns (limit 1000000) max_states_per_insn 1 total_states 5 peak_states 5 mark_read 2 Fixes: b5dc0163d8fd ("bpf: precise scalar_value tracking") Reported-by: Juan Jose Lopez Jaimez Reported-by: Meador Inge Reported-by: Simon Scannell Reported-by: Nenad Stojanovski Signed-off-by: Daniel Borkmann Co-developed-by: Andrii Nakryiko Signed-off-by: Andrii Nakryiko Reviewed-by: John Fastabend Reviewed-by: Juan Jose Lopez Jaimez Reviewed-by: Meador Inge Reviewed-by: Simon Scannell commit a25bc8486f9c01c1af6b6c5657234b2eee2c39d6 Author: Dan Carpenter Date: Wed Apr 19 13:16:13 2023 +0300 KVM: arm64: Fix buffer overflow in kvm_arm_set_fw_reg() The KVM_REG_SIZE() comes from the ioctl and it can be a power of two between 0-32768 but if it is more than sizeof(long) this will corrupt memory. Fixes: 99adb567632b ("KVM: arm/arm64: Add save/restore support for firmware workaround state") Signed-off-by: Dan Carpenter Reviewed-by: Steven Price Reviewed-by: Eric Auger Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/4efbab8c-640f-43b2-8ac6-6d68e08280fe@kili.mountain Signed-off-by: Oliver Upton commit 789b4a41c247ed654322a6150815025b5497cad0 Merge: 40aacb3183ff7 d51425190805d Author: Linus Torvalds Date: Wed Apr 19 07:29:33 2023 -0700 Merge tag 'nfsd-6.3-6' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fixes from Chuck Lever: - Address two issues with the new GSS krb5 Kunit tests * tag 'nfsd-6.3-6' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: SUNRPC: Fix failures of checksum Kunit tests sunrpc: Fix RFC6803 encryption test commit 40aacb3183ff74e15940189ff9a998a93b5ca76f Merge: af67688dca579 b5533e990dd1d Author: Linus Torvalds Date: Wed Apr 19 07:25:12 2023 -0700 Merge tag 'loongarch-fixes-6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson Pull LoongArch fixes from Huacai Chen: "Some bug fixes, some build fixes, a comment fix and a trivial cleanup" * tag 'loongarch-fixes-6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: tools/loongarch: Use __SIZEOF_LONG__ to define __BITS_PER_LONG LoongArch: Replace hard-coded values in comments with VALEN LoongArch: Clean up plat_swiotlb_setup() related code LoongArch: Check unwind_error() in arch_stack_walk() LoongArch: Adjust user_regset_copyin parameter to the correct offset LoongArch: Adjust user_watch_state for explicit alignment LoongArch: module: set section addresses to 0x0 LoongArch: Mark 3 symbol exports as non-GPL LoongArch: Enable PG when wakeup from suspend LoongArch: Fix _CONST64_(x) as unsigned LoongArch: Fix build error if CONFIG_SUSPEND is not set LoongArch: Fix probing of the CRC32 feature LoongArch: Make WriteCombine configurable for ioremap() commit 359f5b0d4e26b7a7bcc574d6148b31a17cefe47d Author: Li Lanzhe Date: Wed Apr 19 07:50:29 2023 -0400 spi: spi-rockchip: Fix missing unwind goto in rockchip_sfc_probe() If devm_request_irq() fails, then we are directly return 'ret' without clk_disable_unprepare(sfc->clk) and clk_disable_unprepare(sfc->hclk). Fix this by changing direct return to a goto 'err_irq'. Fixes: 0b89fc0a367e ("spi: rockchip-sfc: add rockchip serial flash controller") Signed-off-by: Li Lanzhe Reviewed-by: Dongliang Mu Link: https://lore.kernel.org/r/20230419115030.6029-1-u202212060@hust.edu.cn Signed-off-by: Mark Brown commit 86a24e99c97234f87d9f70b528a691150e145197 Author: Nikita Zhandarovich Date: Mon Apr 17 06:32:42 2023 -0700 ASoC: fsl_asrc_dma: fix potential null-ptr-deref dma_request_slave_channel() may return NULL which will lead to NULL pointer dereference error in 'tmp_chan->private'. Correct this behaviour by, first, switching from deprecated function dma_request_slave_channel() to dma_request_chan(). Secondly, enable sanity check for the resuling value of dma_request_chan(). Also, fix description that follows the enacted changes and that concerns the use of dma_request_slave_channel(). Fixes: 706e2c881158 ("ASoC: fsl_asrc_dma: Reuse the dma channel if available in Back-End") Co-developed-by: Natalia Petrova Signed-off-by: Nikita Zhandarovich Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20230417133242.53339-1-n.zhandarovich@fintech.ru Signed-off-by: Mark Brown commit 238787157d83969e5149c8e99787d5d90e85fbe5 Author: Chancel Liu Date: Tue Apr 18 17:42:59 2023 +0800 ASoC: fsl_sai: Fix pins setting for i.MX8QM platform SAI on i.MX8QM platform supports the data lines up to 4. So the pins setting should be corrected to 4. Fixes: eba0f0077519 ("ASoC: fsl_sai: Enable combine mode soft") Signed-off-by: Chancel Liu Acked-by: Shengjiu Wang Reviewed-by: Iuliana Prodan Link: https://lore.kernel.org/r/20230418094259.4150771-1-chancel.liu@nxp.com Signed-off-by: Mark Brown commit fcd4843a19d50f9e59116b2643e1a7d171b6fca1 Author: Arnd Bergmann Date: Mon Apr 17 22:50:55 2023 +0200 hamradio: drop ISA_DMA_API dependency It looks like the dependency got added accidentally in commit a553260618d8 ("[PATCH] ISA DMA Kconfig fixes - part 3"). Unlike the previously removed dmascc driver, the scc driver never used DMA. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit 1f64757ee2bb22a93ec89b4c71707297e8cca0ba Author: Ido Schimmel Date: Mon Apr 17 18:52:51 2023 +0200 mlxsw: pci: Fix possible crash during initialization During initialization the driver issues a reset command via its command interface in order to remove previous configuration from the device. After issuing the reset, the driver waits for 200ms before polling on the "system_status" register using memory-mapped IO until the device reaches a ready state (0x5E). The wait is necessary because the reset command only triggers the reset, but the reset itself happens asynchronously. If the driver starts polling too soon, the read of the "system_status" register will never return and the system will crash [1]. The issue was discovered when the device was flashed with a development firmware version where the reset routine took longer to complete. The issue was fixed in the firmware, but it exposed the fact that the current wait time is borderline. Fix by increasing the wait time from 200ms to 400ms. With this patch and the buggy firmware version, the issue did not reproduce in 10 reboots whereas without the patch the issue is reproduced quite consistently. [1] mce: CPUs not responding to MCE broadcast (may include false positives): 0,4 mce: CPUs not responding to MCE broadcast (may include false positives): 0,4 Kernel panic - not syncing: Timeout: Not all CPUs entered broadcast exception handler Shutting down cpus with NMI Kernel Offset: 0x12000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff) Fixes: ac004e84164e ("mlxsw: pci: Wait longer before accessing the device after reset") Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit bc66b591903e197982215f9febcfa09c4becfd89 Author: Jaroslav Kysela Date: Wed Apr 19 10:11:21 2023 +0200 ALSA: hda/realtek: Remove specific patch for Dell Precision 3260 Unfortunately, the tester gave a weak feedback (working/non-working) for this case. After the double confirmation, this change is not really required. The standard code with alc269_fallback_pin_fixup_tbl should work on this hardware. Fixes: 5911d78fabbb ("ALSA: hda/realtek: Improve support for Dell Precision 3260") Fixes: 5f4efc9dfcfd ("ALSA: hda/realtek: Fix support for Dell Precision 3260") Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20230419081121.304846-1-perex@perex.cz Signed-off-by: Takashi Iwai commit ed7f9c01e2de73eb65388357c341d4323dd02eac Merge: 4e006c7a6dac0 63740448a32eb Author: David S. Miller Date: Wed Apr 19 09:08:37 2023 +0100 Merge branch 'mptcp-fixes' Matthieu Baerts says: ==================== mptcp: fixes around listening sockets and the MPTCP worker Christoph Paasch reported a couple of issues found by syzkaller and linked to operations done by the MPTCP worker on (un)accepted sockets. Fixing these issues was not obvious and rather complex but Paolo Abeni nicely managed to propose these excellent patches that seem to satisfy syzkaller. Patch 1 partially reverts a recent fix but while still providing a solution for the previous issue, it also prevents the MPTCP worker from running concurrently with inet_csk_listen_stop(). A warning is then avoided. The partially reverted patch has been introduced in v6.3-rc3, backported up to v6.1 and fixing an issue visible from v5.18. Patch 2 prevents the MPTCP worker to race with mptcp_accept() causing a UaF when a fallback to TCP is done while in parallel, the socket is being accepted by the userspace. This is also a fix of a previous fix introduced in v6.3-rc3, backported up to v6.1 but here fixing an issue that is in theory there from v5.7. There is no need to backport it up to here as it looks like it is only visible later, around v5.18, see the previous cover-letter linked to this original fix. ==================== Signed-off-by: Matthieu Baerts commit 63740448a32eb662e05894425b47bcc5814136f4 Author: Paolo Abeni Date: Mon Apr 17 16:00:41 2023 +0200 mptcp: fix accept vs worker race The mptcp worker and mptcp_accept() can race, as reported by Christoph: refcount_t: addition on 0; use-after-free. WARNING: CPU: 1 PID: 14351 at lib/refcount.c:25 refcount_warn_saturate+0x105/0x1b0 lib/refcount.c:25 Modules linked in: CPU: 1 PID: 14351 Comm: syz-executor.2 Not tainted 6.3.0-rc1-gde5e8fd0123c #11 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-2.el7 04/01/2014 RIP: 0010:refcount_warn_saturate+0x105/0x1b0 lib/refcount.c:25 Code: 02 31 ff 89 de e8 1b f0 a7 ff 84 db 0f 85 6e ff ff ff e8 3e f5 a7 ff 48 c7 c7 d8 c7 34 83 c6 05 6d 2d 0f 02 01 e8 cb 3d 90 ff <0f> 0b e9 4f ff ff ff e8 1f f5 a7 ff 0f b6 1d 54 2d 0f 02 31 ff 89 RSP: 0018:ffffc90000a47bf8 EFLAGS: 00010282 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffff88802eae98c0 RSI: ffffffff81097d4f RDI: 0000000000000001 RBP: ffff88802e712180 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: ffff88802eaea148 R12: ffff88802e712100 R13: ffff88802e712a88 R14: ffff888005cb93a8 R15: ffff88802e712a88 FS: 0000000000000000(0000) GS:ffff88803ed00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f277fd89120 CR3: 0000000035486002 CR4: 0000000000370ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __refcount_add include/linux/refcount.h:199 [inline] __refcount_inc include/linux/refcount.h:250 [inline] refcount_inc include/linux/refcount.h:267 [inline] sock_hold include/net/sock.h:775 [inline] __mptcp_close+0x4c6/0x4d0 net/mptcp/protocol.c:3051 mptcp_close+0x24/0xe0 net/mptcp/protocol.c:3072 inet_release+0x56/0xa0 net/ipv4/af_inet.c:429 __sock_release+0x51/0xf0 net/socket.c:653 sock_close+0x18/0x20 net/socket.c:1395 __fput+0x113/0x430 fs/file_table.c:321 task_work_run+0x96/0x100 kernel/task_work.c:179 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0x4fc/0x10c0 kernel/exit.c:869 do_group_exit+0x51/0xf0 kernel/exit.c:1019 get_signal+0x12b0/0x1390 kernel/signal.c:2859 arch_do_signal_or_restart+0x25/0x260 arch/x86/kernel/signal.c:306 exit_to_user_mode_loop kernel/entry/common.c:168 [inline] exit_to_user_mode_prepare+0x131/0x1a0 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x19/0x40 kernel/entry/common.c:296 do_syscall_64+0x46/0x90 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7fec4b4926a9 Code: Unable to access opcode bytes at 0x7fec4b49267f. RSP: 002b:00007fec49f9dd78 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00000000006bc058 RCX: 00007fec4b4926a9 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00000000006bc058 RBP: 00000000006bc050 R08: 00000000007df998 R09: 00000000007df998 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006bc05c R13: fffffffffffffea8 R14: 000000000000000b R15: 000000000001fe40 The root cause is that the worker can force fallback to TCP the first mptcp subflow, actually deleting the unaccepted msk socket. We can explicitly prevent the race delaying the unaccepted msk deletion at listener shutdown time. In case the closed subflow is later accepted, just drop the mptcp context and let the user-space deal with the paired mptcp socket. Fixes: b6985b9b8295 ("mptcp: use the workqueue to destroy unaccepted sockets") Cc: stable@vger.kernel.org Reported-by: Christoph Paasch Link: https://github.com/multipath-tcp/mptcp_net-next/issues/375 Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Tested-by: Christoph Paasch Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit 2a6a870e44dd88f1a6a2893c65ef756a9edfb4c7 Author: Paolo Abeni Date: Mon Apr 17 16:00:40 2023 +0200 mptcp: stops worker on unaccepted sockets at listener close This is a partial revert of the blamed commit, with a relevant change: mptcp_subflow_queue_clean() now just change the msk socket status and stop the worker, so that the UaF issue addressed by the blamed commit is not re-introduced. The above prevents the mptcp worker from running concurrently with inet_csk_listen_stop(), as such race would trigger a warning, as reported by Christoph: RSP: 002b:00007f784fe09cd8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e WARNING: CPU: 0 PID: 25807 at net/ipv4/inet_connection_sock.c:1387 inet_csk_listen_stop+0x664/0x870 net/ipv4/inet_connection_sock.c:1387 RAX: ffffffffffffffda RBX: 00000000006bc050 RCX: 00007f7850afd6a9 RDX: 0000000000000000 RSI: 0000000020000340 RDI: 0000000000000004 Modules linked in: RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006bc05c R13: fffffffffffffea8 R14: 00000000006bc050 R15: 000000000001fe40 CPU: 0 PID: 25807 Comm: syz-executor.7 Not tainted 6.2.0-g778e54711659 #7 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-2.el7 04/01/2014 RIP: 0010:inet_csk_listen_stop+0x664/0x870 net/ipv4/inet_connection_sock.c:1387 RAX: 0000000000000000 RBX: ffff888100dfbd40 RCX: 0000000000000000 RDX: ffff8881363aab80 RSI: ffffffff81c494f4 RDI: 0000000000000005 RBP: ffff888126dad080 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: ffff888100dfe040 R13: 0000000000000001 R14: 0000000000000000 R15: ffff888100dfbdd8 FS: 00007f7850a2c800(0000) GS:ffff88813bc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b32d26000 CR3: 000000012fdd8006 CR4: 0000000000770ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: __tcp_close+0x5b2/0x620 net/ipv4/tcp.c:2875 __mptcp_close_ssk+0x145/0x3d0 net/mptcp/protocol.c:2427 mptcp_destroy_common+0x8a/0x1c0 net/mptcp/protocol.c:3277 mptcp_destroy+0x41/0x60 net/mptcp/protocol.c:3304 __mptcp_destroy_sock+0x56/0x140 net/mptcp/protocol.c:2965 __mptcp_close+0x38f/0x4a0 net/mptcp/protocol.c:3057 mptcp_close+0x24/0xe0 net/mptcp/protocol.c:3072 inet_release+0x53/0xa0 net/ipv4/af_inet.c:429 __sock_release+0x4e/0xf0 net/socket.c:651 sock_close+0x15/0x20 net/socket.c:1393 __fput+0xff/0x420 fs/file_table.c:321 task_work_run+0x8b/0xe0 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+0x113/0x120 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x1d/0x40 kernel/entry/common.c:296 do_syscall_64+0x46/0x90 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7f7850af70dc RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00007f7850af70dc RDX: 00007f7850a2c800 RSI: 0000000000000002 RDI: 0000000000000003 RBP: 00000000006bd980 R08: 0000000000000000 R09: 00000000000018a0 R10: 00000000316338a4 R11: 0000000000000293 R12: 0000000000211e31 R13: 00000000006bc05c R14: 00007f785062c000 R15: 0000000000211af0 Fixes: 0a3f4f1f9c27 ("mptcp: fix UaF in listener shutdown") Cc: stable@vger.kernel.org Reported-by: Christoph Paasch Link: https://github.com/multipath-tcp/mptcp_net-next/issues/371 Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit 4e006c7a6dac0ead4c1bf606000aa90a372fc253 Author: Alexander Aring Date: Mon Apr 17 09:00:52 2023 -0400 net: rpl: fix rpl header size calculation This patch fixes a missing 8 byte for the header size calculation. The ipv6_rpl_srh_size() is used to check a skb_pull() on skb->data which points to skb_transport_header(). Currently we only check on the calculated addresses fields using CmprI and CmprE fields, see: https://www.rfc-editor.org/rfc/rfc6554#section-3 there is however a missing 8 byte inside the calculation which stands for the fields before the addresses field. Those 8 bytes are represented by sizeof(struct ipv6_rpl_sr_hdr) expression. Fixes: 8610c7c6e3bd ("net: ipv6: add support for rpl sr exthdr") Signed-off-by: Alexander Aring Reported-by: maxpl0it Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 6f4833383e8514ea796d094e05c24889b8997fde Author: Seiji Nishikawa Date: Mon Apr 17 21:21:27 2023 +0900 net: vmxnet3: Fix NULL pointer dereference in vmxnet3_rq_rx_complete() When vmxnet3_rq_create() fails to allocate rq->data_ring.base due to page allocation failure, subsequent call to vmxnet3_rq_rx_complete() can result in NULL pointer dereference. To fix this bug, check not only that rxDataRingUsed is true but also that adapter->rxdataring_enabled is true before calling memcpy() in vmxnet3_rq_rx_complete(). [1728352.477993] ethtool: page allocation failure: order:9, mode:0x6000c0(GFP_KERNEL), nodemask=(null),cpuset=/,mems_allowed=0 ... [1728352.478009] Call Trace: [1728352.478028] dump_stack+0x41/0x60 [1728352.478035] warn_alloc.cold.120+0x7b/0x11b [1728352.478038] ? _cond_resched+0x15/0x30 [1728352.478042] ? __alloc_pages_direct_compact+0x15f/0x170 [1728352.478043] __alloc_pages_slowpath+0xcd3/0xd10 [1728352.478047] __alloc_pages_nodemask+0x2e2/0x320 [1728352.478049] __dma_direct_alloc_pages.constprop.25+0x8a/0x120 [1728352.478053] dma_direct_alloc+0x5a/0x2a0 [1728352.478056] vmxnet3_rq_create.part.57+0x17c/0x1f0 [vmxnet3] ... [1728352.478188] vmxnet3 0000:0b:00.0 ens192: rx data ring will be disabled ... [1728352.515347] BUG: unable to handle kernel NULL pointer dereference at 0000000000000034 ... [1728352.515440] RIP: 0010:memcpy_orig+0x54/0x130 ... [1728352.515655] Call Trace: [1728352.515665] [1728352.515672] vmxnet3_rq_rx_complete+0x419/0xef0 [vmxnet3] [1728352.515690] vmxnet3_poll_rx_only+0x31/0xa0 [vmxnet3] ... Signed-off-by: Seiji Nishikawa Signed-off-by: David S. Miller commit c484fcc058bada604d7e4e5228d4affb646ddbc2 Author: Ido Schimmel Date: Mon Apr 17 09:12:16 2023 +0300 bonding: Fix memory leak when changing bond type to Ethernet When a net device is put administratively up, its 'IFF_UP' flag is set (if not set already) and a 'NETDEV_UP' notification is emitted, which causes the 8021q driver to add VLAN ID 0 on the device. The reverse happens when a net device is put administratively down. When changing the type of a bond to Ethernet, its 'IFF_UP' flag is incorrectly cleared, resulting in the kernel skipping the above process and VLAN ID 0 being leaked [1]. Fix by restoring the flag when changing the type to Ethernet, in a similar fashion to the restoration of the 'IFF_SLAVE' flag. The issue can be reproduced using the script in [2], with example out before and after the fix in [3]. [1] unreferenced object 0xffff888103479900 (size 256): comm "ip", pid 329, jiffies 4294775225 (age 28.561s) hex dump (first 32 bytes): 00 a0 0c 15 81 88 ff ff 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] kmalloc_trace+0x2a/0xe0 [] vlan_vid_add+0x30c/0x790 [] vlan_device_event+0x1491/0x21a0 [] notifier_call_chain+0xbe/0x1f0 [] call_netdevice_notifiers_info+0xba/0x150 [] __dev_notify_flags+0x132/0x2e0 [] dev_change_flags+0x11f/0x180 [] do_setlink+0xb96/0x4060 [] __rtnl_newlink+0xc0a/0x18a0 [] rtnl_newlink+0x6c/0xa0 [] rtnetlink_rcv_msg+0x43e/0xe00 [] netlink_rcv_skb+0x170/0x440 [] netlink_unicast+0x53f/0x810 [] netlink_sendmsg+0x96b/0xe90 [] ____sys_sendmsg+0x30f/0xa70 [] ___sys_sendmsg+0x13a/0x1e0 unreferenced object 0xffff88810f6a83e0 (size 32): comm "ip", pid 329, jiffies 4294775225 (age 28.561s) hex dump (first 32 bytes): a0 99 47 03 81 88 ff ff a0 99 47 03 81 88 ff ff ..G.......G..... 81 00 00 00 01 00 00 00 cc cc cc cc cc cc cc cc ................ backtrace: [] kmalloc_trace+0x2a/0xe0 [] vlan_vid_add+0x409/0x790 [] vlan_device_event+0x1491/0x21a0 [] notifier_call_chain+0xbe/0x1f0 [] call_netdevice_notifiers_info+0xba/0x150 [] __dev_notify_flags+0x132/0x2e0 [] dev_change_flags+0x11f/0x180 [] do_setlink+0xb96/0x4060 [] __rtnl_newlink+0xc0a/0x18a0 [] rtnl_newlink+0x6c/0xa0 [] rtnetlink_rcv_msg+0x43e/0xe00 [] netlink_rcv_skb+0x170/0x440 [] netlink_unicast+0x53f/0x810 [] netlink_sendmsg+0x96b/0xe90 [] ____sys_sendmsg+0x30f/0xa70 [] ___sys_sendmsg+0x13a/0x1e0 [2] ip link add name t-nlmon type nlmon ip link add name t-dummy type dummy ip link add name t-bond type bond mode active-backup ip link set dev t-bond up ip link set dev t-nlmon master t-bond ip link set dev t-nlmon nomaster ip link show dev t-bond ip link set dev t-dummy master t-bond ip link show dev t-bond ip link del dev t-bond ip link del dev t-dummy ip link del dev t-nlmon [3] Before: 12: t-bond: mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000 link/netlink 12: t-bond: mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000 link/ether 46:57:39:a4:46:a2 brd ff:ff:ff:ff:ff:ff After: 12: t-bond: mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000 link/netlink 12: t-bond: mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000 link/ether 66:48:7b:74:b6:8a brd ff:ff:ff:ff:ff:ff Fixes: e36b9d16c6a6 ("bonding: clean muticast addresses when device changes type") Fixes: 75c78500ddad ("bonding: remap muticast addresses without using dev_close() and dev_open()") Fixes: 9ec7eb60dcbc ("bonding: restore IFF_MASTER/SLAVE flags on bond enslave ether type change") Reported-by: Mirsad Goran Todorovac Link: https://lore.kernel.org/netdev/78a8a03b-6070-3e6b-5042-f848dab16fb8@alu.unizg.hr/ Tested-by: Mirsad Goran Todorovac Signed-off-by: Ido Schimmel Acked-by: Jay Vosburgh Signed-off-by: David S. Miller commit b5533e990dd1de5872a34cba2f4f7f508c9b2ec3 Author: Tiezhu Yang Date: Wed Apr 19 12:07:34 2023 +0800 tools/loongarch: Use __SIZEOF_LONG__ to define __BITS_PER_LONG Although __SIZEOF_POINTER__ is equal to _SIZEOF_LONG__ on LoongArch, it is better to use __SIZEOF_LONG__ to define __BITS_PER_LONG to keep consistent between arch/loongarch/include/uapi/asm/bitsperlong.h and tools/arch/loongarch/include/uapi/asm/bitsperlong.h. Signed-off-by: Tiezhu Yang Signed-off-by: Huacai Chen commit 213ef669d1e536e57cdff8ddc2d3b9347b98e35f Author: Enze Li Date: Wed Apr 19 12:07:27 2023 +0800 LoongArch: Replace hard-coded values in comments with VALEN According to LoongArch documentation [1], CSR.PGDL and CSR.PGDH are concerned with the VA's MSB which is VALEN-1 instead of always being 47. Fix comments to avoid misleading others. [1] https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#page-global-directory-base-address-for-lower-half-address-space Reviewed-by: WANG Xuerui Signed-off-by: Enze Li Signed-off-by: Huacai Chen commit afca6e06494c75e25a71ccb4926459944e23098b Author: Tiezhu Yang Date: Wed Apr 19 12:07:27 2023 +0800 LoongArch: Clean up plat_swiotlb_setup() related code After commit c78c43fe7d42 ("LoongArch: Use acpi_arch_dma_setup() and remove ARCH_HAS_PHYS_TO_DMA"), plat_swiotlb_setup() has been deleted, so clean up the related code. Signed-off-by: Tiezhu Yang Signed-off-by: Huacai Chen commit 370a3b8f58743eceb97c5256538d6048c26d2d03 Author: Tiezhu Yang Date: Wed Apr 19 12:07:27 2023 +0800 LoongArch: Check unwind_error() in arch_stack_walk() We can see the following messages with CONFIG_PROVE_LOCKING=y on LoongArch: BUG: MAX_STACK_TRACE_ENTRIES too low! turning off the locking correctness validator. This is because stack_trace_save() returns a big value after call arch_stack_walk(), here is the call trace: save_trace() stack_trace_save() arch_stack_walk() stack_trace_consume_entry() arch_stack_walk() should return immediately if unwind_next_frame() failed, no need to do the useless loops to increase the value of c->len in stack_trace_consume_entry(), then we can fix the above problem. Cc: stable@vger.kernel.org Reported-by: Guenter Roeck Link: https://lore.kernel.org/all/8a44ad71-68d2-4926-892f-72bfc7a67e2a@roeck-us.net/ Signed-off-by: Tiezhu Yang Signed-off-by: Huacai Chen commit e32b3b8222204df8a2642a770f79ec2d7086faed Author: Qing Zhang Date: Wed Apr 19 12:07:27 2023 +0800 LoongArch: Adjust user_regset_copyin parameter to the correct offset Ensure that user_watch_state can be set correctly by the user. Signed-off-by: Qing Zhang Signed-off-by: Huacai Chen commit ff9f3d7aefddbaa9a9b0f18f83e4319b5cd0e63e Author: Qing Zhang Date: Wed Apr 19 12:07:27 2023 +0800 LoongArch: Adjust user_watch_state for explicit alignment This is done in order to easily calculate the number of breakpoints in hw_break_get()/hw_break_set(). Signed-off-by: Qing Zhang Signed-off-by: Huacai Chen commit 92e8c732d8518588ac34b4cb3feaf37d2cb87555 Merge: c0e73276f0fcb d4eb7e39929a3 Author: Jakub Kicinski Date: Tue Apr 18 20:46:31 2023 -0700 Merge 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) Unbreak br_netfilter physdev match support, from Florian Westphal. 2) Use GFP_KERNEL_ACCOUNT for stateful/policy objects, from Chen Aotian. 3) Use IS_ENABLED() in nf_reset_trace(), from Florian Westphal. 4) Fix validation of catch-all set element. 5) Tighten requirements for catch-all set elements. * git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nf_tables: tighten netlink attribute requirements for catch-all elements netfilter: nf_tables: validate catch-all set elements netfilter: nf_tables: fix ifdef to also consider nf_tables=m netfilter: nf_tables: Modify nla_memdup's flag to GFP_KERNEL_ACCOUNT netfilter: br_netfilter: fix recent physdev match breakage ==================== Link: https://lore.kernel.org/r/20230418145048.67270-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit 023fc150a39ffe656da3e459ad801eb1c7fdfad9 Author: David Howells Date: Tue Apr 18 23:49:12 2023 +0100 cifs: Reapply lost fix from commit 30b2b2196d6e Reapply the fix from: 30b2b2196d6e ("cifs: do not include page data when checking signature") that got lost in the iteratorisation of the cifs driver. Fixes: d08089f649a0 ("cifs: Change the I/O paths to use an iterator rather than a page list") Acked-by: Paulo Alcantara (SUSE) Reported-by: Paulo Alcantara Signed-off-by: David Howells cc: Paulo Alcantara cc: Shyam Prasad N cc: Bharath S M cc: Enzo Matsumiya cc: linux-cifs@vger.kernel.org Signed-off-by: Steve French commit ac13692844f2fb23c503066c0cb231243218a7c8 Author: David Howells Date: Tue Apr 18 23:40:07 2023 +0100 cifs: Fix unbuffered read If read() is done in an unbuffered manner, such that, say, cifs_strict_readv() goes through cifs_user_readv() and thence __cifs_readv(), it doesn't recognise the EOF and keeps indicating to userspace that it returning full buffers of data. This is due to ctx->iter being advanced in cifs_send_async_read() as the buffer is split up amongst a number of rdata objects. The iterator count is then used in collect_uncached_read_data() in the non-DIO case to set the total length read - and thus the return value of sys_read(). But since the iterator normally gets used up completely during splitting, ctx->total_len gets overridden to the full amount. However, prior to that in collect_uncached_read_data(), we've gone through the list of rdatas and added up the amount of data we actually received (which we then throw away). Fix this by removing the bit that overrides the amount read in the non-DIO case and just going with the total added up in the aforementioned loop. This was observed by mounting a cifs share with multiple channels, e.g.: mount //192.168.6.1/test /test/ -o user=shares,pass=...,max_channels=6 and then reading a 1MiB file on the share: strace cat /xfstest.test/1M >/dev/null Through strace, the same data can be seen being read again and again. Fixes: d08089f649a0 ("cifs: Change the I/O paths to use an iterator rather than a page list") Signed-off-by: David Howells Acked-by: Paulo Alcantara (SUSE) cc: Jérôme Glisse cc: Long Li cc: Enzo Matsumiya cc: Shyam Prasad N cc: Rohith Surabattula cc: Jeff Layton cc: linux-cifs@vger.kernel.org Signed-off-by: Steve French commit ef832747a82dfbc22a3702219cc716f449b24e4a Author: Ryusuke Konishi Date: Tue Apr 18 02:35:13 2023 +0900 nilfs2: initialize unused bytes in segment summary blocks Syzbot still reports uninit-value in nilfs_add_checksums_on_logs() for KMSAN enabled kernels after applying commit 7397031622e0 ("nilfs2: initialize "struct nilfs_binfo_dat"->bi_pad field"). This is because the unused bytes at the end of each block in segment summaries are not initialized. So this fixes the issue by padding the unused bytes with null bytes. Link: https://lkml.kernel.org/r/20230417173513.12598-1-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Tested-by: Ryusuke Konishi Reported-by: syzbot+048585f3f4227bb2b49b@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=048585f3f4227bb2b49b Cc: Alexander Potapenko Cc: Signed-off-by: Andrew Morton commit 4d73ba5fa710fe7d432e0b271e6fecd252aef66e Author: Mel Gorman Date: Fri Apr 14 15:14:29 2023 +0100 mm: page_alloc: skip regions with hugetlbfs pages when allocating 1G pages A bug was reported by Yuanxi Liu where allocating 1G pages at runtime is taking an excessive amount of time for large amounts of memory. Further testing allocating huge pages that the cost is linear i.e. if allocating 1G pages in batches of 10 then the time to allocate nr_hugepages from 10->20->30->etc increases linearly even though 10 pages are allocated at each step. Profiles indicated that much of the time is spent checking the validity within already existing huge pages and then attempting a migration that fails after isolating the range, draining pages and a whole lot of other useless work. Commit eb14d4eefdc4 ("mm,page_alloc: drop unnecessary checks from pfn_range_valid_contig") removed two checks, one which ignored huge pages for contiguous allocations as huge pages can sometimes migrate. While there may be value on migrating a 2M page to satisfy a 1G allocation, it's potentially expensive if the 1G allocation fails and it's pointless to try moving a 1G page for a new 1G allocation or scan the tail pages for valid PFNs. Reintroduce the PageHuge check and assume any contiguous region with hugetlbfs pages is unsuitable for a new 1G allocation. The hpagealloc test allocates huge pages in batches and reports the average latency per page over time. This test happens just after boot when fragmentation is not an issue. Units are in milliseconds. hpagealloc 6.3.0-rc6 6.3.0-rc6 6.3.0-rc6 vanilla hugeallocrevert-v1r1 hugeallocsimple-v1r2 Min Latency 26.42 ( 0.00%) 5.07 ( 80.82%) 18.94 ( 28.30%) 1st-qrtle Latency 356.61 ( 0.00%) 5.34 ( 98.50%) 19.85 ( 94.43%) 2nd-qrtle Latency 697.26 ( 0.00%) 5.47 ( 99.22%) 20.44 ( 97.07%) 3rd-qrtle Latency 972.94 ( 0.00%) 5.50 ( 99.43%) 20.81 ( 97.86%) Max-1 Latency 26.42 ( 0.00%) 5.07 ( 80.82%) 18.94 ( 28.30%) Max-5 Latency 82.14 ( 0.00%) 5.11 ( 93.78%) 19.31 ( 76.49%) Max-10 Latency 150.54 ( 0.00%) 5.20 ( 96.55%) 19.43 ( 87.09%) Max-90 Latency 1164.45 ( 0.00%) 5.53 ( 99.52%) 20.97 ( 98.20%) Max-95 Latency 1223.06 ( 0.00%) 5.55 ( 99.55%) 21.06 ( 98.28%) Max-99 Latency 1278.67 ( 0.00%) 5.57 ( 99.56%) 22.56 ( 98.24%) Max Latency 1310.90 ( 0.00%) 8.06 ( 99.39%) 26.62 ( 97.97%) Amean Latency 678.36 ( 0.00%) 5.44 * 99.20%* 20.44 * 96.99%* 6.3.0-rc6 6.3.0-rc6 6.3.0-rc6 vanilla revert-v1 hugeallocfix-v2 Duration User 0.28 0.27 0.30 Duration System 808.66 17.77 35.99 Duration Elapsed 830.87 18.08 36.33 The vanilla kernel is poor, taking up to 1.3 second to allocate a huge page and almost 10 minutes in total to run the test. Reverting the problematic commit reduces it to 8ms at worst and the patch takes 26ms. This patch fixes the main issue with skipping huge pages but leaves the page_count() out because a page with an elevated count potentially can migrate. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=217022 Link: https://lkml.kernel.org/r/20230414141429.pwgieuwluxwez3rj@techsingularity.net Fixes: eb14d4eefdc4 ("mm,page_alloc: drop unnecessary checks from pfn_range_valid_contig") Signed-off-by: Mel Gorman Reported-by: Yuanxi Liu Acked-by: Vlastimil Babka Reviewed-by: David Hildenbrand Acked-by: Michal Hocko Reviewed-by: Oscar Salvador Cc: Matthew Wilcox Cc: Signed-off-by: Andrew Morton commit 58c5d0d6d522112577c7eeb71d382ea642ed7be4 Author: Liam R. Howlett Date: Fri Apr 14 14:59:19 2023 -0400 mm/mmap: regression fix for unmapped_area{_topdown} The maple tree limits the gap returned to a window that specifically fits what was asked. This may not be optimal in the case of switching search directions or a gap that does not satisfy the requested space for other reasons. Fix the search by retrying the operation and limiting the search window in the rare occasion that a conflict occurs. Link: https://lkml.kernel.org/r/20230414185919.4175572-1-Liam.Howlett@oracle.com Fixes: 3499a13168da ("mm/mmap: use maple tree for unmapped_area{_topdown}") Signed-off-by: Liam R. Howlett Reported-by: Rick Edgecombe Cc: Signed-off-by: Andrew Morton commit 06e8fd999334bcd76b4d72d7b9206d4aea89764e Author: Liam R. Howlett Date: Fri Apr 14 10:57:27 2023 -0400 maple_tree: fix mas_empty_area() search The internal function of mas_awalk() was incorrectly skipping the last entry in a node, which could potentially be NULL. This is only a problem for the left-most node in the tree - otherwise that NULL would not exist. Fix mas_awalk() by using the metadata to obtain the end of the node for the loop and the logical pivot as apposed to the raw pivot value. Link: https://lkml.kernel.org/r/20230414145728.4067069-2-Liam.Howlett@oracle.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Liam R. Howlett Reported-by: Rick Edgecombe Cc: Signed-off-by: Andrew Morton commit fad8e4291da5e3243e086622df63cb952db444d8 Author: Liam R. Howlett Date: Fri Apr 14 10:57:26 2023 -0400 maple_tree: make maple state reusable after mas_empty_area_rev() Stop using maple state min/max for the range by passing through pointers for those values. This will allow the maple state to be reused without resetting. Also add some logic to fail out early on searching with invalid arguments. Link: https://lkml.kernel.org/r/20230414145728.4067069-1-Liam.Howlett@oracle.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Liam R. Howlett Reported-by: Rick Edgecombe Cc: Signed-off-by: Andrew Morton commit fdea03e12aa2a44a7bb34144208be97fc25dfd90 Author: Alexander Potapenko Date: Thu Apr 13 15:12:21 2023 +0200 mm: kmsan: handle alloc failures in kmsan_ioremap_page_range() Similarly to kmsan_vmap_pages_range_noflush(), kmsan_ioremap_page_range() must also properly handle allocation/mapping failures. In the case of such, it must clean up the already created metadata mappings and return an error code, so that the error can be propagated to ioremap_page_range(). Without doing so, KMSAN may silently fail to bring the metadata for the page range into a consistent state, which will result in user-visible crashes when trying to access them. Link: https://lkml.kernel.org/r/20230413131223.4135168-2-glider@google.com Fixes: b073d7f8aee4 ("mm: kmsan: maintain KMSAN metadata for page operations") 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) Cc: Signed-off-by: Andrew Morton commit 47ebd0310e89c087f56e58c103c44b72a2f6b216 Author: Alexander Potapenko Date: Thu Apr 13 15:12:20 2023 +0200 mm: kmsan: handle alloc failures in kmsan_vmap_pages_range_noflush() As reported by Dipanjan Das, when KMSAN is used together with kernel fault injection (or, generally, even without the latter), calls to kcalloc() or __vmap_pages_range_noflush() may fail, leaving the metadata mappings for the virtual mapping in an inconsistent state. When these metadata mappings are accessed later, the kernel crashes. To address the problem, we return a non-zero error code from kmsan_vmap_pages_range_noflush() in the case of any allocation/mapping failure inside it, and make vmap_pages_range_noflush() return an error if KMSAN fails to allocate the metadata. This patch also removes KMSAN_WARN_ON() from vmap_pages_range_noflush(), as these allocation failures are not fatal anymore. Link: https://lkml.kernel.org/r/20230413131223.4135168-1-glider@google.com Fixes: b073d7f8aee4 ("mm: kmsan: maintain KMSAN metadata for page operations") 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) Cc: Signed-off-by: Andrew Morton commit a101482421a318369eef2d0e03f2fcb40a47abad Author: SeongJae Park Date: Sat Apr 15 20:31:10 2023 +0000 tools/Makefile: do missed s/vm/mm/ Commit 799fb82aa132 ("tools/vm: rename tools/vm to tools/mm") missed renaming 'vm' in 'tools/Makefile' to 'mm'. As a result, 'make clean' under 'tools/' directory fails as below: $ make -C tools clean DESCEND vm make[1]: Entering directory '/linux/tools/vm' make[1]: *** No rule to make target 'clean'. Stop. make[1]: Leaving directory '/linux/tools/vm' make: *** [Makefile:173: vm_clean] Error 2 make: Leaving directory '/linux/tools' Do the missed rename. Link: https://lkml.kernel.org/r/20230415203110.13858-1-sj@kernel.org Fixes: 799fb82aa132 ("tools/vm: rename tools/vm to tools/mm") Signed-off-by: SeongJae Park Reported-by: Ricardo Pardini Link: https://lore.kernel.org/linux-mm/20230415202454.13558-1-sj@kernel.org/ Tested-by: Ricardo Pardini Signed-off-by: Andrew Morton commit b20b0368c614c609badfe16fbd113dfb4780acd9 Author: Mathieu Desnoyers Date: Thu Mar 30 09:38:22 2023 -0400 mm: fix memory leak on mm_init error handling commit f1a7941243c1 ("mm: convert mm's rss stats into percpu_counter") introduces a memory leak by missing a call to destroy_context() when a percpu_counter fails to allocate. Before introducing the per-cpu counter allocations, init_new_context() was the last call that could fail in mm_init(), and thus there was no need to ever invoke destroy_context() in the error paths. Adding the following percpu counter allocations adds error paths after init_new_context(), which means its associated destroy_context() needs to be called when percpu counters fail to allocate. Link: https://lkml.kernel.org/r/20230330133822.66271-1-mathieu.desnoyers@efficios.com Fixes: f1a7941243c1 ("mm: convert mm's rss stats into percpu_counter") Signed-off-by: Mathieu Desnoyers Acked-by: Shakeel Butt Cc: Marek Szyprowski Cc: Signed-off-by: Andrew Morton commit 1007843a91909a4995ee78a538f62d8665705b66 Author: Tetsuo Handa Date: Tue Apr 4 23:31:58 2023 +0900 mm/page_alloc: fix potential deadlock on zonelist_update_seq seqlock syzbot is reporting circular locking dependency which involves zonelist_update_seq seqlock [1], for this lock is checked by memory allocation requests which do not need to be retried. One deadlock scenario is kmalloc(GFP_ATOMIC) from an interrupt handler. CPU0 ---- __build_all_zonelists() { write_seqlock(&zonelist_update_seq); // makes zonelist_update_seq.seqcount odd // e.g. timer interrupt handler runs at this moment some_timer_func() { kmalloc(GFP_ATOMIC) { __alloc_pages_slowpath() { read_seqbegin(&zonelist_update_seq) { // spins forever because zonelist_update_seq.seqcount is odd } } } } // e.g. timer interrupt handler finishes write_sequnlock(&zonelist_update_seq); // makes zonelist_update_seq.seqcount even } This deadlock scenario can be easily eliminated by not calling read_seqbegin(&zonelist_update_seq) from !__GFP_DIRECT_RECLAIM allocation requests, for retry is applicable to only __GFP_DIRECT_RECLAIM allocation requests. But Michal Hocko does not know whether we should go with this approach. Another deadlock scenario which syzbot is reporting is a race between kmalloc(GFP_ATOMIC) from tty_insert_flip_string_and_push_buffer() with port->lock held and printk() from __build_all_zonelists() with zonelist_update_seq held. CPU0 CPU1 ---- ---- pty_write() { tty_insert_flip_string_and_push_buffer() { __build_all_zonelists() { write_seqlock(&zonelist_update_seq); build_zonelists() { printk() { vprintk() { vprintk_default() { vprintk_emit() { console_unlock() { console_flush_all() { console_emit_next_record() { con->write() = serial8250_console_write() { spin_lock_irqsave(&port->lock, flags); tty_insert_flip_string() { tty_insert_flip_string_fixed_flag() { __tty_buffer_request_room() { tty_buffer_alloc() { kmalloc(GFP_ATOMIC | __GFP_NOWARN) { __alloc_pages_slowpath() { zonelist_iter_begin() { read_seqbegin(&zonelist_update_seq); // spins forever because zonelist_update_seq.seqcount is odd spin_lock_irqsave(&port->lock, flags); // spins forever because port->lock is held } } } } } } } } spin_unlock_irqrestore(&port->lock, flags); // message is printed to console spin_unlock_irqrestore(&port->lock, flags); } } } } } } } } } write_sequnlock(&zonelist_update_seq); } } } This deadlock scenario can be eliminated by preventing interrupt context from calling kmalloc(GFP_ATOMIC) and preventing printk() from calling console_flush_all() while zonelist_update_seq.seqcount is odd. Since Petr Mladek thinks that __build_all_zonelists() can become a candidate for deferring printk() [2], let's address this problem by disabling local interrupts in order to avoid kmalloc(GFP_ATOMIC) and disabling synchronous printk() in order to avoid console_flush_all() . As a side effect of minimizing duration of zonelist_update_seq.seqcount being odd by disabling synchronous printk(), latency at read_seqbegin(&zonelist_update_seq) for both !__GFP_DIRECT_RECLAIM and __GFP_DIRECT_RECLAIM allocation requests will be reduced. Although, from lockdep perspective, not calling read_seqbegin(&zonelist_update_seq) (i.e. do not record unnecessary locking dependency) from interrupt context is still preferable, even if we don't allow calling kmalloc(GFP_ATOMIC) inside write_seqlock(&zonelist_update_seq)/write_sequnlock(&zonelist_update_seq) section... Link: https://lkml.kernel.org/r/8796b95c-3da3-5885-fddd-6ef55f30e4d3@I-love.SAKURA.ne.jp Fixes: 3d36424b3b58 ("mm/page_alloc: fix race condition between build_all_zonelists and page allocation") Link: https://lkml.kernel.org/r/ZCrs+1cDqPWTDFNM@alley [2] Reported-by: syzbot Link: https://syzkaller.appspot.com/bug?extid=223c7461c58c58a4cb10 [1] Signed-off-by: Tetsuo Handa Acked-by: Michal Hocko Acked-by: Mel Gorman Cc: Petr Mladek Cc: David Hildenbrand Cc: Ilpo Järvinen Cc: John Ogness Cc: Patrick Daly Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: Signed-off-by: Andrew Morton commit 659c0ce1cb9efc7f58d380ca4bb2a51ae9e30553 Author: Ondrej Mosnacek Date: Fri Feb 17 17:21:54 2023 +0100 kernel/sys.c: fix and improve control flow in __sys_setres[ug]id() Linux Security Modules (LSMs) that implement the "capable" hook will usually emit an access denial message to the audit log whenever they "block" the current task from using the given capability based on their security policy. The occurrence of a denial is used as an indication that the given task has attempted an operation that requires the given access permission, so the callers of functions that perform LSM permission checks must take care to avoid calling them too early (before it is decided if the permission is actually needed to perform the requested operation). The __sys_setres[ug]id() functions violate this convention by first calling ns_capable_setid() and only then checking if the operation requires the capability or not. It means that any caller that has the capability granted by DAC (task's capability set) but not by MAC (LSMs) will generate a "denied" audit record, even if is doing an operation for which the capability is not required. Fix this by reordering the checks such that ns_capable_setid() is checked last and -EPERM is returned immediately if it returns false. While there, also do two small optimizations: * move the capability check before prepare_creds() and * bail out early in case of a no-op. Link: https://lkml.kernel.org/r/20230217162154.837549-1-omosnace@redhat.com Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Ondrej Mosnacek Cc: Eric W. Biederman Cc: Signed-off-by: Andrew Morton commit 0b5dfe12755f87ec014bb4cc1930485026167430 Author: Alex Hung Date: Mon Apr 3 17:45:41 2023 +0800 drm/amd/display: fix a divided-by-zero error [Why & How] timing.dsc_cfg.num_slices_v can be zero and it is necessary to check before using it. This fixes the error "divide error: 0000 [#1] PREEMPT SMP NOPTI". Reviewed-by: Aurabindo Pillai Acked-by: Qingqing Zhuo Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 1e994cc0956b8dabd1b1fef315bbd722733b8aa8 Author: Daniel Miess Date: Tue Apr 4 14:04:11 2023 -0400 drm/amd/display: limit timing for single dimm memory [Why] 1. It could hit bandwidth limitdation under single dimm memory when connecting 8K external monitor. 2. IsSupportedVidPn got validation failed with 2K240Hz eDP + 8K24Hz external monitor. 3. It's better to filter out such combination in EnumVidPnCofuncModality 4. For short term, filter out in dc bandwidth validation. [How] Force 2K@240Hz+8K@24Hz timing validation false in dc. Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Daniel Miess Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 6d9240c46f7419aa3210353b5f52cc63da5a6440 Author: Dmytro Laktyushkin Date: Mon Apr 3 10:13:12 2023 -0400 drm/amd/display: set dcn315 lb bpp to 48 [Why & How] Fix a typo for dcn315 line buffer bpp. Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Dmytro Laktyushkin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit c8b5a95b570949536a2b75cd8fc4f1de0bc60629 Author: Alan Liu Date: Fri Apr 14 18:39:52 2023 +0800 drm/amdgpu: Fix desktop freezed after gpu-reset [Why] After gpu-reset, sometimes the driver fails to enable vblank irq, causing flip_done timed out and the desktop freezed. During gpu-reset, we disable and enable vblank irq in dm_suspend() and dm_resume(). Later on in amdgpu_irq_gpu_reset_resume_helper(), we check irqs' refcount and decide to enable or disable the irqs again. However, we have 2 sets of API for controling vblank irq, one is dm_vblank_get/put() and another is amdgpu_irq_get/put(). Each API has its own refcount and flag to store the state of vblank irq, and they are not synchronized. In drm we use the first API to control vblank irq but in amdgpu_irq_gpu_reset_resume_helper() we use the second set of API. The failure happens when vblank irq was enabled by dm_vblank_get() before gpu-reset, we have vblank->enabled true. However, during gpu-reset, in amdgpu_irq_gpu_reset_resume_helper() vblank irq's state checked from amdgpu_irq_update() is DISABLED. So finally it disables vblank irq again. After gpu-reset, if there is a cursor plane commit, the driver will try to enable vblank irq by calling drm_vblank_enable(), but the vblank->enabled is still true, so it fails to turn on vblank irq and causes flip_done can't be completed in vblank irq handler and desktop become freezed. [How] Combining the 2 vblank control APIs by letting drm's API finally calls amdgpu_irq's API, so the irq's refcount and state of both APIs can be synchronized. Also add a check to prevent refcount from being less then 0 in amdgpu_irq_put(). v2: - Add warning in amdgpu_irq_enable() if the irq is already disabled. - Call dc_interrupt_set() in dm_set_vblank() to avoid refcount change if it is in gpu-reset. v3: - Improve commit message and code comments. Signed-off-by: Alan Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 8267fc71abb2dc47338570e56dd3473a58313fce Author: Lorenzo Bianconi Date: Mon Apr 17 23:53:22 2023 +0200 veth: take into account peer device for NETDEV_XDP_ACT_NDO_XMIT xdp_features flag For veth pairs, NETDEV_XDP_ACT_NDO_XMIT is supported by the current device if the peer one is running a XDP program or if it has GRO enabled. Fix the xdp_features flags reporting considering peer device and not current one for NETDEV_XDP_ACT_NDO_XMIT. Fixes: fccca038f300 ("veth: take into account device reconfiguration for xdp_features flag") Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/4f1ca6f6f6b42ae125bfdb5c7782217c83968b2e.1681767806.git.lorenzo@kernel.org Signed-off-by: Alexei Starovoitov commit af67688dca57999fd848f051eeea1d375ba546b2 Merge: bbab25317cdd7 4b6d621c9d859 Author: Linus Torvalds Date: Tue Apr 18 10:11:49 2023 -0700 Merge tag 'mmc-v6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC host: - sdhci_am654: Fix support for UHS-I SDR12 and SDR25 speed modes MEMSTICK: - Fix memory leak if card device never gets registered" * tag 'mmc-v6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: memstick: fix memory leak if card device is never registered mmc: sdhci_am654: Set HIGH_SPEED_ENA for SDR12 and SDR25 commit 35dcb3ac663a16510afc27ba2725d70c15e012a5 Author: Marc Zyngier Date: Tue Apr 18 13:57:37 2023 +0100 KVM: arm64: Make vcpu flag updates non-preemptible Per-vcpu flags are updated using a non-atomic RMW operation. Which means it is possible to get preempted between the read and write operations. Another interesting thing to note is that preemption also updates flags, as we have some flag manipulation in both the load and put operations. It is thus possible to lose information communicated by either load or put, as the preempted flag update will overwrite the flags when the thread is resumed. This is specially critical if either load or put has stored information which depends on the physical CPU the vcpu runs on. This results in really elusive bugs, and kudos must be given to Mostafa for the long hours of debugging, and finally spotting the problem. Fix it by disabling preemption during the RMW operation, which ensures that the state stays consistent. Also upgrade vcpu_get_flag path to use READ_ONCE() to make sure the field is always atomically accessed. Fixes: e87abb73e594 ("KVM: arm64: Add helpers to manipulate vcpu flags among a set") Reported-by: Mostafa Saleh Signed-off-by: Marc Zyngier Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230418125737.2327972-1-maz@kernel.org Signed-off-by: Oliver Upton commit bbab25317cdd73b5241145c3c2f188e6cb1e5659 Merge: 6a8f57ae2eb07 d75eecc3d170d Author: Linus Torvalds Date: Tue Apr 18 08:21:45 2023 -0700 Merge tag 'arm-fixes-6.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "There are a number of updates for devicetree files for Qualcomm, Rockchips, and NXP i.MX platforms, addressing mistakes in the DT contents: - Wrong GPIO polarity on some boards - Lower SD card interface speed for better stability - Incorrect power supply, clock, pmic, cache properties - Disable broken hbr3 on sc7280-herobrine - Devicetree warning fixes The only other changes are: - A regression fix for the Amlogic performance monitoring unit driver, along with two related DT changes. - imx_v6_v7_defconfig enables PCI support again. - Trivial fixes for tee, optee and psci firmware drivers, addressing compiler warning and error output" * tag 'arm-fixes-6.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (32 commits) firmware/psci: demote suspend-mode warning to info level arm64: dts: qcom: sc7280: remove hbr3 support on herobrine boards ARM: imx_v6_v7_defconfig: Fix unintentional disablement of PCI arm64: dts: rockchip: correct panel supplies on some rk3326 boards arm64: dts: rockchip: use just "port" in panel on RockPro64 arm64: dts: rockchip: use just "port" in panel on Pinebook Pro ARM: dts: imx6ull-colibri: Remove unnecessary #address-cells/#size-cells ARM: dts: imx7d-remarkable2: Remove unnecessary #address-cells/#size-cells arm64: dts: imx8mp-verdin: correct off-on-delay arm64: dts: imx8mm-verdin: correct off-on-delay arm64: dts: imx8mm-evk: correct pmic clock source arm64: dts: qcom: sc8280xp-pmics: fix pon compatible and registers arm64: dts: rockchip: Remove non-existing pwm-delay-us property arm64: dts: rockchip: Add clk_rtc_32k to Anbernic xx3 Devices tee: Pass a pointer to virt_to_page() perf/amlogic: adjust register offsets arm64: dts: meson-g12-common: resolve conflict between canvas & pmu arm64: dts: meson-g12-common: specify full DMC range arm64: dts: imx8mp: fix address length for LCDIF2 riscv: dts: canaan: drop invalid spi-max-frequency ... commit 93eb1215ed794a18ba8753e0654f069d58838966 Author: Huacai Chen Date: Tue Apr 18 19:38:58 2023 +0800 LoongArch: module: set section addresses to 0x0 These got*, plt* and .text.ftrace_trampoline sections specified for LoongArch have non-zero addressses. Non-zero section addresses in a relocatable ELF would confuse GDB when it tries to compute the section offsets and it ends up printing wrong symbol addresses. Therefore, set them to zero, which mirrors the change in commit 5d8591bc0fbaeb6ded ("arm64 module: set plt* section addresses to 0x0"). Cc: stable@vger.kernel.org Reviewed-by: Guo Ren Signed-off-by: Chong Qiao Signed-off-by: Huacai Chen commit dce5ea1d0f45fa612f5760b88614a3f32bc75e3f Author: Huacai Chen Date: Tue Apr 18 19:38:58 2023 +0800 LoongArch: Mark 3 symbol exports as non-GPL vm_map_base, empty_zero_page and invalid_pmd_table could be accessed widely by some out-of-tree non-GPL but important file systems or drivers (e.g. OpenZFS). Let's use EXPORT_SYMBOL() instead of EXPORT_SYMBOL_GPL() to export them, so as to avoid build errors. 1, Details about vm_map_base: This is a LoongArch-specific symbol and may be referenced through macros PCI_IOBASE, VMALLOC_START and VMALLOC_END. 2, Details about empty_zero_page: As it stands today, only 3 architectures export empty_zero_page as a GPL symbol: IA64, LoongArch and MIPS. LoongArch gets the GPL export by inheriting from MIPS, and the MIPS export was first introduced in commit 497d2adcbf50b ("[MIPS] Export empty_zero_page for sake of the ext4 module."). The IA64 export was similar: commit a7d57ecf4216e ("[IA64] Export three symbols for module use") did so for kvm. In both IA64 and MIPS, the export of empty_zero_page was done for satisfying some in-kernel component built as module (kvm and ext4 respectively), and given its reasonably low-level nature, GPL is a reasonable choice. But looking at the bigger picture it is evident most other architectures do not regard it as GPL, so in effect the symbol probably should not be treated as such, in favor of consistency. 3, Details about invalid_pmd_table: Keep consistency with invalid_pte_table and make it be possible by some modules. Cc: stable@vger.kernel.org Reviewed-by: WANG Xuerui Signed-off-by: Huacai Chen commit 1c1378a4090845e12c4dbbb337de7acce309b570 Author: Huacai Chen Date: Tue Apr 18 19:38:58 2023 +0800 LoongArch: Enable PG when wakeup from suspend Some firmwares don't enable PG when wakeup from suspend, so do it in kernel. This can improve code compatibility for boot kernel. Signed-off-by: Baoqi Zhang Signed-off-by: Huacai Chen commit 6637775ca3c3d0b4f7b83c5ce9a592df2c9bff52 Author: Qing Zhang Date: Tue Apr 18 19:38:58 2023 +0800 LoongArch: Fix _CONST64_(x) as unsigned Addresses should all be of unsigned type to avoid unnecessary conversions. Signed-off-by: Qing Zhang Signed-off-by: Huacai Chen commit 1cf62488f5e465b1cd814d19be238a4b7ad5be38 Author: Huacai Chen Date: Tue Apr 18 19:38:58 2023 +0800 LoongArch: Fix build error if CONFIG_SUSPEND is not set We can see the following build error on LoongArch if CONFIG_SUSPEND is not set: ld: drivers/acpi/sleep.o: in function 'acpi_pm_prepare': sleep.c:(.text+0x2b8): undefined reference to 'loongarch_wakeup_start' Here is the call trace: acpi_pm_prepare() __acpi_pm_prepare() acpi_sleep_prepare() acpi_get_wakeup_address() loongarch_wakeup_start() Root cause: loongarch_wakeup_start() is defined in arch/loongarch/power/ suspend_asm.S which is only built under CONFIG_SUSPEND. In order to fix the build error, just let acpi_get_wakeup_address() return 0 if CONFIG_ SUSPEND is not set. Fixes: 366bb35a8e48 ("LoongArch: Add suspend (ACPI S3) support") Reviewed-by: WANG Xuerui Reported-by: Randy Dunlap Link: https://lore.kernel.org/all/11215033-fa3c-ecb1-2fc0-e9aeba47be9b@infradead.org/ Signed-off-by: Tiezhu Yang Signed-off-by: Huacai Chen commit df830336045db1246d3245d3737fee9939c5f731 Author: Huacai Chen Date: Tue Apr 18 19:38:58 2023 +0800 LoongArch: Fix probing of the CRC32 feature Not all LoongArch processors support CRC32 instructions. This feature is indicated by CPUCFG1.CRC32 (Bit25) but it is wrongly defined in the previous versions of the ISA manual (and so does in loongarch.h). The CRC32 feature is set unconditionally now, so fix it. BTW, expose the CRC32 feature in /proc/cpuinfo. Cc: stable@vger.kernel.org Signed-off-by: Huacai Chen commit 16c52e503043aed1e2a2ce38d9249de5936c1f6b Author: Huacai Chen Date: Tue Apr 18 19:38:58 2023 +0800 LoongArch: Make WriteCombine configurable for ioremap() LoongArch maintains cache coherency in hardware, but when paired with LS7A chipsets the WUC attribute (Weak-ordered UnCached, which is similar to WriteCombine) is out of the scope of cache coherency machanism for PCIe devices (this is a PCIe protocol violation, which may be fixed in newer chipsets). This means WUC can only used for write-only memory regions now, so this option is disabled by default, making WUC silently fallback to SUC for ioremap(). You can enable this option if the kernel is ensured to run on hardware without this bug. Kernel parameter writecombine=on/off can be used to override the Kconfig option. Cc: stable@vger.kernel.org Suggested-by: WANG Xuerui Reviewed-by: WANG Xuerui Signed-off-by: Huacai Chen commit c0e73276f0fcbbd3d4736ba975d7dc7a48791b0c Author: Nikita Zhandarovich Date: Mon Apr 17 05:07:18 2023 -0700 mlxfw: fix null-ptr-deref in mlxfw_mfa2_tlv_next() Function mlxfw_mfa2_tlv_multi_get() returns NULL if 'tlv' in question does not pass checks in mlxfw_mfa2_tlv_payload_get(). This behaviour may lead to NULL pointer dereference in 'multi->total_len'. Fix this issue by testing mlxfw_mfa2_tlv_multi_get()'s return value against NULL. Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE. Fixes: 410ed13cae39 ("Add the mlxfw module for Mellanox firmware flash process") Co-developed-by: Natalia Petrova Signed-off-by: Nikita Zhandarovich Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/20230417120718.52325-1-n.zhandarovich@fintech.ru Signed-off-by: Paolo Abeni commit 28e63d01a9f46d47b73045817f95c114a7769c71 Merge: e50b9b9e8610d 4f4e54b1041e6 Author: Paolo Abeni Date: Tue Apr 18 12:27:17 2023 +0200 Merge branch 'bnxt_en-bug-fixes' Michael Chan says: ==================== bnxt_en: Bug fixes This small series contains 2 fixes. The first one fixes the PTP initialization logic on older chips to avoid logging a warning. The second one fixes a potenial NULL pointer dereference in the driver's aux bus unload path. ==================== Link: https://lore.kernel.org/r/20230417065819.122055-1-michael.chan@broadcom.com Signed-off-by: Paolo Abeni commit 4f4e54b1041e60694117893cd986831153a3e719 Author: Kalesh AP Date: Sun Apr 16 23:58:19 2023 -0700 bnxt_en: Fix a possible NULL pointer dereference in unload path In the driver unload path, the driver currently checks the valid BNXT_FLAG_ROCE_CAP flag in bnxt_rdma_aux_device_uninit() before proceeding. This is flawed because the flag may not be set initially during driver load. It may be set later after the NVRAM setting is changed followed by a firmware reset. Relying on the BNXT_FLAG_ROCE_CAP flag may crash in bnxt_rdma_aux_device_uninit() if the aux device was never initialized: BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 PGD 8ae6aa067 P4D 0 Oops: 0000 [#1] SMP NOPTI CPU: 39 PID: 42558 Comm: rmmod Kdump: loaded Tainted: G OE --------- - - 4.18.0-348.el8.x86_64 #1 Hardware name: Dell Inc. PowerEdge R750/0WT8Y6, BIOS 1.5.4 12/17/2021 RIP: 0010:device_del+0x1b/0x410 Code: 89 a5 50 03 00 00 4c 89 a5 58 03 00 00 eb 89 0f 1f 44 00 00 41 56 41 55 41 54 4c 8d a7 80 00 00 00 55 53 48 89 fb 48 83 ec 18 <48> 8b 2f 4c 89 e7 65 48 8b 04 25 28 00 00 00 48 89 44 24 10 31 c0 RSP: 0018:ff7f82bf469a7dc8 EFLAGS: 00010292 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000206 RDI: 0000000000000000 RBP: ff31b7cd114b0ac0 R08: 0000000000000000 R09: ffffffff935c3400 R10: ff31b7cd45bc3440 R11: 0000000000000001 R12: 0000000000000080 R13: ffffffffc1069f40 R14: 0000000000000000 R15: 0000000000000000 FS: 00007fc9903ce740(0000) GS:ff31b7d4ffac0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000992fee004 CR4: 0000000000773ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: bnxt_rdma_aux_device_uninit+0x1f/0x30 [bnxt_en] bnxt_remove_one+0x2f/0x1f0 [bnxt_en] pci_device_remove+0x3b/0xc0 device_release_driver_internal+0x103/0x1f0 driver_detach+0x54/0x88 bus_remove_driver+0x77/0xc9 pci_unregister_driver+0x2d/0xb0 bnxt_exit+0x16/0x2c [bnxt_en] __x64_sys_delete_module+0x139/0x280 do_syscall_64+0x5b/0x1a0 entry_SYSCALL_64_after_hwframe+0x65/0xca RIP: 0033:0x7fc98f3af71b Fix this by modifying the check inside bnxt_rdma_aux_device_uninit() to check for bp->aux_priv instead. We also need to make some changes in bnxt_rdma_aux_device_init() to make sure that bp->aux_priv is set only when the aux device is fully initialized. Fixes: d80d88b0dfff ("bnxt_en: Add auxiliary driver support") Reviewed-by: Ajit Khaparde Signed-off-by: Kalesh AP Signed-off-by: Michael Chan Signed-off-by: Paolo Abeni commit e8b51a1a15d5a3cce231e0669f6a161dc5bb9b75 Author: Michael Chan Date: Sun Apr 16 23:58:18 2023 -0700 bnxt_en: Do not initialize PTP on older P3/P4 chips The driver does not support PTP on these older chips and it is assuming that firmware on these older chips will not return the PORT_MAC_PTP_QCFG_RESP_FLAGS_HWRM_ACCESS flag in __bnxt_hwrm_ptp_qcfg(), causing the function to abort quietly. But newer firmware now sets this flag and so __bnxt_hwrm_ptp_qcfg() will proceed further. Eventually it will fail in bnxt_ptp_init() -> bnxt_map_ptp_regs() because there is no code to support the older chips. The driver will then complain: "PTP initialization failed.\n" Fix it so that we abort quietly earlier without going through the unnecessary steps and alarming the user with the warning log. Fixes: ae5c42f0b92c ("bnxt_en: Get PTP hardware capability from firmware") Signed-off-by: Michael Chan Signed-off-by: Paolo Abeni commit c22ef5684b64a3a1ac08db06a6f327f2695fd377 Author: Willy Tarreau Date: Tue Apr 18 08:42:28 2023 +0200 x86/alternatives: Do not use integer constant suffixes in inline asm The usage of the BIT() macro in inline asm code was introduced in 6.3 by the commit in the Fixes tag. However, this macro uses "1UL" for integer constant suffixes in its shift operation, while gas before 2.28 does not support the "L" suffix after a number, and gas before 2.27 does not support the "U" suffix, resulting in build errors such as the following with such versions: ./arch/x86/include/asm/uaccess_64.h:124: Error: found 'L', expected: ')' ./arch/x86/include/asm/uaccess_64.h:124: Error: junk at end of line, first unrecognized character is `L' However, the currently minimal binutils version the kernel supports is 2.25. There's a single use of this macro here, revert to (1 << 0) that works with such older binutils. As an additional info, the binutils PRs which add support for those suffixes are: https://sourceware.org/bugzilla/show_bug.cgi?id=19910 https://sourceware.org/bugzilla/show_bug.cgi?id=20732 [ bp: Massage and extend commit message. ] Fixes: 5d1dd961e743 ("x86/alternatives: Add alt_instr.flags") Signed-off-by: Willy Tarreau Signed-off-by: Borislav Petkov (AMD) Tested-by: Jingbo Xu Link: https://lore.kernel.org/lkml/a9aae568-3046-306c-bd71-92c1fc8eeddc@linux.alibaba.com/ commit d4eb7e39929a3b1ff30fb751b4859fc2410702a0 Author: Pablo Neira Ayuso Date: Mon Apr 17 17:50:28 2023 +0200 netfilter: nf_tables: tighten netlink attribute requirements for catch-all elements If NFT_SET_ELEM_CATCHALL is set on, then userspace provides no set element key. Otherwise, bail out with -EINVAL. Fixes: aaa31047a6d2 ("netfilter: nftables: add catch-all set element support") Signed-off-by: Pablo Neira Ayuso commit e50b9b9e8610d47b7c22529443e45a16b1ea3a15 Author: Duoming Zhou Date: Sat Apr 15 16:12:27 2023 +0800 cxgb4: fix use after free bugs caused by circular dependency problem The flower_stats_timer can schedule flower_stats_work and flower_stats_work can also arm the flower_stats_timer. The process is shown below: ----------- timer schedules work ------------ ch_flower_stats_cb() //timer handler schedule_work(&adap->flower_stats_work); ----------- work arms timer ------------ ch_flower_stats_handler() //workqueue callback function mod_timer(&adap->flower_stats_timer, ...); When the cxgb4 device is detaching, the timer and workqueue could still be rearmed. The process is shown below: (cleanup routine) | (timer and workqueue routine) remove_one() | free_some_resources() | ch_flower_stats_cb() //timer cxgb4_cleanup_tc_flower() | schedule_work() del_timer_sync() | | ch_flower_stats_handler() //workqueue | mod_timer() cancel_work_sync() | kfree(adapter) //FREE | ch_flower_stats_cb() //timer | adap->flower_stats_work //USE This patch changes del_timer_sync() to timer_shutdown_sync(), which could prevent rearming of the timer from the workqueue. Fixes: e0f911c81e93 ("cxgb4: fetch stats for offloaded tc flower flows") Signed-off-by: Duoming Zhou Link: https://lore.kernel.org/r/20230415081227.7463-1-duoming@zju.edu.cn Signed-off-by: Paolo Abeni commit d46fc894147cf98dd6e8210aa99ed46854191840 Author: Pablo Neira Ayuso Date: Mon Apr 17 12:14:29 2023 +0200 netfilter: nf_tables: validate catch-all set elements catch-all set element might jump/goto to chain that uses expressions that require validation. Fixes: aaa31047a6d2 ("netfilter: nftables: add catch-all set element support") Signed-off-by: Pablo Neira Ayuso commit 1a2bd3bd72e978304cdc0a7385e8048e8242225d Author: Jacob Keller Date: Fri Apr 14 09:26:14 2023 -0700 ice: document RDMA devlink parameters Commit e523af4ee560 ("net/ice: Add support for enable_iwarp and enable_roce devlink param") added support for the enable_roce and enable_iwarp parameters in the ice driver. It didn't document these parameters in the ice devlink documentation file. Add this documentation, including a note about the mutual exclusion between the two modes. Signed-off-by: Jacob Keller Reviewed-by: Leon Romanovsky Acked-by: Tony Nguyen Link: https://lore.kernel.org/r/20230414162614.571861-1-jacob.e.keller@intel.com Signed-off-by: Jakub Kicinski commit b63a553e8f5aa6574eeb535a551817a93c426d8c Author: Sascha Hauer Date: Mon Apr 17 14:37:47 2023 +0200 drm/rockchip: vop2: Use regcache_sync() to fix suspend/resume afa965a45e01 ("drm/rockchip: vop2: fix suspend/resume") uses regmap_reinit_cache() to fix the suspend/resume issue with the VOP2 driver. During discussion it came up that we should rather use regcache_sync() instead. As the original patch is already applied fix this up in this follow-up patch. Fixes: afa965a45e01 ("drm/rockchip: vop2: fix suspend/resume") Cc: stable@vger.kernel.org Signed-off-by: Sascha Hauer Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20230417123747.2179695-1-s.hauer@pengutronix.de commit c86c00c6935505929cc9adb29ddb85e48c71f828 Author: Aleksandr Loktionov Date: Mon Apr 3 07:13:18 2023 +0200 i40e: fix i40e_setup_misc_vector() error handling Add error handling of i40e_setup_misc_vector() in i40e_rebuild(). In case interrupt vectors setup fails do not re-open vsi-s and do not bring up vf-s, we have no interrupts to serve a traffic anyway. Fixes: 41c445ff0f48 ("i40e: main driver core") Signed-off-by: Aleksandr Loktionov Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 8485d093b076e59baff424552e8aecfc5bd2d261 Author: Aleksandr Loktionov Date: Fri Mar 24 18:16:38 2023 +0100 i40e: fix accessing vsi->active_filters without holding lock Fix accessing vsi->active_filters without holding the mac_filter_hash_lock. Move vsi->active_filters = 0 inside critical section and move clear_bit(__I40E_VSI_OVERFLOW_PROMISC, vsi->state) after the critical section to ensure the new filters from other threads can be added only after filters cleaning in the critical section is finished. Fixes: 278e7d0b9d68 ("i40e: store MAC/VLAN filters in a hash with the MAC Address as key") Signed-off-by: Aleksandr Loktionov Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit d51425190805d47aecc1910b272e65476dd3b937 Author: Chuck Lever Date: Sun Apr 16 13:05:06 2023 -0400 SUNRPC: Fix failures of checksum Kunit tests Scott reports that when the new GSS krb5 Kunit tests are built as a separate module and loaded, the RFC 6803 and RFC 8009 checksum tests all fail, even though they pass when run under kunit.py. It appears that passing a buffer backed by static const memory to gss_krb5_checksum() is a problem. A printk in checksum_case() shows the correct plaintext, but by the time the buffer has been converted to a scatterlist and arrives at checksummer(), it contains all zeroes. Replacing this buffer with one that is dynamically allocated fixes the issue. Reported-by: Scott Mayhew Fixes: 02142b2ca8fc ("SUNRPC: Add checksum KUnit tests for the RFC 6803 encryption types") Tested-by: Scott Mayhew Signed-off-by: Chuck Lever commit 7363d6bedc000f6f9d09cfe498da2f3aca653778 Author: John Ogness Date: Sat Apr 15 04:08:50 2023 +0206 drm/nouveau: fix incorrect conversion to dma_resv_wait_timeout() Commit 41d351f29528 ("drm/nouveau: stop using ttm_bo_wait") converted from ttm_bo_wait_ctx() to dma_resv_wait_timeout(). However, dma_resv_wait_timeout() returns greater than zero on success as opposed to ttm_bo_wait_ctx(). As a result, relocs will fail and log errors even when it was a success. Change the return code handling to match that of nouveau_gem_ioctl_cpu_prep(), which was already using dma_resv_wait_timeout() correctly. Fixes: 41d351f29528 ("drm/nouveau: stop using ttm_bo_wait") Reported-by: Tanmay Bhushan <007047221b@gmail.com> Link: https://lore.kernel.org/lkml/20230119225351.71657-1-007047221b@gmail.com Signed-off-by: John Ogness Reviewed-by: Christian König Reviewed-by: Karol Herbst Signed-off-by: Karol Herbst Link: https://patchwork.freedesktop.org/patch/msgid/87edolaomt.fsf@jogness.linutronix.de commit c55c0e91c813589dc55bea6bf9a9fbfaa10ae41d Author: Florian Westphal Date: Mon Apr 17 10:21:36 2023 +0200 netfilter: nf_tables: fix ifdef to also consider nf_tables=m nftables can be built as a module, so fix the preprocessor conditional accordingly. Fixes: 478b360a47b7 ("netfilter: nf_tables: fix nf_trace always-on with XT_TRACE=n") Reported-by: Florian Fainelli Reported-by: Jakub Kicinski Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit afa965a45e01e541cdbe5c8018226eff117610f0 Author: Sascha Hauer Date: Thu Apr 13 16:43:47 2023 +0200 drm/rockchip: vop2: fix suspend/resume During a suspend/resume cycle the VO power domain will be disabled and the VOP2 registers will reset to their default values. After that the cached register values will be out of sync and the read/modify/write operations we do on the window registers will result in bogus values written. Fix this by re-initializing the register cache each time we enable the VOP2. With this the VOP2 will show a picture after a suspend/resume cycle whereas without this the screen stays dark. Fixes: 604be85547ce4 ("drm/rockchip: Add VOP2 driver") Cc: stable@vger.kernel.org Signed-off-by: Sascha Hauer Tested-by: Chris Morgan Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20230413144347.3506023-1-s.hauer@pengutronix.de commit 338469d677e5d426f5ada88761f16f6d2c7c1981 Author: Pedro Tammela Date: Sat Apr 15 12:33:09 2023 -0300 net/sched: clear actions pointer in miss cookie init fail Palash reports a UAF when using a modified version of syzkaller[1]. When 'tcf_exts_miss_cookie_base_alloc()' fails in 'tcf_exts_init_ex()' a call to 'tcf_exts_destroy()' is made to free up the tcf_exts resources. In flower, a call to '__fl_put()' when 'tcf_exts_init_ex()' fails is made; Then calling 'tcf_exts_destroy()', which triggers an UAF since the already freed tcf_exts action pointer is lingering in the struct. Before the offending patch, this was not an issue since there was no case where the tcf_exts action pointer could linger. Therefore, restore the old semantic by clearing the action pointer in case of a failure to initialize the miss_cookie. [1] https://github.com/cmu-pasta/linux-kernel-enriched-corpus v1->v2: Fix compilation on configs without tc actions (kernel test robot) Fixes: 80cd22c35c90 ("net/sched: cls_api: Support hardware miss to tc action") Reported-by: Palash Oswal Acked-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Signed-off-by: David S. Miller commit e1c71f8f918047ce822dc19b42ab1261ed259fd1 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: stable@vger.kernel.org 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 (cherry picked from commit 605f7c73133341d4b762cbd9a22174cc22d4c38b) Signed-off-by: Jani Nikula commit a80bb8e7233b2ad6ff119646b6e33fb3edcec37b Author: Ding Hui Date: Fri Apr 14 23:23:06 2023 +0800 sfc: Fix use-after-free due to selftest_work There is a use-after-free scenario that is: When the NIC is down, user set mac address or vlan tag to VF, the xxx_set_vf_mac() or xxx_set_vf_vlan() will invoke efx_net_stop() and efx_net_open(), since netif_running() is false, the port will not start and keep port_enabled false, but selftest_work is scheduled in efx_net_open(). If we remove the device before selftest_work run, the efx_stop_port() will not be called since the NIC is down, and then efx is freed, we will soon get a UAF in run_timer_softirq() like this: [ 1178.907941] ================================================================== [ 1178.907948] BUG: KASAN: use-after-free in run_timer_softirq+0xdea/0xe90 [ 1178.907950] Write of size 8 at addr ff11001f449cdc80 by task swapper/47/0 [ 1178.907950] [ 1178.907953] CPU: 47 PID: 0 Comm: swapper/47 Kdump: loaded Tainted: G O --------- -t - 4.18.0 #1 [ 1178.907954] Hardware name: SANGFOR X620G40/WI2HG-208T1061A, BIOS SPYH051032-U01 04/01/2022 [ 1178.907955] Call Trace: [ 1178.907956] [ 1178.907960] dump_stack+0x71/0xab [ 1178.907963] print_address_description+0x6b/0x290 [ 1178.907965] ? run_timer_softirq+0xdea/0xe90 [ 1178.907967] kasan_report+0x14a/0x2b0 [ 1178.907968] run_timer_softirq+0xdea/0xe90 [ 1178.907971] ? init_timer_key+0x170/0x170 [ 1178.907973] ? hrtimer_cancel+0x20/0x20 [ 1178.907976] ? sched_clock+0x5/0x10 [ 1178.907978] ? sched_clock_cpu+0x18/0x170 [ 1178.907981] __do_softirq+0x1c8/0x5fa [ 1178.907985] irq_exit+0x213/0x240 [ 1178.907987] smp_apic_timer_interrupt+0xd0/0x330 [ 1178.907989] apic_timer_interrupt+0xf/0x20 [ 1178.907990] [ 1178.907991] RIP: 0010:mwait_idle+0xae/0x370 If the NIC is not actually brought up, there is no need to schedule selftest_work, so let's move invoking efx_selftest_async_start() into efx_start_all(), and it will be canceled by broughting down. Fixes: dd40781e3a4e ("sfc: Run event/IRQ self-test asynchronously when interface is brought up") Fixes: e340be923012 ("sfc: add ndo_set_vf_mac() function for EF10") Debugged-by: Huang Cun Cc: Donglin Peng Suggested-by: Martin Habets Signed-off-by: Ding Hui Signed-off-by: David S. Miller commit 853618d5886bf94812f31228091cd37d308230f7 Author: Xuan Zhuo Date: Fri Apr 14 14:08:35 2023 +0800 virtio_net: bugfix overflow inside xdp_linearize_page() Here we copy the data from the original buf to the new page. But we not check that it may be overflow. As long as the size received(including vnethdr) is greater than 3840 (PAGE_SIZE -VIRTIO_XDP_HEADROOM). Then the memcpy will overflow. And this is completely possible, as long as the MTU is large, such as 4096. In our test environment, this will cause crash. Since crash is caused by the written memory, it is meaningless, so I do not include it. Fixes: 72979a6c3590 ("virtio_net: xdp, add slowpath case for non contiguous buffers") Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller commit d5a863a153e90996ab2aef6b9e08d509f4d5662b Author: Paulo Alcantara Date: Sun Apr 16 15:38:28 2023 -0300 cifs: avoid dup prefix path in dfs_get_automount_devname() @server->origin_fullpath already contains the tree name + optional prefix, so avoid calling __build_path_from_dentry_optional_prefix() as it might end up duplicating prefix path from @cifs_sb->prepath into final full path. Instead, generate DFS full path by simply merging @server->origin_fullpath with dentry's path. This fixes the following case mount.cifs //root/dfs/dir /mnt/ -o ... ls /mnt/link where cifs_dfs_do_automount() will call smb3_parse_devname() with @devname set to "//root/dfs/dir/link" instead of "//root/dfs/dir/dir/link". Fixes: 7ad54b98fc1f ("cifs: use origin fullpath for automounts") Cc: # 6.2+ Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 6a8f57ae2eb07ab39a6f0ccad60c760743051026 Author: Linus Torvalds Date: Sun Apr 16 15:23:53 2023 -0700 Linux 6.3-rc7 commit 2ff559f31a5d50c31a3f9d849f8af90dc36c7105 Author: Peter Xu Date: Wed Apr 12 12:38:52 2023 -0400 Revert "userfaultfd: don't fail on unrecognized features" This is a proposal to revert commit 914eedcb9ba0ff53c33808. I found this when writing a simple UFFDIO_API test to be the first unit test in this set. Two things breaks with the commit: - UFFDIO_API check was lost and missing. According to man page, the kernel should reject ioctl(UFFDIO_API) if uffdio_api.api != 0xaa. This check is needed if the api version will be extended in the future, or user app won't be able to identify which is a new kernel. - Feature flags checks were removed, which means UFFDIO_API with a feature that does not exist will also succeed. According to the man page, we should (and it makes sense) to reject ioctl(UFFDIO_API) if unknown features passed in. Link: https://lore.kernel.org/r/20220722201513.1624158-1-axelrasmussen@google.com Link: https://lkml.kernel.org/r/20230412163922.327282-2-peterx@redhat.com Fixes: 914eedcb9ba0 ("userfaultfd: don't fail on unrecognized features") Signed-off-by: Peter Xu Acked-by: David Hildenbrand Cc: Axel Rasmussen Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Mike Rapoport (IBM) Cc: Zach O'Keefe Cc: Signed-off-by: Andrew Morton commit 1ba1199ec5747f475538c0d25a32804e5ba1dfde Author: Baokun Li Date: Mon Apr 10 21:08:26 2023 +0800 writeback, cgroup: fix null-ptr-deref write in bdi_split_work_to_wbs KASAN report null-ptr-deref: ================================================================== BUG: KASAN: null-ptr-deref in bdi_split_work_to_wbs+0x5c5/0x7b0 Write of size 8 at addr 0000000000000000 by task sync/943 CPU: 5 PID: 943 Comm: sync Tainted: 6.3.0-rc5-next-20230406-dirty #461 Call Trace: dump_stack_lvl+0x7f/0xc0 print_report+0x2ba/0x340 kasan_report+0xc4/0x120 kasan_check_range+0x1b7/0x2e0 __kasan_check_write+0x24/0x40 bdi_split_work_to_wbs+0x5c5/0x7b0 sync_inodes_sb+0x195/0x630 sync_inodes_one_sb+0x3a/0x50 iterate_supers+0x106/0x1b0 ksys_sync+0x98/0x160 [...] ================================================================== The race that causes the above issue is as follows: cpu1 cpu2 -------------------------|------------------------- inode_switch_wbs INIT_WORK(&isw->work, inode_switch_wbs_work_fn) queue_rcu_work(isw_wq, &isw->work) // queue_work async inode_switch_wbs_work_fn wb_put_many(old_wb, nr_switched) percpu_ref_put_many ref->data->release(ref) cgwb_release queue_work(cgwb_release_wq, &wb->release_work) // queue_work async &wb->release_work cgwb_release_workfn ksys_sync iterate_supers sync_inodes_one_sb sync_inodes_sb bdi_split_work_to_wbs kmalloc(sizeof(*work), GFP_ATOMIC) // alloc memory failed percpu_ref_exit ref->data = NULL kfree(data) wb_get(wb) percpu_ref_get(&wb->refcnt) percpu_ref_get_many(ref, 1) atomic_long_add(nr, &ref->data->count) atomic64_add(i, v) // trigger null-ptr-deref bdi_split_work_to_wbs() traverses &bdi->wb_list to split work into all wbs. If the allocation of new work fails, the on-stack fallback will be used and the reference count of the current wb is increased afterwards. If cgroup writeback membership switches occur before getting the reference count and the current wb is released as old_wd, then calling wb_get() or wb_put() will trigger the null pointer dereference above. This issue was introduced in v4.3-rc7 (see fix tag1). Both sync_inodes_sb() and __writeback_inodes_sb_nr() calls to bdi_split_work_to_wbs() can trigger this issue. For scenarios called via sync_inodes_sb(), originally commit 7fc5854f8c6e ("writeback: synchronize sync(2) against cgroup writeback membership switches") reduced the possibility of the issue by adding wb_switch_rwsem, but in v5.14-rc1 (see fix tag2) removed the "inode_io_list_del_locked(inode, old_wb)" from inode_switch_wbs_work_fn() so that wb->state contains WB_has_dirty_io, thus old_wb is not skipped when traversing wbs in bdi_split_work_to_wbs(), and the issue becomes easily reproducible again. To solve this problem, percpu_ref_exit() is called under RCU protection to avoid race between cgwb_release_workfn() and bdi_split_work_to_wbs(). Moreover, replace wb_get() with wb_tryget() in bdi_split_work_to_wbs(), and skip the current wb if wb_tryget() fails because the wb has already been shutdown. Link: https://lkml.kernel.org/r/20230410130826.1492525-1-libaokun1@huawei.com Fixes: b817525a4a80 ("writeback: bdi_writeback iteration must not skip dying ones") Signed-off-by: Baokun Li Reviewed-by: Jan Kara Acked-by: Tejun Heo Cc: Alexander Viro Cc: Andreas Dilger Cc: Christian Brauner Cc: Dennis Zhou Cc: Hou Tao Cc: yangerkun Cc: Zhang Yi Cc: Jens Axboe Cc: Signed-off-by: Andrew Morton commit 1f5f12ece722aacea1769fb644f27790ede339dc Author: Peng Zhang Date: Tue Apr 11 12:10:04 2023 +0800 maple_tree: fix a potential memory leak, OOB access, or other unpredictable bug In mas_alloc_nodes(), "node->node_count = 0" means to initialize the node_count field of the new node, but the node may not be a new node. It may be a node that existed before and node_count has a value, setting it to 0 will cause a memory leak. At this time, mas->alloc->total will be greater than the actual number of nodes in the linked list, which may cause many other errors. For example, out-of-bounds access in mas_pop_node(), and mas_pop_node() may return addresses that should not be used. Fix it by initializing node_count only for new nodes. Also, by the way, an if-else statement was removed to simplify the code. Link: https://lkml.kernel.org/r/20230411041005.26205-1-zhangpeng.00@bytedance.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Peng Zhang Reviewed-by: Liam R. Howlett Cc: Signed-off-by: Andrew Morton commit 9235756885e865070c4be2facda75262dbd85967 Author: Steve Chou Date: Tue Apr 11 11:49:28 2023 +0800 tools/mm/page_owner_sort.c: fix TGID output when cull=tg is used When using cull option with 'tg' flag, the fprintf is using pid instead of tgid. It should use tgid instead. Link: https://lkml.kernel.org/r/20230411034929.2071501-1-steve_chou@pesi.com.tw Fixes: 9c8a0a8e599f4a ("tools/vm/page_owner_sort.c: support for user-defined culling rules") Signed-off-by: Steve Chou Cc: Jiajian Ye Cc: Signed-off-by: Andrew Morton commit d2c115baae6f793b5b01cff67799da17ffb1eda5 Author: Jonathan Toppins Date: Mon Apr 10 17:39:35 2023 -0400 mailmap: update jtoppins' entry to reference correct email Link: https://lkml.kernel.org/r/d79bc6eaf65e68bd1c2a1e1510ab6291ce5926a6.1681162487.git.jtoppins@redhat.com Signed-off-by: Jonathan Toppins Cc: Colin Ian King Cc: Jakub Kicinski Cc: Kirill Tkhai Cc: Konrad Dybcio Cc: Qais Yousef Cc: Stephen Hemminger Signed-off-by: Andrew Morton commit f4e9e0e69468583c2c6d9d5c7bfc975e292bf188 Author: Liam R. Howlett Date: Mon Apr 10 11:22:05 2023 -0400 mm/mempolicy: fix use-after-free of VMA iterator set_mempolicy_home_node() iterates over a list of VMAs and calls mbind_range() on each VMA, which also iterates over the singular list of the VMA passed in and potentially splits the VMA. Since the VMA iterator is not passed through, set_mempolicy_home_node() may now point to a stale node in the VMA tree. This can result in a UAF as reported by syzbot. Avoid the stale maple tree node by passing the VMA iterator through to the underlying call to split_vma(). mbind_range() is also overly complicated, since there are two calling functions and one already handles iterating over the VMAs. Simplify mbind_range() to only handle merging and splitting of the VMAs. Align the new loop in do_mbind() and existing loop in set_mempolicy_home_node() to use the reduced mbind_range() function. This allows for a single location of the range calculation and avoids constantly looking up the previous VMA (since this is a loop over the VMAs). Link: https://lore.kernel.org/linux-mm/000000000000c93feb05f87e24ad@google.com/ Fixes: 66850be55e8e ("mm/mempolicy: use vma iterator & maple state instead of vma linked list") Signed-off-by: Liam R. Howlett Reported-by: syzbot+a7c1ec5b1d71ceaa5186@syzkaller.appspotmail.com Link: https://lkml.kernel.org/r/20230410152205.2294819-1-Liam.Howlett@oracle.com Tested-by: syzbot+a7c1ec5b1d71ceaa5186@syzkaller.appspotmail.com Cc: Signed-off-by: Andrew Morton commit 4737edbbdd4958ae29ca6a310a6a2fa4e0684b01 Author: Naoya Horiguchi Date: Thu Apr 6 17:20:04 2023 +0900 mm/huge_memory.c: warn with pr_warn_ratelimited instead of VM_WARN_ON_ONCE_FOLIO split_huge_page_to_list() WARNs when called for huge zero pages, which sounds to me too harsh because it does not imply a kernel bug, but just notifies the event to admins. On the other hand, this is considered as critical by syzkaller and makes its testing less efficient, which seems to me harmful. So replace the VM_WARN_ON_ONCE_FOLIO with pr_warn_ratelimited. Link: https://lkml.kernel.org/r/20230406082004.2185420-1-naoya.horiguchi@linux.dev Fixes: 478d134e9506 ("mm/huge_memory: do not overkill when splitting huge_zero_page") Signed-off-by: Naoya Horiguchi Reported-by: syzbot+07a218429c8d19b1fb25@syzkaller.appspotmail.com Link: https://lore.kernel.org/lkml/000000000000a6f34a05e6efcd01@google.com/ Reviewed-by: Yang Shi Cc: Miaohe Lin Cc: Tetsuo Handa Cc: Xu Yu Cc: Signed-off-by: Andrew Morton commit 82f951340f25bba262766f82caec54e7fd6a73c7 Author: Liam R. Howlett Date: Thu Apr 6 15:30:50 2023 -0400 mm/mprotect: fix do_mprotect_pkey() return on error When the loop over the VMA is terminated early due to an error, the return code could be overwritten with ENOMEM. Fix the return code by only setting the error on early loop termination when the error is not set. User-visible effects include: attempts to run mprotect() against a special mapping or with a poorly-aligned hugetlb address should return -EINVAL, but they presently return -ENOMEM. In other cases an -EACCESS should be returned. Link: https://lkml.kernel.org/r/20230406193050.1363476-1-Liam.Howlett@oracle.com Fixes: 2286a6914c77 ("mm: change mprotect_fixup to vma iterator") Signed-off-by: Liam R. Howlett Cc: Signed-off-by: Andrew Morton commit dd47ac428c3f5f3bcabe845f36be870fe6c20784 Author: Peter Xu Date: Wed Apr 5 11:51:20 2023 -0400 mm/khugepaged: check again on anon uffd-wp during isolation Khugepaged collapse an anonymous thp in two rounds of scans. The 2nd round done in __collapse_huge_page_isolate() after hpage_collapse_scan_pmd(), during which all the locks will be released temporarily. It means the pgtable can change during this phase before 2nd round starts. It's logically possible some ptes got wr-protected during this phase, and we can errornously collapse a thp without noticing some ptes are wr-protected by userfault. e1e267c7928f wanted to avoid it but it only did that for the 1st phase, not the 2nd phase. Since __collapse_huge_page_isolate() happens after a round of small page swapins, we don't need to worry on any !present ptes - if it existed khugepaged will already bail out. So we only need to check present ptes with uffd-wp bit set there. This is something I found only but never had a reproducer, I thought it was one caused a bug in Muhammad's recent pagemap new ioctl work, but it turns out it's not the cause of that but an userspace bug. However this seems to still be a real bug even with a very small race window, still worth to have it fixed and copy stable. Link: https://lkml.kernel.org/r/20230405155120.3608140-1-peterx@redhat.com Fixes: e1e267c7928f ("khugepaged: skip collapse if uffd-wp detected") Signed-off-by: Peter Xu Reviewed-by: David Hildenbrand Reviewed-by: Yang Shi Cc: Andrea Arcangeli Cc: Axel Rasmussen Cc: Mike Rapoport Cc: Nadav Amit Cc: Signed-off-by: Andrew Morton commit 24bf08c4376be417f16ceb609188b16f461b0443 Author: David Hildenbrand Date: Wed Apr 5 18:02:35 2023 +0200 mm/userfaultfd: fix uffd-wp handling for THP migration entries Looks like what we fixed for hugetlb in commit 44f86392bdd1 ("mm/hugetlb: fix uffd-wp handling for migration entries in hugetlb_change_protection()") similarly applies to THP. Setting/clearing uffd-wp on THP migration entries is not implemented properly. Further, while removing migration PMDs considers the uffd-wp bit, inserting migration PMDs does not consider the uffd-wp bit. We have to set/clear independently of the migration entry type in change_huge_pmd() and properly copy the uffd-wp bit in set_pmd_migration_entry(). Verified using a simple reproducer that triggers migration of a THP, that the set_pmd_migration_entry() no longer loses the uffd-wp bit. Link: https://lkml.kernel.org/r/20230405160236.587705-2-david@redhat.com Fixes: f45ec5ff16a7 ("userfaultfd: wp: support swap and page migration") Signed-off-by: David Hildenbrand Reviewed-by: Peter Xu Cc: Cc: Muhammad Usama Anjum Signed-off-by: Andrew Morton commit 998ad18b00ebc0ef5a85be97fc020e710afc88ce Author: Qi Zheng Date: Thu Apr 6 00:18:53 2023 +0800 mm: swap: fix performance regression on sparsetruncate-tiny The ->percpu_pvec_drained was originally introduced by commit d9ed0d08b6c6 ("mm: only drain per-cpu pagevecs once per pagevec usage") to drain per-cpu pagevecs only once per pagevec usage. But after converting the swap code to be more folio-based, the commit c2bc16817aa0 ("mm/swap: add folio_batch_move_lru()") breaks this logic, which would cause ->percpu_pvec_drained to be reset to false, that means per-cpu pagevecs will be drained multiple times per pagevec usage. In theory, there should be no functional changes when converting code to be more folio-based. We should call folio_batch_reinit() in folio_batch_move_lru() instead of folio_batch_init(). And to verify that we still need ->percpu_pvec_drained, I ran mmtests/sparsetruncate-tiny and got the following data: baseline with baseline/ patch/ Min Time 326.00 ( 0.00%) 328.00 ( -0.61%) 1st-qrtle Time 334.00 ( 0.00%) 336.00 ( -0.60%) 2nd-qrtle Time 338.00 ( 0.00%) 341.00 ( -0.89%) 3rd-qrtle Time 343.00 ( 0.00%) 347.00 ( -1.17%) Max-1 Time 326.00 ( 0.00%) 328.00 ( -0.61%) Max-5 Time 327.00 ( 0.00%) 330.00 ( -0.92%) Max-10 Time 328.00 ( 0.00%) 331.00 ( -0.91%) Max-90 Time 350.00 ( 0.00%) 357.00 ( -2.00%) Max-95 Time 395.00 ( 0.00%) 390.00 ( 1.27%) Max-99 Time 508.00 ( 0.00%) 434.00 ( 14.57%) Max Time 547.00 ( 0.00%) 476.00 ( 12.98%) Amean Time 344.61 ( 0.00%) 345.56 * -0.28%* Stddev Time 30.34 ( 0.00%) 19.51 ( 35.69%) CoeffVar Time 8.81 ( 0.00%) 5.65 ( 35.87%) BAmean-99 Time 342.38 ( 0.00%) 344.27 ( -0.55%) BAmean-95 Time 338.58 ( 0.00%) 341.87 ( -0.97%) BAmean-90 Time 336.89 ( 0.00%) 340.26 ( -1.00%) BAmean-75 Time 335.18 ( 0.00%) 338.40 ( -0.96%) BAmean-50 Time 332.54 ( 0.00%) 335.42 ( -0.87%) BAmean-25 Time 329.30 ( 0.00%) 332.00 ( -0.82%) From the above it can be seen that we get similar data to when ->percpu_pvec_drained was introduced, so we still need it. Let's call folio_batch_reinit() in folio_batch_move_lru() to restore the original logic. Link: https://lkml.kernel.org/r/20230405161854.6931-1-zhengqi.arch@bytedance.com Fixes: c2bc16817aa0 ("mm/swap: add folio_batch_move_lru()") Signed-off-by: Qi Zheng Reviewed-by: Matthew Wilcox (Oracle) Acked-by: Mel Gorman Cc: Lorenzo Stoakes Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 6c538e1adbfc696ac4747fb10d63e704344f763d Merge: e623175f6418f 91dcf1e8068e9 Author: Linus Torvalds Date: Sun Apr 16 10:33:43 2023 -0700 Merge tag 'sched_urgent_for_v6.3_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Borislav Petkov: - Do not pull tasks to the local scheduling group if its average load is higher than the average system load * tag 'sched_urgent_for_v6.3_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Fix imbalance overflow commit e623175f6418f5873b28ca91a88312843b2e0dab Merge: 4a1c388ce0521 775d3c514c5b2 Author: Linus Torvalds Date: Sun Apr 16 10:28:29 2023 -0700 Merge tag 'x86_urgent_for_v6.3_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Borislav Petkov: - Drop __init annotation from two rtc functions which get called after boot is done, in order to prevent a crash * tag 'x86_urgent_for_v6.3_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/rtc: Remove __init for runtime functions commit 4a1c388ce0521163f1556f7edbacb50ec2df15cf Merge: f0dd81db3eac4 b277fc793daf2 Author: Linus Torvalds Date: Sun Apr 16 09:55:18 2023 -0700 Merge tag 'powerpc-6.3-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fix from Michael Ellerman: - A fix for NUMA distance handling in the pseries SCM (pmem) driver. Thanks to Aneesh Kumar K.V. * tag 'powerpc-6.3-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/papr_scm: Update the NUMA distance table for the target node commit f0dd81db3eac4b9455be5ce40d36320989024593 Merge: 6586c4d48018e 3c65a2704cdd2 Author: Linus Torvalds Date: Sun Apr 16 09:46:32 2023 -0700 Merge tag 'kbuild-fixes-v6.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Drop debug info from purgatory objects again - Document that kernel.org provides prebuilt LLVM toolchains - Give up handling untracked files for source package builds - Avoid creating corrupted cpio when KBUILD_BUILD_TIMESTAMP is given with a pre-epoch data. - Change panic_show_mem() to a macro to handle variable-length argument - Compress tarballs on-the-fly again * tag 'kbuild-fixes-v6.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: do not create intermediate *.tar for tar packages kbuild: do not create intermediate *.tar for source tarballs kbuild: merge cmd_archive_linux and cmd_archive_perf init/initramfs: Fix argument forwarding to panic() in panic_show_mem() initramfs: Check negative timestamp to prevent broken cpio archive kbuild: give up untracked files for source package builds Documentation/llvm: Add a note about prebuilt kernel.org toolchains purgatory: fix disabling debug info commit 6586c4d48018eb62d3df8af8ebe5436510ed04b1 Merge: 3e7bb4f246171 e7067a446264a Author: Linus Torvalds Date: Sun Apr 16 09:39:55 2023 -0700 Merge tag '6.3-rc6-ksmbd-server-fix' of git://git.samba.org/ksmbd Pull ksmbd server fix from Steve French: "smb311 server preauth integrity negotiate context parsing fix (check for out of bounds access)" * tag '6.3-rc6-ksmbd-server-fix' of git://git.samba.org/ksmbd: ksmbd: avoid out of bounds access in decode_preauth_ctxt() commit e3c026be4d3ca046799fde55ccbae9d0f059fb93 Author: Thomas Gleixner Date: Mon Apr 10 21:14:45 2023 +0200 PCI/MSI: Remove over-zealous hardware size check in pci_msix_validate_entries() pci_msix_validate_entries() validates the entries array which is handed in by the caller for a MSI-X interrupt allocation. Aside of consistency failures it also detects a failure when the size of the MSI-X hardware table in the device is smaller than the size of the entries array. That's wrong for the case of range allocations where the caller provides the minimum and the maximum number of vectors to allocate, when the hardware size is greater or equal than the mininum, but smaller than the maximum. Remove the hardware size check completely from that function and just ensure that the entires array up to the maximum size is consistent. The limitation and range checking versus the hardware size happens independently of that afterwards anyway because the entries array is optional. Fixes: 4644d22eb673 ("PCI/MSI: Validate MSI-X contiguous restriction early") Reported-by: David Laight Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/87v8i3sg62.ffs@tglx commit 3c65a2704cdd2a0cd0766352e587bae4a6268155 Author: Masahiro Yamada Date: Fri Apr 7 19:16:29 2023 +0900 kbuild: do not create intermediate *.tar for tar packages Commit 05e96e96a315 ("kbuild: use git-archive for source package creation") split the compression as a separate step to factor out the common build rules. With the previous commit, we got back to the situation where source tarballs are compressed on-the-fly. There is no reason to keep the separate compression rules. Generate the comressed tar packages directly. Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor commit f8d94c4e403c89ec6b09ba69f65e4547ba99dd07 Author: Masahiro Yamada Date: Fri Apr 7 19:16:28 2023 +0900 kbuild: do not create intermediate *.tar for source tarballs Since commit 05e96e96a315 ("kbuild: use git-archive for source package creation"), a source tarball is created in two steps; create *.tar file then compress it. I split the compression as a separate rule because I just thought 'git archive' supported only gzip. For other compression algorithms, I could pipe the two commands: $ git archive HEAD | xz > linux.tar.xz I read git-archive(1) carefully, and I realized GIT had provided a more elegant way: $ git -c tar.tar.xz.command=xz archive -o linux.tar.xz HEAD This commit uses 'tar.tar.*.command' configuration to specify the compression backend so we can compress a source tarball on-the-fly. GIT commit 767cf4579f0e ("archive: implement configurable tar filters") is more than a decade old, so it should be available on almost all build environments. Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor commit f6d8283549bc200e2babdd627239ece3547d634c Author: Masahiro Yamada Date: Fri Apr 7 19:16:27 2023 +0900 kbuild: merge cmd_archive_linux and cmd_archive_perf The two commands, cmd_archive_linux and cmd_archive_perf, are similar. Merge them to make it easier to add more changes to the git-archive command. Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor commit 735faf92fb06d083ddcf6cfcf6665666dea5dcc1 Author: Benjamin Gray Date: Tue Mar 21 10:05:34 2023 +1100 init/initramfs: Fix argument forwarding to panic() in panic_show_mem() Forwarding variadic argument lists can't be done by passing a va_list to a function with signature foo(...) (as panic() has). It ends up interpreting the va_list itself as a single argument instead of iterating it. printf() happily accepts it of course, leading to corrupt output. Convert panic_show_mem() to a macro to allow forwarding the arguments. The function is trivial enough that it's easier than trying to introduce a vpanic() variant. Signed-off-by: Benjamin Gray Reviewed-by: Andrew Donnellan Signed-off-by: Masahiro Yamada commit 5efb685bb3af112038af78a2cdf28f0ffdad45f5 Author: Benjamin Gray Date: Mon Mar 20 15:08:38 2023 +1100 initramfs: Check negative timestamp to prevent broken cpio archive Similar to commit 4c9d410f32b3 ("initramfs: Check timestamp to prevent broken cpio archive"), except asserts that the timestamp is non-negative. This can happen when the KBUILD_BUILD_TIMESTAMP is a value before UNIX epoch, which may be set when making reproducible builds that don't want to look like they use a valid date. While support for dates before 1970 might not be supported, this is more about preventing undetected CPIO corruption. The printf's use a minimum length format specifier, and will happily make the field longer than 8 characters if they need to. Signed-off-by: Benjamin Gray Reviewed-by: Andrew Donnellan Tested-by: Andrew Donnellan Signed-off-by: Masahiro Yamada commit 3e7bb4f2461710b70887704af7f175383251088e Merge: bc88aa51a6181 5105a7ffce191 Author: Linus Torvalds Date: Sat Apr 15 18:37:51 2023 -0700 Merge tag '6.3-rc6-smb311-client-negcontext-fix' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fix from Steve French: "Small client fix for better checking for smb311 negotiate context overflows, also marked for stable" * tag '6.3-rc6-smb311-client-negcontext-fix' of git://git.samba.org/sfrench/cifs-2.6: cifs: fix negotiate context parsing commit bc88aa51a61819956bb23dc26fa72b5bc9a81af3 Merge: a7a55e27ad72f 1e020e1b96afd Author: Linus Torvalds Date: Sat Apr 15 16:55:09 2023 -0700 Merge tag 'ubifs-for-linus-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs Pull UBI fixes from Richard Weinberger: - Fix failure to attach when vid_hdr offset equals the (sub)page size - Fix for a deadlock in UBI's worker thread * tag 'ubifs-for-linus-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs: ubi: Fix failure attaching when vid_hdr offset equals to (sub)page size ubi: Fix deadlock caused by recursively holding work_sem commit 5105a7ffce19160e7062aee67fb6b3b8a1b56d78 Author: David Disseldorp Date: Fri Apr 7 00:34:11 2023 +0200 cifs: fix negotiate context parsing smb311_decode_neg_context() doesn't properly check against SMB packet boundaries prior to accessing individual negotiate context entries. This is due to the length check omitting the eight byte smb2_neg_context header, as well as incorrect decrementing of len_of_ctxts. Fixes: 5100d8a3fe03 ("SMB311: Improve checking of negotiate security contexts") Reported-by: Volker Lendecke Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: David Disseldorp Signed-off-by: Steve French commit a7a55e27ad72fb0dc9281d6211cffeebef8dde65 Merge: 9772f14f557de f8160d3b35fc9 Author: Linus Torvalds Date: Sat Apr 15 11:06:49 2023 -0700 Merge tag 'i2c-for-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Just two driver fixes" * tag 'i2c-for-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: ocores: generate stop condition after timeout in polling mode i2c: mchp-pci1xxxx: Update Timing registers commit 9772f14f557de9d4056212c84a0a4f64b7b09f31 Merge: cdcc6696d22db c8e22b7a1694b Author: Linus Torvalds Date: Sat Apr 15 10:49:47 2023 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fix from James Bottomley: "One small fix to SCSI Enclosure Services to fix a regression caused by another recent fix" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ses: Handle enclosure with just a primary component gracefully commit cdcc6696d22dbb8fa2982d523d17f6ad2777d0f2 Merge: 1c6492d646462 f7ca1ae32bd89 Author: Linus Torvalds Date: Sat Apr 15 10:39:18 2023 -0700 Merge tag 'block-6.3-2023-04-14' of git://git.kernel.dk/linux Pull block fix from Jens Axboe: "A single NVMe quirk entry addition" * tag 'block-6.3-2023-04-14' of git://git.kernel.dk/linux: nvme-pci: add NVME_QUIRK_BOGUS_NID for T-FORCE Z330 SSD commit 1c6492d64646246834414964cfba9f826e7330b4 Merge: 7a934f4bd7d6f 860e1c7f8b0b4 Author: Linus Torvalds Date: Sat Apr 15 10:29:53 2023 -0700 Merge tag 'io_uring-6.3-2023-04-14' of git://git.kernel.dk/linux Pull io_uring fix from Jens Axboe: "Just a small tweak to when task_work needs redirection, marked for stable as well" * tag 'io_uring-6.3-2023-04-14' of git://git.kernel.dk/linux: io_uring: complete request via task work in case of DEFER_TASKRUN commit 7a934f4bd7d6f9da84c8812da3ba42ee10f5778e Merge: 95abc817ab3a5 1b50f956c8fe9 Author: Linus Torvalds Date: Fri Apr 14 10:44:48 2023 -0700 Merge tag 'riscv-for-linus-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - A fix for a missing fence when generating the NOMMU sigreturn trampoline - A set of fixes for early DTB handling of reserved memory nodes * tag 'riscv-for-linus-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: No need to relocate the dtb as it lies in the fixmap region riscv: Do not set initial_boot_params to the linear address of the dtb riscv: Move early dtb mapping into the fixmap region riscv: add icache flush for nommu sigreturn trampoline commit 95abc817ab3a5af57cc0b522f72225307fa6333f Merge: 4b992ead33cdd a3babdb7a8f73 Author: Linus Torvalds Date: Fri Apr 14 10:37:07 2023 -0700 Merge tag 'acpi-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These add two ACPI-related quirks: - Add a quirk to force StorageD3Enable on AMD Picasso systems (Mario Limonciello) - Add an ACPI IRQ override quirk for ASUS ExpertBook B1502CBA (Paul Menzel)" * tag 'acpi-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: resource: Skip IRQ override on ASUS ExpertBook B1502CBA ACPI: x86: utils: Add Picasso to the list for forcing StorageD3Enable commit 4b992ead33cdd47723f606350efcf8a8cae4fe36 Merge: d0b85e7e60b83 4654e9f9f4399 Author: Linus Torvalds Date: Fri Apr 14 10:25:30 2023 -0700 Merge tag 'pm-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "Make the amd-pstate cpufreq driver take all of the possible combinations of the 'old' and 'new' status values correctly while changing the operation mode via sysfs (Wyes Karny)" * tag 'pm-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: amd-pstate: Fix amd_pstate mode switch commit d0b85e7e60b83348b022441de9047c60ff555bfa Merge: e251c42318341 117e4e5bd9d47 Author: Linus Torvalds Date: Fri Apr 14 10:19:18 2023 -0700 Merge tag 'thermal-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control fix from Rafael Wysocki: "Modify the Intel thermal throttling code to avoid updating unsupported status clearing mask bits which causes the kernel to complain about unchecked MSR access (Srinivas Pandruvada)" * tag 'thermal-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: intel: Avoid updating unsupported THERM_STATUS_CLEAR mask bits commit e251c4231834184a3a2a39b1800e983bb116ac6b Merge: aee3c14e8659b 6ab6f98fcdc9d Author: Linus Torvalds Date: Fri Apr 14 10:13:54 2023 -0700 Merge tag 'sound-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes. At this time, quite a few fixes for the old PCI drivers are found. Although they are not regression fixes, I took these as they are materials for stable kernels. In addition, a couple of regression fixes and another couple of HD-audio quirks are included" * tag 'sound-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/hdmi: disable KAE for Intel DG2 ALSA: hda/realtek: Add quirks for Lenovo Z13/Z16 Gen2 ALSA: hda: patch_realtek: add quirk for Asus N7601ZM ALSA: firewire-tascam: add missing unwind goto in snd_tscm_stream_start_duplex() ALSA: emu10k1: don't create old pass-through playback device on Audigy ALSA: emu10k1: fix capture interrupt handler unlinking ALSA: hda/sigmatel: fix S/PDIF out on Intel D*45* motherboards ALSA: hda/sigmatel: add pin overrides for Intel DP45SG motherboard ALSA: i2c/cs8427: fix iec958 mixer control deactivation commit aee3c14e8659b2d14f417422b7eeb8a1e97ced30 Merge: 44149752e9987 aca3b0fa3d04b Author: Linus Torvalds Date: Fri Apr 14 10:06:50 2023 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "We had a fairly slow cycle on the rc side this time, here are the accumulated fixes, mostly in drivers: - irdma should not generate extra completions during flushing - Fix several memory leaks - Do not get confused in irdma's iwarp mode if IPv6 is present - Correct a link speed calculation in mlx5 - Increase the EQ/WQ limits on erdma as they are too small for big applications - Use the right math for erdma's inline mtt feature - Make erdma probing more robust to boot time ordering differences - Fix a KMSAN crash in CMA due to uninitialized qkey" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/core: Fix GID entry ref leak when create_ah fails RDMA/cma: Allow UD qp_type to join multicast only RDMA/erdma: Defer probing if netdevice can not be found RDMA/erdma: Inline mtt entries into WQE if supported RDMA/erdma: Update default EQ depth to 4096 and max_send_wr to 8192 RDMA/erdma: Fix some typos IB/mlx5: Add support for 400G_8X lane speed RDMA/irdma: Add ipv4 check to irdma_find_listener() RDMA/irdma: Increase iWARP CM default rexmit count RDMA/irdma: Fix memory leak of PBLE objects RDMA/irdma: Do not generate SW completions for NOPs commit c730fce7c70cfce831f4bdc9e49880ba1f61a092 Author: Ilya Leoshkevich Date: Fri Apr 14 17:47:55 2023 +0200 s390/bpf: Fix bpf_arch_text_poke() with new_addr == NULL Thomas Richter reported a crash in linux-next with a backtrace similar to the following one: [<0000000000000000>] 0x0 ([<000000000031a182>] bpf_trace_run4+0xc2/0x218) [<00000000001d59f4>] __bpf_trace_sched_switch+0x1c/0x28 [<0000000000c44a3a>] __schedule+0x43a/0x890 [<0000000000c44ef8>] schedule+0x68/0x110 [<0000000000c4e5ca>] do_nanosleep+0xa2/0x168 [<000000000026e7fe>] hrtimer_nanosleep+0xf6/0x1c0 [<000000000026eb6e>] __s390x_sys_nanosleep+0xb6/0xf0 [<0000000000c3b81c>] __do_syscall+0x1e4/0x208 [<0000000000c50510>] system_call+0x70/0x98 Last Breaking-Event-Address: [<000003ff7fda1814>] bpf_prog_65e887c70a835bbf_on_switch+0x1a4/0x1f0 The problem is that bpf_arch_text_poke() with new_addr == NULL is susceptible to the following race condition: T1 T2 ----------------- ------------------- plt.target = NULL entry: brcl 0xf,plt entry.mask = 0 lgrl %r1,plt.target br %r1 Fix by setting PLT target to the instruction following `brcl 0xf,plt` instead of 0. This way T2 will simply resume the execution of the eBPF program, which is the desired effect of passing new_addr == NULL. Fixes: f1d5df84cd8c ("s390/bpf: Implement bpf_arch_text_poke()") Reported-by: Thomas Richter Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Reviewed-by: Heiko Carstens Link: https://lore.kernel.org/bpf/20230414154755.184502-1-iii@linux.ibm.com commit a3babdb7a8f73c3d8965b245fe1b758b87538912 Merge: 05cda427126f3 10b6b4a8ac612 Author: Rafael J. Wysocki Date: Fri Apr 14 15:15:32 2023 +0200 Merge branch 'acpi-x86' Merge a quirk to force StorageD3Enable on AMD Picasso systems (Mario Limonciello). * acpi-x86: ACPI: x86: utils: Add Picasso to the list for forcing StorageD3Enable commit 860e1c7f8b0b43fbf91b4d689adfaa13adb89452 Author: Ming Lei Date: Fri Apr 14 15:53:13 2023 +0800 io_uring: complete request via task work in case of DEFER_TASKRUN So far io_req_complete_post() only covers DEFER_TASKRUN by completing request via task work when the request is completed from IOWQ. However, uring command could be completed from any context, and if io uring is setup with DEFER_TASKRUN, the command is required to be completed from current context, otherwise wait on IORING_ENTER_GETEVENTS can't be wakeup, and may hang forever. The issue can be observed on removing ublk device, but turns out it is one generic issue for uring command & DEFER_TASKRUN, so solve it in io_uring core code. Fixes: e6aeb2721d3b ("io_uring: complete all requests in task context") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/linux-block/b3fc9991-4c53-9218-a8cc-5b4dd3952108@kernel.dk/ Reported-by: Jens Axboe Cc: Kanchan Joshi Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit f7ca1ae32bd89ab035568c63b4443eb55420b423 Merge: 3723091ea1884 74391b3e69855 Author: Jens Axboe Date: Fri Apr 14 06:29:00 2023 -0600 Merge branch 'nvme-6.3' of git://git.infradead.org/nvme into block-6.3 Pull NVMe fix from Christoph. * 'nvme-6.3' of git://git.infradead.org/nvme: nvme-pci: add NVME_QUIRK_BOGUS_NID for T-FORCE Z330 SSD commit d75eecc3d170d8963ae554a774b8af1f4e1246da Merge: 43950556b7670 75eab749e7aec Author: Arnd Bergmann Date: Fri Apr 14 13:52:48 2023 +0200 Merge tag 'qcom-arm64-fixes-for-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes A few more Qualcomm ARM64 DeviceTree fixes for 6.3 The GPIO polarity of the WSA881x shutdown GPIO was inconsistent and had to be corrected in the driver, this fixes the polarity in the DeviceTree for QRB5165 RB5, SM8250 MTP, Samsung Galaxy Book 2 and Lenovo Yoga C630. The recent rearrangement of nodes among the IPQ8074 accidentally enabled the PCIe PHYs, rather than the PCIe controllers. This is being corrected, to restore PCIe functionality. PMK8280 PON node has the wrong compatible, which recently caused the driver to stop probing. This is corrected and the required "pbs" region is added. With support for HBR3 introduced, it's noted that SC7280 Herobrine devices are having trouble running at this rate. This drops the claim that it's supported, until further analysis can be done. * tag 'qcom-arm64-fixes-for-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: dts: qcom: sc7280: remove hbr3 support on herobrine boards arm64: dts: qcom: sc8280xp-pmics: fix pon compatible and registers arm64: dts: qcom: ipq8074-hk10: enable QMP device, not the PHY node arm64: dts: qcom: ipq8074-hk01: enable QMP device, not the PHY node arm64: dts: qcom: qrb5165-rb5: Use proper WSA881x shutdown GPIO polarity arm64: dts: qcom: sm8250-mtp: Use proper WSA881x shutdown GPIO polarity arm64: dts: qcom: sdm850-samsung-w737: Use proper WSA881x shutdown GPIO polarity arm64: dts: qcom: sdm850-lenovo-yoga-c630: Use proper WSA881x shutdown GPIO polarity Link: https://lore.kernel.org/r/20230410153850.4752-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 43950556b767054a5ccff48e1967ed8540c074f2 Merge: 43235168793cb 60a655debd36e Author: Arnd Bergmann Date: Fri Apr 14 13:51:22 2023 +0200 Merge tag 'v6.3-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/fixes Lower sd card speeds for two boards to make them run more reliable, missing 32k clock definition for Anbric xx3 devices, missing cache-levels for rk3588, fixed rk3326-board display supplies and more dt-schema fixes. * tag 'v6.3-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: correct panel supplies on some rk3326 boards arm64: dts: rockchip: use just "port" in panel on RockPro64 arm64: dts: rockchip: use just "port" in panel on Pinebook Pro arm64: dts: rockchip: Remove non-existing pwm-delay-us property arm64: dts: rockchip: Add clk_rtc_32k to Anbernic xx3 Devices arm64: dts: rockchip: add rk3588 cache level information arm64: dts: rockchip: Lower SD card speed on rk3399 Pinebook Pro arm64: dts: rockchip: Lower sd speed on rk3566-soquartz ARM: dts: rockchip: fix a typo error for rk3288 spdif node arm64: dts: rockchip: Fix rk3399 GICv3 ITS node name Link: https://lore.kernel.org/r/10559306.CDJkKcVGEf@phil Signed-off-by: Arnd Bergmann commit 43235168793cb1d766ccd015c219068e0547c511 Author: Johan Hovold Date: Fri Apr 14 10:46:19 2023 +0200 firmware/psci: demote suspend-mode warning to info level On some Qualcomm platforms, like SC8280XP, the attempt to set PC mode during boot fails with PSCI_RET_DENIED and since commit 998fcd001feb ("firmware/psci: Print a warning if PSCI doesn't accept PC mode") this is now logged at warning level: psci: failed to set PC mode: -3 As there is nothing users can do about the firmware behaving this way, demote the warning to info level and clearly mark it as a firmware bug: psci: [Firmware Bug]: failed to set PC mode: -3 Reviewed-by: Ulf Hansson Acked-by: Mark Rutland Acked-by: Sudeep Holla Signed-off-by: Johan Hovold Acked-by: Dmitry Baryshkov Signed-off-by: Arnd Bergmann commit 3037933448f60f9acb705997eae62013ecb81e0d Author: Gwangun Jung Date: Thu Apr 13 19:35:54 2023 +0900 net: sched: sch_qfq: prevent slab-out-of-bounds in qfq_activate_agg If the TCA_QFQ_LMAX value is not offered through nlattr, lmax is determined by the MTU value of the network device. The MTU of the loopback device can be set up to 2^31-1. As a result, it is possible to have an lmax value that exceeds QFQ_MIN_LMAX. Due to the invalid lmax value, an index is generated that exceeds the QFQ_MAX_INDEX(=24) value, causing out-of-bounds read/write errors. The following reports a oob access: [ 84.582666] BUG: KASAN: slab-out-of-bounds in qfq_activate_agg.constprop.0 (net/sched/sch_qfq.c:1027 net/sched/sch_qfq.c:1060 net/sched/sch_qfq.c:1313) [ 84.583267] Read of size 4 at addr ffff88810f676948 by task ping/301 [ 84.583686] [ 84.583797] CPU: 3 PID: 301 Comm: ping Not tainted 6.3.0-rc5 #1 [ 84.584164] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 [ 84.584644] Call Trace: [ 84.584787] [ 84.584906] dump_stack_lvl (lib/dump_stack.c:107 (discriminator 1)) [ 84.585108] print_report (mm/kasan/report.c:320 mm/kasan/report.c:430) [ 84.585570] kasan_report (mm/kasan/report.c:538) [ 84.585988] qfq_activate_agg.constprop.0 (net/sched/sch_qfq.c:1027 net/sched/sch_qfq.c:1060 net/sched/sch_qfq.c:1313) [ 84.586599] qfq_enqueue (net/sched/sch_qfq.c:1255) [ 84.587607] dev_qdisc_enqueue (net/core/dev.c:3776) [ 84.587749] __dev_queue_xmit (./include/net/sch_generic.h:186 net/core/dev.c:3865 net/core/dev.c:4212) [ 84.588763] ip_finish_output2 (./include/net/neighbour.h:546 net/ipv4/ip_output.c:228) [ 84.589460] ip_output (net/ipv4/ip_output.c:430) [ 84.590132] ip_push_pending_frames (./include/net/dst.h:444 net/ipv4/ip_output.c:126 net/ipv4/ip_output.c:1586 net/ipv4/ip_output.c:1606) [ 84.590285] raw_sendmsg (net/ipv4/raw.c:649) [ 84.591960] sock_sendmsg (net/socket.c:724 net/socket.c:747) [ 84.592084] __sys_sendto (net/socket.c:2142) [ 84.593306] __x64_sys_sendto (net/socket.c:2150) [ 84.593779] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80) [ 84.593902] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120) [ 84.594070] RIP: 0033:0x7fe568032066 [ 84.594192] Code: 0e 0d 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b8 0f 1f 00 41 89 ca 64 8b 04 25 18 00 00 00 85 c09[ 84.594796] RSP: 002b:00007ffce388b4e8 EFLAGS: 00000246 ORIG_RAX: 000000000000002c Code starting with the faulting instruction =========================================== [ 84.595047] RAX: ffffffffffffffda RBX: 00007ffce388cc70 RCX: 00007fe568032066 [ 84.595281] RDX: 0000000000000040 RSI: 00005605fdad6d10 RDI: 0000000000000003 [ 84.595515] RBP: 00005605fdad6d10 R08: 00007ffce388eeec R09: 0000000000000010 [ 84.595749] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000040 [ 84.595984] R13: 00007ffce388cc30 R14: 00007ffce388b4f0 R15: 0000001d00000001 [ 84.596218] [ 84.596295] [ 84.596351] Allocated by task 291: [ 84.596467] kasan_save_stack (mm/kasan/common.c:46) [ 84.596597] kasan_set_track (mm/kasan/common.c:52) [ 84.596725] __kasan_kmalloc (mm/kasan/common.c:384) [ 84.596852] __kmalloc_node (./include/linux/kasan.h:196 mm/slab_common.c:967 mm/slab_common.c:974) [ 84.596979] qdisc_alloc (./include/linux/slab.h:610 ./include/linux/slab.h:731 net/sched/sch_generic.c:938) [ 84.597100] qdisc_create (net/sched/sch_api.c:1244) [ 84.597222] tc_modify_qdisc (net/sched/sch_api.c:1680) [ 84.597357] rtnetlink_rcv_msg (net/core/rtnetlink.c:6174) [ 84.597495] netlink_rcv_skb (net/netlink/af_netlink.c:2574) [ 84.597627] netlink_unicast (net/netlink/af_netlink.c:1340 net/netlink/af_netlink.c:1365) [ 84.597759] netlink_sendmsg (net/netlink/af_netlink.c:1942) [ 84.597891] sock_sendmsg (net/socket.c:724 net/socket.c:747) [ 84.598016] ____sys_sendmsg (net/socket.c:2501) [ 84.598147] ___sys_sendmsg (net/socket.c:2557) [ 84.598275] __sys_sendmsg (./include/linux/file.h:31 net/socket.c:2586) [ 84.598399] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80) [ 84.598520] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120) [ 84.598688] [ 84.598744] The buggy address belongs to the object at ffff88810f674000 [ 84.598744] which belongs to the cache kmalloc-8k of size 8192 [ 84.599135] The buggy address is located 2664 bytes to the right of [ 84.599135] allocated 7904-byte region [ffff88810f674000, ffff88810f675ee0) [ 84.599544] [ 84.599598] The buggy address belongs to the physical page: [ 84.599777] page:00000000e638567f refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10f670 [ 84.600074] head:00000000e638567f order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 84.600330] flags: 0x200000000010200(slab|head|node=0|zone=2) [ 84.600517] raw: 0200000000010200 ffff888100043180 dead000000000122 0000000000000000 [ 84.600764] raw: 0000000000000000 0000000080020002 00000001ffffffff 0000000000000000 [ 84.601009] page dumped because: kasan: bad access detected [ 84.601187] [ 84.601241] Memory state around the buggy address: [ 84.601396] ffff88810f676800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 84.601620] ffff88810f676880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 84.601845] >ffff88810f676900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 84.602069] ^ [ 84.602243] ffff88810f676980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 84.602468] ffff88810f676a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 84.602693] ================================================================== [ 84.602924] Disabling lock debugging due to kernel taint Fixes: 3015f3d2a3cd ("pkt_sched: enable QFQ to support TSO/GSO") Reported-by: Gwangun Jung Signed-off-by: Gwangun Jung Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit 5dc63e56a9cf8df0b59c234a505a1653f1bdf885 Author: hrdl Date: Thu Apr 13 23:41:13 2023 -0700 Input: cyttsp5 - fix sensing configuration data structure Prior to this patch, the sensing configuration data was not parsed correctly, breaking detection of max_tch. The vendor driver includes this field. This change informs the driver about the correct maximum number of simultaneous touch inputs. Tested on a Pine64 PineNote with a modified touch screen controller firmware. Signed-off-by: hrdl Reviewed-by: Alistair Francis Link: https://lore.kernel.org/r/20230411211651.3791304-1-git@hrdl.eu Signed-off-by: Dmitry Torokhov commit 6ab6f98fcdc9d4fbe245aa67de03542deea65322 Author: Kai Vehmanen Date: Thu Apr 13 22:11:53 2023 +0300 ALSA: hda/hdmi: disable KAE for Intel DG2 Use of keep-alive (KAE) has resulted in loss of audio on some A750/770 cards as the transition from keep-alive to stream playback is not working as expected. As there is limited benefit of the new KAE mode on discrete cards, revert back to older silent-stream implementation on these systems. Cc: stable@vger.kernel.org Fixes: 15175a4f2bbb ("ALSA: hda/hdmi: add keep-alive support for ADL-P and DG2") Link: https://gitlab.freedesktop.org/drm/intel/-/issues/8307 Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20230413191153.3692049-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit 74391b3e69855e7dd65a9cef36baf5fc1345affd Author: Duy Truong Date: Thu Apr 13 17:55:48 2023 -0700 nvme-pci: add NVME_QUIRK_BOGUS_NID for T-FORCE Z330 SSD Added a quirk to fix the TeamGroup T-Force Cardea Zero Z330 SSDs reporting duplicate NGUIDs. Signed-off-by: Duy Truong Cc: stable@vger.kernel.org Signed-off-by: Christoph Hellwig commit 1b50f956c8fe9082bdee4a9cfd798149c52f7043 Author: Alexandre Ghiti Date: Wed Mar 29 10:19:32 2023 +0200 riscv: No need to relocate the dtb as it lies in the fixmap region We used to access the dtb via its linear mapping address but now that the dtb early mapping was moved in the fixmap region, we can keep using this address since it is present in swapper_pg_dir, and remove the dtb relocation. Note that the relocation was wrong anyway since early_memremap() is restricted to 256K whereas the maximum fdt size is 2MB. Signed-off-by: Alexandre Ghiti Reviewed-by: Conor Dooley Tested-by: Conor Dooley Link: https://lore.kernel.org/r/20230329081932.79831-4-alexghiti@rivosinc.com Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit f1581626071c8e37c58c5e8f0b4126b17172a211 Author: Alexandre Ghiti Date: Wed Mar 29 10:19:31 2023 +0200 riscv: Do not set initial_boot_params to the linear address of the dtb early_init_dt_verify() is already called in parse_dtb() and since the dtb address does not change anymore (it is now in the fixmap region), no need to reset initial_boot_params by calling early_init_dt_verify() again. Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20230329081932.79831-3-alexghiti@rivosinc.com Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit ef69d2559fe91f23d27a3d6fd640b5641787d22e Author: Alexandre Ghiti Date: Wed Mar 29 10:19:30 2023 +0200 riscv: Move early dtb mapping into the fixmap region riscv establishes 2 virtual mappings: - early_pg_dir maps the kernel which allows to discover the system memory - swapper_pg_dir installs the final mapping (linear mapping included) We used to map the dtb in early_pg_dir using DTB_EARLY_BASE_VA, and this mapping was not carried over in swapper_pg_dir. It happens that early_init_fdt_scan_reserved_mem() must be called before swapper_pg_dir is setup otherwise we could allocate reserved memory defined in the dtb. And this function initializes reserved_mem variable with addresses that lie in the early_pg_dir dtb mapping: when those addresses are reused with swapper_pg_dir, this mapping does not exist and then we trap. The previous "fix" was incorrect as early_init_fdt_scan_reserved_mem() must be called before swapper_pg_dir is set up otherwise we could allocate in reserved memory defined in the dtb. So move the dtb mapping in the fixmap region which is established in early_pg_dir and handed over to swapper_pg_dir. Fixes: 922b0375fc93 ("riscv: Fix memblock reservation for device tree blob") Fixes: 8f3a2b4a96dc ("RISC-V: Move DT mapping outof fixmap") Fixes: 50e63dd8ed92 ("riscv: fix reserved memory setup") Reported-by: Conor Dooley Link: https://lore.kernel.org/all/f8e67f82-103d-156c-deb0-d6d6e2756f5e@microchip.com/ Signed-off-by: Alexandre Ghiti Reviewed-by: Conor Dooley Tested-by: Conor Dooley Link: https://lore.kernel.org/r/20230329081932.79831-2-alexghiti@rivosinc.com Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 44149752e9987a9eac5ad78e6d3a20934b5e018d Merge: e44f45fee8d55 7e27cb6ad4d85 Author: Linus Torvalds Date: Thu Apr 13 16:28:33 2023 -0700 Merge tag 'cgroup-for-6.3-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fixes from Tejun Heo: "This is a relatively big pull request this late in the cycle but the major contributor is the cpuset bug which is rather significant: - Fix several cpuset bugs including one where it wasn't applying the target cgroup when tasks are created with CLONE_INTO_CGROUP With a few smaller fixes: - Fix inversed locking order in cgroup1 freezer implementation - Fix garbage cpu.stat::core_sched.forceidle_usec reporting in the root cgroup" * tag 'cgroup-for-6.3-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup/cpuset: Make cpuset_attach_task() skip subpartitions CPUs for top_cpuset cgroup/cpuset: Add cpuset_can_fork() and cpuset_cancel_fork() methods cgroup/cpuset: Make cpuset_fork() handle CLONE_INTO_CGROUP properly cgroup/cpuset: Wake up cpuset_attach_wq tasks in cpuset_cancel_attach() cgroup,freezer: hold cpu_hotplug_lock before freezer_mutex cgroup/cpuset: Fix partition root's cpuset.cpus update bug cgroup: fix display of forceidle time at root commit e44f45fee8d5520c6a72e308054fc627e8e38619 Merge: 829cca4d17830 632e04739c8f4 Author: Linus Torvalds Date: Thu Apr 13 16:16:33 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 few more clk driver fixes: - Set the max_register member of the spreadtrum regmap so that reads don't go off the end of the I/O space - Avoid a clk parent error in the i.MX imx6ul driver when the selector is unknown - Fix an oops due to REGCACHE_NONE usage by the Renesas 9-series driver" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: rs9: Fix suspend/resume clk: imx6ul: fix "failed to get parent" error clk: sprd: set max_register according to mapping range commit 829cca4d1783088e43bace57a555044cc937c554 Merge: 4413ad01e27eb d0f89c4c1d4e7 Author: Linus Torvalds Date: Thu Apr 13 15:33:04 2023 -0700 Merge tag 'net-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from bpf, and bluetooth. Not all that quiet given spring celebrations, but "current" fixes are thinning out, which is encouraging. One outstanding regression in the mlx5 driver when using old FW, not blocking but we're pushing for a fix. Current release - new code bugs: - eth: enetc: workaround for unresponsive pMAC after receiving express traffic Previous releases - regressions: - rtnetlink: restore RTM_NEW/DELLINK notification behavior, keep the pid/seq fields 0 for backward compatibility Previous releases - always broken: - sctp: fix a potential overflow in sctp_ifwdtsn_skip - mptcp: - use mptcp_schedule_work instead of open-coding it and make the worker check stricter, to avoid scheduling work on closed sockets - fix NULL pointer dereference on fastopen early fallback - skbuff: fix memory corruption due to a race between skb coalescing and releasing clones confusing page_pool reference counting - bonding: fix neighbor solicitation validation on backup slaves - bpf: tcp: use sock_gen_put instead of sock_put in bpf_iter_tcp - bpf: arm64: fixed a BTI error on returning to patched function - openvswitch: fix race on port output leading to inf loop - sfp: initialize sfp->i2c_block_size at sfp allocation to avoid returning a different errno than expected - phy: nxp-c45-tja11xx: unregister PTP, purge queues on remove - Bluetooth: fix printing errors if LE Connection times out - Bluetooth: assorted UaF, deadlock and data race fixes - eth: macb: fix memory corruption in extended buffer descriptor mode Misc: - adjust the XDP Rx flow hash API to also include the protocol layers over which the hash was computed" * tag 'net-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (50 commits) selftests/bpf: Adjust bpf_xdp_metadata_rx_hash for new arg mlx4: bpf_xdp_metadata_rx_hash add xdp rss hash type veth: bpf_xdp_metadata_rx_hash add xdp rss hash type mlx5: bpf_xdp_metadata_rx_hash add xdp rss hash type xdp: rss hash types representation selftests/bpf: xdp_hw_metadata remove bpf_printk and add counters skbuff: Fix a race between coalescing and releasing SKBs net: macb: fix a memory corruption in extended buffer descriptor mode selftests: add the missing CONFIG_IP_SCTP in net config udp6: fix potential access to stale information selftests: openvswitch: adjust datapath NL message declaration selftests: mptcp: userspace pm: uniform verify events mptcp: fix NULL pointer dereference on fastopen early fallback mptcp: stricter state check in mptcp_worker mptcp: use mptcp_schedule_work instead of open-coding it net: enetc: workaround for unresponsive pMAC after receiving express traffic sctp: fix a potential overflow in sctp_ifwdtsn_skip net: qrtr: Fix an uninit variable access bug in qrtr_tx_resume() rtnetlink: Restore RTM_NEW/DELLINK notification behavior net: ti/cpsw: Add explicit platform_device.h and of_platform.h includes ... commit 11b3b9f461c5c4f700f6c8da202fcc2fd6418e1f Author: Vitaly Prosyak Date: Thu Apr 6 16:00:54 2023 -0400 drm/sched: Check scheduler ready before calling timeout handling During an IGT GPU reset test we see the following oops, [ +0.000003] ------------[ cut here ]------------ [ +0.000000] WARNING: CPU: 9 PID: 0 at kernel/workqueue.c:1656 __queue_delayed_work+0x6d/0xa0 [ +0.000004] Modules linked in: iptable_filter bpfilter amdgpu(OE) nls_iso8859_1 snd_hda_codec_realtek snd_hda_codec_generic intel_rapl_msr ledtrig_audio snd_hda_codec_hdmi intel_rapl_common snd_hda_intel edac_mce_amd snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec snd_hda_core iommu_v2 gpu_sched(OE) kvm_amd drm_buddy snd_hwdep kvm video drm_ttm_helper snd_pcm ttm snd_seq_midi drm_display_helper snd_seq_midi_event snd_rawmidi cec crct10dif_pclmul ghash_clmulni_intel sha512_ssse3 snd_seq aesni_intel rc_core crypto_simd cryptd binfmt_misc drm_kms_helper rapl snd_seq_device input_leds joydev snd_timer i2c_algo_bit syscopyarea snd ccp sysfillrect sysimgblt wmi_bmof k10temp soundcore mac_hid sch_fq_codel msr parport_pc ppdev drm lp parport ramoops reed_solomon pstore_blk pstore_zone efi_pstore ip_tables x_tables autofs4 hid_generic usbhid hid r8169 ahci xhci_pci gpio_amdpt realtek i2c_piix4 wmi crc32_pclmul xhci_pci_renesas libahci gpio_generic [ +0.000070] CPU: 9 PID: 0 Comm: swapper/9 Tainted: G W OE 6.1.11+ #2 [ +0.000003] Hardware name: Gigabyte Technology Co., Ltd. AB350-Gaming 3/AB350-Gaming 3-CF, BIOS F7 06/16/2017 [ +0.000001] RIP: 0010:__queue_delayed_work+0x6d/0xa0 [ +0.000003] Code: 7a 50 48 01 c1 48 89 4a 30 81 ff 00 20 00 00 75 38 4c 89 cf e8 64 3e 0a 00 5d e9 1e c5 11 01 e8 99 f7 ff ff 5d e9 13 c5 11 01 <0f> 0b eb c1 0f 0b 48 81 7a 38 70 5c 0e 81 74 9f 0f 0b 48 8b 42 28 [ +0.000002] RSP: 0018:ffffc90000398d60 EFLAGS: 00010007 [ +0.000002] RAX: ffff88810d589c60 RBX: 0000000000000000 RCX: 0000000000000000 [ +0.000002] RDX: ffff88810d589c58 RSI: 0000000000000000 RDI: 0000000000002000 [ +0.000001] RBP: ffffc90000398d60 R08: 0000000000000000 R09: ffff88810d589c78 [ +0.000002] R10: 72705f305f39765f R11: 7866673a6d72645b R12: ffff88810d589c58 [ +0.000001] R13: 0000000000002000 R14: 0000000000000000 R15: 0000000000000000 [ +0.000002] FS: 0000000000000000(0000) GS:ffff8887fee40000(0000) knlGS:0000000000000000 [ +0.000001] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ +0.000002] CR2: 00005562c4797fa0 CR3: 0000000110da0000 CR4: 00000000003506e0 [ +0.000002] Call Trace: [ +0.000001] [ +0.000001] mod_delayed_work_on+0x5e/0xa0 [ +0.000004] drm_sched_fault+0x23/0x30 [gpu_sched] [ +0.000007] gfx_v9_0_fault.isra.0+0xa6/0xd0 [amdgpu] [ +0.000258] gfx_v9_0_priv_reg_irq+0x29/0x40 [amdgpu] [ +0.000254] amdgpu_irq_dispatch+0x1ac/0x2b0 [amdgpu] [ +0.000243] amdgpu_ih_process+0x89/0x130 [amdgpu] [ +0.000245] amdgpu_irq_handler+0x24/0x60 [amdgpu] [ +0.000165] __handle_irq_event_percpu+0x4f/0x1a0 [ +0.000003] handle_irq_event_percpu+0x15/0x50 [ +0.000001] handle_irq_event+0x39/0x60 [ +0.000002] handle_edge_irq+0xa8/0x250 [ +0.000003] __common_interrupt+0x7b/0x150 [ +0.000002] common_interrupt+0xc1/0xe0 [ +0.000003] [ +0.000000] [ +0.000001] asm_common_interrupt+0x27/0x40 [ +0.000002] RIP: 0010:native_safe_halt+0xb/0x10 [ +0.000003] Code: 46 ff ff ff cc cc cc cc cc cc cc cc cc cc cc eb 07 0f 00 2d 69 f2 5e 00 f4 e9 f1 3b 3e 00 90 eb 07 0f 00 2d 59 f2 5e 00 fb f4 e0 3b 3e 00 0f 1f 44 00 00 55 48 89 e5 53 e8 b1 d4 fe ff 66 90 [ +0.000002] RSP: 0018:ffffc9000018fdc8 EFLAGS: 00000246 [ +0.000002] RAX: 0000000000004000 RBX: 000000000002e5a8 RCX: 000000000000001f [ +0.000001] RDX: 0000000000000001 RSI: ffff888101298800 RDI: ffff888101298864 [ +0.000001] RBP: ffffc9000018fdd0 R08: 000000527f64bd8b R09: 000000000001dc90 [ +0.000001] R10: 000000000001dc90 R11: 0000000000000003 R12: 0000000000000001 [ +0.000001] R13: ffff888101298864 R14: ffffffff832d9e20 R15: ffff888193aa8c00 [ +0.000003] ? acpi_idle_do_entry+0x5e/0x70 [ +0.000002] acpi_idle_enter+0xd1/0x160 [ +0.000003] cpuidle_enter_state+0x9a/0x6e0 [ +0.000003] cpuidle_enter+0x2e/0x50 [ +0.000003] call_cpuidle+0x23/0x50 [ +0.000002] do_idle+0x1de/0x260 [ +0.000002] cpu_startup_entry+0x20/0x30 [ +0.000002] start_secondary+0x120/0x150 [ +0.000003] secondary_startup_64_no_verify+0xe5/0xeb [ +0.000004] [ +0.000000] ---[ end trace 0000000000000000 ]--- [ +0.000003] BUG: kernel NULL pointer dereference, address: 0000000000000102 [ +0.006233] [drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring gfx_low timeout, signaled seq=3, emitted seq=4 [ +0.000734] #PF: supervisor read access in kernel mode [ +0.009670] [drm:amdgpu_job_timedout [amdgpu]] *ERROR* Process information: process amd_deadlock pid 2002 thread amd_deadlock pid 2002 [ +0.005135] #PF: error_code(0x0000) - not-present page [ +0.000002] PGD 0 P4D 0 [ +0.000002] Oops: 0000 [#1] PREEMPT SMP NOPTI [ +0.000002] CPU: 9 PID: 0 Comm: swapper/9 Tainted: G W OE 6.1.11+ #2 [ +0.000002] Hardware name: Gigabyte Technology Co., Ltd. AB350-Gaming 3/AB350-Gaming 3-CF, BIOS F7 06/16/2017 [ +0.012101] amdgpu 0000:0c:00.0: amdgpu: GPU reset begin! [ +0.005136] RIP: 0010:__queue_work+0x1f/0x4e0 [ +0.000004] Code: 87 cd 11 01 0f 1f 80 00 00 00 00 0f 1f 44 00 00 55 48 89 e5 41 57 41 56 41 55 49 89 d5 41 54 49 89 f4 53 48 83 ec 10 89 7d d4 86 02 01 00 00 01 0f 85 6c 03 00 00 e8 7f 36 08 00 8b 45 d4 48 For gfx_rings the schedulers may not be initialized by amdgpu_device_init_schedulers() due to ring->no_scheduler flag being set to true and thus the timeout_wq is NULL. As a result, since all ASICs call drm_sched_fault() unconditionally even for schedulers which have not been initialized, it is simpler to use the ready condition which indicates whether the given scheduler worker thread runs and whether the timeout_wq of the reset domain has been initialized. Signed-off-by: Vitaly Prosyak Cc: Christian König Reviewed-by: Luben Tuikov Signed-off-by: Luben Tuikov Link: https://lore.kernel.org/r/20230406200054.633379-1-luben.tuikov@amd.com commit 4413ad01e27eb989f4b19bb5b038328c220a383d Merge: 531f27ad5e3a8 1a50d9403fb90 Author: Linus Torvalds Date: Thu Apr 13 15:21:56 2023 -0700 Merge tag 'devicetree-fixes-for-6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: - Fix interaction between fw_devlink and DT overlays causing devices to not be probed - Fix the compatible string for loongson,cpu-interrupt-controller * tag 'devicetree-fixes-for-6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: treewide: Fix probing of devices in DT overlays dt-bindings: interrupt-controller: loongarch: Fix mismatched compatible commit 531f27ad5e3a85128a9668c9063c58fc35d4e89b Merge: f1be7b6c165f0 534e465845ebf Author: Linus Torvalds Date: Thu Apr 13 15:17:59 2023 -0700 Merge tag 'pinctrl-v6.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fix from Linus Walleij: "This is just a revert of the AMD fix, because the fix broke some laptops. We are working on a proper solution" * tag 'pinctrl-v6.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: Revert "pinctrl: amd: Disable and mask interrupts on resume" commit f1be7b6c165f0d451c3ea2062f506bf5f130bd5e Merge: de4664485abbc cab2932213c5c Author: Linus Torvalds Date: Thu Apr 13 14:58:55 2023 -0700 Merge tag 'drm-fixes-2023-04-13' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Daniel Vetter: - two fbcon regressions - amdgpu: dp mst, smu13 - i915: dual link dsi for tgl+ - armada, nouveau, drm/sched, fbmem * tag 'drm-fixes-2023-04-13' of git://anongit.freedesktop.org/drm/drm: fbcon: set_con2fb_map needs to set con2fb_map! fbcon: Fix error paths in set_con2fb_map drm/amd/pm: correct the pcie link state check for SMU13 drm/amd/pm: correct SMU13.0.7 max shader clock reporting drm/amd/pm: correct SMU13.0.7 pstate profiling clock settings drm/amd/display: Pass the right info to drm_dp_remove_payload drm/armada: Fix a potential double free in an error handling path fbmem: Reject FB_ACTIVATE_KD_TEXT from userspace drm/nouveau/fb: add missing sysmen flush callbacks drm/i915/dsi: fix DSS CTL register offsets for TGL+ drm/scheduler: Fix UAF race in drm_sched_entity_push_job() commit d0f89c4c1d4e7614581d4fe7caebb3ce6bceafe6 Merge: 0646dc31ca886 b65ef48c95b95 Author: Jakub Kicinski Date: Thu Apr 13 13:04:44 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-04-13 We've added 6 non-merge commits during the last 1 day(s) which contain a total of 14 files changed, 205 insertions(+), 38 deletions(-). The main changes are: 1) One late straggler fix on the XDP hints side which fixes bpf_xdp_metadata_rx_hash kfunc API before the release goes out in order to provide information on the RSS hash type, from Jesper Dangaard Brouer. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: selftests/bpf: Adjust bpf_xdp_metadata_rx_hash for new arg mlx4: bpf_xdp_metadata_rx_hash add xdp rss hash type veth: bpf_xdp_metadata_rx_hash add xdp rss hash type mlx5: bpf_xdp_metadata_rx_hash add xdp rss hash type xdp: rss hash types representation selftests/bpf: xdp_hw_metadata remove bpf_printk and add counters ==================== Link: https://lore.kernel.org/r/20230413192939.10202-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit e7067a446264a7514fa1cfaa4052cdb6803bc6a2 Author: David Disseldorp Date: Thu Apr 13 23:49:57 2023 +0900 ksmbd: avoid out of bounds access in decode_preauth_ctxt() Confirm that the accessed pneg_ctxt->HashAlgorithms address sits within the SMB request boundary; deassemble_neg_contexts() only checks that the eight byte smb2_neg_context header + (client controlled) DataLength are within the packet boundary, which is insufficient. Checking for sizeof(struct smb2_preauth_neg_context) is overkill given that the type currently assumes SMB311_SALT_SIZE bytes of trailing Salt. Signed-off-by: David Disseldorp Acked-by: Namjae Jeon Cc: Signed-off-by: Steve French commit cab2932213c5cd72a9e04e5e82002e81b946592b Merge: fffb0b52d5258 5603effb8295a Author: Daniel Vetter Date: Thu Apr 13 20:47:58 2023 +0200 Merge tag 'drm-misc-fixes-2023-04-13' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull: * armada: Fix double free * fb: Clear FB_ACTIVATE_KD_TEXT in ioctl * nouveau: Add missing callbacks * scheduler: Fix use-after-free error Signed-off-by: Daniel Vetter From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230413184233.GA8148@linux-uq9g commit b65ef48c95b95960e91f9f3c45e6d079be00f0f3 Merge: 0646dc31ca886 0f26b74e7d071 Author: Alexei Starovoitov Date: Thu Apr 13 11:05:49 2023 -0700 Merge branch 'XDP-hints: change RX-hash kfunc bpf_xdp_metadata_rx_hash' Jesper Dangaard Brouer says: ==================== Current API for bpf_xdp_metadata_rx_hash() returns the raw RSS hash value, but doesn't provide information on the RSS hash type (part of 6.3-rc). This patchset proposal is to change the function call signature via adding a pointer value argument for providing the RSS hash type. Patchset also removes all bpf_printk's from xdp_hw_metadata program that we expect driver developers to use. Instead counters are introduced for relaying e.g. skip and fail info. ==================== Signed-off-by: Alexei Starovoitov commit 0f26b74e7d071b0dc18e2c43d79d496c2b144035 Author: Jesper Dangaard Brouer Date: Wed Apr 12 21:49:00 2023 +0200 selftests/bpf: Adjust bpf_xdp_metadata_rx_hash for new arg Update BPF selftests to use the new RSS type argument for kfunc bpf_xdp_metadata_rx_hash. Signed-off-by: Jesper Dangaard Brouer Acked-by: Toke Høiland-Jørgensen Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/r/168132894068.340624.8914711185697163690.stgit@firesoul Signed-off-by: Alexei Starovoitov commit 9123397aeeb4f93dda5828e37c35312f1b62231e Author: Jesper Dangaard Brouer Date: Wed Apr 12 21:48:55 2023 +0200 mlx4: bpf_xdp_metadata_rx_hash add xdp rss hash type Update API for bpf_xdp_metadata_rx_hash() with arg for xdp rss hash type via matching individual Completion Queue Entry (CQE) status bits. Fixes: ab46182d0dcb ("net/mlx4_en: Support RX XDP metadata") Signed-off-by: Jesper Dangaard Brouer Acked-by: Toke Høiland-Jørgensen Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/r/168132893562.340624.12779118462402031248.stgit@firesoul Signed-off-by: Alexei Starovoitov commit 96b1a098f3db06223a6b6268e756f980d5c07f10 Author: Jesper Dangaard Brouer Date: Wed Apr 12 21:48:50 2023 +0200 veth: bpf_xdp_metadata_rx_hash add xdp rss hash type Update API for bpf_xdp_metadata_rx_hash() with arg for xdp rss hash type. The veth driver currently only support XDP-hints based on SKB code path. The SKB have lost information about the RSS hash type, by compressing the information down to a single bitfield skb->l4_hash, that only knows if this was a L4 hash value. In preparation for veth, the xdp_rss_hash_type have an L4 indication bit that allow us to return a meaningful L4 indication when working with SKB based packets. Fixes: 306531f0249f ("veth: Support RX XDP metadata") Signed-off-by: Jesper Dangaard Brouer Acked-by: Toke Høiland-Jørgensen Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/r/168132893055.340624.16209448340644513469.stgit@firesoul Signed-off-by: Alexei Starovoitov commit 67f245c2ec0af17d7a90c78910e28bc8b206297c Author: Jesper Dangaard Brouer Date: Wed Apr 12 21:48:45 2023 +0200 mlx5: bpf_xdp_metadata_rx_hash add xdp rss hash type Update API for bpf_xdp_metadata_rx_hash() with arg for xdp rss hash type via mapping table. The mlx5 hardware can also identify and RSS hash IPSEC. This indicate hash includes SPI (Security Parameters Index) as part of IPSEC hash. Extend xdp core enum xdp_rss_hash_type with IPSEC hash type. Fixes: bc8d405b1ba9 ("net/mlx5e: Support RX XDP metadata") Signed-off-by: Jesper Dangaard Brouer Acked-by: Toke Høiland-Jørgensen Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/r/168132892548.340624.11185734579430124869.stgit@firesoul Signed-off-by: Alexei Starovoitov commit 0cd917a4a8ace70ff9082d797c899f6bf10de910 Author: Jesper Dangaard Brouer Date: Wed Apr 12 21:48:40 2023 +0200 xdp: rss hash types representation The RSS hash type specifies what portion of packet data NIC hardware used when calculating RSS hash value. The RSS types are focused on Internet traffic protocols at OSI layers L3 and L4. L2 (e.g. ARP) often get hash value zero and no RSS type. For L3 focused on IPv4 vs. IPv6, and L4 primarily TCP vs UDP, but some hardware supports SCTP. Hardware RSS types are differently encoded for each hardware NIC. Most hardware represent RSS hash type as a number. Determining L3 vs L4 often requires a mapping table as there often isn't a pattern or sorting according to ISO layer. The patch introduce a XDP RSS hash type (enum xdp_rss_hash_type) that contains both BITs for the L3/L4 types, and combinations to be used by drivers for their mapping tables. The enum xdp_rss_type_bits get exposed to BPF via BTF, and it is up to the BPF-programmer to match using these defines. This proposal change the kfunc API bpf_xdp_metadata_rx_hash() adding a pointer value argument for provide the RSS hash type. Change signature for all xmo_rx_hash calls in drivers to make it compile. The RSS type implementations for each driver comes as separate patches. Fixes: 3d76a4d3d4e5 ("bpf: XDP metadata RX kfuncs") Signed-off-by: Jesper Dangaard Brouer Acked-by: Toke Høiland-Jørgensen Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/r/168132892042.340624.582563003880565460.stgit@firesoul Signed-off-by: Alexei Starovoitov commit e8163b98d96c4d87c870689f560c53be7ccd55c8 Author: Jesper Dangaard Brouer Date: Wed Apr 12 21:48:35 2023 +0200 selftests/bpf: xdp_hw_metadata remove bpf_printk and add counters The tool xdp_hw_metadata can be used by driver developers implementing XDP-hints metadata kfuncs. Remove all bpf_printk calls, as the tool already transfers all the XDP-hints related information via metadata area to AF_XDP userspace process. Add counters for providing remaining information about failure and skipped packet events. Signed-off-by: Jesper Dangaard Brouer Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/r/168132891533.340624.7313781245316405141.stgit@firesoul Signed-off-by: Alexei Starovoitov commit fffb0b52d5258554c645c966c6cbef7de50b851d Author: Daniel Vetter Date: Wed Apr 12 17:31:46 2023 +0200 fbcon: set_con2fb_map needs to set con2fb_map! I got really badly confused in d443d9386472 ("fbcon: move more common code into fb_open()") because we set the con2fb_map before the failure points, which didn't look good. But in trying to fix that I moved the assignment into the wrong path - we need to do it for _all_ vc we take over, not just the first one (which additionally requires the call to con2fb_acquire_newinfo). I've figured this out because of a KASAN bug report, where the fbcon_registered_fb and fbcon_display arrays went out of sync in fbcon_mode_deleted() because the con2fb_map pointed at the old fb_info, but the modes and everything was updated for the new one. Signed-off-by: Daniel Vetter Reviewed-by: Javier Martinez Canillas Acked-by: Helge Deller Tested-by: Xingyuan Mo Fixes: d443d9386472 ("fbcon: move more common code into fb_open()") Reported-by: Xingyuan Mo Cc: Thomas Zimmermann Cc: Sam Ravnborg Cc: Xingyuan Mo Cc: Thomas Zimmermann Cc: Helge Deller Cc: # v5.19+ commit edf79dd2172233452ff142dcc98b19d955fc8974 Author: Daniel Vetter Date: Wed Apr 12 17:23:49 2023 +0200 fbcon: Fix error paths in set_con2fb_map This is a regressoin introduced in b07db3958485 ("fbcon: Ditch error handling for con2fb_release_oldinfo"). I failed to realize what the if (!err) checks. The mentioned commit was dropping the con2fb_release_oldinfo() return value but the if (!err) was also checking whether the con2fb_acquire_newinfo() function call above failed or not. Fix this with an early return statement. Note that there's still a difference compared to the orginal state of the code, the below lines are now also skipped on error: if (!search_fb_in_map(info_idx)) info_idx = newidx; These are only needed when we've actually thrown out an old fb_info from the console mappings, which only happens later on. Also move the fbcon_add_cursor_work() call into the same if block, it's all protected by console_lock so doesn't matter when we set up the blinking cursor delayed work anyway. This further simplifies the control flow and allows us to ditch the found local variable. v2: Clarify commit message (Javier) Signed-off-by: Daniel Vetter Reviewed-by: Javier Martinez Canillas Acked-by: Helge Deller Tested-by: Xingyuan Mo Fixes: b07db3958485 ("fbcon: Ditch error handling for con2fb_release_oldinfo") Cc: Thomas Zimmermann Cc: Sam Ravnborg Cc: Xingyuan Mo Cc: Thomas Zimmermann Cc: Helge Deller Cc: # v5.19+ commit 0646dc31ca886693274df5749cd0c8c1eaaeb5ca Author: Liang Chen Date: Thu Apr 13 17:03:53 2023 +0800 skbuff: Fix a race between coalescing and releasing SKBs Commit 1effe8ca4e34 ("skbuff: fix coalescing for page_pool fragment recycling") allowed coalescing to proceed with non page pool page and page pool page when @from is cloned, i.e. to->pp_recycle --> false from->pp_recycle --> true skb_cloned(from) --> true However, it actually requires skb_cloned(@from) to hold true until coalescing finishes in this situation. If the other cloned SKB is released while the merging is in process, from_shinfo->nr_frags will be set to 0 toward the end of the function, causing the increment of frag page _refcount to be unexpectedly skipped resulting in inconsistent reference counts. Later when SKB(@to) is released, it frees the page directly even though the page pool page is still in use, leading to use-after-free or double-free errors. So it should be prohibited. The double-free error message below prompted us to investigate: BUG: Bad page state in process swapper/1 pfn:0e0d1 page:00000000c6548b28 refcount:-1 mapcount:0 mapping:0000000000000000 index:0x2 pfn:0xe0d1 flags: 0xfffffc0000000(node=0|zone=1|lastcpupid=0x1fffff) raw: 000fffffc0000000 0000000000000000 ffffffff00000101 0000000000000000 raw: 0000000000000002 0000000000000000 ffffffffffffffff 0000000000000000 page dumped because: nonzero _refcount CPU: 1 PID: 0 Comm: swapper/1 Tainted: G E 6.2.0+ Call Trace: dump_stack_lvl+0x32/0x50 bad_page+0x69/0xf0 free_pcp_prepare+0x260/0x2f0 free_unref_page+0x20/0x1c0 skb_release_data+0x10b/0x1a0 napi_consume_skb+0x56/0x150 net_rx_action+0xf0/0x350 ? __napi_schedule+0x79/0x90 __do_softirq+0xc8/0x2b1 __irq_exit_rcu+0xb9/0xf0 common_interrupt+0x82/0xa0 asm_common_interrupt+0x22/0x40 RIP: 0010:default_idle+0xb/0x20 Fixes: 53e0961da1c7 ("page_pool: add frag page recycling support in page pool") Signed-off-by: Liang Chen Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20230413090353.14448-1-liangchen.linux@gmail.com Signed-off-by: Jakub Kicinski commit e8b74453555872851bdd7ea43a7c0ec39659834f Author: Roman Gushchin Date: Wed Apr 12 16:21:44 2023 -0700 net: macb: fix a memory corruption in extended buffer descriptor mode For quite some time we were chasing a bug which looked like a sudden permanent failure of networking and mmc on some of our devices. The bug was very sensitive to any software changes and even more to any kernel debug options. Finally we got a setup where the problem was reproducible with CONFIG_DMA_API_DEBUG=y and it revealed the issue with the rx dma: [ 16.992082] ------------[ cut here ]------------ [ 16.996779] DMA-API: macb ff0b0000.ethernet: device driver tries to free DMA memory it has not allocated [device address=0x0000000875e3e244] [size=1536 bytes] [ 17.011049] WARNING: CPU: 0 PID: 85 at kernel/dma/debug.c:1011 check_unmap+0x6a0/0x900 [ 17.018977] Modules linked in: xxxxx [ 17.038823] CPU: 0 PID: 85 Comm: irq/55-8000f000 Not tainted 5.4.0 #28 [ 17.045345] Hardware name: xxxxx [ 17.049528] pstate: 60000005 (nZCv daif -PAN -UAO) [ 17.054322] pc : check_unmap+0x6a0/0x900 [ 17.058243] lr : check_unmap+0x6a0/0x900 [ 17.062163] sp : ffffffc010003c40 [ 17.065470] x29: ffffffc010003c40 x28: 000000004000c03c [ 17.070783] x27: ffffffc010da7048 x26: ffffff8878e38800 [ 17.076095] x25: ffffff8879d22810 x24: ffffffc010003cc8 [ 17.081407] x23: 0000000000000000 x22: ffffffc010a08750 [ 17.086719] x21: ffffff8878e3c7c0 x20: ffffffc010acb000 [ 17.092032] x19: 0000000875e3e244 x18: 0000000000000010 [ 17.097343] x17: 0000000000000000 x16: 0000000000000000 [ 17.102647] x15: ffffff8879e4a988 x14: 0720072007200720 [ 17.107959] x13: 0720072007200720 x12: 0720072007200720 [ 17.113261] x11: 0720072007200720 x10: 0720072007200720 [ 17.118565] x9 : 0720072007200720 x8 : 000000000000022d [ 17.123869] x7 : 0000000000000015 x6 : 0000000000000098 [ 17.129173] x5 : 0000000000000000 x4 : 0000000000000000 [ 17.134475] x3 : 00000000ffffffff x2 : ffffffc010a1d370 [ 17.139778] x1 : b420c9d75d27bb00 x0 : 0000000000000000 [ 17.145082] Call trace: [ 17.147524] check_unmap+0x6a0/0x900 [ 17.151091] debug_dma_unmap_page+0x88/0x90 [ 17.155266] gem_rx+0x114/0x2f0 [ 17.158396] macb_poll+0x58/0x100 [ 17.161705] net_rx_action+0x118/0x400 [ 17.165445] __do_softirq+0x138/0x36c [ 17.169100] irq_exit+0x98/0xc0 [ 17.172234] __handle_domain_irq+0x64/0xc0 [ 17.176320] gic_handle_irq+0x5c/0xc0 [ 17.179974] el1_irq+0xb8/0x140 [ 17.183109] xiic_process+0x5c/0xe30 [ 17.186677] irq_thread_fn+0x28/0x90 [ 17.190244] irq_thread+0x208/0x2a0 [ 17.193724] kthread+0x130/0x140 [ 17.196945] ret_from_fork+0x10/0x20 [ 17.200510] ---[ end trace 7240980785f81d6f ]--- [ 237.021490] ------------[ cut here ]------------ [ 237.026129] DMA-API: exceeded 7 overlapping mappings of cacheline 0x0000000021d79e7b [ 237.033886] WARNING: CPU: 0 PID: 0 at kernel/dma/debug.c:499 add_dma_entry+0x214/0x240 [ 237.041802] Modules linked in: xxxxx [ 237.061637] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 5.4.0 #28 [ 237.068941] Hardware name: xxxxx [ 237.073116] pstate: 80000085 (Nzcv daIf -PAN -UAO) [ 237.077900] pc : add_dma_entry+0x214/0x240 [ 237.081986] lr : add_dma_entry+0x214/0x240 [ 237.086072] sp : ffffffc010003c30 [ 237.089379] x29: ffffffc010003c30 x28: ffffff8878a0be00 [ 237.094683] x27: 0000000000000180 x26: ffffff8878e387c0 [ 237.099987] x25: 0000000000000002 x24: 0000000000000000 [ 237.105290] x23: 000000000000003b x22: ffffffc010a0fa00 [ 237.110594] x21: 0000000021d79e7b x20: ffffffc010abe600 [ 237.115897] x19: 00000000ffffffef x18: 0000000000000010 [ 237.121201] x17: 0000000000000000 x16: 0000000000000000 [ 237.126504] x15: ffffffc010a0fdc8 x14: 0720072007200720 [ 237.131807] x13: 0720072007200720 x12: 0720072007200720 [ 237.137111] x11: 0720072007200720 x10: 0720072007200720 [ 237.142415] x9 : 0720072007200720 x8 : 0000000000000259 [ 237.147718] x7 : 0000000000000001 x6 : 0000000000000000 [ 237.153022] x5 : ffffffc010003a20 x4 : 0000000000000001 [ 237.158325] x3 : 0000000000000006 x2 : 0000000000000007 [ 237.163628] x1 : 8ac721b3a7dc1c00 x0 : 0000000000000000 [ 237.168932] Call trace: [ 237.171373] add_dma_entry+0x214/0x240 [ 237.175115] debug_dma_map_page+0xf8/0x120 [ 237.179203] gem_rx_refill+0x190/0x280 [ 237.182942] gem_rx+0x224/0x2f0 [ 237.186075] macb_poll+0x58/0x100 [ 237.189384] net_rx_action+0x118/0x400 [ 237.193125] __do_softirq+0x138/0x36c [ 237.196780] irq_exit+0x98/0xc0 [ 237.199914] __handle_domain_irq+0x64/0xc0 [ 237.204000] gic_handle_irq+0x5c/0xc0 [ 237.207654] el1_irq+0xb8/0x140 [ 237.210789] arch_cpu_idle+0x40/0x200 [ 237.214444] default_idle_call+0x18/0x30 [ 237.218359] do_idle+0x200/0x280 [ 237.221578] cpu_startup_entry+0x20/0x30 [ 237.225493] rest_init+0xe4/0xf0 [ 237.228713] arch_call_rest_init+0xc/0x14 [ 237.232714] start_kernel+0x47c/0x4a8 [ 237.236367] ---[ end trace 7240980785f81d70 ]--- Lars was fast to find an explanation: according to the datasheet bit 2 of the rx buffer descriptor entry has a different meaning in the extended mode: Address [2] of beginning of buffer, or in extended buffer descriptor mode (DMA configuration register [28] = 1), indicates a valid timestamp in the buffer descriptor entry. The macb driver didn't mask this bit while getting an address and it eventually caused a memory corruption and a dma failure. The problem is resolved by explicitly clearing the problematic bit if hw timestamping is used. Fixes: 7b4296148066 ("net: macb: Add support for PTP timestamps in DMA descriptors") Signed-off-by: Roman Gushchin Co-developed-by: Lars-Peter Clausen Signed-off-by: Lars-Peter Clausen Acked-by: Nicolas Ferre Reviewed-by: Jacob Keller Link: https://lore.kernel.org/r/20230412232144.770336-1-roman.gushchin@linux.dev Signed-off-by: Jakub Kicinski commit 3a0385be133e7091cc9a9a998c7ec712bb9585db Author: Xin Long Date: Wed Apr 12 11:13:06 2023 -0400 selftests: add the missing CONFIG_IP_SCTP in net config The selftest sctp_vrf needs CONFIG_IP_SCTP set in config when building the kernel, so add it. Fixes: a61bd7b9fef3 ("selftests: add a selftest for sctp vrf") Reported-by: Naresh Kamboju Signed-off-by: Xin Long Reviewed-by: Sridhar Samudrala Link: https://lore.kernel.org/r/61dddebc4d2dd98fe7fb145e24d4b2430e42b572.1681312386.git.lucien.xin@gmail.com Signed-off-by: Jakub Kicinski commit 1c5950fc6fe996235f1d18539b9c6b64b597f50f Author: Eric Dumazet Date: Wed Apr 12 13:03:08 2023 +0000 udp6: fix potential access to stale information lena wang reported an issue caused by udpv6_sendmsg() mangling msg->msg_name and msg->msg_namelen, which are later read from ____sys_sendmsg() : /* * If this is sendmmsg() and sending to current destination address was * successful, remember it. */ if (used_address && err >= 0) { used_address->name_len = msg_sys->msg_namelen; if (msg_sys->msg_name) memcpy(&used_address->name, msg_sys->msg_name, used_address->name_len); } udpv6_sendmsg() wants to pretend the remote address family is AF_INET in order to call udp_sendmsg(). A fix would be to modify the address in-place, instead of using a local variable, but this could have other side effects. Instead, restore initial values before we return from udpv6_sendmsg(). Fixes: c71d8ebe7a44 ("net: Fix security_socket_sendmsg() bypass problem.") Reported-by: lena wang Signed-off-by: Eric Dumazet Reviewed-by: Maciej Żenczykowski Link: https://lore.kernel.org/r/20230412130308.1202254-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 306dc21361993f4fe50a15d4db6b1a4de5d0adb0 Author: Aaron Conole Date: Wed Apr 12 07:58:28 2023 -0400 selftests: openvswitch: adjust datapath NL message declaration The netlink message for creating a new datapath takes an array of ports for the PID creation. This shouldn't cause much issue but correct it for future cases where we need to do decode of datapath information that could include the per-cpu PID map. Fixes: 25f16c873fb1 ("selftests: add openvswitch selftest suite") Signed-off-by: Aaron Conole Link: https://lore.kernel.org/r/20230412115828.3991806-1-aconole@redhat.com Signed-off-by: Jakub Kicinski commit ecfcc6fbeb57c6b076cddba99f04c6e800b61dff Merge: 5b7be2d4fd6eb 711ae788cbbb8 Author: Jakub Kicinski Date: Thu Apr 13 09:59:00 2023 -0700 Merge branch 'mptcp-more-fixes-for-6-3' Matthieu Baerts says: ==================== mptcp: more fixes for 6.3 Patch 1 avoids scheduling the MPTCP worker on a closed socket on some edge cases. It fixes issues that can be visible from v5.11. Patch 2 makes sure the MPTCP worker doesn't try to manipulate disconnected sockets. This is also a fix for an issue that can be visible from v5.11. Patch 3 fixes a NULL pointer dereference when MPTCP FastOpen is used and an early fallback is done. A fix for v6.2. Patch 4 improves the stability of the userspace PM selftest for a subtest added in v6.2. ==================== Link: https://lore.kernel.org/r/20230411-upstream-net-20230411-mptcp-fixes-v1-0-ca540f3ef986@tessares.net Signed-off-by: Jakub Kicinski commit 711ae788cbbb82818531b55e32b09518ee09a11a Author: Matthieu Baerts Date: Tue Apr 11 22:42:12 2023 +0200 selftests: mptcp: userspace pm: uniform verify events Simply adding a "sleep" before checking something is usually not a good idea because the time that has been picked can not be enough or too much. The best is to wait for events with a timeout. In this selftest, 'sleep 0.5' is used more than 40 times. It is always used before calling a 'verify_*' function except for this verify_listener_events which has been added later. At the end, using all these 'sleep 0.5' seems to work: the slow CIs don't complain so far. Also because it doesn't take too much time, we can just add two more 'sleep 0.5' to uniform what is done before calling a 'verify_*' function. For the same reasons, we can also delay a bigger refactoring to replace all these 'sleep 0.5' by functions waiting for events instead of waiting for a fix time and hope for the best. Fixes: 6c73008aa301 ("selftests: mptcp: listener test for userspace PM") Cc: stable@vger.kernel.org Suggested-by: Paolo Abeni Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit c0ff6f6da66a7791a32c0234388b1bdc00244917 Author: Paolo Abeni Date: Tue Apr 11 22:42:11 2023 +0200 mptcp: fix NULL pointer dereference on fastopen early fallback In case of early fallback to TCP, subflow_syn_recv_sock() deletes the subflow context before returning the newly allocated sock to the caller. The fastopen path does not cope with the above unconditionally dereferencing the subflow context. Fixes: 36b122baf6a8 ("mptcp: add subflow_v(4,6)_send_synack()") 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 d6a0443733434408f2cbd4c53fea6910599bab9e Author: Paolo Abeni Date: Tue Apr 11 22:42:10 2023 +0200 mptcp: stricter state check in mptcp_worker As reported by Christoph, the mptcp protocol can run the worker when the relevant msk socket is in an unexpected state: connect() // incoming reset + fastclose // the mptcp worker is scheduled mptcp_disconnect() // msk is now CLOSED listen() mptcp_worker() Leading to the following splat: divide error: 0000 [#1] PREEMPT SMP CPU: 1 PID: 21 Comm: kworker/1:0 Not tainted 6.3.0-rc1-gde5e8fd0123c #11 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-2.el7 04/01/2014 Workqueue: events mptcp_worker RIP: 0010:__tcp_select_window+0x22c/0x4b0 net/ipv4/tcp_output.c:3018 RSP: 0018:ffffc900000b3c98 EFLAGS: 00010293 RAX: 000000000000ffd7 RBX: 000000000000ffd7 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff8214ce97 RDI: 0000000000000004 RBP: 000000000000ffd7 R08: 0000000000000004 R09: 0000000000010000 R10: 000000000000ffd7 R11: ffff888005afa148 R12: 000000000000ffd7 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff88803ed00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000405270 CR3: 000000003011e006 CR4: 0000000000370ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: tcp_select_window net/ipv4/tcp_output.c:262 [inline] __tcp_transmit_skb+0x356/0x1280 net/ipv4/tcp_output.c:1345 tcp_transmit_skb net/ipv4/tcp_output.c:1417 [inline] tcp_send_active_reset+0x13e/0x320 net/ipv4/tcp_output.c:3459 mptcp_check_fastclose net/mptcp/protocol.c:2530 [inline] mptcp_worker+0x6c7/0x800 net/mptcp/protocol.c:2705 process_one_work+0x3bd/0x950 kernel/workqueue.c:2390 worker_thread+0x5b/0x610 kernel/workqueue.c:2537 kthread+0x138/0x170 kernel/kthread.c:376 ret_from_fork+0x2c/0x50 arch/x86/entry/entry_64.S:308 This change addresses the issue explicitly checking for bad states before running the mptcp worker. Fixes: e16163b6e2b7 ("mptcp: refactor shutdown and close") Cc: stable@vger.kernel.org Reported-by: Christoph Paasch Link: https://github.com/multipath-tcp/mptcp_net-next/issues/374 Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Tested-by: Christoph Paasch Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit a5cb752b125766524c921faab1a45cc96065b0a7 Author: Paolo Abeni Date: Tue Apr 11 22:42:09 2023 +0200 mptcp: use mptcp_schedule_work instead of open-coding it Beyond reducing code duplication this also avoids scheduling the mptcp_worker on a closed socket on some edge scenarios. The addressed issue is actually older than the blamed commit below, but this fix needs it as a pre-requisite. Fixes: ba8f48f7a4d7 ("mptcp: introduce mptcp_schedule_work") 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 f8160d3b35fc94491bb0cb974dbda310ef96c0e2 Author: Gregor Herburger Date: Thu Apr 13 11:37:37 2023 +0200 i2c: ocores: generate stop condition after timeout in polling mode In polling mode, no stop condition is generated after a timeout. This causes SCL to remain low and thereby block the bus. If this happens during a transfer it can cause slaves to misinterpret the subsequent transfer and return wrong values. To solve this, pass the ETIMEDOUT error up from ocores_process_polling() instead of setting STATE_ERROR directly. The caller is adjusted to call ocores_process_timeout() on error both in polling and in IRQ mode, which will set STATE_ERROR and generate a stop condition. Fixes: 69c8c0c0efa8 ("i2c: ocores: add polling interface") Signed-off-by: Gregor Herburger Signed-off-by: Matthias Schiffer Acked-by: Peter Korsgaard Reviewed-by: Andrew Lunn Reviewed-by: Federico Vaga Signed-off-by: Wolfram Sang commit aca3b0fa3d04b40c96934d86cc224cccfa7ea8e0 Author: Saravanan Vajravel Date: Fri Mar 31 23:34:24 2023 -0700 RDMA/core: Fix GID entry ref leak when create_ah fails If AH create request fails, release sgid_attr to avoid GID entry referrence leak reported while releasing GID table Fixes: 1a1f460ff151 ("RDMA: Hold the sgid_attr inside the struct ib_ah/qp") Link: https://lore.kernel.org/r/20230401063424.342204-1-saravanan.vajravel@broadcom.com Reviewed-by: Selvin Xavier Signed-off-by: Saravanan Vajravel Signed-off-by: Jason Gunthorpe commit c8bc34660628769f71e8b230144a2a4d86ab0f91 Author: David Howells Date: Thu Apr 13 14:51:56 2023 +0100 sunrpc: Fix RFC6803 encryption test The usage_data[] array in rfc6803_encrypt_case() is uninitialised, so clear it as it may cause the tests to fail otherwise. Fixes: b958cff6b27b ("SUNRPC: Add encryption KUnit tests for the RFC 6803 encryption types") Link: https://lore.kernel.org/r/380323.1681314997@warthog.procyon.org.uk/ Signed-off-by: David Howells cc: Chuck Lever cc: Scott Mayhew cc: Herbert Xu cc: linux-nfs@vger.kernel.org cc: linux-crypto@vger.kernel.org Signed-off-by: Chuck Lever commit 775d3c514c5b2763a50ab7839026d7561795924d Author: Matija Glavinic Pecotic Date: Thu Apr 6 08:26:52 2023 +0200 x86/rtc: Remove __init for runtime functions set_rtc_noop(), get_rtc_noop() are after booting, therefore their __init annotation is wrong. A crash was observed on an x86 platform where CMOS RTC is unused and disabled via device tree. set_rtc_noop() was invoked from ntp: sync_hw_clock(), although CONFIG_RTC_SYSTOHC=n, however sync_cmos_clock() doesn't honour that. Workqueue: events_power_efficient sync_hw_clock RIP: 0010:set_rtc_noop Call Trace: update_persistent_clock64 sync_hw_clock Fix this by dropping the __init annotation from set/get_rtc_noop(). Fixes: c311ed6183f4 ("x86/init: Allow DT configured systems to disable RTC at boot time") Signed-off-by: Matija Glavinic Pecotic Signed-off-by: Thomas Gleixner Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/59f7ceb1-446b-1d3d-0bc8-1f0ee94b1e18@nokia.com commit a552b73f36cb3e59fd2015307fde8ff53874d1af Merge: 62b92afd6e253 6b8446859c971 Author: Daniel Vetter Date: Thu Apr 13 14:24:44 2023 +0200 Merge tag 'drm-intel-fixes-2023-04-13' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v6.3-rc7: - Fix dual link DSI for TGL+ Signed-off-by: Daniel Vetter From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/877cugckzu.fsf@intel.com commit 5b7be2d4fd6eb8bec14c2de96c664e07c7d0bd82 Author: Vladimir Oltean Date: Tue Apr 11 22:26:45 2023 +0300 net: enetc: workaround for unresponsive pMAC after receiving express traffic I have observed an issue where the RX direction of the LS1028A ENETC pMAC seems unresponsive. The minimal procedure to reproduce the issue is: 1. Connect ENETC port 0 with a loopback RJ45 cable to one of the Felix switch ports (0). 2. Bring the ports up (MAC Merge layer is not enabled on either end). 3. Send a large quantity of unidirectional (express) traffic from Felix to ENETC. I tried altering frame size and frame count, and it doesn't appear to be specific to either of them, but rather, to the quantity of octets received. Lowering the frame count, the minimum quantity of packets to reproduce relatively consistently seems to be around 37000 frames at 1514 octets (w/o FCS) each. 4. Using ethtool --set-mm, enable the pMAC in the Felix and in the ENETC ports, in both RX and TX directions, and with verification on both ends. 5. Wait for verification to complete on both sides. 6. Configure a traffic class as preemptible on both ends. 7. Send some packets again. The issue is at step 5, where the verification process of ENETC ends (meaning that Felix responds with an SMD-R and ENETC sees the response), but the verification process of Felix never ends (it remains VERIFYING). If step 3 is skipped or if ENETC receives less traffic than approximately that threshold, the test runs all the way through (verification succeeds on both ends, preemptible traffic passes fine). If, between step 4 and 5, the step below is also introduced: 4.1. Disable and re-enable PM0_COMMAND_CONFIG bit RX_EN then again, the sequence of steps runs all the way through, and verification succeeds, even if there was the previous RX traffic injected into ENETC. Traffic sent *by* the ENETC port prior to enabling the MAC Merge layer does not seem to influence the verification result, only received traffic does. The LS1028A manual does not mention any relationship between PM0_COMMAND_CONFIG and MMCSR, and the hardware people don't seem to know for now either. The bit that is toggled to work around the issue is also toggled by enetc_mac_enable(), called from phylink's mac_link_down() and mac_link_up() methods - which is how the workaround was found: verification would work after a link down/up. Fixes: c7b9e8086902 ("net: enetc: add support for MAC Merge layer") Signed-off-by: Vladimir Oltean Reviewed-by: Jacob Keller Link: https://lore.kernel.org/r/20230411192645.1896048-1-vladimir.oltean@nxp.com Signed-off-by: Paolo Abeni commit 32832a2caf82663870126c5186cf8f86c8b2a649 Author: Xin Long Date: Mon Apr 10 15:43:30 2023 -0400 sctp: fix a potential overflow in sctp_ifwdtsn_skip Currently, when traversing ifwdtsn skips with _sctp_walk_ifwdtsn, it only checks the pos against the end of the chunk. However, the data left for the last pos may be < sizeof(struct sctp_ifwdtsn_skip), and dereference it as struct sctp_ifwdtsn_skip may cause coverflow. This patch fixes it by checking the pos against "the end of the chunk - sizeof(struct sctp_ifwdtsn_skip)" in sctp_ifwdtsn_skip, similar to sctp_fwdtsn_skip. Fixes: 0fc2ea922c8a ("sctp: implement validate_ftsn for sctp_stream_interleave") Signed-off-by: Xin Long Link: https://lore.kernel.org/r/2a71bffcd80b4f2c61fac6d344bb2f11c8fd74f7.1681155810.git.lucien.xin@gmail.com Signed-off-by: Paolo Abeni commit 62b92afd6e253fab3b4cf1bbb614e270a848e98f Merge: 09a9639e56c01 b9a24d8bd51e2 Author: Daniel Vetter Date: Thu Apr 13 09:57:19 2023 +0200 Merge tag 'amd-drm-fixes-6.3-2023-04-12' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.3-2023-04-12: amdgpu: - SMU13 fixes - DP MST fix Signed-off-by: Daniel Vetter From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230412215637.7881-1-alexander.deucher@amd.com commit 6417070918de3bcdbe0646e7256dae58fd8083ba Author: Ziyang Xuan Date: Mon Apr 10 09:23:52 2023 +0800 net: qrtr: Fix an uninit variable access bug in qrtr_tx_resume() Syzbot reported a bug as following: ===================================================== BUG: KMSAN: uninit-value in qrtr_tx_resume+0x185/0x1f0 net/qrtr/af_qrtr.c:230 qrtr_tx_resume+0x185/0x1f0 net/qrtr/af_qrtr.c:230 qrtr_endpoint_post+0xf85/0x11b0 net/qrtr/af_qrtr.c:519 qrtr_tun_write_iter+0x270/0x400 net/qrtr/tun.c:108 call_write_iter include/linux/fs.h:2189 [inline] aio_write+0x63a/0x950 fs/aio.c:1600 io_submit_one+0x1d1c/0x3bf0 fs/aio.c:2019 __do_sys_io_submit fs/aio.c:2078 [inline] __se_sys_io_submit+0x293/0x770 fs/aio.c:2048 __x64_sys_io_submit+0x92/0xd0 fs/aio.c:2048 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 Uninit was created at: slab_post_alloc_hook mm/slab.h:766 [inline] slab_alloc_node mm/slub.c:3452 [inline] __kmem_cache_alloc_node+0x71f/0xce0 mm/slub.c:3491 __do_kmalloc_node mm/slab_common.c:967 [inline] __kmalloc_node_track_caller+0x114/0x3b0 mm/slab_common.c:988 kmalloc_reserve net/core/skbuff.c:492 [inline] __alloc_skb+0x3af/0x8f0 net/core/skbuff.c:565 __netdev_alloc_skb+0x120/0x7d0 net/core/skbuff.c:630 qrtr_endpoint_post+0xbd/0x11b0 net/qrtr/af_qrtr.c:446 qrtr_tun_write_iter+0x270/0x400 net/qrtr/tun.c:108 call_write_iter include/linux/fs.h:2189 [inline] aio_write+0x63a/0x950 fs/aio.c:1600 io_submit_one+0x1d1c/0x3bf0 fs/aio.c:2019 __do_sys_io_submit fs/aio.c:2078 [inline] __se_sys_io_submit+0x293/0x770 fs/aio.c:2048 __x64_sys_io_submit+0x92/0xd0 fs/aio.c:2048 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 It is because that skb->len requires at least sizeof(struct qrtr_ctrl_pkt) in qrtr_tx_resume(). And skb->len equals to size in qrtr_endpoint_post(). But size is less than sizeof(struct qrtr_ctrl_pkt) when qrtr_cb->type equals to QRTR_TYPE_RESUME_TX in qrtr_endpoint_post() under the syzbot scenario. This triggers the uninit variable access bug. Add size check when qrtr_cb->type equals to QRTR_TYPE_RESUME_TX in qrtr_endpoint_post() to fix the bug. Fixes: 5fdeb0d372ab ("net: qrtr: Implement outgoing flow control") Reported-by: syzbot+4436c9630a45820fda76@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=c14607f0963d27d5a3d5f4c8639b500909e43540 Suggested-by: Manivannan Sadhasivam Signed-off-by: Ziyang Xuan Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230410012352.3997823-1-william.xuanziyang@huawei.com Signed-off-by: Paolo Abeni commit 8eda19cd59cedbfe4ec11aea4bcecabe4c98e9e4 Author: Stefan Binding Date: Wed Apr 12 17:05:31 2023 +0100 ALSA: hda/realtek: Add quirks for Lenovo Z13/Z16 Gen2 These Lenovo laptops use Realtek HDA codec combined with 2xCS35L41 Amplifiers using I2C with External Boost. Signed-off-by: Stefan Binding Cc: Link: https://lore.kernel.org/r/20230412160531.182007-1-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 59d3efd27c11c59b32291e5ebc307bed2edb65ee Author: Martin Willi Date: Tue Apr 11 09:43:19 2023 +0200 rtnetlink: Restore RTM_NEW/DELLINK notification behavior The commits referenced below allows userspace to use the NLM_F_ECHO flag for RTM_NEW/DELLINK operations to receive unicast notifications for the affected link. Prior to these changes, applications may have relied on multicast notifications to learn the same information without specifying the NLM_F_ECHO flag. For such applications, the mentioned commits changed the behavior for requests not using NLM_F_ECHO. Multicast notifications are still received, but now use the portid of the requester and the sequence number of the request instead of zero values used previously. For the application, this message may be unexpected and likely handled as a response to the NLM_F_ACKed request, especially if it uses the same socket to handle requests and notifications. To fix existing applications relying on the old notification behavior, set the portid and sequence number in the notification only if the request included the NLM_F_ECHO flag. This restores the old behavior for applications not using it, but allows unicasted notifications for others. Fixes: f3a63cce1b4f ("rtnetlink: Honour NLM_F_ECHO flag in rtnl_delete_link") Fixes: d88e136cab37 ("rtnetlink: Honour NLM_F_ECHO flag in rtnl_newlink_create") Signed-off-by: Martin Willi Acked-by: Guillaume Nault Acked-by: Hangbin Liu Link: https://lore.kernel.org/r/20230411074319.24133-1-martin@strongswan.org Signed-off-by: Jakub Kicinski commit de4664485abbc0529b1eec44d0061bbfe58a28fb Merge: b05e0f5e74e48 38518593ec55e Author: Linus Torvalds Date: Wed Apr 12 17:26:00 2023 -0700 Merge tag 'for-linus-2023041201' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: - kernel panic fix for intel-ish-hid driver (Tanu Malhotra) - buffer overflow fix in hid-sensor-custom driver (Todd Brandt) - two device specific quirks (Alessandro Manca, Philippe Troin) * tag 'for-linus-2023041201' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: intel-ish-hid: Fix kernel panic during warm reset HID: hid-sensor-custom: Fix buffer overrun in device name HID: topre: Add support for 87 keys Realforce R2 HID: add HP 13t-aw100 & 14t-ea100 digitizer battery quirks commit b05e0f5e74e48a3e39066794fc1d7df37507953d Merge: 0bcc402555040 d9503be5a100c Author: Linus Torvalds Date: Wed Apr 12 17:20:55 2023 -0700 Merge tag 'dmaengine-fix-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine fixes from Vinod Koul: "A couple of fixes in apple driver, core and kernedoc fix for dmaengine subsystem: - apple admac driver fixes for current_tx, src_addr_widths and global' interrupt flags handling - xdma kerneldoc fix - core fix for use of devm_add_action_or_reset" * tag 'dmaengine-fix-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: dmaengine: apple-admac: Fix 'current_tx' not getting freed dmaengine: apple-admac: Set src_addr_widths capability dmaengine: apple-admac: Handle 'global' interrupt flags dmaengine: xilinx: xdma: Fix some kernel-doc comments dmaengine: Actually use devm_add_action_or_reset() commit b9a24d8bd51e2db425602fa82d7f4c06aa3db852 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 Cc: stable@vger.kernel.org # 6.1.x commit 85e0689eb6b10cd3b2fb455d1b3f4d4d0b13ff78 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 Cc: stable@vger.kernel.org # 6.1.x commit f06b8887e3ef4f50098d3a949aef392c529c831a 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 Cc: stable@vger.kernel.org # 6.1.x commit b8ca445f550a9a079134f836466ddda3bfad6108 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 7e27cb6ad4d85fc8bac2a2a896da62ef66b8598e Author: Waiman Long Date: Tue Apr 11 09:36:00 2023 -0400 cgroup/cpuset: Make cpuset_attach_task() skip subpartitions CPUs for top_cpuset It is found that attaching a task to the top_cpuset does not currently ignore CPUs allocated to subpartitions in cpuset_attach_task(). So the code is changed to fix that. Signed-off-by: Waiman Long Reviewed-by: Michal Koutný Signed-off-by: Tejun Heo commit eee87853794187f6adbe19533ed79c8b44b36a91 Author: Waiman Long Date: Tue Apr 11 09:35:59 2023 -0400 cgroup/cpuset: Add cpuset_can_fork() and cpuset_cancel_fork() methods In the case of CLONE_INTO_CGROUP, not all cpusets are ready to accept new tasks. It is too late to check that in cpuset_fork(). So we need to add the cpuset_can_fork() and cpuset_cancel_fork() methods to pre-check it before we can allow attachment to a different cpuset. We also need to set the attach_in_progress flag to alert other code that a new task is going to be added to the cpuset. Fixes: ef2c41cf38a7 ("clone3: allow spawning processes into cgroups") Suggested-by: Michal Koutný Signed-off-by: Waiman Long Cc: stable@vger.kernel.org # v5.7+ Signed-off-by: Tejun Heo commit 42a11bf5c5436e91b040aeb04063be1710bb9f9c Author: Waiman Long Date: Tue Apr 11 09:35:58 2023 -0400 cgroup/cpuset: Make cpuset_fork() handle CLONE_INTO_CGROUP properly By default, the clone(2) syscall spawn a child process into the same cgroup as its parent. With the use of the CLONE_INTO_CGROUP flag introduced by commit ef2c41cf38a7 ("clone3: allow spawning processes into cgroups"), the child will be spawned into a different cgroup which is somewhat similar to writing the child's tid into "cgroup.threads". The current cpuset_fork() method does not properly handle the CLONE_INTO_CGROUP case where the cpuset of the child may be different from that of its parent. Update the cpuset_fork() method to treat the CLONE_INTO_CGROUP case similar to cpuset_attach(). Since the newly cloned task has not been running yet, its actual memory usage isn't known. So it is not necessary to make change to mm in cpuset_fork(). Fixes: ef2c41cf38a7 ("clone3: allow spawning processes into cgroups") Reported-by: Giuseppe Scrivano Signed-off-by: Waiman Long Cc: stable@vger.kernel.org # v5.7+ Signed-off-by: Tejun Heo commit ba9182a89626d5f83c2ee4594f55cb9c1e60f0e2 Author: Waiman Long Date: Tue Apr 11 09:35:57 2023 -0400 cgroup/cpuset: Wake up cpuset_attach_wq tasks in cpuset_cancel_attach() After a successful cpuset_can_attach() call which increments the attach_in_progress flag, either cpuset_cancel_attach() or cpuset_attach() will be called later. In cpuset_attach(), tasks in cpuset_attach_wq, if present, will be woken up at the end. That is not the case in cpuset_cancel_attach(). So missed wakeup is possible if the attach operation is somehow cancelled. Fix that by doing the wakeup in cpuset_cancel_attach() as well. Fixes: e44193d39e8d ("cpuset: let hotplug propagation work wait for task attaching") Signed-off-by: Waiman Long Reviewed-by: Michal Koutný Cc: stable@vger.kernel.org # v3.11+ Signed-off-by: Tejun Heo commit 57dcd64c7e036299ef526b400a8d12b8a2352f26 Author: Tetsuo Handa Date: Wed Apr 5 22:15:32 2023 +0900 cgroup,freezer: hold cpu_hotplug_lock before freezer_mutex syzbot is reporting circular locking dependency between cpu_hotplug_lock and freezer_mutex, for commit f5d39b020809 ("freezer,sched: Rewrite core freezer logic") replaced atomic_inc() in freezer_apply_state() with static_branch_inc() which holds cpu_hotplug_lock. cpu_hotplug_lock => cgroup_threadgroup_rwsem => freezer_mutex cgroup_file_write() { cgroup_procs_write() { __cgroup_procs_write() { cgroup_procs_write_start() { cgroup_attach_lock() { cpus_read_lock() { percpu_down_read(&cpu_hotplug_lock); } percpu_down_write(&cgroup_threadgroup_rwsem); } } cgroup_attach_task() { cgroup_migrate() { cgroup_migrate_execute() { freezer_attach() { mutex_lock(&freezer_mutex); (...snipped...) } } } } (...snipped...) } } } freezer_mutex => cpu_hotplug_lock cgroup_file_write() { freezer_write() { freezer_change_state() { mutex_lock(&freezer_mutex); freezer_apply_state() { static_branch_inc(&freezer_active) { static_key_slow_inc() { cpus_read_lock(); static_key_slow_inc_cpuslocked(); cpus_read_unlock(); } } } mutex_unlock(&freezer_mutex); } } } Swap locking order by moving cpus_read_lock() in freezer_apply_state() to before mutex_lock(&freezer_mutex) in freezer_change_state(). Reported-by: syzbot Link: https://syzkaller.appspot.com/bug?extid=c39682e86c9d84152f93 Suggested-by: Hillf Danton Fixes: f5d39b020809 ("freezer,sched: Rewrite core freezer logic") Signed-off-by: Tetsuo Handa Acked-by: Peter Zijlstra (Intel) Reviewed-by: Mukesh Ojha Signed-off-by: Tejun Heo commit 0bcc4025550403ae28d2984bddacafbca0a2f112 Author: David Howells Date: Wed Apr 12 13:18:57 2023 +0100 netfs: Fix netfs_extract_iter_to_sg() for ITER_UBUF/IOVEC Fix netfs_extract_iter_to_sg() for ITER_UBUF and ITER_IOVEC to set the size of the page to the part of the page extracted, not the remaining amount of data in the extracted page array at that point. This doesn't yet affect anything as cifs, the only current user, only passes in non-user-backed iterators. Fixes: 018584697533 ("netfs: Add a function to extract an iterator into a scatterlist") Signed-off-by: David Howells Reviewed-by: Jeff Layton Cc: Steve French Cc: Shyam Prasad N Cc: Rohith Surabattula Signed-off-by: Linus Torvalds commit 91dcf1e8068e9a8823e419a7a34ff4341275fb70 Author: Vincent Guittot Date: Tue Apr 11 11:06:11 2023 +0200 sched/fair: Fix imbalance overflow When local group is fully busy but its average load is above system load, computing the imbalance will overflow and local group is not the best target for pulling this load. Fixes: 0b0695f2b34a ("sched/fair: Rework load_balance()") Reported-by: Tingjia Cao Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Tested-by: Tingjia Cao Link: https://lore.kernel.org/lkml/CABcWv9_DAhVBOq2=W=2ypKE9dKM5s2DvoV8-U0+GDwwuKZ89jQ@mail.gmail.com/T/ commit 5603effb8295ada8419408d038a34ca89d658229 Merge: b89ce1177d42d 09a9639e56c01 Author: Maarten Lankhorst Date: Wed Apr 12 12:01:32 2023 +0200 Merge remote-tracking branch 'drm/drm-fixes' into drm-misc-fixes We were stuck on rc2, should at least attempt to track drm-fixes slightly. Signed-off-by: Maarten Lankhorst commit 136f36c74b0345d5d0087d4094894a006470bbd5 Author: Rob Herring Date: Mon Apr 10 18:27:19 2023 -0500 net: ti/cpsw: Add explicit platform_device.h and of_platform.h includes TI CPSW 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. of_platform.h also implicitly includes platform_device.h, so add an explicit include for it, too. Signed-off-by: Rob Herring Reviewed-by: Jesse Brandeburg Signed-off-by: David S. Miller commit a56ef25619e079bd7d744636cf18d054d1e91982 Author: Harshit Mogalapalli Date: Sat Apr 8 12:43:21 2023 -0700 net: wwan: iosm: Fix error handling path in ipc_pcie_probe() Smatch reports: drivers/net/wwan/iosm/iosm_ipc_pcie.c:298 ipc_pcie_probe() warn: missing unwind goto? When dma_set_mask fails it directly returns without disabling pci device and freeing ipc_pcie. Fix this my calling a correct goto label As dma_set_mask returns either 0 or -EIO, we can use a goto label, as it finally returns -EIO. Add a set_mask_fail goto label which stands consistent with other goto labels in this function.. Fixes: 035e3befc191 ("net: wwan: iosm: fix driver not working with INTEL_IOMMU disabled") Reviewed-by: Simon Horman Signed-off-by: Harshit Mogalapalli Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 9744d2bf19762703704ecba885b7ac282c02eacf Author: Kuniyuki Iwashima Date: Sat Apr 8 11:49:43 2023 -0700 smc: Fix use-after-free in tcp_write_timer_handler(). With Eric's ref tracker, syzbot finally found a repro for use-after-free in tcp_write_timer_handler() by kernel TCP sockets. [0] If SMC creates a kernel socket in __smc_create(), the kernel socket is supposed to be freed in smc_clcsock_release() by calling sock_release() when we close() the parent SMC socket. However, at the end of smc_clcsock_release(), the kernel socket's sk_state might not be TCP_CLOSE. This means that we have not called inet_csk_destroy_sock() in __tcp_close() and have not stopped the TCP timers. The kernel socket's TCP timers can be fired later, so we need to hold a refcnt for net as we do for MPTCP subflows in mptcp_subflow_create_socket(). [0]: leaked reference. sk_alloc (./include/net/net_namespace.h:335 net/core/sock.c:2108) inet_create (net/ipv4/af_inet.c:319 net/ipv4/af_inet.c:244) __sock_create (net/socket.c:1546) smc_create (net/smc/af_smc.c:3269 net/smc/af_smc.c:3284) __sock_create (net/socket.c:1546) __sys_socket (net/socket.c:1634 net/socket.c:1618 net/socket.c:1661) __x64_sys_socket (net/socket.c:1672) 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) ================================================================== BUG: KASAN: slab-use-after-free in tcp_write_timer_handler (net/ipv4/tcp_timer.c:378 net/ipv4/tcp_timer.c:624 net/ipv4/tcp_timer.c:594) Read of size 1 at addr ffff888052b65e0d by task syzrepro/18091 CPU: 0 PID: 18091 Comm: syzrepro Tainted: G W 6.3.0-rc4-01174-gb5d54eb5899a #7 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-1.amzn2022.0.1 04/01/2014 Call Trace: dump_stack_lvl (lib/dump_stack.c:107) print_report (mm/kasan/report.c:320 mm/kasan/report.c:430) kasan_report (mm/kasan/report.c:538) tcp_write_timer_handler (net/ipv4/tcp_timer.c:378 net/ipv4/tcp_timer.c:624 net/ipv4/tcp_timer.c:594) tcp_write_timer (./include/linux/spinlock.h:390 net/ipv4/tcp_timer.c:643) call_timer_fn (./arch/x86/include/asm/jump_label.h:27 ./include/linux/jump_label.h:207 ./include/trace/events/timer.h:127 kernel/time/timer.c:1701) __run_timers.part.0 (kernel/time/timer.c:1752 kernel/time/timer.c:2022) run_timer_softirq (kernel/time/timer.c:2037) __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) __irq_exit_rcu (kernel/softirq.c:445 kernel/softirq.c:650) irq_exit_rcu (kernel/softirq.c:664) sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1107 (discriminator 14)) Fixes: ac7138746e14 ("smc: establish new socket family") Reported-by: syzbot+7e1e1bdb852961150198@syzkaller.appspotmail.com Link: https://lore.kernel.org/netdev/000000000000a3f51805f8bcc43a@google.com/ Signed-off-by: Kuniyuki Iwashima Reviewed-by: Tony Lu Signed-off-by: David S. Miller commit 7573099e10ca69c3be33995c1fcd0d241226816d Author: Denis Plotnikov Date: Fri Apr 7 10:18:49 2023 +0300 qlcnic: check pci_reset_function result Static code analyzer complains to unchecked return value. The result of pci_reset_function() is unchecked. Despite, the issue is on the FLR supported code path and in that case reset can be done with pcie_flr(), the patch uses less invasive approach by adding the result check of pci_reset_function(). Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 7e2cf4feba05 ("qlcnic: change driver hardware interface mechanism") Signed-off-by: Denis Plotnikov Reviewed-by: Simon Horman Reviewed-by: Bjorn Helgaas Signed-off-by: David S. Miller commit adacf21f1c9a65e299a103f78b3e6dd71c5ec99b Merge: 160c13175e392 9c85b7fa12ef2 Author: Jakub Kicinski Date: Tue Apr 11 21:37:53 2023 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== iavf: fix racing in VLANs Ahmed Zaki says: This patchset mainly fixes a racing issue in the iavf where the number of VLANs in the vlan_filter_list might be more than the PF limit. To fix that, we get rid of the cvlans and svlans bitmaps and keep all the required info in the list. The second patch adds two new states that are needed so that we keep the VLAN info while the interface goes DOWN: -- DISABLE (notify PF, but keep the filter in the list) -- INACTIVE (dev is DOWN, filter is removed from PF) Finally, the current code keeps each state in a separate bit field, which is error prone. The first patch refactors that by replacing all bits with a single enum. The changes are minimal where each bit change is replaced with the new state value. * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: iavf: remove active_cvlans and active_svlans bitmaps iavf: refactor VLAN filter states ==================== Link: https://lore.kernel.org/r/20230407210730.3046149-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 160c13175e392961fd18a9fdb89e5425b3ac7099 Merge: a4506722dc39c a2a9339e1c9de Author: Jakub Kicinski Date: Tue Apr 11 21:18:23 2023 -0700 Merge tag 'for-net-2023-04-10' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - Fix not setting Dath Path for broadcast sink - Fix not cleaning up on LE Connection failure - SCO: Fix possible circular locking dependency - L2CAP: Fix use-after-free in l2cap_disconnect_{req,rsp} - Fix race condition in hidp_session_thread - btbcm: Fix logic error in forming the board name - btbcm: Fix use after free in btsdio_remove * tag 'for-net-2023-04-10' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: L2CAP: Fix use-after-free in l2cap_disconnect_{req,rsp} Bluetooth: Set ISO Data Path on broadcast sink Bluetooth: hci_conn: Fix possible UAF Bluetooth: SCO: Fix possible circular locking dependency sco_sock_getsockopt Bluetooth: SCO: Fix possible circular locking dependency on sco_connect_cfm bluetooth: btbcm: Fix logic error in forming the board name. Bluetooth: btsdio: fix use after free bug in btsdio_remove due to race condition Bluetooth: Fix race condition in hidp_session_thread Bluetooth: Fix printing errors if LE Connection times out Bluetooth: hci_conn: Fix not cleaning up on LE Connection failure ==================== Link: https://lore.kernel.org/r/20230410172718.4067798-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit c8e22b7a1694bb8d025ea636816472739d859145 Author: Jiri Kosina Date: Tue Apr 4 21:23:42 2023 +0200 scsi: ses: Handle enclosure with just a primary component gracefully This reverts commit 3fe97ff3d949 ("scsi: ses: Don't attach if enclosure has no components") and introduces proper handling of case where there are no detected secondary components, but primary component (enumerated in num_enclosures) does exist. That fix was originally proposed by Ding Hui . Completely ignoring devices that have one primary enclosure and no secondary one results in ses_intf_add() bailing completely scsi 2:0:0:254: enclosure has no enumerated components scsi 2:0:0:254: Failed to bind enclosure -12ven in valid configurations such even on valid configurations with 1 primary and 0 secondary enclosures as below: # sg_ses /dev/sg0 3PARdata SES 3321 Supported diagnostic pages: Supported Diagnostic Pages [sdp] [0x0] Configuration (SES) [cf] [0x1] Short Enclosure Status (SES) [ses] [0x8] # sg_ses -p cf /dev/sg0 3PARdata SES 3321 Configuration diagnostic page: number of secondary subenclosures: 0 generation code: 0x0 enclosure descriptor list Subenclosure identifier: 0 [primary] relative ES process id: 0, number of ES processes: 1 number of type descriptor headers: 1 enclosure logical identifier (hex): 20000002ac02068d enclosure vendor: 3PARdata product: VV rev: 3321 type descriptor header and text list Element type: Unspecified, subenclosure id: 0 number of possible elements: 1 The changelog for the original fix follows ===== We can get a crash when disconnecting the iSCSI session, the call trace like this: [ffff00002a00fb70] kfree at ffff00000830e224 [ffff00002a00fba0] ses_intf_remove at ffff000001f200e4 [ffff00002a00fbd0] device_del at ffff0000086b6a98 [ffff00002a00fc50] device_unregister at ffff0000086b6d58 [ffff00002a00fc70] __scsi_remove_device at ffff00000870608c [ffff00002a00fca0] scsi_remove_device at ffff000008706134 [ffff00002a00fcc0] __scsi_remove_target at ffff0000087062e4 [ffff00002a00fd10] scsi_remove_target at ffff0000087064c0 [ffff00002a00fd70] __iscsi_unbind_session at ffff000001c872c4 [ffff00002a00fdb0] process_one_work at ffff00000810f35c [ffff00002a00fe00] worker_thread at ffff00000810f648 [ffff00002a00fe70] kthread at ffff000008116e98 In ses_intf_add, components count could be 0, and kcalloc 0 size scomp, but not saved in edev->component[i].scratch In this situation, edev->component[0].scratch is an invalid pointer, when kfree it in ses_intf_remove_enclosure, a crash like above would happen The call trace also could be other random cases when kfree cannot catch the invalid pointer We should not use edev->component[] array when the components count is 0 We also need check index when use edev->component[] array in ses_enclosure_data_process ===== Reported-by: Michal Kolar Originally-by: Ding Hui Cc: stable@vger.kernel.org Fixes: 3fe97ff3d949 ("scsi: ses: Don't attach if enclosure has no components") Signed-off-by: Jiri Kosina Link: https://lore.kernel.org/r/nycvar.YFH.7.76.2304042122270.29760@cbobk.fhfr.pm Tested-by: Michal Kolar Signed-off-by: Martin K. Petersen commit 534e465845ebfb4a97eb5459d3931a0b35e3b9a5 Author: Kornel Dulęba Date: Tue Apr 11 13:49:32 2023 +0000 Revert "pinctrl: amd: Disable and mask interrupts on resume" This reverts commit b26cd9325be4c1fcd331b77f10acb627c560d4d7. This patch introduces a regression on Lenovo Z13, which can't wake from the lid with it applied; and some unspecified AMD based Dell platforms are unable to wake from hitting the power button Signed-off-by: Kornel Dulęba Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20230411134932.292287-1-korneld@chromium.org Signed-off-by: Linus Walleij commit 8d736482749f6d350892ef83a7a11d43cd49981e Author: Mathis Salmen Date: Thu Apr 6 12:11:31 2023 +0200 riscv: add icache flush for nommu sigreturn trampoline In a NOMMU kernel, sigreturn trampolines are generated on the user stack by setup_rt_frame. Currently, these trampolines are not instruction fenced, thus their visibility to ifetch is not guaranteed. This patch adds a flush_icache_range in setup_rt_frame to fix this problem. Signed-off-by: Mathis Salmen Fixes: 6bd33e1ece52 ("riscv: add nommu support") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230406101130.82304-1-mathis.salmen@matsal.de Signed-off-by: Palmer Dabbelt commit 1a50d9403fb90cbe4dea0ec9fd0351d2ecbd8924 Author: Geert Uytterhoeven Date: Thu Mar 30 15:26:13 2023 +0200 treewide: Fix probing of devices in DT overlays When loading a DT overlay that creates a device, the device is not probed, unless the DT overlay is unloaded and reloaded again. After the recent refactoring to improve fw_devlink, it no longer depends on the "compatible" property to identify which device tree nodes will become struct devices. fw_devlink now picks up dangling consumers (consumers pointing to descendent device tree nodes of a device that aren't converted to child devices) when a device is successfully bound to a driver. See __fw_devlink_pickup_dangling_consumers(). However, during DT overlay, a device's device tree node can have sub-nodes added/removed without unbinding/rebinding the driver. This difference in behavior between the normal device instantiation and probing flow vs. the DT overlay flow has a bunch of implications that are pointed out elsewhere[1]. One of them is that the fw_devlink logic to pick up dangling consumers is never exercised. This patch solves the fw_devlink issue by marking all DT nodes added by DT overlays with FWNODE_FLAG_NOT_DEVICE (fwnode that won't become device), and by clearing the flag when a struct device is actually created for the DT node. This way, fw_devlink knows not to have consumers waiting on these newly added DT nodes, and to propagate the dependency to an ancestor DT node that has the corresponding struct device. Based on a patch by Saravana Kannan, which covered only platform and spi devices. [1] https://lore.kernel.org/r/CAGETcx_bkuFaLCiPrAWCPQz+w79ccDp6=9e881qmK=vx3hBMyg@mail.gmail.com Fixes: 4a032827daa89350 ("of: property: Simplify of_link_to_phandle()") Link: https://lore.kernel.org/r/CAGETcx_+rhHvaC_HJXGrr5_WAd2+k5f=rWYnkCZ6z5bGX-wj4w@mail.gmail.com Signed-off-by: Geert Uytterhoeven Acked-by: Mark Brown Acked-by: Wolfram Sang # for I2C Acked-by: Shawn Guo Acked-by: Saravana Kannan Tested-by: Ivan Bornyakov Link: https://lore.kernel.org/r/e1fa546682ea4c8474ff997ab6244c5e11b6f8bc.1680182615.git.geert+renesas@glider.be Signed-off-by: Rob Herring commit e87245045b2b23e6dae3406c30b11cd8429eb061 Author: Liu Peibao Date: Sat Apr 1 17:13:04 2023 +0800 dt-bindings: interrupt-controller: loongarch: Fix mismatched compatible The "compatible" doesn't match what the kernel is using. Fix it as kernel using. Fixes: 6b2748ada244 ("dt-bindings: interrupt-controller: add yaml for LoongArch CPU interrupt controller") Reported-by: Rob Herring Link: https://lore.kernel.org/all/20221208020954.GA3368836-robh@kernel.org/ Acked-by: Krzysztof Kozlowski Signed-off-by: Liu Peibao Link: https://lore.kernel.org/r/20230401091304.12633-1-liupeibao@loongson.cn [robh: Rename file to match compatible, fix subject typo] Signed-off-by: Rob Herring commit 2ce987d7eeb168b749494694ae3666de87fc356e Author: William Breathitt Gray Date: Mon Apr 3 13:53:14 2023 -0400 gpio: 104-idi-48: Enable use_raw_spinlock for idi48_regmap_config The idi48 regmap can be used in an interrupt context by regmap-irq. To prevent a deadlock, enable use_raw_spinlock for idi48_regmap_config. Fixes: e28432a77365 ("gpio: 104-idi-48: Migrate to the regmap-irq API") Signed-off-by: William Breathitt Gray Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 01407940f9cd3bd87f3b707f7175f6f41ac1238b Author: William Breathitt Gray Date: Mon Apr 3 13:53:13 2023 -0400 gpio: 104-dio-48e: Enable use_raw_spinlock for dio48e_regmap_config The dio48e regmap can be used in an interrupt context by regmap-irq. To prevent a deadlock, enable use_raw_spinlock for dio48e_regmap_config. Fixes: 2f7e845f512f ("gpio: 104-dio-48e: Migrate to the regmap-irq API") Signed-off-by: William Breathitt Gray Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit e62252bc55b6d4eddc6c2bdbf95a448180d6a08d Merge: 2c40519251d61 30ba2d09edb5e Author: Linus Torvalds Date: Tue Apr 11 11:59:49 2023 -0700 Merge tag 'pci-v6.3-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull pci fixes from Bjorn Helgaas: - Provide pci_msix_can_alloc_dyn() stub when CONFIG_PCI_MSI unset to avoid build errors (Reinette Chatre) - Quirk AMD XHCI controller that loses MSI-X state in D3hot to avoid broken USB after hotplug or suspend/resume (Basavaraj Natikar) - Fix use-after-free in pci_bus_release_domain_nr() (Rob Herring) * tag 'pci-v6.3-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: PCI: Fix use-after-free in pci_bus_release_domain_nr() x86/PCI: Add quirk for AMD XHCI controller that loses MSI-X state in D3hot PCI/MSI: Provide missing stub for pci_msix_can_alloc_dyn() commit 05cda427126f30ce3fc8ffd82fd6f5196398d502 Author: Paul Menzel Date: Tue Apr 11 20:31:44 2023 +0200 ACPI: resource: Skip IRQ override on ASUS ExpertBook B1502CBA Like the ASUS ExpertBook B2502CBA and various ASUS Vivobook laptops, the ASUS ExpertBook B1502CBA has an ACPI DSDT table that describes IRQ 1 as ActiveLow while the kernel overrides it to Edge_High. $ sudo dmesg | grep DMI DMI: ASUSTeK COMPUTER INC. ASUS EXPERTBOOK B1502CBA_B1502CBA/B1502CBA, BIOS B1502CBA.300 01/18/2023 $ grep -A 40 PS2K dsdt.dsl | grep IRQ -A 1 IRQ (Level, ActiveLow, Exclusive, ) {1} This prevents the keyboard from working. To fix this issue, add this laptop to the skip_override_table so that the kernel does not override IRQ 1. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217323 Signed-off-by: Paul Menzel Signed-off-by: Rafael J. Wysocki commit 4654e9f9f43993eb9ce383fa7c88d14b052b8cc3 Author: Wyes Karny Date: Thu Mar 30 14:13:14 2023 +0000 amd-pstate: Fix amd_pstate mode switch amd_pstate mode can be changed by writing the mode name to the `status` sysfs. But some combinations are not working. Fix this issue by taking care of the edge cases. Before the fix the mode change combination test fails: #./pst_test.sh Test passed: from: disable, to Test passed: from: disable, to disable Test failed: 1, From mode: disable, to mode: passive Test failed: 1, From mode: disable, to mode: active Test failed: 1, From mode: passive, to mode: active Test passed: from: passive, to disable Test failed: 1, From mode: passive, to mode: passive Test failed: 1, From mode: passive, to mode: active Test failed: 1, From mode: active, to mode: active Test passed: from: active, to disable Test failed: 1, From mode: active, to mode: passive Test failed: 1, From mode: active, to mode: active After the fix test passes: #./pst_test.sh Test passed: from: disable, to Test passed: from: disable, to disable Test passed: from: disable, to passive Test passed: from: disable, to active Test passed: from: passive, to active Test passed: from: passive, to disable Test passed: from: passive, to passive Test passed: from: passive, to active Test passed: from: active, to active Test passed: from: active, to disable Test passed: from: active, to passive Test passed: from: active, to active Fixes: abd61c08ef349 ("cpufreq: amd-pstate: add driver working mode switch support") Acked-by: Huang Rui Reviewed-by: Alexey Kardashevskiy Signed-off-by: Wyes Karny Signed-off-by: Rafael J. Wysocki commit 2c40519251d61590377b313379ae2d4d4ef28266 Merge: 793cfd598370c 68d99ab0e9221 Author: Linus Torvalds Date: Tue Apr 11 11:43:16 2023 -0700 Merge tag 'for-6.3-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - fix fast checksum detection, this affects filesystems with non-crc32c checksum, calculation would not be offloaded to worker threads - restore thread_pool mount option behaviour for endio workers, the new value for maximum active threads would not be set to the actual work queues * tag 'for-6.3-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix fast csum implementation detection btrfs: restore the thread_pool= behavior in remount for the end I/O workqueues commit b89ce1177d42d5c124e83f3858818cd4e6a2c46f Author: Christophe JAILLET Date: Sun Dec 26 17:34:16 2021 +0100 drm/armada: Fix a potential double free in an error handling path 'priv' is a managed resource, so there is no need to free it explicitly or there will be a double free(). Fixes: 90ad200b4cbc ("drm/armada: Use devm_drm_dev_alloc") Signed-off-by: Christophe JAILLET Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/c4f3c9207a9fce35cb6dd2cc60e755275961588a.1640536364.git.christophe.jaillet@wanadoo.fr commit 793cfd598370cf9440d7877ddddda1251307f729 Merge: 43fef9ae02fb5 93942b7046157 Author: Linus Torvalds Date: Tue Apr 11 10:09:29 2023 -0700 Merge tag 'mtd/fixes-for-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull mtd fixes from Miquel Raynal: "Core fix: - mtdblock: Tolerate corrected bit-flips Raw NAND fixes: - meson: Fix bitmask for length in command word - stm32_fmc2: - Remove unsupported EDO mode - Use timings.mode instead of checking tRC_min. The first patch is the real fix but nowadays we use timings.mode instead of bare timings, so in order to ease the backports, the fix was split into two steps, the first one easy to backport on older kernels, the second one just as a follow-up so recent stable kernels would look like the mainline" * tag 'mtd/fixes-for-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: mtd: rawnand: meson: fix bitmask for length in command word mtdblock: tolerate corrected bit-flips mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min mtd: rawnand: stm32_fmc2: remove unsupported EDO mode commit 43fef9ae02fb5fa554e5df3c1899f06e4394cffc Merge: aa4c9185f0a16 2096134b5a00b Author: Linus Torvalds Date: Tue Apr 11 09:51:45 2023 -0700 Merge tag 'ata-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata Pull ata fix from Damien Le Moal: - Update my email address in the MAINTAINERS file * tag 'ata-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata: MAINTAINERS: Change ata maintainer email addresses commit aa4c9185f0a16662c25d814c713b3cd0b4f4e97a Merge: 0d3eb744aed40 0bf9601f8ef07 Author: Linus Torvalds Date: Tue Apr 11 09:36:42 2023 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "Two ARM fixes: - Ensure the guest PMU context is restored before the first KVM_RUN, fixing an issue where EL0 event counting is broken after vCPU save/restore - Actually initialize ID_AA64PFR0_EL1.{CSV2,CSV3} based on the sanitized, system-wide values for protected VMs" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: arm64: Advertise ID_AA64PFR0_EL1.CSV2/3 to protected VMs KVM: arm64: PMU: Restore the guest's EL0 event counting after migration commit 117e4e5bd9d47b89777dbf6b37a709dcfe59520f Author: Srinivas Pandruvada Date: Mon Apr 10 10:35:01 2023 -0700 thermal: intel: Avoid updating unsupported THERM_STATUS_CLEAR mask bits Some older processors don't allow BIT(13) and BIT(15) in the current mask set by "THERM_STATUS_CLEAR_CORE_MASK". This results in: unchecked MSR access error: WRMSR to 0x19c (tried to write 0x000000000000aaa8) at rIP: 0xffffffff816f66a6 (throttle_active_work+0xa6/0x1d0) To avoid unchecked MSR issues, check CPUID for each relevant feature and use that information to set the supported feature bits only in the "clear" mask for cores. Do the same for the analogous package mask set by "THERM_STATUS_CLEAR_PKG_MASK". Introduce functions thermal_intr_init_core_clear_mask() and thermal_intr_init_pkg_clear_mask() to set core and package mask bits, respectively. These functions are called during initialization. Fixes: 6fe1e64b6026 ("thermal: intel: Prevent accidental clearing of HFI status") Reported-by: Rui Salvaterra Link: https://lore.kernel.org/lkml/cdf43fb423368ee3994124a9e8c9b4f8d00712c6.camel@linux.intel.com/T/ Tested-by: Rui Salvaterra Signed-off-by: Srinivas Pandruvada Cc: 6.2+ # 6.2+ [ rjw: Renamed 2 funtions and 2 static variables, edited subject and changelog ] Signed-off-by: Rafael J. Wysocki commit 6fd33a3333c7916689b8f051a185defe4dd515b0 Author: Daniel Vetter Date: Tue Apr 4 21:39:34 2023 +0200 fbmem: Reject FB_ACTIVATE_KD_TEXT from userspace This is an oversight from dc5bdb68b5b3 ("drm/fb-helper: Fix vt restore") - I failed to realize that nasty userspace could set this. It's not pretty to mix up kernel-internal and userspace uapi flags like this, but since the entire fb_var_screeninfo structure is uapi we'd need to either add a new parameter to the ->fb_set_par callback and fb_set_par() function, which has a _lot_ of users. Or some other fairly ugly side-channel int fb_info. Neither is a pretty prospect. Instead just correct the issue at hand by filtering out this kernel-internal flag in the ioctl handling code. Reviewed-by: Javier Martinez Canillas Acked-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Fixes: dc5bdb68b5b3 ("drm/fb-helper: Fix vt restore") Cc: Alex Deucher Cc: shlomo@fastmail.com Cc: Michel Dänzer Cc: Noralf Trønnes Cc: Thomas Zimmermann Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: # v5.7+ Cc: Bartlomiej Zolnierkiewicz Cc: Geert Uytterhoeven Cc: Nathan Chancellor Cc: Qiujun Huang Cc: Peter Rosin Cc: linux-fbdev@vger.kernel.org Cc: Helge Deller Cc: Sam Ravnborg Cc: Geert Uytterhoeven Cc: Samuel Thibault Cc: Tetsuo Handa Cc: Shigeru Yoshida Link: https://patchwork.freedesktop.org/patch/msgid/20230404193934.472457-1-daniel.vetter@ffwll.ch commit a4506722dc39ca840593f14e3faa4c9ba9408211 Author: Radu Pirea (OSS) Date: Thu Apr 6 12:59:04 2023 +0300 net: phy: nxp-c45-tja11xx: add remove callback Unregister PTP clock when the driver is removed. Purge the RX and TX skb queues. Fixes: 514def5dd339 ("phy: nxp-c45-tja11xx: add timestamping support") CC: stable@vger.kernel.org # 5.15+ Signed-off-by: Radu Pirea (OSS) Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230406095904.75456-1-radu-nicolae.pirea@oss.nxp.com Signed-off-by: Paolo Abeni commit 7c7504067c709905fc188c61ac3072d6022d1209 Author: Axel Lin Date: Sun Apr 9 10:55:29 2023 +0800 regulator: sm5703: Fix missing n_voltages for fixed regulators Set n_voltages = 1 for fixed regulators. Signed-off-by: Axel Lin Reviewed-by: Markuss Broks Link: https://lore.kernel.org/r/20230409025529.241699-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 86d8740dae5a397d8344ae75f8758103c1fcba97 Author: Karol Herbst Date: Wed Apr 5 13:04:55 2023 +0200 drm/nouveau/fb: add missing sysmen flush callbacks Closes: https://gitlab.freedesktop.org/drm/nouveau/-/issues/203 Fixes: 5728d064190e1 ("drm/nouveau/fb: handle sysmem flush page from common code") Signed-off-by: Karol Herbst Reviewed-by: Lyude Paul Reviewed-by: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/20230405110455.1368428-1-kherbst@redhat.com commit 6b8446859c971a5783a2cdc90adf32e64de3bd23 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 (cherry picked from commit 1a62dd9895dca78bee28bba3a36f08836fdd143d) commit a042d7feae7eff98a9ad5a9de5004e60883a96d3 Merge: 265f1ecff7bf5 dc70eb868b9cd Author: Greg Kroah-Hartman Date: Tue Apr 11 09:41:40 2023 +0200 Merge tag 'fpga-for-6.3-final' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga into char-misc-next Xu writes: FPGA Manager changes for 6.3-final Intel m10 bmc secure update: - Ilpo's change fixes the return value of driver internal function DFL PCI driver: - Bjorn's change drops redundant pci_enable_pcie_error_reporting() Xilinx: - Michal's change uses xlnx_pr_decouple_read() instead of readl() to resolve sparse issue. FPGA core: - Alexis's change fixes kernel warning on fpga bridge register All patches have been reviewed on the mailing list, and have been in the last linux-next releases (as part of our fixes branch) Signed-off-by: Xu Yilun * tag 'fpga-for-6.3-final' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga: fpga: bridge: properly initialize bridge device before populating children fpga: xilinx-pr-decoupler: Use readl wrapper instead of pure readl fpga: dfl-pci: Drop redundant pci_enable_pcie_error_reporting() fpga: m10bmc-sec: Fix rsu_send_data() to return FW_UPLOAD_ERR_HW_ERROR commit 265f1ecff7bf570f4fb9eaa0a40110e4e2091cea Merge: 09a9639e56c01 b1cb00d51e361 Author: Greg Kroah-Hartman Date: Tue Apr 11 09:37:19 2023 +0200 Merge tag 'iio-fixes-for-6.3b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-linus Jonathan writes: 2nd set of IIO fixes for the 6.3 cycle. adi,ad5755 - Fix missing fwnode_handle_put() in error path. atmel,at91-sam5d2 - Fix error code when trigger allocation fails that would have looked like success. taos,tsl2772 - Store the proximity-diodes value read from the device tree so it is actually used rather than ignored. * tag 'iio-fixes-for-6.3b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: light: tsl2772: fix reading proximity-diodes from device tree iio: dac: ad5755: Add missing fwnode_handle_put() iio: adc: at91-sama5d2_adc: fix an error code in at91_adc_allocate_trigger() commit 2096134b5a00bf0bd15745d3a492039e801e84c0 Author: Damien Le Moal Date: Mon Apr 10 11:31:11 2023 +0900 MAINTAINERS: Change ata maintainer email addresses Change my email address referenced in the MAINTAINERS file for the ata subsystem to dlemoal@kernel.org. And while at it, also change other references for zonefs and the k210 drivers to the same address. Signed-off-by: Damien Le Moal Reviewed-by: Chaitanya Kulkarni commit aa7d233f45b4c549750044c9921f7afcbe50925b Author: Masahiro Yamada Date: Mon Apr 10 21:09:07 2023 +0900 kbuild: give up untracked files for source package builds When the source tree is dirty and contains untracked files, package builds may fail, for example, when a broken symlink exists, a file path contains whitespaces, etc. Since commit 05e96e96a315 ("kbuild: use git-archive for source package creation"), the source tarball only contains committed files because it is created by 'git archive'. scripts/package/gen-diff-patch tries to address the diff from HEAD, but including untracked files by the hand-crafted script introduces more complexity. I wrote a patch [1] to make it work in most cases, but still wonder if this is what we should aim for. To simplify the code, this patch just gives up untracked files. Going forward, it is your responsibility to do 'git add' for what you want in the source package. The script shows a warning just in case you forgot to do so. It should be checked only when building source packages. [1]: https://lore.kernel.org/all/CAK7LNAShbZ56gSh9PrbLnBDYKnjtTkHMoCXeGrhcxMvqXGq9=g@mail.gmail.com/2-0001-kbuild-make-package-builds-more-robust.patch Fixes: 05e96e96a315 ("kbuild: use git-archive for source package creation") Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 0d3eb744aed40ffce820cded61d7eac515199165 Merge: dfc1915448646 5da7cb193db32 Author: Linus Torvalds Date: Mon Apr 10 14:15:17 2023 -0700 Merge tag 'urgent-rcu.2023.04.07a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull RCU fix from Paul McKenney: "This fixes a pair of bugs in which an improbable but very real sequence of events can cause kfree_rcu() to be a bit too quick about freeing the memory passed to it. It turns out that this pair of bugs is about two years old, and so this is not a v6.3 regression. However: (1) It just started showing up in the wild and (2) Its consequences are dire, so its fix needs to go in sooner rather than later. Testing is of course being upgraded, and the upgraded tests detect this situation very quickly. But to the best of my knowledge right now, the tests are not particularly urgent and will thus most likely show up in the v6.5 merge window (the one after this coming one). Kudos to Ziwei Dai and his group for tracking this one down the hard way!" * tag 'urgent-rcu.2023.04.07a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: rcu/kvfree: Avoid freeing new kfree_rcu() memory after old grace period commit dfc191544864601a056ce7691d600e70d60d3ca1 Merge: c118b59e71d2a 9da667e50c7e6 Author: Linus Torvalds Date: Mon Apr 10 13:35:54 2023 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio fixes from Michael Tsirkin: "Some last minute fixes - most of them for regressions" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vdpa_sim_net: complete the initialization before register the device vdpa/mlx5: Add and remove debugfs in setup/teardown driver tools/virtio: fix typo in README instructions vhost-scsi: Fix crash during LUN unmapping vhost-scsi: Fix vhost_scsi struct use after free virtio-blk: fix ZBD probe in kernels without ZBD support virtio-blk: fix to match virtio spec commit c118b59e71d2a910ee300f8be40fa864a91bb6ca Merge: 411eb01410859 347dca97f75d4 Author: Linus Torvalds Date: Mon Apr 10 13:25:08 2023 -0700 Merge tag '9p-6.3-fixes-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs Pull 9p fixes from Eric Van Hensbergen: "These are some collected fixes for the 6.3-rc series that have been passed our 9p regression tests and been in for-next for at least a week. They include a fix for a KASAN reported problem in the extended attribute handling code and a use after free in the xen transport. This also includes some updates for the MAINTAINERS file including the transition of our development mailing list from sourceforge.net to lists.linux.dev" * tag '9p-6.3-fixes-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs: Update email address and mailing list for v9fs 9p/xen : Fix use after free bug in xen_9pfs_front_remove due to race condition 9P FS: Fix wild-memory-access write in v9fs_get_acl commit 411eb014108594d160a20381e8738de6c62e2e5b Merge: 09a9639e56c01 a3046a618a284 Author: Linus Torvalds Date: Mon Apr 10 13:13:33 2023 -0700 Merge tag 'uml-for-linus-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux Pull UML fix from Richard Weinberger: - Build regression fix for older gcc versions * tag 'uml-for-linus-6.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux: um: Only disable SSE on clang to work around old GCC bugs commit a2a9339e1c9deb7e1e079e12e27a0265aea8421a Author: Luiz Augusto von Dentz Date: Thu Apr 6 09:33:09 2023 -0700 Bluetooth: L2CAP: Fix use-after-free in l2cap_disconnect_{req,rsp} Similar to commit d0be8347c623 ("Bluetooth: L2CAP: Fix use-after-free caused by l2cap_chan_put"), just use l2cap_chan_hold_unless_zero to prevent referencing a channel that is about to be destroyed. Cc: stable@kernel.org Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Min Li commit d2e4f1b1cba8742db66aaf77374cab7c0c7c8656 Author: Claudia Draghicescu Date: Wed Apr 5 14:19:18 2023 +0300 Bluetooth: Set ISO Data Path on broadcast sink This patch enables ISO data rx on broadcast sink. Fixes: eca0ae4aea66 ("Bluetooth: Add initial implementation of BIS connections") Signed-off-by: Claudia Draghicescu Signed-off-by: Luiz Augusto von Dentz commit 5dc7d23e167e2882ef118456ceccd57873e876d8 Author: Luiz Augusto von Dentz Date: Mon Apr 3 14:19:14 2023 -0700 Bluetooth: hci_conn: Fix possible UAF This fixes the following trace: ================================================================== BUG: KASAN: slab-use-after-free in hci_conn_del+0xba/0x3a0 Write of size 8 at addr ffff88800208e9c8 by task iso-tester/31 CPU: 0 PID: 31 Comm: iso-tester Not tainted 6.3.0-rc2-g991aa4a69a47 #4716 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.1-2.fc36 04/01/2014 Call Trace: dump_stack_lvl+0x1d/0x70 print_report+0xce/0x610 ? __virt_addr_valid+0xd4/0x150 ? hci_conn_del+0xba/0x3a0 kasan_report+0xdd/0x110 ? hci_conn_del+0xba/0x3a0 hci_conn_del+0xba/0x3a0 hci_conn_hash_flush+0xf2/0x120 hci_dev_close_sync+0x388/0x920 hci_unregister_dev+0x122/0x260 vhci_release+0x4f/0x90 __fput+0x102/0x430 task_work_run+0xf1/0x160 ? __pfx_task_work_run+0x10/0x10 ? mark_held_locks+0x24/0x90 exit_to_user_mode_prepare+0x170/0x180 syscall_exit_to_user_mode+0x19/0x50 do_syscall_64+0x4e/0x90 entry_SYSCALL_64_after_hwframe+0x70/0xda Fixes: 0f00cd322d22 ("Bluetooth: Free potentially unfreed SCO connection") Link: https://syzkaller.appspot.com/bug?extid=8bb72f86fc823817bc5d Cc: Signed-off-by: Luiz Augusto von Dentz commit 975abc0c90fc485ff9b4a6afa475c3b1398d5d47 Author: Luiz Augusto von Dentz Date: Thu Mar 30 14:45:03 2023 -0700 Bluetooth: SCO: Fix possible circular locking dependency sco_sock_getsockopt This attempts to fix the following trace: ====================================================== WARNING: possible circular locking dependency detected 6.3.0-rc2-g68fcb3a7bf97 #4706 Not tainted ------------------------------------------------------ sco-tester/31 is trying to acquire lock: ffff8880025b8070 (&hdev->lock){+.+.}-{3:3}, at: sco_sock_getsockopt+0x1fc/0xa90 but task is already holding lock: ffff888001eeb130 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}, at: sco_sock_getsockopt+0x104/0xa90 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}: lock_sock_nested+0x32/0x80 sco_connect_cfm+0x118/0x4a0 hci_sync_conn_complete_evt+0x1e6/0x3d0 hci_event_packet+0x55c/0x7c0 hci_rx_work+0x34c/0xa00 process_one_work+0x575/0x910 worker_thread+0x89/0x6f0 kthread+0x14e/0x180 ret_from_fork+0x2b/0x50 -> #1 (hci_cb_list_lock){+.+.}-{3:3}: __mutex_lock+0x13b/0xcc0 hci_sync_conn_complete_evt+0x1ad/0x3d0 hci_event_packet+0x55c/0x7c0 hci_rx_work+0x34c/0xa00 process_one_work+0x575/0x910 worker_thread+0x89/0x6f0 kthread+0x14e/0x180 ret_from_fork+0x2b/0x50 -> #0 (&hdev->lock){+.+.}-{3:3}: __lock_acquire+0x18cc/0x3740 lock_acquire+0x151/0x3a0 __mutex_lock+0x13b/0xcc0 sco_sock_getsockopt+0x1fc/0xa90 __sys_getsockopt+0xe9/0x190 __x64_sys_getsockopt+0x5b/0x70 do_syscall_64+0x42/0x90 entry_SYSCALL_64_after_hwframe+0x70/0xda other info that might help us debug this: Chain exists of: &hdev->lock --> hci_cb_list_lock --> sk_lock-AF_BLUETOOTH-BTPROTO_SCO Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sk_lock-AF_BLUETOOTH-BTPROTO_SCO); lock(hci_cb_list_lock); lock(sk_lock-AF_BLUETOOTH-BTPROTO_SCO); lock(&hdev->lock); *** DEADLOCK *** 1 lock held by sco-tester/31: #0: ffff888001eeb130 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}, at: sco_sock_getsockopt+0x104/0xa90 Fixes: 248733e87d50 ("Bluetooth: Allow querying of supported offload codecs over SCO socket") Signed-off-by: Luiz Augusto von Dentz commit 9a8ec9e8ebb5a7c0cfbce2d6b4a6b67b2b78e8f3 Author: Luiz Augusto von Dentz Date: Thu Mar 30 14:15:50 2023 -0700 Bluetooth: SCO: Fix possible circular locking dependency on sco_connect_cfm This attempts to fix the following trace: ====================================================== WARNING: possible circular locking dependency detected 6.3.0-rc2-g0b93eeba4454 #4703 Not tainted ------------------------------------------------------ kworker/u3:0/46 is trying to acquire lock: ffff888001fd9130 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}, at: sco_connect_cfm+0x118/0x4a0 but task is already holding lock: ffffffff831e3340 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_sync_conn_complete_evt+0x1ad/0x3d0 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (hci_cb_list_lock){+.+.}-{3:3}: __mutex_lock+0x13b/0xcc0 hci_sync_conn_complete_evt+0x1ad/0x3d0 hci_event_packet+0x55c/0x7c0 hci_rx_work+0x34c/0xa00 process_one_work+0x575/0x910 worker_thread+0x89/0x6f0 kthread+0x14e/0x180 ret_from_fork+0x2b/0x50 -> #1 (&hdev->lock){+.+.}-{3:3}: __mutex_lock+0x13b/0xcc0 sco_sock_connect+0xfc/0x630 __sys_connect+0x197/0x1b0 __x64_sys_connect+0x37/0x50 do_syscall_64+0x42/0x90 entry_SYSCALL_64_after_hwframe+0x70/0xda -> #0 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}: __lock_acquire+0x18cc/0x3740 lock_acquire+0x151/0x3a0 lock_sock_nested+0x32/0x80 sco_connect_cfm+0x118/0x4a0 hci_sync_conn_complete_evt+0x1e6/0x3d0 hci_event_packet+0x55c/0x7c0 hci_rx_work+0x34c/0xa00 process_one_work+0x575/0x910 worker_thread+0x89/0x6f0 kthread+0x14e/0x180 ret_from_fork+0x2b/0x50 other info that might help us debug this: Chain exists of: sk_lock-AF_BLUETOOTH-BTPROTO_SCO --> &hdev->lock --> hci_cb_list_lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(hci_cb_list_lock); lock(&hdev->lock); lock(hci_cb_list_lock); lock(sk_lock-AF_BLUETOOTH-BTPROTO_SCO); *** DEADLOCK *** 4 locks held by kworker/u3:0/46: #0: ffff8880028d1130 ((wq_completion)hci0#2){+.+.}-{0:0}, at: process_one_work+0x4c0/0x910 #1: ffff8880013dfde0 ((work_completion)(&hdev->rx_work)){+.+.}-{0:0}, at: process_one_work+0x4c0/0x910 #2: ffff8880025d8070 (&hdev->lock){+.+.}-{3:3}, at: hci_sync_conn_complete_evt+0xa6/0x3d0 #3: ffffffffb79e3340 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_sync_conn_complete_evt+0x1ad/0x3d0 Signed-off-by: Luiz Augusto von Dentz commit b76abe4648c1acc791a207e7c08d1719eb9f4ea8 Author: Sasha Finkelstein Date: Fri Mar 10 11:28:42 2023 +0100 bluetooth: btbcm: Fix logic error in forming the board name. This patch fixes an incorrect loop exit condition in code that replaces '/' symbols in the board name. There might also be a memory corruption issue here, but it is unlikely to be a real problem. Cc: Signed-off-by: Sasha Finkelstein Signed-off-by: Luiz Augusto von Dentz commit 73f7b171b7c09139eb3c6a5677c200dc1be5f318 Author: Zheng Wang Date: Thu Mar 9 00:45:01 2023 +0800 Bluetooth: btsdio: fix use after free bug in btsdio_remove due to race condition In btsdio_probe, the data->work is bound with btsdio_work. It will be started in btsdio_send_frame. If the btsdio_remove runs with a unfinished work, there may be a race condition that hdev is freed but used in btsdio_work. Fix it by canceling the work before do cleanup in btsdio_remove. Signed-off-by: Zheng Wang Signed-off-by: Luiz Augusto von Dentz commit c95930abd687fcd1aa040dc4fe90dff947916460 Author: Min Li Date: Sat Mar 4 22:23:30 2023 +0800 Bluetooth: Fix race condition in hidp_session_thread There is a potential race condition in hidp_session_thread that may lead to use-after-free. For instance, the timer is active while hidp_del_timer is called in hidp_session_thread(). After hidp_session_put, then 'session' will be freed, causing kernel panic when hidp_idle_timeout is running. The solution is to use del_timer_sync instead of del_timer. Here is the call trace: ? hidp_session_probe+0x780/0x780 call_timer_fn+0x2d/0x1e0 __run_timers.part.0+0x569/0x940 hidp_session_probe+0x780/0x780 call_timer_fn+0x1e0/0x1e0 ktime_get+0x5c/0xf0 lapic_next_deadline+0x2c/0x40 clockevents_program_event+0x205/0x320 run_timer_softirq+0xa9/0x1b0 __do_softirq+0x1b9/0x641 __irq_exit_rcu+0xdc/0x190 irq_exit_rcu+0xe/0x20 sysvec_apic_timer_interrupt+0xa1/0xc0 Cc: stable@vger.kernel.org Signed-off-by: Min Li Signed-off-by: Luiz Augusto von Dentz commit b62e72200eaad523f08d8319bba50fc652e032a8 Author: Luiz Augusto von Dentz Date: Fri Mar 24 13:18:20 2023 -0700 Bluetooth: Fix printing errors if LE Connection times out This fixes errors like bellow when LE Connection times out since that is actually not a controller error: Bluetooth: hci0: Opcode 0x200d failed: -110 Bluetooth: hci0: request failed to create LE connection: err -110 Instead the code shall properly detect if -ETIMEDOUT is returned and send HCI_OP_LE_CREATE_CONN_CANCEL to give up on the connection. Link: https://github.com/bluez/bluez/issues/340 Fixes: 8e8b92ee60de ("Bluetooth: hci_sync: Add hci_le_create_conn_sync") Signed-off-by: Luiz Augusto von Dentz commit 19cf60bf63cbaf5262eac400c707966e19999b83 Author: Luiz Augusto von Dentz Date: Fri Mar 24 10:57:55 2023 -0700 Bluetooth: hci_conn: Fix not cleaning up on LE Connection failure hci_connect_le_scan_cleanup shall always be invoked to cleanup the states and re-enable passive scanning if necessary, otherwise it may cause the pending action to stay active causing multiple attempts to connect. Fixes: 9b3628d79b46 ("Bluetooth: hci_sync: Cleanup hci_conn if it cannot be aborted") Signed-off-by: Luiz Augusto von Dentz commit b3d80fd27a3c2d8715a40cbf876139b56195f162 Author: Soumya Negi Date: Sun Apr 9 19:12:04 2023 -0700 Input: pegasus-notetaker - check pipe type when probing Fix WARNING in pegasus_open/usb_submit_urb Syzbot bug: https://syzkaller.appspot.com/bug?id=bbc107584dcf3262253ce93183e51f3612aaeb13 Warning raised because pegasus_driver submits transfer request for bogus URB (pipe type does not match endpoint type). Add sanity check at probe time for pipe value extracted from endpoint descriptor. Probe will fail if sanity check fails. Reported-and-tested-by: syzbot+04ee0cb4caccaed12d78@syzkaller.appspotmail.com Signed-off-by: Soumya Negi Link: https://lore.kernel.org/r/20230404074145.11523-1-soumya.negi97@gmail.com Signed-off-by: Dmitry Torokhov commit 09a9639e56c01c7a00d6c0ca63f4c7c41abe075d Author: Linus Torvalds Date: Sun Apr 9 11:15:57 2023 -0700 Linux 6.3-rc6 commit faf8f41858e2792925b2c526e16d2f539a53a730 Merge: 4ba115e2694dc 24d3ae2f37d8b Author: Linus Torvalds Date: Sun Apr 9 10:10:46 2023 -0700 Merge tag 'perf_urgent_for_v6.3_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Borislav Petkov: - Fix "same task" check when redirecting event output - Do not wait unconditionally for RCU on the event migration path if there are no events to migrate * tag 'perf_urgent_for_v6.3_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/core: Fix the same task check in perf_event_set_output perf: Optimize perf_pmu_migrate_context() commit 4ba115e2694dc9a10abfe94766d70b64ae9479c7 Merge: c08cfd6716a17 81515ecf155a3 Author: Linus Torvalds Date: Sun Apr 9 10:00:16 2023 -0700 Merge tag 'x86_urgent_for_v6.3_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: - Add a new Intel Arrow Lake CPU model number - Fix a confusion about how to check the version of the ACPI spec which supports a "online capable" bit in the MADT table which lead to a bunch of boot breakages with Zen1 systems and VMs * tag 'x86_urgent_for_v6.3_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu: Add model number for Intel Arrow Lake processor x86/acpi/boot: Correct acpi_is_processor_usable() check x86/ACPI/boot: Use FADT version to check support for online capable commit c08cfd6716a170c549c1140f1d4a0e749c888a79 Merge: cdc9718d5e590 ca712e4705467 Author: Linus Torvalds Date: Sun Apr 9 09:45:46 2023 -0700 Merge tag 'cxl-fixes-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl Pull compute express link (cxl) fixes from Dan Williams: "Several fixes for driver startup regressions that landed during the merge window as well as some older bugs. The regressions were due to a lack of testing with what the CXL specification calls Restricted CXL Host (RCH) topologies compared to the testing with Virtual Host (VH) CXL topologies. A VH topology is typical PCIe while RCH topologies map CXL endpoints as Root Complex Integrated endpoints. The impact is some driver crashes on startup. This merge window also added compatibility for range registers (the mechanism that CXL 1.1 defined for mapping memory) to treat them like HDM decoders (the mechanism that CXL 2.0 defined for mapping Host-managed Device Memory). That work collided with the new region enumeration code that was tested with CXL 2.0 setups, and fails with crashes at startup. Lastly, the DOE (Data Object Exchange) implementation for retrieving an ACPI-like data table from CXL devices is being reworked for v6.4. Several fixes fell out of that work that are suitable for v6.3. All of this has been in linux-next for a while, and all reported issues [1] have been addressed. Summary: - Fix several issues with region enumeration in RCH topologies that can trigger crashes on driver startup or shutdown. - Fix CXL DVSEC range register compatibility versus region enumeration that leads to startup crashes - Fix CDAT endiannes handling - Fix multiple buffer handling boundary conditions - Fix Data Object Exchange (DOE) workqueue usage vs CONFIG_DEBUG_OBJECTS warn splats" Link: http://lore.kernel.org/r/20230405075704.33de8121@canb.auug.org.au [1] * tag 'cxl-fixes-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: cxl/hdm: Extend DVSEC range register emulation for region enumeration cxl/hdm: Limit emulation to the number of range registers cxl/region: Move coherence tracking into cxl_region_attach() cxl/region: Fix region setup/teardown for RCDs cxl/port: Fix find_cxl_root() for RCDs and simplify it cxl/hdm: Skip emulation when driver manages mem_enable cxl/hdm: Fix double allocation of @cxlhdm PCI/DOE: Fix memory leak with CONFIG_DEBUG_OBJECTS=y PCI/DOE: Silence WARN splat with CONFIG_DEBUG_OBJECTS=y cxl/pci: Handle excessive CDAT length cxl/pci: Handle truncated CDAT entries cxl/pci: Handle truncated CDAT header cxl/pci: Fix CDAT retrieval on big endian commit 9a06fe08ae938bc2c2fb96e36ebcdb7b1a5133c4 Merge: 5cc33f139e11b bef227c1537cb Author: David S. Miller Date: Sun Apr 9 16:01:28 2023 +0100 Merge branch 'sfp-eeprom' Ivan Bornyakov says: ==================== net: fix EEPROM read of absent SFP module The patchset is to improve EEPROM read requests when SFP module is absent. ChangeLog: v1: https://lore.kernel.org/netdev/20230405153900.747-1-i.bornyakov@metrotek.ru/ v2: * reword commit message of "net: sfp: initialize sfp->i2c_block_size at sfp allocation" * add second patch to eliminate excessive I2C transfers in sfp_module_eeprom() and sfp_module_eeprom_by_page() ==================== Signed-off-by: David S. Miller commit bef227c1537cb8005311c0842bc5449e8c7a5973 Author: Ivan Bornyakov Date: Thu Apr 6 16:08:33 2023 +0300 net: sfp: avoid EEPROM read of absent SFP module If SFP module is not present, it is sensible to fail sfp_module_eeprom() and sfp_module_eeprom_by_page() early to avoid excessive I2C transfers which are garanteed to fail. Suggested-by: Andrew Lunn Signed-off-by: Ivan Bornyakov Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 813c2dd78618f108fdcf9cd726ea90f081ee2881 Author: Ivan Bornyakov Date: Thu Apr 6 16:08:32 2023 +0300 net: sfp: initialize sfp->i2c_block_size at sfp allocation sfp->i2c_block_size is initialized at SFP module insertion in sfp_sm_mod_probe(). Because of that, if SFP module was never inserted since boot, sfp_read() call will lead to zero-length I2C read attempt, and not all I2C controllers are happy with zero-length reads. One way to issue sfp_read() on empty SFP cage is to execute ethtool -m. If SFP module was never plugged since boot, there will be a zero-length I2C read attempt. # ethtool -m xge0 i2c i2c-3: adapter quirk: no zero length (addr 0x0050, size 0, read) Cannot get Module EEPROM data: Operation not supported If SFP module was plugged then removed at least once, sfp->i2c_block_size will be initialized and ethtool -m will fail with different exit code and without I2C error # ethtool -m xge0 Cannot get Module EEPROM data: Remote I/O error Fix this by initializing sfp->i2_block_size at struct sfp allocation stage so no wild sfp_read() could issue zero-length I2C read. Signed-off-by: Ivan Bornyakov Fixes: 0d035bed2a4a ("net: sfp: VSOL V2801F / CarlitoxxPro CPGOS03-0490 v2.0 workaround") Cc: stable@vger.kernel.org Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit cdc9718d5e590d6905361800b938b93f2b66818e Merge: 68047c48b2288 4f5d5b33fc400 Author: Linus Torvalds Date: Sat Apr 8 18:37:45 2023 -0700 Merge tag '6.3-rc5-smb3-cifs-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs client fixes from Steve French: "Two cifs/smb3 client fixes, one for stable: - double lock fix for a cifs/smb1 reconnect path - DFS prefixpath fix for reconnect when server moved" * tag '6.3-rc5-smb3-cifs-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: double lock in cifs_reconnect_tcon() cifs: sanitize paths in cifs_update_super_prepath. commit 68047c48b2288803c441df9f3e61d0d26bed87df Merge: aa46fe36bbac6 4bffd2c7a3fc1 Author: Linus Torvalds Date: Sat Apr 8 12:21:37 2023 -0700 Merge tag 'char-misc-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are a small set of various small driver changes for 6.3-rc6. Included in here are: - iio driver fixes for reported problems - coresight hwtracing bugfix for reported problem - small counter driver bugfixes All have been in linux-next for a while with no reported problems" * tag 'char-misc-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: coresight: etm4x: Do not access TRCIDR1 for identification coresight-etm4: Fix for() loop drvdata->nr_addr_cmp range bug iio: adc: ti-ads7950: Set `can_sleep` flag for GPIO chip iio: adc: palmas_gpadc: fix NULL dereference on rmmod counter: 104-quad-8: Fix Synapse action reported for Index signals counter: 104-quad-8: Fix race condition between FLAG and CNTR reads iio: adc: max11410: fix read_poll_timeout() usage iio: dac: cio-dac: Fix max DAC write value check for 12-bit iio: light: cm32181: Unregister second I2C client if present iio: accel: kionix-kx022a: Get the timestamp from the driver's private data in the trigger_handler iio: adc: ad7791: fix IRQ flags iio: buffer: make sure O_NONBLOCK is respected iio: buffer: correctly return bytes written in output buffers iio: light: vcnl4000: Fix WARN_ON on uninitialized lock iio: adis16480: select CONFIG_CRC32 drivers: iio: adc: ltc2497: fix LSB shift iio: adc: qcom-spmi-adc5: Fix the channel name commit aa46fe36bbac623d58817eb12ed0222d88fe6b16 Merge: a211b1c05d487 f92ed0cd9328a Author: Linus Torvalds Date: Sat Apr 8 12:17:46 2023 -0700 Merge tag 'tty-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial driver fixes from Greg KH: "Here are some small tty and serial driver fixes for some reported problems: - fsl_uart driver bugfixes - sh-sci serial driver bugfixes - renesas serial driver DT binding bugfixes - 8250 DMA bugfix All of these have been in linux-next for a while with no reported problems" * tag 'tty-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty: serial: sh-sci: Fix Rx on RZ/G2L SCI tty: serial: fsl_lpuart: fix crash in lpuart_uport_is_active tty: serial: fsl_lpuart: avoid checking for transfer complete when UARTCTRL_SBK is asserted in lpuart32_tx_empty serial: 8250: Prevent starting up DMA Rx on THRI interrupt dt-bindings: serial: renesas,scif: Fix 4th IRQ for 4-IRQ SCIFs tty: serial: sh-sci: Fix transmit end interrupt handler commit a211b1c05d487dc9f78688ac3058d2d7a4581807 Merge: a79d5c76f705d 1edf48991a783 Author: Linus Torvalds Date: Sat Apr 8 12:13:39 2023 -0700 Merge tag 'usb-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB bugfixes from Greg KH: "Here are some small USB bugfixes for 6.3-rc6 that have been in my tree, and in linux-next, for a while. Included in here are: - new usb-serial driver device ids - xhci bugfixes for reported problems - gadget driver bugfixes for reported problems - dwc3 new device id All have been in linux-next with no reported problems" * tag 'usb-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: cdnsp: Fixes error: uninitialized symbol 'len' usb: gadgetfs: Fix ep_read_iter to handle ITER_UBUF usb: gadget: f_fs: Fix ffs_epfile_read_iter to handle ITER_UBUF usb: typec: altmodes/displayport: Fix configure initial pin assignment usb: dwc3: pci: add support for the Intel Meteor Lake-S xhci: Free the command allocated for setting LPM if we return early Revert "usb: xhci-pci: Set PROBE_PREFER_ASYNCHRONOUS" xhci: also avoid the XHCI_ZERO_64B_REGS quirk with a passthrough iommu USB: serial: option: add Quectel RM500U-CN modem usb: xhci: tegra: fix sleep in atomic call USB: serial: option: add Telit FE990 compositions USB: serial: cp210x: add Silicon Labs IFS-USB-DATACABLE IDs commit a79d5c76f705de81cb6b55ad279dde9759da06d2 Merge: da0af3c55955e 48b19b79cfa37 Author: Linus Torvalds Date: Sat Apr 8 11:57:05 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 small fixes, all in drivers. They're all one or two lines except for the ufs one, but that's a simple revert of a previous feature" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: iscsi_tcp: Check that sock is valid before iscsi_set_param() scsi: qla2xxx: Fix memory leak in qla2x00_probe_one() scsi: mpi3mr: Handle soft reset in progress fault code (0xF002) scsi: Revert "scsi: ufs: core: Initialize devfreq synchronously" commit da0af3c55955efceb7d23f40c8f3d9f4b590d34a Merge: d3f05a4c42856 3723091ea1884 Author: Linus Torvalds Date: Sat Apr 8 11:40:41 2023 -0700 Merge tag 'block-6.3-2023-04-06' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - Ensure that ublk always reads the whole sqe upfront (me) - Fix for a block size probing issue with ublk (Ming) - Fix for the bio based polling (Keith) - NVMe pull request via Christoph: - fix discard support without oncs (Keith Busch) - Partition scan error handling regression fix (Yu) * tag 'block-6.3-2023-04-06' of git://git.kernel.dk/linux: block: don't set GD_NEED_PART_SCAN if scan partition failed block: ublk: make sure that block size is set correctly ublk: read any SQE values upfront nvme: fix discard support without oncs blk-mq: directly poll requests commit d3f05a4c428565163f26b5d34f60f02ee4ea4009 Merge: 973ad544f04a5 b4a72c0589fde Author: Linus Torvalds Date: Sat Apr 8 11:34:17 2023 -0700 Merge tag 'io_uring-6.3-2023-04-06' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: "Just two minor fixes for provided buffers - one where we could potentially leak a buffer, and one where the returned values was off-by-one in some cases" * tag 'io_uring-6.3-2023-04-06' of git://git.kernel.dk/linux: io_uring: fix memory leak when removing provided buffers io_uring: fix return value when removing provided buffers commit 973ad544f04a5eff3435fd36e02392c5afeafc0f Merge: 1a8a804a4f5d6 bbb73a103fbbe Author: Linus Torvalds Date: Sat Apr 8 11:10:49 2023 -0700 Merge tag 'dma-mapping-6.3-2023-04-08' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fix from Christoph Hellwig: - fix a braino in the swiotlb alignment check fix (Petr Tesarik) * tag 'dma-mapping-6.3-2023-04-08' of git://git.infradead.org/users/hch/dma-mapping: swiotlb: fix a braino in the alignment check fix commit 1a8a804a4f5d6d0ec77831ca776b8db4a7a98306 Merge: 6fda0bb806fa7 31c683967174b Author: Linus Torvalds Date: Sat Apr 8 11:02:03 2023 -0700 Merge tag 'trace-v6.3-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fixes from Steven Rostedt: "A couple more minor fixes: - Reset direct->addr back to its original value on error in updating the direct trampoline code - Make lastcmd_mutex static" * tag 'trace-v6.3-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing/synthetic: Make lastcmd_mutex static ftrace: Fix issue that 'direct->addr' not restored in modify_ftrace_direct() commit 6fda0bb806fa77c9cfe12cdcbbd8cbbe946b9c37 Merge: aa318c48808c0 c45ea315a602d Author: Linus Torvalds Date: Sat Apr 8 10:51:12 2023 -0700 Merge tag 'mm-hotfixes-stable-2023-04-07-16-23' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull MM fixes from Andrew Morton: "28 hotfixes. 23 are cc:stable and the other five address issues which were introduced during this merge cycle. 20 are for MM and the remainder are for other subsystems" * tag 'mm-hotfixes-stable-2023-04-07-16-23' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (28 commits) maple_tree: fix a potential concurrency bug in RCU mode maple_tree: fix get wrong data_end in mtree_lookup_walk() mm/swap: fix swap_info_struct race between swapoff and get_swap_pages() nilfs2: fix sysfs interface lifetime mm: take a page reference when removing device exclusive entries mm: vmalloc: avoid warn_alloc noise caused by fatal signal nilfs2: initialize "struct nilfs_binfo_dat"->bi_pad field nilfs2: fix potential UAF of struct nilfs_sc_info in nilfs_segctor_thread() zsmalloc: document freeable stats zsmalloc: document new fullness grouping fsdax: force clear dirty mark if CoW mm/hugetlb: fix uffd wr-protection for CoW optimization path mm: enable maple tree RCU mode by default maple_tree: add RCU lock checking to rcu callback functions maple_tree: add smp_rmb() to dead node detection maple_tree: fix write memory barrier of nodes once dead for RCU mode maple_tree: remove extra smp_wmb() from mas_dead_leaves() maple_tree: fix freeing of nodes in rcu mode maple_tree: detect dead nodes in mas_start() maple_tree: be more cautious about dead nodes ... commit dcc11ac9dcaffdce428794f282c100a736244b55 Author: Nathan Chancellor Date: Fri Apr 7 14:42:48 2023 -0700 Documentation/llvm: Add a note about prebuilt kernel.org toolchains I recently started uploading prebuilt stable versions of LLVM to kernel.org, which should make building the kernel with LLVM more accessible to maintainers and developers. Link them in the LLVM documentation to make this more visible. Link: https://lore.kernel.org/20230319235619.GA18547@dev-arch.thelio-3990X/ Suggested-by: Nick Desaulniers Reviewed-by: Bill Wendling Reviewed-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: Masahiro Yamada commit d83806c4c0cccc0d6d3c3581a11983a9c186a138 Author: Alyssa Ross Date: Sun Mar 26 18:21:21 2023 +0000 purgatory: fix disabling debug info Since 32ef9e5054ec, -Wa,-gdwarf-2 is no longer used in KBUILD_AFLAGS. Instead, it includes -g, the appropriate -gdwarf-* flag, and also the -Wa versions of both of those if building with Clang and GNU as. As a result, debug info was being generated for the purgatory objects, even though the intention was that it not be. Fixes: 32ef9e5054ec ("Makefile.debug: re-enable debug info for .S files") Signed-off-by: Alyssa Ross Cc: stable@vger.kernel.org Acked-by: Nick Desaulniers Signed-off-by: Masahiro Yamada commit b1cb00d51e361cf5af93649917d9790e1623647e Author: Brian Masney Date: Mon Apr 3 21:14:55 2023 -0400 iio: light: tsl2772: fix reading proximity-diodes from device tree tsl2772_read_prox_diodes() will correctly parse the properties from device tree to determine which proximity diode(s) to read from, however it didn't actually set this value on the struct tsl2772_settings. Let's go ahead and fix that. Reported-by: Tom Rix Link: https://lore.kernel.org/lkml/20230327120823.1369700-1-trix@redhat.com/ Fixes: 94cd1113aaa0 ("iio: tsl2772: add support for reading proximity led settings from device tree") Signed-off-by: Brian Masney Link: https://lore.kernel.org/r/20230404011455.339454-1-bmasney@redhat.com Cc: Signed-off-by: Jonathan Cameron commit 5cc33f139e11b893ff6dc60d8a0ae865a65521ac Author: Douglas Anderson Date: Thu Apr 6 17:14:26 2023 -0700 r8152: Add __GFP_NOWARN to big allocations When memory is a little tight on my system, it's pretty easy to see warnings that look like this. ksoftirqd/0: page allocation failure: order:3, mode:0x40a20(GFP_ATOMIC|__GFP_COMP), nodemask=(null),cpuset=/,mems_allowed=0 ... Call trace: dump_backtrace+0x0/0x1e8 show_stack+0x20/0x2c dump_stack_lvl+0x60/0x78 dump_stack+0x18/0x38 warn_alloc+0x104/0x174 __alloc_pages+0x588/0x67c alloc_rx_agg+0xa0/0x190 [r8152 ...] r8152_poll+0x270/0x760 [r8152 ...] __napi_poll+0x44/0x1ec net_rx_action+0x100/0x300 __do_softirq+0xec/0x38c run_ksoftirqd+0x38/0xec smpboot_thread_fn+0xb8/0x248 kthread+0x134/0x154 ret_from_fork+0x10/0x20 On a fragmented system it's normal that order 3 allocations will sometimes fail, especially atomic ones. The driver handles these failures fine and the WARN just creates spam in the logs for this case. The __GFP_NOWARN flag is exactly for this situation, so add it to the allocation. NOTE: my testing is on a 5.15 system, but there should be no reason that this would be fundamentally different on a mainline kernel. Signed-off-by: Douglas Anderson Acked-by: Hayes Wang Link: https://lore.kernel.org/r/20230406171411.1.I84dbef45786af440fd269b71e9436a96a8e7a152@changeid Signed-off-by: Jakub Kicinski commit bdaaecc127d471c422ee9e994978617c8aa79e1e Author: Radu Pirea (OSS) Date: Thu Apr 6 12:59:53 2023 +0300 net: phy: nxp-c45-tja11xx: fix unsigned long multiplication overflow Any multiplication between GENMASK(31, 0) and a number bigger than 1 will be truncated because of the overflow, if the size of unsigned long is 32 bits. Replaced GENMASK with GENMASK_ULL to make sure that multiplication will be between 64 bits values. Cc: # 5.15+ Fixes: 514def5dd339 ("phy: nxp-c45-tja11xx: add timestamping support") Signed-off-by: Radu Pirea (OSS) Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230406095953.75622-1-radu-nicolae.pirea@oss.nxp.com Signed-off-by: Jakub Kicinski commit 066b86787fa3d97b7aefb5ac0a99a22dad2d15f8 Author: Felix Huettner Date: Wed Apr 5 07:53:41 2023 +0000 net: openvswitch: fix race on port output assume the following setup on a single machine: 1. An openvswitch instance with one bridge and default flows 2. two network namespaces "server" and "client" 3. two ovs interfaces "server" and "client" on the bridge 4. for each ovs interface a veth pair with a matching name and 32 rx and tx queues 5. move the ends of the veth pairs to the respective network namespaces 6. assign ip addresses to each of the veth ends in the namespaces (needs to be the same subnet) 7. start some http server on the server network namespace 8. test if a client in the client namespace can reach the http server when following the actions below the host has a chance of getting a cpu stuck in a infinite loop: 1. send a large amount of parallel requests to the http server (around 3000 curls should work) 2. in parallel delete the network namespace (do not delete interfaces or stop the server, just kill the namespace) there is a low chance that this will cause the below kernel cpu stuck message. If this does not happen just retry. Below there is also the output of bpftrace for the functions mentioned in the output. The series of events happening here is: 1. the network namespace is deleted calling `unregister_netdevice_many_notify` somewhere in the process 2. this sets first `NETREG_UNREGISTERING` on both ends of the veth and then runs `synchronize_net` 3. it then calls `call_netdevice_notifiers` with `NETDEV_UNREGISTER` 4. this is then handled by `dp_device_event` which calls `ovs_netdev_detach_dev` (if a vport is found, which is the case for the veth interface attached to ovs) 5. this removes the rx_handlers of the device but does not prevent packages to be sent to the device 6. `dp_device_event` then queues the vport deletion to work in background as a ovs_lock is needed that we do not hold in the unregistration path 7. `unregister_netdevice_many_notify` continues to call `netdev_unregister_kobject` which sets `real_num_tx_queues` to 0 8. port deletion continues (but details are not relevant for this issue) 9. at some future point the background task deletes the vport If after 7. but before 9. a packet is send to the ovs vport (which is not deleted at this point in time) which forwards it to the `dev_queue_xmit` flow even though the device is unregistering. In `skb_tx_hash` (which is called in the `dev_queue_xmit`) path there is a while loop (if the packet has a rx_queue recorded) that is infinite if `dev->real_num_tx_queues` is zero. To prevent this from happening we update `do_output` to handle devices without carrier the same as if the device is not found (which would be the code path after 9. is done). Additionally we now produce a warning in `skb_tx_hash` if we will hit the infinite loop. bpftrace (first word is function name): __dev_queue_xmit server: real_num_tx_queues: 1, cpu: 2, pid: 28024, tid: 28024, skb_addr: 0xffff9edb6f207000, reg_state: 1 netdev_core_pick_tx server: addr: 0xffff9f0a46d4a000 real_num_tx_queues: 1, cpu: 2, pid: 28024, tid: 28024, skb_addr: 0xffff9edb6f207000, reg_state: 1 dp_device_event server: real_num_tx_queues: 1 cpu 9, pid: 21024, tid: 21024, event 2, reg_state: 1 synchronize_rcu_expedited: cpu 9, pid: 21024, tid: 21024 synchronize_rcu_expedited: cpu 9, pid: 21024, tid: 21024 synchronize_rcu_expedited: cpu 9, pid: 21024, tid: 21024 synchronize_rcu_expedited: cpu 9, pid: 21024, tid: 21024 dp_device_event server: real_num_tx_queues: 1 cpu 9, pid: 21024, tid: 21024, event 6, reg_state: 2 ovs_netdev_detach_dev server: real_num_tx_queues: 1 cpu 9, pid: 21024, tid: 21024, reg_state: 2 netdev_rx_handler_unregister server: real_num_tx_queues: 1, cpu: 9, pid: 21024, tid: 21024, reg_state: 2 synchronize_rcu_expedited: cpu 9, pid: 21024, tid: 21024 netdev_rx_handler_unregister ret server: real_num_tx_queues: 1, cpu: 9, pid: 21024, tid: 21024, reg_state: 2 dp_device_event server: real_num_tx_queues: 1 cpu 9, pid: 21024, tid: 21024, event 27, reg_state: 2 dp_device_event server: real_num_tx_queues: 1 cpu 9, pid: 21024, tid: 21024, event 22, reg_state: 2 dp_device_event server: real_num_tx_queues: 1 cpu 9, pid: 21024, tid: 21024, event 18, reg_state: 2 netdev_unregister_kobject: real_num_tx_queues: 1, cpu: 9, pid: 21024, tid: 21024 synchronize_rcu_expedited: cpu 9, pid: 21024, tid: 21024 ovs_vport_send server: real_num_tx_queues: 0, cpu: 2, pid: 28024, tid: 28024, skb_addr: 0xffff9edb6f207000, reg_state: 2 __dev_queue_xmit server: real_num_tx_queues: 0, cpu: 2, pid: 28024, tid: 28024, skb_addr: 0xffff9edb6f207000, reg_state: 2 netdev_core_pick_tx server: addr: 0xffff9f0a46d4a000 real_num_tx_queues: 0, cpu: 2, pid: 28024, tid: 28024, skb_addr: 0xffff9edb6f207000, reg_state: 2 broken device server: real_num_tx_queues: 0, cpu: 2, pid: 28024, tid: 28024 ovs_dp_detach_port server: real_num_tx_queues: 0 cpu 9, pid: 9124, tid: 9124, reg_state: 2 synchronize_rcu_expedited: cpu 9, pid: 33604, tid: 33604 stuck message: watchdog: BUG: soft lockup - CPU#5 stuck for 26s! [curl:1929279] Modules linked in: veth pktgen bridge stp llc ip_set_hash_net nft_counter xt_set nft_compat nf_tables ip_set_hash_ip ip_set nfnetlink_cttimeout nfnetlink openvswitch nsh nf_conncount nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 tls binfmt_misc nls_iso8859_1 input_leds joydev serio_raw dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua sch_fq_codel drm efi_pstore virtio_rng ip_tables x_tables autofs4 btrfs blake2b_generic zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear hid_generic usbhid hid crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel virtio_net ahci net_failover crypto_simd cryptd psmouse libahci virtio_blk failover CPU: 5 PID: 1929279 Comm: curl Not tainted 5.15.0-67-generic #74-Ubuntu Hardware name: OpenStack Foundation OpenStack Nova, BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 RIP: 0010:netdev_pick_tx+0xf1/0x320 Code: 00 00 8d 48 ff 0f b7 c1 66 39 ca 0f 86 e9 01 00 00 45 0f b7 ff 41 39 c7 0f 87 5b 01 00 00 44 29 f8 41 39 c7 0f 87 4f 01 00 00 f2 0f 1f 44 00 00 49 8b 94 24 28 04 00 00 48 85 d2 0f 84 53 01 RSP: 0018:ffffb78b40298820 EFLAGS: 00000246 RAX: 0000000000000000 RBX: ffff9c8773adc2e0 RCX: 000000000000083f RDX: 0000000000000000 RSI: ffff9c8773adc2e0 RDI: ffff9c870a25e000 RBP: ffffb78b40298858 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff9c870a25e000 R13: ffff9c870a25e000 R14: ffff9c87fe043480 R15: 0000000000000000 FS: 00007f7b80008f00(0000) GS:ffff9c8e5f740000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f7b80f6a0b0 CR3: 0000000329d66000 CR4: 0000000000350ee0 Call Trace: netdev_core_pick_tx+0xa4/0xb0 __dev_queue_xmit+0xf8/0x510 ? __bpf_prog_exit+0x1e/0x30 dev_queue_xmit+0x10/0x20 ovs_vport_send+0xad/0x170 [openvswitch] do_output+0x59/0x180 [openvswitch] do_execute_actions+0xa80/0xaa0 [openvswitch] ? kfree+0x1/0x250 ? kfree+0x1/0x250 ? kprobe_perf_func+0x4f/0x2b0 ? flow_lookup.constprop.0+0x5c/0x110 [openvswitch] ovs_execute_actions+0x4c/0x120 [openvswitch] ovs_dp_process_packet+0xa1/0x200 [openvswitch] ? ovs_ct_update_key.isra.0+0xa8/0x120 [openvswitch] ? ovs_ct_fill_key+0x1d/0x30 [openvswitch] ? ovs_flow_key_extract+0x2db/0x350 [openvswitch] ovs_vport_receive+0x77/0xd0 [openvswitch] ? __htab_map_lookup_elem+0x4e/0x60 ? bpf_prog_680e8aff8547aec1_kfree+0x3b/0x714 ? trace_call_bpf+0xc8/0x150 ? kfree+0x1/0x250 ? kfree+0x1/0x250 ? kprobe_perf_func+0x4f/0x2b0 ? kprobe_perf_func+0x4f/0x2b0 ? __mod_memcg_lruvec_state+0x63/0xe0 netdev_port_receive+0xc4/0x180 [openvswitch] ? netdev_port_receive+0x180/0x180 [openvswitch] netdev_frame_hook+0x1f/0x40 [openvswitch] __netif_receive_skb_core.constprop.0+0x23d/0xf00 __netif_receive_skb_one_core+0x3f/0xa0 __netif_receive_skb+0x15/0x60 process_backlog+0x9e/0x170 __napi_poll+0x33/0x180 net_rx_action+0x126/0x280 ? ttwu_do_activate+0x72/0xf0 __do_softirq+0xd9/0x2e7 ? rcu_report_exp_cpu_mult+0x1b0/0x1b0 do_softirq+0x7d/0xb0 __local_bh_enable_ip+0x54/0x60 ip_finish_output2+0x191/0x460 __ip_finish_output+0xb7/0x180 ip_finish_output+0x2e/0xc0 ip_output+0x78/0x100 ? __ip_finish_output+0x180/0x180 ip_local_out+0x5e/0x70 __ip_queue_xmit+0x184/0x440 ? tcp_syn_options+0x1f9/0x300 ip_queue_xmit+0x15/0x20 __tcp_transmit_skb+0x910/0x9c0 ? __mod_memcg_state+0x44/0xa0 tcp_connect+0x437/0x4e0 ? ktime_get_with_offset+0x60/0xf0 tcp_v4_connect+0x436/0x530 __inet_stream_connect+0xd4/0x3a0 ? kprobe_perf_func+0x4f/0x2b0 ? aa_sk_perm+0x43/0x1c0 inet_stream_connect+0x3b/0x60 __sys_connect_file+0x63/0x70 __sys_connect+0xa6/0xd0 ? setfl+0x108/0x170 ? do_fcntl+0xe8/0x5a0 __x64_sys_connect+0x18/0x20 do_syscall_64+0x5c/0xc0 ? __x64_sys_fcntl+0xa9/0xd0 ? exit_to_user_mode_prepare+0x37/0xb0 ? syscall_exit_to_user_mode+0x27/0x50 ? do_syscall_64+0x69/0xc0 ? __sys_setsockopt+0xea/0x1e0 ? exit_to_user_mode_prepare+0x37/0xb0 ? syscall_exit_to_user_mode+0x27/0x50 ? __x64_sys_setsockopt+0x1f/0x30 ? do_syscall_64+0x69/0xc0 ? irqentry_exit+0x1d/0x30 ? exc_page_fault+0x89/0x170 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f7b8101c6a7 Code: 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 2a 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 18 89 54 24 0c 48 89 34 24 89 RSP: 002b:00007ffffd6b2198 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f7b8101c6a7 RDX: 0000000000000010 RSI: 00007ffffd6b2360 RDI: 0000000000000005 RBP: 0000561f1370d560 R08: 00002795ad21d1ac R09: 0030312e302e302e R10: 00007ffffd73f080 R11: 0000000000000246 R12: 0000561f1370c410 R13: 0000000000000000 R14: 0000000000000005 R15: 0000000000000000 Fixes: 7f8a436eaa2c ("openvswitch: Add conntrack action") Co-developed-by: Luca Czesla Signed-off-by: Luca Czesla Signed-off-by: Felix Huettner Reviewed-by: Eric Dumazet Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/ZC0pBXBAgh7c76CA@kernel-bug-kernel-bug Signed-off-by: Jakub Kicinski commit 029294d01907ac4ae7c57bbb122fef2367136ed4 Merge: b9881d9a761a7 919e659ed1256 Author: Jakub Kicinski Date: Fri Apr 7 18:23:36 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-04-08 We've added 4 non-merge commits during the last 11 day(s) which contain a total of 5 files changed, 39 insertions(+), 6 deletions(-). The main changes are: 1) Fix BPF TCP socket iterator to use correct helper for dropping socket's refcount, that is, sock_gen_put instead of sock_put, from Martin KaFai Lau. 2) Fix a BTI exception splat in BPF trampoline-generated code on arm64, from Xu Kuohai. 3) Fix a LongArch JIT error from missing BPF_NOSPEC no-op, from George Guo. 4) Fix dynamic XDP feature detection of veth in xdp_redirect selftest, from Lorenzo Bianconi. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: selftests/bpf: fix xdp_redirect xdp-features selftest for veth driver bpf, arm64: Fixed a BTI error on returning to patched function LoongArch, bpf: Fix jit to skip speculation barrier opcode bpf: tcp: Use sock_gen_put instead of sock_put in bpf_iter_tcp ==================== Link: https://lore.kernel.org/r/20230407224642.30906-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit aa318c48808c0aa73216bd94c54c4553d3663add Merge: c9797dba13141 7b75c4703609a Author: Linus Torvalds Date: Fri Apr 7 13:53:16 2023 -0700 Merge tag 'gpio-fixes-for-v6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - fix irq handling in gpio-davinci - fix Kconfig dependencies for gpio-regmap * tag 'gpio-fixes-for-v6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: davinci: Add irq chip flag to skip set wake gpio: davinci: Do not clear the bank intr enable bit in save_context gpio: GPIO_REGMAP: select REGMAP instead of depending on it commit c9797dba13141de7d7211aacfadb4cdba67a4716 Merge: d523dc7b16c4a a5b2781dcab2c Author: Linus Torvalds Date: Fri Apr 7 13:32:54 2023 -0700 Merge tag 'acpi-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "Fix the ACPI backlight override mechanism for the cases when acpi_backlight=video is set through the kernel command line or a DMI quirk and add backlight quirks for Apple iMac14,1 and iMac14,2 and Lenovo ThinkPad W530 (Hans de Goede)" * tag 'acpi-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: video: Add acpi_backlight=video quirk for Lenovo ThinkPad W530 ACPI: video: Add acpi_backlight=video quirk for Apple iMac14,1 and iMac14,2 ACPI: video: Make acpi_backlight=video work independent from GPU driver ACPI: video: Add auto_detect arg to __acpi_video_get_backlight_type() commit d523dc7b16c4a3697700348d77a8a9bf37555e97 Merge: a1e6fff395d32 32d8599968060 Author: Linus Torvalds Date: Fri Apr 7 13:27:02 2023 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fix from Catalin Marinas: "Fix uninitialised variable warning (from smatch) in the arm64 compat alignment fixup code" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: compat: Work around uninitialized variable warning commit a1e6fff395d3209511f6a2264c5b6256614afaa3 Merge: f2afccfefe7be dc8289f912387 Author: Linus Torvalds Date: Fri Apr 7 13:10:23 2023 -0700 Merge tag '6.3-rc5-ksmbd-server-fixes' of git://git.samba.org/ksmbd Pull ksmbd server fixes from Steve French: "Four fixes, three for stable: - slab out of bounds fix - lock cancellation fix - minor cleanup to address clang warning - fix for xfstest 551 (wrong parms passed to kvmalloc)" * tag '6.3-rc5-ksmbd-server-fixes' of git://git.samba.org/ksmbd: ksmbd: fix slab-out-of-bounds in init_smb2_rsp_hdr ksmbd: delete asynchronous work from list ksmbd: remove unused is_char_allowed function ksmbd: do not call kvmalloc() with __GFP_NORETRY | __GFP_NO_WARN commit 75eab749e7aec0b7b515d7c50ed429ef4e1c5f3f Author: Abhinav Kumar Date: Wed Mar 29 16:34:16 2023 -0700 arm64: dts: qcom: sc7280: remove hbr3 support on herobrine boards There are some interop issues seen across a few DP monitors with HBR3 and herobrine boards where the DP display stays blank with hbr3. This is still under investigation but in preparation for supporting higher resolutions, its better to disable HBR3 till the issues are root-caused as there is really no guarantee which monitors will show the issue and which would not. This can be enabled back after successful validation across more DP sinks. Signed-off-by: Abhinav Kumar Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230329233416.27152-1-quic_abhinavk@quicinc.com commit 9c85b7fa12ef2e4fc11a4e31ac595fb5f9d0ddf9 Author: Ahmed Zaki Date: Thu Apr 6 15:35:28 2023 -0600 iavf: remove active_cvlans and active_svlans bitmaps The VLAN filters info is currently being held in a list and 2 bitmaps (active_cvlans and active_svlans). We are experiencing some racing where data is not in sync in the list and bitmaps. For example, the VLAN is initially added to the list but only when the PF replies, it is added to the bitmap. If a user adds many V2 VLANS before the PF responds: while [ $((i++)) ] ip l add l eth0 name eth0.$i type vlan id $i we might end up with more VLAN list entries than the designated limit. Also, The "ip link show" will show more links added than the PF limit. On the other and, the bitmaps are only used to check the number of VLAN filters and to re-enable the filters when the interface goes from DOWN to UP. This patch gets rid of the bitmaps and uses the list only. To do that, the states of the VLAN filter are modified: 1 - IAVF_VLAN_REMOVE: the entry needs to be totally removed after informing the PF. This is the "ip link del eth0.$i" path. 2 - IAVF_VLAN_DISABLE: (new) the netdev went down. The filter needs to be removed from the PF and then marked INACTIVE. 3 - IAVF_VLAN_INACTIVE: (new) no PF filter exists, but the user did not delete the VLAN. Fixes: 48ccc43ecf10 ("iavf: Add support VIRTCHNL_VF_OFFLOAD_VLAN_V2 during netdev config") Signed-off-by: Ahmed Zaki Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit 0c0da0e951053fda20412cd284e2714bbbb31bff Author: Ahmed Zaki Date: Thu Apr 6 15:35:27 2023 -0600 iavf: refactor VLAN filter states The VLAN filter states are currently being saved as individual bits. This is error prone as multiple bits might be mistakenly set. Fix by replacing the bits with a single state enum. Also, add an "ACTIVE" state for filters that are accepted by the PF. Signed-off-by: Ahmed Zaki Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit b9881d9a761a7e078c394ff8e30e1659d74f898f Merge: dc5110c2d959c 2e825f8accb44 Author: David S. Miller Date: Fri Apr 7 08:47:20 2023 +0100 Merge branch 'bonding-ns-validation-fixes' Hangbin Liu says: ==================== bonding: fix ns validation on backup slaves The first patch fixed a ns validation issue on backup slaves. The second patch re-format the bond option test and add a test lib file. The third patch add the arp validate regression test for the kernel patch. Here is the new bonding option test without the kernel fix: ]# ./bond_options.sh TEST: prio (active-backup miimon primary_reselect 0) [ OK ] TEST: prio (active-backup miimon primary_reselect 1) [ OK ] TEST: prio (active-backup miimon primary_reselect 2) [ OK ] TEST: prio (active-backup arp_ip_target primary_reselect 0) [ OK ] TEST: prio (active-backup arp_ip_target primary_reselect 1) [ OK ] TEST: prio (active-backup arp_ip_target primary_reselect 2) [ OK ] TEST: prio (active-backup ns_ip6_target primary_reselect 0) [ OK ] TEST: prio (active-backup ns_ip6_target primary_reselect 1) [ OK ] TEST: prio (active-backup ns_ip6_target primary_reselect 2) [ OK ] TEST: prio (balance-tlb miimon primary_reselect 0) [ OK ] TEST: prio (balance-tlb miimon primary_reselect 1) [ OK ] TEST: prio (balance-tlb miimon primary_reselect 2) [ OK ] TEST: prio (balance-tlb arp_ip_target primary_reselect 0) [ OK ] TEST: prio (balance-tlb arp_ip_target primary_reselect 1) [ OK ] TEST: prio (balance-tlb arp_ip_target primary_reselect 2) [ OK ] TEST: prio (balance-tlb ns_ip6_target primary_reselect 0) [ OK ] TEST: prio (balance-tlb ns_ip6_target primary_reselect 1) [ OK ] TEST: prio (balance-tlb ns_ip6_target primary_reselect 2) [ OK ] TEST: prio (balance-alb miimon primary_reselect 0) [ OK ] TEST: prio (balance-alb miimon primary_reselect 1) [ OK ] TEST: prio (balance-alb miimon primary_reselect 2) [ OK ] TEST: prio (balance-alb arp_ip_target primary_reselect 0) [ OK ] TEST: prio (balance-alb arp_ip_target primary_reselect 1) [ OK ] TEST: prio (balance-alb arp_ip_target primary_reselect 2) [ OK ] TEST: prio (balance-alb ns_ip6_target primary_reselect 0) [ OK ] TEST: prio (balance-alb ns_ip6_target primary_reselect 1) [ OK ] TEST: prio (balance-alb ns_ip6_target primary_reselect 2) [ OK ] TEST: arp_validate (active-backup arp_ip_target arp_validate 0) [ OK ] TEST: arp_validate (active-backup arp_ip_target arp_validate 1) [ OK ] TEST: arp_validate (active-backup arp_ip_target arp_validate 2) [ OK ] TEST: arp_validate (active-backup arp_ip_target arp_validate 3) [ OK ] TEST: arp_validate (active-backup arp_ip_target arp_validate 4) [ OK ] TEST: arp_validate (active-backup arp_ip_target arp_validate 5) [ OK ] TEST: arp_validate (active-backup arp_ip_target arp_validate 6) [ OK ] TEST: arp_validate (active-backup ns_ip6_target arp_validate 0) [ OK ] TEST: arp_validate (active-backup ns_ip6_target arp_validate 1) [ OK ] TEST: arp_validate (interface eth1 mii_status DOWN) [FAIL] TEST: arp_validate (interface eth2 mii_status DOWN) [FAIL] TEST: arp_validate (active-backup ns_ip6_target arp_validate 2) [FAIL] TEST: arp_validate (interface eth1 mii_status DOWN) [FAIL] TEST: arp_validate (interface eth2 mii_status DOWN) [FAIL] TEST: arp_validate (active-backup ns_ip6_target arp_validate 3) [FAIL] TEST: arp_validate (active-backup ns_ip6_target arp_validate 4) [ OK ] TEST: arp_validate (active-backup ns_ip6_target arp_validate 5) [ OK ] TEST: arp_validate (interface eth1 mii_status DOWN) [FAIL] TEST: arp_validate (interface eth2 mii_status DOWN) [FAIL] TEST: arp_validate (active-backup ns_ip6_target arp_validate 6) [FAIL] Here is the test result after the kernel fix: TEST: arp_validate (active-backup arp_ip_target arp_validate 0) [ OK ] TEST: arp_validate (active-backup arp_ip_target arp_validate 1) [ OK ] TEST: arp_validate (active-backup arp_ip_target arp_validate 2) [ OK ] TEST: arp_validate (active-backup arp_ip_target arp_validate 3) [ OK ] TEST: arp_validate (active-backup arp_ip_target arp_validate 4) [ OK ] TEST: arp_validate (active-backup arp_ip_target arp_validate 5) [ OK ] TEST: arp_validate (active-backup arp_ip_target arp_validate 6) [ OK ] TEST: arp_validate (active-backup ns_ip6_target arp_validate 0) [ OK ] TEST: arp_validate (active-backup ns_ip6_target arp_validate 1) [ OK ] TEST: arp_validate (active-backup ns_ip6_target arp_validate 2) [ OK ] TEST: arp_validate (active-backup ns_ip6_target arp_validate 3) [ OK ] TEST: arp_validate (active-backup ns_ip6_target arp_validate 4) [ OK ] TEST: arp_validate (active-backup ns_ip6_target arp_validate 5) [ OK ] TEST: arp_validate (active-backup ns_ip6_target arp_validate 6) [ OK ] ==================== Signed-off-by: David S. Miller commit 2e825f8accb4491466677162cd9893fe77aea2f9 Author: Hangbin Liu Date: Thu Apr 6 16:23:52 2023 +0800 selftests: bonding: add arp validate test This patch add bonding arp validate tests with mode active backup, monitor arp_ip_target and ns_ip6_target. It also checks mii_status to make sure all slaves are UP. Acked-by: Jonathan Toppins Acked-by: Jay Vosburgh Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 481b56e0391ea46d6bf1a2604422a21063615901 Author: Hangbin Liu Date: Thu Apr 6 16:23:51 2023 +0800 selftests: bonding: re-format bond option tests To improve the testing process for bond options, A new bond topology lib is added to our testing setup. The current option_prio.sh file will be renamed to bond_options.sh so that all bonding options can be tested here. Specifically, for priority testing, we will run all tests using modes 1, 5, and 6. These changes will help us streamline the testing process and ensure that our bond options are rigorously evaluated. Acked-by: Jay Vosburgh Signed-off-by: Hangbin Liu Acked-by: Jonathan Toppins Signed-off-by: David S. Miller commit 4598380f9c548aa161eb4e990a1583f0a7d1e0d7 Author: Hangbin Liu Date: Thu Apr 6 16:23:50 2023 +0800 bonding: fix ns validation on backup slaves When arp_validate is set to 2, 3, or 6, validation is performed for backup slaves as well. As stated in the bond documentation, validation involves checking the broadcast ARP request sent out via the active slave. This helps determine which slaves are more likely to function in the event of an active slave failure. However, when the target is an IPv6 address, the NS message sent from the active interface is not checked on backup slaves. Additionally, based on the bond_arp_rcv() rule b, we must reverse the saddr and daddr when checking the NS message. Note that when checking the NS message, the destination address is a multicast address. Therefore, we must convert the target address to solicited multicast in the bond_get_targets_ip6() function. Prior to the fix, the backup slaves had a mii status of "down", but after the fix, all of the slaves' mii status was updated to "UP". Fixes: 4e24be018eb9 ("bonding: add new parameter ns_targets") Reviewed-by: Jonathan Toppins Acked-by: Jay Vosburgh Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit dc5110c2d959c1707e12df5f792f41d90614adaa Author: YueHaibing Date: Thu Apr 6 14:34:50 2023 +0800 tcp: restrict net.ipv4.tcp_app_win UBSAN: shift-out-of-bounds in net/ipv4/tcp_input.c:555:23 shift exponent 255 is too large for 32-bit type 'int' CPU: 1 PID: 7907 Comm: ssh Not tainted 6.3.0-rc4-00161-g62bad54b26db-dirty #206 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 Call Trace: dump_stack_lvl+0x136/0x150 __ubsan_handle_shift_out_of_bounds+0x21f/0x5a0 tcp_init_transfer.cold+0x3a/0xb9 tcp_finish_connect+0x1d0/0x620 tcp_rcv_state_process+0xd78/0x4d60 tcp_v4_do_rcv+0x33d/0x9d0 __release_sock+0x133/0x3b0 release_sock+0x58/0x1b0 'maxwin' is int, shifting int for 32 or more bits is undefined behaviour. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: YueHaibing Reviewed-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Signed-off-by: David S. Miller commit 8ce07be703456acb00e83d99f3b8036252c33b02 Author: Harshit Mogalapalli Date: Wed Apr 5 23:31:18 2023 -0700 niu: Fix missing unwind goto in niu_alloc_channels() Smatch reports: drivers/net/ethernet/sun/niu.c:4525 niu_alloc_channels() warn: missing unwind goto? If niu_rbr_fill() fails, then we are directly returning 'err' without freeing the channels. Fix this by changing direct return to a goto 'out_err'. Fixes: a3138df9f20e ("[NIU]: Add Sun Neptune ethernet driver.") Signed-off-by: Harshit Mogalapalli Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 4f5d5b33fc400911d6e1f49095522b361d9cbe13 Author: Dan Carpenter Date: Thu Apr 6 11:55:47 2023 +0300 cifs: double lock in cifs_reconnect_tcon() This lock was supposed to be an unlock. Fixes: 6cc041e90c17 ("cifs: avoid races in parallel reconnects in smb1") Signed-off-by: Dan Carpenter Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 3723091ea1884d599cc8b8bf719d6f42e8d4d8b1 Author: Yu Kuai Date: Wed Mar 22 11:59:26 2023 +0800 block: don't set GD_NEED_PART_SCAN if scan partition failed Currently if disk_scan_partitions() failed, GD_NEED_PART_SCAN will still set, and partition scan will be proceed again when blkdev_get_by_dev() is called. However, this will cause a problem that re-assemble partitioned raid device will creat partition for underlying disk. Test procedure: mdadm -CR /dev/md0 -l 1 -n 2 /dev/sda /dev/sdb -e 1.0 sgdisk -n 0:0:+100MiB /dev/md0 blockdev --rereadpt /dev/sda blockdev --rereadpt /dev/sdb mdadm -S /dev/md0 mdadm -A /dev/md0 /dev/sda /dev/sdb Test result: underlying disk partition and raid partition can be observed at the same time Note that this can still happen in come corner cases that GD_NEED_PART_SCAN can be set for underlying disk while re-assemble raid device. Fixes: e5cfefa97bcc ("block: fix scan partition for exclusively open device again") Reviewed-by: Jan Kara Reviewed-by: Ming Lei Signed-off-by: Yu Kuai Signed-off-by: Jens Axboe commit 30ba2d09edb5ea857a1473ae3d820911347ada62 Author: Rob Herring Date: Wed Mar 29 07:38:35 2023 -0500 PCI: Fix use-after-free in pci_bus_release_domain_nr() Commit c14f7ccc9f5d ("PCI: Assign PCI domain IDs by ida_alloc()") introduced a use-after-free bug in the bus removal cleanup. The issue was found with kfence: [ 19.293351] BUG: KFENCE: use-after-free read in pci_bus_release_domain_nr+0x10/0x70 [ 19.302817] Use-after-free read at 0x000000007f3b80eb (in kfence-#115): [ 19.309677] pci_bus_release_domain_nr+0x10/0x70 [ 19.309691] dw_pcie_host_deinit+0x28/0x78 [ 19.309702] tegra_pcie_deinit_controller+0x1c/0x38 [pcie_tegra194] [ 19.309734] tegra_pcie_dw_probe+0x648/0xb28 [pcie_tegra194] [ 19.309752] platform_probe+0x90/0xd8 ... [ 19.311457] kfence-#115: 0x00000000063a155a-0x00000000ba698da8, size=1072, cache=kmalloc-2k [ 19.311469] allocated by task 96 on cpu 10 at 19.279323s: [ 19.311562] __kmem_cache_alloc_node+0x260/0x278 [ 19.311571] kmalloc_trace+0x24/0x30 [ 19.311580] pci_alloc_bus+0x24/0xa0 [ 19.311590] pci_register_host_bridge+0x48/0x4b8 [ 19.311601] pci_scan_root_bus_bridge+0xc0/0xe8 [ 19.311613] pci_host_probe+0x18/0xc0 [ 19.311623] dw_pcie_host_init+0x2c0/0x568 [ 19.311630] tegra_pcie_dw_probe+0x610/0xb28 [pcie_tegra194] [ 19.311647] platform_probe+0x90/0xd8 ... [ 19.311782] freed by task 96 on cpu 10 at 19.285833s: [ 19.311799] release_pcibus_dev+0x30/0x40 [ 19.311808] device_release+0x30/0x90 [ 19.311814] kobject_put+0xa8/0x120 [ 19.311832] device_unregister+0x20/0x30 [ 19.311839] pci_remove_bus+0x78/0x88 [ 19.311850] pci_remove_root_bus+0x5c/0x98 [ 19.311860] dw_pcie_host_deinit+0x28/0x78 [ 19.311866] tegra_pcie_deinit_controller+0x1c/0x38 [pcie_tegra194] [ 19.311883] tegra_pcie_dw_probe+0x648/0xb28 [pcie_tegra194] [ 19.311900] platform_probe+0x90/0xd8 ... [ 19.313579] CPU: 10 PID: 96 Comm: kworker/u24:2 Not tainted 6.2.0 #4 [ 19.320171] Hardware name: /, BIOS 1.0-d7fb19b 08/10/2022 [ 19.325852] Workqueue: events_unbound deferred_probe_work_func The stack trace is a bit misleading as dw_pcie_host_deinit() doesn't directly call pci_bus_release_domain_nr(). The issue turns out to be in pci_remove_root_bus() which first calls pci_remove_bus() which frees the struct pci_bus when its struct device is released. Then pci_bus_release_domain_nr() is called and accesses the freed struct pci_bus. Reordering these fixes the issue. Fixes: c14f7ccc9f5d ("PCI: Assign PCI domain IDs by ida_alloc()") Link: https://lore.kernel.org/r/20230329123835.2724518-1-robh@kernel.org Link: https://lore.kernel.org/r/b529cb69-0602-9eed-fc02-2f068707a006@nvidia.com Reported-by: Jon Hunter Tested-by: Jon Hunter Signed-off-by: Rob Herring Signed-off-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan Cc: stable@vger.kernel.org # v6.2+ Cc: Pali Rohár commit 1c5f054f0b12875096e339861c7f44a7c952ce56 Author: Vincenzo Palazzo Date: Thu Mar 2 14:21:07 2023 +0100 rust: build: Fix grep warning Fix grep warning during the build, with GNU grep 3.8 with the following command `grep -v '^\#\|^$$' rust/bindgen_parameters` I see the following warning ``` grep: warning: stray \ before # --opaque-type xregs_state --opaque-type desc_struct --opaque-type arch_lbr_state --opaque-type local_apic --opaque-type x86_msi_data --opaque-type x86_msi_addr_lo --opaque-type kunit_try_catch --opaque-type spinlock --no-doc-comments ``` Signed-off-by: Vincenzo Palazzo Tested-by: Martin Rodriguez Reboredo Reviewed-by: Martin Rodriguez Reboredo Signed-off-by: Miguel Ojeda commit 5c7548d5a25306dcdb97689479be81cacc8ce596 Author: Asahi Lina Date: Fri Apr 7 00:25:22 2023 +0200 scripts: generate_rust_analyzer: Handle sub-modules with no Makefile More complex drivers might want to use modules to organize their Rust code, but those module folders do not need a Makefile. generate_rust_analyzer.py currently crashes on those. Fix it so that a missing Makefile is silently ignored. Link: https://github.com/Rust-for-Linux/linux/pull/883 Signed-off-by: Asahi Lina Signed-off-by: Miguel Ojeda commit 1e1d3574e69f70b848f9d50eca2c5ff04931b7ba 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 f195fc1e9715ba826c3b62d58038f760f66a4fe9 Author: Basavaraj Natikar Date: Wed Mar 29 22:58:59 2023 +0530 x86/PCI: Add quirk for AMD XHCI controller that loses MSI-X state in D3hot The AMD [1022:15b8] USB controller loses some internal functional MSI-X context when transitioning from D0 to D3hot. BIOS normally traps D0->D3hot and D3hot->D0 transitions so it can save and restore that internal context, but some firmware in the field can't do this because it fails to clear the AMD_15B8_RCC_DEV2_EPF0_STRAP2 NO_SOFT_RESET bit. Clear AMD_15B8_RCC_DEV2_EPF0_STRAP2 NO_SOFT_RESET bit before USB controller initialization during boot. Link: https://lore.kernel.org/linux-usb/Y%2Fz9GdHjPyF2rNG3@glanzmann.de/T/#u Link: https://lore.kernel.org/r/20230329172859.699743-1-Basavaraj.Natikar@amd.com Reported-by: Thomas Glanzmann Tested-by: Thomas Glanzmann Signed-off-by: Basavaraj Natikar Signed-off-by: Bjorn Helgaas Reviewed-by: Mario Limonciello Cc: stable@vger.kernel.org commit 195d8e5da3acb17c5357526494f818a21e97cd10 Author: Reinette Chatre Date: Wed Mar 29 13:13:11 2023 -0700 PCI/MSI: Provide missing stub for pci_msix_can_alloc_dyn() pci_msix_can_alloc_dyn() is not declared when CONFIG_PCI_MSI is disabled. There is no existing user of pci_msix_can_alloc_dyn() but work is in progress to change this. This work encounters the following error when CONFIG_PCI_MSI is disabled: drivers/vfio/pci/vfio_pci_intrs.c:427:21: error: implicit declaration of function 'pci_msix_can_alloc_dyn' [-Werror=implicit-function-declaration] Provide definition for pci_msix_can_alloc_dyn() in preparation for users that need to compile when CONFIG_PCI_MSI is disabled. [bhelgaas: Also reported by Arnd Bergmann in drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c; added his Fixes: line] Fixes: fb0a6a268dcd ("net/mlx5: Provide external API for allocating vectors") Fixes: 34026364df8e ("PCI/MSI: Provide post-enable dynamic allocation interfaces for MSI-X") Link: https://lore.kernel.org/oe-kbuild-all/202303291000.PWFqGCxH-lkp@intel.com/ Link: https://lore.kernel.org/r/310ecc4815dae4174031062f525245f0755c70e2.1680119924.git.reinette.chatre@intel.com Reported-by: kernel test robot Signed-off-by: Reinette Chatre Signed-off-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan Cc: stable@vger.kernel.org # v6.2+ commit 4f7e22b8b6341e6411cec9db97e20c2a2dbcdbff Merge: a425efcb6e079 8056dc043d7f7 Author: Arnd Bergmann Date: Thu Apr 6 23:18:58 2023 +0200 Merge tag 'riscv-dt-fixes-for-v6.3-final' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into arm/fixes RISC-V Devicetree fixes for v6.3-final A solitary fix here from Krzysztof for an invalid property that should've probably been removed months ago, but was missed due to it being in a dtb that doesn't build w/ defconfig. Signed-off-by: Conor Dooley * tag 'riscv-dt-fixes-for-v6.3-final' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: riscv: dts: canaan: drop invalid spi-max-frequency Link: https://lore.kernel.org/r/20230406-negate-octagon-0fc2e47dbde5@spud Signed-off-by: Arnd Bergmann commit c682e4c37d2b8ba3bde1125cbbea4ee88824b4e2 Author: David Gow Date: Wed Feb 15 06:47:35 2023 +0800 rust: kernel: Mark rust_fmt_argument as extern "C" The rust_fmt_argument function is called from printk() to handle the %pA format specifier. Since it's called from C, we should mark it extern "C" to make sure it's ABI compatible. Cc: stable@vger.kernel.org Fixes: 247b365dc8dc ("rust: add `kernel` crate") Signed-off-by: David Gow Reviewed-by: Gary Guo Reviewed-by: Björn Roy Baron Reviewed-by: Vincenzo Palazzo [Applied `rustfmt`] Signed-off-by: Miguel Ojeda commit e5e86572e3f20222b5d308df9ae986c06f229321 Author: Thomas Bamelis Date: Sun Feb 26 15:29:29 2023 +0000 rust: sort uml documentation arch support table The arch_support table was not sorted alphabetically. Sorts the table properly. Fixes: 0438aadfa69a ("rust: arch/um: Add support for CONFIG_RUST under x86_64 UML") Link: https://lore.kernel.org/rust-for-linux/CANiq72nXMsnUsJNZOG-QZiCVOqa9dRUSMc4RAS3ExLZNJ7VhHg@mail.gmail.com Reported-by: Miguel Ojeda Signed-off-by: Thomas Bamelis Reviewed-by: David Gow Signed-off-by: Miguel Ojeda commit c5d5b55b3c1a314137a251efc1001dfd435c6242 Author: Cristian Ciocaltea Date: Thu Apr 6 20:18:01 2023 +0300 regulator: fan53555: Fix wrong TCS_SLEW_MASK The support for TCS4525 regulator has been introduced with a wrong ramp-rate mask, which has been defined as a logical expression instead of a bit shift operation. For clarity, fix it using GENMASK() macro. Fixes: 914df8faa7d6 ("regulator: fan53555: Add TCS4525 DCDC support") Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230406171806.948290-4-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown commit 4fb9a5060f73627303bc531ceaab1b19d0a24aef Author: Cristian Ciocaltea Date: Thu Apr 6 20:18:00 2023 +0300 regulator: fan53555: Explicitly include bits header Since commit f2a9eb975ab2 ("regulator: fan53555: Add support for FAN53526") the driver makes use of the BIT() macro, but relies on the bits header being implicitly included. Explicitly pull the header in to avoid potential build failures in some configurations. While here, reorder include directives alphabetically. Fixes: f2a9eb975ab2 ("regulator: fan53555: Add support for FAN53526") Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230406171806.948290-3-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown commit 88e8c2ec4ab84f9f05ed5af9693a3972baf386c4 Author: Patrick Blass Date: Fri Mar 3 20:06:29 2023 +0100 rust: str: fix requierments->requirements typo Fix a trivial spelling error in the `rust/kernel/str.rs` file. Fixes: 247b365dc8dc ("rust: add `kernel` crate") Reported-by: Miguel Ojeda Link: https://github.com/Rust-for-Linux/linux/issues/978 Signed-off-by: Patrick Blass Reviewed-by: Vincenzo Palazzo [Reworded slightly] Signed-off-by: Miguel Ojeda commit 31c683967174b487939efaf65e41f5ff1404e141 Author: Steven Rostedt (Google) Date: Thu Apr 6 11:10:33 2023 -0400 tracing/synthetic: Make lastcmd_mutex static The lastcmd_mutex is only used in trace_events_synth.c and should be static. Link: https://lore.kernel.org/linux-trace-kernel/202304062033.cRStgOuP-lkp@intel.com/ Link: https://lore.kernel.org/linux-trace-kernel/20230406111033.6e26de93@gandalf.local.home Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Tze-nan Wu Fixes: 4ccf11c4e8a8e ("tracing/synthetic: Fix races on freeing last_cmd") Reviewed-by: Mukesh Ojha Reported-by: kernel test robot Signed-off-by: Steven Rostedt (Google) commit 10b6b4a8ac6120ec36555fd286eed577f7632e3b Author: Mario Limonciello Date: Fri Mar 31 11:08:42 2023 -0500 ACPI: x86: utils: Add Picasso to the list for forcing StorageD3Enable Picasso was the first APU that introduced s2idle support from AMD, and it was predating before vendors started to use `StorageD3Enable` in their firmware. Windows doesn't have problems with this hardware and NVME so it was likely on the list of hardcoded CPUs to use this behavior in Windows. Add it to the list for Linux to avoid NVME resume issues. Reported-by: Stuart Axon Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2449 Signed-off-by: Mario Limonciello Signed-off-by: Rafael J. Wysocki commit f2afccfefe7be1f7346564fe619277110d341f9b Merge: 8f2e1a855b47f 8fbc10b995a50 Author: Linus Torvalds Date: Thu Apr 6 11:39:07 2023 -0700 Merge tag 'net-6.3-rc6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from wireless and can. Current release - regressions: - wifi: mac80211: - fix potential null pointer dereference - fix receiving mesh packets in forwarding=0 networks - fix mesh forwarding Current release - new code bugs: - virtio/vsock: fix leaks due to missing skb owner Previous releases - regressions: - raw: fix NULL deref in raw_get_next(). - sctp: check send stream number after wait_for_sndbuf - qrtr: - fix a refcount bug in qrtr_recvmsg() - do not do DEL_SERVER broadcast after DEL_CLIENT - wifi: brcmfmac: fix SDIO suspend/resume regression - wifi: mt76: fix use-after-free in fw features query. - can: fix race between isotp_sendsmg() and isotp_release() - eth: mtk_eth_soc: fix remaining throughput regression - eth: ice: reset FDIR counter in FDIR init stage Previous releases - always broken: - core: don't let netpoll invoke NAPI if in xmit context - icmp: guard against too small mtu - ipv6: fix an uninit variable access bug in __ip6_make_skb() - wifi: mac80211: fix the size calculation of ieee80211_ie_len_eht_cap() - can: fix poll() to not report false EPOLLOUT events - eth: gve: secure enough bytes in the first TX desc for all TCP pkts" * tag 'net-6.3-rc6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (47 commits) net: stmmac: check fwnode for phy device before scanning for phy net: stmmac: Add queue reset into stmmac_xdp_open() function selftests: net: rps_default_mask.sh: delete veth link specifically net: fec: make use of MDIO C45 quirk can: isotp: fix race between isotp_sendsmg() and isotp_release() can: isotp: isotp_ops: fix poll() to not report false EPOLLOUT events can: isotp: isotp_recvmsg(): use sock_recv_cmsgs() to get SOCK_RXQ_OVFL infos can: j1939: j1939_tp_tx_dat_new(): fix out-of-bounds memory access gve: Secure enough bytes in the first TX desc for all TCP pkts netlink: annotate lockless accesses to nlk->max_recvmsg_len ethtool: reset #lanes when lanes is omitted ping: Fix potentail NULL deref for /proc/net/icmp. raw: Fix NULL deref in raw_get_next(). ice: Reset FDIR counter in FDIR init stage ice: fix wrong fallback logic for FDIR net: stmmac: fix up RX flow hash indirection table when setting channels net: ethernet: ti: am65-cpsw: Fix mdio cleanup in probe wifi: mt76: ignore key disable commands wifi: ath11k: reduce the MHI timeout to 20s ipv6: Fix an uninit variable access bug in __ip6_make_skb() ... commit 8f2e1a855b47fa9fd936eafa617a7ab4582bd916 Merge: 105b64c83872c f1594bc676579 Author: Linus Torvalds Date: Thu Apr 6 11:34:18 2023 -0700 Merge tag 'linux-kselftest-fixes-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest fixes from Shuah Khan: "One single fix to mount_setattr_test build failure" * tag 'linux-kselftest-fixes-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests mount: Fix mount_setattr_test builds failed commit 105b64c83872c39d86c1e3dea9ee4185c62114dc Merge: ae52f797904ef 13a0d1ae7ee6b Author: Linus Torvalds Date: Thu Apr 6 11:27:21 2023 -0700 Merge tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd Pull iommufd fixes from Jason Gunthorpe: - An invalid VA range can be be put in a pages and eventually trigger WARN_ON, reject it early - Use of the wrong start index value when doing the complex batch carry scheme - Wrong store ordering resulting in corrupting data used in a later calculation that corrupted the batch structure during carry * tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd: 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 commit ae52f797904ef0e98951e43d15a274fa8e80bbe5 Merge: ac6c043391b26 1271a7b98e798 Author: Linus Torvalds Date: Thu Apr 6 11:08:03 2023 -0700 Merge tag 'pwm/for-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm fixes from Thierry Reding: "These are some fixes to make sure the PWM state structure is always initialized to a known state. Prior to this it could happen in some situations that random data from the stack would leak into the data structure and cause subtle bugs" * tag 'pwm/for-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: pwm: Zero-initialize the pwm_state passed to driver's .get_state() pwm: meson: Explicitly set .polarity in .get_state() pwm: sprd: Explicitly set .polarity in .get_state() pwm: iqs620a: Explicitly set .polarity in .get_state() pwm: cros-ec: Explicitly set .polarity in .get_state() pwm: hibvt: Explicitly set .polarity in .get_state() commit 0bf9601f8ef0703523018e975d6c1f3fdfcff4b9 Merge: fb5015bc8b733 e81625218bf79 Author: Paolo Bonzini Date: Thu Apr 6 13:34:19 2023 -0400 Merge tag 'kvmarm-fixes-6.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.3, part #3 - Ensure the guest PMU context is restored before the first KVM_RUN, fixing an issue where EL0 event counting is broken after vCPU save/restore - Actually initialize ID_AA64PFR0_EL1.{CSV2,CSV3} based on the sanitized, system-wide values for protected VMs commit ac6c043391b266a360a53f933638003365bd10c9 Merge: 2a28a8b3659cf 3dfa8926efa91 Author: Linus Torvalds Date: Thu Apr 6 10:25:27 2023 -0700 Merge tag 'drm-fixes-2023-04-06' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Daniel Vetter: "Mostly i915 fixes: dp mst for compression/dsc, perf ioctl uaf, ctx rpm accounting, gt reset vs huc loading. And a few individual driver fixes: ivpu dma fence&suspend, panfrost mmap, nouveau color depth" * tag 'drm-fixes-2023-04-06' of git://anongit.freedesktop.org/drm/drm: accel/ivpu: Fix S3 system suspend when not idle accel/ivpu: Add dma fence to command buffers only drm/i915: Fix context runtime accounting drm/i915: fix race condition UAF in i915_perf_add_config_ioctl drm/i915: Use compressed bpp when calculating m/n value for DP MST DSC drm/i915/huc: Cancel HuC delayed load timer on reset. drm/i915/ttm: fix sparse warning drm/panfrost: Fix the panfrost_mmu_map_fault_addr() error path drm/nouveau/disp: Support more modes by checking with lower bpc commit 2a28a8b3659cff2dd2042baacd7cca53badca9d6 Merge: 8dfab5237d9f7 f785f5ee968f7 Author: Linus Torvalds Date: Thu Apr 6 10:19:30 2023 -0700 Merge tag 'sound-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "The majority of changes here are various fixes for Intel drivers, and there is a change in ASoC PCM core for the format constraints. In addition, a workaround for HD-audio HDMI regressions and usual HD-audio quirks are found" * tag 'sound-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/hdmi: Preserve the previous PCM device upon re-enablement ALSA: hda/realtek: Add quirk for Clevo X370SNW ALSA: hda/realtek: fix mute/micmute LEDs for a HP ProBook ASoC: SOF: avoid a NULL dereference with unsupported widgets ASoC: da7213.c: add missing pm_runtime_disable() ASoC: hdac_hdmi: use set_stream() instead of set_tdm_slots() ASoC: codecs: lpass: fix the order or clks turn off during suspend ASoC: Intel: bytcr_rt5640: Add quirk for the Acer Iconia One 7 B1-750 ASoC: SOF: ipc4: Ensure DSP is in D0I0 during sof_ipc4_set_get_data() ASoC: amd: yc: Add DMI entries to support Victus by HP Laptop 16-e1xxx (8A22) ASoC: soc-pcm: fix hw->formats cleared by soc_pcm_hw_init() for dpcm ASoC: Intel: soc-acpi: add table for Intel 'Rooks County' NUC M15 ASOC: Intel: sof_sdw: add quirk for Intel 'Rooks County' NUC M15 commit 8dfab5237d9f728fab8528a5673d8348996a898f Merge: fcff5f99eaf06 9a469c6dfab38 Author: Linus Torvalds Date: Thu Apr 6 10:13:23 2023 -0700 Merge tag 'platform-drivers-x86-v6.3-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Hans de Goede: - more think-lmi fixes - one DMI quirk addition * tag 'platform-drivers-x86-v6.3-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: thinkpad_acpi: Add missing T14s Gen1 type to s2idle quirk list platform/x86: think-lmi: Clean up display of current_value on Thinkstation platform/x86: think-lmi: Fix memory leaks when parsing ThinkStation WMI strings platform/x86: think-lmi: Fix memory leak when showing current settings commit 5da7cb193db32da783a3f3e77d8b639989321d48 Author: Ziwei Dai Date: Fri Mar 31 20:42:09 2023 +0800 rcu/kvfree: Avoid freeing new kfree_rcu() memory after old grace period Memory passed to kvfree_rcu() that is to be freed is tracked by a per-CPU kfree_rcu_cpu structure, which in turn contains pointers to kvfree_rcu_bulk_data structures that contain pointers to memory that has not yet been handed to RCU, along with an kfree_rcu_cpu_work structure that tracks the memory that has already been handed to RCU. These structures track three categories of memory: (1) Memory for kfree(), (2) Memory for kvfree(), and (3) Memory for both that arrived during an OOM episode. The first two categories are tracked in a cache-friendly manner involving a dynamically allocated page of pointers (the aforementioned kvfree_rcu_bulk_data structures), while the third uses a simple (but decidedly cache-unfriendly) linked list through the rcu_head structures in each block of memory. On a given CPU, these three categories are handled as a unit, with that CPU's kfree_rcu_cpu_work structure having one pointer for each of the three categories. Clearly, new memory for a given category cannot be placed in the corresponding kfree_rcu_cpu_work structure until any old memory has had its grace period elapse and thus has been removed. And the kfree_rcu_monitor() function does in fact check for this. Except that the kfree_rcu_monitor() function checks these pointers one at a time. This means that if the previous kfree_rcu() memory passed to RCU had only category 1 and the current one has only category 2, the kfree_rcu_monitor() function will send that current category-2 memory along immediately. This can result in memory being freed too soon, that is, out from under unsuspecting RCU readers. To see this, consider the following sequence of events, in which: o Task A on CPU 0 calls rcu_read_lock(), then uses "from_cset", then is preempted. o CPU 1 calls kfree_rcu(cset, rcu_head) in order to free "from_cset" after a later grace period. Except that "from_cset" is freed right after the previous grace period ended, so that "from_cset" is immediately freed. Task A resumes and references "from_cset"'s member, after which nothing good happens. In full detail: CPU 0 CPU 1 ---------------------- ---------------------- count_memcg_event_mm() |rcu_read_lock() <--- |mem_cgroup_from_task() |// css_set_ptr is the "from_cset" mentioned on CPU 1 |css_set_ptr = rcu_dereference((task)->cgroups) |// Hard irq comes, current task is scheduled out. cgroup_attach_task() |cgroup_migrate() |cgroup_migrate_execute() |css_set_move_task(task, from_cset, to_cset, true) |cgroup_move_task(task, to_cset) |rcu_assign_pointer(.., to_cset) |... |cgroup_migrate_finish() |put_css_set_locked(from_cset) |from_cset->refcount return 0 |kfree_rcu(cset, rcu_head) // free from_cset after new gp |add_ptr_to_bulk_krc_lock() |schedule_delayed_work(&krcp->monitor_work, ..) kfree_rcu_monitor() |krcp->bulk_head[0]'s work attached to krwp->bulk_head_free[] |queue_rcu_work(system_wq, &krwp->rcu_work) |if rwork->rcu.work is not in WORK_STRUCT_PENDING_BIT state, |call_rcu(&rwork->rcu, rcu_work_rcufn) <--- request new gp // There is a perious call_rcu(.., rcu_work_rcufn) // gp end, rcu_work_rcufn() is called. rcu_work_rcufn() |__queue_work(.., rwork->wq, &rwork->work); |kfree_rcu_work() |krwp->bulk_head_free[0] bulk is freed before new gp end!!! |The "from_cset" is freed before new gp end. // the task resumes some time later. |css_set_ptr->subsys[(subsys_id) <--- Caused kernel crash, because css_set_ptr is freed. This commit therefore causes kfree_rcu_monitor() to refrain from moving kfree_rcu() memory to the kfree_rcu_cpu_work structure until the RCU grace period has completed for all three categories. v2: Use helper function instead of inserted code block at kfree_rcu_monitor(). Fixes: 34c881745549 ("rcu: Support kfree_bulk() interface in kfree_rcu()") Fixes: 5f3c8d620447 ("rcu/tree: Maintain separate array for vmalloc ptrs") Reported-by: Mukesh Ojha Signed-off-by: Ziwei Dai Reviewed-by: Uladzislau Rezki (Sony) Tested-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit fcff5f99eaf06ff6818e14751ffeeb677a325127 Merge: 99ddf2254feba 656e9007ef586 Author: Linus Torvalds Date: Thu Apr 6 09:51:04 2023 -0700 Merge tag 'asm-generic-fixes-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic fixes from Arnd Bergmann: "These are minor fixes to address false-positive build warnings: Some of the less common I/O accessors are missing __force casts and cause sparse warnings for their implied byteswap, and a recent change to __generic_cmpxchg_local() causes a warning about constant integer truncation" * tag 'asm-generic-fixes-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: asm-generic: avoid __generic_cmpxchg_local warnings asm-generic/io.h: suppress endianness warnings for relaxed accessors asm-generic/io.h: suppress endianness warnings for readq() and writeq() commit 919e659ed12568b5b8ba6c2ffdd82d8d31fc28af Author: Lorenzo Bianconi Date: Thu Apr 6 12:40:19 2023 +0200 selftests/bpf: fix xdp_redirect xdp-features selftest for veth driver xdp-features supported by veth driver are no more static, but they depends on veth configuration (e.g. if GRO is enabled/disabled or TX/RX queue configuration). Take it into account in xdp_redirect xdp-features selftest for veth driver. Fixes: fccca038f300 ("veth: take into account device reconfiguration for xdp_features flag") Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/bc35455cfbb1d4f7f52536955ded81ad47d8dc54.1680777371.git.lorenzo@kernel.org Signed-off-by: Martin KaFai Lau commit dc70eb868b9cd2ca01313e5a394e6ea001d513e9 Author: Alexis Lothoré Date: Tue Apr 4 15:31:02 2023 +0200 fpga: bridge: properly initialize bridge device before populating children The current code path can lead to warnings because of uninitialized device, which contains, as a consequence, uninitialized kobject. The uninitialized device is passed to of_platform_populate, which will at some point, while creating child device, try to get a reference on uninitialized parent, resulting in the following warning: kobject: '(null)' ((ptrval)): is not initialized, yet kobject_get() is being called. The warning is observed after migrating a kernel 5.10.x to 6.1.x. Reverting commit 0d70af3c2530 ("fpga: bridge: Use standard dev_release for class driver") seems to remove the warning. This commit aggregates device_initialize() and device_add() into device_register() but this new call is done AFTER of_platform_populate Fixes: 0d70af3c2530 ("fpga: bridge: Use standard dev_release for class driver") Signed-off-by: Alexis Lothoré Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20230404133102.2837535-2-alexis.lothore@bootlin.com Signed-off-by: Xu Yilun commit 352e1eb17eee86ab4dd66c0c9df528b350aaace2 Author: Long Wang Date: Thu Apr 6 10:45:35 2023 -0500 ASoC: max98373: change power down sequence for smart amp In order to avoid pop noise which occurs when switching device from speaker to headphone, the amplifier should power down first when stopping playback. Signed-off-by: Long Wang Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20230406154535.18205-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e959f2beec8e655dba79c5a7111beedae5e757e0 Author: Pierre-Louis Bossart Date: Thu Apr 6 10:27:25 2023 -0500 ALSA: hda: patch_realtek: add quirk for Asus N7601ZM Add pins and verbs needed to enable speakers and jack. The pins and verbs configurations were identified by snooping the Windows driver commands, with a nice write-up here: https://brakkee.org/site/2023/02/07/fixing-sound-on-the-asus-n7601zm/ Reported-by: Erik Brakkee Link: https://github.com/thesofproject/linux/issues/4176 Tested-by: Erik Brakkee Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Bard Liao Cc: Link: https://lore.kernel.org/r/20230406152725.15191-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 8fbc10b995a506e173f1080dfa2764f232a65e02 Author: Michael Sit Wei Hong Date: Thu Apr 6 10:45:41 2023 +0800 net: stmmac: check fwnode for phy device before scanning for phy Some DT devices already have phy device configured in the DT/ACPI. Current implementation scans for a phy unconditionally even though there is a phy listed in the DT/ACPI and already attached. We should check the fwnode if there is any phy device listed in fwnode and decide whether to scan for a phy to attach to. Fixes: fe2cfbc96803 ("net: stmmac: check if MAC needs to attach to a PHY") Reported-by: Martin Blumenstingl Link: https://lore.kernel.org/lkml/20230403212434.296975-1-martin.blumenstingl@googlemail.com/ Tested-by: Guenter Roeck Tested-by: Shahab Vahedi Tested-by: Marek Szyprowski Tested-by: Martin Blumenstingl Suggested-by: Russell King (Oracle) Signed-off-by: Michael Sit Wei Hong Link: https://lore.kernel.org/r/20230406024541.3556305-1-michael.wei.hong.sit@intel.com Signed-off-by: Jakub Kicinski commit 2a2d8c51defb446e8d89a83f42f8e5cd529111e9 Author: Zheng Yejian Date: Thu Mar 30 10:52:23 2023 +0800 ftrace: Fix issue that 'direct->addr' not restored in modify_ftrace_direct() Syzkaller report a WARNING: "WARN_ON(!direct)" in modify_ftrace_direct(). Root cause is 'direct->addr' was changed from 'old_addr' to 'new_addr' but not restored if error happened on calling ftrace_modify_direct_caller(). Then it can no longer find 'direct' by that 'old_addr'. To fix it, restore 'direct->addr' to 'old_addr' explicitly in error path. Link: https://lore.kernel.org/linux-trace-kernel/20230330025223.1046087-1-zhengyejian1@huawei.com Cc: stable@vger.kernel.org Cc: Cc: Cc: Cc: Fixes: 8a141dd7f706 ("ftrace: Fix modify_ftrace_direct.") Signed-off-by: Zheng Yejian Signed-off-by: Steven Rostedt (Google) commit bbb73a103fbbed6f63cb738d3783261c4241b4b2 Author: Petr Tesarik Date: Thu Apr 6 16:35:39 2023 +0200 swiotlb: fix a braino in the alignment check fix The alignment mask in swiotlb_do_find_slots() masks off the high bits which are not relevant for the alignment, so multiple requirements are combined with a bitwise OR rather than AND. In plain English, the stricter the alignment, the more bits must be set in iotlb_align_mask. Confusion may arise from the fact that the same variable is also used to mask off the offset within a swiotlb slot, which is achieved with a bitwise AND. Fixes: 0eee5ae10256 ("swiotlb: fix slot alignment checks") Reported-by: Dexuan Cui Link: https://lore.kernel.org/all/CAA42JLa1y9jJ7BgQvXeUYQh-K2mDNHd2BYZ4iZUz33r5zY7oAQ@mail.gmail.com/ Reported-by: Kelsey Steele Link: https://lore.kernel.org/all/20230405003549.GA21326@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net/ Signed-off-by: Petr Tesarik Tested-by: Dexuan Cui Signed-off-by: Christoph Hellwig commit fb4a624f88f658c7b7ae124452bd42eaa8ac7168 Author: Xu Biang Date: Thu Apr 6 06:28:01 2023 -0700 ALSA: firewire-tascam: add missing unwind goto in snd_tscm_stream_start_duplex() Smatch Warns: sound/firewire/tascam/tascam-stream.c:493 snd_tscm_stream_start_duplex() warn: missing unwind goto? The direct return will cause the stream list of "&tscm->domain" unemptied and the session in "tscm" unfinished if amdtp_domain_start() returns with an error. Fix this by changing the direct return to a goto which will empty the stream list of "&tscm->domain" and finish the session in "tscm". The snd_tscm_stream_start_duplex() function is called in the prepare callback of PCM. According to "ALSA Kernel API Documentation", the prepare callback of PCM will be called many times at each setup. So, if the "&d->streams" list is not emptied, when the prepare callback is called next time, snd_tscm_stream_start_duplex() will receive -EBUSY from amdtp_domain_add_stream() that tries to add an existing stream to the domain. The error handling code after the "error" label will be executed in this case, and the "&d->streams" list will be emptied. So not emptying the "&d->streams" list will not cause an issue. But it is more efficient and readable to empty it on the first error by changing the direct return to a goto statement. The session in "tscm" has been begun before amdtp_domain_start(), so it needs to be finished when amdtp_domain_start() fails. Fixes: c281d46a51e3 ("ALSA: firewire-tascam: support AMDTP domain") Signed-off-by: Xu Biang Reviewed-by: Dan Carpenter Acked-by: Takashi Sakamoto Cc: Link: https://lore.kernel.org/r/20230406132801.105108-1-xubiang@hust.edu.cn Signed-off-by: Takashi Iwai commit 68d99ab0e9221ef54506f827576c5a914680eeaf Author: Christoph Hellwig Date: Wed Mar 29 09:13:05 2023 +0900 btrfs: fix fast csum implementation detection The BTRFS_FS_CSUM_IMPL_FAST flag is currently set whenever a non-generic crc32c is detected, which is the incorrect check if the file system uses a different checksumming algorithm. Refactor the code to only check this if crc32c is actually used. Note that in an ideal world the information if an algorithm is hardware accelerated or not should be provided by the crypto API instead, but that's left for another day. CC: stable@vger.kernel.org # 5.4.x: c8a5f8ca9a9c: btrfs: print checksum type and implementation at mount time CC: stable@vger.kernel.org # 5.4.x Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 40fac6472f22a59f5694496e179988ab4a1dfe07 Author: Christoph Hellwig Date: Tue Mar 28 12:56:13 2023 +0900 btrfs: restore the thread_pool= behavior in remount for the end I/O workqueues Commit d7b9416fe5c5 ("btrfs: remove btrfs_end_io_wq") converted the read and I/O handling from btrfs_workqueues to Linux workqueues, and as part of that lost the code to apply the thread_pool= based max_active limit on remount. Restore it. Fixes: d7b9416fe5c5 ("btrfs: remove btrfs_end_io_wq") CC: stable@vger.kernel.org # 6.0+ Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5b3b9197c28c8245c3c13ddf3ddf4eb10c2b23e1 Merge: 1d1665279a845 d3205ab75e99a Author: Jens Axboe Date: Thu Apr 6 08:12:19 2023 -0600 Merge tag 'nvme-6.3-2023-04-06' of git://git.infradead.org/nvme into block-6.3 Pull NVMe fix from Christoph: "nvme fixes for Linux 6.3 - fix discard support without oncs (Keith Busch)" * tag 'nvme-6.3-2023-04-06' of git://git.infradead.org/nvme: nvme: fix discard support without oncs commit 1d1665279a845d16c93687389e364386e3fe0f38 Author: Ming Lei Date: Thu Apr 6 20:40:59 2023 +0800 block: ublk: make sure that block size is set correctly block size is one very key setting for block layer, and bad block size could panic kernel easily. Make sure that block size is set correctly. Meantime if ublk_validate_params() fails, clear ub->params so that disk is prevented from being added. Fixes: 71f28f3136af ("ublk_drv: add io_uring based userspace block driver") Reported-and-tested-by: Breno Leitao Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit af0acf22aea359e04412237d68787401f96bb583 Author: Chen Aotian Date: Thu Apr 6 12:01:51 2023 +0800 netfilter: nf_tables: Modify nla_memdup's flag to GFP_KERNEL_ACCOUNT For memory alloc that store user data from nla[NFTA_OBJ_USERDATA], use GFP_KERNEL_ACCOUNT is more suitable. Fixes: 33758c891479 ("memcg: enable accounting for nft objects") Signed-off-by: Chen Aotian Signed-off-by: Pablo Neira Ayuso commit 94623f579ce338b5fa61b5acaa5beb8aa657fb9e Author: Florian Westphal Date: Mon Apr 3 13:54:37 2023 +0200 netfilter: br_netfilter: fix recent physdev match breakage Recent attempt to ensure PREROUTING hook is executed again when a decrypted ipsec packet received on a bridge passes through the network stack a second time broke the physdev match in INPUT hook. We can't discard the nf_bridge info strct from sabotage_in hook, as this is needed by the physdev match. Keep the struct around and handle this with another conditional instead. Fixes: 2b272bb558f1 ("netfilter: br_netfilter: disable sabotage_in hook after first suppression") Reported-and-tested-by: Farid BENAMROUCHE Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit a425efcb6e07929e16813453a98b69f719502218 Merge: a3c40af4a7ea4 86d5b27b37925 Author: Arnd Bergmann Date: Thu Apr 6 10:18:39 2023 +0200 Merge tag 'imx-fixes-6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 6.3, 2nd round: - Fix 'reg' address length for i.MX8MP LCDIF2 device. - A couple of changes from Fabio Estevam to fix DTC warnings caused unnecessary address/size cells. - Re-enable PCI driver support in imx_v6_v7_defconfig. - Fix PMIC clock source property for imx8mm-evk board. - A couple of fixes from Peng Fan to correct off-on delay property for i.MX8 Verdin boards. * tag 'imx-fixes-6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx_v6_v7_defconfig: Fix unintentional disablement of PCI ARM: dts: imx6ull-colibri: Remove unnecessary #address-cells/#size-cells ARM: dts: imx7d-remarkable2: Remove unnecessary #address-cells/#size-cells arm64: dts: imx8mp-verdin: correct off-on-delay arm64: dts: imx8mm-verdin: correct off-on-delay arm64: dts: imx8mm-evk: correct pmic clock source arm64: dts: imx8mp: fix address length for LCDIF2 Link: https://lore.kernel.org/r/20230406021602.GP11367@dragon Signed-off-by: Arnd Bergmann commit 8dd13214a810c695044aa168c0ddba1a9c433e4f Author: Oswald Buddenhagen Date: Wed Apr 5 22:12:20 2023 +0200 ALSA: emu10k1: don't create old pass-through playback device on Audigy It could have never worked, as snd_emu10k1_fx8010_playback_prepare() and snd_emu10k1_fx8010_playback_hw_free() assume the emu10k1 offset for the ETRAM, and the default DSP code includes no handler for it. It also wouldn't make a lot of sense to make it work, as Audigy has an own, much simpler, pass-through mechanism. So just skip creation of the device. Signed-off-by: Oswald Buddenhagen Cc: Link: https://lore.kernel.org/r/20230405201220.2197938-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit b09c551c77c7e01dc6e4f3c8bf06b5ffa7b06db5 Author: Oswald Buddenhagen Date: Wed Apr 5 22:12:20 2023 +0200 ALSA: emu10k1: fix capture interrupt handler unlinking Due to two copy/pastos, closing the MIC or EFX capture device would make a running ADC capture hang due to unsetting its interrupt handler. In principle, this would have also allowed dereferencing dangling pointers, but we're actually rather thorough at disabling and flushing the ints. While it may sound like one, this actually wasn't a hypothetical bug: PortAudio will open a capture stream at startup (and close it right away) even if not asked to. If the first device is busy, it will just proceed with the next one ... thus killing a concurrent capture. Signed-off-by: Oswald Buddenhagen Cc: Link: https://lore.kernel.org/r/20230405201220.2197923-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit f342ac00da1064eb4f94b1f4bcacbdfea955797a Author: Oswald Buddenhagen Date: Wed Apr 5 22:12:20 2023 +0200 ALSA: hda/sigmatel: fix S/PDIF out on Intel D*45* motherboards The BIOS botches this one completely - it says the 2nd S/PDIF output is used, while in fact it's the 1st one. This is tested on DP45SG, but I'm assuming it's valid for the other boards in the series as well. Also add some comments regarding the pins. FWIW, the codec is apparently still sold by Tempo Semiconductor, Inc., where one can download the documentation. Signed-off-by: Oswald Buddenhagen Cc: Link: https://lore.kernel.org/r/20230405201220.2197826-2-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit c17f8fd31700392b1bb9e7b66924333568cb3700 Author: Oswald Buddenhagen Date: Wed Apr 5 22:12:19 2023 +0200 ALSA: hda/sigmatel: add pin overrides for Intel DP45SG motherboard Like the other boards from the D*45* series, this one sets up the outputs not quite correctly. Signed-off-by: Oswald Buddenhagen Cc: Link: https://lore.kernel.org/r/20230405201220.2197826-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit e98e7a82bca2b6dce3e03719cff800ec913f9af7 Author: Oswald Buddenhagen Date: Wed Apr 5 22:12:19 2023 +0200 ALSA: i2c/cs8427: fix iec958 mixer control deactivation snd_cs8427_iec958_active() would always delete SNDRV_CTL_ELEM_ACCESS_INACTIVE, even though the function has an argument `active`. Signed-off-by: Oswald Buddenhagen Cc: Link: https://lore.kernel.org/r/20230405201219.2197811-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 8c68ae3b22fa6fb2dbe83ef955ff10936503d28e Author: Jens Axboe Date: Wed Apr 5 20:00:46 2023 -0600 ublk: read any SQE values upfront Since SQE memory is shared with userspace, we should only be reading it once. We cannot read it multiple times, particularly when it's read once for validation and then read again for the actual use. ublk_ch_uring_cmd() is safe when called as a retry operation, as the memory backing is stable at that point. But for normal issue, we want to ensure that we only read ublksrv_io_cmd once. Wrap the function in a helper that reads the value into an on-stack copy of the struct. Cc: stable@vger.kernel.org # 6.0+ Reviewed-by: Ming Lei Signed-off-by: Jens Axboe commit 24e3fce00c0b557491ff596c0682a29dee6fe848 Author: Song Yoong Siang Date: Tue Apr 4 12:48:23 2023 +0800 net: stmmac: Add queue reset into stmmac_xdp_open() function Queue reset was moved out from __init_dma_rx_desc_rings() and __init_dma_tx_desc_rings() functions. Thus, the driver fails to transmit and receive packet after XDP prog setup. This commit adds the missing queue reset into stmmac_xdp_open() function. Fixes: f9ec5723c3db ("net: ethernet: stmicro: stmmac: move queue reset to dedicated functions") Cc: # 6.0+ Signed-off-by: Song Yoong Siang Reviewed-by: Alexander Duyck Link: https://lore.kernel.org/r/20230404044823.3226144-1-yoong.siang.song@intel.com Signed-off-by: Jakub Kicinski commit 38e058cc7d245dc8034426415bee8fec16ace1bd Author: Hangbin Liu Date: Tue Apr 4 15:24:11 2023 +0800 selftests: net: rps_default_mask.sh: delete veth link specifically When deleting the netns and recreating a new one while re-adding the veth interface, there is a small window of time during which the old veth interface has not yet been removed. This can cause the new addition to fail. To resolve this issue, we can either wait for a short while to ensure that the old veth interface is deleted, or we can specifically remove the veth interface. Before this patch: # ./rps_default_mask.sh empty rps_default_mask [ ok ] changing rps_default_mask dont affect existing devices [ ok ] changing rps_default_mask dont affect existing netns [ ok ] changing rps_default_mask affect newly created devices [ ok ] changing rps_default_mask don't affect newly child netns[II][ ok ] rps_default_mask is 0 by default in child netns [ ok ] RTNETLINK answers: File exists changing rps_default_mask in child ns don't affect the main one[ ok ] cat: /sys/class/net/vethC11an1/queues/rx-0/rps_cpus: No such file or directory changing rps_default_mask in child ns affects new childns devices./rps_default_mask.sh: line 36: [: -eq: unary operator expected [fail] expected 1 found changing rps_default_mask in child ns don't affect existing devices[ ok ] After this patch: # ./rps_default_mask.sh empty rps_default_mask [ ok ] changing rps_default_mask dont affect existing devices [ ok ] changing rps_default_mask dont affect existing netns [ ok ] changing rps_default_mask affect newly created devices [ ok ] changing rps_default_mask don't affect newly child netns[II][ ok ] rps_default_mask is 0 by default in child netns [ ok ] changing rps_default_mask in child ns don't affect the main one[ ok ] changing rps_default_mask in child ns affects new childns devices[ ok ] changing rps_default_mask in child ns don't affect existing devices[ ok ] Fixes: 3a7d84eae03b ("self-tests: more rps self tests") Signed-off-by: Hangbin Liu Acked-by: Paolo Abeni Link: https://lore.kernel.org/r/20230404072411.879476-1-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit abc33494ddd5c1e4bd0e17c4abe361038fb6693f Author: Greg Ungerer Date: Tue Apr 4 15:22:07 2023 +1000 net: fec: make use of MDIO C45 quirk Not all fec MDIO bus drivers support C45 mode transactions. The older fec hardware block in many ColdFire SoCs does not appear to support them, at least according to most of the different ColdFire SoC reference manuals. The bits used to generate C45 access on the iMX parts, in the OP field of the MMFR register, are documented as generating non-compliant MII frames (it is not documented as to exactly how they are non-compliant). Commit 8d03ad1ab0b0 ("net: fec: Separate C22 and C45 transactions") means the fec driver will always register c45 MDIO read and write methods. During probe these will always be accessed now generating non-compliant MII accesses on ColdFire based devices. Add a quirk define, FEC_QUIRK_HAS_MDIO_C45, that can be used to distinguish silicon that supports MDIO C45 framing or not. Add this to all the existing iMX quirks, so they will be behave as they do now (*). (*) it seems that some iMX parts may not support C45 transactions either. The iMX25 and iMX50 Reference Manuals contain similar wording to the ColdFire Reference Manuals on this. Fixes: 8d03ad1ab0b0 ("net: fec: Separate C22 and C45 transactions") Signed-off-by: Greg Ungerer Reviewed-by: Wei Fang Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230404052207.3064861-1-gerg@linux-m68k.org Signed-off-by: Jakub Kicinski commit 86d5b27b379256cd5d48974b4cd7ad03091eea6b Author: Fabio Estevam Date: Tue Apr 4 09:13:03 2023 -0300 ARM: imx_v6_v7_defconfig: Fix unintentional disablement of PCI Since commit 75c2f26da03f ("PCI: imx6: Add i.MX PCIe EP mode support") the i.MX6 PCI driver is no longer selected by default. The existing PCI_IMX6 was made a hidden option, selected by new options PCI_IMX6_HOST (for the existing support) and PCI_IMX6_EP (for the endpoint mode), but there has been no corresponding update to imx_v6_v7_defconfig so the PCI_IMX6 ends up getting disabled. Switch imx_v6_v7_defconfig to PCI_IMX6_HOST to preserve the existing functionality. This is based on the same fix done in commit 0cd5780eb625 ("arm64: defconfig: Fix unintentional disablement of PCI on i.MX"). Fixes: 75c2f26da03f ("PCI: imx6: Add i.MX PCIe EP mode support") Reported-by: Mattias Barthel Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit c45ea315a602d45569b08b93e9ab30f6a63a38aa Author: Peng Zhang Date: Tue Mar 14 20:42:03 2023 +0800 maple_tree: fix a potential concurrency bug in RCU mode There is a concurrency bug that may cause the wrong value to be loaded when a CPU is modifying the maple tree. CPU1: mtree_insert_range() mas_insert() mas_store_root() ... mas_root_expand() ... rcu_assign_pointer(mas->tree->ma_root, mte_mk_root(mas->node)); ma_set_meta(node, maple_leaf_64, 0, slot); <---IP CPU2: mtree_load() mtree_lookup_walk() ma_data_end(); When CPU1 is about to execute the instruction pointed to by IP, the ma_data_end() executed by CPU2 may return the wrong end position, which will cause the value loaded by mtree_load() to be wrong. An example of triggering the bug: Add mdelay(100) between rcu_assign_pointer() and ma_set_meta() in mas_root_expand(). static DEFINE_MTREE(tree); int work(void *p) { unsigned long val; for (int i = 0 ; i< 30; ++i) { val = (unsigned long)mtree_load(&tree, 8); mdelay(5); pr_info("%lu",val); } return 0; } mt_init_flags(&tree, MT_FLAGS_USE_RCU); mtree_insert(&tree, 0, (void*)12345, GFP_KERNEL); run_thread(work) mtree_insert(&tree, 1, (void*)56789, GFP_KERNEL); In RCU mode, mtree_load() should always return the value before or after the data structure is modified, and in this example mtree_load(&tree, 8) may return 56789 which is not expected, it should always return NULL. Fix it by put ma_set_meta() before rcu_assign_pointer(). Link: https://lkml.kernel.org/r/20230314124203.91572-4-zhangpeng.00@bytedance.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Peng Zhang Reviewed-by: Liam R. Howlett Cc: Signed-off-by: Andrew Morton commit ec07967d7523adb3670f9dfee0232e3bc868f3de Author: Peng Zhang Date: Tue Mar 14 20:42:01 2023 +0800 maple_tree: fix get wrong data_end in mtree_lookup_walk() if (likely(offset > end)) max = pivots[offset]; The above code should be changed to if (likely(offset < end)), which is correct. This affects the correctness of ma_data_end(). Now it seems that the final result will not be wrong, but it is best to change it. This patch does not change the code as above, because it simplifies the code by the way. Link: https://lkml.kernel.org/r/20230314124203.91572-1-zhangpeng.00@bytedance.com Link: https://lkml.kernel.org/r/20230314124203.91572-2-zhangpeng.00@bytedance.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Peng Zhang Reviewed-by: Liam R. Howlett Cc: Signed-off-by: Andrew Morton commit 6fe7d6b992113719e96744d974212df3fcddc76c Author: Rongwei Wang Date: Tue Apr 4 23:47:16 2023 +0800 mm/swap: fix swap_info_struct race between swapoff and get_swap_pages() The si->lock must be held when deleting the si from the available list. Otherwise, another thread can re-add the si to the available list, which can lead to memory corruption. The only place we have found where this happens is in the swapoff path. This case can be described as below: core 0 core 1 swapoff del_from_avail_list(si) waiting try lock si->lock acquire swap_avail_lock and re-add si into swap_avail_head acquire si->lock but missing si already being added again, and continuing to clear SWP_WRITEOK, etc. It can be easily found that a massive warning messages can be triggered inside get_swap_pages() by some special cases, for example, we call madvise(MADV_PAGEOUT) on blocks of touched memory concurrently, meanwhile, run much swapon-swapoff operations (e.g. stress-ng-swap). However, in the worst case, panic can be caused by the above scene. In swapoff(), the memory used by si could be kept in swap_info[] after turning off a swap. This means memory corruption will not be caused immediately until allocated and reset for a new swap in the swapon path. A panic message caused: (with CONFIG_PLIST_DEBUG enabled) ------------[ cut here ]------------ top: 00000000e58a3003, n: 0000000013e75cda, p: 000000008cd4451a prev: 0000000035b1e58a, n: 000000008cd4451a, p: 000000002150ee8d next: 000000008cd4451a, n: 000000008cd4451a, p: 000000008cd4451a WARNING: CPU: 21 PID: 1843 at lib/plist.c:60 plist_check_prev_next_node+0x50/0x70 Modules linked in: rfkill(E) crct10dif_ce(E)... CPU: 21 PID: 1843 Comm: stress-ng Kdump: ... 5.10.134+ Hardware name: Alibaba Cloud ECS, BIOS 0.0.0 02/06/2015 pstate: 60400005 (nZCv daif +PAN -UAO -TCO BTYPE=--) pc : plist_check_prev_next_node+0x50/0x70 lr : plist_check_prev_next_node+0x50/0x70 sp : ffff0018009d3c30 x29: ffff0018009d3c40 x28: ffff800011b32a98 x27: 0000000000000000 x26: ffff001803908000 x25: ffff8000128ea088 x24: ffff800011b32a48 x23: 0000000000000028 x22: ffff001800875c00 x21: ffff800010f9e520 x20: ffff001800875c00 x19: ffff001800fdc6e0 x18: 0000000000000030 x17: 0000000000000000 x16: 0000000000000000 x15: 0736076307640766 x14: 0730073007380731 x13: 0736076307640766 x12: 0730073007380731 x11: 000000000004058d x10: 0000000085a85b76 x9 : ffff8000101436e4 x8 : ffff800011c8ce08 x7 : 0000000000000000 x6 : 0000000000000001 x5 : ffff0017df9ed338 x4 : 0000000000000001 x3 : ffff8017ce62a000 x2 : ffff0017df9ed340 x1 : 0000000000000000 x0 : 0000000000000000 Call trace: plist_check_prev_next_node+0x50/0x70 plist_check_head+0x80/0xf0 plist_add+0x28/0x140 add_to_avail_list+0x9c/0xf0 _enable_swap_info+0x78/0xb4 __do_sys_swapon+0x918/0xa10 __arm64_sys_swapon+0x20/0x30 el0_svc_common+0x8c/0x220 do_el0_svc+0x2c/0x90 el0_svc+0x1c/0x30 el0_sync_handler+0xa8/0xb0 el0_sync+0x148/0x180 irq event stamp: 2082270 Now, si->lock locked before calling 'del_from_avail_list()' to make sure other thread see the si had been deleted and SWP_WRITEOK cleared together, will not reinsert again. This problem exists in versions after stable 5.10.y. Link: https://lkml.kernel.org/r/20230404154716.23058-1-rongwei.wang@linux.alibaba.com Fixes: a2468cc9bfdff ("swap: choose swap device according to numa node") Tested-by: Yongchen Yin Signed-off-by: Rongwei Wang Cc: Bagas Sanjaya Cc: Matthew Wilcox (Oracle) Cc: Aaron Lu Cc: Signed-off-by: Andrew Morton commit 42560f9c92cc43dce75dbf06cc0d840dced39b12 Author: Ryusuke Konishi Date: Fri Mar 31 05:55:15 2023 +0900 nilfs2: fix sysfs interface lifetime The current nilfs2 sysfs support has issues with the timing of creation and deletion of sysfs entries, potentially leading to null pointer dereferences, use-after-free, and lockdep warnings. Some of the sysfs attributes for nilfs2 per-filesystem instance refer to metadata file "cpfile", "sufile", or "dat", but nilfs_sysfs_create_device_group that creates those attributes is executed before the inodes for these metadata files are loaded, and nilfs_sysfs_delete_device_group which deletes these sysfs entries is called after releasing their metadata file inodes. Therefore, access to some of these sysfs attributes may occur outside of the lifetime of these metadata files, resulting in inode NULL pointer dereferences or use-after-free. In addition, the call to nilfs_sysfs_create_device_group() is made during the locking period of the semaphore "ns_sem" of nilfs object, so the shrinker call caused by the memory allocation for the sysfs entries, may derive lock dependencies "ns_sem" -> (shrinker) -> "locks acquired in nilfs_evict_inode()". Since nilfs2 may acquire "ns_sem" deep in the call stack holding other locks via its error handler __nilfs_error(), this causes lockdep to report circular locking. This is a false positive and no circular locking actually occurs as no inodes exist yet when nilfs_sysfs_create_device_group() is called. Fortunately, the lockdep warnings can be resolved by simply moving the call to nilfs_sysfs_create_device_group() out of "ns_sem". This fixes these sysfs issues by revising where the device's sysfs interface is created/deleted and keeping its lifetime within the lifetime of the metadata files above. Link: https://lkml.kernel.org/r/20230330205515.6167-1-konishi.ryusuke@gmail.com Fixes: dd70edbde262 ("nilfs2: integrate sysfs support into driver") Signed-off-by: Ryusuke Konishi Reported-by: syzbot+979fa7f9c0d086fdc282@syzkaller.appspotmail.com Link: https://lkml.kernel.org/r/0000000000003414b505f7885f7e@google.com Reported-by: syzbot+5b7d542076d9bddc3c6a@syzkaller.appspotmail.com Link: https://lkml.kernel.org/r/0000000000006ac86605f5f44eb9@google.com Cc: Viacheslav Dubeyko Cc: Signed-off-by: Andrew Morton commit 7c7b962938ddda6a9cd095de557ee5250706ea88 Author: Alistair Popple Date: Thu Mar 30 12:25:19 2023 +1100 mm: take a page reference when removing device exclusive entries Device exclusive page table entries are used to prevent CPU access to a page whilst it is being accessed from a device. Typically this is used to implement atomic operations when the underlying bus does not support atomic access. When a CPU thread encounters a device exclusive entry it locks the page and restores the original entry after calling mmu notifiers to signal drivers that exclusive access is no longer available. The device exclusive entry holds a reference to the page making it safe to access the struct page whilst the entry is present. However the fault handling code does not hold the PTL when taking the page lock. This means if there are multiple threads faulting concurrently on the device exclusive entry one will remove the entry whilst others will wait on the page lock without holding a reference. This can lead to threads locking or waiting on a folio with a zero refcount. Whilst mmap_lock prevents the pages getting freed via munmap() they may still be freed by a migration. This leads to warnings such as PAGE_FLAGS_CHECK_AT_FREE due to the page being locked when the refcount drops to zero. Fix this by trying to take a reference on the folio before locking it. The code already checks the PTE under the PTL and aborts if the entry is no longer there. It is also possible the folio has been unmapped, freed and re-allocated allowing a reference to be taken on an unrelated folio. This case is also detected by the PTE check and the folio is unlocked without further changes. Link: https://lkml.kernel.org/r/20230330012519.804116-1-apopple@nvidia.com Fixes: b756a3b5e7ea ("mm: device exclusive memory access") Signed-off-by: Alistair Popple Reviewed-by: Ralph Campbell Reviewed-by: John Hubbard Acked-by: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Christoph Hellwig Cc: Signed-off-by: Andrew Morton commit f349b15e183d6956f1b63d6ff57849ff10c7edd5 Author: Yafang Shao Date: Thu Mar 30 16:26:25 2023 +0000 mm: vmalloc: avoid warn_alloc noise caused by fatal signal There're some suspicious warn_alloc on my test serer, for example, [13366.518837] warn_alloc: 81 callbacks suppressed [13366.518841] test_verifier: vmalloc error: size 4096, page order 0, failed to allocate pages, mode:0x500dc2(GFP_HIGHUSER|__GFP_ZERO|__GFP_ACCOUNT), nodemask=(null),cpuset=/,mems_allowed=0-1 [13366.522240] CPU: 30 PID: 722463 Comm: test_verifier Kdump: loaded Tainted: G W O 6.2.0+ #638 [13366.524216] Call Trace: [13366.524702] [13366.525148] dump_stack_lvl+0x6c/0x80 [13366.525712] dump_stack+0x10/0x20 [13366.526239] warn_alloc+0x119/0x190 [13366.526783] ? alloc_pages_bulk_array_mempolicy+0x9e/0x2a0 [13366.527470] __vmalloc_area_node+0x546/0x5b0 [13366.528066] __vmalloc_node_range+0xc2/0x210 [13366.528660] __vmalloc_node+0x42/0x50 [13366.529186] ? bpf_prog_realloc+0x53/0xc0 [13366.529743] __vmalloc+0x1e/0x30 [13366.530235] bpf_prog_realloc+0x53/0xc0 [13366.530771] bpf_patch_insn_single+0x80/0x1b0 [13366.531351] bpf_jit_blind_constants+0xe9/0x1c0 [13366.531932] ? __free_pages+0xee/0x100 [13366.532457] ? free_large_kmalloc+0x58/0xb0 [13366.533002] bpf_int_jit_compile+0x8c/0x5e0 [13366.533546] bpf_prog_select_runtime+0xb4/0x100 [13366.534108] bpf_prog_load+0x6b1/0xa50 [13366.534610] ? perf_event_task_tick+0x96/0xb0 [13366.535151] ? security_capable+0x3a/0x60 [13366.535663] __sys_bpf+0xb38/0x2190 [13366.536120] ? kvm_clock_get_cycles+0x9/0x10 [13366.536643] __x64_sys_bpf+0x1c/0x30 [13366.537094] do_syscall_64+0x38/0x90 [13366.537554] entry_SYSCALL_64_after_hwframe+0x72/0xdc [13366.538107] RIP: 0033:0x7f78310f8e29 [13366.538561] Code: 01 00 48 81 c4 80 00 00 00 e9 f1 fe ff ff 0f 1f 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 17 e0 2c 00 f7 d8 64 89 01 48 [13366.540286] RSP: 002b:00007ffe2a61fff8 EFLAGS: 00000206 ORIG_RAX: 0000000000000141 [13366.541031] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f78310f8e29 [13366.541749] RDX: 0000000000000080 RSI: 00007ffe2a6200b0 RDI: 0000000000000005 [13366.542470] RBP: 00007ffe2a620010 R08: 00007ffe2a6202a0 R09: 00007ffe2a6200b0 [13366.543183] R10: 00000000000f423e R11: 0000000000000206 R12: 0000000000407800 [13366.543900] R13: 00007ffe2a620540 R14: 0000000000000000 R15: 0000000000000000 [13366.544623] [13366.545260] Mem-Info: [13366.546121] active_anon:81319 inactive_anon:20733 isolated_anon:0 active_file:69450 inactive_file:5624 isolated_file:0 unevictable:0 dirty:10 writeback:0 slab_reclaimable:69649 slab_unreclaimable:48930 mapped:27400 shmem:12868 pagetables:4929 sec_pagetables:0 bounce:0 kernel_misc_reclaimable:0 free:15870308 free_pcp:142935 free_cma:0 [13366.551886] Node 0 active_anon:224836kB inactive_anon:33528kB active_file:175692kB inactive_file:13752kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:59248kB dirty:32kB writeback:0kB shmem:18252kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 0kB writeback_tmp:0kB kernel_stack:4616kB pagetables:10664kB sec_pagetables:0kB all_unreclaimable? no [13366.555184] Node 1 active_anon:100440kB inactive_anon:49404kB active_file:102108kB inactive_file:8744kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:50352kB dirty:8kB writeback:0kB shmem:33220kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 0kB writeback_tmp:0kB kernel_stack:3896kB pagetables:9052kB sec_pagetables:0kB all_unreclaimable? no [13366.558262] Node 0 DMA free:15360kB boost:0kB min:304kB low:380kB high:456kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB [13366.560821] lowmem_reserve[]: 0 2735 31873 31873 31873 [13366.561981] Node 0 DMA32 free:2790904kB boost:0kB min:56028kB low:70032kB high:84036kB reserved_highatomic:0KB active_anon:1936kB inactive_anon:20kB active_file:396kB inactive_file:344kB unevictable:0kB writepending:0kB present:3129200kB managed:2801520kB mlocked:0kB bounce:0kB free_pcp:5188kB local_pcp:0kB free_cma:0kB [13366.565148] lowmem_reserve[]: 0 0 29137 29137 29137 [13366.566168] Node 0 Normal free:28533824kB boost:0kB min:596740kB low:745924kB high:895108kB reserved_highatomic:28672KB active_anon:222900kB inactive_anon:33508kB active_file:175296kB inactive_file:13408kB unevictable:0kB writepending:32kB present:30408704kB managed:29837172kB mlocked:0kB bounce:0kB free_pcp:295724kB local_pcp:0kB free_cma:0kB [13366.569485] lowmem_reserve[]: 0 0 0 0 0 [13366.570416] Node 1 Normal free:32141144kB boost:0kB min:660504kB low:825628kB high:990752kB reserved_highatomic:69632KB active_anon:100440kB inactive_anon:49404kB active_file:102108kB inactive_file:8744kB unevictable:0kB writepending:8kB present:33554432kB managed:33025372kB mlocked:0kB bounce:0kB free_pcp:270880kB local_pcp:46860kB free_cma:0kB [13366.573403] lowmem_reserve[]: 0 0 0 0 0 [13366.574015] Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15360kB [13366.575474] Node 0 DMA32: 782*4kB (UME) 756*8kB (UME) 736*16kB (UME) 745*32kB (UME) 694*64kB (UME) 653*128kB (UME) 595*256kB (UME) 552*512kB (UME) 454*1024kB (UME) 347*2048kB (UME) 246*4096kB (UME) = 2790904kB [13366.577442] Node 0 Normal: 33856*4kB (UMEH) 51815*8kB (UMEH) 42418*16kB (UMEH) 36272*32kB (UMEH) 22195*64kB (UMEH) 10296*128kB (UMEH) 7238*256kB (UMEH) 5638*512kB (UEH) 5337*1024kB (UMEH) 3506*2048kB (UMEH) 1470*4096kB (UME) = 28533784kB [13366.580460] Node 1 Normal: 15776*4kB (UMEH) 37485*8kB (UMEH) 29509*16kB (UMEH) 21420*32kB (UMEH) 14818*64kB (UMEH) 13051*128kB (UMEH) 9918*256kB (UMEH) 7374*512kB (UMEH) 5397*1024kB (UMEH) 3887*2048kB (UMEH) 2002*4096kB (UME) = 32141240kB [13366.583027] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB [13366.584380] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB [13366.585702] Node 1 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB [13366.587042] Node 1 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB [13366.588372] 87386 total pagecache pages [13366.589266] 0 pages in swap cache [13366.590327] Free swap = 0kB [13366.591227] Total swap = 0kB [13366.592142] 16777082 pages RAM [13366.593057] 0 pages HighMem/MovableOnly [13366.594037] 357226 pages reserved [13366.594979] 0 pages hwpoisoned This failure really confuse me as there're still lots of available pages. Finally I figured out it was caused by a fatal signal. When a process is allocating memory via vm_area_alloc_pages(), it will break directly even if it hasn't allocated the requested pages when it receives a fatal signal. In that case, we shouldn't show this warn_alloc, as it is useless. We only need to show this warning when there're really no enough pages. Link: https://lkml.kernel.org/r/20230330162625.13604-1-laoar.shao@gmail.com Signed-off-by: Yafang Shao Reviewed-by: Lorenzo Stoakes Cc: Christoph Hellwig Cc: Uladzislau Rezki (Sony) Cc: Signed-off-by: Andrew Morton commit 7397031622e05ca206e2d674ec199d6bb66fc9ba Author: Tetsuo Handa Date: Mon Mar 27 00:21:46 2023 +0900 nilfs2: initialize "struct nilfs_binfo_dat"->bi_pad field nilfs_btree_assign_p() and nilfs_direct_assign_p() are not initializing "struct nilfs_binfo_dat"->bi_pad field, causing uninit-value reports when being passed to CRC function. Link: https://lkml.kernel.org/r/20230326152146.15872-1-konishi.ryusuke@gmail.com Reported-by: syzbot Link: https://syzkaller.appspot.com/bug?extid=048585f3f4227bb2b49b Reported-by: Dipanjan Das Link: https://lkml.kernel.org/r/CANX2M5bVbzRi6zH3PTcNE_31TzerstOXUa9Bay4E6y6dX23_pg@mail.gmail.com Signed-off-by: Tetsuo Handa Signed-off-by: Ryusuke Konishi Cc: Alexander Potapenko Signed-off-by: Andrew Morton commit 6be49d100c22ffea3287a4b19d7639d259888e33 Author: Ryusuke Konishi Date: Tue Mar 28 02:53:18 2023 +0900 nilfs2: fix potential UAF of struct nilfs_sc_info in nilfs_segctor_thread() The finalization of nilfs_segctor_thread() can race with nilfs_segctor_kill_thread() which terminates that thread, potentially causing a use-after-free BUG as KASAN detected. At the end of nilfs_segctor_thread(), it assigns NULL to "sc_task" member of "struct nilfs_sc_info" to indicate the thread has finished, and then notifies nilfs_segctor_kill_thread() of this using waitqueue "sc_wait_task" on the struct nilfs_sc_info. However, here, immediately after the NULL assignment to "sc_task", it is possible that nilfs_segctor_kill_thread() will detect it and return to continue the deallocation, freeing the nilfs_sc_info structure before the thread does the notification. This fixes the issue by protecting the NULL assignment to "sc_task" and its notification, with spinlock "sc_state_lock" of the struct nilfs_sc_info. Since nilfs_segctor_kill_thread() does a final check to see if "sc_task" is NULL with "sc_state_lock" locked, this can eliminate the race. Link: https://lkml.kernel.org/r/20230327175318.8060-1-konishi.ryusuke@gmail.com Reported-by: syzbot+b08ebcc22f8f3e6be43a@syzkaller.appspotmail.com Link: https://lkml.kernel.org/r/00000000000000660d05f7dfa877@google.com Signed-off-by: Ryusuke Konishi Cc: Signed-off-by: Andrew Morton commit 618a8a917dbf5830e2064d2fa0568940eb5d2584 Author: Sergey Senozhatsky Date: Sat Mar 25 11:46:31 2023 +0900 zsmalloc: document freeable stats When freeable class stat was added to classes file (back in 2016) we forgot to update zsmalloc documentation. Fix that. Link: https://lkml.kernel.org/r/20230325024631.2817153-3-senozhatsky@chromium.org Fixes: 1120ed548394 ("mm/zsmalloc: add `freeable' column to pool stat") Signed-off-by: Sergey Senozhatsky Cc: Minchan Kim Cc: Signed-off-by: Andrew Morton commit 119b57eaf09478ce9e2a8f88a12749c2658b0ed5 Author: Sergey Senozhatsky Date: Sat Mar 25 11:46:30 2023 +0900 zsmalloc: document new fullness grouping Patch series "zsmalloc: minor documentation updates". Two minor patches that bring zsmalloc documentation up to date. This patch (of 2): Update documentation and reflect new zspages fullness grouping (we don't use almost_empty and almost_full anymore). Link: https://lkml.kernel.org/r/20230325024631.2817153-1-senozhatsky@chromium.org Link: https://lkml.kernel.org/r/20230325024631.2817153-2-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Fixes: 67e157eb3639 ("zsmalloc: show per fullness group class stats") Cc: Minchan Kim Cc: Signed-off-by: Andrew Morton commit f76b3a32879de215ced3f8c754c4077b0c2f79e3 Author: Shiyang Ruan Date: Fri Mar 24 10:28:00 2023 +0000 fsdax: force clear dirty mark if CoW XFS allows CoW on non-shared extents to combat fragmentation[1]. The old non-shared extent could be mwrited before, its dax entry is marked dirty. This results in a WARNing: [ 28.512349] ------------[ cut here ]------------ [ 28.512622] WARNING: CPU: 2 PID: 5255 at fs/dax.c:390 dax_insert_entry+0x342/0x390 [ 28.513050] Modules linked in: rpcsec_gss_krb5 auth_rpcgss nfsv4 nfs lockd grace fscache netfs nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set nf_tables [ 28.515462] CPU: 2 PID: 5255 Comm: fsstress Kdump: loaded Not tainted 6.3.0-rc1-00001-g85e1481e19c1-dirty #117 [ 28.515902] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS Arch Linux 1.16.1-1-1 04/01/2014 [ 28.516307] RIP: 0010:dax_insert_entry+0x342/0x390 [ 28.516536] Code: 30 5b 5d 41 5c 41 5d 41 5e 41 5f c3 cc cc cc cc 48 8b 45 20 48 83 c0 01 e9 e2 fe ff ff 48 8b 45 20 48 83 c0 01 e9 cd fe ff ff <0f> 0b e9 53 ff ff ff 48 8b 7c 24 08 31 f6 e8 1b 61 a1 00 eb 8c 48 [ 28.517417] RSP: 0000:ffffc9000845fb18 EFLAGS: 00010086 [ 28.517721] RAX: 0000000000000053 RBX: 0000000000000155 RCX: 000000000018824b [ 28.518113] RDX: 0000000000000000 RSI: ffffffff827525a6 RDI: 00000000ffffffff [ 28.518515] RBP: ffffea00062092c0 R08: 0000000000000000 R09: ffffc9000845f9c8 [ 28.518905] R10: 0000000000000003 R11: ffffffff82ddb7e8 R12: 0000000000000155 [ 28.519301] R13: 0000000000000000 R14: 000000000018824b R15: ffff88810cfa76b8 [ 28.519703] FS: 00007f14a0c94740(0000) GS:ffff88817bd00000(0000) knlGS:0000000000000000 [ 28.520148] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 28.520472] CR2: 00007f14a0c8d000 CR3: 000000010321c004 CR4: 0000000000770ee0 [ 28.520863] PKRU: 55555554 [ 28.521043] Call Trace: [ 28.521219] [ 28.521368] dax_fault_iter+0x196/0x390 [ 28.521595] dax_iomap_pte_fault+0x19b/0x3d0 [ 28.521852] __xfs_filemap_fault+0x234/0x2b0 [ 28.522116] __do_fault+0x30/0x130 [ 28.522334] do_fault+0x193/0x340 [ 28.522586] __handle_mm_fault+0x2d3/0x690 [ 28.522975] handle_mm_fault+0xe6/0x2c0 [ 28.523259] do_user_addr_fault+0x1bc/0x6f0 [ 28.523521] exc_page_fault+0x60/0x140 [ 28.523763] asm_exc_page_fault+0x22/0x30 [ 28.524001] RIP: 0033:0x7f14a0b589ca [ 28.524225] Code: c5 fe 7f 07 c5 fe 7f 47 20 c5 fe 7f 47 40 c5 fe 7f 47 60 c5 f8 77 c3 66 0f 1f 84 00 00 00 00 00 40 0f b6 c6 48 89 d1 48 89 fa aa 48 89 d0 c5 f8 77 c3 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 [ 28.525198] RSP: 002b:00007fff1dea1c98 EFLAGS: 00010202 [ 28.525505] RAX: 000000000000001e RBX: 000000000014a000 RCX: 0000000000006046 [ 28.525895] RDX: 00007f14a0c82000 RSI: 000000000000001e RDI: 00007f14a0c8d000 [ 28.526290] RBP: 000000000000006f R08: 0000000000000004 R09: 000000000014a000 [ 28.526681] R10: 0000000000000008 R11: 0000000000000246 R12: 028f5c28f5c28f5c [ 28.527067] R13: 8f5c28f5c28f5c29 R14: 0000000000011046 R15: 00007f14a0c946c0 [ 28.527449] [ 28.527600] ---[ end trace 0000000000000000 ]--- To be able to delete this entry, clear its dirty mark before invalidate_inode_pages2_range(). [1] https://lore.kernel.org/linux-xfs/20230321151339.GA11376@frogsfrogsfrogs/ Link: https://lkml.kernel.org/r/1679653680-2-1-git-send-email-ruansy.fnst@fujitsu.com Fixes: f80e1668888f3 ("fsdax: invalidate pages when CoW") Signed-off-by: Shiyang Ruan Cc: Dan Williams Cc: Darrick J. Wong Cc: Jan Kara Cc: Matthew Wilcox (Oracle) Cc: Signed-off-by: Andrew Morton commit 60d5b473d61be61ac315e544fcd6a8234a79500e Author: Peter Xu Date: Tue Mar 21 15:18:40 2023 -0400 mm/hugetlb: fix uffd wr-protection for CoW optimization path This patch fixes an issue that a hugetlb uffd-wr-protected mapping can be writable even with uffd-wp bit set. It only happens with hugetlb private mappings, when someone firstly wr-protects a missing pte (which will install a pte marker), then a write to the same page without any prior access to the page. Userfaultfd-wp trap for hugetlb was implemented in hugetlb_fault() before reaching hugetlb_wp() to avoid taking more locks that userfault won't need. However there's one CoW optimization path that can trigger hugetlb_wp() inside hugetlb_no_page(), which will bypass the trap. This patch skips hugetlb_wp() for CoW and retries the fault if uffd-wp bit is detected. The new path will only trigger in the CoW optimization path because generic hugetlb_fault() (e.g. when a present pte was wr-protected) will resolve the uffd-wp bit already. Also make sure anonymous UNSHARE won't be affected and can still be resolved, IOW only skip CoW not CoR. This patch will be needed for v5.19+ hence copy stable. [peterx@redhat.com: v2] Link: https://lkml.kernel.org/r/ZBzOqwF2wrHgBVZb@x1n [peterx@redhat.com: v3] Link: https://lkml.kernel.org/r/20230324142620.2344140-1-peterx@redhat.com Link: https://lkml.kernel.org/r/20230321191840.1897940-1-peterx@redhat.com Fixes: 166f3ecc0daf ("mm/hugetlb: hook page faults for uffd write protection") Signed-off-by: Peter Xu Reported-by: Muhammad Usama Anjum Tested-by: Muhammad Usama Anjum Acked-by: David Hildenbrand Reviewed-by: Mike Kravetz Cc: Andrea Arcangeli Cc: Axel Rasmussen Cc: Mike Rapoport Cc: Nadav Amit Cc: Signed-off-by: Andrew Morton commit 3dd4432549415f3c65dd52d5c687629efbf4ece1 Author: Liam R. Howlett Date: Mon Feb 27 09:36:07 2023 -0800 mm: enable maple tree RCU mode by default Use the maple tree in RCU mode for VMA tracking. The maple tree tracks the stack and is able to update the pivot (lower/upper boundary) in-place to allow the page fault handler to write to the tree while holding just the mmap read lock. This is safe as the writes to the stack have a guard VMA which ensures there will always be a NULL in the direction of the growth and thus will only update a pivot. It is possible, but not recommended, to have VMAs that grow up/down without guard VMAs. syzbot has constructed a testcase which sets up a VMA to grow and consume the empty space. Overwriting the entire NULL entry causes the tree to be altered in a way that is not safe for concurrent readers; the readers may see a node being rewritten or one that does not match the maple state they are using. Enabling RCU mode allows the concurrent readers to see a stable node and will return the expected result. [Liam.Howlett@Oracle.com: we don't need to free the nodes with RCU[ Link: https://lore.kernel.org/linux-mm/000000000000b0a65805f663ace6@google.com/ Link: https://lkml.kernel.org/r/20230227173632.3292573-9-surenb@google.com Fixes: d4af56c5c7c6 ("mm: start tracking VMAs with maple tree") Signed-off-by: Liam R. Howlett Signed-off-by: Suren Baghdasaryan Reported-by: syzbot+8d95422d3537159ca390@syzkaller.appspotmail.com Cc: Signed-off-by: Andrew Morton commit 790e1fa86b340c2bd4a327e01c161f7a1ad885f6 Author: Liam R. Howlett Date: Mon Feb 27 09:36:06 2023 -0800 maple_tree: add RCU lock checking to rcu callback functions Dereferencing RCU objects within the RCU callback without the RCU check has caused lockdep to complain. Fix the RCU dereferencing by using the RCU callback lock to ensure the operation is safe. Also stop creating a new lock to use for dereferencing during destruction of the tree or subtree. Instead, pass through a pointer to the tree that has the lock that is held for RCU dereferencing checking. It also does not make sense to use the maple state in the freeing scenario as the tree walk is a special case where the tree no longer has the normal encodings and parent pointers. Link: https://lkml.kernel.org/r/20230227173632.3292573-8-surenb@google.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Liam R. Howlett Reported-by: Suren Baghdasaryan Cc: Signed-off-by: Andrew Morton commit 0a2b18d948838e16912b3b627b504ab062b7d02a Author: Liam R. Howlett Date: Mon Feb 27 09:36:05 2023 -0800 maple_tree: add smp_rmb() to dead node detection Add an smp_rmb() before reading the parent pointer to ensure that anything read from the node prior to the parent pointer hasn't been reordered ahead of this check. The is necessary for RCU mode. Link: https://lkml.kernel.org/r/20230227173632.3292573-7-surenb@google.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Liam R. Howlett Signed-off-by: Suren Baghdasaryan Cc: Signed-off-by: Andrew Morton commit c13af03de46ba27674dd9fb31a17c0d480081139 Author: Liam R. Howlett Date: Mon Feb 27 09:36:04 2023 -0800 maple_tree: fix write memory barrier of nodes once dead for RCU mode During the development of the maple tree, the strategy of freeing multiple nodes changed and, in the process, the pivots were reused to store pointers to dead nodes. To ensure the readers see accurate pivots, the writers need to mark the nodes as dead and call smp_wmb() to ensure any readers can identify the node as dead before using the pivot values. There were two places where the old method of marking the node as dead without smp_wmb() were being used, which resulted in RCU readers seeing the wrong pivot value before seeing the node was dead. Fix this race condition by using mte_set_node_dead() which has the smp_wmb() call to ensure the race is closed. Add a WARN_ON() to the ma_free_rcu() call to ensure all nodes being freed are marked as dead to ensure there are no other call paths besides the two updated paths. This is necessary for the RCU mode of the maple tree. Link: https://lkml.kernel.org/r/20230227173632.3292573-6-surenb@google.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Liam R. Howlett Signed-off-by: Suren Baghdasaryan Cc: Signed-off-by: Andrew Morton commit 8372f4d83f96f35915106093cde4565836587123 Author: Liam Howlett Date: Mon Feb 27 09:36:03 2023 -0800 maple_tree: remove extra smp_wmb() from mas_dead_leaves() The call to mte_set_dead_node() before the smp_wmb() already calls smp_wmb() so this is not needed. This is an optimization for the RCU mode of the maple tree. Link: https://lkml.kernel.org/r/20230227173632.3292573-5-surenb@google.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Liam Howlett Signed-off-by: Suren Baghdasaryan Cc: Signed-off-by: Andrew Morton commit 2e5b4921f8efc9e845f4f04741797d16f36847eb Author: Liam Howlett Date: Mon Feb 27 09:36:02 2023 -0800 maple_tree: fix freeing of nodes in rcu mode The walk to destroy the nodes was not always setting the node type and would result in a destroy method potentially using the values as nodes. Avoid this by setting the correct node types. This is necessary for the RCU mode of the maple tree. Link: https://lkml.kernel.org/r/20230227173632.3292573-4-surenb@google.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Liam Howlett Signed-off-by: Suren Baghdasaryan Cc: Signed-off-by: Andrew Morton commit a7b92d59c885018cb7bb88539892278e4fd64b29 Author: Liam Howlett Date: Mon Feb 27 09:36:01 2023 -0800 maple_tree: detect dead nodes in mas_start() When initially starting a search, the root node may already be in the process of being replaced in RCU mode. Detect and restart the walk if this is the case. This is necessary for RCU mode of the maple tree. Link: https://lkml.kernel.org/r/20230227173632.3292573-3-surenb@google.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Liam Howlett Signed-off-by: Suren Baghdasaryan Cc: Signed-off-by: Andrew Morton commit 39d0bd86c499ecd6abae42a9b7112056c5560691 Author: Liam Howlett Date: Mon Feb 27 09:36:00 2023 -0800 maple_tree: be more cautious about dead nodes Patch series "Fix VMA tree modification under mmap read lock". Syzbot reported a BUG_ON in mm/mmap.c which was found to be caused by an inconsistency between threads walking the VMA maple tree. The inconsistency is caused by the page fault handler modifying the maple tree while holding the mmap_lock for read. This only happens for stack VMAs. We had thought this was safe as it only modifies a single pivot in the tree. Unfortunately, syzbot constructed a test case where the stack had no guard page and grew the stack to abut the next VMA. This causes us to delete the NULL entry between the two VMAs and rewrite the node. We considered several options for fixing this, including dropping the mmap_lock, then reacquiring it for write; and relaxing the definition of the tree to permit a zero-length NULL entry in the node. We decided the best option was to backport some of the RCU patches from -next, which solve the problem by allocating a new node and RCU-freeing the old node. Since the problem exists in 6.1, we preferred a solution which is similar to the one we intended to merge next merge window. These patches have been in -next since next-20230301, and have received intensive testing in Android as part of the RCU page fault patchset. They were also sent as part of the "Per-VMA locks" v4 patch series. Patches 1 to 7 are bug fixes for RCU mode of the tree and patch 8 enables RCU mode for the tree. Performance v6.3-rc3 vs patched v6.3-rc3: Running these changes through mmtests showed there was a 15-20% performance decrease in will-it-scale/brk1-processes. This tests creating and inserting a single VMA repeatedly through the brk interface and isn't representative of any real world applications. This patch (of 8): ma_pivots() and ma_data_end() may be called with a dead node. Ensure to that the node isn't dead before using the returned values. This is necessary for RCU mode of the maple tree. Link: https://lkml.kernel.org/r/20230327185532.2354250-1-Liam.Howlett@oracle.com Link: https://lkml.kernel.org/r/20230227173632.3292573-1-surenb@google.com Link: https://lkml.kernel.org/r/20230227173632.3292573-2-surenb@google.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Liam Howlett Signed-off-by: Suren Baghdasaryan Cc: Andy Lutomirski Cc: Arjun Roy Cc: Axel Rasmussen Cc: Chris Li Cc: David Hildenbrand Cc: David Howells Cc: Davidlohr Bueso Cc: David Rientjes Cc: Eric Dumazet Cc: freak07 Cc: Greg Thelen Cc: Hugh Dickins Cc: Ingo Molnar Cc: Jann Horn Cc: Joel Fernandes Cc: Johannes Weiner Cc: Kent Overstreet Cc: Laurent Dufour Cc: Lorenzo Stoakes Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Mike Rapoport Cc: Minchan Kim Cc: Paul E. McKenney Cc: Peter Oskolkov Cc: Peter Xu Cc: Peter Zijlstra Cc: Punit Agrawal Cc: Sebastian Andrzej Siewior Cc: Shakeel Butt Cc: Soheil Hassas Yeganeh Cc: Song Liu Cc: Vlastimil Babka Cc: Will Deacon Cc: Signed-off-by: Andrew Morton commit cbeb1c1b68d99b1435a8784e66ea6dbfb530d7de Merge: b97ee72ac088b e6db67fa871de Author: Jakub Kicinski Date: Wed Apr 5 17:24:26 2023 -0700 Merge tag 'wireless-2023-04-05' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Kalle Valo says: ==================== wireless fixes for v6.3 mt76 has a fix for leaking cleartext frames on a certain scenario and two firmware file handling related fixes. For brcmfmac we have a fix for an older SDIO suspend regression and for ath11k avoiding a kernel crash during hibernation with SUSE kernels. * tag 'wireless-2023-04-05' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: mt76: ignore key disable commands wifi: ath11k: reduce the MHI timeout to 20s wifi: mt76: mt7921: fix fw used for offload check for mt7922 wifi: mt76: mt7921: Fix use-after-free in fw features query. wifi: brcmfmac: Fix SDIO suspend/resume regression ==================== Link: https://lore.kernel.org/r/20230405105536.4E946C433D2@smtp.kernel.org Signed-off-by: Jakub Kicinski commit b97ee72ac088b45cc6be20f7a5f18d98408699c4 Merge: 4181b39ae1ffe 051737439eaee Author: Jakub Kicinski Date: Wed Apr 5 17:22:06 2023 -0700 Merge tag 'linux-can-fixes-for-6.3-20230405' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2023-04-05 The first patch is by Oleksij Rempel and fixes a out-of-bounds memory access in the j1939 protocol. The remaining 3 patches target the ISOTP protocol. Oliver Hartkopp fixes the ISOTP protocol to pass information about dropped PDUs to the user space via control messages. Michal Sojka's patch fixes poll() to not forward false EPOLLOUT events. And Oliver Hartkopp fixes a race condition between isotp_sendsmg() and isotp_release(). * tag 'linux-can-fixes-for-6.3-20230405' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: isotp: fix race between isotp_sendsmg() and isotp_release() can: isotp: isotp_ops: fix poll() to not report false EPOLLOUT events can: isotp: isotp_recvmsg(): use sock_recv_cmsgs() to get SOCK_RXQ_OVFL infos can: j1939: j1939_tp_tx_dat_new(): fix out-of-bounds memory access ==================== Link: https://lore.kernel.org/r/20230405092444.1802340-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit 4181b39ae1ffe768735488538dcd2c7eb0ebce05 Merge: 3ce9345580974 83c911dc5e0e8 Author: Jakub Kicinski Date: Wed Apr 5 17:10:32 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-04-04 (ice) This series contains updates to ice driver only. Simei adjusts error path on adding VF Flow Director filters that were not releasing all resources. Lingyu adds setting/resetting of VF Flow Director filters counters during initialization. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ice: Reset FDIR counter in FDIR init stage ice: fix wrong fallback logic for FDIR ==================== Link: https://lore.kernel.org/r/20230404172306.450880-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 3dfa8926efa910d423844bfc0132f70cd07f76e2 Merge: 1a4edef8e846f 0ec8671837a61 Author: Daniel Vetter Date: Wed Apr 5 21:06:27 2023 +0200 Merge tag 'drm-misc-fixes-2023-04-05' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull: * ivpu: DMA fence and suspend fixes * nouveau: Color-depth fixes * panfrost: Fix mmap error handling Signed-off-by: Daniel Vetter From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230405182855.GA1551@linux-uq9g commit a5b2781dcab2c77979a4b8adda781d2543580901 Author: Hans de Goede Date: Tue Apr 4 13:02:49 2023 +0200 ACPI: video: Add acpi_backlight=video quirk for Lenovo ThinkPad W530 The Lenovo ThinkPad W530 uses a nvidia k1000m GPU. When this gets used together with one of the older nvidia binary driver series (the latest series does not support it), then backlight control does not work. This is caused by commit 3dbc80a3e4c5 ("ACPI: video: Make backlight class device registration a separate step (v2)") combined with commit 5aa9d943e9b6 ("ACPI: video: Don't enable fallback path for creating ACPI backlight by default"). After these changes the acpi_video# backlight device is only registered when requested by a GPU driver calling acpi_video_register_backlight() which the nvidia binary driver does not do. I realize that using the nvidia binary driver is not a supported use-case and users can workaround this by adding acpi_backlight=video on the kernel commandline, but the ThinkPad W530 is a popular model under Linux users, so it seems worthwhile to add a quirk for this. I will also email Nvidia asking them to make the driver call acpi_video_register_backlight() when an internal LCD panel is detected. So maybe the next maintenance release of the drivers will fix this... Fixes: 5aa9d943e9b6 ("ACPI: video: Don't enable fallback path for creating ACPI backlight by default") Cc: All applicable Reviewed-by: Mario Limonciello Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 2699107989431d6db44f8a9e809ea74c387336d1 Author: Hans de Goede Date: Tue Apr 4 13:02:48 2023 +0200 ACPI: video: Add acpi_backlight=video quirk for Apple iMac14,1 and iMac14,2 On the Apple iMac14,1 and iMac14,2 all-in-ones (monitors with builtin "PC") the connection between the GPU and the panel is seen by the GPU driver as regular DP instead of eDP, causing the GPU driver to never call acpi_video_register_backlight(). (GPU drivers only call acpi_video_register_backlight() when an internal panel is detected, to avoid non working acpi_video# devices getting registered on desktops which unfortunately is a real issue.) Fix the missing acpi_video# backlight device on these all-in-ones by adding a acpi_backlight=video DMI quirk, so that video.ko will immediately register the backlight device instead of waiting for an acpi_video_register_backlight() call. Fixes: 5aa9d943e9b6 ("ACPI: video: Don't enable fallback path for creating ACPI backlight by default") Cc: All applicable Reviewed-by: Mario Limonciello Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit e506731c8f35699d746c615164ed620cd53c00ca Author: Hans de Goede Date: Tue Apr 4 13:02:47 2023 +0200 ACPI: video: Make acpi_backlight=video work independent from GPU driver Commit 3dbc80a3e4c5 ("ACPI: video: Make backlight class device registration a separate step (v2)") combined with commit 5aa9d943e9b6 ("ACPI: video: Don't enable fallback path for creating ACPI backlight by default") Means that the video.ko code now fully depends on the GPU driver calling acpi_video_register_backlight() for the acpi_video# backlight class devices to get registered. This means that if the GPU driver does not do this, acpi_backlight=video on the cmdline, or DMI quirks for selecting acpi_video# will not work. This is a problem on for example Apple iMac14,1 all-in-ones where the monitor's LCD panel shows up as a regular DP connection instead of eDP so the GPU driver will not call acpi_video_register_backlight() [1]. Fix this by making video.ko directly register the acpi_video# devices when these have been explicitly requested either on the cmdline or through DMI quirks (rather then auto-detection being used). [1] GPU drivers only call acpi_video_register_backlight() when an internal panel is detected, to avoid non working acpi_video# devices getting registered on desktops which unfortunately is a real issue. Fixes: 5aa9d943e9b6 ("ACPI: video: Don't enable fallback path for creating ACPI backlight by default") Cc: All applicable Reviewed-by: Mario Limonciello Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 78dfc9d1d1abb9e400386fa9c5724a8f7d75e3b9 Author: Hans de Goede Date: Tue Apr 4 13:02:46 2023 +0200 ACPI: video: Add auto_detect arg to __acpi_video_get_backlight_type() Allow callers of __acpi_video_get_backlight_type() to pass a pointer to a bool which will get set to false if the backlight-type comes from the cmdline or a DMI quirk and set to true if auto-detection was used. And make __acpi_video_get_backlight_type() non static so that it can be called directly outside of video_detect.c . While at it turn the acpi_video_get_backlight_type() and acpi_video_backlight_use_native() wrappers into static inline functions in include/acpi/video.h, so that we need to export one less symbol. Fixes: 5aa9d943e9b6 ("ACPI: video: Don't enable fallback path for creating ACPI backlight by default") Cc: All applicable Reviewed-by: Mario Limonciello Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 1edf48991a783d00a3a18dc0d27c88139e4030a2 Author: Pawel Laszczak Date: Fri Mar 31 05:06:00 2023 -0400 usb: cdnsp: Fixes error: uninitialized symbol 'len' The patch 5bc38d33a5a1: "usb: cdnsp: Fixes issue with redundant Status Stage" leads to the following Smatch static checker warning: drivers/usb/cdns3/cdnsp-ep0.c:470 cdnsp_setup_analyze() error: uninitialized symbol 'len'. cc: Fixes: 5bc38d33a5a1 ("usb: cdnsp: Fixes issue with redundant Status Stage") Signed-off-by: Pawel Laszczak Link: https://lore.kernel.org/r/20230331090600.454674-1-pawell@cadence.com Signed-off-by: Greg Kroah-Hartman commit 60a655debd36e3278a46872accc1a51a54f94f02 Author: Krzysztof Kozlowski Date: Sun Mar 26 22:45:18 2023 +0200 arm64: dts: rockchip: correct panel supplies on some rk3326 boards 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 2dd16a23e8c687bde605dbdcfedaed97bb2a0c0e Author: Krzysztof Kozlowski Date: Sun Mar 26 22:45:20 2023 +0200 arm64: dts: rockchip: use just "port" in panel on RockPro64 The panel bindings expect to have only one port, thus they do not allow to use "ports" node: rk3399-rockpro64.dtb: panel@0: 'ports' does not match any of the regexes: 'pinctrl-[0-9]+' There is only one endpoint, so use simpler form without "reg". Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230326204520.80859-3-krzysztof.kozlowski@linaro.org Signed-off-by: Heiko Stuebner commit 5438b349c0512a6fe023976aad8b9f19ca671dd1 Author: Krzysztof Kozlowski Date: Sun Mar 26 22:45:19 2023 +0200 arm64: dts: rockchip: use just "port" in panel on Pinebook Pro The panel bindings expect to have only one port, thus they do not allow to use "ports" node: rk3399-pinebook-pro.dtb: edp-panel: 'ports' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230326204520.80859-2-krzysztof.kozlowski@linaro.org Signed-off-by: Heiko Stuebner commit d19342c6609b67f2ba83b9eccca2777e3687f625 Author: Thiago Rafael Becker Date: Wed Apr 5 10:16:48 2023 -0300 cifs: sanitize paths in cifs_update_super_prepath. After a server reboot, clients are failing to move files with ENOENT. This is caused by DFS referrals containing multiple separators, which the server move call doesn't recognize. v1: Initial patch. v2: Move prototype to header. Link: https://bugzilla.redhat.com/show_bug.cgi?id=2182472 Fixes: a31080899d5f ("cifs: sanitize multiple delimiters in prepath") Actually-Fixes: 24e0a1eff9e2 ("cifs: switch to new mount api") Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Thiago Rafael Becker Signed-off-by: Steve French commit e07fec475cc86ce6ded82908df1d511edc3303b7 Author: Sandeep Dhavale Date: Sat Apr 1 06:05:09 2023 +0000 usb: gadgetfs: Fix ep_read_iter to handle ITER_UBUF iov_iter for ep_read_iter can be ITER_UBUF with io_uring. In that case dup_iter() does not have to allocate iov and it can return NULL. Fix the assumption by checking for iter_is_ubuf() other wise ep_read_iter can treat this as failure and return -ENOMEM. Fixes: 1e23db450cff ("io_uring: use iter_ubuf for single range imports") Signed-off-by: Sandeep Dhavale Acked-by: Jens Axboe Link: https://lore.kernel.org/r/20230401060509.3608259-3-dhavale@google.com Signed-off-by: Greg Kroah-Hartman commit d356b3cdd00cae4508be566a47c0cfb74e14862a Author: Sandeep Dhavale Date: Sat Apr 1 06:05:08 2023 +0000 usb: gadget: f_fs: Fix ffs_epfile_read_iter to handle ITER_UBUF iov_iter for ffs_epfile_read_iter can be ITER_UBUF with io_uring. In that case dup_iter() does not have to allocate anything and it can return NULL. ffs_epfile_read_iter treats this as a failure and returns -ENOMEM. Fix it by checking if iter_is_ubuf(). Fixes: 1e23db450cff ("io_uring: use iter_ubuf for single range imports") Signed-off-by: Sandeep Dhavale Acked-by: Jens Axboe Link: https://lore.kernel.org/r/20230401060509.3608259-2-dhavale@google.com Signed-off-by: Greg Kroah-Hartman commit eddebe39602efe631b83ff8d03f26eba12cfd760 Author: RD Babiera Date: Wed Mar 29 21:51:59 2023 +0000 usb: typec: altmodes/displayport: Fix configure initial pin assignment While determining the initial pin assignment to be sent in the configure message, using the DP_PIN_ASSIGN_DP_ONLY_MASK mask causes the DFP_U to send both Pin Assignment C and E when both are supported by the DFP_U and UFP_U. The spec (Table 5-7 DFP_U Pin Assignment Selection Mandates, VESA DisplayPort Alt Mode Standard v2.0) indicates that the DFP_U never selects Pin Assignment E when Pin Assignment C is offered. Update the DP_PIN_ASSIGN_DP_ONLY_MASK conditional to intially select only Pin Assignment C if it is available. Fixes: 0e3bb7d6894d ("usb: typec: Add driver for DisplayPort alternate mode") Cc: stable@vger.kernel.org Signed-off-by: RD Babiera Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230329215159.2046932-1-rdbabiera@google.com Signed-off-by: Greg Kroah-Hartman commit ec799c8a92e0be91e0940cc739a27f483242df65 Author: Heikki Krogerus Date: Thu Mar 30 18:02:24 2023 +0300 usb: dwc3: pci: add support for the Intel Meteor Lake-S This patch adds the necessary PCI ID for Intel Meteor Lake-S devices. Signed-off-by: Heikki Krogerus Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230330150224.89316-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 32d85999680601d01b2a36713c9ffd7397c8688b Author: Ard Biesheuvel Date: Tue Apr 4 12:36:25 2023 +0200 arm64: compat: Work around uninitialized variable warning Dan reports that smatch complains about a potential uninitialized variable being used in the compat alignment fixup code. The logic is not wrong per se, but we do end up using an uninitialized variable if reading the instruction that triggered the alignment fault from user space faults, even if the fault ensures that the uninitialized value doesn't propagate any further. Given that we just give up and return 1 if any fault occurs when reading the instruction, let's get rid of the 'success handling' pattern that captures the fault in a variable and aborts later, and instead, just return 1 immediately if any of the get_user() calls result in an exception. Fixes: 3fc24ef32d3b ("arm64: compat: Implement misalignment fixups for multiword loads") Reported-by: kernel test robot Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/202304021214.gekJ8yRc-lkp@intel.com/ Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20230404103625.2386382-1-ardb@kernel.org Signed-off-by: Catalin Marinas commit 99ddf2254febae9eab7fb0bcc02c5322243f5c49 Merge: 76f598ba7d8e2 3357c6e429643 Author: Linus Torvalds Date: Wed Apr 5 09:11:08 2023 -0700 Merge tag 'trace-v6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fixes from Steven Rostedt: - Fix timerlat notification, as it was not triggering the notify to users when a new max latency was hit. - Do not trigger max latency if the tracing is off. When tracing is off, the ring buffer is not updated, it does not make sense to notify when there's a new max latency detected by the tracer, as why that latency happened is not available. The tracing logic still runs when the ring buffer is disabled, but it should not be triggering notifications. - Fix race on freeing the synthetic event "last_cmd" variable by adding a mutex around it. - Fix race between reader and writer of the ring buffer by adding memory barriers. When the writer is still on the reader page it must have its content visible on the buffer before it moves the commit index that the reader uses to know how much content is on the page. - Make get_lock_parent_ip() always inlined, as it uses _THIS_IP_ and _RET_IP_, which gets broken if it is not inlined. - Make __field(int, arr[5]) in a TRACE_EVENT() macro fail to build. The field formats of trace events are calculated by using sizeof(type) and other means by what is passed into the structure macros like __field(). The __field() macro is only meant for atom types like int, long, short, pointer, etc. It is not meant for arrays. The code will currently compile with arrays, but then the format produced will be inaccurate, and user space parsing tools will break. Two bugs have already been fixed, now add code that will make the kernel fail to build if another trace event includes this buggy field format. - Fix boot up snapshot code: Boot snapshots were triggering when not even asked for on the kernel command line. This was caused by two bugs: 1) It would trigger a snapshot on any instance if one was created from the kernel command line. 2) The error handling would only affect the top level instance. So the fact that a snapshot was done on a instance that didn't allocate a buffer triggered a warning written into the top level buffer, and worse yet, disabled the top level buffer. - Fix memory leak that was caused when an error was logged in a trace buffer instance, and then the buffer instance was removed. The allocated error log messages still needed to be freed. * tag 'trace-v6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing: Free error logs of tracing instances tracing: Fix ftrace_boot_snapshot command line logic tracing: Have tracing_snapshot_instance_cond() write errors to the appropriate instance tracing: Error if a trace event has an array for a __field() tracing/osnoise: Fix notify new tracing_max_latency tracing/timerlat: Notify new max thread latency ftrace: Mark get_lock_parent_ip() __always_inline ring-buffer: Fix race while reader and writer are on the same page tracing/synthetic: Fix races on freeing last_cmd commit d3205ab75e99a47539ec91ef85ba488f4ddfeaa9 Author: Keith Busch Date: Mon Apr 3 13:09:25 2023 -0700 nvme: fix discard support without oncs The device can report discard support without setting the ONCS DSM bit. When not set, the driver clears max_discard_size expecting it to be set later. We don't know the size until we have the namespace format, though, so setting it is deferred until configuring one, but the driver was abandoning the discard settings due to that initial clearing. Move the max_discard_size calculation above the check for a '0' discard size. Fixes: 1a86924e4f46475 ("nvme: fix interpretation of DMRSL") Reported-by: Laurence Oberman Signed-off-by: Keith Busch Reviewed-by: Niklas Cassel Reviewed-by: Sagi Grimberg Tested-by: Laurence Oberman Signed-off-by: Christoph Hellwig commit 3847e716b68e871ab64fc0cdad7fac9b7c1b022d Author: Fabio Estevam Date: Tue Mar 28 15:51:47 2023 -0300 ARM: dts: imx6ull-colibri: Remove unnecessary #address-cells/#size-cells Building with W=1 leads to the following dtc warning: arch/arm/boot/dts/imx6ull-colibri.dtsi:36.9-46.5: Warning (graph_child_address): /connector/ports: graph node has single child node 'port@0', #address-cells/#size-cells are not necessary Since a single port is used, 'ports' can be removed, as well as the unnecessary #address-cells/#size-cells. Fixes: bd5880e10982 ("ARM: dts: colibri-imx6ull: Enable dual-role switching") Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 82655f90701de5e0f7381b16534602bc2b8fe920 Author: Fabio Estevam Date: Tue Mar 28 15:51:46 2023 -0300 ARM: dts: imx7d-remarkable2: Remove unnecessary #address-cells/#size-cells Building with W=1 leads to the following dtc warning: arch/arm/boot/dts/imx7d-remarkable2.dts:319.19-335.4: Warning (avoid_unnecessary_addr_size): /soc/bus@30800000/i2c@30a50000/pmic@62: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property Remove unnecessary #address-cells/#size-cells to fix it. Fixes: 9076cbaa7757 ("ARM: dts: imx7d-remarkable2: Enable silergy,sy7636a") Signed-off-by: Fabio Estevam Reviewed-by: Alistair Francis Signed-off-by: Shawn Guo commit 02c447a0d79f0c966563e5095a017cbf9477ca6d Author: Peng Fan Date: Tue Mar 28 14:19:05 2023 +0800 arm64: dts: imx8mp-verdin: correct off-on-delay The property should be off-on-delay-us, not off-on-delay Fixes: a39ed23bdf6e ("arm64: dts: freescale: add initial support for verdin imx8m plus") Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 130c1f4306d56301216baaea68afdd909892c73f Author: Peng Fan Date: Tue Mar 28 14:19:04 2023 +0800 arm64: dts: imx8mm-verdin: correct off-on-delay The property should be off-on-delay-us, not off-on-delay Fixes: 6a57f224f734 ("arm64: dts: freescale: add initial support for verdin imx8m mini") Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 3357c6e429643231e60447b52ffbb7ac895aca22 Author: Steven Rostedt (Google) Date: Tue Apr 4 19:45:04 2023 -0400 tracing: Free error logs of tracing instances When a tracing instance is removed, the error messages that hold errors that occurred in the instance needs to be freed. The following reports a memory leak: # cd /sys/kernel/tracing # mkdir instances/foo # echo 'hist:keys=x' > instances/foo/events/sched/sched_switch/trigger # cat instances/foo/error_log [ 117.404795] hist:sched:sched_switch: error: Couldn't find field Command: hist:keys=x ^ # rmdir instances/foo Then check for memory leaks: # echo scan > /sys/kernel/debug/kmemleak # cat /sys/kernel/debug/kmemleak unreferenced object 0xffff88810d8ec700 (size 192): comm "bash", pid 869, jiffies 4294950577 (age 215.752s) hex dump (first 32 bytes): 60 dd 68 61 81 88 ff ff 60 dd 68 61 81 88 ff ff `.ha....`.ha.... a0 30 8c 83 ff ff ff ff 26 00 0a 00 00 00 00 00 .0......&....... backtrace: [<00000000dae26536>] kmalloc_trace+0x2a/0xa0 [<00000000b2938940>] tracing_log_err+0x277/0x2e0 [<000000004a0e1b07>] parse_atom+0x966/0xb40 [<0000000023b24337>] parse_expr+0x5f3/0xdb0 [<00000000594ad074>] event_hist_trigger_parse+0x27f8/0x3560 [<00000000293a9645>] trigger_process_regex+0x135/0x1a0 [<000000005c22b4f2>] event_trigger_write+0x87/0xf0 [<000000002cadc509>] vfs_write+0x162/0x670 [<0000000059c3b9be>] ksys_write+0xca/0x170 [<00000000f1cddc00>] do_syscall_64+0x3e/0xc0 [<00000000868ac68c>] entry_SYSCALL_64_after_hwframe+0x72/0xdc unreferenced object 0xffff888170c35a00 (size 32): comm "bash", pid 869, jiffies 4294950577 (age 215.752s) hex dump (first 32 bytes): 0a 20 20 43 6f 6d 6d 61 6e 64 3a 20 68 69 73 74 . Command: hist 3a 6b 65 79 73 3d 78 0a 00 00 00 00 00 00 00 00 :keys=x......... backtrace: [<000000006a747de5>] __kmalloc+0x4d/0x160 [<000000000039df5f>] tracing_log_err+0x29b/0x2e0 [<000000004a0e1b07>] parse_atom+0x966/0xb40 [<0000000023b24337>] parse_expr+0x5f3/0xdb0 [<00000000594ad074>] event_hist_trigger_parse+0x27f8/0x3560 [<00000000293a9645>] trigger_process_regex+0x135/0x1a0 [<000000005c22b4f2>] event_trigger_write+0x87/0xf0 [<000000002cadc509>] vfs_write+0x162/0x670 [<0000000059c3b9be>] ksys_write+0xca/0x170 [<00000000f1cddc00>] do_syscall_64+0x3e/0xc0 [<00000000868ac68c>] entry_SYSCALL_64_after_hwframe+0x72/0xdc The problem is that the error log needs to be freed when the instance is removed. Link: https://lore.kernel.org/lkml/76134d9f-a5ba-6a0d-37b3-28310b4a1e91@alu.unizg.hr/ Link: https://lore.kernel.org/linux-trace-kernel/20230404194504.5790b95f@gandalf.local.home Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Andrew Morton Cc: Mark Rutland Cc: Thorsten Leemhuis Cc: Ulf Hansson Cc: Eric Biggers Fixes: 2f754e771b1a6 ("tracing: Have the error logs show up in the proper instances") Reported-by: Mirsad Goran Todorovac Tested-by: Mirsad Todorovac Signed-off-by: Steven Rostedt (Google) commit 85af7ffd24da38e416a14bd6bf207154d94faa83 Author: Peng Fan Date: Mon Mar 27 18:03:21 2023 +0800 arm64: dts: imx8mm-evk: correct pmic clock source The osc_32k supports #clock-cells as 0, using an id is wrong, drop it. Fixes: a6a355ede574 ("arm64: dts: imx8mm-evk: Add 32.768 kHz clock to PMIC") Signed-off-by: Peng Fan Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit 81515ecf155a38f3532bf5ddef88d651898df6be Author: Tony Luck Date: Tue Apr 4 10:46:41 2023 -0700 x86/cpu: Add model number for Intel Arrow Lake processor Successor to Lunar Lake. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230404174641.426593-1-tony.luck@intel.com commit 0b186bb06198653d74a141902a7739e0bde20cf4 Author: Daniel Baluta Date: Wed Apr 5 12:26:55 2023 +0300 ASoC: SOF: pm: Tear down pipelines only if DSP was active With PCI if the device was suspended it is brought back to full power and then suspended again. This doesn't happen when device is described via DT. We need to make sure that we tear down pipelines only if the device was previously active (thus the pipelines were setup). Otherwise, we can break the use_count: [ 219.009743] sof-audio-of-imx8m 3b6e8000.dsp: sof_ipc3_tear_down_all_pipelines: widget PIPELINE.2.SAI3.IN is still in use: count -1 and after this everything stops working. Fixes: d185e0689abc ("ASoC: SOF: pm: Always tear down pipelines before DSP suspend") Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Daniel Baluta Link: https://lore.kernel.org/r/20230405092655.19587-1-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown commit 4b6d621c9d859ff89e68cebf6178652592676013 Author: Greg Kroah-Hartman Date: Sat Apr 1 22:03:27 2023 +0200 memstick: fix memory leak if card device is never registered When calling dev_set_name() memory is allocated for the name for the struct device. Once that structure device is registered, or attempted to be registerd, with the driver core, the driver core will handle cleaning up that memory when the device is removed from the system. Unfortunatly for the memstick code, there is an error path that causes the struct device to never be registered, and so the memory allocated in dev_set_name will be leaked. Fix that leak by manually freeing it right before the memory for the device is freed. Cc: Maxim Levitsky Cc: Alex Dubov Cc: Ulf Hansson Cc: "Rafael J. Wysocki" Cc: Hans de Goede Cc: Kay Sievers Cc: linux-mmc@vger.kernel.org Fixes: 0252c3b4f018 ("memstick: struct device - replace bus_id with dev_name(), dev_set_name()") Cc: stable Co-developed-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman Co-developed-by: Mirsad Goran Todorovac Signed-off-by: Mirsad Goran Todorovac Link: https://lore.kernel.org/r/20230401200327.16800-1-gregkh@linuxfoundation.org Signed-off-by: Ulf Hansson commit 051737439eaee5bdd03d3c2ef5510d54a478fd05 Author: Oliver Hartkopp Date: Fri Mar 31 15:19:35 2023 +0200 can: isotp: fix race between isotp_sendsmg() and isotp_release() As discussed with Dae R. Jeong and Hillf Danton here [1] the sendmsg() function in isotp.c might get into a race condition when restoring the former tx.state from the old_state. Remove the old_state concept and implement proper locking for the ISOTP_IDLE transitions in isotp_sendmsg(), inspired by a simplification idea from Hillf Danton. Introduce a new tx.state ISOTP_SHUTDOWN and use the same locking mechanism from isotp_release() which resolves a potential race between isotp_sendsmg() and isotp_release(). [1] https://lore.kernel.org/linux-can/ZB%2F93xJxq%2FBUqAgG@dragonet v1: https://lore.kernel.org/all/20230331102114.15164-1-socketcan@hartkopp.net v2: https://lore.kernel.org/all/20230331123600.3550-1-socketcan@hartkopp.net take care of signal interrupts for wait_event_interruptible() in isotp_release() v3: https://lore.kernel.org/all/20230331130654.9886-1-socketcan@hartkopp.net take care of signal interrupts for wait_event_interruptible() in isotp_sendmsg() in the wait_tx_done case v4: https://lore.kernel.org/all/20230331131935.21465-1-socketcan@hartkopp.net take care of signal interrupts for wait_event_interruptible() in isotp_sendmsg() in ALL cases Cc: Dae R. Jeong Cc: Hillf Danton Signed-off-by: Oliver Hartkopp Fixes: 4f027cba8216 ("can: isotp: split tx timer into transmission and timeout") Link: https://lore.kernel.org/all/20230331131935.21465-1-socketcan@hartkopp.net Cc: stable@vger.kernel.org [mkl: rephrase commit message] Signed-off-by: Marc Kleine-Budde commit 1a4edef8e846f0ff7cfbd35b6e62cf26989e59ce Merge: 7e364e56293bb dc3421560a673 Author: Daniel Vetter Date: Wed Apr 5 11:14:18 2023 +0200 Merge tag 'drm-intel-fixes-2023-04-05' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v6.3-rc6: - Fix DP MST DSC M/N calculation to use compressed bpp - Fix racy use-after-free in perf ioctl - Fix context runtime accounting - Fix handling of GT reset during HuC loading - Fix use of unsigned vm_fault_t for error values Signed-off-by: Daniel Vetter From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87zg7mzomz.fsf@intel.com commit 79e19fa79cb5d5f1b3bf3e3ae24989ccb93c7b7b Author: Michal Sojka Date: Fri Mar 31 14:55:11 2023 +0200 can: isotp: isotp_ops: fix poll() to not report false EPOLLOUT events When using select()/poll()/epoll() with a non-blocking ISOTP socket to wait for when non-blocking write is possible, a false EPOLLOUT event is sometimes returned. This can happen at least after sending a message which must be split to multiple CAN frames. The reason is that isotp_sendmsg() returns -EAGAIN when tx.state is not equal to ISOTP_IDLE and this behavior is not reflected in datagram_poll(), which is used in isotp_ops. This is fixed by introducing ISOTP-specific poll function, which suppresses the EPOLLOUT events in that case. v2: https://lore.kernel.org/all/20230302092812.320643-1-michal.sojka@cvut.cz v1: https://lore.kernel.org/all/20230224010659.48420-1-michal.sojka@cvut.cz https://lore.kernel.org/all/b53a04a2-ba1f-3858-84c1-d3eb3301ae15@hartkopp.net Signed-off-by: Michal Sojka Reported-by: Jakub Jira Tested-by: Oliver Hartkopp Acked-by: Oliver Hartkopp Fixes: e057dd3fc20f ("can: add ISO 15765-2:2016 transport protocol") Link: https://lore.kernel.org/all/20230331125511.372783-1-michal.sojka@cvut.cz Cc: stable@vger.kernel.org Signed-off-by: Marc Kleine-Budde commit 0145462fc802cd447ef5d029758043c7f15b4b1e Author: Oliver Hartkopp Date: Thu Mar 30 19:02:48 2023 +0200 can: isotp: isotp_recvmsg(): use sock_recv_cmsgs() to get SOCK_RXQ_OVFL infos isotp.c was still using sock_recv_timestamp() which does not provide control messages to detect dropped PDUs in the receive path. Fixes: e057dd3fc20f ("can: add ISO 15765-2:2016 transport protocol") Signed-off-by: Oliver Hartkopp Link: https://lore.kernel.org/all/20230330170248.62342-1-socketcan@hartkopp.net Cc: stable@vger.kernel.org Signed-off-by: Marc Kleine-Budde commit b45193cb4df556fe6251b285a5ce44046dd36b4a Author: Oleksij Rempel Date: Tue Apr 4 09:31:28 2023 +0200 can: j1939: j1939_tp_tx_dat_new(): fix out-of-bounds memory access In the j1939_tp_tx_dat_new() function, an out-of-bounds memory access could occur during the memcpy() operation if the size of skb->cb is larger than the size of struct j1939_sk_buff_cb. This is because the memcpy() operation uses the size of skb->cb, leading to a read beyond the struct j1939_sk_buff_cb. Updated the memcpy() operation to use the size of struct j1939_sk_buff_cb instead of the size of skb->cb. This ensures that the memcpy() operation only reads the memory within the bounds of struct j1939_sk_buff_cb, preventing out-of-bounds memory access. Additionally, add a BUILD_BUG_ON() to check that the size of skb->cb is greater than or equal to the size of struct j1939_sk_buff_cb. This ensures that the skb->cb buffer is large enough to hold the j1939_sk_buff_cb structure. Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Reported-by: Shuangpeng Bai Tested-by: Shuangpeng Bai Signed-off-by: Oleksij Rempel Link: https://groups.google.com/g/syzkaller/c/G_LL-C3plRs/m/-8xCi6dCAgAJ Link: https://lore.kernel.org/all/20230404073128.3173900-1-o.rempel@pengutronix.de Cc: stable@vger.kernel.org [mkl: rephrase commit message] Signed-off-by: Marc Kleine-Budde commit 24d3ae2f37d8bc3c14b31d353c5d27baf582b6a6 Author: Kan Liang Date: Wed Mar 22 13:24:49 2023 -0700 perf/core: Fix the same task check in perf_event_set_output The same task check in perf_event_set_output has some potential issues for some usages. For the current perf code, there is a problem if using of perf_event_open() to have multiple samples getting into the same mmap’d memory when they are both attached to the same process. https://lore.kernel.org/all/92645262-D319-4068-9C44-2409EF44888E@gmail.com/ Because the event->ctx is not ready when the perf_event_set_output() is invoked in the perf_event_open(). Besides the above issue, before the commit bd2756811766 ("perf: Rewrite core context handling"), perf record can errors out when sampling with a hardware event and a software event as below. $ perf record -e cycles,dummy --per-thread ls failed to mmap with 22 (Invalid argument) That's because that prior to the commit a hardware event and a software event are from different task context. The problem should be a long time issue since commit c3f00c70276d ("perk: Separate find_get_context() from event initialization"). The task struct is stored in the event->hw.target for each per-thread event. It is a more reliable way to determine whether two events are attached to the same task. The event->hw.target was also introduced several years ago by the commit 50f16a8bf9d7 ("perf: Remove type specific target pointers"). It can not only be used to fix the issue with the current code, but also back port to fix the issues with an older kernel. Note: The event->hw.target was introduced later than commit c3f00c70276d. The patch may cannot be applied between the commit c3f00c70276d and commit 50f16a8bf9d7. Anybody that wants to back-port this at that period may have to find other solutions. Fixes: c3f00c70276d ("perf: Separate find_get_context() from event initialization") Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Zhengjun Xing Link: https://lkml.kernel.org/r/20230322202449.512091-1-kan.liang@linux.intel.com commit b168098912926236bbeebaf7795eb7aab76d2b45 Author: Peter Zijlstra Date: Mon Apr 3 11:08:58 2023 +0200 perf: Optimize perf_pmu_migrate_context() Thomas reported that offlining CPUs spends a lot of time in synchronize_rcu() as called from perf_pmu_migrate_context() even though he's not actually using uncore events. Turns out, the thing is unconditionally waiting for RCU, even if there's no actual events to migrate. Fixes: 0cda4c023132 ("perf: Introduce perf_pmu_migrate_context()") Reported-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Tested-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Reviewed-by: Paul E. McKenney Link: https://lkml.kernel.org/r/20230403090858.GT4253@hirez.programming.kicks-ass.net commit 0ec8671837a61d841462179686c5819d951d3b10 Author: Jacek Lawrynowicz Date: Fri Mar 31 13:36:03 2023 +0200 accel/ivpu: Fix S3 system suspend when not idle Wait for VPU to be idle in ivpu_pm_suspend_cb() before powering off the device, so jobs are not lost and TDRs are not triggered after resume. Fixes: 852be13f3bd3 ("accel/ivpu: Add PM support") Signed-off-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20230331113603.2802515-3-stanislaw.gruszka@linux.intel.com commit 774e7cb50359eff7e966f4e2e80c9486014d3a23 Author: Karol Wachowski Date: Fri Mar 31 13:36:02 2023 +0200 accel/ivpu: Add dma fence to command buffers only Currently job->done_fence is added to every BO handle within a job. If job handle (command buffer) is shared between multiple submits, KMD will add the fence in each of them. Then bo_wait_ioctl() executed on command buffer will exit only when all jobs containing that handle are done. This creates deadlock scenario for user mode driver in case when job handle is added as dependency of another job, because bo_wait_ioctl() of first job will wait until second job finishes, and second job can not finish before first one. Having fences added only to job buffer handle allows user space to execute bo_wait_ioctl() on the job even if it's handle is submitted with other job. Fixes: cd7272215c44 ("accel/ivpu: Add command buffer submission logic") 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/20230331113603.2802515-2-stanislaw.gruszka@linux.intel.com commit ad8cd35c58ca3ec5e93f52a0124899627b98efb2 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 Reviewed-by: Dmitry Baryshkov 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 e94891641c21f607e4d6887bcd3beff882fcc483 Author: Steven Rostedt (Google) Date: Tue Apr 4 22:21:15 2023 -0400 tracing: Fix ftrace_boot_snapshot command line logic The kernel command line ftrace_boot_snapshot by itself is supposed to trigger a snapshot at the end of boot up of the main top level trace buffer. A ftrace_boot_snapshot=foo will do the same for an instance called foo that was created by trace_instance=foo,... The logic was broken where if ftrace_boot_snapshot was by itself, it would trigger a snapshot for all instances that had tracing enabled, regardless if it asked for a snapshot or not. When a snapshot is requested for a buffer, the buffer's tr->allocated_snapshot is set to true. Use that to know if a trace buffer wants a snapshot at boot up or not. Since the top level buffer is part of the ftrace_trace_arrays list, there's no reason to treat it differently than the other buffers. Just iterate the list if ftrace_boot_snapshot was specified. Link: https://lkml.kernel.org/r/20230405022341.895334039@goodmis.org Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Andrew Morton Cc: Ross Zwisler Fixes: 9c1c251d670bc ("tracing: Allow boot instances to have snapshot buffers") Signed-off-by: Steven Rostedt (Google) commit 9d52727f8043cfda241ae96896628d92fa9c50bb Author: Steven Rostedt (Google) Date: Tue Apr 4 22:21:14 2023 -0400 tracing: Have tracing_snapshot_instance_cond() write errors to the appropriate instance If a trace instance has a failure with its snapshot code, the error message is to be written to that instance's buffer. But currently, the message is written to the top level buffer. Worse yet, it may also disable the top level buffer and not the instance that had the issue. Link: https://lkml.kernel.org/r/20230405022341.688730321@goodmis.org Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Andrew Morton Cc: Ross Zwisler Fixes: 2824f50332486 ("tracing: Make the snapshot trigger work with instances") Signed-off-by: Steven Rostedt (Google) commit 3ce9345580974863c060fa32971537996a7b2d57 Author: Shailend Chand Date: Mon Apr 3 10:28:09 2023 -0700 gve: Secure enough bytes in the first TX desc for all TCP pkts Non-GSO TCP packets whose SKBs' linear portion did not include the entire TCP header were not populating the first Tx descriptor with as many bytes as the vNIC expected. This change ensures that all TCP packets populate the first descriptor with the correct number of bytes. Fixes: 893ce44df565 ("gve: Add basic driver framework for Compute Engine Virtual NIC") Signed-off-by: Shailend Chand Link: https://lore.kernel.org/r/20230403172809.2939306-1-shailend@google.com Signed-off-by: Jakub Kicinski commit a1865f2e7d10dde00d35a2122b38d2e469ae67ed Author: Eric Dumazet Date: Mon Apr 3 21:46:43 2023 +0000 netlink: annotate lockless accesses to nlk->max_recvmsg_len syzbot reported a data-race in data-race in netlink_recvmsg() [1] Indeed, netlink_recvmsg() can be run concurrently, and netlink_dump() also needs protection. [1] BUG: KCSAN: data-race in netlink_recvmsg / netlink_recvmsg read to 0xffff888141840b38 of 8 bytes by task 23057 on cpu 0: netlink_recvmsg+0xea/0x730 net/netlink/af_netlink.c:1988 sock_recvmsg_nosec net/socket.c:1017 [inline] sock_recvmsg net/socket.c:1038 [inline] __sys_recvfrom+0x1ee/0x2e0 net/socket.c:2194 __do_sys_recvfrom net/socket.c:2212 [inline] __se_sys_recvfrom net/socket.c:2208 [inline] __x64_sys_recvfrom+0x78/0x90 net/socket.c:2208 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 0xffff888141840b38 of 8 bytes by task 23037 on cpu 1: netlink_recvmsg+0x114/0x730 net/netlink/af_netlink.c:1989 sock_recvmsg_nosec net/socket.c:1017 [inline] sock_recvmsg net/socket.c:1038 [inline] ____sys_recvmsg+0x156/0x310 net/socket.c:2720 ___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: 0x0000000000000000 -> 0x0000000000001000 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 23037 Comm: syz-executor.2 Not tainted 6.3.0-rc4-syzkaller-00195-g5a57b48fdfcb #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Fixes: 9063e21fb026 ("netlink: autosize skb lengthes") Reported-by: syzbot Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230403214643.768555-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit e847c7675e19ef344913724dc68f83df31ad6a17 Author: Andy Roulin Date: Mon Apr 3 14:20:53 2023 -0700 ethtool: reset #lanes when lanes is omitted If the number of lanes was forced and then subsequently the user omits this parameter, the ksettings->lanes is reset. The driver should then reset the number of lanes to the device's default for the specified speed. However, although the ksettings->lanes is set to 0, the mod variable is not set to true to indicate the driver and userspace should be notified of the changes. The consequence is that the same ethtool operation will produce different results based on the initial state. If the initial state is: $ ethtool swp1 | grep -A 3 'Speed: ' Speed: 500000Mb/s Lanes: 2 Duplex: Full Auto-negotiation: on then executing 'ethtool -s swp1 speed 50000 autoneg off' will yield: $ ethtool swp1 | grep -A 3 'Speed: ' Speed: 500000Mb/s Lanes: 2 Duplex: Full Auto-negotiation: off While if the initial state is: $ ethtool swp1 | grep -A 3 'Speed: ' Speed: 500000Mb/s Lanes: 1 Duplex: Full Auto-negotiation: off executing the same 'ethtool -s swp1 speed 50000 autoneg off' results in: $ ethtool swp1 | grep -A 3 'Speed: ' Speed: 500000Mb/s Lanes: 1 Duplex: Full Auto-negotiation: off This patch fixes this behavior. Omitting lanes will always results in the driver choosing the default lane width for the chosen speed. In this scenario, regardless of the initial state, the end state will be, e.g., $ ethtool swp1 | grep -A 3 'Speed: ' Speed: 500000Mb/s Lanes: 2 Duplex: Full Auto-negotiation: off Fixes: 012ce4dd3102 ("ethtool: Extend link modes settings uAPI with lanes") Signed-off-by: Andy Roulin Reviewed-by: Danielle Ratson Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/ac238d6b-8726-8156-3810-6471291dbc7f@nvidia.com Signed-off-by: Jakub Kicinski commit 95fac54004a8aebddad74e9984c1c9785190668c Merge: 218c597325f4f ab5fb73ffa010 Author: Jakub Kicinski Date: Tue Apr 4 18:56:59 2023 -0700 Merge branch 'raw-ping-fix-locking-in-proc-net-raw-icmp' Kuniyuki Iwashima says: ==================== raw/ping: Fix locking in /proc/net/{raw,icmp}. The first patch fixes a NULL deref for /proc/net/raw and second one fixes the same issue for ping sockets. The first patch also converts hlist_nulls to hlist, but this is because the current code uses sk_nulls_for_each() for lockless readers, instead of sk_nulls_for_each_rcu() which adds memory barrier, but raw sockets does not use the nulls marker nor SLAB_TYPESAFE_BY_RCU in the first place. OTOH, the ping sockets already uses sk_nulls_for_each_rcu(), and such conversion can be posted later for net-next. ==================== Link: https://lore.kernel.org/r/20230403194959.48928-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit ab5fb73ffa01072b4d8031cc05801fa1cb653bee Author: Kuniyuki Iwashima Date: Mon Apr 3 12:49:59 2023 -0700 ping: Fix potentail NULL deref for /proc/net/icmp. After commit dbca1596bbb0 ("ping: convert to RCU lookups, get rid of rwlock"), we use RCU for ping sockets, but we should use spinlock for /proc/net/icmp to avoid a potential NULL deref mentioned in the previous patch. Let's go back to using spinlock there. Note we can convert ping sockets to use hlist instead of hlist_nulls because we do not use SLAB_TYPESAFE_BY_RCU for ping sockets. Fixes: dbca1596bbb0 ("ping: convert to RCU lookups, get rid of rwlock") Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit 0a78cf7264d29abeca098eae0b188a10aabc8a32 Author: Kuniyuki Iwashima Date: Mon Apr 3 12:49:58 2023 -0700 raw: Fix NULL deref in raw_get_next(). Dae R. Jeong reported a NULL deref in raw_get_next() [0]. It seems that the repro was running these sequences in parallel so that one thread was iterating on a socket that was being freed in another netns. unshare(0x40060200) r0 = syz_open_procfs(0x0, &(0x7f0000002080)='net/raw\x00') socket$inet_icmp_raw(0x2, 0x3, 0x1) pread64(r0, &(0x7f0000000000)=""/10, 0xa, 0x10000000007f) After commit 0daf07e52709 ("raw: convert raw sockets to RCU"), we use RCU and hlist_nulls_for_each_entry() to iterate over SOCK_RAW sockets. However, we should use spinlock for slow paths to avoid the NULL deref. Also, SOCK_RAW does not use SLAB_TYPESAFE_BY_RCU, and the slab object is not reused during iteration in the grace period. In fact, the lockless readers do not check the nulls marker with get_nulls_value(). So, SOCK_RAW should use hlist instead of hlist_nulls. Instead of adding an unnecessary barrier by sk_nulls_for_each_rcu(), let's convert hlist_nulls to hlist and use sk_for_each_rcu() for fast paths and sk_for_each() and spinlock for /proc/net/raw. [0]: general protection fault, probably for non-canonical address 0xdffffc0000000005: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f] CPU: 2 PID: 20952 Comm: syz-executor.0 Not tainted 6.2.0-g048ec869bafd-dirty #7 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 RIP: 0010:read_pnet include/net/net_namespace.h:383 [inline] RIP: 0010:sock_net include/net/sock.h:649 [inline] RIP: 0010:raw_get_next net/ipv4/raw.c:974 [inline] RIP: 0010:raw_get_idx net/ipv4/raw.c:986 [inline] RIP: 0010:raw_seq_start+0x431/0x800 net/ipv4/raw.c:995 Code: ef e8 33 3d 94 f7 49 8b 6d 00 4c 89 ef e8 b7 65 5f f7 49 89 ed 49 83 c5 98 0f 84 9a 00 00 00 48 83 c5 c8 48 89 e8 48 c1 e8 03 <42> 80 3c 30 00 74 08 48 89 ef e8 00 3d 94 f7 4c 8b 7d 00 48 89 ef RSP: 0018:ffffc9001154f9b0 EFLAGS: 00010206 RAX: 0000000000000005 RBX: 1ffff1100302c8fd RCX: 0000000000000000 RDX: 0000000000000028 RSI: ffffc9001154f988 RDI: ffffc9000f77a338 RBP: 0000000000000029 R08: ffffffff8a50ffb4 R09: fffffbfff24b6bd9 R10: fffffbfff24b6bd9 R11: 0000000000000000 R12: ffff88801db73b78 R13: fffffffffffffff9 R14: dffffc0000000000 R15: 0000000000000030 FS: 00007f843ae8e700(0000) GS:ffff888063700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055bb9614b35f CR3: 000000003c672000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: seq_read_iter+0x4c6/0x10f0 fs/seq_file.c:225 seq_read+0x224/0x320 fs/seq_file.c:162 pde_read fs/proc/inode.c:316 [inline] proc_reg_read+0x23f/0x330 fs/proc/inode.c:328 vfs_read+0x31e/0xd30 fs/read_write.c:468 ksys_pread64 fs/read_write.c:665 [inline] __do_sys_pread64 fs/read_write.c:675 [inline] __se_sys_pread64 fs/read_write.c:672 [inline] __x64_sys_pread64+0x1e9/0x280 fs/read_write.c:672 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+0x63/0xcd RIP: 0033:0x478d29 Code: f7 d8 64 89 02 b8 ff ff ff ff c3 66 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 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f843ae8dbe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000011 RAX: ffffffffffffffda RBX: 0000000000791408 RCX: 0000000000478d29 RDX: 000000000000000a RSI: 0000000020000000 RDI: 0000000000000003 RBP: 00000000f477909a R08: 0000000000000000 R09: 0000000000000000 R10: 000010000000007f R11: 0000000000000246 R12: 0000000000791740 R13: 0000000000791414 R14: 0000000000791408 R15: 00007ffc2eb48a50 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:read_pnet include/net/net_namespace.h:383 [inline] RIP: 0010:sock_net include/net/sock.h:649 [inline] RIP: 0010:raw_get_next net/ipv4/raw.c:974 [inline] RIP: 0010:raw_get_idx net/ipv4/raw.c:986 [inline] RIP: 0010:raw_seq_start+0x431/0x800 net/ipv4/raw.c:995 Code: ef e8 33 3d 94 f7 49 8b 6d 00 4c 89 ef e8 b7 65 5f f7 49 89 ed 49 83 c5 98 0f 84 9a 00 00 00 48 83 c5 c8 48 89 e8 48 c1 e8 03 <42> 80 3c 30 00 74 08 48 89 ef e8 00 3d 94 f7 4c 8b 7d 00 48 89 ef RSP: 0018:ffffc9001154f9b0 EFLAGS: 00010206 RAX: 0000000000000005 RBX: 1ffff1100302c8fd RCX: 0000000000000000 RDX: 0000000000000028 RSI: ffffc9001154f988 RDI: ffffc9000f77a338 RBP: 0000000000000029 R08: ffffffff8a50ffb4 R09: fffffbfff24b6bd9 R10: fffffbfff24b6bd9 R11: 0000000000000000 R12: ffff88801db73b78 R13: fffffffffffffff9 R14: dffffc0000000000 R15: 0000000000000030 FS: 00007f843ae8e700(0000) GS:ffff888063700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f92ff166000 CR3: 000000003c672000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Fixes: 0daf07e52709 ("raw: convert raw sockets to RCU") Reported-by: syzbot Reported-by: Dae R. Jeong Link: https://lore.kernel.org/netdev/ZCA2mGV_cmq7lIfV@dragonet/ Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit ca712e47054678c5ce93a0e0f686353ad5561195 Merge: 24b18197184ac abf04be0e7071 Author: Dan Williams Date: Tue Apr 4 15:37:25 2023 -0700 Merge branch 'for-6.3/cxl-doe-fixes' into for-6.3/cxl Pick up the fixes (first 6 patches) from the DOE rework series from Lukas for v6.3-rc. Link: https://lore.kernel.org/all/cover.1678543498.git.lukas@wunner.de/ commit 24b18197184ac39bb8566fb82c0bf788bcd0d45b Author: Dan Williams Date: Mon Apr 3 16:01:32 2023 -0700 cxl/hdm: Extend DVSEC range register emulation for region enumeration One motivation for mapping range registers to decoder objects is to use those settings for region autodiscovery. The need to map a region for devices programmed to use range registers is especially urgent now that the kernel no longer routes "Soft Reserved" ranges in the memory map to device-dax by default. The CXL memory range loses all access mechanisms. Complete the implementation by marking the DPA reservation and setting the endpoint-decoder state to signal autodiscovery. Note that the default settings of ways=1 and granularity=4096 set in cxl_decode_init() do not need to be updated. Fixes: 09d09e04d2fc ("cxl/dax: Create dax devices for CXL RAM regions") Tested-by: Dave Jiang Tested-by: Gregory Price Link: https://lore.kernel.org/r/168012575521.221280.14177293493678527326.stgit@dwillia2-xfh.jf.intel.com Reviewed-by: Dave Jiang Signed-off-by: Dan Williams commit 52cc48ad2a76a5fe82d239044d67944bbb928de6 Author: Dan Williams Date: Mon Apr 3 15:13:37 2023 -0700 cxl/hdm: Limit emulation to the number of range registers Recall that range register emulation seeks to treat the 2 potential range registers as Linux CXL "decoder" objects. The number of range registers can be 1 or 2, while HDM decoder ranges can include more than 2. Be careful not to confuse DVSEC range count with HDM capability decoder count. Commit to range register earlier in devm_cxl_setup_hdm(). Otherwise, a device with more HDM decoders than range registers can set @cxlhdm->decoder_count to an invalid value. Avoid introducing a forward declaration by just moving the definition of should_emulate_decoders() earlier in the file. should_emulate_decoders() is unchanged. Tested-by: Dave Jiang Fixes: d7a2153762c7 ("cxl/hdm: Add emulation when HDM decoders are not committed") Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/168012574932.221280.15944705098679646436.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 9ff3eec958cf365857ae8a630237ece4f83bb337 Author: Dan Williams Date: Mon Apr 3 15:01:20 2023 -0700 cxl/region: Move coherence tracking into cxl_region_attach() Each time the contents of a given HPA are potentially changed in a cache incoherent manner the CXL core sets CXL_REGION_F_INCOHERENT to invalidate CPU caches before the region is used. Successful invocation of attach_target() indicates that DPA has been newly assigned to a given HPA in the dynamic region creation flow. However, attach_target() is also reused in the autodiscovery flow where the region was activated by platform firmware. In that case there is no need to invalidate caches because that region is already in active use and nothing about the autodiscovery flow modifies the HPA-to-DPA relationship. In the autodiscovery case cxl_region_attach() exits early after determining the endpoint decoder is already correctly attached to the region. Fixes: a32320b71f08 ("cxl/region: Add region autodiscovery") Reviewed-by: Fan Ni Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/168002858817.50647.1217607907088920888.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 030f880342b875c7d714d06d3ca4058ae9f13fee Author: Dan Williams Date: Mon Apr 3 14:44:41 2023 -0700 cxl/region: Fix region setup/teardown for RCDs RCDs (CXL memory devices that link train without VH capability and show up as root complex integrated endpoints), hide the presence of the link between the endpoint and the host-bridge. The CXL region setup/teardown paths assume that a link hop is present and go looking for at least one 'struct cxl_port' instance between the CXL root port-object and an endpoint port-object leading to crashes of the form: BUG: kernel NULL pointer dereference, address: 0000000000000008 [..] RIP: 0010:cxl_region_setup_targets+0x3e9/0xae0 [cxl_core] [..] Call Trace: cxl_region_attach+0x46c/0x7a0 [cxl_core] cxl_create_region+0x20b/0x270 [cxl_core] cxl_mock_mem_probe+0x641/0x800 [cxl_mock_mem] platform_probe+0x5b/0xb0 Detect RCDs explicitly and skip walking the non-existent port hierarchy between root and endpoint in that case. While this has been a problem since: commit 0a19bfc8de93 ("cxl/port: Add RCD endpoint port enumeration") ...it becomes a more reliable crash scenario with the new autodiscovery implementation. Fixes: a32320b71f08 ("cxl/region: Add region autodiscovery") Reviewed-by: Ira Weiny Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/168002858268.50647.728091521032131326.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit d35b495ddf92c964eedf2ac86fdbf88dc3e5cbc9 Author: Dan Williams Date: Mon Apr 3 14:39:16 2023 -0700 cxl/port: Fix find_cxl_root() for RCDs and simplify it The find_cxl_root() helper is used to lookup root decoders and other CXL platform topology information for a given endpoint. It turns out that for RCDs it has never worked. The result of find_cxl_root(&cxlmd->dev) is always NULL for the RCH topology case because it expects to find a cxl_port at the host-bridge. RCH topologies only have the root cxl_port object with the host-bridge as a dport. While there are no reports of this being a problem to date, by inspection region enumeration should crash as a result of this problem, and it does in a local unit test for this scenario. However, an observation that ever since: commit f17b558d6663 ("cxl/pmem: Refactor nvdimm device registration, delete the workqueue") ...all callers of find_cxl_root() occur after the memdev connection to the port topology has been established. That means that find_cxl_root() can be simplified to a walk of the endpoint port topology to the root. Switch to that arrangement which also fixes the RCD bug. Fixes: a32320b71f08 ("cxl/region: Add region autodiscovery") Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/168002857715.50647.344876437247313909.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit b70c2cf95ee1ca2806cb7191504920f8f5b4454e Author: Dan Williams Date: Mon Apr 3 14:33:48 2023 -0700 cxl/hdm: Skip emulation when driver manages mem_enable If the driver is allowed to enable memory operation itself then it can also turn on HDM decoder support at will. With this the second call to cxl_setup_hdm_decoder_from_dvsec(), when an HDM decoder is not committed, is not needed. Fixes: b777e9bec960 ("cxl/hdm: Emulate HDM decoder from DVSEC range registers") Link: http://lore.kernel.org/r/20230220113657.000042e1@huawei.com Reported-by: Jonathan Cameron Tested-by: Jonathan Cameron Reviewed-by: Jonathan Cameron Reviewed-by: Fan Ni Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/167703068474.185722.664126485486344246.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 82f0832af26a30ae5f21b335c5f68b538e710c29 Author: Dan Williams Date: Tue Apr 4 15:34:12 2023 -0700 cxl/hdm: Fix double allocation of @cxlhdm devm_cxl_setup_emulated_hdm() reallocates an instance of @cxlhdm that was already allocated at the start of devm_cxl_setup_hdm(). Only one is needed and devm_cxl_setup_emulated_hdm() does not do enough to warrant being an explicit helper. Fixes: 4474ce565ee4 ("cxl/hdm: Create emulated cxl_hdm for devices that do not have HDM decoders") Tested-by: Dave Jiang Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/167703067936.185722.7908921750127154779.stgit@dwillia2-xfh.jf.intel.com Link: https://lore.kernel.org/r/168012574357.221280.5001364964799725366.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 38a8c4d1d45006841f0643f4cb29b5e50758837c Author: Keith Busch Date: Fri Mar 31 11:00:56 2023 -0700 blk-mq: directly poll requests Polling needs a bio with a valid bi_bdev, but neither of those are guaranteed for polled driver requests. Make request based polling directly use blk-mq's polling function instead. When executing a request from a polled hctx, we know the request's cookie, and that it's from a live blk-mq queue that supports polling, so we can safely skip everything that bio_poll provides. Cc: stable@kernel.org Reported-by: Martin Belanger Reported-by: Daniel Wagner Signed-off-by: Keith Busch Tested-by: Daniel Wagner Revieded-by: Daniel Wagner Reviewed-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Tested-by: Shin'ichiro Kawasaki Link: https://lore.kernel.org/r/20230331180056.1155862-1-kbusch@meta.com Signed-off-by: Jens Axboe commit 76f598ba7d8e2bfb4855b5298caedd5af0c374a8 Merge: ceeea1b782938 fb5015bc8b733 Author: Linus Torvalds Date: Tue Apr 4 11:29:37 2023 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "PPC: - Hide KVM_CAP_IRQFD_RESAMPLE if XIVE is enabled s390: - Fix handling of external interrupts in protected guests x86: - Resample the pending state of IOAPIC interrupts when unmasking them - Fix usage of Hyper-V "enlightened TLB" on AMD - Small fixes to real mode exceptions - Suppress pending MMIO write exits if emulator detects exception Documentation: - Fix rST syntax" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: docs: kvm: x86: Fix broken field list KVM: PPC: Make KVM_CAP_IRQFD_RESAMPLE platform dependent KVM: s390: pv: fix external interruption loop not always detected KVM: nVMX: Do not report error code when synthesizing VM-Exit from Real Mode KVM: x86: Clear "has_error_code", not "error_code", for RM exception injection KVM: x86: Suppress pending MMIO write exits if emulator detects exception KVM: x86/ioapic: Resample the pending state of an IRQ when unmasking KVM: irqfd: Make resampler_list an RCU list KVM: SVM: Flush Hyper-V TLB when required commit 9da667e50c7e62266f3c2f8ad57b32fca40716b1 Author: Stefano Garzarella Date: Wed Mar 29 18:03:21 2023 +0200 vdpa_sim_net: complete the initialization before register the device Initialization must be completed before calling _vdpa_register_device() since it can connect the device to the vDPA bus, so requests can arrive after that call. So for example vdpasim_net_work(), which uses the net->*_stats variables, can be scheduled before they are initialized. Let's move _vdpa_register_device() to the end of vdpasim_net_dev_add() and add a comment to avoid future issues. Fixes: 0899774cb360 ("vdpa_sim_net: vendor satistics") Signed-off-by: Stefano Garzarella Message-Id: <20230329160321.187176-1-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit ceeea1b78293834378b8d32a18288610de5600f3 Merge: 148341f0a2f53 7de82c2f36fb2 Author: Linus Torvalds Date: Tue Apr 4 11:20:55 2023 -0700 Merge tag 'nfsd-6.3-5' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fixes from Chuck Lever: - Fix a crash and a resource leak in NFSv4 COMPOUND processing - Fix issues with AUTH_SYS credential handling - Try again to address an NFS/NFSD/SUNRPC build dependency regression * tag 'nfsd-6.3-5' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: NFSD: callback request does not use correct credential for AUTH_SYS NFS: Remove "select RPCSEC_GSS_KRB5 sunrpc: only free unix grouplist after RCU settles nfsd: call op_release, even when op_func returns an error NFSD: Avoid calling OPDESC() with ops->opnum == OP_ILLEGAL commit fb5015bc8b733323b58f015b88e4f316010ec856 Author: Takahiro Itazuri Date: Fri Mar 31 10:31:16 2023 +0100 docs: kvm: x86: Fix broken field list Add a missing ":" to fix a broken field list. Signed-off-by: Takahiro Itazuri Fixes: ba7bb663f554 ("KVM: x86: Provide per VM capability for disabling PMU virtualization") Message-Id: <20230331093116.99820-1-itazur@amazon.com> Signed-off-by: Paolo Bonzini commit 656e9007ef5862746cdf7ac16267c8e06e7b0989 Author: Arnd Bergmann Date: Thu Mar 2 09:53:31 2023 +0100 asm-generic: avoid __generic_cmpxchg_local warnings Code that passes a 32-bit constant into cmpxchg() produces a harmless sparse warning because of the truncation in the branch that is not taken: fs/erofs/zdata.c: note: in included file (through /home/arnd/arm-soc/arch/arm/include/asm/cmpxchg.h, /home/arnd/arm-soc/arch/arm/include/asm/atomic.h, /home/arnd/arm-soc/include/linux/atomic.h, ...): include/asm-generic/cmpxchg-local.h:29:33: warning: cast truncates bits from constant value (5f0ecafe becomes fe) include/asm-generic/cmpxchg-local.h:33:34: warning: cast truncates bits from constant value (5f0ecafe becomes cafe) include/asm-generic/cmpxchg-local.h:29:33: warning: cast truncates bits from constant value (5f0ecafe becomes fe) include/asm-generic/cmpxchg-local.h:30:42: warning: cast truncates bits from constant value (5f0edead becomes ad) include/asm-generic/cmpxchg-local.h:33:34: warning: cast truncates bits from constant value (5f0ecafe becomes cafe) include/asm-generic/cmpxchg-local.h:34:44: warning: cast truncates bits from constant value (5f0edead becomes dead) This was reported as a regression to Matt's recent __generic_cmpxchg_local patch, though this patch only added more warnings on top of the ones that were already there. Rewording the truncation to use an explicit bitmask instead of a cast to a smaller type avoids the warning but otherwise leaves the code unchanged. I had another look at why the cast is even needed for atomic_cmpxchg(), and as Matt describes the problem here is that atomic_t contains a signed 'int', but cmpxchg() takes an 'unsigned long' argument, and converting between the two leads to a 64-bit sign-extension of negative 32-bit atomics. I checked the other implementations of arch_cmpxchg() and did not find any others that run into the same problem as __generic_cmpxchg_local(), but it's easy to be on the safe side here and always convert the signed int into an unsigned int when calling arch_cmpxchg(), as this will work even when any of the arch_cmpxchg() implementations run into the same problem. Fixes: 624654152284 ("locking/atomic: cmpxchg: Make __generic_cmpxchg_local compare against zero-extended 'old' value") Reviewed-by: Matt Evans Signed-off-by: Arnd Bergmann commit 05d3855b4d21ef3c2df26be1cbba9d2c68915fcb Author: Vladimir Oltean Date: Mon Jan 9 15:11:53 2023 +0200 asm-generic/io.h: suppress endianness warnings for relaxed accessors Copy the forced type casts from the normal MMIO accessors to suppress the sparse warnings that point out __raw_readl() returns a native endian word (just like readl()). Signed-off-by: Vladimir Oltean Signed-off-by: Arnd Bergmann commit d564fa1ff19e893e2971d66e5c8f49dc1cdc8ffc Author: Vladimir Oltean Date: Mon Jan 9 15:11:52 2023 +0200 asm-generic/io.h: suppress endianness warnings for readq() and writeq() Commit c1d55d50139b ("asm-generic/io.h: Fix sparse warnings on big-endian architectures") missed fixing the 64-bit accessors. Arnd explains in the attached link why the casts are necessary, even if __raw_readq() and __raw_writeq() do not take endian-specific types. Link: https://lore.kernel.org/lkml/9105d6fc-880b-4734-857d-e3d30b87ccf6@app.fastmail.com/ Suggested-by: Arnd Bergmann Signed-off-by: Vladimir Oltean Reviewed-by: Jonathan Cameron Signed-off-by: Arnd Bergmann commit e81625218bf7986ba1351a98c43d346b15601d26 Author: Fuad Tabba Date: Tue Apr 4 16:23:21 2023 +0100 KVM: arm64: Advertise ID_AA64PFR0_EL1.CSV2/3 to protected VMs The existing pKVM code attempts to advertise CSV2/3 using values initialized to 0, but never set. To advertise CSV2/3 to protected guests, pass the CSV2/3 values to hyp when initializing hyp's view of guests' ID_AA64PFR0_EL1. Similar to non-protected KVM, these are system-wide, rather than per cpu, for simplicity. Fixes: 6c30bfb18d0b ("KVM: arm64: Add handlers for protected VM System Registers") Signed-off-by: Fuad Tabba Link: https://lore.kernel.org/r/20230404152321.413064-1-tabba@google.com Signed-off-by: Oliver Upton commit 83c911dc5e0e8e6eaa6431c06972a8f159bfe2fc Author: Lingyu Liu Date: Tue Mar 28 10:49:11 2023 +0000 ice: Reset FDIR counter in FDIR init stage Reset the FDIR counters when FDIR inits. Without this patch, when VF initializes or resets, all the FDIR counters are not cleaned, which may cause unexpected behaviors for future FDIR rule create (e.g., rule conflict). Fixes: 1f7ea1cd6a37 ("ice: Enable FDIR Configure for AVF") Signed-off-by: Junfeng Guo Signed-off-by: Lingyu Liu Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit b4a01ace20f5c93c724abffc0a83ec84f514b98d Author: Simei Su Date: Wed Mar 22 10:24:15 2023 +0800 ice: fix wrong fallback logic for FDIR When adding a FDIR filter, if ice_vc_fdir_set_irq_ctx returns failure, the inserted fdir entry will not be removed and if ice_vc_fdir_write_fltr returns failure, the fdir context info for irq handler will not be cleared which may lead to inconsistent or memory leak issue. This patch refines failure cases to resolve this issue. Fixes: 1f7ea1cd6a37 ("ice: Enable FDIR Configure for AVF") Signed-off-by: Simei Su Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit f0417e72add5aed5997092b6eb76298290d866c9 Author: Eli Cohen Date: Mon Apr 3 14:40:39 2023 +0300 vdpa/mlx5: Add and remove debugfs in setup/teardown driver The right place to add the debugfs create is in setup_driver() and remove it in teardown_driver(). Current code adds the debugfs when creating the device but resetting a device will remove the debugfs subtree and subsequent set_driver will not be able to create the files since the debugfs pointer is NULL. Fixes: 294221004322 ("vdpa/mlx5: Add debugfs subtree") Signed-off-by: Eli Cohen v3 -> v4: Fix error flow in setup_driver() Message-Id: <20230403114039.11102-1-elic@nvidia.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 9513c55ce3e8f0f118c47423452c4a4bdaa80222 Author: Ross Zwisler Date: Wed Feb 15 15:33:50 2023 -0700 tools/virtio: fix typo in README instructions We need to have a unique chardev for each data path, else the chardevs will collide and qemu will die with this message: qemu-system-x86_64: -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel0, id=channel1,name=trace-path-cpu0: Property 'virtserialport.chardev' can't take value 'charchannel0': Device 'charchannel0' is in use Signed-off-by: Ross Zwisler Message-Id: <20230215223350.2658616-7-zwisler@google.com> Signed-off-by: Michael S. Tsirkin commit 4c363c81f66c77e0a2394b9a4efa707d122dc544 Author: Mike Christie Date: Mon Mar 20 21:06:19 2023 -0500 vhost-scsi: Fix crash during LUN unmapping We normally clear the endpoint then unmap LUNs so the devices are fully shutdown when the LUN is unmapped, but it's legal to unmap before clearing. If the user does that while TMFs are running then we can end up crashing. vhost_scsi_port_unlink assumes that the LUN's tmf struct will always be on the tmf_queue list. However, if a TMF is running then it will have been removed while it's executing. If we do a LUN unmap at this time, then we assume the entry is on the list and just start accessing it and free it. This fixes the bug by just allocating the vhost_scsi_tmf struct when it's needed like is done with the se_tmr struct that's needed when we submit the TMF. In this path perf is not an issue and we can use GFP_KERNEL since it won't swing directly back on us, so we don't need to preallocate the struct. Signed-off-by: Mike Christie Message-Id: <20230321020624.13323-3-michael.christie@oracle.com> Signed-off-by: Michael S. Tsirkin commit e508efc3ae7e44eb3caf595a086bfd3824da5b9a Author: Mike Christie Date: Mon Mar 20 21:06:18 2023 -0500 vhost-scsi: Fix vhost_scsi struct use after free If vhost_scsi_setup_vq_cmds fails we leave the tpg->vhost_scsi pointer set. If the device is freed and then the user unmaps the LUN, the call to vhost_scsi_port_unlink -> vhost_scsi_hotunplug will see the that tpg->vhost_scsi is still set and try to use it. This has us clear the vhost_scsi pointer in the failure path. It also has us take tv_tpg_mutex in this failure path, because tv_tpg_vhost_count is accessed under this mutex in vhost_scsi_drop_nexus and in the future we will want to serialize access to tpg->vhost_scsi with that mutex instead of the vhost_scsi_mutex. Signed-off-by: Mike Christie Message-Id: <20230321020624.13323-2-michael.christie@oracle.com> Signed-off-by: Michael S. Tsirkin commit 10805eb5d6d15fd4f61b05cc7aa269e12ab99848 Author: Dmitry Fomichev Date: Thu Mar 30 17:49:53 2023 -0400 virtio-blk: fix ZBD probe in kernels without ZBD support When the kernel is built without support for zoned block devices, virtio-blk probe needs to error out any host-managed device scans to prevent such devices from appearing in the system as non-zoned. The current virtio-blk code simply bypasses all ZBD checks if CONFIG_BLK_DEV_ZONED is not defined and this leads to host-managed block devices being presented as non-zoned in the OS. This is one of the main problems this patch series is aimed to fix. In this patch, make VIRTIO_BLK_F_ZONED feature defined even when CONFIG_BLK_DEV_ZONED is not. This change makes the code compliant with the voted revision of virtio-blk ZBD spec. Modify the probe code to look at the situation when VIRTIO_BLK_F_ZONED is negotiated in a kernel that is built without ZBD support. In this case, the code checks the zoned model of the device and fails the probe is the device is host-managed. The patch also adds the comment to clarify that the call to perform the zoned device probe is correctly placed after virtio_device ready(). Fixes: 95bfec41bd3d ("virtio-blk: add support for zoned block devices") Cc: stable@vger.kernel.org Signed-off-by: Dmitry Fomichev Reviewed-by: Stefan Hajnoczi Reviewed-by: Damien Le Moal Message-Id: <20230330214953.1088216-3-dmitry.fomichev@wdc.com> Signed-off-by: Michael S. Tsirkin commit f1ba4e674febf5c0e9f725a75ca43b7722b4e963 Author: Dmitry Fomichev Date: Thu Mar 30 17:49:52 2023 -0400 virtio-blk: fix to match virtio spec The merged patch series to support zoned block devices in virtio-blk is not the most up to date version. The merged patch can be found at https://lore.kernel.org/linux-block/20221016034127.330942-3-dmitry.fomichev@wdc.com/ but the latest and reviewed version is https://lore.kernel.org/linux-block/20221110053952.3378990-3-dmitry.fomichev@wdc.com/ The reason is apparently that the correct mailing lists and maintainers were not copied. The differences between the two are mostly cleanups, but there is one change that is very important in terms of compatibility with the approved virtio-zbd specification. Before it was approved, the OASIS virtio spec had a change in VIRTIO_BLK_T_ZONE_APPEND request layout that is not reflected in the current virtio-blk driver code. In the running code, the status is the first byte of the in-header that is followed by some pad bytes and the u64 that carries the sector at which the data has been written to the zone back to the driver, aka the append sector. This layout turned out to be problematic for implementing in QEMU and the request status byte has been eventually made the last byte of the in-header. The current code doesn't expect that and this causes the append sector value always come as zero to the block layer. This needs to be fixed ASAP. Fixes: 95bfec41bd3d ("virtio-blk: add support for zoned block devices") Cc: stable@vger.kernel.org Signed-off-by: Dmitry Fomichev Reviewed-by: Stefan Hajnoczi Reviewed-by: Damien Le Moal Message-Id: <20230330214953.1088216-2-dmitry.fomichev@wdc.com> Signed-off-by: Michael S. Tsirkin commit 7de82c2f36fb26aa78440bbf0efcf360b691d98b Author: Dai Ngo Date: Sat Apr 1 13:22:08 2023 -0700 NFSD: callback request does not use correct credential for AUTH_SYS Currently callback request does not use the credential specified in CREATE_SESSION if the security flavor for the back channel is AUTH_SYS. Problem was discovered by pynfs 4.1 DELEG5 and DELEG7 test with error: DELEG5 st_delegation.testCBSecParms : FAILURE expected callback with uid, gid == 17, 19, got 0, 0 Signed-off-by: Dai Ngo Reviewed-by: Jeff Layton Fixes: 8276c902bbe9 ("SUNRPC: remove uid and gid from struct auth_cred") Signed-off-by: Chuck Lever commit 8be8f170e8383fd1421e8b87950e90d7dd45be07 Author: Chuck Lever Date: Tue Mar 28 13:47:58 2023 -0400 NFS: Remove "select RPCSEC_GSS_KRB5 If CONFIG_CRYPTO=n (e.g. arm/shmobile_defconfig): WARNING: unmet direct dependencies detected for RPCSEC_GSS_KRB5 Depends on [n]: NETWORK_FILESYSTEMS [=y] && SUNRPC [=y] && CRYPTO [=n] Selected by [y]: - NFS_V4 [=y] && NETWORK_FILESYSTEMS [=y] && NFS_FS [=y] As NFSv4 can work without crypto enabled, remove the RPCSEC_GSS_KRB5 dependency altogether. Trond says: > It is possible to use the NFSv4.1 client with just AUTH_SYS, and > in fact there are plenty of people out there using only that. The > fact that RFC5661 gets its knickers in a twist about RPCSEC_GSS > support is largely irrelevant to those people. > > The other issue is that ’select’ enforces the strict dependency > that if the NFS client is compiled into the kernel, then the > RPCSEC_GSS and kerberos code needs to be compiled in as well: they > cannot exist as modules. Fixes: e57d06527738 ("NFS & NFSD: Update GSS dependencies") Reported-by: kernel test robot Reported-by: Niklas Söderlund Suggested-by: Trond Myklebust Signed-off-by: Chuck Lever commit 5085e41f9e83a1bec51da1f20b54f2ec3a13a3fe Author: Jeff Layton Date: Thu Mar 30 14:24:27 2023 -0400 sunrpc: only free unix grouplist after RCU settles While the unix_gid object is rcu-freed, the group_info list that it contains is not. Ensure that we only put the group list reference once we are really freeing the unix_gid object. Reported-by: Zhi Li Link: https://bugzilla.redhat.com/show_bug.cgi?id=2183056 Signed-off-by: Jeff Layton Fixes: fd5d2f78261b ("SUNRPC: Make server side AUTH_UNIX use lockless lookups") Signed-off-by: Chuck Lever commit 218c597325f4faf7b7a6049233a30d7842b5b2dc Author: Corinna Vinschen Date: Mon Apr 3 14:11:20 2023 +0200 net: stmmac: fix up RX flow hash indirection table when setting channels stmmac_reinit_queues() fails to fix up the RX hash. Even if the number of channels gets restricted, the output of `ethtool -x' indicates that all RX queues are used: $ ethtool -l enp0s29f2 Channel parameters for enp0s29f2: Pre-set maximums: RX: 8 TX: 8 Other: n/a Combined: n/a Current hardware settings: RX: 8 TX: 8 Other: n/a Combined: n/a $ ethtool -x enp0s29f2 RX flow hash indirection table for enp0s29f2 with 8 RX ring(s): 0: 0 1 2 3 4 5 6 7 8: 0 1 2 3 4 5 6 7 [...] $ ethtool -L enp0s29f2 rx 3 $ ethtool -x enp0s29f2 RX flow hash indirection table for enp0s29f2 with 3 RX ring(s): 0: 0 1 2 3 4 5 6 7 8: 0 1 2 3 4 5 6 7 [...] Fix this by setting the indirection table according to the number of specified queues. The result is now as expected: $ ethtool -L enp0s29f2 rx 3 $ ethtool -x enp0s29f2 RX flow hash indirection table for enp0s29f2 with 3 RX ring(s): 0: 0 1 2 0 1 2 0 1 8: 2 0 1 2 0 1 2 0 [...] Tested on Intel Elkhart Lake. Fixes: 0366f7e06a6b ("net: stmmac: add ethtool support for get/set channels") Signed-off-by: Corinna Vinschen Link: https://lore.kernel.org/r/20230403121120.489138-1-vinschen@redhat.com Signed-off-by: Paolo Abeni commit 13a0d1ae7ee6b438f5537711a8c60cba00554943 Author: Jason Gunthorpe Date: Fri Mar 31 12:32:26 2023 -0300 iommufd: Do not corrupt the pfn list when doing batch carry If batch->end is 0 then setting npfns[0] before computing the new value of pfns will fail to adjust the pfn and result in various page accounting corruptions. It should be ordered after. This seems to result in various kinds of page meta-data corruption related failures: WARNING: CPU: 1 PID: 527 at mm/gup.c:75 try_grab_folio+0x503/0x740 Modules linked in: CPU: 1 PID: 527 Comm: repro Not tainted 6.3.0-rc2-eeac8ede1755+ #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 RIP: 0010:try_grab_folio+0x503/0x740 Code: e3 01 48 89 de e8 6d c1 dd ff 48 85 db 0f 84 7c fe ff ff e8 4f bf dd ff 49 8d 47 ff 48 89 45 d0 e9 73 fe ff ff e8 3d bf dd ff <0f> 0b 31 db e9 d0 fc ff ff e8 2f bf dd ff 48 8b 5d c8 31 ff 48 89 RSP: 0018:ffffc90000f37908 EFLAGS: 00010046 RAX: 0000000000000000 RBX: 00000000fffffc02 RCX: ffffffff81504c26 RDX: 0000000000000000 RSI: ffff88800d030000 RDI: 0000000000000002 RBP: ffffc90000f37948 R08: 000000000003ca24 R09: 0000000000000008 R10: 000000000003ca00 R11: 0000000000000023 R12: ffffea000035d540 R13: 0000000000000001 R14: 0000000000000000 R15: ffffea000035d540 FS: 00007fecbf659740(0000) GS:ffff88807dd00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000200011c3 CR3: 000000000ef66006 CR4: 0000000000770ee0 PKRU: 55555554 Call Trace: internal_get_user_pages_fast+0xd32/0x2200 pin_user_pages_fast+0x65/0x90 pfn_reader_user_pin+0x376/0x390 pfn_reader_next+0x14a/0x7b0 pfn_reader_first+0x140/0x1b0 iopt_area_fill_domain+0x74/0x210 iopt_table_add_domain+0x30e/0x6e0 iommufd_device_selftest_attach+0x7f/0x140 iommufd_test+0x10ff/0x16f0 iommufd_fops_ioctl+0x206/0x330 __x64_sys_ioctl+0x10e/0x160 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc Cc: Fixes: f394576eb11d ("iommufd: PFN handling for iopt_pages") Link: https://lore.kernel.org/r/3-v1-ceab6a4d7d7a+94-iommufd_syz_jgg@nvidia.com Reviewed-by: Kevin Tian Reported-by: Pengfei Xu Tested-by: Pengfei Xu Signed-off-by: Jason Gunthorpe commit 727c28c1cef2bc013d2c8bb6c50e410a3882a04e Author: Jason Gunthorpe Date: Fri Mar 31 12:32:25 2023 -0300 iommufd: Fix unpinning of pages when an access is present syzkaller found that the calculation of batch_last_index should use 'start_index' since at input to this function the batch is either empty or it has already been adjusted to cross any accesses so it will start at the point we are unmapping from. Getting this wrong causes the unmap to run over the end of the pages which corrupts pages that were never mapped. In most cases this triggers the num pinned debugging: WARNING: CPU: 0 PID: 557 at drivers/iommu/iommufd/pages.c:294 __iopt_area_unfill_domain+0x152/0x560 Modules linked in: CPU: 0 PID: 557 Comm: repro Not tainted 6.3.0-rc2-eeac8ede1755 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 RIP: 0010:__iopt_area_unfill_domain+0x152/0x560 Code: d2 0f ff 44 8b 64 24 54 48 8b 44 24 48 31 ff 44 89 e6 48 89 44 24 38 e8 fc d3 0f ff 45 85 e4 0f 85 eb 01 00 00 e8 0e d2 0f ff <0f> 0b e8 07 d2 0f ff 48 8b 44 24 38 89 5c 24 58 89 18 8b 44 24 54 RSP: 0018:ffffc9000108baf0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 00000000ffffffff RCX: ffffffff821e3f85 RDX: 0000000000000000 RSI: ffff88800faf0000 RDI: 0000000000000002 RBP: ffffc9000108bd18 R08: 000000000003ca25 R09: 0000000000000014 R10: 000000000003ca00 R11: 0000000000000024 R12: 0000000000000004 R13: 0000000000000801 R14: 00000000000007ff R15: 0000000000000800 FS: 00007f3499ce1740(0000) GS:ffff88807dc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020000243 CR3: 00000000179c2001 CR4: 0000000000770ef0 PKRU: 55555554 Call Trace: iopt_area_unfill_domain+0x32/0x40 iopt_table_remove_domain+0x23f/0x4c0 iommufd_device_selftest_detach+0x3a/0x90 iommufd_selftest_destroy+0x55/0x70 iommufd_object_destroy_user+0xce/0x130 iommufd_destroy+0xa2/0xc0 iommufd_fops_ioctl+0x206/0x330 __x64_sys_ioctl+0x10e/0x160 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc Also add some useful WARN_ON sanity checks. Cc: Fixes: 8d160cd4d506 ("iommufd: Algorithms for PFN storage") Link: https://lore.kernel.org/r/2-v1-ceab6a4d7d7a+94-iommufd_syz_jgg@nvidia.com Reviewed-by: Kevin Tian Reported-by: Pengfei Xu Tested-by: Pengfei Xu Signed-off-by: Jason Gunthorpe commit e4395701330fc4aee530905039516fe770b81417 Author: Jason Gunthorpe Date: Fri Mar 31 12:32:24 2023 -0300 iommufd: Check for uptr overflow syzkaller found that setting up a map with a user VA that wraps past zero can trigger WARN_ONs, particularly from pin_user_pages weirdly returning 0 due to invalid arguments. Prevent creating a pages with a uptr and size that would math overflow. WARNING: CPU: 0 PID: 518 at drivers/iommu/iommufd/pages.c:793 pfn_reader_user_pin+0x2e6/0x390 Modules linked in: CPU: 0 PID: 518 Comm: repro Not tainted 6.3.0-rc2-eeac8ede1755+ #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 RIP: 0010:pfn_reader_user_pin+0x2e6/0x390 Code: b1 11 e9 25 fe ff ff e8 28 e4 0f ff 31 ff 48 89 de e8 2e e6 0f ff 48 85 db 74 0a e8 14 e4 0f ff e9 4d ff ff ff e8 0a e4 0f ff <0f> 0b bb f2 ff ff ff e9 3c ff ff ff e8 f9 e3 0f ff ba 01 00 00 00 RSP: 0018:ffffc90000f9fa30 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff821e2b72 RDX: 0000000000000000 RSI: ffff888014184680 RDI: 0000000000000002 RBP: ffffc90000f9fa78 R08: 00000000000000ff R09: 0000000079de6f4e R10: ffffc90000f9f790 R11: ffff888014185418 R12: ffffc90000f9fc60 R13: 0000000000000002 R14: ffff888007879800 R15: 0000000000000000 FS: 00007f4227555740(0000) GS:ffff88807dc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020000043 CR3: 000000000e748005 CR4: 0000000000770ef0 PKRU: 55555554 Call Trace: pfn_reader_next+0x14a/0x7b0 ? interval_tree_double_span_iter_update+0x11a/0x140 pfn_reader_first+0x140/0x1b0 iopt_pages_rw_slow+0x71/0x280 ? __this_cpu_preempt_check+0x20/0x30 iopt_pages_rw_access+0x2b2/0x5b0 iommufd_access_rw+0x19f/0x2f0 iommufd_test+0xd11/0x16f0 ? write_comp_data+0x2f/0x90 iommufd_fops_ioctl+0x206/0x330 __x64_sys_ioctl+0x10e/0x160 ? __pfx_iommufd_fops_ioctl+0x10/0x10 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc Cc: Fixes: 8d160cd4d506 ("iommufd: Algorithms for PFN storage") Link: https://lore.kernel.org/r/1-v1-ceab6a4d7d7a+94-iommufd_syz_jgg@nvidia.com Reviewed-by: Kevin Tian Reported-by: Pengfei Xu Tested-by: Pengfei Xu Signed-off-by: Jason Gunthorpe commit b277fc793daf258877b4c0744b52f69d6e6ba22e Author: Aneesh Kumar K.V Date: Tue Apr 4 09:44:33 2023 +0530 powerpc/papr_scm: Update the NUMA distance table for the target node Platform device helper routines won't update the NUMA distance table while creating a platform device, even if the device is present on a NUMA node that doesn't have memory or CPU. This is especially true for pmem devices. If the target node of the pmem device is not online, we find the nearest online node to the device and associate the pmem device with that online node. To find the nearest online node, we should have the numa distance table updated correctly. Update the distance information during the device probe. For a papr scm device on NUMA node 3 distance_lookup_table value for distance_ref_points_depth = 2 before and after fix is below: Before fix: node 3 distance depth 0 - 0 node 3 distance depth 1 - 0 node 4 distance depth 0 - 4 node 4 distance depth 1 - 2 node 5 distance depth 0 - 5 node 5 distance depth 1 - 1 After fix node 3 distance depth 0 - 3 node 3 distance depth 1 - 1 node 4 distance depth 0 - 4 node 4 distance depth 1 - 2 node 5 distance depth 0 - 5 node 5 distance depth 1 - 1 Without the fix, the nearest numa node to the pmem device (NUMA node 3) will be picked as 4. After the fix, we get the correct numa node which is 5. Fixes: da1115fdbd6e ("powerpc/nvdimm: Pick nearby online node if the device node is not online") Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://msgid.link/20230404041433.1781804-1-aneesh.kumar@linux.ibm.com commit c6b486fb33680ad5a3a6390ce693c835caaae3f7 Author: Siddharth Vadapalli Date: Mon Apr 3 14:33:21 2023 +0530 net: ethernet: ti: am65-cpsw: Fix mdio cleanup in probe In the am65_cpsw_nuss_probe() function's cleanup path, the call to of_platform_device_destroy() for the common->mdio_dev device is invoked unconditionally. It is possible that either the MDIO node is not present in the device-tree, or the MDIO node is disabled in the device-tree. In both these cases, the MDIO device is not created, resulting in a NULL pointer dereference when the of_platform_device_destroy() function is invoked on the common->mdio_dev device on the cleanup path. Fix this by ensuring that the common->mdio_dev device exists, before attempting to invoke of_platform_device_destroy(). Fixes: a45cfcc69a25 ("net: ethernet: ti: am65-cpsw-nuss: use of_platform_device_create() for mdio") Signed-off-by: Siddharth Vadapalli Reviewed-by: Roger Quadros Link: https://lore.kernel.org/r/20230403090321.835877-1-s-vadapalli@ti.com Signed-off-by: Paolo Abeni commit a3046a618a284579d1189af8711765f553eed707 Author: David Gow Date: Sat Mar 18 12:15:54 2023 +0800 um: Only disable SSE on clang to work around old GCC bugs As part of the Rust support for UML, we disable SSE (and similar flags) to match the normal x86 builds. This both makes sense (we ideally want a similar configuration to x86), and works around a crash bug with SSE generation under Rust with LLVM. However, this breaks compiling stdlib.h under gcc < 11, as the x86_64 ABI requires floating-point return values be stored in an SSE register. gcc 11 fixes this by only doing register allocation when a function is actually used, and since we never use atof(), it shouldn't be a problem: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99652 Nevertheless, only disable SSE on clang setups, as that's a simple way of working around everyone's bugs. Fixes: 884981867947 ("rust: arch/um: Disable FP/SIMD instruction to match x86") Reported-by: Roberto Sassu Link: https://lore.kernel.org/linux-um/6df2ecef9011d85654a82acd607fdcbc93ad593c.camel@huaweicloud.com/ Tested-by: Roberto Sassu Tested-by: SeongJae Park Signed-off-by: David Gow Reviewed-by: Vincenzo Palazzo Tested-by: Arthur Grillo Signed-off-by: Richard Weinberger commit abf04be0e7071f2bcd39bf97ba407e7d4439785e Author: Lukas Wunner Date: Sat Mar 11 15:40:06 2023 +0100 PCI/DOE: Fix memory leak with CONFIG_DEBUG_OBJECTS=y After a pci_doe_task completes, its work_struct needs to be destroyed to avoid a memory leak with CONFIG_DEBUG_OBJECTS=y. Fixes: 9d24322e887b ("PCI/DOE: Add DOE mailbox support functions") Tested-by: Ira Weiny Signed-off-by: Lukas Wunner Reviewed-by: Ira Weiny Reviewed-by: Davidlohr Bueso Reviewed-by: Dan Williams Reviewed-by: Jonathan Cameron Cc: stable@vger.kernel.org # v6.0+ Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/775768b4912531c3b887d405fc51a50e465e1bf9.1678543498.git.lukas@wunner.de Signed-off-by: Dan Williams commit 92dc899c3b4927f3cfa23f55bf759171234b5802 Author: Lukas Wunner Date: Sat Mar 11 15:40:05 2023 +0100 PCI/DOE: Silence WARN splat with CONFIG_DEBUG_OBJECTS=y Gregory Price reports a WARN splat with CONFIG_DEBUG_OBJECTS=y upon CXL probing because pci_doe_submit_task() invokes INIT_WORK() instead of INIT_WORK_ONSTACK() for a work_struct that was allocated on the stack. All callers of pci_doe_submit_task() allocate the work_struct on the stack, so replace INIT_WORK() with INIT_WORK_ONSTACK() as a backportable short-term fix. The long-term fix implemented by a subsequent commit is to move to a synchronous API which allocates the work_struct internally in the DOE library. Stacktrace for posterity: WARNING: CPU: 0 PID: 23 at lib/debugobjects.c:545 __debug_object_init.cold+0x18/0x183 CPU: 0 PID: 23 Comm: kworker/u2:1 Not tainted 6.1.0-0.rc1.20221019gitaae703b02f92.17.fc38.x86_64 #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: pci_doe_submit_task+0x5d/0xd0 pci_doe_discovery+0xb4/0x100 pcim_doe_create_mb+0x219/0x290 cxl_pci_probe+0x192/0x430 local_pci_probe+0x41/0x80 pci_device_probe+0xb3/0x220 really_probe+0xde/0x380 __driver_probe_device+0x78/0x170 driver_probe_device+0x1f/0x90 __driver_attach_async_helper+0x5c/0xe0 async_run_entry_fn+0x30/0x130 process_one_work+0x294/0x5b0 Fixes: 9d24322e887b ("PCI/DOE: Add DOE mailbox support functions") Link: https://lore.kernel.org/linux-cxl/Y1bOniJliOFszvIK@memverge.com/ Reported-by: Gregory Price Tested-by: Ira Weiny Tested-by: Gregory Price Signed-off-by: Lukas Wunner Reviewed-by: Ira Weiny Reviewed-by: Dan Williams Reviewed-by: Gregory Price Cc: stable@vger.kernel.org # v6.0+ Reviewed-by: Jonathan Cameron Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/67a9117f463ecdb38a2dbca6a20391ce2f1e7a06.1678543498.git.lukas@wunner.de Signed-off-by: Dan Williams commit 4fe2c13d59d849be3b45371e3913ec5dc77fc0fb Author: Lukas Wunner Date: Sat Mar 11 15:40:04 2023 +0100 cxl/pci: Handle excessive CDAT length If the length in the CDAT header is larger than the concatenation of the header and all table entries, then the CDAT exposed to user space contains trailing null bytes. Not every consumer may be able to handle that. Per Postel's robustness principle, "be liberal in what you accept" and silently reduce the cached length to avoid exposing those null bytes. Fixes: c97006046c79 ("cxl/port: Read CDAT table") Tested-by: Ira Weiny Signed-off-by: Lukas Wunner Reviewed-by: Dan Williams Reviewed-by: Jonathan Cameron Cc: stable@vger.kernel.org # v6.0+ Link: https://lore.kernel.org/r/6d98b3c7da5343172bd3ccabfabbc1f31c079d74.1678543498.git.lukas@wunner.de Signed-off-by: Dan Williams commit b56faef2312057db20479b240eb71bd2e51fb51c Author: Lukas Wunner Date: Sat Mar 11 15:40:03 2023 +0100 cxl/pci: Handle truncated CDAT entries If truncated CDAT entries are received from a device, the concatenation of those entries constitutes a corrupt CDAT, yet is happily exposed to user space. Avoid by verifying response lengths and erroring out if truncation is detected. The last CDAT entry may still be truncated despite the checks introduced herein if the length in the CDAT header is too small. However, that is easily detectable by user space because it reaches EOF prematurely. A subsequent commit which rightsizes the CDAT response allocation closes that remaining loophole. The two lines introduced here which exceed 80 chars are shortened to less than 80 chars by a subsequent commit which migrates to a synchronous DOE API and replaces "t.task.rv" by "rc". The existing acpi_cdat_header and acpi_table_cdat struct definitions provided by ACPICA cannot be used because they do not employ __le16 or __le32 types. I believe that cannot be changed because those types are Linux-specific and ACPI is specified for little endian platforms only, hence doesn't care about endianness. So duplicate the structs. Fixes: c97006046c79 ("cxl/port: Read CDAT table") Tested-by: Ira Weiny Signed-off-by: Lukas Wunner Reviewed-by: Dan Williams Reviewed-by: Jonathan Cameron Cc: stable@vger.kernel.org # v6.0+ Link: https://lore.kernel.org/r/bce3aebc0e8e18a1173425a7a865b232c3912963.1678543498.git.lukas@wunner.de Signed-off-by: Dan Williams commit 34bafc747c54fb58c1908ec3116fa6137393e596 Author: Lukas Wunner Date: Sat Mar 11 15:40:02 2023 +0100 cxl/pci: Handle truncated CDAT header cxl_cdat_get_length() only checks whether the DOE response size is sufficient for the Table Access response header (1 dword), but not the succeeding CDAT header (1 dword length plus other fields). It thus returns whatever uninitialized memory happens to be on the stack if a truncated DOE response with only 1 dword was received. Fix it. Fixes: c97006046c79 ("cxl/port: Read CDAT table") Reported-by: Ming Li Tested-by: Ira Weiny Signed-off-by: Lukas Wunner Reviewed-by: Ming Li Reviewed-by: Dan Williams Reviewed-by: Jonathan Cameron Cc: stable@vger.kernel.org # v6.0+ Reviewed-by: Kuppuswamy Sathyanarayanan Link: https://lore.kernel.org/r/000e69cd163461c8b1bc2cf4155b6e25402c29c7.1678543498.git.lukas@wunner.de Signed-off-by: Dan Williams commit 148341f0a2f53b5e8808d093333d85170586a15d Merge: 2d72ab2449fa9 cb2239c198ad9 Author: Linus Torvalds Date: Mon Apr 3 09:41:24 2023 -0700 Merge tag 'vfs.misc.fixes.v6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping Pull vfs fix from Christian Brauner: "When a mount or mount tree is made shared the vfs allocates new peer group ids for all mounts that have no peer group id set. Only mounts that aren't marked with MNT_SHARED are relevant here as MNT_SHARED indicates that the mount has fully transitioned to a shared mount. The peer group id handling is done with namespace lock held. On failure, the peer group id settings of mounts for which a new peer group id was allocated need to be reverted and the allocated peer group id freed. The cleanup_group_ids() helper can identify the mounts to cleanup by checking whether a given mount has a peer group id set but isn't marked MNT_SHARED. The deallocation always needs to happen with namespace lock held to protect against concurrent modifications of the propagation settings. This fixes the one place where the namespace lock was dropped before calling cleanup_group_ids()" * tag 'vfs.misc.fixes.v6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping: fs: drop peer group ids under namespace lock commit 2d72ab2449fa9fce8f6898fd5adda10497f7c111 Merge: 7e364e56293bb f8acb24aaf89f Author: Linus Torvalds Date: Mon Apr 3 09:34:08 2023 -0700 Merge tag 'hyperv-fixes-signed-20230402' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull hyperv fixes from Wei Liu: - Fix a bug in channel allocation for VMbus (Mohammed Gamal) - Do not allow root partition functionality in CVM (Michael Kelley) * tag 'hyperv-fixes-signed-20230402' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: x86/hyperv: Block root partition functionality in a Confidential VM Drivers: vmbus: Check for channel allocation before looking up relids commit 93942b70461574ca7fc3d91494ca89b16a4c64c7 Author: Arseniy Krasnov Date: Wed Mar 29 10:47:26 2023 +0300 mtd: rawnand: meson: fix bitmask for length in command word Valid mask is 0x3FFF, without this patch the following problems were found: 1) [ 0.938914] Could not find a valid ONFI parameter page, trying bit-wise majority to recover it [ 0.947384] ONFI parameter recovery failed, aborting 2) Read with disabled ECC mode was broken. Fixes: 8fae856c5350 ("mtd: rawnand: meson: add support for Amlogic NAND flash controller") Cc: Signed-off-by: Arseniy Krasnov Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/3794ffbf-dfea-e96f-1f97-fe235b005e19@sberdevices.ru commit 0c3089601f064d80b3838eceb711fcac04bceaad Author: Bang Li Date: Wed Mar 29 00:30:12 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 Fixes: e47f68587b82 ("mtd: check for max_bitflips in mtd_read_oob()") Cc: # v3.7 Acked-by: Richard Weinberger Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230328163012.4264-1-libang.linuxer@gmail.com commit ddbb664b6ab8de7dffa388ae0c88cd18616494e5 Author: Christophe Kerello Date: Tue Mar 28 17:58:19 2023 +0200 mtd: rawnand: stm32_fmc2: use timings.mode instead of checking tRC_min Use timings.mode value instead of checking tRC_min timing for EDO mode support. Signed-off-by: Christophe Kerello Fixes: 2cd457f328c1 ("mtd: rawnand: stm32_fmc2: add STM32 FMC2 NAND flash controller driver") Cc: stable@vger.kernel.org #v5.10+ Reviewed-by: Tudor Ambarus Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230328155819.225521-3-christophe.kerello@foss.st.com commit f71e0e329c152c7f11ddfd97ffc62aba152fad3f Author: Christophe Kerello Date: Tue Mar 28 17:58:18 2023 +0200 mtd: rawnand: stm32_fmc2: remove unsupported EDO mode Remove the EDO mode support from as the FMC2 controller does not support the feature. Signed-off-by: Christophe Kerello Fixes: 2cd457f328c1 ("mtd: rawnand: stm32_fmc2: add STM32 FMC2 NAND flash controller driver") Cc: stable@vger.kernel.org #v5.4+ Reviewed-by: Tudor Ambarus Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230328155819.225521-2-christophe.kerello@foss.st.com commit a3c40af4a7ea4fbeecca28a1d4dce6869a8d6995 Merge: 0311454f4f2ef 8671133082176 Author: Arnd Bergmann Date: Mon Apr 3 17:54:01 2023 +0200 Merge tag 'tee-fix-for-v6.3' of https://git.linaro.org/people/jens.wiklander/linux-tee into arm/fixes Add explicit cast to (void *) for virt_to_page() argument * tag 'tee-fix-for-v6.3' of https://git.linaro.org/people/jens.wiklander/linux-tee: tee: Pass a pointer to virt_to_page() Link: https://lore.kernel.org/r/20230330124804.GA1943242@rayden Signed-off-by: Arnd Bergmann commit f82e7ca019dfad3b006fd3b772f7ac569672db55 Author: Steven Rostedt (Google) Date: Thu Mar 9 22:13:02 2023 -0500 tracing: Error if a trace event has an array for a __field() A __field() in the TRACE_EVENT() macro is used to set up the fields of the trace event data. It is for single storage units (word, char, int, pointer, etc) and not for complex structures or arrays. Unfortunately, there's nothing preventing the build from accepting: __field(int, arr[5]); from building. It will turn into a array value. This use to work fine, as the offset and size use to be determined by the macro using the field name, but things have changed and the offset and size are now determined by the type. So the above would only be size 4, and the next field will be located 4 bytes from it (instead of 20). The proper way to declare static arrays is to use the __array() macro. Instead of __field(int, arr[5]) it should be __array(int, arr, 5). Add some macro tricks to the building of a trace event from the TRACE_EVENT() macro such that __field(int, arr[5]) will fail to build. A comment by the failure will explain why the build failed. Link: https://lore.kernel.org/lkml/20230306122549.236561-1-douglas.raillard@arm.com/ Link: https://lore.kernel.org/linux-trace-kernel/20230309221302.642e82d9@gandalf.local.home Reported-by: Douglas RAILLARD Signed-off-by: Steven Rostedt (Google) Acked-by: Masami Hiramatsu (Google) commit d3cba7f02cd82118c32651c73374d8a5a459d9a6 Author: Daniel Bristot de Oliveira Date: Wed Mar 29 17:50:16 2023 +0200 tracing/osnoise: Fix notify new tracing_max_latency osnoise/timerlat tracers are reporting new max latency on instances where the tracing is off, creating inconsistencies between the max reported values in the trace and in the tracing_max_latency. Thus only report new tracing_max_latency on active tracing instances. Link: https://lkml.kernel.org/r/ecd109fde4a0c24ab0f00ba1e9a144ac19a91322.1680104184.git.bristot@kernel.org Cc: stable@vger.kernel.org Fixes: dae181349f1e ("tracing/osnoise: Support a list of trace_array *tr") Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) commit b9f451a9029a16eb7913ace09b92493d00f2e564 Author: Daniel Bristot de Oliveira Date: Wed Mar 29 17:50:15 2023 +0200 tracing/timerlat: Notify new max thread latency timerlat is not reporting a new tracing_max_latency for the thread latency. The reason is that it is not calling notify_new_max_latency() function after the new thread latency is sampled. Call notify_new_max_latency() after computing the thread latency. Link: https://lkml.kernel.org/r/16e18d61d69073d0192ace07bf61e405cca96e9c.1680104184.git.bristot@kernel.org Cc: stable@vger.kernel.org Fixes: dae181349f1e ("tracing/osnoise: Support a list of trace_array *tr") Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) commit ea65b41807a26495ff2a73dd8b1bab2751940887 Author: John Keeping Date: Mon Mar 27 18:36:46 2023 +0100 ftrace: Mark get_lock_parent_ip() __always_inline If the compiler decides not to inline this function then preemption tracing will always show an IP inside the preemption disabling path and never the function actually calling preempt_{enable,disable}. Link: https://lore.kernel.org/linux-trace-kernel/20230327173647.1690849-1-john@metanate.com Cc: Masami Hiramatsu Cc: Mark Rutland Cc: stable@vger.kernel.org Fixes: f904f58263e1d ("sched/debug: Fix preempt_disable_ip recording for preempt_disable()") Signed-off-by: John Keeping Signed-off-by: Steven Rostedt (Google) commit 6455b6163d8c680366663cdb8c679514d55fc30c Author: Zheng Yejian Date: Sat Mar 25 10:12:47 2023 +0800 ring-buffer: Fix race while reader and writer are on the same page When user reads file 'trace_pipe', kernel keeps printing following logs that warn at "cpu_buffer->reader_page->read > rb_page_size(reader)" in rb_get_reader_page(). It just looks like there's an infinite loop in tracing_read_pipe(). This problem occurs several times on arm64 platform when testing v5.10 and below. Call trace: rb_get_reader_page+0x248/0x1300 rb_buffer_peek+0x34/0x160 ring_buffer_peek+0xbc/0x224 peek_next_entry+0x98/0xbc __find_next_entry+0xc4/0x1c0 trace_find_next_entry_inc+0x30/0x94 tracing_read_pipe+0x198/0x304 vfs_read+0xb4/0x1e0 ksys_read+0x74/0x100 __arm64_sys_read+0x24/0x30 el0_svc_common.constprop.0+0x7c/0x1bc do_el0_svc+0x2c/0x94 el0_svc+0x20/0x30 el0_sync_handler+0xb0/0xb4 el0_sync+0x160/0x180 Then I dump the vmcore and look into the problematic per_cpu ring_buffer, I found that tail_page/commit_page/reader_page are on the same page while reader_page->read is obviously abnormal: tail_page == commit_page == reader_page == { .write = 0x100d20, .read = 0x8f9f4805, // Far greater than 0xd20, obviously abnormal!!! .entries = 0x10004c, .real_end = 0x0, .page = { .time_stamp = 0x857257416af0, .commit = 0xd20, // This page hasn't been full filled. // .data[0...0xd20] seems normal. } } The root cause is most likely the race that reader and writer are on the same page while reader saw an event that not fully committed by writer. To fix this, add memory barriers to make sure the reader can see the content of what is committed. Since commit a0fcaaed0c46 ("ring-buffer: Fix race between reset page and reading page") has added the read barrier in rb_get_reader_page(), here we just need to add the write barrier. Link: https://lore.kernel.org/linux-trace-kernel/20230325021247.2923907-1-zhengyejian1@huawei.com Cc: stable@vger.kernel.org Fixes: 77ae365eca89 ("ring-buffer: make lockless") Suggested-by: Steven Rostedt (Google) Signed-off-by: Zheng Yejian Signed-off-by: Steven Rostedt (Google) commit 4ccf11c4e8a8e051499d53a12f502196c97a758e Author: Tze-nan Wu Date: Tue Mar 21 19:04:43 2023 +0800 tracing/synthetic: Fix races on freeing last_cmd Currently, the "last_cmd" variable can be accessed by multiple processes asynchronously when multiple users manipulate synthetic_events node at the same time, it could lead to use-after-free or double-free. This patch add "lastcmd_mutex" to prevent "last_cmd" from being accessed asynchronously. ================================================================ It's easy to reproduce in the KASAN environment by running the two scripts below in different shells. script 1: while : do echo -n -e '\x88' > /sys/kernel/tracing/synthetic_events done script 2: while : do echo -n -e '\xb0' > /sys/kernel/tracing/synthetic_events done ================================================================ double-free scenario: process A process B ------------------- --------------- 1.kstrdup last_cmd 2.free last_cmd 3.free last_cmd(double-free) ================================================================ use-after-free scenario: process A process B ------------------- --------------- 1.kstrdup last_cmd 2.free last_cmd 3.tracing_log_err(use-after-free) ================================================================ Appendix 1. KASAN report double-free: BUG: KASAN: double-free in kfree+0xdc/0x1d4 Free of addr ***** by task sh/4879 Call trace: ... kfree+0xdc/0x1d4 create_or_delete_synth_event+0x60/0x1e8 trace_parse_run_command+0x2bc/0x4b8 synth_events_write+0x20/0x30 vfs_write+0x200/0x830 ... Allocated by task 4879: ... kstrdup+0x5c/0x98 create_or_delete_synth_event+0x6c/0x1e8 trace_parse_run_command+0x2bc/0x4b8 synth_events_write+0x20/0x30 vfs_write+0x200/0x830 ... Freed by task 5464: ... kfree+0xdc/0x1d4 create_or_delete_synth_event+0x60/0x1e8 trace_parse_run_command+0x2bc/0x4b8 synth_events_write+0x20/0x30 vfs_write+0x200/0x830 ... ================================================================ Appendix 2. KASAN report use-after-free: BUG: KASAN: use-after-free in strlen+0x5c/0x7c Read of size 1 at addr ***** by task sh/5483 sh: CPU: 7 PID: 5483 Comm: sh ... __asan_report_load1_noabort+0x34/0x44 strlen+0x5c/0x7c tracing_log_err+0x60/0x444 create_or_delete_synth_event+0xc4/0x204 trace_parse_run_command+0x2bc/0x4b8 synth_events_write+0x20/0x30 vfs_write+0x200/0x830 ... Allocated by task 5483: ... kstrdup+0x5c/0x98 create_or_delete_synth_event+0x80/0x204 trace_parse_run_command+0x2bc/0x4b8 synth_events_write+0x20/0x30 vfs_write+0x200/0x830 ... Freed by task 5480: ... kfree+0xdc/0x1d4 create_or_delete_synth_event+0x74/0x204 trace_parse_run_command+0x2bc/0x4b8 synth_events_write+0x20/0x30 vfs_write+0x200/0x830 ... Link: https://lore.kernel.org/linux-trace-kernel/20230321110444.1587-1-Tze-nan.Wu@mediatek.com Fixes: 27c888da9867 ("tracing: Remove size restriction on synthetic event cmd error logging") Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Matthias Brugger Cc: AngeloGioacchino Del Regno Cc: "Tom Zanussi" Signed-off-by: Tze-nan Wu Signed-off-by: Steven Rostedt (Google) commit 0311454f4f2effef609499219a75c70ae21cccc5 Merge: 167fba62c3774 f9d323e7c1724 Author: Arnd Bergmann Date: Mon Apr 3 17:51:09 2023 +0200 Merge tag 'amlogic-fixes-v6.3-rc' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into arm/fixes Amlogic fixes for v6.3-rc: - fix conflicts between DMC memory space and Amlogic perf driver * tag 'amlogic-fixes-v6.3-rc' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: perf/amlogic: adjust register offsets arm64: dts: meson-g12-common: resolve conflict between canvas & pmu arm64: dts: meson-g12-common: specify full DMC range Link: https://lore.kernel.org/r/db5fcdb4-60e8-95e6-06b5-1ac474ecabe3@linaro.org Signed-off-by: Arnd Bergmann commit 167fba62c3774b05351cf05e336d66c40f2d43b5 Merge: 7e364e56293bb 172fa6366c0c8 Author: Arnd Bergmann Date: Mon Apr 3 17:50:43 2023 +0200 Merge tag 'optee-fix-for-v6.3' of https://git.linaro.org/people/jens.wiklander/linux-tee into arm/fixes Fixes a spell error in an error message in the OP-TEE driver * tag 'optee-fix-for-v6.3' of https://git.linaro.org/people/jens.wiklander/linux-tee: tee: optee: Fix typo Unuspported -> Unsupported Link: https://lore.kernel.org/r/20230314184441.GA2936721@rayden Signed-off-by: Arnd Bergmann commit 738a96c4a8c36950803fdd27e7c30aca92dccefd Author: Xu Kuohai Date: Sat Apr 1 19:41:44 2023 -0400 bpf, arm64: Fixed a BTI error on returning to patched function When BPF_TRAMP_F_CALL_ORIG is set, BPF trampoline uses BLR to jump back to the instruction next to call site to call the patched function. For BTI-enabled kernel, the instruction next to call site is usually PACIASP, in this case, it's safe to jump back with BLR. But when the call site is not followed by a PACIASP or bti, a BTI exception is triggered. Here is a fault log: Unhandled 64-bit el1h sync exception on CPU0, ESR 0x0000000034000002 -- BTI CPU: 0 PID: 263 Comm: test_progs Tainted: GF Hardware name: linux,dummy-virt (DT) pstate: 40400805 (nZcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=-c) pc : bpf_fentry_test1+0xc/0x30 lr : bpf_trampoline_6442573892_0+0x48/0x1000 sp : ffff80000c0c3a50 x29: ffff80000c0c3a90 x28: ffff0000c2e6c080 x27: 0000000000000000 x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000050 x23: 0000000000000000 x22: 0000ffffcfd2a7f0 x21: 000000000000000a x20: 0000ffffcfd2a7f0 x19: 0000000000000000 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000ffffcfd2a7f0 x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000000 x10: ffff80000914f5e4 x9 : ffff8000082a1528 x8 : 0000000000000000 x7 : 0000000000000000 x6 : 0101010101010101 x5 : 0000000000000000 x4 : 00000000fffffff2 x3 : 0000000000000001 x2 : ffff8001f4b82000 x1 : 0000000000000000 x0 : 0000000000000001 Kernel panic - not syncing: Unhandled exception CPU: 0 PID: 263 Comm: test_progs Tainted: GF Hardware name: linux,dummy-virt (DT) Call trace: dump_backtrace+0xec/0x144 show_stack+0x24/0x7c dump_stack_lvl+0x8c/0xb8 dump_stack+0x18/0x34 panic+0x1cc/0x3ec __el0_error_handler_common+0x0/0x130 el1h_64_sync_handler+0x60/0xd0 el1h_64_sync+0x78/0x7c bpf_fentry_test1+0xc/0x30 bpf_fentry_test1+0xc/0x30 bpf_prog_test_run_tracing+0xdc/0x2a0 __sys_bpf+0x438/0x22a0 __arm64_sys_bpf+0x30/0x54 invoke_syscall+0x78/0x110 el0_svc_common.constprop.0+0x6c/0x1d0 do_el0_svc+0x38/0xe0 el0_svc+0x30/0xd0 el0t_64_sync_handler+0x1ac/0x1b0 el0t_64_sync+0x1a0/0x1a4 Kernel Offset: disabled CPU features: 0x0000,00034c24,f994fdab Memory Limit: none And the instruction next to call site of bpf_fentry_test1 is ADD, not PACIASP: : bti c nop nop add w0, w0, #0x1 paciasp For BPF prog, JIT always puts a PACIASP after call site for BTI-enabled kernel, so there is no problem. To fix it, replace BLR with RET to bypass the branch target check. Fixes: efc9909fdce0 ("bpf, arm64: Add bpf trampoline for arm64") Reported-by: Florent Revest Signed-off-by: Xu Kuohai Signed-off-by: Daniel Borkmann Tested-by: Florent Revest Acked-by: Florent Revest Link: https://lore.kernel.org/bpf/20230401234144.3719742-1-xukuohai@huaweicloud.com commit 7b75c4703609a3ebaf67271813521bc0281e1ec1 Author: Dhruva Gole Date: Mon Apr 3 12:54:43 2023 +0530 gpio: davinci: Add irq chip flag to skip set wake Add the IRQCHIP_SKIP_SET_WAKE flag since there are no special IRQ Wake bits that can be set to enable wakeup IRQ. Fixes: 3d9edf09d452 ("[ARM] 4457/2: davinci: GPIO support") Signed-off-by: Dhruva Gole Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit fe092498cb9638418c96675be320c74a16306b48 Author: Dhruva Gole Date: Mon Apr 3 12:54:42 2023 +0530 gpio: davinci: Do not clear the bank intr enable bit in save_context The interrupt enable bits might be set if we want to use the GPIO as wakeup source. Clearing this will mean disabling of interrupts in the GPIO banks that we may want to wakeup from. Thus remove the line that was clearing this bit from the driver's save context function. Cc: Devarsh Thakkar Fixes: 0651a730924b ("gpio: davinci: Add support for system suspend/resume PM") Signed-off-by: Dhruva Gole Reviewed-by: Linus Walleij Acked-by: Keerthy Signed-off-by: Bartosz Golaszewski commit e6db67fa871dee37d22701daba806bfcd4d9df49 Author: Felix Fietkau Date: Thu Mar 30 11:12:59 2023 +0200 wifi: mt76: ignore key disable commands This helps avoid cleartext leakage of already queued or powersave buffered packets, when a reassoc triggers the key deletion. Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230330091259.61378-1-nbd@nbd.name commit cf5fa3ca0552f1b7ba8490de40700bbfb6979b17 Author: Kalle Valo Date: Wed Mar 29 19:20:38 2023 +0300 wifi: ath11k: reduce the MHI timeout to 20s Currently ath11k breaks after hibernation, the reason being that ath11k expects that the wireless device will have power during suspend and the firmware will continue running. But of course during hibernation the power from the device is cut off and firmware is not running when resuming, so ath11k will fail. (The reason why ath11k needs the firmware running is the interaction between mac80211 and MHI stack, it's a long story and more info in the bugzilla report.) In SUSE kernels the watchdog timeout is reduced from the default 120 to 60 seconds: CONFIG_DPM_WATCHDOG_TIMEOUT=60 But as the ath11k MHI timeout is 90 seconds the kernel will crash before will ath11k will recover in resume callback. To avoid the crash reduce the MHI timeout to just 20 seconds. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.9 Link: https://bugzilla.kernel.org/show_bug.cgi?id=214649 Signed-off-by: Kalle Valo Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230329162038.8637-1-kvalo@kernel.org commit de6aa72b265b72bca2b1897d5000c8f0147d3157 Author: Peter Ujfalusi Date: Mon Apr 3 12:09:09 2023 +0300 ASoC: SOF: ipc4-topology: Clarify bind failure caused by missing fw_module The original patch uses a feature in lib/vsprintf.c to handle the invalid address when tring to print *_fw_module->man4_module_entry.name when the *rc_fw_module is NULL. This case is handled by check_pointer_msg() internally and turns the invalid pointer to '(efault)' for printing but it is hiding useful information about the circumstances. Change the print to emmit the name of the widget and a note on which side's fw_module is missing. Fixes: e3720f92e023 ("ASoC: SOF: avoid a NULL dereference with unsupported widgets") Reported-by: Dan Carpenter Link: https://lore.kernel.org/alsa-devel/4826f662-42f0-4a82-ba32-8bf5f8a03256@kili.mountain/ Signed-off-by: Peter Ujfalusi Rule: 'Cc: stable@vger.kernel.org' or 'commit upstream.' Link: https://lore.kernel.org/r/20230403090909.18233-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 9a469c6dfab38326f99f105386db84230be09ee3 Author: Benjamin Asbach Date: Sat Apr 1 01:24:47 2023 +0200 platform/x86: thinkpad_acpi: Add missing T14s Gen1 type to s2idle quirk list From the commit message adding the first s2idle quirks: > Lenovo laptops that contain NVME SSDs across a variety of generations have > trouble resuming from suspend to idle when the IOMMU translation layer is > active for the NVME storage device. > > This generally manifests as a large resume delay or page faults. These > delays and page faults occur as a result of a Lenovo BIOS specific SMI > that runs during the D3->D0 transition on NVME devices. Add the DMI ids for another variant of the T14s Gen1, which also needs the s2idle quirk. Link: https://lore.kernel.org/all/20220503183420.348-1-mario.limonciello@amd.com/ Link: https://bbs.archlinux.org/viewtopic.php?pid=2084655#p2084655 Signed-off-by: Benjamin Asbach Tested-by: Benjamin Asbach Link: https://lore.kernel.org/r/20230331232447.37204-1-asbachb.kernel@impl.it Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 7065655216d4d034d71164641f3bec0b189ad6fa Author: Mark Pearson Date: Sun Apr 2 21:31:20 2023 -0400 platform/x86: think-lmi: Clean up display of current_value on Thinkstation On ThinkStations on retrieving the attribute value the BIOS appends the possible values to the string. Clean up the display in the current_value_show function so the options part is not displayed. Fixes: a40cd7ef22fb ("platform/x86: think-lmi: Add WMI interface support on Lenovo platforms") Reported by Mario Limoncello Link: https://github.com/fwupd/fwupd/issues/5077#issuecomment-1488730526 Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20230403013120.2105-2-mpearson-lenovo@squebb.ca Tested-by: Mario Limonciello Tested-by: Mirsad Goran Todorovac Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit e7d796fccdc8d17c2d21817ebe4c7bf5bbfe5433 Author: Mark Pearson Date: Sun Apr 2 21:31:19 2023 -0400 platform/x86: think-lmi: Fix memory leaks when parsing ThinkStation WMI strings My previous commit introduced a memory leak where the item allocated from tlmi_setting was not freed. This commit also renames it to avoid confusion with the similarly name variable in the same function. Fixes: 8a02d70679fc ("platform/x86: think-lmi: Add possible_values for ThinkStation") Reported-by: Mirsad Todorovac Link: https://lore.kernel.org/lkml/df26ff45-8933-f2b3-25f4-6ee51ccda7d8@gmx.de/T/ Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20230403013120.2105-1-mpearson-lenovo@squebb.ca Tested-by: Mario Limonciello Tested-by: Mirsad Goran Todorovac Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit a3c4c053014585dcf20f4df954791b74d8a8afcd Author: Armin Wolf Date: Fri Mar 31 23:33:19 2023 +0200 platform/x86: think-lmi: Fix memory leak when showing current settings When retriving a item string with tlmi_setting(), the result has to be freed using kfree(). In current_value_show() however, malformed item strings are not freed, causing a memory leak. Fix this by eliminating the early return responsible for this. Reported-by: Mirsad Goran Todorovac Link: https://lore.kernel.org/platform-driver-x86/01e920bc-5882-ba0c-dd15-868bf0eca0b8@alu.unizg.hr/T/#t Tested-by: Mirsad Goran Todorovac Fixes: 0fdf10e5fc96 ("platform/x86: think-lmi: Split current_value to reflect only the value") Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20230331213319.41040-1-W_Armin@gmx.de Tested-by: Mario Limonciello Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit ea30388baebcce37fd594d425a65037ca35e59e8 Author: Ziyang Xuan Date: Mon Apr 3 15:34:17 2023 +0800 ipv6: Fix an uninit variable access bug in __ip6_make_skb() Syzbot reported a bug as following: ===================================================== BUG: KMSAN: uninit-value in arch_atomic64_inc arch/x86/include/asm/atomic64_64.h:88 [inline] BUG: KMSAN: uninit-value in arch_atomic_long_inc include/linux/atomic/atomic-long.h:161 [inline] BUG: KMSAN: uninit-value in atomic_long_inc include/linux/atomic/atomic-instrumented.h:1429 [inline] BUG: KMSAN: uninit-value in __ip6_make_skb+0x2f37/0x30f0 net/ipv6/ip6_output.c:1956 arch_atomic64_inc arch/x86/include/asm/atomic64_64.h:88 [inline] arch_atomic_long_inc include/linux/atomic/atomic-long.h:161 [inline] atomic_long_inc include/linux/atomic/atomic-instrumented.h:1429 [inline] __ip6_make_skb+0x2f37/0x30f0 net/ipv6/ip6_output.c:1956 ip6_finish_skb include/net/ipv6.h:1122 [inline] ip6_push_pending_frames+0x10e/0x550 net/ipv6/ip6_output.c:1987 rawv6_push_pending_frames+0xb12/0xb90 net/ipv6/raw.c:579 rawv6_sendmsg+0x297e/0x2e60 net/ipv6/raw.c:922 inet_sendmsg+0x101/0x180 net/ipv4/af_inet.c:827 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg net/socket.c:734 [inline] ____sys_sendmsg+0xa8e/0xe70 net/socket.c:2476 ___sys_sendmsg+0x2a1/0x3f0 net/socket.c:2530 __sys_sendmsg net/socket.c:2559 [inline] __do_sys_sendmsg net/socket.c:2568 [inline] __se_sys_sendmsg net/socket.c:2566 [inline] __x64_sys_sendmsg+0x367/0x540 net/socket.c:2566 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 Uninit was created at: slab_post_alloc_hook mm/slab.h:766 [inline] slab_alloc_node mm/slub.c:3452 [inline] __kmem_cache_alloc_node+0x71f/0xce0 mm/slub.c:3491 __do_kmalloc_node mm/slab_common.c:967 [inline] __kmalloc_node_track_caller+0x114/0x3b0 mm/slab_common.c:988 kmalloc_reserve net/core/skbuff.c:492 [inline] __alloc_skb+0x3af/0x8f0 net/core/skbuff.c:565 alloc_skb include/linux/skbuff.h:1270 [inline] __ip6_append_data+0x51c1/0x6bb0 net/ipv6/ip6_output.c:1684 ip6_append_data+0x411/0x580 net/ipv6/ip6_output.c:1854 rawv6_sendmsg+0x2882/0x2e60 net/ipv6/raw.c:915 inet_sendmsg+0x101/0x180 net/ipv4/af_inet.c:827 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg net/socket.c:734 [inline] ____sys_sendmsg+0xa8e/0xe70 net/socket.c:2476 ___sys_sendmsg+0x2a1/0x3f0 net/socket.c:2530 __sys_sendmsg net/socket.c:2559 [inline] __do_sys_sendmsg net/socket.c:2568 [inline] __se_sys_sendmsg net/socket.c:2566 [inline] __x64_sys_sendmsg+0x367/0x540 net/socket.c:2566 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 It is because icmp6hdr does not in skb linear region under the scenario of SOCK_RAW socket. Access icmp6_hdr(skb)->icmp6_type directly will trigger the uninit variable access bug. Use a local variable icmp6_type to carry the correct value in different scenarios. Fixes: 14878f75abd5 ("[IPV6]: Add ICMPMsgStats MIB (RFC 4293) [rev 2]") Reported-by: syzbot+8257f4dcef79de670baf@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=3d605ec1d0a7f2a269a1a6936ac7f2b85975ee9c Signed-off-by: Ziyang Xuan Signed-off-by: David S. Miller commit 839349d13905927d8a567ca4d21d88c82028e31d Author: Sricharan Ramabadhran Date: Mon Apr 3 12:28:51 2023 +0530 net: qrtr: Do not do DEL_SERVER broadcast after DEL_CLIENT On the remote side, when QRTR socket is removed, af_qrtr will call qrtr_port_remove() which broadcasts the DEL_CLIENT packet to all neighbours including local NS. NS upon receiving the DEL_CLIENT packet, will remove the lookups associated with the node:port and broadcasts the DEL_SERVER packet. But on the host side, due to the arrival of the DEL_CLIENT packet, the NS would've already deleted the server belonging to that port. So when the remote's NS again broadcasts the DEL_SERVER for that port, it throws below error message on the host: "failed while handling packet from 2:-2" So fix this error by not broadcasting the DEL_SERVER packet when the DEL_CLIENT packet gets processed." Fixes: 0c2204a4ad71 ("net: qrtr: Migrate nameservice to kernel from userspace") Reviewed-by: Manivannan Sadhasivam Signed-off-by: Ram Kumar Dharuman Signed-off-by: Sricharan Ramabadhran Signed-off-by: David S. Miller commit ad651d68cee75e9ac20002254c4e5d09ee67a84b Author: Daniel Golle Date: Sun Apr 2 12:44:37 2023 +0100 net: sfp: add quirk enabling 2500Base-x for HG MXPD-483II The HG MXPD-483II 1310nm SFP module is meant to operate with 2500Base-X, however, in their EEPROM they incorrectly specify: Transceiver type : Ethernet: 1000BASE-LX ... BR, Nominal : 2600MBd Use sfp_quirk_2500basex for this module to allow 2500Base-X mode anyway. https://forum.banana-pi.org/t/bpi-r3-sfp-module-compatibility/14573/60 Reported-by: chowtom Tested-by: chowtom Signed-off-by: Daniel Golle Reviewed-by: Russell King (Oracle) Signed-off-by: David S. Miller commit dc3421560a67361442f33ec962fc6dd48895a0df 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.] (cherry picked from commit b3e70051879c665acdd3a1ab50d0ed58d6a8001f) Signed-off-by: Jani Nikula commit dc30c011469165d57af9adac5baff7d767d20e5c 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.] (cherry picked from commit 49f6f6483b652108bcb73accd0204a464b922395) Signed-off-by: Jani Nikula commit 95d939bb97ff9be101ae4ceeb322535589da2190 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 (cherry picked from commit ea1deabc6f11575eb3375b454457eaa3c9837abc) Signed-off-by: Jani Nikula commit c74237496fbc799257b091179dd01a3200f7314d 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 (cherry picked from commit cdf7911f7dbcb37228409a63bf75630776c45a15) Signed-off-by: Jani Nikula commit f1b17f429f066f920a6a1056332e66f8a5b92256 Author: Matthew Auld Date: Mon Jan 30 12:06:31 2023 +0000 drm/i915/ttm: fix sparse warning Sparse complains with: drivers/gpu/drm/i915/gem/i915_gem_ttm.c:1066:21: sparse: expected restricted vm_fault_t [assigned] [usertype] ret drivers/gpu/drm/i915/gem/i915_gem_ttm.c:1066:21: sparse: got int Fixes: 516198d317d8 ("drm/i915: audit bo->resource usage v3") Reported-by: kernel test robot Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20230130101230.25347-1-matthew.auld@intel.com Reviewed-by: Nirmoy Das Acked-by: Christian König Signed-off-by: Christian König (cherry picked from commit fde789e8339c60c8c58e5a71fa819fcfe52d839e) Signed-off-by: Jani Nikula commit 764a2ab9eb56e1200083e771aab16186836edf1d Author: Boris Brezillon Date: Fri May 21 11:38:11 2021 +0200 drm/panfrost: Fix the panfrost_mmu_map_fault_addr() error path Make sure all bo->base.pages entries are either NULL or pointing to a valid page before calling drm_gem_shmem_put_pages(). Reported-by: Tomeu Vizoso Cc: Fixes: 187d2929206e ("drm/panfrost: Add support for GPU heap allocations") Signed-off-by: Boris Brezillon Reviewed-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20210521093811.1018992-1-boris.brezillon@collabora.com commit dc8289f912387c3bcfbc5d2db29c8947fa207c11 Author: Namjae Jeon Date: Sat Apr 1 13:21:04 2023 +0900 ksmbd: fix slab-out-of-bounds in init_smb2_rsp_hdr When smb1 mount fails, KASAN detect slab-out-of-bounds in init_smb2_rsp_hdr like the following one. For smb1 negotiate(56bytes) , init_smb2_rsp_hdr() for smb2 is called. The issue occurs while handling smb1 negotiate as smb2 server operations. Add smb server operations for smb1 (get_cmd_val, init_rsp_hdr, allocate_rsp_buf, check_user_session) to handle smb1 negotiate so that smb2 server operation does not handle it. [ 411.400423] CIFS: VFS: Use of the less secure dialect vers=1.0 is not recommended unless required for access to very old servers [ 411.400452] CIFS: Attempting to mount \\192.168.45.139\homes [ 411.479312] ksmbd: init_smb2_rsp_hdr : 492 [ 411.479323] ================================================================== [ 411.479327] BUG: KASAN: slab-out-of-bounds in init_smb2_rsp_hdr+0x1e2/0x1f4 [ksmbd] [ 411.479369] Read of size 16 at addr ffff888488ed0734 by task kworker/14:1/199 [ 411.479379] CPU: 14 PID: 199 Comm: kworker/14:1 Tainted: G OE 6.1.21 #3 [ 411.479386] Hardware name: ASUSTeK COMPUTER INC. Z10PA-D8 Series/Z10PA-D8 Series, BIOS 3801 08/23/2019 [ 411.479390] Workqueue: ksmbd-io handle_ksmbd_work [ksmbd] [ 411.479425] Call Trace: [ 411.479428] [ 411.479432] dump_stack_lvl+0x49/0x63 [ 411.479444] print_report+0x171/0x4a8 [ 411.479452] ? kasan_complete_mode_report_info+0x3c/0x200 [ 411.479463] ? init_smb2_rsp_hdr+0x1e2/0x1f4 [ksmbd] [ 411.479497] kasan_report+0xb4/0x130 [ 411.479503] ? init_smb2_rsp_hdr+0x1e2/0x1f4 [ksmbd] [ 411.479537] kasan_check_range+0x149/0x1e0 [ 411.479543] memcpy+0x24/0x70 [ 411.479550] init_smb2_rsp_hdr+0x1e2/0x1f4 [ksmbd] [ 411.479585] handle_ksmbd_work+0x109/0x760 [ksmbd] [ 411.479616] ? _raw_spin_unlock_irqrestore+0x50/0x50 [ 411.479624] ? smb3_encrypt_resp+0x340/0x340 [ksmbd] [ 411.479656] process_one_work+0x49c/0x790 [ 411.479667] worker_thread+0x2b1/0x6e0 [ 411.479674] ? process_one_work+0x790/0x790 [ 411.479680] kthread+0x177/0x1b0 [ 411.479686] ? kthread_complete_and_exit+0x30/0x30 [ 411.479692] ret_from_fork+0x22/0x30 [ 411.479702] Fixes: 39b291b86b59 ("ksmbd: return unsupported error on smb1 mount") Cc: stable@vger.kernel.org Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 3a9b557f44ea8f216aab515a7db20e23f0eb51b9 Author: Namjae Jeon Date: Fri Mar 31 08:42:12 2023 +0900 ksmbd: delete asynchronous work from list When smb2_lock request is canceled by smb2_cancel or smb2_close(), ksmbd is missing deleting async_request_entry async_requests list. Because calling init_smb2_rsp_hdr() in smb2_lock() mark ->synchronous as true and then it will not be deleted in ksmbd_conn_try_dequeue_request(). This patch add release_async_work() to release the ones allocated for async work. Cc: stable@vger.kernel.org Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 48b19b79cfa37b1e50da3b5a8af529f994c08901 Author: Zhong Jinghua Date: Wed Mar 29 15:17:39 2023 +0800 scsi: iscsi_tcp: Check that sock is valid before iscsi_set_param() The validity of sock should be checked before assignment to avoid incorrect values. Commit 57569c37f0ad ("scsi: iscsi: iscsi_tcp: Fix null-ptr-deref while calling getpeername()") introduced this change which may lead to inconsistent values of tcp_sw_conn->sendpage and conn->datadgst_en. Fix the issue by moving the position of the assignment. Fixes: 57569c37f0ad ("scsi: iscsi: iscsi_tcp: Fix null-ptr-deref while calling getpeername()") Signed-off-by: Zhong Jinghua Link: https://lore.kernel.org/r/20230329071739.2175268-1-zhongjinghua@huaweicloud.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen commit 85ade4010e13ef152ea925c74d94253db92e5428 Author: Li Zetao Date: Sat Mar 25 11:00:04 2023 +0000 scsi: qla2xxx: Fix memory leak in qla2x00_probe_one() There is a memory leak reported by kmemleak: unreferenced object 0xffffc900003f0000 (size 12288): comm "modprobe", pid 19117, jiffies 4299751452 (age 42490.264s) 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: [<00000000629261a8>] __vmalloc_node_range+0xe56/0x1110 [<0000000001906886>] __vmalloc_node+0xbd/0x150 [<000000005bb4dc34>] vmalloc+0x25/0x30 [<00000000a2dc1194>] qla2x00_create_host+0x7a0/0xe30 [qla2xxx] [<0000000062b14b47>] qla2x00_probe_one+0x2eb8/0xd160 [qla2xxx] [<00000000641ccc04>] local_pci_probe+0xeb/0x1a0 The root cause is traced to an error-handling path in qla2x00_probe_one() when the adapter "base_vha" initialize failed. The fab_scan_rp "scan.l" is used to record the port information and it is allocated in qla2x00_create_host(). However, it is not released in the error handling path "probe_failed". Fix this by freeing the memory of "scan.l" when an error occurs in the adapter initialization process. Fixes: a4239945b8ad ("scsi: qla2xxx: Add switch command to simplify fabric discovery") Signed-off-by: Li Zetao Link: https://lore.kernel.org/r/20230325110004.363898-1-lizetao1@huawei.com Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit a3d27dfdcfc27ac3f46de5391bb6d24f04af7941 Author: Ranjan Kumar Date: Fri Mar 31 17:53:17 2023 +0530 scsi: mpi3mr: Handle soft reset in progress fault code (0xF002) The driver is exiting from the fault watchdog thread if it sees the 0xF002 (Soft reset in progress) fault code. If the driver initiates the soft reset, then the driver restarts the watchdog at the end of the soft reset completion. However, if the soft reset is initiated by the firmware asynchronously, then the driver will never restart the watchdog and never re-initialize the controller after the asynchronous soft reset completion. Signed-off-by: Ranjan Kumar Link: https://lore.kernel.org/r/20230331122317.11391-1-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen commit 86eb94bf8006a85738f0ccf49e3ce894e03922a6 Author: Adrien Thierry Date: Wed Mar 29 16:54:25 2023 -0400 scsi: Revert "scsi: ufs: core: Initialize devfreq synchronously" This reverts commit 7dafc3e007918384c8693ff8d70381b5c1e9c247. This patch introduced a regression [1] where hba->pwr_info is used before being initialized, which could create issues in ufshcd_scale_gear(). Revert it until a better solution is found. [1] https://lore.kernel.org/all/CAGaU9a_PMZhqv+YJ0r3w-hJMsR922oxW6Kg59vw+oen-NZ6Otw@mail.gmail.com Signed-off-by: Adrien Thierry Link: https://lore.kernel.org/r/20230329205426.46393-1-athierry@redhat.com Reviewed-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 347dca97f75d461ac2ac256b68e495dfc6f14d61 Author: Eric Van Hensbergen Date: Wed Mar 29 00:07:30 2023 +0000 Update email address and mailing list for v9fs We've recently moved the mailing list to lists.linux.dev to move away from the sourceforge infrastructure. This also updates the website from the (no longer v9fs relevant?) swik.net address to the github group which contains pointers to test cases, the protocol, servers, etc. This also changes my email from my gmail to my kernel.org address. Signed-off-by: Eric Van Hensbergen Acked-by: Dominique Martinet Acked-by: Christian Schoenebeck commit 7e364e56293bb98cae1b55fd835f5991c4e96e7d Author: Linus Torvalds Date: Sun Apr 2 14:29:29 2023 -0700 Linux 6.3-rc5 commit 6ab608fe852b50fe809b22cdf7db6cbe006d7cb3 Merge: f95b8ea79c47c 2280d425ba359 Author: Linus Torvalds Date: Sun Apr 2 10:57:12 2023 -0700 Merge tag 'for-6.3-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - scan block devices in non-exclusive mode to avoid temporary mkfs failures - fix race between quota disable and quota assign ioctls - fix deadlock when aborting transaction during relocation with scrub - ignore fiemap path cache when there are multiple paths for a node * tag 'for-6.3-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: ignore fiemap path cache when there are multiple paths for a node btrfs: fix deadlock when aborting transaction during relocation with scrub btrfs: scan device in non-exclusive mode btrfs: fix race between quota disable and quota assign ioctls commit f95b8ea79c47c0ad3d18f45ad538f9970e414d1f Author: Javier Martinez Canillas Date: Tue Feb 7 11:22:54 2023 +0100 Revert "venus: firmware: Correct non-pix start and end addresses" This reverts commit a837e5161cff, which broke probing of the venus driver, at least on the SC7180 SoC HP X2 Chromebook: qcom-venus aa00000.video-codec: Adding to iommu group 11 qcom-venus aa00000.video-codec: non legacy binding qcom-venus aa00000.video-codec: failed to reset venus core 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: Linus Torvalds commit a10ca0950afe36fa5a20e8fc3e843beef8808fc1 Merge: 95d0b9d89d78e 5c2712387d485 Author: Linus Torvalds Date: Sun Apr 2 10:10:16 2023 -0700 Merge tag 'driver-core-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are three small changes for 6.3-rc5 semi-related to driver core stuff: - documentation update where we move the security_bugs file to a more relevant location. - mdt/spi-nor debugfs memory leak fix that's been floating around for a long time and acked by the maintainer - cacheinfo bugfix for a regression in 6.3-rc1 All have been in linux-next with no reported problems" * tag 'driver-core-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: cacheinfo: Fix LLC is not exported through sysfs Documentation/security-bugs: move from admin-guide/ to process/ mtd: spi-nor: fix memory leak when using debugfs_lookup() commit 95d0b9d89d78e0983d4feb012b0f12d13d1ae19a Merge: f7772da66255a eca9f6e6f83b6 Author: Linus Torvalds Date: Sun Apr 2 10:01:56 2023 -0700 Merge tag 'powerpc-6.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fix a false positive warning in __pte_needs_flush() (with DEBUG_VM=y) - Fix oops when a PF_IO_WORKER thread tries to core dump - Don't try to reconfigure VAS when it's disabled Thanks to Benjamin Gray, Haren Myneni, Jens Axboe, Nathan Lynch, and Russell Currey. * tag 'powerpc-6.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/pseries/vas: Ignore VAS update for DLPAR if copy/paste is not enabled powerpc: Don't try to copy PPR for task with NULL pt_regs powerpc/64s: Fix __pte_needs_flush() false positive warning commit 2584024b23552c00d95b50255e47bd18d306d31a Author: Xin Long Date: Sat Apr 1 19:09:57 2023 -0400 sctp: check send stream number after wait_for_sndbuf This patch fixes a corner case where the asoc out stream count may change after wait_for_sndbuf. When the main thread in the client starts a connection, if its out stream count is set to N while the in stream count in the server is set to N - 2, another thread in the client keeps sending the msgs with stream number N - 1, and waits for sndbuf before processing INIT_ACK. However, after processing INIT_ACK, the out stream count in the client is shrunk to N - 2, the same to the in stream count in the server. The crash occurs when the thread waiting for sndbuf is awake and sends the msg in a non-existing stream(N - 1), the call trace is as below: KASAN: null-ptr-deref in range [0x0000000000000038-0x000000000000003f] Call Trace: sctp_cmd_send_msg net/sctp/sm_sideeffect.c:1114 [inline] sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1777 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1199 [inline] sctp_do_sm+0x197d/0x5310 net/sctp/sm_sideeffect.c:1170 sctp_primitive_SEND+0x9f/0xc0 net/sctp/primitive.c:163 sctp_sendmsg_to_asoc+0x10eb/0x1a30 net/sctp/socket.c:1868 sctp_sendmsg+0x8d4/0x1d90 net/sctp/socket.c:2026 inet_sendmsg+0x9d/0xe0 net/ipv4/af_inet.c:825 sock_sendmsg_nosec net/socket.c:722 [inline] sock_sendmsg+0xde/0x190 net/socket.c:745 The fix is to add an unlikely check for the send stream number after the thread wakes up from the wait_for_sndbuf. Fixes: 5bbbbe32a431 ("sctp: introduce stream scheduler foundations") Reported-by: syzbot+47c24ca20a2fa01f082e@syzkaller.appspotmail.com Signed-off-by: Xin Long Signed-off-by: David S. Miller commit e669ce46740a9815953bb4452a6bc5a7fdc21a50 Author: Felix Fietkau Date: Fri Mar 31 14:49:59 2023 +0200 net: ethernet: mtk_eth_soc: fix remaining throughput regression Based on further tests, it seems that the QDMA shaper is not able to perform shaping close to the MAC link rate without throughput loss. This cannot be compensated by increasing the shaping rate, so it seems to be an internal limit. Fix the remaining throughput regression by detecting that condition and limiting shaping to ports with lower link speed. This patch intentionally ignores link speed gain from TRGMII, because even on such links, shaping to 1000 Mbit/s incurs some throughput degradation. Fixes: f63959c7eec3 ("net: ethernet: mtk_eth_soc: implement multi-queue support for per-port queues") Tested-By: Frank Wunderlich Reported-by: Frank Wunderlich Signed-off-by: Felix Fietkau Signed-off-by: David S. Miller commit 089b91a0155c4de1209a07ff2a7dd299ff3ece47 Author: Gustav Ekelund Date: Fri Mar 31 10:40:13 2023 +0200 net: dsa: mv88e6xxx: Reset mv88e6393x force WD event bit The force watchdog event bit is not cleared during SW reset in the mv88e6393x switch. This is a different behavior compared to mv886390 which clears the force WD event bit as advertised. This causes a force WD event to be handled over and over again as the SW reset following the event never clears the force WD event bit. Explicitly clear the watchdog event register to 0 in irq_action when handling an event to prevent the switch from sending continuous interrupts. Marvell aren't aware of any other stuck bits apart from the force WD bit. Fixes: de776d0d316f ("net: dsa: mv88e6xxx: add support for mv88e6393x family" Signed-off-by: Gustav Ekelund Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 275b471e3d2daf1472ae8fa70dc1b50c9e0b9e75 Author: Jakub Kicinski Date: Thu Mar 30 19:21:44 2023 -0700 net: don't let netpoll invoke NAPI if in xmit context Commit 0db3dc73f7a3 ("[NETPOLL]: tx lock deadlock fix") narrowed down the region under netif_tx_trylock() inside netpoll_send_skb(). (At that point in time netif_tx_trylock() would lock all queues of the device.) Taking the tx lock was problematic because driver's cleanup method may take the same lock. So the change made us hold the xmit lock only around xmit, and expected the driver to take care of locking within ->ndo_poll_controller(). Unfortunately this only works if netpoll isn't itself called with the xmit lock already held. Netpoll code is careful and uses trylock(). The drivers, however, may be using plain lock(). Printing while holding the xmit lock is going to result in rare deadlocks. Luckily we record the xmit lock owners, so we can scan all the queues, the same way we scan NAPI owners. If any of the xmit locks is held by the local CPU we better not attempt any polling. It would be nice if we could narrow down the check to only the NAPIs and the queue we're trying to use. I don't see a way to do that now. Reported-by: Roman Gushchin Fixes: 0db3dc73f7a3 ("[NETPOLL]: tx lock deadlock fix") Signed-off-by: Jakub Kicinski Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit ea4f1009408efb4989a0f139b70fb338e7f687d0 Author: Zheng Wang Date: Mon Mar 13 22:43:25 2023 +0800 9p/xen : Fix use after free bug in xen_9pfs_front_remove due to race condition In xen_9pfs_front_probe, it calls xen_9pfs_front_alloc_dataring to init priv->rings and bound &ring->work with p9_xen_response. When it calls xen_9pfs_front_event_handler to handle IRQ requests, it will finally call schedule_work to start the work. When we call xen_9pfs_front_remove to remove the driver, there may be a sequence as follows: Fix it by finishing the work before cleanup in xen_9pfs_front_free. Note that, this bug is found by static analysis, which might be false positive. CPU0 CPU1 |p9_xen_response xen_9pfs_front_remove| xen_9pfs_front_free| kfree(priv) | //free priv | |p9_tag_lookup |//use priv->client Fixes: 71ebd71921e4 ("xen/9pfs: connect to the backend") Signed-off-by: Zheng Wang Reviewed-by: Michal Swiatkowski Signed-off-by: Eric Van Hensbergen commit b4a72c0589fdea6259720375426179888969d6a2 Author: Wojciech Lukowicz Date: Sat Apr 1 20:50:39 2023 +0100 io_uring: fix memory leak when removing provided buffers When removing provided buffers, io_buffer structs are not being disposed of, leading to a memory leak. They can't be freed individually, because they are allocated in page-sized groups. They need to be added to some free list instead, such as io_buffers_cache. All callers already hold the lock protecting it, apart from when destroying buffers, so had to extend the lock there. Fixes: cc3cec8367cb ("io_uring: speedup provided buffer handling") Signed-off-by: Wojciech Lukowicz Link: https://lore.kernel.org/r/20230401195039.404909-2-wlukowicz01@gmail.com Signed-off-by: Jens Axboe commit c0921e51dab767ef5adf6175c4a0ba3c6e1074a3 Author: Wojciech Lukowicz Date: Sat Apr 1 20:50:38 2023 +0100 io_uring: fix return value when removing provided buffers When a request to remove buffers is submitted, and the given number to be removed is larger than available in the specified buffer group, the resulting CQE result will be the number of removed buffers + 1, which is 1 more than it should be. Previously, the head was part of the list and it got removed after the loop, so the increment was needed. Now, the head is not an element of the list, so the increment shouldn't be there anymore. Fixes: dbc7d452e7cf ("io_uring: manage provided buffers strictly ordered") Signed-off-by: Wojciech Lukowicz Link: https://lore.kernel.org/r/20230401195039.404909-2-wlukowicz01@gmail.com Signed-off-by: Jens Axboe commit f7772da66255ab2b478a33df404a335fab55cc25 Merge: 00c7b5f4ddc5b e03677100707f Author: Linus Torvalds Date: Sat Apr 1 14:50:22 2023 -0700 Merge tag '6.3-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs client fixes from Steve French: "Four cifs/smb3 client (reconnect and DFS related) fixes, including two for stable: - DFS oops fix - DFS reconnect recursion fix - An SMB1 parallel reconnect fix - Trivial dead code removal in smb2_reconnect" * tag '6.3-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: get rid of dead check in smb2_reconnect() cifs: prevent infinite recursion in CIFSGetDFSRefer() cifs: avoid races in parallel reconnects in smb1 cifs: fix DFS traversal oops without CONFIG_CIFS_DFS_UPCALL commit 00c7b5f4ddc5b346df62b757ec73f9357bb452af Merge: 93e2b01740863 cbedf1a33970c Author: Linus Torvalds Date: Sat Apr 1 14:09:51 2023 -0700 Merge tag 'input-for-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: - fixes to ALPS and Focaltech PS/2 drivers dealing with the breakage of switching to -funsigned-char - quirks to i8042 to better handle Lifebook A574/H and TUXEDO devices - a quirk to Goodix touchscreen driver to handle Yoga Book X90F - a fix for incorrectly merged patch to xpad game controller driver * tag 'input-for-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: i8042 - add TUXEDO devices to i8042 quirk tables for partial fix Input: alps - fix compatibility with -funsigned-char Input: focaltech - use explicitly signed char type Input: xpad - fix incorrectly applied patch for MAP_PROFILE_BUTTON Input: goodix - add Lenovo Yoga Book X90F to nine_bytes_report DMI table Input: i8042 - add quirk for Fujitsu Lifebook A574/H commit 93e2b01740863cf2f4a58887ac1384e6324b50a2 Merge: ce0c2375ff567 e4056e38ec87b Author: Linus Torvalds Date: Sat Apr 1 09:47:08 2023 -0700 Merge tag 'pinctrl-v6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "Some pin control fixes for the v6.3 series. The most notable and urgent one is probably the AMD fix which affects AMD laptops, found by the Chromium people. Summary: - Fix up the Kconfig options for MediaTek MT7981 - Fix the irq domain name in the AT91-PIO4 driver - Fix some alternative muxing modes in the Ocelot driver - Allocate the GPIO numbers dynamically in the STM32 driver - Disable and mask interrupts on resume in the AMD driver - Fix a typo in the Qualcomm SM8550 pin control device tree bindings" * tag 'pinctrl-v6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: dt-bindings: pinctrl: qcom,sm8550-lpass-lpi: allow input-enabled and bias-bus-hold pinctrl: amd: Disable and mask interrupts on resume pinctrl: stm32: use dynamic allocation of GPIO base pinctrl: ocelot: Fix alt mode for ocelot pinctrl: at91-pio4: fix domain name assignment pinctrl: mediatek: fix naming inconsistency pinctrl: mediatek: add missing options to PINCTRL_MT7981 commit ce0c2375ff56781ee26d9ad6b4cb40d85e0a9ebd Merge: 92367fdf3b699 fb27e70f6e408 Author: Linus Torvalds Date: Sat Apr 1 09:25:17 2023 -0700 Merge tag 'kbuild-fixes-v6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Fix linux-headers debian package - Fix a merge_config.sh error due to a misspelled variable - Fix modversion for 32-bit build machines * tag 'kbuild-fixes-v6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: modpost: Fix processing of CRCs on 32-bit build machines scripts: merge_config: Fix typo in variable name. kbuild: deb-pkg: set version for linux-headers paths commit 92367fdf3b699e97acb4d5fbf7159f5c458b2b30 Merge: 7b50567bdcad8 16812c96550c3 Author: Linus Torvalds Date: Sat Apr 1 09:17:33 2023 -0700 Merge tag 'iommu-fixes-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu fixes from Joerg Roedel: - Maintainer update for S390 IOMMU driver - A fix for the set_platform_dma_ops() call-back in the Exynos IOMMU driver - Intel VT-d fixes from Lu Baolu: - Fix a lockdep splat - Fix a supplement of the specification - Fix a warning in perfmon code * tag 'iommu-fixes-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/vt-d: Fix an IOMMU perfmon warning when CPU hotplug iommu/vt-d: Allow zero SAGAW if second-stage not supported iommu/vt-d: Remove unnecessary locking in intel_irq_remapping_alloc() iommu/exynos: Fix set_platform_dma_ops() callback MAINTAINERS: Update s390-iommu driver maintainer information commit f785f5ee968f7045268b8be6b0abc850c4a4277c Author: Takashi Iwai Date: Fri Mar 31 16:22:17 2023 +0200 ALSA: hda/hdmi: Preserve the previous PCM device upon re-enablement When a DRM driver turns on or off the screen with the audio capability, it notifies the ELD to HD-audio HDMI codec driver via component ops. HDMI codec driver, in turn, attaches or detaches the PCM stream for the given port on the fly. The problem is that, since the recent code change, the HDMI driver always treats the PCM stream assignment dynamically; this ended up the confusion of the PCM device appearance. e.g. when a screen goes once off and on again, it may appear on a different PCM device before the screen-off. Although the application should treat such a change, it doesn't seem working gracefully with the current pipewire (maybe PulseAudio, too). As a workaround, this patch changes the HDMI codec driver behavior slightly to be more consistent. Now it remembers the previous PCM slot for the given port and try to assign to it. That is, if a port is re-enabled, the driver tries to use the same PCM slot that was assigned to that port previously. If it conflicts, a new slot is searched and used like before, instead. Note that multiple monitor connections are the only typical case where the PCM slot preservation is effective. As long as only a single monitor is connected, the behavior isn't changed, and the first PCM slot is still assigned always. Fixes: ef6f5494faf6 ("ALSA: hda/hdmi: Use only dynamic PCM device allocation") Reviewed-by: Jaroslav Kysela Link: https://bugzilla.kernel.org/show_bug.cgi?id=217259 Link: https://lore.kernel.org/r/20230331142217.19791-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit ffef73791574b8da872cfbf881d8e3e9955fc130 Author: Liang He Date: Wed Mar 22 11:56:27 2023 +0800 iio: dac: ad5755: Add missing fwnode_handle_put() In ad5755_parse_fw(), 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: 3ac27afefd5d ("iio:dac:ad5755: Switch to generic firmware properties and drop pdata") Signed-off-by: Liang He Link: https://lore.kernel.org/r/20230322035627.1856421-1-windhl@126.com Cc: Signed-off-by: Jonathan Cameron commit 73a428b37b9b538f8f8fe61caa45e7f243bab87c Author: Dan Carpenter Date: Wed Mar 29 07:35:32 2023 +0300 iio: adc: at91-sama5d2_adc: fix an error code in at91_adc_allocate_trigger() The at91_adc_allocate_trigger() function is supposed to return error pointers. Returning a NULL will cause an Oops. Fixes: 5e1a1da0f8c9 ("iio: adc: at91-sama5d2_adc: add hw trigger and buffer support") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/5d728f9d-31d1-410d-a0b3-df6a63a2c8ba@kili.mountain Signed-off-by: Jonathan Cameron commit 7d63b67125382ff0ffdfca434acbc94a38bd092b Author: Eric Dumazet Date: Thu Mar 30 17:45:02 2023 +0000 icmp: guard against too small mtu syzbot was able to trigger a panic [1] in icmp_glue_bits(), or more exactly in skb_copy_and_csum_bits() There is no repro yet, but I think the issue is that syzbot manages to lower device mtu to a small value, fooling __icmp_send() __icmp_send() must make sure there is enough room for the packet to include at least the headers. We might in the future refactor skb_copy_and_csum_bits() and its callers to no longer crash when something bad happens. [1] kernel BUG at net/core/skbuff.c:3343 ! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 15766 Comm: syz-executor.0 Not tainted 6.3.0-rc4-syzkaller-00039-gffe78bbd5121 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 RIP: 0010:skb_copy_and_csum_bits+0x798/0x860 net/core/skbuff.c:3343 Code: f0 c1 c8 08 41 89 c6 e9 73 ff ff ff e8 61 48 d4 f9 e9 41 fd ff ff 48 8b 7c 24 48 e8 52 48 d4 f9 e9 c3 fc ff ff e8 c8 27 84 f9 <0f> 0b 48 89 44 24 28 e8 3c 48 d4 f9 48 8b 44 24 28 e9 9d fb ff ff RSP: 0018:ffffc90000007620 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 00000000000001e8 RCX: 0000000000000100 RDX: ffff8880276f6280 RSI: ffffffff87fdd138 RDI: 0000000000000005 RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000000 R10: 00000000000001e8 R11: 0000000000000001 R12: 000000000000003c R13: 0000000000000000 R14: ffff888028244868 R15: 0000000000000b0e FS: 00007fbc81f1c700(0000) GS:ffff88802ca00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b2df43000 CR3: 00000000744db000 CR4: 0000000000150ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: icmp_glue_bits+0x7b/0x210 net/ipv4/icmp.c:353 __ip_append_data+0x1d1b/0x39f0 net/ipv4/ip_output.c:1161 ip_append_data net/ipv4/ip_output.c:1343 [inline] ip_append_data+0x115/0x1a0 net/ipv4/ip_output.c:1322 icmp_push_reply+0xa8/0x440 net/ipv4/icmp.c:370 __icmp_send+0xb80/0x1430 net/ipv4/icmp.c:765 ipv4_send_dest_unreach net/ipv4/route.c:1239 [inline] ipv4_link_failure+0x5a9/0x9e0 net/ipv4/route.c:1246 dst_link_failure include/net/dst.h:423 [inline] arp_error_report+0xcb/0x1c0 net/ipv4/arp.c:296 neigh_invalidate+0x20d/0x560 net/core/neighbour.c:1079 neigh_timer_handler+0xc77/0xff0 net/core/neighbour.c:1166 call_timer_fn+0x1a0/0x580 kernel/time/timer.c:1700 expire_timers+0x29b/0x4b0 kernel/time/timer.c:1751 __run_timers kernel/time/timer.c:2022 [inline] Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot+d373d60fddbdc915e666@syzkaller.appspotmail.com Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20230330174502.1915328-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit adef41b03b35839e5677aace628d02597f04a616 Author: Jakub Kicinski Date: Fri Mar 31 21:16:22 2023 -0700 Revert "net: netcp: MAX_SKB_FRAGS is now 'int'" This reverts commit c5b959eeb7f9e40673b97c08c71cbfff5f5923f2. Reverted change is required after commit 3948b05950fd ("net: introduce a config option to tweak MAX_SKB_FRAGS") which does not exist in this tree, yet. It's only present in -next trees at the time of writing. Reported-by: Nathan Chancellor Link: https://lore.kernel.org/all/20230331214444.GA1426512@dev-arch.thelio-3990X/ Signed-off-by: Jakub Kicinski commit 7f67aa097e875c87fba024e850cf405342300059 Author: Karol Herbst Date: Fri Mar 31 00:39:38 2023 +0200 drm/nouveau/disp: Support more modes by checking with lower bpc This allows us to advertise more modes especially on HDR displays. Fixes using 4K@60 modes on my TV and main display both using a HDMI to DP adapter. Also fixes similar issues for users running into this. Cc: stable@vger.kernel.org # 5.10+ Signed-off-by: Karol Herbst Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20230330223938.4025569-1-kherbst@redhat.com commit 7b50567bdcad8925ca1e075feb7171c12015afd1 Author: Arnd Bergmann Date: Tue Feb 7 17:13:12 2023 +0100 media: i2c: imx290: fix conditional function defintions 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 Reported-by: Guenter Roeck Reported-by: Sudip Mukherjee Reviewed-by: Manivannan Sadhasivam Reviewed-by: Laurent Pinchart Signed-off-by: Linus Torvalds commit 15a8b55dbb1ba154d82627547c5761cac884d810 Author: Jeff Layton Date: Mon Mar 27 06:21:37 2023 -0400 nfsd: call op_release, even when op_func returns an error For ops with "trivial" replies, nfsd4_encode_operation will shortcut most of the encoding work and skip to just marshalling up the status. One of the things it skips is calling op_release. This could cause a memory leak in the layoutget codepath if there is an error at an inopportune time. Have the compound processing engine always call op_release, even when op_func sets an error in op->status. With this change, we also need nfsd4_block_get_device_info_scsi to set the gd_device pointer to NULL on error to avoid a double free. Reported-by: Zhi Li Link: https://bugzilla.redhat.com/show_bug.cgi?id=2181403 Fixes: 34b1744c91cc ("nfsd4: define ->op_release for compound ops") Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 804d8e0a6e54427268790472781e03bc243f4ee3 Author: Chuck Lever Date: Fri Mar 31 16:31:19 2023 -0400 NFSD: Avoid calling OPDESC() with ops->opnum == OP_ILLEGAL OPDESC() simply indexes into nfsd4_ops[] by the op's operation number, without range checking that value. It assumes callers are careful to avoid calling it with an out-of-bounds opnum value. nfsd4_decode_compound() is not so careful, and can invoke OPDESC() with opnum set to OP_ILLEGAL, which is 10044 -- well beyond the end of nfsd4_ops[]. Reported-by: Jeff Layton Fixes: f4f9ef4a1b0a ("nfsd4: opdesc will be useful outside nfs4proc.c") Signed-off-by: Chuck Lever commit a0264d198aad19429df0ca2e320caf8b1f98ec64 Merge: 5a57b48fdfcb1 943d045a6d796 Author: Linus Torvalds Date: Fri Mar 31 13:22:14 2023 -0700 Merge tag 'nfs-for-6.3-3' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client fixes from Anna Schumaker: - Fix shutdown of NFS TCP client sockets - Fix hangs when recovering open state after a server reboot * tag 'nfs-for-6.3-3' of git://git.linux-nfs.org/projects/anna/linux-nfs: SUNRPC: fix shutdown of NFS TCP client socket NFSv4: Fix hangs when recovering open state after a server reboot commit 5a57b48fdfcb1e196292665d87fac46180344f8a Merge: 916fc60988545 e3271a5917d15 Author: Linus Torvalds Date: Fri Mar 31 13:11:06 2023 -0700 Merge tag 'platform-drivers-x86-v6.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Hans de Goede: - Fix a regression in ideapad-laptop which caused the touchpad to stop working after a suspend/resume on some models - One other small fix and three hw-id additions * tag 'platform-drivers-x86-v6.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: ideapad-laptop: Stop sending KEY_TOUCHPAD_TOGGLE platform/x86: asus-nb-wmi: Add quirk_asus_tablet_mode to other ROG Flow X13 models platform/x86: gigabyte-wmi: add support for X570S AORUS ELITE platform/x86: gigabyte-wmi: add support for B650 AORUS ELITE AX platform/x86/intel/pmc: Alder Lake PCH slp_s0_residency fix commit 916fc60988545499530104342a01df6357fd3647 Merge: 3df82e4201f54 cdce67099117e Author: Linus Torvalds Date: Fri Mar 31 13:07:01 2023 -0700 Merge tag 'pci-v6.3-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull PCI fix from Bjorn Helgaas: - Fix DesignWare PORT_LINK_CONTROL setup, which was corrupted when the DT "snps,enable-cdm-check" property was present (Yoshihiro Shimoda) * tag 'pci-v6.3-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: PCI: dwc: Fix PORT_LINK_CONTROL update when CDM check enabled commit 3df82e4201f5415f4773d4ca8f0ee5a71d5b88fa Merge: 81409e5e483cb 02bcba0b9f9da Author: Linus Torvalds Date: Fri Mar 31 13:02:34 2023 -0700 Merge tag 'regulator-fix-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fix from Mark Brown: "Deferred probe fix for v6.3. This fixes a rarely triggered issue where we would treat probe deferral for clocks as a fatal error in the fixed regulator, causing it to fail to retry when it should" * tag 'regulator-fix-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: Handle deferred clk commit 36d4d213c6d4fffae2645a601e8ae996de4c3645 Author: Jeremy Soller Date: Fri Mar 31 10:23:17 2023 -0600 ALSA: hda/realtek: Add quirk for Clevo X370SNW Fixes speaker output and headset detection on Clevo X370SNW. Signed-off-by: Jeremy Soller Signed-off-by: Tim Crawford Cc: Link: https://lore.kernel.org/r/20230331162317.14992-1-tcrawford@system76.com Signed-off-by: Takashi Iwai commit f43359501e2d70ba8a68f2302c1009d9194fc60d Merge: 9fdc1605c5042 e3720f92e0237 Author: Takashi Iwai Date: Fri Mar 31 21:37:02 2023 +0200 Merge tag 'asoc-fix-v6.3-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.3 More fixes for v6.3, plus a few new trivial device ID additions. Almost all of this is for the Intel drivers, though there is one core fix from Shengjiu which ensures that format constraints are correctly applied in some cases where they were missed. commit 81409e5e483cbdf6930e24c8556a289266fea39f Merge: f3fa7f026e5fa 24ab70d83784a Author: Linus Torvalds Date: Fri Mar 31 12:35:03 2023 -0700 Merge tag 'block-6.3-2023-03-30' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - NVMe pull request via Christoph: - Mark Lexar NM760 as IGNORE_DEV_SUBNQN (Juraj Pecigos) - Fix a possible UAF when failing to allocate an TCP io queue (Sagi Grimberg) - MD pull request via Song: - Fix a null pointer deference in 6.3-rc (Yu Kuai) - uevent partition fix (Alyssa) * tag 'block-6.3-2023-03-30' of git://git.kernel.dk/linux: nvme-tcp: fix a possible UAF when failing to allocate an io queue md: fix regression for null-ptr-deference in __md_stop() nvme-pci: mark Lexar NM760 as IGNORE_DEV_SUBNQN loop: LOOP_CONFIGURE: send uevents for partitions commit f3fa7f026e5faf10f730b0655b2f96f86d3c7dd8 Merge: 2bac7dc169af3 fd30d1cdcc4ff Author: Linus Torvalds Date: Fri Mar 31 12:30:13 2023 -0700 Merge tag 'io_uring-6.3-2023-03-30' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: - Fix a regression with the poll retry, introduced in this merge window (me) - Fix a regression with the alloc cache not decrementing the member count on removal. Also a regression from this merge window (Pavel) - Fix race around rsrc node grabbing (Pavel) * tag 'io_uring-6.3-2023-03-30' of git://git.kernel.dk/linux: io_uring: fix poll/netmsg alloc caches io_uring/rsrc: fix rogue rsrc node grabbing io_uring/poll: clear single/double poll flags on poll arming commit e3271a5917d1501089b1a224d702aa053e2877f4 Author: Hans de Goede Date: Thu Mar 30 21:46:44 2023 +0200 platform/x86: ideapad-laptop: Stop sending KEY_TOUCHPAD_TOGGLE Commit 5829f8a897e4 ("platform/x86: ideapad-laptop: Send KEY_TOUCHPAD_TOGGLE on some models") made ideapad-laptop send KEY_TOUCHPAD_TOGGLE when we receive an ACPI notify with VPC event bit 5 set and the touchpad-state has not been changed by the EC itself already. This was done under the assumption that this would be good to do to make the touchpad-toggle hotkey work on newer models where the EC does not toggle the touchpad on/off itself (because it is not routed through the PS/2 controller, but uses I2C). But it turns out that at least some models, e.g. the Yoga 7-15ITL5 the EC triggers an ACPI notify with VPC event bit 5 set on resume, which would now cause a spurious KEY_TOUCHPAD_TOGGLE on resume to which the desktop environment responds by disabling the touchpad in software, breaking the touchpad (until manually re-enabled) on resume. It was never confirmed that sending KEY_TOUCHPAD_TOGGLE actually improves things on new models and at least some new models like the Yoga 7-15ITL5 don't have a touchpad on/off toggle hotkey at all, while still sending ACPI notify events with VPC event bit 5 set. So it seems best to revert the change to send KEY_TOUCHPAD_TOGGLE when receiving an ACPI notify events with VPC event bit 5 and the touchpad state as reported by the EC has not changed. Note this is not a full revert the code to cache the last EC touchpad state is kept to avoid sending spurious KEY_TOUCHPAD_ON / _OFF events on resume. Fixes: 5829f8a897e4 ("platform/x86: ideapad-laptop: Send KEY_TOUCHPAD_TOGGLE on some models") Link: https://bugzilla.kernel.org/show_bug.cgi?id=217234 Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230330194644.64628-1-hdegoede@redhat.com commit e352d685fde427a8fc9beb2ba30888f5d6f2e5e6 Author: weiliang1503 Date: Thu Mar 30 19:49:43 2023 +0800 platform/x86: asus-nb-wmi: Add quirk_asus_tablet_mode to other ROG Flow X13 models Make quirk_asus_tablet_mode apply on other ROG Flow X13 devices, which only affects the GV301Q model before. Signed-off-by: weiliang1503 Link: https://lore.kernel.org/r/20230330114943.15057-1-weiliang1503@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 52f91e51944808d83dfe2d5582601b5e84e472cc Author: Hans de Goede Date: Fri Mar 31 19:31:48 2023 +0200 platform/x86: gigabyte-wmi: add support for X570S AORUS ELITE Add "X570S AORUS ELITE" to known working boards Reported-by: Brandon Nielsen Link: https://lore.kernel.org/r/20230331014902.7864-1-nielsenb@jetfuse.net Signed-off-by: Hans de Goede commit 2bac7dc169af3cd4a0cb5200aa1f7b89affa042a Merge: f964333194b87 896c5150edfd5 Author: Linus Torvalds Date: Fri Mar 31 10:23:27 2023 -0700 Merge tag 'thermal-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control fixes from Rafael Wysocki: "These remove two recently added excessive lockdep assertions from the sysfs-related thermal code and fix two issues in Intel thermal drivers. Specifics: - Drop two lockdep assertions producing false positive warnings from the sysfs-related thermal core code (Rafael Wysocki) - Fix handling of two recently added module parameters in the Intel powerclamp thermal driver (David Arcari) - Fix one more deadlock in the int340x thermal driver (Srinivas Pandruvada)" * tag 'thermal-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: intel: powerclamp: Fix cpumask and max_idle module parameters thermal: intel: int340x: processor_thermal: Fix additional deadlock thermal: core: Drop excessive lockdep_assert_held() calls commit f964333194b877effae897314d89818347ed90d7 Merge: 39f692125c388 c56610a869bce Author: Linus Torvalds Date: Fri Mar 31 10:18:56 2023 -0700 Merge tag 'acpi-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Fix a recent regression related to the handling of ACPI notifications that made it more likely for ACPI driver callbacks to be invoked in an unexpected order and NULL pointers can be dereferenced as a result or similar. The fix is to modify the global ACPI notification handler so it does not invoke driver callbacks at all and allow the device-level notification handlers to receive "system" notifications (for the drivers that want to receive them)" * tag 'acpi-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: bus: Rework system-level device notification handling commit 39f692125c388aa657e77e5ae07ea72be02d99a5 Merge: 52f1959502dec 4622f159098e0 Author: Linus Torvalds Date: Fri Mar 31 10:15:17 2023 -0700 Merge tag 'riscv-for-linus-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - A fix for FPU probing in XIP kernels - Always enable the alternative framework for non-XIP kernels * tag 'riscv-for-linus-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: RISC-V: always select RISCV_ALTERNATIVE for non-xip kernels RISC-V: add non-alternative fallback for riscv_has_extension_[un]likely() commit 52f1959502dec5069dcd247ce0462cdc608494b1 Merge: 62bad54b26db8 ab327f8acdf8d Author: Linus Torvalds Date: Fri Mar 31 10:12:07 2023 -0700 Merge tag 'mips-fixes_6.3_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fix from Thomas Bogendoerfer: "Fix to avoid crash on BCM6358 platforms" * tag 'mips-fixes_6.3_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: mips: bmips: BCM6358: disable RAC flush for TP1 commit 52882b9c7a761b2b4e44717d6fbd1ed94c601b7f Author: Alexey Kardashevskiy Date: Wed May 4 17:48:07 2022 +1000 KVM: PPC: Make KVM_CAP_IRQFD_RESAMPLE platform dependent When introduced, IRQFD resampling worked on POWER8 with XICS. However KVM on POWER9 has never implemented it - the compatibility mode code ("XICS-on-XIVE") misses the kvm_notify_acked_irq() call and the native XIVE mode does not handle INTx in KVM at all. This moved the capability support advertising to platforms and stops advertising it on XIVE, i.e. POWER9 and later. Signed-off-by: Alexey Kardashevskiy Acked-by: Anup Patel Acked-by: Nicholas Piggin Message-Id: <20220504074807.3616813-1-aik@ozlabs.ru> Signed-off-by: Paolo Bonzini commit f1594bc676579133a3cd906d7d27733289edfb86 Author: Anh Tuan Phan Date: Fri Mar 24 09:14:15 2023 +0700 selftests mount: Fix mount_setattr_test builds failed When compiling selftests with target mount_setattr I encountered some errors with the below messages: mount_setattr_test.c: In function ‘mount_setattr_thread’: mount_setattr_test.c:343:16: error: variable ‘attr’ has initializer but incomplete type 343 | struct mount_attr attr = { | ^~~~~~~~~~ These errors might be because of linux/mount.h is not included. This patch resolves that issue. Signed-off-by: Anh Tuan Phan Acked-by: Christian Brauner Signed-off-by: Shuah Khan commit 85b475a4502d45380c1b9223c01954daa228eeb0 Merge: 80962ec912db5 21f27df854008 Author: Paolo Bonzini Date: Fri Mar 31 11:15:09 2023 -0400 Merge tag 'kvm-s390-master-6.3-1' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD A small fix that repairs the external loop detection code for PV guests. commit eb85df0a5643612285f61f38122564498d0c49f7 Author: Lorenzo Bianconi Date: Tue Mar 28 12:01:17 2023 +0200 wifi: mt76: mt7921: fix fw used for offload check for mt7922 Fix the firmware version used for offload capability check used by 0x0616 devices. This path enables offload capabilities for 0x0616 devices. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217245 Fixes: 034ae28b56f1 ("wifi: mt76: mt7921: introduce remain_on_channel support") Cc: stable@vger.kernel.org Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/632d8f0c9781c9902d7160e2c080aa7e9232d50d.1679997487.git.lorenzo@kernel.org commit 2ceb76f734e37833824b7fab6af17c999eb48d2b Author: Ben Greear Date: Wed Mar 22 17:37:17 2023 +0100 wifi: mt76: mt7921: Fix use-after-free in fw features query. Stop referencing 'features' memory after release_firmware is called. Fixes this crash: RIP: 0010:mt7921_check_offload_capability+0x17d mt7921_pci_probe+0xca/0x4b0 ... Signed-off-by: Ben Greear Signed-off-by: Lorenzo Bianconi Acked-by: Felix Fietkau Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/51fd8f76494348aa9ecbf0abc471ebe47a983dfd.1679502607.git.lorenzo@kernel.org commit e4efa515d58f1363d8a27e548f9c5769d3121e03 Author: Hans de Goede Date: Mon Mar 20 13:22:52 2023 +0100 wifi: brcmfmac: Fix SDIO suspend/resume regression After commit 92cadedd9d5f ("brcmfmac: Avoid keeping power to SDIO card unless WOWL is used"), the wifi adapter by default is turned off on suspend and then re-probed on resume. In at least 2 model x86/acpi tablets with brcmfmac43430a1 wifi adapters, the newly added re-probe on resume fails like this: brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout ieee80211 phy1: brcmf_bus_started: failed: -110 ieee80211 phy1: brcmf_attach: dongle is not responding: err=-110 brcmfmac: brcmf_sdio_firmware_callback: brcmf_attach failed It seems this specific brcmfmac model does not like being reprobed without it actually being turned off first. And the adapter is not being turned off during suspend because of commit f0992ace680c ("brcmfmac: prohibit ACPI power management for brcmfmac driver"). Now that the driver is being reprobed on resume, the disabling of ACPI pm is no longer necessary, except when WOWL is used (in which case there is no-reprobe). Move the dis-/en-abling of ACPI pm to brcmf_sdio_wowl_config(), this fixes the brcmfmac43430a1 suspend/resume regression and should help save some power when suspended. This change means that the code now also may re-enable ACPI pm when WOWL gets disabled. ACPI pm should only be re-enabled if it was enabled by the ACPI core originally. Add a brcmf_sdiod_acpi_save_power_manageable() to save the original state for this. This has been tested on the following devices: Asus T100TA brcmfmac43241b4-sdio Acer Iconia One 7 B1-750 brcmfmac43340-sdio Chuwi Hi8 brcmfmac43430a0-sdio Chuwi Hi8 brcmfmac43430a1-sdio (the Asus T100TA is the device for which the prohibiting of ACPI pm was originally added) Fixes: 92cadedd9d5f ("brcmfmac: Avoid keeping power to SDIO card unless WOWL is used") Cc: Ulf Hansson Signed-off-by: Hans de Goede Reviewed-by: Ulf Hansson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230320122252.240070-1-hdegoede@redhat.com commit 9fdc1605c504204e0fdec7892b29c916579e06f3 Author: Andy Chi Date: Fri Mar 31 16:32:41 2023 +0800 ALSA: hda/realtek: fix mute/micmute LEDs for a HP ProBook There is a HP ProBook which using ALC236 codec and need the ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF quirk to make mute LED and micmute LED work. Signed-off-by: Andy Chi Cc: Link: https://lore.kernel.org/r/20230331083242.58416-1-andy.chi@canonical.com Signed-off-by: Takashi Iwai commit d9503be5a100c553731c0e8a82c7b4201e8a970c Author: Martin Povišer Date: Fri Feb 24 16:22:21 2023 +0100 dmaengine: apple-admac: Fix 'current_tx' not getting freed In terminate_all we should queue up all submitted descriptors to be freed. We do that for the content of the 'issued' and 'submitted' lists, but the 'current_tx' descriptor falls through the cracks as it's removed from the 'issued' list once it gets assigned to be the current descriptor. Explicitly queue up freeing of the 'current_tx' descriptor to address a memory leak that is otherwise present. Fixes: b127315d9a78 ("dmaengine: apple-admac: Add Apple ADMAC driver") Signed-off-by: Martin Povišer Link: https://lore.kernel.org/r/20230224152222.26732-2-povik+lin@cutebit.org Signed-off-by: Vinod Koul commit 6e96adcaa7a29827ac8ee8df290a44957a4823ec Author: Martin Povišer Date: Fri Feb 24 16:22:22 2023 +0100 dmaengine: apple-admac: Set src_addr_widths capability Add missing setting of 'src_addr_widths', which is the same as for the other direction. Fixes: b127315d9a78 ("dmaengine: apple-admac: Add Apple ADMAC driver") Signed-off-by: Martin Povišer Link: https://lore.kernel.org/r/20230224152222.26732-3-povik+lin@cutebit.org Signed-off-by: Vinod Koul commit a288fd158fbf85c06a9ac01cecabf97ac5d962e7 Author: Martin Povišer Date: Fri Feb 24 16:22:20 2023 +0100 dmaengine: apple-admac: Handle 'global' interrupt flags In addition to TX channel and RX channel interrupt flags there's another class of 'global' interrupt flags with unknown semantics. Those weren't being handled up to now, and they are the suspected cause of stuck IRQ states that have been sporadically occurring. Check the global flags and clear them if raised. Fixes: b127315d9a78 ("dmaengine: apple-admac: Add Apple ADMAC driver") Signed-off-by: Martin Povišer Link: https://lore.kernel.org/r/20230224152222.26732-1-povik+lin@cutebit.org Signed-off-by: Vinod Koul commit cb2239c198ad9fbd5aced22cf93e45562da781eb Author: Christian Brauner Date: Thu Mar 30 09:13:16 2023 +0200 fs: drop peer group ids under namespace lock When cleaning up peer group ids in the failure path we need to make sure to hold on to the namespace lock. Otherwise another thread might just turn the mount from a shared into a non-shared mount concurrently. Link: https://lore.kernel.org/lkml/00000000000088694505f8132d77@google.com Fixes: 2a1867219c7b ("fs: add mount_setattr()") Reported-by: syzbot+8ac3859139c685c4f597@syzkaller.appspotmail.com Cc: stable@vger.kernel.org # 5.12+ Message-Id: <20230330-vfs-mount_setattr-propagation-fix-v1-1-37548d91533b@kernel.org> Signed-off-by: Christian Brauner commit 896c5150edfd5c01ed7abfcf02612f4aac6296b3 Merge: b57841fb0b564 ae817e618d4b5 Author: Rafael J. Wysocki Date: Fri Mar 31 12:02:46 2023 +0200 Merge branch 'thermal-intel-fixes' Merge Intel thermal driver fixes for 6.3-rc5: - Fix handling of two recently added module parameters in the Intel powerclamp thermal driver (David Arcari). - Fix one more deadlock in the int340x thermal driver (Srinivas Pandruvada). * thermal-intel-fixes: thermal: intel: powerclamp: Fix cpumask and max_idle module parameters thermal: intel: int340x: processor_thermal: Fix additional deadlock commit ffa5395a7901e83a68d88207c4592962906641bd Author: Arseniy Krasnov Date: Fri Mar 31 10:56:41 2023 +0300 vsock/vmci: convert VMCI error code to -ENOMEM on send This adds conversion of VMCI specific error code to general -ENOMEM. It is needed, because af_vsock.c passes error value returned from transport to the user, which does not expect to get VMCI_ERROR_* values. Fixes: c43170b7e157 ("vsock: return errors other than -ENOMEM to socket") Signed-off-by: Arseniy Krasnov Reviewed-by: Vishnu Dasa Reviewed-by: Stefano Garzarella Signed-off-by: David S. Miller commit 362f0b6678ad1377c322a7dd237ea6785efc7342 Author: Jiri Slaby (SUSE) Date: Fri Mar 31 08:35:15 2023 +0200 net: wwan: t7xx: do not compile with -Werror When playing with various compilers or their versions, some choke on the t7xx code. For example (with gcc 13): In file included from ./arch/s390/include/generated/asm/rwonce.h:1, from ../include/linux/compiler.h:247, from ../include/linux/build_bug.h:5, from ../include/linux/bits.h:22, from ../drivers/net/wwan/t7xx/t7xx_state_monitor.c:17: In function 'preempt_count', inlined from 't7xx_fsm_append_event' at ../drivers/net/wwan/t7xx/t7xx_state_monitor.c:439:43: ../include/asm-generic/rwonce.h:44:26: error: array subscript 0 is outside array bounds of 'const volatile int[0]' [-Werror=array-bounds=] There is no reason for any code in the kernel to be built with -Werror by default. Note that we have generic CONFIG_WERROR. So if anyone wants -Werror, they can enable that. Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/all/20230330232717.1f8bf5ea@kernel.org/ Cc: Chandrashekar Devegowda Cc: Intel Corporation Cc: Chiranjeevi Rapolu Cc: Liu Haijun Cc: M Chetan Kumar Cc: Ricardo Martinez Cc: Loic Poulain Cc: Sergey Ryazanov Cc: Johannes Berg Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller commit c5b959eeb7f9e40673b97c08c71cbfff5f5923f2 Author: Arnd Bergmann Date: Fri Mar 31 09:48:56 2023 +0200 net: netcp: MAX_SKB_FRAGS is now 'int' The type of MAX_SKB_FRAGS has changed recently, so the debug printk needs to be updated: drivers/net/ethernet/ti/netcp_core.c: In function 'netcp_create_interface': drivers/net/ethernet/ti/netcp_core.c:2084:30: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'int' [-Werror=format=] 2084 | dev_err(dev, "tx-pool size too small, must be at least %ld\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 3948b05950fd ("net: introduce a config option to tweak MAX_SKB_FRAGS") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit 154e07c164859fc90bf4e8143f2f6c1af9f3a35e Author: Andrea Righi Date: Thu Mar 30 11:54:42 2023 +0200 l2tp: generate correct module alias strings Commit 65b32f801bfb ("uapi: move IPPROTO_L2TP to in.h") moved the definition of IPPROTO_L2TP from a define to an enum, but since __stringify doesn't work properly with enums, we ended up breaking the modalias strings for the l2tp modules: $ modinfo l2tp_ip l2tp_ip6 | grep alias alias: net-pf-2-proto-IPPROTO_L2TP alias: net-pf-2-proto-2-type-IPPROTO_L2TP alias: net-pf-10-proto-IPPROTO_L2TP alias: net-pf-10-proto-2-type-IPPROTO_L2TP Use the resolved number directly in MODULE_ALIAS_*() macros (as we already do with SOCK_DGRAM) to fix the alias strings: $ modinfo l2tp_ip l2tp_ip6 | grep alias alias: net-pf-2-proto-115 alias: net-pf-2-proto-115-type-2 alias: net-pf-10-proto-115 alias: net-pf-10-proto-115-type-2 Moreover, fix the ordering of the parameters passed to MODULE_ALIAS_NET_PF_PROTO_TYPE() by switching proto and type. Fixes: 65b32f801bfb ("uapi: move IPPROTO_L2TP to in.h") Link: https://lore.kernel.org/lkml/ZCQt7hmodtUaBlCP@righiandr-XPS-13-7390 Signed-off-by: Guillaume Nault Signed-off-by: Andrea Righi Reviewed-by: Wojciech Drewek Tested-by: Wojciech Drewek Signed-off-by: David S. Miller commit 279d8ff5ec00b06a5dc9b90f3d00a5a5253aa95d Merge: 44d807320000d 6fc21a6ed5953 Author: David S. Miller Date: Fri Mar 31 09:23:41 2023 +0100 Merge branch 'phy-handle-fixes' Michael Sit Wei Hong says: ==================== Fix PHY handle no longer parsing After the fixed link support was introduced, it is observed that PHY no longer attach to the MAC properly. So we introduce a helper function to determine if the MAC should expect to connect to a PHY and proceed accordingly. ==================== Signed-off-by: David S. Miller commit 6fc21a6ed5953b1dd3a41ce7be1ea57f5ef8c081 Author: Michael Sit Wei Hong Date: Thu Mar 30 17:14:04 2023 +0800 net: stmmac: remove redundant fixup to support fixed-link mode Currently, intel_speed_mode_2500() will fix-up xpcs_an_inband to 1 if the underlying controller has a max speed of 1000Mbps. The value has been initialized and modified if it is a fixed-linked setup earlier. This patch removes the fix-up to allow for fixed-linked setup support. In stmmac_phy_setup(), ovr_an_inband is set based on the value of xpcs_an_inband. Which in turn will return an error in phylink_parse_mode() where MLO_AN_FIXED and ovr_an_inband are both set. Fixes: c82386310d95 ("stmmac: intel: prepare to support 1000BASE-X phy interface setting") Signed-off-by: Michael Sit Wei Hong Signed-off-by: David S. Miller commit fe2cfbc9680356a3d9f8adde8a38e715831e32f5 Author: Michael Sit Wei Hong Date: Thu Mar 30 17:14:03 2023 +0800 net: stmmac: check if MAC needs to attach to a PHY After the introduction of the fixed-link support, the MAC driver no longer attempt to scan for a PHY to attach to. This causes the non fixed-link setups to stop working. Using the phylink_expects_phy() to check and determine if the MAC should expect and attach a PHY. Fixes: ab21cf920928 ("net: stmmac: make mdio register skips PHY scanning for fixed-link") Signed-off-by: Michael Sit Wei Hong Signed-off-by: Lai Peter Jun Ann Signed-off-by: David S. Miller commit 653a180957a85c3fc30320cc7e84f5dc913a64f8 Author: Michael Sit Wei Hong Date: Thu Mar 30 17:14:02 2023 +0800 net: phylink: add phylink_expects_phy() method Provide phylink_expects_phy() to allow MAC drivers to check if it is expecting a PHY to attach to. Since fixed-linked setups do not need to attach to a PHY. Provides a boolean value as to if the MAC should expect a PHY. Returns true if a PHY is expected. Reviewed-by: Russell King (Oracle) Signed-off-by: Michael Sit Wei Hong Signed-off-by: David S. Miller commit 44d807320000db0d0013372ad39b53e12d52f758 Author: Ziyang Xuan Date: Thu Mar 30 09:25:32 2023 +0800 net: qrtr: Fix a refcount bug in qrtr_recvmsg() Syzbot reported a bug as following: refcount_t: addition on 0; use-after-free. ... RIP: 0010:refcount_warn_saturate+0x17c/0x1f0 lib/refcount.c:25 ... Call Trace: __refcount_add include/linux/refcount.h:199 [inline] __refcount_inc include/linux/refcount.h:250 [inline] refcount_inc include/linux/refcount.h:267 [inline] kref_get include/linux/kref.h:45 [inline] qrtr_node_acquire net/qrtr/af_qrtr.c:202 [inline] qrtr_node_lookup net/qrtr/af_qrtr.c:398 [inline] qrtr_send_resume_tx net/qrtr/af_qrtr.c:1003 [inline] qrtr_recvmsg+0x85f/0x990 net/qrtr/af_qrtr.c:1070 sock_recvmsg_nosec net/socket.c:1017 [inline] sock_recvmsg+0xe2/0x160 net/socket.c:1038 qrtr_ns_worker+0x170/0x1700 net/qrtr/ns.c:688 process_one_work+0x991/0x15c0 kernel/workqueue.c:2390 worker_thread+0x669/0x1090 kernel/workqueue.c:2537 It occurs in the concurrent scenario of qrtr_recvmsg() and qrtr_endpoint_unregister() as following: cpu0 cpu1 qrtr_recvmsg qrtr_endpoint_unregister qrtr_send_resume_tx qrtr_node_release qrtr_node_lookup mutex_lock(&qrtr_node_lock) spin_lock_irqsave(&qrtr_nodes_lock, ) refcount_dec_and_test(&node->ref) [node->ref == 0] radix_tree_lookup [node != NULL] __qrtr_node_release qrtr_node_acquire spin_lock_irqsave(&qrtr_nodes_lock, ) kref_get(&node->ref) [WARNING] ... mutex_unlock(&qrtr_node_lock) Use qrtr_node_lock to protect qrtr_node_lookup() implementation, this is actually improving the protection of node reference. Fixes: 0a7e0d0ef054 ("net: qrtr: Migrate node lookup tree to spinlock") Reported-by: syzbot+a7492efaa5d61b51db23@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=a7492efaa5d61b51db23 Signed-off-by: Ziyang Xuan Signed-off-by: David S. Miller commit 16812c96550c30a8d5743167ef4e462d6fbe7472 Author: Kan Liang Date: Wed Mar 29 21:47:21 2023 +0800 iommu/vt-d: Fix an IOMMU perfmon warning when CPU hotplug A warning can be triggered when hotplug CPU 0. $ echo 0 > /sys/devices/system/cpu/cpu0/online ------------[ cut here ]------------ Voluntary context switch within RCU read-side critical section! WARNING: CPU: 0 PID: 19 at kernel/rcu/tree_plugin.h:318 rcu_note_context_switch+0x4f4/0x580 RIP: 0010:rcu_note_context_switch+0x4f4/0x580 Call Trace: ? perf_event_update_userpage+0x104/0x150 __schedule+0x8d/0x960 ? perf_event_set_state.part.82+0x11/0x50 schedule+0x44/0xb0 schedule_timeout+0x226/0x310 ? __perf_event_disable+0x64/0x1a0 ? _raw_spin_unlock+0x14/0x30 wait_for_completion+0x94/0x130 __wait_rcu_gp+0x108/0x130 synchronize_rcu+0x67/0x70 ? invoke_rcu_core+0xb0/0xb0 ? __bpf_trace_rcu_stall_warning+0x10/0x10 perf_pmu_migrate_context+0x121/0x370 iommu_pmu_cpu_offline+0x6a/0xa0 ? iommu_pmu_del+0x1e0/0x1e0 cpuhp_invoke_callback+0x129/0x510 cpuhp_thread_fun+0x94/0x150 smpboot_thread_fn+0x183/0x220 ? sort_range+0x20/0x20 kthread+0xe6/0x110 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x1f/0x30 ---[ end trace 0000000000000000 ]--- The synchronize_rcu() will be invoked in the perf_pmu_migrate_context(), when migrating a PMU to a new CPU. However, the current for_each_iommu() is within RCU read-side critical section. Two methods were considered to fix the issue. - Use the dmar_global_lock to replace the RCU read lock when going through the drhd list. But it triggers a lockdep warning. - Use the cpuhp_setup_state_multi() to set up a dedicated state for each IOMMU PMU. The lock can be avoided. The latter method is implemented in this patch. Since each IOMMU PMU has a dedicated state, add cpuhp_node and cpu in struct iommu_pmu to track the state. The state can be dynamically allocated now. Remove the CPUHP_AP_PERF_X86_IOMMU_PERF_ONLINE. Fixes: 46284c6ceb5e ("iommu/vt-d: Support cpumask for IOMMU perfmon") Reported-by: Ammy Yi Signed-off-by: Kan Liang Link: https://lore.kernel.org/r/20230328182028.1366416-1-kan.liang@linux.intel.com Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20230329134721.469447-4-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit bfd3c6b9fa4a1dc78139dd1621d5bea321ffa69d Author: Lu Baolu Date: Wed Mar 29 21:47:20 2023 +0800 iommu/vt-d: Allow zero SAGAW if second-stage not supported The VT-d spec states (in section 11.4.2) that hardware implementations reporting second-stage translation support (SSTS) field as Clear also report the SAGAW field as 0. Fix an inappropriate check in alloc_iommu(). Fixes: 792fb43ce2c9 ("iommu/vt-d: Enable Intel IOMMU scalable mode by default") Suggested-by: Raghunathan Srinivasan Reviewed-by: Kevin Tian Signed-off-by: Jacob Pan Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20230318024824.124542-1-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20230329134721.469447-3-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit c7d624520c1bd4e42d8ceb8283d6505fc90acccb Author: Lu Baolu Date: Wed Mar 29 21:47:19 2023 +0800 iommu/vt-d: Remove unnecessary locking in intel_irq_remapping_alloc() The global rwsem dmar_global_lock was introduced by commit 3a5670e8ac932 ("iommu/vt-d: Introduce a rwsem to protect global data structures"). It is used to protect DMAR related global data from DMAR hotplug operations. Using dmar_global_lock in intel_irq_remapping_alloc() is unnecessary as the DMAR global data structures are not touched there. Remove it to avoid below lockdep warning. ====================================================== WARNING: possible circular locking dependency detected 6.3.0-rc2 #468 Not tainted ------------------------------------------------------ swapper/0/1 is trying to acquire lock: ff1db4cb40178698 (&domain->mutex){+.+.}-{3:3}, at: __irq_domain_alloc_irqs+0x3b/0xa0 but task is already holding lock: ffffffffa0c1cdf0 (dmar_global_lock){++++}-{3:3}, at: intel_iommu_init+0x58e/0x880 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (dmar_global_lock){++++}-{3:3}: lock_acquire+0xd6/0x320 down_read+0x42/0x180 intel_irq_remapping_alloc+0xad/0x750 mp_irqdomain_alloc+0xb8/0x2b0 irq_domain_alloc_irqs_locked+0x12f/0x2d0 __irq_domain_alloc_irqs+0x56/0xa0 alloc_isa_irq_from_domain.isra.7+0xa0/0xe0 mp_map_pin_to_irq+0x1dc/0x330 setup_IO_APIC+0x128/0x210 apic_intr_mode_init+0x67/0x110 x86_late_time_init+0x24/0x40 start_kernel+0x41e/0x7e0 secondary_startup_64_no_verify+0xe0/0xeb -> #0 (&domain->mutex){+.+.}-{3:3}: check_prevs_add+0x160/0xef0 __lock_acquire+0x147d/0x1950 lock_acquire+0xd6/0x320 __mutex_lock+0x9c/0xfc0 __irq_domain_alloc_irqs+0x3b/0xa0 dmar_alloc_hwirq+0x9e/0x120 iommu_pmu_register+0x11d/0x200 intel_iommu_init+0x5de/0x880 pci_iommu_init+0x12/0x40 do_one_initcall+0x65/0x350 kernel_init_freeable+0x3ca/0x610 kernel_init+0x1a/0x140 ret_from_fork+0x29/0x50 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(dmar_global_lock); lock(&domain->mutex); lock(dmar_global_lock); lock(&domain->mutex); *** DEADLOCK *** Fixes: 9dbb8e3452ab ("irqdomain: Switch to per-domain locking") Reviewed-by: Jacob Pan Tested-by: Jason Gunthorpe Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20230314051836.23817-1-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20230329134721.469447-2-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit f9d2b1e146e0f82f3d04629afd92698522058361 Author: Bobby Eshleman Date: Wed Mar 29 16:51:58 2023 +0000 virtio/vsock: fix leaks due to missing skb owner This patch sets the skb owner in the recv and send path for virtio. For the send path, this solves the leak caused when virtio_transport_purge_skbs() finds skb->sk is always NULL and therefore never matches it with the current socket. Setting the owner upon allocation fixes this. For the recv path, this ensures correctness of accounting and also correct transfer of ownership in vsock_loopback (when skbs are sent from one socket and received by another). Fixes: 71dc9ec9ac7d ("virtio/vsock: replace virtio_vsock_pkt with sk_buff") Signed-off-by: Bobby Eshleman Reported-by: Cong Wang Link: https://lore.kernel.org/all/ZCCbATwov4U+GBUv@pop-os.localdomain/ Reviewed-by: Stefano Garzarella Signed-off-by: David S. Miller commit 5d1a70f77dcf7b93f955d40691ac729fc7b3d151 Merge: f6caea4855553 7708a3858e69d Author: Greg Kroah-Hartman Date: Fri Mar 31 09:28:03 2023 +0200 Merge tag 'usb-serial-6.3-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for 6.3-rc5 Here are some new device ids for 6.3. All have been in linux-next with no reported issues. * tag 'usb-serial-6.3-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: option: add Quectel RM500U-CN modem USB: serial: option: add Telit FE990 compositions USB: serial: cp210x: add Silicon Labs IFS-USB-DATACABLE IDs commit 6b36d68cc9bb1fc85bbe54ebe2eb6b2c3beec73d Merge: b2bc47e9b2011 12b220a6171fa Author: Jakub Kicinski Date: Thu Mar 30 23:44:45 2023 -0700 Merge tag 'wireless-2023-03-30' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Johannes Berg says: ==================== Just a few fixes: * fix size calculation for EHT element to put into SKBs * remove erroneous pre-RCU calls for drivers not using sta_state calls * fix mesh forwarding and non-forwarding RX * fix mesh flow dissection * fix a potential NULL dereference on A-MSDU RX w/o station * make two variable non-static that really shouldn't be static * tag 'wireless-2023-03-30' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: mac80211: fix invalid drv_sta_pre_rcu_remove calls for non-uploaded sta wifi: mac80211: fix flow dissection for forwarded packets wifi: mac80211: fix mesh forwarding wifi: mac80211: fix receiving mesh packets in forwarding=0 networks wifi: mac80211: fix the size calculation of ieee80211_ie_len_eht_cap() wifi: mac80211: fix potential null pointer dereference wifi: mac80211: drop bogus static keywords in A-MSDU rx ==================== Link: https://lore.kernel.org/r/20230330203313.919164-1-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit 24ab70d83784a807c9ddff939ea762ef19bd4ffd Merge: 1a06ed2d4289e 433279beba1d4 Author: Jens Axboe Date: Thu Mar 30 20:29:47 2023 -0600 Merge tag 'md-fixes-2023-03-29' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into block-6.3 Pull MD fix from Song. * tag 'md-fixes-2023-03-29' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md: fix regression for null-ptr-deference in __md_stop() commit 3adf89324a2b2a9dbc2c12d8895021e7e34e3346 Author: Javier Martinez Canillas Date: Fri Mar 31 01:19:23 2023 +0200 arm64: dts: rockchip: Remove non-existing pwm-delay-us property There is neither a driver that parses this nor a DT binding schema that documents it, so let's remove from the DTS files that make use of this. The properties that exist are post-pwm-on-delay-ms and pwm-off-delay-ms, defined in the pwm-backlight DT binding. If the delays are really needed then those properties should be used instead. Brian Norris mentioned though that looking at the first downstream usage of the pwm-delay-us property for RK3399 Gru systems in ChromiumOS tree, he couldn't find a spec reference that said that this was really needed. So perhaps it was unnecessary added and a simple removal would be enough. Signed-off-by: Javier Martinez Canillas Reviewed-by: Brian Norris Link: https://lore.kernel.org/r/20230330231924.2404747-1-javierm@redhat.com Signed-off-by: Heiko Stuebner commit 62bad54b26db8bc98e28749cd76b2d890edb4258 Merge: 10f76dc3abb4d 0eee5ae102569 Author: Linus Torvalds Date: Thu Mar 30 16:09:37 2023 -0700 Merge tag 'dma-mapping-6.3-2023-03-31' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fixes from Christoph Hellwig: - fix for swiotlb deadlock due to wrong alignment checks (GuoRui.Yu, Petr Tesarik) * tag 'dma-mapping-6.3-2023-03-31' of git://git.infradead.org/users/hch/dma-mapping: swiotlb: fix slot alignment checks swiotlb: use wrap_area_index() instead of open-coding it swiotlb: fix the deadlock in swiotlb_do_find_slots commit e03677100707f849f01d8faf07ee58b4e56cdbf1 Author: Paulo Alcantara Date: Wed Mar 29 17:14:23 2023 -0300 cifs: get rid of dead check in smb2_reconnect() The SMB2_IOCTL check in the switch statement will never be true as we return earlier from smb2_reconnect() if @smb2_command == SMB2_IOCTL. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French commit 09ba47b44d26b475bbdf9c80db9e0193d2b58956 Author: Paulo Alcantara Date: Wed Mar 29 17:14:22 2023 -0300 cifs: prevent infinite recursion in CIFSGetDFSRefer() We can't call smb_init() in CIFSGetDFSRefer() as cifs_reconnect_tcon() may end up calling CIFSGetDFSRefer() again to get new DFS referrals and thus causing an infinite recursion. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Ronnie Sahlberg Cc: stable@vger.kernel.org # 6.2 Signed-off-by: Steve French commit 6cc041e90c178955219dcee4030bd5423f800f10 Author: Paulo Alcantara Date: Wed Mar 29 17:14:21 2023 -0300 cifs: avoid races in parallel reconnects in smb1 Prevent multiple threads of doing negotiate, session setup and tree connect by holding @ses->session_mutex in cifs_reconnect_tcon() while reconnecting session and tcon. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French commit 10f76dc3abb4d8fbc2cee7a63fda22e8b08628b2 Merge: b2bc47e9b2011 d684a7a26f7d2 Author: Linus Torvalds Date: Thu Mar 30 15:52:45 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 small fixes, three in drivers. The core fix is yet another attempt to insulate us from UFS devices' weird behaviour for VPD pages" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: mpt3sas: Don't print sense pool info twice scsi: core: Improve scsi_vpd_inquiry() checks scsi: megaraid_sas: Fix crash after a double completion scsi: megaraid_sas: Fix fw_crash_buffer_show() commit 1a06ed2d4289e392c38feb9dc0ef223b1c4efb34 Merge: bb430b6942264 88eaba80328b3 Author: Jens Axboe Date: Thu Mar 30 16:39:04 2023 -0600 Merge tag 'nvme-6.3-2023-03-31' of git://git.infradead.org/nvme into block-6.3 Pull NVMe fixes from Christoph: "nvme fixes for Linux 6.3 - mark Lexar NM760 as IGNORE_DEV_SUBNQN (Juraj Pecigos) - fix a possible UAF when failing to allocate an TCP io queue (Sagi Grimberg)" * tag 'nvme-6.3-2023-03-31' of git://git.infradead.org/nvme: nvme-tcp: fix a possible UAF when failing to allocate an io queue nvme-pci: mark Lexar NM760 as IGNORE_DEV_SUBNQN commit 179a88a8558bbf42991d361595281f3e45d7edfc Author: David Disseldorp Date: Wed Mar 29 22:24:06 2023 +0200 cifs: fix DFS traversal oops without CONFIG_CIFS_DFS_UPCALL When compiled with CONFIG_CIFS_DFS_UPCALL disabled, cifs_dfs_d_automount is NULL. cifs.ko logic for mapping CIFS_FATTR_DFS_REFERRAL attributes to S_AUTOMOUNT and corresponding dentry flags is retained regardless of CONFIG_CIFS_DFS_UPCALL, leading to a NULL pointer dereference in VFS follow_automount() when traversing a DFS referral link: BUG: kernel NULL pointer dereference, address: 0000000000000000 ... Call Trace: __traverse_mounts+0xb5/0x220 ? cifs_revalidate_mapping+0x65/0xc0 [cifs] step_into+0x195/0x610 ? lookup_fast+0xe2/0xf0 path_lookupat+0x64/0x140 filename_lookup+0xc2/0x140 ? __create_object+0x299/0x380 ? kmem_cache_alloc+0x119/0x220 ? user_path_at_empty+0x31/0x50 user_path_at_empty+0x31/0x50 __x64_sys_chdir+0x2a/0xd0 ? exit_to_user_mode_prepare+0xca/0x100 do_syscall_64+0x42/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc This fix adds an inline cifs_dfs_d_automount() {return -EREMOTE} handler when CONFIG_CIFS_DFS_UPCALL is disabled. An alternative would be to avoid flagging S_AUTOMOUNT, etc. without CONFIG_CIFS_DFS_UPCALL. This approach was chosen as it provides more control over the error path. Signed-off-by: David Disseldorp Cc: stable@vger.kernel.org Reviewed-by: Paulo Alcantara (SUSE) Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French commit b2bc47e9b2011a183f9d3d3454a294a938082fb9 Merge: b527ac44eb178 924531326e2dd Author: Linus Torvalds Date: Thu Mar 30 14:05:21 2023 -0700 Merge tag 'net-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from CAN and WPAN. Still quite a few bugs from this release. This pull is a bit smaller because major subtrees went into the previous one. Or maybe people took spring break off? Current release - regressions: - phy: micrel: correct KSZ9131RNX EEE capabilities and advertisement Current release - new code bugs: - eth: wangxun: fix vector length of interrupt cause - vsock/loopback: consistently protect the packet queue with sk_buff_head.lock - virtio/vsock: fix header length on skb merging - wpan: ca8210: fix unsigned mac_len comparison with zero Previous releases - regressions: - eth: stmmac: don't reject VLANs when IFF_PROMISC is set - eth: smsc911x: avoid PHY being resumed when interface is not up - eth: mtk_eth_soc: fix tx throughput regression with direct 1G links - eth: bnx2x: use the right build_skb() helper after core rework - wwan: iosm: fix 7560 modem crash on use on unsupported channel Previous releases - always broken: - eth: sfc: don't overwrite offload features at NIC reset - eth: r8169: fix RTL8168H and RTL8107E rx crc error - can: j1939: prevent deadlock by moving j1939_sk_errqueue() - virt: vmxnet3: use GRO callback when UPT is enabled - virt: xen: don't do grant copy across page boundary - phy: dp83869: fix default value for tx-/rx-internal-delay - dsa: ksz8: fix multiple issues with ksz8_fdb_dump - eth: mvpp2: fix classification/RSS of VLAN and fragmented packets - eth: mtk_eth_soc: fix flow block refcounting logic Misc: - constify fwnode pointers in SFP handling" * tag 'net-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (55 commits) net: ethernet: mtk_eth_soc: add missing ppe cache flush when deleting a flow net: ethernet: mtk_eth_soc: fix L2 offloading with DSA untag offload net: ethernet: mtk_eth_soc: fix flow block refcounting logic net: mvneta: fix potential double-frees in mvneta_txq_sw_deinit() net: dsa: sync unicast and multicast addresses for VLAN filters too net: dsa: mv88e6xxx: Enable IGMP snooping on user ports only xen/netback: use same error messages for same errors test/vsock: new skbuff appending test virtio/vsock: WARN_ONCE() for invalid state of socket virtio/vsock: fix header length on skb merging bnxt_en: Add missing 200G link speed reporting bnxt_en: Fix typo in PCI id to device description string mapping bnxt_en: Fix reporting of test result in ethtool selftest i40e: fix registers dump after run ethtool adapter self test bnx2x: use the right build_skb() helper net: ipa: compute DMA pool size properly net: wwan: iosm: fixes 7560 modem crash net: ethernet: mtk_eth_soc: fix tx throughput regression with direct 1G links ice: fix invalid check for empty list in ice_sched_assoc_vsi_to_agg() ice: add profile conflict check for AVF FDIR ... commit b527ac44eb1782cf179d4e08ceda7d2a9643aff5 Merge: 0d3ff8087b2c1 666eed46769d9 Author: Linus Torvalds Date: Thu Mar 30 13:58:12 2023 -0700 Merge tag 'for-6.3/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - Fix two DM core bugs in the code that handles splitting "abnormal" IO (discards, write same and secure erase) and issuing that IO to the correct underlying devices (and offsets within those devices). * tag 'for-6.3/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm: fix __send_duplicate_bios() to always allow for splitting IO dm: fix improper splitting for abnormal bios commit 0d3ff8087b2c12ee012c547f3bde46a3f60d6f6f Merge: 8bb95a1662f8b 7af63e079a7d6 Author: Linus Torvalds Date: Thu Mar 30 13:38:27 2023 -0700 Merge tag 'drm-fixes-2023-03-30' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Daniel Vetter: "Two regression fixes in here, otherwise just the usual stuff: - i915 fixes for color mgmt, psr, lmem flush, hibernate oops, and more - amdgpu: dp mst and hibernate regression fix - etnaviv: revert fdinfo support (incl drm/sched revert), leak fix - misc ivpu fixes, nouveau backlight, drm buddy allocator 32bit fixes" * tag 'drm-fixes-2023-03-30' of git://anongit.freedesktop.org/drm/drm: (27 commits) Revert "drm/scheduler: track GPU active time per entity" Revert "drm/etnaviv: export client GPU usage statistics via fdinfo" drm/etnaviv: fix reference leak when mmaping imported buffer drm/amdgpu: allow more APUs to do mode2 reset when go to S4 drm/amd/display: Take FEC Overhead into Timeslot Calculation drm/amd/display: Add DSC Support for Synaptics Cascaded MST Hub drm: test: Fix 32-bit issue in drm_buddy_test drm: buddy_allocator: Fix buddy allocator init on 32-bit systems drm/nouveau/kms: Fix backlight registration drm/i915/perf: Drop wakeref on GuC RC error drm/i915/dpt: Treat the DPT BO as a framebuffer drm/i915/gem: Flush lmem contents after construction drm/i915/tc: Fix the ICL PHY ownership check in TC-cold state drm/i915: Disable DC states for all commits drm/i915: Workaround ICL CSC_MODE sticky arming drm/i915: Add a .color_post_update() hook drm/i915: Move CSC load back into .color_commit_arm() when PSR is enabled on skl/glk drm/i915: Split icl_color_commit_noarm() from skl_color_commit_noarm() drm/i915/pmu: Use functions common with sysfs to read actual freq accel/ivpu: Fix IPC buffer header status field value ... commit 666eed46769d929c3e13636134ecfc67d75ef548 Author: Mike Snitzer Date: Thu Mar 30 15:09:29 2023 -0400 dm: fix __send_duplicate_bios() to always allow for splitting IO Commit 7dd76d1feec70 ("dm: improve bio splitting and associated IO accounting") only called setup_split_accounting() from __send_duplicate_bios() if a single bio were being issued. But the case where duplicate bios are issued must call it too. Otherwise the bio won't be split and resubmitted (via recursion through block core back to DM) to submit the later portions of a bio (which may map to an entirely different target). For example, when discarding an entire DM striped device with the following DM table: vg-lvol0: 0 159744 striped 2 128 7:0 2048 7:1 2048 vg-lvol0: 159744 45056 striped 2 128 7:2 2048 7:3 2048 Before (broken, discards the first striped target's devices twice): device-mapper: striped: target_stripe=0, bdev=7:0, start=2048 len=79872 device-mapper: striped: target_stripe=1, bdev=7:1, start=2048 len=79872 device-mapper: striped: target_stripe=0, bdev=7:0, start=2049 len=22528 device-mapper: striped: target_stripe=1, bdev=7:1, start=2048 len=22528 After (works as expected): device-mapper: striped: target_stripe=0, bdev=7:0, start=2048 len=79872 device-mapper: striped: target_stripe=1, bdev=7:1, start=2048 len=79872 device-mapper: striped: target_stripe=0, bdev=7:2, start=2048 len=22528 device-mapper: striped: target_stripe=1, bdev=7:3, start=2048 len=22528 Fixes: 7dd76d1feec70 ("dm: improve bio splitting and associated IO accounting") Cc: stable@vger.kernel.org Reported-by: Orange Kao Signed-off-by: Mike Snitzer commit f7b58a69fad9d2c4c90cab0247811155dd0d48e7 Author: Mike Snitzer Date: Thu Mar 30 14:56:38 2023 -0400 dm: fix improper splitting for abnormal bios "Abnormal" bios include discards, write zeroes and secure erase. By no longer passing the calculated 'len' pointer, commit 7dd06a2548b2 ("dm: allow dm_accept_partial_bio() for dm_io without duplicate bios") took a senseless approach to disallowing dm_accept_partial_bio() from working for duplicate bios processed using __send_duplicate_bios(). It inadvertently and incorrectly stopped the use of 'len' when initializing a target's io (in alloc_tio). As such the resulting tio could address more area of a device than it should. For example, when discarding an entire DM striped device with the following DM table: vg-lvol0: 0 159744 striped 2 128 7:0 2048 7:1 2048 vg-lvol0: 159744 45056 striped 2 128 7:2 2048 7:3 2048 Before this fix: device-mapper: striped: target_stripe=0, bdev=7:0, start=2048 len=102400 blkdiscard: attempt to access beyond end of device loop0: rw=2051, sector=2048, nr_sectors = 102400 limit=81920 device-mapper: striped: target_stripe=1, bdev=7:1, start=2048 len=102400 blkdiscard: attempt to access beyond end of device loop1: rw=2051, sector=2048, nr_sectors = 102400 limit=81920 After this fix; device-mapper: striped: target_stripe=0, bdev=7:0, start=2048 len=79872 device-mapper: striped: target_stripe=1, bdev=7:1, start=2048 len=79872 Fixes: 7dd06a2548b2 ("dm: allow dm_accept_partial_bio() for dm_io without duplicate bios") Cc: stable@vger.kernel.org Reported-by: Orange Kao Signed-off-by: Mike Snitzer commit 924531326e2dd4ceabe7240f2b55a88e7d894ec2 Author: Felix Fietkau Date: Thu Mar 30 14:08:40 2023 +0200 net: ethernet: mtk_eth_soc: add missing ppe cache flush when deleting a flow The cache needs to be flushed to ensure that the hardware stops offloading the flow immediately. Fixes: 33fc42de3327 ("net: ethernet: mtk_eth_soc: support creating mac address based offload entries") Reviewed-by: Simon Horman Signed-off-by: Felix Fietkau Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20230330120840.52079-3-nbd@nbd.name Signed-off-by: Jakub Kicinski commit 5f36ca1b841fb17a20249fd9fedafc7dc7fdd940 Author: Felix Fietkau Date: Thu Mar 30 14:08:39 2023 +0200 net: ethernet: mtk_eth_soc: fix L2 offloading with DSA untag offload Check for skb metadata in order to detect the case where the DSA header is not present. Fixes: 2d7605a72906 ("net: ethernet: mtk_eth_soc: enable hardware DSA untagging") Reviewed-by: Simon Horman Signed-off-by: Felix Fietkau Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20230330120840.52079-2-nbd@nbd.name Signed-off-by: Jakub Kicinski commit 8c1cb87c2a5c29da416848451a687473f379611c Author: Felix Fietkau Date: Thu Mar 30 14:08:38 2023 +0200 net: ethernet: mtk_eth_soc: fix flow block refcounting logic Since we call flow_block_cb_decref on FLOW_BLOCK_UNBIND, we also need to call flow_block_cb_incref for a newly allocated cb. Also fix the accidentally inverted refcount check on unbind. Fixes: 502e84e2382d ("net: ethernet: mtk_eth_soc: add flow offloading support") Reviewed-by: Simon Horman Signed-off-by: Felix Fietkau Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20230330120840.52079-1-nbd@nbd.name Signed-off-by: Jakub Kicinski commit 2960a2d33b02345c6d710251206053678f92246b Author: Russell King (Oracle) Date: Wed Mar 29 13:11:17 2023 +0100 net: mvneta: fix potential double-frees in mvneta_txq_sw_deinit() Reported on the Turris forum, mvneta provokes kernel warnings in the architecture DMA mapping code when mvneta_setup_txqs() fails to allocate memory. This happens because when mvneta_cleanup_txqs() is called in the mvneta_stop() path, we leave pointers in the structure that have been freed. Then on mvneta_open(), we call mvneta_setup_txqs(), which starts allocating memory. On memory allocation failure, mvneta_cleanup_txqs() will walk all the queues freeing any non-NULL pointers - which includes pointers that were previously freed in mvneta_stop(). Fix this by setting these pointers to NULL to prevent double-freeing of the same memory. Fixes: 2adb719d74f6 ("net: mvneta: Implement software TSO") Link: https://forum.turris.cz/t/random-kernel-exceptions-on-hbl-tos-7-0/18865/8 Signed-off-by: Russell King (Oracle) Link: https://lore.kernel.org/r/E1phUe5-00EieL-7q@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 64fdc5f341db01200e33105265d4b8450122a82e Author: Vladimir Oltean Date: Wed Mar 29 18:18:21 2023 +0300 net: dsa: sync unicast and multicast addresses for VLAN filters too If certain conditions are met, DSA can install all necessary MAC addresses on the CPU ports as FDB entries and disable flooding towards the CPU (we call this RX filtering). There is one corner case where this does not work. ip link add br0 type bridge vlan_filtering 1 && ip link set br0 up ip link set swp0 master br0 && ip link set swp0 up ip link add link swp0 name swp0.100 type vlan id 100 ip link set swp0.100 up && ip addr add 192.168.100.1/24 dev swp0.100 Traffic through swp0.100 is broken, because the bridge turns on VLAN filtering in the swp0 port (causing RX packets to be classified to the FDB database corresponding to the VID from their 802.1Q header), and although the 8021q module does call dev_uc_add() towards the real device, that API is VLAN-unaware, so it only contains the MAC address, not the VID; and DSA's current implementation of ndo_set_rx_mode() is only for VID 0 (corresponding to FDB entries which are installed in an FDB database which is only hit when the port is VLAN-unaware). It's interesting to understand why the bridge does not turn on IFF_PROMISC for its swp0 bridge port, and it may appear at first glance that this is a regression caused by the logic in commit 2796d0c648c9 ("bridge: Automatically manage port promiscuous mode."). After all, a bridge port needs to have IFF_PROMISC by its very nature - it needs to receive and forward frames with a MAC DA different from the bridge ports' MAC addresses. While that may be true, when the bridge is VLAN-aware *and* it has a single port, there is no real reason to enable promiscuity even if that is an automatic port, with flooding and learning (there is nowhere for packets to go except to the BR_FDB_LOCAL entries), and this is how the corner case appears. Adding a second automatic interface to the bridge would make swp0 promisc as well, and would mask the corner case. Given the dev_uc_add() / ndo_set_rx_mode() API is what it is (it doesn't pass a VLAN ID), the only way to address that problem is to install host FDB entries for the cartesian product of RX filtering MAC addresses and VLAN RX filters. Fixes: 7569459a52c9 ("net: dsa: manage flooding on the CPU ports") Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20230329151821.745752-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 7bcad0f0e6fbc1d613e49e0ee35c8e5f2e685bb0 Author: Steffen Bätz Date: Wed Mar 29 12:01:40 2023 -0300 net: dsa: mv88e6xxx: Enable IGMP snooping on user ports only Do not set the MV88E6XXX_PORT_CTL0_IGMP_MLD_SNOOP bit on CPU or DSA ports. This allows the host CPU port to be a regular IGMP listener by sending out IGMP Membership Reports, which would otherwise not be forwarded by the mv88exxx chip, but directly looped back to the CPU port itself. Fixes: 54d792f257c6 ("net: dsa: Centralise global and port setup code into mv88e6xxx.") Signed-off-by: Steffen Bätz Signed-off-by: Fabio Estevam Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20230329150140.701559-1-festevam@gmail.com Signed-off-by: Jakub Kicinski commit 7af63e079a7d6d45a3796a7ba625e2ec131f62be Merge: e8d6d6f0aaa9e baad10973fdb4 Author: Daniel Vetter Date: Thu Mar 30 20:15:06 2023 +0200 Merge branch 'etnaviv/fixes' of https://git.pengutronix.de/git/lst/linux into drm-fixes - revert gpu time fdinfo support - reference leak fix on imported buffers Signed-off-by: Daniel Vetter From: Lucas Stach Link: https://patchwork.freedesktop.org/patch/msgid/de8e08c2599ec0e22456ae36e9757b9ff14c2124.camel@pengutronix.de commit ae817e618d4b5d221daae34d32a39476e4bdcb36 Author: David Arcari Date: Thu Mar 30 09:42:18 2023 -0400 thermal: intel: powerclamp: Fix cpumask and max_idle module parameters When cpumask is specified as a module parameter the value is overwritten by the module init routine. This can easily be fixed by checking to see if the mask has already been allocated in the init routine. When max_idle is specified as a module parameter a panic will occur. The problem is that the idle_injection_cpu_mask is not allocated until the module init routine executes. This can easily be fixed by allocating the cpumask if it's not already allocated. Fixes: ebf519710218 ("thermal: intel: powerclamp: Add two module parameters") Signed-off-by: David Arcari Reviewed-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki commit e8d6d6f0aaa9e1640ad94fb3b11e26c0edec753f Merge: 69620d5c03055 2fec9dc8e0acc Author: Daniel Vetter Date: Thu Mar 30 19:59:06 2023 +0200 Merge tag 'amd-drm-fixes-6.3-2023-03-30' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.3-2023-03-30: amdgpu: - Hibernation regression fix Signed-off-by: Daniel Vetter From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230330153859.18332-1-alexander.deucher@amd.com commit 69620d5c030553e81562f6f6f490c1fdd7f798fd Merge: 493fd8b87a84a 25bbe844ef5c4 Author: Daniel Vetter Date: Thu Mar 30 18:56:52 2023 +0200 Merge tag 'drm-misc-fixes-2023-03-30' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull: * various ivpu fixes * fix nouveau backlight registration * fix buddy allocator in 32-bit systems Signed-off-by: Daniel Vetter From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230330141006.GA22908@linux-uq9g commit 493fd8b87a84a67bae1237edde7affaf61bcbdba Merge: ce7a3d2e70719 68dc1846c3a44 Author: Daniel Vetter Date: Thu Mar 30 18:26:05 2023 +0200 Merge tag 'amd-drm-fixes-6.3-2023-03-29' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.3-2023-03-29: amdgpu: - Two DP MST fixes Signed-off-by: Daniel Vetter From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230329220059.7622-1-alexander.deucher@amd.com commit ce7a3d2e707193eefebcb9d2fc47e62ee83dc3bf Merge: 197b6b60ae7bc 5c95b2d5d44fa Author: Daniel Vetter Date: Thu Mar 30 18:07:12 2023 +0200 Merge tag 'drm-intel-fixes-2023-03-30' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v6.3-rc5: - Fix PMU support by reusing functions with sysfs - Fix a number of issues related to color, PSR and arm/noarm - Fix state check related to ICL PHY ownership check in TC-cold state - Flush lmem contents after construction - Fix hibernate oops related to DPT BO - Fix perf stream error path wakeref balance Signed-off-by: Daniel Vetter From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87355m4gtm.fsf@intel.com commit 8bb95a1662f8b97c443984550a7aefbe5a1a064e Merge: 4ee772243af1a 52aad39385e1b Author: Linus Torvalds Date: Thu Mar 30 09:04:04 2023 -0700 Merge tag 'sound-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes: - A potential deadlock fix for USB-audio, involving some change in PCM core side - A regression fix for probes of USB-audio devices with the vendor-specific PCM format bits - Two regression fixes for the old YMFPCI driver - A few HD-audio quirks as usual" * tag 'sound-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek: Add quirk for Lenovo ZhaoYang CF4620Z ALSA: ymfpci: Fix BUG_ON in probe function ALSA: ymfpci: Create card with device-managed snd_devm_card_new() ALSA: usb-audio: Fix regression on detection of Roland VS-100 ALSA: hda/realtek: Fix support for Dell Precision 3260 ALSA: usb-audio: Fix recursive locking at XRUN during syncing ALSA: hda/conexant: Partial revert of a quirk for Lenovo ALSA: hda/realtek: Add quirks for some Clevo laptops commit 4ee772243af1a6f5955413a64c5b36e8daed49bb Merge: ffe78bbd51216 77af13ba3c7f9 Author: Linus Torvalds Date: Thu Mar 30 09:00:17 2023 -0700 Merge tag 'zonefs-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs Pull zonefs fixes from Damien Le Moal: - Make sure to always invalidate the last page of an inode straddling inode->i_size to avoid data inconsistencies with appended data when the device zone write granularity does not match the page size. - Do not propagate iomap -ENOBLK error to userspace and use -EBUSY instead. * tag 'zonefs-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs: zonefs: Do not propagate iomap_dio_rw() ENOTBLK error to user space zonefs: Always invalidate last cached page on append write commit baad10973fdb442912af676de3348e80bd8fe602 Author: Lucas Stach Date: Thu Mar 30 17:35:13 2023 +0200 Revert "drm/scheduler: track GPU active time per entity" This reverts commit df622729ddbf as it introduces a use-after-free, which isn't easy to fix without going back to the design drawing board. Reported-by: Danilo Krummrich Signed-off-by: Lucas Stach commit 2658d0d0355a3470a96d0e4268cbad174fadf0ed Author: Lucas Stach Date: Thu Mar 30 17:33:27 2023 +0200 Revert "drm/etnaviv: export client GPU usage statistics via fdinfo" This reverts commit 97804a133c68, as it builds on top of df622729ddbf ("drm/scheduler: track GPU active time per entity") which needs to be reverted, as it introduces a use-after-free. Signed-off-by: Lucas Stach commit 963b2e8c428f79489ceeb058e8314554ec9cbe6f Author: Lucas Stach Date: Fri Feb 24 18:21:54 2023 +0100 drm/etnaviv: fix reference leak when mmaping imported buffer drm_gem_prime_mmap() takes a reference on the GEM object, but before that drm_gem_mmap_obj() already takes a reference, which will be leaked as only one reference is dropped when the mapping is closed. Drop the extra reference when dma_buf_mmap() succeeds. Cc: stable@vger.kernel.org Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner commit 2fec9dc8e0acc3dfb56d1389151bcf405f087b10 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 Cc: stable@vger.kernel.org # 6.1.x commit f6caea4855553a8b99ba3ec23ecdb5ed8262f26c Author: Mathias Nyman Date: Thu Mar 30 17:30:56 2023 +0300 xhci: Free the command allocated for setting LPM if we return early The command allocated to set exit latency LPM values need to be freed in case the command is never queued. This would be the case if there is no change in exit latency values, or device is missing. Reported-by: Mirsad Goran Todorovac Link: https://lore.kernel.org/linux-usb/24263902-c9b3-ce29-237b-1c3d6918f4fe@alu.unizg.hr Tested-by: Mirsad Goran Todorovac Fixes: 5c2a380a5aa8 ("xhci: Allocate separate command structures for each LPM command") Cc: Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230330143056.1390020-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 8e77d3d59d7b5da13deda1d832c51b8bbdbe2037 Author: Mathias Nyman Date: Thu Mar 30 17:30:55 2023 +0300 Revert "usb: xhci-pci: Set PROBE_PREFER_ASYNCHRONOUS" This reverts commit 4c2604a9a6899bab195edbee35fc8d64ce1444aa. Asynch probe caused regression in a setup with both Renesas and Intel xHC controllers. Devices connected to the Renesas disconnected shortly after boot. With Asynch probe the busnumbers got interleaved. xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 1 xhci_hcd 0000:04:00.0: new USB bus registered, assigned bus number 2 xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 3 xhci_hcd 0000:04:00.0: new USB bus registered, assigned bus number 4 Reason why this commit causes regression is still unknown, but revert it while debugging the issue. Fixes: 4c2604a9a689 ("usb: xhci-pci: Set PROBE_PREFER_ASYNCHRONOUS") Cc: stable Link: https://lore.kernel.org/linux-usb/20230307132120.5897c5af@deangelis.fenrir.org.uk Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230330143056.1390020-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ecaa4902439298f6b0e29f47424a86b310a9ff4f Author: D Scott Phillips Date: Thu Mar 30 17:30:54 2023 +0300 xhci: also avoid the XHCI_ZERO_64B_REGS quirk with a passthrough iommu Previously the quirk was skipped when no iommu was present. The same rationale for skipping the quirk also applies in the iommu.passthrough=1 case. Skip applying the XHCI_ZERO_64B_REGS quirk if the device's iommu domain is passthrough. Fixes: 12de0a35c996 ("xhci: Add quirk to zero 64bit registers on Renesas PCIe controllers") Cc: stable Signed-off-by: D Scott Phillips Acked-by: Marc Zyngier Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230330143056.1390020-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 2eca98e5b24d01c02b46c67be05a5f98cc9789b1 Author: Juergen Gross Date: Wed Mar 29 10:02:59 2023 +0200 xen/netback: use same error messages for same errors Issue the same error message in case an illegal page boundary crossing has been detected in both cases where this is tested. Suggested-by: Jan Beulich Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Link: https://lore.kernel.org/r/20230329080259.14823-1-jgross@suse.com Signed-off-by: Paolo Abeni commit fd30d1cdcc4ff405fc54765edf2e11b03f2ed4f3 Author: Pavel Begunkov Date: Thu Mar 30 06:52:38 2023 -0600 io_uring: fix poll/netmsg alloc caches We increase cache->nr_cached when we free into the cache but don't decrease when we take from it, so in some time we'll get an empty cache with cache->nr_cached larger than IO_ALLOC_CACHE_MAX, that fails io_alloc_cache_put() and effectively disables caching. Fixes: 9b797a37c4bd8 ("io_uring: add abstraction around apoll cache") Cc: stable@vger.kernel.org Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 77af13ba3c7f91d91c377c7e2d122849bbc17128 Author: Damien Le Moal Date: Thu Mar 30 09:47:58 2023 +0900 zonefs: Do not propagate iomap_dio_rw() ENOTBLK error to user space The call to invalidate_inode_pages2_range() in __iomap_dio_rw() may fail, in which case -ENOTBLK is returned and this error code is propagated back to user space trhough iomap_dio_rw() -> zonefs_file_dio_write() return chain. This error code is fairly obscure and may confuse the user. Avoid this and be consistent with the behavior of zonefs_file_dio_append() for similar invalidate_inode_pages2_range() errors by returning -EBUSY to user space when iomap_dio_rw() returns -ENOTBLK. Suggested-by: Christoph Hellwig Fixes: 8dcc1a9d90c1 ("fs: New zonefs file system") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Tested-by: Hans Holmberg commit c1976bd8f23016d8706973908f2bb0ac0d852a8f Author: Damien Le Moal Date: Wed Mar 29 13:16:01 2023 +0900 zonefs: Always invalidate last cached page on append write When a direct append write is executed, the append offset may correspond to the last page of a sequential file inode which might have been cached already by buffered reads, page faults with mmap-read or non-direct readahead. To ensure that the on-disk and cached data is consistant for such last cached page, make sure to always invalidate it in zonefs_file_dio_append(). If the invalidation fails, return -EBUSY to userspace to differentiate from IO errors. This invalidation will always be a no-op when the FS block size (device zone write granularity) is equal to the page size (e.g. 4K). Reported-by: Hans Holmberg Fixes: 02ef12a663c7 ("zonefs: use REQ_OP_ZONE_APPEND for sync DIO") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Tested-by: Hans Holmberg commit 87891399d9883ed823ba58c2be3ac20cc499ad7d Author: Chris Morgan Date: Mon Mar 27 10:35:47 2023 -0500 arm64: dts: rockchip: Add clk_rtc_32k to Anbernic xx3 Devices For the Anbernic devices to display properly, we need to specify the clock frequency of the PLL_VPLL. Adding the parent clock in the rk356x.dtsi requires us to update our clock definitions to accomplish this. Fixes: 64b69474edf3 ("arm64: dts: rockchip: assign rate to clk_rtc_32k on rk356x") Signed-off-by: Chris Morgan Link: https://lore.kernel.org/r/20230327153547.821822-1-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner commit 12b220a6171faf10638ab683a975cadcf1a352d6 Author: Felix Fietkau Date: Fri Mar 24 13:09:24 2023 +0100 wifi: mac80211: fix invalid drv_sta_pre_rcu_remove calls for non-uploaded sta Avoid potential data corruption issues caused by uninitialized driver private data structures. Reported-by: Brian Coverstone Fixes: 6a9d1b91f34d ("mac80211: add pre-RCU-sync sta removal driver operation") Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20230324120924.38412-3-nbd@nbd.name Signed-off-by: Johannes Berg commit 899c2c11810cfe38cb01c847d0df98e181ea5728 Author: Felix Fietkau Date: Fri Mar 24 13:09:23 2023 +0100 wifi: mac80211: fix flow dissection for forwarded packets Adjust the network header to point at the correct payload offset Fixes: 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces") Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20230324120924.38412-2-nbd@nbd.name Signed-off-by: Johannes Berg commit 8f0149a8ac59c12cd47271ac625c27dac5621d3a Author: Felix Fietkau Date: Fri Mar 24 13:09:22 2023 +0100 wifi: mac80211: fix mesh forwarding Linearize packets (needed for forwarding A-MSDU subframes). Fixes: 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces") Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20230324120924.38412-1-nbd@nbd.name Signed-off-by: Johannes Berg commit e26c0946a5c1aa4d27f8dfe78f2a72b4550df91f Author: Felix Fietkau Date: Sun Mar 26 17:17:09 2023 +0200 wifi: mac80211: fix receiving mesh packets in forwarding=0 networks When forwarding is set to 0, frames are typically sent with ttl=1. Move the ttl decrement check below the check for local receive in order to fix packet drops. Reported-by: Thomas Hühn Reported-by: Nick Hainke Fixes: 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces") Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20230326151709.17743-1-nbd@nbd.name Signed-off-by: Johannes Berg commit dd01579e5ed922dcfcb8fec53fa03b81c7649a04 Author: Ryder Lee Date: Tue Mar 28 01:07:41 2023 +0800 wifi: mac80211: fix the size calculation of ieee80211_ie_len_eht_cap() Here should return the size of ieee80211_eht_cap_elem_fixed, so fix it. Fixes: 820acc810fb6 ("mac80211: Add EHT capabilities to association/probe request") Signed-off-by: Ryder Lee Link: https://lore.kernel.org/r/06c13635fc03bcff58a647b8e03e9f01a74294bd.1679935259.git.ryder.lee@mediatek.com Signed-off-by: Johannes Berg commit a16fc38315f2c69c520ee769976ecb9c706b8560 Author: Felix Fietkau Date: Thu Mar 30 11:00:01 2023 +0200 wifi: mac80211: fix potential null pointer dereference rx->sta->amsdu_mesh_control is being passed to ieee80211_amsdu_to_8023s without checking rx->sta. Since it doesn't make sense to accept A-MSDU packets without a sta, simply add a check earlier. Fixes: 6e4c0d0460bd ("wifi: mac80211: add a workaround for receiving non-standard mesh A-MSDU") Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20230330090001.60750-2-nbd@nbd.name Signed-off-by: Johannes Berg commit 4d78e032fee5d532e189cdb2c3c76112094e9751 Author: Felix Fietkau Date: Thu Mar 30 11:00:00 2023 +0200 wifi: mac80211: drop bogus static keywords in A-MSDU rx These were unintentional copy&paste mistakes. Cc: stable@vger.kernel.org Fixes: 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces") Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20230330090001.60750-1-nbd@nbd.name Signed-off-by: Johannes Berg commit fed8d8773b8ea68ad99d9eee8c8343bef9da2c2c Author: Eric DeVolder Date: Mon Mar 27 15:10:26 2023 -0400 x86/acpi/boot: Correct acpi_is_processor_usable() check The logic in acpi_is_processor_usable() requires the online capable bit be set for hotpluggable CPUs. The online capable bit has been introduced in ACPI 6.3. However, for ACPI revisions < 6.3 which do not support that bit, CPUs should be reported as usable, not the other way around. Reverse the check. [ bp: Rewrite commit message. ] Fixes: e2869bd7af60 ("x86/acpi/boot: Do not register processors that cannot be onlined for x2APIC") Suggested-by: Miguel Luis Suggested-by: Boris Ostrovsky Signed-off-by: Eric DeVolder Signed-off-by: Borislav Petkov (AMD) Tested-by: David R Cc: Link: https://lore.kernel.org/r/20230327191026.3454-2-eric.devolder@oracle.com commit a74fabfbd1b7013045afc8cc541e6cab3360ccb5 Author: Mario Limonciello Date: Wed Mar 29 12:45:35 2023 -0500 x86/ACPI/boot: Use FADT version to check support for online capable ACPI 6.3 introduced the online capable bit, and also introduced MADT version 5. Latter was used to distinguish whether the offset storing online capable could be used. However ACPI 6.2b has MADT version "45" which is for an errata version of the ACPI 6.2 spec. This means that the Linux code for detecting availability of MADT will mistakenly flag ACPI 6.2b as supporting online capable which is inaccurate as it's an ACPI 6.3 feature. Instead use the FADT major and minor revision fields to distinguish this. [ bp: Massage. ] Fixes: aa06e20f1be6 ("x86/ACPI: Don't add CPUs that are not online capable") Reported-by: Eric DeVolder Reported-by: Borislav Petkov Signed-off-by: Mario Limonciello Signed-off-by: Borislav Petkov (AMD) Cc: Link: https://lore.kernel.org/r/943d2445-84df-d939-f578-5d8240d342cc@unsolicited.net commit 6f5d82806b50fa5f658796ef1c394577ba7b4a35 Merge: 209373537648d 25209a3209ecc Author: Paolo Abeni Date: Thu Mar 30 10:47:51 2023 +0200 Merge branch 'fix-header-length-on-skb-merging' Arseniy Krasnov says: ==================== fix header length on skb merging this patchset fixes appending newly arrived skbuff to the last skbuff of the socket's queue during rx path. Problem fires when we are trying to append data to skbuff which was already processed in dequeue callback at least once. Dequeue callback calls function 'skb_pull()' which changes 'skb->len'. In current implementation 'skb->len' is used to update length in header of last skbuff after new data was copied to it. This is bug, because value in header is used to calculate 'rx_bytes'/'fwd_cnt' and thus must be constant during skbuff lifetime. Here is example, we have two skbuffs: skb0 with length 10 and skb1 with length 4. 1) skb0 arrives, hdr->len == skb->len == 10, rx_bytes == 10 2) Read 3 bytes from skb0, skb->len == 7, hdr->len == 10, rx_bytes == 10 3) skb1 arrives, hdr->len == skb->len == 4, rx_bytes == 14 4) Append skb1 to skb0, skb0 now has skb->len == 11, hdr->len == 11. But value of 11 in header is invalid. 5) Read whole skb0, update rx_bytes by 11 from skb0's header. 6) At this moment rx_bytes == 3, but socket's queue is empty. This bug starts to fire since: commit 077706165717 ("virtio/vsock: don't use skbuff state to account credit") In fact, it presents before, but didn't triggered due to a little bit buggy implementation of credit calculation logic. So i'll use Fixes tag for it. I really forgot about this branch in rx path when implemented patch 077706165717. This patchset contains 3 patches: 1) Fix itself. 2) Patch with WARN_ONCE() to catch such problems in future. 3) Patch with test which triggers skb appending logic. It looks like simple test with several 'send()' and 'recv()', but it checks, that skbuff appending works ok. ==================== Link: https://lore.kernel.org/r/0683cc6e-5130-484c-1105-ef2eb792d355@sberdevices.ru Signed-off-by: Paolo Abeni commit 25209a3209ecc44f93300b7ee5287f451be1d6ff Author: Arseniy Krasnov Date: Tue Mar 28 14:33:07 2023 +0300 test/vsock: new skbuff appending test This adds test which checks case when data of newly received skbuff is appended to the last skbuff in the socket's queue. It looks like simple test with 'send()' and 'recv()', but internally it triggers logic which appends one received skbuff to another. Test checks that this feature works correctly. This test is actual only for virtio transport. Signed-off-by: Arseniy Krasnov Reviewed-by: Stefano Garzarella Signed-off-by: Paolo Abeni commit b8d2f61fdf2a566f7872158f35e65599aceb90fb Author: Arseniy Krasnov Date: Tue Mar 28 14:32:12 2023 +0300 virtio/vsock: WARN_ONCE() for invalid state of socket This adds WARN_ONCE() and return from stream dequeue callback when socket's queue is empty, but 'rx_bytes' still non-zero. This allows the detection of potential bugs due to packet merging (see previous patch). Signed-off-by: Arseniy Krasnov Reviewed-by: Stefano Garzarella Signed-off-by: Paolo Abeni commit f7154d967bc4ee25ea1572937550e711b2525474 Author: Arseniy Krasnov Date: Tue Mar 28 14:31:28 2023 +0300 virtio/vsock: fix header length on skb merging This fixes appending newly arrived skbuff to the last skbuff of the socket's queue. Problem fires when we are trying to append data to skbuff which was already processed in dequeue callback at least once. Dequeue callback calls function 'skb_pull()' which changes 'skb->len'. In current implementation 'skb->len' is used to update length in header of the last skbuff after new data was copied to it. This is bug, because value in header is used to calculate 'rx_bytes'/'fwd_cnt' and thus must be not be changed during skbuff's lifetime. Bug starts to fire since: commit 077706165717 ("virtio/vsock: don't use skbuff state to account credit") It presents before, but didn't triggered due to a little bit buggy implementation of credit calculation logic. So use Fixes tag for it. Fixes: 077706165717 ("virtio/vsock: don't use skbuff state to account credit") Signed-off-by: Arseniy Krasnov Reviewed-by: Stefano Garzarella Signed-off-by: Paolo Abeni commit 8671133082176d1388e20ac33d61cf7e3b05adf5 Author: Linus Walleij Date: Fri Mar 24 11:15:31 2023 +0100 tee: Pass a pointer 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 Signed-off-by: Jens Wiklander commit f9ea835e99bc8d049bf2a3ec8fa5a7cb4fcade23 Author: Reiji Watanabe Date: Tue Mar 28 19:39:44 2023 -0700 KVM: arm64: PMU: Restore the guest's EL0 event counting after migration Currently, with VHE, KVM enables the EL0 event counting for the guest on vcpu_load() or KVM enables it as a part of the PMU register emulation process, when needed. However, in the migration case (with VHE), the same handling is lacking, as vPMU register values that were restored by userspace haven't been propagated yet (the PMU events haven't been created) at the vcpu load-time on the first KVM_RUN (kvm_vcpu_pmu_restore_guest() called from vcpu_load() on the first KVM_RUN won't do anything as events_{guest,host} of kvm_pmu_events are still zero). So, with VHE, enable the guest's EL0 event counting on the first KVM_RUN (after the migration) when needed. More specifically, have kvm_pmu_handle_pmcr() call kvm_vcpu_pmu_restore_guest() so that kvm_pmu_handle_pmcr() on the first KVM_RUN can take care of it. Fixes: d0c94c49792c ("KVM: arm64: Restore PMU configuration on first run") Cc: stable@vger.kernel.org Reviewed-by: Marc Zyngier Signed-off-by: Reiji Watanabe Link: https://lore.kernel.org/r/20230329023944.2488484-1-reijiw@google.com Signed-off-by: Oliver Upton commit 209373537648d815a104c3af787663d7db06bd5d Merge: c5cff16f461a4 581bce7bcb7e7 Author: Jakub Kicinski Date: Wed Mar 29 21:48:18 2023 -0700 Merge branch 'bnxt_en-3-bug-fixes' Michael Chan says: ==================== bnxt_en: 3 Bug fixes This series contains 3 small bug fixes covering ethtool self test, PCI ID string typos, and some missing 200G link speed ethtool reporting logic. ==================== Link: https://lore.kernel.org/r/20230329013021.5205-1-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 581bce7bcb7e7f100908728e7b292e266c76895b Author: Michael Chan Date: Tue Mar 28 18:30:21 2023 -0700 bnxt_en: Add missing 200G link speed reporting bnxt_fw_to_ethtool_speed() is missing the case statement for 200G link speed reported by firmware. As a result, ethtool will report unknown speed when the firmware reports 200G link speed. Fixes: 532262ba3b84 ("bnxt_en: ethtool: support PAM4 link speeds up to 200G") Signed-off-by: Michael Chan Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit 62aad36ed31abc80f35db11e187e690448a79f7d Author: Kalesh AP Date: Tue Mar 28 18:30:20 2023 -0700 bnxt_en: Fix typo in PCI id to device description string mapping Fix 57502 and 57508 NPAR description string entries. The typos caused these devices to not match up with lspci output. Fixes: 49c98421e6ab ("bnxt_en: Add PCI IDs for 57500 series NPAR devices.") Reviewed-by: Pavan Chebbi Signed-off-by: Kalesh AP Signed-off-by: Michael Chan Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit 83714dc3db0e4a088673601bc8099b079bc1a077 Author: Kalesh AP Date: Tue Mar 28 18:30:19 2023 -0700 bnxt_en: Fix reporting of test result in ethtool selftest When the selftest command fails, driver is not reporting the failure by updating the "test->flags" when bnxt_close_nic() fails. Fixes: eb51365846bc ("bnxt_en: Add basic ethtool -t selftest support.") Reviewed-by: Pavan Chebbi Reviewed-by: Somnath Kotur Signed-off-by: Kalesh AP Signed-off-by: Michael Chan Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit c5cff16f461a4a434a9915a7be7ac9ced861a8a4 Author: Radoslaw Tyl Date: Tue Mar 28 10:26:59 2023 -0700 i40e: fix registers dump after run ethtool adapter self test Fix invalid registers dump from ethtool -d ethX after adapter self test by ethtool -t ethY. It causes invalid data display. The problem was caused by overwriting i40e_reg_list[].elements which is common for ethtool self test and dump. Fixes: 22dd9ae8afcc ("i40e: Rework register diagnostic") Signed-off-by: Radoslaw Tyl Reviewed-by: Michal Swiatkowski Tested-by: Arpana Arland (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20230328172659.3906413-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 165d35159c5797ae900a8262ce2c44592216aa4e Merge: a4d7108c2efb5 e9a1cc2e4c4ee Author: Jakub Kicinski Date: Wed Mar 29 21:46: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-03-28 (ice) This series contains updates to ice driver only. Jesse fixes mismatched header documentation reported when building with W=1. Brett restricts setting of VSI context to only applicable fields for the given ICE_AQ_VSI_PROP_Q_OPT_VALID bit. Junfeng adds check when adding Flow Director filters that conflict with existing filter rules. Jakob Koschel adds interim variable for iterating to prevent possible misuse after looping. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ice: fix invalid check for empty list in ice_sched_assoc_vsi_to_agg() ice: add profile conflict check for AVF FDIR ice: Fix ice_cfg_rdma_fltr() to only update relevant fields ice: fix W=1 headers mismatch ==================== Link: https://lore.kernel.org/r/20230328172035.3904953-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit a4d7108c2efb536e0f55c3d02d5b37dd0ec67601 Merge: 8c495270845d6 984cfd55e0c99 Author: Jakub Kicinski Date: Wed Mar 29 21:41:12 2023 -0700 Merge tag 'ieee802154-for-net-2023-03-29' of git://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan Stefan Schmidt says: ==================== ieee802154 for net 2023-03-29 Two small fixes this time. Dongliang Mu removed an unnecessary null pointer check. Harshit Mogalapalli fixed an int comparison unsigned against signed from a recent other fix in the ca8210 driver. * tag 'ieee802154-for-net-2023-03-29' of git://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan: net: ieee802154: remove an unnecessary null pointer check ca8210: Fix unsigned mac_len comparison with zero in ca8210_skb_tx() ==================== Link: https://lore.kernel.org/r/20230329064541.2147400-1-stefan@datenfreihafen.org Signed-off-by: Jakub Kicinski commit 8c495270845d6b4854607e946baef3637a8259ed Author: Jakub Kicinski Date: Tue Mar 28 17:00:13 2023 -0700 bnx2x: use the right build_skb() helper build_skb() no longer accepts slab buffers. Since slab use is fairly uncommon we prefer the drivers to call a separate slab_build_skb() function appropriately. bnx2x uses the old semantics where size of 0 meant buffer from slab. It sets the fp->rx_frag_size to 0 for MTUs which don't fit in a page. It needs to call slab_build_skb(). This fixes the WARN_ONCE() of incorrect API use seen with bnx2x. Reported-by: Thomas Voegtle Link: https://lore.kernel.org/all/b8f295e4-ba57-8bfb-7d9c-9d62a498a727@lio96.de/ Fixes: ce098da1497c ("skbuff: Introduce slab_build_skb()") Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20230329000013.2734957-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 6c75dc94f2b27fff57b305af9236eea181a00b6c Author: Alex Elder Date: Tue Mar 28 11:27:51 2023 -0500 net: ipa: compute DMA pool size properly In gsi_trans_pool_init_dma(), the total size of a pool of memory used for DMA transactions is calculated. However the calculation is done incorrectly. For 4KB pages, this total size is currently always more than one page, and as a result, the calculation produces a positive (though incorrect) total size. The code still works in this case; we just end up with fewer DMA pool entries than we intended. Bjorn Andersson tested booting a kernel with 16KB pages, and hit a null pointer derereference in sg_alloc_append_table_from_pages(), descending from gsi_trans_pool_init_dma(). The cause of this was that a 16KB total size was going to be allocated, and with 16KB pages the order of that allocation is 0. The total_size calculation yielded 0, which eventually led to the crash. Correcting the total_size calculation fixes the problem. Reported-by: Bjorn Andersson Tested-by: Bjorn Andersson Fixes: 9dd441e4ed57 ("soc: qcom: ipa: GSI transactions") Reviewed-by: Mark Bloch Signed-off-by: Alex Elder Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20230328162751.2861791-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 88eaba80328b31ef81813a1207b4056efd7006a6 Author: Sagi Grimberg Date: Mon Mar 20 15:33:34 2023 +0200 nvme-tcp: fix a possible UAF when failing to allocate an io queue When we allocate a nvme-tcp queue, we set the data_ready callback before we actually need to use it. This creates the potential that if a stray controller sends us data on the socket before we connect, we can trigger the io_work and start consuming the socket. In this case reported: we failed to allocate one of the io queues, and as we start releasing the queues that we already allocated, we get a UAF [1] from the io_work which is running before it should really. Fix this by setting the socket ops callbacks only before we start the queue, so that we can't accidentally schedule the io_work in the initialization phase before the queue started. While we are at it, rename nvme_tcp_restore_sock_calls to pair with nvme_tcp_setup_sock_ops. [1]: [16802.107284] nvme nvme4: starting error recovery [16802.109166] nvme nvme4: Reconnecting in 10 seconds... [16812.173535] nvme nvme4: failed to connect socket: -111 [16812.173745] nvme nvme4: Failed reconnect attempt 1 [16812.173747] nvme nvme4: Reconnecting in 10 seconds... [16822.413555] nvme nvme4: failed to connect socket: -111 [16822.413762] nvme nvme4: Failed reconnect attempt 2 [16822.413765] nvme nvme4: Reconnecting in 10 seconds... [16832.661274] nvme nvme4: creating 32 I/O queues. [16833.919887] BUG: kernel NULL pointer dereference, address: 0000000000000088 [16833.920068] nvme nvme4: Failed reconnect attempt 3 [16833.920094] #PF: supervisor write access in kernel mode [16833.920261] nvme nvme4: Reconnecting in 10 seconds... [16833.920368] #PF: error_code(0x0002) - not-present page [16833.921086] Workqueue: nvme_tcp_wq nvme_tcp_io_work [nvme_tcp] [16833.921191] RIP: 0010:_raw_spin_lock_bh+0x17/0x30 ... [16833.923138] Call Trace: [16833.923271] [16833.923402] lock_sock_nested+0x1e/0x50 [16833.923545] nvme_tcp_try_recv+0x40/0xa0 [nvme_tcp] [16833.923685] nvme_tcp_io_work+0x68/0xa0 [nvme_tcp] [16833.923824] process_one_work+0x1e8/0x390 [16833.923969] worker_thread+0x53/0x3d0 [16833.924104] ? process_one_work+0x390/0x390 [16833.924240] kthread+0x124/0x150 [16833.924376] ? set_kthread_struct+0x50/0x50 [16833.924518] ret_from_fork+0x1f/0x30 [16833.924655] Reported-by: Yanjun Zhang Signed-off-by: Sagi Grimberg Tested-by: Yanjun Zhang Signed-off-by: Christoph Hellwig commit 1e020e1b96afdecd20680b5b5be2a6ffc3d27628 Author: Zhihao Cheng Date: Mon Mar 6 09:33:08 2023 +0800 ubi: Fix failure attaching when vid_hdr offset equals to (sub)page size Following process will make ubi attaching failed since commit 1b42b1a36fc946 ("ubi: ensure that VID header offset ... size"): ID="0xec,0xa1,0x00,0x15" # 128M 128KB 2KB modprobe nandsim id_bytes=$ID flash_eraseall /dev/mtd0 modprobe ubi mtd="0,2048" # set vid_hdr offset as 2048 (one page) (dmesg): ubi0 error: ubi_attach_mtd_dev [ubi]: VID header offset 2048 too large. UBI error: cannot attach mtd0 UBI error: cannot initialize UBI, error -22 Rework original solution, the key point is making sure 'vid_hdr_shift + UBI_VID_HDR_SIZE < ubi->vid_hdr_alsize', so we should check vid_hdr_shift rather not vid_hdr_offset. Then, ubi still support (sub)page aligined VID header offset. Fixes: 1b42b1a36fc946 ("ubi: ensure that VID header offset ... size") Signed-off-by: Zhihao Cheng Tested-by: Nicolas Schichan Tested-by: Miquel Raynal # v5.10, v4.19 Signed-off-by: Richard Weinberger commit 68dc1846c3a44d5e633be145c169ce2fd5420695 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 f4f3b7dedbe849e780c779ba67365bb1db0d8637 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 Cc: stable@vger.kernel.org commit 4622f159098e098611f393cccf73d52b007e70bc Merge: e89c2e815e764 1ee7fc3f4d0a9 Author: Palmer Dabbelt Date: Wed Mar 29 11:48:41 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: merging in the fixes as a branch as there's some features that depend on it.] * 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 aa874cdfec07d4dd9c6f0c356d65c609ba31a26f Author: Tharun Kumar P Date: Mon Mar 20 19:52:37 2023 +0530 i2c: mchp-pci1xxxx: Update Timing registers Update I2C timing registers based on latest hardware design. This fix does not break functionality of chips with older design and existing users will not be affected. Fixes: 361693697249 ("i2c: microchip: pci1xxxx: Add driver for I2C host controller in multifunction endpoint of pci1xxxx switch") Signed-off-by: Tharun Kumar P Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang commit 1ee7fc3f4d0a93831a20d5566f203d5ad6d44de8 Author: Conor Dooley Date: Fri Mar 24 10:05:39 2023 +0000 RISC-V: always select RISCV_ALTERNATIVE for non-xip kernels When moving switch_to's has_fpu() over to using riscv_has_extension_likely() rather than static branches, the FPU code gained a dependency on the alternatives framework. That dependency has now been removed, as riscv_has_extension_ikely() now contains a fallback path, using __riscv_isa_extension_available(), but if CONFIG_RISCV_ALTERNATIVE isn't selected when CONFIG_FPU is, has_fpu() checks will not benefit from the "fast path" that the alternatives framework provides. We want to ensure that alternatives are available whenever riscv_has_extension_[un]likely() is used, rather than silently falling back to the slow path, but rather than rely on selecting RISCV_ALTERNATIVE in the myriad of locations that may use riscv_has_extension_[un]likely(), select it (almost) always instead by adding it to the main RISCV config entry. xip kernels cannot make use of the alternatives framework, so it is not enabled for those configurations, although this is the status quo. All current sites that select RISCV_ALTERNATIVE are converted to dependencies on the option instead. The explicit dependencies on !XIP_KERNEL can be dropped, as RISCV_ALTERNATIVE is not user selectable. Fixes: 702e64550b12 ("riscv: fpu: switch has_fpu() to riscv_has_extension_likely()") Link: https://lore.kernel.org/all/ZBruFRwt3rUVngPu@zx2c4.com/ Reported-by: Jason A. Donenfeld Signed-off-by: Conor Dooley Reviewed-by: Andrew Jones Reviewed-by: Jason A. Donenfeld Link: https://lore.kernel.org/r/20230324100538.3514663-3-conor.dooley@microchip.com Signed-off-by: Palmer Dabbelt commit 1aa866931b8026a0dd636e9ef7b5c5dfb4cc5ce8 Author: Conor Dooley Date: Fri Mar 24 10:05:38 2023 +0000 RISC-V: add non-alternative fallback for riscv_has_extension_[un]likely() The has_fpu() check, which in turn calls riscv_has_extension_likely(), relies on alternatives to figure out whether the system has an FPU. As a result, it will malfunction on XIP kernels, as they do not support the alternatives mechanism. When alternatives support is not present, fall back to using __riscv_isa_extension_available() in riscv_has_extension_[un]likely() instead stead, which handily takes the same argument, so that kernels that do not support alternatives can accurately report the presence of FPU support. Fixes: 702e64550b12 ("riscv: fpu: switch has_fpu() to riscv_has_extension_likely()") Link: https://lore.kernel.org/all/ad445951-3d13-4644-94d9-e0989cda39c3@spud/ Signed-off-by: Conor Dooley Reviewed-by: Andrew Jones Reviewed-by: Jason A. Donenfeld Link: https://lore.kernel.org/r/20230324100538.3514663-2-conor.dooley@microchip.com Signed-off-by: Palmer Dabbelt commit 292fd843de26c551856e66faf134512c52dd78b4 Author: Waiman Long Date: Fri Mar 17 11:15:05 2023 -0400 cgroup/cpuset: Fix partition root's cpuset.cpus update bug It was found that commit 7a2127e66a00 ("cpuset: Call set_cpus_allowed_ptr() with appropriate mask for task") introduced a bug that corrupted "cpuset.cpus" of a partition root when it was updated. It is because the tmp->new_cpus field of the passed tmp parameter of update_parent_subparts_cpumask() should not be used at all as it contains important cpumask data that should not be overwritten. Fix it by using tmp->addmask instead. Also update update_cpumask() to make sure that trialcs->cpu_allowed will not be corrupted until it is no longer needed. Fixes: 7a2127e66a00 ("cpuset: Call set_cpus_allowed_ptr() with appropriate mask for task") Signed-off-by: Waiman Long Cc: stable@vger.kernel.org # v6.2+ Signed-off-by: Tejun Heo commit a57cc2dbb3738930d9cb361b9b473f90c8ede0b8 Author: Srinivas Pandruvada Date: Wed Mar 29 08:22:07 2023 -0700 thermal: intel: int340x: processor_thermal: Fix additional deadlock Commit 52f04f10b900 ("thermal: intel: int340x: processor_thermal: Fix deadlock") addressed deadlock issue during user space trip update. But it missed a case when thermal zone device is disabled when user writes 0. Call to thermal_zone_device_disable() also causes deadlock as it also tries to lock tz->lock, which is already claimed by trip_point_temp_store() in the thermal core code. Remove call to thermal_zone_device_disable() in the function sys_set_trip_temp(), which is called from trip_point_temp_store(). Fixes: 52f04f10b900 ("thermal: intel: int340x: processor_thermal: Fix deadlock") Signed-off-by: Srinivas Pandruvada Cc: 6.2+ # 6.2+ Signed-off-by: Rafael J. Wysocki commit 433279beba1d4872da10b7b60a539e0cb828b32b Author: Yu Kuai Date: Tue Mar 28 17:44:00 2023 +0800 md: fix regression for null-ptr-deference in __md_stop() Commit 3e453522593d ("md: Free resources in __md_stop") tried to fix null-ptr-deference for 'active_io' by moving percpu_ref_exit() to __md_stop(), however, the commit also moving 'writes_pending' to __md_stop(), and this will cause mdadm tests broken: BUG: kernel NULL pointer dereference, address: 0000000000000038 Oops: 0000 [#1] PREEMPT SMP CPU: 15 PID: 17830 Comm: mdadm Not tainted 6.3.0-rc3-next-20230324-00009-g520d37 RIP: 0010:free_percpu+0x465/0x670 Call Trace: __percpu_ref_exit+0x48/0x70 percpu_ref_exit+0x1a/0x90 __md_stop+0xe9/0x170 do_md_stop+0x1e1/0x7b0 md_ioctl+0x90c/0x1aa0 blkdev_ioctl+0x19b/0x400 vfs_ioctl+0x20/0x50 __x64_sys_ioctl+0xba/0xe0 do_syscall_64+0x6c/0xe0 entry_SYSCALL_64_after_hwframe+0x63/0xcd And the problem can be reporduced 100% by following test: mdadm -CR /dev/md0 -l1 -n1 /dev/sda --force echo inactive > /sys/block/md0/md/array_state echo read-auto > /sys/block/md0/md/array_state echo inactive > /sys/block/md0/md/array_state Root cause: // start raid raid1_run mddev_init_writes_pending percpu_ref_init // inactive raid array_state_store do_md_stop __md_stop percpu_ref_exit // start raid again array_state_store do_md_run raid1_run mddev_init_writes_pending if (mddev->writes_pending.percpu_count_ptr) // won't reinit // inactive raid again ... percpu_ref_exit -> null-ptr-deference Before the commit, 'writes_pending' is exited when mddev is freed, and it's safe to restart raid because mddev_init_writes_pending() already make sure that 'writes_pending' will only be initialized once. Fix the prblem by moving 'writes_pending' back, it's a litter hard to find the relationship between alloc memory and free memory, however, code changes is much less and we lived with this for a long time already. Fixes: 3e453522593d ("md: Free resources in __md_stop") Signed-off-by: Yu Kuai Reviewed-by: Xiao Ni Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20230328094400.1448955-1-yukuai1@huaweicloud.com commit ffe78bbd512166e0ef1cc4858010b128c510ed7d Merge: 3577a4d37f9e5 e313de5b5b041 Author: Linus Torvalds Date: Wed Mar 29 10:24:07 2023 -0700 Merge tag 'xtensa-20230327' of https://github.com/jcmvbkbc/linux-xtensa Pull xtensa fixes from Max Filippov: - fix KASAN report in show_stack - drop linux-xtensa mailing list from the MAINTAINERS file * tag 'xtensa-20230327' of https://github.com/jcmvbkbc/linux-xtensa: MAINTAINERS: xtensa: drop linux-xtensa@linux-xtensa.org mailing list xtensa: fix KASAN report for show_stack commit 3577a4d37f9e5caeb817e221482385151795ec6a Merge: fcd476ea6a888 0b04d4c0542e8 Author: Linus Torvalds Date: Wed Mar 29 10:13:37 2023 -0700 Merge tag 'f2fs-fix-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs fix from Jaegeuk Kim: "This fixes a tracepoint field size in f2fs in preparation for stricter rules for tracing fields" * tag 'f2fs-fix-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: f2fs: Fix f2fs_truncate_partial_nodes ftrace event commit 4ff0b50de8cabba055efe50bbcb7506c41a69835 Author: Pavel Begunkov Date: Wed Mar 29 15:03:43 2023 +0100 io_uring/rsrc: fix rogue rsrc node grabbing We should not be looking at ctx->rsrc_node and anyhow modifying the node without holding uring_lock, grabbing references in such a way is not safe either. Cc: stable@vger.kernel.org Fixes: 5106dd6e74ab6 ("io_uring: propagate issue_flags state down to file assignment") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1202ede2d7bb90136e3482b2b84aad9ed483e5d6.1680098433.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 25bbe844ef5c4fb4d7d8dcaa0080f922b7cd3a16 Author: David Gow Date: Wed Mar 29 14:55:34 2023 +0800 drm: test: Fix 32-bit issue in drm_buddy_test The drm_buddy_test KUnit tests verify that returned blocks have sizes which are powers of two using is_power_of_2(). However, is_power_of_2() operations on a 'long', but the block size is a u64. So on systems where long is 32-bit, this can sometimes fail even on correctly sized blocks. This only reproduces randomly, as the parameters passed to the buddy allocator in this test are random. The seed 0xb2e06022 reproduced it fine here. For now, just hardcode an is_power_of_2() implementation using x & (x - 1). Signed-off-by: David Gow Acked-by: Christian König Reviewed-by: Maíra Canal Reviewed-by: Arunpravin Paneer Selvam Link: https://patchwork.freedesktop.org/patch/msgid/20230329065532.2122295-2-davidgow@google.com Signed-off-by: Christian König commit 4453545b5b4c3eff941f69a5530f916d899db025 Author: David Gow Date: Wed Mar 29 14:55:32 2023 +0800 drm: buddy_allocator: Fix buddy allocator init on 32-bit systems The drm buddy allocator tests were broken on 32-bit systems, as rounddown_pow_of_two() takes a long, and the buddy allocator handles 64-bit sizes even on 32-bit systems. This can be reproduced with the drm_buddy_allocator KUnit tests on i386: ./tools/testing/kunit/kunit.py run --arch i386 \ --kunitconfig ./drivers/gpu/drm/tests drm_buddy (It results in kernel BUG_ON() when too many blocks are created, due to the block size being too small.) This was independently uncovered (and fixed) by Luís Mendes, whose patch added a new u64 variant of rounddown_pow_of_two(). This version instead recalculates the size based on the order. Reported-by: Luís Mendes Link: https://lore.kernel.org/lkml/CAEzXK1oghXAB_KpKpm=-CviDQbNaH0qfgYTSSjZgvvyj4U78AA@mail.gmail.com/T/ Signed-off-by: David Gow Acked-by: Christian König Reviewed-by: Arunpravin Paneer Selvam Link: https://patchwork.freedesktop.org/patch/msgid/20230329065532.2122295-1-davidgow@google.com Signed-off-by: Christian König commit e3720f92e0237921da537e47a0b24e27899203f8 Author: Guennadi Liakhovetski Date: Wed Mar 29 14:38:28 2023 +0300 ASoC: SOF: avoid a NULL dereference with unsupported widgets If an IPC4 topology contains an unsupported widget, its .module_info field won't be set, then sof_ipc4_route_setup() will cause a kernel Oops trying to dereference it. Add a check for such cases. Cc: stable@vger.kernel.org # 6.2 Signed-off-by: Guennadi Liakhovetski Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230329113828.28562-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 52aad39385e1bfdb34a1b405f699a8ef302c58b0 Author: huangwenhui Date: Tue Mar 28 15:46:44 2023 +0800 ALSA: hda/realtek: Add quirk for Lenovo ZhaoYang CF4620Z Fix headset microphone detection on Lenovo ZhaoYang CF4620Z. [ adjusted to be applicable to the latest tree -- tiwai ] Signed-off-by: huangwenhui Cc: Link: https://lore.kernel.org/r/20230328074644.30142-1-huangwenhuia@uniontech.com Signed-off-by: Takashi Iwai commit eca9f6e6f83b6725b84e1c76fdde19b003cff0eb Author: Haren Myneni Date: Mon Mar 20 19:50:08 2023 -0700 powerpc/pseries/vas: Ignore VAS update for DLPAR if copy/paste is not enabled The hypervisor supports user-mode NX from Power10. pseries_vas_dlpar_cpu() is called from lparcfg_write() to update VAS windows for DLPAR event in shared processor mode and the kernel gets -ENOTSUPP for HCALLs if the user-mode NX is not supported. The current VAS implementation also supports only with Radix page tables. Whereas in dedicated processor mode, pseries_vas_notifier() is registered only if the copy/paste feature is enabled. So instead of displaying HCALL error messages, update VAS capabilities if the copy/paste feature is available. This patch ignores updating VAS capabilities in pseries_vas_dlpar_cpu() and returns success if the copy/paste feature is not enabled. Then lparcfg_write() completes the processor DLPAR operations without any failures. Fixes: 2147783d6bf0 ("powerpc/pseries: Use lparcfg to reconfig VAS windows for DLPAR CPU") Cc: stable@vger.kernel.org # v6.1+ Signed-off-by: Haren Myneni Reviewed-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://msgid.link/1d0e727e7dbd9a28627ef08ca9df9c86a50175e2.camel@linux.ibm.com commit 5c2712387d4850e0b64121d5fd3e6c4e84ea3266 Author: Yicong Yang Date: Tue Mar 28 19:49:15 2023 +0800 cacheinfo: Fix LLC is not exported through sysfs After entering 6.3-rc1 the LLC cacheinfo is not exported on our ACPI based arm64 server. This is because the LLC cacheinfo is partly reset when secondary CPUs boot up. On arm64 the primary cpu will allocate and setup cacheinfo: init_cpu_topology() for_each_possible_cpu() fetch_cache_info() // Allocate cacheinfo and init levels detect_cache_attributes() cache_shared_cpu_map_setup() if (!last_level_cache_is_valid()) // not valid, setup LLC cache_setup_properties() // setup LLC On secondary CPU boot up: detect_cache_attributes() populate_cache_leaves() get_cache_type() // Get cache type from clidr_el1, // for LLC type=CACHE_TYPE_NOCACHE cache_shared_cpu_map_setup() if (!last_level_cache_is_valid()) // Valid and won't go to this branch, // leave LLC's type=CACHE_TYPE_NOCACHE The last_level_cache_is_valid() use cacheinfo->{attributes, fw_token} to test it's valid or not, but populate_cache_leaves() will only reset LLC's type, so we won't try to re-setup LLC's type and leave it CACHE_TYPE_NOCACHE and won't export it through sysfs. This patch tries to fix this by not re-populating the cache leaves if the LLC is valid. Fixes: 5944ce092b97 ("arch_topology: Build cacheinfo from primary CPU") Signed-off-by: Yicong Yang Reviewed-by: Pierre Gondois Reviewed-by: Sudeep Holla Link: https://lore.kernel.org/r/20230328114915.33340-1-yangyicong@huawei.com Signed-off-by: Greg Kroah-Hartman commit 30fb97ba4a8e082ba0a5432479d6995472edbd7b Author: Hans de Goede Date: Sun Mar 26 22:54:33 2023 +0200 drm/nouveau/kms: Fix backlight registration The nouveau code used to call drm_fb_helper_initial_config() from nouveau_fbcon_init() before calling drm_dev_register(). This would probe all connectors so that drm_connector->status could be used during backlight registration which runs from nouveau_connector_late_register(). After commit 4a16dd9d18a0 ("drm/nouveau/kms: switch to drm fbdev helpers") the fbdev emulation code, which now is a drm-client, can only run after drm_dev_register(). So during backlight registration the connectors are not probed yet and the drm_connector->status == connected check in nv50_backlight_init() would now always fail. Replace the drm_connector->status == connected check with a drm_helper_probe_detect() == connected check to fix nv_backlight no longer getting registered because of this. Fixes: 4a16dd9d18a0 ("drm/nouveau/kms: switch to drm fbdev helpers") Link: https://gitlab.freedesktop.org/drm/nouveau/-/issues/202 Link: https://bugzilla.redhat.com/show_bug.cgi?id=2181941 Signed-off-by: Hans de Goede Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20230326205433.36485-1-hdegoede@redhat.com commit 7708a3858e69db91a8b69487994f33b96d20192a Author: Bjørn Mork Date: Tue Mar 28 20:41:31 2023 +0200 USB: serial: option: add Quectel RM500U-CN modem This modem supports several modes with a class network function and a number of serial functions, all using ff/00/00 The device ID is the same in all modes. RNDIS mode ---------- T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=0900 Rev= 4.04 S: Manufacturer=Quectel S: Product=RM500U-CN S: SerialNumber=0123456789ABCDEF C:* #Ifs= 7 Cfg#= 1 Atr=c0 MxPwr=500mA A: FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=03 I:* If#= 0 Alt= 0 #EPs= 1 Cls=e0(wlcon) Sub=01 Prot=03 Driver=rndis_host E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=32ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms ECM mode -------- T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=0900 Rev= 4.04 S: Manufacturer=Quectel S: Product=RM500U-CN S: SerialNumber=0123456789ABCDEF C:* #Ifs= 7 Cfg#= 1 Atr=c0 MxPwr=500mA A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=06 Prot=00 I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether E: Ad=82(I) Atr=03(Int.) MxPS= 16 Ivl=32ms I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms NCM mode -------- T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=0900 Rev= 4.04 S: Manufacturer=Quectel S: Product=RM500U-CN S: SerialNumber=0123456789ABCDEF C:* #Ifs= 7 Cfg#= 1 Atr=c0 MxPwr=500mA A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0d Prot=00 I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=82(I) Atr=03(Int.) MxPS= 16 Ivl=32ms I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Reported-by: Andrew Green Cc: stable@vger.kernel.org Signed-off-by: Bjørn Mork Signed-off-by: Johan Hovold commit f92ed0cd9328aed918ebb0ebb64d259eccbcc6e7 Author: Biju Das Date: Tue Mar 21 11:47:50 2023 +0000 tty: serial: sh-sci: Fix Rx on RZ/G2L SCI SCI IP on RZ/G2L alike SoCs do not need regshift compared to other SCI IPs on the SH platform. Currently, it does regshift and configuring Rx wrongly. Drop adding regshift for RZ/G2L alike SoCs. Fixes: dfc80387aefb ("serial: sh-sci: Compute the regshift value for SCI ports") Cc: stable@vger.kernel.org Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20230321114753.75038-3-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 178e00f36f934a88682d96aa046c1f90cb6f83a7 Author: Sherry Sun Date: Thu Mar 23 19:09:23 2023 +0800 tty: serial: fsl_lpuart: fix crash in lpuart_uport_is_active For serdev framework, tty->dev is a NULL pointer, lpuart_uport_is_active calling device_may_wakeup() may cause kernel NULL pointer crash, so here add the NULL pointer check before using it. Fixes: 4f5cb8c5e915 ("tty: serial: fsl_lpuart: enable wakeup source for lpuart") Cc: stable Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20230323110923.24581-1-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit 9425914f3de6febbd6250395f56c8279676d9c3c Author: Sherry Sun Date: Thu Mar 23 13:44:15 2023 +0800 tty: serial: fsl_lpuart: avoid checking for transfer complete when UARTCTRL_SBK is asserted in lpuart32_tx_empty According to LPUART RM, Transmission Complete Flag becomes 0 if queuing a break character by writing 1 to CTRL[SBK], so here need to avoid checking for transmission complete when UARTCTRL_SBK is asserted, otherwise the lpuart32_tx_empty may never get TIOCSER_TEMT. Commit 2411fd94ceaa("tty: serial: fsl_lpuart: skip waiting for transmission complete when UARTCTRL_SBK is asserted") only fix it in lpuart32_set_termios(), here also fix it in lpuart32_tx_empty(). Fixes: 380c966c093e ("tty: serial: fsl_lpuart: add 32-bit register interface support") Cc: stable Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20230323054415.20363-1-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit 90b8596ac46043e4a782d9111f5b285251b13756 Author: Ilpo Järvinen Date: Fri Mar 17 12:30:34 2023 +0200 serial: 8250: Prevent starting up DMA Rx on THRI interrupt Hans de Goede reported Bluetooth adapters (HCIs) connected over an UART connection failed due corrupted Rx payload. The problem was narrowed down to DMA Rx starting on UART_IIR_THRI interrupt. The problem occurs despite LSR having DR bit set, which is precondition for attempting to start DMA Rx in the first place. From a debug patch: [x.807834] 8250irq: iir=cc lsr+saved=60 received=0/15 ier=0f dma_t/rx/err=0/0/0 [x.808676] 8250irq: iir=c2 lsr+saved=61 received=0/0 ier=0f dma_t/rx/err=0/0/0 [x.808776] 8250irq: iir=cc lsr+saved=60 received=1/12 ier=0d dma_t/rx/err=0/1/0 [x.808870] Bluetooth: hci0: Frame reassembly failed (-84) In the debug snippet, received field indicates 1 byte was transferred over DMA and 12 bytes after that with the non-DMA Rx. The sole byte DMA handled was corrupted (gets zeroed) which leads to the HCI failure. This problem became apparent after commit e8ffbb71f783 ("serial: 8250: use THRE & __stop_tx also with DMA") changed Tx stop behavior. Tx stop is now triggered from a THRI interrupt. Despite that this problem looks like a HW bug, this fix is not adding UART_BUG_xx flag to the driver beucase it seems useful in general to avoid starting DMA when there are only a few bytes to transfer. Skipping DMA for small transfers avoids the extra overhead DMA incurs. Thus, don't setup DMA Rx on UART_IIR_THRI but leave it to a subsequent interrupt which has Rx a related IIR value. By returning false from handle_rx_dma(), the DMA vs non-DMA decision is postponed until either UART_IIR_RDI (FIFO threshold worth of bytes awaiting) or UART_IIR_TIMEOUT (inter-character timeout) triggers at a later time which allows better to discern whether the number of bytes warrants starting DMA or not. Reported-by: Hans de Goede Tested-by: Hans de Goede Fixes: e8ffbb71f783 ("serial: 8250: use THRE & __stop_tx also with DMA") Cc: stable@vger.kernel.org Signed-off-by: Ilpo Järvinen Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20230317103034.12881-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 7b21f329ae0ab6361c0aebfc094db95821490cd1 Author: Geert Uytterhoeven Date: Fri Mar 17 10:46:57 2023 +0100 dt-bindings: serial: renesas,scif: Fix 4th IRQ for 4-IRQ SCIFs The fourth interrupt on SCIF variants with four interrupts (RZ/A1) is the Break interrupt, not the Transmit End interrupt (like on SCI(g)). Update the description and interrupt name to fix this. Fixes: 384d00fae8e51f8f ("dt-bindings: serial: sh-sci: Convert to json-schema") Cc: stable Signed-off-by: Geert Uytterhoeven Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/719d1582e0ebbe3d674e3a48fc26295e1475a4c3.1679046394.git.geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman commit b43a18647f03c87e77d50d6fe74904b61b96323e Author: Biju Das Date: Fri Mar 17 15:04:03 2023 +0000 tty: serial: sh-sci: Fix transmit end interrupt handler The fourth interrupt on SCI port is transmit end interrupt compared to the break interrupt on other port types. So, shuffle the interrupts to fix the transmit end interrupt handler. Fixes: e1d0be616186 ("sh-sci: Add h8300 SCI") Cc: stable Suggested-by: Geert Uytterhoeven Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20230317150403.154094-1-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit e4056e38ec87b4c21eb34bb8e38b1b0ca1221744 Author: Krzysztof Kozlowski Date: Fri Mar 24 09:41:27 2023 +0100 dt-bindings: pinctrl: qcom,sm8550-lpass-lpi: allow input-enabled and bias-bus-hold Add missing common pin configuration properties: input-enabled and bias-bus-hold. Fixes: 268e97ccc311 ("dt-bindings: pinctrl: qcom,sm8550-lpass-lpi-pinctrl: add SM8550 LPASS") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230324084127.29362-1-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit 4c7f9d2e413dc06a157c4e5dccde84aaf4655eb3 Author: Wayne Chang Date: Mon Mar 27 17:55:48 2023 +0800 usb: xhci: tegra: fix sleep in atomic call When we set the dual-role port to Host mode, we observed the following splat: [ 167.057718] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:229 [ 167.057872] Workqueue: events tegra_xusb_usb_phy_work [ 167.057954] Call trace: [ 167.057962] dump_backtrace+0x0/0x210 [ 167.057996] show_stack+0x30/0x50 [ 167.058020] dump_stack_lvl+0x64/0x84 [ 167.058065] dump_stack+0x14/0x34 [ 167.058100] __might_resched+0x144/0x180 [ 167.058140] __might_sleep+0x64/0xd0 [ 167.058171] slab_pre_alloc_hook.constprop.0+0xa8/0x110 [ 167.058202] __kmalloc_track_caller+0x74/0x2b0 [ 167.058233] kvasprintf+0xa4/0x190 [ 167.058261] kasprintf+0x58/0x90 [ 167.058285] tegra_xusb_find_port_node.isra.0+0x58/0xd0 [ 167.058334] tegra_xusb_find_port+0x38/0xa0 [ 167.058380] tegra_xusb_padctl_get_usb3_companion+0x38/0xd0 [ 167.058430] tegra_xhci_id_notify+0x8c/0x1e0 [ 167.058473] notifier_call_chain+0x88/0x100 [ 167.058506] atomic_notifier_call_chain+0x44/0x70 [ 167.058537] tegra_xusb_usb_phy_work+0x60/0xd0 [ 167.058581] process_one_work+0x1dc/0x4c0 [ 167.058618] worker_thread+0x54/0x410 [ 167.058650] kthread+0x188/0x1b0 [ 167.058672] ret_from_fork+0x10/0x20 The function tegra_xusb_padctl_get_usb3_companion eventually calls tegra_xusb_find_port and this in turn calls kasprintf which might sleep and so cannot be called from an atomic context. Fix this by moving the call to tegra_xusb_padctl_get_usb3_companion to the tegra_xhci_id_work function where it is really needed. Fixes: f836e7843036 ("usb: xhci-tegra: Add OTG support") Cc: stable@vger.kernel.org Signed-off-by: Wayne Chang Signed-off-by: Haotien Hsu Link: https://lore.kernel.org/r/20230327095548.1599470-1-haotienh@nvidia.com Signed-off-by: Greg Kroah-Hartman commit 5f70bcbca469a087b54ad2d934185ed69a098576 Author: M Chetan Kumar Date: Tue Mar 28 11:58:44 2023 +0530 net: wwan: iosm: fixes 7560 modem crash ModemManger/Apps probing the wwan0xmmrpc0 port for 7560 Modem results in modem crash. 7560 Modem FW uses the MBIM interface for control command communication whereas 7360 uses Intel RPC interface so disable wwan0xmmrpc0 port for 7560. Fixes: d08b0f8f46e4 ("net: wwan: iosm: add rpc interface for xmm modems") Reported-and-tested-by: Martin Link: https://bugzilla.kernel.org/show_bug.cgi?id=217200 Signed-off-by: M Chetan Kumar Signed-off-by: Shane Parslow Signed-off-by: David S. Miller commit 6be2e7522eb529b41c16d459f33bbdbcddbf5c15 Author: Tasos Sahanidis Date: Wed Mar 29 06:28:08 2023 +0300 ALSA: ymfpci: Fix BUG_ON in probe function The snd_dma_buffer.bytes field now contains the aligned size, which this snd_BUG_ON() did not account for, resulting in the following: [ 9.625915] ------------[ cut here ]------------ [ 9.633440] WARNING: CPU: 0 PID: 126 at sound/pci/ymfpci/ymfpci_main.c:2168 snd_ymfpci_create+0x681/0x698 [snd_ymfpci] [ 9.648926] Modules linked in: snd_ymfpci(+) snd_intel_dspcfg kvm(+) snd_intel_sdw_acpi snd_ac97_codec snd_mpu401_uart snd_opl3_lib irqbypass snd_hda_codec gameport snd_rawmidi crct10dif_pclmul crc32_pclmul cfg80211 snd_hda_core polyval_clmulni polyval_generic gf128mul snd_seq_device ghash_clmulni_intel snd_hwdep ac97_bus sha512_ssse3 rfkill snd_pcm aesni_intel tg3 snd_timer crypto_simd snd mxm_wmi libphy cryptd k10temp fam15h_power pcspkr soundcore sp5100_tco wmi acpi_cpufreq mac_hid dm_multipath sg loop fuse dm_mod bpf_preload ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 sr_mod cdrom ata_generic pata_acpi firewire_ohci crc32c_intel firewire_core xhci_pci crc_itu_t pata_via xhci_pci_renesas floppy [ 9.711849] CPU: 0 PID: 126 Comm: kworker/0:2 Not tainted 6.1.21-1-lts #1 08d2e5ece03136efa7c6aeea9a9c40916b1bd8da [ 9.722200] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./990FX Extreme4, BIOS P2.70 06/05/2014 [ 9.732204] Workqueue: events work_for_cpu_fn [ 9.736580] RIP: 0010:snd_ymfpci_create+0x681/0x698 [snd_ymfpci] [ 9.742594] Code: 8c c0 4c 89 e2 48 89 df 48 c7 c6 92 c6 8c c0 e8 15 d0 e9 ff 48 83 c4 08 44 89 e8 5b 5d 41 5c 41 5d 41 5e 41 5f e9 d3 7a 33 e3 <0f> 0b e9 cb fd ff ff 41 bd fb ff ff ff eb db 41 bd f4 ff ff ff eb [ 9.761358] RSP: 0018:ffffab64804e7da0 EFLAGS: 00010287 [ 9.766594] RAX: ffff8fa2df06c400 RBX: ffff8fa3073a8000 RCX: ffff8fa303fbc4a8 [ 9.773734] RDX: ffff8fa2df06d000 RSI: 0000000000000010 RDI: 0000000000000020 [ 9.780876] RBP: ffff8fa300b5d0d0 R08: ffff8fa3073a8e50 R09: 00000000df06bf00 [ 9.788018] R10: ffff8fa2df06bf00 R11: 00000000df068200 R12: ffff8fa3073a8918 [ 9.795159] R13: 0000000000000000 R14: 0000000000000080 R15: ffff8fa2df068200 [ 9.802317] FS: 0000000000000000(0000) GS:ffff8fa9fec00000(0000) knlGS:0000000000000000 [ 9.810414] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 9.816158] CR2: 000055febaf66500 CR3: 0000000101a2e000 CR4: 00000000000406f0 [ 9.823301] Call Trace: [ 9.825747] [ 9.827889] snd_card_ymfpci_probe+0x194/0x950 [snd_ymfpci b78a5fe64b5663a6390a909c67808567e3e73615] [ 9.837030] ? finish_task_switch.isra.0+0x90/0x2d0 [ 9.841918] local_pci_probe+0x45/0x80 [ 9.845680] work_for_cpu_fn+0x1a/0x30 [ 9.849431] process_one_work+0x1c7/0x380 [ 9.853464] worker_thread+0x1af/0x390 [ 9.857225] ? rescuer_thread+0x3b0/0x3b0 [ 9.861254] kthread+0xde/0x110 [ 9.864414] ? kthread_complete_and_exit+0x20/0x20 [ 9.869210] ret_from_fork+0x22/0x30 [ 9.872792] [ 9.874985] ---[ end trace 0000000000000000 ]--- Fixes: 5c1733e33c88 ("ALSA: memalloc: Align buffer allocations in page size") Signed-off-by: Tasos Sahanidis Link: https://lore.kernel.org/r/20230329032808.170403-1-tasos@tasossah.com Signed-off-by: Takashi Iwai commit f33fc1576757741479452255132d6e3aaf558ffe Author: Tasos Sahanidis Date: Wed Mar 29 06:24:22 2023 +0300 ALSA: ymfpci: Create card with device-managed snd_devm_card_new() snd_card_ymfpci_remove() was removed in commit c6e6bb5eab74 ("ALSA: ymfpci: Allocate resources with device-managed APIs"), but the call to snd_card_new() was not replaced with snd_devm_card_new(). Since there was no longer a call to snd_card_free, unloading the module would eventually result in Oops: [697561.532887] BUG: unable to handle page fault for address: ffffffffc0924480 [697561.532893] #PF: supervisor read access in kernel mode [697561.532896] #PF: error_code(0x0000) - not-present page [697561.532899] PGD ae1e15067 P4D ae1e15067 PUD ae1e17067 PMD 11a8f5067 PTE 0 [697561.532905] Oops: 0000 [#1] PREEMPT SMP NOPTI [697561.532909] CPU: 21 PID: 5080 Comm: wireplumber Tainted: G W OE 6.2.7 #1 [697561.532914] Hardware name: System manufacturer System Product Name/TUF GAMING X570-PLUS, BIOS 4408 10/28/2022 [697561.532916] RIP: 0010:try_module_get.part.0+0x1a/0xe0 [697561.532924] Code: 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 44 00 00 55 48 89 e5 41 55 41 54 49 89 fc bf 01 00 00 00 e8 56 3c f8 ff <41> 83 3c 24 02 0f 84 96 00 00 00 41 8b 84 24 30 03 00 00 85 c0 0f [697561.532927] RSP: 0018:ffffbe9b858c3bd8 EFLAGS: 00010246 [697561.532930] RAX: ffff9815d14f1900 RBX: ffff9815c14e6000 RCX: 0000000000000000 [697561.532933] RDX: 0000000000000000 RSI: ffffffffc055092c RDI: ffffffffb3778c1a [697561.532935] RBP: ffffbe9b858c3be8 R08: 0000000000000040 R09: ffff981a1a741380 [697561.532937] R10: ffffbe9b858c3c80 R11: 00000009d56533a6 R12: ffffffffc0924480 [697561.532939] R13: ffff9823439d8500 R14: 0000000000000025 R15: ffff9815cd109f80 [697561.532942] FS: 00007f13084f1f80(0000) GS:ffff9824aef40000(0000) knlGS:0000000000000000 [697561.532945] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [697561.532947] CR2: ffffffffc0924480 CR3: 0000000145344000 CR4: 0000000000350ee0 [697561.532949] Call Trace: [697561.532951] [697561.532955] try_module_get+0x13/0x30 [697561.532960] snd_ctl_open+0x61/0x1c0 [snd] [697561.532976] snd_open+0xb4/0x1e0 [snd] [697561.532989] chrdev_open+0xc7/0x240 [697561.532995] ? fsnotify_perm.part.0+0x6e/0x160 [697561.533000] ? __pfx_chrdev_open+0x10/0x10 [697561.533005] do_dentry_open+0x169/0x440 [697561.533009] vfs_open+0x2d/0x40 [697561.533012] path_openat+0xa9d/0x10d0 [697561.533017] ? debug_smp_processor_id+0x17/0x20 [697561.533022] ? trigger_load_balance+0x65/0x370 [697561.533026] do_filp_open+0xb2/0x160 [697561.533032] ? _raw_spin_unlock+0x19/0x40 [697561.533036] ? alloc_fd+0xa9/0x190 [697561.533040] do_sys_openat2+0x9f/0x160 [697561.533044] __x64_sys_openat+0x55/0x90 [697561.533048] do_syscall_64+0x3b/0x90 [697561.533052] entry_SYSCALL_64_after_hwframe+0x72/0xdc [697561.533056] RIP: 0033:0x7f1308a40db4 [697561.533059] Code: 24 20 eb 8f 66 90 44 89 54 24 0c e8 46 68 f8 ff 44 8b 54 24 0c 44 89 e2 48 89 ee 41 89 c0 bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 77 32 44 89 c7 89 44 24 0c e8 78 68 f8 ff 8b 44 [697561.533062] RSP: 002b:00007ffcce664450 EFLAGS: 00000293 ORIG_RAX: 0000000000000101 [697561.533066] RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f1308a40db4 [697561.533068] RDX: 0000000000080000 RSI: 00007ffcce664690 RDI: 00000000ffffff9c [697561.533070] RBP: 00007ffcce664690 R08: 0000000000000000 R09: 0000000000000012 [697561.533072] R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000080000 [697561.533074] R13: 00007f13054b069b R14: 0000565209f83200 R15: 0000000000000000 [697561.533078] Fixes: c6e6bb5eab74 ("ALSA: ymfpci: Allocate resources with device-managed APIs") Signed-off-by: Tasos Sahanidis Link: https://lore.kernel.org/r/20230329032422.170024-1-tasos@tasossah.com Signed-off-by: Takashi Iwai commit 07b3af42d8d528374d4f42d688bae86eeb30831a Author: Felix Fietkau Date: Fri Mar 24 15:04:04 2023 +0100 net: ethernet: mtk_eth_soc: fix tx throughput regression with direct 1G links Using the QDMA tx scheduler to throttle tx to line speed works fine for switch ports, but apparently caused a regression on non-switch ports. Based on a number of tests, it seems that this throttling can be safely dropped without re-introducing the issues on switch ports that the tx scheduling changes resolved. Link: https://lore.kernel.org/netdev/trinity-92c3826f-c2c8-40af-8339-bc6d0d3ffea4-1678213958520@3c-app-gmx-bs16/ Fixes: f63959c7eec3 ("net: ethernet: mtk_eth_soc: implement multi-queue support for per-port queues") Reported-by: Frank Wunderlich Reported-by: Daniel Golle Tested-by: Daniel Golle Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20230324140404.95745-1-nbd@nbd.name Signed-off-by: Jakub Kicinski commit 2280d425ba3599bdd85c41bd0ec8ba568f00c032 Author: Filipe Manana Date: Tue Mar 28 10:45:20 2023 +0100 btrfs: ignore fiemap path cache when there are multiple paths for a node During fiemap, when walking backreferences to determine if a b+tree node/leaf is shared, we may find a tree block (leaf or node) for which two parents were added to the references ulist. This happens if we get for example one direct ref (shared tree block ref) and one indirect ref (non-shared tree block ref) for the tree block at the current level, which can happen during relocation. In that case the fiemap path cache can not be used since it's meant for a single path, with one tree block at each possible level, so having multiple references for a tree block at any level may result in getting the level counter exceed BTRFS_MAX_LEVEL and eventually trigger the warning: WARN_ON_ONCE(level >= BTRFS_MAX_LEVEL) at lookup_backref_shared_cache() and at store_backref_shared_cache(). This is harmless since the code ignores any level >= BTRFS_MAX_LEVEL, the warning is there just to catch any unexpected case like the one described above. However if a user finds this it may be scary and get reported. So just ignore the path cache once we find a tree block for which there are more than one reference, which is the less common case, and update the cache with the sharedness check result for all levels below the level for which we found multiple references. Reported-by: Jarno Pelkonen Link: https://lore.kernel.org/linux-btrfs/CAKv8qLmDNAGJGCtsevxx_VZ_YOvvs1L83iEJkTgyA4joJertng@mail.gmail.com/ Fixes: 12a824dc67a6 ("btrfs: speedup checking for extent sharedness during fiemap") CC: stable@vger.kernel.org # 6.1+ Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit bdd034de3a28ffdacab528aebad17f1df968180c Author: Florian Fainelli Date: Fri Mar 24 06:07:36 2023 -0700 mailmap: add an entry for Leonard Crestez Link: https://lkml.kernel.org/r/20230324130737.3360169-1-f.fainelli@gmail.com Signed-off-by: Florian Fainelli Cc: Baolin Wang Cc: Colin Ian King Cc: Jakub Kicinski Cc: Kirill Tkhai Cc: Konrad Dybcio Cc: Leonard Crestez Cc: Qais Yousef Cc: Stephen Hemminger Cc: Vasily Averin Signed-off-by: Andrew Morton commit 1f2803b2660f4b04d48d065072c0ae0c9ca255fd Author: Muchun Song Date: Thu Mar 23 10:50:03 2023 +0800 mm: kfence: fix handling discontiguous page The struct pages could be discontiguous when the kfence pool is allocated via alloc_contig_pages() with CONFIG_SPARSEMEM and !CONFIG_SPARSEMEM_VMEMMAP. This may result in setting PG_slab and memcg_data to a arbitrary address (may be not used as a struct page), which in the worst case might corrupt the kernel. So the iteration should use nth_page(). Link: https://lkml.kernel.org/r/20230323025003.94447-1-songmuchun@bytedance.com Fixes: 0ce20dd84089 ("mm: add Kernel Electric-Fence infrastructure") Signed-off-by: Muchun Song Reviewed-by: Marco Elver Reviewed-by: Kefeng Wang Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Jann Horn Cc: SeongJae Park Cc: Signed-off-by: Andrew Morton commit 3ee2d7471fa4963a2ced0a84f0653ce88b43c5b2 Author: Muchun Song Date: Mon Mar 20 11:00:59 2023 +0800 mm: kfence: fix PG_slab and memcg_data clearing It does not reset PG_slab and memcg_data when KFENCE fails to initialize kfence pool at runtime. It is reporting a "Bad page state" message when kfence pool is freed to buddy. The checking of whether it is a compound head page seems unnecessary since we already guarantee this when allocating kfence pool. Remove the check to simplify the code. Link: https://lkml.kernel.org/r/20230320030059.20189-1-songmuchun@bytedance.com Fixes: 0ce20dd84089 ("mm: add Kernel Electric-Fence infrastructure") Signed-off-by: Muchun Song Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Jann Horn Cc: Marco Elver Cc: Roman Gushchin Cc: SeongJae Park Cc: Signed-off-by: Andrew Morton commit e900ba10d15041a6236cc75778cc6e06c3590a58 Author: Shiyang Ruan Date: Wed Mar 22 07:25:58 2023 +0000 fsdax: dedupe should compare the min of two iters' length In an dedupe comparison iter loop, the length of iomap_iter decreases because it implies the remaining length after each iteration. The dedupe command will fail with -EIO if the range is larger than one page size and not aligned to the page size. Also report warning in dmesg: [ 4338.498374] ------------[ cut here ]------------ [ 4338.498689] WARNING: CPU: 3 PID: 1415645 at fs/iomap/iter.c:16 ... The compare function should use the min length of the current iters, not the total length. Link: https://lkml.kernel.org/r/1679469958-2-1-git-send-email-ruansy.fnst@fujitsu.com Fixes: 0e79e3736d54 ("fsdax: dedupe: iter two files at the same time") Signed-off-by: Shiyang Ruan Reviewed-by: Darrick J. Wong Cc: Dan Williams Cc: Jan Kara Cc: Matthew Wilcox (Oracle) Cc: Signed-off-by: Andrew Morton commit 13dd4e04625f600e5affb1b3f0b6c35268ab839b Author: Shiyang Ruan Date: Wed Mar 22 11:11:09 2023 +0000 fsdax: unshare: zero destination if srcmap is HOLE or UNWRITTEN unshare copies data from source to destination. But if the source is HOLE or UNWRITTEN extents, we should zero the destination, otherwise the HOLE or UNWRITTEN part will be user-visible old data of the new allocated extent. Found by running generic/649 while mounting with -o dax=always on pmem. Link: https://lkml.kernel.org/r/1679483469-2-1-git-send-email-ruansy.fnst@fujitsu.com Fixes: d984648e428b ("fsdax,xfs: port unshare to fsdax") Signed-off-by: Shiyang Ruan Cc: Dan Williams Cc: Darrick J. Wong Cc: Jan Kara Cc: Matthew Wilcox (Oracle) Cc: Alistair Popple Cc: Jason Gunthorpe Cc: John Hubbard Cc: Signed-off-by: Andrew Morton commit f478b9987cc8236b412d9f2afc958d3e15a7cf85 Author: Tiezhu Yang Date: Tue Mar 21 14:35:08 2023 +0800 lib/Kconfig.debug: correct help info of LOCKDEP_STACK_TRACE_HASH_BITS We can see the following definition in kernel/locking/lockdep_internals.h: #define STACK_TRACE_HASH_SIZE (1 << CONFIG_LOCKDEP_STACK_TRACE_HASH_BITS) CONFIG_LOCKDEP_STACK_TRACE_HASH_BITS is related with STACK_TRACE_HASH_SIZE instead of MAX_STACK_TRACE_ENTRIES, fix it. Link: https://lkml.kernel.org/r/1679380508-20830-1-git-send-email-yangtiezhu@loongson.cn Fixes: 5dc33592e955 ("lockdep: Allow tuning tracing capacity constants.") Signed-off-by: Tiezhu Yang Cc: Dmitry Vyukov Cc: Tetsuo Handa Signed-off-by: Andrew Morton commit 35260cf545226c3b21d52a9d21083f7ff999969c Author: ye xingchen Date: Sun Jan 29 11:10:09 2023 +0800 Kconfig.debug: fix SCHED_DEBUG dependency The path for SCHED_DEBUG is /sys/kernel/debug/sched. So, SCHED_DEBUG should depend on DEBUG_FS, not PROC_FS. Link: https://lkml.kernel.org/r/202301291110098787982@zte.com.cn Signed-off-by: ye xingchen Cc: Dan Williams Cc: Geert Uytterhoeven Cc: Josh Poimboeuf Cc: Kees Cook Cc: Miguel Ojeda Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Randy Dunlap Cc: Rasmus Villemoes Cc: Vlastimil Babka Cc: Zhaoyang Huang Signed-off-by: Andrew Morton commit 1a4b52ce8548355f09170faa67070bc2b8e3ba53 Author: Leonard Göhrs Date: Tue Mar 21 15:55:25 2023 +0100 .mailmap: add entry for Leonard Göhrs My very first kernel commit: e4e1d47c7906 ("ALSA: ppc: remove redundant checks in PS3 driver probe") was sent with the umlaut in my last name transcribed (Göhrs -> Goehrs). Add a mailmap entry so all my commits use the same name. Link: https://lkml.kernel.org/r/20230321145525.1317230-1-l.goehrs@pengutronix.de Signed-off-by: Leonard Göhrs Acked-by: Uwe Kleine-König Signed-off-by: Andrew Morton commit fcd476ea6a888ef6e6627f4c21a2ea8cca3e9312 Merge: 756c1a0593e7d d18a04157fc17 Author: Linus Torvalds Date: Tue Mar 28 13:28:52 2023 -0700 Merge tag 'urgent-rcu.2023.03.28a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull RCU fix from Paul McKenney: "This brings the rcu_torture_read event trace into line with the new trace tools by replacing this event trace's __field() with the corresponding __array(). Without this, the new trace tools will fail when presented wtih an rcu_torture_read event trace, which is a regression from the viewpoint of trace tools users" Link: https://lore.kernel.org/all/20230320133650.5388a05e@gandalf.local.home/ * tag 'urgent-rcu.2023.03.28a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: rcu: Fix rcu_torture_read ftrace event commit 756c1a0593e7d26bd7dc6332e9490607cd106c4f Merge: 05c24161f4d2a 05107edc91013 Author: Linus Torvalds Date: Tue Mar 28 13:14:47 2023 -0700 Merge tag 'linux-kselftest-fixes-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest fixes from Shuah Khan: "One single fix for sigaltstack test -Wuninitialized warning found when building with clang" * tag 'linux-kselftest-fixes-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests: sigaltstack: fix -Wuninitialized commit b57841fb0b564c61508222e885ac8f30a2811089 Author: Rafael J. Wysocki Date: Tue Mar 28 20:43:26 2023 +0200 thermal: core: Drop excessive lockdep_assert_held() calls The lockdep_assert_held() calls added to cooling_device_stats_setup() and cooling_device_stats_destroy() by commit 790930f44289 ("thermal: core: Introduce thermal_cooling_device_update()") trigger false-positive lockdep reports in code paths that are not subject to race conditions (before cooling device registration and after cooling device removal). For this reason, remove the lockdep_assert_held() calls from both cooling_device_stats_setup() and cooling_device_stats_destroy() and add one to thermal_cooling_device_stats_reinit() that has to be called under the cdev lock. Fixes: 790930f44289 ("thermal: core: Introduce thermal_cooling_device_update()") Link: https://lore.kernel.org/linux-acpi/ZCIDTLFt27Ei7+V6@ideak-desk.fi.intel.com Reported-by: Imre Deak Signed-off-by: Rafael J. Wysocki commit 05c24161f4d2adc0deb6f3f0f55d25e12fbbdcde Merge: 3a93e40326c8f f9bbf25e7b2b7 Author: Linus Torvalds Date: Tue Mar 28 10:43:04 2023 -0700 Merge tag 's390-6.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Vasily Gorbik: - Fix an error handling issue with PTRACE_GET_LAST_BREAK request so that -EFAULT is returned if put_user() fails, instead of ignoring it - Fix a build race for the modules_prepare target when CONFIG_EXPOLINE_EXTERN is enabled by reintroducing the dependence on scripts - Fix a memory leak in vfio_ap device driver - Add missing earlyclobber annotations to __clear_user() inline assembly to prevent incorrect register allocation * tag 's390-6.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/ptrace: fix PTRACE_GET_LAST_BREAK error handling s390: reintroduce expoline dependence to scripts s390/vfio-ap: fix memory leak in vfio_ap device driver s390/uaccess: add missing earlyclobber annotations to __clear_user() commit e9a1cc2e4c4ee7c7e60fb26345618c2522a2a10f Author: Jakob Koschel Date: Mon Mar 20 13:48:15 2023 +0100 ice: fix invalid check for empty list in ice_sched_assoc_vsi_to_agg() The code implicitly assumes that the list iterator finds a correct handle. If 'vsi_handle' is not found the 'old_agg_vsi_info' was pointing to an bogus memory location. For safety a separate list iterator variable should be used to make the != NULL check on 'old_agg_vsi_info' correct under any circumstances. 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. Using it in a pointer comparison after the loop is undefined behavior and should be omitted if possible [1]. Fixes: 37c592062b16 ("ice: remove the VSI info from previous agg") Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/ [1] Signed-off-by: Jakob Koschel Tested-by: Arpana Arland (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 29486b6df3e6a63b57d1ed1dce06051267282ff4 Author: Junfeng Guo Date: Tue Mar 14 10:03:15 2023 +0800 ice: add profile conflict check for AVF FDIR Add profile conflict check while adding some FDIR rules to avoid unexpected flow behavior, rules may have conflict including: IPv4 <---> {IPv4_UDP, IPv4_TCP, IPv4_SCTP} IPv6 <---> {IPv6_UDP, IPv6_TCP, IPv6_SCTP} For example, when we create an FDIR rule for IPv4, this rule will work on packets including IPv4, IPv4_UDP, IPv4_TCP and IPv4_SCTP. But if we then create an FDIR rule for IPv4_UDP and then destroy it, the first FDIR rule for IPv4 cannot work on pkt IPv4_UDP then. To prevent this unexpected behavior, we add restriction in software when creating FDIR rules by adding necessary profile conflict check. Fixes: 1f7ea1cd6a37 ("ice: Enable FDIR Configure for AVF") Signed-off-by: Junfeng Guo Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit d94dbdc4e0209b5e7d736ab696f8d635b034e3ee Author: Brett Creeley Date: Mon Mar 13 13:36:08 2023 -0700 ice: Fix ice_cfg_rdma_fltr() to only update relevant fields The current implementation causes ice_vsi_update() to update all VSI fields based on the cached VSI context. This also assumes that the ICE_AQ_VSI_PROP_Q_OPT_VALID bit is set. This can cause problems if the VSI context is not correctly synced by the driver. Fix this by only updating the fields that correspond to ICE_AQ_VSI_PROP_Q_OPT_VALID. Also, make sure to save the updated result in the cached VSI context on success. Fixes: 348048e724a0 ("ice: Implement iidc operations") Co-developed-by: Robert Malz Signed-off-by: Robert Malz Signed-off-by: Brett Creeley Signed-off-by: Jesse Brandeburg Reviewed-by: Piotr Raczynski Tested-by: Jakub Andrysiak Signed-off-by: Tony Nguyen commit 66ceaa4c4507f2b598d37b528796dd34158d31bf Author: Jesse Brandeburg Date: Mon Mar 13 13:36:07 2023 -0700 ice: fix W=1 headers mismatch make modules W=1 returns: .../ice/ice_txrx_lib.c:448: warning: Function parameter or member 'first_idx' not described in 'ice_finalize_xdp_rx' .../ice/ice_txrx.c:948: warning: Function parameter or member 'ntc' not described in 'ice_get_rx_buf' .../ice/ice_txrx.c:1038: warning: Excess function parameter 'rx_buf' description in 'ice_construct_skb' Fix these warnings by adding and deleting the deviant arguments. Fixes: 2fba7dc5157b ("ice: Add support for XDP multi-buffer on Rx side") Fixes: d7956d81f150 ("ice: Pull out next_to_clean bump out of ice_put_rx_buf()") CC: Maciej Fijalkowski Signed-off-by: Jesse Brandeburg Reviewed-by: Piotr Raczynski Signed-off-by: Tony Nguyen commit f91bf3272a18356e8585f6bbba896d794632f2af Author: Marek Szyprowski Date: Thu Mar 16 00:25:14 2023 +0100 iommu/exynos: Fix set_platform_dma_ops() callback There are some subtle differences between release_device() and set_platform_dma_ops() callbacks, so separate those two callbacks. Device links should be removed only in release_device(), because they were created in probe_device() on purpose and they are needed for proper Exynos IOMMU driver operation. While fixing this, remove the conditional code as it is not really needed. Reported-by: Jason Gunthorpe Fixes: 189d496b48b1 ("iommu/exynos: Add missing set_platform_dma_ops callback") Signed-off-by: Marek Szyprowski Reviewed-by: Sam Protsenko Link: https://lore.kernel.org/r/20230315232514.1046589-1-m.szyprowski@samsung.com Signed-off-by: Joerg Roedel commit b26cd9325be4c1fcd331b77f10acb627c560d4d7 Author: Kornel Dulęba Date: Mon Mar 20 09:32:59 2023 +0000 pinctrl: amd: Disable and mask interrupts on resume This fixes a similar problem to the one observed in: commit 4e5a04be88fe ("pinctrl: amd: disable and mask interrupts on probe"). On some systems, during suspend/resume cycle firmware leaves an interrupt enabled on a pin that is not used by the kernel. This confuses the AMD pinctrl driver and causes spurious interrupts. The driver already has logic to detect if a pin is used by the kernel. Leverage it to re-initialize interrupt fields of a pin only if it's not used by us. Cc: stable@vger.kernel.org Fixes: dbad75dd1f25 ("pinctrl: add AMD GPIO driver support.") Signed-off-by: Kornel Dulęba Link: https://lore.kernel.org/r/20230320093259.845178-1-korneld@chromium.org Signed-off-by: Linus Walleij commit 005308f7bdacf5685ed1a431244a183dbbb9e0e8 Author: Jens Axboe Date: Mon Mar 27 19:56:18 2023 -0600 io_uring/poll: clear single/double poll flags on poll arming Unless we have at least one entry queued, then don't call into io_poll_remove_entries(). Normally this isn't possible, but if we retry poll then we can have ->nr_entries cleared again as we're setting it up. If this happens for a poll retry, then we'll still have at least REQ_F_SINGLE_POLL set. io_poll_remove_entries() then thinks it has entries to remove. Clear REQ_F_SINGLE_POLL and REQ_F_DOUBLE_POLL unconditionally when arming a poll request. Fixes: c16bda37594f ("io_uring/poll: allow some retries for poll triggering spuriously") Cc: stable@vger.kernel.org Reported-by: Pengfei Xu Signed-off-by: Jens Axboe commit 917fd7d6cdda179fdced2ebb060a9cda517d76e0 Merge: f22c993f31fa9 8fb8ebf948778 Author: Paolo Abeni Date: Tue Mar 28 14:16:42 2023 +0200 Merge branch 'xen-netback-fix-issue-introduced-recently' Juergen Gross says: ==================== xen/netback: fix issue introduced recently The fix for XSA-423 introduced a bug which resulted in loss of network connection in some configurations. The first patch is fixing the issue, while the second one is removing a test which isn't needed. ==================== Link: https://lore.kernel.org/r/20230327083646.18690-1-jgross@suse.com Signed-off-by: Paolo Abeni commit 8fb8ebf9487785184846d04e915bfe327bf4ccd5 Author: Juergen Gross Date: Mon Mar 27 10:36:46 2023 +0200 xen/netback: remove not needed test in xenvif_tx_build_gops() The tests for the number of grant mapping or copy operations reaching the array size of the operations buffer at the end of the main loop in xenvif_tx_build_gops() isn't needed. The loop can handle at maximum MAX_PENDING_REQS transfer requests, as XEN_RING_NR_UNCONSUMED_REQUESTS() is taking unsent responses into consideration, too. Remove the tests. Suggested-by: Jan Beulich Signed-off-by: Juergen Gross Reviewed-by: Paul Durrant Signed-off-by: Paolo Abeni commit 05310f31ca74673a96567fb14637b7d5d6c82ea5 Author: Juergen Gross Date: Mon Mar 27 10:36:45 2023 +0200 xen/netback: don't do grant copy across page boundary Fix xenvif_get_requests() not to do grant copy operations across local page boundaries. This requires to double the maximum number of copy operations per queue, as each copy could now be split into 2. Make sure that struct xenvif_tx_cb doesn't grow too large. Cc: stable@vger.kernel.org Fixes: ad7f402ae4f4 ("xen/netback: Ensure protocol headers don't fall in the non-linear area") Signed-off-by: Juergen Gross Reviewed-by: Paul Durrant Signed-off-by: Paolo Abeni commit 38518593ec55e897abda4b4be77b2ec8ec4447d1 Author: Tanu Malhotra Date: Mon Mar 27 11:58:38 2023 -0700 HID: intel-ish-hid: Fix kernel panic during warm reset During warm reset device->fw_client is set to NULL. If a bus driver is registered after this NULL setting and before new firmware clients are enumerated by ISHTP, kernel panic will result in the function ishtp_cl_bus_match(). This is because of reference to device->fw_client->props.protocol_name. ISH firmware after getting successfully loaded, sends a warm reset notification to remove all clients from the bus and sets device->fw_client to NULL. Until kernel v5.15, all enabled ISHTP kernel module drivers were loaded right after any of the first ISHTP device was registered, regardless of whether it was a matched or an unmatched device. This resulted in all drivers getting registered much before the warm reset notification from ISH. Starting kernel v5.16, this issue got exposed after the change was introduced to load only bus drivers for the respective matching devices. In this scenario, cros_ec_ishtp device and cros_ec_ishtp driver are registered after the warm reset device fw_client NULL setting. cros_ec_ishtp driver_register() triggers the callback to ishtp_cl_bus_match() to match ISHTP driver to the device and causes kernel panic in guid_equal() when dereferencing fw_client NULL pointer to get protocol_name. Fixes: f155dfeaa4ee ("platform/x86: isthp_eclite: only load for matching devices") Fixes: facfe0a4fdce ("platform/chrome: chros_ec_ishtp: only load for matching devices") Fixes: 0d0cccc0fd83 ("HID: intel-ish-hid: hid-client: only load for matching devices") Fixes: 44e2a58cb880 ("HID: intel-ish-hid: fw-loader: only load for matching devices") Cc: # 5.16+ Signed-off-by: Tanu Malhotra Tested-by: Shaunak Saha Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit f22c993f31fa9615df46e49cd768b713d39a852f Author: Wolfram Sang Date: Mon Mar 27 10:31:38 2023 +0200 smsc911x: avoid PHY being resumed when interface is not up SMSC911x doesn't need mdiobus suspend/resume, that's why it sets 'mac_managed_pm'. However, setting it needs to be moved from init to probe, so mdiobus PM functions will really never be called (e.g. when the interface is not up yet during suspend/resume). Fixes: 3ce9f2bef755 ("net: smsc911x: Stop and start PHY during suspend and resume") Suggested-by: Heiner Kallweit Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230327083138.6044-1-wsa+renesas@sang-engineering.com Signed-off-by: Paolo Abeni commit 4bffd2c7a3fc165fc70bc69211b8e6436f41a5c3 Merge: 4dd52392b5d75 363c7dc72f79e Author: Greg Kroah-Hartman Date: Tue Mar 28 13:30:55 2023 +0200 Merge tag 'iio-fixes-for-6.3a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-linus Jonathan writes: 1st set of IIO fixes for 6.3 Usual mixed bag: - core - output buffers Fix return of bytes written when only some succeed. Fix O_NONBLOCK handling to not block. - adi,ad7791 Fix IRQ type. Not confirmed to have any impact but good to correct it anyway - adi,adis16400 Missing CONFIG_CRC32 - capella,cm32181 Unregister 2nd I2C client if one is used. - cio-dac Fix bitdepth for range check on write. - linear,ltc2497 Fix a wrong shift of the LSB introduced when switching to be24 handling. - maxim,max11410 Fix handling of return code in read_poll_timeout() - qcom,spmi-adc Fix an accidental change of channel name to include the reg value from OF. - ti,palmas Fix a null dereference on remove due to wrong function used to get the drvdata. - ti,ads7950 Mark GPIO as can sleep. * tag 'iio-fixes-for-6.3a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: adc: ti-ads7950: Set `can_sleep` flag for GPIO chip iio: adc: palmas_gpadc: fix NULL dereference on rmmod iio: adc: max11410: fix read_poll_timeout() usage iio: dac: cio-dac: Fix max DAC write value check for 12-bit iio: light: cm32181: Unregister second I2C client if present iio: accel: kionix-kx022a: Get the timestamp from the driver's private data in the trigger_handler iio: adc: ad7791: fix IRQ flags iio: buffer: make sure O_NONBLOCK is respected iio: buffer: correctly return bytes written in output buffers iio: light: vcnl4000: Fix WARN_ON on uninitialized lock iio: adis16480: select CONFIG_CRC32 drivers: iio: adc: ltc2497: fix LSB shift iio: adc: qcom-spmi-adc5: Fix the channel name commit fd7276189450110ed835eb0a334e62d2f1c4e3be Author: Jens Axboe Date: Sun Mar 26 16:15:57 2023 -0600 powerpc: Don't try to copy PPR for task with NULL pt_regs powerpc sets up PF_KTHREAD and PF_IO_WORKER with a NULL pt_regs, which from my (arguably very short) checking is not commonly done for other archs. This is fine, except when PF_IO_WORKER's have been created and the task does something that causes a coredump to be generated. Then we get this crash: Kernel attempted to read user page (160) - exploit attempt? (uid: 1000) BUG: Kernel NULL pointer dereference on read at 0x00000160 Faulting instruction address: 0xc0000000000c3a60 Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=32 NUMA pSeries Modules linked in: bochs drm_vram_helper drm_kms_helper xts binfmt_misc ecb ctr syscopyarea sysfillrect cbc sysimgblt drm_ttm_helper aes_generic ttm sg libaes evdev joydev virtio_balloon vmx_crypto gf128mul drm dm_mod fuse loop configfs drm_panel_orientation_quirks ip_tables x_tables autofs4 hid_generic usbhid hid xhci_pci xhci_hcd usbcore usb_common sd_mod CPU: 1 PID: 1982 Comm: ppc-crash Not tainted 6.3.0-rc2+ #88 Hardware name: IBM pSeries (emulated by qemu) POWER9 (raw) 0x4e1202 0xf000005 of:SLOF,HEAD hv:linux,kvm pSeries NIP: c0000000000c3a60 LR: c000000000039944 CTR: c0000000000398e0 REGS: c0000000041833b0 TRAP: 0300 Not tainted (6.3.0-rc2+) MSR: 800000000280b033 CR: 88082828 XER: 200400f8 ... NIP memcpy_power7+0x200/0x7d0 LR ppr_get+0x64/0xb0 Call Trace: ppr_get+0x40/0xb0 (unreliable) __regset_get+0x180/0x1f0 regset_get_alloc+0x64/0x90 elf_core_dump+0xb98/0x1b60 do_coredump+0x1c34/0x24a0 get_signal+0x71c/0x1410 do_notify_resume+0x140/0x6f0 interrupt_exit_user_prepare_main+0x29c/0x320 interrupt_exit_user_prepare+0x6c/0xa0 interrupt_return_srr_user+0x8/0x138 Because ppr_get() is trying to copy from a PF_IO_WORKER with a NULL pt_regs. Check for a valid pt_regs in both ppc_get/ppr_set, and return an error if not set. The actual error value doesn't seem to be important here, so just pick -EINVAL. Fixes: fa439810cc1b ("powerpc/ptrace: Enable support for NT_PPPC_TAR, NT_PPC_PPR, NT_PPC_DSCR") Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: Jens Axboe [mpe: Trim oops in change log, add Fixes & Cc stable] Signed-off-by: Michael Ellerman Link: https://msgid.link/d9f63344-fe7c-56ae-b420-4a1a04a2ae4c@kernel.dk commit 1abce0580b89464546ae06abd5891ebec43c9470 Author: Benjamin Gray Date: Fri Mar 3 09:59:47 2023 +1100 powerpc/64s: Fix __pte_needs_flush() false positive warning Userspace PROT_NONE ptes set _PAGE_PRIVILEGED, triggering a false positive debug assertion that __pte_flags_need_flush() is not called on a kernel mapping. Detect when it is a userspace PROT_NONE page by checking the required bits of PAGE_NONE are set, and none of the RWX bits are set. pte_protnone() is insufficient here because it always returns 0 when CONFIG_NUMA_BALANCING=n. Fixes: b11931e9adc1 ("powerpc/64s: add pte_needs_flush and huge_pmd_needs_flush") Cc: stable@vger.kernel.org # v6.1+ Reported-by: Russell Currey Signed-off-by: Benjamin Gray Signed-off-by: Michael Ellerman Link: https://msgid.link/20230302225947.81083-1-bgray@linux.ibm.com commit b4c66d755e6d5620920168c15eb75f53394a952c Merge: ebd3b826343bb 031a416c21708 Author: Paolo Abeni Date: Tue Mar 28 11:34:11 2023 +0200 Merge branch 'net-mvpp2-rss-fixes' Sven Auhagen says: ==================== net: mvpp2: rss fixes This patch series fixes up some rss problems in the mvpp2 driver. The classifier is missing some fragmentation flags, the parser has the QinQ headers switched and the PPPoE Layer 4 detecion is not working correctly. This is leading to no or bad rss for the default settings. ==================== Link: https://lore.kernel.org/r/20230325163903.ofefgus43x66as7i@Svens-MacBookPro.local Signed-off-by: Paolo Abeni commit 031a416c2170866be5132ae42e14453d669b0cb1 Author: Sven Auhagen Date: Sat Mar 25 17:41:05 2023 +0100 net: mvpp2: parser fix PPPoE In PPPoE add all IPv4 header option length to the parser and adjust the L3 and L4 offset accordingly. Currently the L4 match does not work with PPPoE and all packets are matched as L3 IP4 OPT. Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Sven Auhagen Signed-off-by: Paolo Abeni commit a587a84813b90372cb0a7565e201a4075da67919 Author: Sven Auhagen Date: Sat Mar 25 17:40:53 2023 +0100 net: mvpp2: parser fix QinQ The mvpp2 parser entry for QinQ has the inner and outer VLAN in the wrong order. Fix the problem by swapping them. Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Sven Auhagen Reviewed-by: Marcin Wojtas Signed-off-by: Paolo Abeni commit 9a251cae51d57289908222e6c322ca61fccc25fd Author: Sven Auhagen Date: Sat Mar 25 17:40:29 2023 +0100 net: mvpp2: classifier flow fix fragmentation flags Add missing IP Fragmentation Flag. Fixes: f9358e12a0af ("net: mvpp2: split ingress traffic into multiple flows") Signed-off-by: Sven Auhagen Reviewed-by: Marcin Wojtas Signed-off-by: Paolo Abeni commit a6f6a95f25803500079513780d11a911ce551d76 Author: George Guo Date: Tue Mar 28 15:13:35 2023 +0800 LoongArch, bpf: Fix jit to skip speculation barrier opcode Just skip the opcode(BPF_ST | BPF_NOSPEC) in the BPF JIT instead of failing to JIT the entire program, given LoongArch currently has no couterpart of a speculation barrier instruction. To verify the issue, use the ltp testcase as shown below. Also, Wang says: I can confirm there's currently no speculation barrier equivalent on LonogArch. (Loongson says there are builtin mitigations for Spectre-V1 and V2 on their chips, and AFAIK efforts to port the exploits to mips/LoongArch have all failed a few years ago.) Without this patch: $ ./bpf_prog02 [...] bpf_common.c:123: TBROK: Failed verification: ??? (524) [...] Summary: passed 0 failed 0 broken 1 skipped 0 warnings 0 With this patch: $ ./bpf_prog02 [...] Summary: passed 0 failed 0 broken 0 skipped 0 warnings 0 Fixes: 5dc615520c4d ("LoongArch: Add BPF JIT support") Signed-off-by: George Guo Signed-off-by: Daniel Borkmann Acked-by: WANG Xuerui Cc: Tiezhu Yang Link: https://lore.kernel.org/bpf/20230328071335.2664966-1-guodongtai@kylinos.cn commit 580031ff9952b7dbf48dedba6b56a100ae002bef Author: Martin KaFai Lau Date: Mon Mar 27 17:42:32 2023 -0700 bpf: tcp: Use sock_gen_put instead of sock_put in bpf_iter_tcp While reviewing the udp-iter batching patches, noticed the bpf_iter_tcp calling sock_put() is incorrect. It should call sock_gen_put instead because bpf_iter_tcp is iterating the ehash table which has the req sk and tw sk. This patch replaces all sock_put with sock_gen_put in the bpf_iter_tcp codepath. Fixes: 04c7820b776f ("bpf: tcp: Bpf iter batching and lock_sock") Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230328004232.2134233-1-martin.lau@linux.dev commit 21f27df854008b86349a203bf97fef79bb11f53e Author: Nico Boehr Date: Mon Feb 13 09:55:20 2023 +0100 KVM: s390: pv: fix external interruption loop not always detected To determine whether the guest has caused an external interruption loop upon code 20 (external interrupt) intercepts, the ext_new_psw needs to be inspected to see whether external interrupts are enabled. Under non-PV, ext_new_psw can simply be taken from guest lowcore. Under PV, KVM can only access the encrypted guest lowcore and hence the ext_new_psw must not be taken from guest lowcore. handle_external_interrupt() incorrectly did that and hence was not able to reliably tell whether an external interruption loop is happening or not. False negatives cause spurious failures of my kvm-unit-test for extint loops[1] under PV. Since code 20 is only caused under PV if and only if the guest's ext_new_psw is enabled for external interrupts, false positive detection of a external interruption loop can not happen. Fix this issue by instead looking at the guest PSW in the state description. Since the PSW swap for external interrupt is done by the ultravisor before the intercept is caused, this reliably tells whether the guest is enabled for external interrupts in the ext_new_psw. Also update the comments to explain better what is happening. [1] https://lore.kernel.org/kvm/20220812062151.1980937-4-nrb@linux.ibm.com/ Signed-off-by: Nico Boehr Reviewed-by: Janosch Frank Reviewed-by: Christian Borntraeger Fixes: 201ae986ead7 ("KVM: s390: protvirt: Implement interrupt injection") Link: https://lore.kernel.org/r/20230213085520.100756-2-nrb@linux.ibm.com Message-Id: <20230213085520.100756-2-nrb@linux.ibm.com> Signed-off-by: Janosch Frank commit ebd3b826343bb4a7a280aad68a113bbf044add1d Merge: 4f7702ab6fc3c 2b4c99f7d9a57 Author: Jakub Kicinski Date: Mon Mar 27 19:47:42 2023 -0700 Merge tag 'linux-can-fixes-for-6.3-20230327' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2023-03-27 Oleksij Rempel and Hillf Danton contribute a patch for the CAN J1939 protocol that prevents a potential deadlock in j1939_sk_errqueue(). Ivan Orlov fixes an uninit-value in the CAN BCM protocol in the bcm_tx_setup() function. * tag 'linux-can-fixes-for-6.3-20230327' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: bcm: bcm_tx_setup(): fix KMSAN uninit-value in vfs_write can: j1939: prevent deadlock by moving j1939_sk_errqueue() ==================== Link: https://lore.kernel.org/r/20230327124807.1157134-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit 4f7702ab6fc3c03cc10b0cf0bdbd0433146483e0 Author: Lukas Bulwahn Date: Fri Mar 24 09:16:13 2023 +0100 MAINTAINERS: remove the linux-nfc@lists.01.org list Some MAINTAINERS sections mention to mail patches to the list linux-nfc@lists.01.org. Probably due to changes on Intel's 01.org website and servers, the list server lists.01.org/ml01.01.org is simply gone. Considering emails recorded on lore.kernel.org, only a handful of emails where sent to the linux-nfc@lists.01.org list, and they are usually also sent to the netdev mailing list as well, where they are then picked up. So, there is no big benefit in restoring the linux-nfc elsewhere. Remove all occurrences of the linux-nfc@lists.01.org list in MAINTAINERS. Suggested-by: Krzysztof Kozlowski Link: https://lore.kernel.org/all/CAKXUXMzggxQ43DUZZRkPMGdo5WkzgA=i14ySJUFw4kZfE5ZaZA@mail.gmail.com/ Signed-off-by: Lukas Bulwahn Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230324081613.32000-1-lukas.bulwahn@gmail.com Signed-off-by: Jakub Kicinski commit ac9bba3ff1ef18ef0038eb7a590f93529eb566de Author: Sean Anderson Date: Thu Mar 23 10:59:57 2023 -0400 net: fman: Add myself as a reviewer I've read through or reworked a good portion of this driver. Add myself as a reviewer. Signed-off-by: Sean Anderson Reviewed-by: Simon Horman Acked-by: Madalin Bucur Link: https://lore.kernel.org/r/20230323145957.2999211-1-sean.anderson@seco.com Signed-off-by: Jakub Kicinski commit 1231363aec86704a6b0467a12e3ca7bdf890e01d Author: Juraj Pecigos Date: Sun Mar 26 11:29:49 2023 +0200 nvme-pci: mark Lexar NM760 as IGNORE_DEV_SUBNQN A system with more than one of these SSDs will only have one usable. The kernel fails to detect more than one nvme device due to duplicate cntlids. before: [ 9.395229] nvme 0000:01:00.0: platform quirk: setting simple suspend [ 9.395262] nvme nvme0: pci function 0000:01:00.0 [ 9.395282] nvme 0000:03:00.0: platform quirk: setting simple suspend [ 9.395305] nvme nvme1: pci function 0000:03:00.0 [ 9.409873] nvme nvme0: Duplicate cntlid 1 with nvme1, subsys nqn.2022-07.com.siliconmotion:nvm-subsystem-sn- , rejecting [ 9.409982] nvme nvme0: Removing after probe failure status: -22 [ 9.427487] nvme nvme1: allocated 64 MiB host memory buffer. [ 9.445088] nvme nvme1: 16/0/0 default/read/poll queues [ 9.449898] nvme nvme1: Ignoring bogus Namespace Identifiers after: [ 1.161890] nvme 0000:01:00.0: platform quirk: setting simple suspend [ 1.162660] nvme nvme0: pci function 0000:01:00.0 [ 1.162684] nvme 0000:03:00.0: platform quirk: setting simple suspend [ 1.162707] nvme nvme1: pci function 0000:03:00.0 [ 1.191354] nvme nvme0: allocated 64 MiB host memory buffer. [ 1.193378] nvme nvme1: allocated 64 MiB host memory buffer. [ 1.211044] nvme nvme1: 16/0/0 default/read/poll queues [ 1.211080] nvme nvme0: 16/0/0 default/read/poll queues [ 1.216145] nvme nvme0: Ignoring bogus Namespace Identifiers [ 1.216261] nvme nvme1: Ignoring bogus Namespace Identifiers Adding the NVME_QUIRK_IGNORE_DEV_SUBNQN quirk to resolves the issue. Signed-off-by: Juraj Pecigos Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 44378cd113e5f15bb0a89f5ac5a0e687b52feb90 Author: Duy Nguyen Date: Tue Mar 28 00:03:03 2023 +0000 ASoC: da7213.c: add missing pm_runtime_disable() da7213.c is missing pm_runtime_disable(), thus we will get below error when rmmod -> insmod. $ rmmod snd-soc-da7213.ko $ insmod snd-soc-da7213.ko da7213 0-001a: Unbalanced pm_runtime_enable!" [Kuninori adjusted to latest upstream] Signed-off-by: Duy Nguyen Signed-off-by: Kuninori Morimoto Tested-by: Khanh Le Link: https://lore.kernel.org/r/87mt3xg2tk.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2d82a40aa7d6fcae0250ec68b8566cdee7bfd44c Author: Filipe Manana Date: Wed Mar 22 09:46:34 2023 +0000 btrfs: fix deadlock when aborting transaction during relocation with scrub Before relocating a block group we pause scrub, then do the relocation and then unpause scrub. The relocation process requires starting and committing a transaction, and if we have a failure in the critical section of the transaction commit path (transaction state >= TRANS_STATE_COMMIT_START), we will deadlock if there is a paused scrub. That results in stack traces like the following: [42.479] BTRFS info (device sdc): relocating block group 53876686848 flags metadata|raid6 [42.936] BTRFS warning (device sdc): Skipping commit of aborted transaction. [42.936] ------------[ cut here ]------------ [42.936] BTRFS: Transaction aborted (error -28) [42.936] WARNING: CPU: 11 PID: 346822 at fs/btrfs/transaction.c:1977 btrfs_commit_transaction+0xcc8/0xeb0 [btrfs] [42.936] Modules linked in: dm_flakey dm_mod loop btrfs (...) [42.936] CPU: 11 PID: 346822 Comm: btrfs Tainted: G W 6.3.0-rc2-btrfs-next-127+ #1 [42.936] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [42.936] RIP: 0010:btrfs_commit_transaction+0xcc8/0xeb0 [btrfs] [42.936] Code: ff ff 45 8b (...) [42.936] RSP: 0018:ffffb58649633b48 EFLAGS: 00010282 [42.936] RAX: 0000000000000000 RBX: ffff8be6ef4d5bd8 RCX: 0000000000000000 [42.936] RDX: 0000000000000002 RSI: ffffffffb35e7782 RDI: 00000000ffffffff [42.936] RBP: ffff8be6ef4d5c98 R08: 0000000000000000 R09: ffffb586496339e8 [42.936] R10: 0000000000000001 R11: 0000000000000001 R12: ffff8be6d38c7c00 [42.936] R13: 00000000ffffffe4 R14: ffff8be6c268c000 R15: ffff8be6ef4d5cf0 [42.936] FS: 00007f381a82b340(0000) GS:ffff8beddfcc0000(0000) knlGS:0000000000000000 [42.936] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [42.936] CR2: 00007f1e35fb7638 CR3: 0000000117680006 CR4: 0000000000370ee0 [42.936] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [42.936] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [42.936] Call Trace: [42.936] [42.936] ? start_transaction+0xcb/0x610 [btrfs] [42.936] prepare_to_relocate+0x111/0x1a0 [btrfs] [42.936] relocate_block_group+0x57/0x5d0 [btrfs] [42.936] ? btrfs_wait_nocow_writers+0x25/0xb0 [btrfs] [42.936] btrfs_relocate_block_group+0x248/0x3c0 [btrfs] [42.936] ? __pfx_autoremove_wake_function+0x10/0x10 [42.936] btrfs_relocate_chunk+0x3b/0x150 [btrfs] [42.936] btrfs_balance+0x8ff/0x11d0 [btrfs] [42.936] ? __kmem_cache_alloc_node+0x14a/0x410 [42.936] btrfs_ioctl+0x2334/0x32c0 [btrfs] [42.937] ? mod_objcg_state+0xd2/0x360 [42.937] ? refill_obj_stock+0xb0/0x160 [42.937] ? seq_release+0x25/0x30 [42.937] ? __rseq_handle_notify_resume+0x3b5/0x4b0 [42.937] ? percpu_counter_add_batch+0x2e/0xa0 [42.937] ? __x64_sys_ioctl+0x88/0xc0 [42.937] __x64_sys_ioctl+0x88/0xc0 [42.937] do_syscall_64+0x38/0x90 [42.937] entry_SYSCALL_64_after_hwframe+0x72/0xdc [42.937] RIP: 0033:0x7f381a6ffe9b [42.937] Code: 00 48 89 44 24 (...) [42.937] RSP: 002b:00007ffd45ecf060 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [42.937] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f381a6ffe9b [42.937] RDX: 00007ffd45ecf150 RSI: 00000000c4009420 RDI: 0000000000000003 [42.937] RBP: 0000000000000003 R08: 0000000000000013 R09: 0000000000000000 [42.937] R10: 00007f381a60c878 R11: 0000000000000246 R12: 00007ffd45ed0423 [42.937] R13: 00007ffd45ecf150 R14: 0000000000000000 R15: 00007ffd45ecf148 [42.937] [42.937] ---[ end trace 0000000000000000 ]--- [42.937] BTRFS: error (device sdc: state A) in cleanup_transaction:1977: errno=-28 No space left [59.196] INFO: task btrfs:346772 blocked for more than 120 seconds. [59.196] Tainted: G W 6.3.0-rc2-btrfs-next-127+ #1 [59.196] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [59.196] task:btrfs state:D stack:0 pid:346772 ppid:1 flags:0x00004002 [59.196] Call Trace: [59.196] [59.196] __schedule+0x392/0xa70 [59.196] ? __pv_queued_spin_lock_slowpath+0x165/0x370 [59.196] schedule+0x5d/0xd0 [59.196] __scrub_blocked_if_needed+0x74/0xc0 [btrfs] [59.197] ? __pfx_autoremove_wake_function+0x10/0x10 [59.197] scrub_pause_off+0x21/0x50 [btrfs] [59.197] scrub_simple_mirror+0x1c7/0x950 [btrfs] [59.197] ? scrub_parity_put+0x1a5/0x1d0 [btrfs] [59.198] ? __pfx_autoremove_wake_function+0x10/0x10 [59.198] scrub_stripe+0x20d/0x740 [btrfs] [59.198] scrub_chunk+0xc4/0x130 [btrfs] [59.198] scrub_enumerate_chunks+0x3e4/0x7a0 [btrfs] [59.198] ? __pfx_autoremove_wake_function+0x10/0x10 [59.198] btrfs_scrub_dev+0x236/0x6a0 [btrfs] [59.199] ? btrfs_ioctl+0xd97/0x32c0 [btrfs] [59.199] ? _copy_from_user+0x7b/0x80 [59.199] btrfs_ioctl+0xde1/0x32c0 [btrfs] [59.199] ? refill_stock+0x33/0x50 [59.199] ? should_failslab+0xa/0x20 [59.199] ? kmem_cache_alloc_node+0x151/0x460 [59.199] ? alloc_io_context+0x1b/0x80 [59.199] ? preempt_count_add+0x70/0xa0 [59.199] ? __x64_sys_ioctl+0x88/0xc0 [59.199] __x64_sys_ioctl+0x88/0xc0 [59.199] do_syscall_64+0x38/0x90 [59.199] entry_SYSCALL_64_after_hwframe+0x72/0xdc [59.199] RIP: 0033:0x7f82ffaffe9b [59.199] RSP: 002b:00007f82ff9fcc50 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [59.199] RAX: ffffffffffffffda RBX: 000055b191e36310 RCX: 00007f82ffaffe9b [59.199] RDX: 000055b191e36310 RSI: 00000000c400941b RDI: 0000000000000003 [59.199] RBP: 0000000000000000 R08: 00007fff1575016f R09: 0000000000000000 [59.199] R10: 0000000000000000 R11: 0000000000000246 R12: 00007f82ff9fd640 [59.199] R13: 000000000000006b R14: 00007f82ffa87580 R15: 0000000000000000 [59.199] [59.199] INFO: task btrfs:346773 blocked for more than 120 seconds. [59.200] Tainted: G W 6.3.0-rc2-btrfs-next-127+ #1 [59.200] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [59.201] task:btrfs state:D stack:0 pid:346773 ppid:1 flags:0x00004002 [59.201] Call Trace: [59.201] [59.201] __schedule+0x392/0xa70 [59.201] ? __pv_queued_spin_lock_slowpath+0x165/0x370 [59.201] schedule+0x5d/0xd0 [59.201] __scrub_blocked_if_needed+0x74/0xc0 [btrfs] [59.201] ? __pfx_autoremove_wake_function+0x10/0x10 [59.201] scrub_pause_off+0x21/0x50 [btrfs] [59.202] scrub_simple_mirror+0x1c7/0x950 [btrfs] [59.202] ? scrub_parity_put+0x1a5/0x1d0 [btrfs] [59.202] ? __pfx_autoremove_wake_function+0x10/0x10 [59.202] scrub_stripe+0x20d/0x740 [btrfs] [59.202] scrub_chunk+0xc4/0x130 [btrfs] [59.203] scrub_enumerate_chunks+0x3e4/0x7a0 [btrfs] [59.203] ? __pfx_autoremove_wake_function+0x10/0x10 [59.203] btrfs_scrub_dev+0x236/0x6a0 [btrfs] [59.203] ? btrfs_ioctl+0xd97/0x32c0 [btrfs] [59.203] ? _copy_from_user+0x7b/0x80 [59.203] btrfs_ioctl+0xde1/0x32c0 [btrfs] [59.204] ? should_failslab+0xa/0x20 [59.204] ? kmem_cache_alloc_node+0x151/0x460 [59.204] ? alloc_io_context+0x1b/0x80 [59.204] ? preempt_count_add+0x70/0xa0 [59.204] ? __x64_sys_ioctl+0x88/0xc0 [59.204] __x64_sys_ioctl+0x88/0xc0 [59.204] do_syscall_64+0x38/0x90 [59.204] entry_SYSCALL_64_after_hwframe+0x72/0xdc [59.204] RIP: 0033:0x7f82ffaffe9b [59.204] RSP: 002b:00007f82ff1fbc50 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [59.204] RAX: ffffffffffffffda RBX: 000055b191e36790 RCX: 00007f82ffaffe9b [59.204] RDX: 000055b191e36790 RSI: 00000000c400941b RDI: 0000000000000003 [59.204] RBP: 0000000000000000 R08: 00007fff1575016f R09: 0000000000000000 [59.204] R10: 0000000000000000 R11: 0000000000000246 R12: 00007f82ff1fc640 [59.204] R13: 000000000000006b R14: 00007f82ffa87580 R15: 0000000000000000 [59.204] [59.204] INFO: task btrfs:346774 blocked for more than 120 seconds. [59.205] Tainted: G W 6.3.0-rc2-btrfs-next-127+ #1 [59.205] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [59.206] task:btrfs state:D stack:0 pid:346774 ppid:1 flags:0x00004002 [59.206] Call Trace: [59.206] [59.206] __schedule+0x392/0xa70 [59.206] schedule+0x5d/0xd0 [59.206] __scrub_blocked_if_needed+0x74/0xc0 [btrfs] [59.206] ? __pfx_autoremove_wake_function+0x10/0x10 [59.206] scrub_pause_off+0x21/0x50 [btrfs] [59.207] scrub_simple_mirror+0x1c7/0x950 [btrfs] [59.207] ? scrub_parity_put+0x1a5/0x1d0 [btrfs] [59.207] ? __pfx_autoremove_wake_function+0x10/0x10 [59.207] scrub_stripe+0x20d/0x740 [btrfs] [59.208] scrub_chunk+0xc4/0x130 [btrfs] [59.208] scrub_enumerate_chunks+0x3e4/0x7a0 [btrfs] [59.208] ? __mutex_unlock_slowpath.isra.0+0x9a/0x120 [59.208] btrfs_scrub_dev+0x236/0x6a0 [btrfs] [59.208] ? btrfs_ioctl+0xd97/0x32c0 [btrfs] [59.209] ? _copy_from_user+0x7b/0x80 [59.209] btrfs_ioctl+0xde1/0x32c0 [btrfs] [59.209] ? should_failslab+0xa/0x20 [59.209] ? kmem_cache_alloc_node+0x151/0x460 [59.209] ? alloc_io_context+0x1b/0x80 [59.209] ? preempt_count_add+0x70/0xa0 [59.209] ? __x64_sys_ioctl+0x88/0xc0 [59.209] __x64_sys_ioctl+0x88/0xc0 [59.209] do_syscall_64+0x38/0x90 [59.209] entry_SYSCALL_64_after_hwframe+0x72/0xdc [59.209] RIP: 0033:0x7f82ffaffe9b [59.209] RSP: 002b:00007f82fe9fac50 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [59.209] RAX: ffffffffffffffda RBX: 000055b191e36c10 RCX: 00007f82ffaffe9b [59.209] RDX: 000055b191e36c10 RSI: 00000000c400941b RDI: 0000000000000003 [59.209] RBP: 0000000000000000 R08: 00007fff1575016f R09: 0000000000000000 [59.209] R10: 0000000000000000 R11: 0000000000000246 R12: 00007f82fe9fb640 [59.209] R13: 000000000000006b R14: 00007f82ffa87580 R15: 0000000000000000 [59.209] [59.209] INFO: task btrfs:346775 blocked for more than 120 seconds. [59.210] Tainted: G W 6.3.0-rc2-btrfs-next-127+ #1 [59.210] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [59.211] task:btrfs state:D stack:0 pid:346775 ppid:1 flags:0x00004002 [59.211] Call Trace: [59.211] [59.211] __schedule+0x392/0xa70 [59.211] schedule+0x5d/0xd0 [59.211] __scrub_blocked_if_needed+0x74/0xc0 [btrfs] [59.211] ? __pfx_autoremove_wake_function+0x10/0x10 [59.211] scrub_pause_off+0x21/0x50 [btrfs] [59.212] scrub_simple_mirror+0x1c7/0x950 [btrfs] [59.212] ? scrub_parity_put+0x1a5/0x1d0 [btrfs] [59.212] ? __pfx_autoremove_wake_function+0x10/0x10 [59.212] scrub_stripe+0x20d/0x740 [btrfs] [59.213] scrub_chunk+0xc4/0x130 [btrfs] [59.213] scrub_enumerate_chunks+0x3e4/0x7a0 [btrfs] [59.213] ? __mutex_unlock_slowpath.isra.0+0x9a/0x120 [59.213] btrfs_scrub_dev+0x236/0x6a0 [btrfs] [59.213] ? btrfs_ioctl+0xd97/0x32c0 [btrfs] [59.214] ? _copy_from_user+0x7b/0x80 [59.214] btrfs_ioctl+0xde1/0x32c0 [btrfs] [59.214] ? should_failslab+0xa/0x20 [59.214] ? kmem_cache_alloc_node+0x151/0x460 [59.214] ? alloc_io_context+0x1b/0x80 [59.214] ? preempt_count_add+0x70/0xa0 [59.214] ? __x64_sys_ioctl+0x88/0xc0 [59.214] __x64_sys_ioctl+0x88/0xc0 [59.214] do_syscall_64+0x38/0x90 [59.214] entry_SYSCALL_64_after_hwframe+0x72/0xdc [59.214] RIP: 0033:0x7f82ffaffe9b [59.214] RSP: 002b:00007f82fe1f9c50 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [59.214] RAX: ffffffffffffffda RBX: 000055b191e37090 RCX: 00007f82ffaffe9b [59.214] RDX: 000055b191e37090 RSI: 00000000c400941b RDI: 0000000000000003 [59.214] RBP: 0000000000000000 R08: 00007fff1575016f R09: 0000000000000000 [59.214] R10: 0000000000000000 R11: 0000000000000246 R12: 00007f82fe1fa640 [59.214] R13: 000000000000006b R14: 00007f82ffa87580 R15: 0000000000000000 [59.214] [59.214] INFO: task btrfs:346776 blocked for more than 120 seconds. [59.215] Tainted: G W 6.3.0-rc2-btrfs-next-127+ #1 [59.216] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [59.217] task:btrfs state:D stack:0 pid:346776 ppid:1 flags:0x00004002 [59.217] Call Trace: [59.217] [59.217] __schedule+0x392/0xa70 [59.217] ? __pv_queued_spin_lock_slowpath+0x165/0x370 [59.217] schedule+0x5d/0xd0 [59.217] __scrub_blocked_if_needed+0x74/0xc0 [btrfs] [59.217] ? __pfx_autoremove_wake_function+0x10/0x10 [59.217] scrub_pause_off+0x21/0x50 [btrfs] [59.217] scrub_simple_mirror+0x1c7/0x950 [btrfs] [59.217] ? scrub_parity_put+0x1a5/0x1d0 [btrfs] [59.218] ? __pfx_autoremove_wake_function+0x10/0x10 [59.218] scrub_stripe+0x20d/0x740 [btrfs] [59.218] scrub_chunk+0xc4/0x130 [btrfs] [59.218] scrub_enumerate_chunks+0x3e4/0x7a0 [btrfs] [59.219] ? __pfx_autoremove_wake_function+0x10/0x10 [59.219] btrfs_scrub_dev+0x236/0x6a0 [btrfs] [59.219] ? btrfs_ioctl+0xd97/0x32c0 [btrfs] [59.219] ? _copy_from_user+0x7b/0x80 [59.219] btrfs_ioctl+0xde1/0x32c0 [btrfs] [59.219] ? should_failslab+0xa/0x20 [59.219] ? kmem_cache_alloc_node+0x151/0x460 [59.219] ? alloc_io_context+0x1b/0x80 [59.219] ? preempt_count_add+0x70/0xa0 [59.219] ? __x64_sys_ioctl+0x88/0xc0 [59.219] __x64_sys_ioctl+0x88/0xc0 [59.219] do_syscall_64+0x38/0x90 [59.219] entry_SYSCALL_64_after_hwframe+0x72/0xdc [59.219] RIP: 0033:0x7f82ffaffe9b [59.219] RSP: 002b:00007f82fd9f8c50 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [59.219] RAX: ffffffffffffffda RBX: 000055b191e37510 RCX: 00007f82ffaffe9b [59.219] RDX: 000055b191e37510 RSI: 00000000c400941b RDI: 0000000000000003 [59.219] RBP: 0000000000000000 R08: 00007fff1575016f R09: 0000000000000000 [59.219] R10: 0000000000000000 R11: 0000000000000246 R12: 00007f82fd9f9640 [59.219] R13: 000000000000006b R14: 00007f82ffa87580 R15: 0000000000000000 [59.219] [59.219] INFO: task btrfs:346822 blocked for more than 120 seconds. [59.220] Tainted: G W 6.3.0-rc2-btrfs-next-127+ #1 [59.221] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [59.222] task:btrfs state:D stack:0 pid:346822 ppid:1 flags:0x00004002 [59.222] Call Trace: [59.222] [59.222] __schedule+0x392/0xa70 [59.222] schedule+0x5d/0xd0 [59.222] btrfs_scrub_cancel+0x91/0x100 [btrfs] [59.222] ? __pfx_autoremove_wake_function+0x10/0x10 [59.222] btrfs_commit_transaction+0x572/0xeb0 [btrfs] [59.223] ? start_transaction+0xcb/0x610 [btrfs] [59.223] prepare_to_relocate+0x111/0x1a0 [btrfs] [59.223] relocate_block_group+0x57/0x5d0 [btrfs] [59.223] ? btrfs_wait_nocow_writers+0x25/0xb0 [btrfs] [59.223] btrfs_relocate_block_group+0x248/0x3c0 [btrfs] [59.224] ? __pfx_autoremove_wake_function+0x10/0x10 [59.224] btrfs_relocate_chunk+0x3b/0x150 [btrfs] [59.224] btrfs_balance+0x8ff/0x11d0 [btrfs] [59.224] ? __kmem_cache_alloc_node+0x14a/0x410 [59.224] btrfs_ioctl+0x2334/0x32c0 [btrfs] [59.225] ? mod_objcg_state+0xd2/0x360 [59.225] ? refill_obj_stock+0xb0/0x160 [59.225] ? seq_release+0x25/0x30 [59.225] ? __rseq_handle_notify_resume+0x3b5/0x4b0 [59.225] ? percpu_counter_add_batch+0x2e/0xa0 [59.225] ? __x64_sys_ioctl+0x88/0xc0 [59.225] __x64_sys_ioctl+0x88/0xc0 [59.225] do_syscall_64+0x38/0x90 [59.225] entry_SYSCALL_64_after_hwframe+0x72/0xdc [59.225] RIP: 0033:0x7f381a6ffe9b [59.225] RSP: 002b:00007ffd45ecf060 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [59.225] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f381a6ffe9b [59.225] RDX: 00007ffd45ecf150 RSI: 00000000c4009420 RDI: 0000000000000003 [59.225] RBP: 0000000000000003 R08: 0000000000000013 R09: 0000000000000000 [59.225] R10: 00007f381a60c878 R11: 0000000000000246 R12: 00007ffd45ed0423 [59.225] R13: 00007ffd45ecf150 R14: 0000000000000000 R15: 00007ffd45ecf148 [59.225] What happens is the following: 1) A scrub is running, so fs_info->scrubs_running is 1; 2) Task A starts block group relocation, and at btrfs_relocate_chunk() it pauses scrub by calling btrfs_scrub_pause(). That increments fs_info->scrub_pause_req from 0 to 1 and waits for the scrub task to pause (for fs_info->scrubs_paused to be == to fs_info->scrubs_running); 3) The scrub task pauses at scrub_pause_off(), waiting for fs_info->scrub_pause_req to decrease to 0; 4) Task A then enters btrfs_relocate_block_group(), and down that call chain we start a transaction and then attempt to commit it; 5) When task A calls btrfs_commit_transaction(), it either will do the commit itself or wait for some other task that already started the commit of the transaction - it doesn't matter which case; 6) The transaction commit enters state TRANS_STATE_COMMIT_START; 7) An error happens during the transaction commit, like -ENOSPC when running delayed refs or delayed items for example; 8) This results in calling transaction.c:cleanup_transaction(), where we call btrfs_scrub_cancel(), incrementing fs_info->scrub_cancel_req from 0 to 1, and blocking this task waiting for fs_info->scrubs_running to decrease to 0; 9) From this point on, both the transaction commit and the scrub task hang forever: 1) The transaction commit is waiting for fs_info->scrubs_running to be decreased to 0; 2) The scrub task is at scrub_pause_off() waiting for fs_info->scrub_pause_req to decrease to 0 - so it can not proceed to stop the scrub and decrement fs_info->scrubs_running from 0 to 1. Therefore resulting in a deadlock. Fix this by having cleanup_transaction(), called if a transaction commit fails, not call btrfs_scrub_cancel() if relocation is in progress, and having btrfs_relocate_block_group() call btrfs_scrub_cancel() instead if the relocation failed and a transaction abort happened. This was triggered with btrfs/061 from fstests. Fixes: 55e3a601c81c ("btrfs: Fix data checksum error cause by replace with io-load.") CC: stable@vger.kernel.org # 4.14+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 50d281fc434cb8e2497f5e70a309ccca6b1a09f0 Author: Anand Jain Date: Thu Mar 23 15:56:48 2023 +0800 btrfs: scan device in non-exclusive mode This fixes mkfs/mount/check failures due to race with systemd-udevd scan. During the device scan initiated by systemd-udevd, other user space EXCL operations such as mkfs, mount, or check may get blocked and result in a "Device or resource busy" error. This is because the device scan process opens the device with the EXCL flag in the kernel. Two reports were received: - btrfs/179 test case, where the fsck command failed with the -EBUSY error - LTP pwritev03 test case, where mkfs.vfs failed with the -EBUSY error, when mkfs.vfs tried to overwrite old btrfs filesystem on the device. In both cases, fsck and mkfs (respectively) were racing with a systemd-udevd device scan, and systemd-udevd won, resulting in the -EBUSY error for fsck and mkfs. Reproducing the problem has been difficult because there is a very small window during which these userspace threads can race to acquire the exclusive device open. Even on the system where the problem was observed, the problem occurrences were anywhere between 10 to 400 iterations and chances of reproducing decreases with debug printk()s. However, an exclusive device open is unnecessary for the scan process, as there are no write operations on the device during scan. Furthermore, during the mount process, the superblock is re-read in the below function call chain: btrfs_mount_root btrfs_open_devices open_fs_devices btrfs_open_one_device btrfs_get_bdev_and_sb So, to fix this issue, removes the FMODE_EXCL flag from the scan operation, and add a comment. The case where mkfs may still write to the device and a scan is running, the btrfs signature is not written at that time so scan will not recognize such device. Reported-by: Sherry Yang Reported-by: kernel test robot Link: https://lore.kernel.org/oe-lkp/202303170839.fdf23068-oliver.sang@intel.com CC: stable@vger.kernel.org # 5.4+ Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2f1a6be12ab6c8470d5776e68644726c94257c54 Author: Filipe Manana Date: Wed Mar 22 10:33:28 2023 +0000 btrfs: fix race between quota disable and quota assign ioctls The quota assign ioctl can currently run in parallel with a quota disable ioctl call. The assign ioctl uses the quota root, while the disable ioctl frees that root, and therefore we can have a use-after-free triggered in the assign ioctl, leading to a trace like the following when KASAN is enabled: [672.723][T736] BUG: KASAN: slab-use-after-free in btrfs_search_slot+0x2962/0x2db0 [672.723][T736] Read of size 8 at addr ffff888022ec0208 by task btrfs_search_sl/27736 [672.724][T736] [672.725][T736] CPU: 1 PID: 27736 Comm: btrfs_search_sl Not tainted 6.3.0-rc3 #37 [672.723][T736] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 [672.727][T736] Call Trace: [672.728][T736] [672.728][T736] dump_stack_lvl+0xd9/0x150 [672.725][T736] print_report+0xc1/0x5e0 [672.720][T736] ? __virt_addr_valid+0x61/0x2e0 [672.727][T736] ? __phys_addr+0xc9/0x150 [672.725][T736] ? btrfs_search_slot+0x2962/0x2db0 [672.722][T736] kasan_report+0xc0/0xf0 [672.729][T736] ? btrfs_search_slot+0x2962/0x2db0 [672.724][T736] btrfs_search_slot+0x2962/0x2db0 [672.723][T736] ? fs_reclaim_acquire+0xba/0x160 [672.722][T736] ? split_leaf+0x13d0/0x13d0 [672.726][T736] ? rcu_is_watching+0x12/0xb0 [672.723][T736] ? kmem_cache_alloc+0x338/0x3c0 [672.722][T736] update_qgroup_status_item+0xf7/0x320 [672.724][T736] ? add_qgroup_rb+0x3d0/0x3d0 [672.739][T736] ? do_raw_spin_lock+0x12d/0x2b0 [672.730][T736] ? spin_bug+0x1d0/0x1d0 [672.737][T736] btrfs_run_qgroups+0x5de/0x840 [672.730][T736] ? btrfs_qgroup_rescan_worker+0xa70/0xa70 [672.738][T736] ? __del_qgroup_relation+0x4ba/0xe00 [672.738][T736] btrfs_ioctl+0x3d58/0x5d80 [672.735][T736] ? tomoyo_path_number_perm+0x16a/0x550 [672.737][T736] ? tomoyo_execute_permission+0x4a0/0x4a0 [672.731][T736] ? btrfs_ioctl_get_supported_features+0x50/0x50 [672.737][T736] ? __sanitizer_cov_trace_switch+0x54/0x90 [672.734][T736] ? do_vfs_ioctl+0x132/0x1660 [672.730][T736] ? vfs_fileattr_set+0xc40/0xc40 [672.730][T736] ? _raw_spin_unlock_irq+0x2e/0x50 [672.732][T736] ? sigprocmask+0xf2/0x340 [672.737][T736] ? __fget_files+0x26a/0x480 [672.732][T736] ? bpf_lsm_file_ioctl+0x9/0x10 [672.738][T736] ? btrfs_ioctl_get_supported_features+0x50/0x50 [672.736][T736] __x64_sys_ioctl+0x198/0x210 [672.736][T736] do_syscall_64+0x39/0xb0 [672.731][T736] entry_SYSCALL_64_after_hwframe+0x63/0xcd [672.739][T736] RIP: 0033:0x4556ad [672.742][T736] [672.743][T736] [672.748][T736] Allocated by task 27677: [672.743][T736] kasan_save_stack+0x22/0x40 [672.741][T736] kasan_set_track+0x25/0x30 [672.741][T736] __kasan_kmalloc+0xa4/0xb0 [672.749][T736] btrfs_alloc_root+0x48/0x90 [672.746][T736] btrfs_create_tree+0x146/0xa20 [672.744][T736] btrfs_quota_enable+0x461/0x1d20 [672.743][T736] btrfs_ioctl+0x4a1c/0x5d80 [672.747][T736] __x64_sys_ioctl+0x198/0x210 [672.749][T736] do_syscall_64+0x39/0xb0 [672.744][T736] entry_SYSCALL_64_after_hwframe+0x63/0xcd [672.756][T736] [672.757][T736] Freed by task 27677: [672.759][T736] kasan_save_stack+0x22/0x40 [672.759][T736] kasan_set_track+0x25/0x30 [672.756][T736] kasan_save_free_info+0x2e/0x50 [672.751][T736] ____kasan_slab_free+0x162/0x1c0 [672.758][T736] slab_free_freelist_hook+0x89/0x1c0 [672.752][T736] __kmem_cache_free+0xaf/0x2e0 [672.752][T736] btrfs_put_root+0x1ff/0x2b0 [672.759][T736] btrfs_quota_disable+0x80a/0xbc0 [672.752][T736] btrfs_ioctl+0x3e5f/0x5d80 [672.756][T736] __x64_sys_ioctl+0x198/0x210 [672.753][T736] do_syscall_64+0x39/0xb0 [672.765][T736] entry_SYSCALL_64_after_hwframe+0x63/0xcd [672.769][T736] [672.768][T736] The buggy address belongs to the object at ffff888022ec0000 [672.768][T736] which belongs to the cache kmalloc-4k of size 4096 [672.769][T736] The buggy address is located 520 bytes inside of [672.769][T736] freed 4096-byte region [ffff888022ec0000, ffff888022ec1000) [672.760][T736] [672.764][T736] The buggy address belongs to the physical page: [672.761][T736] page:ffffea00008bb000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x22ec0 [672.766][T736] head:ffffea00008bb000 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [672.779][T736] flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) [672.770][T736] raw: 00fff00000010200 ffff888012842140 ffffea000054ba00 dead000000000002 [672.770][T736] raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000 [672.771][T736] page dumped because: kasan: bad access detected [672.778][T736] page_owner tracks the page as allocated [672.777][T736] page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 88 [672.779][T736] get_page_from_freelist+0x119c/0x2d50 [672.779][T736] __alloc_pages+0x1cb/0x4a0 [672.776][T736] alloc_pages+0x1aa/0x270 [672.773][T736] allocate_slab+0x260/0x390 [672.771][T736] ___slab_alloc+0xa9a/0x13e0 [672.778][T736] __slab_alloc.constprop.0+0x56/0xb0 [672.771][T736] __kmem_cache_alloc_node+0x136/0x320 [672.789][T736] __kmalloc+0x4e/0x1a0 [672.783][T736] tomoyo_realpath_from_path+0xc3/0x600 [672.781][T736] tomoyo_path_perm+0x22f/0x420 [672.782][T736] tomoyo_path_unlink+0x92/0xd0 [672.780][T736] security_path_unlink+0xdb/0x150 [672.788][T736] do_unlinkat+0x377/0x680 [672.788][T736] __x64_sys_unlink+0xca/0x110 [672.789][T736] do_syscall_64+0x39/0xb0 [672.783][T736] entry_SYSCALL_64_after_hwframe+0x63/0xcd [672.784][T736] page last free stack trace: [672.787][T736] free_pcp_prepare+0x4e5/0x920 [672.787][T736] free_unref_page+0x1d/0x4e0 [672.784][T736] __unfreeze_partials+0x17c/0x1a0 [672.797][T736] qlist_free_all+0x6a/0x180 [672.796][T736] kasan_quarantine_reduce+0x189/0x1d0 [672.797][T736] __kasan_slab_alloc+0x64/0x90 [672.793][T736] kmem_cache_alloc+0x17c/0x3c0 [672.799][T736] getname_flags.part.0+0x50/0x4e0 [672.799][T736] getname_flags+0x9e/0xe0 [672.792][T736] vfs_fstatat+0x77/0xb0 [672.791][T736] __do_sys_newlstat+0x84/0x100 [672.798][T736] do_syscall_64+0x39/0xb0 [672.796][T736] entry_SYSCALL_64_after_hwframe+0x63/0xcd [672.790][T736] [672.791][T736] Memory state around the buggy address: [672.799][T736] ffff888022ec0100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [672.805][T736] ffff888022ec0180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [672.802][T736] >ffff888022ec0200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [672.809][T736] ^ [672.809][T736] ffff888022ec0280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [672.809][T736] ffff888022ec0300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb Fix this by having the qgroup assign ioctl take the qgroup ioctl mutex before calling btrfs_run_qgroups(), which is what all qgroup ioctls should call. Reported-by: butt3rflyh4ck Link: https://lore.kernel.org/linux-btrfs/CAFcO6XN3VD8ogmHwqRk4kbiwtpUSNySu2VAxN8waEPciCHJvMA@mail.gmail.com/ CC: stable@vger.kernel.org # 5.10+ Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit bb430b69422640891b0b8db762885730579a4145 Author: Alyssa Ross Date: Mon Mar 20 13:54:30 2023 +0100 loop: LOOP_CONFIGURE: send uevents for partitions LOOP_CONFIGURE is, as far as I understand it, supposed to be a way to combine LOOP_SET_FD and LOOP_SET_STATUS64 into a single syscall. When using LOOP_SET_FD+LOOP_SET_STATUS64, a single uevent would be sent for each partition found on the loop device after the second ioctl(), but when using LOOP_CONFIGURE, no such uevent was being sent. In the old setup, uevents are disabled for LOOP_SET_FD, but not for LOOP_SET_STATUS64. This makes sense, as it prevents uevents being sent for a partially configured device during LOOP_SET_FD - they're only sent at the end of LOOP_SET_STATUS64. But for LOOP_CONFIGURE, uevents were disabled for the entire operation, so that final notification was never issued. To fix this, reduce the critical section to exclude the loop_reread_partitions() call, which causes the uevents to be issued, to after uevents are re-enabled, matching the behaviour of the LOOP_SET_FD+LOOP_SET_STATUS64 combination. I noticed this because Busybox's losetup program recently changed from using LOOP_SET_FD+LOOP_SET_STATUS64 to LOOP_CONFIGURE, and this broke my setup, for which I want a notification from the kernel any time a new partition becomes available. Signed-off-by: Alyssa Ross [hch: reduced the critical section] Signed-off-by: Christoph Hellwig Fixes: 3448914e8cc5 ("loop: Add LOOP_CONFIGURE ioctl") Link: https://lore.kernel.org/r/20230320125430.55367-1-hch@lst.de Signed-off-by: Jens Axboe commit 3a93e40326c8f470e71d20b4c42d36767450f38f Merge: 91fe204578ba3 9e347ba03029e Author: Linus Torvalds Date: Mon Mar 27 12:22:45 2023 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "RISC-V: - Fix VM hang in case of timer delta being zero ARM: - MMU fixes: - Read the MMU notifier seq before dropping the mmap lock to guard against reading a potentially stale VMA - Disable interrupts when walking user page tables to protect against the page table being freed - Read the MTE permissions for the VMA within the mmap lock critical section, avoiding the use of a potentally stale VMA pointer - vPMU fixes: - Return the sum of the current perf event value and PMC snapshot for reads from userspace - Don't save the value of guest writes to PMCR_EL0.{C,P}, which could otherwise lead to userspace erroneously resetting the vPMU during VM save/restore" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: riscv/kvm: Fix VM hang in case of timer delta being zero. KVM: arm64: Check for kvm_vma_mte_allowed in the critical section KVM: arm64: Disable interrupts while walking userspace PTs KVM: arm64: Retry fault if vma_lookup() results become invalid KVM: arm64: PMU: Don't save PMCR_EL0.{C,P} for the vCPU KVM: arm64: PMU: Fix GET_ONE_REG for vPMC regs to return the current value commit c56610a869bce03490faf4f157076370c71b8ae3 Author: Rafael J. Wysocki Date: Fri Mar 24 14:33:42 2023 +0100 ACPI: bus: Rework system-level device notification handling For ACPI drivers that provide a ->notify() callback and set ACPI_DRIVER_ALL_NOTIFY_EVENTS in their flags, that callback can be invoked while either the ->add() or the ->remove() callback is running without any synchronization at the bus type level which is counter to the common-sense expectation that notification handling should only be enabled when the driver is actually bound to the device. As a result, if the driver is not careful enough, it's ->notify() callback may crash when it is invoked too early or too late [1]. This issue has been amplified by commit d6fb6ee1820c ("ACPI: bus: Drop driver member of struct acpi_device") that made acpi_bus_notify() check for the presence of the driver and its ->notify() callback directly instead of using an extra driver pointer that was only set and cleared by the bus type code, but it was present before that commit although it was harder to reproduce then. It can be addressed by using the observation that acpi_device_install_notify_handler() can be modified to install the handler for all types of events when ACPI_DRIVER_ALL_NOTIFY_EVENTS is set in the driver flags, in which case acpi_bus_notify() will not need to invoke the driver's ->notify() callback any more and that callback will only be invoked after acpi_device_install_notify_handler() has run and before acpi_device_remove_notify_handler() runs, which implies the correct ordering with respect to the other ACPI driver callbacks. Modify the code accordingly and while at it, drop two redundant local variables from acpi_bus_notify() and turn its description comment into a proper kerneldoc one. Fixes: d6fb6ee1820c ("ACPI: bus: Drop driver member of struct acpi_device") Link: https://lore.kernel.org/linux-acpi/9f6cba7a8a57e5a687c934e8e406e28c.squirrel@mail.panix.com # [1] Reported-by: Pierre Asselin Signed-off-by: Rafael J. Wysocki Tested-by: Pierre Asselin commit 91fe204578ba3183cc32984a613bd539b3670507 Merge: fc5d1a9233eef acd0acb802b90 Author: Linus Torvalds Date: Mon Mar 27 09:45:39 2023 -0700 Merge tag 'platform-drivers-x86-v6.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Hans de Goede: - Intel tpmi/vsec fixes - think-lmi fixes - two other small fixes / hw-id additions * tag 'platform-drivers-x86-v6.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/surface: aggregator: Add missing fwnode_handle_put() platform/x86: think-lmi: Add possible_values for ThinkStation platform/x86: think-lmi: only display possible_values if available platform/x86: think-lmi: use correct possible_values delimiters platform/x86: think-lmi: add missing type attribute platform/x86 (gigabyte-wmi): Add support for A320M-S2H V2 platform/x86/intel: tpmi: Revise the comment of intel_vsec_add_aux platform/x86/intel: tpmi: Fix double free in tpmi_create_device() platform/x86/intel: vsec: Fix a memory leak in intel_vsec_add_aux commit fc5d1a9233eef4a3656712994e5bfa0c0470ebfc Merge: 197b6b60ae7bc e732e39ed9929 Author: Linus Torvalds Date: Mon Mar 27 09:41:17 2023 -0700 Merge tag 'mtd/fixes-for-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull MTD fixes from Miquel Raynal: "Raw NAND controller driver fixes: - meson: - Invalidate cache on polling ECC bit - Initialize struct with zeroes - nandsim: Artificially prevent sequential page reads ECC engine driver fixes: - mxic-ecc: Fix mxic_ecc_data_xfer_wait_for_completion() when irq is used Binging fixes: - jedec,spi-nor: Document CPOL/CPHA support" * tag 'mtd/fixes-for-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: mtd: rawnand: meson: invalidate cache on polling ECC bit mtd: rawnand: nandsim: Artificially prevent sequential page reads dt-bindings: mtd: jedec,spi-nor: Document CPOL/CPHA support mtd: nand: mxic-ecc: Fix mxic_ecc_data_xfer_wait_for_completion() when irq is used mtd: rawnand: meson: initialize struct with zeroes commit f9d323e7c1724270d747657051099826744e91e7 Author: Marc Gonzalez Date: Mon Mar 27 14:09:32 2023 +0200 perf/amlogic: adjust register offsets Commit "perf/amlogic: resolve conflict between canvas & pmu" changed the base address. Fixes: 2016e2113d35 ("perf/amlogic: Add support for Amlogic meson G12 SoC DDR PMU driver") Signed-off-by: Marc Gonzalez Acked-by: Will Deacon Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230327120932.2158389-4-mgonzalez@freebox.fr Signed-off-by: Neil Armstrong commit f9bbf25e7b2b74b52b2f269216a92657774f239c Author: Heiko Carstens Date: Mon Mar 6 12:31:30 2023 +0100 s390/ptrace: fix PTRACE_GET_LAST_BREAK error handling Return -EFAULT if put_user() for the PTRACE_GET_LAST_BREAK request fails, instead of silently ignoring it. Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 7bb2107e63d8a4a13bbb6fe0e1cbd68784a2e9ac Author: Jiri Slaby (SUSE) Date: Thu Mar 16 12:28:09 2023 +0100 s390: reintroduce expoline dependence to scripts Expolines depend on scripts/basic/fixdep. And build of expolines can now race with the fixdep build: make[1]: *** Deleting file 'arch/s390/lib/expoline/expoline.o' /bin/sh: line 1: scripts/basic/fixdep: Permission denied make[1]: *** [../scripts/Makefile.build:385: arch/s390/lib/expoline/expoline.o] Error 126 make: *** [../arch/s390/Makefile:166: expoline_prepare] Error 2 The dependence was removed in the below Fixes: commit. So reintroduce the dependence on scripts. Fixes: a0b0987a7811 ("s390/nospec: remove unneeded header includes") Cc: Joe Lawrence Cc: stable@vger.kernel.org Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Sven Schnelle Cc: linux-s390@vger.kernel.org Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20230316112809.7903-1-jirislaby@kernel.org Signed-off-by: Vasily Gorbik commit 8f8cf767589f2131ae5d40f3758429095c701c84 Author: Tony Krowiak Date: Mon Mar 20 11:04:47 2023 -0400 s390/vfio-ap: fix memory leak in vfio_ap device driver The device release callback function invoked to release the matrix device uses the dev_get_drvdata(device *dev) function to retrieve the pointer to the vfio_matrix_dev object in order to free its storage. The problem is, this object is not stored as drvdata with the device; since the kfree function will accept a NULL pointer, the memory for the vfio_matrix_dev object is never freed. Since the device being released is contained within the vfio_matrix_dev object, the container_of macro will be used to retrieve its pointer. Fixes: 1fde573413b5 ("s390: vfio-ap: base implementation of VFIO AP device driver") Signed-off-by: Tony Krowiak Reviewed-by: Harald Freudenberger Link: https://lore.kernel.org/r/20230320150447.34557-1-akrowiak@linux.ibm.com Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 89aba4c26fae4e459f755a18912845c348ee48f3 Author: Heiko Carstens Date: Thu Mar 23 13:09:16 2023 +0100 s390/uaccess: add missing earlyclobber annotations to __clear_user() Add missing earlyclobber annotation to size, to, and tmp2 operands of the __clear_user() inline assembly since they are modified or written to before the last usage of all input operands. This can lead to incorrect register allocation for the inline assembly. Fixes: 6c2a9e6df604 ("[S390] Use alternative user-copy operations for new hardware.") Reported-by: Mark Rutland Link: https://lore.kernel.org/all/20230321122514.1743889-3-mark.rutland@arm.com/ Cc: stable@vger.kernel.org Reviewed-by: Gerald Schaefer Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 80962ec912db56d323883154efc2297473e692cb Author: Sean Christopherson Date: Wed Mar 22 07:33:00 2023 -0700 KVM: nVMX: Do not report error code when synthesizing VM-Exit from Real Mode Don't report an error code to L1 when synthesizing a nested VM-Exit and L2 is in Real Mode. Per Intel's SDM, regarding the error code valid bit: This bit is always 0 if the VM exit occurred while the logical processor was in real-address mode (CR0.PE=0). The bug was introduced by a recent fix for AMD's Paged Real Mode, which moved the error code suppression from the common "queue exception" path to the "inject exception" path, but missed VMX's "synthesize VM-Exit" path. Fixes: b97f07458373 ("KVM: x86: determine if an exception has an error code only when injecting it.") Cc: stable@vger.kernel.org Cc: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20230322143300.2209476-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 6c41468c7c12d74843bb414fc00307ea8a6318c3 Author: Sean Christopherson Date: Wed Mar 22 07:32:59 2023 -0700 KVM: x86: Clear "has_error_code", not "error_code", for RM exception injection When injecting an exception into a vCPU in Real Mode, suppress the error code by clearing the flag that tracks whether the error code is valid, not by clearing the error code itself. The "typo" was introduced by recent fix for SVM's funky Paged Real Mode. Opportunistically hoist the logic above the tracepoint so that the trace is coherent with respect to what is actually injected (this was also the behavior prior to the buggy commit). Fixes: b97f07458373 ("KVM: x86: determine if an exception has an error code only when injecting it.") Cc: stable@vger.kernel.org Cc: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20230322143300.2209476-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 33acea2049b5058b93d1dabb536b494f543f02a2 Author: Marc Gonzalez Date: Mon Mar 27 14:09:31 2023 +0200 arm64: dts: meson-g12-common: resolve conflict between canvas & pmu According to S905X2 Datasheet - Revision 07: DMC_MON area spans 0xff638080-0xff6380c0 DDR_PLL area spans 0xff638c00-0xff638c34 Round DDR_PLL area size up to 0x40 Fixes: 90cf8e21016fa3 ("arm64: dts: meson: Add DDR PMU node") Signed-off-by: Marc Gonzalez Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230327120932.2158389-3-mgonzalez@freebox.fr Signed-off-by: Neil Armstrong commit 0dc902267cb32ade1c29eed8208e566ad743518a Author: Sean Christopherson Date: Wed Mar 22 07:12:20 2023 -0700 KVM: x86: Suppress pending MMIO write exits if emulator detects exception Clear vcpu->mmio_needed when injecting an exception from the emulator to squash a (legitimate) warning about vcpu->mmio_needed being true at the start of KVM_RUN without a callback being registered to complete the userspace MMIO exit. Suppressing the MMIO write exit is inarguably wrong from an architectural perspective, but it is the least awful hack-a-fix due to shortcomings in KVM's uAPI, not to mention that KVM already suppresses MMIO writes in this scenario. Outside of REP string instructions, KVM doesn't provide a way to resume an instruction at the exact point where it was "interrupted" if said instruction partially completed before encountering an MMIO access. For MMIO reads, KVM immediately exits to userspace upon detecting MMIO as userspace provides the to-be-read value in a buffer, and so KVM can safely (more or less) restart the instruction from the beginning. When the emulator re-encounters the MMIO read, KVM will service the MMIO by getting the value from the buffer instead of exiting to userspace, i.e. KVM won't put the vCPU into an infinite loop. On an emulated MMIO write, KVM finishes the instruction before exiting to userspace, as exiting immediately would ultimately hang the vCPU due to the aforementioned shortcoming of KVM not being able to resume emulation in the middle of an instruction. For the vast majority of _emulated_ instructions, deferring the userspace exit doesn't cause problems as very few x86 instructions (again ignoring string operations) generate multiple writes. But for instructions that generate multiple writes, e.g. PUSHA (multiple pushes onto the stack), deferring the exit effectively results in only the final write triggering an exit to userspace. KVM does support multiple MMIO "fragments", but only for page splits; if an instruction performs multiple distinct MMIO writes, the number of fragments gets reset when the next MMIO write comes along and any previous MMIO writes are dropped. Circling back to the warning, if a deferred MMIO write coincides with an exception, e.g. in this case a #SS due to PUSHA underflowing the stack after queueing a write to an MMIO page on a previous push, KVM injects the exceptions and leaves the deferred MMIO pending without registering a callback, thus triggering the splat. Sweep the problem under the proverbial rug as dropping MMIO writes is not unique to the exception scenario (see above), i.e. instructions like PUSHA are fundamentally broken with respect to MMIO, and have been since KVM's inception. Reported-by: zhangjianguo Reported-by: syzbot+760a73552f47a8cd0fd9@syzkaller.appspotmail.com Reported-by: syzbot+8accb43ddc6bd1f5713a@syzkaller.appspotmail.com Signed-off-by: Sean Christopherson Message-Id: <20230322141220.2206241-1-seanjc@google.com> Signed-off-by: Paolo Bonzini commit aec4353114a408b3a831a22ba34942d05943e462 Author: Marc Gonzalez Date: Mon Mar 27 14:09:30 2023 +0200 arm64: dts: meson-g12-common: specify full DMC range According to S905X2 Datasheet - Revision 07: DRAM Memory Controller (DMC) register area spans ff638000-ff63a000. According to DeviceTree Specification - Release v0.4-rc1: simple-bus nodes do not require reg property. Fixes: 1499218c80c99a ("arm64: dts: move common G12A & G12B modes to meson-g12-common.dtsi") Signed-off-by: Marc Gonzalez Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20230327120932.2158389-2-mgonzalez@freebox.fr Signed-off-by: Neil Armstrong commit fef8f2b90edbd7089a4278021314f11f056b0cbb Author: Dmytro Maluka Date: Wed Mar 22 21:43:44 2023 +0100 KVM: x86/ioapic: Resample the pending state of an IRQ when unmasking KVM irqfd based emulation of level-triggered interrupts doesn't work quite correctly in some cases, particularly in the case of interrupts that are handled in a Linux guest as oneshot interrupts (IRQF_ONESHOT). Such an interrupt is acked to the device in its threaded irq handler, i.e. later than it is acked to the interrupt controller (EOI at the end of hardirq), not earlier. Linux keeps such interrupt masked until its threaded handler finishes, to prevent the EOI from re-asserting an unacknowledged interrupt. However, with KVM + vfio (or whatever is listening on the resamplefd) we always notify resamplefd at the EOI, so vfio prematurely unmasks the host physical IRQ, thus a new physical interrupt is fired in the host. This extra interrupt in the host is not a problem per se. The problem is that it is unconditionally queued for injection into the guest, so the guest sees an extra bogus interrupt. [*] There are observed at least 2 user-visible issues caused by those extra erroneous interrupts for a oneshot irq in the guest: 1. System suspend aborted due to a pending wakeup interrupt from ChromeOS EC (drivers/platform/chrome/cros_ec.c). 2. Annoying "invalid report id data" errors from ELAN0000 touchpad (drivers/input/mouse/elan_i2c_core.c), flooding the guest dmesg every time the touchpad is touched. The core issue here is that by the time when the guest unmasks the IRQ, the physical IRQ line is no longer asserted (since the guest has acked the interrupt to the device in the meantime), yet we unconditionally inject the interrupt queued into the guest by the previous resampling. So to fix the issue, we need a way to detect that the IRQ is no longer pending, and cancel the queued interrupt in this case. With IOAPIC we are not able to probe the physical IRQ line state directly (at least not if the underlying physical interrupt controller is an IOAPIC too), so in this patch we use irqfd resampler for that. Namely, instead of injecting the queued interrupt, we just notify the resampler that this interrupt is done. If the IRQ line is actually already deasserted, we are done. If it is still asserted, a new interrupt will be shortly triggered through irqfd and injected into the guest. In the case if there is no irqfd resampler registered for this IRQ, we cannot fix the issue, so we keep the existing behavior: immediately unconditionally inject the queued interrupt. This patch fixes the issue for x86 IOAPIC only. In the long run, we can fix it for other irqchips and other architectures too, possibly taking advantage of reading the physical state of the IRQ line, which is possible with some other irqchips (e.g. with arm64 GIC, maybe even with the legacy x86 PIC). [*] In this description we assume that the interrupt is a physical host interrupt forwarded to the guest e.g. by vfio. Potentially the same issue may occur also with a purely virtual interrupt from an emulated device, e.g. if the guest handles this interrupt, again, as a oneshot interrupt. Signed-off-by: Dmytro Maluka Link: https://lore.kernel.org/kvm/31420943-8c5f-125c-a5ee-d2fde2700083@semihalf.com/ Link: https://lore.kernel.org/lkml/87o7wrug0w.wl-maz@kernel.org/ Message-Id: <20230322204344.50138-3-dmy@semihalf.com> Signed-off-by: Paolo Bonzini commit d583fbd7066a2dea43050521a95d9770f7d7593e Author: Dmytro Maluka Date: Wed Mar 22 21:43:43 2023 +0100 KVM: irqfd: Make resampler_list an RCU list It is useful to be able to do read-only traversal of the list of all the registered irqfd resamplers without locking the resampler_lock mutex. In particular, we are going to traverse it to search for a resampler registered for the given irq of an irqchip, and that will be done with an irqchip spinlock (ioapic->lock) held, so it is undesirable to lock a mutex in this context. So turn this list into an RCU list. For protecting the read side, reuse kvm->irq_srcu which is already used for protecting a number of irq related things (kvm->irq_routing, irqfd->resampler->list, kvm->irq_ack_notifier_list, kvm->arch.mask_notifier_list). Signed-off-by: Dmytro Maluka Message-Id: <20230322204344.50138-2-dmy@semihalf.com> Signed-off-by: Paolo Bonzini commit e5c972c1fadacc858b6a564d056f177275238040 Author: Jeremi Piotrowski Date: Fri Mar 24 15:52:33 2023 +0100 KVM: SVM: Flush Hyper-V TLB when required The Hyper-V "EnlightenedNptTlb" enlightenment is always enabled when KVM is running on top of Hyper-V and Hyper-V exposes support for it (which is always). On AMD CPUs this enlightenment results in ASID invalidations not flushing TLB entries derived from the NPT. To force the underlying (L0) hypervisor to rebuild its shadow page tables, an explicit hypercall is needed. The original KVM implementation of Hyper-V's "EnlightenedNptTlb" on SVM only added remote TLB flush hooks. This worked out fine for a while, as sufficient remote TLB flushes where being issued in KVM to mask the problem. Since v5.17, changes in the TDP code reduced the number of flushes and the out-of-sync TLB prevents guests from booting successfully. Split svm_flush_tlb_current() into separate callbacks for the 3 cases (guest/all/current), and issue the required Hyper-V hypercall when a Hyper-V TLB flush is needed. The most important case where the TLB flush was missing is when loading a new PGD, which is followed by what is now svm_flush_tlb_current(). Cc: stable@vger.kernel.org # v5.17+ Fixes: 1e0c7d40758b ("KVM: SVM: hyper-v: Remote TLB flush for SVM") Link: https://lore.kernel.org/lkml/43980946-7bbf-dcef-7e40-af904c456250@linux.microsoft.com/ Suggested-by: Sean Christopherson Signed-off-by: Jeremi Piotrowski Reviewed-by: Vitaly Kuznetsov Message-Id: <20230324145233.4585-1-jpiotrowski@linux.microsoft.com> Signed-off-by: Paolo Bonzini commit 9e347ba03029e10e6405f8c3a7a91a5597943ed9 Merge: 8607daa2145f2 6eff38048944c Author: Paolo Bonzini Date: Mon Mar 27 10:04:07 2023 -0400 Merge tag 'kvm-riscv-fixes-6.3-1' of https://github.com/kvm-riscv/linux into HEAD KVM/riscv fixes for 6.3, take #1 - Fix VM hang in case of timer delta being zero commit 8607daa2145f277c2548eee22e9fa45dfecd8dea Merge: f3e707413dbe3 8c2e8ac8ad4be Author: Paolo Bonzini Date: Mon Mar 27 10:03:16 2023 -0400 Merge tag 'kvmarm-fixes-6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.3, part #2 Fixes for a rather interesting set of bugs relating to the MMU: - Read the MMU notifier seq before dropping the mmap lock to guard against reading a potentially stale VMA - Disable interrupts when walking user page tables to protect against the page table being freed - Read the MTE permissions for the VMA within the mmap lock critical section, avoiding the use of a potentally stale VMA pointer Additionally, some fixes targeting the vPMU: - Return the sum of the current perf event value and PMC snapshot for reads from userspace - Don't save the value of guest writes to PMCR_EL0.{C,P}, which could otherwise lead to userspace erroneously resetting the vPMU during VM save/restore commit 441d901fbf669f6360566a4437b1e563b854de4a Author: Thomas Weißschuh Date: Mon Mar 27 13:05:02 2023 +0000 platform/x86: gigabyte-wmi: add support for B650 AORUS ELITE AX This has been reported as working. Suggested-by: got3nks Link: https://github.com/t-8ch/linux-gigabyte-wmi-driver/issues/15#issuecomment-1483942966 Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20230327-gigabyte-wmi-b650-elite-ax-v1-1-d4d645c21d0b@weissschuh.net Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 2b4c99f7d9a57ecd644eda9b1fb0a1072414959f Author: Ivan Orlov Date: Tue Mar 14 16:04:45 2023 +0400 can: bcm: bcm_tx_setup(): fix KMSAN uninit-value in vfs_write Syzkaller reported the following issue: ===================================================== BUG: KMSAN: uninit-value in aio_rw_done fs/aio.c:1520 [inline] BUG: KMSAN: uninit-value in aio_write+0x899/0x950 fs/aio.c:1600 aio_rw_done fs/aio.c:1520 [inline] aio_write+0x899/0x950 fs/aio.c:1600 io_submit_one+0x1d1c/0x3bf0 fs/aio.c:2019 __do_sys_io_submit fs/aio.c:2078 [inline] __se_sys_io_submit+0x293/0x770 fs/aio.c:2048 __x64_sys_io_submit+0x92/0xd0 fs/aio.c:2048 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 Uninit was created at: slab_post_alloc_hook mm/slab.h:766 [inline] slab_alloc_node mm/slub.c:3452 [inline] __kmem_cache_alloc_node+0x71f/0xce0 mm/slub.c:3491 __do_kmalloc_node mm/slab_common.c:967 [inline] __kmalloc+0x11d/0x3b0 mm/slab_common.c:981 kmalloc_array include/linux/slab.h:636 [inline] bcm_tx_setup+0x80e/0x29d0 net/can/bcm.c:930 bcm_sendmsg+0x3a2/0xce0 net/can/bcm.c:1351 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg net/socket.c:734 [inline] sock_write_iter+0x495/0x5e0 net/socket.c:1108 call_write_iter include/linux/fs.h:2189 [inline] aio_write+0x63a/0x950 fs/aio.c:1600 io_submit_one+0x1d1c/0x3bf0 fs/aio.c:2019 __do_sys_io_submit fs/aio.c:2078 [inline] __se_sys_io_submit+0x293/0x770 fs/aio.c:2048 __x64_sys_io_submit+0x92/0xd0 fs/aio.c:2048 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 CPU: 1 PID: 5034 Comm: syz-executor350 Not tainted 6.2.0-rc6-syzkaller-80422-geda666ff2276 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 ===================================================== We can follow the call chain and find that 'bcm_tx_setup' function calls 'memcpy_from_msg' to copy some content to the newly allocated frame of 'op->frames'. After that the 'len' field of copied structure being compared with some constant value (64 or 8). However, if 'memcpy_from_msg' returns an error, we will compare some uninitialized memory. This triggers 'uninit-value' issue. This patch will add 'memcpy_from_msg' possible errors processing to avoid uninit-value issue. Tested via syzkaller Reported-by: syzbot+c9bfd85eca611ebf5db1@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=47f897f8ad958bbde5790ebf389b5e7e0a345089 Signed-off-by: Ivan Orlov Fixes: 6f3b911d5f29b ("can: bcm: add support for CAN FD frames") Acked-by: Oliver Hartkopp Link: https://lore.kernel.org/all/20230314120445.12407-1-ivan.orlov0322@gmail.com Signed-off-by: Marc Kleine-Budde commit fb5755100a0a5aa5957bdb204fd1e249684557fc Author: Rajvi Jingar Date: Mon Mar 20 14:20:29 2023 -0700 platform/x86/intel/pmc: Alder Lake PCH slp_s0_residency fix For platforms with Alder Lake PCH (Alder Lake S and Raptor Lake S) the slp_s0_residency attribute has been reporting the wrong value. Unlike other platforms, ADL PCH does not have a counter for the time that the SLP_S0 signal was asserted. Instead, firmware uses the aggregate of the Low Power Mode (LPM) substate counters as the S0ix value. Since the LPM counters run at a different frequency, this lead to misreporting of the S0ix time. Add a check for Alder Lake PCH and adjust the frequency accordingly when display slp_s0_residency. Fixes: bbab31101f44 ("platform/x86/intel: pmc/core: Add Alderlake support to pmc core driver") Signed-off-by: Rajvi Jingar Signed-off-by: David E. Box Reviewed-by: Rajneesh Bhardwaj Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230320212029.3154407-1-david.e.box@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 5c95b2d5d44fa250ce8aeee27bdb39b381d03857 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 (cherry picked from commit 2810ac6c753d17ee2572ffb57fe2382a786a080a) Signed-off-by: Jani Nikula commit 3413881e1ecc3cba722a2e87ec099692eed5be28 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 (cherry picked from commit 779cb5ba64ec7df80675a956c9022929514f517a) Signed-off-by: Jani Nikula commit d032ca43f2c80049ce5aabd3f208dc3849359497 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 (cherry picked from commit e2ee10474ce766686e7a7496585cdfaf79e3a1bf) Signed-off-by: Jani Nikula commit 38c583019484f190d5b33f59b8ae810e6b1763c6 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 (cherry picked from commit f2c7959dda614d9b7c6a41510492de39d31705ec) Signed-off-by: Jani Nikula commit a2b6e99d8a623544f3bdccd28ee35b9c1b00daa5 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 (cherry picked from commit 41b4c7fe72b6105a4b49395eea9aa40cef94288d) Signed-off-by: Jani Nikula commit 4d4e766f8b7dbdefa7a78e91eb9c7a29d0d818b8 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 (cherry picked from commit 92736f1b452bbb8a66bdb5b1d263ad00e04dd3b8) Signed-off-by: Jani Nikula commit c880f855d1e240a956dcfce884269bad92fc849c 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 (cherry picked from commit 3962ca4e080a525fc9eae87aa6b2286f1fae351d) Signed-off-by: Jani Nikula commit a8e03e00b62073b494886dbff32f8b5338066c8b 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 (cherry picked from commit 80a892a4c2428b65366721599fc5fe50eaed35fd) Signed-off-by: Jani Nikula commit 76b767d4d1cd052e455cf18e06929e8b2b70101d 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 (cherry picked from commit f161eb01f50ab31f2084975b43bce54b7b671e17) Signed-off-by: Jani Nikula commit 12d4eb20d9d86fae5f84117ff047e966e470f7b9 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 (cherry picked from commit 44df42e66139b5fac8db49ee354be279210f9816) Signed-off-by: Jani Nikula commit a7602e7332b97cfbec7bacb0f1ade99a575fe104 Author: Vladimir Oltean Date: Sat Mar 25 13:28:15 2023 +0200 net: stmmac: don't reject VLANs when IFF_PROMISC is set The blamed commit has introduced the following tests to dwmac4_add_hw_vlan_rx_fltr(), called from stmmac_vlan_rx_add_vid(): if (hw->promisc) { netdev_err(dev, "Adding VLAN in promisc mode not supported\n"); return -EPERM; } "VLAN promiscuous" mode is keyed in this driver to IFF_PROMISC, and so, vlan_vid_add() and vlan_vid_del() calls cannot take place in IFF_PROMISC mode. I have the following 2 arguments that this restriction is.... hm, how shall I put it nicely... unproductive :) First, take the case of a Linux bridge. If the kernel is compiled with CONFIG_BRIDGE_VLAN_FILTERING=y, then this bridge shall have a VLAN database. The bridge shall try to call vlan_add_vid() on its bridge ports for each VLAN in the VLAN table. It will do this irrespectively of whether that port is *currently* VLAN-aware or not. So it will do this even when the bridge was created with vlan_filtering 0. But the Linux bridge, in VLAN-unaware mode, configures its ports in promiscuous (IFF_PROMISC) mode, so that they accept packets with any MAC DA (a switch must do this in order to forward those packets which are not directly targeted to its MAC address). As a result, the stmmac driver does not work as a bridge port, when the kernel is compiled with CONFIG_BRIDGE_VLAN_FILTERING=y. $ ip link add br0 type bridge && ip link set br0 up $ ip link set eth0 master br0 && ip link set eth0 up [ 2333.943296] br0: port 1(eth0) entered blocking state [ 2333.943381] br0: port 1(eth0) entered disabled state [ 2333.943782] device eth0 entered promiscuous mode [ 2333.944080] 4033c000.ethernet eth0: Adding VLAN in promisc mode not supported [ 2333.976509] 4033c000.ethernet eth0: failed to initialize vlan filtering on this port RTNETLINK answers: Operation not permitted Secondly, take the case of stmmac as DSA master. Some switch tagging protocols are based on 802.1Q VLANs (tag_sja1105.c), and as such, tag_8021q.c uses vlan_vid_add() to work with VLAN-filtering DSA masters. But also, when a DSA port becomes promiscuous (for example when it joins a bridge), the DSA framework also makes the DSA master promiscuous. Moreover, for every VLAN that a DSA switch sends to the CPU, DSA also programs a VLAN filter on the DSA master, because if the the DSA switch uses a tail tag, then the hardware frame parser of the DSA master will see VLAN as VLAN, and might filter them out, for being unknown. Due to the above 2 reasons, my belief is that the stmmac driver does not get to choose to not accept vlan_vid_add() calls while IFF_PROMISC is enabled, because the 2 are completely independent and there are code paths in the network stack which directly lead to this situation occurring, without the user's direct input. In fact, my belief is that "VLAN promiscuous" mode should have never been keyed on IFF_PROMISC in the first place, but rather, on the NETIF_F_HW_VLAN_CTAG_FILTER feature flag which can be toggled by the user through ethtool -k, when present in netdev->hw_features. In the stmmac driver, NETIF_F_HW_VLAN_CTAG_FILTER is only present in "features", making this feature "on [fixed]". I have this belief because I am unaware of any definition of promiscuity which implies having an effect on anything other than MAC DA (therefore not VLAN). However, I seem to be rather alone in having this opinion, looking back at the disagreements from this discussion: https://lore.kernel.org/netdev/20201110153958.ci5ekor3o2ekg3ky@ipetronik.com/ In any case, to remove the vlan_vid_add() dependency on !IFF_PROMISC, one would need to remove the check and see what fails. I guess the test was there because of the way in which dwmac4_vlan_promisc_enable() is implemented. For context, the dwmac4 supports Perfect Filtering for a limited number of VLANs - dwmac4_get_num_vlan(), priv->hw->num_vlan, with a fallback on Hash Filtering - priv->dma_cap.vlhash - see stmmac_vlan_update(), also visible in cat /sys/kernel/debug/stmmaceth/eth0/dma_cap | grep 'VLAN Hash Filtering'. The perfect filtering is based on MAC_VLAN_Tag_Filter/MAC_VLAN_Tag_Data registers, accessed in the driver through dwmac4_write_vlan_filter(). The hash filtering is based on the MAC_VLAN_Hash_Table register, named GMAC_VLAN_HASH_TABLE in the driver and accessed by dwmac4_update_vlan_hash(). The control bit for enabling hash filtering is GMAC_VLAN_VTHM (MAC_VLAN_Tag_Ctrl bit VTHM: VLAN Tag Hash Table Match Enable). Now, the description of dwmac4_vlan_promisc_enable() is that it iterates through the driver's cache of perfect filter entries (hw->vlan_filter[i], added by dwmac4_add_hw_vlan_rx_fltr()), and evicts them from hardware by unsetting their GMAC_VLAN_TAG_DATA_VEN (MAC_VLAN_Tag_Data bit VEN - VLAN Tag Enable) bit. Then it unsets the GMAC_VLAN_VTHM bit, which disables hash matching. This leaves the MAC, according to table "VLAN Match Status" from the documentation, to always enter these data paths: VID |VLAN Perfect Filter |VTHM Bit |VLAN Hash Filter |Final VLAN Match |Match Result | |Match Result |Status -------|--------------------|---------|-----------------|---------------- VID!=0 |Fail |0 |don't care |Pass So, dwmac4_vlan_promisc_enable() does its job, but by unsetting GMAC_VLAN_VTHM, it conflicts with the other code path which controls this bit: dwmac4_update_vlan_hash(), called through stmmac_update_vlan_hash() from stmmac_vlan_rx_add_vid() and from stmmac_vlan_rx_kill_vid(). This is, I guess, why dwmac4_add_hw_vlan_rx_fltr() is not allowed to run after dwmac4_vlan_promisc_enable() has unset GMAC_VLAN_VTHM: because if it did, then dwmac4_update_vlan_hash() would set GMAC_VLAN_VTHM again, breaking the "VLAN promiscuity". It turns out that dwmac4_vlan_promisc_enable() is way too complicated for what needs to be done. The MAC_Packet_Filter register also has the VTFE bit (VLAN Tag Filter Enable), which simply controls whether VLAN tagged packets which don't match the filtering tables (either perfect or hash) are dropped or not. At the moment, this driver unconditionally sets GMAC_PACKET_FILTER_VTFE if NETIF_F_HW_VLAN_CTAG_FILTER was detected through the priv->dma_cap.vlhash capability bits of the device, in stmmac_dvr_probe(). I would suggest deleting the unnecessarily complex logic from dwmac4_vlan_promisc_enable(), and simply unsetting GMAC_PACKET_FILTER_VTFE when becoming IFF_PROMISC, which has the same effect of allowing packets with any VLAN tags, but has the additional benefit of being able to run concurrently with stmmac_vlan_rx_add_vid() and stmmac_vlan_rx_kill_vid(). As much as I believe that the VTFE bit should have been exclusively controlled by NETIF_F_HW_VLAN_CTAG_FILTER through ethtool, and not by IFF_PROMISC, changing that is not a punctual fix to the problem, and it would probably break the VFFQ feature added by the later commit e0f9956a3862 ("net: stmmac: Add option for VLAN filter fail queue enable"). From the commit description, VFFQ needs IFF_PROMISC=on and VTFE=off in order to work (and this change respects that). But if VTFE was changed to be controlled through ethtool -k, then a user-visible change would have been introduced in Intel's scripts (a need to run "ethtool -k eth0 rx-vlan-filter off" which did not exist before). The patch was tested with this set of commands: ip link set eth0 up ip link add link eth0 name eth0.100 type vlan id 100 ip addr add 192.168.100.2/24 dev eth0.100 && ip link set eth0.100 up ip link set eth0 promisc on ip link add link eth0 name eth0.101 type vlan id 101 ip addr add 192.168.101.2/24 dev eth0.101 && ip link set eth0.101 up ip link set eth0 promisc off ping -c 5 192.168.100.1 ping -c 5 192.168.101.1 ip link set eth0 promisc on ping -c 5 192.168.100.1 ping -c 5 192.168.101.1 ip link del eth0.100 ip link del eth0.101 # Wait for VLAN-tagged pings from the other end... # Check with "tcpdump -i eth0 -e -n -p" and we should see them ip link set eth0 promisc off # Wait for VLAN-tagged pings from the other end... # Check with "tcpdump -i eth0 -e -n -p" and we shouldn't see them # anymore, but remove the "-p" argument from tcpdump and they're there. Fixes: c89f44ff10fd ("net: stmmac: Add support for VLAN promiscuous mode") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit d1366b283d94ac4537a4b3a1e8668da4df7ce7e9 Author: Oleksij Rempel Date: Fri Mar 24 14:01:41 2023 +0100 can: j1939: prevent deadlock by moving j1939_sk_errqueue() This commit addresses a deadlock situation that can occur in certain scenarios, such as when running data TP/ETP transfer and subscribing to the error queue while receiving a net down event. The deadlock involves locks in the following order: 3 j1939_session_list_lock -> active_session_list_lock j1939_session_activate ... j1939_sk_queue_activate_next -> sk_session_queue_lock ... j1939_xtp_rx_eoma_one 2 j1939_sk_queue_drop_all -> sk_session_queue_lock ... j1939_sk_netdev_event_netdown -> j1939_socks_lock j1939_netdev_notify 1 j1939_sk_errqueue -> j1939_socks_lock __j1939_session_cancel -> active_session_list_lock j1939_tp_rxtimer CPU0 CPU1 ---- ---- lock(&priv->active_session_list_lock); lock(&jsk->sk_session_queue_lock); lock(&priv->active_session_list_lock); lock(&priv->j1939_socks_lock); The solution implemented in this commit is to move the j1939_sk_errqueue() call out of the active_session_list_lock context, thus preventing the deadlock situation. Reported-by: syzbot+ee1cd780f69483a8616b@syzkaller.appspotmail.com Fixes: 5b9272e93f2e ("can: j1939: extend UAPI to notify about RX status") Co-developed-by: Hillf Danton Signed-off-by: Hillf Danton Signed-off-by: Oleksij Rempel Link: https://lore.kernel.org/all/20230324130141.2132787-1-o.rempel@pengutronix.de Cc: stable@vger.kernel.org Signed-off-by: Marc Kleine-Budde commit 45977e58ce65ed0459edc9a0466d9dfea09463f5 Author: Álvaro Fernández Rojas Date: Thu Mar 23 20:48:41 2023 +0100 net: dsa: b53: mmap: add phy ops Implement phy_read16() and phy_write16() ops for B53 MMAP to avoid accessing B53_PORT_MII_PAGE registers which hangs the device. This access should be done through the MDIO Mux bus controller. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit f2e9d083f768ec147da3e3e5209030d3c090c689 Author: Oleksij Rempel Date: Fri Mar 24 14:39:08 2023 +0100 net: phy: micrel: correct KSZ9131RNX EEE capabilities and advertisement The KSZ9131RNX incorrectly shows EEE capabilities in its registers. Although the "EEE control and capability 1" (Register 3.20) is set to 0, indicating no EEE support, the "EEE advertisement 1" (Register 7.60) is set to 0x6, advertising EEE support for 1000BaseT/Full and 100BaseT/Full. This inconsistency causes PHYlib to assume there is no EEE support, preventing control over EEE advertisement, which is enabled by default. This patch resolves the issue by utilizing the ksz9477_get_features() function to correctly set the EEE capabilities for the KSZ9131RNX. This adjustment allows proper control over EEE advertisement and ensures accurate representation of the device's capabilities. Fixes: 8b68710a3121 ("net: phy: start using genphy_c45_ethtool_get/set_eee()") Reported-by: Marek Vasut Tested-by: Marek Vasut Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit b465518dc27da1ed74b8cbada4659708aac35adb Author: Stefano Garzarella Date: Fri Mar 24 12:54:50 2023 +0100 vsock/loopback: use only sk_buff_head.lock to protect the packet queue pkt_list_lock was used before commit 71dc9ec9ac7d ("virtio/vsock: replace virtio_vsock_pkt with sk_buff") to protect the packet queue. After that commit we switched to sk_buff and we are using sk_buff_head.lock in almost every place to protect the packet queue except in vsock_loopback_work() when we call skb_queue_splice_init(). As reported by syzbot, this caused unlocked concurrent access to the packet queue between vsock_loopback_work() and vsock_loopback_cancel_pkt() since it is not holding pkt_list_lock. With the introduction of sk_buff_head, pkt_list_lock is redundant and can cause confusion, so let's remove it and use sk_buff_head.lock everywhere to protect the packet queue access. Fixes: 71dc9ec9ac7d ("virtio/vsock: replace virtio_vsock_pkt with sk_buff") Cc: bobby.eshleman@bytedance.com Reported-and-tested-by: syzbot+befff0a9536049e7902e@syzkaller.appspotmail.com Signed-off-by: Stefano Garzarella Reviewed-by: Bobby Eshleman Reviewed-by: Arseniy Krasnov Signed-off-by: David S. Miller commit 622035847f5e8661be7c0b9d6222391ccd8022bc Merge: e3cbdcb0fbb61 4a0faa02d419a Author: David S. Miller Date: Mon Mar 27 08:12:01 2023 +0100 Merge branch 'constify-sfp-phy-nodes' Russell King says: ==================== Constify a few sfp/phy fwnodes This series constifies a bunch of fwnode_handle pointers that are only used to refer to but not modify the contents of the fwnode structures. ==================== Signed-off-by: David S. Miller commit 4a0faa02d419a6728abef0f1d8a32d8c35ef95e6 Author: Russell King (Oracle) Date: Fri Mar 24 09:23:53 2023 +0000 net: phy: constify fwnode_get_phy_node() fwnode argument fwnode_get_phy_node() does not motify the fwnode structure, so make the argument const, Signed-off-by: Russell King (Oracle) Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 850a8d2dc712abeea9a39b6cb53db6b78069ace0 Author: Russell King (Oracle) Date: Fri Mar 24 09:23:48 2023 +0000 net: sfp: constify sfp-bus internal fwnode uses Constify sfp-bus internal fwnode uses, since we do not modify the fwnode structures. Signed-off-by: Russell King (Oracle) Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit a90ac762d345890b40d88a1385a34a2449c2d75e Author: Russell King (Oracle) Date: Fri Mar 24 09:23:42 2023 +0000 net: sfp: make sfp_bus_find_fwnode() take a const fwnode sfp_bus_find_fwnode() does not write to the fwnode, so let's make it const. Signed-off-by: Russell King (Oracle) Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit e3cbdcb0fbb61045ef3ce0e072927cc41737f787 Author: Faicker Mo Date: Fri Mar 24 17:19:54 2023 +0800 net/net_failover: fix txq exceeding warning The failover txq is inited as 16 queues. when a packet is transmitted from the failover device firstly, the failover device will select the queue which is returned from the primary device if the primary device is UP and running. If the primary device txq is bigger than the default 16, it can lead to the following warning: eth0 selects TX queue 18, but real number of TX queues is 16 The warning backtrace is: [ 32.146376] CPU: 18 PID: 9134 Comm: chronyd Tainted: G E 6.2.8-1.el7.centos.x86_64 #1 [ 32.147175] Hardware name: Red Hat KVM, BIOS 1.10.2-3.el7_4.1 04/01/2014 [ 32.147730] Call Trace: [ 32.147971] [ 32.148183] dump_stack_lvl+0x48/0x70 [ 32.148514] dump_stack+0x10/0x20 [ 32.148820] netdev_core_pick_tx+0xb1/0xe0 [ 32.149180] __dev_queue_xmit+0x529/0xcf0 [ 32.149533] ? __check_object_size.part.0+0x21c/0x2c0 [ 32.149967] ip_finish_output2+0x278/0x560 [ 32.150327] __ip_finish_output+0x1fe/0x2f0 [ 32.150690] ip_finish_output+0x2a/0xd0 [ 32.151032] ip_output+0x7a/0x110 [ 32.151337] ? __pfx_ip_finish_output+0x10/0x10 [ 32.151733] ip_local_out+0x5e/0x70 [ 32.152054] ip_send_skb+0x19/0x50 [ 32.152366] udp_send_skb.isra.0+0x163/0x3a0 [ 32.152736] udp_sendmsg+0xba8/0xec0 [ 32.153060] ? __folio_memcg_unlock+0x25/0x60 [ 32.153445] ? __pfx_ip_generic_getfrag+0x10/0x10 [ 32.153854] ? sock_has_perm+0x85/0xa0 [ 32.154190] inet_sendmsg+0x6d/0x80 [ 32.154508] ? inet_sendmsg+0x6d/0x80 [ 32.154838] sock_sendmsg+0x62/0x70 [ 32.155152] ____sys_sendmsg+0x134/0x290 [ 32.155499] ___sys_sendmsg+0x81/0xc0 [ 32.155828] ? _get_random_bytes.part.0+0x79/0x1a0 [ 32.156240] ? ip4_datagram_release_cb+0x5f/0x1e0 [ 32.156649] ? get_random_u16+0x69/0xf0 [ 32.156989] ? __fget_light+0xcf/0x110 [ 32.157326] __sys_sendmmsg+0xc4/0x210 [ 32.157657] ? __sys_connect+0xb7/0xe0 [ 32.157995] ? __audit_syscall_entry+0xce/0x140 [ 32.158388] ? syscall_trace_enter.isra.0+0x12c/0x1a0 [ 32.158820] __x64_sys_sendmmsg+0x24/0x30 [ 32.159171] do_syscall_64+0x38/0x90 [ 32.159493] entry_SYSCALL_64_after_hwframe+0x72/0xdc Fix that by reducing txq number as the non-existent primary-dev does. Fixes: cfc80d9a1163 ("net: Introduce net_failover driver") Signed-off-by: Faicker Mo Signed-off-by: David S. Miller commit c355d913d21736c8a00a41cfacc19d2839063d89 Author: Alexander Stein Date: Mon Mar 27 10:06:00 2023 +0800 arm64: dts: imx8mp: fix address length for LCDIF2 0x238 is the offset for PANIC0_THRES, so the length needs to be greater than that. Use the size from memory map from reference manual. Fixes: 94e6197dadc9 ("arm64: dts: imx8mp: Add LCDIF2 & LDB nodes") Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 02bcba0b9f9da706d5bd1e8cbeb83493863e17b5 Author: Christophe JAILLET Date: Sun Mar 26 10:29:33 2023 +0200 regulator: Handle deferred clk devm_clk_get() can return -EPROBE_DEFER. So it is better to return the error code from devm_clk_get(), instead of a hard coded -ENOENT. This gives more opportunities to successfully probe the driver. Fixes: 8959e5324485 ("regulator: fixed: add possibility to enable by clock") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/18459fae3d017a66313699c7c8456b28158b2dd0.1679819354.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit 707823e7f22f3864ddc7d85e8e9b614afe4f1b16 Author: Ivan Orlov Date: Sat Mar 11 16:50:25 2023 +0400 9P FS: Fix wild-memory-access write in v9fs_get_acl KASAN reported the following issue: [ 36.825817][ T5923] BUG: KASAN: wild-memory-access in v9fs_get_acl+0x1a4/0x390 [ 36.827479][ T5923] Write of size 4 at addr 9fffeb37f97f1c00 by task syz-executor798/5923 [ 36.829303][ T5923] [ 36.829846][ T5923] CPU: 0 PID: 5923 Comm: syz-executor798 Not tainted 6.2.0-syzkaller-18302-g596b6b709632 #0 [ 36.832110][ T5923] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023 [ 36.834464][ T5923] Call trace: [ 36.835196][ T5923] dump_backtrace+0x1c8/0x1f4 [ 36.836229][ T5923] show_stack+0x2c/0x3c [ 36.837100][ T5923] dump_stack_lvl+0xd0/0x124 [ 36.838103][ T5923] print_report+0xe4/0x4c0 [ 36.839068][ T5923] kasan_report+0xd4/0x130 [ 36.840052][ T5923] kasan_check_range+0x264/0x2a4 [ 36.841199][ T5923] __kasan_check_write+0x2c/0x3c [ 36.842216][ T5923] v9fs_get_acl+0x1a4/0x390 [ 36.843232][ T5923] v9fs_mount+0x77c/0xa5c [ 36.844163][ T5923] legacy_get_tree+0xd4/0x16c [ 36.845173][ T5923] vfs_get_tree+0x90/0x274 [ 36.846137][ T5923] do_new_mount+0x25c/0x8c8 [ 36.847066][ T5923] path_mount+0x590/0xe58 [ 36.848147][ T5923] __arm64_sys_mount+0x45c/0x594 [ 36.849273][ T5923] invoke_syscall+0x98/0x2c0 [ 36.850421][ T5923] el0_svc_common+0x138/0x258 [ 36.851397][ T5923] do_el0_svc+0x64/0x198 [ 36.852398][ T5923] el0_svc+0x58/0x168 [ 36.853224][ T5923] el0t_64_sync_handler+0x84/0xf0 [ 36.854293][ T5923] el0t_64_sync+0x190/0x194 Calling '__v9fs_get_acl' method in 'v9fs_get_acl' creates the following chain of function calls: __v9fs_get_acl v9fs_fid_get_acl v9fs_fid_xattr_get p9_client_xattrwalk Function p9_client_xattrwalk accepts a pointer to u64-typed variable attr_size and puts some u64 value into it. However, after the executing the p9_client_xattrwalk, in some circumstances we assign the value of u64-typed variable 'attr_size' to the variable 'retval', which we will return. However, the type of 'retval' is ssize_t, and if the value of attr_size is larger than SSIZE_MAX, we will face the signed type overflow. If the overflow occurs, the result of v9fs_fid_xattr_get may be negative, but not classified as an error. When we try to allocate an acl with 'broken' size we receive an error, but don't process it. When we try to free this acl, we face the 'wild-memory-access' error (because it wasn't allocated). This patch will add new condition to the 'v9fs_fid_xattr_get' function, so it will return an EOVERFLOW error if the 'attr_size' is larger than SSIZE_MAX. In this version of the patch I simplified the condition. In previous (v2) version of the patch I removed explicit type conversion and added separate condition to check the possible overflow and return an error (in v1 version I've just modified the existing condition). Tested via syzkaller. Suggested-by: Christian Schoenebeck Reported-by: syzbot+cb1d16facb3cc90de5fb@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=fbbef66d9e4d096242f3617de5d14d12705b4659 Signed-off-by: Ivan Orlov Reviewed-by: Christian Schoenebeck Signed-off-by: Eric Van Hensbergen commit 8056dc043d7f74d7675d413cb3dc4fa290609922 Author: Krzysztof Kozlowski Date: Sun Mar 26 18:47:51 2023 +0200 riscv: dts: canaan: drop invalid spi-max-frequency The spi-max-frequency is a property of SPI children, not the controller: k210_generic.dtb: spi@50240000: Unevaluated properties are not allowed ('spi-max-frequency' was unexpected) Signed-off-by: Krzysztof Kozlowski Signed-off-by: Conor Dooley commit 197b6b60ae7bc51dd0814953c562833143b292aa Author: Linus Torvalds Date: Sun Mar 26 14:40:20 2023 -0700 Linux 6.3-rc4 commit 0ec57cfa721fbd36b4c4c0d9ccc5d78a78f7fa35 Merge: 18940c888c85f 5021383242ada Author: Linus Torvalds Date: Sun Mar 26 10:22:44 2023 -0700 Merge tag 'usb-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB / Thunderbolt driver fixes from Greg KH: "Here are a small set of USB and Thunderbolt driver fixes for reported problems and a documentation update, for 6.3-rc4. Included in here are: - documentation update for uvc gadget driver - small thunderbolt driver fixes - cdns3 driver fixes - dwc3 driver fixes - dwc2 driver fixes - chipidea driver fixes - typec driver fixes - onboard_usb_hub device id updates - quirk updates All of these have been in linux-next with no reported problems" * tag 'usb-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (30 commits) usb: dwc2: fix a race, don't power off/on phy for dual-role mode usb: dwc2: fix a devres leak in hw_enable upon suspend resume usb: chipidea: core: fix possible concurrent when switch role usb: chipdea: core: fix return -EINVAL if request role is the same with current role thunderbolt: Rename shadowed variables bit to interrupt_bit and auto_clear_bit thunderbolt: Disable interrupt auto clear for rings thunderbolt: Use const qualifier for `ring_interrupt_index` usb: gadget: Use correct endianness of the wLength field for WebUSB uas: Add US_FL_NO_REPORT_OPCODES for JMicron JMS583Gen 2 usb: cdnsp: changes PCI Device ID to fix conflict with CNDS3 driver usb: cdns3: Fix issue with using incorrect PCI device function usb: cdnsp: Fixes issue with redundant Status Stage MAINTAINERS: make me a reviewer of USB/IP thunderbolt: Use scale field when allocating USB3 bandwidth thunderbolt: Limit USB3 bandwidth of certain Intel USB4 host routers thunderbolt: Call tb_check_quirks() after initializing adapters thunderbolt: Add missing UNSET_INBOUND_SBTX for retimer access thunderbolt: Fix memory leak in margining usb: dwc2: drd: fix inconsistent mode if role-switch-default-mode="host" docs: usb: Add documentation for the UVC Gadget ... commit 18940c888c85fd7527375343bd4fcc94a540c69c Merge: 974fc94336df8 a53ce18cacb47 Author: Linus Torvalds Date: Sun Mar 26 09:18:30 2023 -0700 Merge tag 'sched_urgent_for_v6.3_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Borislav Petkov: - Fix a corner case where vruntime of a task is not being sanitized * tag 'sched_urgent_for_v6.3_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Sanitize vruntime of entity being migrated commit 974fc94336df81137b3b3502e73f89282a743607 Merge: f6cdaeb08b66d 263f5ecaf7080 Author: Linus Torvalds Date: Sun Mar 26 09:13:35 2023 -0700 Merge tag 'perf_urgent_for_v6.3_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fix from Borislav Petkov: - Properly clear perf event status tracking in the AMD perf event overflow handler * tag 'perf_urgent_for_v6.3_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/amd/core: Always clear status for idx commit f6cdaeb08b66db0d06b1b70c0801a00b6f30571c Merge: 986c63741da24 b416514054810 Author: Linus Torvalds Date: Sun Mar 26 09:06:20 2023 -0700 Merge tag 'core_urgent_for_v6.3_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull core fixes from Borislav Petkov: - Do the delayed RCU wakeup for kthreads in the proper order so that former doesn't get ignored - A noinstr warning fix * tag 'core_urgent_for_v6.3_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: entry/rcu: Check TIF_RESCHED _after_ delayed RCU wake-up entry: Fix noinstr warning in __enter_from_user_mode() commit 986c63741da243c68e1faa97064a1bb216e8d7c0 Merge: 6485ac65af2b2 62faca1ca10cc Author: Linus Torvalds Date: Sun Mar 26 09:01:24 2023 -0700 Merge tag 'x86_urgent_for_v6.3_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: - Add a AMX ptrace self test - Prevent a false-positive warning when retrieving the (invalid) address of dynamic FPU features in their init state which are not saved in init_fpstate at all - Randomize per-CPU entry areas only when KASLR is enabled * tag 'x86_urgent_for_v6.3_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: selftests/x86/amx: Add a ptrace test x86/fpu/xstate: Prevent false-positive warning in __copy_xstate_uabi_buf() x86/mm: Do not shuffle CPU entry areas without KASLR commit 6485ac65af2b204e5150576d800c92d968c065b0 Merge: da8e7da11e4ba 491eafce1a51c Author: Linus Torvalds Date: Sun Mar 26 08:56:09 2023 -0700 Merge tag 'smb3-client-fixes-6.3-rc3' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs client fixes from Steve French: "Twelve cifs/smb3 client fixes (most also for stable) - forced umount fix - fix for two perf regressions - reconnect fixes - small debugging improvements - multichannel fixes" * tag 'smb3-client-fixes-6.3-rc3' of git://git.samba.org/sfrench/cifs-2.6: smb3: fix unusable share after force unmount failure cifs: fix dentry lookups in directory handle cache smb3: lower default deferred close timeout to address perf regression cifs: fix missing unload_nls() in smb2_reconnect() cifs: avoid race conditions with parallel reconnects cifs: append path to open_enter trace event cifs: print session id while listing open files cifs: dump pending mids for all channels in DebugData cifs: empty interface list when server doesn't support query interfaces cifs: do not poll server interfaces too regularly cifs: lock chan_lock outside match_session cifs: check only tcon status on tcon related functions commit da8e7da11e4ba758caf4c149cc8d8cd555aefe5f Merge: 5b9ff397a26ae 5f24a8725fe7b Author: Linus Torvalds Date: Sat Mar 25 13:32:43 2023 -0700 Merge tag 'nfsd-6.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fix from Chuck Lever: - Fix a crash when using NFS with krb5p * tag 'nfsd-6.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: SUNRPC: Fix a crash in gss_krb5_checksum() commit 5b9ff397a26aeb94180e0d459fda9731c3c617ba Merge: f768b35a2371c 4dfb02d5cae80 Author: Linus Torvalds Date: Sat Mar 25 13:12:36 2023 -0700 Merge tag 'xfs-6.3-fixes-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull yet more xfs bug fixes from Darrick Wong: "The first bugfix addresses a longstanding problem where we use the wrong file mapping cursors when trying to compute the speculative preallocation quantity. This has been causing sporadic crashes when alwayscow mode is engaged. The other two fixes correct minor problems in more recent changes. - Fix the new allocator tracepoints because git am mismerged the changes such that the trace_XXX got rebased to be in function YYY instead of XXX - Ensure that the perag AGFL_RESET state is consistent with whatever we've just read off the disk - Fix a bug where we used the wrong iext cursor during a write begin" * tag 'xfs-6.3-fixes-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: fix mismerged tracepoints xfs: clear incore AGFL_RESET state if it's not needed xfs: pass the correct cursor to xfs_iomap_prealloc_size commit f768b35a2371ccf85255f608444d234062a1b5c9 Merge: d704426300f2e e9b60c7f97130 Author: Linus Torvalds Date: Sat Mar 25 12:57:34 2023 -0700 Merge tag 'xfs-6.3-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs percpu counter fixes from Darrick Wong: "We discovered a filesystem summary counter corruption problem that was traced to cpu hot-remove racing with the call to percpu_counter_sum that sets the free block count in the superblock when writing it to disk. The root cause is that percpu_counter_sum doesn't cull from dying cpus and hence misses those counter values if the cpu shutdown hooks have not yet run to merge the values. I'm hoping this is a fairly painless fix to the problem, since the dying cpu mask should generally be empty. It's been in for-next for a week without any complaints from the bots. - Fix a race in the percpu counters summation code where the summation failed to add in the values for any CPUs that were dying but not yet dead. This fixes some minor discrepancies and incorrect assertions when running generic/650" * tag 'xfs-6.3-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: pcpcntr: remove percpu_counter_sum_all() fork: remove use of percpu_counter_sum_all pcpcntrs: fix dying cpu summation race cpumask: introduce for_each_cpu_or commit 2824861773eb512b37547516d81ef78108032cb2 Author: Tom Rix Date: Fri Mar 24 13:30:56 2023 -0400 ksmbd: remove unused is_char_allowed function clang with W=1 reports fs/ksmbd/unicode.c:122:19: error: unused function 'is_char_allowed' [-Werror,-Wunused-function] static inline int is_char_allowed(char *ch) ^ This function is not used so remove it. Signed-off-by: Tom Rix Reviewed-by: Sergey Senozhatsky Acked-by: Namjae Jeon Signed-off-by: Steve French commit e416ea62a9166e6075a07a970cc5bf79255d2700 Author: Marios Makassikis Date: Thu Mar 16 14:40:43 2023 +0100 ksmbd: do not call kvmalloc() with __GFP_NORETRY | __GFP_NO_WARN Commit 83dcedd5540d ("ksmbd: fix infinite loop in ksmbd_conn_handler_loop()"), changes GFP modifiers passed to kvmalloc(). This cause xfstests generic/551 test to fail. We limit pdu length size according to connection status and maximum number of connections. In the rest, memory allocation of request is limited by credit management. so these flags are no longer needed. Fixes: 83dcedd5540d ("ksmbd: fix infinite loop in ksmbd_conn_handler_loop()") Cc: stable@vger.kernel.org Signed-off-by: Marios Makassikis Acked-by: Namjae Jeon Signed-off-by: Steve French commit d704426300f2e95275267a387ffc3b8e5f4ae8b7 Merge: 4bdec23f971b1 3cfb9290da3d8 Author: Linus Torvalds Date: Sat Mar 25 12:51:25 2023 -0700 Merge tag 'xfs-6.3-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: "This batch started with some debugging enhancements to the new allocator refactoring that we put in 6.3-rc1 to assist developers in rebasing their dev branches. As for more serious code changes -- there's a bug fix to make the lockless allocator scan the whole filesystem before resorting to the locking allocator. We're also adding a selftest for the venerable directory/xattr hash function to make sure that it produces consistent results so that we can address any fallout as soon as possible. - Add a few debugging assertions so that people (me) trying to port code to the new allocator functions don't mess up the caller requirements - Relax some overly cautious lock ordering enforcement in the new allocator code, which means that file allocations will locklessly scan for the best space they can get before backing off to the traditional lock-and-really-get-it behavior - Add tracepoints to make it easier to trace the xfs allocator behavior - Actually test the dir/xattr hash algorithm to make sure it produces consistent results across all the platforms XFS supports" * tag 'xfs-6.3-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: test dir/attr hash when loading module xfs: add tracepoints for each of the externally visible allocators xfs: walk all AGs if TRYLOCK passed to xfs_alloc_vextent_iterate_ags xfs: try to idiot-proof the allocators commit 4bdec23f971b1a5caf7a18ae117e44bdfaf26c93 Merge: 65aca32efdcb0 968b66ffeb795 Author: Linus Torvalds Date: Sat Mar 25 10:27:27 2023 -0700 Merge tag 'hwmon-for-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: - it87: Fix voltage scaling for chips with 10.9mV ADCs - xgene: Fix ioremap and memremap leak - peci/cputemp: Fix miscalculated DTS temperature for SKX - hwmon core: fix potential sensor registration failure with thermal subsystem if of_node is missing * tag 'hwmon-for-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon (it87): Fix voltage scaling for chips with 10.9mV ADCs hwmon: (xgene) Fix ioremap and memremap leak hwmon: fix potential sensor registration fail if of_node is missing hwmon: (peci/cputemp) Fix miscalculated DTS for SKX commit 33189f0a94b9639c058781fcf82e4ea3803b1682 Author: ChunHao Lin Date: Thu Mar 23 22:33:09 2023 +0800 r8169: fix RTL8168H and RTL8107E rx crc error When link speed is 10 Mbps and temperature is under -20°C, RTL8168H and RTL8107E may have rx crc error. Disable phy 10 Mbps pll off to fix this issue. Fixes: 6e1d0b898818 ("r8169:add support for RTL8168H and RTL8107E") Signed-off-by: ChunHao Lin Reviewed-by: Heiner Kallweit Signed-off-by: David S. Miller commit 2d45e6e9f71b662fe3553dd1cf41d69d69ef6de1 Merge: f33642224e38d 9aa5757e1f71d Author: David S. Miller Date: Sat Mar 25 11:17:32 2023 +0000 Merge branch 'ksz-fixes' Oleksij Rempel says: ==================== net: dsa: microchip: ksz8: fixes for stable changes v2: - use proper Fixes tag - add Acked-by: Arun Ramadoss on all reviewed patches except the ksz8863_smi patch. These fixes address issues such as incomplete FDB extraction, incorrect FID extraction and configuration, incorrect timestamp extraction, and ghost entry extraction from an empty dynamic MAC table. These updates ensure proper functioning of the FDB/MDB functionality for the ksz8863/ksz8873 series of chips. ==================== Signed-off-by: David S. Miller commit 9aa5757e1f71d85facdc3c98028762cbab8d15c7 Author: Oleksij Rempel Date: Fri Mar 24 09:06:08 2023 +0100 net: dsa: microchip: ksz8: fix MDB configuration with non-zero VID FID is directly mapped to VID. However, configuring a MAC address with a VID != 0 resulted in incorrect configuration due to an incorrect bit mask. This kernel commit fixed the issue by correcting the bit mask and ensuring proper configuration of MAC addresses with non-zero VID. Fixes: 4b20a07e103f ("net: dsa: microchip: ksz8795: add support for ksz88xx chips") Signed-off-by: Oleksij Rempel Acked-by: Arun Ramadoss Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 392ff7a84cbca34118ca286dfbfe8aee24605897 Author: Oleksij Rempel Date: Fri Mar 24 09:06:07 2023 +0100 net: dsa: microchip: ksz8863_smi: fix bulk access Current regmap bulk access is broken, resulting to wrong reads/writes if ksz_read64/ksz_write64 functions are used. Mostly this issue was visible by using ksz8_fdb_dump(), which returned corrupt MAC address. The reason is that regmap was configured to have max_raw_read/write, even if ksz8863_mdio_read/write functions are able to handle unlimited read/write accesses. On ksz_read64 function we are using multiple 32bit accesses by incrementing each access by 1 instead of 4. Resulting buffer had 01234567.12345678 instead of 01234567.89abcdef. We have multiple ways to fix it: - enable 4 byte alignment for 32bit accesses. Since the HW do not have this requirement. It will break driver. - disable max_raw_* limit. This patch is removing max_raw_* limit for regmap accesses in ksz8863_smi. Fixes: 60a364760002 ("net: dsa: microchip: Add Microchip KSZ8863 SMI based driver support") Signed-off-by: Oleksij Rempel Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 492606cdc74804d372ab1bdb8f3ef4a6fb6f9f59 Author: Oleksij Rempel Date: Fri Mar 24 09:06:06 2023 +0100 net: dsa: microchip: ksz8: ksz8_fdb_dump: avoid extracting ghost entry from empty dynamic MAC table. If the dynamic MAC table is empty, we will still extract one outdated entry. Fix it by using correct bit offset. Fixes: 4b20a07e103f ("net: dsa: microchip: ksz8795: add support for ksz88xx chips") Signed-off-by: Oleksij Rempel Acked-by: Arun Ramadoss Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit b3177aab89be540dc50d2328427b073361093e38 Author: Oleksij Rempel Date: Fri Mar 24 09:06:05 2023 +0100 net: dsa: microchip: ksz8: fix offset for the timestamp filed We are using wrong offset, so we will get not a timestamp. Fixes: 4b20a07e103f ("net: dsa: microchip: ksz8795: add support for ksz88xx chips") Signed-off-by: Oleksij Rempel Acked-by: Arun Ramadoss Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 5d90492dd4ff50ad65c582c76c345d0b90001728 Author: Oleksij Rempel Date: Fri Mar 24 09:06:04 2023 +0100 net: dsa: microchip: ksz8: fix ksz8_fdb_dump() to extract all 1024 entries Current ksz8_fdb_dump() is able to extract only max 249 entries on the ksz8863/ksz8873 series of switches. This happened due to wrong bit mask and offset calculation. This commit corrects the issue and allows for the complete extraction of all 1024 entries. Fixes: 4b20a07e103f ("net: dsa: microchip: ksz8795: add support for ksz88xx chips") Signed-off-by: Oleksij Rempel Acked-by: Arun Ramadoss Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 88e943e83827a349f70c3464b3eba7260be7461d Author: Oleksij Rempel Date: Fri Mar 24 09:06:03 2023 +0100 net: dsa: microchip: ksz8: fix ksz8_fdb_dump() Before this patch, the ksz8_fdb_dump() function had several issues, such as uninitialized variables and incorrect usage of source port as a bit mask. These problems caused inaccurate reporting of vid information and port assignment in the bridge fdb. Fixes: e587be759e6e ("net: dsa: microchip: update fdb add/del/dump in ksz_common") Signed-off-by: Oleksij Rempel Acked-by: Arun Ramadoss Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit d2b727cb532b15e8b33aa259c2e885679618971c Author: Michal Simek Date: Tue Mar 21 16:33:23 2023 +0100 fpga: xilinx-pr-decoupler: Use readl wrapper instead of pure readl Driver has IO wrappers but xlnx_pr_decouple_read() is not used and readl is used instead which is just wrong. It is also generating sparse issue that xlnx_pr_decouple_read() is unused. Signed-off-by: Michal Simek Reviewed-by: Tom Rix Acked-by: Xu Yilun Link: https://lore.kernel.org/r/0381e4e8061c2fee182a104768e84feff3a82d25.1679412800.git.michal.simek@amd.com Signed-off-by: Xu Yilun commit f33642224e38d7e0d59336e10e7b4e370b1c4506 Author: SongJingyi Date: Fri Mar 24 11:14:06 2023 +0800 ptp_qoriq: fix memory leak in probe() Smatch complains that: drivers/ptp/ptp_qoriq.c ptp_qoriq_probe() warn: 'base' from ioremap() not released. Fix this by revising the parameter from 'ptp_qoriq->base' to 'base'. This is only a bug if ptp_qoriq_init() returns on the first -ENODEV error path. For other error paths ptp_qoriq->base and base are the same. And this change makes the code more readable. Fixes: 7f4399ba405b ("ptp_qoriq: fix NULL access if ptp dt node missing") Signed-off-by: SongJingyi Reviewed-by: Dan Carpenter Reviewed-by: Dongliang Mu Link: https://lore.kernel.org/r/20230324031406.1895159-1-u201912584@hust.edu.cn Signed-off-by: Jakub Kicinski commit 3bced313b9a5a237c347e0f079c8c2fe4b3935aa Author: Ronak Doshi Date: Thu Mar 23 13:07:21 2023 -0700 vmxnet3: use gro callback when UPT is enabled Currently, vmxnet3 uses GRO callback only if LRO is disabled. However, on smartNic based setups where UPT is supported, LRO can be enabled from guest VM but UPT devicve does not support LRO as of now. In such cases, there can be performance degradation as GRO is not being done. This patch fixes this issue by calling GRO API when UPT is enabled. We use updateRxProd to determine if UPT mode is active or not. To clarify few things discussed over the thread: The patch is not neglecting any feature bits nor disabling GRO. It uses GRO callback when UPT is active as LRO is not available in UPT. GRO callback cannot be used as default for all cases as it degrades performance for non-UPT cases or for cases when LRO is already done in ESXi. Cc: stable@vger.kernel.org Fixes: 6f91f4ba046e ("vmxnet3: add support for capability registers") Signed-off-by: Ronak Doshi Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230323200721.27622-1-doshir@vmware.com Signed-off-by: Jakub Kicinski commit b93eb564869321d0dffaf23fcc5c88112ed62466 Author: Ahmad Fatoum Date: Thu Mar 23 11:37:35 2023 +0100 net: dsa: realtek: fix out-of-bounds access The probe function sets priv->chip_data to (void *)priv + sizeof(*priv) with the expectation that priv has enough trailing space. However, only realtek-smi actually allocated this chip_data space. Do likewise in realtek-mdio to fix out-of-bounds accesses. These accesses likely went unnoticed so far, because of an (unused) buf[4096] member in struct realtek_priv, which caused kmalloc to round up the allocated buffer to a big enough size, so nothing of value was overwritten. With a different allocator (like in the barebox bootloader port of the driver) or with KASAN, the memory corruption becomes quickly apparent. Fixes: aac94001067d ("net: dsa: realtek: add new mdio interface for drivers") Reviewed-by: Florian Fainelli Reviewed-by: Luiz Angelo Daros de Luca Reviewed-by: Alvin Šipraga Reviewed-by: Linus Walleij Signed-off-by: Ahmad Fatoum Link: https://lore.kernel.org/r/20230323103735.2331786-1-a.fatoum@pengutronix.de Signed-off-by: Jakub Kicinski commit d684a7a26f7d2c7122a4581ac966ed64e88fb29c Author: Jerry Snitselaar Date: Fri Mar 24 12:32:04 2023 -0700 scsi: mpt3sas: Don't print sense pool info twice _base_allocate_sense_dma_pool() already prints out the sense pool information, so don't print it a second time after calling it in _base_allocate_memory_pools(). In addition the version in _base_allocate_memory_pools() was using the wrong size value, sz, which was last assigned when doing some nvme calculations instead of sense_sz to determine the pool size in kilobytes. Cc: Sathya Prakash Cc: Sreekanth Reddy Cc: Suganath Prabu Subramani Cc: MPT-FusionLinux.pdl@broadcom.com Cc: "Martin K. Petersen" Cc: "James E.J. Bottomley" Fixes: 970ac2bb70e7 ("scsi: mpt3sas: Force sense buffer allocations to be within same 4 GB region") Signed-off-by: Jerry Snitselaar Link: https://lore.kernel.org/r/20230324193204.567932-1-jsnitsel@redhat.com Signed-off-by: Martin K. Petersen commit 65aca32efdcb0965502d3db2f1fa33838c070952 Merge: 90c8ce31dbe93 d0072ca529674 Author: Linus Torvalds Date: Fri Mar 24 18:06:11 2023 -0700 Merge tag 'mm-hotfixes-stable-2023-03-24-17-09' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "21 hotfixes, 8 of which are cc:stable. 11 are for MM, the remainder are for other subsystems" * tag 'mm-hotfixes-stable-2023-03-24-17-09' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (21 commits) mm: mmap: remove newline at the end of the trace mailmap: add entries for Richard Leitner kcsan: avoid passing -g for test kfence: avoid passing -g for test mm: kfence: fix using kfence_metadata without initialization in show_object() lib: dhry: fix unstable smp_processor_id(_) usage mailmap: add entry for Enric Balletbo i Serra mailmap: map Sai Prakash Ranjan's old address to his current one mailmap: map Rajendra Nayak's old address to his current one Revert "kasan: drop skip_kasan_poison variable in free_pages_prepare" mailmap: add entry for Tobias Klauser kasan, powerpc: don't rename memintrinsics if compiler adds prefixes mm/ksm: fix race with VMA iteration and mm_struct teardown kselftest: vm: fix unused variable warning mm: fix error handling for map_deny_write_exec mm: deduplicate error handling for map_deny_write_exec checksyscalls: ignore fstat to silence build warning on LoongArch nilfs2: fix kernel-infoleak in nilfs_ioctl_wrap_copy() test_maple_tree: add more testing for mas_empty_area() maple_tree: fix mas_skip_node() end slot detection ... commit f0aa59a33d2ac2267d260fe21eaf92500df8e7b4 Author: Damien Le Moal Date: Wed Mar 22 11:22:11 2023 +0900 scsi: core: Improve scsi_vpd_inquiry() checks Some USB-SATA adapters have broken behavior when an unsupported VPD page is probed: Depending on the VPD page number, a 4-byte header with a valid VPD page number but with a 0 length is returned. Currently, scsi_vpd_inquiry() only checks that the page number is valid to determine if the page is valid, which results in receiving only the 4-byte header for the non-existent page. This error manifests itself very often with page 0xb9 for the Concurrent Positioning Ranges detection done by sd_read_cpr(), resulting in the following error message: sd 0:0:0:0: [sda] Invalid Concurrent Positioning Ranges VPD page Prevent such misleading error message by adding a check in scsi_vpd_inquiry() to verify that the page length is not 0. Signed-off-by: Damien Le Moal Link: https://lore.kernel.org/r/20230322022211.116327-1-damien.lemoal@opensource.wdc.com Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 90c8ce31dbe93f277fc1157e34740e841094c254 Merge: e76db6e50c85c 39b291b86b598 Author: Linus Torvalds Date: Fri Mar 24 17:59:00 2023 -0700 Merge tag '6.3-rc3-ksmbd-smb3-server-fixes' of git://git.samba.org/ksmbd Pull ksmbd server fixes from Steve French: - return less confusing messages on unsupported dialects (STATUS_NOT_SUPPORTED instead of I/O error) - fix for overly frequent inactive session termination - fix refcount leak - fix bounds check problems found by static checkers - fix to advertise named stream support correctly - Fix AES256 signing bug when connected to from MacOS * tag '6.3-rc3-ksmbd-smb3-server-fixes' of git://git.samba.org/ksmbd: ksmbd: return unsupported error on smb1 mount ksmbd: return STATUS_NOT_SUPPORTED on unsupported smb2.0 dialect ksmbd: don't terminate inactive sessions after a few seconds ksmbd: fix possible refcount leak in smb2_open() ksmbd: add low bound validation to FSCTL_QUERY_ALLOCATED_RANGES ksmbd: add low bound validation to FSCTL_SET_ZERO_DATA ksmbd: set FILE_NAMED_STREAMS attribute in FS_ATTRIBUTE_INFORMATION ksmbd: fix wrong signingkey creation when encryption is AES256 commit 2309df27111a51734cb9240b4d3c25f2f3c6ab06 Author: Tomas Henzl Date: Fri Mar 24 16:01:34 2023 +0100 scsi: megaraid_sas: Fix crash after a double completion When a physical disk is attached directly "without JBOD MAP support" (see megasas_get_tm_devhandle()) then there is no real error handling in the driver. Return FAILED instead of SUCCESS. Fixes: 18365b138508 ("megaraid_sas: Task management support") Signed-off-by: Tomas Henzl Link: https://lore.kernel.org/r/20230324150134.14696-1-thenzl@redhat.com Signed-off-by: Martin K. Petersen commit 0808ed6ebbc292222ca069d339744870f6d801da Author: Tomas Henzl Date: Fri Mar 24 14:52:49 2023 +0100 scsi: megaraid_sas: Fix fw_crash_buffer_show() If crash_dump_buf is not allocated then crash dump can't be available. Replace logical 'and' with 'or'. Signed-off-by: Tomas Henzl Link: https://lore.kernel.org/r/20230324135249.9733-1-thenzl@redhat.com Signed-off-by: Martin K. Petersen commit e76db6e50c85cce9e68c47076f8eab06189fe4db Merge: d7b5c942f0752 ec7d8bd7d40f1 Author: Linus Torvalds Date: Fri Mar 24 15:38:13 2023 -0700 Merge tag 'arm-fixes-6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "As usual, most of the bug fixes address issues in the devicetree files, and out of these, most are for the Qualcomm and NXP platforms, including: - A missing 'reserved-memory' property on LG G Watch R that is needed to prevent clashing with firmware - Annotations for cache coherency on multiple machines - Corrections for pinctrl, regulator, clock, iommu and power domain properties for i.MX and Qualcomm to correctly reflect the hardware settings - Firmware file names on multiple machines SA8540P Ride board - An incompatible change to the qcom vadc driver requires adding individual labels - Fix EQoS PHY reset GPIO by dropping the deprecated/wrong property and switch to the new bindings. - A fix for PCI bus address translation Tegra194 and Tegra234. There are also a couple of device driver fixes, addressing: - A race condition in the amdtee driver - A performance regression in the Qualcomm 'llcc' driver - An unitialized variable use NXP i.MX 'weim' driver - Error handling issues in Qualcomm 'rmtfs', and 'scm' drivers and the Arm scmi firmware driver" * tag 'arm-fixes-6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (48 commits) arm64: dts: qcom: sc8280xp-x13s: mark bob regulator as always-on arm64: dts: qcom: sc8280xp-x13s: mark s12b regulator as always-on arm64: dts: qcom: sc8280xp-x13s: mark s10b regulator as always-on arm64: dts: qcom: sc8280xp-x13s: mark s11b regulator as always-on arm64: dts: imx93: add missing #address-cells and #size-cells to i2c nodes bus: imx-weim: fix branch condition evaluates to a garbage value arm64: dts: imx8mn: specify #sound-dai-cells for SAI nodes ARM: dts: imx6sl: tolino-shine2hd: fix usbotg1 pinctrl ARM: dts: imx6sll: e60k02: fix usbotg1 pinctrl ARM: dts: imx6sll: e70k02: fix usbotg1 pinctrl arm64: dts: imx93: Fix eqos properties arm64: dts: imx8mp: Fix LCDIF2 node clock order arm64: dts: imx8mm-nitrogen-r2: fix WM8960 clock name arm64: dts: imx8dxl-evk: Fix eqos phy reset gpio firmware: qcom: scm: fix bogus irq error at probe arm64: dts: qcom: sm8550: Mark UFS controller as cache coherent arm64: dts: qcom: sa8540p-ride: correct name of remoteproc_nsp0 firmware arm64: dts: qcom: sm8450: Mark UFS controller as cache coherent arm64: dts: qcom: sm8350: Mark UFS controller as cache coherent arm64: dts: qcom: sm8550: fix LPASS pinctrl slew base address ... commit d7b5c942f0752894a91a925c7249116333d4ab25 Merge: 37154c19dd799 06615d11cc781 Author: Linus Torvalds Date: Fri Mar 24 15:32:01 2023 -0700 Merge tag 'for-v6.3-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply fixes from Sebastian Reichel: - rk817: Fix compiler warning - cros_usbpd-charger: Fix excessive error printing - axp288_fuel_gauge: handle platform_get_irq error - bq24190 and da9150: Fix race condition in remove path * tag 'for-v6.3-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: power: supply: da9150: Fix use after free bug in da9150_charger_remove due to race condition power: supply: bq24190: Fix use after free bug in bq24190_remove due to race condition power: supply: axp288_fuel_gauge: Added check for negative values power: supply: cros_usbpd: reclassify "default case!" as debug power: supply: rk817: Fix unsigned comparison with less than zero commit 37154c19dd79966009befdcf2b499099e3cbbe9c Merge: 5ad4fe9613cb8 08570b7c8db6d Author: Linus Torvalds Date: Fri Mar 24 15:21:24 2023 -0700 Merge tag 'drm-fixes-2023-03-24' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Daniel Vetter: - usual pile of fixes for amdgpu & i915 - probe error handling fixes for meson, lt8912b bridge - the host1x patch from Arnd - panel-orientation fix for Lenovo Book X90F * tag 'drm-fixes-2023-03-24' of git://anongit.freedesktop.org/drm/drm: (23 commits) gpu: host1x: fix uninitialized variable use drm/amd/display: Set dcn32 caps.seamless_odm drm/amd/display: fix wrong index used in dccg32_set_dpstreamclk drm/amdgpu/nv: Apply ASPM quirk on Intel ADL + AMD Navi drm/amd/display: remove outdated 8bpc comments drm/amdgpu/gfx: set cg flags to enter/exit safe mode drm/amdgpu: Force signal hw_fences that are embedded in non-sched jobs drm/amdgpu: add mes resume when do gfx post soft reset drm/amdgpu: skip ASIC reset for APUs when go to S4 drm/amdgpu: reposition the gpu reset checking for reuse drm/bridge: lt8912b: return EPROBE_DEFER if bridge is not found drm/meson: fix missing component unbind on bind errors drm: panel-orientation-quirks: Add quirk for Lenovo Yoga Book X90F Revert "drm/i915/hwmon: Enable PL1 power limit" drm/i915: Update vblank timestamping stuff on seamless M/N change drm/i915: Fix format for perf_limit_reasons drm/i915/gt: perform uc late init after probe error injection drm/i915/active: Fix missing debug object activation drm/i915/guc: Fix missing ecodes drm/i915/mtl: Disable MC6 for MTL A step ... commit 82e2c39f9ef78896e9b634dfd82dc042e6956bb7 Author: Josua Mayer Date: Thu Mar 23 12:25:36 2023 +0200 net: phy: dp83869: fix default value for tx-/rx-internal-delay dp83869 internally uses a look-up table for mapping supported delays in nanoseconds to register values. When specific delays are defined in device-tree, phy_get_internal_delay does the lookup automatically returning an index. The default case wrongly assigns the nanoseconds value from the lookup table, resulting in numeric value 2000 applied to delay configuration register, rather than the expected index values 0-7 (7 for 2000). Ultimately this issue broke RX for 1Gbps links. Fix default delay configuration by assigning the intended index value directly. Cc: stable@vger.kernel.org Fixes: 736b25afe284 ("net: dp83869: Add RGMII internal delay configuration") Co-developed-by: Yazan Shhady Signed-off-by: Yazan Shhady Signed-off-by: Josua Mayer Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230323102536.31988-1-josua@solid-run.com Signed-off-by: Jakub Kicinski commit ca4a80e4bb7e87daf33b27d2ab9e4f5311018a89 Author: Íñigo Huguet Date: Thu Mar 23 09:34:17 2023 +0100 sfc: ef10: don't overwrite offload features at NIC reset At NIC reset, some offload features related to encapsulated traffic might have changed (this mainly happens if the firmware-variant is changed with the sfboot userspace tool). Because of this, features are checked and set again at reset time. However, this was not done right, and some features were improperly overwritten at NIC reset: - Tunneled IPv6 segmentation was always disabled - Features disabled with ethtool were reenabled - Features that becomes unsupported after the reset were not disabled Also, checking if the device supports IPV6_CSUM to enable TSO6 is no longer necessary because all currently supported devices support it. Additionally, move the assignment of some other features to the EF10_OFFLOAD_FEATURES macro, like it is done in ef100, leaving the selection of features in efx_pci_probe_post_io a bit cleaner. Fixes: ffffd2454a7a ("sfc: correctly advertise tunneled IPv6 segmentation") Fixes: 24b2c3751aa3 ("sfc: advertise encapsulated offloads on EF10") Reported-by: Tianhao Zhao Suggested-by: Jonathan Cooper Tested-by: Jonathan Cooper Signed-off-by: Íñigo Huguet Acked-by: Edward Cree Link: https://lore.kernel.org/r/20230323083417.7345-1-ihuguet@redhat.com Signed-off-by: Jakub Kicinski commit 5ad4fe9613cb8c202150f5cce5347fc8926c6c01 Merge: 83511470af1a7 d3aa3e060c4a8 Author: Linus Torvalds Date: Fri Mar 24 14:20:48 2023 -0700 Merge tag 'for-6.3/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 thin to work as a swap device by using 'limit_swap_bios' DM target flag (initially added to allow swap to dm-crypt) to throttle the amount of outstanding swap bios. - Fix DM crypt soft lockup warnings by calling cond_resched() from the cpu intensive loop in dmcrypt_write(). - Fix DM crypt to not access an uninitialized tasklet. This fix allows for consistent handling of IO completion, by _not_ needlessly punting to a workqueue when tasklets are not needed. - Fix DM core's alloc_dev() initialization for DM stats to check for and propagate alloc_percpu() failure. * tag 'for-6.3/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm stats: check for and propagate alloc_percpu failure dm crypt: avoid accessing uninitialized tasklet dm crypt: add cond_resched() to dmcrypt_write() dm thin: fix deadlock when swapping to thin device commit 83511470af1a734ec47c37957612d2eecf1a2352 Merge: e344eb7be2a25 f915da0f0dfb6 Author: Linus Torvalds Date: Fri Mar 24 14:10:39 2023 -0700 Merge tag 'block-6.3-2023-03-24' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - NVMe pull request via Christoph: - Send Identify with CNS 06h only to I/O controllers (Martin George) - Fix nvme_tcp_term_pdu to match spec (Caleb Sander) - Pass in issue_flags for uring_cmd, so the end_io handlers don't need to assume what the right context is (me) - Fix for ublk, marking it as LIVE before adding it to avoid races on the initial IO (Ming) * tag 'block-6.3-2023-03-24' of git://git.kernel.dk/linux: nvme-tcp: fix nvme_tcp_term_pdu to match spec nvme: send Identify with CNS 06h only to I/O controllers block/io_uring: pass in issue_flags for uring_cmd task_work handling block: ublk_drv: mark device as LIVE before adding disk commit e344eb7be2a25c66a8bac5d4388f1a4583450a72 Merge: fd3d06ff5f4fa 02a4d923e4400 Author: Linus Torvalds Date: Fri Mar 24 14:01:01 2023 -0700 Merge tag 'io_uring-6.3-2023-03-24' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: - Fix an issue with repeated -ECONNREFUSED on a socket (me) - Fix a NULL pointer deference due to a stale lookup cache for allocating direct descriptors (Savino) * tag 'io_uring-6.3-2023-03-24' of git://git.kernel.dk/linux: io_uring/rsrc: fix null-ptr-deref in io_file_bitmap_get() io_uring/net: avoid sending -ECONNABORTED on repeated connection requests commit fd3d06ff5f4fa23f32bdb7f4d9f308503801d9e0 Merge: 1868d192d8f50 6babf38d894be Author: Linus Torvalds Date: Fri Mar 24 13:45:58 2023 -0700 Merge tag 'thermal-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control fixes from Rafael Wysocki: "These address two recent regressions related to thermal control. Specifics: - Restore the thermal core behavior regarding zero-temperature trip points to avoid a driver regression (Ido Schimmel) - Fix a recent regression in the ACPI processor driver preventing it from changing the number of CPU cooling device states exposed via sysfs after the given CPU cooling device has been registered (Rafael Wysocki)" * tag 'thermal-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: core: Restore behavior regarding invalid trip points ACPI: processor: thermal: Update CPU cooling devices on cpufreq policy changes thermal: core: Introduce thermal_cooling_device_update() thermal: core: Introduce thermal_cooling_device_present() ACPI: processor: Reorder acpi_processor_driver_init() commit 1868d192d8f504f88e61a8e83164fce6e6b7190c Merge: cb7f5b41f8341 8dbfa057b3f8e Author: Linus Torvalds Date: Fri Mar 24 13:29:44 2023 -0700 Merge tag 'acpi-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These add new ACPI IRQ override and backlight detection quirks. Specifics: - Add backlight=native DMI quirk for Acer Aspire 3830TG to the ACPI backlight driver (Hans de Goede) - Add an ACPI IRQ override quirk for Medion S17413 (Aymeric Wibo)" * tag 'acpi-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: resource: Add Medion S17413 to IRQ override quirk ACPI: video: Add backlight=native DMI quirk for Acer Aspire 3830TG commit 4dfb02d5cae80289384c4d3c6ddfbd92d30aced9 Author: Darrick J. Wong Date: Fri Mar 24 13:14:48 2023 -0700 xfs: fix mismerged tracepoints At some point in between sending this patch to the list and merging it into for-next, the tracepoints got all mixed up because I've over-reliant on automated tools not sucking. The end result is that the tracepoints are all wrong, so fix them. Signed-off-by: Darrick J. Wong commit 491eafce1a51c457701351a4bf40733799745314 Author: Steve French Date: Thu Mar 23 16:20:02 2023 -0500 smb3: fix unusable share after force unmount failure If user does forced unmount ("umount -f") while files are still open on the share (as was seen in a Kubernetes example running on SMB3.1.1 mount) then we were marking the share as "TID_EXITING" in umount_begin() which caused all subsequent operations (except write) to fail ... but unfortunately when umount_begin() is called we do not know yet that there are open files or active references on the share that would prevent unmount from succeeding. Kubernetes had example when they were doing umount -f when files were open which caused the share to become unusable until the files were closed (and the umount retried). Fix this so that TID_EXITING is not set until we are about to send the tree disconnect (not at the beginning of forced umounts in umount_begin) so that if "umount -f" fails (due to open files or references) the mount is still usable. Cc: stable@vger.kernel.org Reviewed-by: Shyam Prasad N Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit be4fde79812f02914e350bde0bc4cfeae8429378 Author: Paulo Alcantara Date: Fri Mar 24 13:56:33 2023 -0300 cifs: fix dentry lookups in directory handle cache Get rid of any prefix paths in @path before lookup_positive_unlocked() as it will call ->lookup() which already adds those prefix paths through build_path_from_dentry(). This has caused a performance regression when mounting shares with a prefix path where readdir(2) would end up retrying several times to open bad directory names that contained duplicate prefix paths. Fix this by skipping any prefix paths in @path before calling lookup_positive_unlocked(). Fixes: e4029e072673 ("cifs: find and use the dentry for cached non-root directories also") Cc: stable@vger.kernel.org # 6.1+ Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 7e0e76d99079be13c9961dde7c93b2d1ee665af4 Author: Steve French Date: Thu Mar 23 15:10:26 2023 -0500 smb3: lower default deferred close timeout to address perf regression Performance tests with large number of threads noted that the change of the default closetimeo (deferred close timeout between when close is done by application and when client has to send the close to the server), to 5 seconds from 1 second, significantly degraded perf in some cases like this (in the filebench example reported, the stats show close requests on the wire taking twice as long, and 50% regression in filebench perf). This is stil configurable via mount parm closetimeo, but to be safe, decrease default back to its previous value of 1 second. Reported-by: Yin Fengwei Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/997614df-10d4-af53-9571-edec36b0e2f3@intel.com/ Fixes: 5efdd9122eff ("smb3: allow deferred close timeout to be configurable") Cc: stable@vger.kernel.org # 6.0+ Tested-by: Yin Fengwei Reviewed-by: Paulo Alcantara (SUSE) Reviewed-by: Shyam Prasad N Signed-off-by: Steve French commit c24bb1a87dc3f2d77d410eaac2c6a295961bf50e Author: Paulo Alcantara Date: Fri Mar 24 16:05:19 2023 -0300 cifs: fix missing unload_nls() in smb2_reconnect() Make sure to unload_nls() @nls_codepage if we no longer need it. Fixes: bc962159e8e3 ("cifs: avoid race conditions with parallel reconnects") Signed-off-by: Paulo Alcantara (SUSE) Cc: Shyam Prasad N Signed-off-by: Steve French commit f6887a71bdd2f0dcba9b8180dd2223cfa8637e85 Author: Jason Montleon Date: Fri Mar 24 13:07:11 2023 -0400 ASoC: hdac_hdmi: use set_stream() instead of set_tdm_slots() hdac_hdmi was not updated to use set_stream() instead of set_tdm_slots() in the original commit so HDMI no longer produces audio. Cc: stable@vger.kernel.org Link: https://lore.kernel.org/regressions/CAJD_bPKQdtaExvVEKxhQ47G-ZXDA=k+gzhMJRHLBe=mysPnuKA@mail.gmail.com/ Fixes: 636110411ca7 ("ASoC: Intel/SOF: use set_stream() instead of set_tdm_slots() for HDAudio") Signed-off-by: Jason Montleon Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230324170711.2526-1-jmontleo@redhat.com Signed-off-by: Mark Brown commit 59513714f6659409adf717b0f85e0a6e35480a01 Author: Jiawen Wu Date: Wed Mar 22 18:36:32 2023 +0800 net: wangxun: Fix vector length of interrupt cause There is 64-bit interrupt cause register for txgbe. Fix to clear upper 32 bits. Fixes: 3f703186113f ("net: libwx: Add irq flow functions") Signed-off-by: Jiawen Wu Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20230322103632.132011-1-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski commit cb7f5b41f8341148050fe63e27cf52aa4f1519ad Merge: 877c20b104253 66a1c22b70917 Author: Linus Torvalds Date: Fri Mar 24 10:12:14 2023 -0700 Merge tag 'slab-fix-for-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab Pull slab fix from Vlastimil Babka: "A single build fix for a corner case configuration that is apparently possible to achieve on some arches, from Geert" * tag 'slab-fix-for-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab: mm/slab: Fix undefined init_cache_node_node() for NUMA and !SMP commit 877c20b1042535d79f9806095b03fdb082095532 Merge: 19a6b66ca5244 0b1d9debe3030 Author: Linus Torvalds Date: Fri Mar 24 10:07:38 2023 -0700 Merge tag 'efi-fixes-for-v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi Pull EFI fixes from Ard Biesheuvel: - Set the NX compat flag for arm64 and zboot, to ensure compatibility with EFI firmware that complies with tightening requirements imposed across the ecosystem. - Improve identification of Ampere Altra systems based on SMBIOS data. - Fix some issues related to the EFI framebuffer that were introduced as a result from some refactoring related to zboot and the merge with sysfb. - Makefile tweak to avoid rebuilding vmlinuz unnecessarily. - Fix efi_random_alloc() return value on out of memory condition. * tag 'efi-fixes-for-v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: efi/libstub: randomalloc: Return EFI_OUT_OF_RESOURCES on failure efi/libstub: Use relocated version of kernel's struct screen_info efi/libstub: zboot: Add compressed image to make targets efi: sysfb_efi: Add quirk for Lenovo Yoga Book X91F/L efi: sysfb_efi: Fix DMI quirks not working for simpledrm efi/libstub: smbios: Drop unused 'recsize' parameter arm64: efi: Use SMBIOS processor version to key off Ampere quirk efi/libstub: smbios: Use length member instead of record struct size efi: earlycon: Reprobe after parsing config tables arm64: efi: Set NX compat flag in PE/COFF header efi/libstub: arm64: Remap relocated image with strict permissions efi/libstub: zboot: Mark zboot EFI application as NX compatible commit ec7d8bd7d40f14b03da2d9cc3c6c8c845d62fb0f Merge: 7158e61c6cc8d f3d0fbad6765d Author: Arnd Bergmann Date: Fri Mar 24 18:06:28 2023 +0100 Merge tag 'qcom-driver-fixes-for-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/fixes Qualcomm driver fixes for v6.3 Support for the secure world interrupting the SCM driver drive the wait queue mechanism was recently introduced, but most platforms doesn't have this mechanism and an error should not be printed in the log. The rmtfs_mem driver recently gained support for assigning the region to multiple VMIDs, but accidentally removed the support for running without assignment. A couple of changes are introducd to correct this. The SC8280XP LLCC slice configuration is wrong, reslting in incorrect configuration of the hardware. The table is corrected, based on the datasheet. * tag 'qcom-driver-fixes-for-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: firmware: qcom: scm: fix bogus irq error at probe soc: qcom: rmtfs: handle optional qcom,vmid correctly soc: qcom: rmtfs: fix error handling reading qcom,vmid soc: qcom: llcc: Fix slice configuration values for SC8280XP Link: https://lore.kernel.org/r/20230323142505.1086072-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 7158e61c6cc8dc90f822d520c2ba696619b14812 Merge: f42ee7c457641 ecd240875e877 Author: Arnd Bergmann Date: Fri Mar 24 18:06:16 2023 +0100 Merge tag 'qcom-dts-fixes-for-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/fixes Qualcomm ARM32 Devicetree fixes for v6.3 This introduces missing reserved-memory ranges on LG G Watch R, resolving stability issues caused by Linux reusing memory used by firmware. * tag 'qcom-dts-fixes-for-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: ARM: dts: qcom: apq8026-lg-lenok: add missing reserved memory Link: https://lore.kernel.org/r/20230323141922.1085875-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit f42ee7c45764102c1351ed1dfcba93d3591e37da Merge: d2e53ceaf284e 07b0883e1f094 Author: Arnd Bergmann Date: Fri Mar 24 18:05:35 2023 +0100 Merge tag 'qcom-arm64-fixes-for-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/fixes Qualcomm ARM64 Devicetree fixes for v6.3 This correct SIM card selection on the two newly introduced MSM8916-based USB modems. The firmware-name for the first CDSP is corrected on the SA8540P Ride board. The PCIe controller in SC7280 is marked cache-coherent, which resolves seen data corruption issues. Labels are added to the vadc channel nodes on SC8280XP, as the Linux driver was updated to not include the unit address when generating device names and collisions thereby prevented registration of the channels. Audio clocks and routing is corrected and a few regulators are marked always-on for the Lenovo Thinkpad X13s, as their clients are not fully described at this point. SPI5 was accidentally enabled by default on SM6115, and is disabled again. CDSP on SM6375 is provided its power-domains, to appropriately vote for during power up for the DSP. The iommu mask for the PCIe controllers in SM8150 is updated, to match what the hypervisor expects. Th Venus firmware path is corrected on Xiaomi Mi Pad 5 Pro. The UFS controller is marked cache coherent on SM8350 and SM8450. The clocks for the second WSA macro on SM8450 is corrected, and given its own clocks. The bias-pull-up value for I2C pins are corrected on SM8550, to trigger the selection of the strong pull. CPU compatibles and the base address of the LPASS TLMM block are corrected. * tag 'qcom-arm64-fixes-for-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (23 commits) arm64: dts: qcom: sc8280xp-x13s: mark bob regulator as always-on arm64: dts: qcom: sc8280xp-x13s: mark s12b regulator as always-on arm64: dts: qcom: sc8280xp-x13s: mark s10b regulator as always-on arm64: dts: qcom: sc8280xp-x13s: mark s11b regulator as always-on arm64: dts: qcom: sm8550: Mark UFS controller as cache coherent arm64: dts: qcom: sa8540p-ride: correct name of remoteproc_nsp0 firmware arm64: dts: qcom: sm8450: Mark UFS controller as cache coherent arm64: dts: qcom: sm8350: Mark UFS controller as cache coherent arm64: dts: qcom: sm8550: fix LPASS pinctrl slew base address arm64: dts: qcom: sc8280xp-x13s: fix va dmic dai links and routing arm64: dts: qcom: sc8280xp-x13s: fix dmic sample rate arm64: dts: qcom: sc8280xp: fix lpass tx macro clocks arm64: dts: qcom: sc8280xp: fix rx frame shapping info arm64: dts: qcom: sm8450: correct WSA2 assigned clocks arm64: dts: qcom: sc7280: Mark PCIe controller as cache coherent arm64: dts: qcom: msm8916-ufi: Fix sim card selection pinctrl arm64: dts: qcom: sm8250-xiaomi-elish: Correct venus firmware path arm64: dts: qcom: sm8550: Use correct CPU compatibles arm64: dts: qcom: sm8550: Add bias pull up value to tlmm i2c data clk states arm64: dts: qcom: sm6375: Add missing power-domain-named to CDSP ... Link: https://lore.kernel.org/r/20230323141642.1085684-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 19a6b66ca5244203214726376fda978cda2fc488 Merge: 2495697422d37 e89c2e815e764 Author: Linus Torvalds Date: Fri Mar 24 09:52:26 2023 -0700 Merge tag 'riscv-for-linus-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - A fix to match the CSR ASID masking rules when passing ASIDs to firmware - Force GCC to use ISA 2.2, to avoid a host of compatibily issues between toolchains * tag 'riscv-for-linus-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Handle zicsr/zifencei issues between clang and binutils riscv: mm: Fix incorrect ASID argument when flushing TLB commit 2495697422d374b097151205d399ff0dcbaa08e0 Merge: 4bae0ad148f41 aadbd07ff8a75 Author: Linus Torvalds Date: Fri Mar 24 09:44:43 2023 -0700 Merge tag 'for-linus-6.3-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: - fix build warning - avoid concurrent accesses to the Xen PV console ring page * tag 'for-linus-6.3-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: x86/PVH: avoid 32-bit build warning when obtaining VGA console info hvc/xen: prevent concurrent accesses to the shared ring commit 6babf38d894bec696761c10fbfccafceae76f4eb Merge: f1b80a3878b2d 22c52fa5155a2 Author: Rafael J. Wysocki Date: Fri Mar 24 17:11:27 2023 +0100 Merge branch 'thermal-acpi' Merge a fix for a recent thermal-related regression in the ACPI processor driver. * thermal-acpi: ACPI: processor: thermal: Update CPU cooling devices on cpufreq policy changes thermal: core: Introduce thermal_cooling_device_update() thermal: core: Introduce thermal_cooling_device_present() ACPI: processor: Reorder acpi_processor_driver_init() commit 8dbfa057b3f8e8402f639c0bf5fcbc4e43a8b3da Merge: 2d0ab14634a26 5e7a3bf65db57 Author: Rafael J. Wysocki Date: Fri Mar 24 17:08:52 2023 +0100 Merge branch 'acpi-video' Merge an ACPI backlight quirk for Acer Aspire 3830TG (Hans de Goede). * acpi-video: ACPI: video: Add backlight=native DMI quirk for Acer Aspire 3830TG commit 2d0ab14634a26e54f8d6d231b47b7ef233e84599 Author: Aymeric Wibo Date: Sun Mar 19 03:12:05 2023 +0100 ACPI: resource: Add Medion S17413 to IRQ override quirk Add DMI info of the Medion S17413 (board M1xA) to the IRQ override quirk table. This fixes the keyboard not working on these laptops. Link: https://bugzilla.kernel.org/show_bug.cgi?id=213031 Signed-off-by: Aymeric Wibo [ rjw: Fixed up white space ] Signed-off-by: Rafael J. Wysocki commit 4bae0ad148f41904dd4e5857bdc2e3e31b950b3d Merge: ed1407e7f7f90 b20cf3f89c56b Author: Linus Torvalds Date: Fri Mar 24 09:05:25 2023 -0700 Merge tag 'tag-chrome-platform-fixes-for-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome platform fix from Tzung-Bi Shih: "Fix a kernel data leak vulnerability" * tag 'tag-chrome-platform-fixes-for-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: platform/chrome: cros_ec_chardev: fix kernel data leak from ioctl commit ed1407e7f7f906aed5afa851b0f409740c4bfea8 Merge: 608f1b136616f 92fbb6d1296f8 Author: Linus Torvalds Date: Fri Mar 24 09:02:24 2023 -0700 Merge tag 'i2c-for-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "A set of regular driver fixes" * tag 'i2c-for-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: xgene-slimpro: Fix out-of-bounds bug in xgene_slimpro_i2c_xfer() i2c: hisi: Only use the completion interrupt to finish the transfer i2c: hisi: Avoid redundant interrupts i2c: mxs: ensure that DMA buffers are safe for DMA i2c: imx-lpi2c: check only for enabled interrupt flags i2c: imx-lpi2c: clean rx/tx buffers upon new message commit 608f1b136616ff09d717776922c9ea9e9f9f3947 Merge: 285063049a652 1b4ae19e432df Author: Linus Torvalds Date: Fri Mar 24 08:48:12 2023 -0700 Merge tag 'net-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from bpf, wifi and bluetooth. Current release - regressions: - wifi: mt76: mt7915: add back 160MHz channel width support for MT7915 - libbpf: revert poisoning of strlcpy, it broke uClibc-ng Current release - new code bugs: - bpf: improve the coverage of the "allow reads from uninit stack" feature to fix verification complexity problems - eth: am65-cpts: reset PPS genf adj settings on enable Previous releases - regressions: - wifi: mac80211: serialize ieee80211_handle_wake_tx_queue() - wifi: mt76: do not run mt76_unregister_device() on unregistered hw, fix null-deref - Bluetooth: btqcomsmd: fix command timeout after setting BD address - eth: igb: revert rtnl_lock() that causes a deadlock - dsa: mscc: ocelot: fix device specific statistics Previous releases - always broken: - xsk: add missing overflow check in xdp_umem_reg() - wifi: mac80211: - fix QoS on mesh interfaces - fix mesh path discovery based on unicast packets - Bluetooth: - ISO: fix timestamped HCI ISO data packet parsing - remove "Power-on" check from Mesh feature - usbnet: more fixes to drivers trusting packet length - wifi: iwlwifi: mvm: fix mvmtxq->stopped handling - Bluetooth: btintel: iterate only bluetooth device ACPI entries - eth: iavf: fix inverted Rx hash condition leading to disabled hash - eth: igc: fix the validation logic for taprio's gate list - dsa: tag_brcm: legacy: fix daisy-chained switches Misc: - bpf: adjust insufficient default bpf_jit_limit to account for growth of BPF use over the last 5 years - xdp: bpf_xdp_metadata() use EOPNOTSUPP as unique errno indicating no driver support" * tag 'net-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (84 commits) Bluetooth: HCI: Fix global-out-of-bounds Bluetooth: mgmt: Fix MGMT add advmon with RSSI command Bluetooth: btsdio: fix use after free bug in btsdio_remove due to unfinished work Bluetooth: L2CAP: Fix responding with wrong PDU type Bluetooth: btqcomsmd: Fix command timeout after setting BD address Bluetooth: btinel: Check ACPI handle for NULL before accessing net: mdio: thunder: Add missing fwnode_handle_put() net: dsa: mt7530: move setting ssc_delta to PHY_INTERFACE_MODE_TRGMII case net: dsa: mt7530: move lowering TRGMII driving to mt7530_setup() net: dsa: mt7530: move enabling disabling core clock to mt7530_pll_setup() net: asix: fix modprobe "sysfs: cannot create duplicate filename" gve: Cache link_speed value from device tools: ynl: Fix genlmsg header encoding formats net: enetc: fix aggregate RMON counters not showing the ranges Bluetooth: Remove "Power-on" check from Mesh feature Bluetooth: Fix race condition in hci_cmd_sync_clear Bluetooth: btintel: Iterate only bluetooth device ACPI entries Bluetooth: ISO: fix timestamped HCI ISO data packet parsing Bluetooth: btusb: Remove detection of ISO packets over bulk Bluetooth: hci_core: Detect if an ACL packet is in fact an ISO packet ... commit e2e63b071b2da53ad6a154e34c387bb064137f74 Author: Darrick J. Wong Date: Tue Mar 21 16:33:20 2023 -0700 xfs: clear incore AGFL_RESET state if it's not needed Prior to commit 7ac2ff8bb371, when we loaded the incore perag structure with information from the AGF header, we would set or clear the pagf_agfl_reset field based on whether or not the AGFL list was misaligned within the block. IOWs, it's an incore state bit that's supposed to cache something in the ondisk metadata. Therefore, the code still needs to support clearing the incore bit if (somehow) the AGFL were to correct itself. It turns out that xfs_repair does exactly this -- phase 4 loads the AGF to scan the rmapbt for corrupt records, which can set NEEDS_AGFL_RESET. The scan unsets AGF_INIT but doesn't unset NEEDS_AGFL_RESET. Phase 5 totally rewrites the AGFL and fixes the alignment problem, didn't clear NEEDS_AGFL_RESET historically, and reloads the perag state to fix the freelist. This results in the AGFL being reset based on stale data, which then causes the new AGFL blocks to be leaked. A subsequent xfs_repair -n then complains about the leaks. One could argue that phase 5 ought to clear this bit directly when it reloads the perag AGF data after rewriting the AGFL, but libxfs used to handle this for us, so it should go back to doing that. Found by fuzzing flfirst = ones in xfs/352. Fixes: 7ac2ff8bb371 ("xfs: perags need atomic operational state") Signed-off-by: Darrick J. Wong commit fcde88af6a783d32e735dd2615528e2bf7a0f533 Author: Darrick J. Wong Date: Sat Mar 18 20:58:40 2023 -0700 xfs: pass the correct cursor to xfs_iomap_prealloc_size In xfs_buffered_write_iomap_begin, @icur is the iext cursor for the data fork and @ccur is the cursor for the cow fork. Pass in whichever cursor corresponds to allocfork, because otherwise the xfs_iext_prev_extent call can use the data fork cursor to walk off the end of the cow fork structure. Best case it returns the wrong results, worst case it does this: stack segment: 0000 [#1] PREEMPT SMP CPU: 2 PID: 3141909 Comm: fsstress Tainted: G W 6.3.0-rc2-xfsx #6.3.0-rc2 7bf5cc2e98997627cae5c930d890aba3aeec65dd Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20171121_152543-x86-ol7-builder-01.us.oracle.com-4.el7.1 04/01/2014 RIP: 0010:xfs_iext_prev+0x71/0x150 [xfs] RSP: 0018:ffffc90002233aa8 EFLAGS: 00010297 RAX: 000000000000000f RBX: 000000000000000e RCX: 000000000000000c RDX: 0000000000000002 RSI: 000000000000000e RDI: ffff8883d0019ba0 RBP: 989642409af8a7a7 R08: ffffea0000000001 R09: 0000000000000002 R10: 0000000000000000 R11: 000000000000000c R12: ffffc90002233b00 R13: ffff8883d0019ba0 R14: 989642409af8a6bf R15: 000ffffffffe0000 FS: 00007fdf8115f740(0000) GS:ffff88843fd00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fdf8115e000 CR3: 0000000357256000 CR4: 00000000003506e0 Call Trace: xfs_iomap_prealloc_size.constprop.0.isra.0+0x1a6/0x410 [xfs 619a268fb2406d68bd34e007a816b27e70abc22c] xfs_buffered_write_iomap_begin+0xa87/0xc60 [xfs 619a268fb2406d68bd34e007a816b27e70abc22c] iomap_iter+0x132/0x2f0 iomap_file_buffered_write+0x92/0x330 xfs_file_buffered_write+0xb1/0x330 [xfs 619a268fb2406d68bd34e007a816b27e70abc22c] vfs_write+0x2eb/0x410 ksys_write+0x65/0xe0 do_syscall_64+0x2b/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Found by xfs/538 in alwayscow mode, but this doesn't seem particular to that test. Fixes: 590b16516ef3 ("xfs: refactor xfs_iomap_prealloc_size") Actually-Fixes: 66ae56a53f0e ("xfs: introduce an always_cow mode") Signed-off-by: Darrick J. Wong commit 285063049a65251aada1c34664de692dd083aa03 Merge: 6dd74c51b4856 e15acc25880cf Author: Linus Torvalds Date: Fri Mar 24 08:32:10 2023 -0700 Merge tag 'for-6.3-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "A few more fixes, the zoned accounting fix is spread across a few patches, preparatory and the actual fixes: - zoned mode: - fix accounting of unusable zone space - fix zone activation condition for DUP profile - preparatory patches - improved error handling of missing chunks - fix compiler warning" * tag 'for-6.3-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: zoned: drop space_info->active_total_bytes btrfs: zoned: count fresh BG region as zone unusable btrfs: use temporary variable for space_info in btrfs_update_block_group btrfs: rename BTRFS_FS_NO_OVERCOMMIT to BTRFS_FS_ACTIVE_ZONE_TRACKING btrfs: zoned: fix btrfs_can_activate_zone() to support DUP profile btrfs: fix compiler warning on SPARC/PA-RISC handling fscrypt_setup_filename btrfs: handle missing chunk mapping more gracefully commit 6dd74c51b48567e6ec56276aa35c8d25f6472f6f Merge: 1e760fa3596e8 a13faca032acb Author: Linus Torvalds Date: Fri Mar 24 08:27:13 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 small fixes, three in drivers. The core fix adds a UFS device to an existing quirk to avoid a huge delay on boot" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: scsi_dh_alua: Fix memleak for 'qdata' in alua_activate() scsi: qla2xxx: Synchronize the IOCB count to be in order scsi: qla2xxx: Perform lockless command completion in abort path scsi: core: Add BLIST_SKIP_VPD_PAGES for SKhynix H28U74301AMR commit bc962159e8e326af634a506508034a375bf2b858 Author: Shyam Prasad N Date: Mon Mar 20 06:08:19 2023 +0000 cifs: avoid race conditions with parallel reconnects When multiple processes/channels do reconnects in parallel we used to return success immediately negotiate/session-setup/tree-connect, causing race conditions between processes that enter the function in parallel. This caused several errors related to session not found to show up during parallel reconnects. Signed-off-by: Shyam Prasad N Reviewed-by: Paulo Alcantara (SUSE) Cc: stable@vger.kernel.org Signed-off-by: Steve French commit fddc6ccc487e5de07b98df8d04118d5dcb5e0407 Author: Shyam Prasad N Date: Fri Mar 17 12:51:17 2023 +0000 cifs: append path to open_enter trace event We do not dump the file path for smb3_open_enter ftrace calls, which is a severe handicap while debugging using ftrace evens. This change adds that info. Unfortunately, we're not updating the path in open params in many places; which I had to do as a part of this change. SMB2_open gets path in utf16 format, but it's easier of path is supplied as char pointer in oparms. Signed-off-by: Shyam Prasad N Reviewed-by: Paulo Alcantara (SUSE) Cc: stable@vger.kernel.org Signed-off-by: Steve French commit 7c3650a8007c43bc1a60d8bdb4cdbea3ad9a7dd4 Author: Todd Brandt Date: Tue Mar 14 11:12:56 2023 -0700 HID: hid-sensor-custom: Fix buffer overrun in device name On some platforms there are some platform devices created with invalid names. For example: "HID-SENSOR-INT-020b?.39.auto" instead of "HID-SENSOR-INT-020b.39.auto" This string include some invalid characters, hence it will fail to properly load the driver which will handle this custom sensor. Also it is a problem for some user space tools, which parses the device names from ftrace and dmesg. This is because the string, real_usage, is not NULL terminated and printed with %s to form device name. To address this, initialize the real_usage string with 0s. Reported-and-tested-by: Todd Brandt Link: https://bugzilla.kernel.org/show_bug.cgi?id=217169 Fixes: 98c062e82451 ("HID: hid-sensor-custom: Allow more custom iio sensors") Cc: stable@vger.kernel.org Suggested-by: Philipp Jungkamp Signed-off-by: Philipp Jungkamp Signed-off-by: Todd Brandt Reviewed-by: Andi Shyti Reviewed-by: Jonathan Cameron Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit 1dc40551f206d20b7e46ea7dd538dcdd928451c6 Author: Dmitry Baryshkov Date: Fri Mar 24 05:16:51 2023 +0300 arm64: dts: qcom: ipq8074-hk10: enable QMP device, not the PHY node Correct PCIe PHY enablement to refer the QMP device nodes rather than PHY device nodes. QMP nodes have 'status = "disabled"' property in the ipq8074.dtsi, while PHY nodes do not correspond to the actual device and do not have the status property. Fixes: 1ed34da63a37 ("arm64: dts: qcom: Add board support for HK10") Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230324021651.1799969-2-dmitry.baryshkov@linaro.org commit 72630ba422b70ea0874fc90d526353cf71c72488 Author: Dmitry Baryshkov Date: Fri Mar 24 05:16:50 2023 +0300 arm64: dts: qcom: ipq8074-hk01: enable QMP device, not the PHY node Correct PCIe PHY enablement to refer the QMP device nodes rather than PHY device nodes. QMP nodes have 'status = "disabled"' property in the ipq8074.dtsi, while PHY nodes do not correspond to the actual device and do not have the status property. Fixes: e8a7fdc505bb ("arm64: dts: ipq8074: qcom: Re-arrange dts nodes based on address") Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230324021651.1799969-1-dmitry.baryshkov@linaro.org commit e313de5b5b04176f28384b45ebebd552c0c7dae3 Author: Max Filippov Date: Fri Mar 24 05:30:35 2023 -0700 MAINTAINERS: xtensa: drop linux-xtensa@linux-xtensa.org mailing list The linux-xtensa@linux-xtensa.org mailing list has been bouncing emails for a few months now. Drop it from the xtensa entries in the MAINTAINERS file. Signed-off-by: Max Filippov commit 34224133458ca48caf2b57df335e870f1abb7af5 Author: Andrzej Kacprowski Date: Thu Mar 23 13:55:04 2023 +0100 accel/ivpu: Fix IPC buffer header status field value IPC messages transmitted to the device must be marked as allocated - status field must be set to 1. The VPU driver has IVPU_IPC_HDR_ALLOCATED incorrectly defined. Future VPU firmware versions will reject all IPC messages with invalid status and will not work with a VPU driver that is missing this fix. Fixes: 5d7422cfb498 ("accel/ivpu: Add IPC driver and JSM messages") Signed-off-by: Andrzej Kacprowski Signed-off-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20230323125504.2586442-9-stanislaw.gruszka@linux.intel.com commit 252776b2973ea8c7e2e6db09993e6f33c81b776e Author: Stanislaw Gruszka Date: Thu Mar 23 13:55:03 2023 +0100 accel/ivpu: Fix VPU clock calculation The driver calculates the wrong frequency because it ignores the workpoint config and this cause undesired power/performance characteristics. Fix this by using the workpoint config in the freq calculations. Fixes: 35b137630f08 ("accel/ivpu: Introduce a new DRM driver for Intel VPU") Co-developed-by: Andrzej Kacprowski Signed-off-by: Andrzej Kacprowski Signed-off-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20230323125504.2586442-8-stanislaw.gruszka@linux.intel.com commit 392b35bf92605deb620a9b0c94c14cad1c69fd34 Author: Stanislaw Gruszka Date: Thu Mar 23 13:55:02 2023 +0100 accel/ivpu: Remove support for 1 tile SKUs The support for single tile SKUs was dropped from MTL. Note that we can still boot the VPU with 1-tile work point config - this is independent from number of tiles present in the VPU. Co-developed-by: Andrzej Kacprowski Signed-off-by: Andrzej Kacprowski Signed-off-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20230323125504.2586442-7-stanislaw.gruszka@linux.intel.com commit 3d8b2727d8de4720c6865917dd05249b1f449f34 Author: Stanislaw Gruszka Date: Thu Mar 23 13:55:01 2023 +0100 accel/ivpu: Disable buttress on device removal Use pci_set_power_state() to disable buttress when device is removed. This is workaround of hardware bug that hangs the system. Additionally not disabling buttress prevents CPU enter deeper Pkg-C states when the driver is unloaded or fail to probe. 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/20230323125504.2586442-6-stanislaw.gruszka@linux.intel.com commit a8fed6d1e0b9bbea2cbe602831f84a2cff4653e3 Author: Stanislaw Gruszka Date: Thu Mar 23 13:55:00 2023 +0100 accel/ivpu: Fix power down sequence Remove FPGA workaround on power_down to skip checking for noc quiescent state. Put VPU in reset before powering it down and skip manipulating registers that are reset by the VPU reset. This fixes power down errors where VPU is powered down just after VPU is booted. 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/20230323125504.2586442-5-stanislaw.gruszka@linux.intel.com commit 3ff6edbc17dbab87f705b1da93854ffff3912673 Author: Stanislaw Gruszka Date: Thu Mar 23 13:54:59 2023 +0100 accel/ivpu: Do not use SSID 1 The SSID=1 is used by the firmware as default value in case SSID mapping is not initialized. This allows detecting use of miss-configured memory contexts. The future FW versions may not allow using SSID=1. SSID=65 is valid value, number of contexts are limited by number of available command queues, but SSID can be any u16 value. Fixes: 35b137630f08 ("accel/ivpu: Introduce a new DRM driver for Intel VPU") Co-developed-by: Andrzej Kacprowski Signed-off-by: Andrzej Kacprowski Signed-off-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20230323125504.2586442-4-stanislaw.gruszka@linux.intel.com commit 6013aa84ee45fd0faa23fc6312a1af60b06d408b Author: Stanislaw Gruszka Date: Thu Mar 23 13:54:58 2023 +0100 accel/ivpu: Cancel recovery work Prevent running recovery_work after device is removed. Fixes: 852be13f3bd3 ("accel/ivpu: Add PM support") Signed-off-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20230323125504.2586442-3-stanislaw.gruszka@linux.intel.com commit 4522ad764d7e99a79de817fcbc682ebcc75d01fe Author: Stanislaw Gruszka Date: Thu Mar 23 13:54:57 2023 +0100 accel/ivpu: Do not access HW registers after unbind We should not access hardware after we unbind from the bus. Use drm_dev_enter() / drm_dev_exit() to mark code sections where hardware is accessed (and not already protected by other locks) and drm_dev_unplug() to mark device is gone. 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/20230323125504.2586442-2-stanislaw.gruszka@linux.intel.com commit 08570b7c8db6d9185deccf5bcda773bd6f17172f Author: Arnd Bergmann Date: Fri Jan 27 23:14:00 2023 +0100 gpu: host1x: fix uninitialized variable use The error handling for platform_get_irq() failing no longer works after a recent change, clang now points this out with a warning: drivers/gpu/host1x/dev.c:520:6: error: variable 'syncpt_irq' is uninitialized when used here [-Werror,-Wuninitialized] if (syncpt_irq < 0) ^~~~~~~~~~ Fix this by removing the variable and checking the correct error status. Fixes: 625d4ffb438c ("gpu: host1x: Rewrite syncpoint interrupt handling") Reviewed-by: Nathan Chancellor Reviewed-by: Mikko Perttunen Reported-by: "kernelci.org bot" Reviewed-by: Nick Desaulniers Reviewed-by: Jon Hunter Signed-off-by: Arnd Bergmann Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20230127221418.2522612-1-arnd@kernel.org commit 2e4e9de1620f76a69893b35f920171b563bd007c Merge: e37fef79bf3b0 f9537b1fa7fb5 Author: Daniel Vetter Date: Fri Mar 24 10:23:28 2023 +0100 Merge tag 'amd-drm-fixes-6.3-2023-03-23' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.3-2023-03-23: amdgpu: - S4 fix - Soft reset fixes - SR-IOV fix - Remove an out of date comment in the DC code - ASPM fix - DCN 3.2 fixes Signed-off-by: Daniel Vetter From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230323161939.7751-1-alexander.deucher@amd.com commit e37fef79bf3b045c44a1350acc327a8e34f07184 Merge: 9b5dbf6b15b56 22aa20e4c5dcb Author: Daniel Vetter Date: Fri Mar 24 10:18:43 2023 +0100 Merge tag 'drm-intel-fixes-2023-03-23' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v6.3-rc4: - Fix an MTL workaround - Fix fbdev obj locking before vma pin - Fix state inheritance tracking in initial commit - Fix missing GuC error capture codes - Fix missing debug object activation - Fix uc init late order relative to probe error injection - Fix perf limit reasons formatting - Fix vblank timestamp update on seamless M/N changes Signed-off-by: Daniel Vetter From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/878rfn7njw.fsf@intel.com commit 9b5dbf6b15b564be5c7cd562737853dc95d30935 Merge: e8d018dd0257f 1a70ca89d59c7 Author: Daniel Vetter Date: Fri Mar 24 09:33:03 2023 +0100 Merge tag 'drm-misc-fixes-2023-03-23' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull: * fixes for bind and probing error handling for meson, lt8912b bridge * panel-orientation fixes for Lenovo Book X90F Signed-off-by: Daniel Vetter From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230323082401.GA8371@linux-uq9g commit fa4e7a6fa12b1132340785e14bd439cbe95b7a5a Author: Takashi Iwai Date: Fri Mar 24 08:50:05 2023 +0100 ALSA: usb-audio: Fix regression on detection of Roland VS-100 It's been reported that the recent kernel can't probe the PCM devices on Roland VS-100 properly, and it turned out to be a regression by the recent addition of the bit shift range check for the format bits. In the old code, we just did bit-shift and it resulted in zero, which is then corrected to the standard PCM format, while the new code explicitly returns an error in such a case. For addressing the regression, relax the check and fallback to the standard PCM type (with the info output). Fixes: 43d5ca88dfcd ("ALSA: usb-audio: Fix potential out-of-bounds shift") Cc: Link: https://bugzilla.kernel.org/show_bug.cgi?id=217084 Link: https://lore.kernel.org/r/20230324075005.19403-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 39b291b86b5988bf8753c3874d5c773399d09b96 Author: Namjae Jeon Date: Thu Mar 23 21:15:52 2023 +0900 ksmbd: return unsupported error on smb1 mount ksmbd disconnect connection when mounting with vers=smb1. ksmbd should send smb1 negotiate response to client for correct unsupported error return. This patch add needed SMB1 macros and fill NegProt part of the response for smb1 negotiate response. Cc: stable@vger.kernel.org Reported-by: Steve French Reviewed-by: Sergey Senozhatsky Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit b20cf3f89c56b5f6a38b7f76a8128bf9f291bbd3 Author: Tzung-Bi Shih Date: Fri Mar 24 09:06:58 2023 +0800 platform/chrome: cros_ec_chardev: fix kernel data leak from ioctl It is possible to peep kernel page's data by providing larger `insize` in struct cros_ec_command[1] when invoking EC host commands. Fix it by using zeroed memory. [1]: https://elixir.bootlin.com/linux/v6.2/source/include/linux/platform_data/cros_ec_proto.h#L74 Fixes: eda2e30c6684 ("mfd / platform: cros_ec: Miscellaneous character device to talk with the EC") Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230324010658.1082361-1-tzungbi@kernel.org commit cbedf1a33970c9b825ae75b81fbd3e88e224a418 Author: Werner Sembach Date: Thu Mar 23 18:13:11 2023 -0700 Input: i8042 - add TUXEDO devices to i8042 quirk tables for partial fix A lot of modern Clevo barebones have touchpad and/or keyboard issues after suspend fixable with nomux + reset + noloop + nopnp. Luckily, none of them have an external PS/2 port so this can safely be set for all of them. I'm not entirely sure if every device listed really needs all four quirks, but after testing and production use, no negative effects could be observed when setting all four. Setting SERIO_QUIRK_NOMUX or SERIO_QUIRK_RESET_ALWAYS on the Clevo N150CU and the Clevo NHxxRZQ makes the keyboard very laggy for ~5 seconds after boot and sometimes also after resume. However both are required for the keyboard to not fail completely sometimes after boot or resume. Signed-off-by: Werner Sembach Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230321191619.647911-1-wse@tuxedocomputers.com Signed-off-by: Dmitry Torokhov commit d0072ca529674c36421023ffe90837a7de9387f3 Author: Minwoo Im Date: Sat Mar 11 08:18:00 2023 +0900 mm: mmap: remove newline at the end of the trace We already have newline in TP_printk so remove the redundant newline character at the end of the mmap trace. <...>-345 [006] ..... 95.589290: exit_mmap: mt_mod ... <...>-345 [006] ..... 95.589413: vm_unmapped_area: addr=... <...>-345 [006] ..... 95.589571: vm_unmapped_area: addr=... <...>-345 [006] ..... 95.589606: vm_unmapped_area: addr=... to <...>-336 [006] ..... 44.762506: exit_mmap: mt_mod ... <...>-336 [006] ..... 44.762654: vm_unmapped_area: addr=... <...>-336 [006] ..... 44.762794: vm_unmapped_area: addr=... <...>-336 [006] ..... 44.762835: vm_unmapped_area: addr=... Link: https://lkml.kernel.org/r/ZAu6qDsNPmk82UjV@minwoo-desktop FIxes: df529cabb7a25 ("mm: mmap: add trace point of vm_unmapped_area") Signed-off-by: Minwoo Im Acked-by: Steven Rostedt (Google) Reviewed-by: Mukesh Ojha Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton commit 5aa360971beaadf51f099fb7904fa4807b7d39cd Author: Richard Leitner Date: Thu Mar 16 11:25:25 2023 +0100 mailmap: add entries for Richard Leitner Map all my old email addresses to my current address. Link: https://lkml.kernel.org/r/20230316-my-mailmap-v1-1-76bc3a36ba41@linux.dev Signed-off-by: Richard Leitner Signed-off-by: Andrew Morton commit 5eb39cde1e2487ba5ec1802dc5e58a77e700d99e Author: Marco Elver Date: Thu Mar 16 23:47:05 2023 +0100 kcsan: avoid passing -g for test Nathan reported that when building with GNU as and a version of clang that defaults to DWARF5, the assembler will complain with: Error: non-constant .uleb128 is not supported This is because `-g` defaults to the compiler debug info default. If the assembler does not support some of the directives used, the above errors occur. To fix, remove the explicit passing of `-g`. All the test wants is that stack traces print valid function names, and debug info is not required for that. (I currently cannot recall why I added the explicit `-g`.) Link: https://lkml.kernel.org/r/20230316224705.709984-2-elver@google.com Fixes: 1fe84fd4a402 ("kcsan: Add test suite") Signed-off-by: Marco Elver Reported-by: Nathan Chancellor Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Signed-off-by: Andrew Morton commit 2e08ca1802441224f5b7cc6bffbb687f7406de95 Author: Marco Elver Date: Thu Mar 16 23:47:04 2023 +0100 kfence: avoid passing -g for test Nathan reported that when building with GNU as and a version of clang that defaults to DWARF5: $ make -skj"$(nproc)" ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- \ LLVM=1 LLVM_IAS=0 O=build \ mrproper allmodconfig mm/kfence/kfence_test.o /tmp/kfence_test-08a0a0.s: Assembler messages: /tmp/kfence_test-08a0a0.s:14627: Error: non-constant .uleb128 is not supported /tmp/kfence_test-08a0a0.s:14628: Error: non-constant .uleb128 is not supported /tmp/kfence_test-08a0a0.s:14632: Error: non-constant .uleb128 is not supported /tmp/kfence_test-08a0a0.s:14633: Error: non-constant .uleb128 is not supported /tmp/kfence_test-08a0a0.s:14639: Error: non-constant .uleb128 is not supported ... This is because `-g` defaults to the compiler debug info default. If the assembler does not support some of the directives used, the above errors occur. To fix, remove the explicit passing of `-g`. All the test wants is that stack traces print valid function names, and debug info is not required for that. (I currently cannot recall why I added the explicit `-g`.) Link: https://lkml.kernel.org/r/20230316224705.709984-1-elver@google.com Fixes: bc8fbc5f305a ("kfence: add test suite") Signed-off-by: Marco Elver Reported-by: Nathan Chancellor Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Signed-off-by: Andrew Morton commit 1c86a188e03156223a34d09ce290b49bd4dd0403 Author: Muchun Song Date: Wed Mar 15 11:44:41 2023 +0800 mm: kfence: fix using kfence_metadata without initialization in show_object() The variable kfence_metadata is initialized in kfence_init_pool(), then, it is not initialized if kfence is disabled after booting. In this case, kfence_metadata will be used (e.g. ->lock and ->state fields) without initialization when reading /sys/kernel/debug/kfence/objects. There will be a warning if you enable CONFIG_DEBUG_SPINLOCK. Fix it by creating debugfs files when necessary. Link: https://lkml.kernel.org/r/20230315034441.44321-1-songmuchun@bytedance.com Fixes: 0ce20dd84089 ("mm: add Kernel Electric-Fence infrastructure") Signed-off-by: Muchun Song Tested-by: Marco Elver Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Jann Horn Cc: SeongJae Park Cc: Signed-off-by: Andrew Morton commit 13684e966d46283e0e89b6a4941596dc52b18bf3 Author: Geert Uytterhoeven Date: Wed Mar 15 15:28:17 2023 +0100 lib: dhry: fix unstable smp_processor_id(_) usage When running the in-kernel Dhrystone benchmark with CONFIG_DEBUG_PREEMPT=y: BUG: using smp_processor_id() in preemptible [00000000] code: bash/938 Fix this by not using smp_processor_id() directly, but instead wrapping the whole benchmark inside a get_cpu()/put_cpu() pair. This makes sure the whole benchmark is run on the same CPU core, and the reported values are consistent. Link: https://lkml.kernel.org/r/b0d29932bb24ad82cea7f821e295c898e9657be0.1678890070.git.geert+renesas@glider.be Fixes: d5528cc16893f1f6 ("lib: add Dhrystone benchmark test") Signed-off-by: Geert Uytterhoeven Reported-by: Tobias Klausmann Link: https://bugzilla.kernel.org/show_bug.cgi?id=217179 Signed-off-by: Andrew Morton commit d2e44a50ecebb72257e5deb7ce8d227d7e3f53b9 Author: Enric Balletbo i Serra Date: Tue Mar 14 12:54:55 2023 +0100 mailmap: add entry for Enric Balletbo i Serra Map Enric's old corporate addresses to his kernel.org address. Link: https://lkml.kernel.org/r/20230314115455.188818-1-eballetbo@kernel.org Signed-off-by: Enric Balletbo i Serra Signed-off-by: Andrew Morton commit 9e26240c3bc1cf4895abdd5330a35465b5050109 Author: Konrad Dybcio Date: Tue Mar 14 13:56:03 2023 +0100 mailmap: map Sai Prakash Ranjan's old address to his current one Sai's old email is still picked up by the likes of get_maintainer.pl and keeps bouncing like all other @codeaurora.org addresses. Map it to his current one. Link: https://lkml.kernel.org/r/20230314125604.2734146-1-konrad.dybcio@linaro.org Signed-off-by: Konrad Dybcio Cc: Sai Prakash Ranjan Signed-off-by: Andrew Morton commit 83bd3eeb326bb0b5800573622d18e1c5e4355323 Author: Konrad Dybcio Date: Mon Mar 13 10:03:43 2023 +0100 mailmap: map Rajendra Nayak's old address to his current one Rajendra's old email is still picked up by the likes of get_maintainer.pl and keeps bouncing like all other @codeaurora.org addresses. Map it to his current one. Link: https://lkml.kernel.org/r/20230313090343.2148346-1-konrad.dybcio@linaro.org Signed-off-by: Konrad Dybcio Cc: Rajendra Nayak Cc: Andy Gross Cc: Baolin Wang Cc: Bjorn Andersson Cc: Colin Ian King Cc: Jakub Kicinski Cc: Kirill Tkhai Cc: Marijn Suijten Cc: Qais Yousef Cc: Stephen Hemminger Cc: Vasily Averin Signed-off-by: Andrew Morton commit f446883d12b8bfa486f7c98d403054d61d38c989 Author: Peter Collingbourne Date: Thu Mar 9 20:29:13 2023 -0800 Revert "kasan: drop skip_kasan_poison variable in free_pages_prepare" This reverts commit 487a32ec24be819e747af8c2ab0d5c515508086a. should_skip_kasan_poison() reads the PG_skip_kasan_poison flag from page->flags. However, this line of code in free_pages_prepare(): page->flags &= ~PAGE_FLAGS_CHECK_AT_PREP; clears most of page->flags, including PG_skip_kasan_poison, before calling should_skip_kasan_poison(), which meant that it would never return true as a result of the page flag being set. Therefore, fix the code to call should_skip_kasan_poison() before clearing the flags, as we were doing before the reverted patch. This fixes a measurable performance regression introduced in the reverted commit, where munmap() takes longer than intended if HW tags KASAN is supported and enabled at runtime. Without this patch, we see a single-digit percentage performance regression in a particular mmap()-heavy benchmark when enabling HW tags KASAN, and with the patch, there is no statistically significant performance impact when enabling HW tags KASAN. Link: https://lkml.kernel.org/r/20230310042914.3805818-2-pcc@google.com Fixes: 487a32ec24be ("kasan: drop skip_kasan_poison variable in free_pages_prepare") Link: https://linux-review.googlesource.com/id/Ic4f13affeebd20548758438bb9ed9ca40e312b79 Signed-off-by: Peter Collingbourne Reviewed-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Catalin Marinas [arm64] Cc: Evgenii Stepanov Cc: Vincenzo Frascino Cc: Will Deacon Cc: [6.1] Signed-off-by: Andrew Morton commit cc2a978d28422ca957d14cb25caa72e25c45be1d Author: Tobias Klauser Date: Fri Mar 10 13:35:08 2023 +0100 mailmap: add entry for Tobias Klauser Map my old email addresses to the current address. Link: https://lkml.kernel.org/r/20230310123508.22079-1-tklauser@distanz.ch Signed-off-by: Tobias Klauser Signed-off-by: Andrew Morton commit 90db9dbedd26ce029f3a0f8d2cbd3a142f452408 Author: Marco Elver Date: Mon Feb 27 10:47:27 2023 +0100 kasan, powerpc: don't rename memintrinsics if compiler adds prefixes With appropriate compiler support [1], KASAN builds use __asan prefixed meminstrinsics, and KASAN no longer overrides memcpy/memset/memmove. If compiler support is detected (CC_HAS_KASAN_MEMINTRINSIC_PREFIX), define memintrinsics normally (do not prefix '__'). On powerpc, KASAN is the only user of __mem functions, which are used to define instrumented memintrinsics. Alias the normal versions for KASAN to use in its implementation. Link: https://lore.kernel.org/all/20230224085942.1791837-1-elver@google.com/ [1] Link: https://lore.kernel.org/oe-kbuild-all/202302271348.U5lvmo0S-lkp@intel.com/ Link: https://lkml.kernel.org/r/20230227094726.3833247-1-elver@google.com Signed-off-by: Marco Elver Reported-by: kernel test robot Acked-by: Michael Ellerman [powerpc] Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Christophe Leroy Cc: Daniel Axtens Cc: Dmitry Vyukov Cc: Liam R. Howlett Cc: Nicholas Piggin Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit 6db504ce55bdbc575723938fc480713c9183f6a2 Author: Liam R. Howlett Date: Wed Mar 8 17:03:10 2023 -0500 mm/ksm: fix race with VMA iteration and mm_struct teardown exit_mmap() will tear down the VMAs and maple tree with the mmap_lock held in write mode. Ensure that the maple tree is still valid by checking ksm_test_exit() after taking the mmap_lock in read mode, but before the for_each_vma() iterator dereferences a destroyed maple tree. Since the maple tree is destroyed, the flags telling lockdep to check an external lock has been cleared. Skip the for_each_vma() iterator to avoid dereferencing a maple tree without the external lock flag, which would create a lockdep warning. Link: https://lkml.kernel.org/r/20230308220310.3119196-1-Liam.Howlett@oracle.com Fixes: a5f18ba07276 ("mm/ksm: use vma iterators instead of vma linked list") Signed-off-by: Liam R. Howlett Reported-by: Pengfei Xu Link: https://lore.kernel.org/lkml/ZAdUUhSbaa6fHS36@xpf.sh.intel.com/ Reported-by: syzbot+2ee18845e89ae76342c5@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=64a3e95957cd3deab99df7cd7b5a9475af92c93e Acked-by: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Cc: Signed-off-by: Andrew Morton commit d035230ec9937a9138921d2a0eeb99496ea7eac0 Author: Peter Xu Date: Wed Mar 8 19:04:22 2023 +0000 kselftest: vm: fix unused variable warning Remove unused variable from the MDWE test. [joey.gouly@arm.com: add commit message] Link: https://lkml.kernel.org/r/20230308190423.46491-4-joey.gouly@arm.com Fixes: 4cf1fe34fd18 ("kselftest: vm: add tests for memory-deny-write-execute") Signed-off-by: Peter Xu Signed-off-by: Joey Gouly Acked-by: Catalin Marinas Cc: Alexey Izbyshev Cc: Arnaldo Carvalho de Melo Cc: Kees Cook Cc: nd Cc: Shuah Khan Signed-off-by: Andrew Morton commit 3d27a95b1d96757e48ce970baa3d419af299c2af Author: Joey Gouly Date: Wed Mar 8 19:04:21 2023 +0000 mm: fix error handling for map_deny_write_exec Commit 4a18419f71cd ("mm/mprotect: use mmu_gather") changed 'goto out;' to 'break' in the loop. This wasn't noticed while rebasing the MDWE patches, so fix it now. Link: https://lkml.kernel.org/r/20230308190423.46491-3-joey.gouly@arm.com Fixes: b507808ebce2 ("mm: implement memory-deny-write-execute as a prctl") Signed-off-by: Joey Gouly Reported-by: Alexey Izbyshev Link: https://lore.kernel.org/linux-arm-kernel/8408d8901e9d7ee6b78db4c6cba04b78@ispras.ru/ Reviewed-by: Catalin Marinas Cc: Arnaldo Carvalho de Melo Cc: Kees Cook Cc: nd Cc: Peter Xu Cc: Shuah Khan Signed-off-by: Andrew Morton commit 6bbf1090672673183a98cd6e19de91fa5a319df0 Author: Joey Gouly Date: Wed Mar 8 19:04:20 2023 +0000 mm: deduplicate error handling for map_deny_write_exec Patch series "Fixes for MDWE prctl" These are four small fixes for the recent memory-write-deny-execute prctl patches [1]. Two reported by Alexey about error handling and two tooling fixes by Peter. This patch (of 4): Commit cc8d1b097de7 ("mmap: clean up mmap_region() unrolling") deduplicated the error handling, do the same for the return value of `map_deny_write_exec`. Link: https://lkml.kernel.org/r/20230308190423.46491-1-joey.gouly@arm.com Link: https://lkml.kernel.org/r/20230308190423.46491-2-joey.gouly@arm.com Link: https://lore.kernel.org/linux-arm-kernel/20230119160344.54358-1-joey.gouly@arm.com/ [1] Fixes: b507808ebce2 ("mm: implement memory-deny-write-execute as a prctl") Signed-off-by: Joey Gouly Reported-by: Alexey Izbyshev Link: https://lore.kernel.org/linux-arm-kernel/8408d8901e9d7ee6b78db4c6cba04b78@ispras.ru/ Reviewed-by: Catalin Marinas Cc: Arnaldo Carvalho de Melo Cc: Kees Cook Cc: nd Cc: Peter Xu Cc: Shuah Khan Signed-off-by: Andrew Morton commit 12871a154690c52e2ded718b392a3977c114f6c1 Author: Tiezhu Yang Date: Tue Mar 7 15:59:00 2023 +0800 checksyscalls: ignore fstat to silence build warning on LoongArch fstat is replaced by statx on the new architecture, so an exception is added to the checksyscalls script to silence the following build warning on LoongArch: CALL scripts/checksyscalls.sh :569:2: warning: #warning syscall fstat not implemented [-Wcpp] Link: https://lkml.kernel.org/r/1678175940-20872-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Tiezhu Yang Suggested-by: WANG Xuerui Suggested-by: Arnd Bergmann Reviewed-by: Arnd Bergmann Cc: Huacai Chen Cc: Masahiro Yamada Signed-off-by: Andrew Morton commit 003587000276f81d0114b5ce773d80c119d8cb30 Author: Ryusuke Konishi Date: Tue Mar 7 17:55:48 2023 +0900 nilfs2: fix kernel-infoleak in nilfs_ioctl_wrap_copy() The ioctl helper function nilfs_ioctl_wrap_copy(), which exchanges a metadata array to/from user space, may copy uninitialized buffer regions to user space memory for read-only ioctl commands NILFS_IOCTL_GET_SUINFO and NILFS_IOCTL_GET_CPINFO. This can occur when the element size of the user space metadata given by the v_size member of the argument nilfs_argv structure is larger than the size of the metadata element (nilfs_suinfo structure or nilfs_cpinfo structure) on the file system side. KMSAN-enabled kernels detect this issue as follows: BUG: KMSAN: kernel-infoleak in instrument_copy_to_user include/linux/instrumented.h:121 [inline] BUG: KMSAN: kernel-infoleak in _copy_to_user+0xc0/0x100 lib/usercopy.c:33 instrument_copy_to_user include/linux/instrumented.h:121 [inline] _copy_to_user+0xc0/0x100 lib/usercopy.c:33 copy_to_user include/linux/uaccess.h:169 [inline] nilfs_ioctl_wrap_copy+0x6fa/0xc10 fs/nilfs2/ioctl.c:99 nilfs_ioctl_get_info fs/nilfs2/ioctl.c:1173 [inline] nilfs_ioctl+0x2402/0x4450 fs/nilfs2/ioctl.c:1290 nilfs_compat_ioctl+0x1b8/0x200 fs/nilfs2/ioctl.c:1343 __do_compat_sys_ioctl fs/ioctl.c:968 [inline] __se_compat_sys_ioctl+0x7dd/0x1000 fs/ioctl.c:910 __ia32_compat_sys_ioctl+0x93/0xd0 fs/ioctl.c:910 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0xa2/0x100 arch/x86/entry/common.c:178 do_fast_syscall_32+0x37/0x80 arch/x86/entry/common.c:203 do_SYSENTER_32+0x1f/0x30 arch/x86/entry/common.c:246 entry_SYSENTER_compat_after_hwframe+0x70/0x82 Uninit was created at: __alloc_pages+0x9f6/0xe90 mm/page_alloc.c:5572 alloc_pages+0xab0/0xd80 mm/mempolicy.c:2287 __get_free_pages+0x34/0xc0 mm/page_alloc.c:5599 nilfs_ioctl_wrap_copy+0x223/0xc10 fs/nilfs2/ioctl.c:74 nilfs_ioctl_get_info fs/nilfs2/ioctl.c:1173 [inline] nilfs_ioctl+0x2402/0x4450 fs/nilfs2/ioctl.c:1290 nilfs_compat_ioctl+0x1b8/0x200 fs/nilfs2/ioctl.c:1343 __do_compat_sys_ioctl fs/ioctl.c:968 [inline] __se_compat_sys_ioctl+0x7dd/0x1000 fs/ioctl.c:910 __ia32_compat_sys_ioctl+0x93/0xd0 fs/ioctl.c:910 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0xa2/0x100 arch/x86/entry/common.c:178 do_fast_syscall_32+0x37/0x80 arch/x86/entry/common.c:203 do_SYSENTER_32+0x1f/0x30 arch/x86/entry/common.c:246 entry_SYSENTER_compat_after_hwframe+0x70/0x82 Bytes 16-127 of 3968 are uninitialized ... This eliminates the leak issue by initializing the page allocated as buffer using get_zeroed_page(). Link: https://lkml.kernel.org/r/20230307085548.6290-1-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Reported-by: syzbot+132fdd2f1e1805fdc591@syzkaller.appspotmail.com Link: https://lkml.kernel.org/r/000000000000a5bd2d05f63f04ae@google.com Tested-by: Ryusuke Konishi Cc: Signed-off-by: Andrew Morton commit 4bd6dded6318dc8e2514d74868c1f8fb38b61a60 Author: Liam R. Howlett Date: Tue Mar 7 13:02:47 2023 -0500 test_maple_tree: add more testing for mas_empty_area() Test robust filling of an entire area of the tree, then test one beyond. This is to test the walking back up the tree at the end of nodes and error condition. Test inspired by the reproducer code provided by Snild Dolkow. The last test in the function tests for the case of a corrupted maple state caused by the incorrect limits set during mas_skip_node(). There needs to be a gap in the second last child and last child, but the search must rule out the second last child's gap. This would avoid correcting the maple state to the correct max limit and return an error. Link: https://lkml.kernel.org/r/20230307180247.2220303-3-Liam.Howlett@oracle.com Cc: Snild Dolkow Link: https://lore.kernel.org/linux-mm/cb8dc31a-fef2-1d09-f133-e9f7b9f9e77a@sony.com/ Fixes: e15e06a83923 ("lib/test_maple_tree: add testing for maple tree") Signed-off-by: Liam R. Howlett Cc: Peng Zhang Cc: Signed-off-by: Andrew Morton commit 0fa99fdfe1b38da396d0b2d1496a823bcd0ebea0 Author: Liam R. Howlett Date: Tue Mar 7 13:02:46 2023 -0500 maple_tree: fix mas_skip_node() end slot detection Patch series "Fix mas_skip_node() for mas_empty_area()", v2. mas_empty_area() was incorrectly returning an error when there was room. The issue was tracked down to mas_skip_node() using the incorrect end-of-slot count. Instead of using the nodes hard limit, the limit of data should be used. mas_skip_node() was also setting the min and max to that of the child node, which was unnecessary. Within these limits being set, there was also a bug that corrupted the maple state's max if the offset was set to the maximum node pivot. The bug was without consequence unless there was a sufficient gap in the next child node which would cause an error to be returned. This patch set fixes these errors by removing the limit setting from mas_skip_node() and uses the mas_data_end() for slot limits, and adds tests for all failures discovered. This patch (of 2): mas_skip_node() is used to move the maple state to the node with a higher limit. It does this by walking up the tree and increasing the slot count. Since slot count may not be able to be increased, it may need to walk up multiple times to find room to walk right to a higher limit node. The limit of slots that was being used was the node limit and not the last location of data in the node. This would cause the maple state to be shifted outside actual data and enter an error state, thus returning -EBUSY. The result of the incorrect error state means that mas_awalk() would return an error instead of finding the allocation space. The fix is to use mas_data_end() in mas_skip_node() to detect the nodes data end point and continue walking the tree up until it is safe to move to a node with a higher limit. The walk up the tree also sets the maple state limits so remove the buggy code from mas_skip_node(). Setting the limits had the unfortunate side effect of triggering another bug if the parent node was full and the there was no suitable gap in the second last child, but room in the next child. mas_skip_node() may also be passed a maple state in an error state from mas_anode_descend() when no allocations are available. Return on such an error state immediately. Link: https://lkml.kernel.org/r/20230307180247.2220303-1-Liam.Howlett@oracle.com Link: https://lkml.kernel.org/r/20230307180247.2220303-2-Liam.Howlett@oracle.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Liam R. Howlett Reported-by: Snild Dolkow Link: https://lore.kernel.org/linux-mm/cb8dc31a-fef2-1d09-f133-e9f7b9f9e77a@sony.com/ Tested-by: Snild Dolkow Cc: Peng Zhang Cc: Signed-off-by: Andrew Morton commit e9c3cda4d86e56bf7fe403729f38c4f0f65d3860 Author: Michal Hocko Date: Mon Mar 6 09:15:17 2023 +0100 mm, vmalloc: fix high order __GFP_NOFAIL allocations Gao Xiang has reported that the page allocator complains about high order __GFP_NOFAIL request coming from the vmalloc core: __alloc_pages+0x1cb/0x5b0 mm/page_alloc.c:5549 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2286 vm_area_alloc_pages mm/vmalloc.c:2989 [inline] __vmalloc_area_node mm/vmalloc.c:3057 [inline] __vmalloc_node_range+0x978/0x13c0 mm/vmalloc.c:3227 kvmalloc_node+0x156/0x1a0 mm/util.c:606 kvmalloc include/linux/slab.h:737 [inline] kvmalloc_array include/linux/slab.h:755 [inline] kvcalloc include/linux/slab.h:760 [inline] it seems that I have completely missed high order allocation backing vmalloc areas case when implementing __GFP_NOFAIL support. This means that [k]vmalloc at al. can allocate higher order allocations with __GFP_NOFAIL which can trigger OOM killer for non-costly orders easily or cause a lot of reclaim/compaction activity if those requests cannot be satisfied. Fix the issue by falling back to zero order allocations for __GFP_NOFAIL requests if the high order request fails. Link: https://lkml.kernel.org/r/ZAXynvdNqcI0f6Us@dhcp22.suse.cz Fixes: 9376130c390a ("mm/vmalloc: add support for __GFP_NOFAIL") Reported-by: Gao Xiang Link: https://lkml.kernel.org/r/20230305053035.1911-1-hsiangkao@linux.alibaba.com Signed-off-by: Michal Hocko Reviewed-by: Uladzislau Rezki (Sony) Acked-by: Vlastimil Babka Cc: Baoquan He Cc: Christoph Hellwig Cc: Mel Gorman Signed-off-by: Andrew Morton commit 1b4ae19e432dfec785d980993c09593cbb182754 Merge: 2e63a2dfe73fd 915efd8a446b7 Author: Jakub Kicinski Date: Thu Mar 23 16:03:33 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-03-23 We've added 8 non-merge commits during the last 13 day(s) which contain a total of 21 files changed, 238 insertions(+), 161 deletions(-). The main changes are: 1) Fix verification issues in some BPF programs due to their stack usage patterns, from Eduard Zingerman. 2) Fix to add missing overflow checks in xdp_umem_reg and return an error in such case, from Kal Conley. 3) Fix and undo poisoning of strlcpy in libbpf given it broke builds for libcs which provided the former like uClibc-ng, from Jesus Sanchez-Palencia. 4) Fix insufficient bpf_jit_limit default to avoid users running into hard to debug seccomp BPF errors, from Daniel Borkmann. 5) Fix driver return code when they don't support a bpf_xdp_metadata kfunc to make it unambiguous from other errors, from Jesper Dangaard Brouer. 6) Two BPF selftest fixes to address compilation errors from recent changes in kernel structures, from Alexei Starovoitov. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: xdp: bpf_xdp_metadata use EOPNOTSUPP for no driver support bpf: Adjust insufficient default bpf_jit_limit xsk: Add missing overflow check in xdp_umem_reg selftests/bpf: Fix progs/test_deny_namespace.c issues. selftests/bpf: Fix progs/find_vma_fail1.c build error. libbpf: Revert poisoning of strlcpy selftests/bpf: Tests for uninitialized stack reads bpf: Allow reads from uninit stack ==================== Link: https://lore.kernel.org/r/20230323225221.6082-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 2e63a2dfe73fd00e48b615ef1274a44299f57c5f Merge: 4f44d3260536a bce5640520111 Author: Jakub Kicinski Date: Thu Mar 23 15:56:20 2023 -0700 Merge tag 'for-net-2023-03-23' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - Fix MGMT add advmon with RSSI command - L2CAP: Fix responding with wrong PDU type - Fix race condition in hci_cmd_sync_clear - ISO: Fix timestamped HCI ISO data packet parsing - HCI: Fix global-out-of-bounds - hci_sync: Resume adv with no RPA when active scan * tag 'for-net-2023-03-23' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: HCI: Fix global-out-of-bounds Bluetooth: mgmt: Fix MGMT add advmon with RSSI command Bluetooth: btsdio: fix use after free bug in btsdio_remove due to unfinished work Bluetooth: L2CAP: Fix responding with wrong PDU type Bluetooth: btqcomsmd: Fix command timeout after setting BD address Bluetooth: btinel: Check ACPI handle for NULL before accessing Bluetooth: Remove "Power-on" check from Mesh feature Bluetooth: Fix race condition in hci_cmd_sync_clear Bluetooth: btintel: Iterate only bluetooth device ACPI entries Bluetooth: ISO: fix timestamped HCI ISO data packet parsing Bluetooth: btusb: Remove detection of ISO packets over bulk Bluetooth: hci_core: Detect if an ACL packet is in fact an ISO packet Bluetooth: hci_sync: Resume adv with no RPA when active scan ==================== Link: https://lore.kernel.org/r/20230323202335.3380841-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit 4f44d3260536a754fcbf36f47f965147fa59a70c Merge: b1de5c78ebe98 f355f70145744 Author: Jakub Kicinski Date: Thu Mar 23 15:47:53 2023 -0700 Merge tag 'wireless-2023-03-23' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Kalle Valo says: ==================== wireless fixes for v6.3 Third set of fixes for v6.3. mt76 has two kernel crash fixes and adding back 160 MHz channel support for mt7915. mac80211 has fixes for a race in transmit path and two mesh related fixes. iwlwifi also has fixes for races. * tag 'wireless-2023-03-23' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: mac80211: fix mesh path discovery based on unicast packets wifi: mac80211: fix qos on mesh interfaces wifi: iwlwifi: mvm: protect TXQ list manipulation wifi: iwlwifi: mvm: fix mvmtxq->stopped handling wifi: mac80211: Serialize ieee80211_handle_wake_tx_queue() wifi: mwifiex: mark OF related data as maybe unused wifi: mt76: connac: do not check WED status for non-mmio devices wifi: mt76: mt7915: add back 160MHz channel width support for MT7915 wifi: mt76: do not run mt76_unregister_device() on unregistered hw ==================== Link: https://lore.kernel.org/r/20230323110332.C4FE4C433D2@smtp.kernel.org Signed-off-by: Jakub Kicinski commit 1e760fa3596e8c7f08412712c168288b79670d78 Merge: 9fd6ba5420ba2 260595b439776 Author: Linus Torvalds Date: Thu Mar 23 15:25:49 2023 -0700 Merge tag 'gfs2-v6.3-rc3-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 fix from Andreas Gruenbacher: - Reinstate commit 970343cd4904 ("GFS2: free disk inode which is deleted by remote node -V2") as reverting that commit could cause gfs2_put_super() to hang. * tag 'gfs2-v6.3-rc3-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: Reinstate "GFS2: free disk inode which is deleted by remote node -V2" commit bce56405201111807cc8e4f47c6de3e10b17c1ac Author: Sungwoo Kim Date: Mon Mar 20 21:50:18 2023 -0400 Bluetooth: HCI: Fix global-out-of-bounds To loop a variable-length array, hci_init_stage_sync(stage) considers that stage[i] is valid as long as stage[i-1].func is valid. Thus, the last element of stage[].func should be intentionally invalid as hci_init0[], le_init2[], and others did. However, amp_init1[] and amp_init2[] have no invalid element, letting hci_init_stage_sync() keep accessing amp_init1[] over its valid range. This patch fixes this by adding {} in the last of amp_init1[] and amp_init2[]. ================================================================== BUG: KASAN: global-out-of-bounds in hci_dev_open_sync ( /v6.2-bzimage/net/bluetooth/hci_sync.c:3154 /v6.2-bzimage/net/bluetooth/hci_sync.c:3343 /v6.2-bzimage/net/bluetooth/hci_sync.c:4418 /v6.2-bzimage/net/bluetooth/hci_sync.c:4609 /v6.2-bzimage/net/bluetooth/hci_sync.c:4689) Read of size 8 at addr ffffffffaed1ab70 by task kworker/u5:0/1032 CPU: 0 PID: 1032 Comm: kworker/u5:0 Not tainted 6.2.0 #3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04 Workqueue: hci1 hci_power_on Call Trace: dump_stack_lvl (/v6.2-bzimage/lib/dump_stack.c:107 (discriminator 1)) print_report (/v6.2-bzimage/mm/kasan/report.c:307 /v6.2-bzimage/mm/kasan/report.c:417) ? hci_dev_open_sync (/v6.2-bzimage/net/bluetooth/hci_sync.c:3154 /v6.2-bzimage/net/bluetooth/hci_sync.c:3343 /v6.2-bzimage/net/bluetooth/hci_sync.c:4418 /v6.2-bzimage/net/bluetooth/hci_sync.c:4609 /v6.2-bzimage/net/bluetooth/hci_sync.c:4689) kasan_report (/v6.2-bzimage/mm/kasan/report.c:184 /v6.2-bzimage/mm/kasan/report.c:519) ? hci_dev_open_sync (/v6.2-bzimage/net/bluetooth/hci_sync.c:3154 /v6.2-bzimage/net/bluetooth/hci_sync.c:3343 /v6.2-bzimage/net/bluetooth/hci_sync.c:4418 /v6.2-bzimage/net/bluetooth/hci_sync.c:4609 /v6.2-bzimage/net/bluetooth/hci_sync.c:4689) hci_dev_open_sync (/v6.2-bzimage/net/bluetooth/hci_sync.c:3154 /v6.2-bzimage/net/bluetooth/hci_sync.c:3343 /v6.2-bzimage/net/bluetooth/hci_sync.c:4418 /v6.2-bzimage/net/bluetooth/hci_sync.c:4609 /v6.2-bzimage/net/bluetooth/hci_sync.c:4689) ? __pfx_hci_dev_open_sync (/v6.2-bzimage/net/bluetooth/hci_sync.c:4635) ? mutex_lock (/v6.2-bzimage/./arch/x86/include/asm/atomic64_64.h:190 /v6.2-bzimage/./include/linux/atomic/atomic-long.h:443 /v6.2-bzimage/./include/linux/atomic/atomic-instrumented.h:1781 /v6.2-bzimage/kernel/locking/mutex.c:171 /v6.2-bzimage/kernel/locking/mutex.c:285) ? __pfx_mutex_lock (/v6.2-bzimage/kernel/locking/mutex.c:282) hci_power_on (/v6.2-bzimage/net/bluetooth/hci_core.c:485 /v6.2-bzimage/net/bluetooth/hci_core.c:984) ? __pfx_hci_power_on (/v6.2-bzimage/net/bluetooth/hci_core.c:969) ? read_word_at_a_time (/v6.2-bzimage/./include/asm-generic/rwonce.h:85) ? strscpy (/v6.2-bzimage/./arch/x86/include/asm/word-at-a-time.h:62 /v6.2-bzimage/lib/string.c:161) process_one_work (/v6.2-bzimage/kernel/workqueue.c:2294) worker_thread (/v6.2-bzimage/./include/linux/list.h:292 /v6.2-bzimage/kernel/workqueue.c:2437) ? __pfx_worker_thread (/v6.2-bzimage/kernel/workqueue.c:2379) kthread (/v6.2-bzimage/kernel/kthread.c:376) ? __pfx_kthread (/v6.2-bzimage/kernel/kthread.c:331) ret_from_fork (/v6.2-bzimage/arch/x86/entry/entry_64.S:314) The buggy address belongs to the variable: amp_init1+0x30/0x60 The buggy address belongs to the physical page: page:000000003a157ec6 refcount:1 mapcount:0 mapping:0000000000000000 ia flags: 0x200000000001000(reserved|node=0|zone=2) raw: 0200000000001000 ffffea0005054688 ffffea0005054688 000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffffffffaed1aa00: f9 f9 f9 f9 00 00 00 00 f9 f9 f9 f9 00 00 00 00 ffffffffaed1aa80: 00 00 00 00 f9 f9 f9 f9 00 00 00 00 00 00 00 00 >ffffffffaed1ab00: 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 00 f9 f9 ^ ffffffffaed1ab80: f9 f9 f9 f9 00 00 00 00 f9 f9 f9 f9 00 00 00 f9 ffffffffaed1ac00: f9 f9 f9 f9 00 06 f9 f9 f9 f9 f9 f9 00 00 02 f9 This bug is found by FuzzBT, a modified version of Syzkaller. Other contributors for this bug are Ruoyu Wu and Peng Hui. Fixes: d0b137062b2d ("Bluetooth: hci_sync: Rework init stages") Signed-off-by: Sungwoo Kim Reviewed-by: Simon Horman Signed-off-by: Luiz Augusto von Dentz commit 1a0291f81529e8044fb29845a0196ba47af894ce Author: Howard Chung Date: Thu Mar 16 18:11:38 2023 +0800 Bluetooth: mgmt: Fix MGMT add advmon with RSSI command The MGMT command: MGMT_OP_ADD_ADV_PATTERNS_MONITOR_RSSI uses variable length argument. This causes host not able to register advmon with rssi. This patch has been locally tested by adding monitor with rssi via btmgmt on a kernel 6.1 machine. Reviewed-by: Archie Pusaka Fixes: b338d91703fa ("Bluetooth: Implement support for Mesh") Signed-off-by: Howard Chung Signed-off-by: Luiz Augusto von Dentz commit 1e9ac114c4428fdb7ff4635b45d4f46017e8916f Author: Zheng Wang Date: Thu Mar 9 16:07:39 2023 +0800 Bluetooth: btsdio: fix use after free bug in btsdio_remove due to unfinished work In btsdio_probe, &data->work was bound with btsdio_work.In btsdio_send_frame, it was started by schedule_work. If we call btsdio_remove with an unfinished job, there may be a race condition and cause UAF bug on hdev. Fixes: ddbaf13e3609 ("[Bluetooth] Add generic driver for Bluetooth SDIO devices") Signed-off-by: Zheng Wang Signed-off-by: Luiz Augusto von Dentz commit 9aa9d9473f1550d1936c31259720b3f1f4690576 Author: Luiz Augusto von Dentz Date: Wed Mar 8 14:20:34 2023 -0800 Bluetooth: L2CAP: Fix responding with wrong PDU type L2CAP_ECRED_CONN_REQ shall be responded with L2CAP_ECRED_CONN_RSP not L2CAP_LE_CONN_RSP: L2CAP LE EATT Server - Reject - run Listening for connections New client connection with handle 0x002a Sending L2CAP Request from client Client received response code 0x15 Unexpected L2CAP response code (expected 0x18) L2CAP LE EATT Server - Reject - test failed > ACL Data RX: Handle 42 flags 0x02 dlen 26 LE L2CAP: Enhanced Credit Connection Request (0x17) ident 1 len 18 PSM: 39 (0x0027) MTU: 64 MPS: 64 Credits: 5 Source CID: 65 Source CID: 66 Source CID: 67 Source CID: 68 Source CID: 69 < ACL Data TX: Handle 42 flags 0x00 dlen 16 LE L2CAP: LE Connection Response (0x15) ident 1 len 8 invalid size 00 00 00 00 00 00 06 00 L2CAP LE EATT Server - Reject - run Listening for connections New client connection with handle 0x002a Sending L2CAP Request from client Client received response code 0x18 L2CAP LE EATT Server - Reject - test passed Fixes: 15f02b910562 ("Bluetooth: L2CAP: Add initial code for Enhanced Credit Based Mode") Signed-off-by: Luiz Augusto von Dentz commit 5d44ab9e204200a78ad55cdf185aa2bb109b5950 Author: Stephan Gerhold Date: Wed Mar 8 14:31:55 2023 +0100 Bluetooth: btqcomsmd: Fix command timeout after setting BD address On most devices using the btqcomsmd driver (e.g. the DragonBoard 410c and other devices based on the Qualcomm MSM8916/MSM8909/... SoCs) the Bluetooth firmware seems to become unresponsive for a while after setting the BD address. On recent kernel versions (at least 5.17+) this often causes timeouts for subsequent commands, e.g. the HCI reset sent by the Bluetooth core during initialization: Bluetooth: hci0: Opcode 0x c03 failed: -110 Unfortunately this behavior does not seem to be documented anywhere. Experimentation suggests that the minimum necessary delay to avoid the problem is ~150us. However, to be sure add a sleep for > 1ms in case it is a bit longer on other firmware versions. Older kernel versions are likely also affected, although perhaps with slightly different errors or less probability. Side effects can easily hide the issue in most cases, e.g. unrelated incoming interrupts that cause the necessary delay. Fixes: 1511cc750c3d ("Bluetooth: Introduce Qualcomm WCNSS SMD based HCI driver") Signed-off-by: Stephan Gerhold Signed-off-by: Luiz Augusto von Dentz commit 902160cdb2bf4d23cd75f43ed0597ddf0134bb89 Author: Kiran K Date: Wed Mar 8 13:28:37 2023 +0530 Bluetooth: btinel: Check ACPI handle for NULL before accessing Older platforms and Virtual platforms which doesn't have support for bluetooth device in ACPI firmware will not have valid ACPI handle. Check for validity of handle before accessing. dmesg log from simics environment (virtual platform): BUG: unable to handle kernel NULL pointer dereference at 0000000000000018 IP: acpi_ns_walk_namespace+0x5c/0x278 PGD 0 P4D 0 Oops: 0000 [#1] SMP PTI Modules linked in: bnep intel_powerclamp coretemp kvm_intel kvm irqbypass intel_cstate input_leds joydev serio_raw mac_hid btusb(OE) btintel(OE) bluetooth(OE) lpc_ich compat(OE) ecdh_generic i7core_edac i5500_temp shpchp binfmt_misc sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 hid_generic usbhid hid e1000e psmouse ahci pata_acpi libahci ptp pps_core floppy CPU: 0 PID: 35 Comm: kworker/u3:0 Tainted: G OE 4.15.0-140-generic #144-Ubuntu Hardware name: Simics Simics, BIOS Simics 01/01/2011 Workqueue: hci0 hci_power_on [bluetooth] RIP: 0010:acpi_ns_walk_namespace+0x5c/0x278 RSP: 0000:ffffaa9c0049bba8 EFLAGS: 00010246 RAX: 0000000000000001 RBX: 0000000000001001 RCX: 0000000000000010 RDX: ffffffff92ea7e27 RSI: ffffffff92ea7e10 RDI: 00000000000000c8 RBP: ffffaa9c0049bbf8 R08: 0000000000000000 R09: ffffffffc05b39d0 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000001 R13: 0000000000000000 R14: ffffffffc05b39d0 R15: ffffaa9c0049bc70 FS: 0000000000000000(0000) GS:ffff8be73fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000018 CR3: 0000000075f0e000 CR4: 00000000000006f0 Fixes: 294d749b5df5 ("Bluetooth: btintel: Iterate only bluetooth device ACPI entries") Signed-off-by: Kiran K Signed-off-by: Luiz Augusto von Dentz commit e89c2e815e76471cb507bd95728bf26da7976430 Author: Nathan Chancellor Date: Mon Mar 13 16:00:23 2023 -0700 riscv: Handle zicsr/zifencei issues between clang and binutils There are two related issues that appear in certain combinations with clang and GNU binutils. The first occurs when a version of clang that supports zicsr or zifencei via '-march=' [1] (i.e, >= 17.x) is used in combination with a version of GNU binutils that do not recognize zicsr and zifencei in the '-march=' value (i.e., < 2.36): riscv64-linux-gnu-ld: -march=rv64i2p0_m2p0_a2p0_c2p0_zicsr2p0_zifencei2p0: Invalid or unknown z ISA extension: 'zifencei' riscv64-linux-gnu-ld: failed to merge target specific data of file fs/efivarfs/file.o riscv64-linux-gnu-ld: -march=rv64i2p0_m2p0_a2p0_c2p0_zicsr2p0_zifencei2p0: Invalid or unknown z ISA extension: 'zifencei' riscv64-linux-gnu-ld: failed to merge target specific data of file fs/efivarfs/super.o The second occurs when a version of clang that does not support zicsr or zifencei via '-march=' (i.e., <= 16.x) is used in combination with a version of GNU as that defaults to a newer ISA base spec, which requires specifying zicsr and zifencei in the '-march=' value explicitly (i.e, >= 2.38): ../arch/riscv/kernel/kexec_relocate.S: Assembler messages: ../arch/riscv/kernel/kexec_relocate.S:147: Error: unrecognized opcode `fence.i', extension `zifencei' required clang-12: error: assembler command failed with exit code 1 (use -v to see invocation) This is the same issue addressed by commit 6df2a016c0c8 ("riscv: fix build with binutils 2.38") (see [2] for additional information) but older versions of clang miss out on it because the cc-option check fails: clang-12: error: invalid arch name 'rv64imac_zicsr_zifencei', unsupported standard user-level extension 'zicsr' clang-12: error: invalid arch name 'rv64imac_zicsr_zifencei', unsupported standard user-level extension 'zicsr' To resolve the first issue, only attempt to add zicsr and zifencei to the march string when using the GNU assembler 2.38 or newer, which is when the default ISA spec was updated, requiring these extensions to be specified explicitly. LLVM implements an older version of the base specification for all currently released versions, so these instructions are available as part of the 'i' extension. If LLVM's implementation is updated in the future, a CONFIG_AS_IS_LLVM condition can be added to CONFIG_TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI. To resolve the second issue, use version 2.2 of the base ISA spec when using an older version of clang that does not support zicsr or zifencei via '-march=', as that is the spec version most compatible with the one clang/LLVM implements and avoids the need to specify zicsr and zifencei explicitly due to still being a part of 'i'. [1]: https://github.com/llvm/llvm-project/commit/22e199e6afb1263c943c0c0d4498694e15bf8a16 [2]: https://lore.kernel.org/ZAxT7T9Xy1Fo3d5W@aurel32.net/ Cc: stable@vger.kernel.org Link: https://github.com/ClangBuiltLinux/linux/issues/1808 Co-developed-by: Conor Dooley Signed-off-by: Conor Dooley Signed-off-by: Nathan Chancellor Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20230313-riscv-zicsr-zifencei-fiasco-v1-1-dd1b7840a551@kernel.org Signed-off-by: Palmer Dabbelt commit 943d045a6d796175e5d08f9973953b1d2c07d797 Author: Siddharth Kawar Date: Mon Mar 20 20:37:40 2023 +0000 SUNRPC: fix shutdown of NFS TCP client socket NFS server Duplicate Request Cache (DRC) algorithms rely on NFS clients reconnecting using the same local TCP port. Unique NFS operations are identified by the per-TCP connection set of XIDs. This prevents file corruption when non-idempotent NFS operations are retried. Currently, NFS client TCP connections are using different local TCP ports when reconnecting to NFS servers. After an NFS server initiates shutdown of the TCP connection, the NFS client's TCP socket is set to NULL after the socket state has reached TCP_LAST_ACK(9). When reconnecting, the new socket attempts to reuse the same local port but fails with EADDRNOTAVAIL (99). This forces the socket to use a different local TCP port to reconnect to the remote NFS server. State Transition and Events: TCP_CLOSE_WAIT(8) TCP_LAST_ACK(9) connect(fail EADDRNOTAVAIL(99)) TCP_CLOSE(7) bind on new port connect success dmesg excerpts showing reconnect switching from TCP local port of 926 to 763 after commit 7c81e6a9d75b: [13354.947854] NFS call mkdir testW ... [13405.654781] RPC: xs_tcp_state_change client 00000000037d0f03... [13405.654813] RPC: state 8 conn 1 dead 0 zapped 1 sk_shutdown 1 [13405.654826] RPC: xs_data_ready... [13405.654892] RPC: xs_tcp_state_change client 00000000037d0f03... [13405.654895] RPC: state 9 conn 0 dead 0 zapped 1 sk_shutdown 3 [13405.654899] RPC: xs_tcp_state_change client 00000000037d0f03... [13405.654900] RPC: state 9 conn 0 dead 0 zapped 1 sk_shutdown 3 [13405.654950] RPC: xs_connect scheduled xprt 00000000037d0f03 [13405.654975] RPC: xs_bind 0.0.0.0:926: ok (0) [13405.654980] RPC: worker connecting xprt 00000000037d0f03 via tcp to 10.101.6.228 (port 2049) [13405.654991] RPC: 00000000037d0f03 connect status 99 connected 0 sock state 7 [13405.655001] RPC: xs_tcp_state_change client 00000000037d0f03... [13405.655002] RPC: state 7 conn 0 dead 0 zapped 1 sk_shutdown 3 [13405.655024] RPC: xs_connect scheduled xprt 00000000037d0f03 [13405.655038] RPC: xs_bind 0.0.0.0:763: ok (0) [13405.655041] RPC: worker connecting xprt 00000000037d0f03 via tcp to 10.101.6.228 (port 2049) [13405.655065] RPC: 00000000037d0f03 connect status 115 connected 0 sock state 2 State Transition and Events with patch applied: TCP_CLOSE_WAIT(8) TCP_LAST_ACK(9) TCP_CLOSE(7) connect(reuse of port succeeds) dmesg excerpts showing reconnect on same TCP local port of 936 with patch applied: [ 257.139935] NFS: mkdir(0:59/560857152), testQ [ 257.139937] NFS call mkdir testQ ... [ 307.822702] RPC: state 8 conn 1 dead 0 zapped 1 sk_shutdown 1 [ 307.822714] RPC: xs_data_ready... [ 307.822817] RPC: xs_tcp_state_change client 00000000ce702f14... [ 307.822821] RPC: state 9 conn 0 dead 0 zapped 1 sk_shutdown 3 [ 307.822825] RPC: xs_tcp_state_change client 00000000ce702f14... [ 307.822826] RPC: state 9 conn 0 dead 0 zapped 1 sk_shutdown 3 [ 307.823606] RPC: xs_tcp_state_change client 00000000ce702f14... [ 307.823609] RPC: state 7 conn 0 dead 0 zapped 1 sk_shutdown 3 [ 307.823629] RPC: xs_tcp_state_change client 00000000ce702f14... [ 307.823632] RPC: state 7 conn 0 dead 0 zapped 1 sk_shutdown 3 [ 307.823676] RPC: xs_connect scheduled xprt 00000000ce702f14 [ 307.823704] RPC: xs_bind 0.0.0.0:936: ok (0) [ 307.823709] RPC: worker connecting xprt 00000000ce702f14 via tcp to 10.101.1.30 (port 2049) [ 307.823748] RPC: 00000000ce702f14 connect status 115 connected 0 sock state 2 ... [ 314.916193] RPC: state 7 conn 0 dead 0 zapped 1 sk_shutdown 3 [ 314.916251] RPC: xs_connect scheduled xprt 00000000ce702f14 [ 314.916282] RPC: xs_bind 0.0.0.0:936: ok (0) [ 314.916292] RPC: worker connecting xprt 00000000ce702f14 via tcp to 10.101.1.30 (port 2049) [ 314.916342] RPC: 00000000ce702f14 connect status 115 connected 0 sock state 2 Fixes: 7c81e6a9d75b ("SUNRPC: Tweak TCP socket shutdown in the RPC client") Signed-off-by: Siddharth Rajendra Kawar Signed-off-by: Anna Schumaker commit f915da0f0dfb69ffea53f62101b38073e0b81f73 Merge: 9d2789ac9d60c aa01c67de5926 Author: Jens Axboe Date: Thu Mar 23 13:02:20 2023 -0600 Merge tag 'nvme-6.3-2023-03-23' of git://git.infradead.org/nvme into block-6.3 Pull NVMe fixes from Christoph: "nvme fixes for Linux 6.3 - send Identify with CNS 06h only to I/O controllers (Martin George) - fix nvme_tcp_term_pdu to match spec (Caleb Sander)" * tag 'nvme-6.3-2023-03-23' of git://git.infradead.org/nvme: nvme-tcp: fix nvme_tcp_term_pdu to match spec nvme: send Identify with CNS 06h only to I/O controllers commit 260595b439776c473cc248f0de63fe78d964d849 Author: Bob Peterson Date: Thu Mar 23 12:26:02 2023 -0400 Reinstate "GFS2: free disk inode which is deleted by remote node -V2" It turns out that reverting commit 970343cd4904 ("GFS2: free disk inode which is deleted by remote node -V2") causes a regression related to evicting inodes that were unlinked on a different cluster node. We could also have simply added a call to d_mark_dontcache() to function gfs2_try_evict(), but the original pre-revert code is better tested and proven. This reverts commit 445cb1277e10d7e19b631ef8a64aa3f055df377d. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 5021383242ada277a38bd052a4c12ed4707faccb Author: Fabrice Gasnier Date: Wed Mar 15 15:44:33 2023 +0100 usb: dwc2: fix a race, don't power off/on phy for dual-role mode When in dual role mode (dr_mode == USB_DR_MODE_OTG), platform probe successively basically calls: - dwc2_gadget_init() - dwc2_hcd_init() - dwc2_lowlevel_hw_disable() since recent change [1] - usb_add_gadget_udc() The PHYs (and so the clocks it may provide) shouldn't be disabled for all SoCs, in OTG mode, as the HCD part has been initialized. On STM32 this creates some weird race condition upon boot, when: - initially attached as a device, to a HOST - and there is a gadget script invoked to setup the device part. Below issue becomes systematic, as long as the gadget script isn't started by userland: the hardware PHYs (and so the clocks provided by the PHYs) remains disabled. It ends up in having an endless interrupt storm, before the watchdog resets the platform. [ 16.924163] dwc2 49000000.usb-otg: EPs: 9, dedicated fifos, 952 entries in SPRAM [ 16.962704] dwc2 49000000.usb-otg: DWC OTG Controller [ 16.966488] dwc2 49000000.usb-otg: new USB bus registered, assigned bus number 2 [ 16.974051] dwc2 49000000.usb-otg: irq 77, io mem 0x49000000 [ 17.032170] hub 2-0:1.0: USB hub found [ 17.042299] hub 2-0:1.0: 1 port detected [ 17.175408] dwc2 49000000.usb-otg: Mode Mismatch Interrupt: currently in Host mode [ 17.181741] dwc2 49000000.usb-otg: Mode Mismatch Interrupt: currently in Host mode [ 17.189303] dwc2 49000000.usb-otg: Mode Mismatch Interrupt: currently in Host mode ... The host part is also not functional, until the gadget part is configured. The HW may only be disabled for peripheral mode (original init), e.g. dr_mode == USB_DR_MODE_PERIPHERAL, until the gadget driver initializes. But when in USB_DR_MODE_OTG, the HW should remain enabled, as the HCD part is able to run, while the gadget part isn't necessarily configured. I don't fully get the of purpose the original change, that claims disabling the hardware is missing. It creates conditions on SOCs using the PHY initialization to be completely non working in OTG mode. Original change [1] should be reworked to be platform specific. [1] https://lore.kernel.org/r/20221206-dwc2-gadget-dual-role-v1-2-36515e1092cd@theobroma-systems.com Fixes: ade23d7b7ec5 ("usb: dwc2: power on/off phy for peripheral mode in dual-role mode") Cc: stable Signed-off-by: Fabrice Gasnier Reviewed-by: Quentin Schulz Tested-by: Quentin Schulz Link: https://lore.kernel.org/r/20230315144433.3095859-1-fabrice.gasnier@foss.st.com Signed-off-by: Greg Kroah-Hartman commit f747313249b74f323ddf841a9c8db14d989f296a Author: Fabrice Gasnier Date: Thu Mar 16 09:41:27 2023 +0100 usb: dwc2: fix a devres leak in hw_enable upon suspend resume Each time the platform goes to low power, PM suspend / resume routines call: __dwc2_lowlevel_hw_enable -> devm_add_action_or_reset(). This adds a new devres each time. This may also happen at runtime, as dwc2_lowlevel_hw_enable() can be called from udc_start(). This can be seen with tracing: - echo 1 > /sys/kernel/debug/tracing/events/dev/devres_log/enable - go to low power - cat /sys/kernel/debug/tracing/trace A new "ADD" entry is found upon each low power cycle: ... devres_log: 49000000.usb-otg ADD 82a13bba devm_action_release (8 bytes) ... devres_log: 49000000.usb-otg ADD 49889daf devm_action_release (8 bytes) ... A second issue is addressed here: - regulator_bulk_enable() is called upon each PM cycle (suspend/resume). - regulator_bulk_disable() never gets called. So the reference count for these regulators constantly increase, by one upon each low power cycle, due to missing regulator_bulk_disable() call in __dwc2_lowlevel_hw_disable(). The original fix that introduced the devm_add_action_or_reset() call, fixed an issue during probe, that happens due to other errors in dwc2_driver_probe() -> dwc2_core_reset(). Then the probe fails without disabling regulators, when dr_mode == USB_DR_MODE_PERIPHERAL. Rather fix the error path: disable all the low level hardware in the error path, by using the "hsotg->ll_hw_enabled" flag. Checking dr_mode has been introduced to avoid a dual call to dwc2_lowlevel_hw_disable(). "ll_hw_enabled" should achieve the same (and is used currently in the remove() routine). Fixes: 54c196060510 ("usb: dwc2: Always disable regulators on driver teardown") Fixes: 33a06f1300a7 ("usb: dwc2: Fix error path in gadget registration") Cc: stable Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20230316084127.126084-1-fabrice.gasnier@foss.st.com Signed-off-by: Greg Kroah-Hartman commit 9fd6ba5420ba2b637d1ecc6de8613ec8b9c87e5a Merge: fff5a5e7f528b 88b170088ad2c Author: Linus Torvalds Date: Thu Mar 23 11:05:08 2023 -0700 Merge tag 'zonefs-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs Pull zonefs fixes from Damien Le Moal: - Silence a false positive smatch warning about an uninitialized variable - Fix an error message to provide more useful information about invalid zone append write results * tag 'zonefs-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs: zonefs: Fix error message in zonefs_file_dio_append() zonefs: Prevent uninitialized symbol 'size' warning commit 451b15ed138ec15bffbebb58a00ebdd884c3e659 Author: Xu Yang Date: Fri Mar 17 14:15:16 2023 +0800 usb: chipidea: core: fix possible concurrent when switch role The user may call role_store() when driver is handling ci_handle_id_switch() which is triggerred by otg event or power lost event. Unfortunately, the controller may go into chaos in this case. Fix this by protecting it with mutex lock. Fixes: a932a8041ff9 ("usb: chipidea: core: add sysfs group") cc: Acked-by: Peter Chen Signed-off-by: Xu Yang Link: https://lore.kernel.org/r/20230317061516.2451728-2-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman commit 3670de80678961eda7fa2220883fc77c16868951 Author: Xu Yang Date: Fri Mar 17 14:15:15 2023 +0800 usb: chipdea: core: fix return -EINVAL if request role is the same with current role It should not return -EINVAL if the request role is the same with current role, return non-error and without do anything instead. Fixes: a932a8041ff9 ("usb: chipidea: core: add sysfs group") cc: Acked-by: Peter Chen Signed-off-by: Xu Yang Link: https://lore.kernel.org/r/20230317061516.2451728-1-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman commit 175b54abc443b6965e9379b71ec05f7c73c192e9 Author: Shyam Prasad N Date: Mon Mar 13 12:17:34 2023 +0000 cifs: print session id while listing open files In the output of /proc/fs/cifs/open_files, we only print the tree id for the tcon of each open file. It becomes difficult to know which tcon these files belong to with just the tree id. This change dumps ses id in addition to all other data today. Signed-off-by: Shyam Prasad N Reviewed-by: Paulo Alcantara (SUSE) Cc: stable@vger.kernel.org Signed-off-by: Steve French commit d12bc6d26f92c51b28e8f4a146ffcc630b688198 Author: Shyam Prasad N Date: Mon Mar 13 11:09:12 2023 +0000 cifs: dump pending mids for all channels in DebugData Currently, we only dump the pending mid information only on the primary channel in /proc/fs/cifs/DebugData. If multichannel is active, we do not print the pending MID list on secondary channels. This change will dump the pending mids for all the channels based on server->conn_id. Signed-off-by: Shyam Prasad N Reviewed-by: Paulo Alcantara (SUSE) Cc: stable@vger.kernel.org Signed-off-by: Steve French commit 896cd316b841053f6df95ab77b5f1322c16a8e18 Author: Shyam Prasad N Date: Thu Mar 9 13:23:29 2023 +0000 cifs: empty interface list when server doesn't support query interfaces When querying server interfaces returns -EOPNOTSUPP, clear the list of interfaces. Assumption is that multichannel would be disabled too. Signed-off-by: Shyam Prasad N Reviewed-by: Paulo Alcantara (SUSE) Cc: stable@vger.kernel.org Signed-off-by: Steve French commit 072a28c8907c841f7d4b56c78bce46d3ee211e73 Author: Shyam Prasad N Date: Wed Mar 8 12:11:31 2023 +0000 cifs: do not poll server interfaces too regularly We have the server interface list hanging off the tcon structure today for reasons unknown. So each tcon which is connected to a file server can query them separately, which is really unnecessary. To avoid this, in the query function, we will check the time of last update of the interface list, and avoid querying the server if it is within a certain range. Signed-off-by: Shyam Prasad N Reviewed-by: Paulo Alcantara (SUSE) Cc: stable@vger.kernel.org Signed-off-by: Steve French commit 41841f120345be87a12a4096ebcc2d2959c484ef Author: Krzysztof Kozlowski Date: Wed Mar 22 20:30:51 2023 +0100 arm64: dts: qcom: qrb5165-rb5: Use proper WSA881x shutdown GPIO polarity The WSA881x shutdown GPIO is active low (SD_N), but Linux driver assumed DTS always comes with active high. Since Linux drivers were updated to handle proper flag, correct the DTS. The change is not backwards compatible with older Linux kernel. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230322193051.826167-5-krzysztof.kozlowski@linaro.org commit 4ded91530544afdbac350f609e6597076f569e52 Author: Krzysztof Kozlowski Date: Wed Mar 22 20:30:50 2023 +0100 arm64: dts: qcom: sm8250-mtp: Use proper WSA881x shutdown GPIO polarity The WSA881x shutdown GPIO is active low (SD_N), but Linux driver assumed DTS always comes with active high. Since Linux drivers were updated to handle proper flag, correct the DTS. The change is not backwards compatible with older Linux kernel. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230322193051.826167-4-krzysztof.kozlowski@linaro.org commit 5b91fab8eae27d1436eacde60107bab9987bbd9d Author: Krzysztof Kozlowski Date: Wed Mar 22 20:30:49 2023 +0100 arm64: dts: qcom: sdm850-samsung-w737: Use proper WSA881x shutdown GPIO polarity The WSA881x shutdown GPIO is active low (SD_N), but Linux driver assumed DTS always comes with active high. Since Linux drivers were updated to handle proper flag, correct the DTS. The change is not backwards compatible with older Linux kernel. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230322193051.826167-3-krzysztof.kozlowski@linaro.org commit a246c20c45a0a2bf5e865a4c3a76822b79b38c80 Author: Krzysztof Kozlowski Date: Wed Mar 22 20:30:48 2023 +0100 arm64: dts: qcom: sdm850-lenovo-yoga-c630: Use proper WSA881x shutdown GPIO polarity The WSA881x shutdown GPIO is active low (SD_N), but Linux driver assumed DTS always comes with active high. Since Linux drivers were updated to handle proper flag, correct the DTS. The change is not backwards compatible with older Linux kernel. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230322193051.826167-2-krzysztof.kozlowski@linaro.org commit 0b1d9debe30304f35c1211e6dcdca1935ce67240 Author: Ard Biesheuvel Date: Wed Mar 8 00:21:34 2023 +0100 efi/libstub: randomalloc: Return EFI_OUT_OF_RESOURCES on failure The logic in efi_random_alloc() will iterate over the memory map twice, once to count the number of candidate slots, and another time to locate the chosen slot after randomization. If there is insufficient memory to do the allocation, the second loop will run to completion without actually having located a slot, but we currently return EFI_SUCCESS in this case, as we fail to initialize status to the appropriate error value of EFI_OUT_OF_RESOURCES. Signed-off-by: Ard Biesheuvel commit a4a3203426f4b67535d6442ddc5dca8878a0678f Author: Srinivas Kandagatla Date: Thu Mar 23 11:01:25 2023 +0000 ASoC: codecs: lpass: fix the order or clks turn off during suspend The order in which clocks are stopped matters as some of the clock like NPL are derived from MCLK. Without this patch, Dragonboard RB5 DSP would crash with below error: qcom_q6v5_pas 17300000.remoteproc: fatal error received: ABT_dal.c:278:ABTimeout: AHB Bus hang is detected, Number of bus hang detected := 2 , addr0 = 0x3370000 , addr1 = 0x0!!! Turn off fsgen first, followed by npl and then finally mclk, which is exactly the opposite order of enable sequence. Fixes: 1dc3459009c3 ("ASoC: codecs: lpass: register mclk after runtime pm") Reported-by: Amit Pundir Signed-off-by: Srinivas Kandagatla Tested-by: Amit Pundir Link: https://lore.kernel.org/r/20230323110125.23790-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 1271a7b98e7989ba6bb978e14403fc84efe16e13 Author: Uwe Kleine-König Date: Wed Mar 22 22:45:45 2023 +0100 pwm: Zero-initialize the pwm_state passed to driver's .get_state() This is just to ensure that .usage_power is properly initialized and doesn't contain random stack data. The other members of struct pwm_state should get a value assigned in a successful call to .get_state(). So in the absence of bugs in driver implementations, this is only a safe-guard and no fix. Reported-by: Munehisa Kamata Link: https://lore.kernel.org/r/20230310214004.2619480-1-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 8caa81eb950cb2e9d2d6959b37d853162d197f57 Author: Uwe Kleine-König Date: Wed Mar 22 22:45:44 2023 +0100 pwm: meson: Explicitly set .polarity in .get_state() The driver only supports normal polarity. Complete the implementation of .get_state() by setting .polarity accordingly. This fixes a regression that was possible since commit c73a3107624d ("pwm: Handle .get_state() failures") which stopped to zero-initialize the state passed to the .get_state() callback. This was reported at https://forum.odroid.com/viewtopic.php?f=177&t=46360 . While this was an unintended side effect, the real issue is the driver's callback not setting the polarity. There is a complicating fact, that the .apply() callback fakes support for inversed polarity. This is not (and cannot) be matched by .get_state(). As fixing this isn't easy, only point it out in a comment to prevent authors of other drivers from copying that approach. Fixes: c375bcbaabdb ("pwm: meson: Read the full hardware state in meson_pwm_get_state()") Reported-by: Munehisa Kamata Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20230310191405.2606296-1-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 2be4dcf6627e1bcbbef8e6ba1811f5127d39202c Author: Uwe Kleine-König Date: Wed Mar 22 22:45:43 2023 +0100 pwm: sprd: Explicitly set .polarity in .get_state() The driver only supports normal polarity. Complete the implementation of .get_state() by setting .polarity accordingly. Fixes: 8aae4b02e8a6 ("pwm: sprd: Add Spreadtrum PWM support") Link: https://lore.kernel.org/r/20230228135508.1798428-5-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit b20b097128d9145fadcea1cbb45c4d186cb57466 Author: Uwe Kleine-König Date: Wed Mar 22 22:45:42 2023 +0100 pwm: iqs620a: Explicitly set .polarity in .get_state() The driver only supports normal polarity. Complete the implementation of .get_state() by setting .polarity accordingly. Fixes: 6f0841a8197b ("pwm: Add support for Azoteq IQS620A PWM generator") Reviewed-by: Jeff LaBundy Link: https://lore.kernel.org/r/20230228135508.1798428-4-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 30006b77c7e130e01d1ab2148cc8abf73dfcc4bf Author: Uwe Kleine-König Date: Wed Mar 22 22:45:41 2023 +0100 pwm: cros-ec: Explicitly set .polarity in .get_state() The driver only supports normal polarity. Complete the implementation of .get_state() by setting .polarity accordingly. Reviewed-by: Guenter Roeck Fixes: 1f0d3bb02785 ("pwm: Add ChromeOS EC PWM driver") Link: https://lore.kernel.org/r/20230228135508.1798428-3-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 6f57937980142715e927697a6ffd2050f38ed6f6 Author: Uwe Kleine-König Date: Wed Mar 22 22:45:40 2023 +0100 pwm: hibvt: Explicitly set .polarity in .get_state() The driver only both polarities. Complete the implementation of .get_state() by setting .polarity according to the configured hardware state. Fixes: d09f00810850 ("pwm: Add PWM driver for HiSilicon BVT SOCs") Link: https://lore.kernel.org/r/20230228135508.1798428-2-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit f9537b1fa7fb51c2162bc15ce469cbbf1ca0fbfe 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 4c94e57c258cb7800aa5f3a9d9597d91291407a9 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 2b072442f4962231a8516485012bb2d2551ef2fe 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 Cc: stable@vger.kernel.org commit 6d457ca162da98a6a1a381320e936d7448177de9 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 e06bfcc1a1c41bcb8c31470d437e147ce9f0acfd 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 033c56474acf567a450f8bafca50e0b610f2b716 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 4eb0b49a0ad3e004a6a65b84efe37bc7e66d560f 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 b589626674de94d977e81c99bf7905872b991197 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 Cc: stable@vger.kernel.org # 6.1.x commit aaee0ce460b954e08b6e630d7e54b2abb672feb8 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 Cc: stable@vger.kernel.org # 6.1.x commit fc3608aaa5751318837e4bbe0282b3836bca5080 Author: Ard Biesheuvel Date: Wed Mar 22 01:11:18 2023 +0100 efi/libstub: Use relocated version of kernel's struct screen_info In some cases, we expose the kernel's struct screen_info to the EFI stub directly, so it gets populated before even entering the kernel. This means the early console is available as soon as the early param parsing happens, which is nice. It also means we need two different ways to pass this information, as this trick only works if the EFI stub is baked into the core kernel image, which is not always the case. Huacai reports that the preparatory refactoring that was needed to implement this alternative method for zboot resulted in a non-functional efifb earlycon for other cases as well, due to the reordering of the kernel image relocation with the population of the screen_info struct, and the latter now takes place after copying the image to its new location, which means we copy the old, uninitialized state. So let's ensure that the same-image version of alloc_screen_info() produces the correct screen_info pointer, by taking the displacement of the loaded image into account. Reported-by: Huacai Chen Tested-by: Huacai Chen Link: https://lore.kernel.org/linux-efi/20230310021749.921041-1-chenhuacai@loongson.cn/ Fixes: 42c8ea3dca094ab8 ("efi: libstub: Factor out EFI stub entrypoint into separate file") Signed-off-by: Ard Biesheuvel commit 2265098fd6a6272fde3fd1be5761f2f5895bd99a Author: Bhavya Kapoor Date: Fri Mar 17 14:57:11 2023 +0530 mmc: sdhci_am654: Set HIGH_SPEED_ENA for SDR12 and SDR25 Timing Information in Datasheet assumes that HIGH_SPEED_ENA=1 should be set for SDR12 and SDR25 modes. But sdhci_am654 driver clears HIGH_SPEED_ENA register. Thus, Modify sdhci_am654 to not clear HIGH_SPEED_ENA (HOST_CONTROL[2]) bit for SDR12 and SDR25 speed modes. Fixes: e374e87538f4 ("mmc: sdhci_am654: Clear HISPD_ENA in some lower speed modes") Signed-off-by: Bhavya Kapoor Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230317092711.660897-1-b-kapoor@ti.com Signed-off-by: Ulf Hansson commit b1de5c78ebe9858ccec9d49af2f76724f1d47e3e Author: Liang He Date: Wed Mar 22 14:20:57 2023 +0800 net: mdio: thunder: Add missing fwnode_handle_put() In device_for_each_child_node(), 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: 379d7ac7ca31 ("phy: mdio-thunder: Add driver for Cavium Thunder SoC MDIO buses.") Signed-off-by: Liang He Signed-off-by: David S. Miller commit 58e84f6b3e84e46524b7e5a916b53c1ad798bc8f Author: Mark Zhang Date: Mon Mar 20 12:59:55 2023 +0200 RDMA/cma: Allow UD qp_type to join multicast only As for multicast: - The SIDR is the only mode that makes sense; - Besides PS_UDP, other port spaces like PS_IB is also allowed, as it is UD compatible. In this case qkey also needs to be set [1]. This patch allows only UD qp_type to join multicast, and set qkey to default if it's not set, to fix an uninit-value error: the ib->rec.qkey field is accessed without being initialized. ===================================================== BUG: KMSAN: uninit-value in cma_set_qkey drivers/infiniband/core/cma.c:510 [inline] BUG: KMSAN: uninit-value in cma_make_mc_event+0xb73/0xe00 drivers/infiniband/core/cma.c:4570 cma_set_qkey drivers/infiniband/core/cma.c:510 [inline] cma_make_mc_event+0xb73/0xe00 drivers/infiniband/core/cma.c:4570 cma_iboe_join_multicast drivers/infiniband/core/cma.c:4782 [inline] rdma_join_multicast+0x2b83/0x30a0 drivers/infiniband/core/cma.c:4814 ucma_process_join+0xa76/0xf60 drivers/infiniband/core/ucma.c:1479 ucma_join_multicast+0x1e3/0x250 drivers/infiniband/core/ucma.c:1546 ucma_write+0x639/0x6d0 drivers/infiniband/core/ucma.c:1732 vfs_write+0x8ce/0x2030 fs/read_write.c:588 ksys_write+0x28c/0x520 fs/read_write.c:643 __do_sys_write fs/read_write.c:655 [inline] __se_sys_write fs/read_write.c:652 [inline] __ia32_sys_write+0xdb/0x120 fs/read_write.c:652 do_syscall_32_irqs_on arch/x86/entry/common.c:114 [inline] __do_fast_syscall_32+0x96/0xf0 arch/x86/entry/common.c:180 do_fast_syscall_32+0x34/0x70 arch/x86/entry/common.c:205 do_SYSENTER_32+0x1b/0x20 arch/x86/entry/common.c:248 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c Local variable ib.i created at: cma_iboe_join_multicast drivers/infiniband/core/cma.c:4737 [inline] rdma_join_multicast+0x586/0x30a0 drivers/infiniband/core/cma.c:4814 ucma_process_join+0xa76/0xf60 drivers/infiniband/core/ucma.c:1479 CPU: 0 PID: 29874 Comm: syz-executor.3 Not tainted 5.16.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ===================================================== [1] https://lore.kernel.org/linux-rdma/20220117183832.GD84788@nvidia.com/ Fixes: b5de0c60cc30 ("RDMA/cma: Fix use after free race in roce multicast join") Reported-by: syzbot+8fcbb77276d43cc8b693@syzkaller.appspotmail.com Signed-off-by: Mark Zhang Link: https://lore.kernel.org/r/58a4a98323b5e6b1282e83f6b76960d06e43b9fa.1679309909.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit fb27e70f6e408dee5d22b083e7a38a59e6118253 Author: Ben Hutchings Date: Wed Mar 22 19:11:45 2023 +0100 modpost: Fix processing of CRCs on 32-bit build machines modpost now reads CRCs from .*.cmd files, parsing them using strtol(). This is inconsistent with its parsing of Module.symvers and with their definition as *unsigned* 32-bit values. strtol() clamps values to [LONG_MIN, LONG_MAX], and when building on a 32-bit system this changes all CRCs >= 0x80000000 to be 0x7fffffff. Change extract_crcs_for_object() to use strtoul() instead. Cc: stable@vger.kernel.org Fixes: f292d875d0dc ("modpost: extract symbol versions from *.cmd files") Signed-off-by: Ben Hutchings Signed-off-by: Masahiro Yamada commit 1073c15fd39e804ad36ff26a7c7d53b0ab51b184 Author: Mirsad Goran Todorovac Date: Wed Mar 22 09:51:07 2023 +0100 scripts: merge_config: Fix typo in variable name. ${WARNOVERRIDE} was misspelled as ${WARNOVVERIDE}, which caused a shell syntax error in certain paths of the script execution. Fixes: 46dff8d7e381 ("scripts: merge_config: Add option to suppress warning on overrides") Signed-off-by: Mirsad Goran Todorovac Reviewed-by: Mark Brown Acked-by: Randy Dunlap Signed-off-by: Masahiro Yamada commit fb63d217e68f5040aec88b63c96355f32d522d01 Merge: 3e212b0b968a0 640fcdbcf27fc Author: Jakub Kicinski Date: Wed Mar 22 22:50:01 2023 -0700 Merge tag 'mlx5-fixes-2023-03-21' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5 fixes 2023-03-21 This series provides bug fixes to mlx5 driver. * tag 'mlx5-fixes-2023-03-21' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5: E-Switch, Fix an Oops in error handling code net/mlx5: Read the TC mapping of all priorities on ETS query net/mlx5e: Overcome slow response for first macsec ASO WQE net/mlx5e: Initialize link speed to zero net/mlx5: Fix steering rules cleanup net/mlx5e: Block entering switchdev mode with ns inconsistency net/mlx5e: Set uplink rep as NETNS_LOCAL ==================== Link: https://lore.kernel.org/r/20230321211135.47711-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 3e212b0b968a02ddb36c73ff7e8abe0a2256ce49 Merge: cad4fb02d8a3a 7d46c0e670d5f Author: Jakub Kicinski Date: Wed Mar 22 22:45:22 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-03-21 (ice) This series contains updates to ice driver only. Piotr sets first_desc field for proper handling of Flow Director packets. Michal moves error checking for VF earlier in function to properly return error before other checks/reporting; he also corrects VSI filter removal to be done during VSI removal and not rebuild. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ice: remove filters only if VSI is deleted ice: check if VF exists before mode check ice: fix rx buffers handling for flow director packets ==================== Link: https://lore.kernel.org/r/20230321183641.2849726-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit cad4fb02d8a3aa9dff97e10342c253a7b96b371b Merge: 407b508bdd70b c672297bbc0e8 Author: Jakub Kicinski Date: Wed Mar 22 22:42:15 2023 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2023-03-21 (iavf, i40e) This series contains updates to iavf and i40e drivers. Stefan Assmann adds check, and return, if driver has already gone through remove to prevent hang for iavf. Radoslaw adds zero initialization to ensure Flow Director packets are populated with correct values for i40e. * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: i40e: fix flow director packet filter programming iavf: fix hang on reboot with ice ==================== Link: https://lore.kernel.org/r/20230321183548.2849671-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 407b508bdd70b6848993843d96ed49ac4108fb52 Author: Arınç ÜNAL Date: Mon Mar 20 22:05:20 2023 +0300 net: dsa: mt7530: move setting ssc_delta to PHY_INTERFACE_MODE_TRGMII case Move setting the ssc_delta variable to under the PHY_INTERFACE_MODE_TRGMII case as it's only needed when trgmii is used. Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch") Signed-off-by: Arınç ÜNAL Link: https://lore.kernel.org/r/20230320190520.124513-3-arinc.unal@arinc9.com Signed-off-by: Jakub Kicinski commit fdcc8ccd823740c18e803b886cec461bc0e64201 Author: Arınç ÜNAL Date: Mon Mar 20 22:05:19 2023 +0300 net: dsa: mt7530: move lowering TRGMII driving to mt7530_setup() Move lowering the TRGMII Tx clock driving to mt7530_setup(), after setting the core clock, as seen on the U-Boot MediaTek ethernet driver. Move the code which looks like it lowers the TRGMII Rx clock driving to after the TRGMII Tx clock driving is lowered. This is run after lowering the Tx clock driving on the U-Boot MediaTek ethernet driver as well. This way, the switch should consume less power regardless of port 6 being used. Update the comment explaining mt7530_pad_clk_setup(). Tested rgmii and trgmii modes of port 6 and rgmii mode of port 5 on MCM MT7530 on MT7621AT Unielec U7621-06 and standalone MT7530 on MT7623NI Bananapi BPI-R2. Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch") Link: https://source.denx.de/u-boot/u-boot/-/blob/29a48bf9ccba45a5e560bb564bbe76e42629325f/drivers/net/mtk_eth.c#L682 Tested-by: Arınç ÜNAL Signed-off-by: Arınç ÜNAL Link: https://lore.kernel.org/r/20230320190520.124513-2-arinc.unal@arinc9.com Signed-off-by: Jakub Kicinski commit 8f058a6ef99f0b88a177b58cc46a44ff5112e40a Author: Arınç ÜNAL Date: Mon Mar 20 22:05:18 2023 +0300 net: dsa: mt7530: move enabling disabling core clock to mt7530_pll_setup() Split the code that enables and disables TRGMII clocks and core clock. Move enabling and disabling core clock to mt7530_pll_setup() as it's supposed to be run there. Add 20 ms delay before enabling the core clock as seen on the U-Boot MediaTek ethernet driver. Change the comment for enabling and disabling TRGMII clocks as the code seems to affect both TXC and RXC. Tested rgmii and trgmii modes of port 6 and rgmii mode of port 5 on MCM MT7530 on MT7621AT Unielec U7621-06 and standalone MT7530 on MT7623NI Bananapi BPI-R2. Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch") Link: https://source.denx.de/u-boot/u-boot/-/blob/29a48bf9ccba45a5e560bb564bbe76e42629325f/drivers/net/mtk_eth.c#L589 Tested-by: Arınç ÜNAL Signed-off-by: Arınç ÜNAL Link: https://lore.kernel.org/r/20230320190520.124513-1-arinc.unal@arinc9.com Signed-off-by: Jakub Kicinski commit 8eac0095de355ee31e1b014f79f83d2cd62a2d04 Author: Grant Grundler Date: Tue Mar 21 10:05:39 2023 -0700 net: asix: fix modprobe "sysfs: cannot create duplicate filename" "modprobe asix ; rmmod asix ; modprobe asix" fails with: sysfs: cannot create duplicate filename \ '/devices/virtual/mdio_bus/usb-003:004' Issue was originally reported by Anton Lundin on 2022-06-22 (link below). Chrome OS team hit the same issue in Feb, 2023 when trying to find work arounds for other issues with AX88172 devices. The use of devm_mdiobus_register() with usbnet devices results in the MDIO data being associated with the USB device. When the asix driver is unloaded, the USB device continues to exist and the corresponding "mdiobus_unregister()" is NOT called until the USB device is unplugged or unauthorized. So the next "modprobe asix" will fail because the MDIO phy sysfs attributes still exist. The 'easy' (from a design PoV) fix is to use the non-devm variants of mdiobus_* functions and explicitly manage this use in the asix_bind and asix_unbind function calls. I've not explored trying to fix usbnet initialization so devm_* stuff will work. Fixes: e532a096be0e5 ("net: usb: asix: ax88772: add phylib support") Reported-by: Anton Lundin Link: https://lore.kernel.org/netdev/20220623063649.GD23685@pengutronix.de/T/ Tested-by: Eizan Miyamoto Signed-off-by: Grant Grundler Link: https://lore.kernel.org/r/20230321170539.732147-1-grundler@chromium.org Signed-off-by: Jakub Kicinski commit 68c3e4fc8628b1487c965aabb29207249657eb5f Author: Joshua Washington Date: Tue Mar 21 10:23:32 2023 -0700 gve: Cache link_speed value from device The link speed is never changed for the uptime of a VM, and the current implementation sends an admin queue command for each call. Admin queue command invocations have nontrivial overhead (e.g., VM exits), which can be disruptive to users if triggered frequently. Our telemetry data shows that there are VMs that make frequent calls to this admin queue command. Caching the result of the original admin queue command would eliminate the need to send multiple admin queue commands on subsequent calls to retrieve link speed. Fixes: 7e074d5a76ca ("gve: Enable Link Speed Reporting in the driver.") Signed-off-by: Joshua Washington Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230321172332.91678-1-joshwash@google.com Signed-off-by: Jakub Kicinski commit 2f4e429c846972c8405951a9ff7a82aceeca7461 Author: Shyam Prasad N Date: Mon Feb 20 13:02:11 2023 +0000 cifs: lock chan_lock outside match_session Coverity had rightly indicated a possible deadlock due to chan_lock being done inside match_session. All callers of match_* functions should pick up the necessary locks and call them. Signed-off-by: Shyam Prasad N Reviewed-by: Paulo Alcantara (SUSE) Cc: stable@vger.kernel.org Fixes: 724244cdb382 ("cifs: protect session channel fields with chan_lock") Signed-off-by: Steve French commit 758d29fb3a8b3c756b4e4e0aa9b32ca8cfaf3feb Author: Donald Hunter Date: Sun Mar 19 19:37:58 2023 +0000 tools: ynl: Fix genlmsg header encoding formats The pack strings use 'b' signed char for cmd and version but struct genlmsghdr defines them as unsigned char. Use 'B' instead. Fixes: 4e4480e89c47 ("tools: ynl: move the cli and netlink code around") Signed-off-by: Donald Hunter Link: https://lore.kernel.org/r/20230319193803.97453-1-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski commit c79493c3ccf06a3aeb72017a96ca3dfd166bc16b Author: Vladimir Oltean Date: Wed Mar 22 01:28:31 2023 +0200 net: enetc: fix aggregate RMON counters not showing the ranges When running "ethtool -S eno0 --groups rmon" without an explicit "--src emac|pmac" argument, the kernel will not report rx-rmon-etherStatsPkts64to64Octets, rx-rmon-etherStatsPkts65to127Octets, etc. This is because on ETHTOOL_MAC_STATS_SRC_AGGREGATE, we do not populate the "ranges" argument. ocelot_port_get_rmon_stats() does things differently and things work there. I had forgotten to make sure that the code is structured the same way in both drivers, so do that now. Fixes: cf52bd238b75 ("net: enetc: add support for MAC Merge statistics counters") Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230321232831.1200905-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit b37115b6534c4027df75854a44b485596d368171 Author: Sebastian Reichel Date: Fri Mar 17 18:41:02 2023 +0100 arm64: dts: rockchip: add rk3588 cache level information Add missing, mandatory cache-level information for RK3588. Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20230317174102.61209-1-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner commit 52dd5e964a55c98c1b0bcf5fc737a5ddd00e7d4d Author: Brian Gix Date: Mon Mar 6 14:32:21 2023 -0800 Bluetooth: Remove "Power-on" check from Mesh feature The Bluetooth mesh experimental feature enable was requiring the controller to be powered off in order for the Enable to work. Mesh is supposed to be enablable regardless of the controller state, and created an unintended requirement that the mesh daemon be started before the classic bluetoothd daemon. Fixes: af6bcc1921ff ("Bluetooth: Add experimental wrapper for MGMT based mesh") Signed-off-by: Brian Gix Signed-off-by: Luiz Augusto von Dentz commit 1c66bee492a5fe00ae3fe890bb693bfc99f994c6 Author: Min Li Date: Sat Mar 4 21:50:35 2023 +0800 Bluetooth: Fix race condition in hci_cmd_sync_clear There is a potential race condition in hci_cmd_sync_work and hci_cmd_sync_clear, and could lead to use-after-free. For instance, hci_cmd_sync_work is added to the 'req_workqueue' after cancel_work_sync The entry of 'cmd_sync_work_list' may be freed in hci_cmd_sync_clear, and causing kernel panic when it is used in 'hci_cmd_sync_work'. Here's the call trace: dump_stack_lvl+0x49/0x63 print_report.cold+0x5e/0x5d3 ? hci_cmd_sync_work+0x282/0x320 kasan_report+0xaa/0x120 ? hci_cmd_sync_work+0x282/0x320 __asan_report_load8_noabort+0x14/0x20 hci_cmd_sync_work+0x282/0x320 process_one_work+0x77b/0x11c0 ? _raw_spin_lock_irq+0x8e/0xf0 worker_thread+0x544/0x1180 ? poll_idle+0x1e0/0x1e0 kthread+0x285/0x320 ? process_one_work+0x11c0/0x11c0 ? kthread_complete_and_exit+0x30/0x30 ret_from_fork+0x22/0x30 Allocated by task 266: kasan_save_stack+0x26/0x50 __kasan_kmalloc+0xae/0xe0 kmem_cache_alloc_trace+0x191/0x350 hci_cmd_sync_queue+0x97/0x2b0 hci_update_passive_scan+0x176/0x1d0 le_conn_complete_evt+0x1b5/0x1a00 hci_le_conn_complete_evt+0x234/0x340 hci_le_meta_evt+0x231/0x4e0 hci_event_packet+0x4c5/0xf00 hci_rx_work+0x37d/0x880 process_one_work+0x77b/0x11c0 worker_thread+0x544/0x1180 kthread+0x285/0x320 ret_from_fork+0x22/0x30 Freed by task 269: kasan_save_stack+0x26/0x50 kasan_set_track+0x25/0x40 kasan_set_free_info+0x24/0x40 ____kasan_slab_free+0x176/0x1c0 __kasan_slab_free+0x12/0x20 slab_free_freelist_hook+0x95/0x1a0 kfree+0xba/0x2f0 hci_cmd_sync_clear+0x14c/0x210 hci_unregister_dev+0xff/0x440 vhci_release+0x7b/0xf0 __fput+0x1f3/0x970 ____fput+0xe/0x20 task_work_run+0xd4/0x160 do_exit+0x8b0/0x22a0 do_group_exit+0xba/0x2a0 get_signal+0x1e4a/0x25b0 arch_do_signal_or_restart+0x93/0x1f80 exit_to_user_mode_prepare+0xf5/0x1a0 syscall_exit_to_user_mode+0x26/0x50 ret_from_fork+0x15/0x30 Fixes: 6a98e3836fa2 ("Bluetooth: Add helper for serialized HCI command execution") Cc: stable@vger.kernel.org Signed-off-by: Min Li Signed-off-by: Luiz Augusto von Dentz commit 294d749b5df5a22d17989833fb1a0a2cd1dfd243 Author: Kiran K Date: Tue Feb 28 16:31:54 2023 +0530 Bluetooth: btintel: Iterate only bluetooth device ACPI entries Current flow interates over entire ACPI table entries looking for Bluetooth Per Platform Antenna Gain(PPAG) entry. This patch iterates over ACPI entries relvant to Bluetooth device only. Fixes: c585a92b2f9c ("Bluetooth: btintel: Set Per Platform Antenna Gain(PPAG)") Signed-off-by: Kiran K Signed-off-by: Luiz Augusto von Dentz commit 2f10e40a948e8a2abe7f983df3959a333ca8955f Author: Pauli Virtanen Date: Mon Feb 20 19:38:24 2023 +0000 Bluetooth: ISO: fix timestamped HCI ISO data packet parsing Use correct HCI ISO data packet header struct when the packet has timestamp. The timestamp, when present, goes before the other fields (Core v5.3 4E 5.4.5), so the structs are not compatible. Fixes: ccf74f2390d6 ("Bluetooth: Add BTPROTO_ISO socket type") Signed-off-by: Pauli Virtanen Signed-off-by: Luiz Augusto von Dentz commit efe375b716c1c1c9b52a816f5b933a95421020a2 Author: Luiz Augusto von Dentz Date: Fri Feb 24 15:54:31 2023 -0800 Bluetooth: btusb: Remove detection of ISO packets over bulk This removes the code introduced by 14202eff214e1e941fefa0366d4c3bc4b1a0d500 as hci_recv_frame is now able to detect ACL packets that are in fact ISO packets. Fixes: 14202eff214e ("Bluetooth: btusb: Detect if an ACL packet is in fact an ISO packet") Signed-off-by: Luiz Augusto von Dentz commit 876e78104f23ce9267822757a63562a609b126c3 Author: Luiz Augusto von Dentz Date: Fri Feb 24 15:43:31 2023 -0800 Bluetooth: hci_core: Detect if an ACL packet is in fact an ISO packet Because some transports don't have a dedicated type for ISO packets (see 14202eff214e1e941fefa0366d4c3bc4b1a0d500) they may use ACL type when in fact they are ISO packets. In the past this was left for the driver to detect such thing but it creates a problem when using the likes of btproxy when used by a VM as the host would not be aware of the connection the guest is doing it won't be able to detect such behavior, so this make bt_recv_frame detect when it happens as it is the common interface to all drivers including guest VMs. Fixes: 14202eff214e ("Bluetooth: btusb: Detect if an ACL packet is in fact an ISO packet") Signed-off-by: Luiz Augusto von Dentz commit 3c44a431d62bf4a20d7b901f98266ae3f4676d48 Author: Zhengping Jiang Date: Tue Feb 21 16:17:56 2023 -0800 Bluetooth: hci_sync: Resume adv with no RPA when active scan The address resolution should be disabled during the active scan, so all the advertisements can reach the host. The advertising has to be paused before disabling the address resolution, because the advertising will prevent any changes to the resolving list and the address resolution status. Skipping this will cause the hci error and the discovery failure. According to the bluetooth specification: "7.8.44 LE Set Address Resolution Enable command This command shall not be used when: - Advertising (other than periodic advertising) is enabled, - Scanning is enabled, or - an HCI_LE_Create_Connection, HCI_LE_Extended_Create_Connection, or HCI_LE_Periodic_Advertising_Create_Sync command is outstanding." If the host is using RPA, the controller needs to generate RPA for the advertising, so the advertising must remain paused during the active scan. If the host is not using RPA, the advertising can be resumed after disabling the address resolution. Fixes: 9afc675edeeb ("Bluetooth: hci_sync: allow advertise when scan without RPA") Signed-off-by: Zhengping Jiang Signed-off-by: Luiz Augusto von Dentz commit b53e8cfec30b93c120623232ba27c041b1ef8f1a Author: Namjae Jeon Date: Tue Mar 21 15:36:40 2023 +0900 ksmbd: return STATUS_NOT_SUPPORTED on unsupported smb2.0 dialect ksmbd returned "Input/output error" when mounting with vers=2.0 to ksmbd. It should return STATUS_NOT_SUPPORTED on unsupported smb2.0 dialect. Cc: stable@vger.kernel.org Reported-by: Steve French Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit be6f42fad5f5fd1fea9d562df82c38ad6ed3bfe9 Author: Namjae Jeon Date: Tue Mar 21 15:25:34 2023 +0900 ksmbd: don't terminate inactive sessions after a few seconds Steve reported that inactive sessions are terminated after a few seconds. ksmbd terminate when receiving -EAGAIN error from kernel_recvmsg(). -EAGAIN means there is no data available in timeout. So ksmbd should keep connection with unlimited retries instead of terminating inactive sessions. Cc: stable@vger.kernel.org Reported-by: Steve French Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 2624b445544ffc1472ccabfb6ec867c199d4c95c Author: ChenXiaoSong Date: Thu Mar 2 21:58:04 2023 +0800 ksmbd: fix possible refcount leak in smb2_open() Reference count of acls will leak when memory allocation fails. Fix this by adding the missing posix_acl_release(). Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Signed-off-by: ChenXiaoSong Acked-by: Namjae Jeon Signed-off-by: Steve French commit 342edb60dcda7a409430359b0cac2864bb9dfe44 Author: Namjae Jeon Date: Tue Mar 7 21:56:07 2023 +0900 ksmbd: add low bound validation to FSCTL_QUERY_ALLOCATED_RANGES Smatch static checker warning: fs/ksmbd/vfs.c:1040 ksmbd_vfs_fqar_lseek() warn: no lower bound on 'length' fs/ksmbd/vfs.c:1041 ksmbd_vfs_fqar_lseek() warn: no lower bound on 'start' Fix unexpected result that could caused from negative start and length. Fixes: f44158485826 ("cifsd: add file operations") Reported-by: Dan Carpenter Signed-off-by: Namjae Jeon Reviewed-by: Sergey Senozhatsky Signed-off-by: Steve French commit 2d74ec97131b1179a373b6d521f195c84e894eb6 Author: Namjae Jeon Date: Sun Mar 5 21:04:00 2023 +0900 ksmbd: add low bound validation to FSCTL_SET_ZERO_DATA Smatch static checker warning: fs/ksmbd/smb2pdu.c:7759 smb2_ioctl() warn: no lower bound on 'off' Fix unexpected result that could caused from negative off and bfz. Fixes: b5e5f9dfc915 ("ksmbd: check invalid FileOffset and BeyondFinalZero in FSCTL_ZERO_DATA") Reported-by: Dan Carpenter Signed-off-by: Namjae Jeon Reviewed-by: Sergey Senozhatsky Signed-off-by: Steve French commit 728f14c72b71a19623df329c1c7c9d1452e56f1e Author: Namjae Jeon Date: Wed Mar 1 00:02:30 2023 +0900 ksmbd: set FILE_NAMED_STREAMS attribute in FS_ATTRIBUTE_INFORMATION If vfs objects = streams_xattr in ksmbd.conf FILE_NAMED_STREAMS should be set to Attributes in FS_ATTRIBUTE_INFORMATION. MacOS client show "Format: SMB (Unknown)" on faked NTFS and no streams support. Cc: stable@vger.kernel.org Reported-by: Miao Lihua <441884205@qq.com> Tested-by: Miao Lihua <441884205@qq.com> Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 7a891d4b62d62566323676cb0e922ded4f37afe1 Author: Namjae Jeon Date: Wed Mar 1 00:01:21 2023 +0900 ksmbd: fix wrong signingkey creation when encryption is AES256 MacOS and Win11 support AES256 encrytion and it is included in the cipher array of encryption context. Especially on macOS, The most preferred cipher is AES256. Connecting to ksmbd fails on newer MacOS clients that support AES256 encryption. MacOS send disconnect request after receiving final session setup response from ksmbd. Because final session setup is signed with signing key was generated incorrectly. For signging key, 'L' value should be initialized to 128 if key size is 16bytes. Cc: stable@vger.kernel.org Reported-by: Miao Lihua <441884205@qq.com> Tested-by: Miao Lihua <441884205@qq.com> Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit fff5a5e7f528b2ed2c335991399a766c2cf01103 Merge: c13e02d335c82 ceac10c83b330 Author: Linus Torvalds Date: Wed Mar 22 14:15:05 2023 -0700 Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fix from Russell King: "Just one fix for now to eliminate a KASAN false positive" * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 9290/1: uaccess: Fix KASAN false-positives commit c13e02d335c825ffc7f4af3733329d38e695b482 Merge: a1effab7a3a35 caa0708a81d6a Author: Linus Torvalds Date: Wed Mar 22 14:09:20 2023 -0700 Merge tag 'bootconfig-fixes-v6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull bootconfig fixes from Masami Hiramatsu: - Fix bootconfig test script to test increased maximum number (8192) node correctly - Change the console message if there is no bootconfig data and the kernel is compiled with CONFIG_BOOT_CONFIG_FORCE=y * tag 'bootconfig-fixes-v6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: bootconfig: Change message if no bootconfig with CONFIG_BOOT_CONFIG_FORCE=y bootconfig: Fix testcase to increase max node commit d18a04157fc171fd48075e3dc96471bd3b87f0dd Author: Douglas Raillard Date: Mon Mar 6 12:27:43 2023 +0000 rcu: Fix rcu_torture_read ftrace event Fix the rcutorturename field so that its size is correctly reported in the text format embedded in trace.dat files. As it stands, it is reported as being of size 1: field:char rcutorturename[8]; offset:8; size:1; signed:0; Signed-off-by: Douglas Raillard Reviewed-by: Mukesh Ojha Cc: stable@vger.kernel.org Fixes: 04ae87a52074e ("ftrace: Rework event_create_dir()") Reviewed-by: Steven Rostedt (Google) [ boqun: Add "Cc" and "Fixes" tags per Steven ] Signed-off-by: Boqun Feng Signed-off-by: Paul E. McKenney commit 5f24a8725fe7bc2c6adf7ce00dd3e818387d8995 Author: Chuck Lever Date: Wed Mar 22 15:01:34 2023 -0400 SUNRPC: Fix a crash in gss_krb5_checksum() Anna says: > KASAN reports [...] a slab-out-of-bounds in gss_krb5_checksum(), > and it can cause my client to panic when running cthon basic > tests with krb5p. > Running faddr2line gives me: > > gss_krb5_checksum+0x4b6/0x630: > ahash_request_free at > /home/anna/Programs/linux-nfs.git/./include/crypto/hash.h:619 > (inlined by) gss_krb5_checksum at > /home/anna/Programs/linux-nfs.git/net/sunrpc/auth_gss/gss_krb5_crypto.c:358 My diagnosis is that the memcpy() at the end of gss_krb5_checksum() reads past the end of the buffer containing the checksum data because the callers have ignored gss_krb5_checksum()'s API contract: * Caller provides the truncation length of the output token (h) in * cksumout.len. Instead they provide the fixed length of the hmac buffer. This length happens to be larger than the value returned by crypto_ahash_digestsize(). Change these errant callers to work like krb5_etm_{en,de}crypt(). As a defensive measure, bound the length of the byte copy at the end of gss_krb5_checksum(). Kunit sez: Testing complete. Ran 68 tests: passed: 68 Elapsed time: 81.680s total, 5.875s configuring, 75.610s building, 0.103s running Reported-by: Anna Schumaker Fixes: 8270dbfcebea ("SUNRPC: Obscure Kerberos integrity keys") Signed-off-by: Chuck Lever commit 6165a16a5ad9b237bb3131cff4d3c601ccb8f9a3 Author: Trond Myklebust Date: Tue Mar 21 00:17:36 2023 -0400 NFSv4: Fix hangs when recovering open state after a server reboot When we're using a cached open stateid or a delegation in order to avoid sending a CLAIM_PREVIOUS open RPC call to the server, we don't have a new open stateid to present to update_open_stateid(). Instead rely on nfs4_try_open_cached(), just as if we were doing a normal open. Fixes: d2bfda2e7aa0 ("NFSv4: don't reprocess cached open CLAIM_PREVIOUS") Cc: stable@vger.kernel.org Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit bbefb7ed83e639ba1633e807f56b38a71c51fda3 Merge: bbf860ed710ba 58cdfe6f58b35 Author: Greg Kroah-Hartman Date: Wed Mar 22 20:22:53 2023 +0100 Merge tag 'thunderbolt-for-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus Mika writes: thunderbolt: Fixes for v6.3-rc4 This includes following fixes and quirks for v6.3-rc: - Quirk to disable CL-states on AMD USB4 host routers - Fix memory leak in lane margining - Correct the retimer access flows - Quirk to limit USB3 bandwidth on certain Intel USB4 host routers - Fix usage of scale field when allocting USB3 bandwidth - Fix interrupt "auto clear" on non-Intel USB4 host routers. There are also two commits that are not fixes themselves but are needed for the USB3 bandwidth quirk and for the interrupt auto clear fix to work. All these have been in linux-next with no reported issues. * tag 'thunderbolt-for-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Rename shadowed variables bit to interrupt_bit and auto_clear_bit thunderbolt: Disable interrupt auto clear for rings thunderbolt: Use const qualifier for `ring_interrupt_index` thunderbolt: Use scale field when allocating USB3 bandwidth thunderbolt: Limit USB3 bandwidth of certain Intel USB4 host routers thunderbolt: Call tb_check_quirks() after initializing adapters thunderbolt: Add missing UNSET_INBOUND_SBTX for retimer access thunderbolt: Fix memory leak in margining thunderbolt: Add quirk to disable CLx commit e38c5e80c3d293a883c6f1d553f2146ec0bda35e Author: Hans de Goede Date: Wed Mar 22 15:53:32 2023 +0100 ASoC: Intel: bytcr_rt5640: Add quirk for the Acer Iconia One 7 B1-750 The Acer Iconia One 7 B1-750 tablet mostly works fine with the defaults for an Bay Trail CR tablet. Except for the internal mic, instead of an analog mic on IN3 a digital mic on DMIC1 is uses. Add a quirk with these settings for this tablet. Acked-by: Pierre-Louis Bossart Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230322145332.131525-1-hdegoede@redhat.com Signed-off-by: Mark Brown commit f1b80a3878b2d76ced46a275fdfd7fb80b4f083b Author: Ido Schimmel Date: Tue Mar 14 17:50:10 2023 +0200 thermal: core: Restore behavior regarding invalid trip points Commit 7c3d5c20dc16 ("thermal/core: Add a generic thermal_zone_get_trip() function") stopped marking trip points with a zero temperature as disabled, behavior that was originally introduced in commit 81ad4276b505 ("Thermal: Ignore invalid trip points"). When using the mlxsw driver we see that when such trip points are not disabled, the thermal subsystem repeatedly tries to set the state of the associated cooling devices to the maximum state. Address this by restoring the original behavior and mark trip points with a zero temperature as disabled. Fixes: 7c3d5c20dc16 ("thermal/core: Add a generic thermal_zone_get_trip() function") Signed-off-by: Ido Schimmel Signed-off-by: Rafael J. Wysocki commit 62faca1ca10cc84e99ae7f38aa28df2bc945369b Author: Chang S. Bae Date: Mon Feb 27 13:05:04 2023 -0800 selftests/x86/amx: Add a ptrace test Include a test case to validate the XTILEDATA injection to the target. Also, it ensures the kernel's ability to copy states between different XSAVE formats. Refactor the memcmp() code to be usable for the state validation. Signed-off-by: Chang S. Bae Signed-off-by: Dave Hansen Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20230227210504.18520-3-chang.seok.bae%40intel.com commit b15888840207c2bfe678dd1f68a32db54315e71f Author: Chang S. Bae Date: Mon Feb 27 13:05:03 2023 -0800 x86/fpu/xstate: Prevent false-positive warning in __copy_xstate_uabi_buf() __copy_xstate_to_uabi_buf() copies either from the tasks XSAVE buffer or from init_fpstate into the ptrace buffer. Dynamic features, like XTILEDATA, have an all zeroes init state and are not saved in init_fpstate, which means the corresponding bit is not set in the xfeatures bitmap of the init_fpstate header. But __copy_xstate_to_uabi_buf() retrieves addresses for both the tasks xstate and init_fpstate unconditionally via __raw_xsave_addr(). So if the tasks XSAVE buffer has a dynamic feature set, then the address retrieval for init_fpstate triggers the warning in __raw_xsave_addr() which checks the feature bit in the init_fpstate header. Remove the address retrieval from init_fpstate for extended features. They have an all zeroes init state so init_fpstate has zeros for them. Then zeroing the user buffer for the init state is the same as copying them from init_fpstate. Fixes: 2308ee57d93d ("x86/fpu/amx: Enable the AMX feature in 64-bit mode") Reported-by: Mingwei Zhang Link: https://lore.kernel.org/kvm/20230221163655.920289-2-mizhang@google.com/ Signed-off-by: Chang S. Bae Signed-off-by: Dave Hansen Tested-by: Mingwei Zhang Link: https://lore.kernel.org/all/20230227210504.18520-2-chang.seok.bae%40intel.com Cc: stable@vger.kernel.org commit a3f547addcaa10df5a226526bc9e2d9a94542344 Author: Michal Koutný Date: Mon Mar 6 20:31:44 2023 +0100 x86/mm: Do not shuffle CPU entry areas without KASLR The commit 97e3d26b5e5f ("x86/mm: Randomize per-cpu entry area") fixed an omission of KASLR on CPU entry areas. It doesn't take into account KASLR switches though, which may result in unintended non-determinism when a user wants to avoid it (e.g. debugging, benchmarking). Generate only a single combination of CPU entry areas offsets -- the linear array that existed prior randomization when KASLR is turned off. Since we have 3f148f331814 ("x86/kasan: Map shadow for percpu pages on demand") and followups, we can use the more relaxed guard kasrl_enabled() (in contrast to kaslr_memory_enabled()). Fixes: 97e3d26b5e5f ("x86/mm: Randomize per-cpu entry area") Signed-off-by: Michal Koutný Signed-off-by: Dave Hansen Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20230306193144.24605-1-mkoutny%40suse.com commit 02a4d923e4400a36d340ea12d8058f69ebf3a383 Author: Savino Dicanosa Date: Tue Mar 21 19:44:02 2023 +0000 io_uring/rsrc: fix null-ptr-deref in io_file_bitmap_get() When fixed files are unregistered, file_alloc_end and alloc_hint are not cleared. This can later cause a NULL pointer dereference in io_file_bitmap_get() if auto index selection is enabled via IORING_FILE_INDEX_ALLOC: [ 6.519129] BUG: kernel NULL pointer dereference, address: 0000000000000000 [...] [ 6.541468] RIP: 0010:_find_next_zero_bit+0x1a/0x70 [...] [ 6.560906] Call Trace: [ 6.561322] [ 6.561672] io_file_bitmap_get+0x38/0x60 [ 6.562281] io_fixed_fd_install+0x63/0xb0 [ 6.562851] ? __pfx_io_socket+0x10/0x10 [ 6.563396] io_socket+0x93/0xf0 [ 6.563855] ? __pfx_io_socket+0x10/0x10 [ 6.564411] io_issue_sqe+0x5b/0x3d0 [ 6.564914] io_submit_sqes+0x1de/0x650 [ 6.565452] __do_sys_io_uring_enter+0x4fc/0xb20 [ 6.566083] ? __do_sys_io_uring_register+0x11e/0xd80 [ 6.566779] do_syscall_64+0x3c/0x90 [ 6.567247] entry_SYSCALL_64_after_hwframe+0x72/0xdc [...] To fix the issue, set file alloc range and alloc_hint to zero after file tables are freed. Cc: stable@vger.kernel.org Fixes: 4278a0deb1f6 ("io_uring: defer alloc_hint update to io_file_bitmap_set()") Signed-off-by: Savino Dicanosa [axboe: add explicit bitmap == NULL check as well] Signed-off-by: Jens Axboe commit 1a70ca89d59c7c8af006d29b965a95ede0abb0da Author: Matheus Castello Date: Wed Mar 22 15:38:21 2023 +0100 drm/bridge: lt8912b: return EPROBE_DEFER if bridge is not found Returns EPROBE_DEFER when of_drm_find_bridge() fails, this is consistent with what all the other DRM bridge drivers are doing and this is required since the bridge might not be there when the driver is probed and this should not be a fatal failure. Cc: Fixes: 30e2ae943c26 ("drm/bridge: Introduce LT8912B DSI to HDMI bridge") Signed-off-by: Matheus Castello Signed-off-by: Francesco Dolcini Reviewed-by: Laurent Pinchart Reviewed-by: Andrzej Hajda Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230322143821.109744-1-francesco@dolcini.it commit ba98413bf45edbf33672e2539e321b851b2cfbd1 Author: Johan Hovold Date: Mon Mar 6 11:35:33 2023 +0100 drm/meson: fix missing component unbind on bind errors Make sure to unbind all subcomponents when binding the aggregate device fails. Fixes: a41e82e6c457 ("drm/meson: Add support for components") Cc: stable@vger.kernel.org # 4.12 Cc: Neil Armstrong Signed-off-by: Johan Hovold Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230306103533.4915-1-johan+linaro@kernel.org commit 915efd8a446b74442039d31689d5d863caf82517 Author: Jesper Dangaard Brouer Date: Tue Mar 21 14:52:31 2023 +0100 xdp: bpf_xdp_metadata use EOPNOTSUPP for no driver support When driver doesn't implement a bpf_xdp_metadata kfunc the fallback implementation returns EOPNOTSUPP, which indicate device driver doesn't implement this kfunc. Currently many drivers also return EOPNOTSUPP when the hint isn't available, which is ambiguous from an API point of view. Instead change drivers to return ENODATA in these cases. There can be natural cases why a driver doesn't provide any hardware info for a specific hint, even on a frame to frame basis (e.g. PTP). Lets keep these cases as separate return codes. When describing the return values, adjust the function kernel-doc layout to get proper rendering for the return values. Fixes: ab46182d0dcb ("net/mlx4_en: Support RX XDP metadata") Fixes: bc8d405b1ba9 ("net/mlx5e: Support RX XDP metadata") Fixes: 306531f0249f ("veth: Support RX XDP metadata") Fixes: 3d76a4d3d4e5 ("bpf: XDP metadata RX kfuncs") Signed-off-by: Jesper Dangaard Brouer Acked-by: Stanislav Fomichev Acked-by: Toke Høiland-Jørgensen Acked-by: Tariq Toukan Link: https://lore.kernel.org/r/167940675120.2718408.8176058626864184420.stgit@firesoul Signed-off-by: Alexei Starovoitov commit 5f4efc9dfcfd8440113057290f624ba2c893afb7 Author: Jaroslav Kysela Date: Wed Mar 22 16:34:04 2023 +0100 ALSA: hda/realtek: Fix support for Dell Precision 3260 Unfortunately, in commit 5911d78fabbb a wrong codec patch was selected. The model=alc283-dac-wcaps is equivalent to ALC283_FIXUP_CHROME_BOOK not ALC295_FIXUP_CHROME_BOOK. Fixes: 5911d78fabbb ("ALSA: hda/realtek: Improve support for Dell Precision 3260") Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20230322153404.386473-1-perex@perex.cz Signed-off-by: Takashi Iwai commit aadbd07ff8a75ed342388846da78dfaddb8b106a Author: Jan Beulich Date: Tue Mar 21 09:03:26 2023 +0100 x86/PVH: avoid 32-bit build warning when obtaining VGA console info In the commit referenced below I failed to pay attention to this code also being buildable as 32-bit. Adjust the type of "ret" - there's no real need for it to be wider than 32 bits. Fixes: 934ef33ee75c ("x86/PVH: obtain VGA console info in Dom0") Reported-by: kernel test robot Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/2d2193ff-670b-0a27-e12d-2c5c4c121c79@suse.com Signed-off-by: Juergen Gross commit 6214894f49a967c749ee6c07cb00f9cede748df4 Author: Roger Pau Monne Date: Wed Nov 30 16:09:11 2022 +0100 hvc/xen: prevent concurrent accesses to the shared ring The hvc machinery registers both a console and a tty device based on the hv ops provided by the specific implementation. Those two interfaces however have different locks, and there's no single locks that's shared between the tty and the console implementations, hence the driver needs to protect itself against concurrent accesses. Otherwise concurrent calls using the split interfaces are likely to corrupt the ring indexes, leaving the console unusable. Introduce a lock to xencons_info to serialize accesses to the shared ring. This is only required when using the shared memory console, concurrent accesses to the hypercall based console implementation are not an issue. Note the conditional logic in domU_read_console() is slightly modified so the notify_daemon() call can be done outside of the locked region: it's an hypercall and there's no need for it to be done with the lock held. Fixes: b536b4b96230 ('xen: use the hvc console infrastructure for Xen console') Signed-off-by: Roger Pau Monné Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20221130150919.13935-1-roger.pau@citrix.com Signed-off-by: Juergen Gross commit e732e39ed9929c05fd219035bc9653ba4100d4fa Author: Arseniy Krasnov Date: Mon Mar 13 10:32:44 2023 +0300 mtd: rawnand: meson: invalidate cache on polling ECC bit 'info_buf' memory is cached and driver polls ECC bit in it. This bit is set by the NAND controller. If 'usleep_range()' returns before device sets this bit, 'info_buf' will be cached and driver won't see update of this bit and will loop forever. Fixes: 8fae856c5350 ("mtd: rawnand: meson: add support for Amlogic NAND flash controller") Signed-off-by: Arseniy Krasnov Reviewed-by: Neil Armstrong Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/d4ef0bd6-816e-f6fa-9385-f05f775f0ae2@sberdevices.ru commit 9b043c649022ec55040aa9315cc72059c4ec254c Author: Miquel Raynal Date: Fri Mar 10 09:54:52 2023 +0100 mtd: rawnand: nandsim: Artificially prevent sequential page reads The continuous read support added recently makes nandsim unhappy. Indeed, all the supported commands should be re-encoded into internal commands, so of course there is currently no support for the commands and patterns needed for continuous reads to work. I tried to add support for them but nandsim (which is more a tool to develop/debug upper layers rather than the raw NAND core) suffers from a big limitation: it's internal parser needs to know what exact operation is happening when the address cycles are performed. The research is then sequential from the start up to the address cycles, but does not check what's coming next even though the information is available. This is a limitation which is related to the old API used by the core which kind of forced the controllers to guess what operation was being performed rather early. Today the core uses a more transparent API called ->exec_op() which no longer requires controller drivers to do any more guessing, but despite being updated to ->exec_op(), nandsim is still a bit constrained on this regard and thus cannot handle sequential page reads because the start sequence beginning is identical to a regular page read. If the internal algorithm is updated some day, it should be possible to make it support sequential page reads by adding something like: /* Large page devices continuous read page start */ {OPT_LARGEPAGE, {STATE_CMD_READ0, STATE_ADDR_PAGE, STATE_CMD_READSTART, STATE_CMD_READCACHESEQ | ACTION_CPY, STATE_DATAOUT, STATE_READY}}, /* Large page devices continuous read page continue */ {OPT_LARGEPAGE, {STATE_CMD_READCACHESEQ | ACTION_CPY_NEXT, STATE_DATAOUT, STATE_READY}}, /* Large page devices continuous read page end */ {OPT_LARGEPAGE, {STATE_CMD_READCACHEEND | ACTION_CPY_NEXT, STATE_DATAOUT, STATE_READY}}, For now, we just return -EOPNOTSUPP when the core asks controller drivers if they support the feature in order to prevent any further use of these opcodes. Note: This is a hack, ->exec_op() is not supposed to check against the COMMAND opcodes unless _really_ needed. Fixes: 003fe4b9545b ("mtd: rawnand: Support for sequential cache reads") Reported-by: Zhihao Cheng Link: https://lore.kernel.org/linux-mtd/fd34fe55-7f4a-030d-8653-9bb9cf08410d@huawei.com/ Signed-off-by: Miquel Raynal Tested-by: Zhihao Cheng Acked-by: Richard Weinberger Link: https://lore.kernel.org/linux-mtd/20230310085452.1368716-1-miquel.raynal@bootlin.com commit a56cde41340ac4049fa6edac9e6cfbcd2804074e Author: Geert Uytterhoeven Date: Tue Feb 14 15:26:43 2023 +0100 dt-bindings: mtd: jedec,spi-nor: Document CPOL/CPHA support SPI EEPROMs typically support both SPI Mode 0 (CPOL=CPHA=0) and Mode 3 (CPOL=CPHA=1). However, using the latter is currently flagged as an error by "make dtbs_check", e.g.: arch/arm/boot/dts/r8a7791-koelsch.dtb: flash@0: Unevaluated properties are not allowed ('spi-cpha', 'spi-cpol' were unexpected) From schema: Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml Fix this by documenting support for CPOL=CPHA=1. Fixes: 233363aba72ac638 ("spi/panel: dt-bindings: drop CPHA and CPOL from common properties") Cc: stable@vger.kernel.org Signed-off-by: Geert Uytterhoeven Reviewed-by: Miquel Raynal Reviewed-by: Krzysztof Kozlowski Reviewed-by: Tudor Ambarus Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/afe470603028db9374930b0c57464b1f6d52bdd3.1676384304.git.geert+renesas@glider.be commit bb765a743377d46d8da8e7f7e5128022504741b9 Author: Ido Schimmel Date: Tue Mar 21 12:42:00 2023 +0100 mlxsw: spectrum_fid: Fix incorrect local port type Local port is a 10-bit number, but it was mistakenly stored in a u8, resulting in firmware errors when using a netdev corresponding to a local port higher than 255. Fix by storing the local port in u16, as is done in the rest of the code. Fixes: bf73904f5fba ("mlxsw: Add support for 802.1Q FID family") Signed-off-by: Ido Schimmel Reviewed-by: Danielle Ratson Signed-off-by: Petr Machata Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/eace1f9d96545ab8a2775db857cb7e291a9b166b.1679398549.git.petrm@nvidia.com Signed-off-by: Paolo Abeni commit 07b0883e1f09416d07d25a2158f8cd35b732b686 Author: Johan Hovold Date: Wed Mar 22 12:33:16 2023 +0100 arm64: dts: qcom: sc8280xp-x13s: mark bob regulator as always-on The bob supply is used by several pmic regulators and components which are not (yet fully) described in the devicetree. Mark the regulator as always-on for now. Fixes: f29077d86652 ("arm64: dts: qcom: sc8280xp-x13s: Add soundcard support") Cc: Srinivas Kandagatla Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230322113318.17908-5-johan+linaro@kernel.org commit 291e6b6cd7145108d45aeffbac4bb1348fece6b6 Author: Johan Hovold Date: Wed Mar 22 12:33:15 2023 +0100 arm64: dts: qcom: sc8280xp-x13s: mark s12b regulator as always-on The s12b supply is used by several pmic regulators as well as the wlan/bluetooth radio which are not yet fully described in the devicetree. Mark the regulator as always-on for now. Fixes: f29077d86652 ("arm64: dts: qcom: sc8280xp-x13s: Add soundcard support") Cc: Srinivas Kandagatla Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230322113318.17908-4-johan+linaro@kernel.org commit f4472fd33e4751c54efb13d2536261e9273770a9 Author: Johan Hovold Date: Wed Mar 22 12:33:14 2023 +0100 arm64: dts: qcom: sc8280xp-x13s: mark s10b regulator as always-on The s10b supply is used by several components that are not (yet) described in devicetree (e.g. ram, charger, ec) and must not be disabled. Mark the regulator as always-on. Fixes: f29077d86652 ("arm64: dts: qcom: sc8280xp-x13s: Add soundcard support") Cc: Srinivas Kandagatla Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230322113318.17908-3-johan+linaro@kernel.org commit b8838e653034425cd26983c7d96535e2742a6212 Author: Johan Hovold Date: Wed Mar 22 12:33:13 2023 +0100 arm64: dts: qcom: sc8280xp-x13s: mark s11b regulator as always-on The s11b supply is used by the wlan module (as well as some of the pmics) which are not yet fully described in the devicetree. Mark the regulator as always-on for now. Fixes: 123b30a75623 ("arm64: dts: qcom: sc8280xp-x13s: enable WiFi controller") Cc: stable@vger.kernel.org # 6.2 Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230322113318.17908-2-johan+linaro@kernel.org commit acd0acb802b90f88d19ad4337183e44fd0f77c50 Author: Liang He Date: Wed Mar 22 11:30:57 2023 +0800 platform/surface: aggregator: Add missing fwnode_handle_put() In fwnode_for_each_child_node(), we should add fwnode_handle_put() when break out of the iteration fwnode_for_each_child_node() as it will automatically increase and decrease the refcounter. Fixes: fc622b3d36e6 ("platform/surface: Set up Surface Aggregator device registry") Signed-off-by: Liang He Reviewed-by: Maximilian Luz Link: https://lore.kernel.org/r/20230322033057.1855741-1-windhl@126.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 8a02d70679fc1c434401863333c8ea7dbf201494 Author: Mark Pearson Date: Sun Mar 19 20:32:21 2023 -0400 platform/x86: think-lmi: Add possible_values for ThinkStation ThinkStation platforms don't support the API to return possible_values but instead embed it in the settings string. Try and extract this information and set the possible_values attribute appropriately. Fixes: a40cd7ef22fb ("platform/x86: think-lmi: Add WMI interface support on Lenovo platforms") Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20230320003221.561750-4-mpearson-lenovo@squebb.ca Reviewed-by: Thomas Weißschuh Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit cf337f27f3bfc4aeab4954c468239fd6233c7638 Author: Mark Pearson Date: Sun Mar 19 20:32:20 2023 -0400 platform/x86: think-lmi: only display possible_values if available Some attributes don't have any values available. In those cases don't make the possible_values entry visible. Fixes: a40cd7ef22fb ("platform/x86: think-lmi: Add WMI interface support on Lenovo platforms") Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20230320003221.561750-3-mpearson-lenovo@squebb.ca Reviewed-by: Thomas Weißschuh Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 22c52fa5155a2f48aedb0f675903b20457285a27 Author: Rafael J. Wysocki Date: Fri Mar 17 18:03:40 2023 +0100 ACPI: processor: thermal: Update CPU cooling devices on cpufreq policy changes When a cpufreq policy appears or goes away, the CPU cooling devices for the CPUs covered by that policy need to be updated so that the new processor_get_max_state() value is stored as max_state and the statistics in sysfs are rearranged for each of them. Do that accordingly in acpi_thermal_cpufreq_init() and acpi_thermal_cpufreq_exit(). Fixes: a365105c685c("thermal: sysfs: Reuse cdev->max_state") Reported-by: Wang, Quanxian Link: https://lore.kernel.org/linux-pm/53ec1f06f61c984100868926f282647e57ecfb2d.camel@intel.com Signed-off-by: Rafael J. Wysocki Tested-by: Zhang Rui Reviewed-by: Zhang Rui commit 790930f44289c8209c57461b2db499fcc702e0b3 Author: Rafael J. Wysocki Date: Fri Mar 17 18:01:26 2023 +0100 thermal: core: Introduce thermal_cooling_device_update() Introduce a core thermal API function, thermal_cooling_device_update(), for updating the max_state value for a cooling device and rearranging its statistics in sysfs after a possible change of its ->get_max_state() callback return value. That callback is now invoked only once, during cooling device registration, to populate the max_state field in the cooling device object, so if its return value changes, it needs to be invoked again and the new return value needs to be stored as max_state. Moreover, the statistics presented in sysfs need to be rearranged in general, because there may not be enough room in them to store data for all of the possible states (in the case when max_state grows). The new function takes care of that (and some other minor things related to it), but some extra locking and lockdep annotations are added in several places too to protect against crashes in the cases when the statistics are not present or when a stale max_state value might be used by sysfs attributes. Note that the actual user of the new function will be added separately. Link: https://lore.kernel.org/linux-pm/53ec1f06f61c984100868926f282647e57ecfb2d.camel@intel.com/ Signed-off-by: Rafael J. Wysocki Tested-by: Zhang Rui Reviewed-by: Zhang Rui commit c43198af05cffa5de8d4f356c40ce4bdca066272 Author: Rafael J. Wysocki Date: Fri Mar 17 17:54:34 2023 +0100 thermal: core: Introduce thermal_cooling_device_present() Introduce a helper function, thermal_cooling_device_present(), for checking if the given cooling device is in the list of registered cooling devices to avoid some code duplication in a subsequent patch. No expected functional impact. Signed-off-by: Rafael J. Wysocki Tested-by: Zhang Rui Reviewed-by: Zhang Rui commit c0e0421a60bf468e88cf569fbd727346b138ed04 Author: Rafael J. Wysocki Date: Fri Mar 17 17:52:33 2023 +0100 ACPI: processor: Reorder acpi_processor_driver_init() The cpufreq policy notifier in the ACPI processor driver may as well be registered before the driver itself, which causes acpi_processor_cpufreq_init to be true (unless the notifier registration fails, which is unlikely at that point) when the ACPI CPU thermal cooling devices are registered, so the processor_get_max_state() result does not change while acpi_processor_driver_init() is running. Change the ordering in acpi_processor_driver_init() accordingly to prevent the max_state value from remaining 0 permanently for all ACPI CPU cooling devices due to setting acpi_processor_cpufreq_init too late. [Note that processor_get_max_state() may still return different values at different times after this change, depending on the cpufreq driver registration time, but that issue needs to be addressed separately.] Fixes: a365105c685c("thermal: sysfs: Reuse cdev->max_state") Reported-by: Wang, Quanxian Link: https://lore.kernel.org/linux-pm/53ec1f06f61c984100868926f282647e57ecfb2d.camel@intel.com Signed-off-by: Rafael J. Wysocki Tested-by: Zhang Rui Reviewed-by: Zhang Rui commit 45e21289bfc6e257885514790a8a8887da822d40 Author: Mark Pearson Date: Sun Mar 19 20:32:19 2023 -0400 platform/x86: think-lmi: use correct possible_values delimiters firmware-attributes class requires that possible values are delimited using ';' but the Lenovo firmware uses ',' instead. Parse string and replace where appropriate. Suggested-by: Thomas Weißschuh Fixes: a40cd7ef22fb ("platform/x86: think-lmi: Add WMI interface support on Lenovo platforms") Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20230320003221.561750-2-mpearson-lenovo@squebb.ca Reviewed-by: Thomas Weißschuh Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 583329dcf22e568a328a944f20427ccfc95dce01 Author: Mark Pearson Date: Sun Mar 19 20:32:18 2023 -0400 platform/x86: think-lmi: add missing type attribute This driver was missing the mandatory type attribute...oops. Add it in along with logic to determine whether the attribute is an enumeration type or a string by parsing the possible_values attribute. Upstream bug https://bugzilla.kernel.org/show_bug.cgi?id=216460 Fixes: a40cd7ef22fb ("platform/x86: think-lmi: Add WMI interface support on Lenovo platforms") Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20230320003221.561750-1-mpearson-lenovo@squebb.ca Reviewed-by: Thomas Weißschuh Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit caa0708a81d6a2217c942959ef40d515ec1d3108 Author: Masami Hiramatsu (Google) Date: Tue Feb 28 10:01:42 2023 +0900 bootconfig: Change message if no bootconfig with CONFIG_BOOT_CONFIG_FORCE=y Change no bootconfig data error message if user do not specify 'bootconfig' option but CONFIG_BOOT_CONFIG_FORCE=y. With CONFIG_BOOT_CONFIG_FORCE=y, the kernel proceeds bootconfig check even if user does not specify 'bootconfig' option. So the current error message is confusing. Let's show just an information message to notice skipping the bootconfig in that case. Link: https://lore.kernel.org/all/167754610254.318944.16848412476667893329.stgit@devnote2/ Fixes: b743852ccc1d ("Allow forcing unconditional bootconfig processing") Reported-by: Geert Uytterhoeven Link: https://lore.kernel.org/all/CAMuHMdV9jJvE2y8gY5V_CxidUikCf5515QMZHzTA3rRGEOj6=w@mail.gmail.com/ Suggested-by: Paul E. McKenney Signed-off-by: Masami Hiramatsu (Google) Tested-by: Paul E. McKenney Acked-by: Mukesh Ojha commit d701cf6578e8447af4ac0fa08e7c5a0fad6df1ae Author: Niklas Schnelle Date: Tue Feb 21 17:10:43 2023 +0100 MAINTAINERS: Update s390-iommu driver maintainer information The s390 DMA API conversion changes currently under review will extend the use of the s390-iommu driver to the DMA API. With s390's mandatory use of an IOMMU this means all DMA for PCI devices will then use the s390-iommu driver. With this in mind and considering my involvement in these changes it makes sense to reflect this increased interdependence in the maintainer structure. Thus add myself as first maintainer and move Gerald to reviewer status. Reviewed-by: Gerald Schaefer Reviewed-by: Matthew Rosato Acked-by: Peter Oberparleiter Signed-off-by: Niklas Schnelle Link: https://lore.kernel.org/r/20230221161043.37065-1-schnelle@linux.ibm.com Signed-off-by: Joerg Roedel commit e51f49512d98783b90799c9cc2002895ec3aa0eb Author: Ranjani Sridharan Date: Wed Mar 22 10:55:38 2023 +0200 ASoC: SOF: ipc4: Ensure DSP is in D0I0 during sof_ipc4_set_get_data() The set_get_data() IPC op bypasses the check for the no_pm flag as done with the regular IPC tx_msg op. Since set_get_data should be performed when the DSP is in D0I0, set the DSP power state to D0I0 before sending the IPC's in sof_ipc4_set_get_data(). Fixes: ceb89acc4dc8 ("ASoC: SOF: ipc4: Add support for mandatory message handling functionality") 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/20230322085538.10214-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit f355f70145744518ca1d9799b42f4a8da9aa0d36 Author: Felix Fietkau Date: Tue Mar 14 10:59:52 2023 +0100 wifi: mac80211: fix mesh path discovery based on unicast packets If a packet has reached its intended destination, it was bumped to the code that accepts it, without first checking if a mesh_path needs to be created based on the discovered source. Fix this by moving the destination address check further down. Cc: stable@vger.kernel.org Fixes: 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces") Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20230314095956.62085-3-nbd@nbd.name Signed-off-by: Johannes Berg commit 4e348c6c6e23491ae6eb5e077848a42d0562339c Author: Felix Fietkau Date: Tue Mar 14 10:59:50 2023 +0100 wifi: mac80211: fix qos on mesh interfaces When ieee80211_select_queue is called for mesh, the sta pointer is usually NULL, since the nexthop is looked up much later in the tx path. Explicitly check for unicast address in that case in order to make qos work again. Cc: stable@vger.kernel.org Fixes: 50e2ab392919 ("wifi: mac80211: fix queue selection for mesh/OCB interfaces") Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20230314095956.62085-1-nbd@nbd.name Signed-off-by: Johannes Berg commit 923bf981eb6ecc027227716e30701bdcc1845fbf Author: Johannes Berg Date: Fri Mar 17 10:53:25 2023 +0100 wifi: iwlwifi: mvm: protect TXQ list manipulation Some recent upstream debugging uncovered the fact that in iwlwifi, the TXQ list manipulation is racy. Introduce a new state bit for when the TXQ is completely ready and can be used without locking, and if that's not set yet acquire the lock to check everything correctly. Reviewed-by: Benjamin Berg Tested-by: Jose Ignacio Tornos Martinez Signed-off-by: Johannes Berg commit b58e3d4311b54b6dd0e37165277965da0c9eb21d Author: Johannes Berg Date: Fri Mar 17 10:53:24 2023 +0100 wifi: iwlwifi: mvm: fix mvmtxq->stopped handling This could race if the queue is redirected while full, then the flushing internally would start it while it's not yet usable again. Fix it by using two state bits instead of just one. Reviewed-by: Benjamin Berg Tested-by: Jose Ignacio Tornos Martinez Signed-off-by: Johannes Berg commit 66a1c22b709178e7b823d44465d0c2e5ed7492fb Author: Geert Uytterhoeven Date: Tue Mar 21 09:30:59 2023 +0100 mm/slab: Fix undefined init_cache_node_node() for NUMA and !SMP sh/migor_defconfig: mm/slab.c: In function ‘slab_memory_callback’: mm/slab.c:1127:23: error: implicit declaration of function ‘init_cache_node_node’; did you mean ‘drain_cache_node_node’? [-Werror=implicit-function-declaration] 1127 | ret = init_cache_node_node(nid); | ^~~~~~~~~~~~~~~~~~~~ | drain_cache_node_node The #ifdef condition protecting the definition of init_cache_node_node() no longer matches the conditions protecting the (multiple) users. Fix this by syncing the conditions. Fixes: 76af6a054da40553 ("mm/migrate: add CPU hotplug to demotion #ifdef") Reported-by: Randy Dunlap Link: https://lore.kernel.org/r/b5bdea22-ed2f-3187-6efe-0c72330270a4@infradead.org Signed-off-by: Geert Uytterhoeven Reviewed-by: John Paul Adrian Glaubitz Acked-by: Randy Dunlap Cc: Signed-off-by: Vlastimil Babka commit aa01c67de5926fdb276793180564f172c55fb0d7 Author: Caleb Sander Date: Mon Mar 20 09:57:36 2023 -0600 nvme-tcp: fix nvme_tcp_term_pdu to match spec The FEI field of C2HTermReq/H2CTermReq is 4 bytes but not 4-byte-aligned in the NVMe/TCP specification (it is located at offset 10 in the PDU). Split it into two 16-bit integers in struct nvme_tcp_term_pdu so no padding is inserted. There should also be 10 reserved bytes after. There are currently no users of this type. Fixes: fc221d05447aa6db ("nvme-tcp: Add protocol header") Reported-by: Geert Uytterhoeven Signed-off-by: Caleb Sander Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit def84ab600b71ea3fcc422a876d5d0d0daa7d4f3 Author: Martin George Date: Thu Mar 16 17:20:09 2023 +0530 nvme: send Identify with CNS 06h only to I/O controllers Identify CNS 06h (I/O Command Set Specific Identify Controller data structure) is supported only on i/o controllers. But nvme_init_non_mdts_limits() currently invokes this on all controllers. Correct this by ensuring this is sent to I/O controllers only. Signed-off-by: Martin George Signed-off-by: Christoph Hellwig commit 0eee5ae1025699ea93d44fdb6ef2365505082103 Author: Petr Tesarik Date: Tue Mar 21 09:31:27 2023 +0100 swiotlb: fix slot alignment checks Explicit alignment and page alignment are used only to calculate the stride, not when checking actual slot physical address. Originally, only page alignment was implemented, and that worked, because the whole SWIOTLB is allocated on a page boundary, so aligning the start index was sufficient to ensure a page-aligned slot. When commit 1f221a0d0dbf ("swiotlb: respect min_align_mask") added support for min_align_mask, the index could be incremented in the search loop, potentially finding an unaligned slot if minimum device alignment is between IO_TLB_SIZE and PAGE_SIZE. The bug could go unnoticed, because the slot size is 2 KiB, and the most common page size is 4 KiB, so there is no alignment value in between. IIUC the intention has been to find a slot that conforms to all alignment constraints: device minimum alignment, an explicit alignment (given as function parameter) and optionally page alignment (if allocation size is >= PAGE_SIZE). The most restrictive mask can be trivially computed with logical AND. The rest can stay. Fixes: 1f221a0d0dbf ("swiotlb: respect min_align_mask") Fixes: e81e99bacc9f ("swiotlb: Support aligned swiotlb buffers") Signed-off-by: Petr Tesarik Signed-off-by: Christoph Hellwig commit 39e7d2ab6ea9fd6b389091ec223d566934fe7be5 Author: Petr Tesarik Date: Tue Mar 21 09:31:26 2023 +0100 swiotlb: use wrap_area_index() instead of open-coding it No functional change, just use an existing helper. Signed-off-by: Petr Tesarik Signed-off-by: Christoph Hellwig commit 4107b8746d93ace135b8c4da4f19bbae81db785f Author: Zhang Changzhong Date: Tue Mar 21 14:45:43 2023 +1100 net/sonic: use dma_mapping_error() for error check The DMA address returned by dma_map_single() should be checked with dma_mapping_error(). Fix it accordingly. Fixes: efcce839360f ("[PATCH] macsonic/jazzsonic network drivers update") Signed-off-by: Zhang Changzhong Tested-by: Stan Johnson Signed-off-by: Finn Thain Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/6645a4b5c1e364312103f48b7b36783b94e197a2.1679370343.git.fthain@linux-m68k.org Signed-off-by: Jakub Kicinski commit 82463d9dbb5b90a64eb186afda47d703716d02a9 Merge: 8e50ed774554f 5291099e0f61a Author: Jakub Kicinski Date: Tue Mar 21 21:27:12 2023 -0700 Merge branch 'fix-trainwreck-with-ocelot-switch-statistics-counters' Vladimir Oltean says: ==================== Fix trainwreck with Ocelot switch statistics counters While testing the patch set for preemptible traffic classes with some controlled traffic and measuring counter deltas: https://lore.kernel.org/netdev/20230220122343.1156614-1-vladimir.oltean@nxp.com/ I noticed that in the output of "ethtool -S swp0 --groups eth-mac eth-phy eth-ctrl rmon -- --src emac | grep -v ': 0'", the TX counters were off. Quickly I realized that their values were permutated by 1 compared to their names, and that for example tx-rmon-etherStatsPkts64to64Octets was incrementing when tx-rmon-etherStatsPkts65to127Octets should have. Initially I suspected something having to do with the bulk reading logic, and indeed I found a bug there (fixed as 1/3), but that was not the source of the problems. Instead it revealed other problems. While dumping the regions created by the driver on my switch, I figured out that it sees a discontinuity which shouldn't have existed between reg 0x278 and reg 0x280. Discontinuity between last reg 0x0 and new reg 0x0, creating new region Discontinuity between last reg 0x108 and new reg 0x200, creating new region Discontinuity between last reg 0x278 and new reg 0x280, creating new region Discontinuity between last reg 0x2b0 and new reg 0x400, creating new region region of 67 contiguous counters starting with SYS:STAT:CNT[0x000] region of 31 contiguous counters starting with SYS:STAT:CNT[0x080] region of 13 contiguous counters starting with SYS:STAT:CNT[0x0a0] region of 18 contiguous counters starting with SYS:STAT:CNT[0x100] That is where TX_MM_HOLD should have been, and that was the bug, since it was missing. After adding it, the regions look like this and the off-by-one issue is resolved: Discontinuity between last reg 0x000000 and new reg 0x000000, creating new region Discontinuity between last reg 0x000108 and new reg 0x000200, creating new region Discontinuity between last reg 0x0002b0 and new reg 0x000400, creating new region region of 67 contiguous counters starting with SYS:STAT:CNT[0x000] region of 45 contiguous counters starting with SYS:STAT:CNT[0x080] region of 18 contiguous counters starting with SYS:STAT:CNT[0x100] However, as I am thinking out loud, it should have not reported the other counters as off by one even when skipping TX_MM_HOLD... after all, on Ocelot/Seville, there are more counters which need to be skipped. Which is when I investigated and noticed the bug solved in 2/3. I've validated that both on native VSC9959 (which uses ocelot_mm_stats_layout) as well as by faking the other switches by making VSC9959 use the plain ocelot_stats_layout. To summarize: on all Ocelot switches, the TX counters and drop counters are completely broken. The RX counters are mostly fine. With this occasion, I have collected more cleanup patches in this area, which I'm going to submit after the net -> net-next merge. ==================== Link: https://lore.kernel.org/r/20230321010325.897817-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 5291099e0f61a4a1f4d2e11ac2af8123ece17e0e Author: Vladimir Oltean Date: Tue Mar 21 03:03:25 2023 +0200 net: mscc: ocelot: add TX_MM_HOLD to ocelot_mm_stats_layout The lack of a definition for this counter is what initially prompted me to investigate a problem which really manifested itself as the previous change, "net: mscc: ocelot: fix transfer from region->buf to ocelot->stats". When TX_MM_HOLD is defined in enum ocelot_stat but not in struct ocelot_stat_layout ocelot_mm_stats_layout, this creates a hole, which due to the aforementioned bug, makes all counters following TX_MM_HOLD be recorded off by one compared to their correct position. So for example, a non-zero TX_PMAC_OCTETS would be reported as TX_MERGE_FRAGMENTS, TX_PMAC_UNICAST would be reported as TX_PMAC_OCTETS, TX_PMAC_64 would be reported as TX_PMAC_PAUSE, etc etc. This is because the size of the hole (1) is much smaller than the size of the region, so the phenomenon where the stats are off-by-one, rather than lost, prevails. However, the phenomenon where stats are lost can be seen too, for example with DROP_LOCAL, which is at the beginning of its own region (offset 0x000400 vs the previous 0x0002b0 constitutes a discontinuity). This is also reported as off by one and saved to TX_PMAC_1527_MAX, but that counter is not reported to the unstructured "ethtool -S", as opposed to DROP_LOCAL which is (as "drop_local"). Fixes: ab3f97a9610a ("net: mscc: ocelot: export ethtool MAC Merge stats for Felix VSC9959") Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 17dfd210459837b453c2a3c20406ee12082f151c Author: Vladimir Oltean Date: Tue Mar 21 03:03:24 2023 +0200 net: mscc: ocelot: fix transfer from region->buf to ocelot->stats To understand the problem, we need some definitions. The driver is aware of multiple counters (enum ocelot_stat), yet not all switches supported by the driver implement all counters. There are 2 statistics layouts: ocelot_stats_layout and ocelot_mm_stats_layout, the latter having 36 counters more than the former. ocelot->stats[] is not a compact array, i.e. there are elements within it which are not going to be populated for ocelot_stats_layout. On the other hand, ocelot->stats[] is easily indexable, for example "tx_octets" for port 3 can be found at ocelot->stats[3 * OCELOT_NUM_STATS + OCELOT_STAT_TX_OCTETS], and that is why we keep it sparse. Regions, as created by ocelot_prepare_stats_regions(), are compact (every element from region->buf will correspond to a counter that is present in this switch's layout) but are not easily indexable. Let's define holes as the ranges of values of enum ocelot_stat for which ocelot_stats_layout doesn't have a "reg" defined. For example, there is a hole between OCELOT_STAT_RX_GREEN_PRIO_7 and OCELOT_STAT_TX_OCTETS which is of 23 elements that are only present on ocelot_mm_stats_layout, and as such, they are also present in enum ocelot_stat. Let's define the left extremity of the hole - the last enum ocelot_stat still defined - as A (in this case OCELOT_STAT_RX_GREEN_PRIO_7) and the right extremity - the first enum ocelot_stat that is defined after a series of undefined ones - as B (in this case OCELOT_STAT_TX_OCTETS). There is a bug in the procedure which transfers stats from region->buf[] to ocelot->stats[]. For each hole in the ocelot_stats_layout, the logic transfers the stats starting with enum ocelot_stat B to ocelot->stats[] index A + 1. So all stats after a hole are saved to a position which is off by B - A + 1 elements. This causes 2 kinds of issues: (a) counters which shouldn't increment increment (b) counters which should increment don't Holes in the ocelot_stat_layout automatically imply the end of a region and the beginning of a new one; however the reverse is not necessarily true. For example, for ocelot_mm_stat_layout, there could be multiple regions (which indicate discontinuities in register addresses) while there is no hole (which indicates discontinuities in enum ocelot_stat values). In the example above, the stats from the second region->buf[] are not transferred to ocelot->stats starting with index "port * OCELOT_NUM_STATS + OCELOT_STAT_TX_OCTETS" as they should, but rather, starting with element "port * OCELOT_NUM_STATS + OCELOT_STAT_RX_GREEN_PRIO_7 + 1". That stats[] array element is not reported to user space for switches that use ocelot_stat_layout, and that is how issue (b) occurs. However, if the length of the second region is larger than the hole, then some stats will start to be transferred to the ocelot->stats[] indices which *are* reported to user space, but those indices contain wrong values (corresponding to unexpected counters). This is how issue (a) occurs. The procedure, as it was introduced in commit d87b1c08f38a ("net: mscc: ocelot: use bulk reads for stats"), was not buggy, because there were no holes in the struct ocelot_stat_layout instances at that time. The problem is that when those holes were introduced, the function was not updated to take them into consideration. To update the procedure, we need to know, for each region, which enum ocelot_stat corresponds to its region->base. We have no way of deducing that based on the contents of struct ocelot_stats_region, so we need to add this information. Fixes: ab3f97a9610a ("net: mscc: ocelot: export ethtool MAC Merge stats for Felix VSC9959") Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 6acc72a43eac78a309160d0a7512bbc59bcdd757 Author: Vladimir Oltean Date: Tue Mar 21 03:03:23 2023 +0200 net: mscc: ocelot: fix stats region batching The blamed commit changed struct ocelot_stat_layout :: "u32 offset" to "u32 reg". However, "u32 reg" is not quite a register address, but an enum ocelot_reg, which in itself encodes an enum ocelot_target target in the upper bits, and an index into the ocelot->map[target][] array in the lower bits. So, whereas the previous code comparison between stats_layout[i].offset and last + 1 was correct (because those "offsets" at the time were 32-bit relative addresses), the new code, comparing layout[i].reg to last + 4 is not correct, because the "reg" here is an enum/index, not an actual register address. What we want to compare are indeed register addresses, but to do that, we need to actually go through the same motions as __ocelot_bulk_read_ix() itself. With this bug, all statistics counters are deemed by ocelot_prepare_stats_regions() as constituting their own region. (Truncated) log on VSC9959 (Felix) below (prints added by me): Before: region of 1 contiguous counters starting with SYS:STAT:CNT[0x000] region of 1 contiguous counters starting with SYS:STAT:CNT[0x001] region of 1 contiguous counters starting with SYS:STAT:CNT[0x002] ... region of 1 contiguous counters starting with SYS:STAT:CNT[0x041] region of 1 contiguous counters starting with SYS:STAT:CNT[0x042] region of 1 contiguous counters starting with SYS:STAT:CNT[0x080] region of 1 contiguous counters starting with SYS:STAT:CNT[0x081] ... region of 1 contiguous counters starting with SYS:STAT:CNT[0x0ac] region of 1 contiguous counters starting with SYS:STAT:CNT[0x100] region of 1 contiguous counters starting with SYS:STAT:CNT[0x101] ... region of 1 contiguous counters starting with SYS:STAT:CNT[0x111] After: region of 67 contiguous counters starting with SYS:STAT:CNT[0x000] region of 45 contiguous counters starting with SYS:STAT:CNT[0x080] region of 18 contiguous counters starting with SYS:STAT:CNT[0x100] Since commit d87b1c08f38a ("net: mscc: ocelot: use bulk reads for stats") intended bulking as a performance improvement, and since now, with trivial-sized regions, performance is even worse than without bulking at all, this could easily qualify as a performance regression. Fixes: d4c367650704 ("net: mscc: ocelot: keep ocelot_stat_layout by reg address, not offset") Signed-off-by: Vladimir Oltean Acked-by: Colin Foster Tested-by: Colin Foster Signed-off-by: Jakub Kicinski commit 8e50ed774554f93d55426039b27b1e38d7fa64d8 Author: Eric Dumazet Date: Mon Mar 20 16:34:27 2023 +0000 erspan: do not use skb_mac_header() in ndo_start_xmit() Drivers should not assume skb_mac_header(skb) == skb->data in their ndo_start_xmit(). Use skb_network_offset() and skb_transport_offset() which better describe what is needed in erspan_fb_xmit() and ip6erspan_tunnel_xmit() syzbot reported: WARNING: CPU: 0 PID: 5083 at include/linux/skbuff.h:2873 skb_mac_header include/linux/skbuff.h:2873 [inline] WARNING: CPU: 0 PID: 5083 at include/linux/skbuff.h:2873 ip6erspan_tunnel_xmit+0x1d9c/0x2d90 net/ipv6/ip6_gre.c:962 Modules linked in: CPU: 0 PID: 5083 Comm: syz-executor406 Not tainted 6.3.0-rc2-syzkaller-00866-gd4671cb96fa3 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 RIP: 0010:skb_mac_header include/linux/skbuff.h:2873 [inline] RIP: 0010:ip6erspan_tunnel_xmit+0x1d9c/0x2d90 net/ipv6/ip6_gre.c:962 Code: 04 02 41 01 de 84 c0 74 08 3c 03 0f 8e 1c 0a 00 00 45 89 b4 24 c8 00 00 00 c6 85 77 fe ff ff 01 e9 33 e7 ff ff e8 b4 27 a1 f8 <0f> 0b e9 b6 e7 ff ff e8 a8 27 a1 f8 49 8d bf f0 0c 00 00 48 b8 00 RSP: 0018:ffffc90003b2f830 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 000000000000ffff RCX: 0000000000000000 RDX: ffff888021273a80 RSI: ffffffff88e1bd4c RDI: 0000000000000003 RBP: ffffc90003b2f9d8 R08: 0000000000000003 R09: 000000000000ffff R10: 000000000000ffff R11: 0000000000000000 R12: ffff88802b28da00 R13: 00000000000000d0 R14: ffff88807e25b6d0 R15: ffff888023408000 FS: 0000555556a61300(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055e5b11eb6e8 CR3: 0000000027c1b000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __netdev_start_xmit include/linux/netdevice.h:4900 [inline] netdev_start_xmit include/linux/netdevice.h:4914 [inline] __dev_direct_xmit+0x504/0x730 net/core/dev.c:4300 dev_direct_xmit include/linux/netdevice.h:3088 [inline] packet_xmit+0x20a/0x390 net/packet/af_packet.c:285 packet_snd net/packet/af_packet.c:3075 [inline] packet_sendmsg+0x31a0/0x5150 net/packet/af_packet.c:3107 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg+0xde/0x190 net/socket.c:747 __sys_sendto+0x23a/0x340 net/socket.c:2142 __do_sys_sendto net/socket.c:2154 [inline] __se_sys_sendto net/socket.c:2150 [inline] __x64_sys_sendto+0xe1/0x1b0 net/socket.c:2150 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:0x7f123aaa1039 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 14 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 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffc15d12058 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f123aaa1039 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 0000000000000000 R08: 0000000020000040 R09: 0000000000000014 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f123aa648c0 R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000 Fixes: 1baf5ebf8954 ("erspan: auto detect truncated packets.") Reported-by: syzbot Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230320163427.8096-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 4fe3c88552a3fbe1944426a4506a18cdeb457b5a Author: Li Zetao Date: Mon Mar 20 14:33:18 2023 +0000 atm: idt77252: fix kmemleak when rmmod idt77252 There are memory leaks reported by kmemleak: unreferenced object 0xffff888106500800 (size 128): comm "modprobe", pid 1017, jiffies 4297787785 (age 67.152s) 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: [<00000000970ce626>] __kmem_cache_alloc_node+0x20c/0x380 [<00000000fb5f78d9>] kmalloc_trace+0x2f/0xb0 [<000000000e947e2a>] idt77252_init_one+0x2847/0x3c90 [idt77252] [<000000006efb048e>] local_pci_probe+0xeb/0x1a0 ... unreferenced object 0xffff888106500b00 (size 128): comm "modprobe", pid 1017, jiffies 4297787785 (age 67.152s) hex dump (first 32 bytes): 00 20 3d 01 80 88 ff ff 00 20 3d 01 80 88 ff ff . =...... =..... f0 23 3d 01 80 88 ff ff 00 20 3d 01 00 00 00 00 .#=...... =..... backtrace: [<00000000970ce626>] __kmem_cache_alloc_node+0x20c/0x380 [<00000000fb5f78d9>] kmalloc_trace+0x2f/0xb0 [<00000000f451c5be>] alloc_scq.constprop.0+0x4a/0x400 [idt77252] [<00000000e6313849>] idt77252_init_one+0x28cf/0x3c90 [idt77252] The root cause is traced to the vc_maps which alloced in open_card_oam() are not freed in close_card_oam(). The vc_maps are used to record open connections, so when close a vc_map in close_card_oam(), the memory should be freed. Moreover, the ubr0 is not closed when close a idt77252 device, leading to the memory leak of vc_map and scq_info. Fix them by adding kfree in close_card_oam() and implementing new close_card_ubr0() to close ubr0. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Li Zetao Reviewed-by: Francois Romieu Link: https://lore.kernel.org/r/20230320143318.2644630-1-lizetao1@huawei.com Signed-off-by: Jakub Kicinski commit 968b66ffeb7956acc72836a7797aeb7b2444ec51 Author: Frank Crawford Date: Sat Mar 18 19:05:42 2023 +1100 hwmon (it87): Fix voltage scaling for chips with 10.9mV ADCs Fix voltage scaling for chips that have 10.9mV ADCs, where scaling was not performed. Fixes: ead8080351c9 ("hwmon: (it87) Add support for IT8732F") Signed-off-by: Frank Crawford Link: https://lore.kernel.org/r/20230318080543.1226700-2-frank@crawford.emu.id.au [groeck: Update subject and description to focus on bug fix] Signed-off-by: Guenter Roeck commit 3ced71d273f8edf07bf01a831a49ca6b988e06b3 Author: Kevin Locke Date: Tue Mar 21 15:39:22 2023 -0600 kbuild: deb-pkg: set version for linux-headers paths As a result of the switch to dh_listpackages, $version is no longer set when install_kernel_headers() is called. This causes files in the linux-headers deb package to be installed to a path with an empty $version (e.g. /usr/src/linux-headers-/scripts/sign-file rather than /usr/src/linux-headers-6.3.0-rc3/scripts/sign-file). To avoid this, while continuing to use the version information from dh_listpackages, pass $version from $package as the second argument of install_kernel_headers(). Fixes: 36862e14e316 ("kbuild: deb-pkg: use dh_listpackages to know enabled packages") Signed-off-by: Kevin Locke Signed-off-by: Masahiro Yamada commit 032a954061afd4b7426c3eb6bfd2952ef1e9a384 Author: Álvaro Fernández Rojas Date: Sun Mar 19 10:55:40 2023 +0100 net: dsa: tag_brcm: legacy: fix daisy-chained switches When BCM63xx internal switches are connected to switches with a 4-byte Broadcom tag, it does not identify the packet as VLAN tagged, so it adds one based on its PVID (which is likely 0). Right now, the packet is received by the BCM63xx internal switch and the 6-byte tag is properly processed. The next step would to decode the corresponding 4-byte tag. However, the internal switch adds an invalid VLAN tag after the 6-byte tag and the 4-byte tag handling fails. In order to fix this we need to remove the invalid VLAN tag after the 6-byte tag before passing it to the 4-byte tag decoding. Fixes: 964dbf186eaa ("net: dsa: tag_brcm: add support for legacy tags") Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Michal Swiatkowski Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20230319095540.239064-1-noltari@gmail.com Signed-off-by: Jakub Kicinski commit 9a801afd3eb95e1a89aba17321062df06fb49d98 Author: Dylan Jhong Date: Mon Mar 13 11:49:06 2023 +0800 riscv: mm: Fix incorrect ASID argument when flushing TLB Currently, we pass the CONTEXTID instead of the ASID to the TLB flush function. We should only take the ASID field to prevent from touching the reserved bit field. Fixes: 3f1e782998cd ("riscv: add ASID-based tlbflushing methods") Signed-off-by: Dylan Jhong Reviewed-by: Sergey Matyukevich Link: https://lore.kernel.org/r/20230313034906.2401730-1-dylan@andestech.com Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit a1effab7a3a35a837dd9d2b974a1bc4939df1ad5 Merge: a2eaf246f5732 4928f67bc911e Author: Linus Torvalds Date: Tue Mar 21 15:46:39 2023 -0700 Merge tag 'vfio-v6.3-rc4' of https://github.com/awilliam/linux-vfio Pull VFIO fix from Alex Williamson: - Fix dirty size reporting for pre-copy in mlx5 variant driver (Yishai Hadas) * tag 'vfio-v6.3-rc4' of https://github.com/awilliam/linux-vfio: vfio/mlx5: Fix the report of dirty_bytes upon pre-copy commit a2eaf246f5732519f3dcc34e18fd41909e226284 Merge: 2faac9a98f010 27c934dd8832d Author: Linus Torvalds Date: Tue Mar 21 14:48:38 2023 -0700 Merge tag 'nfsd-6.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fixes from Chuck Lever: - Fix a crash during NFS READs from certain client implementations - Address a minor kbuild regression in v6.3 * tag 'nfsd-6.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: nfsd: don't replace page in rq_pages if it's a continuation of last page NFS & NFSD: Update GSS dependencies commit 640fcdbcf27fc62de9223f958ceb4e897a00e791 Author: Dan Carpenter Date: Mon Feb 27 14:16:10 2023 +0300 net/mlx5: E-Switch, Fix an Oops in error handling code The error handling dereferences "vport". There is nothing we can do if it is an error pointer except returning the error code. Fixes: 133dcfc577ea ("net/mlx5: E-Switch, Alloc and free unique metadata for match") Signed-off-by: Dan Carpenter Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 44d553188c38ac74b799dfdcebafef2f7bb70942 Author: Maher Sanalla Date: Wed Mar 15 11:04:38 2023 +0200 net/mlx5: Read the TC mapping of all priorities on ETS query When ETS configurations are queried by the user to get the mapping assignment between packet priority and traffic class, only priorities up to maximum TCs are queried from QTCT register in FW to retrieve their assigned TC, leaving the rest of the priorities mapped to the default TC #0 which might be misleading. Fix by querying the TC mapping of all priorities on each ETS query, regardless of the maximum number of TCs configured in FW. Fixes: 820c2c5e773d ("net/mlx5e: Read ETS settings directly from firmware") Signed-off-by: Maher Sanalla Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 7e3fce82d945cf6e7f99034b113ff2d250d7524d Author: Emeel Hakim Date: Mon Mar 20 13:13:55 2023 +0200 net/mlx5e: Overcome slow response for first macsec ASO WQE First ASO WQE poll causes a cache miss in hardware hence the resut is delayed. It causes to the situation where such WQE is polled earlier than it is needed. Add logic to retry ASO CQ polling operation. Fixes: 739cfa34518e ("net/mlx5: Make ASO poll CQ usable in atomic context")  Signed-off-by: Emeel Hakim Reviewed-by: Leon Romanovsky Reviewed-by: Raed Salem Signed-off-by: Saeed Mahameed commit 6e9d51b1a5cb8d750c3daf89db4f4cdfd1051819 Author: Roy Novich Date: Wed Mar 1 15:47:11 2023 +0200 net/mlx5e: Initialize link speed to zero mlx5e_port_max_linkspeed does not guarantee value assignment for speed. Avoid cases where link_speed might be used uninitialized. In case mlx5e_port_max_linkspeed fails, a default link speed of 50000 will be used for the calculations. Fixes: 3f6d08d196b2 ("net/mlx5e: Add RSS support for hairpin") Signed-off-by: Roy Novich Reviewed-by: Tariq Toukan Reviewed-by: Aya Levin Signed-off-by: Saeed Mahameed commit 922f56e9a795d6f3dd72d3428ebdd7ee040fa855 Author: Lama Kayal Date: Tue Jan 31 14:07:03 2023 +0200 net/mlx5: Fix steering rules cleanup vport's mc, uc and multicast rules are not deleted in teardown path when EEH happens. Since the vport's promisc settings(uc, mc and all) in firmware are reset after EEH, mlx5 driver will try to delete the above rules in the initialization path. This cause kernel crash because these software rules are no longer valid. Fix by nullifying these rules right after delete to avoid accessing any dangling pointers. Call Trace: __list_del_entry_valid+0xcc/0x100 (unreliable) tree_put_node+0xf4/0x1b0 [mlx5_core] tree_remove_node+0x30/0x70 [mlx5_core] mlx5_del_flow_rules+0x14c/0x1f0 [mlx5_core] esw_apply_vport_rx_mode+0x10c/0x200 [mlx5_core] esw_update_vport_rx_mode+0xb4/0x180 [mlx5_core] esw_vport_change_handle_locked+0x1ec/0x230 [mlx5_core] esw_enable_vport+0x130/0x260 [mlx5_core] mlx5_eswitch_enable_sriov+0x2a0/0x2f0 [mlx5_core] mlx5_device_enable_sriov+0x74/0x440 [mlx5_core] mlx5_load_one+0x114c/0x1550 [mlx5_core] mlx5_pci_resume+0x68/0xf0 [mlx5_core] eeh_report_resume+0x1a4/0x230 eeh_pe_dev_traverse+0x98/0x170 eeh_handle_normal_event+0x3e4/0x640 eeh_handle_event+0x4c/0x370 eeh_event_handler+0x14c/0x210 kthread+0x168/0x1b0 ret_from_kernel_thread+0x5c/0x84 Fixes: a35f71f27a61 ("net/mlx5: E-Switch, Implement promiscuous rx modes vf request handling") Signed-off-by: Huy Nguyen Signed-off-by: Lama Kayal Reviewed-by: Tariq Toukan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit 662404b24a4c4d839839ed25e3097571f5938b9b Author: Gavin Li Date: Thu Feb 9 12:48:52 2023 +0200 net/mlx5e: Block entering switchdev mode with ns inconsistency Upon entering switchdev mode, VF/SF representors are spawned in the devlink instance's net namespace, whereas the PF net device transforms into the uplink representor, remaining in the net namespace the PF net device was in. Therefore, if a PF net device's namespace is different from its parent devlink net namespace, entering switchdev mode can create an illegal situation where all representors sharing the same core device are NOT in the same net namespace. To avoid this issue, block entering switchdev mode for devices whose child netdev net namespace has diverged from the parent devlink's. Fixes: 7768d1971de6 ("net/mlx5: E-Switch, Add control for encapsulation") Signed-off-by: Gavin Li Reviewed-by: Gavi Teitz Signed-off-by: Saeed Mahameed commit c83172b0639c8a005c0dd3b36252dc22ddd9f19c Author: Gavin Li Date: Fri Nov 25 04:15:40 2022 +0200 net/mlx5e: Set uplink rep as NETNS_LOCAL Previously, NETNS_LOCAL was not set for uplink representors, inconsistent with VF representors, and allowed the uplink representor to be moved between net namespaces and separated from the VF representors it shares the core device with. Such usage would break the isolation model of namespaces, as devices in different namespaces would have access to shared memory. To solve this issue, set NETNS_LOCAL for uplink representors if eswitch is in switchdev mode. Fixes: 7a9fb35e8c3a ("net/mlx5e: Do not reload ethernet ports when changing eswitch mode") Signed-off-by: Gavin Li Reviewed-by: Gavi Teitz Signed-off-by: Saeed Mahameed commit 10ec8ca8ec1a2f04c4ed90897225231c58c124a7 Author: Daniel Borkmann Date: Mon Mar 20 15:37:25 2023 +0100 bpf: Adjust insufficient default bpf_jit_limit We've seen recent AWS EKS (Kubernetes) user reports like the following: After upgrading EKS nodes from v20230203 to v20230217 on our 1.24 EKS clusters after a few days a number of the nodes have containers stuck in ContainerCreating state or liveness/readiness probes reporting the following error: Readiness probe errored: rpc error: code = Unknown desc = failed to exec in container: failed to start exec "4a11039f730203ffc003b7[...]": OCI runtime exec failed: exec failed: unable to start container process: unable to init seccomp: error loading seccomp filter into kernel: error loading seccomp filter: errno 524: unknown However, we had not been seeing this issue on previous AMIs and it only started to occur on v20230217 (following the upgrade from kernel 5.4 to 5.10) with no other changes to the underlying cluster or workloads. We tried the suggestions from that issue (sysctl net.core.bpf_jit_limit=452534528) which helped to immediately allow containers to be created and probes to execute but after approximately a day the issue returned and the value returned by cat /proc/vmallocinfo | grep bpf_jit | awk '{s+=$2} END {print s}' was steadily increasing. I tested bpf tree to observe bpf_jit_charge_modmem, bpf_jit_uncharge_modmem their sizes passed in as well as bpf_jit_current under tcpdump BPF filter, seccomp BPF and native (e)BPF programs, and the behavior all looks sane and expected, that is nothing "leaking" from an upstream perspective. The bpf_jit_limit knob was originally added in order to avoid a situation where unprivileged applications loading BPF programs (e.g. seccomp BPF policies) consuming all the module memory space via BPF JIT such that loading of kernel modules would be prevented. The default limit was defined back in 2018 and while good enough back then, we are generally seeing far more BPF consumers today. Adjust the limit for the BPF JIT pool from originally 1/4 to now 1/2 of the module memory space to better reflect today's needs and avoid more users running into potentially hard to debug issues. Fixes: fdadd04931c2 ("bpf: fix bpf_jit_limit knob for PAGE_SIZE >= 64K") Reported-by: Stephen Haynes Reported-by: Lefteris Alexakis Signed-off-by: Daniel Borkmann Link: https://github.com/awslabs/amazon-eks-ami/issues/1179 Link: https://github.com/awslabs/amazon-eks-ami/issues/1219 Reviewed-by: Kuniyuki Iwashima Link: https://lore.kernel.org/r/20230320143725.8394-1-daniel@iogearbox.net Signed-off-by: Alexei Starovoitov commit fbaa38214cd9e150764ccaa82e04ecf42cc1140c Author: Lukas Wunner Date: Sat Mar 11 15:40:01 2023 +0100 cxl/pci: Fix CDAT retrieval on big endian The CDAT exposed in sysfs differs between little endian and big endian arches: On big endian, every 4 bytes are byte-swapped. PCI Configuration Space is little endian (PCI r3.0 sec 6.1). Accessors such as pci_read_config_dword() implicitly swap bytes on big endian. That way, the macros in include/uapi/linux/pci_regs.h work regardless of the arch's endianness. For an example of implicit byte-swapping, see ppc4xx_pciex_read_config(), which calls in_le32(), which uses lwbrx (Load Word Byte-Reverse Indexed). DOE Read/Write Data Mailbox Registers are unlike other registers in Configuration Space in that they contain or receive a 4 byte portion of an opaque byte stream (a "Data Object" per PCIe r6.0 sec 7.9.24.5f). They need to be copied to or from the request/response buffer verbatim. So amend pci_doe_send_req() and pci_doe_recv_resp() to undo the implicit byte-swapping. The CXL_DOE_TABLE_ACCESS_* and PCI_DOE_DATA_OBJECT_DISC_* macros assume implicit byte-swapping. Byte-swap requests after constructing them with those macros and byte-swap responses before parsing them. Change the request and response type to __le32 to avoid sparse warnings. Per a request from Jonathan, replace sizeof(u32) with sizeof(__le32) for consistency. Fixes: c97006046c79 ("cxl/port: Read CDAT table") Tested-by: Ira Weiny Signed-off-by: Lukas Wunner Reviewed-by: Dan Williams Cc: stable@vger.kernel.org # v6.0+ Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/3051114102f41d19df3debbee123129118fc5e6d.1678543498.git.lukas@wunner.de Signed-off-by: Dan Williams commit 2faac9a98f010cf5b342fa89ac489c4586364e6e Merge: 17214b70a159c 3584c1dbfffda Author: Linus Torvalds Date: Tue Mar 21 11:38:58 2023 -0700 Merge tag 'keys-fixes-20230321' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull keyrings fixes from David Howells: - Fix request_key() so that it doesn't cache a looked up key on the current thread if that thread is a kernel thread. The cache is cleared during notify_resume - but that doesn't happen in kernel threads. This is causing cifs DNS keys to be un-invalidateable. - Fix a wrapper check in verify_pefile() to not round up the length. - Change asymmetric_keys code to log errors to make it easier for users to work out why failures occurred. * tag 'keys-fixes-20230321' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: asymmetric_keys: log on fatal failures in PE/pkcs7 verify_pefile: relax wrapper length check keys: Do not cache key in task struct if key is requested from kernel thread commit c672297bbc0e86dbf88396b8053e2fbb173f16ff Author: Radoslaw Tyl Date: Mon Mar 13 15:07:33 2023 +0100 i40e: fix flow director packet filter programming Initialize to zero structures to build a valid Tx Packet used for the filter programming. Fixes: a9219b332f52 ("i40e: VLAN field for flow director") Signed-off-by: Radoslaw Tyl Reviewed-by: Michal Swiatkowski Tested-by: Arpana Arland (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 4e264be98b88a6d6f476c11087fe865696e8bef5 Author: Stefan Assmann Date: Mon Mar 13 17:06:45 2023 +0100 iavf: fix hang on reboot with ice When a system with E810 with existing VFs gets rebooted the following hang may be observed. Pid 1 is hung in iavf_remove(), part of a network driver: PID: 1 TASK: ffff965400e5a340 CPU: 24 COMMAND: "systemd-shutdow" #0 [ffffaad04005fa50] __schedule at ffffffff8b3239cb #1 [ffffaad04005fae8] schedule at ffffffff8b323e2d #2 [ffffaad04005fb00] schedule_hrtimeout_range_clock at ffffffff8b32cebc #3 [ffffaad04005fb80] usleep_range_state at ffffffff8b32c930 #4 [ffffaad04005fbb0] iavf_remove at ffffffffc12b9b4c [iavf] #5 [ffffaad04005fbf0] pci_device_remove at ffffffff8add7513 #6 [ffffaad04005fc10] device_release_driver_internal at ffffffff8af08baa #7 [ffffaad04005fc40] pci_stop_bus_device at ffffffff8adcc5fc #8 [ffffaad04005fc60] pci_stop_and_remove_bus_device at ffffffff8adcc81e #9 [ffffaad04005fc70] pci_iov_remove_virtfn at ffffffff8adf9429 #10 [ffffaad04005fca8] sriov_disable at ffffffff8adf98e4 #11 [ffffaad04005fcc8] ice_free_vfs at ffffffffc04bb2c8 [ice] #12 [ffffaad04005fd10] ice_remove at ffffffffc04778fe [ice] #13 [ffffaad04005fd38] ice_shutdown at ffffffffc0477946 [ice] #14 [ffffaad04005fd50] pci_device_shutdown at ffffffff8add58f1 #15 [ffffaad04005fd70] device_shutdown at ffffffff8af05386 #16 [ffffaad04005fd98] kernel_restart at ffffffff8a92a870 #17 [ffffaad04005fda8] __do_sys_reboot at ffffffff8a92abd6 #18 [ffffaad04005fee0] do_syscall_64 at ffffffff8b317159 #19 [ffffaad04005ff08] __context_tracking_enter at ffffffff8b31b6fc #20 [ffffaad04005ff18] syscall_exit_to_user_mode at ffffffff8b31b50d #21 [ffffaad04005ff28] do_syscall_64 at ffffffff8b317169 #22 [ffffaad04005ff50] entry_SYSCALL_64_after_hwframe at ffffffff8b40009b RIP: 00007f1baa5c13d7 RSP: 00007fffbcc55a98 RFLAGS: 00000202 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f1baa5c13d7 RDX: 0000000001234567 RSI: 0000000028121969 RDI: 00000000fee1dead RBP: 00007fffbcc55ca0 R8: 0000000000000000 R9: 00007fffbcc54e90 R10: 00007fffbcc55050 R11: 0000000000000202 R12: 0000000000000005 R13: 0000000000000000 R14: 00007fffbcc55af0 R15: 0000000000000000 ORIG_RAX: 00000000000000a9 CS: 0033 SS: 002b During reboot all drivers PM shutdown callbacks are invoked. In iavf_shutdown() the adapter state is changed to __IAVF_REMOVE. In ice_shutdown() the call chain above is executed, which at some point calls iavf_remove(). However iavf_remove() expects the VF to be in one of the states __IAVF_RUNNING, __IAVF_DOWN or __IAVF_INIT_FAILED. If that's not the case it sleeps forever. So if iavf_shutdown() gets invoked before iavf_remove() the system will hang indefinitely because the adapter is already in state __IAVF_REMOVE. Fix this by returning from iavf_remove() if the state is __IAVF_REMOVE, as we already went through iavf_shutdown(). Fixes: 974578017fc1 ("iavf: Add waiting so the port is initialized in remove") Fixes: a8417330f8a5 ("iavf: Fix race condition between iavf_shutdown and iavf_remove") Reported-by: Marius Cornea Signed-off-by: Stefan Assmann Reviewed-by: Michal Kubiak Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit cdce67099117ece371582f706c6eff7d3a65326d Author: Yoshihiro Shimoda Date: Fri Mar 10 21:34:58 2023 +0900 PCI: dwc: Fix PORT_LINK_CONTROL update when CDM check enabled If CDM_CHECK is enabled (by the DT "snps,enable-cdm-check" property), 'val' is overwritten by PCIE_PL_CHK_REG_CONTROL_STATUS initialization. Commit ec7b952f453c ("PCI: dwc: Always enable CDM check if "snps,enable-cdm-check" exists") did not account for further usage of 'val', so we wrote improper values to PCIE_PORT_LINK_CONTROL when the CDM check is enabled. Move the PCIE_PORT_LINK_CONTROL update to be completely after the PCIE_PL_CHK_REG_CONTROL_STATUS register initialization. [bhelgaas: commit log adapted from Serge's version] Fixes: ec7b952f453c ("PCI: dwc: Always enable CDM check if "snps,enable-cdm-check" exists") Link: https://lore.kernel.org/r/20230310123510.675685-2-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Yoshihiro Shimoda Signed-off-by: Bjorn Helgaas Reviewed-by: Serge Semin commit 632e04739c8f45c2d9ca4d4c5bd18d80c2ac9296 Author: Alexander Stein Date: Fri Mar 10 08:49:40 2023 +0100 clk: rs9: Fix suspend/resume Disabling the cache in commit 2ff4ba9e3702 ("clk: rs9: Fix I2C accessors") without removing cache synchronization in resume path results in a kernel panic as map->cache_ops is unset, due to REGCACHE_NONE. Enable flat cache again to support resume again. num_reg_defaults_raw is necessary to read the cache defaults from hardware. Some registers are strapped in hardware and cannot be provided in software. Fixes: 2ff4ba9e3702 ("clk: rs9: Fix I2C accessors") Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20230310074940.3475703-1-alexander.stein@ew.tq-group.com Signed-off-by: Stephen Boyd commit 7d46c0e670d5f646879b52bacc387bf48ff0e7f1 Author: Michal Swiatkowski Date: Mon Mar 13 13:09:15 2023 +0100 ice: remove filters only if VSI is deleted Filters shouldn't be removed in VSI rebuild path. Removing them on PF VSI results in no rule for PF MAC after changing for example queues amount. Remove all filters only in the VSI remove flow. As unload should also cause the filter to be removed introduce, a new function ice_stop_eth(). It will unroll ice_start_eth(), so remove filters and close VSI. Fixes: 6624e780a577 ("ice: split ice_vsi_setup into smaller functions") Signed-off-by: Michal Swiatkowski Tested-by: Arpana Arland (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 83b49e7f63da88a1544cba2b2e40bfabb24bd203 Author: Michal Swiatkowski Date: Fri Mar 10 12:33:44 2023 +0100 ice: check if VF exists before mode check Setting trust on VF should return EINVAL when there is no VF. Move checking for switchdev mode after checking if VF exists. Fixes: c54d209c78b8 ("ice: Wait for VF to be reset/ready before configuration") Signed-off-by: Michal Swiatkowski Signed-off-by: Kalyan Kodamagula Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit 387d42ae6df76d2ae813432d05630535a5480038 Author: Piotr Raczynski Date: Thu Mar 9 13:38:56 2023 -0800 ice: fix rx buffers handling for flow director packets Adding flow director filters stopped working correctly after commit 2fba7dc5157b ("ice: Add support for XDP multi-buffer on Rx side"). As a result, only first flow director filter can be added, adding next filter leads to NULL pointer dereference attached below. Rx buffer handling and reallocation logic has been optimized, however flow director specific traffic was not accounted for. As a result driver handled those packets incorrectly since new logic was based on ice_rx_ring::first_desc which was not set in this case. Fix this by setting struct ice_rx_ring::first_desc to next_to_clean for flow director received packets. [ 438.544867] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 438.551840] #PF: supervisor read access in kernel mode [ 438.556978] #PF: error_code(0x0000) - not-present page [ 438.562115] PGD 7c953b2067 P4D 0 [ 438.565436] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 438.569794] CPU: 0 PID: 0 Comm: swapper/0 Kdump: loaded Not tainted 6.2.0-net-bug #1 [ 438.577531] Hardware name: Intel Corporation M50CYP2SBSTD/M50CYP2SBSTD, BIOS SE5C620.86B.01.01.0005.2202160810 02/16/2022 [ 438.588470] RIP: 0010:ice_clean_rx_irq+0x2b9/0xf20 [ice] [ 438.593860] Code: 45 89 f7 e9 ac 00 00 00 8b 4d 78 41 31 4e 10 41 09 d5 4d 85 f6 0f 84 82 00 00 00 49 8b 4e 08 41 8b 76 1c 65 8b 3d 47 36 4a 3f <48> 8b 11 48 c1 ea 36 39 d7 0f 85 a6 00 00 00 f6 41 08 02 0f 85 9c [ 438.612605] RSP: 0018:ff8c732640003ec8 EFLAGS: 00010082 [ 438.617831] RAX: 0000000000000800 RBX: 00000000000007ff RCX: 0000000000000000 [ 438.624957] RDX: 0000000000000800 RSI: 0000000000000000 RDI: 0000000000000000 [ 438.632089] RBP: ff4ed275a2158200 R08: 00000000ffffffff R09: 0000000000000020 [ 438.639222] R10: 0000000000000000 R11: 0000000000000020 R12: 0000000000001000 [ 438.646356] R13: 0000000000000000 R14: ff4ed275d0daffe0 R15: 0000000000000000 [ 438.653485] FS: 0000000000000000(0000) GS:ff4ed2738fa00000(0000) knlGS:0000000000000000 [ 438.661563] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 438.667310] CR2: 0000000000000000 CR3: 0000007c9f0d6006 CR4: 0000000000771ef0 [ 438.674444] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 438.681573] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 438.688697] PKRU: 55555554 [ 438.691404] Call Trace: [ 438.693857] [ 438.695877] ? profile_tick+0x17/0x80 [ 438.699542] ice_msix_clean_ctrl_vsi+0x24/0x50 [ice] [ 438.702571] ice 0000:b1:00.0: VF 1: ctrl_vsi irq timeout [ 438.704542] __handle_irq_event_percpu+0x43/0x1a0 [ 438.704549] handle_irq_event+0x34/0x70 [ 438.704554] handle_edge_irq+0x9f/0x240 [ 438.709901] iavf 0000:b1:01.1: Failed to add Flow Director filter with status: 6 [ 438.714571] __common_interrupt+0x63/0x100 [ 438.714580] common_interrupt+0xb4/0xd0 [ 438.718424] iavf 0000:b1:01.1: Rule ID: 127 dst_ip: 0.0.0.0 src_ip 0.0.0.0 UDP: dst_port 4 src_port 0 [ 438.722255] [ 438.722257] [ 438.722257] asm_common_interrupt+0x22/0x40 [ 438.722262] RIP: 0010:cpuidle_enter_state+0xc8/0x430 [ 438.722267] Code: 6e e9 25 ff e8 f9 ef ff ff 8b 53 04 49 89 c5 0f 1f 44 00 00 31 ff e8 d7 f1 24 ff 45 84 ff 0f 85 57 02 00 00 fb 0f 1f 44 00 00 <45> 85 f6 0f 88 85 01 00 00 49 63 d6 48 8d 04 52 48 8d 04 82 49 8d [ 438.722269] RSP: 0018:ffffffff86003e50 EFLAGS: 00000246 [ 438.784108] RAX: ff4ed2738fa00000 RBX: ffbe72a64fc01020 RCX: 0000000000000000 [ 438.791234] RDX: 0000000000000000 RSI: ffffffff858d84de RDI: ffffffff85893641 [ 438.798365] RBP: 0000000000000002 R08: 0000000000000002 R09: 000000003158af9d [ 438.805490] R10: 0000000000000008 R11: 0000000000000354 R12: ffffffff862365a0 [ 438.812622] R13: 000000661b472a87 R14: 0000000000000002 R15: 0000000000000000 [ 438.819757] cpuidle_enter+0x29/0x40 [ 438.823333] do_idle+0x1b6/0x230 [ 438.826566] cpu_startup_entry+0x19/0x20 [ 438.830492] rest_init+0xcb/0xd0 [ 438.833717] arch_call_rest_init+0xa/0x30 [ 438.837731] start_kernel+0x776/0xb70 [ 438.841396] secondary_startup_64_no_verify+0xe5/0xeb [ 438.846449] Fixes: 2fba7dc5157b ("ice: Add support for XDP multi-buffer on Rx side") Signed-off-by: Piotr Raczynski Acked-by: Maciej Fijalkowski Reviewed-by: Simon Horman Tested-by: Arpana Arland (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 3584c1dbfffdabf8e3dc1dd25748bb38dd01cd43 Author: Robbie Harwood Date: Mon Feb 20 12:12:54 2023 -0500 asymmetric_keys: log on fatal failures in PE/pkcs7 These particular errors can be encountered while trying to kexec when secureboot lockdown is in place. Without this change, even with a signed debug build, one still needs to reboot the machine to add the appropriate dyndbg parameters (since lockdown blocks debugfs). Accordingly, upgrade all pr_debug() before fatal error into pr_warn(). Signed-off-by: Robbie Harwood Signed-off-by: David Howells cc: Jarkko Sakkinen cc: Eric Biederman cc: Herbert Xu cc: keyrings@vger.kernel.org cc: linux-crypto@vger.kernel.org cc: kexec@lists.infradead.org Link: https://lore.kernel.org/r/20230220171254.592347-3-rharwood@redhat.com/ # v2 commit 4fc5c74dde69a7eda172514aaeb5a7df3600adb3 Author: Robbie Harwood Date: Mon Feb 20 12:12:53 2023 -0500 verify_pefile: relax wrapper length check The PE Format Specification (section "The Attribute Certificate Table (Image Only)") states that `dwLength` is to be rounded up to 8-byte alignment when used for traversal. Therefore, the field is not required to be an 8-byte multiple in the first place. Accordingly, pesign has not performed this alignment since version 0.110. This causes kexec failure on pesign'd binaries with "PEFILE: Signature wrapper len wrong". Update the comment and relax the check. Signed-off-by: Robbie Harwood Signed-off-by: David Howells cc: Jarkko Sakkinen cc: Eric Biederman cc: Herbert Xu cc: keyrings@vger.kernel.org cc: linux-crypto@vger.kernel.org cc: kexec@lists.infradead.org Link: https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#the-attribute-certificate-table-image-only Link: https://github.com/rhboot/pesign Link: https://lore.kernel.org/r/20230220171254.592347-2-rharwood@redhat.com/ # v2 commit 47f9e4c924025c5be87959d3335e66fcbb7f6b5c Author: David Howells Date: Tue Mar 14 15:15:18 2023 +0000 keys: Do not cache key in task struct if key is requested from kernel thread The key which gets cached in task structure from a kernel thread does not get invalidated even after expiry. Due to which, a new key request from kernel thread will be served with the cached key if it's present in task struct irrespective of the key validity. The change is to not cache key in task_struct when key requested from kernel thread so that kernel thread gets a valid key on every key request. The problem has been seen with the cifs module doing DNS lookups from a kernel thread and the results getting pinned by being attached to that kernel thread's cache - and thus not something that can be easily got rid of. The cache would ordinarily be cleared by notify-resume, but kernel threads don't do that. This isn't seen with AFS because AFS is doing request_key() within the kernel half of a user thread - which will do notify-resume. Fixes: 7743c48e54ee ("keys: Cache result of request_key*() temporarily in task_struct") Signed-off-by: Bharath SM Signed-off-by: David Howells Reviewed-by: Jarkko Sakkinen cc: Shyam Prasad N cc: Steve French cc: keyrings@vger.kernel.org cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/CAGypqWw951d=zYRbdgNR4snUDvJhWL=q3=WOyh7HhSJupjz2vA@mail.gmail.com/ commit b69245126a48e50882021180fa5d264dc7149ccc Author: Masami Hiramatsu (Google) Date: Wed Mar 15 22:54:08 2023 +0900 bootconfig: Fix testcase to increase max node Since commit 6c40624930c5 ("bootconfig: Increase max nodes of bootconfig from 1024 to 8192 for DCC support") increased the max number of bootconfig node to 8192, the bootconfig testcase of the max number of nodes fails. To fix this issue, we can not simply increase the number in the test script because the test bootconfig file becomes too big (>32KB). To fix that, we can use a combination of three alphabets (26^3 = 17576). But with that, we can not express the 8193 (just one exceed from the limitation) because it also exceeds the max size of bootconfig. So, the first 26 nodes will just use one alphabet. With this fix, test-bootconfig.sh passes all tests. Link: https://lore.kernel.org/all/167888844790.791176.670805252426835131.stgit@devnote2/ Reported-by: Heinz Wiesinger Link: https://lore.kernel.org/all/2463802.XAFRqVoOGU@amaterasu.liwjatan.org Fixes: 6c40624930c5 ("bootconfig: Increase max nodes of bootconfig from 1024 to 8192 for DCC support") Signed-off-by: Masami Hiramatsu (Google) Reviewed-by: Steven Rostedt (Google) commit 4dd52392b5d75d88acf0d16eb69fe30d0de8c225 Merge: 840525415bdb2 735e7b30a53a1 Author: Greg Kroah-Hartman Date: Tue Mar 21 16:36:45 2023 +0100 Merge tag 'coresight-fixes-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux into char-misc-linus Suzuki writes: coresight: Fixes for v6.3 Fixes for coresight subsystem includes: - Fix etm4_enable_hw to program all the address comparator pairs (instead of half of them) - Do not access TRCIDR1 register without OSLK cleared in etm4_probe for mmio access. Signed-off-by: Suzuki K Poulose * tag 'coresight-fixes-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux: coresight: etm4x: Do not access TRCIDR1 for identification coresight-etm4: Fix for() loop drvdata->nr_addr_cmp range bug commit 813cc94c7847ae4a17e9f744fb4dbdf7df6bd732 Author: Tianyi Jing Date: Sat Mar 18 22:38:51 2023 +0800 hwmon: (xgene) Fix ioremap and memremap leak Smatch reports: drivers/hwmon/xgene-hwmon.c:757 xgene_hwmon_probe() warn: 'ctx->pcc_comm_addr' from ioremap() not released on line: 757. This is because in drivers/hwmon/xgene-hwmon.c:701 xgene_hwmon_probe(), ioremap and memremap is not released, which may cause a leak. To fix this, ioremap and memremap is modified to devm_ioremap and devm_memremap. Signed-off-by: Tianyi Jing Reviewed-by: Dongliang Mu Link: https://lore.kernel.org/r/20230318143851.2191625-1-jingfelix@hust.edu.cn [groeck: Fixed formatting and subject] Signed-off-by: Guenter Roeck commit 2315332efcbe7124252f080e03b57d3d2f1f4771 Author: Phinex Hung Date: Tue Mar 21 14:02:23 2023 +0800 hwmon: fix potential sensor registration fail if of_node is missing It is not sufficient to check of_node in current device. In some cases, this would cause the sensor registration to fail. This patch looks for device's ancestors to find a valid of_node if any. Fixes: d560168b5d0f ("hwmon: (core) New hwmon registration API") Signed-off-by: Phinex Hung Link: https://lore.kernel.org/r/20230321060224.3819-1-phinex@realtek.com Signed-off-by: Guenter Roeck commit 2b91c4a870c9830eaf95e744454c9c218cccb736 Author: Iwona Winiarska Date: Tue Mar 21 10:04:10 2023 +0100 hwmon: (peci/cputemp) Fix miscalculated DTS for SKX For Skylake, DTS temperature of the CPU is reported in S10.6 format instead of S8.8. Reported-by: Paul Fertser Link: https://lore.kernel.org/lkml/ZBhHS7v+98NK56is@home.paul.comp/ Signed-off-by: Iwona Winiarska Link: https://lore.kernel.org/r/20230321090410.866766-1-iwona.winiarska@intel.com Signed-off-by: Guenter Roeck commit 97fd768e501fd5d377cb0bf46a35bad2cd21c153 Author: Ard Biesheuvel Date: Tue Mar 21 15:17:57 2023 +0100 efi/libstub: zboot: Add compressed image to make targets Avoid needlessly rebuilding the compressed image by adding the file 'vmlinuz' to the 'targets' Kbuild make variable. Signed-off-by: Ard Biesheuvel commit b416514054810cf2d2cc348ae477cea619b64da7 Author: Frederic Weisbecker Date: Wed Mar 15 19:43:43 2023 +0000 entry/rcu: Check TIF_RESCHED _after_ delayed RCU wake-up RCU sometimes needs to perform a delayed wake up for specific kthreads handling offloaded callbacks (RCU_NOCB). These wakeups are performed by timers and upon entry to idle (also to guest and to user on nohz_full). However the delayed wake-up on kernel exit is actually performed after the thread flags are fetched towards the fast path check for work to do on exit to user. As a result, and if there is no other pending work to do upon that kernel exit, the current task will resume to userspace with TIF_RESCHED set and the pending wake up ignored. Fix this with fetching the thread flags _after_ the delayed RCU-nocb kthread wake-up. Fixes: 47b8ff194c1f ("entry: Explicitly flush pending rcuog wakeup before last rescheduling point") Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20230315194349.10798-3-joel@joelfernandes.org commit 263f5ecaf7080513efc248ec739b6d9e00f4129f Author: Breno Leitao Date: Tue Mar 21 04:33:38 2023 -0700 perf/x86/amd/core: Always clear status for idx The variable 'status' (which contains the unhandled overflow bits) is not being properly masked in some cases, displaying the following warning: WARNING: CPU: 156 PID: 475601 at arch/x86/events/amd/core.c:972 amd_pmu_v2_handle_irq+0x216/0x270 This seems to be happening because the loop is being continued before the status bit being unset, in case x86_perf_event_set_period() returns 0. This is also causing an inconsistency because the "handled" counter is incremented, but the status bit is not cleaned. Move the bit cleaning together above, together when the "handled" counter is incremented. Fixes: 7685665c390d ("perf/x86/amd/core: Add PerfMonV2 overflow handling") Signed-off-by: Breno Leitao Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Sandipan Das Link: https://lore.kernel.org/r/20230321113338.1669660-1-leitao@debian.org commit a53ce18cacb477dd0513c607f187d16f0fa96f71 Author: Vincent Guittot Date: Fri Mar 17 17:08:10 2023 +0100 sched/fair: Sanitize vruntime of entity being migrated Commit 829c1651e9c4 ("sched/fair: sanitize vruntime of entity being placed") fixes an overflowing bug, but ignore a case that se->exec_start is reset after a migration. For fixing this case, we delay the reset of se->exec_start after placing the entity which se->exec_start to detect long sleeping task. In order to take into account a possible divergence between the clock_task of 2 rqs, we increase the threshold to around 104 days. Fixes: 829c1651e9c4 ("sched/fair: sanitize vruntime of entity being placed") Originally-by: Zhang Qiao Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Tested-by: Zhang Qiao Link: https://lore.kernel.org/r/20230317160810.107988-1-vincent.guittot@linaro.org commit 735e7b30a53a1679c050cddb73f5e5316105d2e3 Author: Suzuki K Poulose Date: Tue Mar 21 10:45:30 2023 +0000 coresight: etm4x: Do not access TRCIDR1 for identification CoreSight ETM4x architecture clearly provides ways to identify a device via registers in the "Management" class, TRCDEVARCH and TRCDEVTYPE. These registers can be accessed without the Trace domain being powered on. We additionally added TRCIDR1 as fallback in order to cover for any ETMs that may not have implemented TRCDEVARCH. So far, nobody has reported hitting a WARNING we placed to catch such systems. Also, more importantly it is problematic to access TRCIDR1, which is a "Trace" register via MMIO access, without clearing the OSLK. But we cannot mess with the OSLK until we know for sure that this is an ETMv4 device. Thus, this kind of creates a chicken and egg problem unnecessarily for systems "which are compliant" to the ETMv4 architecture. Let us remove the TRCIDR1 fall back check and rely only on TRCDEVARCH. Fixes: 8b94db1edaee ("coresight: etm4x: Use TRCDEVARCH for component discovery") Cc: stable@vger.kernel.org Reported-by: Steve Clevenger Link: https://lore.kernel.org/all/143540e5623d4c7393d24833f2b80600d8d745d2.1677881753.git.scclevenger@os.amperecomputing.com/ Cc: Mike Leach Cc: James Clark Reviewed-by: Mike Leach Reviewed-by: Anshuman Khandual Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230321104530.1547136-1-suzuki.poulose@arm.com commit bf84937e882009075f57fd213836256fc65d96bc Author: Steve Clevenger Date: Mon Feb 27 16:54:32 2023 -0700 coresight-etm4: Fix for() loop drvdata->nr_addr_cmp range bug In etm4_enable_hw, fix for() loop range to represent address comparator pairs. Fixes: 2e1cdfe184b5 ("coresight-etm4x: Adding CoreSight ETM4x driver") Cc: stable@vger.kernel.org Signed-off-by: Steve Clevenger Reviewed-by: James Clark Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/4a4ee61ce8ef402615a4528b21a051de3444fb7b.1677540079.git.scclevenger@os.amperecomputing.com commit f87d28673b71b35b248231a2086f9404afbb7f28 Author: Josh Poimboeuf Date: Sat Feb 25 16:01:36 2023 -0800 entry: Fix noinstr warning in __enter_from_user_mode() __enter_from_user_mode() is triggering noinstr warnings with CONFIG_DEBUG_PREEMPT due to its call of preempt_count_add() via ct_state(). The preemption disable isn't needed as interrupts are already disabled. And the context_tracking_enabled() check in ct_state() also isn't needed as that's already being done by the CT_WARN_ON(). Just use __ct_state() instead. Fixes the following warnings: vmlinux.o: warning: objtool: enter_from_user_mode+0xba: call to preempt_count_add() leaves .noinstr.text section vmlinux.o: warning: objtool: syscall_enter_from_user_mode+0xf9: call to preempt_count_add() leaves .noinstr.text section vmlinux.o: warning: objtool: syscall_enter_from_user_mode_prepare+0xc7: call to preempt_count_add() leaves .noinstr.text section vmlinux.o: warning: objtool: irqentry_enter_from_user_mode+0xba: call to preempt_count_add() leaves .noinstr.text section Fixes: 171476775d32 ("context_tracking: Convert state to atomic_t") Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/d8955fa6d68dc955dda19baf13ae014ae27926f5.1677369694.git.jpoimboe@kernel.org commit 03aecb1acbcd7a660f97d645ca6c09d9de27ff9d Author: Hans de Goede Date: Wed Mar 1 10:52:18 2023 +0100 drm: panel-orientation-quirks: Add quirk for Lenovo Yoga Book X90F Like the Windows Lenovo Yoga Book X91F/L the Android Lenovo Yoga Book X90F/L has a portrait 1200x1920 screen used in landscape mode, add a quirk for this. 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: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230301095218.28457-1-hdegoede@redhat.com commit 8c721c53dda512fdd48eb24d6d99e56deee57898 Author: Takashi Iwai Date: Mon Mar 20 15:28:38 2023 +0100 ALSA: usb-audio: Fix recursive locking at XRUN during syncing The recent support of low latency playback in USB-audio driver made the snd_usb_queue_pending_output_urbs() function to be called via PCM ack ops. In the new code path, the function is performed already in the PCM stream lock. The problem is that, when an XRUN is detected, the function calls snd_pcm_xrun() to notify, but snd_pcm_xrun() is supposed to be called only outside the stream lock. As a result, it leads to a deadlock of PCM stream locking. For avoiding such a recursive locking, this patch adds an additional check to the code paths in PCM core that call the ack callback; now it checks the error code from the callback, and if it's -EPIPE, the XRUN is handled in the PCM core side gracefully. Along with it, the USB-audio driver code is changed to follow that, i.e. -EPIPE is returned instead of the explicit snd_pcm_xrun() call when the function is performed already in the stream lock. Fixes: d5f871f89e21 ("ALSA: usb-audio: Improved lowlatency playback support") Reported-and-tested-by: John Keeping Link: https://lore.kernel.org/r/20230317195128.3911155-1-john@metanate.com Reviewed-by: Jaroslav Kysela Reviewed-by; Takashi Sakamoto Link: https://lore.kernel.org/r/20230320142838.494-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit b871cb971c683f7f212e7ca3c9a6709a75785116 Author: Takashi Iwai Date: Mon Mar 20 15:09:54 2023 +0100 ALSA: hda/conexant: Partial revert of a quirk for Lenovo The recent commit f83bb2592482 ("ALSA: hda/conexant: Add quirk for LENOVO 20149 Notebook model") introduced a quirk for the device with 17aa:3977, but this caused a regression on another model (Lenovo Ideadpad U31) with the very same PCI SSID. And, through skimming over the net, it seems that this PCI SSID is used for multiple different models, so it's no good idea to apply the quirk with the SSID. Although we may take a different ID check (e.g. the codec SSID instead of the PCI SSID), unfortunately, the original patch author couldn't identify the hardware details any longer as the machine was returned, and we can't develop the further proper fix. In this patch, instead, we partially revert the change so that the quirk won't be applied as default for addressing the regression. Meanwhile, the quirk function itself is kept, and it's now made to be applicable via the explicit model=lenovo-20149 option. Fixes: f83bb2592482 ("ALSA: hda/conexant: Add quirk for LENOVO 20149 Notebook model") Reported-by: Jetro Jormalainen Link: https://lore.kernel.org/r/20230308215009.4d3e58a6@mopti Cc: Link: https://lore.kernel.org/r/20230320140954.31154-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit f038f3917baf04835ba2b7bcf2a04ac93fbf8a9c Author: Jiasheng Jiang Date: Fri Mar 17 14:43:37 2023 +0800 octeontx2-vf: Add missing free for alloc_percpu Add the free_percpu for the allocated "vf->hw.lmt_info" in order to avoid memory leak, same as the "pf->hw.lmt_info" in `drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c`. Fixes: 5c0512072f65 ("octeontx2-pf: cn10k: Use runtime allocated LMTLINE region") Signed-off-by: Jiasheng Jiang Reviewed-by: Michal Swiatkowski Acked-by: Geethasowjanya Akula Link: https://lore.kernel.org/r/20230317064337.18198-1-jiasheng@iscas.ac.cn Signed-off-by: Jakub Kicinski commit 74e2e17ee1f8d8a0928b90434ad7e2df70f8483e Author: Jens Axboe Date: Mon Mar 20 11:13:49 2023 -0600 io_uring/net: avoid sending -ECONNABORTED on repeated connection requests Since io_uring does nonblocking connect requests, if we do two repeated ones without having a listener, the second will get -ECONNABORTED rather than the expected -ECONNREFUSED. Treat -ECONNABORTED like a normal retry condition if we're nonblocking, if we haven't already seen it. Cc: stable@vger.kernel.org Fixes: 3fb1bd688172 ("io_uring/net: handle -EINPROGRESS correct for IORING_OP_CONNECT") Link: https://github.com/axboe/liburing/issues/828 Reported-by: Hui, Chunyang Signed-off-by: Jens Axboe commit 9d2789ac9d60c049d26ef6d3005d9c94c5a559e9 Author: Jens Axboe Date: Mon Mar 20 20:01:25 2023 -0600 block/io_uring: pass in issue_flags for uring_cmd task_work handling io_uring_cmd_done() currently assumes that the uring_lock is held when invoked, and while it generally is, this is not guaranteed. Pass in the issue_flags associated with it, so that we have IO_URING_F_UNLOCKED available to be able to lock the CQ ring appropriately when completing events. Cc: stable@vger.kernel.org Fixes: ee692a21e9bf ("fs,io_uring: add infrastructure for uring-cmd") Signed-off-by: Jens Axboe commit 05107edc910135d27fe557267dc45be9630bf3dd Author: Nick Desaulniers Date: Wed Mar 8 11:59:33 2023 -0800 selftests: sigaltstack: fix -Wuninitialized Building sigaltstack with clang via: $ ARCH=x86 make LLVM=1 -C tools/testing/selftests/sigaltstack/ produces the following warning: warning: variable 'sp' is uninitialized when used here [-Wuninitialized] if (sp < (unsigned long)sstack || ^~ Clang expects these to be declared at global scope; we've fixed this in the kernel proper by using the macro `current_stack_pointer`. This is defined in different headers for different target architectures, so just create a new header that defines the arch-specific register names for the stack pointer register, and define it for more targets (at least the ones that support current_stack_pointer/ARCH_HAS_CURRENT_STACK_POINTER). Reported-by: Linux Kernel Functional Testing Link: https://lore.kernel.org/lkml/CA+G9fYsi3OOu7yCsMutpzKDnBMAzJBCPimBp86LhGBa0eCnEpA@mail.gmail.com/ Signed-off-by: Nick Desaulniers Reviewed-by: Kees Cook Tested-by: Linux Kernel Functional Testing Tested-by: Anders Roxell Signed-off-by: Shuah Khan commit 17214b70a159c6547df9ae204a6275d983146f6b Merge: 4f1e308df88ad a075bacde257f Author: Linus Torvalds Date: Mon Mar 20 15:20:33 2023 -0700 Merge tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux Pull fsverity fixes from Eric Biggers: "Fix two significant performance issues with fsverity" * tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux: fsverity: don't drop pagecache at end of FS_IOC_ENABLE_VERITY fsverity: Remove WQ_UNBOUND from fsverity read workqueue commit 4f1e308df88ad25c88ab4240161cbac45ba2d78e Merge: 7d31677bb7b19 4bcf6f827a79c Author: Linus Torvalds Date: Mon Mar 20 15:12:55 2023 -0700 Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/linux Pull fscrypt fix from Eric Biggers: "Fix a bug where when a filesystem was being unmounted, the fscrypt keyring was destroyed before inodes have been released by the Landlock LSM. This bug was found by syzbot" * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/linux: fscrypt: check for NULL keyring in fscrypt_put_master_key_activeref() fscrypt: improve fscrypt_destroy_keyring() documentation fscrypt: destroy keyring after security_sb_delete() commit 88b170088ad2c3e27086fe35769aa49f8a512564 Author: Damien Le Moal Date: Mon Mar 20 22:49:15 2023 +0900 zonefs: Fix error message in zonefs_file_dio_append() Since the expected write location in a sequential file is always at the end of the file (append write), when an invalid write append location is detected in zonefs_file_dio_append(), print the invalid written location instead of the expected write location. Fixes: a608da3bd730 ("zonefs: Detect append writes at invalid locations") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Himanshu Madhani commit d7e673c2a900206bea3461a4b4ecc74ea930f80e Author: Damien Le Moal Date: Mon Mar 20 15:35:06 2023 +0900 zonefs: Prevent uninitialized symbol 'size' warning In zonefs_file_dio_append(), initialize the variable size to 0 to prevent compilation and static code analizers warning such as: New smatch warnings: fs/zonefs/file.c:441 zonefs_file_dio_append() error: uninitialized symbol 'size'. The warning is a false positive as size is never actually used uninitialized. No functional change. Reported-by: kernel test robot Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/202303191227.GL8Dprbi-lkp@intel.com/ Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Himanshu Madhani commit f420f47e56c67587d9bc8f94267327b6fb214c1d Author: Oleksij Rempel Date: Fri Mar 10 17:45:23 2023 +0100 clk: imx6ul: fix "failed to get parent" error On some configuration we may get following error: [ 0.000000] imx:clk-gpr-mux: failed to get parent (-EINVAL) This happens if selector is configured to not supported value. To avoid this warnings add dummy parents for not supported values. Fixes: 4e197ee880c2 ("clk: imx6ul: add ethernet refclock mux support") Signed-off-by: Oleksij Rempel Link: https://lore.kernel.org/r/20230310164523.534571-1-o.rempel@pengutronix.de Tested-by: Stefan Wahren Reported-by: Stefan Wahren Reviewed-by: Peng Fan Signed-off-by: Stephen Boyd commit 7d31677bb7b1944ac89e9155110dc1b9acbb3895 Author: Arnd Bergmann Date: Fri Jan 27 23:14:00 2023 +0100 gpu: host1x: fix uninitialized variable use The error handling for platform_get_irq() failing no longer works after a recent change, clang now points this out with a warning: drivers/gpu/host1x/dev.c:520:6: error: variable 'syncpt_irq' is uninitialized when used here [-Werror,-Wuninitialized] if (syncpt_irq < 0) ^~~~~~~~~~ Fix this by removing the variable and checking the correct error status. Fixes: 625d4ffb438c ("gpu: host1x: Rewrite syncpoint interrupt handling") Signed-off-by: Arnd Bergmann Reviewed-by: Jon Hunter Reviewed-by: Nick Desaulniers Reviewed-by: Mikko Perttunen Reviewed-by: Nathan Chancellor Signed-off-by: Linus Torvalds commit 5e7a3bf65db57461d0f47955248fcadf37321a74 Author: Hans de Goede Date: Mon Mar 20 16:59:46 2023 +0100 ACPI: video: Add backlight=native DMI quirk for Acer Aspire 3830TG The Acer Aspire 3830TG predates Windows 8, so it defaults to using acpi_video# for backlight control, but this is non functional on this model. Add a DMI quirk to use the native backlight interface which does work properly. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 3d3699bde4b043eea17993e4e76804a8128f0fdb Merge: e8d018dd0257f 21fd9e8700de8 Author: Linus Torvalds Date: Mon Mar 20 10:52:10 2023 -0700 Merge tag 'nfs-for-6.3-2' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client fixes from Anna Schumaker: - Fix /proc/PID/io read_bytes accounting - Fix setting NLM file_lock start and end during decoding testargs - Fix timing for setting access cache timestamps * tag 'nfs-for-6.3-2' of git://git.linux-nfs.org/projects/anna/linux-nfs: NFS: Correct timing for assigning access cache timestamp lockd: set file_lock start and end when decoding nlm4 testargs NFS: Fix /proc/PID/io read_bytes for buffered reads commit 58cdfe6f58b35f17f56386f5fcf937168a423ad1 Author: Tom Rix Date: Wed Mar 15 18:04:50 2023 -0400 thunderbolt: Rename shadowed variables bit to interrupt_bit and auto_clear_bit cppcheck reports drivers/thunderbolt/nhi.c:74:7: style: Local variable 'bit' shadows outer variable [shadowVariable] int bit; ^ drivers/thunderbolt/nhi.c:66:6: note: Shadowed declaration int bit = ring_interrupt_index(ring) & 31; ^ drivers/thunderbolt/nhi.c:74:7: note: Shadow variable int bit; ^ For readablity rename the outer to interrupt_bit and the innner to auto_clear_bit. Fixes: 468c49f44759 ("thunderbolt: Disable interrupt auto clear for ring") Cc: stable@vger.kernel.org Signed-off-by: Tom Rix Signed-off-by: Mika Westerberg commit b7c994f8c35e916e27c60803bb21457bc1373500 Author: Frank Crawford Date: Sat Mar 18 20:14:41 2023 +1100 platform/x86 (gigabyte-wmi): Add support for A320M-S2H V2 Add support for A320M-S2H V2. Tested using module force_load option. Signed-off-by: Frank Crawford Acked-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20230318091441.1240921-1-frank@crawford.emu.id.au Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 840525415bdb2cb9873c6faea1984303efa65008 Merge: e8d018dd0257f 00f4bc5184c19 Author: Greg Kroah-Hartman Date: Mon Mar 20 13:54:01 2023 +0100 Merge tag 'counter-fixes-6.3a' of git://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter into char-misc-linus William writes: First set of Counter driver fixes for 6.3 This set consists of two fixes for the 104-quad-8 driver: - fix a read race condition between the FLAG and CNTR registers (as a result 25-bit count values are no longer supported) - invert condition check to report correct Index Synapse action * tag 'counter-fixes-6.3a' of git://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter: counter: 104-quad-8: Fix Synapse action reported for Index signals counter: 104-quad-8: Fix race condition between FLAG and CNTR reads commit 8d13d50b157655247cdb3a69aca7836b58ff8735 Author: Dongliang Mu Date: Thu Mar 9 12:01:06 2023 +0800 platform/x86/intel: tpmi: Revise the comment of intel_vsec_add_aux intel_vsec_add_aux() is resource managed including res and feature_vsec_dev memory. Fix this by revising the comment of intel_vsec_add_aux since res variable will also be freed in the intel_vsec_add_aux. Signed-off-by: Dongliang Mu Link: https://lore.kernel.org/r/20230309040107.534716-3-dzm91@hust.edu.cn Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 4d5a2a7d2c97dbd658533eea5f79dab1ad5dc0ee Author: Dongliang Mu Date: Thu Mar 9 12:01:05 2023 +0800 platform/x86/intel: tpmi: Fix double free in tpmi_create_device() The previous commit 6a192c0cbf38 ("platform/x86/intel/tpmi: Fix double free reported by Smatch") incorrectly handle the deallocation of res variable. As shown in the comment, intel_vsec_add_aux handles all the deallocation of res and feature_vsec_dev. Therefore, kfree(res) can still cause double free if intel_vsec_add_aux returns error. Fix this by adjusting the error handling part in tpmi_create_device, following the function intel_vsec_add_dev. Fixes: 6a192c0cbf38 ("platform/x86/intel/tpmi: Fix double free reported by Smatch") Signed-off-by: Dongliang Mu Link: https://lore.kernel.org/r/20230309040107.534716-2-dzm91@hust.edu.cn Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit da0ba0ccce54059d6c6b788a75099bfce95126da Author: Dongliang Mu Date: Thu Mar 9 12:01:07 2023 +0800 platform/x86/intel: vsec: Fix a memory leak in intel_vsec_add_aux The first error handling code in intel_vsec_add_aux misses the deallocation of intel_vsec_dev->resource. Fix this by adding kfree(intel_vsec_dev->resource) in the error handling code. Reviewed-by: David E. Box Signed-off-by: Dongliang Mu Link: https://lore.kernel.org/r/20230309040107.534716-4-dzm91@hust.edu.cn Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 6bd1bca858f1734a75572a788213d1e1143f2f0a Author: Cheng Xu Date: Mon Mar 20 16:46:52 2023 +0800 RDMA/erdma: Defer probing if netdevice can not be found ERDMA device may be probed before its associated netdevice, returning -EPROBE_DEFER allows OS try to probe erdma device later. Fixes: d55e6fb4803c ("RDMA/erdma: Add the erdma module") Signed-off-by: Cheng Xu Link: https://lore.kernel.org/r/20230320084652.16807-5-chengyou@linux.alibaba.com Signed-off-by: Leon Romanovsky commit 0dd83a4d7756713f81990d6c5547500f212a1190 Author: Cheng Xu Date: Mon Mar 20 16:46:51 2023 +0800 RDMA/erdma: Inline mtt entries into WQE if supported The max inline mtt count supported is ERDMA_MAX_INLINE_MTT_ENTRIES. When mr->mem.mtt_nents == ERDMA_MAX_INLINE_MTT_ENTRIES, inline mtt is also supported, fix it. Fixes: 155055771704 ("RDMA/erdma: Add verbs implementation") Signed-off-by: Cheng Xu Link: https://lore.kernel.org/r/20230320084652.16807-4-chengyou@linux.alibaba.com Signed-off-by: Leon Romanovsky commit 6256aa9ae955d10ec73a434533ca62034eff1b76 Author: Cheng Xu Date: Mon Mar 20 16:46:50 2023 +0800 RDMA/erdma: Update default EQ depth to 4096 and max_send_wr to 8192 Max EQ depth of hardware is 32K, the current default EQ depth is too small for some applications, so change the default depth to 4096. Max send WRs the hardware can support is 8K, but the driver limits the value to 4K. Remove this limitation. Fixes: be3cff0f242d ("RDMA/erdma: Add the hardware related definitions") Fixes: db23ae64caac ("RDMA/erdma: Add verbs header file") Signed-off-by: Cheng Xu Link: https://lore.kernel.org/r/20230320084652.16807-3-chengyou@linux.alibaba.com Signed-off-by: Leon Romanovsky commit 3fe26c0493e4c2da4b7d8ba8c975a6f48fb75ec2 Author: Cheng Xu Date: Mon Mar 20 16:46:49 2023 +0800 RDMA/erdma: Fix some typos FAA is short for atomic fetch and add, not FAD. Fix this. Fixes: 0ca9c2e2844a ("RDMA/erdma: Implement atomic operations support") Signed-off-by: Cheng Xu Link: https://lore.kernel.org/r/20230320084652.16807-2-chengyou@linux.alibaba.com Signed-off-by: Leon Romanovsky commit 22aa20e4c5dcbe6fdc480eb4fb27039b1f43217f Author: Ashutosh Dixit Date: Sun Mar 19 07:03:00 2023 -0700 Revert "drm/i915/hwmon: Enable PL1 power limit" This reverts commit ee892ea83d99610fa33bea612de058e0955eec3a. It was accidentally picked up for backporting. Revert. Cc: Jani Nikula Cc: Rodrigo Vivi Signed-off-by: Ashutosh Dixit Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230319140300.2892032-1-ashutosh.dixit@intel.com commit f36fa5581bcace4e1054347c46ca67f2664fba33 Merge: 7d722c9802d4b bebe933d35a63 Author: David S. Miller Date: Mon Mar 20 10:20:40 2023 +0000 Merge branch 'ps3_gelic_net-fixes' Geoff Levand says: ==================== net/ps3_gelic_net: DMA related fixes v9: Make rx_skb_size local to gelic_descr_prepare_rx. v8: Add more cpu_to_be32 calls. v7: Remove all cleanups, sync to spider net. v6: Reworked and cleaned up patches. v5: Some additional patch cleanups. v4: More patch cleanups. v3: Cleaned up patches as requested. ==================== Signed-off-by: David S. Miller commit bebe933d35a63d4f042fbf4dce4f22e689ba0fcd Author: Geoff Levand Date: Sat Mar 18 17:39:16 2023 +0000 net/ps3_gelic_net: Use dma_mapping_error The current Gelic Etherenet driver was checking the return value of its dma_map_single call, and not using the dma_mapping_error() routine. Fixes runtime problems like these: DMA-API: ps3_gelic_driver sb_05: device driver failed to check map error WARNING: CPU: 0 PID: 0 at kernel/dma/debug.c:1027 .check_unmap+0x888/0x8dc Fixes: 02c1889166b4 ("ps3: gigabit ethernet driver for PS3, take3") Reviewed-by: Alexander Duyck Signed-off-by: Geoff Levand Signed-off-by: David S. Miller commit 19b3bb51c3bc288b3f2c6f8c4450b0f548320625 Author: Geoff Levand Date: Sat Mar 18 17:39:16 2023 +0000 net/ps3_gelic_net: Fix RX sk_buff length The Gelic Ethernet device needs to have the RX sk_buffs aligned to GELIC_NET_RXBUF_ALIGN, and also the length of the RX sk_buffs must be a multiple of GELIC_NET_RXBUF_ALIGN. The current Gelic Ethernet driver was not allocating sk_buffs large enough to allow for this alignment. Also, correct the maximum and minimum MTU sizes, and add a new preprocessor macro for the maximum frame size, GELIC_NET_MAX_FRAME. Fixes various randomly occurring runtime network errors. Fixes: 02c1889166b4 ("ps3: gigabit ethernet driver for PS3, take3") Signed-off-by: Geoff Levand Signed-off-by: David S. Miller commit 7d722c9802d4bd61a1f1614e07413b6a5fac382d Author: Tom Rix Date: Sat Mar 18 09:13:42 2023 -0400 usb: plusb: remove unused pl_clear_QuickLink_features function clang with W=1 reports drivers/net/usb/plusb.c:65:1: error: unused function 'pl_clear_QuickLink_features' [-Werror,-Wunused-function] pl_clear_QuickLink_features(struct usbnet *dev, int val) ^ This static function is not used, so remove it. Signed-off-by: Tom Rix Signed-off-by: David S. Miller commit 7f247f5a2c18b3f21206cdd51193df4f38e1b9f5 Author: Szymon Heidrich Date: Sat Mar 18 10:25:52 2023 +0100 net: usb: lan78xx: Limit packet length to skb->len Packet length retrieved from descriptor may be larger than the actual socket buffer length. In such case the cloned skb passed up the network stack will leak kernel memory contents. Additionally prevent integer underflow when size is less than ETH_FCS_LEN. Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver") Signed-off-by: Szymon Heidrich Signed-off-by: David S. Miller commit 6b6bc5b8bd2d4ca9e1efa9ae0f98a0b0687ace75 Author: Zheng Wang Date: Sat Mar 18 16:05:26 2023 +0800 net: qcom/emac: Fix use after free bug in emac_remove due to race condition In emac_probe, &adpt->work_thread is bound with emac_work_thread. Then it will be started by timeout handler emac_tx_timeout or a IRQ handler emac_isr. If we remove the driver which will call emac_remove to make cleanup, there may be a unfinished work. The possible sequence is as follows: Fix it by finishing the work before cleanup in the emac_remove and disable timeout response. CPU0 CPU1 |emac_work_thread emac_remove | free_netdev | kfree(netdev); | |emac_reinit_locked |emac_mac_down |//use netdev Fixes: b9b17debc69d ("net: emac: emac gigabit ethernet controller driver") Signed-off-by: Zheng Wang Signed-off-by: David S. Miller commit a8eff03545d4cef12ae66a1905627c1818a0f81a Author: Vladimir Oltean Date: Sat Mar 18 01:19:00 2023 +0200 net: dsa: report rx_bytes unadjusted for ETH_HLEN We collect the software statistics counters for RX bytes (reported to /proc/net/dev and to ethtool -S $dev | grep 'rx_bytes: ") at a time when skb->len has already been adjusted by the eth_type_trans() -> skb_pull_inline(skb, ETH_HLEN) call to exclude the L2 header. This means that when connecting 2 DSA interfaces back to back and sending 1 packet with length 100, the sending interface will report tx_bytes as incrementing by 100, and the receiving interface will report rx_bytes as incrementing by 86. Since accounting for that in scripts is quirky and is something that would be DSA-specific behavior (requiring users to know that they are running on a DSA interface in the first place), the proposal is that we treat it as a bug and fix it. This design bug has always existed in DSA, according to my analysis: commit 91da11f870f0 ("net: Distributed Switch Architecture protocol support") also updates skb->dev->stats.rx_bytes += skb->len after the eth_type_trans() call. Technically, prior to Florian's commit a86d8becc3f0 ("net: dsa: Factor bottom tag receive functions"), each and every vendor-specific tagging protocol driver open-coded the same bug, until the buggy code was consolidated into something resembling what can be seen now. So each and every driver should have its own Fixes: tag, because of their different histories until the convergence point. I'm not going to do that, for the sake of simplicity, but just blame the oldest appearance of buggy code. There are 2 ways to fix the problem. One is the obvious way, and the other is how I ended up doing it. Obvious would have been to move dev_sw_netstats_rx_add() one line above eth_type_trans(), and below skb_push(skb, ETH_HLEN). But DSA processing is not as simple as that. We count the bytes after removing everything DSA-related from the packet, to emulate what the packet's length was, on the wire, when the user port received it. When eth_type_trans() executes, dsa_untag_bridge_pvid() has not run yet, so in case the switch driver requests this behavior - commit 412a1526d067 ("net: dsa: untag the bridge pvid from rx skbs") has the details - the obvious variant of the fix wouldn't have worked, because the positioning there would have also counted the not-yet-stripped VLAN header length, something which is absent from the packet as seen on the wire (there it may be untagged, whereas software will see it as PVID-tagged). Fixes: f613ed665bb3 ("net: dsa: Add support for 64-bit statistics") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 59ad01c786a4c94afacc7feb0ab97bf8d6672a46 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 (cherry picked from commit 8cb1f95cca68421b08333175719fdd3615372ca8) Signed-off-by: Jani Nikula commit f8d62aa8d24d9883df738e450bfe6be396e11979 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 (cherry picked from commit 5e008ba67cb80084e99b40ccd46f9029ae421632) Signed-off-by: Jani Nikula commit 150784f9285e656373cf3953ef4a7663f1e1a0f2 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 (cherry picked from commit c4252a11131c7f27a158294241466e2a4e7ff94e) Signed-off-by: Jani Nikula commit e92eb246feb9019b0b137706c934b8891cdfe3c2 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 (cherry picked from commit bfad380c542438a9b642f8190b7fd37bc77e2723) Signed-off-by: Jani Nikula commit 8df23e4c4f72f4e201c28e6fb0a67e2dbf30628a 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 (cherry picked from commit 9724ecdbb9ddd6da3260e4a442574b90fc75188a) Signed-off-by: Jani Nikula commit 088a422c3fa3ee9268d400078626b0c202cfe9dd 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 (cherry picked from commit 038a24835ab68f341eaa7a0e3bcc6ce0f9b22e17) Signed-off-by: Jani Nikula commit 3a84f2c6c9558c554a90ec26ad25df92fc5e05b7 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 (cherry picked from commit 2553bacaf953b48c59357f5a622282bc0c45adae) Signed-off-by: Jani Nikula commit ed00eba03474adbf525ff03d69705d8c78b76456 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 (cherry picked from commit 561b31acfd65502a2cda2067513240fc57ccdbdc) Signed-off-by: Jani Nikula commit 364ac7863fc161841e86388884bb7d5f4048031a 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 (cherry picked from commit 0188be507b973e36f637ba010a369057c8cb7282) Signed-off-by: Jani Nikula commit 88c9483faf15ada14eca82714114656893063458 Author: Maher Sanalla Date: Thu Mar 16 15:40:49 2023 +0200 IB/mlx5: Add support for 400G_8X lane speed Currently, when driver queries PTYS to report which link speed is being used on its RoCE ports, it does not check the case of having 400Gbps transmitted over 8 lanes. Thus it fails to report the said speed and instead it defaults to report 10G over 4 lanes. Add a check for the said speed when querying PTYS and report it back correctly when needed. Fixes: 08e8676f1607 ("IB/mlx5: Add support for 50Gbps per lane link modes") Signed-off-by: Maher Sanalla Reviewed-by: Aya Levin Reviewed-by: Saeed Mahameed Link: https://lore.kernel.org/r/ec9040548d119d22557d6a4b4070d6f421701fd4.1678973994.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 468c49f44759720a312e52d44a71c3949ed63d7c Author: Mario Limonciello Date: Fri Mar 10 11:20:50 2023 -0600 thunderbolt: Disable interrupt auto clear for rings When interrupt auto clear is programmed, any read to the interrupt status register will clear all interrupts. If two interrupts have come in before one can be serviced then this will cause lost interrupts. On AMD USB4 routers this has manifested in odd problems particularly with long strings of control tranfers such as reading the DROM via bit banging. Instead of clearing interrupts automatically, clear the bit corresponding to the given ring's interrupt in the ISR. Fixes: 7a1808f82a37 ("thunderbolt: Handle ring interrupt by reading interrupt status register") Cc: Sanju Mehta Cc: stable@vger.kernel.org Tested-by: Anson Tsao Signed-off-by: Mario Limonciello Signed-off-by: Mika Westerberg commit 1716efdb07938bd6510e1127d02012799112c433 Author: Mario Limonciello Date: Fri Mar 10 11:20:49 2023 -0600 thunderbolt: Use const qualifier for `ring_interrupt_index` `ring_interrupt_index` doesn't change the data for `ring` so mark it as const. This is needed by the following patch that disables interrupt auto clear for rings. Cc: Sanju Mehta Cc: stable@vger.kernel.org Signed-off-by: Mario Limonciello Signed-off-by: Mika Westerberg commit 754ff5060daf5a1cf4474eff9b4edeb6c17ef7ab Author: msizanoen Date: Sun Mar 19 23:02:56 2023 -0700 Input: alps - fix compatibility with -funsigned-char The AlpsPS/2 code previously relied on the assumption that `char` is a signed type, which was true on x86 platforms (the only place where this driver is used) before kernel 6.2. However, on 6.2 and later, this assumption is broken due to the introduction of -funsigned-char as a new global compiler flag. Fix this by explicitly specifying the signedness of `char` when sign extending the values received from the device. Fixes: f3f33c677699 ("Input: alps - Rushmore and v7 resolution support") Signed-off-by: msizanoen Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230320045228.182259-1-msizanoen@qtmlabs.xyz Signed-off-by: Dmitry Torokhov commit 8980f190947ba29f23110408e712444884b74251 Author: Jason A. Donenfeld Date: Sun Mar 19 21:36:36 2023 -0700 Input: focaltech - use explicitly signed char type The recent change of -funsigned-char causes additions of negative numbers to become additions of large positive numbers, leading to wrong calculations of mouse movement. Change these casts to be explicitly signed, to take into account negative offsets. Fixes: 3bc753c06dd0 ("kbuild: treat char as always unsigned") Signed-off-by: Jason A. Donenfeld Reviewed-by: Hans de Goede Cc: stable@vger.kernel.org Link: https://bugzilla.kernel.org/show_bug.cgi?id=217211 Link: https://lore.kernel.org/r/20230318133010.1285202-1-Jason@zx2c4.com Signed-off-by: Dmitry Torokhov commit ffa6206ebf8d39e83d87ac226df68dbbe155819a Author: Matthias Benkmann Date: Sun Mar 19 21:30:15 2023 -0700 Input: xpad - fix incorrectly applied patch for MAP_PROFILE_BUTTON When commit commit fff1011a26d6 ("Input: xpad - add X-Box Adaptive Profile button") was applied, one hunk ended up in the wrong function; move it to where it belongs. Fixes: fff1011a26d6 ("Input: xpad - add X-Box Adaptive Profile button") Signed-off-by: Matthias Benkmann Link: https://lore.kernel.org/r/20230318162106.0aef4ba5@ninja Signed-off-by: Dmitry Torokhov commit e8d018dd0257f744ca50a729e3d042cf2ec9da65 Author: Linus Torvalds Date: Sun Mar 19 13:27:55 2023 -0700 Linux 6.3-rc3 commit eaba52d63bfcf0047ce3a1bb011b35d4f066df8e Merge: 5cdfdd6da3231 71c7a30442b72 Author: Linus Torvalds Date: Sun Mar 19 10:46:02 2023 -0700 Merge tag 'trace-v6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fixes from Steven Rostedt: - Fix setting affinity of hwlat threads in containers Using sched_set_affinity() has unwanted side effects when being called within a container. Use set_cpus_allowed_ptr() instead - Fix per cpu thread management of the hwlat tracer: - Do not start per_cpu threads if one is already running for the CPU - When starting per_cpu threads, do not clear the kthread variable as it may already be set to running per cpu threads - Fix return value for test_gen_kprobe_cmd() On error the return value was overwritten by being set to the result of the call from kprobe_event_delete(), which would likely succeed, and thus have the function return success - Fix splice() reads from the trace file that was broken by commit 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops") - Remove obsolete and confusing comment in ring_buffer.c The original design of the ring buffer used struct page flags for tricks to optimize, which was shortly removed due to them being tricks. But a comment for those tricks remained - Set local functions and variables to static * tag 'trace-v6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing/hwlat: Replace sched_setaffinity with set_cpus_allowed_ptr ring-buffer: remove obsolete comment for free_buffer_page() tracing: Make splice_read available again ftrace: Set direct_ops storage-class-specifier to static trace/hwlat: Do not start per-cpu thread if it is already running trace/hwlat: Do not wipe the contents of per-cpu thread data tracing/osnoise: set several trace_osnoise.c variables storage-class-specifier to static tracing: Fix wrong return in kprobe_event_gen_test.c commit 71c7a30442b724717a30d5e7d1662ba4904eb3d4 Author: Costa Shulyupin Date: Thu Mar 16 16:45:35 2023 +0200 tracing/hwlat: Replace sched_setaffinity with set_cpus_allowed_ptr There is a problem with the behavior of hwlat in a container, resulting in incorrect output. A warning message is generated: "cpumask changed while in round-robin mode, switching to mode none", and the tracing_cpumask is ignored. This issue arises because the kernel thread, hwlatd, is not a part of the container, and the function sched_setaffinity is unable to locate it using its PID. Additionally, the task_struct of hwlatd is already known. Ultimately, the function set_cpus_allowed_ptr achieves the same outcome as sched_setaffinity, but employs task_struct instead of PID. Test case: # cd /sys/kernel/tracing # echo 0 > tracing_on # echo round-robin > hwlat_detector/mode # echo hwlat > current_tracer # unshare --fork --pid bash -c 'echo 1 > tracing_on' # dmesg -c Actual behavior: [573502.809060] hwlat_detector: cpumask changed while in round-robin mode, switching to mode none Link: https://lore.kernel.org/linux-trace-kernel/20230316144535.1004952-1-costa.shul@redhat.com Cc: Masami Hiramatsu Fixes: 0330f7aa8ee63 ("tracing: Have hwlat trace migrate across tracing_cpumask CPUs") Signed-off-by: Costa Shulyupin Acked-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) commit a98151ad53b53f010ee364ec2fd06445b328578b Author: Vlastimil Babka Date: Wed Mar 15 15:24:46 2023 +0100 ring-buffer: remove obsolete comment for free_buffer_page() The comment refers to mm/slob.c which is being removed. It comes from commit ed56829cb319 ("ring_buffer: reset buffer page when freeing") and according to Steven the borrowed code was a page mapcount and mapping reset, which was later removed by commit e4c2ce82ca27 ("ring_buffer: allocate buffer page pointer"). Thus the comment is not accurate anyway, remove it. Link: https://lore.kernel.org/linux-trace-kernel/20230315142446.27040-1-vbabka@suse.cz Cc: Masami Hiramatsu Cc: Ingo Molnar Reported-by: Mike Rapoport Suggested-by: Steven Rostedt (Google) Fixes: e4c2ce82ca27 ("ring_buffer: allocate buffer page pointer") Signed-off-by: Vlastimil Babka Reviewed-by: Mukesh Ojha Signed-off-by: Steven Rostedt (Google) commit e400be674a1a40e9dcb2e95f84d6c1fd2d88f31d Author: Sung-hun Kim Date: Tue Mar 14 10:37:07 2023 +0900 tracing: Make splice_read available again Since the commit 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops") is applied to the kernel, splice() and sendfile() calls on the trace file (/sys/kernel/debug/tracing /trace) return EINVAL. This patch restores these system calls by initializing splice_read in file_operations of the trace file. This patch only enables such functionalities for the read case. Link: https://lore.kernel.org/linux-trace-kernel/20230314013707.28814-1-sfoon.kim@samsung.com Cc: stable@vger.kernel.org Fixes: 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops") Signed-off-by: Sung-hun Kim Signed-off-by: Steven Rostedt (Google) commit 5cdfdd6da3231227611e0c24e005d6ea450bdc75 Merge: ce86beb43eb5f 18365ebf23f3e Author: Linus Torvalds Date: Sun Mar 19 10:09:58 2023 -0700 Merge tag 'tty-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial driver fixes from Greg KH: "Here are some small tty and serial driver fixes for 6.3-rc3 to resolve some reported issues. They include: - 8250 driver Kconfig issue pointed out by you that showed up in -rc1 - qcom-geni serial driver fixes - various 8250 driver fixes for reported problems - fsl_lpuart driver fixes - serdev fix for regression in -rc1 - vt.c bugfix All have been in linux-next for over a week with no reported problems" * tag 'tty-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty: vt: protect KD_FONT_OP_GET_TALL from unbound access serial: qcom-geni: drop bogus uart_write_wakeup() serial: qcom-geni: fix mapping of empty DMA buffer serial: qcom-geni: fix DMA mapping leak on shutdown serial: qcom-geni: fix console shutdown hang serdev: Set fwnode for serdev devices tty: serial: fsl_lpuart: fix race on RX DMA shutdown serial: 8250_pci1xxxx: Disable SERIAL_8250_PCI1XXXX config by default serial: 8250_fsl: fix handle_irq locking serial: 8250_em: Fix UART port type serial: 8250: ASPEED_VUART: select REGMAP instead of depending on it tty: serial: fsl_lpuart: skip waiting for transmission complete when UARTCTRL_SBK is asserted Revert "tty: serial: fsl_lpuart: adjust SERIAL_FSL_LPUART_CONSOLE config dependency" commit ce86beb43eb5f801cb053abf763579f25d5276ab Merge: c46a7d047369b f551592f72563 Author: Linus Torvalds Date: Sun Mar 19 10:04:58 2023 -0700 Merge tag 'char-misc-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are a few small char/misc/other driver subsystem patches to resolve reported problems for 6.3-rc3. Included in here are: - Interconnect driver fixes for reported problems - Memory driver fixes for reported problems - nvmem core fix - firmware driver fix for reported problem All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (23 commits) memory: tegra30-emc: fix interconnect registration race memory: tegra20-emc: fix interconnect registration race memory: tegra124-emc: fix interconnect registration race memory: tegra: fix interconnect registration race interconnect: exynos: drop redundant link destroy interconnect: exynos: fix registration race interconnect: exynos: fix node leak in probe PM QoS error path interconnect: qcom: msm8974: fix registration race interconnect: qcom: rpmh: fix registration race interconnect: qcom: rpmh: fix probe child-node error handling interconnect: qcom: rpm: fix registration race nvmem: core: return -ENOENT if nvmem cell is not found firmware: xilinx: don't make a sleepable memory allocation from an atomic context interconnect: qcom: rpm: fix probe child-node error handling interconnect: qcom: osm-l3: fix registration race interconnect: imx: fix registration race interconnect: fix provider registration API interconnect: fix icc_provider_del() error handling interconnect: fix mem leak when freeing nodes interconnect: qcom: qcm2290: Fix MASTER_SNOC_BIMC_NRT ... commit e9b60c7f97130795c7aa81a649ae4b93a172a277 Author: Dave Chinner Date: Wed Mar 15 17:31:03 2023 -0700 pcpcntr: remove percpu_counter_sum_all() percpu_counter_sum_all() is now redundant as the race condition it was invented to handle is now dealt with by percpu_counter_sum() directly and all users of percpu_counter_sum_all() have been removed. Remove it. This effectively reverts the changes made in f689054aace2 ("percpu_counter: add percpu_counter_sum_all interface") except for the cpumask iteration that fixes percpu_counter_sum() made earlier in this series. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 7ba85fba47bd89618fdb7dc322bdf823b1b56efb Author: Dave Chinner Date: Wed Mar 15 17:31:03 2023 -0700 fork: remove use of percpu_counter_sum_all This effectively reverts the change made in commit f689054aace2 ("percpu_counter: add percpu_counter_sum_all interface") as the race condition percpu_counter_sum_all() was invented to avoid is now handled directly in percpu_counter_sum() and nobody needs to care about summing racing with cpu unplug anymore. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 8b57b11cca88f397035a95b9e12b03511847b0e8 Author: Dave Chinner Date: Wed Mar 15 17:31:02 2023 -0700 pcpcntrs: fix dying cpu summation race In commit f689054aace2 ("percpu_counter: add percpu_counter_sum_all interface") a race condition between a cpu dying and percpu_counter_sum() iterating online CPUs was identified. The solution was to iterate all possible CPUs for summation via percpu_counter_sum_all(). We recently had a percpu_counter_sum() call in XFS trip over this same race condition and it fired a debug assert because the filesystem was unmounting and the counter *should* be zero just before we destroy it. That was reported here: https://lore.kernel.org/linux-kernel/20230314090649.326642-1-yebin@huaweicloud.com/ likely as a result of running generic/648 which exercises filesystems in the presence of CPU online/offline events. The solution to use percpu_counter_sum_all() is an awful one. We use percpu counters and percpu_counter_sum() for accurate and reliable threshold detection for space management, so a summation race condition during these operations can result in overcommit of available space and that may result in filesystem shutdowns. As percpu_counter_sum_all() iterates all possible CPUs rather than just those online or even those present, the mask can include CPUs that aren't even installed in the machine, or in the case of machines that can hot-plug CPU capable nodes, even have physical sockets present in the machine. Fundamentally, this race condition is caused by the CPU being offlined being removed from the cpu_online_mask before the notifier that cleans up per-cpu state is run. Hence percpu_counter_sum() will not sum the count for a cpu currently being taken offline, regardless of whether the notifier has run or not. This is the root cause of the bug. The percpu counter notifier iterates all the registered counters, locks the counter and moves the percpu count to the global sum. This is serialised against other operations that move the percpu counter to the global sum as well as percpu_counter_sum() operations that sum the percpu counts while holding the counter lock. Hence the notifier is safe to run concurrently with sum operations, and the only thing we actually need to care about is that percpu_counter_sum() iterates dying CPUs. That's trivial to do, and when there are no CPUs dying, it has no addition overhead except for a cpumask_or() operation. This change makes percpu_counter_sum() always do the right thing in the presence of CPU hot unplug events and makes percpu_counter_sum_all() unnecessary. This, in turn, means that filesystems like XFS, ext4, and btrfs don't have to work out when they should use percpu_counter_sum() vs percpu_counter_sum_all() in their space accounting algorithms Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 1470afefc3c42df5d1662f87d079b46651bdc95b Author: Dave Chinner Date: Wed Mar 15 17:31:02 2023 -0700 cpumask: introduce for_each_cpu_or Equivalent of for_each_cpu_and, except it ORs the two masks together so it iterates all the CPUs present in either mask. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit c46a7d047369bb175bc689249c484a86616ee018 Merge: 80102f2ee715a 4783b9cb374af Author: Linus Torvalds Date: Sun Mar 19 09:57:53 2023 -0700 Merge tag 'ras_urgent_for_v6.3_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS fix from Borislav Petkov: - Flush out logged errors immediately after MCA banks configuration changes over sysfs have been done instead of waiting until something else triggers the workqueue later - another error or the polling interval cycle is reached * tag 'ras_urgent_for_v6.3_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce: Make sure logged MCEs are processed after sysfs update commit 3cfb9290da3d87a5877b03bda96c3d5d3ed9fcb0 Author: Darrick J. Wong Date: Thu Mar 16 09:31:20 2023 -0700 xfs: test dir/attr hash when loading module Back in the 6.2-rc1 days, Eric Whitney reported a fstests regression in ext4 against generic/454. The cause of this test failure was the unfortunate combination of setting an xattr name containing UTF8 encoded emoji, an xattr hash function that accepted a char pointer with no explicit signedness, signed type extension of those chars to an int, and the 6.2 build tools maintainers deciding to mandate -funsigned-char across the board. As a result, the ondisk extended attribute structure written out by 6.1 and 6.2 were not the same. This discrepancy, in fact, had been noticeable if a filesystem with such an xattr were moved between any two architectures that don't employ the same signedness of a raw "char" declaration. The only reason anyone noticed is that x86 gcc defaults to signed, and no such -funsigned-char update was made to e2fsprogs, so e2fsck immediately started reporting data corruption. After a day and a half of discussing how to handle this use case (xattrs with bit 7 set anywhere in the name) without breaking existing users, Linus merged his own patch and didn't tell the maintainer. None of the ext4 developers realized this until AUTOSEL announced that the commit had been backported to stable. In the end, this problem could have been detected much earlier if there had been any useful tests of hash function(s) in use inside ext4 to make sure that they always produce the same outputs given the same inputs. The XFS dirent/xattr name hash takes a uint8_t*, so I don't think it's vulnerable to this problem. However, let's avoid all this drama by adding our own self test to check that the da hash produces the same outputs for a static pile of inputs on various platforms. This enables us to fix any breakage that may result in a controlled fashion. The buffer and test data are identical to the patches submitted to xfsprogs. Link: https://lore.kernel.org/linux-ext4/Y8bpkm3jA3bDm3eL@debian-BULLSEYE-live-builder-AMD64/ Link: https://lore.kernel.org/linux-xfs/ZBUKCRR7xvIqPrpX@destitution/T/#md38272cc684e2c0d61494435ccbb91f022e8dee4 Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit e6fbb7167ed005783ac5aef3e75699f45ffe2af8 Author: Darrick J. Wong Date: Wed Mar 15 17:30:33 2023 -0700 xfs: add tracepoints for each of the externally visible allocators There are now five separate space allocator interfaces exposed to the rest of XFS for five different strategies to find space. Add tracepoints for each of them so that I can tell from a trace dump exactly which ones got called and what happened underneath them. Add a sixth so it's more obvious if an allocation actually happened. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 9eb775968b68d049fb3b00353f12cd10308527c7 Author: Darrick J. Wong Date: Wed Mar 15 17:30:33 2023 -0700 xfs: walk all AGs if TRYLOCK passed to xfs_alloc_vextent_iterate_ags Callers of xfs_alloc_vextent_iterate_ags that pass in the TRYLOCK flag want us to perform a non-blocking scan of the AGs for free space. There are no ordering constraints for non-blocking AGF lock acquisition, so the scan can freely start over at AG 0 even when minimum_agno > 0. This manifests fairly reliably on xfs/294 on 6.3-rc2 with the parent pointer patchset applied and the realtime volume enabled. I observed the following sequence as part of an xfs_dir_createname call: 0. Fragment the free space, then allocate nearly all the free space in all AGs except AG 0. 1. Create a directory in AG 2 and let it grow for a while. 2. Try to allocate 2 blocks to expand the dirent part of a directory. The space will be allocated out of AG 0, but the allocation will not be contiguous. This (I think) activates the LOWMODE allocator. 3. The bmapi call decides to convert from extents to bmbt format and tries to allocate 1 block. This allocation request calls xfs_alloc_vextent_start_ag with the inode number, which starts the scan at AG 2. We ignore AG 0 (with all its free space) and instead scrape AG 2 and 3 for more space. We find one block, but this now kicks t_highest_agno to 3. 4. The createname call decides it needs to split the dabtree. It tries to allocate even more space with xfs_alloc_vextent_start_ag, but now we're constrained to AG 3, and we don't find the space. The createname returns ENOSPC and the filesystem shuts down. This change fixes the problem by making the trylock scan wrap around to AG 0 if it doesn't like the AGs that it finds. Since the current transaction itself holds AGF 0, the trylock of AGF 0 will succeed, and we take space from the AG that has plenty. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 80102f2ee715ab07be476df443bba388d5458fd1 Merge: 4ac39c5910add fd0815f632c24 Author: Linus Torvalds Date: Sun Mar 19 09:47:55 2023 -0700 Merge tag 'perf_urgent_for_v6.3_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Borislav Petkov: - Check whether sibling events have been deactivated before adding them to groups - Update the proper event time tracking variable depending on the event type - Fix a memory overwrite issue due to using the wrong function argument when outputting perf events * tag 'perf_urgent_for_v6.3_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf: Fix check before add_event_to_groups() in perf_group_detach() perf: fix perf_event_context->time perf/core: Fix perf_output_begin parameter is incorrectly invoked in perf_event_bpf_output commit 4ac39c5910add53e77aad356cc19721206c76ef7 Merge: 995bba436bc5c cbebd68f59f03 Author: Linus Torvalds Date: Sun Mar 19 09:43:41 2023 -0700 Merge tag 'x86_urgent_for_v6.3_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: "There's a little bit more 'movement' in there for my taste but it needs to happen and should make the code better after it. - Check cmdline_find_option()'s return value before further processing - Clear temporary storage in the resctrl code to prevent access to an unexistent MSR - Add a simple throttling mechanism to protect the hypervisor from potentially malicious SEV guests issuing requests in rapid succession. In order to not jeopardize the sanity of everyone involved in maintaining this code, the request issuing side has received a cleanup, split in more or less trivial, small and digestible pieces. Otherwise, the code was threatening to become an unmaintainable mess. Therefore, that cleanup is marked indirectly also for stable so that there's no differences between the upstream code and the stable variant when it comes down to backporting more there" * tag 'x86_urgent_for_v6.3_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: Fix use of uninitialized buffer in sme_enable() x86/resctrl: Clear staged_config[] before and after it is used virt/coco/sev-guest: Add throttling awareness virt/coco/sev-guest: Convert the sw_exit_info_2 checking to a switch-case virt/coco/sev-guest: Do some code style cleanups virt/coco/sev-guest: Carve out the request issuing logic into a helper virt/coco/sev-guest: Remove the disable_vmpck label in handle_guest_request() virt/coco/sev-guest: Simplify extended guest request handling virt/coco/sev-guest: Check SEV_SNP attribute at probe time commit 995bba436bc5c6a200510828a09cd404a7f2a129 Merge: a3671bd86a977 70e42feab2e20 Author: Linus Torvalds Date: Sun Mar 19 09:38:26 2023 -0700 Merge tag 'ext4_for_linus_urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fix from Ted Ts'o: "Fix a double unlock bug on an error path in ext4, found by smatch and syzkaller" * tag 'ext4_for_linus_urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: fix possible double unlock when moving a directory commit 8732565549011cabbea08329a1aefd78a68d96c7 Author: Tom Rix Date: Sat Mar 11 08:51:13 2023 -0500 ftrace: Set direct_ops storage-class-specifier to static smatch reports this warning kernel/trace/ftrace.c:2594:19: warning: symbol 'direct_ops' was not declared. Should it be static? The variable direct_ops is only used in ftrace.c, so it should be static Link: https://lore.kernel.org/linux-trace-kernel/20230311135113.711824-1-trix@redhat.com Signed-off-by: Tom Rix Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 08697bca9bbba15f2058fdbd9f970bd5f6a8a2e8 Author: Tero Kristo Date: Fri Mar 10 12:04:51 2023 +0200 trace/hwlat: Do not start per-cpu thread if it is already running The hwlatd tracer will end up starting multiple per-cpu threads with the following script: #!/bin/sh cd /sys/kernel/debug/tracing echo 0 > tracing_on echo hwlat > current_tracer echo per-cpu > hwlat_detector/mode echo 100000 > hwlat_detector/width echo 200000 > hwlat_detector/window echo 1 > tracing_on To fix the issue, check if the hwlatd thread for the cpu is already running, before starting a new one. Along with the previous patch, this avoids running multiple instances of the same CPU thread on the system. Link: https://lore.kernel.org/all/20230302113654.2984709-1-tero.kristo@linux.intel.com/ Link: https://lkml.kernel.org/r/20230310100451.3948583-3-tero.kristo@linux.intel.com Cc: stable@vger.kernel.org Fixes: f46b16520a087 ("trace/hwlat: Implement the per-cpu mode") Signed-off-by: Tero Kristo Acked-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) commit 4c42f5f0d1dd20bddd9f940beb1e6ccad60c4498 Author: Tero Kristo Date: Fri Mar 10 12:04:50 2023 +0200 trace/hwlat: Do not wipe the contents of per-cpu thread data Do not wipe the contents of the per-cpu kthread data when starting the tracer, as this will completely forget about already running instances and can later start new additional per-cpu threads. Link: https://lore.kernel.org/all/20230302113654.2984709-1-tero.kristo@linux.intel.com/ Link: https://lkml.kernel.org/r/20230310100451.3948583-2-tero.kristo@linux.intel.com Cc: stable@vger.kernel.org Fixes: f46b16520a087 ("trace/hwlat: Implement the per-cpu mode") Signed-off-by: Tero Kristo Acked-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) commit 7a025e066e0f0afd39cc88a089929ccb945ce9e8 Author: Tom Rix Date: Thu Mar 9 10:04:14 2023 -0500 tracing/osnoise: set several trace_osnoise.c variables storage-class-specifier to static smatch reports several similar warnings kernel/trace/trace_osnoise.c:220:1: warning: symbol '__pcpu_scope_per_cpu_osnoise_var' was not declared. Should it be static? kernel/trace/trace_osnoise.c:243:1: warning: symbol '__pcpu_scope_per_cpu_timerlat_var' was not declared. Should it be static? kernel/trace/trace_osnoise.c:335:14: warning: symbol 'interface_lock' was not declared. Should it be static? kernel/trace/trace_osnoise.c:2242:5: warning: symbol 'timerlat_min_period' was not declared. Should it be static? kernel/trace/trace_osnoise.c:2243:5: warning: symbol 'timerlat_max_period' was not declared. Should it be static? These variables are only used in trace_osnoise.c, so it should be static Link: https://lore.kernel.org/linux-trace-kernel/20230309150414.4036764-1-trix@redhat.com Signed-off-by: Tom Rix Acked-by: Masami Hiramatsu (Google) Acked-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) commit bc4f359b3b607daac0290d0038561237a86b38cb Author: Anton Gusev Date: Tue Jan 31 10:58:18 2023 +0300 tracing: Fix wrong return in kprobe_event_gen_test.c Overwriting the error code with the deletion result may cause the function to return 0 despite encountering an error. Commit b111545d26c0 ("tracing: Remove the useless value assignment in test_create_synth_event()") solves a similar issue by returning the original error code, so this patch does the same. Found by Linux Verification Center (linuxtesting.org) with SVACE. Link: https://lore.kernel.org/linux-trace-kernel/20230131075818.5322-1-aagusev@ispras.ru Signed-off-by: Anton Gusev Reviewed-by: Steven Rostedt (Google) Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 6d206b1ea9f48433a96edec7028586db1d947911 Author: Ido Schimmel Date: Fri Mar 17 16:32:59 2023 +0100 mlxsw: core_thermal: Fix fan speed in maximum cooling state The cooling levels array is supposed to prevent the system fans from being configured below a 20% duty cycle as otherwise some of them get stuck at 0 RPM. Due to an off-by-one error, the last element in the array was not initialized, causing it to be set to zero, which in turn lead to fans being configured with a 0% duty cycle in maximum cooling state. Since commit 332fdf951df8 ("mlxsw: thermal: Fix out-of-bounds memory accesses") the contents of the array are static. Therefore, instead of fixing the initialization of the array, simply remove it and adjust thermal_cooling_device_ops::set_cur_state() so that the configured duty cycle is never set below 20%. Before: # cat /sys/class/thermal/thermal_zone0/cdev0/type mlxsw_fan # echo 10 > /sys/class/thermal/thermal_zone0/cdev0/cur_state # cat /sys/class/hwmon/hwmon0/name mlxsw # cat /sys/class/hwmon/hwmon0/pwm1 0 After: # cat /sys/class/thermal/thermal_zone0/cdev0/type mlxsw_fan # echo 10 > /sys/class/thermal/thermal_zone0/cdev0/cur_state # cat /sys/class/hwmon/hwmon0/name mlxsw # cat /sys/class/hwmon/hwmon0/pwm1 255 This bug was uncovered when the thermal subsystem repeatedly tried to configure the cooling devices to their maximum state due to another issue [1]. This resulted in the fans being stuck at 0 RPM, which eventually lead to the system undergoing thermal shutdown. [1] https://lore.kernel.org/netdev/ZA3CFNhU4AbtsP4G@shredder/ Fixes: a421ce088ac8 ("mlxsw: core: Extend cooling device with cooling levels") Signed-off-by: Ido Schimmel Reviewed-by: Vadim Pasternak Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 04361b8bb81819efb68bf39c276025e2250ac537 Author: Russell King (Oracle) Date: Fri Mar 17 07:28:00 2023 +0000 net: sfp: fix state loss when updating state_hw_mask Andrew reports that the SFF modules on one of the ZII platforms do not indicate link up due to the SFP code believing that LOS indicating that there is no signal being received from the remote end, but in fact the LOS signal is showing that there is signal. What makes SFF modules different from SFPs is they typically have an inverted LOS, which uncovered this issue. When we read the hardware state, we mask it with state_hw_mask so we ignore anything we're not interested in. However, we don't re-read when state_hw_mask changes, leading to sfp->state being stale. Arrange for a software poll of the module state after we have parsed the EEPROM in sfp_sm_mod_probe() and updated state_*_mask. This will generate any necessary events for signal changes for the state machine as well as updating sfp->state. Reported-by: Andrew Lunn Tested-by: Andrew Lunn Fixes: 8475c4b70b04 ("net: sfp: re-implement soft state polling setup") Signed-off-by: Russell King (Oracle) Signed-off-by: David S. Miller commit 070246e4674b125860d311c18ce2623e73e2bd51 Author: Jochen Henneberg Date: Fri Mar 17 09:08:17 2023 +0100 net: stmmac: Fix for mismatched host/device DMA address width Currently DMA address width is either read from a RO device register or force set from the platform data. This breaks DMA when the host DMA address width is <=32it but the device is >32bit. Right now the driver may decide to use a 2nd DMA descriptor for another buffer (happens in case of TSO xmit) assuming that 32bit addressing is used due to platform configuration but the device will still use both descriptor addresses as one address. This can be observed with the Intel EHL platform driver that sets 32bit for addr64 but the MAC reports 40bit. The TX queue gets stuck in case of TCP with iptables NAT configuration on TSO packets. The logic should be like this: Whatever we do on the host side (memory allocation GFP flags) should happen with the host DMA width, whenever we decide how to set addresses on the device registers we must use the device DMA address width. This patch renames the platform address width field from addr64 (term used in device datasheet) to host_addr and uses this value exclusively for host side operations while all chip operations consider the device DMA width as read from the device register. Fixes: 7cfc4486e7ea ("stmmac: intel: Configure EHL PSE0 GbE and PSE1 GbE to 32 bits DMA addressing") Signed-off-by: Jochen Henneberg Signed-off-by: David S. Miller commit 543887d7a8f2309688a21e35831a292405c68e88 Merge: 4203d84032e28 30b605b8501e3 Author: David S. Miller Date: Sun Mar 19 10:48:35 2023 +0000 Merge branch 'mdiobus-module-owner' Florian Fainelli says: ==================== ACPI/DT mdiobus module owner fixes This patch series fixes wrong mdiobus module ownership for MDIO buses registered from DT or ACPI. Thanks Maxime for providing the first patch and making me see that ACPI also had the same issue. Changes in v2: - fixed missing kdoc in the first patch ==================== Signed-off-by: David S. Miller commit 30b605b8501e321f79e19c3238aa6ca31da6087c Author: Florian Fainelli Date: Thu Mar 16 16:33:17 2023 -0700 net: mdio: fix owner field for mdio buses registered using ACPI Bus ownership is wrong when using acpi_mdiobus_register() to register an mdio bus. That function is not inline, so when it calls mdiobus_register() the wrong THIS_MODULE value is captured. CC: Maxime Bizon Fixes: 803ca24d2f92 ("net: mdio: Add ACPI support code for mdio") Signed-off-by: Florian Fainelli Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 99669259f3361d759219811e670b7e0742668556 Author: Maxime Bizon Date: Thu Mar 16 16:33:16 2023 -0700 net: mdio: fix owner field for mdio buses registered using device-tree Bus ownership is wrong when using of_mdiobus_register() to register an mdio bus. That function is not inline, so when it calls mdiobus_register() the wrong THIS_MODULE value is captured. Signed-off-by: Maxime Bizon Fixes: 90eff9096c01 ("net: phy: Allow splitting MDIO bus/device support from PHYs") [florian: fix kdoc, added Fixes tag] Signed-off-by: Florian Fainelli Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 4203d84032e28f893594a453bd8bc9c3b15c7334 Author: Florian Fainelli Date: Thu Mar 16 13:33:24 2023 -0700 net: phy: Ensure state transitions are processed from phy_stop() In the phy_disconnect() -> phy_stop() path, we will be forcibly setting the PHY state machine to PHY_HALTED. This invalidates the old_state != phydev->state condition in phy_state_machine() such that we will neither display the state change for debugging, nor will we invoke the link_change_notify() callback. Factor the code by introducing phy_process_state_change(), and ensure that we process the state change from phy_stop() as well. Fixes: 5c5f626bcace ("net: phy: improve handling link_change_notify callback") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 739cb49988afc1da85edce984212e5bbadbbf6ce Merge: e8d20c3ded59a 2b4cc3d3f4d8e Author: David S. Miller Date: Sun Mar 19 10:44:24 2023 +0000 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-03-16 (igb, igbvf, igc) This series contains updates to igb, igbvf, and igc drivers. Lin Ma removes rtnl_lock() when disabling SRIOV on remove which was causing deadlock on igb. Akihiko Odaki delays enabling of SRIOV on igb to prevent early messages that could get ignored and clears MAC address when PF returns nack on reset; indicating no MAC address was assigned for igbvf. Gaosheng Cui frees IRQs in error path for igbvf. Akashi Takahiro fixes logic on checking TAPRIO gate support for igc. ==================== Signed-off-by: David S. Miller commit e8d20c3ded59a092532513c9bd030d1ea66f5f44 Author: Zheng Wang Date: Fri Mar 17 00:15:26 2023 +0800 xirc2ps_cs: Fix use after free bug in xirc2ps_detach In xirc2ps_probe, the local->tx_timeout_task was bounded with xirc2ps_tx_timeout_task. When timeout occurs, it will call xirc_tx_timeout->schedule_work to start the work. When we call xirc2ps_detach to remove the driver, there may be a sequence as follows: Stop responding to timeout tasks and complete scheduled tasks before cleanup in xirc2ps_detach, which will fix the problem. CPU0 CPU1 |xirc2ps_tx_timeout_task xirc2ps_detach | free_netdev | kfree(dev); | | | do_reset | //use dev Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Zheng Wang Signed-off-by: David S. Miller commit e4522c097ec10f23ea0933e9e69d4fa9d8ae9441 Author: Tatyana Nikolova Date: Wed Mar 15 09:52:31 2023 -0500 RDMA/irdma: Add ipv4 check to irdma_find_listener() Add ipv4 check to irdma_find_listener(). Otherwise the function incorrectly finds and returns a listener with a different addr family for the zero IP addr, if a listener with a zero IP addr and the same port as the one searched for has already been created. Fixes: 146b9756f14c ("RDMA/irdma: Add connection manager") Signed-off-by: Tatyana Nikolova Signed-off-by: Shiraz Saleem Link: https://lore.kernel.org/r/20230315145231.931-5-shiraz.saleem@intel.com Signed-off-by: Leon Romanovsky commit 8385a875c9eecc429b2f72970efcbb0e5cb5b547 Author: Mustafa Ismail Date: Wed Mar 15 09:52:30 2023 -0500 RDMA/irdma: Increase iWARP CM default rexmit count When running perftest with large number of connections in iWARP mode, the passive side could be slow to respond. Increase the rexmit counter default to allow scaling connections. Fixes: 146b9756f14c ("RDMA/irdma: Add connection manager") Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Link: https://lore.kernel.org/r/20230315145231.931-4-shiraz.saleem@intel.com Signed-off-by: Leon Romanovsky commit b69a6979dbaa2453675fe9c71bdc2497fedb11f9 Author: Mustafa Ismail Date: Wed Mar 15 09:52:29 2023 -0500 RDMA/irdma: Fix memory leak of PBLE objects On rmmod of irdma, the PBLE object memory is not being freed. PBLE object memory are not statically pre-allocated at function initialization time unlike other HMC objects. PBLEs objects and the Segment Descriptors (SD) for it can be dynamically allocated during scale up and SD's remain allocated till function deinitialization. Fix this leak by adding IRDMA_HMC_IW_PBLE to the iw_hmc_obj_types[] table and skip pbles in irdma_create_hmc_obj but not in irdma_del_hmc_objects(). Fixes: 44d9e52977a1 ("RDMA/irdma: Implement device initialization definitions") Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Link: https://lore.kernel.org/r/20230315145231.931-3-shiraz.saleem@intel.com Signed-off-by: Leon Romanovsky commit 30ed9ee9a10a90ae719dcfcacead1d0506fa45ed Author: Mustafa Ismail Date: Wed Mar 15 09:52:28 2023 -0500 RDMA/irdma: Do not generate SW completions for NOPs Currently, artificial SW completions are generated for NOP wqes which can generate unexpected completions with wr_id = 0. Skip the generation of artificial completions for NOPs. Fixes: 81091d7696ae ("RDMA/irdma: Add SW mechanism to generate completions on error") Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Link: https://lore.kernel.org/r/20230315145231.931-2-shiraz.saleem@intel.com Signed-off-by: Leon Romanovsky commit 25143b6a01d0cc5319edd3de22ffa2578b045550 Author: Daniil Tatianin Date: Thu Mar 16 13:29:21 2023 +0300 qed/qed_sriov: guard against NULL derefs from qed_iov_get_vf_info We have to make sure that the info returned by the helper is valid before using it. Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Fixes: f990c82c385b ("qed*: Add support for ndo_set_vf_trust") Fixes: 733def6a04bf ("qed*: IOV link control") Signed-off-by: Daniil Tatianin Reviewed-by: Michal Swiatkowski Signed-off-by: David S. Miller commit b7a5822810c4398515300d614d988cf638adecad Author: Tim Crawford Date: Fri Mar 17 08:18:25 2023 -0600 ALSA: hda/realtek: Add quirks for some Clevo laptops Add the audio quirk for some of Clevo's latest RPL laptops: - NP50RNJS (ALC256) - NP70SNE (ALC256) - PD50SNE (ALC1220) - PE60RNE (ALC1220) Co-authored-by: Jeremy Soller Signed-off-by: Tim Crawford Cc: Link: https://lore.kernel.org/r/20230317141825.11807-1-tcrawford@system76.com Signed-off-by: Takashi Iwai commit 4bcf6f827a79c59806c695dc280e763c5b6a6813 Author: Eric Biggers Date: Mon Mar 13 15:12:31 2023 -0700 fscrypt: check for NULL keyring in fscrypt_put_master_key_activeref() It is a bug for fscrypt_put_master_key_activeref() to see a NULL keyring. But it used to be possible due to the bug, now fixed, where fscrypt_destroy_keyring() was called before security_sb_delete(). To be consistent with how fscrypt_destroy_keyring() uses WARN_ON for the same issue, WARN and leak the fscrypt_master_key if the keyring is NULL instead of dereferencing the NULL pointer. This is a robustness improvement, not a fix. Link: https://lore.kernel.org/r/20230313221231.272498-4-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 43e5f1d5921128373743585e3275ed9044ef8b8f Author: Eric Biggers Date: Mon Mar 13 15:12:30 2023 -0700 fscrypt: improve fscrypt_destroy_keyring() documentation Document that fscrypt_destroy_keyring() must be called after all potentially-encrypted inodes have been evicted. Link: https://lore.kernel.org/r/20230313221231.272498-3-ebiggers@kernel.org Signed-off-by: Eric Biggers commit a3671bd86a9770e34969522d29bb30a1b66fd88a Merge: 534293368afa1 29413f05fe34e Author: Linus Torvalds Date: Sat Mar 18 16:01:34 2023 -0700 Merge tag 'fbdev-for-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev Pull fbdev fixes from Helge Deller: "The majority of lines changed is due to a code style cleanup in the pnmtologo helper program. Arnd removed the omap1 osk driver and the SIS fb driver is now orphaned. Other than that it's the usual bunch of small fixes and cleanups, e.g. prevent possible divide-by-zero in various fb drivers if the pixclock is zero and various conversions to devm_platform*() and of_property*() functions: - Drop omap1 osk driver - Various potential divide by zero pixclock fixes - Add pixelclock and fb_check_var() to stifb - Code style cleanups and indenting fixes" * tag 'fbdev-for-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: fbdev: Use of_property_present() for testing DT property presence fbdev: au1200fb: Fix potential divide by zero fbdev: lxfb: Fix potential divide by zero fbdev: intelfb: Fix potential divide by zero fbdev: nvidia: Fix potential divide by zero fbdev: stifb: Provide valid pixelclock and add fb_check_var() checks fbdev: omapfb: remove omap1 osk driver fbdev: xilinxfb: Use devm_platform_get_and_ioremap_resource() fbdev: wm8505fb: Use devm_platform_ioremap_resource() fbdev: pxa3xx-gcu: Use devm_platform_get_and_ioremap_resource() fbdev: Use of_property_read_bool() for boolean properties fbdev: clps711x-fb: Use devm_platform_get_and_ioremap_resource() fbdev: tgafb: Fix potential divide by zero MAINTAINERS: orphan SIS FRAMEBUFFER DRIVER fbdev: omapfb: cleanup inconsistent indentation drivers: video: logo: add SPDX comment, remove GPL notice in pnmtologo.c drivers: video: logo: fix code style issues in pnmtologo.c commit 534293368afa1a953c283310b82e4dc58309d51e Merge: 2a3e75a7ab159 05e96e96a315f Author: Linus Torvalds Date: Sat Mar 18 11:49:48 2023 -0700 Merge tag 'kbuild-fixes-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Exclude kallsyms_seqs_of_names from kallsyms to fix build error - Fix 'make kernelrelease' for external module builds - Get the Debian source package compilable again - Fix the wrong uname when Debian packages are built with the KDEB_PKGVERSION option - Fix superfluous CROSS_COMPILE when building Debian packages - Fix RPM package build error when KCONFIG_CONFIG is set - Use 'git archive' for creating source tarballs - Remove the scripts/list-gitignored tool * tag 'kbuild-fixes-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: use git-archive for source package creation kbuild: rpm-pkg: move source components to rpmbuild/SOURCES kbuild: deb-pkg: use dh_listpackages to know enabled packages kbuild: deb-pkg: split image and debug objects staging out into functions kbuild: deb-pkg: set CROSS_COMPILE only when undefined kbuild: deb-pkg: do not take KERNELRELEASE from the source version kbuild: deb-pkg: make debian source package working again Makefile: Make kernelrelease target work with M= kconfig: Update config changed flag before calling callback kallsyms: add kallsyms_seqs_of_names to list of special symbols commit 2a3e75a7ab1590fdc015ed40ebeb074ffd092186 Merge: f900bffe2dac7 ab00709310eed Author: Linus Torvalds Date: Sat Mar 18 11:33:44 2023 -0700 Merge tag 'hwmon-for-v6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: - ltc2992, adm1266: Set missing can_sleep flag - tmp512/tmp513: Drop of_match_ptr for ID table to fix build with !CONFIG_OF - ucd90320: Fix back-to-back access problem - ina3221: Fix bad error return from probe function - xgene: Fix use-after-free bug in remove function - adt7475: Fix hysteresis register bit masks, and fix association of 'smoothing' attributes * tag 'hwmon-for-v6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (ltc2992) Set `can_sleep` flag for GPIO chip hwmon: (adm1266) Set `can_sleep` flag for GPIO chip hwmon: tmp512: drop of_match_ptr for ID table hwmon: (ucd90320) Add minimum delay between bus accesses hwmon: (ina3221) return prober error code hwmon: (xgene) Fix use after free bug in xgene_hwmon_remove due to race condition hwmon: (adt7475) Fix masking of hysteresis registers hwmon: (adt7475) Display smoothing attributes in correct order commit f900bffe2dac7eca800406b152da5acd05e92129 Merge: efbcbb12ee99f 5bc9e2d43f861 Author: Linus Torvalds Date: Sat Mar 18 11:25:39 2023 -0700 Merge tag 'ata-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata Pull ata fixes from Damien Le Moal: - Two fixes from Ondrej for the pata_parport driver to address an issue with error handling during drive connection and to fix memory leaks in case of errors during initialization and when disconnecting a device. * tag 'ata-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata: ata: pata_parport: fix memory leaks ata: pata_parport: fix parport release without claim commit efbcbb12ee99f750c9f25c873b55ad774871de2a Author: Linus Torvalds Date: Fri Mar 17 13:51:17 2023 -0700 media: m5mols: fix off-by-one loop termination error The __find_restype() function loops over the m5mols_default_ffmt[] array, and the termination condition ends up being wrong: instead of stopping when the iterator becomes the size of the array it traverses, it stops after it has already overshot the array. Now, in practice this doesn't likely matter, because the code will always find the entry it looks for, and will thus return early and never hit that last extra iteration. But it turns out that clang will unroll the loop fully, because it has only two iterations (well, three due to the off-by-one bug), and then clang will end up just giving up in the middle of the loop unrolling when it notices that the code walks past the end of the array. And that made 'objtool' very unhappy indeed, because the generated code just falls off the edge of the universe, and ends up falling through to the next function, causing this warning: drivers/media/i2c/m5mols/m5mols.o: warning: objtool: m5mols_set_fmt() falls through to next function m5mols_get_frame_desc() Fix the loop ending condition. Reported-by: Jens Axboe Analyzed-by: Miguel Ojeda Analyzed-by: Nick Desaulniers Link: https://lore.kernel.org/linux-block/CAHk-=wgTSdKYbmB1JYM5vmHMcD9J9UZr0mn7BOYM_LudrP+Xvw@mail.gmail.com/ Fixes: bc125106f8af ("[media] Add support for M-5MOLS 8 Mega Pixel camera ISP") Cc: HeungJun, Kim Cc: Sylwester Nawrocki Cc: Kyungmin Park Cc: Mauro Carvalho Chehab Signed-off-by: Linus Torvalds commit 363c7dc72f79edd55bf1c4380e0fbf7f1bbc2c86 Author: Lars-Peter Clausen Date: Sun Mar 12 14:09:33 2023 -0700 iio: adc: ti-ads7950: Set `can_sleep` flag for GPIO chip The ads7950 uses a mutex as well as SPI transfers in its GPIO callbacks. This means these callbacks can sleep and the `can_sleep` flag should be set. Having the flag set will make sure that warnings are generated when calling any of the callbacks from a potentially non-sleeping context. Fixes: c97dce792dc8 ("iio: adc: ti-ads7950: add GPIO support") Signed-off-by: Lars-Peter Clausen Acked-by: David Lechner Link: https://lore.kernel.org/r/20230312210933.2275376-1-lars@metafoo.de Cc: Signed-off-by: Jonathan Cameron commit 49f76c499d38bf67803438eee88c8300d0f6ce09 Author: Patrik Dahlström Date: Mon Mar 13 21:50:29 2023 +0100 iio: adc: palmas_gpadc: fix NULL dereference on rmmod Calling dev_to_iio_dev() on a platform device pointer is undefined and will make adc NULL. Signed-off-by: Patrik Dahlström Link: https://lore.kernel.org/r/20230313205029.1881745-1-risca@dalakolonin.se Signed-off-by: Jonathan Cameron commit 4985e7b2c002eb4c5c794a1d3acd91b82c89a0fd Author: Ming Lei Date: Sat Mar 18 22:12:31 2023 +0800 block: ublk_drv: mark device as LIVE before adding disk IO can be started before add_disk() returns, such as reading parititon table, then the monitor work should work for making forward progress. So mark device as LIVE before adding disk, meantime change to DEAD if add_disk() fails. Fixed: 71f28f3136af ("ublk_drv: add io_uring based userspace block driver") Reviewed-by: Ziyang Zhang Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20230318141231.55562-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit ab327f8acdf8d06601fbf058859a539a9422afff Author: Álvaro Fernández Rojas Date: Fri Mar 17 11:20:04 2023 +0100 mips: bmips: BCM6358: disable RAC flush for TP1 RAC flush causes kernel panics on BCM6358 with EHCI/OHCI when booting from TP1: [ 3.881739] usb 1-1: new high-speed USB device number 2 using ehci-platform [ 3.895011] Reserved instruction in kernel code[#1]: [ 3.900113] CPU: 0 PID: 1 Comm: init Not tainted 5.10.16 #0 [ 3.905829] $ 0 : 00000000 10008700 00000000 77d94060 [ 3.911238] $ 4 : 7fd1f088 00000000 81431cac 81431ca0 [ 3.916641] $ 8 : 00000000 ffffefff 8075cd34 00000000 [ 3.922043] $12 : 806f8d40 f3e812b7 00000000 000d9aaa [ 3.927446] $16 : 7fd1f068 7fd1f080 7ff559b8 81428470 [ 3.932848] $20 : 00000000 00000000 55590000 77d70000 [ 3.938251] $24 : 00000018 00000010 [ 3.943655] $28 : 81430000 81431e60 81431f28 800157fc [ 3.949058] Hi : 00000000 [ 3.952013] Lo : 00000000 [ 3.955019] epc : 80015808 setup_sigcontext+0x54/0x24c [ 3.960464] ra : 800157fc setup_sigcontext+0x48/0x24c [ 3.965913] Status: 10008703 KERNEL EXL IE [ 3.970216] Cause : 00800028 (ExcCode 0a) [ 3.974340] PrId : 0002a010 (Broadcom BMIPS4350) [ 3.979170] Modules linked in: ohci_platform ohci_hcd fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd gpio_button_hotplug usbcore nls_base usb_common [ 3.992907] Process init (pid: 1, threadinfo=(ptrval), task=(ptrval), tls=77e22ec8) [ 4.000776] Stack : 81431ef4 7fd1f080 81431f28 81428470 7fd1f068 81431edc 7ff559b8 81428470 [ 4.009467] 81431f28 7fd1f080 55590000 77d70000 77d5498c 80015c70 806f0000 8063ae74 [ 4.018149] 08100002 81431f28 0000000a 08100002 81431f28 0000000a 77d6b418 00000003 [ 4.026831] ffffffff 80016414 80080734 81431ecc 81431ecc 00000001 00000000 04000000 [ 4.035512] 77d54874 00000000 00000000 00000000 00000000 00000012 00000002 00000000 [ 4.044196] ... [ 4.046706] Call Trace: [ 4.049238] [<80015808>] setup_sigcontext+0x54/0x24c [ 4.054356] [<80015c70>] setup_frame+0xdc/0x124 [ 4.059015] [<80016414>] do_notify_resume+0x1dc/0x288 [ 4.064207] [<80011b50>] work_notifysig+0x10/0x18 [ 4.069036] [ 4.070538] Code: 8fc300b4 00001025 26240008 ac830004 3c048063 0c0228aa 24846a00 26240010 [ 4.080686] [ 4.082517] ---[ end trace 22a8edb41f5f983b ]--- [ 4.087374] Kernel panic - not syncing: Fatal exception [ 4.092753] Rebooting in 1 seconds.. Because the bootloader (CFE) is not initializing the Read-ahead cache properly on the second thread (TP1). Since the RAC was not initialized properly, we should avoid flushing it at the risk of corrupting the instruction stream as seen in the trace above. Fixes: d59098a0e9cb ("MIPS: bmips: use generic dma noncoherent ops") Signed-off-by: Álvaro Fernández Rojas Signed-off-by: Thomas Bogendoerfer commit 00f4bc5184c19cb33f468f1ea409d70d19f8f502 Author: William Breathitt Gray Date: Thu Mar 16 16:34:26 2023 -0400 counter: 104-quad-8: Fix Synapse action reported for Index signals Signal 16 and higher represent the device's Index lines. The priv->preset_enable array holds the device configuration for these Index lines. The preset_enable configuration is active low on the device, so invert the conditional check in quad8_action_read() to properly handle the logical state of preset_enable. Fixes: f1d8a071d45b ("counter: 104-quad-8: Add Generic Counter interface support") Cc: Link: https://lore.kernel.org/r/20230316203426.224745-1-william.gray@linaro.org/ Signed-off-by: William Breathitt Gray commit 4aa3b75c74603c3374877d5fd18ad9cc3a9a62ed Author: William Breathitt Gray Date: Sun Mar 12 19:15:49 2023 -0400 counter: 104-quad-8: Fix race condition between FLAG and CNTR reads The Counter (CNTR) register is 24 bits wide, but we can have an effective 25-bit count value by setting bit 24 to the XOR of the Borrow flag and Carry flag. The flags can be read from the FLAG register, but a race condition exists: the Borrow flag and Carry flag are instantaneous and could change by the time the count value is read from the CNTR register. Since the race condition could result in an incorrect 25-bit count value, remove support for 25-bit count values from this driver; hard-coded maximum count values are replaced by a LS7267_CNTR_MAX define for consistency and clarity. Fixes: 28e5d3bb0325 ("iio: 104-quad-8: Add IIO support for the ACCES 104-QUAD-8") Cc: # 6.1.x Cc: # 6.2.x Link: https://lore.kernel.org/r/20230312231554.134858-1-william.gray@linaro.org/ Signed-off-by: William Breathitt Gray commit 5ed213dd64681f84a01ceaa82fb336cf7d59ddcf Author: Hans de Goede Date: Tue Mar 14 13:31:03 2023 +0100 efi: sysfb_efi: Add quirk for Lenovo Yoga Book X91F/L Another Lenovo convertable which reports a landscape resolution of 1920x1200 with a pitch of (1920 * 4) bytes, while the actual framebuffer has a resolution of 1200x1920 with a pitch of (1200 * 4) bytes. Signed-off-by: Hans de Goede Reviewed-by: Javier Martinez Canillas Signed-off-by: Ard Biesheuvel commit 3615c78673c332b69aaacefbcde5937c5c706686 Author: Hans de Goede Date: Tue Mar 14 13:31:02 2023 +0100 efi: sysfb_efi: Fix DMI quirks not working for simpledrm Commit 8633ef82f101 ("drivers/firmware: consolidate EFI framebuffer setup for all arches") moved the sysfb_apply_efi_quirks() call in sysfb_init() from before the [sysfb_]parse_mode() call to after it. But sysfb_apply_efi_quirks() modifies the global screen_info struct which [sysfb_]parse_mode() parses, so doing it later is too late. This has broken all DMI based quirks for correcting wrong firmware efifb settings when simpledrm is used. To fix this move the sysfb_apply_efi_quirks() call back to its old place and split the new setup of the efifb_fwnode (which requires the platform_device) into its own function and call that at the place of the moved sysfb_apply_efi_quirks(pd) calls. Fixes: 8633ef82f101 ("drivers/firmware: consolidate EFI framebuffer setup for all arches") Cc: stable@vger.kernel.org Cc: Javier Martinez Canillas Cc: Thomas Zimmermann Signed-off-by: Hans de Goede Reviewed-by: Javier Martinez Canillas Signed-off-by: Ard Biesheuvel commit f59a7ec1e69fc23946175b8c0d7e0fd21f94f8c9 Author: Ard Biesheuvel Date: Tue Feb 28 19:33:14 2023 +0100 efi/libstub: smbios: Drop unused 'recsize' parameter We no longer use the recsize argument for locating the string table in an SMBIOS record, so we can drop it from the internal API. Signed-off-by: Ard Biesheuvel commit eb684408f3ea4856639675d6465f0024e498e4b1 Author: Ard Biesheuvel Date: Tue Feb 28 17:00:49 2023 +0100 arm64: efi: Use SMBIOS processor version to key off Ampere quirk Instead of using the SMBIOS type 1 record 'family' field, which is often modified by OEMs, use the type 4 'processor ID' and 'processor version' fields, which are set to a small set of probe-able values on all known Ampere EFI systems in the field. Fixes: 550b33cfd4452968 ("arm64: efi: Force the use of ...") Tested-by: Andrea Righi Signed-off-by: Ard Biesheuvel commit 34343eb06afc04af9178a9883d9354dc12beede0 Author: Ard Biesheuvel Date: Tue Feb 28 19:23:09 2023 +0100 efi/libstub: smbios: Use length member instead of record struct size The type 1 SMBIOS record happens to always be the same size, but there are other record types which have been augmented over time, and so we should really use the length field in the header to decide where the string table starts. Fixes: 550b33cfd4452968 ("arm64: efi: Force the use of ...") Signed-off-by: Ard Biesheuvel commit e866f29a6ff1804efb5c9cfc1e354192615dfb64 Merge: 3dacc5bb81472 964290ff32d13 Author: Jakub Kicinski Date: Fri Mar 17 22:39:33 2023 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2023-03-16 (iavf) This series contains updates to iavf driver only. Alex fixes incorrect check against Rx hash feature and corrects payload value for IPv6 UDP packet. Ahmed removes bookkeeping of VLAN 0 filter as it always exists and can cause a false max filter error message. * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: iavf: do not track VLAN 0 filters iavf: fix non-tunneled IPv6 UDP packet type and hashing iavf: fix inverted Rx hash condition leading to disabled hash ==================== Link: https://lore.kernel.org/r/20230316155316.1554931-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 3dacc5bb81472905a7f4f9879cb95477c22dc359 Author: Grygorii Strashko Date: Thu Mar 16 15:22:32 2023 +0530 net: ethernet: ti: am65-cpts: reset pps genf adj settings on enable The CPTS PPS GENf adjustment settings are invalid after it has been disabled for a while, so reset them. Fixes: eb9233ce6751 ("net: ethernet: ti: am65-cpts: adjust pps following ptp changes") Signed-off-by: Grygorii Strashko Signed-off-by: Siddharth Vadapalli Reviewed-by: Roger Quadros Reviewed-by: Michal Swiatkowski Link: https://lore.kernel.org/r/20230316095232.2002680-1-s-vadapalli@ti.com Signed-off-by: Jakub Kicinski commit ff821092cf02a70c2bccd2d19269f01e29aa52cf Author: Szymon Heidrich Date: Thu Mar 16 11:19:54 2023 +0100 net: usb: smsc95xx: Limit packet length to skb->len Packet length retrieved from descriptor may be larger than the actual socket buffer length. In such case the cloned skb passed up the network stack will leak kernel memory contents. Fixes: 2f7ca802bdae ("net: Add SMSC LAN9500 USB2.0 10/100 ethernet adapter driver") Signed-off-by: Szymon Heidrich Reviewed-by: Jakub Kicinski Link: https://lore.kernel.org/r/20230316101954.75836-1-szymon.heidrich@gmail.com Signed-off-by: Jakub Kicinski commit 30796d0dcb6e41c6558a07950f2ce60c209da867 Author: Álvaro Fernández Rojas Date: Thu Mar 16 18:28:07 2023 +0100 net: dsa: b53: mmap: fix device tree support CPU port should also be enabled in order to get a working switch. Fixes: a5538a777b73 ("net: dsa: b53: mmap: Add device tree support") Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20230316172807.460146-1-noltari@gmail.com Signed-off-by: Jakub Kicinski commit 70e42feab2e20618ddd0cbfc4ab4b08628236ecd Author: Theodore Ts'o Date: Fri Mar 17 21:53:52 2023 -0400 ext4: fix possible double unlock when moving a directory Fixes: 0813299c586b ("ext4: Fix possible corruption when moving a directory") Link: https://lore.kernel.org/r/5efbe1b9-ad8b-4a4f-b422-24824d2b775c@kili.mountain Reported-by: Dan Carpenter Reported-by: syzbot+0c73d1d8b952c5f3d714@syzkaller.appspotmail.com Signed-off-by: Theodore Ts'o commit 1d3b7a788ca7435156809a6bd5b20c95b2370d45 Author: Max Filippov Date: Thu Mar 16 23:00:21 2023 -0700 xtensa: fix KASAN report for show_stack show_stack dumps raw stack contents which may trigger an unnecessary KASAN report. Fix it by copying stack contents to a temporary buffer with __memcpy and then printing that buffer instead of passing stack pointer directly to the print_hex_dump. Cc: stable@vger.kernel.org Signed-off-by: Max Filippov commit fcdb1eda5302599045bb366e679cccb4216f3873 Author: Josh Don Date: Wed Mar 15 14:40:29 2023 -0700 cgroup: fix display of forceidle time at root We need to reset forceidle_sum to 0 when reading from root, since the bstat we accumulate into is stack allocated. To make this more robust, just replace the existing cputime reset with a memset of the overall bstat. Signed-off-by: Josh Don Fixes: 1fcf54deb767 ("sched/core: add forced idle accounting for cgroups") Cc: stable@vger.kernel.org # v6.0+ Signed-off-by: Tejun Heo commit 27c934dd8832dd40fd34776f916dc201e18b319b Author: Jeff Layton Date: Fri Mar 17 13:13:08 2023 -0400 nfsd: don't replace page in rq_pages if it's a continuation of last page The splice read calls nfsd_splice_actor to put the pages containing file data into the svc_rqst->rq_pages array. It's possible however to get a splice result that only has a partial page at the end, if (e.g.) the filesystem hands back a short read that doesn't cover the whole page. nfsd_splice_actor will plop the partial page into its rq_pages array and return. Then later, when nfsd_splice_actor is called again, the remainder of the page may end up being filled out. At this point, nfsd_splice_actor will put the page into the array _again_ corrupting the reply. If this is done enough times, rq_next_page will overrun the array and corrupt the trailing fields -- the rq_respages and rq_next_page pointers themselves. If we've already added the page to the array in the last pass, don't add it to the array a second time when dealing with a splice continuation. This was originally handled properly in nfsd_splice_actor, but commit 91e23b1c3982 ("NFSD: Clean up nfsd_splice_actor()") removed the check for it. Fixes: 91e23b1c3982 ("NFSD: Clean up nfsd_splice_actor()") Cc: Al Viro Reported-by: Dario Lesca Tested-by: David Critch Link: https://bugzilla.redhat.com/show_bug.cgi?id=2150630 Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 478a351ce0d69cef2d2bf2a686a09b356b63a66c Merge: 8d3c682a5e3d9 f5e305e63b035 Author: Linus Torvalds Date: Fri Mar 17 13:31:16 2023 -0700 Merge tag 'net-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from netfilter, wifi and ipsec. A little more changes than usual, but it's pretty normal for us that the rc3/rc4 PRs are oversized as people start testing in earnest. Possibly an extra boost from people deploying the 6.1 LTS but that's more of an unscientific hunch. Current release - regressions: - phy: mscc: fix deadlock in phy_ethtool_{get,set}_wol() - virtio: vsock: don't use skbuff state to account credit - virtio: vsock: don't drop skbuff on copy failure - virtio_net: fix page_to_skb() miscalculating the memory size Current release - new code bugs: - eth: correct xdp_features after device reconfig - wifi: nl80211: fix the puncturing bitmap policy - net/mlx5e: flower: - fix raw counter initialization - fix missing error code - fix cloned flow attribute - ipa: - fix some register validity checks - fix a surprising number of bad offsets - kill FILT_ROUT_CACHE_CFG IPA register Previous releases - regressions: - tcp: fix bind() conflict check for dual-stack wildcard address - veth: fix use after free in XDP_REDIRECT when skb headroom is small - ipv4: fix incorrect table ID in IOCTL path - ipvlan: make skb->skb_iif track skb->dev for l3s mode - mptcp: - fix possible deadlock in subflow_error_report - fix UaFs when destroying unaccepted and listening sockets - dsa: mv88e6xxx: fix max_mtu of 1492 on 6165, 6191, 6220, 6250, 6290 Previous releases - always broken: - tcp: tcp_make_synack() can be called from process context, don't assume preemption is disabled when updating stats - netfilter: correct length for loading protocol registers - virtio_net: add checking sq is full inside xdp xmit - bonding: restore IFF_MASTER/SLAVE flags on bond enslave Ethertype change - phy: nxp-c45-tja11xx: fix MII_BASIC_CONFIG_REV bit number - eth: i40e: fix crash during reboot when adapter is in recovery mode - eth: ice: avoid deadlock on rtnl lock when auxiliary device plug/unplug meets bonding - dsa: mt7530: - remove now incorrect comment regarding port 5 - set PLL frequency and trgmii only when trgmii is used - eth: mtk_eth_soc: reset PCS state when changing interface types Misc: - ynl: another license adjustment - move the TCA_EXT_WARN_MSG attribute for tc action" * tag 'net-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (108 commits) selftests: bonding: add tests for ether type changes bonding: restore bond's IFF_SLAVE flag if a non-eth dev enslave fails bonding: restore IFF_MASTER/SLAVE flags on bond enslave ether type change net: renesas: rswitch: Fix GWTSDIE register handling net: renesas: rswitch: Fix the output value of quote from rswitch_rx() ethernet: sun: add check for the mdesc_grab() net: ipa: fix some register validity checks net: ipa: kill FILT_ROUT_CACHE_CFG IPA register net: ipa: add two missing declarations net: ipa: reg: include net: xdp: don't call notifiers during driver init net/sched: act_api: add specific EXT_WARN_MSG for tc action Revert "net/sched: act_api: move TCA_EXT_WARN_MSG to the correct hierarchy" net: dsa: microchip: fix RGMII delay configuration on KSZ8765/KSZ8794/KSZ8795 ynl: make the tooling check the license ynl: broaden the license even more tools: ynl: make definitions optional again hsr: ratelimit only when errors are printed qed/qed_mng_tlv: correctly zero out ->min instead of ->hour selftests: net: devlink_port_split.py: skip test if no suitable device available ... commit 2f0e4f0342201fe2228fcc2301cc2b42ae04b8e3 Author: Shyam Prasad N Date: Thu Mar 16 10:45:12 2023 +0000 cifs: check only tcon status on tcon related functions We had a couple of checks for session in cifs_tree_connect and cifs_mark_open_files_invalid, which were unnecessary. And that was done with ses_lock. Changed that to tc_lock too. Signed-off-by: Shyam Prasad N Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 8d3c682a5e3d9dfc2448ecbb22f4cd48359b9e21 Merge: b7966a5a5cd00 8f0d196e4dc13 Author: Linus Torvalds Date: Fri Mar 17 11:20:27 2023 -0700 Merge tag 'block-6.3-2023-03-16' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: "A bit bigger than usual, as the NVMe pull request missed last weeks submission. In detail: - NVMe pull request via Christoph: - Avoid potential UAF in nvmet_req_complete (Damien Le Moal) - More quirks (Elmer Miroslav Mosher Golovin, Philipp Geulen) - Fix a memory leak in the nvme-pci probe teardown path (Irvin Cote) - Repair the MAINTAINERS entry (Lukas Bulwahn) - Fix handling single range discard request (Ming Lei) - Show more opcode names in trace events (Minwoo Im) - Fix nvme-tcp timeout reporting (Sagi Grimberg) - MD pull request via Song: - Two fixes for old issues (Neil) - Resource leak in device stopping (Xiao) - Bio based device stats fix (Yu) - Kill unused CONFIG_BLOCK_COMPAT (Lukas) - sunvdc missing mdesc_grab() failure check (Liang) - Fix for reversal of request ordering upon issue for certain cases (Jan) - null_blk timeout fixes (Damien) - Loop use-after-free fix (Bart) - blk-mq SRCU fix for BLK_MQ_F_BLOCKING devices (Chris)" * tag 'block-6.3-2023-03-16' of git://git.kernel.dk/linux: block: remove obsolete config BLOCK_COMPAT md: select BLOCK_LEGACY_AUTOLOAD block: count 'ios' and 'sectors' when io is done for bio-based device block: sunvdc: add check for mdesc_grab() returning NULL nvmet: avoid potential UAF in nvmet_req_complete() nvme-trace: show more opcode names nvme-tcp: add nvme-tcp pdu size build protection nvme-tcp: fix opcode reporting in the timeout handler nvme-pci: add NVME_QUIRK_BOGUS_NID for Lexar NM620 nvme-pci: add NVME_QUIRK_BOGUS_NID for Netac NV3000 nvme-pci: fixing memory leak in probe teardown path nvme: fix handling single range discard request MAINTAINERS: repair malformed T: entries in NVM EXPRESS DRIVERS block: null_blk: cleanup null_queue_rq() block: null_blk: Fix handling of fake timeout request blk-mq: fix "bad unlock balance detected" on q->srcu in __blk_mq_run_dispatch_ops loop: Fix use-after-free issues block: do not reverse request order when flushing plug list md: avoid signed overflow in slot_store() md: Free resources in __md_stop commit b7966a5a5cd009a682ccb0823e89f1e9fb719f27 Merge: 02ef7d39fd552 d2acf789088bb Author: Linus Torvalds Date: Fri Mar 17 11:12:07 2023 -0700 Merge tag 'io_uring-6.3-2023-03-16' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: - When PF_NO_SETAFFINITY was removed for io-wq threads, we kind of forgot about the SQPOLL thread. Remove it there as well, there's even less of a reason to set it there (Michal) - Fixup a confusing 'ret' setting (Li) - When MSG_RING is used to send a direct descriptor to another ring, it's possible to have it allocate it on the target ring rather than provide a specific index for it. If this is done, return the chosen value in the CQE, like we would've done locally (Pavel) - Fix a regression in this series on huge page bvec collapsing (Pavel) * tag 'io_uring-6.3-2023-03-16' of git://git.kernel.dk/linux: io_uring/rsrc: fix folio accounting io_uring/msg_ring: let target know allocated index io_uring: rsrc: Optimize return value variable 'ret' io_uring/sqpoll: Do not set PF_NO_SETAFFINITY on sqpoll threads commit 02ef7d39fd552cf9e1de58a3003f77e743d1fb6b Merge: abb02a824555c 1fa9d47baa9e6 Author: Linus Torvalds Date: Fri Mar 17 11:02:26 2023 -0700 Merge tag 'pm-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix an error code path issue in a cpuidle driver and make the sleepgraph utility more robust against unexpected input. Specifics: - Fix the psci_pd_init_topology() failure path in the PSCI cpuidle driver (Shawn Guo) - Modify the sleepgraph utility so it does not crash on binary data in device names (Todd Brandt)" * tag 'pm-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: pm-graph: sleepgraph: Avoid crashing on binary data in device names cpuidle: psci: Iterate backwards over list in psci_pd_remove() commit abb02a824555c160dccc316971cbb802b3ebf4f7 Merge: ba9c779190459 f36cc6cd65204 Author: Linus Torvalds Date: Fri Mar 17 10:57:09 2023 -0700 Merge tag 'acpi-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These add some new quirks, fix PPTT handling, fix an ACPI utility and correct a mistake in the ACPI documentation. Specifics: - Fix ACPI PPTT handling to avoid sleep in the atomic context when it is not present (Sudeep Holla) - Add 'backlight=native' DMI quirk for Dell Vostro 15 3535 to the ACPI video driver (Chia-Lin Kao) - Add ACPI quirks for I2C device enumeration on Lenovo Yoga Book X90 and Acer Iconia One 7 B1-750 (Hans de Goede) - Fix handling of invalid command line option values in the ACPI pfrut utility (Chen Yu) - Fix references to I2C device data type in the ACPI documentation for device enumeration (Andy Shevchenko)" * tag 'acpi-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: tools: pfrut: Check if the input of level and type is in the right numeric range ACPI: PPTT: Fix to avoid sleep in the atomic context when PPTT is absent ACPI: x86: Add skip i2c clients quirk for Lenovo Yoga Book X90 ACPI: x86: Add skip i2c clients quirk for Acer Iconia One 7 B1-750 ACPI: x86: Introduce an acpi_quirk_skip_gpio_event_handlers() helper ACPI: video: Add backlight=native DMI quirk for Dell Vostro 15 3535 ACPI: docs: enumeration: Correct reference to the I²C device data type commit b771baf3988a094c5129b05f1e5eaa383f1ec185 Author: Yang Li Date: Tue Feb 14 09:03:44 2023 +0800 dmaengine: xilinx: xdma: Fix some kernel-doc comments Make the description of @xdma_chan to @xchan to silence the warnings: drivers/dma/xilinx/xdma.c:283: warning: Function parameter or member 'xchan' not described in 'xdma_xfer_start' drivers/dma/xilinx/xdma.c:283: warning: Excess function parameter 'xdma_chan' description in 'xdma_xfer_start' Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4051 Signed-off-by: Yang Li Acked-by: Peter Korsgaard Link: https://lore.kernel.org/r/20230214010344.5354-1-yang.lee@linux.alibaba.com Signed-off-by: Vinod Koul commit ba9c77919045943af677c03f04c778a1c16ae680 Merge: 0eb392ec095ee de7839ee02c65 Author: Linus Torvalds Date: Fri Mar 17 10:51:14 2023 -0700 Merge branch 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux Pull turbostat fweaks and fixes from Len Brown: "Leprechaun sized fixes and tweaks touching only turbostat. 'Keeping happy users happy since 2010'" * 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: tools/power turbostat: version 2023.03.17 tools/power turbostat: fix decoding of HWP_STATUS tools/power turbostat: Introduce support for EMR tools/power turbostat: remove stray newlines from warn/warnx strings tools/power turbostat: Fix /dev/cpu_dma_latency warnings tools/power turbostat: Provide better debug messages for failed capabilities accesses tools/power turbostat: update dump of SECONDARY_TURBO_RATIO_LIMIT commit 0eb392ec095ee29b932985deefb43e6d86d8a463 Merge: cb80b960ce44e 7ad2c39860dc0 Author: Linus Torvalds Date: Fri Mar 17 10:45:49 2023 -0700 Merge tag 'for-linus-6.3-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: - cleanup for xen time handling - enable the VGA console in a Xen PVH dom0 - cleanup in the xenfs driver * tag 'for-linus-6.3-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: remove unnecessary (void*) conversions x86/PVH: obtain VGA console info in Dom0 x86/xen/time: cleanup xen_tsc_safe_clocksource xen: update arch/x86/include/asm/xen/cpuid.h commit 91e78b2585348284ef7cdb6a8736fd21389914fe Author: Andy Shevchenko Date: Mon Feb 13 13:21:38 2023 +0200 dmaengine: Actually use devm_add_action_or_reset() It appears that the commit a1beaa50b583 ("dmaengine: Simplify dmaenginem_async_device_register() function") mentions devm_add_action_or_reset() the actual change utilised devm_add_action() call by mistake. Fix the issue by switching to devm_add_action_or_reset(). Fixes: a1beaa50b583 ("dmaengine: Simplify dmaenginem_async_device_register() function") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230213112138.32118-1-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul commit cb80b960ce44e3e4e90985bb65a84c1a10c450ee Merge: e50a80383e04a 47dd902aaee9b Author: Linus Torvalds Date: Fri Mar 17 10:33:33 2023 -0700 Merge tag 'riscv-for-linus-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - fixes to the ASID allocator to avoid leaking stale mappings between tasks - fix the vmalloc fault handler to tolerate huge pages * tag 'riscv-for-linus-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: RISC-V: mm: Support huge page in vmalloc_fault() riscv: asid: Fixup stale TLB entry cause application crash Revert "riscv: mm: notify remote harts about mmu cache updates" commit e50a80383e04a8e5a598a099979b52af7bfa7158 Merge: 17adaeaed05b8 d7a0bdbf17276 Author: Linus Torvalds Date: Fri Mar 17 10:15:53 2023 -0700 Merge tag 's390-6.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Vasily Gorbik: - Update defconfigs - Fix early boot code by adding missing intersection check to prevent potential overwriting of the ipl report - Fix a use-after-free issue in s390-specific code related to PCI resources being retained after hot-unplugging individual functions, by removing the resources from the PCI bus's resource list and using the zpci_bar_struct's resource pointer directly * tag 's390-6.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: update defconfigs PCI: s390: Fix use-after-free of PCI resources with per-function hotplug s390/ipl: add missing intersection check to ipl_report handling commit 17adaeaed05b879964b1a72e4db87ebf3b2a38ba Merge: 2c50b0ca9082a f2c7e3562b4c4 Author: Linus Torvalds Date: Fri Mar 17 10:01:07 2023 -0700 Merge tag 'powerpc-6.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fix false detection of read faults, introduced by execute-only support - Fix a build failure when GENERIC_ALLOCATOR is not selected Thanks to Russell Currey, Randy Dunlap, Michal Suchánek, Nathan Lynch, and Benjamin Gray. * tag 'powerpc-6.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/mm: Fix false detection of read faults powerpc/pseries: RTAS work area requires GENERIC_ALLOCATOR commit 2c50b0ca9082a2b92c8afdf6c2e1637d7d6185c8 Merge: 97eb2d981de3b 92771cdd90de6 Author: Linus Torvalds Date: Fri Mar 17 09:49:17 2023 -0700 Merge tag 'mmc-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC host fixes from Ulf Hansson: - dw_mmc-starfive: Fix initialization of the prev_err variable - sdhci_am654: Lower power-on failed message severity * tag 'mmc-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: dw_mmc-starfive: Fix initialization of prev_err mmc: sdhci_am654: lower power-on failed message severity commit 97eb2d981de3b1173ab464e3253991425728b597 Merge: 2cf5a401c8717 98e5eb110095e Author: Linus Torvalds Date: Fri Mar 17 09:43:10 2023 -0700 Merge tag 'sound-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Nothing surprising, a collection of small device-specific fixes. The majority of changes are for ASoC Intel stuff, while a few other ASoC and HD-audio fixes are found" * tag 'sound-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (31 commits) ALSA: hda/ca0132: fixup buffer overrun at tuning_ctl_set() ALSA: asihpi: check pao in control_message() ASoC: hdmi-codec: only startup/shutdown on supported streams ASoC: da7219: Initialize jack_det_mutex ALSA: hda: Match only Intel devices with CONTROLLER_IN_GPU() ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book2 Pro ALSA: hda/realtek: fix speaker, mute/micmute LEDs not work on a HP platform ALSA: hda: intel-dsp-config: add MTL PCI id ASoC: SOF: IPC4: update gain ipc msg definition to align with fw ASoC: SOF: sof-audio: don't squelch errors in WIDGET_SETUP phase ASoC: SOF: Intel: hda-ctrl: re-add sleep after entering and exiting reset ASoC: SOF: Intel: hda-dsp: harden D0i3 programming sequence ASoC: SOF: ipc4-topology: set dmic dai index from copier ASoC: SOF: sof-audio: Fix broken early bclk feature for SSP ASoC: SOF: Intel: pci-tng: revert invalid bar size setting ASoC: SOF: topology: Fix error handling in sof_widget_ready() ASoC: Intel: soc-acpi: fix copy-paste issue in topology names ASoC: SOF: ipc4-topology: Fix incorrect sample rate print unit ASoC: SOF: ipc3: Check for upper size limit for the received message ASOC: SOF: Intel: pci-tgl: Fix device description ... commit 2cf5a401c87178237c5b782c44578c26690a802b Merge: 7622976c8f4f2 c00133a9e87ea Author: Linus Torvalds Date: Fri Mar 17 09:35:40 2023 -0700 Merge tag 'drm-fixes-2023-03-17' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Seems like a pretty regular rc3, i915 and amdgpu with the usual selection of fixes, then a scattering of fixes across misc drivers and other areas: accel: - build fix for accel edid: - fix info leak in edid ttm: - fix NULL ptr deref - reference counting fix i915: - Fix hwmon PL1 power limit enabling - Fix audio ELD handling for DP MST - Fix PSR io and wake line calculations - Fix DG2 HDMI modes with 267.30 and 319.89 MHz pixel clocks - Fix SSEU subslice out-of-bounds access - Fix misuse of non-idle barriers as fence trackers amdgpu: - SMU 13 update - RDNA2 suspend/resume fix when overclocking is enabled - SRIOV VCN fixes - HDCP suspend/resume fix - Fix drm polling splat regression - Fix dirty rectangle tracking for PSR - Fix vangogh regression on certain BIOSes - Misc display fixes - Suspend/resume IOMMU regression fix amdkfd: - Fix BO offset for multi-VMA page migration - Fix a possible double free - Fix potential use after free - Fix process cleanup on module exit bridge: - fix returned array size name documentation fbdev: - ref-counting fix for fbdev deferred I/O virtio: - dma sync fix shmem-helper: - error path fix msm: - shrinker blocking fix panfrost: - shrinker rpm fix chipsfb: - fix error code meson: - fix 1px pink line - fix regulator interaction sun4i: - fix missing component unbind" * tag 'drm-fixes-2023-03-17' of git://anongit.freedesktop.org/drm/drm: (38 commits) drm/ttm: drop extra ttm_bo_put in ttm_bo_cleanup_refs drm/amdgpu: Don't resume IOMMU after incomplete init drm/amdkfd: Fixed kfd_process cleanup on module exit. drm/amd/display: disconnect MPCC only on OTG change drm/amd/display: Fix DP MST sinks removal issue drm/amd/display: Do not set DRR on pipe Commit drm/amd/display: Remove OTG DIV register write for Virtual signals. drm/meson: dw-hdmi: Fix devm_regulator_*get_enable*() conversion again drm/bridge: Fix returned array size name for atomic_get_input_bus_fmts kdoc drm/amdgpu/vcn: Disable indirect SRAM on Vangogh broken BIOSes drm/amdgpu/nv: fix codec array for SR_IOV drm/amd/display: Write to correct dirty_rect drm/amdgpu: move poll enabled/disable into non DC path drm/amd/display: Fix HDCP failing to enable after suspend drm/amdkfd: fix potential kgd_mem UAFs drm/amdgpu/vcn: custom video info caps for sriov drm/amd/pm: Fix sienna cichlid incorrect OD volage after resume drm/amd/pm: bump SMU 13.0.4 driver_if header version drm/amdkfd: fix a potential double free in pqm_create_queue drm/amdkfd: Get prange->offset after svm_range_vram_node_new ... commit 7622976c8f4f233fac251263e08adee27969abcd Merge: 38e04b3e4240a c6001025d53ab Author: Linus Torvalds Date: Fri Mar 17 09:30:57 2023 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Ten patches, eight in drivers and two in the core, which correct a regression from directory removal and add a no VPD size quirk also to fix a regression. All pretty small" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ufs: mcq: Use active_reqs to check busy in clock scaling scsi: core: Fix a procfs host directory removal regression scsi: core: Add BLIST_NO_VPD_SIZE for some VDASD scsi: mpi3mr: Fix expander node leak in mpi3mr_remove() scsi: mpi3mr: Fix memory leaks in mpi3mr_init_ioc() scsi: mpi3mr: Fix sas_hba.phy memory leak in mpi3mr_remove() scsi: mpi3mr: Fix mpi3mr_hba_port memory leak in mpi3mr_remove() scsi: mpi3mr: Fix config page DMA memory leak scsi: mpi3mr: Fix throttle_groups memory leak scsi: mpt3sas: Fix NULL pointer access in mpt3sas_transport_port_add() commit d2e53ceaf284eada83af176ccb45f13bfb3f4d83 Merge: 38557b2d6d213 d617808e3b832 Author: Arnd Bergmann Date: Fri Mar 17 17:10:30 2023 +0100 Merge tag 'scmi-fixes-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/fixes Arm SCMI fixes for v6.3 Few fixes addressing issues around validation of device tree SCMI node, allowing raw SCMI access even on systems which fail to probe the normal driver stack, duplicate header inclusion, clean up return statement using literal values instead of variable to simplify and use of devm_bitmap_zalloc instead of devm_kcalloc to improve semantic. * tag 'scmi-fixes-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: 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/20230315193557.1709241-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit 1fa9d47baa9e61ff973e03f0ef26f5b78d545e37 Merge: 6fa7f537351c8 6b0313c2fa3d2 Author: Rafael J. Wysocki Date: Fri Mar 17 16:55:01 2023 +0100 Merge branch 'pm-cpuidle' Merge a PSCI cpuidle driver fix for 6.3-rc1: - Fix the psci_pd_init_topology() failure path in the PSCI cpuidle driver (Shawn Guo). * pm-cpuidle: cpuidle: psci: Iterate backwards over list in psci_pd_remove() commit f36cc6cd65204352815640a34e37ef39e56fbd42 Merge: 91d7b60a65d9f 89b0411481967 1a1e7540cf501 0bc23d8b2237a c29b97725c91a Author: Rafael J. Wysocki Date: Fri Mar 17 16:44:41 2023 +0100 Merge branches 'acpi-video', 'acpi-x86', 'acpi-tools' and 'acpi-docs' Merge a new ACPI backlight quirk, new ACPI quirks for I2C device enumeration on some platforms, a pfrut utility fix and an ACPI documentation fix for 6.3-rc3: - Add backlight=native DMI quirk for Dell Vostro 15 3535 to the ACPI video driver (Chia-Lin Kao). - Add ACPI quirks for I2C devices enumeration on Lenovo Yoga Book X90 and Acer Iconia One 7 B1-750 (Hans de Goede). - Fix handling of invalid command line option values in the ACPI pfrut utility (Chen Yu). - Fix references to I2C device data type in the ACPI documentation for device enumeration (Andy Shevchenko). * acpi-video: ACPI: video: Add backlight=native DMI quirk for Dell Vostro 15 3535 * acpi-x86: ACPI: x86: Add skip i2c clients quirk for Lenovo Yoga Book X90 ACPI: x86: Add skip i2c clients quirk for Acer Iconia One 7 B1-750 ACPI: x86: Introduce an acpi_quirk_skip_gpio_event_handlers() helper * acpi-tools: ACPI: tools: pfrut: Check if the input of level and type is in the right numeric range * acpi-docs: ACPI: docs: enumeration: Correct reference to the I²C device data type commit de7839ee02c651335db6bf0af24cf5cac3cc4c72 Author: Len Brown Date: Fri Mar 17 11:34:10 2023 -0400 tools/power turbostat: version 2023.03.17 Happy St. Patrick's Day! Signed-off-by: Len Brown commit 92c25393586ac799b9b7d9e50434f3c44a7622c4 Author: Antti Laakso Date: Wed Jan 25 15:17:50 2023 +0200 tools/power turbostat: fix decoding of HWP_STATUS The "excursion to minimum" information is in bit2 in HWP_STATUS MSR. Fix the bitmask used for decoding the register. Signed-off-by: Antti Laakso Reviewed-by: Artem Bityutskiy Signed-off-by: Len Brown commit 93cac4150727dae0ee89f501dd75413b88eedec0 Author: Zhang Rui Date: Wed Jan 4 22:23:53 2023 +0800 tools/power turbostat: Introduce support for EMR Introduce support for EMR. Signed-off-by: Zhang Rui Reviewed-by: Artem Bityutskiy Tested-by: Artem Bityutskiy Signed-off-by: Len Brown commit 6cbfedc7afc93a7f06d4a2f7c4d4732b20adfc2b Author: Len Brown Date: Fri Mar 17 11:25:56 2023 -0400 tools/power turbostat: remove stray newlines from warn/warnx strings warn(3) terminates strings with newlines Signed-off-by: Len Brown commit 40aafc7d58d3544f152a863a0e9863014b6d5d8c Author: Prarit Bhargava Date: Thu Dec 15 10:18:16 2022 -0500 tools/power turbostat: Fix /dev/cpu_dma_latency warnings When running as non-root the following error is seen in turbostat: turbostat: fopen /dev/cpu_dma_latency : Permission denied turbostat and the man page have information on how to avoid other permission errors, so these can be fixed the same way. Provide better /dev/cpu_dma_latency warnings that provide instructions on how to avoid the error, and update the man page. Signed-off-by: Prarit Bhargava Cc: linux-pm@vger.kernel.org Signed-off-by: Len Brown commit 9c08581728ccadc6b9e4135b7b8d31948e814f6f Author: Prarit Bhargava Date: Tue Oct 18 15:23:37 2022 -0400 tools/power turbostat: Provide better debug messages for failed capabilities accesses turbostat reports some capabilities access errors and not others. Provide the same debug message for all errors. [lenb: remove extra quotes] Cc: David Arcari Signed-off-by: Prarit Bhargava Signed-off-by: Len Brown commit 884a1f956179b561e7e7f1d29fc331cf53233c89 Author: Len Brown Date: Thu Oct 13 12:42:29 2022 +0200 tools/power turbostat: update dump of SECONDARY_TURBO_RATIO_LIMIT cosmetic only (but useful if you copy/paste) Signed-off-by: Len Brown commit 38557b2d6d2133902bf071c78a6fe8d8f8c5aebb Merge: e5bd1002443dd b3cdf730486b0 Author: Arnd Bergmann Date: Fri Mar 17 15:37:11 2023 +0100 Merge tag 'imx-fixes-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc-fixes i.MX fixes for 6.3: - A couple of i.MX93 fixes from Alexander Stein to correct EQoS Ethernet properties. - Correct clock-names of FlexSPI device in imx8-ss-lsio DT. - Fix EQoS PHY reset GPIO by dropping the deprecated/wrong property and switch to the new bindings. - Fix an issue with imx-weim bus driver that branch condition evaluates to a garbage value. - Correct WM8960 clock name for imx8mm-nitrogen-r2 board. - Fix LCDIF2 clocks for i.MX8MP DT. - Add missing #sound-dai-cells properties to SAI nodes for i.MX8MN DT. - Revert LS1028A DT changes of getting MAC addresses from VPD, as the dependency on NVMEM device is not in place. - A series from Peng Fan to add missing pinctrl property for i.MX6SL based devices. * tag 'imx-fixes-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: imx93: add missing #address-cells and #size-cells to i2c nodes bus: imx-weim: fix branch condition evaluates to a garbage value arm64: dts: imx8mn: specify #sound-dai-cells for SAI nodes ARM: dts: imx6sl: tolino-shine2hd: fix usbotg1 pinctrl ARM: dts: imx6sll: e60k02: fix usbotg1 pinctrl ARM: dts: imx6sll: e70k02: fix usbotg1 pinctrl arm64: dts: imx93: Fix eqos properties arm64: dts: imx8mp: Fix LCDIF2 node clock order arm64: dts: imx8mm-nitrogen-r2: fix WM8960 clock name arm64: dts: imx8dxl-evk: Fix eqos phy reset gpio Revert "arm64: dts: ls1028a: sl28: get MAC addresses from VPD" arm64: dts: freescale: imx8-ss-lsio: Fix flexspi clock order Link: https://lore.kernel.org/r/20230315132814.GF143566@dragon Signed-off-by: Arnd Bergmann commit e5bd1002443dd9af31b799da97a71b53d1865486 Merge: 98dba5886b88d 4bb54c2ce48ff Author: Arnd Bergmann Date: Fri Mar 17 15:30:50 2023 +0100 Merge tag 'tegra-for-6.3-arm64-dt-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc-fixes arm64: tegra: Device tree fixes for v6.3-rc1 This contains a fix for the CBB bus' ranges property on Tegra194 and Tegra234 that restores proper translation of PCI addresses. * tag 'tegra-for-6.3-arm64-dt-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Bump CBB ranges property on Tegra194 and Tegra234 Link: https://lore.kernel.org/r/20230302094213.3874449-1-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 98dba5886b88d6d1f15cbe63e411409660dd568c Merge: fe15c26ee26ef f8502fba45bd3 Author: Arnd Bergmann Date: Fri Mar 17 15:30:24 2023 +0100 Merge tag 'amdtee-fix-for-v6.3' of https://git.linaro.org/people/jens.wiklander/linux-tee into soc-fixes AMDTEE fix race condition in amdtee_open_session() * tag 'amdtee-fix-for-v6.3' of https://git.linaro.org/people/jens.wiklander/linux-tee: tee: amdtee: fix race condition in amdtee_open_session Link: https://lore.kernel.org/r/Y/5ZGX0lSTnZz27E@rayden Signed-off-by: Arnd Bergmann commit 205efd4619b860404ebb5882e5a119eb3b3b3716 Author: Ge-org Brohammer Date: Fri Mar 17 00:38:51 2023 +0200 ASoC: amd: yc: Add DMI entries to support Victus by HP Laptop 16-e1xxx (8A22) This model requires an additional detection quirk to enable the internal microphone. Tried to use git send-email this time. Signed-off-by: Ge-org Brohammer Link: https://lore.kernel.org/r/PAVP195MB2261322C220E95D7F4B2732ADABC9@PAVP195MB2261.EURP195.PROD.OUTLOOK.COM Signed-off-by: Mark Brown commit f8acb24aaf89fc46cd953229462ea8abe31b395f Author: Michael Kelley Date: Wed Mar 15 08:34:13 2023 -0700 x86/hyperv: Block root partition functionality in a Confidential VM Hyper-V should never specify a VM that is a Confidential VM and also running in the root partition. Nonetheless, explicitly block such a combination to guard against a compromised Hyper-V maliciously trying to exploit root partition functionality in a Confidential VM to expose Confidential VM secrets. No known bug is being fixed, but the attack surface for Confidential VMs on Hyper-V is reduced. Signed-off-by: Michael Kelley Link: https://lore.kernel.org/r/1678894453-95392-1-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit 8a0432bab6ea3203d220785da7ab3c7677f70ecb Author: Hans de Goede Date: Fri Mar 17 03:13:12 2023 -0700 Input: goodix - add Lenovo Yoga Book X90F to nine_bytes_report DMI table The Android Lenovo Yoga Book X90F / X90L uses the same goodix touchscreen with 9 bytes touch reports for its touch keyboard as the already supported Windows Lenovo Yoga Book X91F/L, add a DMI match for this to the nine_bytes_report DMI table. 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: Bastien Nocera Link: https://lore.kernel.org/r/20230315134442.71787-1-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov commit f5bad62f9107b701a6def7cac1f5f65862219b83 Author: Jonathan Denose Date: Fri Mar 17 03:19:51 2023 -0700 Input: i8042 - add quirk for Fujitsu Lifebook A574/H Fujitsu Lifebook A574/H requires the nomux option to properly probe the touchpad, especially when waking from sleep. Signed-off-by: Jonathan Denose Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230303152623.45859-1-jdenose@google.com Signed-off-by: Dmitry Torokhov commit 984cfd55e0c99e80b2e5b1dc6b2bf98608af7ff9 Author: Dongliang Mu Date: Wed Mar 8 16:32:31 2023 +0800 net: ieee802154: remove an unnecessary null pointer check llsec_parse_seclevel has the null pointer check at its begining. Compared with nl802154_add_llsec_seclevel, nl802154_del_llsec_seclevel has a redundant null pointer check of info->attrs[NL802154_ATTR_SEC_LEVEL] before llsec_parse_seclevel. Fix this issue by removing the null pointer check in nl802154_del_llsec_seclevel. Signed-off-by: Dongliang Mu Link: https://lore.kernel.org/r/20230308083231.460015-1-dzm91@hust.edu.cn Signed-off-by: Stefan Schmidt commit 6eff38048944cadc3cddcf117acfa5199ec32490 Author: Rajnesh Kanwal Date: Fri Feb 10 14:27:11 2023 +0000 riscv/kvm: Fix VM hang in case of timer delta being zero. In case when VCPU is blocked due to WFI, we schedule the timer from `kvm_riscv_vcpu_timer_blocking()` to keep timer interrupt ticking. But in case when delta_ns comes to be zero, we never schedule the timer and VCPU keeps sleeping indefinitely until any activity is done with VM console. This is easily reproduce-able using kvmtool. ./lkvm-static run -c1 --console virtio -p "earlycon root=/dev/vda" \ -k ./Image -d rootfs.ext4 Also, just add a print in kvm_riscv_vcpu_vstimer_expired() to check the interrupt delivery and run `top` or similar auto-upating cmd from guest. Within sometime one can notice that print from timer expiry routine stops and the `top` cmd output will stop updating. This change fixes this by making sure we schedule the timer even with delta_ns being zero to bring the VCPU out of sleep immediately. Fixes: 8f5cb44b1bae ("RISC-V: KVM: Support sstc extension") Signed-off-by: Rajnesh Kanwal Reviewed-by: Atish Patra Signed-off-by: Anup Patel commit f5e305e63b035a1782a666a6535765f80bb2dca3 Merge: 53515a052adb4 222c94ec0ad48 Author: David S. Miller Date: Fri Mar 17 07:56:41 2023 +0000 Merge branch 'bonding-fixes' Nikolay Aleksandrov says: ==================== bonding: properly restore flags when bond changes ether type A bug was reported by syzbot[1] that causes a warning and a myriad of other potential issues if a bond, that is also a slave, fails to enslave a non-eth device. While fixing that bug I found that we have the same issues when such enslave passes and after that the bond changes back to ARPHRD_ETHER (again due to ether_setup). This set fixes all issues by extracting the ether_setup() sequence in a helper which does the right thing about bond flags when it needs to change back to ARPHRD_ETHER. It also adds selftests for these cases. Patch 01 adds the new bond_ether_setup helper and fixes the issues when a bond device changes its ether type due to successful enslave. Patch 02 fixes the issues when it changes its ether type due to an unsuccessful enslave. Note we need two patches because the bugs were introduced by different commits. Patch 03 adds the new selftests. Due to the comment adjustment and squash, could you please review patch 01 again? I've kept the other acks since there were no code changes. v3: squash the helper patch and the first fix, adjust the comment above it to be explicit about the bond device, no code changes v2: new set, all patches are new due to new approach of fixing these bugs [1] https://syzkaller.appspot.com/bug?id=391c7b1f6522182899efba27d891f1743e8eb3ef ==================== Signed-off-by: David S. Miller commit 222c94ec0ad48b951f0f692a7cf5bcf7a6bcb6b1 Author: Nikolay Aleksandrov Date: Wed Mar 15 13:18:42 2023 +0200 selftests: bonding: add tests for ether type changes Add new network selftests for the bonding device which exercise the ether type changing call paths. They also test for the recent syzbot bug[1] which causes a warning and results in wrong device flags (IFF_SLAVE missing). The test adds three bond devices and a nlmon device, enslaves one of the bond devices to the other and then uses the nlmon device for successful and unsuccesful enslaves both of which change the bond ether type. Thus we can test for both MASTER and SLAVE flags at the same time. If the flags are properly restored we get: TEST: Change ether type of an enslaved bond device with unsuccessful enslave [ OK ] TEST: Change ether type of an enslaved bond device with successful enslave [ OK ] [1] https://syzkaller.appspot.com/bug?id=391c7b1f6522182899efba27d891f1743e8eb3ef Signed-off-by: Nikolay Aleksandrov Reviewed-by: Michal Kubiak Acked-by: Jonathan Toppins Acked-by: Jay Vosburgh Signed-off-by: David S. Miller commit e667d469098671261d558be0cd93dca4d285ce1e Author: Nikolay Aleksandrov Date: Wed Mar 15 13:18:41 2023 +0200 bonding: restore bond's IFF_SLAVE flag if a non-eth dev enslave fails syzbot reported a warning[1] where the bond device itself is a slave and we try to enslave a non-ethernet device as the first slave which fails but then in the error path when ether_setup() restores the bond device it also clears all flags. In my previous fix[2] I restored the IFF_MASTER flag, but I didn't consider the case that the bond device itself might also be a slave with IFF_SLAVE set, so we need to restore that flag as well. Use the bond_ether_setup helper which does the right thing and restores the bond's flags properly. Steps to reproduce using a nlmon dev: $ ip l add nlmon0 type nlmon $ ip l add bond1 type bond $ ip l add bond2 type bond $ ip l set bond1 master bond2 $ ip l set dev nlmon0 master bond1 $ ip -d l sh dev bond1 22: bond1: mtu 1500 qdisc noqueue master bond2 state DOWN mode DEFAULT group default qlen 1000 (now bond1's IFF_SLAVE flag is gone and we'll hit a warning[3] if we try to delete it) [1] https://syzkaller.appspot.com/bug?id=391c7b1f6522182899efba27d891f1743e8eb3ef [2] commit 7d5cd2ce5292 ("bonding: correctly handle bonding type change on enslave failure") [3] example warning: [ 27.008664] bond1: (slave nlmon0): The slave device specified does not support setting the MAC address [ 27.008692] bond1: (slave nlmon0): Error -95 calling set_mac_address [ 32.464639] bond1 (unregistering): Released all slaves [ 32.464685] ------------[ cut here ]------------ [ 32.464686] WARNING: CPU: 1 PID: 2004 at net/core/dev.c:10829 unregister_netdevice_many+0x72a/0x780 [ 32.464694] Modules linked in: br_netfilter bridge bonding virtio_net [ 32.464699] CPU: 1 PID: 2004 Comm: ip Kdump: loaded Not tainted 5.18.0-rc3+ #47 [ 32.464703] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.1-2.fc37 04/01/2014 [ 32.464704] RIP: 0010:unregister_netdevice_many+0x72a/0x780 [ 32.464707] Code: 99 fd ff ff ba 90 1a 00 00 48 c7 c6 f4 02 66 96 48 c7 c7 20 4d 35 96 c6 05 fa c7 2b 02 01 e8 be 6f 4a 00 0f 0b e9 73 fd ff ff <0f> 0b e9 5f fd ff ff 80 3d e3 c7 2b 02 00 0f 85 3b fd ff ff ba 59 [ 32.464710] RSP: 0018:ffffa006422d7820 EFLAGS: 00010206 [ 32.464712] RAX: ffff8f6e077140a0 RBX: ffffa006422d7888 RCX: 0000000000000000 [ 32.464714] RDX: ffff8f6e12edbe58 RSI: 0000000000000296 RDI: ffffffff96d4a520 [ 32.464716] RBP: ffff8f6e07714000 R08: ffffffff96d63600 R09: ffffa006422d7728 [ 32.464717] R10: 0000000000000ec0 R11: ffffffff9698c988 R12: ffff8f6e12edb140 [ 32.464719] R13: dead000000000122 R14: dead000000000100 R15: ffff8f6e12edb140 [ 32.464723] FS: 00007f297c2f1740(0000) GS:ffff8f6e5d900000(0000) knlGS:0000000000000000 [ 32.464725] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 32.464726] CR2: 00007f297bf1c800 CR3: 00000000115e8000 CR4: 0000000000350ee0 [ 32.464730] Call Trace: [ 32.464763] [ 32.464767] rtnl_dellink+0x13e/0x380 [ 32.464776] ? cred_has_capability.isra.0+0x68/0x100 [ 32.464780] ? __rtnl_unlock+0x33/0x60 [ 32.464783] ? bpf_lsm_capset+0x10/0x10 [ 32.464786] ? security_capable+0x36/0x50 [ 32.464790] rtnetlink_rcv_msg+0x14e/0x3b0 [ 32.464792] ? _copy_to_iter+0xb1/0x790 [ 32.464796] ? post_alloc_hook+0xa0/0x160 [ 32.464799] ? rtnl_calcit.isra.0+0x110/0x110 [ 32.464802] netlink_rcv_skb+0x50/0xf0 [ 32.464806] netlink_unicast+0x216/0x340 [ 32.464809] netlink_sendmsg+0x23f/0x480 [ 32.464812] sock_sendmsg+0x5e/0x60 [ 32.464815] ____sys_sendmsg+0x22c/0x270 [ 32.464818] ? import_iovec+0x17/0x20 [ 32.464821] ? sendmsg_copy_msghdr+0x59/0x90 [ 32.464823] ? do_set_pte+0xa0/0xe0 [ 32.464828] ___sys_sendmsg+0x81/0xc0 [ 32.464832] ? mod_objcg_state+0xc6/0x300 [ 32.464835] ? refill_obj_stock+0xa9/0x160 [ 32.464838] ? memcg_slab_free_hook+0x1a5/0x1f0 [ 32.464842] __sys_sendmsg+0x49/0x80 [ 32.464847] do_syscall_64+0x3b/0x90 [ 32.464851] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 32.464865] RIP: 0033:0x7f297bf2e5e7 [ 32.464868] Code: 64 89 02 48 c7 c0 ff ff ff ff eb bb 0f 1f 80 00 00 00 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 [ 32.464869] RSP: 002b:00007ffd96c824c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 32.464872] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f297bf2e5e7 [ 32.464874] RDX: 0000000000000000 RSI: 00007ffd96c82540 RDI: 0000000000000003 [ 32.464875] RBP: 00000000640f19de R08: 0000000000000001 R09: 000000000000007c [ 32.464876] R10: 00007f297bffabe0 R11: 0000000000000246 R12: 0000000000000001 [ 32.464877] R13: 00007ffd96c82d20 R14: 00007ffd96c82610 R15: 000055bfe38a7020 [ 32.464881] [ 32.464882] ---[ end trace 0000000000000000 ]--- Fixes: 7d5cd2ce5292 ("bonding: correctly handle bonding type change on enslave failure") Reported-by: syzbot+9dfc3f3348729cc82277@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=391c7b1f6522182899efba27d891f1743e8eb3ef Signed-off-by: Nikolay Aleksandrov Reviewed-by: Michal Kubiak Acked-by: Jonathan Toppins Acked-by: Jay Vosburgh Signed-off-by: David S. Miller commit 9ec7eb60dcbcb6c41076defbc5df7bbd95ceaba5 Author: Nikolay Aleksandrov Date: Wed Mar 15 13:18:40 2023 +0200 bonding: restore IFF_MASTER/SLAVE flags on bond enslave ether type change Add bond_ether_setup helper which is used to fix ether_setup() calls in the bonding driver. It takes care of both IFF_MASTER and IFF_SLAVE flags, the former is always restored and the latter only if it was set. If the bond enslaves non-ARPHRD_ETHER device (changes its type), then releases it and enslaves ARPHRD_ETHER device (changes back) then we use ether_setup() to restore the bond device type but it also resets its flags and removes IFF_MASTER and IFF_SLAVE[1]. Use the bond_ether_setup helper to restore both after such transition. [1] reproduce (nlmon is non-ARPHRD_ETHER): $ ip l add nlmon0 type nlmon $ ip l add bond2 type bond mode active-backup $ ip l set nlmon0 master bond2 $ ip l set nlmon0 nomaster $ ip l add bond1 type bond (we use bond1 as ARPHRD_ETHER device to restore bond2's mode) $ ip l set bond1 master bond2 $ ip l sh dev bond2 37: bond2: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether be:d7:c5:40:5b:cc brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 68 maxmtu 1500 (notice bond2's IFF_MASTER is missing) Fixes: e36b9d16c6a6 ("bonding: clean muticast addresses when device changes type") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 53515a052adb469f47330dab3eabf701f8a7d3d9 Merge: 90de546d9a0b3 2c59e993c86ad Author: David S. Miller Date: Fri Mar 17 07:50:51 2023 +0000 Merge branch 'net-renesas-rswitch-fixes' Yoshihiro Shimoda says: ==================== net: renesas: rswitch: Fix rx and timestamp I got reports locally about issues on the rswitch driver. So, fix the issues. ==================== Signed-off-by: David S. Miller commit 2c59e993c86ad57afde26eaf1beb35694da5fbfe Author: Yoshihiro Shimoda Date: Wed Mar 15 16:04:24 2023 +0900 net: renesas: rswitch: Fix GWTSDIE register handling Since the GWCA has the TX timestamp feature, this driver should not disable it if one of ports is opened. So, fix it. Reported-by: Phong Hoang Fixes: 33f5d733b589 ("net: renesas: rswitch: Improve TX timestamp accuracy") Signed-off-by: Yoshihiro Shimoda Signed-off-by: David S. Miller commit e05bb97d9c9dd4ba5739a27921044c935a7fb3be Author: Yoshihiro Shimoda Date: Wed Mar 15 16:04:23 2023 +0900 net: renesas: rswitch: Fix the output value of quote from rswitch_rx() If the RX descriptor doesn't have any data, the output value of quote from rswitch_rx() will be increased unexpectedily. So, fix it. Reported-by: Volodymyr Babchuk Fixes: 3590918b5d07 ("net: ethernet: renesas: Add support for "Ethernet Switch"") Signed-off-by: Yoshihiro Shimoda Signed-off-by: David S. Miller commit 90de546d9a0b3c771667af18bb3f80567eabb89b Author: Liang He Date: Wed Mar 15 14:00:21 2023 +0800 ethernet: sun: add check for the mdesc_grab() In vnet_port_probe() and vsw_port_probe(), we should check the return value of mdesc_grab() as it may return NULL which can caused NPD bugs. Fixes: 5d01fa0c6bd8 ("ldmvsw: Add ldmvsw.c driver code") Fixes: 43fdf27470b2 ("[SPARC64]: Abstract out mdesc accesses for better MD update handling.") Signed-off-by: Liang He Reviewed-by: Piotr Raczynski Signed-off-by: David S. Miller commit c00133a9e87ea5324d0b883d801eb6656f26739b Author: Christian König Date: Thu Mar 16 08:26:47 2023 +0100 drm/ttm: drop extra ttm_bo_put in ttm_bo_cleanup_refs That was accidentially left over when we switched to the delayed delete worker. Suggested-by: Matthew Auld Signed-off-by: Christian König Fixes: 9bff18d13473 ("drm/ttm: use per BO cleanup workers") Reported-by: Steven Rostedt (Google) Tested-by: Steven Rostedt (Google) Reviewed-by: Matthew Auld Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20230316072647.406707-1-christian.koenig@amd.com commit c31a72dbbfe1162ee81c446cc8b5a5c561a4c0df Merge: 2a210e6a15dc5 f3921a9a64148 Author: Dave Airlie Date: Fri Mar 17 15:42:21 2023 +1000 Merge tag 'amd-drm-fixes-6.3-2023-03-15' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.3-2023-03-15: amdgpu: - SMU 13 update - RDNA2 suspend/resume fix when overclocking is enabled - SRIOV VCN fixes - HDCP suspend/resume fix - Fix drm polling splat regression - Fix dirty rectangle tracking for PSR - Fix vangogh regression on certain BIOSes - Misc display fixes - Suspend/resume IOMMU regression fix amdkfd: - Fix BO offset for multi-VMA page migration - Fix a possible double free - Fix potential use after free - Fix process cleanup on module exit Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230315224400.7558-1-alexander.deucher@amd.com commit 0c98b8bc48cf91bf8bdad123d6c07195341b0a81 Merge: 769639c1fe8a9 21e8aaca401ce Author: Jakub Kicinski Date: Thu Mar 16 21:33:20 2023 -0700 Merge branch 'net-ipa-minor-bug-fixes' Alex Elder says: ==================== net: ipa: minor bug fixes The four patches in this series fix some errors, though none of them cause any compile or runtime problems. The first changes the files included by "drivers/net/ipa/reg.h" to ensure everything it requires is included with the file. It also stops unnecessarily including another file. The prerequisites are apparently satisfied other ways, currently. The second adds two struct declarations to "gsi_reg.h", to ensure they're declared before they're used later in the file. Again, it seems these declarations are currently resolved wherever this file is included. The third removes register definitions that were added for IPA v5.0 that are not needed. And the last updates some validity checks for IPA v5.0 registers. No IPA v5.0 platforms are yet supported, so the issues resolved here were never harmful. Versions 2 and 3 of this series change the "Fixes" tags in patches so they supply legitimate commit hashes. ==================== Link: https://lore.kernel.org/r/20230316145136.1795469-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 21e8aaca401ce2b45ece1d8fabd29d422de7b48e Author: Alex Elder Date: Thu Mar 16 09:51:36 2023 -0500 net: ipa: fix some register validity checks A recent commit defined HW_PARAM_4 as a GSI register ID but did not add it to gsi_reg_id_valid() to indicate it's valid (for IPA v5.0+). Add version checks for the HW_PARAM_2 and INTER_EE IRQ GSI registers there as well. IPA v5.0 supports up to 8 source and destination resource groups. Update the validity check (and the comments where the register IDs are defined) to reflect that. Similarly update comments and validity checks for the hash/cache-related registers. Note that this patch fixes an omission and constrains things further, but these don't technically represent bugs. Fixes: f651334e1ef5 ("net: ipa: add HW_PARAM_4 GSI register") Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 786bbe50e1d5777f0b6ec7b4c2de6189d6f7feb4 Author: Alex Elder Date: Thu Mar 16 09:51:35 2023 -0500 net: ipa: kill FILT_ROUT_CACHE_CFG IPA register A recent commit defined a few IPA registers used for IPA v5.0+. One of those was a mistake. Although the filter and router caches get *flushed* using a single register, they use distinct registers (ENDP_FILTER_CACHE_CFG and ENDP_ROUTER_CACHE_CFG) for configuration. And although there *exists* a FILT_ROUT_CACHE_CFG register, it is not needed in upstream code. So get rid of definitions related to FILT_ROUT_CACHE_CFG, because they are not needed. Fixes: 8ba59716d16a ("net: ipa: define IPA v5.0+ registers") Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 55c49e5c94411a82a0ba06dc615ed12b6387dec5 Author: Alex Elder Date: Thu Mar 16 09:51:34 2023 -0500 net: ipa: add two missing declarations When gsi_reg_init() got added, its declaration was added to "gsi_reg.h" without declaring the two struct pointer types it uses. Add these struct declarations to "gsi_reg.h". Fixes: 3c506add35c7 ("net: ipa: introduce gsi_reg_init()") Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit dd172d0c2cea3c14ca9d007eeab51bec7676ece7 Author: Alex Elder Date: Thu Mar 16 09:51:33 2023 -0500 net: ipa: reg: include When "reg.h" got created, it included calls to WARN() and WARN_ON(). Those macros are defined via . In addition, it uses is_power_of_2(), which is defined in . Include those files so IPA "reg.h" has access to all definitions it requires. Meanwhile, is included but nothing defined therein is required directly in "reg.h", so get rid of that. Fixes: 81772e444dbe ("net: ipa: start generalizing "ipa_reg"") Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 769639c1fe8a98129aa97c8ee981639db1e8955c Author: Jakub Kicinski Date: Thu Mar 16 15:02:34 2023 -0700 net: xdp: don't call notifiers during driver init Drivers will commonly perform feature setting during init, if they use the xdp_set_features_flag() helper they'll likely run into an ASSERT_RTNL() inside call_netdevice_notifiers_info(). Don't call the notifier until the device is actually registered. Nothing should be tracking the device until its registered and after its unregistration has started. Fixes: 4d5ab0ad964d ("net/mlx5e: take into account device reconfiguration for xdp_features flag") Link: https://lore.kernel.org/r/20230316220234.598091-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 85578fe4933f55fed2145e3cd2909a8e2e55c108 Merge: 5ae06327a3a5b 2f59823fe696c Author: Jakub Kicinski Date: Thu Mar 16 21:26:03 2023 -0700 Merge branch 'net-sched-fix-parsing-of-tca_ext_warn_msg-for-tc-action' Hangbin Liu says: ==================== net/sched: fix parsing of TCA_EXT_WARN_MSG for tc action In my previous commit 0349b8779cc9 ("sched: add new attr TCA_EXT_WARN_MSG to report tc extact message") I didn't notice the tc action use different enum with filter. So we can't use TCA_EXT_WARN_MSG directly for tc action. Let's rever the previous fix 923b2e30dc9c ("net/sched: act_api: move TCA_EXT_WARN_MSG to the correct hierarchy") and add a new TCA_ROOT_EXT_WARN_MSG for tc action specifically. Here is the tdc test result: 1..1119 ok 1 d959 - Add cBPF action with valid bytecode ok 2 f84a - Add cBPF action with invalid bytecode ok 3 e939 - Add eBPF action with valid object-file ok 4 282d - Add eBPF action with invalid object-file ok 5 d819 - Replace cBPF bytecode and action control ok 6 6ae3 - Delete cBPF action ok 7 3e0d - List cBPF actions ok 8 55ce - Flush BPF actions ok 9 ccc3 - Add cBPF action with duplicate index ok 10 89c7 - Add cBPF action with invalid index [...] ok 1115 2348 - Show TBF class ok 1116 84a0 - Create TEQL with default setting ok 1117 7734 - Create TEQL with multiple device ok 1118 34a9 - Delete TEQL with valid handle ok 1119 6289 - Show TEQL stats ==================== Link: https://lore.kernel.org/r/20230316033753.2320557-1-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit 2f59823fe696caa844249a90bb3f9aeda69cfe5c Author: Hangbin Liu Date: Thu Mar 16 11:37:53 2023 +0800 net/sched: act_api: add specific EXT_WARN_MSG for tc action In my previous commit 0349b8779cc9 ("sched: add new attr TCA_EXT_WARN_MSG to report tc extact message") I didn't notice the tc action use different enum with filter. So we can't use TCA_EXT_WARN_MSG directly for tc action. Let's add a TCA_ROOT_EXT_WARN_MSG for tc action specifically and put this param before going to the TCA_ACT_TAB nest. Fixes: 0349b8779cc9 ("sched: add new attr TCA_EXT_WARN_MSG to report tc extact message") Signed-off-by: Hangbin Liu Acked-by: Jamal Hadi Salim Signed-off-by: Jakub Kicinski commit 8de2bd02439eb839a452a853c1004c2c45ff6fef Author: Hangbin Liu Date: Thu Mar 16 11:37:52 2023 +0800 Revert "net/sched: act_api: move TCA_EXT_WARN_MSG to the correct hierarchy" This reverts commit 923b2e30dc9cd05931da0f64e2e23d040865c035. This is not a correct fix as TCA_EXT_WARN_MSG is not a hierarchy to TCA_ACT_TAB. I didn't notice the TC actions use different enum when adding TCA_EXT_WARN_MSG. To fix the difference I will add a new WARN enum in TCA_ROOT_MAX as Jamal suggested. Signed-off-by: Hangbin Liu Acked-by: Jamal Hadi Salim Signed-off-by: Jakub Kicinski commit 5ae06327a3a5bad4ee246d81df203b1b00a7b390 Author: Marek Vasut Date: Thu Mar 16 01:19:16 2023 +0200 net: dsa: microchip: fix RGMII delay configuration on KSZ8765/KSZ8794/KSZ8795 The blamed commit has replaced a ksz_write8() call to address REG_PORT_5_CTRL_6 (0x56) with a ksz_set_xmii() -> ksz_pwrite8() call to regs[P_XMII_CTRL_1], which is also defined as 0x56 for ksz8795_regs[]. The trouble is that, when compared to ksz_write8(), ksz_pwrite8() also adjusts the register offset with the port base address. So in reality, ksz_pwrite8(offset=0x56) accesses register 0x56 + 0x50 = 0xa6, which in this switch appears to be unmapped, and the RGMII delay configuration on the CPU port does nothing. So if the switch wasn't fine with the RGMII delay configuration done through pin strapping and relied on Linux to apply a different one in order to pass traffic, this is now broken. Using the offset translation logic imposed by ksz_pwrite8(), the correct value for regs[P_XMII_CTRL_1] should have been 0x6 on ksz8795_regs[], in order to really end up accessing register 0x56. Static code analysis shows that, despite there being multiple other accesses to regs[P_XMII_CTRL_1] in this driver, the only code path that is applicable to ksz8795_regs[] and ksz8_dev_ops is ksz_set_xmii(). Therefore, the problem is isolated to RGMII delays. In its current form, ksz8795_regs[] contains the same value for P_XMII_CTRL_0 and for P_XMII_CTRL_1, and this raises valid suspicions that writes made by the driver to regs[P_XMII_CTRL_0] might overwrite writes made to regs[P_XMII_CTRL_1] or vice versa. Again, static analysis shows that the only accesses to P_XMII_CTRL_0 from the driver are made from code paths which are not reachable with ksz8_dev_ops. So the accesses made by ksz_set_xmii() are safe for this switch family. [ vladimiroltean: rewrote commit message ] Fixes: c476bede4b0f ("net: dsa: microchip: ksz8795: use common xmii function") Signed-off-by: Marek Vasut Signed-off-by: Vladimir Oltean Acked-by: Arun Ramadoss Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20230315231916.2998480-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 816b1e8c521ce7dd17ba8083e475f9c9efc6d7b0 Merge: 0d2be75ce7dca cfab77c0b5458 Author: Jakub Kicinski Date: Thu Mar 16 21:20:33 2023 -0700 Merge branch 'ynl-another-license-adjustment' Jakub Kicinski says: ==================== ynl: another license adjustment Hopefully the last adjustment to the licensing of the specs. I'm still the author so should be fine to do this. ==================== Link: https://lore.kernel.org/r/20230315230351.478320-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit cfab77c0b54583816faac5f9abdf588c13895a9d Author: Jakub Kicinski Date: Wed Mar 15 16:03:51 2023 -0700 ynl: make the tooling check the license The (only recently documented) expectation is that all specs are under a certain license, but we don't actually enforce it. What's worse we then go ahead and assume the license was right, outputting the expected license into generated files. Fixes: 37d9df224d1e ("ynl: re-license uniformly under GPL-2.0 OR BSD-3-Clause") Reviewed-by: Chuck Lever Signed-off-by: Jakub Kicinski commit 4e16b6a748df52800c90f3ab181aef8129bd332f Author: Jakub Kicinski Date: Wed Mar 15 16:03:50 2023 -0700 ynl: broaden the license even more I relicensed Netlink spec code to GPL-2.0 OR BSD-3-Clause but we still put a slightly different license on the uAPI header than the rest of the code. Use the Linux-syscall-note on all the specs and all generated code. It's moot for kernel code, but should not hurt. This way the licenses match everywhere. Cc: Chuck Lever Fixes: 37d9df224d1e ("ynl: re-license uniformly under GPL-2.0 OR BSD-3-Clause") Reviewed-by: Chuck Lever Signed-off-by: Jakub Kicinski commit 054abb515f346b8f30a0a11953d9f786d3e76813 Author: Jakub Kicinski Date: Wed Mar 15 16:03:49 2023 -0700 tools: ynl: make definitions optional again definitions are optional, commit in question breaks cli for ethtool. Fixes: 6517a60b0307 ("tools: ynl: move the enum classes to shared code") Reviewed-by: Chuck Lever Signed-off-by: Jakub Kicinski commit 0d2be75ce7dcaf3e1f2da0d522140e1031c5239f Merge: 1b0120e4db0bf c7b7c64ab5821 Author: Jakub Kicinski Date: Thu Mar 16 21:13:05 2023 -0700 Merge tag 'mlx5-fixes-2023-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5 fixes 2023-03-15 This series provides bug fixes to mlx5 driver. * tag 'mlx5-fixes-2023-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5e: TC, Remove error message log print net/mlx5e: TC, fix cloned flow attribute net/mlx5e: TC, fix missing error code net/sched: TC, fix raw counter initialization net/mlx5e: Lower maximum allowed MTU in XSK to match XDP prerequisites net/mlx5: Set BREAK_FW_WAIT flag first when removing driver net/mlx5e: kTLS, Fix missing error unwind on unsupported cipher type net/mlx5e: Fix cleanup null-ptr deref on encap lock net/mlx5: E-switch, Fix missing set of split_count when forward to ovs internal port net/mlx5: E-switch, Fix wrong usage of source port rewrite in split rules net/mlx5: Disable eswitch before waiting for VF pages net/mlx5: Fix setting ec_function bit in MANAGE_PAGES net/mlx5e: Don't cache tunnel offloads capability net/mlx5e: Fix macsec ASO context alignment ==================== Link: https://lore.kernel.org/r/20230315225847.360083-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 1b0120e4db0bf2838d1ce741195ce4b7cc100b91 Author: Matthieu Baerts Date: Wed Mar 15 21:25:17 2023 +0100 hsr: ratelimit only when errors are printed Recently, when automatically merging -net and net-next in MPTCP devel tree, our CI reported [1] a conflict in hsr, the same as the one reported by Stephen in netdev [2]. When looking at the conflict, I noticed it is in fact the v1 [3] that has been applied in -net and the v2 [4] in net-next. Maybe the v1 was applied by accident. As mentioned by Jakub Kicinski [5], the new condition makes more sense before the net_ratelimit(), not to update net_ratelimit's state which is unnecessary if we're not going to print either way. Here, this modification applies the v2 but in -net. Link: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/4423171069 [1] Link: https://lore.kernel.org/netdev/20230315100914.53fc1760@canb.auug.org.au/ [2] Link: https://lore.kernel.org/netdev/20230307133229.127442-1-koverskeid@gmail.com/ [3] Link: https://lore.kernel.org/netdev/20230309092302.179586-1-koverskeid@gmail.com/ [4] Link: https://lore.kernel.org/netdev/20230308232001.2fb62013@kernel.org/ [5] Fixes: 28e8cabe80f3 ("net: hsr: Don't log netdev_err message on unknown prp dst node") Signed-off-by: Matthieu Baerts Reviewed-by: Steen Hegelund Link: https://lore.kernel.org/r/20230315-net-20230315-hsr_framereg-ratelimit-v1-1-61d2ef176d11@tessares.net Signed-off-by: Jakub Kicinski commit 470efd68a4653d9819d391489886432cd31bcd0b Author: Daniil Tatianin Date: Wed Mar 15 22:46:18 2023 +0300 qed/qed_mng_tlv: correctly zero out ->min instead of ->hour This fixes an issue where ->hour would erroneously get zeroed out instead of ->min because of a bad copy paste. Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Fixes: f240b6882211 ("qed: Add support for processing fcoe tlv request.") Signed-off-by: Daniil Tatianin Link: https://lore.kernel.org/r/20230315194618.579286-1-d-tatianin@yandex-team.ru Signed-off-by: Jakub Kicinski commit a13faca032acbf2699293587085293bdfaafc8ae Author: Yu Kuai Date: Wed Mar 15 14:21:54 2023 +0800 scsi: scsi_dh_alua: Fix memleak for 'qdata' in alua_activate() If alua_rtpg_queue() failed from alua_activate(), then 'qdata' is not freed, which will cause following memleak: unreferenced object 0xffff88810b2c6980 (size 32): comm "kworker/u16:2", pid 635322, jiffies 4355801099 (age 1216426.076s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 40 39 24 c1 ff ff ff ff 00 f8 ea 0a 81 88 ff ff @9$............. backtrace: [<0000000098f3a26d>] alua_activate+0xb0/0x320 [<000000003b529641>] scsi_dh_activate+0xb2/0x140 [<000000007b296db3>] activate_path_work+0xc6/0xe0 [dm_multipath] [<000000007adc9ace>] process_one_work+0x3c5/0x730 [<00000000c457a985>] worker_thread+0x93/0x650 [<00000000cb80e628>] kthread+0x1ba/0x210 [<00000000a1e61077>] ret_from_fork+0x22/0x30 Fix the problem by freeing 'qdata' in error path. Fixes: 625fe857e4fa ("scsi: scsi_dh_alua: Check scsi_device_get() return value") Signed-off-by: Yu Kuai Link: https://lore.kernel.org/r/20230315062154.668812-1-yukuai1@huaweicloud.com Reviewed-by: Benjamin Block Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit d3affdeb400f3adc925bd996f3839481f5291839 Author: Quinn Tran Date: Sun Mar 12 21:37:11 2023 -0700 scsi: qla2xxx: Synchronize the IOCB count to be in order A system hang was observed with the following call trace: BUG: kernel NULL pointer dereference, address: 0000000000000000 PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 15 PID: 86747 Comm: nvme Kdump: loaded Not tainted 6.2.0+ #1 Hardware name: Dell Inc. PowerEdge R6515/04F3CJ, BIOS 2.7.3 03/31/2022 RIP: 0010:__wake_up_common+0x55/0x190 Code: 41 f6 01 04 0f 85 b2 00 00 00 48 8b 43 08 4c 8d 40 e8 48 8d 43 08 48 89 04 24 48 89 c6\ 49 8d 40 18 48 39 c6 0f 84 e9 00 00 00 <49> 8b 40 18 89 6c 24 14 31 ed 4c 8d 60 e8 41 8b 18 f6 c3 04 75 5d RSP: 0018:ffffb05a82afbba0 EFLAGS: 00010082 RAX: 0000000000000000 RBX: ffff8f9b83a00018 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffff8f9b83a00020 RDI: ffff8f9b83a00018 RBP: 0000000000000001 R08: ffffffffffffffe8 R09: ffffb05a82afbbf8 R10: 70735f7472617473 R11: 5f30307832616c71 R12: 0000000000000001 R13: 0000000000000003 R14: 0000000000000000 R15: 0000000000000000 FS: 00007f815cf4c740(0000) GS:ffff8f9eeed80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000010633a000 CR4: 0000000000350ee0 Call Trace: __wake_up_common_lock+0x83/0xd0 qla_nvme_ls_req+0x21b/0x2b0 [qla2xxx] __nvme_fc_send_ls_req+0x1b5/0x350 [nvme_fc] nvme_fc_xmt_disconnect_assoc+0xca/0x110 [nvme_fc] nvme_fc_delete_association+0x1bf/0x220 [nvme_fc] ? nvme_remove_namespaces+0x9f/0x140 [nvme_core] nvme_do_delete_ctrl+0x5b/0xa0 [nvme_core] nvme_sysfs_delete+0x5f/0x70 [nvme_core] kernfs_fop_write_iter+0x12b/0x1c0 vfs_write+0x2a3/0x3b0 ksys_write+0x5f/0xe0 do_syscall_64+0x5c/0x90 ? syscall_exit_work+0x103/0x130 ? syscall_exit_to_user_mode+0x12/0x30 ? do_syscall_64+0x69/0x90 ? exit_to_user_mode_loop+0xd0/0x130 ? exit_to_user_mode_prepare+0xec/0x100 ? syscall_exit_to_user_mode+0x12/0x30 ? do_syscall_64+0x69/0x90 ? syscall_exit_to_user_mode+0x12/0x30 ? do_syscall_64+0x69/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7f815cd3eb97 The IOCB counts are out of order and that would block any commands from going out and subsequently hang the system. Synchronize the IOCB count to be in correct order. Fixes: 5f63a163ed2f ("scsi: qla2xxx: Fix exchange oversubscription for management commands") Cc: stable@vger.kernel.org Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Link: https://lore.kernel.org/r/20230313043711.13500-3-njavali@marvell.com Reviewed-by: Himanshu Madhani Reviewed-by: John Meneghini Tested-by: Lin Li Signed-off-by: Martin K. Petersen commit 0367076b0817d5c75dfb83001ce7ce5c64d803a9 Author: Nilesh Javali Date: Sun Mar 12 21:37:10 2023 -0700 scsi: qla2xxx: Perform lockless command completion in abort path While adding and removing the controller, the following call trace was observed: WARNING: CPU: 3 PID: 623596 at kernel/dma/mapping.c:532 dma_free_attrs+0x33/0x50 CPU: 3 PID: 623596 Comm: sh Kdump: loaded Not tainted 5.14.0-96.el9.x86_64 #1 RIP: 0010:dma_free_attrs+0x33/0x50 Call Trace: qla2x00_async_sns_sp_done+0x107/0x1b0 [qla2xxx] qla2x00_abort_srb+0x8e/0x250 [qla2xxx] ? ql_dbg+0x70/0x100 [qla2xxx] __qla2x00_abort_all_cmds+0x108/0x190 [qla2xxx] qla2x00_abort_all_cmds+0x24/0x70 [qla2xxx] qla2x00_abort_isp_cleanup+0x305/0x3e0 [qla2xxx] qla2x00_remove_one+0x364/0x400 [qla2xxx] pci_device_remove+0x36/0xa0 __device_release_driver+0x17a/0x230 device_release_driver+0x24/0x30 pci_stop_bus_device+0x68/0x90 pci_stop_and_remove_bus_device_locked+0x16/0x30 remove_store+0x75/0x90 kernfs_fop_write_iter+0x11c/0x1b0 new_sync_write+0x11f/0x1b0 vfs_write+0x1eb/0x280 ksys_write+0x5f/0xe0 do_syscall_64+0x5c/0x80 ? do_user_addr_fault+0x1d8/0x680 ? do_syscall_64+0x69/0x80 ? exc_page_fault+0x62/0x140 ? asm_exc_page_fault+0x8/0x30 entry_SYSCALL_64_after_hwframe+0x44/0xae The command was completed in the abort path during driver unload with a lock held, causing the warning in abort path. Hence complete the command without any lock held. Reported-by: Lin Li Tested-by: Lin Li Cc: stable@vger.kernel.org Signed-off-by: Nilesh Javali Link: https://lore.kernel.org/r/20230313043711.13500-2-njavali@marvell.com Reviewed-by: Himanshu Madhani Reviewed-by: John Meneghini Signed-off-by: Martin K. Petersen commit a204b490595de71016b2360a1886ec8c12d0afac Author: Joel Selvaraj Date: Sun Mar 12 23:14:02 2023 -0500 scsi: core: Add BLIST_SKIP_VPD_PAGES for SKhynix H28U74301AMR Xiaomi Poco F1 (qcom/sdm845-xiaomi-beryllium*.dts) comes with a SKhynix H28U74301AMR UFS. The sd_read_cpr() operation leads to a 120 second timeout, making the device bootup very slow: [ 121.457736] sd 0:0:0:1: [sdb] tag#23 timing out command, waited 120s Setting the BLIST_SKIP_VPD_PAGES allows the device to skip the failing sd_read_cpr operation and boot normally. Signed-off-by: Joel Selvaraj Link: https://lore.kernel.org/r/20230313041402.39330-1-joelselvaraj.oss@gmail.com Cc: stable@vger.kernel.org Signed-off-by: Martin K. Petersen commit 2a210e6a15dc5c50b18e6d80aa5a58689586ecf7 Merge: bcd9d56f89b3a e0e6b416b25ee Author: Dave Airlie Date: Fri Mar 17 12:03:57 2023 +1000 Merge tag 'drm-intel-fixes-2023-03-15' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v6.3-rc3: - Fix hwmon PL1 power limit enabling - Fix audio ELD handling for DP MST - Fix PSR io and wake line calculations - Fix DG2 HDMI modes with 267.30 and 319.89 MHz pixel clocks - Fix SSEU subslice out-of-bounds access - Fix misuse of non-idle barriers as fence trackers Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87r0tq5nyn.fsf@intel.com commit bcd9d56f89b3aa878731d634c1782d1530fab511 Merge: eeac8ede17557 4028cbf867f70 Author: Dave Airlie Date: Fri Mar 17 11:01:20 2023 +1000 Merge tag 'drm-misc-fixes-2023-03-16' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull: * fix info leak in edid * build fix for accel/ * ref-counting fix for fbdev deferred I/O * driver fixes Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230316143347.GA9246@linux-uq9g commit 24994513ad13ff2c47ba91d2b5df82c3d496c370 Author: Po-Hsu Lin Date: Thu Mar 16 00:53:53 2023 +0800 selftests: net: devlink_port_split.py: skip test if no suitable device available The `devlink -j port show` command output may not contain the "flavour" key, an example from Ubuntu 22.10 s390x LPAR(5.19.0-37-generic), with mlx4 driver and iproute2-5.15.0: {"port":{"pci/0001:00:00.0/1":{"type":"eth","netdev":"ens301"}, "pci/0001:00:00.0/2":{"type":"eth","netdev":"ens301d1"}, "pci/0002:00:00.0/1":{"type":"eth","netdev":"ens317"}, "pci/0002:00:00.0/2":{"type":"eth","netdev":"ens317d1"}}} This will cause a KeyError exception. Create a validate_devlink_output() to check for this "flavour" from devlink command output to avoid this KeyError exception. Also let it handle the check for `devlink -j dev show` output in main(). Apart from this, if the test was not started because the max lanes of the designated device is 0. The script will still return 0 and thus causing a false-negative test result. Use a found_max_lanes flag to determine if these tests were skipped due to this reason and return KSFT_SKIP to make it more clear. Link: https://bugs.launchpad.net/bugs/1937133 Fixes: f3348a82e727 ("selftests: net: Add port split test") Signed-off-by: Po-Hsu Lin Link: https://lore.kernel.org/r/20230315165353.229590-1-po-hsu.lin@canonical.com Signed-off-by: Jakub Kicinski commit f38373345c65529639a01fba3675eb8cb4c579c3 Author: Thomas Bogendoerfer Date: Wed Mar 15 14:41:17 2023 +0100 i825xx: sni_82596: use eth_hw_addr_set() netdev->dev_addr is now const, we can't write to it directly. Copy scrambled mac address octects into an array then eth_hw_addr_set(). Fixes: adeef3e32146 ("net: constify netdev->dev_addr") Signed-off-by: Thomas Bogendoerfer Reviewed-by: Michal Kubiak Link: https://lore.kernel.org/r/20230315134117.79511-1-tsbogend@alpha.franken.de Signed-off-by: Jakub Kicinski commit 3d87debb8ed2649608ff432699e7c961c0c6f03b Author: Alexandra Winter Date: Wed Mar 15 14:14:35 2023 +0100 net/iucv: Fix size of interrupt data iucv_irq_data needs to be 4 bytes larger. These bytes are not used by the iucv module, but written by the z/VM hypervisor in case a CPU is deconfigured. Reported as: BUG dma-kmalloc-64 (Not tainted): kmalloc Redzone overwritten ----------------------------------------------------------------------------- 0x0000000000400564-0x0000000000400567 @offset=1380. First byte 0x80 instead of 0xcc Allocated in iucv_cpu_prepare+0x44/0xd0 age=167839 cpu=2 pid=1 __kmem_cache_alloc_node+0x166/0x450 kmalloc_node_trace+0x3a/0x70 iucv_cpu_prepare+0x44/0xd0 cpuhp_invoke_callback+0x156/0x2f0 cpuhp_issue_call+0xf0/0x298 __cpuhp_setup_state_cpuslocked+0x136/0x338 __cpuhp_setup_state+0xf4/0x288 iucv_init+0xf4/0x280 do_one_initcall+0x78/0x390 do_initcalls+0x11a/0x140 kernel_init_freeable+0x25e/0x2a0 kernel_init+0x2e/0x170 __ret_from_fork+0x3c/0x58 ret_from_fork+0xa/0x40 Freed in iucv_init+0x92/0x280 age=167839 cpu=2 pid=1 __kmem_cache_free+0x308/0x358 iucv_init+0x92/0x280 do_one_initcall+0x78/0x390 do_initcalls+0x11a/0x140 kernel_init_freeable+0x25e/0x2a0 kernel_init+0x2e/0x170 __ret_from_fork+0x3c/0x58 ret_from_fork+0xa/0x40 Slab 0x0000037200010000 objects=32 used=30 fp=0x0000000000400640 flags=0x1ffff00000010200(slab|head|node=0|zone=0| Object 0x0000000000400540 @offset=1344 fp=0x0000000000000000 Redzone 0000000000400500: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc ................ Redzone 0000000000400510: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc ................ Redzone 0000000000400520: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc ................ Redzone 0000000000400530: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc ................ Object 0000000000400540: 00 01 00 03 00 00 00 00 00 00 00 00 00 00 00 00 ................ Object 0000000000400550: f3 86 81 f2 f4 82 f8 82 f0 f0 f0 f0 f0 f0 f0 f2 ................ Object 0000000000400560: 00 00 00 00 80 00 00 00 cc cc cc cc cc cc cc cc ................ Object 0000000000400570: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc ................ Redzone 0000000000400580: cc cc cc cc cc cc cc cc ........ Padding 00000000004005d4: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZZZZZZZZZ Padding 00000000004005e4: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZZZZZZZZZ Padding 00000000004005f4: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZZZZZ CPU: 6 PID: 121030 Comm: 116-pai-crypto. Not tainted 6.3.0-20230221.rc0.git4.99b8246b2d71.300.fc37.s390x+debug #1 Hardware name: IBM 3931 A01 704 (z/VM 7.3.0) Call Trace: [<000000032aa034ec>] dump_stack_lvl+0xac/0x100 [<0000000329f5a6cc>] check_bytes_and_report+0x104/0x140 [<0000000329f5aa78>] check_object+0x370/0x3c0 [<0000000329f5ede6>] free_debug_processing+0x15e/0x348 [<0000000329f5f06a>] free_to_partial_list+0x9a/0x2f0 [<0000000329f5f4a4>] __slab_free+0x1e4/0x3a8 [<0000000329f61768>] __kmem_cache_free+0x308/0x358 [<000000032a91465c>] iucv_cpu_dead+0x6c/0x88 [<0000000329c2fc66>] cpuhp_invoke_callback+0x156/0x2f0 [<000000032aa062da>] _cpu_down.constprop.0+0x22a/0x5e0 [<0000000329c3243e>] cpu_device_down+0x4e/0x78 [<000000032a61dee0>] device_offline+0xc8/0x118 [<000000032a61e048>] online_store+0x60/0xe0 [<000000032a08b6b0>] kernfs_fop_write_iter+0x150/0x1e8 [<0000000329fab65c>] vfs_write+0x174/0x360 [<0000000329fab9fc>] ksys_write+0x74/0x100 [<000000032aa03a5a>] __do_syscall+0x1da/0x208 [<000000032aa177b2>] system_call+0x82/0xb0 INFO: lockdep is turned off. FIX dma-kmalloc-64: Restoring kmalloc Redzone 0x0000000000400564-0x0000000000400567=0xcc FIX dma-kmalloc-64: Object at 0x0000000000400540 not freed Fixes: 2356f4cb1911 ("[S390]: Rewrite of the IUCV base code, part 2") Signed-off-by: Alexandra Winter Link: https://lore.kernel.org/r/20230315131435.4113889-1-wintera@linux.ibm.com Signed-off-by: Jakub Kicinski commit 37d010399f7552add2b68e2b347901c83562dab8 Author: Toke Høiland-Jørgensen Date: Wed Mar 15 13:55:38 2023 +0100 net: atlantic: Fix crash when XDP is enabled but no program is loaded The aq_xdp_run_prog() function falls back to the XDP_ABORTED action handler (using a goto) if the operations for any of the other actions fail. The XDP_ABORTED handler in turn calls the bpf_warn_invalid_xdp_action() tracepoint. However, the function also jumps into the XDP_PASS helper if no XDP program is loaded on the device, which means the XDP_ABORTED handler can be run with a NULL program pointer. This results in a NULL pointer deref because the tracepoint dereferences the 'prog' pointer passed to it. This situation can happen in multiple ways: - If a packet arrives between the removal of the program from the interface and the static_branch_dec() in aq_xdp_setup() - If there are multiple devices using the same driver in the system and one of them has an XDP program loaded and the other does not. Fix this by refactoring the aq_xdp_run_prog() function to remove the 'goto pass' handling if there is no XDP program loaded. Instead, factor out the skb building in a separate small helper function. Fixes: 26efaef759a1 ("net: atlantic: Implement xdp data plane") Reported-by: Freysteinn Alfredsson Tested-by: Freysteinn Alfredsson Signed-off-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20230315125539.103319-1-toke@redhat.com Signed-off-by: Jakub Kicinski commit 43ffe6caccc7a1bb9d7442fbab521efbf6c1378c Author: Szymon Heidrich Date: Thu Mar 16 12:05:40 2023 +0100 net: usb: smsc75xx: Move packet length check to prevent kernel panic in skb_pull Packet length check needs to be located after size and align_count calculation to prevent kernel panic in skb_pull() in case rx_cmd_a & RX_CMD_A_RED evaluates to true. Fixes: d8b228318935 ("net: usb: smsc75xx: Limit packet length to skb->len") Signed-off-by: Szymon Heidrich Link: https://lore.kernel.org/r/20230316110540.77531-1-szymon.heidrich@gmail.com Signed-off-by: Jakub Kicinski commit 8a2618e14f81604a9b6ad305d57e0c8da939cd65 Author: Ido Schimmel Date: Wed Mar 15 14:40:09 2023 +0200 ipv4: Fix incorrect table ID in IOCTL path Commit f96a3d74554d ("ipv4: Fix incorrect route flushing when source address is deleted") started to take the table ID field in the FIB info structure into account when determining if two structures are identical or not. This field is initialized using the 'fc_table' field in the route configuration structure, which is not set when adding a route via IOCTL. The above can result in user space being able to install two identical routes that only differ in the table ID field of their associated FIB info. Fix by initializing the table ID field in the route configuration structure in the IOCTL path. Before the fix: # ip route add default via 192.0.2.2 # route add default gw 192.0.2.2 # ip -4 r show default # default via 192.0.2.2 dev dummy10 # default via 192.0.2.2 dev dummy10 After the fix: # ip route add default via 192.0.2.2 # route add default gw 192.0.2.2 SIOCADDRT: File exists # ip -4 r show default default via 192.0.2.2 dev dummy10 Audited the code paths to ensure there are no other paths that do not properly initialize the route configuration structure when installing a route. Fixes: 5a56a0b3a45d ("net: Don't delete routes in different VRFs") Fixes: f96a3d74554d ("ipv4: Fix incorrect route flushing when source address is deleted") Reported-by: gaoxingwang Link: https://lore.kernel.org/netdev/20230314144159.2354729-1-gaoxingwang1@huawei.com/ Tested-by: gaoxingwang Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20230315124009.4015212-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski commit 84770d124908ba5f5e38b4f732ac48fd8ff6c0c5 Merge: c782c7f11856a c276a706ea1f5 Author: Jakub Kicinski Date: Thu Mar 16 17:23:48 2023 -0700 Merge tag 'ipsec-2023-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2023-03-15 1) Fix an information leak when dumping algos and encap. From Herbert Xu 2) Allow transport-mode states with AF_UNSPEC selector to allow for nested transport-mode states. From Herbert Xu. * tag 'ipsec-2023-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec: xfrm: Allow transport-mode states with AF_UNSPEC selector xfrm: Zero padding when dumping algos and encap ==================== Link: https://lore.kernel.org/r/20230315105623.1396491-1-steffen.klassert@secunet.com Signed-off-by: Jakub Kicinski commit c782c7f11856a799afdc18c7200c009224f89e65 Merge: 04504793feec0 c6be7136afb22 Author: Jakub Kicinski Date: Thu Mar 16 17:14:02 2023 -0700 Merge branch 'net-renesas-set-mac_managed_pm-at-probe-time' Wolfram Sang says: ==================== net: renesas: set 'mac_managed_pm' at probe time When suspending/resuming an interface which was not up, we saw mdiobus related PM handling despite 'mac_managed_pm' being set for RAVB/SH_ETH. Heiner kindly suggested the fix to set this flag at probe time, not at init/open time. I implemented his suggestion and it works fine on these two Renesas drivers. ==================== Link: https://lore.kernel.org/r/20230315074115.3008-1-wsa+renesas@sang-engineering.com Signed-off-by: Jakub Kicinski commit c6be7136afb224a01d4cde2983ddebac8da98693 Author: Wolfram Sang Date: Wed Mar 15 08:41:15 2023 +0100 sh_eth: avoid PHY being resumed when interface is not up SH_ETH doesn't need mdiobus suspend/resume, that's why it sets 'mac_managed_pm'. However, setting it needs to be moved from init to probe, so mdiobus PM functions will really never be called (e.g. when the interface is not up yet during suspend/resume). Fixes: 6a1dbfefdae4 ("net: sh_eth: Fix PHY state warning splat during system resume") Suggested-by: Heiner Kallweit Signed-off-by: Wolfram Sang Reviewed-by: Michal Kubiak Reviewed-by: Sergey Shtylyov Signed-off-by: Jakub Kicinski commit 7f5ebf5dae42e710162f1c481ebcf28ab7b741c7 Author: Wolfram Sang Date: Wed Mar 15 08:41:14 2023 +0100 ravb: avoid PHY being resumed when interface is not up RAVB doesn't need mdiobus suspend/resume, that's why it sets 'mac_managed_pm'. However, setting it needs to be moved from init to probe, so mdiobus PM functions will really never be called (e.g. when the interface is not up yet during suspend/resume). Fixes: 4924c0cdce75 ("net: ravb: Fix PHY state warning splat during system resume") Suggested-by: Heiner Kallweit Signed-off-by: Wolfram Sang Reviewed-by: Michal Kubiak Reviewed-by: Sergey Shtylyov Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 8c2e8ac8ad4be68409e806ce1cc78fc7a04539f3 Author: Marc Zyngier Date: Thu Mar 16 17:45:46 2023 +0000 KVM: arm64: Check for kvm_vma_mte_allowed in the critical section On page fault, we find about the VMA that backs the page fault early on, and quickly release the mmap_read_lock. However, using the VMA pointer after the critical section is pretty dangerous, as a teardown may happen in the meantime and the VMA be long gone. Move the sampling of the MTE permission early, and NULL-ify the VMA pointer after that, just to be on the safe side. Signed-off-by: Marc Zyngier Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230316174546.3777507-3-maz@kernel.org Signed-off-by: Oliver Upton commit e86fc1a3a3e9b4850fe74d738e3cfcf4297d8bba Author: Marc Zyngier Date: Thu Mar 16 17:45:45 2023 +0000 KVM: arm64: Disable interrupts while walking userspace PTs We walk the userspace PTs to discover what mapping size was used there. However, this can race against the userspace tables being freed, and we end-up in the weeds. Thankfully, the mm code is being generous and will IPI us when doing so. So let's implement our part of the bargain and disable interrupts around the walk. This ensures that nothing terrible happens during that time. We still need to handle the removal of the page tables before the walk. For that, allow get_user_mapping_size() to return an error, and make sure this error can be propagated all the way to the the exit handler. Signed-off-by: Marc Zyngier Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230316174546.3777507-2-maz@kernel.org Signed-off-by: Oliver Upton commit 47d43086531f10539470a63e8ad92803e686a3dd Author: Chunyan Zhang Date: Thu Mar 16 10:36:24 2023 +0800 clk: sprd: set max_register according to mapping range In sprd clock driver, regmap_config.max_register was set to a fixed value which is likely larger than the address range configured in device tree, when reading registers through debugfs it would cause access violation. Fixes: d41f59fd92f2 ("clk: sprd: Add common infrastructure") Signed-off-by: Chunyan Zhang Link: https://lore.kernel.org/r/20230316023624.758204-1-chunyan.zhang@unisoc.com Signed-off-by: Stephen Boyd commit 38e04b3e4240a6d8fb43129ebad41608db64bc6f Merge: 0ddc84d2dd43e 6284e46bdd477 Author: Linus Torvalds Date: Thu Mar 16 15:06:16 2023 -0700 Merge tag '6.3-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs client fixes from Steve French: "Seven cifs/smb3 client fixes, all also for stable: - four DFS fixes - multichannel reconnect fix - fix smb1 stats for cancel command - fix for set file size error path" * tag '6.3-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: use DFS root session instead of tcon ses cifs: return DFS root session id in DebugData cifs: fix use-after-free bug in refresh_cache_worker() cifs: set DFS root session in cifs_get_smb_ses() cifs: generate signkey for the channel that's reconnecting cifs: Fix smb2_set_path_size() cifs: Move the in_send statistic to __smb_send_rqst() commit 92fbb6d1296f81f41f65effd7f5f8c0f74943d15 Author: Wei Chen Date: Tue Mar 14 16:54:21 2023 +0000 i2c: xgene-slimpro: Fix out-of-bounds bug in xgene_slimpro_i2c_xfer() The data->block[0] variable comes from user and is a number between 0-255. Without proper check, the variable may be very large to cause an out-of-bounds when performing memcpy in slimpro_i2c_blkwr. Fix this bug by checking the value of writelen. Fixes: f6505fbabc42 ("i2c: add SLIMpro I2C device driver on APM X-Gene platform") Signed-off-by: Wei Chen Cc: stable@vger.kernel.org Reviewed-by: Andi Shyti Signed-off-by: Wolfram Sang commit d98263512684a47e81bcb72a5408958ecd1e60b0 Author: Yicong Yang Date: Mon Mar 13 15:45:52 2023 +0800 i2c: hisi: Only use the completion interrupt to finish the transfer The controller will always generate a completion interrupt when the transfer is finished normally or not. Currently we use either error or completion interrupt to finish, this may result the completion interrupt unhandled and corrupt the next transfer, especially at low speed mode. Since on error case, the error interrupt will come first then is the completion interrupt. So only use the completion interrupt to finish the whole transfer process. Fixes: d62fbdb99a85 ("i2c: add support for HiSilicon I2C controller") Reported-by: Sheng Feng Signed-off-by: Sheng Feng Signed-off-by: Yicong Yang Signed-off-by: Wolfram Sang commit cc9812a3096d1986caca9a23bee99effc45c08df Author: Yicong Yang Date: Mon Mar 13 15:45:51 2023 +0800 i2c: hisi: Avoid redundant interrupts After issuing all the messages we can disable the TX_EMPTY interrupts to avoid handling redundant interrupts. For doing a sinlge bus detection (i2cdetect -y -r 0) we can reduce ~97% interrupts (before ~12000 after ~400). Signed-off-by: Sheng Feng Signed-off-by: Yicong Yang Signed-off-by: Wolfram Sang commit 5190417bdf72c71b65bd9892103c6186816a6e8b Author: Matthias Schiffer Date: Mon Feb 13 16:25:50 2023 +0100 i2c: mxs: ensure that DMA buffers are safe for DMA We found that after commit 9c46929e7989 ("ARM: implement THREAD_INFO_IN_TASK for uniprocessor systems"), the PCF85063 RTC driver stopped working on i.MX28 due to regmap_bulk_read() reading bogus data into a stack buffer. This is caused by the i2c-mxs driver using DMA transfers even for messages without the I2C_M_DMA_SAFE flag, and the aforementioned commit enabling vmapped stacks. As the MXS I2C controller requires DMA for reads of >4 bytes, DMA can't be disabled, so the issue is fixed by using i2c_get_dma_safe_msg_buf() to create a bounce buffer when needed. Fixes: 9c46929e7989 ("ARM: implement THREAD_INFO_IN_TASK for uniprocessor systems") Signed-off-by: Matthias Schiffer Signed-off-by: Wolfram Sang commit 1c7885004567e8951d65a983be095f254dd20bef Author: Alexander Stein Date: Mon Jan 30 16:32:47 2023 +0100 i2c: imx-lpi2c: check only for enabled interrupt flags When reading from I2C, the Tx watermark is set to 0. Unfortunately the TDF (transmit data flag) is enabled when Tx FIFO entries is equal or less than watermark. So it is set in every case, hence the reset default of 1. This results in the MSR_RDF _and_ MSR_TDF flags to be set thus trying to send Tx data on a read message. Mask the IRQ status to filter for wanted flags only. Fixes: a55fa9d0e42e ("i2c: imx-lpi2c: add low power i2c bus driver") Signed-off-by: Alexander Stein Tested-by: Emanuele Ghidoli Signed-off-by: Wolfram Sang commit 987dd36c0141f6ab9f0fbf14d6b2ec3342dedb2f Author: Alexander Stein Date: Mon Jan 30 16:32:46 2023 +0100 i2c: imx-lpi2c: clean rx/tx buffers upon new message When start sending a new message clear the Rx & Tx buffer pointers in order to avoid using stale pointers. Signed-off-by: Alexander Stein Tested-by: Emanuele Ghidoli Signed-off-by: Wolfram Sang commit 0ddc84d2dd43e2c2c3f634baa05ea10abd31197e Merge: 9c1bec9c0b08a f3e707413dbe3 Author: Linus Torvalds Date: Thu Mar 16 11:32:12 2023 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "ARM64: - Address a rather annoying bug w.r.t. guest timer offsetting. The synchronization of timer offsets between vCPUs was broken, leading to inconsistent timer reads within the VM. x86: - New tests for the slow path of the EVTCHNOP_send Xen hypercall - Add missing nVMX consistency checks for CR0 and CR4 - Fix bug that broke AMD GATag on 512 vCPU machines Selftests: - Skip hugetlb tests if huge pages are not available - Sync KVM exit reasons" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: selftests: Sync KVM exit reasons in selftests KVM: selftests: Add macro to generate KVM exit reason strings KVM: selftests: Print expected and actual exit reason in KVM exit reason assert KVM: selftests: Make vCPU exit reason test assertion common KVM: selftests: Add EVTCHNOP_send slow path test to xen_shinfo_test KVM: selftests: Use enum for test numbers in xen_shinfo_test KVM: selftests: Add helpers to make Xen-style VMCALL/VMMCALL hypercalls KVM: selftests: Move the guts of kvm_hypercall() to a separate macro KVM: SVM: WARN if GATag generation drops VM or vCPU ID information KVM: SVM: Modify AVIC GATag to support max number of 512 vCPUs KVM: SVM: Fix a benign off-by-one bug in AVIC physical table mask selftests: KVM: skip hugetlb tests if huge pages are not available KVM: VMX: Use tabs instead of spaces for indentation KVM: VMX: Fix indentation coding style issue KVM: nVMX: remove unnecessary #ifdef KVM: nVMX: add missing consistency checks for CR0 and CR4 KVM: arm64: timers: Convert per-vcpu virtual offset to a global value commit 04504793feec0484dd0deea566c386d1965578f6 Merge: 1a87e641d8a50 1a3bd6eabae35 Author: David S. Miller Date: Thu Mar 16 17:46:05 2023 +0000 Merge branch 'virtio_net-xdp-bugs' Xuan Zhuo says: ==================== virtio_net: fix two bugs related to XDP This patch set fixes two bugs related to XDP. These two patch is not associated. ==================== Signed-off-by: David S. Miller commit 1a3bd6eabae35afc5c6dbe2651f21467cf8ad3fd Author: Xuan Zhuo Date: Wed Mar 15 09:52:23 2023 +0800 virtio_net: free xdp shinfo frags when build_skb_from_xdp_buff() fails build_skb_from_xdp_buff() may return NULL, in this case we need to free the frags of xdp shinfo. Fixes: fab89bafa95b ("virtio-net: support multi-buffer xdp") Signed-off-by: Xuan Zhuo Acked-by: Michael S. Tsirkin Reviewed-by: Yunsheng Lin Signed-off-by: David S. Miller commit fa0f1ba7c8233118b6fdaa65e2f5ded563d3e1fa Author: Xuan Zhuo Date: Wed Mar 15 09:52:22 2023 +0800 virtio_net: fix page_to_skb() miss headroom Because headroom is not passed to page_to_skb(), this causes the shinfo exceeds the range. Then the frags of shinfo are changed by other process. [ 157.724634] stack segment: 0000 [#1] PREEMPT SMP NOPTI [ 157.725358] CPU: 3 PID: 679 Comm: xdp_pass_user_f Tainted: G E 6.2.0+ #150 [ 157.726401] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/4 [ 157.727820] RIP: 0010:skb_release_data+0x11b/0x180 [ 157.728449] Code: 44 24 02 48 83 c3 01 39 d8 7e be 48 89 d8 48 c1 e0 04 41 80 7d 7e 00 49 8b 6c 04 30 79 0c 48 89 ef e8 89 b [ 157.730751] RSP: 0018:ffffc90000178b48 EFLAGS: 00010202 [ 157.731383] RAX: 0000000000000010 RBX: 0000000000000001 RCX: 0000000000000000 [ 157.732270] RDX: 0000000000000000 RSI: 0000000000000002 RDI: ffff888100dd0b00 [ 157.733117] RBP: 5d5d76010f6e2408 R08: ffff888100dd0b2c R09: 0000000000000000 [ 157.734013] R10: ffffffff82effd30 R11: 000000000000a14e R12: ffff88810981ffc0 [ 157.734904] R13: ffff888100dd0b00 R14: 0000000000000002 R15: 0000000000002310 [ 157.735793] FS: 00007f06121d9740(0000) GS:ffff88842fcc0000(0000) knlGS:0000000000000000 [ 157.736794] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 157.737522] CR2: 00007ffd9a56c084 CR3: 0000000104bda001 CR4: 0000000000770ee0 [ 157.738420] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 157.739283] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 157.740146] PKRU: 55555554 [ 157.740502] Call Trace: [ 157.740843] [ 157.741117] kfree_skb_reason+0x50/0x120 [ 157.741613] __udp4_lib_rcv+0x52b/0x5e0 [ 157.742132] ip_protocol_deliver_rcu+0xaf/0x190 [ 157.742715] ip_local_deliver_finish+0x77/0xa0 [ 157.743280] ip_sublist_rcv_finish+0x80/0x90 [ 157.743834] ip_list_rcv_finish.constprop.0+0x16f/0x190 [ 157.744493] ip_list_rcv+0x126/0x140 [ 157.744952] __netif_receive_skb_list_core+0x29b/0x2c0 [ 157.745602] __netif_receive_skb_list+0xed/0x160 [ 157.746190] ? udp4_gro_receive+0x275/0x350 [ 157.746732] netif_receive_skb_list_internal+0xf2/0x1b0 [ 157.747398] napi_gro_receive+0xd1/0x210 [ 157.747911] virtnet_receive+0x75/0x1c0 [ 157.748422] virtnet_poll+0x48/0x1b0 [ 157.748878] __napi_poll+0x29/0x1b0 [ 157.749330] net_rx_action+0x27a/0x340 [ 157.749812] __do_softirq+0xf3/0x2fb [ 157.750298] do_softirq+0xa2/0xd0 [ 157.750745] [ 157.751563] [ 157.752329] __local_bh_enable_ip+0x6d/0x80 [ 157.753178] virtnet_xdp_set+0x482/0x860 [ 157.754159] ? __pfx_virtnet_xdp+0x10/0x10 [ 157.755129] dev_xdp_install+0xa4/0xe0 [ 157.756033] dev_xdp_attach+0x20b/0x5e0 [ 157.756933] do_setlink+0x82e/0xc90 [ 157.757777] ? __nla_validate_parse+0x12b/0x1e0 [ 157.758744] rtnl_setlink+0xd8/0x170 [ 157.759549] ? mod_objcg_state+0xcb/0x320 [ 157.760328] ? security_capable+0x37/0x60 [ 157.761209] ? security_capable+0x37/0x60 [ 157.762072] rtnetlink_rcv_msg+0x145/0x3d0 [ 157.762929] ? ___slab_alloc+0x327/0x610 [ 157.763754] ? __alloc_skb+0x141/0x170 [ 157.764533] ? __pfx_rtnetlink_rcv_msg+0x10/0x10 [ 157.765422] netlink_rcv_skb+0x58/0x110 [ 157.766229] netlink_unicast+0x21f/0x330 [ 157.766951] netlink_sendmsg+0x240/0x4a0 [ 157.767654] sock_sendmsg+0x93/0xa0 [ 157.768434] ? sockfd_lookup_light+0x12/0x70 [ 157.769245] __sys_sendto+0xfe/0x170 [ 157.770079] ? handle_mm_fault+0xe9/0x2d0 [ 157.770859] ? preempt_count_add+0x51/0xa0 [ 157.771645] ? up_read+0x3c/0x80 [ 157.772340] ? do_user_addr_fault+0x1e9/0x710 [ 157.773166] ? kvm_read_and_reset_apf_flags+0x49/0x60 [ 157.774087] __x64_sys_sendto+0x29/0x30 [ 157.774856] do_syscall_64+0x3c/0x90 [ 157.775518] entry_SYSCALL_64_after_hwframe+0x72/0xdc [ 157.776382] RIP: 0033:0x7f06122def70 Fixes: 18117a842ab0 ("virtio-net: remove xdp related info from page_to_skb()") Signed-off-by: Xuan Zhuo Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller commit 1a87e641d8a50c30b63b1d90819bc607b4327596 Author: Rob Herring Date: Tue Mar 14 14:18:27 2023 -0500 net: 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 Acked-by: Marc Kleine-Budde # for net/can Acked-by: Kalle Valo Acked-by: Nicolas Ferre Acked-by: Francois Romieu Reviewed-by: Wei Fang Signed-off-by: Rob Herring Signed-off-by: David S. Miller commit 65d63e82b19201a5b522ca4eb2d6dffe0b4b6a31 Merge: b830c96423868 7e9517375a14f Author: David S. Miller Date: Thu Mar 16 17:39:42 2023 +0000 Merge branch 'net-dsa-marvell-mtu-reporting' Vladimir Oltean says: ==================== Fix MTU reporting for Marvell DSA switches where we can't change it As explained in patch 2, the driver doesn't know how to change the MTU on MV88E6165, MV88E6191, MV88E6220, MV88E6250 and MV88E6290, and there is a regression where it actually reports an MTU value below the Ethernet standard (1500). Fixing that shows another issue where DSA is unprepared to be told that a switch supports an MTU of only 1500, and still errors out. That is addressed by patch 1. Testing was not done on "real" hardware, but on a different Marvell DSA switch, with code modified such that the driver doesn't know how to change the MTU on that, either. A key assumption is that these switches don't need any MTU configuration to pass full MTU-sized, DSA-tagged packets, which seems like a reasonable assumption to make. My 6390 and 6190 switches, with .port_set_jumbo_size commented out, certainly don't seem to have any problem passing MTU-sized traffic, as can be seen in this iperf3 session captured with tcpdump on the DSA master: $MAC > $MAC, Marvell DSA mode Forward, dev 2, port 8, untagged, VID 1000, FPri 0, ethertype IPv4 (0x0800), length 1518: 10.0.0.69.49590 > 10.0.0.1.5201: Flags [.], seq 81088:82536, ack 1, win 502, options [nop,nop,TS val 2221498829 ecr 3012859850], length 1448 I don't want to go all the way and say that the adjustment made by commit b9c587fed61c ("dsa: mv88e6xxx: Include tagger overhead when setting MTU for DSA and CPU ports") is completely unnecessary, just that there's an equally good chance that the switches with unknown MTU configuration procedure "just work". ==================== Signed-off-by: David S. Miller commit 7e9517375a14f44ee830ca1c3278076dd65fcc8f Author: Vladimir Oltean Date: Tue Mar 14 20:24:05 2023 +0200 net: dsa: mv88e6xxx: fix max_mtu of 1492 on 6165, 6191, 6220, 6250, 6290 There are 3 classes of switch families that the driver is aware of, as far as mv88e6xxx_change_mtu() is concerned: - MTU configuration is available per port. Here, the chip->info->ops->port_set_jumbo_size() method will be present. - MTU configuration is global to the switch. Here, the chip->info->ops->set_max_frame_size() method will be present. - We don't know how to change the MTU. Here, none of the above methods will be present. Switch families MV88E6165, MV88E6191, MV88E6220, MV88E6250 and MV88E6290 fall in category 3. The blamed commit has adjusted the MTU for all 3 categories by EDSA_HLEN (8 bytes), resulting in a new maximum MTU of 1492 being reported by the driver for these switches. I don't have the hardware to test, but I do have a MV88E6390 switch on which I can simulate this by commenting out its .port_set_jumbo_size definition from mv88e6390_ops. The result is this set of messages at probe time: mv88e6085 d0032004.mdio-mii:10: nonfatal error -34 setting MTU to 1500 on port 1 mv88e6085 d0032004.mdio-mii:10: nonfatal error -34 setting MTU to 1500 on port 2 mv88e6085 d0032004.mdio-mii:10: nonfatal error -34 setting MTU to 1500 on port 3 mv88e6085 d0032004.mdio-mii:10: nonfatal error -34 setting MTU to 1500 on port 4 mv88e6085 d0032004.mdio-mii:10: nonfatal error -34 setting MTU to 1500 on port 5 mv88e6085 d0032004.mdio-mii:10: nonfatal error -34 setting MTU to 1500 on port 6 mv88e6085 d0032004.mdio-mii:10: nonfatal error -34 setting MTU to 1500 on port 7 mv88e6085 d0032004.mdio-mii:10: nonfatal error -34 setting MTU to 1500 on port 8 It is highly implausible that there exist Ethernet switches which don't support the standard MTU of 1500 octets, and this is what the DSA framework says as well - the error comes from dsa_slave_create() -> dsa_slave_change_mtu(slave_dev, ETH_DATA_LEN). But the error messages are alarming, and it would be good to suppress them. As a consequence of this unlikeliness, we reimplement mv88e6xxx_get_max_mtu() and mv88e6xxx_change_mtu() on switches from the 3rd category as follows: the maximum supported MTU is 1500, and any request to set the MTU to a value larger than that fails in dev_validate_mtu(). Fixes: b9c587fed61c ("dsa: mv88e6xxx: Include tagger overhead when setting MTU for DSA and CPU ports") Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 636e8adf7878eab3614250234341bde45537f47a Author: Vladimir Oltean Date: Tue Mar 14 20:24:04 2023 +0200 net: dsa: don't error out when drivers return ETH_DATA_LEN in .port_max_mtu() Currently, when dsa_slave_change_mtu() is called on a user port where dev->max_mtu is 1500 (as returned by ds->ops->port_max_mtu()), the code will stumble upon this check: if (new_master_mtu > mtu_limit) return -ERANGE; because new_master_mtu is adjusted for the tagger overhead but mtu_limit is not. But it would be good if the logic went through, for example if the DSA master really depends on an MTU adjustment to accept DSA-tagged frames. To make the code pass through the check, we need to adjust mtu_limit for the overhead as well, if the minimum restriction was caused by the DSA user port's MTU (dev->max_mtu). A DSA user port MTU and a DSA master MTU are always offset by the protocol overhead. Currently no drivers return 1500 .port_max_mtu(), but this is only temporary and a bug in itself - mv88e6xxx should have done that, but since commit b9c587fed61c ("dsa: mv88e6xxx: Include tagger overhead when setting MTU for DSA and CPU ports") it no longer does. This is a preparation for fixing that. Fixes: bfcb813203e6 ("net: dsa: configure the MTU for switch ports") Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit d3aa3e060c4a80827eb801fc448debc9daa7c46b Author: Jiasheng Jiang Date: Thu Mar 16 14:55:06 2023 +0800 dm stats: check for and propagate alloc_percpu failure Check alloc_precpu()'s return value and return an error from dm_stats_init() if it fails. Update alloc_dev() to fail if dm_stats_init() does. Otherwise, a NULL pointer dereference will occur in dm_stats_cleanup() even if dm-stats isn't being actively used. Fixes: fd2ed4d25270 ("dm: add statistics support") Cc: stable@vger.kernel.org Signed-off-by: Jiasheng Jiang Signed-off-by: Mike Snitzer commit b830c9642386867863ac64295185f896ff2928ac Author: Maciej Fijalkowski Date: Tue Mar 14 10:45:43 2023 -0700 ice: xsk: disable txq irq before flushing hw ice_qp_dis() intends to stop a given queue pair that is a target of xsk pool attach/detach. One of the steps is to disable interrupts on these queues. It currently is broken in a way that txq irq is turned off *after* HW flush which in turn takes no effect. ice_qp_dis(): -> ice_qvec_dis_irq() --> disable rxq irq --> flush hw -> ice_vsi_stop_tx_ring() -->disable txq irq Below splat can be triggered by following steps: - start xdpsock WITHOUT loading xdp prog - run xdp_rxq_info with XDP_TX action on this interface - start traffic - terminate xdpsock [ 256.312485] BUG: kernel NULL pointer dereference, address: 0000000000000018 [ 256.319560] #PF: supervisor read access in kernel mode [ 256.324775] #PF: error_code(0x0000) - not-present page [ 256.329994] PGD 0 P4D 0 [ 256.332574] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 256.337006] CPU: 3 PID: 32 Comm: ksoftirqd/3 Tainted: G OE 6.2.0-rc5+ #51 [ 256.345218] Hardware name: Intel Corporation S2600WFT/S2600WFT, BIOS SE5C620.86B.02.01.0008.031920191559 03/19/2019 [ 256.355807] RIP: 0010:ice_clean_rx_irq_zc+0x9c/0x7d0 [ice] [ 256.361423] Code: b7 8f 8a 00 00 00 66 39 ca 0f 84 f1 04 00 00 49 8b 47 40 4c 8b 24 d0 41 0f b7 45 04 66 25 ff 3f 66 89 04 24 0f 84 85 02 00 00 <49> 8b 44 24 18 0f b7 14 24 48 05 00 01 00 00 49 89 04 24 49 89 44 [ 256.380463] RSP: 0018:ffffc900088bfd20 EFLAGS: 00010206 [ 256.385765] RAX: 000000000000003c RBX: 0000000000000035 RCX: 000000000000067f [ 256.393012] RDX: 0000000000000775 RSI: 0000000000000000 RDI: ffff8881deb3ac80 [ 256.400256] RBP: 000000000000003c R08: ffff889847982710 R09: 0000000000010000 [ 256.407500] R10: ffffffff82c060c0 R11: 0000000000000004 R12: 0000000000000000 [ 256.414746] R13: ffff88811165eea0 R14: ffffc9000d255000 R15: ffff888119b37600 [ 256.421990] FS: 0000000000000000(0000) GS:ffff8897e0cc0000(0000) knlGS:0000000000000000 [ 256.430207] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 256.436036] CR2: 0000000000000018 CR3: 0000000005c0a006 CR4: 00000000007706e0 [ 256.443283] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 256.450527] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 256.457770] PKRU: 55555554 [ 256.460529] Call Trace: [ 256.463015] [ 256.465157] ? ice_xmit_zc+0x6e/0x150 [ice] [ 256.469437] ice_napi_poll+0x46d/0x680 [ice] [ 256.473815] ? _raw_spin_unlock_irqrestore+0x1b/0x40 [ 256.478863] __napi_poll+0x29/0x160 [ 256.482409] net_rx_action+0x136/0x260 [ 256.486222] __do_softirq+0xe8/0x2e5 [ 256.489853] ? smpboot_thread_fn+0x2c/0x270 [ 256.494108] run_ksoftirqd+0x2a/0x50 [ 256.497747] smpboot_thread_fn+0x1c1/0x270 [ 256.501907] ? __pfx_smpboot_thread_fn+0x10/0x10 [ 256.506594] kthread+0xea/0x120 [ 256.509785] ? __pfx_kthread+0x10/0x10 [ 256.513597] ret_from_fork+0x29/0x50 [ 256.517238] In fact, irqs were not disabled and napi managed to be scheduled and run while xsk_pool pointer was still valid, but SW ring of xdp_buff pointers was already freed. To fix this, call ice_qvec_dis_irq() after ice_vsi_stop_tx_ring(). Also while at it, remove redundant ice_clean_rx_ring() call - this is handled in ice_qp_clean_rings(). Fixes: 2d4238f55697 ("ice: Add support for AF_XDP") Signed-off-by: Maciej Fijalkowski Reviewed-by: Larysa Zaremba Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Acked-by: John Fastabend Signed-off-by: Tony Nguyen Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller commit 1a200b51fa75100d24861511ccdb105321291b75 Merge: cd356010ce4c6 7e699d2a4e810 Author: David S. Miller Date: Thu Mar 16 17:28:23 2023 +0000 Merge branch 'net-virtio-vsock' commit 7e699d2a4e8104d304e921ac5e0a0c73f0f7b623 Author: Arseniy Krasnov Date: Tue Mar 14 14:09:27 2023 +0300 test/vsock: copy to user failure test This adds SOCK_STREAM and SOCK_SEQPACKET tests for invalid buffer case. It tries to read data to NULL buffer (data already presents in socket's queue), then uses valid buffer. For SOCK_STREAM second read must return data, because skbuff is not dropped, but for SOCK_SEQPACKET skbuff will be dropped by kernel, and 'recv()' will return EAGAIN. Signed-off-by: Arseniy Krasnov Reviewed-by: Stefano Garzarella Signed-off-by: David S. Miller commit 8daaf39f7f6ef53a11817f6a11ec104016c3545f Author: Arseniy Krasnov Date: Tue Mar 14 14:08:20 2023 +0300 virtio/vsock: don't drop skbuff on copy failure This returns behaviour of SOCK_STREAM read as before skbuff usage. When copying to user fails current skbuff won't be dropped, but returned to sockets's queue. Technically instead of 'skb_dequeue()', 'skb_peek()' is called and when skbuff becomes empty, it is removed from queue by '__skb_unlink()'. Fixes: 71dc9ec9ac7d ("virtio/vsock: replace virtio_vsock_pkt with sk_buff") Signed-off-by: Arseniy Krasnov Reviewed-by: Stefano Garzarella Acked-by: Bobby Eshleman Signed-off-by: David S. Miller commit 6825e6b4f8e53799d83bc39ca6ec5baed4e2adde Author: Arseniy Krasnov Date: Tue Mar 14 14:06:53 2023 +0300 virtio/vsock: remove redundant 'skb_pull()' call Since we now no longer use 'skb->len' to update credit, there is no sense to update skbuff state, because it is used only once after dequeue to copy data and then will be released. Fixes: 71dc9ec9ac7d ("virtio/vsock: replace virtio_vsock_pkt with sk_buff") Signed-off-by: Arseniy Krasnov Reviewed-by: Stefano Garzarella Acked-by: Bobby Eshleman Signed-off-by: David S. Miller commit 077706165717686a2a6a71405fef036cd5b37ae0 Author: Arseniy Krasnov Date: Tue Mar 14 14:05:48 2023 +0300 virtio/vsock: don't use skbuff state to account credit 'skb->len' can vary when we partially read the data, this complicates the calculation of credit to be updated in 'virtio_transport_inc_rx_pkt()/ virtio_transport_dec_rx_pkt()'. Also in 'virtio_transport_dec_rx_pkt()' we were miscalculating the credit since 'skb->len' was redundant. For these reasons, let's replace the use of skbuff state to calculate new 'rx_bytes'/'fwd_cnt' values with explicit value as input argument. This makes code more simple, because it is not needed to change skbuff state before each call to update 'rx_bytes'/'fwd_cnt'. Fixes: 71dc9ec9ac7d ("virtio/vsock: replace virtio_vsock_pkt with sk_buff") Signed-off-by: Arseniy Krasnov Reviewed-by: Stefano Garzarella Acked-by: Bobby Eshleman Signed-off-by: David S. Miller commit 6de4b1ab470fe52351415217ac6dffddee571c45 Author: Darrick J. Wong Date: Fri Mar 10 13:42:08 2023 -0800 xfs: try to idiot-proof the allocators In porting his development branch to 6.3-rc1, yours truly has repeatedly screwed up the args->pag being fed to the xfs_alloc_vextent* functions. Add some debugging assertions to test the preconditions required of the callers. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 748b2f5e82d17480404b3e2895388fc2925f7caf Author: Harshit Mogalapalli Date: Mon Mar 6 11:18:24 2023 -0800 ca8210: Fix unsigned mac_len comparison with zero in ca8210_skb_tx() mac_len is of type unsigned, which can never be less than zero. mac_len = ieee802154_hdr_peek_addrs(skb, &header); if (mac_len < 0) return mac_len; Change this to type int as ieee802154_hdr_peek_addrs() can return negative integers, this is found by static analysis with smatch. Fixes: 6c993779ea1d ("ca8210: fix mac_len negative array access") Signed-off-by: Harshit Mogalapalli Acked-by: Alexander Aring Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230306191824.4115839-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Stefan Schmidt commit 2b4cc3d3f4d8ec42961e98568a0afeee96a943ab Author: AKASHI Takahiro Date: Tue Mar 7 15:45:31 2023 +0900 igc: fix the validation logic for taprio's gate list The check introduced in the commit a5fd39464a40 ("igc: Lift TAPRIO schedule restriction") can detect a false positive error in some corner case. For instance, tc qdisc replace ... taprio num_tc 4 ... sched-entry S 0x01 100000 # slot#1 sched-entry S 0x03 100000 # slot#2 sched-entry S 0x04 100000 # slot#3 sched-entry S 0x08 200000 # slot#4 flags 0x02 # hardware offload Here the queue#0 (the first queue) is on at the slot#1 and #2, and off at the slot#3 and #4. Under the current logic, when the slot#4 is examined, validate_schedule() returns *false* since the enablement count for the queue#0 is two and it is already off at the previous slot (i.e. #3). But this definition is truely correct. Let's fix the logic to enforce a strict validation for consecutively-opened slots. Fixes: a5fd39464a40 ("igc: Lift TAPRIO schedule restriction") Signed-off-by: AKASHI Takahiro Reviewed-by: Kurt Kanzenbach Acked-by: Vinicius Costa Gomes Tested-by: Naama Meir Signed-off-by: Tony Nguyen commit 02c83791ef969c6a8a150b4927193d0d0e50fb23 Author: Akihiko Odaki Date: Thu Dec 1 19:20:03 2022 +0900 igbvf: Regard vf reset nack as success vf reset nack actually represents the reset operation itself is performed but no address is assigned. Therefore, e1000_reset_hw_vf should fill the "perm_addr" with the zero address and return success on such an occasion. This prevents its callers in netdev.c from saying PF still resetting, and instead allows them to correctly report that no address is assigned. Fixes: 6ddbc4cf1f4d ("igb: Indicate failure on vf reset for empty mac address") Signed-off-by: Akihiko Odaki Reviewed-by: Leon Romanovsky Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit 85eb39bb39cbb5c086df1e19ba67cc1366693a77 Author: Gaosheng Cui Date: Tue Nov 22 10:28:52 2022 +0800 intel/igbvf: free irq on the error path in igbvf_request_msix() In igbvf_request_msix(), irqs have not been freed on the err path, we need to free it. Fix it. Fixes: d4e0fe01a38a ("igbvf: add new driver to support 82576 virtual functions") Signed-off-by: Gaosheng Cui Reviewed-by: Maciej Fijalkowski Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit 50f303496d92e25b79bdfb73e3707ad0684ad67f Author: Akihiko Odaki Date: Tue Nov 22 18:28:03 2022 +0900 igb: Enable SR-IOV after reinit Enabling SR-IOV causes the virtual functions to make requests to the PF via the mailbox. Notably, E1000_VF_RESET request will happen during the initialization of the VF. However, unless the reinit is done, the VMMB interrupt, which delivers mailbox interrupt from VF to PF will be kept masked and such requests will be silently ignored. Enable SR-IOV at the very end of the procedure to configure the device for SR-IOV so that the PF is configured properly for SR-IOV when a VF is activated. Fixes: fa44f2f185f7 ("igb: Enable SR-IOV configuration via PCI sysfs interface") Signed-off-by: Akihiko Odaki Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit 65f69851e44d71248b952a687e44759a7abb5016 Author: Lin Ma Date: Tue Mar 7 23:29:17 2023 +0800 igb: revert rtnl_lock() that causes deadlock The commit 6faee3d4ee8b ("igb: Add lock to avoid data race") adds rtnl_lock to eliminate a false data race shown below (FREE from device detaching) | (USE from netdev core) igb_remove | igb_ndo_get_vf_config igb_disable_sriov | vf >= adapter->vfs_allocated_count? kfree(adapter->vf_data) | adapter->vfs_allocated_count = 0 | | memcpy(... adapter->vf_data[vf] The above race will never happen and the extra rtnl_lock causes deadlock below [ 141.420169] [ 141.420672] __schedule+0x2dd/0x840 [ 141.421427] schedule+0x50/0xc0 [ 141.422041] schedule_preempt_disabled+0x11/0x20 [ 141.422678] __mutex_lock.isra.13+0x431/0x6b0 [ 141.423324] unregister_netdev+0xe/0x20 [ 141.423578] igbvf_remove+0x45/0xe0 [igbvf] [ 141.423791] pci_device_remove+0x36/0xb0 [ 141.423990] device_release_driver_internal+0xc1/0x160 [ 141.424270] pci_stop_bus_device+0x6d/0x90 [ 141.424507] pci_stop_and_remove_bus_device+0xe/0x20 [ 141.424789] pci_iov_remove_virtfn+0xba/0x120 [ 141.425452] sriov_disable+0x2f/0xf0 [ 141.425679] igb_disable_sriov+0x4e/0x100 [igb] [ 141.426353] igb_remove+0xa0/0x130 [igb] [ 141.426599] pci_device_remove+0x36/0xb0 [ 141.426796] device_release_driver_internal+0xc1/0x160 [ 141.427060] driver_detach+0x44/0x90 [ 141.427253] bus_remove_driver+0x55/0xe0 [ 141.427477] pci_unregister_driver+0x2a/0xa0 [ 141.428296] __x64_sys_delete_module+0x141/0x2b0 [ 141.429126] ? mntput_no_expire+0x4a/0x240 [ 141.429363] ? syscall_trace_enter.isra.19+0x126/0x1a0 [ 141.429653] do_syscall_64+0x5b/0x80 [ 141.429847] ? exit_to_user_mode_prepare+0x14d/0x1c0 [ 141.430109] ? syscall_exit_to_user_mode+0x12/0x30 [ 141.430849] ? do_syscall_64+0x67/0x80 [ 141.431083] ? syscall_exit_to_user_mode_prepare+0x183/0x1b0 [ 141.431770] ? syscall_exit_to_user_mode+0x12/0x30 [ 141.432482] ? do_syscall_64+0x67/0x80 [ 141.432714] ? exc_page_fault+0x64/0x140 [ 141.432911] entry_SYSCALL_64_after_hwframe+0x72/0xdc Since the igb_disable_sriov() will call pci_disable_sriov() before releasing any resources, the netdev core will synchronize the cleanup to avoid any races. This patch removes the useless rtnl_(un)lock to guarantee correctness. CC: stable@vger.kernel.org Fixes: 6faee3d4ee8b ("igb: Add lock to avoid data race") Reported-by: Corinna Vinschen Link: https://lore.kernel.org/intel-wired-lan/ZAcJvkEPqWeJHO2r@calimero.vinschen.de/ Signed-off-by: Lin Ma Tested-by: Corinna Vinschen Reviewed-by: Jacob Keller Reviewed-by: Simon Horman Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit 964290ff32d132bf971d45b29f7de39756dab7c8 Author: Ahmed Zaki Date: Wed Mar 15 13:59:25 2023 -0600 iavf: do not track VLAN 0 filters When an interface with the maximum number of VLAN filters is brought up, a spurious error is logged: [257.483082] 8021q: adding VLAN 0 to HW filter on device enp0s3 [257.483094] iavf 0000:00:03.0 enp0s3: Max allowed VLAN filters 8. Remove existing VLANs or disable filtering via Ethtool if supported. The VF driver complains that it cannot add the VLAN 0 filter. On the other hand, the PF driver always adds VLAN 0 filter on VF initialization. The VF does not need to ask the PF for that filter at all. Fix the error by not tracking VLAN 0 filters altogether. With that, the check added by commit 0e710a3ffd0c ("iavf: Fix VF driver counting VLAN 0 filters") in iavf_virtchnl.c is useless and might be confusing if left as it suggests that we track VLAN 0. Fixes: 0e710a3ffd0c ("iavf: Fix VF driver counting VLAN 0 filters") Signed-off-by: Ahmed Zaki Reviewed-by: Michal Kubiak Signed-off-by: Tony Nguyen commit de58647b4301fe181f9c38e8b46f7021584ae427 Author: Alexander Lobakin Date: Wed Mar 1 12:59:08 2023 +0100 iavf: fix non-tunneled IPv6 UDP packet type and hashing Currently, IAVF's decode_rx_desc_ptype() correctly reports payload type of L4 for IPv4 UDP packets and IPv{4,6} TCP, but only L3 for IPv6 UDP. Originally, i40e, ice and iavf were affected. Commit 73df8c9e3e3d ("i40e: Correct UDP packet header for non_tunnel-ipv6") fixed that in i40e, then commit 638a0c8c8861 ("ice: fix incorrect payload indicator on PTYPE") fixed that for ice. IPv6 UDP is L4 obviously. Fix it and make iavf report correct L4 hash type for such packets, so that the stack won't calculate it on CPU when needs it. Fixes: 206812b5fccb ("i40e/i40evf: i40e implementation for skb_set_hash") Reviewed-by: Larysa Zaremba Reviewed-by: Michal Kubiak Signed-off-by: Alexander Lobakin Tested-by: Rafal Romanowski Reviewed-by: Leon Romanovsky Signed-off-by: Tony Nguyen commit 32d57f667f871bc5a8babbe27ea4c5e668ee0ea8 Author: Alexander Lobakin Date: Wed Mar 1 12:59:07 2023 +0100 iavf: fix inverted Rx hash condition leading to disabled hash Condition, which checks whether the netdev has hashing enabled is inverted. Basically, the tagged commit effectively disabled passing flow hash from descriptor to skb, unless user *disables* it via Ethtool. Commit a876c3ba59a6 ("i40e/i40evf: properly report Rx packet hash") fixed this problem, but only for i40e. Invert the condition now in iavf and unblock passing hash to skbs again. Fixes: 857942fd1aa1 ("i40e: Fix Rx hash reported to the stack by our driver") Reviewed-by: Larysa Zaremba Reviewed-by: Michal Kubiak Signed-off-by: Alexander Lobakin Tested-by: Rafal Romanowski Reviewed-by: Leon Romanovsky Signed-off-by: Tony Nguyen commit 8f0d196e4dc137470bbd5de98278d941c8002fcb Author: Lukas Bulwahn Date: Thu Mar 16 12:16:30 2023 +0100 block: remove obsolete config BLOCK_COMPAT Before commit bdc1ddad3e5f ("compat_ioctl: block: move blkdev_compat_ioctl() into ioctl.c"), the config BLOCK_COMPAT was used to include compat_ioctl.c into the kernel build. With this commit, the code is moved into ioctl.c and included with the config COMPAT. So, since then, the config BLOCK_COMPAT has no effect and any further purpose. Remove this obsolete config BLOCK_COMPAT. Signed-off-by: Lukas Bulwahn Reviewed-by: Christoph Hellwig Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230316111630.4897-1-lukas.bulwahn@gmail.com Signed-off-by: Jens Axboe commit d2acf789088bb562cea342b6a24e646df4d47839 Author: Pavel Begunkov Date: Thu Mar 16 15:26:05 2023 +0000 io_uring/rsrc: fix folio accounting | BUG: Bad page state in process kworker/u8:0 pfn:5c001 | page:00000000bfda61c8 refcount:0 mapcount:0 mapping:0000000000000000 index:0x20001 pfn:0x5c001 | head:0000000011409842 order:9 entire_mapcount:0 nr_pages_mapped:0 pincount:1 | anon flags: 0x3fffc00000b0004(uptodate|head|mappedtodisk|swapbacked|node=0|zone=0|lastcpupid=0xffff) | raw: 03fffc0000000000 fffffc0000700001 ffffffff00700903 0000000100000000 | raw: 0000000000000200 0000000000000000 00000000ffffffff 0000000000000000 | head: 03fffc00000b0004 dead000000000100 dead000000000122 ffff00000a809dc1 | head: 0000000000020000 0000000000000000 00000000ffffffff 0000000000000000 | page dumped because: nonzero pincount | CPU: 3 PID: 9 Comm: kworker/u8:0 Not tainted 6.3.0-rc2-00001-gc6811bf0cd87 #1 | Hardware name: linux,dummy-virt (DT) | Workqueue: events_unbound io_ring_exit_work | Call trace: | dump_backtrace+0x13c/0x208 | show_stack+0x34/0x58 | dump_stack_lvl+0x150/0x1a8 | dump_stack+0x20/0x30 | bad_page+0xec/0x238 | free_tail_pages_check+0x280/0x350 | free_pcp_prepare+0x60c/0x830 | free_unref_page+0x50/0x498 | free_compound_page+0xcc/0x100 | free_transhuge_page+0x1f0/0x2b8 | destroy_large_folio+0x80/0xc8 | __folio_put+0xc4/0xf8 | gup_put_folio+0xd0/0x250 | unpin_user_page+0xcc/0x128 | io_buffer_unmap+0xec/0x2c0 | __io_sqe_buffers_unregister+0xa4/0x1e0 | io_ring_exit_work+0x68c/0x1188 | process_one_work+0x91c/0x1a58 | worker_thread+0x48c/0xe30 | kthread+0x278/0x2f0 | ret_from_fork+0x10/0x20 Mark reports an issue with the recent patches coalescing compound pages while registering them in io_uring. The reason is that we try to drop excessive references with folio_put_refs(), but pages were acquired with pin_user_pages(), which has extra accounting and so should be put down with matching unpin_user_pages() or at least gup_put_folio(). As a fix unpin_user_pages() all but first page instead, and let's figure out a better API after. Fixes: 57bebf807e2abcf8 ("io_uring/rsrc: optimise registered huge pages") Reported-by: Mark Rutland Reviewed-by: Jens Axboe Tested-by: Jens Axboe Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/10efd5507d6d1f05ea0f3c601830e08767e189bd.1678980230.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 29413f05fe34e8824551b91f660fde781249417d Author: Rob Herring Date: Fri Mar 10 08:47:29 2023 -0600 fbdev: 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: Helge Deller commit 44a3b36b42acfc433aaaf526191dd12fbb919fdb Author: Wei Chen Date: Wed Mar 15 09:22:54 2023 +0000 fbdev: au1200fb: Fix potential divide by zero var->pixclock can be assigned to zero by user. Without proper check, divide by zero would occur when invoking macro PICOS2KHZ in au1200fb_fb_check_var. Error out if var->pixclock is zero. Signed-off-by: Wei Chen Signed-off-by: Helge Deller commit 61ac4b86a4c047c20d5cb423ddd87496f14d9868 Author: Wei Chen Date: Wed Mar 15 09:05:18 2023 +0000 fbdev: lxfb: Fix potential divide by zero var->pixclock can be assigned to zero by user. Without proper check, divide by zero would occur in lx_set_clock. Error out if var->pixclock is zero. Signed-off-by: Wei Chen Signed-off-by: Helge Deller commit d823685486a3446d061fed7c7d2f80af984f119a Author: Wei Chen Date: Wed Mar 15 08:33:47 2023 +0000 fbdev: intelfb: Fix potential divide by zero Variable var->pixclock is controlled by user and can be assigned to zero. Without proper check, divide by zero would occur in intelfbhw_validate_mode and intelfbhw_mode_to_hw. Error out if var->pixclock is zero. Signed-off-by: Wei Chen Signed-off-by: Helge Deller commit 92e2a00f2987483e1f9253625828622edd442e61 Author: Wei Chen Date: Wed Mar 15 07:18:31 2023 +0000 fbdev: nvidia: Fix potential divide by zero variable var->pixclock can be set by user. In case it equals to zero, divide by zero would occur in nvidiafb_set_par. Similar crashes have happened in other fbdev drivers. There is no check and modification on var->pixclock along the call chain to nvidia_check_var and nvidiafb_set_par. We believe it could also be triggered in driver nvidia from user site. Signed-off-by: Wei Chen Signed-off-by: Helge Deller commit 203873a535d627c668f293be0cb73e26c30f9cc7 Author: Helge Deller Date: Thu Mar 16 11:38:19 2023 +0100 fbdev: stifb: Provide valid pixelclock and add fb_check_var() checks Find a valid modeline depending on the machine graphic card configuration and add the fb_check_var() function to validate Xorg provided graphics settings. Signed-off-by: Helge Deller Cc: stable@vger.kernel.org commit c7df4813b149362248d6ef7be41a311e27bf75fe Author: Kal Conley Date: Wed Mar 8 18:40:13 2023 +0100 xsk: Add missing overflow check in xdp_umem_reg The number of chunks can overflow u32. Make sure to return -EINVAL on overflow. Also remove a redundant u32 cast assigning umem->npgs. Fixes: bbff2f321a86 ("xsk: new descriptor addressing scheme") Signed-off-by: Kal Conley Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/20230308174013.1114745-1-kal.conley@dectris.com commit 05e96e96a315fa49faca4da2aedd1761a218b616 Author: Masahiro Yamada Date: Thu Mar 16 00:50:18 2023 +0900 kbuild: use git-archive for source package creation Commit 5c3d1d0abb12 ("kbuild: add a tool to list files ignored by git") added a new tool, scripts/list-gitignored. My intention was to create source packages without cleaning the source tree, without relying on git. Linus strongly objected to it, and suggested using 'git archive' instead. [1] [2] [3] This commit goes in that direction - Remove scripts/list-gitignored.c and rewrites Makefiles and scripts to use 'git archive' for building Debian and RPM source packages. It also makes 'make perf-tar*-src-pkg' use 'git archive' again. Going forward, building source packages is only possible in a git-managed tree. Building binary packages does not require git. [1]: https://lore.kernel.org/lkml/CAHk-=wi49sMaC7vY1yMagk7eqLK=1jHeHQ=yZ_k45P=xBccnmA@mail.gmail.com/ [2]: https://lore.kernel.org/lkml/CAHk-=wh5AixGsLeT0qH2oZHKq0FLUTbyTw4qY921L=PwYgoGVw@mail.gmail.com/ [3]: https://lore.kernel.org/lkml/CAHk-=wgM-W6Fu==EoAVCabxyX8eYBz9kNC88-tm9ExRQwA79UQ@mail.gmail.com/ Fixes: 5c3d1d0abb12 ("kbuild: add a tool to list files ignored by git") Fixes: e0ca16749ac3 ("kbuild: make perf-tar*-src-pkg work without relying on git") Suggested-by: Linus Torvalds Signed-off-by: Masahiro Yamada commit 81f59a26f3d59c6aeb137b7b5546848779222c65 Author: Masahiro Yamada Date: Thu Mar 16 00:50:17 2023 +0900 kbuild: rpm-pkg: move source components to rpmbuild/SOURCES Prepare to add more files to the source RPM. Also, fix the build error when KCONFIG_CONFIG is set: error: Bad file: ./.config: No such file or directory Signed-off-by: Masahiro Yamada commit 5da28edd7bd5518f97175ecea77615bb729a7a28 Author: Pavel Begunkov Date: Thu Mar 16 12:11:42 2023 +0000 io_uring/msg_ring: let target know allocated index msg_ring requests transferring files support auto index selection via IORING_FILE_INDEX_ALLOC, however they don't return the selected index to the target ring and there is no other good way for the userspace to know where is the receieved file. Return the index for allocated slots and 0 otherwise, which is consistent with other fixed file installing requests. Cc: stable@vger.kernel.org # v6.0+ Fixes: e6130eba8a848 ("io_uring: add support for passing fixed file descriptors") Signed-off-by: Pavel Begunkov Link: https://github.com/axboe/liburing/issues/809 Signed-off-by: Jens Axboe commit 890a2fb06eb9af88b16f18840bf0b4dddc08b53d Merge: 23e5b9307ede2 6173a77b7e9d3 Author: Jens Axboe Date: Thu Mar 16 07:01:48 2023 -0600 Merge tag 'nvme-6.3-2022-03-16' of git://git.infradead.org/nvme into block-6.3 Pull NVMe fixes from Christoph: "nvme fixes for Linux 6.3 - avoid potential UAF in nvmet_req_complete (Damien Le Moal) - more quirks (Elmer Miroslav Mosher Golovin, Philipp Geulen) - fix a memory leak in the nvme-pci probe teardown path (Irvin Cote) - repair the MAINTAINERS entry (Lukas Bulwahn) - fix handling single range discard request (Ming Lei) - show more opcode names in trace events (Minwoo Im) - fix nvme-tcp timeout reporting (Sagi Grimberg)" * tag 'nvme-6.3-2022-03-16' of git://git.infradead.org/nvme: nvmet: avoid potential UAF in nvmet_req_complete() nvme-trace: show more opcode names nvme-tcp: add nvme-tcp pdu size build protection nvme-tcp: fix opcode reporting in the timeout handler nvme-pci: add NVME_QUIRK_BOGUS_NID for Lexar NM620 nvme-pci: add NVME_QUIRK_BOGUS_NID for Netac NV3000 nvme-pci: fixing memory leak in probe teardown path nvme: fix handling single range discard request MAINTAINERS: repair malformed T: entries in NVM EXPRESS DRIVERS commit bbf860ed710bacc0279c4cda2817f70e1200d04b Author: Andy Shevchenko Date: Mon Mar 13 17:45:22 2023 +0200 usb: gadget: Use correct endianness of the wLength field for WebUSB WebUSB code uses wLength directly without proper endianness conversion. Update it to use already prepared temporary variable w_length instead. Fixes: 93c473948c58 ("usb: gadget: add WebUSB landing page support") Signed-off-by: Andy Shevchenko Tested-By: Jó Ágila Bitsch Link: https://lore.kernel.org/r/20230313154522.52684-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit a37eb61b6ec064ac794b8a1e89fd33eb582fe51d Author: Yaroslav Furman Date: Sun Mar 12 11:07:45 2023 +0200 uas: Add US_FL_NO_REPORT_OPCODES for JMicron JMS583Gen 2 Just like other JMicron JMS5xx enclosures, it chokes on report-opcodes, let's avoid them. Signed-off-by: Yaroslav Furman Cc: stable Link: https://lore.kernel.org/r/20230312090745.47962-1-yaro330@gmail.com Signed-off-by: Greg Kroah-Hartman commit 96b96b2a567fb34dd41c87e6cf01f6902ce8cae4 Author: Pawel Laszczak Date: Thu Mar 9 01:30:48 2023 -0500 usb: cdnsp: changes PCI Device ID to fix conflict with CNDS3 driver Patch changes CDNS_DEVICE_ID in USBSSP PCI Glue driver to remove the conflict with Cadence USBSS driver. cc: Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver") Signed-off-by: Pawel Laszczak Link: https://lore.kernel.org/r/20230309063048.299378-1-pawell@cadence.com Signed-off-by: Greg Kroah-Hartman commit 1272fd652a226ccb34e9f47371b6121948048438 Author: Pawel Laszczak Date: Wed Mar 8 07:44:27 2023 -0500 usb: cdns3: Fix issue with using incorrect PCI device function PCI based platform can have more than two PCI functions. USBSS PCI Glue driver during initialization should consider only DRD/HOST/DEVICE PCI functions and all other should be ignored. This patch adds additional condition which causes that only DRD and HOST/DEVICE function will be accepted. cc: Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") Signed-off-by: Pawel Laszczak Link: https://lore.kernel.org/r/20230308124427.311245-1-pawell@cadence.com Signed-off-by: Greg Kroah-Hartman commit 5bc38d33a5a1209fd4de65101d1ae8255ea12c6e Author: Pawel Laszczak Date: Tue Mar 7 06:14:20 2023 -0500 usb: cdnsp: Fixes issue with redundant Status Stage In some cases, driver trees to send Status Stage twice. The first one from upper layer of gadget usb subsystem and second time from controller driver. This patch fixes this issue and remove tricky handling of SET_INTERFACE from controller driver which is no longer needed. cc: Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver") Signed-off-by: Pawel Laszczak Link: https://lore.kernel.org/r/20230307111420.376056-1-pawell@cadence.com Signed-off-by: Greg Kroah-Hartman commit c3aa32ac86fe5f27659f07474995ec743a3251b0 Author: Hongren Zheng Date: Thu Mar 16 01:31:53 2023 +0800 MAINTAINERS: make me a reviewer of USB/IP I think I am familiar enough with USB/IP 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. I had some contributions to USBIP and some support for it. Contribution: Commit 17af79321 ("docs: usbip: Fix major fields and descriptions in protocol") Commit b737eecd4 ("usbip: tools: add options and examples in man page related to device mode") Commit a58977b2f ("usbip: tools: add usage of device mode in usbip_list.c") Support: Commit 8f36b3b4e1 ("usbip: add USBIP_URB_* URB transfer flags") Bug report: https://lore.kernel.org/lkml/ZBHxfUX60EyCMw5l@Sun/ I also have implemented a userspace usbip server in https://github.com/canokeys/canokey-usbip and maintain a list of usbip implementations https://github.com/usbip/implementations Signed-off-by: Hongren (Zenithal) Zheng Acked-by: Shuah Khan Link: https://lore.kernel.org/r/ZBIBCRiFGSqQcOon@Sun Signed-off-by: Greg Kroah-Hartman commit cbebd68f59f03633469f3ecf9bea99cd6cce3854 Author: Nikita Zhandarovich Date: Mon Mar 6 08:06:56 2023 -0800 x86/mm: Fix use of uninitialized buffer in sme_enable() cmdline_find_option() may fail before doing any initialization of the buffer array. This may lead to unpredictable results when the same buffer is used later in calls to strncmp() function. Fix the issue by returning early if cmdline_find_option() returns an error. Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE. Fixes: aca20d546214 ("x86/mm: Add support to make use of Secure Memory Encryption") Signed-off-by: Nikita Zhandarovich Signed-off-by: Borislav Petkov (AMD) Acked-by: Tom Lendacky Cc: Link: https://lore.kernel.org/r/20230306160656.14844-1-n.zhandarovich@fintech.ru commit 7ad2c39860dc0ca01d2152232224d2124e160fe3 Author: Yu Zhe Date: Thu Mar 16 16:39:54 2023 +0800 xen: remove unnecessary (void*) conversions Pointer variables of void * type do not require type cast. Signed-off-by: Yu Zhe Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20230316083954.4223-1-yuzhe@nfschina.com Signed-off-by: Juergen Gross commit f551592f72563e119bdec5b9d5242f584111b2aa Merge: 06be62083c530 9db481c909dd6 Author: Greg Kroah-Hartman Date: Thu Mar 16 10:55:42 2023 +0100 Merge tag 'icc-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-linus Georgi writes: interconnect fixes for v6.3-rc This contains a bunch of fixes with the highlight being fixes for a race condition that could sometimes occur during the interconnect provider driver registration. There are also fixes for memory overallocation and a memory leak. - interconnect: qcom: osm-l3: fix icc_onecell_data allocation - interconnect: qcom: sm8450: switch to qcom_icc_rpmh_* function - interconnect: qcom: sm8550: switch to qcom_icc_rpmh_* function - interconnect: qcom: qcm2290: Fix MASTER_SNOC_BIMC_NRT - interconnect: fix mem leak when freeing nodes - interconnect: fix icc_provider_del() error handling - interconnect: fix provider registration API - interconnect: imx: fix registration race - interconnect: qcom: osm-l3: fix registration race - interconnect: qcom: rpm: fix probe child-node error handling - interconnect: qcom: rpm: fix registration race - interconnect: qcom: rpmh: fix probe child-node error handling - interconnect: qcom: rpmh: fix registration race - interconnect: qcom: msm8974: fix registration race - interconnect: exynos: fix node leak in probe PM QoS error path - interconnect: exynos: fix registration race - interconnect: exynos: drop redundant link destroy - memory: tegra: fix interconnect registration race - memory: tegra124-emc: fix interconnect registration race - memory: tegra20-emc: fix interconnect registration race - memory: tegra30-emc: fix interconnect registration race Signed-off-by: Georgi Djakov * tag 'icc-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc: (21 commits) memory: tegra30-emc: fix interconnect registration race memory: tegra20-emc: fix interconnect registration race memory: tegra124-emc: fix interconnect registration race memory: tegra: fix interconnect registration race interconnect: exynos: drop redundant link destroy interconnect: exynos: fix registration race interconnect: exynos: fix node leak in probe PM QoS error path interconnect: qcom: msm8974: fix registration race interconnect: qcom: rpmh: fix registration race interconnect: qcom: rpmh: fix probe child-node error handling interconnect: qcom: rpm: fix registration race interconnect: qcom: rpm: fix probe child-node error handling interconnect: qcom: osm-l3: fix registration race interconnect: imx: fix registration race interconnect: fix provider registration API interconnect: fix icc_provider_del() error handling interconnect: fix mem leak when freeing nodes interconnect: qcom: qcm2290: Fix MASTER_SNOC_BIMC_NRT interconnect: qcom: sm8550: switch to qcom_icc_rpmh_* function interconnect: qcom: sm8450: switch to qcom_icc_rpmh_* function ... commit 5bc9e2d43f86105a95f86fa096fb4e517bb0ce73 Author: Ondrej Zary Date: Tue Mar 14 23:58:05 2023 +0100 ata: pata_parport: fix memory leaks When ida_alloc() fails, "pi" is not freed although the misleading comment says otherwise. Move the ida_alloc() call up so we really don't have to free "pi" in case of ida_alloc() failure. Also move ida_free() call from pi_remove_one() to pata_parport_dev_release(). It was dereferencing already freed dev pointer. Testing revealed leak even in non-failure case which was tracked down to missing put_device() call after bus_find_device_by_name(). As a result, pata_parport_dev_release() was never called. Reported-by: kernel test robot Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/202303111822.IHNchbkp-lkp@intel.com/ Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit a075bacde257f755bea0e53400c9f1cdd1b8e8e6 Author: Eric Biggers Date: Tue Mar 14 16:31:32 2023 -0700 fsverity: don't drop pagecache at end of FS_IOC_ENABLE_VERITY The full pagecache drop at the end of FS_IOC_ENABLE_VERITY is causing performance problems and is hindering adoption of fsverity. It was intended to solve a race condition where unverified pages might be left in the pagecache. But actually it doesn't solve it fully. Since the incomplete solution for this race condition has too much performance impact for it to be worth it, let's remove it for now. Fixes: 3fda4c617e84 ("fs-verity: implement FS_IOC_ENABLE_VERITY ioctl") Cc: stable@vger.kernel.org Reviewed-by: Victor Hsieh Link: https://lore.kernel.org/r/20230314235332.50270-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit cd356010ce4c69ac7e1a40586112df24d22c6a4b Author: Vladimir Oltean Date: Tue Mar 14 17:30:25 2023 +0200 net: phy: mscc: fix deadlock in phy_ethtool_{get,set}_wol() Since the blamed commit, phy_ethtool_get_wol() and phy_ethtool_set_wol() acquire phydev->lock, but the mscc phy driver implementations, vsc85xx_wol_get() and vsc85xx_wol_set(), acquire the same lock as well, resulting in a deadlock. $ ip link set swp3 down ============================================ WARNING: possible recursive locking detected mscc_felix 0000:00:00.5 swp3: Link is Down -------------------------------------------- ip/375 is trying to acquire lock: ffff3d7e82e987a8 (&dev->lock){+.+.}-{4:4}, at: vsc85xx_wol_get+0x2c/0xf4 but task is already holding lock: ffff3d7e82e987a8 (&dev->lock){+.+.}-{4:4}, at: phy_ethtool_get_wol+0x3c/0x6c other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&dev->lock); lock(&dev->lock); *** DEADLOCK *** May be due to missing lock nesting notation 2 locks held by ip/375: #0: ffffd43b2a955788 (rtnl_mutex){+.+.}-{4:4}, at: rtnetlink_rcv_msg+0x144/0x58c #1: ffff3d7e82e987a8 (&dev->lock){+.+.}-{4:4}, at: phy_ethtool_get_wol+0x3c/0x6c Call trace: __mutex_lock+0x98/0x454 mutex_lock_nested+0x2c/0x38 vsc85xx_wol_get+0x2c/0xf4 phy_ethtool_get_wol+0x50/0x6c phy_suspend+0x84/0xcc phy_state_machine+0x1b8/0x27c phy_stop+0x70/0x154 phylink_stop+0x34/0xc0 dsa_port_disable_rt+0x2c/0xa4 dsa_slave_close+0x38/0xec __dev_close_many+0xc8/0x16c __dev_change_flags+0xdc/0x218 dev_change_flags+0x24/0x6c do_setlink+0x234/0xea4 __rtnl_newlink+0x46c/0x878 rtnl_newlink+0x50/0x7c rtnetlink_rcv_msg+0x16c/0x58c Removing the mutex_lock(&phydev->lock) calls from the driver restores the functionality. Fixes: 2f987d486610 ("net: phy: Add locks to ethtool functions") Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230314153025.2372970-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 7c10131803e45269ddc6c817f19ed649110f3cae Author: Shawn Bohrer Date: Tue Mar 14 10:33:51 2023 -0500 veth: Fix use after free in XDP_REDIRECT Commit 718a18a0c8a6 ("veth: Rework veth_xdp_rcv_skb in order to accept non-linear skb") introduced a bug where it tried to use pskb_expand_head() if the headroom was less than XDP_PACKET_HEADROOM. This however uses kmalloc to expand the head, which will later allow consume_skb() to free the skb while is it still in use by AF_XDP. Previously if the headroom was less than XDP_PACKET_HEADROOM we continued on to allocate a new skb from pages so this restores that behavior. BUG: KASAN: use-after-free in __xsk_rcv+0x18d/0x2c0 Read of size 78 at addr ffff888976250154 by task napi/iconduit-g/148640 CPU: 5 PID: 148640 Comm: napi/iconduit-g Kdump: loaded Tainted: G O 6.1.4-cloudflare-kasan-2023.1.2 #1 Hardware name: Quanta Computer Inc. QuantaPlex T41S-2U/S2S-MB, BIOS S2S_3B10.03 06/21/2018 Call Trace: dump_stack_lvl+0x34/0x48 print_report+0x170/0x473 ? __xsk_rcv+0x18d/0x2c0 kasan_report+0xad/0x130 ? __xsk_rcv+0x18d/0x2c0 kasan_check_range+0x149/0x1a0 memcpy+0x20/0x60 __xsk_rcv+0x18d/0x2c0 __xsk_map_redirect+0x1f3/0x490 ? veth_xdp_rcv_skb+0x89c/0x1ba0 [veth] xdp_do_redirect+0x5ca/0xd60 veth_xdp_rcv_skb+0x935/0x1ba0 [veth] ? __netif_receive_skb_list_core+0x671/0x920 ? veth_xdp+0x670/0x670 [veth] veth_xdp_rcv+0x304/0xa20 [veth] ? do_xdp_generic+0x150/0x150 ? veth_xdp_rcv_one+0xde0/0xde0 [veth] ? _raw_spin_lock_bh+0xe0/0xe0 ? newidle_balance+0x887/0xe30 ? __perf_event_task_sched_in+0xdb/0x800 veth_poll+0x139/0x571 [veth] ? veth_xdp_rcv+0xa20/0xa20 [veth] ? _raw_spin_unlock+0x39/0x70 ? finish_task_switch.isra.0+0x17e/0x7d0 ? __switch_to+0x5cf/0x1070 ? __schedule+0x95b/0x2640 ? io_schedule_timeout+0x160/0x160 __napi_poll+0xa1/0x440 napi_threaded_poll+0x3d1/0x460 ? __napi_poll+0x440/0x440 ? __kthread_parkme+0xc6/0x1f0 ? __napi_poll+0x440/0x440 kthread+0x2a2/0x340 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x22/0x30 Freed by task 148640: 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 skb_release_data+0x449/0x600 consume_skb+0x9f/0x1c0 veth_xdp_rcv_skb+0x89c/0x1ba0 [veth] veth_xdp_rcv+0x304/0xa20 [veth] veth_poll+0x139/0x571 [veth] __napi_poll+0xa1/0x440 napi_threaded_poll+0x3d1/0x460 kthread+0x2a2/0x340 ret_from_fork+0x22/0x30 The buggy address belongs to the object at ffff888976250000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 340 bytes inside of 2048-byte region [ffff888976250000, ffff888976250800) The buggy address belongs to the physical page: page:00000000ae18262a refcount:2 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x976250 head:00000000ae18262a order:3 compound_mapcount:0 compound_pincount:0 flags: 0x2ffff800010200(slab|head|node=0|zone=2|lastcpupid=0x1ffff) raw: 002ffff800010200 0000000000000000 dead000000000122 ffff88810004cf00 raw: 0000000000000000 0000000080080008 00000002ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888976250000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888976250080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb > ffff888976250100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888976250180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888976250200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb Fixes: 718a18a0c8a6 ("veth: Rework veth_xdp_rcv_skb in order to accept non-linear skb") Signed-off-by: Shawn Bohrer Acked-by: Lorenzo Bianconi Acked-by: Toshiaki Makita Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20230314153351.2201328-1-sbohrer@cloudflare.com Signed-off-by: Jakub Kicinski commit ab00709310eedcd8dae0df1f66d332f9bc64c99e Author: Lars-Peter Clausen Date: Tue Mar 14 02:31:46 2023 -0700 hwmon: (ltc2992) Set `can_sleep` flag for GPIO chip The ltc2992 drivers uses a mutex and I2C bus access in its GPIO chip `set` and `get` implementation. This means these functions can sleep and the GPIO chip should set the `can_sleep` property to true. This will ensure that a warning is printed when trying to set or get the GPIO value from a context that potentially can't sleep. Fixes: 9ca26df1ba25 ("hwmon: (ltc2992) Add support for GPIOs.") Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20230314093146.2443845-2-lars@metafoo.de Signed-off-by: Guenter Roeck commit a5bb73b3f5db1a4e91402ad132b59b13d2651ed9 Author: Lars-Peter Clausen Date: Tue Mar 14 02:31:45 2023 -0700 hwmon: (adm1266) Set `can_sleep` flag for GPIO chip The adm1266 driver uses I2C bus access in its GPIO chip `set` and `get` implementation. This means these functions can sleep and the GPIO chip should set the `can_sleep` property to true. This will ensure that a warning is printed when trying to set or get the GPIO value from a context that potentially can't sleep. Fixes: d98dfad35c38 ("hwmon: (pmbus/adm1266) Add support for GPIOs") Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20230314093146.2443845-1-lars@metafoo.de Signed-off-by: Guenter Roeck commit 6acd352dfee558194643adbed7e849fe80fd1b93 Author: Li zeming Date: Sat Mar 18 02:25:38 2023 +0800 io_uring: rsrc: Optimize return value variable 'ret' The initialization assignment of the variable ret is changed to 0, only in 'goto fail;' Use the ret variable as the function return value. Signed-off-by: Li zeming Link: https://lore.kernel.org/r/20230317182538.3027-1-zeming@nfschina.com Signed-off-by: Jens Axboe commit c7b7c64ab5821352db0b3fbaa92773e5a60bfaa7 Author: Oz Shlomo Date: Wed Feb 22 10:03:36 2023 +0000 net/mlx5e: TC, Remove error message log print The cited commit attempts to update the hw stats when dumping tc actions. However, the driver may be called to update the stats of a police action that may not be in hardware. In such cases the driver will fail to lookup the police action object and will output an error message both to extack and dmesg. The dmesg error is confusing as it may not indicate an actual error. Remove the dmesg error. Fixes: 2b68d659a704 ("net/mlx5e: TC, support per action stats") Signed-off-by: Oz Shlomo Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed commit b23bf10cca59b2955fa5c2b5e4f753962b4f88ca Author: Oz Shlomo Date: Tue Feb 21 15:24:39 2023 +0000 net/mlx5e: TC, fix cloned flow attribute Currently the cloned flow attr resets the original tc action cookies count. Fix that by resetting the cloned flow attribute. Fixes: cca7eac13856 ("net/mlx5e: TC, store tc action cookies per attr") Signed-off-by: Oz Shlomo Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed commit 1166add424dae14ccdb64a6eefbf26766c9d0ef2 Author: Oz Shlomo Date: Tue Feb 21 14:46:56 2023 +0000 net/mlx5e: TC, fix missing error code Missing error code when mlx5e_tc_act_stats_create fails Fixes: d13674b1d14c ("net/mlx5e: TC, map tc action cookie to a hw counter") Reported-by: Dan Carpenter Signed-off-by: Oz Shlomo Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed commit d1a0075ad6b693c2bd41e7aedb8a4f3b74b6999c Author: Oz Shlomo Date: Thu Feb 16 12:34:21 2023 +0000 net/sched: TC, fix raw counter initialization Freed counters may be reused by fs core. As such, raw counters may not be initialized to zero. Cache the counter values when the action stats object is initialized to have a proper base value for calculating the difference from the previous query. Fixes: 2b68d659a704 ("net/mlx5e: TC, support per action stats") Signed-off-by: Oz Shlomo Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed commit 78dee7befd56987283c13877b834c0aa97ad51b9 Author: Adham Faris Date: Mon Jan 23 10:09:01 2023 +0200 net/mlx5e: Lower maximum allowed MTU in XSK to match XDP prerequisites XSK redirecting XDP programs require linearity, hence applies restrictions on the MTU. For PAGE_SIZE=4K, MTU shouldn't exceed 3498. Features that contradict with XDP such HW-LRO and HW-GRO are enforced by the driver in advance, during XSK params validation, except for MTU, which was not enforced before this patch. This has been spotted during test scenario described below: Attaching xdpsock program (PAGE_SIZE=4K), with MTU < 3498, detaching XDP program, changing the MTU to arbitrary value in the range [3499, 3754], attaching XDP program again, which ended up with failure since MTU is > 3498. This commit lowers the XSK MTU limitation to be aligned with XDP MTU limitation, since XSK socket is meaningless without XDP program. Signed-off-by: Adham Faris Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 031a163f2c476adcb2c01e27a7d323e66174ac11 Author: Shay Drory Date: Tue Feb 28 10:36:19 2023 +0200 net/mlx5: Set BREAK_FW_WAIT flag first when removing driver Currently, BREAK_FW_WAIT flag is set after syncing with fw_reset. However, fw_reset can call mlx5_load_one() which is waiting for fw init bit and BREAK_FW_WAIT flag is intended to stop. e.g.: the driver might wait on a loop it should exit. Fix it by setting the flag before syncing with fw_reset. Fixes: 8324a02c342a ("net/mlx5: Add exit route when waiting for FW") Signed-off-by: Shay Drory Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit dd64572490c3d7aab04083db8791fab157a941ed Author: Gal Pressman Date: Tue Jan 24 17:34:32 2023 +0200 net/mlx5e: kTLS, Fix missing error unwind on unsupported cipher type Do proper error unwinding when adding an unsupported TX/RX cipher type. Move the switch case prior to key creation so there's less to unwind, and change the goto label name to describe the action performed instead of what failed. Fixes: 4960c414db35 ("net/mlx5e: Support 256 bit keys with kTLS device offload") Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit c9668f0b1d28570327dbba189f2c61f6f9e43ae7 Author: Paul Blakey Date: Sun Feb 12 11:01:43 2023 +0200 net/mlx5e: Fix cleanup null-ptr deref on encap lock During module is unloaded while a peer tc flow is still offloaded, first the peer uplink rep profile is changed to a nic profile, and so neigh encap lock is destroyed. Next during unload, the VF reps netdevs are unregistered which causes the original non-peer tc flow to be deleted, which deletes the peer flow. The peer flow deletion detaches the encap entry and try to take the already destroyed encap lock, causing the below trace. Fix this by clearing peer flows during tc eswitch cleanup (mlx5e_tc_esw_cleanup()). Relevant trace: [ 4316.837128] BUG: kernel NULL pointer dereference, address: 00000000000001d8 [ 4316.842239] RIP: 0010:__mutex_lock+0xb5/0xc40 [ 4316.851897] Call Trace: [ 4316.852481] [ 4316.857214] mlx5e_rep_neigh_entry_release+0x93/0x790 [mlx5_core] [ 4316.858258] mlx5e_rep_encap_entry_detach+0xa7/0xf0 [mlx5_core] [ 4316.859134] mlx5e_encap_dealloc+0xa3/0xf0 [mlx5_core] [ 4316.859867] clean_encap_dests.part.0+0x5c/0xe0 [mlx5_core] [ 4316.860605] mlx5e_tc_del_fdb_flow+0x32a/0x810 [mlx5_core] [ 4316.862609] __mlx5e_tc_del_fdb_peer_flow+0x1a2/0x250 [mlx5_core] [ 4316.863394] mlx5e_tc_del_flow+0x(/0x630 [mlx5_core] [ 4316.864090] mlx5e_flow_put+0x5f/0x100 [mlx5_core] [ 4316.864771] mlx5e_delete_flower+0x4de/0xa40 [mlx5_core] [ 4316.865486] tc_setup_cb_reoffload+0x20/0x80 [ 4316.865905] fl_reoffload+0x47c/0x510 [cls_flower] [ 4316.869181] tcf_block_playback_offloads+0x91/0x1d0 [ 4316.869649] tcf_block_unbind+0xe7/0x1b0 [ 4316.870049] tcf_block_offload_cmd.isra.0+0x1ee/0x270 [ 4316.879266] tcf_block_offload_unbind+0x61/0xa0 [ 4316.879711] __tcf_block_put+0xa4/0x310 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: Paul Blakey Reviewed-by: Chris Mi Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 28d3815a629cbdee660dd1c9de28d77cb3d77917 Author: Maor Dickman Date: Wed Feb 8 11:37:41 2023 +0200 net/mlx5: E-switch, Fix missing set of split_count when forward to ovs internal port Rules with mirror actions are split to two FTEs when the actions after the mirror action contains pedit, vlan push/pop or ct. Forward to ovs internal port adds implicit header rewrite (pedit) but missing trigger to do split. Fix by setting split_count when forwarding to ovs internal port which will trigger split in mirror rules. Fixes: 27484f7170ed ("net/mlx5e: Offload tc rules that redirect to ovs internal port") Signed-off-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 1313d78ac0c1cfcff7bdece8da54b080e71487c4 Author: Maor Dickman Date: Tue Feb 7 15:07:00 2023 +0200 net/mlx5: E-switch, Fix wrong usage of source port rewrite in split rules In few cases, rules with mirror use case are split to two FTEs, one which do the mirror action and forward to second FTE which do the rest of the rule actions and the second redirect action. In case of mirror rules which do split and forward to ovs internal port or VF stack devices, source port rewrite should be used in the second FTE but it is wrongly also set in the first FTE which break the offload. Fix this issue by removing the wrong check if source port rewrite is needed to be used on the first FTE of the split and instead return EOPNOTSUPP which will block offload of rules which mirror to ovs internal port or VF stack devices which isn't supported. Fixes: 10742efc20a4 ("net/mlx5e: VF tunnel TX traffic offloading") Fixes: a508728a4c8b ("net/mlx5e: VF tunnel RX traffic offloading") Signed-off-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 7ba930fc25def6fd736abcdfa224272948a65cf7 Author: Daniel Jurgens Date: Thu Oct 20 00:13:50 2022 +0300 net/mlx5: Disable eswitch before waiting for VF pages The offending commit changed the ordering of moving to legacy mode and waiting for the VF pages. Moving to legacy mode is important in bluefield, because it sends the host driver into error state, and frees its pages. Without this transition we end up waiting 2 minutes for pages that aren't coming before carrying on with the unload process. Fixes: f019679ea5f2 ("net/mlx5: E-switch, Remove dependency between sriov and eswitch mode") Signed-off-by: Daniel Jurgens Signed-off-by: Saeed Mahameed commit ba5d8f72b82cc197355c9340ef89dab813815865 Author: Parav Pandit Date: Thu Jun 24 18:22:57 2021 +0300 net/mlx5: Fix setting ec_function bit in MANAGE_PAGES When ECPF is a page supplier, reclaim pages missed to honor the ec_function bit provided by the firmware. It always used the ec_function to true during driver unload flow for ECPF. This is incorrect. Honor the ec_function bit provided by device during page allocation request event. Fixes: d6945242f45d ("net/mlx5: Hold pages RB tree per VF") Signed-off-by: Parav Pandit Signed-off-by: Daniel Jurgens Signed-off-by: Saeed Mahameed commit 9a92fe1db9e57ea94388a1d768e8ee42af858377 Author: Parav Pandit Date: Fri Mar 12 07:21:29 2021 -0600 net/mlx5e: Don't cache tunnel offloads capability When mlx5e attaches again after device health recovery, the device capabilities might have changed by the eswitch manager. For example in one flow when ECPF changes the eswitch mode between legacy and switchdev, it updates the flow table tunnel capability. The cached value is only used in one place, so just check the capability there instead. Fixes: 5bef709d76a2 ("net/mlx5: Enable host PF HCA after eswitch is initialized") Signed-off-by: Parav Pandit Signed-off-by: Daniel Jurgens Signed-off-by: Saeed Mahameed commit 37beabe9a891b92174cd1aafbfa881fe9e05aa87 Author: Emeel Hakim Date: Wed Feb 8 14:25:54 2023 +0200 net/mlx5e: Fix macsec ASO context alignment Currently mlx5e_macsec_umr struct does not satisfy hardware memory alignment requirement. Hence the result of querying advanced steering operation (ASO) is not copied to the memory region as expected. Fix by satisfying hardware memory alignment requirement and move context to be first field in struct for better readability. Fixes: 1f53da676439 ("net/mlx5e: Create advanced steering operation (ASO) object for MACsec") Signed-off-by: Emeel Hakim Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit f3921a9a641483784448fb982b2eb738b383d9b9 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 20bc9f76b6a2455c6b54b91ae7634f147f64987f 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 0424a7dfe9129b93f29b277511a60e87f052ac6b Author: Shawn Wang Date: Tue Jan 17 13:14:50 2023 -0800 x86/resctrl: Clear staged_config[] before and after it is used As a temporary storage, staged_config[] in rdt_domain should be cleared before and after it is used. The stale value in staged_config[] could cause an MSR access error. Here is a reproducer on a system with 16 usable CLOSIDs for a 15-way L3 Cache (MBA should be disabled if the number of CLOSIDs for MB is less than 16.) : mount -t resctrl resctrl -o cdp /sys/fs/resctrl mkdir /sys/fs/resctrl/p{1..7} umount /sys/fs/resctrl/ mount -t resctrl resctrl /sys/fs/resctrl mkdir /sys/fs/resctrl/p{1..8} An error occurs when creating resource group named p8: unchecked MSR access error: WRMSR to 0xca0 (tried to write 0x00000000000007ff) at rIP: 0xffffffff82249142 (cat_wrmsr+0x32/0x60) Call Trace: __flush_smp_call_function_queue+0x11d/0x170 __sysvec_call_function+0x24/0xd0 sysvec_call_function+0x89/0xc0 asm_sysvec_call_function+0x16/0x20 When creating a new resource control group, hardware will be configured by the following process: rdtgroup_mkdir() rdtgroup_mkdir_ctrl_mon() rdtgroup_init_alloc() resctrl_arch_update_domains() resctrl_arch_update_domains() iterates and updates all resctrl_conf_type whose have_new_ctrl is true. Since staged_config[] holds the same values as when CDP was enabled, it will continue to update the CDP_CODE and CDP_DATA configurations. When group p8 is created, get_config_index() called in resctrl_arch_update_domains() will return 16 and 17 as the CLOSIDs for CDP_CODE and CDP_DATA, which will be translated to an invalid register - 0xca0 in this scenario. Fix it by clearing staged_config[] before and after it is used. [reinette: re-order commit tags] Fixes: 75408e43509e ("x86/resctrl: Allow different CODE/DATA configurations to be staged") Suggested-by: Xin Hao Signed-off-by: Shawn Wang Signed-off-by: Reinette Chatre Signed-off-by: Dave Hansen Tested-by: Reinette Chatre Cc:stable@vger.kernel.org Link: https://lore.kernel.org/all/2fad13f49fbe89687fc40e9a5a61f23a28d1507a.1673988935.git.reinette.chatre%40intel.com commit 7304ee979b6b6422f41a1312391a5e505fc29ccd 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 cbd6c1b17d3b42b7935526a86ad5f66838767d03 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 56574f89dbd84004c3fd6485bcaafb5aa9b8be14 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 709671ffb15dcd1b4f6afe2a9d8c67c7c4ead4a1 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 fd0815f632c24878e325821943edccc7fde947a2 Author: Budimir Markovic Date: Wed Mar 15 00:29:01 2023 -0700 perf: Fix check before add_event_to_groups() in perf_group_detach() Events should only be added to a groups rb tree if they have not been removed from their context by list_del_event(). Since remove_on_exec made it possible to call list_del_event() on individual events before they are detached from their group, perf_group_detach() should check each sibling's attach_state before calling add_event_to_groups() on it. Fixes: 2e498d0a74e5 ("perf: Add support for event removal on exec") Signed-off-by: Budimir Markovic Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/ZBFzvQV9tEqoHEtH@gentoo commit baf1b12a67f5b24f395baca03e442ce27cab0c18 Author: Song Liu Date: Mon Mar 13 10:16:08 2023 -0700 perf: fix perf_event_context->time Time readers rely on perf_event_context->[time|timestamp|timeoffset] to get accurate time_enabled and time_running for an event. The difference between ctx->timestamp and ctx->time is the among of time when the context is not enabled. __update_context_time(ctx, false) is used to increase timestamp, but not time. Therefore, it should only be called in ctx_sched_in() when EVENT_TIME was not enabled. Fixes: 09f5e7dc7ad7 ("perf: Fix perf_event_read_local() time") Signed-off-by: Song Liu Signed-off-by: Peter Zijlstra (Intel) Acked-by: Namhyung Kim Link: https://lkml.kernel.org/r/20230313171608.298734-1-song@kernel.org commit eb81a2ed4f52be831c9fb879752d89645a312c13 Author: Yang Jihong Date: Tue Mar 14 04:47:35 2023 +0000 perf/core: Fix perf_output_begin parameter is incorrectly invoked in perf_event_bpf_output syzkaller reportes a KASAN issue with stack-out-of-bounds. The call trace is as follows: dump_stack+0x9c/0xd3 print_address_description.constprop.0+0x19/0x170 __kasan_report.cold+0x6c/0x84 kasan_report+0x3a/0x50 __perf_event_header__init_id+0x34/0x290 perf_event_header__init_id+0x48/0x60 perf_output_begin+0x4a4/0x560 perf_event_bpf_output+0x161/0x1e0 perf_iterate_sb_cpu+0x29e/0x340 perf_iterate_sb+0x4c/0xc0 perf_event_bpf_event+0x194/0x2c0 __bpf_prog_put.constprop.0+0x55/0xf0 __cls_bpf_delete_prog+0xea/0x120 [cls_bpf] cls_bpf_delete_prog_work+0x1c/0x30 [cls_bpf] process_one_work+0x3c2/0x730 worker_thread+0x93/0x650 kthread+0x1b8/0x210 ret_from_fork+0x1f/0x30 commit 267fb27352b6 ("perf: Reduce stack usage of perf_output_begin()") use on-stack struct perf_sample_data of the caller function. However, perf_event_bpf_output uses incorrect parameter to convert small-sized data (struct perf_bpf_event) into large-sized data (struct perf_sample_data), which causes memory overwriting occurs in __perf_event_header__init_id. Fixes: 267fb27352b6 ("perf: Reduce stack usage of perf_output_begin()") Signed-off-by: Yang Jihong Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20230314044735.56551-1-yangjihong1@huawei.com commit e15acc25880cf048dba9df94d76ed7e7e10040e6 Author: Naohiro Aota Date: Mon Mar 13 16:06:14 2023 +0900 btrfs: zoned: drop space_info->active_total_bytes The space_info->active_total_bytes is no longer necessary as we now count the region of newly allocated block group as zone_unusable. Drop its usage. Fixes: 6a921de58992 ("btrfs: zoned: introduce space_info->active_total_bytes") CC: stable@vger.kernel.org # 6.1+ Signed-off-by: Naohiro Aota Signed-off-by: David Sterba commit fa2068d7e922b434eba5bfb0131e6d39febfdb48 Author: Naohiro Aota Date: Mon Mar 13 16:06:13 2023 +0900 btrfs: zoned: count fresh BG region as zone unusable The naming of space_info->active_total_bytes is misleading. It counts not only active block groups but also full ones which are previously active but now inactive. That confusion results in a bug not counting the full BGs into active_total_bytes on mount time. For a background, there are three kinds of block groups in terms of activation. 1. Block groups never activated 2. Block groups currently active 3. Block groups previously active and currently inactive (due to fully written or zone finish) What we really wanted to exclude from "total_bytes" is the total size of BGs #1. They seem empty and allocatable but since they are not activated, we cannot rely on them to do the space reservation. And, since BGs #1 never get activated, they should have no "used", "reserved" and "pinned" bytes. OTOH, BGs #3 can be counted in the "total", since they are already full we cannot allocate from them anyway. For them, "total_bytes == used + reserved + pinned + zone_unusable" should hold. Tracking #2 and #3 as "active_total_bytes" (current implementation) is confusing. And, tracking #1 and subtract that properly from "total_bytes" every time you need space reservation is cumbersome. Instead, we can count the whole region of a newly allocated block group as zone_unusable. Then, once that block group is activated, release [0 .. zone_capacity] from the zone_unusable counters. With this, we can eliminate the confusing ->active_total_bytes and the code will be common among regular and the zoned mode. Also, no additional counter is needed with this approach. Fixes: 6a921de58992 ("btrfs: zoned: introduce space_info->active_total_bytes") CC: stable@vger.kernel.org # 6.1+ Signed-off-by: Naohiro Aota Signed-off-by: David Sterba commit df384da5a49cace5c5e3100803dfd563fd982f93 Author: Josef Bacik Date: Wed Mar 1 16:14:43 2023 -0500 btrfs: use temporary variable for space_info in btrfs_update_block_group We do cache->space_info->counter += num_bytes; everywhere in here. This is makes the lines longer than they need to be, and will be especially noticeable when we add the active tracking in, so add a temp variable for the space_info so this is cleaner. Reviewed-by: Naohiro Aota Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit bf1f1fec2724a33b67ec12032402ea75f2a83622 Author: Josef Bacik Date: Wed Mar 1 16:14:42 2023 -0500 btrfs: rename BTRFS_FS_NO_OVERCOMMIT to BTRFS_FS_ACTIVE_ZONE_TRACKING This flag only gets set when we're doing active zone tracking, and we're going to need to use this flag for things related to this behavior. Rename the flag to represent what it actually means for the file system so it can be used in other ways and still make sense. Reviewed-by: Naohiro Aota Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9e1cdf0c354e46e428c0e0cab008abbe81b6013d Author: Naohiro Aota Date: Mon Mar 13 16:29:49 2023 +0900 btrfs: zoned: fix btrfs_can_activate_zone() to support DUP profile btrfs_can_activate_zone() returns true if at least one device has one zone available for activation. This is OK for the single profile, but not OK for DUP profile. We need two zones to create a DUP block group. Fix it by properly handling the case with the profile flags. Fixes: 265f7237dd25 ("btrfs: zoned: allow DUP on meta-data block groups") CC: stable@vger.kernel.org # 6.1+ Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit 10a8857a1beaa015efba7d56e06243d484549fb6 Author: Sweet Tea Dorminy Date: Wed Mar 8 10:58:36 2023 -0500 btrfs: fix compiler warning on SPARC/PA-RISC handling fscrypt_setup_filename Commit 1ec49744ba83 ("btrfs: turn on -Wmaybe-uninitialized") exposed that on SPARC and PA-RISC, gcc is unaware that fscrypt_setup_filename() only returns negative error values or 0. This ultimately results in a maybe-uninitialized warning in btrfs_lookup_dentry(). Change to only return negative error values or 0 from fscrypt_setup_filename() at the relevant call site, and assert that no positive error codes are returned (which would have wider implications involving other users). Reported-by: Guenter Roeck Link: https://lore.kernel.org/all/481b19b5-83a0-4793-b4fd-194ad7b978c3@roeck-us.net/ Signed-off-by: Sweet Tea Dorminy Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1c3ab6dfa0692c3626580a508cf84e794201b357 Author: Qu Wenruo Date: Thu Mar 2 09:54:12 2023 +0800 btrfs: handle missing chunk mapping more gracefully [BUG] During my scrub rework, I did a stupid thing like this: bio->bi_iter.bi_sector = stripe->logical; btrfs_submit_bio(fs_info, bio, stripe->mirror_num); Above bi_sector assignment is using logical address directly, which lacks ">> SECTOR_SHIFT". This results a read on a range which has no chunk mapping. This results the following crash: BTRFS critical (device dm-1): unable to find logical 11274289152 length 65536 assertion failed: !IS_ERR(em), in fs/btrfs/volumes.c:6387 Sure this is all my fault, but this shows a possible problem in real world, that some bit flip in file extents/tree block can point to unmapped ranges, and trigger above ASSERT(), or if CONFIG_BTRFS_ASSERT is not configured, cause invalid pointer access. [PROBLEMS] In the above call chain, we just don't handle the possible error from btrfs_get_chunk_map() inside __btrfs_map_block(). [FIX] The fix is straightforward, replace the ASSERT() with proper error handling (callers handle errors already). Reviewed-by: Anand Jain Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 9c1bec9c0b08abeac72ed6214b723adc224013bf Merge: 6015b1aca1a23 624c60f326c6e Author: Linus Torvalds Date: Wed Mar 15 12:20:37 2023 -0700 Merge tag 'linux-kselftest-fixes-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest fixes from Shuah Khan: "A fix to amd-pstate test Makefile and a fix to LLVM build for x86 in kselftest common lib.mk" * tag 'linux-kselftest-fixes-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests: fix LLVM build for i386 and x86_64 selftests: amd-pstate: fix TEST_FILES commit 23e5b9307ede26e37c5a97f91d0b7f3f86c4182b Merge: 5f27571382ca4 6c0f5898836c0 Author: Jens Axboe Date: Wed Mar 15 12:18:07 2023 -0600 Merge branch 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into block-6.3 Pull MD fixes from Song: "This set contains two fixes for old issues (by Neil) and one fix for 6.3 (by Xiao)." * 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md: select BLOCK_LEGACY_AUTOLOAD md: avoid signed overflow in slot_store() md: Free resources in __md_stop commit 6c0f5898836c05c6d850a750ed7940ba29e4e6c5 Author: NeilBrown Date: Mon Mar 13 13:29:17 2023 -0700 md: select BLOCK_LEGACY_AUTOLOAD When BLOCK_LEGACY_AUTOLOAD is not enable, mdadm is not able to activate new arrays unless "CREATE names=yes" appears in mdadm.conf As this is a regression we need to always enable BLOCK_LEGACY_AUTOLOAD for when MD is selected - at least until mdadm is updated and the updates widely available. Cc: stable@vger.kernel.org # v5.18+ Fixes: fbdee71bb5d8 ("block: deprecate autoloading based on dev_t") Signed-off-by: NeilBrown Signed-off-by: Song Liu commit 5f27571382ca42daa3e3d40d1b252bf18c2b61d2 Author: Yu Kuai Date: Thu Feb 23 17:12:26 2023 +0800 block: count 'ios' and 'sectors' when io is done for bio-based device While using iostat for raid, I observed very strange 'await' occasionally, and turns out it's due to that 'ios' and 'sectors' is counted in bdev_start_io_acct(), while 'nsecs' is counted in bdev_end_io_acct(). I'm not sure why they are ccounted like that but I think this behaviour is obviously wrong because user will get wrong disk stats. Fix the problem by counting 'ios' and 'sectors' when io is done, like what rq-based device does. Fixes: 394ffa503bc4 ("blk: introduce generic io stat accounting help function") Signed-off-by: Yu Kuai Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230223091226.1135678-1-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe commit 6030363199e3a6341afb467ddddbed56640cbf6a Author: Liang He Date: Wed Mar 15 14:20:32 2023 +0800 block: sunvdc: add check for mdesc_grab() returning NULL In vdc_port_probe(), we should check the return value of mdesc_grab() as it may return NULL, which can cause potential NPD bug. Fixes: 43fdf27470b2 ("[SPARC64]: Abstract out mdesc accesses for better MD update handling.") Signed-off-by: Liang He Link: https://lore.kernel.org/r/20230315062032.1741692-1-windhl@126.com [axboe: style cleanup] Signed-off-by: Jens Axboe commit 7c3940bf81e5664cdb50c3fedfec8f0a756a34fb Author: GuoRui.Yu Date: Thu Feb 23 00:53:15 2023 +0800 swiotlb: fix the deadlock in swiotlb_do_find_slots In general, if swiotlb is sufficient, the logic of index = wrap_area_index(mem, index + 1) is fine, it will quickly take a slot and release the area->lock; But if swiotlb is insufficient and the device has min_align_mask requirements, such as NVME, we may not be able to satisfy index == wrap and exit the loop properly. In this case, other kernel threads will not be able to acquire the area->lock and release the slot, resulting in a deadlock. The current implementation of wrap_area_index does not involve a modulo operation, so adjusting the wrap to ensure the loop ends is not trivial. Introduce a new variable to record the number of loops and exit the loop after completing the traversal. Backtraces: Other CPUs are waiting this core to exit the swiotlb_do_find_slots loop. [10199.924391] RIP: 0010:swiotlb_do_find_slots+0x1fe/0x3e0 [10199.924403] Call Trace: [10199.924404] [10199.924405] swiotlb_tbl_map_single+0xec/0x1f0 [10199.924407] swiotlb_map+0x5c/0x260 [10199.924409] ? nvme_pci_setup_prps+0x1ed/0x340 [10199.924411] dma_direct_map_page+0x12e/0x1c0 [10199.924413] nvme_map_data+0x304/0x370 [10199.924415] nvme_prep_rq.part.0+0x31/0x120 [10199.924417] nvme_queue_rq+0x77/0x1f0 ... [ 9639.596311] NMI backtrace for cpu 48 [ 9639.596336] Call Trace: [ 9639.596337] [ 9639.596338] _raw_spin_lock_irqsave+0x37/0x40 [ 9639.596341] swiotlb_do_find_slots+0xef/0x3e0 [ 9639.596344] swiotlb_tbl_map_single+0xec/0x1f0 [ 9639.596347] swiotlb_map+0x5c/0x260 [ 9639.596349] dma_direct_map_sg+0x7a/0x280 [ 9639.596352] __dma_map_sg_attrs+0x30/0x70 [ 9639.596355] dma_map_sgtable+0x1d/0x30 [ 9639.596356] nvme_map_data+0xce/0x370 ... [ 9639.595665] NMI backtrace for cpu 50 [ 9639.595682] Call Trace: [ 9639.595682] [ 9639.595683] _raw_spin_lock_irqsave+0x37/0x40 [ 9639.595686] swiotlb_release_slots.isra.0+0x86/0x180 [ 9639.595688] dma_direct_unmap_sg+0xcf/0x1a0 [ 9639.595690] nvme_unmap_data.part.0+0x43/0xc0 Fixes: 1f221a0d0dbf ("swiotlb: respect min_align_mask") Signed-off-by: GuoRui.Yu Signed-off-by: Xiaokang Hu Signed-off-by: Christoph Hellwig commit 6173a77b7e9d3e202bdb9897b23f2a8afe7bf286 Author: Damien Le Moal Date: Mon Mar 6 10:13:13 2023 +0900 nvmet: avoid potential UAF in nvmet_req_complete() An nvme target ->queue_response() operation implementation may free the request passed as argument. Such implementation potentially could result in a use after free of the request pointer when percpu_ref_put() is called in nvmet_req_complete(). Avoid such problem by using a local variable to save the sq pointer before calling __nvmet_req_complete(), thus avoiding dereferencing the req pointer after that function call. Fixes: a07b4970f464 ("nvmet: add a generic NVMe target") Signed-off-by: Damien Le Moal Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 8e19b87cfce2de2125f11363d7dea3d08f16ccae Author: Minwoo Im Date: Thu Mar 9 23:31:18 2023 +0900 nvme-trace: show more opcode names We have more commands to show in the trace. Sync up. Signed-off-by: Minwoo Im Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 7e87965d3807ab1f518ef2365f91d5ba6b0c5abe Author: Sagi Grimberg Date: Mon Mar 13 10:56:23 2023 +0200 nvme-tcp: add nvme-tcp pdu size build protection Make sure that we don't somehow mess up the wire structures in the spec. Signed-off-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit a3406352c54fbc476f4f6b98159c3ea1c7dbb6fc Author: Sagi Grimberg Date: Mon Mar 13 10:56:22 2023 +0200 nvme-tcp: fix opcode reporting in the timeout handler For non in-capsule writes we reuse the request pdu space for a h2cdata pdu in order to avoid over allocating space (either preallocate or dynamically upon receving an r2t pdu). However if the request times out the core expects to find the opcode in the start of the request, which we override. In order to prevent that, without sacrificing additional 24 bytes per request, we just use the tail of the command pdu space instead (last 24 bytes from the 72 bytes command pdu). That should make the command opcode always available, and we get away from allocating more space. If in the future we would need the last 24 bytes of the nvme command available we would need to allocate a dedicated space for it in the request, but until then we can avoid doing so. Reported-by: Akinobu Mita Signed-off-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Tested-by: Akinobu Mita Signed-off-by: Christoph Hellwig commit b65d44fa0fe072c91bf41cd8756baa2b4c77eff2 Author: Philipp Geulen Date: Mon Mar 13 11:11:50 2023 +0100 nvme-pci: add NVME_QUIRK_BOGUS_NID for Lexar NM620 Added a quirk to fix Lexar NM620 1TB SSD reporting duplicate NGUIDs. Signed-off-by: Philipp Geulen Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 9630d80655bfe7e62e4aff2889dc4eae7ceeb887 Author: Elmer Miroslav Mosher Golovin Date: Wed Mar 8 19:19:29 2023 +0300 nvme-pci: add NVME_QUIRK_BOGUS_NID for Netac NV3000 Added a quirk to fix the Netac NV3000 SSD reporting duplicate NGUIDs. Cc: Signed-off-by: Elmer Miroslav Mosher Golovin Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit a61d265533b7fe0026a02a49916aa564ffe38e4c Author: Irvin Cote Date: Wed Mar 8 18:05:08 2023 -0300 nvme-pci: fixing memory leak in probe teardown path In case the nvme_probe teardown path is triggered the ctrl ref count does not reach 0 thus creating a memory leak upon failure of nvme_probe. Signed-off-by: Irvin Cote Signed-off-by: Christoph Hellwig commit 37f0dc2ec78af0c3f35dd05578763de059f6fe77 Author: Ming Lei Date: Sat Mar 4 07:13:45 2023 +0800 nvme: fix handling single range discard request When investigating one customer report on warning in nvme_setup_discard, we observed the controller(nvme/tcp) actually exposes queue_max_discard_segments(req->q) == 1. Obviously the current code can't handle this situation, since contiguity merge like normal RW request is taken. Fix the issue by building range from request sector/nr_sectors directly. Fixes: b35ba01ea697 ("nvme: support ranged discard requests") Signed-off-by: Ming Lei Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 54686b611eb054a5c84976e6f6e03788fa8e6a38 Author: Lukas Bulwahn Date: Wed Mar 8 15:41:32 2023 +0100 MAINTAINERS: repair malformed T: entries in NVM EXPRESS DRIVERS The T: entries shall be composed of a SCM tree type (git, hg, quilt, stgit or topgit) and location. Add the SCM tree type to the T: entry, and reorder the file entries in alphabetical order. Fixes: b508fc354f6d ("nvme: update maintainers information") Signed-off-by: Lukas Bulwahn Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit a5fc1441af7719e93dc7a638a960befb694ade89 Author: Michal Koutný Date: Tue Mar 14 19:33:32 2023 +0100 io_uring/sqpoll: Do not set PF_NO_SETAFFINITY on sqpoll threads Users may specify a CPU where the sqpoll thread would run. This may conflict with cpuset operations because of strict PF_NO_SETAFFINITY requirement. That flag is unnecessary for polling "kernel" threads, see the reasoning in commit 01e68ce08a30 ("io_uring/io-wq: stop setting PF_NO_SETAFFINITY on io-wq workers"). Drop the flag on poll threads too. Fixes: 01e68ce08a30 ("io_uring/io-wq: stop setting PF_NO_SETAFFINITY on io-wq workers") Link: https://lore.kernel.org/all/20230314162559.pnyxdllzgw7jozgx@blackpad/ Signed-off-by: Michal Koutný Link: https://lore.kernel.org/r/20230314183332.25834-1-mkoutny@suse.com Signed-off-by: Jens Axboe commit b6402014cab0481bdfd1ffff3e1dad714e8e1205 Author: Damien Le Moal Date: Tue Mar 14 13:11:06 2023 +0900 block: null_blk: cleanup null_queue_rq() Use a local struct request pointer variable to avoid having to dereference struct blk_mq_queue_data multiple times. While at it, also fix the function argument indentation and remove a useless "else" after a return. Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Pankaj Raghav Link: https://lore.kernel.org/r/20230314041106.19173-2-damien.lemoal@opensource.wdc.com Signed-off-by: Jens Axboe commit 63f886597085f346276e3b3c8974de0100d65f32 Author: Damien Le Moal Date: Tue Mar 14 13:11:05 2023 +0900 block: null_blk: Fix handling of fake timeout request When injecting a fake timeout into the null_blk driver using fail_io_timeout, the request timeout handler does not execute blk_mq_complete_request(), so the complete callback is never executed for a timedout request. The null_blk driver also has a driver-specific fake timeout mechanism which does not have this problem. Fix the problem with fail_io_timeout by using the same meachanism as null_blk internal timeout feature, using the fake_timeout field of null_blk commands. Reported-by: Akinobu Mita Fixes: de3510e52b0a ("null_blk: fix command timeout completion handling") Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20230314041106.19173-2-damien.lemoal@opensource.wdc.com Signed-off-by: Jens Axboe commit 007ae9b268ba7553e479608cf9735d3c4672a2ab Author: Alexander Wetzel Date: Tue Mar 14 22:11:22 2023 +0100 wifi: mac80211: Serialize ieee80211_handle_wake_tx_queue() ieee80211_handle_wake_tx_queue must not run concurrent multiple times. It calls ieee80211_txq_schedule_start() and the drivers migrated to iTXQ do not expect overlapping drv_tx() calls. This fixes 'c850e31f79f0 ("wifi: mac80211: add internal handler for wake_tx_queue")', which introduced ieee80211_handle_wake_tx_queue. Drivers started to use it with 'a790cc3a4fad ("wifi: mac80211: add wake_tx_queue callback to drivers")'. But only after fixing an independent bug with '4444bc2116ae ("wifi: mac80211: Proper mark iTXQs for resumption")' problematic concurrent calls really happened and exposed the initial issue. Fixes: c850e31f79f0 ("wifi: mac80211: add internal handler for wake_tx_queue") Reported-by: Thomas Mann Link: https://bugzilla.kernel.org/show_bug.cgi?id=217119 Link: https://lore.kernel.org/r/b8efebc6-4399-d0b8-b2a0-66843314616b@leemhuis.info/ Link: https://lore.kernel.org/r/b7445607128a6b9ed7c17fcdcf3679bfaf4aaea.camel@sipsolutions.net> CC: Signed-off-by: Alexander Wetzel Link: https://lore.kernel.org/r/20230314211122.111688-1-alexander@wetzel-home.de [add missing spin_lock_init() noticed by Felix] Signed-off-by: Johannes Berg commit 139f6973bf140c65d4d1d4bde5485badb4454d7a Author: Krzysztof Kozlowski Date: Sun Mar 12 14:25:23 2023 +0100 wifi: mwifiex: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/net/wireless/marvell/mwifiex/sdio.c:498:34: error: ‘mwifiex_sdio_of_match_table’ defined but not used [-Werror=unused-const-variable=] drivers/net/wireless/marvell/mwifiex/pcie.c:175:34: error: ‘mwifiex_pcie_of_match_table’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Simon Horman Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230312132523.352182-1-krzysztof.kozlowski@linaro.org commit f2c7e3562b4c4f1699acc1538ebf3e75f5cced35 Author: Russell Currey Date: Fri Mar 10 16:08:34 2023 +1100 powerpc/mm: Fix false detection of read faults To support detection of read faults with Radix execute-only memory, the vma_is_accessible() check in access_error() (which checks for PROT_NONE) was replaced with a check to see if VM_READ was missing, and if so, returns true to assert the fault was caused by a bad read. This is incorrect, as it ignores that both VM_WRITE and VM_EXEC imply read on powerpc, as defined in protection_map[]. This causes mappings containing VM_WRITE or VM_EXEC without VM_READ to misreport the cause of page faults, since the MMU is still allowing reads. Correct this by restoring the original vma_is_accessible() check for PROT_NONE mappings, and adding a separate check for Radix PROT_EXEC-only mappings. Fixes: 395cac7752b9 ("powerpc/mm: Support execute-only memory on the Radix MMU") Reported-by: Michal Suchánek Link: https://lore.kernel.org/r/20230308152702.GR19419@kitsune.suse.cz Tested-by: Benjamin Gray Signed-off-by: Russell Currey Signed-off-by: Michael Ellerman Link: https://msgid.link/20230310050834.63105-1-ruscur@russell.cc commit 4028cbf867f70a3c599c9b0c9509334c56ed97d7 Author: Marek Szyprowski Date: Thu Mar 9 16:24:46 2023 +0100 drm/meson: dw-hdmi: Fix devm_regulator_*get_enable*() conversion again devm_regulator_get_enable_optional() returns -ENODEV if requested optional regulator is not present. Adjust code for that, because in the 67d0a30128c9 I've incorrectly assumed that it also returns 0 when regulator is not present. Reported-by: Ricardo Cañuelo Fixes: 67d0a30128c9 ("drm/meson: dw-hdmi: Fix devm_regulator_*get_enable*() conversion") Signed-off-by: Marek Szyprowski Acked-by: Martin Blumenstingl Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230309152446.104913-1-m.szyprowski@samsung.com commit 0d3c9333d976af41d7dbc6bf4d9d2e95fbdf9c89 Author: Liu Ying Date: Tue Mar 14 13:50:35 2023 +0800 drm/bridge: Fix returned array size name for atomic_get_input_bus_fmts kdoc The returned array size for input formats is set through atomic_get_input_bus_fmts()'s 'num_input_fmts' argument, so use 'num_input_fmts' to represent the array size in the function's kdoc, not 'num_output_fmts'. Fixes: 91ea83306bfa ("drm/bridge: Fix the bridge kernel doc") Fixes: f32df58acc68 ("drm/bridge: Add the necessary bits to support bus format negotiation") Signed-off-by: Liu Ying Reviewed-by: Robert Foss Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230314055035.3731179-1-victor.liu@nxp.com commit 75014826d0826d175aa9e36cd8e118793263e3f4 Merge: d8b2283189350 6e933a804c7db Author: David S. Miller Date: Wed Mar 15 08:58:13 2023 +0000 Merge branch 'mtk_eth_soc-SGMII-fixes' Daniel Golle says: ==================== net: ethernet: mtk_eth_soc: minor SGMII fixes This small series brings two minor fixes for the SGMII unit found in MediaTek's router SoCs. The first patch resets the PCS internal state machine on major configuration changes, just like it is also done in MediaTek's SDK. The second patch makes sure we only write values and restart AN if actually needed, thus preventing unnesseray loss of an existing link in some cases. Both patches have previously been submitted as part of the series "net: ethernet: mtk_eth_soc: various enhancements" which grew a bit too big and it has correctly been criticized that some of the patches should rather go as fixes to net-next. This new series tries to address this. ==================== Signed-off-by: David S. Miller commit 6e933a804c7db8be64f367f33e63cd7dcc302ebb Author: Daniel Golle Date: Tue Mar 14 00:34:45 2023 +0000 net: ethernet: mtk_eth_soc: only write values if needed Only restart auto-negotiation and write link timer if actually necessary. This prevents losing the link in case of minor changes. Fixes: 7e538372694b ("net: ethernet: mediatek: Re-add support SGMII") Reviewed-by: Russell King (Oracle) Tested-by: Bjørn Mork Signed-off-by: Daniel Golle Signed-off-by: David S. Miller commit 611e2dabb4b3243d176739fd6a5a34d007fa3f86 Author: Daniel Golle Date: Tue Mar 14 00:34:26 2023 +0000 net: ethernet: mtk_eth_soc: reset PCS state Reset the internal PCS state machine when changing interface mode. This prevents confusing the state machine when changing interface modes, e.g. from SGMII to 2500Base-X or vice-versa. Fixes: 7e538372694b ("net: ethernet: mediatek: Re-add support SGMII") Reviewed-by: Russell King (Oracle) Tested-by: Bjørn Mork Signed-off-by: Daniel Golle Signed-off-by: David S. Miller commit d8b228318935044dafe3a5bc07ee71a1f1424b8d Author: Szymon Heidrich Date: Mon Mar 13 23:00:45 2023 +0100 net: usb: smsc75xx: Limit packet length to skb->len Packet length retrieved from skb data may be larger than the actual socket buffer length (up to 9026 bytes). In such case the cloned skb passed up the network stack will leak kernel memory contents. Fixes: d0cad871703b ("smsc75xx: SMSC LAN75xx USB gigabit ethernet adapter driver") Signed-off-by: Szymon Heidrich Signed-off-by: David S. Miller commit fd6ad75f8c008925e279576dc749ad12aa3fb64b Merge: 35c356924fe36 9d876d3ef27fa Author: David S. Miller Date: Wed Mar 15 08:15:20 2023 +0000 Merge branch 'net-smc-fixes' Wenjia Zhang says: ==================== net/smc: Fixes 2023-03-01 The 1st patch solves the problem that CLC message initialization was not properly reversed in error handling path. And the 2nd one fixes the possible deadlock triggered by cancel_delayed_work_sync(). ==================== Signed-off-by: David S. Miller commit 9d876d3ef27fa84355597ad269939772192356d8 Author: Stefan Raspl Date: Mon Mar 13 11:08:29 2023 +0100 net/smc: Fix device de-init sequence CLC message initialization was not properly reversed in error handling path. Reported-and-suggested-by: Alexander Gordeev Signed-off-by: Stefan Raspl Signed-off-by: Wenjia Zhang Reviewed-by: Tony Lu Signed-off-by: David S. Miller commit 13085e1b5cab8ad802904d72e6a6dae85ae0cd20 Author: Wenjia Zhang Date: Mon Mar 13 11:08:28 2023 +0100 net/smc: fix deadlock triggered by cancel_delayed_work_syn() The following LOCKDEP was detected: Workqueue: events smc_lgr_free_work [smc] WARNING: possible circular locking dependency detected 6.1.0-20221027.rc2.git8.56bc5b569087.300.fc36.s390x+debug #1 Not tainted ------------------------------------------------------ kworker/3:0/176251 is trying to acquire lock: 00000000f1467148 ((wq_completion)smc_tx_wq-00000000#2){+.+.}-{0:0}, at: __flush_workqueue+0x7a/0x4f0 but task is already holding lock: 0000037fffe97dc8 ((work_completion)(&(&lgr->free_work)->work)){+.+.}-{0:0}, at: process_one_work+0x232/0x730 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 ((work_completion)(&(&lgr->free_work)->work)){+.+.}-{0:0}: __lock_acquire+0x58e/0xbd8 lock_acquire.part.0+0xe2/0x248 lock_acquire+0xac/0x1c8 __flush_work+0x76/0xf0 __cancel_work_timer+0x170/0x220 __smc_lgr_terminate.part.0+0x34/0x1c0 [smc] smc_connect_rdma+0x15e/0x418 [smc] __smc_connect+0x234/0x480 [smc] smc_connect+0x1d6/0x230 [smc] __sys_connect+0x90/0xc0 __do_sys_socketcall+0x186/0x370 __do_syscall+0x1da/0x208 system_call+0x82/0xb0 -> #3 (smc_client_lgr_pending){+.+.}-{3:3}: __lock_acquire+0x58e/0xbd8 lock_acquire.part.0+0xe2/0x248 lock_acquire+0xac/0x1c8 __mutex_lock+0x96/0x8e8 mutex_lock_nested+0x32/0x40 smc_connect_rdma+0xa4/0x418 [smc] __smc_connect+0x234/0x480 [smc] smc_connect+0x1d6/0x230 [smc] __sys_connect+0x90/0xc0 __do_sys_socketcall+0x186/0x370 __do_syscall+0x1da/0x208 system_call+0x82/0xb0 -> #2 (sk_lock-AF_SMC){+.+.}-{0:0}: __lock_acquire+0x58e/0xbd8 lock_acquire.part.0+0xe2/0x248 lock_acquire+0xac/0x1c8 lock_sock_nested+0x46/0xa8 smc_tx_work+0x34/0x50 [smc] process_one_work+0x30c/0x730 worker_thread+0x62/0x420 kthread+0x138/0x150 __ret_from_fork+0x3c/0x58 ret_from_fork+0xa/0x40 -> #1 ((work_completion)(&(&smc->conn.tx_work)->work)){+.+.}-{0:0}: __lock_acquire+0x58e/0xbd8 lock_acquire.part.0+0xe2/0x248 lock_acquire+0xac/0x1c8 process_one_work+0x2bc/0x730 worker_thread+0x62/0x420 kthread+0x138/0x150 __ret_from_fork+0x3c/0x58 ret_from_fork+0xa/0x40 -> #0 ((wq_completion)smc_tx_wq-00000000#2){+.+.}-{0:0}: check_prev_add+0xd8/0xe88 validate_chain+0x70c/0xb20 __lock_acquire+0x58e/0xbd8 lock_acquire.part.0+0xe2/0x248 lock_acquire+0xac/0x1c8 __flush_workqueue+0xaa/0x4f0 drain_workqueue+0xaa/0x158 destroy_workqueue+0x44/0x2d8 smc_lgr_free+0x9e/0xf8 [smc] process_one_work+0x30c/0x730 worker_thread+0x62/0x420 kthread+0x138/0x150 __ret_from_fork+0x3c/0x58 ret_from_fork+0xa/0x40 other info that might help us debug this: Chain exists of: (wq_completion)smc_tx_wq-00000000#2 --> smc_client_lgr_pending --> (work_completion)(&(&lgr->free_work)->work) Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock((work_completion)(&(&lgr->free_work)->work)); lock(smc_client_lgr_pending); lock((work_completion) (&(&lgr->free_work)->work)); lock((wq_completion)smc_tx_wq-00000000#2); *** DEADLOCK *** 2 locks held by kworker/3:0/176251: #0: 0000000080183548 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x232/0x730 #1: 0000037fffe97dc8 ((work_completion) (&(&lgr->free_work)->work)){+.+.}-{0:0}, at: process_one_work+0x232/0x730 stack backtrace: CPU: 3 PID: 176251 Comm: kworker/3:0 Not tainted Hardware name: IBM 8561 T01 701 (z/VM 7.2.0) Call Trace: [<000000002983c3e4>] dump_stack_lvl+0xac/0x100 [<0000000028b477ae>] check_noncircular+0x13e/0x160 [<0000000028b48808>] check_prev_add+0xd8/0xe88 [<0000000028b49cc4>] validate_chain+0x70c/0xb20 [<0000000028b4bd26>] __lock_acquire+0x58e/0xbd8 [<0000000028b4cf6a>] lock_acquire.part.0+0xe2/0x248 [<0000000028b4d17c>] lock_acquire+0xac/0x1c8 [<0000000028addaaa>] __flush_workqueue+0xaa/0x4f0 [<0000000028addf9a>] drain_workqueue+0xaa/0x158 [<0000000028ae303c>] destroy_workqueue+0x44/0x2d8 [<000003ff8029af26>] smc_lgr_free+0x9e/0xf8 [smc] [<0000000028adf3d4>] process_one_work+0x30c/0x730 [<0000000028adf85a>] worker_thread+0x62/0x420 [<0000000028aeac50>] kthread+0x138/0x150 [<0000000028a63914>] __ret_from_fork+0x3c/0x58 [<00000000298503da>] ret_from_fork+0xa/0x40 INFO: lockdep is turned off. =================================================================== This deadlock occurs because cancel_delayed_work_sync() waits for the work(&lgr->free_work) to finish, while the &lgr->free_work waits for the work(lgr->tx_wq), which needs the sk_lock-AF_SMC, that is already used under the mutex_lock. The solution is to use cancel_delayed_work() instead, which kills off a pending work. Fixes: a52bcc919b14 ("net/smc: improve termination processing") Signed-off-by: Wenjia Zhang Reviewed-by: Jan Karcher Reviewed-by: Karsten Graul Reviewed-by: Tony Lu Signed-off-by: David S. Miller commit 35c356924fe3669dfbb1185607ce3b37f70bfa80 Author: Ido Schimmel Date: Mon Mar 13 18:21:24 2023 +0100 mlxsw: spectrum: Fix incorrect parsing depth after reload Spectrum ASICs have a configurable limit on how deep into the packet they parse. By default, the limit is 96 bytes. There are several cases where this parsing depth is not enough and there is a need to increase it. For example, timestamping of PTP packets and a FIB multipath hash policy that requires hashing on inner fields. The driver therefore maintains a reference count that reflects the number of consumers that require an increased parsing depth. During reload_down() the parsing depth reference count does not necessarily drop to zero, but the parsing depth itself is restored to the default during reload_up() when the firmware is reset. It is therefore possible to end up in situations where the driver thinks that the parsing depth was increased (reference count is non-zero), when it is not. Fix by making sure that all the consumers that increase the parsing depth reference count also decrease it during reload_down(). Specifically, make sure that when the routing code is de-initialized it drops the reference count if it was increased because of a FIB multipath hash policy that requires hashing on inner fields. Add a warning if the reference count is not zero after the driver was de-initialized and explicitly reset it to zero during initialization for good measures. Fixes: 2d91f0803b84 ("mlxsw: spectrum: Add infrastructure for parsing configuration") Reported-by: Maksym Yaremchuk Signed-off-by: Ido Schimmel Signed-off-by: Petr Machata Link: https://lore.kernel.org/r/9c35e1b3e6c1d8f319a2449d14e2b86373f3b3ba.1678727526.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 5ce76fe1eead179c058d9151ee1f4088cfdc1c6b Author: Lorenzo Bianconi Date: Tue Mar 14 00:08:40 2023 +0100 veth: rely on rtnl_dereference() instead of on rcu_dereference() in veth_set_xdp_features() Fix the following kernel warning in veth_set_xdp_features routine relying on rtnl_dereference() instead of on rcu_dereference(): ============================= WARNING: suspicious RCU usage 6.3.0-rc1-00144-g064d70527aaa #149 Not tainted ----------------------------- drivers/net/veth.c:1265 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by ip/135: (net/core/rtnetlink.c:6172) stack backtrace: CPU: 1 PID: 135 Comm: ip Not tainted 6.3.0-rc1-00144-g064d70527aaa #149 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 Call Trace: dump_stack_lvl (lib/dump_stack.c:107) lockdep_rcu_suspicious (include/linux/context_tracking.h:152) veth_set_xdp_features (drivers/net/veth.c:1265 (discriminator 9)) veth_newlink (drivers/net/veth.c:1892) ? veth_set_features (drivers/net/veth.c:1774) ? kasan_save_stack (mm/kasan/common.c:47) ? kasan_save_stack (mm/kasan/common.c:46) ? kasan_set_track (mm/kasan/common.c:52) ? alloc_netdev_mqs (include/linux/slab.h:737) ? rcu_read_lock_sched_held (kernel/rcu/update.c:125) ? trace_kmalloc (include/trace/events/kmem.h:54) ? __xdp_rxq_info_reg (net/core/xdp.c:188) ? alloc_netdev_mqs (net/core/dev.c:10657) ? rtnl_create_link (net/core/rtnetlink.c:3312) rtnl_newlink_create (net/core/rtnetlink.c:3440) ? rtnl_link_get_net_capable.constprop.0 (net/core/rtnetlink.c:3391) __rtnl_newlink (net/core/rtnetlink.c:3657) ? lock_downgrade (kernel/locking/lockdep.c:5321) ? rtnl_link_unregister (net/core/rtnetlink.c:3487) rtnl_newlink (net/core/rtnetlink.c:3671) rtnetlink_rcv_msg (net/core/rtnetlink.c:6174) ? rtnl_link_fill (net/core/rtnetlink.c:6070) ? mark_usage (kernel/locking/lockdep.c:4914) ? mark_usage (kernel/locking/lockdep.c:4914) netlink_rcv_skb (net/netlink/af_netlink.c:2574) ? rtnl_link_fill (net/core/rtnetlink.c:6070) ? netlink_ack (net/netlink/af_netlink.c:2551) ? lock_acquire (kernel/locking/lockdep.c:467) ? net_generic (include/linux/rcupdate.h:805) ? netlink_deliver_tap (include/linux/rcupdate.h:805) netlink_unicast (net/netlink/af_netlink.c:1340) ? netlink_attachskb (net/netlink/af_netlink.c:1350) netlink_sendmsg (net/netlink/af_netlink.c:1942) ? netlink_unicast (net/netlink/af_netlink.c:1861) ? netlink_unicast (net/netlink/af_netlink.c:1861) sock_sendmsg (net/socket.c:727) ____sys_sendmsg (net/socket.c:2501) ? kernel_sendmsg (net/socket.c:2448) ? __copy_msghdr (net/socket.c:2428) ___sys_sendmsg (net/socket.c:2557) ? mark_usage (kernel/locking/lockdep.c:4914) ? do_recvmmsg (net/socket.c:2544) ? lock_acquire (kernel/locking/lockdep.c:467) ? find_held_lock (kernel/locking/lockdep.c:5159) ? __lock_release (kernel/locking/lockdep.c:5345) ? __might_fault (mm/memory.c:5625) ? lock_downgrade (kernel/locking/lockdep.c:5321) ? __fget_light (include/linux/atomic/atomic-arch-fallback.h:227) __sys_sendmsg (include/linux/file.h:31) ? __sys_sendmsg_sock (net/socket.c:2572) ? rseq_get_rseq_cs (kernel/rseq.c:275) ? lockdep_hardirqs_on_prepare.part.0 (kernel/locking/lockdep.c:4263) do_syscall_64 (arch/x86/entry/common.c:50) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120) RIP: 0033:0x7f0d1aadeb17 Code: 0f 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 Fixes: fccca038f300 ("veth: take into account device reconfiguration for xdp_features flag") Suggested-by: Eric Dumazet Reported-by: Matthieu Baerts Link: https://lore.kernel.org/netdev/cover.1678364612.git.lorenzo@kernel.org/T/#me4c9d8e985ec7ebee981cfdb5bc5ec651ef4035d Signed-off-by: Lorenzo Bianconi Reported-by: syzbot+c3d0d9c42d59ff644ea6@syzkaller.appspotmail.com Reviewed-by: Eric Dumazet Tested-by: Matthieu Baerts Link: https://lore.kernel.org/r/dfd6a9a7d85e9113063165e1f47b466b90ad7b8a.1678748579.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski commit 5000fe6c27827a61d8250a7e4a1d26c3298ef4f6 Author: Zheng Wang Date: Mon Mar 13 00:08:37 2023 +0800 nfc: st-nci: Fix use after free bug in ndlc_remove due to race condition This bug influences both st_nci_i2c_remove and st_nci_spi_remove. Take st_nci_i2c_remove as an example. In st_nci_i2c_probe, it called ndlc_probe and bound &ndlc->sm_work with llt_ndlc_sm_work. When it calls ndlc_recv or timeout handler, it will finally call schedule_work to start the work. When we call st_nci_i2c_remove to remove the driver, there may be a sequence as follows: Fix it by finishing the work before cleanup in ndlc_remove CPU0 CPU1 |llt_ndlc_sm_work st_nci_i2c_remove | ndlc_remove | st_nci_remove | nci_free_device| kfree(ndev) | //free ndlc->ndev | |llt_ndlc_rcv_queue |nci_recv_frame |//use ndlc->ndev Fixes: 35630df68d60 ("NFC: st21nfcb: Add driver for STMicroelectronics ST21NFCB NFC chip") Signed-off-by: Zheng Wang Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230312160837.2040857-1-zyytlz.wz@163.com Signed-off-by: Jakub Kicinski commit cf18d55e535b34fd4845e87e31e1c5609db6d0a3 Merge: c22c3bbf351e4 13715acf8ab5b Author: Jakub Kicinski Date: Wed Mar 15 00:22:43 2023 -0700 Merge branch 'tcp-fix-bind-regression-for-dual-stack-wildcard-address' Kuniyuki Iwashima says: ==================== tcp: Fix bind() regression for dual-stack wildcard address. The first patch fixes the regression reported in [0], and the second patch adds a test for similar cases to catch future regression. [0]: https://lore.kernel.org/netdev/e21bf153-80b0-9ec0-15ba-e04a4ad42c34@redhat.com/ ==================== Link: https://lore.kernel.org/r/20230312031904.4674-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 13715acf8ab5b32a6d7e42686fceeb66df114185 Author: Kuniyuki Iwashima Date: Sat Mar 11 19:19:04 2023 -0800 selftest: Add test for bind() conflicts. The test checks if (IPv4, IPv6) address pair properly conflict or not. * IPv4 * 0.0.0.0 * 127.0.0.1 * IPv6 * :: * ::1 If the IPv6 address is [::], the second bind() always fails. Signed-off-by: Kuniyuki Iwashima Signed-off-by: Jakub Kicinski commit d9ba9934285514f1f95d96326a82398a22dc77f2 Author: Kuniyuki Iwashima Date: Sat Mar 11 19:19:03 2023 -0800 tcp: Fix bind() conflict check for dual-stack wildcard address. Paul Holzinger reported [0] that commit 5456262d2baa ("net: Fix incorrect address comparison when searching for a bind2 bucket") introduced a bind() regression. Paul also gave a nice repro that calls two types of bind() on the same port, both of which now succeed, but the second call should fail: bind(fd1, ::, port) + bind(fd2, 127.0.0.1, port) The cited commit added address family tests in three functions to fix the uninit-value KMSAN report. [1] However, the test added to inet_bind2_bucket_match_addr_any() removed a necessary conflict check; the dual-stack wildcard address no longer conflicts with an IPv4 non-wildcard address. If tb->family is AF_INET6 and sk->sk_family is AF_INET in inet_bind2_bucket_match_addr_any(), we still need to check if tb has the dual-stack wildcard address. Note that the IPv4 wildcard address does not conflict with IPv6 non-wildcard addresses. [0]: https://lore.kernel.org/netdev/e21bf153-80b0-9ec0-15ba-e04a4ad42c34@redhat.com/ [1]: https://lore.kernel.org/netdev/CAG_fn=Ud3zSW7AZWXc+asfMhZVL5ETnvuY44Pmyv4NPv-ijN-A@mail.gmail.com/ Fixes: 5456262d2baa ("net: Fix incorrect address comparison when searching for a bind2 bucket") Signed-off-by: Kuniyuki Iwashima Reported-by: Paul Holzinger Link: https://lore.kernel.org/netdev/CAG_fn=Ud3zSW7AZWXc+asfMhZVL5ETnvuY44Pmyv4NPv-ijN-A@mail.gmail.com/ Reviewed-by: Eric Dumazet Tested-by: Paul Holzinger Reviewed-by: Martin KaFai Lau Signed-off-by: Jakub Kicinski commit c22c3bbf351e4ce905f082649cffa1ff893ea8c1 Author: Heiner Kallweit Date: Sat Mar 11 19:34:45 2023 +0100 net: phy: smsc: bail out in lan87xx_read_status if genphy_read_status fails If genphy_read_status fails then further access to the PHY may result in unpredictable behavior. To prevent this bail out immediately if genphy_read_status fails. Fixes: 4223dbffed9f ("net: phy: smsc: Re-enable EDPD mode for LAN87xx") Signed-off-by: Heiner Kallweit Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/026aa4f2-36f5-1c10-ab9f-cdb17dda6ac4@gmail.com Signed-off-by: Jakub Kicinski commit 4b397c06cb987935b1b097336532aa6b4210e091 Author: Eric Dumazet Date: Fri Mar 10 19:11:09 2023 +0000 net: tunnels: annotate lockless accesses to dev->needed_headroom IP tunnels can apparently update dev->needed_headroom in their xmit path. This patch takes care of three tunnels xmit, and also the core LL_RESERVED_SPACE() and LL_RESERVED_SPACE_EXTRA() helpers. More changes might be needed for completeness. BUG: KCSAN: data-race in ip_tunnel_xmit / ip_tunnel_xmit read to 0xffff88815b9da0ec of 2 bytes by task 888 on cpu 1: ip_tunnel_xmit+0x1270/0x1730 net/ipv4/ip_tunnel.c:803 __gre_xmit net/ipv4/ip_gre.c:469 [inline] ipgre_xmit+0x516/0x570 net/ipv4/ip_gre.c:661 __netdev_start_xmit include/linux/netdevice.h:4881 [inline] netdev_start_xmit include/linux/netdevice.h:4895 [inline] xmit_one net/core/dev.c:3580 [inline] dev_hard_start_xmit+0x127/0x400 net/core/dev.c:3596 __dev_queue_xmit+0x1007/0x1eb0 net/core/dev.c:4246 dev_queue_xmit include/linux/netdevice.h:3051 [inline] neigh_direct_output+0x17/0x20 net/core/neighbour.c:1623 neigh_output include/net/neighbour.h:546 [inline] ip_finish_output2+0x740/0x840 net/ipv4/ip_output.c:228 ip_finish_output+0xf4/0x240 net/ipv4/ip_output.c:316 NF_HOOK_COND include/linux/netfilter.h:291 [inline] ip_output+0xe5/0x1b0 net/ipv4/ip_output.c:430 dst_output include/net/dst.h:444 [inline] ip_local_out+0x64/0x80 net/ipv4/ip_output.c:126 iptunnel_xmit+0x34a/0x4b0 net/ipv4/ip_tunnel_core.c:82 ip_tunnel_xmit+0x1451/0x1730 net/ipv4/ip_tunnel.c:813 __gre_xmit net/ipv4/ip_gre.c:469 [inline] ipgre_xmit+0x516/0x570 net/ipv4/ip_gre.c:661 __netdev_start_xmit include/linux/netdevice.h:4881 [inline] netdev_start_xmit include/linux/netdevice.h:4895 [inline] xmit_one net/core/dev.c:3580 [inline] dev_hard_start_xmit+0x127/0x400 net/core/dev.c:3596 __dev_queue_xmit+0x1007/0x1eb0 net/core/dev.c:4246 dev_queue_xmit include/linux/netdevice.h:3051 [inline] neigh_direct_output+0x17/0x20 net/core/neighbour.c:1623 neigh_output include/net/neighbour.h:546 [inline] ip_finish_output2+0x740/0x840 net/ipv4/ip_output.c:228 ip_finish_output+0xf4/0x240 net/ipv4/ip_output.c:316 NF_HOOK_COND include/linux/netfilter.h:291 [inline] ip_output+0xe5/0x1b0 net/ipv4/ip_output.c:430 dst_output include/net/dst.h:444 [inline] ip_local_out+0x64/0x80 net/ipv4/ip_output.c:126 iptunnel_xmit+0x34a/0x4b0 net/ipv4/ip_tunnel_core.c:82 ip_tunnel_xmit+0x1451/0x1730 net/ipv4/ip_tunnel.c:813 __gre_xmit net/ipv4/ip_gre.c:469 [inline] ipgre_xmit+0x516/0x570 net/ipv4/ip_gre.c:661 __netdev_start_xmit include/linux/netdevice.h:4881 [inline] netdev_start_xmit include/linux/netdevice.h:4895 [inline] xmit_one net/core/dev.c:3580 [inline] dev_hard_start_xmit+0x127/0x400 net/core/dev.c:3596 __dev_queue_xmit+0x1007/0x1eb0 net/core/dev.c:4246 dev_queue_xmit include/linux/netdevice.h:3051 [inline] neigh_direct_output+0x17/0x20 net/core/neighbour.c:1623 neigh_output include/net/neighbour.h:546 [inline] ip_finish_output2+0x740/0x840 net/ipv4/ip_output.c:228 ip_finish_output+0xf4/0x240 net/ipv4/ip_output.c:316 NF_HOOK_COND include/linux/netfilter.h:291 [inline] ip_output+0xe5/0x1b0 net/ipv4/ip_output.c:430 dst_output include/net/dst.h:444 [inline] ip_local_out+0x64/0x80 net/ipv4/ip_output.c:126 iptunnel_xmit+0x34a/0x4b0 net/ipv4/ip_tunnel_core.c:82 ip_tunnel_xmit+0x1451/0x1730 net/ipv4/ip_tunnel.c:813 __gre_xmit net/ipv4/ip_gre.c:469 [inline] ipgre_xmit+0x516/0x570 net/ipv4/ip_gre.c:661 __netdev_start_xmit include/linux/netdevice.h:4881 [inline] netdev_start_xmit include/linux/netdevice.h:4895 [inline] xmit_one net/core/dev.c:3580 [inline] dev_hard_start_xmit+0x127/0x400 net/core/dev.c:3596 __dev_queue_xmit+0x1007/0x1eb0 net/core/dev.c:4246 dev_queue_xmit include/linux/netdevice.h:3051 [inline] neigh_direct_output+0x17/0x20 net/core/neighbour.c:1623 neigh_output include/net/neighbour.h:546 [inline] ip_finish_output2+0x740/0x840 net/ipv4/ip_output.c:228 ip_finish_output+0xf4/0x240 net/ipv4/ip_output.c:316 NF_HOOK_COND include/linux/netfilter.h:291 [inline] ip_output+0xe5/0x1b0 net/ipv4/ip_output.c:430 dst_output include/net/dst.h:444 [inline] ip_local_out+0x64/0x80 net/ipv4/ip_output.c:126 iptunnel_xmit+0x34a/0x4b0 net/ipv4/ip_tunnel_core.c:82 ip_tunnel_xmit+0x1451/0x1730 net/ipv4/ip_tunnel.c:813 __gre_xmit net/ipv4/ip_gre.c:469 [inline] ipgre_xmit+0x516/0x570 net/ipv4/ip_gre.c:661 __netdev_start_xmit include/linux/netdevice.h:4881 [inline] netdev_start_xmit include/linux/netdevice.h:4895 [inline] xmit_one net/core/dev.c:3580 [inline] dev_hard_start_xmit+0x127/0x400 net/core/dev.c:3596 __dev_queue_xmit+0x1007/0x1eb0 net/core/dev.c:4246 dev_queue_xmit include/linux/netdevice.h:3051 [inline] neigh_direct_output+0x17/0x20 net/core/neighbour.c:1623 neigh_output include/net/neighbour.h:546 [inline] ip_finish_output2+0x740/0x840 net/ipv4/ip_output.c:228 ip_finish_output+0xf4/0x240 net/ipv4/ip_output.c:316 NF_HOOK_COND include/linux/netfilter.h:291 [inline] ip_output+0xe5/0x1b0 net/ipv4/ip_output.c:430 dst_output include/net/dst.h:444 [inline] ip_local_out+0x64/0x80 net/ipv4/ip_output.c:126 iptunnel_xmit+0x34a/0x4b0 net/ipv4/ip_tunnel_core.c:82 ip_tunnel_xmit+0x1451/0x1730 net/ipv4/ip_tunnel.c:813 __gre_xmit net/ipv4/ip_gre.c:469 [inline] ipgre_xmit+0x516/0x570 net/ipv4/ip_gre.c:661 __netdev_start_xmit include/linux/netdevice.h:4881 [inline] netdev_start_xmit include/linux/netdevice.h:4895 [inline] xmit_one net/core/dev.c:3580 [inline] dev_hard_start_xmit+0x127/0x400 net/core/dev.c:3596 __dev_queue_xmit+0x1007/0x1eb0 net/core/dev.c:4246 dev_queue_xmit include/linux/netdevice.h:3051 [inline] neigh_direct_output+0x17/0x20 net/core/neighbour.c:1623 neigh_output include/net/neighbour.h:546 [inline] ip_finish_output2+0x740/0x840 net/ipv4/ip_output.c:228 ip_finish_output+0xf4/0x240 net/ipv4/ip_output.c:316 NF_HOOK_COND include/linux/netfilter.h:291 [inline] ip_output+0xe5/0x1b0 net/ipv4/ip_output.c:430 dst_output include/net/dst.h:444 [inline] ip_local_out+0x64/0x80 net/ipv4/ip_output.c:126 iptunnel_xmit+0x34a/0x4b0 net/ipv4/ip_tunnel_core.c:82 ip_tunnel_xmit+0x1451/0x1730 net/ipv4/ip_tunnel.c:813 __gre_xmit net/ipv4/ip_gre.c:469 [inline] ipgre_xmit+0x516/0x570 net/ipv4/ip_gre.c:661 __netdev_start_xmit include/linux/netdevice.h:4881 [inline] netdev_start_xmit include/linux/netdevice.h:4895 [inline] xmit_one net/core/dev.c:3580 [inline] dev_hard_start_xmit+0x127/0x400 net/core/dev.c:3596 __dev_queue_xmit+0x1007/0x1eb0 net/core/dev.c:4246 write to 0xffff88815b9da0ec of 2 bytes by task 2379 on cpu 0: ip_tunnel_xmit+0x1294/0x1730 net/ipv4/ip_tunnel.c:804 __gre_xmit net/ipv4/ip_gre.c:469 [inline] ipgre_xmit+0x516/0x570 net/ipv4/ip_gre.c:661 __netdev_start_xmit include/linux/netdevice.h:4881 [inline] netdev_start_xmit include/linux/netdevice.h:4895 [inline] xmit_one net/core/dev.c:3580 [inline] dev_hard_start_xmit+0x127/0x400 net/core/dev.c:3596 __dev_queue_xmit+0x1007/0x1eb0 net/core/dev.c:4246 dev_queue_xmit include/linux/netdevice.h:3051 [inline] neigh_direct_output+0x17/0x20 net/core/neighbour.c:1623 neigh_output include/net/neighbour.h:546 [inline] ip6_finish_output2+0x9bc/0xc50 net/ipv6/ip6_output.c:134 __ip6_finish_output net/ipv6/ip6_output.c:195 [inline] ip6_finish_output+0x39a/0x4e0 net/ipv6/ip6_output.c:206 NF_HOOK_COND include/linux/netfilter.h:291 [inline] ip6_output+0xeb/0x220 net/ipv6/ip6_output.c:227 dst_output include/net/dst.h:444 [inline] NF_HOOK include/linux/netfilter.h:302 [inline] mld_sendpack+0x438/0x6a0 net/ipv6/mcast.c:1820 mld_send_cr net/ipv6/mcast.c:2121 [inline] mld_ifc_work+0x519/0x7b0 net/ipv6/mcast.c:2653 process_one_work+0x3e6/0x750 kernel/workqueue.c:2390 worker_thread+0x5f2/0xa10 kernel/workqueue.c:2537 kthread+0x1ac/0x1e0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 value changed: 0x0dd4 -> 0x0e14 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 2379 Comm: kworker/0:0 Not tainted 6.3.0-rc1-syzkaller-00002-g8ca09d5fa354-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Workqueue: mld mld_ifc_work Fixes: 8eb30be0352d ("ipv6: Create ip6_tnl_xmit") Reported-by: syzbot Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20230310191109.2384387-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 248401cb2c4612d83eb0c352ee8103b78b8eb365 Author: Dave Ertman Date: Fri Mar 10 11:48:33 2023 -0800 ice: avoid bonding causing auxiliary plug/unplug under RTNL lock RDMA is not supported in ice on a PF that has been added to a bonded interface. To enforce this, when an interface enters a bond, we unplug the auxiliary device that supports RDMA functionality. This unplug currently happens in the context of handling the netdev bonding event. This event is sent to the ice driver under RTNL context. This is causing a deadlock where the RDMA driver is waiting for the RTNL lock to complete the removal. Defer the unplugging/re-plugging of the auxiliary device to the service task so that it is not performed under the RTNL lock context. Cc: stable@vger.kernel.org # 6.1.x Reported-by: Jaroslav Pulchart Link: https://lore.kernel.org/netdev/CAK8fFZ6A_Gphw_3-QMGKEFQk=sfCw1Qmq0TVZK3rtAi7vb621A@mail.gmail.com/ Fixes: 5cb1ebdbc434 ("ice: Fix race condition during interface enslave") Fixes: 4eace75e0853 ("RDMA/irdma: Report the correct link speed") Signed-off-by: Dave Ertman Tested-by: Arpana Arland (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20230310194833.3074601-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 36862e14e31611f9786622db366327209a7aede7 Author: Masahiro Yamada Date: Mon Mar 13 05:07:30 2023 +0900 kbuild: deb-pkg: use dh_listpackages to know enabled packages Use dh_listpackages to get a list of all binary packages. With this, debian/control lists which binary packages will be produced. Previously, ARCH=um listed linux-libc-dev in debian/control, but it was not generated because each of mkdebian and builddeb independently maintained the if-conditionals. Another motivation is to allow scripts/package/builddeb to get the package name (linux-image-*, etc.) dynamically from debian/control. This will also allow the BuildProfile to control the generation of the binary packages. Signed-off-by: Masahiro Yamada commit b611daae5efc64e817171a54021d3b334cc1bc41 Author: Masahiro Yamada Date: Mon Mar 13 05:07:29 2023 +0900 kbuild: deb-pkg: split image and debug objects staging out into functions Prepare for the refactoring in the next commit. Signed-off-by: Masahiro Yamada commit f50aa51c4498d7886cfd9dbf439a2332f234a755 Author: Masahiro Yamada Date: Mon Mar 13 05:07:28 2023 +0900 kbuild: deb-pkg: set CROSS_COMPILE only when undefined Commit 3ab18a625ce4 ("kbuild: deb-pkg: improve the usability of source package") set needless CROSS_COMPILE. For example, 'make allnoconfig bindeb-pkg' on a x86_64 system will set CROSS_COMPILE=i686-linux-gnu-, where the biarch compiler 'gcc' should work for building the i386 kernel. $ uname -m x86_64 $ make allnoconfig bindeb-pkg >/dev/null dpkg-architecture: warning: specified GNU system type i686-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable dpkg-source --before-build . debian/rules binary scripts/Kconfig.include:39: C compiler 'i686-linux-gnu-gcc' not found make[6]: *** [scripts/kconfig/Makefile:77: olddefconfig] Error 1 make[5]: *** [Makefile:693: olddefconfig] Error 2 make[4]: *** [Makefile:358: __build_one_by_one] Error 2 make[3]: *** [debian/rules:7: build-arch] Error 2 dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 make[2]: *** [scripts/Makefile.package:127: bindeb-pkg] Error 2 make[1]: *** [Makefile:1657: bindeb-pkg] Error 2 make: *** [Makefile:358: __build_one_by_one] Error 2 Check whether CROSS_COMPILE is defined, instead of whether it is non-empty. If you invoke debian/rules via Kbuild, CROSS_COMPILE is always defined in the top Makefile. Fixes: 3ab18a625ce4 ("kbuild: deb-pkg: improve the usability of source package") Signed-off-by: Masahiro Yamada commit 7a531c21f83d7c62825d00bee3a76c1ccfb5de9f Author: Masahiro Yamada Date: Mon Mar 13 05:07:27 2023 +0900 kbuild: deb-pkg: do not take KERNELRELEASE from the source version KERNELRELEASE does not need to match the package version in changelog. Rather, it conventially matches what is called 'ABINAME', which is a part of the binary package names. Both are the same by default, but the former might be overridden by KDEB_PKGVERSION. In this case, the resulting package would not boot because /lib/modules/$(uname -r) does not point the module directory. Partially revert 3ab18a625ce4 ("kbuild: deb-pkg: improve the usability of source package"). Reported-by: Péter Ujfalusi Fixes: 3ab18a625ce4 ("kbuild: deb-pkg: improve the usability of source package") Signed-off-by: Masahiro Yamada Tested-by: Peter Ujfalusi commit 2fd6c4553c962ec7ea8a60c0a3632c7e984800f0 Author: Masahiro Yamada Date: Mon Mar 13 05:07:26 2023 +0900 kbuild: deb-pkg: make debian source package working again Since commit c5bf2efb058d ("kbuild: deb-pkg: fix binary-arch and clean in debian/rules"), the source package generated by 'make deb-pkg' fails to build. I terribly missed the fact that the intdeb-pkg target may regenerate include/config/kernel.release due to the following in the top Makefile: %pkg: include/config/kernel.release FORCE Restore KERNELRELEASE= option to avoid the kernel.release disagreement between build-arch and binary-arch. Fixes: c5bf2efb058d ("kbuild: deb-pkg: fix binary-arch and clean in debian/rules") Signed-off-by: Masahiro Yamada commit c753ccb2629f536b8c4feae5c223d5873c814d23 Author: Tzafrir Cohen Date: Tue Mar 14 15:02:48 2023 +0200 Makefile: Make kernelrelease target work with M= That commit required the use of filechk_kernel.release for the kernelrelease Makefile target. It is currently only being set when KBUILD_EXTMOD is not set. Make sure it is set in that case as well. Fixes: 1cb86b6c3136 ("kbuild: save overridden KERNELRELEASE in include/config/kernel.release") Signed-off-by: Tzafrir Cohen Signed-off-by: Masahiro Yamada commit 6284e46bdd47743a064fe6ac834a7ac05b1fd206 Author: Paulo Alcantara Date: Tue Mar 14 20:32:56 2023 -0300 cifs: use DFS root session instead of tcon ses Use DFS root session whenever possible to get new DFS referrals otherwise we might end up with an IPC tcon (tcon->ses->tcon_ipc) that doesn't respond to them. It should be safe accessing @ses->dfs_root_ses directly in cifs_inval_name_dfs_link_error() as it has same lifetime as of @tcon. Signed-off-by: Paulo Alcantara (SUSE) Cc: stable@vger.kernel.org # 6.2 Signed-off-by: Steve French commit f446a630802f154ef0087771683bd4f8e9d08384 Author: Paulo Alcantara Date: Tue Mar 14 20:32:55 2023 -0300 cifs: return DFS root session id in DebugData Return the DFS root session id in /proc/fs/cifs/DebugData to make it easier to track which IPC tcon was used to get new DFS referrals for a specific connection, and aids in debugging. A simple output of it would be Sessions: 1) Address: 192.168.1.13 Uses: 1 Capability: 0x300067 Session Status: 1 Security type: RawNTLMSSP SessionId: 0xd80000000009 User: 0 Cred User: 0 DFS root session id: 0x128006c000035 Signed-off-by: Paulo Alcantara (SUSE) Cc: stable@vger.kernel.org # 6.2 Signed-off-by: Steve French commit 6015b1aca1a233379625385feb01dd014aca60b5 Author: Linus Torvalds Date: Tue Mar 14 19:32:38 2023 -0700 sched_getaffinity: don't assume 'cpumask_size()' is fully initialized The getaffinity() system call uses 'cpumask_size()' to decide how big the CPU mask is - so far so good. It is indeed the allocation size of a cpumask. But the code also assumes that the whole allocation is initialized without actually doing so itself. That's wrong, because we might have fixed-size allocations (making copying and clearing more efficient), but not all of it is then necessarily used if 'nr_cpu_ids' is smaller. Having checked other users of 'cpumask_size()', they all seem to be ok, either using it purely for the allocation size, or explicitly zeroing the cpumask before using the size in bytes to copy it. See for example the ublk_ctrl_get_queue_affinity() function that uses the proper 'zalloc_cpumask_var()' to make sure that the whole mask is cleared, whether the storage is on the stack or if it was an external allocation. Fix this by just zeroing the allocation before using it. Do the same for the compat version of sched_getaffinity(), which had the same logic. Also, for consistency, make sched_getaffinity() use 'cpumask_bits()' to access the bits. For a cpumask_var_t, it ends up being a pointer to the same data either way, but it's just a good idea to treat it like you would a 'cpumask_t'. The compat case already did that. Reported-by: Ryan Roberts Link: https://lore.kernel.org/lkml/7d026744-6bd6-6827-0471-b5e8eae0be3f@arm.com/ Cc: Yury Norov Signed-off-by: Linus Torvalds commit 47dd902aaee9b9341808a3a994793199e7eddb88 Author: Dylan Jhong Date: Fri Mar 10 15:50:21 2023 +0800 RISC-V: mm: Support huge page in vmalloc_fault() Since RISC-V supports ioremap() with huge page (pud/pmd) mapping, However, vmalloc_fault() assumes that the vmalloc range is limited to pte mappings. To complete the vmalloc_fault() function by adding huge page support. Fixes: 310f541a027b ("riscv: Enable HAVE_ARCH_HUGE_VMAP for 64BIT") Cc: stable@vger.kernel.org Signed-off-by: Dylan Jhong Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20230310075021.3919290-1-dylan@andestech.com Signed-off-by: Palmer Dabbelt commit 396935de145589c8bfe552fa03a5e38604071829 Author: Paulo Alcantara Date: Tue Mar 14 20:32:54 2023 -0300 cifs: fix use-after-free bug in refresh_cache_worker() The UAF bug occurred because we were putting DFS root sessions in cifs_umount() while DFS cache refresher was being executed. Make DFS root sessions have same lifetime as DFS tcons so we can avoid the use-after-free bug is DFS cache refresher and other places that require IPCs to get new DFS referrals on. Also, get rid of mount group handling in DFS cache as we no longer need it. This fixes below use-after-free bug catched by KASAN [ 379.946955] BUG: KASAN: use-after-free in __refresh_tcon.isra.0+0x10b/0xc10 [cifs] [ 379.947642] Read of size 8 at addr ffff888018f57030 by task kworker/u4:3/56 [ 379.948096] [ 379.948208] CPU: 0 PID: 56 Comm: kworker/u4:3 Not tainted 6.2.0-rc7-lku #23 [ 379.948661] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.0-0-gd239552-rebuilt.opensuse.org 04/01/2014 [ 379.949368] Workqueue: cifs-dfscache refresh_cache_worker [cifs] [ 379.949942] Call Trace: [ 379.950113] [ 379.950260] dump_stack_lvl+0x50/0x67 [ 379.950510] print_report+0x16a/0x48e [ 379.950759] ? __virt_addr_valid+0xd8/0x160 [ 379.951040] ? __phys_addr+0x41/0x80 [ 379.951285] kasan_report+0xdb/0x110 [ 379.951533] ? __refresh_tcon.isra.0+0x10b/0xc10 [cifs] [ 379.952056] ? __refresh_tcon.isra.0+0x10b/0xc10 [cifs] [ 379.952585] __refresh_tcon.isra.0+0x10b/0xc10 [cifs] [ 379.953096] ? __pfx___refresh_tcon.isra.0+0x10/0x10 [cifs] [ 379.953637] ? __pfx___mutex_lock+0x10/0x10 [ 379.953915] ? lock_release+0xb6/0x720 [ 379.954167] ? __pfx_lock_acquire+0x10/0x10 [ 379.954443] ? refresh_cache_worker+0x34e/0x6d0 [cifs] [ 379.954960] ? __pfx_wb_workfn+0x10/0x10 [ 379.955239] refresh_cache_worker+0x4ad/0x6d0 [cifs] [ 379.955755] ? __pfx_refresh_cache_worker+0x10/0x10 [cifs] [ 379.956323] ? __pfx_lock_acquired+0x10/0x10 [ 379.956615] ? read_word_at_a_time+0xe/0x20 [ 379.956898] ? lockdep_hardirqs_on_prepare+0x12/0x220 [ 379.957235] process_one_work+0x535/0x990 [ 379.957509] ? __pfx_process_one_work+0x10/0x10 [ 379.957812] ? lock_acquired+0xb7/0x5f0 [ 379.958069] ? __list_add_valid+0x37/0xd0 [ 379.958341] ? __list_add_valid+0x37/0xd0 [ 379.958611] worker_thread+0x8e/0x630 [ 379.958861] ? __pfx_worker_thread+0x10/0x10 [ 379.959148] kthread+0x17d/0x1b0 [ 379.959369] ? __pfx_kthread+0x10/0x10 [ 379.959630] ret_from_fork+0x2c/0x50 [ 379.959879] Signed-off-by: Paulo Alcantara (SUSE) Cc: stable@vger.kernel.org # 6.2 Signed-off-by: Steve French commit b56bce502f55505a97e381d546ee881928183126 Author: Paulo Alcantara Date: Tue Mar 14 20:32:53 2023 -0300 cifs: set DFS root session in cifs_get_smb_ses() Set the DFS root session pointer earlier when creating a new SMB session to prevent racing with smb2_reconnect(), cifs_reconnect_tcon() and DFS cache refresher. Signed-off-by: Paulo Alcantara (SUSE) Cc: stable@vger.kernel.org # 6.2 Signed-off-by: Steve French commit dc472c7612297ffc9aea655bf6e9538bec5bfedf Author: Ondrej Zary Date: Sat Mar 11 20:25:38 2023 +0100 ata: pata_parport: fix parport release without claim When adapter is not found, pi->disconnect() is called without previous pi->connect(). This results in error like this: parport0: pata_parport tried to release parport when not owner Add missing out_disconnect label and use it correctly. Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov Signed-off-by: Damien Le Moal commit 00e885efcfbb8712d3e1bfc1ae30639c15ca1d3b Author: Chris Leech Date: Fri Mar 10 09:09:13 2023 +0800 blk-mq: fix "bad unlock balance detected" on q->srcu in __blk_mq_run_dispatch_ops The 'q' parameter of the macro __blk_mq_run_dispatch_ops may not be one local variable, such as, it is rq->q, then request queue pointed by this variable could be changed to another queue in case of BLK_MQ_F_TAG_QUEUE_SHARED after 'dispatch_ops' returns, then 'bad unlock balance' is triggered. Fixes the issue by adding one local variable for doing srcu lock/unlock. Fixes: 2a904d00855f ("blk-mq: remove hctx_lock and hctx_unlock") Cc: Marco Patalano Signed-off-by: Chris Leech Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20230310010913.1014789-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 9b0cb770f5d7b1ff40bea7ca385438ee94570eec Author: Bart Van Assche Date: Tue Mar 14 11:21:54 2023 -0700 loop: Fix use-after-free issues do_req_filebacked() calls blk_mq_complete_request() synchronously or asynchronously when using asynchronous I/O unless memory allocation fails. Hence, modify loop_handle_cmd() such that it does not dereference 'cmd' nor 'rq' after do_req_filebacked() finished unless we are sure that the request has not yet been completed. This patch fixes the following kernel crash: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000054 Call trace: css_put.42938+0x1c/0x1ac loop_process_work+0xc8c/0xfd4 loop_rootcg_workfn+0x24/0x34 process_one_work+0x244/0x558 worker_thread+0x400/0x8fc kthread+0x16c/0x1e0 ret_from_fork+0x10/0x20 Cc: Christoph Hellwig Cc: Ming Lei Cc: Jan Kara Cc: Johannes Weiner Cc: Dan Schatzberg Fixes: c74d40e8b5e2 ("loop: charge i/o to mem and blk cg") Fixes: bc07c10a3603 ("block: loop: support DIO & AIO") Signed-off-by: Bart Van Assche Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20230314182155.80625-1-bvanassche@acm.org Signed-off-by: Jens Axboe commit 26e2878b3e18530c6198354a561be202235bd325 Merge: 29db00c252c7d dd52a61da0dd8 Author: Linus Torvalds Date: Tue Mar 14 17:13:58 2023 -0700 Merge tag 'mm-hotfixes-stable-2023-03-14-16-51' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "Eleven hotfixes. Four of these are cc:stable and the remainder address post-6.2 issues or aren't considered suitable for backporting. Seven of these fixes are for MM" * tag 'mm-hotfixes-stable-2023-03-14-16-51' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: mm/damon/paddr: fix folio_nr_pages() after folio_put() in damon_pa_mark_accessed_or_deactivate() mm/damon/paddr: fix folio_size() call after folio_put() in damon_pa_young() ocfs2: fix data corruption after failed write migrate_pages: try migrate in batch asynchronously firstly migrate_pages: move split folios processing out of migrate_pages_batch() migrate_pages: fix deadlock in batched migration .mailmap: add Alexandre Ghiti personal email address mailmap: correct Dikshita Agarwal's Qualcomm email address mailmap: updates for Jarkko Sakkinen mm/userfaultfd: propagate uffd-wp bit when PTE-mapping the huge zeropage mm: teach mincore_hugetlb about pte markers commit 29db00c252c7d0e015f3b436647b6f87d5854833 Merge: ed38ff164fba9 c2679254b9c99 Author: Linus Torvalds Date: Tue Mar 14 17:07:54 2023 -0700 Merge tag 'trace-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fixes from Steven Rostedt: - Do not allow histogram values to have modifies. They can cause a NULL pointer dereference if they do. - Warn if hist_field_name() is passed a NULL. Prevent the NULL pointer dereference mentioned above. - Fix invalid address look up race in lookup_rec() - Define ftrace_stub_graph conditionally to prevent linker errors - Always check if RCU is watching at all tracepoint locations * tag 'trace-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing: Make tracepoint lockdep check actually test something ftrace,kcfi: Define ftrace_stub_graph conditionally ftrace: Fix invalid address access in lookup_rec() when index is 0 tracing: Check field value in hist_field_name() tracing: Do not let histogram values have some modifiers commit ed38ff164fba98a21993c95d240013f32309ccab Merge: c0856b7c14b69 6906598f1ce93 Author: Linus Torvalds Date: Tue Mar 14 17:03:25 2023 -0700 Merge tag 'zstd-linus-v6.3-rc3' of https://github.com/terrelln/linux Pull zstd fixes from Nick Terrell: "A small number of fixes for zstd-v1.5.2. I'm not pulling in zstd-v1.5.4 from upstream this release because it didn't have any time to bake in linux-next, but I'm aiming for the next update in v6.4" * tag 'zstd-linus-v6.3-rc3' of https://github.com/terrelln/linux: zstd: Fix definition of assert() lib: zstd: Backport fix for in-place decompression lib: zstd: Fix -Wstringop-overflow warning commit c0856b7c14b690ef9917cdb1d94e96169212e43b Merge: 4979bf8668255 5cf9d015be160 Author: Linus Torvalds Date: Tue Mar 14 16:58:33 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 collection of clk driver fixes, and a couple OF clk patches to fix regressions seen in the last few weeks. The fwnode patch broke the build for one driver that isn't always compiled, so I waited over the weekend to be certain no more build issues came up. - Mark the firmware node (fwnode) that matches the compatible in CLK_OF_DECLARE() as initialized to fix a regression on u8500 SoCs after fw_devlink stopped checking parent nodes in of_link_to_phandle() - Remove a couple MODULE_LICENSE macros in non-modules - Update the maintainers file for Microchip clk drivers - Use 'select' instead of 'depend on' for the REGMAP config to fix Kconfig issues - Use div_u64() for portable 64-bit division in K210 clk driver" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: Avoid invalid function names in CLK_OF_DECLARE() clk: k210: remove an implicit 64-bit division MAINTAINERS: add missing clock driver coverage for Microchip FPGAs clk: HI655X: select REGMAP instead of depending on it kbuild, clk: remove MODULE_LICENSE in non-modules kbuild, clk: bcm2835: remove MODULE_LICENSE in non-modules clk: Mark a fwnode as initialized when using CLK_OF_DECLARE() macro commit f959325e6ac3f499450088b8d9c626d1177be160 Author: Nathan Huckleberry Date: Fri Mar 10 11:33:25 2023 -0800 fsverity: Remove WQ_UNBOUND from fsverity read workqueue WQ_UNBOUND causes significant scheduler latency on ARM64/Android. This is problematic for latency sensitive workloads, like I/O post-processing. Removing WQ_UNBOUND gives a 96% reduction in fsverity workqueue related scheduler latency and improves app cold startup times by ~30ms. WQ_UNBOUND was also removed from the dm-verity workqueue for the same reason [1]. This code was tested by running Android app startup benchmarks and measuring how long the fsverity workqueue spent in the runnable state. Before Total workqueue scheduler latency: 553800us After Total workqueue scheduler latency: 18962us [1]: https://lore.kernel.org/all/20230202012348.885402-1-nhuck@google.com/ Signed-off-by: Nathan Huckleberry Fixes: 8a1d0f9cacc9 ("fs-verity: add data verification hooks for ->readpages()") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230310193325.620493-1-nhuck@google.com Signed-off-by: Eric Biggers commit 05ce0448c3f36febd8db0ee0e9e16557f3ab5ee8 Author: Shyam Prasad N Date: Fri Mar 10 15:32:01 2023 +0000 cifs: generate signkey for the channel that's reconnecting Before my changes to how multichannel reconnects work, the primary channel was always used to do a non-binding session setup. With my changes, that is not the case anymore. Missed this place where channel at index 0 was forcibly updated with the signing key. Signed-off-by: Shyam Prasad N Reviewed-by: Paulo Alcantara (SUSE) Cc: stable@vger.kernel.org Signed-off-by: Steve French commit 211baef0eabf4169ce4f73ebd917749d1a7edd74 Author: Volker Lendecke Date: Mon Mar 13 16:09:54 2023 +0100 cifs: Fix smb2_set_path_size() If cifs_get_writable_path() finds a writable file, smb2_compound_op() must use that file's FID and not the COMPOUND_FID. Cc: stable@vger.kernel.org Signed-off-by: Volker Lendecke Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit c2679254b9c9980d9045f0f722cf093a2b1f7590 Author: Steven Rostedt (Google) Date: Fri Mar 10 17:28:56 2023 -0500 tracing: Make tracepoint lockdep check actually test something A while ago where the trace events had the following: rcu_read_lock_sched_notrace(); rcu_dereference_sched(...); rcu_read_unlock_sched_notrace(); If the tracepoint is enabled, it could trigger RCU issues if called in the wrong place. And this warning was only triggered if lockdep was enabled. If the tracepoint was never enabled with lockdep, the bug would not be caught. To handle this, the above sequence was done when lockdep was enabled regardless if the tracepoint was enabled or not (although the always enabled code really didn't do anything, it would still trigger a warning). But a lot has changed since that lockdep code was added. One is, that sequence no longer triggers any warning. Another is, the tracepoint when enabled doesn't even do that sequence anymore. The main check we care about today is whether RCU is "watching" or not. So if lockdep is enabled, always check if rcu_is_watching() which will trigger a warning if it is not (tracepoints require RCU to be watching). Note, that old sequence did add a bit of overhead when lockdep was enabled, and with the latest kernel updates, would cause the system to slow down enough to trigger kernel "stalled" warnings. Link: http://lore.kernel.org/lkml/20140806181801.GA4605@redhat.com Link: http://lore.kernel.org/lkml/20140807175204.C257CAC5@viggo.jf.intel.com Link: https://lore.kernel.org/lkml/20230307184645.521db5c9@gandalf.local.home/ Link: https://lore.kernel.org/linux-trace-kernel/20230310172856.77406446@gandalf.local.home Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Dave Hansen Cc: "Paul E. McKenney" Cc: Mathieu Desnoyers Cc: Joel Fernandes Acked-by: Peter Zijlstra (Intel) Acked-by: Paul E. McKenney Fixes: e6753f23d961 ("tracepoint: Make rcuidle tracepoint callers use SRCU") Signed-off-by: Steven Rostedt (Google) commit 0bc23d8b2237a104d7f8379d687aa4cb82e2968b Author: Chen Yu Date: Wed Mar 8 21:23:09 2023 +0800 ACPI: tools: pfrut: Check if the input of level and type is in the right numeric range The user provides arbitrary non-numeic value to level and type, which could bring unexpected behavior. In this case the expected behavior would be to throw an error. pfrut -h usage: pfrut [OPTIONS] code injection: -l, --load -s, --stage -a, --activate -u, --update [stage and activate] -q, --query -d, --revid update telemetry: -G, --getloginfo -T, --type(0:execution, 1:history) -L, --level(0, 1, 2, 4) -R, --read -D, --revid log pfrut -T A pfrut -G log_level:0 log_type:0 log_revid:2 max_data_size:65536 chunk1_size:0 chunk2_size:1530 rollover_cnt:0 reset_cnt:17 Fix this by restricting the input to be in the expected range. Reported-by: Hariganesh Govindarajulu Suggested-by: "Rafael J. Wysocki" Signed-off-by: Chen Yu Signed-off-by: Rafael J. Wysocki commit 91d7b60a65d9f71230ea09b86d2058a884a3c2af Author: Sudeep Holla Date: Wed Mar 8 11:26:32 2023 +0000 ACPI: PPTT: Fix to avoid sleep in the atomic context when PPTT is absent Commit 0c80f9e165f8 ("ACPI: PPTT: Leave the table mapped for the runtime usage") enabled to map PPTT once on the first invocation of acpi_get_pptt() and never unmapped the same allowing it to be used at runtime with out the hassle of mapping and unmapping the table. This was needed to fetch LLC information from the PPTT in the cpuhotplug path which is executed in the atomic context as the acpi_get_table() might sleep waiting for a mutex. However it missed to handle the case when there is no PPTT on the system which results in acpi_get_pptt() being called from all the secondary CPUs attempting to fetch the LLC information in the atomic context without knowing the absence of PPTT resulting in the splat like below: | BUG: sleeping function called from invalid context at kernel/locking/semaphore.c:164 | in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 0, name: swapper/1 | preempt_count: 1, expected: 0 | RCU nest depth: 0, expected: 0 | no locks held by swapper/1/0. | irq event stamp: 0 | hardirqs last enabled at (0): 0x0 | hardirqs last disabled at (0): copy_process+0x61c/0x1b40 | softirqs last enabled at (0): copy_process+0x61c/0x1b40 | softirqs last disabled at (0): 0x0 | CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.3.0-rc1 #1 | Call trace: | dump_backtrace+0xac/0x138 | show_stack+0x30/0x48 | dump_stack_lvl+0x60/0xb0 | dump_stack+0x18/0x28 | __might_resched+0x160/0x270 | __might_sleep+0x58/0xb0 | down_timeout+0x34/0x98 | acpi_os_wait_semaphore+0x7c/0xc0 | acpi_ut_acquire_mutex+0x58/0x108 | acpi_get_table+0x40/0xe8 | acpi_get_pptt+0x48/0xa0 | acpi_get_cache_info+0x38/0x140 | init_cache_level+0xf4/0x118 | detect_cache_attributes+0x2e4/0x640 | update_siblings_masks+0x3c/0x330 | store_cpu_topology+0x88/0xf0 | secondary_start_kernel+0xd0/0x168 | __secondary_switched+0xb8/0xc0 Update acpi_get_pptt() to consider the fact that PPTT is once checked and is not available on the system and return NULL avoiding any attempts to fetch PPTT and thereby avoiding any possible sleep waiting for a mutex in the atomic context. Fixes: 0c80f9e165f8 ("ACPI: PPTT: Leave the table mapped for the runtime usage") Reported-by: Aishwarya TCV Signed-off-by: Sudeep Holla Tested-by: Pierre Gondois Cc: 6.0+ # 6.0+ Signed-off-by: Rafael J. Wysocki commit 21fd9e8700de86d1169f6336e97d7a74916ed04a Author: Chengen Du Date: Wed Mar 8 16:03:27 2023 +0800 NFS: Correct timing for assigning access cache timestamp When the user's login time is newer than the cache's timestamp, the original entry in the RB-tree will be replaced by a new entry. Currently, the timestamp is only set if the entry is not found in the RB-tree, which can cause the timestamp to be undefined when the entry exists. This may result in a significant increase in ACCESS operations if the timestamp is set to zero. Signed-off-by: Chengen Du Fixes: 0eb43812c027 ("NFS: Clear the file access cache upon login”) Reviewed-by: Benjamin Coddington Signed-off-by: Anna Schumaker commit 4979bf8668255a67449714653314662fbc7e5bdb Merge: fc89d7fb499b0 d7ba3657d5162 Author: Linus Torvalds Date: Tue Mar 14 11:08:28 2023 -0700 Merge tag 'docs-6.3-fixes' of git://git.lwn.net/linux Pull documentation fixes from Jonathan Corbet: "A handful of fixes and minor documentation updates" * tag 'docs-6.3-fixes' of git://git.lwn.net/linux: docs: vfio: fix header path docs: process: typo fix docs/mm: hugetlbfs_reserv: fix a reference to a file that doesn't exist docs/mm: Physical Memory: fix a reference to a file that doesn't exist docs: rebasing-and-merging: Drop wrong statement about git docs: programming-language: add Rust programming language section docs: programming-language: remove mention of the Intel compiler docs: Correct missing "d_" prefix for dentry_operations member d_weak_revalidate sched/doc: supplement CPU capacity with RISC-V commit 7ff84910c66c9144cc0de9d9deed9fb84c03aff0 Author: Jeff Layton Date: Tue Mar 14 06:20:58 2023 -0400 lockd: set file_lock start and end when decoding nlm4 testargs Commit 6930bcbfb6ce dropped the setting of the file_lock range when decoding a nlm_lock off the wire. This causes the client side grant callback to miss matching blocks and reject the lock, only to rerequest it 30s later. Add a helper function to set the file_lock range from the start and end values that the protocol uses, and have the nlm_lock decoder call that to set up the file_lock args properly. Fixes: 6930bcbfb6ce ("lockd: detect and reject lock arguments that overflow") Reported-by: Amir Goldstein Signed-off-by: Jeff Layton Tested-by: Amir Goldstein Cc: stable@vger.kernel.org #6.0 Signed-off-by: Anna Schumaker commit 6fa7f537351c8fad0e43e9279efe76dbc942bea0 Author: Todd Brandt Date: Mon Mar 13 15:26:52 2023 -0700 pm-graph: sleepgraph: Avoid crashing on binary data in device names A regression has occurred in the hid-sensor code where a device name string has not been initialized to 0, and ends up without a NULL char and is printed with %s. This includes random binary data in the device name, which makes its way into the ftrace output and ends up crashing sleepgraph because it expects the ftrace output to be ASCII only. For example: "HID-SENSOR-INT-020b?.39.auto" ends up in ftrace instead of "HID-SENSOR-INT-020b.39.auto". It causes this crash in sleepgraph: File "/usr/bin/sleepgraph", line 5579, in executeSuspend for line in fp: File "/usr/lib/python3.10/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 1568: invalid start byte The issue is present in 6.3-rc1 and is described in full here: https://bugzilla.kernel.org/show_bug.cgi?id=217169 A separate fix has been submitted to have this issue repaired, but it has also exposed a larger bug in sleepgraph, since nothing should make sleepgraph crash. Sleepgraph needs to be able to handle binary data showing up in ftrace gracefully. Modify the ftrace processing code to treat it as potentially binary and to filter out binary data and leave just the ASCII. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217169 Fixes: 98c062e82451 ("HID: hid-sensor-custom: Allow more custom iio sensors") Signed-off-by: Todd Brandt [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit e140980ef211d537833500377ae411c3f232b41d Author: Arnd Bergmann Date: Tue Mar 14 17:27:10 2023 +0100 fbdev: omapfb: remove omap1 osk driver Commit 21a3e6eed423 ("ARM: omap1: remove osk-mistral add-on board support") removed the platform_device definition for the "lcd_osk" device, so this driver is now unused and can be removed as well. Signed-off-by: Arnd Bergmann Signed-off-by: Helge Deller commit 4c7e8e05bca577380d03a2731a14b3cb5652b4f3 Author: Yang Li Date: Tue Mar 14 13:42:19 2023 +0800 fbdev: xilinxfb: 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: Helge Deller commit be66c2cbc05ed84821f3dde6439044ab44506525 Author: Yang Li Date: Tue Mar 14 13:42:18 2023 +0800 fbdev: wm8505fb: 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: Helge Deller commit 0db0a1eb444dc9f79241d673ea611741211acdae Author: Yang Li Date: Tue Mar 14 13:42:17 2023 +0800 fbdev: pxa3xx-gcu: 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: Helge Deller commit 096dc32bb73d20e0854b3a471379f577f903f0ee Author: Rob Herring Date: Fri Mar 10 08:47:30 2023 -0600 fbdev: 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: Helge Deller commit 7eb1220f4bde36a15b26e8f54480406c72081bfa Author: Yang Li Date: Wed Mar 8 13:49:50 2023 +0800 fbdev: clps711x-fb: 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: Helge Deller commit f90bd245de82c095187d8c2cabb8b488a39eaecc Author: Wei Chen Date: Tue Mar 7 13:08:56 2023 +0000 fbdev: tgafb: Fix potential divide by zero fb_set_var would by called when user invokes ioctl with cmd FBIOPUT_VSCREENINFO. User-provided data would finally reach tgafb_check_var. In case var->pixclock is assigned to zero, divide by zero would occur when checking whether reciprocal of var->pixclock is too high. Similar crashes have happened in other fbdev drivers. There is no check and modification on var->pixclock along the call chain to tgafb_check_var. We believe it could also be triggered in driver tgafb from user site. Signed-off-by: Wei Chen Signed-off-by: Helge Deller commit 33bf61c0a1a97e2abff3117751eabad28106a7c5 Author: Lukas Bulwahn Date: Wed Mar 8 08:19:21 2023 +0100 MAINTAINERS: orphan SIS FRAMEBUFFER DRIVER This was triggered by the fact that the webpage: http://www.winischhofer.net/linuxsisvga.shtml cannot be reached anymore. Thomas Winischhofer is still reachable at the given email address, but he has not been active since 2005. Mark the SIS FRAMEBUFFER DRIVER as orphan to reflect the current state. Signed-off-by: Lukas Bulwahn Acked-by: Thomas Zimmermann Signed-off-by: Helge Deller commit 7f501aa71da9dc2eaae2b0118a151cad018d33b0 Author: Lucy Mielke Date: Tue Feb 7 11:06:30 2023 +0100 fbdev: omapfb: cleanup inconsistent indentation This cleans up the indentation according to the Linux kernel coding style, and should fix the warning created by the kernel test robot. Fixes: 8b08cf2b64f5 ("OMAP: add TI OMAP framebuffer driver") Reported-by: kernel test robot Signed-off-by: Lucy Mielke Signed-off-by: Helge Deller commit 8f0e056068f26c0f1121f7f96a6b4515f59160f2 Author: Nikita Romanyuk Date: Sat Feb 25 10:12:29 2023 +0300 drivers: video: logo: add SPDX comment, remove GPL notice in pnmtologo.c Signed-off-by: Nikita Romanyuk Reviewed-by: Geert Uytterhoeven Signed-off-by: Helge Deller commit 044b14b51d78a549664efac3a5a4c9edd1211b79 Author: Nikita Romanyuk Date: Sat Feb 25 10:12:28 2023 +0300 drivers: video: logo: fix code style issues in pnmtologo.c Signed-off-by: Nikita Romanyuk Signed-off-by: Helge Deller commit 9c88ea00fef03031ce6554531e89be82f6a42835 Author: Dave Wysochanski Date: Thu Mar 9 13:58:52 2023 -0500 NFS: Fix /proc/PID/io read_bytes for buffered reads Prior to commit 8786fde8421c ("Convert NFS from readpages to readahead"), nfs_readpages() used the old mm interface read_cache_pages() which called task_io_account_read() for each NFS page read. After this commit, nfs_readpages() is converted to nfs_readahead(), which now uses the new mm interface readahead_page(). The new interface requires callers to call task_io_account_read() themselves. In addition, to nfs_readahead() task_io_account_read() should also be called from nfs_read_folio(). Fixes: 8786fde8421c ("Convert NFS from readpages to readahead") Link: https://lore.kernel.org/linux-nfs/CAPt2mGNEYUk5u8V4abe=5MM5msZqmvzCVrtCP4Qw1n=gCHCnww@mail.gmail.com/ Signed-off-by: Dave Wysochanski Signed-off-by: Anna Schumaker commit d7ba3657d5162bd551e5c653f67f941c94a7dc0a Author: Jiri Pirko Date: Fri Mar 10 10:58:57 2023 +0100 docs: vfio: fix header path The text points to a different header file, fix by changing the path to "uapi". Signed-off-by: Jiri Pirko Reviewed-by: Yi Liu Link: https://lore.kernel.org/r/20230310095857.985814-1-jiri@resnulli.us Signed-off-by: Jonathan Corbet commit 42da2c00b91486980a724c05c29818a7e60a067e Author: Xujun Leng Date: Sun Mar 12 15:14:23 2023 +0800 docs: process: typo fix In the second paragraph of section "Respond to review comments", there is a spelling mistake: "aganst" should be "against". Signed-off-by: Xujun Leng Link: https://lore.kernel.org/r/20230312071423.3042-1-lengxujun2007@126.com Signed-off-by: Jonathan Corbet commit ccb820dc7d2236b1af0d54ae038a27b5b6d5ae5a Author: Eric Biggers Date: Mon Mar 13 15:12:29 2023 -0700 fscrypt: destroy keyring after security_sb_delete() fscrypt_destroy_keyring() must be called after all potentially-encrypted inodes were evicted; otherwise it cannot safely destroy the keyring. Since inodes that are in-use by the Landlock LSM don't get evicted until security_sb_delete(), this means that fscrypt_destroy_keyring() must be called *after* security_sb_delete(). This fixes a WARN_ON followed by a NULL dereference, only possible if Landlock was being used on encrypted files. Fixes: d7e7b9af104c ("fscrypt: stop using keyrings subsystem for fscrypt_master_key") Cc: stable@vger.kernel.org Reported-by: syzbot+93e495f6a4f748827c88@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/00000000000044651705f6ca1e30@google.com Reviewed-by: Christian Brauner Link: https://lore.kernel.org/r/20230313221231.272498-2-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 13ec9308a85702af7c31f3638a2720863848a7f2 Author: David Matlack Date: Mon Mar 13 16:54:54 2023 -0700 KVM: arm64: 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). This bug has existed since KVM/ARM's inception. 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. Fixes: 94f8e6418d39 ("KVM: ARM: Handle guest faults in KVM") Cc: stable@vger.kernel.org Reported-by: Sean Christopherson Signed-off-by: David Matlack Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20230313235454.2964067-1-dmatlack@google.com Signed-off-by: Oliver Upton commit 30549964ce67f6f363023ec680ddca9fac63904e Merge: 083a25b18d6ad 9c691a42b8926 Author: Mark Brown Date: Tue Mar 14 16:24:13 2023 +0000 ASOC: Intel: add quirk for Intel 'Rooks County' NUC Merge series from Bard Liao : Adding Intel 'Rooks County' NUC M15 support. To support 'Rooks County', we also need the "soundwire: dmi-quirks: add remapping for Intel 'Rooks County'" patch. commit 98e5eb110095ec77cb6d775051d181edbf9cd3cf Author: Kuninori Morimoto Date: Mon Mar 13 00:50:28 2023 +0000 ALSA: hda/ca0132: fixup buffer overrun at tuning_ctl_set() tuning_ctl_set() might have buffer overrun at (X) if it didn't break from loop by matching (A). static int tuning_ctl_set(...) { for (i = 0; i < TUNING_CTLS_COUNT; i++) (A) if (nid == ca0132_tuning_ctls[i].nid) break; snd_hda_power_up(...); (X) dspio_set_param(..., ca0132_tuning_ctls[i].mid, ...); snd_hda_power_down(...); ^ return 1; } We will get below error by cppcheck sound/pci/hda/patch_ca0132.c:4229:2: note: After for loop, i has value 12 for (i = 0; i < TUNING_CTLS_COUNT; i++) ^ sound/pci/hda/patch_ca0132.c:4234:43: note: Array index out of bounds dspio_set_param(codec, ca0132_tuning_ctls[i].mid, 0x20, ^ This patch cares non match case. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87sfe9eap7.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Takashi Iwai commit 9026c0bf233db53b86f74f4c620715e94eb32a09 Author: Kuninori Morimoto Date: Mon Mar 13 00:49:24 2023 +0000 ALSA: asihpi: check pao in control_message() control_message() might be called with pao = NULL. Here indicates control_message() as sample. (B) static void control_message(struct hpi_adapter_obj *pao, ...) { ^^^ struct hpi_hw_obj *phw = pao->priv; ... ^^^ } (A) void _HPI_6205(struct hpi_adapter_obj *pao, ...) { ^^^ ... case HPI_OBJ_CONTROL: (B) control_message(pao, phm, phr); break; ^^^ ... } void HPI_6205(...) { ... (A) _HPI_6205(NULL, phm, phr); ... ^^^^ } Therefore, We will get too many warning via cppcheck, like below sound/pci/asihpi/hpi6205.c:238:27: warning: Possible null pointer dereference: pao [nullPointer] struct hpi_hw_obj *phw = pao->priv; ^ sound/pci/asihpi/hpi6205.c:433:13: note: Calling function '_HPI_6205', 1st argument 'NULL' value is 0 _HPI_6205(NULL, phm, phr); ^ sound/pci/asihpi/hpi6205.c:401:20: note: Calling function 'control_message', 1st argument 'pao' value is 0 control_message(pao, phm, phr); ^ Set phr->error like many functions doing, and don't call _HPI_6205() with NULL. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87ttypeaqz.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Takashi Iwai commit 28e8cabe80f3e6e3c98121576eda898eeb20f1b1 Author: Kristian Overskeid Date: Tue Mar 7 14:32:29 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 Signed-off-by: David S. Miller commit 34e0a279a993debaff03158fc2fbf6a00c093643 Author: Jan Kara Date: Mon Mar 13 10:30:02 2023 +0100 block: do not reverse request order when flushing plug list Commit 26fed4ac4eab ("block: flush plug based on hardware and software queue order") changed flushing of plug list to submit requests one device at a time. However while doing that it also started using list_add_tail() instead of list_add() used previously thus effectively submitting requests in reverse order. Also when forming a rq_list with remaining requests (in case two or more devices are used), we effectively reverse the ordering of the plug list for each device we process. Submitting requests in reverse order has negative impact on performance for rotational disks (when BFQ is not in use). We observe 10-25% regression in random 4k write throughput, as well as ~20% regression in MariaDB OLTP benchmark on rotational storage on btrfs filesystem. Fix the problem by preserving ordering of the plug list when inserting requests into the queuelist as well as by appending to requeue_list instead of prepending to it. Fixes: 26fed4ac4eab ("block: flush plug based on hardware and software queue order") Signed-off-by: Jan Kara Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230313093002.11756-1-jack@suse.cz Signed-off-by: Jens Axboe commit 542a56e8eb4467ae654eefab31ff194569db39cd 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 45aa07fa832412f1de99194f37fd847915d7e0f6 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 751281c55579f0cb0e56c9797d4663f689909681 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 Cc: stable@vger.kernel.org # 6.1.x commit 3fadda5de8073e2cb65744803a6941736411d55b 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 Cc: stable@vger.kernel.org commit 728cefa53a36ba378ed4a7f31a0c08289687d824 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 9da050b0d9e04439d225a2ec3044af70cdfb3933 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 d71e38df3b730a17ab6b25cabb2ccfe8a7f04385 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 a9386ee9681585794dbab95d4ce6826f73d19af6 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 Cc: stable@vger.kernel.org commit ab9bdb1213b4b40942af6a383f555d0c14874c1b 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 Cc: stable@vger.kernel.org # 6.1.x commit b2ca5c5d416b4e72d1e9d0293fc720e2d525fd42 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 8eeddc0d4200762063e1c66b9cc63afa7b24ebf0 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: b4ee9606378b ("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 b4ee9606378bb9520c94d8b96f0305c3696f5c29 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 934ef33ee75c3846f605f18b65048acd147e3918 Author: Jan Beulich Date: Mon Mar 13 15:45:48 2023 +0100 x86/PVH: obtain VGA console info in Dom0 A new platform-op was added to Xen to allow obtaining the same VGA console information PV Dom0 is handed. Invoke the new function and have the output data processed by xen_init_vga(). Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/8f315e92-7bda-c124-71cc-478ab9c5e610@suse.com Signed-off-by: Juergen Gross commit f3e707413dbe3920a972d0c2b51175180e7de36b Author: Vipin Sharma Date: Fri Feb 3 17:45:47 2023 -0800 KVM: selftests: Sync KVM exit reasons in selftests Add missing KVM_EXIT_* reasons in KVM selftests from include/uapi/linux/kvm.h Signed-off-by: Vipin Sharma Message-Id: <20230204014547.583711-5-vipinsh@google.com> Signed-off-by: Paolo Bonzini commit 1b3d660e5d7b8b408a2b0988de65672199ebfaf2 Author: Sean Christopherson Date: Fri Feb 3 17:45:46 2023 -0800 KVM: selftests: Add macro to generate KVM exit reason strings Add and use a macro to generate the KVM exit reason strings array instead of relying on developers to correctly copy+paste+edit each string. Signed-off-by: Sean Christopherson Message-Id: <20230204014547.583711-4-vipinsh@google.com> Signed-off-by: Paolo Bonzini commit 6f974494b8077bb1a2a10fe33f62c143f246f102 Author: Vipin Sharma Date: Fri Feb 3 17:45:45 2023 -0800 KVM: selftests: Print expected and actual exit reason in KVM exit reason assert Print what KVM exit reason a test was expecting and what it actually got int TEST_ASSERT_KVM_EXIT_REASON(). Signed-off-by: Vipin Sharma Message-Id: <20230204014547.583711-3-vipinsh@google.com> Signed-off-by: Paolo Bonzini commit c96f57b08012805da323c6bdf929bab1b88d250c Author: Vipin Sharma Date: Fri Feb 3 17:45:44 2023 -0800 KVM: selftests: Make vCPU exit reason test assertion common Make TEST_ASSERT_KVM_EXIT_REASON() macro and replace all exit reason test assert statements with it. No functional changes intended. Signed-off-by: Vipin Sharma Reviewed-by: David Matlack Message-Id: <20230204014547.583711-2-vipinsh@google.com> Signed-off-by: Paolo Bonzini commit e6239a4ec5c51e4d5ee4d1604f741f490c32054c Author: David Woodhouse Date: Sat Feb 4 02:41:51 2023 +0000 KVM: selftests: Add EVTCHNOP_send slow path test to xen_shinfo_test When kvm_xen_evtchn_send() takes the slow path because the shinfo GPC needs to be revalidated, it used to violate the SRCU vs. kvm->lock locking rules and potentially cause a deadlock. Now that lockdep is learning to catch such things, make sure that code path is exercised by the selftest. Link: https://lore.kernel.org/all/20230113124606.10221-2-dwmw2@infradead.org Signed-off-by: David Woodhouse Signed-off-by: Sean Christopherson Message-Id: <20230204024151.1373296-5-seanjc@google.com> Signed-off-by: Paolo Bonzini commit e7062a98d0b3e0b42089f4c5da633a1ce41b807f Author: David Woodhouse Date: Sat Feb 4 02:41:50 2023 +0000 KVM: selftests: Use enum for test numbers in xen_shinfo_test The xen_shinfo_test started off with very few iterations, and the numbers we used in GUEST_SYNC() were precisely mapped to the RUNSTATE_xxx values anyway to start with. It has since grown quite a few more tests, and it's kind of awful to be handling them all as bare numbers. Especially when I want to add a new test in the middle. Define an enum for the test stages, and use it both in the guest code and the host switch statement. No functional change, if I can count to 24. Signed-off-by: David Woodhouse Signed-off-by: Sean Christopherson Message-Id: <20230204024151.1373296-4-seanjc@google.com> Signed-off-by: Paolo Bonzini commit c0c76d99939cb4ac28cbc5ce542cff2b9e1e1b02 Author: Sean Christopherson Date: Sat Feb 4 02:41:49 2023 +0000 KVM: selftests: Add helpers to make Xen-style VMCALL/VMMCALL hypercalls Add wrappers to do hypercalls using VMCALL/VMMCALL and Xen's register ABI (as opposed to full Xen-style hypercalls through a hypervisor provided page). Using the common helpers dedups a pile of code, and uses the native hypercall instruction when running on AMD. Signed-off-by: Sean Christopherson Message-Id: <20230204024151.1373296-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 4009e0bb7b83d967a14e108d271f003b378f9af9 Author: Sean Christopherson Date: Sat Feb 4 02:41:48 2023 +0000 KVM: selftests: Move the guts of kvm_hypercall() to a separate macro Extract the guts of kvm_hypercall() to a macro so that Xen hypercalls, which have a different register ABI, can reuse the VMCALL vs. VMMCALL logic. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20230204024151.1373296-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit c281794eaa5c635c0edf39c6a9a3b0171000e92f Author: Sean Christopherson Date: Tue Feb 7 00:21:56 2023 +0000 KVM: SVM: WARN if GATag generation drops VM or vCPU ID information WARN if generating a GATag given a VM ID and vCPU ID doesn't yield the same IDs when pulling the IDs back out of the tag. Don't bother adding error handling to callers, this is very much a paranoid sanity check as KVM fully controls the VM ID and is supposed to reject too-big vCPU IDs. Signed-off-by: Sean Christopherson Reviewed-by: Suravee Suthikulpanit Tested-by: Suravee Suthikulpanit Message-Id: <20230207002156.521736-4-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 5999715922c5a3ede5d8fe2a6b17aba58a157d41 Author: Suravee Suthikulpanit Date: Tue Feb 7 00:21:55 2023 +0000 KVM: SVM: Modify AVIC GATag to support max number of 512 vCPUs Define AVIC_VCPU_ID_MASK based on AVIC_PHYSICAL_MAX_INDEX, i.e. the mask that effectively controls the largest guest physical APIC ID supported by x2AVIC, instead of hardcoding the number of bits to 8 (and the number of VM bits to 24). The AVIC GATag is programmed into the AMD IOMMU IRTE to provide a reference back to KVM in case the IOMMU cannot inject an interrupt into a non-running vCPU. In such a case, the IOMMU notifies software by creating a GALog entry with the corresponded GATag, and KVM then uses the GATag to find the correct VM+vCPU to kick. Dropping bit 8 from the GATag results in kicking the wrong vCPU when targeting vCPUs with x2APIC ID > 255. Fixes: 4d1d7942e36a ("KVM: SVM: Introduce logic to (de)activate x2AVIC mode") Cc: stable@vger.kernel.org Reported-by: Alejandro Jimenez Signed-off-by: Suravee Suthikulpanit Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Reviewed-by: Suravee Suthikulpanit Tested-by: Suravee Suthikulpanit Message-Id: <20230207002156.521736-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 3ec7a1b2743c07c45f4a0c508114f6cb410ddef3 Author: Sean Christopherson Date: Tue Feb 7 00:21:54 2023 +0000 KVM: SVM: Fix a benign off-by-one bug in AVIC physical table mask Define the "physical table max index mask" as bits 8:0, not 9:0. x2AVIC currently supports a max of 512 entries, i.e. the max index is 511, and the inputs to GENMASK_ULL() are inclusive. The bug is benign as bit 9 is reserved and never set by KVM, i.e. KVM is just clearing bits that are guaranteed to be zero. Note, as of this writing, APM "Rev. 3.39-October 2022" incorrectly states that bits 11:8 are reserved in Table B-1. VMCB Layout, Control Area. I.e. that table wasn't updated when x2AVIC support was added. Opportunistically fix the comment for the max AVIC ID to align with the code, and clean up comment formatting too. Fixes: 4d1d7942e36a ("KVM: SVM: Introduce logic to (de)activate x2AVIC mode") Cc: stable@vger.kernel.org Cc: Alejandro Jimenez Cc: Suravee Suthikulpanit Signed-off-by: Sean Christopherson Reviewed-by: Suravee Suthikulpanit Tested-by: Suravee Suthikulpanit Message-Id: <20230207002156.521736-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 3dc40cf89b9b763910cb0540a35f9d66a067475d Author: Paolo Bonzini Date: Tue Mar 14 08:35:16 2023 -0400 selftests: KVM: skip hugetlb tests if huge pages are not available Right now, if KVM memory stress tests are run with hugetlb sources but hugetlb is not available (either in the kernel or because /proc/sys/vm/nr_hugepages is 0) the test will fail with a memory allocation error. This makes it impossible to add tests that default to hugetlb-backed memory, because on a machine with a default configuration they will fail. Therefore, check HugePages_Total as well and, if zero, direct the user to enable hugepages in procfs. Furthermore, return KSFT_SKIP whenever hugetlb is not available. Signed-off-by: Paolo Bonzini commit 53293cb81be6db06306666d51e85778725934be5 Author: Rong Tao Date: Wed Dec 21 20:28:49 2022 +0800 KVM: VMX: Use tabs instead of spaces for indentation Code indentation should use tabs where possible and miss a '*'. Signed-off-by: Rong Tao Message-Id: Signed-off-by: Paolo Bonzini commit 06e18547286068be803ba28c6d1c377e94f8745b Author: Rong Tao Date: Wed Dec 21 20:24:32 2022 +0800 KVM: VMX: Fix indentation coding style issue Code indentation should use tabs where possible. Signed-off-by: Rong Tao Message-Id: Signed-off-by: Paolo Bonzini commit 77900bffed14894476969042718a9ca05eb1f477 Author: Paolo Bonzini Date: Tue Mar 14 07:40:56 2023 -0400 KVM: nVMX: remove unnecessary #ifdef nested_vmx_check_controls() has already run by the time KVM checks host state, so the "host address space size" exit control can only be set on x86-64 hosts. Simplify the condition at the cost of adding some dead code to 32-bit kernels. Signed-off-by: Paolo Bonzini commit 112e66017bff7f2837030f34c2bc19501e9212d5 Author: Paolo Bonzini Date: Fri Mar 10 11:10:56 2023 -0500 KVM: nVMX: add missing consistency checks for CR0 and CR4 The effective values of the guest CR0 and CR4 registers may differ from those included in the VMCS12. In particular, disabling EPT forces CR4.PAE=1 and disabling unrestricted guest mode forces CR0.PG=CR0.PE=1. Therefore, checks on these bits cannot be delegated to the processor and must be performed by KVM. Reported-by: Reima ISHII Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit bceeedb2f0b803fa188b931b30c064ee60196f09 Merge: eeac8ede17557 47053904e1828 Author: Paolo Bonzini Date: Tue Mar 14 09:40:39 2023 -0400 Merge tag 'kvmarm-fixes-6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.3, part #1 A single patch to address a rather annoying bug w.r.t. guest timer offsetting. Effectively the synchronization of timer offsets between vCPUs was broken, leading to inconsistent timer reads within the VM. commit 083a25b18d6ad9f1f540e629909aa3eaaaf01823 Author: Shengjiu Wang Date: Thu Mar 9 15:13:37 2023 +0800 ASoC: soc-pcm: fix hw->formats cleared by soc_pcm_hw_init() for dpcm The hw->formats may be set by snd_dmaengine_pcm_refine_runtime_hwparams() in component's startup()/open(), but soc_pcm_hw_init() will init hw->formats in dpcm_runtime_setup_fe() after component's startup()/open(), which causes the valuable hw->formats to be cleared. So need to store the hw->formats before initialization, then restore it after initialization. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1678346017-3660-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 9c691a42b8926c8966561265cdae3ddc7464d3a2 Author: Eugene Huang Date: Tue Mar 14 17:05:53 2023 +0800 ASoC: Intel: soc-acpi: add table for Intel 'Rooks County' NUC M15 Same topology as the HP Omen 16-k0005TX, except with the rt1316 amp 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/20230314090553.498664-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 3c728b1bc5b99c5275ac5c7788ef814c0e51ef54 Author: Eugene Huang Date: Tue Mar 14 17:05:52 2023 +0800 ASOC: Intel: sof_sdw: add quirk for Intel 'Rooks County' NUC M15 Same quirks as the 'Bishop County' NUC M15, except the rt711 is in the 'JD2 100K' jack detection mode. 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/20230314090553.498664-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 6175b70df95ed3b8fe177cb20b9b00b1f9008cc4 Author: Randy Dunlap Date: Wed Feb 22 23:01:15 2023 -0800 powerpc/pseries: RTAS work area requires GENERIC_ALLOCATOR The RTAS work area allocator uses code that is built by GENERIC_ALLOCATOR, so the PSERIES Kconfig should select the required Kconfig symbol to fix multiple build errors. powerpc64-linux-ld: arch/powerpc/platforms/pseries/rtas-work-area.o: in function `.rtas_work_area_allocator_init': rtas-work-area.c:(.init.text+0x288): undefined reference to `.gen_pool_create' powerpc64-linux-ld: rtas-work-area.c:(.init.text+0x2dc): undefined reference to `.gen_pool_set_algo' powerpc64-linux-ld: rtas-work-area.c:(.init.text+0x310): undefined reference to `.gen_pool_add_owner' powerpc64-linux-ld: rtas-work-area.c:(.init.text+0x43c): undefined reference to `.gen_pool_destroy' powerpc64-linux-ld: arch/powerpc/platforms/pseries/rtas-work-area.o:(.toc+0x0): undefined reference to `gen_pool_first_fit_order_align' powerpc64-linux-ld: arch/powerpc/platforms/pseries/rtas-work-area.o: in function `.__rtas_work_area_alloc': rtas-work-area.c:(.ref.text+0x14c): undefined reference to `.gen_pool_alloc_algo_owner' powerpc64-linux-ld: rtas-work-area.c:(.ref.text+0x238): undefined reference to `.gen_pool_alloc_algo_owner' powerpc64-linux-ld: arch/powerpc/platforms/pseries/rtas-work-area.o: in function `.rtas_work_area_free': rtas-work-area.c:(.ref.text+0x44c): undefined reference to `.gen_pool_free_owner' Fixes: 43033bc62d34 ("powerpc/pseries: add RTAS work area allocator") Signed-off-by: Randy Dunlap Reviewed-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://msgid.link/20230223070116.660-2-rdunlap@infradead.org commit 172fa6366c0c84eda31f1bc34e6c3e4698786215 Author: Jules Maselbas Date: Wed Feb 22 18:30:09 2023 +0100 tee: optee: Fix typo Unuspported -> Unsupported Fix typo Unuspported -> Unsupported Signed-off-by: Jules Maselbas Reviewed-by: Sumit Garg Signed-off-by: Jens Wiklander commit 773e8e7d07b753474b2ccd605ff092faaa9e65b9 Author: Enrico Sau Date: Tue Mar 14 10:00:59 2023 +0100 USB: serial: option: add Telit FE990 compositions Add the following Telit FE990 compositions: 0x1080: tty, adb, rmnet, tty, tty, tty, tty 0x1081: tty, adb, mbim, tty, tty, tty, tty 0x1082: rndis, tty, adb, tty, tty, tty, tty 0x1083: tty, adb, ecm, tty, tty, tty, tty Signed-off-by: Enrico Sau Link: https://lore.kernel.org/r/20230314090059.77876-1-enrico.sau@gmail.com Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit b3cdf730486b048ca0bf23bef050550d9fd40422 Author: Alexander Stein Date: Wed Mar 8 11:17:20 2023 +0100 arm64: dts: imx93: add missing #address-cells and #size-cells to i2c nodes Add them to the SoC .dtsi, so that not every board has to specify them. Fixes: 1225396fefea ("arm64: dts: imx93: add lpi2c nodes") Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 1adab2922c58e7ff4fa9f0b43695079402cce876 Author: Ivan Bornyakov Date: Mon Mar 6 16:25:26 2023 +0300 bus: imx-weim: fix branch condition evaluates to a garbage value If bus type is other than imx50_weim_devtype and have no child devices, variable 'ret' in function weim_parse_dt() will not be initialized, but will be used as branch condition and return value. Fix this by initializing 'ret' with 0. This was discovered with help of clang-analyzer, but the situation is quite possible in real life. Fixes: 52c47b63412b ("bus: imx-weim: improve error handling upon child probe-failure") Signed-off-by: Ivan Bornyakov Cc: stable@vger.kernel.org Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 62fb54148cd6eb456ff031be8fb447c98cf0bd9b Author: Marek Vasut Date: Tue Feb 28 22:52:44 2023 +0100 arm64: dts: imx8mn: specify #sound-dai-cells for SAI nodes Add #sound-dai-cells properties to SAI nodes. Reviewed-by: Adam Ford Reviewed-by: Fabio Estevam Fixes: 9e9860069725 ("arm64: dts: imx8mn: Add SAI nodes") Signed-off-by: Marek Vasut Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit 1cd489e1ada1cffa56bd06fd4609f5a60a985d43 Author: Peng Fan Date: Sun Feb 26 21:12:14 2023 +0800 ARM: dts: imx6sl: tolino-shine2hd: fix usbotg1 pinctrl usb@2184000: 'pinctrl-0' is a dependency of 'pinctrl-names' Signed-off-by: Peng Fan Fixes: 9c7016f1ca6d ("ARM: dts: imx: add devicetree for Tolino Shine 2 HD") Signed-off-by: Shawn Guo commit 957c04e9784c7c757e8cc293d7fb2a60cdf461b6 Author: Peng Fan Date: Sun Feb 26 21:12:13 2023 +0800 ARM: dts: imx6sll: e60k02: fix usbotg1 pinctrl usb@2184000: 'pinctrl-0' is a dependency of 'pinctrl-names' Signed-off-by: Peng Fan Fixes: c100ea86e6ab ("ARM: dts: add Netronix E60K02 board common file") Signed-off-by: Shawn Guo commit 3d37f7685d525e58674c23d607020e66d501dcd1 Author: Peng Fan Date: Sun Feb 26 21:12:12 2023 +0800 ARM: dts: imx6sll: e70k02: fix usbotg1 pinctrl usb@2184000: 'pinctrl-0' is a dependency of 'pinctrl-names' Signed-off-by: Peng Fan Fixes: 3bb3fd856505 ("ARM: dts: add Netronix E70K02 board common file") Signed-off-by: Shawn Guo commit 194c3e7d7e1230201fb341f40cfd87760a30e42a Author: Alexander Stein Date: Thu Feb 23 07:05:43 2023 +0100 arm64: dts: imx93: Fix eqos properties 'macirq' is supposed to be listed first. Also only 'snps,clk-csr' is listed in the bindings while 'clk_csr' is only supported for legacy reasons. See commit 83936ea8d8ad2 ("net: stmmac: add a parse for new property 'snps,clk-csr'") Fixes: 1f4263ea6a4b ("arm64: dts: imx93: add eqos support") Signed-off-by: Alexander Stein Reviewed-by: Peng Fan Signed-off-by: Shawn Guo commit 1d0d5b917d6af71fa3c9599c3a7198a4175156a5 Author: Marek Vasut Date: Fri Feb 17 20:15:38 2023 +0100 arm64: dts: imx8mp: Fix LCDIF2 node clock order The 'axi' clock are the bus APB clock, the 'disp_axi' clock are the pixel data AXI clock. The naming is confusing. Fix the clock order. Fixes: 94e6197dadc9 ("arm64: dts: imx8mp: Add LCDIF2 & LDB nodes") Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit 32f86da7c86b27ebed31c24453a0713f612e43fb Author: Krzysztof Kozlowski Date: Fri Feb 17 16:06:26 2023 +0100 arm64: dts: imx8mm-nitrogen-r2: fix WM8960 clock name The WM8960 Linux driver expects the clock to be named "mclk". Otherwise the clock will be ignored and not prepared/enabled by the driver. Fixes: 40ba2eda0a7b ("arm64: dts: imx8mm-nitrogen-r2: add audio") Cc: Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit feafeb53140af3cde3fba46b292b15b3a0c0635c Author: Andrew Halaney Date: Tue Feb 14 11:15:05 2023 -0600 arm64: dts: imx8dxl-evk: Fix eqos phy reset gpio The deprecated property is named snps,reset-gpio, but this devicetree used snps,reset-gpios instead which results in the reset not being used and the following make dtbs_check error: ./arch/arm64/boot/dts/freescale/imx8dxl-evk.dtb: ethernet@5b050000: 'snps,reset-gpio' is a dependency of 'snps,reset-delays-us' From schema: ./Documentation/devicetree/bindings/net/snps,dwmac.yaml Use the preferred method of defining the reset gpio in the phy node itself. Note that this drops the 10 us pre-delay, but prior this wasn't used at all and a pre-delay doesn't make much sense in this context so it should be fine. Fixes: 8dd495d12374 ("arm64: dts: freescale: add support for i.MX8DXL EVK board") Signed-off-by: Andrew Halaney Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 512dd354718b98c60d4ff6017ff8c9f66c10d03f Author: Alex Elder Date: Fri Mar 10 13:37:09 2023 -0600 net: ipa: fix a surprising number of bad offsets A recent commit eliminated a hack that adjusted the offset used for many GSI registers. It became possible because we now specify all GSI register offsets explicitly for every version of IPA. Unfortunately, a large number of register offsets were *not* updated as they should have been in that commit. For IPA v4.5+, the offset for every GSI register *except* the two inter-EE interrupt masking registers were supposed to have been reduced by 0xd000. Tested-by: Luca Weiss Tested-by: Dmitry Baryshkov # SM8350-HDK Fixes: 59b12b1d27f3 ("net: ipa: kill gsi->virt_raw") Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20230310193709.1477102-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 0b086d76e7b011772b0ac214c6e5fd5816eff2df Author: Arınç ÜNAL Date: Fri Mar 10 10:33:38 2023 +0300 net: dsa: mt7530: set PLL frequency and trgmii only when trgmii is used As my testing on the MCM MT7530 switch on MT7621 SoC shows, setting the PLL frequency does not affect MII modes other than trgmii on port 5 and port 6. So the assumption is that the operation here called "setting the PLL frequency" actually sets the frequency of the TRGMII TX clock. Make it so that it and the rest of the trgmii setup run only when the trgmii mode is used. Tested rgmii and trgmii modes of port 6 on MCM MT7530 on MT7621AT Unielec U7621-06 and standalone MT7530 on MT7623NI Bananapi BPI-R2. Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch") Tested-by: Arınç ÜNAL Signed-off-by: Arınç ÜNAL Link: https://lore.kernel.org/r/20230310073338.5836-2-arinc.unal@arinc9.com Signed-off-by: Jakub Kicinski commit feb03fd11c5616f3a47e4714d2f9917d0f1a2edd Author: Arınç ÜNAL Date: Fri Mar 10 10:33:37 2023 +0300 net: dsa: mt7530: remove now incorrect comment regarding port 5 Remove now incorrect comment regarding port 5 as GMAC5. This is supposed to be supported since commit 38f790a80560 ("net: dsa: mt7530: Add support for port 5") under mt7530_setup_port5(). Fixes: 38f790a80560 ("net: dsa: mt7530: Add support for port 5") Signed-off-by: Arınç ÜNAL Link: https://lore.kernel.org/r/20230310073338.5836-1-arinc.unal@arinc9.com Signed-off-by: Jakub Kicinski commit 1a9dc5610ef89d807acdcfbff93a558f341a44da Author: Daniil Tatianin Date: Thu Mar 9 23:15:56 2023 +0300 qed/qed_dev: guard against a possible division by zero Previously we would divide total_left_rate by zero if num_vports happened to be 1 because non_requested_count is calculated as num_vports - req_count. Guard against this by validating num_vports at the beginning and returning an error otherwise. Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Fixes: bcd197c81f63 ("qed: Add vport WFQ configuration APIs") Signed-off-by: Daniil Tatianin Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230309201556.191392-1-d-tatianin@yandex-team.ru Signed-off-by: Jakub Kicinski commit 22a825c541d775c1dbe7b2402786025acad6727b Author: D. Wythe Date: Wed Mar 8 16:17:12 2023 +0800 net/smc: fix NULL sndbuf_desc in smc_cdc_tx_handler() When performing a stress test on SMC-R by rmmod mlx5_ib driver during the wrk/nginx test, we found that there is a probability of triggering a panic while terminating all link groups. This issue dues to the race between smc_smcr_terminate_all() and smc_buf_create(). smc_smcr_terminate_all smc_buf_create /* init */ conn->sndbuf_desc = NULL; ... __smc_lgr_terminate smc_conn_kill smc_close_abort smc_cdc_get_slot_and_msg_send __softirqentry_text_start smc_wr_tx_process_cqe smc_cdc_tx_handler READ(conn->sndbuf_desc->len); /* panic dues to NULL sndbuf_desc */ conn->sndbuf_desc = xxx; This patch tries to fix the issue by always to check the sndbuf_desc before send any cdc msg, to make sure that no null pointer is seen during cqe processing. Fixes: 0b29ec643613 ("net/smc: immediate termination for SMCR link groups") Signed-off-by: D. Wythe Reviewed-by: Tony Lu Reviewed-by: Wenjia Zhang Link: https://lore.kernel.org/r/1678263432-17329-1-git-send-email-alibuda@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 131db499162274858bdbd7b5323a639da4aab86c Author: Vadim Fedorenko Date: Fri Mar 10 07:13:56 2023 -0800 bnxt_en: reset PHC frequency in free-running mode When using a PHC in shared between multiple hosts, the previous frequency value may not be reset and could lead to host being unable to compensate the offset with timecounter adjustments. To avoid such state reset the hardware frequency of PHC to zero on init. Some refactoring is needed to make code readable. Fixes: 85036aee1938 ("bnxt_en: Add a non-real time mode to access NIC clock") Signed-off-by: Vadim Fedorenko Reviewed-by: Pavan Chebbi Link: https://lore.kernel.org/r/20230310151356.678059-1-vadfed@meta.com Signed-off-by: Jakub Kicinski commit 8b3a149db461d3286d1e211112de3b44ccaeaf71 Author: Ard Biesheuvel Date: Sun Mar 12 23:00:03 2023 +0100 efi: earlycon: Reprobe after parsing config tables Commit 732ea9db9d8a ("efi: libstub: Move screen_info handling to common code") reorganized the earlycon handling so that all architectures pass the screen_info data via a EFI config table instead of populating struct screen_info directly, as the latter is only possible when the EFI stub is baked into the kernel (and not into the decompressor). However, this means that struct screen_info may not have been populated yet by the time the earlycon probe takes place, and this results in a non-functional early console. So let's probe again right after parsing the config tables and populating struct screen_info. Note that this means that earlycon output starts a bit later than before, and so it may fail to capture issues that occur while doing the early EFI initialization. Fixes: 732ea9db9d8a ("efi: libstub: Move screen_info handling to common code") Reported-by: Shawn Guo Tested-by: Shawn Guo Signed-off-by: Ard Biesheuvel commit a33a6eaa19d3af261e8708bfc8ba62020703117f Merge: e8c8361cfdbf4 bf9bec4cb3a40 Author: Alexei Starovoitov Date: Mon Mar 13 13:20:58 2023 -0700 Merge branch 'bpf: Allow reads from uninit stack' Merge commit bf9bec4cb3a4 ("Merge branch 'bpf: Allow reads from uninit stack'") from bpf-next to bpf tree to address verification issues in some programs due to stack usage. Signed-off-by: Alexei Starovoitov commit 3bc57292278a0b6ac4656cad94c14f2453344b57 Author: NeilBrown Date: Mon Mar 6 09:36:25 2023 +1100 md: avoid signed overflow in slot_store() slot_store() uses kstrtouint() to get a slot number, but stores the result in an "int" variable (by casting a pointer). This can result in a negative slot number if the unsigned int value is very large. A negative number means that the slot is empty, but setting a negative slot number this way will not remove the device from the array. I don't think this is a serious problem, but it could cause confusion and it is best to fix it. Reported-by: Dan Carpenter Signed-off-by: NeilBrown Signed-off-by: Song Liu commit 9db481c909dd6312ccfbdc7e343b50e41c727483 Author: Johan Hovold Date: Mon Mar 6 08:56:48 2023 +0100 memory: tegra30-emc: fix interconnect registration race The current interconnect provider registration interface is inherently racy as nodes are not added until the after adding the provider. This can specifically cause racing DT lookups to fail. Switch to using the new API where the provider is not registered until after it has been fully initialised. Fixes: d5ef16ba5fbe ("memory: tegra20: Support interconnect framework") Cc: stable@vger.kernel.org # 5.11 Cc: Dmitry Osipenko Acked-by: Krzysztof Kozlowski Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230306075651.2449-21-johan+linaro@kernel.org Signed-off-by: Georgi Djakov commit c5587f61ec050f7e9ebb3e2da29d12af63e833d3 Author: Johan Hovold Date: Mon Mar 6 08:56:47 2023 +0100 memory: tegra20-emc: fix interconnect registration race The current interconnect provider registration interface is inherently racy as nodes are not added until the after adding the provider. This can specifically cause racing DT lookups to fail. Switch to using the new API where the provider is not registered until after it has been fully initialised. Fixes: d5ef16ba5fbe ("memory: tegra20: Support interconnect framework") Cc: stable@vger.kernel.org # 5.11 Cc: Dmitry Osipenko Acked-by: Krzysztof Kozlowski Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230306075651.2449-20-johan+linaro@kernel.org Signed-off-by: Georgi Djakov commit abd9f1b49cf25eebeaba193c7707355be3f48dae Author: Johan Hovold Date: Mon Mar 6 08:56:46 2023 +0100 memory: tegra124-emc: fix interconnect registration race The current interconnect provider registration interface is inherently racy as nodes are not added until the after adding the provider. This can specifically cause racing DT lookups to fail. Switch to using the new API where the provider is not registered until after it has been fully initialised. Fixes: 380def2d4cf2 ("memory: tegra124: Support interconnect framework") Cc: stable@vger.kernel.org # 5.12 Cc: Dmitry Osipenko Acked-by: Krzysztof Kozlowski Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230306075651.2449-19-johan+linaro@kernel.org Signed-off-by: Georgi Djakov commit 5553055c62683ce339f9ef5fb2a26c8331485d68 Author: Johan Hovold Date: Mon Mar 6 08:56:45 2023 +0100 memory: tegra: fix interconnect registration race The current interconnect provider registration interface is inherently racy as nodes are not added until the after adding the provider. This can specifically cause racing DT lookups to fail. Switch to using the new API where the provider is not registered until after it has been fully initialised. Fixes: 06f079816d4c ("memory: tegra-mc: Add interconnect framework") Cc: stable@vger.kernel.org # 5.11 Cc: Dmitry Osipenko Acked-by: Krzysztof Kozlowski Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230306075651.2449-18-johan+linaro@kernel.org Signed-off-by: Georgi Djakov commit 859ad5f177efa59f6b8a2fac20561ca5cb13c89f Author: Johan Hovold Date: Mon Mar 6 08:56:44 2023 +0100 interconnect: exynos: drop redundant link destroy There is no longer any need to explicitly destroy node links as this is now done when the node is destroyed as part of icc_nodes_remove(). Reviewed-by: Krzysztof Kozlowski Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230306075651.2449-17-johan+linaro@kernel.org Signed-off-by: Georgi Djakov commit c9e46ca612cfbb0cf890f7ae7389b742e90efe64 Author: Johan Hovold Date: Mon Mar 6 08:56:43 2023 +0100 interconnect: exynos: fix registration race The current interconnect provider registration interface is inherently racy as nodes are not added until the after adding the provider. This can specifically cause racing DT lookups to trigger a NULL-pointer deference when either a NULL pointer or not fully initialised node is returned from exynos_generic_icc_xlate(). Switch to using the new API where the provider is not registered until after it has been fully initialised. Fixes: 2f95b9d5cf0b ("interconnect: Add generic interconnect driver for Exynos SoCs") Cc: stable@vger.kernel.org # 5.11 Cc: Sylwester Nawrocki Reviewed-by: Krzysztof Kozlowski Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230306075651.2449-16-johan+linaro@kernel.org Signed-off-by: Georgi Djakov commit 3aab264875bf3c915ea2517fae1eec213e0b4987 Author: Johan Hovold Date: Mon Mar 6 08:56:42 2023 +0100 interconnect: exynos: fix node leak in probe PM QoS error path Make sure to add the newly allocated interconnect node to the provider before adding the PM QoS request so that the node is freed on errors. Fixes: 2f95b9d5cf0b ("interconnect: Add generic interconnect driver for Exynos SoCs") Cc: stable@vger.kernel.org # 5.11 Cc: Sylwester Nawrocki Reviewed-by: Krzysztof Kozlowski Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230306075651.2449-15-johan+linaro@kernel.org Signed-off-by: Georgi Djakov commit bfe7bcd2b9f5215de2144f097f39971180e7ea54 Author: Johan Hovold Date: Mon Mar 6 08:56:39 2023 +0100 interconnect: qcom: msm8974: fix registration race The current interconnect provider registration interface is inherently racy as nodes are not added until the after adding the provider. This can specifically cause racing DT lookups to fail. Switch to using the new API where the provider is not registered until after it has been fully initialised. Fixes: 4e60a9568dc6 ("interconnect: qcom: add msm8974 driver") Cc: stable@vger.kernel.org # 5.5 Reviewed-by: Brian Masney Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230306075651.2449-12-johan+linaro@kernel.org Signed-off-by: Georgi Djakov commit 74240a5bebd48d8b843c6d0f1acfaa722a5abeb7 Author: Johan Hovold Date: Mon Mar 6 08:56:38 2023 +0100 interconnect: qcom: rpmh: fix registration race The current interconnect provider registration interface is inherently racy as nodes are not added until the after adding the provider. This can specifically cause racing DT lookups to fail. Switch to using the new API where the provider is not registered until after it has been fully initialised. Fixes: 976daac4a1c5 ("interconnect: qcom: Consolidate interconnect RPMh support") Cc: stable@vger.kernel.org # 5.7 Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230306075651.2449-11-johan+linaro@kernel.org Signed-off-by: Georgi Djakov commit 6570d1d46eeade82965ccc4a3ab7d778898ef4bf Author: Johan Hovold Date: Mon Mar 6 08:56:37 2023 +0100 interconnect: qcom: rpmh: fix probe child-node error handling Make sure to clean up and release resources properly also in case probe fails when populating child devices. Fixes: 57eb14779dfd ("interconnect: qcom: icc-rpmh: Support child NoC device probe") Cc: stable@vger.kernel.org # 6.0 Cc: Luca Weiss Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230306075651.2449-10-johan+linaro@kernel.org Signed-off-by: Georgi Djakov commit 90ae93d8affc1061cd87ca8ddd9a838c7d31a158 Author: Johan Hovold Date: Mon Mar 6 08:56:36 2023 +0100 interconnect: qcom: rpm: fix registration race The current interconnect provider registration interface is inherently racy as nodes are not added until the after adding the provider. This can specifically cause racing DT lookups to fail. Switch to using the new API where the provider is not registered until after it has been fully initialised. Fixes: 62feb14ee8a3 ("interconnect: qcom: Consolidate interconnect RPM support") Fixes: 30c8fa3ec61a ("interconnect: qcom: Add MSM8916 interconnect provider driver") Cc: stable@vger.kernel.org # 5.7 Reviewed-by: Konrad Dybcio Reviewed-by: Jun Nie Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230306075651.2449-9-johan+linaro@kernel.org Signed-off-by: Georgi Djakov commit 4928f67bc911e46a43004251a4d7eb2259ba6077 Author: Yishai Hadas Date: Wed Mar 8 17:57:23 2023 +0200 vfio/mlx5: Fix the report of dirty_bytes upon pre-copy Fix the report of dirty_bytes upon pre-copy to include both the existing data on the migration file and the device extra bytes. This gives a better close estimation to what can be passed any more as part of pre-copy. Fixes: 0dce165b1adf ("vfio/mlx5: Introduce vfio precopy ioctl implementation") Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20230308155723.108218-1-yishaih@nvidia.com Signed-off-by: Alex Williamson commit ee06a3ef7e3cddb62b90ac40aa661d3c12f7cabc Author: Jurica Vukadin Date: Tue Mar 7 20:40:39 2023 +0100 kconfig: Update config changed flag before calling callback Prior to commit 5ee546594025 ("kconfig: change sym_change_count to a boolean flag"), the conf_updated flag was set to the new value *before* calling the callback. xconfig's save action depends on this behaviour, because xconfig calls conf_get_changed() directly from the callback and now sees the old value, thus never enabling the save button or the shortcut. Restore the previous behaviour. Fixes: 5ee546594025 ("kconfig: change sym_change_count to a boolean flag") Signed-off-by: Jurica Vukadin Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Masahiro Yamada commit f6da81f650fa47b61b847488f3938d43f90d093d Author: Reiji Watanabe Date: Sun Mar 12 20:32:34 2023 -0700 KVM: arm64: PMU: Don't save PMCR_EL0.{C,P} for the vCPU Presently, when a guest writes 1 to PMCR_EL0.{C,P}, which is WO/RAZ, KVM saves the register value, including these bits. When userspace reads the register using KVM_GET_ONE_REG, KVM returns the saved register value as it is (the saved value might have these bits set). This could result in userspace setting these bits on the destination during migration. Consequently, KVM may end up resetting the vPMU counter registers (PMCCNTR_EL0 and/or PMEVCNTR_EL0) to zero on the first KVM_RUN after migration. Fix this by not saving those bits when a guest writes 1 to those bits. Fixes: ab9468340d2b ("arm64: KVM: Add access handler for PMCR register") Cc: stable@vger.kernel.org Reviewed-by: Marc Zyngier Signed-off-by: Reiji Watanabe Link: https://lore.kernel.org/r/20230313033234.1475987-1-reijiw@google.com Signed-off-by: Oliver Upton commit 9228b26194d1cc00449f12f306f53ef2e234a55b Author: Reiji Watanabe Date: Sun Mar 12 20:32:08 2023 -0700 KVM: arm64: PMU: Fix GET_ONE_REG for vPMC regs to return the current value Have KVM_GET_ONE_REG for vPMU counter (vPMC) registers (PMCCNTR_EL0 and PMEVCNTR_EL0) return the sum of the register value in the sysreg file and the current perf event counter value. Values of vPMC registers are saved in sysreg files on certain occasions. These saved values don't represent the current values of the vPMC registers if the perf events for the vPMCs count events after the save. The current values of those registers are the sum of the sysreg file value and the current perf event counter value. But, when userspace reads those registers (using KVM_GET_ONE_REG), KVM returns the sysreg file value to userspace (not the sum value). Fix this to return the sum value for KVM_GET_ONE_REG. Fixes: 051ff581ce70 ("arm64: KVM: Add access handler for event counter register") Cc: stable@vger.kernel.org Reviewed-by: Marc Zyngier Signed-off-by: Reiji Watanabe Link: https://lore.kernel.org/r/20230313033208.1475499-1-reijiw@google.com Signed-off-by: Oliver Upton commit 3e453522593d74a87cf68a38e14aa36ebca1dbcd Author: Xiao Ni Date: Wed Feb 22 11:59:16 2023 +0800 md: Free resources in __md_stop If md_run() fails after ->active_io is initialized, then percpu_ref_exit is called in error path. However, later md_free_disk will call percpu_ref_exit again which leads to a panic because of null pointer dereference. It can also trigger this bug when resources are initialized but are freed in error path, then will be freed again in md_free_disk. BUG: kernel NULL pointer dereference, address: 0000000000000038 Oops: 0000 [#1] PREEMPT SMP Workqueue: md_misc mddev_delayed_delete RIP: 0010:free_percpu+0x110/0x630 Call Trace: __percpu_ref_exit+0x44/0x70 percpu_ref_exit+0x16/0x90 md_free_disk+0x2f/0x80 disk_release+0x101/0x180 device_release+0x84/0x110 kobject_put+0x12a/0x380 kobject_put+0x160/0x380 mddev_delayed_delete+0x19/0x30 process_one_work+0x269/0x680 worker_thread+0x266/0x640 kthread+0x151/0x1b0 ret_from_fork+0x1f/0x30 For creating raid device, md raid calls do_md_run->md_run, dm raid calls md_run. We alloc those memory in md_run. For stopping raid device, md raid calls do_md_stop->__md_stop, dm raid calls md_stop->__md_stop. So we can free those memory resources in __md_stop. Fixes: 72adae23a72c ("md: Change active_io to percpu") Reported-and-tested-by: Yu Kuai Signed-off-by: Xiao Ni Signed-off-by: Song Liu commit fc89d7fb499b0162e081f434d45e8d1b47e82ece Merge: eeac8ede17557 ae43c20da2a77 Author: Linus Torvalds Date: Mon Mar 13 10:43:09 2023 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio fixes from Michael Tsirkin: "Some virtio / vhost / vdpa fixes accumulated so far" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: tools/virtio: Ignore virtio-trace/trace-agent vdpa_sim: set last_used_idx as last_avail_idx in vdpasim_queue_ready vhost-vdpa: free iommu domain after last use during cleanup vdpa/mlx5: should not activate virtq object when suspended vp_vdpa: fix the crash in hot unplug with vp_vdpa commit 71f8afa2b66e356f435b6141b4a9ccf953e18356 Author: Kees Jan Koster Date: Sat Feb 18 15:18:30 2023 +0100 USB: serial: cp210x: add Silicon Labs IFS-USB-DATACABLE IDs The Silicon Labs IFS-USB-DATACABLE is used in conjunction with for example the Quint UPSes. It is used to enable Modbus communication with the UPS to query configuration, power and battery status. Signed-off-by: Kees Jan Koster Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit 5683e1488aa9b0805a9403d215e48fed29d6d923 Author: Lorenzo Bianconi Date: Mon Mar 6 18:42:51 2023 +0100 wifi: mt76: connac: do not check WED status for non-mmio devices WED is supported just for mmio devices, so do not check it for usb or sdio devices. This patch fixes the crash reported below: [ 21.946627] wlp0s3u1i3: authenticate with c4:41:1e:f5:2b:1d [ 22.525298] wlp0s3u1i3: send auth to c4:41:1e:f5:2b:1d (try 1/3) [ 22.548274] wlp0s3u1i3: authenticate with c4:41:1e:f5:2b:1d [ 22.557694] wlp0s3u1i3: send auth to c4:41:1e:f5:2b:1d (try 1/3) [ 22.565885] wlp0s3u1i3: authenticated [ 22.569502] wlp0s3u1i3: associate with c4:41:1e:f5:2b:1d (try 1/3) [ 22.578966] wlp0s3u1i3: RX AssocResp from c4:41:1e:f5:2b:1d (capab=0x11 status=30 aid=3) [ 22.579113] wlp0s3u1i3: c4:41:1e:f5:2b:1d rejected association temporarily; comeback duration 1000 TU (1024 ms) [ 23.649518] wlp0s3u1i3: associate with c4:41:1e:f5:2b:1d (try 2/3) [ 23.752528] wlp0s3u1i3: RX AssocResp from c4:41:1e:f5:2b:1d (capab=0x11 status=0 aid=3) [ 23.797450] wlp0s3u1i3: associated [ 24.959527] kernel tried to execute NX-protected page - exploit attempt? (uid: 0) [ 24.959640] BUG: unable to handle page fault for address: ffff88800c223200 [ 24.959706] #PF: supervisor instruction fetch in kernel mode [ 24.959788] #PF: error_code(0x0011) - permissions violation [ 24.959846] PGD 2c01067 P4D 2c01067 PUD 2c02067 PMD c2a8063 PTE 800000000c223163 [ 24.959957] Oops: 0011 [#1] PREEMPT SMP [ 24.960009] CPU: 0 PID: 391 Comm: wpa_supplicant Not tainted 6.2.0-kvm #18 [ 24.960089] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.1-2.fc37 04/01/2014 [ 24.960191] RIP: 0010:0xffff88800c223200 [ 24.960446] RSP: 0018:ffffc90000ff7698 EFLAGS: 00010282 [ 24.960513] RAX: ffff888028397010 RBX: ffff88800c26e630 RCX: 0000000000000058 [ 24.960598] RDX: ffff88800c26f844 RSI: 0000000000000006 RDI: ffff888028397010 [ 24.960682] RBP: ffff88800ea72f00 R08: 18b873fbab2b964c R09: be06b38235f3c63c [ 24.960766] R10: 18b873fbab2b964c R11: be06b38235f3c63c R12: 0000000000000001 [ 24.960853] R13: ffff88800c26f84c R14: ffff8880063f0ff8 R15: ffff88800c26e644 [ 24.960950] FS: 00007effcea327c0(0000) GS:ffff88807dc00000(0000) knlGS:0000000000000000 [ 24.961036] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 24.961106] CR2: ffff88800c223200 CR3: 000000000eaa2000 CR4: 00000000000006b0 [ 24.961190] Call Trace: [ 24.961219] [ 24.961245] ? mt76_connac_mcu_add_key+0x2cf/0x310 [ 24.961313] ? mt7921_set_key+0x150/0x200 [ 24.961365] ? drv_set_key+0xa9/0x1b0 [ 24.961418] ? ieee80211_key_enable_hw_accel+0xd9/0x240 [ 24.961485] ? ieee80211_key_replace+0x3f3/0x730 [ 24.961541] ? crypto_shash_setkey+0x89/0xd0 [ 24.961597] ? ieee80211_key_link+0x2d7/0x3a0 [ 24.961664] ? crypto_aead_setauthsize+0x31/0x50 [ 24.961730] ? sta_info_hash_lookup+0xa6/0xf0 [ 24.961785] ? ieee80211_add_key+0x1fc/0x250 [ 24.961842] ? rdev_add_key+0x41/0x140 [ 24.961882] ? nl80211_parse_key+0x6c/0x2f0 [ 24.961940] ? nl80211_new_key+0x24a/0x290 [ 24.961984] ? genl_rcv_msg+0x36c/0x3a0 [ 24.962036] ? rdev_mod_link_station+0xe0/0xe0 [ 24.962102] ? nl80211_set_key+0x410/0x410 [ 24.962143] ? nl80211_pre_doit+0x200/0x200 [ 24.962187] ? genl_bind+0xc0/0xc0 [ 24.962217] ? netlink_rcv_skb+0xaa/0xd0 [ 24.962259] ? genl_rcv+0x24/0x40 [ 24.962300] ? netlink_unicast+0x224/0x2f0 [ 24.962345] ? netlink_sendmsg+0x30b/0x3d0 [ 24.962388] ? ____sys_sendmsg+0x109/0x1b0 [ 24.962388] ? ____sys_sendmsg+0x109/0x1b0 [ 24.962440] ? __import_iovec+0x2e/0x110 [ 24.962482] ? ___sys_sendmsg+0xbe/0xe0 [ 24.962525] ? mod_objcg_state+0x25c/0x330 [ 24.962576] ? __dentry_kill+0x19e/0x1d0 [ 24.962618] ? call_rcu+0x18f/0x270 [ 24.962660] ? __dentry_kill+0x19e/0x1d0 [ 24.962702] ? __x64_sys_sendmsg+0x70/0x90 [ 24.962744] ? do_syscall_64+0x3d/0x80 [ 24.962796] ? exit_to_user_mode_prepare+0x1b/0x70 [ 24.962852] ? entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 24.962913] [ 24.962939] Modules linked in: [ 24.962981] CR2: ffff88800c223200 [ 24.963022] ---[ end trace 0000000000000000 ]--- [ 24.963087] RIP: 0010:0xffff88800c223200 [ 24.963323] RSP: 0018:ffffc90000ff7698 EFLAGS: 00010282 [ 24.963376] RAX: ffff888028397010 RBX: ffff88800c26e630 RCX: 0000000000000058 [ 24.963458] RDX: ffff88800c26f844 RSI: 0000000000000006 RDI: ffff888028397010 [ 24.963538] RBP: ffff88800ea72f00 R08: 18b873fbab2b964c R09: be06b38235f3c63c [ 24.963622] R10: 18b873fbab2b964c R11: be06b38235f3c63c R12: 0000000000000001 [ 24.963705] R13: ffff88800c26f84c R14: ffff8880063f0ff8 R15: ffff88800c26e644 [ 24.963788] FS: 00007effcea327c0(0000) GS:ffff88807dc00000(0000) knlGS:0000000000000000 [ 24.963871] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 24.963941] CR2: ffff88800c223200 CR3: 000000000eaa2000 CR4: 00000000000006b0 [ 24.964018] note: wpa_supplicant[391] exited with irqs disabled Fixes: d1369e515efe ("wifi: mt76: connac: introduce mt76_connac_mcu_sta_wed_update utility routine") Signed-off-by: Lorenzo Bianconi Acked-by: Felix Fietkau Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/c42168429453474213fa8244bf4b069de4531f40.1678124335.git.lorenzo@kernel.org commit c2f73eacee3bf1df2cfe25e1f08a3cae98b1df3d Author: Felix Fietkau Date: Wed Mar 1 17:37:39 2023 +0100 wifi: mt76: mt7915: add back 160MHz channel width support for MT7915 A number of users reported that this support was working fine before it got removed. Add it back, but leave out the unsupported 80+80 mode. Fixes: ac922bd60ace ("wifi: mt76: mt7915: remove BW160 and BW80+80 support") Signed-off-by: Felix Fietkau Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230301163739.52314-1-nbd@nbd.name commit 41130c32f3a18fcc930316da17f3a5f3bc326aa1 Author: Lorenzo Bianconi Date: Thu Feb 23 00:10:25 2023 +0100 wifi: mt76: do not run mt76_unregister_device() on unregistered hw Trying to probe a mt7921e pci card without firmware results in a successful probe where ieee80211_register_hw hasn't been called. When removing the driver, ieee802111_unregister_hw is called unconditionally leading to a kernel NULL pointer dereference. Fix the issue running mt76_unregister_device routine just for registered hw. Link: https://bugs.debian.org/1029116 Link: https://bugs.kali.org/view.php?id=8140 Reported-by: Stuart Hayhurst Fixes: 1c71e03afe4b ("mt76: mt7921: move mt7921_init_hw in a dedicated work") Tested-by: Helmut Grohne Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/be3457d82f4e44bb71a22b2b5db27b644a37b1e1.1677107277.git.lorenzo@kernel.org commit dda5c809d42389b82f37cbbe562044d8a29083c6 Merge: e041a2a550582 eeac8ede17557 Author: Mark Brown Date: Mon Mar 13 13:18:59 2023 +0000 Merge tag 'v6.3-rc2' into asoc-6.3 to fix clock related failures Linux 6.3-rc2 commit 72f7754dcf31c87c92c0c353dcf747814cc5ce10 Author: Dionna Glaze Date: Thu Feb 16 11:08:02 2023 +0100 virt/coco/sev-guest: Add throttling awareness A potentially malicious SEV guest can constantly hammer the hypervisor using this driver to send down requests and thus prevent or at least considerably hinder other guests from issuing requests to the secure processor which is a shared platform resource. Therefore, the host is permitted and encouraged to throttle such guest requests. Add the capability to handle the case when the hypervisor throttles excessive numbers of requests issued by the guest. Otherwise, the VM platform communication key will be disabled, preventing the guest from attesting itself. Realistically speaking, a well-behaved guest should not even care about throttling. During its lifetime, it would end up issuing a handful of requests which the hardware can easily handle. This is more to address the case of a malicious guest. Such guest should get throttled and if its VMPCK gets disabled, then that's its own wrongdoing and perhaps that guest even deserves it. To the implementation: the hypervisor signals with SNP_GUEST_REQ_ERR_BUSY that the guest requests should be throttled. That error code is returned in the upper 32-bit half of exitinfo2 and this is part of the GHCB spec v2. So the guest is given a throttling period of 1 minute in which it retries the request every 2 seconds. This is a good default but if it turns out to not pan out in practice, it can be tweaked later. For safety, since the encryption algorithm in GHCBv2 is AES_GCM, control must remain in the kernel to complete the request with the current sequence number. Returning without finishing the request allows the guest to make another request but with different message contents. This is IV reuse, and breaks cryptographic protections. [ bp: - Rewrite commit message and do a simplified version. - The stable tags are supposed to denote that a cleanup should go upfront before backporting this so that any future fixes to this can preserve the sanity of the backporter(s). ] Fixes: d5af44dde546 ("x86/sev: Provide support for SNP guest request NAEs") Signed-off-by: Dionna Glaze Co-developed-by: Borislav Petkov (AMD) Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Tom Lendacky Cc: # d6fd48eff750 ("virt/coco/sev-guest: Check SEV_SNP attribute at probe time") Cc: # 970ab823743f (" virt/coco/sev-guest: Simplify extended guest request handling") Cc: # c5a338274bdb ("virt/coco/sev-guest: Remove the disable_vmpck label in handle_guest_request()") Cc: # 0fdb6cc7c89c ("virt/coco/sev-guest: Carve out the request issuing logic into a helper") Cc: # d25bae7dc7b0 ("virt/coco/sev-guest: Do some code style cleanups") Cc: # fa4ae42cc60a ("virt/coco/sev-guest: Convert the sw_exit_info_2 checking to a switch-case") Link: https://lore.kernel.org/r/20230214164638.1189804-2-dionnaglaze@google.com commit fa4ae42cc60a7dea30e8f2db444b808d80862345 Author: Borislav Petkov (AMD) Date: Thu Feb 16 10:50:11 2023 +0100 virt/coco/sev-guest: Convert the sw_exit_info_2 checking to a switch-case snp_issue_guest_request() checks the value returned by the hypervisor in sw_exit_info_2 and returns a different error depending on it. Convert those checks into a switch-case to make it more readable when more error values are going to be checked in the future. No functional changes. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Tom Lendacky Link: https://lore.kernel.org/r/20230307192449.24732-8-bp@alien8.de commit d25bae7dc7b0668cb2a1325c64eb32d5fea4e5a9 Author: Borislav Petkov (AMD) Date: Wed Feb 15 11:54:59 2023 +0100 virt/coco/sev-guest: Do some code style cleanups Remove unnecessary linebreaks, make the code more compact. No functional changes. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Tom Lendacky Link: https://lore.kernel.org/r/20230307192449.24732-7-bp@alien8.de commit 2cde14b187b458b7dcf99360fe4435dae1645a1f 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 Link: https://patchwork.freedesktop.org/patch/msgid/20230301162508.3963484-1-stanislaw.gruszka@linux.intel.com (cherry picked from commit dd61bbd0d1fba48cd9464e047a7f90b70a463e39) Signed-off-by: Jacek Lawrynowicz commit 0fdb6cc7c89cb5e0cbc45dbdbafb8e3fb92ddc95 Author: Borislav Petkov (AMD) Date: Tue Mar 7 09:19:19 2023 -0600 virt/coco/sev-guest: Carve out the request issuing logic into a helper This makes the code flow a lot easier to follow. No functional changes. [ Tom: touchups. ] Signed-off-by: Borislav Petkov (AMD) Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230307192449.24732-6-bp@alien8.de commit c5a338274bdb894f088767bea856be344d0ccaef Author: Borislav Petkov (AMD) Date: Wed Feb 15 11:43:43 2023 +0100 virt/coco/sev-guest: Remove the disable_vmpck label in handle_guest_request() Call the function directly instead. No functional changes. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Tom Lendacky Link: https://lore.kernel.org/r/20230307192449.24732-5-bp@alien8.de commit 970ab823743fb54b42002ec76c51481f67436444 Author: Borislav Petkov (AMD) Date: Wed Feb 15 11:39:41 2023 +0100 virt/coco/sev-guest: Simplify extended guest request handling Return a specific error code - -ENOSPC - to signal the too small cert data buffer instead of checking exit code and exitinfo2. While at it, hoist the *fw_err assignment in snp_issue_guest_request() so that a proper error value is returned to the callers. [ Tom: check override_err instead of err. ] Signed-off-by: Borislav Petkov (AMD) Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230307192449.24732-4-bp@alien8.de commit d6fd48eff7506bb866a54e40369df8899f2078a9 Author: Borislav Petkov (AMD) Date: Wed Feb 15 11:01:42 2023 +0100 virt/coco/sev-guest: Check SEV_SNP attribute at probe time No need to check it on every ioctl. And yes, this is a common SEV driver but it does only SNP-specific operations currently. This can be revisited later, when more use cases appear. No functional changes. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Tom Lendacky Link: https://lore.kernel.org/r/20230307192449.24732-3-bp@alien8.de commit c82510b1d87bdebfe916048857d2ef46f1778aa5 Author: Mika Westerberg Date: Tue Dec 27 11:55:26 2022 +0200 thunderbolt: Use scale field when allocating USB3 bandwidth When tunneling aggregated USB3 (20 Gb/s) the bandwidth values that are programmed to the ADP_USB3_CS_2 go higher than 4096 and that does not fit anymore to the 12-bit field. Fix this by scaling the value using the scale field accordingly. Fixes: 3b1d8d577ca8 ("thunderbolt: Implement USB3 bandwidth negotiation routines") Cc: stable@vger.kernel.org Signed-off-by: Mika Westerberg commit f0a57dd33b3eadf540912cd130db727ea824d174 Author: Gil Fine Date: Tue Jan 31 13:04:52 2023 +0200 thunderbolt: Limit USB3 bandwidth of certain Intel USB4 host routers Current Intel USB4 host routers have hardware limitation that the USB3 bandwidth cannot go higher than 16376 Mb/s. Work this around by adding a new quirk that limits the bandwidth for the affected host routers. Cc: stable@vger.kernel.org Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg commit d2d6ddf188f609861489d5d188d545856a3ed399 Author: Mika Westerberg Date: Fri Feb 3 15:55:41 2023 +0200 thunderbolt: Call tb_check_quirks() after initializing adapters In order to apply quirks based on certain adapter types move call to tb_check_quirks() happen after the adapters are initialized. This should not affect the existing quirks. Cc: stable@vger.kernel.org Signed-off-by: Mika Westerberg commit cd0c1e582b055dea615001b8bd8eccaf6f69f7ce Author: Gil Fine Date: Fri Mar 3 00:17:24 2023 +0200 thunderbolt: Add missing UNSET_INBOUND_SBTX for retimer access According to USB4 retimer specification, the process of firmware update sequence requires issuing a SET_INBOUND_SBTX port operation that later shall be followed by UNSET_INBOUND_SBTX port operation. This last step is not currently issued by the driver but it is necessary to make sure the retimers are put back to passthrough mode even during enumeration. If this step is missing the link may not come up properly after soft-reboot for example. For this reason issue UNSET_INBOUND_SBTX after SET_INBOUND_SBTX for enumeration and also when the NVM upgrade is run. Reported-by: Christian Schaubschläger Link: https://lore.kernel.org/linux-usb/b556f5ed-5ee8-9990-9910-afd60db93310@gmx.at/ Cc: stable@vger.kernel.org Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg commit acec726473822bc6b585961f4ca2a11fa7f28341 Author: Mika Westerberg Date: Fri Mar 3 11:25:08 2023 +0200 thunderbolt: Fix memory leak in margining Memory for the usb4->margining needs to be relased for the upstream port of the router as well, even though the debugfs directory gets released with the router device removal. Fix this. Fixes: d0f1e0c2a699 ("thunderbolt: Add support for receiver lane margining") Cc: stable@vger.kernel.org Signed-off-by: Mika Westerberg commit e0e6b416b25ee14716f3549e0cbec1011b193809 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 (cherry picked from commit 506006055769b10d1b2b4e22f636f3b45e0e9fc7) Signed-off-by: Jani Nikula commit 193c41926d152761764894f46e23b53c00186a82 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 (cherry picked from commit 3cba09a6ac86ea1d456909626eb2685596c07822) Signed-off-by: Jani Nikula commit 46bc23dcd94569270d02c4c1f7e62ae01ebd53bb 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 (cherry picked from commit d46746b8b13cbd377ffc733e465d25800459a31b) Signed-off-by: Jani Nikula commit 71c602103c74b277bef3d20a308874a33ec8326d 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 (cherry picked from commit cb42e8ede5b475c096e473b86c356b1158b4bc3b) Signed-off-by: Jani Nikula commit 897f453c106380e57600c19a0a0485ceb4f3b0d9 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 (cherry picked from commit 518b761a7b0e2bb2fac2518f041c71b461adf761) Signed-off-by: Jani Nikula commit ee892ea83d99610fa33bea612de058e0955eec3a Author: Ashutosh Dixit Date: Fri Feb 3 07:53:09 2023 -0800 drm/i915/hwmon: Enable PL1 power limit Previous documentation suggested that PL1 power limit is always enabled. However we now find this not to be the case on some platforms (such as ATSM). Therefore enable PL1 power limit during hwmon initialization. Bspec: 51864 v2: Add Bspec reference (Gwan-gyeong) v3: Add Fixes tag Fixes: 99f55efb79114 ("drm/i915/hwmon: Power PL1 limit and TDP setting") Signed-off-by: Ashutosh Dixit Reviewed-by: Gwan-gyeong Mun Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230203155309.1042297-1-ashutosh.dixit@intel.com (cherry picked from commit 0349c41b05968befaffa5fbb7e73d0ee6004f610) Signed-off-by: Jani Nikula commit b3c9a04135bdbd3aabd5e9534bad0fe6df505f8a Merge: fe9ae05cfbe58 eeac8ede17557 Author: Thomas Zimmermann Date: Mon Mar 13 10:14:05 2023 +0100 Merge drm/drm-fixes into drm-misc-fixes Backmerging to get latest upstream. Signed-off-by: Thomas Zimmermann commit d7a0bdbf17276b757d2b89f5351bbee9ecf58fe6 Author: Heiko Carstens Date: Fri Mar 10 14:19:55 2023 +0100 s390: update defconfigs Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit ab909509850b27fd39b8ba99e44cda39dbc3858c Author: Niklas Schnelle Date: Mon Mar 6 16:10:11 2023 +0100 PCI: s390: Fix use-after-free of PCI resources with per-function hotplug On s390 PCI functions may be hotplugged individually even when they belong to a multi-function device. In particular on an SR-IOV device VFs may be removed and later re-added. In commit a50297cf8235 ("s390/pci: separate zbus creation from scanning") it was missed however that struct pci_bus and struct zpci_bus's resource list retained a reference to the PCI functions MMIO resources even though those resources are released and freed on hot-unplug. These stale resources may subsequently be claimed when the PCI function re-appears resulting in use-after-free. One idea of fixing this use-after-free in s390 specific code that was investigated was to simply keep resources around from the moment a PCI function first appeared until the whole virtual PCI bus created for a multi-function device disappears. The problem with this however is that due to the requirement of artificial MMIO addreesses (address cookies) extra logic is then needed to keep the address cookies compatible on re-plug. At the same time the MMIO resources semantically belong to the PCI function so tying their lifecycle to the function seems more logical. Instead a simpler approach is to remove the resources of an individually hot-unplugged PCI function from the PCI bus's resource list while keeping the resources of other PCI functions on the PCI bus untouched. This is done by introducing pci_bus_remove_resource() to remove an individual resource. Similarly the resource also needs to be removed from the struct zpci_bus's resource list. It turns out however, that there is really no need to add the MMIO resources to the struct zpci_bus's resource list at all and instead we can simply use the zpci_bar_struct's resource pointer directly. Fixes: a50297cf8235 ("s390/pci: separate zbus creation from scanning") Signed-off-by: Niklas Schnelle Reviewed-by: Matthew Rosato Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20230306151014.60913-2-schnelle@linux.ibm.com Signed-off-by: Vasily Gorbik commit a52e5cdbe8016d4e3e6322fd93d71afddb9a5af9 Author: Sven Schnelle Date: Tue Mar 7 14:35:23 2023 +0100 s390/ipl: add missing intersection check to ipl_report handling The code which handles the ipl report is searching for a free location in memory where it could copy the component and certificate entries to. It checks for intersection between the sections required for the kernel and the component/certificate data area, but fails to check whether the data structures linking these data areas together intersect. This might cause the iplreport copy code to overwrite the iplreport itself. Fix this by adding two addtional intersection checks. Cc: Fixes: 9641b8cc733f ("s390/ipl: read IPL report at early boot") Signed-off-by: Sven Schnelle Reviewed-by: Vasily Gorbik Signed-off-by: Vasily Gorbik commit ae43c20da2a77c508715a9c77845b4e87e6a1e25 Author: Rong Tao Date: Thu Mar 9 14:13:07 2023 +0800 tools/virtio: Ignore virtio-trace/trace-agent since commit 108fc82596e3("tools: Add guest trace agent as a user tool") introduce virtio-trace/trace-agent, it should be ignored in the git tree. Signed-off-by: Rong Tao Message-Id: Signed-off-by: Michael S. Tsirkin commit b4cca6d48eb3fa6f0d9caba4329b1a2b0ff67a77 Author: Eugenio Pérez Date: Thu Mar 2 19:18:57 2023 +0100 vdpa_sim: set last_used_idx as last_avail_idx in vdpasim_queue_ready Starting from an used_idx different than 0 is needed in use cases like virtual machine migration. Not doing so and letting the caller set an avail idx different than 0 causes destination device to try to use old buffers that source driver already recover and are not available anymore. Since vdpa_sim does not support receive inflight descriptors as a destination of a migration, let's set both avail_idx and used_idx the same at vq start. This is how vhost-user works in a VHOST_SET_VRING_BASE call. Although the simple fix is to set last_used_idx at vdpasim_set_vq_state, it would be reset at vdpasim_queue_ready. The last_avail_idx case is fixed with commit 0e84f918fac8 ("vdpa_sim: not reset state in vdpasim_queue_ready"). Since the only option is to make it equal to last_avail_idx, adding the only change needed here. This was discovered and tested live migrating the vdpa_sim_net device. Fixes: 2c53d0f64c06 ("vdpasim: vDPA device simulator") Reviewed-by: Stefano Garzarella Signed-off-by: Eugenio Pérez Message-Id: <20230302181857.925374-1-eperezma@redhat.com> Signed-off-by: Michael S. Tsirkin commit 5a522150093a0eabae9470a70a37a6e436bfad08 Author: Gautam Dawar Date: Wed Mar 1 22:02:01 2023 +0530 vhost-vdpa: free iommu domain after last use during cleanup Currently vhost_vdpa_cleanup() unmaps the DMA mappings by calling `iommu_unmap(v->domain, map->start, map->size);` from vhost_vdpa_general_unmap() when the parent vDPA driver doesn't provide DMA config operations. However, the IOMMU domain referred to by `v->domain` is freed in vhost_vdpa_free_domain() before vhost_vdpa_cleanup() in vhost_vdpa_release() which results in NULL pointer de-reference. Accordingly, moving the call to vhost_vdpa_free_domain() in vhost_vdpa_cleanup() would makes sense. This will also help detaching the dma device in error handling of vhost_vdpa_alloc_domain(). This issue was observed on terminating QEMU with SIGQUIT. Fixes: 037d4305569a ("vhost-vdpa: call vhost_vdpa_cleanup during the release") Signed-off-by: Gautam Dawar Message-Id: <20230301163203.29883-1-gautam.dawar@amd.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Reviewed-by: Stefano Garzarella commit eeac8ede17557680855031c6f305ece2378af326 Author: Linus Torvalds Date: Sun Mar 12 16:36:44 2023 -0700 Linux 6.3-rc2 commit 79d1ed5ca7db67d48e870c979f0e0f6b0947944a Author: Hector Martin Date: Sat Mar 11 23:19:14 2023 +0900 wifi: cfg80211: Partial revert "wifi: cfg80211: Fix use after free for wext" This reverts part of commit 015b8cc5e7c4 ("wifi: cfg80211: Fix use after free for wext") This commit broke WPA offload by unconditionally clearing the crypto modes for non-WEP connections. Drop that part of the patch. Signed-off-by: Hector Martin Reported-by: Ilya Reported-and-tested-by: Janne Grunau Reviewed-by: Eric Curtin Fixes: 015b8cc5e7c4 ("wifi: cfg80211: Fix use after free for wext") Cc: stable@kernel.org Link: https://lore.kernel.org/linux-wireless/ZAx0TWRBlGfv7pNl@kroah.com/T/#m11e6e0915ab8fa19ce8bc9695ab288c0fe018edf Signed-off-by: Linus Torvalds commit c4ecd87f75ec4d5ac3006ef21ce07e812982e46e Merge: 2e545d69bd43a f1324bbc4011e Author: Linus Torvalds Date: Sun Mar 12 16:15:36 2023 -0700 Merge tag 'tpm-v6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd Pull tpm fixes from Jarkko Sakkinen: "Two additional bug fixes for v6.3" * tag 'tpm-v6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: tpm: disable hwrng for fTPM on some AMD designs tpm/eventlog: Don't abort tpm_read_log on faulty ACPI address commit 06615d11cc78162dfd5116efb71f29eb29502d37 Author: Zheng Wang Date: Sun Mar 12 01:46:50 2023 +0800 power: supply: da9150: Fix use after free bug in da9150_charger_remove due to race condition In da9150_charger_probe, &charger->otg_work is bound with da9150_charger_otg_work. da9150_charger_otg_ncb may be called to start the work. If we remove the module which will call da9150_charger_remove to make cleanup, there may be a unfinished work. The possible sequence is as follows: Fix it by canceling the work before cleanup in the da9150_charger_remove CPU0 CPUc1 |da9150_charger_otg_work da9150_charger_remove | power_supply_unregister | device_unregister | power_supply_dev_release| kfree(psy) | | | power_supply_changed(charger->usb); | //use Fixes: c1a281e34dae ("power: Add support for DA9150 Charger") Signed-off-by: Zheng Wang Signed-off-by: Sebastian Reichel commit f1324bbc4011ed8aef3f4552210fc429bcd616da Author: Mario Limonciello Date: Mon Feb 27 20:44:39 2023 -0600 tpm: disable hwrng for fTPM on some AMD designs AMD has issued an advisory indicating that having fTPM enabled in BIOS can cause "stuttering" in the OS. This issue has been fixed in newer versions of the fTPM firmware, but it's up to system designers to decide whether to distribute it. This issue has existed for a while, but is more prevalent starting with kernel 6.1 because commit b006c439d58db ("hwrng: core - start hwrng kthread also for untrusted sources") started to use the fTPM for hwrng by default. However, all uses of /dev/hwrng result in unacceptable stuttering. So, simply disable registration of the defective hwrng when detecting these faulty fTPM versions. As this is caused by faulty firmware, it is plausible that such a problem could also be reproduced by other TPM interactions, but this hasn't been shown by any user's testing or reports. It is hypothesized to be triggered more frequently by the use of the RNG because userspace software will fetch random numbers regularly. Intentionally continue to register other TPM functionality so that users that rely upon PCR measurements or any storage of data will still have access to it. If it's found later that another TPM functionality is exacerbating this problem a module parameter it can be turned off entirely and a module parameter can be introduced to allow users who rely upon fTPM functionality to turn it on even though this problem is present. Link: https://www.amd.com/en/support/kb/faq/pa-410 Link: https://bugzilla.kernel.org/show_bug.cgi?id=216989 Link: https://lore.kernel.org/all/20230209153120.261904-1-Jason@zx2c4.com/ Fixes: b006c439d58d ("hwrng: core - start hwrng kthread also for untrusted sources") Cc: stable@vger.kernel.org Cc: Jarkko Sakkinen Cc: Thorsten Leemhuis Cc: James Bottomley Tested-by: reach622@mailcuk.com Tested-by: Bell <1138267643@qq.com> Co-developed-by: Jason A. Donenfeld Signed-off-by: Jason A. Donenfeld Signed-off-by: Mario Limonciello Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 80a6c216b16d7f5c584d2148c2e4345ea4eb06ce Author: Morten Linderud Date: Wed Feb 15 10:25:52 2023 +0100 tpm/eventlog: Don't abort tpm_read_log on faulty ACPI address tpm_read_log_acpi() should return -ENODEV when no eventlog from the ACPI table is found. If the firmware vendor includes an invalid log address we are unable to map from the ACPI memory and tpm_read_log() returns -EIO which would abort discovery of the eventlog. Change the return value from -EIO to -ENODEV when acpi_os_map_iomem() fails to map the event log. The following hardware was used to test this issue: Framework Laptop (Pre-production) BIOS: INSYDE Corp, Revision: 3.2 TPM Device: NTC, Firmware Revision: 7.2 Dump of the faulty ACPI TPM2 table: [000h 0000 4] Signature : "TPM2" [Trusted Platform Module hardware interface Table] [004h 0004 4] Table Length : 0000004C [008h 0008 1] Revision : 04 [009h 0009 1] Checksum : 2B [00Ah 0010 6] Oem ID : "INSYDE" [010h 0016 8] Oem Table ID : "TGL-ULT" [018h 0024 4] Oem Revision : 00000002 [01Ch 0028 4] Asl Compiler ID : "ACPI" [020h 0032 4] Asl Compiler Revision : 00040000 [024h 0036 2] Platform Class : 0000 [026h 0038 2] Reserved : 0000 [028h 0040 8] Control Address : 0000000000000000 [030h 0048 4] Start Method : 06 [Memory Mapped I/O] [034h 0052 12] Method Parameters : 00 00 00 00 00 00 00 00 00 00 00 00 [040h 0064 4] Minimum Log Length : 00010000 [044h 0068 8] Log Address : 000000004053D000 Fixes: 0cf577a03f21 ("tpm: Fix handling of missing event log") Tested-by: Erkki Eilonen Signed-off-by: Morten Linderud Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 00d85e81796b17a29a0e096c5a4735daa47adef8 Author: Krzysztof Kozlowski Date: Sun Mar 12 20:37:23 2023 +0100 hwmon: tmp512: 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/hwmon/tmp513.c:610:34: error: ‘tmp51x_of_match’ defined but not used [-Werror=unused-const-variable=] Fixes: 59dfa75e5d82 ("hwmon: Add driver for Texas Instruments TMP512/513 sensor chips.") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230312193723.478032-2-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck commit 8d655e65237643c48ada2c131b83679bf1105373 Author: Lars-Peter Clausen Date: Sun Mar 12 09:03:12 2023 -0700 hwmon: (ucd90320) Add minimum delay between bus accesses When probing the ucd90320 access to some of the registers randomly fails. Sometimes it NACKs a transfer, sometimes it returns just random data and the PEC check fails. Experimentation shows that this seems to be triggered by a register access directly back to back with a previous register write. Experimentation also shows that inserting a small delay after register writes makes the issue go away. Use a similar solution to what the max15301 driver does to solve the same problem. Create a custom set of bus read and write functions that make sure that the delay is added. Fixes: a470f11c5ba2 ("hwmon: (pmbus/ucd9000) Add support for UCD90320 Power Sequencer") Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20230312160312.2227405-1-lars@metafoo.de Signed-off-by: Guenter Roeck commit 4783b9cb374af02d49740e00e2da19fd4ed6dec4 Author: Yazen Ghannam Date: Wed Mar 1 22:14:20 2023 +0000 x86/mce: Make sure logged MCEs are processed after sysfs update A recent change introduced a flag to queue up errors found during boot-time polling. These errors will be processed during late init once the MCE subsystem is fully set up. A number of sysfs updates call mce_restart() which goes through a subset of the CPU init flow. This includes polling MCA banks and logging any errors found. Since the same function is used as boot-time polling, errors will be queued. However, the system is now past late init, so the errors will remain queued until another error is found and the workqueue is triggered. Call mce_schedule_work() at the end of mce_restart() so that queued errors are processed. Fixes: 3bff147b187d ("x86/mce: Defer processing of early errors") Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Tony Luck Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230301221420.2203184-1-yazen.ghannam@amd.com commit c93f5e2ab53243b17febabb9422a697017d3d49a Author: Marcus Folkesson Date: Fri Mar 10 08:50:35 2023 +0100 hwmon: (ina3221) return prober error code ret is set to 0 which do not indicate an error. Return -EINVAL instead. Fixes: a9e9dd9c6de5 ("hwmon: (ina3221) Read channel input source info from DT") Signed-off-by: Marcus Folkesson Link: https://lore.kernel.org/r/20230310075035.246083-1-marcus.folkesson@gmail.com Signed-off-by: Guenter Roeck commit cb090e64cf25602b9adaf32d5dfc9c8bec493cd1 Author: Zheng Wang Date: Fri Mar 10 16:40:07 2023 +0800 hwmon: (xgene) Fix use after free bug in xgene_hwmon_remove due to race condition In xgene_hwmon_probe, &ctx->workq is bound with xgene_hwmon_evt_work. Then it will be started. If we remove the driver which will call xgene_hwmon_remove to clean up, there may be unfinished work. The possible sequence is as follows: Fix it by finishing the work before cleanup in xgene_hwmon_remove. CPU0 CPU1 |xgene_hwmon_evt_work xgene_hwmon_remove | kfifo_free(&ctx->async_msg_fifo);| | |kfifo_out_spinlocked |//use &ctx->async_msg_fifo Fixes: 2ca492e22cb7 ("hwmon: (xgene) Fix crash when alarm occurs before driver probe") Signed-off-by: Zheng Wang Link: https://lore.kernel.org/r/20230310084007.1403388-1-zyytlz.wz@163.com Signed-off-by: Guenter Roeck commit 2e545d69bd43a97879309493864529194661bb43 Merge: 134231664868e 8ac5b996bf519 Author: Linus Torvalds Date: Sun Mar 12 09:47:08 2023 -0700 Merge tag 'xfs-6.3-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: - Fix a crash if mount time quotacheck fails when there are inodes queued for garbage collection. - Fix an off by one error when discarding folios after writeback failure. * tag 'xfs-6.3-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: fix off-by-one-block in xfs_discard_folio() xfs: quotacheck failure can race with background inode inactivation commit 134231664868e163580cfe79e8c923560d7de302 Merge: d3d0cac69fc50 fdf6c2309f425 Author: Linus Torvalds Date: Sun Mar 12 09:17:30 2023 -0700 Merge tag 'staging-6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver fixes and removal from Greg KH: "Here are four small staging driver fixes, and one big staging driver deletion for 6.3-rc2. The fixes are: - rtl8192e driver fixes for where the driver was attempting to execute various programs directly from the disk for unknown reasons - rtl8723bs driver fixes for issues found by Hans in testing The deleted driver is the removal of the r8188eu wireless driver as now in 6.3-rc1 we have a "real" wifi driver for one that includes support for many many more devices than this old driver did. So it's time to remove it as it is no longer needed. The maintainers of this driver all have acked its removal. Many thanks to them over the years for working to clean it up and keep it working while the real driver was being developed. All of these have been in linux-next this week with no reported problems" * tag 'staging-6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: r8188eu: delete driver staging: rtl8723bs: Pass correct parameters to cfg80211_get_bss() staging: rtl8723bs: Fix key-store index handling staging: rtl8192e: Remove call_usermodehelper starting RadioPower.sh staging: rtl8192e: Remove function ..dm_check_ac_dc_power calling a script commit d3d0cac69fc509ece28a267c093d2f1094f88dba Merge: f5eded1f5f117 b0563468eeac8 Author: Linus Torvalds Date: Sun Mar 12 09:12:03 2023 -0700 Merge tag 'x86_urgent_for_v6.3_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Borislav Petkov: "A single erratum fix for AMD machines: - Disable XSAVES on AMD Zen1 and Zen2 machines due to an erratum. No impact to anything as those machines will fallback to XSAVEC which is equivalent there" * tag 'x86_urgent_for_v6.3_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/CPU/AMD: Disable XSAVES on AMD family 0x17 commit f5eded1f5f117ed2151f605867ad7df1fd7d1bbe Merge: 3b11717f95b18 515bddf0ec415 Author: Linus Torvalds Date: Sun Mar 12 09:04:28 2023 -0700 Merge tag 'kernel.fork.v6.3-rc2' of gitolite.kernel.org:pub/scm/linux/kernel/git/brauner/linux Pull clone3 fix from Christian Brauner: "A simple fix for the clone3() system call. The CLONE_NEWTIME allows the creation of time namespaces. The flag reuses a bit from the CSIGNAL bits that are used in the legacy clone() system call to set the signal that gets sent to the parent after the child exits. The clone3() system call doesn't rely on CSIGNAL anymore as it uses a dedicated .exit_signal field in struct clone_args. So we blocked all CSIGNAL bits in clone3_args_valid(). When CLONE_NEWTIME was introduced and reused a CSIGNAL bit we forgot to adapt clone3_args_valid() causing CLONE_NEWTIME with clone3() to be rejected. Fix this" * tag 'kernel.fork.v6.3-rc2' of gitolite.kernel.org:pub/scm/linux/kernel/git/brauner/linux: selftests/clone3: test clone3 with CLONE_NEWTIME fork: allow CLONE_NEWTIME in clone3 flags commit 3b11717f95b1880b9cab4b90bbaf61268e6bda2b Merge: 40d0c0901e6c1 42d0c4bdf7530 Author: Linus Torvalds Date: Sun Mar 12 09:00:54 2023 -0700 Merge tag 'vfs.misc.v6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping Pull vfs fixes from Christian Brauner: - When allocating pages for a watch queue failed, we didn't return an error causing userspace to proceed even though all subsequent notifcations would be lost. Make sure to return an error. - Fix a misformed tree entry for the idmapping maintainers entry. - When setting file leases from an idmapped mount via generic_setlease() we need to take the idmapping into account otherwise taking a lease would fail from an idmapped mount. - Remove two redundant assignments, one in splice code and the other in locks code, that static checkers complained about. * tag 'vfs.misc.v6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping: filelocks: use mount idmapping for setlease permission check fs/locks: Remove redundant assignment to cmd splice: Remove redundant assignment to ret MAINTAINERS: repair a malformed T: entry in IDMAPPED MOUNTS watch_queue: fix IOC_WATCH_QUEUE_SET_SIZE alloc error paths commit 40d0c0901e6c19cf268d2f505bce0b50319c5653 Merge: e7304080e0e50 f5361da1e60d5 Author: Linus Torvalds Date: Sun Mar 12 08:55:55 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: "Bug fixes and regressions for ext4, the most serious of which is a potential deadlock during directory renames that was introduced during the merge window discovered by a combination of syzbot and lockdep" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: zero i_disksize when initializing the bootloader inode ext4: make sure fs error flag setted before clear journal error ext4: commit super block if fs record error when journal record without error ext4, jbd2: add an optimized bmap for the journal inode ext4: fix WARNING in ext4_update_inline_data ext4: move where set the MAY_INLINE_DATA flag is set ext4: Fix deadlock during directory rename ext4: Fix comment about the 64BIT feature docs: ext4: modify the group desc size to 64 ext4: fix another off-by-one fsmap error on 1k block filesystems ext4: fix RENAME_WHITEOUT handling for inline directories ext4: make kobj_type structures constant ext4: fix cgroup writeback accounting with fs-layer encryption commit e7304080e0e50d979ce9eaf694ad8283e2e539ea Author: Linus Torvalds Date: Sun Mar 12 08:52:03 2023 -0700 cpumask: relax sanity checking constraints The cpumask_check() was unnecessarily tight, and causes problems for the users of cpumask_next(). We have a number of users that take the previous return value of one of the bit scanning functions and subtract one to keep it in "range". But since the scanning functions end up returning up to 'small_cpumask_bits' instead of the tighter 'nr_cpumask_bits', the range really needs to be using that widened form. [ This "previous-1" behavior is also the reason we have all those comments about /* -1 is a legal arg here. */ and separate checks for that being ok. So we could have just made "small_cpumask_bits-1" be a similar special "don't check this" value. Tetsuo Handa even suggested a patch that only does that for cpumask_next(), since that seems to be the only actual case that triggers, but that all makes it even _more_ magical and special. So just relax the check ] One example of this kind of pattern being the 'c_start()' function in arch/x86/kernel/cpu/proc.c, but also duplicated in various forms on other architectures. Reported-by: syzbot+96cae094d90877641f32@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=96cae094d90877641f32 Reported-by: Tetsuo Handa Link: https://lore.kernel.org/lkml/c1f4cc16-feea-b83c-82cf-1a1f007b7eb9@I-love.SAKURA.ne.jp/ Fixes: 596ff4a09b89 ("cpumask: re-introduce constant-sized cpumask optimizations") Signed-off-by: Linus Torvalds commit 7b3825e9487d77e83bf1e27b10a74cd729b8f972 Author: Nuno Sá Date: Tue Mar 7 10:53:03 2023 +0100 iio: adc: max11410: fix read_poll_timeout() usage Even though we are passing 'ret' as stop condition for read_poll_timeout(), that return code is still being ignored. The reason is that the poll will stop if the passed condition is true which will happen if the passed op() returns error. However, read_poll_timeout() returns 0 if the *complete* condition evaluates to true. Therefore, the error code returned by op() will be ignored. To fix this we need to check for both error codes: * The one returned by read_poll_timeout() which is either 0 or ETIMEDOUT. * The one returned by the passed op(). Fixes: a44ef7c46097 ("iio: adc: add max11410 adc driver") Signed-off-by: Nuno Sá Acked-by: Ibrahim Tilki Link: https://lore.kernel.org/r/20230307095303.713251-1-nuno.sa@analog.com Cc: Signed-off-by: Jonathan Cameron commit 44ac5abac86b20856e6d9e5e5e40dcc2623fe330 Author: Vegard Nossum Date: Sun Mar 5 23:00:04 2023 +0100 Documentation/security-bugs: move from admin-guide/ to process/ Jiri Kosina, Jonathan Corbet, and Willy Tarreau all expressed a desire to move this document under process/. Create a new section for security issues in the index and group it with embargoed-hardware-issues. I'm doing this at the start of the series to make all the subsequent changes show up in 'git blame'. Existing references were updated using: git grep -l security-bugs ':!Documentation/translations/' | xargs sed -i 's|admin-guide/security-bugs|process/security-bugs|g' git grep -l security-bugs Documentation/translations/ | xargs sed -i 's|Documentation/admin-guide/security-bugs|Documentation/process/security-bugs|g' git grep -l security-bugs Documentation/translations/ | xargs sed -i '/Original:/s|\.\./admin-guide/security-bugs|\.\./process/security-bugs|g' Notably, the page is not moved in the translations (due to my lack of knowledge of these languages), but the translations have been updated to point to the new location of the original document where these references exist. Link: https://lore.kernel.org/all/nycvar.YFH.7.76.2206062326230.10851@cbobk.fhfr.pm/ Suggested-by: Jiri Kosina Cc: Alex Shi Cc: Yanteng Si Cc: Hu Haowen Cc: Federico Vaga Cc: Tsugikazu Shibata Cc: Minchan Kim Cc: Jeimi Lee Cc: Carlos Bilbao Cc: Akira Yokosawa Signed-off-by: Vegard Nossum Acked-by: Carlos Bilbao Reviewed-by: Yanteng Si Reviewed-by: Akira Yokosawa Acked-by: Federico Vaga Reviewed-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20230305220010.20895-2-vegard.nossum@oracle.com Signed-off-by: Greg Kroah-Hartman commit 81ff855485a366a391dc3aed3942715e676ed132 Merge: e25c54d17914b 9e5f81f9a6e78 Author: Linus Torvalds Date: Sat Mar 11 09:24:05 2023 -0800 Merge tag 'i2c-for-6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: "This marks the end of a transition to let I2C have the same probe semantics as other subsystems. Uwe took care that no drivers in the current tree nor in -next use the deprecated .probe call. So, it is a good time to switch to the new, standard semantics now. There is also a regression fix: - regression fix for the notifier handling of the I2C core - final coversions of drivers away from deprecated .probe - make .probe_new the standard probe and convert I2C core to use it * tag 'i2c-for-6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: dev: Fix bus callback return values i2c: Convert drivers to new .probe() callback i2c: mux: Convert all drivers to new .probe() callback i2c: Switch .probe() to not take an id parameter media: i2c: ov2685: convert to i2c's .probe_new() media: i2c: ov5695: convert to i2c's .probe_new() w1: ds2482: Convert to i2c's .probe_new() serial: sc16is7xx: Convert to i2c's .probe_new() mtd: maps: pismo: Convert to i2c's .probe_new() misc: ad525x_dpot-i2c: Convert to i2c's .probe_new() commit e25c54d17914b0df4f902d1f25cd52f54e20cfbf Author: Richard Weinberger Date: Sat Mar 11 10:29:29 2023 +0100 ubi: block: Fix missing blk_mq_end_request Switching to BLK_MQ_F_BLOCKING wrongly removed the call to blk_mq_end_request(). Add it back to have our IOs finished Fixes: 91cc8fbcc8c7 ("ubi: block: set BLK_MQ_F_BLOCKING") Analyzed-by: Linus Torvalds Reported-by: Daniel Palmer Link: https://lore.kernel.org/linux-mtd/CAHk-=wi29bbBNh3RqJKu3PxzpjDN5D5K17gEVtXrb7-6bfrnMQ@mail.gmail.com/ Signed-off-by: Richard Weinberger Reviewed-by: Christoph Hellwig Tested-by: Daniel Palmer Signed-off-by: Linus Torvalds commit c3701185ee1973845db088d8b0fc443397ab0eb2 Author: William Breathitt Gray Date: Fri Mar 10 19:22:48 2023 -0500 iio: dac: cio-dac: Fix max DAC write value check for 12-bit The CIO-DAC series of devices only supports DAC values up to 12-bit rather than 16-bit. Trying to write a 16-bit value results in only the lower 12 bits affecting the DAC output which is not what the user expects. Instead, adjust the DAC write value check to reject values larger than 12-bit so that they fail explicitly as invalid for the user. Fixes: 3b8df5fd526e ("iio: Add IIO support for the Measurement Computing CIO-DAC family") Cc: stable@vger.kernel.org Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/20230311002248.8548-1-william.gray@linaro.org Signed-off-by: Jonathan Cameron commit 47053904e18282af4525a02e3e0f519f014fc7f9 Author: Marc Zyngier Date: Fri Feb 24 19:16:40 2023 +0000 KVM: arm64: timers: Convert per-vcpu virtual offset to a global value Having a per-vcpu virtual offset is a pain. It needs to be synchronized on each update, and expands badly to a setup where different timers can have different offsets, or have composite offsets (as with NV). So let's start by replacing the use of the CNTVOFF_EL2 shadow register (which we want to reclaim for NV anyway), and make the virtual timer carry a pointer to a VM-wide offset. This simplifies the code significantly. It also addresses two terrible bugs: - The use of CNTVOFF_EL2 leads to some nice offset corruption when the sysreg gets reset, as reported by Joey. - The kvm mutex is taken from a vcpu ioctl, which goes against the locking rules... Reported-by: Joey Gouly Reviewed-by: Reiji Watanabe Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230224173915.GA17407@e124191.cambridge.arm.com Tested-by: Joey Gouly Link: https://lore.kernel.org/r/20230224191640.3396734-1-maz@kernel.org Signed-off-by: Oliver Upton commit 064d70527aaab23ef46c2481df706451f6814106 Merge: dee85ac02c1ac 493924519b1fe Author: Jakub Kicinski Date: Fri Mar 10 21:45:03 2023 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net 1) nft_parse_register_load() gets an incorrect datatype size as input, from Jeremy Sowden. 2) incorrect maximum netlink attribute in nft_redir, also from Jeremy. * git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nft_redir: correct value of inet type `.maxattrs` netfilter: nft_redir: correct length for loading protocol registers netfilter: nft_masq: correct length for loading protocol registers netfilter: nft_nat: correct length for loading protocol registers ==================== Link: https://lore.kernel.org/r/20230309174655.69816-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit f5361da1e60d54ec81346aee8e3d8baf1be0b762 Author: Zhihao Cheng Date: Wed Mar 8 11:26:43 2023 +0800 ext4: zero i_disksize when initializing the bootloader inode If the boot loader inode has never been used before, the EXT4_IOC_SWAP_BOOT inode will initialize it, including setting the i_size to 0. However, if the "never before used" boot loader has a non-zero i_size, then i_disksize will be non-zero, and the inconsistency between i_size and i_disksize can trigger a kernel warning: WARNING: CPU: 0 PID: 2580 at fs/ext4/file.c:319 CPU: 0 PID: 2580 Comm: bb Not tainted 6.3.0-rc1-00004-g703695902cfa RIP: 0010:ext4_file_write_iter+0xbc7/0xd10 Call Trace: vfs_write+0x3b1/0x5c0 ksys_write+0x77/0x160 __x64_sys_write+0x22/0x30 do_syscall_64+0x39/0x80 Reproducer: 1. create corrupted image and mount it: mke2fs -t ext4 /tmp/foo.img 200 debugfs -wR "sif <5> size 25700" /tmp/foo.img mount -t ext4 /tmp/foo.img /mnt cd /mnt echo 123 > file 2. Run the reproducer program: posix_memalign(&buf, 1024, 1024) fd = open("file", O_RDWR | O_DIRECT); ioctl(fd, EXT4_IOC_SWAP_BOOT); write(fd, buf, 1024); Fix this by setting i_disksize as well as i_size to zero when initiaizing the boot loader inode. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217159 Cc: stable@kernel.org Signed-off-by: Zhihao Cheng Link: https://lore.kernel.org/r/20230308032643.641113-1-chengzhihao1@huawei.com Signed-off-by: Theodore Ts'o commit f57886ca1606ba74cc4ec4eb5cbf073934ffa559 Author: Ye Bin Date: Tue Mar 7 14:17:03 2023 +0800 ext4: make sure fs error flag setted before clear journal error Now, jounral error number maybe cleared even though ext4_commit_super() failed. This may lead to error flag miss, then fsck will miss to check file system deeply. Signed-off-by: Ye Bin Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230307061703.245965-3-yebin@huaweicloud.com commit eee00237fa5ec8f704f7323b54e48cc34e2d9168 Author: Ye Bin Date: Tue Mar 7 14:17:02 2023 +0800 ext4: commit super block if fs record error when journal record without error Now, 'es->s_state' maybe covered by recover journal. And journal errno maybe not recorded in journal sb as IO error. ext4_update_super() only update error information when 'sbi->s_add_error_count' large than zero. Then 'EXT4_ERROR_FS' flag maybe lost. To solve above issue just recover 'es->s_state' error flag after journal replay like error info. Signed-off-by: Ye Bin Reviewed-by: Baokun Li Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230307061703.245965-2-yebin@huaweicloud.com commit 62913ae96de747091c4dacd06d158e7729c1a76d Author: Theodore Ts'o Date: Tue Mar 7 23:15:49 2023 -0500 ext4, jbd2: add an optimized bmap for the journal inode The generic bmap() function exported by the VFS takes locks and does checks that are not necessary for the journal inode. So allow the file system to set a journal-optimized bmap function in journal->j_bmap. Reported-by: syzbot+9543479984ae9e576000@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=e4aaa78795e490421c79f76ec3679006c8ff4cf0 Signed-off-by: Theodore Ts'o commit 2b96b4a5d9443ca4cad58b0040be455803c05a42 Author: Ye Bin Date: Tue Mar 7 09:52:53 2023 +0800 ext4: fix WARNING in ext4_update_inline_data Syzbot found the following issue: EXT4-fs (loop0): mounted filesystem 00000000-0000-0000-0000-000000000000 without journal. Quota mode: none. fscrypt: AES-256-CTS-CBC using implementation "cts-cbc-aes-aesni" fscrypt: AES-256-XTS using implementation "xts-aes-aesni" ------------[ cut here ]------------ WARNING: CPU: 0 PID: 5071 at mm/page_alloc.c:5525 __alloc_pages+0x30a/0x560 mm/page_alloc.c:5525 Modules linked in: CPU: 1 PID: 5071 Comm: syz-executor263 Not tainted 6.2.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 RIP: 0010:__alloc_pages+0x30a/0x560 mm/page_alloc.c:5525 RSP: 0018:ffffc90003c2f1c0 EFLAGS: 00010246 RAX: ffffc90003c2f220 RBX: 0000000000000014 RCX: 0000000000000000 RDX: 0000000000000028 RSI: 0000000000000000 RDI: ffffc90003c2f248 RBP: ffffc90003c2f2d8 R08: dffffc0000000000 R09: ffffc90003c2f220 R10: fffff52000785e49 R11: 1ffff92000785e44 R12: 0000000000040d40 R13: 1ffff92000785e40 R14: dffffc0000000000 R15: 1ffff92000785e3c FS: 0000555556c0d300(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f95d5e04138 CR3: 00000000793aa000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __alloc_pages_node include/linux/gfp.h:237 [inline] alloc_pages_node include/linux/gfp.h:260 [inline] __kmalloc_large_node+0x95/0x1e0 mm/slab_common.c:1113 __do_kmalloc_node mm/slab_common.c:956 [inline] __kmalloc+0xfe/0x190 mm/slab_common.c:981 kmalloc include/linux/slab.h:584 [inline] kzalloc include/linux/slab.h:720 [inline] ext4_update_inline_data+0x236/0x6b0 fs/ext4/inline.c:346 ext4_update_inline_dir fs/ext4/inline.c:1115 [inline] ext4_try_add_inline_entry+0x328/0x990 fs/ext4/inline.c:1307 ext4_add_entry+0x5a4/0xeb0 fs/ext4/namei.c:2385 ext4_add_nondir+0x96/0x260 fs/ext4/namei.c:2772 ext4_create+0x36c/0x560 fs/ext4/namei.c:2817 lookup_open fs/namei.c:3413 [inline] open_last_lookups fs/namei.c:3481 [inline] path_openat+0x12ac/0x2dd0 fs/namei.c:3711 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_openat fs/open.c:1342 [inline] __se_sys_openat fs/open.c:1337 [inline] __x64_sys_openat+0x243/0x290 fs/open.c:1337 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 Above issue happens as follows: ext4_iget ext4_find_inline_data_nolock ->i_inline_off=164 i_inline_size=60 ext4_try_add_inline_entry __ext4_mark_inode_dirty ext4_expand_extra_isize_ea ->i_extra_isize=32 s_want_extra_isize=44 ext4_xattr_shift_entries ->after shift i_inline_off is incorrect, actually is change to 176 ext4_try_add_inline_entry ext4_update_inline_dir get_max_inline_xattr_value_size if (EXT4_I(inode)->i_inline_off) entry = (struct ext4_xattr_entry *)((void *)raw_inode + EXT4_I(inode)->i_inline_off); free += EXT4_XATTR_SIZE(le32_to_cpu(entry->e_value_size)); ->As entry is incorrect, then 'free' may be negative ext4_update_inline_data value = kzalloc(len, GFP_NOFS); -> len is unsigned int, maybe very large, then trigger warning when 'kzalloc()' To resolve the above issue we need to update 'i_inline_off' after 'ext4_xattr_shift_entries()'. We do not need to set EXT4_STATE_MAY_INLINE_DATA flag here, since ext4_mark_inode_dirty() already sets this flag if needed. Setting EXT4_STATE_MAY_INLINE_DATA when it is needed may trigger a BUG_ON in ext4_writepages(). Reported-by: syzbot+d30838395804afc2fa6f@syzkaller.appspotmail.com Cc: stable@kernel.org Signed-off-by: Ye Bin Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230307015253.2232062-3-yebin@huaweicloud.com Signed-off-by: Theodore Ts'o commit 1dcdce5919115a471bf4921a57f20050c545a236 Author: Ye Bin Date: Tue Mar 7 09:52:52 2023 +0800 ext4: move where set the MAY_INLINE_DATA flag is set The only caller of ext4_find_inline_data_nolock() that needs setting of EXT4_STATE_MAY_INLINE_DATA flag is ext4_iget_extra_inode(). In ext4_write_inline_data_end() we just need to update inode->i_inline_off. Since we are going to add one more caller that does not need to set EXT4_STATE_MAY_INLINE_DATA, just move setting of EXT4_STATE_MAY_INLINE_DATA out to ext4_iget_extra_inode(). Signed-off-by: Ye Bin Cc: stable@kernel.org Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230307015253.2232062-2-yebin@huaweicloud.com Signed-off-by: Theodore Ts'o commit dee85ac02c1ac5420ebb9a92c6ba3ab0e03a3f2e Merge: 12508b3eb69e2 cee4034a3db1d Author: Jakub Kicinski Date: Fri Mar 10 21:42:58 2023 -0800 Merge branch 'mptcp-fixes-for-6-3' Matthieu Baerts says: ==================== mptcp: fixes for 6.3 Patch 1 fixes a possible deadlock in subflow_error_report() reported by lockdep. The report was in fact a false positive but the modification makes sense and silences lockdep to allow syzkaller to find real issues. The regression has been introduced in v5.12. Patch 2 is a refactoring needed to be able to fix the two next issues. It improves the situation and can be backported up to v6.0. Patches 3 and 4 fix UaF reported by KASAN. It fixes issues potentially visible since v5.7 and v5.19 but only reproducible until recently (v6.0). These two patches depend on patch 2/7. Patch 5 fixes the order of the printed values: expected vs seen values. The regression has been introduced recently: v6.3-rc1. Patch 6 adds missing ro_after_init flags. A previous patch added them for other functions but these two have been missed. This previous patch has been backported to stable versions (up to v5.12) so probably better to do the same here. Patch 7 fixes tcp_set_state() being called twice in a row since v5.10. Patch 8 fixes another lockdep false positive issue but this time in MPTCP PM code. Same here, some modifications in the code has been made to silence this issue and help finding real ones later. This issue can be seen since v6.2. v1: https://lore.kernel.org/r/20230227-upstream-net-20230227-mptcp-fixes-v1-0-070e30ae4a8e@tessares.net ==================== Link: https://lore.kernel.org/r/20230227-upstream-net-20230227-mptcp-fixes-v2-0-47c2e95eada9@tessares.net Signed-off-by: Jakub Kicinski commit cee4034a3db1d30c3243dd51506a9d4ab1a849fa Author: Paolo Abeni Date: Thu Mar 9 15:50:04 2023 +0100 mptcp: fix lockdep false positive in mptcp_pm_nl_create_listen_socket() Christoph reports a lockdep splat in the mptcp_subflow_create_socket() error path, when such function is invoked by mptcp_pm_nl_create_listen_socket(). Such code path acquires two separates, nested socket lock, with the internal lock operation lacking the "nested" annotation. Adding that in sock_release() for mptcp's sake only could be confusing. Instead just add a new lockclass to the in-kernel msk socket, re-initializing the lockdep infra after the socket creation. Fixes: ad2171009d96 ("mptcp: fix locking for in-kernel listener creation") Cc: stable@vger.kernel.org Reported-by: Christoph Paasch Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/354 Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Tested-by: Christoph Paasch Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 3ba14528684f528566fb7d956bfbfb958b591d86 Author: Matthieu Baerts Date: Thu Mar 9 15:50:03 2023 +0100 mptcp: avoid setting TCP_CLOSE state twice tcp_set_state() is called from tcp_done() already. There is then no need to first set the state to TCP_CLOSE, then call tcp_done(). Fixes: d582484726c4 ("mptcp: fix fallback for MP_JOIN subflows") Cc: stable@vger.kernel.org Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/362 Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 822467a48e938e661965d09df5fcac66f7291050 Author: Geliang Tang Date: Thu Mar 9 15:50:02 2023 +0100 mptcp: add ro_after_init for tcp{,v6}_prot_override Add __ro_after_init labels for the variables tcp_prot_override and tcpv6_prot_override, just like other variables adjacent to them, to indicate that they are initialised from the init hooks and no writes occur afterwards. Fixes: b19bc2945b40 ("mptcp: implement delegated actions") Cc: stable@vger.kernel.org Fixes: 51fa7f8ebf0e ("mptcp: mark ops structures as ro_after_init") Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 840742b7ed0e123e47af9c5c3902746f3d6b64a2 Author: Matthieu Baerts Date: Thu Mar 9 15:50:01 2023 +0100 selftests: mptcp: userspace pm: fix printed values In case of errors, the printed message had the expected and the seen value inverted. This patch simply correct the order: first the expected value, then the one that has been seen. Fixes: 10d4273411be ("selftests: mptcp: userspace: print error details if any") Cc: stable@vger.kernel.org Acked-by: Geliang Tang Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 0a3f4f1f9c27215e4ddcd312558342e57b93e518 Author: Paolo Abeni Date: Thu Mar 9 15:50:00 2023 +0100 mptcp: fix UaF in listener shutdown As reported by Christoph after having refactored the passive socket initialization, the mptcp listener shutdown path is prone to an UaF issue. BUG: KASAN: use-after-free in _raw_spin_lock_bh+0x73/0xe0 Write of size 4 at addr ffff88810cb23098 by task syz-executor731/1266 CPU: 1 PID: 1266 Comm: syz-executor731 Not tainted 6.2.0-rc59af4eaa31c1f6c00c8f1e448ed99a45c66340dd5 #6 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack_lvl+0x6e/0x91 print_report+0x16a/0x46f kasan_report+0xad/0x130 kasan_check_range+0x14a/0x1a0 _raw_spin_lock_bh+0x73/0xe0 subflow_error_report+0x6d/0x110 sk_error_report+0x3b/0x190 tcp_disconnect+0x138c/0x1aa0 inet_child_forget+0x6f/0x2e0 inet_csk_listen_stop+0x209/0x1060 __mptcp_close_ssk+0x52d/0x610 mptcp_destroy_common+0x165/0x640 mptcp_destroy+0x13/0x80 __mptcp_destroy_sock+0xe7/0x270 __mptcp_close+0x70e/0x9b0 mptcp_close+0x2b/0x150 inet_release+0xe9/0x1f0 __sock_release+0xd2/0x280 sock_close+0x15/0x20 __fput+0x252/0xa20 task_work_run+0x169/0x250 exit_to_user_mode_prepare+0x113/0x120 syscall_exit_to_user_mode+0x1d/0x40 do_syscall_64+0x48/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc The msk grace period can legitly expire in between the last reference count dropped in mptcp_subflow_queue_clean() and the later eventual access in inet_csk_listen_stop() After the previous patch we don't need anymore special-casing msk listener socket cleanup: the mptcp worker will process each of the unaccepted msk sockets. Just drop the now unnecessary code. Please note this commit depends on the two parent ones: mptcp: refactor passive socket initialization mptcp: use the workqueue to destroy unaccepted sockets Fixes: 6aeed9045071 ("mptcp: fix race on unaccepted mptcp sockets") Cc: stable@vger.kernel.org Reported-and-tested-by: Christoph Paasch Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/346 Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit b6985b9b82954caa53f862d6059d06c0526254f0 Author: Paolo Abeni Date: Thu Mar 9 15:49:59 2023 +0100 mptcp: use the workqueue to destroy unaccepted sockets Christoph reported a UaF at token lookup time after having refactored the passive socket initialization part: BUG: KASAN: use-after-free in __token_bucket_busy+0x253/0x260 Read of size 4 at addr ffff88810698d5b0 by task syz-executor653/3198 CPU: 1 PID: 3198 Comm: syz-executor653 Not tainted 6.2.0-rc59af4eaa31c1f6c00c8f1e448ed99a45c66340dd5 #6 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack_lvl+0x6e/0x91 print_report+0x16a/0x46f kasan_report+0xad/0x130 __token_bucket_busy+0x253/0x260 mptcp_token_new_connect+0x13d/0x490 mptcp_connect+0x4ed/0x860 __inet_stream_connect+0x80e/0xd90 tcp_sendmsg_fastopen+0x3ce/0x710 mptcp_sendmsg+0xff1/0x1a20 inet_sendmsg+0x11d/0x140 __sys_sendto+0x405/0x490 __x64_sys_sendto+0xdc/0x1b0 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc We need to properly clean-up all the paired MPTCP-level resources and be sure to release the msk last, even when the unaccepted subflow is destroyed by the TCP internals via inet_child_forget(). We can re-use the existing MPTCP_WORK_CLOSE_SUBFLOW infra, explicitly checking that for the critical scenario: the closed subflow is the MPC one, the msk is not accepted and eventually going through full cleanup. With such change, __mptcp_destroy_sock() is always called on msk sockets, even on accepted ones. We don't need anymore to transiently drop one sk reference at msk clone time. Please note this commit depends on the parent one: mptcp: refactor passive socket initialization Fixes: 58b09919626b ("mptcp: create msk early") Cc: stable@vger.kernel.org Reported-and-tested-by: Christoph Paasch Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/347 Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 3a236aef280ed5122b2d47087eb514d0921ae033 Author: Paolo Abeni Date: Thu Mar 9 15:49:58 2023 +0100 mptcp: refactor passive socket initialization After commit 30e51b923e43 ("mptcp: fix unreleased socket in accept queue") unaccepted msk sockets go throu complete shutdown, we don't need anymore to delay inserting the first subflow into the subflow lists. The reference counting deserve some extra care, as __mptcp_close() is unaware of the request socket linkage to the first subflow. Please note that this is more a refactoring than a fix but because this modification is needed to include other corrections, see the following commits. Then a Fixes tag has been added here to help the stable team. Fixes: 30e51b923e43 ("mptcp: fix unreleased socket in accept queue") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Tested-by: Christoph Paasch Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit b7a679ba7c652587b85294f4953f33ac0b756d40 Author: Paolo Abeni Date: Thu Mar 9 15:49:57 2023 +0100 mptcp: fix possible deadlock in subflow_error_report Christoph reported a possible deadlock while the TCP stack destroys an unaccepted subflow due to an incoming reset: the MPTCP socket error path tries to acquire the msk-level socket lock while TCP still owns the listener socket accept queue spinlock, and the reverse dependency already exists in the TCP stack. Note that the above is actually a lockdep false positive, as the chain involves two separate sockets. A different per-socket lockdep key will address the issue, but such a change will be quite invasive. Instead, we can simply stop earlier the socket error handling for orphaned or unaccepted subflows, breaking the critical lockdep chain. Error handling in such a scenario is a no-op. Reported-and-tested-by: Christoph Paasch Fixes: 15cc10453398 ("mptcp: deliver ssk errors to msk") Cc: stable@vger.kernel.org Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/355 Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 12508b3eb69e2c13e82bbc746ec74b6fcaf33fd4 Merge: 7e4f8a0c49541 481e96fc1307e Author: Jakub Kicinski Date: Fri Mar 10 21:33:49 2023 -0800 Merge branch 'update-xdp_features-flag-according-to-nic-re-configuration' Lorenzo Bianconi says: ==================== update xdp_features flag according to NIC re-configuration Changes since v1: - rebase on top of net tree - remove NETDEV_XDP_ACT_NDO_XMIT_SG support in mlx5e driver - always enable NETDEV_XDP_ACT_NDO_XMIT support in mlx5e driver ==================== Link: https://lore.kernel.org/r/cover.1678364612.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski commit 481e96fc1307eb52c0c449608e629921ecbbaf15 Author: Matteo Croce Date: Thu Mar 9 13:25:32 2023 +0100 mvpp2: take care of xdp_features when reconfiguring queues XDP is supported only if enough queues are present, so when reconfiguring the queues set xdp_features accordingly. Fixes: 66c0e13ad236 ("drivers: net: turn on XDP features") Suggested-by: Lorenzo Bianconi Signed-off-by: Matteo Croce Signed-off-by: Lorenzo Bianconi Signed-off-by: Jakub Kicinski commit 4d5ab0ad964df178beba031b89429a601893ff61 Author: Lorenzo Bianconi Date: Thu Mar 9 13:25:31 2023 +0100 net/mlx5e: take into account device reconfiguration for xdp_features flag Take into account LRO and GRO configuration setting device xdp_features flag. Consider channel rq_wq_type enabling rx scatter-gatter support in xdp_features flag and disable NETDEV_XDP_ACT_NDO_XMIT_SG since it is not supported yet by the driver. Moreover always enable NETDEV_XDP_ACT_NDO_XMIT as the ndo_xdp_xmit callback does not require to load a dummy xdp program on the NIC. Fixes: 66c0e13ad236 ("drivers: net: turn on XDP features") Co-developed-by: Tariq Toukan Signed-off-by: Tariq Toukan Signed-off-by: Lorenzo Bianconi Signed-off-by: Jakub Kicinski commit fccca038f3003daa8f28a5e5d97efe50f04b8d9d Author: Lorenzo Bianconi Date: Thu Mar 9 13:25:30 2023 +0100 veth: take into account device reconfiguration for xdp_features flag Take into account tx/rx queues reconfiguration setting device xdp_features flag. Moreover consider NETIF_F_GRO flag in order to enable ndo_xdp_xmit callback. Fixes: 66c0e13ad236 ("drivers: net: turn on XDP features") Signed-off-by: Lorenzo Bianconi Signed-off-by: Jakub Kicinski commit 7aa6dc351b92abbfead9ebe25ce7a7ac0384ea6d Author: Lorenzo Bianconi Date: Thu Mar 9 13:25:29 2023 +0100 net: ena: take into account xdp_features setting tx/rx queues ena nic allows xdp just if enough hw queues are available for XDP. Take into account queues configuration setting xdp_features. Fixes: 66c0e13ad236 ("drivers: net: turn on XDP features") Reviewed-by: Shay Agroskin Signed-off-by: Lorenzo Bianconi Signed-off-by: Jakub Kicinski commit 3c249fe4de1608a9af56563606d4f6eb3a64a47f Author: Lorenzo Bianconi Date: Thu Mar 9 13:25:28 2023 +0100 net: thunderx: take into account xdp_features setting tx/rx queues thunderx nic allows xdp just if enough hw queues are available for XDP. Take into account queues configuration setting xdp_features. Fixes: 66c0e13ad236 ("drivers: net: turn on XDP features") Signed-off-by: Lorenzo Bianconi Signed-off-by: Jakub Kicinski commit f85949f98206b3b11d92d695cea4efda6a81f00e Author: Lorenzo Bianconi Date: Thu Mar 9 13:25:27 2023 +0100 xdp: add xdp_set_features_flag utility routine Introduce xdp_set_features_flag utility routine in order to update dynamically xdp_features according to the dynamic hw configuration via ethtool (e.g. changing number of hw rx/tx queues). Add xdp_clear_features_flag() in order to clear all xdp_feature flag. Reviewed-by: Shay Agroskin Signed-off-by: Lorenzo Bianconi Signed-off-by: Jakub Kicinski commit bf51d27704c963ea52c0843096e23c9f404b13af Author: Lorenzo Bianconi Date: Thu Mar 9 13:25:26 2023 +0100 tools: ynl: fix get_mask utility routine Fix get_mask utility routine in order to take into account possible gaps in the elements list. Fixes: be5bea1cc0bf ("net: add basic C code generators for Netlink") Signed-off-by: Lorenzo Bianconi Signed-off-by: Jakub Kicinski commit 8f76a4f80fba8096a611b6b60c40a0f4cab3ddfb Author: Lorenzo Bianconi Date: Thu Mar 9 13:25:25 2023 +0100 tools: ynl: fix render-max for flags definition Properly manage render-max property for flags definition type introducing mask value and setting it to (last_element << 1) - 1 instead of adding max value set to last_element + 1 Fixes: be5bea1cc0bf ("net: add basic C code generators for Netlink") Signed-off-by: Lorenzo Bianconi Signed-off-by: Jakub Kicinski commit 7e4f8a0c495413a50413e8c9f1032ce1bc633bae Author: Ivan Vecera Date: Thu Mar 9 10:45:09 2023 -0800 i40e: Fix kernel crash during reboot when adapter is in recovery mode If the driver detects during probe that firmware is in recovery mode then i40e_init_recovery_mode() is called and the rest of probe function is skipped including pci_set_drvdata(). Subsequent i40e_shutdown() called during shutdown/reboot dereferences NULL pointer as pci_get_drvdata() returns NULL. To fix call pci_set_drvdata() also during entering to recovery mode. Reproducer: 1) Lets have i40e NIC with firmware in recovery mode 2) Run reboot Result: [ 139.084698] i40e: Intel(R) Ethernet Connection XL710 Network Driver [ 139.090959] i40e: Copyright (c) 2013 - 2019 Intel Corporation. [ 139.108438] i40e 0000:02:00.0: Firmware recovery mode detected. Limiting functionality. [ 139.116439] i40e 0000:02:00.0: Refer to the Intel(R) Ethernet Adapters and Devices User Guide for details on firmware recovery mode. [ 139.129499] i40e 0000:02:00.0: fw 8.3.64775 api 1.13 nvm 8.30 0x8000b78d 1.3106.0 [8086:1583] [15d9:084a] [ 139.215932] i40e 0000:02:00.0 enp2s0f0: renamed from eth0 [ 139.223292] i40e 0000:02:00.1: Firmware recovery mode detected. Limiting functionality. [ 139.231292] i40e 0000:02:00.1: Refer to the Intel(R) Ethernet Adapters and Devices User Guide for details on firmware recovery mode. [ 139.244406] i40e 0000:02:00.1: fw 8.3.64775 api 1.13 nvm 8.30 0x8000b78d 1.3106.0 [8086:1583] [15d9:084a] [ 139.329209] i40e 0000:02:00.1 enp2s0f1: renamed from eth0 ... [ 156.311376] BUG: kernel NULL pointer dereference, address: 00000000000006c2 [ 156.318330] #PF: supervisor write access in kernel mode [ 156.323546] #PF: error_code(0x0002) - not-present page [ 156.328679] PGD 0 P4D 0 [ 156.331210] Oops: 0002 [#1] PREEMPT SMP NOPTI [ 156.335567] CPU: 26 PID: 15119 Comm: reboot Tainted: G E 6.2.0+ #1 [ 156.343126] Hardware name: Abacus electric, s.r.o. - servis@abacus.cz Super Server/H12SSW-iN, BIOS 2.4 04/13/2022 [ 156.353369] RIP: 0010:i40e_shutdown+0x15/0x130 [i40e] [ 156.358430] Code: c1 fc ff ff 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 0f 1f 44 00 00 55 48 89 fd 53 48 8b 9f 48 01 00 00 80 8b c2 06 00 00 04 f0 80 8b c0 06 00 00 08 48 8d bb 08 08 00 [ 156.377168] RSP: 0018:ffffb223c8447d90 EFLAGS: 00010282 [ 156.382384] RAX: ffffffffc073ee70 RBX: 0000000000000000 RCX: 0000000000000001 [ 156.389510] RDX: 0000000080000001 RSI: 0000000000000246 RDI: ffff95db49988000 [ 156.396634] RBP: ffff95db49988000 R08: ffffffffffffffff R09: ffffffff8bd17d40 [ 156.403759] R10: 0000000000000001 R11: ffffffff8a5e3d28 R12: ffff95db49988000 [ 156.410882] R13: ffffffff89a6fe17 R14: ffff95db49988150 R15: 0000000000000000 [ 156.418007] FS: 00007fe7c0cc3980(0000) GS:ffff95ea8ee80000(0000) knlGS:0000000000000000 [ 156.426083] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 156.431819] CR2: 00000000000006c2 CR3: 00000003092fc005 CR4: 0000000000770ee0 [ 156.438944] PKRU: 55555554 [ 156.441647] Call Trace: [ 156.444096] [ 156.446199] pci_device_shutdown+0x38/0x60 [ 156.450297] device_shutdown+0x163/0x210 [ 156.454215] kernel_restart+0x12/0x70 [ 156.457872] __do_sys_reboot+0x1ab/0x230 [ 156.461789] ? vfs_writev+0xa6/0x1a0 [ 156.465362] ? __pfx_file_free_rcu+0x10/0x10 [ 156.469635] ? __call_rcu_common.constprop.85+0x109/0x5a0 [ 156.475034] do_syscall_64+0x3e/0x90 [ 156.478611] entry_SYSCALL_64_after_hwframe+0x72/0xdc [ 156.483658] RIP: 0033:0x7fe7bff37ab7 Fixes: 4ff0ee1af016 ("i40e: Introduce recovery mode support") Signed-off-by: Ivan Vecera Tested-by: Arpana Arland (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20230309184509.984639-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 59a0b022aa249e3f5735d93de0849341722c4754 Author: Jianguo Wu Date: Thu Mar 9 10:03:36 2023 +0800 ipvlan: Make skb->skb_iif track skb->dev for l3s mode For l3s mode, skb->dev is set to ipvlan interface in ipvlan_nf_input(): skb->dev = addr->master->dev but, skb->skb_iif remain unchanged, this will cause socket lookup failed if a target socket is bound to a interface, like the following example: ip link add ipvlan0 link eth0 type ipvlan mode l3s ip addr add dev ipvlan0 192.168.124.111/24 ip link set ipvlan0 up ping -c 1 -I ipvlan0 8.8.8.8 100% packet loss This is because there is no match sk in __raw_v4_lookup() as sk->sk_bound_dev_if != dif(skb->skb_iif). Fix this by make skb->skb_iif track skb->dev in ipvlan_nf_input(). Fixes: c675e06a98a4 ("ipvlan: decouple l3s mode dependencies from other modes") Signed-off-by: Jianguo Wu Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/29865b1f-6db7-c07a-de89-949d3721ea30@163.com Signed-off-by: Jakub Kicinski commit 8ba572052a4b8fe5b205854d27e54e3486049b71 Author: Radu Pirea (OSS) Date: Thu Mar 9 12:01:11 2023 +0200 net: phy: nxp-c45-tja11xx: fix MII_BASIC_CONFIG_REV bit According to the TJA1103 user manual, the bit for the reversed role in MII or RMII modes is bit 4. Cc: # 5.15+ Fixes: b050f2f15e04 ("phy: nxp-c45: add driver for tja1103") Signed-off-by: Radu Pirea (OSS) Link: https://lore.kernel.org/r/20230309100111.1246214-1-radu-nicolae.pirea@oss.nxp.com Signed-off-by: Jakub Kicinski commit ef5f68cc1f829b492b19cd4df5af4454aa816b93 Merge: 40f879bdd3450 288b3271d920c Author: Linus Torvalds Date: Fri Mar 10 20:45:53 2023 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Twenty fixes all in drivers except the one zone storage revalidation fix to sd. The megaraid_sas fixes are more on the level of a driver update (enabling crash dump and increasing lun number) but I thought you could let this slide on -rc1 and the next most extensive update is a load of fixes to mpi3mr" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: sd: Fix wrong zone_write_granularity value during revalidate scsi: storvsc: Handle BlockSize change in Hyper-V VHD/VHDX file scsi: megaraid_sas: Driver version update to 07.725.01.00-rc1 scsi: megaraid_sas: Add crash dump mode capability bit in MFI capabilities scsi: megaraid_sas: Update max supported LD IDs to 240 scsi: mpi3mr: Bad drive in topology results kernel crash scsi: mpi3mr: NVMe command size greater than 8K fails scsi: mpi3mr: Return proper values for failures in firmware init path scsi: mpi3mr: Wait for diagnostic save during controller init scsi: mpi3mr: Driver unload crashes host when enhanced logging is enabled scsi: mpi3mr: ioctl timeout when disabling/enabling interrupt scsi: lpfc: Avoid usage of list iterator variable after loop scsi: lpfc: Check kzalloc() in lpfc_sli4_cgn_params_read() scsi: ufs: mcq: qcom: Clean the return path of ufs_qcom_mcq_config_resource() scsi: ufs: mcq: qcom: Fix passing zero to PTR_ERR scsi: ufs: ufs-qcom: Remove impossible check scsi: ufs: core: Add soft dependency on governor_simpleondemand scsi: hisi_sas: Check devm_add_action() return value scsi: qla2xxx: Add option to disable FC2 Target support scsi: target: iscsi: Fix an error message in iscsi_check_key() commit 40f879bdd3450f20ff1db48e7a8366fc24dcc7fe Merge: d33d4c9e0888e e2f2a39452c43 Author: Linus Torvalds Date: Fri Mar 10 20:06:49 2023 -0800 Merge tag 'block-6.3-2023-03-09' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - Fix a regression in exclusive mode handling of the partition code, introduced in this merge windoe (Yu) - Fix for a use-after-free in BFQ (Yu) - Add sysfs documentation for the 'hidden' attribute (Sagi) * tag 'block-6.3-2023-03-09' of git://git.kernel.dk/linux: block, bfq: fix uaf for 'stable_merge_bfqq' docs: sysfs-block: document hidden sysfs entry block: fix wrong mode for blkdev_put() from disk_scan_partitions() commit d33d4c9e0888e9ee7666813b3f9ecc244a64d127 Merge: 4831f76247bc9 849ad04cf562a Author: Linus Torvalds Date: Fri Mar 10 19:09:18 2023 -0800 Merge tag 'pull-highmem' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull put_and_unmap_page() helper from Al Viro: "kmap_local_page() conversions in local filesystems keep running into kunmap_local_page()+put_page() combinations. We can keep inventing names for identical inline helpers, but it's getting rather inconvenient. I've added a trivial helper to linux/highmem.h instead. I would've held that back until the merge window, if not for the mess it causes in tree topology - I've several branches merging from that one, and it's only going to get worse if e.g. ext2 stuff gets picked by Jan" * tag 'pull-highmem' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: new helper: put_and_unmap_page() commit 4831f76247bc939ed1b6d71ddd23337ec8b56b8e Merge: a0aefd306ebb3 609d54441493c Author: Linus Torvalds Date: Fri Mar 10 19:04:10 2023 -0800 Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc fixes from Al Viro: "pick_file() speculation fix + fix for alpha mis(merge,cherry-pick) The fs/file.c one is a genuine missing speculation barrier in pick_file() (reachable e.g. via close(2)). The alpha one is strictly speaking not a bug fix, but only because confusion between preempt_enable() and preempt_disable() is harmless on architecture without CONFIG_PREEMPT. Looks like alpha.git picked the wrong version of patch - that braino used to be there in early versions, but it had been fixed quite a while ago..." * tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs: prevent out-of-bounds array speculation when closing a file descriptor alpha: fix lazy-FPU mis(merged/applied/whatnot) commit a0aefd306ebb394ea72e04f53f64d76b05d5e39f Merge: 55a21105ecc15 52f04f10b9005 Author: Linus Torvalds Date: Fri Mar 10 19:01:15 2023 -0800 Merge tag 'thermal-6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control fix from Rafael Wysocki: "Fix a recently introduced deadlock in the int340x thermal control driver (Srinivas Pandruvada)" * tag 'thermal-6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: intel: int340x: processor_thermal: Fix deadlock commit 27c30b9b449aaee3b85006b63e08b33016cf7333 Merge: 71582371a5ee0 96c0695083775 Author: Jakub Kicinski Date: Fri Mar 10 18:19:55 2023 -0800 Merge tag 'wireless-2023-03-10' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Johannes Berg says: ==================== Just a few fixes: * MLO connection socket ownership didn't work * basic rates validation was missing (reported by by a private syzbot instances) * puncturing bitmap netlink policy was completely broken * properly check chandef for NULL channel, it can be pointing to a chandef that's still uninitialized * tag 'wireless-2023-03-10' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: cfg80211: fix MLO connection ownership wifi: mac80211: check basic rates validity wifi: nl80211: fix puncturing bitmap policy wifi: nl80211: fix NULL-ptr deref in offchan check ==================== Link: https://lore.kernel.org/r/20230310114647.35422-1-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit 71582371a5ee09272b4b4b0a07fa6eb78c9d2f90 Author: Jiri Pirko Date: Thu Mar 9 12:49:11 2023 +0100 MAINTAINERS: make my email address consistent Use jiri@resnulli.us in all MAINTAINERS entries and fixup .mailmap so all other addresses point to that one. Signed-off-by: Jiri Pirko Link: https://lore.kernel.org/r/20230309114911.923460-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit 19631658e64e1a00742cdb14aa18f9159fd7e461 Merge: 484b7059796e3 cd1c604aa1d8c Author: Jakub Kicinski Date: Fri Mar 10 16:46:02 2023 -0800 Merge branch 'add-checking-sq-is-full-inside-xdp-xmit' Xuan Zhuo says: ==================== add checking sq is full inside xdp xmit If the queue of xdp xmit is not an independent queue, then when the xdp xmit used all the desc, the xmit from the __dev_queue_xmit() may encounter the following error. net ens4: Unexpected TXQ (0) queue failure: -28 This patch adds a check whether sq is full in XDP Xmit. ==================== Link: https://lore.kernel.org/r/20230308024935.91686-1-xuanzhuo@linux.alibaba.com Signed-off-by: Jakub Kicinski commit cd1c604aa1d8c641f5edcb58b76352d4eba06ec1 Author: Xuan Zhuo Date: Wed Mar 8 10:49:35 2023 +0800 virtio_net: add checking sq is full inside xdp xmit If the queue of xdp xmit is not an independent queue, then when the xdp xmit used all the desc, the xmit from the __dev_queue_xmit() may encounter the following error. net ens4: Unexpected TXQ (0) queue failure: -28 This patch adds a check whether sq is full in xdp xmit. Fixes: 56434a01b12e ("virtio_net: add XDP_TX support") Reported-by: Yichun Zhang Signed-off-by: Xuan Zhuo Reviewed-by: Alexander Duyck Acked-by: Michael S. Tsirkin Acked-by: Jason Wang Signed-off-by: Jakub Kicinski commit b8ef4809bc7faa22e63de921ef56de21ed191af0 Author: Xuan Zhuo Date: Wed Mar 8 10:49:34 2023 +0800 virtio_net: separate the logic of checking whether sq is full Separate the logic of checking whether sq is full. The subsequent patch will reuse this func. Signed-off-by: Xuan Zhuo Reviewed-by: Alexander Duyck Acked-by: Michael S. Tsirkin Acked-by: Jason Wang Signed-off-by: Jakub Kicinski commit 25074a44ac4e5dae5b4a25dcb9bbfcbd00f15ae2 Author: Xuan Zhuo Date: Wed Mar 8 10:49:33 2023 +0800 virtio_net: reorder some funcs The purpose of this is to facilitate the subsequent addition of new functions without introducing a separate declaration. Signed-off-by: Xuan Zhuo Acked-by: Michael S. Tsirkin Signed-off-by: Jakub Kicinski commit 484b7059796e3bc1cb527caa61dfc60da649b4f6 Author: Fedor Pchelkin Date: Thu Mar 9 19:50:50 2023 +0300 nfc: pn533: initialize struct pn533_out_arg properly struct pn533_out_arg used as a temporary context for out_urb is not initialized properly. Its uninitialized 'phy' field can be dereferenced in error cases inside pn533_out_complete() callback function. It causes the following failure: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.2.0-rc3-next-20230110-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 RIP: 0010:pn533_out_complete.cold+0x15/0x44 drivers/nfc/pn533/usb.c:441 Call Trace: __usb_hcd_giveback_urb+0x2b6/0x5c0 drivers/usb/core/hcd.c:1671 usb_hcd_giveback_urb+0x384/0x430 drivers/usb/core/hcd.c:1754 dummy_timer+0x1203/0x32d0 drivers/usb/gadget/udc/dummy_hcd.c:1988 call_timer_fn+0x1da/0x800 kernel/time/timer.c:1700 expire_timers+0x234/0x330 kernel/time/timer.c:1751 __run_timers kernel/time/timer.c:2022 [inline] __run_timers kernel/time/timer.c:1995 [inline] run_timer_softirq+0x326/0x910 kernel/time/timer.c:2035 __do_softirq+0x1fb/0xaf6 kernel/softirq.c:571 invoke_softirq kernel/softirq.c:445 [inline] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:650 irq_exit_rcu+0x9/0x20 kernel/softirq.c:662 sysvec_apic_timer_interrupt+0x97/0xc0 arch/x86/kernel/apic/apic.c:1107 Initialize the field with the pn533_usb_phy currently used. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Fixes: 9dab880d675b ("nfc: pn533: Wait for out_urb's completion in pn533_usb_send_frame()") Reported-by: syzbot+1e608ba4217c96d1952f@syzkaller.appspotmail.com Signed-off-by: Fedor Pchelkin Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230309165050.207390-1-pchelkin@ispras.ru Signed-off-by: Jakub Kicinski commit e8c8361cfdbf450f760e8a2bdbd4222d1947366b Author: Alexei Starovoitov Date: Fri Mar 10 12:47:51 2023 -0800 selftests/bpf: Fix progs/test_deny_namespace.c issues. The following build error can be seen: progs/test_deny_namespace.c:22:19: error: call to undeclared function 'BIT_LL'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] __u64 cap_mask = BIT_LL(CAP_SYS_ADMIN); The struct kernel_cap_struct no longer exists in the kernel as well. Adjust bpf prog to fix both issues. Fixes: f122a08b197d ("capability: just use a 'u64' instead of a 'u32[2]' array") Signed-off-by: Alexei Starovoitov commit 32513d40d908b267508d37994753d9bd1600914b Author: Alexei Starovoitov Date: Fri Mar 10 12:41:18 2023 -0800 selftests/bpf: Fix progs/find_vma_fail1.c build error. The commit 11e456cae91e ("selftests/bpf: Fix compilation errors: Assign a value to a constant") fixed the issue cleanly in bpf-next. This is an alternative fix in bpf tree to avoid merge conflict between bpf and bpf-next. Signed-off-by: Alexei Starovoitov commit 624c60f326c6e5a80b008e8a5c7feffe8c27dc72 Author: Guillaume Tucker Date: Tue Aug 9 16:22:31 2022 +0200 selftests: fix LLVM build for i386 and x86_64 Add missing cases for the i386 and x86_64 architectures when determining the LLVM target for building kselftest. Fixes: 795285ef2425 ("selftests: Fix clang cross compilation") Signed-off-by: Guillaume Tucker Reviewed-by: Nathan Chancellor Signed-off-by: Shuah Khan commit d6f7ff9dd387861fa30cbc6375d15b586da17d33 Author: Jesus Sanchez-Palencia Date: Wed Mar 8 16:48:36 2023 -0800 libbpf: Revert poisoning of strlcpy This reverts commit 6d0c4b11e743("libbpf: Poison strlcpy()"). It added the pragma poison directive to libbpf_internal.h to protect against accidental usage of strlcpy but ended up breaking the build for toolchains based on libcs which provide the strlcpy() declaration from string.h (e.g. uClibc-ng). The include order which causes the issue is: string.h, from Iibbpf_common.h:12, from libbpf.h:20, from libbpf_internal.h:26, from strset.c:9: Fixes: 6d0c4b11e743 ("libbpf: Poison strlcpy()") Signed-off-by: Jesus Sanchez-Palencia Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230309004836.2808610-1-jesussanp@google.com Signed-off-by: Alexei Starovoitov commit dbf56d2fb53b7397002219bd221cfc72aadfdc82 Author: Alessandro Manca Date: Fri Mar 10 17:49:33 2023 +0100 HID: topre: Add support for 87 keys Realforce R2 The tenkeyless version of the Realforce R2 has the same issue of the full size one, the report fixup is needed to make n-key rollover work instead of 6 key rollover Signed-off-by: Alessandro Manca Signed-off-by: Jiri Kosina commit 55a21105ecc156495446d8ae75d7d73f66baed7b Merge: b0d14d2aaf7d4 2a8db5ec4a28a Author: Linus Torvalds Date: Fri Mar 10 09:19:30 2023 -0800 Merge tag 'riscv-for-linus-6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - RISC-V architecture-specific ELF attributes have been disabled in the kernel builds - A fix for a locking failure while during errata patching that manifests on SiFive-based systems - A fix for a KASAN failure during stack unwinding - A fix for some lockdep failures during text patching * tag 'riscv-for-linus-6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: RISC-V: Don't check text_mutex during stop_machine riscv: Use READ_ONCE_NOCHECK in imprecise unwinding stack mode RISC-V: fix taking the text_mutex twice during sifive errata patching RISC-V: Stop emitting attributes commit 0b04d4c0542e8573a837b1d81b94209e48723b25 Author: Douglas Raillard Date: Mon Mar 6 12:25:49 2023 +0000 f2fs: Fix f2fs_truncate_partial_nodes ftrace event Fix the nid_t field so that its size is correctly reported in the text format embedded in trace.dat files. As it stands, it is reported as being of size 4: field:nid_t nid[3]; offset:24; size:4; signed:0; Instead of 12: field:nid_t nid[3]; offset:24; size:12; signed:0; This also fixes the reported offset of subsequent fields so that they match with the actual struct layout. Signed-off-by: Douglas Raillard Reviewed-by: Mukesh Ojha Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b0d14d2aaf7d4b36b44f5a09955ebdf9eef4b0f8 Merge: 388a810192fd3 519b23310aa10 Author: Linus Torvalds Date: Fri Mar 10 08:57:46 2023 -0800 Merge tag 'drm-fixes-2023-03-10' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Weekly fixes. msm and amdgpu are the vast majority of these, otherwise some straggler misc from last week for nouveau and cirrus and a mailmap update for a drm developer. mailmap: - add an entry nouveau: - fix system shutdown regression - build warning fix cirrus: - NULL ptr deref fix msm: - fix invalid ptr free in syncobj cleanup - sync GMU removal in teardown - a5xx preemption fixes - fix runpm imbalance - DPU hw fixes - stack corruption fix - clear DSPP reservation amdgpu: - Misc display fixes - UMC 8.10 fixes - Driver unload fixes - NBIO 7.3.0 fix - Error checking fixes for soc15, nv, soc21 read register interface - Fix video cap query for VCN 4.0.4 amdkfd: - Fix return check in doorbell handling" * tag 'drm-fixes-2023-03-10' of git://anongit.freedesktop.org/drm/drm: (42 commits) drm/amdgpu/soc21: Add video cap query support for VCN_4_0_4 drm/amdgpu: fix error checking in amdgpu_read_mm_registers for nv drm/amdgpu: fix error checking in amdgpu_read_mm_registers for soc21 drm/amdgpu: fix error checking in amdgpu_read_mm_registers for soc15 drm/amdgpu: Fix the warning info when removing amdgpu device drm/amdgpu: fix return value check in kfd drm/amd: Fix initialization mistake for NBIO 7.3.0 drm/amdgpu: Fix call trace warning and hang when removing amdgpu device mailmap: add mailmap entries for Faith. drm/msm: DEVFREQ_GOV_SIMPLE_ONDEMAND is no longer needed drm/amd/display: Update clock table to include highest clock setting drm/amd/pm: Enable ecc_info table support for smu v13_0_10 drm/amdgpu: Support umc node harvest config on umc v8_10 drm/connector: print max_requested_bpc in state debugfs drm/display: Don't block HDR_OUTPUT_METADATA on unknown EOTF drm/msm/dpu: clear DSPP reservations in rm release drm/msm/disp/dpu: fix sc7280_pp base offset drm/msm/dpu: fix stack smashing in dpu_hw_ctl_setup_blendstage drm/msm/dpu: don't use DPU_CLK_CTRL_CURSORn for DMA SSPP clocks drm/msm/dpu: fix clocks settings for msm8998 SSPP blocks ... commit 388a810192fd383acce6933e7f272dd6a6802bb0 Merge: 92cadfcffac3f 3993f4f456309 Author: Linus Torvalds Date: Fri Mar 10 08:51:57 2023 -0800 Merge tag 'erofs-for-6.3-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs fixes from Gao Xiang: "The most important one reverts an improper fix which can cause an unexpected warning more often on specific images, and another one fixes LZMA decompression on 32-bit platforms. The others are minor fixes and cleanups. - Fix LZMA decompression failure on HIGHMEM platforms - Revert an inproper fix since it is actually an implementation issue of vmalloc() - Avoid a wrong DBG_BUGON since it could be triggered with -EINTR - Minor cleanups" * tag 'erofs-for-6.3-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: use wrapper i_blocksize() in erofs_file_read_iter() erofs: get rid of a useless DBG_BUGON erofs: Revert "erofs: fix kvcalloc() misuse with __GFP_NOFAIL" erofs: fix wrong kunmap when using LZMA on HIGHMEM platforms erofs: mark z_erofs_lzma_init/erofs_pcpubuf_init w/ __init commit 92cadfcffac3ff2dafc892b7725d1016c8a1b6ee Merge: ae195ca1a8a4a 9ca6705d9d609 Author: Linus Torvalds Date: Fri Mar 10 08:45:30 2023 -0800 Merge tag 'nfsd-6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fixes from Chuck Lever: - Protect NFSD writes against filesystem freezing - Fix a potential memory leak during server shutdown * tag 'nfsd-6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: SUNRPC: Fix a server shutdown leak NFSD: Protect against filesystem freezing commit ae195ca1a8a4af75073e82c485148897c923f88f Merge: f331c5de7960d 675dfe1223a69 Author: Linus Torvalds Date: Fri Mar 10 08:39:13 2023 -0800 Merge tag 'for-6.3-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "First batch of fixes. Among them there are two updates to sysfs and ioctl which are not strictly fixes but are used for testing so there's no reason to delay them. - fix block group item corruption after inserting new block group - fix extent map logging bit not cleared for split maps after dropping range - fix calculation of unusable block group space reporting bogus values due to 32/64b division - fix unnecessary increment of read error stat on write error - improve error handling in inode update - export per-device fsid in DEV_INFO ioctl to distinguish seeding devices, needed for testing - allocator size classes: - fix potential dead lock in size class loading logic - print sysfs stats for the allocation classes" * tag 'for-6.3-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix block group item corruption after inserting new block group btrfs: fix extent map logging bit not cleared for split maps after dropping range btrfs: fix percent calculation for bg reclaim message btrfs: fix unnecessary increment of read error stat on write error btrfs: handle btrfs_del_item errors in __btrfs_update_delayed_inode btrfs: ioctl: return device fsid from DEV_INFO ioctl btrfs: fix potential dead lock in size class loading logic btrfs: sysfs: add size class stats commit f331c5de7960d69fc767d2dc08f5f5859ce70061 Merge: 49be4fb28109b fa780334a8c39 Author: Linus Torvalds Date: Fri Mar 10 08:31:29 2023 -0800 Merge tag 'io_uring-6.3-2023-03-09' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: - Stop setting PF_NO_SETAFFINITY on io-wq workers. This has been reported in the past as it confuses some applications, as some of their threads will fail with -1/EINVAL if attempted affinitized. Most recent report was on cpusets, where enabling that with io-wq workers active will fail. Just deal with the mask changing by checking when a worker times out, and then exit if we have no work pending. - Fix an issue with passthrough support where we don't properly check if the file type has pollable uring_cmd support. - Fix a reported W=1 warning on a variable being set and unused. Add a special helper for iterating these lists that doesn't save the previous list element, if that iterator never ends up using it. * tag 'io_uring-6.3-2023-03-09' of git://git.kernel.dk/linux: io_uring: silence variable ‘prev’ set but not used warning io_uring/uring_cmd: ensure that device supports IOPOLL io_uring/io-wq: stop setting PF_NO_SETAFFINITY on io-wq workers commit 49be4fb28109b86a8ffe117415c306389a394cb2 Merge: 44889ba56cbb3 5b201a82cd9d0 Author: Linus Torvalds Date: Fri Mar 10 08:18:46 2023 -0800 Merge tag 'perf-tools-fixes-for-v6.3-1-2023-03-09' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools fixes from Arnaldo Carvalho de Melo: - Add Adrian Hunter to MAINTAINERS as a perf tools reviewer - Sync various tools/ copies of kernel headers with the kernel sources, this time trying to avoid first merging with upstream to then update but instead copy from upstream so that a merge is avoided and the end result after merging this pull request is the one expected, tools/perf/check-headers.sh (mostly) happy, less warnings while building tools/perf/ - Fix counting when initial delay configured by setting perf_attr.enable_on_exec when starting workloads from the perf command line - Don't avoid emitting a PERF_RECORD_MMAP2 in 'perf inject --buildid-all' when that record comes with a build-id, otherwise we end up not being able to resolve symbols - Don't use comma as the CSV output separator the "stat+csv_output" test, as comma can appear on some tests as a modifier for an event, use @ instead, ditto for the JSON linter test - The offcpu test was looking for some bits being set on task_struct->prev_state without masking other bits not important for this specific 'perf test', fix it * tag 'perf-tools-fixes-for-v6.3-1-2023-03-09' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: perf tools: Add Adrian Hunter to MAINTAINERS as a reviewer tools headers UAPI: Sync linux/perf_event.h with the kernel sources tools headers x86 cpufeatures: Sync with the kernel sources tools include UAPI: Sync linux/vhost.h with the kernel sources tools arch x86: Sync the msr-index.h copy with the kernel sources tools headers kvm: Sync uapi/{asm/linux} kvm.h headers with the kernel sources tools include UAPI: Synchronize linux/fcntl.h with the kernel sources tools headers: Synchronize {linux,vdso}/bits.h with the kernel sources tools headers UAPI: Sync linux/prctl.h with the kernel sources tools headers: Update the copy of x86's mem{cpy,set}_64.S used in 'perf bench' perf stat: Fix counting when initial delay configured tools headers svm: Sync svm headers with the kernel sources perf test: Avoid counting commas in json linter perf tests stat+csv_output: Switch CSV separator to @ perf inject: Fix --buildid-all not to eat up MMAP2 tools arch x86: Sync the msr-index.h copy with the kernel sources perf test: Fix offcpu test prev_state check commit 50c6b976fb66f623440066f8e44309b4c2f687a0 Author: Philippe Troin Date: Mon Mar 6 10:18:36 2023 -0800 HID: add HP 13t-aw100 & 14t-ea100 digitizer battery quirks Similar to many other devices using the Synopsys Designware Elantech hardware, HP Spectre x360 13t-aw100 and 14t-ea100 report an empty battery devices, supposedly for the active stylus. Apply the HID_BATTERY_QUIRK_IGNORE quirk to ignore the battery reports from these devices. Note that there are multiple versions of the panel installed in the 14t-ea100. Signed-off-by: Philippe Troin Signed-off-by: Jiri Kosina commit e57d06527738798039b8e91af762fbd33881b34d Author: Chuck Lever Date: Wed Mar 8 09:45:09 2023 -0500 NFS & NFSD: Update GSS dependencies Geert reports that: > On v6.2, "make ARCH=m68k defconfig" gives you > CONFIG_RPCSEC_GSS_KRB5=m > On v6.3, it became builtin, due to dropping the dependencies on > the individual crypto modules. > > $ grep -E "CRYPTO_(MD5|DES|CBC|CTS|ECB|HMAC|SHA1|AES)" .config > CONFIG_CRYPTO_AES=y > CONFIG_CRYPTO_AES_TI=m > CONFIG_CRYPTO_DES=m > CONFIG_CRYPTO_CBC=m > CONFIG_CRYPTO_CTS=m > CONFIG_CRYPTO_ECB=m > CONFIG_CRYPTO_HMAC=m > CONFIG_CRYPTO_MD5=m > CONFIG_CRYPTO_SHA1=m This behavior is triggered by the "default y" in the definition of RPCSEC_GSS. The "default y" was added in 2010 by commit df486a25900f ("NFS: Fix the selection of security flavours in Kconfig"). However, svc_gss_principal was removed in 2012 by commit 03a4e1f6ddf2 ("nfsd4: move principal name into svc_cred"), so the 2010 fix is no longer necessary. We can safely change the NFS_V4 and NFSD_V4 dependencies back to RPCSEC_GSS_KRB5 to get the nicer v6.2 behavior back. Selecting KRB5 symbolically represents the true requirement here: that all spec-compliant NFSv4 implementations must have Kerberos available to use. Reported-by: Geert Uytterhoeven Fixes: dfe9a123451a ("SUNRPC: Enable rpcsec_gss_krb5.ko to be built without CRYPTO_DES") Signed-off-by: Chuck Lever commit fe9ae05cfbe587dda724fcf537c00bc2f287da62 Author: Takashi Iwai Date: Wed Mar 8 11:50:12 2023 +0100 fbdev: Fix incorrect page mapping clearance at fb_deferred_io_release() The recent fix for the deferred I/O by the commit 3efc61d95259 ("fbdev: Fix invalid page access after closing deferred I/O devices") caused a regression when the same fb device is opened/closed while it's being used. It resulted in a frozen screen even if something is redrawn there after the close. The breakage is because the patch was made under a wrong assumption of a single open; in the current code, fb_deferred_io_release() cleans up the page mapping of the pageref list and it calls cancel_delayed_work_sync() unconditionally, where both are no correct behavior for multiple opens. This patch adds a refcount for the opens of the device, and applies the cleanup only when all files get closed. As both fb_deferred_io_open() and _close() are called always in the fb_info lock (mutex), it's safe to use the normal int for the refcounting. Also, a useless BUG_ON() is dropped. Fixes: 3efc61d95259 ("fbdev: Fix invalid page access after closing deferred I/O devices") Cc: Signed-off-by: Takashi Iwai Reviewed-by: Patrik Jakobsson Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230308105012.1845-1-tiwai@suse.de commit 3c66bb1918c262dd52fb4221a8d372619c5da70a Author: Ard Biesheuvel Date: Fri Mar 10 13:30:05 2023 +0100 arm64: efi: Set NX compat flag in PE/COFF header The PE/COFF header has a NX compat flag which informs the firmware that the application does not rely on memory regions being mapped with both executable and writable permissions at the same time. This is typically used by the firmware to decide whether it can set the NX attribute on all allocations it returns, but going forward, it may be used to enforce a policy that only permits applications with the NX flag set to be loaded to begin wiht in some configurations, e.g., when Secure Boot is in effect. Even though the arm64 version of the EFI stub may relocate the kernel before executing it, it always did so after disabling the MMU, and so we were always in line with what the NX compat flag conveys, we just never bothered to set it. So let's set the flag now. Cc: Signed-off-by: Ard Biesheuvel commit 3c60f67b4bd1bc01fa9194e9dc925ac6cb56156c Author: Ard Biesheuvel Date: Fri Mar 10 12:55:41 2023 +0100 efi/libstub: arm64: Remap relocated image with strict permissions After relocating the executable image, use the EFI memory attributes protocol to remap the code and data regions with the appropriate permissions. Signed-off-by: Ard Biesheuvel commit c7d9e628b8ff4d52a365a441bdacb3209ee83c81 Author: Ard Biesheuvel Date: Fri Mar 10 12:15:24 2023 +0100 efi/libstub: zboot: Mark zboot EFI application as NX compatible Now that the zboot loader will invoke the EFI memory attributes protocol to remap the decompressed code and rodata as read-only/executable, we can set the PE/COFF header flag that indicates to the firmware that the application does not rely on writable memory being executable at the same time. Cc: # v6.2+ Signed-off-by: Ard Biesheuvel commit 96c069508377547f913e7265a80fffe9355de592 Author: Johannes Berg Date: Wed Mar 1 12:09:33 2023 +0200 wifi: cfg80211: fix MLO connection ownership When disconnecting from an MLO connection we need the AP MLD address, not an arbitrary BSSID. Fix the code to do that. Fixes: 9ecff10e82a5 ("wifi: nl80211: refactor BSS lookup in nl80211_associate()") Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230301115906.4c1b3b18980e.I008f070c7f3b8e8bde9278101ef9e40706a82902@changeid Signed-off-by: Johannes Berg commit ce04abc3fcc62cd5640af981ebfd7c4dc3bded28 Author: Johannes Berg Date: Fri Feb 24 10:52:19 2023 +0100 wifi: mac80211: check basic rates validity When userspace sets basic rates, it might send us some rates list that's empty or consists of invalid values only. We're currently ignoring invalid values and then may end up with a rates bitmap that's empty, which later results in a warning. Reject the call if there were no valid rates. Signed-off-by: Johannes Berg commit b27f07c50a73e34eefb6b1030b235192b7ded850 Author: Johannes Berg Date: Fri Feb 24 13:36:57 2023 +0100 wifi: nl80211: fix puncturing bitmap policy This was meant to be a u32, and while applying the patch I tried to use policy validation for it. However, not only did I copy/paste it to u8 instead of u32, but also used the policy range erroneously. Fix both of these issues. Fixes: d7c1a9a0ed18 ("wifi: nl80211: validate and configure puncturing bitmap") Signed-off-by: Johannes Berg commit f624bb6fad23df3270580b4fcef415c6e7bf7705 Author: Johannes Berg Date: Wed Mar 1 12:09:29 2023 +0200 wifi: nl80211: fix NULL-ptr deref in offchan check If, e.g. in AP mode, the link was already created by userspace but not activated yet, it has a chandef but the chandef isn't valid and has no channel. Check for this and ignore this link. Fixes: 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs") Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230301115906.71bd4803fbb9.Iee39c0f6c2d3a59a8227674dc55d52e38b1090cf@changeid Signed-off-by: Johannes Berg commit 06be62083c5308c76a891ca975d66d832e2afc07 Author: Michael Walle Date: Fri Mar 10 09:48:45 2023 +0000 nvmem: core: return -ENOENT if nvmem cell is not found Prior to commit 5d8e6e6c10a3 ("nvmem: core: add an index parameter to the cell") of_nvmem_cell_get() would return -ENOENT if the cell wasn't found. Particularly, if of_property_match_string() returned -EINVAL, that return code was passed as the index to of_parse_phandle(), which then detected it as invalid and returned NULL. That led to an return code of -ENOENT. With the new code, the negative index will lead to an -EINVAL of of_parse_phandle_with_optional_args() which pass straight to the caller and break those who expect an -ENOENT. Fix it by always returning -ENOENT. Fixes: 5d8e6e6c10a3 ("nvmem: core: add an index parameter to the cell") Reported-by: Alexander Stein Link: https://lore.kernel.org/r/2143916.GUh0CODmnK@steina-w/ Signed-off-by: Michael Walle Tested-by: Alexander Stein Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230310094845.139400-1-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 09e65ee9059d76b89cb713795748805efd3f50c6 Author: Si-Wei Liu Date: Tue Feb 14 17:30:40 2023 -0800 vdpa/mlx5: should not activate virtq object when suspended Otherwise the virtqueue object to instate could point to invalid address that was unmapped from the MTT: mlx5_core 0000:41:04.2: mlx5_cmd_out_err:782:(pid 8321): CREATE_GENERAL_OBJECT(0xa00) op_mod(0xd) failed, status bad parameter(0x3), syndrome (0x5fa1c), err(-22) Fixes: cae15c2ed8e6 ("vdpa/mlx5: Implement susupend virtqueue callback") Cc: Eli Cohen Signed-off-by: Si-Wei Liu Reviewed-by: Eli Cohen Message-Id: <1676424640-11673-1-git-send-email-si-wei.liu@oracle.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit aed8efddd39b3434c96718d39009285c52b1cafc Author: Cindy Lu Date: Tue Feb 14 16:09:24 2023 +0800 vp_vdpa: fix the crash in hot unplug with vp_vdpa While unplugging the vp_vdpa device, it triggers a kernel panic The root cause is: vdpa_mgmtdev_unregister() will accesses modern devices which will cause a use after free. So need to change the sequence in vp_vdpa_remove [ 195.003359] BUG: unable to handle page fault for address: ff4e8beb80199014 [ 195.004012] #PF: supervisor read access in kernel mode [ 195.004486] #PF: error_code(0x0000) - not-present page [ 195.004960] PGD 100000067 P4D 1001b6067 PUD 1001b7067 PMD 1001b8067 PTE 0 [ 195.005578] Oops: 0000 1 PREEMPT SMP PTI [ 195.005968] CPU: 13 PID: 164 Comm: kworker/u56:10 Kdump: loaded Not tainted 5.14.0-252.el9.x86_64 #1 [ 195.006792] Hardware name: Red Hat KVM/RHEL, BIOS edk2-20221207gitfff6d81270b5-2.el9 unknown [ 195.007556] Workqueue: kacpi_hotplug acpi_hotplug_work_fn [ 195.008059] RIP: 0010:ioread8+0x31/0x80 [ 195.008418] Code: 77 28 48 81 ff 00 00 01 00 76 0b 89 fa ec 0f b6 c0 c3 cc cc cc cc 8b 15 ad 72 93 01 b8 ff 00 00 00 85 d2 75 0f c3 cc cc cc cc <8a> 07 0f b6 c0 c3 cc cc cc cc 83 ea 01 48 83 ec 08 48 89 fe 48 c7 [ 195.010104] RSP: 0018:ff4e8beb8067bab8 EFLAGS: 00010292 [ 195.010584] RAX: ffffffffc05834a0 RBX: ffffffffc05843c0 RCX: ff4e8beb8067bae0 [ 195.011233] RDX: ff1bcbd580f88000 RSI: 0000000000000246 RDI: ff4e8beb80199014 [ 195.011881] RBP: ff1bcbd587e39000 R08: ffffffff916fa2d0 R09: ff4e8beb8067ba68 [ 195.012527] R10: 000000000000001c R11: 0000000000000000 R12: ff1bcbd5a3de9120 [ 195.013179] R13: ffffffffc062d000 R14: 0000000000000080 R15: ff1bcbe402bc7805 [ 195.013826] FS: 0000000000000000(0000) GS:ff1bcbe402740000(0000) knlGS:0000000000000000 [ 195.014564] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 195.015093] CR2: ff4e8beb80199014 CR3: 0000000107dea002 CR4: 0000000000771ee0 [ 195.015741] PKRU: 55555554 [ 195.016001] Call Trace: [ 195.016233] [ 195.016434] vp_modern_get_status+0x12/0x20 [ 195.016823] vp_vdpa_reset+0x1b/0x50 [vp_vdpa] [ 195.017238] virtio_vdpa_reset+0x3c/0x48 [virtio_vdpa] [ 195.017709] remove_vq_common+0x1f/0x3a0 [virtio_net] [ 195.018178] virtnet_remove+0x5d/0x70 [virtio_net] [ 195.018618] virtio_dev_remove+0x3d/0x90 [ 195.018986] device_release_driver_internal+0x1aa/0x230 [ 195.019466] bus_remove_device+0xd8/0x150 [ 195.019841] device_del+0x18b/0x3f0 [ 195.020167] ? kernfs_find_ns+0x35/0xd0 [ 195.020526] device_unregister+0x13/0x60 [ 195.020894] unregister_virtio_device+0x11/0x20 [ 195.021311] device_release_driver_internal+0x1aa/0x230 [ 195.021790] bus_remove_device+0xd8/0x150 [ 195.022162] device_del+0x18b/0x3f0 [ 195.022487] device_unregister+0x13/0x60 [ 195.022852] ? vdpa_dev_remove+0x30/0x30 [vdpa] [ 195.023270] vp_vdpa_dev_del+0x12/0x20 [vp_vdpa] [ 195.023694] vdpa_match_remove+0x2b/0x40 [vdpa] [ 195.024115] bus_for_each_dev+0x78/0xc0 [ 195.024471] vdpa_mgmtdev_unregister+0x65/0x80 [vdpa] [ 195.024937] vp_vdpa_remove+0x23/0x40 [vp_vdpa] [ 195.025353] pci_device_remove+0x36/0xa0 [ 195.025719] device_release_driver_internal+0x1aa/0x230 [ 195.026201] pci_stop_bus_device+0x6c/0x90 [ 195.026580] pci_stop_and_remove_bus_device+0xe/0x20 [ 195.027039] disable_slot+0x49/0x90 [ 195.027366] acpiphp_disable_and_eject_slot+0x15/0x90 [ 195.027832] hotplug_event+0xea/0x210 [ 195.028171] ? hotplug_event+0x210/0x210 [ 195.028535] acpiphp_hotplug_notify+0x22/0x80 [ 195.028942] ? hotplug_event+0x210/0x210 [ 195.029303] acpi_device_hotplug+0x8a/0x1d0 [ 195.029690] acpi_hotplug_work_fn+0x1a/0x30 [ 195.030077] process_one_work+0x1e8/0x3c0 [ 195.030451] worker_thread+0x50/0x3b0 [ 195.030791] ? rescuer_thread+0x3a0/0x3a0 [ 195.031165] kthread+0xd9/0x100 [ 195.031459] ? kthread_complete_and_exit+0x20/0x20 [ 195.031899] ret_from_fork+0x22/0x30 [ 195.032233] Fixes: ffbda8e9df10 ("vdpa/vp_vdpa : add vdpa tool support in vp_vdpa") Tested-by: Lei Yang Cc: stable@vger.kernel.org Signed-off-by: Cindy Lu Message-Id: <20230214080924.131462-1-lulu@redhat.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 83a458e330ff54951d3ddd378f970ab96b864020 Author: Bjorn Helgaas Date: Tue Mar 7 14:19:37 2023 -0600 fpga: dfl-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 Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20230307201937.880084-1-helgaas@kernel.org Signed-off-by: Xu Yilun commit bced3f7db95ff2e6ca29dc4d1c9751ab5e736a09 Author: Breno Leitao Date: Wed Mar 8 11:07:45 2023 -0800 tcp: tcp_make_synack() can be called from process context tcp_rtx_synack() now could be called in process context as explained in 0a375c822497 ("tcp: tcp_rtx_synack() can be called from process context"). tcp_rtx_synack() might call tcp_make_synack(), which will touch per-CPU variables with preemption enabled. This causes the following BUG: BUG: using __this_cpu_add() in preemptible [00000000] code: ThriftIO1/5464 caller is tcp_make_synack+0x841/0xac0 Call Trace: dump_stack_lvl+0x10d/0x1a0 check_preemption_disabled+0x104/0x110 tcp_make_synack+0x841/0xac0 tcp_v6_send_synack+0x5c/0x450 tcp_rtx_synack+0xeb/0x1f0 inet_rtx_syn_ack+0x34/0x60 tcp_check_req+0x3af/0x9e0 tcp_rcv_state_process+0x59b/0x2030 tcp_v6_do_rcv+0x5f5/0x700 release_sock+0x3a/0xf0 tcp_sendmsg+0x33/0x40 ____sys_sendmsg+0x2f2/0x490 __sys_sendmsg+0x184/0x230 do_syscall_64+0x3d/0x90 Avoid calling __TCP_INC_STATS() with will touch per-cpu variables. Use TCP_INC_STATS() which is safe to be called from context switch. Fixes: 8336886f786f ("tcp: TCP Fast Open Server - support TFO listeners") Signed-off-by: Breno Leitao Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20230308190745.780221-1-leitao@debian.org Signed-off-by: Jakub Kicinski commit c24ff3ec55f08788fb2c404c312f213d9081e1ba Merge: ff447886e6759 e041a2a550582 Author: Takashi Iwai Date: Fri Mar 10 06:52:15 2023 +0100 Merge tag 'asoc-fix-v6.3-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.3 More fixes that came in since -rc1, a lot from Intel - looks like they've been busy test. Everything is driver specific. commit 519b23310aa100073f0b58c39df120a486ed7f8e Merge: 3a43e30b8e2cf 6ce2ea07c5ff0 Author: Dave Airlie Date: Fri Mar 10 14:17:34 2023 +1000 Merge tag 'amd-drm-fixes-6.3-2023-03-09' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.3-2023-03-09: amdgpu: - Misc display fixes - UMC 8.10 fixes - Driver unload fixes - NBIO 7.3.0 fix - Error checking fixes for soc15, nv, soc21 read register interface - Fix video cap query for VCN 4.0.4 amdkfd: - Fix return check in doorbell handling Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230310031314.1296929-1-alexander.deucher@amd.com commit 609d54441493c99f21c1823dfd66fa7f4c512ff4 Author: Theodore Ts'o Date: Mon Mar 6 13:54:50 2023 -0500 fs: prevent out-of-bounds array speculation when closing a file descriptor Google-Bug-Id: 114199369 Signed-off-by: Theodore Ts'o Signed-off-by: Al Viro commit aa69f814920d85a2d4cfd5c294757c3d59d2fba6 Author: Arnd Bergmann Date: Tue Jan 31 10:36:30 2023 +0100 ftrace,kcfi: Define ftrace_stub_graph conditionally When CONFIG_FUNCTION_GRAPH_TRACER is disabled, __kcfi_typeid_ftrace_stub_graph is missing, causing a link failure: ld.lld: error: undefined symbol: __kcfi_typeid_ftrace_stub_graph referenced by arch/x86/kernel/ftrace_64.o:(__cfi_ftrace_stub_graph) in archive vmlinux.a Mark the reference to it as conditional on the same symbol, as is done on arm64. Link: https://lore.kernel.org/linux-trace-kernel/20230131093643.3850272-1-arnd@kernel.org Cc: Peter Zijlstra Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: Josh Poimboeuf Fixes: 883bbbffa5a4 ("ftrace,kcfi: Separate ftrace_stub() and ftrace_stub_graph()") See-also: 2598ac6ec493 ("arm64: ftrace: Define ftrace_stub_graph only with FUNCTION_GRAPH_TRACER") Signed-off-by: Arnd Bergmann Signed-off-by: Steven Rostedt (Google) commit ee92fa443358f4fc0017c1d0d325c27b37802504 Author: Chen Zhongjin Date: Thu Mar 9 16:02:30 2023 +0800 ftrace: Fix invalid address access in lookup_rec() when index is 0 KASAN reported follow problem: BUG: KASAN: use-after-free in lookup_rec Read of size 8 at addr ffff000199270ff0 by task modprobe CPU: 2 Comm: modprobe Call trace: kasan_report __asan_load8 lookup_rec ftrace_location arch_check_ftrace_location check_kprobe_address_safe register_kprobe When checking pg->records[pg->index - 1].ip in lookup_rec(), it can get a pg which is newly added to ftrace_pages_start in ftrace_process_locs(). Before the first pg->index++, index is 0 and accessing pg->records[-1].ip will cause this problem. Don't check the ip when pg->index is 0. Link: https://lore.kernel.org/linux-trace-kernel/20230309080230.36064-1-chenzhongjin@huawei.com Cc: stable@vger.kernel.org Fixes: 9644302e3315 ("ftrace: Speed up search by skipping pages by address") Suggested-by: Steven Rostedt (Google) Signed-off-by: Chen Zhongjin Signed-off-by: Steven Rostedt (Google) commit 9f116f76fa8c04c81aef33ad870dbf9a158e5b70 Author: Steven Rostedt (Google) Date: Wed Mar 1 20:00:53 2023 -0500 tracing: Check field value in hist_field_name() The function hist_field_name() cannot handle being passed a NULL field parameter. It should never be NULL, but due to a previous bug, NULL was passed to the function and the kernel crashed due to a NULL dereference. Mark Rutland reported this to me on IRC. The bug was fixed, but to prevent future bugs from crashing the kernel, check the field and add a WARN_ON() if it is NULL. Link: https://lkml.kernel.org/r/20230302020810.762384440@goodmis.org Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Andrew Morton Reported-by: Mark Rutland Fixes: c6afad49d127f ("tracing: Add hist trigger 'sym' and 'sym-offset' modifiers") Tested-by: Mark Rutland Signed-off-by: Steven Rostedt (Google) commit e0213434fe3e4a0d118923dc98d31e7ff1cd9e45 Author: Steven Rostedt (Google) Date: Wed Mar 1 20:00:52 2023 -0500 tracing: Do not let histogram values have some modifiers Histogram values can not be strings, stacktraces, graphs, symbols, syscalls, or grouped in buckets or log. Give an error if a value is set to do so. Note, the histogram code was not prepared to handle these modifiers for histograms and caused a bug. Mark Rutland reported: # echo 'p:copy_to_user __arch_copy_to_user n=$arg2' >> /sys/kernel/tracing/kprobe_events # echo 'hist:keys=n:vals=hitcount.buckets=8:sort=hitcount' > /sys/kernel/tracing/events/kprobes/copy_to_user/trigger # cat /sys/kernel/tracing/events/kprobes/copy_to_user/hist [ 143.694628] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [ 143.695190] Mem abort info: [ 143.695362] ESR = 0x0000000096000004 [ 143.695604] EC = 0x25: DABT (current EL), IL = 32 bits [ 143.695889] SET = 0, FnV = 0 [ 143.696077] EA = 0, S1PTW = 0 [ 143.696302] FSC = 0x04: level 0 translation fault [ 143.702381] Data abort info: [ 143.702614] ISV = 0, ISS = 0x00000004 [ 143.702832] CM = 0, WnR = 0 [ 143.703087] user pgtable: 4k pages, 48-bit VAs, pgdp=00000000448f9000 [ 143.703407] [0000000000000000] pgd=0000000000000000, p4d=0000000000000000 [ 143.704137] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP [ 143.704714] Modules linked in: [ 143.705273] CPU: 0 PID: 133 Comm: cat Not tainted 6.2.0-00003-g6fc512c10a7c #3 [ 143.706138] Hardware name: linux,dummy-virt (DT) [ 143.706723] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 143.707120] pc : hist_field_name.part.0+0x14/0x140 [ 143.707504] lr : hist_field_name.part.0+0x104/0x140 [ 143.707774] sp : ffff800008333a30 [ 143.707952] x29: ffff800008333a30 x28: 0000000000000001 x27: 0000000000400cc0 [ 143.708429] x26: ffffd7a653b20260 x25: 0000000000000000 x24: ffff10d303ee5800 [ 143.708776] x23: ffffd7a6539b27b0 x22: ffff10d303fb8c00 x21: 0000000000000001 [ 143.709127] x20: ffff10d303ec2000 x19: 0000000000000000 x18: 0000000000000000 [ 143.709478] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 [ 143.709824] x14: 0000000000000000 x13: 203a6f666e692072 x12: 6567676972742023 [ 143.710179] x11: 0a230a6d6172676f x10: 000000000000002c x9 : ffffd7a6521e018c [ 143.710584] x8 : 000000000000002c x7 : 7f7f7f7f7f7f7f7f x6 : 000000000000002c [ 143.710915] x5 : ffff10d303b0103e x4 : ffffd7a653b20261 x3 : 000000000000003d [ 143.711239] x2 : 0000000000020001 x1 : 0000000000000001 x0 : 0000000000000000 [ 143.711746] Call trace: [ 143.712115] hist_field_name.part.0+0x14/0x140 [ 143.712642] hist_field_name.part.0+0x104/0x140 [ 143.712925] hist_field_print+0x28/0x140 [ 143.713125] event_hist_trigger_print+0x174/0x4d0 [ 143.713348] hist_show+0xf8/0x980 [ 143.713521] seq_read_iter+0x1bc/0x4b0 [ 143.713711] seq_read+0x8c/0xc4 [ 143.713876] vfs_read+0xc8/0x2a4 [ 143.714043] ksys_read+0x70/0xfc [ 143.714218] __arm64_sys_read+0x24/0x30 [ 143.714400] invoke_syscall+0x50/0x120 [ 143.714587] el0_svc_common.constprop.0+0x4c/0x100 [ 143.714807] do_el0_svc+0x44/0xd0 [ 143.714970] el0_svc+0x2c/0x84 [ 143.715134] el0t_64_sync_handler+0xbc/0x140 [ 143.715334] el0t_64_sync+0x190/0x194 [ 143.715742] Code: a9bd7bfd 910003fd a90153f3 aa0003f3 (f9400000) [ 143.716510] ---[ end trace 0000000000000000 ]--- Segmentation fault Link: https://lkml.kernel.org/r/20230302020810.559462599@goodmis.org Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Andrew Morton Fixes: c6afad49d127f ("tracing: Add hist trigger 'sym' and 'sym-offset' modifiers") Reported-by: Mark Rutland Tested-by: Mark Rutland Signed-off-by: Steven Rostedt (Google) commit 6ce2ea07c5ff0a8188eab0e5cd1f0e4899b36835 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 Cc: stable@vger.kernel.org # 6.1.x commit b42fee5e0b44344cfe4c38e61341ee250362c83f 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 Cc: stable@vger.kernel.org commit 2915e43a033a778816fa4bc621f033576796521e 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 Cc: stable@vger.kernel.org commit 0dcdf8498eae2727bb33cef3576991dc841d4343 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 Cc: stable@vger.kernel.org commit 8879ec6dfdcdcca7718eeb4a584805eb205288bf 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 20534dbcc7b7bfb447279cdcfb0d88ee3b779a18 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 1717cc5f2962a4652c76ed3858b499ccae6c277c 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 93bb18d2a873d2fa9625c8ea927723660a868b95 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 c6001025d53ab56d7159cf313313c6b5bd250380 Author: Asutosh Das Date: Wed Mar 8 15:13:23 2023 -0800 scsi: ufs: mcq: Use active_reqs to check busy in clock scaling Multi Circular Queue doesn't use outstanding_reqs. However, the UFS clock scaling functions use outstanding_reqs to determine if there are requests pending. When MCQ is enabled, this check always returns false. Hence use active_reqs to check if there are pending requests. Fixes: eacb139b77ff ("scsi: ufs: core: mcq: Enable multi-circular queue") Signed-off-by: Asutosh Das Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/a24e0d646aac70eae0fc5e05fac0c58bb7e6e680.1678317160.git.quic_asutoshd@quicinc.com Signed-off-by: Martin K. Petersen commit be03df3d4bfe7e8866d4aa43d62e648ffe884f5f Author: Bart Van Assche Date: Tue Mar 7 13:44:28 2023 -0800 scsi: core: Fix a procfs host directory removal regression scsi_proc_hostdir_rm() decreases a reference counter and hence must only be called once per host that is removed. This change does not require a scsi_add_host_with_dma() change since scsi_add_host_with_dma() will return 0 (success) if scsi_proc_host_add() is called. Fixes: fc663711b944 ("scsi: core: Remove the /proc/scsi/${proc_name} directory earlier") Cc: John Garry Reported-by: John Garry Link: https://lore.kernel.org/all/ed6b8027-a9d9-1b45-be8e-df4e8c6c4605@oracle.com/ Reported-by: syzbot+645a4616b87a2f10e398@syzkaller.appspotmail.com Link: https://lore.kernel.org/linux-scsi/000000000000890fab05f65342b6@google.com/ Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230307214428.3703498-1-bvanassche@acm.org Tested-by: John Garry Tested-by: Shin'ichiro Kawasaki Signed-off-by: Martin K. Petersen commit 4b1a2c2a8e0ddcb89c5f6c5003bd9b53142f69e3 Author: Lee Duncan Date: Wed Sep 28 11:13:50 2022 -0700 scsi: core: Add BLIST_NO_VPD_SIZE for some VDASD Some storage, such as AIX VDASD (virtual storage) and IBM 2076 (front end), fail as a result of commit c92a6b5d6335 ("scsi: core: Query VPD size before getting full page"). That commit changed getting SCSI VPD pages so that we now read just enough of the page to get the actual page size, then read the whole page in a second read. The problem is that the above mentioned hardware returns zero for the page size, because of a firmware error. In such cases, until the firmware is fixed, this new blacklist flag says to revert to the original method of reading the VPD pages, i.e. try to read a whole buffer's worth on the first try. [mkp: reworked somewhat] Fixes: c92a6b5d6335 ("scsi: core: Query VPD size before getting full page") Reported-by: Martin Wilck Suggested-by: Hannes Reinecke Signed-off-by: Lee Duncan Link: https://lore.kernel.org/r/20220928181350.9948-1-leeman.duncan@gmail.com Tested-by: Srikar Dronamraju Signed-off-by: Martin K. Petersen commit 5cf9d015be160e2d90d29ae74ef1364390e8fce8 Author: Nathan Chancellor Date: Wed Mar 8 13:47:11 2023 -0700 clk: Avoid invalid function names in CLK_OF_DECLARE() After commit c28cd1f3433c ("clk: Mark a fwnode as initialized when using CLK_OF_DECLARE() macro"), drivers/clk/mvebu/kirkwood.c fails to build: drivers/clk/mvebu/kirkwood.c:358:1: error: expected identifier or '(' CLK_OF_DECLARE(98dx1135_clk, "marvell,mv98dx1135-core-clock", ^ include/linux/clk-provider.h:1367:21: note: expanded from macro 'CLK_OF_DECLARE' static void __init name##_of_clk_init_declare(struct device_node *np) \ ^ :124:1: note: expanded from here 98dx1135_clk_of_clk_init_declare ^ drivers/clk/mvebu/kirkwood.c:358:1: error: invalid digit 'd' in decimal constant include/linux/clk-provider.h:1372:34: note: expanded from macro 'CLK_OF_DECLARE' OF_DECLARE_1(clk, name, compat, name##_of_clk_init_declare) ^ :125:3: note: expanded from here 98dx1135_clk_of_clk_init_declare ^ drivers/clk/mvebu/kirkwood.c:358:1: error: invalid digit 'd' in decimal constant include/linux/clk-provider.h:1372:34: note: expanded from macro 'CLK_OF_DECLARE' OF_DECLARE_1(clk, name, compat, name##_of_clk_init_declare) ^ :125:3: note: expanded from here 98dx1135_clk_of_clk_init_declare ^ drivers/clk/mvebu/kirkwood.c:358:1: error: invalid digit 'd' in decimal constant include/linux/clk-provider.h:1372:34: note: expanded from macro 'CLK_OF_DECLARE' OF_DECLARE_1(clk, name, compat, name##_of_clk_init_declare) ^ :125:3: note: expanded from here 98dx1135_clk_of_clk_init_declare ^ C function names must start with either an alphabetic letter or an underscore. To avoid generating invalid function names from clock names, add two underscores to the beginning of the identifier. Fixes: c28cd1f3433c ("clk: Mark a fwnode as initialized when using CLK_OF_DECLARE() macro") Suggested-by: Saravana Kannan Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20230308-clk_of_declare-fix-v1-1-317b741e2532@kernel.org Reviewed-by: Saravana Kannan Reported-by: Naresh Kamboju Signed-off-by: Stephen Boyd commit 47c29d69212911f50bdcdd0564b5999a559010d4 Author: Zheng Wang Date: Fri Mar 10 01:47:28 2023 +0800 power: supply: bq24190: Fix use after free bug in bq24190_remove due to race condition In bq24190_probe, &bdi->input_current_limit_work is bound with bq24190_input_current_limit_work. When external power changed, it will call bq24190_charger_external_power_changed to start the work. If we remove the module which will call bq24190_remove to make cleanup, there may be a unfinished work. The possible sequence is as follows: CPU0 CPUc1 |bq24190_input_current_limit_work bq24190_remove | power_supply_unregister | device_unregister | power_supply_dev_release| kfree(psy) | | | power_supply_get_property_from_supplier | //use Fix it by finishing the work before cleanup in the bq24190_remove Fixes: 97774672573a ("power_supply: Initialize changed_work before calling device_add") Signed-off-by: Zheng Wang Signed-off-by: Sebastian Reichel commit 9b7fef255c80db8fc33fc06f2ad6d8e3ced1389b Merge: 2a8db5ec4a28a 82dd33fde0268 Author: Palmer Dabbelt Date: Thu Mar 9 15:22:05 2023 -0800 Merge patch series "riscv: asid: switch to alternative way to fix stale TLB entries" Sergey Matyukevich says: Some time ago two different patches have been posted to fix stale TLB entries that caused applications crashes. The patch [0] suggested 'aggregating' mm_cpumask, i.e. current cpu is not cleared for the switched-out task in switch_mm function. For additional explanations see the commit message by Guo Ren. The same approach is used by arc architecture, so another good comment is for switch_mm in arch/arc/include/asm/mmu_context.h. The patch [1] attempted to reduce the number of TLB flushes by deferring (and possibly avoiding) them for CPUs not running the task. Patch [1] has been merged. However we already have two bug reports from different vendors. So apparently something is missing in the approach suggested in [1]. In both cases the patch [0] fixed the issue. This patch series reverts [1] and replaces it by [0]. [0] https://lore.kernel.org/linux-riscv/20221111075902.798571-1-guoren@kernel.org/ [1] https://lore.kernel.org/linux-riscv/20220829205219.283543-1-geomatsi@gmail.com/ * b4-shazam-merge: riscv: asid: Fixup stale TLB entry cause application crash Revert "riscv: mm: notify remote harts about mmu cache updates" Link: https://lore.kernel.org/r/20230226150137.1919750-1-geomatsi@gmail.com Signed-off-by: Palmer Dabbelt commit 82dd33fde0268cc622d3d1ac64971f3f61634142 Author: Guo Ren Date: Sun Feb 26 18:01:37 2023 +0300 riscv: asid: Fixup stale TLB entry cause application crash After use_asid_allocator is enabled, the userspace application will crash by stale TLB entries. Because only using cpumask_clear_cpu without local_flush_tlb_all couldn't guarantee CPU's TLB entries were fresh. Then set_mm_asid would cause the user space application to get a stale value by stale TLB entry, but set_mm_noasid is okay. Here is the symptom of the bug: unhandled signal 11 code 0x1 (coredump) 0x0000003fd6d22524 <+4>: auipc s0,0x70 0x0000003fd6d22528 <+8>: ld s0,-148(s0) # 0x3fd6d92490 => 0x0000003fd6d2252c <+12>: ld a5,0(s0) (gdb) i r s0 s0 0x8082ed1cc3198b21 0x8082ed1cc3198b21 (gdb) x /2x 0x3fd6d92490 0x3fd6d92490: 0xd80ac8a8 0x0000003f The core dump file shows that register s0 is wrong, but the value in memory is correct. Because 'ld s0, -148(s0)' used a stale mapping entry in TLB and got a wrong result from an incorrect physical address. When the task ran on CPU0, which loaded/speculative-loaded the value of address(0x3fd6d92490), then the first version of the mapping entry was PTWed into CPU0's TLB. When the task switched from CPU0 to CPU1 (No local_tlb_flush_all here by asid), it happened to write a value on the address (0x3fd6d92490). It caused do_page_fault -> wp_page_copy -> ptep_clear_flush -> ptep_get_and_clear & flush_tlb_page. The flush_tlb_page used mm_cpumask(mm) to determine which CPUs need TLB flush, but CPU0 had cleared the CPU0's mm_cpumask in the previous switch_mm. So we only flushed the CPU1 TLB and set the second version mapping of the PTE. When the task switched from CPU1 to CPU0 again, CPU0 still used a stale TLB mapping entry which contained a wrong target physical address. It raised a bug when the task happened to read that value. CPU0 CPU1 - switch 'task' in - read addr (Fill stale mapping entry into TLB) - switch 'task' out (no tlb_flush) - switch 'task' in (no tlb_flush) - write addr cause pagefault do_page_fault() (change to new addr mapping) wp_page_copy() ptep_clear_flush() ptep_get_and_clear() & flush_tlb_page() write new value into addr - switch 'task' out (no tlb_flush) - switch 'task' in (no tlb_flush) - read addr again (Use stale mapping entry in TLB) get wrong value from old phyical addr, BUG! The solution is to keep all CPUs' footmarks of cpumask(mm) in switch_mm, which could guarantee to invalidate all stale TLB entries during TLB flush. Fixes: 65d4b9c53017 ("RISC-V: Implement ASID allocator") Signed-off-by: Guo Ren Signed-off-by: Guo Ren Tested-by: Lad Prabhakar Tested-by: Zong Li Tested-by: Sergey Matyukevich Cc: Anup Patel Cc: Palmer Dabbelt Cc: stable@vger.kernel.org Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20230226150137.1919750-3-geomatsi@gmail.com Signed-off-by: Palmer Dabbelt commit e921050022f1f12d5029d1487a7dfc46cde15523 Author: Sergey Matyukevich Date: Sun Feb 26 18:01:36 2023 +0300 Revert "riscv: mm: notify remote harts about mmu cache updates" This reverts the remaining bits of commit 4bd1d80efb5a ("riscv: mm: notify remote harts harts about mmu cache updates"). According to bug reports, suggested approach to fix stale TLB entries is not sufficient. It needs to be replaced by a more robust solution. Fixes: 4bd1d80efb5a ("riscv: mm: notify remote harts about mmu cache updates") Reported-by: Zong Li Reported-by: Lad Prabhakar Signed-off-by: Sergey Matyukevich Cc: stable@vger.kernel.org Reviewed-by: Guo Ren Link: https://lore.kernel.org/r/20230226150137.1919750-2-geomatsi@gmail.com Signed-off-by: Palmer Dabbelt commit bf6c880d5d1448489ebf92e2d13d5713ff644930 Author: Denis Arefev Date: Tue Dec 6 12:17:23 2022 +0300 power: supply: axp288_fuel_gauge: Added check for negative values Variable 'pirq', which may receive negative value in platform_get_irq(). Used as an index in a function regmap_irq_get_virq(). Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Denis Arefev Reviewed-by: Hans de Goede Signed-off-by: Sebastian Reichel commit 14c76b2e75bca4d96e2b85a0c12aa43e84fe3f74 Author: Grant Grundler Date: Mon Dec 12 13:38:57 2022 -0800 power: supply: cros_usbpd: reclassify "default case!" as debug This doesn't need to be printed every second as an error: ... <3>[17438.628385] cros-usbpd-charger cros-usbpd-charger.3.auto: Port 1: default case! <3>[17439.634176] cros-usbpd-charger cros-usbpd-charger.3.auto: Port 1: default case! <3>[17440.640298] cros-usbpd-charger cros-usbpd-charger.3.auto: Port 1: default case! ... Reduce priority from ERROR to DEBUG. Signed-off-by: Grant Grundler Reviewed-by: Guenter Roeck Signed-off-by: Sebastian Reichel commit 3268a4d9b0b85a4382e93bdf7be5400a73db74c5 Author: Jiapeng Chong Date: Wed Dec 14 11:23:16 2022 +0800 power: supply: rk817: Fix unsigned comparison with less than zero The tmp is defined as u32 type, which results in invalid processing of tmp<0 in function rk817_read_or_set_full_charge_on_boot(). Therefore, drop the comparison. drivers/power/supply/rk817_charger.c:828 rk817_read_or_set_full_charge_on_boot() warn: unsigned 'tmp' is never less than zero. drivers/power/supply/rk817_charger.c:788 rk817_read_or_set_full_charge_on_boot() warn: unsigned 'tmp' is never less than zero. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3444 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Tested-by: Chris Morgan Signed-off-by: Sebastian Reichel commit 2a8db5ec4a28a0fce822d10224db9471a44b6925 Author: Conor Dooley Date: Fri Mar 3 14:37:55 2023 +0000 RISC-V: Don't check text_mutex during stop_machine We're currently using stop_machine() to update ftrace & kprobes, which means that the thread that takes text_mutex during may not be the same as the thread that eventually patches the code. This isn't actually a race because the lock is still held (preventing any other concurrent accesses) and there is only one thread running during stop_machine(), but it does trigger a lockdep failure. This patch just elides the lockdep check during stop_machine. Fixes: c15ac4fd60d5 ("riscv/ftrace: Add dynamic function tracer support") Suggested-by: Steven Rostedt Reported-by: Changbin Du Signed-off-by: Palmer Dabbelt Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20230303143754.4005217-1-conor.dooley@microchip.com Signed-off-by: Palmer Dabbelt commit 76950340cf03b149412fe0d5f0810e52ac1df8cb Author: Alexandre Ghiti Date: Wed Mar 8 10:16:39 2023 +0100 riscv: Use READ_ONCE_NOCHECK in imprecise unwinding stack mode When CONFIG_FRAME_POINTER is unset, the stack unwinding function walk_stackframe randomly reads the stack and then, when KASAN is enabled, it can lead to the following backtrace: [ 0.000000] ================================================================== [ 0.000000] BUG: KASAN: stack-out-of-bounds in walk_stackframe+0xa6/0x11a [ 0.000000] Read of size 8 at addr ffffffff81807c40 by task swapper/0 [ 0.000000] [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 6.2.0-12919-g24203e6db61f #43 [ 0.000000] Hardware name: riscv-virtio,qemu (DT) [ 0.000000] Call Trace: [ 0.000000] [] walk_stackframe+0x0/0x11a [ 0.000000] [] init_param_lock+0x26/0x2a [ 0.000000] [] walk_stackframe+0xa2/0x11a [ 0.000000] [] dump_stack_lvl+0x22/0x36 [ 0.000000] [] print_report+0x198/0x4a8 [ 0.000000] [] init_param_lock+0x26/0x2a [ 0.000000] [] walk_stackframe+0xa2/0x11a [ 0.000000] [] kasan_report+0x9a/0xc8 [ 0.000000] [] walk_stackframe+0xa2/0x11a [ 0.000000] [] walk_stackframe+0xa2/0x11a [ 0.000000] [] desc_make_final+0x80/0x84 [ 0.000000] [] stack_trace_save+0x88/0xa6 [ 0.000000] [] filter_irq_stacks+0x72/0x76 [ 0.000000] [] devkmsg_read+0x32a/0x32e [ 0.000000] [] kasan_save_stack+0x28/0x52 [ 0.000000] [] desc_make_final+0x7c/0x84 [ 0.000000] [] stack_trace_save+0x84/0xa6 [ 0.000000] [] kasan_set_track+0x12/0x20 [ 0.000000] [] __kasan_slab_alloc+0x58/0x5e [ 0.000000] [] __kmem_cache_create+0x21e/0x39a [ 0.000000] [] create_boot_cache+0x70/0x9c [ 0.000000] [] kmem_cache_init+0x6c/0x11e [ 0.000000] [] mm_init+0xd8/0xfe [ 0.000000] [] start_kernel+0x190/0x3ca [ 0.000000] [ 0.000000] The buggy address belongs to stack of task swapper/0 [ 0.000000] and is located at offset 0 in frame: [ 0.000000] stack_trace_save+0x0/0xa6 [ 0.000000] [ 0.000000] This frame has 1 object: [ 0.000000] [32, 56) 'c' [ 0.000000] [ 0.000000] The buggy address belongs to the physical page: [ 0.000000] page:(____ptrval____) refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x81a07 [ 0.000000] flags: 0x1000(reserved|zone=0) [ 0.000000] raw: 0000000000001000 ff600003f1e3d150 ff600003f1e3d150 0000000000000000 [ 0.000000] raw: 0000000000000000 0000000000000000 00000001ffffffff [ 0.000000] page dumped because: kasan: bad access detected [ 0.000000] [ 0.000000] Memory state around the buggy address: [ 0.000000] ffffffff81807b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 0.000000] ffffffff81807b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 0.000000] >ffffffff81807c00: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 f3 [ 0.000000] ^ [ 0.000000] ffffffff81807c80: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 [ 0.000000] ffffffff81807d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 0.000000] ================================================================== Fix that by using READ_ONCE_NOCHECK when reading the stack in imprecise mode. Fixes: 5d8544e2d007 ("RISC-V: Generic library routines and assembly") Reported-by: Chathura Rajapaksha Link: https://lore.kernel.org/all/CAD7mqryDQCYyJ1gAmtMm8SASMWAQ4i103ptTb0f6Oda=tPY2=A@mail.gmail.com/ Suggested-by: Dmitry Vyukov Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20230308091639.602024-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit f3d0fbad6765da25de7ecf6481af9b6ddb0b3793 Author: Johan Hovold Date: Thu Mar 9 12:12:09 2023 +0100 firmware: qcom: scm: fix bogus irq error at probe A recent commit added support for an optional interrupt which is only available on some platforms. Stop spamming the logs with bogus error messages on platforms that do not use this new optional resource: qcom_scm firmware:scm: error -ENXIO: IRQ index 0 not found Fixes: 6bf325992236 ("firmware: qcom: scm: Add wait-queue handling logic") Cc: Guru Das Srinagesh Cc: Sibi Sankar Signed-off-by: Johan Hovold Tested-by: Steev Klimaszewski # Thinkpad X13s Acked-by: Guru Das Srinagesh Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230309111209.31606-1-johan+linaro@kernel.org commit ee1d5100c37e7a95af506c7addf018f652545ce6 Author: Manivannan Sadhasivam Date: Wed Mar 8 11:16:30 2023 +0530 arm64: dts: qcom: sm8550: Mark UFS controller as cache coherent The UFS controller on SM8550 supports cache coherency, hence add the "dma-coherent" property to mark it as such. Fixes: 35cf1aaab169 ("arm64: dts: qcom: sm8550: Add UFS host controller and phy nodes") Signed-off-by: Manivannan Sadhasivam Reviewed-by: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308054630.7202-1-manivannan.sadhasivam@linaro.org commit b891251b40d4dc4cfd28341f62f6784c02ad3a78 Author: Brian Masney Date: Tue Mar 7 18:23:40 2023 -0500 arm64: dts: qcom: sa8540p-ride: correct name of remoteproc_nsp0 firmware The cdsp.mbn firmware that's referenced in sa8540p-ride.dts is actually named cdsp0.mbn in the deliverables from Qualcomm. Let's go ahead and correct the name to match what's in Qualcomm's deliverable. Signed-off-by: Brian Masney Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230307232340.2370476-1-bmasney@redhat.com commit 42d0c4bdf753063b6eec55415003184d3ca24f6e Author: Seth Forshee Date: Thu Mar 9 14:39:09 2023 -0600 filelocks: use mount idmapping for setlease permission check A user should be allowed to take out a lease via an idmapped mount if the fsuid matches the mapped uid of the inode. generic_setlease() is checking the unmapped inode uid, causing these operations to be denied. Fix this by comparing against the mapped inode uid instead of the unmapped uid. Fixes: 9caccd41541a ("fs: introduce MOUNT_ATTR_IDMAP") Cc: stable@vger.kernel.org Signed-off-by: Seth Forshee (DigitalOcean) Signed-off-by: Christian Brauner (Microsoft) commit 8ba961d4339c5db0e69ff6627606fe1f34c838e5 Author: Manivannan Sadhasivam Date: Tue Mar 7 21:02:01 2023 +0530 arm64: dts: qcom: sm8450: Mark UFS controller as cache coherent The UFS controller on SM8450 supports cache coherency, hence add the "dma-coherent" property to mark it as such. Fixes: 07fa917a335e ("arm64: dts: qcom: sm8450: add ufs nodes") Signed-off-by: Manivannan Sadhasivam Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230307153201.180626-2-manivannan.sadhasivam@linaro.org commit e607b3c1fa0e1579951acd00f9559a77f97d0927 Author: Manivannan Sadhasivam Date: Tue Mar 7 21:02:00 2023 +0530 arm64: dts: qcom: sm8350: Mark UFS controller as cache coherent The UFS controller on SM8350 supports cache coherency, hence add the "dma-coherent" property to mark it as such. Fixes: 59c7cf814783 ("arm64: dts: qcom: sm8350: Add UFS nodes") Signed-off-by: Manivannan Sadhasivam Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230307153201.180626-1-manivannan.sadhasivam@linaro.org commit 9e5f81f9a6e78ba411117146ecf324d0145ae89a Author: Geert Uytterhoeven Date: Thu Mar 9 08:45:46 2023 +0100 i2c: dev: Fix bus callback return values The i2cdev_{at,de}tach_adapter() callbacks are used for two purposes: 1. As notifier callbacks, when (un)registering I2C adapters created or destroyed after i2c_dev_init(), 2. As bus iterator callbacks, for registering already existing adapters from i2c_dev_init(), and for cleanup. Unfortunately both use cases expect different return values: the former expects NOTIFY_* return codes, while the latter expects zero or error codes, and aborts in case of error. Hence in case 2, as soon as i2cdev_{at,de}tach_adapter() returns (non-zero) NOTIFY_OK, the bus iterator aborts. This causes (a) only the first already existing adapter to be registered, leading to missing /dev/i2c-* entries, and (b) a failure to unregister all but the first I2C adapter during cleanup. Fix this by introducing separate callbacks for the bus iterator, wrapping the notifier functions, and always returning succes. Any errors inside these callback functions are unlikely to happen, and are fatal anyway. Fixes: cddf70d0bce71c2a ("i2c: dev: fix notifier return values") Signed-off-by: Geert Uytterhoeven Reviewed-by: Bartosz Golaszewski Signed-off-by: Wolfram Sang commit 834a9dc46db796f662615a18b8a38dde73f3b804 Author: Uwe Kleine-König Date: Sun Feb 26 23:26:54 2023 +0100 i2c: Convert drivers to new .probe() callback Now that .probe() was changed not to get the id parameter, drivers can be converted back to that with the eventual goal to drop .probe_new(). Implement that for the i2c drivers that are part of the i2c core. Signed-off-by: Uwe Kleine-König Signed-off-by: Wolfram Sang commit 2f2afad9d35ff762028de7497dac60aa32be9f0f Author: Uwe Kleine-König Date: Sun Feb 26 23:26:53 2023 +0100 i2c: mux: Convert all drivers to new .probe() callback Now that .probe() was changed not to get the id parameter, drivers can be converted back to that with the eventual goal to drop .probe_new(). Implement that for the i2c mux drivers. Acked-by: Guenter Roeck Acked-by: Peter Rosin Signed-off-by: Uwe Kleine-König Signed-off-by: Wolfram Sang commit a5982b3971007161b423b39aa843bdb6713a9d44 Author: Krzysztof Kozlowski Date: Thu Mar 2 16:47:24 2023 +0100 arm64: dts: qcom: sm8550: fix LPASS pinctrl slew base address The second LPASS pin controller IO address is supposed to be the MCC range which contains the slew rate registers. The Linux driver then accesses slew rate register with hard-coded offset (0xa000). However the DTS contained the address of slew rate register as the second IO address, thus any reads were effectively pass the memory space and lead to "Internal error: synchronous external aborts" when applying pin configuration. Fixes: 6de7f9c34358 ("arm64: dts: qcom: sm8550: add GPR and LPASS pin controller") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230302154724.856062-1-krzysztof.kozlowski@linaro.org commit 03c835f498b540087244a6757e87dfe7ef10999b Author: Uwe Kleine-König Date: Sun Feb 26 23:26:52 2023 +0100 i2c: Switch .probe() to not take an id parameter Commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() call-back type") introduced a new probe callback to convert i2c init routines to not take an i2c_device_id parameter. Now that all in-tree drivers are converted to the temporary .probe_new() callback, .probe() can be modified to match the desired prototype. Now that .probe() and .probe_new() have the same semantic, they can be defined as members of an anonymous union to save some memory and simplify the core code a bit. Signed-off-by: Uwe Kleine-König Signed-off-by: Wolfram Sang commit 7eafbd40901c2b6f884c022c10bec5c8ec5c6a24 Author: Uwe Kleine-König Date: Sun Feb 26 23:26:51 2023 +0100 media: i2c: ov2685: convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Reviewed-by: Kieran Bingham Acked-by: Hans Verkuil Link: https://lore.kernel.org/lkml/20221121102838.16448-1-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Wolfram Sang commit 79e070c5ee7a3faeb9ab8e1fa270b846a4fa2e56 Author: Uwe Kleine-König Date: Sun Feb 26 23:26:50 2023 +0100 media: i2c: ov5695: convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Reviewed-by: Kieran Bingham Acked-by: Hans Verkuil Link: https://lore.kernel.org/lkml/20221121102705.16092-1-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Wolfram Sang commit e60289897e90801e951a3e172789967c9e2afb7e Author: Uwe Kleine-König Date: Sun Feb 26 23:26:49 2023 +0100 w1: ds2482: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Link: https://lore.kernel.org/lkml/20221118224540.619276-596-uwe@kleine-koenig.org Signed-off-by: Uwe Kleine-König Signed-off-by: Wolfram Sang commit 2e498f35c385654396e94cf12e097522d3973d41 Author: Srinivas Kandagatla Date: Thu Mar 2 11:57:41 2023 +0000 arm64: dts: qcom: sc8280xp-x13s: fix va dmic dai links and routing VA dmics 0, 1, 2 micbias on X13s are connected to WCD MICBIAS1, WCD MICBIAS1 and WCD MICBIAS3 respectively. Reflect this in dt to get dmics working. Also fix dmics to go via VA Macro instead of TX macro to fix device switching. Fixes: 8c1ea87e80b4 ("arm64: dts: qcom: sc8280xp-x13s: Add soundcard support") Signed-off-by: Srinivas Kandagatla Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230302115741.7726-5-srinivas.kandagatla@linaro.org commit 4def7aa377ba1dbe66335ca3ebe3aa5a5bc3fe67 Author: Srinivas Kandagatla Date: Thu Mar 2 11:57:40 2023 +0000 arm64: dts: qcom: sc8280xp-x13s: fix dmic sample rate The version of dmic that is on X13s panel supports clock frequency of range 1 Mhz to 4.8 MHz for normal operation. So correct the existing node to reflect this. Fixes: 8c1ea87e80b4 ("arm64: dts: qcom: sc8280xp-x13s: Add soundcard support") Signed-off-by: Srinivas Kandagatla Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230302115741.7726-4-srinivas.kandagatla@linaro.org commit e43bd22cb377bf4c4e5b12daacaf02f5c24fbb16 Author: Srinivas Kandagatla Date: Thu Mar 2 11:57:39 2023 +0000 arm64: dts: qcom: sc8280xp: fix lpass tx macro clocks Tx macro soundwire clock is for some reason is incorrectly assigned to va macro, fix this and use tx macro clock instead. Fixes: 1749a8ae49a3 ("arm64: dts: qcom: sc8280xp: add SoundWire and LPASS") Signed-off-by: Srinivas Kandagatla Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230302115741.7726-3-srinivas.kandagatla@linaro.org commit 670b7d6569bf439c90d7aac48ec36ee3e3013754 Author: Srinivas Kandagatla Date: Thu Mar 2 11:57:38 2023 +0000 arm64: dts: qcom: sc8280xp: fix rx frame shapping info Some of the SoundWire frameshapping data seems incorrect, fix these values. Fixes: 1749a8ae49a3 ("arm64: dts: qcom: sc8280xp: add SoundWire and LPASS") Signed-off-by: Srinivas Kandagatla Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230302115741.7726-2-srinivas.kandagatla@linaro.org commit 01d93875dafdaaf90bfc782074cae5b4605f3907 Author: Uwe Kleine-König Date: Sun Feb 26 23:26:48 2023 +0100 serial: sc16is7xx: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/lkml/20221118224540.619276-572-uwe@kleine-koenig.org Signed-off-by: Uwe Kleine-König Signed-off-by: Wolfram Sang commit 0b79d5d1e5982bc3b0da9cd3b40ce972a72f2541 Author: Uwe Kleine-König Date: Sun Feb 26 23:26:47 2023 +0100 mtd: maps: pismo: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Acked-by: Richard Weinberger Link: https://lore.kernel.org/lkml/20221118224540.619276-497-uwe@kleine-koenig.org Signed-off-by: Uwe Kleine-König Signed-off-by: Wolfram Sang commit 55e7dddcaf4a55d2f097463cdf5709c3278c6fa9 Author: Uwe Kleine-König Date: Sun Feb 26 23:26:46 2023 +0100 misc: ad525x_dpot-i2c: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/lkml/20221118224540.619276-483-uwe@kleine-koenig.org Signed-off-by: Uwe Kleine-König Signed-off-by: Wolfram Sang commit 6df6fab9320bc9ebdf50136a01e7bf0ee5984c62 Author: Krzysztof Kozlowski Date: Wed Mar 8 13:31:29 2023 +0100 arm64: dts: qcom: sm8450: correct WSA2 assigned clocks The WSA2 assigned-clocks were copied from WSA, but the WSA2 uses its own. Fixes: 14341e76dbc7 ("arm64: dts: qcom: sm8450: add Soundwire and LPASS") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308123129.232642-1-krzysztof.kozlowski@linaro.org commit ecd240875e877d78fd03efbc62292f550872df3f Author: Luca Weiss Date: Wed Mar 8 22:06:03 2023 +0100 ARM: dts: qcom: apq8026-lg-lenok: add missing reserved memory Turns out these two memory regions also need to be avoided, otherwise weird things will happen when Linux tries to use this memory. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308-lenok-reserved-memory-v1-1-b8bf6ff01207@z3ntu.xyz commit 3a43e30b8e2cff245b7d3cb807fb0b4409452bda Merge: b2bda460b1b74 a722511b18268 Author: Dave Airlie Date: Fri Mar 10 05:52:09 2023 +1000 Merge tag 'drm-msm-fixes-2023-03-09' of https://gitlab.freedesktop.org/drm/msm into drm-fixes msm-fixes for v6.3-rc2 - Fix for possible invalid ptr free in submit ioctl syncobj cleanup path. - Synchronize GMU removal in driver teardown path - a5xx preemption fixes - Fix runpm imbalance at unbind - DPU hw catalog fixes: - set DPU_MDP_PERIPH_0_REMOVED for sc8280xp as this is another chipset where the PERIPH_0 block of registers is not there - fix the DPU features supported in QCM2290 by comparing it with the downstream device tree - fix the length of registers in the sc7180_ctl from 0xe4 to 0x1dc - fix the max mixer line width for sm6115 and qcm2290 chipsets in the DPU catalog - fix the scaler version on sm8550, sc8280xp, sm8450, sm8250, sm8350 and sm6115. This was incorrectly populated on the SW version of the scaler library and not the scaler HW version - Drop dim layer support for msm8998 as its not indicated to be supported in the downstream DTSI - fix the DPU_CLK_CTRL bits for msm 8998 sspp blocks - Use DPU_CLK_CTRL_DMA* prefix instead of DPU_CLK_CTRL_CURSOR* for all chipsets for the DMA sspp blocks - fix the ping-pong block base address for sc7280 in the DPU HW catalog - Fix stack corruption issue in the dpu_hw_ctl_setup_blendstage() function as it was causing a negative left shift by protecting against an invalid index - Clear the DSPP reservations in dpu_rm_release(). This was missed out and as as result the DSPP was not released from the resource manager global state. Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGvH+VH_Wx3mFMG51CMnoiU06CM-+-WMhM73M42Qx7Bp4A@mail.gmail.com commit b2bda460b1b744a3835ce9d291360b6185e7e305 Author: Dave Airlie Date: Fri Mar 10 05:24:43 2023 +1000 mailmap: add mailmap entries for Faith. Reviewed-by: Faith Ekstrand Signed-off-by: Dave Airlie commit 44889ba56cbb3d51154660ccd15818bc77276696 Merge: 2653e3fe33f41 67eeadf2f9532 Author: Linus Torvalds Date: Thu Mar 9 10:56:58 2023 -0800 Merge tag 'net-6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from netfilter and bpf. Current release - regressions: - core: avoid skb end_offset change in __skb_unclone_keeptruesize() - sched: - act_connmark: handle errno on tcf_idr_check_alloc - flower: fix fl_change() error recovery path - ieee802154: prevent user from crashing the host Current release - new code bugs: - eth: bnxt_en: fix the double free during device removal - tools: ynl: - fix enum-as-flags in the generic CLI - fully inherit attrs in subsets - re-license uniformly under GPL-2.0 or BSD-3-clause Previous releases - regressions: - core: use indirect calls helpers for sk_exit_memory_pressure() - tls: - fix return value for async crypto - avoid hanging tasks on the tx_lock - eth: ice: copy last block omitted in ice_get_module_eeprom() Previous releases - always broken: - core: avoid double iput when sock_alloc_file fails - af_unix: fix struct pid leaks in OOB support - tls: - fix possible race condition - fix device-offloaded sendpage straddling records - bpf: - sockmap: fix an infinite loop error - test_run: fix &xdp_frame misplacement for LIVE_FRAMES - fix resolving BTF_KIND_VAR after ARRAY, STRUCT, UNION, PTR - netfilter: tproxy: fix deadlock due to missing BH disable - phylib: get rid of unnecessary locking - eth: bgmac: fix *initial* chip reset to support BCM5358 - eth: nfp: fix csum for ipsec offload - eth: mtk_eth_soc: fix RX data corruption issue Misc: - usb: qmi_wwan: add telit 0x1080 composition" * tag 'net-6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (64 commits) tools: ynl: fix enum-as-flags in the generic CLI tools: ynl: move the enum classes to shared code net: avoid double iput when sock_alloc_file fails af_unix: fix struct pid leaks in OOB support eth: fealnx: bring back this old driver net: dsa: mt7530: permit port 5 to work without port 6 on MT7621 SoC net: microchip: sparx5: fix deletion of existing DSCP mappings octeontx2-af: Unlock contexts in the queue context cache in case of fault detection net/smc: fix fallback failed while sendmsg with fastopen ynl: re-license uniformly under GPL-2.0 OR BSD-3-Clause mailmap: update entries for Stephen Hemminger mailmap: add entry for Maxim Mikityanskiy nfc: change order inside nfc_se_io error path ethernet: ice: avoid gcc-9 integer overflow warning ice: don't ignore return codes in VSI related code ice: Fix DSCP PFC TLV creation net: usb: qmi_wwan: add Telit 0x1080 composition net: usb: cdc_mbim: avoid altsetting toggling for Telit FE990 netfilter: conntrack: adopt safer max chain length net: tls: fix device-offloaded sendpage straddling records ... commit 2653e3fe33f411227296552b2e5f9c2640924900 Merge: c70e9b8ea3936 8ae2f2b0a2841 Author: Linus Torvalds Date: Thu Mar 9 10:17:23 2023 -0800 Merge tag 'for-linus-2023030901' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Benjamin Tissoires: - fix potential out of bound write of zeroes in HID core with a specially crafted uhid device (Lee Jones) - fix potential use-after-free in work function in intel-ish-hid (Reka Norman) - selftests config fixes (Benjamin Tissoires) - few device small fixes and support * tag 'for-linus-2023030901' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: intel-ish-hid: ipc: Fix potential use-after-free in work function HID: logitech-hidpp: Add support for Logitech MX Master 3S mouse HID: cp2112: Fix driver not registering GPIO IRQ chip as threaded selftest: hid: fix hid_bpf not set in config HID: uhid: Over-ride the default maximum data buffer value with our own HID: core: Provide new max_buffer_size attribute to over-ride the default commit c70e9b8ea3936a60e2a696dd0ed9bb57885f6bec Merge: 573b22ccb7ce9 e36a82bebbf7d Author: Linus Torvalds Date: Thu Mar 9 10:08:46 2023 -0800 Merge tag 'm68k-for-v6.3-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k fixes from Geert Uytterhoeven: - Fix systems with memory at end of 32-bit address space - Fix initrd on systems where memory does not start at address zero - Fix 68030 handling of bus errors for addresses in exception tables * tag 'm68k-for-v6.3-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: Only force 030 bus error if PC not in exception table m68k: mm: Move initrd phys_to_virt handling after paging_init() m68k: mm: Fix systems with memory at end of 32-bit address space commit 573b22ccb7ce9ab7f0539a2e11a9d3609a8783f5 Author: Al Viro Date: Mon Mar 6 01:20:30 2023 +0000 sh: sanitize the flags on sigreturn We fetch %SR value from sigframe; it might have been modified by signal handler, so we can't trust it with any bits that are not modifiable in user mode. Signed-off-by: Al Viro Cc: Rich Felker Signed-off-by: Linus Torvalds commit fa780334a8c392d959ae05eb19f2410b3a1e6cb0 Author: Jens Axboe Date: Thu Mar 9 09:51:13 2023 -0700 io_uring: silence variable ‘prev’ set but not used warning If io_uring.o is built with W=1, it triggers a warning: io_uring/io_uring.c: In function ‘__io_submit_flush_completions’: io_uring/io_uring.c:1502:40: warning: variable ‘prev’ set but not used [-Wunused-but-set-variable] 1502 | struct io_wq_work_node *node, *prev; | ^~~~ which is due to the wq_list_for_each() iterator always keeping a 'prev' variable. Most users need this to remove an entry from a list, for example, but __io_submit_flush_completions() never does that. Add a basic helper that doesn't track prev instead, and use that in that function. Reported-by: Vincenzo Palazzo Reviewed-by: Vincenzo Palazzo Signed-off-by: Jens Axboe commit 38ed310c22e7a0fc978b1f8292136a4a4a8b3051 Author: Roman Gushchin Date: Wed Mar 8 14:26:02 2023 -0800 firmware: xilinx: don't make a sleepable memory allocation from an atomic context The following issue was discovered using lockdep: [ 6.691371] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:209 [ 6.694602] in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 1, name: swapper/0 [ 6.702431] 2 locks held by swapper/0/1: [ 6.706300] #0: ffffff8800f6f188 (&dev->mutex){....}-{3:3}, at: __device_driver_lock+0x4c/0x90 [ 6.714900] #1: ffffffc009a2abb8 (enable_lock){....}-{2:2}, at: clk_enable_lock+0x4c/0x140 [ 6.723156] irq event stamp: 304030 [ 6.726596] hardirqs last enabled at (304029): [] _raw_spin_unlock_irqrestore+0xc0/0xd0 [ 6.736142] hardirqs last disabled at (304030): [] clk_enable_lock+0xfc/0x140 [ 6.744742] softirqs last enabled at (303958): [] _stext+0x4f0/0x894 [ 6.752655] softirqs last disabled at (303951): [] irq_exit+0x238/0x280 [ 6.760744] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G U 5.15.36 #2 [ 6.768048] Hardware name: xlnx,zynqmp (DT) [ 6.772179] Call trace: [ 6.774584] dump_backtrace+0x0/0x300 [ 6.778197] show_stack+0x18/0x30 [ 6.781465] dump_stack_lvl+0xb8/0xec [ 6.785077] dump_stack+0x1c/0x38 [ 6.788345] ___might_sleep+0x1a8/0x2a0 [ 6.792129] __might_sleep+0x6c/0xd0 [ 6.795655] kmem_cache_alloc_trace+0x270/0x3d0 [ 6.800127] do_feature_check_call+0x100/0x220 [ 6.804513] zynqmp_pm_invoke_fn+0x8c/0xb0 [ 6.808555] zynqmp_pm_clock_getstate+0x90/0xe0 [ 6.813027] zynqmp_pll_is_enabled+0x8c/0x120 [ 6.817327] zynqmp_pll_enable+0x38/0xc0 [ 6.821197] clk_core_enable+0x144/0x400 [ 6.825067] clk_core_enable+0xd4/0x400 [ 6.828851] clk_core_enable+0xd4/0x400 [ 6.832635] clk_core_enable+0xd4/0x400 [ 6.836419] clk_core_enable+0xd4/0x400 [ 6.840203] clk_core_enable+0xd4/0x400 [ 6.843987] clk_core_enable+0xd4/0x400 [ 6.847771] clk_core_enable+0xd4/0x400 [ 6.851555] clk_core_enable_lock+0x24/0x50 [ 6.855683] clk_enable+0x24/0x40 [ 6.858952] fclk_probe+0x84/0xf0 [ 6.862220] platform_probe+0x8c/0x110 [ 6.865918] really_probe+0x110/0x5f0 [ 6.869530] __driver_probe_device+0xcc/0x210 [ 6.873830] driver_probe_device+0x64/0x140 [ 6.877958] __driver_attach+0x114/0x1f0 [ 6.881828] bus_for_each_dev+0xe8/0x160 [ 6.885698] driver_attach+0x34/0x50 [ 6.889224] bus_add_driver+0x228/0x300 [ 6.893008] driver_register+0xc0/0x1e0 [ 6.896792] __platform_driver_register+0x44/0x60 [ 6.901436] fclk_driver_init+0x1c/0x28 [ 6.905220] do_one_initcall+0x104/0x590 [ 6.909091] kernel_init_freeable+0x254/0x2bc [ 6.913390] kernel_init+0x24/0x130 [ 6.916831] ret_from_fork+0x10/0x20 Fix it by passing the GFP_ATOMIC gfp flag for the corresponding memory allocation. Fixes: acfdd18591ea ("firmware: xilinx: Use hash-table for api feature check") Cc: stable Signed-off-by: Roman Gushchin Cc: Amit Sunil Dhamne Cc: Michal Simek Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20230308222602.123866-1-roman.gushchin@linux.dev Signed-off-by: Greg Kroah-Hartman commit 18365ebf23f3e713e5dd8e295c9a639295250f3c Author: Samuel Thibault Date: Mon Mar 6 10:49:21 2023 +0100 tty: vt: protect KD_FONT_OP_GET_TALL from unbound access In ioctl(KD_FONT_OP_GET_TALL), userland tells through op->height which vpitch should be used to copy over the font. In con_font_get, we were not checking that it is within the maximum height value, and thus userland could make the vc->vc_sw->con_font_get(vc, &font, vpitch); call possibly overflow the allocated max_font_size bytes, and the copy_to_user(op->data, font.data, c) call possibly read out of that allocated buffer. By checking vpitch against max_font_height, the max_font_size buffer will always be large enough for the vc->vc_sw->con_font_get(vc, &font, vpitch) call (since we already prevent loading a font larger than that), and c = (font.width+7)/8 * vpitch * font.charcount will always remain below max_font_size. Fixes: 24d69384bcd3 ("VT: Add KD_FONT_OP_SET/GET_TALL operations") Reported-by: syzbot+3af17071816b61e807ed@syzkaller.appspotmail.com Signed-off-by: Samuel Thibault Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20230306094921.tik5ewne4ft6mfpo@begin Signed-off-by: Greg Kroah-Hartman commit b6a7bac184472b5b79286a71a61c2f16ea4e86ad Author: Johan Hovold Date: Tue Mar 7 17:44:05 2023 +0100 serial: qcom-geni: drop bogus uart_write_wakeup() Drop the bogus uart_write_wakeup() from when setting up a new DMA transfer, which does not free up any more space in the ring buffer. Any pending writers will be woken up when the transfer completes. Cc: stable Signed-off-by: Johan Hovold Reviewed-by: Douglas Anderson Reviewed-by: Srinivas Kandagatla Tested-by: Srinivas Kandagatla Reviewed-by: Andrew Halaney Tested-by: Andrew Halaney # sa8540p-ride Link: https://lore.kernel.org/r/20230307164405.14218-5-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman commit 97820780b723197d1b472f2bd39fd8593b5d4edc Author: Johan Hovold Date: Tue Mar 7 17:44:04 2023 +0100 serial: qcom-geni: fix mapping of empty DMA buffer Make sure that there is data in the ring buffer before trying to set up a zero-length DMA transfer. This specifically fixes the following warning when unmapping the empty buffer on the sc8280xp-crd: WARNING: CPU: 0 PID: 138 at drivers/iommu/dma-iommu.c:1046 iommu_dma_unmap_page+0xbc/0xd8 ... Call trace: iommu_dma_unmap_page+0xbc/0xd8 dma_unmap_page_attrs+0x30/0x1c8 geni_se_tx_dma_unprep+0x28/0x38 qcom_geni_serial_isr+0x358/0x75c Fixes: 2aaa43c70778 ("tty: serial: qcom-geni-serial: add support for serial engine DMA") Cc: stable Cc: Bartosz Golaszewski Signed-off-by: Johan Hovold Reviewed-by: Douglas Anderson Reviewed-by: Srinivas Kandagatla Tested-by: Srinivas Kandagatla Reviewed-by: Andrew Halaney Tested-by: Andrew Halaney # sa8540p-ride Link: https://lore.kernel.org/r/20230307164405.14218-4-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman commit 95fcfc08537763bff21ec8c450d3d3cb1a60ad09 Author: Johan Hovold Date: Tue Mar 7 17:44:03 2023 +0100 serial: qcom-geni: fix DMA mapping leak on shutdown Fix what appears to be a copy-paste error that can lead to a leaked DMA mapping on close() and failure to restart TX after the port is reopened. Note that rx_dma_addr is generally NULL when qcom_geni_serial_stop_tx_dma() is called as part of shutdown() (but tx_dma_addr need not be). Fixes: 2aaa43c70778 ("tty: serial: qcom-geni-serial: add support for serial engine DMA") Cc: stable Cc: Bartosz Golaszewski Signed-off-by: Johan Hovold Reviewed-by: Douglas Anderson Reviewed-by: Srinivas Kandagatla Tested-by: Srinivas Kandagatla Reviewed-by: Andrew Halaney Tested-by: Andrew Halaney # sa8540p-ride Link: https://lore.kernel.org/r/20230307164405.14218-3-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman commit 9aff74cc4e9eb841dde5fd009ed7ddca5db40e68 Author: Johan Hovold Date: Tue Mar 7 17:44:02 2023 +0100 serial: qcom-geni: fix console shutdown hang A recent commit added back the calls top stop tx and rx to shutdown() which had previously been removed by commit e83766334f96 ("tty: serial: qcom_geni_serial: No need to stop tx/rx on UART shutdown") in order to be able to use kgdb after stopping the getty. Not only did this again break kgdb, but it also broke serial consoles more generally by hanging TX when stopping the getty during reboot. The underlying problem has been there since the driver was first merged and fixing it is going to be a bit involved so simply stop calling the broken stop functions during shutdown for consoles for now. Fixes: d8aca2f96813 ("tty: serial: qcom-geni-serial: stop operations in progress at shutdown") Cc: stable Cc: Bartosz Golaszewski Signed-off-by: Johan Hovold Reviewed-by: Douglas Anderson Reviewed-by: Srinivas Kandagatla Tested-by: Srinivas Kandagatla Reviewed-by: Andrew Halaney Tested-by: Andrew Halaney # sa8540p-ride Link: https://lore.kernel.org/r/20230307164405.14218-2-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman commit 03b3d6be73e81ddb7c2930d942cdd17f4cfd5ba5 Author: Jens Axboe Date: Wed Mar 8 09:26:13 2023 -0700 io_uring/uring_cmd: ensure that device supports IOPOLL It's possible for a file type to support uring commands, but not pollable ones. Hence before issuing one of those, we should check that it is supported and error out upfront if it isn't. Cc: stable@vger.kernel.org Fixes: 5756a3a7e713 ("io_uring: add iopoll infrastructure for io_uring_cmd") Link: https://github.com/axboe/liburing/issues/816 Reviewed-by: Kanchan Joshi Signed-off-by: Jens Axboe commit 1a5ecc73b2bfeffe036212d4a6bfacee053ab0a1 Author: Saravana Kannan Date: Wed Mar 1 18:35:09 2023 -0800 serdev: Set fwnode for serdev devices This allow fw_devlink to do dependency tracking for serdev devices. Reported-by: Florian Fainelli Link: https://lore.kernel.org/lkml/03b70a8a-0591-f28b-a567-9d2f736f17e5@gmail.com/ Cc: Stefan Wahren Signed-off-by: Saravana Kannan Tested-by: Stefan Wahren Tested-by: Florian Fainelli Link: https://lore.kernel.org/r/20230302023509.319903-1-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 1be6f2b15f902c02e055ae0b419ca789200473c9 Author: Alexander Sverdlin Date: Thu Mar 9 14:43:02 2023 +0100 tty: serial: fsl_lpuart: fix race on RX DMA shutdown From time to time DMA completion can come in the middle of DMA shutdown: : : lpuart32_shutdown() lpuart_dma_shutdown() del_timer_sync() lpuart_dma_rx_complete() lpuart_copy_rx_to_tty() mod_timer() lpuart_dma_rx_free() When the timer fires a bit later, sport->dma_rx_desc is NULL: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000004 pc : lpuart_copy_rx_to_tty+0xcc/0x5bc lr : lpuart_timer_func+0x1c/0x2c Call trace: lpuart_copy_rx_to_tty lpuart_timer_func call_timer_fn __run_timers.part.0 run_timer_softirq __do_softirq __irq_exit_rcu irq_exit handle_domain_irq gic_handle_irq call_on_irq_stack do_interrupt_handler ... To fix this fold del_timer_sync() into lpuart_dma_rx_free() after dmaengine_terminate_sync() to make sure timer will not be re-started in lpuart_copy_rx_to_tty() <= lpuart_dma_rx_complete(). Fixes: 4a8588a1cf86 ("serial: fsl_lpuart: delete timer on shutdown") Cc: stable Signed-off-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20230309134302.74940-2-alexander.sverdlin@siemens.com Signed-off-by: Greg Kroah-Hartman commit 5d943b5d69c032de7ce9cd625ac083a5c277b9c5 Author: Kumaravel Thiagarajan Date: Sun Mar 5 20:21:24 2023 +0530 serial: 8250_pci1xxxx: Disable SERIAL_8250_PCI1XXXX config by default Commit 32bb477fa7bf ("serial: 8250_pci1xxxx: Add driver for quad-uart support") made the SERIAL_8250_PCI1XXXX driver enabled when SERIAL_8250 is enabled, disable it as this driver does not need to be enabled by default Fixes: 32bb477fa7bf ("serial: 8250_pci1xxxx: Add driver for quad-uart support") Reported-by: Linus Torvalds Link: https://lore.kernel.org/lkml/CAHk-=whhFCeeuo6vTEmNSx6S-KKkugxgzN_W5Z6v-9yH9gc3Zw@mail.gmail.com/ Signed-off-by: Kumaravel Thiagarajan Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230305145124.13444-1-kumaravel.thiagarajan@microchip.com Signed-off-by: Greg Kroah-Hartman commit 6e01f9a594ee0f69fb52cc8d11971612b4817f0b Author: Johan Hovold Date: Mon Feb 27 09:50:46 2023 +0100 serial: 8250_fsl: fix handle_irq locking The 8250 handle_irq callback is not just called from the interrupt handler but also from a timer callback when polling (e.g. for ports without an interrupt line). Consequently the callback must explicitly disable interrupts to avoid a potential deadlock with another interrupt in polled mode. Fix up the two paths in the freescale callback that failed to re-enable interrupts when polling. Fixes: 853a9ae29e97 ("serial: 8250: fix handle_irq locking") Cc: stable@vger.kernel.org # 5.13 Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/Y/xYzqp4ogmOF5t0@kili Signed-off-by: Johan Hovold Acked-by: Jiri Slaby Link: https://lore.kernel.org/r/20230227085046.24282-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 32e293be736b853f168cd065d9cbc1b0c69f545d 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") Cc: stable@vger.kernel.org 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 f8086d1a65ac693e3fd863128352b4b11ee7324d Author: Randy Dunlap Date: Sat Feb 25 21:39:53 2023 -0800 serial: 8250: ASPEED_VUART: 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: 8d310c9107a2 ("drivers/tty/serial/8250: Make Aspeed VUART SIRQ polarity configurable") Cc: stable Signed-off-by: Randy Dunlap Cc: Greg Kroah-Hartman Cc: Oskar Senft Cc: linux-serial@vger.kernel.org Link: https://lore.kernel.org/r/20230226053953.4681-9-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 2411fd94ceaa6e11326e95d6ebf876cbfed28d23 Author: Sherry Sun Date: Thu Feb 23 17:39:41 2023 +0800 tty: serial: fsl_lpuart: skip waiting for transmission complete when UARTCTRL_SBK is asserted According to LPUART RM, Transmission Complete Flag becomes 0 if queuing a break character by writing 1 to CTRL[SBK], so here need to skip waiting for transmission complete when UARTCTRL_SBK is asserted, otherwise the kernel may stuck here. And actually set_termios() adds transmission completion waiting to avoid data loss or data breakage when changing the baud rate, but we don't need to worry about this when queuing break characters. Signed-off-by: Sherry Sun Cc: stable Link: https://lore.kernel.org/r/20230223093941.31790-1-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit 2d638be71155b2e036aca1966b6129e2d661e91f Author: Tom Rix Date: Sun Feb 26 12:38:46 2023 -0500 Revert "tty: serial: fsl_lpuart: adjust SERIAL_FSL_LPUART_CONSOLE config dependency" This reverts commit 5779a072c248db7a40cfd0f5ea958097fd1d9a30. This results in a link error of ld: drivers/tty/serial/earlycon.o: in function `parse_options': drivers/tty/serial/earlycon.c:99: undefined reference to `uart_parse_earlycon' When the config is in this state CONFIG_SERIAL_CORE=m CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_EARLYCON=y CONFIG_SERIAL_FSL_LPUART=m CONFIG_SERIAL_FSL_LPUART_CONSOLE=y Fixes: 5779a072c248 ("tty: serial: fsl_lpuart: adjust SERIAL_FSL_LPUART_CONSOLE config dependency") Cc: stable Signed-off-by: Tom Rix Reviewed-by: Randy Dunlap Acked-by: Jiri Slaby Link: https://lore.kernel.org/r/20230226173846.236691-1-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit 3993f4f456309580445bb515fbc609d995b6a3ae Author: Yue Hu Date: Mon Mar 6 15:55:27 2023 +0800 erofs: use wrapper i_blocksize() in erofs_file_read_iter() linux/fs.h has a wrapper for this operation. Signed-off-by: Yue Hu Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20230306075527.1338-1-zbestahu@gmail.com Signed-off-by: Gao Xiang commit 9ff471800b74f5f952c7e75a0355f1d30ee2b046 Author: Gao Xiang Date: Thu Mar 9 13:31:48 2023 +0800 erofs: get rid of a useless DBG_BUGON `err` could be -EINTR and it should not be the case. Actually such DBG_BUGON is useless. Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20230309053148.9223-2-hsiangkao@linux.alibaba.com Signed-off-by: Gao Xiang commit 647dd2c3f0e16b71a1a77897d038164d48eea154 Author: Gao Xiang Date: Thu Mar 9 13:31:47 2023 +0800 erofs: Revert "erofs: fix kvcalloc() misuse with __GFP_NOFAIL" Let's revert commit 12724ba38992 ("erofs: fix kvcalloc() misuse with __GFP_NOFAIL") since kvmalloc() already supports __GFP_NOFAIL in commit a421ef303008 ("mm: allow !GFP_KERNEL allocations for kvmalloc"). So the original fix was wrong. Actually there was some issue as [1] discussed, so before that mm fix is landed, the warn could still happen but applying this commit first will cause less. [1] https://lore.kernel.org/r/20230305053035.1911-1-hsiangkao@linux.alibaba.com Fixes: 12724ba38992 ("erofs: fix kvcalloc() misuse with __GFP_NOFAIL") Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20230309053148.9223-1-hsiangkao@linux.alibaba.com Signed-off-by: Gao Xiang commit d9a02e016aaf5a57fb44e9a5e6da8ccd3b9e2e70 Author: Mike Snitzer Date: Wed Mar 8 14:39:54 2023 -0500 dm crypt: avoid accessing uninitialized tasklet When neither "no_read_workqueue" nor "no_write_workqueue" are enabled, tasklet_trylock() in crypt_dec_pending() may still return false due to an uninitialized state, and dm-crypt will unnecessarily do io completion in io_queue workqueue instead of current context. Fix this by adding an 'in_tasklet' flag to dm_crypt_io struct and initialize it to false in crypt_io_init(). Set this flag to true in kcryptd_queue_crypt() before calling tasklet_schedule(). If set crypt_dec_pending() will punt io completion to a workqueue. This also nicely avoids the tasklet_trylock/unlock hack when tasklets aren't in use. Fixes: 8e14f610159d ("dm crypt: do not call bio_endio() from the dm-crypt tasklet") Cc: stable@vger.kernel.org Reported-by: Hou Tao Suggested-by: Ignat Korchagin Reviewed-by: Ignat Korchagin Signed-off-by: Mike Snitzer commit 8f121dfb15f7b4ab345992ce96003eb63fd608f4 Author: Gao Xiang Date: Sun Mar 5 21:44:55 2023 +0800 erofs: fix wrong kunmap when using LZMA on HIGHMEM platforms As the call trace shown, the root cause is kunmap incorrect pages: BUG: kernel NULL pointer dereference, address: 00000000 CPU: 1 PID: 40 Comm: kworker/u5:0 Not tainted 6.2.0-rc5 #4 Workqueue: erofs_worker z_erofs_decompressqueue_work EIP: z_erofs_lzma_decompress+0x34b/0x8ac z_erofs_decompress+0x12/0x14 z_erofs_decompress_queue+0x7e7/0xb1c z_erofs_decompressqueue_work+0x32/0x60 process_one_work+0x24b/0x4d8 ? process_one_work+0x1a4/0x4d8 worker_thread+0x14c/0x3fc kthread+0xe6/0x10c ? rescuer_thread+0x358/0x358 ? kthread_complete_and_exit+0x18/0x18 ret_from_fork+0x1c/0x28 ---[ end trace 0000000000000000 ]--- The bug is trivial and should be fixed now. It has no impact on !HIGHMEM platforms. Fixes: 622ceaddb764 ("erofs: lzma compression support") Cc: # 5.16+ Reviewed-by: Yue Hu Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20230305134455.88236-1-hsiangkao@linux.alibaba.com commit a279adedbb5206ccadb6b2817838cbb1c834133d Author: Yangtao Li Date: Fri Mar 3 14:37:31 2023 +0800 erofs: mark z_erofs_lzma_init/erofs_pcpubuf_init w/ __init They are used during the erofs module init phase. Let's mark it as __init like any other function. Signed-off-by: Yangtao Li Reviewed-by: Yue Hu Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20230303063731.66760-1-frank.li@vivo.com Signed-off-by: Gao Xiang commit 82f5332d3b9872ab5b287e85c57b76d8bb640cd1 Author: Ziyang Huang Date: Tue Feb 21 18:30:04 2023 +0800 usb: dwc2: drd: fix inconsistent mode if role-switch-default-mode="host" Some boards might use USB-A female connector for USB ports, however, the port could be connected to a dual-mode USB controller, making it also behaves as a peripheral device if male-to-male cable is connected. In this case, the dts looks like this: &usb0 { status = "okay"; dr_mode = "otg"; usb-role-switch; role-switch-default-mode = "host"; }; After boot, dwc2_ovr_init() sets GOTGCTL to GOTGCTL_AVALOVAL and call dwc2_force_mode() with parameter host=false, which causes inconsistent mode - The hardware is in peripheral mode while the kernel status is in host mode. What we can do now is to call dwc2_drd_role_sw_set() to switch to device mode, and everything should work just fine now, even switching back to none(default) mode afterwards. Fixes: e14acb876985 ("usb: dwc2: drd: add role-switch-default-node support") Cc: stable Signed-off-by: Ziyang Huang Tested-by: Fabrice Gasnier Acked-by: Minas Harutyunyan Reviewed-by: Amelie Delaunay Link: https://lore.kernel.org/r/SG2PR01MB204837BF68EDB0E343D2A375C9A59@SG2PR01MB2048.apcprd01.prod.exchangelabs.com Signed-off-by: Greg Kroah-Hartman commit 92771cdd90de64b15e65f3c88d6c6199bd5f33f5 Author: William Qiu Date: Tue Mar 7 10:46:46 2023 +0800 mmc: dw_mmc-starfive: Fix initialization of prev_err Fix a bug by making sure prev_err doesn't get used when being uninitialized. Signed-off-by: William Qiu Reported-by: Dan Carpenter Reviewed-by: Emil Renner Berthing Fixes: 9e622229bbf4 ("mmc: starfive: Add sdio/emmc driver support") Link: https://lore.kernel.org/r/20230307024646.10216-3-william.qiu@starfivetech.com Signed-off-by: Ulf Hansson commit 11440da77d6020831ee6f9ce4551b545dea789ee Author: Francesco Dolcini Date: Mon Mar 6 17:27:51 2023 +0100 mmc: sdhci_am654: lower power-on failed message severity Lower the power-on failed message severity from warn to info when the controller does not power-up. It's normal to have this situation when the SD card slot is empty, therefore we should not warn the user about it. Fixes: 7ca0f166f5b2 ("mmc: sdhci_am654: Add workaround for card detect debounce timer") Signed-off-by: Francesco Dolcini Acked-by: Adrian Hunter Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230306162751.163369-1-francesco@dolcini.it Signed-off-by: Ulf Hansson commit 094f391013ba9cc77b4b1ae1617f0a832e598d67 Author: Daniel Scally Date: Wed Mar 8 16:52:13 2023 +0000 docs: usb: Add documentation for the UVC Gadget The UVC Gadget function has become quite complex, but documentation for it is fairly sparse. Add some more detailed documentation to improve the situation. Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230308165213.139315-1-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit abfc4fa28f0160df61c7149567da4f6494dfb488 Author: Xu Yang Date: Thu Feb 16 11:15:15 2023 +0800 usb: typec: tcpm: fix warning when handle discover_identity message Since both source and sink device can send discover_identity message in PD3, kernel may dump below warning: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 169 at drivers/usb/typec/tcpm/tcpm.c:1446 tcpm_queue_vdm+0xe0/0xf0 Modules linked in: CPU: 0 PID: 169 Comm: 1-0050 Not tainted 6.1.1-00038-g6a3c36cf1da2-dirty #567 Hardware name: NXP i.MX8MPlus EVK board (DT) pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : tcpm_queue_vdm+0xe0/0xf0 lr : tcpm_queue_vdm+0x2c/0xf0 sp : ffff80000c19bcd0 x29: ffff80000c19bcd0 x28: 0000000000000001 x27: ffff0000d11c8ab8 x26: ffff0000d11cc000 x25: 0000000000000000 x24: 00000000ff008081 x23: 0000000000000001 x22: 00000000ff00a081 x21: ffff80000c19bdbc x20: 0000000000000000 x19: ffff0000d11c8080 x18: ffffffffffffffff x17: 0000000000000000 x16: 0000000000000000 x15: ffff0000d716f580 x14: 0000000000000001 x13: ffff0000d716f507 x12: 0000000000000001 x11: 0000000000000000 x10: 0000000000000020 x9 : 00000000000ee098 x8 : 00000000ffffffff x7 : 000000000000001c x6 : ffff0000d716f580 x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000 x2 : ffff80000c19bdbc x1 : 00000000ff00a081 x0 : 0000000000000004 Call trace: tcpm_queue_vdm+0xe0/0xf0 tcpm_pd_rx_handler+0x340/0x1ab0 kthread_worker_fn+0xcc/0x18c kthread+0x10c/0x110 ret_from_fork+0x10/0x20 ---[ end trace 0000000000000000 ]--- Below sequences may trigger this warning: tcpm_send_discover_work(work) tcpm_send_vdm(port, USB_SID_PD, CMD_DISCOVER_IDENT, NULL, 0); tcpm_queue_vdm(port, header, data, count); port->vdm_state = VDM_STATE_READY; vdm_state_machine_work(work); <-- received discover_identity from partner vdm_run_state_machine(port); port->vdm_state = VDM_STATE_SEND_MESSAGE; mod_vdm_delayed_work(port, x); tcpm_pd_rx_handler(work); tcpm_pd_data_request(port, msg); tcpm_handle_vdm_request(port, msg->payload, cnt); tcpm_queue_vdm(port, response[0], &response[1], rlen - 1); --> WARN_ON(port->vdm_state > VDM_STATE_DONE); For this case, the state machine could still send out discover identity message later if we skip current discover_identity message. So we should handle the received message firstly and override the pending discover_identity message without warning in this case. Then, a delayed send_discover work will send discover_identity message again. Fixes: e00943e91678 ("usb: typec: tcpm: PD3.0 sinks can send Discover Identity even in device mode") cc: Signed-off-by: Xu Yang Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230216031515.4151117-1-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman commit a826492fc9dfe32afd70fff93955ae8174bbf14b Author: Xu Yang Date: Wed Feb 15 13:49:51 2023 +0800 usb: typec: tcpm: fix create duplicate source-capabilities file The kernel will dump in the below cases: sysfs: cannot create duplicate filename '/devices/virtual/usb_power_delivery/pd1/source-capabilities' 1. After soft reset has completed, an Explicit Contract negotiation occurs. The sink device will receive source capabilitys again. This will cause a duplicate source-capabilities file be created. 2. Power swap twice on a device that is initailly sink role. This will unregister existing capabilities when above cases occurs. Fixes: 8203d26905ee ("usb: typec: tcpm: Register USB Power Delivery Capabilities") cc: Signed-off-by: Xu Yang Reviewed-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230215054951.238394-1-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman commit 6c67ed9ad9b83e453e808f9b31a931a20a25629b Author: Alvin Šipraga Date: Thu Mar 2 17:36:47 2023 +0100 usb: gadget: u_audio: don't let userspace block driver unbind In the unbind callback for f_uac1 and f_uac2, a call to snd_card_free() via g_audio_cleanup() will disconnect the card and then wait for all resources to be released, which happens when the refcount falls to zero. Since userspace can keep the refcount incremented by not closing the relevant file descriptor, the call to unbind may block indefinitely. This can cause a deadlock during reboot, as evidenced by the following blocked task observed on my machine: task:reboot state:D stack:0 pid:2827 ppid:569 flags:0x0000000c Call trace: __switch_to+0xc8/0x140 __schedule+0x2f0/0x7c0 schedule+0x60/0xd0 schedule_timeout+0x180/0x1d4 wait_for_completion+0x78/0x180 snd_card_free+0x90/0xa0 g_audio_cleanup+0x2c/0x64 afunc_unbind+0x28/0x60 ... kernel_restart+0x4c/0xac __do_sys_reboot+0xcc/0x1ec __arm64_sys_reboot+0x28/0x30 invoke_syscall+0x4c/0x110 ... The issue can also be observed by opening the card with arecord and then stopping the process through the shell before unbinding: # arecord -D hw:UAC2Gadget -f S32_LE -c 2 -r 48000 /dev/null Recording WAVE '/dev/null' : Signed 32 bit Little Endian, Rate 48000 Hz, Stereo ^Z[1]+ Stopped arecord -D hw:UAC2Gadget -f S32_LE -c 2 -r 48000 /dev/null # echo gadget.0 > /sys/bus/gadget/drivers/configfs-gadget/unbind (observe that the unbind command never finishes) Fix the problem by using snd_card_free_when_closed() instead, which will still disconnect the card as desired, but defer the task of freeing the resources to the core once userspace closes its file descriptor. Fixes: 132fcb460839 ("usb: gadget: Add Audio Class 2.0 Driver") Cc: stable@vger.kernel.org Signed-off-by: Alvin Šipraga Reviewed-by: Ruslan Bilovol Reviewed-by: John Keeping Link: https://lore.kernel.org/r/20230302163648.3349669-1-alvin@pqrs.dk Signed-off-by: Greg Kroah-Hartman commit f7c13cb48e85538709850589b496c4ddb3d3898e Author: Alexander Stein Date: Thu Feb 23 08:39:20 2023 +0100 usb: misc: onboard-hub: add support for Microchip USB2517 USB 2.0 hub Add support for Microchip USB2517 USB 2.0 hub to the onboard usb hub driver. Adopt the generic usb-device compatible ("usbVID,PID"). This hub has the same reset timings as USB2514, so reuse that one. There is also an USB2517I which just has industrial temperature range. Signed-off-by: Alexander Stein Cc: stable Acked-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20230223073920.2912298-1-alexander.stein@ew.tq-group.com Signed-off-by: Greg Kroah-Hartman commit d8a2bb4eb75866275b5cf7de2e593ac3449643e2 Author: Wesley Cheng Date: Mon Mar 6 12:05:57 2023 -0800 usb: dwc3: gadget: Add 1ms delay after end transfer command without IOC Previously, there was a 100uS delay inserted after issuing an end transfer command for specific controller revisions. This was due to the fact that there was a GUCTL2 bit field which enabled synchronous completion of the end transfer command once the CMDACT bit was cleared in the DEPCMD register. Since this bit does not exist for all controller revisions and the current implementation heavily relies on utizling the EndTransfer command completion interrupt, add the delay back in for uses where the interrupt on completion bit is not set, and increase the duration to 1ms for the controller to complete the command. An issue was seen where the USB request buffer was unmapped while the DWC3 controller was still accessing the TRB. However, it was confirmed that the end transfer command was successfully submitted. (no end transfer timeout) In situations, such as dwc3_gadget_soft_disconnect() and __dwc3_gadget_ep_disable(), the dwc3_remove_request() is utilized, which will issue the end transfer command, and follow up with dwc3_gadget_giveback(). At least for the USB ep disable path, it is required for any pending and started requests to be completed and returned to the function driver in the same context of the disable call. Without the GUCTL2 bit, it is not ensured that the end transfer is completed before the buffers are unmapped. Fixes: cf2f8b63f7f1 ("usb: dwc3: gadget: Remove END_TRANSFER delay") Cc: stable Signed-off-by: Wesley Cheng Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20230306200557.29387-1-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit e041a2a550582106cba6a7c862c90dfc2ad14492 Author: Emil Abildgaard Svendsen Date: Thu Mar 9 06:54:41 2023 +0000 ASoC: hdmi-codec: only startup/shutdown on supported streams Currently only one stream is supported. This isn't usally a problem until you have a multi codec audio card. Because the audio card will run startup and shutdown on both capture and playback streams. So if your hdmi-codec only support either playback or capture. Then ALSA can't open for playback and capture. This patch will ignore if startup and shutdown are called with a non supported stream. Thus, allowing an audio card like this: +-+ cpu1 <--@-| |-> codec1 (HDMI-CODEC) | |<- codec2 (NOT HDMI-CODEC) +-+ Signed-off-by: Emil Svendsen Link: https://lore.kernel.org/r/20230309065432.4150700-2-emas@bang-olufsen.dk Signed-off-by: Mark Brown commit 02c1820345e795148e6b497ef85090915401698e Author: Vincenzo Palazzo Date: Thu Mar 2 16:07:06 2023 +0100 usb: dwc3: Fix a typo in field name Fix a typo inside the dwc3 struct docs. Fixes: 63d7f9810a38 ("usb: dwc3: core: Enable GUCTL1 bit 10 for fixing termination error after resume bug") Signed-off-by: Vincenzo Palazzo Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20230302150706.229008-1-vincenzopalazzodev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 02d210f434249a7edbc160969b75df030dc6934d Author: Hans de Goede Date: Wed Mar 8 16:42:44 2023 +0100 usb: ucsi_acpi: Increase the command completion timeout Commit 130a96d698d7 ("usb: typec: ucsi: acpi: Increase command completion timeout value") increased the timeout from 5 seconds to 60 seconds due to issues related to alternate mode discovery. After the alternate mode discovery switch to polled mode the timeout was reduced, but instead of being set back to 5 seconds it was reduced to 1 second. This is causing problems when using a Lenovo ThinkPad X1 yoga gen7 connected over Type-C to a LG 27UL850-W (charging DP over Type-C). When the monitor is already connected at boot the following error is logged: "PPM init failed (-110)", /sys/class/typec is empty and on unplugging the NULL pointer deref fixed earlier in this series happens. When the monitor is connected after boot the following error is logged instead: "GET_CONNECTOR_STATUS failed (-110)". Setting the timeout back to 5 seconds fixes both cases. Fixes: e08065069fc7 ("usb: typec: ucsi: acpi: Reduce the command completion timeout") Cc: stable@vger.kernel.org Reviewed-by: Heikki Krogerus Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230308154244.722337-4-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 0482c34ec6f8557e06cd0f8e2d0e20e8ede6a22c Author: Hans de Goede Date: Wed Mar 8 16:42:43 2023 +0100 usb: ucsi: Fix ucsi->connector race ucsi_init() which runs from a workqueue sets ucsi->connector and on an error will clear it again. ucsi->connector gets dereferenced by ucsi_resume(), this checks for ucsi->connector being NULL in case ucsi_init() has not finished yet; or in case ucsi_init() has failed. ucsi_init() setting ucsi->connector and then clearing it again on an error creates a race where the check in ucsi_resume() may pass, only to have ucsi->connector free-ed underneath it when ucsi_init() hits an error. Fix this race by making ucsi_init() store the connector array in a local variable and only assign it to ucsi->connector on success. Fixes: bdc62f2bae8f ("usb: typec: ucsi: Simplified registration and I/O API") Cc: stable@vger.kernel.org Reviewed-by: Heikki Krogerus Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230308154244.722337-3-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit f87fb985452ab2083967103ac00bfd68fb182764 Author: Hans de Goede Date: Wed Mar 8 16:42:42 2023 +0100 usb: ucsi: Fix NULL pointer deref in ucsi_connector_change() When ucsi_init() fails, ucsi->connector is NULL, yet in case of ucsi_acpi we may still get events which cause the ucs_acpi code to call ucsi_connector_change(), which then derefs the NULL ucsi->connector pointer. Fix this by not setting ucsi->ntfy inside ucsi_init() until ucsi_init() has succeeded, so that ucsi_connector_change() ignores the events because UCSI_ENABLE_NTFY_CONNECTOR_CHANGE is not set in the ntfy mask. Fixes: bdc62f2bae8f ("usb: typec: ucsi: Simplified registration and I/O API") Link: https://bugzilla.kernel.org/show_bug.cgi?id=217106 Cc: stable@vger.kernel.org Reviewed-by: Heikki Krogerus Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230308154244.722337-2-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 67eeadf2f95326f6344adacb70c880bf2ccff57b Merge: 2d8cb0bfca6a0 8f5c5a790e302 Author: Paolo Abeni Date: Thu Mar 9 11:45:08 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-03-07 (ice) This series contains updates to ice driver only. Dave removes masking from pfcena field as it was incorrectly preventing valid traffic classes from being enabled. Michal resolves various smatch issues such as not propagating error codes and returning 0 explicitly. Arnd Bergmann resolves gcc-9 warning for integer overflow. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ethernet: ice: avoid gcc-9 integer overflow warning ice: don't ignore return codes in VSI related code ice: Fix DSCP PFC TLV creation ==================== Link: https://lore.kernel.org/r/20230307220714.3997294-1-anthony.l.nguyen@intel.com Signed-off-by: Paolo Abeni commit dc592190a5543c559010e09e8130a1af3f9068d3 Author: Jiapeng Chong Date: Wed Mar 8 15:13:16 2023 +0800 fs/locks: Remove redundant assignment to cmd Variable 'cmd' set but not used. fs/locks.c:2428:3: warning: Value stored to 'cmd' is never read. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4439 Signed-off-by: Jiapeng Chong Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christian Brauner (Microsoft) commit c3a4aec055ec275c9f860e88d37e97248927d898 Author: Jiapeng Chong Date: Tue Mar 7 16:49:18 2023 +0800 splice: Remove redundant assignment to ret The variable ret belongs to redundant assignment and can be deleted. fs/splice.c:940:2: warning: Value stored to 'ret' is never read. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4406 Signed-off-by: Jiapeng Chong Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christian Brauner (Microsoft) commit fdf6c2309f425509cddd002f278c650ad0b7e34b Author: Greg Kroah-Hartman Date: Wed Mar 8 14:19:34 2023 +0100 staging: r8188eu: delete driver Now that the same hardware that the r8188eu driver supported is supported by the real wireless driver rtl8xxxu, the r8188eu driver can be deleted. Also the rtl8xxxu driver supports way more devices, and is a fraction of the overall size, making this a much better overall solution. Thanks to the r8188eu developers and maintainers and reviewers over the years, your work allowed Linux users to use their hardware before the real driver was implemented properly. Reported-by: Hans de Goede Cc: Phillip Potter Cc: Pavel Skripkin Acked-by: Larry Finger Acked-by: Hans de Goede Acked-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Acked-by: Michael Straube Link: https://lore.kernel.org/r/20230308131934.380395-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 2d8cb0bfca6a05f1731d4570941e85d65c669386 Merge: 649c15c7691e9 c311aaa74ca18 Author: Jakub Kicinski Date: Wed Mar 8 23:28:23 2023 -0800 Merge branch 'tools-ynl-fix-enum-as-flags-in-the-generic-cli' Jakub Kicinski says: ==================== tools: ynl: fix enum-as-flags in the generic CLI The CLI needs to use proper classes when looking at Enum definitions rather than interpreting the YAML spec ad-hoc, because we have more than on format of the definition supported. ==================== Link: https://lore.kernel.org/r/20230308003923.445268-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit c311aaa74ca18bd0781d1d3bebd08484799f840c Author: Jakub Kicinski Date: Tue Mar 7 16:39:23 2023 -0800 tools: ynl: fix enum-as-flags in the generic CLI Lorenzo points out that the generic CLI is broken for the netdev family. When I added the support for documentation of enums (and sparse enums) the client script was not updated. It expects the values in enum to be a list of names, now it can also be a dict (YAML object). Reported-by: Lorenzo Bianconi Fixes: e4b48ed460d3 ("tools: ynl: add a completely generic client") Signed-off-by: Jakub Kicinski commit 6517a60b0307abdcca80133c237551cc7cc8e6ae Author: Jakub Kicinski Date: Tue Mar 7 16:39:22 2023 -0800 tools: ynl: move the enum classes to shared code Move bulk of the EnumSet and EnumEntry code to shared code for reuse by cli. Signed-off-by: Jakub Kicinski commit 649c15c7691e9b13cbe9bf6c65c365350e056067 Author: Thadeu Lima de Souza Cascardo Date: Tue Mar 7 14:37:07 2023 -0300 net: avoid double iput when sock_alloc_file fails When sock_alloc_file fails to allocate a file, it will call sock_release. __sys_socket_file should then not call sock_release again, otherwise there will be a double free. [ 89.319884] ------------[ cut here ]------------ [ 89.320286] kernel BUG at fs/inode.c:1764! [ 89.320656] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI [ 89.321051] CPU: 7 PID: 125 Comm: iou-sqp-124 Not tainted 6.2.0+ #361 [ 89.321535] RIP: 0010:iput+0x1ff/0x240 [ 89.321808] Code: d1 83 e1 03 48 83 f9 02 75 09 48 81 fa 00 10 00 00 77 05 83 e2 01 75 1f 4c 89 ef e8 fb d2 ba 00 e9 80 fe ff ff c3 cc cc cc cc <0f> 0b 0f 0b e9 d0 fe ff ff 0f 0b eb 8d 49 8d b4 24 08 01 00 00 48 [ 89.322760] RSP: 0018:ffffbdd60068bd50 EFLAGS: 00010202 [ 89.323036] RAX: 0000000000000000 RBX: ffff9d7ad3cacac0 RCX: 0000000000001107 [ 89.323412] RDX: 000000000003af00 RSI: 0000000000000000 RDI: ffff9d7ad3cacb40 [ 89.323785] RBP: ffffbdd60068bd68 R08: ffffffffffffffff R09: ffffffffab606438 [ 89.324157] R10: ffffffffacb3dfa0 R11: 6465686361657256 R12: ffff9d7ad3cacb40 [ 89.324529] R13: 0000000080000001 R14: 0000000080000001 R15: 0000000000000002 [ 89.324904] FS: 00007f7b28516740(0000) GS:ffff9d7aeb1c0000(0000) knlGS:0000000000000000 [ 89.325328] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 89.325629] CR2: 00007f0af52e96c0 CR3: 0000000002a02006 CR4: 0000000000770ee0 [ 89.326004] PKRU: 55555554 [ 89.326161] Call Trace: [ 89.326298] [ 89.326419] __sock_release+0xb5/0xc0 [ 89.326632] __sys_socket_file+0xb2/0xd0 [ 89.326844] io_socket+0x88/0x100 [ 89.327039] ? io_issue_sqe+0x6a/0x430 [ 89.327258] io_issue_sqe+0x67/0x430 [ 89.327450] io_submit_sqes+0x1fe/0x670 [ 89.327661] io_sq_thread+0x2e6/0x530 [ 89.327859] ? __pfx_autoremove_wake_function+0x10/0x10 [ 89.328145] ? __pfx_io_sq_thread+0x10/0x10 [ 89.328367] ret_from_fork+0x29/0x50 [ 89.328576] RIP: 0033:0x0 [ 89.328732] Code: Unable to access opcode bytes at 0xffffffffffffffd6. [ 89.329073] RSP: 002b:0000000000000000 EFLAGS: 00000202 ORIG_RAX: 00000000000001a9 [ 89.329477] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f7b28637a3d [ 89.329845] RDX: 00007fff4e4318a8 RSI: 00007fff4e4318b0 RDI: 0000000000000400 [ 89.330216] RBP: 00007fff4e431830 R08: 00007fff4e431711 R09: 00007fff4e4318b0 [ 89.330584] R10: 0000000000000000 R11: 0000000000000202 R12: 00007fff4e441b38 [ 89.330950] R13: 0000563835e3e725 R14: 0000563835e40d10 R15: 00007f7b28784040 [ 89.331318] [ 89.331441] Modules linked in: [ 89.331617] ---[ end trace 0000000000000000 ]--- Fixes: da214a475f8b ("net: add __sys_socket_file()") Signed-off-by: Thadeu Lima de Souza Cascardo Reviewed-by: Jens Axboe Reviewed-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://lore.kernel.org/r/20230307173707.468744-1-cascardo@canonical.com Signed-off-by: Jakub Kicinski commit 2aab4b96900272885bc157f8b236abf1cdc02e08 Author: Eric Dumazet Date: Tue Mar 7 16:45:30 2023 +0000 af_unix: fix struct pid leaks in OOB support syzbot reported struct pid leak [1]. Issue is that queue_oob() calls maybe_add_creds() which potentially holds a reference on a pid. But skb->destructor is not set (either directly or by calling unix_scm_to_skb()) This means that subsequent kfree_skb() or consume_skb() would leak this reference. In this fix, I chose to fully support scm even for the OOB message. [1] BUG: memory leak unreferenced object 0xffff8881053e7f80 (size 128): comm "syz-executor242", pid 5066, jiffies 4294946079 (age 13.220s) hex dump (first 32 bytes): 01 00 00 00 00 00 00 00 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: [] alloc_pid+0x6a/0x560 kernel/pid.c:180 [] copy_process+0x169f/0x26c0 kernel/fork.c:2285 [] kernel_clone+0xf7/0x610 kernel/fork.c:2684 [] __do_sys_clone+0x7c/0xb0 kernel/fork.c:2825 [] 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: 314001f0bf92 ("af_unix: Add OOB support") Reported-by: syzbot+7699d9e5635c10253a27@syzkaller.appspotmail.com Signed-off-by: Eric Dumazet Cc: Rao Shoaib Reviewed-by: Kuniyuki Iwashima Link: https://lore.kernel.org/r/20230307164530.771896-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 8f14820801042c221bb9fe51643a2585cac5dec2 Author: Jakub Kicinski Date: Tue Mar 7 09:19:30 2023 -0800 eth: fealnx: bring back this old driver This reverts commit d5e2d038dbece821f1af57acbeded3aa9a1832c1. We have a report of this chip being used on a SURECOM EP-320X-S 100/10M Ethernet PCI Adapter which could still have been purchased in some parts of the world 3 years ago. Cc: stable@vger.kernel.org Link: https://bugzilla.kernel.org/show_bug.cgi?id=217151 Fixes: d5e2d038dbec ("eth: fealnx: delete the driver for Myson MTD-800") Link: https://lore.kernel.org/r/20230307171930.4008454-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit c8b8a3c601f2cfad25ab5ce5b04df700048aef6e Author: Vladimir Oltean Date: Tue Mar 7 17:54:11 2023 +0200 net: dsa: mt7530: permit port 5 to work without port 6 on MT7621 SoC The MT7530 switch from the MT7621 SoC has 2 ports which can be set up as internal: port 5 and 6. Arınç reports that the GMAC1 attached to port 5 receives corrupted frames, unless port 6 (attached to GMAC0) has been brought up by the driver. This is true regardless of whether port 5 is used as a user port or as a CPU port (carrying DSA tags). Offline debugging (blind for me) which began in the linked thread showed experimentally that the configuration done by the driver for port 6 contains a step which is needed by port 5 as well - the write to CORE_GSWPLL_GRP2 (note that I've no idea as to what it does, apart from the comment "Set core clock into 500Mhz"). Prints put by Arınç show that the reset value of CORE_GSWPLL_GRP2 is RG_GSWPLL_POSDIV_500M(1) | RG_GSWPLL_FBKDIV_500M(40) (0x128), both on the MCM MT7530 from the MT7621 SoC, as well as on the standalone MT7530 from MT7623NI Bananapi BPI-R2. Apparently, port 5 on the standalone MT7530 can work under both values of the register, while on the MT7621 SoC it cannot. The call path that triggers the register write is: mt753x_phylink_mac_config() for port 6 -> mt753x_pad_setup() -> mt7530_pad_clk_setup() so this fully explains the behavior noticed by Arınç, that bringing port 6 up is necessary. The simplest fix for the problem is to extract the register writes which are needed for both port 5 and 6 into a common mt7530_pll_setup() function, which is called at mt7530_setup() time, immediately after switch reset. We can argue that this mirrors the code layout introduced in mt7531_setup() by commit 42bc4fafe359 ("net: mt7531: only do PLL once after the reset"), in that the PLL setup has the exact same positioning, and further work to consolidate the separate setup() functions is not hindered. Testing confirms that: - the slight reordering of writes to MT7530_P6ECR and to CORE_GSWPLL_GRP1 / CORE_GSWPLL_GRP2 introduced by this change does not appear to cause problems for the operation of port 6 on MT7621 and on MT7623 (where port 5 also always worked) - packets sent through port 5 are not corrupted anymore, regardless of whether port 6 is enabled by phylink or not (or even present in the device tree) My algorithm for determining the Fixes: tag is as follows. Testing shows that some logic from mt7530_pad_clk_setup() is needed even for port 5. Prior to commit ca366d6c889b ("net: dsa: mt7530: Convert to PHYLINK API"), a call did exist for all phy_is_pseudo_fixed_link() ports - so port 5 included. That commit replaced it with a temporary "Port 5 is not supported!" comment, and the following commit 38f790a80560 ("net: dsa: mt7530: Add support for port 5") replaced that comment with a configuration procedure in mt7530_setup_port5() which was insufficient for port 5 to work. I'm laying the blame on the patch that claimed support for port 5, although one would have also needed the change from commit c3b8e07909db ("net: dsa: mt7530: setup core clock even in TRGMII mode") for the write to be performed completely independently from port 6's configuration. Thanks go to Arınç for describing the problem, for debugging and for testing. Reported-by: Arınç ÜNAL Link: https://lore.kernel.org/netdev/f297c2c4-6e7c-57ac-2394-f6025d309b9d@arinc9.com/ Fixes: 38f790a80560 ("net: dsa: mt7530: Add support for port 5") Signed-off-by: Vladimir Oltean Tested-by: Arınç ÜNAL Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230307155411.868573-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 6a98c9cae232800c319ed69e1063480d31430887 Merge: 55ee6646b6ba8 63bceed808c5c Author: Linus Torvalds Date: Wed Mar 8 12:02:09 2023 -0800 Merge tag 'fs_for_v6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull udf fixes from Jan Kara: "Fix bugs in UDF caused by the big pile of changes that went in during the merge window" * tag 'fs_for_v6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: udf: Warn if block mapping is done for in-ICB files udf: Fix reading of in-ICB files udf: Fix lost writes in udf_adinicb_writepage() commit 55ee6646b6ba86574d1411af275c61a82fdfe10e Merge: 7fef099702527 1a0009abfa789 Author: Linus Torvalds Date: Wed Mar 8 11:56:45 2023 -0800 Merge tag 'platform-drivers-x86-v6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Hans de Goede: "A small set of assorted bug and build/warning fixes" * tag 'platform-drivers-x86-v6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform: mellanox: mlx-platform: Initialize shift variable to 0 platform/x86: int3472: Add GPIOs to Surface Go 3 Board data platform/x86: ISST: Fix kernel documentation warnings platform: x86: MLX_PLATFORM: select REGMAP instead of depending on it platform: mellanox: select REGMAP instead of depending on it platform/x86/intel/tpmi: Fix double free reported by Smatch platform/x86: ISST: Increase range of valid mail box commands platform/x86: dell-ddv: Fix temperature scaling platform/x86: dell-ddv: Fix cache invalidation on resume platform/x86/amd: pmc: remove CONFIG_SUSPEND checks commit a722511b18268bd1f7084eee243af416b85f288f Author: Randy Dunlap Date: Sun Feb 19 17:04:28 2023 -0800 drm/msm: DEVFREQ_GOV_SIMPLE_ONDEMAND is no longer needed DRM_MSM no longer needs DEVFREQ_GOV_SIMPLE_ONDEMAND (since commit dbd7a2a941b8 ("PM / devfreq: Fix build issues with devfreq disabled") in linux-next), so remove that select from the DRM_MSM Kconfig file. Fixes: 6563f60f14cb ("drm/msm/gpu: Add devfreq tuning debugfs") Signed-off-by: Randy Dunlap Cc: Rob Clark Cc: Abhinav Kumar Cc: Dmitry Baryshkov Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Reviewed-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/523353/ Link: https://lore.kernel.org/r/20230220010428.16910-1-rdunlap@infradead.org [rob: tweak commit message to make checkpatch.pl happy] Signed-off-by: Rob Clark commit 7fef099702527c3b2c5234a2ea6a24411485a13a Author: Linus Torvalds Date: Tue Mar 7 13:06:29 2023 -0800 x86/resctl: fix scheduler confusion with 'current' The implementation of 'current' on x86 is very intentionally special: it is a very common thing to look up, and it uses 'this_cpu_read_stable()' to get the current thread pointer efficiently from per-cpu storage. And the keyword in there is 'stable': the current thread pointer never changes as far as a single thread is concerned. Even if when a thread is preempted, or moved to another CPU, or even across an explicit call 'schedule()' that thread will still have the same value for 'current'. It is, after all, the kernel base pointer to thread-local storage. That's why it's stable to begin with, but it's also why it's important enough that we have that special 'this_cpu_read_stable()' access for it. So this is all done very intentionally to allow the compiler to treat 'current' as a value that never visibly changes, so that the compiler can do CSE and combine multiple different 'current' accesses into one. However, there is obviously one very special situation when the currently running thread does actually change: inside the scheduler itself. So the scheduler code paths are special, and do not have a 'current' thread at all. Instead there are _two_ threads: the previous and the next thread - typically called 'prev' and 'next' (or prev_p/next_p) internally. So this is all actually quite straightforward and simple, and not all that complicated. Except for when you then have special code that is run in scheduler context, that code then has to be aware that 'current' isn't really a valid thing. Did you mean 'prev'? Did you mean 'next'? In fact, even if then look at the code, and you use 'current' after the new value has been assigned to the percpu variable, we have explicitly told the compiler that 'current' is magical and always stable. So the compiler is quite free to use an older (or newer) value of 'current', and the actual assignment to the percpu storage is not relevant even if it might look that way. Which is exactly what happened in the resctl code, that blithely used 'current' in '__resctrl_sched_in()' when it really wanted the new process state (as implied by the name: we're scheduling 'into' that new resctl state). And clang would end up just using the old thread pointer value at least in some configurations. This could have happened with gcc too, and purely depends on random compiler details. Clang just seems to have been more aggressive about moving the read of the per-cpu current_task pointer around. The fix is trivial: just make the resctl code adhere to the scheduler rules of using the prev/next thread pointer explicitly, instead of using 'current' in a situation where it just wasn't valid. That same code is then also used outside of the scheduler context (when a thread resctl state is explicitly changed), and then we will just pass in 'current' as that pointer, of course. There is no ambiguity in that case. The fix may be trivial, but noticing and figuring out what went wrong was not. The credit for that goes to Stephane Eranian. Reported-by: Stephane Eranian Link: https://lore.kernel.org/lkml/20230303231133.1486085-1-eranian@google.com/ Link: https://lore.kernel.org/lkml/alpine.LFD.2.01.0908011214330.3304@localhost.localdomain/ Reviewed-by: Nick Desaulniers Tested-by: Tony Luck Tested-by: Stephane Eranian Tested-by: Babu Moger Cc: stable@kernel.org Signed-off-by: Linus Torvalds commit d17789edd6a8270c38459e592ee536a84c6202db Author: Hans de Goede Date: Mon Mar 6 16:35:12 2023 +0100 staging: rtl8723bs: Pass correct parameters to cfg80211_get_bss() To last 2 parameters to cfg80211_get_bss() should be of the enum ieee80211_bss_type resp. enum ieee80211_privacy types, which WLAN_CAPABILITY_ESS very much is not. Fix both cfg80211_get_bss() calls in ioctl_cfg80211.c to pass the right parameters. Note that the second call was already somewhat fixed by commenting out WLAN_CAPABILITY_ESS and passing in 0 instead. This was still not entirely correct though since that would limit returned BSS-es to ESS type BSS-es with privacy on. Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230306153512.162104-2-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 05cbcc415c9b8c8bc4f9a09f8e03610a89042f03 Author: Hans de Goede Date: Mon Mar 6 16:35:11 2023 +0100 staging: rtl8723bs: Fix key-store index handling There are 2 issues with the key-store index handling 1. The non WEP key stores can store keys with indexes 0 - BIP_MAX_KEYID, this means that they should be an array with BIP_MAX_KEYID + 1 entries. But some of the arrays where just BIP_MAX_KEYID entries big. While one other array was hardcoded to a size of 6 entries, instead of using the BIP_MAX_KEYID define. 2. The rtw_cfg80211_set_encryption() and wpa_set_encryption() functions index check where checking that the passed in key-index would fit inside both the WEP key store (which only has 4 entries) as well as in the non WEP key stores. This breaks any attempts to set non WEP keys with index 4 or 5. Issue 2. specifically breaks wifi connection with some access points which advertise PMF support. Without this fix connecting to these access points fails with the following wpa_supplicant messages: nl80211: kernel reports: key addition failed wlan0: WPA: Failed to configure IGTK to the driver wlan0: RSN: Failed to configure IGTK wlan0: CTRL-EVENT-DISCONNECTED bssid=... reason=1 locally_generated=1 Fix 1. by using the right size for the key-stores. After this 2. can safely be fixed by checking the right max-index value depending on the used algorithm, fixing wifi not working with some PMF capable APs. Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230306153512.162104-1-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit fe413a074a93d56f89e322c786aad8639afe76b4 Author: Philipp Hortmann Date: Wed Mar 1 22:54:41 2023 +0100 staging: rtl8192e: Remove call_usermodehelper starting RadioPower.sh Remove call_usermodehelper starting /etc/acpi/events/RadioPower.sh that is not available. This script is not part of the kernel and it is not officially available on the www. The result is that this lines are just dead code. Signed-off-by: Philipp Hortmann Cc: stable Link: https://lore.kernel.org/r/20230301215441.GA14049@matrix-ESPRIMO-P710 Signed-off-by: Greg Kroah-Hartman commit a98fc23cc2c1e4382a79ff137ca1a93d6a73b451 Author: Philipp Hortmann Date: Tue Feb 28 21:28:57 2023 +0100 staging: rtl8192e: Remove function ..dm_check_ac_dc_power calling a script Remove function _rtl92e_dm_check_ac_dc_power calling a script /etc/acpi/wireless-rtl-ac-dc-power.sh that is not available. This script is not part of the kernel and it is not available on the www. The result is that this function is just dead code. Signed-off-by: Philipp Hortmann Cc: stable Link: https://lore.kernel.org/r/20230228202857.GA16442@matrix-ESPRIMO-P710 Signed-off-by: Greg Kroah-Hartman commit b0563468eeac88ebc70559d52a0b66efc37e4e9d Author: Andrew Cooper Date: Tue Mar 7 17:46:43 2023 +0000 x86/CPU/AMD: Disable XSAVES on AMD family 0x17 AMD Erratum 1386 is summarised as: XSAVES Instruction May Fail to Save XMM Registers to the Provided State Save Area This piece of accidental chronomancy causes the %xmm registers to occasionally reset back to an older value. Ignore the XSAVES feature on all AMD Zen1/2 hardware. The XSAVEC instruction (which works fine) is equivalent on affected parts. [ bp: Typos, move it into the F17h-specific function. ] Reported-by: Tavis Ormandy Signed-off-by: Andrew Cooper Signed-off-by: Borislav Petkov (AMD) Cc: Link: https://lore.kernel.org/r/20230307174643.1240184-1-andrew.cooper3@citrix.com commit 01e68ce08a30db3d842ce7a55f7f6e0474a55f9a Author: Jens Axboe Date: Wed Mar 8 07:18:51 2023 -0700 io_uring/io-wq: stop setting PF_NO_SETAFFINITY on io-wq workers Every now and then reports come in that are puzzled on why changing affinity on the io-wq workers fails with EINVAL. This happens because they set PF_NO_SETAFFINITY as part of their creation, as io-wq organizes workers into groups based on what CPU they are running on. However, this is purely an optimization and not a functional requirement. We can allow setting affinity, and just lazily update our worker to wqe mappings. If a given io-wq thread times out, it normally exits if there's no more work to do. The exception is if it's the last worker available. For the timeout case, check the affinity of the worker against group mask and exit even if it's the last worker. New workers should be created with the right mask and in the right location. Reported-by:Daniel Dao Link: https://lore.kernel.org/io-uring/CA+wXwBQwgxB3_UphSny-yAP5b26meeOu1W4TwYVcD_+5gOhvPw@mail.gmail.com/ Signed-off-by: Jens Axboe commit d617808e3b8324eacebabefec49dc75536ee39cc Author: Christophe JAILLET Date: Fri Jul 8 21:30:01 2022 +0200 firmware: arm_scmi: Use the bitmap API to allocate bitmaps Use devm_bitmap_zalloc() instead of hand-writing them. It is less verbose and it improves the semantic. Signed-off-by: Christophe JAILLET Reviewed-by: Cristian Marussi Tested-by: Cristian Marussi Link: https://lore.kernel.org/r/c073b1607ada34d5bde6ce1009179cf15bbf0da3.1657308593.git.christophe.jaillet@wanadoo.fr Signed-off-by: Sudeep Holla commit 2ab4f4018cb6b8010ca5002c3bdc37783b5d28c2 Author: Cristian Marussi Date: Tue Mar 7 16:23:24 2023 +0000 firmware: arm_scmi: Fix device node validation for mailbox transport When mailboxes are used as a transport it is possible to setup the SCMI transport layer, depending on the underlying channels configuration, to use one or two mailboxes, associated, respectively, to one or two, distinct, shared memory areas: any other combination should be treated as invalid. Add more strict checking of SCMI mailbox transport device node descriptors. Fixes: 5c8a47a5a91d ("firmware: arm_scmi: Make scmi core independent of the transport type") Cc: # 4.19 Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20230307162324.891866-1-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 5b8e5319affc977d24b8ce7edd295907e969e217 Author: Lukas Bulwahn Date: Wed Mar 8 15:36:40 2023 +0100 MAINTAINERS: repair a malformed T: entry in IDMAPPED MOUNTS The T: entries shall be composed of a SCM tree type (git, hg, quilt, stgit or topgit) and location. Add the SCM tree type to the T: entry and reorder the file entries in alphabetical order. Fixes: ddc84c90538e ("MAINTAINERS: update idmapping tree") Signed-off-by: Lukas Bulwahn Signed-off-by: Christian Brauner (Microsoft) commit e2f2a39452c43b64ea3191642a2661cb8d03827a Author: Yu Kuai Date: Wed Mar 8 10:32:08 2023 +0800 block, bfq: fix uaf for 'stable_merge_bfqq' Before commit fd571df0ac5b ("block, bfq: turn bfqq_data into an array in bfq_io_cq"), process reference is read before bfq_put_stable_ref(), and it's safe if bfq_put_stable_ref() put the last reference, because process reference will be 0 and 'stable_merge_bfqq' won't be accessed in this case. However, the commit changed the order and will cause uaf for 'stable_merge_bfqq'. In order to emphasize that bfq_put_stable_ref() can drop the last reference, fix the problem by moving bfq_put_stable_ref() to the end of bfq_setup_stable_merge(). Fixes: fd571df0ac5b ("block, bfq: turn bfqq_data into an array in bfq_io_cq") Reported-and-tested-by: Shinichiro Kawasaki Link: https://lore.kernel.org/linux-block/20230307071448.rzihxbm4jhbf5krj@shindev/ Signed-off-by: Yu Kuai Reviewed-by: Jan Kara Signed-off-by: Jens Axboe commit af0f46e5b9a462aaa1d76e82781a5316f03828eb Author: Guenter Roeck Date: Tue Mar 7 07:51:11 2023 -0800 ASoC: da7219: Initialize jack_det_mutex The following traceback is reported if mutex debugging is enabled. DEBUG_LOCKS_WARN_ON(lock->magic != lock) WARNING: CPU: 0 PID: 17 at kernel/locking/mutex.c:950 __mutex_lock_common+0x31c/0x11d4 Modules linked in: CPU: 0 PID: 17 Comm: kworker/0:1 Not tainted 5.10.172-lockdep-21846-g849884cfca5a #1 fd2de466502012eb58bc8beb467f07d0b925611f Hardware name: MediaTek kakadu rev0/rev1 board (DT) Workqueue: events da7219_aad_jack_det_work pstate: 60400005 (nZCv daif +PAN -UAO -TCO BTYPE=--) pc : __mutex_lock_common+0x31c/0x11d4 lr : __mutex_lock_common+0x31c/0x11d4 sp : ffffff80c0317ae0 x29: ffffff80c0317b50 x28: ffffff80c0317b20 x27: 0000000000000000 x26: 0000000000000000 x25: 0000000000000000 x24: 0000000100000000 x23: ffffffd0121d296c x22: dfffffd000000000 x21: 0000000000000000 x20: 0000000000000000 x19: ffffff80c73d7190 x18: 1ffffff018050f52 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: 0000000000000000 x13: 0000000000000001 x12: 0000000000000001 x11: 0000000000000000 x10: 0000000000000000 x9 : 83f0d991da544b00 x8 : 83f0d991da544b00 x7 : 0000000000000000 x6 : 0000000000000001 x5 : ffffff80c03176a0 x4 : 0000000000000000 x3 : ffffffd01067fd78 x2 : 0000000100000000 x1 : ffffff80c030ba80 x0 : 0000000000000028 Call trace: __mutex_lock_common+0x31c/0x11d4 mutex_lock_nested+0x98/0xac da7219_aad_jack_det_work+0x54/0xf0 process_one_work+0x6cc/0x19dc worker_thread+0x458/0xddc kthread+0x2fc/0x370 ret_from_fork+0x10/0x30 irq event stamp: 579 hardirqs last enabled at (579): [] exit_to_kernel_mode+0x108/0x138 hardirqs last disabled at (577): [] __do_softirq+0x53c/0x125c softirqs last enabled at (578): [] __irq_exit_rcu+0x264/0x4f4 softirqs last disabled at (573): [] __irq_exit_rcu+0x264/0x4f4 ---[ end trace 26da674636181c40 ]--- Initialize the mutex to fix the problem. Cc: David Rau Fixes: 7fde88eda855 ("ASoC: da7219: Improve the IRQ process to increase the stability") Signed-off-by: Guenter Roeck Link: https://lore.kernel.org/r/20230307155111.1985522-1-linux@roeck-us.net Signed-off-by: Mark Brown commit 9ca6705d9d609441d34f8b853e1e4a6369b3b171 Author: Benjamin Coddington Date: Fri Mar 3 16:08:32 2023 -0500 SUNRPC: Fix a server shutdown leak Fix a race where kthread_stop() may prevent the threadfn from ever getting called. If that happens the svc_rqst will not be cleaned up. Fixes: ed6473ddc704 ("NFSv4: Fix callback server shutdown") Signed-off-by: Benjamin Coddington Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit cdd28833100c18a469c85a1cc3de9f6bbbe6caa0 Author: Daniel Machon Date: Tue Mar 7 12:21:03 2023 +0100 net: microchip: sparx5: fix deletion of existing DSCP mappings Fix deletion of existing DSCP mappings in the APP table. Adding and deleting DSCP entries are replicated per-port, since the mapping table is global for all ports in the chip. Whenever a mapping for a DSCP value already exists, the old mapping is deleted first. However, it is only deleted for the specified port. Fix this by calling sparx5_dcb_ieee_delapp() instead of dcb_ieee_delapp() as it ought to be. Reproduce: // Map and remap DSCP value 63 $ dcb app add dev eth0 dscp-prio 63:1 $ dcb app add dev eth0 dscp-prio 63:2 $ dcb app show dev eth0 dscp-prio dscp-prio 63:2 $ dcb app show dev eth1 dscp-prio dscp-prio 63:1 63:2 <-- 63:1 should not be there Fixes: 8dcf69a64118 ("net: microchip: sparx5: add support for offloading dscp table") Signed-off-by: Daniel Machon Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit ea9dd2e5c6d12c8b65ce7514c8359a70eeaa0e70 Author: Suman Ghosh Date: Tue Mar 7 16:19:08 2023 +0530 octeontx2-af: Unlock contexts in the queue context cache in case of fault detection NDC caches contexts of frequently used queue's (Rx and Tx queues) contexts. Due to a HW errata when NDC detects fault/poision while accessing contexts it could go into an illegal state where a cache line could get locked forever. To makesure all cache lines in NDC are available for optimum performance upon fault/lockerror/posion errors scan through all cache lines in NDC and clear the lock bit. Fixes: 4a3581cd5995 ("octeontx2-af: NPA AQ instruction enqueue support") 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 ce7ca794712f186da99719e8b4e97bd5ddbb04c3 Author: D. Wythe Date: Tue Mar 7 11:23:46 2023 +0800 net/smc: fix fallback failed while sendmsg with fastopen Before determining whether the msg has unsupported options, it has been prematurely terminated by the wrong status check. For the application, the general usages of MSG_FASTOPEN likes fd = socket(...) /* rather than connect */ sendto(fd, data, len, MSG_FASTOPEN) Hence, We need to check the flag before state check, because the sock state here is always SMC_INIT when applications tries MSG_FASTOPEN. Once we found unsupported options, fallback it to TCP. Fixes: ee9dfbef02d1 ("net/smc: handle sockopts forcing fallback") Signed-off-by: D. Wythe Signed-off-by: Simon Horman v2 -> v1: Optimize code style Reviewed-by: Tony Lu Signed-off-by: David S. Miller commit 515bddf0ec4155cbd666d72daf5bd68c8b7cd987 Author: Tobias Klauser Date: Wed Mar 8 11:53:20 2023 +0100 selftests/clone3: test clone3 with CLONE_NEWTIME Verify that clone3 can be called successfully with CLONE_NEWTIME in flags. Cc: Andrey Vagin Cc: Christian Brauner Cc: Shuah Khan Signed-off-by: Tobias Klauser Signed-off-by: Christian Brauner (Microsoft) commit a402f1e35313fc7ce2ca60f543c4402c2c7c3544 Author: Tobias Klauser Date: Wed Mar 8 11:51:26 2023 +0100 fork: allow CLONE_NEWTIME in clone3 flags Currently, calling clone3() with CLONE_NEWTIME in clone_args->flags fails with -EINVAL. This is because CLONE_NEWTIME intersects with CSIGNAL. However, CSIGNAL was deprecated when clone3 was introduced in commit 7f192e3cd316 ("fork: add clone3"), allowing re-use of that part of clone flags. Fix this by explicitly allowing CLONE_NEWTIME in clone3_args_valid. This is also in line with the respective check in check_unshare_flags which allow CLONE_NEWTIME for unshare(). Fixes: 769071ac9f20 ("ns: Introduce Time Namespace") Cc: Andrey Vagin Cc: Christian Brauner Cc: stable@vger.kernel.org Signed-off-by: Tobias Klauser Reviewed-by: Christian Brauner Signed-off-by: Christian Brauner (Microsoft) commit 493924519b1fe3faab13ee621a43b0d0939abab1 Author: Jeremy Sowden Date: Tue Mar 7 23:22:59 2023 +0000 netfilter: nft_redir: correct value of inet type `.maxattrs` `nft_redir_inet_type.maxattrs` was being set, presumably because of a cut-and-paste error, to `NFTA_MASQ_MAX`, instead of `NFTA_REDIR_MAX`. Fixes: 63ce3940f3ab ("netfilter: nft_redir: add inet support") Signed-off-by: Jeremy Sowden Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 1f617b6b4c7a3d5ea7a56abb83a4c27733b60c2f Author: Jeremy Sowden Date: Tue Mar 7 23:22:58 2023 +0000 netfilter: nft_redir: correct length for loading protocol registers The values in the protocol registers are two bytes wide. However, when parsing the register loads, the code currently uses the larger 16-byte size of a `union nf_inet_addr`. Change it to use the (correct) size of a `union nf_conntrack_man_proto` instead. Fixes: d07db9884a5f ("netfilter: nf_tables: introduce nft_validate_register_load()") Signed-off-by: Jeremy Sowden Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit ec2c5917eb858428b2083d1c74f445aabbe8316b Author: Jeremy Sowden Date: Tue Mar 7 23:22:57 2023 +0000 netfilter: nft_masq: correct length for loading protocol registers The values in the protocol registers are two bytes wide. However, when parsing the register loads, the code currently uses the larger 16-byte size of a `union nf_inet_addr`. Change it to use the (correct) size of a `union nf_conntrack_man_proto` instead. Fixes: 8a6bf5da1aef ("netfilter: nft_masq: support port range") Signed-off-by: Jeremy Sowden Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 068d82e75d537b444303b8c449a11e51ea659565 Author: Jeremy Sowden Date: Tue Mar 7 23:22:56 2023 +0000 netfilter: nft_nat: correct length for loading protocol registers The values in the protocol registers are two bytes wide. However, when parsing the register loads, the code currently uses the larger 16-byte size of a `union nf_inet_addr`. Change it to use the (correct) size of a `union nf_conntrack_man_proto` instead. Fixes: d07db9884a5f ("netfilter: nf_tables: introduce nft_validate_register_load()") Signed-off-by: Jeremy Sowden Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 03e1d60e177eedbd302b77af4ea5e21b5a7ade31 Author: David Disseldorp Date: Tue Mar 7 16:21:06 2023 +0100 watch_queue: fix IOC_WATCH_QUEUE_SET_SIZE alloc error paths The watch_queue_set_size() allocation error paths return the ret value set via the prior pipe_resize_ring() call, which will always be zero. As a result, IOC_WATCH_QUEUE_SET_SIZE callers such as "keyctl watch" fail to detect kernel wqueue->notes allocation failures and proceed to KEYCTL_WATCH_KEY, with any notifications subsequently lost. Fixes: c73be61cede58 ("pipe: Add general notification queue support") Signed-off-by: David Disseldorp Signed-off-by: Christian Brauner (Microsoft) commit ff447886e675979d66b2bc01810035d3baea1b3a Author: Bjorn Helgaas Date: Tue Mar 7 15:40:54 2023 -0600 ALSA: hda: Match only Intel devices with CONTROLLER_IN_GPU() CONTROLLER_IN_GPU() is clearly intended to match only Intel devices, but previously it checked only the PCI Device ID, not the Vendor ID, so it could match devices from other vendors that happened to use the same Device ID. Update CONTROLLER_IN_GPU() so it matches only Intel devices. Fixes: 535115b5ff51 ("ALSA: hda - Abort the probe without i915 binding for HSW/B") Signed-off-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20230307214054.886721-1-helgaas@kernel.org Signed-off-by: Takashi Iwai commit a86e79e3015f5dd8e1b01ccfa49bd5c6e41047a1 Author: Hamidreza H. Fard Date: Tue Mar 7 16:37:41 2023 +0000 ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book2 Pro Samsung Galaxy Book2 Pro (13" 2022 NP930XED-KA1DE) with codec SSID 144d:c868 requires the same workaround for enabling the speaker amp like other Samsung models with ALC298 code. Signed-off-by: Hamidreza H. Fard Cc: Link: https://lore.kernel.org/r/20230307163741.3878-1-nitocris@posteo.net Signed-off-by: Takashi Iwai commit 7bb62340951a9af20235a3bde8c98e2e292915df Author: Jeremy Szu Date: Tue Mar 7 21:53:16 2023 +0800 ALSA: hda/realtek: fix speaker, mute/micmute LEDs not work on a HP platform There is a HP platform needs ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED quirk to make mic-mute/audio-mute/speaker working. Signed-off-by: Jeremy Szu Cc: Link: https://lore.kernel.org/r/20230307135317.37621-1-jeremy.szu@canonical.com Signed-off-by: Takashi Iwai commit bbdf904b13a62bb8b1272d92a7dde082dff86fbb Author: Bard Liao Date: Mon Mar 6 15:41:01 2023 +0800 ALSA: hda: intel-dsp-config: add MTL PCI id Use SOF as default audio driver. Signed-off-by: Bard Liao Reviewed-by: Gongjun Song Reviewed-by: Kai Vehmanen Cc: Link: https://lore.kernel.org/r/20230306074101.3906707-1-yung-chuan.liao@linux.intel.com Signed-off-by: Takashi Iwai commit 3c92792da8506a295afb6d032b4476e46f979725 Author: Jan Kara Date: Wed Mar 1 15:10:04 2023 +0100 ext4: Fix deadlock during directory rename As lockdep properly warns, we should not be locking i_rwsem while having transactions started as the proper lock ordering used by all directory handling operations is i_rwsem -> transaction start. Fix the lock ordering by moving the locking of the directory earlier in ext4_rename(). Reported-by: syzbot+9d16c39efb5fade84574@syzkaller.appspotmail.com Fixes: 0813299c586b ("ext4: Fix possible corruption when moving a directory") Link: https://syzkaller.appspot.com/bug?extid=9d16c39efb5fade84574 Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20230301141004.15087-1-jack@suse.cz Signed-off-by: Theodore Ts'o commit ce756daa36e1ba271bb3334267295e447aa57a5c Author: Tomas Henzl Date: Fri Mar 3 00:43:36 2023 +0100 scsi: mpi3mr: Fix expander node leak in mpi3mr_remove() Add a missing resource clean up in .remove. Fixes: e22bae30667a ("scsi: mpi3mr: Add expander devices to STL") Signed-off-by: Tomas Henzl Link: https://lore.kernel.org/r/20230302234336.25456-7-thenzl@redhat.com Acked-by: Sathya Prakash Veerichetty Signed-off-by: Martin K. Petersen commit c798304470cab88723d895726d17fcb96472e0e9 Author: Tomas Henzl Date: Fri Mar 3 00:43:35 2023 +0100 scsi: mpi3mr: Fix memory leaks in mpi3mr_init_ioc() Don't allocate memory again when IOC is being reinitialized. Fixes: fe6db6151565 ("scsi: mpi3mr: Handle offline FW activation in graceful manner") Signed-off-by: Tomas Henzl Link: https://lore.kernel.org/r/20230302234336.25456-6-thenzl@redhat.com Acked-by: Sathya Prakash Veerichetty Signed-off-by: Martin K. Petersen commit d4caa1a4255cc44be56bcab3db2c97c632e6cc10 Author: Tomas Henzl Date: Fri Mar 3 00:43:34 2023 +0100 scsi: mpi3mr: Fix sas_hba.phy memory leak in mpi3mr_remove() Free mrioc->sas_hba.phy at .remove. Fixes: 42fc9fee116f ("scsi: mpi3mr: Add helper functions to manage device's port") Signed-off-by: Tomas Henzl Link: https://lore.kernel.org/r/20230302234336.25456-5-thenzl@redhat.com Acked-by: Sathya Prakash Veerichetty Signed-off-by: Martin K. Petersen commit d0f3c3728da8af76dfe435f7f0cfa2b9d9e43ef0 Author: Tomas Henzl Date: Fri Mar 3 00:43:33 2023 +0100 scsi: mpi3mr: Fix mpi3mr_hba_port memory leak in mpi3mr_remove() Free mpi3mr_hba_port at .remove. Fixes: 42fc9fee116f ("scsi: mpi3mr: Add helper functions to manage device's port") Signed-off-by: Tomas Henzl Link: https://lore.kernel.org/r/20230302234336.25456-4-thenzl@redhat.com Acked-by: Sathya Prakash Veerichetty Signed-off-by: Martin K. Petersen commit 7d2b02172b6a2ae6aecd7ef6480b9c4bf3dc59f4 Author: Tomas Henzl Date: Fri Mar 3 00:43:32 2023 +0100 scsi: mpi3mr: Fix config page DMA memory leak A fix for: DMA-API: pci 0000:83:00.0: device driver has pending DMA allocations while released from device [count=1] Fixes: 32d457d5a2af ("scsi: mpi3mr: Add framework to issue config requests") Signed-off-by: Tomas Henzl Link: https://lore.kernel.org/r/20230302234336.25456-3-thenzl@redhat.com Acked-by: Sathya Prakash Veerichetty Signed-off-by: Martin K. Petersen commit f305a7b6ca21a665e8d0cf70b5936991a298c93c Author: Tomas Henzl Date: Fri Mar 3 00:43:31 2023 +0100 scsi: mpi3mr: Fix throttle_groups memory leak Add a missing kfree(). Fixes: f10af057325c ("scsi: mpi3mr: Resource Based Metering") Signed-off-by: Tomas Henzl Link: https://lore.kernel.org/r/20230302234336.25456-2-thenzl@redhat.com Acked-by: Sathya Prakash Veerichetty Signed-off-by: Martin K. Petersen commit d3c57724f1569311e4b81e98fad0931028b9bdcd Author: Wenchao Hao Date: Sat Feb 25 18:01:36 2023 +0800 scsi: mpt3sas: Fix NULL pointer access in mpt3sas_transport_port_add() Port is allocated by sas_port_alloc_num() and rphy is allocated by either sas_end_device_alloc() or sas_expander_alloc(), all of which may return NULL. So we need to check the rphy to avoid possible NULL pointer access. If sas_rphy_add() returned with failure, rphy is set to NULL. We would access the rphy in the following lines which would also result NULL pointer access. Fixes: 78316e9dfc24 ("scsi: mpt3sas: Fix possible resource leaks in mpt3sas_transport_port_add()") Signed-off-by: Wenchao Hao Link: https://lore.kernel.org/r/20230225100135.2109330-1-haowenchao2@huawei.com Acked-by: Sathya Prakash Veerichetty Signed-off-by: Martin K. Petersen commit c3d79fda250ac5df73d089f08311eb87138b04f3 Author: Ilpo Järvinen Date: Wed Feb 8 10:08:46 2023 +0200 fpga: m10bmc-sec: Fix rsu_send_data() to return FW_UPLOAD_ERR_HW_ERROR rsu_send_data() should return FW_UPLOAD_ERR_* error codes instead of normal -Exxxx codes. Convert <0 return from ->rsu_status() to FW_UPLOAD_ERR_HW_ERROR. Fixes: 001a734a55d0 ("fpga: m10bmc-sec: Make rsu status type specific") Signed-off-by: Ilpo Järvinen Reviewed-by: Russ Weight Cc: Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20230208080846.10795-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Xu Yilun commit 7fc1f5c28ae4c615ccc5346f39a7bf4c4e0900ac Author: Tudor Ambarus Date: Wed Mar 1 13:38:42 2023 +0000 ext4: Fix comment about the 64BIT feature 64BIT is part of the incompatible feature set, update the comment accordingly. Signed-off-by: Tudor Ambarus Reviewed-by: Darrick J. Wong Link: https://lore.kernel.org/r/20230301133842.671821-1-tudor.ambarus@linaro.org Signed-off-by: Theodore Ts'o commit b7eef407e5271f5135ce97bfd6e2e5009922331e Author: Wu Bo Date: Wed Feb 22 09:35:24 2023 +0800 docs: ext4: modify the group desc size to 64 Since the default ext4 group desc size is 64 now (assuming that the 64-bit feature is enbled). And the size mentioned in this doc is 64 too. Change it to 64. Signed-off-by: Wu Bo Acked-by: Darrick J. Wong Link: https://lore.kernel.org/r/20230222013525.14748-1-bo.wu@vivo.com Signed-off-by: Theodore Ts'o commit c993799baf9c5861f8df91beb80e1611b12efcbd Author: Darrick J. Wong Date: Thu Feb 16 10:55:48 2023 -0800 ext4: fix another off-by-one fsmap error on 1k block filesystems Apparently syzbot figured out that issuing this FSMAP call: struct fsmap_head cmd = { .fmh_count = ...; .fmh_keys = { { .fmr_device = /* ext4 dev */, .fmr_physical = 0, }, { .fmr_device = /* ext4 dev */, .fmr_physical = 0, }, }, ... }; ret = ioctl(fd, FS_IOC_GETFSMAP, &cmd); Produces this crash if the underlying filesystem is a 1k-block ext4 filesystem: kernel BUG at fs/ext4/ext4.h:3331! invalid opcode: 0000 [#1] PREEMPT SMP CPU: 3 PID: 3227965 Comm: xfs_io Tainted: G W O 6.2.0-rc8-achx Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.15.0-1 04/01/2014 RIP: 0010:ext4_mb_load_buddy_gfp+0x47c/0x570 [ext4] RSP: 0018:ffffc90007c03998 EFLAGS: 00010246 RAX: ffff888004978000 RBX: ffffc90007c03a20 RCX: ffff888041618000 RDX: 0000000000000000 RSI: 00000000000005a4 RDI: ffffffffa0c99b11 RBP: ffff888012330000 R08: ffffffffa0c2b7d0 R09: 0000000000000400 R10: ffffc90007c03950 R11: 0000000000000000 R12: 0000000000000001 R13: 00000000ffffffff R14: 0000000000000c40 R15: ffff88802678c398 FS: 00007fdf2020c880(0000) GS:ffff88807e100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffd318a5fe8 CR3: 000000007f80f001 CR4: 00000000001706e0 Call Trace: ext4_mballoc_query_range+0x4b/0x210 [ext4 dfa189daddffe8fecd3cdfd00564e0f265a8ab80] ext4_getfsmap_datadev+0x713/0x890 [ext4 dfa189daddffe8fecd3cdfd00564e0f265a8ab80] ext4_getfsmap+0x2b7/0x330 [ext4 dfa189daddffe8fecd3cdfd00564e0f265a8ab80] ext4_ioc_getfsmap+0x153/0x2b0 [ext4 dfa189daddffe8fecd3cdfd00564e0f265a8ab80] __ext4_ioctl+0x2a7/0x17e0 [ext4 dfa189daddffe8fecd3cdfd00564e0f265a8ab80] __x64_sys_ioctl+0x82/0xa0 do_syscall_64+0x2b/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7fdf20558aff RSP: 002b:00007ffd318a9e30 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00000000000200c0 RCX: 00007fdf20558aff RDX: 00007fdf1feb2010 RSI: 00000000c0c0583b RDI: 0000000000000003 RBP: 00005625c0634be0 R08: 00005625c0634c40 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fdf1feb2010 R13: 00005625be70d994 R14: 0000000000000800 R15: 0000000000000000 For GETFSMAP calls, the caller selects a physical block device by writing its block number into fsmap_head.fmh_keys[01].fmr_device. To query mappings for a subrange of the device, the starting byte of the range is written to fsmap_head.fmh_keys[0].fmr_physical and the last byte of the range goes in fsmap_head.fmh_keys[1].fmr_physical. IOWs, to query what mappings overlap with bytes 3-14 of /dev/sda, you'd set the inputs as follows: fmh_keys[0] = { .fmr_device = major(8, 0), .fmr_physical = 3}, fmh_keys[1] = { .fmr_device = major(8, 0), .fmr_physical = 14}, Which would return you whatever is mapped in the 12 bytes starting at physical offset 3. The crash is due to insufficient range validation of keys[1] in ext4_getfsmap_datadev. On 1k-block filesystems, block 0 is not part of the filesystem, which means that s_first_data_block is nonzero. ext4_get_group_no_and_offset subtracts this quantity from the blocknr argument before cracking it into a group number and a block number within a group. IOWs, block group 0 spans blocks 1-8192 (1-based) instead of 0-8191 (0-based) like what happens with larger blocksizes. The net result of this encoding is that blocknr < s_first_data_block is not a valid input to this function. The end_fsb variable is set from the keys that are copied from userspace, which means that in the above example, its value is zero. That leads to an underflow here: blocknr = blocknr - le32_to_cpu(es->s_first_data_block); The division then operates on -1: offset = do_div(blocknr, EXT4_BLOCKS_PER_GROUP(sb)) >> EXT4_SB(sb)->s_cluster_bits; Leaving an impossibly large group number (2^32-1) in blocknr. ext4_getfsmap_check_keys checked that keys[0].fmr_physical and keys[1].fmr_physical are in increasing order, but ext4_getfsmap_datadev adjusts keys[0].fmr_physical to be at least s_first_data_block. This implies that we have to check it again after the adjustment, which is the piece that I forgot. Reported-by: syzbot+6be2b977c89f79b6b153@syzkaller.appspotmail.com Fixes: 4a4956249dac ("ext4: fix off-by-one fsmap error on 1k block filesystems") Link: https://syzkaller.appspot.com/bug?id=79d5768e9bfe362911ac1a5057a36fc6b5c30002 Cc: stable@vger.kernel.org Signed-off-by: Darrick J. Wong Link: https://lore.kernel.org/r/Y+58NPTH7VNGgzdd@magnolia Signed-off-by: Theodore Ts'o commit c9f62c8b2dbf7240536c0cc9a4529397bb8bf38e Author: Eric Whitney Date: Fri Feb 10 12:32:44 2023 -0500 ext4: fix RENAME_WHITEOUT handling for inline directories A significant number of xfstests can cause ext4 to log one or more warning messages when they are run on a test file system where the inline_data feature has been enabled. An example: "EXT4-fs warning (device vdc): ext4_dirblock_csum_set:425: inode #16385: comm fsstress: No space for directory leaf checksum. Please run e2fsck -D." The xfstests include: ext4/057, 058, and 307; generic/013, 051, 068, 070, 076, 078, 083, 232, 269, 270, 390, 461, 475, 476, 482, 579, 585, 589, 626, 631, and 650. In this situation, the warning message indicates a bug in the code that performs the RENAME_WHITEOUT operation on a directory entry that has been stored inline. It doesn't detect that the directory is stored inline, and incorrectly attempts to compute a dirent block checksum on the whiteout inode when creating it. This attempt fails as a result of the integrity checking in get_dirent_tail (usually due to a failure to match the EXT4_FT_DIR_CSUM magic cookie), and the warning message is then emitted. Fix this by simply collecting the inlined data state at the time the search for the source directory entry is performed. Existing code handles the rest, and this is sufficient to eliminate all spurious warning messages produced by the tests above. Go one step further and do the same in the code that resets the source directory entry in the event of failure. The inlined state should be present in the "old" struct, but given the possibility of a race there's no harm in taking a conservative approach and getting that information again since the directory entry is being reread anyway. Fixes: b7ff91fd030d ("ext4: find old entry again if failed to rename whiteout") Cc: stable@kernel.org Signed-off-by: Eric Whitney Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230210173244.679890-1-enwlinux@gmail.com Signed-off-by: Theodore Ts'o commit 60db00e0a1490adcdc8b80887f7caf954d8bcd3e Author: Thomas Weißschuh Date: Thu Feb 9 03:18:35 2023 +0000 ext4: 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: Jan Kara Link: https://lore.kernel.org/r/20230209-kobj_type-ext4-v1-1-6865fb05c1f8@weissschuh.net Signed-off-by: Theodore Ts'o commit ffec85d53d0f39ee4680a2cf0795255e000e1feb Author: Eric Biggers Date: Thu Feb 2 16:55:03 2023 -0800 ext4: fix cgroup writeback accounting with fs-layer encryption When writing a page from an encrypted file that is using filesystem-layer encryption (not inline encryption), ext4 encrypts the pagecache page into a bounce page, then writes the bounce page. It also passes the bounce page to wbc_account_cgroup_owner(). That's incorrect, because the bounce page is a newly allocated temporary page that doesn't have the memory cgroup of the original pagecache page. This makes wbc_account_cgroup_owner() not account the I/O to the owner of the pagecache page as it should. Fix this by always passing the pagecache page to wbc_account_cgroup_owner(). Fixes: 001e4a8775f6 ("ext4: implement cgroup writeback support") Cc: stable@vger.kernel.org Reported-by: Matthew Wilcox (Oracle) Signed-off-by: Eric Biggers Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230203005503.141557-1-ebiggers@kernel.org Signed-off-by: Theodore Ts'o commit dd52a61da0dd8bab8b90e808f0e5ad507b61ad6d Author: SeongJae Park Date: Sat Mar 4 19:39:49 2023 +0000 mm/damon/paddr: fix folio_nr_pages() after folio_put() in damon_pa_mark_accessed_or_deactivate() damon_pa_mark_accessed_or_deactivate() is accessing a folio via folio_nr_pages() after folio_put() for the folio has invoked. Fix it. Link: https://lkml.kernel.org/r/20230304193949.296391-3-sj@kernel.org Fixes: f70da5ee8fe1 ("mm/damon: convert damon_pa_mark_accessed_or_deactivate() to use folios") Signed-off-by: SeongJae Park Reviewed-by: Kefeng Wang Reviewed-by: Matthew Wilcox (Oracle) Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit 751688b8be9049f558f86982966ecaa61a9cbedf Author: SeongJae Park Date: Sat Mar 4 19:39:48 2023 +0000 mm/damon/paddr: fix folio_size() call after folio_put() in damon_pa_young() Patch series "mm/damon/paddr: Fix folio-use-after-put bugs". There are two folio accesses after folio_put() in mm/damon/paddr.c file. Fix those. This patch (of 2): damon_pa_young() is accessing a folio via folio_size() after folio_put() for the folio has invoked. Fix it. Link: https://lkml.kernel.org/r/20230304193949.296391-1-sj@kernel.org Link: https://lkml.kernel.org/r/20230304193949.296391-2-sj@kernel.org Fixes: 397b0c3a584b ("mm/damon/paddr: remove folio_sz field from damon_pa_access_chk_result") Signed-off-by: SeongJae Park Reviewed-by: Kefeng Wang Reviewed-by: Matthew Wilcox (Oracle) Cc: Vishal Moola (Oracle) Cc: [6.2.x] Signed-off-by: Andrew Morton commit 90410bcf873cf05f54a32183afff0161f44f9715 Author: Jan Kara via Ocfs2-devel Date: Thu Mar 2 16:38:43 2023 +0100 ocfs2: fix data corruption after failed write When buffered write fails to copy data into underlying page cache page, ocfs2_write_end_nolock() just zeroes out and dirties the page. This can leave dirty page beyond EOF and if page writeback tries to write this page before write succeeds and expands i_size, page gets into inconsistent state where page dirty bit is clear but buffer dirty bits stay set resulting in page data never getting written and so data copied to the page is lost. Fix the problem by invalidating page beyond EOF after failed write. Link: https://lkml.kernel.org/r/20230302153843.18499-1-jack@suse.cz Fixes: 6dbf7bb55598 ("fs: Don't invalidate page buffers in block_write_full_page()") Signed-off-by: Jan Kara Reviewed-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 2ef7dbb269902bde34c82f027806992195d1d1ee Author: Huang Ying Date: Fri Mar 3 11:01:55 2023 +0800 migrate_pages: try migrate in batch asynchronously firstly When we have locked more than one folios, we cannot wait the lock or bit (e.g., page lock, buffer head lock, writeback bit) synchronously. Otherwise deadlock may be triggered. This make it hard to batch the synchronous migration directly. This patch re-enables batching synchronous migration via trying to migrate in batch asynchronously firstly. And any folios that are failed to be migrated asynchronously will be migrated synchronously one by one. Test shows that this can restore the TLB flushing batching performance for synchronous migration effectively. Link: https://lkml.kernel.org/r/20230303030155.160983-4-ying.huang@intel.com Fixes: 5dfab109d519 ("migrate_pages: batch _unmap and _move") Signed-off-by: "Huang, Ying" Tested-by: Hugh Dickins Reviewed-by: Baolin Wang Cc: "Xu, Pengfei" Cc: Christoph Hellwig Cc: Stefan Roesch Cc: Tejun Heo Cc: Xin Hao Cc: Zi Yan Cc: Yang Shi Cc: Matthew Wilcox Cc: Mike Kravetz Signed-off-by: Andrew Morton commit a21d2133215b58fbf254ea2bb77eb3143ffedf60 Author: Huang Ying Date: Fri Mar 3 11:01:54 2023 +0800 migrate_pages: move split folios processing out of migrate_pages_batch() To simplify the code logic and reduce the line number. Link: https://lkml.kernel.org/r/20230303030155.160983-3-ying.huang@intel.com Fixes: 5dfab109d519 ("migrate_pages: batch _unmap and _move") Signed-off-by: "Huang, Ying" Reviewed-by: Baolin Wang Cc: Hugh Dickins Cc: "Xu, Pengfei" Cc: Christoph Hellwig Cc: Stefan Roesch Cc: Tejun Heo Cc: Xin Hao Cc: Zi Yan Cc: Yang Shi Cc: Matthew Wilcox Cc: Mike Kravetz Signed-off-by: Andrew Morton commit fb3592c41a4427601f9643b2a84e55bb99f5cd7c Author: Huang Ying Date: Fri Mar 3 11:01:53 2023 +0800 migrate_pages: fix deadlock in batched migration Patch series "migrate_pages: fix deadlock in batched synchronous migration", v2. Two deadlock bugs were reported for the migrate_pages() batching series. Thanks Hugh and Pengfei. Analysis shows that if we have locked some other folios except the one we are migrating, it's not safe in general to wait synchronously, for example, to wait the writeback to complete or wait to lock the buffer head. So 1/3 fixes the deadlock in a simple way, where the batching support for the synchronous migration is disabled. The change is straightforward and easy to be understood. While 3/3 re-introduce the batching for synchronous migration via trying to migrate asynchronously in batch optimistically, then fall back to migrate synchronously one by one for fail-to-migrate folios. Test shows that this can restore the TLB flushing batching performance for synchronous migration effectively. This patch (of 3): Two deadlock bugs were reported for the migrate_pages() batching series. Thanks Hugh and Pengfei! For example, in the following deadlock trace snippet, INFO: task kworker/u4:0:9 blocked for more than 147 seconds. Not tainted 6.2.0-rc4-kvm+ #1314 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:kworker/u4:0 state:D stack:0 pid:9 ppid:2 flags:0x00004000 Workqueue: loop4 loop_rootcg_workfn Call Trace: __schedule+0x43b/0xd00 schedule+0x6a/0xf0 io_schedule+0x4a/0x80 folio_wait_bit_common+0x1b5/0x4e0 ? __pfx_wake_page_function+0x10/0x10 __filemap_get_folio+0x73d/0x770 shmem_get_folio_gfp+0x1fd/0xc80 shmem_write_begin+0x91/0x220 generic_perform_write+0x10e/0x2e0 __generic_file_write_iter+0x17e/0x290 ? generic_write_checks+0x12b/0x1a0 generic_file_write_iter+0x97/0x180 ? __sanitizer_cov_trace_const_cmp4+0x1a/0x20 do_iter_readv_writev+0x13c/0x210 ? __sanitizer_cov_trace_const_cmp4+0x1a/0x20 do_iter_write+0xf6/0x330 vfs_iter_write+0x46/0x70 loop_process_work+0x723/0xfe0 loop_rootcg_workfn+0x28/0x40 process_one_work+0x3cc/0x8d0 worker_thread+0x66/0x630 ? __pfx_worker_thread+0x10/0x10 kthread+0x153/0x190 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x29/0x50 INFO: task repro:1023 blocked for more than 147 seconds. Not tainted 6.2.0-rc4-kvm+ #1314 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:repro state:D stack:0 pid:1023 ppid:360 flags:0x00004004 Call Trace: __schedule+0x43b/0xd00 schedule+0x6a/0xf0 io_schedule+0x4a/0x80 folio_wait_bit_common+0x1b5/0x4e0 ? compaction_alloc+0x77/0x1150 ? __pfx_wake_page_function+0x10/0x10 folio_wait_bit+0x30/0x40 folio_wait_writeback+0x2e/0x1e0 migrate_pages_batch+0x555/0x1ac0 ? __pfx_compaction_alloc+0x10/0x10 ? __pfx_compaction_free+0x10/0x10 ? __this_cpu_preempt_check+0x17/0x20 ? lock_is_held_type+0xe6/0x140 migrate_pages+0x100e/0x1180 ? __pfx_compaction_free+0x10/0x10 ? __pfx_compaction_alloc+0x10/0x10 compact_zone+0xe10/0x1b50 ? lock_is_held_type+0xe6/0x140 ? check_preemption_disabled+0x80/0xf0 compact_node+0xa3/0x100 ? __sanitizer_cov_trace_const_cmp8+0x1c/0x30 ? _find_first_bit+0x7b/0x90 sysctl_compaction_handler+0x5d/0xb0 proc_sys_call_handler+0x29d/0x420 proc_sys_write+0x2b/0x40 vfs_write+0x3a3/0x780 ksys_write+0xb7/0x180 __x64_sys_write+0x26/0x30 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7f3a2471f59d RSP: 002b:00007ffe567f7288 EFLAGS: 00000217 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f3a2471f59d RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000005 RBP: 00007ffe567f72a0 R08: 0000000000000010 R09: 0000000000000010 R10: 0000000000000010 R11: 0000000000000217 R12: 00000000004012e0 R13: 00007ffe567f73e0 R14: 0000000000000000 R15: 0000000000000000 The page migration task has held the lock of the shmem folio A, and is waiting the writeback of the folio B of the file system on the loop block device to complete. While the loop worker task which writes back the folio B is waiting to lock the shmem folio A, because the folio A backs the folio B in the loop device. Thus deadlock is triggered. In general, if we have locked some other folios except the one we are migrating, it's not safe to wait synchronously, for example, to wait the writeback to complete or wait to lock the buffer head. To fix the deadlock, in this patch, we avoid to batch the page migration except for MIGRATE_ASYNC mode. In MIGRATE_ASYNC mode, synchronous waiting is avoided. The fix can be improved further. We will do that as soon as possible. Link: https://lkml.kernel.org/r/20230303030155.160983-1-ying.huang@intel.com Link: https://lore.kernel.org/linux-mm/87a6c8c-c5c1-67dc-1e32-eb30831d6e3d@google.com/ Link: https://lore.kernel.org/linux-mm/874jrg7kke.fsf@yhuang6-desk2.ccr.corp.intel.com/ Link: https://lore.kernel.org/linux-mm/20230227110614.dngdub2j3exr6dfp@quack3/ Link: https://lkml.kernel.org/r/20230303030155.160983-2-ying.huang@intel.com Fixes: 5dfab109d519 ("migrate_pages: batch _unmap and _move") Signed-off-by: "Huang, Ying" Reported-by: Hugh Dickins Reported-by: "Xu, Pengfei" Cc: Jan Kara Cc: Baolin Wang Cc: Christoph Hellwig Cc: Stefan Roesch Cc: Tejun Heo Cc: Xin Hao Cc: Zi Yan Cc: Yang Shi Cc: Matthew Wilcox Cc: Mike Kravetz Signed-off-by: Andrew Morton commit 89a004508081e1d1a498f10ea6d4f7f97a820438 Author: Alexandre Ghiti Date: Wed Mar 1 10:01:32 2023 +0100 .mailmap: add Alexandre Ghiti personal email address I'm no longer employed by Canonical which results in email bouncing so add an entry to my personal email address. Link: https://lkml.kernel.org/r/20230301090132.280475-1-alexghiti@rivosinc.com Signed-off-by: Alexandre Ghiti Reported-by: Conor Dooley Signed-off-by: Andrew Morton commit 071ca76d2c1dddc6bf2f4917a016207e00bcc8e3 Author: Konrad Dybcio Date: Wed Mar 1 12:00:12 2023 +0100 mailmap: correct Dikshita Agarwal's Qualcomm email address I recently sent a patch to map Dikshita's old CAF address to his current one @ Qualcomm. It turned out however, that he has two of them, with the @quicinc.com one meant for upstream contributions. Fix it. Link: https://lkml.kernel.org/r/20230301110012.1290379-1-konrad.dybcio@linaro.org Signed-off-by: Konrad Dybcio Cc: Dikshita Agarwal Cc: Andy Gross Cc: Arnd Bergmann Cc: Baolin Wang Cc: Bjorn Andersson Cc: Colin Ian King Cc: Kirill Tkhai Cc: Marijn Suijten Cc: Qais Yousef Cc: Vasily Averin Signed-off-by: Andrew Morton commit af665b40dfa2b49f1e3e11ecd1096506ef40348d Author: Jarkko Sakkinen Date: Thu Mar 2 01:54:42 2023 +0200 mailmap: updates for Jarkko Sakkinen Update to my current employer: https://research.tuni.fi/nisec/ Link: https://lkml.kernel.org/r/20230301235443.6663-1-jarkko@kernel.org Signed-off-by: Jarkko Sakkinen Cc: Arnd Bergmann Cc: Baolin Wang Cc: Ben Widawsky Cc: Bjorn Andersson Cc: Colin Ian King Cc: Kirill Tkhai Cc: Qais Yousef Cc: Vasily Averin Signed-off-by: Andrew Morton commit 42b2af2c9b7eede8ef21d0943f84d135e21a32a3 Author: David Hildenbrand Date: Thu Mar 2 18:54:23 2023 +0100 mm/userfaultfd: propagate uffd-wp bit when PTE-mapping the huge zeropage Currently, we'd lose the userfaultfd-wp marker when PTE-mapping a huge zeropage, resulting in the next write faults in the PMD range not triggering uffd-wp events. Various actions (partial MADV_DONTNEED, partial mremap, partial munmap, partial mprotect) could trigger this. However, most importantly, un-protecting a single sub-page from the userfaultfd-wp handler when processing a uffd-wp event will PTE-map the shared huge zeropage and lose the uffd-wp bit for the remainder of the PMD. Let's properly propagate the uffd-wp bit to the PMDs. #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include #include static size_t pagesize; static int uffd; static volatile bool uffd_triggered; #define barrier() __asm__ __volatile__("": : :"memory") static void uffd_wp_range(char *start, size_t size, bool wp) { struct uffdio_writeprotect uffd_writeprotect; uffd_writeprotect.range.start = (unsigned long) start; uffd_writeprotect.range.len = size; if (wp) { uffd_writeprotect.mode = UFFDIO_WRITEPROTECT_MODE_WP; } else { uffd_writeprotect.mode = 0; } if (ioctl(uffd, UFFDIO_WRITEPROTECT, &uffd_writeprotect)) { fprintf(stderr, "UFFDIO_WRITEPROTECT failed: %d\n", errno); exit(1); } } static void *uffd_thread_fn(void *arg) { static struct uffd_msg msg; ssize_t nread; while (1) { struct pollfd pollfd; int nready; pollfd.fd = uffd; pollfd.events = POLLIN; nready = poll(&pollfd, 1, -1); if (nready == -1) { fprintf(stderr, "poll() failed: %d\n", errno); exit(1); } nread = read(uffd, &msg, sizeof(msg)); if (nread <= 0) continue; if (msg.event != UFFD_EVENT_PAGEFAULT || !(msg.arg.pagefault.flags & UFFD_PAGEFAULT_FLAG_WP)) { printf("FAIL: wrong uffd-wp event fired\n"); exit(1); } /* un-protect the single page. */ uffd_triggered = true; uffd_wp_range((char *)(uintptr_t)msg.arg.pagefault.address, pagesize, false); } return arg; } static int setup_uffd(char *map, size_t size) { struct uffdio_api uffdio_api; struct uffdio_register uffdio_register; pthread_t thread; uffd = syscall(__NR_userfaultfd, O_CLOEXEC | O_NONBLOCK | UFFD_USER_MODE_ONLY); if (uffd < 0) { fprintf(stderr, "syscall() failed: %d\n", errno); return -errno; } uffdio_api.api = UFFD_API; uffdio_api.features = UFFD_FEATURE_PAGEFAULT_FLAG_WP; if (ioctl(uffd, UFFDIO_API, &uffdio_api) < 0) { fprintf(stderr, "UFFDIO_API failed: %d\n", errno); return -errno; } if (!(uffdio_api.features & UFFD_FEATURE_PAGEFAULT_FLAG_WP)) { fprintf(stderr, "UFFD_FEATURE_WRITEPROTECT missing\n"); return -ENOSYS; } uffdio_register.range.start = (unsigned long) map; uffdio_register.range.len = size; uffdio_register.mode = UFFDIO_REGISTER_MODE_WP; if (ioctl(uffd, UFFDIO_REGISTER, &uffdio_register) < 0) { fprintf(stderr, "UFFDIO_REGISTER failed: %d\n", errno); return -errno; } pthread_create(&thread, NULL, uffd_thread_fn, NULL); return 0; } int main(void) { const size_t size = 4 * 1024 * 1024ull; char *map, *cur; pagesize = getpagesize(); map = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0); if (map == MAP_FAILED) { fprintf(stderr, "mmap() failed\n"); return -errno; } if (madvise(map, size, MADV_HUGEPAGE)) { fprintf(stderr, "MADV_HUGEPAGE failed\n"); return -errno; } if (setup_uffd(map, size)) return 1; /* Read the whole range, populating zeropages. */ madvise(map, size, MADV_POPULATE_READ); /* Write-protect the whole range. */ uffd_wp_range(map, size, true); /* Make sure uffd-wp triggers on each page. */ for (cur = map; cur < map + size; cur += pagesize) { uffd_triggered = false; barrier(); /* Trigger a write fault. */ *cur = 1; barrier(); if (!uffd_triggered) { printf("FAIL: uffd-wp did not trigger\n"); return 1; } } printf("PASS: uffd-wp triggered\n"); return 0; } Link: https://lkml.kernel.org/r/20230302175423.589164-1-david@redhat.com Fixes: e06f1e1dd499 ("userfaultfd: wp: enabled write protection in userfaultfd API") Signed-off-by: David Hildenbrand Acked-by: Peter Xu Cc: Mike Rapoport Cc: Andrea Arcangeli Cc: Jerome Glisse Cc: Shaohua Li Cc: Signed-off-by: Andrew Morton commit 63cf584203f3367c8b073d417c8e5cbbfc450506 Author: James Houghton Date: Thu Mar 2 22:24:04 2023 +0000 mm: teach mincore_hugetlb about pte markers By checking huge_pte_none(), we incorrectly classify PTE markers as "present". Instead, check huge_pte_none_mostly(), classifying PTE markers the same as if the PTE were completely blank. PTE markers, unlike other kinds of swap entries, don't reference any physical page and don't indicate that a physical page was mapped previously. As such, treat them as non-present for the sake of mincore(). Link: https://lkml.kernel.org/r/20230302222404.175303-1-jthoughton@google.com Fixes: 5c041f5d1f23 ("mm: teach core mm about pte markers") Signed-off-by: James Houghton Acked-by: Peter Xu Acked-by: David Hildenbrand Cc: Axel Rasmussen Cc: James Houghton Cc: Signed-off-by: Andrew Morton commit 675dfe1223a69e270b3d52cb0211c8a501455cec Author: Filipe Manana Date: Mon Mar 6 10:13:34 2023 +0000 btrfs: fix block group item corruption after inserting new block group We can often end up inserting a block group item, for a new block group, with a wrong value for the used bytes field. This happens if for the new allocated block group, in the same transaction that created the block group, we have tasks allocating extents from it as well as tasks removing extents from it. For example: 1) Task A creates a metadata block group X; 2) Two extents are allocated from block group X, so its "used" field is updated to 32K, and its "commit_used" field remains as 0; 3) Transaction commit starts, by some task B, and it enters btrfs_start_dirty_block_groups(). There it tries to update the block group item for block group X, which currently has its "used" field with a value of 32K. But that fails since the block group item was not yet inserted, and so on failure update_block_group_item() sets the "commit_used" field of the block group back to 0; 4) The block group item is inserted by task A, when for example btrfs_create_pending_block_groups() is called when releasing its transaction handle. This results in insert_block_group_item() inserting the block group item in the extent tree (or block group tree), with a "used" field having a value of 32K, but without updating the "commit_used" field in the block group, which remains with value of 0; 5) The two extents are freed from block X, so its "used" field changes from 32K to 0; 6) The transaction commit by task B continues, it enters btrfs_write_dirty_block_groups() which calls update_block_group_item() for block group X, and there it decides to skip the block group item update, because "used" has a value of 0 and "commit_used" has a value of 0 too. As a result, we end up with a block item having a 32K "used" field but no extents allocated from it. When this issue happens, a btrfs check reports an error like this: [1/7] checking root items [2/7] checking extents block group [1104150528 1073741824] used 39796736 but extent items used 0 ERROR: errors found in extent allocation tree or chunk allocation (...) Fix this by making insert_block_group_item() update the block group's "commit_used" field. Fixes: 7248e0cebbef ("btrfs: skip update of block group item if used bytes are the same") CC: stable@vger.kernel.org # 6.2+ Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit e33062213ff2f9151e0d125e1c00f524c2b7acfe Author: Sagi Grimberg Date: Fri Mar 3 10:43:23 2023 +0200 docs: sysfs-block: document hidden sysfs entry /sys/block//hidden is undocumented. Document it. Signed-off-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20230303084323.228098-1-sagi@grimberg.me Signed-off-by: Jens Axboe commit 37d9df224d1eec1b434fe9ffa40104c756478c29 Author: Jakub Kicinski Date: Mon Mar 6 12:04:57 2023 -0800 ynl: re-license uniformly under GPL-2.0 OR BSD-3-Clause I was intending to make all the Netlink Spec code BSD-3-Clause to ease the adoption but it appears that: - I fumbled the uAPI and used "GPL WITH uAPI note" there - it gives people pause as they expect GPL in the kernel As suggested by Chuck re-license under dual. This gives us benefit of full BSD freedom while fulfilling the broad "kernel is under GPL" expectations. Link: https://lore.kernel.org/all/20230304120108.05dd44c5@kernel.org/ Link: https://lore.kernel.org/r/20230306200457.3903854-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit b1649b0fe98c2c7eed156c957f6f524d5660d859 Author: Stephen Hemminger Date: Mon Mar 6 11:44:05 2023 -0800 mailmap: update entries for Stephen Hemminger Map all my old email addresses to current address. Signed-off-by: Stephen Hemminger Link: https://lore.kernel.org/r/20230306194405.108236-1-stephen@networkplumber.org Signed-off-by: Jakub Kicinski commit e7b15acdc10f74872fdae1482b3f837818362085 Author: Jakub Kicinski Date: Mon Mar 6 11:20:18 2023 -0800 mailmap: add entry for Maxim Mikityanskiy Map Maxim's old corporate addresses to his personal one. Link: https://lore.kernel.org/r/20230306192018.3894988-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 7d834b4d1ab66c48e8c0810fdeadaabb80fa2c81 Author: Fedor Pchelkin Date: Tue Mar 7 00:26:50 2023 +0300 nfc: change order inside nfc_se_io error path cb_context should be freed on the error path in nfc_se_io as stated by commit 25ff6f8a5a3b ("nfc: fix memory leak of se_io context in nfc_genl_se_io"). Make the error path in nfc_se_io unwind everything in reverse order, i.e. free the cb_context after unlocking the device. Suggested-by: Krzysztof Kozlowski Signed-off-by: Fedor Pchelkin Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230306212650.230322-1-pchelkin@ispras.ru Signed-off-by: Jakub Kicinski commit 8f5c5a790e3025d6eca96bf7ee5e3873dc92373f Author: Arnd Bergmann Date: Tue Feb 14 16:25:36 2023 +0100 ethernet: ice: avoid gcc-9 integer overflow warning With older compilers like gcc-9, the calculation of the vlan priority field causes a false-positive warning from the byteswap: In file included from drivers/net/ethernet/intel/ice/ice_tc_lib.c:4: drivers/net/ethernet/intel/ice/ice_tc_lib.c: In function 'ice_parse_cls_flower': include/uapi/linux/swab.h:15:15: error: integer overflow in expression '(int)(short unsigned int)((int)match.key->..vlan_priority << 13) & 57344 & 255' of type 'int' results in '0' [-Werror=overflow] 15 | (((__u16)(x) & (__u16)0x00ffU) << 8) | \ | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ include/uapi/linux/swab.h:106:2: note: in expansion of macro '___constant_swab16' 106 | ___constant_swab16(x) : \ | ^~~~~~~~~~~~~~~~~~ include/uapi/linux/byteorder/little_endian.h:42:43: note: in expansion of macro '__swab16' 42 | #define __cpu_to_be16(x) ((__force __be16)__swab16((x))) | ^~~~~~~~ include/linux/byteorder/generic.h:96:21: note: in expansion of macro '__cpu_to_be16' 96 | #define cpu_to_be16 __cpu_to_be16 | ^~~~~~~~~~~~~ drivers/net/ethernet/intel/ice/ice_tc_lib.c:1458:5: note: in expansion of macro 'cpu_to_be16' 1458 | cpu_to_be16((match.key->vlan_priority << | ^~~~~~~~~~~ After a change to be16_encode_bits(), the code becomes more readable to both people and compilers, which avoids the warning. Fixes: 34800178b302 ("ice: Add support for VLAN priority filters in switchdev") Suggested-by: Alexander Lobakin Signed-off-by: Arnd Bergmann Reviewed-by: Alexander Lobakin Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit c4a9c8e78aad0fd9b79c9b1e83bab3288a15ce3c Author: Michal Swiatkowski Date: Mon Feb 13 12:27:33 2023 +0100 ice: don't ignore return codes in VSI related code There were few smatch warnings reported by Dan: - ice_vsi_cfg_xdp_txqs can return 0 instead of ret, which is cleaner - return values in ice_vsi_cfg_def were ignored - in ice_vsi_rebuild return value was ignored in case rebuild failed, it was a never reached code, however, rewrite it for clarity. - ice_vsi_cfg_tc can return 0 instead of ret Fixes: 6624e780a577 ("ice: split ice_vsi_setup into smaller functions") Reported-by: Dan Carpenter Signed-off-by: Michal Swiatkowski Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit fef3f92e8a4214652d8f33f50330dc5a92efbf11 Author: Dave Ertman Date: Fri Jan 27 14:24:10 2023 +0100 ice: Fix DSCP PFC TLV creation When creating the TLV to send to the FW for configuring DSCP mode PFC,the PFCENABLE field was being masked with a 4 bit mask (0xF), but this is an 8 bit bitmask for enabled classes for PFC. This means that traffic classes 4-7 could not be enabled for PFC. Remove the mask completely, as it is not necessary, as we are assigning 8 bits to an 8 bit field. Fixes: 2a87bd73e50d ("ice: Add DSCP support") Signed-off-by: Dave Ertman Signed-off-by: Karen Ostrowska Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 2d99a7ec25cf456cd3680eb314d6454138e5aa64 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 c53899138c99236482a3c25d674f44723336afa3 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 06630fb9fcd761254a8d8b53dd6f859b3ecf3707 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 7d386975f6a495902e679a3a250a7456d7e54765 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 Cc: stable@vger.kernel.org commit e5eef23e267c72521d81f23f7f82d1f523d4a253 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 Cc: stable@vger.kernel.org commit bf89b7ee52af5a5944fa3539e86089f72475055b Author: Conor Dooley Date: Thu Mar 2 17:41:55 2023 +0000 RISC-V: fix taking the text_mutex twice during sifive errata patching Chris pointed out that some bonehead, *cough* me *cough*, added two mutex_locks() to the SiFive errata patching. The second was meant to have been a mutex_unlock(). This results in errors such as Unable to handle kernel NULL pointer dereference at virtual address 0000000000000030 Oops [#1] Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted 6.2.0-rc1-starlight-00079-g9493e6f3ce02 #229 Hardware name: BeagleV Starlight Beta (DT) epc : __schedule+0x42/0x500 ra : schedule+0x46/0xce epc : ffffffff8065957c ra : ffffffff80659a80 sp : ffffffff81203c80 gp : ffffffff812d50a0 tp : ffffffff8120db40 t0 : ffffffff81203d68 t1 : 0000000000000001 t2 : 4c45203a76637369 s0 : ffffffff81203cf0 s1 : ffffffff8120db40 a0 : 0000000000000000 a1 : ffffffff81213958 a2 : ffffffff81213958 a3 : 0000000000000000 a4 : 0000000000000000 a5 : ffffffff80a1bd00 a6 : 0000000000000000 a7 : 0000000052464e43 s2 : ffffffff8120db41 s3 : ffffffff80a1ad00 s4 : 0000000000000000 s5 : 0000000000000002 s6 : ffffffff81213938 s7 : 0000000000000000 s8 : 0000000000000000 s9 : 0000000000000001 s10: ffffffff812d7204 s11: ffffffff80d3c920 t3 : 0000000000000001 t4 : ffffffff812e6dd7 t5 : ffffffff812e6dd8 t6 : ffffffff81203bb8 status: 0000000200000100 badaddr: 0000000000000030 cause: 000000000000000d [] schedule+0x46/0xce [] schedule_preempt_disabled+0x16/0x28 [] __mutex_lock.constprop.0+0x3fe/0x652 [] __mutex_lock_slowpath+0xe/0x16 [] mutex_lock+0x42/0x4c [] sifive_errata_patch_func+0xf6/0x18c [] _apply_alternatives+0x74/0x76 [] apply_boot_alternatives+0x3c/0xfa [] setup_arch+0x60c/0x640 [] start_kernel+0x8e/0x99c ---[ end trace 0000000000000000 ]--- Reported-by: Chris Hofstaedtler Fixes: 9493e6f3ce02 ("RISC-V: take text_mutex during alternative patching") Signed-off-by: Conor Dooley Tested-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230302174154.970746-1-conor@kernel.org [Palmer: pick up Geert's bug report from the thread] Signed-off-by: Palmer Dabbelt commit bc463201f60803fa6bf2741d59441031cd0910e4 Author: Johan Hovold Date: Mon Mar 6 08:56:34 2023 +0100 interconnect: qcom: rpm: fix probe child-node error handling Make sure to clean up and release resources properly also in case probe fails when populating child devices. Fixes: e39bf2972c6e ("interconnect: icc-rpm: Support child NoC device probe") Cc: stable@vger.kernel.org # 5.17 Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230306075651.2449-7-johan+linaro@kernel.org Signed-off-by: Georgi Djakov commit 174941ed28a3573db075da46d95b4dcf9d4c49c2 Author: Johan Hovold Date: Mon Mar 6 08:56:33 2023 +0100 interconnect: qcom: osm-l3: fix registration race The current interconnect provider registration interface is inherently racy as nodes are not added until the after adding the provider. This can specifically cause racing DT lookups to fail: of_icc_xlate_onecell: invalid index 0 cpu cpu0: error -EINVAL: error finding src node cpu cpu0: dev_pm_opp_of_find_icc_paths: Unable to get path0: -22 qcom-cpufreq-hw: probe of 18591000.cpufreq failed with error -22 Switch to using the new API where the provider is not registered until after it has been fully initialised. Fixes: 5bc9900addaf ("interconnect: qcom: Add OSM L3 interconnect provider support") Cc: stable@vger.kernel.org # 5.7 Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230306075651.2449-6-johan+linaro@kernel.org Signed-off-by: Georgi Djakov commit 9fbd35520f1f7f3cbe1873939a27ad9b009f21f9 Author: Johan Hovold Date: Mon Mar 6 08:56:32 2023 +0100 interconnect: imx: fix registration race The current interconnect provider registration interface is inherently racy as nodes are not added until the after adding the provider. This can specifically cause racing DT lookups to fail. Switch to using the new API where the provider is not registered until after it has been fully initialised. Fixes: f0d8048525d7 ("interconnect: Add imx core driver") Cc: stable@vger.kernel.org # 5.8 Cc: Alexandre Bailon Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Tested-by: Luca Ceresoli # i.MX8MP MSC SM2-MB-EP1 Board Link: https://lore.kernel.org/r/20230306075651.2449-5-johan+linaro@kernel.org Signed-off-by: Georgi Djakov commit eb59eca0d8ac15f8c1b7f1cd35999455a90292c0 Author: Johan Hovold Date: Mon Mar 6 08:56:31 2023 +0100 interconnect: fix provider registration API The current interconnect provider interface is inherently racy as providers are expected to be added before being fully initialised. Specifically, nodes are currently not added and the provider data is not initialised until after registering the provider which can cause racing DT lookups to fail. Add a new provider API which will be used to fix up the interconnect drivers. The old API is reimplemented using the new interface and will be removed once all drivers have been fixed. Fixes: 11f1ceca7031 ("interconnect: Add generic on-chip interconnect API") Fixes: 87e3031b6fbd ("interconnect: Allow endpoints translation via DT") Cc: stable@vger.kernel.org # 5.1 Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Tested-by: Luca Ceresoli # i.MX8MP MSC SM2-MB-EP1 Board Link: https://lore.kernel.org/r/20230306075651.2449-4-johan+linaro@kernel.org Signed-off-by: Georgi Djakov commit e0e7089bf9a87bc5e3997422e4e24563424f9018 Author: Johan Hovold Date: Mon Mar 6 08:56:30 2023 +0100 interconnect: fix icc_provider_del() error handling The interconnect framework currently expects that providers are only removed when there are no users and after all nodes have been removed. There is currently nothing that guarantees this to be the case and the framework does not do any reference counting, but refusing to remove the provider is never correct as that would leave a dangling pointer to a resource that is about to be released in the global provider list (e.g. accessible through debugfs). Replace the current sanity checks with WARN_ON() so that the provider is always removed. Fixes: 11f1ceca7031 ("interconnect: Add generic on-chip interconnect API") Cc: stable@vger.kernel.org # 5.1: 680f8666baf6: interconnect: Make icc_provider_del() return void Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Tested-by: Luca Ceresoli # i.MX8MP MSC SM2-MB-EP1 Board Link: https://lore.kernel.org/r/20230306075651.2449-3-johan+linaro@kernel.org Signed-off-by: Georgi Djakov commit a5904f415e1af72fa8fe6665aa4f554dc2099a95 Author: Johan Hovold Date: Mon Mar 6 08:56:29 2023 +0100 interconnect: fix mem leak when freeing nodes The node link array is allocated when adding links to a node but is not deallocated when nodes are destroyed. Fixes: 11f1ceca7031 ("interconnect: Add generic on-chip interconnect API") Cc: stable@vger.kernel.org # 5.1 Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Tested-by: Luca Ceresoli # i.MX8MP MSC SM2-MB-EP1 Board Link: https://lore.kernel.org/r/20230306075651.2449-2-johan+linaro@kernel.org Signed-off-by: Georgi Djakov commit 63355b9884b3d1677de6bd1517cd2b8a9bf53978 Author: Linus Torvalds Date: Tue Mar 7 12:16:18 2023 -0800 cpumask: be more careful with 'cpumask_setall()' Commit 596ff4a09b89 ("cpumask: re-introduce constant-sized cpumask optimizations") changed cpumask_setall() to use "bitmap_set()" instead of "bitmap_fill()", because bitmap_fill() would explicitly set all the bits of a constant sized small bitmap, and that's exactly what we don't want: we want to only set bits up to 'nr_cpu_ids', which is what "bitmap_set()" does. However, Yury correctly points out that while "bitmap_set()" does indeed only set bits up to the required bitmap size, it doesn't _clear_ bits above that size, so the upper bits would still not have well-defined values. Now, none of this should really matter, since any bits set past 'nr_cpu_ids' should always be ignored in the first place. Yes, the bit scanning functions might return them as a result, but since users should always consider the ">= nr_cpu_ids" condition to mean "no more bits", that shouldn't have any actual effect (see previous commit 8ca09d5fa354 "cpumask: fix incorrect cpumask scanning result checks"). But let's just do it right, the way the code was _intended_ to work. We have had enough lazy code that works but bites us in the *rse later (again, see previous commit) that there's no reason to not just do this properly. It turns out that "bitmap_fill()" gets this all right for the complex case, and really only fails for the inlined optimized case that just fills the whole word. And while we could just fix bitmap_fill() to use the proper last word mask, there's two issues with that: - the cpumask case wants to do the _optimization_ based on "NR_CPUS is a small constant", but then wants to do the actual bit _fill_ based on "nr_cpu_ids" that isn't necessarily that same constant - we have lots of non-cpumask users of bitmap_fill(), and while they hopefully don't care, and probably would want the proper semantics anyway ("only set bits up to the limit"), I do not want the cpumask changes to impact other parts So this ends up just doing the single-word optimization by hand in the cpumask code. If our cpumask is fundamentally limited to a single word, just do the proper "fill in that word" exactly. And if it's the more complex multi-word case, then the generic bitmap_fill() will DTRT. This is all an example of how our bitmap function optimizations really are somewhat broken. They conflate the "this is size of the bitmap" optimizations with the actual bit(s) we want to set. In many cases we really want to have the two be separate things: sometimes we base our optimizations on the size of the whole bitmap ("I know this whole bitmap fits in a single word, so I'll just use single-word accesses"), and sometimes we base them on the bit we are looking at ("this is just acting on bits that are in the first word, so I'll use single-word accesses"). Notice how the end result of the two optimizations are the same, but the way we get to them are quite different. And all our cpumask optimization games are really about that fundamental distinction, and we'd often really want to pass in both the "this is the bit I'm working on" (which _can_ be a small constant but might be variable), and "I know it's in this range even if it's variable" (based on CONFIG_NR_CPUS). So this cpumask_setall() implementation just makes that explicit. It checks the "I statically know the size is small" using the known static size of the cpumask (which is what that 'small_cpumask_bits' is all about), but then sets the actual bits using the exact number of cpus we have (ie 'nr_cpumask_bits') Of course, in a perfect world, the compiler would have done all the range analysis (possibly with help from us just telling it that "this value is always in this range"), and would do all of this for us. But that is not the world we live in. While we dream of that perfect world, this does that manual logic to make it all work out. And this was a very long explanation for a small code change that shouldn't even matter. Reported-by: Yury Norov Link: https://lore.kernel.org/lkml/ZAV9nGG9e1%2FrV+L%2F@yury-laptop/ Signed-off-by: Linus Torvalds commit 87eae260995577d203a70d72d46976521a5687e1 Author: Mike Rapoport (IBM) Date: Fri Feb 24 12:03:06 2023 +0200 docs/mm: hugetlbfs_reserv: fix a reference to a file that doesn't exist kbuild reports: >> Warning: Documentation/mm/hugetlbfs_reserv.rst references a file that doesn't exist: Documentation/mm/hugetlbpage.rst >> Warning: Documentation/translations/zh_CN/mm/hugetlbfs_reserv.rst references a file that doesn't exist: Documentation/mm/hugetlbpage.rst Fix the filename to be 'Documentation/admin-guide/mm/hugetlbpage.rst'. Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202302231854.sKlCmx9K-lkp@intel.com/ Fixes: ee86588960e2 ("docs/mm: remove useless markup") Signed-off-by: Mike Rapoport (IBM) Link: https://lore.kernel.org/r/20230224100306.2287696-2-rppt@kernel.org Signed-off-by: Jonathan Corbet commit 3b80a03d455143cc9135dac86722bbdd079daff3 Author: Mike Rapoport (IBM) Date: Fri Feb 24 12:03:05 2023 +0200 docs/mm: Physical Memory: fix a reference to a file that doesn't exist kbuild reports: >> Warning: Documentation/mm/physical_memory.rst references a file that doesn't exist: Documentation/admin-guide/mm/memory_hotplug.rst Fix the filename to be 'Documentation/admin-guide/mm/memory-hotplug.rst'. Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202302231311.567PAoS2-lkp@intel.com/ Fixes: 353c7dd636ed ("docs/mm: Physical Memory: remove useless markup") Signed-off-by: Mike Rapoport (IBM) Link: https://lore.kernel.org/r/20230224100306.2287696-1-rppt@kernel.org Signed-off-by: Jonathan Corbet commit a7ee5b426fb66f5eab1790339f1c722060d3d6fc Merge: e45cd86c3a78b 376f79bbf521f Author: Mark Brown Date: Tue Mar 7 17:28:39 2023 +0000 SoC: SOF: Intel: FIx device descriptions (missing Merge series from Peter Ujfalusi : We have recently noticed that the ops_free callback was missed for the device descriptions on Intel platforms. commit 9a9a8fe26751334b7739193a94eba741073b8a55 Author: Thomas Hellström Date: Tue Mar 7 15:46:15 2023 +0100 drm/ttm: Fix a NULL pointer dereference The LRU mechanism may look up a resource in the process of being removed from an object. The locking rules here are a bit unclear but it looks currently like res->bo assignment is protected by the LRU lock, whereas bo->resource is protected by the object lock, while *clearing* of bo->resource is also protected by the LRU lock. This means that if we check that bo->resource points to the LRU resource under the LRU lock we should be safe. So perform that check before deciding to swap out a bo. That avoids dereferencing a NULL bo->resource in ttm_bo_swapout(). Fixes: 6a9b02899402 ("drm/ttm: move the LRU into resource handling v4") Cc: Christian König Cc: Daniel Vetter Cc: Christian Koenig Cc: Huang Rui Cc: Alex Deucher Cc: Felix Kuehling Cc: Philip Yang Cc: Qiang Yu Cc: Matthew Auld Cc: Nirmoy Das Cc: Tvrtko Ursulin Cc: "Thomas Hellström" Cc: Anshuman Gupta Cc: Arunpravin Paneer Selvam Cc: dri-devel@lists.freedesktop.org Cc: # v5.19+ Signed-off-by: Thomas Hellström Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20230307144621.10748-2-thomas.hellstrom@linux.intel.com commit a414684e3b735a4114c19295a07e8cb2eb889dae Author: Uwe Kleine-König Date: Tue Feb 28 14:46:57 2023 +0100 docs: rebasing-and-merging: Drop wrong statement about git The "^0" syntax is no longer needed to fast-forward to a mainline commit; take that out and add --ff-only to force an error if fast-forward is not possible. Signed-off-by: Uwe Kleine-König [jc: rewrote changelog] Link: https://lore.kernel.org/r/20230228134657.1797871-1-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Corbet commit 0b02076f995332fe1e457da29dd61c3b66c862f7 Author: Miguel Ojeda Date: Mon Mar 6 20:17:12 2023 +0100 docs: programming-language: add Rust programming language section Following the C text in the file, add a mention about the Rust programming language, the currently supported compiler and the edition used (similar to the "dialect" mention for C). Similarly, add a mention about the unstable features used (similar to the "extensions" mentions for C). In addition, add some links to complement the information. Signed-off-by: Miguel Ojeda Link: https://lore.kernel.org/r/20230306191712.230658-2-ojeda@kernel.org Signed-off-by: Jonathan Corbet commit 38484a1d0c50596c8080a00c269466f60fa4a051 Author: Miguel Ojeda Date: Mon Mar 6 20:17:11 2023 +0100 docs: programming-language: remove mention of the Intel compiler The Intel compiler support has been removed in commit 95207db8166a ("Remove Intel compiler support"). Thus remove its mention in the Documentation too. Signed-off-by: Miguel Ojeda Reviewed-by: Vincenzo Palazzo Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/r/20230306191712.230658-1-ojeda@kernel.org Signed-off-by: Jonathan Corbet commit 74596085796fae0cfce3e42ee46bf4f8acbdac55 Author: Glenn Washburn Date: Mon Feb 27 12:40:42 2023 -0600 docs: Correct missing "d_" prefix for dentry_operations member d_weak_revalidate The details for struct dentry_operations member d_weak_revalidate is missing a "d_" prefix. Fixes: af96c1e304f7 ("docs: filesystems: vfs: Convert vfs.txt to RST") Signed-off-by: Glenn Washburn Reviewed-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20230227184042.2375235-1-development@efficientek.com Signed-off-by: Jonathan Corbet commit 5d89176af1ae201c01c10a89b68b27cfc683b76c Author: Song Shuai Date: Mon Feb 27 18:59:41 2023 +0800 sched/doc: supplement CPU capacity with RISC-V This commit 7d2078310cbf ("dt-bindings: arm: move cpu-capacity to a shared loation") updates some references about capacity-dmips-mhz property in this document. The list of architectures using capacity-dmips-mhz omits RISC-V, so supplements it here. Signed-off-by: Song Shuai Reviewed-by: Palmer Dabbelt # English Acked-by: Palmer Dabbelt Reviewed-by: Alex Shi Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230227105941.2749193-1-suagrfillet@gmail.com Signed-off-by: Jonathan Corbet commit 78aedee18a86abb0bb8e31d994467c46656e9b5d Author: Dan Johansen Date: Sun Mar 5 11:47:31 2023 +0100 arm64: dts: rockchip: Lower SD card speed on rk3399 Pinebook Pro MicroSD card slot in the Pinebook Pro is located on a separate daughterboard that's connected to the mainboard using a rather long flat cable. The resulting signal degradation causes many perfectly fine microSD cards not to work in the Pinebook Pro, which is a common source of frustration among the owners. Changing the mode and lowering the speed reportedly fixes this issue and makes many microSD cards work as expected. Co-developed-by: Dragan Simic Signed-off-by: Dragan Simic Tested-by: JR Gonzalez Signed-off-by: Dan Johansen Link: https://lore.kernel.org/r/20230305104730.15849-1-strit@manjaro.org Signed-off-by: Heiko Stuebner commit 5912b647bd0732ae8c78a6e5b259c82efd177d93 Author: Dan Johansen Date: Sat Mar 4 17:41:35 2023 +0100 arm64: dts: rockchip: Lower sd speed on rk3566-soquartz Just like the Quartz64 Model B the previously stated speed of sdr-104 in soquartz is too high for the hardware to reliably communicate with some fast SD cards. Especially on some carrierboards. Lower this to sd-uhs-sdr50 to fix this. Fixes: 5859b5a9c3ac ("arm64: dts: rockchip: add SoQuartz CM4IO dts") Signed-off-by: Dan Johansen Acked-by: Peter Geis Link: https://lore.kernel.org/r/20230304164135.28430-1-strit@manjaro.org Signed-off-by: Heiko Stuebner commit c22f2ff8724b49dce2ae797e9fbf4bc0fa91112f Author: Johan Hovold Date: Mon Mar 6 11:32:42 2023 +0100 drm/sun4i: fix missing component unbind on bind errors Make sure to unbind all subcomponents when binding the aggregate device fails. Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support") Cc: stable@vger.kernel.org # 4.7 Cc: Maxime Ripard Signed-off-by: Johan Hovold Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230306103242.4775-1-johan+linaro@kernel.org commit fd9a2e1d513823e840960cb3bc26d8b7749d4ac2 Author: Chuck Lever Date: Mon Mar 6 10:43:47 2023 -0500 NFSD: Protect against filesystem freezing Flole observes this WARNING on occasion: [1210423.486503] WARNING: CPU: 8 PID: 1524732 at fs/ext4/ext4_jbd2.c:75 ext4_journal_check_start+0x68/0xb0 Reported-by: Suggested-by: Jan Kara Link: https://bugzilla.kernel.org/show_bug.cgi?id=217123 Fixes: 73da852e3831 ("nfsd: use vfs_iter_read/write") Reviewed-by: Jeff Layton Reviewed-by: Jan Kara Signed-off-by: Chuck Lever commit 382e363d5bed0cec5807b35761d14e55955eee63 Author: Enrico Sau Date: Mon Mar 6 13:05:28 2023 +0100 net: usb: qmi_wwan: add Telit 0x1080 composition Add the following Telit FE990 composition: 0x1080: tty, adb, rmnet, tty, tty, tty, tty Signed-off-by: Enrico Sau Link: https://lore.kernel.org/r/20230306120528.198842-1-enrico.sau@gmail.com Signed-off-by: Paolo Abeni commit 418383e6ed6b4624a54ec05c535f13d184fbf33b Author: Enrico Sau Date: Mon Mar 6 12:59:33 2023 +0100 net: usb: cdc_mbim: avoid altsetting toggling for Telit FE990 Add quirk CDC_MBIM_FLAG_AVOID_ALTSETTING_TOGGLE for Telit FE990 0x1081 composition in order to avoid bind error. Signed-off-by: Enrico Sau Link: https://lore.kernel.org/r/20230306115933.198259-1-enrico.sau@gmail.com Signed-off-by: Paolo Abeni commit 428913bce1e67ccb4dae317fd0332545bf8c9233 Author: Yu Kuai Date: Tue Mar 7 18:55:52 2023 +0800 block: fix wrong mode for blkdev_put() from disk_scan_partitions() If disk_scan_partitions() is called with 'FMODE_EXCL', blkdev_get_by_dev() will be called without 'FMODE_EXCL', however, follow blkdev_put() is still called with 'FMODE_EXCL', which will cause 'bd_holders' counter to leak. Fix the problem by using the right mode for blkdev_put(). Reported-by: syzbot+2bcc0d79e548c4f62a59@syzkaller.appspotmail.com Link: https://lore.kernel.org/lkml/f9649d501bc8c3444769418f6c26263555d9d3be.camel@linux.ibm.com/T/ Tested-by: Julian Ruess Fixes: e5cfefa97bcc ("block: fix scan partition for exclusively open device again") Signed-off-by: Yu Kuai Reviewed-by: Jan Kara Signed-off-by: Jens Axboe commit e45cd86c3a78bfb9875a5eb8ab5dab459b59bbe2 Author: Rander Wang Date: Tue Mar 7 13:06:56 2023 +0200 ASoC: SOF: IPC4: update gain ipc msg definition to align with fw Recent firmware changes modified the curve duration from 32 to 64 bits, which breaks volume ramps. A simple solution would be to change the definition, but unfortunately the ASoC topology framework only supports up to 32 bit tokens. This patch suggests breaking the 64 bit value in low and high parts, with only the low-part extracted from topology and high-part only zeroes. Since the curve duration is represented in hundred of nanoseconds, we can still represent a 400s ramp, which is just fine. The defacto ABI change has no effect on existing users since the IPC4 firmware has not been released just yet. Link: https://github.com/thesofproject/linux/issues/4026 Signed-off-by: Rander Wang Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307110656.1816-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit c7e328f1cbf22efe23bc3cd7dd6bb14efccc28d0 Author: Pierre-Louis Bossart Date: Tue Mar 7 13:46:59 2023 +0200 ASoC: SOF: sof-audio: don't squelch errors in WIDGET_SETUP phase When an IPC error happens while setting-up a widget during the FE hw_params phase, the existing logic will unwind all previous configurations but will overwrite the return status. The ALSA/ASoC logic will then proceed with the prepare and trigger phases, even though the firmware resources are not available. Fix by returning the initial error code and ignoring the code returned in the UNPREPARE phase. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Chao Song Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307114659.4614-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 8bac40b8ed17ab1be9133e9620f65fae80262b7e Author: Pierre-Louis Bossart Date: Tue Mar 7 11:54:12 2023 +0200 ASoC: SOF: Intel: hda-ctrl: re-add sleep after entering and exiting reset This reverts commit a09d82ce0a867 ("ASoC: SOF: Intel: hda-ctrl: remove useless sleep") It was a mistake to remove those delays, in light of comments in the HDaudio spec captured in snd_hdac_bus_reset_link() that the codec needs time for its initialization and PLL lock. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307095412.3416-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 52a55779ed14792a150421339664193d6eb8e036 Author: Rander Wang Date: Tue Mar 7 11:54:52 2023 +0200 ASoC: SOF: Intel: hda-dsp: harden D0i3 programming sequence Add delay between set and wait command according to hardware programming sequence. Also add debug log to detect error. Signed-off-by: Rander Wang Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307095453.3719-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit c99e48f4ce9b986ab7992ec7283a06dae875f668 Author: Jaska Uimonen Date: Tue Mar 7 13:07:30 2023 +0200 ASoC: SOF: ipc4-topology: set dmic dai index from copier Dmic dai index was set incorrectly to bits 5-7, when it is actually using just the lowest 3. Fix the macro for setting the bits. Fixes: aa84ffb72158 ("ASoC: SOF: ipc4-topology: Add support for SSP/DMIC DAI's") Signed-off-by: Jaska Uimonen Reviewed-by: Adrian Bonislawski 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/20230307110730.1995-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit b66bfc3a9810caed5d55dd8907110bdc8028b06b Author: Ranjani Sridharan Date: Tue Mar 7 13:46:39 2023 +0200 ASoC: SOF: sof-audio: Fix broken early bclk feature for SSP With the removal of widget setup during BE hw_params, the DAI config IPC is never sent with the SOF_DAI_CONFIG_FLAGS_HW_PARAMS. This means that the early bit clock feature required for certain codecs will be broken. Fix this by saving the config flags sent during BE DAI hw_params and reusing it when the DAI_CONFIG IPC is sent after the DAI widget is set up. Also, free the DAI config before the widget is freed. The DAI_CONFIG IPC sent during the sof_widget_free() does not have the DAI index information. So, save the dai_index in the config during hw_params and reuse it during hw_free. For IPC4, do not clear the node ID during hw_free. It will be needed for freeing the group_ida during unprepare. 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/20230307114639.4553-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit ca09e2a351fbc7836ba9418304ff0c3e72addfe0 Author: Pierre-Louis Bossart Date: Tue Mar 7 11:53:41 2023 +0200 ASoC: SOF: Intel: pci-tng: revert invalid bar size setting The logic for the ioremap is to find the resource index 3 (IRAM) and infer the BAR address by subtracting the IRAM offset. The BAR size defined in hardware specifications is 2MB. The commit 5947b2726beb6 ("ASoC: SOF: Intel: Check the bar size before remapping") tried to find the BAR size by querying the resource length instead of a pre-canned value, but by requesting the size for index 3 it only gets the size of the IRAM. That's obviously wrong and prevents the probe from proceeding. This commit attempted to fix an issue in a fuzzing/simulated environment but created another on actual devices, so the best course of action is to revert that change. Reported-by: Ferry Toth Tested-by: Ferry Toth (Intel Edison-Arduino) Link: https://github.com/thesofproject/linux/issues/3901 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307095341.3222-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 6ba8ddf86a3ada463e9952a19b069f978a70a748 Author: Ranjani Sridharan Date: Tue Mar 7 13:48:15 2023 +0200 ASoC: SOF: topology: Fix error handling in sof_widget_ready() Fix the error paths in sof_widget_ready() to free all allocated memory and prevent memory leaks. Signed-off-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307114815.4909-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 858a438a6cf919e5727d2a0f5f3f0e68b2d5354e Author: Pierre-Louis Bossart Date: Tue Mar 7 12:07:33 2023 +0200 ASoC: Intel: soc-acpi: fix copy-paste issue in topology names For some reason the convention for topology names was not followed and the name inspired by another unrelated hardware configuration. As a result, the kernel will request a non-existent topology file. Link: https://github.com/thesofproject/sof/pull/6878 Fixes: 2ec8b081d59f ("ASoC: Intel: soc-acpi: Add entry for sof_es8336 in ADL match table") Cc: stable@vger.kernel.org Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307100733.15025-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 9e269e3aa9006440de639597079ee7140ef5b5f3 Author: Seppo Ingalsuo Date: Tue Mar 7 13:07:51 2023 +0200 ASoC: SOF: ipc4-topology: Fix incorrect sample rate print unit This patch fixes the sample rate print unit from KHz to Hz. E.g. 48000KHz becomes 48000Hz. Signed-off-by: Seppo Ingalsuo Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307110751.2053-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 989a3e4479177d0f4afab8be1960731bc0ffbbd0 Author: Peter Ujfalusi Date: Tue Mar 7 13:49:17 2023 +0200 ASoC: SOF: ipc3: Check for upper size limit for the received message The sof_ipc3_rx_msg() checks for minimum size of a new rx message but it is missing the check for upper limit. Corrupted or compromised firmware might be able to take advantage of this to cause out of bounds reads outside of the message area. Reported-by: Curtis Malainey Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Curtis Malainey Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307114917.5124-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 376f79bbf521fc37b871b536276319951b5bef3a Author: Ranjani Sridharan Date: Tue Mar 7 11:39:14 2023 +0200 ASOC: SOF: Intel: pci-tgl: Fix device description Add the missing ops_free callback. Fixes: 63d375b9f2a9 ("ASoC: SOF: Intel: pci-tgl: use RPL specific firmware definitions") Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307093914.25409-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 1f320bdb29b644a2c9fb301a6fb2d6170e6417e9 Author: Ranjani Sridharan Date: Tue Mar 7 11:39:13 2023 +0200 ASoC: SOF: Intel: SKL: Fix device description Add missing ops_free callback for SKL/KBL platforms. Fixes: 52d7939d10f2 ("ASoC: SOF: Intel: add ops for SKL/KBL") Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307093914.25409-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 9eb2b4cac223095d2079a6d52b8bbddc6e064288 Author: Ranjani Sridharan Date: Tue Mar 7 11:39:12 2023 +0200 ASoC: SOF: Intel: HDA: Fix device description Add the missing ops_free callback for APL/CNL/CML/JSL/TGL/EHL platforms. Fixes: 1da51943725f ("ASoC: SOF: Intel: hda: init NHLT for IPC4") Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307093914.25409-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit a659e35ca0af2765f567bdfdccfa247eff0cdab8 Author: Ranjani Sridharan Date: Tue Mar 7 11:39:11 2023 +0200 ASoC: SOF: Intel: MTL: Fix the device description Add the missing ops_free callback. Fixes: 064520e8aeaa ("ASoC: SOF: Intel: Add support for MeteorLake (MTL)") Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307093914.25409-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 1a1e7540cf501dd5c8b57a577a155cdd13c7e202 Author: Hans de Goede Date: Wed Mar 1 11:04:36 2023 +0100 ACPI: x86: Add skip i2c clients quirk for Lenovo Yoga Book X90 The Lenovo Yoga Book X90 is a x86 tablet which ships with Android x86 as factory OS. The Android x86 kernel fork ignores I2C devices described in the DSDT, except for the PMIC and Audio codecs. As usual the Lenovo Yoga Book X90's DSDT contains a bunch of extra I2C devices which are not actually there, causing various resource conflicts. Add an ACPI_QUIRK_SKIP_I2C_CLIENTS quirk for the Lenovo Yoga Book X90 to the acpi_quirk_skip_dmi_ids table to woraround this. The DSDT also contains broken ACPI GPIO event handlers, disable those too. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit a5cb0695c5f0ac2ab0cedf2c1c0d75826cb73448 Author: Hans de Goede Date: Wed Mar 1 11:04:35 2023 +0100 ACPI: x86: Add skip i2c clients quirk for Acer Iconia One 7 B1-750 The Acer Iconia One 7 B1-750 is a x86 tablet which ships with Android x86 as factory OS. The Android x86 kernel fork ignores I2C devices described in the DSDT, except for the PMIC and Audio codecs. As usual the Acer Iconia One 7 B1-750's DSDT contains a bunch of extra I2C devices which are not actually there, causing various resource conflicts. Add an ACPI_QUIRK_SKIP_I2C_CLIENTS quirk for the Acer Iconia One 7 B1-750 to the acpi_quirk_skip_dmi_ids table to woraround this. The DSDT also contains broken ACPI GPIO event handlers, disable those too. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 5adc409340b1fc82bc1175e602d14ac82ac685e3 Author: Hans de Goede Date: Wed Mar 1 11:04:34 2023 +0100 ACPI: x86: Introduce an acpi_quirk_skip_gpio_event_handlers() helper x86 ACPI boards which ship with only Android as their factory image usually have pretty broken ACPI tables, relying on everything being hardcoded in the factory kernel image and often disabling parts of the ACPI enumeration kernel code to avoid the broken tables causing issues. Part of this broken ACPI code is that sometimes these boards have _AEI ACPI GPIO event handlers which are broken. So far this has been dealt with in the platform/x86/x86-android-tablets.c module, which contains various workarounds for these devices, by it calling acpi_gpiochip_free_interrupts() on gpiochip-s with troublesome handlers to disable the handlers. But in some cases this is too late, if the handlers are of the edge type then gpiolib-acpi.c's code will already have run them at boot. This can cause issues such as GPIOs ending up as owned by "ACPI:OpRegion", making them unavailable for drivers which actually need them. Boards with these broken ACPI tables are already listed in drivers/acpi/x86/utils.c for e.g. acpi_quirk_skip_i2c_client_enumeration(). Extend the quirks mechanism for a new acpi_quirk_skip_gpio_event_handlers() helper, this re-uses the DMI-ids rather then having to duplicate the same DMI table in gpiolib-acpi.c . Also add the new ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS quirk to existing boards with troublesome ACPI gpio event handlers, so that the current acpi_gpiochip_free_interrupts() hack can be removed from x86-android-tablets.c . Signed-off-by: Hans de Goede Acked-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 89b0411481967a2e8c91190a211a359966cfcf4b Author: Chia-Lin Kao (AceLan) Date: Thu Mar 2 17:33:00 2023 +0800 ACPI: video: Add backlight=native DMI quirk for Dell Vostro 15 3535 Sometimes the system boots up with a acpi_video0 backlight interface which doesn't work. So add Dell Vostro 15 3535 into the video_detect_dmi_table to set it to native explicitly. Signed-off-by: Chia-Lin Kao (AceLan) Signed-off-by: Rafael J. Wysocki commit c29b97725c91add5021a3257c14ad1ed32eedf76 Author: Andy Shevchenko Date: Thu Mar 2 18:12:12 2023 +0200 ACPI: docs: enumeration: 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 documentation. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 6b0313c2fa3d2cf991c9ffef6fae6e7ef592ce6d Author: Shawn Guo Date: Sat Mar 4 15:41:07 2023 +0800 cpuidle: psci: Iterate backwards over list in psci_pd_remove() In case that psci_pd_init_topology() fails for some reason, psci_pd_remove() will be responsible for deleting provider and removing genpd from psci_pd_providers list. There will be a failure when removing the cluster PD, because the cpu (child) PDs haven't been removed. [ 0.050232] CPUidle PSCI: init PM domain cpu0 [ 0.050278] CPUidle PSCI: init PM domain cpu1 [ 0.050329] CPUidle PSCI: init PM domain cpu2 [ 0.050370] CPUidle PSCI: init PM domain cpu3 [ 0.050422] CPUidle PSCI: init PM domain cpu-cluster0 [ 0.050475] PM: genpd_remove: unable to remove cpu-cluster0 [ 0.051412] PM: genpd_remove: removed cpu3 [ 0.051449] PM: genpd_remove: removed cpu2 [ 0.051499] PM: genpd_remove: removed cpu1 [ 0.051546] PM: genpd_remove: removed cpu0 Fix the problem by iterating the provider list reversely, so that parent PD gets removed after child's PDs like below. [ 0.029052] CPUidle PSCI: init PM domain cpu0 [ 0.029076] CPUidle PSCI: init PM domain cpu1 [ 0.029103] CPUidle PSCI: init PM domain cpu2 [ 0.029124] CPUidle PSCI: init PM domain cpu3 [ 0.029151] CPUidle PSCI: init PM domain cpu-cluster0 [ 0.029647] PM: genpd_remove: removed cpu0 [ 0.029666] PM: genpd_remove: removed cpu1 [ 0.029690] PM: genpd_remove: removed cpu2 [ 0.029714] PM: genpd_remove: removed cpu3 [ 0.029738] PM: genpd_remove: removed cpu-cluster0 Fixes: a65a397f2451 ("cpuidle: psci: Add support for PM domains by using genpd") Reviewed-by: Sudeep Holla Reviewed-by: Ulf Hansson Signed-off-by: Shawn Guo Cc: 5.10+ # 5.10+ Signed-off-by: Rafael J. Wysocki commit 775c73df905e4950ca11caabd592fd4b08aa93e2 Merge: 757b56a6c7bba c77737b736ceb Author: Paolo Abeni Date: Tue Mar 7 13:52:03 2023 +0100 Merge branch 'main' 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) Restore ctnetlink zero mark in events and dump, from Ivan Delalande. 2) Fix deadlock due to missing disabled bh in tproxy, from Florian Westphal. 3) Safer maximum chain load in conntrack, from Eric Dumazet. * 'main' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: conntrack: adopt safer max chain length netfilter: tproxy: fix deadlock due to missing BH disable netfilter: ctnetlink: revert to dumping mark regardless of event type ==================== Link: https://lore.kernel.org/r/20230307100424.2037-1-pablo@netfilter.org Signed-off-by: Paolo Abeni commit 1a0009abfa7893b9cfcd3884658af1cbee6b26ce Author: Hans de Goede Date: Tue Mar 7 11:58:42 2023 +0100 platform: mellanox: mlx-platform: Initialize shift variable to 0 Initialize shift variable in mlxplat_mlxcpld_verify_bus_topology() to 0 to avoid the following compile error: drivers/platform/x86/mlx-platform.c:6013 mlxplat_mlxcpld_verify_bus_topology() error: uninitialized symbol 'shift'. Fixes: 50b823fdd357 ("platform: mellanox: mlx-platform: Move bus shift assignment out of the loop") Cc: Vadim Pasternak Cc: Michael Shych Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230307105842.286118-1-hdegoede@redhat.com commit e8059d393158e927e36898aca89986a52025b9f3 Author: Daniel Scally Date: Thu Mar 2 10:26:11 2023 +0000 platform/x86: int3472: Add GPIOs to Surface Go 3 Board data Add the INT347E GPIO lookup table to the board data for the Surface Go 3. This is necessary to allow the ov7251 IR camera to probe properly on that platform. Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230302102611.314341-1-dan.scally@ideasonboard.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 94e9cbda06a317f886f63fab511dedf441c81c54 Author: Srinivas Pandruvada Date: Fri Feb 10 22:32:46 2023 -0800 platform/x86: ISST: Fix kernel documentation warnings Fix warning displayed for "make W=1" for kernel documentation. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20230211063257.311746-2-srinivas.pandruvada@linux.intel.com Signed-off-by: Hans de Goede Reviewed-by: Hans de Goede commit 7e7e1541c91615e9950d0b96bcd1806d297e970e Author: Randy Dunlap Date: Sat Feb 25 21:39:51 2023 -0800 platform: x86: MLX_PLATFORM: 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: ef0f62264b2a ("platform/x86: mlx-platform: Add physical bus number auto detection") Signed-off-by: Randy Dunlap Cc: Vadim Pasternak Cc: Darren Hart Cc: Hans de Goede Cc: Mark Gross Cc: platform-driver-x86@vger.kernel.org Link: https://lore.kernel.org/r/20230226053953.4681-7-rdunlap@infradead.org Signed-off-by: Hans de Goede Reviewed-by: Hans de Goede commit 03f5eb300ad1241f854269a3e521b119189a4493 Author: Randy Dunlap Date: Sat Feb 25 21:39:50 2023 -0800 platform: mellanox: 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". For NVSW_SN2201, select REGMAP_I2C instead of depending on it. Fixes: c6acad68eb2d ("platform/mellanox: mlxreg-hotplug: Modify to use a regmap interface") Fixes: 5ec4a8ace06c ("platform/mellanox: Introduce support for Mellanox register access driver") Fixes: 62f9529b8d5c ("platform/mellanox: mlxreg-lc: Add initial support for Nvidia line card devices") Fixes: 662f24826f95 ("platform/mellanox: Add support for new SN2201 system") Signed-off-by: Randy Dunlap Cc: Darren Hart Cc: Hans de Goede Cc: Michael Shych Cc: Mark Gross Cc: Vadim Pasternak Cc: platform-driver-x86@vger.kernel.org Link: https://lore.kernel.org/r/20230226053953.4681-6-rdunlap@infradead.org Signed-off-by: Hans de Goede Reviewed-by: Hans de Goede commit 6a192c0cbf38a6ba10847590d680975086844dbb Author: Srinivas Pandruvada Date: Mon Feb 27 06:06:14 2023 -0800 platform/x86/intel/tpmi: Fix double free reported by Smatch Fix warning: drivers/platform/x86/intel/tpmi.c:253 tpmi_create_device() warn: 'feature_vsec_dev' was already freed. If there is some error, feature_vsec_dev memory is freed as part of resource managed call intel_vsec_add_aux(). So, additional kfree() call is not required. Reordered res allocation and feature_vsec_dev, so that on error only res is freed. Reported-by: Dan Carpenter Link: https://lore.kernel.org/platform-driver-x86/Y%2FxYR7WGiPayZu%2FR@kili/T/#u Fixes: 47731fd2865f ("platform/x86/intel: Intel TPMI enumeration driver") Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20230227140614.2913474-1-srinivas.pandruvada@linux.intel.com Signed-off-by: Hans de Goede Reviewed-by: Hans de Goede commit 95ecf90158522269749f1b7ce98b1eed66ca087b Author: Srinivas Pandruvada Date: Sun Feb 26 21:35:04 2023 -0800 platform/x86: ISST: Increase range of valid mail box commands A new command CONFIG_TDP_GET_RATIO_INFO is added, with sub command type of 0x0C. The previous range of valid sub commands was from 0x00 to 0x0B. Change the valid range from 0x00 to 0x0C. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20230227053504.2734214-1-srinivas.pandruvada@linux.intel.com Signed-off-by: Hans de Goede Reviewed-by: Hans de Goede commit 0331b1b0ba65376ecf1c69414aa7696fef0930cb Author: Armin Wolf Date: Sat Feb 18 12:53:18 2023 +0100 platform/x86: dell-ddv: Fix temperature scaling After using the built-in UEFI hardware diagnostics to compare the measured battery temperature, i noticed that the temperature is actually expressed in tenth degree kelvin, similar to the SBS-Data standard. For example, a value of 2992 is displayed as 26 degrees celsius. Fix the scaling so that the correct values are being displayed. Tested on a Dell Inspiron 3505. Fixes: a77272c16041 ("platform/x86: dell: Add new dell-wmi-ddv driver") Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20230218115318.20662-2-W_Armin@gmx.de Signed-off-by: Hans de Goede Reviewed-by: Hans de Goede commit 001f61c4688f1dad18cfaa35ae364b35fb3cd66c Author: Armin Wolf Date: Sat Feb 18 12:53:17 2023 +0100 platform/x86: dell-ddv: Fix cache invalidation on resume If one or both sensor buffers could not be initialized, either due to missing hardware support or due to some error during probing, the resume handler will encounter undefined behaviour when attempting to lock buffers then protected by an uninitialized or destroyed mutex. Fix this by introducing a "active" flag which is set during probe, and only invalidate buffers which where flaged as "active". Tested on a Dell Inspiron 3505. Fixes: 3b7eeff93d29 ("platform/x86: dell-ddv: Add hwmon support") Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20230218115318.20662-1-W_Armin@gmx.de Signed-off-by: Hans de Goede Reviewed-by: Hans de Goede commit 24efcdf03d85bb73df0ba99f69c8d238e7ada0e5 Author: Arnd Bergmann Date: Tue Feb 14 16:25:07 2023 +0100 platform/x86/amd: pmc: remove CONFIG_SUSPEND checks The amd_pmc_write_stb() function was previously hidden in an ifdef to avoid a warning when CONFIG_SUSPEND is disabled, but now there is an additional caller: drivers/platform/x86/amd/pmc.c: In function 'amd_pmc_stb_debugfs_open_v2': drivers/platform/x86/amd/pmc.c:256:8: error: implicit declaration of function 'amd_pmc_write_stb'; did you mean 'amd_pmc_read_stb'? [-Werror=implicit-function-declaration] 256 | ret = amd_pmc_write_stb(dev, AMD_PMC_STB_DUMMY_PC); | ^~~~~~~~~~~~~~~~~ | amd_pmc_read_stb There is now an easier way to handle this using DEFINE_SIMPLE_DEV_PM_OPS() to replace all the #ifdefs, letting gcc drop any of the unused functions silently. Fixes: b0d4bb973539 ("platform/x86/amd: pmc: Write dummy postcode into the STB DRAM") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230214152512.806188-1-arnd@kernel.org Signed-off-by: Hans de Goede Reviewed-by: Hans de Goede commit 02c84f91adb9a64b75ec97d772675c02a3e65ed7 Author: Jianqun Xu Date: Wed Feb 8 17:14:11 2023 +0800 ARM: dts: rockchip: fix a typo error for rk3288 spdif node Fix the address in the spdif node name. Fixes: 874e568e500a ("ARM: dts: rockchip: Add SPDIF transceiver for RK3288") Signed-off-by: Jianqun Xu Reviewed-by: Sjoerd Simons Link: https://lore.kernel.org/r/20230208091411.1603142-1-jay.xu@rock-chips.com Signed-off-by: Heiko Stuebner commit 0643bedf921efd88df73847fb0bb31f9f8692ce0 Author: Rob Herring Date: Tue Feb 7 17:47:49 2023 -0600 arm64: dts: rockchip: Fix rk3399 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/20230207234750.202154-1-robh@kernel.org Signed-off-by: Heiko Stuebner commit c77737b736ceb50fdf150434347dbd81ec76dbb1 Author: Eric Dumazet Date: Tue Mar 7 05:22:54 2023 +0000 netfilter: conntrack: adopt safer max chain length Customers using GKE 1.25 and 1.26 are facing conntrack issues root caused to commit c9c3b6811f74 ("netfilter: conntrack: make max chain length random"). Even if we assume Uniform Hashing, a bucket often reachs 8 chained items while the load factor of the hash table is smaller than 0.5 With a limit of 16, we reach load factors of 3. With a limit of 32, we reach load factors of 11. With a limit of 40, we reach load factors of 15. With a limit of 50, we reach load factors of 24. This patch changes MIN_CHAINLEN to 50, to minimize risks. Ideally, we could in the future add a cushion based on expected load factor (2 * nf_conntrack_max / nf_conntrack_buckets), because some setups might expect unusual values. Fixes: c9c3b6811f74 ("netfilter: conntrack: make max chain length random") Signed-off-by: Eric Dumazet Signed-off-by: Pablo Neira Ayuso commit 849ad04cf562ac63b0371a825eed473d84de9c6d Author: Al Viro Date: Tue Mar 7 01:50:53 2023 -0500 new helper: put_and_unmap_page() kunmap_local() + put_page(), as done by e.g. ext2 directory handling. Signed-off-by: Al Viro commit 757b56a6c7bbaed0d005b60b3996ee5a04cf2d8d Merge: e539a105f947b 32dfc59e43019 Author: Jakub Kicinski Date: Mon Mar 6 20:28:00 2023 -0800 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2023-03-06 We've added 8 non-merge commits during the last 7 day(s) which contain a total of 9 files changed, 64 insertions(+), 18 deletions(-). The main changes are: 1) Fix BTF resolver for DATASEC sections when a VAR points at a modifier, that is, keep resolving such instances instead of bailing out, from Lorenz Bauer. 2) Fix BPF test framework with regards to xdp_frame info misplacement in the "live packet" code, from Alexander Lobakin. 3) Fix an infinite loop in BPF sockmap code for TCP/UDP/AF_UNIX, from Liu Jian. 4) Fix a build error for riscv BPF JIT under PERF_EVENTS=n, from Randy Dunlap. 5) Several BPF doc fixes with either broken links or external instead of internal doc links, from Bagas Sanjaya. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: selftests/bpf: check that modifier resolves after pointer btf: fix resolving BTF_KIND_VAR after ARRAY, STRUCT, UNION, PTR bpf, test_run: fix &xdp_frame misplacement for LIVE_FRAMES bpf, doc: Link to submitting-patches.rst for general patch submission info bpf, doc: Do not link to docs.kernel.org for kselftest link bpf, sockmap: Fix an infinite loop error when len is 0 in tcp_bpf_recvmsg_parser() riscv, bpf: Fix patch_text implicit declaration bpf, docs: Fix link to BTF doc ==================== Link: https://lore.kernel.org/r/20230306215944.11981-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 8a63441e83724fee1ef3fd37b237d40d90780766 Author: Krishna chaitanya chundru Date: Tue Feb 28 17:19:12 2023 +0530 arm64: dts: qcom: sc7280: Mark PCIe controller as cache coherent If the controller is not marked as cache coherent, then kernel will try to ensure coherency during dma-ops and that may cause data corruption. So, mark the PCIe node as dma-coherent as the devices on PCIe bus are cache coherent. Cc: stable@vger.kernel.org Fixes: 92e0ee9f83b3 ("arm64: dts: qcom: sc7280: Add PCIe and PHY related node") Signed-off-by: Krishna chaitanya chundru Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1677584952-17496-1-git-send-email-quic_krichai@quicinc.com commit eaba416688f4f074ea3bf2ef975c9e2dbb06712b Author: Yang Xiwen Date: Wed Mar 1 16:53:50 2023 +0800 arm64: dts: qcom: msm8916-ufi: Fix sim card selection pinctrl The previous commit mistakenly introduced sim_ctrl_default as pinctrl, this is incorrect, the interface for sim card selection varies between different devices and should not be placed in the dtsi. This commit selects external SIM card slot for ufi001c as default. uf896 selects the correct SIM card slot automatically, thus does not need this pinctrl node. Fixes: faf69431464b ("arm64: dts: qcom: msm8916-thwc: Add initial device trees") Signed-off-by: Yang Xiwen Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/tencent_7036BCA256055D05F8C49D86DF7F0E2D1A05@qq.com commit 749d56bd5cf311dd9b50cfc092d7a39309454077 Author: Luca Weiss Date: Sun Mar 5 11:32:34 2023 +0100 soc: qcom: rmtfs: handle optional qcom,vmid correctly Older platforms don't have qcom,vmid set, handle -EINVAL return value correctly. And since num_vmids is passed to of_property_read_u32_array later we should make sure it has a sane value before continuing. Fixes: e656cd0bcf3d ("soc: qcom: rmtfs: Optionally map RMTFS to more VMs") Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230305-rmtfs-vmid-fix-v1-2-6a7206081602@z3ntu.xyz commit 947007419b60d5e06aa54b0f411c123db7f45a44 Author: Luca Weiss Date: Sun Mar 5 11:32:33 2023 +0100 soc: qcom: rmtfs: fix error handling reading qcom,vmid of_property_count_u32_elems returns a negative integer when an error happens , but since the value was assigned to an unsigned integer, the check never worked correctly. Also print the correct variable in the error print, ret isn't used here. Fixes: e656cd0bcf3d ("soc: qcom: rmtfs: Optionally map RMTFS to more VMs") Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230305-rmtfs-vmid-fix-v1-1-6a7206081602@z3ntu.xyz commit 77bf4b3ed42e31d29b255fcd6530fb7a1e217e89 Author: Abel Vesa Date: Mon Mar 6 15:55:27 2023 +0200 soc: qcom: llcc: Fix slice configuration values for SC8280XP The slice IDs for CVPFW, CPUSS1 and CPUWHT currently overflow the 32bit LLCC config registers, which means it is writing beyond the upper limit of the ATTR0_CFGn and ATTR1_CFGn range of registers. But the most obvious impact is the fact that the mentioned slices do not get configured at all, which will result in reduced performance. Fix that by using the slice ID values taken from the latest LLCC SC table. Fixes: ec69dfbdc426 ("soc: qcom: llcc: Add sc8180x and sc8280xp configurations") Cc: stable@vger.kernel.org # 5.19+ Signed-off-by: Abel Vesa Tested-by: Juerg Haefliger Reviewed-by: Sai Prakash Ranjan Acked-by: Konrad Dybcio Reviewed-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230306135527.509796-1-abel.vesa@linaro.org commit ced0f245ed951e2b8bd68f79c15238d7dd253662 Author: Arnd Bergmann Date: Mon Mar 6 11:14:50 2023 +0100 kallsyms: add kallsyms_seqs_of_names to list of special symbols My randconfig build setup ran into another kallsyms warning: Inconsistent kallsyms data Try make KALLSYMS_EXTRA_PASS=1 as a workaround After adding some debugging code to kallsyms.c, I saw that the recently added kallsyms_seqs_of_names symbol can sometimes cause the second stage table to be slightly longer than the first stage, which makes the build inconsistent. Add it to the exception table that contains all other kallsyms-generated symbols. Fixes: 60443c88f3a8 ("kallsyms: Improve the performance of kallsyms_lookup_name()") Signed-off-by: Arnd Bergmann Reviewed-by: Zhen Lei Signed-off-by: Masahiro Yamada commit c64c67c0748be5afb769a4eedbeb3ce6de36958f Author: Al Viro Date: Mon Mar 6 19:58:56 2023 -0500 alpha: fix lazy-FPU mis(merged/applied/whatnot) Looks like a braino that used to be fixed in e.g. #next.alpha had gotten into alpha.git cherry-picked version of that patch. Sure, alpha has no preempt, but preempt_enable() in place of preempt_disable() is actively confusing the readers... Other than that, the cherry-picked variant matches what I have. Signed-off-by: Al Viro commit 2da789cda462bda93679f53ee38f9aa2309d47e8 Author: Guillaume Tucker Date: Sat Feb 4 14:34:54 2023 +0100 selftests: amd-pstate: fix TEST_FILES Bring back the Python scripts that were initially added with TEST_GEN_FILES but now with TEST_FILES to avoid having them deleted when doing a clean. Also fix the way the architecture is being determined as they should also be installed when ARCH=x86_64 is provided explicitly. Then also append extra files to TEST_FILES and TEST_PROGS with += so they don't get discarded. Fixes: ba2d788aa873 ("selftests: amd-pstate: Trigger tbench benchmark and test cpus") Fixes: a49fb7218ed8 ("selftests: amd-pstate: Don't delete source files via Makefile") Signed-off-by: Guillaume Tucker Acked-by: Huang Rui Signed-off-by: Shuah Khan commit e18048da9bc3f87acef4eb67a11b4fc55fe15424 Author: Palmer Dabbelt Date: Thu Feb 23 14:46:05 2023 -0800 RISC-V: Stop emitting attributes The RISC-V ELF attributes don't contain any useful information. New toolchains ignore them, but they frequently trip up various older/mixed toolchains. So just turn them off. Tested-by: Conor Dooley Link: https://lore.kernel.org/r/20230223224605.6995-1-palmer@rivosinc.com Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 6906598f1ce93761716d780b6e3f171e13f0f4ce Author: Jonathan Neuschäfer Date: Sun Jan 29 14:14:36 2023 +0100 zstd: Fix definition of assert() assert(x) should emit a warning if x is false. WARN_ON(x) emits a warning if x is true. Thus, assert(x) should be defined as WARN_ON(!x) rather than WARN_ON(x). Signed-off-by: Jonathan Neuschäfer Signed-off-by: Nick Terrell commit 038505c41f0aad26ef101f4f7f6e111531c3914f Author: Nick Terrell Date: Wed Feb 15 15:19:17 2023 -0800 lib: zstd: Backport fix for in-place decompression Backport the relevant part of upstream commit 5b266196 [0]. This fixes in-place decompression for x86-64 kernel decompression. It uses a bound of 131072 + (uncompressed_size >> 8), which can be violated after upstream commit 6a7ede3d [1], as zstd can use part of the output buffer as temporary storage, and without this patch needs a bound of ~262144. The fix is for zstd to detect that the input and output buffers overlap, so that zstd knows it can't use the overlapping portion of the output buffer as tempoary storage. If the margin is not large enough, this will ensure that zstd will fail the decompression, rather than overwriting part of the input data, and causing corruption. This fix has been landed upstream and is in release v1.5.4. That commit also adds unit and fuzz tests to verify that the margin we use is respected, and correct. That means that the fix is well tested upstream. I have not been able to reproduce the potential bug in x86-64 kernel decompression locally, nor have I recieved reports of failures to decompress the kernel. It is possible that compression saves enough space to make it very hard for the issue to appear. I've boot tested the zstd compressed kernel on x86-64 and i386 with this patch, which uses in-place decompression, and sanity tested zstd compression in btrfs / squashfs to make sure that we don't see any issues, but other uses of zstd shouldn't be affected, because they don't use in-place decompression. Thanks to Vasily Gorbik for debugging a related issue on s390, which was triggered by the same commit, but was a bug in how __decompress() was called [2]. And to Sasha Levin for the CC alerting me of the issue. [0] https://github.com/facebook/zstd/commit/5b266196a41e6a15e21bd4f0eeab43b938db1d90 [1] https://github.com/facebook/zstd/commit/6a7ede3dfccbf3e0a5928b4224a039c260dcff72 [2] https://lore.kernel.org/r/patch-1.thread-41c676.git-41c676c2d153.your-ad-here.call-01675030179-ext-9637@work.hours CC: Vasily Gorbik CC: Heiko Carstens CC: Sasha Levin CC: Yann Collet Signed-off-by: Nick Terrell commit 780f6a9afe8b0e303406a39f6968cf1daa6c3d51 Author: Kees Cook Date: Wed Jan 4 13:20:52 2023 -0800 lib: zstd: Fix -Wstringop-overflow warning Fix the following -Wstringop-overflow warning when building with GCC 11+: lib/zstd/decompress/huf_decompress.c: In function ‘HUF_readDTableX2_wksp’: lib/zstd/decompress/huf_decompress.c:700:5: warning: ‘HUF_fillDTableX2.constprop’ accessing 624 bytes in a region of size 52 [-Wstringop-overflow=] 700 | HUF_fillDTableX2(dt, maxTableLog, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 701 | wksp->sortedSymbol, sizeOfSort, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 702 | wksp->rankStart0, wksp->rankVal, maxW, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 703 | tableLog+1, | ~~~~~~~~~~~ 704 | wksp->calleeWksp, sizeof(wksp->calleeWksp) / sizeof(U32)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/zstd/decompress/huf_decompress.c:700:5: note: referencing argument 6 of type ‘U32 (*)[13]’ {aka ‘unsigned int (*)[13]’} lib/zstd/decompress/huf_decompress.c:571:13: note: in a call to function ‘HUF_fillDTableX2.constprop’ 571 | static void HUF_fillDTableX2(HUF_DEltX2* DTable, const U32 targetLog, | ^~~~~~~~~~~~~~~~ by using pointer notation instead of array notation. This is one of the last remaining warnings to be fixed before globally enabling -Wstringop-overflow. Co-developed-by: Gustavo A. R. Silva Signed-off-by: Gustavo A. R. Silva Cc: Nick Terrell Signed-off-by: Kees Cook Signed-off-by: Nick Terrell commit 288b3271d920c9ba949c3bab0f749f4cecc70e09 Author: Shin'ichiro Kawasaki Date: Mon Mar 6 15:30:24 2023 +0900 scsi: sd: Fix wrong zone_write_granularity value during revalidate When the sd driver revalidates host-managed SMR disks, it calls disk_set_zoned() which changes the zone_write_granularity attribute value to the logical block size regardless of the device type. After that, the sd driver overwrites the value in sd_zbc_read_zone() with the physical block size, since ZBC/ZAC requires this for host-managed disks. Between the calls to disk_set_zoned() and sd_zbc_read_zone(), there exists a window where the attribute shows the logical block size as the zone_write_granularity value, which is wrong for host-managed disks. The duration of the window is from 20ms to 200ms, depending on report zone command execution time. To avoid the wrong zone_write_granularity value between disk_set_zoned() and sd_zbc_read_zone(), modify the value not in sd_zbc_read_zone() but just after disk_set_zoned() call. Fixes: a805a4fa4fa3 ("block: introduce zone_write_granularity limit") Signed-off-by: Shin'ichiro Kawasaki Link: https://lore.kernel.org/r/20230306063024.3376959-1-shinichiro.kawasaki@wdc.com Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 11d9874c4204a785f43d899a1ab12f9dc8d9de3e Author: Michael Kelley Date: Mon Feb 27 08:48:34 2023 -0800 scsi: storvsc: Handle BlockSize change in Hyper-V VHD/VHDX file Hyper-V uses a VHD or VHDX file on the host as the underlying storage for a virtual disk. The VHD/VHDX file format is a sparse format where real disk space on the host is assigned in chunks that the VHD/VHDX file format calls the BlockSize. This BlockSize is not to be confused with the 512-byte (or 4096-byte) sector size of the underlying storage device. The default block size for a new VHD/VHDX file is 32 Mbytes. When a guest VM touches any disk space within a 32 Mbyte chunk of the VHD/VHDX file, Hyper-V allocates 32 Mbytes of real disk space for that section of the VHD/VHDX. Similarly, if a discard operation is done that covers an entire 32 Mbyte chunk, Hyper-V will free the real disk space for that portion of the VHD/VHDX. This BlockSize is surfaced in Linux as the "discard_granularity" in /sys/block/sd/queue, which makes sense. Hyper-V also has differencing disks that can overlay a VHD/VHDX file to capture changes to the VHD/VHDX while preserving the original VHD/VHDX. One example of this differencing functionality is for VM snapshots. When a snapshot is created, a differencing disk is created. If the snapshot is rolled back, Hyper-V can just delete the differencing disk, and the VM will see the original disk contents at the time the snapshot was taken. Differencing disks are used in other scenarios as well. The BlockSize for a differencing disk defaults to 2 Mbytes, not 32 Mbytes. The smaller default is used because changes to differencing disks are typically scattered all over, and Hyper-V doesn't want to allocate 32 Mbytes of real disk space for a stray write here or there. The smaller BlockSize provides more efficient use of real disk space. When a differencing disk is added to a VHD/VHDX, Hyper-V reports UNIT_ATTENTION with a sense code indicating "Operating parameters have changed", because the value of discard_granularity should be changed to 2 Mbytes. When the differencing disk is removed, discard_granularity should be changed back to 32 Mbytes. However, current code simply reports a message from scsi_report_sense() and the value of /sys/block/sd/queue/discard_granularity is not updated. The message isn't very actionable by a sysadmin. Fix this by having the storvsc driver check for the sense code indicating that the underly VHD/VHDX block size has changed, and do a rescan of the device to pick up the new discard_granularity. With this change the entire transition to/from differencing disks is handled automatically and transparently, with no confusing messages being output. Link: https://lore.kernel.org/r/1677516514-86060-1-git-send-email-mikelley@microsoft.com Signed-off-by: Michael Kelley Signed-off-by: Martin K. Petersen commit a2033f9f9d785972513bca207ed4a48bffc75f8f Author: Chandrakanth Patil Date: Thu Mar 2 16:23:42 2023 +0530 scsi: megaraid_sas: Driver version update to 07.725.01.00-rc1 Update driver version. Signed-off-by: Chandrakanth Patil Link: https://lore.kernel.org/r/20230302105342.34933-4-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen commit 9bcb1d5a3d10f4d15da2174f8eaec942602f681f Author: Chandrakanth Patil Date: Thu Mar 2 16:23:41 2023 +0530 scsi: megaraid_sas: Add crash dump mode capability bit in MFI capabilities In kdump kernel mode, the driver works in reduced functionality mode with some features disabled such as reduced MSI-X count and RDPQ disabled, etc. However, the firmware is not aware of this mode in some cases, which results in undefined behavior. To address this, the driver informs the firmware about the kdump mode through MPI capabilities bit during driver initialization. This allows firmware to adjust its behavior accordingly. Signed-off-by: Chandrakanth Patil Signed-off-by: Sumit Saxena Link: https://lore.kernel.org/r/20230302105342.34933-3-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen commit bfa659177dcba48cf13f2bd88c1972f12a60bf1c Author: Chandrakanth Patil Date: Thu Mar 2 16:23:40 2023 +0530 scsi: megaraid_sas: Update max supported LD IDs to 240 The firmware only supports Logical Disk IDs up to 240 and LD ID 255 (0xFF) is reserved for deleted LDs. However, in some cases, firmware was assigning LD ID 254 (0xFE) to deleted LDs and this was causing the driver to mark the wrong disk as deleted. This in turn caused the wrong disk device to be taken offline by the SCSI midlayer. To address this issue, limit the LD ID range from 255 to 240. This ensures the deleted LD ID is properly identified and removed by the driver without accidently deleting any valid LDs. Fixes: ae6874ba4b43 ("scsi: megaraid_sas: Early detection of VD deletion through RaidMap update") Reported-by: Martin K. Petersen Signed-off-by: Chandrakanth Patil Signed-off-by: Sumit Saxena Link: https://lore.kernel.org/r/20230302105342.34933-2-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen commit 8e45183978d64699df639e795235433a60f35047 Author: Ranjan Kumar Date: Tue Feb 28 06:08:35 2023 -0800 scsi: mpi3mr: Bad drive in topology results kernel crash When the SAS Transport Layer support is enabled and a device exposed to the OS by the driver fails INQUIRY commands, the driver frees up the memory allocated for an internal HBA port data structure. However, in some places, the reference to the freed memory is not cleared. When the firmware sends the Device Info change event for the same device again, the freed memory is accessed and that leads to memory corruption and OS crash. Signed-off-by: Ranjan Kumar Signed-off-by: Sreekanth Reddy Link: https://lore.kernel.org/r/20230228140835.4075-7-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen commit 4f297e856a7b5da2f2c66a12e739666e23943560 Author: Ranjan Kumar Date: Tue Feb 28 06:08:34 2023 -0800 scsi: mpi3mr: NVMe command size greater than 8K fails A wrong variable is checked while populating PRP entries in the PRP page and this results in failure. No PRP entries in the PRP page were successfully created and any NVMe Encapsulated commands with PRP of size greater than 8K failed. Signed-off-by: Ranjan Kumar Signed-off-by: Sreekanth Reddy Link: https://lore.kernel.org/r/20230228140835.4075-6-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen commit ba8a9ba41fbde250fd8b0ed1e5dad0dc9318df46 Author: Ranjan Kumar Date: Tue Feb 28 06:08:33 2023 -0800 scsi: mpi3mr: Return proper values for failures in firmware init path Return proper non-zero return values for all the cases when the controller initialization and re-initialization fails. Signed-off-by: Ranjan Kumar Signed-off-by: Sreekanth Reddy Link: https://lore.kernel.org/r/20230228140835.4075-5-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen commit 0a319f1629495d27879b7ebf6eee62b8cf6e4c37 Author: Ranjan Kumar Date: Tue Feb 28 06:08:32 2023 -0800 scsi: mpi3mr: Wait for diagnostic save during controller init If a controller reset operation is triggered to recover the controller from a fault state, then wait for the snapdump to be saved in the firmware region before proceeding to reset the controller. Signed-off-by: Ranjan Kumar Signed-off-by: Sreekanth Reddy Link: https://lore.kernel.org/r/20230228140835.4075-4-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen commit 5b06a7169c59ce0c77ef8b9c82aa07c478f82aac Author: Ranjan Kumar Date: Tue Feb 28 06:08:31 2023 -0800 scsi: mpi3mr: Driver unload crashes host when enhanced logging is enabled Prevent driver from trying to dereference a NULL pointer in a debug print while removing a device during driver unload. Signed-off-by: Ranjan Kumar Signed-off-by: Sreekanth Reddy Link: https://lore.kernel.org/r/20230228140835.4075-3-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen commit 02ca7da2919ada525fb424640205110e24646b50 Author: Ranjan Kumar Date: Tue Feb 28 06:08:30 2023 -0800 scsi: mpi3mr: ioctl timeout when disabling/enabling interrupt As part of Task Management handling, the driver will disable and enable the MSIx index zero which belongs to the Admin reply queue. During this transition the driver loses some interrupts and this leads to Admin request and ioctl timeouts. After enabling the interrupts, poll the Admin reply queue to avoid timeouts. Signed-off-by: Ranjan Kumar Signed-off-by: Sreekanth Reddy Link: https://lore.kernel.org/r/20230228140835.4075-2-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen commit 2850b23e9f9ae3696e472d2883ea1b43aafa884e Author: Jakob Koschel Date: Wed Mar 1 18:19:14 2023 +0100 scsi: lpfc: Avoid usage of list iterator variable after loop If the &epd_pool->list is empty when executing lpfc_get_io_buf_from_expedite_pool() the function would return an invalid pointer. Even in the case if the list is guaranteed to be populated, the iterator variable should not be used after the loop to be more robust for future changes. 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 Link: https://lore.kernel.org/r/20230301-scsi-lpfc-avoid-list-iterator-after-loop-v1-1-325578ae7561@gmail.com Reviewed-by: Justin Tee Signed-off-by: Martin K. Petersen commit 312320b0e0ec21249a17645683fe5304d796aec1 Author: Justin Tee Date: Mon Feb 27 20:43:36 2023 -0800 scsi: lpfc: Check kzalloc() in lpfc_sli4_cgn_params_read() If kzalloc() fails in lpfc_sli4_cgn_params_read(), then we rely on lpfc_read_object()'s routine to NULL check pdata. Currently, an early return error is thrown from lpfc_read_object() to protect us from NULL ptr dereference, but the errno code is -ENODEV. Change the errno code to a more appropriate -ENOMEM. Reported-by: Kang Chen Link: https://lore.kernel.org/all/20230226102338.3362585-1-void0red@gmail.com Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20230228044336.5195-1-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit c9507eab9fa7af7ab4c80856eeafd1481ff16f7c Author: Asutosh Das Date: Wed Mar 1 17:42:56 2023 -0800 scsi: ufs: mcq: qcom: Clean the return path of ufs_qcom_mcq_config_resource() Smatch static checker reported: drivers/ufs/host/ufs-qcom.c:1469 ufs_qcom_mcq_config_resource() info: returning a literal zero is cleaner Fix the above warning by returning in place instead of a jump to a label. Also remove the usage of devm_kfree() as it's unnecessary in this function. Fixes: c263b4ef737e ("scsi: ufs: core: mcq: Configure resource regions") Reported-by: Dan Carpenter Signed-off-by: Asutosh Das Link: https://lore.kernel.org/r/3ebd2582af74b81ef7b57149f57c6a3bf0963953.1677721229.git.quic_asutoshd@quicinc.com Reviewed-by: Bjorn Andersson Reviewed-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen commit c8be073bd2bced20f58e65276281fc116758c7cb Author: Asutosh Das Date: Wed Mar 1 17:41:06 2023 -0800 scsi: ufs: mcq: qcom: Fix passing zero to PTR_ERR Fix an error case in ufs_qcom_mcq_config_resource(), where the return value is set to 0 before passing it to PTR_ERR. This led to Smatch warning: drivers/ufs/host/ufs-qcom.c:1455 ufs_qcom_mcq_config_resource() warn: passing zero to 'PTR_ERR' Fixes: c263b4ef737e ("scsi: ufs: core: mcq: Configure resource regions") Reported-by: Dan Carpenter Signed-off-by: Asutosh Das Link: https://lore.kernel.org/r/94ca99b327af634799ce5f25d0112c28cd00970d.1677721072.git.quic_asutoshd@quicinc.com Reviewed-by: Bjorn Andersson Reviewed-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen commit fa8d32721a07d1349d963832400e97ebb515aa96 Author: Dan Carpenter Date: Mon Feb 27 13:07:26 2023 +0300 scsi: ufs: ufs-qcom: Remove impossible check The "dev_req_params" pointer points to inside the middle of a struct so it can't be NULL. Removing this impossible condition is nice because now we don't need to consider the correct error code for that situation. Link: https://lore.kernel.org/r/Y/yA3niWUcGYgBU8@kili Fixes: f06fcc7155dc ("scsi: ufs-qcom: add QUniPro hardware support and power optimizations") Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit 2ebe16155dc8bd4e602cad5b5f65458d2eaa1a75 Author: Adrien Thierry Date: Mon Feb 20 09:07:40 2023 -0500 scsi: ufs: core: Add soft dependency on governor_simpleondemand The ufshcd driver uses simpleondemand governor for devfreq. Add it to the list of ufshcd softdeps to allow userspace initramfs tools like dracut to automatically pull the governor module into the initramfs together with UFS drivers. Link: https://lore.kernel.org/r/20230220140740.14379-1-athierry@redhat.com Signed-off-by: Adrien Thierry Signed-off-by: Martin K. Petersen commit 06d1a90de60208054cca15ef200138cfdbb642a9 Author: Kang Chen Date: Mon Feb 27 11:10:30 2023 +0800 scsi: hisi_sas: Check devm_add_action() return value In case devm_add_action() fails, check it in the caller of interrupt_preinit_v3_hw(). Link: https://lore.kernel.org/r/20230227031030.893324-1-void0red@gmail.com Signed-off-by: Kang Chen Acked-by: Xiang Chen Signed-off-by: Martin K. Petersen commit 052750a4444577e6067bdf73dd5ff92876f59ef6 Author: Jianhua Lu Date: Tue Feb 21 20:36:33 2023 +0800 arm64: dts: qcom: sm8250-xiaomi-elish: Correct venus firmware path Missing vendor name for venus firmware path. Add it. Fixes: a41b617530bf ("arm64: dts: qcom: sm8250: Add device tree for Xiaomi Mi Pad 5 Pro") Signed-off-by: Jianhua Lu Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230221123633.25145-1-lujianhua000@gmail.com commit 27072f2ffb29283b9a44d878204c86c08d86b37f Author: Konrad Dybcio Date: Thu Feb 16 12:08:03 2023 +0100 arm64: dts: qcom: sm8550: Use correct CPU compatibles Use the correct compatibles for the four kinds of CPU cores used on SM8550, based on the value of their MIDR_EL1 registers: CPU7: 0x411fd4e0 - CX3 r1p1 CPU5-6: 0x412fd470 - CA710 r?p? CPU3-4: 0x411fd4d0 - CA715 r?p? CPU0-2: 0x411fd461 - CA510 r?p? Signed-off-by: Konrad Dybcio Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230216110803.3945747-2-konrad.dybcio@linaro.org commit 4059297ed0a5adf8e5fd0bd734d702a24202c02e Author: Abel Vesa Date: Thu Feb 9 09:45:10 2023 +0200 arm64: dts: qcom: sm8550: Add bias pull up value to tlmm i2c data clk states The default bias pull up value for the tlmm i2c data clk states is 2.2kOhms. Add this value to make sure the driver factors in the i2c pull up bit when writing the config register. Signed-off-by: Abel Vesa Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230209074510.4153294-2-abel.vesa@linaro.org commit 11d5e41f5e129e39bddedc7244a0946a802d2e8e Author: Konrad Dybcio Date: Mon Jan 9 14:56:47 2023 +0100 arm64: dts: qcom: sm6375: Add missing power-domain-named to CDSP This was omitted when first introducing the node. Fix it. Fixes: fe6fd26aeddf ("arm64: dts: qcom: sm6375: Add ADSP&CDSP") Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109135647.339224-5-konrad.dybcio@linaro.org commit 205c91fb6aca5f8bad5346181575a7ef78e43cea Author: Konrad Dybcio Date: Thu Feb 16 13:49:21 2023 +0100 arm64: dts: qcom: sm6115: Un-enable SPI5 by default The commit mentioned in the fixes tag erroneously enabled SPI5 unconditionally. Undo it. Fixes: 25aab0b852d6 ("arm64: dts: qcom: sm6115: Add geni debug uart node for qup0") Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230216124921.3985834-1-konrad.dybcio@linaro.org commit 8013295662f55696e5953ef14c31ba03721adf8f Author: Manivannan Sadhasivam Date: Sat Feb 11 10:54:15 2023 +0530 arm64: dts: qcom: sc8280xp: Add label property to vadc channel nodes For uniquely identifying the vadc channels, label property has to be used. The initial commit adding vadc support assumed that the driver will use the unit address along with the node name to identify the channels. But this assumption is now broken by, commit 701c875aded8 ("iio: adc: qcom-spmi-adc5: Fix the channel name") that stripped unit address from channel names. This results in probe failure of the vadc driver: [ 8.380370] iio iio:device0: tried to double register : in_temp_pmic-die-temp_input [ 8.380383] qcom-spmi-adc5 c440000.spmi:pmic@0:adc@3100: Failed to register sysfs interfaces [ 8.380386] qcom-spmi-adc5: probe of c440000.spmi:pmic@0:adc@3100 failed with error -16 Hence, let's get rid of the assumption about drivers and rely on label property to uniquely identify the channels. The labels are derived from the schematics for each PMIC. For internal adc channels such as die and xo, the PMIC names are used as a prefix. Fixes: 7c0151347401 ("arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} ADC_TM5 channels") Fixes: 9d41cd17394a ("arm64: dts: qcom: sc8280xp-x13s: Add PMR735A VADC channel") Fixes: 3375151a7185 ("arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} VADC channels") Fixes: 9a6b3042c533 ("arm64: dts: qcom: sc8280xp-x13s: Add PMK8280 VADC channels") Reported-by: Steev Klimaszewski Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230211052415.14581-1-manivannan.sadhasivam@linaro.org commit 672a58fc7c477e59981653a11241566870fff852 Author: Manivannan Sadhasivam Date: Fri Feb 24 13:30:45 2023 +0530 arm64: dts: qcom: sm8150: Fix the iommu mask used for PCIe controllers The iommu mask should be 0x3f as per Qualcomm internal documentation. Without the correct mask, the PCIe transactions from the endpoint will result in SMMU faults. Hence, fix it! Cc: stable@vger.kernel.org # 5.19 Fixes: a1c86c680533 ("arm64: dts: qcom: sm8150: Add PCIe nodes") Signed-off-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Reviewed-by: Bhupesh Sharma Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230224080045.6577-1-manivannan.sadhasivam@linaro.org commit 89dc65a7cc8a119c395c0931b12d7a514f9d2bcc Author: Conor Dooley Date: Tue Feb 28 19:26:55 2023 -0500 clk: k210: remove an implicit 64-bit division The K210 clock driver depends on SOC_CANAAN, which is only selectable when !MMU on RISC-V. !MMU is not possible on 32-bit yet, but patches have been sent for its enabling. The kernel test robot reported this implicit 64-bit division there. Replace the implicit division with an explicit one. Reported-by: kernel test robot Link: https://lore.kernel.org/linux-riscv/202301201538.zNlqgE4L-lkp@intel.com/ Signed-off-by: Conor Dooley Signed-off-by: Jesse Taube Link: https://lore.kernel.org/r/20230301002657.352637-2-Mr.Bossman075@gmail.com Reviewed-by: Damien Le Moal Signed-off-by: Stephen Boyd commit 877b03795fcf29ff2e2351f7e574ecc9b9c51732 Author: Daniel Wagner Date: Wed Feb 8 16:20:14 2023 +0100 scsi: qla2xxx: Add option to disable FC2 Target support Commit 44c57f205876 ("scsi: qla2xxx: Changes to support FCP2 Target") added support for FC2 Targets. Unfortunately, there are older setups which break with this new feature enabled. Allow to disable it via module option. Link: https://lore.kernel.org/r/20230208152014.109214-1-dwagner@suse.de Signed-off-by: Daniel Wagner Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 6cc55c969b7ce8d85e09a636693d4126c3676c11 Author: Maurizio Lombardi Date: Tue Feb 14 15:15:56 2023 +0100 scsi: target: iscsi: Fix an error message in iscsi_check_key() The first half of the error message is printed by pr_err(), the second half is printed by pr_debug(). The user will therefore see only the first part of the message and will miss some useful information. Link: https://lore.kernel.org/r/20230214141556.762047-1-mlombard@redhat.com Signed-off-by: Maurizio Lombardi Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen commit fb294b1c0ba982144ca467a75e7d01ff26304e2b Author: Mikulas Patocka Date: Mon Mar 6 11:17:58 2023 -0500 dm crypt: add cond_resched() to dmcrypt_write() The loop in dmcrypt_write may be running for unbounded amount of time, thus we need cond_resched() in it. This commit fixes the following warning: [ 3391.153255][ C12] watchdog: BUG: soft lockup - CPU#12 stuck for 23s! [dmcrypt_write/2:2897] ... [ 3391.387210][ C12] Call trace: [ 3391.390338][ C12] blk_attempt_bio_merge.part.6+0x38/0x158 [ 3391.395970][ C12] blk_attempt_plug_merge+0xc0/0x1b0 [ 3391.401085][ C12] blk_mq_submit_bio+0x398/0x550 [ 3391.405856][ C12] submit_bio_noacct+0x308/0x380 [ 3391.410630][ C12] dmcrypt_write+0x1e4/0x208 [dm_crypt] [ 3391.416005][ C12] kthread+0x130/0x138 [ 3391.419911][ C12] ret_from_fork+0x10/0x18 Reported-by: yangerkun Fixes: dc2676210c42 ("dm crypt: offload writes to thread") Cc: stable@vger.kernel.org Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 9bbf5feecc7eab2c370496c1c161bbfe62084028 Author: Coly Li Date: Mon Feb 27 23:23:17 2023 +0800 dm thin: fix deadlock when swapping to thin device This is an already known issue that dm-thin volume cannot be used as swap, otherwise a deadlock may happen when dm-thin internal memory demand triggers swap I/O on the dm-thin volume itself. But thanks to commit a666e5c05e7c ("dm: fix deadlock when swapping to encrypted device"), the limit_swap_bios target flag can also be used for dm-thin to avoid the recursive I/O when it is used as swap. Fix is to simply set ti->limit_swap_bios to true in both pool_ctr() and thin_ctr(). In my test, I create a dm-thin volume /dev/vg/swap and use it as swap device. Then I run fio on another dm-thin volume /dev/vg/main and use large --blocksize to trigger swap I/O onto /dev/vg/swap. The following fio command line is used in my test, fio --name recursive-swap-io --lockmem 1 --iodepth 128 \ --ioengine libaio --filename /dev/vg/main --rw randrw \ --blocksize 1M --numjobs 32 --time_based --runtime=12h Without this fix, the whole system can be locked up within 15 seconds. With this fix, there is no any deadlock or hung task observed after 2 hours of running fio. Furthermore, if blocksize is changed from 1M to 128M, after around 30 seconds fio has no visible I/O, and the out-of-memory killer message shows up in kernel message. After around 20 minutes all fio processes are killed and the whole system is back to being alive. This is exactly what is expected when recursive I/O happens on dm-thin volume when it is used as swap. Depends-on: a666e5c05e7c ("dm: fix deadlock when swapping to encrypted device") Cc: stable@vger.kernel.org Signed-off-by: Coly Li Acked-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit e539a105f947b9db470fec39fe91d85fe737a432 Author: Jakub Kicinski Date: Sat Mar 4 11:26:10 2023 -0800 net: tls: fix device-offloaded sendpage straddling records Adrien reports that incorrect data is transmitted when a single page straddles multiple records. We would transmit the same data in all iterations of the loop. Reported-by: Adrien Moulin Link: https://lore.kernel.org/all/61481278.42813558.1677845235112.JavaMail.zimbra@corp.free.fr Fixes: c1318b39c7d3 ("tls: Add opt-in zerocopy mode of sendfile()") Tested-by: Adrien Moulin Reviewed-by: Tariq Toukan Acked-by: Maxim Mikityanskiy Link: https://lore.kernel.org/r/20230304192610.3818098-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 193250ace270fecd586dd2d0dfbd9cbd2ade977f Author: Daniel Golle Date: Sat Mar 4 13:43:20 2023 +0000 net: ethernet: mtk_eth_soc: fix RX data corruption issue Fix data corruption issue with SerDes connected PHYs operating at 1.25 Gbps speed where we could previously observe about 30% packet loss while the bad packet counter was increasing. As almost all boards with MediaTek MT7622 or MT7986 use either the MT7531 switch IC operating at 3.125Gbps SerDes rate or single-port PHYs using rate-adaptation to 2500Base-X mode, this issue only got exposed now when we started trying to use SFP modules operating with 1.25 Gbps with the BananaPi R3 board. The fix is to set bit 12 which disables the RX FIFO clear function when setting up MAC MCR, MediaTek SDK did the same change stating: "If without this patch, kernel might receive invalid packets that are corrupted by GMAC."[1] [1]: https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/d8a2975939a12686c4a95c40db21efdc3f821f63 Fixes: 42c03844e93d ("net-next: mediatek: add support for MediaTek MT7622 SoC") Tested-by: Bjørn Mork Signed-off-by: Daniel Golle Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/138da2735f92c8b6f8578ec2e5a794ee515b665f.1677937317.git.daniel@makrotopia.org Signed-off-by: Jakub Kicinski commit 58aac3a2ef414fea6d7fdf823ea177744a087d13 Author: Heiner Kallweit Date: Sat Mar 4 11:52:44 2023 +0100 net: phy: smsc: fix link up detection in forced irq mode Currently link up can't be detected in forced mode if polling isn't used. Only link up interrupt source we have is aneg complete which isn't applicable in forced mode. Therefore we have to use energy-on as link up indicator. Fixes: 7365494550f6 ("net: phy: smsc: skip ENERGYON interrupt if disabled") Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 38d408f5b1250d56f8a19d2f2ff65aa8c7b93ff4 Merge: e5e7e398f6bb7 6206b2e787da2 Author: Mark Brown Date: Mon Mar 6 21:11:50 2023 +0000 ASoC: Intel: avs: Machine board fixes Merge series from Amadeusz Sławiński : Series of adjustments to machine board files. Use fixed format in boards that were not using one. Fix clock handling. commit 5b201a82cd9d0945d70562974ea6ad8e3b1861b5 Author: Arnaldo Carvalho de Melo Date: Mon Mar 6 14:50:45 2023 -0300 perf tools: Add Adrian Hunter to MAINTAINERS as a reviewer Adrian is the main author of the Intel PT codebase and has been reviewing perf tooling patches consistently for a long time, so lets reflect that in the MAINTAINERS file so that contributors add him to the CC list in patch submissions. Acked-by: Adrian Hunter Acked-by: Ian Rogers Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/lkml/ZAYosCjlzO9plAYO@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 06a1574b94ee5272789eaea05a5bdddedea7cc0d Author: Arnaldo Carvalho de Melo Date: Mon Mar 6 14:44:11 2023 -0300 tools headers UAPI: Sync linux/perf_event.h with the kernel sources To pick up the changes in: 09519ec3b19e4144 ("perf: Add perf_event_attr::config3") The patches for the tooling side will come later. This addresses this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/perf_event.h' differs from latest version at 'include/uapi/linux/perf_event.h' diff -u tools/include/uapi/linux/perf_event.h include/uapi/linux/perf_event.h Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Rob Herring Cc: Will Deacon Link: https://lore.kernel.org/lkml/ZAZLYmDjWjSItWOq@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 633a12fda6536a1a17bcea29502e777e86a4547e Author: Konrad Dybcio Date: Tue Jan 3 15:21:20 2023 +0100 interconnect: qcom: qcm2290: Fix MASTER_SNOC_BIMC_NRT Due to what seems to be a copy-paste error, the _NRT master was identical to the _RT master, which should not be the case.. Fix it using the values available from the downstream kernel [1]. [1] https://android.googlesource.com/kernel/msm-extra/devicetree/+/refs/heads/android-msm-bramble-4.19-android11-qpr1/qcom/scuba-bus.dtsi#127 Fixes: 1a14b1ac3935 ("interconnect: qcom: Add QCM2290 driver support") Signed-off-by: Konrad Dybcio Acked-by: Shawn Guo Link: https://lore.kernel.org/r/20230103142120.15605-1-konrad.dybcio@linaro.org Signed-off-by: Georgi Djakov commit 26243872fe26ec0df7d81766253d00213990e382 Author: Conor Dooley Date: Wed Feb 22 12:46:11 2023 +0000 MAINTAINERS: add missing clock driver coverage for Microchip FPGAs When the CCC support was added, the clock binding coverage was converted to a regex in commit 71c8517e004b ("MAINTAINERS: update polarfire soc clock binding"), but the coverage for the clock drivers themselves was not updated. Rectify that now. Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20230222124610.257101-1-conor.dooley@microchip.com Signed-off-by: Stephen Boyd commit 8ca09d5fa3549d142c2080a72a4c70ce389163cd Author: Linus Torvalds Date: Mon Mar 6 12:15:13 2023 -0800 cpumask: fix incorrect cpumask scanning result checks It turns out that commit 596ff4a09b89 ("cpumask: re-introduce constant-sized cpumask optimizations") exposed a number of cases of drivers not checking the result of "cpumask_next()" and friends correctly. The documented correct check for "no more cpus in the cpumask" is to check for the result being equal or larger than the number of possible CPU ids, exactly _because_ we've always done those constant-sized cpumask scans using a widened type before. So the return value of a cpumask scan should be checked with if (cpu >= nr_cpu_ids) ... because the cpumask scan did not necessarily stop exactly *at* that maximum CPU id. But a few cases ended up instead using checks like if (cpu == nr_cpumask_bits) ... which used that internal "widened" number of bits. And that used to work pretty much by accident (ok, in this case "by accident" is simply because it matched the historical internal implementation of the cpumask scanning, so it was more of a "intentionally using implementation details rather than an accident"). But the extended constant-sized optimizations then did that internal implementation differently, and now that code that did things wrong but matched the old implementation no longer worked at all. Which then causes subsequent odd problems due to using what ends up being an invalid CPU ID. Most of these cases require either unusual hardware or special uses to hit, but the random.c one triggers quite easily. All you really need is to have a sufficiently small CONFIG_NR_CPUS value for the bit scanning optimization to be triggered, but not enough CPUs to then actually fill that widened cpumask. At that point, the cpumask scanning will return the NR_CPUS constant, which is _not_ the same as nr_cpumask_bits. This just does the mindless fix with sed -i 's/== nr_cpumask_bits/>= nr_cpu_ids/' to fix the incorrect uses. The ones in the SCSI lpfc driver in particular could probably be fixed more cleanly by just removing that repeated pattern entirely, but I am not emptionally invested enough in that driver to care. Reported-and-tested-by: Guenter Roeck Link: https://lore.kernel.org/lkml/481b19b5-83a0-4793-b4fd-194ad7b978c3@roeck-us.net/ Reported-and-tested-by: Geert Uytterhoeven Link: https://lore.kernel.org/lkml/CAMuHMdUKo_Sf7TjKzcNDa8Ve+6QrK+P8nSQrSQ=6LTRmcBKNww@mail.gmail.com/ Reported-by: Vernon Yang Link: https://lore.kernel.org/lkml/20230306160651.2016767-1-vernon2gm@gmail.com/ Cc: Yury Norov Cc: Jason A. Donenfeld Signed-off-by: Linus Torvalds commit 32dfc59e43019e43deab7afbfff37a2f9f17a222 Merge: 294635a8165a3 dfdd608c3b365 Author: Martin KaFai Lau Date: Mon Mar 6 11:44:14 2023 -0800 Merge branch 'fix resolving VAR after DATASEC' Lorenz Bauer says: ==================== See the first patch for a detailed explanation. v2: - Move RESOLVE_TBD assignment out of the loop (Martin) ==================== Signed-off-by: Martin KaFai Lau commit dfdd608c3b365f0fd49d7e13911ebcde06b9865b Author: Lorenz Bauer Date: Mon Mar 6 11:21:38 2023 +0000 selftests/bpf: check that modifier resolves after pointer Add a regression test that ensures that a VAR pointing at a modifier which follows a PTR (or STRUCT or ARRAY) is resolved correctly by the datasec validator. Signed-off-by: Lorenz Bauer Link: https://lore.kernel.org/r/20230306112138.155352-3-lmb@isovalent.com Signed-off-by: Martin KaFai Lau commit 9b459804ff9973e173fabafba2a1319f771e85fa Author: Lorenz Bauer Date: Mon Mar 6 11:21:37 2023 +0000 btf: fix resolving BTF_KIND_VAR after ARRAY, STRUCT, UNION, PTR btf_datasec_resolve contains a bug that causes the following BTF to fail loading: [1] DATASEC a size=2 vlen=2 type_id=4 offset=0 size=1 type_id=7 offset=1 size=1 [2] INT (anon) size=1 bits_offset=0 nr_bits=8 encoding=(none) [3] PTR (anon) type_id=2 [4] VAR a type_id=3 linkage=0 [5] INT (anon) size=1 bits_offset=0 nr_bits=8 encoding=(none) [6] TYPEDEF td type_id=5 [7] VAR b type_id=6 linkage=0 This error message is printed during btf_check_all_types: [1] DATASEC a size=2 vlen=2 type_id=7 offset=1 size=1 Invalid type By tracing btf_*_resolve we can pinpoint the problem: btf_datasec_resolve(depth: 1, type_id: 1, mode: RESOLVE_TBD) = 0 btf_var_resolve(depth: 2, type_id: 4, mode: RESOLVE_TBD) = 0 btf_ptr_resolve(depth: 3, type_id: 3, mode: RESOLVE_PTR) = 0 btf_var_resolve(depth: 2, type_id: 4, mode: RESOLVE_PTR) = 0 btf_datasec_resolve(depth: 1, type_id: 1, mode: RESOLVE_PTR) = -22 The last invocation of btf_datasec_resolve should invoke btf_var_resolve by means of env_stack_push, instead it returns EINVAL. The reason is that env_stack_push is never executed for the second VAR. if (!env_type_is_resolve_sink(env, var_type) && !env_type_is_resolved(env, var_type_id)) { env_stack_set_next_member(env, i + 1); return env_stack_push(env, var_type, var_type_id); } env_type_is_resolve_sink() changes its behaviour based on resolve_mode. For RESOLVE_PTR, we can simplify the if condition to the following: (btf_type_is_modifier() || btf_type_is_ptr) && !env_type_is_resolved() Since we're dealing with a VAR the clause evaluates to false. This is not sufficient to trigger the bug however. The log output and EINVAL are only generated if btf_type_id_size() fails. if (!btf_type_id_size(btf, &type_id, &type_size)) { btf_verifier_log_vsi(env, v->t, vsi, "Invalid type"); return -EINVAL; } Most types are sized, so for example a VAR referring to an INT is not a problem. The bug is only triggered if a VAR points at a modifier. Since we skipped btf_var_resolve that modifier was also never resolved, which means that btf_resolved_type_id returns 0 aka VOID for the modifier. This in turn causes btf_type_id_size to return NULL, triggering EINVAL. To summarise, the following conditions are necessary: - VAR pointing at PTR, STRUCT, UNION or ARRAY - Followed by a VAR pointing at TYPEDEF, VOLATILE, CONST, RESTRICT or TYPE_TAG The fix is to reset resolve_mode to RESOLVE_TBD before attempting to resolve a VAR from a DATASEC. Fixes: 1dc92851849c ("bpf: kernel side support for BTF Var and DataSec") Signed-off-by: Lorenz Bauer Link: https://lore.kernel.org/r/20230306112138.155352-2-lmb@isovalent.com Signed-off-by: Martin KaFai Lau commit 66305069eb6d17d9190cbcd196f3f7487df47ae8 Merge: fe15c26ee26ef 1b9b4f922f961 Author: Dave Airlie Date: Tue Mar 7 05:42:28 2023 +1000 Merge tag 'drm-misc-fixes-2023-02-23' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes A fix for nouveau preventing the system shutdown and one for a build warning, and NULL pointer dereference fix for cirrus. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230223083839.5gtmu6i42bnj7pfh@houat commit 0ffad67784a097beccf34d297ddd1b0773b3b8a3 Author: Randy Dunlap Date: Sat Feb 25 21:39:47 2023 -0800 clk: HI655X: 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: 3a49afb84ca0 ("clk: enable hi655x common clk automatically") Signed-off-by: Randy Dunlap Cc: Riku Voipio Cc: Stephen Boyd Cc: Michael Turquette Cc: linux-clk@vger.kernel.org Link: https://lore.kernel.org/r/20230226053953.4681-3-rdunlap@infradead.org Signed-off-by: Stephen Boyd commit 94511ebc6810142eb36c8b935e1713a15db94d28 Author: Nick Alcock Date: Wed Feb 22 12:14:38 2023 +0000 kbuild, clk: 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: Michael Turquette Cc: Stephen Boyd Cc: linux-clk@vger.kernel.org Link: https://lore.kernel.org/r/20230222121453.91915-13-nick.alcock@oracle.com Acked-by: Conor Dooley Reviewed-by: Conor Dooley Signed-off-by: Stephen Boyd commit 9d941b8abf863751c1c634d96539c3fab220a99c Author: Nick Alcock Date: Wed Feb 22 12:14:37 2023 +0000 kbuild, clk: bcm2835: 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: Michael Turquette Cc: Stephen Boyd Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: linux-clk@vger.kernel.org Cc: linux-rpi-kernel@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230222121453.91915-12-nick.alcock@oracle.com Signed-off-by: Stephen Boyd commit c28cd1f3433c7e339315d1ddacaeacf0fdfbe252 Author: Saravana Kannan Date: Wed Mar 1 17:46:38 2023 -0800 clk: Mark a fwnode as initialized when using CLK_OF_DECLARE() macro We already mark fwnodes as initialized when they are registered as clock providers. We do this so that fw_devlink can tell when a clock driver doesn't use the driver core framework to probe/initialize its device. This ensures fw_devlink doesn't block the consumers of such a clock provider indefinitely. However, some users of CLK_OF_DECLARE() macros don't use the same node that matches the macro as the node for the clock provider, but they initialize the entire node. To cover these cases, also mark the nodes that match the macros as initialized when the init callback function is called. An example of this is "stericsson,u8500-clks" that's handled using CLK_OF_DECLARE() and looks something like this: clocks { compatible = "stericsson,u8500-clks"; prcmu_clk: prcmu-clock { #clock-cells = <1>; }; prcc_pclk: prcc-periph-clock { #clock-cells = <2>; }; prcc_kclk: prcc-kernel-clock { #clock-cells = <2>; }; prcc_reset: prcc-reset-controller { #reset-cells = <2>; }; ... }; This patch makes sure that "clocks" is marked as initialized so that fw_devlink knows that all nodes under it have been initialized. If the driver creates struct devices for some of the subnodes, fw_devlink is smart enough to know to wait for those devices to probe, so no special handling is required for those cases. Cc: Greg Kroah-Hartman Reported-by: Linus Walleij Link: https://lore.kernel.org/lkml/CACRpkdamxDX6EBVjKX5=D3rkHp17f5pwGdBVhzFU90-0MHY6dQ@mail.gmail.com/ Fixes: 4a032827daa8 ("of: property: Simplify of_link_to_phandle()") Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20230302014639.297514-1-saravanak@google.com Reviewed-by: Linus Walleij Tested-by: Linus Walleij Signed-off-by: Stephen Boyd commit 294635a8165a31408a8b3a24f9c74849ca3d8701 Author: Alexander Lobakin Date: Fri Feb 24 17:36:07 2023 +0100 bpf, test_run: fix &xdp_frame misplacement for LIVE_FRAMES &xdp_buff and &xdp_frame are bound in a way that xdp_buff->data_hard_start == xdp_frame It's always the case and e.g. xdp_convert_buff_to_frame() relies on this. IOW, the following: for (u32 i = 0; i < 0xdead; i++) { xdpf = xdp_convert_buff_to_frame(&xdp); xdp_convert_frame_to_buff(xdpf, &xdp); } shouldn't ever modify @xdpf's contents or the pointer itself. However, "live packet" code wrongly treats &xdp_frame as part of its context placed *before* the data_hard_start. With such flow, data_hard_start is sizeof(*xdpf) off to the right and no longer points to the XDP frame. Instead of replacing `sizeof(ctx)` with `offsetof(ctx, xdpf)` in several places and praying that there are no more miscalcs left somewhere in the code, unionize ::frm with ::data in a flex array, so that both starts pointing to the actual data_hard_start and the XDP frame actually starts being a part of it, i.e. a part of the headroom, not the context. A nice side effect is that the maximum frame size for this mode gets increased by 40 bytes, as xdp_buff::frame_sz includes everything from data_hard_start (-> includes xdpf already) to the end of XDP/skb shared info. Also update %MAX_PKT_SIZE accordingly in the selftests code. Leave it hardcoded for 64 bit && 4k pages, it can be made more flexible later on. Minor: align `&head->data` with how `head->frm` is assigned for consistency. Minor #2: rename 'frm' to 'frame' in &xdp_page_head while at it for clarity. (was found while testing XDP traffic generator on ice, which calls xdp_convert_frame_to_buff() for each XDP frame) Fixes: b530e9e1063e ("bpf: Add "live packet" mode for XDP in BPF_PROG_RUN") Acked-by: Toke Høiland-Jørgensen Signed-off-by: Alexander Lobakin Link: https://lore.kernel.org/r/20230224163607.2994755-1-aleksander.lobakin@intel.com Signed-off-by: Martin KaFai Lau commit 80c16b2b121fbc3380dbffa9bab7559acbaaa2ed Author: Andy Shevchenko Date: Mon Mar 6 17:22:04 2023 +0200 cpumask: Fix typo nr_cpumask_size --> nr_cpumask_bits The never used nr_cpumask_size is just a typo, hence use existing redefinition that's called nr_cpumask_bits. Signed-off-by: Andy Shevchenko Signed-off-by: Linus Torvalds commit e4cc1483f35940c9288c332dd275f6fad485f8d2 Author: Filipe Manana Date: Mon Feb 27 12:53:56 2023 +0000 btrfs: fix extent map logging bit not cleared for split maps after dropping range At btrfs_drop_extent_map_range() we are clearing the EXTENT_FLAG_LOGGING bit on a 'flags' variable that was not initialized. This makes static checkers complain about it, so initialize the 'flags' variable before clearing the bit. In practice this has no consequences, because EXTENT_FLAG_LOGGING should not be set when btrfs_drop_extent_map_range() is called, as an fsync locks the inode in exclusive mode, locks the inode's mmap semaphore in exclusive mode too and it always flushes all delalloc. Also add a comment about why we clear EXTENT_FLAG_LOGGING on a copy of the flags of the split extent map. Reported-by: Dan Carpenter Link: https://lore.kernel.org/linux-btrfs/Y%2FyipSVozUDEZKow@kili/ Fixes: db21370bffbc ("btrfs: drop extent map range more efficiently") Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 95cd356ca23c3807b5f3503687161e216b1c520d Author: Johannes Thumshirn Date: Tue Feb 21 10:11:24 2023 -0800 btrfs: fix percent calculation for bg reclaim message We have a report, that the info message for block-group reclaim is crossing the 100% used mark. This is happening as we were truncating the divisor for the division (the block_group->length) to a 32bit value. Fix this by using div64_u64() to not truncate the divisor. In the worst case, it can lead to a div by zero error and should be possible to trigger on 4 disks RAID0, and each device is large enough: $ mkfs.btrfs -f /dev/test/scratch[1234] -m raid1 -d raid0 btrfs-progs v6.1 [...] Filesystem size: 40.00GiB Block group profiles: Data: RAID0 4.00GiB <<< Metadata: RAID1 256.00MiB System: RAID1 8.00MiB Reported-by: Forza Link: https://lore.kernel.org/linux-btrfs/e99483.c11a58d.1863591ca52@tnonline.net/ Fixes: 5f93e776c673 ("btrfs: zoned: print unusable percentage when reclaiming block groups") CC: stable@vger.kernel.org # 5.15+ Reviewed-by: Anand Jain Reviewed-by: Qu Wenruo Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba [ add Qu's note ] Signed-off-by: David Sterba commit 98e8d36a26c2ed22f78316df7d4bf33e554b9f9f Author: Naohiro Aota Date: Mon Feb 13 14:10:38 2023 +0900 btrfs: fix unnecessary increment of read error stat on write error Current btrfs_log_dev_io_error() increases the read error count even if the erroneous IO is a WRITE request. This is because it forget to use "else if", and all the error WRITE requests counts as READ error as there is (of course) no REQ_RAHEAD bit set. Fixes: c3a62baf21ad ("btrfs: use chained bios when cloning") CC: stable@vger.kernel.org # 6.1+ Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit c06016a02a6e316d861f7dddd4b70419a47ded2f Author: void0red Date: Sat Feb 18 12:36:48 2023 +0800 btrfs: handle btrfs_del_item errors in __btrfs_update_delayed_inode Even if the slot is already read out, we may still need to re-balance the tree, thus it can cause error in that btrfs_del_item() call and we need to handle it properly. Reviewed-by: Qu Wenruo Signed-off-by: void0red Signed-off-by: David Sterba commit 2943868a909f1d526da363dc077fd7b578643f4b Author: Qu Wenruo Date: Sat Feb 11 19:53:05 2023 +0800 btrfs: ioctl: return device fsid from DEV_INFO ioctl Currently user space utilizes dev info ioctl to grab the info of a certain devid, this includes its device uuid. But the returned info is not enough to determine if a device is a seed. Commit a26d60dedf9a ("btrfs: sysfs: add devinfo/fsid to retrieve actual fsid from the device") exports the same value in sysfs so this is for parity with ioctl. Add a new member, fsid, into btrfs_ioctl_dev_info_args, and populate the member with fsid value. This should not cause any compatibility problem, following the combinations: - Old user space, old kernel - Old user space, new kernel User space tool won't even check the new member. - New user space, old kernel The kernel won't touch the new member, and user space tool should zero out its argument, thus the new member is all zero. User space tool can then know the kernel doesn't support this fsid reporting, and falls back to whatever they can. - New user space, new kernel Go as planned. Would find the fsid member is no longer zero, and trust its value. Reviewed-by: Anand Jain Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 12148367d7235a015c7a3ab20bc189a34f63688e Author: Boris Burkov Date: Wed Feb 15 12:59:50 2023 -0800 btrfs: fix potential dead lock in size class loading logic As reported by Filipe, there's a potential deadlock caused by using btrfs_search_forward on commit_root. The locking there is unconditional, even if ->skip_locking and ->search_commit_root is set. It's not meant to be used for commit roots, so it always needs to do locking. So if another task is COWing a child node of the same root node and then needs to wait for block group caching to complete when trying to allocate a metadata extent, it deadlocks. For example: [539604.239315] sysrq: Show Blocked State [539604.240133] task:kworker/u16:6 state:D stack:0 pid:2119594 ppid:2 flags:0x00004000 [539604.241613] Workqueue: btrfs-cache btrfs_work_helper [btrfs] [539604.242673] Call Trace: [539604.243129] [539604.243925] __schedule+0x41d/0xee0 [539604.244797] ? rcu_read_lock_sched_held+0x12/0x70 [539604.245399] ? rwsem_down_read_slowpath+0x185/0x490 [539604.246111] schedule+0x5d/0xf0 [539604.246593] rwsem_down_read_slowpath+0x2da/0x490 [539604.247290] ? rcu_barrier_tasks_trace+0x10/0x20 [539604.248090] __down_read_common+0x3d/0x150 [539604.248702] down_read_nested+0xc3/0x140 [539604.249280] __btrfs_tree_read_lock+0x24/0x100 [btrfs] [539604.250097] btrfs_read_lock_root_node+0x48/0x60 [btrfs] [539604.250915] btrfs_search_forward+0x59/0x460 [btrfs] [539604.251781] ? btrfs_global_root+0x50/0x70 [btrfs] [539604.252476] caching_thread+0x1be/0x920 [btrfs] [539604.253167] btrfs_work_helper+0xf6/0x400 [btrfs] [539604.253848] process_one_work+0x24f/0x5a0 [539604.254476] worker_thread+0x52/0x3b0 [539604.255166] ? __pfx_worker_thread+0x10/0x10 [539604.256047] kthread+0xf0/0x120 [539604.256591] ? __pfx_kthread+0x10/0x10 [539604.257212] ret_from_fork+0x29/0x50 [539604.257822] [539604.258233] task:btrfs-transacti state:D stack:0 pid:2236474 ppid:2 flags:0x00004000 [539604.259802] Call Trace: [539604.260243] [539604.260615] __schedule+0x41d/0xee0 [539604.261205] ? rcu_read_lock_sched_held+0x12/0x70 [539604.262000] ? rwsem_down_read_slowpath+0x185/0x490 [539604.262822] schedule+0x5d/0xf0 [539604.263374] rwsem_down_read_slowpath+0x2da/0x490 [539604.266228] ? lock_acquire+0x160/0x310 [539604.266917] ? rcu_read_lock_sched_held+0x12/0x70 [539604.267996] ? lock_contended+0x19e/0x500 [539604.268720] __down_read_common+0x3d/0x150 [539604.269400] down_read_nested+0xc3/0x140 [539604.270057] __btrfs_tree_read_lock+0x24/0x100 [btrfs] [539604.271129] btrfs_read_lock_root_node+0x48/0x60 [btrfs] [539604.272372] btrfs_search_slot+0x143/0xf70 [btrfs] [539604.273295] update_block_group_item+0x9e/0x190 [btrfs] [539604.274282] btrfs_start_dirty_block_groups+0x1c4/0x4f0 [btrfs] [539604.275381] ? __mutex_unlock_slowpath+0x45/0x280 [539604.276390] btrfs_commit_transaction+0xee/0xed0 [btrfs] [539604.277391] ? lock_acquire+0x1a4/0x310 [539604.278080] ? start_transaction+0xcb/0x6c0 [btrfs] [539604.279099] transaction_kthread+0x142/0x1c0 [btrfs] [539604.279996] ? __pfx_transaction_kthread+0x10/0x10 [btrfs] [539604.280673] kthread+0xf0/0x120 [539604.281050] ? __pfx_kthread+0x10/0x10 [539604.281496] ret_from_fork+0x29/0x50 [539604.281966] [539604.282255] task:fsstress state:D stack:0 pid:2236483 ppid:1 flags:0x00004006 [539604.283897] Call Trace: [539604.284700] [539604.285088] __schedule+0x41d/0xee0 [539604.285660] schedule+0x5d/0xf0 [539604.286175] btrfs_wait_block_group_cache_progress+0xf2/0x170 [btrfs] [539604.287342] ? __pfx_autoremove_wake_function+0x10/0x10 [539604.288450] find_free_extent+0xd93/0x1750 [btrfs] [539604.289256] ? _raw_spin_unlock+0x29/0x50 [539604.289911] ? btrfs_get_alloc_profile+0x127/0x2a0 [btrfs] [539604.290843] btrfs_reserve_extent+0x147/0x290 [btrfs] [539604.291943] btrfs_alloc_tree_block+0xcb/0x3e0 [btrfs] [539604.292903] __btrfs_cow_block+0x138/0x580 [btrfs] [539604.293773] btrfs_cow_block+0x10e/0x240 [btrfs] [539604.294595] btrfs_search_slot+0x7f3/0xf70 [btrfs] [539604.295585] btrfs_update_device+0x71/0x1b0 [btrfs] [539604.296459] btrfs_chunk_alloc_add_chunk_item+0xe0/0x340 [btrfs] [539604.297489] btrfs_chunk_alloc+0x1bf/0x490 [btrfs] [539604.298335] find_free_extent+0x6fa/0x1750 [btrfs] [539604.299174] ? _raw_spin_unlock+0x29/0x50 [539604.299950] ? btrfs_get_alloc_profile+0x127/0x2a0 [btrfs] [539604.300918] btrfs_reserve_extent+0x147/0x290 [btrfs] [539604.301797] btrfs_alloc_tree_block+0xcb/0x3e0 [btrfs] [539604.303017] ? lock_release+0x224/0x4a0 [539604.303855] __btrfs_cow_block+0x138/0x580 [btrfs] [539604.304789] btrfs_cow_block+0x10e/0x240 [btrfs] [539604.305611] btrfs_search_slot+0x7f3/0xf70 [btrfs] [539604.306682] ? btrfs_global_root+0x50/0x70 [btrfs] [539604.308198] lookup_inline_extent_backref+0x17b/0x7a0 [btrfs] [539604.309254] lookup_extent_backref+0x43/0xd0 [btrfs] [539604.310122] __btrfs_free_extent+0xf8/0x810 [btrfs] [539604.310874] ? lock_release+0x224/0x4a0 [539604.311724] ? btrfs_merge_delayed_refs+0x17b/0x1d0 [btrfs] [539604.313023] __btrfs_run_delayed_refs+0x2ba/0x1260 [btrfs] [539604.314271] btrfs_run_delayed_refs+0x8f/0x1c0 [btrfs] [539604.315445] ? rcu_read_lock_sched_held+0x12/0x70 [539604.316706] btrfs_commit_transaction+0xa2/0xed0 [btrfs] [539604.317855] ? do_raw_spin_unlock+0x4b/0xa0 [539604.318544] ? _raw_spin_unlock+0x29/0x50 [539604.319240] create_subvol+0x53d/0x6e0 [btrfs] [539604.320283] btrfs_mksubvol+0x4f5/0x590 [btrfs] [539604.321220] __btrfs_ioctl_snap_create+0x11b/0x180 [btrfs] [539604.322307] btrfs_ioctl_snap_create_v2+0xc6/0x150 [btrfs] [539604.323295] btrfs_ioctl+0x9f7/0x33e0 [btrfs] [539604.324331] ? rcu_read_lock_sched_held+0x12/0x70 [539604.325137] ? lock_release+0x224/0x4a0 [539604.325808] ? __x64_sys_ioctl+0x87/0xc0 [539604.326467] __x64_sys_ioctl+0x87/0xc0 [539604.327109] do_syscall_64+0x38/0x90 [539604.327875] entry_SYSCALL_64_after_hwframe+0x72/0xdc [539604.328792] RIP: 0033:0x7f05a7babaeb This needs to use regular btrfs_search_slot() with some skip and stop logic. Since we only consider five samples (five search slots), don't bother with the complexity of looking for commit_root_sem contention. If necessary, it can be added to the load function in between samples. Reported-by: Filipe Manana Link: https://lore.kernel.org/linux-btrfs/CAL3q7H7eKMD44Z1+=Kb-1RFMMeZpAm2fwyO59yeBwCcSOU80Pg@mail.gmail.com/ Fixes: c7eec3d9aa95 ("btrfs: load block group size class when caching") Signed-off-by: Boris Burkov Signed-off-by: David Sterba commit 7d0930647c020f75592adde8712d2cb002b29387 Author: Arnaldo Carvalho de Melo Date: Mon Mar 6 14:25:21 2023 -0300 tools headers x86 cpufeatures: Sync with the kernel sources To pick the changes from: 8415a74852d7c247 ("x86/cpu, kvm: Add support for CPUID_80000021_EAX") 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 these perf build warnings: 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 Warning: Kernel ABI header at 'tools/arch/x86/include/asm/required-features.h' differs from latest version at 'arch/x86/include/asm/required-features.h' diff -u tools/arch/x86/include/asm/required-features.h arch/x86/include/asm/required-features.h Cc: Adrian Hunter Cc: Borislav Petkov (AMD) Cc: Ian Rogers Cc: Jiri Olsa Cc: Kim Phillips Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/ZAYlS2XTJ5hRtss7@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 6206b2e787da2ed567922c37bb588a44f6fb6705 Author: Cezary Rojewski Date: Fri Mar 3 14:48:54 2023 +0100 ASoC: Intel: avs: nau8825: Adjust clock control Internal clock shall be adjusted also in cases when DAPM event other than 'ON' is triggered. Signed-off-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230303134854.2277146-6-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 933de2d127281731166cf2880fa1e23c5a0f7faa Author: Cezary Rojewski Date: Fri Mar 3 14:48:53 2023 +0100 ASoC: Intel: avs: ssm4567: Remove nau8825 bits Some of the nau8825 clock control got into the ssm4567, remove it. Signed-off-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230303134854.2277146-5-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit d24dbc865c2bd5946bef62bb862a65df092dfc79 Author: Amadeusz Sławiński Date: Fri Mar 3 14:48:52 2023 +0100 ASoC: Intel: avs: rt5682: Explicitly define codec format rt5682 is headset codec configured in 48000/2/S24_LE format regardless of front end format, so force it to be so. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230303134854.2277146-4-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 61f368624fe4d0c25c6e9c917574b8ace51d776e Author: Amadeusz Sławiński Date: Fri Mar 3 14:48:51 2023 +0100 ASoC: Intel: avs: da7219: Explicitly define codec format da7219 is headset codec configured in 48000/2/S24_LE format regardless of front end format, so force it to be so. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230303134854.2277146-3-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit d16c893425d07ada1fdd817ec06d322efcf69480 Author: Amadeusz Sławiński Date: Fri Mar 3 14:48:50 2023 +0100 ASoC: Intel: avs: max98357a: Explicitly define codec format max98357a is speaker codec configured in 48000/2/S16_LE format regardless of front end format, so force it to be so. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230303134854.2277146-2-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit b7abcd9c656b982a99e18f795bb1cf81f84b656d Author: Bagas Sanjaya Date: Tue Feb 28 14:45:23 2023 +0700 bpf, doc: Link to submitting-patches.rst for general patch submission info The link for patch submission information in general refers to index page for "Working with the kernel development community" section of kernel docs, whereas the link should have been Documentation/process/submitting-patches.rst instead. Fix it by replacing the index target with the appropriate doc. Fixes: 542228384888f5 ("bpf, doc: convert bpf_devel_QA.rst to use RST formatting") Signed-off-by: Bagas Sanjaya Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230228074523.11493-3-bagasdotme@gmail.com commit 32db18d606c9a6eac7ac8bb12b4bf0e2eb1d5d14 Author: Bagas Sanjaya Date: Tue Feb 28 14:45:22 2023 +0700 bpf, doc: Do not link to docs.kernel.org for kselftest link The question on how to run BPF selftests have a reference link to kernel selftest documentation (Documentation/dev-tools/kselftest.rst). However, it uses external link to the documentation at kernel.org/docs (aka docs.kernel.org) instead, which requires Internet access. Fix this and replace the link with internal linking, by using :doc: directive while keeping the anchor text. Fixes: b7a27c3aafa252 ("bpf, doc: howto use/run the BPF selftests") Signed-off-by: Bagas Sanjaya Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230228074523.11493-2-bagasdotme@gmail.com commit 63bceed808c5cafbac4e20b5a40012a0ec6c6529 Author: Jan Kara Date: Tue Feb 28 12:11:38 2023 +0100 udf: Warn if block mapping is done for in-ICB files Now that address space operations are merge dfor in-ICB and normal files, it is more likely some code mistakenly tries to map blocks for in-ICB files. WARN and return error instead of silently returning garbage. Signed-off-by: Jan Kara commit cecb1f06541e12ec68805dbddb2013ee720dfe3d Author: Jan Kara Date: Tue Feb 28 12:00:25 2023 +0100 udf: Fix reading of in-ICB files After merging address space operations of normal and in-ICB files, readahead could get called for in-ICB files which resulted in udf_get_block() being called for these files. udf_get_block() is not prepared to be called for in-ICB files and ends up returning garbage results as it interprets file data as extent list. Fix the problem by skipping readahead for in-ICB files. Fixes: 37a8a39f7ad3 ("udf: Switch to single address_space_operations") Signed-off-by: Jan Kara commit 49854d3ccc55efd7e6873e0c39f360bdbe251c51 Author: Jan Kara Date: Mon Feb 27 19:32:19 2023 +0100 udf: Fix lost writes in udf_adinicb_writepage() The patch converting udf_adinicb_writepage() to avoid manually kmapping the page used memcpy_to_page() however that copies in the wrong direction (effectively overwriting file data with the old contents). What we should be using is memcpy_from_page() to copy data from the page into the inode and then mark inode dirty to store the data. Fixes: 5cfc45321a6d ("udf: Convert udf_adinicb_writepage() to memcpy_to_page()") Signed-off-by: Jan Kara commit 75dce6a941e3f16c3b4878c8b2f46d5d07c619ce Author: Christophe JAILLET Date: Wed Feb 15 12:08:45 2023 +0100 mtd: nand: mxic-ecc: Fix mxic_ecc_data_xfer_wait_for_completion() when irq is used wait_for_completion_timeout() and readl_poll_timeout() don't handle their return value the same way. wait_for_completion_timeout() returns 0 on time out (and >0 in all other cases) readl_poll_timeout() returns 0 on success and -ETIMEDOUT upon a timeout. In order for the error handling path to work in both cases, the logic against wait_for_completion_timeout() needs to be inverted. Fixes: 48e6633a9fa2 ("mtd: nand: mxic-ecc: Add Macronix external ECC engine support") Signed-off-by: Christophe JAILLET Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/beddbc374557e44ceec897e68c4a5d12764ddbb9.1676459308.git.christophe.jaillet@wanadoo.fr commit 4ce341de6c02d02aba7c78a6447ccfcaa9eeb328 Author: Arseniy Krasnov Date: Mon Feb 27 13:24:25 2023 +0300 mtd: rawnand: meson: initialize struct with zeroes This structure must be zeroed, because it's field 'hw->core' is used as 'parent' in 'clk_core_fill_parent_index()', but it will be uninitialized. This happens, because when this struct is not zeroed, pointer 'hw' is "initialized" by garbage, which is valid pointer, but points to some garbage. So 'hw' will be dereferenced, but 'core' contains some random data which will be interpreted as a pointer. The following backtrace is result of dereference of such pointer: [ 1.081319] __clk_register+0x414/0x820 [ 1.085113] devm_clk_register+0x64/0xd0 [ 1.088995] meson_nfc_probe+0x258/0x6ec [ 1.092875] platform_probe+0x70/0xf0 [ 1.096498] really_probe+0xc8/0x3e0 [ 1.100034] __driver_probe_device+0x84/0x190 [ 1.104346] driver_probe_device+0x44/0x120 [ 1.108487] __driver_attach+0xb4/0x220 [ 1.112282] bus_for_each_dev+0x78/0xd0 [ 1.116077] driver_attach+0x2c/0x40 [ 1.119613] bus_add_driver+0x184/0x240 [ 1.123408] driver_register+0x80/0x140 [ 1.127203] __platform_driver_register+0x30/0x40 [ 1.131860] meson_nfc_driver_init+0x24/0x30 Fixes: 1e4d3ba66888 ("mtd: rawnand: meson: fix the clock") Signed-off-by: Arseniy Krasnov Acked-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230227102425.793841-1-AVKrasnov@sberdevices.ru commit 1eb65c8687316c65140b48fad27133d583178e15 Author: Mohammed Gamal Date: Fri Feb 17 22:44:11 2023 +0200 Drivers: vmbus: Check for channel allocation before looking up relids relid2channel() assumes vmbus channel array to be allocated when called. However, in cases such as kdump/kexec, not all relids will be reset by the host. When the second kernel boots and if the guest receives a vmbus interrupt during vmbus driver initialization before vmbus_connect() is called, before it finishes, or if it fails, the vmbus interrupt service routine is called which in turn calls relid2channel() and can cause a null pointer dereference. Print a warning and error out in relid2channel() for a channel id that's invalid in the second kernel. Fixes: 8b6a877c060e ("Drivers: hv: vmbus: Replace the per-CPU channel lists with a global array of channels") Signed-off-by: Mohammed Gamal Reviewed-by: Dexuan Cui Link: https://lore.kernel.org/r/20230217204411.212709-1-mgamal@redhat.com Signed-off-by: Wei Liu commit ceac10c83b330680cc01ceaaab86cd49f4f30d81 Author: Andrew Jeffery Date: Wed Feb 22 00:10:14 2023 +0100 ARM: 9290/1: uaccess: Fix KASAN false-positives __copy_to_user_memcpy() and __clear_user_memset() had been calling memcpy() and memset() respectively, leading to false-positive KASAN reports when starting userspace: [ 10.707901] Run /init as init process [ 10.731892] process '/bin/busybox' started with executable stack [ 10.745234] ================================================================== [ 10.745796] BUG: KASAN: user-memory-access in __clear_user_memset+0x258/0x3ac [ 10.747260] Write of size 2687 at addr 000de581 by task init/1 Use __memcpy() and __memset() instead to allow userspace access, which is of course the intent of these functions. Signed-off-by: Andrew Jeffery Signed-off-by: Zev Weiss Reviewed-by: Arnd Bergmann Signed-off-by: Russell King (Oracle) commit 0d00cd114f20e4a6db37e4b08435c27acc1d1db0 Author: Dmitry Baryshkov Date: Thu Jan 5 02:22:21 2023 +0200 interconnect: qcom: sm8550: switch to qcom_icc_rpmh_* function Change sm8550 interconnect driver to use generic qcom_icc_rpmh_* functions rather than embedding a copy of thema. This also fixes an overallocation of memory for icc_onecell_data structure. Fixes: e6f0d6a30f73 ("interconnect: qcom: Add SM8550 interconnect provider driver") Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230105002221.1416479-4-dmitry.baryshkov@linaro.org Signed-off-by: Georgi Djakov commit 87e8fab1917a2b3f6e3dedfd1cdf22a1416e6676 Author: Dmitry Baryshkov Date: Thu Jan 5 02:22:20 2023 +0200 interconnect: qcom: sm8450: switch to qcom_icc_rpmh_* function Change sm8450 interconnect driver to use generic qcom_icc_rpmh_* functions rather than embedding a copy of thema. This also fixes an overallocation of memory for icc_onecell_data structure. Fixes: fafc114a468e ("interconnect: qcom: Add SM8450 interconnect provider driver") Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230105002221.1416479-3-dmitry.baryshkov@linaro.org Signed-off-by: Georgi Djakov commit f77ebdda0ee652124061c2ac42399bb6c367e729 Author: Dmitry Baryshkov Date: Thu Jan 5 02:22:19 2023 +0200 interconnect: qcom: osm-l3: fix icc_onecell_data allocation This is a struct with a trailing zero-length array of icc_node pointers but it's allocated as if it were a single array of icc_nodes instead. Fortunately this overallocates memory rather then allocating less memory than required. Fix by replacing devm_kcalloc() with devm_kzalloc() and struct_size() macro. Fixes: 5bc9900addaf ("interconnect: qcom: Add OSM L3 interconnect provider support") Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230105002221.1416479-2-dmitry.baryshkov@linaro.org Signed-off-by: Georgi Djakov commit 913a956c4363c3b5fd13d3a00836fad4c46646a7 Author: Dario Binacchi Date: Mon Feb 27 21:51:31 2023 +0100 pinctrl: stm32: use dynamic allocation of GPIO base Since commit 502df79b860563d7 ("gpiolib: Warn on drivers still using static gpiobase allocation"), one or more warnings are printed during boot on systems where static allocation of GPIO base is used: [ 0.197707] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation. [ 0.199942] stm32f429-pinctrl soc:pinctrl@40020000: GPIOA bank added [ 0.200711] gpio gpiochip1: Static allocation of GPIO base is deprecated, use dynamic allocation. [ 0.202855] stm32f429-pinctrl soc:pinctrl@40020000: GPIOB bank added [ 0.203591] gpio gpiochip2: Static allocation of GPIO base is deprecated, use dynamic allocation. [ 0.205704] stm32f429-pinctrl soc:pinctrl@40020000: GPIOC bank added [ 0.206338] gpio gpiochip3: Static allocation of GPIO base is deprecated, use dynamic allocation. [ 0.208448] stm32f429-pinctrl soc:pinctrl@40020000: GPIOD bank added [ 0.209182] gpio gpiochip4: Static allocation of GPIO base is deprecated, use dynamic allocation. [ 0.211282] stm32f429-pinctrl soc:pinctrl@40020000: GPIOE bank added [ 0.212094] gpio gpiochip5: Static allocation of GPIO base is deprecated, use dynamic allocation. [ 0.214270] stm32f429-pinctrl soc:pinctrl@40020000: GPIOF bank added [ 0.215005] gpio gpiochip6: Static allocation of GPIO base is deprecated, use dynamic allocation. [ 0.217110] stm32f429-pinctrl soc:pinctrl@40020000: GPIOG bank added [ 0.217845] gpio gpiochip7: Static allocation of GPIO base is deprecated, use dynamic allocation. [ 0.219959] stm32f429-pinctrl soc:pinctrl@40020000: GPIOH bank added [ 0.220602] gpio gpiochip8: Static allocation of GPIO base is deprecated, use dynamic allocation. [ 0.222714] stm32f429-pinctrl soc:pinctrl@40020000: GPIOI bank added [ 0.223483] gpio gpiochip9: Static allocation of GPIO base is deprecated, use dynamic allocation. [ 0.225594] stm32f429-pinctrl soc:pinctrl@40020000: GPIOJ bank added [ 0.226336] gpio gpiochip10: Static allocation of GPIO base is deprecated, use dynamic allocation. [ 0.228490] stm32f429-pinctrl soc:pinctrl@40020000: GPIOK bank added So let's follow the suggestion and use dynamic allocation. Tested on STM32F429I-DISC1 board. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20230227205131.2104082-1-dario.binacchi@amarulasolutions.com Signed-off-by: Linus Walleij commit 657fd9da2d4b4aa0a384105b236baa22fa0233bf Author: Horatiu Vultur Date: Mon Feb 6 21:37:20 2023 +0100 pinctrl: ocelot: Fix alt mode for ocelot In case the driver was trying to set an alternate mode for gpio 0 or 32 then the mode was not set correctly. The reason is that there is computation error inside the function ocelot_pinmux_set_mux because in this case it was trying to shift to left by -1. Fix this by actually shifting the function bits and not the position. Fixes: 4b36082e2e09 ("pinctrl: ocelot: fix pinmuxing for pins after 31") Signed-off-by: Horatiu Vultur Link: https://lore.kernel.org/r/20230206203720.1177718-1-horatiu.vultur@microchip.com Signed-off-by: Linus Walleij commit 7bb97e360acdd38b68ad0a1defb89c6e89c85596 Author: Johan Hovold Date: Fri Feb 24 14:08:28 2023 +0100 pinctrl: at91-pio4: fix domain name assignment Since commit d59f6617eef0 ("genirq: Allow fwnode to carry name information only") an IRQ domain is always given a name during allocation (e.g. used for the debugfs entry). Drop the no longer valid name assignment, which would lead to an attempt to free a string constant when removing the domain on late probe failures (e.g. probe deferral). Fixes: d59f6617eef0 ("genirq: Allow fwnode to carry name information only") Cc: stable@vger.kernel.org # 4.13 Signed-off-by: Johan Hovold Reviewed-by: Claudiu Beznea Tested-by: Claudiu Beznea # on SAMA7G5 Link: https://lore.kernel.org/r/20230224130828.27985-1-johan+linaro@kernel.org Signed-off-by: Linus Walleij commit 6de67ca4dab7d855ef9598cd894cd7dfa4077f96 Author: Arınç ÜNAL Date: Sat Feb 18 09:51:07 2023 +0300 pinctrl: mediatek: fix naming inconsistency Some options include "MediaTek", some "Mediatek". Rename all to "MediaTek" to address the naming inconsistency. Signed-off-by: Arınç ÜNAL Reviewed-by: Daniel Golle Link: https://lore.kernel.org/r/20230218065108.8958-2-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit c0ad453e94e5c404efbcf668648d07eaa1a71ed7 Author: Arınç ÜNAL Date: Sat Feb 18 09:51:06 2023 +0300 pinctrl: mediatek: add missing options to PINCTRL_MT7981 There are options missing from PINCTRL_MT7981 whilst being on every other pin controller. Add them. Signed-off-by: Arınç ÜNAL Acked-by: Daniel Golle Link: https://lore.kernel.org/r/20230218065108.8958-1-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit e36a82bebbf7da814530d5a179bef9df5934b717 Author: Michael Schmitz Date: Wed Mar 1 15:11:07 2023 +1300 m68k: Only force 030 bus error if PC not in exception table __get_kernel_nofault() does copy data in supervisor mode when forcing a task backtrace log through /proc/sysrq_trigger. This is expected cause a bus error exception on e.g. NULL pointer dereferencing when logging a kernel task has no workqueue associated. This bus error ought to be ignored. Our 030 bus error handler is ill equipped to deal with this: Whenever ssw indicates a kernel mode access on a data fault, we don't even attempt to handle the fault and instead always send a SEGV signal (or panic). As a result, the check for exception handling at the fault PC (buried in send_sig_fault() which gets called from do_page_fault() eventually) is never used. In contrast, both 040 and 060 access error handlers do not care whether a fault happened on supervisor mode access, and will call do_page_fault() on those, ultimately honoring the exception table. Add a check in bus_error030 to call do_page_fault() in case we do have an entry for the fault PC in our exception table. I had attempted a fix for this earlier in 2019 that did rely on testing pagefault_disabled() (see link below) to achieve the same thing, but this patch should be more generic. Tested on 030 Atari Falcon. Reported-by: Eero Tamminen Link: https://lore.kernel.org/r/alpine.LNX.2.21.1904091023540.25@nippy.intranet Link: https://lore.kernel.org/r/63130691-1984-c423-c1f2-73bfd8d3dcd3@gmail.com Signed-off-by: Michael Schmitz Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230301021107.26307-1-schmitzmic@gmail.com Signed-off-by: Geert Uytterhoeven commit d4b97925e87eb133e400fe4a482d750c74ce392f Author: Geert Uytterhoeven Date: Mon Feb 27 21:14:13 2023 +0100 m68k: mm: Move initrd phys_to_virt handling after paging_init() When booting with an initial ramdisk on platforms where physical memory does not start at address zero (e.g. on Amiga): initrd: 0ef0602c - 0f800000 Zone ranges: DMA [mem 0x0000000008000000-0x000000f7ffffffff] Normal empty Movable zone start for each node Early memory node ranges node 0: [mem 0x0000000008000000-0x000000000f7fffff] Initmem setup node 0 [mem 0x0000000008000000-0x000000000f7fffff] Unable to handle kernel access at virtual address (ptrval) Oops: 00000000 Modules linked in: PC: [<00201d3c>] memcmp+0x28/0x56 As phys_to_virt() relies on m68k_memoffset and module_fixup(), it must not be called before paging_init(). Hence postpone the phys_to_virt handling for the initial ramdisk until after calling paging_init(). While at it, reduce #ifdef clutter by using IS_ENABLED() instead. Fixes: 376e3fdecb0dcae2 ("m68k: Enable memtest functionality") Reported-by: Stephen Walsh Link: https://lists.debian.org/debian-68k/2022/09/msg00007.html Reported-by: John Paul Adrian Glaubitz Link: https://lore.kernel.org/r/4f45f05f377bf3f5baf88dbd5c3c8aeac59d94f0.camel@physik.fu-berlin.de Signed-off-by: Geert Uytterhoeven Acked-by: Finn Thain Link: https://lore.kernel.org/r/dff216da09ab7a60217c3fc2147e671ae07d636f.1677528627.git.geert@linux-m68k.org commit 0d9fad91abfd723ea5070a46d98a9f4496c93ba9 Author: Kars de Jong Date: Thu Feb 23 12:23:49 2023 +0100 m68k: mm: Fix systems with memory at end of 32-bit address space The calculation of end addresses of memory chunks overflowed to 0 when a memory chunk is located at the end of 32-bit address space. This is the case for the HP300 architecture. Link: https://lore.kernel.org/linux-m68k/CACz-3rhUo5pgNwdWHaPWmz+30Qo9xCg70wNxdf7o5x-6tXq8QQ@mail.gmail.com/ Signed-off-by: Kars de Jong Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230223112349.26675-1-jongk@linux-m68k.org Signed-off-by: Geert Uytterhoeven commit 14e998ed42208f60d5f848f5e025fa2c2e9667b0 Author: Arnaldo Carvalho de Melo Date: Mon Mar 6 09:26:35 2023 -0300 tools include UAPI: Sync linux/vhost.h with the kernel sources To get the changes in: 3b688d7a086d0438 ("vhost-vdpa: uAPI to resume the device") To pick up these changes and support them: $ tools/perf/trace/beauty/vhost_virtio_ioctl.sh > before $ cp ../linux/include/uapi/linux/vhost.h tools/include/uapi/linux/vhost.h $ tools/perf/trace/beauty/vhost_virtio_ioctl.sh > after $ diff -u before after --- before 2023-03-06 09:26:14.889251817 -0300 +++ after 2023-03-06 09:26:20.594406270 -0300 @@ -30,6 +30,7 @@ [0x77] = "VDPA_SET_CONFIG_CALL", [0x7C] = "VDPA_SET_GROUP_ASID", [0x7D] = "VDPA_SUSPEND", + [0x7E] = "VDPA_RESUME", }; static const char *vhost_virtio_ioctl_read_cmds[] = { [0x00] = "GET_FEATURES", $ For instance, see how those 'cmd' ioctl arguments get translated, now VDPA_RESUME will be as well: # perf trace -a -e ioctl --max-events=10 0.000 ( 0.011 ms): pipewire/2261 ioctl(fd: 60, cmd: SNDRV_PCM_HWSYNC, arg: 0x1) = 0 21.353 ( 0.014 ms): pipewire/2261 ioctl(fd: 60, cmd: SNDRV_PCM_HWSYNC, arg: 0x1) = 0 25.766 ( 0.014 ms): gnome-shell/2196 ioctl(fd: 14, cmd: DRM_I915_IRQ_WAIT, arg: 0x7ffe4a22c740) = 0 25.845 ( 0.034 ms): gnome-shel:cs0/2212 ioctl(fd: 14, cmd: DRM_I915_IRQ_EMIT, arg: 0x7fd43915dc70) = 0 25.916 ( 0.011 ms): gnome-shell/2196 ioctl(fd: 9, cmd: DRM_MODE_ADDFB2, arg: 0x7ffe4a22c8a0) = 0 25.941 ( 0.025 ms): gnome-shell/2196 ioctl(fd: 9, cmd: DRM_MODE_ATOMIC, arg: 0x7ffe4a22c840) = 0 32.915 ( 0.009 ms): gnome-shell/2196 ioctl(fd: 9, cmd: DRM_MODE_RMFB, arg: 0x7ffe4a22cf9c) = 0 42.522 ( 0.013 ms): gnome-shell/2196 ioctl(fd: 14, cmd: DRM_I915_IRQ_WAIT, arg: 0x7ffe4a22c740) = 0 42.579 ( 0.031 ms): gnome-shel:cs0/2212 ioctl(fd: 14, cmd: DRM_I915_IRQ_EMIT, arg: 0x7fd43915dc70) = 0 42.644 ( 0.010 ms): gnome-shell/2196 ioctl(fd: 9, cmd: DRM_MODE_ADDFB2, arg: 0x7ffe4a22c8a0) = 0 # Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Michael S. Tsirkin Cc: Namhyung Kim Cc: Sebastien Boeuf Link: https://lore.kernel.org/lkml/ZAXdCTecxSNwAoeK@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 4a02426787bf024dafdb79b362285ee325de3f5e Author: Florian Westphal Date: Fri Mar 3 10:58:56 2023 +0100 netfilter: tproxy: fix deadlock due to missing BH disable The xtables packet traverser performs an unconditional local_bh_disable(), but the nf_tables evaluation loop does not. Functions that are called from either xtables or nftables must assume that they can be called in process context. inet_twsk_deschedule_put() assumes that no softirq interrupt can occur. If tproxy is used from nf_tables its possible that we'll deadlock trying to aquire a lock already held in process context. Add a small helper that takes care of this and use it. Link: https://lore.kernel.org/netfilter-devel/401bd6ed-314a-a196-1cdc-e13c720cc8f2@balasys.hu/ Fixes: 4ed8eb6570a4 ("netfilter: nf_tables: Add native tproxy support") Reported-and-tested-by: Major Dávid Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 9f7dd42f0db1dc6915a52d4a8a96ca18dd8cc34e Author: Ivan Delalande Date: Thu Mar 2 17:48:31 2023 -0800 netfilter: ctnetlink: revert to dumping mark regardless of event type It seems that change was unintentional, we have userspace code that needs the mark while listening for events like REPLY, DESTROY, etc. Also include 0-marks in requested dumps, as they were before that fix. Fixes: 1feeae071507 ("netfilter: ctnetlink: fix compilation warning after data race fixes in ct mark") Signed-off-by: Ivan Delalande Signed-off-by: Pablo Neira Ayuso commit d49765b5f4320a402fbc4ed5edfd73d87640f27c Author: Randy Dunlap Date: Sat Feb 25 21:39:48 2023 -0800 gpio: GPIO_REGMAP: 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: ebe363197e52 ("gpio: add a reusable generic gpio_chip using regmap") Signed-off-by: Randy Dunlap Cc: Michael Walle Cc: Linus Walleij Cc: Bartosz Golaszewski Cc: linux-gpio@vger.kernel.org Acked-by: Michael Walle Signed-off-by: Bartosz Golaszewski commit 7af9da8ce8f9a16221ecd8ba4280582f5bd452fc Author: Sanjay R Mehta Date: Tue Feb 14 13:13:50 2023 -0600 thunderbolt: Add quirk to disable CLx Add QUIRK_NO_CLX to disable the CLx state for hardware which doesn't supports it. AMD Yellow Carp and Pink Sardine don't support CLx state, hence disabling it using QUIRK_NO_CLX. Cc: stable@vger.kernel.org Signed-off-by: Sanjay R Mehta Signed-off-by: Basavaraj Natikar [mw: added debug log when the quirk is run] Signed-off-by: Mika Westerberg commit 89b59a84cb166f1ab5b6de9830e61324937c661e Author: Selvin Xavier Date: Fri Mar 3 18:43:58 2023 -0800 bnxt_en: Fix the double free during device removal Following warning reported by KASAN during driver unload ================================================================== BUG: KASAN: double-free in bnxt_remove_one+0x103/0x200 [bnxt_en] Free of addr ffff88814e8dd4c0 by task rmmod/17469 CPU: 47 PID: 17469 Comm: rmmod Kdump: loaded Tainted: G S 6.2.0-rc7+ #2 Hardware name: Dell Inc. PowerEdge R740/01YM03, BIOS 2.3.10 08/15/2019 Call Trace: dump_stack_lvl+0x33/0x46 print_report+0x17b/0x4b3 ? __call_rcu_common.constprop.79+0x27e/0x8c0 ? __pfx_free_object_rcu+0x10/0x10 ? __virt_addr_valid+0xe3/0x160 ? bnxt_remove_one+0x103/0x200 [bnxt_en] kasan_report_invalid_free+0x64/0xd0 ? bnxt_remove_one+0x103/0x200 [bnxt_en] ? bnxt_remove_one+0x103/0x200 [bnxt_en] __kasan_slab_free+0x179/0x1c0 ? bnxt_remove_one+0x103/0x200 [bnxt_en] __kmem_cache_free+0x194/0x350 bnxt_remove_one+0x103/0x200 [bnxt_en] pci_device_remove+0x62/0x110 device_release_driver_internal+0xf6/0x1c0 driver_detach+0x76/0xe0 bus_remove_driver+0x89/0x160 pci_unregister_driver+0x26/0x110 ? strncpy_from_user+0x188/0x1c0 bnxt_exit+0xc/0x24 [bnxt_en] __x64_sys_delete_module+0x21f/0x390 ? __pfx___x64_sys_delete_module+0x10/0x10 ? __pfx_mem_cgroup_handle_over_high+0x10/0x10 ? _raw_spin_lock+0x87/0xe0 ? __pfx__raw_spin_lock+0x10/0x10 ? __audit_syscall_entry+0x185/0x210 ? ktime_get_coarse_real_ts64+0x51/0x80 ? syscall_trace_enter.isra.18+0x126/0x1a0 do_syscall_64+0x37/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7effcb6fd71b Code: 73 01 c3 48 8b 0d 6d 17 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa b8 b0 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 3d 17 2c 00 f7 d8 64 89 01 48 RSP: 002b:00007ffeada270b8 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 RAX: ffffffffffffffda RBX: 00005623660e0750 RCX: 00007effcb6fd71b RDX: 000000000000000a RSI: 0000000000000800 RDI: 00005623660e07b8 RBP: 0000000000000000 R08: 00007ffeada26031 R09: 0000000000000000 R10: 00007effcb771280 R11: 0000000000000206 R12: 00007ffeada272e0 R13: 00007ffeada28bc4 R14: 00005623660e02a0 R15: 00005623660e0750 Auxiliary device structures are freed in bnxt_aux_dev_release. So avoid calling kfree from bnxt_remove_one. Also, set bp->edev to NULL before freeing the auxilary private structure. Fixes: d80d88b0dfff ("bnxt_en: Add auxiliary driver support") Reviewed-by: Ajit Khaparde Reviewed-by: Andy Gospodarek Signed-off-by: Selvin Xavier Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit accd7e23693aaaa9aa0d3e9eca0ae77d1be80ab3 Author: Michael Chan Date: Fri Mar 3 18:43:57 2023 -0800 bnxt_en: Avoid order-5 memory allocation for TPA data The driver needs to keep track of all the possible concurrent TPA (GRO/LRO) completions on the aggregation ring. On P5 chips, the maximum number of concurrent TPA is 256 and the amount of memory we allocate is order-5 on systems using 4K pages. Memory allocation failure has been reported: NetworkManager: page allocation failure: order:5, mode:0x40dc0(GFP_KERNEL|__GFP_COMP|__GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0-1 CPU: 15 PID: 2995 Comm: NetworkManager Kdump: loaded Not tainted 5.10.156 #1 Hardware name: Dell Inc. PowerEdge R660/0M1CC5, BIOS 0.2.25 08/12/2022 Call Trace: dump_stack+0x57/0x6e warn_alloc.cold.120+0x7b/0xdd ? _cond_resched+0x15/0x30 ? __alloc_pages_direct_compact+0x15f/0x170 __alloc_pages_slowpath.constprop.108+0xc58/0xc70 __alloc_pages_nodemask+0x2d0/0x300 kmalloc_order+0x24/0xe0 kmalloc_order_trace+0x19/0x80 bnxt_alloc_mem+0x1150/0x15c0 [bnxt_en] ? bnxt_get_func_stat_ctxs+0x13/0x60 [bnxt_en] __bnxt_open_nic+0x12e/0x780 [bnxt_en] bnxt_open+0x10b/0x240 [bnxt_en] __dev_open+0xe9/0x180 __dev_change_flags+0x1af/0x220 dev_change_flags+0x21/0x60 do_setlink+0x35c/0x1100 Instead of allocating this big chunk of memory and dividing it up for the concurrent TPA instances, allocate each small chunk separately for each TPA instance. This will reduce it to order-0 allocations. Fixes: 79632e9ba386 ("bnxt_en: Expand bnxt_tpa_info struct to support 57500 chips.") Reviewed-by: Somnath Kotur Reviewed-by: Damodharam Ammepalli Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit f4b47a2e9463950df3e7c8b70e017877c1d4eb11 Author: Russell King (Oracle) Date: Fri Mar 3 16:37:54 2023 +0000 net: phylib: get rid of unnecessary locking The locking in phy_probe() and phy_remove() does very little to prevent any races with e.g. phy_attach_direct(), but instead causes lockdep ABBA warnings. Remove it. ====================================================== WARNING: possible circular locking dependency detected 6.2.0-dirty #1108 Tainted: G W E ------------------------------------------------------ ip/415 is trying to acquire lock: ffff5c268f81ef50 (&dev->lock){+.+.}-{3:3}, at: phy_attach_direct+0x17c/0x3a0 [libphy] but task is already holding lock: ffffaef6496cb518 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x154/0x560 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (rtnl_mutex){+.+.}-{3:3}: __lock_acquire+0x35c/0x6c0 lock_acquire.part.0+0xcc/0x220 lock_acquire+0x68/0x84 __mutex_lock+0x8c/0x414 mutex_lock_nested+0x34/0x40 rtnl_lock+0x24/0x30 sfp_bus_add_upstream+0x34/0x150 phy_sfp_probe+0x4c/0x94 [libphy] mv3310_probe+0x148/0x184 [marvell10g] phy_probe+0x8c/0x200 [libphy] call_driver_probe+0xbc/0x15c really_probe+0xc0/0x320 __driver_probe_device+0x84/0x120 driver_probe_device+0x44/0x120 __device_attach_driver+0xc4/0x160 bus_for_each_drv+0x80/0xe0 __device_attach+0xb0/0x1f0 device_initial_probe+0x1c/0x2c bus_probe_device+0xa4/0xb0 device_add+0x360/0x53c phy_device_register+0x60/0xa4 [libphy] fwnode_mdiobus_phy_device_register+0xc0/0x190 [fwnode_mdio] fwnode_mdiobus_register_phy+0x160/0xd80 [fwnode_mdio] of_mdiobus_register+0x140/0x340 [of_mdio] orion_mdio_probe+0x298/0x3c0 [mvmdio] platform_probe+0x70/0xe0 call_driver_probe+0x34/0x15c really_probe+0xc0/0x320 __driver_probe_device+0x84/0x120 driver_probe_device+0x44/0x120 __driver_attach+0x104/0x210 bus_for_each_dev+0x78/0xdc driver_attach+0x2c/0x3c bus_add_driver+0x184/0x240 driver_register+0x80/0x13c __platform_driver_register+0x30/0x3c xt_compat_calc_jump+0x28/0xa4 [x_tables] do_one_initcall+0x50/0x1b0 do_init_module+0x50/0x1fc load_module+0x684/0x744 __do_sys_finit_module+0xc4/0x140 __arm64_sys_finit_module+0x28/0x34 invoke_syscall+0x50/0x120 el0_svc_common.constprop.0+0x6c/0x1b0 do_el0_svc+0x34/0x44 el0_svc+0x48/0xf0 el0t_64_sync_handler+0xb8/0xc0 el0t_64_sync+0x1a0/0x1a4 -> #0 (&dev->lock){+.+.}-{3:3}: check_prev_add+0xb4/0xc80 validate_chain+0x414/0x47c __lock_acquire+0x35c/0x6c0 lock_acquire.part.0+0xcc/0x220 lock_acquire+0x68/0x84 __mutex_lock+0x8c/0x414 mutex_lock_nested+0x34/0x40 phy_attach_direct+0x17c/0x3a0 [libphy] phylink_fwnode_phy_connect.part.0+0x70/0xe4 [phylink] phylink_fwnode_phy_connect+0x48/0x60 [phylink] mvpp2_open+0xec/0x2e0 [mvpp2] __dev_open+0x104/0x214 __dev_change_flags+0x1d4/0x254 dev_change_flags+0x2c/0x7c do_setlink+0x254/0xa50 __rtnl_newlink+0x430/0x514 rtnl_newlink+0x58/0x8c rtnetlink_rcv_msg+0x17c/0x560 netlink_rcv_skb+0x64/0x150 rtnetlink_rcv+0x20/0x30 netlink_unicast+0x1d4/0x2b4 netlink_sendmsg+0x1a4/0x400 ____sys_sendmsg+0x228/0x290 ___sys_sendmsg+0x88/0xec __sys_sendmsg+0x70/0xd0 __arm64_sys_sendmsg+0x2c/0x40 invoke_syscall+0x50/0x120 el0_svc_common.constprop.0+0x6c/0x1b0 do_el0_svc+0x34/0x44 el0_svc+0x48/0xf0 el0t_64_sync_handler+0xb8/0xc0 el0t_64_sync+0x1a0/0x1a4 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(rtnl_mutex); lock(&dev->lock); lock(rtnl_mutex); lock(&dev->lock); *** DEADLOCK *** Fixes: 298e54fa810e ("net: phy: add core phylib sfp support") Reported-by: Marc Zyngier Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit b2b76e977fc6bc38e6a4dedb62b34bc90cc6ce97 Author: Cristian Marussi Date: Thu Feb 23 15:23:30 2023 +0000 firmware: arm_scmi: Fix raw coexistence mode behaviour on failure path When SCMI raw coexistence mode is enabled make the core stack probe successfully even when the initial base protocol exchanges with the platform/server failed. This behaviour enables the system to boot with a broken regular SCMI stack but with a fully functional and accessible SCMI raw debugfs interface that can be used to further debug the issue. Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20230223152330.2707260-1-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 418a406d92cc276ddf81d4223271af1ae09fa5af Author: Ye Xingchen Date: Fri Feb 10 15:20:07 2023 +0800 firmware: arm_scmi: Remove duplicate include header inclusion linux/of.h is included more than once, just remove the duplicate include header inclusion. Signed-off-by: Ye Xingchen Link: https://lore.kernel.org/r/202302101520071730986@zte.com.cn Signed-off-by: Sudeep Holla commit 6bed395d7db2c039c0ef4123a379e27c528a3357 Author: Dan Carpenter Date: Wed Feb 22 18:17:06 2023 +0300 firmware: arm_scmi: Return a literal instead of a variable In this context "return scmi_dev;" and "return NULL;" are equivalent but it is more readable to return a literal. Signed-off-by: Dan Carpenter Reviewed-by: Cristian Marussi Link: https://lore.kernel.org/r/Y/Yx8pOdf8rNhPVe@kili Signed-off-by: Sudeep Holla commit 8ab5059dc4f4c34325eba6270ef12a4ab1386019 Author: Dan Carpenter Date: Mon Jan 23 18:07:07 2023 +0300 firmware: arm_scmi: Clean up a return statement in scmi_probe The comments say "enabled" where "disabled" is intended. Also it's cleaner to return zero explicitly instead of ret. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/Y86im5M49p3ePGxj@kili Signed-off-by: Sudeep Holla commit 5c8cf1664f288098a971a1d1e65716a2b6a279e1 Author: Christian Hewitt Date: Fri Mar 3 12:33:12 2023 +0000 drm/meson: fix 1px pink line on GXM when scaling video overlay Playing media with a resolution smaller than the crtc size requires the video overlay to be scaled for output and GXM boards display a 1px pink line on the bottom of the scaled overlay. Comparing with the downstream vendor driver revealed VPP_DUMMY_DATA not being set [0]. Setting VPP_DUMMY_DATA prevents the 1px pink line from being seen. [0] https://github.com/endlessm/linux-s905x/blob/master/drivers/amlogic/amports/video.c#L7869 Fixes: bbbe775ec5b5 ("drm: Add support for Amlogic Meson Graphic Controller") Suggested-by: Martin Blumenstingl Signed-off-by: Christian Hewitt Acked-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230303123312.155164-1-christianshewitt@gmail.com commit a9334b702a03b693f54ebd3b98f67bf722b74870 Author: Rongguang Wei Date: Thu Mar 2 14:21:43 2023 +0800 net: stmmac: add to set device wake up flag when stmmac init phy When MAC is not support PMT, driver will check PHY's WoL capability and set device wakeup capability in stmmac_init_phy(). We can enable the WoL through ethtool, the driver would enable the device wake up flag. Now the device_may_wakeup() return true. But if there is a way which enable the PHY's WoL capability derectly, like in BIOS. The driver would not know the enable thing and would not set the device wake up flag. The phy_suspend may failed like this: [ 32.409063] PM: dpm_run_callback(): mdio_bus_phy_suspend+0x0/0x50 returns -16 [ 32.409065] PM: Device stmmac-1:00 failed to suspend: error -16 [ 32.409067] PM: Some devices failed to suspend, or early wake event detected Add to set the device wakeup enable flag according to the get_wol function result in PHY can fix the error in this scene. v2: add a Fixes tag. Fixes: 1d8e5b0f3f2c ("net: stmmac: Support WOL with phy") Signed-off-by: Rongguang Wei Signed-off-by: David S. Miller commit ec738ca127d07ecac6afae36e2880341ec89150e Author: Greg Kroah-Hartman Date: Wed Feb 8 17:02:30 2023 +0100 mtd: spi-nor: fix memory leak when using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To solve this, remove the lookup and create the directory on the first device found, and then remove it when the module is unloaded. Cc: Tudor Ambarus Cc: Pratyush Yadav Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org Reviewed-by: Michael Walle Link: https://lore.kernel.org/r/20230208160230.2179905-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 916508c30e22f658f12dc736f8198d8a096cb24d Author: Michael Walle Date: Tue Feb 7 14:10:20 2023 +0100 Revert "arm64: dts: ls1028a: sl28: get MAC addresses from VPD" With commit b203e6f1e833 ("arm64: dts: ls1028a: sl28: get MAC addresses from VPD"), the network adapter now depends on the nvmem device to be present, which isn't the case and thus breaks networking on this board. Revert it. Fixes: b203e6f1e833 ("arm64: dts: ls1028a: sl28: get MAC addresses from VPD") Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit fd4334a06d452ce89a0bb831b03130c51331d927 Author: Alexander Stein Date: Tue Jan 31 11:35:58 2023 +0100 arm64: dts: freescale: imx8-ss-lsio: Fix flexspi clock order The correct clock order is "fspi_en" and "fspi". As they are identical just reordering the names is sufficient. Fixes: 6276d66984e9 ("arm64: dts: imx8dxl: add flexspi0 support") Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit d0dc41119905f740e8d5594adce277f7c0de8c92 Author: Zhang Xiaoxu Date: Wed Nov 16 11:11:36 2022 +0800 cifs: Move the in_send statistic to __smb_send_rqst() When send SMB_COM_NT_CANCEL and RFC1002_SESSION_REQUEST, the in_send statistic was lost. Let's move the in_send statistic to the send function to avoid this scenario. Fixes: 7ee1af765dfa ("[CIFS]") Signed-off-by: Zhang Xiaoxu Signed-off-by: Steve French commit e5e7e398f6bb7918dab0612eb6991f7bae95520d Author: Ravulapati Vishnu Vardhan Rao Date: Sat Mar 4 13:37:02 2023 +0530 ASoC: codecs: tx-macro: Fix for KASAN: slab-out-of-bounds When we run syzkaller we get below Out of Bound. "KASAN: slab-out-of-bounds Read in regcache_flat_read" Below is the backtrace of the issue: dump_backtrace+0x0/0x4c8 show_stack+0x34/0x44 dump_stack_lvl+0xd8/0x118 print_address_description+0x30/0x2d8 kasan_report+0x158/0x198 __asan_report_load4_noabort+0x44/0x50 regcache_flat_read+0x10c/0x110 regcache_read+0xf4/0x180 _regmap_read+0xc4/0x278 _regmap_update_bits+0x130/0x290 regmap_update_bits_base+0xc0/0x15c snd_soc_component_update_bits+0xa8/0x22c snd_soc_component_write_field+0x68/0xd4 tx_macro_digital_mute+0xec/0x140 Actually There is no need to have decimator with 32 bits. By limiting the variable with short type u8 issue is resolved. Signed-off-by: Ravulapati Vishnu Vardhan Rao Link: https://lore.kernel.org/r/20230304080702.609-1-quic_visr@quicinc.com Signed-off-by: Mark Brown commit 65882134bc622a1e57bd5928ac588855ea2e3ddd Author: Krzysztof Kozlowski Date: Thu Mar 2 13:29:08 2023 +0100 ASoC: qcom: q6prm: fix incorrect clk_root passed to ADSP The second to last argument is clk_root (root of the clock), however the code called q6prm_request_lpass_clock() with clk_attr instead (copy-paste error). This effectively was passing value of 1 as root clock which worked on some of the SoCs (e.g. SM8450) but fails on others, depending on the ADSP. For example on SM8550 this "1" as root clock is not accepted and results in errors coming from ADSP. Fixes: 2f20640491ed ("ASoC: qdsp6: qdsp6: q6prm: handle clk disable correctly") Cc: Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla Tested-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230302122908.221398-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 03d0f97fdb45c99cf6f808832db8bd5534e22374 Author: Luca Ceresoli Date: Fri Mar 3 10:34:10 2023 +0100 ASoC: clarify that SND_SOC_IMX_SGTL5000 is the old driver Both SND_SOC_IMX_SGTL5000 and SND_SOC_FSL_ASOC_CARD implement the fsl,imx-audio-sgtl5000 compatible string, which is confusing. It took a little research to find out that the latter is much newer and it is supposed to be the preferred choice since several years. Add a clarification note to avoid wasting time for future readers. Signed-off-by: Luca Ceresoli Link: https://lore.kernel.org/r/20230303093410.357621-1-luca.ceresoli@bootlin.com Signed-off-by: Mark Brown commit 8ac5b996bf5199f15b7687ceae989f8b2a410dda Author: Dave Chinner Date: Sun Mar 5 15:13:23 2023 -0800 xfs: fix off-by-one-block in xfs_discard_folio() The recent writeback corruption fixes changed the code in xfs_discard_folio() to calculate a byte range to for punching delalloc extents. A mistake was made in using round_up(pos) for the end offset, because when pos points at the first byte of a block, it does not get rounded up to point to the end byte of the block. hence the punch range is short, and this leads to unexpected behaviour in certain cases in xfs_bmap_punch_delalloc_range. e.g. pos = 0 means we call xfs_bmap_punch_delalloc_range(0,0), so there is no previous extent and it rounds up the punch to the end of the delalloc extent it found at offset 0, not the end of the range given to xfs_bmap_punch_delalloc_range(). Fix this by handling the zero block offset case correctly. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=217030 Link: https://lore.kernel.org/linux-xfs/Y+vOfaxIWX1c%2Fyy9@bfoster/ Fixes: 7348b322332d ("xfs: xfs_bmap_punch_delalloc_range() should take a byte range") Reported-by: Pengfei Xu Found-by: Brian Foster Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 0c7273e494dd5121e20e160cb2f047a593ee14a8 Author: Dave Chinner Date: Sun Mar 5 15:13:22 2023 -0800 xfs: quotacheck failure can race with background inode inactivation The background inode inactivation can attached dquots to inodes, but this can race with a foreground quotacheck failure that leads to disabling quotas and freeing the mp->m_quotainfo structure. The background inode inactivation then tries to allocate a quota, tries to dereference mp->m_quotainfo, and crashes like so: XFS (loop1): Quotacheck: Unsuccessful (Error -5): Disabling quotas. xfs filesystem being mounted at /root/syzkaller.qCVHXV/0/file0 supports timestamps until 2038 (0x7fffffff) BUG: kernel NULL pointer dereference, address: 00000000000002a8 .... CPU: 0 PID: 161 Comm: kworker/0:4 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 Workqueue: xfs-inodegc/loop1 xfs_inodegc_worker RIP: 0010:xfs_dquot_alloc+0x95/0x1e0 .... Call Trace: xfs_qm_dqread+0x46/0x440 xfs_qm_dqget_inode+0x154/0x500 xfs_qm_dqattach_one+0x142/0x3c0 xfs_qm_dqattach_locked+0x14a/0x170 xfs_qm_dqattach+0x52/0x80 xfs_inactive+0x186/0x340 xfs_inodegc_worker+0xd3/0x430 process_one_work+0x3b1/0x960 worker_thread+0x52/0x660 kthread+0x161/0x1a0 ret_from_fork+0x29/0x50 .... Prevent this race by flushing all the queued background inode inactivations pending before purging all the cached dquots when quotacheck fails. Reported-by: Pengfei Xu Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 48e8186870d9d0902e712d601ccb7098cb220688 Author: Tony O'Brien Date: Wed Feb 22 13:52:28 2023 +1300 hwmon: (adt7475) Fix masking of hysteresis registers The wrong bits are masked in the hysteresis register; indices 0 and 2 should zero bits [7:4] and preserve bits [3:0], and index 1 should zero bits [3:0] and preserve bits [7:4]. Fixes: 1c301fc5394f ("hwmon: Add a driver for the ADT7475 hardware monitoring chip") Signed-off-by: Tony O'Brien Link: https://lore.kernel.org/r/20230222005228.158661-3-tony.obrien@alliedtelesis.co.nz Signed-off-by: Guenter Roeck commit 5f8d1e3b6f9b5971f9c06d5846ce00c49e3a8d94 Author: Tony O'Brien Date: Wed Feb 22 13:52:27 2023 +1300 hwmon: (adt7475) Display smoothing attributes in correct order Throughout the ADT7475 driver, attributes relating to the temperature sensors are displayed in the order Remote 1, Local, Remote 2. Make temp_st_show() conform to this expectation so that values set by temp_st_store() can be displayed using the correct attribute. Fixes: 8f05bcc33e74 ("hwmon: (adt7475) temperature smoothing") Signed-off-by: Tony O'Brien Link: https://lore.kernel.org/r/20230222005228.158661-2-tony.obrien@alliedtelesis.co.nz Signed-off-by: Guenter Roeck commit fe15c26ee26efa11741a7b632e9f23b01aca4cc6 Author: Linus Torvalds Date: Sun Mar 5 14:52:03 2023 -0800 Linux 6.3-rc1 commit 596ff4a09b8981790e15572e8e7bc904df5835e7 Author: Linus Torvalds Date: Sat Mar 4 13:35:43 2023 -0800 cpumask: re-introduce constant-sized cpumask optimizations Commit aa47a7c215e7 ("lib/cpumask: deprecate nr_cpumask_bits") resulted in the cpumask operations potentially becoming hugely less efficient, because suddenly the cpumask was always considered to be variable-sized. The optimization was then later added back in a limited form by commit 6f9c07be9d02 ("lib/cpumask: add FORCE_NR_CPUS config option"), but that FORCE_NR_CPUS option is not useful in a generic kernel and more of a special case for embedded situations with fixed hardware. Instead, just re-introduce the optimization, with some changes. Instead of depending on CPUMASK_OFFSTACK being false, and then always using the full constant cpumask width, this introduces three different cpumask "sizes": - the exact size (nr_cpumask_bits) remains identical to nr_cpu_ids. This is used for situations where we should use the exact size. - the "small" size (small_cpumask_bits) is the NR_CPUS constant if it fits in a single word and the bitmap operations thus end up able to trigger the "small_const_nbits()" optimizations. This is used for the operations that have optimized single-word cases that get inlined, notably the bit find and scanning functions. - the "large" size (large_cpumask_bits) is the NR_CPUS constant if it is an sufficiently small constant that makes simple "copy" and "clear" operations more efficient. This is arbitrarily set at four words or less. As a an example of this situation, without this fixed size optimization, cpumask_clear() will generate code like movl nr_cpu_ids(%rip), %edx addq $63, %rdx shrq $3, %rdx andl $-8, %edx callq memset@PLT on x86-64, because it would calculate the "exact" number of longwords that need to be cleared. In contrast, with this patch, using a MAX_CPU of 64 (which is quite a reasonable value to use), the above becomes a single movq $0,cpumask instruction instead, because instead of caring to figure out exactly how many CPU's the system has, it just knows that the cpumask will be a single word and can just clear it all. Note that this does end up tightening the rules a bit from the original version in another way: operations that set bits in the cpumask are now limited to the actual nr_cpu_ids limit, whereas we used to do the nr_cpumask_bits thing almost everywhere in the cpumask code. But if you just clear bits, or scan for bits, we can use the simpler compile-time constants. In the process, remove 'cpumask_complement()' and 'for_each_cpu_not()' which were not useful, and which fundamentally have to be limited to 'nr_cpu_ids'. Better remove them now than have somebody introduce use of them later. Of course, on x86-64 with MAXSMP there is no sane small compile-time constant for the cpumask sizes, and we end up using the actual CPU bits, and will generate the above kind of horrors regardless. Please don't use MAXSMP unless you really expect to have machines with thousands of cores. Signed-off-by: Linus Torvalds commit f915322fe014c5c515119381e886faf07b3c9d31 Merge: 7f9ec7d8169b5 660ca9470f9c6 Author: Linus Torvalds Date: Sun Mar 5 11:32:30 2023 -0800 Merge tag 'v6.3-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fix from Herbert Xu: "Fix a regression in the caam driver" * tag 'v6.3-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: caam - Fix edesc/iv ordering mixup commit 7f9ec7d8169b5281eff2b907d8ffb1bf56045f73 Merge: 4e9c542c7a51b dd093fb08e8f8 Author: Linus Torvalds Date: Sun Mar 5 11:27:48 2023 -0800 Merge tag 'x86-urgent-2023-03-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 updates from Thomas Gleixner: "A small set of updates for x86: - Return -EIO instead of success when the certificate buffer for SEV guests is not large enough - Allow STIPB to be enabled with legacy IBSR. Legacy IBRS is cleared on return to userspace for performance reasons, but the leaves user space vulnerable to cross-thread attacks which STIBP prevents. Update the documentation accordingly" * tag 'x86-urgent-2023-03-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: virt/sev-guest: Return -EIO if certificate buffer is not large enough Documentation/hw-vuln: Document the interaction between IBRS and STIBP x86/speculation: Allow enabling STIBP with legacy IBRS commit 4e9c542c7a51bcc8f6ce283459900ba47a6690f5 Merge: 1a90673e17b6b 0fb7fb713461e Author: Linus Torvalds Date: Sun Mar 5 11:19:16 2023 -0800 Merge tag 'irq-urgent-2023-03-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq updates from Thomas Gleixner: "A set of updates for the interrupt susbsystem: - Prevent possible NULL pointer derefences in irq_data_get_affinity_mask() and irq_domain_create_hierarchy() - Take the per device MSI lock before invoking code which relies on it being hold - Make sure that MSI descriptors are unreferenced before freeing them. This was overlooked when the platform MSI code was converted to use core infrastructure and results in a fals positive warning - Remove dead code in the MSI subsystem - Clarify the documentation for pci_msix_free_irq() - More kobj_type constification" * tag 'irq-urgent-2023-03-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq/msi, platform-msi: Ensure that MSI descriptors are unreferenced genirq/msi: Drop dead domain name assignment irqdomain: Add missing NULL pointer check in irq_domain_create_hierarchy() genirq/irqdesc: Make kobj_type structures constant PCI/MSI: Clarify usage of pci_msix_free_irq() genirq/msi: Take the per-device MSI lock before validating the control structure genirq/ipi: Fix NULL pointer deref in irq_data_get_affinity_mask() commit 1a90673e17b6bcc6b6e8c072015956a6204e0f2d Merge: 1a8d05a726dc5 3304f18bfcf58 Author: Linus Torvalds Date: Sun Mar 5 11:11:52 2023 -0800 Merge tag 'pull-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs update from Al Viro: "Adding Christian Brauner as VFS co-maintainer" * tag 'pull-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: Adding VFS co-maintainer commit 1a8d05a726dc5b82e608f0962511e15fcbcab1ab Merge: 95207db8166ab caa82ae7ef52b Author: Linus Torvalds Date: Sun Mar 5 11:07:58 2023 -0800 Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull VM_FAULT_RETRY fixes from Al Viro: "Some of the page fault handlers do not deal with the following case correctly: - handle_mm_fault() has returned VM_FAULT_RETRY - there is a pending fatal signal - fault had happened in kernel mode Correct action in such case is not "return unconditionally" - fatal signals are handled only upon return to userland and something like copy_to_user() would end up retrying the faulting instruction and triggering the same fault again and again. What we need to do in such case is to make the caller to treat that as failed uaccess attempt - handle exception if there is an exception handler for faulting instruction or oops if there isn't one. Over the years some architectures had been fixed and now are handling that case properly; some still do not. This series should fix the remaining ones. Status: - m68k, riscv, hexagon, parisc: tested/acked by maintainers. - alpha, sparc32, sparc64: tested locally - bug has been reproduced on the unpatched kernel and verified to be fixed by this series. - ia64, microblaze, nios2, openrisc: build, but otherwise completely untested" * tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: openrisc: fix livelock in uaccess nios2: fix livelock in uaccess microblaze: fix livelock in uaccess ia64: fix livelock in uaccess sparc: fix livelock in uaccess alpha: fix livelock in uaccess parisc: fix livelock in uaccess hexagon: fix livelock in uaccess riscv: fix livelock in uaccess m68k: fix livelock in uaccess commit 95207db8166ab95c42a03fdc5e3abd212c9987dc Author: Masahiro Yamada Date: Mon Oct 17 03:23:49 2022 +0900 Remove Intel compiler support include/linux/compiler-intel.h had no update in the past 3 years. We often forget about the third C compiler to build the kernel. For example, commit a0a12c3ed057 ("asm goto: eradicate CC_HAS_ASM_GOTO") only mentioned GCC and Clang. init/Kconfig defines CC_IS_GCC and CC_IS_CLANG but not CC_IS_ICC, and nobody has reported any issue. I guess the Intel Compiler support is broken, and nobody is caring about it. Harald Arnesen pointed out ICC (classic Intel C/C++ compiler) is deprecated: $ icc -v icc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message. icc version 2021.7.0 (gcc version 12.1.0 compatibility) Arnd Bergmann provided a link to the article, "Intel C/C++ compilers complete adoption of LLVM". lib/zstd/common/compiler.h and lib/zstd/compress/zstd_fast.c were kept untouched for better sync with https://github.com/facebook/zstd Link: https://www.intel.com/content/www/us/en/developer/articles/technical/adoption-of-llvm-complete-icx.html Signed-off-by: Masahiro Yamada Acked-by: Arnd Bergmann Reviewed-by: Nick Desaulniers Reviewed-by: Nathan Chancellor Reviewed-by: Miguel Ojeda Signed-off-by: Linus Torvalds commit 3304f18bfcf588df0fe3b703b6a6c1129d80bdc7 Author: Al Viro Date: Sat Mar 4 20:27:29 2023 -0500 Adding VFS co-maintainer Acked-by: Christian Brauner Signed-off-by: Al Viro commit b01fe98d34f3bed944a93bd8119fed80c856fad8 Merge: e77d587a2c04e 65609d3206f78 Author: Linus Torvalds Date: Sat Mar 4 14:48:29 2023 -0800 Merge tag 'i2c-for-6.3-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull more i2c updates from Wolfram Sang: "Some improvements/fixes for the newly added GXP driver and a Kconfig dependency fix" * tag 'i2c-for-6.3-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: gxp: fix an error code in probe i2c: gxp: return proper error on address NACK i2c: gxp: remove "empty" switch statement i2c: Disable I2C_APPLE when I2C_PASEMI is a builtin commit e77d587a2c04e82c6a0dffa4a32c874a4029385d Author: Linus Torvalds Date: Sat Mar 4 14:03:27 2023 -0800 mm: avoid gcc complaint about pointer casting The migration code ends up temporarily stashing information of the wrong type in unused fields of the newly allocated destination folio. That all works fine, but gcc does complain about the pointer type mis-use: mm/migrate.c: In function ‘__migrate_folio_extract’: mm/migrate.c:1050:20: note: randstruct: casting between randomized structure pointer types (ssa): ‘struct anon_vma’ and ‘struct address_space’ 1050 | *anon_vmap = (void *)dst->mapping; | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ and gcc is actually right to complain since it really doesn't understand that this is a very temporary special case where this is ok. This could be fixed in different ways by just obfuscating the assignment sufficiently that gcc doesn't see what is going on, but the truly "proper C" way to do this is by explicitly using a union. Using unions for type conversions like this is normally hugely ugly and syntactically nasty, but this really is one of the few cases where we want to make it clear that we're not doing type conversion, we're really re-using the value bit-for-bit just using another type. IOW, this should not become a common pattern, but in this one case using that odd union is probably the best way to document to the compiler what is conceptually going on here. [ Side note: there are valid cases where we convert pointers to other pointer types, notably the whole "folio vs page" situation, where the types actually have fundamental commonalities. The fact that the gcc note is limited to just randomized structures means that we don't see equivalent warnings for those cases, but it migth also mean that we miss other cases where we do play these kinds of dodgy games, and this kind of explicit conversion might be a good idea. ] I verified that at least for an allmodconfig build on x86-64, this generates the exact same code, apart from line numbers and assembler comment changes. Fixes: 64c8902ed441 ("migrate_pages: split unmap_and_move() to _unmap() and _move()") Cc: Huang, Ying Cc: Andrew Morton Signed-off-by: Linus Torvalds commit 20fdfd55ab5c3fdff5b43de632a8d8fb7744e186 Merge: c29214bc89169 ecf1d926661be Author: Linus Torvalds Date: Sat Mar 4 13:32:50 2023 -0800 Merge tag 'mm-hotfixes-stable-2023-03-04-13-12' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "17 hotfixes. Eight are for MM and seven are for other parts of the kernel. Seven are cc:stable and eight address post-6.3 issues or were judged unsuitable for -stable backporting" * tag 'mm-hotfixes-stable-2023-03-04-13-12' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: mailmap: map Dikshita Agarwal's old address to his current one mailmap: map Vikash Garodia's old address to his current one fs/cramfs/inode.c: initialize file_ra_state fs: hfsplus: fix UAF issue in hfsplus_put_super panic: fix the panic_print NMI backtrace setting lib: parser: update documentation for match_NUMBER functions kasan, x86: don't rename memintrinsics in uninstrumented files kasan: test: fix test for new meminstrinsic instrumentation kasan: treat meminstrinsic as builtins in uninstrumented files kasan: emit different calls for instrumentable memintrinsics ocfs2: fix non-auto defrag path not working issue ocfs2: fix defrag path triggering jbd2 ASSERT mailmap: map Georgi Djakov's old Linaro address to his current one mm/hwpoison: convert TTU_IGNORE_HWPOISON to TTU_HWPOISON lib/zlib: DFLTCC deflate does not write all available bits for Z_NO_FLUSH mm/damon/paddr: fix missing folio_put() mm/mremap: fix dup_anon_vma() in vma_merge() case 4 commit c29214bc89169f735657f614bde7c0fad74bd1b5 Merge: d172859ebff33 f8b2336f15f3b Author: Linus Torvalds Date: Sat Mar 4 11:20:42 2023 -0800 Merge tag 'powerpc-6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Drop orphaned VAS MAINTAINERS entry - Fix build errors with clang and KCSAN - Avoid build errors seen with LD_DEAD_CODE_DATA_ELIMINATION together with recordmcount Thanks to Nathan Chancellor. * tag 'powerpc-6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc: Avoid dead code/data elimination when using recordmcount powerpc/vmlinux.lds: Add .text.asan/tsan sections powerpc: Drop orphaned VAS MAINTAINERS entry commit d172859ebff33598d80089c0bec44471872d2628 Merge: 0988a0ea79199 a8e98f3448e1a Author: Linus Torvalds Date: Sat Mar 4 10:53:59 2023 -0800 Merge tag 'sound-fix-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of various small fixes that have been gathered since the last PR. The majority of changes are for ASoC, and there is a small change in ASoC PCM core, but the rest are all for driver- specific fixes / quirks / updates" * tag 'sound-fix-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (32 commits) ALSA: ice1712: Delete unreachable code in aureon_add_controls() ALSA: ice1712: Do not left ice->gpio_mutex locked in aureon_add_controls() ALSA: hda/realtek: Add quirk for HP EliteDesk 800 G6 Tower PC ALSA: hda/realtek: Improve support for Dell Precision 3260 ASoC: mediatek: mt8195: add missing initialization ASoC: mediatek: mt8188: add missing initialization ASoC: amd: yc: Add DMI entries to support HP OMEN 16-n0xxx (8A43) ASoC: zl38060 add gpiolib dependency ASoC: sam9g20ek: Disable capture unless building with microphone input ASoC: mt8192: Fix range for sidetone positive gain ASoC: mt8192: Report an error if when an invalid sidetone gain is written ASoC: mt8192: Fix event generation for controls ASoC: mt8192: Remove spammy log messages ASoC: mchp-pdmc: fix poc noise at capture startup ASoC: dt-bindings: sama7g5-pdmc: add microchip,startup-delay-us binding ASoC: soc-pcm: add option to start DMA after DAI ASoC: mt8183: Fix event generation for I2S DAI operations ASoC: mt8183: Remove spammy logging from I2S DAI driver ASoC: mt6358: Remove undefined HPx Mux enumeration values ASoC: mt6358: Validate Wake on Voice 2 writes ... commit f773f0a331d6c41733b17bebbc1b6cae12e016f5 Author: ZhaoLong Wang Date: Sat Mar 4 09:41:41 2023 +0800 ubi: Fix deadlock caused by recursively holding work_sem During the processing of the bgt, if the sync_erase() return -EBUSY or some other error code in __erase_worker(),schedule_erase() called again lead to the down_read(ubi->work_sem) hold twice and may get block by down_write(ubi->work_sem) in ubi_update_fastmap(), which cause deadlock. ubi bgt other task do_work down_read(&ubi->work_sem) ubi_update_fastmap erase_worker # Blocked by down_read __erase_worker down_write(&ubi->work_sem) schedule_erase schedule_ubi_work down_read(&ubi->work_sem) Fix this by changing input parameter @nested of the schedule_erase() to 'true' to avoid recursively acquiring the down_read(&ubi->work_sem). Also, fix the incorrect comment about @nested parameter of the schedule_erase() because when down_write(ubi->work_sem) is held, the @nested is also need be true. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217093 Fixes: 2e8f08deabbc ("ubi: Fix races around ubi_refill_pools()") Signed-off-by: ZhaoLong Wang Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 3ee7cb4fdf37e3763b3b10da2a7715b7a7a2a783 Author: Arnaldo Carvalho de Melo Date: Fri Mar 3 22:36:04 2023 -0300 tools arch x86: Sync the msr-index.h copy with the kernel sources To pick up the changes in: e7862eda309ecfcc ("x86/cpu: Support AMD Automatic IBRS") 0125acda7d76b943 ("x86/bugs: Reset speculation control settings on init") 38aaf921e92dc5cf ("perf/x86: Add Meteor Lake support") 5b6fac3fa44bafee ("x86/resctrl: Detect and configure Slow Memory Bandwidth Allocation") dc2a3e857981f859 ("x86/resctrl: Add interface to read mbm_total_bytes_config") Addressing these tools/perf build warnings: diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h 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' That makes the beautification scripts to pick some new entries: $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > before $ cp arch/x86/include/asm/msr-index.h tools/arch/x86/include/asm/msr-index.h $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > after $ diff -u before after --- before 2023-03-03 18:26:51.766923522 -0300 +++ after 2023-03-03 18:27:09.987415481 -0300 @@ -267,9 +267,11 @@ [0xc000010e - x86_64_specific_MSRs_offset] = "AMD64_LBR_SELECT", [0xc000010f - x86_64_specific_MSRs_offset] = "AMD_DBG_EXTN_CFG", [0xc0000200 - x86_64_specific_MSRs_offset] = "IA32_MBA_BW_BASE", + [0xc0000280 - x86_64_specific_MSRs_offset] = "IA32_SMBA_BW_BASE", [0xc0000300 - x86_64_specific_MSRs_offset] = "AMD64_PERF_CNTR_GLOBAL_STATUS", [0xc0000301 - x86_64_specific_MSRs_offset] = "AMD64_PERF_CNTR_GLOBAL_CTL", [0xc0000302 - x86_64_specific_MSRs_offset] = "AMD64_PERF_CNTR_GLOBAL_STATUS_CLR", + [0xc0000400 - x86_64_specific_MSRs_offset] = "IA32_EVT_CFG_BASE", }; #define x86_AMD_V_KVM_MSRs_offset 0xc0010000 $ Now one can trace systemwide asking to see backtraces to where that MSR is being read/written, see this example with a previous update: # perf trace -e msr:*_msr/max-stack=32/ --filter="msr>=IA32_U_CET && msr<=IA32_INT_SSP_TAB" ^C# If we use -v (verbose mode) we can see what it does behind the scenes: # perf trace -v -e msr:*_msr/max-stack=32/ --filter="msr>=IA32_U_CET && msr<=IA32_INT_SSP_TAB" Using CPUID AuthenticAMD-25-21-0 0x6a0 0x6a8 New filter for msr:read_msr: (msr>=0x6a0 && msr<=0x6a8) && (common_pid != 597499 && common_pid != 3313) 0x6a0 0x6a8 New filter for msr:write_msr: (msr>=0x6a0 && msr<=0x6a8) && (common_pid != 597499 && common_pid != 3313) mmap size 528384B ^C# Example with a frequent msr: # perf trace -v -e msr:*_msr/max-stack=32/ --filter="msr==IA32_SPEC_CTRL" --max-events 2 Using CPUID AuthenticAMD-25-21-0 0x48 New filter for msr:read_msr: (msr==0x48) && (common_pid != 2612129 && common_pid != 3841) 0x48 New filter for msr:write_msr: (msr==0x48) && (common_pid != 2612129 && common_pid != 3841) mmap size 528384B Looking at the vmlinux_path (8 entries long) symsrc__init: build id mismatch for vmlinux. Using /proc/kcore for kernel data Using /proc/kallsyms for symbols 0.000 Timer/2525383 msr:write_msr(msr: IA32_SPEC_CTRL, val: 6) do_trace_write_msr ([kernel.kallsyms]) do_trace_write_msr ([kernel.kallsyms]) __switch_to_xtra ([kernel.kallsyms]) __switch_to ([kernel.kallsyms]) __schedule ([kernel.kallsyms]) schedule ([kernel.kallsyms]) futex_wait_queue_me ([kernel.kallsyms]) futex_wait ([kernel.kallsyms]) do_futex ([kernel.kallsyms]) __x64_sys_futex ([kernel.kallsyms]) do_syscall_64 ([kernel.kallsyms]) entry_SYSCALL_64_after_hwframe ([kernel.kallsyms]) __futex_abstimed_wait_common64 (/usr/lib64/libpthread-2.33.so) 0.030 :0/0 msr:write_msr(msr: IA32_SPEC_CTRL, val: 2) do_trace_write_msr ([kernel.kallsyms]) do_trace_write_msr ([kernel.kallsyms]) __switch_to_xtra ([kernel.kallsyms]) __switch_to ([kernel.kallsyms]) __schedule ([kernel.kallsyms]) schedule_idle ([kernel.kallsyms]) do_idle ([kernel.kallsyms]) cpu_startup_entry ([kernel.kallsyms]) secondary_startup_64_no_verify ([kernel.kallsyms]) # Cc: Adrian Hunter Cc: Babu Moger Cc: Borislav Petkov (AMD) Cc: Breno Leitao Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Kim Phillips Cc: Namhyung Kim Cc: Nikunj A Dadhania Link: https://lore.kernel.org/lkml/ZAJoaZ41+rU5H0vL@kernel.org [ I had published the perf-tools branch before with the sync with ] [ 8c29f01654053258 ("x86/sev: Add SEV-SNP guest feature negotiation support") ] [ I removed it from this new sync ] Signed-off-by: Arnaldo Carvalho de Melo commit 33c53f9b5ac60c7d5c6acc91a6b6d933e0a417e3 Author: Arnaldo Carvalho de Melo Date: Fri Mar 3 17:26:24 2023 -0300 tools headers kvm: Sync uapi/{asm/linux} kvm.h headers with the kernel sources To pick up the changes in: 89b0e7de3451a17f ("KVM: arm64: nv: Introduce nested virtualization VCPU feature") 14329b825ffb7f27 ("KVM: x86/pmu: Introduce masked events to the pmu event filter") 6213b701a9df0472 ("KVM: x86: Replace 0-length arrays with flexible arrays") 3fd49805d19d1c56 ("KVM: s390: Extend MEM_OP ioctl by storage key checked cmpxchg") 14329b825ffb7f27 ("KVM: x86/pmu: Introduce masked events to the pmu event filter") That don't change functionality in tools/perf, as no new ioctl is added for the 'perf trace' scripts to harvest. This addresses 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 Cc: Aaron Lewis Cc: Adrian Hunter Cc: Christoffer Dall Cc: Ian Rogers Cc: Janis Schoetterl-Glausch Cc: Janosch Frank Cc: Jiri Olsa Cc: Kees Kook Cc: Namhyung Kim Cc: Oliver Upton Cc: Sean Christopherson Link: https://lore.kernel.org/lkml/ZAJlg7%2FfWDVGX0F3@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 5f800380af3881f1a0528d332838d4619a64593b Author: Arnaldo Carvalho de Melo Date: Fri Mar 3 16:57:50 2023 -0300 tools include UAPI: Synchronize linux/fcntl.h with the kernel sources To pick up the changes in: 6fd7353829cafc40 ("mm/memfd: add F_SEAL_EXEC") That doesn't add or change any perf tools functionality, only addresses these build warnings: Warning: Kernel ABI header at 'tools/include/uapi/linux/fcntl.h' differs from latest version at 'include/uapi/linux/fcntl.h' diff -u tools/include/uapi/linux/fcntl.h include/uapi/linux/fcntl.h Signed-off-by: Arnaldo Carvalho de Melo commit 811f35ff59b6f99ae272d6f5b96bc9e974f88196 Author: Arnaldo Carvalho de Melo Date: Fri Mar 3 16:49:20 2023 -0300 tools headers: Synchronize {linux,vdso}/bits.h with the kernel sources To pick up the changes in this cset: cbdb1f163af2bb90 ("vdso/bits.h: Add BIT_ULL() for the sake of consistency") That just causes perf to rebuild, the macro included doesn't clash with anything in tools/{perf,objtool,bpf}. This addresses this perf build warning: Warning: Kernel ABI header at 'tools/include/linux/bits.h' differs from latest version at 'include/linux/bits.h' diff -u tools/include/linux/bits.h include/linux/bits.h Warning: Kernel ABI header at 'tools/include/vdso/bits.h' differs from latest version at 'include/vdso/bits.h' diff -u tools/include/vdso/bits.h include/vdso/bits.h Signed-off-by: Arnaldo Carvalho de Melo commit df4b933e0e51e43bd27a495dc747db0851e6dd34 Author: Arnaldo Carvalho de Melo Date: Fri Mar 3 11:48:09 2023 -0300 tools headers UAPI: Sync linux/prctl.h with the kernel sources To pick new prctl options introduced in: b507808ebce23561 ("mm: implement memory-deny-write-execute as a prctl") That results in: $ diff -u tools/include/uapi/linux/prctl.h include/uapi/linux/prctl.h --- tools/include/uapi/linux/prctl.h 2022-06-20 17:54:43.884515663 -0300 +++ include/uapi/linux/prctl.h 2023-03-03 11:18:51.090923569 -0300 @@ -281,6 +281,12 @@ # define PR_SME_VL_LEN_MASK 0xffff # define PR_SME_VL_INHERIT (1 << 17) /* inherit across exec */ +/* Memory deny write / execute */ +#define PR_SET_MDWE 65 +# define PR_MDWE_REFUSE_EXEC_GAIN 1 + +#define PR_GET_MDWE 66 + #define PR_SET_VMA 0x53564d41 # define PR_SET_VMA_ANON_NAME 0 $ 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 --- before 2023-03-03 11:47:43.320013146 -0300 +++ after 2023-03-03 11:47:50.937216229 -0300 @@ -59,6 +59,8 @@ [62] = "SCHED_CORE", [63] = "SME_SET_VL", [64] = "SME_GET_VL", + [65] = "SET_MDWE", + [66] = "GET_MDWE", }; static const char *prctl_set_mm_options[] = { [1] = "START_CODE", $ Now users can do: # perf trace -e syscalls:sys_enter_prctl --filter "option==SET_MDWE||option==GET_MDWE" ^C# # trace -v -e syscalls:sys_enter_prctl --filter "option==SET_MDWE||option==GET_MDWE" New filter for syscalls:sys_enter_prctl: (option==65||option==66) && (common_pid != 5519 && common_pid != 3404) ^C# And when these prctl options appears in a session, they will be translated to the corresponding string. Cc: Adrian Hunter Cc: Andrew Morton Cc: Ian Rogers Cc: Jiri Olsa Cc: Joey Gouly Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/ZAI%2FAoPXb%2Fsxz1%2Fm@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 31d2e6b5d44e436969c15e4613e6b16c4c032d4d Author: Arnaldo Carvalho de Melo Date: Fri Mar 3 11:05:19 2023 -0300 tools headers: Update the copy of x86's mem{cpy,set}_64.S used in 'perf bench' We also continue with SYM_TYPED_FUNC_START() in util/include/linux/linkage.h and with an exception in tools/perf/check_headers.sh's diff check to ignore the include cfi_types.h line when checking if the kernel original files drifted from the copies we carry. This is to get the changes from: 69d4c0d3218692ff ("entry, kasan, x86: Disallow overriding mem*() functions") 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 Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/lkml/ZAH%2FjsioJXGIOrkf@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0988a0ea791999ebbf95693f2676381825b05033 Merge: 3162745aad939 13af134bdc6a9 Author: Linus Torvalds Date: Fri Mar 3 16:33:28 2023 -0800 Merge tag 'for-v6.3-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull more power supply updates from Sebastian Reichel: - Fix DT binding for Richtek RT9467 - Fix a NULL pointer check in the power-supply core - Document meaning of absent "present" property * tag 'for-v6.3-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: dt-bindings: power: supply: Revise Richtek RT9467 compatible name ABI: testing: sysfs-class-power: Document absence of "present" property power: supply: fix null pointer check order in __power_supply_register commit 3162745aad939af6b8bc00951d1344ee872526a9 Merge: e778361555713 71562809e401b Author: Linus Torvalds Date: Fri Mar 3 16:26:43 2023 -0800 Merge tag '6.3-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6 Pull more cifs updates from Steve French: - xfstest generic/208 fix (memory leak) - minor netfs fix (to address smatch warning) - a DFS fix for stable - a reconnect race fix - two multichannel fixes - RDMA (smbdirect) fix - two additional writeback fixes from David * tag '6.3-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6: cifs: Fix memory leak in direct I/O cifs: prevent data race in cifs_reconnect_tcon() cifs: improve checking of DFS links over STATUS_OBJECT_NAME_INVALID iov: Fix netfs_extract_user_to_sg() cifs: Fix cifs_write_back_from_locked_folio() cifs: reuse cifs_match_ipaddr for comparison of dstaddr too cifs: match even the scope id for ipv6 addresses cifs: Fix an uninitialised variable cifs: Add some missing xas_retry() calls commit e778361555713826481be6234fd1aa030bdb035e Author: Linus Torvalds Date: Thu Mar 2 15:49:44 2023 -0800 umh: simplify the capability pointer logic The usermodehelper code uses two fake pointers for the two capability cases: CAP_BSET for reading and writing 'usermodehelper_bset', and CAP_PI to read and write 'usermodehelper_inheritable'. This seems to be a completely unnecessary indirection, since we could instead just use the pointers themselves, and never have to do any "if this then that" kind of logic. So just get rid of the fake pointer values, and use the real pointer values instead. Reviewed-by: Luis Chamberlain Cc: Eric Biederman Cc: Peter Zijlstra Cc: Christoph Hellwig Cc: Kees Cook Cc: Iurii Zaikin Signed-off-by: Linus Torvalds commit fb35342f0a6875e52ad2903b215525b24e2f19b3 Merge: 34c108a02c306 2b2d50bdd258f Author: Linus Torvalds Date: Fri Mar 3 15:00:28 2023 -0800 Merge tag 'cocci-for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux Pull coccinelle updates from Julia Lawall: "Changes in make coccicheck and improve a semantic patch This makes a couple of changes in make coccicheck related to shell commands. It also updates the api/atomic_as_refcounter semantic patch to include WARNING in the output message, as done in other cases" * tag 'cocci-for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux: scripts: coccicheck: Use /usr/bin/env scripts: coccicheck: Avoid warning about spurious escape coccinelle: api/atomic_as_refcounter: include message type in output commit 34c108a02c30627bcd4875e4f32c915acc45305f Merge: 06caa75154551 3098cb655e7c9 Author: Linus Torvalds Date: Fri Mar 3 14:51:15 2023 -0800 Merge tag 'rust-fixes-6.3-rc1' of https://github.com/Rust-for-Linux/linux Pull Rust fix from Miguel Ojeda: "A single build error fix: there was a change during the merge window to a C header parsed by the Rust bindings generator, introducing a type that it does not handle well. The fix tells the generator to treat the type as opaque (for now)" * tag 'rust-fixes-6.3-rc1' of https://github.com/Rust-for-Linux/linux: rust: bindgen: Add `alt_instr` as opaque type commit 06caa751545512fae98c21f282006a7fff852daf Merge: 0a3f9a6b0265b 901b894af5b93 Author: Linus Torvalds Date: Fri Mar 3 14:41:50 2023 -0800 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull more SCSI updates from James Bottomley: "Updates that missed the first pull, mostly because of needing more soak time. Driver updates (zfcp, ufs, mpi3mr, plus two ipr bug fixes), an enclosure services (ses) update (mostly bug fixes) and other minor bug fixes and changes" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (32 commits) scsi: zfcp: Trace when request remove fails after qdio send fails scsi: zfcp: Change the type of all fsf request id fields and variables to u64 scsi: zfcp: Make the type for accessing request hashtable buckets size_t scsi: ufs: core: Simplify ufshcd_execute_start_stop() scsi: ufs: core: Rely on the block layer for setting RQF_PM scsi: core: Extend struct scsi_exec_args scsi: lpfc: Fix double word in comments scsi: core: Remove the /proc/scsi/${proc_name} directory earlier scsi: core: Fix a source code comment scsi: cxgbi: Remove unneeded version.h include scsi: qedi: Remove unneeded version.h include scsi: mpi3mr: Remove unneeded version.h include scsi: mpi3mr: Fix missing mrioc->evtack_cmds initialization scsi: mpi3mr: Use number of bits to manage bitmap sizes scsi: mpi3mr: Remove unnecessary memcpy() to alltgt_info->dmi scsi: mpi3mr: Fix issues in mpi3mr_get_all_tgt_info() scsi: mpi3mr: Fix an issue found by KASAN scsi: mpi3mr: Replace 1-element array with flex-array scsi: ipr: Work around fortify-string warning scsi: ipr: Make ipr_probe_ioa_part2() return void ... commit 65609d3206f784489eb1ebd6fce64b84a42cc63c Author: Dan Carpenter Date: Mon Feb 27 13:06:33 2023 +0300 i2c: gxp: fix an error code in probe This is passing IS_ERR() instead of PTR_ERR() so instead of an error code it prints and returns the number 1. Fixes: 4a55ed6f89f5 ("i2c: Add GXP SoC I2C Controller") Signed-off-by: Dan Carpenter Reviewed-by: Nick Hawkins Signed-off-by: Wolfram Sang commit 4b3dfb0ed6336dea4a763ce9fa30a42763eb3800 Author: Wolfram Sang Date: Mon Feb 20 15:40:59 2023 +0100 i2c: gxp: return proper error on address NACK According to Documentation/i2c/fault-codes.rst, NACK after sending an address should be -ENXIO. Signed-off-by: Wolfram Sang commit 1d092308ce223bb1403475737b8fb847e9e8704c Author: Wolfram Sang Date: Fri Feb 17 23:13:30 2023 +0100 i2c: gxp: remove "empty" switch statement There used to be error messages which had to go. Now, it only consists of 'break's, so it can go. Signed-off-by: Wolfram Sang commit a76d19e6acb1ef16561b0682cd1a566463fa3d98 Author: Benjamin Gray Date: Tue Feb 28 10:33:17 2023 +1100 i2c: Disable I2C_APPLE when I2C_PASEMI is a builtin The ppc64le_allmodconfig sets I2C_PASEMI=y and leaves COMPILE_TEST to default to y and I2C_APPLE to default to m, running into a known incompatible configuration that breaks the build [1]. Specifically, a common dependency (i2c-pasemi-core.o in this case) cannot be used by both builtin and module consumers. Disable I2C_APPLE when I2C_PASEMI is a builtin to prevent this. [1]: https://lore.kernel.org/all/202112061809.XT99aPrf-lkp@intel.com Suggested-by: Arnd Bergmann Signed-off-by: Benjamin Gray Acked-by: Arnd Bergmann Acked-by: Sven Peter Signed-off-by: Wolfram Sang commit 52f04f10b9005ac4ce640da14a52ed7a146432fa Author: Srinivas Pandruvada Date: Fri Mar 3 08:19:09 2023 -0800 thermal: intel: int340x: processor_thermal: Fix deadlock When user space updates the trip point there is a deadlock, which results in caller gets blocked forever. Commit 05eeee2b51b4 ("thermal/core: Protect sysfs accesses to thermal operations with thermal zone mutex"), added a mutex for tz->lock in the function trip_point_temp_store(). Hence, trip set callback() can't call any thermal zone API as they are protected with the same mutex lock. The callback here calling thermal_zone_device_enable(), which will result in deadlock. Move the thermal_zone_device_enable() to proc_thermal_pci_probe() to avoid this deadlock. Fixes: 05eeee2b51b4 ("thermal/core: Protect sysfs accesses to thermal operations with thermal zone mutex") Signed-off-by: Srinivas Pandruvada Cc: 6.2+ # 6.2+ Signed-off-by: Rafael J. Wysocki commit 0a3f9a6b0265b64c02226fcabb5e9a958307913b Merge: 44b6f565e7918 1467fb960349d Author: Linus Torvalds Date: Fri Mar 3 10:41:59 2023 -0800 Merge tag 'thermal-6.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more thermal control updates from Rafael Wysocki: "These fix two issues in the Intel thermal control drivers. Specifics: - Fix an error pointer dereference in the quark_dts Intel thermal driver (Dan Carpenter) - Fix the intel_bxt_pmic_thermal driver Kconfig entry to select REGMAP which is not user-visible instead of depending on it (Randy Dunlap)" * tag 'thermal-6.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: intel: BXT_PMIC: select REGMAP instead of depending on it thermal: intel: quark_dts: fix error pointer dereference commit 44b6f565e79188760851d58fa59628b4c2a1b334 Merge: c8b4accf86020 57b76324c2a03 Author: Linus Torvalds Date: Fri Mar 3 10:36:01 2023 -0800 Merge tag 'acpi-6.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more ACPI updates from Rafael Wysocki: "These update ACPI quirks for some x86 platforms and add an IRQ override quirk for one more system. Specifics: - Add an ACPI IRQ override quirk for Asus Expertbook B2402FBA (Vojtech Hejsek) - Drop a suspend-to-idle quirk for HP Elitebook G9 that is not needed any more after a firmware update (Mario Limonciello) - Add all Cezanne systems to the list for forcing StorageD3Enable, because they all need the same quirk (Mario Limonciello)" * tag 'acpi-6.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: x86: utils: Add Cezanne to the list for forcing StorageD3Enable ACPI: x86: Drop quirk for HP Elitebook ACPI: resource: Skip IRQ override on Asus Expertbook B2402FBA commit c8b4accf860203fcb380f5d15b90a7646912d9c2 Merge: 53ae7e117637f 5719638d368f3 Author: Linus Torvalds Date: Fri Mar 3 10:30:58 2023 -0800 Merge tag 'pm-6.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power management updates from Rafael Wysocki: "These update power capping (new hardware support and cleanup) and cpufreq (bug fixes, cleanups and intel_pstate adjustment for a new platform). Specifics: - Fix error handling in the apple-soc cpufreq driver (Dan Carpenter) - Change the log level of a message in the amd-pstate cpufreq driver so it is more visible to users (Kai-Heng Feng) - Adjust the balance_performance EPP value for Sapphire Rapids in the intel_pstate cpufreq driver (Srinivas Pandruvada) - Remove MODULE_LICENSE from 3 pieces of non-modular code (Nick Alcock) - Make a read-only kobj_type structure in the schedutil cpufreq governor constant (Thomas Weißschuh) - Add Add Power Limit4 support for Meteor Lake SoC to the Intel RAPL power capping driver (Sumeet Pawnikar)" * tag 'pm-6.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: apple-soc: Fix an IS_ERR() vs NULL check powercap: remove MODULE_LICENSE in non-modules cpufreq: intel_pstate: remove MODULE_LICENSE in non-modules powercap: RAPL: Add Power Limit4 support for Meteor Lake SoC cpufreq: amd-pstate: remove MODULE_LICENSE in non-modules cpufreq: schedutil: make kobj_type structure constant cpufreq: amd-pstate: Let user know amd-pstate is disabled cpufreq: intel_pstate: Adjust balance_performance EPP for Sapphire Rapids commit 53ae7e117637ff201fdf038b68e76a7202112dea Merge: 9d0281b56be5d 1947ddf9b3d5b Author: Linus Torvalds Date: Fri Mar 3 10:25:29 2023 -0800 Merge tag 'io_uring-6.3-2023-03-03' of git://git.kernel.dk/linux Pull more io_uring updates from Jens Axboe: "Here's a set of fixes/changes that didn't make the first cut, either because they got queued before I sent the early merge request, or fixes that came in afterwards. In detail: - Don't set MSG_NOSIGNAL on recv/recvmsg opcodes, as AF_PACKET will error out (David) - Fix for spurious poll wakeups (me) - Fix for a file leak for buffered reads in certain conditions (Joseph) - Don't allow registered buffers of mixed types (Pavel) - Improve handling of huge pages for registered buffers (Pavel) - Provided buffer ring size calculation fix (Wojciech) - Minor cleanups (me)" * tag 'io_uring-6.3-2023-03-03' of git://git.kernel.dk/linux: io_uring/poll: don't pass in wake func to io_init_poll_iocb() io_uring: fix fget leak when fs don't support nowait buffered read io_uring/poll: allow some retries for poll triggering spuriously io_uring: remove MSG_NOSIGNAL from recvmsg io_uring/rsrc: always initialize 'folio' to NULL io_uring/rsrc: optimise registered huge pages io_uring/rsrc: optimise single entry advance io_uring/rsrc: disallow multi-source reg buffers io_uring: remove unused wq_list_merge io_uring: fix size calculation when registering buf ring io_uring/rsrc: fix a comment in io_import_fixed() io_uring: rename 'in_idle' to 'in_cancel' io_uring: consolidate the put_ref-and-return section of adding work commit 9d0281b56be5d90117a75065f4edc27b25b14c8c Merge: 1bd1aee6cdb5c 49d24398327e3 Author: Linus Torvalds Date: Fri Mar 3 10:21:39 2023 -0800 Merge tag 'block-6.3-2023-03-03' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - NVMe pull request via Christoph: - Don't access released socket during error recovery (Akinobu Mita) - Bring back auto-removal of deleted namespaces during sequential scan (Christoph Hellwig) - Fix an error code in nvme_auth_process_dhchap_challenge (Dan Carpenter) - Show well known discovery name (Daniel Wagner) - Add a missing endianess conversion in effects masking (Keith Busch) - Fix for a regression introduced in blk-rq-qos during init in this merge window (Breno) - Reorder a few fields in struct blk_mq_tag_set, eliminating a few holes and shrinking it (Christophe) - Remove redundant bdev_get_queue() NULL checks (Juhyung) - Add sed-opal single user mode support flag (Luca) - Remove SQE128 check in ublk as it isn't needed, saving some memory (Ming) - Op specific segment checking for cloned requests (Uday) - Exclusive open partition scan fixes (Yu) - Loop offset/size checking before assigning them in the device (Zhong) - Bio polling fixes (me) * tag 'block-6.3-2023-03-03' of git://git.kernel.dk/linux: blk-mq: enforce op-specific segment limits in blk_insert_cloned_request nvme-fabrics: show well known discovery name nvme-tcp: don't access released socket during error recovery nvme-auth: fix an error code in nvme_auth_process_dhchap_challenge() nvme: bring back auto-removal of deleted namespaces during sequential scan blk-iocost: Pass gendisk to ioc_refresh_params nvme: fix sparse warning on effects masking block: be a bit more careful in checking for NULL bdev while polling block: clear bio->bi_bdev when putting a bio back in the cache loop: loop_set_status_from_info() check before assignment ublk: remove check IO_URING_F_SQE128 in ublk_ch_uring_cmd block: remove more NULL checks after bdev_get_queue() blk-mq: Reorder fields in 'struct blk_mq_tag_set' block: fix scan partition for exclusively open device again block: Revert "block: Do not reread partition table on exclusively open device" sed-opal: add support flag for SUM in status ioctl commit 1bd1aee6cdb5c8cac8234fb72def4474012c2c49 Merge: 0bdf4a8bf0aab 6210038aeaf49 Author: Linus Torvalds Date: Fri Mar 3 10:17:44 2023 -0800 Merge tag 'ata-6.3-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata Pull ATA fix from Damien Le Moal: - Revert commit 104ff59af73a ("ata: ahci: Add Tiger Lake UP{3,4} AHCI controller") as it is causing serious regressions (failure to boot) on some laptops * tag 'ata-6.3-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata: ata: ahci: Revert "ata: ahci: Add Tiger Lake UP{3,4} AHCI controller" commit 5ec498ba86550909f2611b07087d57a71a78c336 Author: Kalyan Thota Date: Mon Feb 13 03:11:41 2023 -0800 drm/msm/dpu: clear DSPP reservations in rm release Clear DSPP reservations from the global state during rm release Fixes: e47616df008b ("drm/msm/dpu: add support for color processing blocks in dpu driver") Signed-off-by: Kalyan Thota Reviewed-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Patchwork: https://patchwork.freedesktop.org/patch/522443/ Link: https://lore.kernel.org/r/1676286704-818-2-git-send-email-quic_kalyant@quicinc.com Signed-off-by: Abhinav Kumar commit ce68153edb5b36ddf87a19ed5a85131498690bbf Author: Kuogee Hsieh Date: Mon Feb 27 13:36:40 2023 -0800 drm/msm/disp/dpu: fix sc7280_pp base offset At sc7280, pingpong block is used to management the dither effects to reduce distortion at panel. Currently pingpong-0 base offset is wrongly set at 0x59000. This mistake will not cause system to crash. However it will make dither not work. This patch correct sc7280 ping pong-0 block base offset. Changes in v2: -- add more details info n regrading of pingpong block at commit text Fixes: 591e34a091d1 ("drm/msm/disp/dpu1: add support for display for SC7280 target") Signed-off-by: Kuogee Hsieh Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/524332/ Link: https://lore.kernel.org/r/1677533800-3125-1-git-send-email-quic_khsieh@quicinc.com Signed-off-by: Abhinav Kumar commit 1c1ded39bfb89217947affaa79c4cd1c138c5da2 Author: Dmitry Baryshkov Date: Thu Feb 23 12:57:08 2023 +0300 drm/msm/dpu: fix stack smashing in dpu_hw_ctl_setup_blendstage The rewritten dpu_hw_ctl_setup_blendstage() can lightly smash the stack when setting the SSPP_NONE pipe. However it was unnoticed until the kernel was tested under AOSP (with some kind of stack protection/check). This fixes the following backtrace: Unexpected kernel BRK exception at EL1 Internal error: BRK handler: 00000000f20003e8 [#1] PREEMPT SMP Hardware name: Thundercomm Dragonboard 845c (DT) pstate: a0400005 (NzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : dpu_hw_ctl_setup_blendstage+0x26c/0x278 [msm] lr : _dpu_crtc_blend_setup+0x4b4/0x5a0 [msm] sp : ffffffc00bdcb720 x29: ffffffc00bdcb720 x28: ffffff8085debac0 x27: 0000000000000002 x26: ffffffd74af18320 x25: ffffff8083af75a0 x24: ffffffc00bdcb878 x23: 0000000000000001 x22: 0000000000000000 x21: ffffff8085a70000 x20: ffffff8083012dc0 x19: 0000000000000001 x18: 0000000000000000 x17: 000000040044ffff x16: 045000f4b5593519 x15: 0000000000000000 x14: 000000000000000b x13: 0000000000000001 x12: 0000000000000000 x11: 0000000000000001 x10: ffffffc00bdcb764 x9 : ffffffd74af06a08 x8 : 0000000000000001 x7 : 0000000000000001 x6 : 0000000000000000 x5 : ffffffc00bdcb878 x4 : 0000000000000002 x3 : ffffffffffffffff x2 : ffffffc00bdcb878 x1 : 0000000000000000 x0 : 0000000000000002 Call trace: dpu_hw_ctl_setup_blendstage+0x26c/0x278 [msm] _dpu_crtc_blend_setup+0x4b4/0x5a0 [msm] dpu_crtc_atomic_begin+0xd8/0x22c [msm] drm_atomic_helper_commit_planes+0x80/0x208 [drm_kms_helper] msm_atomic_commit_tail+0x134/0x6f0 [msm] commit_tail+0xa4/0x1a4 [drm_kms_helper] drm_atomic_helper_commit+0x170/0x184 [drm_kms_helper] drm_atomic_commit+0xac/0xe8 drm_mode_atomic_ioctl+0xbf0/0xdac drm_ioctl_kernel+0xc4/0x178 drm_ioctl+0x2c8/0x608 __arm64_sys_ioctl+0xa8/0xec invoke_syscall+0x44/0x104 el0_svc_common.constprop.0+0x44/0xec do_el0_svc+0x38/0x98 el0_svc+0x2c/0xb4 el0t_64_sync_handler+0xb8/0xbc el0t_64_sync+0x1a0/0x1a4 Code: 52800016 52800017 52800018 17ffffc7 (d4207d00) Fixes: 4488f71f6373 ("drm/msm/dpu: simplify blend configuration") Reported-by: Amit Pundir Signed-off-by: Dmitry Baryshkov Tested-by: Amit Pundir Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/523778/ Link: https://lore.kernel.org/r/20230223095708.3688148-1-dmitry.baryshkov@linaro.org Signed-off-by: Abhinav Kumar commit d6181c18d55cdbbf37baea0fdd0cacf69b84f6b9 Author: Dmitry Baryshkov Date: Sun Feb 12 01:12:22 2023 +0200 drm/msm/dpu: don't use DPU_CLK_CTRL_CURSORn for DMA SSPP clocks DPU driver has been using the DPU_CLK_CTRL_CURSOR prefix for the DMA SSPP blocks used for the cursor planes. This has lead to the confusion at least for the MSM8998 platform. In preparation to supporting the cursor SSPP blocks, use proper enum values to index DMA SSPP clock controls. Reviewed-by: Neil Armstrong Tested-by: Neil Armstrong # on SM8550 on top of next-20230116 Reviewed-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/522228/ Link: https://lore.kernel.org/r/20230211231259.1308718-14-dmitry.baryshkov@linaro.org Signed-off-by: Abhinav Kumar commit 0abb6a24aabc1252eae75fe23b0ccd3217c6ee07 Author: Dmitry Baryshkov Date: Sun Feb 12 01:12:21 2023 +0200 drm/msm/dpu: fix clocks settings for msm8998 SSPP blocks DMA2 and DMA3 planes on msm8998 should use corresponding DMA2 and DMA3 clocks rather than CURSOR0/1 clocks (which are used for the CURSOR planes). Correct corresponding SSPP declarations. Fixes: 94391a14fc27 ("drm/msm/dpu1: Add MSM8998 to hw catalog") Cc: AngeloGioacchino Del Regno Cc: Jami Kettunen Reviewed-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/522230/ Link: https://lore.kernel.org/r/20230211231259.1308718-13-dmitry.baryshkov@linaro.org Signed-off-by: Abhinav Kumar commit a5045b00a68171de11603812f4304179ef608e60 Author: Dmitry Baryshkov Date: Sun Feb 12 01:12:20 2023 +0200 drm/msm/dpu: drop DPU_DIM_LAYER from MIXER_MSM8998_MASK The msm8998 doesn't seem to support DIM_LAYER, so drop it from the supported features mask. Fixes: 2d8a4edb672d ("drm/msm/dpu: use feature bit for LM combined alpha check") Fixes: 94391a14fc27 ("drm/msm/dpu1: Add MSM8998 to hw catalog") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/522231/ Link: https://lore.kernel.org/r/20230211231259.1308718-12-dmitry.baryshkov@linaro.org Signed-off-by: Abhinav Kumar commit 38164e990a42ca276f72ab89fd24131e6d73b023 Author: Dmitry Baryshkov Date: Sun Feb 12 01:12:19 2023 +0200 drm/msm/dpu: correct sm6115 scaler QSEED4 is a newer variant of QSEED3LITE, which should be used on sm6115. Fix the used feature masks. Signed-off-by: Dmitry Baryshkov Fixes: 3581b7062cec ("drm/msm/disp/dpu1: add support for display on SM6115") Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/522219/ Link: https://lore.kernel.org/r/20230211231259.1308718-11-dmitry.baryshkov@linaro.org Signed-off-by: Abhinav Kumar commit 03c0c3cb22a4ff29afba1b43f0330289ea80433f Author: Dmitry Baryshkov Date: Sun Feb 12 01:12:18 2023 +0200 drm/msm/dpu: correct sm8250 and sm8350 scaler QSEED4 is a newer variant of QSEED3LITE, which should be used on sm8250 and sm8350. Fix the DPU caps structure and used feature masks. Fixes: d21fc5dfc3df ("drm/msm/dpu1: add support for qseed3lite used on sm8250") Fixes: 0e91bcbb0016 ("drm/msm/dpu: Add SM8350 to hw catalog") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/522229/ Link: https://lore.kernel.org/r/20230211231259.1308718-10-dmitry.baryshkov@linaro.org Signed-off-by: Abhinav Kumar commit c7da17b67847010871f225d7d48a607a8f272aef Author: Dmitry Baryshkov Date: Sun Feb 12 01:12:17 2023 +0200 drm/msm/dpu: correct sm8450 scaler QSEED4 is a newer variant of QSEED3LITE, which should be used on sm8450. Fix the used feature masks. Fixes: 100d7ef6995d ("drm/msm/dpu: add support for SM8450") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/522215/ Link: https://lore.kernel.org/r/20230211231259.1308718-9-dmitry.baryshkov@linaro.org Signed-off-by: Abhinav Kumar commit b3587cb645329cab75dc6354a79291a289c7ba33 Author: Dmitry Baryshkov Date: Sun Feb 12 01:12:16 2023 +0200 drm/msm/dpu: correct sc8280xp scaler QSEED4 is a newer variant of QSEED3LITE, which should be used on sc8280xp. Fix the DPU caps structure and used feature masks. Fixes: 4a352c2fc15a ("drm/msm/dpu: Introduce SC8280XP") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/522217/ Link: https://lore.kernel.org/r/20230211231259.1308718-8-dmitry.baryshkov@linaro.org Signed-off-by: Abhinav Kumar commit d113d267c3bfa07c0c8e9f68068a18fa18970c9c Author: Dmitry Baryshkov Date: Sun Feb 12 01:12:15 2023 +0200 drm/msm/dpu: correct sm8550 scaler QSEED4 is a newer variant of QSEED3LITE, which should be used on sm8550. Fix the DPU caps structure and used feature masks. Fixes: efcd0107727c ("drm/msm/dpu: add support for SM8550") Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/522213/ Link: https://lore.kernel.org/r/20230211231259.1308718-7-dmitry.baryshkov@linaro.org Signed-off-by: Abhinav Kumar commit da06be8b4fdf3eccf5cf6cbc4a689a43b8ad705b Author: Dmitry Baryshkov Date: Sun Feb 12 01:12:14 2023 +0200 drm/msm/dpu: fix sm6115 and qcm2290 mixer width limits According to vendor DTS files both sm6115 and qcm2290 should have max_mixer_width set to 2048 (DEFAULT_DPU_LINE_WIDTH). Correct it. Fixes: 3581b7062cec ("drm/msm/disp/dpu1: add support for display on SM6115") Fixes: 5334087ee743 ("drm/msm: add support for QCM2290 MDSS") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/522212/ Link: https://lore.kernel.org/r/20230211231259.1308718-6-dmitry.baryshkov@linaro.org [quic_abhinavk@quicinc.com: fix minor typo in commit message] Signed-off-by: Abhinav Kumar commit ce6bd00abc220e9edf10986234fadba6462b4abf Author: Dmitry Baryshkov Date: Sun Feb 12 01:12:13 2023 +0200 drm/msm/dpu: fix len of sc7180 ctl blocks Change sc7180's ctl block len to 0x1dc. Fixes: 7bdc0c4b8126 ("msm:disp:dpu1: add support for display for SC7180 target") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/522210/ Link: https://lore.kernel.org/r/20230211231259.1308718-5-dmitry.baryshkov@linaro.org Signed-off-by: Abhinav Kumar commit e301195507feb67290ee6c93b7d13e646bb12687 Author: Dmitry Baryshkov Date: Sun Feb 12 01:12:12 2023 +0200 drm/msm/dpu: fix typo in in sm8550's dma_sblk_5 Fix typo in the name of the sblk structure for the sm8550's dma_sblk_5. Fixes: efcd0107727c ("drm/msm/dpu: add support for SM8550") Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/522225/ Link: https://lore.kernel.org/r/20230211231259.1308718-4-dmitry.baryshkov@linaro.org [quic_abhinavk@quicinc.com: fix minor typo in commit message] Signed-off-by: Abhinav Kumar commit 57b76324c2a03b7b75d2d93f5c83f4340fd9b621 Merge: 65eb2867f5bf4 e32d546c483a2 e2a56364485e7 Author: Rafael J. Wysocki Date: Fri Mar 3 18:45:53 2023 +0100 Merge branches 'acpi-pm' and 'acpi-x86' Merge additional ACPI quirks for x86 systems: - Drop a suspend-to-idle quirk for HP Elitebook G9 that is not needed any more after a firmware update (Mario Limonciello). - Add all Cezanne systems to the list for forcing StorageD3Enable, because they all need the same quirk (Mario Limonciello). * acpi-pm: ACPI: x86: Drop quirk for HP Elitebook * acpi-x86: ACPI: x86: utils: Add Cezanne to the list for forcing StorageD3Enable commit 0bdf4a8bf0aab64757c23ef3acf8190af2b23797 Merge: bf1a1bad82407 cd57953936f22 Author: Linus Torvalds Date: Fri Mar 3 09:38:01 2023 -0800 Merge tag 's390-6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull more s390 updates from Heiko Carstens: - Add empty command line parameter handling stubs to kernel for all command line parameters which are handled in the decompressor. This avoids invalid "Unknown kernel command line parameters" messages from the kernel, and also avoids that these will be incorrectly passed to user space. This caused already confusion, therefore add the empty stubs - Add missing phys_to_virt() handling to machine check handler - Introduce and use a union to be used for zcrypt inline assemblies. This makes sure that only a register wide member of the union is passed as input and output parameter to inline assemblies, while usual C code uses other members of the union to access bit fields of it - Add and use a READ_ONCE_ALIGNED_128() macro, which can be used to atomically read a 128-bit value from memory. This replaces the (mis-)use of the 128-bit cmpxchg operation to do the same in cpum_sf code. Currently gcc does not generate the used lpq instruction if __READ_ONCE() is used for aligned 128-bit accesses, therefore use this s390 specific helper - Simplify machine check handler code if a task needs to be killed because of e.g. register corruption due to a machine malfunction - Perform CPU reset to clear pending interrupts and TLB entries on an already stopped target CPU before delegating work to it - Generate arch/s390/boot/vmlinux.map link map for the decompressor, when CONFIG_VMLINUX_MAP is enabled for debugging purposes - Fix segment type handling for dcssblk devices. It incorrectly always returned type "READ/WRITE" even for read-only segements, which can result in a kernel panic if somebody tries to write to a read-only device - Sort config S390 select list again - Fix two kprobe reenter bugs revealed by a recently added kprobe kunit test * tag 's390-6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/kprobes: fix current_kprobe never cleared after kprobes reenter s390/kprobes: fix irq mask clobbering on kprobe reenter from post_handler s390/Kconfig: sort config S390 select list again s390/extmem: return correct segment type in __segment_load() s390/decompressor: add link map saving s390/smp: perform cpu reset before delegating work to target cpu s390/mcck: cleanup user process termination path s390/cpum_sf: use READ_ONCE_ALIGNED_128() instead of 128-bit cmpxchg s390/rwonce: add READ_ONCE_ALIGNED_128() macro s390/ap,zcrypt,vfio: introduce and use ap_queue_status_reg union s390/nmi: fix virtual-physical address confusion s390/setup: do not complain about parameters handled in decompressor commit bf1a1bad82407ad81130c065f6495ec0f939ae60 Merge: 271d89394e33a 61fc1ee8be26b Author: Linus Torvalds Date: Fri Mar 3 09:32:51 2023 -0800 Merge tag 'riscv-for-linus-6.3-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull more RISC-V updates from Palmer Dabbelt: - Some cleanups and fixes for the Zbb-optimized string routines - Support for custom (vendor or implementation defined) perf events - COMMAND_LINE_SIZE has been increased to 1024 * tag 'riscv-for-linus-6.3-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Bump COMMAND_LINE_SIZE value to 1024 drivers/perf: RISC-V: Allow programming custom firmware events riscv, lib: Fix Zbb strncmp RISC-V: improve string-function assembly commit 5719638d368f35934d53e4a8c3a2f007c32a1ecf Merge: f43523620f646 d25d01b4e59bd Author: Rafael J. Wysocki Date: Fri Mar 3 18:26:43 2023 +0100 Merge branch 'powercap' Merge additional power capping changes for 6.3-rc1: - Remove MODULE_LICENSE from non-modular power capping code (Nick Alcock). - Add Add Power Limit4 support for Meteor Lake SoC to the Intel RAPL power capping driver (Sumeet Pawnikar). * powercap: powercap: remove MODULE_LICENSE in non-modules powercap: RAPL: Add Power Limit4 support for Meteor Lake SoC commit 271d89394e33aae5391fd886c046ce54c8240e5b Merge: 2eb29d59ddf02 3ca04951b004f Author: Linus Torvalds Date: Fri Mar 3 09:15:50 2023 -0800 Merge tag 'rtc-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "A few drivers got some nice cleanups and a new driver are making the bulk of the changes. Subsystem: - allow rtc_read_alarm without read_alarm callback New driver: - NXP BBNSM module RTC Drivers: - use IRQ flags from fwnode when available - abx80x: nvmem support - brcmstb-waketimer: add non-wake alarm support - ingenic: provide CLK32K clock - isl12022: cleanups - moxart: switch to using gpiod API - pcf85363: allow setting quartz load - pm8xxx: cleanups and support for setting time - rv3028, rv3032: add ACPI support" * tag 'rtc-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (64 commits) rtc: pm8xxx: add support for nvmem offset dt-bindings: rtc: qcom-pm8xxx: add nvmem-cell offset rtc: abx80x: Add nvmem support rtc: rx6110: Remove unused of_gpio,h rtc: efi: Avoid spamming the log on RTC read failure rtc: isl12022: sort header inclusion alphabetically rtc: isl12022: Join string literals back rtc: isl12022: Drop unneeded OF guards and of_match_ptr() rtc: isl12022: Explicitly use __le16 type for ISL12022_REG_TEMP_L rtc: isl12022: Get rid of unneeded private struct isl12022 rtc: pcf85363: add support for the quartz-load-femtofarads property dt-bindings: rtc: nxp,pcf8563: move pcf85263/pcf85363 to a dedicated binding rtc: allow rtc_read_alarm without read_alarm callback rtc: rv3032: add ACPI support rtc: rv3028: add ACPI support rtc: bbnsm: Add the bbnsm rtc support rtc: jz4740: Register clock provider for the CLK32K pin rtc: jz4740: Use dev_err_probe() rtc: jz4740: Use readl_poll_timeout dt-bindings: rtc: Add #clock-cells property ... commit d900f3d20cc3169ce42ec72acc850e662a4d4db2 Author: Liu Jian Date: Fri Mar 3 16:09:46 2023 +0800 bpf, sockmap: Fix an infinite loop error when len is 0 in tcp_bpf_recvmsg_parser() When the buffer length of the recvmsg system call is 0, we got the flollowing soft lockup problem: watchdog: BUG: soft lockup - CPU#3 stuck for 27s! [a.out:6149] CPU: 3 PID: 6149 Comm: a.out Kdump: loaded Not tainted 6.2.0+ #30 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.15.0-1 04/01/2014 RIP: 0010:remove_wait_queue+0xb/0xc0 Code: 5e 41 5f c3 cc cc cc cc 0f 1f 80 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 0f 1f 44 00 00 41 57 <41> 56 41 55 41 54 55 48 89 fd 53 48 89 f3 4c 8d 6b 18 4c 8d 73 20 RSP: 0018:ffff88811b5978b8 EFLAGS: 00000246 RAX: 0000000000000000 RBX: ffff88811a7d3780 RCX: ffffffffb7a4d768 RDX: dffffc0000000000 RSI: ffff88811b597908 RDI: ffff888115408040 RBP: 1ffff110236b2f1b R08: 0000000000000000 R09: ffff88811a7d37e7 R10: ffffed10234fa6fc R11: 0000000000000001 R12: ffff88811179b800 R13: 0000000000000001 R14: ffff88811a7d38a8 R15: ffff88811a7d37e0 FS: 00007f6fb5398740(0000) GS:ffff888237180000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020000000 CR3: 000000010b6ba002 CR4: 0000000000370ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: tcp_msg_wait_data+0x279/0x2f0 tcp_bpf_recvmsg_parser+0x3c6/0x490 inet_recvmsg+0x280/0x290 sock_recvmsg+0xfc/0x120 ____sys_recvmsg+0x160/0x3d0 ___sys_recvmsg+0xf0/0x180 __sys_recvmsg+0xea/0x1a0 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc The logic in tcp_bpf_recvmsg_parser is as follows: msg_bytes_ready: copied = sk_msg_recvmsg(sk, psock, msg, len, flags); if (!copied) { wait data; goto msg_bytes_ready; } In this case, "copied" always is 0, the infinite loop occurs. According to the Linux system call man page, 0 should be returned in this case. Therefore, in tcp_bpf_recvmsg_parser(), if the length is 0, directly return. Also modify several other functions with the same problem. Fixes: 1f5be6b3b063 ("udp: Implement udp_bpf_recvmsg() for sockmap") Fixes: 9825d866ce0d ("af_unix: Implement unix_dgram_bpf_recvmsg()") Fixes: c5d2177a72a1 ("bpf, sockmap: Fix race in ingress receive verdict with redirect to self") Fixes: 604326b41a6f ("bpf, sockmap: convert to generic sk_msg interface") Signed-off-by: Liu Jian Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Cc: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20230303080946.1146638-1-liujian56@huawei.com commit 8ae2f2b0a28416ed2f6d8478ac8b9f7862f36785 Author: Reka Norman Date: Mon Feb 27 13:49:38 2023 +1100 HID: intel-ish-hid: ipc: Fix potential use-after-free in work function When a reset notify IPC message is received, the ISR schedules a work function and passes the ISHTP device to it via a global pointer ishtp_dev. If ish_probe() fails, the devm-managed device resources including ishtp_dev are freed, but the work is not cancelled, causing a use-after-free when the work function tries to access ishtp_dev. Use devm_work_autocancel() instead, so that the work is automatically cancelled if probe fails. Signed-off-by: Reka Norman Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit db50f7a3983f0154e730f1147ef729e0c5c2f90c Author: Rafał Szalecki Date: Wed Mar 1 02:23:56 2023 +0100 HID: logitech-hidpp: Add support for Logitech MX Master 3S mouse Add signature for the Logitech MX Master 3S mouse over Bluetooth. Signed-off-by: Rafał Szalecki Reviewed-by: Bastien Nocera Signed-off-by: Jiri Kosina commit a8e98f3448e1a4b6848f213cf51720e29dcc774b Author: Dmitry Fomin Date: Sat Feb 25 21:43:22 2023 +0300 ALSA: ice1712: Delete unreachable code in aureon_add_controls() If the check (id != 0x41) fails, then id == 0x41 and the other check in 'else' branch also fails: id & 0x0F = 0b01000001 & 0b00001111 = 0b00000001. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Dmitry Fomin Link: https://lore.kernel.org/r/20230225184322.6286-2-fomindmitriyfoma@mail.ru Signed-off-by: Takashi Iwai commit 951606a14a8901e3551fe4d8d3cedd73fe954ce1 Author: Dmitry Fomin Date: Sat Feb 25 21:43:21 2023 +0300 ALSA: ice1712: Do not left ice->gpio_mutex locked in aureon_add_controls() If snd_ctl_add() fails in aureon_add_controls(), it immediately returns and leaves ice->gpio_mutex locked. ice->gpio_mutex locks in snd_ice1712_save_gpio_status and unlocks in snd_ice1712_restore_gpio_status(ice). It seems that the mutex is required only for aureon_cs8415_get(), so snd_ice1712_restore_gpio_status(ice) can be placed just after that. Compile tested only. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Dmitry Fomin Cc: Link: https://lore.kernel.org/r/20230225184322.6286-1-fomindmitriyfoma@mail.ru Signed-off-by: Takashi Iwai commit ea24b9953bcd3889f77a66e7f1d7e86e995dd9c3 Author: Łukasz Stelmach Date: Thu Feb 23 08:47:48 2023 +0100 ALSA: hda/realtek: Add quirk for HP EliteDesk 800 G6 Tower PC HP EliteDesk 800 G6 Tower PC (103c:870c) requires a quirk for enabling headset-mic. Signed-off-by: Łukasz Stelmach Cc: Link: https://bugzilla.kernel.org/show_bug.cgi?id=217008 Link: https://lore.kernel.org/r/20230223074749.1026060-1-l.stelmach@samsung.com Signed-off-by: Takashi Iwai commit 5911d78fabbbbc02fb2b3f6907e0b3f6da120781 Author: Jaroslav Kysela Date: Tue Feb 21 11:21:57 2023 +0100 ALSA: hda/realtek: Improve support for Dell Precision 3260 The headset jack works better with model=alc283-dac-wcaps. Without this option, the headset insertion (separate physical jack) may not be handled correctly (re-insertion is required). It seems that it follows the "Intel Reference Board" defaults. Reported-by: steven_wu2@dell.com Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20230221102157.515852-1-perex@perex.cz Signed-off-by: Takashi Iwai commit fb2e5fc8c8d9d5f95c7a2e1ed6f45b2b3ba836a8 Merge: 26ed1d29fc44f b56ec2992a2e4 Author: Takashi Iwai Date: Fri Mar 3 14:21:13 2023 +0100 Merge tag 'asoc-fix-v6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.3 Almost all of this is driver specific fixes and new IDs that have come in during the merge window. A good chunk of them are simple ones from me which came about due to a bunch of Mediatek Chromebooks being enabled in KernelCI, there's more where that came from. We do have one small feature added to the PCM core by Claudiu Beznea in order to allow the sequencing required to resolve a noise issue with the Microchip PDMC driver. commit 26ed1d29fc44f3f2f0c396c1392abefac5f0454e Merge: e97fc9cffbb9f 7933b90b42896 Author: Takashi Iwai Date: Fri Mar 3 14:20:56 2023 +0100 Merge branch 'for-next' into for-linus commit 6210038aeaf49c395c2da57572246d93ec67f6d4 Author: Damien Le Moal Date: Fri Mar 3 18:29:07 2023 +0900 ata: ahci: Revert "ata: ahci: Add Tiger Lake UP{3,4} AHCI controller" Commit 104ff59af73a ("ata: ahci: Add Tiger Lake UP{3,4} AHCI controller") enabled low power mode for the Tiger Lake AHIC adapter in the author system but created regressions for others. Revert this patch for now until a better solution is found to make this adapter eco-friendly. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217114 CC: stable@vger.kernel.org Signed-off-by: Damien Le Moal commit 528125268588a18a2f257002af051b62b14bb282 Merge: 84cba1840e684 1cf78d4c4144f Author: David S. Miller Date: Fri Mar 3 08:28:44 2023 +0000 Merge branch 'nfp-ipsec-csum' Simon Horman says: ==================== nfp: fix incorrect IPsec checksum handling this short series resolves two problems with IPsec checksum handling in the nfp driver. * PATCH 1/3, 2/3: Correct setting of checksum flags. One patch for each of the nfd3 and nfdk datapaths. * Patch 3/3: Correct configuration of NETIF_F_CSUM_MASK so that the stack does not unecessarily calculate csums for IPsec offload packets. ==================== Signed-off-by: David S. Miller commit 1cf78d4c4144ffdbc2c9d505db482cb204bb480b Author: Huanhuan Wang Date: Thu Mar 2 10:58:30 2023 +0100 nfp: fix esp-tx-csum-offload doesn't take effect When esp-tx-csum-offload is set to on, the protocol stack shouldn't calculate the IPsec offload packet's csum, but it does. Because the callback `.ndo_features_check` incorrectly masked NETIF_F_CSUM_MASK bit. Fixes: 57f273adbcd4 ("nfp: add framework to support ipsec offloading") Signed-off-by: Huanhuan Wang Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit 8b46168ca79c3aad04bc20605e523127266624d4 Author: Huanhuan Wang Date: Thu Mar 2 10:58:29 2023 +0100 nfp: fix incorrectly set csum flag for nfdk path The csum flag of IPsec packet are set repeatedly. Therefore, the csum flag set of IPsec and non-IPsec packet need to be distinguished. As the ipv6 header does not have a csum field, so l3-csum flag is not required to be set for ipv6 case. Fixes: 436396f26d50 ("nfp: support IPsec offloading for NFP3800") Signed-off-by: Huanhuan Wang Reviewed-by: Louis Peens Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit 3e04419cbe2d0bc10ffc20c006c6513ffa4b1ca3 Author: Huanhuan Wang Date: Thu Mar 2 10:58:28 2023 +0100 nfp: fix incorrectly set csum flag for nfd3 path The csum flag of IPsec packet are set repeatedly. Therefore, the csum flag set of IPsec and non-IPsec packet need to be distinguished. As the ipv6 header does not have a csum field, so l3-csum flag is not required to be set for ipv6 case. L4-csum flag include the tcp csum flag and udp csum flag, we shouldn't set the udp and tcp csum flag at the same time for one packet, should set l4-csum flag according to the transport layer is tcp or udp. Fixes: 57f273adbcd4 ("nfp: add framework to support ipsec offloading") Signed-off-by: Huanhuan Wang Reviewed-by: Louis Peens Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit 84cba1840e68430325ac133a11be06bfb2f7acd8 Author: Petr Oros Date: Wed Mar 1 21:47:07 2023 +0100 ice: copy last block omitted in ice_get_module_eeprom() ice_get_module_eeprom() is broken since commit e9c9692c8a81 ("ice: Reimplement module reads used by ethtool") In this refactor, ice_get_module_eeprom() reads the eeprom in blocks of size 8. But the condition that should protect the buffer overflow ignores the last block. The last block always contains zeros. Bug uncovered by ethtool upstream commit 9538f384b535 ("netlink: eeprom: Defer page requests to individual parsers") After this commit, ethtool reads a block with length = 1; to read the SFF-8024 identifier value. unpatched driver: $ ethtool -m enp65s0f0np0 offset 0x90 length 8 Offset Values ------ ------ 0x0090: 00 00 00 00 00 00 00 00 $ ethtool -m enp65s0f0np0 offset 0x90 length 12 Offset Values ------ ------ 0x0090: 00 00 01 a0 4d 65 6c 6c 00 00 00 00 $ $ ethtool -m enp65s0f0np0 Offset Values ------ ------ 0x0000: 11 06 06 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 01 08 00 0x0070: 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 patched driver: $ ethtool -m enp65s0f0np0 offset 0x90 length 8 Offset Values ------ ------ 0x0090: 00 00 01 a0 4d 65 6c 6c $ ethtool -m enp65s0f0np0 offset 0x90 length 12 Offset Values ------ ------ 0x0090: 00 00 01 a0 4d 65 6c 6c 61 6e 6f 78 $ ethtool -m enp65s0f0np0 Identifier : 0x11 (QSFP28) Extended identifier : 0x00 Extended identifier description : 1.5W max. Power consumption Extended identifier description : No CDR in TX, No CDR in RX Extended identifier description : High Power Class (> 3.5 W) not enabled Connector : 0x23 (No separable connector) Transceiver codes : 0x88 0x00 0x00 0x00 0x00 0x00 0x00 0x00 Transceiver type : 40G Ethernet: 40G Base-CR4 Transceiver type : 25G Ethernet: 25G Base-CR CA-N Encoding : 0x05 (64B/66B) BR, Nominal : 25500Mbps Rate identifier : 0x00 Length (SMF,km) : 0km Length (OM3 50um) : 0m Length (OM2 50um) : 0m Length (OM1 62.5um) : 0m Length (Copper or Active cable) : 1m Transmitter technology : 0xa0 (Copper cable unequalized) Attenuation at 2.5GHz : 4db Attenuation at 5.0GHz : 5db Attenuation at 7.0GHz : 7db Attenuation at 12.9GHz : 10db ........ .... Fixes: e9c9692c8a81 ("ice: Reimplement module reads used by ethtool") Signed-off-by: Petr Oros Reviewed-by: Jesse Brandeburg Tested-by: Jesse Brandeburg Signed-off-by: David S. Miller commit 8f632a0a1f6760bb4b1dd7a7e95689df1b5552fb Merge: ad93bab6b8d3b bcec7171eba90 Author: David S. Miller Date: Fri Mar 3 08:22:39 2023 +0000 Merge branch 'net-tools-ynl-fixes' Jakub Kicinski says: ==================== tools: ynl: fix subset use and change default value for attrs/ops Fix a problem in subsetting, which will become apparent when the devlink family comes after the merge window. Even tho none of the existing families need this, we don't want someone to get "inspired" by the current, incorrect code when using specs in other languages. Change the default value for the first attr/op. This is a slight behavior change so needs to go in now. The diffstat of the last patch should serve as the clearest justification there.. ==================== Signed-off-by: David S. Miller commit bcec7171eba901cc5f427ebbad9fe17ed4749b8f Author: Jakub Kicinski Date: Wed Mar 1 10:36:42 2023 -0800 netlink: specs: update for codegen enumerating from 1 Now that the codegen rules had been changed we can update the specs to reflect the new default. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit ad4fafcde5bc1badb8fc2c7f260a5d6b83a038e4 Author: Jakub Kicinski Date: Wed Mar 1 10:36:41 2023 -0800 tools: ynl: use 1 as the default for first entry in attrs/ops Pretty much all families use value: 1 or reserve as unspec the first entry in attribute set and the first operation. Make this the default. Update documentation (the doc for values of operations just refers back to doc for attrs so updating only attrs). Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 7cf93538e087a792cb476008a757ab7c1c23b68c Author: Jakub Kicinski Date: Wed Mar 1 10:36:40 2023 -0800 tools: ynl: fully inherit attrs in subsets To avoid having to repeat the entire definition of an attribute (including the value) use the Attr object from the original set. In fact this is already the documented expectation. Fixes: be5bea1cc0bf ("net: add basic C code generators for Netlink") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit ad93bab6b8d3bfeae4a0158eaabd61bb0b2fbb79 Merge: 9781e98a97110 02f18662f6c67 Author: Jakub Kicinski Date: Thu Mar 2 22:25:09 2023 -0800 Merge tag 'ieee802154-for-net-2023-03-02' of git://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan Stefan Schmidt says: ==================== ieee802154 for net 2023-03-02 Two small fixes this time. Alexander Aring fixed a potential negative array access in the ca8210 driver. Miquel Raynal fixed a crash that could have been triggered through the extended netlink API for 802154. This only came in this merge window. Found by syzkaller. * tag 'ieee802154-for-net-2023-03-02' of git://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan: ieee802154: Prevent user from crashing the host ca8210: fix mac_len negative array access ==================== Link: https://lore.kernel.org/r/20230302153032.1312755-1-stefan@datenfreihafen.org Signed-off-by: Jakub Kicinski commit 9781e98a97110f5e76999058368b4be76a788484 Author: Shigeru Yoshida Date: Thu Mar 2 01:39:13 2023 +0900 net: caif: Fix use-after-free in cfusbl_device_notify() syzbot reported use-after-free in cfusbl_device_notify() [1]. This causes a stack trace like below: BUG: KASAN: use-after-free in cfusbl_device_notify+0x7c9/0x870 net/caif/caif_usb.c:138 Read of size 8 at addr ffff88807ac4e6f0 by task kworker/u4:6/1214 CPU: 0 PID: 1214 Comm: kworker/u4:6 Not tainted 5.19.0-rc3-syzkaller-00146-g92f20ff72066 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: netns cleanup_net Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0xeb/0x467 mm/kasan/report.c:313 print_report mm/kasan/report.c:429 [inline] kasan_report.cold+0xf4/0x1c6 mm/kasan/report.c:491 cfusbl_device_notify+0x7c9/0x870 net/caif/caif_usb.c:138 notifier_call_chain+0xb5/0x200 kernel/notifier.c:87 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1945 call_netdevice_notifiers_extack net/core/dev.c:1983 [inline] call_netdevice_notifiers net/core/dev.c:1997 [inline] netdev_wait_allrefs_any net/core/dev.c:10227 [inline] netdev_run_todo+0xbc0/0x10f0 net/core/dev.c:10341 default_device_exit_batch+0x44e/0x590 net/core/dev.c:11334 ops_exit_list+0x125/0x170 net/core/net_namespace.c:167 cleanup_net+0x4ea/0xb00 net/core/net_namespace.c:594 process_one_work+0x996/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e9/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:302 When unregistering a net device, unregister_netdevice_many_notify() sets the device's reg_state to NETREG_UNREGISTERING, calls notifiers with NETDEV_UNREGISTER, and adds the device to the todo list. Later on, devices in the todo list are processed by netdev_run_todo(). netdev_run_todo() waits devices' reference count become 1 while rebdoadcasting NETDEV_UNREGISTER notification. When cfusbl_device_notify() is called with NETDEV_UNREGISTER multiple times, the parent device might be freed. This could cause UAF. Processing NETDEV_UNREGISTER multiple times also causes inbalance of reference count for the module. This patch fixes the issue by accepting only first NETDEV_UNREGISTER notification. Fixes: 7ad65bf68d70 ("caif: Add support for CAIF over CDC NCM USB interface") CC: sjur.brandeland@stericsson.com Reported-by: syzbot+b563d33852b893653a9e@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=c3bfd8e2450adab3bffe4d80821fbbced600407f [1] Signed-off-by: Shigeru Yoshida Link: https://lore.kernel.org/r/20230301163913.391304-1-syoshida@redhat.com Signed-off-by: Jakub Kicinski commit e57cf3639c323eeed05d3725fd82f91b349adca8 Author: Yuiko Oshino Date: Wed Mar 1 08:43:07 2023 -0700 net: lan78xx: fix accessing the LAN7800's internal phy specific registers from the MAC driver Move the LAN7800 internal phy (phy ID 0x0007c132) specific register accesses to the phy driver (microchip.c). Fix the error reported by Enguerrand de Ribaucourt in December 2022, "Some operations during the cable switch workaround modify the register LAN88XX_INT_MASK of the PHY. However, this register is specific to the LAN8835 PHY. For instance, if a DP8322I PHY is connected to the LAN7801, that register (0x19), corresponds to the LED and MAC address configuration, resulting in unapropriate behavior." I did not test with the DP8322I PHY, but I tested with an EVB-LAN7800 with the internal PHY. Fixes: 14437e3fa284 ("lan78xx: workaround of forced 100 Full/Half duplex mode error") Signed-off-by: Yuiko Oshino Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230301154307.30438-1-yuiko.oshino@microchip.com Signed-off-by: Jakub Kicinski commit ecf1d926661bec4080a79c0ac9dbfe02b31702cf Author: Konrad Dybcio Date: Tue Feb 28 16:33:34 2023 +0100 mailmap: map Dikshita Agarwal's old address to his current one Dikshita's old email is still picked up by the likes of get_maintainer.pl and keeps bouncing. Map it to his current one. Link: https://lkml.kernel.org/r/20230228153335.907164-2-konrad.dybcio@linaro.org Signed-off-by: Konrad Dybcio Cc: Dikshita Agarwal Signed-off-by: Andrew Morton commit 6a41de1eb2168c78079cc5e6bbbec6d1490c54ed Author: Konrad Dybcio Date: Tue Feb 28 16:33:35 2023 +0100 mailmap: map Vikash Garodia's old address to his current one Vikash's old email is still picked up by the likes of get_maintainer.pl and keeps bouncing. Map it to his current one. Link: https://lkml.kernel.org/r/20230228153335.907164-3-konrad.dybcio@linaro.org Signed-off-by: Konrad Dybcio Cc: Vikash Garodia Signed-off-by: Andrew Morton commit 3e35102666f873a135d31a726ac1ec8af4905206 Author: Andrew Morton Date: Sun Feb 26 12:31:11 2023 -0800 fs/cramfs/inode.c: initialize file_ra_state file_ra_state_init() assumes that the file_ra_state has been zeroed out. Fixes a KMSAN used-unintialized issue (at least). Fixes: cf948cbc35e80 ("cramfs: read_mapping_page() is synchronous") Reported-by: syzbot Link: https://lkml.kernel.org/r/0000000000008f74e905f56df987@google.com Cc: Matthew Wilcox Cc: Nicolas Pitre Cc: Signed-off-by: Andrew Morton commit 07db5e247ab5858439b14dd7cc1fe538b9efcf32 Author: Dongliang Mu Date: Sun Feb 26 20:49:47 2023 +0800 fs: hfsplus: fix UAF issue in hfsplus_put_super The current hfsplus_put_super first calls hfs_btree_close on sbi->ext_tree, then invokes iput on sbi->hidden_dir, resulting in an use-after-free issue in hfsplus_release_folio. As shown in hfsplus_fill_super, the error handling code also calls iput before hfs_btree_close. To fix this error, we move all iput calls before hfsplus_btree_close. Note that this patch is tested on Syzbot. Link: https://lkml.kernel.org/r/20230226124948.3175736-1-mudongliangabcd@gmail.com Reported-by: syzbot+57e3e98f7e3b80f64d56@syzkaller.appspotmail.com Tested-by: Dongliang Mu Signed-off-by: Dongliang Mu Cc: Bart Van Assche Cc: Jens Axboe Cc: Muchun Song Cc: Roman Gushchin Cc: "Theodore Ts'o" Cc: Signed-off-by: Andrew Morton commit b905039e428d639adeebb719b76f98865ea38d4d Author: Guilherme G. Piccoli Date: Sun Feb 26 13:08:38 2023 -0300 panic: fix the panic_print NMI backtrace setting Commit 8d470a45d1a6 ("panic: add option to dump all CPUs backtraces in panic_print") introduced a setting for the "panic_print" kernel parameter to allow users to request a NMI backtrace on panic. Problem is that the panic_print handling happens after the secondary CPUs are already disabled, hence this option ended-up being kind of a no-op - kernel skips the NMI trace in idling CPUs, which is the case of offline CPUs. Fix it by checking the NMI backtrace bit in the panic_print prior to the CPU disabling function. Link: https://lkml.kernel.org/r/20230226160838.414257-1-gpiccoli@igalia.com Fixes: 8d470a45d1a6 ("panic: add option to dump all CPUs backtraces in panic_print") Signed-off-by: Guilherme G. Piccoli Cc: Cc: Baoquan He Cc: Dave Young Cc: Feng Tang Cc: HATAYAMA Daisuke Cc: Hidehiro Kawai Cc: Kees Cook Cc: Michael Kelley Cc: Petr Mladek Cc: Vivek Goyal Signed-off-by: Andrew Morton commit 359d62559f578dc1ac86fd2d198f1455e9d8ce04 Author: Eric Biggers Date: Thu Feb 23 20:26:18 2023 -0800 lib: parser: update documentation for match_NUMBER functions commit 67222c4ba8af ("lib: parser: optimize match_NUMBER apis to use local array") removed -ENOMEM as a possible return value, so update the comments accordingly. Link: https://lkml.kernel.org/r/20230224042618.9092-1-ebiggers@kernel.org Fixes: 67222c4ba8af ("lib: parser: optimize match_NUMBER apis to use local array") Signed-off-by: Eric Biggers Cc: Li Lingfeng Cc: Tejun Heo Cc: Yu Kuai Signed-off-by: Andrew Morton commit 4ec4190be4cf9cc3e0ccaf5f155a5f9066d18950 Author: Marco Elver Date: Fri Feb 24 09:59:42 2023 +0100 kasan, x86: don't rename memintrinsics in uninstrumented files Now that memcpy/memset/memmove are no longer overridden by KASAN, we can just use the normal symbol names in uninstrumented files. Drop the preprocessor redefinitions. Link: https://lkml.kernel.org/r/20230224085942.1791837-4-elver@google.com Fixes: 69d4c0d32186 ("entry, kasan, x86: Disallow overriding mem*() functions") Signed-off-by: Marco Elver Reviewed-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Borislav Petkov (AMD) Cc: Dave Hansen Cc: Dmitry Vyukov Cc: Ingo Molnar Cc: Jakub Jelinek Cc: Kees Cook Cc: Linux Kernel Functional Testing Cc: Naresh Kamboju Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Nicolas Schier Cc: Peter Zijlstra (Intel) Cc: Thomas Gleixner Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit 85f195b12d8b769fa14ef37aa8a5e6bd07458122 Author: Marco Elver Date: Fri Feb 24 09:59:41 2023 +0100 kasan: test: fix test for new meminstrinsic instrumentation The tests for memset/memmove have been failing since they haven't been instrumented in 69d4c0d32186. Fix the test to recognize when memintrinsics aren't instrumented, and skip test cases accordingly. We also need to conditionally pass -fno-builtin to the test, otherwise the instrumentation pass won't recognize memintrinsics and end up not instrumenting them either. Link: https://lkml.kernel.org/r/20230224085942.1791837-3-elver@google.com Fixes: 69d4c0d32186 ("entry, kasan, x86: Disallow overriding mem*() functions") Reported-by: Linux Kernel Functional Testing Signed-off-by: Marco Elver Reviewed-by: Andrey Konovalov Tested-by: Linux Kernel Functional Testing Tested-by: Naresh Kamboju Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Borislav Petkov (AMD) Cc: Dave Hansen Cc: Dmitry Vyukov Cc: Ingo Molnar Cc: Jakub Jelinek Cc: Kees Cook Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Nicolas Schier Cc: Peter Zijlstra (Intel) Cc: Thomas Gleixner Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit 36be5cba99f6f9984a9a9f0454f95a38f4184d3e Author: Marco Elver Date: Fri Feb 24 09:59:40 2023 +0100 kasan: treat meminstrinsic as builtins in uninstrumented files Where the compiler instruments meminstrinsics by generating calls to __asan/__hwasan_ prefixed functions, let the compiler consider memintrinsics as builtin again. To do so, never override memset/memmove/memcpy if the compiler does the correct instrumentation - even on !GENERIC_ENTRY architectures. [elver@google.com: powerpc: don't rename memintrinsics if compiler adds prefixes] Link: https://lore.kernel.org/all/20230224085942.1791837-1-elver@google.com/ [1] Link: https://lkml.kernel.org/r/20230227094726.3833247-1-elver@google.com Link: https://lkml.kernel.org/r/20230224085942.1791837-2-elver@google.com Fixes: 69d4c0d32186 ("entry, kasan, x86: Disallow overriding mem*() functions") Signed-off-by: Marco Elver Reviewed-by: Andrey Konovalov Tested-by: Linux Kernel Functional Testing Tested-by: Naresh Kamboju Acked-by: Michael Ellerman (powerpc) Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Borislav Petkov (AMD) Cc: Dave Hansen Cc: Dmitry Vyukov Cc: Ingo Molnar Cc: Jakub Jelinek Cc: Kees Cook Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Nicolas Schier Cc: Peter Zijlstra (Intel) Cc: Thomas Gleixner Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit 51287dcb00cc715c27bf6a6b4dbd431621c5b65a Author: Marco Elver Date: Fri Feb 24 09:59:39 2023 +0100 kasan: emit different calls for instrumentable memintrinsics Clang 15 provides an option to prefix memcpy/memset/memmove calls with __asan_/__hwasan_ in instrumented functions: https://reviews.llvm.org/D122724 GCC will add support in future: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108777 Use it to regain KASAN instrumentation of memcpy/memset/memmove on architectures that require noinstr to be really free from instrumented mem*() functions (all GENERIC_ENTRY architectures). Link: https://lkml.kernel.org/r/20230224085942.1791837-1-elver@google.com Fixes: 69d4c0d32186 ("entry, kasan, x86: Disallow overriding mem*() functions") Signed-off-by: Marco Elver Acked-by: Peter Zijlstra (Intel) Reviewed-by: Andrey Konovalov Tested-by: Linux Kernel Functional Testing Tested-by: Naresh Kamboju Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Borislav Petkov (AMD) Cc: Dave Hansen Cc: Dmitry Vyukov Cc: Ingo Molnar Cc: Jakub Jelinek Cc: kasan-dev@googlegroups.com Cc: Kees Cook Cc: Linux Kernel Functional Testing Cc: Nathan Chancellor # build only Cc: Nick Desaulniers Cc: Nicolas Schier Cc: Thomas Gleixner Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit 49d24398327e32265eccdeec4baeb5a6a609c0bd Author: Uday Shankar Date: Tue Feb 28 17:06:55 2023 -0700 blk-mq: enforce op-specific segment limits in blk_insert_cloned_request The block layer might merge together discard requests up until the max_discard_segments limit is hit, but blk_insert_cloned_request checks the segment count against max_segments regardless of the req op. This can result in errors like the following when discards are issued through a DM device and max_discard_segments exceeds max_segments for the queue of the chosen underlying device. blk_insert_cloned_request: over max segments limit. (256 > 129) Fix this by looking at the req_op and enforcing the appropriate segment limit - max_discard_segments for REQ_OP_DISCARDs and max_segments for everything else. Signed-off-by: Uday Shankar Reviewed-by: Keith Busch Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20230301000655.48112-1-ushankar@purestorage.com Signed-off-by: Jens Axboe commit 2eb29d59ddf02e39774abfb60b2030b0b7e27c1f Merge: 39ce4395c3ba7 54ceb92724a8c Author: Linus Torvalds Date: Thu Mar 2 15:08:54 2023 -0800 Merge tag 'drm-next-2023-03-03-1' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "fbdev: - fix uninit var in error path shmem: - revert unGPLing an export i915: - Don't use stolen memory or BAR mappings for ring buffers with LLC - Add inverted backlight quirk for HP 14-r206nv - Fix GSI offset for MCR lookups - GVT fixes (memleak, debugfs attributes, kconfig, typos) amdgpu: - SMU 13 fixes - Enable TMZ for GC 10.3.6 - Misc display fixes - Buddy allocator fixes - GC 11 fixes - S0ix fix - INFO IOCTL queries for GC 11 - VCN harvest fixes for SR-IOV - UMC 8.10 RAS fixes - Don't restrict bpc to 8 - NBIO 7.5 fix - Allow freesync on PCon for more devices amdkfd: - SDMA fix - Illegal memory access fix" * tag 'drm-next-2023-03-03-1' of git://anongit.freedesktop.org/drm/drm: (45 commits) drm/amdgpu/vcn: fix compilation issue with legacy gcc drm/amd/display: Extend Freesync over PCon support for more devices Revert "drm/amd/display: Do not set DRR on pipe commit" drm/amd/display: fix shift-out-of-bounds in CalculateVMAndRowBytes drm/amd/display: Ext displays with dock can't recognized after resume drm/amdgpu: fix ttm_bo calltrace warning in psp_hw_fini drm/amdgpu: remove unused variable ring drm/amd/display: fix dm irq error message in gpu recover drm/amd: Fix initialization for nbio 7.5.1 drm/amd/display: Don't restrict bpc to 8 bpc drm/amdgpu: Make umc_v8_10_convert_error_address static and remove unused variable drm/radeon: Fix eDP for single-display iMac11,2 drm/shmem-helper: Revert accidental non-GPL export drm: omapdrm: Do not use helper unininitialized in omap_fbdev_init() drm/amd/pm: downgrade log level upon SMU IF version mismatch drm/amdgpu: Add ecc info query interface for umc v8_10 drm/amdgpu: Add convert_error_address function for umc v8_10 drm/amdgpu: add bad_page_threshold check in ras_eeprom_check_err drm/amdgpu: change default behavior of bad_page_threshold parameter drm/amdgpu: exclude duplicate pages from UMC RAS UE count ... commit 39ce4395c3ba730341b067e1fb8abbdf9c47ca77 Merge: a9a01e1238cf5 010338d729c10 Author: Linus Torvalds Date: Thu Mar 2 14:57:53 2023 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: - In copy_highpage(), only reset the tag of the destination pointer if KASAN_HW_TAGS is enabled so that user-space MTE does not interfere with KASAN_SW_TAGS (which relies on top-byte-ignore). - Remove warning if SME is detected without SVE, the kernel can cope with such configuration (though none in the field currently). - In cfi_handler(), pass the ESR_EL1 value to die() for consistency with other die() callers. - Disable HUGETLB_PAGE_OPTIMIZE_VMEMMAP on arm64 since the pte manipulation from the generic vmemmap_remap_pte() does not follow the required ARM break-before-make sequence (clear the pte, flush the TLBs, set the new pte). It may be re-enabled once this sequence is sorted. - Fix possible memory leak in the arm64 ACPI code if the SMCCC version and conduit checks fail. - Forbid CALL_OPS with CC_OPTIMIZE_FOR_SIZE since gcc ignores -falign-functions=N with -Os. - Don't pretend KASLR is enabled if offset < MIN_KIMG_ALIGN as no randomisation would actually take place. * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: kaslr: don't pretend KASLR is enabled if offset < MIN_KIMG_ALIGN arm64: ftrace: forbid CALL_OPS with CC_OPTIMIZE_FOR_SIZE arm64: acpi: Fix possible memory leak of ffh_ctxt arm64: mm: hugetlb: Disable HUGETLB_PAGE_OPTIMIZE_VMEMMAP arm64: pass ESR_ELx to die() of cfi_handler arm64/fpsimd: Remove warning for SME without SVE arm64: Reset KASAN tag in copy_highpage with HW tags only commit 54ceb92724a8cf5294c284d5e9f770fc763cdab2 Merge: 7b7d2429a1d2f 6bb811d0ee3e1 Author: Dave Airlie Date: Fri Mar 3 08:26:59 2023 +1000 Merge tag 'amd-drm-fixes-6.3-2023-03-02' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-fixes-6.3-2023-03-02: amdgpu: - SMU 13 fixes - Enable TMZ for GC 10.3.6 - Misc display fixes - Buddy allocator fixes - GC 11 fixes - S0ix fix - INFO IOCTL queries for GC 11 - VCN harvest fixes for SR-IOV - UMC 8.10 RAS fixes - Don't restrict bpc to 8 - NBIO 7.5 fix - Allow freesync on PCon for more devices amdkfd: - SDMA fix - Illegal memory access fix radeon: - Display fix for iMac11,2 UAPI: - Add some additional INFO IOCTL queries for GC 11 fixes Mesa MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403 Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230302051843.7793-1-alexander.deucher@amd.com commit 7b7d2429a1d2f789f4ce34afadbd76510a0236cc Merge: 3d3921d1025e4 5d2fdb255c529 Author: Dave Airlie Date: Fri Mar 3 08:19:35 2023 +1000 Merge tag 'drm-intel-next-fixes-2023-02-27' of git://anongit.freedesktop.org/drm/drm-intel into drm-next drm/i915 fixes for v6.3-rc1: - Don't use stolen memory or BAR mappings for ring buffers with LLC - Add inverted backlight quirk for HP 14-r206nv - Fix GSI offset for MCR lookups - GVT fixes (memleak, debugfs attributes, kconfig, typos) Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87cz5v2z0j.fsf@intel.com commit 3d3921d1025e4e1d646f84dcb2ae75edc89f7837 Merge: a48bba98380cb 047a754558d64 Author: Dave Airlie Date: Fri Mar 3 08:18:56 2023 +1000 Merge tag 'drm-misc-next-fixes-2023-02-28' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Short summary of fixes pull: Fixes uninitialized variables in fbdev error paths and reverts an SHMEM-helper symbol back to being exported as GPL. Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/Y/3Fw1HjgPcplo+j@linux-uq9g commit 3098cb655e7c9ea1c2919e61234f63ebaab6bb21 Author: Arnaldo Carvalho de Melo Date: Thu Mar 2 11:16:36 2023 -0300 rust: bindgen: Add `alt_instr` as opaque type To address this build error: BINDGEN rust/bindings/bindings_generated.rs BINDGEN rust/bindings/bindings_helpers_generated.rs EXPORTS rust/exports_core_generated.h RUSTC P rust/libmacros.so RUSTC L rust/compiler_builtins.o RUSTC L rust/alloc.o RUSTC L rust/bindings.o RUSTC L rust/build_error.o EXPORTS rust/exports_alloc_generated.h error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type --> /var/home/acme/git/linux/rust/bindings/bindings_generated.rs:10094:1 | 10094 | / pub struct alt_instr { 10095 | | pub instr_offset: s32, 10096 | | pub repl_offset: s32, 10097 | | pub __bindgen_anon_1: alt_instr__bindgen_ty_1, 10098 | | pub instrlen: u8_, 10099 | | pub replacementlen: u8_, 10100 | | } | |_^ | note: `alt_instr__bindgen_ty_1__bindgen_ty_1` has a `#[repr(align)]` attribute --> /var/home/acme/git/linux/rust/bindings/bindings_generated.rs:10111:1 | 10111 | / pub struct alt_instr__bindgen_ty_1__bindgen_ty_1 { 10112 | | pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u16>, 10113 | | } | |_^ note: `alt_instr` contains a field of type `alt_instr__bindgen_ty_1` --> /var/home/acme/git/linux/rust/bindings/bindings_generated.rs:10097:9 | 10097 | pub __bindgen_anon_1: alt_instr__bindgen_ty_1, | ^^^^^^^^^^^^^^^^ note: ...which contains a field of type `alt_instr__bindgen_ty_1__bindgen_ty_1` --> /var/home/acme/git/linux/rust/bindings/bindings_generated.rs:10104:9 | 10104 | pub __bindgen_anon_1: alt_instr__bindgen_ty_1__bindgen_ty_1, | ^^^^^^^^^^^^^^^^ error: aborting due to previous error For more information about this error, try `rustc --explain E0588`. make[1]: *** [rust/Makefile:389: rust/bindings.o] Error 1 make: *** [Makefile:1293: prepare] Error 2 Cc: Derek Barbosa Cc: Miguel Ojeda Signed-off-by: Arnaldo Carvalho de Melo Fixes: 5d1dd961e743 ("x86/alternatives: Add alt_instr.flags") Reported-by: kernel test robot Reported-by: Vincenzo Palazzo Reviewed-by: Martin Rodriguez Reboredo Reviewed-by: Vincenzo Palazzo Signed-off-by: Miguel Ojeda commit 25f69c69bc3ca8c781a94473f28d443d745768e3 Author: Changbin Du Date: Thu Mar 2 11:11:44 2023 +0800 perf stat: Fix counting when initial delay configured When creating counters with initial delay configured, the enable_on_exec field is not set. So we need to enable the counters later. The problem is, when a workload is specified the target__none() is true. So we also need to check stat_config.initial_delay. In this change, we add a new field 'initial_delay' for struct target which could be shared by other subcommands. And define target__enable_on_exec() which returns whether enable_on_exec should be set on normal cases. Before this fix the event is not counted: $ ./perf stat -e instructions -D 100 sleep 2 Events disabled Events enabled Performance counter stats for 'sleep 2': instructions 1.901661124 seconds time elapsed 0.001602000 seconds user 0.000000000 seconds sys After fix it works: $ ./perf stat -e instructions -D 100 sleep 2 Events disabled Events enabled Performance counter stats for 'sleep 2': 404,214 instructions 1.901743475 seconds time elapsed 0.001617000 seconds user 0.000000000 seconds sys Fixes: c587e77e100fa40e ("perf stat: Do not delay the workload with --delay") 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: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230302031146.2801588-2-changbin.du@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit a98c0710b47d7dd44a351d08542360ff23f78330 Author: Arnaldo Carvalho de Melo Date: Thu Feb 23 10:54:41 2023 -0300 tools headers svm: Sync svm headers with the kernel sources To pick the changes in: 8c29f01654053258 ("x86/sev: Add SEV-SNP guest feature negotiation support") That triggers: CC /tmp/build/perf-tools/arch/x86/util/kvm-stat.o CC /tmp/build/perf-tools/util/header.o LD /tmp/build/perf-tools/arch/x86/util/perf-in.o LD /tmp/build/perf-tools/arch/x86/perf-in.o LD /tmp/build/perf-tools/arch/perf-in.o LD /tmp/build/perf-tools/util/perf-in.o LD /tmp/build/perf-tools/perf-in.o LINK /tmp/build/perf-tools/perf But this time causes no changes in tooling results, as the introduced SVM_VMGEXIT_TERM_REQUEST exit reason wasn't added to SVM_EXIT_REASONS, that is used in kvm-stat.c. And addresses this perf build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/svm.h' differs from latest version at 'arch/x86/include/uapi/asm/svm.h' diff -u tools/arch/x86/include/uapi/asm/svm.h arch/x86/include/uapi/asm/svm.h Cc: Adrian Hunter Cc: Borislav Petkov (AMD) Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Nikunj A Dadhania Link: http://lore.kernel.org/lkml/ Signed-off-by: Arnaldo Carvalho de Melo commit a9a01e1238cf5b477ec6aa54855356e518998991 Merge: c3f9b9fa10b9f cf3be7e82b129 Author: Linus Torvalds Date: Thu Mar 2 11:12:01 2023 -0800 Merge tag 'linux-watchdog-6.3-rc1' of git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: - qcom-wdt dt-bindings improvements and additions (like MSM8994 and MDM9615) - mtk_wdt: Add reset_by_toprgu support - devm_clk_get_enabled() helper changes - Fix kmemleak in watchdog_cdev_register - watchdog sysfs improvements - Other fixes and small improvements * tag 'linux-watchdog-6.3-rc1' of git://www.linux-watchdog.org/linux-watchdog: (52 commits) watchdog: at91rm9200: Only warn once about problems in .remove() watchdog: mt7621-wdt: avoid ralink architecture dependent code watchdog: mt7621-wdt: avoid static global declarations dt-bindings: watchdog: mt7621-wdt: add phandle to access system controller registers watchdog: sbsa_wdog: Make sure the timeout programming is within the limits dt-bindings: watchdog: qcom-wdt: add qcom,apss-wdt-sa8775p compatible watchdog: report options in sysfs watchdog: report fw_version in sysfs dt-bindings: watchdog: fsl-imx: document suspend in wait mode watchdog: imx2_wdg: suspend watchdog in WAIT mode watchdog: pcwd_usb: Fix attempting to access uninitialized memory dt-bindings: watchdog: qcom-wdt: merge MSM timer dt-bindings: watchdog: qcom-wdt: allow interrupts dt-bindings: watchdog: qcom-wdt: add qcom,kpss-wdt-mdm9615 dt-bindings: watchdog: qcom-wdt: fix list of MSM timer compatibles dt-bindings: watchdog: qcom-wdt: do not allow fallback alone dt-bindings: watchdog: qcom-wdt: require fallback for IPQ4019 watchdog: Fix kmemleak in watchdog_cdev_register watchdog: Include when appropriate watchdog: at91sam9_wdt: use devm_request_irq to avoid missing free_irq() in error path ... commit c3f9b9fa10b9fb677966bfdab8c00da739c4af1b Merge: 04a357b1f6f0b f7c4d9b133c7a Author: Linus Torvalds Date: Thu Mar 2 10:48:30 2023 -0800 Merge tag 'ceph-for-6.3-rc1' of https://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "Two small fixes from Xiubo and myself, marked for stable" * tag 'ceph-for-6.3-rc1' of https://github.com/ceph/ceph-client: rbd: avoid use-after-free in do_rbd_add() when rbd_dev_create() fails ceph: update the time stamps and try to drop the suid/sgid commit 04a357b1f6f0b6f7c8689361fa8802e8e35d02ad Merge: 857f1268a5911 1a2c73f4834dd Author: Linus Torvalds Date: Thu Mar 2 10:34:14 2023 -0800 Merge tag 'mips_6.3_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull more MIPS updates from Thomas Bogendoerfer: "A few more cleanups and fixes" * tag 'mips_6.3_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: Workaround clang inline compat branch issue mips: dts: ralink: mt7621: add phandle to system controller node for watchdog mips: dts: ralink: mt7621: rename watchdog node from 'wdt' into 'watchdog' mips: ralink: make SOC_MT7621 select PINCTRL mips: remove SYS_HAS_CPU_MIPS32_R1 from RALINK MIPS: cevt-r4k: Offset the value used to clear compare interrupt MIPS: smp-cps: Don't rely on CP0_CMGCRBASE MIPS: Remove DMA_PERDEV_COHERENT commit 4d8457fe0eb9c80ff7795cf8a30962128b71d853 Author: Johan Hovold Date: Thu Mar 2 08:47:04 2023 +0100 drm/edid: fix info leak when failing to get panel id Make sure to clear the transfer buffer before fetching the EDID to avoid leaking slab data to the logs on errors that leave the buffer unchanged. Fixes: 69c7717c20cc ("drm/edid: Dump the EDID when drm_edid_get_panel_id() has an error") Cc: stable@vger.kernel.org # 6.2 Cc: Douglas Anderson Signed-off-by: Johan Hovold Reviewed-by: Jani Nikula Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20230302074704.11371-1-johan+linaro@kernel.org commit 857f1268a591147f7be7509f249dbb3aba6fc65c Merge: 6972633c58fd1 00c8f01c4e846 Author: Linus Torvalds Date: Thu Mar 2 09:45:34 2023 -0800 Merge tag 'objtool-core-2023-03-02' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool updates from Ingo Molnar: - Shrink 'struct instruction', to improve objtool performance & memory footprint - Other maximum memory usage reductions - this makes the build both faster, and fixes kernel build OOM failures on allyesconfig and similar configs when they try to build the final (large) vmlinux.o - Fix ORC unwinding when a kprobe (INT3) is set on a stack-modifying single-byte instruction (PUSH/POP or LEAVE). This requires the extension of the ORC metadata structure with a 'signal' field - Misc fixes & cleanups * tag 'objtool-core-2023-03-02' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (22 commits) objtool: Fix ORC 'signal' propagation objtool: Remove instruction::list x86: Fix FILL_RETURN_BUFFER objtool: Fix overlapping alternatives objtool: Union instruction::{call_dest,jump_table} objtool: Remove instruction::reloc objtool: Shrink instruction::{type,visited} objtool: Make instruction::alts a single-linked list objtool: Make instruction::stack_ops a single-linked list objtool: Change arch_decode_instruction() signature x86/entry: Fix unwinding from kprobe on PUSH/POP instruction x86/unwind/orc: Add 'signal' field to ORC metadata objtool: Optimize layout of struct special_alt objtool: Optimize layout of struct symbol objtool: Allocate multiple structures with calloc() objtool: Make struct check_options static objtool: Make struct entries[] static and const objtool: Fix HOSTCC flag usage objtool: Properly support make V=1 objtool: Install libsubcmd in build ... commit 6972633c58fd13c02dcaabcb6be380a98feda9fa Merge: 7c2bc4ed278ee ddf75a86aba2c Author: Linus Torvalds Date: Thu Mar 2 09:37:58 2023 -0800 Merge tag 'auxdisplay-6.3' of https://github.com/ojeda/linux Pull auxdisplay fix from Miguel Ojeda: - hd44780: Fix potential memory leak in hd44780_remove() (Jianglei Nie) * tag 'auxdisplay-6.3' of https://github.com/ojeda/linux: auxdisplay: hd44780: Fix potential memory leak in hd44780_remove() commit caa82ae7ef52b7cf5f80a2b2fbcbdbcfd16426cc Author: Al Viro Date: Mon Jan 30 23:52:40 2023 -0500 openrisc: fix livelock in uaccess openrisc equivalent of 26178ec11ef3 "x86: mm: consolidate VM_FAULT_RETRY handling" If e.g. get_user() triggers a page fault and a fatal signal is caught, we might end up with handle_mm_fault() returning VM_FAULT_RETRY and not doing anything to page tables. In such case we must *not* return to the faulting insn - that would repeat the entire thing without making any progress; what we need instead is to treat that as failed (user) memory access. Signed-off-by: Al Viro commit e902e508c5b280488c62f119a05ad88f9f7eb1cb Author: Al Viro Date: Mon Jan 30 23:51:40 2023 -0500 nios2: fix livelock in uaccess nios2 equivalent of 26178ec11ef3 "x86: mm: consolidate VM_FAULT_RETRY handling" If e.g. get_user() triggers a page fault and a fatal signal is caught, we might end up with handle_mm_fault() returning VM_FAULT_RETRY and not doing anything to page tables. In such case we must *not* return to the faulting insn - that would repeat the entire thing without making any progress; what we need instead is to treat that as failed (user) memory access. Signed-off-by: Al Viro commit 7c2bc4ed278ee0ffc0a1a37aaf7f39f1bfe8da4d Merge: 093b2dc4024a9 0c058fb94ae0e Author: Linus Torvalds Date: Thu Mar 2 09:32:34 2023 -0800 Merge tag 'driver-core-6.3-rc1_2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here is another small set of driver core patches. They resolve some reported problems with the previous driver core patches that are in your tree. They solve a problem with the bus_type cleanup as reported and fixed by Geert, and two fw_devlink changes to make debugging problems easier. There is one known outstanding problem with the fw_deflink changes in your tree that is still being worked on, and it looks like a clk core change will be submitted soon for that, probably after 6.3-rc1. All three of these have been in linux-next with no reported problems (only reports that they fixed problems)" * tag 'driver-core-6.3-rc1_2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: driver core: fw_devlink: Print full path and name of fwnode driver core: fw_devlink: Avoid spurious error message driver core: bus: Handle early calls to bus_to_subsys() commit a1179ac743e8f2044b67848b5109614619b65366 Author: Al Viro Date: Mon Jan 30 23:50:22 2023 -0500 microblaze: fix livelock in uaccess microblaze equivalent of 26178ec11ef3 "x86: mm: consolidate VM_FAULT_RETRY handling" If e.g. get_user() triggers a page fault and a fatal signal is caught, we might end up with handle_mm_fault() returning VM_FAULT_RETRY and not doing anything to page tables. In such case we must *not* return to the faulting insn - that would repeat the entire thing without making any progress; what we need instead is to treat that as failed (user) memory access. Signed-off-by: Al Viro commit d088af1e221c32bd67825c5dccf664f699e827b4 Author: Al Viro Date: Mon Jan 30 23:47:28 2023 -0500 ia64: fix livelock in uaccess ia64 equivalent of 26178ec11ef3 "x86: mm: consolidate VM_FAULT_RETRY handling" If e.g. get_user() triggers a page fault and a fatal signal is caught, we might end up with handle_mm_fault() returning VM_FAULT_RETRY and not doing anything to page tables. In such case we must *not* return to the faulting insn - that would repeat the entire thing without making any progress; what we need instead is to treat that as failed (user) memory access. Signed-off-by: Al Viro commit 79c54c97c7735e09f9e2193a713f30e56eec00dc Author: Al Viro Date: Tue Jan 31 00:03:40 2023 -0500 sparc: fix livelock in uaccess sparc equivalent of 26178ec11ef3 "x86: mm: consolidate VM_FAULT_RETRY handling" If e.g. get_user() triggers a page fault and a fatal signal is caught, we might end up with handle_mm_fault() returning VM_FAULT_RETRY and not doing anything to page tables. In such case we must *not* return to the faulting insn - that would repeat the entire thing without making any progress; what we need instead is to treat that as failed (user) memory access. Signed-off-by: Al Viro commit dce45493aff3fdd57fed2a0da264e585dba88433 Author: Al Viro Date: Mon Jan 30 23:34:16 2023 -0500 alpha: fix livelock in uaccess alpha equivalent of 26178ec11ef3 "x86: mm: consolidate VM_FAULT_RETRY handling" If e.g. get_user() triggers a page fault and a fatal signal is caught, we might end up with handle_mm_fault() returning VM_FAULT_RETRY and not doing anything to page tables. In such case we must *not* return to the faulting insn - that would repeat the entire thing without making any progress; what we need instead is to treat that as failed (user) memory access. Signed-off-by: Al Viro commit 15261678a8c2ff093ffedad730b1646d34a1716a Author: Al Viro Date: Mon Jan 30 23:53:52 2023 -0500 parisc: fix livelock in uaccess parisc equivalent of 26178ec11ef3 "x86: mm: consolidate VM_FAULT_RETRY handling" If e.g. get_user() triggers a page fault and a fatal signal is caught, we might end up with handle_mm_fault() returning VM_FAULT_RETRY and not doing anything to page tables. In such case we must *not* return to the faulting insn - that would repeat the entire thing without making any progress; what we need instead is to treat that as failed (user) memory access. Tested-by: Helge Deller Signed-off-by: Al Viro commit 0b92ed09cb9ffada29ca05510ef28252b6059d6d Author: Al Viro Date: Mon Jan 30 23:46:10 2023 -0500 hexagon: fix livelock in uaccess hexagon equivalent of 26178ec11ef3 "x86: mm: consolidate VM_FAULT_RETRY handling" If e.g. get_user() triggers a page fault and a fatal signal is caught, we might end up with handle_mm_fault() returning VM_FAULT_RETRY and not doing anything to page tables. In such case we must *not* return to the faulting insn - that would repeat the entire thing without making any progress; what we need instead is to treat that as failed (user) memory access. Acked-by: Brian Cain Signed-off-by: Al Viro commit d835eb3a57de50d16dd4a6b53f95dbc2bfa8ef48 Author: Al Viro Date: Mon Jan 30 23:55:52 2023 -0500 riscv: fix livelock in uaccess riscv equivalent of 26178ec11ef3 "x86: mm: consolidate VM_FAULT_RETRY handling" If e.g. get_user() triggers a page fault and a fatal signal is caught, we might end up with handle_mm_fault() returning VM_FAULT_RETRY and not doing anything to page tables. In such case we must *not* return to the faulting insn - that would repeat the entire thing without making any progress; what we need instead is to treat that as failed (user) memory access. Tested-by: Björn Töpel Tested-by: Geert Uytterhoeven Signed-off-by: Al Viro commit bd75497a77ccae9a5e1b0f1a3fa8283d67b21f4c Author: Al Viro Date: Mon Jan 30 23:48:54 2023 -0500 m68k: fix livelock in uaccess m68k equivalent of 26178ec11ef3 "x86: mm: consolidate VM_FAULT_RETRY handling" If e.g. get_user() triggers a page fault and a fatal signal is caught, we might end up with handle_mm_fault() returning VM_FAULT_RETRY and not doing anything to page tables. In such case we must *not* return to the faulting insn - that would repeat the entire thing without making any progress; what we need instead is to treat that as failed (user) memory access. Tested-by: Finn Thain Tested-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Signed-off-by: Al Viro commit 093b2dc4024a9dca9cba539625c32c8056b51fe4 Merge: fd7ee8de984ef 2449d436681d4 Author: Linus Torvalds Date: Thu Mar 2 09:25:38 2023 -0800 Merge tag 'spi-fix-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A small set of fixes for SPI drivers, Krishna has been doing a bunch of work on Tegra210 QuadSPI and found a bunch of issues there and there's a couple of small fixes for other drivers too" * tag 'spi-fix-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: tegra210-quad: Fix iterator outside loop spi: tegra210-quad: Fix validate combined sequence spi: tegra210-quad: set half duplex flag spi: spi-sn-f-ospi: fix duplicate flag while assigning to mode_bits spi: cadence-quadspi: Fix cancel the indirect read mask commit fd7ee8de984efcd31b8f5dce9e340ccd59eb436f Merge: ee3f96b164688 80d2c29e09e66 Author: Linus Torvalds Date: Thu Mar 2 09:21:25 2023 -0800 Merge tag 'regulator-fix-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "Two fixes here, one driver fix for incorrect error codes and a fix in the core to use ktime_get_boottime() in order to fix accounting of the time regulators have been powered down over suspend. ktime_get() pauses over suspend which is not what we want" * tag 'regulator-fix-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: core: Use ktime_get_boottime() to determine how long a regulator was off regulator: max597x: Fix error return code in max597x_get_status commit 0fb7fb713461e44b12e72c292bf90ee300f40710 Author: Thomas Gleixner Date: Wed Mar 1 22:07:48 2023 +0100 genirq/msi, platform-msi: Ensure that MSI descriptors are unreferenced Miquel reported a warning in the MSI core which is triggered when interrupts are freed via platform_msi_device_domain_free(). This code got reworked to use core functions for freeing the MSI descriptors, but nothing took care to clear the msi_desc->irq entry, which then triggers the warning in msi_free_msi_desc() which uses desc->irq to validate that the descriptor has been torn down. The same issue exists in msi_domain_populate_irqs(). Up to the point that msi_free_msi_descs() grew a warning for this case, this went un-noticed. Provide the counterpart of msi_domain_populate_irqs() and invoke it in platform_msi_device_domain_free() before freeing the interrupts and MSI descriptors and also in the error path of msi_domain_populate_irqs(). Fixes: 2f2940d16823 ("genirq/msi: Remove filter from msi_free_descs_free_range()") Reported-by: Miquel Raynal Signed-off-by: Thomas Gleixner Tested-by: Miquel Raynal Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/87mt4wkwnv.ffs@tglx commit cd57953936f2213dfaccce10d20f396956222c7d Author: Vasily Gorbik Date: Wed Mar 1 17:58:06 2023 +0100 s390/kprobes: fix current_kprobe never cleared after kprobes reenter Recent test_kprobe_missed kprobes kunit test uncovers the following problem. Once kprobe is triggered from another kprobe (kprobe reenter), all future kprobes on this cpu are considered as kprobe reenter, thus pre_handler and post_handler are not being called and kprobes are counted as "missed". Commit b9599798f953 ("[S390] kprobes: activation and deactivation") introduced a simpler scheme for kprobes (de)activation and status tracking by using push_kprobe/pop_kprobe, which supposed to work for both initial kprobe entry as well as kprobe reentry and helps to avoid handling those two cases differently. The problem is that a sequence of calls in case of kprobes reenter: push_kprobe() <- NULL (current_kprobe) push_kprobe() <- kprobe1 (current_kprobe) pop_kprobe() -> kprobe1 (current_kprobe) pop_kprobe() -> kprobe1 (current_kprobe) leaves "kprobe1" as "current_kprobe" on this cpu, instead of setting it to NULL. In fact push_kprobe/pop_kprobe can only store a single state (there is just one prev_kprobe in kprobe_ctlblk). Which is a hack but sufficient, there is no need to have another prev_kprobe just to store NULL. To make a simple and backportable fix simply reset "prev_kprobe" when kprobe is poped from this "stack". No need to worry about "kprobe_status" in this case, because its value is only checked when current_kprobe != NULL. Cc: stable@vger.kernel.org Fixes: b9599798f953 ("[S390] kprobes: activation and deactivation") Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 42e19e6f04984088b6f9f0507c4c89a8152d9730 Author: Vasily Gorbik Date: Wed Mar 1 02:23:08 2023 +0100 s390/kprobes: fix irq mask clobbering on kprobe reenter from post_handler Recent test_kprobe_missed kprobes kunit test uncovers the following error (reported when CONFIG_DEBUG_ATOMIC_SLEEP is enabled): BUG: sleeping function called from invalid context at kernel/locking/mutex.c:580 in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 662, name: kunit_try_catch preempt_count: 0, expected: 0 RCU nest depth: 0, expected: 0 no locks held by kunit_try_catch/662. irq event stamp: 280 hardirqs last enabled at (279): [<00000003e60a3d42>] __do_pgm_check+0x17a/0x1c0 hardirqs last disabled at (280): [<00000003e3bd774a>] kprobe_exceptions_notify+0x27a/0x318 softirqs last enabled at (0): [<00000003e3c5c890>] copy_process+0x14a8/0x4c80 softirqs last disabled at (0): [<0000000000000000>] 0x0 CPU: 46 PID: 662 Comm: kunit_try_catch Tainted: G N 6.2.0-173644-g44c18d77f0c0 #2 Hardware name: IBM 3931 A01 704 (LPAR) Call Trace: [<00000003e60a3a00>] dump_stack_lvl+0x120/0x198 [<00000003e3d02e82>] __might_resched+0x60a/0x668 [<00000003e60b9908>] __mutex_lock+0xc0/0x14e0 [<00000003e60bad5a>] mutex_lock_nested+0x32/0x40 [<00000003e3f7b460>] unregister_kprobe+0x30/0xd8 [<00000003e51b2602>] test_kprobe_missed+0xf2/0x268 [<00000003e51b5406>] kunit_try_run_case+0x10e/0x290 [<00000003e51b7dfa>] kunit_generic_run_threadfn_adapter+0x62/0xb8 [<00000003e3ce30f8>] kthread+0x2d0/0x398 [<00000003e3b96afa>] __ret_from_fork+0x8a/0xe8 [<00000003e60ccada>] ret_from_fork+0xa/0x40 The reason for this error report is that kprobes handling code failed to restore irqs. The problem is that when kprobe is triggered from another kprobe post_handler current sequence of enable_singlestep / disable_singlestep is the following: enable_singlestep <- original kprobe (saves kprobe_saved_imask) enable_singlestep <- kprobe triggered from post_handler (clobbers kprobe_saved_imask) disable_singlestep <- kprobe triggered from post_handler (restores kprobe_saved_imask) disable_singlestep <- original kprobe (restores wrong clobbered kprobe_saved_imask) There is just one kprobe_ctlblk per cpu and both calls saves and loads irq mask to kprobe_saved_imask. To fix the problem simply move resume_execution (which calls disable_singlestep) before calling post_handler. This also fixes the problem that post_handler is called with pt_regs which were not yet adjusted after single-stepping. Cc: stable@vger.kernel.org Fixes: 4ba069b802c2 ("[S390] add kprobes support.") Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 02f18662f6c671382345fcb696e808d78f4c194a Author: Miquel Raynal Date: Wed Mar 1 16:44:50 2023 +0100 ieee802154: Prevent user from crashing the host Avoid crashing the machine by checking info->attrs[NL802154_ATTR_SCAN_TYPE] presence before de-referencing it, which was the primary intend of the blamed patch. Reported-by: Sanan Hasanov Suggested-by: Eric Dumazet Fixes: a0b6106672b5 ("ieee802154: Convert scan error messages to extack") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20230301154450.547716-1-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt commit 6c993779ea1d0cccdb3a5d7d45446dd229e610a3 Author: Alexander Aring Date: Thu Feb 16 23:25:04 2023 -0500 ca8210: fix mac_len negative array access This patch fixes a buffer overflow access of skb->data if ieee802154_hdr_peek_addrs() fails. Reported-by: lianhui tang Signed-off-by: Alexander Aring Link: https://lore.kernel.org/r/20230217042504.3303396-1-aahringo@redhat.com Signed-off-by: Stefan Schmidt commit 5c1ebbfabcd61142a4551bfc0e51840f9bdae7af Author: Brian Vazquez Date: Wed Mar 1 13:32:47 2023 +0000 net: use indirect calls helpers for sk_exit_memory_pressure() Florian reported a regression and sent a patch with the following changelog: There is a noticeable tcp performance regression (loopback or cross-netns), seen with iperf3 -Z (sendfile mode) when generic retpolines are needed. With SK_RECLAIM_THRESHOLD checks gone number of calls to enter/leave memory pressure happen much more often. For TCP indirect calls are used. We can't remove the if-set-return short-circuit check in tcp_enter_memory_pressure because there are callers other than sk_enter_memory_pressure. Doing a check in the sk wrapper too reduces the indirect calls enough to recover some performance. Before, 0.00-60.00 sec 322 GBytes 46.1 Gbits/sec receiver After: 0.00-60.04 sec 359 GBytes 51.4 Gbits/sec receiver "iperf3 -c $peer -t 60 -Z -f g", connected via veth in another netns. It seems we forgot to upstream this indirect call mitigation we had for years, lets do this instead. [edumazet] - It seems we forgot to upstream this indirect call mitigation we had for years, let's do this instead. - Changed to INDIRECT_CALL_INET_1() to avoid bots reports. Fixes: 4890b686f408 ("net: keep sk->sk_forward_alloc as small as possible") Reported-by: Florian Westphal Link: https://lore.kernel.org/netdev/20230227152741.4a53634b@kernel.org/T/ Signed-off-by: Brian Vazquez Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20230301133247.2346111-1-edumazet@google.com Signed-off-by: Paolo Abeni commit 044c8bf78db818b8c726eb47c560e05fbc71e128 Merge: f3221361dc85d aabef97a35160 Author: Paolo Abeni Date: Thu Mar 2 11:10:43 2023 +0100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for net: 1) Fix bogus error report in selftests/netfilter/nft_nat.sh, from Hangbin Liu. 2) Initialize last and quota expressions from template when expr_ops::clone is called, otherwise, states are not restored accordingly when loading a dynamic set with elements using these two expressions. * git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nft_quota: copy content when cloning expression netfilter: nft_last: copy content when cloning expression selftests: nft_nat: ensuring the listening side is up before starting the client ==================== Link: https://lore.kernel.org/r/20230301222021.154670-1-pablo@netfilter.org Signed-off-by: Paolo Abeni commit 4bb54c2ce48ffb3a06133ac0fb4086f7b48d9109 Author: Thierry Reding Date: Tue Feb 14 15:05:49 2023 +0100 arm64: tegra: Bump CBB ranges property on Tegra194 and Tegra234 Both Xavier (Tegra194) and Orin (Tegra234) support a 40-bit address map, so bump the CBB ranges property to cover all of the 1 TiB address space. This fixes an issue where some of the PCIe regions could not be remapped because of they were outside the memory specified by the CBB's ranges property. Reported-by: Jonathan Hunter Signed-off-by: Thierry Reding commit cf3be7e82b129ed34f811f116f2b113f6299d449 Author: Uwe Kleine-König Date: Fri Feb 17 10:53:17 2023 +0100 watchdog: at91rm9200: Only warn once about problems in .remove() The single difference between returning 0 and returning an error code in a platform remove callback is that in the latter case the platform core emits a warning about the error being ignored. at91wdt_remove() already emits a warning in the error case, so suppress the more generic (and less helpful) one by returning 0. Signed-off-by: Uwe Kleine-König Reviewed-by: Claudiu Beznea Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230217095317.1213387-1-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit ff8ec4ac39ad413b580d611dbf68e1d8a82eba56 Author: Sergio Paracuellos Date: Tue Feb 14 11:39:36 2023 +0100 watchdog: mt7621-wdt: avoid ralink architecture dependent code MT7621 SoC has a system controller node. Watchdog need to access to reset status register. Ralink architecture and related driver are old and from the beggining they are using some architecture dependent operations for accessing this shared registers through 'asm/mach-ralink/ralink_regs.h' header file. However this is not ideal from a driver perspective which can just access to the system controller registers in an arch independent way using regmap syscon APIs. Update Kconfig accordingly to select new added dependencies and allow driver to be compile tested. Signed-off-by: Sergio Paracuellos Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230214103936.1061078-6-sergio.paracuellos@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 783c7cb4659b53b5e1b809dac5e8cdf250145919 Author: Sergio Paracuellos Date: Tue Feb 14 11:39:35 2023 +0100 watchdog: mt7621-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. Reviewed-by: Guenter Roeck Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20230214103936.1061078-5-sergio.paracuellos@gmail.com [groeck: unsigned -> unsigned int] Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit ff75e4eb71cb1b64da07a5a7e8140e202b365887 Author: Sergio Paracuellos Date: Tue Feb 14 11:39:32 2023 +0100 dt-bindings: watchdog: mt7621-wdt: add phandle to access system controller registers MT7621 SoC provides a system controller node for accessing to some registers. Add a phandle in this node to avoid using MIPS related arch operations and includes in watchdog driver code. Acked-by: Krzysztof Kozlowski Signed-off-by: Sergio Paracuellos Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230214103936.1061078-2-sergio.paracuellos@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit f3221361dc85d4de22586ce8441ec2c67b454f5d Author: Jakub Kicinski Date: Tue Feb 28 16:28:57 2023 -0800 net: tls: avoid hanging tasks on the tx_lock syzbot sent a hung task report and Eric explains that adversarial receiver may keep RWIN at 0 for a long time, so we are not guaranteed to make forward progress. Thread which took tx_lock and went to sleep may not release tx_lock for hours. Use interruptible sleep where possible and reschedule the work if it can't take the lock. Testing: existing selftest passes Reported-by: syzbot+9c0268252b8ef967c62e@syzkaller.appspotmail.com Fixes: 79ffe6087e91 ("net/tls: add a TX lock") Link: https://lore.kernel.org/all/000000000000e412e905f5b46201@google.com/ Cc: stable@vger.kernel.org # wait 4 weeks Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20230301002857.2101894-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 49c47cc21b5b7a3d8deb18fc57b0aa2ab1286962 Author: Hangyu Hua Date: Tue Feb 28 10:33:44 2023 +0800 net: tls: fix possible race condition between do_tls_getsockopt_conf() and do_tls_setsockopt_conf() ctx->crypto_send.info is not protected by lock_sock in do_tls_getsockopt_conf(). A race condition between do_tls_getsockopt_conf() and error paths of do_tls_setsockopt_conf() may lead to a use-after-free or null-deref. More discussion: https://lore.kernel.org/all/Y/ht6gQL+u6fj3dG@hog/ Fixes: 3c4d7559159b ("tls: kernel TLS support") Signed-off-by: Hangyu Hua Link: https://lore.kernel.org/r/20230228023344.9623-1-hbh25y@gmail.com Signed-off-by: Jakub Kicinski commit 6bb811d0ee3e1fe9f22a028c89b3472c999b70bc 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 a8af68f79d149796609a679b00a34762249c6a5b 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 1fa0d424a1d50aebbd87d40a0cb41995ba336f27 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 031f196d1b1b6d5dfcb0533b431e3ab1750e6189 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 01a18aa309aec12461fb5e6aecb76f8b33810658 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 23f4a2d29ba57bf88095f817de5809d427fcbe7e 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 cca3306488f71465f8c5e920e5a4e24fa461c72b 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 ca87c9ae70566c651dcf09c1b080db259e20f9ee 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 65a24000808f70ac69bd2a96381fa0c7341f20c0 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 Cc: stable@vger.kernel.org # 6.1.x commit c76e483cd9163138e8fc44d829c986819f072d4f 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 1bf56f25258871db5bfad7aebe19e46148eda159 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 05eacc198c68cbb35a7281ce4011f8899ee1cfb8 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 Cc: stable@vger.kernel.org commit 61fc1ee8be26bc192d691932b0a67eabee45d12f Author: Alexandre Ghiti Date: Tue Mar 16 15:34:20 2021 -0400 riscv: Bump COMMAND_LINE_SIZE value to 1024 Increase COMMAND_LINE_SIZE as the current default value is too low for syzbot kernel command line. There has been considerable discussion on this patch that has led to a larger patch set removing COMMAND_LINE_SIZE from the uapi headers on all ports. That's not quite done yet, but it's gotten far enough we're confident this is not a uABI change so this is safe. Reported-by: Dmitry Vyukov Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20210316193420.904-1-alex@ghiti.fr [Palmer: it's not uabi] Link: https://lore.kernel.org/linux-riscv/874b8076-b0d1-4aaa-bcd8-05d523060152@app.fastmail.com/#t Signed-off-by: Palmer Dabbelt commit 71562809e401b2f5ad371d99ce0323e988406fd6 Author: David Howells Date: Tue Feb 28 22:38:38 2023 +0000 cifs: Fix memory leak in direct I/O When __cifs_readv() and __cifs_writev() extract pages from a user-backed iterator into a BVEC-type iterator, they set ->bv_need_unpin to note whether they need to unpin the pages later. However, in both cases they examine the BVEC-type iterator and not the source iterator - and so bv_need_unpin doesn't get set and the pages are leaked. I think this may be responsible for the generic/208 xfstest failing occasionally with: WARNING: CPU: 0 PID: 3064 at mm/gup.c:218 try_grab_page+0x65/0x100 RIP: 0010:try_grab_page+0x65/0x100 follow_page_pte+0x1a7/0x570 __get_user_pages+0x1a2/0x650 __gup_longterm_locked+0xdc/0xb50 internal_get_user_pages_fast+0x17f/0x310 pin_user_pages_fast+0x46/0x60 iov_iter_extract_pages+0xc9/0x510 ? __kmalloc_large_node+0xb1/0x120 ? __kmalloc_node+0xbe/0x130 netfs_extract_user_iter+0xbf/0x200 [netfs] __cifs_writev+0x150/0x330 [cifs] vfs_write+0x2a8/0x3c0 ksys_pwrite64+0x65/0xa0 with the page refcount going negative. This is less unlikely than it seems because the page is being pinned, not simply got, and so the refcount increased by 1024 each time, and so only needs to be called around ~2097152 for the refcount to go negative. Further, the test program (aio-dio-invalidate-failure) uses a 32MiB static buffer and all the PTEs covering it refer to the same page because it's never written to. The warning in try_grab_page(): if (WARN_ON_ONCE(folio_ref_count(folio) <= 0)) return -ENOMEM; then trips and prevents us ever using the page again for DIO at least. Fixes: d08089f649a0 ("cifs: Change the I/O paths to use an iterator rather than a page list") Reported-by: Murphy Zhou Link: https://lore.kernel.org/r/CAH2r5mvaTsJ---n=265a4zqRA7pP+o4MJ36WCQUS6oPrOij8cw@mail.gmail.com Signed-off-by: David Howells Reviewed-by: Paulo Alcantara (SUSE) cc: Shyam Prasad N cc: Rohith Surabattula cc: Jeff Layton cc: linux-cifs@vger.kernel.org Signed-off-by: Steve French commit 1bcd548d935a33c6fc58331405eb1b82fd6150de Author: Paulo Alcantara Date: Tue Feb 28 19:01:55 2023 -0300 cifs: prevent data race in cifs_reconnect_tcon() Make sure to get an up-to-date TCP_Server_Info::nr_targets value prior to waiting the server to be reconnected in cifs_reconnect_tcon(). It is set in cifs_tcp_ses_needs_reconnect() and protected by TCP_Server_Info::srv_lock. Create a new cifs_wait_for_server_reconnect() helper that can be used by both SMB2+ and CIFS reconnect code. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit b9ee2e307c6b06384b6f9e393a9b8e048e8fc277 Author: Paulo Alcantara Date: Tue Feb 28 19:01:54 2023 -0300 cifs: improve checking of DFS links over STATUS_OBJECT_NAME_INVALID Do not map STATUS_OBJECT_NAME_INVALID to -EREMOTE under non-DFS shares, or 'nodfs' mounts or CONFIG_CIFS_DFS_UPCALL=n builds. Otherwise, in the slow path, get a referral to figure out whether it is an actual DFS link. This could be simply reproduced under a non-DFS share by running the following $ mount.cifs //srv/share /mnt -o ... $ cat /mnt/$(printf '\U110000') cat: '/mnt/'$'\364\220\200\200': Object is remote Fixes: c877ce47e137 ("cifs: reduce roundtrips on create/qinfo requests") CC: stable@vger.kernel.org # 6.2 Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French commit 4c0421fa6df136ff869a078594b4b7b7637e566a Author: David Howells Date: Mon Feb 27 13:04:54 2023 +0000 iov: Fix netfs_extract_user_to_sg() Fix the loop check in netfs_extract_user_to_sg() for extraction from user-backed iterators to do the body if npages > 0, not if npages < 0 (which it can never be). This isn't currently used by cifs, which only ever extracts data from BVEC, KVEC and XARRAY iterators at this level, user-backed iterators having being decanted into BVEC iterators at a higher level to accommodate the work being done in a kernel thread. Found by smatch: fs/netfs/iterator.c:139 netfs_extract_user_to_sg() warn: unsigned 'npages' is never less than zero. Fixes: 018584697533 ("netfs: Add a function to extract an iterator into a scatterlist") Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202302261115.P3TQi1ZO-lkp@intel.com/ Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/Y/yYnAhoAYDBKixX@kili Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: David Howells cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: linux-cachefs@redhat.com Signed-off-by: Steve French commit 0268792f77d2e4ba8e056173bdf2f9af9963be76 Author: David Howells Date: Mon Feb 27 13:04:53 2023 +0000 cifs: Fix cifs_write_back_from_locked_folio() cifs_write_back_from_locked_folio() should return the number of bytes read, but returns the result of ->async_writev(), which will be 0 on success. As it happens, this doesn't prevent cifs_writepages_region() from working as it will then examine and ignore the pages that are no longer dirty rather than just skipping over them. Fixes: d08089f649a0 ("cifs: Change the I/O paths to use an iterator rather than a page list") Signed-off-by: David Howells cc: Shyam Prasad N cc: Rohith Surabattula cc: Tom Talpey cc: Jeff Layton cc: linux-cifs@vger.kernel.org Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 410612b0726b2ee68808da7bd27103d96b4cf898 Author: Shyam Prasad N Date: Tue Dec 27 14:09:32 2022 +0000 cifs: reuse cifs_match_ipaddr for comparison of dstaddr too We have two pieces of code that does pretty much the same comparison. This change reuses cifs_match_ipaddr within match_address. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit a21be1f5df85831147d5a1cbb5f2a13ec8c6852b Author: Shyam Prasad N Date: Tue Dec 27 14:04:29 2022 +0000 cifs: match even the scope id for ipv6 addresses match_address function matches the scope id for ipv6 addresses, but cifs_match_ipaddr (which is another function used for comparison) does not use scope id. Doing so with this change. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit 4bd3e4c7e4e552aa148edd3f2a2326ccc3011122 Author: David Howells Date: Thu Feb 23 08:15:39 2023 +0000 cifs: Fix an uninitialised variable Fix an uninitialised variable introduced in cifs. Fixes: 3d78fe73fa12 ("cifs: Build the RDMA SGE list directly from an iterator") Signed-off-by: David Howells Reviewed-by: Paulo Alcantara (SUSE) cc: Steve French cc: Shyam Prasad N cc: Rohith Surabattula cc: Tom Talpey cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: linux-rdma@vger.kernel.org Signed-off-by: Steve French commit 1907e0fec10c2498729d27550c460528e49abe1e Author: David Howells Date: Thu Feb 23 08:15:38 2023 +0000 cifs: Add some missing xas_retry() calls The xas_for_each loops added into fs/cifs/file.c need to go round again if indicated by xas_retry(). Fixes: b8713c4dbfa3 ("cifs: Add some helper functions") Signed-off-by: David Howells Reviewed-by: Paulo Alcantara (SUSE) cc: Shyam Prasad N cc: Rohith Surabattula cc: Tom Talpey cc: Jeff Layton cc: linux-cifs@vger.kernel.org Signed-off-by: Steve French commit 9f828bc3fb900c5d39ec13ea150341d28fb1f158 Author: Mayuresh Chitale Date: Wed Feb 8 13:13:14 2023 +0530 drivers/perf: RISC-V: Allow programming custom firmware events Applications need to be able to program the SBI implementation specific or custom firmware events in addition to the standard firmware events. Remove a check in the driver that prohibits the programming of the custom firmware events. Signed-off-by: Mayuresh Chitale Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20230208074314.3661406-1-mchitale@ventanamicro.com Signed-off-by: Palmer Dabbelt commit ee3f96b164688dae21e2466a57f2e806b64e8a37 Merge: 92304df83b943 fb5b855d9f349 Author: Linus Torvalds Date: Wed Mar 1 11:03:44 2023 -0800 Merge tag 'nfsd-6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fix from Chuck Lever: - Make new GSS Kerberos Kunit tests work on non-x86 platforms * tag 'nfsd-6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: SUNRPC: Properly terminate test case arrays SUNRPC: Let Kunit tests run with some enctypes compiled out commit 6ca6b58107a8891e4b08087843188fdc5737ec08 Author: Heiko Carstens Date: Wed Mar 1 09:41:06 2023 +0100 s390/Kconfig: sort config S390 select list again Keep the config S390 select list sorted. Signed-off-by: Heiko Carstens commit 8c42dd78df148c90e48efff204cce38743906a79 Author: Gerald Schaefer Date: Mon Feb 27 20:03:00 2023 +0100 s390/extmem: return correct segment type in __segment_load() Commit f05f62d04271f ("s390/vmem: get rid of memory segment list") reshuffled the call to vmem_add_mapping() in __segment_load(), which now overwrites rc after it was set to contain the segment type code. As result, __segment_load() will now always return 0 on success, which corresponds to the segment type code SEG_TYPE_SW, i.e. a writeable segment. This results in a kernel crash when loading a read-only segment as dcssblk block device, and trying to write to it. Instead of reshuffling code again, make sure to return the segment type on success, and also describe this rather delicate and unexpected logic in the function comment. Also initialize new segtype variable with invalid value, to prevent possible future confusion. Fixes: f05f62d04271 ("s390/vmem: get rid of memory segment list") Cc: # 5.9+ Signed-off-by: Gerald Schaefer Reviewed-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 92304df83b943776492309f42452effea0cc1089 Author: Arnd Bergmann Date: Tue Feb 14 14:20:42 2023 +0100 power: supply: qcom_battmgr: remove bogus do_div() The argument to do_div() is a 32-bit integer, and it was read from a 32-bit register so there is no point in doing a 64-bit division on it. On 32-bit arm, do_div() causes a compile-time warning here: include/asm-generic/div64.h:238:22: error: passing argument 1 of '__div64_32' from incompatible pointer type [-Werror=incompatible-pointer-types] 238 | __rem = __div64_32(&(n), __base); \ | ^~~~ | | | unsigned int * drivers/power/supply/qcom_battmgr.c:1130:4: note: in expansion of macro 'do_div' 1130 | do_div(battmgr->status.percent, 100); Signed-off-by: Arnd Bergmann Reviewed-by: Geert Uytterhoeven Acked-by: Sebastian Reichel Reviewed-by: Konrad Dybcio Signed-off-by: Linus Torvalds commit f43523620f646c89ffd8ada840a0068290e51266 Author: Dan Carpenter Date: Mon Feb 27 13:07:09 2023 +0300 cpufreq: apple-soc: Fix an IS_ERR() vs NULL check The of_iomap() function returns NULL if it fails. It never returns error pointers. Fix the check accordingly. Fixes: 6286bbb40576 ("cpufreq: apple-soc: Add new driver to control Apple SoC CPU P-states") Signed-off-by: Dan Carpenter Reviewed-by: Eric Curtin Signed-off-by: Rafael J. Wysocki commit 1467fb960349dfa5e300658f1a409dde2cfb0c51 Author: Randy Dunlap Date: Sat Feb 25 21:39:52 2023 -0800 thermal: intel: BXT_PMIC: 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: b474303ffd57 ("thermal: add Intel BXT WhiskeyCove PMIC thermal driver") Signed-off-by: Randy Dunlap Signed-off-by: Rafael J. Wysocki commit f1b930e740811d416de4d2074da48b6633a672c8 Author: Dan Carpenter Date: Mon Feb 27 13:06:50 2023 +0300 thermal: intel: quark_dts: fix error pointer dereference If alloc_soc_dts() fails, then we can just return. Trying to free "soc_dts" will lead to an Oops. Fixes: 8c1876939663 ("thermal: intel Quark SoC X1000 DTS thermal driver") Signed-off-by: Dan Carpenter Signed-off-by: Rafael J. Wysocki commit fcd9531b305288dc2848d38567d466af4ee147b2 Author: Boris Burkov Date: Wed Feb 15 12:59:49 2023 -0800 btrfs: sysfs: add size class stats Make it possible to see the distribution of size classes for block groups. Helpful for testing and debugging the allocator w.r.t. to size classes. The new stats can be found at the path: /sys/fs/btrfs//allocation//size_class but they will only be non-zero for bg-type = data. Signed-off-by: Boris Burkov Reviewed-by: David Sterba Signed-off-by: David Sterba commit e2a56364485e7789e7b8f342637c7f3a219f7ede Author: Mario Limonciello Date: Tue Feb 28 16:11:28 2023 -0600 ACPI: x86: utils: Add Cezanne to the list for forcing StorageD3Enable commit 018d6711c26e4 ("ACPI: x86: Add a quirk for Dell Inspiron 14 2-in-1 for StorageD3Enable") introduced a quirk to allow a system with ambiguous use of _ADR 0 to force StorageD3Enable. It was reported that several more Dell systems suffered the same symptoms. As the list is continuing to grow but these are all Cezanne systems, instead add Cezanne to the CPU list to apply the StorageD3Enable property and remove the whole list. It was also reported that an HP system only has StorageD3Enable on the ACPI device for the first NVME disk, not the second. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217003 Link: https://bugzilla.kernel.org/show_bug.cgi?id=216773 Reported-by: David Alvarez Lombardi Reported-by: dbilios@stdio.gr Reported-and-tested-by: Elvis Angelaccio Tested-by: victor.bonnelle@proton.me Tested-by: hurricanepootis@protonmail.com Signed-off-by: Mario Limonciello Signed-off-by: Rafael J. Wysocki commit f122a08b197d076ccf136c73fae0146875812a88 Author: Linus Torvalds Date: Tue Feb 28 11:39:09 2023 -0800 capability: just use a 'u64' instead of a 'u32[2]' array Back in 2008 we extended the capability bits from 32 to 64, and we did it by extending the single 32-bit capability word from one word to an array of two words. It was then obfuscated by hiding the "2" behind two macro expansions, with the reasoning being that maybe it gets extended further some day. That reasoning may have been valid at the time, but the last thing we want to do is to extend the capability set any more. And the array of values not only causes source code oddities (with loops to deal with it), but also results in worse code generation. It's a lose-lose situation. So just change the 'u32[2]' into a 'u64' and be done with it. We still have to deal with the fact that the user space interface is designed around an array of these 32-bit values, but that was the case before too, since the array layouts were different (ie user space doesn't use an array of 32-bit values for individual capability masks, but an array of 32-bit slices of multiple masks). So that marshalling of data is actually simplified too, even if it does remain somewhat obscure and odd. This was all triggered by my reaction to the new "cap_isidentical()" introduced recently. By just using a saner data structure, it went from unsigned __capi; CAP_FOR_EACH_U32(__capi) { if (a.cap[__capi] != b.cap[__capi]) return false; } return true; to just being return a.val == b.val; instead. Which is rather more obvious both to humans and to compilers. Cc: Mateusz Guzik Cc: Casey Schaufler Cc: Serge Hallyn Cc: Al Viro Cc: Paul Moore Signed-off-by: Linus Torvalds commit 1d2aea1bcf68992c90218f47405bee29efd722cd Merge: a8356cdb5bd5a ff30bd6a6618e Author: Linus Torvalds Date: Wed Mar 1 09:44:22 2023 -0800 Merge tag 'sh-for-v6.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux Pull sh updates from John Paul Adrian Glaubitz: - regression fix in connection with the rtl8169 driver on SuperH boards that was introduced when the driver was switched to use devm_clk_get_optional_enabled() to simplify the code (Geert Uytterhoeven) - build warning fix to allow the kernel to be built with CONFIG_WERROR enabled (Michael Karcher) * tag 'sh-for-v6.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux: sh: clk: Fix clk_enable() to return 0 on NULL clk sh: intc: Avoid spurious sizeof-pointer-div warning commit a8356cdb5bd5abc74f814d76bd37900997fad35d Merge: 64e851689e441 8883bf83127d5 Author: Linus Torvalds Date: Wed Mar 1 09:27:00 2023 -0800 Merge tag 'loongarch-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson Pull LoongArch updates from Huacai Chen: - Make -mstrict-align configurable - Add kernel relocation and KASLR support - Add single kernel image implementation for kdump - Add hardware breakpoints/watchpoints support - Add kprobes/kretprobes/kprobes_on_ftrace support - Add LoongArch support for some selftests. * tag 'loongarch-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: (23 commits) selftests/ftrace: Add LoongArch kprobe args string tests support selftests/seccomp: Add LoongArch selftesting support tools: Add LoongArch build infrastructure samples/kprobes: Add LoongArch support LoongArch: Mark some assembler symbols as non-kprobe-able LoongArch: Add kprobes on ftrace support LoongArch: Add kretprobes support LoongArch: Add kprobes support LoongArch: Simulate branch and PC* instructions LoongArch: ptrace: Add hardware single step support LoongArch: ptrace: Add function argument access API LoongArch: ptrace: Expose hardware breakpoints to debuggers LoongArch: Add hardware breakpoints/watchpoints support LoongArch: kdump: Add crashkernel=YM handling LoongArch: kdump: Add single kernel image implementation LoongArch: Add support for kernel address space layout randomization (KASLR) LoongArch: Add support for kernel relocation LoongArch: Add la_abs macro implementation LoongArch: Add JUMP_VIRT_ADDR macro implementation to avoid using la.abs LoongArch: Use la.pcrel instead of la.abs when it's trivially possible ... commit 64e851689e441e66e001ae063d4536602f9f74cb Merge: e31b283a58dfe 04df97e150c83 Author: Linus Torvalds Date: Wed Mar 1 09:13:00 2023 -0800 Merge tag 'uml-for-linus-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux Pull UML updates from Richard Weinberger: - Add support for rust (yay!) - Add support for LTO - Add platform bus support to virtio-pci - Various virtio fixes - Coding style, spelling cleanups * tag 'uml-for-linus-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux: (27 commits) Documentation: rust: Fix arch support table uml: vector: Remove unused definitions VECTOR_{WRITE,HEADERS} um: virt-pci: properly remove PCI device from bus um: virtio_uml: move device breaking into workqueue um: virtio_uml: mark device as unregistered when breaking it um: virtio_uml: free command if adding to virtqueue failed UML: define RUNTIME_DISCARD_EXIT virt-pci: add platform bus support um-virt-pci: Make max delay configurable um: virt-pci: implement pcibios_get_phb_of_node() um: Support LTO um: put power options in a menu um: Use CFLAGS_vmlinux um: Prevent building modules incompatible with MODVERSIONS um: Avoid pcap multiple definition errors um: Make the definition of cpu_data more compatible x86: um: vdso: Add '%rcx' and '%r11' to the syscall clobber list rust: arch/um: Add support for CONFIG_RUST under x86_64 UML rust: arch/um: Disable FP/SIMD instruction to match x86 rust: arch/um: Use 'pie' relocation mode under UML ... commit 1947ddf9b3d5b886ba227bbfd3d6f501af08b5b0 Author: Jens Axboe Date: Mon Feb 27 09:41:20 2023 -0700 io_uring/poll: don't pass in wake func to io_init_poll_iocb() We only use one, and it's io_poll_wake(). Hardwire that in the initial init, as well as in __io_queue_proc() if we're setting up for double poll. Signed-off-by: Jens Axboe commit e31b283a58dfe50ab1641d8fd2ead9b62f9ab256 Merge: 3808330b20ee0 8fcf2d012c864 Author: Linus Torvalds Date: Wed Mar 1 09:06:51 2023 -0800 Merge tag 'ubifs-for-linus-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs Pull jffs2, ubi and ubifs updates from Richard Weinberger: "JFFS2: - Fix memory corruption in error path - Spelling and coding style fixes UBI: - Switch to BLK_MQ_F_BLOCKING in ubiblock - Wire up partent device (for sysfs) - Multiple UAF bugfixes - Fix for an infinite loop in WL error path UBIFS: - Fix for multiple memory leaks in error paths - Fixes for wrong space accounting - Minor cleanups - Spelling and coding style fixes" * tag 'ubifs-for-linus-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs: (36 commits) ubi: block: Fix a possible use-after-free bug in ubiblock_create() ubifs: make kobj_type structures constant mtd: ubi: block: wire-up device parent mtd: ubi: wire-up parent MTD device ubi: use correct names in function kernel-doc comments ubi: block: set BLK_MQ_F_BLOCKING jffs2: Fix list_del corruption if compressors initialized failed jffs2: Use function instead of macro when initialize compressors jffs2: fix spelling mistake "neccecary"->"necessary" ubifs: Fix kernel-doc ubifs: Fix some kernel-doc comments UBI: Fastmap: Fix kernel-doc ubi: ubi_wl_put_peb: Fix infinite loop when wear-leveling work failed ubi: Fix UAF wear-leveling entry in eraseblk_count_seq_show() ubi: fastmap: Fix missed fm_anchor PEB in wear-leveling after disabling fastmap ubifs: ubifs_releasepage: Remove ubifs_assert(0) to valid this process ubifs: ubifs_writepage: Mark page dirty after writing inode failed ubifs: dirty_cow_znode: Fix memleak in error handling path ubifs: Re-statistic cleaned znode count if commit failed ubi: Fix permission display of the debugfs files ... commit 3808330b20ee0b23e1e3c192610c3a2ee65605e9 Merge: 6e110580bc1ab 89c58cb395ec0 Author: Linus Torvalds Date: Wed Mar 1 08:52:49 2023 -0800 Merge tag '9p-6.3-for-linus-part1' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs Pull 9p updates from Eric Van Hensbergen: - some fixes and cleanup setting up for a larger set of performance patches I've been working on - a contributed fixes relating to 9p/rdma - some contributed fixes relating to 9p/xen * tag '9p-6.3-for-linus-part1' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs: fs/9p: fix error reporting in v9fs_dir_release net/9p: fix bug in client create for .L 9p/rdma: unmap receive dma buffer in rdma_request()/post_recv() 9p/xen: fix connection sequence 9p/xen: fix version parsing fs/9p: Expand setup of writeback cache to all levels net/9p: Adjust maximum MSIZE to account for p9 header commit 6e110580bc1ab84d02509750ce09277914174c6a Merge: e103ecedceb37 fad376fce0af5 Author: Linus Torvalds Date: Wed Mar 1 08:47:19 2023 -0800 Merge tag 'jfs-6.3' of https://github.com/kleikamp/linux-shaggy Pull jfs update from Dave Kleikamp: "Just one simple sanity check" * tag 'jfs-6.3' of https://github.com/kleikamp/linux-shaggy: fs/jfs: fix shift exponent db_agl2size negative commit e103ecedceb37b565962a199c75dd4df57742d50 Merge: c0927a7a5391f d5c514b6a0c0b Author: Linus Torvalds Date: Wed Mar 1 08:42:27 2023 -0800 Merge tag 'exfat-for-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat Pull exfat updates from Namjae Jeon: - Handle vendor extension and allocation entries as unrecognized benign secondary entries - Fix wrong ->i_blocks on devices with non-512 byte sector - Add the check to avoid returning -EIO from exfat_readdir() at current position exceeding the directory size - Fix a bug that reach the end of the directory stream at a position not aligned with the dentry size - Redefine DIR_DELETED as 0xFFFFFFF7, the bad cluster number - Two cleanup fixes and fix cluster leakage in error handling * tag 'exfat-for-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat: exfat: fix the newly allocated clusters are not freed in error handling exfat: don't print error log in normal case exfat: remove unneeded code from exfat_alloc_cluster() exfat: handle unreconized benign secondary entries exfat: fix inode->i_blocks for non-512 byte sector size device exfat: redefine DIR_DELETED as the bad cluster number exfat: fix reporting fs error when reading dir beyond EOF exfat: fix unexpected EOF while reading dir commit aabef97a35160461e9c576848ded737558d89055 Author: Pablo Neira Ayuso Date: Tue Feb 28 20:43:02 2023 +0100 netfilter: nft_quota: copy content when cloning expression If the ruleset contains consumed quota, restore them accordingly. Otherwise, listing after restoration shows never used items. Restore the user-defined quota and flags too. Fixes: ed0a0c60f0e5 ("netfilter: nft_quota: move stateful fields out of expression data") Signed-off-by: Pablo Neira Ayuso commit 860e874290fb3be08e966c9c8ffc510c5b0f2bd8 Author: Pablo Neira Ayuso Date: Tue Feb 28 17:09:03 2023 +0100 netfilter: nft_last: copy content when cloning expression If the ruleset contains last timestamps, restore them accordingly. Otherwise, listing after restoration shows never used items. Fixes: 33a24de37e81 ("netfilter: nft_last: move stateful fields out of expression data") Signed-off-by: Pablo Neira Ayuso commit 2067e7a00aa604b94de31d64f29b8893b1696f26 Author: Hangbin Liu Date: Mon Feb 27 17:36:46 2023 +0800 selftests: nft_nat: ensuring the listening side is up before starting the client The test_local_dnat_portonly() function initiates the client-side as soon as it sets the listening side to the background. This could lead to a race condition where the server may not be ready to listen. To ensure that the server-side is up and running before initiating the client-side, a delay is introduced to the test_local_dnat_portonly() function. Before the fix: # ./nft_nat.sh PASS: netns routing/connectivity: ns0-rthlYrBU can reach ns1-rthlYrBU and ns2-rthlYrBU PASS: ping to ns1-rthlYrBU was ip NATted to ns2-rthlYrBU PASS: ping to ns1-rthlYrBU OK after ip nat output chain flush PASS: ipv6 ping to ns1-rthlYrBU was ip6 NATted to ns2-rthlYrBU 2023/02/27 04:11:03 socat[6055] E connect(5, AF=2 10.0.1.99:2000, 16): Connection refused ERROR: inet port rewrite After the fix: # ./nft_nat.sh PASS: netns routing/connectivity: ns0-9sPJV6JJ can reach ns1-9sPJV6JJ and ns2-9sPJV6JJ PASS: ping to ns1-9sPJV6JJ was ip NATted to ns2-9sPJV6JJ PASS: ping to ns1-9sPJV6JJ OK after ip nat output chain flush PASS: ipv6 ping to ns1-9sPJV6JJ was ip6 NATted to ns2-9sPJV6JJ PASS: inet port rewrite without l3 address Fixes: 282e5f8fe907 ("netfilter: nat: really support inet nat without l3 address") Signed-off-by: Hangbin Liu Signed-off-by: Pablo Neira Ayuso commit 326ac2c5133e5da7ccdd08d4f9c562f2323021aa Merge: e33b93650fc53 26a57cb35548a Author: Jens Axboe Date: Wed Mar 1 07:49:59 2023 -0700 Merge tag 'nvme-6.3-2022-03-01' of git://git.infradead.org/nvme into for-6.3/block Pull NVMe fixes from Christoph: "nvme fixes for Linux 6.3 - don't access released socket during error recovery (Akinobu Mita) - bring back auto-removal of deleted namespaces during sequential scan (Christoph Hellwig) - fix an error code in nvme_auth_process_dhchap_challenge (Dan Carpenter) - show well known discovery name (Daniel Wagner) - add a missing endianess conversion in effects masking (Keith Busch)" * tag 'nvme-6.3-2022-03-01' of git://git.infradead.org/nvme: nvme-fabrics: show well known discovery name nvme-tcp: don't access released socket during error recovery nvme-auth: fix an error code in nvme_auth_process_dhchap_challenge() nvme: bring back auto-removal of deleted namespaces during sequential scan nvme: fix sparse warning on effects masking commit b56ec2992a2e43bc3e60d6db86849d31640e791f Author: Trevor Wu Date: Wed Mar 1 19:02:00 2023 +0800 ASoC: mediatek: mt8195: add missing initialization In etdm dai driver, dai_etdm_parse_of() function is used to parse dts properties to get parameters. There are two for-loops which are sepearately for all etdm and etdm input only cases. In etdm in only loop, dai_id is not initialized, so it keeps the value intiliazed in another loop. In the patch, add the missing initialization to fix the unexpected parsing problem. Fixes: 1de9a54acafb ("ASoC: mediatek: mt8195: support etdm in platform driver") Signed-off-by: Trevor Wu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230301110200.26177-3-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit 23badca4248a9a467f630adbd1557f664585e1db Author: Trevor Wu Date: Wed Mar 1 19:01:59 2023 +0800 ASoC: mediatek: mt8188: add missing initialization In etdm dai driver, dai_etdm_parse_of() function is used to parse dts properties to get parameters. There are two for-loops which are sepearately for all etdm and etdm input only cases. In etdm in only loop, dai_id is not initialized, so it keeps the value intiliazed in another loop. In the patch, add the missing initialization to fix the unexpected parsing problem. Fixes: 2babb4777489 ("ASoC: mediatek: mt8188: support etdm in platform driver") Signed-off-by: Trevor Wu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230301110200.26177-2-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit 81563d8548b0478075c720666be348d4199b8591 Author: Horatiu Vultur Date: Tue Feb 28 21:47:42 2023 +0100 net: lan966x: Fix port police support using tc-matchall When the police was removed from the port, then it was trying to remove the police from the police id and not from the actual police index. The police id represents the id of the police and police index represents the position in HW where the police is situated. The port police id can be any number while the port police index is a number based on the port chip port. Fix this by deleting the police from HW that is situated at the police index and not police id. Fixes: 5390334b59a3 ("net: lan966x: Add port police support using tc-matchall") Signed-off-by: Horatiu Vultur Reviewed-by: Simon Horman Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit dd093fb08e8f8a958fec4eef36f9f09eac047f60 Author: Tom Lendacky Date: Wed Feb 22 10:39:39 2023 -0600 virt/sev-guest: Return -EIO if certificate buffer is not large enough Commit 47894e0fa6a5 ("virt/sev-guest: Prevent IV reuse in the SNP guest driver") changed the behavior associated with the return value when the caller does not supply a large enough certificate buffer. Prior to the commit a value of -EIO was returned. Now, 0 is returned. This breaks the established ABI with the user. Change the code to detect the buffer size error and return -EIO. Fixes: 47894e0fa6a5 ("virt/sev-guest: Prevent IV reuse in the SNP guest driver") Reported-by: Larry Dewey Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov (AMD) Tested-by: Larry Dewey Cc: Link: https://lore.kernel.org/r/2afbcae6daf13f7ad5a4296692e0a0fe1bc1e4ee.1677083979.git.thomas.lendacky@amd.com commit dfd2f0eb2347dbdf391fd5b8255fefc58a745472 Author: Eric Dumazet Date: Mon Feb 27 18:44:36 2023 +0000 net/sched: flower: fix fl_change() error recovery path The two "goto errout;" paths in fl_change() became wrong after cited commit. Indeed we only must not call __fl_put() until the net pointer has been set in tcf_exts_init_ex() This is a minimal fix. We might in the future validate TCA_FLOWER_FLAGS before we allocate @fnew. BUG: KASAN: null-ptr-deref in instrument_atomic_read include/linux/instrumented.h:72 [inline] BUG: KASAN: null-ptr-deref in atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline] BUG: KASAN: null-ptr-deref in refcount_read include/linux/refcount.h:147 [inline] BUG: KASAN: null-ptr-deref in __refcount_add_not_zero include/linux/refcount.h:152 [inline] BUG: KASAN: null-ptr-deref in __refcount_inc_not_zero include/linux/refcount.h:227 [inline] BUG: KASAN: null-ptr-deref in refcount_inc_not_zero include/linux/refcount.h:245 [inline] BUG: KASAN: null-ptr-deref in maybe_get_net include/net/net_namespace.h:269 [inline] BUG: KASAN: null-ptr-deref in tcf_exts_get_net include/net/pkt_cls.h:260 [inline] BUG: KASAN: null-ptr-deref in __fl_put net/sched/cls_flower.c:513 [inline] BUG: KASAN: null-ptr-deref in __fl_put+0x13e/0x3b0 net/sched/cls_flower.c:508 Read of size 4 at addr 000000000000014c by task syz-executor548/5082 CPU: 0 PID: 5082 Comm: syz-executor548 Not tainted 6.2.0-syzkaller-05251-g5b7c4cabbb65 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_report mm/kasan/report.c:420 [inline] kasan_report+0xec/0x130 mm/kasan/report.c:517 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x141/0x190 mm/kasan/generic.c:189 instrument_atomic_read include/linux/instrumented.h:72 [inline] atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline] refcount_read include/linux/refcount.h:147 [inline] __refcount_add_not_zero include/linux/refcount.h:152 [inline] __refcount_inc_not_zero include/linux/refcount.h:227 [inline] refcount_inc_not_zero include/linux/refcount.h:245 [inline] maybe_get_net include/net/net_namespace.h:269 [inline] tcf_exts_get_net include/net/pkt_cls.h:260 [inline] __fl_put net/sched/cls_flower.c:513 [inline] __fl_put+0x13e/0x3b0 net/sched/cls_flower.c:508 fl_change+0x101b/0x4ab0 net/sched/cls_flower.c:2341 tc_new_tfilter+0x97c/0x2290 net/sched/cls_api.c:2310 rtnetlink_rcv_msg+0x996/0xd50 net/core/rtnetlink.c:6165 netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2574 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:722 [inline] sock_sendmsg+0xde/0x190 net/socket.c:745 ____sys_sendmsg+0x334/0x900 net/socket.c:2504 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2558 __sys_sendmmsg+0x18f/0x460 net/socket.c:2644 __do_sys_sendmmsg net/socket.c:2673 [inline] __se_sys_sendmmsg net/socket.c:2670 [inline] __x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2670 Fixes: 08a0063df3ae ("net/sched: flower: Move filter handle initialization earlier") Reported-by: syzbot+baabf3efa7c1e57d28b2@syzkaller.appspotmail.com Reported-by: syzbot Signed-off-by: Eric Dumazet Cc: Paul Blakey Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 693aa2c0d9b6d5b1f2745d31b6e70d09dbbaf06e Author: Eric Dumazet Date: Mon Feb 27 15:30:24 2023 +0000 ila: do not generate empty messages in ila_xlat_nl_cmd_get_mapping() ila_xlat_nl_cmd_get_mapping() generates an empty skb, triggerring a recent sanity check [1]. Instead, return an error code, so that user space can get it. [1] skb_assert_len WARNING: CPU: 0 PID: 5923 at include/linux/skbuff.h:2527 skb_assert_len include/linux/skbuff.h:2527 [inline] WARNING: CPU: 0 PID: 5923 at include/linux/skbuff.h:2527 __dev_queue_xmit+0x1bc0/0x3488 net/core/dev.c:4156 Modules linked in: CPU: 0 PID: 5923 Comm: syz-executor269 Not tainted 6.2.0-syzkaller-18300-g2ebd1fbb946d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : skb_assert_len include/linux/skbuff.h:2527 [inline] pc : __dev_queue_xmit+0x1bc0/0x3488 net/core/dev.c:4156 lr : skb_assert_len include/linux/skbuff.h:2527 [inline] lr : __dev_queue_xmit+0x1bc0/0x3488 net/core/dev.c:4156 sp : ffff80001e0d6c40 x29: ffff80001e0d6e60 x28: dfff800000000000 x27: ffff0000c86328c0 x26: dfff800000000000 x25: ffff0000c8632990 x24: ffff0000c8632a00 x23: 0000000000000000 x22: 1fffe000190c6542 x21: ffff0000c8632a10 x20: ffff0000c8632a00 x19: ffff80001856e000 x18: ffff80001e0d5fc0 x17: 0000000000000000 x16: ffff80001235d16c x15: 0000000000000000 x14: 0000000000000000 x13: 0000000000000001 x12: 0000000000000001 x11: ff80800008353a30 x10: 0000000000000000 x9 : 21567eaf25bfb600 x8 : 21567eaf25bfb600 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff80001e0d6558 x4 : ffff800015c74760 x3 : ffff800008596744 x2 : 0000000000000001 x1 : 0000000100000000 x0 : 000000000000000e Call trace: skb_assert_len include/linux/skbuff.h:2527 [inline] __dev_queue_xmit+0x1bc0/0x3488 net/core/dev.c:4156 dev_queue_xmit include/linux/netdevice.h:3033 [inline] __netlink_deliver_tap_skb net/netlink/af_netlink.c:307 [inline] __netlink_deliver_tap+0x45c/0x6f8 net/netlink/af_netlink.c:325 netlink_deliver_tap+0xf4/0x174 net/netlink/af_netlink.c:338 __netlink_sendskb net/netlink/af_netlink.c:1283 [inline] netlink_sendskb+0x6c/0x154 net/netlink/af_netlink.c:1292 netlink_unicast+0x334/0x8d4 net/netlink/af_netlink.c:1380 nlmsg_unicast include/net/netlink.h:1099 [inline] genlmsg_unicast include/net/genetlink.h:433 [inline] genlmsg_reply include/net/genetlink.h:443 [inline] ila_xlat_nl_cmd_get_mapping+0x620/0x7d0 net/ipv6/ila/ila_xlat.c:493 genl_family_rcv_msg_doit net/netlink/genetlink.c:968 [inline] genl_family_rcv_msg net/netlink/genetlink.c:1048 [inline] genl_rcv_msg+0x938/0xc1c net/netlink/genetlink.c:1065 netlink_rcv_skb+0x214/0x3c4 net/netlink/af_netlink.c:2574 genl_rcv+0x38/0x50 net/netlink/genetlink.c:1076 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x660/0x8d4 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x800/0xae0 net/netlink/af_netlink.c:1942 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg net/socket.c:734 [inline] ____sys_sendmsg+0x558/0x844 net/socket.c:2479 ___sys_sendmsg net/socket.c:2533 [inline] __sys_sendmsg+0x26c/0x33c net/socket.c:2562 __do_sys_sendmsg net/socket.c:2571 [inline] __se_sys_sendmsg net/socket.c:2569 [inline] __arm64_sys_sendmsg+0x80/0x94 net/socket.c:2569 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x198 arch/arm64/kernel/syscall.c:193 el0_svc+0x58/0x168 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 irq event stamp: 136484 hardirqs last enabled at (136483): [] __up_console_sem+0x60/0xb4 kernel/printk/printk.c:345 hardirqs last disabled at (136484): [] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:405 softirqs last enabled at (136418): [] softirq_handle_end kernel/softirq.c:414 [inline] softirqs last enabled at (136418): [] __do_softirq+0xd4c/0xfa4 kernel/softirq.c:600 softirqs last disabled at (136371): [] ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:80 ---[ end trace 0000000000000000 ]--- skb len=0 headroom=0 headlen=0 tailroom=192 mac=(0,0) net=(0,-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=0x0010 pkttype=6 iif=0 dev name=nlmon0 feat=0x0000000000005861 Fixes: 7f00feaf1076 ("ila: Add generic ILA translation facility") Reported-by: syzbot Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit fb07390463c95e6eef254044d6dde050bfb9807a Author: Pedro Tammela Date: Mon Feb 27 12:23:52 2023 -0300 net/sched: act_connmark: handle errno on tcf_idr_check_alloc Smatch reports that 'ci' can be used uninitialized. The current code ignores errno coming from tcf_idr_check_alloc, which will lead to the incorrect usage of 'ci'. Handle the errno as it should. Fixes: 288864effe33 ("net/sched: act_connmark: transition to percpu stats and rcu") Reviewed-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 880ce5f20033cd6ecb2c0edfe0376c9e45220012 Author: Eric Dumazet Date: Mon Feb 27 14:17:06 2023 +0000 net: avoid skb end_offset change in __skb_unclone_keeptruesize() Once initial skb->head has been allocated from skb_small_head_cache, we need to make sure to use the same strategy whenever skb->head has to be re-allocated, as found by syzbot [1] This means kmalloc_reserve() can not fallback from using skb_small_head_cache to generic (power-of-two) kmem caches. It seems that we probably want to rework things in the future, to partially revert following patch, because we no longer use ksize() for skb allocated in TX path. 2b88cba55883 ("net: preserve skb_end_offset() in skb_unclone_keeptruesize()") Ideally, TCP stack should never put payload in skb->head, this effort has to be completed. In the mean time, add a sanity check. [1] BUG: KASAN: invalid-free in slab_free mm/slub.c:3787 [inline] BUG: KASAN: invalid-free in kmem_cache_free+0xee/0x5c0 mm/slub.c:3809 Free of addr ffff88806cdee800 by task syz-executor239/5189 CPU: 0 PID: 5189 Comm: syz-executor239 Not tainted 6.2.0-rc8-syzkaller-02400-gd1fabc68f8e0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:306 [inline] print_report+0x15e/0x45d mm/kasan/report.c:417 kasan_report_invalid_free+0x9b/0x1b0 mm/kasan/report.c:482 ____kasan_slab_free+0x1a5/0x1c0 mm/kasan/common.c:216 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1807 slab_free mm/slub.c:3787 [inline] kmem_cache_free+0xee/0x5c0 mm/slub.c:3809 skb_kfree_head net/core/skbuff.c:857 [inline] skb_kfree_head net/core/skbuff.c:853 [inline] skb_free_head+0x16f/0x1a0 net/core/skbuff.c:872 skb_release_data+0x57a/0x820 net/core/skbuff.c:901 skb_release_all net/core/skbuff.c:966 [inline] __kfree_skb+0x4f/0x70 net/core/skbuff.c:980 tcp_wmem_free_skb include/net/tcp.h:302 [inline] tcp_rtx_queue_purge net/ipv4/tcp.c:3061 [inline] tcp_write_queue_purge+0x617/0xcf0 net/ipv4/tcp.c:3074 tcp_v4_destroy_sock+0x125/0x810 net/ipv4/tcp_ipv4.c:2302 inet_csk_destroy_sock+0x19a/0x440 net/ipv4/inet_connection_sock.c:1195 __tcp_close+0xb96/0xf50 net/ipv4/tcp.c:3021 tcp_close+0x2d/0xc0 net/ipv4/tcp.c:3033 inet_release+0x132/0x270 net/ipv4/af_inet.c:426 __sock_release+0xcd/0x280 net/socket.c:651 sock_close+0x1c/0x20 net/socket.c:1393 __fput+0x27c/0xa90 fs/file_table.c:320 task_work_run+0x16f/0x270 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+0x23c/0x250 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:296 do_syscall_64+0x46/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f2511f546c3 Code: c7 c2 c0 ff ff ff f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 64 8b 04 25 18 00 00 00 85 c0 75 14 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 RSP: 002b:00007ffef0103d48 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00007f2511f546c3 RDX: 0000000000000978 RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 0000000000000000 R08: 0000000000000002 R09: 0000000000003434 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffef0103d6c R13: 00007ffef0103d80 R14: 00007ffef0103dc0 R15: 0000000000000003 Allocated by task 5189: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] ____kasan_kmalloc mm/kasan/common.c:333 [inline] __kasan_kmalloc+0xa5/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:968 [inline] __kmalloc_node_track_caller+0x5b/0xc0 mm/slab_common.c:988 kmalloc_reserve+0xf1/0x230 net/core/skbuff.c:539 pskb_expand_head+0x237/0x1160 net/core/skbuff.c:1995 __skb_unclone_keeptruesize+0x93/0x220 net/core/skbuff.c:2094 skb_unclone_keeptruesize include/linux/skbuff.h:1910 [inline] skb_prepare_for_shift net/core/skbuff.c:3804 [inline] skb_shift+0xef8/0x1e20 net/core/skbuff.c:3877 tcp_skb_shift net/ipv4/tcp_input.c:1538 [inline] tcp_shift_skb_data net/ipv4/tcp_input.c:1646 [inline] tcp_sacktag_walk+0x93b/0x18a0 net/ipv4/tcp_input.c:1713 tcp_sacktag_write_queue+0x1599/0x31d0 net/ipv4/tcp_input.c:1974 tcp_ack+0x2e9f/0x5a10 net/ipv4/tcp_input.c:3847 tcp_rcv_established+0x667/0x2230 net/ipv4/tcp_input.c:6006 tcp_v4_do_rcv+0x670/0x9b0 net/ipv4/tcp_ipv4.c:1721 sk_backlog_rcv include/net/sock.h:1113 [inline] __release_sock+0x133/0x3b0 net/core/sock.c:2921 release_sock+0x58/0x1b0 net/core/sock.c:3488 tcp_sendmsg+0x3a/0x50 net/ipv4/tcp.c:1485 inet_sendmsg+0x9d/0xe0 net/ipv4/af_inet.c:825 sock_sendmsg_nosec net/socket.c:722 [inline] sock_sendmsg+0xde/0x190 net/socket.c:745 sock_write_iter+0x295/0x3d0 net/socket.c:1136 call_write_iter include/linux/fs.h:2189 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x9ed/0xdd0 fs/read_write.c:584 ksys_write+0x1ec/0x250 fs/read_write.c:637 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 The buggy address belongs to the object at ffff88806cdee800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 0 bytes inside of 1024-byte region [ffff88806cdee800, ffff88806cdeec00) The buggy address belongs to the physical page: page:ffffea0001b37a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x6cde8 head:ffffea0001b37a00 order:3 compound_mapcount:0 subpages_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffff888012441dc0 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1f2a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_MEMALLOC|__GFP_HARDWALL), pid 75, tgid 75 (kworker/u4:4), ts 96369578780, free_ts 26734162530 prep_new_page mm/page_alloc.c:2531 [inline] get_page_from_freelist+0x119c/0x2ce0 mm/page_alloc.c:4283 __alloc_pages+0x1cb/0x5b0 mm/page_alloc.c:5549 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2287 alloc_slab_page mm/slub.c:1851 [inline] allocate_slab+0x25f/0x350 mm/slub.c:1998 new_slab mm/slub.c:2051 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3193 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3292 __slab_alloc_node mm/slub.c:3345 [inline] slab_alloc_node mm/slub.c:3442 [inline] __kmem_cache_alloc_node+0x1a4/0x430 mm/slub.c:3491 __do_kmalloc_node mm/slab_common.c:967 [inline] __kmalloc_node_track_caller+0x4b/0xc0 mm/slab_common.c:988 kmalloc_reserve+0xf1/0x230 net/core/skbuff.c:539 __alloc_skb+0x129/0x330 net/core/skbuff.c:608 __netdev_alloc_skb+0x74/0x410 net/core/skbuff.c:672 __netdev_alloc_skb_ip_align include/linux/skbuff.h:3203 [inline] netdev_alloc_skb_ip_align include/linux/skbuff.h:3213 [inline] batadv_iv_ogm_aggregate_new+0x106/0x4e0 net/batman-adv/bat_iv_ogm.c:558 batadv_iv_ogm_queue_add net/batman-adv/bat_iv_ogm.c:670 [inline] batadv_iv_ogm_schedule_buff+0xe6b/0x1450 net/batman-adv/bat_iv_ogm.c:849 batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:868 [inline] batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:861 [inline] batadv_iv_send_outstanding_bat_ogm_packet+0x744/0x910 net/batman-adv/bat_iv_ogm.c:1712 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 worker_thread+0x669/0x1090 kernel/workqueue.c:2436 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1446 [inline] free_pcp_prepare+0x66a/0xc20 mm/page_alloc.c:1496 free_unref_page_prepare mm/page_alloc.c:3369 [inline] free_unref_page+0x1d/0x490 mm/page_alloc.c:3464 free_contig_range+0xb5/0x180 mm/page_alloc.c:9488 destroy_args+0xa8/0x64c mm/debug_vm_pgtable.c:998 debug_vm_pgtable+0x28de/0x296f mm/debug_vm_pgtable.c:1318 do_one_initcall+0x141/0x790 init/main.c:1306 do_initcall_level init/main.c:1379 [inline] do_initcalls init/main.c:1395 [inline] do_basic_setup init/main.c:1414 [inline] kernel_init_freeable+0x6f9/0x782 init/main.c:1634 kernel_init+0x1e/0x1d0 init/main.c:1522 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Memory state around the buggy address: ffff88806cdee700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88806cdee780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88806cdee800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88806cdee880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Fixes: bf9f1baa279f ("net: add dedicated kmem_cache for typical/small skb->head") Reported-by: syzbot Signed-off-by: Eric Dumazet Tested-by: Christoph Paasch Signed-off-by: David S. Miller commit 81a1dd10b072fd432f37cd5dc9eb3ed6ec5d386e Author: Björn Töpel Date: Tue Feb 28 19:42:10 2023 +0100 riscv, lib: Fix Zbb strncmp The Zbb optimized strncmp has two parts; a fast path that does XLEN/8B per iteration, and a slow that does one byte per iteration. The idea is to compare aligned XLEN chunks for most of strings, and do the remainder tail in the slow path. The Zbb strncmp has two issues in the fast path: Incorrect remainder handling (wrong compare): Assume that the string length is 9. On 64b systems, the fast path should do one iteration, and one iteration in the slow path. Instead, both were done in the fast path, which lead to incorrect results. An example: strncmp("/dev/vda", "/dev/", 5); Correct by changing "bgt" to "bge". Missing NULL checks in the second string: This could lead to incorrect results for: strncmp("/dev/vda", "/dev/vda\0", 8); Correct by adding an additional check. Fixes: b6fcdb191e36 ("RISC-V: add zbb support to string functions") Suggested-by: Heiko Stuebner Signed-off-by: Björn Töpel Tested-by: Conor Dooley Tested-by: Guenter Roeck Link: https://lore.kernel.org/r/20230228184211.1585641-1-bjorn@kernel.org Signed-off-by: Palmer Dabbelt commit c0927a7a5391f7d8e593e5e50ead7505a23cadf9 Merge: 1899946aaf256 6e2985c938e8b Author: Linus Torvalds Date: Tue Feb 28 16:08:30 2023 -0800 Merge tag 'xfs-6.3-merge-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull moar xfs updates from Darrick Wong: "This contains a fix for a deadlock in the allocator. It continues the slow march towards being able to offline AGs, and it refactors the interface to the xfs allocator to be less indirection happy. Summary: - Fix a deadlock in the free space allocator due to the AG-walking algorithm forgetting to follow AG-order locking rules - Make the inode allocator prefer existing free inodes instead of failing to allocate new inode chunks when free space is low - Set minleft correctly when setting allocator parameters for bmap changes - Fix uninitialized variable access in the getfsmap code - Make a distinction between active and passive per-AG structure references. For now, active references are taken to perform some work in an AG on behalf of a high level operation; passive references are used by lower level code to finish operations started by other threads. Eventually this will become part of online shrink - Split out all the different allocator strategies into separate functions to move us away from design antipattern of filling out a huge structure for various differentish things and issuing a single function multiplexing call - Various cleanups in the filestreams allocator code, which we might very well want to deprecate instead of continuing - Fix a bug with the agi rotor code that was introduced earlier in this series" * tag 'xfs-6.3-merge-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (44 commits) xfs: restore old agirotor behavior xfs: fix uninitialized variable access xfs: refactor the filestreams allocator pick functions xfs: return a referenced perag from filestreams allocator xfs: pass perag to filestreams tracing xfs: use for_each_perag_wrap in xfs_filestream_pick_ag xfs: track an active perag reference in filestreams xfs: factor out MRU hit case in xfs_filestream_select_ag xfs: remove xfs_filestream_select_ag() longest extent check xfs: merge new filestream AG selection into xfs_filestream_select_ag() xfs: merge filestream AG lookup into xfs_filestream_select_ag() xfs: move xfs_bmap_btalloc_filestreams() to xfs_filestreams.c xfs: use xfs_bmap_longest_free_extent() in filestreams xfs: get rid of notinit from xfs_bmap_longest_free_extent xfs: factor out filestreams from xfs_bmap_btalloc_nullfb xfs: convert trim to use for_each_perag_range xfs: convert xfs_alloc_vextent_iterate_ags() to use perag walker xfs: move the minimum agno checks into xfs_alloc_vextent_check_args xfs: fold xfs_alloc_ag_vextent() into callers xfs: move allocation accounting to xfs_alloc_vextent_set_fsbno() ... commit 1899946aaf2566c577683ebe510a83c930cd3751 Merge: b1f1382a110bc 510d2358c466b Author: Linus Torvalds Date: Tue Feb 28 16:05:01 2023 -0800 Merge tag 'i3c/for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux Pull i3c updates from Alexandre Belloni: "Subsystem: - transfer pid from boardinfo to device info Drivers: - dw-i3c-master: stop hardcoding initial speed" * tag 'i3c/for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: i3c: master: dw: stop hardcoding initial speed i3c: transfer pid from boardinfo to device info commit b1f1382a110bca1ef52234e889246a90f9a0d69b Merge: e492250d52526 901578a45950b Author: Linus Torvalds Date: Tue Feb 28 16:01:08 2023 -0800 Merge tag 'docs-6.3-2' of git://git.lwn.net/linux Pull Documentation stragglers from Jonathan Corbet: "A handful of documentation patches that were ready before the merge window, but which I didn't get merged for the first round: - A recommendation from Thorsten (also akpm) on use of Link tags to point out problem reports - Some front-page formatting tweaks - Another Spanish translation - One typo(ish) fix" * tag 'docs-6.3-2' of git://git.lwn.net/linux: docs: recommend using Link: whenever using Reported-by: Documentation: front page: use recommended heading adornments docs/sp_SP: Add process programming-language translation docs: locking: refer to the actual existing config names commit 510d2358c466bf6588034f0d3b2266eed2bc0a51 Author: Jack Chen Date: Thu Feb 16 10:10:57 2023 -0500 i3c: master: dw: stop hardcoding initial speed Bus-speed could be default(12.5MHz) or defined by users in dts. Dw-i3c-master should not hard-code the initial speed to be I3C_BUS_TYP_I3C_SCL_RATE (12.5MHz) And because of Synopsys's I3C controller limit (hcnt/lcnt register length) and core-clk provided, there is a limit to bus speed, too. For example, when core-clk is 250 MHz, the bus speed cannot be lowered below 1MHz. Tested: tested with an i3c sensor and captured with a logic analyzer. Signed-off-by: Jack Chen Link: https://lore.kernel.org/r/20230216151057.293764-1-zenghuchen@google.com Signed-off-by: Alexandre Belloni commit a2a448b4d9bcb5bff0e0f687b7932a7be9ca898a Author: Dmitry Baryshkov Date: Sun Feb 12 01:12:11 2023 +0200 drm/msm/dpu: disable features unsupported by QCM2290 QCM2290 doesn't seem to support reg-dma, UBWC and CSC. Drop corresponding features being incorrectly enabled for qcm2290. Cc: Loic Poulain Fixes: 5334087ee743 ("drm/msm: add support for QCM2290 MDSS") Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/522209/ Link: https://lore.kernel.org/r/20230211231259.1308718-3-dmitry.baryshkov@linaro.org Signed-off-by: Abhinav Kumar commit 0df979f4b93569dfb908d195f8e7d4c3cef4eaeb Author: Dmitry Baryshkov Date: Sun Feb 12 01:12:10 2023 +0200 drm/msm/dpu: set DPU_MDP_PERIPH_0_REMOVED for sc8280xp The SC8280XP also has a black hole at the top of MDP_TOP region. Set corresponding bit to disable access to that region. Fixes: 4a352c2fc15a ("drm/msm/dpu: Introduce SC8280XP") Reviewed-by: Abhinav Kumar Reviewed-by: Neil Armstrong Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/522207/ Link: https://lore.kernel.org/r/20230211231259.1308718-2-dmitry.baryshkov@linaro.org Signed-off-by: Abhinav Kumar commit 4d42cd6bc2ac1b9be50ade13771daec90c9d18b1 Author: Jakub Kicinski Date: Mon Feb 27 10:12:01 2023 -0800 tls: rx: fix return value for async crypto Gaurav reports that TLS Rx is broken with async crypto accelerators. The commit under fixes missed updating the retval byte counting logic when updating how records are stored. Even tho both before and after the change 'decrypted' was updated inside the main loop, it was completely overwritten when processing the async completions. Now that the rx_list only holds non-zero-copy records we need to add, not overwrite. Reported-and-bisected-by: Gaurav Jain Fixes: cbbdee9918a2 ("tls: rx: async: don't put async zc on the list") Link: https://bugzilla.kernel.org/show_bug.cgi?id=217064 Tested-by: Gaurav Jain Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230227181201.1793772-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit ca643ccf933a10732d29f77089736334179577a5 Merge: 8f9850dd8d23c 8b322f9fdb35e Author: Jakub Kicinski Date: Tue Feb 28 14:13:33 2023 -0800 Merge branch 'freescale-t1040rdb-dts-updates' Vladimir Oltean says: ==================== Freescale T1040RDB DTS updates This contains a fix for the new device tree for the T1040RDB rev A board, which never worked, and an update to enable multiple CPU port support for all revisions of the T1040RDB. ==================== Link: https://lore.kernel.org/r/20230224155941.514638-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 8b322f9fdb35ecee0d4a40de8af923444bd624ea Author: Vladimir Oltean Date: Fri Feb 24 17:59:40 2023 +0200 powerpc: dts: t1040rdb: enable both CPU ports Since commit eca70102cfb1 ("net: dsa: felix: add support for changing DSA master") included in kernel v6.1, the driver supports 2 CPU ports, and they can be put in a LAG, for example (see Documentation/networking/dsa/configuration.rst for more details). Defining the second CPU port in the device tree should not cause any compatibility issue, because the default CPU port was &seville_port8 before this change, and still is &seville_port8 now (the numerically first CPU port is used by default). Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit ae44f1c9d1fc54aeceb335fedb1e73b2c3ee4561 Author: Vladimir Oltean Date: Fri Feb 24 17:59:39 2023 +0200 powerpc: dts: t1040rdb: fix compatible string for Rev A boards It looks like U-Boot fails to start the kernel properly when the compatible string of the board isn't fsl,T1040RDB, so stop overriding it from the rev-a.dts. Fixes: 5ebb74749202 ("powerpc: dts: t1040rdb: fix ports names for Seville Ethernet switch") Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 1a2c73f4834dd79e4f2c590ac75358fb44137650 Author: Jiaxun Yang Date: Tue Feb 28 19:34:59 2023 +0000 MIPS: Workaround clang inline compat branch issue Clang is unable to handle the situation that a chunk of inline assembly ends with a compat branch instruction and then compiler generates another control transfer instruction immediately after this compat branch. The later instruction will end up in forbidden slot and cause exception. Workaround by add a option to control the use of compact branch. Currently it's selected by CC_IS_CLANG and hopefully we can change it to a version check in future if clang manages to fix it. Fix boot on boston board. Link: https://github.com/llvm/llvm-project/issues/61045 Signed-off-by: Jiaxun Yang Acked-by: Nathan Chancellor Acked-by: Nick Desaulniers Signed-off-by: Thomas Bogendoerfer commit 70f864d1084734f8816a247c24e6876d2dfb5f89 Author: Sergio Paracuellos Date: Tue Feb 14 11:39:34 2023 +0100 mips: dts: ralink: mt7621: add phandle to system controller node for watchdog To allow to access system controller registers from watchdog driver code add a phandle in the watchdog 'wdt' node. This avoid using arch dependent operations in driver code. Reviewed-by: Arınç ÜNAL Signed-off-by: Sergio Paracuellos Acked-by: Guenter Roeck Signed-off-by: Thomas Bogendoerfer commit 79f76e574c3690261d6165f008b7054e54c6dca9 Author: Sergio Paracuellos Date: Tue Feb 14 11:39:33 2023 +0100 mips: dts: ralink: mt7621: rename watchdog node from 'wdt' into 'watchdog' Watchdog nodes must use 'watchdog' for node name. When a 'make dtbs_check' is performed the following warning appears: wdt@100: $nodename:0: 'wdt@100' does not match '^watchdog(@.*|-[0-9a-f])?$' Fix this warning up properly renaming the node into 'watchdog'. Reviewed-by: Arınç ÜNAL Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Sergio Paracuellos Acked-by: Guenter Roeck Signed-off-by: Thomas Bogendoerfer commit d25d01b4e59bde815df52a333f9b0f7558cc3281 Author: Nick Alcock Date: Tue Feb 28 13:02:01 2023 +0000 powercap: 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: Rafael J. Wysocki commit 5bd289f69bc145fa10927a6883502a0e7cbcb811 Author: Nick Alcock Date: Fri Feb 24 15:07:49 2023 +0000 cpufreq: intel_pstate: 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: Rafael J. Wysocki commit e32d546c483a2a0f607687f5b521c2a2f942ffbe Author: Mario Limonciello Date: Thu Feb 23 14:26:22 2023 -0600 ACPI: x86: Drop quirk for HP Elitebook There was a quirk in `acpi/x86/s2idle.c` for an HP Elitebook G9 platforms to force AMD GUID codepath instead of Microsoft codepath. This was due to a bug with WCN6855 WLAN firmware interaction with the system. This bug is fixed by WCN6855 firmware: WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23 Remove the quirk as it's no longer necessary with this firmware. Link: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=c7a57ef688f7d99d8338a5d8edddc8836ff0e6de Tested-by: Anson Tsao Signed-off-by: Mario Limonciello Signed-off-by: Rafael J. Wysocki commit e48223e36001980318ed886b2fdc1157009d280b Merge: 11d4e474861aa 18f51ed09888c Author: Mark Brown Date: Tue Feb 28 17:59:21 2023 +0000 ASoC: mt8183: Fixes from an initial glance at a Merge series from Mark Brown : This is a collection of fixes I came up after glancing through an initial test run with the snappily named Kukui Jacuzzi SKU16 Chromebook on KernelCI. There are more issues flagged, this is just what I fixed thus far. commit 11d4e474861aa3443e52251660e5928103380715 Merge: b201929904a59 c5682e2ba1327 Author: Mark Brown Date: Tue Feb 28 17:59:15 2023 +0000 ASoC: mchp-pdmc: fix poc noises when starting Merge series from Claudiu Beznea : To start capture on Microchip PDMC the enable bits for each supported microphone need to be set. After this bit is set the PDMC starts to receive data from microphones and it considers this data as valid data. Thus if microphones are not ready the PDMC captures anyway data from its lines. This data is interpreted by the human ear as poc noises. To avoid this the following software workaround need to be applied when starting capture: 1/ enable PDMC channel 2/ wait 150ms 3/ execute 16 dummy reads from RHR 4/ clear interrupts 5/ enable interrupts 6/ enable DMA channel For this workaround to work step 6 need to be executed at the end. For step 6 was added patch 1/3 from this series. With this, component DAI driver sets its struct snd_soc_component_driver::start_dma_last = 1 and proper action is taken based on this flag when starting DAI trigger vs DMA. commit b201929904a5907fa2d533b80fecd5666a239570 Merge: e3e3299316305 8cbd7273a724d Author: Mark Brown Date: Tue Feb 28 17:59:09 2023 +0000 ASoC: mt6358: Fixes from an initial glance at a Merge series from Mark Brown : This is a collection of fixes I came up after glancing through an initial test run with the snappily named Kukui Jacuzzi SKU16 Chromebook on KernelCI. There are more issues flagged, this is just what I fixed thus far. commit e3e32993163056f1c4715fee2dad77c632a2394e Merge: d52279d5c9204 ce40d93b062c0 Author: Mark Brown Date: Tue Feb 28 17:59:03 2023 +0000 ASoC: mt8192: Fixes from initial glance at kselftest Merge series from Mark Brown : This is a collection of fixes I came up after glancing through an initial test run with the Spherion Chromebook on KernelCI. There are more issues flagged, this is just what I fixed thus far - the volume controls on the MT6359 have issues for example, and a lot of controls aren't marked as Switches like they should be. commit f8502fba45bd30e1a6a354d9d898bc99d1a11e6d Author: Rijo Thomas Date: Tue Feb 28 15:11:20 2023 +0530 tee: amdtee: fix race condition in amdtee_open_session There is a potential race condition in amdtee_open_session that may lead to use-after-free. For instance, in amdtee_open_session() after sess->sess_mask is set, and before setting: sess->session_info[i] = session_info; if amdtee_close_session() closes this same session, then 'sess' data structure will be released, causing kernel panic when 'sess' is accessed within amdtee_open_session(). The solution is to set the bit sess->sess_mask as the last step in amdtee_open_session(). Fixes: 757cc3e9ff1d ("tee: add AMD-TEE driver") Cc: stable@vger.kernel.org Signed-off-by: Rijo Thomas Acked-by: Sumit Garg Signed-off-by: Jens Wiklander commit e492250d5252635b6c97d52eddf2792ec26f1ec1 Merge: b07ce43db665a cf70d01a62c71 Author: Linus Torvalds Date: Tue Feb 28 09:12:47 2023 -0800 Merge tag 'pwm/for-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm updates from Thierry Reding: "This rather small set of changes includes some minor fixes and improvements. The AB8500 driver gained support for reading the initial hardware state and the Synopsys DesignWare driver received some work to prepare for device tree and platform support" * tag 'pwm/for-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: pwm: dwc: Use devm_pwmchip_add() pwm: dwc: Move memory allocation to own function pwm: dwc: Change &pci->dev to dev in probe dt-bindings: pwm: Document Synopsys DesignWare snps,pwm-dw-apb-timers-pwm2 pwm: iqs620a: Replace one remaining instance of regmap_update_bits() pwm: ab8500: Implement .get_state() pwm: ab8500: Fix calculation of duty and period pwm: lp3943: Drop unused i2c include dt-bindings: pwm: mediatek: Convert pwm-mediatek to DT schema pwm: stm32-lp: fix the check on arr and cmp registers update pwm: Move pwm_capture() dummy to restore order pwm: sifive: Always let the first pwm_apply_state succeed commit b07ce43db665a6b5a622d5bb1447950d7e1e3fb1 Merge: ae3419fbac845 e3645d72f8865 Author: Linus Torvalds Date: Tue Feb 28 09:05:47 2023 -0800 Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 updates from Ted Ts'o: "Improve performance for ext4 by allowing multiple process to perform direct I/O writes to preallocated blocks by using a shared inode lock instead of taking an exclusive lock. In addition, multiple bug fixes and cleanups" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: fix incorrect options show of original mount_opt and extend mount_opt2 ext4: Fix possible corruption when moving a directory ext4: init error handle resource before init group descriptors ext4: fix task hung in ext4_xattr_delete_inode jbd2: fix data missing when reusing bh which is ready to be checkpointed ext4: update s_journal_inum if it changes after journal replay ext4: fail ext4_iget if special inode unallocated ext4: fix function prototype mismatch for ext4_feat_ktype ext4: remove unnecessary variable initialization ext4: fix inode tree inconsistency caused by ENOMEM ext4: refuse to create ea block when umounted ext4: optimize ea_inode block expansion ext4: remove dead code in updating backup sb ext4: dio take shared inode lock when overwriting preallocated blocks ext4: don't show commit interval if it is zero ext4: use ext4_fc_tl_mem in fast-commit replay path ext4: improve xattr consistency checking and error reporting commit 6934cf8a3e0b4a8318ce8f1342348e967e29192f Author: Heiko Stuebner Date: Wed Feb 8 23:53:28 2023 +0100 RISC-V: improve string-function assembly Adapt the suggestions for the assembly string functions that Andrew suggested but that I didn't manage to include into the series that got applied. This includes improvements to two comments, removal of unneeded labels and moving one instruction slightly higher to contradict an explanatory comment. Suggested-by: Andrew Jones Signed-off-by: Heiko Stuebner Reviewed-by: Andrew Jones Tested-by: Conor Dooley Link: https://lore.kernel.org/r/20230208225328.1636017-3-heiko@sntech.de Signed-off-by: Palmer Dabbelt commit d52279d5c9204a041e9ba02a66a353573b2f96e4 Author: Duc Anh Le Date: Tue Feb 28 00:49:21 2023 +0100 ASoC: amd: yc: Add DMI entries to support HP OMEN 16-n0xxx (8A43) This model requires an additional detection quirk to enable the internal microphone. Signed-off-by: Duc Anh Le Link: https://lore.kernel.org/r/20230227234921.7784-1-lub.the.studio@gmail.com Signed-off-by: Mark Brown commit 2449d436681d40bc63ec2c766fd51b632270d8a7 Author: Krishna Yarlagadda Date: Tue Feb 28 01:34:28 2023 +0530 spi: tegra210-quad: Fix iterator outside loop Fix warn: iterator used outside loop: 'xfer'. 'xfer' variable contain invalid value in few conditions. Complete transfer within DATA phase in successful case and at the end for failed transfer. Reported-by: Dan Carpenter Link:https://lore.kernel.org/all/202210191211.46FkzKmv-lkp@intel.com/ Fixes: 8777dd9dff40 ("spi: tegra210-quad: Fix combined sequence") Signed-off-by: Krishna Yarlagadda Link: https://lore.kernel.org/r/20230227200428.45832-1-kyarlagadda@nvidia.com Signed-off-by: Mark Brown commit 0de2cc3707b6b6e2ad40bd24ce09a5c1f65d01e1 Author: Arnd Bergmann Date: Mon Feb 27 09:58:26 2023 +0100 ASoC: zl38060 add gpiolib dependency Without gpiolib, this driver fails to link: arm-linux-gnueabi-ld: sound/soc/codecs/zl38060.o: in function `chip_gpio_get': zl38060.c:(.text+0x30): undefined reference to `gpiochip_get_data' arm-linux-gnueabi-ld: sound/soc/codecs/zl38060.o: in function `zl38_spi_probe': zl38060.c:(.text+0xa18): undefined reference to `devm_gpiochip_add_data_with_key' This appears to have been in the driver since the start, but is hard to hit in randconfig testing since gpiolib is almost always selected by something else. Fixes: 52e8a94baf90 ("ASoC: Add initial ZL38060 driver") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230227085850.2503725-1-arnd@kernel.org Signed-off-by: Mark Brown commit c769fb6bcc485d752d492064a9005525a8d5fa24 Author: Mark Brown Date: Sat Feb 25 21:48:13 2023 +0000 ASoC: sam9g20ek: Disable capture unless building with microphone input Without modification the AT91SAM9G20-EK has no capture support, none of the inputs of the CODEC are wired to anything to useful and there are no paths supporting loopback. Since the audio is clocked from the CODEC and the DAPM inputs are marked as unusable this means that capture will fail to transfer any data as the ADC path can't be powered up. Flag this in the device description so apps don't see unusable capture support, guarded with the existing optional define for mic input. Reviewed-by: Claudiu Beznea Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230225-asoc-sam9g20ek-v1-1-9baeb4893142@kernel.org Signed-off-by: Mark Brown commit ce40d93b062c0bdcd29218c12ab1dba544382dd8 Author: Mark Brown Date: Fri Feb 24 14:03:58 2023 +0000 ASoC: mt8192: Fix range for sidetone positive gain The Sidetone_Positive_Gain_dB control reports a range of 0..100 as valid but the put() function rejects anything larger than 24. Fix this. There are numerous other problems with this control, the name is very non idiomatic and it should be a TLV, but it's ABI so probably we should leave those alone. Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230223-asoc-mt8192-quick-fixes-v1-4-9a85f90368e1@kernel.org Signed-off-by: Mark Brown commit 05437a91173b8780692ac35313f98cac68be7c42 Author: Mark Brown Date: Fri Feb 24 14:03:57 2023 +0000 ASoC: mt8192: Report an error if when an invalid sidetone gain is written Reporting an error on invalid values is optional but helpful to userspace so do so. Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230223-asoc-mt8192-quick-fixes-v1-3-9a85f90368e1@kernel.org Signed-off-by: Mark Brown commit b373076f609993d333dbbc3283b65320c7a41834 Author: Mark Brown Date: Fri Feb 24 14:03:56 2023 +0000 ASoC: mt8192: Fix event generation for controls ALSA controls put() operations should return 1 if the value changed and 0 if it remains the same, fix the mt8192 driver to do so. Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230223-asoc-mt8192-quick-fixes-v1-2-9a85f90368e1@kernel.org Signed-off-by: Mark Brown commit 5df1a5d28449f2b98ff84f69dea74b06f9b8e362 Author: Mark Brown Date: Fri Feb 24 14:03:55 2023 +0000 ASoC: mt8192: Remove spammy log messages There are a lot of info level log messages in the mt8192 ADDA driver which are trivially triggerable from userspace, many in normal operation. Remove these to avoid spamming the console. Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230223-asoc-mt8192-quick-fixes-v1-1-9a85f90368e1@kernel.org Signed-off-by: Mark Brown commit c5682e2ba1327d08987a7cabc7b5b40bf3bc131f Author: Claudiu Beznea Date: Tue Feb 28 13:01:45 2023 +0200 ASoC: mchp-pdmc: fix poc noise at capture startup Microchip PDMC IP doesn't filter microphone noises on startup. By default, it captures data received from digital microphones after the MCHP_PDMC_MR.EN bits are set. Thus when enable is set on PDMC side the digital microphones might not be ready yet and PDMC captures data from then in this time. This data captured is poc noise. To avoid this the software workaround is to the following: 1/ enable PDMC channel 2/ wait 150ms (on SAMA7G5-EK setup) 3/ execute 16 dummy reads from RHR 4/ clear interrupts 5/ enable interrupts 6/ enable DMA channel Fixes: 50291652af52 ("ASoC: atmel: mchp-pdmc: add PDMC driver") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230228110145.3770525-4-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit 143a2f011c4471511887807822d3fd71f25f5169 Author: Claudiu Beznea Date: Tue Feb 28 13:01:44 2023 +0200 ASoC: dt-bindings: sama7g5-pdmc: add microchip,startup-delay-us binding PDMC can work with different types of microphones, thus different boards could have different microphones. Depending on microphone type the PDMC would need to wait longer or shorter period (at startup) than the default chosen one to filter unwanted noise. Thus add microchip,startup-delay-us binding to let PDMC users to specify startup delay. Signed-off-by: Claudiu Beznea Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230228110145.3770525-3-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit 54fc4b72b630e1cb92a21140084c6852babbb234 Author: Claudiu Beznea Date: Tue Feb 28 13:01:43 2023 +0200 ASoC: soc-pcm: add option to start DMA after DAI Add option to start DMA component after DAI trigger. This is done by filling the new struct snd_soc_component_driver::start_dma_last. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230228110145.3770525-2-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit 18f51ed09888c8e48bd377d1715d4ff807b4c805 Author: Mark Brown Date: Sun Feb 26 12:49:57 2023 +0000 ASoC: mt8183: Fix event generation for I2S DAI operations ALSA control put() operations should return 0 if the value changed so that events can be generated appropriately for userspace but the custom control in the MT8183 I2S DAI driver doesn't do that, fix it. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230224-asoc-mt8183-quick-fixes-v1-2-041f29419ed5@kernel.org Signed-off-by: Mark Brown commit d71ed1c8f0f458ae6852fdab055790fe1d9d19b6 Author: Mark Brown Date: Sun Feb 26 12:49:56 2023 +0000 ASoC: mt8183: Remove spammy logging from I2S DAI driver There is a lot of dev_info() logging in normal operation in the I2S DAI driver, remove it to avoid spamming the console. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230224-asoc-mt8183-quick-fixes-v1-1-041f29419ed5@kernel.org Signed-off-by: Mark Brown commit 8cbd7273a724d4e9615b26d696bb1221a8a48e4c Author: Mark Brown Date: Sun Feb 26 12:47:58 2023 +0000 ASoC: mt6358: Remove undefined HPx Mux enumeration values The HPx Mux enumerations define values 5, 6 and 7 but describe them as "undefined" and map them to the value 0 on writing. Given the descriptions and behaviour it seems that these values are invalid and should not be present in the register, the current behaviour is detected as problematic by mixer-test: # # HPL Mux.0 expected 5 but read 0, is_volatile 0 # # HPL Mux.0 expected 6 but read 0, is_volatile 0 # # HPL Mux.0 expected 7 but read 0, is_volatile 0 Remove the values from the enumeration, this will prevent userspace setting them. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230224-asoc-mt6358-quick-fixes-v1-3-747d9186be4b@kernel.org Signed-off-by: Mark Brown commit 8e847a43c28fca0aaa11fba8f91da7dfd9d6936f Author: Mark Brown Date: Sun Feb 26 12:47:57 2023 +0000 ASoC: mt6358: Validate Wake on Voice 2 writes Currently the Wake on Voice 2 control accepts and stores any value written but it reports that only 0 and 1 are valid values. Reject any out of range values written by userspace. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230224-asoc-mt6358-quick-fixes-v1-2-747d9186be4b@kernel.org Signed-off-by: Mark Brown commit 3425ddaea57af77ca96a59a5b8eaa2f9e1b021ba Author: Mark Brown Date: Sun Feb 26 12:47:56 2023 +0000 ASoC: mt6358: Fix event generation for wake on voice stage 2 switch ALSA control put() operations should return 0 if the value changed so that events can be generated appropriately for userspace but the custom control for wake on voice stage 2 doesn't do this, fix it. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230224-asoc-mt6358-quick-fixes-v1-1-747d9186be4b@kernel.org Signed-off-by: Mark Brown commit 26a57cb35548ae67c14871cccbf50da3edb01ea4 Author: Daniel Wagner Date: Tue Feb 21 17:51:06 2023 +0100 nvme-fabrics: show well known discovery name The kernel always logs the unique subsystem name for a discovery controller, even in the case user space asked for the well known. This has lead to confusion as the logs of nvme-cli and the kernel logs didn't match. First, nvme-cli connects to the well known discovery controller to figure out if it supports TP8013. If so then nvme-cli disconnects and connects to the unique discovery controller. Currently, the kernel show that user space connected twice to the unique one. To avoid further confusion, show the well known discovery controller if user space asked for it: $ nvme connect-all -v -t tcp -a 192.168.0.1 nvme0: nqn.2014-08.org.nvmexpress.discovery connected nvme0: nqn.2014-08.org.nvmexpress.discovery disconnected nvme0: nqn.discovery connected kernel log: nvme nvme0: new ctrl: NQN "nqn.2014-08.org.nvmexpress.discovery", addr 192.168.0.1:8009 nvme nvme0: Removing ctrl: NQN "nqn.2014-08.org.nvmexpress.discovery" nvme nvme0: new ctrl: NQN "nqn.discovery", addr 192.168.0.1:8009 Fixes: e5ea42faa773 ("nvme: display correct subsystem NQN") Signed-off-by: Daniel Wagner Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit 76d54bf20cdcc1ed7569a89885e09636e9a8d71d Author: Akinobu Mita Date: Sun Feb 26 21:42:54 2023 +0900 nvme-tcp: don't access released socket during error recovery While the error recovery work is temporarily failing reconnect attempts, running the 'nvme list' command causes a kernel NULL pointer dereference by calling getsockname() with a released socket. During error recovery work, the nvme tcp socket is released and a new one created, so it is not safe to access the socket without proper check. Signed-off-by: Akinobu Mita Fixes: 02c57a82c008 ("nvme-tcp: print actual source IP address through sysfs "address" attr") Reviewed-by: Martin Belanger Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit 51d24f701f453c18cb5f4596d8bbe8034e5d3fb4 Author: Dan Carpenter Date: Thu Feb 16 15:14:49 2023 +0300 nvme-auth: fix an error code in nvme_auth_process_dhchap_challenge() This function was transitioned from returning NVMe status codes to returning traditional kernel error codes. However, this particular return now accidentally returns positive error codes like ENOMEM instead of negative -ENOMEM. Fixes: b0ef1b11d390 ("nvme-auth: don't use NVMe status codes") Signed-off-by: Dan Carpenter Signed-off-by: Christoph Hellwig commit 0dd6fff2aad4e35633fef1ea72838bec5b47559a Author: Christoph Hellwig Date: Tue Feb 21 14:02:25 2023 -0800 nvme: bring back auto-removal of deleted namespaces during sequential scan Bring back the check of the Identify Namespace return value for the legacy NVMe 1.0-style sequential scanning. While NVMe 1.0 does not support namespace management, there are "modern" cloud solutions like Google Cloud Platform that claim the obsolete 1.0 compliance for no good reason while supporting proprietary sideband namespace management. Fixes: 1a893c2bfef4 ("nvme: refactor namespace probing") Reported-by: Nils Hanke Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Tested-by: Nils Hanke commit 54aa7f2330b82884f4a1afce0220add6e8312f8b Author: Joseph Qi Date: Tue Feb 28 12:54:59 2023 +0800 io_uring: fix fget leak when fs don't support nowait buffered read Heming reported a BUG when using io_uring doing link-cp on ocfs2. [1] Do the following steps can reproduce this BUG: mount -t ocfs2 /dev/vdc /mnt/ocfs2 cp testfile /mnt/ocfs2/ ./link-cp /mnt/ocfs2/testfile /mnt/ocfs2/testfile.1 umount /mnt/ocfs2 Then umount will fail, and it outputs: umount: /mnt/ocfs2: target is busy. While tracing umount, it blames mnt_get_count() not return as expected. Do a deep investigation for fget()/fput() on related code flow, I've finally found that fget() leaks since ocfs2 doesn't support nowait buffered read. io_issue_sqe |-io_assign_file // do fget() first |-io_read |-io_iter_do_read |-ocfs2_file_read_iter // return -EOPNOTSUPP |-kiocb_done |-io_rw_done |-__io_complete_rw_common // set REQ_F_REISSUE |-io_resubmit_prep |-io_req_prep_async // override req->file, leak happens This was introduced by commit a196c78b5443 in v5.18. Fix it by don't re-assign req->file if it has already been assigned. [1] https://lore.kernel.org/ocfs2-devel/ab580a75-91c8-d68a-3455-40361be1bfa8@linux.alibaba.com/T/#t Fixes: a196c78b5443 ("io_uring: assign non-fixed early for async work") Cc: Reported-by: Heming Zhao Signed-off-by: Joseph Qi Cc: Xiaoguang Wang Link: https://lore.kernel.org/r/20230228045459.13524-1-joseph.qi@linux.alibaba.com Signed-off-by: Jens Axboe commit e33b93650fc5364f773985a3e961e24349330d97 Author: Breno Leitao Date: Tue Feb 28 03:16:54 2023 -0800 blk-iocost: Pass gendisk to ioc_refresh_params Current kernel (d2980d8d826554fa6981d621e569a453787472f8) crashes when blk_iocost_init for `nvme1` disk. BUG: kernel NULL pointer dereference, address: 0000000000000050 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page blk_iocost_init (include/asm-generic/qspinlock.h:128 include/linux/spinlock.h:203 include/linux/spinlock_api_smp.h:158 include/linux/spinlock.h:400 block/blk-iocost.c:2884) ioc_qos_write (block/blk-iocost.c:3198) ? kretprobe_perf_func (kernel/trace/trace_kprobe.c:1566) ? kernfs_fop_write_iter (include/linux/slab.h:584 fs/kernfs/file.c:311) ? __kmem_cache_alloc_node (mm/slab.h:? mm/slub.c:3452 mm/slub.c:3491) ? _copy_from_iter (arch/x86/include/asm/uaccess_64.h:46 arch/x86/include/asm/uaccess_64.h:52 lib/iov_iter.c:183 lib/iov_iter.c:628) ? kretprobe_dispatcher (kernel/trace/trace_kprobe.c:1693) cgroup_file_write (kernel/cgroup/cgroup.c:4061) kernfs_fop_write_iter (fs/kernfs/file.c:334) vfs_write (include/linux/fs.h:1849 fs/read_write.c:491 fs/read_write.c:584) ksys_write (fs/read_write.c:637) 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) This happens because ioc_refresh_params() is being called without a properly initialized ioc->rqos, which is happening later in the callee side. ioc_refresh_params() -> ioc_autop_idx() tries to access ioc->rqos.disk->queue but ioc->rqos.disk is NULL, causing the BUG above. Create function, called ioc_refresh_params_disk(), that is similar to ioc_refresh_params() but where the "struct gendisk" could be passed as an explicit argument. This function will be called when ioc->rqos.disk is not initialized. Fixes: ce57b558604e ("blk-rq-qos: make rq_qos_add and rq_qos_del more useful") Signed-off-by: Breno Leitao Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230228111654.1778120-1-leitao@debian.org Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 9b5c37bbf659fe4edb4804bc0aa99840d6798878 Author: Vasily Gorbik Date: Wed Sep 16 13:00:18 2020 +0200 s390/decompressor: add link map saving Produce arch/s390/boot/vmlinux.map link map for the decompressor, when CONFIG_VMLINUX_MAP option is enabled. Link map is quite useful during making kernel changes related to how the decompressor is composed and debugging linker scripts. Acked-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit e688c6255b742428ea8fa7e4fb8181a6135205e9 Author: Heiko Carstens Date: Mon Feb 27 18:56:10 2023 +0100 s390/smp: perform cpu reset before delegating work to target cpu Clear CPU state (e.g. all TLB entries, prefetched instructions, etc.) of the target CPU, however without clearing register contents before starting any work on it. This puts the target CPU in a more defined state compared to the current Stop + Restart sigp orders. Signed-off-by: Heiko Carstens commit e7ec1d2eac9cad57ff615ef6cc3e324ab7238b82 Author: Alexander Gordeev Date: Sat Dec 17 11:01:16 2022 +0100 s390/mcck: cleanup user process termination path If a machine check interrupt hits while user process is running __s390_handle_mcck() helper function is called directly from the interrupt handler and terminates the current process by calling make_task_dead() routine. The make_task_dead() is not allowed to be called from interrupt context which forces the machine check handler switch to the kernel stack and enable local interrupts first. The __s390_handle_mcck() could also be called to service pending work, but this time from the external interrupts handler. It is the machine check handler that establishes the work and schedules the external interrupt, therefore the machine check interrupt itself should be disabled while reading out the corresponding variable: local_mcck_disable(); mcck = *this_cpu_ptr(&cpu_mcck); memset(this_cpu_ptr(&cpu_mcck), 0, sizeof(mcck)); local_mcck_enable(); However, local_mcck_disable() does not have effect when __s390_handle_mcck() is called directly form the machine check handler, since the machine check interrupt is still disabled. Therefore, it is not the opening bracket to the following local_mcck_enable() function. Simplify the user process termination flow by scheduling the external interrupt and killing the affected process from the interrupt context. Assume a kernel-generated signal is always delivered and ignore a value returned by do_send_sig_info() funciton. Reviewed-by: Heiko Carstens Reviewed-by: Sven Schnelle Signed-off-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit 5e02c74905cb00184b6c5ae70b1c1bfae5b3bd17 Author: Heiko Carstens Date: Fri Feb 24 11:02:37 2023 +0100 s390/cpum_sf: use READ_ONCE_ALIGNED_128() instead of 128-bit cmpxchg Use READ_ONCE_ALIGNED_128() to read the previous value in front of a 128-bit cmpxchg loop, instead of (mis-)using a 128-bit cmpxchg operation to do the same. This makes the code more readable and is faster. Link: https://lore.kernel.org/r/20230224100237.3247871-3-hca@linux.ibm.com Signed-off-by: Heiko Carstens commit 434b26605f6cc500c1a995587e5c4bc4bc1693c6 Author: Heiko Carstens Date: Fri Feb 24 11:02:36 2023 +0100 s390/rwonce: add READ_ONCE_ALIGNED_128() macro Add an s390 specific READ_ONCE_ALIGNED_128() helper, which can be used for fast block concurrent (atomic) 128-bit accesses. The used lpq instruction requires 128-bit alignment. This is also the reason why the compiler doesn't emit this instruction if __READ_ONCE() is used for 128-bit accesses. Link: https://lore.kernel.org/r/20230224100237.3247871-2-hca@linux.ibm.com Signed-off-by: Heiko Carstens commit 8f9850dd8d23c1290cb642ce9548a440da5771ec Author: Dan Carpenter Date: Mon Feb 27 13:03:22 2023 +0300 net: phy: unlock on error in phy_probe() If genphy_c45_read_eee_adv() fails then we need to do a reset and unlock the &phydev->lock mutex before returning. Fixes: 3eeca4e199ce ("net: phy: do not force EEE support") Signed-off-by: Dan Carpenter Reviewed-by: Oleksij Rempel Link: https://lore.kernel.org/r/Y/x/6kHCjnQHqOpF@kili Signed-off-by: Paolo Abeni commit 010338d729c1090036eb40d2a60b7b7bce2445b8 Author: Ard Biesheuvel Date: Thu Feb 23 21:41:01 2023 +0100 arm64: kaslr: don't pretend KASLR is enabled if offset < MIN_KIMG_ALIGN Our virtual KASLR displacement is a randomly chosen multiple of 2 MiB plus an offset that is equal to the physical placement modulo 2 MiB. This arrangement ensures that we can always use 2 MiB block mappings (or contiguous PTE mappings for 16k or 64k pages) to map the kernel. This means that a KASLR offset of less than 2 MiB is simply the product of this physical displacement, and no randomization has actually taken place. Currently, we use 'kaslr_offset() > 0' to decide whether or not randomization has occurred, and so we misidentify this case. If the kernel image placement is not randomized, modules are allocated from a dedicated region below the kernel mapping, which is only used for modules and not for other vmalloc() or vmap() calls. When randomization is enabled, the kernel image is vmap()'ed randomly inside the vmalloc region, and modules are allocated in the vicinity of this mapping to ensure that relative references are always in range. However, unlike the dedicated module region below the vmalloc region, this region is not reserved exclusively for modules, and so ordinary vmalloc() calls may end up overlapping with it. This should rarely happen, given that vmalloc allocates bottom up, although it cannot be ruled out entirely. The misidentified case results in a placement of the kernel image within 2 MiB of its default address. However, the logic that randomizes the module region is still invoked, and this could result in the module region overlapping with the start of the vmalloc region, instead of using the dedicated region below it. If this happens, a single large vmalloc() or vmap() call will use up the entire region, and leave no space for loading modules after that. Since commit 82046702e288 ("efi/libstub/arm64: Replace 'preferred' offset with alignment check"), this is much more likely to occur on systems that boot via EFI but lack an implementation of the EFI RNG protocol, as in that case, the EFI stub will decide to leave the image where it found it, and the EFI firmware uses 64k alignment only. Fix this, by correctly identifying the case where the virtual displacement is a result of the physical displacement only. Signed-off-by: Ard Biesheuvel Reviewed-by: Mark Brown Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20230223204101.1500373-1-ardb@kernel.org Signed-off-by: Catalin Marinas commit d5c514b6a0c0b77ed7e5ef2484e8b20eb09c5f27 Author: Yuezhang Mo Date: Fri Feb 10 13:33:44 2023 +0800 exfat: fix the newly allocated clusters are not freed in error handling In error handling 'free_cluster', before num_alloc clusters allocated, p_chain->size will not updated and always 0, thus the newly allocated clusters are not freed. Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon commit 3ce937cb8ca9becec406611c6072e93030fdde76 Author: Yuezhang Mo Date: Thu Feb 9 17:44:50 2023 +0800 exfat: don't print error log in normal case When allocating a new cluster, exFAT first allocates from the next cluster of the last cluster of the file. If the last cluster of the file is the last cluster of the volume, allocate from the first cluster. This is a normal case, but the following error log will be printed. It makes users confused, so this commit removes the error log. [1960905.181545] exFAT-fs (sdb1): hint_cluster is invalid (262130) Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon commit 8d2909eeca5ef41f64365f700b1fdde361086609 Author: Yuezhang Mo Date: Mon Feb 6 18:25:20 2023 +0800 exfat: remove unneeded code from exfat_alloc_cluster() In the removed code, num_clusters is 0, nothing is done in exfat_chain_cont_cluster(), so it is unneeded, remove it. Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon commit 11f180a5d62a51b484e9648f9b310e1bd50b1a57 Author: Kang Chen Date: Mon Feb 27 17:30:37 2023 +0800 nfc: fdp: add null check of devm_kmalloc_array in fdp_nci_i2c_read_device_properties devm_kmalloc_array may fails, *fw_vsc_cfg might be null and cause out-of-bounds write in device_property_read_u8_array later. Fixes: a06347c04c13 ("NFC: Add Intel Fields Peak NFC solution driver") Signed-off-by: Kang Chen Reviewed-by: Krzysztof Kozlowski Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230227093037.907654-1-void0red@gmail.com Signed-off-by: Paolo Abeni commit f99e6d7c4ed3be2531bd576425a5bd07fb133bd7 Author: Rafał Miłecki Date: Mon Feb 27 10:11:56 2023 +0100 bgmac: fix *initial* chip reset to support BCM5358 While bringing hardware up we should perform a full reset including the switch bit (BGMAC_BCMA_IOCTL_SW_RESET aka SICF_SWRST). It's what specification says and what reference driver does. This seems to be critical for the BCM5358. Without this hardware doesn't get initialized properly and doesn't seem to transmit or receive any packets. Originally bgmac was calling bgmac_chip_reset() before setting "has_robosw" property which resulted in expected behaviour. That has changed as a side effect of adding platform device support which regressed BCM5358 support. Fixes: f6a95a24957a ("net: ethernet: bgmac: Add platform device support") Cc: Jon Mason Signed-off-by: Rafał Miłecki Reviewed-by: Leon Romanovsky Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20230227091156.19509-1-zajec5@gmail.com Signed-off-by: Paolo Abeni commit b3f11af9b2ce14d4662753d097a21e1d37a06fda Author: Mark Rutland Date: Mon Feb 27 11:58:19 2023 +0000 arm64: ftrace: forbid CALL_OPS with CC_OPTIMIZE_FOR_SIZE Florian reports that when building with CONFIG_CC_OPTIMIZE_FOR_SIZE=y, he sees "Misaligned patch-site" warnings at boot, e.g. | Misaligned patch-site bcm2836_arm_irqchip_handle_irq+0x0/0x88 | WARNING: CPU: 0 PID: 0 at arch/arm64/kernel/ftrace.c:120 ftrace_call_adjust+0x4c/0x70 This is because GCC will silently ignore `-falign-functions=N` when passed `-Os`, resulting in functions not being aligned as we expect. This is a known issue, and to account for this we modified the kernel to avoid `-Os` generally. Unfortunately we forgot to account for CONFIG_CC_OPTIMIZE_FOR_SIZE. Forbid the use of CALL_OPS with CONFIG_CC_OPTIMIZE_FOR_SIZE=y to prevent this issue. All exising ftrace features will work as before, though without the performance benefit of CALL_OPS. Reported-by: Florian Fainelli Link: http://lore.kernel.org/linux-arm-kernel/2d9284c3-3805-402b-5423-520ced56d047@gmail.com Signed-off-by: Mark Rutland Cc: Marc Zyngier Cc: Stefan Wahren Cc: Steven Rostedt Cc: Will Deacon Tested-by: Florian Fainelli Link: https://lore.kernel.org/r/20230227115819.365630-1-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 047a754558d640eaa080fce3b22ca9f3d4e04626 Author: Asahi Lina Date: Mon Feb 27 18:04:21 2023 +0900 drm/shmem-helper: Revert accidental non-GPL export The referenced commit added a wrapper for drm_gem_shmem_get_pages_sgt(), but in the process it accidentally changed the export type from GPL to non-GPL. Switch it back to GPL. Reported-by: Dmitry Osipenko Fixes: ddddedaa0db9 ("drm/shmem-helper: Fix locking for drm_gem_shmem_get_pages_sgt()") Signed-off-by: Asahi Lina Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230227-shmem-export-fix-v1-1-8880b2c25e81@asahilina.net commit c176060a4c76ed0043cb9c10435af04ed1ad0560 Author: Nathan Chancellor Date: Fri Feb 24 10:25:12 2023 -0700 drm: omapdrm: Do not use helper unininitialized in omap_fbdev_init() Clang warns (or errors with CONFIG_WERROR): ../drivers/gpu/drm/omapdrm/omap_fbdev.c:235:6: error: variable 'helper' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (!fbdev) ^~~~~~ ../drivers/gpu/drm/omapdrm/omap_fbdev.c:259:26: note: uninitialized use occurs here drm_fb_helper_unprepare(helper); ^~~~~~ ../drivers/gpu/drm/omapdrm/omap_fbdev.c:235:2: note: remove the 'if' if its condition is always false if (!fbdev) ^~~~~~~~~~~ ../drivers/gpu/drm/omapdrm/omap_fbdev.c:228:30: note: initialize the variable 'helper' to silence this warning struct drm_fb_helper *helper; ^ = NULL 1 error generated. Return early, as there is nothing for the function to do if memory cannot be allocated. There is no point in adding another label to just emit the warning at the end of the function in this case, as memory allocation failures are already logged. Fixes: 3fb1f62f80a1 ("drm/fb-helper: Remove drm_fb_helper_unprepare() from drm_fb_helper_fini()") Link: https://github.com/ClangBuiltLinux/linux/issues/1809 Link: https://lore.kernel.org/oe-kbuild-all/202302250058.fYTe9aTP-lkp@intel.com/ Reported-by: kernel test robot Signed-off-by: Nathan Chancellor Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230224-omapdrm-wsometimes-uninitialized-v1-1-3fec8906ee3a@kernel.org commit 660ca9470f9c613fa2c71a123a9469c80a697ee4 Author: Herbert Xu Date: Mon Feb 27 16:25:58 2023 +0800 crypto: caam - Fix edesc/iv ordering mixup The attempt to add DMA alignment padding by moving IV to the front of edesc was completely broken as it didn't change the places where edesc was freed. It's also wrong as the IV may still share a cache-line with the edesc. Fix this by restoring the original layout and simply reserving enough memmory so that the IV is on a DMA cache-line by itself. Reported-by: Meenakshi Aggarwal Fixes: 199354d7fb6e ("crypto: caam - Remove GFP_DMA and add DMA alignment padding") Signed-off-by: Herbert Xu commit 77bc762451c2dc72bdbea07b857c916c9e7f4952 Author: Dan Carpenter Date: Mon Feb 27 13:33:30 2023 +0300 fbdev: chipsfb: Fix error codes in chipsfb_pci_init() The error codes are not set on these error paths. Fixes: 145eed48de27 ("fbdev: Remove conflicting devices on PCI bus") Signed-off-by: Dan Carpenter Reviewed-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/Y/yG+sm2mhdJeTZW@kili commit f8b2336f15f3bc30e37ce5c052cde5b6319bb6df Author: Michael Ellerman Date: Wed Feb 22 00:03:31 2023 +1100 powerpc: Avoid dead code/data elimination when using recordmcount Although powerpc now has objtool mcount support, it's not enabled in all configurations due to dependencies. On those configurations, with some linkers (binutils 2.37 at least), it's still possible to hit the dreaded "recordmcount bug", eg. errors such as: CC kernel/kexec_file.o Cannot find symbol for section 10: .text.unlikely. kernel/kexec_file.o: failed make[1]: *** [scripts/Makefile.build:287 : kernel/kexec_file.o] Error 1 Those errors are much more prevalent when building with CONFIG_LD_DEAD_CODE_DATA_ELIMINATION, because it places every function in a separate section. CONFIG_LD_DEAD_CODE_DATA_ELIMINATION is marked experimental and is not enabled in any powerpc defconfigs or by major distros. Although it does have at least some users on 32-bit where kernel size tends to be more important. Avoid the build errors by blocking CONFIG_LD_DEAD_CODE_DATA_ELIMINATION when the build is using recordmcount, rather than objtool. In practice that means for 64-bit big endian builds, or 64-bit clang builds - both because they lack CONFIG_MPROFILE_KERNEL. On 32-bit objtool is always used, so CONFIG_LD_DEAD_CODE_DATA_ELIMINATION is still available there. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230221130331.2714199-1-mpe@ellerman.id.au commit acd35dbab871d61021284ff06daccdc0ebb51e61 Author: Michael Ellerman Date: Wed Feb 22 17:00:37 2023 +1100 powerpc/vmlinux.lds: Add .text.asan/tsan sections When KASAN/KCSAN are enabled clang generates .text.asan/tsan sections. Because they are not mentioned in the linker script warnings are generated, and when orphan handling is set to error that becomes a build error, eg: ld.lld: error: vmlinux.a(init/main.o):(.text.tsan.module_ctor) is being placed in '.text.tsan.module_ctor' ld.lld: error: vmlinux.a(init/version.o):(.text.tsan.module_ctor) is being placed in '.text.tsan.module_ctor' Fix it by adding the sections to our linker script, similar to the generic change made in 848378812e40 ("vmlinux.lds.h: Handle clang's module.{c,d}tor sections"). Reviewed-by: Nathan Chancellor Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230222060037.2897169-1-mpe@ellerman.id.au commit d8c32853ebc4f3a49f1658ddfe0a9a42e19fc658 Author: Michael Ellerman Date: Tue Feb 21 21:19:52 2023 +1100 powerpc: Drop orphaned VAS MAINTAINERS entry The MAINTAINERS entry for VAS (Virtual Accelerator Switchboard) no longer has any maintainers, it just points to linuxppc-dev, since commit 60496069d0ae ("powerpc: Update MAINTAINERS for ibmvnic and VAS"). So just drop the VAS entry, all the paths are already covered by the main powerpc entry, ie. the output of get_maintainer.pl is unchanged. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230221101952.2697101-1-mpe@ellerman.id.au commit ae3419fbac845b4d3f3a9fae4cc80c68d82cdf6e Author: Thomas Weißschuh Date: Mon Feb 20 06:46:12 2023 +0000 vc_screen: don't clobber return value in vcs_read Commit 226fae124b2d ("vc_screen: move load of struct vc_data pointer in vcs_read() to avoid UAF") moved the call to vcs_vc() into the loop. While doing this it also moved the unconditional assignment of ret = -ENXIO; This unconditional assignment was valid outside the loop but within it it clobbers the actual value of ret. To avoid this only assign "ret = -ENXIO" when actually needed. [ Also, the 'goto unlock_out" needs to be just a "break", so that it does the right thing when it exits on later iterations when partial success has happened - Linus ] Reported-by: Storm Dragon Link: https://lore.kernel.org/lkml/Y%2FKS6vdql2pIsCiI@hotmail.com/ Fixes: 226fae124b2d ("vc_screen: move load of struct vc_data pointer in vcs_read() to avoid UAF") Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/lkml/64981d94-d00c-4b31-9063-43ad0a384bde@t-8ch.de/ Signed-off-by: Linus Torvalds commit 236b9254f8d1edc273ad88b420aa85fbd84f492d Author: Heming Zhao via Ocfs2-devel Date: Mon Feb 20 13:05:26 2023 +0800 ocfs2: fix non-auto defrag path not working issue This fixes three issues on move extents ioctl without auto defrag: a) In ocfs2_find_victim_alloc_group(), we have to convert bits to block first in case of global bitmap. b) In ocfs2_probe_alloc_group(), when finding enough bits in block group bitmap, we have to back off move_len to start pos as well, otherwise it may corrupt filesystem. c) In ocfs2_ioctl_move_extents(), set me_threshold both for non-auto and auto defrag paths. Otherwise it will set move_max_hop to 0 and finally cause unexpectedly ENOSPC error. Currently there are no tools triggering the above issues since defragfs.ocfs2 enables auto defrag by default. Tested with manually changing defragfs.ocfs2 to run non auto defrag path. Link: https://lkml.kernel.org/r/20230220050526.22020-1-heming.zhao@suse.com Signed-off-by: Heming Zhao Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Cc: Signed-off-by: Andrew Morton commit 60eed1e3d45045623e46944ebc7c42c30a4350f0 Author: Heming Zhao via Ocfs2-devel Date: Fri Feb 17 08:37:17 2023 +0800 ocfs2: fix defrag path triggering jbd2 ASSERT code path: ocfs2_ioctl_move_extents ocfs2_move_extents ocfs2_defrag_extent __ocfs2_move_extent + ocfs2_journal_access_di + ocfs2_split_extent //sub-paths call jbd2_journal_restart + ocfs2_journal_dirty //crash by jbs2 ASSERT crash stacks: PID: 11297 TASK: ffff974a676dcd00 CPU: 67 COMMAND: "defragfs.ocfs2" #0 [ffffb25d8dad3900] machine_kexec at ffffffff8386fe01 #1 [ffffb25d8dad3958] __crash_kexec at ffffffff8395959d #2 [ffffb25d8dad3a20] crash_kexec at ffffffff8395a45d #3 [ffffb25d8dad3a38] oops_end at ffffffff83836d3f #4 [ffffb25d8dad3a58] do_trap at ffffffff83833205 #5 [ffffb25d8dad3aa0] do_invalid_op at ffffffff83833aa6 #6 [ffffb25d8dad3ac0] invalid_op at ffffffff84200d18 [exception RIP: jbd2_journal_dirty_metadata+0x2ba] RIP: ffffffffc09ca54a RSP: ffffb25d8dad3b70 RFLAGS: 00010207 RAX: 0000000000000000 RBX: ffff9706eedc5248 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffff97337029ea28 RDI: ffff9706eedc5250 RBP: ffff9703c3520200 R8: 000000000f46b0b2 R9: 0000000000000000 R10: 0000000000000001 R11: 00000001000000fe R12: ffff97337029ea28 R13: 0000000000000000 R14: ffff9703de59bf60 R15: ffff9706eedc5250 ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018 #7 [ffffb25d8dad3ba8] ocfs2_journal_dirty at ffffffffc137fb95 [ocfs2] #8 [ffffb25d8dad3be8] __ocfs2_move_extent at ffffffffc139a950 [ocfs2] #9 [ffffb25d8dad3c80] ocfs2_defrag_extent at ffffffffc139b2d2 [ocfs2] Analysis This bug has the same root cause of 'commit 7f27ec978b0e ("ocfs2: call ocfs2_journal_access_di() before ocfs2_journal_dirty() in ocfs2_write_end_nolock()")'. For this bug, jbd2_journal_restart() is called by ocfs2_split_extent() during defragmenting. How to fix For ocfs2_split_extent() can handle journal operations totally by itself. Caller doesn't need to call journal access/dirty pair, and caller only needs to call journal start/stop pair. The fix method is to remove journal access/dirty from __ocfs2_move_extent(). The discussion for this patch: https://oss.oracle.com/pipermail/ocfs2-devel/2023-February/000647.html Link: https://lkml.kernel.org/r/20230217003717.32469-1-heming.zhao@suse.com Signed-off-by: Heming Zhao Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Cc: Signed-off-by: Andrew Morton commit d49b497060387545ca10210590adef6edb296583 Author: Konrad Dybcio Date: Fri Feb 17 21:35:16 2023 +0100 mailmap: map Georgi Djakov's old Linaro address to his current one Georgi's old email is still picked up by the likes of get_maintainer.pl and it keeps bouncing every time one submits an interconnect patch. Map it to his current @kernel.org one. Link: https://lkml.kernel.org/r/20230217203516.826424-1-konrad.dybcio@linaro.org Signed-off-by: Konrad Dybcio Acked-by: Georgi Djakov Cc: Arnd Bergmann Cc: Baolin Wang Cc: Colin Ian King Cc: Kirill Tkhai Cc: Qais Yousef Cc: Vasily Averin Signed-off-by: Andrew Morton commit 6da6b1d4a7df8c35770186b53ef65d388398e139 Author: Naoya Horiguchi Date: Tue Feb 21 17:59:05 2023 +0900 mm/hwpoison: convert TTU_IGNORE_HWPOISON to TTU_HWPOISON After a memory error happens on a clean folio, a process unexpectedly receives SIGBUS when it accesses the error page. This SIGBUS killing is pointless and simply degrades the level of RAS of the system, because the clean folio can be dropped without any data lost on memory error handling as we do for a clean pagecache. When memory_failure() is called on a clean folio, try_to_unmap() is called twice (one from split_huge_page() and one from hwpoison_user_mappings()). The root cause of the issue is that pte conversion to hwpoisoned entry is now done in the first call of try_to_unmap() because PageHWPoison is already set at this point, while it's actually expected to be done in the second call. This behavior disturbs the error handling operation like removing pagecache, which results in the malfunction described above. So convert TTU_IGNORE_HWPOISON into TTU_HWPOISON and set TTU_HWPOISON only when we really intend to convert pte to hwpoison entry. This can prevent other callers of try_to_unmap() from accidentally converting to hwpoison entries. Link: https://lkml.kernel.org/r/20230221085905.1465385-1-naoya.horiguchi@linux.dev Fixes: a42634a6c07d ("readahead: Use a folio in read_pages()") Signed-off-by: Naoya Horiguchi Cc: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Minchan Kim Cc: Vlastimil Babka Cc: Signed-off-by: Andrew Morton commit 1c0a0af511effbd75beffa6c5e54fd64d3563860 Author: Mikhail Zaslonko Date: Tue Feb 21 14:16:17 2023 +0100 lib/zlib: DFLTCC deflate does not write all available bits for Z_NO_FLUSH DFLTCC deflate with Z_NO_FLUSH might generate a corrupted stream when the output buffer is not large enough to fit all the deflate output at once. The problem takes place on closing the deflate block since flush_pending() might leave some output bits not written. Similar problem for software deflate with Z_BLOCK flush option (not supported by kernel zlib deflate) has been fixed a while ago in userspace zlib but the fix never got to the kernel. Now flush_pending() flushes the bit buffer before copying out the byte buffer, in order to really flush as much as possible. Currently there are no users of DFLTCC deflate with Z_NO_FLUSH option in the kernel so the problem remained hidden for a while. This commit is based on the old zlib commit: https://github.com/madler/zlib/commit/0b828b4 Link: https://lkml.kernel.org/r/20230221131617.3369978-2-zaslonko@linux.ibm.com Signed-off-by: Mikhail Zaslonko Acked-by: Ilya Leoshkevich Cc: Heiko Carstens Cc: Vasily Gorbik Signed-off-by: Andrew Morton commit 3f98c9a62c338bbe06a215c9491e6166ea39bf82 Author: andrew.yang Date: Wed Feb 22 14:42:20 2023 +0800 mm/damon/paddr: fix missing folio_put() damon_get_folio() would always increase folio _refcount and folio_isolate_lru() would increase folio _refcount if the folio's lru flag is set. If an unevictable folio isolated successfully, there will be two more _refcount. The one from folio_isolate_lru() will be decreased in folio_puback_lru(), but the other one from damon_get_folio() will be left behind. This causes a pin page. Whatever the case, the _refcount from damon_get_folio() should be decreased. Link: https://lkml.kernel.org/r/20230222064223.6735-1-andrew.yang@mediatek.com Fixes: 57223ac29584 ("mm/damon/paddr: support the pageout scheme") Signed-off-by: andrew.yang Reviewed-by: SeongJae Park Cc: [5.16.x] Signed-off-by: Andrew Morton commit 4c6759967826b87f56c73e0f1deb7b76379ccd23 Author: Vlastimil Babka Date: Mon Feb 27 17:00:14 2023 -0800 mm/mremap: fix dup_anon_vma() in vma_merge() case 4 In case 4, we are shrinking 'prev' (PPPP in the comment) and expanding 'mid' (NNNN). So we need to make sure 'mid' clones the anon_vma from 'prev', if it doesn't have any. After commit 0503ea8f5ba7 ("mm/mmap: remove __vma_adjust()") we can fail to do that due to wrong parameters for dup_anon_vma(). The call is a no-op because res == next, adjust == mid and mid == next. Fix it. Link: https://lkml.kernel.org/r/ad91d62b-37eb-4b73-707a-3c45c9e16256@suse.cz Fixes: 0503ea8f5ba7 ("mm/mmap: remove __vma_adjust()") Signed-off-by: Vlastimil Babka Reviewed-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 981ee95cc1f5905ae4936b0dd501085909cdc14f Author: Mateusz Guzik Date: Wed Jan 25 16:55:57 2023 +0100 vfs: avoid duplicating creds in faccessat if possible access(2) remains commonly used, for example on exec: access("/etc/ld.so.preload", R_OK) or when running gcc: strace -c gcc empty.c % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 0.00 0.000000 0 42 26 access It falls down to do_faccessat without the AT_EACCESS flag, which in turn results in allocation of new creds in order to modify fsuid/fsgid and caps. This is a very expensive process single-threaded and most notably multi-threaded, with numerous structures getting refed and unrefed on imminent new cred destruction. Turns out for typical consumers the resulting creds would be identical and this can be checked upfront, avoiding the hard work. An access benchmark plugged into will-it-scale running on Cascade Lake shows: test proc before after access1 1 1310582 2908735 (+121%) # distinct files access1 24 4716491 63822173 (+1353%) # distinct files access2 24 2378041 5370335 (+125%) # same file The above benchmarks are not integrated into will-it-scale, but can be found in a pull request: https://github.com/antonblanchard/will-it-scale/pull/36/files Signed-off-by: Mateusz Guzik Cc: Al Viro Signed-off-by: Linus Torvalds commit a4eecbae092759537748360299de03e434c9a956 Author: Mateusz Guzik Date: Wed Jan 25 16:55:56 2023 +0100 capability: add cap_isidentical Signed-off-by: Mateusz Guzik Reviewed-by: Serge Hallyn Cc: Al Viro Signed-off-by: Linus Torvalds commit 103830683cfc8f43b15158b0a48014b6d6e83633 Merge: 46d733d0efc79 ddf1eca4fc5a4 Author: Linus Torvalds Date: Mon Feb 27 16:18:51 2023 -0800 Merge tag 'f2fs-for-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs updates from Jaegeuk Kim: "In this round, we've got a huge number of patches that improve code readability along with minor bug fixes, while we've mainly fixed some critical issues in recently-added per-block age-based extent_cache, atomic write support, and some folio cases. Enhancements: - add sysfs nodes to set last_age_weight and manage discard_io_aware_gran - show ipu policy in debugfs - reduce stack memory cost by using bitfield in struct f2fs_io_info - introduce trace_f2fs_replace_atomic_write_block - enhance iostat support and adds flush commands Bug fixes: - revert "f2fs: truncate blocks in batch in __complete_revoke_list()" - fix kernel crash on the atomic write abort flow - call clear_page_private_reference in .{release,invalid}_folio - support .migrate_folio for compressed inode - fix cgroup writeback accounting with fs-layer encryption - retry to update the inode page given data corruption - fix kernel crash due to NULL io->bio - fix some bugs in per-block age-based extent_cache: - wrong calculation of block age - update age extent in f2fs_do_zero_range() - update age extent correctly during truncation" * tag 'f2fs-for-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (81 commits) f2fs: drop unnecessary arg for f2fs_ioc_*() f2fs: Revert "f2fs: truncate blocks in batch in __complete_revoke_list()" f2fs: synchronize atomic write aborts f2fs: fix wrong segment count f2fs: replace si->sbi w/ sbi in stat_show() f2fs: export ipu policy in debugfs f2fs: make kobj_type structures constant f2fs: fix to do sanity check on extent cache correctly f2fs: add missing description for ipu_policy node f2fs: fix to set ipu policy f2fs: fix typos in comments f2fs: fix kernel crash due to null io->bio f2fs: use iostat_lat_type directly as a parameter in the iostat_update_and_unbind_ctx() f2fs: add sysfs nodes to set last_age_weight f2fs: fix f2fs_show_options to show nogc_merge mount option f2fs: fix cgroup writeback accounting with fs-layer encryption f2fs: fix wrong calculation of block age f2fs: fix to update age extent in f2fs_do_zero_range() f2fs: fix to update age extent correctly during truncation f2fs: fix to avoid potential memory corruption in __update_iostat_latency() ... commit 46d733d0efc79bc8430d63b57ab88011806d5180 Author: George Kennedy Date: Mon Feb 27 15:21:41 2023 -0500 vc_screen: modify vcs_size() handling in vcs_read() Restore the vcs_size() handling in vcs_read() to what it had been in previous version. Fixes: 226fae124b2d ("vc_screen: move load of struct vc_data pointer in vcs_read() to avoid UAF") Suggested-by: Jiri Slaby Signed-off-by: George Kennedy Signed-off-by: Linus Torvalds commit 32ff6831cdecd828bd8be9cdfb6c4a3d1feb8f8a Author: David Gow Date: Sat Feb 25 09:45:30 2023 +0800 kunit: Fix 'hooks.o' build by recursing into kunit KUnit's 'hooks.o' file need to be built-in whenever KUnit is enabled (even if CONFIG_KUNIT=m). We'd previously attemtped to do this by adding 'kunit/hooks.o' to obj-y in lib/Makefile, but this caused hooks.c to be rebuilt even when it was unchanged. Instead, always recurse into lib/kunit using obj-y when KUnit is enabled, and add the hooks there. Fixes: 7170b7ed6acb ("kunit: Add "hooks" to call into KUnit when it's built as a module"). Reported-by: Linus Torvalds Link: https://lore.kernel.org/linux-kselftest/CAHk-=wiEf7irTKwPJ0jTMOF3CS-13UXmF6Fns3wuWpOZ_wGyZQ@mail.gmail.com/ Signed-off-by: David Gow Reviewed-by: Brendan Higgins Signed-off-by: Linus Torvalds commit 27fd82726995bd75b68df9ce6a1eda8f6b3ad498 Author: Arınç ÜNAL Date: Tue Feb 21 12:24:35 2023 +0300 mips: ralink: make SOC_MT7621 select PINCTRL Currently, out of every Ralink SoC, only the dt-binding of the MT7621 SoC uses pinctrl. Because of this, PINCTRL is not selected at all. Make SOC_MT7621 select PINCTRL. Remove PINCTRL_MT7621, enabling it for the MT7621 SoC will be handled under the PINCTRL_MT7621 option. Signed-off-by: Arınç ÜNAL Acked-by: Sergio Paracuellos Signed-off-by: Thomas Bogendoerfer commit f2b95d7a9fa43bd72d442a9df01e29274b1769b2 Author: Arınç ÜNAL Date: Tue Feb 21 12:24:34 2023 +0300 mips: remove SYS_HAS_CPU_MIPS32_R1 from RALINK All MIPS processors on the Ralink SoCs implement the MIPS32 Release 2 Architecture. Remove SYS_HAS_CPU_MIPS32_R1. Signed-off-by: Arınç ÜNAL Acked-by: Sergio Paracuellos Signed-off-by: Thomas Bogendoerfer commit 5ae7e037de566c3106c0fa951bbf35fd6370fdf6 Author: Jiaxun Yang Date: Mon Feb 27 18:46:14 2023 +0000 MIPS: cevt-r4k: Offset the value used to clear compare interrupt In c0_compare_int_usable we clear compare interrupt by write value just read out from counter to compare register. However sometimes if those all instructions are graduated together then it's possible that at the time compare register is written, the counter haven't progressed, thus the interrupt is triggered again. It also applies to QEMU that instructions is executed significantly faster then counter. Offset the value used to clear interrupt by one to prevent that happen. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit fea8826d5fdc4ff5c93e883a738597129614039c Author: Jiaxun Yang Date: Mon Feb 27 18:46:13 2023 +0000 MIPS: smp-cps: Don't rely on CP0_CMGCRBASE CP0_CMGCRBASE is not always available on CPS enabled system such as early proAptiv. For early SMP bring up where we can't safely access memeory, we patch the entry of CPS NMI vector to inject CMGCR address directly into register during early core bringup. For VPE bringup as the core is already coherenct at that point we just read the variable to obtain the address. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 5ca26d6039a6b42341f7f5cc8d10d30ca1561a7b Merge: 982818426a0ff 580f98cc33a26 Author: Linus Torvalds Date: Mon Feb 27 14:05:08 2023 -0800 Merge tag 'net-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from wireless and netfilter. The notable fixes here are the EEE fix which restores boot for many embedded platforms (real and QEMU); WiFi warning suppression and the ICE Kconfig cleanup. Current release - regressions: - phy: multiple fixes for EEE rework - wifi: wext: warn about usage only once - wifi: ath11k: allow system suspend to survive ath11k Current release - new code bugs: - mlx5: Fix memory leak in IPsec RoCE creation - ibmvnic: assign XPS map to correct queue index Previous releases - regressions: - netfilter: ip6t_rpfilter: Fix regression with VRF interfaces - netfilter: ctnetlink: make event listener tracking global - nf_tables: allow to fetch set elements when table has an owner - mlx5: - fix skb leak while fifo resync and push - fix possible ptp queue fifo use-after-free Previous releases - always broken: - sched: fix action bind logic - ptp: vclock: use mutex to fix "sleep on atomic" bug if driver also uses a mutex - netfilter: conntrack: fix rmmod double-free race - netfilter: xt_length: use skb len to match in length_mt6, avoid issues with BIG TCP Misc: - ice: remove unnecessary CONFIG_ICE_GNSS - mlx5e: remove hairpin write debugfs files - sched: act_api: move TCA_EXT_WARN_MSG to the correct hierarchy" * tag 'net-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (53 commits) tcp: tcp_check_req() can be called from process context net: phy: c45: fix network interface initialization failures on xtensa, arm:cubieboard xen-netback: remove unused variables pending_idx and index net/sched: act_api: move TCA_EXT_WARN_MSG to the correct hierarchy net: dsa: ocelot_ext: remove unnecessary phylink.h include net: mscc: ocelot: fix duplicate driver name error net: dsa: felix: fix internal MDIO controller resource length net: dsa: seville: ignore mscc-miim read errors from Lynx PCS net/sched: act_sample: fix action bind logic net/sched: act_mpls: fix action bind logic net/sched: act_pedit: fix action bind logic wifi: wext: warn about usage only once wifi: mt76: usb: fix use-after-free in mt76u_free_rx_queue qede: avoid uninitialized entries in coal_entry array nfc: fix memory leak of se_io context in nfc_genl_se_io ice: remove unnecessary CONFIG_ICE_GNSS net/sched: cls_api: Move call to tcf_exts_miss_cookie_base_destroy() ibmvnic: Assign XPS map to correct queue index docs: net: fix inaccuracies in msg_zerocopy.rst tools: net: add __pycache__ to gitignore ... commit fb5b855d9f34927579baa0a20b4d0d8ea3740abd Author: Chuck Lever Date: Mon Feb 27 11:52:59 2023 -0500 SUNRPC: Properly terminate test case arrays Unable to handle kernel paging request at virtual address 73657420 when execute [73657420] *pgd=00000000 Internal error: Oops: 80000005 [#1] ARM CPU: 0 PID: 1 Comm: swapper Tainted: G N 6.2.0-rc7-00133-g373f26a81164-dirty #9 Hardware name: Generic DT based system PC is at 0x73657420 LR is at kunit_run_tests+0x3e0/0x5f4 On x86 with GCC 12, the missing array terminators did not seem to matter. Other platforms appear to be more picky. Reported-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Signed-off-by: Chuck Lever commit fe90151c3cc6dbc0836723995f65d371ef4ad514 Author: Chuck Lever Date: Mon Feb 27 10:58:34 2023 -0500 SUNRPC: Let Kunit tests run with some enctypes compiled out Allow the new GSS Kerberos encryption type test suites to run outside of the kunit infrastructure. Replace the assertion that fires when lookup_enctype() so that the case is skipped instead of failing outright. Reported-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Signed-off-by: Chuck Lever commit 2d311f480b52eeb2e1fd432d64b78d82952c3808 Author: Randy Dunlap Date: Sun Feb 26 23:20:16 2023 -0800 riscv, bpf: Fix patch_text implicit declaration bpf_jit_comp64.c uses patch_text(), so add to it to prevent the build error: ../arch/riscv/net/bpf_jit_comp64.c: In function 'bpf_arch_text_poke': ../arch/riscv/net/bpf_jit_comp64.c:691:23: error: implicit declaration of function 'patch_text'; did you mean 'path_get'? [-Werror=implicit-function-declaration] 691 | ret = patch_text(ip, new_insns, ninsns); | ^~~~~~~~~~ Fixes: 596f2e6f9cf4 ("riscv, bpf: Add bpf_arch_text_poke support for RV64") Reported-by: kernel test robot Signed-off-by: Randy Dunlap Signed-off-by: Daniel Borkmann Acked-by: Pu Lehui Acked-by: Björn Töpel Link: https://lore.kernel.org/r/202302271000.Aj4nMXbZ-lkp@intel.com Link: https://lore.kernel.org/bpf/20230227072016.14618-1-rdunlap@infradead.org commit a07484c083eabc809e45a198bd639bfd37ac70b6 Author: Bagas Sanjaya Date: Wed Feb 22 15:35:30 2023 +0700 bpf, docs: Fix link to BTF doc Ross reported broken link to BTF documentation (Documentation/bpf/btf.rst) in Documentation/bpf/bpf_devel_QA.rst. The link in question is written using external link syntax, with the target refers to BTF doc in reST source (btf.rst), which doesn't exist in resulting HTML output. Fix the link by replacing external link syntax with simply writing out the target doc, which the link will be generated to the correct HTML doc target. Fixes: 6736aa793c2b5f ("selftests/bpf: Add general instructions for test execution") Reported-by: Ross Zwisler Signed-off-by: Bagas Sanjaya Signed-off-by: Daniel Borkmann Acked-by: Ross Zwisler Link: https://lore.kernel.org/linux-doc/Y++09LKx25dtR4Ow@google.com/ Link: https://lore.kernel.org/bpf/20230222083530.26136-1-bagasdotme@gmail.com commit 580f98cc33a260bb8c6a39ae2921b29586b84fdf Author: Eric Dumazet Date: Mon Feb 27 08:33:36 2023 +0000 tcp: tcp_check_req() can be called from process context This is a follow up of commit 0a375c822497 ("tcp: tcp_rtx_synack() can be called from process context"). Frederick Lawler reported another "__this_cpu_add() in preemptible" warning caused by the same reason. In my former patch I took care of tcp_rtx_synack() but forgot that tcp_check_req() also contained some SNMP updates. Note that some parts of tcp_check_req() always run in BH context, I added a comment to clarify this. Fixes: 8336886f786f ("tcp: TCP Fast Open Server - support TFO listeners") Link: https://lore.kernel.org/netdev/8cd33923-a21d-397c-e46b-2a068c287b03@cloudflare.com/T/ Signed-off-by: Eric Dumazet Reported-by: Frederick Lawler Tested-by: Frederick Lawler Link: https://lore.kernel.org/r/20230227083336.4153089-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 972074ea88402e9b1b29c3a8d3d6d1aadaff624e Author: Oleksij Rempel Date: Sat Feb 25 08:16:44 2023 +0100 net: phy: c45: fix network interface initialization failures on xtensa, arm:cubieboard Without proper initialization, "changed" returned random numbers and caused interface initialization failures. Fixes: 022c3f87f88e ("net: phy: add genphy_c45_ethtool_get/set_eee() support") Reported-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Oleksij Rempel Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230225071644.2754893-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit ccf8f7d71424ce37394c8333482853dba4f33978 Author: Tom Rix Date: Sun Feb 26 11:34:29 2023 -0500 xen-netback: remove unused variables pending_idx and index building with gcc and W=1 reports drivers/net/xen-netback/netback.c:886:21: error: variable ‘pending_idx’ set but not used [-Werror=unused-but-set-variable] 886 | u16 pending_idx; | ^~~~~~~~~~~ pending_idx is not used so remove it. Since index was only used to set pending_idx, remove index as well. Signed-off-by: Tom Rix Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20230226163429.2351600-1-trix@redhat.com Signed-off-by: Jakub Kicinski commit 4db692d68256d860c9d35140b1de7324b432082b Merge: 923b2e30dc9cd 52fd90638a726 Author: Jakub Kicinski Date: Mon Feb 27 10:36:36 2023 -0800 Merge tag 'wireless-2023-02-27' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Kalle Valo says: ==================== wireless fixes for v6.3 First set of fixes for v6.3. We have only three oneliners. The most important one is the patch reducing warnings about the Wireless Extensions usage, reported by Linus. * tag 'wireless-2023-02-27' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: wext: warn about usage only once wifi: mt76: usb: fix use-after-free in mt76u_free_rx_queue wifi: ath11k: allow system suspend to survive ath11k ==================== Link: https://lore.kernel.org/r/20230227131053.BD779C433D2@smtp.kernel.org Signed-off-by: Jakub Kicinski commit 982818426a0ffaf93b0621826ed39a84be3d7d62 Merge: 11c70529983e8 9f79762ef8d90 Author: Linus Torvalds Date: Mon Feb 27 10:09:40 2023 -0800 Merge tag 'arm-fixes-6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "A few bugfixes already came up during the merge window. Samsung, ASpeed, Spear have minor DT changes, in case of Samsung this fixes a regression compared to earlier versions. Bartosz takes over as the primary maintainer for the TI DaVinci platform, and we get a few last minute defconfig changes" * tag 'arm-fixes-6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: ARM: dts: spear320-hmi: correct STMPE GPIO compatible ARM: dts: aspeed: p10bmc: Update battery node name arm64: defconfig: Add IOSCHED_BFQ to the default configs arm64: defconfig: Fix unintentional disablement of PCI on i.MX ARM: dts: exynos: correct TMU phandle in Odroid XU3 family ARM: dts: exynos: correct TMU phandle in Odroid HC1 ARM: dts: exynos: correct TMU phandle in Odroid XU ARM: dts: exynos: correct TMU phandle in Exynos5250 ARM: dts: exynos: correct TMU phandle in Exynos4210 ARM: dts: exynos: correct TMU phandle in Exynos4 MAINTAINERS: make me the maintainer of DaVinci platforms commit 11c70529983e8136ea1bd5c32e4f9cd14503c644 Merge: d40b2f4c94f22 524af30c93138 Author: Linus Torvalds Date: Mon Feb 27 10:04:49 2023 -0800 Merge tag 'soc-drivers-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC driver updates from Arnd Bergmann: "As usual, there are lots of minor driver changes across SoC platforms from NXP, Amlogic, AMD Zynq, Mediatek, Qualcomm, Apple and Samsung. These usually add support for additional chip variations in existing drivers, but also add features or bugfixes. The SCMI firmware subsystem gains a unified raw userspace interface through debugfs, which can be used for validation purposes. Newly added drivers include: - New power management drivers for StarFive JH7110, Allwinner D1 and Renesas RZ/V2M - A driver for Qualcomm battery and power supply status - A SoC device driver for identifying Nuvoton WPCM450 chips - A regulator coupler driver for Mediatek MT81xxv" * tag 'soc-drivers-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (165 commits) power: supply: Introduce Qualcomm PMIC GLINK power supply soc: apple: rtkit: Do not copy the reg state structure to the stack soc: sunxi: SUN20I_PPU should depend on PM memory: renesas-rpc-if: Remove redundant division of dummy soc: qcom: socinfo: Add IDs for IPQ5332 and its variant dt-bindings: arm: qcom,ids: Add IDs for IPQ5332 and its variant dt-bindings: power: qcom,rpmpd: add RPMH_REGULATOR_LEVEL_LOW_SVS_L1 firmware: qcom_scm: Move qcom_scm.h to include/linux/firmware/qcom/ MAINTAINERS: Update qcom CPR maintainer entry dt-bindings: firmware: document Qualcomm SM8550 SCM dt-bindings: firmware: qcom,scm: add qcom,scm-sa8775p compatible soc: qcom: socinfo: Add Soc IDs for IPQ8064 and variants dt-bindings: arm: qcom,ids: Add Soc IDs for IPQ8064 and variants soc: qcom: socinfo: Add support for new field in revision 17 soc: qcom: smd-rpm: Add IPQ9574 compatible soc: qcom: pmic_glink: remove redundant calculation of svid soc: qcom: stats: Populate all subsystem debugfs files dt-bindings: soc: qcom,rpmh-rsc: Update to allow for generic nodes soc: qcom: pmic_glink: add CONFIG_NET/CONFIG_OF dependencies soc: qcom: pmic_glink: Introduce altmode support ... commit e02b50ca442e88122e1302d4dbc1b71a4808c13f Author: KP Singh Date: Mon Feb 27 07:05:41 2023 +0100 Documentation/hw-vuln: Document the interaction between IBRS and STIBP Explain why STIBP is needed with legacy IBRS as currently implemented (KERNEL_IBRS) and why STIBP is not needed when enhanced IBRS is enabled. Fixes: 7c693f54c873 ("x86/speculation: Add spectre_v2=ibrs option to support Kernel IBRS") Signed-off-by: KP Singh Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230227060541.1939092-2-kpsingh@kernel.org commit 6921ed9049bc7457f66c1596c5b78aec0dae4a9d Author: KP Singh Date: Mon Feb 27 07:05:40 2023 +0100 x86/speculation: Allow enabling STIBP with legacy IBRS When plain IBRS is enabled (not enhanced IBRS), the logic in spectre_v2_user_select_mitigation() determines that STIBP is not needed. The IBRS bit implicitly protects against cross-thread branch target injection. However, with legacy IBRS, the IBRS bit is cleared on returning to userspace for performance reasons which leaves userspace threads vulnerable to cross-thread branch target injection against which STIBP protects. Exclude IBRS from the spectre_v2_in_ibrs_mode() check to allow for enabling STIBP (through seccomp/prctl() by default or always-on, if selected by spectre_v2_user kernel cmdline parameter). [ bp: Massage. ] Fixes: 7c693f54c873 ("x86/speculation: Add spectre_v2=ibrs option to support Kernel IBRS") Reported-by: José Oliveira Reported-by: Rodrigo Branco Signed-off-by: KP Singh Signed-off-by: Borislav Petkov (AMD) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230220120127.1975241-1-kpsingh@kernel.org Link: https://lore.kernel.org/r/20230221184908.2349578-1-kpsingh@kernel.org commit d40b2f4c94f221bd5aab205f945e6f88d3df0929 Merge: da15efe1a8513 1cc4606d19e37 Author: Linus Torvalds Date: Mon Feb 27 09:53:58 2023 -0800 Merge tag 'fuse-update-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse updates from Miklos Szeredi: - Fix regression in fileattr permission checking - Fix possible hang during PID namespace destruction - Add generic support for request extensions - Add supplementary group list extension - Add limited support for supplying supplementary groups in create requests - Documentation fixes * tag 'fuse-update-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: add inode/permission checks to fileattr_get/fileattr_set fuse: fix all W=1 kernel-doc warnings fuse: in fuse_flush only wait if someone wants the return code fuse: optional supplementary group in create requests fuse: add request extension commit da15efe1a8513e0a949f429338155a56667dc9c6 Merge: 6ffb575bebb98 571f235163ac8 Author: Linus Torvalds Date: Mon Feb 27 09:47:26 2023 -0800 Merge tag 'mmc-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC updates from Ulf Hansson: "MMC core: - Extend slot-gpio to be used for host specific card detect interrupts - Align to common busy polling behaviour for mmc ioctls - Suggest the BFQ I/O scheduler to be built along with MMC/SD support - Add devm_mmc_alloc_host() to enable further cleanups in host drivers MMC host: - atmel-mci: Fix race condition when stopping/starting a command - dw_mmc-starfive: Add new driver to support the StarFive JH7110 variant - dw_mmc-rockchip: Add support for the RK3588 variant - jz4740: Add support for the vqmmc power supply - meson-gx: Convert the DT bindings to the dt-schema - meson-gx: Enable the platform interrupt to be used for card detect - moxart: Set the supported maximum request/block/segment sizes - renesas,sdhi: Add support for the RZ/V2M variants - sdhci: Rework code to drop SDHCI_QUIRK_MISSING_CAPS - sdhci-esdhc-imx: Improve tuning logic support - sdhci-msm: Add support for the IPQ5332 and the IPQ9574 variants - sdhci-of-dwcmshc: Add the missing device table IDs for acpi - sdhci-of-dwcmshc: Improve clock support for the Rockchip variant - sdhci-of-dwcmshc: Enable support of V4 host for the BlueField-3 variant - sdhci-pxav2: Add support for the PXA168 V1 variant - sdhci-pxav2: Add support for SDIO IRQs for the PXA168 V1 variant - uniphier-sd: Add support for SD UHS-I speed modes" * tag 'mmc-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (59 commits) mmc: meson-gx: Use devm_platform_get_and_ioremap_resource() mmc: meson-gx: constify member data of struct meson_host mmc: meson-gx: use devm_clk_get_enabled() for core clock mmc: core: fix return value check in devm_mmc_alloc_host() dt-bindings: mmc: meson-gx: fix interrupt binding mmc: meson-gx: support platform interrupt as card detect interrupt dt-bindings: mmc: meson-gx: support specifying cd interrupt mmc: core: support setting card detect interrupt from drivers mmc: starfive: Add sdio/emmc driver support dt-bindings: mmc: Add StarFive MMC module dt-bindings: mmc: sdhci-msm: Allow 1 icc path dt-bindings: mmc: rockchip-dw-mshc: Add RK3588 compatible string mmc: core: Align to common busy polling behaviour for mmc ioctls dt-bindings: mmc: Add resets property to cadence SDHCI binding mmc: meson-gx: remove meson_mmc_get_cd mmc: moxart: set maximum request/block/segment sizes mmc: sdhci-brcmstb: Use devm_platform_get_and_ioremap_resource() mmc: sdhci-of-dwcmshc: add the missing device table IDs for acpi mmc: sdhci-of-dwcmshc: Update DLL and pre-change delay for rockchip platform mmc: jz4740: Add support for vqmmc power supply ... commit 6ffb575bebb983b982240372ecf976188451dd1c Merge: 5a6d92493bb2e 9b07d27d0fbb7 Author: Linus Torvalds Date: Mon Feb 27 09:38:51 2023 -0800 Merge tag 'dma-mapping-6.3-2022-02-27' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping updates from Christoph Hellwig: - remove a not very useful and now unused swiotlb API (Christoph Hellwig) - fix a section mismatch (Randy Dunlap) * tag 'dma-mapping-6.3-2022-02-27' of git://git.infradead.org/users/hch/dma-mapping: swiotlb: mark swiotlb_memblock_alloc() as __init swiotlb: remove swiotlb_max_segment commit 5a6d92493bb2e6e0a2fbb4a8b2c7ed97b4a5652b Merge: 02a737f4bb22f 2fe03412e2e1b Author: Linus Torvalds Date: Mon Feb 27 09:34:53 2023 -0800 Merge tag 'memblock-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock Pull memblock updates from Mike Rapoport: "Small optimizations: - fix off-by-one in the check whether memblock_add_range() should reallocate memory to accommodate newly inserted range - check only for relevant regions in memblock_merge_regions() rather than swipe over the entire array" * tag 'memblock-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: memblock: Avoid useless checks in memblock_merge_regions(). memblock: Make a boundary tighter in memblock_add_range(). commit 02a737f4bb22fd72bffb5b4008bbcb773218b5dd Merge: b6cc7a0436906 5aa52ccf692bf Author: Linus Torvalds Date: Mon Feb 27 09:31:02 2023 -0800 Merge tag 'm68knommu-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu updates from Greg Ungerer: - spelling fixes * tag 'm68knommu-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k: nommu: Fix misspellings of "DragonEngine" m68k: nommu: Fix misspellings of "uCdimm" commit b6cc7a0436906b18f51c3e6b1f41d648bf645bd7 Merge: f3a2439f20d91 4a3ec00957fdf Author: Linus Torvalds Date: Mon Feb 27 09:27:31 2023 -0800 Merge tag 'csky-for-linus-6.3' of https://github.com/c-sky/csky-linux Pull csky update from Guo Ren: - Optimize delay accuracy * tag 'csky-for-linus-6.3' of https://github.com/c-sky/csky-linux: csky: delay: Add function alignment commit 6e2985c938e8b765b3de299c561d87f98330c546 Author: Darrick J. Wong Date: Fri Feb 17 15:44:25 2023 -0800 xfs: restore old agirotor behavior Prior to the removal of xfs_ialloc_next_ag, we would increment the agi rotor and return the *old* value. atomic_inc_return returns the new value, which causes mkfs to allocate the root directory in AG 1. Put back the old behavior (at least for mkfs) by subtracting 1 here. Fixes: 20a5eab49d35 ("xfs: convert xfs_ialloc_next_ag() to an atomic") Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit ebf95e884694b2c796ecb53d80d2b4cff8990d2f Author: Harald Freudenberger Date: Fri Feb 17 12:05:36 2023 +0100 s390/ap,zcrypt,vfio: introduce and use ap_queue_status_reg union Introduce a new ap queue status register wrapper union to access register wide values. So the inline assembler only sees register wide values but the surrounding code may use a more structured view of the same value and a reader of the code (and the compiler) gets a clear understanding about the mapping between fields and register values. All the changes to access the ap queue status are local to the inline functions within ap.h. However, the struct ap_qirq_ctrl has been replaces by a union for same reason and this needed slight adaptions in the calling code. Suggested-by: Halil Pasic Suggested-by: Andreas Arnez Signed-off-by: Harald Freudenberger Acked-by: Heiko Carstens Reviewed-by: Holger Dengler Signed-off-by: Heiko Carstens commit ae4b60f6b7a8d25c7253cab104468d22efcecf1a Author: Nico Boehr Date: Thu Feb 16 13:12:08 2023 +0100 s390/nmi: fix virtual-physical address confusion When a machine check is received while in SIE, it is reinjected into the guest in some cases. The respective code needs to access the sie_block, which is taken from the backed up R14. Since reinjection only occurs while we are in SIE (i.e. between the labels sie_entry and sie_leave in entry.S and thus if CIF_MCCK_GUEST is set), the backed up R14 will always contain a physical address in s390_backup_mcck_info. 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: Claudio Imbrenda Reviewed-by: Alexander Gordeev Link: https://lore.kernel.org/r/20230216121208.4390-2-nrb@linux.ibm.com Signed-off-by: Janosch Frank Signed-off-by: Heiko Carstens commit 8ee0d2fb4dfa3465ea2030dec59a6f6fe3005804 Author: Vasily Gorbik Date: Fri Feb 17 14:00:54 2023 +0100 s390/setup: do not complain about parameters handled in decompressor Currently there are several kernel command line parameters which are only parsed and handled in decompressor and not known to the kernel. This leads to the following error message during kernel boot: Unknown kernel command line parameters "mem=3G nokaslr", will be passed to user space. To avoid confusion, register those parameters with an empty stub so that kernel does not complain about them. Reported-by: Gerald Schaefer Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit c0c33b94cfc23d21f67c7569a8785b33c74d6e3d Author: Keith Busch Date: Fri Feb 24 07:34:24 2023 -0800 nvme: fix sparse warning on effects masking The log entries are stored in le32, so use appropriate byte swapping macros. Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202302242222.PevBhzvC-lkp@intel.com/ Signed-off-by: Keith Busch Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 9f79762ef8d90a6fab85e4ac0d153bdd8b4868ca Merge: 33a0c1b850c8c a3583e92d188e Author: Arnd Bergmann Date: Mon Feb 27 14:46:59 2023 +0100 Merge tag 'samsung-dt-fixes-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/fixes Fixes for Samsung DTS ARM for v6.3 Thermal framework commit 3fd6d6e2b4e8 ("thermal/of: Rework the thermal device tree initialization") merged in v6.1-rc1, exposed misconfiguration of Exynos Thermal Monitoring Unit (TMU) thermal-sensors property in DTS. This misconfiguration in DTS was working fine before that Thermal commit, but now all thermal zones fail to register except the first one (CPU). This can lead to missing cooling of a board and eventually either emergency shutdown or damaged board. * tag 'samsung-dt-fixes-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: correct TMU phandle in Odroid XU3 family ARM: dts: exynos: correct TMU phandle in Odroid HC1 ARM: dts: exynos: correct TMU phandle in Odroid XU ARM: dts: exynos: correct TMU phandle in Exynos5250 ARM: dts: exynos: correct TMU phandle in Exynos4210 ARM: dts: exynos: correct TMU phandle in Exynos4 Link: https://lore.kernel.org/r/20230221095337.9453-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 33a0c1b850c8c85f400531dab3a0b022cdb164b1 Author: Krzysztof Kozlowski Date: Sat Feb 25 17:22:37 2023 +0100 ARM: dts: spear320-hmi: correct STMPE GPIO compatible The compatible is st,stmpe-gpio. Fixes: e2eb69183ec4 ("ARM: SPEAr320: DT: Add SPEAr 320 HMI board support") Signed-off-by: Krzysztof Kozlowski Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20230225162237.40242-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit a8cef541dd5ef9445130660008c029205c4c5aa5 Author: Eddie James Date: Tue Feb 21 11:03:52 2023 +1030 ARM: dts: aspeed: p10bmc: Update battery node name The ADC sensor for the battery needs to be named "iio-hwmon" for compatibility with user space applications. Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20230202152759.67069-1-eajames@linux.ibm.com Fixes: bf1914e2cfed ("ARM: dts: aspeed: p10bmc: Fix ADC iio-hwmon battery node name") Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20230221003352.1218797-1-joel@jms.id.au Signed-off-by: Arnd Bergmann commit e505e6bf4205255bf6e0daba9ea0f80b6391b936 Author: Linus Walleij Date: Fri Feb 24 14:52:30 2023 +0100 arm64: defconfig: Add IOSCHED_BFQ to the default configs ARM64 systems are often memory constrained and more often than not use slow single-channel storage such as flash memory or MMC/SD-cards. For any interactive systems (such as mobile phones, tablets, chromebooks...) the BFQ I/O scheduler will be desireable. Make sure the BFQ I/O scheduler is available on these systems. ARM (32), Loongarch, MIPS, m68k, UM and S390 has also enabled BFQ in their defconfigs, cf commit b495dfed706c4c5873c0dab8930ad6eb1d276a6c "um: Cleanup CONFIG_IOSCHED_CFQ" where the motivation is that it replaces the former CFQ scheduler. Cc: linux-arm-kernel@lists.infradead.org Cc: Catalin Marinas Cc: Will Deacon Cc: Paolo Valente Cc: Krzysztof Kozlowski Cc: Ulf Hansson Cc: Arnd Bergmann Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230224135230.2295826-1-linus.walleij@linaro.org Signed-off-by: Arnd Bergmann commit 0cd5780eb625cc4e49cf65df9ad29a6591658b74 Author: Mark Brown Date: Mon Feb 20 19:09:45 2023 +0000 arm64: defconfig: Fix unintentional disablement of PCI on i.MX A recent update to support PCI endpoint mode on i.MX platforms unintentionally disabled PCI host support for i.MX in defconfig. The existing PCI_IMX6 was made a hidden option, selected by new options PCI_IMX6_HOST (for the existing support) and PCI_IMX6_EP (for the endpoint mode), but there has been no corresponding update to defconfig so the PCI_IMX6 ends up getting disabled. Switch defconfig to PCI_IMX6_HOST to preserve the existing functionality. Fixes: 75c2f26da03f ("PCI: imx6: Add i.MX PCIe EP mode support") Reported-by: "kernelci.org bot" Signed-off-by: Mark Brown Reviewed-by: Richard Zhu Link: https://lore.kernel.org/r/20230220-imx-pci-defconfig-v1-1-2210cf08340e@kernel.org Signed-off-by: Arnd Bergmann commit 923b2e30dc9cd05931da0f64e2e23d040865c035 Author: Pedro Tammela Date: Fri Feb 24 14:56:01 2023 -0300 net/sched: act_api: move TCA_EXT_WARN_MSG to the correct hierarchy TCA_EXT_WARN_MSG is currently sitting outside of the expected hierarchy for the tc actions code. It should sit within TCA_ACT_TAB. Fixes: 0349b8779cc9 ("sched: add new attr TCA_EXT_WARN_MSG to report tc extact message") Reviewed-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 8258ef28001ad30c074e823124e10b9c75a965ff Author: Namjae Jeon Date: Sat Jan 14 13:09:48 2023 +0900 exfat: handle unreconized benign secondary entries Sony PXW-Z280 camera add vendor allocation entries to directory of pictures. Currently, linux exfat does not support it and the file is not visible. This patch handle vendor extension and allocation entries as unreconized benign secondary entries. As described in the specification, it is recognized but ignored, and when deleting directory entry set, the associated clusters allocation are removed as well as benign secondary directory entries. Reported-by: Barócsi Dénes Reviewed-by: Sungjong Seo Reviewed-by: Yuezhang Mo Signed-off-by: Namjae Jeon commit 39c1ce8eafc0ff64fb9e28536ccc7df6a8e2999d Author: Yuezhang Mo Date: Wed Jan 4 14:37:47 2023 +0800 exfat: fix inode->i_blocks for non-512 byte sector size device inode->i_blocks is not real number of blocks, but 512 byte ones. Fixes: 98d917047e8b ("exfat: add file operations") Cc: stable@vger.kernel.org # v5.7+ Reported-by: Wang Yugui Tested-by: Wang Yugui Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Signed-off-by: Namjae Jeon commit bdaadfd343e3cba49ad0b009ff4b148dad0fa404 Author: Sungjong Seo Date: Thu Dec 29 20:52:38 2022 +0900 exfat: redefine DIR_DELETED as the bad cluster number When a file or a directory is deleted, the hint for the cluster of its parent directory in its in-memory inode is set as DIR_DELETED. Therefore, DIR_DELETED must be one of invalid cluster numbers. According to the exFAT specification, a volume can have at most 2^32-11 clusters. However, DIR_DELETED is wrongly defined as 0xFFFF0321, which could be a valid cluster number. To fix it, let's redefine DIR_DELETED as 0xFFFFFFF7, the bad cluster number. Fixes: 1acf1a564b60 ("exfat: add in-memory and on-disk structures and headers") Cc: stable@vger.kernel.org # v5.7+ Reported-by: Yuezhang Mo Signed-off-by: Sungjong Seo Signed-off-by: Namjae Jeon commit 706fdcac002316893434d753be8cfb549fe1d40d Author: Yuezhang Mo Date: Thu Oct 20 14:27:37 2022 +0800 exfat: fix reporting fs error when reading dir beyond EOF Since seekdir() does not check whether the position is valid, the position may exceed the size of the directory. We found that for a directory with discontinuous clusters, if the position exceeds the size of the directory and the excess size is greater than or equal to the cluster size, exfat_readdir() will return -EIO, causing a file system error and making the file system unavailable. Reproduce this bug by: seekdir(dir, dir_size + cluster_size); dirent = readdir(dir); The following log will be printed if mount with 'errors=remount-ro'. [11166.712896] exFAT-fs (sdb1): error, invalid access to FAT (entry 0xffffffff) [11166.712905] exFAT-fs (sdb1): Filesystem has been set read-only Fixes: 1e5654de0f51 ("exfat: handle wrong stream entry size in exfat_readdir()") Cc: stable@vger.kernel.org # v5.7+ Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon commit 6cb5d1a16a51d080fbc1649a5144cbc5ca7d6f88 Author: Yuezhang Mo Date: Thu Sep 22 14:43:47 2022 +0800 exfat: fix unexpected EOF while reading dir If the position is not aligned with the dentry size, the return value of readdir() will be NULL and errno is 0, which means the end of the directory stream is reached. If the position is aligned with dentry size, but there is no file or directory at the position, exfat_readdir() will continue to get dentry from the next dentry. So the dentry gotten by readdir() may not be at the position. After this commit, if the position is not aligned with the dentry size, round the position up to the dentry size and continue to get the dentry. Fixes: ca06197382bd ("exfat: add directory operations") Cc: stable@vger.kernel.org # v5.7+ Reported-by: Wang Yugui Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon commit dd8314739a1ff8ed081d3a06f5f87045f7384636 Author: Jiaxun Yang Date: Wed Feb 22 13:24:22 2023 +0000 MIPS: Remove DMA_PERDEV_COHERENT As now we are always managing DMA coherence on per dev bias, there is no need to have such option. And it's not selected by any platform. Signed-off-by: Jiaxun Yang Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer commit ff30bd6a6618e979b16977617371c0f28a95036e Author: Geert Uytterhoeven Date: Thu Feb 2 17:20:55 2023 +0100 sh: clk: Fix clk_enable() to return 0 on NULL clk On SH, devm_clk_get_optional_enabled() fails with -EINVAL if the clock is not found. This happens because __devm_clk_get() assumes it can pass a NULL clock pointer (as returned by clk_get_optional()) to the init() function (clk_prepare_enable() in this case), while the SH implementation of clk_enable() considers that an error. Fix this by making the SH clk_enable() implementation return zero instead, like the Common Clock Framework does. Reported-by: John Paul Adrian Glaubitz Signed-off-by: Geert Uytterhoeven Tested-by: John Paul Adrian Glaubitz Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/b53e6b557b4240579933b3359dda335ff94ed5af.1675354849.git.geert+renesas@glider.be Signed-off-by: John Paul Adrian Glaubitz commit 250870824c1cf199b032b1ef889c8e8d69d9123a Author: Michael Karcher Date: Tue Jan 24 22:48:16 2023 +0100 sh: intc: Avoid spurious sizeof-pointer-div warning GCC warns about the pattern sizeof(void*)/sizeof(void), as it looks like the abuse of a pattern to calculate the array size. This pattern appears in the unevaluated part of the ternary operator in _INTC_ARRAY if the parameter is NULL. The replacement uses an alternate approach to return 0 in case of NULL which does not generate the pattern sizeof(void*)/sizeof(void), but still emits the warning if _INTC_ARRAY is called with a nonarray parameter. This patch is required for successful compilation with -Werror enabled. The idea to use _Generic for type distinction is taken from Comment #7 in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108483 by Jakub Jelinek Signed-off-by: Michael Karcher Acked-by: Randy Dunlap # build-tested Link: https://lore.kernel.org/r/619fa552-c988-35e5-b1d7-fe256c46a272@mkarcher.dialup.fu-berlin.de Signed-off-by: John Paul Adrian Glaubitz commit ba3be66f11c3c49afaa9f49b99e21d88756229ef Author: Dmitry Osipenko Date: Thu Nov 17 04:40:38 2022 +0300 drm/panfrost: Don't sync rpm suspension after mmu flushing Lockdep warns about potential circular locking dependency of devfreq with the fs_reclaim caused by immediate device suspension when mapping is released by shrinker. Fix it by doing the suspension asynchronously. Reviewed-by: Steven Price Fixes: ec7eba47da86 ("drm/panfrost: Rework page table flushing and runtime PM interaction") Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/all/20230108210445.3948344-3-dmitry.osipenko@collabora.com/ commit 9630b585b607bd26f505d34620b14d75b9a5af7d Author: Dmitry Osipenko Date: Fri Nov 4 19:04:59 2022 +0300 drm/msm/gem: Prevent blocking within shrinker loop Consider this scenario: 1. APP1 continuously creates lots of small GEMs 2. APP2 triggers `drop_caches` 3. Shrinker starts to evict APP1 GEMs, while APP1 produces new purgeable GEMs 4. msm_gem_shrinker_scan() returns non-zero number of freed pages and causes shrinker to try shrink more 5. msm_gem_shrinker_scan() returns non-zero number of freed pages again, goto 4 6. The APP2 is blocked in `drop_caches` until APP1 stops producing purgeable GEMs To prevent this blocking scenario, check number of remaining pages that GPU shrinker couldn't release due to a GEM locking contention or shrinking rejection. If there are no remaining pages left to shrink, then there is no need to free up more pages and shrinker may break out from the loop. This problem was found during shrinker/madvise IOCTL testing of virtio-gpu driver. The MSM driver is affected in the same way. Reviewed-by: Rob Clark Reviewed-by: Thomas Zimmermann Fixes: b352ba54a820 ("drm/msm/gem: Convert to using drm_gem_lru") Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/all/20230108210445.3948344-2-dmitry.osipenko@collabora.com/ commit ee9adb7a45516cfa536ca92253d7ae59d56db9e4 Author: Dmitry Osipenko Date: Mon Jan 9 00:13:11 2023 +0300 drm/shmem-helper: Remove another errant put in error path drm_gem_shmem_mmap() doesn't own reference in error code path, resulting in the dma-buf shmem GEM object getting prematurely freed leading to a later use-after-free. Fixes: f49a51bfdc8e ("drm/shme-helpers: Fix dma_buf_mmap forwarding bug") Cc: stable@vger.kernel.org Signed-off-by: Dmitry Osipenko Reviewed-by: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/20230108211311.3950107-1-dmitry.osipenko@collabora.com commit a54bace095d00e9222161495649688bc43de4dde Author: Oleksandr Tyshchenko Date: Fri Feb 24 17:34:50 2023 +0200 drm/virtio: Pass correct device to dma_sync_sgtable_for_device() The "vdev->dev.parent" should be used instead of "vdev->dev" as a device for which to perform the DMA operation in both virtio_gpu_cmd_transfer_to_host_2d(3d). Because the virtio-gpu device "vdev->dev" doesn't really have DMA OPS assigned to it, but parent (virtio-pci or virtio-mmio) device "vdev->dev.parent" has. The more, the sgtable in question the code is trying to sync here was mapped for the parent device (by using its DMA OPS) previously at: virtio_gpu_object_shmem_init()->drm_gem_shmem_get_pages_sgt()-> dma_map_sgtable(), so should be synced here for the same parent device. Fixes: b5c9ed70d1a9 ("drm/virtio: Improve DMA API usage for shmem BOs") Signed-off-by: Oleksandr Tyshchenko Reviewed-by: Dmitry Osipenko Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20230224153450.526222-1-olekstysh@gmail.com commit f3a2439f20d918930cc4ae8f76fe1c1afd26958f Merge: cc38a46de76e1 7c855ef7137a6 Author: Linus Torvalds Date: Sun Feb 26 12:18:36 2023 -0800 Merge tag 'rproc-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux Pull remoteproc updates from Bjorn Andersson: - Support for PRU clients to acquire a control reference to the PRU instances is introduced, and the PRU now allows specifying firmware-name in Devicetree. sysfs is requested to be read-only when the remoteproc instance is consumed by another kernel driver - Support for the C7xv DSP on AM62A SoC is introduced - The Devicetree binding for the Qualcomm PAS devices are split up in multiple files, to better account for the differences in resources between them. A number of missing Devicetree bindings are added, and the Qualcomm WCNSS binding is converted to YAML - A few cleanups are introduced for the Mediatek SCP driver. And a sanity check of the firmware image is introduced in the Mediatek driver - For Qualcomm SC7280 ADSP support is added, MSM8953 gains ADSP and modem support, SM6115 and SM8550 gains ADSP, CDSP and modem support, and support for pronto v3 support (used on e.g. MSM8953) is added - The Qualcomm modem remoteproc driver is modified to use a no-map reserved-memory region for it's authentication metadata, in order to avoid fatal security violations caused by accesses from Linux during the authentication process - Support for separate loading of a Devicetree blob is added to the PAS driver, and support for the PAS driver to carve out DSM memory for the modem is added as well - The Qualcomm ADSP remoteproc driver gains support for mapping memory into specific range using the IOMMU. The sysmon driver is transitioned to strlcpy() * tag 'rproc-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: (69 commits) dt-bindings: mailbox: qcom,apcs-kpss-global: drop mbox-names from example dt-bindings: remoteproc: qcom,glink-edge: correct label description dt-bindings: remoteproc: qcom,glink-rpm-edge: convert to DT schema dt-bindings: remoteproc: qcom,sm8550-pas: correct power domains remoteproc: qcom_q6v5_pas: enable sm8550 adsp & cdsp autoboot dt-bindings: remoteproc: qcom: Add sm6115 pas yaml file remoteproc: qcom: pas: Add sm6115 remoteprocs remoteproc: qcom: pas: Adjust the phys addr wrt the mem region remoteproc: qcom: fix sparse warnings remoteproc: qcom: replace kstrdup with kstrndup remoteproc: mediatek: Check the SCP image format remoteproc: qcom_q6v5_mss: Use a carveout to authenticate modem headers Revert "remoteproc: qcom_q6v5_mss: map/unmap metadata region before/after use" dt-bindings: remoteproc: qcom,sc7280-mss-pil: Update memory-region dt-bindings: remoteproc: qcom,sc7180-mss-pil: Update memory-region dt-bindings: remoteproc: qcom,msm8996-mss-pil: Update memory region dt-bindings: remoteproc: qcom,q6v5: Move MSM8996 to schema remoteproc: qcom_q6v5_pas: add sm8550 adsp, cdsp & mpss compatible & data remoteproc: qcom_q6v5_pas: add support for assigning memory to firmware remoteproc: qcom_q6v5_pas: add support for dtb co-firmware loading ... commit cc38a46de76e15d20bea5768e99af17b65a9caeb Merge: 9b0b0dd857652 fb80ef67e8ff6 Author: Linus Torvalds Date: Sun Feb 26 12:10:28 2023 -0800 Merge tag 'rpmsg-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux Pull rpmsg updates from Bjorn Andersson: - rpmsg ctrl and char driver locking is ensure ordering in cases where the communication link is being torn down in parallel with calls to open(2) or poll(2) - The glink driver is refactored, to move rpm/smem-specifics out of the common logic and better suite further improvements, such as transports without a mailbox controller. The handling of remoteproc shutdown is improved, to fail clients immediately instead of having them to wait for timeouts. A driver_override memory leak is corrected and a few spelling improvements are introduced - glink_ssr is transitioned off strlcpy() and "gpr" is added as a valid child node of the glink-edge DT binding * tag 'rpmsg-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: rpmsg: glink: Release driver_override rpmsg: glink: Avoid infinite loop on intent for missing channel rpmsg: glink: Fix GLINK command prefix rpmsg: glink: Fix spelling of peek rpmsg: glink: Cancel pending intent requests at removal rpmsg: glink: Fail qcom_glink_tx() once remove has been initiated rpmsg: glink: Move irq and mbox handling to transports rpmsg: glink: rpm: Wrap driver context rpmsg: glink: smem: Wrap driver context rpmsg: glink: Extract tx kick operation rpmsg: glink: Include types in qcom_glink_native.h rpmsg: ctrl: Add lock to rpmsg_ctrldev_remove rpmsg: char: Add lock to avoid race when rpmsg device is released rpmsg: move from strlcpy with unused retval to strscpy dt-bindings: remoteproc: qcom,glink-edge: add GPR node commit 9b0b0dd857652bf77d5350c6aec6cae767c48824 Merge: 498a1cf902c31 95e158ec84366 Author: Linus Torvalds Date: Sun Feb 26 12:05:38 2023 -0800 Merge tag 'hwlock-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux Pull hwspinlock updates from Bjorn Andersson: "This updates the sun6i DT binding to allow (and require) #hwlock-cells and makes use of device_match_of_node() to slight clean up the condition in of_hwspin_lock_get_id()" * tag 'hwlock-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: dt-bindings: hwlock: sun6i: Add #hwlock-cells to example dt-bindings: hwlock: sun6i: Add missing #hwlock-cells hwspinlock: Use device_match_of_node() commit 498a1cf902c31c3af398082d65cf150b33b367e6 Merge: 4b8c673b761e7 7adf14d8aca1e Author: Linus Torvalds Date: Sun Feb 26 11:53:25 2023 -0800 Merge tag 'kbuild-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - Change V=1 option to print both short log and full command log - Allow V=1 and V=2 to be combined as V=12 - Make W=1 detect wrong .gitignore files - Tree-wide cleanups for unused command line arguments passed to Clang - Stop using -Qunused-arguments with Clang - Make scripts/setlocalversion handle only correct release tags instead of any arbitrary annotated tag - Create Debian and RPM source packages without cleaning the source tree - Various cleanups for packaging * tag 'kbuild-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (74 commits) kbuild: rpm-pkg: remove unneeded KERNELRELEASE from modules/headers_install docs: kbuild: remove description of KBUILD_LDS_MODULE .gitattributes: use 'dts' diff driver for *.dtso files kbuild: deb-pkg: improve the usability of source package kbuild: deb-pkg: fix binary-arch and clean in debian/rules kbuild: tar-pkg: use tar rules in scripts/Makefile.package kbuild: make perf-tar*-src-pkg work without relying on git kbuild: deb-pkg: switch over to source format 3.0 (quilt) kbuild: deb-pkg: make .orig tarball a hard link if possible kbuild: deb-pkg: hide KDEB_SOURCENAME from Makefile kbuild: srcrpm-pkg: create source package without cleaning kbuild: rpm-pkg: build binary packages from source rpm kbuild: deb-pkg: create source package without cleaning kbuild: add a tool to list files ignored by git Documentation/llvm: add Chimera Linux, Google and Meta datacenters setlocalversion: use only the correct release tag for git-describe setlocalversion: clean up the construction of version output .gitignore: ignore *.cover and *.mbx kbuild: remove --include-dir MAKEFLAG from top Makefile kbuild: fix trivial typo in comment ... commit 4b8c673b761e74add4fd185d806ac16c9b40158f Merge: d4563201f33a0 3e62aba8284de Author: Linus Torvalds Date: Sun Feb 26 11:47:26 2023 -0800 Merge tag 'media/v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - Removal of several VB1-only deprecated drivers: cpia2, fsl-viu, meye, stkwebcam, tm6000, vpfe_capture and zr364xx - saa7146 recovered from staging/deprecated. We opted to give ti a chance, and, instead of deprecating it, the intention is to write patches migrating it from VB1 to VB2. - av7110 returned from staging/deprecated/ to staging/ as we're not planning on dropping it any time soon - media controller API has gained experimental support for G_ROUTING and streams API. No drivers use it right now. We're planning to add one after -rc1, giving some time to experience the API and eventually have changes during the next development cycle - New sensor drivers: imx296, imx415, ov8858 - Atomisp had lots of changes, specially on its sensor's interface, making atomisp sensor drivers closer to normal sensor drivers - media controller kAPI has gained some helpers to traverse pipelines - uvcvideo now better support power line control - lots of bug fixes, cleanups and driver improvements * tag 'media/v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (296 commits) media: imx-mipi-csis: Check csis_fmt validity before use media: v4l2-subdev.c: clear stream field media: v4l2-ctrls-api.c: move ctrl->is_new = 1 to the correct line media: Revert "media: saa7146: deprecate hexium_gemini/orion, mxb and ttpci" media: Revert "media: av7110: move to staging/media/deprecated/saa7146" media: imx-pxp: convert to regmap media: imx-pxp: Use non-threaded IRQ media: imx-pxp: Introduce pxp_read() and pxp_write() wrappers media: imx-pxp: Implement frame size enumeration media: imx-pxp: Pass pixel format value to find_format() media: imx-pxp: Add media controller support media: imx-pxp: Don't set bus_info manually in .querycap() media: imx-pxp: Sort headers alphabetically media: imx-pxp: add support for i.MX7D media: imx-pxp: make data_path_ctrl0 platform dependent media: imx-pxp: disable LUT block media: imx-pxp: explicitly disable unused blocks media: imx-pxp: extract helper function to setup data path media: imx-pxp: detect PXP version media: dt-bindings: media: fsl-pxp: convert to yaml ... commit d4563201f33a022fc0353033d9dfeb1606a88330 Author: Linus Torvalds Date: Sun Feb 26 11:25:04 2023 -0800 Documentation: simplify and clarify DCO contribution example language Long long ago, in a more innocent time, Greg wrote the clarification for how the DCO should work and that you couldn't make anonymous contributions, because the sign-off needed to be something we could check back with. It was 2006, and nobody reacted to the wording, the whole Facebook 'real name' controversy was a decade in the future, and nobody even thought about it. And despite the language, we've always accepted nicknames and that language was never meant to be any kind of exclusionary wording. In fact, even when it became a discussion in other adjacent projects, apparently nobody even thought to just clarify the language in the kernel docs, and instead we had projects like the CNCF that had long discussions about it, and wrote their own clarifications [1] of it. Just simplify the wording to the point where it shouldn't be causing unnecessary angst and pain, or scare away people who go by preferred naming. Link: https://github.com/cncf/foundation/blob/659fd32c86dc/dco-guidelines.md [1] Fixes: af45f32d25cc ("We can not allow anonymous contributions to the kernel") Acked-by: Greg KH Acked-by: Michael Dolan Signed-off-by: Linus Torvalds commit f7c4d9b133c7a04ca619355574e96b6abf209fba Author: Ilya Dryomov Date: Fri Feb 24 18:48:54 2023 +0100 rbd: avoid use-after-free in do_rbd_add() when rbd_dev_create() fails If getting an ID or setting up a work queue in rbd_dev_create() fails, use-after-free on rbd_dev->rbd_client, rbd_dev->spec and rbd_dev->opts is triggered in do_rbd_add(). The root cause is that the ownership of these structures is transfered to rbd_dev prematurely and they all end up getting freed when rbd_dev_create() calls rbd_dev_free() prior to returning to do_rbd_add(). Found by Linux Verification Center (linuxtesting.org) with SVACE, an incomplete patch submitted by Natalia Petrova . Cc: stable@vger.kernel.org Fixes: 1643dfa4c2c8 ("rbd: introduce a per-device ordered workqueue") Signed-off-by: Ilya Dryomov commit e027253c4b77d395798600a90b6a96fe4adf4d5e Author: Xiubo Li Date: Mon Feb 13 13:56:20 2023 +0800 ceph: update the time stamps and try to drop the suid/sgid The fallocate will try to clear the suid/sgid if a unprevileged user changed the file. There is no POSIX item requires that we should clear the suid/sgid in fallocate code path but this is the default behaviour for most of the filesystems and the VFS layer. And also the same for the write code path, which have already support it. And also we need to update the time stamps since the fallocate will change the file contents. Cc: stable@vger.kernel.org Link: https://tracker.ceph.com/issues/58054 Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 724337be7f218111cd798702e2e17bfc6615744b Author: Russell King (Oracle) Date: Fri Feb 24 16:44:20 2023 +0000 net: dsa: ocelot_ext: remove unnecessary phylink.h include During review of ocelot_ext, it created a private phylink instance that wasn't necessary. This was removed for subsequent postings, but the include file seems to have been left behind. Remove it. Signed-off-by: Russell King (Oracle) Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 5f79f12c08a4ddf5f00eb736e156020dbb0489a9 Merge: 3fa10563361eb ef1a99c65edb5 Author: David S. Miller Date: Sun Feb 26 18:31:37 2023 +0000 Merge branch 'net-ocelot-switch-regressions' Vladimir Oltean says: ==================== Regressions in Ocelot switch drivers These are 3 patches which resolve a regression in the Seville driver, one in the Felix driver and a generic one which affects any kernel compiled with 2 Kconfig options enabled. All of them have in common my lack of attention during review/testing. The patches touch the DSA, MFD and MDIO drivers for Ocelot. I think it would be preferable if all patches went through netdev (with Lee's Ack). ==================== Signed-off-by: David S. Miller commit ef1a99c65edb504c509a5c4aa865830867df6e7b Author: Vladimir Oltean Date: Fri Feb 24 17:52:35 2023 +0200 net: mscc: ocelot: fix duplicate driver name error When compiling a kernel which has both CONFIG_NET_DSA_MSCC_OCELOT_EXT and CONFIG_MSCC_OCELOT_SWITCH enabled, the following error message will be printed: [ 5.266588] Error: Driver 'ocelot-switch' is already registered, aborting... Rename the ocelot_ext.c driver to "ocelot-ext-switch" to avoid the name duplication, and update the mfd_cell entry for its resources. Fixes: 3d7316ac81ac ("net: dsa: ocelot: add external ocelot switch control") Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 940af261321307cd1dd0fe8f9c34a6129f9d4bdc Author: Vladimir Oltean Date: Fri Feb 24 17:52:34 2023 +0200 net: dsa: felix: fix internal MDIO controller resource length The blamed commit did not properly convert the resource start/end format into the DEFINE_RES_MEM_NAMED() start/length format, resulting in a resource for vsc9959_imdio_res which is much longer than expected: $ cat /proc/iomem 1f8000000-1f815ffff : pcie@1f0000000 1f8140000-1f815ffff : 0000:00:00.5 1f8148030-1f815006f : imdio vs (correct) $ cat /proc/iomem 1f8000000-1f815ffff : pcie@1f0000000 1f8140000-1f815ffff : 0000:00:00.5 1f8148030-1f814803f : imdio Luckily it's not big enough to exceed the size of the parent resource (pci_resource_end(pdev, VSC9959_IMDIO_PCI_BAR)), and it doesn't overlap with anything else that the Linux driver uses currently, so the larger than expected size isn't a practical problem that I can see. Although it is clearly wrong in the /proc/iomem output. Fixes: 044d447a801f ("net: dsa: felix: use DEFINE_RES_MEM_NAMED for resources") Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 0322ef49c1ac6f0e2ef37b146c0bf8440873072c Author: Vladimir Oltean Date: Fri Feb 24 17:52:33 2023 +0200 net: dsa: seville: ignore mscc-miim read errors from Lynx PCS During the refactoring in the commit below, vsc9953_mdio_read() was replaced with mscc_miim_read(), which has one extra step: it checks for the MSCC_MIIM_DATA_ERROR bits before returning the result. On T1040RDB, there are 8 QSGMII PCSes belonging to the switch, and they are organized in 2 groups. First group responds to MDIO addresses 4-7 because QSGMIIACR1[MDEV_PORT] is 1, and the second group responds to MDIO addresses 8-11 because QSGMIIBCR1[MDEV_PORT] is 2. I have double checked that these values are correctly set in the SERDES, as well as PCCR1[QSGMA_CFG] and PCCR1[QSGMB_CFG] are both 0b01. mscc_miim_read: phyad 8 reg 0x1 MIIM_DATA 0x2d mscc_miim_read: phyad 8 reg 0x5 MIIM_DATA 0x5801 mscc_miim_read: phyad 8 reg 0x1 MIIM_DATA 0x2d mscc_miim_read: phyad 8 reg 0x5 MIIM_DATA 0x5801 mscc_miim_read: phyad 9 reg 0x1 MIIM_DATA 0x2d mscc_miim_read: phyad 9 reg 0x5 MIIM_DATA 0x5801 mscc_miim_read: phyad 9 reg 0x1 MIIM_DATA 0x2d mscc_miim_read: phyad 9 reg 0x5 MIIM_DATA 0x5801 mscc_miim_read: phyad 10 reg 0x1 MIIM_DATA 0x2d mscc_miim_read: phyad 10 reg 0x5 MIIM_DATA 0x5801 mscc_miim_read: phyad 10 reg 0x1 MIIM_DATA 0x2d mscc_miim_read: phyad 10 reg 0x5 MIIM_DATA 0x5801 mscc_miim_read: phyad 11 reg 0x1 MIIM_DATA 0x2d mscc_miim_read: phyad 11 reg 0x5 MIIM_DATA 0x5801 mscc_miim_read: phyad 11 reg 0x1 MIIM_DATA 0x2d mscc_miim_read: phyad 11 reg 0x5 MIIM_DATA 0x5801 mscc_miim_read: phyad 4 reg 0x1 MIIM_DATA 0x3002d, ERROR mscc_miim_read: phyad 4 reg 0x5 MIIM_DATA 0x3da01, ERROR mscc_miim_read: phyad 5 reg 0x1 MIIM_DATA 0x3002d, ERROR mscc_miim_read: phyad 5 reg 0x5 MIIM_DATA 0x35801, ERROR mscc_miim_read: phyad 5 reg 0x1 MIIM_DATA 0x3002d, ERROR mscc_miim_read: phyad 5 reg 0x5 MIIM_DATA 0x35801, ERROR mscc_miim_read: phyad 6 reg 0x1 MIIM_DATA 0x3002d, ERROR mscc_miim_read: phyad 6 reg 0x5 MIIM_DATA 0x35801, ERROR mscc_miim_read: phyad 6 reg 0x1 MIIM_DATA 0x3002d, ERROR mscc_miim_read: phyad 6 reg 0x5 MIIM_DATA 0x35801, ERROR mscc_miim_read: phyad 7 reg 0x1 MIIM_DATA 0x3002d, ERROR mscc_miim_read: phyad 7 reg 0x5 MIIM_DATA 0x35801, ERROR mscc_miim_read: phyad 7 reg 0x1 MIIM_DATA 0x3002d, ERROR mscc_miim_read: phyad 7 reg 0x5 MIIM_DATA 0x35801, ERROR As can be seen, the data in MIIM_DATA is still valid despite having the MSCC_MIIM_DATA_ERROR bits set. The driver as introduced in commit 84705fc16552 ("net: dsa: felix: introduce support for Seville VSC9953 switch") was ignoring these bits, perhaps deliberately (although unbeknownst to me). This is an old IP and the hardware team cannot seem to be able to help me track down a plausible reason for these failures. I'll keep investigating, but in the meantime, this is a direct regression which must be restored to a working state. The only thing I can do is keep ignoring the errors as before. Fixes: b99658452355 ("net: dsa: ocelot: felix: utilize shared mscc-miim driver for indirect MDIO access") Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 3fa10563361eb4e998f8916d274a2afdbce3fc19 Merge: aaa3c08ee0653 4a20056a49a18 Author: David S. Miller Date: Sun Feb 26 18:27:46 2023 +0000 Merge branch 'net-sched-action-bind' Pedro Tammela says: ==================== net/sched: fix action bind logic Some actions are not handling the case where an action can be created and bound to a filter independently. These actions are checking for parameters only passed in the netlink message for create/change/replace, which then errors out for valid uses like: tc filter ... action pedit index 1 In the iproute2 side, we saw a couple of actions with their parsers broken when passing "index 1" as the only action argument, while the kernel side accepted it correctly. We fixed those as well. ==================== Signed-off-by: David S. Miller commit 4a20056a49a1854966562241922f68197f950539 Author: Pedro Tammela Date: Fri Feb 24 12:00:58 2023 -0300 net/sched: act_sample: fix action bind logic The TC architecture allows filters and actions to be created independently. In filters the user can reference action objects using: tc action add action sample ... index 1 tc filter add ... action pedit index 1 In the current code for act_sample this is broken as it checks netlink attributes for create/update before actually checking if we are binding to an existing action. tdc results: 1..29 ok 1 9784 - Add valid sample action with mandatory arguments ok 2 5c91 - Add valid sample action with mandatory arguments and continue control action ok 3 334b - Add valid sample action with mandatory arguments and drop control action ok 4 da69 - Add valid sample action with mandatory arguments and reclassify control action ok 5 13ce - Add valid sample action with mandatory arguments and pipe control action ok 6 1886 - Add valid sample action with mandatory arguments and jump control action ok 7 7571 - Add sample action with invalid rate ok 8 b6d4 - Add sample action with mandatory arguments and invalid control action ok 9 a874 - Add invalid sample action without mandatory arguments ok 10 ac01 - Add invalid sample action without mandatory argument rate ok 11 4203 - Add invalid sample action without mandatory argument group ok 12 14a7 - Add invalid sample action without mandatory argument group ok 13 8f2e - Add valid sample action with trunc argument ok 14 45f8 - Add sample action with maximum rate argument ok 15 ad0c - Add sample action with maximum trunc argument ok 16 83a9 - Add sample action with maximum group argument ok 17 ed27 - Add sample action with invalid rate argument ok 18 2eae - Add sample action with invalid group argument ok 19 6ff3 - Add sample action with invalid trunc size ok 20 2b2a - Add sample action with invalid index ok 21 dee2 - Add sample action with maximum allowed index ok 22 560e - Add sample action with cookie ok 23 704a - Replace existing sample action with new rate argument ok 24 60eb - Replace existing sample action with new group argument ok 25 2cce - Replace existing sample action with new trunc argument ok 26 59d1 - Replace existing sample action with new control argument ok 27 0a6e - Replace sample action with invalid goto chain control ok 28 3872 - Delete sample action with valid index ok 29 a394 - Delete sample action with invalid index Fixes: 5c5670fae430 ("net/sched: Introduce sample tc action") Reviewed-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit e88d78a773cb5242e933930c8855bf4b2e8c2397 Author: Pedro Tammela Date: Fri Feb 24 12:00:57 2023 -0300 net/sched: act_mpls: fix action bind logic The TC architecture allows filters and actions to be created independently. In filters the user can reference action objects using: tc action add action mpls ... index 1 tc filter add ... action mpls index 1 In the current code for act_mpls this is broken as it checks netlink attributes for create/update before actually checking if we are binding to an existing action. tdc results: 1..53 ok 1 a933 - Add MPLS dec_ttl action with pipe opcode ok 2 08d1 - Add mpls dec_ttl action with pass opcode ok 3 d786 - Add mpls dec_ttl action with drop opcode ok 4 f334 - Add mpls dec_ttl action with reclassify opcode ok 5 29bd - Add mpls dec_ttl action with continue opcode ok 6 48df - Add mpls dec_ttl action with jump opcode ok 7 62eb - Add mpls dec_ttl action with trap opcode ok 8 09d2 - Add mpls dec_ttl action with opcode and cookie ok 9 c170 - Add mpls dec_ttl action with opcode and cookie of max length ok 10 9118 - Add mpls dec_ttl action with invalid opcode ok 11 6ce1 - Add mpls dec_ttl action with label (invalid) ok 12 352f - Add mpls dec_ttl action with tc (invalid) ok 13 fa1c - Add mpls dec_ttl action with ttl (invalid) ok 14 6b79 - Add mpls dec_ttl action with bos (invalid) ok 15 d4c4 - Add mpls pop action with ip proto ok 16 91fb - Add mpls pop action with ip proto and cookie ok 17 92fe - Add mpls pop action with mpls proto ok 18 7e23 - Add mpls pop action with no protocol (invalid) ok 19 6182 - Add mpls pop action with label (invalid) ok 20 6475 - Add mpls pop action with tc (invalid) ok 21 067b - Add mpls pop action with ttl (invalid) ok 22 7316 - Add mpls pop action with bos (invalid) ok 23 38cc - Add mpls push action with label ok 24 c281 - Add mpls push action with mpls_mc protocol ok 25 5db4 - Add mpls push action with label, tc and ttl ok 26 7c34 - Add mpls push action with label, tc ttl and cookie of max length ok 27 16eb - Add mpls push action with label and bos ok 28 d69d - Add mpls push action with no label (invalid) ok 29 e8e4 - Add mpls push action with ipv4 protocol (invalid) ok 30 ecd0 - Add mpls push action with out of range label (invalid) ok 31 d303 - Add mpls push action with out of range tc (invalid) ok 32 fd6e - Add mpls push action with ttl of 0 (invalid) ok 33 19e9 - Add mpls mod action with mpls label ok 34 1fde - Add mpls mod action with max mpls label ok 35 0c50 - Add mpls mod action with mpls label exceeding max (invalid) ok 36 10b6 - Add mpls mod action with mpls label of MPLS_LABEL_IMPLNULL (invalid) ok 37 57c9 - Add mpls mod action with mpls min tc ok 38 6872 - Add mpls mod action with mpls max tc ok 39 a70a - Add mpls mod action with mpls tc exceeding max (invalid) ok 40 6ed5 - Add mpls mod action with mpls ttl ok 41 77c1 - Add mpls mod action with mpls ttl and cookie ok 42 b80f - Add mpls mod action with mpls max ttl ok 43 8864 - Add mpls mod action with mpls min ttl ok 44 6c06 - Add mpls mod action with mpls ttl of 0 (invalid) ok 45 b5d8 - Add mpls mod action with mpls ttl exceeding max (invalid) ok 46 451f - Add mpls mod action with mpls max bos ok 47 a1ed - Add mpls mod action with mpls min bos ok 48 3dcf - Add mpls mod action with mpls bos exceeding max (invalid) ok 49 db7c - Add mpls mod action with protocol (invalid) ok 50 b070 - Replace existing mpls push action with new ID ok 51 95a9 - Replace existing mpls push action with new label, tc, ttl and cookie ok 52 6cce - Delete mpls pop action ok 53 d138 - Flush mpls actions Fixes: 2a2ea50870ba ("net: sched: add mpls manipulation actions to TC") Reviewed-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit e9e42292ea76a8358b0c02ffd530d78e133a1b73 Author: Pedro Tammela Date: Fri Feb 24 12:00:56 2023 -0300 net/sched: act_pedit: fix action bind logic The TC architecture allows filters and actions to be created independently. In filters the user can reference action objects using: tc action add action pedit ... index 1 tc filter add ... action pedit index 1 In the current code for act_pedit this is broken as it checks netlink attributes for create/update before actually checking if we are binding to an existing action. tdc results: 1..69 ok 1 319a - Add pedit action that mangles IP TTL ok 2 7e67 - Replace pedit action with invalid goto chain ok 3 377e - Add pedit action with RAW_OP offset u32 ok 4 a0ca - Add pedit action with RAW_OP offset u32 (INVALID) ok 5 dd8a - Add pedit action with RAW_OP offset u16 u16 ok 6 53db - Add pedit action with RAW_OP offset u16 (INVALID) ok 7 5c7e - Add pedit action with RAW_OP offset u8 add value ok 8 2893 - Add pedit action with RAW_OP offset u8 quad ok 9 3a07 - Add pedit action with RAW_OP offset u8-u16-u8 ok 10 ab0f - Add pedit action with RAW_OP offset u16-u8-u8 ok 11 9d12 - Add pedit action with RAW_OP offset u32 set u16 clear u8 invert ok 12 ebfa - Add pedit action with RAW_OP offset overflow u32 (INVALID) ok 13 f512 - Add pedit action with RAW_OP offset u16 at offmask shift set ok 14 c2cb - Add pedit action with RAW_OP offset u32 retain value ok 15 1762 - Add pedit action with RAW_OP offset u8 clear value ok 16 bcee - Add pedit action with RAW_OP offset u8 retain value ok 17 e89f - Add pedit action with RAW_OP offset u16 retain value ok 18 c282 - Add pedit action with RAW_OP offset u32 clear value ok 19 c422 - Add pedit action with RAW_OP offset u16 invert value ok 20 d3d3 - Add pedit action with RAW_OP offset u32 invert value ok 21 57e5 - Add pedit action with RAW_OP offset u8 preserve value ok 22 99e0 - Add pedit action with RAW_OP offset u16 preserve value ok 23 1892 - Add pedit action with RAW_OP offset u32 preserve value ok 24 4b60 - Add pedit action with RAW_OP negative offset u16/u32 set value ok 25 a5a7 - Add pedit action with LAYERED_OP eth set src ok 26 86d4 - Add pedit action with LAYERED_OP eth set src & dst ok 27 f8a9 - Add pedit action with LAYERED_OP eth set dst ok 28 c715 - Add pedit action with LAYERED_OP eth set src (INVALID) ok 29 8131 - Add pedit action with LAYERED_OP eth set dst (INVALID) ok 30 ba22 - Add pedit action with LAYERED_OP eth type set/clear sequence ok 31 dec4 - Add pedit action with LAYERED_OP eth set type (INVALID) ok 32 ab06 - Add pedit action with LAYERED_OP eth add type ok 33 918d - Add pedit action with LAYERED_OP eth invert src ok 34 a8d4 - Add pedit action with LAYERED_OP eth invert dst ok 35 ee13 - Add pedit action with LAYERED_OP eth invert type ok 36 7588 - Add pedit action with LAYERED_OP ip set src ok 37 0fa7 - Add pedit action with LAYERED_OP ip set dst ok 38 5810 - Add pedit action with LAYERED_OP ip set src & dst ok 39 1092 - Add pedit action with LAYERED_OP ip set ihl & dsfield ok 40 02d8 - Add pedit action with LAYERED_OP ip set ttl & protocol ok 41 3e2d - Add pedit action with LAYERED_OP ip set ttl (INVALID) ok 42 31ae - Add pedit action with LAYERED_OP ip ttl clear/set ok 43 486f - Add pedit action with LAYERED_OP ip set duplicate fields ok 44 e790 - Add pedit action with LAYERED_OP ip set ce, df, mf, firstfrag, nofrag fields ok 45 cc8a - Add pedit action with LAYERED_OP ip set tos ok 46 7a17 - Add pedit action with LAYERED_OP ip set precedence ok 47 c3b6 - Add pedit action with LAYERED_OP ip add tos ok 48 43d3 - Add pedit action with LAYERED_OP ip add precedence ok 49 438e - Add pedit action with LAYERED_OP ip clear tos ok 50 6b1b - Add pedit action with LAYERED_OP ip clear precedence ok 51 824a - Add pedit action with LAYERED_OP ip invert tos ok 52 106f - Add pedit action with LAYERED_OP ip invert precedence ok 53 6829 - Add pedit action with LAYERED_OP beyond ip set dport & sport ok 54 afd8 - Add pedit action with LAYERED_OP beyond ip set icmp_type & icmp_code ok 55 3143 - Add pedit action with LAYERED_OP beyond ip set dport (INVALID) ok 56 815c - Add pedit action with LAYERED_OP ip6 set src ok 57 4dae - Add pedit action with LAYERED_OP ip6 set dst ok 58 fc1f - Add pedit action with LAYERED_OP ip6 set src & dst ok 59 6d34 - Add pedit action with LAYERED_OP ip6 dst retain value (INVALID) ok 60 94bb - Add pedit action with LAYERED_OP ip6 traffic_class ok 61 6f5e - Add pedit action with LAYERED_OP ip6 flow_lbl ok 62 6795 - Add pedit action with LAYERED_OP ip6 set payload_len, nexthdr, hoplimit ok 63 1442 - Add pedit action with LAYERED_OP tcp set dport & sport ok 64 b7ac - Add pedit action with LAYERED_OP tcp sport set (INVALID) ok 65 cfcc - Add pedit action with LAYERED_OP tcp flags set ok 66 3bc4 - Add pedit action with LAYERED_OP tcp set dport, sport & flags fields ok 67 f1c8 - Add pedit action with LAYERED_OP udp set dport & sport ok 68 d784 - Add pedit action with mixed RAW/LAYERED_OP #1 ok 69 70ca - Add pedit action with mixed RAW/LAYERED_OP #2 Fixes: 71d0ed7079df ("net/act_pedit: Support using offset relative to the conventional network headers") Fixes: f67169fef8db ("net/sched: act_pedit: fix WARN() in the traffic path") Reviewed-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 52fd90638a7269be2a6f6cf1e4dea6724f8e13b6 Author: Johannes Berg Date: Fri Feb 24 13:59:34 2023 +0100 wifi: wext: warn about usage only once Warn only once since the ratelimit parameters are still allowing too many messages to happen. This will no longer tell you all the different processes, but still gives a heads-up of sorts. Also modify the message to note that wext stops working for future Wi-Fi 7 hardware, this is already implemented in commit 4ca69027691a ("wifi: wireless: deny wireless extensions on MLO-capable devices") and is maybe of more relevance to users than the fact that we'd like to have wireless extensions deprecated. The issue with Wi-Fi 7 is that you can now have multiple connections to the same AP, so a whole bunch of things now become per link rather than per netdev, which can't really be handled in wireless extensions. Signed-off-by: Johannes Berg Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230224135933.94104aeda1a0.Ie771c6a66d7d6c3cf67da5f3b0c66cea66fd514c@changeid commit cf45efcb250ea788085f330db972256735f970e0 Author: Lorenzo Bianconi Date: Fri Feb 24 00:02:17 2023 +0100 wifi: mt76: usb: fix use-after-free in mt76u_free_rx_queue Fix the following use-after-free issue in mt76u_free_rx_queue routine: usb 3-3.3.4: reset high-speed USB device number 8 using xhci_hcd iwlwifi 0000:05:00.0: Detected RF HR B3, rfid=0x10a100 iwlwifi 0000:05:00.0: base HW address: 50:eb:71:79:02:57 iwlwifi 0000:05:00.0 wlp5s0: renamed from wlan0 mt76x2u 3-3.3.4:1.0: ASIC revision: 76320044 usb 3-3.3.1: 1:3 : unsupported format bits 0x100000000 mt76x2u 3-3.3.4:1.0: could not get hardware semaphore for ROM PATCH ------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: CPU: 13 PID: 983 at lib/refcount.c:28 refcount_warn_saturate+0xba/0x110 Modules linked in: snd_seq_midi snd_seq_midi_event mt76x2u(+) mt76x2_common mt76x02_usb mt76_usb iwlmvm mt76x02_lib mt76 snd_hda_codec_realtek intel_rapl_msr snd_hda_codec_generic snd_hda_codec_hdmi intel_rapl_common snd_hda_intel mac80211 snd_intel_dspcfg snd_usb_audio(+) snd_intel_sdw_acpi btusb edac_mce_amd snd_hda_codec btrtl btbcm snd_usbmidi_lib snd_hda_core btintel snd_rawmidi btmtk snd_hwdep libarc4 mc iwlwifi kvm_amd snd_seq vfat bluetooth eeepc_wmi asus_ec_sensors snd_seq_device fat kvm cfg80211 asus_wmi snd_pcm irqbypass ledtrig_audio sparse_keymap rapl wmi_bmof platform_profile xpad snd_timer k10temp ff_memless i2c_piix4 rfkill snd joydev soundcore acpi_cpufreq loop zram amdgpu crct10dif_pclmul crc32_pclmul crc32c_intel polyval_clmulni polyval_generic drm_ttm_helper ttm video iommu_v2 ucsi_ccg drm_buddy gpu_sched typec_ucsi ghash_clmulni_intel drm_display_helper igb sha512_ssse3 typec ccp nvme cec sp5100_tco nvme_core dca nvme_common wmi ip6_tables ip_tables fuse BTRFS info (device nvme1n1): enabling ssd optimizations CPU: 13 PID: 983 Comm: (udev-worker) Tainted: G W L ------- --- 6.3.0-0.rc0.20230222git5b7c4cabbb65.3.fc39.x86_64+debug BTRFS info (device nvme1n1): auto enabling async discard Hardware name: System manufacturer System Product Name/ROG STRIX X570-I GAMING, BIOS 4601 02/02/2023 RIP: 0010:refcount_warn_saturate+0xba/0x110 Code: 01 01 e8 69 a6 83 ff 0f 0b e9 52 f4 85 00 80 3d 69 6f ec 01 00 75 85 48 c7 c7 d0 25 b3 a9 c6 05 59 6f ec 01 01 e8 46 a6 83 ff <0f> 0b e9 2f f4 85 00 80 3d 47 6f ec 01 00 0f 85 5e ff ff ff 48 c7 RSP: 0018:ffffb4010456fb78 EFLAGS: 00010286 RAX: 0000000000000000 RBX: 0000000080000000 RCX: 0000000000000000 RDX: 0000000000000002 RSI: ffffffffa9b17e3e RDI: 00000000ffffffff RBP: ffff8d15877336c0 R08: 0000000000000000 R09: ffffb4010456fa00 R10: 0000000000000003 R11: ffff8d246e2fffe8 R12: 0000000000000080 R13: ffff8d15b42fd000 R14: 0000000000000000 R15: ffff8d1587736a58 FS: 00007fc05ae34940(0000) GS:ffff8d2425e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055d801f1d540 CR3: 000000011df60000 CR4: 0000000000350ee0 Call Trace: mt76u_queues_deinit+0x2a0/0x370 [mt76_usb] mt76x2u_probe+0xf3/0x130 [mt76x2u] usb_probe_interface+0xe8/0x300 really_probe+0x1b6/0x410 __driver_probe_device+0x78/0x170 driver_probe_device+0x1f/0x90 __driver_attach+0xd2/0x1c0 ? __pfx___driver_attach+0x10/0x10 bus_for_each_dev+0x8a/0xd0 bus_add_driver+0x141/0x230 driver_register+0x77/0x120 usb_register_driver+0xaf/0x170 ? __pfx_init_module+0x10/0x10 [mt76x2u] do_one_initcall+0x6e/0x350 do_init_module+0x4a/0x220 __do_sys_init_module+0x192/0x1c0 ? lock_is_held_type+0xce/0x120 do_syscall_64+0x5b/0x80 ? lock_is_held_type+0xce/0x120 ? asm_exc_page_fault+0x22/0x30 ? lockdep_hardirqs_on+0x7d/0x100 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7fc05b1351be Code: 48 8b 0d 4d 0c 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 af 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 1a 0c 0c 00 f7 d8 64 89 01 48 RSP: 002b:00007ffd947c0988 EFLAGS: 00000246 ORIG_RAX: 00000000000000af RAX: ffffffffffffffda RBX: 000055d801f2b090 RCX: 00007fc05b1351be RDX: 00007fc05b65c07d RSI: 00000000000234be RDI: 000055d802c6b170 RBP: 00007ffd947c0a40 R08: 000055d8019b4690 R09: 0000000000022000 R10: 000000055d8019b4 R11: 0000000000000246 R12: 00007fc05b65c07d R13: 0000000000020000 R14: 000055d801f39770 R15: 000055d801f47780 irq event stamp: 186313 hardirqs last enabled at (186323): [] __up_console_sem+0x5e/0x70 hardirqs last disabled at (186332): [] __up_console_sem+0x43/0x70 softirqs last enabled at (186022): [] __irq_exit_rcu+0xd7/0x160 softirqs last disabled at (186017): [] __irq_exit_rcu+0xd7/0x160 ---[ end trace 0000000000000000 ]--- mt76x2u: probe of 3-3.3.4:1.0 failed with error -110 usbcore: registered new interface driver mt76x2u kauditd_printk_skb: 32 callbacks suppressed Fixes: 2f5c3c77fc9b ("wifi: mt76: switch to page_pool allocator") Tested-by: Mikhail Gavrilov Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/f2398f68011c976510c81e1964975b677e65860e.1677193208.git.lorenzo@kernel.org commit aaa3c08ee0653beaa649d4adfb27ad562641cfd8 Author: Michal Schmidt Date: Fri Feb 24 01:41:45 2023 +0100 qede: avoid uninitialized entries in coal_entry array Even after commit 908d4bb7c54c ("qede: fix interrupt coalescing configuration"), some entries of the coal_entry array may theoretically be used uninitialized: 1. qede_alloc_fp_array() allocates QEDE_MAX_RSS_CNT entries for coal_entry. The initial allocation uses kcalloc, so everything is initialized. 2. The user sets a small number of queues (ethtool -L). coal_entry is reallocated for the actual small number of queues. 3. The user sets a bigger number of queues. coal_entry is reallocated bigger. The added entries are not necessarily initialized. In practice, the reallocations will actually keep using the originally allocated region of memory, but we should not rely on it. The reallocation is unnecessary. coal_entry can always have QEDE_MAX_RSS_CNT entries. Fixes: 908d4bb7c54c ("qede: fix interrupt coalescing configuration") Signed-off-by: Michal Schmidt Nacked-by: Manish Chopra Acked-by: Manish Chopra Signed-off-by: David S. Miller commit 5064561090fda0ca059d2961f9922e2b7afea36a Merge: 25ff6f8a5a3b8 d28a06d7dbedc Author: David S. Miller Date: Sun Feb 26 16:22:08 2023 +0000 Merge tag 'mlx5-fixes-2023-02-24' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahemeed says: ==================== mlx5 fixes 2023-02-24 V1->V2: - Toss away arguably non-fixes patches This series provides bug fixes for mlx5 driver. Please pull and let me know if there is any problem. ==================== commit 25ff6f8a5a3b8dc48e8abda6f013e8cc4b14ffea Author: Fedor Pchelkin Date: Sat Feb 25 13:56:14 2023 +0300 nfc: fix memory leak of se_io context in nfc_genl_se_io The callback context for sending/receiving APDUs to/from the selected secure element is allocated inside nfc_genl_se_io and supposed to be eventually freed in se_io_cb callback function. However, there are several error paths where the bwi_timer is not charged to call se_io_cb later, and the cb_context is leaked. The patch proposes to free the cb_context explicitly on those error paths. At the moment we can't simply check 'dev->ops->se_io()' return value as it may be negative in both cases: when the timer was charged and was not. Fixes: 5ce3f32b5264 ("NFC: netlink: SE API implementation") Reported-by: syzbot+df64c0a2e8d68e78a4fa@syzkaller.appspotmail.com Signed-off-by: Fedor Pchelkin Signed-off-by: Alexey Khoroshilov Signed-off-by: David S. Miller commit cf871006c01709211f2620a33de37257362a05e8 Author: Jacob Keller Date: Fri Feb 24 13:32:41 2023 -0800 ice: remove unnecessary CONFIG_ICE_GNSS CONFIG_ICE_GNSS was added by commit c7ef8221ca7d ("ice: use GNSS subsystem instead of TTY") as a way to allow the ice driver to optionally support GNSS features without forcing a dependency on CONFIG_GNSS. The original implementation of that commit at [1] used IS_REACHABLE. This was rejected by Olek at [2] with the suggested implementation of CONFIG_ICE_GNSS. Eventually after merging, Linus reported a .config which had CONFIG_ICE_GNSS = y when both GNSS = n and ICE = n. This confused him and he felt that the config option was not useful, and commented about it at [3]. CONFIG_ICE_GNSS is defined to y whenever GNSS = ICE. This results in it being set in cases where both options are not enabled. The goal of CONFIG_ICE_GNSS is to ensure that the GNSS support in the ice driver is enabled when GNSS is enabled. The complaint from Olek about the original IS_REACHABLE was due to the required IS_REACHABLE checks throughout the ice driver code and the fact that ice_gnss.c was compiled regardless of GNSS support. This can be fixed in the Makefile by using ice-$(CONFIG_GNSS) += ice_gnss.o In this case, if GNSS = m and ICE = y, we can result in some confusing behavior where GNSS support is not enabled because its not built in. See [4]. To disallow this, have CONFIG_ICE depend on GNSS || GNSS = n. This ensures that we cannot enable CONFIG_ICE as builtin while GNSS is a module. Drop CONFIG_ICE_GNSS, and replace the IS_ENABLED checks for it with checks for GNSS. Update the Makefile to add the ice_gnss.o object based on CONFIG_GNSS. This works to ensure that GNSS support can optionally be enabled, doesn't have an unnnecessary extra config option, and has Kbuild enforce the dependency such that you can't accidentally enable GNSS as a module and ICE as a builtin. [1] https://lore.kernel.org/intel-wired-lan/20221019095603.44825-1-arkadiusz.kubalewski@intel.com/ [2] https://lore.kernel.org/intel-wired-lan/20221028165706.96849-1-alexandr.lobakin@intel.com/ [3] https://lore.kernel.org/all/CAHk-=wi_410KZqHwF-WL5U7QYxnpHHHNP-3xL=g_y89XnKc-uw@mail.gmail.com/ [4] https://lore.kernel.org/netdev/20230223161309.0e439c5f@kernel.org/ Reported-by: Linus Torvalds Signed-off-by: Jacob Keller Fixes: c7ef8221ca7d ("ice: use GNSS subsystem instead of TTY") Cc: Arkadiusz Kubalewski Cc: Alexander Lobakin Cc: Jakub Kicinski Cc: Anthony Nguyen Acked-by: Jakub Kicinski Signed-off-by: Tony Nguyen Signed-off-by: David S. Miller commit 37e1f3acc339b28493eb3dad571c3f01b6af86f6 Author: Nathan Chancellor Date: Fri Feb 24 11:18:49 2023 -0700 net/sched: cls_api: Move call to tcf_exts_miss_cookie_base_destroy() When CONFIG_NET_CLS_ACT is disabled: ../net/sched/cls_api.c:141:13: warning: 'tcf_exts_miss_cookie_base_destroy' defined but not used [-Wunused-function] 141 | static void tcf_exts_miss_cookie_base_destroy(struct tcf_exts *exts) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Due to the way the code is structured, it is possible for a definition of tcf_exts_miss_cookie_base_destroy() to be present without actually being used. Its single callsite is in an '#ifdef CONFIG_NET_CLS_ACT' block but a definition will always be present in the file. The version of tcf_exts_miss_cookie_base_destroy() that actually does something depends on CONFIG_NET_TC_SKB_EXT, so the stub function is used in both CONFIG_NET_CLS_ACT=n and CONFIG_NET_CLS_ACT=y + CONFIG_NET_TC_SKB_EXT=n configurations. Move the call to tcf_exts_miss_cookie_base_destroy() in tcf_exts_destroy() out of the '#ifdef CONFIG_NET_CLS_ACT', so that it always appears used to the compiler, while not changing any behavior with any of the various configuration combinations. Fixes: 80cd22c35c90 ("net/sched: cls_api: Support hardware miss to tc action") Signed-off-by: Nathan Chancellor Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 099cc90a5a62e68b2fe3a42da011ab929b98bf73 Author: Kai-Heng Feng Date: Thu Feb 23 10:00:59 2023 +0800 iio: light: cm32181: Unregister second I2C client if present If a second dummy client that talks to the actual I2C address was created in probe(), there should be a proper cleanup on driver and device removal to avoid leakage. So unregister the dummy client via another callback. Reviewed-by: Hans de Goede Suggested-by: Hans de Goede Fixes: c1e62062ff54 ("iio: light: cm32181: Handle CM3218 ACPI devices with 2 I2C resources") Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2152281 Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20230223020059.2013993-1-kai.heng.feng@canonical.com Cc: Signed-off-by: Jonathan Cameron commit 3e62aba8284de0994a669d07983299242e68fe72 Author: Marek Vasut Date: Thu Feb 16 02:44:01 2023 +0100 media: imx-mipi-csis: Check csis_fmt validity before use The find_csis_format() may return NULL in case supported format is not found, check the return value of find_csis_format() before using the result to avoid NULL pointer dereference. Fixes: 11927d0fd0d0 ("media: imx-mipi-csis: Use V4L2 subdev active state") Signed-off-by: Marek Vasut Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 68e87ebf2605643072264ed452f4e560417ddb1b Author: Hans Verkuil Date: Wed Feb 15 15:48:17 2023 +0100 media: v4l2-subdev.c: clear stream field Both userspace and kernelspace can pass structs with an uninitialized 'stream' field. Since the check_state() function checks for a non-zero stream field, suddenly these calls will fails with -EINVAL. So check in the wrapper functions in v4l2-subdev.c (which are used by both the kernel and userspace API) if V4L2_SUBDEV_FL_STREAMS is set, and if not, then zero the stream field. Currently no drivers set V4L2_SUBDEV_FL_STREAMS, so the stream field will always be set to 0. This patch might well be reverted in the future when streams support is fully enabled and we finalized the userspace API support for this feature. Signed-off-by: Hans Verkuil Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 7adf14d8aca1ea53bf9ccf8463809c82adb8c23a Author: Masahiro Yamada Date: Wed Feb 22 23:47:29 2023 +0900 kbuild: rpm-pkg: remove unneeded KERNELRELEASE from modules/headers_install This is a temporary workaround added by commit f6e09b07cc12 ("kbuild: do not put .scmversion into the source tarball"). Since commit 1cb86b6c3136 ("kbuild: save overridden KERNELRELEASE in include/config/kernel.release"), the user-supplied KERNELRELEASE is saved in include/config/kernel.release. Remove it again. Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor commit 29cbe6ecfd97cb599883c68d3c6dbac11d0618b8 Author: Sangmoon Kim Date: Wed Feb 22 19:47:19 2023 +0900 docs: kbuild: remove description of KBUILD_LDS_MODULE Commit 596b0474d3d9 ("kbuild: preprocess module linker script") removes KBUILD_LDS_MODULE, yet the variable is still mentioned in kbuild documentation. Remove the reference to the now-nonexistent variable. Signed-off-by: Sangmoon Kim Reviewed-by: Nathan Chancellor Signed-off-by: Masahiro Yamada commit ae41e0e41ba04b4b51641b504fb3b405aef7ec04 Author: Masahiro Yamada Date: Sun Feb 19 23:23:27 2023 +0900 .gitattributes: use 'dts' diff driver for *.dtso files Now we have the third extension for DT source files (overlay). Give the diff=dts attribute to *.dtso as well. While I was here, I merged *.c and *.o into *.[ch] and added the SPDX-License-Identifier. Signed-off-by: Masahiro Yamada commit 3ab18a625ce42163da91ee4096460218d11bed36 Author: Masahiro Yamada Date: Wed Feb 15 10:20:33 2023 +0900 kbuild: deb-pkg: improve the usability of source package Improve the source package support in case the dpkg-buildpackage is directly used to build binary packages. For cross-compiling, you can set CROSS_COMPILE via the environment variable, but it is better to set it automatically - set it to ${DEB_HOST_GNU_TYPE}- if we are cross-compiling but not from the top Makefile. The generated source package may be carried to a different build environment, which may have a different compiler installed. Run olddefconfig first to set new CONFIG options to their default values without prompting. Take KERNELRELEASE and KBUILD_BUILD_VERSION from the version field of debian/changelog in case it is updated afterwards. Signed-off-by: Masahiro Yamada commit c5bf2efb058d841bf8993b9a9b4522abda804d39 Author: Masahiro Yamada Date: Wed Feb 15 10:20:32 2023 +0900 kbuild: deb-pkg: fix binary-arch and clean in debian/rules The clean target needs ARCH=${ARCH} to clean up the tree for the correct architecture. 'make (bin)deb-pkg' skips cleaning, but the preclean hook may be executed if dpkg-buildpackage is directly used. The binary-arch target does not need KERNELRELEASE because it is not updated during the installation. KBUILD_BUILD_VERSION is not needed either because binary-arch does not build vmlinux. Signed-off-by: Masahiro Yamada commit 1fc9095846cc0b7a4d027da2d0bd7569914bf129 Author: Masahiro Yamada Date: Wed Feb 15 10:20:31 2023 +0900 kbuild: tar-pkg: use tar rules in scripts/Makefile.package Use %.tar, %.tar.gz, %.tar.bz2, %.tar.xz, %.tar.zst rules in scripts/Makefile.package. Signed-off-by: Masahiro Yamada commit e0ca16749ac3392a5a2ea4e67327fa71ef4aa680 Author: Masahiro Yamada Date: Wed Feb 15 10:20:30 2023 +0900 kbuild: make perf-tar*-src-pkg work without relying on git Currently, perf-tar*-src-pkg only uses 'git archive', but it is better to make it work without relying on git. The file, HEAD, which saves the commit hash, will be included in the tarball only when the source tree is managed by git. The git tree is more precisely checked; it has been copied from scripts/setlocalversion. Signed-off-by: Masahiro Yamada commit e7853995594baa1a1258b20ff077b60a958becdc Author: Masahiro Yamada Date: Wed Feb 15 10:20:29 2023 +0900 kbuild: deb-pkg: switch over to source format 3.0 (quilt) Change the source format from "1.0" to "3.0 (quilt)" because it works more cleanly. All files except .config and debian/ go into the orig tarball. Add a single patch, debian/patches/config, and delete the ugly extend-diff-ignore patterns. The debian tarball will be compressed into *.debian.tar.xz by default. If you like to use a different compression mode, you can pass the command line option, DPKG_FLAGS=-Zgzip, for example. The orig tarball only supports gzip for now. The combination of gzip and xz is somewhat clumsy, but it is not a practical problem. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit b44aa8c96e9eea54a42c074c278a8e05e1c231d5 Author: Masahiro Yamada Date: Wed Feb 15 10:20:28 2023 +0900 kbuild: deb-pkg: make .orig tarball a hard link if possible If '..' belongs to the same filesystem, create a hard link instead of a copy. In most cases, you can save disk space. I do not want to use 'mv' because keeping linux.tar.gz is useful to avoid unneeded rebuilding of the tarball. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 6eabebb1b66c48d830549dbca5952f72307fbd0b Author: Masahiro Yamada Date: Wed Feb 15 10:20:27 2023 +0900 kbuild: deb-pkg: hide KDEB_SOURCENAME from Makefile scripts/Makefile.package does not need to know the value of KDEB_SOURCENAME because the source name can be taken from debian/changelog by using dpkg-parsechangelog. Move the default of KDEB_SOURCENAME (i.e. linux-upstream) to scripts/package/mkdebian. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 6fc91752d7c4706f1036838544b1ef5d9f41c058 Author: Masahiro Yamada Date: Wed Feb 15 10:20:26 2023 +0900 kbuild: srcrpm-pkg: create source package without cleaning If you run 'make (src)rpm-pkg', all objects are lost due to 'make clean', which makes the incremental builds impossible. Instead of cleaning, pass the exclude list to tar's --exclude-from option. Previously, the .config was contained in the source tarball. With this commit, the source rpm consists of separate linux.tar.gz and .config. Remove stale comments. Now, 'make (src)rpm-pkg' works with O= option. Signed-off-by: Masahiro Yamada commit 1ec9bb704faf50c48727b5daa33bc42e7334db60 Author: Masahiro Yamada Date: Wed Feb 15 10:20:25 2023 +0900 kbuild: rpm-pkg: build binary packages from source rpm The build rules of rpm-pkg and srcrpm-pkg are almost the same. Remove the code duplication. Change rpm-pkg to build binary packages from the source package generated by srcrpm-pkg. This changes the output directory of the srpm generated by 'make rpm-pkg' because srcrpm-pkg overrides _srcrpmdir. Signed-off-by: Masahiro Yamada commit 7bf4582d7aad870ecb4f760743307ecba7a960f4 Author: Masahiro Yamada Date: Wed Feb 15 10:20:24 2023 +0900 kbuild: deb-pkg: create source package without cleaning If you run 'make deb-pkg', all objects are lost due to 'make clean', which makes the incremental builds impossible. Instead of cleaning, pass the exclude list to tar's --exclude-from option. Previously, *.diff.gz contained some check-in files such as .clang-format, .cocciconfig. With this commit, *.diff.gz will only contain the .config and debian/. The other source files will go into the .orig tarball. linux.tar.gz is rebuilt only when the source files that would go into the tarball are changed. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 2fcd07b7ccd5fd10b2120d298363e4e6c53ccf9c Author: Liam R. Howlett Date: Fri Feb 24 16:20:55 2023 -0500 mm/mprotect: Fix successful vma_merge() of next in do_mprotect_pkey() If mprotect_fixup() successfully calls vma_merge() and replaces vma and the next vma, then the tmp variable in the do_mprotect_pkey() is not updated to point to the new vma end. This results in the loop detecting a gap between VMAs that does not exist. Fix the faulty value of tmp by setting it to the end location of the vma iterator at the end of the loop. Link: https://lkml.kernel.org/r/20230224212055.1786100-1-Liam.Howlett@oracle.com Fixes: 2286a6914c77 ("mm: change mprotect_fixup to vma iterator") Link: https://lore.kernel.org/linux-mm/20230223120407.729110a6ecd1416ac59d9cb0@linux-foundation.org/ Signed-off-by: Liam R. Howlett Reported-by: Bert Karwatzki Link: https://bugzilla.kernel.org/show_bug.cgi?id=217061 Tested-by: Bert Karwatzki Reported-by: Linus Torvalds Link: https://lore.kernel.org/linux-mm/CAHk-=wjFmVL7NiuxL54qLkoabni_yD-oF9=dpDgETtdsiCbhUg@mail.gmail.com/ Tested-by: Linus Torvalds Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c16bda37594f83147b167d381d54c010024efecf Author: Jens Axboe Date: Sat Feb 25 12:53:53 2023 -0700 io_uring/poll: allow some retries for poll triggering spuriously If we get woken spuriously when polling and fail the operation with -EAGAIN again, then we generally only allow polling again if data had been transferred at some point. This is indicated with REQ_F_PARTIAL_IO. However, if the spurious poll triggers when the socket was originally empty, then we haven't transferred data yet and we will fail the poll re-arm. This either punts the socket to io-wq if it's blocking, or it fails the request with -EAGAIN if not. Neither condition is desirable, as the former will slow things down, while the latter will make the application confused. We want to ensure that a repeated poll trigger doesn't lead to infinite work making no progress, that's what the REQ_F_PARTIAL_IO check was for. But it doesn't protect against a loop post the first receive, and it's unnecessarily strict if we started out with an empty socket. Add a somewhat random retry count, just to put an upper limit on the potential number of retries that will be done. This should be high enough that we won't really hit it in practice, unless something needs to be aborted anyway. Cc: stable@vger.kernel.org # v5.10+ Link: https://github.com/axboe/liburing/issues/364 Signed-off-by: Jens Axboe commit 1ec35eadc3b448c91a6b763371a7073444e95f9d Merge: 562ed38ded83a b64baafa24d2c Author: Linus Torvalds Date: Sat Feb 25 15:16:23 2023 -0800 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "We have one small patch to the clk core this time around. It fixes a corner case with the CLK_OPS_PARENT_ENABLE flag combined with clk_core_is_enabled() where it hangs the system. We'll simply assume the clk is disabled if the parent is disabled and the flag is set. Trying to turn on the parent to check the enable state of the clk runs into system hangs at boot. We let this bake in -next for a couple weeks to make sure there aren't any more issues because the last attempt to fix this ran into hangs and had to be reverted. Note: There were some more patches to the core framework around sync_state and disabling unused clks, but I asked for that to be reverted from the qcom PR because it isn't ready and we're still discussing the best solution on the list. Outside of the core clk framework, we have the usual collection of clk driver updates and support for new SoCs (which seems to never stop). The dirstat is dominated by Qualcomm because they added support for quite a few SoCs this time around and also migrated quite a few of their drivers to clk_parent_data. The other big diff is in the Mediatek clk drivers that saw a significant rework this cycle to similarly modernize the code, and we'll see that work continue in the next cycle as well. Nothing really jumps out as scary here, except that the significant churn in parent data descriptions can have typos that go unnoticed. More details below. Core: - Honor CLK_OPS_PARENT_ENABLE in clk_core_is_enabled() New Drivers: - Add a new clk-gpr-mux clock type and use it on i.MX6Q to add ENET ref clocks - Support for Mediatek MT7891 SoC clks - Support for many Qualcomm clk controllers: - QDU1000/QRU1000 global clock controller - SA8775P global clock controller - SM8550 TCSR and display clock controller - SM6350 clock controller - MSM8996 CBF and APCS clock controllers Updates: - Various cleanups and improvements to Mediatek clk drivers to reduce code size and modernize the drivers - Support for Versa 5P49V60 clks - Disable R-Car H3 ES1.*, as it was only available to an internal development group and needed a lot of quirks and workarounds - Add PWM, Compare-Match Timer (TIM), USB, SDHI, and eMMC clocks and resets on Renesas RZ/V2M - Add display clocks on Renesas R-Car V4H - Add Camera Receiving Unit (CRU) clocks and resets on Renesas RZ/G2L - Free the imx_uart_clocks even if imx_register_uart_clocks returns early - Get the stdout clocks count from device tree on i.MX - Drop the clock count argument from imx_register_uart_clocks() - Keep the uart clocks on i.MX93 for when earlycon is used - Fix SPDX comment in i.MX6SLL clocks bindings header - Drop some unnecessary spaces from i.MX8ULP clocks bindings header - Add imx_obtain_fixed_of_clock() for allowing to add a clock that is not configured via devicetree - Fix the ENET1 gate configuration for i.MX6UL according to the reference manual - Add ENET refclock mux support for i.MX6UL - Add support for USB host/device configuration on Renesas RZ/N1 - Add PLL2 programming support, and CAN-FD clocks on Renesas R-Car V4H - Add D1 CAN bus gates and resets for Allwinner - Mark D1 CPUX clock as critical on Allwinner - Reuse D1 driver for Allwinner R528/T113 - Cleanup sunxi-ng Kconfig - Fix sunxi-ng kernel-doc issues - Model Allwinner H3/H5 DRAM clock as fixed clock - Use .determine_rate() instead of .round_rate() for the dualdiv, mpll, sclk-div and cpu-dyn-div amlogic clock drivers - DDR clocks were marked as critical in the proper clock driver for each AT91 SoC such that drivers/memory/atmel-sdramc.c to be deleted in the next releases as it only does clock enablement - Patch to avoid compiling dt-compat.o for all AT91 SoCs as only some of them may use it - Support synchronous power_off requests in the qcom GDSC driver for proper GPU power collapse - Drop test clocks from various Qualcomm clk drivers - Update parent references to use clk_parent_data/clk_hw in various Qualcomm clk drivers - Fixes for the Qualcomm MSM8996 CPU clock controller - Transition Qualcomm MSM8974 GCC off the externally defined sleep_clk - Add GDSCs in the global clock controller for Qualcomm QCS404 - The SDCC core clocks on Qualcomm SM6115 are moved to floor_ops - Programming of clk_dis_wait for GPU CX GDSC on Qualcomm SC7180 and SDM845 are moved to use the recently introduced properties in the GDSC struct - Qualcomm's RPMh clock driver gains SM8550 and SA8775P clocks, and the IPA clock is added on a variety of platforms - De-duplicate identical clks in Qualcomm SMD RPM clk driver - Add a few missing clocks across msm8998, msm8992, msm8916, qcs404 to Qualcomm SDM RPM clk driver - Various Qualcomm clk drivers use devm_pm_runtime_enable() to simplify" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (228 commits) clk: qcom: apcs-msm8986: Include bitfield.h for FIELD_PREP clk: qcom: Revert sync_state based clk_disable_unused clk: imx: pll14xx: fix recalc_rate for negative kdiv clk: rs9: Drop unused pin_xin field MAINTAINERS: clk: imx: Add Peng Fan as reviewer clk: sprd: Add dependency for SPRD_UMS512_CLK clk: ralink: fix 'mt7621_gate_is_enabled()' function clk: mediatek: clk-mtk: Remove unneeded semicolon dt-bindings: clock: remove stih416 bindings dt-bindings: clock: add loongson-2 clock dt-bindings: clock: add loongson-2 clock include file clk: imx: fix compile testing imxrt1050 clk: Honor CLK_OPS_PARENT_ENABLE in clk_core_is_enabled() clk: imx: set imx_clk_gpr_mux_ops storage-class-specifier to static clk: renesas: rcar-gen3: Disable R-Car H3 ES1.* dt-bindings: clock: Merge qcom,gpucc-sm8350 into qcom,gpucc.yaml clk: qcom: gpucc-sdm845: fix clk_dis_wait being programmed for CX GDSC clk: qcom: gpucc-sc7180: fix clk_dis_wait being programmed for CX GDSC dt-bindings: clock: qcom,sa8775p-gcc: add the power-domains property clk: qcom: cpu-8996: add missing cputype include ... commit 562ed38ded83a5cd3ecf9a1a875c7ee786c146ae Merge: 2e3036a2642b6 6ccbe33a39523 Author: Linus Torvalds Date: Sat Feb 25 15:10:14 2023 -0800 Merge tag 'mailbox-v6.3' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox updates from Jassi Brar: - qcom: misc changes to bindings for sa8775p, QDU1000/QRU1000, IPQ5332, SDX55, msm8976, glink-rpm-edge - sti: convert to DT schema - zynq: switch to flexible array to simplify code * tag 'mailbox-v6.3' of git://git.linaro.org/landing-teams/working/fujitsu/integration: dt-bindings: mailbox: qcom-ipcc: Add compatible for QDU1000/QRU1000 mailbox: qcom-apcs-ipc: add IPQ5332 APSS clock support dt-bindings: mailbox: qcom: add compatible for the IPQ5332 SoC dt-bindings: remoteproc: qcom,glink-rpm-edge: convert to DT schema mailbox: qcom-apcs-ipc: enable APCS clock device for MSM8996 dt-bindings: mailbox: qcom: add #clock-cells to msm8996 example dt-bindings: mailbox: qcom: add missing platforms to conditional clauses dt-bindings: mailbox: qcom: correct the list of platforms using clocks dt-bindings: mailbox: qcom: enable syscon compatible for msm8976 dt-bindings: mailbox: qcom: add SDX55 compatible dt-bindings: mailbox: qcom-ipcc: document the sa8775p platform dt-bindings: mailbox: sti-mailbox: convert to DT schema mailbox: zynq: Switch to flexible array to simplify code commit 2e3036a2642b6145a8117d21514bfc5f8d5ea595 Merge: 60e2bf7d10e9c f4440abc08917 Author: Linus Torvalds Date: Sat Feb 25 15:05:08 2023 -0800 Merge tag 'mtd/for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull MTD updates from Miquel Raynal: "MTD changes: - parsers: ofpart: add workaround for #size-cells 0 - dt-bindings: partitions: Fix partition node name pattern - dataflash: remove duplicate SPI ID table Raw NAND core changes: - Check the data only read pattern only once - Prepare the late addition of supported operation checks - Support for sequential cache reads - Fix nand_chip kdoc Raw NAND driver changes: - Fsl_elbc: Propagate HW ECC settings to HW - Marvell: Add missing layouts - Pasemi: Don't use static data to track per-device state - Sunxi: - Fix the size of the last OOB region - Remove an unnecessary check - Remove an unnecessary check - Clean up chips after failed init - Precompute the ECC_CTL register value - Embed sunxi_nand_hw_ecc by value - Update OOB layout to match hardware - tmio_nand: Remove driver - vf610_nfc: Use regular comments for functions SPI-NAND driver changes: - Add support for AllianceMemory AS5F34G04SND - Macronix: use scratch buffer for DMA operation NAND ECC changes: - Mediatek: - Add ECC support fot MT7986 IC - Add compatible for MT7986 - dt-bindings: Split ECC engine with rawnand controller SPI NOR changes: - Misc core fixes SPI NOR driver changes: - Spansion: Minor fixes" * tag 'mtd/for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (33 commits) mtd: parsers: ofpart: add workaround for #size-cells 0 mtd: rawnand: sunxi: Precompute the ECC_CTL register value mtd: rawnand: sunxi: Embed sunxi_nand_hw_ecc by value mtd: rawnand: sunxi: Update OOB layout to match hardware mtd: spi-nor: Sort headers alphabetically mtd: spi-nor: Fix shift-out-of-bounds in spi_nor_set_erase_type mtd: nand: ecc-mtk: Add ECC support fot MT7986 IC dt-bindings: mtd: mediatek,nand-ecc-engine: Add compatible for MT7986 dt-bindings: mtd: Split ECC engine with rawnand controller mtd: rawnand: fsl_elbc: Propagate HW ECC settings to HW mtd: spinand: Add support for AllianceMemory AS5F34G04SND dt-bindings: mtd: partitions: Fix partition node name pattern mtd: spi-nor: Create macros to define chip IDs and geometries mtd: spi-nor: spansion: Make CFRx reg fields generic mtd: spi-nor: spansion: Consider reserved bits in CFR5 register mtd: spi-nor: core: fix implicit declaration warning mtd: spinand: macronix: use scratch buffer for DMA operation mtd: rawnand: Fix nand_chip kdoc mtd: rawnand: vf610_nfc: use regular comments for functions mtd: rawnand: Support for sequential cache reads ... commit 60e2bf7d10e9cd5641f4a5183a19058d9a2c8782 Merge: 116b41162f8b2 7ae9fb1b7ecbb Author: Linus Torvalds Date: Sat Feb 25 15:01:32 2023 -0800 Merge tag 'input-for-v6.3-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - a set of tweaks to iqs269a touch controller driver - a fix for ads7846 driver to properly handle 7845 chip - cap11xx driver will support cap1203, cap1293 and cap1298 models - xpad driver will support 8BitDo Pro 2 Wired Controller - input drivers have been switched to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() - other miscellaneous fixes and tweaks * tag 'input-for-v6.3-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (113 commits) dt-bindings: input: iqs626a: Redefine trackpad property types Input: iqs626a - drop unused device node references dt-bindings: input: touchscreen: st,stmfts: convert to dtschema Input: cyttsp5 - fix bitmask for touch buttons Input: exc3000 - properly stop timer on shutdown Input: synaptics-rmi4 - fix SPI device ID Input: cap11xx - add support for cap1203, cap1293 and cap1298 dt-bindings: input: microchip,cap11xx: add cap1203, cap1293 and cap1298 Input: pmic8xxx-keypad - fix a Kconfig spelling mistake & hyphenation Input: edt-ft5x06 - fix typo in a comment Input: tegra-kbc - use devm_platform_get_and_ioremap_resource() Input: st-keyscan - use devm_platform_get_and_ioremap_resource() Input: spear-keyboard - use devm_platform_get_and_ioremap_resource() Input: olpc_apsp - use devm_platform_get_and_ioremap_resource() Input: arc_ps2 - use devm_platform_get_and_ioremap_resource() Input: apbps2 - use devm_platform_get_and_ioremap_resource() Input: altera_ps2 - use devm_platform_get_and_ioremap_resource() Input: ads7846 - don't check penirq immediately for 7845 Input: ads7846 - always set last command to PWRDOWN Input: ads7846 - don't report pressure for ads7845 ... commit 3ca04951b004fa184ff84369448a37bf5df98a79 Author: Johan Hovold Date: Thu Feb 2 16:54:43 2023 +0100 rtc: pm8xxx: add support for nvmem offset On many Qualcomm platforms the PMIC RTC control and time registers are read-only so that the RTC time can not be updated. Instead an offset needs be stored in some machine-specific non-volatile memory, which the driver can take into account. Add support for storing a 32-bit offset from the Epoch in an nvmem cell so that the RTC time can be set on such platforms. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230202155448.6715-18-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit 430aa33a304654704c16ed7bbbcbec9e9686aa81 Author: Johan Hovold Date: Thu Feb 2 16:54:42 2023 +0100 dt-bindings: rtc: qcom-pm8xxx: add nvmem-cell offset On many Qualcomm platforms the PMIC RTC control and time registers are read-only so that the RTC time can not be updated. Instead an offset needs be stored in some machine-specific non-volatile memory, which a driver can take into account. Add an 'offset' nvmem cell which can be used to store a 32-bit offset from the Unix epoch so that the RTC time can be updated on such platforms. Acked-by: Krzysztof Kozlowski Signed-off-by: Johan Hovold Reviewed-by: David Collins Link: https://lore.kernel.org/r/20230202155448.6715-17-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit c978414bf5190c0474d3c98df95228c2635b6021 Merge: e90ff8ede777b 08279468a294d Author: Alexandre Belloni Date: Sat Feb 25 23:31:23 2023 +0100 Merge tag 'rtc-6.2-fixes' into rtc-next commit f195c470f2c2cf3737b2b157a5a2dbe182e374fa Author: Jack Chen Date: Thu Jan 5 16:29:52 2023 -0500 i3c: transfer pid from boardinfo to device info I3C device PID could be defined in device tree and stored in i3c_dev_boardinfo. It should be passed to i3c_device_info when allocating a i3c_dev_desc. Rational behind this change is: when users decide to use SETDASA to assign a dynamic address with exactly the original static address, in step of i3c_master_reattach_i3c_dev, this address is checked to be taken. Then device information retrieving step is skipped. As a result, though the i3c device is registered correctly, its device driver could not be probed. Tested: Tested with a I3C device. If assigned-address is set to be the device's static address, without this change, its device driver could not probed. And with this change, its driver is probed successfully. Signed-off-by: Jack Chen Link: https://lore.kernel.org/r/20230105212952.56321-1-zenghuchen@google.com Signed-off-by: Alexandre Belloni commit 116b41162f8b267987ea9a73eb7e73eaa7c2cce5 Merge: 0447ed0d71251 bd78acc89d414 Author: Linus Torvalds Date: Sat Feb 25 13:06:28 2023 -0800 Merge tag 'probes-v6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull kprobes cleanup updates from Masami Hiramatsu: "These are probe events cleanups, no new features but improve readability: - Rename print_probe_args() to trace_probe_print_args() and un-inline it - Introduce a set of default data fetch functions for dynamic probe events - Extract common code of data fetch process of dynamic probe events" * tag 'probes-v6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: kernel/trace: extract common part in process_fetch_insn kernel/trace: Provide default impelentations defined in trace_probe_tmpl.h kernel/trace: Introduce trace_probe_print_args and use it in *probes commit 0447ed0d71251e8e67c9d15f8d9001a3ab621fcd Merge: 472a2abb7af50 6ba912f1c0814 Author: Linus Torvalds Date: Sat Feb 25 13:02:20 2023 -0800 Merge tag 'kcsan.2023.02.24a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull kernel concurrency sanitizer (KCSAN) updates from Paul McKenney: "This fixes gcc-11 errors for x86_64 KCSAN-enabled kernel builds by selecting the CONSTRUCTORS Kconfig option" * tag 'kcsan.2023.02.24a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: kcsan: select CONFIG_CONSTRUCTORS commit 472a2abb7af5067c45db25fb59c17e828af07886 Merge: e534a583cc438 b942a520d9e43 Author: Linus Torvalds Date: Sat Feb 25 12:53:42 2023 -0800 Merge tag 'flex-array-transformations-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux Pull flexible-array updates from Gustavo Silva: "Transform zero-length arrays, in unions, into flexible arrays" * tag 'flex-array-transformations-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: bcache: Replace zero-length arrays with DECLARE_FLEX_ARRAY() helper mm/memremap: Replace zero-length array with DECLARE_FLEX_ARRAY() helper exportfs: Replace zero-length array with DECLARE_FLEX_ARRAY() helper commit e534a583cc438ec2e9a7dc534c9d80d14b440718 Merge: cac85e4616b1c 290ec1d58049e Author: Linus Torvalds Date: Sat Feb 25 12:49:29 2023 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha Pull alpha updates from Al Viro: "Mostly small janitorial fixes but there's also more important ones: a patch to fix loading large modules from Edward Humes, and some fixes from Al Viro" [ The fixes from Al mostly came in separately through Al's trees too and are now duplicated.. - Linus ] * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha: alpha: in_irq() cleanup alpha: lazy FPU switching alpha/boot/misc: trim unused declarations alpha/boot/tools/objstrip: fix the check for ELF header alpha/boot: fix the breakage from -isystem series... alpha: fix FEN fault handling alpha: Avoid comma separated statements alpha: fixed a typo in core_cia.c alpha: remove unused __SLOW_DOWN_IO and SLOW_DOWN_IO definitions alpha: update config files alpha: fix R_ALPHA_LITERAL reloc for large modules alpha: Add some spaces to ensure format specification alpha: replace NR_SYSCALLS by NR_syscalls alpha: Remove redundant local asm header redirections alpha: Implement "current_stack_pointer" alpha: remove redundant err variable alpha: osf_sys: reduce kernel log spamming on invalid osf_mount call typenr commit e3645d72f8865ffe36f9dc811540d40aa3c848d3 Author: Zhang Yi Date: Sun Jan 29 11:49:39 2023 +0800 ext4: fix incorrect options show of original mount_opt and extend mount_opt2 Current _ext4_show_options() do not distinguish MOPT_2 flag, so it mixed extend sbi->s_mount_opt2 options with sbi->s_mount_opt, it could lead to show incorrect options, e.g. show fc_debug_force if we mount with errors=continue mode and miss it if we set. $ mkfs.ext4 /dev/pmem0 $ mount -o errors=remount-ro /dev/pmem0 /mnt $ cat /proc/fs/ext4/pmem0/options | grep fc_debug_force #empty $ mount -o remount,errors=continue /mnt $ cat /proc/fs/ext4/pmem0/options | grep fc_debug_force fc_debug_force $ mount -o remount,errors=remount-ro,fc_debug_force /mnt $ cat /proc/fs/ext4/pmem0/options | grep fc_debug_force #empty Fixes: 995a3ed67fc8 ("ext4: add fast_commit feature and handling for extended mount options") Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230129034939.3702550-1-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 0813299c586b175d7edb25f56412c54b812d0379 Author: Jan Kara Date: Thu Jan 26 12:22:21 2023 +0100 ext4: Fix possible corruption when moving a directory When we are renaming a directory to a different directory, we need to update '..' entry in the moved directory. However nothing prevents moved directory from being modified and even converted from the inline format to the normal format. When such race happens the rename code gets confused and we crash. Fix the problem by locking the moved directory. CC: stable@vger.kernel.org Fixes: 32f7f22c0b52 ("ext4: let ext4_rename handle inline dir") Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20230126112221.11866-1-jack@suse.cz Signed-off-by: Theodore Ts'o commit 172e344e6f82dc266cb65a69f4bed03428ea8a05 Author: Ye Bin Date: Thu Jan 19 09:37:11 2023 +0800 ext4: init error handle resource before init group descriptors Now, 's_err_report' timer is init after ext4_group_desc_init() when fill super. Theoretically, ext4_group_desc_init() may access to error handle as follows: __ext4_fill_super ext4_group_desc_init ext4_check_descriptors ext4_get_group_desc ext4_error ext4_handle_error ext4_commit_super ext4_update_super if (!es->s_error_count) mod_timer(&sbi->s_err_report, jiffies + 24*60*60*HZ); --> Accessing Uninitialized Variables timer_setup(&sbi->s_err_report, print_daily_error_info, 0); Maybe above issue is just theoretical, as ext4_check_descriptors() didn't judge 'gpd' which get from ext4_get_group_desc(), if access to error handle ext4_get_group_desc() will return NULL, then will trigger null-ptr-deref in ext4_check_descriptors(). However, from the perspective of pure code, it is better to initialize resource that may need to be used first. Signed-off-by: Ye Bin Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230119013711.86680-1-yebin@huaweicloud.com Signed-off-by: Theodore Ts'o commit cac85e4616b1cf4a90844b952b49b9cbc4562530 Merge: 84cc6674b76ba d649c34cb916b Author: Linus Torvalds Date: Sat Feb 25 11:52:57 2023 -0800 Merge tag 'vfio-v6.3-rc1' of https://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - Remove redundant resource check in vfio-platform (Angus Chen) - Use GFP_KERNEL_ACCOUNT for persistent userspace allocations, allowing removal of arbitrary kernel limits in favor of cgroup control (Yishai Hadas) - mdev tidy-ups, including removing the module-only build restriction for sample drivers, Kconfig changes to select mdev support, documentation movement to keep sample driver usage instructions with sample drivers rather than with API docs, remove references to out-of-tree drivers in docs (Christoph Hellwig) - Fix collateral breakages from mdev Kconfig changes (Arnd Bergmann) - Make mlx5 migration support match device support, improve source and target flows to improve pre-copy support and reduce downtime (Yishai Hadas) - Convert additional mdev sysfs case to use sysfs_emit() (Bo Liu) - Resolve copy-paste error in mdev mbochs sample driver Kconfig (Ye Xingchen) - Avoid propagating missing reset error in vfio-platform if reset requirement is relaxed by module option (Tomasz Duszynski) - Range size fixes in mlx5 variant driver for missed last byte and stricter range calculation (Yishai Hadas) - Fixes to suspended vaddr support and locked_vm accounting, excluding mdev configurations from the former due to potential to indefinitely block kernel threads, fix underflow and restore locked_vm on new mm (Steve Sistare) - Update outdated vfio documentation due to new IOMMUFD interfaces in recent kernels (Yi Liu) - Resolve deadlock between group_lock and kvm_lock, finally (Matthew Rosato) - Fix NULL pointer in group initialization error path with IOMMUFD (Yan Zhao) * tag 'vfio-v6.3-rc1' of https://github.com/awilliam/linux-vfio: (32 commits) vfio: Fix NULL pointer dereference caused by uninitialized group->iommufd docs: vfio: Update vfio.rst per latest interfaces vfio: Update the kdoc for vfio_device_ops vfio/mlx5: Fix range size calculation upon tracker creation vfio: no need to pass kvm pointer during device open vfio: fix deadlock between group lock and kvm lock vfio: revert "iommu driver notify callback" vfio/type1: revert "implement notify callback" vfio/type1: revert "block on invalid vaddr" vfio/type1: restore locked_vm vfio/type1: track locked_vm per dma vfio/type1: prevent underflow of locked_vm via exec() vfio/type1: exclude mdevs from VFIO_UPDATE_VADDR vfio: platform: ignore missing reset if disabled at module init vfio/mlx5: Improve the target side flow to reduce downtime vfio/mlx5: Improve the source side flow upon pre_copy vfio/mlx5: Check whether VF is migratable samples: fix the prompt about SAMPLE_VFIO_MDEV_MBOCHS vfio/mdev: Use sysfs_emit() to instead of sprintf() vfio-mdev: add back CONFIG_VFIO dependency ... commit 84cc6674b76ba2cdac0df8037b4d8a22a6fc1b77 Merge: 49d575926890e deeacf35c922d Author: Linus Torvalds Date: Sat Feb 25 11:48:02 2023 -0800 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio updates from Michael Tsirkin: - device feature provisioning in ifcvf, mlx5 - new SolidNET driver - support for zoned block device in virtio blk - numa support in virtio pmem - VIRTIO_F_RING_RESET support in vhost-net - more debugfs entries in mlx5 - resume support in vdpa - completion batching in virtio blk - cleanup of dma api use in vdpa - now simulating more features in vdpa-sim - documentation, features, fixes all over the place * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (64 commits) vdpa/mlx5: support device features provisioning vdpa/mlx5: make MTU/STATUS presence conditional on feature bits vdpa: validate device feature provisioning against supported class vdpa: validate provisioned device features against specified attribute vdpa: conditionally read STATUS in config space vdpa: fix improper error message when adding vdpa dev vdpa/mlx5: Initialize CVQ iotlb spinlock vdpa/mlx5: Don't clear mr struct on destroy MR vdpa/mlx5: Directly assign memory key tools/virtio: enable to build with retpoline vringh: fix a typo in comments for vringh_kiov vhost-vdpa: print warning when vhost_vdpa_alloc_domain fails scsi: virtio_scsi: fix handling of kmalloc failure vdpa: Fix a couple of spelling mistakes in some messages vhost-net: support VIRTIO_F_RING_RESET vhost-scsi: convert sysfs snprintf and sprintf to sysfs_emit vdpa: mlx5: support per virtqueue dma device vdpa: set dma mask for vDPA device virtio-vdpa: support per vq dma device vdpa: introduce get_vq_dma_device() ... commit 49d575926890e6ada930bf6f06d62b2fde8fce95 Merge: 01687e7c935ef 45dd9bc75d9ad Author: Linus Torvalds Date: Sat Feb 25 11:30:21 2023 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm updates from Paolo Bonzini: "ARM: - Provide a virtual cache topology to the guest to avoid inconsistencies with migration on heterogenous systems. Non secure software has no practical need to traverse the caches by set/way in the first place - Add support for taking stage-2 access faults in parallel. This was an accidental omission in the original parallel faults implementation, but should provide a marginal improvement to machines w/o FEAT_HAFDBS (such as hardware from the fruit company) - A preamble to adding support for nested virtualization to KVM, including vEL2 register state, rudimentary nested exception handling and masking unsupported features for nested guests - Fixes to the PSCI relay that avoid an unexpected host SVE trap when resuming a CPU when running pKVM - VGIC maintenance interrupt support for the AIC - Improvements to the arch timer emulation, primarily aimed at reducing the trap overhead of running nested - Add CONFIG_USERFAULTFD to the KVM selftests config fragment in the interest of CI systems - Avoid VM-wide stop-the-world operations when a vCPU accesses its own redistributor - Serialize when toggling CPACR_EL1.SMEN to avoid unexpected exceptions in the host - Aesthetic and comment/kerneldoc fixes - Drop the vestiges of the old Columbia mailing list and add [Oliver] as co-maintainer RISC-V: - Fix wrong usage of PGDIR_SIZE instead of PUD_SIZE - Correctly place the guest in S-mode after redirecting a trap to the guest - Redirect illegal instruction traps to guest - SBI PMU support for guest s390: - Sort out confusion between virtual and physical addresses, which currently are the same on s390 - A new ioctl that performs cmpxchg on guest memory - A few fixes x86: - Change tdp_mmu to a read-only parameter - Separate TDP and shadow MMU page fault paths - Enable Hyper-V invariant TSC control - Fix a variety of APICv and AVIC bugs, some of them real-world, some of them affecting architecurally legal but unlikely to happen in practice - Mark APIC timer as expired if its in one-shot mode and the count underflows while the vCPU task was being migrated - Advertise support for Intel's new fast REP string features - Fix a double-shootdown issue in the emergency reboot code - Ensure GIF=1 and disable SVM during an emergency reboot, i.e. give SVM similar treatment to VMX - Update Xen's TSC info CPUID sub-leaves as appropriate - Add support for Hyper-V's extended hypercalls, where "support" at this point is just forwarding the hypercalls to userspace - Clean up the kvm->lock vs. kvm->srcu sequences when updating the PMU and MSR filters - One-off fixes and cleanups - Fix and cleanup the range-based TLB flushing code, used when KVM is running on Hyper-V - Add support for filtering PMU events using a mask. If userspace wants to restrict heavily what events the guest can use, it can now do so without needing an absurd number of filter entries - Clean up KVM's handling of "PMU MSRs to save", especially when vPMU support is disabled - Add PEBS support for Intel Sapphire Rapids - Fix a mostly benign overflow bug in SEV's send|receive_update_data() - Move several SVM-specific flags into vcpu_svm x86 Intel: - Handle NMI VM-Exits before leaving the noinstr region - A few trivial cleanups in the VM-Enter flows - Stop enabling VMFUNC for L1 purely to document that KVM doesn't support EPTP switching (or any other VM function) for L1 - Fix a crash when using eVMCS's enlighted MSR bitmaps Generic: - Clean up the hardware enable and initialization flow, which was scattered around multiple arch-specific hooks. Instead, just let the arch code call into generic code. Both x86 and ARM should benefit from not having to fight common KVM code's notion of how to do initialization - Account allocations in generic kvm_arch_alloc_vm() - Fix a memory leak if coalesced MMIO unregistration fails selftests: - On x86, cache the CPU vendor (AMD vs. Intel) and use the info to emit the correct hypercall instruction instead of relying on KVM to patch in VMMCALL - Use TAP interface for kvm_binary_stats_test and tsc_msrs_test" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (325 commits) KVM: SVM: hyper-v: placate modpost section mismatch error KVM: x86/mmu: Make tdp_mmu_allowed static KVM: arm64: nv: Use reg_to_encoding() to get sysreg ID KVM: arm64: nv: Only toggle cache for virtual EL2 when SCTLR_EL2 changes KVM: arm64: nv: Filter out unsupported features from ID regs KVM: arm64: nv: Emulate EL12 register accesses from the virtual EL2 KVM: arm64: nv: Allow a sysreg to be hidden from userspace only KVM: arm64: nv: Emulate PSTATE.M for a guest hypervisor KVM: arm64: nv: Add accessors for SPSR_EL1, ELR_EL1 and VBAR_EL1 from virtual EL2 KVM: arm64: nv: Handle SMCs taken from virtual EL2 KVM: arm64: nv: Handle trapped ERET from virtual EL2 KVM: arm64: nv: Inject HVC exceptions to the virtual EL2 KVM: arm64: nv: Support virtual EL2 exceptions KVM: arm64: nv: Handle HCR_EL2.NV system register traps KVM: arm64: nv: Add nested virt VCPU primitives for vEL2 VCPU state KVM: arm64: nv: Add EL2 system registers to vcpu context KVM: arm64: nv: Allow userspace to set PSR_MODE_EL2x KVM: arm64: nv: Reset VCPU to EL2 registers if VCPU nested virt is set KVM: arm64: nv: Introduce nested virtualization VCPU feature KVM: arm64: Use the S2 MMU context to iterate over S2 table ... commit 01687e7c935ef70eca69ea2d468020bc93e898dc Merge: d0a32f5520a33 eb9be8310c58c Author: Linus Torvalds Date: Sat Feb 25 11:14:08 2023 -0800 Merge tag 'riscv-for-linus-6.3-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V updates from Palmer Dabbelt: "There's a bunch of fixes/cleanups throughout the tree as usual, but we also have a handful of new features: - Various improvements to the extension detection and alternative patching infrastructure - Zbb-optimized string routines - Support for cpu-capacity in the RISC-V DT bindings - Zicbom no longer depends on toolchain support - Some performance and code size improvements to ftrace - Support for ARCH_WANT_LD_ORPHAN_WARN - Oops now contain the faulting instruction" * tag 'riscv-for-linus-6.3-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (67 commits) RISC-V: add a spin_shadow_stack declaration riscv: mm: hugetlb: Enable ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP riscv: Add header include guards to insn.h riscv: alternative: proceed one more instruction for auipc/jalr pair riscv: Avoid enabling interrupts in die() riscv, mm: Perform BPF exhandler fixup on page fault RISC-V: take text_mutex during alternative patching riscv: hwcap: Don't alphabetize ISA extension IDs RISC-V: fix ordering of Zbb extension riscv: jump_label: Fixup unaligned arch_static_branch function RISC-V: Only provide the single-letter extensions in HWCAP riscv: mm: fix regression due to update_mmu_cache change scripts/decodecode: Add support for RISC-V riscv: Add instruction dump to RISC-V splats riscv: select ARCH_WANT_LD_ORPHAN_WARN for !XIP_KERNEL riscv: vmlinux.lds.S: explicitly catch .init.bss sections from EFI stub riscv: vmlinux.lds.S: explicitly catch .riscv.attributes sections riscv: vmlinux.lds.S: explicitly catch .rela.dyn symbols riscv: lds: define RUNTIME_DISCARD_EXIT RISC-V: move some stray __RISCV_INSN_FUNCS definitions from kprobes ... commit 2b2d50bdd258f8ef37c25f7d5f0d7ba694066dec Author: Jarkko Sakkinen Date: Thu Jan 26 21:56:12 2023 +0000 scripts: coccicheck: Use /usr/bin/env If bash is not located under /bin, coccicheck fails to run. In the real world, this happens for instance when NixOS is used in the host. Instead, use /usr/bin/env to locate the executable binary for bash. Signed-off-by: Jarkko Sakkinen Tested-by: Deepak R Varma Signed-off-by: Julia Lawall commit 180da5ef84fba0a8ea06870a38d6d657d689944a Author: Peter Foley Date: Fri Jan 13 12:29:36 2023 -0500 scripts: coccicheck: Avoid warning about spurious escape e.g. grep: warning: stray \ before - Signed-off-by: Peter Foley Signed-off-by: Julia Lawall commit d0a32f5520a33e7f2ace396db6913625e0d29544 Merge: 5596c6adb04d0 f82cdc37c4bd4 Author: Linus Torvalds Date: Sat Feb 25 11:00:06 2023 -0800 Merge tag 'powerpc-6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: - Support for configuring secure boot with user-defined keys on PowerVM LPARs - Simplify the replay of soft-masked IRQs by making it non-recursive - Add support for KCSAN on 64-bit Book3S - Improvements to the API & code which interacts with RTAS (pseries firmware) - Change 32-bit powermac to assign PCI bus numbers per domain by default - Some improvements to the 32-bit BPF JIT - Various other small features and fixes Thanks to Anders Roxell, Andrew Donnellan, Andrew Jeffery, Benjamin Gray, Christophe Leroy, Frederic Barrat, Ganesh Goudar, Geoff Levand, Greg Kroah-Hartman, Jan-Benedict Glaw, Josh Poimboeuf, Kajol Jain, Laurent Dufour, Mahesh Salgaonkar, Mathieu Desnoyers, Mimi Zohar, Murphy Zhou, Nathan Chancellor, Nathan Lynch, Nayna Jain, Nicholas Piggin, Pali Rohár, Petr Mladek, Rohan McLure, Russell Currey, Sachin Sant, Sathvika Vasireddy, Sourabh Jain, Stefan Berger, Stephen Rothwell, and Sudhakar Kuppusamy. * tag 'powerpc-6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (114 commits) powerpc/pseries: Avoid hcall in plpks_is_available() on non-pseries powerpc: dts: turris1x.dts: Set lower priority for CPLD syscon-reboot powerpc/e500: Add missing prototype for 'relocate_init' powerpc/64: Fix unannotated intra-function call warning powerpc/epapr: Don't use wrteei on non booke powerpc: Pass correct CPU reference to assembler powerpc/mm: Rearrange if-else block to avoid clang warning powerpc/nohash: Fix build with llvm-as powerpc/nohash: Fix build error with binutils >= 2.38 powerpc/pseries: Fix endianness issue when parsing PLPKS secvar flags macintosh: windfarm: Use unsigned type for 1-bit bitfields powerpc/kexec_file: print error string on usable memory property update failure powerpc/machdep: warn when machine_is() used too early powerpc/64: Replace -mcpu=e500mc64 by -mcpu=e5500 powerpc/eeh: Set channel state after notifying the drivers selftests/powerpc: Fix incorrect kernel headers search path powerpc/rtas: arch-wide function token lookup conversions powerpc/rtas: introduce rtas_function_token() API powerpc/pseries/lpar: convert to papr_sysparm API powerpc/pseries/hv-24x7: convert to papr_sysparm API ... commit 5596c6adb04d00cad445641a35f1f1745de57119 Merge: 7c3dc440b1f5c 91dc288f4edf0 Author: Linus Torvalds Date: Sat Feb 25 10:56:39 2023 -0800 Merge tag 'mips_6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS updates from Thomas Bogendoerfer: "Just cleanups and fixes" * tag 'mips_6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: vpe-mt: drop physical_memsize mips: fix syscall_get_nr MIPS: SMP-CPS: fix build error when HOTPLUG_CPU not set MIPS: DTS: jz4780: add #clock-cells to rtc_dev MIPS: dts: Boston: Fix dtc 'pci_device_reg' warning mips: dts: ralink: mt7621: add port@5 as CPU port mips: dts: align LED node names with dtschema MIPS: ralink: Use devm_platform_get_and_ioremap_resource() MIPS: pci-mt7620: Use devm_platform_get_and_ioremap_resource() MIPS: pci: lantiq: Use devm_platform_get_and_ioremap_resource() MIPS: lantiq: xway: Use devm_platform_get_and_ioremap_resource() MIPS: BCM47XX: Add support for Linksys E2500 V3 mips: ralink: make SOC_MT7621 select PINCTRL_MT7621 and fix help section MIPS: DTS: CI20: fix otg power gpio MIPS: dts: lantiq: Remove bogus interrupt-parent; line MIPS: Fix a compilation issue MIPS: remove CONFIG_MIPS_LD_CAN_LINK_VDSO mips: Realtek RTL: select NO_EXCEPT_FILL MIPS: OCTEON: octeon-usb: Consolidate error messages commit 7c3dc440b1f5c75f45e24430f913e561dc82a419 Merge: d8e473182ab9e e686c32590f40 Author: Linus Torvalds Date: Sat Feb 25 09:19:23 2023 -0800 Merge tag 'cxl-for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl Pull Compute Express Link (CXL) updates from Dan Williams: "To date Linux has been dependent on platform-firmware to map CXL RAM regions and handle events / errors from devices. With this update we can now parse / update the CXL memory layout, and report events / errors from devices. This is a precursor for the CXL subsystem to handle the end-to-end "RAS" flow for CXL memory. i.e. the flow that for DDR-attached-DRAM is handled by the EDAC driver where it maps system physical address events to a field-replaceable-unit (FRU / endpoint device). In general, CXL has the potential to standardize what has historically been a pile of memory-controller-specific error handling logic. Another change of note is the default policy for handling RAM-backed device-dax instances. Previously the default access mode was "device", mmap(2) a device special file to access memory. The new default is "kmem" where the address range is assigned to the core-mm via add_memory_driver_managed(). This saves typical users from wondering why their platform memory is not visible via free(1) and stuck behind a device-file. At the same time it allows expert users to deploy policy to, for example, get dedicated access to high performance memory, or hide low performance memory from general purpose kernel allocations. This affects not only CXL, but also systems with high-bandwidth-memory that platform-firmware tags with the EFI_MEMORY_SP (special purpose) designation. Summary: - CXL RAM region enumeration: instantiate 'struct cxl_region' objects for platform firmware created memory regions - CXL RAM region provisioning: complement the existing PMEM region creation support with RAM region support - "Soft Reservation" policy change: Online (memory hot-add) soft-reserved memory (EFI_MEMORY_SP) by default, but still allow for setting aside such memory for dedicated access via device-dax. - CXL Events and Interrupts: Takeover CXL event handling from platform-firmware (ACPI calls this CXL Memory Error Reporting) and export CXL Events via Linux Trace Events. - Convey CXL _OSC results to drivers: Similar to PCI, let the CXL subsystem interrogate the result of CXL _OSC negotiation. - Emulate CXL DVSEC Range Registers as "decoders": Allow for first-generation devices that pre-date the definition of the CXL HDM Decoder Capability to translate the CXL DVSEC Range Registers into 'struct cxl_decoder' objects. - Set timestamp: Per spec, set the device timestamp in case of hotplug, or if platform-firwmare failed to set it. - General fixups: linux-next build issues, non-urgent fixes for pre-production hardware, unit test fixes, spelling and debug message improvements" * tag 'cxl-for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: (66 commits) dax/kmem: Fix leak of memory-hotplug resources cxl/mem: Add kdoc param for event log driver state cxl/trace: Add serial number to trace points cxl/trace: Add host output to trace points cxl/trace: Standardize device information output cxl/pci: Remove locked check for dvsec_range_allowed() cxl/hdm: Add emulation when HDM decoders are not committed cxl/hdm: Create emulated cxl_hdm for devices that do not have HDM decoders cxl/hdm: Emulate HDM decoder from DVSEC range registers cxl/pci: Refactor cxl_hdm_decode_init() cxl/port: Export cxl_dvsec_rr_decode() to cxl_port cxl/pci: Break out range register decoding from cxl_hdm_decode_init() cxl: add RAS status unmasking for CXL cxl: remove unnecessary calling of pci_enable_pcie_error_reporting() dax/hmem: build hmem device support as module if possible dax: cxl: add CXL_REGION dependency cxl: avoid returning uninitialized error code cxl/pmem: Fix nvdimm registration races cxl/mem: Fix UAPI command comment cxl/uapi: Tag commands from cxl_query_cmd() ... commit d8e473182ab9e85708067be81d20424045d939fa Merge: 489fa31ea8732 1e70c680375aa Author: Linus Torvalds Date: Sat Feb 25 09:11:30 2023 -0800 Merge tag 'x86_tdx_for_6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull Intel Trust Domain Extensions (TDX) updates from Dave Hansen: "Other than a minor fixup, the content here is to ensure that TDX guests never see virtualization exceptions (#VE's) that might be induced by the untrusted VMM. This is a highly desirable property. Without it, #VE exception handling would fall somewhere between NMIs, machine checks and total insanity. With it, #VE handling remains pretty mundane. Summary: - Fixup comment typo - Prevent unexpected #VE's from: - Hosts removing perfectly good guest mappings (SEPT_VE_DISABLE) - Excessive #VE notifications (NOTIFY_ENABLES) which are delivered via a #VE" * tag 'x86_tdx_for_6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/tdx: Do not corrupt frame-pointer in __tdx_hypercall() x86/tdx: Disable NOTIFY_ENABLES x86/tdx: Relax SEPT_VE_DISABLE check for debug TD x86/tdx: Use ReportFatalError to report missing SEPT_VE_DISABLE x86/tdx: Expand __tdx_hypercall() to handle more arguments x86/tdx: Refactor __tdx_hypercall() to allow pass down more arguments x86/tdx: Add more registers to struct tdx_hypercall_args x86/tdx: Fix typo in comment in __tdx_hypercall() commit 8883bf83127d533abb415b204eabc064863ae6c9 Author: Qing Zhang Date: Sat Feb 25 15:52:57 2023 +0800 selftests/ftrace: Add LoongArch kprobe args string tests support Before: [5] Kprobe event string type argument [UNTESTED] [7] Kprobe event argument syntax [UNTESTED] After: [5] Kprobe event string type argument [PASS] [7] Kprobe event argument syntax [PASS] Signed-off-by: Qing Zhang Signed-off-by: Huacai Chen commit eb4071b988397144a35c4aa98061f587cbb3b467 Author: Huacai Chen Date: Sat Feb 25 15:52:57 2023 +0800 selftests/seccomp: Add LoongArch selftesting support BPF for LoongArch is supported now, add the selftesting support in seccomp_bpf.c. Signed-off-by: Tiezhu Yang Signed-off-by: Huacai Chen commit 121ff07bdee06555835e26499f5c125223a6beb3 Author: Huacai Chen Date: Sat Feb 25 15:52:57 2023 +0800 tools: Add LoongArch build infrastructure We will add tools support for LoongArch (bpf, perf, objtool, etc.), add build infrastructure and common headers for preparation. Signed-off-by: Huacai Chen commit a6484baa3b02b9d71bfd6016e7632dd1c02d5cba Author: Tiezhu Yang Date: Sat Feb 25 15:52:57 2023 +0800 samples/kprobes: Add LoongArch support Add LoongArch specific info in handler_pre() and handler_post(). Tested-by: Jeff Xie Signed-off-by: Tiezhu Yang Signed-off-by: Huacai Chen commit fcf77d016216ae75a19078e1079c2511a6319a49 Author: Tiezhu Yang Date: Sat Feb 25 15:52:57 2023 +0800 LoongArch: Mark some assembler symbols as non-kprobe-able Some assembler symbols are not kprobe safe, such as handle_syscall (used as syscall exception handler), *memset*/*memcpy*/*memmove* (may cause recursive exceptions), they can not be instrumented, just blacklist them for kprobing. Here is a related problem and discussion: Link: https://lore.kernel.org/lkml/20230114143859.7ccc45c1c5d9ce302113ab0a@kernel.org/ Tested-by: Jeff Xie Signed-off-by: Tiezhu Yang Signed-off-by: Huacai Chen commit 09e679c28a4def4ea8d4f618503c1d55c355ae5c Author: Tiezhu Yang Date: Sat Feb 25 15:52:57 2023 +0800 LoongArch: Add kprobes on ftrace support Add kprobe_ftrace_handler() and arch_prepare_kprobe_ftrace() to support kprobes on ftrace, the code is similar with x86 and riscv. Here is a simple example: # echo 'p:myprobe kernel_clone' > /sys/kernel/debug/tracing/kprobe_events # echo 'r:myretprobe kernel_clone $retval' >> /sys/kernel/debug/tracing/kprobe_events # echo 1 > /sys/kernel/debug/tracing/events/kprobes/myprobe/enable # echo 1 > /sys/kernel/debug/tracing/events/kprobes/myretprobe/enable # echo 1 > /sys/kernel/debug/tracing/tracing_on # cat /sys/kernel/debug/tracing/trace # tracer: nop # # entries-in-buffer/entries-written: 2/2 #P:4 # # _-----=> irqs-off/BH-disabled # / _----=> need-resched # | / _---=> hardirq/softirq # || / _--=> preempt-depth # ||| / _-=> migrate-disable # |||| / delay # TASK-PID CPU# ||||| TIMESTAMP FUNCTION # | | | ||||| | | bash-488 [002] ..... 2041.190681: myprobe: (kernel_clone+0x0/0x40c) bash-488 [002] ..... 2041.190788: myretprobe: (__do_sys_clone+0x84/0xb8 <- kernel_clone) arg1=0x200 Tested-by: Jeff Xie Signed-off-by: Tiezhu Yang Signed-off-by: Huacai Chen commit 3f5536860086d906b01ec5ed68cf50c7edcc40af Author: Tiezhu Yang Date: Sat Feb 25 15:52:57 2023 +0800 LoongArch: Add kretprobes support Use the generic kretprobe trampoline handler to add kretprobes support for LoongArch. Tested-by: Jeff Xie Signed-off-by: Tiezhu Yang Signed-off-by: Huacai Chen commit 6d4cc40fb5f58147defc6c0e9d86e6232fe31616 Author: Tiezhu Yang Date: Sat Feb 25 15:52:57 2023 +0800 LoongArch: Add kprobes support Kprobes allows you to trap at almost any kernel address and execute a callback function, this commit adds kprobes support for LoongArch. Tested-by: Jeff Xie Signed-off-by: Tiezhu Yang Signed-off-by: Huacai Chen commit 9b3441a6b0e1ed4796e7f5a8586c4d6023c4e3ab Author: Tiezhu Yang Date: Sat Feb 25 15:52:57 2023 +0800 LoongArch: Simulate branch and PC* instructions According to LoongArch Reference Manual, simulate branch and PC* instructions, this is preparation for later patch. Link: https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#branch-instructions Link: https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#_pcaddi_pcaddu121_pcaddu18l_pcalau12i Tested-by: Jeff Xie Co-developed-by: Jinyang He Signed-off-by: Jinyang He Signed-off-by: Tiezhu Yang Signed-off-by: Huacai Chen commit 424421a7f34c1222d20a6c279f13b9caa71ecc83 Author: Qing Zhang Date: Sat Feb 25 15:52:57 2023 +0800 LoongArch: ptrace: Add hardware single step support Use the generic ptrace_resume code for PTRACE_SYSCALL, PTRACE_CONT, PTRACE_KILL and PTRACE_SINGLESTEP handling. This implies defining arch_has_single_step() and implementing the user_enable_single_step() and user_disable_single_step() functions. LoongArch cannot do hardware single-stepping per se, the hardware single-stepping it is achieved by configuring the instruction fetch watchpoints (FWPS) and specifies that the next instruction must trigger the watch exception by setting the mask bit. In some scenarios CSR.FWPS.Skip is used to ignore the next hit result, avoid endless repeated triggering of the same watchpoint without canceling it. Signed-off-by: Qing Zhang Signed-off-by: Huacai Chen commit 356bd6f23682f11f7afe923d86c7f5f852b97fb2 Author: Qing Zhang Date: Sat Feb 25 15:52:57 2023 +0800 LoongArch: ptrace: Add function argument access API Add regs_get_argument() which returns N th argument of the function call, This enables ftrace kprobe events to access kernel function arguments via $argN syntax for later use. E.g.: echo 'p bio_add_page arg1=$arg1' > kprobe_events bash: echo: write error: Invalid argument Signed-off-by: Qing Zhang Signed-off-by: Huacai Chen commit 1a69f7a161a78aead07cd4b811d796950e892fa4 Author: Qing Zhang Date: Sat Feb 25 15:52:57 2023 +0800 LoongArch: ptrace: Expose hardware breakpoints to debuggers Implement the regset-based ptrace interface that exposes hardware breakpoints to user-space debuggers to query and set instruction and data breakpoints. Signed-off-by: Qing Zhang Signed-off-by: Huacai Chen commit edffa33c7bb5a73e90c754c7a497162b77d7c55f Author: Qing Zhang Date: Sat Feb 25 15:52:57 2023 +0800 LoongArch: Add hardware breakpoints/watchpoints support Use perf framework to manage hardware instruction and data breakpoints. LoongArch defines hardware watchpoint functions for instruction fetch and memory load/store operations. After the software configures hardware watchpoints, the processor hardware will monitor the access address of the instruction fetch and load/store operation, and trigger an exception of the watchpoint when it meets the conditions set by the watchpoint. The hardware monitoring points for instruction fetching and load/store operations each have a register for the overall configuration of all monitoring points, a register for recording the status of all monitoring points, and four registers required for configuration of each watchpoint individually. Signed-off-by: Qing Zhang Signed-off-by: Huacai Chen commit 35c94fab6eee72d60d9cd8d1e6e43e1f77b1dce2 Author: Youling Tang Date: Sat Feb 25 15:52:56 2023 +0800 LoongArch: kdump: Add crashkernel=YM handling When the kernel crashkernel parameter is specified with just a size, we are supposed to allocate a region from RAM to store the crashkernel, "crashkernel=512M" would be recommended for kdump. Fix this by lifting similar code from x86, importing it to LoongArch with LoongArch specific parameters added. We allocate the crashkernel region from the first 4GB of physical memory (because SWIOTLB should be allocated below 4GB). However, LoongArch currently does not implement crashkernel_low and crashkernel_high the same as x86. When X is not specified, crash_base defaults to 0 (crashkernel=YM@XM). Signed-off-by: Youling Tang Signed-off-by: Huacai Chen commit 3f89765d6227fe4645a91e062332b6b4eb24072c Author: Youling Tang Date: Sat Feb 25 15:52:56 2023 +0800 LoongArch: kdump: Add single kernel image implementation This feature depends on the kernel being relocatable. Enable using single kernel image for kdump, and then no longer need to build two kernels (production kernel and capture kernel share a single kernel image). Also enable CONFIG_CRASH_DUMP in loongson3_defconfig. Signed-off-by: Youling Tang Signed-off-by: Huacai Chen commit e5f02b51fa0cb785e352e77271a65e96051b789b Author: Youling Tang Date: Sat Feb 25 15:52:56 2023 +0800 LoongArch: Add support for kernel address space layout randomization (KASLR) This patch adds support for relocating the kernel to a random address. Entropy is derived from the banner, which will change every build and random_get_entropy() which should provide additional runtime entropy. The kernel is relocated by up to RANDOMIZE_BASE_MAX_OFFSET bytes from its link address. Because relocation happens so early during the kernel booting, the amount of physical memory has not yet been determined. This means the only way to limit relocation within the available memory is via Kconfig. So we limit the maximum value of RANDOMIZE_BASE_MAX_OFFSET to 256M (0x10000000) because our memory layout has many holes. Signed-off-by: Youling Tang Signed-off-by: Xi Ruoyao # Fix compiler warnings Signed-off-by: Huacai Chen commit d8da19fbdedd5852592fbba18a7348e3f09500e6 Author: Youling Tang Date: Sat Feb 25 15:52:56 2023 +0800 LoongArch: Add support for kernel relocation This config allows to compile 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. Signed-off-by: Youling Tang Signed-off-by: Xi Ruoyao # Use arch_initcall Signed-off-by: Jinyang He # Provide la_abs relocation code Signed-off-by: Huacai Chen commit 396233c650084cb957eb6d87dd4abd3e56a7d499 Author: Youling Tang Date: Sat Feb 25 15:52:56 2023 +0800 LoongArch: Add la_abs macro implementation Use the "la_abs macro" instead of the "la.abs pseudo instruction" to prepare for the subsequent PIE kernel. When PIE is not enabled, la_abs is equivalent to la.abs. Signed-off-by: Youling Tang Signed-off-by: Huacai Chen commit 8cbd5ebfe241699288cb152081854414f6265718 Author: Youling Tang Date: Sat Feb 25 15:52:56 2023 +0800 LoongArch: Add JUMP_VIRT_ADDR macro implementation to avoid using la.abs Add JUMP_VIRT_ADDR macro implementation to avoid using la.abs directly. This is a preparation for subsequent patches. Signed-off-by: Youling Tang Signed-off-by: Huacai Chen commit f733f119e9b31088063652a7ad16963d85cb73dd Author: Xi Ruoyao Date: Sat Feb 25 15:52:56 2023 +0800 LoongArch: Use la.pcrel instead of la.abs when it's trivially possible Let's start to kill la.abs in preparation for the subsequent support of the PIE kernel. BTW, Re-tab the indention in arch/loongarch/kernel/entry.S for alignment. Signed-off-by: Xi Ruoyao Signed-off-by: Huacai Chen commit 41596803302d83a67a80dc1efef4e51ac46acabb Author: Huacai Chen Date: Sat Feb 25 15:52:56 2023 +0800 LoongArch: Make -mstrict-align configurable Introduce Kconfig option ARCH_STRICT_ALIGN to make -mstrict-align be configurable. Not all LoongArch cores support h/w unaligned access, we can use the -mstrict-align build parameter to prevent unaligned accesses. CPUs with h/w unaligned access support: Loongson-2K2000/2K3000/3A5000/3C5000/3D5000. CPUs without h/w unaligned access support: Loongson-2K500/2K1000. This option is enabled by default to make the kernel be able to run on all LoongArch systems. But you can disable it manually if you want to run kernel only on systems with h/w unaligned access support in order to optimise for performance. Reviewed-by: Arnd Bergmann Signed-off-by: Huacai Chen commit bb7a78e343468873bf00b2b181fcfd3c02d8cb56 Author: Tiezhu Yang Date: Sat Feb 25 15:52:56 2023 +0800 LoongArch: Only call get_timer_irq() once in constant_clockevent_init() Under CONFIG_DEBUG_ATOMIC_SLEEP=y and CONFIG_DEBUG_PREEMPT=y, we can see the following messages on LoongArch, this is because using might_sleep() in preemption disable context. [ 0.001127] smp: Bringing up secondary CPUs ... [ 0.001222] Booting CPU#1... [ 0.001244] 64-bit Loongson Processor probed (LA464 Core) [ 0.001247] CPU1 revision is: 0014c012 (Loongson-64bit) [ 0.001250] FPU1 revision is: 00000000 [ 0.001252] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:283 [ 0.001255] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 0, name: swapper/1 [ 0.001257] preempt_count: 1, expected: 0 [ 0.001258] RCU nest depth: 0, expected: 0 [ 0.001259] Preemption disabled at: [ 0.001261] [<9000000000223800>] arch_dup_task_struct+0x20/0x110 [ 0.001272] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.2.0-rc7+ #43 [ 0.001275] Hardware name: Loongson Loongson-3A5000-7A1000-1w-A2101/Loongson-LS3A5000-7A1000-1w-A2101, BIOS vUDK2018-LoongArch-V4.0.05132-beta10 12/13/202 [ 0.001277] Stack : 0072617764726148 0000000000000000 9000000000222f1c 90000001001e0000 [ 0.001286] 90000001001e3be0 90000001001e3be8 0000000000000000 0000000000000000 [ 0.001292] 90000001001e3be8 0000000000000040 90000001001e3cb8 90000001001e3a50 [ 0.001297] 9000000001642000 90000001001e3be8 be694d10ce4139dd 9000000100174500 [ 0.001303] 0000000000000001 0000000000000001 00000000ffffe0a2 0000000000000020 [ 0.001309] 000000000000002f 9000000001354116 00000000056b0000 ffffffffffffffff [ 0.001314] 0000000000000000 0000000000000000 90000000014f6e90 9000000001642000 [ 0.001320] 900000000022b69c 0000000000000001 0000000000000000 9000000001736a90 [ 0.001325] 9000000100038000 0000000000000000 9000000000222f34 0000000000000000 [ 0.001331] 00000000000000b0 0000000000000004 0000000000000000 0000000000070000 [ 0.001337] ... [ 0.001339] Call Trace: [ 0.001342] [<9000000000222f34>] show_stack+0x5c/0x180 [ 0.001346] [<90000000010bdd80>] dump_stack_lvl+0x60/0x88 [ 0.001352] [<9000000000266418>] __might_resched+0x180/0x1cc [ 0.001356] [<90000000010c742c>] mutex_lock+0x20/0x64 [ 0.001359] [<90000000002a8ccc>] irq_find_matching_fwspec+0x48/0x124 [ 0.001364] [<90000000002259c4>] constant_clockevent_init+0x68/0x204 [ 0.001368] [<900000000022acf4>] start_secondary+0x40/0xa8 [ 0.001371] [<90000000010c0124>] smpboot_entry+0x60/0x64 Here are the complete call chains: smpboot_entry() start_secondary() constant_clockevent_init() get_timer_irq() irq_find_matching_fwnode() irq_find_matching_fwspec() mutex_lock() might_sleep() __might_sleep() __might_resched() In order to avoid the above issue, we should break the call chains, using timer_irq_installed variable as check condition to only call get_timer_irq() once in constant_clockevent_init() is a simple and proper way. Signed-off-by: Tiezhu Yang Signed-off-by: Huacai Chen commit fd200632d09dcea9fd67714241155b7635505cd6 Author: Jinyang He Date: Sat Feb 25 15:52:56 2023 +0800 LoongArch: Fix Chinese comma in cpu.h Fix Chinese comma introduced by accident in cpu.h. Signed-off-by: Jinyang He Signed-off-by: Huacai Chen commit 0c058fb94ae0e2a68639f4569de1c3abf5df7ad7 Author: Saravana Kannan Date: Fri Feb 24 22:54:42 2023 -0800 driver core: fw_devlink: Print full path and name of fwnode Some of the log messages were printing just the fwnode name. While it's short, it's not always uniquely identifiable in system. So print the full path and name to make debugging easier. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20230225065443.278284-1-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 6309872413f14f3d58c13ae4dc85b1a7004b4193 Author: Saravana Kannan Date: Fri Feb 24 22:41:47 2023 -0800 driver core: fw_devlink: Avoid spurious error message fw_devlink can sometimes try to create a device link with the consumer and supplier as the same device. These attempts will fail (correctly), but are harmless. So, avoid printing an error for these cases. Also, add more detail to the error message. Fixes: 3fb16866b51d ("driver core: fw_devlink: Make cycle detection more robust") Reported-by: Vladimir Oltean Reported-by: Dmitry Baryshkov Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20230225064148.274376-1-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit e8b812b3e515742a4faaf2e4722bdc5755b98f56 Author: Geert Uytterhoeven Date: Tue Feb 21 13:53:51 2023 +0100 driver core: bus: Handle early calls to bus_to_subsys() When calling soc_device_match() from early_initcall(), bus_kset is still NULL, causing a crash: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000028 ... Call trace: __lock_acquire+0x530/0x20f0 lock_acquire.part.0+0xc8/0x210 lock_acquire+0x64/0x80 _raw_spin_lock+0x4c/0x60 bus_to_subsys+0x24/0xac bus_for_each_dev+0x30/0xcc soc_device_match+0x4c/0xe0 r8a7795_sysc_init+0x18/0x60 rcar_sysc_pd_init+0xb0/0x33c do_one_initcall+0x128/0x2bc Before, bus_for_each_dev() handled this gracefully by checking that the back-pointer to the private structure was valid. Fix this by adding a NULL check for bus_kset to bus_to_subsys(). Fixes: 83b9148df2c95e23 ("driver core: bus: bus iterator cleanups") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/0a92979f6e790737544638e8a4c19b0564e660a2.1676983596.git.geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman commit 4093b0062f100e69c01812ff73bca2b7521f467f Merge: c9c3395d5e3dc 6fffbc7ae1373 Author: Huacai Chen Date: Sat Feb 25 15:48:46 2023 +0800 Merge 'pci/enumeration' into loongarch-next LoongArch architecture changes for 6.3 depend on the pci changes to work well, so merge them to create a base. commit 290ec1d58049e6203062d5fc796c50852112ae00 Author: Changbin Du Date: Sat Aug 14 09:01:03 2021 +0800 alpha: in_irq() cleanup Replace the obsolete and ambiguos macro in_irq() with new macro in_hardirq(). Signed-off-by: Changbin Du Signed-off-by: Matt Turner commit 050966666047b5013fe44944cef9e9605bdf6cfe Author: Al Viro Date: Fri Sep 2 02:50:12 2022 +0100 alpha: lazy FPU switching On each context switch we save the FPU registers on stack of old process and restore FPU registers from the stack of new one. That allows us to avoid doing that each time we enter/leave the kernel mode; however, that can get suboptimal in some cases. For one thing, we don't need to bother saving anything for kernel threads. For another, if between entering and leaving the kernel a thread gives CPU up more than once, it will do useless work, saving the same values every time, only to discard the saved copy as soon as it returns from switch_to(). Alternative solution: * move the array we save into from switch_stack to thread_info * have a (thread-synchronous) flag set when we save them * have another flag set when they should be restored on return to userland. * do *NOT* save/restore them in do_switch_stack()/undo_switch_stack(). * restore on the exit to user mode if the restore flag had been set. Clear both flags. * on context switch, entry to fork/clone/vfork, before entry into do_signal() and on entry into straced syscall save the registers and set the 'saved' flag unless it had been already set. * on context switch set the 'restore' flag as well. * have copy_thread() set both flags for child, so the registers would be restored once the child returns to userland. * use the saved data in setup_sigcontext(); have restore_sigcontext() set both flags and copy from sigframe to save area. * teach ptrace to look for FPU registers in thread_info instead of switch_stack. * teach isolated accesses to FPU registers (rdfpcr, wrfpcr, etc.) to check the 'saved' flag (under preempt_disable()) and work with the save area if it's been set; if 'saved' flag is found upon write access, set 'restore' flag as well. Signed-off-by: Al Viro Signed-off-by: Matt Turner commit a7acb188e874be1b2752461a445af935e0a47da7 Author: Al Viro Date: Wed Jan 11 20:44:25 2023 +0000 alpha/boot/misc: trim unused declarations gzip_mark() and gzip_release() are gone; there used to be two forward declarations of each and the patch removing those suckers had left one of each behind... Signed-off-by: Al Viro Signed-off-by: Matt Turner commit a4c082f26718f7b2af6d62f5fd8b9759941c71c5 Author: Al Viro Date: Wed Jan 11 20:43:59 2023 +0000 alpha/boot/tools/objstrip: fix the check for ELF header Just memcmp() with ELFMAG - that's the normal way to do it in userland code, which that thing is. Besides, that has the benefit of actually building - str_has_prefix() is *NOT* present in . Fixes: 5f14596e55de "alpha: Replace strncmp with str_has_prefix" Signed-off-by: Al Viro Signed-off-by: Matt Turner commit 56efd34f8205ce24a97445184d819713dd3ce31e Author: Al Viro Date: Wed Jan 11 20:43:10 2023 +0000 alpha/boot: fix the breakage from -isystem series... Signed-off-by: Al Viro Signed-off-by: Matt Turner commit d3c51b701b1d3e618c7b158fb976aa648b1ac4ab Author: Al Viro Date: Sat Jan 7 00:59:29 2023 +0000 alpha: fix FEN fault handling Type 3 instruction fault (FPU insn with FPU disabled) is handled by quietly enabling FPU and returning. Which is fine, except that we need to do that both for fault in userland and in the kernel; the latter *can* legitimately happen - all it takes is this: .global _start _start: call_pal 0xae lda $0, 0 ldq $0, 0($0) - call_pal CLRFEN to clear "FPU enabled" flag and arrange for a signal delivery (SIGSEGV in this case). Fixed by moving the handling of type 3 into the common part of do_entIF(), before we check for kernel vs. user mode. Incidentally, check for kernel mode is unidiomatic; the normal way to do that is !user_mode(regs). The difference is that the open-coded variant treats any of bits 63..3 of regs->ps being set as "it's user mode" while the normal approach is to check just the bit 3. PS is a 4-bit register and regs->ps always will have bits 63..4 clear, so the open-code variant here is actually equivalent to !user_mode(regs). Harder to follow, though... Reproducer above will crash any box where CLRFEN is not ignored by PAL (== any actual hardware, AFAICS; PAL used in qemu doesn't bother implementing that crap). Cc: stable@vger.kernel.org # all way back... Reviewed-by: Richard Henderson Signed-off-by: Al Viro Signed-off-by: Matt Turner commit 4da2bd306bffb46109819647b28e8cabae39c941 Author: Joe Perches Date: Tue Aug 25 04:55:59 2020 +0000 alpha: Avoid comma separated statements Use semicolons and braces. Signed-off-by: Joe Perches Signed-off-by: Matt Turner commit 6b6b64abe02c7693d56c9abfd27f142fa8a0caa6 Author: rj1 Date: Fri Feb 3 18:47:03 2023 -0600 alpha: fixed a typo in core_cia.c Signed-off-by: Matt Turner commit 489fa31ea873282b41046d412ec741f93946fc2d Merge: 3df88c6a175d8 39ecb653f671b Author: Linus Torvalds Date: Fri Feb 24 19:27:55 2023 -0800 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc vfs updates from Al Viro: "Assorted stuff that didn't fit anywhere else" * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: nsfs: repair kernel-doc for ns_match() nsfs: add compat ioctl handler fs/cramfs: Convert kmap() to kmap_local_data() commit 3df88c6a175d883b58fc3c31e36c94eb5e2ad180 Merge: 10cc5d483ebc0 da27f796a8321 Author: Linus Torvalds Date: Fri Feb 24 19:20:07 2023 -0800 Merge branch 'work.namespace' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull ipc namespace update from Al Viro: "Rik's patches reducing the amount of synchronize_rcu() triggered by ipc namespace destruction. I've some pending stuff reducing that on the normal umount side, but it's nowhere near ready and Rik's stuff shouldn't be held back due to conflicts - I'll just redo the parts of my series that stray into ipc/*" * 'work.namespace' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: ipc,namespace: batch free ipc_namespace structures ipc,namespace: make ipc namespace allocation wait for pending free commit 10cc5d483ebc00e82d9a38d3419b2edc8b79b64d Merge: d6b9cf417c626 beb9797ee8b0c Author: Linus Torvalds Date: Fri Feb 24 19:05:45 2023 -0800 Merge branch 'work.alpha' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull alpha updates from Al Viro: "FEN (floating-point enable) fault fix deals with a really old oopsable braino, the rest is alpha/boot compile fixes and minor cleaning up" * 'work.alpha' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: alpha/boot/misc: trim unused declarations alpha/boot/tools/objstrip: fix the check for ELF header alpha/boot: fix the breakage from -isystem series... alpha: fix FEN fault handling commit d6b9cf417c62601f26fa47f97d6c0681704bf0e3 Merge: 397aa6b63ff25 abb7c74239732 Author: Linus Torvalds Date: Fri Feb 24 19:03:26 2023 -0800 Merge branch 'work.sysv' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull sysv updates from Al Viro: "Fabio's 'switch to kmap_local_page()' patchset (originally after the ext2 counterpart, with a lot of cleaning up done to it; as the matter of fact, ext2 side is in need of similar cleanups - calling conventions there are bloody awful). Plus the equivalents of minix stuff..." * 'work.sysv' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: sysv: fix handling of delete_entry and set_link failures fs/sysv: Replace kmap() with kmap_local_page() fs/sysv: Use dir_put_page() in sysv_rename() fs/sysv: Change the signature of dir_get_page() fs/sysv: Use the offset_in_page() helper sysv: don't flush page immediately for DIRSYNC directories commit 397aa6b63ff25cee0b8ed20a6d447527c8ab0849 Merge: 595fa4e313fee 2cb6a44220b97 Author: Linus Torvalds Date: Fri Feb 24 19:01:15 2023 -0800 Merge branch 'work.minix' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull minix updates from Al Viro: "Assorted fixes - mostly Christoph's" * 'work.minix' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: minix_rename(): minix_delete_entry() might fail minix: don't flush page immediately for DIRSYNC directories minix: fix error handling in minix_set_link minix: fix error handling in minix_delete_entry minix: move releasing pages into unlink and rename minix: make minix_new_inode() return error as ERR_PTR(-E...) commit 6f2ce45f0c5f12b5fc6ffabf367bc1bb145534cc Author: Nick Child Date: Thu Feb 23 09:39:44 2023 -0600 ibmvnic: Assign XPS map to correct queue index When setting the XPS map value for TX queues, use the index of the transmit queue. Previously, the function was passing the index of the loop that iterates over all queues (RX and TX). This was causing invalid XPS map values. Fixes: 6831582937bd ("ibmvnic: Toggle between queue types in affinity mapping") Signed-off-by: Nick Child Reviewed-by: Pavan Chebbi Link: https://lore.kernel.org/r/20230223153944.44969-1-nnac123@linux.ibm.com Signed-off-by: Jakub Kicinski commit bce90459937376b6c7553cfbe957d73293ab7bc8 Author: nick black Date: Thu Feb 23 21:29:16 2023 -0500 docs: net: fix inaccuracies in msg_zerocopy.rst Replace "sendpage" with "sendfile". Remove comment about ENOBUFS when the sockopt hasn't been set; experimentation indicates that this is not true. Signed-off-by: nick black Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/Y/gg/EhIIjugLdd3@schwarzgerat.orthanc Signed-off-by: Jakub Kicinski commit 595fa4e313fee3c0b69c10bbed6fffb803237306 Merge: 8ff99ad04c2eb 66f95de7c13be Author: Linus Torvalds Date: Fri Feb 24 17:29:52 2023 -0800 Merge tag 'soundwire-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire Pull soundwire updates from Vinod Koul: "This is a small update which features a bit of core changes and driver updates in Intel and cadence driver. Core: - sdw_transfer_defer() API change to drop an argument - Reset page address rework - Export sdw_nwrite_no_pm and sdw_nread_no_pm APIs Drivers: - Cadence and related intel driver updates for FIFO handling and low level msg transfers" * tag 'soundwire-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: cadence: further simplify low-level xfer_msg_defer() callback soundwire: cadence: use directly bus sdw_defer structure soundwire: bus: remove sdw_defer argument in sdw_transfer_defer() soundwire: stream: use consistent pattern for freeing buffers soundwire: bus: Remove unused reset_page_addr() callback soundwire: bus: Don't zero page registers after every transaction soundwire: bus_type: Avoid lockdep assert in sdw_drv_probe() soundwire: stream: Move remaining register accesses over to no_pm soundwire: debugfs: Switch to sdw_read_no_pm soundwire: Provide build stubs for common functions soundwire: bus: export sdw_nwrite_no_pm and sdw_nread_no_pm functions soundwire: cadence: remove unused sdw_cdns_master_ops declaration soundwire: enable optional clock registers for SoundWire 1.2 devices ASoC/soundwire: remove is_sdca boolean property soundwire: cadence: Drain the RX FIFO after an IO timeout soundwire: cadence: Remove wasted space in response_buf soundwire: cadence: Don't overflow the command FIFOs soundwire: intel: remove DAI startup/shutdown commit 8ff99ad04c2ebacb272ff9e4f6155c35be136b3d Merge: 9e6bfd42b14b4 3584f6392f094 Author: Linus Torvalds Date: Fri Feb 24 17:22:11 2023 -0800 Merge tag 'phy-for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy Pull phy updates from Vinod Koul: "This features a bunch of new device support, a couple of new drivers, yaml conversion and updates of a few drivers. Core support: - New devm_of_phy_optional_get() API with users and conversion New hardware support: - Mediatek MT7986 phy support - Qualcomm SM8550 UFS, PCIe, combo phy support, SM6115 / SM4250 USB3 phy support, SM6350 combo phy support, SM6125 UFS PHY support amd SM8350 & SM8450 combo phy support - Qualcomm SNPS eUSB2 eUSB2 repeater drivers - Allwinner F1C100s USB PHY support - Tegra xusb support for Tegra234 Updates: - Yaml conversion for Qualcomm pcie2 phy and usb-hsic-phy - G4 mode support in Qualcomm UFS phy and support for various SoCs - Yaml conversion for Meson usb2 phy - TI Type C support for usb phy for j721 - Yaml conversion for Tegra xusb binding" * tag 'phy-for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: (106 commits) phy: qcom: phy-qcom-snps-eusb2: Add support for eUSB2 repeater phy: qcom: Add QCOM SNPS eUSB2 repeater driver dt-bindings: phy: qcom,snps-eusb2-phy: Add phys property for the repeater dt-bindings: phy: Add qcom,snps-eusb2-repeater schema file dt-bindings: phy: amlogic,g12a-usb3-pcie-phy: add missing optional phy-supply property phy: rockchip-typec: Fix unsigned comparison with less than zero phy: rockchip-typec: fix tcphy_get_mode error case phy: qcom: snps-eusb2: Add missing headers phy: qcom-qmp-combo: Add support for SM8550 phy: qcom-qmp: Add v6 DP register offsets phy: qcom-qmp: pcs-usb: Add v6 register offsets dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp: Document SM8550 compatible phy: qcom: Add QCOM SNPS eUSB2 driver dt-bindings: phy: Add qcom,snps-eusb2-phy schema file phy: qcom-qmp-pcie: Add support for SM8550 g3x2 and g4x2 PCIEs phy: qcom-qmp: qserdes-lane-shared: Add v6 register offsets phy: qcom-qmp: qserdes-txrx: Add v6.20 register offsets phy: qcom-qmp: pcs-pcie: Add v6.20 register offsets phy: qcom-qmp: pcs-pcie: Add v6 register offsets phy: qcom-qmp: pcs: Add v6.20 register offsets ... commit 9e6bfd42b14b45737cae8bc84c759f1874949b8b Merge: 008128cd5948b e922bbf37564a Author: Linus Torvalds Date: Fri Feb 24 17:18:54 2023 -0800 Merge tag 'dmaengine-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine updates from Vinod Koul: "A new driver, couple of device support and binding conversion along with bunch of driver updates are the main features of this. New hardware support: - TI AM62Ax controller support - Xilinx xdma driver - Qualcomm SM6125, SM8550, QDU1000/QRU1000 GPI controller Updates: - Runtime pm support for at_xdmac driver - IMX sdma binding conversion to yaml and HDMI audio support - IMX mxs binding conversion to yaml" * tag 'dmaengine-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (35 commits) dmaengine: idma64: Update bytes_transferred field dmaengine: imx-sdma: Set DMA channel to be private dmaengine: dw: Move check for paused channel to dwc_get_residue() dmaengine: ptdma: check for null desc before calling pt_cmd_callback dmaengine: dw-axi-dmac: Do not dereference NULL structure dmaengine: idxd: Fix default allowed read buffers value in group dmaengine: sf-pdma: pdma_desc memory leak fix dmaengine: Simplify dmaenginem_async_device_register() function dmaengine: use sysfs_emit() to instead of scnprintf() dmaengine: Make an order in struct dma_device definition dt-bindings: dma: cleanup examples - indentation, lowercase hex dt-bindings: dma: drop unneeded quotes dmaengine: xilinx: xdma: Add user logic interrupt support dmaengine: xilinx: xdma: Add xilinx xdma driver dmaengine: drivers: Use devm_platform_ioremap_resource() dmaengine: at_xdmac: remove empty line dmaengine: at_xdmac: add runtime pm support dmaengine: at_xdmac: align properly function members dmaengine: ppc4xx: Convert to use sysfs_emit()/sysfs_emit_at() APIs dmaengine: sun6i: Set the maximum segment size ... commit 008128cd5948bd3589a9c300e426af4d834029bb Merge: 39f013440dbf5 e8444bb9fd77f Author: Linus Torvalds Date: Fri Feb 24 17:12:23 2023 -0800 Merge tag 'i2c-for-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: - new drivers for HPE GXP and Loongson 2K/LS7A - bigger refactorings for i801 and xiic - gpio driver gained ACPI and SDA-write only support - the core converted some OF helpers to fwnode helpers - usual bunch of driver updates * tag 'i2c-for-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (52 commits) MAINTAINERS: Add HPE GXP I2C Support i2c: Add GXP SoC I2C Controller dt-bindings: i2c: Add hpe,gxp-i2c i2c: xiic: Remove some dead code i2c: xiic: Add SCL frequency configuration support i2c: xiic: Update compatible with new IP version dt-bindings: i2c: xiic: Add 'xlnx,axi-iic-2.1' to compatible i2c: i801: Call i801_check_post() from i801_access() i2c: i801: Call i801_check_pre() from i801_access() i2c: i801: Centralize configuring block commands in i801_block_transaction i2c: i801: Centralize configuring non-block commands in i801_simple_transaction i2c: i801: Handle SMBAUXCTL_E32B in i801_block_transaction_by_block only i2c: i801: Add i801_simple_transaction(), complementing i801_block_transaction() Documentation: i2c: correct spelling dt-bindings: i2c: i2c-st: convert to DT schema i2c: i801: add helper i801_set_hstadd() i2c: i801: make FEATURE_BLOCK_PROC dependent on FEATURE_BLOCK_BUFFER i2c: i801: make FEATURE_HOST_NOTIFY dependent on FEATURE_IRQ i2c: i801: improve interrupt handler i2c: st: use pm_sleep_ptr to avoid ifdef CONFIG_PM_SLEEP ... commit 39f013440dbf5b1f209eadb3b4665d4f0e840b5b Merge: 90ddb3f03418c c142872ea40a9 Author: Linus Torvalds Date: Fri Feb 24 17:04:23 2023 -0800 Merge tag 'for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: "Nothing special for the power-supply subystem this time. - power-supply core: remove faulty cooling logic - convert all sysfs show() handlers from *printf() use sysfs_emit() - bq25890: add dual-charger support required by Lenovo Yoga Tab 3 Pro - bq27xxx: fix reporting critical level - syscon-reboot: add priority property support - new rt9467 charger driver - new rt9471 charger driver - new Odroid Go Ultra poweroff driver - misc minor fixes and cleanups" * tag 'for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (32 commits) power: reset: odroid-go-ultra: fix I2C dependency power: supply: leds: explicitly include linux/leds.h dt-bindings: power: supply: pm8941-coincell: Don't require charging properties dt-bindings: power: supply: pm8941-coincell: Add PM8998 compatible power: reset: add Odroid Go Ultra poweroff driver power: supply: rt9467: Fix spelling mistake "attache" -> "attach" power: supply: rt9471: fix using wrong ce_gpio in rt9471_probe() power: supply: max77650: Make max77650_charger_disable() return void Documentation: power: rt9467: Document exported sysfs entries power: supply: rt9467: Add Richtek RT9467 charger driver dt-bindings: power: supply: Add Richtek RT9467 battery charger Documentation: power: rt9471: Document exported sysfs entries power: supply: rt9471: Add Richtek RT9471 charger driver dt-bindings: power: supply: Add Richtek RT9471 battery charger power: supply: max1721x: Use strscpy() is more robust and safer power: supply: test-power: use strscpy() instead of strncpy() power: supply: bq27xxx: fix reporting critical level power: supply: bq256xx: Init ichg/vbat value with chip default value power: supply: collie_battery: Convert to GPIO descriptors (part 2) power: supply: remove faulty cooling logic ... commit 90ddb3f03418cce0d83c415c0c1d470cf524ba46 Merge: 8cbd92339db08 3eb5d0f26f4ea Author: Linus Torvalds Date: Fri Feb 24 16:51:40 2023 -0800 Merge tag 'pci-v6.3-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull PCI updates from Bjorn Helgaas: "Enumeration: - Rework portdrv shutdown so it disables interrupts but doesn't disable bus mastering, which leads to hangs on Loongson LS7A - Add mechanism to prevent Max_Read_Request_Size (MRRS) increases, again to avoid hardware issues on Loongson LS7A (and likely other devices based on DesignWare IP) - Ignore devices with a firmware (DT or ACPI) node that says the device is disabled Resource management: - Distribute spare resources to unconfigured hotplug bridges at boot-time (not just when hot-adding such a bridge), which makes hot-adding devices to docks work better. Tried this in v6.1 but had to revert for regressions, so try again - Fix root bus issue that dropped resources that happened to end at 0, e.g., [bus 00] PCI device hotplug: - Remove device locking when marking device as disconnected so this doesn't have to wait for concurrent driver bind/unbind to complete - Quirk more Qualcomm bridges that don't fully implement the PCIe Slot Status 'Command Completed' bit Power management: - Account for _S0W of the target bridge in acpi_pci_bridge_d3() so we don't miss hot-add notifications for USB4 docks, Thunderbolt, etc Reset: - Observe delay after reset, e.g., resuming from system sleep, regardless of whether a bridge can suspend to D3cold at runtime - Wait for secondary bus to become ready after a bridge reset Virtualization: - Avoid FLR on some AMD FCH AHCI adapters where it doesn't work - Allow independent IOMMU groups for some Wangxun NICs that prevent peer-to-peer transactions but don't advertise an ACS Capability Error handling: - Configure End-to-End-CRC (ECRC) only if Linux owns the AER Capability - Remove redundant Device Control Error Reporting Enable in the AER service driver since this is already done for all devices during enumeration ASPM: - Add pci_enable_link_state() interface to allow drivers to enable ASPM link state Endpoint framework: - Move dra7xx and tegra194 linkup processing from hard IRQ to threaded IRQ handler - Add a separate lock for endpoint controller list of endpoint function drivers to prevent deadlock in callbacks - Pass events from endpoint controller to endpoint function drivers via callbacks instead of notifiers Synopsys DesignWare eDMA controller driver (acked by Vinod): - Fix CPU vs PCI address issues - Fix source vs destination address issues - Fix issues with interleaved transfer semantics - Fix channel count initialization issue (issue still exists in several other drivers) - Clean up and improve debugfs usage so it will work on platforms with several eDMA devices Baikal T-1 PCIe controller driver: - Set a 64-bit DMA mask Freescale i.MX6 PCIe controller driver: - Add i.MX8MM, i.MX8MQ, i.MX8MP endpoint mode DT binding and driver support Intel VMD host bridge driver: - Add quirk to configure PCIe ASPM and LTR. This is normally done by BIOS, and will be for future products Marvell MVEBU PCIe controller driver: - Mark this driver as broken in Kconfig since bugs prevent its daily usage MediaTek MT7621 PCIe controller driver: - Delay PHY port initialization to improve boot reliability for ZBT WE1326, ZBT WF3526-P, and some Netgear models Qualcomm PCIe controller driver: - Add MSM8998 DT compatible string - Unify MSM8996 and MSM8998 clock orderings - Add SM8350 DT binding and driver support - Add IPQ8074 Gen3 DT binding and driver support - Correct qcom,perst-regs in DT binding - Add qcom_pcie_host_deinit() so the PHY is powered off and regulators and clocks are disabled on late host-init errors Socionext UniPhier Pro5 controller driver: - Clean up uniphier-ep reg, clocks, resets, and their names in DT binding Synopsys DesignWare PCIe controller driver: - Restrict coherent DMA mask to 32 bits for MSI, but allow controller drivers to set 64-bit streaming DMA mask - Add eDMA engine support in both Root Port and Endpoint controllers Miscellaneous: - Remove MODULE_LICENSE from boolean drivers so they don't look like modules so modprobe can complain about them" * tag 'pci-v6.3-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: (86 commits) PCI: dwc: Add Root Port and Endpoint controller eDMA engine support PCI: bt1: Set 64-bit DMA mask PCI: dwc: Restrict only coherent DMA mask for MSI address allocation dmaengine: dw-edma: Prepare dw_edma_probe() for builtin callers dmaengine: dw-edma: Depend on DW_EDMA instead of selecting it dmaengine: dw-edma: Add mem-mapped LL-entries support PCI: Remove MODULE_LICENSE so boolean drivers don't look like modules PCI: hv: Drop duplicate PCI_MSI dependency PCI/P2PDMA: Annotate RCU dereference PCI/sysfs: Constify struct kobj_type pci_slot_ktype PCI: hotplug: Allow marking devices as disconnected during bind/unbind PCI: pciehp: Add Qualcomm quirk for Command Completed erratum PCI: qcom: Add IPQ8074 Gen3 port support dt-bindings: PCI: qcom: Add IPQ8074 Gen3 port dt-bindings: PCI: qcom: Sort compatibles alphabetically PCI: qcom: Fix host-init error handling PCI: qcom: Add SM8350 support dt-bindings: PCI: qcom: Add SM8350 dt-bindings: PCI: qcom-ep: Correct qcom,perst-regs dt-bindings: PCI: qcom: Unify MSM8996 and MSM8998 clock order ... commit 13af134bdc6a9dacec4687e57b2ea8d3e08ff04f Author: ChiaEn Wu Date: Fri Feb 17 17:55:55 2023 +0800 dt-bindings: power: supply: Revise Richtek RT9467 compatible name Revise RT9467 compatible name from "richtek,rt9467-charger" to "richtek,rt9467" because it has to match the "compatible name" in the source code. Fixes: e1b4620fb503 ("dt-bindings: power: supply: Add Richtek RT9467 battery charger") Reported-by: Rob Herring Signed-off-by: ChiaEn Wu Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit f0cf05759497dbc90303adcbdf3d13a54bdaf97b Author: Bastien Nocera Date: Mon Feb 20 14:10:18 2023 +0100 ABI: testing: sysfs-class-power: Document absence of "present" property Document how the absence of the "present" property in the sysfs power_supply class should be handled. Link: https://gitlab.freedesktop.org/upower/upower/-/merge_requests/173 Cc: Mario Limonciello Signed-off-by: Bastien Nocera Signed-off-by: Sebastian Reichel commit bfaecf465a058b167abc7c0dfad985f167ff3af1 Author: qinyu Date: Thu Feb 23 16:10:47 2023 +0800 power: supply: fix null pointer check order in __power_supply_register There is an null pointer check order issue here: if we have to check !desc and !desc->name anyway, check it before dereferencing it in pr_warn(). Signed-off-by: qinyu Signed-off-by: Sebastian Reichel commit 8cbd92339db08b19b93d1637e5799ff2a8dddfd2 Merge: 143c7bc6496c8 66fb1d5df6ace Author: Linus Torvalds Date: Fri Feb 24 15:11:03 2023 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma updates from Jason Gunthorpe: "Quite a small cycle this time, even with the rc8. I suppose everyone went to sleep over xmas. - Minor driver updates for hfi1, cxgb4, erdma, hns, irdma, mlx5, siw, mana - inline CQE support for hns - Have mlx5 display device error codes - Pinned DMABUF support for irdma - Continued rxe cleanups, particularly converting the MRs to use xarray - Improvements to what can be cached in the mlx5 mkey cache" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (61 commits) IB/mlx5: Extend debug control for CC parameters IB/hfi1: Fix sdma.h tx->num_descs off-by-one errors IB/hfi1: Fix math bugs in hfi1_can_pin_pages() RDMA/irdma: Add support for dmabuf pin memory regions RDMA/mlx5: Use query_special_contexts for mkeys net/mlx5e: Use query_special_contexts for mkeys net/mlx5: Change define name for 0x100 lkey value net/mlx5: Expose bits for querying special mkeys RDMA/rxe: Fix missing memory barriers in rxe_queue.h RDMA/mana_ib: Fix a bug when the PF indicates more entries for registering memory on first packet RDMA/rxe: Remove rxe_alloc() RDMA/cma: Distinguish between sockaddr_in and sockaddr_in6 by size Subject: RDMA/rxe: Handle zero length rdma iw_cxgb4: Fix potential NULL dereference in c4iw_fill_res_cm_id_entry() RDMA/mlx5: Use rdma_umem_for_each_dma_block() RDMA/umem: Remove unused 'work' member from struct ib_umem RDMA/irdma: Cap MSIX used to online CPUs + 1 RDMA/mlx5: Check reg_create() create for errors RDMA/restrack: Correct spelling RDMA/cxgb4: Fix potential null-ptr-deref in pass_establish() ... commit 143c7bc6496c886ce5db2a2f9cec580494690170 Merge: a13de74e47653 939204e4df962 Author: Linus Torvalds Date: Fri Feb 24 14:34:12 2023 -0800 Merge tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd Pull iommufd updates from Jason Gunthorpe: "Some polishing and small fixes for iommufd: - Remove IOMMU_CAP_INTR_REMAP, instead rely on the interrupt subsystem - Use GFP_KERNEL_ACCOUNT inside the iommu_domains - Support VFIO_NOIOMMU mode with iommufd - Various typos - A list corruption bug if HWPTs are used for attach" * tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd: iommufd: Do not add the same hwpt to the ioas->hwpt_list twice iommufd: Make sure to zero vfio_iommu_type1_info before copying to user vfio: Support VFIO_NOIOMMU with iommufd iommufd: Add three missing structures in ucmd_buffer selftests: iommu: Fix test_cmd_destroy_access() call in user_copy iommu: Remove IOMMU_CAP_INTR_REMAP irq/s390: Add arch_is_isolated_msi() for s390 iommu/x86: Replace IOMMU_CAP_INTR_REMAP with IRQ_DOMAIN_FLAG_ISOLATED_MSI genirq/msi: Rename IRQ_DOMAIN_MSI_REMAP to IRQ_DOMAIN_ISOLATED_MSI genirq/irqdomain: Remove unused irq_domain_check_msi_remap() code iommufd: Convert to msi_device_has_isolated_msi() vfio/type1: Convert to iommu_group_has_isolated_msi() iommu: Add iommu_group_has_isolated_msi() genirq/msi: Add msi_device_has_isolated_msi() commit a13de74e476532e32efb06e96acae84c634f0159 Merge: 8395d932d24a9 bedd29d793da3 Author: Linus Torvalds Date: Fri Feb 24 13:40:13 2023 -0800 Merge tag 'iommu-updates-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu updates from Joerg Roedel: - Consolidate iommu_map/unmap functions. There have been blocking and atomic variants so far, but that was problematic as this approach does not scale with required new variants which just differ in the GFP flags used. So Jason consolidated this back into single functions that take a GFP parameter. - Retire the detach_dev() call-back in iommu_ops - Arm SMMU updates from Will: - Device-tree binding updates: - Cater for three power domains on SM6375 - Document existing compatible strings for Qualcomm SoCs - Tighten up clocks description for platform-specific compatible strings - Enable Qualcomm workarounds for some additional platforms that need them - Intel VT-d updates from Lu Baolu: - Add Intel IOMMU performance monitoring support - Set No Execute Enable bit in PASID table entry - Two performance optimizations - Fix PASID directory pointer coherency - Fix missed rollbacks in error path - Cleanups - Apple t8110 DART support - Exynos IOMMU: - Implement better fault handling - Error handling fixes - Renesas IPMMU: - Add device tree bindings for r8a779g0 - AMD IOMMU: - Various fixes for handling on SNP-enabled systems and handling of faults with unknown request-ids - Cleanups and other small fixes - Various other smaller fixes and cleanups * tag 'iommu-updates-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (71 commits) iommu/amd: Skip attach device domain is same as new domain iommu: Attach device group to old domain in error path iommu/vt-d: Allow to use flush-queue when first level is default iommu/vt-d: Fix PASID directory pointer coherency iommu/vt-d: Avoid superfluous IOTLB tracking in lazy mode iommu/vt-d: Fix error handling in sva enable/disable paths iommu/amd: Improve page fault error reporting iommu/amd: Do not identity map v2 capable device when snp is enabled iommu: Fix error unwind in iommu_group_alloc() iommu/of: mark an unused function as __maybe_unused iommu: dart: DART_T8110_ERROR range should be 0 to 5 iommu/vt-d: Enable IOMMU perfmon support iommu/vt-d: Add IOMMU perfmon overflow handler support iommu/vt-d: Support cpumask for IOMMU perfmon iommu/vt-d: Add IOMMU perfmon support iommu/vt-d: Support Enhanced Command Interface iommu/vt-d: Retrieve IOMMU perfmon capability information iommu/vt-d: Support size of the register set in DRHD iommu/vt-d: Set No Execute Enable bit in PASID table entry iommu/vt-d: Remove sva from intel_svm_dev ... commit 8395d932d24a9b4c01ab33ed0b4b2de06328afc2 Merge: a93e884edf61f 1ba7dfb905b39 Author: Linus Torvalds Date: Fri Feb 24 13:31:53 2023 -0800 Merge tag 'devicetree-for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree updates from Rob Herring: "DT core: - Add node lifecycle unit tests - Add of_property_present() helper aligned with fwnode API - Print more information on reserved regions on boot - Update dtc to upstream v1.6.1-66-gabbd523bae6e - Use strscpy() to instead of strncpy() in DT core - Add option for schema validation on %.dtb targets Bindings: - Add/fix support for listing multiple patterns in DT_SCHEMA_FILES - Rework external memory controller/bus bindings to properly support controller specific child node properties - Convert loongson,ls1x-intc, fcs,fusb302, sil,sii8620, Rockchip RK3399 PCIe, Synquacer I2C, and Synquacer EXIU bindings to DT schema format - Add RiscV SBI PMU event mapping binding - Add missing contraints on Arm SCMI child node allowed properties - Add a bunch of missing Socionext UniPhier glue block bindings and example fixes - Various fixes for duplicate or conflicting type definitions on DT properties" * tag 'devicetree-for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (66 commits) dt-bindings: regulator: Add mps,mpq7932 power-management IC of: dynamic: Fix spelling mistake "kojbect" -> "kobject" dt-bindings: drop Sagar Kadam from SiFive binding maintainership dt-bindings: sram: qcom,imem: document sm8450 dt-bindings: interrupt-controller: convert loongson,ls1x-intc.txt to json-schema dt-bindings: arm: Add Cortex-A715 and X3 of: dynamic: add lifecycle docbook info to node creation functions of: add consistency check to of_node_release() of: do not use "%pOF" printk format on node with refcount of zero of: unittest: add node lifecycle tests of: update kconfig unittest help of: add processing of EXPECT_NOT to of_unittest_expect of: prepare to add processing of EXPECT_NOT to of_unittest_expect of: Use preferred of_property_read_* functions of: Use of_property_present() helper of: Add of_property_present() helper of: reserved_mem: Use proper binary prefix dt-bindings: Fix multi pattern support in DT_SCHEMA_FILES of: reserved-mem: print out reserved-mem details during boot dt-bindings: serial: restrict possible child node names ... commit a93e884edf61f9debc9ca61ef9e545f0394ab666 Merge: 693fed981eb9b 88cd618dcc7b6 Author: Linus Torvalds Date: Fri Feb 24 12:58:55 2023 -0800 Merge tag 'driver-core-6.3-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.3-rc1. There's a lot of changes this development cycle, most of the work falls into two different categories: - fw_devlink fixes and updates. This has gone through numerous review cycles and lots of review and testing by lots of different devices. Hopefully all should be good now, and Saravana will be keeping a watch for any potential regression on odd embedded systems. - driver core changes to work to make struct bus_type able to be moved into read-only memory (i.e. const) The recent work with Rust has pointed out a number of areas in the driver core where we are passing around and working with structures that really do not have to be dynamic at all, and they should be able to be read-only making things safer overall. This is the contuation of that work (started last release with kobject changes) in moving struct bus_type to be constant. We didn't quite make it for this release, but the remaining patches will be finished up for the release after this one, but the groundwork has been laid for this effort. Other than that we have in here: - debugfs memory leak fixes in some subsystems - error path cleanups and fixes for some never-able-to-be-hit codepaths. - cacheinfo rework and fixes - Other tiny fixes, full details are in the shortlog All of these have been in linux-next for a while with no reported problems" [ Geert Uytterhoeven points out that that last sentence isn't true, and that there's a pending report that has a fix that is queued up - Linus ] * tag 'driver-core-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (124 commits) debugfs: drop inline constant formatting for ERR_PTR(-ERROR) OPP: fix error checking in opp_migrate_dentry() debugfs: update comment of debugfs_rename() i3c: fix device.h kernel-doc warnings dma-mapping: no need to pass a bus_type into get_arch_dma_ops() driver core: class: move EXPORT_SYMBOL_GPL() lines to the correct place Revert "driver core: add error handling for devtmpfs_create_node()" Revert "devtmpfs: add debug info to handle()" Revert "devtmpfs: remove return value of devtmpfs_delete_node()" driver core: cpu: don't hand-override the uevent bus_type callback. devtmpfs: remove return value of devtmpfs_delete_node() devtmpfs: add debug info to handle() driver core: add error handling for devtmpfs_create_node() driver core: bus: update my copyright notice driver core: bus: add bus_get_dev_root() function driver core: bus: constify bus_unregister() driver core: bus: constify some internal functions driver core: bus: constify bus_get_kset() driver core: bus: constify bus_register/unregister_notifier() driver core: remove private pointer from struct bus_type ... commit 693fed981eb9bf6e70bfda66bb872e2bb8155671 Merge: 0601f25d1c493 6ec363fc61422 Author: Linus Torvalds Date: Fri Feb 24 12:47:33 2023 -0800 Merge tag 'char-misc-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc and other driver subsystem updates from Greg KH: "Here is the large set of driver changes for char/misc drivers and other smaller driver subsystems that flow through this git tree. Included in here are: - New IIO drivers and features and improvments in that subsystem - New hwtracing drivers and additions to that subsystem - lots of interconnect changes and new drivers as that subsystem seems under very active development recently. This required also merging in the icc subsystem changes through this tree. - FPGA driver updates - counter subsystem and driver updates - MHI driver updates - nvmem driver updates - documentation updates - Other smaller driver updates and fixes, full details in the shortlog All of these have been in linux-next for a while with no reported problems" * tag 'char-misc-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (223 commits) scripts/tags.sh: fix incompatibility with PCRE2 firmware: coreboot: Remove GOOGLE_COREBOOT_TABLE_ACPI/OF Kconfig entries mei: lower the log level for non-fatal failed messages mei: bus: disallow driver match while dismantling device misc: vmw_balloon: fix memory leak with using debugfs_lookup() nvmem: stm32: fix OPTEE dependency dt-bindings: nvmem: qfprom: add IPQ8074 compatible nvmem: qcom-spmi-sdam: register at device init time nvmem: rave-sp-eeprm: fix kernel-doc bad line warning nvmem: stm32: detect bsec pta presence for STM32MP15x nvmem: stm32: add OP-TEE support for STM32MP13x nvmem: core: use nvmem_add_one_cell() in nvmem_add_cells_from_of() nvmem: core: add nvmem_add_one_cell() nvmem: core: drop the removal of the cells in nvmem_add_cells() nvmem: core: move struct nvmem_cell_info to nvmem-provider.h nvmem: core: add an index parameter to the cell of: property: add #nvmem-cell-cells property of: property: make #.*-cells optional for simple props of: base: add of_parse_phandle_with_optional_args() net: add helper eth_addr_add() ... commit 0601f25d1c4937c678db786961705ce56fbd6bb6 Merge: 17cd4d6f05087 b5929325f0630 Author: Linus Torvalds Date: Fri Feb 24 12:25:55 2023 -0800 Merge tag 'staging-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver updates from Greg KH: "Here is the "boring" staging driver update for 6.3-rc1. Nothing major in here at all, it's just lots of tiny code cleanups to bring some of the staging drivers more in line with the real portion of the kernel (apis and coding style.) Overall we remove more lines of code than we add, always a nice result. The big work was done by Martin Kaiser and Philipp Hortmann, both tackling some of the older wifi drivers, removing unused code and structures and a file in one case. Full details of the changes are in the shortlog. All of these have been in linux-next for a while with no reported issues" * tag 'staging-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (219 commits) staging: r8188eu: Revert "staging: r8188eu: simplify rtw_get_ff_hwaddr" staging: r8188eu: replace hand coded loop with list_for_each_entry staging: r8188eu: merge _rtw_enqueue_cmd into its caller most: add maintainer entry staging: rtl8192e: Use BIT() instead of << for bit field MSR_LINK_MASK staging: rtl8192e: Rename DM_RxPathSelTable staging: rtl8192e: Rename diff_TH and disabledRF staging: rtl8192e: Rename Enable, cck_Rx_path and SS_TH_low staging: rtl8192e: Rename RateAdaptiveTH.., VeryLowRSSI and WAIotTHVal staging: rtl8192e: Rename RxPathSelectio.., RateAdaptive.. and RateAdap.. staging: rtl8192e: Rename OFDM_Table.., CCK_Table_.. and RxPathSelecti.. staging: rtl8192e: Rename MacBlkCtrl and remove double definition staging: rtl8192e: Remove blank lines in r8192E_hw.h, rtl_core.h and .. staging: rtl8192e: Rename AcmHw_ViqEn, AcmHw_VoqEn and ANAPAR_FOR_8192PciE staging: r8188eu: bagg_pkt parameter is not used staging: r8188eu: simplify rtw_get_ff_hwaddr staging: r8188eu: simplify xmit_buf flags staging: r8188eu: xmit_buf's ff_hwaddr is not used staging: r8188eu: remove unused frametag defines staging: r8188eu: simplify rtw_alloc_xmitframe ... commit 310726c33ad76cebdee312dbfafc12c1b44bf977 Author: Jens Axboe Date: Fri Feb 24 10:01:19 2023 -0700 block: be a bit more careful in checking for NULL bdev while polling Wei reports a crash with an application using polled IO: PGD 14265e067 P4D 14265e067 PUD 47ec50067 PMD 0 Oops: 0000 [#1] SMP CPU: 0 PID: 21915 Comm: iocore_0 Kdump: loaded Tainted: G S 5.12.0-0_fbk12_clang_7346_g1bb6f2e7058f #1 Hardware name: Wiwynn Delta Lake MP T8/Delta Lake-Class2, BIOS Y3DLM08 04/10/2022 RIP: 0010:bio_poll+0x25/0x200 Code: 0f 1f 44 00 00 0f 1f 44 00 00 55 41 57 41 56 41 55 41 54 53 48 83 ec 28 65 48 8b 04 25 28 00 00 00 48 89 44 24 20 48 8b 47 08 <48> 8b 80 70 02 00 00 4c 8b 70 50 8b 6f 34 31 db 83 fd ff 75 25 65 RSP: 0018:ffffc90005fafdf8 EFLAGS: 00010292 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 74b43cd65dd66600 RDX: 0000000000000003 RSI: ffffc90005fafe78 RDI: ffff8884b614e140 RBP: ffff88849964df78 R08: 0000000000000000 R09: 0000000000000008 R10: 0000000000000000 R11: 0000000000000000 R12: ffff88849964df00 R13: ffffc90005fafe78 R14: ffff888137d3c378 R15: 0000000000000001 FS: 00007fd195000640(0000) GS:ffff88903f400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000270 CR3: 0000000466121001 CR4: 00000000007706f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: iocb_bio_iopoll+0x1d/0x30 io_do_iopoll+0xac/0x250 __se_sys_io_uring_enter+0x3c5/0x5a0 ? __x64_sys_write+0x89/0xd0 do_syscall_64+0x2d/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x94f225d Code: 24 cc 00 00 00 41 8b 84 24 d0 00 00 00 c1 e0 04 83 e0 10 41 09 c2 8b 33 8b 53 04 4c 8b 43 18 4c 63 4b 0c b8 aa 01 00 00 0f 05 <85> c0 0f 88 85 00 00 00 29 03 45 84 f6 0f 84 88 00 00 00 41 f6 c7 RSP: 002b:00007fd194ffcd88 EFLAGS: 00000202 ORIG_RAX: 00000000000001aa RAX: ffffffffffffffda RBX: 00007fd194ffcdc0 RCX: 00000000094f225d RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007 RBP: 00007fd194ffcdb0 R08: 0000000000000000 R09: 0000000000000008 R10: 0000000000000001 R11: 0000000000000202 R12: 00007fd269d68030 R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000000 which is due to bio->bi_bdev being NULL. This can happen if we have two tasks doing polled IO, and task B ends up completing IO from task A if they are sharing a poll queue. If task B completes the IO and puts the bio into our cache, then it can allocate that bio again before task A is done polling for it. As that would necessitate a preempt between the two tasks, it's enough to just be a bit more careful in checking for whether or not bio->bi_bdev is NULL. Reported-and-tested-by: Wei Zhang Cc: stable@vger.kernel.org Fixes: be4d234d7aeb ("bio: add allocation cache abstraction") Reviewed-by: Keith Busch Signed-off-by: Jens Axboe commit 11eb695feb636fa5211067189cad25ac073e7fe5 Author: Jens Axboe Date: Fri Feb 24 09:59:44 2023 -0700 block: clear bio->bi_bdev when putting a bio back in the cache This isn't strictly needed in terms of correctness, but it does allow polling to know if the bio has been put already by a different task and hence avoid polling something that we don't need to. Cc: stable@vger.kernel.org Fixes: be4d234d7aeb ("bio: add allocation cache abstraction") Reviewed-by: Keith Busch Signed-off-by: Jens Axboe commit 17cd4d6f05087ea1ae5c1416ef260e5b7fc5d5c9 Merge: 72bffe7e1eb6c 72206cc730b5c Author: Linus Torvalds Date: Fri Feb 24 12:17:14 2023 -0800 Merge tag 'tty-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty / serial driver updates from Greg KH: "Here is the big set of serial and tty driver updates for 6.3-rc1. Once again, Jiri and Ilpo have done a number of core vt and tty/serial layer cleanups that were much needed and appreciated. Other than that, it's just a bunch of little tty/serial driver updates: - qcom-geni-serial driver updates - liteuart driver updates - hvcs driver cleanups - n_gsm updates and additions for new features - more 8250 device support added - fpga/dfl update and additions - imx serial driver updates - fsl_lpuart updates - other tiny fixes and updates for serial drivers All of these have been in linux-next for a while with no reported problems" * tag 'tty-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (143 commits) tty: n_gsm: add keep alive support serial: imx: remove a redundant check dt-bindings: serial: snps-dw-apb-uart: add dma & dma-names properties soc: qcom: geni-se: Move qcom-geni-se.h to linux/soc/qcom/geni-se.h tty: n_gsm: add TIOCMIWAIT support tty: n_gsm: add RING/CD control support tty: n_gsm: mark unusable ioctl structure fields accordingly serial: imx: get rid of registers shadowing serial: imx: refine local variables in rxint() serial: imx: stop using USR2 in FIFO reading loop serial: imx: remove redundant USR2 read from FIFO reading loop serial: imx: do not break from FIFO reading loop prematurely serial: imx: do not sysrq broken chars serial: imx: work-around for hardware RX flood serial: imx: factor-out common code to imx_uart_soft_reset() serial: 8250_pci1xxxx: Add power management functions to quad-uart driver serial: 8250_pci1xxxx: Add RS485 support to quad-uart driver serial: 8250_pci1xxxx: Add driver for quad-uart support serial: 8250_pci: Add serial8250_pci_setup_port definition in 8250_pcilib.c tty: pcn_uart: fix memory leak with using debugfs_lookup() ... commit 72bffe7e1eb6cb82b90aa14cd786f3f5ede9e0ae Merge: ab7362d04d7c1 1243741f6b02b Author: Linus Torvalds Date: Fri Feb 24 12:07:00 2023 -0800 Merge tag 'usb-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB / Thunderbolt driver updates from Greg KH: "Here is the big set of USB and Thunderbolt driver changes for 6.3-rc1. Nothing major in here, just lots of good development, including: - Thunderbolt additions for new device support and features - xhci driver updates and cleanups - USB gadget media driver updates (includes media core changes that were acked by the v4l2 maintainers) - lots of other USB gadget driver updates for new features - dwc3 driver updates and fixes - minor debugfs leak fixes - typec driver updates and additions - dt-bindings conversions to yaml - other small bugfixes and driver updates All have been in linux-next for a while with no reported issues" * tag 'usb-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (237 commits) usb: dwc3: xilinx: Remove unused of_gpio,h usb: typec: pd: Add higher capability sysfs for sink PDO usb: typec: pd: Remove usb_suspend_supported sysfs from sink PDO usb: dwc3: pci: add support for the Intel Meteor Lake-M usb: gadget: u_ether: Don't warn in gether_setup_name_default() usb: gadget: u_ether: Convert prints to device prints usb: gadget: u_serial: Add null pointer check in gserial_resume usb: gadget: uvc: fix missing mutex_unlock() if kstrtou8() fails xhci: host: potential NULL dereference in xhci_generic_plat_probe() dt-bindings: usb: amlogic,meson-g12a-usb-ctrl: make G12A usb3-phy0 optional usb: host: fsl-mph-dr-of: reuse device_set_of_node_from_dev of: device: Do not ignore error code in of_device_uevent_modalias of: device: Ignore modalias of reused nodes usb: gadget: configfs: Fix set but not used variable warning usb: gadget: uvc: Use custom strings if available usb: gadget: uvc: Allow linking function to string descs usb: gadget: uvc: Pick up custom string descriptor IDs usb: gadget: uvc: Allow linking XUs to string descriptors usb: gadget: configfs: Attach arbitrary strings to cdev usb: gadget: configfs: Support arbitrary string descriptors ... commit 7605c43d67face310b4b87dee1a28bc0c8cd8c0f Author: David Lamparter Date: Fri Feb 24 16:01:24 2023 +0100 io_uring: remove MSG_NOSIGNAL from recvmsg MSG_NOSIGNAL is not applicable for the receiving side, SIGPIPE is generated when trying to write to a "broken pipe". AF_PACKET's packet_recvmsg() does enforce this, giving back EINVAL when MSG_NOSIGNAL is set - making it unuseable in io_uring's recvmsg. Remove MSG_NOSIGNAL from io_recvmsg_prep(). Cc: stable@vger.kernel.org # v5.10+ Signed-off-by: David Lamparter Cc: Eric Dumazet Cc: Jens Axboe Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20230224150123.128346-1-equinox@diac24.net Signed-off-by: Jens Axboe commit 977bc87356107fb946fb4ff24f1e4c241b5043ec Author: Jens Axboe Date: Fri Feb 24 09:54:57 2023 -0700 io_uring/rsrc: always initialize 'folio' to NULL Smatch complains that: smatch warnings: io_uring/rsrc.c:1262 io_sqe_buffer_register() error: uninitialized symbol 'folio'. 'folio' may be used uninitialized, which can happen if we end up with a single page mapped. Ensure that we clear folio to NULL at the top so it's always set. Reported-by: kernel test robot Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/202302241432.YML1CD5C-lkp@intel.com/ Signed-off-by: Jens Axboe commit 766d1bdceb3290f83ecadd949cc0cd3ef08f8146 Merge: ac3ad19584b26 d77e7eceeac9f Author: Jakub Kicinski Date: Fri Feb 24 11:55:49 2023 -0800 Merge branch 'tools-ynl-gen-fix-glitches-found-by-chuck' Jakub Kicinski says: ==================== tools: ynl-gen: fix glitches found by Chuck A handful of fixes Chuck run into while trying to define the family for crypto handshakes. ==================== Link: https://lore.kernel.org/r/20230223183141.1422857-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit d77e7eceeac9f3ab40b45649531993b456eeacd0 Author: Jakub Kicinski Date: Thu Feb 23 10:31:41 2023 -0800 tools: net: add __pycache__ to gitignore Python will generate its customary cache when running ynl scripts: ?? tools/net/ynl/lib/__pycache__/ Reported-by: Chuck Lever III Signed-off-by: Jakub Kicinski commit b9d3a3e4ae0cb7c443d46ffe413e17749baab3ba Author: Jakub Kicinski Date: Thu Feb 23 10:31:40 2023 -0800 tools: ynl-gen: re-raise the exception instead of printing traceback.print_exception() seems tricky to call, we're missing some argument, so re-raise instead. Reported-by: Chuck Lever III Fixes: 3aacf8281336 ("tools: ynl: add an object hierarchy to represent parsed spec") Signed-off-by: Jakub Kicinski commit f7cf644796fcdb6a0e30e4a7f218be74ac8cb31d Author: Jakub Kicinski Date: Thu Feb 23 10:31:39 2023 -0800 tools: ynl-gen: fix single attribute structs with attr 0 only Chuck run into an issue with a single-element attr-set which only has an attr with value of 0. The search for max attr in a struct records attrs with value larger than 0 only (max_val is set to 0 at the start). Adjust the comparison, alternatively max_val could be init'ed to -1. Somehow picking the last attr of a value seems like a good idea in general. Reported-by: Chuck Lever III Fixes: be5bea1cc0bf ("net: add basic C code generators for Netlink") Signed-off-by: Jakub Kicinski commit ea9a78c3a7a44e36fa690e1cc90dc2a758c8eb9a Author: Johan Hovold Date: Fri Feb 24 14:05:09 2023 +0100 genirq/msi: Drop dead domain name assignment Since commit d59f6617eef0 ("genirq: Allow fwnode to carry name information only") an IRQ domain is always given a name during allocation (e.g. used for the debugfs entry). Drop the unused fallback name assignment when creating MSI domains. Signed-off-by: Johan Hovold Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20230224130509.27814-1-johan+linaro@kernel.org commit ab7362d04d7c14923420c1e19e889da512a65cd7 Author: David Howells Date: Fri Feb 24 14:31:15 2023 +0000 cifs: Fix cifs_writepages_region() Fix the cifs_writepages_region() to just jump over members of the batch that have been cleaned up rather than counting them as skipped. Unlike the other "skip_write" cases, this situation happens even for WB_SYNC_ALL, simply because the page has either been cleaned by somebody else, or was truncated. So in this case we're not "skipping" the write, we simply no longer need any write at all, so it's very different from the other skip_write cases. And we definitely shouldn't stop writing the rest just because of too many of these cases (or because we want to be rescheduled). Fixes: 3822a7c40997 ("Merge tag 'mm-stable-2023-02-20-13-37' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm") Signed-off-by: David Howells Link: https://lore.kernel.org/lkml/2213409.1677249075@warthog.procyon.org.uk/ Signed-off-by: Linus Torvalds commit d28a06d7dbedc598a06bd1e53a28125f87ca5d0c Author: Maor Dickman Date: Wed Feb 8 17:44:06 2023 +0200 net/mlx5: Geneve, Fix handling of Geneve object id as error code On success, mlx5_geneve_tlv_option_create returns non negative Geneve object id. In case the object id is positive value the caller functions will handle it as an error (non zero) and will fail to offload the Geneve rule. Fix this by changing caller function ,mlx5_geneve_tlv_option_add, to return 0 in case valid non negative object id was provided. Fixes: 0ccc171ea6a2 ("net/mlx5: Geneve, Manage Geneve TLV options") Signed-off-by: Maor Dickman Reviewed-by: Raed Salem Signed-off-by: Saeed Mahameed commit 1bf8b0dae8dde6f02520a5ea34fdaa3b39342e69 Author: Roi Dayan Date: Tue Jan 31 12:04:30 2023 +0200 net/mlx5e: Verify flow_source cap before using it When adding send to vport rule verify flow_source matching is supported by checking the flow_source cap. Fixes: d04442540372 ("net/mlx5: E-Switch, set flow source for send to uplink rule") Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit e1ed30c8c09abc85a01c897845bdbd08c0333353 Author: Maher Sanalla Date: Wed Feb 15 20:12:05 2023 +0200 net/mlx5: ECPF, wait for VF pages only after disabling host PFs Currently, during the early stages of their unloading, particularly during SRIOV disablement, PFs/ECPFs wait on the release of all of their VFs memory pages. Furthermore, ECPFs are considered the page supplier for host VFs, hence the host VFs memory pages are freed only during ECPF cleanup when host interfaces get disabled. Thus, disabling SRIOV early in unload timeline causes the DPU ECPF to stall on driver unload while waiting on the release of host VF pages that won't be freed before host interfaces get disabled later on. Therefore, for ECPFs, wait on the release of VFs pages only after the disablement of host PFs during ECPF cleanup flow. Then, host PFs and VFs are disabled and their memory shall be freed accordingly. Fixes: 143a41d7623d ("net/mlx5: Disable SRIOV before PF removal") Signed-off-by: Maher Sanalla Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 3a50cf1e8e5157b82268eee7e330dbe5736a0948 Author: Vadim Fedorenko Date: Thu Feb 2 09:13:55 2023 -0800 mlx5: fix possible ptp queue fifo use-after-free Fifo indexes are not checked during pop operations and it leads to potential use-after-free when poping from empty queue. Such case was possible during re-sync action. WARN_ON_ONCE covers future cases. There were out-of-order cqe spotted which lead to drain of the queue and use-after-free because of lack of fifo pointers check. Special check and counter are added to avoid resync operation if SKB could not exist in the fifo because of OOO cqe (skb_id must be between consumer and producer index). Fixes: 58a518948f60 ("net/mlx5e: Add resiliency for PTP TX port timestamp") Signed-off-by: Vadim Fedorenko Signed-off-by: Saeed Mahameed commit e435941b1da1a0be4ff8a7ae425774c76a5ac514 Author: Vadim Fedorenko Date: Thu Feb 2 09:13:54 2023 -0800 mlx5: fix skb leak while fifo resync and push During ptp resync operation SKBs were poped from the fifo but were never freed neither by napi_consume nor by dev_kfree_skb_any. Add call to napi_consume_skb to properly free SKBs. Another leak was happening because mlx5e_skb_fifo_has_room() had an error in the check. Comparing free running counters works well unless C promotes the types to something wider than the counter. In this case counters are u16 but the result of the substraction is promouted to int and it causes wrong result (negative value) of the check when producer have already overlapped but consumer haven't yet. Explicit cast to u16 fixes the issue. Fixes: 58a518948f60 ("net/mlx5e: Add resiliency for PTP TX port timestamp") Reviewed-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Vadim Fedorenko Signed-off-by: Saeed Mahameed commit bfeda9683dcd697dc84bbd5ce375f659e9590bf5 Author: Yang Yingliang Date: Fri Feb 17 11:13:01 2023 +0800 net/mlx5e: TC, fix return value check in mlx5e_tc_act_stats_create() kvzalloc() returns NULL pointer not PTR_ERR() when it fails, so replace the IS_ERR() check with NULL pointer check. Fixes: d13674b1d14c ("net/mlx5e: TC, map tc action cookie to a hw counter") Signed-off-by: Yang Yingliang Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 0483a16bc493075bb9f6483497786fed41d27b94 Author: Yang Li Date: Wed Feb 22 10:29:44 2023 +0800 net/mlx5: 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 warning: ./drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c:714: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=4174 Signed-off-by: Yang Li Signed-off-by: Saeed Mahameed commit 047ee71ae4f412d8819e39e4b08c588fa299cfc2 Author: Krishna Yarlagadda Date: Fri Feb 24 22:10:34 2023 +0530 spi: tegra210-quad: Fix validate combined sequence Check for non dma transfers that do not fit in FIFO has issue and skips combined sequence for Tegra234 & Tegra241 which does not have GPCDMA. Fixes: 1b8342cc4a38 ("spi: tegra210-quad: combined sequence mode") Signed-off-by: Krishna Yarlagadda Link: https://lore.kernel.org/r/20230224164034.56933-1-kyarlagadda@nvidia.com Signed-off-by: Mark Brown commit fb1847cc460c127b12720119eae5f438ffc62e85 Author: Martin Povišer Date: Fri Feb 24 16:33:02 2023 +0100 ASoC: apple: mca: Improve handling of unavailable DMA channels When we fail to obtain a DMA channel, don't return a blanket -EINVAL, instead return the original error code if there's one. This makes deferring work as it should. Also don't print an error message for -EPROBE_DEFER. Fixes: 4ec8179c212f ("ASoC: apple: mca: Postpone requesting of DMA channels") Signed-off-by: Martin Povišer Link: https://lore.kernel.org/r/20230224153302.45365-3-povik+lin@cutebit.org Signed-off-by: Mark Brown commit d8b3e396088d787771f19fd3b7949e080dc31d6f Author: Martin Povišer Date: Fri Feb 24 16:33:01 2023 +0100 ASoC: apple: mca: Fix SERDES reset sequence Fix the reset sequence of reads and writes that we invoke from within the early trigger. It looks like there never was a SERDES_CONF_SOME_RST bit that should be involved in the reset sequence, and its presence in the driver code is a mistake from earlier. Instead, the reset sequence should go as follows: We should switch the the SERDES unit's SYNC_SEL mux to the value of 7 (so outside the range of 1...6 representing cluster's SYNCGEN units), then raise the RST bit in SERDES_STATUS and wait for it to clear. Properly resetting the SERDES unit fixes frame desynchronization hazard in case of long frames (longer than 4 used slots). The desynchronization manifests itself by rotating the PCM channels. Fixes: 3df5d0d97289 ("ASoC: apple: mca: Start new platform driver") Signed-off-by: Martin Povišer Link: https://lore.kernel.org/r/20230224153302.45365-2-povik+lin@cutebit.org Signed-off-by: Mark Brown commit aaf5f0d76b6e1870e3674408de2b13a92a4d4059 Author: Martin Povišer Date: Fri Feb 24 16:33:00 2023 +0100 ASoC: apple: mca: Fix final status read on SERDES reset From within the early trigger we are doing a reset of the SERDES unit, but the final status read is on a bad address. Add the missing SERDES unit offset in calculation of the address. Fixes: 3df5d0d97289 ("ASoC: apple: mca: Start new platform driver") Signed-off-by: Martin Povišer Link: https://lore.kernel.org/r/20230224153302.45365-1-povik+lin@cutebit.org Signed-off-by: Mark Brown commit 1b561d3949f8478c5403c9752b5533211a757226 Author: Sudeep Holla Date: Thu Feb 23 13:57:42 2023 +0000 arm64: acpi: Fix possible memory leak of ffh_ctxt Allocated 'ffh_ctxt' memory leak is possible if the SMCCC version and conduit checks fail and -EOPNOTSUPP is returned without freeing the allocated memory. Fix the same by moving the allocation after the SMCCC version and conduit checks. Fixes: 1d280ce099db ("arm64: Add architecture specific ACPI FFH Opregion callbacks") Cc: # 6.2.x Cc: Will Deacon Reported-by: kernel test robot Reported-by: Dan Carpenter Suggested-by: Dan Carpenter Link: https://lore.kernel.org/r/202302191417.dAl9NuE8-lkp@intel.com/ Signed-off-by: Sudeep Holla Link: https://lore.kernel.org/r/20230223135742.2952091-1-sudeep.holla@arm.com Signed-off-by: Catalin Marinas commit 060a2c92d1b627c86c5c42ca69baf00457c00c5a Author: Catalin Marinas Date: Wed Feb 22 17:52:32 2023 +0000 arm64: mm: hugetlb: Disable HUGETLB_PAGE_OPTIMIZE_VMEMMAP Revert the HUGETLB_PAGE_FREE_VMEMMAP selection from commit 1e63ac088f20 ("arm64: mm: hugetlb: enable HUGETLB_PAGE_FREE_VMEMMAP for arm64") but keep the flush_dcache_page() compound_head() change as it aligns with the corresponding check in the __sync_icache_dcache() function. The original config option was renamed in commit 47010c040dec ("mm: hugetlb_vmemmap: cleanup CONFIG_HUGETLB_PAGE_FREE_VMEMMAP*") to HUGETLB_PAGE_OPTIMIZE_VMEMMAP and the flush_dcache_page() check was further simplified by commit 2da1c30929a2 ("mm: hugetlb_vmemmap: delete hugetlb_optimize_vmemmap_enabled()"). The reason for the revert is that the generic vmemmap_remap_pte() function changes both the permissions (writeable to read-only) and the output address (pfn) of the vmemmap ptes. This is deemed UNPREDICTABLE by the Arm architecture without a break-before-make sequence (make the PTE invalid, TLBI, write the new valid PTE). However, such sequence is not possible since the vmemmap may be concurrently accessed by the kernel. Disable the optimisation until a better solution is found. Fixes: 1e63ac088f20 ("arm64: mm: hugetlb: enable HUGETLB_PAGE_FREE_VMEMMAP for arm64") Cc: # 5.19.x Cc: Muchun Song Cc: Will Deacon Cc: Anshuman Khandual Link: https://lore.kernel.org/r/Y9pZALdn3pKiJUeQ@arm.com Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/20230222175232.540851-1-catalin.marinas@arm.com Signed-off-by: Catalin Marinas commit 89c58cb395ec0fb58df5475dced1093eaf5896ad Author: Eric Van Hensbergen Date: Sun Dec 18 21:02:24 2022 +0000 fs/9p: fix error reporting in v9fs_dir_release Checking the p9_fid_put value allows us to pass back errors involved if we end up clunking the fid as part of dir_release. This can help with more graceful response to errors in writeback among other things. Signed-off-by: Eric Van Hensbergen Reviewed-by: Dominique Martinet commit 3866584a1c56a2bbc8c0981deb4476d0b801969e Author: Eric Van Hensbergen Date: Sun Dec 18 17:57:27 2022 +0000 net/9p: fix bug in client create for .L We are supposed to set fid->mode to reflect the flags that were used to open the file. We were actually setting it to the creation mode which is the default perms of the file not the flags the file was opened with. Signed-off-by: Eric Van Hensbergen Reviewed-by: Dominique Martinet commit 74a25e6e916cb57dab4267a96fbe8864ed21abdb Author: Zhengchao Shao Date: Wed Jan 4 10:04:24 2023 +0800 9p/rdma: unmap receive dma buffer in rdma_request()/post_recv() When down_interruptible() or ib_post_send() failed in rdma_request(), receive dma buffer is not unmapped. Add unmap action to error path. Also if ib_post_recv() failed in post_recv(), dma buffer is not unmapped. Add unmap action to error path. Link: https://lkml.kernel.org/r/20230104020424.611926-1-shaozhengchao@huawei.com Fixes: fc79d4b104f0 ("9p: rdma: RDMA Transport Support for 9P") Signed-off-by: Zhengchao Shao Reviewed-by: Leon Romanovsky Signed-off-by: Dominique Martinet Signed-off-by: Eric Van Hensbergen commit c15fe55d14b3b4ded5af2a3260877460a6ffb8ad Author: Juergen Gross Date: Mon Jan 30 12:30:36 2023 +0100 9p/xen: fix connection sequence Today the connection sequence of the Xen 9pfs frontend doesn't match the documented sequence. It can work reliably only for a PV 9pfs device having been added at boot time already, as the frontend is not waiting for the backend to have set its state to "XenbusStateInitWait" before reading the backend properties from Xenstore. Fix that by following the documented sequence [1] (the documentation has a bug, so the reference is for the patch fixing that). [1]: https://lore.kernel.org/xen-devel/20230130090937.31623-1-jgross@suse.com/T/#u Link: https://lkml.kernel.org/r/20230130113036.7087-3-jgross@suse.com Fixes: 868eb122739a ("xen/9pfs: introduce Xen 9pfs transport driver") Signed-off-by: Juergen Gross Reviewed-by: Simon Horman Signed-off-by: Dominique Martinet Signed-off-by: Eric Van Hensbergen commit f1956f4ec15195ec60976d9b5625326285ab102e Author: Juergen Gross Date: Mon Jan 30 12:30:35 2023 +0100 9p/xen: fix version parsing When connecting the Xen 9pfs frontend to the backend, the "versions" Xenstore entry written by the backend is parsed in a wrong way. The "versions" entry is defined to contain the versions supported by the backend separated by commas (e.g. "1,2"). Today only version "1" is defined. Unfortunately the frontend doesn't look for "1" being listed in the entry, but it is expecting the entry to have the value "1". This will result in failure as soon as the backend will support e.g. versions "1" and "2". Fix that by scanning the entry correctly. Link: https://lkml.kernel.org/r/20230130113036.7087-2-jgross@suse.com Fixes: 71ebd71921e4 ("xen/9pfs: connect to the backend") Signed-off-by: Juergen Gross Reviewed-by: Simon Horman Signed-off-by: Dominique Martinet Signed-off-by: Eric Van Hensbergen commit b5bfa7277ee7d944421e0ef193586c6e34d7492c Author: Nuno Sá Date: Fri Feb 24 11:45:51 2023 +0100 ASoC: adau7118: don't disable regulators on device unbind The regulators are supposed to be controlled through the set_bias_level() component callback. Moreover, the regulators are not enabled during probe and so, this would lead to a regulator unbalanced use count. Fixes: ca514c0f12b02 ("ASOC: Add ADAU7118 8 Channel PDM-to-I2S/TDM Converter driver") Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20230224104551.1139981-1-nuno.sa@analog.com Signed-off-by: Mark Brown commit ac3ad19584b26fae9ac86e4faebe790becc74491 Author: Eric Dumazet Date: Thu Feb 23 08:38:45 2023 +0000 net: fix __dev_kfree_skb_any() vs drop monitor dev_kfree_skb() is aliased to consume_skb(). When a driver is dropping a packet by calling dev_kfree_skb_any() we should propagate the drop reason instead of pretending the packet was consumed. Note: Now we have enum skb_drop_reason we could remove enum skb_free_reason (for linux-6.4) v2: added an unlikely(), suggested by Yunsheng Lin. Fixes: e6247027e517 ("net: introduce dev_consume_skb_any()") Signed-off-by: Eric Dumazet Cc: Yunsheng Lin Reviewed-by: Yunsheng Lin Signed-off-by: David S. Miller commit 1862de92c81c2a74ff05819aca20b0b83192c83b Author: Tariq Toukan Date: Thu Feb 23 09:26:56 2023 +0200 netdev-genl: fix repeated typo oflloading -> offloading Fix a repeated copy/paste typo. Fixes: d3d854fd6a1d ("netdev-genl: create a simple family for netdev stuff") Signed-off-by: Tariq Toukan Acked-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit c276a706ea1f51cf9723ed8484feceaf961b8f89 Author: Herbert Xu Date: Tue Feb 21 13:54:00 2023 +0800 xfrm: Allow transport-mode states with AF_UNSPEC selector xfrm state selectors are matched against the inner-most flow which can be of any address family. Therefore middle states in nested configurations need to carry a wildcard selector in order to work at all. However, this is currently forbidden for transport-mode states. Fix this by removing the unnecessary check. Fixes: 13996378e658 ("[IPSEC]: Rename mode to outer_mode and add inner_mode") Reported-by: David George Signed-off-by: Herbert Xu Signed-off-by: Steffen Klassert commit d2980d8d826554fa6981d621e569a453787472f8 Merge: 3822a7c40997d 817013880a688 Author: Linus Torvalds Date: Thu Feb 23 17:55:40 2023 -0800 Merge tag 'mm-nonmm-stable-2023-02-20-15-29' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull non-MM updates from Andrew Morton: "There is no particular theme here - mainly quick hits all over the tree. Most notable is a set of zlib changes from Mikhail Zaslonko which enhances and fixes zlib's use of S390 hardware support: 'lib/zlib: Set of s390 DFLTCC related patches for kernel zlib'" * tag 'mm-nonmm-stable-2023-02-20-15-29' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (55 commits) Update CREDITS file entry for Jesper Juhl sparc: allow PM configs for sparc32 COMPILE_TEST hung_task: print message when hung_task_warnings gets down to zero. arch/Kconfig: fix indentation scripts/tags.sh: fix the Kconfig tags generation when using latest ctags nilfs2: prevent WARNING in nilfs_dat_commit_end() lib/zlib: remove redundation assignement of avail_in dfltcc_gdht() lib/Kconfig.debug: do not enable DEBUG_PREEMPT by default lib/zlib: DFLTCC always switch to software inflate for Z_PACKET_FLUSH option lib/zlib: DFLTCC support inflate with small window lib/zlib: Split deflate and inflate states for DFLTCC lib/zlib: DFLTCC not writing header bits when avail_out == 0 lib/zlib: fix DFLTCC ignoring flush modes when avail_in == 0 lib/zlib: fix DFLTCC not flushing EOBS when creating raw streams lib/zlib: implement switching between DFLTCC and software lib/zlib: adjust offset calculation for dfltcc_state nilfs2: replace WARN_ONs for invalid DAT metadata block requests scripts/spelling.txt: add "exsits" pattern and fix typo instances fs: gracefully handle ->get_block not mapping bh in __mpage_writepage cramfs: Kconfig: fix spelling & punctuation ... commit 3822a7c40997dc86b1458766a3f146d62393f084 Merge: e4bc158895067 f9366f4c2a29d Author: Linus Torvalds Date: Thu Feb 23 17:09:35 2023 -0800 Merge tag 'mm-stable-2023-02-20-13-37' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull MM updates from Andrew Morton: - Daniel Verkamp has contributed a memfd series ("mm/memfd: add F_SEAL_EXEC") which permits the setting of the memfd execute bit at memfd creation time, with the option of sealing the state of the X bit. - Peter Xu adds a patch series ("mm/hugetlb: Make huge_pte_offset() thread-safe for pmd unshare") which addresses a rare race condition related to PMD unsharing. - Several folioification patch serieses from Matthew Wilcox, Vishal Moola, Sidhartha Kumar and Lorenzo Stoakes - Johannes Weiner has a series ("mm: push down lock_page_memcg()") which does perform some memcg maintenance and cleanup work. - SeongJae Park has added DAMOS filtering to DAMON, with the series "mm/damon/core: implement damos filter". These filters provide users with finer-grained control over DAMOS's actions. SeongJae has also done some DAMON cleanup work. - Kairui Song adds a series ("Clean up and fixes for swap"). - Vernon Yang contributed the series "Clean up and refinement for maple tree". - Yu Zhao has contributed the "mm: multi-gen LRU: memcg LRU" series. It adds to MGLRU an LRU of memcgs, to improve the scalability of global reclaim. - David Hildenbrand has added some userfaultfd cleanup work in the series "mm: uffd-wp + change_protection() cleanups". - Christoph Hellwig has removed the generic_writepages() library function in the series "remove generic_writepages". - Baolin Wang has performed some maintenance on the compaction code in his series "Some small improvements for compaction". - Sidhartha Kumar is doing some maintenance work on struct page in his series "Get rid of tail page fields". - David Hildenbrand contributed some cleanup, bugfixing and generalization of pte management and of pte debugging in his series "mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE on all architectures with swap PTEs". - Mel Gorman and Neil Brown have removed the __GFP_ATOMIC allocation flag in the series "Discard __GFP_ATOMIC". - Sergey Senozhatsky has improved zsmalloc's memory utilization with his series "zsmalloc: make zspage chain size configurable". - Joey Gouly has added prctl() support for prohibiting the creation of writeable+executable mappings. The previous BPF-based approach had shortcomings. See "mm: In-kernel support for memory-deny-write-execute (MDWE)". - Waiman Long did some kmemleak cleanup and bugfixing in the series "mm/kmemleak: Simplify kmemleak_cond_resched() & fix UAF". - T.J. Alumbaugh has contributed some MGLRU cleanup work in his series "mm: multi-gen LRU: improve". - Jiaqi Yan has provided some enhancements to our memory error statistics reporting, mainly by presenting the statistics on a per-node basis. See the series "Introduce per NUMA node memory error statistics". - Mel Gorman has a second and hopefully final shot at fixing a CPU-hog regression in compaction via his series "Fix excessive CPU usage during compaction". - Christoph Hellwig does some vmalloc maintenance work in the series "cleanup vfree and vunmap". - Christoph Hellwig has removed block_device_operations.rw_page() in ths series "remove ->rw_page". - We get some maple_tree improvements and cleanups in Liam Howlett's series "VMA tree type safety and remove __vma_adjust()". - Suren Baghdasaryan has done some work on the maintainability of our vm_flags handling in the series "introduce vm_flags modifier functions". - Some pagemap cleanup and generalization work in Mike Rapoport's series "mm, arch: add generic implementation of pfn_valid() for FLATMEM" and "fixups for generic implementation of pfn_valid()" - Baoquan He has done some work to make /proc/vmallocinfo and /proc/kcore better represent the real state of things in his series "mm/vmalloc.c: allow vread() to read out vm_map_ram areas". - Jason Gunthorpe rationalized the GUP system's interface to the rest of the kernel in the series "Simplify the external interface for GUP". - SeongJae Park wishes to migrate people from DAMON's debugfs interface over to its sysfs interface. To support this, we'll temporarily be printing warnings when people use the debugfs interface. See the series "mm/damon: deprecate DAMON debugfs interface". - Andrey Konovalov provided the accurately named "lib/stackdepot: fixes and clean-ups" series. - Huang Ying has provided a dramatic reduction in migration's TLB flush IPI rates with the series "migrate_pages(): batch TLB flushing". - Arnd Bergmann has some objtool fixups in "objtool warning fixes". * tag 'mm-stable-2023-02-20-13-37' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (505 commits) include/linux/migrate.h: remove unneeded externs mm/memory_hotplug: cleanup return value handing in do_migrate_range() mm/uffd: fix comment in handling pte markers mm: change to return bool for isolate_movable_page() mm: hugetlb: change to return bool for isolate_hugetlb() mm: change to return bool for isolate_lru_page() mm: change to return bool for folio_isolate_lru() objtool: add UACCESS exceptions for __tsan_volatile_read/write kmsan: disable ftrace in kmsan core code kasan: mark addr_has_metadata __always_inline mm: memcontrol: rename memcg_kmem_enabled() sh: initialize max_mapnr m68k/nommu: add missing definition of ARCH_PFN_OFFSET mm: percpu: fix incorrect size in pcpu_obj_full_size() maple_tree: reduce stack usage with gcc-9 and earlier mm: page_alloc: call panic() when memoryless node allocation fails mm: multi-gen LRU: avoid futile retries migrate_pages: move THP/hugetlb migration support check to simplify code migrate_pages: batch flushing TLB migrate_pages: share more code between _unmap and _move ... commit bd78acc89d4147aa4897a4c43e2a74c7df999b12 Author: Song Chen Date: Fri Dec 30 14:33:53 2022 +0800 kernel/trace: extract common part in process_fetch_insn Each probe has an instance of process_fetch_insn respectively, but they have something in common. This patch aims to extract the common part into process_common_fetch_insn which can be shared by each probe, and they only need to focus on their special cases. Signed-off-by: Song Chen Suggested-by: Masami Hiramatsu Acked-by: Masami Hiramatsu Signed-off-by: Masami Hiramatsu commit 672a2bf84061f0f19acfc5869f5b3689759a55a8 Author: Song Chen Date: Fri Dec 30 14:33:38 2022 +0800 kernel/trace: Provide default impelentations defined in trace_probe_tmpl.h There are 6 function definitions in trace_probe_tmpl.h, they are: 1, fetch_store_strlen 2, fetch_store_string 3, fetch_store_strlen_user 4, fetch_store_string_user 5, probe_mem_read 6, probe_mem_read_user Every C file which includes trace_probe_tmpl.h has to implement them, otherwise it gets warnings and errors. However, some of them are identical, like kprobe and eprobe, as a result, there is a lot redundant code in those 2 files. This patch would like to provide default behaviors for those functions which kprobe and eprobe can share by just including trace_probe_kernel.h with trace_probe_tmpl.h together. It removes redundant code, increases readability, and more importantly, makes it easier to introduce a new feature based on trace probe (it's possible). Link: https://lore.kernel.org/all/1672382018-18347-1-git-send-email-chensong_2000@189.cn/ Signed-off-by: Song Chen Reported-by: kernel test robot Acked-by: Masami Hiramatsu (Google) Signed-off-by: Masami Hiramatsu (Google) commit 196b6389a363e0d7e6b6f2654b9889f9c821b9d3 Author: Song Chen Date: Fri Dec 30 14:33:19 2022 +0800 kernel/trace: Introduce trace_probe_print_args and use it in *probes print_probe_args is currently inplemented in trace_probe_tmpl.h and included by *probes, as a result, each probe has an identical copy. This patch will move it to trace_probe.c as an new API, each probe calls it to print their args in trace file. Link: https://lore.kernel.org/all/1672382000-18304-1-git-send-email-chensong_2000@189.cn/ Signed-off-by: Song Chen Acked-by: Masami Hiramatsu (Google) Signed-off-by: Masami Hiramatsu (Google) commit a6b811cb402f4beb7c8a56345a40bf6c65bd771d Author: Gal Pressman Date: Wed Feb 22 15:01:59 2023 -0800 net/mlx5e: Remove hairpin write debugfs files Per the discussion in [1], hairpin parameters will be exposed using devlink, remove the debugfs files. [1] https://lore.kernel.org/all/20230111194608.7f15b9a1@kernel.org/ Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/all/20230222230202.523667-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 3acd9db9293f3b33ac04e8d44ed05b604ad1ac26 Author: Deepak R Varma Date: Wed Feb 22 18:58:48 2023 +0530 octeontx2-pf: Use correct struct reference in test condition Fix the typo/copy-paste error by replacing struct variable ah_esp_mask name by ah_esp_hdr. Issue identified using doublebitand.cocci Coccinelle semantic patch. Fixes: b7cf966126eb ("octeontx2-pf: Add flow classification using IP next level protocol") Link: https://lore.kernel.org/all/20210111112537.3277-1-naveenm@marvell.com/ Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/Y/YYkKddeHOt80cO@ubun2204.myguest.virtualbox.org Signed-off-by: Jakub Kicinski commit e4bc15889506723d7b93c053ad4a75cd58248d74 Merge: 025cf4dc5d76d 056f65c3938bf Author: Linus Torvalds Date: Thu Feb 23 15:09:31 2023 -0800 Merge tag 'leds-next-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds Pull LED updates from Lee Jones: "Removed Drivers: - HTC ASIC3 LED New Functionality: - Provide generic led_get() which can be used by both DT and !DT platforms Fix-ups: - Convert a bunch of I2C subsystem users to the new probing API - Explicitly provide missing include files - Make use of led_init_default_state_get() and rid the custom variants - Use simplified fwnode_device_is_compatible() API - Provide some Device Tree additions / adaptions - Fix some trivial spelling issues Bug Fixes: - Prevent device refcount leak during led_put() and of_led_get() - Clear previous data from temporary led_pwm structure before processing next child - Fix Clang's warning about incompatible function types when using devm_add_action*()" * tag 'leds-next-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (41 commits) leds: Remove ide-disk trigger dt-bindings: leds: Add disk write/read and usb-host/usb-gadget Documentation: leds: Correct spelling dt-bindings: leds: Document Bluetooth and WLAN triggers leds: Remove asic3 driver leds: simatic-ipc-leds-gpio: Make sure we have the GPIO providing driver leds: tca6507: Convert to use fwnode_device_is_compatible() leds: syscon: Get rid of custom led_init_default_state_get() leds: pm8058: Get rid of custom led_init_default_state_get() leds: pca955x: Get rid of custom led_init_default_state_get() leds: mt6360: Get rid of custom led_init_default_state_get() leds: mt6323: Get rid of custom led_init_default_state_get() leds: bcm6358: Get rid of custom led_init_default_state_get() leds: bcm6328: Get rid of custom led_init_default_state_get() leds: an30259a: Get rid of custom led_init_default_state_get() leds: Move led_init_default_state_get() to the global header leds: Add missing includes and forward declarations in leds.h leds: is31fl319x: Wrap mutex_destroy() for devm_add_action_or_rest() leds: turris-omnia: Convert to i2c's .probe_new() leds: tlc591xx: Convert to i2c's .probe_new() ... commit 025cf4dc5d76d89952eb29405f964c93cb13d7b9 Merge: c2c23dc7d5f86 ad614f81d2e8b Author: Linus Torvalds Date: Thu Feb 23 15:06:28 2023 -0800 Merge tag 'backlight-next-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: "New Drivers: - Add support for Kinetic KTZ8866 Backlight Removed Drivers: - Toshiba Sharp SL-6000 LCD and Backlight Fix-ups: - Provide some profiling optimisations with respect to pwm_get_state() and pwm_apply_state() - Make use of the dev_err_probe() API - Provide some Device Tree documentation additions / adaptions - Drop fall-back legacy PWM probing support - Convert over to new I2C probing API - Fix incorrect documentation - Make use of backlight_get_brightness() API Bug Fixes: - Fix disabling backlight on i.MX6 when inverted PWMs are used" * tag 'backlight-next-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: ktz8866: Convert to i2c's .probe_new() backlight: ktz8866: Add support for Kinetic KTZ8866 backlight dt-bindings: leds: backlight: Add Kinetic KTZ8866 backlight backlight: pwm_bl: Don't rely on a disabled PWM emiting inactive state backlight: pwm_bl: Configure pwm only once per backlight toggle backlight: Remove pxa tosa support backlight: aat2870: Use backlight helper backlight: ipaq_micro: Use backlight helper backlight: arcxcnn: Use backlight helper backlight: sky81452: Fix sky81452_bl_platform_data kernel-doc backlight: pwm_bl: Drop support for legacy PWM probing dt-bindings: backlight: qcom-wled: Add PMI8950 compatible backlight: ktd253: Switch to use dev_err_probe() helper backlight: backlight: Fix doc for backlight_device_get_by_name commit c2c23dc7d5f866a8bec3db638fae7f63789303ac Merge: 06e1a81c4806d 59c54c5997464 Author: Linus Torvalds Date: Thu Feb 23 15:03:05 2023 -0800 Merge tag 'mfd-next-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "Core Framework: - Change MFD support status from Supported to Maintained New Drivers: - Add support for the Intel Platform Management Component Interface (PMCI) Removed Drivers: - HTC PASIC3 LED/DS1WM - Toshiba T7L66XB, TC6387XB and TC6393XB TMIO New Device Support: - Add support for N6000 Flash to Intel M10 BMC PMCI - Add support for Lenovo Yoga Tab 3 to Intel CHTWC PMIC New Functionality: - Provide Reset support to Syscon Fix-ups: - Explicitly provide missing include files - Pass platform type data/info via the SPI/I2C/DT registration strategy - Lots of DT documentation / adaptions - Replace scnprintf() with preferred sysfs_emit() - Remove unused / superfluous code - Fix some trivial whitesspace / spelling / grammatical issues - Replace pm_power_off with new and improved register_sys_off_handler() API Bug Fixes: - Reintroduce RK808-clkout registration - fixing Wi-Fi and Bluetooth - Repair the order of AXPxxx IRQ PEK RISE/FALL definitions - Refuse to build CS5535 on unsupported UML architectures - Fix memory leaks in error return paths - Prevent refcount leaks in error return paths" * tag 'mfd-next-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (40 commits) dt-bindings: mfd: qcom,tcsr: Add compatible for IPQ5332 dt-bindings: mfd: Add NXP BBNSM mfd: ntxec: Add version number for EC in Tolino Vision dt-bindings: mfd: syscon: Add mt8365-syscfg mfd: Remove toshiba tmio drivers mfd: arizona: Use pm_runtime_resume_and_get() to prevent refcnt leak mfd: syscon: Allow reset control for syscon devices dt-bindings: mfd/syscon: Add resets property dt-bindings: mfd: syscon: Add amd,pensando-elba-syscon compatible dt-bindings: mfd: qcom,tcsr: Add compatible for MSM8226 mfd: simple-mfd-i2c: Fix incoherent comment regarding DT registration mfd: axp20x: Switch to the sys-off handler API mfd: core: Spelling s/compement/complement/ mfd: max8925: Remove the unused function irq_to_max8925() mfd: qcom-pm8xxx: Remove set but unused variable 'rev' dt-bindings: mfd: syscon: Document GXP register compatible mfd: twl4030-power: Drop empty platform remove function mfd: twl: Fix TWL6032 phy vbus detection mfd: pcf50633-adc: Fix potential memleak in pcf50633_adc_async_read() MAINTAINERS: Move MFD from a Supported to Maintaied state ... commit e90ff8ede777b98b44611b416b1ae6be94258335 Author: Sean Anderson Date: Thu Dec 22 16:45:31 2022 -0500 rtc: abx80x: Add nvmem support This adds support for the 256-byte internal RAM. There are two windows which can be used to access this RAM: 64 bytes at 0x40 (the "standard" address space) and 128 bytes at 0x80 (the "alternate" address space). We use the standard address space because it is also accessible over SPI (if such a port is ever done). We are limited to 32-byte reads for SMBus compatibility, so there's no advantage to using the alternate address space. There are some reserved bits in the EXTRAM register, and the datasheet doesn't say what to do with them. I've opted to skip a read/modify/write and just write the whole thing. If this driver is ever converted to regmap, this would be a good place to use regmap_update_bits. Signed-off-by: Sean Anderson Link: https://lore.kernel.org/r/20221222214532.1873718-1-sean.anderson@seco.com Signed-off-by: Alexandre Belloni commit 06e1a81c4806d0b7f75f9d742ebf410718244e03 Merge: f2b98d0af217f e1d447157f232 Author: Linus Torvalds Date: Thu Feb 23 14:41:48 2023 -0800 Merge tag 'efi-next-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi Pull EFI updates from Ard Biesheuvel: "A healthy mix of EFI contributions this time: - Performance tweaks for efifb earlycon (Andy) - Preparatory refactoring and cleanup work in the efivar layer, which is needed to accommodate the Snapdragon arm64 laptops that expose their EFI variable store via a TEE secure world API (Johan) - Enhancements to the EFI memory map handling so that Xen dom0 can safely access EFI configuration tables (Demi Marie) - Wire up the newly introduced IBT/BTI flag in the EFI memory attributes table, so that firmware that is generated with ENDBR/BTI landing pads will be mapped with enforcement enabled - Clean up how we check and print the EFI revision exposed by the firmware - Incorporate EFI memory attributes protocol definition and wire it up in the EFI zboot code (Evgeniy) This ensures that these images can execute under new and stricter rules regarding the default memory permissions for EFI page allocations (More work is in progress here) - CPER header cleanup (Dan Williams) - Use a raw spinlock to protect the EFI runtime services stack on arm64 to ensure the correct semantics under -rt (Pierre) - EFI framebuffer quirk for Lenovo Ideapad (Darrell)" * tag 'efi-next-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: (24 commits) firmware/efi sysfb_efi: Add quirk for Lenovo IdeaPad Duet 3 arm64: efi: Make efi_rt_lock a raw_spinlock efi: Add mixed-mode thunk recipe for GetMemoryAttributes efi: x86: Wire up IBT annotation in memory attributes table efi: arm64: Wire up BTI annotation in memory attributes table efi: Discover BTI support in runtime services regions efi/cper, cxl: Remove cxl_err.h efi: Use standard format for printing the EFI revision efi: Drop minimum EFI version check at boot efi: zboot: Use EFI protocol to remap code/data with the right attributes efi/libstub: Add memory attribute protocol definitions efi: efivars: prevent double registration efi: verify that variable services are supported efivarfs: always register filesystem efi: efivars: add efivars printk prefix efi: Warn if trying to reserve memory under Xen efi: Actually enable the ESRT under Xen efi: Apply allowlist to EFI configuration tables when running under Xen efi: xen: Implement memory descriptor lookup based on hypercall efi: memmap: Disregard bogus entries instead of returning them ... commit 344504e912ea49033d012dad9de3f68e20c07634 Author: Eric Van Hensbergen Date: Thu Dec 8 02:03:32 2022 +0000 fs/9p: Expand setup of writeback cache to all levels If cache is enabled, make sure we are putting the right things in place (mainly impacts mmap). This also sets us up for more cache levels. Signed-off-by: Eric Van Hensbergen Reviewed-by: Dominique Martinet commit 2a03472262c05f965d7ba394ed35dc9867ba3095 Author: Eric Van Hensbergen Date: Mon Nov 28 00:38:36 2022 +0000 net/9p: Adjust maximum MSIZE to account for p9 header Add maximum p9 header size to MSIZE to make sure we can have page aligned data. Signed-off-by: Eric Van Hensbergen Reviewed-by: Dominique Martinet commit 424b3d7582a2a4a7c45d405225ac70cff97f2e4a Author: Guchun Chen Date: Tue Feb 21 12:35:25 2023 +0800 drm/amd/pm: downgrade log level upon SMU IF version mismatch SMU IF version mismatch as a warning message exists widely after asic production, however, due to this log level setting, such mismatch warning will be caught by automation test like IGT and reported as a fake error after checking. As such mismatch does not break anything, to reduce confusion, downgrade it from dev_warn to dev_info. Signed-off-by: Guchun Chen Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b1e9a718af2ec3d21734a8357e8f22aa3bb68bfb Author: Candice Li Date: Mon Jan 16 16:18:21 2023 +0800 drm/amdgpu: Add ecc info query interface for umc v8_10 Support ecc info query for umc v8_10. v2: Simplied by convert_error_address. v3: Remove unused variable and invalid checking. Signed-off-by: Candice Li Reviewed-by: Tao Zhou Reviewed-by: Stanley.Yang Signed-off-by: Alex Deucher commit 2d53b579f3f217d5b88fb6708dcaef28f7b9fc0b Author: Candice Li Date: Wed Feb 15 21:16:56 2023 +0800 drm/amdgpu: Add convert_error_address function for umc v8_10 Add convert_error_address for umc v8_10. Signed-off-by: Candice Li Reviewed-by: Tao Zhou Reviewed-by: Stanley.Yang Signed-off-by: Alex Deucher commit 22106ed0be0d6c5b4aa07e18b63c1245bdb719c9 Author: Tao Zhou Date: Tue Feb 21 16:03:49 2023 +0800 drm/amdgpu: add bad_page_threshold check in ras_eeprom_check_err bad_page_threshold controls page retirement behavior and it should be also checked. v2: simplify the condition of bad page handling path. Signed-off-by: Tao Zhou Reviewed-by: Stanley.Yang Signed-off-by: Alex Deucher commit f3cbe70e215a87dcfdf028582a2fa94b24a08efe Author: Tao Zhou Date: Tue Feb 21 15:25:01 2023 +0800 drm/amdgpu: change default behavior of bad_page_threshold parameter Ignore ras umc bad page threshold by default, GPU initialization won't be stopped in this mode. v2: refine the description of bad_page_threshold. Signed-off-by: Tao Zhou Reviewed-by: Stanley.Yang Signed-off-by: Alex Deucher commit 4d33e0f1340b3d08002ff8f9bcbf256cfdc4f3ba Author: Tao Zhou Date: Fri Feb 10 16:33:58 2023 +0800 drm/amdgpu: exclude duplicate pages from UMC RAS UE count If a UMC bad page is reserved but not freed by an application, the application may trigger uncorrectable error repeatly by accessing the page. v2: add specific function to do the check. v3: remove duplicate pages, calculate new added bad page number. v4: reuse save_bad_pages to calculate new added bad page number. Signed-off-by: Tao Zhou Reviewed-by: Stanley.Yang Signed-off-by: Alex Deucher commit e69c785723ed88a930d332e13bc9140dce48f359 Author: Tao Zhou Date: Fri Feb 17 11:16:10 2023 +0800 drm/amdgpu: add umc retire unit element It records how many bad pages are retired in one uncorrectable error. Signed-off-by: Tao Zhou Reviewed-by: Stanley.Yang Signed-off-by: Alex Deucher commit 6761c4bfee681c306bbe6599951e74826660be47 Author: Evan Quan Date: Tue Feb 21 15:21:19 2023 +0800 drm/amd/pm: no pptable resetup on runpm exiting It is assumed the pptable used before runpm is same as the one used afterwards. Thus, we can reuse the stored copy and do not need to resetup the pptable again. Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit edddc6fd542ffbae680c2201bbf6763f1693db4f Author: Evan Quan Date: Tue Feb 21 15:17:43 2023 +0800 drm/amd/pm: correct the baco state setting for ArmD3 scenario The check for baco support relies on the correct baco state. Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit b299221faf9b62166413526be2438d21257f019e Author: Marek Olšák Date: Sun Jan 29 23:00:59 2023 -0500 drm/amdgpu: add more fields into device info, caches sizes, etc. AMDGPU_IDS_FLAGS_CONFORMANT_TRUNC_COORD: important for conformance on gfx11 Other fields are exposed from IP discovery. enabled_rb_pipes_mask_hi is added for future chips, currently 0. Mesa MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403 Signed-off-by: Marek Olšák Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4fc8fff378b2f2039f2a666d9f8c570f4e58352c Author: Qu Huang Date: Tue Feb 21 11:35:16 2023 +0000 drm/amdkfd: Fix an illegal memory access In the kfd_wait_on_events() function, the kfd_event_waiter structure is allocated by alloc_event_waiters(), but the event field of the waiter structure is not initialized; When copy_from_user() fails in the kfd_wait_on_events() function, it will enter exception handling to release the previously allocated memory of the waiter structure; Due to the event field of the waiters structure being accessed in the free_waiters() function, this results in illegal memory access and system crash, here is the crash log: localhost kernel: RIP: 0010:native_queued_spin_lock_slowpath+0x185/0x1e0 localhost kernel: RSP: 0018:ffffaa53c362bd60 EFLAGS: 00010082 localhost kernel: RAX: ff3d3d6bff4007cb RBX: 0000000000000282 RCX: 00000000002c0000 localhost kernel: RDX: ffff9e855eeacb80 RSI: 000000000000279c RDI: ffffe7088f6a21d0 localhost kernel: RBP: ffffe7088f6a21d0 R08: 00000000002c0000 R09: ffffaa53c362be64 localhost kernel: R10: ffffaa53c362bbd8 R11: 0000000000000001 R12: 0000000000000002 localhost kernel: R13: ffff9e7ead15d600 R14: 0000000000000000 R15: ffff9e7ead15d698 localhost kernel: FS: 0000152a3d111700(0000) GS:ffff9e855ee80000(0000) knlGS:0000000000000000 localhost kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 localhost kernel: CR2: 0000152938000010 CR3: 000000044d7a4000 CR4: 00000000003506e0 localhost kernel: Call Trace: localhost kernel: _raw_spin_lock_irqsave+0x30/0x40 localhost kernel: remove_wait_queue+0x12/0x50 localhost kernel: kfd_wait_on_events+0x1b6/0x490 [hydcu] localhost kernel: ? ftrace_graph_caller+0xa0/0xa0 localhost kernel: kfd_ioctl+0x38c/0x4a0 [hydcu] localhost kernel: ? kfd_ioctl_set_trap_handler+0x70/0x70 [hydcu] localhost kernel: ? kfd_ioctl_create_queue+0x5a0/0x5a0 [hydcu] localhost kernel: ? ftrace_graph_caller+0xa0/0xa0 localhost kernel: __x64_sys_ioctl+0x8e/0xd0 localhost kernel: ? syscall_trace_enter.isra.18+0x143/0x1b0 localhost kernel: do_syscall_64+0x33/0x80 localhost kernel: entry_SYSCALL_64_after_hwframe+0x44/0xa9 localhost kernel: RIP: 0033:0x152a4dff68d7 Allocate the structure with kcalloc, and remove redundant 0-initialization and a redundant loop condition check. Signed-off-by: Qu Huang Signed-off-by: Felix Kuehling Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 6dcb38a19efaa71c95c017652177cecb5be4191d Author: Jane Jian Date: Wed Feb 15 16:48:47 2023 +0800 drm/amdgpu/vcn: set and use harvest config in early init to set harvest config if the vcn0/1 is disabled rather than hard-code the ring attributes as before did Signed-off-by: Jane Jian Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit ca47518663973083c513cd6b2801dcda0bfaaa99 Author: Mario Limonciello Date: Mon Feb 13 15:10:30 2023 -0600 drm/amd: Don't allow s0ix on APUs older than Raven APUs before Raven didn't support s0ix. As we just relieved some of the safety checks for s0ix to improve power consumption on APUs that support it but that are missing BIOS support a new blind spot was introduced that a user could "try" to run s0ix. Plug this hole so that if users try to run s0ix on anything older than Raven it will just skip suspend of the GPU. Fixes: cf488dcd0ab7 ("drm/amd: Allow s0ix without BIOS support") Suggested-by: Alexander Deucher Signed-off-by: Mario Limonciello Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f9c35f4fffc6cb5bbb23f546f48c045aef012518 Author: Hawking Zhang Date: Mon Feb 20 09:06:53 2023 +0800 drm/amdgpu: fix incorrect active rb bitmap for gfx11 GFX v11 changes RB_BACKEND_DISABLE related registers from per SA to global ones. The approach to query active rb bitmap needs to be changed accordingly. Query per SE setting returns wrong active RB bitmap especially in the case when some of SA are disabled. With the new approach, driver will generate the active rb bitmap based on active SA bitmap and global active RB bitmap. Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 2866cc09617991cb4f9f36fbebdbba966fe5a21a Author: Shane Xiao Date: Sat Feb 18 11:58:45 2023 +0800 drm/amdgpu: optimize VRAM allocation when using drm buddy Since the VRAM manager changed from drm mm to drm buddy. It's not necessary to allocate 2MB aligned VRAM for more than 2MB unaligned size, and then do trim. This method improves the allocation efficiency and reduces memory fragmentation. v2: Correct the remainder operation Signed-off-by: Shane Xiao Reviewed-by: Arunpravin Paneer Selvam Signed-off-by: Alex Deucher commit c105518679b6e87232874ffc989ec403bee59664 Author: Shane Xiao Date: Wed Feb 15 13:23:44 2023 +0800 drm/amdgpu: remove TOPDOWN flags when allocating VRAM in large bar system Since VRAM manager is changed from drm mm to drm buddy, the TOP_DOWN flag should not be set by default in the large bar system. Removing this flag helps improve drm buddy allocator efficiency and reduce the risk of splitting higher order block into lower order. Signed-off-by: Shane Xiao Reviewed-by: Christian K�nig Signed-off-by: Alex Deucher commit 455ad25997ba6e6b4c5fb9b4f3cd54ec415df969 Author: Harry Wentland Date: Mon Feb 13 13:17:16 2023 -0500 drm/amdgpu: Select DRM_DISPLAY_HDCP_HELPER in amdgpu Keeps this selection with the rest of the DRM HELPER selection. Signed-off-by: Harry Wentland Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 6d9b6dceaa513c19a968c523f4d68477a33a98c9 Author: Hamza Mahfooz Date: Tue Feb 14 13:51:08 2023 -0500 drm/amd/display: only warn once in dce110_edp_wait_for_hpd_ready() Since, hot plugging eDP displays isn't supported, it is sufficient for us to warn about the lack of a connected display once. So, use ASSERT() in dce110_edp_wait_for_hpd_ready() instead of DC_LOG_WARNING(). Reviewed-by: Harry Wentland Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit d9e1e14f42337ea11b2dfc0bab99485a8f7fa210 Author: Kenneth Feng Date: Wed Feb 15 14:42:08 2023 +0800 drm/amd/pm: re-enable ac/dc on smu_v13_0_0/10 re-enable ac/dc on smu_v13_0_0/10 Signed-off-by: Kenneth Feng Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit 08c6ab7fb4d98694df5a9954a42a365cc538f9b0 Author: Jesse Zhang Date: Thu Feb 16 14:11:33 2023 +0800 drm/amdgpu: add tmz support for GC 10.3.6 this patch to add tmz support for GC 10.3.6 Signed-off-by: Jesse Zhang Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher commit 2e2b9baf008ec795fe750a48b42e787cf31486df Author: Ruili Ji Date: Mon Feb 6 18:35:50 2023 +0800 drm/amdkfd: To fix sdma page fault issue for GC 11 For the MQD memory, KMD would always allocate 4K memory, and mes scheduler would write to the end of MQD for unmap flag. Signed-off-by: Ruili Ji Signed-off-by: Alex Deucher commit f2b98d0af217f64b96bc549457018117ba6b7509 Merge: fcc77d7c8ef64 6c40624930c58 Author: Linus Torvalds Date: Thu Feb 23 14:27:01 2023 -0800 Merge tag 'bootconfig-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull bootconfig updates from Masami Hiramatsu: - Fix ftrace2bconf.sh tool for checking event enable status correctly - Add CONFIG_BOOT_CONFIG_FORCE to apply bootconfig without 'bootconfig' boot parameter - Enable CONFIG_BOOT_CONFIG_FORCE by default if a bootconfig is embedded in the kernel - Increase max number of nodes of bootconfig to 8192 * tag 'bootconfig-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: bootconfig: Increase max nodes of bootconfig from 1024 to 8192 for DCC support bootconfig: Default BOOT_CONFIG_FORCE to y if BOOT_CONFIG_EMBED Allow forcing unconditional bootconfig processing tools/bootconfig: fix single & used for logical condition commit fcc77d7c8ef6478844547d50dd3d03270c86116c Merge: c538944d8efb1 f1aa2eb5ea05c Author: Linus Torvalds Date: Thu Feb 23 14:16:56 2023 -0800 Merge tag 'sysctl-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux Pull sysctl update from Luis Chamberlain: "Just one fix which just came in. Sadly the eager beavers willing to help with the sysctl moves have slowed" * tag 'sysctl-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux: sysctl: fix proc_dobool() usability commit c538944d8efb14e9809b685608490b017bfc2d48 Merge: 7dd86cf80127a f412eef03938d Author: Linus Torvalds Date: Thu Feb 23 14:05:08 2023 -0800 Merge tag 'modules-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux Pull modules updates from Luis Chamberlain: "Nothing exciting at all for modules for v6.3. The biggest change is just the change of INSTALL_MOD_DIR from "extra" to "updates" which I found lingered for ages for no good reason while testing the CXL mock driver [0]. The CXL mock driver has no kconfig integration and requires building an external module... and re-building the *rest* of the production drivers. This mock driver when loaded but not the production ones will crash. All this can obviously be fixed by integrating kconfig semantics into such test module, however that's not desirable by the maintainer, and so sensible defaults must be used to ensure a default "make modules_install" will suffice for most distros which do not have a file like /etc/depmod.d/dist.conf with something like `search updates extra built-in`. Since most distros rely on kmod and since its inception the "updates" directory is always in the search path it makes more sense to use that than the "extra" which only *some* RH based systems rely on. All this stuff has been on linux-next for a while" [0] https://lkml.kernel.org/r/20221209062919.1096779-1-mcgrof@kernel.org * tag 'modules-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux: Documentation: livepatch: module-elf-format: Remove local klp_modinfo definition module.h: Document klp_modinfo struct using kdoc module: Use kstrtobool() instead of strtobool() kernel/params.c: Use kstrtobool() instead of strtobool() test_kmod: stop kernel-doc warnings kbuild: Modify default INSTALL_MOD_DIR from extra to updates commit 7dd86cf80127aeef8a447c81228a77f0f25cc211 Merge: d8763154455e9 0c05e7bd2d017 Author: Linus Torvalds Date: Thu Feb 23 14:00:10 2023 -0800 Merge tag 'livepatching-for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching Pull livepatching updates from Petr Mladek: - Allow reloading a livepatched module by clearing livepatch-specific relocations in the livepatch module. Otherwise, the repeated load would fail on consistency checks. * tag 'livepatching-for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching: livepatch,x86: Clear relocation targets on a module removal x86/module: remove unused code in __apply_relocate_add commit d8763154455e92a2ffed256e48fa46bb35ef3bdf Merge: cd43b5068647f 392143c9f2a31 Author: Linus Torvalds Date: Thu Feb 23 13:49:45 2023 -0800 Merge tag 'printk-for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux Pull printk updates from Petr Mladek: - Refactor printk code for formatting messages that are shown on consoles. This is a preparatory step for introducing atomic consoles which could not share the global buffers - Prevent memory leak when removing printk index in debugfs - Dump also the newest printk message by the sample gdbmacro - Fix a compiler warning * tag 'printk-for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: printf: fix errname.c list kernel/printk/index.c: fix memory leak with using debugfs_lookup() printk: Use scnprintf() to print the message about the dropped messages on a console printk: adjust string limit macros printk: use printk_buffers for devkmsg printk: introduce console_prepend_dropped() for dropped messages printk: introduce printk_get_next_message() and printk_message printk: introduce struct printk_buffers console: Document struct console console: Use BIT() macros for @flags values printk: move size limit macros into internal.h docs: gdbmacros: print newest record commit cd43b5068647f47d6936ffef4d15d99518fcab94 Merge: 2b79eb73e2c4b b45bc2e09906a Author: Linus Torvalds Date: Thu Feb 23 13:41:55 2023 -0800 Merge tag 'slab-for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab Pull slab updates from Vlastimil Babka: "This time it's just a bunch of smaller cleanups and fixes for SLAB and SLUB: - Make it possible to use kmem_cache_alloc_bulk() early in boot when interrupts are not yet enabled, as code doing that started to appear via new maple tree users (Thomas Gleixner) - Fix debugfs-related memory leak in SLUB (Greg Kroah-Hartman) - Use the standard idiom to get head page of folio (SeongJae Park) - Simplify and inline is_debug_pagealloc_cache() in SLAB (lvqian) - Remove unused variable in SLAB (Gou Hao)" * tag 'slab-for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab: mm, slab/slub: Ensure kmem_cache_alloc_bulk() is available early mm/slub: fix memory leak with using debugfs_lookup() mm/slab.c: cleanup is_debug_pagealloc_cache() mm/sl{a,u}b: fix wrong usages of folio_page() for getting head pages mm/slab: remove unused slab_early_init commit 2b79eb73e2c4b362a2a261b7b2f718385fb478e4 Merge: 0df82189bc420 c96abaec78f34 Author: Linus Torvalds Date: Thu Feb 23 13:03:08 2023 -0800 Merge tag 'probes-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull kprobes updates from Masami Hiramatsu: - Skip negative return code check for snprintf in eprobe - Add recursive call test cases for kprobe unit test - Add 'char' type to probe events to show it as the character instead of value - Update kselftest kprobe-event testcase to ignore '__pfx_' symbols - Fix kselftest to check filter on eprobe event correctly - Add filter on eprobe to the README file in tracefs - Fix optprobes to check whether there is 'under unoptimizing' optprobe when optimizing another kprobe correctly - Fix optprobe to check whether there is 'under unoptimizing' optprobe when fetching the original instruction correctly - Fix optprobe to free 'forcibly unoptimized' optprobe correctly * tag 'probes-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing/eprobe: no need to check for negative ret value for snprintf test_kprobes: Add recursed kprobe test case tracing/probe: add a char type to show the character value of traced arguments selftests/ftrace: Fix probepoint testcase to ignore __pfx_* symbols selftests/ftrace: Fix eprobe syntax test case to check filter support tracing/eprobe: Fix to add filter on eprobe description in README file x86/kprobes: Fix arch_check_optimized_kprobe check within optimized_kprobe range x86/kprobes: Fix __recover_optprobed_insn check optimizing logic kprobes: Fix to handle forcibly unoptimized kprobes on freeing_list commit 68ba44639537de6f91fe32783766322d41848127 Author: Xin Long Date: Wed Feb 22 12:07:21 2023 -0500 sctp: add a refcnt in sctp_stream_priorities to avoid a nested loop With this refcnt added in sctp_stream_priorities, we don't need to traverse all streams to check if the prio is used by other streams when freeing one stream's prio in sctp_sched_prio_free_sid(). This can avoid a nested loop (up to 65535 * 65535), which may cause a stuck as Ying reported: watchdog: BUG: soft lockup - CPU#23 stuck for 26s! [ksoftirqd/23:136] Call Trace: sctp_sched_prio_free_sid+0xab/0x100 [sctp] sctp_stream_free_ext+0x64/0xa0 [sctp] sctp_stream_free+0x31/0x50 [sctp] sctp_association_free+0xa5/0x200 [sctp] Note that it doesn't need to use refcount_t type for this counter, as its accessing is always protected under the sock lock. v1->v2: - add a check in sctp_sched_prio_set to avoid the possible prio_head refcnt overflow. Fixes: 9ed7bfc79542 ("sctp: fix memory leak in sctp_stream_outq_migrate()") Reported-by: Ying Xu Acked-by: Marcelo Ricardo Leitner Signed-off-by: Xin Long Link: https://lore.kernel.org/r/825eb0c905cb864991eba335f4a2b780e543f06b.1677085641.git.lucien.xin@gmail.com Signed-off-by: Jakub Kicinski commit 6ccbe33a39523f6d62b22c5ee99c6695993c935e Author: Melody Olvera Date: Mon Feb 13 10:52:11 2023 -0800 dt-bindings: mailbox: qcom-ipcc: Add compatible for QDU1000/QRU1000 Document the compatible for the QDU1000 mailbox. Signed-off-by: Melody Olvera Acked-by: Krzysztof Kozlowski Signed-off-by: Jassi Brar commit 1261a6626a08071b7c9fa3025deb569c91eb55ae Author: Kathiravan T Date: Thu Feb 2 20:22:07 2023 +0530 mailbox: qcom-apcs-ipc: add IPQ5332 APSS clock support IPQ5332 has the APSS clock controller utilizing the same register space as the APCS, so provide access to the APSS utilizing a child device like other IPQ chipsets. Like IPQ6018, the same controller and driver is used, so utilize IPQ6018 match data for IPQ5332. Signed-off-by: Kathiravan T Reviewed-by: Konrad Dybcio Signed-off-by: Jassi Brar commit df4c17aa3ea0a8128747f5234b06d7375642f9db Author: Kathiravan T Date: Fri Feb 17 14:03:07 2023 +0530 dt-bindings: mailbox: qcom: add compatible for the IPQ5332 SoC Add the mailbox compatible for the IPQ5332 SoC. Since the IPQ5332 mailbox is compatible with the IPQ6018, lets create the fallback to ipq6018 compatible, so that we don't bloat the of_device_id table in the driver. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Kathiravan T Signed-off-by: Jassi Brar commit b114f13591597314660949d5da1fd79127643445 Author: Krzysztof Kozlowski Date: Wed Feb 8 11:15:44 2023 +0100 dt-bindings: remoteproc: qcom,glink-rpm-edge: convert to DT schema Convert Qualcomm G-Link RPM edge binding to DT schema. Move it to remoteproc as it better suits the purpose - communication channel with remote processor. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Jassi Brar commit adb239f340935b854ce56035fee2035345f9d633 Author: Dmitry Baryshkov Date: Fri Jan 27 01:03:18 2023 +0200 mailbox: qcom-apcs-ipc: enable APCS clock device for MSM8996 MSM8996 also has the clock-related part of the APCS mailbox device. Follow the usual pattern and create a child device to handle these clocks. Signed-off-by: Dmitry Baryshkov Signed-off-by: Jassi Brar commit 9e9a6a8eeef97f089147dd07b940646771f27c2c Author: Dmitry Baryshkov Date: Fri Jan 27 01:03:17 2023 +0200 dt-bindings: mailbox: qcom: add #clock-cells to msm8996 example Add the #clock-cells property to the MSM8996 example, as the APCS block is going to provide the `sys_apcs_aux' clock to the consumers. Acked-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Signed-off-by: Jassi Brar commit 8b5c7a06d0ace0ea816c407482d27117b8ba8d51 Author: Dmitry Baryshkov Date: Fri Jan 27 01:03:16 2023 +0200 dt-bindings: mailbox: qcom: add missing platforms to conditional clauses Add missing platforms to the conditional clauses selecting whether the clocks/clock-names properties are required or whether they must be omitted. Acked-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Signed-off-by: Jassi Brar commit 98c2de9e7949358abff45009be44959a0bc5862b Author: Dmitry Baryshkov Date: Fri Jan 27 01:03:15 2023 +0200 dt-bindings: mailbox: qcom: correct the list of platforms using clocks The schema incorrectly lists some of the platforms in the statement requiring clocks/clock-names. Correct this by moving platforms not requiring additional clocks to the separate clause. Fixes: 0d17014e9189 ("dt-bindings: mailbox: Add binding for SDX55 APCS") Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Signed-off-by: Jassi Brar commit 9d8b7e64ac73858dd29f41e95492c0fd59f14820 Author: Dmitry Baryshkov Date: Fri Jan 27 01:03:14 2023 +0200 dt-bindings: mailbox: qcom: enable syscon compatible for msm8976 On msm8976 platform APCS also uses syscon compatible, so move it to the block of compatibles using SoC-compat together with syscon. Fixes: 60545466180e ("dt-bindings: mailbox: qcom,apcs-kpss-global: Add syscon const for relevant entries") Acked-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Signed-off-by: Jassi Brar commit dff1082bf561f8760d7c10b7eba87a19f62eac7f Author: Dmitry Baryshkov Date: Fri Jan 27 01:03:13 2023 +0200 dt-bindings: mailbox: qcom: add SDX55 compatible The commit 0d17014e9189 ("dt-bindings: mailbox: Add binding for SDX55 APCS") added SDX55 compatible string to one of clock-selection conditions, but failed to add one to the main schema's compatible list. Fix this omission. Fixes: 0d17014e9189 ("dt-bindings: mailbox: Add binding for SDX55 APCS") Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Signed-off-by: Jassi Brar commit c31508c56618aaa52fa3503e9f061df8bf728df7 Author: Bartosz Golaszewski Date: Tue Feb 14 10:27:12 2023 +0100 dt-bindings: mailbox: qcom-ipcc: document the sa8775p platform Add a compatible for the ipcc on sa8775p platforms. Signed-off-by: Bartosz Golaszewski Reviewed-by: Manivannan Sadhasivam Acked-by: Krzysztof Kozlowski Signed-off-by: Jassi Brar commit 3a87af1c7d766fda6cbf2e12f063be167d93f1b1 Author: Alain Volmat Date: Tue Feb 14 21:49:44 2023 +0100 dt-bindings: mailbox: sti-mailbox: convert to DT schema Convert the sti-mailbox.txt file into st,sti-mailbox.yaml Signed-off-by: Alain Volmat Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jassi Brar commit 043f85ce81cb1714e14d31c322c5646513dde3fb Author: Christophe JAILLET Date: Sun Nov 20 09:25:54 2022 +0100 mailbox: zynq: Switch to flexible array to simplify code Using flexible array is more straight forward. It - saves 1 pointer in the 'zynqmp_ipi_pdata' structure - saves an indirection when using this array - saves some LoC and avoids some always spurious pointer arithmetic Signed-off-by: Christophe JAILLET Signed-off-by: Jassi Brar commit 901578a45950bcc4d5055a24e9016d61b84dc1a2 Author: Thorsten Leemhuis Date: Tue Feb 14 11:13:51 2023 +0100 docs: recommend using Link: whenever using Reported-by: Encourage developers to place Link: tag pointing to the report when they are using Reported-by: tags. Those links are often extremely useful for any code archaeologist that wants to know more about the backstory of a change than the commit message provides. That includes maintainers higher up in the patch-flow hierarchy, which is why Linus asks developers to add such links [1, 2, 3]. To quote [1]: > Again, the commit has a link to the patch *submission*, which is > almost entirely useless. There's no link to the actual problem the > patch fixes. > > [...] > > Put another way: I can see that > > Reported-by: Zhangfei Gao > > in the commit, but I don't have a clue what the actual report was, and > there really isn't enough information in the commit itself, except for > a fairly handwavy "Device drivers might, for instance, still need to > flush operations.." > > I don't want to know what device drivers _might_ do. I would want to > have an actual pointer to what they do and where. Another reason why these links are wanted: the ongoing regression tracking efforts can only scale with them, as they allow the regression tracking bot 'regzbot' to automatically connect tracked reports with patches that are posted or committed to fix tracked regressions. Link: https://lore.kernel.org/all/CAHk-=wjMmSZzMJ3Xnskdg4+GGz=5p5p+GSYyFBTh0f-DgvdBWg@mail.gmail.com/ [1] Link: https://lore.kernel.org/all/CAHk-=wgs38ZrfPvy=nOwVkVzjpM3VFU1zobP37Fwd_h9iAD5JQ@mail.gmail.com/ [2] Link: https://lore.kernel.org/all/CAHk-=wjxzafG-=J8oT30s7upn4RhBs6TX-uVFZ5rME+L5_DoJA@mail.gmail.com/ [3] Signed-off-by: Thorsten Leemhuis Link: https://lore.kernel.org/r/9a07ec640d809723492f8ade4f54705914e80419.1676369564.git.linux@leemhuis.info Signed-off-by: Jonathan Corbet commit b8885e2615f4d623334855e7fad20e49b0e0f96d Author: Randy Dunlap Date: Tue Feb 14 16:57:26 2023 -0800 Documentation: front page: use recommended heading adornments Convert the Documentation front page to use the heading adornments that are documented in doc-guide/sphinx.rst for document title and chapters. I.e., convert most section headings to chapters. This leaves "Indices and tables" as a chapter entry at the same level as the other chapters. The only visual difference from before to after is that the "Indices and tables" heading is smaller and has more vertical whitespace preceding it (although that may depend on the web browser being used). Fixes: 0c7b4366f1ab ("docs: Rewrite the front page") Signed-off-by: Randy Dunlap Cc: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20230215005726.27320-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 1481df6cbd0d606fa1a26b752e2e1aba0b650093 Author: Carlos Bilbao Date: Tue Feb 7 16:08:44 2023 -0600 docs/sp_SP: Add process programming-language translation Translate Documentation/process/programming-language.rst into Spanish. Signed-off-by: Carlos Bilbao Link: https://lore.kernel.org/r/20230207220844.2661295-1-carlos.bilbao@amd.com Signed-off-by: Jonathan Corbet commit 01178ee713100c7d7e738992134545acff472d1d Author: Lukas Bulwahn Date: Mon Feb 20 17:57:49 2023 +0100 docs: locking: refer to the actual existing config names The config is actually called CONFIG_RT_MUTEXES, not CONFIG_RT_MUTEX. The config CONFIG_LOCK_TORTURE_TEST should be connected by underscore, for the sake of consistent referencing to configs in the kernel documentation. Address those issues. Signed-off-by: Lukas Bulwahn Acked-by: Waiman Long Link: https://lore.kernel.org/r/20230220165749.12850-1-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet commit eb52bc2ae5b8413619a326f47ed635365883343a Author: Sumeet Pawnikar Date: Wed Feb 15 18:02:49 2023 +0530 powercap: RAPL: Add Power Limit4 support for Meteor Lake SoC Add Meteor Lake SoC to the list of processor models for which Power Limit4 is supported by the Intel RAPL driver. Signed-off-by: Sumeet Pawnikar Signed-off-by: Rafael J. Wysocki commit b64baafa24d2c430513329daf5ebb821620d0c03 Merge: 60950df7b4a8a 8ffba409f495b 90039f3773f68 Author: Stephen Boyd Date: Thu Feb 23 11:04:25 2023 -0800 Merge branches 'clk-loongson' and 'clk-qcom' into clk-next * clk-loongson: dt-bindings: clock: add loongson-2 clock dt-bindings: clock: add loongson-2 clock include file * clk-qcom: (143 commits) clk: qcom: apcs-msm8986: Include bitfield.h for FIELD_PREP clk: qcom: Revert sync_state based clk_disable_unused dt-bindings: clock: Merge qcom,gpucc-sm8350 into qcom,gpucc.yaml clk: qcom: gpucc-sdm845: fix clk_dis_wait being programmed for CX GDSC clk: qcom: gpucc-sc7180: fix clk_dis_wait being programmed for CX GDSC dt-bindings: clock: qcom,sa8775p-gcc: add the power-domains property clk: qcom: cpu-8996: add missing cputype include clk: qcom: gcc-sa8775p: remove unused variables clk: qcom: smd-rpm: provide RPM_SMD_XO_CLK_SRC on MSM8996 platform clk: qcom: add msm8996 Core Bus Framework (CBF) support dt-bindings: clock: qcom,msm8996-cbf: Describe the MSM8996 CBF clock controller clk: qcom: add the driver for the MSM8996 APCS clocks clk: qcom: gcc-qcs404: fix duplicate initializer warning clk: qcom: cpu-8996: change setup sequence to follow vendor kernel clk: qcom: cpu-8996: fix PLL clock ops clk: qcom: cpu-8996: fix ACD initialization clk: qcom: cpu-8996: fix PLL configuration sequence clk: qcom: cpu-8996: move qcom_cpu_clk_msm8996_acd_init call clk: qcom: cpu-8996: setup PLLs before registering clocks clk: qcom: cpu-8996: simplify the cpu_clk_notifier_cb ... commit 60950df7b4a8a5fa18be936bdac4edab23fef4bc Merge: 792d6827288b0 9645ccfaad4d6 633ff55419948 b30a027779a50 02d7bd1efb428 79200d5851c8e Author: Stephen Boyd Date: Thu Feb 23 11:04:12 2023 -0800 Merge branches 'clk-microchip', 'clk-allwinner', 'clk-mediatek', 'clk-imx' and 'clk-core' into clk-next - Various cleanups and improvements to Mediatek clk drivers to reduce code size and modernize the drivers - Support for Mediatek MT7891 SoC clks * clk-microchip: clk: at91: do not compile dt-compat.c for sama7g5 and sam9x60 clk: at91: mark ddr clocks as critical * clk-allwinner: clk: sunxi-ng: d1: Add CAN bus gates and resets dt-bindings: clock: Add D1 CAN bus gates and resets clk: sunxi-ng: d1: Mark cpux clock as critical clk: sunxi-ng: d1: Allow building for R528/T113 clk: sunxi-ng: Move SoC driver conditions to dependencies clk: sunxi-ng: Remove duplicate ARCH_SUNXI dependencies clk: sunxi-ng: Avoid computing the rate twice clk: sunxi-ng: h3/h5: Model H3 CLK_DRAM as a fixed clock clk: sunxi-ng: fix ccu_mmc_timing.c kernel-doc issues * clk-mediatek: (29 commits) clk: mediatek: clk-mtk: Remove unneeded semicolon clk: mediatek: remove MT8195 vppsys/0/1 simple_probe dt-bindings: arm: mediatek: migrate MT8195 vppsys0/1 to mtk-mmsys driver clk: mediatek: add MT7981 clock support dt-bindings: clock: mediatek: add mt7981 clock IDs dt-bindings: clock: Add compatibles for MT7981 clk: mediatek: clk-mt7986-topckgen: Migrate to mtk_clk_simple_probe() clk: mediatek: clk-mt7986-topckgen: Properly keep some clocks enabled clk: mediatek: clk-mt6795-topckgen: Migrate to mtk_clk_simple_probe() clk: mediatek: clk-mt8186-topckgen: Migrate to mtk_clk_simple_probe() clk: mediatek: clk-mt8192: Migrate topckgen to mtk_clk_simple_probe() clk: mediatek: clk-mtk: Register MFG notifier in mtk_clk_simple_probe() clk: mediatek: clk-mt8183: Join top_aud_muxes and top_aud_divs clk: mediatek: mt8186: Join top_adj_div and top_muxes clk: mediatek: mt8192: Join top_adj_divs and top_muxes clk: mediatek: clk-mt8192: Move CLK_TOP_CSW_F26M_D2 in top_divs clk: mediatek: mt8173: Migrate pericfg/topckgen to mtk_clk_simple_probe() clk: mediatek: clk-mtk: Extend mtk_clk_simple_probe() clk: mediatek: Switch to mtk_clk_simple_probe() where possible clk: mediatek: mt8173: Break down clock drivers and allow module build ... * clk-imx: clk: imx: pll14xx: fix recalc_rate for negative kdiv MAINTAINERS: clk: imx: Add Peng Fan as reviewer clk: imx: fix compile testing imxrt1050 clk: imx: set imx_clk_gpr_mux_ops storage-class-specifier to static clk: imx6ul: add ethernet refclock mux support clk: imx6ul: fix enet1 gate configuration clk: imx: add imx_obtain_fixed_of_clock() clk: imx6q: add ethernet refclock mux support clk: imx: add clk-gpr-mux driver dt-bindings: imx8ulp: clock: no spaces before tabs clk: imx6sll: add proper spdx license identifier clk: imx: imx93: invoke imx_register_uart_clocks clk: imx: remove clk_count of imx_register_uart_clocks clk: imx: get stdout clk count from device tree clk: imx: avoid memory leak * clk-core: clk: Honor CLK_OPS_PARENT_ENABLE in clk_core_is_enabled() commit 792d6827288b05df93e487013118986fd14aee5c Merge: d065155ec876a 2c3aa5b1f20a9 3ef6d9b31af26 def70790be528 df43ce489d339 Author: Stephen Boyd Date: Thu Feb 23 11:03:54 2023 -0800 Merge branches 'clk-cleanup', 'clk-bindings', 'clk-renesas', 'clk-versa' and 'clk-amlogic' into clk-next - Support for Versa 5P49V60 clks * clk-cleanup: clk: rs9: Drop unused pin_xin field clk: sprd: Add dependency for SPRD_UMS512_CLK clk: ralink: fix 'mt7621_gate_is_enabled()' function dt-bindings: clock: remove stih416 bindings drivers/clk: Remove "select SRCU" * clk-bindings: dt-bindings: clock: qcom,sm8450-camcc: constrain required-opps dt-bindings: clock: imx8m-clock: correct i.MX8MQ node name * clk-renesas: clk: renesas: rcar-gen3: Disable R-Car H3 ES1.* clk: renesas: r8a779g0: Add CAN-FD clocks clk: renesas: r8a779g0: Tidy up DMAC name on SYS-DMAC clk: renesas: r8a779a0: Tidy up DMAC name on SYS-DMAC clk: renesas: r8a779g0: Add custom clock for PLL2 clk: renesas: cpg-mssr: Remove superfluous check in resume code clk: renesas: r9a06g032: Handle h2mode setting based on USBF presence clk: renesas: cpg-mssr: Fix use after free if cpg_mssr_common_init() failed clk: renesas: r9a07g044: Add clock and reset entries for CRU clk: renesas: r9a09g011: Add SDHI/eMMC clock and reset entries clk: renesas: r9a09g011: Add USB clock and reset entries clk: renesas: r9a09g011: Add TIM clock and reset entries clk: renesas: r8a779g0: Add display related clocks clk: renesas: rcar-gen4: Restore PLL enum sort order clk: renesas: r8a779g0: Fix OSC predividers clk: renesas: r9a09g011: Add PWM clock and reset entries * clk-versa: dt-bindings: clock: versaclock5: Document 5P49V60 compatible string clk: vc5: Add support for 5P49V60 clk: vc5: Use `clamp()` to restrict PLL range * clk-amlogic: clk: meson: clk-cpu-dyndiv: switch from .round_rate to .determine_rate clk: meson: sclk-div: switch from .round_rate to .determine_rate clk: meson: dualdiv: switch from .round_rate to .determine_rate clk: meson: mpll: Switch from .round_rate to .determine_rate commit fa0746b11ba04d3df04adddb283cab3cc1d90ec3 Author: Nick Alcock Date: Fri Feb 17 14:10:40 2023 +0000 cpufreq: amd-pstate: 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 amd-pstate.c which cannot be built as a module. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain [ rjw: Subject and changelog adjustments ] Signed-off-by: Rafael J. Wysocki commit 70ba26cbe02635461c91fa7133941da685e2f08d Author: Thomas Weißschuh Date: Mon Feb 20 23:28:54 2023 +0000 cpufreq: schedutil: 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: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 7af78020e28a532262d00d94de708a705d636e91 Author: Kai-Heng Feng Date: Thu Feb 23 15:02:52 2023 +0800 cpufreq: amd-pstate: Let user know amd-pstate is disabled Commit 202e683df37c ("cpufreq: amd-pstate: add amd-pstate driver parameter for mode selection") changed the driver to be disabled by default, and this can surprise users. Let users know what happened so they can decide what to do next. Link: https://bugs.launchpad.net/bugs/2006942 Signed-off-by: Kai-Heng Feng Acked-by: Huang Rui Reviewed-by: Yuan Perry Signed-off-by: Rafael J. Wysocki commit 60675225ebeecea248035fd3a0efc82ae9038a98 Author: Srinivas Pandruvada Date: Tue Feb 21 22:45:26 2023 -0800 cpufreq: intel_pstate: Adjust balance_performance EPP for Sapphire Rapids While the majority of server OS distributions are deployed with the "performance" governor as the default, some distributions like Ubuntu use the "powersave" governor by default. While using the "powersave" governor in its default configuration on Sapphire Rapids systems leads to much lower power, the performance is lower by more than 25% for several workloads relative to the "performance" governor. A 37% difference has been reported by www.Phoronix.com [1]. This is a consequence of using a relatively high EPP value in the default configuration of the "powersave" governor and the performance can be made much closer to the "performance" governor's level by adjusting the default EPP value. Based on experiments, with EPP of 0x00, 0x10, 0x20, the performance delta between the "powersave" governor and the "performance" one is around 12%. However, the EPP of 0x20 reduces average power by 18% with respect to the lower EPP values. [Note that raising min_perf_pct in sysfs as high as 50% in addition to adjusting EPP does not improve the performance any further.] For this reason, change the EPP value corresponding to the the default balance_performance setting for Sapphire Rapids to 0x20, which is straightforward, because analogous default EPP adjustment has been applied to Alder Lake and there is a way to set the balance_performance EPP value in intel_pstate based on the processor model already. The goal here is to limit the mean performance delta between the "powersave" governor in the default configuration and the "performance" governor for a wide variety of server workloadsto to around 10-12%. For some bursty workloads, this delta can be still large, as the frequency ramp-up will still lag when the "powersave" governor is in use irrespective of the EPP setting, because the performance governor always requests the maximum possible frequency. Link: https://www.phoronix.com/review/centos-clear-spr/6 # [1] Signed-off-by: Srinivas Pandruvada [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 0df82189bc42037678fa590a77ed0116f428c90d Merge: b72b5fecc1b8a f9fa0778ee734 Author: Linus Torvalds Date: Thu Feb 23 10:29:51 2023 -0800 Merge tag 'perf-tools-for-v6.3-1-2023-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools updates from Arnaldo Carvalho de Melo: "Miscellaneous: - Add Ian Rogers to MAINTAINERS as a perf tools reviewer. - Add support for retire latency feature (pipeline stall of a instruction compared to the previous one, in cycles) present on some Intel processors. - Add 'perf c2c' report option to show false sharing with adjacent cachelines, to be used in machines with cacheline prefetching, where accesses to a cacheline brings the next one too. - Skip 'perf test bpf' when the required kernel-debuginfo package isn't installed. - Avoid d3-flame-graph package dependency in 'perf script flamegraph', making this feature more generally available. - Add JSON metric events to present CPI stall cycles in Power10. - Assorted improvements/refactorings on the JSON metrics parsing code. perf lock contention: - Add -o/--lock-owner option: $ sudo ./perf lock contention -abo -- ./perf bench sched pipe # Running 'sched/pipe' benchmark: # Executed 1000000 pipe operations between two processes Total time: 4.766 [sec] 4.766540 usecs/op 209795 ops/sec contended total wait max wait avg wait pid owner 403 565.32 us 26.81 us 1.40 us -1 Unknown 4 27.99 us 8.57 us 7.00 us 1583145 sched-pipe 1 8.25 us 8.25 us 8.25 us 1583144 sched-pipe 1 2.03 us 2.03 us 2.03 us 5068 chrome The owner is unknown in most cases. Filtering only for the mutex locks, it will more likely get the owners. - -S/--callstack-filter is to limit display entries having the given string in the callstack: $ sudo ./perf lock contention -abv -S net sleep 1 ... contended total wait max wait avg wait type caller 5 70.20 us 16.13 us 14.04 us spinlock __dev_queue_xmit+0xb6d 0xffffffffa5dd1c60 _raw_spin_lock+0x30 0xffffffffa5b8f6ed __dev_queue_xmit+0xb6d 0xffffffffa5cd8267 ip6_finish_output2+0x2c7 0xffffffffa5cdac14 ip6_finish_output+0x1d4 0xffffffffa5cdb477 ip6_xmit+0x457 0xffffffffa5d1fd17 inet6_csk_xmit+0xd7 0xffffffffa5c5f4aa __tcp_transmit_skb+0x54a 0xffffffffa5c6467d tcp_keepalive_timer+0x2fd Please note that to have the -b option (BPF) working above one has to build with BUILD_BPF_SKEL=1. - Add more 'perf test' entries to test these new features. perf script: - Add 'cgroup' field for 'perf script' output: $ perf record --all-cgroups -- true $ perf script -F comm,pid,cgroup true 337112 /user.slice/user-657345.slice/user@657345.service/... true 337112 /user.slice/user-657345.slice/user@657345.service/... true 337112 /user.slice/user-657345.slice/user@657345.service/... true 337112 /user.slice/user-657345.slice/user@657345.service/... - Add support for showing branch speculation information in 'perf script' and in the 'perf report' raw dump (-D). perf record: - Fix 'perf record' segfault with --overwrite and --max-size. perf test/bench: - Switch basic BPF filtering test to use syscall tracepoint to avoid the variable number of probes inserted when using the previous probe point (do_epoll_wait) that happens on different CPU architectures. - Fix DWARF unwind test by adding non-inline to expected function in a backtrace. - Use 'grep -c' where the longer form 'grep | wc -l' was being used. - Add getpid and execve benchmarks to 'perf bench syscall'. Intel PT: - Add support for synthesizing "cycle" events from Intel PT traces as we support "instruction" events when Intel PT CYC packets are available. This enables much more accurate profiles than when using the regular 'perf record -e cycles' (the default) when the workload lasts for very short periods (<10ms). - .plt symbol handling improvements, better handling IBT (in the past MPX) done in the context of decoding Intel PT processor traces, IFUNC symbols on x86_64, static executables, understanding .plt.got symbols on x86_64. - Add a 'perf test' to test symbol resolution, part of the .plt improvements series, this tests things like symbol size in contexts where only the symbol start is available (kallsyms), etc. - Better handle auxtrace/Intel PT data when using pipe mode (perf record sleep 1|perf report). - Fix symbol lookup with kcore with multiple segments match stext, getting the symbol resolution to just show DSOs as unknown. ARM: - Timestamp improvements for ARM64 systems with ETMv4 (Embedded Trace Macrocell v4). - Ensure ARM64 CoreSight timestamps don't go backwards. - Document that ARM64 SPE (Statistical Profiling Extension) is used with 'perf c2c/mem'. - Add raw decoding for ARM64 SPEv1.2 previous branch address. - Update neoverse-n2-v2 ARM vendor events (JSON tables): topdown L1, TLB, cache, branch, PE utilization and instruction mix metrics. - Update decoder code for OpenCSD version 1.4, on ARM64 systems. - Fix command line auto-complete of CPU events on aarch64. Build: - Fix 'perf probe' and 'perf test' when libtraceevent isn't linked, as several tests use tracepoints, those should be skipped. - More fallout fixes for the removal of tools/lib/traceevent/. - Fix build error when linking with libpfm" * tag 'perf-tools-for-v6.3-1-2023-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (114 commits) perf tests stat_all_metrics: Change true workload to sleep workload for system wide check perf vendor events power10: Add JSON metric events to present CPI stall cycles in powerpc perf intel-pt: Synthesize cycle events perf c2c: Add report option to show false sharing in adjacent cachelines perf record: Fix segfault with --overwrite and --max-size perf stat: Avoid merging/aggregating metric counts twice perf tools: Fix perf tool build error in util/pfm.c perf tools: Fix auto-complete on aarch64 perf lock contention: Support old rw_semaphore type perf lock contention: Add -o/--lock-owner option perf lock contention: Fix to save callstack for the default modified perf test bpf: Skip test if kernel-debuginfo is not present perf probe: Update the exit error codes in function try_to_find_probe_trace_event perf script: Fix missing Retire Latency fields option documentation perf event x86: Add retire_lat when synthesizing PERF_SAMPLE_WEIGHT_STRUCT perf test x86: Support the retire_lat (Retire Latency) sample_type check perf test bpf: Check for libtraceevent support perf script: Support Retire Latency perf report: Support Retire Latency perf lock contention: Support filters for different aggregation ... commit b72b5fecc1b8a2e595bd03d7d257c88ea3f9fd45 Merge: 9191423872f76 7568a21e52f60 Author: Linus Torvalds Date: Thu Feb 23 10:20:49 2023 -0800 Merge tag 'trace-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing updates from Steven Rostedt: - Add function names as a way to filter function addresses - Add sample module to test ftrace ops and dynamic trampolines - Allow stack traces to be passed from beginning event to end event for synthetic events. This will allow seeing the stack trace of when a task is scheduled out and recorded when it gets scheduled back in. - Add trace event helper __get_buf() to use as a temporary buffer when printing out trace event output. - Add kernel command line to create trace instances on boot up. - Add enabling of events to instances created at boot up. - Add trace_array_puts() to write into instances. - Allow boot instances to take a snapshot at the end of boot up. - Allow live patch modules to include trace events - Minor fixes and clean ups * tag 'trace-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: (31 commits) tracing: Remove unnecessary NULL assignment tracepoint: Allow livepatch module add trace event tracing: Always use canonical ftrace path tracing/histogram: Fix stacktrace histogram Documententation tracing/histogram: Fix stacktrace key tracing/histogram: Fix a few problems with stacktrace variable printing tracing: Add BUILD_BUG() to make sure stacktrace fits in strings tracing/histogram: Don't use strlen to find length of stacktrace variables tracing: Allow boot instances to have snapshot buffers tracing: Add trace_array_puts() to write into instance tracing: Add enabling of events to boot instances tracing: Add creation of instances at boot command line tracing: Fix trace_event_raw_event_synth() if else statement samples: ftrace: Make some global variables static ftrace: sample: avoid open-coded 64-bit division samples: ftrace: Include the nospec-branch.h only for x86 tracing: Acquire buffer from temparary trace sequence tracing/histogram: Wrap remaining shell snippets in code blocks tracing/osnoise: No need for schedule_hrtimeout range bpf/tracing: Use stage6 of tracing to not duplicate macros ... commit 9191423872f764dccc024d6bc4b68dfd138ccc38 Merge: d392e49ad8905 8843e06f67b14 Author: Linus Torvalds Date: Thu Feb 23 10:08:01 2023 -0800 Merge tag 'trace-v6.2-rc7-3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fix from Steven Rostedt: "Fix race that causes a warning of corrupt ring buffer With the change that allows to read the "trace" file without disabling writing to the ring buffer, there was an integrity check of the ring buffer in the iterator read code, that expected the ring buffer to be write disabled. This caused the integrity check to trigger when stress reading the "trace" file while writing was happening. The integrity check is a bit aggressive (and has never triggered in practice). Change it so that it checks just the integrity of the linked pages without clearing the flags inside the pointers. This removes the warning that was being triggered" [ Heh. This was supposed to have gone in last week before the 6.2 release, but Steven forgot to actually add me to the participants of the pull request, so here it is, a week later - Linus ] * tag 'trace-v6.2-rc7-3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: ring-buffer: Handle race between rb_move_tail and rb_check_pages commit d392e49ad89059624a2b24daea3c64d0e0fb4124 Merge: 2562af68f0550 5dc3750e747f9 Author: Linus Torvalds Date: Thu Feb 23 10:04:24 2023 -0800 Merge tag 'trace-tools-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing tools updates from Steven Rostedt: - Use total duration to calculate average in rtla osnoise_hist - Use 2 digit precision for displaying average - Print an intuitive auto analysis of timerlat results - Add auto analysis to timerlat top - Add hwnoise, which is the same as osnoise but focuses on hardware - Small clean ups * tag 'trace-tools-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: Documentation/rtla: Add hwnoise man page rtla: Add hwnoise tool Documentation/rtla: Add timerlat-top auto-analysis options rtla/timerlat: Add auto-analysis support to timerlat top rtla/timerlat: Add auto-analysis core tools/tracing/rtla: osnoise_hist: display average with two-digit precision tools/tracing/rtla: osnoise_hist: use total duration for average calculation tools/rv: Remove unneeded semicolon commit ee0a735fd97ccde766ab557d1fc722c92cebacda Author: Sean Anderson Date: Wed Feb 22 15:42:41 2023 -0500 net: sunhme: Fix region request devm_request_region is for I/O regions. Use devm_request_mem_region instead. This fixes the driver failing to probe since 99df45c9e0a4 ("sunhme: fix an IS_ERR() vs NULL check in probe"), which checked the result. Fixes: 914d9b2711dd ("sunhme: switch to devres") Signed-off-by: Sean Anderson Reviewed-by: Pavan Chebbi Link: https://lore.kernel.org/r/20230222204242.2658247-1-seanga2@gmail.com Signed-off-by: Jakub Kicinski commit 2562af68f0550317fbd3d5f520069c69d0cf5115 Merge: 89f1a2440a200 7dc8e24f0e098 Author: Linus Torvalds Date: Thu Feb 23 09:49:00 2023 -0800 Merge tag 'ktest-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest Pull ktest updates from Steven Rostedt: - Fix three instances that the tty is not given back to the console on exit. Forcing the user to do a "reset" to get the console back. - Fix the console monitor to not hang when too much data is given by the ssh output. * tag 'ktest-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest: ktest: Restore stty setting at first in dodie ktest.pl: Add RUN_TIMEOUT option with default unlimited ktest.pl: Give back console on Ctrt^C on monitor ktest.pl: Fix missing "end_monitor" when machine check fails commit 89f1a2440a200918676f9e1eeb765b337f735d86 Merge: d6296cb65320b 82649c7c0da43 Author: Linus Torvalds Date: Thu Feb 23 09:40:14 2023 -0800 Merge tag 'linux-kselftest-kunit-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull KUnit update from Shuah Khan: - add Function Redirection API to isolate the code being tested from other parts of the kernel. Documentation/dev-tools/kunit/api/functionredirection.rst has the details. * tag 'linux-kselftest-kunit-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kunit: Add printf attribute to fail_current_test_impl lib/hashtable_test.c: add test for the hashtable structure Documentation: Add Function Redirection API docs kunit: Expose 'static stub' API to redirect functions kunit: Add "hooks" to call into KUnit when it's built as a module kunit: kunit.py extract handlers tools/testing/kunit/kunit.py: remove redundant double check commit d6296cb65320be16dbf20f2fd584ddc25f3437cd Merge: f01d4c8a22908 0eb15a47bf437 Author: Linus Torvalds Date: Thu Feb 23 09:37:29 2023 -0800 Merge tag 'linux-kselftest-next-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest update from Shuah Khan: - several patches to fix incorrect kernel headers search path from Mathieu Desnoyers - a few follow-on fixes found during testing the above change - miscellaneous fixes - support for filtering and enumerating tests * tag 'linux-kselftest-next-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (40 commits) selftests/user_events: add a note about user_events.h dependency selftests/mount_setattr: fix to make run_tests failure selftests/mount_setattr: fix redefine struct mount_attr build error selftests/sched: fix warn_unused_result build warns selftests/ptp: Remove clean target from Makefile selftests: use printf instead of echo -ne selftests/ftrace: Fix bash specific "==" operator selftests: tpm2: remove redundant ord() selftests: find echo binary to use -ne options selftests: Fix spelling mistake "allright" -> "all right" selftests: tdx: Use installed kernel headers search path selftests: ptrace: Use installed kernel headers search path selftests: memfd: Use installed kernel headers search path selftests: iommu: Use installed kernel headers search path selftests: x86: Fix incorrect kernel headers search path selftests: vm: Fix incorrect kernel headers search path selftests: user_events: Fix incorrect kernel headers search path selftests: sync: Fix incorrect kernel headers search path selftests: seccomp: Fix incorrect kernel headers search path selftests: sched: Fix incorrect kernel headers search path ... commit f01d4c8a22908956f4018ed334bb6713e41b37c1 Merge: 525445efacdfe c54ba4178159e Author: Linus Torvalds Date: Thu Feb 23 09:33:01 2023 -0800 Merge tag 'nolibc.2023.02.06a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull nolibc updates from Paul McKenney: - Add s390 support - Add support for the ARM Thumb1 instruction set - Fix O_* flags definitions for open() and fcntl() - Make errno a weak symbol instead of a static variable - Export environ as a weak symbol - Export _auxv as a weak symbol for auxilliary vector retrieval - Implement getauxval() and getpagesize() - Further improve self tests, including permitting userland testing of the nolibc library * tag 'nolibc.2023.02.06a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: (28 commits) selftests/nolibc: Add a "run-user" target to test the program in user land selftests/nolibc: Support "x86_64" for arch name selftests/nolibc: Add `getpagesize(2)` selftest nolibc/sys: Implement `getpagesize(2)` function nolibc/stdlib: Implement `getauxval(3)` function tools/nolibc: add auxiliary vector retrieval for s390 tools/nolibc: add auxiliary vector retrieval for mips tools/nolibc: add auxiliary vector retrieval for riscv tools/nolibc: add auxiliary vector retrieval for arm tools/nolibc: add auxiliary vector retrieval for arm64 tools/nolibc: add auxiliary vector retrieval for x86_64 tools/nolibc: add auxiliary vector retrieval for i386 tools/nolibc: export environ as a weak symbol on s390 tools/nolibc: export environ as a weak symbol on riscv tools/nolibc: export environ as a weak symbol on mips tools/nolibc: export environ as a weak symbol on arm tools/nolibc: export environ as a weak symbol on arm64 tools/nolibc: export environ as a weak symbol on i386 tools/nolibc: export environ as a weak symbol on x86_64 tools/nolibc: make errno a weak symbol instead of a static one ... commit f7482d8285b638be87a594a30edaaf1341135c1a Author: Krishna Yarlagadda Date: Thu Feb 23 21:56:34 2023 +0530 spi: tegra210-quad: set half duplex flag Tegra QSPI controller only supports half duplex transfers. Set half duplex constrain flag. Signed-off-by: Krishna Yarlagadda Link: https://lore.kernel.org/r/20230223162635.19747-3-kyarlagadda@nvidia.com Signed-off-by: Mark Brown commit 525445efacdfeed71329ce8bc5f558859a894b8b Merge: 192a5e0a19712 344da544f177f Author: Linus Torvalds Date: Thu Feb 23 09:28:37 2023 -0800 Merge tag 'nmi.2023.02.14a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull x86 NMI diagnostics from Paul McKenney: "Add diagnostics to the x86 NMI handler to help detect NMI-handler bugs on the one hand and failing hardware on the other" * tag 'nmi.2023.02.14a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: x86/nmi: Print reasons why backtrace NMIs are ignored x86/nmi: Accumulate NMI-progress evidence in exc_nmi() commit 192a5e0a19712a079f456954c203ce9dd2b889fa Merge: a5c95ca18a98d 9ba7d3b3b826e Author: Linus Torvalds Date: Thu Feb 23 09:24:25 2023 -0800 Merge tag 'lkmm.2023.02.15a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull LKMM (Linux Kernel Memory Model) updates from Paul McKenney: "Documentation updates. Add read-modify-write sequences, which means that stronger primitives more consistently result in stronger ordering, while still remaining in the envelope of the hardware that supports Linux. Address, data, and control dependencies used to ignore data that was stored in temporaries. This update extends these dependency chains to include unmarked intra-thread stores and loads. Note that these unmarked stores and loads should not be concurrently accessed from multiple threads, and doing so will cause LKMM to flag such accesses as data races" * tag 'lkmm.2023.02.15a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: tools: memory-model: Make plain accesses carry dependencies Documentation: Fixed a typo in atomic_t.txt tools: memory-model: Add rmw-sequences to the LKMM locking/memory-barriers.txt: Improve documentation for writel() example commit 37f5b858a66543b2b67c0288280af623985abc29 Author: Danny Kaehn Date: Fri Feb 10 11:00:44 2023 -0600 HID: cp2112: Fix driver not registering GPIO IRQ chip as threaded The CP2112 generates interrupts from a polling routine on a thread, and can only support threaded interrupts. This patch configures the gpiochip irq chip with this flag, disallowing consumers to request a hard IRQ from this driver, which resulted in a segfault previously. Signed-off-by: Danny Kaehn Link: https://lore.kernel.org/r/20230210170044.11835-1-kaehndan@gmail.com Signed-off-by: Benjamin Tissoires commit ad32ab9604f29827494024828f527228e84fbd2c Author: Juergen Gross Date: Thu Feb 23 09:38:00 2023 +0100 irqdomain: Add missing NULL pointer check in irq_domain_create_hierarchy() The recent switch to per-domain locking caused a NULL dereference in irq_domain_create_hierarchy(), as Xen code is calling msi_create_irq_domain() with a NULL parent pointer. Fix that by testing parent to be set before dereferencing it. For a non-existing parent the irqdomain's root will stay to point to itself. Fixes: 9dbb8e3452ab ("irqdomain: Switch to per-domain locking") Signed-off-by: Juergen Gross Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20230223083800.31347-1-jgross@suse.com commit 5931e4eb55f904a4a221b57ff7d24afc0e463957 Merge: ce7980ae9080f 6f3ee0e22b4c6 Author: Thomas Gleixner Date: Thu Feb 23 15:49:31 2023 +0100 Merge branch 'irq/core' into irq/urgent Pull in the upstream changes so a fix for them can be applied. commit 22ef7d7be4dc071712ddf0ae09df6ee39b4901a0 Author: Benjamin Tissoires Date: Thu Feb 23 15:17:26 2023 +0100 selftest: hid: fix hid_bpf not set in config Now that CONFIG_HID_BPF is not automatically implied by HID, we need to set it properly in the selftests config. Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 3de34f85bf437e47556044191f0bd7d0eb644e21 Author: Ian Rogers Date: Wed Feb 22 23:18:18 2023 -0800 perf test: Avoid counting commas in json linter Commas may appear in events like: cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/ which causes the count of commas to see more items than expected. Switch to counting the entries in the dictionary, which is 1 more than the number of commas. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Athira Rajeev Cc: Claire Jensen 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/20230223071818.329671-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit d3e104bb024e01a7da6af3b270a7b46054b74ac9 Author: Ian Rogers Date: Wed Feb 22 23:18:17 2023 -0800 perf tests stat+csv_output: Switch CSV separator to @ Commas may appear in events like: cpu/INT_MISC.RECOVERY_CYCLES,cmask=1,edge/ which causes the commachecker to see more fields than expected. Use @ as the CSV separator to avoid this. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Athira Rajeev Cc: Claire Jensen 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/20230223071818.329671-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit ce9f1c05d2edfa6cdf2c1a510495d333e11810a8 Author: Namhyung Kim Date: Wed Feb 22 23:01:55 2023 -0800 perf inject: Fix --buildid-all not to eat up MMAP2 When MMAP2 has the PERF_RECORD_MISC_MMAP_BUILD_ID flag, it means the record already has the build-id info. So it marks the DSO as hit, to skip if the same DSO is not processed if it happens to miss the build-id later. But it missed to copy the MMAP2 record itself so it'd fail to symbolize samples for those regions. For example, the following generates 249 MMAP2 events. $ perf record --buildid-mmap -o- true | perf report --stat -i- | grep MMAP2 MMAP2 events: 249 (86.8%) Adding perf inject should not change the number of events like this $ perf record --buildid-mmap -o- true | perf inject -b | \ > perf report --stat -i- | grep MMAP2 MMAP2 events: 249 (86.5%) But when --buildid-all is used, it eats most of the MMAP2 events. $ perf record --buildid-mmap -o- true | perf inject -b --buildid-all | \ > perf report --stat -i- | grep MMAP2 MMAP2 events: 1 ( 2.5%) With this patch, it shows the original number now. $ perf record --buildid-mmap -o- true | perf inject -b --buildid-all | \ > perf report --stat -i- | grep MMAP2 MMAP2 events: 249 (86.5%) Committer testing: Before: $ perf record --buildid-mmap -o- perf stat --null sleep 1 2> /dev/null | perf inject -b | perf report --stat -i- | grep MMAP2 MMAP2 events: 58 (36.2%) $ perf record --buildid-mmap -o- perf stat --null sleep 1 2> /dev/null | perf report --stat -i- | grep MMAP2 MMAP2 events: 58 (36.2%) $ perf record --buildid-mmap -o- perf stat --null sleep 1 2> /dev/null | perf inject -b --buildid-all | perf report --stat -i- | grep MMAP2 MMAP2 events: 2 ( 1.9%) $ After: $ perf record --buildid-mmap -o- perf stat --null sleep 1 2> /dev/null | perf inject -b | perf report --stat -i- | grep MMAP2 MMAP2 events: 58 (29.3%) $ perf record --buildid-mmap -o- perf stat --null sleep 1 2> /dev/null | perf report --stat -i- | grep MMAP2 MMAP2 events: 58 (34.3%) $ perf record --buildid-mmap -o- perf stat --null sleep 1 2> /dev/null | perf inject -b --buildid-all | perf report --stat -i- | grep MMAP2 MMAP2 events: 58 (38.4%) $ Fixes: f7fc0d1c915a74ff ("perf inject: Do not inject BUILD_ID record if MMAP2 has it") Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230223070155.54251-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit edea0c5a994b7829c9ada8f5bc762c4e32f4f797 Author: Geetha sowjanya Date: Wed Feb 22 17:06:00 2023 +0530 octeontx2-pf: Recalculate UDP checksum for ptp 1-step sync packet When checksum offload is disabled in the driver via ethtool, the PTP 1-step sync packets contain incorrect checksum, since the stack calculates the checksum before driver updates PTP timestamp field in the packet. This results in PTP packets getting dropped at the other end. This patch fixes the issue by re-calculating the UDP checksum after updating PTP timestamp field in the driver. Fixes: 2958d17a8984 ("octeontx2-pf: Add support for ptp 1-step mode on CN10K silicon") Signed-off-by: Geetha sowjanya Signed-off-by: Hariprasad Kelam Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Sai Krishna Link: https://lore.kernel.org/r/20230222113600.1965116-1-saikrishnag@marvell.com Signed-off-by: Paolo Abeni commit 1e30373ea59ef47a7aa406cab64c852200f4bac3 Merge: c749e3f82a15e 186b1da76b727 Author: Paolo Abeni Date: Thu Feb 23 13:43:26 2023 +0100 Merge branch 'net-phy-eee-fixes' Oleksij Rempel says: ==================== net: phy: EEE fixes changes v3: - add kernel test robot tags to commit log - reword comment for genphy_c45_an_config_eee_aneg() function changes v2: - restore previous ethtool set logic for the case where advertisements are not provided by user space. - use ethtool_convert_legacy_u32_to_link_mode() where possible - genphy_c45_an_config_eee_aneg(): move adv initialization in to the if scope. Different EEE related fixes. ==================== Link: https://lore.kernel.org/r/20230222055043.113711-1-o.rempel@pengutronix.de Signed-off-by: Paolo Abeni commit 186b1da76b7271d65b48af5abae10a53d679c776 Author: Oleksij Rempel Date: Wed Feb 22 06:50:43 2023 +0100 net: phy: c45: genphy_c45_ethtool_set_eee: validate EEE link modes Currently, it is possible to let some PHYs to advertise not supported EEE link modes. So, validate them before overwriting existing configuration. Signed-off-by: Oleksij Rempel Reviewed-by: Russell King (Oracle) Signed-off-by: Paolo Abeni commit 3eeca4e199cee2066c65b872391cecee5cbbbb81 Author: Oleksij Rempel Date: Wed Feb 22 06:50:42 2023 +0100 net: phy: do not force EEE support With following patches: commit 9b01c885be36 ("net: phy: c22: migrate to genphy_c45_write_eee_adv()") commit 5827b168125d ("net: phy: c45: migrate to genphy_c45_write_eee_adv()") we set the advertisement to potentially supported values. This behavior may introduce new regressions on systems where EEE was disabled by default (BIOS or boot loader configuration or by other ways.) At same time, with this patches, we would overwrite EEE advertisement configuration made over ethtool. To avoid this issues, we need to cache initial and ethtool advertisement configuration and store it for later use. Fixes: 9b01c885be36 ("net: phy: c22: migrate to genphy_c45_write_eee_adv()") Fixes: 5827b168125d ("net: phy: c45: migrate to genphy_c45_write_eee_adv()") Fixes: 022c3f87f88e ("net: phy: add genphy_c45_ethtool_get/set_eee() support") Signed-off-by: Oleksij Rempel Reviewed-by: Russell King (Oracle) Signed-off-by: Paolo Abeni commit b6478b8c93304fa0483e4657779b44634a1711c7 Author: Oleksij Rempel Date: Wed Feb 22 06:50:41 2023 +0100 net: phy: c45: add genphy_c45_an_config_eee_aneg() function Add new genphy_c45_an_config_eee_aneg() function and replace some of genphy_c45_write_eee_adv() calls. This will be needed by the next patch. Signed-off-by: Oleksij Rempel Reviewed-by: Russell King (Oracle) Signed-off-by: Paolo Abeni commit e209519b623391465c0b37caca89bf0ffff91f53 Author: Oleksij Rempel Date: Wed Feb 22 06:50:40 2023 +0100 net: phy: c45: use "supported_eee" instead of supported for access validation Make sure we use proper variable to validate access to potentially not supported registers. Otherwise we will get false read/write errors. Reported-by: kernel test robot Link: https://lore.kernel.org/oe-lkp/202302211644.c12d19de-yujie.liu@intel.com Fixes: 022c3f87f88e ("net: phy: add genphy_c45_ethtool_get/set_eee() support") Signed-off-by: Oleksij Rempel Reviewed-by: Russell King (Oracle) Signed-off-by: Paolo Abeni commit 5d2fdb255c52989e95704b5556dbf0ad833bddd2 Merge: 85636167e3206 0b93efca3659f Author: Jani Nikula Date: Thu Feb 23 14:05:43 2023 +0200 Merge tag 'gvt-next-fixes-2023-02-23' of https://github.com/intel/gvt-linux into drm-intel-next-fixes gvt-next-fixes-2023-02-23 - use debugfs attribute for gvt debugfs entries (Deepak R Varma) - fix memory leak in vgpu destroy for debugfs_lookup() then remove (Greg KH) - fix DRM_I915_GVT kconfig symbol to unbreak menu presentation (Randy Dunlap) - fix typos (Deepak R Varma, Colin Ian King) Signed-off-by: Jani Nikula From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/Y/co4cy10KM1/2uX@debian-scheme commit 85636167e3206c3fbd52254fc432991cc4e90194 Author: John Harrison Date: Wed Feb 15 17:11:01 2023 -0800 drm/i915: Don't use BAR mappings for ring buffers with LLC Direction from hardware is that ring buffers should never be mapped via the BAR on systems with LLC. There are too many caching pitfalls due to the way BAR accesses are routed. So it is safest to just not use it. Signed-off-by: John Harrison Fixes: 9d80841ea4c9 ("drm/i915: Allow ringbuffers to be bound anywhere") Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: intel-gfx@lists.freedesktop.org Cc: # v4.9+ Tested-by: Jouni Högander Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20230216011101.1909009-3-John.C.Harrison@Intel.com (cherry picked from commit 65c08339db1ada87afd6cfe7db8e60bb4851d919) Signed-off-by: Jani Nikula commit 690e0ec8e63da9a29b39fedc6ed5da09c7c82651 Author: John Harrison Date: Wed Feb 15 17:11:00 2023 -0800 drm/i915: Don't use stolen memory for ring buffers with LLC Direction from hardware is that stolen memory should never be used for ring buffer allocations on platforms with LLC. There are too many caching pitfalls due to the way stolen memory accesses are routed. So it is safest to just not use it. Signed-off-by: John Harrison Fixes: c58b735fc762 ("drm/i915: Allocate rings from stolen") Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: intel-gfx@lists.freedesktop.org Cc: # v4.9+ Tested-by: Jouni Högander Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20230216011101.1909009-2-John.C.Harrison@Intel.com (cherry picked from commit f54c1f6c697c4297f7ed94283c184acc338a5cf8) Signed-off-by: Jani Nikula commit 5e438bf7f9a1705ebcae5fa89cdbfbc6932a7871 Author: Mavroudis Chatzilaridis Date: Wed Feb 1 18:51:25 2023 +0000 drm/i915/quirks: Add inverted backlight quirk for HP 14-r206nv This laptop uses inverted backlight PWM. Thus, without this quirk, backlight brightness decreases as the brightness value increases and vice versa. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8013 Cc: stable@vger.kernel.org Signed-off-by: Mavroudis Chatzilaridis Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230201184947.8835-1-mavchatz@protonmail.com (cherry picked from commit 83e7d6fd330d413cb2064e680ffea91b0512a520) commit 33c25354939099b76ecb6c82d1c7c50400fbcca6 Author: Matt Roper Date: Mon Feb 13 16:19:06 2023 -0800 drm/i915/xelpmp: Consider GSI offset when doing MCR lookups MCR range tables use the final MMIO offset of a register (including the 0x380000 GSI offset when applicable). Since the i915_mcr_reg_t passed as a parameter during steering lookup does not include the GSI offset, we need to add it back in for GSI registers before searching the tables. Fixes: a7ec65fc7e83 ("drm/i915/xelpmp: Add multicast steering for media GT") Signed-off-by: Matt Roper Reviewed-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20230214001906.1477370-1-matthew.d.roper@intel.com (cherry picked from commit d6683bbe70d4cdbf3da6acecf7d569cc6f0b4382) Signed-off-by: Jani Nikula commit 078a5517d22342eb0474046d3e891427a2552e3c Author: Dhruva Gole Date: Thu Feb 23 15:22:02 2023 +0530 spi: spi-sn-f-ospi: fix duplicate flag while assigning to mode_bits Replace the SPI_TX_OCTAL flag that appeared two time with SPI_RX_OCTAL in the chain of '|' operators while assigning to mode_bits Fixes: 1b74dd64c861 ("spi: Add Socionext F_OSPI SPI flash controller driver") Reported-by: David Binderman Link: https://lore.kernel.org/all/DB6P189MB0568F3BE9384315F5C8C1A3E9CA49@DB6P189MB0568.EURP189.PROD.OUTLOOK.COM/ Cc: stable@vger.kernel.org Signed-off-by: Dhruva Gole Link: https://lore.kernel.org/r/20230223095202.924626-1-d-gole@ti.com Signed-off-by: Mark Brown commit 152ac60677aa3760d0850de0db33d495f55e8aba Author: Hongbin Ji Date: Wed Feb 22 17:21:28 2023 +0800 spi: cadence-quadspi: Fix cancel the indirect read mask This is to cancel the indirect read transfer process, so should be use CQSPI_REG_INDIRECTRD_CANCEL_MASK Signed-off-by: Hongbin Ji Link: https://lore.kernel.org/r/20230222092128.4237-1-jhb_ee@163.com Signed-off-by: Mark Brown commit 80d2c29e09e663761c2778167a625b25ffe01b6f Author: Matthias Kaehlcke Date: Thu Feb 23 00:33:30 2023 +0000 regulator: core: Use ktime_get_boottime() to determine how long a regulator was off For regulators with 'off-on-delay-us' the regulator framework currently uses ktime_get() to determine how long the regulator has been off before re-enabling it (after a delay if needed). A problem with using ktime_get() is that it doesn't account for the time the system is suspended. As a result a regulator with a longer 'off-on-delay' (e.g. 500ms) that was switched off during suspend might still incurr in a delay on resume before it is re-enabled, even though the regulator might have been off for hours. ktime_get_boottime() accounts for suspend time, use it instead of ktime_get(). Fixes: a8ce7bd89689 ("regulator: core: Fix off_on_delay handling") Cc: stable@vger.kernel.org # 5.13+ Signed-off-by: Matthias Kaehlcke Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20230223003301.v2.1.I9719661b8eb0a73b8c416f9c26cf5bd8c0563f99@changeid Signed-off-by: Mark Brown commit 1c5d4221240a233df2440fe75c881465cdf8da07 Author: Lee Jones Date: Mon Jan 23 12:39:12 2023 +0000 HID: uhid: Over-ride the default maximum data buffer value with our own The default maximum data buffer size for this interface is UHID_DATA_MAX (4k). When data buffers are being processed, ensure this value is used when ensuring the sanity, rather than a value between the user provided value and HID_MAX_BUFFER_SIZE (16k). Signed-off-by: Lee Jones Signed-off-by: Jiri Kosina commit b1a37ed00d7908a991c1d0f18a8cba3c2aa99bdc Author: Lee Jones Date: Mon Jan 23 12:39:11 2023 +0000 HID: core: Provide new max_buffer_size attribute to over-ride the default Presently, when a report is processed, its proposed size, provided by the user of the API (as Report Size * Report Count) is compared against the subsystem default HID_MAX_BUFFER_SIZE (16k). However, some low-level HID drivers allocate a reduced amount of memory to their buffers (e.g. UHID only allocates UHID_DATA_MAX (4k) buffers), rending this check inadequate in some cases. In these circumstances, if the received report ends up being smaller than the proposed report size, the remainder of the buffer is zeroed. That is, the space between sizeof(csize) (size of the current report) and the rsize (size proposed i.e. Report Size * Report Count), which can be handled up to HID_MAX_BUFFER_SIZE (16k). Meaning that memset() shoots straight past the end of the buffer boundary and starts zeroing out in-use values, often resulting in calamity. This patch introduces a new variable into 'struct hid_ll_driver' where individual low-level drivers can over-ride the default maximum value of HID_MAX_BUFFER_SIZE (16k) with something more sympathetic to the interface. Signed-off-by: Lee Jones Signed-off-by: Jiri Kosina commit c749e3f82a15e10a798bb55f60368ee102c793cb Author: Patrisious Haddad Date: Wed Feb 22 11:06:40 2023 +0200 net/mlx5: Fix memory leak in IPsec RoCE creation During IPsec RoCE TX creation a struct for the flow group creation is allocated, but never freed. Free that struct once it is no longer in use. Fixes: 22551e77e550 ("net/mlx5: Configure IPsec steering for egress RoCEv2 traffic") Signed-off-by: Patrisious Haddad Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/a69739482cca7176d3a466f87bbf5af1250b09bb.1677056384.git.leon@kernel.org Signed-off-by: Paolo Abeni commit 44bd0394fe10903757da0863e0cf62c2d9846ea6 Author: Lu Wei Date: Wed Feb 22 16:36:29 2023 +0800 selftests: fib_tests: Add test cases for IPv4/IPv6 in route notify Add tests to check whether the total fib info length is calculated corretly in route notify process. Signed-off-by: Lu Wei Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20230222083629.335683-3-luwei32@huawei.com Signed-off-by: Paolo Abeni commit 4cc59f386991ec9374cb4bc83dbe1c0b5a95033f Author: Lu Wei Date: Wed Feb 22 16:36:28 2023 +0800 ipv6: Add lwtunnel encap size of all siblings in nexthop calculation In function rt6_nlmsg_size(), the length of nexthop is calculated by multipling the nexthop length of fib6_info and the number of siblings. However if the fib6_info has no lwtunnel but the siblings have lwtunnels, the nexthop length is less than it should be, and it will trigger a warning in inet6_rt_notify() as follows: WARNING: CPU: 0 PID: 6082 at net/ipv6/route.c:6180 inet6_rt_notify+0x120/0x130 ...... Call Trace: fib6_add_rt2node+0x685/0xa30 fib6_add+0x96/0x1b0 ip6_route_add+0x50/0xd0 inet6_rtm_newroute+0x97/0xa0 rtnetlink_rcv_msg+0x156/0x3d0 netlink_rcv_skb+0x5a/0x110 netlink_unicast+0x246/0x350 netlink_sendmsg+0x250/0x4c0 sock_sendmsg+0x66/0x70 ___sys_sendmsg+0x7c/0xd0 __sys_sendmsg+0x5d/0xb0 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc This bug can be reproduced by script: ip -6 addr add 2002::2/64 dev ens2 ip -6 route add 100::/64 via 2002::1 dev ens2 metric 100 for i in 10 20 30 40 50 60 70; do ip link add link ens2 name ipv_$i type ipvlan ip -6 addr add 2002::$i/64 dev ipv_$i ifconfig ipv_$i up done for i in 10 20 30 40 50 60; do ip -6 route append 100::/64 encap ip6 dst 2002::$i via 2002::1 dev ipv_$i metric 100 done ip -6 route append 100::/64 via 2002::1 dev ipv_70 metric 100 This patch fixes it by adding nexthop_len of every siblings using rt6_nh_nlmsg_size(). Fixes: beb1afac518d ("net: ipv6: Add support to dump multipath routes via RTA_MULTIPATH attribute") Signed-off-by: Lu Wei Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20230222083629.335683-2-luwei32@huawei.com Signed-off-by: Paolo Abeni commit f4440abc08917d9a7032abb8a6a5d4b36ca979b6 Merge: 27121864ab366 ef3e6327ff04a Author: Miquel Raynal Date: Thu Feb 23 10:28:29 2023 +0100 Merge tag 'nand/for-6.3' into mtd/next NAND core changes: * Check the data only read pattern only once * Prepare the late addition of supported operation checks * Support for sequential cache reads * Fix nand_chip kdoc Raw NAND changes: * Fsl_elbc: Propagate HW ECC settings to HW * Marvell: Add missing layouts * Pasemi: Don't use static data to track per-device state * Sunxi: - Fix the size of the last OOB region - Remove an unnecessary check - Remove an unnecessary check - Clean up chips after failed init - Precompute the ECC_CTL register value - Embed sunxi_nand_hw_ecc by value - Update OOB layout to match hardware * tmio_nand: Remove driver * vf610_nfc: Use regular comments for functions SPI-NAND changes: * Add support for AllianceMemory AS5F34G04SND * Macronix: use scratch buffer for DMA operation NAND ECC changes: * Mediatek: - Add ECC support fot MT7986 IC - Add compatible for MT7986 - dt-bindings: Split ECC engine with rawnand controller commit 27121864ab366992583d894961ecdc6e2ffe0ca1 Merge: 84549c816dc31 f047382519ca4 Author: Miquel Raynal Date: Thu Feb 23 10:27:32 2023 +0100 Merge tag 'spi-nor/for-6.3' into mtd/next SPI NOR changes: * small fixes on core and spansion driver. commit 00c8f01c4e84637c3db76f368b8687cb61f4dd9d Author: Josh Poimboeuf Date: Thu Feb 16 12:34:41 2023 -0800 objtool: Fix ORC 'signal' propagation There have been some recently reported ORC unwinder warnings like: WARNING: can't access registers at entry_SYSCALL_64_after_hwframe+0x63/0xcd WARNING: stack going in the wrong direction? at __sys_setsockopt+0x2c6/0x5b0 net/socket.c:2271 And a KASAN warning: BUG: KASAN: stack-out-of-bounds in unwind_next_frame (arch/x86/include/asm/ptrace.h:136 arch/x86/kernel/unwind_orc.c:455) It turns out the 'signal' bit isn't getting propagated from the unwind hints to the ORC entries, making the unwinder confused at times. Fixes: ffb1b4a41016 ("x86/unwind/orc: Add 'signal' field to ORC metadata") Reported-by: kernel test robot Reported-by: Dmitry Vyukov Signed-off-by: Josh Poimboeuf Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/97eef9db60cd86d376a9a40d49d77bb67a8f6526.1676579666.git.jpoimboe@kernel.org commit 1c34496e5856886d565665fb64029ecdeb080ffb Author: Peter Zijlstra Date: Wed Feb 8 18:18:05 2023 +0100 objtool: Remove instruction::list Replace the instruction::list by allocating instructions in arrays of 256 entries and stringing them together by (amortized) find_insn(). This shrinks instruction by 16 bytes and brings it down to 128. struct instruction { - struct list_head list; /* 0 16 */ - struct hlist_node hash; /* 16 16 */ - struct list_head call_node; /* 32 16 */ - struct section * sec; /* 48 8 */ - long unsigned int offset; /* 56 8 */ - /* --- cacheline 1 boundary (64 bytes) --- */ - long unsigned int immediate; /* 64 8 */ - unsigned int len; /* 72 4 */ - u8 type; /* 76 1 */ - - /* Bitfield combined with previous fields */ + struct hlist_node hash; /* 0 16 */ + struct list_head call_node; /* 16 16 */ + struct section * sec; /* 32 8 */ + long unsigned int offset; /* 40 8 */ + long unsigned int immediate; /* 48 8 */ + u8 len; /* 56 1 */ + u8 prev_len; /* 57 1 */ + u8 type; /* 58 1 */ + s8 instr; /* 59 1 */ + u32 idx:8; /* 60: 0 4 */ + u32 dead_end:1; /* 60: 8 4 */ + u32 ignore:1; /* 60: 9 4 */ + u32 ignore_alts:1; /* 60:10 4 */ + u32 hint:1; /* 60:11 4 */ + u32 save:1; /* 60:12 4 */ + u32 restore:1; /* 60:13 4 */ + u32 retpoline_safe:1; /* 60:14 4 */ + u32 noendbr:1; /* 60:15 4 */ + u32 entry:1; /* 60:16 4 */ + u32 visited:4; /* 60:17 4 */ + u32 no_reloc:1; /* 60:21 4 */ - u16 dead_end:1; /* 76: 8 2 */ - u16 ignore:1; /* 76: 9 2 */ - u16 ignore_alts:1; /* 76:10 2 */ - u16 hint:1; /* 76:11 2 */ - u16 save:1; /* 76:12 2 */ - u16 restore:1; /* 76:13 2 */ - u16 retpoline_safe:1; /* 76:14 2 */ - u16 noendbr:1; /* 76:15 2 */ - u16 entry:1; /* 78: 0 2 */ - u16 visited:4; /* 78: 1 2 */ - u16 no_reloc:1; /* 78: 5 2 */ + /* XXX 10 bits hole, try to pack */ - /* XXX 2 bits hole, try to pack */ - /* Bitfield combined with next fields */ - - s8 instr; /* 79 1 */ - struct alt_group * alt_group; /* 80 8 */ - struct instruction * jump_dest; /* 88 8 */ - struct instruction * first_jump_src; /* 96 8 */ + /* --- cacheline 1 boundary (64 bytes) --- */ + struct alt_group * alt_group; /* 64 8 */ + struct instruction * jump_dest; /* 72 8 */ + struct instruction * first_jump_src; /* 80 8 */ union { - struct symbol * _call_dest; /* 104 8 */ - struct reloc * _jump_table; /* 104 8 */ - }; /* 104 8 */ - struct alternative * alts; /* 112 8 */ - struct symbol * sym; /* 120 8 */ - /* --- cacheline 2 boundary (128 bytes) --- */ - struct stack_op * stack_ops; /* 128 8 */ - struct cfi_state * cfi; /* 136 8 */ + struct symbol * _call_dest; /* 88 8 */ + struct reloc * _jump_table; /* 88 8 */ + }; /* 88 8 */ + struct alternative * alts; /* 96 8 */ + struct symbol * sym; /* 104 8 */ + struct stack_op * stack_ops; /* 112 8 */ + struct cfi_state * cfi; /* 120 8 */ - /* size: 144, cachelines: 3, members: 28 */ - /* sum members: 142 */ - /* sum bitfield members: 14 bits, bit holes: 1, sum bit holes: 2 bits */ - /* last cacheline: 16 bytes */ + /* size: 128, cachelines: 2, members: 29 */ + /* sum members: 124 */ + /* sum bitfield members: 22 bits, bit holes: 1, sum bit holes: 10 bits */ }; pre: 5:38.18 real, 213.25 user, 124.90 sys, 23449040 mem post: 5:03.34 real, 210.75 user, 88.80 sys, 20241232 mem Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Josh Poimboeuf Tested-by: Nathan Chancellor # build only Tested-by: Thomas Weißschuh # compile and run Link: https://lore.kernel.org/r/20230208172245.851307606@infradead.org commit 6ea17e848a8ba5138b30e936c4b71877bc972c13 Author: Peter Zijlstra Date: Wed Feb 8 18:18:04 2023 +0100 x86: Fix FILL_RETURN_BUFFER With overlapping alternative validation fixed, objtool promptly complains: vmlinux.o: warning: objtool: __switch_to_asm+0x2c: stack layout conflict in alternatives: .altinstr_replacement+0x47 .rela.altinstructions: 000000000000009c 0000000200000002 R_X86_64_PC32 0000000000000000 .text + 16dc 00000000000000a0 0000000600000002 R_X86_64_PC32 0000000000000000 .altinstr_replacement + 3a 00000000000000a8 0000000200000002 R_X86_64_PC32 0000000000000000 .text + 16dc 00000000000000ac 0000000600000002 R_X86_64_PC32 0000000000000000 .altinstr_replacement + 66 .text: 00000000000016b0 <__switch_to_asm>: 16b0: f3 0f 1e fa endbr64 16b4: 55 push %rbp 16b5: 53 push %rbx 16b6: 41 54 push %r12 16b8: 41 55 push %r13 16ba: 41 56 push %r14 16bc: 41 57 push %r15 16be: 48 89 a7 18 0b 00 00 mov %rsp,0xb18(%rdi) 16c5: 48 8b a6 18 0b 00 00 mov 0xb18(%rsi),%rsp 16cc: 48 8b 9e 28 05 00 00 mov 0x528(%rsi),%rbx 16d3: 65 48 89 1c 25 00 00 00 00 mov %rbx,%gs:0x0 16d8: R_X86_64_32S fixed_percpu_data+0x28 16dc: eb 2a jmp 1708 <__switch_to_asm+0x58> 16de: 90 nop 16df: 90 nop 16e0: 90 nop 16e1: 90 nop 16e2: 90 nop 16e3: 90 nop 16e4: 90 nop 16e5: 90 nop 16e6: 90 nop 16e7: 90 nop 16e8: 90 nop 16e9: 90 nop 16ea: 90 nop 16eb: 90 nop 16ec: 90 nop 16ed: 90 nop 16ee: 90 nop 16ef: 90 nop 16f0: 90 nop 16f1: 90 nop 16f2: 90 nop 16f3: 90 nop 16f4: 90 nop 16f5: 90 nop 16f6: 90 nop 16f7: 90 nop 16f8: 90 nop 16f9: 90 nop 16fa: 90 nop 16fb: 90 nop 16fc: 90 nop 16fd: 90 nop 16fe: 90 nop 16ff: 90 nop 1700: 90 nop 1701: 90 nop 1702: 90 nop 1703: 90 nop 1704: 90 nop 1705: 90 nop 1706: 90 nop 1707: 90 nop 1708: 41 5f pop %r15 170a: 41 5e pop %r14 170c: 41 5d pop %r13 170e: 41 5c pop %r12 1710: 5b pop %rbx 1711: 5d pop %rbp 1712: e9 00 00 00 00 jmp 1717 <__switch_to_asm+0x67> 1713: R_X86_64_PLT32 __switch_to-0x4 .altinstr_replacement: 3a: 49 c7 c4 10 00 00 00 mov $0x10,%r12 41: e8 01 00 00 00 call 47 <.altinstr_replacement+0x47> 46: cc int3 47: e8 01 00 00 00 call 4d <.altinstr_replacement+0x4d> 4c: cc int3 4d: 48 83 c4 10 add $0x10,%rsp 51: 49 ff cc dec %r12 54: 75 eb jne 41 <.altinstr_replacement+0x41> 56: 0f ae e8 lfence 59: 65 48 c7 04 25 00 00 00 00 ff ff ff ff movq $0xffffffffffffffff,%gs:0x0 5e: R_X86_64_32S pcpu_hot+0x10 66: e8 01 00 00 00 call 6c <.altinstr_replacement+0x6c> 6b: cc int3 6c: 48 83 c4 08 add $0x8,%rsp 70: 0f ae e8 lfence As can be seen from the two alternatives, when overlaid, the NOP after the shorter (starting at 66) coinsides with the call at 47, leading to conflicting CFI state for that instruction. By offsetting the shorter alternative by 2 bytes, this alignment is undone. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Josh Poimboeuf Tested-by: Nathan Chancellor # build only Tested-by: Thomas Weißschuh # compile and run Link: https://lore.kernel.org/r/20230208172245.783099843@infradead.org commit a706bb08c81ac878982e41d4b6abcc42258bd39e Author: Peter Zijlstra Date: Wed Feb 8 18:18:03 2023 +0100 objtool: Fix overlapping alternatives Things like ALTERNATIVE_{2,3}() generate multiple alternatives on the same place, objtool would override the first orig_alt_group with the second (or third), failing to check the CFI among all the different variants. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Josh Poimboeuf Tested-by: Nathan Chancellor # build only Tested-by: Thomas Weißschuh # compile and run Link: https://lore.kernel.org/r/20230208172245.711471461@infradead.org commit c6f5dc28fb3d736fa8d7f7d31e0664a9c772c299 Author: Peter Zijlstra Date: Wed Feb 8 18:18:02 2023 +0100 objtool: Union instruction::{call_dest,jump_table} The instruction call_dest and jump_table members can never be used at the same time, their usage depends on type. struct instruction { struct list_head list; /* 0 16 */ struct hlist_node hash; /* 16 16 */ struct list_head call_node; /* 32 16 */ struct section * sec; /* 48 8 */ long unsigned int offset; /* 56 8 */ /* --- cacheline 1 boundary (64 bytes) --- */ long unsigned int immediate; /* 64 8 */ unsigned int len; /* 72 4 */ u8 type; /* 76 1 */ /* Bitfield combined with previous fields */ u16 dead_end:1; /* 76: 8 2 */ u16 ignore:1; /* 76: 9 2 */ u16 ignore_alts:1; /* 76:10 2 */ u16 hint:1; /* 76:11 2 */ u16 save:1; /* 76:12 2 */ u16 restore:1; /* 76:13 2 */ u16 retpoline_safe:1; /* 76:14 2 */ u16 noendbr:1; /* 76:15 2 */ u16 entry:1; /* 78: 0 2 */ u16 visited:4; /* 78: 1 2 */ u16 no_reloc:1; /* 78: 5 2 */ /* XXX 2 bits hole, try to pack */ /* Bitfield combined with next fields */ s8 instr; /* 79 1 */ struct alt_group * alt_group; /* 80 8 */ - struct symbol * call_dest; /* 88 8 */ - struct instruction * jump_dest; /* 96 8 */ - struct instruction * first_jump_src; /* 104 8 */ - struct reloc * jump_table; /* 112 8 */ - struct alternative * alts; /* 120 8 */ + struct instruction * jump_dest; /* 88 8 */ + struct instruction * first_jump_src; /* 96 8 */ + union { + struct symbol * _call_dest; /* 104 8 */ + struct reloc * _jump_table; /* 104 8 */ + }; /* 104 8 */ + struct alternative * alts; /* 112 8 */ + struct symbol * sym; /* 120 8 */ /* --- cacheline 2 boundary (128 bytes) --- */ - struct symbol * sym; /* 128 8 */ - struct stack_op * stack_ops; /* 136 8 */ - struct cfi_state * cfi; /* 144 8 */ + struct stack_op * stack_ops; /* 128 8 */ + struct cfi_state * cfi; /* 136 8 */ - /* size: 152, cachelines: 3, members: 29 */ - /* sum members: 150 */ + /* size: 144, cachelines: 3, members: 28 */ + /* sum members: 142 */ /* sum bitfield members: 14 bits, bit holes: 1, sum bit holes: 2 bits */ - /* last cacheline: 24 bytes */ + /* last cacheline: 16 bytes */ }; pre: 5:39.35 real, 215.58 user, 123.69 sys, 23448736 mem post: 5:38.18 real, 213.25 user, 124.90 sys, 23449040 mem Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Josh Poimboeuf Tested-by: Nathan Chancellor # build only Tested-by: Thomas Weißschuh # compile and run Link: https://lore.kernel.org/r/20230208172245.640914454@infradead.org commit 0932dbe1f5680481e612cafe0c7d0f1796f68612 Author: Peter Zijlstra Date: Wed Feb 8 18:18:01 2023 +0100 objtool: Remove instruction::reloc Instead of caching the reloc for each instruction, only keep a negative cache of not having a reloc (by far the most common case). struct instruction { struct list_head list; /* 0 16 */ struct hlist_node hash; /* 16 16 */ struct list_head call_node; /* 32 16 */ struct section * sec; /* 48 8 */ long unsigned int offset; /* 56 8 */ /* --- cacheline 1 boundary (64 bytes) --- */ long unsigned int immediate; /* 64 8 */ unsigned int len; /* 72 4 */ u8 type; /* 76 1 */ /* Bitfield combined with previous fields */ u16 dead_end:1; /* 76: 8 2 */ u16 ignore:1; /* 76: 9 2 */ u16 ignore_alts:1; /* 76:10 2 */ u16 hint:1; /* 76:11 2 */ u16 save:1; /* 76:12 2 */ u16 restore:1; /* 76:13 2 */ u16 retpoline_safe:1; /* 76:14 2 */ u16 noendbr:1; /* 76:15 2 */ u16 entry:1; /* 78: 0 2 */ u16 visited:4; /* 78: 1 2 */ + u16 no_reloc:1; /* 78: 5 2 */ - /* XXX 3 bits hole, try to pack */ + /* XXX 2 bits hole, try to pack */ /* Bitfield combined with next fields */ s8 instr; /* 79 1 */ struct alt_group * alt_group; /* 80 8 */ struct symbol * call_dest; /* 88 8 */ struct instruction * jump_dest; /* 96 8 */ struct instruction * first_jump_src; /* 104 8 */ struct reloc * jump_table; /* 112 8 */ - struct reloc * reloc; /* 120 8 */ + struct alternative * alts; /* 120 8 */ /* --- cacheline 2 boundary (128 bytes) --- */ - struct alternative * alts; /* 128 8 */ - struct symbol * sym; /* 136 8 */ - struct stack_op * stack_ops; /* 144 8 */ - struct cfi_state * cfi; /* 152 8 */ + struct symbol * sym; /* 128 8 */ + struct stack_op * stack_ops; /* 136 8 */ + struct cfi_state * cfi; /* 144 8 */ - /* size: 160, cachelines: 3, members: 29 */ - /* sum members: 158 */ - /* sum bitfield members: 13 bits, bit holes: 1, sum bit holes: 3 bits */ - /* last cacheline: 32 bytes */ + /* size: 152, cachelines: 3, members: 29 */ + /* sum members: 150 */ + /* sum bitfield members: 14 bits, bit holes: 1, sum bit holes: 2 bits */ + /* last cacheline: 24 bytes */ }; pre: 5:48.89 real, 220.96 user, 127.55 sys, 24834672 mem post: 5:39.35 real, 215.58 user, 123.69 sys, 23448736 mem Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Josh Poimboeuf Tested-by: Nathan Chancellor # build only Tested-by: Thomas Weißschuh # compile and run Link: https://lore.kernel.org/r/20230208172245.572145269@infradead.org commit 8b2de412158ecdb312c707918432e6650df808cc Author: Peter Zijlstra Date: Wed Feb 8 18:18:00 2023 +0100 objtool: Shrink instruction::{type,visited} Since we don't have that many types in enum insn_type, force it into a u8 and re-arrange member to get rid of the holes, saves another 8 bytes. struct instruction { struct list_head list; /* 0 16 */ struct hlist_node hash; /* 16 16 */ struct list_head call_node; /* 32 16 */ struct section * sec; /* 48 8 */ long unsigned int offset; /* 56 8 */ /* --- cacheline 1 boundary (64 bytes) --- */ - unsigned int len; /* 64 4 */ - enum insn_type type; /* 68 4 */ - long unsigned int immediate; /* 72 8 */ - u16 dead_end:1; /* 80: 0 2 */ - u16 ignore:1; /* 80: 1 2 */ - u16 ignore_alts:1; /* 80: 2 2 */ - u16 hint:1; /* 80: 3 2 */ - u16 save:1; /* 80: 4 2 */ - u16 restore:1; /* 80: 5 2 */ - u16 retpoline_safe:1; /* 80: 6 2 */ - u16 noendbr:1; /* 80: 7 2 */ - u16 entry:1; /* 80: 8 2 */ + long unsigned int immediate; /* 64 8 */ + unsigned int len; /* 72 4 */ + u8 type; /* 76 1 */ - /* XXX 7 bits hole, try to pack */ + /* Bitfield combined with previous fields */ - s8 instr; /* 82 1 */ - u8 visited; /* 83 1 */ + u16 dead_end:1; /* 76: 8 2 */ + u16 ignore:1; /* 76: 9 2 */ + u16 ignore_alts:1; /* 76:10 2 */ + u16 hint:1; /* 76:11 2 */ + u16 save:1; /* 76:12 2 */ + u16 restore:1; /* 76:13 2 */ + u16 retpoline_safe:1; /* 76:14 2 */ + u16 noendbr:1; /* 76:15 2 */ + u16 entry:1; /* 78: 0 2 */ + u16 visited:4; /* 78: 1 2 */ - /* XXX 4 bytes hole, try to pack */ + /* XXX 3 bits hole, try to pack */ + /* Bitfield combined with next fields */ - struct alt_group * alt_group; /* 88 8 */ - struct symbol * call_dest; /* 96 8 */ - struct instruction * jump_dest; /* 104 8 */ - struct instruction * first_jump_src; /* 112 8 */ - struct reloc * jump_table; /* 120 8 */ + s8 instr; /* 79 1 */ + struct alt_group * alt_group; /* 80 8 */ + struct symbol * call_dest; /* 88 8 */ + struct instruction * jump_dest; /* 96 8 */ + struct instruction * first_jump_src; /* 104 8 */ + struct reloc * jump_table; /* 112 8 */ + struct reloc * reloc; /* 120 8 */ /* --- cacheline 2 boundary (128 bytes) --- */ - struct reloc * reloc; /* 128 8 */ - struct alternative * alts; /* 136 8 */ - struct symbol * sym; /* 144 8 */ - struct stack_op * stack_ops; /* 152 8 */ - struct cfi_state * cfi; /* 160 8 */ + struct alternative * alts; /* 128 8 */ + struct symbol * sym; /* 136 8 */ + struct stack_op * stack_ops; /* 144 8 */ + struct cfi_state * cfi; /* 152 8 */ - /* size: 168, cachelines: 3, members: 29 */ - /* sum members: 162, holes: 1, sum holes: 4 */ - /* sum bitfield members: 9 bits, bit holes: 1, sum bit holes: 7 bits */ - /* last cacheline: 40 bytes */ + /* size: 160, cachelines: 3, members: 29 */ + /* sum members: 158 */ + /* sum bitfield members: 13 bits, bit holes: 1, sum bit holes: 3 bits */ + /* last cacheline: 32 bytes */ }; pre: 5:48.86 real, 220.30 user, 128.34 sys, 24834672 mem post: 5:48.89 real, 220.96 user, 127.55 sys, 24834672 mem Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Josh Poimboeuf Tested-by: Nathan Chancellor # build only Tested-by: Thomas Weißschuh # compile and run Link: https://lore.kernel.org/r/20230208172245.501847188@infradead.org commit d54066546121426ecd7ad01a53ae429c4e37a9d5 Author: Peter Zijlstra Date: Wed Feb 8 18:17:59 2023 +0100 objtool: Make instruction::alts a single-linked list struct instruction { struct list_head list; /* 0 16 */ struct hlist_node hash; /* 16 16 */ struct list_head call_node; /* 32 16 */ struct section * sec; /* 48 8 */ long unsigned int offset; /* 56 8 */ /* --- cacheline 1 boundary (64 bytes) --- */ unsigned int len; /* 64 4 */ enum insn_type type; /* 68 4 */ long unsigned int immediate; /* 72 8 */ u16 dead_end:1; /* 80: 0 2 */ u16 ignore:1; /* 80: 1 2 */ u16 ignore_alts:1; /* 80: 2 2 */ u16 hint:1; /* 80: 3 2 */ u16 save:1; /* 80: 4 2 */ u16 restore:1; /* 80: 5 2 */ u16 retpoline_safe:1; /* 80: 6 2 */ u16 noendbr:1; /* 80: 7 2 */ u16 entry:1; /* 80: 8 2 */ /* XXX 7 bits hole, try to pack */ s8 instr; /* 82 1 */ u8 visited; /* 83 1 */ /* XXX 4 bytes hole, try to pack */ struct alt_group * alt_group; /* 88 8 */ struct symbol * call_dest; /* 96 8 */ struct instruction * jump_dest; /* 104 8 */ struct instruction * first_jump_src; /* 112 8 */ struct reloc * jump_table; /* 120 8 */ /* --- cacheline 2 boundary (128 bytes) --- */ struct reloc * reloc; /* 128 8 */ - struct list_head alts; /* 136 16 */ - struct symbol * sym; /* 152 8 */ - struct stack_op * stack_ops; /* 160 8 */ - struct cfi_state * cfi; /* 168 8 */ + struct alternative * alts; /* 136 8 */ + struct symbol * sym; /* 144 8 */ + struct stack_op * stack_ops; /* 152 8 */ + struct cfi_state * cfi; /* 160 8 */ - /* size: 176, cachelines: 3, members: 29 */ - /* sum members: 170, holes: 1, sum holes: 4 */ + /* size: 168, cachelines: 3, members: 29 */ + /* sum members: 162, holes: 1, sum holes: 4 */ /* sum bitfield members: 9 bits, bit holes: 1, sum bit holes: 7 bits */ - /* last cacheline: 48 bytes */ + /* last cacheline: 40 bytes */ }; pre: 5:58.50 real, 229.64 user, 128.65 sys, 26221520 mem post: 5:48.86 real, 220.30 user, 128.34 sys, 24834672 mem Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Josh Poimboeuf Tested-by: Nathan Chancellor # build only Tested-by: Thomas Weißschuh # compile and run Link: https://lore.kernel.org/r/20230208172245.430556498@infradead.org commit 3ee88df1b063962e39d7798ccc3b18fd10cea813 Author: Peter Zijlstra Date: Wed Feb 8 18:17:58 2023 +0100 objtool: Make instruction::stack_ops a single-linked list struct instruction { struct list_head list; /* 0 16 */ struct hlist_node hash; /* 16 16 */ struct list_head call_node; /* 32 16 */ struct section * sec; /* 48 8 */ long unsigned int offset; /* 56 8 */ /* --- cacheline 1 boundary (64 bytes) --- */ unsigned int len; /* 64 4 */ enum insn_type type; /* 68 4 */ long unsigned int immediate; /* 72 8 */ u16 dead_end:1; /* 80: 0 2 */ u16 ignore:1; /* 80: 1 2 */ u16 ignore_alts:1; /* 80: 2 2 */ u16 hint:1; /* 80: 3 2 */ u16 save:1; /* 80: 4 2 */ u16 restore:1; /* 80: 5 2 */ u16 retpoline_safe:1; /* 80: 6 2 */ u16 noendbr:1; /* 80: 7 2 */ u16 entry:1; /* 80: 8 2 */ /* XXX 7 bits hole, try to pack */ s8 instr; /* 82 1 */ u8 visited; /* 83 1 */ /* XXX 4 bytes hole, try to pack */ struct alt_group * alt_group; /* 88 8 */ struct symbol * call_dest; /* 96 8 */ struct instruction * jump_dest; /* 104 8 */ struct instruction * first_jump_src; /* 112 8 */ struct reloc * jump_table; /* 120 8 */ /* --- cacheline 2 boundary (128 bytes) --- */ struct reloc * reloc; /* 128 8 */ struct list_head alts; /* 136 16 */ struct symbol * sym; /* 152 8 */ - struct list_head stack_ops; /* 160 16 */ - struct cfi_state * cfi; /* 176 8 */ + struct stack_op * stack_ops; /* 160 8 */ + struct cfi_state * cfi; /* 168 8 */ - /* size: 184, cachelines: 3, members: 29 */ - /* sum members: 178, holes: 1, sum holes: 4 */ + /* size: 176, cachelines: 3, members: 29 */ + /* sum members: 170, holes: 1, sum holes: 4 */ /* sum bitfield members: 9 bits, bit holes: 1, sum bit holes: 7 bits */ - /* last cacheline: 56 bytes */ + /* last cacheline: 48 bytes */ }; pre: 5:58.22 real, 226.69 user, 131.22 sys, 26221520 mem post: 5:58.50 real, 229.64 user, 128.65 sys, 26221520 mem Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Josh Poimboeuf Tested-by: Nathan Chancellor # build only Tested-by: Thomas Weißschuh # compile and run Link: https://lore.kernel.org/r/20230208172245.362196959@infradead.org commit 20a554638dd2665a88d3d68a68f7981480a27f36 Author: Peter Zijlstra Date: Wed Feb 8 18:17:57 2023 +0100 objtool: Change arch_decode_instruction() signature In preparation to changing struct instruction around a bit, avoid passing it's members by pointer and instead pass the whole thing. A cleanup in it's own right too. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Josh Poimboeuf Tested-by: Nathan Chancellor # build only Tested-by: Thomas Weißschuh # compile and run Link: https://lore.kernel.org/r/20230208172245.291087549@infradead.org commit 585a78c1f77be305b1f6adad392f16047fb66ffd Merge: 37064583f63ec 69308402ca6f5 Author: Ingo Molnar Date: Thu Feb 23 09:16:39 2023 +0100 Merge branch 'linus' into objtool/core, to pick up Xen dependencies Pick up dependencies - freshly merged upstream via xen-next - before applying dependent objtool changes. Signed-off-by: Ingo Molnar commit 99a7bcafbd0d04555074554573019096a8c10450 Author: Krister Johansen Date: Wed Feb 22 09:54:56 2023 -0800 x86/xen/time: cleanup xen_tsc_safe_clocksource Modifies xen_tsc_safe_clocksource() to use newly defined constants from arch/x86/include/asm/xen/cpuid.h. This replaces a numeric value with XEN_CPUID_TSC_MODE_NEVER_EMULATE, and deletes a comment that is now self explanatory. There should be no change in the function's behavior. Signed-off-by: Krister Johansen Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/a69ca370fecf85d312d2db633d9438ace2af6e5b.1677038165.git.kjlx@templeofstupid.com Signed-off-by: Juergen Gross commit 5f6e839ebc951c50f1ca06791d016c256f0285a9 Author: Krister Johansen Date: Wed Feb 22 09:54:42 2023 -0800 xen: update arch/x86/include/asm/xen/cpuid.h Update arch/x86/include/asm/xen/cpuid.h from the Xen tree to get newest definitions. This picks up some TSC mode definitions and comment formatting changes. Signed-off-by: Krister Johansen Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/94b9046dd0db3794f0633d134b7108508957758d.1677038165.git.kjlx@templeofstupid.com Signed-off-by: Juergen Gross commit 0b93efca3659f6d55ed31cff6722dca5f6e4d6e2 Author: Randy Dunlap Date: Tue Feb 14 20:45:33 2023 -0800 drm/i915: move a Kconfig symbol to unbreak the menu presentation Inserting a Kconfig symbol that does not have a dependency (DRM_I915_GVT) into a list of other symbols that do have a dependency (on DRM_I915) breaks the driver menu presentation in 'make *config'. Relocate the DRM_I915_GVT symbol so that it does not cause this problem. Fixes: 8b750bf74418 ("drm/i915/gvt: move the gvt code into kvmgt.ko") Signed-off-by: Randy Dunlap Cc: Christoph Hellwig Cc: Zhi Wang Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: Zhenyu Wang Cc: intel-gfx@lists.freedesktop.org Cc: intel-gvt-dev@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Christoph Hellwig Acked-by: Zhenyu Wang Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20230215044533.4847-1-rdunlap@infradead.org commit 9203a648c951af31b11823056c18b7981135524d Author: Colin Ian King Date: Thu Feb 2 12:50:18 2023 +0000 i915/gvt: Fix spelling mistake "vender" -> "vendor" There is a spelling mistake in a literal string. Fix it. Signed-off-by: Colin Ian King Acked-by: Zhenyu Wang Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20230202125018.285523-1-colin.i.king@gmail.com commit d989bf543d8aea77c90a3eb8d2e30f9304570810 Author: Greg Kroah-Hartman Date: Thu Feb 2 15:13:09 2023 +0100 i915: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Cc: Zhenyu Wang Cc: Zhi Wang Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: David Airlie Cc: Daniel Vetter Cc: intel-gvt-dev@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Greg Kroah-Hartman Reviewed-by: Rodrigo Vivi Reviewed-by: Zhenyu Wang Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20230202141309.2293834-1-gregkh@linuxfoundation.org commit dd62071ff792cd4c2134b1211ba85efc6cd73ce3 Author: Deepak R Varma Date: Sat Jan 14 21:12:39 2023 +0530 drm/i915/gvt: Remove extra semicolon Remove the extra semicolon at end. Issue identified using semicolon.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/Y8LNbzgTf/1kYJX/@ubun2204.myguest.virtualbox.org Reviewed-by: Zhenyu Wang commit 84edc94edb25caf8bcd5f4744bf24b82c6b805df Author: Deepak R Varma Date: Thu Jan 19 01:53:07 2023 +0530 drm/i915/gvt: Avoid full proxy f_ops for debugfs attributes Using DEFINE_SIMPLE_ATTRIBUTE macro with the debugfs_create_file() function adds the overhead of introducing a proxy file operation functions to wrap the original read/write inside file removal protection functions. This adds significant overhead in terms of introducing and managing the proxy factory file operations structure and function wrapping at runtime. As a replacement, a combination of DEFINE_DEBUGFS_ATTRIBUTE macro paired with debugfs_create_file_unsafe() is suggested to be used instead. The DEFINE_DEBUGFS_ATTRIBUTE utilises debugfs_file_get() and debugfs_file_put() wrappers to protect the original read and write function calls for the debug attributes. There is no need for any runtime proxy file operations to be managed by the debugfs core. Following coccicheck make command helped identify this change: make coccicheck M=drivers/gpu/drm/i915/ MODE=patch COCCI=./scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci Signed-off-by: Deepak R Varma Reviewed-by: Rodrigo Vivi Acked-by: Zhenyu Wang Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/Y8hVK6wuqm50iADP@ubun2204.myguest.virtualbox.org commit fd2a55e74a991ae5ff531c9da52963277dc7fbd5 Merge: 67d93ffc0f3c4 0af8c09c89681 Author: Jakub Kicinski Date: Wed Feb 22 21:25:23 2023 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net 1) Fix broken listing of set elements when table has an owner. 2) Fix conntrack refcount leak in ctnetlink with related conntrack entries, from Hangyu Hua. 3) Fix use-after-free/double-free in ctnetlink conntrack insert path, from Florian Westphal. 4) Fix ip6t_rpfilter with VRF, from Phil Sutter. 5) Fix use-after-free in ebtables reported by syzbot, also from Florian. 6) Use skb->len in xt_length to deal with IPv6 jumbo packets, from Xin Long. 7) Fix NETLINK_LISTEN_ALL_NSID with ctnetlink, from Florian Westphal. 8) Fix memleak in {ip_,ip6_,arp_}tables in ENOMEM error case, from Pavel Tikhomirov. * git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: x_tables: fix percpu counter block leak on error path when creating new netns netfilter: ctnetlink: make event listener tracking global netfilter: xt_length: use skb len to match in length_mt6 netfilter: ebtables: fix table blob use-after-free netfilter: ip6t_rpfilter: Fix regression with VRF interfaces netfilter: conntrack: fix rmmod double-free race netfilter: ctnetlink: fix possible refcount leak in ctnetlink_create_conntrack() netfilter: nf_tables: allow to fetch set elements when table has an owner ==================== Link: https://lore.kernel.org/r/20230222092137.88637-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit 67d93ffc0f3c47094750bde6d62e7c5765dc47a6 Author: Íñigo Huguet Date: Tue Feb 21 14:06:16 2023 +0100 ptp: vclock: use mutex to fix "sleep on atomic" bug vclocks were using spinlocks to protect access to its timecounter and cyclecounter. Access to timecounter/cyclecounter is backed by the same driver callbacks that are used for non-virtual PHCs, but the usage of the spinlock imposes a new limitation that didn't exist previously: now they're called in atomic context so they mustn't sleep. Some drivers like sfc or ice may sleep on these callbacks, causing errors like "BUG: scheduling while atomic: ptp5/25223/0x00000002" Fix it replacing the vclock's spinlock by a mutex. It fix the mentioned bug and it doesn't introduce longer delays. I've tested synchronizing various different combinations of clocks: - vclock->sysclock - sysclock->vclock - vclock->vclock - hardware PHC in different NIC -> vclock - created 4 vclocks and launch 4 parallel phc2sys processes with lockdep enabled In all cases, comparing the delays reported by phc2sys, they are in the same range of values than before applying the patch. Link: https://lore.kernel.org/netdev/69d0ff33-bd32-6aa5-d36c-fbdc3c01337c@redhat.com/ Fixes: 5d43f951b1ac ("ptp: add ptp virtual clock driver framework") Reported-by: Yalin Li Suggested-by: Richard Cochran Tested-by: Miroslav Lichvar Signed-off-by: Íñigo Huguet Acked-by: Richard Cochran Link: https://lore.kernel.org/r/20230221130616.21837-1-ihuguet@redhat.com Signed-off-by: Jakub Kicinski commit 9f6ad5d533d1c71e51bdd06a5712c4fbc8768dfa Author: Zhong Jinghua Date: Tue Feb 21 17:50:27 2023 +0800 loop: loop_set_status_from_info() check before assignment In loop_set_status_from_info(), lo->lo_offset and lo->lo_sizelimit should be checked before reassignment, because if an overflow error occurs, the original correct value will be changed to the wrong value, and it will not be changed back. More, the original patch did not solve the problem, the value was set and ioctl returned an error, but the subsequent io used the value in the loop driver, which still caused an alarm: loop_handle_cmd do_req_filebacked loff_t pos = ((loff_t) blk_rq_pos(rq) << 9) + lo->lo_offset; lo_rw_aio cmd->iocb.ki_pos = pos Fixes: c490a0b5a4f3 ("loop: Check for overflow while configuring loop") Signed-off-by: Zhong Jinghua Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20230221095027.3656193-1-zhongjinghua@huaweicloud.com Signed-off-by: Jens Axboe commit a5c95ca18a98d742d0a4a04063c32556b5b66378 Merge: 307e14c039063 a48bba98380cb Author: Linus Torvalds Date: Wed Feb 22 18:28:03 2023 -0800 Merge tag 'drm-next-2023-02-23' of git://anongit.freedesktop.org/drm/drm Pull drm updates from Dave Airlie: "There are a bunch of changes all over in the usual places. Highlights: - habanalabs moves from misc to accel - first accel driver for Intel VPU (Versatile Processing Unit) inference engine - dropped all the ancient legacy DRI1 drivers. I think it's been at least 10 years since anyone has heard about these. - Intel DG2 updates and prelim Meteorlake enablement - etnaviv adds support for Versilicon NPU device (a GPU like engine with inference accelerators) Detailed summary: Removals: - remove legacy dri1 drivers: i810, mga, r128, savage, sis, tdfx, via New driver: - intel VPU accelerator driver - habanalabs comes via drm tree now drm/core: - use drm_dbg_ helpers in several places - Document defaults for CRTC backgrounds - Document use of drm_minor edid: - improve mode parsing and refactoring connector: - support analog TV mode property media: - add some common formats udmabuf: - add vmap/vunmap methods fourcc: - add XRGB1555 and RGB565 formats - document open source user waiver firmware: - fix color-format selection for system framebuffer format-helper: - Add conversion from XRGB8888 to various sysfb formats - Make XRGB8888 the only driver-emulated legacy format - Add conversion from XRGB8888 to XBGR8888 and ABGR8888 fb-helper: - fix preferred depth and bpp values across drivers - Avoid blank consoles from selecting an incorrect color format probe-helper: - Enable/disable HPD on connectors scheduler: - Fix lockup in drm_sched_entity_kill() - Deprecate drm_sched_resubmit_jobs() bridge: - remove unused functions - implement i2c probe_new in various drivers - ite-it6505: Locking fixes, Cache EDID data - ite-it66121: Support IT6610 chip - lontium-tl9611: Fix HDMI on DragonBoard 845c - parade-ps8640: Use atomic bridge functions - Support i.MX93 LDB plus DT bindings debugfs: - add per device helpers and convert drivers displayport: - mst fixes - add DP adaptive sync DPCD definitions fbdev: - always pick 32bpp as default - remove some unused code simpledrm: - support system memory framebuffers panel: - add orientation quirks for Lenovo Yoga Tab 3 X90F and DynaBook K50 - Use ktime_get_boottime() to measure power-down delay - Fix auto-suspend delay - Visionox VTDR6130 AMOLED DSI - Support Himax HX8394 - Convert many drivers to common generic DSI write-sequence helper - AUO A030JTN01 ttm: - drop bo wait wrapper - fix MIPS build habanalabs: - moved driver to accel subsystem - gaudi2 decoder error improvement - more trace events - Gaudi2 abrupt reset by firmware support - add uAPI to flush memory transactions - add uAPI to pass through userspace reqs to fw - remove dma-buf export by handle amdgpu: - add new INFO queries for peak and min sclk/mclk for profile modes - Add PCIe info to the INFO IOCTL - secure display support for multiple displays - DML optimizations - DCN 3.2 updates - PSR updates - DP 2.1 updates - SR-IOV RAS updates - VCN RAS support - SMU 13.x updates - Switch 1 element arrays to flexible arrays - Add RAS support for DF 4.3 - Stack size improvements - S0ix rework - Allow 0 as a vram limit on APUs - Handle profiling modes for SMU13.x - Fix possible segfault in failure case - Rework FW requests to happen in early_init for all IPs so that we don't lose the sbios console if FW is missing - Fix power reporting on certain firmwares for CZN/RN - Allow S0ix without BIOS support - Enable freesync over PCon - Re-enable the AGP aperture on GMC 11.x amdkfd: - Error handling fixes - PASID fixes - Fix for cleared VRAM BOs - Fix cleanup if GPUVM creation fails - Memory accounting fix - Use resource_size rather than open codeing it - GC11 mGPU fix radeon: - Switch 1 element arrays to flexible arrays - Fix memory leak on shutdown - move to new logging i915: - Meteorlake display/OA/GSC fw/workarounds enabling - DP MST DSC support - Gamma/degamma readout support for the state checker - Enable SDP split support for DP 2.0 - Add probe blocking support to i915.force_probe parameter - Enable Xe HP 4tile support - Avoid display direct calls to uncore - Fix HuC delayed load memory leaks - Add DG2 workarounds Wa_18018764978 and Wa_18019271663 - Improve suspend / resume times with VT-d scanout workaround active - Fix DG2 visual corruption on small BAR systems by not forgetting to copy CCS aux state - Fix TLB invalidation for Gen12.50 video and compute engines - Enable HF-EEODB by switching HDMI, DP and LVDS to use struct drm_edid - Start using unversioned DMC firmware paths for new platforms - ELD refactor: Stop using hardware buffer, precompute ELD - lots of display code refactoring nouveau: - drop legacy ioctl support - replace 0-sized array msm: - dpu/dsi/mdss: Support for SM8350, SM8450 SM8550 and SC8280XP platform - Added bindings for SM8150 - dpu: Partial support for DSC on SM8150 and SM8250 - dpu: Fixed color transformation matrix being lost on suspend/resume - dp: Support SDM845 and SC8280XP platforms - dp: Support for limiting DP link rate via DT property - dsi: Validate display modes according to the DSI OPP table - dsi: DSI PHY support for the SM6375 platform - Add MSM_SUBMIT_BO_NO_IMPLICI - a2xx: Support to load legacy firmware - a6xx: GPU devcore dump updates for a650/a660 - GPU devfreq tuning and fixes - Turn 8960 HDMI PHY into clock provider, - Make 8960 HDMI PHY use PXO clock from DT etnaviv: - experimental versilicon NPU support - report GPU load via fdinfo format - MMU fault message improvements tegra: - rework syncpoint interrupt mediatek: - DSI timing fix - fix config deps ast: - various fixes exynos: - restore bridge chain order fixes gud: - convert to shadow plane buffers - perform flushing synchronously during atomic update - Use new debugfs helpers arm/hdlcd: - Use new debugfs helper ili9486: - Support 16-bit pixel data imx: - Split off IPUv3 driver mipi-dbi: - convert to DRM shadow-plane helpers - rsp driver changes - Support separate I/O-voltage supply mxsfb: - Depend on ARCH_MXS or ARCH_MXC sun4i: - convert to new TV mode property vc4: - convert to new TV mode property - kunit tests - Support RGB565 and RGB666 formats - convert dsi driver to bridge - Various HVS an CRTC fixes v3d: - Do not opencode drm_gem_object_lookup() virtio: - improve tracing vkms: - support small cursors in IGT tests - Fix SEGFAULT from incorrect GEM-buffer mapping rcar-du: - fixes and improvements" * tag 'drm-next-2023-02-23' of git://anongit.freedesktop.org/drm/drm: (1455 commits) msm/fbdev: fix unused variable warning with clang. drm/fb-helper: Remove drm_fb_helper_unprepare() from drm_fb_helper_fini() dma-buf: make kobj_type structure constant drm/shmem-helper: Fix locking for drm_gem_shmem_get_pages_sgt() drm/amd/display: disable SubVP + DRR to prevent underflow drm/amd/display: Fail atomic_check early on normalize_zpos error drm/amd/pm: avoid unaligned access warnings drm/amd/display: avoid unaligned access warnings drm/amd/display: Remove duplicate/repeating expressions drm/amd/display: Remove duplicate/repeating expression drm/amd/display: Make variables declaration inside ifdef guard drm/amd/display: Fix excess arguments on kernel-doc drm/amd/display: Add previously missing includes drm/amd/amdgpu: Add function prototypes to headers drm/amd/display: Add function prototypes to headers drm/amd/display: Turn global functions into static drm/amd/display: remove unused _calculate_degamma_curve function drm/amd/display: remove unused func declaration from resource headers drm/amd/display: unset initial value for tf since it's never used drm/amd/display: camel case cleanup in color_gamma file ... commit 90039f3773f688922ca267c3e925f61ad6f28e22 Author: Stephen Boyd Date: Wed Feb 22 17:36:42 2023 -0800 clk: qcom: apcs-msm8986: Include bitfield.h for FIELD_PREP Otherwise some configurations fail. Fixes: 027726365906 ("clk: qcom: add the driver for the MSM8996 APCS clocks") Link: https://lore.kernel.org/r/20230223013847.1218900-1-sboyd@kernel.org Signed-off-by: Stephen Boyd commit 307e14c039063f0c9bd7a18a7add8f940580dcc9 Merge: d8ca6dbb8de79 fdbf807215250 Author: Linus Torvalds Date: Wed Feb 22 17:12:44 2023 -0800 Merge tag '6.3-rc-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs client updates from Steve French: "The largest subset of this is from David Howells et al: making the cifs/smb3 driver pass iov_iters down to the lowest layers, directly to the network transport rather than passing lists of pages around, helping multiple areas: - Pin user pages, thereby fixing the race between concurrent DIO read and fork, where the pages containing the DIO read buffer may end up belonging to the child process and not the parent - with the result that the parent might not see the retrieved data. - cifs shouldn't take refs on pages extracted from non-user-backed iterators (eg. KVEC). With these changes, cifs will apply the appropriate cleanup. - Making it easier to transition to using folios in cifs rather than pages by dealing with them through BVEC and XARRAY iterators. - Allowing cifs to use the new splice function The remainder are: - fixes for stable, including various fixes for uninitialized memory, wrong length field causing mount issue to very old servers, important directory lease fixes and reconnect fixes - cleanups (unused code removal, change one element array usage, and a change form strtobool to kstrtobool, and Kconfig cleanups) - SMBDIRECT (RDMA) fixes including iov_iter integration and UAF fixes - reconnect fixes - multichannel fixes, including improving channel allocation (to least used channel) - remove the last use of lock_page_killable by moving to folio_lock_killable" * tag '6.3-rc-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: (46 commits) update internal module version number for cifs.ko cifs: update ip_addr for ses only for primary chan setup cifs: use tcon allocation functions even for dummy tcon cifs: use the least loaded channel for sending requests cifs: DIO to/from KVEC-type iterators should now work cifs: Remove unused code cifs: Build the RDMA SGE list directly from an iterator cifs: Change the I/O paths to use an iterator rather than a page list cifs: Add a function to read into an iter from a socket cifs: Add some helper functions cifs: Add a function to Hash the contents of an iterator cifs: Add a function to build an RDMA SGE list from an iterator netfs: Add a function to extract an iterator into a scatterlist netfs: Add a function to extract a UBUF or IOVEC into a BVEC iterator cifs: Implement splice_read to pass down ITER_BVEC not ITER_PIPE splice: Export filemap/direct_splice_read() iov_iter: Add a function to extract a page list from an iterator iov_iter: Define flags to qualify page extraction. splice: Add a func to do a splice from an O_DIRECT file without ITER_PIPE splice: Add a func to do a splice from a buffered file without ITER_PIPE ... commit 5270c7a244b457357441281e609c741cbec8ead7 Merge: 1b929c02afd37 c1855dd0a62b7 Author: Stephen Boyd Date: Wed Feb 22 16:32:15 2023 -0800 Merge tag 'qcom-clk-for-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into clk-qcom Pull Qualcomm clk driver updates from Bjorn Andersson: Support for requesting the next power_off operation for a genpd to be synchronous is introduced, and implemented in the GDSC driver. To allow the GPU driver to request power_off to wait for the GDSC to actually collapse. Support for QDU1000/QRU1000 Global clock controller, SA8775P Global clock controller, SM8550 TCSR and display clock controller, SM6350 clock controller, nd MSM8996 CBF and APCS clock controllers is introduced. Parent references are updated across a large number of clock drivers, to align with the design changes since those drivers where introduced. Similarly, test clocks has been dropped from a range of drivers. A range of fixes for the MSM8996 CPU clock controller is introduced. MSM8974 GCC is transitioned off the externally defined sleep_clk. GDSC in the global clock controller for QCS404 is added, and various parent definitions are cleaned up. The SDCC core clocks on SM6115 are moved for floor_ops. Programming of clk_dis_wait for GPU CX GDSC on SC7180 and SDM845 are moved to use the recently introduced properties in the GDSC struct. The RPMh clock driver gains SM8550 and SA8775P clocks, and the IPA clock is added on a variety of platforms. The SMD RPM driver receives a big cleanup, in particular a move away from duplicating declaration of identical clocks between multiple platforms. A few missing clocks across msm8998, msm8992, msm8916, qcs404 are added as well. Using devm_pm_runtime_enable() to clean up some duplication is done across SM8250 display and video clock controllers, SM8450 display clock controller and SC7280 LPASS clock controller. Devicetree binding changes for above mentioned additions and changes are introduced. Support for postponing clk_disable_unused() until sync_state was introduced, but later reverted again, awaiting an agreement on the solution. Lastly, a change to pad a few registers in the SM8250 DTS to 8 digits was picked up in the wrong tree and kept here, to avoid rebasing. * tag 'qcom-clk-for-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (142 commits) clk: qcom: Revert sync_state based clk_disable_unused dt-bindings: clock: Merge qcom,gpucc-sm8350 into qcom,gpucc.yaml clk: qcom: gpucc-sdm845: fix clk_dis_wait being programmed for CX GDSC clk: qcom: gpucc-sc7180: fix clk_dis_wait being programmed for CX GDSC dt-bindings: clock: qcom,sa8775p-gcc: add the power-domains property clk: qcom: cpu-8996: add missing cputype include clk: qcom: gcc-sa8775p: remove unused variables clk: qcom: smd-rpm: provide RPM_SMD_XO_CLK_SRC on MSM8996 platform clk: qcom: add msm8996 Core Bus Framework (CBF) support dt-bindings: clock: qcom,msm8996-cbf: Describe the MSM8996 CBF clock controller clk: qcom: add the driver for the MSM8996 APCS clocks clk: qcom: gcc-qcs404: fix duplicate initializer warning clk: qcom: cpu-8996: change setup sequence to follow vendor kernel clk: qcom: cpu-8996: fix PLL clock ops clk: qcom: cpu-8996: fix ACD initialization clk: qcom: cpu-8996: fix PLL configuration sequence clk: qcom: cpu-8996: move qcom_cpu_clk_msm8996_acd_init call clk: qcom: cpu-8996: setup PLLs before registering clocks clk: qcom: cpu-8996: simplify the cpu_clk_notifier_cb clk: qcom: cpu-8996: skip ACD init if the setup is valid ... commit a48bba98380cb0b43dcd01d276c7efc282e3c33f Author: Dave Airlie Date: Thu Feb 23 09:47:29 2023 +1000 msm/fbdev: fix unused variable warning with clang. clang builds showed this: drivers/gpu/drm/msm/msm_fbdev.c:144:6: error: variable 'helper' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (!fbdev) ^~~~~~ Fixes: 3fb1f62f80a1 ("drm/fb-helper: Remove drm_fb_helper_unprepare() from drm_fb_helper_fini()") Signed-off-by: Dave Airlie commit 13daf536191e8c484fa21de8fcac4767f7b66e80 Merge: 5582f3c1b14e9 3fb1f62f80a1d Author: Dave Airlie Date: Thu Feb 23 09:32:10 2023 +1000 Merge tag 'drm-misc-next-fixes-2023-02-21' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Short summary of fixes pull: Fixes GEM SHMEM locking and generic fbdev hotplugging. Constifies dma_buf kobj type. Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/Y/S6tu3gdQ0VizR+@linux-uq9g commit d8ca6dbb8de7923fcfb18e0b0b123f37c3225519 Merge: 9fc2f99030b55 1683ed16ff1a5 Author: Linus Torvalds Date: Wed Feb 22 14:47:20 2023 -0800 Merge tag 'nfs-for-6.3-1' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client updates from Anna Schumaker: "New Features: - Convert the read and write paths to use folios Bugfixes and Cleanups: - Fix tracepoint state manager flag printing - Fix disabling swap files - Fix NFSv4 client identifier sysfs path in the documentation - Don't clear NFS_CAP_COPY if server returns NFS4ERR_OFFLOAD_DENIED - Treat GETDEVICEINFO errors as a layout failure - Replace kmap_atomic() calls with kmap_local_page() - Constify sunrpc sysfs kobj_type structures" * tag 'nfs-for-6.3-1' of git://git.linux-nfs.org/projects/anna/linux-nfs: (25 commits) fs/nfs: Replace kmap_atomic() with kmap_local_page() in dir.c pNFS/filelayout: treat GETDEVICEINFO errors as layout failure Documentation: Fix sysfs path for the NFSv4 client identifier nfs42: do not fail with EIO if ssc returns NFS4ERR_OFFLOAD_DENIED NFS: fix disabling of swap SUNRPC: make kobj_type structures constant nfs4trace: fix state manager flag printing NFS: Remove unnecessary check in nfs_read_folio() NFS: Improve tracing of nfs_wb_folio() NFS: Enable tracing of nfs_invalidate_folio() and nfs_launder_folio() NFS: fix up nfs_release_folio() to try to release the page NFS: Clean up O_DIRECT request allocation NFS: Fix up nfs_vm_page_mkwrite() for folios NFS: Convert nfs_write_begin/end to use folios NFS: Remove unused function nfs_wb_page() NFS: Convert buffered writes to use folios NFS: Convert the function nfs_wb_page() to use folios NFS: Convert buffered reads to use folios NFS: Add a helper nfs_wb_folio() NFS: Convert the remaining pagelist helper functions to support folios ... commit 9fc2f99030b55027d84723b0dcbbe9f7e21b9c6c Merge: 25ac8c12ff788 4b471a8b847b8 Author: Linus Torvalds Date: Wed Feb 22 14:21:40 2023 -0800 Merge tag 'nfsd-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd updates from Chuck Lever: "Two significant security enhancements are part of this release: - NFSD's RPC header encoding and decoding, including RPCSEC GSS and gssproxy header parsing, has been overhauled to make it more memory-safe. - Support for Kerberos AES-SHA2-based encryption types has been added for both the NFS client and server. This provides a clean path for deprecating and removing insecure encryption types based on DES and SHA-1. AES-SHA2 is also FIPS-140 compliant, so that NFS with Kerberos may now be used on systems with fips enabled. In addition to these, NFSD is now able to handle crossing into an auto-mounted mount point on an exported NFS mount. A number of fixes have been made to NFSD's server-side copy implementation. RPC metrics have been converted to per-CPU variables. This helps reduce unnecessary cross-CPU and cross-node memory bus traffic, and significantly reduces noise when KCSAN is enabled" * tag 'nfsd-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: (121 commits) NFSD: Clean up nfsd_symlink() NFSD: copy the whole verifier in nfsd_copy_write_verifier nfsd: don't fsync nfsd_files on last close SUNRPC: Fix occasional warning when destroying gss_krb5_enctypes nfsd: fix courtesy client with deny mode handling in nfs4_upgrade_open NFSD: fix problems with cleanup on errors in nfsd4_copy nfsd: fix race to check ls_layouts nfsd: don't hand out delegation on setuid files being opened for write SUNRPC: Remove ->xpo_secure_port() SUNRPC: Clean up the svc_xprt_flags() macro nfsd: remove fs/nfsd/fault_inject.c NFSD: fix leaked reference count of nfsd4_ssc_umount_item nfsd: clean up potential nfsd_file refcount leaks in COPY codepath nfsd: zero out pointers after putting nfsd_files on COPY setup error SUNRPC: Fix whitespace damage in svcauth_unix.c nfsd: eliminate __nfs4_get_fd nfsd: add some kerneldoc comments for stateid preprocessing functions nfsd: eliminate find_deleg_file_locked nfsd: don't take nfsd4_copy ref for OP_OFFLOAD_STATUS SUNRPC: Add encryption self-tests ... commit 25ac8c12ff7886e3d9b99feb85c53302a3cc5556 Merge: 232dd599068ff d3ca9f7aeba79 Author: Linus Torvalds Date: Wed Feb 22 14:17:27 2023 -0800 Merge tag '6.3-rc-ksmbd-fixes' of git://git.samba.org/ksmbd Pull ksmbd server updates from Steve French: - Fix for memory leak - Two important fixes for frame length checks (which are also now stricter) - four minor cleanup fixes - Fix to clarify ksmbd/Kconfig to indent properl - Conversion of the channel list and rpc handle list to xarrays * tag '6.3-rc-ksmbd-fixes' of git://git.samba.org/ksmbd: ksmbd: fix possible memory leak in smb2_lock() ksmbd: do not allow the actual frame length to be smaller than the rfc1002 length ksmbd: fix wrong data area length for smb2 lock request ksmbd: Fix parameter name and comment mismatch ksmbd: Fix spelling mistake "excceed" -> "exceeded" ksmbd: update Kconfig to note Kerberos support and fix indentation ksmbd: Remove duplicated codes ksmbd: fix typo, syncronous->synchronous ksmbd: Implements sess->rpc_handle_list as xarray ksmbd: Implements sess->ksmbd_chann_list as xarray commit 232dd599068ff228a29a4a1a6ab81e6b55198bb0 Merge: b7ee88128242b 2b188a2cfc4d8 Author: Linus Torvalds Date: Wed Feb 22 14:11:54 2023 -0800 Merge tag 'zonefs-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs Pull zonefs updates from Damien Le Moal: - Reorganize zonefs code to split file related operations to a new fs/zonefs/file.c file (me) - Modify zonefs to use dynamically allocated inodes and dentries (using the inode and dentry caches) instead of statically allocating everything on mount. This saves a significant amount of memory for very large zoned block devices with 10s of thousands of zones (me) - Make zonefs_sb_ktype a const struct kobj_type (Thomas) * tag 'zonefs-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs: zonefs: make kobj_type structure constant zonefs: Cache zone group directory inodes zonefs: Dynamically create file inodes when needed zonefs: Separate zone information from inode information zonefs: Reduce struct zonefs_inode_info size zonefs: Simplify IO error handling zonefs: Reorganize code commit b7ee88128242b3460b0016a7e42207c9799f73b7 Merge: 28e335208ce90 c1b0c3cfcbad2 Author: Linus Torvalds Date: Wed Feb 22 14:00:53 2023 -0800 Merge tag 'gfs2-v6.2-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 updates from Andreas Gruenbacher: - Fix a race when disassociating inodes from their glocks after iget_failed() - On filesystems with a block size smaller than the page size, make sure that ->writepages() writes out all buffers of journaled inodes - Various improvements to the way the delete workqueue is drained to speed up unmount and prevent leftover inodes. At unmount time, evict deleted inodes cooperatively across the cluster to avoid unnecessary timeouts - Various minor cleanups and fixes * tag 'gfs2-v6.2-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Convert gfs2_page_add_databufs to folios gfs2: jdata writepage fix gfs2: Improve gfs2_make_fs_rw error handling Revert "GFS2: free disk inode which is deleted by remote node -V2" gfs2: Evict inodes cooperatively gfs2: Flush delete work before shrinking inode cache gfs2: Cease delete work during unmount gfs2: Add SDF_DEACTIVATING super block flag gfs2: check gl_object in rgrp glops gfs2: Split the two kinds of glock "delete" work gfs2: Move delete workqueue into super block gfs2: Get rid of GLF_PENDING_DELETE flag gfs2: Make glock lru list scanning safer gfs2: Clean up gfs2_scan_glock_lru gfs2: Improve gfs2_upgrade_iopen_glock comment gfs2: gl_object races fix commit 28e335208ce90c2cca9990543983b97ccc66f302 Merge: d151e8bea1509 dd07bb8b6baf2 Author: Linus Torvalds Date: Wed Feb 22 13:55:51 2023 -0800 Merge tag 'xfs-6.3-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs updates from Darrick Wong: "There's a couple of bug fixes, some cleanups for inconsistent variable names and reduction of struct boxing and unboxing in the logging code. More work is pending, which will begin reworking allocation group lifetimes and finally replace confusing indirect calls to the allocator with actual ... function calls. But I want to let that experience another week of testing. Summary: - Eliminate repeated boxing and unboxing of log item parameters - Clean up some confusing variable names in the log item code - Fix a deadlock when doing unwritten extent conversion that causes a bmbt split when there are sustained memory shortages and the worker pool runs out of worker threads - Fix the panic_mask debug knob not being able to trigger on verifier errors - Constify kobj_type objects" * tag 'xfs-6.3-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: revert commit 8954c44ff477 xfs: make kobj_type structures constant xfs: allow setting full range of panic tags xfs: don't use BMBT btree split workers for IO completion xfs: fix confusing variable names in xfs_refcount_item.c xfs: pass refcount intent directly through the log intent code xfs: fix confusing variable names in xfs_rmap_item.c xfs: pass rmap space mapping directly through the log intent code xfs: fix confusing xfs_extent_item variable names xfs: pass xfs_extent_free_item directly through the log intent code xfs: fix confusing variable names in xfs_bmap_item.c xfs: pass the xfs_bmbt_irec directly through the log intent code xfs: use strscpy() to instead of strncpy() commit d151e8bea1509a6f72a8929882d9ecb66e936b09 Merge: 8762069330316 471859f57d425 Author: Linus Torvalds Date: Wed Feb 22 13:50:13 2023 -0800 Merge tag 'iomap-6.3-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull iomap updates from Darrick Wong: "This is mostly rearranging things to make life easier for gfs2, nothing all that mindblowing for this release. - Change when the iomap page_done function is called so that we still have a locked folio in the success case. This fixes a writeback race in gfs2 - Change when the iomap page_prepare function is called so that gfs2 can recover from OOM scenarios more gracefully - Rename the iomap page_ops to folio_ops, since they operate on folios now" * tag 'iomap-6.3-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: iomap: Rename page_ops to folio_ops iomap: Rename page_prepare handler to get_folio iomap: Add __iomap_get_folio helper iomap/gfs2: Get page in page_prepare handler iomap: Add iomap_get_folio helper iomap: Rename page_done handler to put_folio iomap/gfs2: Unlock and put folio in page_done handler iomap: Add __iomap_put_folio helper commit 8762069330316392331e693befd8a5b632833618 Merge: 6861eaf79155f 833f7d4819a88 Author: Linus Torvalds Date: Wed Feb 22 13:41:41 2023 -0800 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI updates from James Bottomley: "Updates to the usual drivers (ufs, lpfc, qla2xxx, libsas). The major core change is a rework to remove the two helpers around scsi_execute_cmd and use it as the only submission interface along with other minor fixes and updates" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (142 commits) scsi: ufs: core: Fix an error handling path in ufshcd_read_desc_param() scsi: ufs: core: Fix device management cmd timeout flow scsi: aic94xx: Add missing check for dma_map_single() scsi: smartpqi: Replace one-element array with flexible-array member scsi: mpt3sas: Fix a memory leak scsi: qla2xxx: Remove the unused variable wwn scsi: ufs: core: Fix kernel-doc syntax scsi: ufs: core: Add hibernation callbacks scsi: snic: Fix memory leak with using debugfs_lookup() scsi: ufs: core: Limit DMA alignment check scsi: Documentation: Correct spelling scsi: Documentation: Correct spelling scsi: target: Documentation: Correct spelling scsi: aacraid: Allocate cmd_priv with scsicmd scsi: ufs: qcom: dt-bindings: Add SM8550 compatible string scsi: ufs: ufs-qcom: Clear qunipro_g4_sel for HW version major 5 scsi: ufs: qcom: fix platform_msi_domain_free_irqs() reference scsi: ufs: core: Enable DMA clustering scsi: ufs: exynos: Fix the maximum segment size scsi: ufs: exynos: Fix DMA alignment for PAGE_SIZE != 4096 ... commit 6861eaf79155f0a5544ff989754159f806795c31 Merge: f0b2769a0185c 8844f0aa8dc42 Author: Linus Torvalds Date: Wed Feb 22 13:35:51 2023 -0800 Merge tag 'ata-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata Pull ATA updates from Damien Le Moal: - Small cleanup of the pata_octeon driver to drop a useless platform callback (Uwe) - Simplify ata_scsi_cmd_error_handler() code using the fact that ap->ops->error_handler is NULL most of the time (Wenchao) - Several patches improving libata error handling. This is in preparation for supporting the command duration limits (CDL) feature. The changes allow handling corner cases of ATA NCQ errors which do not happen with regular drives but will be triggered with CDL drives (Niklas) - Simplify the qc_fill_rtf operation (me) - Improve SCSI command translation for REPORT_SUPPORTED_OPERATION_CODES command (me) - Cleanup of libata FUA handling. This falls short of enabling FUA for ATA drives that support it by default as there were concerns that old drives would break. The series however fixes several issues with the FUA support to ensure that FUA is reported as being supported only for drives that can handle all possible write cases (NCQ and non-NCQ). A check in the block layer is also added to ensure that we never see read FUA commands (current behavior) (me) - Several patches to move the old PARIDE (parallel port IDE) driver to libata as pata_parport. Given that this driver also needs protocol modules, the driver code resides in its own pata_parport directoy under drivers/ata (Ondrej) * tag 'ata-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata: ata: pata_parport: Fix ida_alloc return value error check drivers/block: Move PARIDE protocol modules to drivers/ata/pata_parport drivers/block: Remove PARIDE core and high-level protocols ata: pata_parport: add driver (PARIDE replacement) ata: libata: exclude FUA support for known buggy drives ata: libata: Fix FUA handling in ata_build_rw_tf() ata: libata: cleanup fua support detection ata: libata: Rename and cleanup ata_rwcmd_protocol() ata: libata: Introduce ata_ncq_supported() block: add a sanity check for non-write flush/fua bios ata: libata-scsi: improve ata_scsiop_maint_in() ata: libata-scsi: do not overwrite SCSI ML and status bytes ata: libata: move NCQ related ATA_DFLAGs ata: libata: respect successfully completed commands during errors ata: libata: read the shared status for successful NCQ commands once ata: libata: simplify qc_fill_rtf port operation interface ata: scsi: rename flag ATA_QCFLAG_FAILED to ATA_QCFLAG_EH ata: libata-eh: Cleanup ata_scsi_cmd_error_handler() ata: octeon: Drop empty platform remove function commit f0b2769a0185ccf84842a795b5587afc37274c3d Merge: 23064dfe088e0 d695e44157c8d Author: Linus Torvalds Date: Wed Feb 22 13:21:31 2023 -0800 Merge tag 'for-6.3/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mike Snitzer: - Fix DM cache target to free background tracker work items, otherwise slab BUG will occur when kmem_cache_destroy() is called. - Improve 2 of DM's shrinker names to reflect their use. - Fix the DM flakey target to not corrupt the zero page. Fix dm-flakey on 32-bit hughmem systems by using bvec_kmap_local instead of page_address. Also, fix logic used when imposing the "corrupt_bio_byte" feature. - Stop using WQ_UNBOUND for DM verity target's verify_wq because it causes significant Android latencies on ARM64 (and doesn't show real benefit on other architectures). - Add negative check to catch simple case of a DM table referencing itself. More complex scenarios that use intermediate devices to self-reference still need to be avoided/handled in userspace. - Fix DM core's resize to only send one uevent instead of two. This fixes a race with udev, that if udev wins, will cause udev to miss uevents (which caused premature unmount attempts by systemd). - Add cond_resched() to workqueue functions in DM core, dn-thin and dm-cache so that their loops aren't the cause of unintended cpu scheduling fairness issues. - Fix all of DM's checkpatch errors and warnings (famous last words). Various other small cleanups. * tag 'for-6.3/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: (62 commits) dm: remove unnecessary (void*) conversion in event_callback() dm ioctl: remove unnecessary check when using dm_get_mdptr() dm ioctl: assert _hash_lock is held in __hash_remove dm cache: add cond_resched() to various workqueue loops dm thin: add cond_resched() to various workqueue loops dm: add cond_resched() to dm_wq_requeue_work() dm: add cond_resched() to dm_wq_work() dm sysfs: make kobj_type structure constant dm: update targets using system workqueues to use a local workqueue dm: remove flush_scheduled_work() during local_exit() dm clone: prefer kvmalloc_array() dm: declare variables static when sensible dm: fix suspect indent whitespace dm ioctl: prefer strscpy() instead of strlcpy() dm: avoid void function return statements dm integrity: change macros min/max() -> min_t/max_t where appropriate dm: fix use of sizeof() macro dm: avoid 'do {} while(0)' loop in single statement macros dm log: avoid multiple line dereference dm log: avoid trailing semicolon in macro ... commit 23064dfe088e0926e3fc0922f118866dc1564405 Merge: 77bc1bb18463a 6c6cd913accd7 Author: Linus Torvalds Date: Wed Feb 22 12:55:44 2023 -0800 Merge tag 'audit-pr-20230220' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit Pull audit update from Paul Moore: "Just a single audit patch, and even that patch is pretty trivial as it only updates the mailing list entry in the MAINTAINERS file" * tag 'audit-pr-20230220' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: update the mailing list in MAINTAINERS commit 77bc1bb18463a7fa3742accaddf31845655edf66 Merge: 291a73a8e63a6 ccfd889acb06e Author: Linus Torvalds Date: Wed Feb 22 12:52:59 2023 -0800 Merge tag 'Smack-for-6.3' of https://github.com/cschaufler/smack-next Pull smack update from Casey Schaufler: "One fix for resetting CIPSO labeling" * tag 'Smack-for-6.3' of https://github.com/cschaufler/smack-next: smackfs: Added check catlen commit 291a73a8e63a6a00f2f6863989cd1652a1f5b9a1 Merge: 67e2dcff8b219 1c1ea1c3e21d5 Author: Linus Torvalds Date: Wed Feb 22 12:46:07 2023 -0800 Merge tag 'landlock-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux Pull landlock updates from Mickaël Salaün: "This improves documentation, and makes some tests more flexible to be able to run on systems without overlayfs or with Yama restrictions" * tag 'landlock-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux: MAINTAINERS: Update Landlock repository selftests/landlock: Test ptrace as much as possible with Yama selftests/landlock: Skip overlayfs tests when not supported landlock: Explain file descriptor access rights commit 67e2dcff8b21923d48f5ca835773b2f005389e69 Merge: 70756b49be4ea 4958db3245fa6 Author: Linus Torvalds Date: Wed Feb 22 12:36:25 2023 -0800 Merge tag 'integrity-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity Pull integrity update from Mimi Zohar: "One doc and one code cleanup, and two bug fixes" * tag 'integrity-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity: ima: Introduce MMAP_CHECK_REQPROT hook ima: Align ima_file_mmap() parameters with mmap_file LSM hook evm: call dump_security_xattr() in all cases to remove code duplication ima: fix ima_delete_rules() kernel-doc warning ima: return IMA digest value only when IMA_COLLECTED flag is set ima: fix error handling logic when file measurement failed commit bf9bec4cb3a401a14c24a7ef937d3c26aff9ad60 Merge: 5b7c4cabbb65f 6338a94d5ab42 Author: Alexei Starovoitov Date: Wed Feb 22 12:34:51 2023 -0800 Merge branch 'bpf: Allow reads from uninit stack' Eduard Zingerman says: ==================== This patch-set modifies BPF verifier to accept programs that read from uninitialized stack locations, but only if executed in privileged mode. This provides significant verification performance gains: 30% to 70% less processed states for big number of test programs. The reason for performance gains comes from treating STACK_MISC and STACK_INVALID as compatible, when cached state is compared to current state in verifier.c:stacksafe(). The change should not affect safety, because any value read from STACK_MISC location has full binary range (e.g. 0x00-0xff for byte-sized reads). Details and measurements are provided in the description for the patch #1. The change was suggested by Andrii Nakryiko, the initial patch was created by Alexei Starovoitov. The discussion could be found at [1]. Changes v1 -> v2 (v1 available at [2]): - Calls to helper functions now convert STACK_INVALID to STACK_MISC (suggested by Andrii); - The test case progs/test_global_func10.c is updated to expect new error message. Before recent commit [3] exact content of error messages was not verified for this test. - Replaced incorrect '//'-style comments in test case asm blocks by '/*...*/'-style comments in order to fix compilation issues; - Changed the tag from "Suggested-By" to "Co-developed-by" for Alexei on patch #1, please let me know if this is appropriate use of the tag. [1] https://lore.kernel.org/bpf/CAADnVQKs2i1iuZ5SUGuJtxWVfGYR9kDgYKhq3rNV+kBLQCu7rA@mail.gmail.com/ [2] https://lore.kernel.org/bpf/20230216183606.2483834-1-eddyz87@gmail.com/ [3] 95ebb376176c ("selftests/bpf: Convert test_global_funcs test to test_loader framework") ==================== Signed-off-by: Alexei Starovoitov commit 6338a94d5ab42a94e96ea36edc5f7df1fe73e68e Author: Eduard Zingerman Date: Sun Feb 19 22:04:27 2023 +0200 selftests/bpf: Tests for uninitialized stack reads Three testcases to make sure that stack reads from uninitialized locations are accepted by verifier when executed in privileged mode: - read from a fixed offset; - read from a variable offset; - passing a pointer to stack to a helper converts STACK_INVALID to STACK_MISC. Signed-off-by: Eduard Zingerman Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230219200427.606541-3-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 6715df8d5d24655b9fd368e904028112b54c7de1 Author: Eduard Zingerman Date: Sun Feb 19 22:04:26 2023 +0200 bpf: Allow reads from uninit stack This commits updates the following functions to allow reads from uninitialized stack locations when env->allow_uninit_stack option is enabled: - check_stack_read_fixed_off() - check_stack_range_initialized(), called from: - check_stack_read_var_off() - check_helper_mem_access() Such change allows to relax logic in stacksafe() to treat STACK_MISC and STACK_INVALID in a same way and make the following stack slot configurations equivalent: | Cached state | Current state | | stack slot | stack slot | |------------------+------------------| | STACK_INVALID or | STACK_INVALID or | | STACK_MISC | STACK_SPILL or | | | STACK_MISC or | | | STACK_ZERO or | | | STACK_DYNPTR | This leads to significant verification speed gains (see below). The idea was suggested by Andrii Nakryiko [1] and initial patch was created by Alexei Starovoitov [2]. Currently the env->allow_uninit_stack is allowed for programs loaded by users with CAP_PERFMON or CAP_SYS_ADMIN capabilities. A number of test cases from verifier/*.c were expecting uninitialized stack access to be an error. These test cases were updated to execute in unprivileged mode (thus preserving the tests). The test progs/test_global_func10.c expected "invalid indirect read from stack" error message because of the access to uninitialized memory region. This error is no longer possible in privileged mode. The test is updated to provoke an error "invalid indirect access to stack" because of access to invalid stack address (such error is not verified by progs/test_global_func*.c series of tests). The following tests had to be removed because these can't be made unprivileged: - verifier/sock.c: - "sk_storage_get(map, skb->sk, &stack_value, 1): partially init stack_value" BPF_PROG_TYPE_SCHED_CLS programs are not executed in unprivileged mode. - verifier/var_off.c: - "indirect variable-offset stack access, max_off+size > max_initialized" - "indirect variable-offset stack access, uninitialized" These tests verify that access to uninitialized stack values is detected when stack offset is not a constant. However, variable stack access is prohibited in unprivileged mode, thus these tests are no longer valid. * * * Here is veristat log comparing this patch with current master on a set of selftest binaries listed in tools/testing/selftests/bpf/veristat.cfg and cilium BPF binaries (see [3]): $ ./veristat -e file,prog,states -C -f 'states_pct<-30' master.log current.log File Program States (A) States (B) States (DIFF) -------------------------- -------------------------- ---------- ---------- ---------------- bpf_host.o tail_handle_ipv6_from_host 349 244 -105 (-30.09%) bpf_host.o tail_handle_nat_fwd_ipv4 1320 895 -425 (-32.20%) bpf_lxc.o tail_handle_nat_fwd_ipv4 1320 895 -425 (-32.20%) bpf_sock.o cil_sock4_connect 70 48 -22 (-31.43%) bpf_sock.o cil_sock4_sendmsg 68 46 -22 (-32.35%) bpf_xdp.o tail_handle_nat_fwd_ipv4 1554 803 -751 (-48.33%) bpf_xdp.o tail_lb_ipv4 6457 2473 -3984 (-61.70%) bpf_xdp.o tail_lb_ipv6 7249 3908 -3341 (-46.09%) pyperf600_bpf_loop.bpf.o on_event 287 145 -142 (-49.48%) strobemeta.bpf.o on_event 15915 4772 -11143 (-70.02%) strobemeta_nounroll2.bpf.o on_event 17087 3820 -13267 (-77.64%) xdp_synproxy_kern.bpf.o syncookie_tc 21271 6635 -14636 (-68.81%) xdp_synproxy_kern.bpf.o syncookie_xdp 23122 6024 -17098 (-73.95%) -------------------------- -------------------------- ---------- ---------- ---------------- Note: I limited selection by states_pct<-30%. Inspection of differences in pyperf600_bpf_loop behavior shows that the following patch for the test removes almost all differences: - a/tools/testing/selftests/bpf/progs/pyperf.h + b/tools/testing/selftests/bpf/progs/pyperf.h @ -266,8 +266,8 @ int __on_event(struct bpf_raw_tracepoint_args *ctx) } if (event->pthread_match || !pidData->use_tls) { - void* frame_ptr; - FrameData frame; + void* frame_ptr = 0; + FrameData frame = {}; Symbol sym = {}; int cur_cpu = bpf_get_smp_processor_id(); W/o this patch the difference comes from the following pattern (for different variables): static bool get_frame_data(... FrameData *frame ...) { ... bpf_probe_read_user(&frame->f_code, ...); if (!frame->f_code) return false; ... bpf_probe_read_user(&frame->co_name, ...); if (frame->co_name) ...; } int __on_event(struct bpf_raw_tracepoint_args *ctx) { FrameData frame; ... get_frame_data(... &frame ...) // indirectly via a bpf_loop & callback ... } SEC("raw_tracepoint/kfree_skb") int on_event(struct bpf_raw_tracepoint_args* ctx) { ... ret |= __on_event(ctx); ret |= __on_event(ctx); ... } With regards to value `frame->co_name` the following is important: - Because of the conditional `if (!frame->f_code)` each call to __on_event() produces two states, one with `frame->co_name` marked as STACK_MISC, another with it as is (and marked STACK_INVALID on a first call). - The call to bpf_probe_read_user() does not mark stack slots corresponding to `&frame->co_name` as REG_LIVE_WRITTEN but it marks these slots as BPF_MISC, this happens because of the following loop in the check_helper_call(): for (i = 0; i < meta.access_size; i++) { err = check_mem_access(env, insn_idx, meta.regno, i, BPF_B, BPF_WRITE, -1, false); if (err) return err; } Note the size of the write, it is a one byte write for each byte touched by a helper. The BPF_B write does not lead to write marks for the target stack slot. - Which means that w/o this patch when second __on_event() call is verified `if (frame->co_name)` will propagate read marks first to a stack slot with STACK_MISC marks and second to a stack slot with STACK_INVALID marks and these states would be considered different. [1] https://lore.kernel.org/bpf/CAEf4BzY3e+ZuC6HUa8dCiUovQRg2SzEk7M-dSkqNZyn=xEmnPA@mail.gmail.com/ [2] https://lore.kernel.org/bpf/CAADnVQKs2i1iuZ5SUGuJtxWVfGYR9kDgYKhq3rNV+kBLQCu7rA@mail.gmail.com/ [3] git@github.com:anakryiko/cilium.git Suggested-by: Andrii Nakryiko Co-developed-by: Alexei Starovoitov Signed-off-by: Eduard Zingerman Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230219200427.606541-2-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 38892c48e54760be41f16519456d868e14933789 Author: Andy Shevchenko Date: Wed Feb 15 18:50:30 2023 +0200 rtc: rx6110: 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 Link: https://lore.kernel.org/r/20230215165030.83621-1-andriy.shevchenko@linux.intel.com Signed-off-by: Alexandre Belloni commit 668a2abf91143caa226b3ccd0bd4d79ea85935a6 Author: Ard Biesheuvel Date: Fri Feb 17 15:23:38 2023 +0100 rtc: efi: Avoid spamming the log on RTC read failure There are cases where the EFI runtime services may end up in a funny state, e.g., due to a crash in the variable services, and this affects other EFI runtime services as well. That means that, even though GetTime() should not return an error, there are cases where it might, and there is no point in logging such an occurrence multiple times. This works around an issue where user space -apparently- keeps hitting on /dev/rtc if it fails to read the h/w clock, resulting in a tsunami of log spam and a non-responsive system as a result. Cc: Pierre Gondois Cc: Alexandru Elisei Link: https://lore.kernel.org/all/Y2o1hdZK9GGDVJsS@monolith.localdoman/ Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20230217142338.1444509-1-ardb@kernel.org Signed-off-by: Alexandre Belloni commit 303eac653a181be59674920725142cfbdd5ba4cd Author: Andy Shevchenko Date: Tue Jan 10 16:08:06 2023 +0200 rtc: isl12022: sort header inclusion alphabetically Sort header inclusion alphabetically for better maintenance. Signed-off-by: Andy Shevchenko Acked-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20230110140806.87432-6-andriy.shevchenko@linux.intel.com Signed-off-by: Alexandre Belloni commit 9bb1e189d7d2c3838938efcc497333803b946081 Author: Andy Shevchenko Date: Tue Jan 10 16:08:05 2023 +0200 rtc: isl12022: Join string literals back For easy grepping on debug purposes join string literals back in the messages. While at it, drop __func__ parameter from unique enough dev_dbg() message as Dynamic Debug can retrieve this at run time. Signed-off-by: Andy Shevchenko Acked-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20230110140806.87432-5-andriy.shevchenko@linux.intel.com Signed-off-by: Alexandre Belloni commit c8ae2735cb3d28892fd734804b60e5abf1f6fa91 Author: Andy Shevchenko Date: Tue Jan 10 16:08:04 2023 +0200 rtc: isl12022: Drop unneeded OF guards and of_match_ptr() Drop unneeded OF guards and of_match_ptr(). This allows use of the driver with other types of firmware such as ACPI PRP0001 based probing. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230110140806.87432-4-andriy.shevchenko@linux.intel.com Signed-off-by: Alexandre Belloni commit 93219a4fb8bdf279f749b5eef40bef1bbe805fc3 Author: Andy Shevchenko Date: Tue Jan 10 16:08:03 2023 +0200 rtc: isl12022: Explicitly use __le16 type for ISL12022_REG_TEMP_L We are reading 10-bit value in a 16-bit register in LE format. Make this explicit by using __le16 type for it and corresponding conversion function. Signed-off-by: Andy Shevchenko Acked-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20230110140806.87432-3-andriy.shevchenko@linux.intel.com Signed-off-by: Alexandre Belloni commit f525b210e9d4dcefb88594d50e426068e62840f4 Author: Andy Shevchenko Date: Tue Jan 10 16:08:02 2023 +0200 rtc: isl12022: Get rid of unneeded private struct isl12022 First of all, the struct rtc_device pointer is kept in the managed resources, no need to keep it outside (no users in the driver). Second, replace private struct isl12022 with a regmap. Signed-off-by: Andy Shevchenko Acked-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20230110140806.87432-2-andriy.shevchenko@linux.intel.com Signed-off-by: Alexandre Belloni commit 70756b49be4ea8bf36a664322df6e7e89895fa60 Merge: bc009f9382bd0 cc29eadef921f Author: Linus Torvalds Date: Wed Feb 22 12:00:20 2023 -0800 Merge tag 'docs-6.3' of git://git.lwn.net/linux Pull documentation updates from Jonathan Corbet: "It has been a moderately calm cycle for documentation; the significant changes include: - Some significant additions to the memory-management documentation - Some improvements to navigation in the HTML-rendered docs - More Spanish and Chinese translations ... and the usual set of typo fixes and such" * tag 'docs-6.3' of git://git.lwn.net/linux: (68 commits) Documentation/watchdog/hpwdt: Fix Format Documentation/watchdog/hpwdt: Fix Reference Documentation: core-api: padata: correct spelling docs/mm: Physical Memory: correct spelling in reference to CONFIG_PAGE_EXTENSION docs: Use HTML comments for the kernel-toc SPDX line docs: Add more information to the HTML sidebar Documentation: KVM: Update AMD memory encryption link printk: Document that CONFIG_BOOT_PRINTK_DELAY required for boot_delay= Documentation: userspace-api: correct spelling Documentation: sparc: correct spelling Documentation: driver-api: correct spelling Documentation: admin-guide: correct spelling docs: add workload-tracing document to admin-guide docs/admin-guide/mm: remove useless markup docs/mm: remove useless markup docs/mm: Physical Memory: remove useless markup docs/sp_SP: Add process magic-number translation docs: ftrace: always use canonical ftrace path Doc/damon: fix the data path error dma-buf: Add "dma-buf" to title of documentation ... commit 3eb5d0f26f4ea604e83ca499a72c0d33638f4765 Merge: 90fb1a36528b5 9574d57f2d433 Author: Bjorn Helgaas Date: Wed Feb 22 13:47:32 2023 -0600 Merge branch 'pci/misc' - Drop bogus kernel-doc marker in pci_endpoint_test.c (Randy Dunlap) - Fix epf_ntb_mw_bar_clear() kernel-doc (Yang Yingliang) - Constify struct kobj_type pci_slot_ktype (Thomas Weißschuh) * pci/misc: PCI: hv: Drop duplicate PCI_MSI dependency PCI/sysfs: Constify struct kobj_type pci_slot_ktype PCI: endpoint: pci-epf-vntb: Add epf_ntb_mw_bar_clear() num_mws kernel-doc misc: pci_endpoint_test: Drop initial kernel-doc marker commit 90fb1a36528b5a52583c49483ca597beeb7f5435 Merge: 69ed52bec3926 f492edb40b548 Author: Bjorn Helgaas Date: Wed Feb 22 13:47:31 2023 -0600 Merge branch 'pci/controller/vmd' - Add pci_enable_link_state() to allow drivers to enable ASPM link state (Michael Bottini) - Add quirk to enable all ASPM link states and program LTR for devices below VMD (David E. Box) * pci/controller/vmd: PCI: vmd: Add quirk to configure PCIe ASPM and LTR PCI: vmd: Create feature grouping for client products PCI: vmd: Use PCI_VDEVICE in device list PCI/ASPM: Add pci_enable_link_state() commit 69ed52bec39265072a5efe8fb851d3831129bec2 Merge: 0784d32c3dec4 6f5e55dfcb061 Author: Bjorn Helgaas Date: Wed Feb 22 13:47:31 2023 -0600 Merge branch 'pci/controller/uniphier' - Clean up uniphier-ep reg, clocks, resets, and their names (Kunihiko Hayashi) * pci/controller/uniphier: dt-bindings: PCI: uniphier-ep: Clean up reg, clocks, resets, and their names commit 0784d32c3dec4f0c78674857010fd2a72d52f210 Merge: b237474a90c1c ddc10938e08cd Author: Bjorn Helgaas Date: Wed Feb 22 13:47:31 2023 -0600 Merge branch 'pci/controller/switchtec' - Return -EFAULT instead of unrelated codes for copy_to_user() errors (Bjorn Helgaas) * pci/controller/switchtec: PCI: switchtec: Return -EFAULT for copy_to_user() errors PCI: switchtec: Simplify switchtec_dma_mrpc_isr() commit b237474a90c1c4cd8391bb8dbb5f32a82867a8da Merge: 7cfd342bd1914 f356132229b18 Author: Bjorn Helgaas Date: Wed Feb 22 13:47:30 2023 -0600 Merge branch 'pci/controller/qcom' - Add DT compatible for qcom MSM8998 (Krzysztof Kozlowski) - Unify qcom MSM8996 and MSM8998 clock orderings (Krzysztof Kozlowski) - Correct qcom,perst-regs (Krzysztof Kozlowski) - Add qcom SM8350 DT binding and driver support (Dmitry Baryshkov) - Add qcom_pcie_host_deinit() so the PHY is powered off and regulators and clocks are disabled on late host-init errors (Johan Hovold) - Add IPQ8074 Gen3 port DT binding and driver support (the Gen2 port was already supported) (Robert Marko) * pci/controller/qcom: PCI: qcom: Add IPQ8074 Gen3 port support dt-bindings: PCI: qcom: Add IPQ8074 Gen3 port dt-bindings: PCI: qcom: Sort compatibles alphabetically PCI: qcom: Fix host-init error handling PCI: qcom: Add SM8350 support dt-bindings: PCI: qcom: Add SM8350 dt-bindings: PCI: qcom-ep: Correct qcom,perst-regs dt-bindings: PCI: qcom: Unify MSM8996 and MSM8998 clock order dt-bindings: PCI: qcom: Add MSM8998 specific compatible dt-bindings: PCI: qcom: Add oneOf to compatible match commit 7cfd342bd1914758f6d1b806d0415ab177a6a37a Merge: 181a60a0ee881 b3574f579ece2 Author: Bjorn Helgaas Date: Wed Feb 22 13:47:30 2023 -0600 Merge branch 'pci/controller/mvebu' - Mark mvebu driver as broken (Pali Rohár) * pci/controller/mvebu: PCI: mvebu: Mark driver as BROKEN commit 181a60a0ee881d54f3e100efff842c4d076f7419 Merge: a9cd360245af1 0cb2a8f3456ff Author: Bjorn Helgaas Date: Wed Feb 22 13:47:29 2023 -0600 Merge branch 'pci/controller/mt7621' - Delay PHY initialization to make boots reliable for ZBT WE1326 and ZBT WF3526-P and some Netgear models (Sergio Paracuellos) * pci/controller/mt7621: PCI: mt7621: Delay phy ports initialization commit a9cd360245af188f29e3b5cd1d1c7a60f8249b1f Merge: 5256d493809d4 c435669a41dd4 Author: Bjorn Helgaas Date: Wed Feb 22 13:47:29 2023 -0600 Merge branch 'pci/controller/imx6' - Add i.MX8MM, i.MX8MQ, i.MX8MP endpoint mode DT binding and driver support (Richard Zhu) * pci/controller/imx6: PCI: imx6: Add i.MX8MP PCIe EP support PCI: imx6: Add i.MX8MM PCIe EP support PCI: imx6: Add i.MX8MQ PCIe EP support PCI: imx6: Add i.MX PCIe EP mode support misc: pci_endpoint_test: Add i.MX8 PCIe EP device support dt-bindings: imx6q-pcie: Add i.MX8MP PCIe EP mode compatible string dt-bindings: imx6q-pcie: Add i.MX8MQ PCIe EP mode compatible string dt-bindings: imx6q-pcie: Add i.MX8MM PCIe EP mode compatible string commit 5256d493809d4e741ba813989e392ed96d1e236a Merge: 33abd97c34ff2 939fbcd568fd2 Author: Bjorn Helgaas Date: Wed Feb 22 13:47:29 2023 -0600 Merge branch 'pci/controller/dwc' - Release previously-requested DW eDMA IRQs if request_irq() fails (Serge Semin) - Convert DW eDMA linked-list (ll) and data target (dt) from CPU-relative addresses to PCI bus addresses (Serge Semin) - Fix missing src/dst address for interleaved transfers (Serge Semin) - Enforce the DW eDMA restriction that interleaved transfers must increment src and dst addresses (Serge Semin) - Fix some invalid interleaved transfer semantics (Serge Semin) - Convert CPU-relative addresses to PCI bus addresses for eDMA engine (Serge Semin) - Drop chancnt initialization from dw-edma-core, since it is managed by the dmaengine core, e.g., in dma_async_device_channel_register() (Serge Semin) - Clean up bogus casting of debugfs_entries.reg addresses (Serge Semin) - Ignore debugfs file/directory creation errors (Serge Semin) - Allocate debugfs entries from the heap to prepare for multi-eDMA platforms (Serge Semin) - Simplify and rework register accessors to remove another obstacle to multi-eDMA platforms (Serge Semin) - Consolidate eDMA read/write channels in a single dma_device to simplify, better reflect the hardware design, and avoid a debugfs complaint (Serge Semin) - Move eDMA-specific debugfs nodes into existing dmaengine subdirectory (Serge Semin) - Fix a readq_ch() truncation from 64 to 32 bits (Serge Semin) - Use existing readq()/writeq rather than hand-coding new ones (Serge Semin) - Drop unnecessary data target region allocation in favor of existing dw_edma_chip members (Serge Semin) - Use parent device in eDMA controller name to prepare for multi-eDMA platforms (Serge Semin) - In addition to the existing MMIO accessors for linked list entries, add support for ioremapped entries for use by eDMA in Root Ports or local Endpoints (Serge Semin) - Convert DW_EDMA_PCIE so it depends on DW_EDMA instead of selecting it (Serge Semin) - Allow DWC drivers to set streaming DMA masks larger than 32 bits; previously both streaming and coherent DMA were limited to 32 bits because some PCI devices only support coherent 32-bit DMA for MSI (Serge Semin) - Set 64-bit streaming and coherent DMA mask for the bt1 driver (Serge Semin) - Add DW Root Port and Endpoint controller support for eDMA (Serge Semin) * pci/controller/dwc: PCI: dwc: Add Root Port and Endpoint controller eDMA engine support PCI: bt1: Set 64-bit DMA mask PCI: dwc: Restrict only coherent DMA mask for MSI address allocation dmaengine: dw-edma: Prepare dw_edma_probe() for builtin callers dmaengine: dw-edma: Depend on DW_EDMA instead of selecting it dmaengine: dw-edma: Add mem-mapped LL-entries support dmaengine: dw-edma: Skip cleanup procedure if no private data found dmaengine: dw-edma: Replace chip ID number with device name dmaengine: dw-edma: Drop DT-region allocation dmaengine: dw-edma: Use non-atomic io-64 methods dmaengine: dw-edma: Fix readq_ch() return value truncation dmaengine: dw-edma: Use DMA engine device debugfs subdirectory dmaengine: dw-edma: Join read/write channels into a single device dmaengine: dw-edma: Move eDMA data pointer to debugfs node descriptor dmaengine: dw-edma: Simplify debugfs context CSRs init procedure dmaengine: dw-edma: Rename debugfs dentry variables to 'dent' dmaengine: dw-edma: Convert debugfs descs to being heap-allocated dmaengine: dw-edma: Add dw_edma prefix to debugfs nodes descriptor dmaengine: dw-edma: Stop checking debugfs_create_*() return value dmaengine: dw-edma: Drop unnecessary debugfs reg casts dmaengine: dw-edma: Drop chancnt initialization dmaengine: dw-edma: Add PCI bus address getter to the remote EP glue driver dmaengine: dw-edma: Add CPU to PCI bus address translation dmaengine: dw-edma: Fix invalid interleaved xfers semantics dmaengine: dw-edma: Don't permit non-inc interleaved xfers dmaengine: dw-edma: Fix missing src/dst address of interleaved xfers dmaengine: dw-edma: Convert ll/dt phys address to PCI bus/DMA address dmaengine: dw-edma: Release requested IRQs on failure dmaengine: Fix dma_slave_config.dst_addr description commit 33abd97c34ff233f21355d411bea6709f4d5ad75 Merge: 191b41018856d f5edd8715e2ea Author: Bjorn Helgaas Date: Wed Feb 22 13:47:28 2023 -0600 Merge branch 'pci/endpoint' - Convert dra7xx to threaded IRQ handler (Manivannan Sadhasivam) - Move tegra194 dw_pcie_ep_linkup() to threaded IRQ handler (Manivannan Sadhasivam) - Add a separate lock for the endpoint pci_epf list to avoid deadlock while running callbacks (Manivannan Sadhasivam) - Use callbacks instead of notifier chains to signal events from EPC to EPF drivers (Manivannan Sadhasivam) - Use link_up() callback in place of LINK_UP notifier (Manivannan Sadhasivam) * pci/endpoint: PCI: endpoint: Use link_up() callback in place of LINK_UP notifier PCI: endpoint: Use callback mechanism for passing events from EPC to EPF PCI: endpoint: Use a separate lock for protecting epc->pci_epf list PCI: tegra194: Move dw_pcie_ep_linkup() to threaded IRQ handler PCI: dra7xx: Use threaded IRQ handler for "dra7xx-pcie-main" IRQ commit 191b41018856da2bcd6f3f3ab0b2eb1c7a9f8585 Merge: ebdce9e3d085f a2b9b123ccac9 Author: Bjorn Helgaas Date: Wed Feb 22 13:47:28 2023 -0600 Merge branch 'pci/virtualization' - Avoid FLR for AMD FCH AHCI adapters to avoid a hardware defect (Damien Le Moal) - Add ACS quirk for Wangxun NICs that don't allow peer-to-peer between functions, but don't advertise an ACS Capability (Mengyuan Lou) * pci/virtualization: PCI: Add ACS quirk for Wangxun NICs PCI: Avoid FLR for AMD FCH AHCI adapters commit ebdce9e3d085f7891463fd0046e04201d1604d0d Merge: 0b7af1ddcf62e 9d8ba74a181b1 Author: Bjorn Helgaas Date: Wed Feb 22 13:47:27 2023 -0600 Merge branch 'pci/resource' - Realign space as required by bridge windows after dividing it up (Mika Westerberg) - Account for space required by other devices on the bus before distributing it all to bridges (Mika Westerberg) - Distribute spare resources to root bus devices as well as to other hotplug bridges (Mika Westerberg) - Fix bug that dropped root bus resources that end at zero, e.g., a host bridge that leads only to bus 00 (Geert Uytterhoeven) * pci/resource: PCI: Fix dropping valid root bus resources with .end = zero PCI: Distribute available resources for root buses, too PCI: Take other bus devices into account when distributing resources PCI: Align extra resources for hotplug bridges properly commit 0b7af1ddcf62e6f497b26e967a65dad5d46d79ae Merge: 08a67024a0b4a 53b54ad074de1 Author: Bjorn Helgaas Date: Wed Feb 22 13:47:27 2023 -0600 Merge branch 'pci/reset' - Always observe reset delay when waking devices from D3cold, e.g., after system sleep, regardless of whether we're allowed to runtime-suspend to D3cold (Lukas Wunner) - Unify reset and resume delays to wait for downstream devices after a bridge reset (Lukas Wunner) - Wait for downstream devices after a DPC-induced bridge reset (Lukas Wunner) * pci/reset: PCI/DPC: Await readiness of secondary bus after reset PCI: Unify delay handling for reset and resume PCI/PM: Observe reset delay irrespective of bridge_d3 commit 08a67024a0b4a18b2fad8d5b3670f02e9b24ebfb Merge: 7260675a52a67 8133844a8f243 Author: Bjorn Helgaas Date: Wed Feb 22 13:47:26 2023 -0600 Merge branch 'pci/pm' - Account for _S0W when deciding whether to put bridges in D3 to avoid missing hotplug events (Rafael J. Wysocki) * pci/pm: PCI/ACPI: Account for _S0W of the target bridge in acpi_pci_bridge_d3() commit 7260675a52a67f3c44036306bf25f6947c294a02 Merge: 881766fe0d4a8 6606f4c3c48c7 Author: Bjorn Helgaas Date: Wed Feb 22 13:47:26 2023 -0600 Merge branch 'pci/p2pdma' - Annotate RCU dereference (Logan Gunthorpe) * pci/p2pdma: PCI/P2PDMA: Annotate RCU dereference commit 881766fe0d4a8db9d885864afdfe44a5ea8d2c53 Merge: 72d083a60a864 f98954b293d0a Author: Bjorn Helgaas Date: Wed Feb 22 13:47:25 2023 -0600 Merge branch 'pci/kbuild' - Remove MODULE_LICENSE from boolean drivers so they don't look like modules so modprobe will complain about them (Nick Alcock) * pci/kbuild: PCI: Remove MODULE_LICENSE so boolean drivers don't look like modules commit 72d083a60a864ad75059b63dc4a2f7107eb85d0a Merge: fec93576f7dc8 ea0b5aa5f184c Author: Bjorn Helgaas Date: Wed Feb 22 13:47:25 2023 -0600 Merge branch 'pci/iov' - Enlarge virtfn sysfs name buffer to prevent buffer overflow (Alexey V. Vissarionov) * pci/iov: PCI/IOV: Enlarge virtfn sysfs name buffer commit fec93576f7dc80756c6f142a3312ddc4dac5db9a Merge: a17613298f5df 74ff8864cc842 Author: Bjorn Helgaas Date: Wed Feb 22 13:47:25 2023 -0600 Merge branch 'pci/hotplug' - Add quirk to work around Qualcomm hardware defect in Command Completed signaling (Manivannan Sadhasivam) - Remove locking to allow devices to be marked as disconnected immediately instead of waiting for concurrent bind/unbind to complete (Lukas Wunner) * pci/hotplug: PCI: hotplug: Allow marking devices as disconnected during bind/unbind PCI: pciehp: Add Qualcomm quirk for Command Completed erratum commit a17613298f5df5bfaf66b403ed082da93abc05ce Merge: f900e4441c657 6fffbc7ae1373 Author: Bjorn Helgaas Date: Wed Feb 22 13:47:24 2023 -0600 Merge branch 'pci/enumeration' - Implement portdrv .shutdown() method that calls service driver .remove() methods (which disables interrupt generation as required by .shutdown()), but doesn't disable bus mastering (which hangs on Loongson LS7A because of a hardware defect) (Huacai Chen) - Prevent MRRS increases for devices below Loongson LS7A to avoid hardware limitations (Huacai Chen) - Ignore devices with a firmware (DT/ACPI) node that says the device is disabled (Rob Herring) * pci/enumeration: PCI: Honor firmware's device disabled status PCI: loongson: Add more devices that need MRRS quirk PCI: loongson: Prevent LS7A MRRS increases PCI/portdrv: Prevent LS7A Bus Master clearing on shutdown commit f900e4441c657d976bf875fc83e7a3b8e4d4b45a Merge: 1b929c02afd37 6b985af556e5c Author: Bjorn Helgaas Date: Wed Feb 22 13:47:24 2023 -0600 Merge branch 'pci/aer' - Configure ECRC only if AER is native (Vidya Sagar) - Stop enabling device error reporting for the downstream hierarchy when the AER service driver probes a Root Port because we've already done that when enumerating those downstream devices (Bjorn Helgaas) * pci/aer: PCI/AER: Remove redundant Device Control Error Reporting Enable PCI/AER: Configure ECRC only if AER is native commit 939fbcd568fd294034c96edc92ff5b9de1a5fce8 Author: Serge Semin Date: Fri Jan 13 20:14:09 2023 +0300 PCI: dwc: Add Root Port and Endpoint controller eDMA engine support Since the DW eDMA core now supports eDMA controllers embedded in locally accessible DW PCIe Root Ports and Endpoints, register these controllers when possible. To do that the DW PCIe core driver needs to perform some preparations first. First of all, it needs to find the eDMA controller CSRs base address, whether they are accessible over the Port Logic or iATU unrolled space. Afterwards it can try to auto-detect the eDMA controller availability and number of read/write channels. If none are found the procedure silently returns without error. Secondly, the platform is supposed to provide either combined or per-channel IRQ signals. If no valid IRQs set is found, the procedure returns without error to be backward compatible with platforms where DW PCIe controllers have eDMA but lack the IRQ description. Finally, before actually probing the eDMA device we need to allocate LLP items buffers. After that the DW eDMA can be registered. If registration is successful, a message regarding the number of detected Read/Write eDMA channels will be printed to the system as is done for the iATU settings. Note: the DW PCI controller driver (either host or endpoint mode) is currently always built-in, so if the DW eDMA core is built as a module (CONFIG_DW_EDMA=m), eDMA controllers will not be registered even if the dw-edma module is later loaded. Link: https://lore.kernel.org/r/20230113171409.30470-28-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Vinod Koul commit 68373f2c0fd82bc66ec51e2db27ca0fe141210fd Author: Serge Semin Date: Fri Jan 13 20:14:08 2023 +0300 PCI: bt1: Set 64-bit DMA mask The DW PCIe Root Port IP core is synthesized with the 64-bit AXI address bus. Since the device is also equipped with the eDMA engine, explicitly set the device DMA mask so DMA engine clients can allocate data buffers anywhere in the 64-bit memory space. Link: https://lore.kernel.org/r/20230113171409.30470-27-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas commit 6c784e21b3da735bd2c3dba73acf9b2c033564fa Author: Serge Semin Date: Fri Jan 13 20:14:07 2023 +0300 PCI: dwc: Restrict only coherent DMA mask for MSI address allocation The MSI target address must be in the lowest 4GB memory to support PCI peripherals without 64-bit MSI support. Since the allocation is done from DMA coherent memory, set only the coherent DMA mask, leaving the streaming DMA mask alone. Thus streaming DMA operations will work with no artificial limitations. It will be specifically useful for the eDMA-capable controllers so the corresponding DMA engine clients would map the DMA buffers with no need for SWIOTLB for buffers allocated above 4GB. Add a brief comment about the reason allocating the MSI target address below 4GB. Link: https://lore.kernel.org/r/20230113171409.30470-26-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Robin Murphy commit 3bc0f149405e07c7e59985a24ce96db83973f8d7 Author: Serge Semin Date: Fri Jan 13 20:14:06 2023 +0300 dmaengine: dw-edma: Prepare dw_edma_probe() for builtin callers When CONFIG_DW_EDMA=m, dw_edma_probe() is built as a module. Previously edma.h declared it as extern, but the implementation isn't available for builtin callers. A subsequent commit will add calls from dw_pcie_host_init() and dw_pcie_ep_init(), which can only be built-in. Make it safe for such builtin callers to call dw_edma_probe() by using IS_REACHABLE() to define a stub when CONFIG_DW_EDMA=m. When CONFIG_DW_EDMA=m, these builtin callers will fail to detect and register eDMA devices, so eDMA won't be usable even if the dw-edma module is loaded. [bhelgaas: split to separate patch, commit log] Link: https://lore.kernel.org/r/20230113171409.30470-25-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Acked-by: Vinod Koul commit acf994151dd9a59d544b5d3c196b64f326d94c52 Author: Serge Semin Date: Wed Jan 25 15:24:33 2023 -0600 dmaengine: dw-edma: Depend on DW_EDMA instead of selecting it Kconfig "select" is discouraged for visible symbols like DW_EDMA because it makes it possible to set DW_EDMA even if DW_EDMA depends on things that are not set (see Documentation/kbuild/kconfig-language.txt). Convert DW_EDMA_PCIE so it depends on DW_EDMA instead of selecting it. There will likely be several future drivers that depend on DW_EDMA, so this uses "if DW_EDMA" to enclose them all rather than repeating "depends on DW_EDMA" for each. [bhelgaas: split to separate patch, commit log] Link: https://lore.kernel.org/r/20230113171409.30470-25-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Acked-by: Vinod Koul commit 16f8a08643b6d63d2e8252ddaa9e17e2408a2531 Author: Serge Semin Date: Fri Jan 13 20:14:05 2023 +0300 dmaengine: dw-edma: Add mem-mapped LL-entries support Currently the DW eDMA driver only supports the linked lists memory allocated locally with respect to the remote eDMA engine setup. It means the linked lists will be accessible by the CPU via the MMIO space only. If eDMA is embedded into the DW PCIe Root Ports or local Endpoints (which support will be added in subsequent commits) the linked lists are supposed to be allocated in the CPU memory. In that case the LL-entries can be directly accessed, while the former case implies using the MMIO accessors for that. In order to have both cases supported by the driver, the dw_edma_region descriptor should be fixed to contain the MMIO-backed and just memory-based virtual addresses. The linked lists initialization procedure will use one of them depending on the eDMA device nature. If the eDMA engine is embedded into the local DW PCIe Root Port/Endpoint controllers, the list entries will be directly accessed by referencing the corresponding structure fields. Otherwise the MMIO accessors usage will be preserved. Link: https://lore.kernel.org/r/20230113171409.30470-24-Sergey.Semin@baikalelectronics.ru Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Acked-by: Vinod Koul commit bc009f9382bd0704273c9a0c1cbf72020bbbe1f7 Merge: 241ed6ab74f94 befb28f2676a6 Author: Linus Torvalds Date: Wed Feb 22 11:41:37 2023 -0800 Merge tag 'for-linus-6.3-1' of https://github.com/cminyard/linux-ipmi Pull IPMI updates from Corey Minyard: "Small fixes to the SMBus IPMI and IPMB driver. Nothing big, cleanups, fixing names, and one small deviation from the specification fixed" * tag 'for-linus-6.3-1' of https://github.com/cminyard/linux-ipmi: ipmi: ipmb: Fix the MODULE_PARM_DESC associated to 'retry_time_ms' ipmi:ssif: Add a timer between request retries ipmi:ssif: Remove rtc_us_timer ipmi_ssif: Rename idle state and check ipmi:ssif: resend_msg() cannot fail commit 241ed6ab74f94eb3d64ee6b950cd8091b1213225 Merge: 6c71297eaf713 5720a18baa468 Author: Linus Torvalds Date: Wed Feb 22 11:31:09 2023 -0800 Merge tag 'hwmon-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: "New drivers: - Infineon TDA38640 Voltage Regulator - NXP MC34VR500 PMIC - GXP fan controller - MPQ7932 Power Management IC New chip or board support added to existing drivers: - it87: IT87952E; also other cleanup/improvements - intel-m10-bmc-hwmon: N6000 - pmbus/max16601: MAX16600 - aquacomputer_d5next: Aquacomputer Aquastream Ultimate, Aquacomputer Poweradjust 3, Aquacomputer Aquaero - nct6775: Support for B650/B660/X670 ASUS boards - oxp-sensors: AYANEO AIR and AIR Pro Other notable changes: - Various kernel documentation fixes - Various devicetree bindings fixes - Explicitly deprecated [devm_]hwmon_device_register_with_groups - ftsteutates: Support for fanX_fault and other cleanup - ltc2945: Support for setting shunt resistor and other cleanup/fixes - coretemp: Avoid RDMSR interrupts to isolated CPUs, and simplify platform device handling ... and various other minor cleanups and fixes" * tag 'hwmon-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (66 commits) hwmon: Deprecate [devm_]hwmon_device_register_with_groups hwmon: (mlxreg-fan) Return zero speed for broken fan hwmon: (gxp-fan-ctrl) use devm_platform_get_and_ioremap_resource() hwmon: (aquacomputer_d5next) Add support for Aquacomputer Aquastream Ultimate hwmon: (aquacomputer_d5next) Add support for Aquacomputer Poweradjust 3 hwmon: (iio_hwmon) use dev_err_probe hwmon: intel-m10-bmc-hwmon: Add N6000 sensors Docs/hwmon/index: Add missing SPDX License Identifier hwmon: (it87) Updated documentation for recent updates to it87 hwmon: (it87) Add new chipset IT87952E hwmon: (it87) Allow multiple chip IDs for force_id hwmon: (it87) Add chip_id in some info message hwmon: (it87) List full chip model name hwmon: (it87) Disable configuration exit for certain chips hwmon: (it87) Allow disabling exiting of configuration mode Documentation: hwmon: correct spelling hwmon: (pmbus/max16601) Add support for MAX16600 hwmon: (ltc2945) Allow setting shunt resistor hwmon: (ltc2945) Handle error case in ltc2945_value_store hwmon: (ltc2945) Add devicetree match table ... commit 6c71297eaf713ece684a367ce9aff06069d715b9 Merge: d5176cdbf64ce 904e28c6de083 Author: Linus Torvalds Date: Wed Feb 22 11:24:42 2023 -0800 Merge tag 'for-linus-2023022201' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID updates from Benjamin Tissoires: - HID-BPF infrastructure: this allows to start using HID-BPF. Note that the mechanism to ship HID-BPF program through the kernel tree is still not implemented yet (but is planned). This should be a no-op for 99% of users. Also we are gaining kselftests for the HID tree (Benjamin Tissoires) - Some UAF fixes in workers when using uhid (Pietro Borrello & Benjamin Tissoires) - Constify hid_ll_driver (Thomas Weißschuh) - Allow more custom IIO sensors through HID (Philipp Jungkamp) - Logitech HID++ fixes for scroll wheel, protocol and debug (Bastien Nocera) - Some new device support: Steam Deck (Vicki Pfau), UClogic (José Expósito), Logitech G923 Xbox Edition steering wheel (Walt Holman), EVision keyboards (Philippe Valembois) - other assorted code cleanups and fixes * tag 'for-linus-2023022201' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (99 commits) HID: mcp-2221: prevent UAF in delayed work hid: bigben_probe(): validate report count HID: asus: use spinlock to safely schedule workers HID: asus: use spinlock to protect concurrent accesses HID: bigben: use spinlock to safely schedule workers HID: bigben_worker() remove unneeded check on report_field HID: bigben: use spinlock to protect concurrent accesses HID: logitech-hidpp: Add myself to authors HID: logitech-hidpp: Retry commands when device is busy HID: logitech-hidpp: Add more debug statements HID: Add support for Logitech G923 Xbox Edition steering wheel HID: logitech-hidpp: Add Signature M650 HID: logitech-hidpp: Remove HIDPP_QUIRK_NO_HIDINPUT quirk HID: logitech-hidpp: Don't restart communication if not necessary HID: logitech-hidpp: Add constants for HID++ 2.0 error codes Revert "HID: logitech-hidpp: add a module parameter to keep firmware gestures" HID: logitech-hidpp: Hard-code HID++ 1.0 fast scroll support HID: i2c-hid: goodix: Add mainboard-vddio-supply dt-bindings: HID: i2c-hid: goodix: Add mainboard-vddio-supply HID: i2c-hid: goodix: Stop tying the reset line to the regulator ... commit 3ef9fec011d471a259935f2e2ff58ab12886d683 Author: Arnaldo Carvalho de Melo Date: Wed Feb 22 16:17:36 2023 -0300 tools arch x86: Sync the msr-index.h copy with the kernel sources To pick up the changes from these csets: 8c29f01654053258 ("x86/sev: Add SEV-SNP guest feature negotiation support") That cause no changes to tooling: $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > before $ cp arch/x86/include/asm/msr-index.h tools/arch/x86/include/asm/msr-index.h $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > after $ diff -u before after $ Just silences this perf build warning: 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 Cc: Borislav Petkov (AMD) Cc: Nikunj A Dadhania Link: https://lore.kernel.org/lkml/Y%2FZrNvtcijPWagCp@kernel.org/ Signed-off-by: Arnaldo Carvalho de Melo commit 6153c44392b04ff2da1e9aa82ba87da9ab9a0fc1 Author: Johan Hovold Date: Tue Feb 21 11:14:27 2023 +0100 drm/msm/adreno: fix runtime PM imbalance at unbind A recent commit moved enabling of runtime PM from adreno_gpu_init() to adreno_load_gpu() (called on first open()), which means that unbind() may now be called with runtime PM disabled in case the device was never opened in between. Make sure to only forcibly suspend and disable runtime PM at unbind() in case runtime PM has been enabled to prevent a disable count imbalance. This specifically avoids leaving runtime PM disabled when the device is later opened after a successful bind: msm_dpu ae01000.display-controller: [drm:adreno_load_gpu [msm]] *ERROR* Couldn't power up the GPU: -13 Fixes: 4b18299b3365 ("drm/msm/adreno: Defer enabling runpm until hw_init()") Reported-by: Bjorn Andersson Link: https://lore.kernel.org/lkml/20230203181245.3523937-1-quic_bjorande@quicinc.com Cc: stable@vger.kernel.org # 6.0 Signed-off-by: Johan Hovold Patchwork: https://patchwork.freedesktop.org/patch/523549/ Link: https://lore.kernel.org/r/20230221101430.14546-2-johan+linaro@kernel.org Signed-off-by: Rob Clark commit 32e7083429d46f29080626fe387ff90c086b1fbe Author: Dmitry Baryshkov Date: Tue Feb 14 05:09:56 2023 +0300 drm/msm/a5xx: fix context faults during ring switch The rptr_addr is set in the preempt_init_ring(), which is called from a5xx_gpu_init(). It uses shadowptr() to set the address, however the shadow_iova is not yet initialized at that time. Move the rptr_addr setting to the a5xx_preempt_hw_init() which is called after setting the shadow_iova, getting the correct value for the address. Fixes: 8907afb476ac ("drm/msm: Allow a5xx to mark the RPTR shadow as privileged") Suggested-by: Rob Clark Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/522640/ Link: https://lore.kernel.org/r/20230214020956.164473-5-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit b4fb748f0b734ce1d2e7834998cc599fcbd25d67 Author: Dmitry Baryshkov Date: Tue Feb 14 05:09:55 2023 +0300 drm/msm/a5xx: fix the emptyness check in the preempt code Quoting Yassine: ring->memptrs->rptr is never updated and stays 0, so the comparison always evaluates to false and get_next_ring always returns ring 0 thinking it isn't empty. Fix this by calling get_rptr() instead of reading rptr directly. Reported-by: Yassine Oudjana Fixes: b1fc2839d2f9 ("drm/msm: Implement preemption for A5XX targets") Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/522642/ Link: https://lore.kernel.org/r/20230214020956.164473-4-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 141f66ebbfa17cc7e2075f06c50107da978c965b Author: Dmitry Baryshkov Date: Tue Feb 14 05:09:54 2023 +0300 drm/msm/a5xx: fix highest bank bit for a530 A530 has highest bank bit equal to 15 (like A540). Fix values written to REG_A5XX_RB_MODE_CNTL and REG_A5XX_TPL1_MODE_CNTL registers. Fixes: 1d832ab30ce6 ("drm/msm/a5xx: Add support for Adreno 508, 509, 512 GPUs") Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/522639/ Link: https://lore.kernel.org/r/20230214020956.164473-3-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit a7a4c19c36de1e4b99b06e4060ccc8ab837725bc Author: Dmitry Baryshkov Date: Tue Feb 14 05:09:53 2023 +0300 drm/msm/a5xx: fix setting of the CP_PREEMPT_ENABLE_LOCAL register Rather than writing CP_PREEMPT_ENABLE_GLOBAL twice, follow the vendor kernel and set CP_PREEMPT_ENABLE_LOCAL register instead. a5xx_submit() will override it during submission, but let's get the sequence correct. Fixes: b1fc2839d2f9 ("drm/msm: Implement preemption for A5XX targets") Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/522638/ Link: https://lore.kernel.org/r/20230214020956.164473-2-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 4cd15a3e8b36a94c4afa6af064ebe09d387ae034 Author: Douglas Anderson Date: Thu Feb 2 10:48:43 2023 -0800 drm/msm/a6xx: Make GPU destroy a bit safer If, for whatever reason, we're trying process adreno_runtime_resume() at the same time that a6xx_destroy() is running then things can go boom. Specifically adreno_runtime_resume() will eventually call a6xx_pm_resume() and that may try to resume the gmu. Let's grab the GMU lock as we're destroying the GMU. That will solve the race because a6xx_pm_resume() grabs the same lock. That makes the access of `gmu->initialized` in a6xx_gmu_resume() safe. We'll also return an error code in a6xx_gmu_resume() if we see that `gmu->initialized` was false. If this happens we'll bail out of the rest of a6xx_pm_resume(), which is good because the rest of that function is also not good to do if we're racing with a6xx_destroy(). Signed-off-by: Douglas Anderson Patchwork: https://patchwork.freedesktop.org/patch/521232/ Link: https://lore.kernel.org/r/20230202104822.1.I0e49003bf4dd1dead9be4a29dbee41f3b1236e48@changeid Signed-off-by: Rob Clark commit 796762f0506077c4f048b4eb05de2f587f488bce Author: Thomas Zimmermann Date: Wed Feb 22 13:37:12 2023 +0100 drm/msm: Fix possible uninitialized access in fbdev Do not run drm_fb_helper_unprepare() if fbdev allocation fails. Avoids access to an uninitialized pointer. Original bug report is at [1]. Reported-by: kernel test robot Signed-off-by: Thomas Zimmermann Fixes: 3fb1f62f80a1 ("drm/fb-helper: Remove drm_fb_helper_unprepare() from drm_fb_helper_fini()") Link: https://lore.kernel.org/oe-kbuild-all/202302220810.9dymwCQ8-lkp@intel.com/ # 1 Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/523715/ Link: https://lore.kernel.org/r/20230222123712.5049-1-tzimmermann@suse.de Signed-off-by: Rob Clark commit 8a86f213f4426f19511a16d886871805b35c3acf Author: Rob Clark Date: Wed Feb 15 15:50:48 2023 -0800 drm/msm: Fix potential invalid ptr free The error path cleanup expects that chain and syncobj are either NULL or valid pointers. But post_deps was not allocated with __GFP_ZERO. Fixes: ab723b7a992a ("drm/msm: Add syncobj support.") Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Reviewed-by: Dmitry Osipenko Patchwork: https://patchwork.freedesktop.org/patch/523051/ Link: https://lore.kernel.org/r/20230215235048.1166484-1-robdclark@gmail.com commit 92dd0575729a423aa5524d89055e34295152a2dd Merge: dbd7a2a941b8c a66f1efcf748f Author: Rob Clark Date: Wed Feb 22 11:20:41 2023 -0800 Merge tag 'drm-msm-fixes-2023-01-16' into msm-fixes Back-merge of previous cycles msm-fixes for kexec fix (to avoid merge conflict) Signed-off-by: Rob Clark commit d5176cdbf64ce7d4eebf339205f17c23118e9f72 Merge: 17bbc46fc9d51 099f37a539e61 Author: Linus Torvalds Date: Wed Feb 22 11:05:56 2023 -0800 Merge tag 'pinctrl-v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "Nothing special, notably a lot of new Qualcomm hardware is supported, a RISC-V reference SoC and then some cleanups both in code and device tree bindings. Core changes: - Add PINCTRL_PINFUNCTION() macro and use it in several drivers New drivers: - New driver for the StarFive JH7110 SoC "sys" and "aon" (always-on) pin controllers. (RISC-V.) - New subdriver for the Qualcomm QDU1000/QRU1000 SoC pin controller - New subdrivers for the Qualcomm SM8550 SoC and LPASS pin controllers - New subdriver for the Qualcomm SA8775P SoC pin controller - New subdriver for the Qualcomm IPQ5332 SoC pin controller - New (trivial) support for Qualcomm PM8550 and PMR735D PMIC pin control - New subdriver for the Mediatek MT7981 SoC pin controller Improvements: - Several cleanups and refactorings to the Intel drivers - Add 4KOhm bias support to the Intel driver - Use the NOIRQ_SYSTEM_SLEEP_PM_OPS for the AT91 driver - Support general purpose clocks in the Qualcomm MSM8226 SoC - Several conversions to use the new I2C .probe_new() call - Massive clean-up of the Qualcomm Device Tree YAML schemas - Add VIN[45] pins, groups and functions to the Renesas r8a77950 SoC driver" * tag 'pinctrl-v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (118 commits) pinctrl: qcom: Add support for i2c specific pull feature pinctrl: starfive: Add StarFive JH7110 aon controller driver pinctrl: starfive: Add StarFive JH7110 sys controller driver dt-bindings: pinctrl: Add StarFive JH7110 aon pinctrl dt-bindings: pinctrl: Add StarFive JH7110 sys pinctrl pinctrl: add mt7981 pinctrl driver dt-bindings: pinctrl: add bindings for MT7981 SoC dt-bindings: pinctrl: rockchip,pinctrl: mark gpio sub nodes of pinctrl as deprecated pinctrl: qcom: Introduce IPQ5332 TLMM driver dt-bindings: pinctrl: qcom: add IPQ5332 pinctrl dt-bindings: pinctrl: qcom: lpass-lpi: correct GPIO name pattern pinctrl: qcom: pinctrl-sm8550-lpass-lpi: add SM8550 LPASS dt-bindings: pinctrl: qcom,sm8550-lpass-lpi-pinctrl: add SM8550 LPASS pinctrl: at91: use devm_kasprintf() to avoid potential leaks dt-bindings: pinctrl: qcom: correct gpio-ranges in examples dt-bindings: pinctrl: qcom,msm8994: correct number of GPIOs dt-bindings: pinctrl: qcom,sdx55: correct GPIO name pattern dt-bindings: pinctrl: qcom,msm8953: correct GPIO name pattern dt-bindings: pinctrl: qcom,sm6375: correct GPIO name pattern and example dt-bindings: pinctrl: qcom,msm8909: correct GPIO name pattern and example ... commit 65eb2867f5bf46023ab42ba8347106870d961cf3 Author: Vojtech Hejsek Date: Thu Feb 16 09:01:15 2023 +0100 ACPI: resource: Skip IRQ override on Asus Expertbook B2402FBA The Asus Expertbook B2502FBA has IRQ 1 described as Active_Low in its ACPI table. However, the kernel overrides this and sets it to Edge_High, which prevents the internal keyboard from working properly. Adding this laptop model to the override_table fixes the issue. Signed-off-by: Vojtech Hejsek Signed-off-by: Rafael J. Wysocki commit 17bbc46fc9d5128756dc9f36063836eaede06b0b Merge: 13e574b4941ee 4827aae061337 Author: Linus Torvalds Date: Wed Feb 22 11:01:17 2023 -0800 Merge tag 'gpio-updates-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio updates from Bartosz Golaszewski: "A rather small update, there are no new drivers, just improvements and refactoring in existing ones. Thanks to migrating of several drivers to using generalized APIs and dropping of OF interfaces in favor of using software nodes we're actually removing more code than we're adding. Core GPIOLIB: - drop several OF interfaces after moving a significant part of the code to using software nodes - remove more interfaces referring to the global GPIO numberspace that we're getting rid of - improvements in the gpio-regmap library - add helper for GPIO device reference counting - remove unused APIs - minor tweaks like sorting headers alphabetically Extended support in existing drivers: - add support for Tegra 234 PMC to gpio-tegra186 Driver improvements: - migrate the 104-dio/idi family of drivers to using the regmap-irq API - migrate gpio-i8255 and gpio-mm to the GPIO regmap API - clean-ups in gpio-pca953x - remove duplicate assignments of of_gpio_n_cells in gpio-davinci, gpio-ge, gpio-xilinx, gpio-zevio and gpio-wcd934x - improvements to gpio-pcf857x: implement get/set_multiple callbacks, use generic device properties instead of OF + minor tweaks - fix OF-related header includes and Kconfig dependencies in gpio-zevio - dynamically allocate the GPIO base in gpio-omap - use a dedicated printf specifier for printing fwnode info in gpio-sim - use dev_name() for the GPIO chip label in gpio-vf610 - other minor tweaks and fixes Documentation: - remove mentions of legacy API from comments in various places - convert the DT binding documents to YAML schema for Fujitsu MB86S7x, Unisoc GPIO and Unisoc EIC - document the Unisoc UMS512 controller in DT bindings" * tag 'gpio-updates-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (54 commits) gpio: sim: Use %pfwP specifier instead of calling fwnode API directly gpio: tegra186: remove unneeded loop in tegra186_gpio_init_route_mapping() gpiolib: of: Move enum of_gpio_flags to its only user gpio: mvebu: Use IS_REACHABLE instead of IS_ENABLED for CONFIG_PWM gpio: zevio: Add missing header gpio: Get rid of gpio_to_chip() gpio: pcf857x: Drop unneeded explicit casting gpio: pcf857x: Make use of device properties gpio: pcf857x: Get rid of legacy platform data gpio: rockchip: Do not mention legacy API in the code gpio: wcd934x: Remove duplicate assignment of of_gpio_n_cells gpio: zevio: Use proper headers and drop OF_GPIO dependency gpio: zevio: Remove duplicate assignment of of_gpio_n_cells gpio: xilinx: Remove duplicate assignment of of_gpio_n_cells dt-bindings: gpio: Add compatible string for Unisoc UMS512 dt-bindings: gpio: Convert Unisoc EIC controller binding to yaml dt-bindings: gpio: Convert Unisoc GPIO controller binding to yaml gpio: ge: Remove duplicate assignment of of_gpio_n_cells gpio: davinci: Remove duplicate assignment of of_gpio_n_cells gpio: omap: use dynamic allocation of base ... commit 13e574b4941ee1931f8c70f33c3011f74e5fbd30 Merge: 0175ec3a28c69 de82c25dab9ac Author: Linus Torvalds Date: Wed Feb 22 10:53:37 2023 -0800 Merge tag 'spi-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "This has been a fairly quiet release for SPI, though it is likely that the next release will have some big changes as there's some preparatory work for multiple chip select support gone in - the rest of the code is on the list but will need to be rebased onto -rc1. Otherwise there's a couple of new tunables for chip select timings, some new devices and smaller device specific updates and fixes. - Support for configuring the hold and minimum inactive times for chip selects. - Beginnings of support for supporting devices which have multiple chip selects on a single device. - Support for newer Broadcom HSSPI and Intel controllers, Silicon Labs EM3581 and SI3210" * tag 'spi-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (67 commits) spi: dt-bindings: qcom,spi-qcom-qspi: document OPP and power-domains spi: spidev: drop the incorrect notice from Kconfig spi: bcm63xx-hsspi: fix error code in probe spi: bcmbca-hsspi: Fix error code in probe() function spi: synquacer: Fix timeout handling in synquacer_spi_transfer_one() spi: intel: Check number of chip selects after reading the descriptor spi: xilinx: add force_irq for QSPI mode spi: spi-st-ssc: convert to DT schema spi: Reorder fields in 'struct spi_transfer' spi: cadence-quadspi: use STIG mode for small reads spi: cadence-quadspi: setup ADDR Bits in cmd reads spi: cadence-quadspi: Add flag for direct mode writes spi: cadence-quadspi: Reset CMD_CTRL Reg on cmd r/w completion MAINTAINERS: Remove file reference for Broadcom Broadband SoC HS SPI driver entry spi: bcm63xx-hsspi: bcmbca-hsspi: fix _be16 type usage MAINTAINERS: Add entry for Broadcom Broadband SoC HS SPI drivers spi: bcmbca-hsspi: Add driver for newer HSSPI controller spi: bcm63xx-hsspi: Disable spi mem dual io read op support spi: spi-mem: Allow controller supporting mem_ops without exec_op spi: bcm63xx-hsspi: Add prepend mode support ... commit 0175ec3a28c695562a08fdccf73f2ec5ed744e2f Merge: 603ac530f1350 7f62cb8861190 Author: Linus Torvalds Date: Wed Feb 22 10:49:32 2023 -0800 Merge tag 'regulator-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "This has been a very quiet release for the regulator API: there's one new driver for the Maxim MAX20411, some DT schema conversions and some small tweaks and improvements but really nothing major at all" * tag 'regulator-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (22 commits) regulator: max597x: Align for simple_mfd_i2c driver regulator: max20411: Fix off-by-one for n_voltages setting regulator: max597x: Remove unused variable regulator: tps65219: use generic set_bypass() regulator: s5m8767: Bounds check id indexing into arrays regulator: max77802: Bounds check regulator id against opmode regulator: max20411: Convert to i2c's .probe_new() regulator: scmi: Allow for zero voltage domains regulator: max20411: Directly include bitfield.h regulator: Introduce Maxim MAX20411 Step-Down converter regulator: dt-bindings: Describe Maxim MAX20411 regulator: dt-bindings: qcom-labibb: Allow regulator-common properties regulator: dt-bindings: fixed-regulator: allow gpios property regulator: tps65219: use IS_ERR() to detect an error pointer regulator: mcp16502: add enum MCP16502_REG_HPM description regulator: fixed-helper: use the correct function name in comment regulator: act8945a: fix non-kernel-doc comments dt-bindings: regulators: convert non-smd RPM Regulators bindings to dt-schema regulator: dt-bindings: Convert Fairchild FAN53555 to DT schema regulator: dt-bindings: qcom,usb-vbus-regulator: change node name ... commit 603ac530f13506e6ce5db4ab953ede4d292c5327 Merge: 064d7dcf51a82 40f4b05868101 Author: Linus Torvalds Date: Wed Feb 22 10:42:55 2023 -0800 Merge tag 'regmap-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "A quiet release for regmap: we've seen several cleanups, an update for a change in the MDIO APIs and one small fix" * tag 'regmap-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap-irq: Remove unused mask_invert flag regmap-irq: Remove unused type_invert flag regmap: Reorder fields in 'struct regmap_bus' to save some memory regmap: apply reg_base and reg_downshift for single register ops commit 45dd9bc75d9adc9483f0c7d662ba6e73ed698a0b Author: Randy Dunlap Date: Tue Feb 21 23:33:15 2023 -0800 KVM: SVM: hyper-v: placate modpost section mismatch error modpost reports section mismatch errors/warnings: WARNING: modpost: vmlinux.o: section mismatch in reference: svm_hv_hardware_setup (section: .text) -> (unknown) (section: .init.data) WARNING: modpost: vmlinux.o: section mismatch in reference: svm_hv_hardware_setup (section: .text) -> (unknown) (section: .init.data) WARNING: modpost: vmlinux.o: section mismatch in reference: svm_hv_hardware_setup (section: .text) -> (unknown) (section: .init.data) This "(unknown) (section: .init.data)" all refer to svm_x86_ops. Tag svm_hv_hardware_setup() with __init to fix a modpost warning as the non-stub implementation accesses __initdata (svm_x86_ops), i.e. would generate a use-after-free if svm_hv_hardware_setup() were actually invoked post-init. The helper is only called from svm_hardware_setup(), which is also __init, i.e. lack of __init is benign other than the modpost warning. Fixes: 1e0c7d40758b ("KVM: SVM: hyper-v: Remote TLB flush for SVM") Signed-off-by: Randy Dunlap Cc: Vineeth Pillai Cc: Paolo Bonzini Cc: kvm@vger.kernel.org Cc: stable@vger.kernel.org Reviewed-by: Sean Christopherson Reviewed-by: Vitaly Kuznetsov Message-Id: <20230222073315.9081-1-rdunlap@infradead.org> Signed-off-by: Paolo Bonzini commit 064d7dcf51a82b480e953a15cca47e5df0426502 Merge: f3dd0c53370e7 7933b90b42896 Author: Linus Torvalds Date: Wed Feb 22 10:29:05 2023 -0800 Merge tag 'sound-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "The majority of works in this cycle are about ASoC spread over trees. Most of them are for new devices and cleanups / refactoring works, and not much significant changes are seen in the core side. Below are some highlights: ASoC: - Continued refactoring to move into common helper functions - Lots of DT schema conversons and stylistic nits - Continued work on building out the new SOF IPC4 scheme - Continued work for Intel AVS - New drivers for Awinc AT88395, Infineon PEB2466, Iron Device SMA1303, Mediatek MT8188, Realtek RT712, Renesas IDT821034, Samsung/Tesla FSD SoC I2S, and TI TAS5720A-Q1 ALSA: - A few cleanups to make the remove callbacks to void returns - FireWire refactoring and enhancements - PCM kselftest enhancements" * tag 'sound-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (398 commits) ALSA: hda/hdmi: Register with vga_switcheroo on Dual GPU Macbooks ASoC: soc-ac97: Return correct error codes ASoC: soc-dapm.h: fixup warning struct snd_pcm_substream not declared ASoC: cs35l45: Remove separate namespace for tables ASoC: cs35l45: Remove separate tables module ASoC: soc-ac97: Convert to agnostic GPIO API ASoC: dt-bindings: renesas,rsnd.yaml: drop "dmas/dma-names" from "rcar_sound,ssi" ALSA: hda: cs35l41: Enable Amp High Pass Filter ALSA: hda: cs35l41: Ensure firmware/tuning pairs are always loaded ALSA: hda: cs35l41: Correct error condition handling ASoC: codecs: wcd934x: Use min macro for comparison and assignment ASoC: Intel: Skylake: Fix struct definition ASoC: tlv320adcx140: extend list of supported samplerates ASoC: imx-pcm-rpmsg: Remove unused variable SoC: rt5682s: Disable jack detection interrupt during suspend ASoC: SOF: Intel: hda-dsp: Set streaming flag for d0i3 ASoC: SOF: Intel: Enable d0i3 work for ipc4 ASoC: SOF: ipc4: Wake up dsp core before sending ipc msg ASoC: SOF: Intel: hda-dsp: use set_pm_gate according to ipc version ASoC: SOF: Introduce a new set_pm_gate() IPC PM op ... commit 6ba912f1c081448cf3d1fa9ada9115aae4594ac4 Author: Arnd Bergmann Date: Wed Feb 15 10:14:48 2023 +0100 kcsan: select CONFIG_CONSTRUCTORS Building a kcsan enabled kernel for x86_64 with gcc-11 results in a lot of build warnings or errors without CONFIG_CONSTRUCTORS: x86_64-linux-ld: error: unplaced orphan section `.ctors.65436' from `arch/x86/lib/copy_mc.o' x86_64-linux-ld: error: unplaced orphan section `.ctors.65436' from `arch/x86/lib/cpu.o' x86_64-linux-ld: error: unplaced orphan section `.ctors.65436' from `arch/x86/lib/csum-partial_64.o' x86_64-linux-ld: error: unplaced orphan section `.ctors.65436' from `arch/x86/lib/csum-wrappers_64.o' x86_64-linux-ld: error: unplaced orphan section `.ctors.65436' from `arch/x86/lib/insn-eval.o' x86_64-linux-ld: error: unplaced orphan section `.ctors.65436' from `arch/x86/lib/insn.o' x86_64-linux-ld: error: unplaced orphan section `.ctors.65436' from `arch/x86/lib/misc.o' The same thing has been reported for mips64. I can't reproduce it for any other compiler version, so I don't know if constructors are always required here or if this is a gcc-11 specific implementation detail. I see no harm in always enabling constructors here, and this reliably fixes the build warnings for me. Link: https://lore.kernel.org/lkml/202204181801.r3MMkwJv-lkp@intel.com/T/ Cc: Kees Cook See-also: 3e6631485fae ("vmlinux.lds.h: Keep .ctors.* with .ctors") Signed-off-by: Arnd Bergmann Reviewed-by: Marco Elver Signed-off-by: Paul E. McKenney commit d649c34cb916b015fdcb487e51409fcc5caeca8d Author: Yan Zhao Date: Wed Feb 22 15:49:38 2023 +0800 vfio: Fix NULL pointer dereference caused by uninitialized group->iommufd group->iommufd is not initialized for the iommufd_ctx_put() [20018.331541] BUG: kernel NULL pointer dereference, address: 0000000000000000 [20018.377508] RIP: 0010:iommufd_ctx_put+0x5/0x10 [iommufd] ... [20018.476483] Call Trace: [20018.479214] [20018.481555] vfio_group_fops_unl_ioctl+0x506/0x690 [vfio] [20018.487586] __x64_sys_ioctl+0x6a/0xb0 [20018.491773] ? trace_hardirqs_on+0xc5/0xe0 [20018.496347] do_syscall_64+0x67/0x90 [20018.500340] entry_SYSCALL_64_after_hwframe+0x4b/0xb5 Fixes: 9eefba8002c2 ("vfio: Move vfio group specific code into group.c") Cc: stable@vger.kernel.org Signed-off-by: Yan Zhao Reviewed-by: Jason Gunthorpe Reviewed-by: Yi Liu Link: https://lore.kernel.org/r/20230222074938.13681-1-yan.y.zhao@intel.com Signed-off-by: Alex Williamson commit f3dd0c53370e70c0f9b7e931bbec12916f3bb8cc Author: Linus Torvalds Date: Wed Feb 22 09:52:32 2023 -0800 bpf: add missing header file include Commit 74e19ef0ff80 ("uaccess: Add speculation barrier to copy_from_user()") built fine on x86-64 and arm64, and that's the extent of my local build testing. It turns out those got the include incidentally through other header files ( in particular), but that was not true of other architectures, resulting in build errors kernel/bpf/core.c: In function ‘___bpf_prog_run’: kernel/bpf/core.c:1913:3: error: implicit declaration of function ‘barrier_nospec’ so just make sure to explicitly include the proper header file to make everybody see it. Fixes: 74e19ef0ff80 ("uaccess: Add speculation barrier to copy_from_user()") Reported-by: kernel test robot Reported-by: Viresh Kumar Reported-by: Huacai Chen Tested-by: Geert Uytterhoeven Tested-by: Dave Hansen Acked-by: Alexei Starovoitov Signed-off-by: Linus Torvalds commit 57bebf807e2abcf87d96b9de1266104ee2d8fc2f Author: Pavel Begunkov Date: Wed Feb 22 14:36:51 2023 +0000 io_uring/rsrc: optimise registered huge pages When registering huge pages, internally io_uring will split them into many PAGE_SIZE bvec entries. That's bad for performance as drivers need to eventually dma-map the data and will do it individually for each bvec entry. Coalesce huge pages into one large bvec. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit b000ae0ec2d709046ac1a3c5722fea417f8a067e Author: Pavel Begunkov Date: Wed Feb 22 14:36:50 2023 +0000 io_uring/rsrc: optimise single entry advance Iterating within the first bvec entry should be essentially free, but we use iov_iter_advance() for that, which shows up in benchmark profiles taking up to 0.5% of CPU. Replace it with a hand coded version. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit edd478269640b360c6f301f2baa04abdda563ef3 Author: Pavel Begunkov Date: Wed Feb 22 14:36:48 2023 +0000 io_uring/rsrc: disallow multi-source reg buffers If two or more mappings go back to back to each other they can be passed into io_uring to be registered as a single registered buffer. That would even work if mappings came from different sources, e.g. it's possible to mix in this way anon pages and pages from shmem or hugetlb. That is not a problem but it'd rather be less prone if we forbid such mixing. Cc: Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 9a1563d1720680bdc1d702486b7b73f51c079b32 Author: Pavel Begunkov Date: Wed Feb 22 14:32:43 2023 +0000 io_uring: remove unused wq_list_merge There are no users of wq_list_merge, kill it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/5f9ad0301949213230ad9000a8359d591aae615a.1677002255.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 48ba08374e779421ca34bd14b4834aae19fc3e6a Author: Wojciech Lukowicz Date: Sat Feb 18 18:41:41 2023 +0000 io_uring: fix size calculation when registering buf ring Using struct_size() to calculate the size of io_uring_buf_ring will sum the size of the struct and of the bufs array. However, the struct's fields are overlaid with the array making the calculated size larger than it should be. When registering a ring with N * PAGE_SIZE / sizeof(struct io_uring_buf) entries, i.e. with fully filled pages, the calculated size will span one more page than it should and io_uring will try to pin the following page. Depending on how the application allocated the ring, it might succeed using an unrelated page or fail returning EFAULT. The size of the ring should be the product of ring_entries and the size of io_uring_buf, i.e. the size of the bufs array only. Fixes: c7fb19428d67 ("io_uring: add support for ring mapped supplied buffers") Signed-off-by: Wojciech Lukowicz Reviewed-by: Gabriel Krisman Bertazi Link: https://lore.kernel.org/r/20230218184141.70891-1-wlukowicz01@gmail.com Signed-off-by: Jens Axboe commit 6bf65a1b3668b04bb6c8126494d00303104eb9e5 Author: Pavel Begunkov Date: Mon Feb 20 14:13:52 2023 +0000 io_uring/rsrc: fix a comment in io_import_fixed() io_import_fixed() supports offsets, but "may not" means the opposite. Replace it with "might not" so the comments rather speaks about possible cases. Signed-off-by: Pavel Begunkov Reviewed-by: Gabriel Krisman Bertazi Link: https://lore.kernel.org/r/5b5f79958456caa6dc532f6205f75f224b232c81.1676902343.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 8d664282a03fec09682f10252d3c785c2513691d Author: Jens Axboe Date: Fri Feb 17 08:27:23 2023 -0700 io_uring: rename 'in_idle' to 'in_cancel' This better describes what it does - it's incremented when the task is currently undergoing a cancelation operation, due to exiting or exec'ing. Signed-off-by: Jens Axboe commit ce8e04f6e5d3b2d14cd00cc4c0b1cc8cbdcf4d12 Author: Jens Axboe Date: Fri Feb 17 08:22:17 2023 -0700 io_uring: consolidate the put_ref-and-return section of adding work We've got a few cases of this, move them to one section and just use gotos to get there. Reduces the text section on both arm64 and x86-64, using gcc-12.2. Signed-off-by: Jens Axboe commit b61b82f81e095fe265b0614045d17b08e6ee5c72 Author: Sangmoon Kim Date: Mon Feb 20 16:34:41 2023 +0900 arm64: pass ESR_ELx to die() of cfi_handler Commit 0f2cb928a154 ("arm64: consistently pass ESR_ELx to die()") caused all callers to pass the ESR_ELx value to die(). For consistency, this patch also adds esr to die() call of cfi_handler. Also, when CFI error occurs, die handlers can use ESR_ELx value. Signed-off-by: Sangmoon Kim Acked-by: Mark Rutland Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20230220073441.2753-1-sangmoon.kim@samsung.com Signed-off-by: Catalin Marinas commit e034b8a18d4badceecb672c58b488bad1e901d95 Author: Thomas Zimmermann Date: Wed Feb 22 13:37:12 2023 +0100 drm/msm: Fix possible uninitialized access in fbdev Do not run drm_fb_helper_unprepare() if fbdev allocation fails. Avoids access to an uninitialized pointer. Original bug report is at [1]. Reported-by: kernel test robot Signed-off-by: Thomas Zimmermann Fixes: 3fb1f62f80a1 ("drm/fb-helper: Remove drm_fb_helper_unprepare() from drm_fb_helper_fini()") Link: https://lore.kernel.org/oe-kbuild-all/202302220810.9dymwCQ8-lkp@intel.com/ # 1 Reviewed-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20230222123712.5049-1-tzimmermann@suse.de commit 0269680e5eb88f6223c53a8b3138cbfa60ba7657 Author: Mark Brown Date: Thu Feb 9 20:04:07 2023 +0000 arm64/fpsimd: Remove warning for SME without SVE Support for SME without SVE is architecturally valid and has now been tested well enough so let's remove the warning message that is displayed at boot. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230209-arm64-sme-no-sve-v1-1-74eb3df2f878@kernel.org Signed-off-by: Catalin Marinas commit e74a68468062d7ebd8ce17069e12ccc64cc6a58c Author: Peter Collingbourne Date: Tue Feb 14 21:09:11 2023 -0800 arm64: Reset KASAN tag in copy_highpage with HW tags only During page migration, the copy_highpage function is used to copy the page data to the target page. If the source page is a userspace page with MTE tags, the KASAN tag of the target page must have the match-all tag in order to avoid tag check faults during subsequent accesses to the page by the kernel. However, the target page may have been allocated in a number of ways, some of which will use the KASAN allocator and will therefore end up setting the KASAN tag to a non-match-all tag. Therefore, update the target page's KASAN tag to match the source page. We ended up unintentionally fixing this issue as a result of a bad merge conflict resolution between commit e059853d14ca ("arm64: mte: Fix/clarify the PG_mte_tagged semantics") and commit 20794545c146 ("arm64: kasan: Revert "arm64: mte: reset the page tag in page->flags""), which preserved a tag reset for PG_mte_tagged pages which was considered to be unnecessary at the time. Because SW tags KASAN uses separate tag storage, update the code to only reset the tags when HW tags KASAN is enabled. Signed-off-by: Peter Collingbourne Link: https://linux-review.googlesource.com/id/If303d8a709438d3ff5af5fd85706505830f52e0c Reported-by: "Kuan-Ying Lee (李冠穎)" Cc: # 6.1 Fixes: 20794545c146 ("arm64: kasan: Revert "arm64: mte: reset the page tag in page->flags"") Reviewed-by: Andrey Konovalov Link: https://lore.kernel.org/r/20230215050911.1433132-1-pcc@google.com Signed-off-by: Catalin Marinas commit b48279af636de613e9dd03857d9cadd4beca8e7e Author: Namhyung Kim Date: Sat Feb 18 08:27:24 2023 -0800 perf test: Fix offcpu test prev_state check On Fedora 36, the 'perf record' offcpu profiling tests are failing. It was because the BPF checks the prev task's state being S or D but actually it has more bits set. Let's check the LSB 8 bits for the purpose of offcpu profiling. Reported-by: Arnaldo Carvalho de Melo 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: Peter Zijlstra Link: https://lore.kernel.org/r/20230218162724.1292657-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit eb9be8310c58c166f9fae3b71c0ad9d6741b4897 Author: Conor Dooley Date: Fri Feb 10 18:59:45 2023 +0000 RISC-V: add a spin_shadow_stack declaration The patchwork automation reported a sparse complaint that spin_shadow_stack was not declared and should be static: ../arch/riscv/kernel/traps.c:335:15: warning: symbol 'spin_shadow_stack' was not declared. Should it be static? However, this is used in entry.S and therefore shouldn't be static. The same applies to the shadow_stack that this pseudo spinlock is trying to protect, so do like its charge and add a declaration to thread_info.h Signed-off-by: Conor Dooley Fixes: 7e1864332fbc ("riscv: fix race when vmap stack overflow") Reviewed-by: Guo Ren Link: https://lore.kernel.org/r/20230210185945.915806-1-conor@kernel.org Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 9b07d27d0fbb7f7441aa986859a0f53ec93a0335 Author: Randy Dunlap Date: Tue Feb 21 23:04:11 2023 -0800 swiotlb: mark swiotlb_memblock_alloc() as __init swiotlb_memblock_alloc() calls memblock_alloc(), which calls (__init) memblock_alloc_try_nid(). However, swiotlb_membloc_alloc() can be marked as __init since it is only called by swiotlb_init_remap(), which is already marked as __init. This prevents a modpost build warning/error: WARNING: modpost: vmlinux.o: section mismatch in reference: swiotlb_memblock_alloc (section: .text) -> memblock_alloc_try_nid (section: .init.text) WARNING: modpost: vmlinux.o: section mismatch in reference: swiotlb_memblock_alloc (section: .text) -> memblock_alloc_try_nid (section: .init.text) This fixes the build warning/error seen on ARM64, PPC64, S390, i386, and x86_64. Fixes: 8d58aa484920 ("swiotlb: reduce the swiotlb buffer size on allocation failure") Signed-off-by: Randy Dunlap Cc: Alexey Kardashevskiy Cc: Christoph Hellwig Cc: iommu@lists.linux.dev Cc: Mike Rapoport Cc: linux-mm@kvack.org Signed-off-by: Christoph Hellwig commit c1855dd0a62b7ead360eb9231fb65c2108efaf47 Author: Bjorn Andersson Date: Wed Feb 22 06:31:10 2023 -0800 clk: qcom: Revert sync_state based clk_disable_unused Revert the postponement of clk_disable_unused() for clock providers that implement sync_state, and the change to drivers implementing this, until agreement on the implementation has been reached. This reverts: 29e31415e14e ("clk: qcom: Remove need for clk_ignore_unused on sc8280xp") 99c0f7d35c4b ("clk: qcom: sdm845: Use generic clk_sync_state_disable_unused callback") 26b36df75166 ("clk: Add generic sync_state callback for disabling unused clocks") Requested-by: Stephen Boyd Signed-off-by: Bjorn Andersson commit fd9a6a13949af81062f4cd04f2c1b28ca5311e71 Author: Javier Carrasco Date: Wed Feb 15 09:18:15 2023 +0100 rtc: pcf85363: add support for the quartz-load-femtofarads property The quartz oscillator load capacitance of the PCF85263 and PCF85363 can be adjusted to 6 pF, 7 pF (default) and 12.5 pF with the CL[1:0] bits in the oscillator control register (address 25h). Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20230215081815.3141776-3-javier.carrasco@wolfvision.net Signed-off-by: Alexandre Belloni commit 1b2f85a8bac67b9909f2ee4be1bc11548a7aeaf3 Author: Javier Carrasco Date: Wed Feb 15 09:18:14 2023 +0100 dt-bindings: rtc: nxp,pcf8563: move pcf85263/pcf85363 to a dedicated binding These Real Time Clocks are managed by the rtc-pcf85363 device driver, which now supports the quartz-load-femtofarads property. Signed-off-by: Javier Carrasco Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230215081815.3141776-2-javier.carrasco@wolfvision.net Signed-off-by: Alexandre Belloni commit 59c54c59974649b2e7bc92faae4a21e2b2408db2 Author: Kathiravan T Date: Mon Jan 30 22:31:53 2023 +0530 dt-bindings: mfd: qcom,tcsr: Add compatible for IPQ5332 Document the qcom,tcsr-ipq5332 compatible. Signed-off-by: Kathiravan T Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230130170155.27266-2-quic_kathirav@quicinc.com commit 43be4f662ae23c38d7f29204a3b635d4c6d61646 Author: Jacky Bai Date: Sun Jan 29 15:08:20 2023 +0800 dt-bindings: mfd: Add NXP BBNSM Add binding for NXP BBNSM(Battery-Backed Non-Secure Module). Signed-off-by: Jacky Bai Reviewed-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230129070823.1945489-2-ping.bai@nxp.com commit 8a15b4daed3d45c9162f23d393a06df2a7be4778 Author: Andreas Kemnade Date: Fri Jan 27 17:58:28 2023 +0100 mfd: ntxec: Add version number for EC in Tolino Vision The EC firmware has a different version number than anything defined until now. Signed-off-by: Andreas Kemnade Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230127165828.3256170-1-andreas@kemnade.info commit 4d83bcbeee12be0842ec99606f08c1c65e986a97 Author: Bernhard Rosenkränzer Date: Wed Jan 25 15:34:57 2023 +0100 dt-bindings: mfd: syscon: Add mt8365-syscfg Document Mediatek mt8365-syscfg Signed-off-by: Bernhard Rosenkränzer Acked-by: Krzysztof Kozlowski Reviewed-by: Matthias Brugger Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230125143503.1015424-4-bero@baylibre.com commit ca78476e4888f1f1caac26c48ec715e546baf432 Author: Arnd Bergmann Date: Thu Jan 5 14:46:13 2023 +0100 mfd: Remove toshiba tmio drivers Four separate mfd drivers are in the "tmio" family, and all of them were used in now-removed PXA machines (eseries, tosa, and hx4700), so the mfd drivers and all its children can be removed as well. Signed-off-by: Arnd Bergmann Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230105134622.254560-19-arnd@kernel.org commit a783c962619271a8b905efad1d89adfec11ae0c8 Author: Alexandre Belloni Date: Tue Feb 14 23:27:53 2023 +0100 rtc: allow rtc_read_alarm without read_alarm callback .read_alarm is not necessary to read the current alarm because it is recorded in the aie_timer and so rtc_read_alarm() will never call rtc_read_alarm_internal() which is the only function calling the callback. Reported-by: Zhipeng Wang Reported-by: Marcel Ziswiler Fixes: 7ae41220ef58 ("rtc: introduce features bitfield") Tested-by: Philippe Schenker Link: https://lore.kernel.org/r/20230214222754.582582-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 2d433e9c897dcb0b70ef17b536f61430b1e151d4 Author: Alexandre Belloni Date: Tue Feb 14 21:27:15 2023 +0100 rtc: rv3032: add ACPI support The RV-3032 has been assigned the MCRY3032 ACPI ID. Link: https://lore.kernel.org/r/20230214202716.565749-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit b6ef5d4a0295bc0567021c0102d1c66f2ed212a2 Author: Alexandre Belloni Date: Tue Feb 14 21:26:53 2023 +0100 rtc: rv3028: add ACPI support The RV-3028 has been assigned the MCRY3028 ACPI ID. Link: https://lore.kernel.org/r/20230214202653.565647-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit eb7b85853c3866236f9cb378fc68ce5f76efbf9c Author: Jacky Bai Date: Wed Feb 15 10:41:16 2023 +0800 rtc: bbnsm: Add the bbnsm rtc support The BBNSM module includes a real time counter with alarm. Add a RTC driver for this function. Signed-off-by: Jacky Bai Reviewed-by: Peng Fan Link: https://lore.kernel.org/r/20230215024117.3357341-3-ping.bai@nxp.com Signed-off-by: Alexandre Belloni commit c1b0c3cfcbad25d2c412863c27638c933f1d911b Author: Andreas Gruenbacher Date: Wed Feb 1 15:50:25 2023 +0100 gfs2: Convert gfs2_page_add_databufs to folios Convert gfs2_page_add_databufs() to folios and rename it to gfs2_trans_add_databufs(). Cc: Matthew Wilcox Signed-off-by: Andreas Gruenbacher commit cbb60951ce18c9b6e91d2eb97deb41d8ff616622 Author: Andreas Gruenbacher Date: Wed Feb 1 15:08:50 2023 +0100 gfs2: jdata writepage fix The ->writepage() and ->writepages() operations are supposed to write entire pages. However, on filesystems with a block size smaller than PAGE_SIZE, __gfs2_jdata_writepage() only adds the first block to the current transaction instead of adding the entire page. Fix that. Fixes: 18ec7d5c3f43 ("[GFS2] Make journaled data files identical to normal files on disk") Signed-off-by: Andreas Gruenbacher commit ad614f81d2e8b9704478921935c75ccd4024b854 Author: Uwe Kleine-König Date: Fri Jan 27 16:26:39 2023 +0100 backlight: ktz8866: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230127152639.1347229-1-u.kleine-koenig@pengutronix.de commit f8449c8f73552b82e2a29dfdb99df54bd3a5aafc Author: Jianhua Lu Date: Fri Jan 20 23:50:18 2023 +0800 backlight: ktz8866: Add support for Kinetic KTZ8866 backlight Add support for Kinetic KTZ8866 backlight, which is used in Xiaomi tablet, Mi Pad 5 series. This driver lightly based on downstream implementation [1]. [1] https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/elish-r-oss/drivers/video/backlight/ktz8866.c Signed-off-by: Jianhua Lu Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230120155018.15376-2-lujianhua000@gmail.com commit c8990c3889ea0a052edcff9dd890a3ab28bc5a47 Author: Jianhua Lu Date: Fri Jan 20 23:50:17 2023 +0800 dt-bindings: leds: backlight: Add Kinetic KTZ8866 backlight Add Kinetic KTZ8866 backlight binding documentation. Signed-off-by: Jianhua Lu Reviewed-by: Krzysztof Kozlowski Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230120155018.15376-1-lujianhua000@gmail.com commit deaeeda2051fa280884bf5769021bcdeae5de44e Author: Uwe Kleine-König Date: Fri Jan 20 13:00:18 2023 +0100 backlight: pwm_bl: Don't rely on a disabled PWM emiting inactive state Most but not all PWMs drive the PWM pin to its inactive state when disabled. However if there is no enable_gpio and no regulator the PWM must drive the inactive state to actually disable the backlight. So keep the PWM on in this case. Note that to determine if there is a regulator some effort is required because it might happen that there isn't actually one but the regulator core gave us a dummy. (A nice side effect is that this makes the regulator actually optional even on fully constrained systems.) This fixes backlight disabling e.g. on i.MX6 when an inverted PWM is used. Hint for the future: If this change results in a regression, the bug is in the lowlevel PWM driver. Signed-off-by: Uwe Kleine-König Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230120120018.161103-3-u.kleine-koenig@pengutronix.de commit 00e7e698bff1dfdb74da6aff1d80508cdbde25f9 Author: Uwe Kleine-König Date: Fri Jan 20 13:00:17 2023 +0100 backlight: pwm_bl: Configure pwm only once per backlight toggle When the function pwm_backlight_update_status() was called with brightness > 0, pwm_get_state() was called twice (once directly and once in compute_duty_cycle). Also pwm_apply_state() was called twice (once in pwm_backlight_power_on() and once directly). Optimize this to do both calls only once. Note that with this affects the order of regulator and PWM setup. It's not expected to have a relevant effect on hardware. The rationale for this is that the regulator (and the GPIO) are reasonable to switch in pwm_backlight_power_on()/pwm_backlight_power_off() but the PWM has nothing to do with power. (The post_pwm_on_delay and pwm_off_delay are still there though.) Signed-off-by: Uwe Kleine-König Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230120120018.161103-2-u.kleine-koenig@pengutronix.de commit 744fc2dada5073b8d9822c8c838c8141037ec651 Author: Arnd Bergmann Date: Thu Jan 5 14:46:04 2023 +0100 backlight: Remove pxa tosa support The PXA tosa machine was removed, so this backlight driver is no longer needed. Signed-off-by: Arnd Bergmann Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230105134622.254560-10-arnd@kernel.org commit 32fb2588ce69ec254cfd8269bc31d9fbe5b999aa Author: Stephen Kitt Date: Fri Jan 6 17:48:52 2023 +0100 backlight: aat2870: Use backlight helper Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Signed-off-by: Stephen Kitt Reviewed-by: Daniel Thompson Reviewed-by: Sam Ravnborg Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230106164856.1453819-2-steve@sk2.org commit e3b2ac4088126eebcf2e6d5797f9a94bb67e491e Author: Stephen Kitt Date: Fri Jan 6 17:48:54 2023 +0100 backlight: ipaq_micro: Use backlight helper Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Signed-off-by: Stephen Kitt Reviewed-by: Sam Ravnborg Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230106164856.1453819-4-steve@sk2.org commit fef0b89a451fa06bf275dcd31afee09fffea5e17 Author: Stephen Kitt Date: Fri Jan 6 17:48:53 2023 +0100 backlight: arcxcnn: Use backlight helper Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Signed-off-by: Stephen Kitt Reviewed-by: Sam Ravnborg Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230106164856.1453819-3-steve@sk2.org commit 3a396f9859755e822775319516cd71dabc2b4e69 Author: Randy Dunlap Date: Thu Jan 12 22:41:18 2023 -0800 backlight: sky81452: Fix sky81452_bl_platform_data kernel-doc Correct the struct name and add a short struct description to fix the kernel-doc notation. Prevents this kernel-doc warning: drivers/video/backlight/sky81452-backlight.c:64: warning: expecting prototype for struct sky81452_platform_data. Prototype was for struct sky81452_bl_platform_data instead Signed-off-by: Randy Dunlap Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230113064118.30169-1-rdunlap@infradead.org commit 5a7fbe452ad9e4a8988d4c20d7acf148383f8106 Author: Uwe Kleine-König Date: Thu Nov 17 08:21:51 2022 +0100 backlight: pwm_bl: Drop support for legacy PWM probing There is no in-tree user left which relies on legacy probing. So drop support for it which removes another user of the deprecated pwm_request() function. Signed-off-by: Uwe Kleine-König Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221117072151.3789691-1-u.kleine-koenig@pengutronix.de commit 901ae537b7977716dc6d2db34b3a75d64a72ab2b Author: Luca Weiss Date: Tue Nov 1 17:17:59 2022 +0100 dt-bindings: backlight: qcom-wled: Add PMI8950 compatible Document the compatible for the wled block found in PMI8950. Signed-off-by: Luca Weiss Reviewed-by: Daniel Thompson Acked-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221101161801.1058969-1-luca@z3ntu.xyz commit 81bc9eada9e75d011d055505a7a30b760af0455f Author: Yang Yingliang Date: Mon Sep 26 22:20:59 2022 +0800 backlight: ktd253: Switch to use dev_err_probe() helper In the probe path, dev_err() can be replaced with dev_err_probe() which will check if error code is -EPROBE_DEFER and prints the error name. It also sets the defer probe reason which can be checked later through debugfs. It's more simple in error path. Signed-off-by: Yang Yingliang Reviewed-by: Daniel Thompson Reviewed-by: Linus Walleij Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220926142059.2294282-1-yangyingliang@huawei.com commit 3755b46a1bf47a6778f4ce33def1e6122796f57c Author: Miaoqian Lin Date: Thu Dec 15 11:19:01 2022 +0400 backlight: backlight: Fix doc for backlight_device_get_by_name backlight_put() has been dropped, we should call put_device() to drop the reference taken by backlight_device_get_by_name(). Fixes: 0f6a3256fd81 ("backlight: backlight: Drop backlight_put()") Signed-off-by: Miaoqian Lin Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221215071902.424005-1-linmq006@gmail.com commit 7c15430822e71e90203d87e6d0cfe83fa058b0dc Author: Len Brown Date: Wed Feb 1 12:32:01 2023 -0600 wifi: ath11k: allow system suspend to survive ath11k When ath11k runs into internal errors upon suspend, it returns an error code to pci_pm_suspend, which aborts the entire system suspend. The driver should not abort system suspend, but should keep its internal errors to itself, and allow the system to suspend. Otherwise, a user can suspend a laptop by closing the lid and sealing it into a case, assuming that is will suspend, rather than heating up and draining the battery when in transit. In practice, the ath11k device seems to have plenty of transient errors, and subsequent suspend cycles after this failure often succeed. https://bugzilla.kernel.org/show_bug.cgi?id=216968 Fixes: d1b0c33850d29 ("ath11k: implement suspend for QCA6390 PCI devices") Signed-off-by: Len Brown Cc: stable@vger.kernel.org Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230201183201.14431-1-len.brown@intel.com commit 904e28c6de083fa4834cdbd0026470ddc30676fc Merge: a738688177dcd 2f7f4efb94117 Author: Benjamin Tissoires Date: Wed Feb 22 10:44:31 2023 +0100 Merge branch 'for-6.3/hid-bpf' into for-linus Initial support of HID-BPF (Benjamin Tissoires) The history is a little long for this series, as it was intended to be sent for v6.2. However some last minute issues forced us to postpone it to v6.3. Conflicts: * drivers/hid/i2c-hid/Kconfig: commit bf7660dab30d ("HID: stop drivers from selecting CONFIG_HID") conflicts with commit 2afac81dd165 ("HID: fix I2C_HID not selected when I2C_HID_OF_ELAN is") the resolution is simple enough: just drop the "default" and "select" lines as the new commit from Arnd is doing commit a738688177dcdffe8064dc5ecac6ec4431b6b951 Merge: b838d36fa73c1 f5379a01d6617 Author: Benjamin Tissoires Date: Wed Feb 22 10:41:39 2023 +0100 Merge branch 'for-6.3/uclogic' into for-linus UClogic assorted fixes and new devices support (José Expósito) commit b838d36fa73c1584d814f08c3a6d4b9582418a02 Merge: 52bb0598b3ed5 9cd61c8179781 Author: Benjamin Tissoires Date: Wed Feb 22 10:41:06 2023 +0100 Merge branch 'for-6.3/steam' into for-linus Add Steam Deck support (Vicki Pfau) commit 52bb0598b3ed50c7e729f4a2c8006c60931f5e6e Merge: c21c9feed40e8 6f7dbbd5a9d79 Author: Benjamin Tissoires Date: Wed Feb 22 10:40:03 2023 +0100 Merge branch 'for-6.3/sony' into for-linus - enforce DS4 controllers to use hid-playstation (Roderick Colenbrander) - various hid-playstation gyro fixes (Roderick Colenbrander) commit c21c9feed40e8e64ad73d81acaecf6feaf860300 Merge: 3ba2824ca2e38 03a86105556e2 Author: Benjamin Tissoires Date: Wed Feb 22 10:39:05 2023 +0100 Merge branch 'for-6.3/multitouch' into for-linus Allow to pass quirks from i2c-hid to hid-multitouch (Allen Ballway & Dmitry Torokhov) commit 3ba2824ca2e38c4fa80086a91f09f2187ea120ef Merge: a74749efb4125 47e91fdfa5111 Author: Benjamin Tissoires Date: Wed Feb 22 10:38:38 2023 +0100 Merge branch 'for-6.3/mcp2221' into for-linus prevent UAF in delayed work (Benjamin Tissoires) commit a74749efb41253853a96815710a860591f7a03d9 Merge: 0f7566c7e5518 1b136aeb3c4a1 Author: Benjamin Tissoires Date: Wed Feb 22 10:37:02 2023 +0100 Merge branch 'for-6.3/logitech' into for-linus - HID++ fixes for scroll wheel, protocol and debug (Bastien Nocera) - add support of Logitech G923 Xbox Edition steering wheel (Walt Holman) commit 0f7566c7e55183b0310e291a94840ba23451322a Merge: 2818ccb42a25a eb16f59e8e584 Author: Benjamin Tissoires Date: Wed Feb 22 10:34:51 2023 +0100 Merge branch 'for-6.3/i2c-hid' into for-linus - dev_dbg cleanup (Thomas Weißschuh) - cleanup i2c-hid-acpi (Andy Shevchenko) - goodix: revert/fixes for an actual production device compared to the manufacturer sample (Douglas Anderson) commit 2818ccb42a25a73465b8c9158ffccdef8e43699d Merge: 1f3a957344010 f1f73651a0849 Author: Benjamin Tissoires Date: Wed Feb 22 10:33:09 2023 +0100 Merge branch 'for-6.3/hid-sensor' into for-linus Allow more custom IIO sensors through HID (Philipp Jungkamp) commit 1f3a95734401085fe2e2cfc1a004d58114268c1f Merge: 33238632295e6 f5cd71cfdb5c8 Author: Benjamin Tissoires Date: Wed Feb 22 10:32:22 2023 +0100 Merge branch 'for-6.3/evision' into for-linus New hid-evision driver for EVision keyboards (Philippe Valembois) commit 33238632295e6f1e7176b77ab6aa9ed6c0b86366 Merge: 94109c9f237d4 b94335f899542 Author: Benjamin Tissoires Date: Wed Feb 22 10:31:52 2023 +0100 Merge branch 'for-6.3/bigben' into for-linus UAF protection in work struct (Pietro Borrello) commit 94109c9f237d4f5b3148c7242b020f9485b55cf0 Merge: 06db2af35e5f4 4ab3a086d10ee Author: Benjamin Tissoires Date: Wed Feb 22 10:30:47 2023 +0100 Merge branch 'for-6.3/asus' into for-linus UAF protection in work struct (Pietro Borrello) commit 06db2af35e5f44cebf36c1dc122f5769f630d2f8 Merge: 0b028189d1019 3f16ba1c0768d Author: Benjamin Tissoires Date: Wed Feb 22 10:27:57 2023 +0100 Merge branch 'for-6.3/hid-core' into for-linus - constify hid_ll_driver (Thomas Weißschuh) - map standard Battery System Charging to upower (José Expósito) - couple of assorted fixes and new handling of HID usages (Jingyuan Liang & Ronald Tschalär) commit 0af8c09c896810879387decfba8c942994bb61f5 Author: Pavel Tikhomirov Date: Mon Feb 13 12:25:05 2023 +0800 netfilter: x_tables: fix percpu counter block leak on error path when creating new netns Here is the stack where we allocate percpu counter block: +-< __alloc_percpu +-< xt_percpu_counter_alloc +-< find_check_entry # {arp,ip,ip6}_tables.c +-< translate_table And it can be leaked on this code path: +-> ip6t_register_table +-> translate_table # allocates percpu counter block +-> xt_register_table # fails there is no freeing of the counter block on xt_register_table fail. Note: xt_percpu_counter_free should be called to free it like we do in do_replace through cleanup_entry helper (or in __ip6t_unregister_table). Probability of hitting this error path is low AFAICS (xt_register_table can only return ENOMEM here, as it is not replacing anything, as we are creating new netns, and it is hard to imagine that all previous allocations succeeded and after that one in xt_register_table failed). But it's worth fixing even the rare leak. Fixes: 71ae0dff02d7 ("netfilter: xtables: use percpu rule counters") Signed-off-by: Pavel Tikhomirov Signed-off-by: Pablo Neira Ayuso commit 4414a7ab80cebf715045e3c4d465feefbad21139 Author: Liang He Date: Thu Jan 5 14:10:55 2023 +0800 mfd: arizona: Use pm_runtime_resume_and_get() to prevent refcnt leak In arizona_clk32k_enable(), we should use pm_runtime_resume_and_get() as pm_runtime_get_sync() will increase the refcnt even when it returns an error. Signed-off-by: Liang He Acked-by: Charles Keepax Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230105061055.1509261-1-windhl@126.com commit 7d1e3bd94828ad9fc86f55253cd6fec8edd65394 Author: Jeremy Kerr Date: Thu Jan 5 08:50:10 2023 +0800 mfd: syscon: Allow reset control for syscon devices Simple syscon devices may require deassertion of a reset signal in order to access their register set. Rather than requiring a custom driver to implement this, we can use the generic "resets" specifiers to link a reset line to the syscon. This change adds an optional reset line to the syscon device description, and deasserts the reset if detected. Signed-off-by: Jeremy Kerr Reviewed-by: Arnd Bergmann Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230105005010.124948-3-jk@codeconstruct.com.au commit 0f4d261989a89aa78f309eb0c5cb816028182bca Author: Jeremy Kerr Date: Thu Jan 5 08:50:09 2023 +0800 dt-bindings: mfd/syscon: Add resets property Simple syscon devices may require deassertion of a reset signal in order to access their register set. This change adds the `resets` property from reset.yaml#/properties/resets (referenced through core.yaml), specifying a maxItems of 1 for a single (optional) reset descriptor. This will allow a future change to the syscon driver to implement reset control. Signed-off-by: Jeremy Kerr Acked-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230105005010.124948-2-jk@codeconstruct.com.au commit 8e993c5888fa7131b384f3c8ec710209b7be78e6 Author: Brad Larson Date: Wed Jan 18 19:51:26 2023 -0800 dt-bindings: mfd: syscon: Add amd,pensando-elba-syscon compatible Add the AMD Pensando Elba SoC system registers compatible Signed-off-by: Brad Larson Acked-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230119035136.21603-6-blarson@amd.com commit 484cd9c0ec63b807227c44c10e47330eba136dff Author: Matti Lehtimäki Date: Thu Jan 12 22:26:07 2023 +0200 dt-bindings: mfd: qcom,tcsr: Add compatible for MSM8226 Document the qcom,msm8226-tcsr compatible. Signed-off-by: Matti Lehtimäki Acked-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230112202612.791455-5-matti.lehtimaki@gmail.com commit 81435ed2bdea54bef20a898827b127d8ce087495 Author: Lee Jones Date: Mon Jan 9 17:26:36 2023 +0000 mfd: simple-mfd-i2c: Fix incoherent comment regarding DT registration Signed-off-by: Lee Jones commit 1b1305e95e85624f538ec56db9acf88e2d3d7397 Author: Samuel Holland Date: Wed Dec 28 10:27:52 2022 -0600 mfd: axp20x: Switch to the sys-off handler API This removes a layer of indirection through pm_power_off() and allows the PMIC handler to be used as a fallback when firmware power off fails. This happens on boards like the Clockwork DevTerm R-01 where OpenSBI does not know how to use the PMIC to power off the board. Move the check for AXP288 to avoid registering a dummy handler. Signed-off-by: Samuel Holland [Lee: Removed superfluous new line] Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221228162752.14204-1-samuel@sholland.org commit 88a32c2c5e98d72765846db83c1739e7b036770a Author: Geert Uytterhoeven Date: Mon Jan 9 14:33:22 2023 +0100 mfd: core: Spelling s/compement/complement/ Fix a misspelling of "complement". Signed-off-by: Geert Uytterhoeven Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/aa7abd7103a0e4be954ea63de78f12e8251b2964.1673271092.git.geert+renesas@glider.be commit 8aa06dbe50a612e32b5c367421e2a51ae3f1acc9 Author: Jiapeng Chong Date: Tue Dec 27 16:18:05 2022 +0800 mfd: max8925: Remove the unused function irq_to_max8925() The function irq_to_max8925() is defined in the max8925-core.c file, but not called elsewhere, so remove this unused function. drivers/mfd/max8925-core.c:472:40: warning: unused function 'irq_to_max8925'. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3561 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221227081805.54185-1-jiapeng.chong@linux.alibaba.com commit 49184844b6653292b2954304005357ef6828b0fa Author: Jiapeng Chong Date: Tue Dec 27 16:19:21 2022 +0800 mfd: qcom-pm8xxx: Remove set but unused variable 'rev' Variable rev is not effectively used in the function, so delete it. drivers/mfd/qcom-pm8xxx.c:513:6: warning: variable 'rev' set but not used. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3558 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221227081921.56448-1-jiapeng.chong@linux.alibaba.com commit 0b05327947dc68e8901477ced9ea6f8e3fb0c5f5 Author: Nick Hawkins Date: Fri Dec 16 12:35:29 2022 -0600 dt-bindings: mfd: syscon: Document GXP register compatible Document hpe,gxp-sysreg compatible for GXP registers. Signed-off-by: Nick Hawkins Acked-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221216183532.78933-4-nick.hawkins@hpe.com commit 58a3fb991ec21e8cba82062be374c67447496e3a Author: Uwe Kleine-König Date: Mon Dec 12 22:43:52 2022 +0100 mfd: twl4030-power: 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 Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221212214352.3776110-1-u.kleine-koenig@pengutronix.de commit ccc91b3ed3f641efa8e9050c587ef509b0e2be3a Author: Andreas Kemnade Date: Thu Dec 8 22:57:23 2022 +0100 mfd: twl: Fix TWL6032 phy vbus detection TWL6032 has a few charging registers prepended before the charging registers the TWL6030 has. To be able to use common register defines declare the additional registers as additional module. At the moment this affects the access to CHARGERUSB_CTRL1 in phy-twl6030-usb. Without this patch, it is accessing the wrong register on TWL6032. The consequence is that presence of Vbus is not reported. Cc: Bin Liu Cc: Tony Lindgren Signed-off-by: Andreas Kemnade Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221208215723.217557-1-andreas@kemnade.info commit 8b450dcff23aa254844492831a8e2b508a9d522d Author: Qiheng Lin Date: Thu Dec 8 14:15:55 2022 +0800 mfd: pcf50633-adc: Fix potential memleak in pcf50633_adc_async_read() `req` is allocated in pcf50633_adc_async_read(), but adc_enqueue_request() could fail to insert the `req` into queue. We need to check the return value and free it in the case of failure. Fixes: 08c3e06a5eb2 ("mfd: PCF50633 adc driver") Signed-off-by: Qiheng Lin Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221208061555.8776-1-linqiheng@huawei.com commit 3a8678dfa857b671ff56de2573cb236fc6f0f0d2 Author: Lee Jones Date: Tue Dec 6 10:50:38 2022 +0000 MAINTAINERS: Move MFD from a Supported to Maintaied state No one is funding MFD maintenance. S: *Status*, one of the following: Supported: Someone is actually paid to look after this. Maintained: Someone actually looks after it. Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221206105038.124613-1-lee@kernel.org commit 0c8884fe34bb3e2d739c883000691bb665c01843 Author: Bhanu Prakash Maiya Date: Wed Dec 7 10:40:12 2022 -0700 dt-bindings: mfd: cros-ec: Add compatible string for UART support Add a compatible string to support the UART implementation of the cros ec interface. The driver does not support the reg and interrupt properties, so exempt them from being required for UART compatible nodes. Signed-off-by: Bhanu Prakash Maiya Co-developed-by: Mark Hasemeyer Signed-off-by: Mark Hasemeyer Acked-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221207104005.v10.2.I9e018ecb8bdf341648cb64417085978ff0d22a46@changeid commit 8cc5e62bae28d02f706a6abc8fd804609579964c Author: ye xingchen Date: Fri Dec 2 15:28:36 2022 +0800 mfd: Use sysfs_emit() to instead of scnprintf() Follow the advice of the Documentation/filesystems/sysfs.rst and show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: ye xingchen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/202212021528368292334@zte.com.cn commit 5ec32a3e4053c1a726b45381d56aa9e39eaf3911 Author: Randy Dunlap Date: Wed Nov 30 17:25:41 2022 -0800 mfd: cs5535: Don't build on UML The cs5535-mfd driver uses CPU-specific data that is not available for ARCH=um builds, so don't allow it to be built for UML. Prevents these build errors: In file included from ../arch/x86/include/asm/olpc.h:7, from ../drivers/mfd/cs5535-mfd.c:17: ../arch/x86/include/asm/geode.h: In function ‘is_geode_gx’: ../arch/x86/include/asm/geode.h:16:31: error: ‘struct cpuinfo_um’ has no member named ‘x86_vendor’ 16 | return ((boot_cpu_data.x86_vendor == X86_VENDOR_NSC) && ../arch/x86/include/asm/geode.h:16:46: error: ‘X86_VENDOR_NSC’ undeclared (first use in this function); did you mean ‘X86_VENDOR_ANY’? 16 | return ((boot_cpu_data.x86_vendor == X86_VENDOR_NSC) && ../arch/x86/include/asm/geode.h:17:31: error: ‘struct cpuinfo_um’ has no member named ‘x86’ 17 | (boot_cpu_data.x86 == 5) && ../arch/x86/include/asm/geode.h:18:31: error: ‘struct cpuinfo_um’ has no member named ‘x86_model’ 18 | (boot_cpu_data.x86_model == 5)); ../arch/x86/include/asm/geode.h: In function ‘is_geode_lx’: ../arch/x86/include/asm/geode.h:23:31: error: ‘struct cpuinfo_um’ has no member named ‘x86_vendor’ 23 | return ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) && ../arch/x86/include/asm/geode.h:23:46: error: ‘X86_VENDOR_AMD’ undeclared (first use in this function); did you mean ‘X86_VENDOR_ANY’? 23 | return ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) && ../arch/x86/include/asm/geode.h:24:31: error: ‘struct cpuinfo_um’ has no member named ‘x86’ 24 | (boot_cpu_data.x86 == 5) && ../arch/x86/include/asm/geode.h:25:31: error: ‘struct cpuinfo_um’ has no member named ‘x86_model’ 25 | (boot_cpu_data.x86_model == 10)); Fixes: 68f5d3f3b654 ("um: add PCI over virtio emulation driver") Signed-off-by: Randy Dunlap Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221201012541.11809-1-rdunlap@infradead.org commit 8781ba7f45695af3ab8e8d1b55a31f527c9201a3 Author: Aren Moynihan Date: Thu Dec 8 17:02:26 2022 -0500 mfd: axp20x: Fix order of pek rise and fall events The power button can get "stuck" if the rising edge and falling edge irq are read in the same pass. This can often be triggered when resuming from suspend if the power button is released before the kernel handles the interrupt. Swapping the order of the rise and fall events makes sure that the press event is handled first, which prevents this situation. Signed-off-by: Aren Moynihan Reviewed-by: Samuel Holland Tested-by: Samuel Holland Acked-by: Chen-Yu Tsai Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221208220225.635414-1-aren@peacevolution.org commit 725a2acd851dbef94a3e68c1a8a1de2862742ecd Author: Neil Armstrong Date: Fri Nov 18 09:24:38 2022 +0100 dt-bindings: mfd: qcom,spmi-pmic: Document PMICs bundled with SM8550 Document compatible for the pm8550, pm8550b, pm8550ve, pm8550vs, pmk8550. pm8010 & pmr735d SPMI PMICs Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221114-narmstrong-sm8550-upstream-spmi-v2-1-b839bf2d558a@linaro.org commit 5d69b181cd0db10dc8327d28ce837b3623cd531a Author: Tom Fitzhenry Date: Mon Jan 2 22:11:47 2023 +1100 mfd: rk808: Re-add rk808-clkout to RK818 Fixes RK818 (e.g. on Pinephone Pro) to register its clock, without which dependent devices (e.g. wifi/BT, via sdio-wifi-pwrseq) fail to probe. This line was removed in commit 3633daacea2e ("mfd: rk808: Permit having multiple PMIC instances"), but only from RK818. Fixes: 3633daacea2e ("mfd: rk808: Permit having multiple PMIC instances") Signed-off-by: Tom Fitzhenry Reviewed-by: Javier Martinez Canillas Acked-by: Neil Armstrong Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230102111147.2580861-1-tom@tom-fitzhenry.me.uk commit 28e1958009cf73166b13551d1b52c6b907f993d8 Merge: 783422d00d7d8 acf63c458b55e Author: Lee Jones Date: Wed Feb 22 08:25:03 2023 +0000 Merge tags 'ib-mfd-extcon-i2c-v6.3' and 'ib-mfd-fpga-hwmon-v6.3-1' into ibs-for-mfd-merged Immutable branch between MFD, Extcon and I2C due for the v6.3 merge window Immutable branch between MFD, FPGA and HWMON due for the v6.3 merge window commit f82cdc37c4bd4ba905bf99ade9782a639b5c12e9 Author: Russell Currey Date: Wed Feb 22 13:17:08 2023 +1100 powerpc/pseries: Avoid hcall in plpks_is_available() on non-pseries plpks_is_available() can be called on any platform via kexec but calls _plpks_get_config() which makes a hcall, which will only work on pseries. Fix this by returning early in plpks_is_available() if hcalls aren't possible. Fixes: 119da30d037d ("powerpc/pseries: Expose PLPKS config values, support additional fields") Reported-by: Murphy Zhou Signed-off-by: Russell Currey Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230222021708.146257-1-ruscur@russell.cc commit 901b894af5b933cf6576eec05746f34b46e2ac83 Author: Benjamin Block Date: Tue Feb 21 18:56:00 2023 +0100 scsi: zfcp: Trace when request remove fails after qdio send fails When we fail to send a FSF request in 'zfcp_fsf_req_send()' when calling 'zfcp_qdio_send()' we try to remove the request object from our internal hash table again to prevent keeping a stale memory reference. This removal might still - very much theoretically - fail. To store some evidence of when this happens add a new trace record for this case; tag: 'fsrsrmf'. We reuse the 'ZFCP_DBF_HBA_RES' trace ID for this, but mark all fields other then the request ID with ~0, to make fairly obvious that these are invalid values. This faking has to be done because we don't have a valid request object at this point, and can not safely access any of the memory of the old object - we just failed to find it in our hash table, so it might be gone already. Here is an example of a decoded trace record: Timestamp : 2023-02-17-13:09:12:748140 Area : HBA Subarea : 1 Level : - Exception : 000003ff7ff500c2 CPU ID : 0011 Caller : 0x0 Record ID : 1 Tag : fsrsrmf Request ID : 0x0000000080126ab6 Request status : 0xffffffff FSF cmnd : 0xffffffff FSF sequence no: 0xffffffff FSF issued : 2042-09-18-01:53:47:370495 FSF stat : 0xffffffff FSF stat qual : ffffffff ffffffff ffffffff ffffffff Prot stat : 0xffffffff Prot stat qual : ffffffff ffffffff ffffffff ffffffff Port handle : 0xffffffff LUN handle : 0xffffffff This provides at least some basic evidence that this event happened, and what object was affected. Link: https://lore.kernel.org/r/99b8246b2d71b63fa4f9c56333e2037502f7f5af.1677000450.git.bblock@linux.ibm.com Signed-off-by: Benjamin Block Reviewed-by: Steffen Maier Signed-off-by: Martin K. Petersen commit 3ab01810153b0ca26cfc846ba72996b250adde6d Author: Benjamin Block Date: Tue Feb 21 18:55:59 2023 +0100 scsi: zfcp: Change the type of all fsf request id fields and variables to u64 We use different integer types throughout zfcp to store the FSF request ID and related values; some places use 'unsigned long' and others 'u64'. On s390x these are effectively the same type, but this might cause confusions and is generally inconsistent. The specification for the used hardware specifies this value as a 64-bit number, and ultimately we use this value to communicate with the hardware, so it makes sense to change the type of all these variables to 'u64' where we can. The only exception being when we store it in the 'host_scribble' field of a 'struct scsi_cmnd'; for this case we add a build time check to make sure they are compatible. Link: https://lore.kernel.org/r/9c9cbe5acc2b419a22dce2fed847e3db91b60201.1677000450.git.bblock@linux.ibm.com Signed-off-by: Benjamin Block Reviewed-by: Steffen Maier Signed-off-by: Martin K. Petersen commit 79f9abd64719cc71ba78a76574e21dc8266c65a3 Author: Benjamin Block Date: Tue Feb 21 18:55:58 2023 +0100 scsi: zfcp: Make the type for accessing request hashtable buckets size_t The appropriate type for array indices is 'size_t' and the current implementation in 'zfcp_reqlist.h' mixes 'int' and 'unsigned int' in different places to access the hashtable buckets of our internal request hash table. To prevent any confusion, change all places to 'size_t'. Link: https://lore.kernel.org/r/64afe93f6263c6b07815937826cd7d5fc4f1a674.1677000450.git.bblock@linux.ibm.com Signed-off-by: Benjamin Block Reviewed-by: Steffen Maier Signed-off-by: Martin K. Petersen commit 2702812ae33b38898de6d950cdb6a03888d001af Author: Bart Van Assche Date: Fri Feb 10 11:32:58 2023 -0800 scsi: ufs: core: Simplify ufshcd_execute_start_stop() Use scsi_execute_cmd() instead of open-coding it. Link: https://lore.kernel.org/r/20230210193258.4004923-4-bvanassche@acm.org Cc: Mike Christie Cc: John Garry Signed-off-by: Bart Van Assche Reviewed-by: John Garry Reviewed-by: Asutosh Das Signed-off-by: Martin K. Petersen commit 93bc4a5d00e472003ae983bb21febd2519a64f62 Author: Bart Van Assche Date: Fri Feb 10 11:32:57 2023 -0800 scsi: ufs: core: Rely on the block layer for setting RQF_PM Do not set RQF_PM explicitly since scsi_alloc_request() sets it indirectly if BLK_MQ_REQ_PM is set. The call chain for the code that sets RQF_PM is as follows: scsi_alloc_request() blk_mq_alloc_request() __blk_mq_alloc_requests() blk_mq_rq_ctx_init() if (data->flags & BLK_MQ_REQ_PM) data->rq_flags |= RQF_PM; Link: https://lore.kernel.org/r/20230210193258.4004923-3-bvanassche@acm.org Cc: Mike Christie Cc: John Garry Reviewed-by: John Garry Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 35cd2f5542df569122d48caf606b972642012c50 Author: Bart Van Assche Date: Fri Feb 10 11:32:56 2023 -0800 scsi: core: Extend struct scsi_exec_args Allow SCSI LLDs to specify SCMD_* flags. Link: https://lore.kernel.org/r/20230210193258.4004923-2-bvanassche@acm.org Cc: Mike Christie Cc: John Garry Reviewed-by: John Garry Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 442336a5a999d4aae6221e3496dad071a152b1fb Author: Bo Liu Date: Fri Feb 17 03:30:46 2023 -0500 scsi: lpfc: Fix double word in comments Remove the repeated word "the" in comments. [mkp: fixed additional typos in the changed lines] Link: https://lore.kernel.org/r/20230217083046.4090-1-liubo03@inspur.com Signed-off-by: Bo Liu Reviewed-by: Randy Dunlap Signed-off-by: Martin K. Petersen commit fc663711b94468f4e1427ebe289c9f05669699c9 Author: Bart Van Assche Date: Fri Feb 10 12:52:00 2023 -0800 scsi: core: Remove the /proc/scsi/${proc_name} directory earlier Remove the /proc/scsi/${proc_name} directory earlier to fix a race condition between unloading and reloading kernel modules. This fixes a bug introduced in 2009 by commit 77c019768f06 ("[SCSI] fix /proc memory leak in the SCSI core"). Fix the following kernel warning: proc_dir_entry 'scsi/scsi_debug' already registered WARNING: CPU: 19 PID: 27986 at fs/proc/generic.c:376 proc_register+0x27d/0x2e0 Call Trace: proc_mkdir+0xb5/0xe0 scsi_proc_hostdir_add+0xb5/0x170 scsi_host_alloc+0x683/0x6c0 sdebug_driver_probe+0x6b/0x2d0 [scsi_debug] really_probe+0x159/0x540 __driver_probe_device+0xdc/0x230 driver_probe_device+0x4f/0x120 __device_attach_driver+0xef/0x180 bus_for_each_drv+0xe5/0x130 __device_attach+0x127/0x290 device_initial_probe+0x17/0x20 bus_probe_device+0x110/0x130 device_add+0x673/0xc80 device_register+0x1e/0x30 sdebug_add_host_helper+0x1a7/0x3b0 [scsi_debug] scsi_debug_init+0x64f/0x1000 [scsi_debug] do_one_initcall+0xd7/0x470 do_init_module+0xe7/0x330 load_module+0x122a/0x12c0 __do_sys_finit_module+0x124/0x1a0 __x64_sys_finit_module+0x46/0x50 do_syscall_64+0x38/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Link: https://lore.kernel.org/r/20230210205200.36973-3-bvanassche@acm.org Cc: Alan Stern Cc: Yi Zhang Cc: stable@vger.kernel.org Fixes: 77c019768f06 ("[SCSI] fix /proc memory leak in the SCSI core") Reported-by: Yi Zhang Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit f4407e6033a69ff633ee9d6acf6d241223c7c9fb Author: Bart Van Assche Date: Fri Feb 10 12:51:59 2023 -0800 scsi: core: Fix a source code comment Fix an incorrect reference to the scsi_remove_host() function in a source code comment. Link: https://lore.kernel.org/r/20230210205200.36973-2-bvanassche@acm.org Fixes: b49493f99690 ("Fix a memory leak in scsi_host_dev_release()") Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 5794a3902bde986ade963cdf4db98b6baa433d20 Author: Jesper Juhl Date: Thu Feb 16 01:51:30 2023 +0100 scsi: cxgbi: Remove unneeded version.h include Remove unneeded version.h include pointed out by 'make versioncheck'. Link: https://lore.kernel.org/r/820137c2-decc-3d78-f170-7f1c0571fbb7@gmail.com Signed-off-by: Jesper Juhl Signed-off-by: Martin K. Petersen commit e0aa38c444f2fcf1fceb4fef7902209dd25b48ea Author: Jesper Juhl Date: Thu Feb 16 01:51:30 2023 +0100 scsi: qedi: Remove unneeded version.h include Remove unneeded version.h include pointed out by 'make versioncheck'. Link: https://lore.kernel.org/r/820137c2-decc-3d78-f170-7f1c0571fbb7@gmail.com Signed-off-by: Jesper Juhl Signed-off-by: Martin K. Petersen commit 66b381d874fa440dbcd20e1a9078849f7dd2ff4c Author: Jesper Juhl Date: Thu Feb 16 01:51:30 2023 +0100 scsi: mpi3mr: Remove unneeded version.h include Remove unneeded version.h include pointed out by 'make versioncheck'. Link: https://lore.kernel.org/r/820137c2-decc-3d78-f170-7f1c0571fbb7@gmail.com Signed-off-by: Jesper Juhl Signed-off-by: Martin K. Petersen commit e39ea831ebad4ab15c4748cb62a397a8abcca36e Author: Shin'ichiro Kawasaki Date: Tue Feb 14 09:50:19 2023 +0900 scsi: mpi3mr: Fix missing mrioc->evtack_cmds initialization Commit c1af985d27da ("scsi: mpi3mr: Add Event acknowledgment logic") introduced an array mrioc->evtack_cmds but initialization of the array elements was missed. They are just zero cleared. The function mpi3mr_complete_evt_ack() refers host_tag field of the elements. Due to the zero value of the host_tag field, the function calls clear_bit() for mrico->evtack_cmds_bitmap with wrong bit index. This results in memory access to invalid address and "BUG: KASAN: use-after-free". This BUG was observed at eHBA-9600 firmware update to version 8.3.1.0. To fix it, add the missing initialization of mrioc->evtack_cmds. Link: https://lore.kernel.org/r/20230214005019.1897251-5-shinichiro.kawasaki@wdc.com Cc: stable@vger.kernel.org Fixes: c1af985d27da ("scsi: mpi3mr: Add Event acknowledgment logic") Signed-off-by: Shin'ichiro Kawasaki Reviewed-by: Damien Le Moal Acked-by: Sathya Prakash Veerichetty Signed-off-by: Martin K. Petersen commit 339e61565f81a6534afdc18fd854b2e2628bf5db Author: Shin'ichiro Kawasaki Date: Tue Feb 14 09:50:18 2023 +0900 scsi: mpi3mr: Use number of bits to manage bitmap sizes To allocate bitmaps, the mpi3mr driver calculates sizes of bitmaps using byte as unit. However, bitmap helper functions assume that bitmaps are allocated using unsigned long as unit. This gap causes memory access beyond the bitmap sizes and results in "BUG: KASAN: slab-out-of-bounds". The BUG was observed at firmware download to eHBA-9600. Call trace indicated that the out-of-bounds access happened in find_first_zero_bit() called from mpi3mr_send_event_ack() for miroc->evtack_cmds_bitmap. To fix the BUG, do not use bytes to manage bitmap sizes. Instead, use number of bits, and call bitmap helper functions which take number of bits as arguments. For memory allocation, call bitmap_zalloc() instead of kzalloc() and krealloc(). For memory free, call bitmap_free() instead of kfree(). For zero clear, call bitmap_clear() instead of memset(). Remove three fields for bitmap byte sizes in struct scmd_priv which are no longer required. Replace the field dev_handle_bitmap_sz with dev_handle_bitmap_bits to keep number of bits of removepend_bitmap across resize. Link: https://lore.kernel.org/r/20230214005019.1897251-4-shinichiro.kawasaki@wdc.com Fixes: c5758fc72b92 ("scsi: mpi3mr: Gracefully handle online FW update operation") Fixes: e844adb1fbdc ("scsi: mpi3mr: Implement SCSI error handler hooks") Fixes: c1af985d27da ("scsi: mpi3mr: Add Event acknowledgment logic") Fixes: 824a156633df ("scsi: mpi3mr: Base driver code") Signed-off-by: Shin'ichiro Kawasaki Acked-by: Sathya Prakash Veerichetty Signed-off-by: Martin K. Petersen commit eeb270aee3e085411399f129fc14fa04bd6d83cf Author: Shin'ichiro Kawasaki Date: Tue Feb 14 09:50:17 2023 +0900 scsi: mpi3mr: Remove unnecessary memcpy() to alltgt_info->dmi In the function mpi3mr_get_all_tgt_info(), devmap_info points to alltgt_info->dmi then there is no need to memcpy() data from devmap_info to alltgt_info->dmi. Remove the unnecessary memcpy(). This also allows to remove the local variable 'rval' and the goto label 'out'. Link: https://lore.kernel.org/r/20230214005019.1897251-3-shinichiro.kawasaki@wdc.com Cc: stable@vger.kernel.org Fixes: f5e6d5a34376 ("scsi: mpi3mr: Add support for driver commands") Signed-off-by: Shin'ichiro Kawasaki Acked-by: Sathya Prakash Veerichetty Signed-off-by: Martin K. Petersen commit fb428a2005fc1260d18b989cc5199f281617f44d Author: Shin'ichiro Kawasaki Date: Tue Feb 14 09:50:16 2023 +0900 scsi: mpi3mr: Fix issues in mpi3mr_get_all_tgt_info() The function mpi3mr_get_all_tgt_info() has four issues: 1) It calculates valid entry length in alltgt_info assuming the header part of the struct mpi3mr_device_map_info would equal to sizeof(u32). The correct size is sizeof(u64). 2) When it calculates the valid entry length kern_entrylen, it excludes one entry by subtracting 1 from num_devices. 3) It copies num_device by calling memcpy(). Substitution is enough. 4) It does not specify the calculated length to sg_copy_from_buffer(). Instead, it specifies the payload length which is larger than the alltgt_info size. It causes "BUG: KASAN: slab-out-of-bounds". Fix the issues by using the correct header size, removing the subtraction from num_devices, replacing the memcpy() with substitution and specifying the correct length to sg_copy_from_buffer(). Link: https://lore.kernel.org/r/20230214005019.1897251-2-shinichiro.kawasaki@wdc.com Cc: stable@vger.kernel.org Fixes: f5e6d5a34376 ("scsi: mpi3mr: Add support for driver commands") Signed-off-by: Shin'ichiro Kawasaki Acked-by: Sathya Prakash Veerichetty Signed-off-by: Martin K. Petersen commit ae7d45f5283d30274039b95d3e6d53d33c66e991 Author: Tomas Henzl Date: Mon Feb 13 20:37:52 2023 +0100 scsi: mpi3mr: Fix an issue found by KASAN Write only correct size (32 instead of 64 bytes). Link: https://lore.kernel.org/r/20230213193752.6859-1-thenzl@redhat.com Fixes: 42fc9fee116f ("scsi: mpi3mr: Add helper functions to manage device's port") Signed-off-by: Tomas Henzl Acked-by: Sathya Prakash Veerichetty Signed-off-by: Martin K. Petersen commit c6f2e6b6eaaf883df482cb94f302acad9b80a2a4 Author: Kees Cook Date: Sat Feb 4 10:37:16 2023 -0800 scsi: mpi3mr: Replace 1-element array with flex-array Nothing else defined MPI3_NVME_ENCAP_CMD_MAX, so the "command" buffer was being defined as a fake flexible array of size 1. Replace this with a proper flex array. Avoids this GCC 13 warning under -fstrict-flex-arrays=3: In function 'fortify_memset_chk', inlined from 'mpi3mr_build_nvme_sgl' at ../drivers/scsi/mpi3mr/mpi3mr_app.c:693:2, inlined from 'mpi3mr_bsg_process_mpt_cmds.constprop' at ../drivers/scsi/mpi3mr/mpi3mr_app.c:1214:8: ../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); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Link: https://lore.kernel.org/r/20230204183715.never.937-kees@kernel.org Cc: Sumit Saxena Cc: Himanshu Madhani Cc: "Martin K. Petersen" Cc: Stephen Rothwell Cc: kernel test robot Signed-off-by: Kees Cook Signed-off-by: Martin K. Petersen commit ee4e7dfe4ffc9ca50c6875757bd119abfe22b5c5 Author: Arnd Bergmann Date: Tue Feb 14 14:28:08 2023 +0100 scsi: ipr: Work around fortify-string warning The ipr_log_vpd_compact() function triggers a fortified memcpy() warning about a potential string overflow with all versions of clang: In file included from drivers/scsi/ipr.c:43: In file included from include/linux/string.h:254: include/linux/fortify-string.h:520:4: error: call to '__write_overflow_field' declared with 'warning' attribute: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror,-Wattribute-warning] __write_overflow_field(p_size_field, size); ^ include/linux/fortify-string.h:520:4: error: call to '__write_overflow_field' declared with 'warning' attribute: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror,-Wattribute-warning] 2 errors generated. I don't see anything actually wrong with the function, but this is the only instance I can reproduce of the fortification going wrong in the kernel at the moment, so the easiest solution may be to rewrite the function into something that does not trigger the warning. Instead of having a combined buffer for vendor/device/serial strings, use three separate local variables and just truncate the whitespace individually. Link: https://lore.kernel.org/r/20230214132831.2118392-1-arnd@kernel.org Cc: Kees Cook Fixes: 8cf093e275d0 ("[SCSI] ipr: Improved dual adapter errors") Signed-off-by: Arnd Bergmann Reviewed-by: Damien Le Moal Reviewed-by: Kees Cook Acked-by: Brian King Signed-off-by: Martin K. Petersen commit 3a2d1efaf344c7351945532020774c3fcb134a0a Author: Deepak R Varma Date: Sun Jan 8 21:58:51 2023 +0530 scsi: ipr: Make ipr_probe_ioa_part2() return void Convert function ipr_probe_ioa_part2() to return void instead of int since the current implementation always returns 0 to the caller. The transformation also eliminates the dead code when calling ipr_probe_ioa_part2() function. Issue identified using returnvar Coccinelle semantic patch. Link: https://lore.kernel.org/r/Y7rvQyMOGcPKPTv8@ubun2204.myguest.virtualbox.org Signed-off-by: Deepak R Varma Acked-by: Brian King Signed-off-by: Martin K. Petersen commit 26a02d972bad946ecbaa12131736c8b6d28893f8 Author: Xingui Yang Date: Tue Feb 21 08:10:26 2023 +0000 scsi: sd: Update DIX config every time sd_revalidate_disk() is called If a controller has DIX is enabled and an attached disk is formatted using a protection type supported by the controller, a block integrity profile is registered to enable protected transfers. If the disk is subsequently reformatted to disable PI, and the controller does not support DIX Type 0, this can lead to failures such as this: [142829.032340] hisi_sas_v3_hw 0000:b4:04.0: erroneous completion iptt=2375 task=00000000bea0970c dev id=5 direct-attached phy4 addr=51c20dbaf642a000 CQ hdr: 0x1023 0x50947 0x0 0x20000 Error info: 0x0 0x0 0x4 0x0 [142829.073883] sas: Enter sas_scsi_recover_host busy: 1 failed: 1 [142829.079783] sas: sas_scsi_find_task: aborting task 0x00000000bea0970c [142829.102342] sas: Internal abort: task to dev 51c20dbaf642a000 response: 0x0 status 0x5 [142829.110319] sas: sas_eh_handle_sas_errors: task 0x00000000bea0970c is done [142829.117275] sd 7:0:5:0: [sdc] tag#2375 UNKNOWN(0x2003) Result: hostbyte=0x05 driverbyte=DRIVER_OK cmd_age=0s [142829.127171] sd 7:0:5:0: [sdc] tag#2375 CDB: opcode=0x2a 2a 00 00 00 00 00 00 00 08 00 [142829.135059] I/O error, dev sdc, sector 0 op 0x1:(WRITE) flags 0x18800 phys_seg 1 prio class 2 This is because the block layer integrity profile is currently only set up the first time a disk is discovered. To address this, remove the first_scan check when configuring protection information during revalidate. Also unregister the block integrity profile if DIX is not supported with a given protection type. [mkp: commit description + printk dedup] Link: https://lore.kernel.org/r/20230221081026.24736-1-yangxingui@huawei.com Signed-off-by: Xingui Yang Signed-off-by: Martin K. Petersen commit 5b7c4cabbb65f5c469464da6c5f614cbd7f730f2 Merge: 36289a03bcd3a d1fabc68f8e05 Author: Linus Torvalds Date: Tue Feb 21 18:24:12 2023 -0800 Merge tag 'net-next-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next Pull networking updates from Jakub Kicinski: "Core: - Add dedicated kmem_cache for typical/small skb->head, avoid having to access struct page at kfree time, and improve memory use. - Introduce sysctl to set default RPS configuration for new netdevs. - Define Netlink protocol specification format which can be used to describe messages used by each family and auto-generate parsers. Add tools for generating kernel data structures and uAPI headers. - Expose all net/core sysctls inside netns. - Remove 4s sleep in netpoll if carrier is instantly detected on boot. - Add configurable limit of MDB entries per port, and port-vlan. - Continue populating drop reasons throughout the stack. - Retire a handful of legacy Qdiscs and classifiers. Protocols: - Support IPv4 big TCP (TSO frames larger than 64kB). - Add IP_LOCAL_PORT_RANGE socket option, to control local port range on socket by socket basis. - Track and report in procfs number of MPTCP sockets used. - Support mixing IPv4 and IPv6 flows in the in-kernel MPTCP path manager. - IPv6: don't check net.ipv6.route.max_size and rely on garbage collection to free memory (similarly to IPv4). - Support Penultimate Segment Pop (PSP) flavor in SRv6 (RFC8986). - ICMP: add per-rate limit counters. - Add support for user scanning requests in ieee802154. - Remove static WEP support. - Support minimal Wi-Fi 7 Extremely High Throughput (EHT) rate reporting. - WiFi 7 EHT channel puncturing support (client & AP). BPF: - Add a rbtree data structure following the "next-gen data structure" precedent set by recently added linked list, that is, by using kfunc + kptr instead of adding a new BPF map type. - Expose XDP hints via kfuncs with initial support for RX hash and timestamp metadata. - Add BPF_F_NO_TUNNEL_KEY extension to bpf_skb_set_tunnel_key to better support decap on GRE tunnel devices not operating in collect metadata. - Improve x86 JIT's codegen for PROBE_MEM runtime error checks. - Remove the need for trace_printk_lock for bpf_trace_printk and bpf_trace_vprintk helpers. - Extend libbpf's bpf_tracing.h support for tracing arguments of kprobes/uprobes and syscall as a special case. - Significantly reduce the search time for module symbols by livepatch and BPF. - Enable cpumasks to be used as kptrs, which is useful for tracing programs tracking which tasks end up running on which CPUs in different time intervals. - Add support for BPF trampoline on s390x and riscv64. - Add capability to export the XDP features supported by the NIC. - Add __bpf_kfunc tag for marking kernel functions as kfuncs. - Add cgroup.memory=nobpf kernel parameter option to disable BPF memory accounting for container environments. Netfilter: - Remove the CLUSTERIP target. It has been marked as obsolete for years, and we still have WARN splats wrt races of the out-of-band /proc interface installed by this target. - Add 'destroy' commands to nf_tables. They are identical to the existing 'delete' commands, but do not return an error if the referenced object (set, chain, rule...) did not exist. Driver API: - Improve cpumask_local_spread() locality to help NICs set the right IRQ affinity on AMD platforms. - Separate C22 and C45 MDIO bus transactions more clearly. - Introduce new DCB table to control DSCP rewrite on egress. - Support configuration of Physical Layer Collision Avoidance (PLCA) Reconciliation Sublayer (RS) (802.3cg-2019). Modern version of shared medium Ethernet. - Support for MAC Merge layer (IEEE 802.3-2018 clause 99). Allowing preemption of low priority frames by high priority frames. - Add support for controlling MACSec offload using netlink SET. - Rework devlink instance refcounts to allow registration and de-registration under the instance lock. Split the code into multiple files, drop some of the unnecessarily granular locks and factor out common parts of netlink operation handling. - Add TX frame aggregation parameters (for USB drivers). - Add a new attr TCA_EXT_WARN_MSG to report TC (offload) warning messages with notifications for debug. - Allow offloading of UDP NEW connections via act_ct. - Add support for per action HW stats in TC. - Support hardware miss to TC action (continue processing in SW from a specific point in the action chain). - Warn if old Wireless Extension user space interface is used with modern cfg80211/mac80211 drivers. Do not support Wireless Extensions for Wi-Fi 7 devices at all. Everyone should switch to using nl80211 interface instead. - Improve the CAN bit timing configuration. Use extack to return error messages directly to user space, update the SJW handling, including the definition of a new default value that will benefit CAN-FD controllers, by increasing their oscillator tolerance. New hardware / drivers: - Ethernet: - nVidia BlueField-3 support (control traffic driver) - Ethernet support for imx93 SoCs - Motorcomm yt8531 gigabit Ethernet PHY - onsemi NCN26000 10BASE-T1S PHY (with support for PLCA) - Microchip LAN8841 PHY (incl. cable diagnostics and PTP) - Amlogic gxl MDIO mux - WiFi: - RealTek RTL8188EU (rtl8xxxu) - Qualcomm Wi-Fi 7 devices (ath12k) - CAN: - Renesas R-Car V4H Drivers: - Bluetooth: - Set Per Platform Antenna Gain (PPAG) for Intel controllers. - Ethernet NICs: - Intel (1G, igc): - support TSN / Qbv / packet scheduling features of i226 model - Intel (100G, ice): - use GNSS subsystem instead of TTY - multi-buffer XDP support - extend support for GPIO pins to E823 devices - nVidia/Mellanox: - update the shared buffer configuration on PFC commands - implement PTP adjphase function for HW offset control - TC support for Geneve and GRE with VF tunnel offload - more efficient crypto key management method - multi-port eswitch support - Netronome/Corigine: - add DCB IEEE support - support IPsec offloading for NFP3800 - Freescale/NXP (enetc): - support XDP_REDIRECT for XDP non-linear buffers - improve reconfig, avoid link flap and waiting for idle - support MAC Merge layer - Other NICs: - sfc/ef100: add basic devlink support for ef100 - ionic: rx_push mode operation (writing descriptors via MMIO) - bnxt: use the auxiliary bus abstraction for RDMA - r8169: disable ASPM and reset bus in case of tx timeout - cpsw: support QSGMII mode for J721e CPSW9G - cpts: support pulse-per-second output - ngbe: add an mdio bus driver - usbnet: optimize usbnet_bh() by avoiding unnecessary queuing - r8152: handle devices with FW with NCM support - amd-xgbe: support 10Mbps, 2.5GbE speeds and rx-adaptation - virtio-net: support multi buffer XDP - virtio/vsock: replace virtio_vsock_pkt with sk_buff - tsnep: XDP support - Ethernet high-speed switches: - nVidia/Mellanox (mlxsw): - add support for latency TLV (in FW control messages) - Microchip (sparx5): - separate explicit and implicit traffic forwarding rules, make the implicit rules always active - add support for egress DSCP rewrite - IS0 VCAP support (Ingress Classification) - IS2 VCAP filters (protos, L3 addrs, L4 ports, flags, ToS etc.) - ES2 VCAP support (Egress Access Control) - support for Per-Stream Filtering and Policing (802.1Q, 8.6.5.1) - Ethernet embedded switches: - Marvell (mv88e6xxx): - add MAB (port auth) offload support - enable PTP receive for mv88e6390 - NXP (ocelot): - support MAC Merge layer - support for the the vsc7512 internal copper phys - Microchip: - lan9303: convert to PHYLINK - lan966x: support TC flower filter statistics - lan937x: PTP support for KSZ9563/KSZ8563 and LAN937x - lan937x: support Credit Based Shaper configuration - ksz9477: support Energy Efficient Ethernet - other: - qca8k: convert to regmap read/write API, use bulk operations - rswitch: Improve TX timestamp accuracy - Intel WiFi (iwlwifi): - EHT (Wi-Fi 7) rate reporting - STEP equalizer support: transfer some STEP (connection to radio on platforms with integrated wifi) related parameters from the BIOS to the firmware. - Qualcomm 802.11ax WiFi (ath11k): - IPQ5018 support - Fine Timing Measurement (FTM) responder role support - channel 177 support - MediaTek WiFi (mt76): - per-PHY LED support - mt7996: EHT (Wi-Fi 7) support - Wireless Ethernet Dispatch (WED) reset support - switch to using page pool allocator - RealTek WiFi (rtw89): - support new version of Bluetooth co-existance - Mobile: - rmnet: support TX aggregation" * tag 'net-next-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1872 commits) page_pool: add a comment explaining the fragment counter usage net: ethtool: fix __ethtool_dev_mm_supported() implementation ethtool: pse-pd: Fix double word in comments xsk: add linux/vmalloc.h to xsk.c sefltests: netdevsim: wait for devlink instance after netns removal selftest: fib_tests: Always cleanup before exit net/mlx5e: Align IPsec ASO result memory to be as required by hardware net/mlx5e: TC, Set CT miss to the specific ct action instance net/mlx5e: Rename CHAIN_TO_REG to MAPPED_OBJ_TO_REG net/mlx5: Refactor tc miss handling to a single function net/mlx5: Kconfig: Make tc offload depend on tc skb extension net/sched: flower: Support hardware miss to tc action net/sched: flower: Move filter handle initialization earlier net/sched: cls_api: Support hardware miss to tc action net/sched: Rename user cookie and act cookie sfc: fix builds without CONFIG_RTC_LIB sfc: clean up some inconsistent indentings net/mlx4_en: Introduce flexible array to silence overflow warning net: lan966x: Fix possible deadlock inside PTP net/ulp: Remove redundant ->clone() test in inet_clone_ulp(). ... commit 36289a03bcd3aabdf66de75cb6d1b4ee15726438 Merge: 69308402ca6f5 8b84475318641 Author: Linus Torvalds Date: Tue Feb 21 18:10:50 2023 -0800 Merge tag 'v6.3-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto update from Herbert Xu: "API: - Use kmap_local instead of kmap_atomic - Change request callback to take void pointer - Print FIPS status in /proc/crypto (when enabled) Algorithms: - Add rfc4106/gcm support on arm64 - Add ARIA AVX2/512 support on x86 Drivers: - Add TRNG driver for StarFive SoC - Delete ux500/hash driver (subsumed by stm32/hash) - Add zlib support in qat - Add RSA support in aspeed" * tag 'v6.3-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (156 commits) crypto: x86/aria-avx - Do not use avx2 instructions crypto: aspeed - Fix modular aspeed-acry crypto: hisilicon/qm - fix coding style issues crypto: hisilicon/qm - update comments to match function crypto: hisilicon/qm - change function names crypto: hisilicon/qm - use min() instead of min_t() crypto: hisilicon/qm - remove some unused defines crypto: proc - Print fips status crypto: crypto4xx - Call dma_unmap_page when done crypto: octeontx2 - Fix objects shared between several modules crypto: nx - Fix sparse warnings crypto: ecc - Silence sparse warning tls: Pass rec instead of aead_req into tls_encrypt_done crypto: api - Remove completion function scaffolding tls: Remove completion function scaffolding tipc: Remove completion function scaffolding net: ipv6: Remove completion function scaffolding net: ipv4: Remove completion function scaffolding net: macsec: Remove completion function scaffolding dm: Remove completion function scaffolding ... commit 69308402ca6f5b80a5a090ade0b13bd146891420 Merge: 5f5ce6bcfcc3a 0d9bdd8a55017 Author: Linus Torvalds Date: Tue Feb 21 17:32:50 2023 -0800 Merge tag 'platform-drivers-x86-v6.3-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: Improvements to aid s2idle debugging - Dell WMI-DDV: hwmon support - INT3472 camera sensor power-management: Improve privacy LED support - Intel VSEC: Base TPMI (Topology Aware Register and PM Capsule Interface) support - Mellanox: SN5600 and Nvidia L1 switch support - Microsoft Surface Support: Various cleanups + code improvements - tools/intel-speed-select: Various improvements - Miscellaneous other cleanups / fixes * tag 'platform-drivers-x86-v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (80 commits) platform/x86: nvidia-wmi-ec-backlight: Add force module parameter platform/x86/amd/pmf: Add depends on CONFIG_POWER_SUPPLY platform/x86: dell-ddv: Prefer asynchronous probing platform/x86: dell-ddv: Add hwmon support Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces platform: mellanox: mlx-platform: Move bus shift assignment out of the loop platform: mellanox: mlx-platform: Add mux selection register to regmap platform_data/mlxreg: Add field with mapped resource address platform/mellanox: mlxreg-hotplug: Allow more flexible hotplug events configuration platform: mellanox: Extend all systems with I2C notification callback platform: mellanox: Split logic in init and exit flow platform: mellanox: Split initialization procedure platform: mellanox: Introduce support of new Nvidia L1 switch platform: mellanox: Introduce support for next-generation 800GB/s switch platform: mellanox: Cosmetic changes - rename to more common name platform: mellanox: Change "reset_pwr_converter_fail" attribute platform: mellanox: Introduce support for rack manager switch MAINTAINERS: dell-wmi-sysman: drop Divya Bharathi x86/platform/uv: Make kobj_type structure constant platform/x86: think-lmi: Make kobj_type structure constant ... commit a3c7d6b642e4b4619f220bf43e8b78c34ffaecf1 Author: Guo Ren Date: Tue Jan 31 20:52:59 2023 -0500 riscv: mm: hugetlb: Enable ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP Add HVO support for RISC-V; see commit 6be24bed9da3 ("mm: hugetlb: introduce a new config HUGETLB_PAGE_FREE_VMEMMAP"). This patch is similar to commit 1e63ac088f20 ("arm64: mm: hugetlb: enable HUGETLB_PAGE_FREE_VMEMMAP for arm64"), and riscv's motivation is the same as arm64. The current riscv was ready to enable HVO after fixup, ref commit d33deda095d3 ("riscv/mm: hugepage's PG_dcache_clean flag is only set in head page"). See Documentation/mm/vmemmap_dedup.rst for more details. The HugeTLB VmemmapvOptimization (HVO) defaults to off in Kconfig. Here is the riscv test log: cat /proc/sys/vm/hugetlb_optimize_vmemmap echo 8 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages mount -t hugetlbfs none test/ -o pagesize=2048k Signed-off-by: Guo Ren Signed-off-by: Guo Ren Link: https://lore.kernel.org/linux-riscv/1F5AF29D-708A-483B-A29F-CAEE6F554866@linux.dev/ Acked-by: Muchun Song Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20230201015259.3222524-1-guoren@kernel.org Signed-off-by: Palmer Dabbelt commit 5f5ce6bcfcc3abbaf690fca30a22d0dcf6f36d32 Merge: 239451e90355b b0d8a67715dae Author: Linus Torvalds Date: Tue Feb 21 17:23:39 2023 -0800 Merge tag 'tag-chrome-platform-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome platform updates from Tzung-Bi Shih: "New drivers: - cros_ec_uart for ChromeOS EC protocol over UART - cros_typec_vdm for USB PD Vendor Defined Message Improvements: - Preserve logs as much as possible when EC panics - Shutdown to refrain from potential HW damages when EC panics Fixes: - Fix DP_PORT_VDO to include DP_CAP_RECEPTACLE - Fix a lockdep false positive Cleanups: - Use sysfs_emit*() instead of scnprintf() - Use asm instead of asm-generic for unaligned.h Misc: - Rename module name from cros_ec_typec to cros-ec-typec - Minor fixes" * tag 'tag-chrome-platform-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: (34 commits) platform/chrome: cros_ec_typec: Fix spelling mistake platform/chrome: cros_typec_vdm: Add Attention support platform/chrome: cros_ec: Add VDM attention headers platform/chrome: cros_typec_vdm: Fix VDO copy platform/chrome: cros_ec_typec: allow deferred probe of switch handles platform/chrome: cros_ec_proto: remove big stub objects from stack platform/chrome: cros_ec_uart: fix negative type promoted to high platform/chrome: cros_ec: Use per-device lockdep key platform/chrome: fix kernel-doc warnings for cros_ec_command platform/chrome: fix kernel-doc warning for last_resume_result platform/chrome: fix kernel-doc warning for suspend_timeout_ms platform/chrome: fix kernel-doc warnings for panic notifier platform/chrome: cros_ec_lpc: initialize the buf variable platform/chrome: cros_ec: Fix panic notifier registration platform/chrome: cros_typec_switch: Check for retimer flag platform/chrome: cros_typec_switch: Use fwnode* prop check platform/chrome: cros_typec_vdm: Add VDM send support platform/chrome: cros_typec_vdm: Add VDM reply support platform/chrome: cros_ec_typec: Add initial VDM support platform/chrome: cros_ec_typec: Alter module name with hyphens ... commit 8ac6e619d9d51b3eb5bae817db8aa94e780a0db4 Author: Liao Chang Date: Sun Jan 29 17:42:42 2023 +0800 riscv: Add header include guards to insn.h Add header include guards to insn.h to prevent repeating declaration of any identifiers in insn.h. Fixes: edde5584c7ab ("riscv: Add SW single-step support for KDB") Signed-off-by: Liao Chang Reviewed-by: Andrew Jones Fixes: c9c1af3f186a ("RISC-V: rename parse_asm.h to insn.h") Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230129094242.282620-1-liaochang1@huawei.com Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit b19aa282c50344bbac8e50592b21bac624c51d5d Merge: 91612cfb17361 00b242509c8f2 Author: Palmer Dabbelt Date: Tue Feb 21 16:53:58 2023 -0800 Merge patch series "riscv: Dump faulting instructions in oops handler" Björn Töpel says: From: Björn Töpel RISC-V does not dump faulting instructions in the oops handler. This series adds "Code:" dumps to the oops output together with scripts/decodecode support. * b4-shazam-merge: scripts/decodecode: Add support for RISC-V riscv: Add instruction dump to RISC-V splats Link: https://lore.kernel.org/r/20230119074738.708301-1-bjorn@kernel.org Signed-off-by: Palmer Dabbelt commit 91612cfb173619b38087449cd3811f9cb4420d94 Author: Jisheng Zhang Date: Mon Jan 16 00:28:11 2023 +0800 riscv: alternative: proceed one more instruction for auipc/jalr pair If we patched auipc + jalr pair, we'd better proceed one more instruction. Andrew pointed out "There's not a problem now, since we're only adding a fixup for jal, not jalr, but we should future-proof this and there's no reason to revisit an already fixed-up instruction anyway." Signed-off-by: Jisheng Zhang Suggested-by: Andrew Jones Reviewed-by: Andrew Jones Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20230115162811.3146-1-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit f3af3b0039fe4760fe89a05beb4a0bebbda25ac8 Merge: 130aee3fd9981 f4b71bff8d858 Author: Palmer Dabbelt Date: Tue Feb 21 16:29:10 2023 -0800 Merge patch series "riscv: improve link and support ARCH_WANT_LD_ORPHAN_WARN" Jisheng Zhang says: This series tries to improve link time handling of riscv: patch1 adds the missing RUNTIME_DISCARD_EXIT as suggested by Masahiro. Similar as other architectures such as x86, arm64 and so on, enable ARCH_WANT_LD_ORPHAN_WARN to enable linker orphan warnings to prevent from missing any new sections in future. So the following two patches are preparation ones, and the last patch finally selects ARCH_WANT_LD_ORPHAN_WARN * b4-shazam-merge: riscv: select ARCH_WANT_LD_ORPHAN_WARN for !XIP_KERNEL riscv: vmlinux.lds.S: explicitly catch .init.bss sections from EFI stub riscv: vmlinux.lds.S: explicitly catch .riscv.attributes sections riscv: vmlinux.lds.S: explicitly catch .rela.dyn symbols riscv: lds: define RUNTIME_DISCARD_EXIT Link: https://lore.kernel.org/r/20230119155417.2600-1-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit 130aee3fd9981297ff9354e5d5609cd59aafbbea Author: Mattias Nissler Date: Wed Feb 15 14:48:28 2023 +0000 riscv: Avoid enabling interrupts in die() While working on something else, I noticed that the kernel would start accepting interrupts again after crashing in an interrupt handler. Since the kernel is already in inconsistent state, enabling interrupts is dangerous and opens up risk of kernel state deteriorating further. Interrupts do get enabled via what looks like an unintended side effect of spin_unlock_irq, so switch to the more cautious spin_lock_irqsave/spin_unlock_irqrestore instead. Fixes: 76d2a0493a17 ("RISC-V: Init and Halt Code") Signed-off-by: Mattias Nissler Reviewed-by: Björn Töpel Link: https://lore.kernel.org/r/20230215144828.3370316-1-mnissler@rivosinc.com Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 416721ff05fddc58ca531b6f069de250301de6e5 Author: Björn Töpel Date: Tue Feb 14 17:25:15 2023 +0100 riscv, mm: Perform BPF exhandler fixup on page fault Commit 21855cac82d3 ("riscv/mm: Prevent kernel module to access user memory without uaccess routines") added early exits/deaths for page faults stemming from accesses to user-space without using proper uaccess routines (where sstatus.SUM is set). Unfortunatly, this is too strict for some BPF programs, which relies on BPF exhandler fixups. These BPF programs loads "BTF pointers". A BTF pointers could either be a valid kernel pointer or NULL, but not a userspace address. Resolve the problem by calling the fixup handler in the early exit path. Fixes: 21855cac82d3 ("riscv/mm: Prevent kernel module to access user memory without uaccess routines") Signed-off-by: Björn Töpel Link: https://lore.kernel.org/r/20230214162515.184827-1-bjorn@kernel.org Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 9493e6f3ce02f44c21aa19f3cbf3b9aa05479d06 Author: Conor Dooley Date: Sun Feb 12 19:47:36 2023 +0000 RISC-V: take text_mutex during alternative patching Guenter reported a splat during boot, that Samuel pointed out was the lockdep assertion failing in patch_insn_write(): WARNING: CPU: 0 PID: 0 at arch/riscv/kernel/patch.c:63 patch_insn_write+0x222/0x2f6 epc : patch_insn_write+0x222/0x2f6 ra : patch_insn_write+0x21e/0x2f6 epc : ffffffff800068c6 ra : ffffffff800068c2 sp : ffffffff81803df0 gp : ffffffff81a1ab78 tp : ffffffff81814f80 t0 : ffffffffffffe000 t1 : 0000000000000001 t2 : 4c45203a76637369 s0 : ffffffff81803e40 s1 : 0000000000000004 a0 : 0000000000000000 a1 : ffffffffffffffff a2 : 0000000000000004 a3 : 0000000000000000 a4 : 0000000000000001 a5 : 0000000000000000 a6 : 0000000000000000 a7 : 0000000052464e43 s2 : ffffffff80b4889c s3 : 000000000000082c s4 : ffffffff80b48828 s5 : 0000000000000828 s6 : ffffffff8131a0a0 s7 : 0000000000000fff s8 : 0000000008000200 s9 : ffffffff8131a520 s10: 0000000000000018 s11: 000000000000000b t3 : 0000000000000001 t4 : 000000000000000d t5 : ffffffffd8180000 t6 : ffffffff81803bc8 status: 0000000200000100 badaddr: 0000000000000000 cause: 0000000000000003 [] patch_insn_write+0x222/0x2f6 [] patch_text_nosync+0xc/0x2a [] riscv_cpufeature_patch_func+0x52/0x98 [] _apply_alternatives+0x46/0x86 [] apply_boot_alternatives+0x3c/0xfa [] setup_arch+0x584/0x5b8 [] start_kernel+0xa2/0x8f8 This issue was exposed by 702e64550b12 ("riscv: fpu: switch has_fpu() to riscv_has_extension_likely()"), as it is the patching in has_fpu() that triggers the splats in Guenter's report. Take the text_mutex before doing any code patching to satisfy lockdep. Fixes: ff689fd21cb1 ("riscv: add RISC-V Svpbmt extension support") Fixes: a35707c3d850 ("riscv: add memory-type errata for T-Head") Fixes: 1a0e5dbd3723 ("riscv: sifive: Add SiFive alternative ports") Reported-by: Guenter Roeck Link: https://lore.kernel.org/all/20230212154333.GA3760469@roeck-us.net/ Signed-off-by: Conor Dooley Reviewed-by: Samuel Holland Tested-by: Guenter Roeck Link: https://lore.kernel.org/r/20230212194735.491785-1-conor@kernel.org Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit dac8bf14bb49aecd1de99ebb5498fa03152f2d40 Author: Andrew Jones Date: Thu Feb 9 13:36:36 2023 +0100 riscv: hwcap: Don't alphabetize ISA extension IDs While the comment above the ISA extension ID definitions says "Entries are sorted alphabetically.", this stopped being good advice with commit d8a3d8a75206 ("riscv: hwcap: make ISA extension ids can be used in asm"), as we now use macros instead of enums. Reshuffling defines is error-prone, so, since they don't need to be in any particular order, change the advice to just adding new extensions at the bottom. Also, take the opportunity to change spaces to tabs, merge three comments into one, and move the base and max defines into more logical locations wrt the ID definitions. Signed-off-by: Andrew Jones Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230209123636.123537-1-ajones@ventanamicro.com Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 1eac28201ac0725192f5ced34192d281a06692e5 Author: Heiko Stuebner Date: Wed Feb 8 23:53:27 2023 +0100 RISC-V: fix ordering of Zbb extension As Andrew reported, Zb* comes after Zi* according 27.11 "Subset Naming Convention" so fix the ordering accordingly. Reported-by: Andrew Jones Signed-off-by: Heiko Stuebner Reviewed-by: Conor Dooley Reviewed-by: Andrew Jones Tested-by: Conor Dooley Link: https://lore.kernel.org/r/20230208225328.1636017-2-heiko@sntech.de Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 9ddfc3cd806081ce1f6c9c2f988cbb031f35d28f Author: Andy Chiu Date: Mon Feb 6 04:04:40 2023 -0500 riscv: jump_label: Fixup unaligned arch_static_branch function Runtime code patching must be done at a naturally aligned address, or we may execute on a partial instruction. We have encountered problems traced back to static jump functions during the test. We switched the tracer randomly for every 1~5 seconds on a dual-core QEMU setup and found the kernel sucking at a static branch where it jumps to itself. The reason is that the static branch was 2-byte but not 4-byte aligned. Then, the kernel would patch the instruction, either J or NOP, with two half-word stores if the machine does not have efficient unaligned accesses. Thus, moments exist where half of the NOP mixes with the other half of the J when transitioning the branch. In our particular case, on a little-endian machine, the upper half of the NOP was mixed with the lower part of the J when enabling the branch, resulting in a jump that jumped to itself. Conversely, it would result in a HINT instruction when disabling the branch, but it might not be observable. ARM64 does not have this problem since all instructions must be 4-byte aligned. Fixes: ebc00dde8a97 ("riscv: Add jump-label implementation") Link: https://lore.kernel.org/linux-riscv/20220913094252.3555240-6-andy.chiu@sifive.com/ Reviewed-by: Greentime Hu Signed-off-by: Andy Chiu Signed-off-by: Guo Ren Link: https://lore.kernel.org/r/20230206090440.1255001-1-guoren@kernel.org Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 2350bd192fa2d9ffa7a0dc7db12699c0f71af7f8 Author: Palmer Dabbelt Date: Thu Feb 2 15:38:32 2023 -0800 RISC-V: Only provide the single-letter extensions in HWCAP The recent refactoring led to us leaking some HWCAP bits to userspace that didn't make much sense. With any luck we'll have a better scheme soon, but for now just mask off those bits to avoid polluting userspace. Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20230202233832.11036-1-palmer@rivosinc.com Signed-off-by: Palmer Dabbelt commit b49f700668fff7565b945dce823def79bff59bb0 Author: Sergey Matyukevich Date: Mon Jan 30 00:18:18 2023 +0300 riscv: mm: fix regression due to update_mmu_cache change This is a partial revert of the commit 4bd1d80efb5a ("riscv: mm: notify remote harts about mmu cache updates"). Original commit included two loosely related changes serving the same purpose of fixing stale TLB entries causing user-space application crash: - introduce deferred per-ASID TLB flush for CPUs not running the task - switch to per-ASID TLB flush on all CPUs running the task in update_mmu_cache According to report and discussion in [1], the second part caused a regression on Renesas RZ/Five SoC. For now restore the old behavior of the update_mmu_cache. [1] https://lore.kernel.org/linux-riscv/20220829205219.283543-1-geomatsi@gmail.com/ Fixes: 4bd1d80efb5a ("riscv: mm: notify remote harts about mmu cache updates") Reported-by: "Lad, Prabhakar" Signed-off-by: Sergey Matyukevich Link: trailer, so that it can be parsed with git's trailer functionality? Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230129211818.686557-1-geomatsi@gmail.com Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 239451e90355be68130410ef8fadef8cd130a35d Merge: b8878e5a5c62a 4ecc96cba8d93 Author: Linus Torvalds Date: Tue Feb 21 17:07:39 2023 -0800 Merge tag 'for-linus-6.3-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from Juergen Gross: - help deprecate the /proc/xen files by making the related information available via sysfs - mark the Xen variants of play_dead "noreturn" - support a shared Xen platform interrupt - several small cleanups and fixes * tag 'for-linus-6.3-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: sysfs: make kobj_type structure constant x86/Xen: drop leftover VM-assist uses xen: Replace one-element array with flexible-array member xen/grant-dma-iommu: Implement a dummy probe_device() callback xen/pvcalls-back: fix permanently masked event channel xen: Allow platform PCI interrupt to be shared x86/xen/time: prefer tsc as clocksource when it is invariant x86/xen: mark xen_pv_play_dead() as __noreturn x86/xen: don't let xen_pv_play_dead() return drivers/xen/hypervisor: Expose Xen SIF flags to userspace commit ddad47bfb9552e246ed19ca776d356ee88014af3 Merge: 4090871d77262 eb98192576315 Author: Paolo Bonzini Date: Tue Feb 21 20:00:44 2023 -0500 Merge tag 'kvm-x86-apic-6.3' of https://github.com/kvm-x86/linux into HEAD KVM x86 APIC changes for 6.3: - Remove a superfluous variables from apic_get_tmcct() - Fix various edge cases in x2APIC MSR emulation - Mark APIC timer as expired if its in one-shot mode and the count underflows while the vCPU task was being migrated - Reset xAPIC when userspace forces "impossible" x2APIC => xAPIC transition commit b8878e5a5c62a16ad491ba664a9c1efff62e9a99 Merge: 8bf1a529cd664 b14033a3e6ba7 Author: Linus Torvalds Date: Tue Feb 21 16:59:23 2023 -0800 Merge tag 'hyperv-next-signed-20230220' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull hyperv updates from Wei Liu: - allow Linux to run as the nested root partition for Microsoft Hypervisor (Jinank Jain and Nuno Das Neves) - clean up the return type of callback functions (Dawei Li) * tag 'hyperv-next-signed-20230220' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: x86/hyperv: Fix hv_get/set_register for nested bringup Drivers: hv: Make remove callback of hyperv driver void returned Drivers: hv: Enable vmbus driver for nested root partition x86/hyperv: Add an interface to do nested hypercalls Drivers: hv: Setup synic registers in case of nested root partition x86/hyperv: Add support for detecting nested hypervisor commit 00b242509c8f2b9041c4c16d67d51eae3c9ab1d9 Author: Björn Töpel Date: Thu Jan 19 08:47:38 2023 +0100 scripts/decodecode: Add support for RISC-V RISC-V has some GNU disassembly quirks, e.g. it requires '-D' to properly disassemble .2byte directives similar to Arm [1]. Further, GNU objdump groups RISC-V instruction by 2 or 4 byte chunks, instead doing byte-for-byte. Add the required switches, and translate from short/word to bytes when ARCH is "riscv". An example how to invoke decodecode for RISC-V: $ echo 'Code: bf45 f793 1007 f7d9 50ef 37af d541 b7d9 7097 00c8 (80e7) 6140' | AFLAGS="-march=rv64imac_zicbom_zihintpause" \ ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- ./scripts/decodecode Code: bf45 f793 1007 f7d9 50ef 37af d541 b7d9 7097 00c8 (80e7) 6140 All code ======== 0: bf45 c.j 0xffffffffffffffb0 2: 1007f793 andi a5,a5,256 6: f7d9 c.bnez a5,0xffffffffffffff94 8: 37af50ef jal ra,0xf5382 c: d541 c.beqz a0,0xffffffffffffff94 e: b7d9 c.j 0xffffffffffffffd4 10: 00c87097 auipc ra,0xc87 14:* 614080e7 jalr ra,1556(ra) # 0xc87624 <-- trapping instruction Code starting with the faulting instruction =========================================== 0: 614080e7 jalr ra,1556(ra) [1] https://sourceware.org/bugzilla/show_bug.cgi?id=10263 Signed-off-by: Björn Töpel Tested-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20230119074738.708301-3-bjorn@kernel.org Signed-off-by: Palmer Dabbelt commit eb165bfa8eafc3d306e34b238e53aafb35dce102 Author: Björn Töpel Date: Thu Jan 19 08:47:37 2023 +0100 riscv: Add instruction dump to RISC-V splats Add instruction dump (Code:) output to RISC-V splats. Dump 16b parcels. An example: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 Oops [#1] Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.2.0-rc3-00302-g840ff44c571d-dirty #27 Hardware name: riscv-virtio,qemu (DT) epc : kernel_init+0xc8/0x10e ra : kernel_init+0x70/0x10e epc : ffffffff80bd9a40 ra : ffffffff80bd99e8 sp : ff2000000060bec0 gp : ffffffff81730b28 tp : ff6000007ff00000 t0 : 7974697275636573 t1 : 0000000000000000 t2 : 3030303270393d6e s0 : ff2000000060bee0 s1 : ffffffff81732028 a0 : 0000000000000000 a1 : ff60000080dd1780 a2 : 0000000000000002 a3 : ffffffff8176a470 a4 : 0000000000000000 a5 : 000000000000000a a6 : 0000000000000081 a7 : ff60000080dd1780 s2 : 0000000000000000 s3 : 0000000000000000 s4 : 0000000000000000 s5 : 0000000000000000 s6 : 0000000000000000 s7 : 0000000000000000 s8 : 0000000000000000 s9 : 0000000000000000 s10: 0000000000000000 s11: 0000000000000000 t3 : ffffffff81186018 t4 : 0000000000000022 t5 : 000000000000003d t6 : 0000000000000000 status: 0000000200000120 badaddr: 0000000000000000 cause: 000000000000000f [] ret_from_exception+0x0/0x16 Code: 862a d179 608c a517 0069 0513 2be5 d0ef db2e 47a9 (c11c) a517 ---[ end trace 0000000000000000 ]--- Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b SMP: stopping secondary CPUs ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]--- Signed-off-by: Björn Töpel Link: https://lore.kernel.org/r/20230119074738.708301-2-bjorn@kernel.org Signed-off-by: Palmer Dabbelt commit f4b71bff8d8580eaaf56ec6c5305542a3d3a04bd Author: Jisheng Zhang Date: Thu Jan 19 23:54:17 2023 +0800 riscv: select ARCH_WANT_LD_ORPHAN_WARN for !XIP_KERNEL Now, after that all the sections are explicitly described and declared in vmlinux.lds.S, we can enable ld orphan warnings for !XIP_KERNEL to prevent from missing any new sections in future. Signed-off-by: Jisheng Zhang Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230119155417.2600-6-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit 0ed0031b093b19ee46afc0a5517184932401e074 Author: Jisheng Zhang Date: Thu Jan 19 23:54:16 2023 +0800 riscv: vmlinux.lds.S: explicitly catch .init.bss sections from EFI stub When enabling linker orphan section warning, I got warnings similar as below: ld.lld: warning: ./drivers/firmware/efi/libstub/lib.a(efi-stub-helper.stub.o):(.init.bss) is being placed in '.init.bss' Catch the sections so that we can enable linker orphan section warning. Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20230119155417.2600-5-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit b13e64d94149c0e2981ef5d0bb496b73c48588ca Author: Jisheng Zhang Date: Thu Jan 19 23:54:15 2023 +0800 riscv: vmlinux.lds.S: explicitly catch .riscv.attributes sections When enabling linker orphan section warning, I got warnings similar as below: riscv64-linux-gnu-ld: warning: orphan section `.riscv.attributes' from `init/main.o' being placed in section `.riscv.attributes' While I don't see any usage of .riscv.attributes sections' in kernel now, just catch the sections so that we can enable linker orphan section warning. Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20230119155417.2600-4-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit e5973191a8e33ffadef4882a261130866a1e70dc Author: Jisheng Zhang Date: Thu Jan 19 23:54:14 2023 +0800 riscv: vmlinux.lds.S: explicitly catch .rela.dyn symbols When enabling linker orphan section warning, I got warnings similar as below: riscv64-linux-gnu-ld: warning: orphan section `.rela.text' from `init/main.o' being placed in section `.rela.dyn' Use the approach similar as ARM64 does and declare it in vmlinux.lds.S Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20230119155417.2600-3-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit 7e92586c28a50dd5875655c0d169184a5acb0eee Author: Jisheng Zhang Date: Thu Jan 19 23:54:13 2023 +0800 riscv: lds: define RUNTIME_DISCARD_EXIT riscv discards .exit.* sections at run-time but doesn't define RUNTIME_DISCARD_EXIT. However, the .exit.* sections are still allocated and kept even if the generic DISCARDS would discard the sections due to missing RUNTIME_DISCARD_EXIT, because the DISCARD sits at the end of the linker script. Add the missing RUNTIME_DISCARD_EXIT define so that it still works if we move DISCARD up or even at the beginning of the linker script. Signed-off-by: Jisheng Zhang Suggested-by: Masahiro Yamada Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230119155417.2600-2-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit fdf6491193e411087ae77bcbc6468e3e1cff99ed Author: Florian Westphal Date: Mon Feb 20 17:24:00 2023 +0100 netfilter: ctnetlink: make event listener tracking global pernet tracking doesn't work correctly because other netns might have set NETLINK_LISTEN_ALL_NSID on its event socket. In this case its expected that events originating in other net namespaces are also received. Making pernet-tracking work while also honoring NETLINK_LISTEN_ALL_NSID requires much more intrusive changes both in netlink and nfnetlink, f.e. adding a 'setsockopt' callback that lets nfnetlink know that the event socket entered (or left) ALL_NSID mode. Move to global tracking instead: if there is an event socket anywhere on the system, all net namespaces which have conntrack enabled and use autobind mode will allocate the ecache extension. netlink_has_listeners() returns false only if the given group has no subscribers in any net namespace, the 'net' argument passed to nfnetlink_has_listeners is only used to derive the protocol (nfnetlink), it has no other effect. For proper NETLINK_LISTEN_ALL_NSID-aware pernet tracking of event listeners a new netlink_has_net_listeners() is also needed. Fixes: 90d1daa45849 ("netfilter: conntrack: add nf_conntrack_events autodetect mode") Reported-by: Bryce Kahle Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 05c07c0c6cc8ec2278ace9871618c41f1365d1f5 Author: Xin Long Date: Fri Feb 17 18:22:57 2023 -0500 netfilter: xt_length: use skb len to match in length_mt6 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, it may mismatch. To fix this, we can just use skb->len instead of parsing exthdrs, as the hbh exthdr parsing has been done before coming to length_mt6 in ip6_rcv_core() and br_validate_ipv6() and also the packet has been trimmed according to the correct IPv6 (ext)hdr length there, and skb len is trustable in length_mt6(). Note that this patch is especially needed after the IPv6 BIG TCP was supported in kernel, which is using IPv6 Jumbo packets. Besides, to match the packets greater than 65535 more properly, a v1 revision of xt_length may be needed to extend "min, max" to u32 in the future, and for now the IPv6 Jumbo packets can be matched by: # ip6tables -m length ! --length 0:65535 Fixes: 7c4e983c4f3c ("net: allow gso_max_size to exceed 65536") Fixes: 0fe79f28bfaf ("net: allow gro_max_size to exceed 65536") Signed-off-by: Xin Long Signed-off-by: Pablo Neira Ayuso commit 6c40624930c58529185a257380442547580ed837 Author: Souradeep Chowdhury Date: Wed Feb 22 08:27:49 2023 +0900 bootconfig: Increase max nodes of bootconfig from 1024 to 8192 for DCC support The Data Capture and Compare(DCC) is a debugging tool that uses the bootconfig for configuring the register values during boot-time. Increase the max nodes supported by bootconfig to cater to the requirements of the Data Capture and Compare Driver. Link: https://lore.kernel.org/all/1674536682-18404-1-git-send-email-quic_schowdhu@quicinc.com/ Signed-off-by: Souradeep Chowdhury Acked-by: Masami Hiramatsu (Google) Signed-off-by: Masami Hiramatsu (Google) commit 6ded8a28ed80e4cc666f1a3f999b1c7e6f011cdd Author: Paul E. McKenney Date: Wed Feb 22 08:27:49 2023 +0900 bootconfig: Default BOOT_CONFIG_FORCE to y if BOOT_CONFIG_EMBED When a kernel is built with CONFIG_BOOT_CONFIG_EMBED=y, the intention will normally be to unconditionally provide the specified kernel-boot arguments to the kernel, as opposed to requiring a separately provided bootconfig parameter. Therefore, make the BOOT_CONFIG_FORCE Kconfig option default to y in kernels built with CONFIG_BOOT_CONFIG_EMBED=y. The old semantics may be obtained by manually overriding this default. Link: https://lore.kernel.org/all/20230107162202.GA4028633@paulmck-ThinkPad-P17-Gen-1/ Suggested-by: Masami Hiramatsu Signed-off-by: Paul E. McKenney Acked-by: Masami Hiramatsu (Google) Signed-off-by: Masami Hiramatsu (Google) commit 8bf1a529cd664c8e5268381f1e24fe67aa611dd3 Merge: b327dfe05258e d54170812ef1c Author: Linus Torvalds Date: Tue Feb 21 15:27:48 2023 -0800 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Catalin Marinas: - Support for arm64 SME 2 and 2.1. SME2 introduces a new 512-bit architectural register (ZT0, for the look-up table feature) that Linux needs to save/restore - Include TPIDR2 in the signal context and add the corresponding kselftests - Perf updates: Arm SPEv1.2 support, HiSilicon uncore PMU updates, ACPI support to the Marvell DDR and TAD PMU drivers, reset DTM_PMU_CONFIG (ARM CMN) at probe time - Support for DYNAMIC_FTRACE_WITH_CALL_OPS on arm64 - Permit EFI boot with MMU and caches on. Instead of cleaning the entire loaded kernel image to the PoC and disabling the MMU and caches before branching to the kernel bare metal entry point, leave the MMU and caches enabled and rely on EFI's cacheable 1:1 mapping of all of system RAM to populate the initial page tables - Expose the AArch32 (compat) ELF_HWCAP features to user in an arm64 kernel (the arm32 kernel only defines the values) - Harden the arm64 shadow call stack pointer handling: stash the shadow stack pointer in the task struct on interrupt, load it directly from this structure - Signal handling cleanups to remove redundant validation of size information and avoid reading the same data from userspace twice - Refactor the hwcap macros to make use of the automatically generated ID registers. It should make new hwcaps writing less error prone - Further arm64 sysreg conversion and some fixes - arm64 kselftest fixes and improvements - Pointer authentication cleanups: don't sign leaf functions, unify asm-arch manipulation - Pseudo-NMI code generation optimisations - Minor fixes for SME and TPIDR2 handling - Miscellaneous updates: ARCH_FORCE_MAX_ORDER is now selectable, replace strtobool() to kstrtobool() in the cpufeature.c code, apply dynamic shadow call stack in two passes, intercept pfn changes in set_pte_at() without the required break-before-make sequence, attempt to dump all instructions on unhandled kernel faults * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (130 commits) arm64: fix .idmap.text assertion for large kernels kselftest/arm64: Don't require FA64 for streaming SVE+ZA tests kselftest/arm64: Copy whole EXTRA context arm64: kprobes: Drop ID map text from kprobes blacklist perf: arm_spe: Print the version of SPE detected perf: arm_spe: Add support for SPEv1.2 inverted event filtering perf: Add perf_event_attr::config3 arm64/sme: Fix __finalise_el2 SMEver check drivers/perf: fsl_imx8_ddr_perf: Remove set-but-not-used variable arm64/signal: Only read new data when parsing the ZT context arm64/signal: Only read new data when parsing the ZA context arm64/signal: Only read new data when parsing the SVE context arm64/signal: Avoid rereading context frame sizes arm64/signal: Make interface for restore_fpsimd_context() consistent arm64/signal: Remove redundant size validation from parse_user_sigframe() arm64/signal: Don't redundantly verify FPSIMD magic arm64/cpufeature: Use helper macros to specify hwcaps arm64/cpufeature: Always use symbolic name for feature value in hwcaps arm64/sysreg: Initial unsigned annotations for ID registers arm64/sysreg: Initial annotation of signed ID registers ... commit b743852ccc1d9630bb07dc65ef185dab7e2984f6 Author: Paul E. McKenney Date: Wed Feb 22 08:27:48 2023 +0900 Allow forcing unconditional bootconfig processing The BOOT_CONFIG family of Kconfig options allows a bootconfig file containing kernel boot parameters to be embedded into an initrd or into the kernel itself. This can be extremely useful when deploying kernels in cases where some of the boot parameters depend on the kernel version rather than on the server hardware, firmware, or workload. Unfortunately, the "bootconfig" kernel parameter must be specified in order to cause the kernel to look for the embedded bootconfig file, and it clearly does not help to embed this "bootconfig" kernel parameter into that file. Therefore, provide a new BOOT_CONFIG_FORCE Kconfig option that causes the kernel to act as if the "bootconfig" kernel parameter had been specified. In other words, kernels built with CONFIG_BOOT_CONFIG_FORCE=y will look for the embedded bootconfig file even when the "bootconfig" kernel parameter is omitted. This permits kernel-version-dependent kernel boot parameters to be embedded into the kernel image without the need to (for example) update large numbers of boot loaders. Link: https://lore.kernel.org/all/20230105005838.GA1772817@paulmck-ThinkPad-P17-Gen-1/ Signed-off-by: Paul E. McKenney Cc: Masami Hiramatsu Cc: Jonathan Corbet Cc: Andrew Morton Cc: Nick Desaulniers Cc: Vlastimil Babka Cc: Johannes Weiner Cc: Acked-by: Masami Hiramatsu (Google) Signed-off-by: Masami Hiramatsu (Google) commit cf8c59a3756b2735c409a9b3ac1e4ec556546a7a Author: Antonio Alvarez Feijoo Date: Wed Feb 22 08:27:35 2023 +0900 tools/bootconfig: fix single & used for logical condition A single & will create a background process and return true, so the grep command will run even if the file checked in the first condition does not exist. Link: https://lore.kernel.org/all/20230112114215.17103-1-antonio.feijoo@suse.com/ Fixes: 1eaad3ac3f39 ("tools/bootconfig: Use per-group/all enable option in ftrace2bconf script") Signed-off-by: Antonio Alvarez Feijoo Cc: stable@vger.kernel.org Acked-by: Masami Hiramatsu (Google) Signed-off-by: Masami Hiramatsu (Google) commit 2b3795167e233dc9974f9f8239afb920f5cd4a32 Author: Fengnan Chang Date: Tue Feb 21 19:53:40 2023 +0800 scsi: sd: Remove unused sd_cdb_cache Since commit ce70fd9a551a ("scsi: core: Remove the cmd field from struct scsi_request") sd_cdb_cache is unused. Remove it. Link: https://lore.kernel.org/r/20230221115340.21201-1-changfengnan@bytedance.com Signed-off-by: Fengnan Chang Reviewed-by: John Garry Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit e58a171d35e32e6e8c37cfe0e8a94406732a331f Author: Florian Westphal Date: Fri Feb 17 23:20:06 2023 +0100 netfilter: ebtables: fix table blob use-after-free We are not allowed to return an error at this point. Looking at the code it looks like ret is always 0 at this point, but its not. t = find_table_lock(net, repl->name, &ret, &ebt_mutex); ... this can return a valid table, with ret != 0. This bug causes update of table->private with the new blob, but then frees the blob right away in the caller. Syzbot report: BUG: KASAN: vmalloc-out-of-bounds in __ebt_unregister_table+0xc00/0xcd0 net/bridge/netfilter/ebtables.c:1168 Read of size 4 at addr ffffc90005425000 by task kworker/u4:4/74 Workqueue: netns cleanup_net Call Trace: kasan_report+0xbf/0x1f0 mm/kasan/report.c:517 __ebt_unregister_table+0xc00/0xcd0 net/bridge/netfilter/ebtables.c:1168 ebt_unregister_table+0x35/0x40 net/bridge/netfilter/ebtables.c:1372 ops_exit_list+0xb0/0x170 net/core/net_namespace.c:169 cleanup_net+0x4ee/0xb10 net/core/net_namespace.c:613 ... ip(6)tables appears to be ok (ret should be 0 at this point) but make this more obvious. Fixes: c58dd2dd443c ("netfilter: Can't fail and free after table replacement") Reported-by: syzbot+f61594de72d6705aea03@syzkaller.appspotmail.com Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit efb056e5f1f0036179b2f92c1c15f5ea7a891d70 Author: Phil Sutter Date: Thu Feb 16 17:05:36 2023 +0100 netfilter: ip6t_rpfilter: Fix regression with VRF interfaces When calling ip6_route_lookup() for the packet arriving on the VRF interface, the result is always the real (slave) interface. Expect this when validating the result. Fixes: acc641ab95b66 ("netfilter: rpfilter/fib: Populate flowic_l3mdev field") Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit b327dfe05258e09c8db6e1e091c2e6d84dd426a6 Merge: eb6d5bbea2fbf 5eb6e280432dd Author: Linus Torvalds Date: Tue Feb 21 15:21:29 2023 -0800 Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM udpates from Russell King: - Improve Kconfig help text for Cortex A8 and Cortex A9 errata - Kconfig spelling and grammar fixes - Allow kernel-mode VFP/Neon in softirq context - Use Neon in softirq context - Implement AES-CTR/GHASH version of GCM * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 9289/1: Allow pre-ARMv5 builds with ld.lld 16.0.0 and newer ARM: 9288/1: Kconfigs: fix spelling & grammar ARM: 9286/1: crypto: Implement fused AES-CTR/GHASH version of GCM ARM: 9285/1: remove meaningless arch/arm/mach-rda/Makefile ARM: 9283/1: permit non-nested kernel mode NEON in softirq context ARM: 9282/1: vfp: Manipulate task VFP state with softirqs disabled ARM: 9281/1: improve Cortex A8/A9 errata help text commit 2076f57f2ca0a2034afac7832257b2bc509c1a87 Author: Asutosh Das Date: Thu Feb 16 09:13:46 2023 -0800 scsi: ufs: mcq: Fix incorrectly set queue depth ufshcd_config_mcq() may change the can_queue value. The current code invokes scsi_add_host() before ufshcd_config_mcq() so the tags are limited to the original can_queue value. Fix this by invoking scsi_add_host() after ufshcd_config_mcq(). Link: https://lore.kernel.org/r/8840cea4a57b46dabce18acc39afc50ab826330f.1676567593.git.quic_asutoshd@quicinc.com Fixes: 2468da61ea09 ("scsi: ufs: core: mcq: Configure operation and runtime interface") Signed-off-by: Asutosh Das Reviewed-by: Bart Van Assche Reviewed-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen commit e6d57e9ff0aec323717ee36fc9ea34ad89217151 Author: Florian Westphal Date: Tue Feb 14 17:23:59 2023 +0100 netfilter: conntrack: fix rmmod double-free race nf_conntrack_hash_check_insert() callers free the ct entry directly, via nf_conntrack_free. This isn't safe anymore because nf_conntrack_hash_check_insert() might place the entry into the conntrack table and then delteted the entry again because it found that a conntrack extension has been removed at the same time. In this case, the just-added entry is removed again and an error is returned to the caller. Problem is that another cpu might have picked up this entry and incremented its reference count. This results in a use-after-free/double-free, once by the other cpu and once by the caller of nf_conntrack_hash_check_insert(). Fix this by making nf_conntrack_hash_check_insert() not fail anymore after the insertion, just like before the 'Fixes' commit. This is safe because a racing nf_ct_iterate() has to wait for us to release the conntrack hash spinlocks. While at it, make the function return -EAGAIN in the rmmod (genid changed) case, this makes nfnetlink replay the command (suggested by Pablo Neira). Fixes: c56716c69ce1 ("netfilter: extensions: introduce extension genid count") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit eb6d5bbea2fbfaade9e29bf5ce4abe3a8384678f Merge: bcf5470eb4a13 1e5b5df65af99 Author: Linus Torvalds Date: Tue Feb 21 15:17:34 2023 -0800 Merge tag 'm68k-for-v6.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: - Add seccomp support - defconfig updates - Miscellaneous fixes and improvements * tag 'm68k-for-v6.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: /proc/hardware should depend on PROC_FS selftests/seccomp: Add m68k support m68k: Add kernel seccomp support m68k: Check syscall_trace_enter() return code m68k: defconfig: Update defconfigs for v6.2-rc3 m68k: q40: Do not initialise statics to 0 commit 19873b03f1daeffd9d5e089b855dd926975ab5b7 Author: Yangtao Li Date: Mon Feb 20 22:24:31 2023 +0800 scsi: ufs: ufs-mediatek: Guard power management functions with CONFIG_PM Fix the following compilation error when CONFIG_PM is set to 'n': drivers/ufs/host/ufs-mediatek.c: In function `ufs_mtk_runtime_suspend`: drivers/ufs/host/ufs-mediatek.c:1623:8: error: implicit declaration of function `ufshcd_runtime_suspend`; did you mean `ufs_mtk_runtime_suspend`? [-Werror=implicit-function-declaration] 1623 | ret = ufshcd_runtime_suspend(dev); | ^~~~~~~~~~~~~~~~~~~~~~ | ufs_mtk_runtime_suspend drivers/ufs/host/ufs-mediatek.c: In function `ufs_mtk_runtime_resume`: drivers/ufs/host/ufs-mediatek.c:1638:9: error: implicit declaration of function `ufshcd_runtime_resume`; did you mean `ufs_mtk_runtime_resume`? [-Werror=implicit-function-declaration] 1638 | return ufshcd_runtime_resume(dev); | ^~~~~~~~~~~~~~~~~~~~~ | ufs_mtk_runtime_resume At top level: drivers/ufs/host/ufs-mediatek.c:1632:12: error: `ufs_mtk_runtime_resume` defined but not used [-Werror=unused-function] 1632 | static int ufs_mtk_runtime_resume(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/ufs/host/ufs-mediatek.c:1618:12: error: `ufs_mtk_runtime_suspend` defined but not used [-Werror=unused-function] 1618 | static int ufs_mtk_runtime_suspend(struct device *dev) Link: https://lore.kernel.org/r/20230220142431.54589-1-frank.li@vivo.com Reported-by: k2ci Reported-by: Shida Zhang Signed-off-by: Yangtao Li Reviewed-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 7dafc3e007918384c8693ff8d70381b5c1e9c247 Author: Adrien Thierry Date: Fri Feb 17 14:44:22 2023 -0500 scsi: ufs: core: Initialize devfreq synchronously During UFS initialization, devfreq initialization is asynchronous: ufshcd_async_scan() calls ufshcd_add_lus(), which in turn initializes devfreq for UFS. The simple ondemand governor is then loaded. If it is built as a module, request_module() is called and throws a warning: WARNING: CPU: 7 PID: 167 at kernel/kmod.c:136 __request_module+0x1e0/0x460 Modules linked in: crct10dif_ce llcc_qcom phy_qcom_qmp_usb ufs_qcom phy_qcom_snps_femto_v2 ufshcd_pltfrm phy_qcom_qmp_combo ufshcd_core phy_qcom_qmp_ufs qcom_wdt socinfo fuse ipv6 CPU: 7 PID: 167 Comm: kworker/u16:3 Not tainted 6.2.0-rc6-00009-g58706f7fb045 #1 Hardware name: Qualcomm SA8540P Ride (DT) Workqueue: events_unbound async_run_entry_fn pstate: 00400005 (nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __request_module+0x1e0/0x460 lr : __request_module+0x1d8/0x460 sp : ffff800009323b90 x29: ffff800009323b90 x28: 0000000000000000 x27: 0000000000000000 x26: ffff800009323d50 x25: ffff7b9045f57810 x24: ffff7b9045f57830 x23: ffffdc5a83e426e8 x22: ffffdc5ae80a9818 x21: 0000000000000001 x20: ffffdc5ae7502f98 x19: ffff7b9045f57800 x18: ffffffffffffffff x17: 312f716572667665 x16: 642f7366752e3030 x15: 0000000000000000 x14: 000000000000021c x13: 0000000000005400 x12: ffff7b9042ed7614 x11: ffff7b9042ed7600 x10: 00000000636c0890 x9 : 0000000000000038 x8 : ffff7b9045f2c880 x7 : ffff7b9045f57c68 x6 : 0000000000000080 x5 : 0000000000000000 x4 : 8000000000000000 x3 : 0000000000000000 x2 : 0000000000000000 x1 : ffffdc5ae5d382f0 x0 : 0000000000000001 Call trace: __request_module+0x1e0/0x460 try_then_request_governor+0x7c/0x100 devfreq_add_device+0x4b0/0x5fc ufshcd_async_scan+0x1d4/0x310 [ufshcd_core] async_run_entry_fn+0x34/0xe0 process_one_work+0x1d0/0x320 worker_thread+0x14c/0x444 kthread+0x10c/0x110 ret_from_fork+0x10/0x20 This occurs because synchronous module loading from async is not allowed. According to __request_module(): /* * We don't allow synchronous module loading from async. Module * init may invoke async_synchronize_full() which will end up * waiting for this task which already is waiting for the module * loading to complete, leading to a deadlock. */ Such a deadlock was experienced on the Qualcomm QDrive3/sa8540p-ride. With DEVFREQ_GOV_SIMPLE_ONDEMAND=m, the boot hangs after the warning. Fix both the warning and the deadlock by moving devfreq initialization out of the async routine. Tested on the sa8540p-ride by using fio to put the UFS under load, and printing the trace generated by /sys/kernel/tracing/events/ufs/ufshcd_clk_scaling events. The trace looks similar with and without the change. Link: https://lore.kernel.org/r/20230217194423.42553-1-athierry@redhat.com Signed-off-by: Adrien Thierry Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit bcf5470eb4a13e5670fefb21525b43ef385c6fc6 Merge: 877934769e5b9 6472a2dcc4274 Author: Linus Torvalds Date: Tue Feb 21 15:09:17 2023 -0800 Merge tag 's390-6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Heiko Carstens: - Large cleanup of the con3270/tty3270 driver. Among others this fixes: - Background Color Support - ASCII Line Character Support - VT100 Support - Geometries other than 80x24 - Cleanup and improve cmpxchg() code. Also add cmpxchg_user_key() to uaccess functions, which will be used by KVM to access KVM guest memory with a specific storage key - Add support for user space events counting to CPUMF - Cleanup the vfio/ccw code, which also allows now to properly support 2K Format-2 IDALs - Move kernel page table allocation and initialization to decompressor, which finally allows to enter the kernel with dynamic address translation enabled. This in turn allows to get rid of code with special handling in the kernel, which has to distinguish if DAT is on or off - Replace kretprobe with rethook - Various improvements to vfio/ap queue resets: - Use TAPQ to verify completion of a reset in progress rather than multiple invocations of ZAPQ. - Check TAPQ response codes when verifying successful completion of ZAPQ. - Fix erroneous handling of some error response codes. - Increase the maximum amount of time to wait for successful completion of ZAPQ - Rework system call wrappers to get rid of alias functions, which were only left on s390 - Cleanup diag288_wdt watchdog driver. It has been agreed on with Guenter Roeck that this goes upstream via the s390 tree - Add missing loadparm parameter handling for list-directed ECKD ipl/reipl - Various improvements to memory detection code - Remove arch_cpu_idle_time() since the current implementation is broken, and allows user space observable accounted idle times which can temporarily decrease - Add Reset DAT-Protection support: (only) allow to change PTEs from RO to RW with a new RDP instruction. Unlike the currently used IPTE instruction, this does not necessarily guarantee that TLBs of all CPUs are synchronously flushed; and that remote CPUs can see spurious protection faults. The overall improvement for not requiring an all CPU synchronization, like it is required with IPTE, should be beneficial - Fix KFENCE page fault reporting - Smaller cleanups and improvement all over the place * tag 's390-6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (182 commits) s390/irq,idle: simplify idle check s390/processor: add test_and_set_cpu_flag() and test_and_clear_cpu_flag() s390/processor: let cpu helper functions return boolean values s390/kfence: fix page fault reporting s390/zcrypt: introduce ctfm field in struct CPRBX s390: remove confusing comment from uapi types header file vfio/ccw: remove WARN_ON during shutdown s390/entry: remove toolchain dependent micro-optimization s390/mem_detect: do not truncate online memory ranges info s390/vx: remove __uint128_t type from __vector128 struct again s390/mm: add support for RDP (Reset DAT-Protection) s390/mm: define private VM_FAULT_* reasons from top bits Documentation: s390: correct spelling s390/ap: fix status returned by ap_qact() s390/ap: fix status returned by ap_aqic() s390: vfio-ap: tighten the NIB validity check Revert "s390/mem_detect: do not update output parameters on failure" s390/idle: remove arch_cpu_idle_time() and corresponding code s390/vx: use simple assignments to access __vector128 members s390/vx: add 64 and 128 bit members to __vector128 struct ... commit ac4893980bbe79ce383daf9a0885666a30fe4c83 Author: Hangyu Hua Date: Fri Feb 10 15:17:30 2023 +0800 netfilter: ctnetlink: fix possible refcount leak in ctnetlink_create_conntrack() nf_ct_put() needs to be called to put the refcount got by nf_conntrack_find_get() to avoid refcount leak when nf_conntrack_hash_check_insert() fails. Fixes: 7d367e06688d ("netfilter: ctnetlink: fix soft lockup when netlink adds new entries (v2)") Signed-off-by: Hangyu Hua Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 473025a6b6f8a4a8de3120c78588d32cf4ba7324 Author: Bart Van Assche Date: Thu Feb 9 10:49:03 2023 -0800 scsi: ufs: Make the TC G210 driver dependent on CONFIG_OF The TC G210 driver only supports devices declared in the device tree. Hence make this driver dependent on CONFIG_OF. This patch fixes the following compiler error: drivers/ufs/host/tc-dwc-g210-pltfrm.c:36:34: error: ‘tc_dwc_g210_pltfm_match’ defined but not used [-Werror=unused-const-variable=] 36 | static const struct of_device_id tc_dwc_g210_pltfm_match[] = { | Link: https://lore.kernel.org/r/20230209184914.2762172-1-bvanassche@acm.org Cc: Joao Pinto Signed-off-by: Bart Van Assche Reviewed-by: Bean Huo Signed-off-by: Martin K. Petersen commit 64fd2ba977b1b6b073bcf4c71906f820bc531421 Author: Muneendra Date: Wed Feb 8 19:43:26 2023 -0800 scsi: scsi_transport_fc: Add an additional flag to fc_host_fpin_rcv() The LLDD and the stack currently process FPINs received from the fabric, but the stack is not aware of any action taken by the driver to alleviate congestion. The current interface between the driver and the SCSI stack is limited to passing the notification mainly for statistics and heuristics. The reaction to an FPIN could be handled either by the driver or by the stack (marginal path and failover). Amend the interface to indicate if action on an FPIN has already been reacted to by the LLDDs or not. Add an additional flag to fc_host_fpin_rcv() to indicate if the FPIN has been acknowledged/reacted to by the driver. Also added a new event code FCH_EVT_LINK_FPIN_ACK to notify to the user that the event has been acknowledged/reacted by the LLDD driver Link: https://lore.kernel.org/r/20230209034326.882514-1-muneendra.kumar@broadcom.com Co-developed-by: Anil Gurumurthy Signed-off-by: Anil Gurumurthy Co-developed-by: Nilesh Javali Signed-off-by: Nilesh Javali Signed-off-by: Muneendra Reviewed-by: James Smart Reviewed-by: Himanshu Madhani Reviewed-by: Ewan D. Milne Signed-off-by: Martin K. Petersen commit 1ba7dfb905b3975bdb8b9d1f7793efcdfc59385b Author: Saravanan Sekar Date: Wed Dec 7 18:37:14 2022 +0100 dt-bindings: regulator: Add mps,mpq7932 power-management IC Document mpq7932 power-management IC Signed-off-by: Saravanan Sekar Acked-by: Guenter Roeck Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221207173716.123223-3-saravanan@linumiz.com Signed-off-by: Rob Herring commit 877934769e5b91798d304d4641647900ee614ce8 Merge: 74e19ef0ff806 7914695743d59 Author: Linus Torvalds Date: Tue Feb 21 14:51:40 2023 -0800 Merge tag 'x86_cpu_for_v6.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cpuid updates from Borislav Petkov: - Cache the AMD debug registers in per-CPU variables to avoid MSR writes where possible, when supporting a debug registers swap feature for SEV-ES guests - Add support for AMD's version of eIBRS called Automatic IBRS which is a set-and-forget control of indirect branch restriction speculation resources on privilege change - Add support for a new x86 instruction - LKGS - Load kernel GS which is part of the FRED infrastructure - Reset SPEC_CTRL upon init to accomodate use cases like kexec which rediscover - Other smaller fixes and cleanups * tag 'x86_cpu_for_v6.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/amd: Cache debug register values in percpu variables KVM: x86: Propagate the AMD Automatic IBRS feature to the guest x86/cpu: Support AMD Automatic IBRS x86/cpu, kvm: Add the SMM_CTL MSR not present feature x86/cpu, kvm: Add the Null Selector Clears Base feature x86/cpu, kvm: Move X86_FEATURE_LFENCE_RDTSC to its native leaf x86/cpu, kvm: Add the NO_NESTED_DATA_BP feature KVM: x86: Move open-coded CPUID leaf 0x80000021 EAX bit propagation code x86/cpu, kvm: Add support for CPUID_80000021_EAX x86/gsseg: Add the new header to x86/gsseg: Use the LKGS instruction if available for load_gs_index() x86/gsseg: Move load_gs_index() to its own new header file x86/gsseg: Make asm_load_gs_index() take an u16 x86/opcode: Add the LKGS instruction to x86-opcode-map x86/cpufeature: Add the CPU feature bit for LKGS x86/bugs: Reset speculation control settings on init x86/cpu: Remove redundant extern x86_read_arch_cap_msr() commit 74e19ef0ff8061ef55957c3abd71614ef0f42f47 Author: Dave Hansen Date: Tue Feb 21 12:30:15 2023 -0800 uaccess: Add speculation barrier to copy_from_user() The results of "access_ok()" can be mis-speculated. The result is that you can end speculatively: if (access_ok(from, size)) // Right here even for bad from/size combinations. On first glance, it would be ideal to just add a speculation barrier to "access_ok()" so that its results can never be mis-speculated. But there are lots of system calls just doing access_ok() via "copy_to_user()" and friends (example: fstat() and friends). Those are generally not problematic because they do not _consume_ data from userspace other than the pointer. They are also very quick and common system calls that should not be needlessly slowed down. "copy_from_user()" on the other hand uses a user-controller pointer and is frequently followed up with code that might affect caches. Take something like this: if (!copy_from_user(&kernelvar, uptr, size)) do_something_with(kernelvar); If userspace passes in an evil 'uptr' that *actually* points to a kernel addresses, and then do_something_with() has cache (or other) side-effects, it could allow userspace to infer kernel data values. Add a barrier to the common copy_from_user() code to prevent mis-speculated values which happen after the copy. Also add a stub for architectures that do not define barrier_nospec(). This makes the macro usable in generic code. Since the barrier is now usable in generic code, the x86 #ifdef in the BPF code can also go away. Reported-by: Jordy Zomer Suggested-by: Linus Torvalds Signed-off-by: Dave Hansen Reviewed-by: Thomas Gleixner Acked-by: Daniel Borkmann # BPF bits Signed-off-by: Linus Torvalds commit 3fe97ff3d94934649abb0652028dd7296170c8d0 Author: James Bottomley Date: Sat Nov 28 15:27:21 2020 -0800 scsi: ses: Don't attach if enclosure has no components An enclosure with no components can't usefully be operated by the driver (since effectively it has nothing to manage), so report the problem and don't attach. Not attaching also fixes an oops which could occur if the driver tries to manage a zero component enclosure. [mkp: Switched to KERN_WARNING since this scenario is common] Link: https://lore.kernel.org/r/c5deac044ac409e32d9ad9968ce0dcbc996bfc7a.camel@linux.ibm.com Cc: stable@vger.kernel.org Reported-by: Ding Hui Signed-off-by: James Bottomley Signed-off-by: Martin K. Petersen commit 578797f0c8cbc2e3ec5fc0dab87087b4c7073686 Author: Tomas Henzl Date: Thu Feb 2 17:24:51 2023 +0100 scsi: ses: Fix slab-out-of-bounds in ses_intf_remove() A fix for: BUG: KASAN: slab-out-of-bounds in ses_intf_remove+0x23f/0x270 [ses] Read of size 8 at addr ffff88a10d32e5d8 by task rmmod/12013 When edev->components is zero, accessing edev->component[0] members is wrong. Link: https://lore.kernel.org/r/20230202162451.15346-5-thenzl@redhat.com Cc: stable@vger.kernel.org Signed-off-by: Tomas Henzl Signed-off-by: Martin K. Petersen commit 801ab13d50cf3d26170ee073ea8bb4eececb76ab Author: Tomas Henzl Date: Thu Feb 2 17:24:50 2023 +0100 scsi: ses: Fix possible desc_ptr out-of-bounds accesses Sanitize possible desc_ptr out-of-bounds accesses in ses_enclosure_data_process(). Link: https://lore.kernel.org/r/20230202162451.15346-4-thenzl@redhat.com Cc: stable@vger.kernel.org Signed-off-by: Tomas Henzl Signed-off-by: Martin K. Petersen commit db95d4df71cb55506425b6e4a5f8d68e3a765b63 Author: Tomas Henzl Date: Thu Feb 2 17:24:49 2023 +0100 scsi: ses: Fix possible addl_desc_ptr out-of-bounds accesses Sanitize possible addl_desc_ptr out-of-bounds accesses in ses_enclosure_data_process(). Link: https://lore.kernel.org/r/20230202162451.15346-3-thenzl@redhat.com Cc: stable@vger.kernel.org Signed-off-by: Tomas Henzl Signed-off-by: Martin K. Petersen commit 9b4f5028e493cb353a5c8f5c45073eeea0303abd Author: Tomas Henzl Date: Thu Feb 2 17:24:48 2023 +0100 scsi: ses: Fix slab-out-of-bounds in ses_enclosure_data_process() A fix for: BUG: KASAN: slab-out-of-bounds in ses_enclosure_data_process+0x949/0xe30 [ses] Read of size 1 at addr ffff88a1b043a451 by task systemd-udevd/3271 Checking after (and before in next loop) addl_desc_ptr[1] is sufficient, we expect the size to be sanitized before first access to addl_desc_ptr[1]. Make sure we don't walk beyond end of page. Link: https://lore.kernel.org/r/20230202162451.15346-2-thenzl@redhat.com Cc: stable@vger.kernel.org Signed-off-by: Tomas Henzl Signed-off-by: Martin K. Petersen commit f1aa2eb5ea05ccd1fd92d235346e60e90a1ed949 Author: Ondrej Mosnacek Date: Fri Feb 10 15:58:23 2023 +0100 sysctl: fix proc_dobool() usability Currently proc_dobool expects a (bool *) in table->data, but sizeof(int) in table->maxsize, because it uses do_proc_dointvec() directly. This is unsafe for at least two reasons: 1. A sysctl table definition may use { .data = &variable, .maxsize = sizeof(variable) }, not realizing that this makes the sysctl unusable (see the Fixes: tag) and that they need to use the completely counterintuitive sizeof(int) instead. 2. proc_dobool() will currently try to parse an array of values if given .maxsize >= 2*sizeof(int), but will try to write values of type bool by offsets of sizeof(int), so it will not work correctly with neither an (int *) nor a (bool *). There is no .maxsize validation to prevent this. Fix this by: 1. Constraining proc_dobool() to allow only one value and .maxsize == sizeof(bool). 2. Wrapping the original struct ctl_table in a temporary one with .data pointing to a local int variable and .maxsize set to sizeof(int) and passing this one to proc_dointvec(), converting the value to/from bool as needed (using proc_dou8vec_minmax() as an example). 3. Extending sysctl_check_table() to enforce proc_dobool() expectations. 4. Fixing the proc_dobool() docstring (it was just copy-pasted from proc_douintvec, apparently...). 5. Converting all existing proc_dobool() users to set .maxsize to sizeof(bool) instead of sizeof(int). Fixes: 83efeeeb3d04 ("tty: Allow TIOCSTI to be disabled") Fixes: a2071573d634 ("sysctl: introduce new proc handler proc_dobool") Signed-off-by: Ondrej Mosnacek Acked-by: Kees Cook Signed-off-by: Luis Chamberlain commit 1b72607d7321e66829e11148712b3a2ba1dc83e7 Merge: 88af9b164c7a2 6828e402d06f7 Author: Linus Torvalds Date: Tue Feb 21 12:32:05 2023 -0800 Merge tag 'thermal-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control updates from Rafael Wysocki: "The majority of changes here are related to the general switch-over to using arrays of generic trip point structures registered along with a thermal zone instead of trip point callbacks (this has been done mostly by Daniel Lezcano with some help from yours truly on the Intel drivers front). Apart from that and the related reorganization of code, there are some enhancements of the existing driver and a new Mediatek Low Voltage Thermal Sensor (LVTS) driver. The Intel powerclamp undergoes a major rework so it will use the generic idle_inject facility for CPU idle time injection going forward and it will take additional module parameters for specifying the subset of CPUs to be affected by it (work done by Srinivas Pandruvada). Also included are assorted fixes and a whole bunch of cleanups. Specifics: - Rework a large bunch of drivers to use the generic thermal trip structure and use the opportunity to do more cleanups by removing unused functions from the OF code (Daniel Lezcano) - Remove core header inclusion from drivers (Daniel Lezcano) - Fix some locking issues related to the generic thermal trip rework (Johan Hovold) - Fix a crash when requesting the critical temperature on tegra, which is related to the generic trip point work (Jon Hunter) - Clean up thermal device unregistration code (Viresh Kumar) - Fix and clean up thermal control core initialization error code paths (Daniel Lezcano) - Relocate the trip points handling code into a separate file (Daniel Lezcano) - Make the thermal core fail registration of thermal zones and cooling devices if the thermal class has not been registered (Rafael Wysocki) - Add trip point initialization helper functions for ACPI-defined trip points and modify two thermal drivers to use them (Rafael Wysocki, Daniel Lezcano) - Make the core thermal control code use sysfs_emit_at() instead of scnprintf() where applicable (ye xingchen) - Consolidate code accessing the Intel TCC (Thermal Control Circuitry) MSRs by introducing library functions for that and making the TCC-related code in thermal drivers use them (Zhang Rui) - Enhance the x86_pkg_temp_thermal driver to support dynamic tjmax changes (Zhang Rui) - Address an "unsigned expression compared with zero" warning in the intel_soc_dts_iosf thermal driver (Yang Li) - Update comments regarding two functions in the Intel Menlow thermal driver (Deming Wang) - Use sysfs_emit_at() instead of scnprintf() in the int340x thermal driver (ye xingchen) - Make the intel_pch thermal driver support the Wellsburg PCH (Tim Zimmermann) - Modify the intel_pch and processor_thermal_device_pci thermal drivers use generic trip point tables instead of thermal zone trip point callbacks (Daniel Lezcano) - Add production mode attribute sysfs attribute to the int340x thermal driver (Srinivas Pandruvada) - Rework dynamic trip point updates handling and locking in the int340x thermal driver (Rafael Wysocki) - Make the int340x thermal driver use a generic trip points table instead of thermal zone trip point callbacks (Rafael Wysocki, Daniel Lezcano) - Clean up and improve the int340x thermal driver (Rafael Wysocki) - Simplify and clean up the intel_pch thermal driver (Rafael Wysocki) - Fix the Intel powerclamp thermal driver and make it use the common idle injection framework (Srinivas Pandruvada) - Add two module parameters, cpumask and max_idle, to the Intel powerclamp thermal driver to allow it to affect only a specific subset of CPUs instead of all of them (Srinivas Pandruvada) - Make the Intel quark_dts thermal driver Use generic trip point objects instead of its own trip point representation (Daniel Lezcano) - Add toctree entry for thermal documents and fix two issues in the Intel powerclamp driver documentation (Bagas Sanjaya) - Use strscpy() to instead of strncpy() in the thermal core (Xu Panda) - Fix thermal_sampling_exit() (Vincent Guittot) - Add Mediatek Low Voltage Thermal Sensor (LVTS) driver (Balsam Chihi) - Add r8a779g0 RCar support to the rcar_gen3 thermal driver (Geert Uytterhoeven) - Fix useless call to set_trips() when resuming in the rcar_gen3 thermal control driver and add interrupt support detection at init time to it (Niklas Söderlund) - Fix memory corruption in the hi3660 thermal driver (Yongqin Liu) - Fix include path for libnl3 in pkg-config file for libthermal (Vibhav Pant) - Remove syscfg-based driver for st as the platform is not supported any more (Alain Volmat)" * tag 'thermal-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (135 commits) thermal/drivers/st: Remove syscfg based driver thermal: Remove core header inclusion from drivers tools/lib/thermal: Fix include path for libnl3 in pkg-config file. thermal/drivers/hisi: Drop second sensor hi3660 thermal/drivers/rcar_gen3_thermal: Fix device initialization thermal/drivers/rcar_gen3_thermal: Create device local ops struct thermal/drivers/rcar_gen3_thermal: Do not call set_trips() when resuming thermal/drivers/rcar_gen3: Add support for R-Car V4H dt-bindings: thermal: rcar-gen3-thermal: Add r8a779g0 support thermal/drivers/mediatek: Add the Low Voltage Thermal Sensor driver dt-bindings: thermal: mediatek: Add LVTS thermal controllers thermal/drivers/mediatek: Relocate driver to mediatek folder tools/lib/thermal: Fix thermal_sampling_exit() Documentation: powerclamp: Fix numbered lists formatting Documentation: powerclamp: Escape wildcard in cpumask description Documentation: admin-guide: Add toctree entry for thermal docs thermal: intel: powerclamp: Add two module parameters Documentation: admin-guide: Move intel_powerclamp documentation thermal: core: Use sysfs_emit_at() instead of scnprintf() thermal: intel: powerclamp: Fix duration module parameter ... commit 88af9b164c7a25a71b1a1a699872b869e2e84c77 Merge: 2504ba8b01634 f32309c4d08db Author: Linus Torvalds Date: Tue Feb 21 12:23:24 2023 -0800 Merge tag 'acpi-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "These fix a frequency limit issue in the ACPI processor performance library code, fix a few issues in the ACPICA code, improve Crystal Cove support in the ACPI PMIC driver, fix string handling in the ACPI battery driver, add IRQ override quirks for a few machines more, fix other assorted problems and clean up code and documentation. Specifics: - Drop port I/O validation for some regions to avoid AML failures due to rejections of legitimate port I/O writes (Mario Limonciello) - Constify acpi_get_handle() pathname argument to allow its callers to pass const pathnames to it (Sakari Ailus) - Prevent acpi_ns_simple_repair() from crashing in some cases when AE_AML_NO_RETURN_VALUE should be returned (Daniil Tatianin) - Fix typo in CDAT DSMAS struct definition (Lukas Wunner) - Drop an unnecessary (void *) conversion from the ACPI processor driver (Zhou jie) - Modify the ACPI processor performance library code to use the "no limit" frequency QoS as appropriate and adjust the intel_pstate driver accordingly (Rafael Wysocki) - Add support for NBFT to the ACPI table parser (Stuart Hayes) - Introduce list of known non-PNP devices to avoid enumerating some of them as PNP devices (Rafael Wysocki) - Add x86 ACPI paths to the ACPI entry in MAINTAINERS to allow scripts to report the actual maintainers information (Rafael Wysocki) - Add two more entries to the ACPI IRQ override quirk list (Adam Niederer, Werner Sembach) - Add a pmic_i2c_address entry for Intel Bay Trail Crystal Cove to allow intel_soc_pmic_exec_mipi_pmic_seq_element() to be used with the Bay Trail Crystal Cove PMIC OpRegion driver (Hans de Goede) - Add comments with DSDT power OpRegion field names to the ACPI PMIC driver (Hans de Goede) - Fix string termination handling in the ACPI battery driver (Armin Wolf) - Limit error type to 32-bit width in the ACPI APEI error injection code (Shuai Xue) - Fix Lenovo Ideapad Z570 DMI match in the ACPI backlight driver (Hans de Goede) - Silence missing prototype warnings in some places in the ACPI-related code (Ammar Faizi) - Make kobj_type structures used in the ACPI code constant (Thomas Weißschuh) - Correct spelling in firmware-guide/ACPI (Randy Dunlap) - Clarify the meaning of Explicit and Implicit in the _DSD GPIO properties documentation (Andy Shevchenko) - Fix some kernel-doc comments in the ACPI CPPC library code (Yang Li)" * tag 'acpi-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (25 commits) ACPI: make kobj_type structures constant Documentation: firmware-guide: gpio-properties: Clarify Explicit and Implicit ACPICA: Fix typo in CDAT DSMAS struct definition ACPI: resource: Do IRQ override on all TongFang GMxRGxx ACPI: resource: Add IRQ overrides for MAINGEAR Vector Pro 2 models ACPI: CPPC: Fix some kernel-doc comments ACPI: video: Fix Lenovo Ideapad Z570 DMI match Documentation: firmware-guide/ACPI: correct spelling ACPI: PMIC: Add comments with DSDT power opregion field names ACPI: battery: Increase maximum string length ACPI: battery: Fix buffer overread if not NUL-terminated ACPI: APEI: EINJ: Limit error type to 32-bit width MAINTAINERS: Add x86 ACPI paths to the ACPI entry ACPI: battery: Fix missing NUL-termination with large strings ACPI: PNP: Introduce list of known non-PNP devices ACPICA: nsrepair: handle cases without a return value correctly ACPI: Silence missing prototype warnings cpufreq: intel_pstate: Drop ACPI _PSS states table patching ACPI: processor: perflib: Avoid updating frequency QoS unnecessarily ACPI: processor: perflib: Use the "no limit" frequency QoS ... commit 2504ba8b01634319a6f95b7fa9bf9c101437e158 Merge: 4a7d37e824f57 dd855f01e8d19 Author: Linus Torvalds Date: Tue Feb 21 12:13:58 2023 -0800 Merge tag 'pm-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "These add EPP support to the AMD P-state cpufreq driver, add support for new platforms to the Intel RAPL power capping driver, intel_idle and the Qualcomm cpufreq driver, enable thermal cooling for Tegra194, drop the custom cpufreq driver for loongson1 that is not necessary any more (and the corresponding cpufreq platform device), fix assorted issues and clean up code. Specifics: - Add EPP support to the AMD P-state cpufreq driver (Perry Yuan, Wyes Karny, Arnd Bergmann, Bagas Sanjaya) - Drop the custom cpufreq driver for loongson1 that is not necessary any more and the corresponding cpufreq platform device (Keguang Zhang) - Remove "select SRCU" from system sleep, cpufreq and OPP Kconfig entries (Paul E. McKenney) - Enable thermal cooling for Tegra194 (Yi-Wei Wang) - Register module device table and add missing compatibles for cpufreq-qcom-hw (Nícolas F. R. A. Prado, Abel Vesa and Luca Weiss) - Various dt binding updates for qcom-cpufreq-nvmem and opp-v2-kryo-cpu (Christian Marangi) - Make kobj_type structure in the cpufreq core constant (Thomas Weißschuh) - Make cpufreq_unregister_driver() return void (Uwe Kleine-König) - Make the TEO cpuidle governor check CPU utilization in order to refine idle state selection (Kajetan Puchalski) - Make Kconfig select the haltpoll cpuidle governor when the haltpoll cpuidle driver is selected and replace a default_idle() call in that driver with arch_cpu_idle() to allow MWAIT to be used (Li RongQing) - Add Emerald Rapids Xeon support to the intel_idle driver (Artem Bityutskiy) - Add ARCH_SUSPEND_POSSIBLE dependencies for ARMv4 cpuidle drivers to avoid randconfig build failures (Arnd Bergmann) - Make kobj_type structures used in the cpuidle sysfs interface constant (Thomas Weißschuh) - Make the cpuidle driver registration code update microsecond values of idle state parameters in accordance with their nanosecond values if they are provided (Rafael Wysocki) - Make the PSCI cpuidle driver prevent topology CPUs from being suspended on PREEMPT_RT (Krzysztof Kozlowski) - Document that pm_runtime_force_suspend() cannot be used with DPM_FLAG_SMART_SUSPEND (Richard Fitzgerald) - Add EXPORT macros for exporting PM functions from drivers (Richard Fitzgerald) - Remove /** from non-kernel-doc comments in hibernation code (Randy Dunlap) - Fix possible name leak in powercap_register_zone() (Yang Yingliang) - Add Meteor Lake and Emerald Rapids support to the intel_rapl power capping driver (Zhang Rui) - Modify the idle_inject power capping facility to support 100% idle injection (Srinivas Pandruvada) - Fix large time windows handling in the intel_rapl power capping driver (Zhang Rui) - Fix memory leaks with using debugfs_lookup() in the generic PM domains and Energy Model code (Greg Kroah-Hartman) - Add missing 'cache-unified' property in the example for kryo OPP bindings (Rob Herring) - Fix error checking in opp_migrate_dentry() (Qi Zheng) - Let qcom,opp-fuse-level be a 2-long array for qcom SoCs (Konrad Dybcio) - Modify some power management utilities to use the canonical ftrace path (Ross Zwisler) - Correct spelling problems for Documentation/power/ as reported by codespell (Randy Dunlap)" * tag 'pm-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (53 commits) Documentation: amd-pstate: disambiguate user space sections cpufreq: amd-pstate: Fix invalid write to MSR_AMD_CPPC_REQ dt-bindings: opp: opp-v2-kryo-cpu: enlarge opp-supported-hw maximum dt-bindings: cpufreq: qcom-cpufreq-nvmem: make cpr bindings optional dt-bindings: cpufreq: qcom-cpufreq-nvmem: specify supported opp tables PM: Add EXPORT macros for exporting PM functions cpuidle: psci: Do not suspend topology CPUs on PREEMPT_RT MIPS: loongson32: Drop obsolete cpufreq platform device powercap: intel_rapl: Fix handling for large time window cpuidle: driver: Update microsecond values of state parameters as needed cpuidle: sysfs: make kobj_type structures constant cpuidle: add ARCH_SUSPEND_POSSIBLE dependencies PM: EM: fix memory leak with using debugfs_lookup() PM: domains: fix memory leak with using debugfs_lookup() cpufreq: Make kobj_type structure constant cpufreq: davinci: Fix clk use after free cpufreq: amd-pstate: avoid uninitialized variable use cpufreq: Make cpufreq_unregister_driver() return void OPP: fix error checking in opp_migrate_dentry() dt-bindings: cpufreq: cpufreq-qcom-hw: Add SM8550 compatible ... commit ccfd889acb06eab10b98deb4b5eef0ec74157ea0 Author: Denis Arefev Date: Tue Jan 24 13:50:37 2023 +0300 smackfs: Added check catlen If the catlen is 0, the memory for the netlbl_lsm_catmap structure must be allocated anyway, otherwise the check of such rules is not completed correctly. Signed-off-by: Denis Arefev Signed-off-by: Casey Schaufler commit 7ae9fb1b7ecbb5d85d07857943f677fd1a559b18 Merge: 9c445d2637c93 9e69e845ae952 Author: Dmitry Torokhov Date: Tue Feb 21 11:19:49 2023 -0800 Merge branch 'next' into for-linus Prepare input updates for 6.3 merge window. commit 4a7d37e824f57dbace61abf62f53843800bd245c Merge: 902d9fcd8dccf 78f7a3fd6dc66 Author: Linus Torvalds Date: Tue Feb 21 11:07:23 2023 -0800 Merge tag 'hardening-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull hardening updates from Kees Cook: "Beyond some specific LoadPin, UBSAN, and fortify features, there are other fixes scattered around in various subsystems where maintainers were okay with me carrying them in my tree or were non-responsive but the patches were reviewed by others: - Replace 0-length and 1-element arrays with flexible arrays in various subsystems (Paulo Miguel Almeida, Stephen Rothwell, Kees Cook) - randstruct: Disable Clang 15 support (Eric Biggers) - GCC plugins: Drop -std=gnu++11 flag (Sam James) - strpbrk(): Refactor to use strchr() (Andy Shevchenko) - LoadPin LSM: Allow root filesystem switching when non-enforcing - fortify: Use dynamic object size hints when available - ext4: Fix CFI function prototype mismatch - Nouveau: Fix DP buffer size arguments - hisilicon: Wipe entire crypto DMA pool on error - coda: Fully allocate sig_inputArgs - UBSAN: Improve arm64 trap code reporting - copy_struct_from_user(): Add minimum bounds check on kernel buffer size" * tag 'hardening-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: randstruct: disable Clang 15 support uaccess: Add minimum bounds check on kernel buffer size arm64: Support Clang UBSAN trap codes for better reporting coda: Avoid partial allocation of sig_inputArgs gcc-plugins: drop -std=gnu++11 to fix GCC 13 build lib/string: Use strchr() in strpbrk() crypto: hisilicon: Wipe entire pool on error net/i40e: Replace 0-length array with flexible array io_uring: Replace 0-length array with flexible array ext4: Fix function prototype mismatch for ext4_feat_ktype i915/gvt: Replace one-element array with flexible-array member drm/nouveau/disp: Fix nvif_outp_acquire_dp() argument size LoadPin: Allow filesystem switch when not enforcing LoadPin: Move pin reporting cleanly out of locking LoadPin: Refactor sysctl initialization LoadPin: Refactor read-only check into a helper ARM: ixp4xx: Replace 0-length arrays with flexible arrays fortify: Use __builtin_dynamic_object_size() when available rxrpc: replace zero-lenth array with DECLARE_FLEX_ARRAY() helper commit 902d9fcd8dccf6a5ccd009f2ae8fec5b3db7f41b Merge: 8cc01d43f882f 0fb0624b15d21 Author: Linus Torvalds Date: Tue Feb 21 11:04:56 2023 -0800 Merge tag 'seccomp-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull seccomp update from Kees Cook: - Fix kernel-doc function name ordering to avoid warning (Randy Dunlap) * tag 'seccomp-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: seccomp: fix kernel-doc function name warning commit 8cc01d43f882fa1f44d8aa6727a6ea783d8fbe3f Merge: 8ca8d89b43caf bba8d3d17dc26 Author: Linus Torvalds Date: Tue Feb 21 10:45:51 2023 -0800 Merge tag 'rcu.2023.02.10a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull RCU updates from Paul McKenney: - Documentation updates - Miscellaneous fixes, perhaps most notably: - Throttling callback invocation based on the number of callbacks that are now ready to invoke instead of on the total number of callbacks - Several patches that suppress false-positive boot-time diagnostics, for example, due to lockdep not yet being initialized - Make expedited RCU CPU stall warnings dump stacks of any tasks that are blocking the stalled grace period. (Normal RCU CPU stall warnings have done this for many years) - Lazy-callback fixes to avoid delays during boot, suspend, and resume. (Note that lazy callbacks must be explicitly enabled, so this should not (yet) affect production use cases) - Make kfree_rcu() and friends take advantage of polled grace periods, thus reducing memory footprint by almost two orders of magnitude, admittedly on a microbenchmark This also begins the transition from kfree_rcu(p) to kfree_rcu_mightsleep(p). This transition was motivated by bugs where kfree_rcu(p), which can block, was typed instead of the intended kfree_rcu(p, rh) - SRCU updates, perhaps most notably fixing a bug that causes SRCU to fail when booted on a system with a non-zero boot CPU. This surprising situation actually happens for kdump kernels on the powerpc architecture This also adds an srcu_down_read() and srcu_up_read(), which act like srcu_read_lock() and srcu_read_unlock(), but allow an SRCU read-side critical section to be handed off from one task to another - Clean up the now-useless SRCU Kconfig option There are a few more commits that are not yet acked or pulled into maintainer trees, and these will be in a pull request for a later merge window - RCU-tasks updates, perhaps most notably these fixes: - A strange interaction between PID-namespace unshare and the RCU-tasks grace period that results in a low-probability but very real hang - A race between an RCU tasks rude grace period on a single-CPU system and CPU-hotplug addition of the second CPU that can result in a too-short grace period - A race between shrinking RCU tasks down to a single callback list and queuing a new callback to some other CPU, but where that queuing is delayed for more than an RCU grace period. This can result in that callback being stranded on the non-boot CPU - Torture-test updates and fixes - Torture-test scripting updates and fixes - Provide additional RCU CPU stall-warning information in kernels built with CONFIG_RCU_CPU_STALL_CPUTIME=y, and restore the full five-minute timeout limit for expedited RCU CPU stall warnings * tag 'rcu.2023.02.10a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: (80 commits) rcu/kvfree: Add kvfree_rcu_mightsleep() and kfree_rcu_mightsleep() kernel/notifier: Remove CONFIG_SRCU init: Remove "select SRCU" fs/quota: Remove "select SRCU" fs/notify: Remove "select SRCU" fs/btrfs: Remove "select SRCU" fs: Remove CONFIG_SRCU drivers/pci/controller: Remove "select SRCU" drivers/net: Remove "select SRCU" drivers/md: Remove "select SRCU" drivers/hwtracing/stm: Remove "select SRCU" drivers/dax: Remove "select SRCU" drivers/base: Remove CONFIG_SRCU rcu: Disable laziness if lazy-tracking says so rcu: Track laziness during boot and suspend rcu: Remove redundant call to rcu_boost_kthread_setaffinity() rcu: Allow up to five minutes expedited RCU CPU stall-warning timeouts rcu: Align the output of RCU CPU stall warning messages rcu: Add RCU stall diagnosis information sched: Add helper nr_context_switches_cpu() ... commit 8ca8d89b43caf9a02a18414d6eeff966d2b14512 Merge: 3e82b41e1e3cc 32a47817d0755 Author: Linus Torvalds Date: Tue Feb 21 10:36:29 2023 -0800 Merge tag 'cgroup-for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup updates from Tejun Heo: "All the changes are trivial: documentation updates and a trivial code cleanup" * tag 'cgroup-for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup/cpuset: fix a few kernel-doc warnings & coding style docs: cgroup-v1: use numbered lists for user interface setup docs: cgroup-v1: add internal cross-references docs: cgroup-v1: make swap extension subsections subsections docs: cgroup-v1: use bullet lists for list of stat file tables docs: cgroup-v1: move hierarchy of accounting caption docs: cgroup-v1: fix footnotes docs: cgroup-v1: use code block for locking order schema docs: cgroup-v1: wrap remaining admonitions in admonition blocks docs: cgroup-v1: replace custom note constructs with appropriate admonition blocks cgroup/cpuset: no need to explicitly init a global static variable commit 3e82b41e1e3cc74108712a66b5be8a7b8be9e8b0 Merge: 9e58df973d227 c63a2e52d5e08 Author: Linus Torvalds Date: Tue Feb 21 10:25:48 2023 -0800 Merge tag 'wq-for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue updates from Tejun Heo: - When per-cpu workqueue workers expire after sitting idle for too long, they used to wake up to the CPU that they're bound to in order to exit. This unfortunately could cause unwanted disturbances on CPUs isolated for e.g. RT applications. The worker exit path is restructured so that an existing worker is unbound from its CPU before being woken up for the last time, allowing it to migrate away from an isolated CPU for exiting. - A couple debug improvements. Watchdog dump is made more compact and workqueue now warns if used-after-free during the RCU grace period after destroy_workqueue(). * tag 'wq-for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: Fold rebind_worker() within rebind_workers() workqueue: Unbind kworkers before sending them to exit() workqueue: Don't hold any lock while rcuwait'ing for !POOL_MANAGER_ACTIVE workqueue: Convert the idle_timer to a timer + work_struct workqueue: Factorize unbind/rebind_workers() logic workqueue: Protects wq_unbound_cpumask with wq_pool_attach_mutex workqueue: Make show_pwq() use run-length encoding workqueue: Add a new flag to spot the potential UAF error commit 9e58df973d2272e6e558965e7cb32453a4b380ff Merge: 560b80306782a 6f3ee0e22b4c6 Author: Linus Torvalds Date: Tue Feb 21 10:03:48 2023 -0800 Merge tag 'irq-core-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq updates from Thomas Gleixner: "Updates for the interrupt subsystem: Core: - Move the interrupt affinity spreading mechanism into lib/group_cpus so it can be used for similar spreading requirements, e.g. in the block multi-queue code This also contains a first usecase in the block multi-queue code which Jens asked to take along with the librarization - Improve irqdomain locking to close a number race conditions which can be observed with massive parallel device driver probing - Enforce and document the semantics of disable_irq() which cannot be invoked safely from non-sleepable context - Move the IPI multiplexing code from the Apple AIC driver into the core, so it can be reused by RISCV Drivers: - Plug OF node refcounting leaks in various drivers - Correctly mark level triggered interrupts in the Broadcom L2 drivers - The usual small fixes and improvements - No new drivers for the record!" * tag 'irq-core-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (42 commits) irqchip/irq-bcm7120-l2: Set IRQ_LEVEL for level triggered interrupts irqchip/irq-brcmstb-l2: Set IRQ_LEVEL for level triggered interrupts irqdomain: Switch to per-domain locking irqchip/mvebu-odmi: Use irq_domain_create_hierarchy() irqchip/loongson-pch-msi: Use irq_domain_create_hierarchy() irqchip/gic-v3-mbi: Use irq_domain_create_hierarchy() irqchip/gic-v3-its: Use irq_domain_create_hierarchy() irqchip/gic-v2m: Use irq_domain_create_hierarchy() irqchip/alpine-msi: Use irq_domain_add_hierarchy() x86/uv: Use irq_domain_create_hierarchy() x86/ioapic: Use irq_domain_create_hierarchy() irqdomain: Clean up irq_domain_push/pop_irq() irqdomain: Drop leftover brackets irqdomain: Drop dead domain-name assignment irqdomain: Drop revmap mutex irqdomain: Fix domain registration race irqdomain: Fix mapping-creation race irqdomain: Refactor __irq_domain_alloc_irqs() irqdomain: Look for existing mapping only once irqdomain: Drop bogus fwspec-mapping error handling ... commit 560b80306782aee1f7d42bd929ddf010eb52121d Merge: 056612fd41fef ab407a1919d26 Author: Linus Torvalds Date: Tue Feb 21 09:45:13 2023 -0800 Merge tag 'timers-core-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer updates from Thomas Gleixner: "Updates for timekeeping, timers and clockevent/source drivers: Core: - Yet another round of improvements to make the clocksource watchdog more robust: - Relax the clocksource-watchdog skew criteria to match the NTP criteria. - Temporarily skip the watchdog when high memory latencies are detected which can lead to false-positives. - Provide an option to enable TSC skew detection even on systems where TSC is marked as reliable. Sigh! - Initialize the restart block in the nanosleep syscalls to be directed to the no restart function instead of doing a partial setup on entry. This prevents an erroneous restart_syscall() invocation from corrupting user space data. While such a situation is clearly a user space bug, preventing this is a correctness issue and caters to the least suprise principle. - Ignore the hrtimer slack for realtime tasks in schedule_hrtimeout() to align it with the nanosleep semantics. Drivers: - The obligatory new driver bindings for Mediatek, Rockchip and RISC-V variants. - Add support for the C3STOP misfeature to the RISC-V timer to handle the case where the timer stops in deeper idle state. - Set up a static key in the RISC-V timer correctly before first use. - The usual small improvements and fixes all over the place" * tag 'timers-core-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (30 commits) clocksource/drivers/timer-sun4i: Add CLOCK_EVT_FEAT_DYNIRQ clocksource/drivers/em_sti: Mark driver as non-removable clocksource/drivers/sh_tmu: Mark driver as non-removable clocksource/drivers/riscv: Patch riscv_clock_next_event() jump before first use clocksource/drivers/timer-microchip-pit64b: Add delay timer clocksource/drivers/timer-microchip-pit64b: Select driver only on ARM dt-bindings: timer: sifive,clint: add comaptibles for T-Head's C9xx dt-bindings: timer: mediatek,mtk-timer: add MT8365 clocksource/drivers/riscv: Get rid of clocksource_arch_init() callback clocksource/drivers/sh_cmt: Mark driver as non-removable clocksource/drivers/timer-microchip-pit64b: Drop obsolete dependency on COMPILE_TEST clocksource/drivers/riscv: Increase the clock source rating clocksource/drivers/timer-riscv: Set CLOCK_EVT_FEAT_C3STOP based on DT dt-bindings: timer: Add bindings for the RISC-V timer device RISC-V: time: initialize hrtimer based broadcast clock event device dt-bindings: timer: rk-timer: Add rktimer for rv1126 time/debug: Fix memory leak with using debugfs_lookup() clocksource: Enable TSC watchdog checking of HPET and PMTMR only when requested posix-timers: Use atomic64_try_cmpxchg() in __update_gt_cputime() clocksource: Verify HPET and PMTMR when TSC unverified ... commit 02d7bd1efb4280ea1a75ad1eece3f19537f82a19 Author: Kevin Groeneveld Date: Sat Dec 10 15:38:35 2022 -0500 clk: imx: pll14xx: fix recalc_rate for negative kdiv kdiv is a signed 16 bit value in the DEV_CTL1 register. Commit 53990cf9d5b4 ("clk: imx: pll14xx: consolidate rate calculation") changed the kdiv variable from a short int to just int. When the value read from the DIV_CTL1 register is assigned directly to an int the sign of the value is lost resulting in incorrect results when the value is negative. Adding a s16 cast to the register value fixes the issue. Fixes: 53990cf9d5b4 ("clk: imx: pll14xx: consolidate rate calculation") Signed-off-by: Kevin Groeneveld Link: https://lore.kernel.org/r/20221210203835.9714-1-kgroeneveld@lenbrook.com Reviewed-by: Abel Vesa Signed-off-by: Stephen Boyd commit d1fabc68f8e0541d41657096dc713cb01775652d Merge: 4d4266e3fd321 f922c7b1c1c45 Author: Jakub Kicinski Date: Tue Feb 21 09:26:22 2023 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Per-next-PR merge. net/smc/af_smc.c b5dd4d698171 ("net/smc: llc_conf_mutex refactor, replace it with rw_semaphore") e40b801b3603 ("net/smc: fix potential panic dues to unprotected smc_llc_srv_add_link()") https://lore.kernel.org/all/20230221124008.6303c330@canb.auug.org.au/ Signed-off-by: Jakub Kicinski commit 056612fd41fef88eef22a032021cc15ef98cfc34 Merge: 3f0b0903fde58 fcb3a81d22175 Author: Linus Torvalds Date: Tue Feb 21 09:24:08 2023 -0800 Merge tag 'x86-cleanups-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull miscellaneous x86 cleanups from Thomas Gleixner: - Correct the common copy and pasted mishandling of kstrtobool() in the strict_sas_size() setup function - Make recalibrate_cpu_khz() an GPL only export - Check TSC feature before doing anything else which avoids pointless code execution if TSC is not available - Remove or fixup stale and misleading comments - Remove unused or pointelessly duplicated variables - Spelling and typo fixes * tag 'x86-cleanups-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/hotplug: Remove incorrect comment about mwait_play_dead() x86/tsc: Do feature check as the very first thing x86/tsc: Make recalibrate_cpu_khz() export GPL only x86/cacheinfo: Remove unused trace variable x86/Kconfig: Fix spellos & punctuation x86/signal: Fix the value returned by strict_sas_size() x86/cpu: Remove misleading comment x86/setup: Move duplicate boot_cpu_data definition out of the ifdeffery x86/boot/e820: Fix typo in e820.c comment commit 4d4266e3fd321fadb628ce02de641b129522c39c Author: Ilias Apalodimas Date: Sat Feb 18 00:21:30 2023 +0200 page_pool: add a comment explaining the fragment counter usage When reading the page_pool code the first impression is that keeping two separate counters, one being the page refcnt and the other being fragment pp_frag_count, is counter-intuitive. However without that fragment counter we don't know when to reliably destroy or sync the outstanding DMA mappings. So let's add a comment explaining this part. Reviewed-by: Alexander Duyck Signed-off-by: Ilias Apalodimas Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/r/20230217222130.85205-1-ilias.apalodimas@linaro.org Signed-off-by: Jakub Kicinski commit a00da30c052f07d67da56efd6a4f1fc85956c979 Author: Vladimir Oltean Date: Mon Feb 20 14:23:31 2023 +0200 net: ethtool: fix __ethtool_dev_mm_supported() implementation The MAC Merge layer is supported when ops->get_mm() returns 0. The implementation was changed during review, and in this process, a bug was introduced. Link: https://lore.kernel.org/netdev/20230111161706.1465242-5-vladimir.oltean@nxp.com/ Fixes: 04692c9020b7 ("net: ethtool: netlink: retrieve stats from multiple sources (eMAC, pMAC)") Signed-off-by: Vladimir Oltean Reviewed-by: Ferenc Fejes Link: https://lore.kernel.org/all/20230220122343.1156614-2-vladimir.oltean@nxp.com/ Signed-off-by: Jakub Kicinski commit 7ec077744aade63729d58c2d26861c3147a4d8aa Author: Bo Liu Date: Tue Feb 21 03:30:36 2023 -0500 ethtool: pse-pd: Fix double word in comments Remove the repeated word "for" in comments. Signed-off-by: Bo Liu Reviewed-by: Oleksij Rempel Link: https://lore.kernel.org/r/20230221083036.2414-1-liubo03@inspur.com Signed-off-by: Jakub Kicinski commit 951bce29c8988209cc359e1fa35a4aaa35542fd5 Author: Xuan Zhuo Date: Tue Feb 21 15:51:40 2023 +0800 xsk: add linux/vmalloc.h to xsk.c Fix the failure of the compilation under the sh4. Because we introduced remap_vmalloc_range() earlier, this has caused the compilation failure on the sh4 platform. So this introduction of the header file of linux/vmalloc.h. config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20230221/202302210041.kpPQLlNQ-lkp@intel.com/config) compiler: sh4-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=9f78bf330a66cd400b3e00f370f597e9fa939207 git remote add net-next https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git git fetch --no-tags net-next master git checkout 9f78bf330a66cd400b3e00f370f597e9fa939207 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash net/ Fixes: 9f78bf330a66 ("xsk: support use vaddr as ring") Signed-off-by: Xuan Zhuo Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202302210041.kpPQLlNQ-lkp@intel.com/ Link: https://lore.kernel.org/r/20230221075140.46988-1-xuanzhuo@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 3f0b0903fde584a7398f82fc00bf4f8138610b87 Merge: efebca0ba9cfe dac0da428f8df Author: Linus Torvalds Date: Tue Feb 21 08:54:41 2023 -0800 Merge tag 'x86_vdso_for_v6.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 vdso updates from Borislav Petkov: - Add getcpu support for the 32-bit version of the vDSO - Some smaller fixes * tag 'x86_vdso_for_v6.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/vdso: Fix -Wmissing-prototypes warnings x86/vdso: Fake 32bit VDSO build on 64bit compile for vgetcpu selftests: Emit a warning if getcpu() is missing on 32bit x86/vdso: Provide getcpu for x86-32. x86/cpu: Provide the full setup for getcpu() on x86-32 x86/vdso: Move VDSO image init to vdso2c generated code commit efebca0ba9cfe2bae79dba7b2b09b129c41cfc8e Merge: aa8c3db40adf1 f33e0c893b22b Author: Linus Torvalds Date: Tue Feb 21 08:47:36 2023 -0800 Merge tag 'x86_microcode_for_v6.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 microcode loader updates from Borislav Petkov: - Fix mixed steppings support on AMD which got broken somewhere along the way - Improve revision reporting - Properly check CPUID capabilities after late microcode upgrade to avoid false positives - A garden variety of other small fixes * tag 'x86_microcode_for_v6.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/microcode/core: Return an error only when necessary x86/microcode/AMD: Fix mixed steppings support x86/microcode/AMD: Add a @cpu parameter to the reloading functions x86/microcode/amd: Remove load_microcode_amd()'s bsp parameter x86/microcode: Allow only "1" as a late reload trigger value x86/microcode/intel: Print old and new revision during early boot x86/microcode/intel: Pass the microcode revision to print_ucode_info() directly x86/microcode: Adjust late loading result reporting message x86/microcode: Check CPU capabilities after late microcode update correctly x86/microcode: Add a parameter to microcode_check() to store CPU capabilities x86/microcode: Use the DEVICE_ATTR_RO() macro x86/microcode/AMD: Handle multiple glued containers properly x86/microcode/AMD: Rename a couple of functions commit aa8c3db40adf1204e47dac9c410eea82567fe82d Merge: 1adce1b9440cd 793207bad71c5 Author: Linus Torvalds Date: Tue Feb 21 08:38:45 2023 -0800 Merge tag 'x86_cache_for_v6.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 resource control updates from Borislav Petkov: - Add support for a new AMD feature called slow memory bandwidth allocation. Its goal is to control resource allocation in external slow memory which is connected to the machine like for example through CXL devices, accelerators etc * tag 'x86_cache_for_v6.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/resctrl: Fix a silly -Wunused-but-set-variable warning Documentation/x86: Update resctrl.rst for new features x86/resctrl: Add interface to write mbm_local_bytes_config x86/resctrl: Add interface to write mbm_total_bytes_config x86/resctrl: Add interface to read mbm_local_bytes_config x86/resctrl: Add interface to read mbm_total_bytes_config x86/resctrl: Support monitor configuration x86/resctrl: Add __init attribute to rdt_get_mon_l3_config() x86/resctrl: Detect and configure Slow Memory Bandwidth Allocation x86/resctrl: Include new features in command line options x86/cpufeatures: Add Bandwidth Monitoring Event Configuration feature flag x86/resctrl: Add a new resource type RDT_RESOURCE_SMBA x86/cpufeatures: Add Slow Memory Bandwidth Allocation feature flag x86/resctrl: Replace smp_call_function_many() with on_each_cpu_mask() commit 1adce1b9440cdf0c427419b99bc9db756b5ad931 Merge: d9de5ce8a5ec8 923510c88d2b7 Author: Linus Torvalds Date: Tue Feb 21 08:27:47 2023 -0800 Merge tag 'x86_alternatives_for_v6.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 asm alternatives updates from Borislav Petkov: - Teach the static_call patching infrastructure to handle conditional tall calls properly which can be static calls too - Add proper struct alt_instr.flags which controls different aspects of insn patching behavior * tag 'x86_alternatives_for_v6.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/static_call: Add support for Jcc tail-calls x86/alternatives: Teach text_poke_bp() to patch Jcc.d32 instructions x86/alternatives: Introduce int3_emulate_jcc() x86/alternatives: Add alt_instr.flags commit 9c7c4bc986932218fd0df9d2a100509772028fb1 Author: Ming Lei Date: Mon Feb 20 12:14:13 2023 +0800 ublk: remove check IO_URING_F_SQE128 in ublk_ch_uring_cmd sizeof(struct ublksrv_io_cmd) is 16bytes, which can be held in 64byte SQE, so not necessary to check IO_URING_F_SQE128. With this change, we get chance to save half SQ ring memory. Fixed: 71f28f3136af ("ublk_drv: add io_uring based userspace block driver") Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20230220041413.1524335-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 9e0c7efa5ea231d85c0d41693a5115b3b971717c Author: Juhyung Park Date: Fri Feb 3 11:40:29 2023 +0900 block: remove more NULL checks after bdev_get_queue() bdev_get_queue() never returns NULL. Several commits [1][2] have been made before to remove such superfluous checks, but some still remained. For places where bdev_get_queue() is called solely for NULL checks, it is removed entirely. [1] commit ec9fd2a13d74 ("blk-lib: don't check bdev_get_queue() NULL check") [2] commit fea127b36c93 ("block: remove superfluous check for request queue in bdev_is_zoned()") Signed-off-by: Juhyung Park Reviewed-by: Pankaj Raghav Link: https://lore.kernel.org/r/20230203024029.48260-1-qkrwngud825@gmail.com Signed-off-by: Jens Axboe commit b4858dc61647e5439cbba79022bfc87328c1fb84 Author: Colin Ian King Date: Mon Feb 20 14:44:22 2023 +0000 of: dynamic: Fix spelling mistake "kojbect" -> "kobject" There is a spelling mistake in a pr_err message. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Frank Rowand Link: https://lore.kernel.org/r/20230220144422.873356-1-colin.i.king@gmail.com Signed-off-by: Rob Herring commit fb4b06f521c1cdf04088151ed587c188862e3111 Author: Conor Dooley Date: Fri Feb 17 18:00:36 2023 +0000 dt-bindings: drop Sagar Kadam from SiFive binding maintainership Sagar's email listed in maintainers is bouncing as his division was sold off by the company. I attempted to contact him some days ago on what the bounce email told me was his new contact information, but am yet to receive a response. Paul and Palmer are listed on each of the bindings, both of whom were alive & well as of Wednesday so the bindings remain maintained. CC: Sagar Kadam CC: Sagar Kadam Link: https://lore.kernel.org/all/785425ca-4000-a7e4-16d6-4d68c91b158d@kernel.org/ Signed-off-by: Conor Dooley Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20230217180035.39658-1-conor@kernel.org Signed-off-by: Rob Herring commit 64d666a7bd85c6208bb7f6700b426ac8943a7fa3 Author: Mukesh Ojha Date: Tue Feb 21 19:06:55 2023 +0530 dt-bindings: sram: qcom,imem: document sm8450 Add compatible for sm8450 IMEM. Signed-off-by: Mukesh Ojha Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/1676986616-21378-1-git-send-email-quic_mojha@quicinc.com Signed-off-by: Rob Herring commit 0305c98c9e1595bf4e8b3597a65ace9de98f0b5f Author: Keguang Zhang Date: Tue Feb 21 18:25:45 2023 +0800 dt-bindings: interrupt-controller: convert loongson,ls1x-intc.txt to json-schema Convert the Loongson1 interrupt controller dt-bindings to json-schema. Signed-off-by: Keguang Zhang Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230221102545.2103632-1-keguang.zhang@gmail.com Signed-off-by: Rob Herring commit d9de5ce8a5ec8f97c9468244fd85ff1a10363b60 Merge: 0246725d7399d 28980db94742f Author: Linus Torvalds Date: Tue Feb 21 08:10:03 2023 -0800 Merge tag 'edac_updates_for_v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC updates from Borislav Petkov: - Add a driver for the RAS functionality on Xilinx's on chip memory controller - Add support for decoding errors from the first and second level memory on SKL-based hardware - Add support for the memory controllers in Intel Granite Rapids and Emerald Rapids machines - First round of amd64_edac driver simplification and removal of unneeded functionality - The usual cleanups and fixes * tag 'edac_updates_for_v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/amd64: Shut up an -Werror,-Wsometimes-uninitialized clang false positive EDAC/amd64: Remove early_channel_count() EDAC/amd64: Remove PCI Function 0 EDAC/amd64: Remove PCI Function 6 EDAC/amd64: Remove scrub rate control for Family 17h and later EDAC/amd64: Don't set up EDAC PCI control on Family 17h+ EDAC/i10nm: Add driver decoder for Sapphire Rapids server EDAC/i10nm: Add Intel Granite Rapids server support EDAC/i10nm: Make more configurations CPU model specific EDAC/i10nm: Add Intel Emerald Rapids server support EDAC/skx_common: Delete duplicated and unreachable code EDAC/skx_common: Enable EDAC support for the "near" memory EDAC/qcom: Add platform_device_id table for module autoloading EDAC/zynqmp: Add EDAC support for Xilinx ZynqMP OCM dt-bindings: edac: Add bindings for Xilinx ZynqMP OCM commit 0246725d7399d7d6acc8fd5a1a0a1ffce9a1eaa3 Merge: 89f5349e06733 8a01ec97dc066 Author: Linus Torvalds Date: Tue Feb 21 08:04:51 2023 -0800 Merge tag 'ras_core_for_v6.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS updates from Borislav Petkov: - Add support for reporting more bits of the physical address on error, on newer AMD CPUs - Mask out bits which don't belong to the address of the error being reported * tag 'ras_core_for_v6.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce: Mask out non-address bits from machine check bank x86/mce: Add support for Extended Physical Address MCA changes x86/mce: Define a function to extract ErrorAddr from MCA_ADDR commit 939204e4df962982cbc84acc26b29b421dd530a8 Merge: b4ff830eca097 c9c3395d5e3dc Author: Jason Gunthorpe Date: Tue Feb 21 11:11:03 2023 -0400 Merge tag 'v6.2' into iommufd.git for-next Resolve conflicts from the signature change in iommu_map: - drivers/infiniband/hw/usnic/usnic_uiom.c Switch iommu_map_atomic() to iommu_map(.., GFP_ATOMIC) - drivers/vfio/vfio_iommu_type1.c Following indenting change for GFP_KERNEL Signed-off-by: Jason Gunthorpe commit ce7980ae9080f72f08d50355c4d9084d57aece63 Author: Thomas Weißschuh Date: Fri Feb 17 03:16:25 2023 +0000 genirq/irqdesc: 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 which prevents modification at runtime. Signed-off-by: Thomas Weißschuh Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20230217-kobj_type-irq-v1-1-fedfacaf8cdb@weissschuh.net commit 392143c9f2a31a9faaf99a6f8639eae7e71b8e61 Merge: 0c2baf6509af1 d551afc258789 Author: Petr Mladek Date: Tue Feb 21 13:41:17 2023 +0100 Merge branch 'rework/buffers-cleanup' into for-linus commit 3fb1f62f80a1d249260db5ea9e22c51e52fab9ae Author: Thomas Zimmermann Date: Thu Feb 16 15:06:20 2023 +0100 drm/fb-helper: Remove drm_fb_helper_unprepare() from drm_fb_helper_fini() Move drm_fb_helper_unprepare() from drm_fb_helper_fini() into the calling fbdev implementation. Avoids a possible stale mutex with generic fbdev code. As indicated by its name, drm_fb_helper_prepare() prepares struct drm_fb_helper before setting up the fbdev support with a call to drm_fb_helper_init(). In legacy fbdev emulation, this happens next to each other. If successful, drm_fb_helper_fini() later tear down the fbdev device and also unprepare via drm_fb_helper_unprepare(). Generic fbdev emulation prepares struct drm_fb_helper immediately after allocating the instance. It only calls drm_fb_helper_init() as part of processing a hotplug event. If the hotplug-handling fails, it runs drm_fb_helper_fini(). This unprepares the fb-helper instance and the next hotplug event runs on stale data. Solve this by moving drm_fb_helper_unprepare() from drm_fb_helper_fini() into the fbdev implementations. Call it right before freeing the fb-helper instance. Fixes: 643231b28380 ("drm/fbdev-generic: Minimize hotplug error handling") Cc: Thomas Zimmermann Cc: Javier Martinez Canillas Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230216140620.17699-1-tzimmermann@suse.de commit b45bc2e09906a7c8370b7f2a6c204bcaa1b781fc Merge: 0028517724a52 f5451547b8310 Author: Vlastimil Babka Date: Tue Feb 21 13:20:10 2023 +0100 Merge branch 'slab/for-6.3/fixes' into slab/for-linus Two fixes for SLAB and SLUB - Make it possible to use kmem_cache_alloc_bulk() early in boot when interrupts are not yet enabled, as code doing that start to appear via the maple tree (by Thomas Gleixner). - Fix debugfs-related memory leak (by Greg Kroah-Hartman). commit f922c7b1c1c45740d329bf248936fdb78c0cff6e Author: Jiri Pirko Date: Mon Feb 20 14:23:36 2023 +0100 sefltests: netdevsim: wait for devlink instance after netns removal When devlink instance is put into network namespace and that network namespace gets deleted, devlink instance is moved back into init_ns. This is done as a part of cleanup_net() routine. Since cleanup_net() is called asynchronously from workqueue, there is no guarantee that the devlink instance move is done after "ip netns del" returns. So fix this race by making sure that the devlink instance is present before any other operation. Reported-by: Amir Tzin Fixes: b74c37fd35a2 ("selftests: netdevsim: add tests for devlink reload with resources") Signed-off-by: Jiri Pirko Reviewed-by: Pavan Chebbi Link: https://lore.kernel.org/r/20230220132336.198597-1-jiri@resnulli.us Signed-off-by: Paolo Abeni commit 0028517724a520cce416ab69e3f3ea0632ee20c0 Merge: cc2e9d2b26c86 81ce2ebd194cf Author: Vlastimil Babka Date: Tue Feb 21 11:49:14 2023 +0100 Merge branch 'slab/for-6.3/cleanups' into slab/for-linus A bunch of cleanups for SLAB and SLUB: - Use the standard idiom to get head page of folio (by SeongJae Park) - Simplify and inline is_debug_pagealloc_cache() in SLAB (by lvqian) - Remove unused variable in SLAB (by Gou Hao) commit b60417a9f2b890a8094477b2204d4f73c535725e Author: Roxana Nicolescu Date: Mon Feb 20 12:04:00 2023 +0100 selftest: fib_tests: Always cleanup before exit Usage of `set -e` before executing a command causes immediate exit on failure, without cleanup up the resources allocated at setup. This can affect the next tests that use the same resources, leading to a chain of failures. A simple fix is to always call cleanup function when the script exists. This approach is already used by other existing tests. Fixes: 1056691b2680 ("selftests: fib_tests: Make test results more verbose") Signed-off-by: Roxana Nicolescu Link: https://lore.kernel.org/r/20230220110400.26737-2-roxana.nicolescu@canonical.com Signed-off-by: Paolo Abeni commit fdbf807215250217c83f1cb715b883cd910102fa Author: Steve French Date: Thu Jan 19 15:20:21 2023 -0600 update internal module version number for cifs.ko From 2.41 to 2.42 Signed-off-by: Steve French commit e6cc6f175566dd21a3f6e384c24593b1c751dd74 Author: Reinette Chatre Date: Tue Feb 14 13:13:20 2023 -0800 PCI/MSI: Clarify usage of pci_msix_free_irq() pci_msix_free_irq() is used to free an interrupt on a PCI/MSI-X interrupt domain. The API description specifies that the interrupt to be freed was allocated via pci_msix_alloc_irq_at(). This description limits the usage of pci_msix_free_irq() since pci_msix_free_irq() can also be used to free MSI-X interrupts allocated with, for example, pci_alloc_irq_vectors(). Remove the text stating that the interrupt to be freed had to be allocated with pci_msix_alloc_irq_at(). The needed struct msi_map need not be from pci_msix_alloc_irq_at() but can be created from scratch using pci_irq_vector() to obtain the Linux IRQ number. Highlight that pci_msix_free_irq() cannot be used to disable MSI-X to guide users that, for example, pci_free_irq_vectors() remains to be needed. Signed-off-by: Reinette Chatre Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Link: https://lore.kernel.org/lkml/87r0xsd8j4.ffs@tglx Link: https://lore.kernel.org/r/4c3e7a50d6e70f408812cd7ab199c6b4b326f9de.1676408572.git.reinette.chatre@intel.com commit e77978de4765229e09c8fabcf4f8419ff367317f Author: Shyam Prasad N Date: Fri Feb 10 17:41:17 2023 +0000 cifs: update ip_addr for ses only for primary chan setup We update ses->ip_addr whenever we do a session setup. But this should happen only for primary channel in mchan scenario. Signed-off-by: Shyam Prasad N Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit df57109bd50b9ed6911f3c2aa914189fe4c1fe2c Author: Shyam Prasad N Date: Fri Feb 10 16:34:31 2023 +0000 cifs: use tcon allocation functions even for dummy tcon In smb2_reconnect_server, we allocate a dummy tcon for calling reconnect for just the session. This should be allocated using tconInfoAlloc, and not kmalloc. Fixes: 3663c9045f51 ("cifs: check reconnects for channels of active tcons too") Signed-off-by: Shyam Prasad N Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit ea90708d3cf3d0d92c02afe445ad463fb3c6bf10 Author: Shyam Prasad N Date: Mon Dec 19 05:40:44 2022 +0000 cifs: use the least loaded channel for sending requests Till now, we've used a simple round robin approach to distribute the requests between the channels. This does not work well if the channels consume the requests at different speeds, even if the advertised speeds are the same. This change will allow the client to pick the channel with least number of requests currently in-flight. This will disregard the link speed, and select a channel based on the current load of the channels. For cases when all the channels are equally loaded, fall back to the old round robin method. Signed-off-by: Shyam Prasad N Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit bec46462567032afb05017cb10c545aab0810a73 Author: Pali Rohár Date: Mon Feb 20 09:04:35 2023 +0100 powerpc: dts: turris1x.dts: Set lower priority for CPLD syscon-reboot Due to CPLD firmware bugs, set CPLD syscon-reboot priority level to 64 (between rstcr and watchdog) to ensure that rstcr's global-utilities reset method which is preferred stay as default one, and to ensure that CPLD syscon-reboot is more preferred than watchdog reset method. Fixes: 0531a4abd1c6 ("powerpc: dts: turris1x.dts: Add CPLD reboot node") Depends-on: e6333293f27c ("power: reset: syscon-reboot: Add support for specifying priority") Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230220080435.4237-1-pali@kernel.org commit 89f5349e0673322857bd432fa23113af56673739 Merge: 238b05ec999a0 7ddf0050a21fd Author: Linus Torvalds Date: Mon Feb 20 19:04:54 2023 -0800 Merge tag 'x86-platform-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 platform update from Ingo Molnar: - Simplify add_rtc_cmos() - Use strscpy() in the mcelog code * tag 'x86-platform-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce/dev-mcelog: use strscpy() to instead of strncpy() x86/rtc: Simplify PNP ids check commit 238b05ec999a036872af52d23007a7fc5a2df74e Merge: 2e0ddb34e5a39 ebd3ad60a6881 Author: Linus Torvalds Date: Mon Feb 20 19:00:00 2023 -0800 Merge tag 'x86-mm-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 mm update from Ingo Molnar: "Micro-optimize __flush_tlb_all()" * tag 'x86-mm-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu: Use cpu_feature_enabled() when checking global pages support commit 2e0ddb34e5a392ad6bd6a5ada38aac53a1cc0d1a Merge: 8a68bd3e9ff6f cb3ea4b7671b7 Author: Linus Torvalds Date: Mon Feb 20 18:50:02 2023 -0800 Merge tag 'x86-fpu-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fpu updates from Ingo Molnar: - Replace zero-length array in struct xregs_state with flexible-array member, to help the enabling of stricter compiler checks. - Don't set TIF_NEED_FPU_LOAD for PF_IO_WORKER threads. * tag 'x86-fpu-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/fpu: Don't set TIF_NEED_FPU_LOAD for PF_IO_WORKER threads x86/fpu: Replace zero-length array in struct xregs_state with flexible-array member commit 8a68bd3e9ff6f480fc03369023a1d981cb803079 Merge: 572640f0c0d6c ce3ba2af9695e Author: Linus Torvalds Date: Mon Feb 20 18:40:45 2023 -0800 Merge tag 'x86-core-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 core updates from Ingo Molnar: - Clean up the signal frame layout tests - Suppress KMSAN false positive reports in arch_within_stack_frames() * tag 'x86-core-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86: Suppress KMSAN reports in arch_within_stack_frames() x86/signal/compat: Move sigaction_compat_abi() to signal_64.c x86/signal: Move siginfo field tests commit 572640f0c0d6c681104880090dc0560b69c9d0e6 Merge: 35011c67c8b7f f9bb7f6a7eb0e Author: Linus Torvalds Date: Mon Feb 20 18:36:54 2023 -0800 Merge tag 'x86-build-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 build update from Ingo Molnar: "Make the 64-bit defconfig the x86 default for all builds, unless x86-32 is requested explicitly" * tag 'x86-build-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/build: Make 64-bit defconfig the default commit 35011c67c8b7ff96c4e2dd892099ba643f9ae11e Merge: 6be3dafc7c1d3 e2869bd7af608 Author: Linus Torvalds Date: Mon Feb 20 18:32:55 2023 -0800 Merge tag 'x86-boot-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 boot updates from Ingo Molnar: - Robustify/fix calling startup_{32,64}() from the decompressor code, and removing x86 quirk from scripts/head-object-list.txt as a result. - Do not register processors that cannot be onlined for x2APIC * tag 'x86-boot-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/acpi/boot: Do not register processors that cannot be onlined for x2APIC scripts/head-object-list: Remove x86 from the list x86/boot: Robustify calling startup_{32,64}() from the decompressor code commit 6be3dafc7c1d323debb5910d697c5cd2cb19825f Merge: 1f2d9ffc7a5f9 65c24d7b0f914 Author: Linus Torvalds Date: Mon Feb 20 18:25:30 2023 -0800 Merge tag 'x86-asm-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 asm updates from Ingo Molnar: "Header fixes and a DocBook fix" * tag 'x86-asm-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/lib: Fix compiler and kernel-doc warnings x86/lib: Include to fix a missing prototypes warning at build time commit 95e158ec843666d76c09900507db08b76d77ce3e Author: Bastian Germann Date: Wed Feb 15 21:37:07 2023 +0100 dt-bindings: hwlock: sun6i: Add #hwlock-cells to example The dt-bindings tools will compile the yaml dt examples and this prevents an error about this node not existing. Signed-off-by: Bastian Germann Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230215203711.6293-3-bage@debian.org commit 65f81bbd9117cf2f2090998a1ff4345742678d26 Author: Konrad Dybcio Date: Thu Feb 16 12:08:02 2023 +0100 dt-bindings: arm: Add Cortex-A715 and X3 Add compatibles for the Cortex-A715 and X3 cores found in some recent flagship designs. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230216110803.3945747-1-konrad.dybcio@linaro.org Signed-off-by: Rob Herring commit 1f2d9ffc7a5f916935749ffc6e93fb33bfe94d2f Merge: a2f0e7eee1344 7c4a5b89a0b5a Author: Linus Torvalds Date: Mon Feb 20 17:41:08 2023 -0800 Merge tag 'sched-core-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Ingo Molnar: - Improve the scalability of the CFS bandwidth unthrottling logic with large number of CPUs. - Fix & rework various cpuidle routines, simplify interaction with the generic scheduler code. Add __cpuidle methods as noinstr to objtool's noinstr detection and fix boatloads of cpuidle bugs & quirks. - Add new ABI: introduce MEMBARRIER_CMD_GET_REGISTRATIONS, to query previously issued registrations. - Limit scheduler slice duration to the sysctl_sched_latency period, to improve scheduling granularity with a large number of SCHED_IDLE tasks. - Debuggability enhancement on sys_exit(): warn about disabled IRQs, but also enable them to prevent a cascade of followup problems and repeat warnings. - Fix the rescheduling logic in prio_changed_dl(). - Micro-optimize cpufreq and sched-util methods. - Micro-optimize ttwu_runnable() - Micro-optimize the idle-scanning in update_numa_stats(), select_idle_capacity() and steal_cookie_task(). - Update the RSEQ code & self-tests - Constify various scheduler methods - Remove unused methods - Refine __init tags - Documentation updates - Misc other cleanups, fixes * tag 'sched-core-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (110 commits) sched/rt: pick_next_rt_entity(): check list_entry sched/deadline: Add more reschedule cases to prio_changed_dl() sched/fair: sanitize vruntime of entity being placed sched/fair: Remove capacity inversion detection sched/fair: unlink misfit task from cpu overutilized objtool: mem*() are not uaccess safe cpuidle: Fix poll_idle() noinstr annotation sched/clock: Make local_clock() noinstr sched/clock/x86: Mark sched_clock() noinstr x86/pvclock: Improve atomic update of last_value in pvclock_clocksource_read() x86/atomics: Always inline arch_atomic64*() cpuidle: tracing, preempt: Squash _rcuidle tracing cpuidle: tracing: Warn about !rcu_is_watching() cpuidle: lib/bug: Disable rcu_is_watching() during WARN/BUG cpuidle: drivers: firmware: psci: Dont instrument suspend code KVM: selftests: Fix build of rseq test exit: Detect and fix irq disabled state in oops cpuidle, arm64: Fix the ARM64 cpuidle logic cpuidle: mvebu: Fix duplicate flags assignment sched/fair: Limit sched slice duration ... commit a2f0e7eee1344eb9f91b22bc72d9eb0a52b849c9 Merge: 6e649d0856822 c828441f21ddc Author: Linus Torvalds Date: Mon Feb 20 17:29:55 2023 -0800 Merge tag 'perf-core-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf updates from Ingo Molnar: - Optimize perf_sample_data layout - Prepare sample data handling for BPF integration - Update the x86 PMU driver for Intel Meteor Lake - Restructure the x86 uncore code to fix a SPR (Sapphire Rapids) discovery breakage - Fix the x86 Zhaoxin PMU driver - Cleanups * tag 'perf-core-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits) perf/x86/intel/uncore: Add Meteor Lake support x86/perf/zhaoxin: Add stepping check for ZXC perf/x86/intel/ds: Fix the conversion from TSC to perf time perf/x86/uncore: Don't WARN_ON_ONCE() for a broken discovery table perf/x86/uncore: Add a quirk for UPI on SPR perf/x86/uncore: Ignore broken units in discovery table perf/x86/uncore: Fix potential NULL pointer in uncore_get_alias_name perf/x86/uncore: Factor out uncore_device_to_die() perf/core: Call perf_prepare_sample() before running BPF perf/core: Introduce perf_prepare_header() perf/core: Do not pass header for sample ID init perf/core: Set data->sample_flags in perf_prepare_sample() perf/core: Add perf_sample_save_brstack() helper perf/core: Add perf_sample_save_raw_data() helper perf/core: Add perf_sample_save_callchain() helper perf/core: Save the dynamic parts of sample data size x86/kprobes: Use switch-case for 0xFF opcodes in prepare_emulation perf/core: Change the layout of perf_sample_data perf/x86/msr: Add Meteor Lake support perf/x86/cstate: Add Meteor Lake support ... commit 6e649d08568220ee88deef0a1ad8b3a935420cf2 Merge: db77b8502a407 3b4863fa5b7dd Author: Linus Torvalds Date: Mon Feb 20 17:18:23 2023 -0800 Merge tag 'locking-core-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking updates from Ingo Molnar: - rwsem micro-optimizations - spinlock micro-optimizations - cleanups, simplifications * tag 'locking-core-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: vduse: Remove include of rwlock.h locking/lockdep: Remove lockdep_init_map_crosslock. x86/ACPI/boot: Use try_cmpxchg() in __acpi_{acquire,release}_global_lock() x86/PAT: Use try_cmpxchg() in set_page_memtype() locking/rwsem: Disable preemption in all down_write*() and up_write() code paths locking/rwsem: Disable preemption in all down_read*() and up_read() code paths locking/rwsem: Prevent non-first waiter from spinning in down_write() slowpath locking/qspinlock: Micro-optimize pending state waiting for unlock commit 1b9b4f922f96108da3bb5d87b2d603f5dfbc5650 Author: Ben Skeggs Date: Mon Feb 20 14:39:21 2023 +1000 drm/nouveau/fb/gp102-: cache scrubber binary on first load During system shutdown nouveau might not be able to request firmware from Userspace, which then leads to a regression preventing the system from shutting down. Cache the scrubber binary for this case. Fixes: 0e44c21708761 ("drm/nouveau/flcn: new code to load+boot simple HS FWs (VPR scrubber)") Signed-off-by: Ben Skeggs Signed-off-by: Karol Herbst Link: https://patchwork.freedesktop.org/patch/msgid/CACAvsv7Uf5=K44y8YLsiy0aMnc1zvGEQdeDe7RQF=AV+fxxzuQ@mail.gmail.com commit 3638a820c5c3b52f327cebb174fd4274bee08aa7 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 5582f3c1b14e9b6eb02983acac84a4da71b38ca9 Merge: fec67d1896add 8038510b1fe44 Author: Dave Airlie Date: Tue Feb 21 10:59:20 2023 +1000 Merge tag 'drm-intel-next-fixes-2023-02-17' of git://anongit.freedesktop.org/drm/drm-intel into drm-next drm/i915 fixes for the v6.3 merge window: - Fix eDP+DSI dual panel systems - Fix system suspend when fbdev isn't initialized - Fix memory leaks in scatterlist - Fix some MCR register annotations - Fix documentation build warnings Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87v8k0xyx4.fsf@intel.com commit f2b6cfda76d2119871e10fa01ecdc7178401ef22 Author: Leon Romanovsky Date: Sun Feb 19 11:09:10 2023 +0200 net/mlx5e: Align IPsec ASO result memory to be as required by hardware Hardware requires an alignment to 64 bytes to return ASO data. Missing this alignment caused to unpredictable results while ASO events were generated. Fixes: 8518d05b8f9a ("net/mlx5e: Create Advanced Steering Operation object for IPsec") Reported-by: Emeel Hakim Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/de0302c572b90c9224a72868d4e0d657b6313c4b.1676797613.git.leon@kernel.org Signed-off-by: Jakub Kicinski commit 05b953a550625dc05652e15aeb9af34771c96325 Merge: 981f40458e7a6 993fd9bd656a0 Author: Jakub Kicinski Date: Mon Feb 20 16:52:50 2023 -0800 Merge tag 'mlx5-updates-2023-02-15' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2023-02-15 1) From Gal Tariq and Parav, Few cleanups for mlx5 driver. 2) From Vlad: Allow offloading of ct 'new' match based on [1] [1] https://lore.kernel.org/netdev/20230201163100.1001180-1-vladbu@nvidia.com/ * tag 'mlx5-updates-2023-02-15' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5e: RX, Remove doubtful unlikely call net/mlx5e: Fix outdated TLS comment net/mlx5e: Remove unused function mlx5e_sq_xmit_simple net/mlx5e: Allow offloading of ct 'new' match net/mlx5e: Implement CT entry update net/mlx5: Simplify eq list traversal net/mlx5e: Remove redundant page argument in mlx5e_xdp_handle() net/mlx5e: Remove redundant page argument in mlx5e_xmit_xdp_buff() net/mlx5e: Switch to using napi_build_skb() ==================== Link: https://lore.kernel.org/r/20230218090513.284718-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 981f40458e7a6ffbdff1a09ece6099b3b49d08a5 Merge: 871489dd01b67 6702782845a5b Author: Jakub Kicinski Date: Mon Feb 20 16:46:11 2023 -0800 Merge branch 'net-sched-cls_api-support-hardware-miss-to-tc-action' Paul Blakey says: ==================== net/sched: cls_api: Support hardware miss to tc action This series adds support for hardware miss to instruct tc to continue execution in a specific tc action instance on a filter's action list. The mlx5 driver patch (besides the refactors) shows its usage instead of using just chain restore. Currently a filter's action list must be executed all together or not at all as driver are only able to tell tc to continue executing from a specific tc chain, and not a specific filter/action. This is troublesome with regards to action CT, where new connections should be sent to software (via tc chain restore), and established connections can be handled in hardware. Checking for new connections is done when executing the ct action in hardware (by checking the packet's tuple against known established tuples). But if there is a packet modification (pedit) action before action CT and the checked tuple is a new connection, hardware will need to revert the previous packet modifications before sending it back to software so it can re-match the same tc filter in software and re-execute its CT action. The following is an example configuration of stateless nat on mlx5 driver that isn't supported before this patchet: #Setup corrosponding mlx5 VFs in namespaces $ ip netns add ns0 $ ip netns add ns1 $ ip link set dev enp8s0f0v0 netns ns0 $ ip netns exec ns0 ifconfig enp8s0f0v0 1.1.1.1/24 up $ ip link set dev enp8s0f0v1 netns ns1 $ ip netns exec ns1 ifconfig enp8s0f0v1 1.1.1.2/24 up #Setup tc arp and ct rules on mxl5 VF representors $ tc qdisc add dev enp8s0f0_0 ingress $ tc qdisc add dev enp8s0f0_1 ingress $ ifconfig enp8s0f0_0 up $ ifconfig enp8s0f0_1 up #Original side $ tc filter add dev enp8s0f0_0 ingress chain 0 proto ip flower \ ct_state -trk ip_proto tcp dst_port 8888 \ action pedit ex munge tcp dport set 5001 pipe \ action csum ip tcp pipe \ action ct pipe \ action goto chain 1 $ tc filter add dev enp8s0f0_0 ingress chain 1 proto ip flower \ ct_state +trk+est \ action mirred egress redirect dev enp8s0f0_1 $ tc filter add dev enp8s0f0_0 ingress chain 1 proto ip flower \ ct_state +trk+new \ action ct commit pipe \ action mirred egress redirect dev enp8s0f0_1 $ tc filter add dev enp8s0f0_0 ingress chain 0 proto arp flower \ action mirred egress redirect dev enp8s0f0_1 #Reply side $ tc filter add dev enp8s0f0_1 ingress chain 0 proto arp flower \ action mirred egress redirect dev enp8s0f0_0 $ tc filter add dev enp8s0f0_1 ingress chain 0 proto ip flower \ ct_state -trk ip_proto tcp \ action ct pipe \ action pedit ex munge tcp sport set 8888 pipe \ action csum ip tcp pipe \ action mirred egress redirect dev enp8s0f0_0 #Run traffic $ ip netns exec ns1 iperf -s -p 5001& $ sleep 2 #wait for iperf to fully open $ ip netns exec ns0 iperf -c 1.1.1.2 -p 8888 #dump tc filter stats on enp8s0f0_0 chain 0 rule and see hardware packets: $ tc -s filter show dev enp8s0f0_0 ingress chain 0 proto ip | grep "hardware.*pkt" Sent hardware 9310116832 bytes 6149672 pkt Sent hardware 9310116832 bytes 6149672 pkt Sent hardware 9310116832 bytes 6149672 pkt A new connection executing the first filter in hardware will first rewrite the dst port to the new port, and then the ct action is executed, because this is a new connection, hardware will need to be send this back to software, on chain 0, to execute the first filter again in software. The dst port needs to be reverted otherwise it won't re-match the old dst port in the first filter. Because of that, currently mlx5 driver will reject offloading the above action ct rule. This series adds support for hardware partially executing a filter's action list, and letting tc software continue processing in the specific action instance where hardware left off (in the above case after the "action pedit ex munge tcp dport... of the first rule") allowing support for scenarios such as the above. ==================== Link: https://lore.kernel.org/r/20230217223620.28508-1-paulb@nvidia.com Signed-off-by: Jakub Kicinski commit 6702782845a5bf381a19b204c369e63420041665 Author: Paul Blakey Date: Sat Feb 18 00:36:20 2023 +0200 net/mlx5e: TC, Set CT miss to the specific ct action instance Currently, CT misses restore the missed chain on the tc skb extension so tc will continue from the relevant chain. Instead, restore the CT action's miss cookie on the extension, which will instruct tc to continue from the this specific CT action instance on the relevant filter's action list. Map the CT action's miss_cookie to a new miss object (ACT_MISS), and use this miss mapping instead of the current chain miss object (CHAIN_MISS) for CT action misses. To restore this new miss mapping value, add a RX restore rule for each such mapping value. Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Reviewed-by: Oz Sholmo Signed-off-by: Jakub Kicinski commit 235ff07da7ec2e5addcee68a366ac987571b4d7c Author: Paul Blakey Date: Sat Feb 18 00:36:19 2023 +0200 net/mlx5e: Rename CHAIN_TO_REG to MAPPED_OBJ_TO_REG This reg usage is always a mapped object, not necessarily containing chain info. Rename to properly convey what it stores. This patch doesn't change any functionality. Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Reviewed-by: Leon Romanovsky Signed-off-by: Jakub Kicinski commit 93a1ab2c545b88fa70f8c91b60b54e4175008742 Author: Paul Blakey Date: Sat Feb 18 00:36:18 2023 +0200 net/mlx5: Refactor tc miss handling to a single function Move tc miss handling code to en_tc.c, and remove duplicate code. Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Signed-off-by: Jakub Kicinski commit 03a283cdc8c80fd6002f8ab898ff5ccf78e33f95 Author: Paul Blakey Date: Sat Feb 18 00:36:17 2023 +0200 net/mlx5: Kconfig: Make tc offload depend on tc skb extension Tc skb extension is a basic requirement for using tc offload to support correct restoration on action miss. Depend on it. Signed-off-by: Paul Blakey Signed-off-by: Jakub Kicinski commit 606c7c43d08c4daf954ec8d58ae6dd39292fb457 Author: Paul Blakey Date: Sat Feb 18 00:36:16 2023 +0200 net/sched: flower: Support hardware miss to tc action To support hardware miss to tc action in actions on the flower classifier, implement the required getting of filter actions, and setup filter exts (actions) miss by giving it the filter's handle and actions. Signed-off-by: Paul Blakey Reviewed-by: Jiri Pirko Reviewed-by: Simon Horman Reviewed-by: Marcelo Ricardo Leitner Signed-off-by: Jakub Kicinski commit 08a0063df3aed8d76a4034279117db12dbc1050f Author: Paul Blakey Date: Sat Feb 18 00:36:15 2023 +0200 net/sched: flower: Move filter handle initialization earlier To support miss to action during hardware offload the filter's handle is needed when setting up the actions (tcf_exts_init()), and before offloading. Move filter handle initialization earlier. Signed-off-by: Paul Blakey Reviewed-by: Jiri Pirko Reviewed-by: Simon Horman Reviewed-by: Marcelo Ricardo Leitner Signed-off-by: Jakub Kicinski commit 80cd22c35c9001fe72bf614d29439de41933deca Author: Paul Blakey Date: Sat Feb 18 00:36:14 2023 +0200 net/sched: cls_api: Support hardware miss to tc action For drivers to support partial offload of a filter's action list, add support for action miss to specify an action instance to continue from in sw. CT action in particular can't be fully offloaded, as new connections need to be handled in software. This imposes other limitations on the actions that can be offloaded together with the CT action, such as packet modifications. Assign each action on a filter's action list a unique miss_cookie which drivers can then use to fill action_miss part of the tc skb extension. On getting back this miss_cookie, find the action instance with relevant cookie and continue classifying from there. Signed-off-by: Paul Blakey Reviewed-by: Jiri Pirko Reviewed-by: Simon Horman Reviewed-by: Marcelo Ricardo Leitner Acked-by: Jamal Hadi Salim Signed-off-by: Jakub Kicinski commit db4b49025c0c7116f1d2dfe8d5bbfc983ac054de Author: Paul Blakey Date: Sat Feb 18 00:36:13 2023 +0200 net/sched: Rename user cookie and act cookie struct tc_action->act_cookie is a user defined cookie, and the related struct flow_action_entry->act_cookie is used as an handle similar to struct flow_cls_offload->cookie. Rename tc_action->act_cookie to user_cookie, and flow_action_entry->act_cookie to cookie so their names would better fit their usage. Signed-off-by: Paul Blakey Reviewed-by: Marcelo Ricardo Leitner Signed-off-by: Jakub Kicinski commit 871489dd01b67483248edc8873c389a66e469f30 Merge: 5f22c3b6215d3 ed9a8ad7d8a1a Author: Jakub Kicinski Date: Mon Feb 20 16:40:52 2023 -0800 Merge tag 'ieee802154-for-net-next-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next Stefan Schmidt says: ==================== pull-request: ieee802154-next 2023-02-20 Miquel Raynal build upon his earlier work and introduced two new features into the ieee802154 stack. Beaconing to announce existing PAN's and passive scanning to discover the beacons and associated PAN's. The matching changes to the userspace configuration tool have been posted as well and will be released together with the kernel release. Arnd Bergmann and Dmitry Torokhov worked on converting the at86rf230 and cc2520 drivers away from the unused platform_data usage and towards the new gpiod API. (I had to add a revert as Dmitry found a regression on an already pushed tree on my side). Changes since v1 (pull request 2023-02-02) - Netlink API extack and NLA_POLICY* usage as suggested by Jakub - Removed always true condition found by kernel test robot - Simplify device removal with running background job for scanning - Fix problems with beacon sending in some cases by using the MLME tx path * tag 'ieee802154-for-net-next-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next: ieee802154: Drop device trackers mac802154: Fix an always true condition mac802154: Send beacons using the MLME Tx path ieee802154: Change error code on monitor scan netlink request ieee802154: Convert scan error messages to extack ieee802154: Use netlink policies when relevant on scan parameters ieee802154: at86rf230: switch to using gpiod API ieee802154: at86rf230: drop support for platform data Revert "at86rf230: convert to gpio descriptors" cc2520: move to gpio descriptors mac802154: Avoid superfluous endianness handling at86rf230: convert to gpio descriptors mac802154: Handle basic beaconing ieee802154: Add support for user beaconing requests mac802154: Handle passive scanning mac802154: Add MLME Tx locked helpers mac802154: Prepare forcing specific symbol duration ieee802154: Introduce a helper to validate a channel ieee802154: Define a beacon frame header ieee802154: Add support for user scanning requests ==================== Link: https://lore.kernel.org/r/20230220213749.386451-1-stefan@datenfreihafen.org Signed-off-by: Jakub Kicinski commit 5f22c3b6215d34b8af45c390c8d5ea2cef2ef5d2 Author: Alejandro Lucero Date: Mon Feb 20 11:01:33 2023 +0000 sfc: fix builds without CONFIG_RTC_LIB Add an embarrassingly missed semicolon plus and embarrassingly missed parenthesis breaking kernel building when CONFIG_RTC_LIB is not set like the one reported with ia64 config. Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202302170047.EjCPizu3-lkp@intel.com/ Fixes: 14743ddd2495 ("sfc: add devlink info support for ef100") Signed-off-by: Alejandro Lucero Link: https://lore.kernel.org/r/20230220110133.29645-1-alejandro.lucero-palau@amd.com Signed-off-by: Jakub Kicinski commit 5feeaba1063102baf789f4df263f655333924ccb Author: Yang Li Date: Mon Feb 20 14:59:58 2023 +0800 sfc: clean up some inconsistent indentings Fix some indentngs and remove the warning below: drivers/net/ethernet/sfc/mae.c:657 efx_mae_enumerate_mports() warn: inconsistent indenting Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4117 Signed-off-by: Yang Li Acked-by: Martin Habets Link: https://lore.kernel.org/r/20230220065958.52941-1-yang.lee@linux.alibaba.com Signed-off-by: Jakub Kicinski commit f8f185e39b4de91bc5235e5be0d829bea69d9b06 Author: Kees Cook Date: Sat Feb 18 10:38:50 2023 -0800 net/mlx4_en: Introduce flexible array to silence overflow warning The call "skb_copy_from_linear_data(skb, inl + 1, spc)" triggers a FORTIFY memcpy() warning on ppc64 platform: In function ‘fortify_memcpy_chk’, inlined from ‘skb_copy_from_linear_data’ at ./include/linux/skbuff.h:4029:2, inlined from ‘build_inline_wqe’ at drivers/net/ethernet/mellanox/mlx4/en_tx.c:722:4, inlined from ‘mlx4_en_xmit’ at drivers/net/ethernet/mellanox/mlx4/en_tx.c:1066:3: ./include/linux/fortify-string.h:513:25: error: call to ‘__write_overflow_field’ declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning] 513 | __write_overflow_field(p_size_field, size); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Same behaviour on x86 you can get if you use "__always_inline" instead of "inline" for skb_copy_from_linear_data() in skbuff.h The call here copies data into inlined tx destricptor, which has 104 bytes (MAX_INLINE) space for data payload. In this case "spc" is known in compile-time but the destination is used with hidden knowledge (real structure of destination is different from that the compiler can see). That cause the fortify warning because compiler can check bounds, but the real bounds are different. "spc" can't be bigger than 64 bytes (MLX4_INLINE_ALIGN), so the data can always fit into inlined tx descriptor. The fact that "inl" points into inlined tx descriptor is determined earlier in mlx4_en_xmit(). Avoid confusing the compiler with "inl + 1" constructions to get to past the inl header by introducing a flexible array "data" to the struct so that the compiler can see that we are not dealing with an array of inl structs, but rather, arbitrary data following the structure. There are no changes to the structure layout reported by pahole, and the resulting machine code is actually smaller. Reported-by: Josef Oskera Link: https://lore.kernel.org/lkml/20230217094541.2362873-1-joskera@redhat.com Fixes: f68f2ff91512 ("fortify: Detect struct member overflows in memcpy() at compile-time") Cc: Yishai Hadas Signed-off-by: Kees Cook Reviewed-by: Tariq Toukan Link: https://lore.kernel.org/r/20230218183842.never.954-kees@kernel.org Signed-off-by: Jakub Kicinski commit e7388b8a1a5bdf47a9a46803a5686387c1ce060d Author: David Howells Date: Mon Jan 16 14:19:29 2023 +0000 cifs: DIO to/from KVEC-type iterators should now work DIO to/from KVEC-type iterators should now work as the iterator is passed down to the socket in non-RDMA/non-crypto mode and in RDMA or crypto mode care is taken to handle vmap/vmalloc correctly and not take page refs when building a scatterlist. Signed-off-by: David Howells cc: Steve French cc: Shyam Prasad N cc: Rohith Surabattula cc: Tom Talpey cc: Jeff Layton cc: linux-cifs@vger.kernel.org Signed-off-by: Steve French commit 607aea3cc2a8f46d24c78eb4efcc511af1c2f74d Author: David Howells Date: Mon Jan 24 21:13:24 2022 +0000 cifs: Remove unused code Remove a bunch of functions that are no longer used and are commented out after the conversion to use iterators throughout the I/O path. Signed-off-by: David Howells cc: Steve French cc: Shyam Prasad N cc: Rohith Surabattula cc: Jeff Layton cc: linux-cifs@vger.kernel.org Link: https://lore.kernel.org/r/164928621823.457102.8777804402615654773.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/165211421039.3154751.15199634443157779005.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/165348881165.2106726.2993852968344861224.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/165364827876.3334034.9331465096417303889.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/166126396915.708021.2010212654244139442.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/166697261080.61150.17513116912567922274.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/166732033255.3186319.5527423437137895940.stgit@warthog.procyon.org.uk/ # rfc Signed-off-by: Steve French commit 3d78fe73fa123964be30f0acec449dc8a2241dae Author: David Howells Date: Wed Jan 25 13:34:38 2023 +0000 cifs: Build the RDMA SGE list directly from an iterator In the depths of the cifs RDMA code, extract part of an iov iterator directly into an SGE list without going through an intermediate scatterlist. Note that this doesn't support extraction from an IOBUF- or UBUF-type iterator (ie. user-supplied buffer). The assumption is that the higher layers will extract those to a BVEC-type iterator first and do whatever is required to stop the pages from going away. Signed-off-by: David Howells cc: Steve French cc: Shyam Prasad N cc: Rohith Surabattula cc: Tom Talpey cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: linux-rdma@vger.kernel.org Link: https://lore.kernel.org/r/166697260361.61150.5064013393408112197.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/166732032518.3186319.1859601819981624629.stgit@warthog.procyon.org.uk/ # rfc Signed-off-by: Steve French commit d08089f649a0cfb2099c8551ac47eef0cc23fdf2 Author: David Howells Date: Mon Jan 24 21:13:24 2022 +0000 cifs: Change the I/O paths to use an iterator rather than a page list Currently, the cifs I/O paths hand lists of pages from the VM interface routines at the top all the way through the intervening layers to the socket interface at the bottom. This is a problem, however, for interfacing with netfslib which passes an iterator through to the ->issue_read() method (and will pass an iterator through to the ->issue_write() method in future). Netfslib takes over bounce buffering for direct I/O, async I/O and encrypted content, so cifs doesn't need to do that. Netfslib also converts IOVEC-type iterators into BVEC-type iterators if necessary. Further, cifs needs foliating - and folios may come in a variety of sizes, so a page list pointing to an array of heterogeneous pages may cause problems in places such as where crypto is done. Change the cifs I/O paths to hand iov_iter iterators all the way through instead. Notes: (1) Some old routines are #if'd out to be removed in a follow up patch so as to avoid confusing diff, thereby making the diff output easier to follow. I've removed functions that don't overlap with anything added. (2) struct smb_rqst loses rq_pages, rq_offset, rq_npages, rq_pagesz and rq_tailsz which describe the pages forming the buffer; instead there's an rq_iter describing the source buffer and an rq_buffer which is used to hold the buffer for encryption. (3) struct cifs_readdata and cifs_writedata are similarly modified to smb_rqst. The ->read_into_pages() and ->copy_into_pages() are then replaced with passing the iterator directly to the socket. The iterators are stored in these structs so that they are persistent and don't get deallocated when the function returns (unlike if they were stack variables). (4) Buffered writeback is overhauled, borrowing the code from the afs filesystem to gather up contiguous runs of folios. The XARRAY-type iterator is then used to refer directly to the pagecache and can be passed to the socket to transmit data directly from there. This includes: cifs_extend_writeback() cifs_write_back_from_locked_folio() cifs_writepages_region() cifs_writepages() (5) Pages are converted to folios. (6) Direct I/O uses netfs_extract_user_iter() to create a BVEC-type iterator from an IOBUF/UBUF-type source iterator. (7) smb2_get_aead_req() uses netfs_extract_iter_to_sg() to extract page fragments from the iterator into the scatterlists that the crypto layer prefers. (8) smb2_init_transform_rq() attached pages to smb_rqst::rq_buffer, an xarray, to use as a bounce buffer for encryption. An XARRAY-type iterator can then be used to pass the bounce buffer to lower layers. Signed-off-by: David Howells cc: Steve French cc: Shyam Prasad N cc: Rohith Surabattula cc: Paulo Alcantara cc: Jeff Layton cc: linux-cifs@vger.kernel.org Link: https://lore.kernel.org/r/164311907995.2806745.400147335497304099.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/164928620163.457102.11602306234438271112.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/165211420279.3154751.15923591172438186144.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/165348880385.2106726.3220789453472800240.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/165364827111.3334034.934805882842932881.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/166126396180.708021.271013668175370826.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/166697259595.61150.5982032408321852414.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/166732031756.3186319.12528413619888902872.stgit@warthog.procyon.org.uk/ # rfc Signed-off-by: Steve French commit 3a70e0d4c9d74cb00f7c0ec022f5599f9f7ba07d Author: Horatiu Vultur Date: Fri Feb 17 22:09:17 2023 +0100 net: lan966x: Fix possible deadlock inside PTP When doing timestamping in lan966x and having PROVE_LOCKING enabled the following warning is shown. ======================================================== WARNING: possible irq lock inversion dependency detected 6.2.0-rc7-01749-gc54e1f7f7e36 #2786 Tainted: G N -------------------------------------------------------- swapper/0/0 just changed the state of lock: c2609f50 (_xmit_ETHER#2){+.-.}-{2:2}, at: sch_direct_xmit+0x16c/0x2e8 but this lock took another, SOFTIRQ-unsafe lock in the past: (&lan966x->ptp_ts_id_lock){+.+.}-{2:2} and interrupts could create inverse lock ordering between them. other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&lan966x->ptp_ts_id_lock); local_irq_disable(); lock(_xmit_ETHER#2); lock(&lan966x->ptp_ts_id_lock); lock(_xmit_ETHER#2); *** DEADLOCK *** 5 locks held by swapper/0/0: #0: c1001e18 ((&ndev->rs_timer)){+.-.}-{0:0}, at: call_timer_fn+0x0/0x33c #1: c105e7c4 (rcu_read_lock){....}-{1:2}, at: ndisc_send_skb+0x134/0x81c #2: c105e7d8 (rcu_read_lock_bh){....}-{1:2}, at: ip6_finish_output2+0x17c/0xc64 #3: c105e7d8 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x4c/0x1224 #4: c3056174 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}-{2:2}, at: __dev_queue_xmit+0x354/0x1224 the shortest dependencies between 2nd lock and 1st lock: -> (&lan966x->ptp_ts_id_lock){+.+.}-{2:2} { HARDIRQ-ON-W at: lock_acquire.part.0+0xb0/0x248 _raw_spin_lock+0x38/0x48 lan966x_ptp_irq_handler+0x164/0x2a8 irq_thread_fn+0x1c/0x78 irq_thread+0x130/0x278 kthread+0xec/0x110 ret_from_fork+0x14/0x28 SOFTIRQ-ON-W at: lock_acquire.part.0+0xb0/0x248 _raw_spin_lock+0x38/0x48 lan966x_ptp_irq_handler+0x164/0x2a8 irq_thread_fn+0x1c/0x78 irq_thread+0x130/0x278 kthread+0xec/0x110 ret_from_fork+0x14/0x28 INITIAL USE at: lock_acquire.part.0+0xb0/0x248 _raw_spin_lock_irqsave+0x4c/0x68 lan966x_ptp_txtstamp_request+0x128/0x1cc lan966x_port_xmit+0x224/0x43c dev_hard_start_xmit+0xa8/0x2f0 sch_direct_xmit+0x108/0x2e8 __dev_queue_xmit+0x41c/0x1224 packet_sendmsg+0xdb4/0x134c __sys_sendto+0xd0/0x154 sys_send+0x18/0x20 ret_fast_syscall+0x0/0x1c } ... key at: [] __key.2+0x0/0x8 ... acquired at: _raw_spin_lock_irqsave+0x4c/0x68 lan966x_ptp_txtstamp_request+0x128/0x1cc lan966x_port_xmit+0x224/0x43c dev_hard_start_xmit+0xa8/0x2f0 sch_direct_xmit+0x108/0x2e8 __dev_queue_xmit+0x41c/0x1224 packet_sendmsg+0xdb4/0x134c __sys_sendto+0xd0/0x154 sys_send+0x18/0x20 ret_fast_syscall+0x0/0x1c -> (_xmit_ETHER#2){+.-.}-{2:2} { HARDIRQ-ON-W at: lock_acquire.part.0+0xb0/0x248 _raw_spin_lock+0x38/0x48 netif_freeze_queues+0x38/0x68 dev_deactivate_many+0xac/0x388 dev_deactivate+0x38/0x6c linkwatch_do_dev+0x70/0x8c __linkwatch_run_queue+0xd4/0x1e8 linkwatch_event+0x24/0x34 process_one_work+0x284/0x744 worker_thread+0x28/0x4bc kthread+0xec/0x110 ret_from_fork+0x14/0x28 IN-SOFTIRQ-W at: lock_acquire.part.0+0xb0/0x248 _raw_spin_lock+0x38/0x48 sch_direct_xmit+0x16c/0x2e8 __dev_queue_xmit+0x41c/0x1224 ip6_finish_output2+0x5f4/0xc64 ndisc_send_skb+0x4cc/0x81c addrconf_rs_timer+0xb0/0x2f8 call_timer_fn+0xb4/0x33c expire_timers+0xb4/0x10c run_timer_softirq+0xf8/0x2a8 __do_softirq+0xd4/0x5fc __irq_exit_rcu+0x138/0x17c irq_exit+0x8/0x28 __irq_svc+0x90/0xbc arch_cpu_idle+0x30/0x3c default_idle_call+0x44/0xac do_idle+0xc8/0x138 cpu_startup_entry+0x18/0x1c rest_init+0xcc/0x168 arch_post_acpi_subsys_init+0x0/0x8 INITIAL USE at: lock_acquire.part.0+0xb0/0x248 _raw_spin_lock+0x38/0x48 netif_freeze_queues+0x38/0x68 dev_deactivate_many+0xac/0x388 dev_deactivate+0x38/0x6c linkwatch_do_dev+0x70/0x8c __linkwatch_run_queue+0xd4/0x1e8 linkwatch_event+0x24/0x34 process_one_work+0x284/0x744 worker_thread+0x28/0x4bc kthread+0xec/0x110 ret_from_fork+0x14/0x28 } ... key at: [] netdev_xmit_lock_key+0x8/0x1c8 ... acquired at: __lock_acquire+0x978/0x2978 lock_acquire.part.0+0xb0/0x248 _raw_spin_lock+0x38/0x48 sch_direct_xmit+0x16c/0x2e8 __dev_queue_xmit+0x41c/0x1224 ip6_finish_output2+0x5f4/0xc64 ndisc_send_skb+0x4cc/0x81c addrconf_rs_timer+0xb0/0x2f8 call_timer_fn+0xb4/0x33c expire_timers+0xb4/0x10c run_timer_softirq+0xf8/0x2a8 __do_softirq+0xd4/0x5fc __irq_exit_rcu+0x138/0x17c irq_exit+0x8/0x28 __irq_svc+0x90/0xbc arch_cpu_idle+0x30/0x3c default_idle_call+0x44/0xac do_idle+0xc8/0x138 cpu_startup_entry+0x18/0x1c rest_init+0xcc/0x168 arch_post_acpi_subsys_init+0x0/0x8 stack backtrace: CPU: 0 PID: 0 Comm: swapper/0 Tainted: G N 6.2.0-rc7-01749-gc54e1f7f7e36 #2786 Hardware name: Generic DT based system unwind_backtrace from show_stack+0x10/0x14 show_stack from dump_stack_lvl+0x58/0x70 dump_stack_lvl from mark_lock.part.0+0x59c/0x93c mark_lock.part.0 from __lock_acquire+0x978/0x2978 __lock_acquire from lock_acquire.part.0+0xb0/0x248 lock_acquire.part.0 from _raw_spin_lock+0x38/0x48 _raw_spin_lock from sch_direct_xmit+0x16c/0x2e8 sch_direct_xmit from __dev_queue_xmit+0x41c/0x1224 __dev_queue_xmit from ip6_finish_output2+0x5f4/0xc64 ip6_finish_output2 from ndisc_send_skb+0x4cc/0x81c ndisc_send_skb from addrconf_rs_timer+0xb0/0x2f8 addrconf_rs_timer from call_timer_fn+0xb4/0x33c call_timer_fn from expire_timers+0xb4/0x10c expire_timers from run_timer_softirq+0xf8/0x2a8 run_timer_softirq from __do_softirq+0xd4/0x5fc __do_softirq from __irq_exit_rcu+0x138/0x17c __irq_exit_rcu from irq_exit+0x8/0x28 irq_exit from __irq_svc+0x90/0xbc Exception stack(0xc1001f20 to 0xc1001f68) 1f20: ffffffff ffffffff 00000001 c011f840 c100e000 c100e000 c1009314 c1009370 1f40: c10f0c1a c0d5e564 c0f5da8c 00000000 00000000 c1001f70 c010f0bc c010f0c0 1f60: 600f0013 ffffffff __irq_svc from arch_cpu_idle+0x30/0x3c arch_cpu_idle from default_idle_call+0x44/0xac default_idle_call from do_idle+0xc8/0x138 do_idle from cpu_startup_entry+0x18/0x1c cpu_startup_entry from rest_init+0xcc/0x168 rest_init from arch_post_acpi_subsys_init+0x0/0x8 Fix this by using spin_lock_irqsave/spin_lock_irqrestore also inside lan966x_ptp_irq_handler. Fixes: e85a96e48e33 ("net: lan966x: Add support for ptp interrupts") Signed-off-by: Horatiu Vultur Link: https://lore.kernel.org/r/20230217210917.2649365-1-horatiu.vultur@microchip.com Signed-off-by: Jakub Kicinski commit be9832c2e9cc4c15906a77baddcd906fb4bb864b Author: Kuniyuki Iwashima Date: Fri Feb 17 12:09:20 2023 -0800 net/ulp: Remove redundant ->clone() test in inet_clone_ulp(). Commit 2c02d41d71f9 ("net/ulp: prevent ULP without clone op from entering the LISTEN status") guarantees that all ULP listeners have clone() op, so we no longer need to test it in inet_clone_ulp(). Signed-off-by: Kuniyuki Iwashima Link: https://lore.kernel.org/r/20230217200920.85306-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit ee8d72a157ebb4b8c4b8b664f5a78a341fede2ef Merge: 01bb11ad828b3 168de0233586f Author: Jakub Kicinski Date: Mon Feb 20 15:38:41 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-02-17 We've added 64 non-merge commits during the last 7 day(s) which contain a total of 158 files changed, 4190 insertions(+), 988 deletions(-). The main changes are: 1) Add a rbtree data structure following the "next-gen data structure" precedent set by recently-added linked-list, that is, by using kfunc + kptr instead of adding a new BPF map type, from Dave Marchevsky. 2) Add a new benchmark for hashmap lookups to BPF selftests, from Anton Protopopov. 3) Fix bpf_fib_lookup to only return valid neighbors and add an option to skip the neigh table lookup, from Martin KaFai Lau. 4) Add cgroup.memory=nobpf kernel parameter option to disable BPF memory accouting for container environments, from Yafang Shao. 5) Batch of ice multi-buffer and driver performance fixes, from Alexander Lobakin. 6) Fix a bug in determining whether global subprog's argument is PTR_TO_CTX, which is based on type names which breaks kprobe progs, from Andrii Nakryiko. 7) Prep work for future -mcpu=v4 LLVM option which includes usage of BPF_ST insn. Thus improve BPF_ST-related value tracking in verifier, from Eduard Zingerman. 8) More prep work for later building selftests with Memory Sanitizer in order to detect usages of undefined memory, from Ilya Leoshkevich. 9) Fix xsk sockets to check IFF_UP earlier to avoid a NULL pointer dereference via sendmsg(), from Maciej Fijalkowski. 10) Implement BPF trampoline for RV64 JIT compiler, from Pu Lehui. 11) Fix BPF memory allocator in combination with BPF hashtab where it could corrupt special fields e.g. used in bpf_spin_lock, from Hou Tao. 12) Fix LoongArch BPF JIT to always use 4 instructions for function address so that instruction sequences don't change between passes, from Hengqi Chen. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (64 commits) selftests/bpf: Add bpf_fib_lookup test bpf: Add BPF_FIB_LOOKUP_SKIP_NEIGH for bpf_fib_lookup riscv, bpf: Add bpf trampoline support for RV64 riscv, bpf: Add bpf_arch_text_poke support for RV64 riscv, bpf: Factor out emit_call for kernel and bpf context riscv: Extend patch_text for multiple instructions Revert "bpf, test_run: fix &xdp_frame misplacement for LIVE_FRAMES" selftests/bpf: Add global subprog context passing tests selftests/bpf: Convert test_global_funcs test to test_loader framework bpf: Fix global subprog context argument resolution logic LoongArch, bpf: Use 4 instructions for function address in JIT bpf: bpf_fib_lookup should not return neigh in NUD_FAILED state bpf: Disable bh in bpf_test_run for xdp and tc prog xsk: check IFF_UP earlier in Tx path Fix typos in selftest/bpf files selftests/bpf: Use bpf_{btf,link,map,prog}_get_info_by_fd() samples/bpf: Use bpf_{btf,link,map,prog}_get_info_by_fd() bpftool: Use bpf_{btf,link,map,prog}_get_info_by_fd() libbpf: Use bpf_{btf,link,map,prog}_get_info_by_fd() libbpf: Introduce bpf_{btf,link,map,prog}_get_info_by_fd() ... ==================== Link: https://lore.kernel.org/r/20230217221737.31122-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit deeacf35c922da579637f5db625af20baafc66ed Author: Si-Wei Liu Date: Mon Feb 6 15:12:04 2023 -0800 vdpa/mlx5: support device features provisioning This patch implements features provisioning for mlx5_vdpa. 1) Validate the provisioned features are a subset of the parent features. 2) Clearing features that are not wanted by userspace. For example: # vdpa mgmtdev show pci/0000:41:04.2: supported_classes net max_supported_vqs 65 dev_features CSUM GUEST_CSUM MTU MAC HOST_TSO4 HOST_TSO6 STATUS CTRL_VQ CTRL_VLAN MQ CTRL_MAC_ADDR VERSION_1 ACCESS_PLATFORM 1) Provision vDPA device with all features derived from the parent # vdpa dev add name vdpa1 mgmtdev pci/0000:41:04.2 # vdpa dev config show vdpa1: mac e4:11:c6:d3:45:f0 link up link_announce false max_vq_pairs 1 mtu 1500 negotiated_features CSUM GUEST_CSUM MTU HOST_TSO4 HOST_TSO6 STATUS CTRL_VQ CTRL_VLAN MQ CTRL_MAC_ADDR VERSION_1 ACCESS_PLATFORM 2) Provision vDPA device with a subset of parent features # vdpa dev add name vdpa1 mgmtdev pci/0000:41:04.2 device_features 0x300020000 # vdpa dev config show vdpa1: negotiated_features CTRL_VQ VERSION_1 ACCESS_PLATFORM Signed-off-by: Si-Wei Liu Reviewed-by: Eli Cohen Message-Id: <1675725124-7375-7-git-send-email-si-wei.liu@oracle.com> Signed-off-by: Michael S. Tsirkin commit 033779a708f0b0aa89d3a9ad937fb1a97a06a10c Author: Si-Wei Liu Date: Mon Feb 6 15:12:03 2023 -0800 vdpa/mlx5: make MTU/STATUS presence conditional on feature bits The spec says: mtu only exists if VIRTIO_NET_F_MTU is set status only exists if VIRTIO_NET_F_STATUS is set We should only present MTU and STATUS conditionally depending on the feature bits. Signed-off-by: Si-Wei Liu Reviewed-by: Eli Cohen Message-Id: <1675725124-7375-6-git-send-email-si-wei.liu@oracle.com> Signed-off-by: Michael S. Tsirkin commit dbb6f1c42ade73f2c1652bf167d48f20f98bb834 Author: Si-Wei Liu Date: Mon Feb 6 15:12:02 2023 -0800 vdpa: validate device feature provisioning against supported class Today when device features are explicitly provisioned, the features user supplied may contain device class specific features that are not supported by the parent management device. On the other hand, when parent management device supports more than one class, the device features to provision may be ambiguous if none of the class specific attributes is provided at the same time. Validate these cases and prompt appropriate user errors accordingly. Signed-off-by: Si-Wei Liu Message-Id: <1675725124-7375-5-git-send-email-si-wei.liu@oracle.com> Signed-off-by: Michael S. Tsirkin commit e7d09cd1d4a2a83e91a2d2b1713621a8042dd73c Author: Si-Wei Liu Date: Mon Feb 6 15:12:01 2023 -0800 vdpa: validate provisioned device features against specified attribute With device feature provisioning, there's a chance for misconfiguration that the vdpa feature attribute supplied in 'vdpa dev add' command doesn't get selected on the device_features to be provisioned. For instance, when a @mac attribute is specified, the corresponding feature bit _F_MAC in device_features should be set for consistency. If there's conflict on provisioned features against the attribute, it should be treated as an error to fail the ambiguous command. Noted the opposite is not necessarily true, for e.g. it's okay to have _F_MAC set in device_features without providing a corresponding @mac attribute, in which case the vdpa vendor driver could load certain default value for attribute that is not explicitly specified. Generalize this check in vdpa core so that there's no duplicate code in each vendor driver. Signed-off-by: Si-Wei Liu Reviewed-by: Eli Cohen Message-Id: <1675725124-7375-4-git-send-email-si-wei.liu@oracle.com> Signed-off-by: Michael S. Tsirkin commit 6e6d39830bc681533d97af78e2066a7e9ab6b5d8 Author: Si-Wei Liu Date: Mon Feb 6 15:12:00 2023 -0800 vdpa: conditionally read STATUS in config space The spec says: status only exists if VIRTIO_NET_F_STATUS is set Similar to MAC and MTU, vdpa_dev_net_config_fill() should read STATUS conditionally depending on the feature bits. Signed-off-by: Si-Wei Liu Reviewed-by: Parav Pandit Reviewed-by: Eli Cohen Message-Id: <1675725124-7375-3-git-send-email-si-wei.liu@oracle.com> Signed-off-by: Michael S. Tsirkin commit 275487b4be8969fdb15fd2d47510d358963629d6 Author: Si-Wei Liu Date: Mon Feb 6 15:11:59 2023 -0800 vdpa: fix improper error message when adding vdpa dev In below example, before the fix, mtu attribute is supported by the parent mgmtdev, but the error message showing "All provided are not supported" is just misleading. $ vdpa mgmtdev show vdpasim_net: supported_classes net max_supported_vqs 3 dev_features MTU MAC CTRL_VQ CTRL_MAC_ADDR ANY_LAYOUT VERSION_1 ACCESS_PLATFORM $ vdpa dev add mgmtdev vdpasim_net name vdpasim0 mtu 5000 max_vqp 2 Error: vdpa: All provided attributes are not supported. kernel answers: Operation not supported After fix, the relevant error message will be like: $ vdpa dev add mgmtdev vdpasim_net name vdpasim0 mtu 5000 max_vqp 2 Error: vdpa: Some provided attributes are not supported: 0x1000. kernel answers: Operation not supported Fixes: d8ca2fa5be1b ("vdpa: Enable user to set mac and mtu of vdpa device") Signed-off-by: Si-Wei Liu Reviewed-by: Parav Pandit Reviewed-by: Eli Cohen Message-Id: <1675725124-7375-2-git-send-email-si-wei.liu@oracle.com> Signed-off-by: Michael S. Tsirkin commit c04e2145b8c9e1429ad2134291a830d2ba39657a Author: Eli Cohen Date: Mon Feb 6 14:20:16 2023 +0200 vdpa/mlx5: Initialize CVQ iotlb spinlock Initialize itolb spinlock. Fixes: 5262912ef3cf ("vdpa/mlx5: Add support for control VQ and MAC setting") Signed-off-by: Eli Cohen Message-Id: <20230206122016.1149373-1-elic@nvidia.com> Signed-off-by: Michael S. Tsirkin commit aef24311bd2d8a6d39a80c34f278b0fd1692aed3 Author: Eli Cohen Date: Mon Feb 6 14:19:56 2023 +0200 vdpa/mlx5: Don't clear mr struct on destroy MR Clearing the mr struct erases the lock owner and causes warnings to be emitted. It is not required to clear the mr so remove the memset call. Fixes: 94abbccdf291 ("vdpa/mlx5: Add shared memory registration code") Signed-off-by: Eli Cohen Message-Id: <20230206121956.1149356-1-elic@nvidia.com> Signed-off-by: Michael S. Tsirkin commit 446062e6adc48f1e963ce57621b5bfcbf999cda7 Author: Eli Cohen Date: Sun Feb 5 09:29:06 2023 +0200 vdpa/mlx5: Directly assign memory key When creating a memory key, the key value should be assigned to the passed pointer and not or'ed to. No functional issue was observed due to this bug. Fixes: 29064bfdabd5 ("vdpa/mlx5: Add support library for mlx5 VDPA implementation") Signed-off-by: Eli Cohen Message-Id: <20230205072906.1108194-1-elic@nvidia.com> Signed-off-by: Michael S. Tsirkin commit 0d0ed4006127714e318c9a9d7796f5c8532a21e7 Author: Shunsuke Mie Date: Thu Feb 2 19:45:38 2023 +0900 tools/virtio: enable to build with retpoline Add build options to bring it close to a linux kernel. It allows for testing that is close to reality. Signed-off-by: Shunsuke Mie Message-Id: <20230202104538.2041879-1-mie@igel.co.jp> Signed-off-by: Michael S. Tsirkin commit 2e44ca3f1f0ba2022f949003f02cc091144e54a3 Author: Shunsuke Mie Date: Thu Feb 2 19:42:48 2023 +0900 vringh: fix a typo in comments for vringh_kiov Probably it is a simple copy error from struct vring_iov. Signed-off-by: Shunsuke Mie Message-Id: <20230202104248.2040652-1-mie@igel.co.jp> Signed-off-by: Michael S. Tsirkin commit 6830a6aba9d40f1491f991d7b31bb2b90187111c Author: Alvaro Karsz Date: Thu Feb 2 10:42:12 2023 +0200 vhost-vdpa: print warning when vhost_vdpa_alloc_domain fails Add a print explaining why vhost_vdpa_alloc_domain failed if the device is not IOMMU cache coherent capable. Without this print, we have no hint why the operation failed. For example: $ virsh start error: Failed to start domain error: Unable to open '/dev/vhost-vdpa-' for vdpa device: Unknown error 524 Suggested-by: Eugenio Perez Martin Signed-off-by: Alvaro Karsz Message-Id: <20230202084212.1328530-1-alvaro.karsz@solid-run.com> Signed-off-by: Michael S. Tsirkin Acked-by: Eugenio Pérez Martin commit 08707b5c3344864d8948cb67706bad489b86773d Author: Zheng Wang Date: Thu Feb 2 14:41:24 2023 +0800 scsi: virtio_scsi: fix handling of kmalloc failure There is no check about the return value of kmalloc in virtscsi_rescan_hotunplug. Add the check to avoid use of null pointer 'inq_result' in case of the failure of kmalloc. Signed-off-by: Zheng Wang Message-Id: <20230202064124.22277-1-zyytlz.wz@163.com> Signed-off-by: Michael S. Tsirkin commit 699209fcc55cb97ede9ee8c2160095e0f5dfc73c Author: Colin Ian King Date: Mon Jan 30 09:26:44 2023 +0000 vdpa: Fix a couple of spelling mistakes in some messages There are two spelling mistakes in some literal strings. Fix them. Signed-off-by: Colin Ian King Message-Id: <20230130092644.37002-1-colin.i.king@gmail.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 313389be06ff60b4ad23bdb4ff24a12e7c47cb26 Author: Kangjie Xu Date: Thu Aug 25 16:56:10 2022 +0800 vhost-net: support VIRTIO_F_RING_RESET Add VIRTIO_F_RING_RESET, which indicates that the driver can reset a queue individually. VIRTIO_F_RING_RESET feature is added to virtio-spec 1.2. The relevant information is in oasis-tcs/virtio-spec#124 oasis-tcs/virtio-spec#139 The implementation only adds the feature bit in supported features. It does not require any other changes because we reuse the existing vhost protocol. The virtqueue reset process can be concluded as two parts: 1. The driver can reset a virtqueue. When it is triggered, we use the set_backend to disable the virtqueue. 2. After the virtqueue is disabled, the driver may optionally re-enable it. The process is basically similar to when the device is started, except that the restart process does not need to set features and set mem table since they do not change. QEMU will send messages containing size, base, addr, kickfd and callfd of the virtqueue in order. Specifically, the host kernel will receive these messages in order: a. VHOST_SET_VRING_NUM b. VHOST_SET_VRING_BASE c. VHOST_SET_VRING_ADDR d. VHOST_SET_VRING_KICK e. VHOST_SET_VRING_CALL f. VHOST_NET_SET_BACKEND Finally, after we use set_backend to attach the virtqueue, the virtqueue will be enabled and start to work. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo Message-Id: <20220825085610.80315-1-kangjie.xu@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit b3d4f02ee7a23716de2fffe232fd810bf0387bf1 Author: Bo Liu Date: Sun Jan 29 04:11:45 2023 -0500 vhost-scsi: convert sysfs snprintf and sprintf to sysfs_emit Follow the advice of the Documentation/filesystems/sysfs.rst and show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: Bo Liu Message-Id: <20230129091145.2837-1-liubo03@inspur.com> Signed-off-by: Michael S. Tsirkin commit 36871fb92b70599e6755d92ebdfcba7baa3d4f85 Author: Jason Wang Date: Thu Jan 19 14:15:25 2023 +0800 vdpa: mlx5: support per virtqueue dma device This patch implements per virtqueue dma device for mlx5_vdpa. This is needed for virtio_vdpa to work for CVQ which is backed by vringh but not DMA. We simply advertise the vDPA device itself as the DMA device for CVQ then DMA API can simply use PA so the identical mapping for CVQ can still be used. Otherwise the identical (1:1) mapping won't work when platform IOMMU is enabled since the IOVA is allocated on demand which is not necessarily the PA. This fixes the following crash when mlx5 vDPA device is bound to virtio-vdpa with platform IOMMU enabled but not in passthrough mode: BUG: unable to handle page fault for address: ff2fb3063deb1002 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 1393001067 P4D 1393002067 PUD 0 Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 55 PID: 8923 Comm: kworker/u112:3 Kdump: loaded Not tainted 6.1.0+ #7 Hardware name: Dell Inc. PowerEdge R750/0PJ80M, BIOS 1.5.4 12/17/2021 Workqueue: mlx5_vdpa_wq mlx5_cvq_kick_handler [mlx5_vdpa] RIP: 0010:vringh_getdesc_iotlb+0x93/0x1d0 [vringh] Code: 14 25 40 ef 01 00 83 82 c0 0a 00 00 01 48 2b 05 93 5a 1b ea 8b 4c 24 14 48 c1 f8 06 48 c1 e0 0c 48 03 05 90 5a 1b ea 48 01 c8 <0f> b7 00 83 aa c0 0a 00 00 01 65 ff 0d bc e4 41 3f 0f 84 05 01 00 RSP: 0018:ff46821ba664fdf8 EFLAGS: 00010282 RAX: ff2fb3063deb1002 RBX: 0000000000000a20 RCX: 0000000000000002 RDX: ff2fb318d2f94380 RSI: 0000000000000002 RDI: 0000000000000001 RBP: ff2fb3065e832410 R08: ff46821ba664fe00 R09: 0000000000000001 R10: 0000000000000000 R11: 000000000000000d R12: ff2fb3065e832488 R13: ff2fb3065e8324a8 R14: ff2fb3065e8324c8 R15: ff2fb3065e8324a8 FS: 0000000000000000(0000) GS:ff2fb3257fac0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ff2fb3063deb1002 CR3: 0000001392010006 CR4: 0000000000771ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: mlx5_cvq_kick_handler+0x89/0x2b0 [mlx5_vdpa] process_one_work+0x1e2/0x3b0 ? rescuer_thread+0x390/0x390 worker_thread+0x50/0x3a0 ? rescuer_thread+0x390/0x390 kthread+0xd6/0x100 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x1f/0x30 Reviewed-by: Eli Cohen Tested-by: Eli Cohen Signed-off-by: Jason Wang Message-Id: <20230119061525.75068-6-jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin commit 99fb2b838f446a2178dec07507c457c0f1cff5ea Author: Jason Wang Date: Thu Jan 19 14:15:24 2023 +0800 vdpa: set dma mask for vDPA device Setting DMA mask for vDPA device in case that there are virtqueue that is not backed by DMA so the vDPA device could be advertised as the DMA device that is used by DMA API for software emulated virtqueues. Reviewed-by: Eli Cohen Tested-by: Eli Cohen Signed-off-by: Jason Wang Message-Id: <20230119061525.75068-5-jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin commit a1baedb11ed4008035cf72777a6cb572fc26184f Author: Jason Wang Date: Thu Jan 19 14:15:23 2023 +0800 virtio-vdpa: support per vq dma device This patch adds the support of per vq dma device for virito-vDPA. vDPA parents then are allowed to use different DMA devices. This is useful for the parents that have software or emulated virtqueues. Reviewed-by: Eli Cohen Tested-by: Eli Cohen Signed-off-by: Jason Wang Message-Id: <20230119061525.75068-4-jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin commit 25da258fa61b1a902c781406a4e24a8284fc3d8a Author: Jason Wang Date: Thu Jan 19 14:15:22 2023 +0800 vdpa: introduce get_vq_dma_device() This patch introduces a new method to query the dma device that is use for a specific virtqueue. Reviewed-by: Eli Cohen Tested-by: Eli Cohen Signed-off-by: Jason Wang Message-Id: <20230119061525.75068-3-jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin commit 2713ea3c7d930aa1ff5ef7d4a57a1e4fcc3b9985 Author: Jason Wang Date: Thu Jan 19 14:15:21 2023 +0800 virtio_ring: per virtqueue dma device This patch introduces a per virtqueue dma device. This will be used for virtio devices whose virtqueue are backed by different underlayer devices. One example is the vDPA that where the control virtqueue could be implemented through software mediation. Some of the work are actually done before since the helper like vring_dma_device(). This work left are: - Let vring_dma_device() return the per virtqueue dma device instead of the vdev's parent. - Allow passing a dma_device when creating the virtqueue through a new helper, old vring creation helper will keep using vdev's parent. Reviewed-by: Eli Cohen Tested-by: Eli Cohen Signed-off-by: Jason Wang Message-Id: <20230119061525.75068-2-jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin commit 759aba1e6e7d238d9d37decd8ad1ecc84ebb02b0 Author: Liming Wu Date: Tue Jan 10 10:44:45 2023 +0800 vhost: remove unused paramete "enabled" is defined in vhost_init_device_iotlb, but it is never used. Let's remove it. Signed-off-by: Liming Wu Message-Id: <20230110024445.303-1-liming.wu@jaguarmicro.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefano Garzarella Reviewed-by: Eugenio Pérez commit 62b763ad765319b1e2261aeef5e5fcbd821883bd Author: Liming Wu Date: Thu Jan 5 15:03:56 2023 +0800 vhost-test: remove meaningless debug info remove printk as it is meaningless. Signed-off-by: Liming Wu Message-Id: <20230105070357.274-1-liming.wu@jaguarmicro.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 6c3d329e6486dd079924eba9b791309026b8ea9c Author: Jason Wang Date: Fri Dec 23 14:00:21 2022 +0800 vdpa_sim: get rid of DMA ops We used to (ab)use the DMA ops for setting up identical mappings in the IOTLB. This patch tries to get rid of the those unnecessary DMA ops by maintaining a simple identical/passthrough mappings by default. When bound to virtio_vdpa driver, DMA API will simply use PA as the IOVA and we will be all fine. When the vDPA bus tries to setup customized mapping (e.g when bound to vhost-vDPA), the identical/passthrough mapping will be removed. Signed-off-by: Jason Wang Message-Id: <20221223060021.28011-1-jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin Acked-by: Christoph Hellwig commit 0899774cb360769583e91d1951a68af47ce88db2 Author: Jason Wang Date: Fri Dec 23 13:55:48 2022 +0800 vdpa_sim_net: vendor satistics This patch adds support for basic vendor stats that include counters for tx, rx and cvq. Acked-by: Eugenio Pérez Signed-off-by: Jason Wang Message-Id: <20221223055548.27810-5-jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefano Garzarella commit 5dbb063a3ebfd19a91d7812783fd49d5d829a0d4 Author: Jason Wang Date: Fri Dec 23 13:55:47 2022 +0800 vdpa_sim: support vendor statistics This patch adds a new config ops callback to allow individual simulator to implement the vendor stats callback. Acked-by: Eugenio Pérez Signed-off-by: Jason Wang Message-Id: <20221223055548.27810-4-jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefano Garzarella commit bb105d514a25ad3f822da285bc7b6370e20d6353 Author: Jason Wang Date: Fri Dec 23 13:55:46 2022 +0800 vdpasim: customize allocation size Allow individual simulator to customize the allocation size. Reviewed-by: Stefano Garzarella Acked-by: Eugenio Pérez Signed-off-by: Jason Wang Message-Id: <20221223055548.27810-3-jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin commit 0497f23e73ec2211eff3921ed33026dea93482a5 Author: Jason Wang Date: Fri Dec 23 13:55:45 2022 +0800 vdpa_sim: switch to use __vdpa_alloc_device() This allows us to control the allocation size of the structure. Reviewed-by: Stefano Garzarella Acked-by: Eugenio Pérez Signed-off-by: Jason Wang Message-Id: <20221223055548.27810-2-jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin commit 2f8200efe7300190ad88d8238b119c098b6544bd Author: Jason Wang Date: Wed Dec 21 14:21:46 2022 +0800 vdpa_sim: use weak barriers vDPA simulators are software emulated device, so let's switch to use weak barriers to avoid extra overhead in the driver. Signed-off-by: Jason Wang Message-Id: <20221221062146.15356-1-jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefano Garzarella Acked-by: Eugenio Pérez commit 07b679f70d73483930e8d3c293942416d9cd5c13 Author: Suwan Kim Date: Wed Dec 21 23:54:56 2022 +0900 virtio-blk: support completion batching for the IRQ path This patch adds completion batching to the IRQ path. It reuses batch completion code of virtblk_poll(). It collects requests to io_comp_batch and processes them all at once. It can boost up the performance by 2%. To validate the performance improvement and stabilty, I did fio test with 4 vCPU VM and 12 vCPU VM respectively. Both VMs have 8GB ram and the same number of HW queues as vCPU. The fio cammad is as follows and I ran the fio 5 times and got IOPS average. (io_uring, randread, direct=1, bs=512, iodepth=64 numjobs=2,4) Test result shows about 2% improvement. 4 vcpu VM | numjobs=2 | numjobs=4 ----------------------------------------------------------- fio without patch | 367.2K IOPS | 397.6K IOPS ----------------------------------------------------------- fio with patch | 372.8K IOPS | 407.7K IOPS 12 vcpu VM | numjobs=2 | numjobs=4 ----------------------------------------------------------- fio without patch | 363.6K IOPS | 374.8K IOPS ----------------------------------------------------------- fio with patch | 373.8K IOPS | 385.3K IOPS Signed-off-by: Suwan Kim Reviewed-by: Christoph Hellwig Message-Id: <20221221145456.281218-3-suwan.kim027@gmail.com> Signed-off-by: Michael S. Tsirkin commit 489e18f3d73282f6bf6203324b3b17d459e2e750 Author: Suwan Kim Date: Wed Dec 21 23:54:55 2022 +0900 virtio-blk: set req->state to MQ_RQ_COMPLETE after polling I/O is finished Driver should set req->state to MQ_RQ_COMPLETE after it finishes to process req. But virtio-blk doesn't set MQ_RQ_COMPLETE after virtblk_poll() handles req and req->state still remains MQ_RQ_IN_FLIGHT. Fortunately so far there is no issue about it because blk_mq_end_request_batch() sets req->state to MQ_RQ_IDLE. In this patch, virblk_poll() calls blk_mq_complete_request_remote() to set req->state to MQ_RQ_COMPLETE before it adds req to a batch completion list. So it properly sets req->state after polling I/O is finished. Fixes: 4e0400525691 ("virtio-blk: support polling I/O") Signed-off-by: Suwan Kim Reviewed-by: Christoph Hellwig Message-Id: <20221221145456.281218-2-suwan.kim027@gmail.com> Signed-off-by: Michael S. Tsirkin commit 2b034e82ffc5f24ec54e47785f22f2bc33fda383 Author: Bagas Sanjaya Date: Tue Dec 20 16:58:29 2022 +0700 docs: driver-api: virtio: commentize spec version checking A sentence that checks for later spec version is meant for developers hacking the documentation source. Make it comment block (hidden from actual output). Signed-off-by: Bagas Sanjaya Message-Id: <20221220095828.27588-4-bagasdotme@gmail.com> Signed-off-by: Michael S. Tsirkin commit ae8d2247af6fd209f2042d4a72792b548c96d3df Author: Bagas Sanjaya Date: Tue Dec 20 16:58:28 2022 +0700 docs: driver-api: virtio: slightly reword virtqueues allocation paragraph "It's at this stage that" means "At this point", so use the latter as it is more effective. Signed-off-by: Bagas Sanjaya Message-Id: <20221220095828.27588-3-bagasdotme@gmail.com> Signed-off-by: Michael S. Tsirkin commit fb25d45694f30c82c30b8c720fe1207d15f67167 Author: Bagas Sanjaya Date: Tue Dec 20 16:58:27 2022 +0700 docs: driver-api: virtio: parenthesize external reference targets Parenthesize targets to links in "References" section to distinguish them from remaining texts. While at it, describe the second target. Signed-off-by: Bagas Sanjaya Message-Id: <20221220095828.27588-2-bagasdotme@gmail.com> Signed-off-by: Michael S. Tsirkin commit f9d9f57ef048ab3f78ad92293c698b3090dcdada Author: Sebastien Boeuf Date: Tue Jan 3 11:51:08 2023 +0100 vdpa_sim: Implement resume vdpa op Implement resume operation for vdpa_sim devices, so vhost-vdpa will offer that backend feature and userspace can effectively resume the device. Signed-off-by: Sebastien Boeuf Message-Id: <15a4566826033c5dd9a2167e5cfb0ef4d90cea49.1672742878.git.sebastien.boeuf@intel.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 3b688d7a086d0438649ea37990c6e811954fc780 Author: Sebastien Boeuf Date: Tue Jan 3 11:51:07 2023 +0100 vhost-vdpa: uAPI to resume the device This new ioctl adds support for resuming the device from userspace. This is required when trying to restore the device in a functioning state after it's been suspended. It is already possible to reset a suspended device, but that means the device must be reconfigured and all the IOMMU/IOTLB mappings must be recreated. This new operation allows the device to be resumed without going through a full reset. This is particularly useful when trying to perform offline migration of a virtual machine (also known as snapshot/restore) as it allows the VMM to resume the virtual machine back to a running state after the snapshot is performed. Acked-by: Jason Wang Signed-off-by: Sebastien Boeuf Message-Id: <73b75fb87d25cff59768b4955a81fe7ffe5b4770.1672742878.git.sebastien.boeuf@intel.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefano Garzarella commit 69106b6fb3d73bd4252daa48ae96e600c9701147 Author: Sebastien Boeuf Date: Tue Jan 3 11:51:06 2023 +0100 vhost-vdpa: Introduce RESUME backend feature bit Userspace knows if the device can be resumed or not by checking this feature bit. It's only exposed if the vdpa driver backend implements the resume() operation callback. Userspace trying to negotiate this feature when it hasn't been exposed will result in an error. Acked-by: Jason Wang Signed-off-by: Sebastien Boeuf Message-Id: Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefano Garzarella commit 1538a8a49ecbe6d3302cd7f347632338e56857f8 Author: Sebastien Boeuf Date: Tue Jan 3 11:51:05 2023 +0100 vdpa: Add resume operation Add a new operation to allow a vDPA device to be resumed after it has been suspended. Trying to resume a device that wasn't suspended will result in a no-op. This operation is optional. If it's not implemented, the associated backend feature bit will not be exposed. And if the feature bit is not exposed, invoking this operation will return an error. Acked-by: Jason Wang Signed-off-by: Sebastien Boeuf Message-Id: <6e05c4b31b47f3e29cb2bd7ebd56c81f84b8f48a.1672742878.git.sebastien.boeuf@intel.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefano Garzarella commit 51a8f9d7f587290944d6fc733d1f897091c63159 Author: Alvaro Karsz Date: Tue Jan 10 18:56:38 2023 +0200 virtio: vdpa: new SolidNET DPU driver. This commit includes: 1) The driver to manage the controlplane over vDPA bus. 2) A HW monitor device to read health values from the DPU. Signed-off-by: Alvaro Karsz Acked-by: Jason Wang Message-Id: <20230110165638.123745-4-alvaro.karsz@solid-run.com> Message-Id: <20230209075128.78915-1-alvaro.karsz@solid-run.com> Signed-off-by: Michael S. Tsirkin commit d089d69cc1f824936eeaa4fa172f8fa1a0949eaa Author: Alvaro Karsz Date: Tue Jan 10 18:56:37 2023 +0200 PCI: Avoid FLR for SolidRun SNET DPU rev 1 This patch fixes a FLR bug on the SNET DPU rev 1 by setting the PCI_DEV_FLAGS_NO_FLR_RESET flag. As there is a quirk to avoid FLR (quirk_no_flr), I added a new quirk to check the rev ID before calling to quirk_no_flr. Without this patch, a SNET DPU rev 1 may hang when FLR is applied. Signed-off-by: Alvaro Karsz Acked-by: Bjorn Helgaas Message-Id: <20230110165638.123745-3-alvaro.karsz@solid-run.com> Signed-off-by: Michael S. Tsirkin commit db6c4dee4c104f50ed163af71c53bfdb878a8318 Author: Alvaro Karsz Date: Tue Jan 10 18:56:36 2023 +0200 PCI: Add SolidRun vendor ID Add SolidRun vendor ID to pci_ids.h The vendor ID is used in 2 different source files, the SNET vDPA driver and PCI quirks. Signed-off-by: Alvaro Karsz Acked-by: Bjorn Helgaas Message-Id: <20230110165638.123745-2-alvaro.karsz@solid-run.com> Signed-off-by: Michael S. Tsirkin commit d8b3832a788dbe9d2da4a48f8cd1e022c3175514 Author: Eugenio Pérez Date: Thu Nov 17 16:55:02 2022 +0100 vdpa_sim_net: Offer VIRTIO_NET_F_STATUS VIRTIO_NET_S_LINK_UP is already returned in config reads since vdpasim creation, but the feature bit was not offered to the driver. Tested modifying VIRTIO_NET_S_LINK_UP and different values of "status" in qemu virtio-net options, using vhost_vdpa. Not considering as a fix, because there should be no driver trusting in this config read before the feature flag. Signed-off-by: Eugenio Pérez Message-Id: <20221117155502.1394700-1-eperezma@redhat.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefano Garzarella Tested-by: Lei Yang commit 46fc0917bbabb1d5efdf8b903728b9f7fc484ce8 Author: Zhu Lingshan Date: Fri Nov 25 22:57:24 2022 +0800 vDPA/ifcvf: implement features provisioning This commit implements features provisioning for ifcvf, that means: 1)checkk whether the provisioned features are supported by the management device 2)vDPA device only presents selected feature bits Examples: a)The management device supported features: $ vdpa mgmtdev show pci/0000:01:00.5 pci/0000:01:00.5: supported_classes net max_supported_vqs 9 dev_features MTU MAC MRG_RXBUF CTRL_VQ MQ ANY_LAYOUT VERSION_1 ACCESS_PLATFORM b)Provision a vDPA device with all supported features: $ vdpa dev add name vdpa0 mgmtdev pci/0000:01:00.5 $ vdpa/vdpa dev config show vdpa0 vdpa0: mac 00:e8:ca:11:be:05 link up link_announce false max_vq_pairs 4 mtu 1500 negotiated_features MRG_RXBUF CTRL_VQ MQ VERSION_1 ACCESS_PLATFORM c)Provision a vDPA device with a subset of the supported features: $ vdpa dev add name vdpa0 mgmtdev pci/0000:01:00.5 device_features 0x300020020 $ vdpa dev config show vdpa0 mac 00:e8:ca:11:be:05 link up link_announce false negotiated_features CTRL_VQ VERSION_1 ACCESS_PLATFORM Signed-off-by: Zhu Lingshan Message-Id: <20221125145724.1129962-13-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin commit 267000e980895b91841343d203b55b6e188d7c3c Author: Zhu Lingshan Date: Fri Nov 25 22:57:23 2022 +0800 vDPA/ifcvf: retire ifcvf_private_to_vf This commit retires ifcvf_private_to_vf, because the vf is already a member of the adapter, so it could be easily addressed by adapter->vf. Signed-off-by: Zhu Lingshan Message-Id: <20221125145724.1129962-12-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin commit 93139037b582134deb1ed894bbc4bc1d34ff35e7 Author: Zhu Lingshan Date: Fri Nov 25 22:57:22 2022 +0800 vDPA/ifcvf: allocate the adapter in dev_add() The adapter is the container of the vdpa_device, this commits allocate the adapter in dev_add() rather than in probe(). So that the vdpa_device() could be re-created when the userspace creates the vdpa device, and free-ed in dev_del() Signed-off-by: Zhu Lingshan Cc: stable@vger.kernel.org Message-Id: <20221125145724.1129962-11-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin commit 6a3b2f179b49f2c6452ecc37b4778a43848b454c Author: Zhu Lingshan Date: Fri Nov 25 22:57:21 2022 +0800 vDPA/ifcvf: manage ifcvf_hw in the mgmt_dev This commit allocates the hw structure in the management device structure. So the hardware can be initialized once the management device is allocated in probe. Signed-off-by: Zhu Lingshan Cc: stable@vger.kernel.org Message-Id: <20221125145724.1129962-10-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin commit 7cfd36b7e8be6bdaeb5af0f9729871b732a7a3c8 Author: Zhu Lingshan Date: Fri Nov 25 22:57:20 2022 +0800 vDPA/ifcvf: ifcvf_request_irq works on ifcvf_hw All ifcvf_request_irq's callees are refactored to work on ifcvf_hw, so it should be decoupled from the adapter as well Signed-off-by: Zhu Lingshan Cc: stable@vger.kernel.org Message-Id: <20221125145724.1129962-9-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin commit a70d833e696e538a0feff5e539086c74a90ddf90 Author: Zhu Lingshan Date: Fri Nov 25 22:57:19 2022 +0800 vDPA/ifcvf: decouple config/dev IRQ requester and vectors allocator from the adapter This commit decouples the config irq requester, the device shared irq requester and the MSI vectors allocator from the adapter. So they can be safely invoked since probe before the adapter is allocated. Signed-off-by: Zhu Lingshan Cc: stable@vger.kernel.org Message-Id: <20221125145724.1129962-8-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin commit f9a9ffb2e4dbde81090416fc51662441c2a7b73b Author: Zhu Lingshan Date: Fri Nov 25 22:57:18 2022 +0800 vDPA/ifcvf: decouple vq irq requester from the adapter This commit decouples the vq irq requester from the adapter, so that these functions can be invoked since probe. Signed-off-by: Zhu Lingshan Cc: stable@vger.kernel.org Message-Id: <20221125145724.1129962-7-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin commit 23dac55cec3afdbc1b4eaed1c79f2cee00477f8b Author: Zhu Lingshan Date: Fri Nov 25 22:57:17 2022 +0800 vDPA/ifcvf: decouple config IRQ releaser from the adapter This commit decouples config IRQ releaser from the adapter, so that it could be invoked once probe or in err handlers. ifcvf_free_irq() works on ifcvf_hw in this commit Signed-off-by: Zhu Lingshan Cc: stable@vger.kernel.org Message-Id: <20221125145724.1129962-6-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin commit 004cbcabab46d9346e2524c4eedd71ea57fe4f3c Author: Zhu Lingshan Date: Fri Nov 25 22:57:16 2022 +0800 vDPA/ifcvf: decouple vq IRQ releasers from the adapter This commit decouples the IRQ releasers from the adapter, so that these functions could be safely invoked once probe Signed-off-by: Zhu Lingshan Cc: stable@vger.kernel.org Message-Id: <20221125145724.1129962-5-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin commit 66e3970b16d1e960afbece65739a3628273633f1 Author: Zhu Lingshan Date: Fri Nov 25 22:57:15 2022 +0800 vDPA/ifcvf: alloc the mgmt_dev before the adapter This commit reverses the order of allocating the management device and the adapter. So that it would be possible to move the allocation of the adapter to dev_add(). Signed-off-by: Zhu Lingshan Cc: stable@vger.kernel.org Message-Id: <20221125145724.1129962-4-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin commit af8eb69a62b73a2ce5f91575453534ac07f06eb4 Author: Zhu Lingshan Date: Fri Nov 25 22:57:14 2022 +0800 vDPA/ifcvf: decouple config space ops from the adapter This commit decopules the config space ops from the adapter layer, so these functions can be invoked once the device is probed. Signed-off-by: Zhu Lingshan Cc: stable@vger.kernel.org Message-Id: <20221125145724.1129962-3-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin commit d59f633dd05940739b5f46f5d4403cafb91d2742 Author: Zhu Lingshan Date: Fri Nov 25 22:57:13 2022 +0800 vDPA/ifcvf: decouple hw features manipulators from the adapter This commit gets rid of ifcvf_adapter in hw features related functions in ifcvf_base. Then these functions are more rubust and de-coupling from the ifcvf_adapter layer. So these functions could be invoded once the device is probed, even before the adapter is allocaed. Signed-off-by: Zhu Lingshan Cc: stable@vger.kernel.org Message-Id: <20221125145724.1129962-2-lingshan.zhu@intel.com> Signed-off-by: Michael S. Tsirkin commit 0a59975088d37f69815f656193c1e1e057feb494 Author: Eli Cohen Date: Mon Nov 14 15:17:59 2022 +0200 vdpa/mlx5: Add RX counters to debugfs For each interface, either VLAN tagged or untagged, add two hardware counters: one for unicast and another for multicast. The counters count RX packets and bytes and can be read through debugfs: $ cat /sys/kernel/debug/mlx5/mlx5_core.sf.1/vdpa-0/rx/untagged/mcast/packets $ cat /sys/kernel/debug/mlx5/mlx5_core.sf.1/vdpa-0/rx/untagged/ucast/bytes This feature is controlled via the config option MLX5_VDPA_STEERING_DEBUG. It is off by default as it may have some impact on performance. includes a fixup By Yang Yingliang : vdpa/mlx5: fix check wrong pointer in mlx5_vdpa_add_mac_vlan_rules() The local variable 'rule' is not used anymore, fix return value check after calling mlx5_add_flow_rules(). Signed-off-by: Eli Cohen Message-Id: <20221114131759.57883-9-elic@nvidia.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Signed-off-by: Yang Yingliang Message-Id: <20230104074418.1737510-1-yangyingliang@huawei.com> Signed-off-by: Michael S. Tsirkin Acked-by: Eli Cohen Acked-by: Jason Wang commit 2942210043224c0f6e88bd9d7c9c7c5949a36567 Author: Eli Cohen Date: Mon Nov 14 15:17:58 2022 +0200 vdpa/mlx5: Add debugfs subtree Add debugfs subtree and expose flow table ID and TIR number. This information can be used by external tools to do extended troubleshooting. The information can be retrieved like so: $ cat /sys/kernel/debug/mlx5/mlx5_core.sf.1/vdpa-0/rx/table_id $ cat /sys/kernel/debug/mlx5/mlx5_core.sf.1/vdpa-0/rx/tirn Reviewed-by: Si-Wei Liu Acked-by: Jason Wang Signed-off-by: Eli Cohen Message-Id: <20221114131759.57883-8-elic@nvidia.com> Signed-off-by: Michael S. Tsirkin commit 72c67e9b904c29edbcb7bb010655b3958c95a309 Author: Eli Cohen Date: Mon Nov 14 15:17:57 2022 +0200 vdpa/mlx5: Move some definitions to a new header file Move some definitions from mlx5_vnet.c to newly added header file mlx5_vnet.h. We need these definitions for the following patches that add debugfs tree to expose information vital for debug. Reviewed-by: Si-Wei Liu Acked-by: Jason Wang Signed-off-by: Eli Cohen Message-Id: <20221114131759.57883-7-elic@nvidia.com> Signed-off-by: Michael S. Tsirkin commit 195d6cc9c3d15b9474ccc76991d49a3dcc160872 Author: Stefan Schmidt Date: Sat Feb 18 22:13:17 2023 +0100 MAINTAINERS: Add Miquel Raynal as additional maintainer for ieee802154 We are growing the maintainer team for ieee802154 to spread the load for review and general maintenance. Miquel has been driving the subsystem forward over the last year and we would like to welcome him as a maintainer. Signed-off-by: Stefan Schmidt Acked-by: Miquel Raynal Link: https://lore.kernel.org/r/20230218211317.284889-4-stefan@datenfreihafen.org Signed-off-by: Jakub Kicinski commit 6b441772854f022441700b46588e4d4abc14180d Author: Stefan Schmidt Date: Sat Feb 18 22:13:16 2023 +0100 MAINTAINERS: Switch maintenance for mrf24j40 driver over Alan Ott has not been actively working on the driver or reviewing patches for several years. I have been taking odd fixes in through the wpan/ieee802154 tree. Update the MAINTAINERS file to reflect this reality. I wanted to thank Alan for his work on the driver. Signed-off-by: Stefan Schmidt Link: https://lore.kernel.org/r/20230218211317.284889-3-stefan@datenfreihafen.org Signed-off-by: Jakub Kicinski commit d1b4b4117f890978c23c8e84a58a6c4c713fb400 Author: Stefan Schmidt Date: Sat Feb 18 22:13:15 2023 +0100 MAINTAINERS: Switch maintenance for mcr20a driver over Xue Liu has not been actively working on the driver or reviewing patches for several years. I have been taking odd fixes in through the wpan/ieee802154 tree. Update the MAINTAINERS file to reflect this reality. I wanted to thank Xue Liu for his work on the driver. Signed-off-by: Stefan Schmidt Link: https://lore.kernel.org/r/20230218211317.284889-2-stefan@datenfreihafen.org Signed-off-by: Jakub Kicinski commit c551c569e388f6ae19e40798c7615706267f7618 Author: Stefan Schmidt Date: Sat Feb 18 22:13:14 2023 +0100 MAINTAINERS: Switch maintenance for cc2520 driver over Varka Bhadram has not been actively working on the driver or reviewing patches for several years. I have been taking odd fixes in through the wpan/ieee802154 tree. Update the MAINTAINERS file to reflect this reality. I wanted to thank Varka for his work on the driver. Signed-off-by: Stefan Schmidt Link: https://lore.kernel.org/r/20230218211317.284889-1-stefan@datenfreihafen.org Signed-off-by: Jakub Kicinski commit fec67d1896add59fd7080fb3d21b9446239e2cef Merge: ef04277600ba6 80c6d6804f314 Author: Dave Airlie Date: Tue Feb 21 10:14:51 2023 +1000 Merge tag 'amd-drm-next-6.3-2023-02-17' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.3-2023-02-17: amdgpu: - GC 11 fixes - Display fixes - Backlight cleanup - SMU13 fixes - SMU7 regression fix - GFX9 sw queues fix - AGP fix for GMC 11 - W1 warning fixes - S/G display fixes - Misc spelling fixes - Driver unload fix - DCN 3.1.4 fixes - Display code reorg fixes - Rotation fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230217230930.64821-1-alexander.deucher@amd.com commit db77b8502a4071a59c9424d95f87fe20bdb52c3a Merge: 950b6662e26e3 a13408c205260 Author: Linus Torvalds Date: Mon Feb 20 15:55:47 2023 -0800 Merge tag 'asm-generic-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic cleanups from Arnd Bergmann: "Only three minor changes: a cross-platform series from Mike Rapoport to consolidate asm/agp.h between architectures, and a correctness change for __generic_cmpxchg_local() from Matt Evans" * tag 'asm-generic-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: char/agp: introduce asm-generic/agp.h char/agp: consolidate {alloc,free}_gatt_pages() locking/atomic: cmpxchg: Make __generic_cmpxchg_local compare against zero-extended 'old' value commit c96abaec78f34366b3ddf1c6be52ca5c1241e15b Author: Quanfa Fu Date: Tue Feb 21 08:52:42 2023 +0900 tracing/eprobe: no need to check for negative ret value for snprintf No need to check for negative return value from snprintf() as the code does not return negative values. Link: https://lore.kernel.org/all/20230109040625.3259642-1-quanfafu@gmail.com/ Signed-off-by: Quanfa Fu Acked-by: Masami Hiramatsu (Google) Reviewed-by: Steven Rostedt (Google) Signed-off-by: Masami Hiramatsu (Google) commit 1fcd09fd4f8494b05b7c34971f3498dda0bb06ee Author: Masami Hiramatsu (Google) Date: Tue Feb 21 08:52:42 2023 +0900 test_kprobes: Add recursed kprobe test case Add a recursed kprobe test case to the KUnit test module for kprobes. This will probe a function which is called from the pre_handler and post_handler itself. If the kprobe is correctly implemented, the recursed kprobe handlers will be skipped and the number of skipped kprobe will be counted on kprobe::nmissed. Link: https://lore.kernel.org/all/167414238758.2301956.258548940194352895.stgit@devnote3/ Signed-off-by: Masami Hiramatsu (Google) commit 8478cca1e3abd183f309cd9c2491f484acf5d377 Author: Donglin Peng Date: Tue Feb 21 08:52:42 2023 +0900 tracing/probe: add a char type to show the character value of traced arguments There are scenes that we want to show the character value of traced arguments other than a decimal or hexadecimal or string value for debug convinience. I add a new type named 'char' to do it and a new test case file named 'kprobe_args_char.tc' to do selftest for char type. For example: The to be traced function is 'void demo_func(char type, char *name);', we can add a kprobe event as follows to show argument values as we want: echo 'p:myprobe demo_func $arg1:char +0($arg2):char[5]' > kprobe_events we will get the following trace log: ... myprobe: (demo_func+0x0/0x29) arg1='A' arg2={'b','p','f','1',''} Link: https://lore.kernel.org/all/20221219110613.367098-1-dolinux.peng@gmail.com/ Signed-off-by: Donglin Peng Acked-by: Masami Hiramatsu (Google) Reported-by: kernel test robot Signed-off-by: Masami Hiramatsu (Google) commit 950b6662e26e381cf8834b9b78b08261890ee697 Merge: c72e04c26faef e43efb6d713bc Author: Linus Torvalds Date: Mon Feb 20 15:49:56 2023 -0800 Merge tag 'soc-dt-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull SoC DT updates from Arnd Bergmann: "About a quarter of the changes are for 32-bit arm, mostly filling in device support for existing machines and adding minor cleanups, mostly for Qualcomm and Samsung based machines. Two new 32-bit SoCs are added, both are quad-core Cortex-A7 chips from Rockchips that have been around for a while but were lacking kernel support so far: RV1126 is a Vision SoC with an NPU and is used in the Edgeble Neural Compute Module 2(Neu2) board, while RK3128 is design for TV boxes and so far only comes with a dts for its refernece design. The other 32-bit boards that were added are two ASpeed AST2600 based BMC boards, the Microchip sam9x60_curiosity development board (Armv5 based!), the Enclustra PE1 FPGA-SoM baseboard, and a few more boards for i.MX53 and i.MX6ULL. On the RISC-V side, there are fewer patches, but a total of ten new single-board computers based on variations of the Allwinner D1/T113 chip, plus one more board based on Microchip Polarfire. As usual, arm64 has by far the most changes here, with over 700 non-merge changesets, among them over 400 alone for Qualcomm. The newly added SoCs this time are all recent high-end embedded SoCs for various markets, each on comes with support for its reference board: - Qualcomm SM8550 (Snapdragon 8 Gen 2) for mobile phones - Qualcomm QDU1000/QRU1000 5G RAN platform - Rockchips RK3588/RK3588s for tablets, chromebooks and SBCs - TI J784S4 for industrial and automotive applications In total, there are 46 new arm64 machines: - Reference platforms for each of the five new SoCs - Three Amlogic based development boards - Six embedded machines based on NXP i.MX8MM and i.MX8MP - The Mediatek mt7986a based Banana Pi R3 router - Six tablets based on Qualcomm MSM8916 (Snapdragon 410), SM6115 (Snapdragon 662) and SM8250 (Snapdragon 865) - Two LTE dongles, also based on MSM8916 - Seven mobile phones, based on Qualcomm MSM8953 (Snapdragon 610), SDM450 and SDM632 - Three chromebooks based on Qualcomm SC7280 (Snapdragon 7c) - Nine development boards based on Rockchips RK3588, RK3568, RK3566 and RK3328. - Five development machines based on TI K3 (AM642/AM654/AM68/AM69) The cleanup of dtc warnings continues across all platforms, adding to the total number of changes" * tag 'soc-dt-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (1035 commits) dt-bindings: riscv: correct starfive visionfive 2 compatibles ARM: dts: socfpga: Add enclustra PE1 devicetree dt-bindings: altera: Add enclustra mercury PE1 arm64: dts: qcom: msm8996: align RPM G-Link clock-controller node with bindings arm64: dts: qcom: qcs404: align RPM G-Link node with bindings arm64: dts: qcom: ipq6018: align RPM G-Link node with bindings arm64: dts: qcom: sm8550: remove invalid interconnect property from cryptobam arm64: dts: qcom: sc7280: Adjust zombie PWM frequency arm64: dts: qcom: sc8280xp-pmics: Specify interrupt parent explicitly arm64: dts: qcom: sm7225-fairphone-fp4: enable remaining i2c busses arm64: dts: qcom: sm7225-fairphone-fp4: move status property down arm64: dts: qcom: pmk8350: Use the correct PON compatible arm64: dts: qcom: sc8280xp-x13s: Enable external display arm64: dts: qcom: sc8280xp-crd: Introduce pmic_glink arm64: dts: qcom: sc8280xp: Add USB-C-related DP blocks arm64: dts: qcom: sm8350-hdk: enable GPU arm64: dts: qcom: sm8350: add GPU, GMU, GPU CC and SMMU nodes arm64: dts: qcom: sm8350: finish reordering nodes arm64: dts: qcom: sm8350: move more nodes to correct place arm64: dts: qcom: sm8350: reorder device nodes ... commit 96cd93af794cf3ef83ae1ad7291160029d7b525e Author: Masami Hiramatsu (Google) Date: Tue Feb 21 08:49:16 2023 +0900 selftests/ftrace: Fix probepoint testcase to ignore __pfx_* symbols Fix kprobe probepoint testcase to ignore __pfx_* prefix symbols. Those are introduced by commit b341b20d648b ("x86: Add prefix symbols for function padding") for identifying PADDING_BYTES of NOPs. Since kprobe events can not probe these prefix symbols, this testcase has to skip those symbols. Link: https://lore.kernel.org/all/167309835609.640500.9664678940260305746.stgit@devnote3/ Fixes: b341b20d648b ("x86: Add prefix symbols for function padding") Signed-off-by: Masami Hiramatsu (Google) Reviewed-by: Steven Rostedt (Google) Acked-by: Shuah Khan commit a457e944df92789ab31aaf35fae9db064e3c51c4 Author: Masami Hiramatsu (Google) Date: Tue Feb 21 08:49:16 2023 +0900 selftests/ftrace: Fix eprobe syntax test case to check filter support Fix eprobe syntax test case to check whether the kernel supports the filter on eprobe for filter syntax test command. Without this fix, this test case will fail if the kernel supports eprobe but doesn't support the filter on eprobe. Link: https://lore.kernel.org/all/167309834742.640500.379128668288448035.stgit@devnote3/ Fixes: 9e14bae7d049 ("selftests/ftrace: Add eprobe syntax error testcase") Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu (Google) Reviewed-by: Steven Rostedt (Google) Acked-by: Shuah Khan commit 133921530c42960c07d25d12677f9e131a2b0cdf Author: Masami Hiramatsu (Google) Date: Tue Feb 21 08:49:16 2023 +0900 tracing/eprobe: Fix to add filter on eprobe description in README file Fix to add a description of the filter on eprobe in README file. This is required to identify the kernel supports the filter on eprobe or not. Link: https://lore.kernel.org/all/167309833728.640500.12232259238201433587.stgit@devnote3/ Fixes: 752be5c5c910 ("tracing/eprobe: Add eprobe filter support") Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu (Google) Reviewed-by: Steven Rostedt (Google) commit f1c97a1b4ef709e3f066f82e3ba3108c3b133ae6 Author: Yang Jihong Date: Tue Feb 21 08:49:16 2023 +0900 x86/kprobes: Fix arch_check_optimized_kprobe check within optimized_kprobe range When arch_prepare_optimized_kprobe calculating jump destination address, it copies original instructions from jmp-optimized kprobe (see __recover_optprobed_insn), and calculated based on length of original instruction. arch_check_optimized_kprobe does not check KPROBE_FLAG_OPTIMATED when checking whether jmp-optimized kprobe exists. As a result, setup_detour_execution may jump to a range that has been overwritten by jump destination address, resulting in an inval opcode error. For example, assume that register two kprobes whose addresses are and in "func" function. The original code of "func" function is as follows: 0xffffffff816cb5e9 <+9>: push %r12 0xffffffff816cb5eb <+11>: xor %r12d,%r12d 0xffffffff816cb5ee <+14>: test %rdi,%rdi 0xffffffff816cb5f1 <+17>: setne %r12b 0xffffffff816cb5f5 <+21>: push %rbp 1.Register the kprobe for , assume that is kp1, corresponding optimized_kprobe is op1. After the optimization, "func" code changes to: 0xffffffff816cc079 <+9>: push %r12 0xffffffff816cc07b <+11>: jmp 0xffffffffa0210000 0xffffffff816cc080 <+16>: incl 0xf(%rcx) 0xffffffff816cc083 <+19>: xchg %eax,%ebp 0xffffffff816cc084 <+20>: (bad) 0xffffffff816cc085 <+21>: push %rbp Now op1->flags == KPROBE_FLAG_OPTIMATED; 2. Register the kprobe for , assume that is kp2, corresponding optimized_kprobe is op2. register_kprobe(kp2) register_aggr_kprobe alloc_aggr_kprobe __prepare_optimized_kprobe arch_prepare_optimized_kprobe __recover_optprobed_insn // copy original bytes from kp1->optinsn.copied_insn, // jump address = 3. disable kp1: disable_kprobe(kp1) __disable_kprobe ... if (p == orig_p || aggr_kprobe_disabled(orig_p)) { ret = disarm_kprobe(orig_p, true) // add op1 in unoptimizing_list, not unoptimized orig_p->flags |= KPROBE_FLAG_DISABLED; // op1->flags == KPROBE_FLAG_OPTIMATED | KPROBE_FLAG_DISABLED ... 4. unregister kp2 __unregister_kprobe_top ... if (!kprobe_disabled(ap) && !kprobes_all_disarmed) { optimize_kprobe(op) ... if (arch_check_optimized_kprobe(op) < 0) // because op1 has KPROBE_FLAG_DISABLED, here not return return; p->kp.flags |= KPROBE_FLAG_OPTIMIZED; // now op2 has KPROBE_FLAG_OPTIMIZED } "func" code now is: 0xffffffff816cc079 <+9>: int3 0xffffffff816cc07a <+10>: push %rsp 0xffffffff816cc07b <+11>: jmp 0xffffffffa0210000 0xffffffff816cc080 <+16>: incl 0xf(%rcx) 0xffffffff816cc083 <+19>: xchg %eax,%ebp 0xffffffff816cc084 <+20>: (bad) 0xffffffff816cc085 <+21>: push %rbp 5. if call "func", int3 handler call setup_detour_execution: if (p->flags & KPROBE_FLAG_OPTIMIZED) { ... regs->ip = (unsigned long)op->optinsn.insn + TMPL_END_IDX; ... } The code for the destination address is 0xffffffffa021072c: push %r12 0xffffffffa021072e: xor %r12d,%r12d 0xffffffffa0210731: jmp 0xffffffff816cb5ee However, is not a valid start instruction address. As a result, an error occurs. Link: https://lore.kernel.org/all/20230216034247.32348-3-yangjihong1@huawei.com/ Fixes: f66c0447cca1 ("kprobes: Set unoptimized flag after unoptimizing code") Signed-off-by: Yang Jihong Cc: stable@vger.kernel.org Acked-by: Masami Hiramatsu (Google) Signed-off-by: Masami Hiramatsu (Google) commit 868a6fc0ca2407622d2833adefe1c4d284766c4c Author: Yang Jihong Date: Tue Feb 21 08:49:16 2023 +0900 x86/kprobes: Fix __recover_optprobed_insn check optimizing logic Since the following commit: commit f66c0447cca1 ("kprobes: Set unoptimized flag after unoptimizing code") modified the update timing of the KPROBE_FLAG_OPTIMIZED, a optimized_kprobe may be in the optimizing or unoptimizing state when op.kp->flags has KPROBE_FLAG_OPTIMIZED and op->list is not empty. The __recover_optprobed_insn check logic is incorrect, a kprobe in the unoptimizing state may be incorrectly determined as unoptimizing. As a result, incorrect instructions are copied. The optprobe_queued_unopt function needs to be exported for invoking in arch directory. Link: https://lore.kernel.org/all/20230216034247.32348-2-yangjihong1@huawei.com/ Fixes: f66c0447cca1 ("kprobes: Set unoptimized flag after unoptimizing code") Cc: stable@vger.kernel.org Signed-off-by: Yang Jihong Acked-by: Masami Hiramatsu (Google) Signed-off-by: Masami Hiramatsu (Google) commit 4fbd2f83fda0ca44a2ec6421ca3508b355b31858 Author: Masami Hiramatsu (Google) Date: Tue Feb 21 08:49:16 2023 +0900 kprobes: Fix to handle forcibly unoptimized kprobes on freeing_list Since forcibly unoptimized kprobes will be put on the freeing_list directly in the unoptimize_kprobe(), do_unoptimize_kprobes() must continue to check the freeing_list even if unoptimizing_list is empty. This bug can happen if a kprobe is put in an instruction which is in the middle of the jump-replaced instruction sequence of an optprobe, *and* the optprobe is recently unregistered and queued on unoptimizing_list. In this case, the optprobe will be unoptimized forcibly (means immediately) and put it into the freeing_list, expecting the optprobe will be handled in do_unoptimize_kprobe(). But if there is no other optprobes on the unoptimizing_list, current code returns from the do_unoptimize_kprobe() soon and does not handle the optprobe which is on the freeing_list. Then the optprobe will hit the WARN_ON_ONCE() in the do_free_cleaned_kprobes(), because it is not handled in the latter loop of the do_unoptimize_kprobe(). To solve this issue, do not return from do_unoptimize_kprobes() immediately even if unoptimizing_list is empty. Moreover, this change affects another case. kill_optimized_kprobes() expects kprobe_optimizer() will just free the optprobe on freeing_list. So I changed it to just do list_move() to freeing_list if optprobes are on unoptimizing list. And the do_unoptimize_kprobe() will skip arch_disarm_kprobe() if the probe on freeing_list has gone flag. Link: https://lore.kernel.org/all/Y8URdIfVr3pq2X8w@xpf.sh.intel.com/ Link: https://lore.kernel.org/all/167448024501.3253718.13037333683110512967.stgit@devnote3/ Fixes: e4add247789e ("kprobes: Fix optimize_kprobe()/unoptimize_kprobe() cancellation logic") Reported-by: Pengfei Xu Signed-off-by: Masami Hiramatsu (Google) Cc: stable@vger.kernel.org Acked-by: Steven Rostedt (Google) commit ef04277600ba63e5826bf4e9f99e902f42a73e4f Merge: 8573df341545b 38b2d8efd03d2 Author: Dave Airlie Date: Tue Feb 21 09:44:02 2023 +1000 Merge tag 'drm-misc-next-fixes-2023-02-16' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Short summary of fixes pull: Contains fixes for DP MST and the panel orientation on an Lenovo IdeaPad model. Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/Y+4H4C4E6cZcM9+J@linux-uq9g commit c72e04c26faefc6650709066a8f019a7fb4cbb84 Merge: b32c6e029c131 af16544d4abe2 Author: Linus Torvalds Date: Mon Feb 20 15:43:36 2023 -0800 Merge tag 'soc-defconfig-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM defconfigs updates from Arnd Bergmann: "As usual, this contains all the patches to enable options for newly added device drivers in the 32-bit and 64-bit defconfig files. I have sorted the files according to the changes to Kconfig files, to make it easier to check what has changed compared to the 'make savedefconfig' output. The most notable change this time is a series from Mark Brown to add a 'virtconfig' target for arm64, which is for the moment the same as the 'defconfig' target but disables all the top-level SoC specific options in order to have a smaller and faster kernel build" * tag 'soc-defconfig-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (39 commits) arm64: defconfig: enable drivers required by the Qualcomm SA8775P platform arm64: defconfig: Enable DisplayPort on SC8280XP laptops arm64: configs: Add virtconfig kbuild: Provide a version of merge_into_defconfig without override warnings scripts: merge_config: Add option to suppress warning on overrides ARM: reorder defconfig files arm64: reorder defconfig arm64: defconfig: enable Qualcomm SDAM nvmem driver arm64: defconfig: enable SM8450 DISPCC clock driver ARM: defconfig: Add IOSCHED_BFQ to the default configs ARM: configs: multi_v7: enable NVMEM driver for STM32 ARM: Add wpcm450_defconfig for Nuvoton WPCM450 arm64: defconfig: Enable DMA_RESTRICTED_POOL arm64: defconfig: Enable missing configs for mt8192-asurada riscv: defconfig: Enable the Allwinner D1 platform and drivers ARM: imx_v6_v7_defconfig: Don't enable PROVE_LOCKING ARM: multi_v7_defconfig: Add GXP Fan and SPI support ARM: add multi_v7_lpae_defconfig kbuild: Add config fragment merge functionality ARM: multi_v7_defconfig: Add options to support TQMLS102xA series ... commit b32c6e029c1313125cc7b0a9061dda2304c23b7b Merge: ff0c7e18629b8 27aaad0e7c725 Author: Linus Torvalds Date: Mon Feb 20 15:36:37 2023 -0800 Merge tag 'arm-soc-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC updates from Arnd Bergmann: "The majority of the changes are for the OMAP2 platform, mostly removing some dead code that got left behind from previous cleanups. Aside from that, there are very minor updates and correctness fixes for Zynq, i.MX, Samsung, Broadcom, AT91, ep93xx, and OMAP1" * tag 'arm-soc-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (26 commits) dt-bindings: soc: samsung: exynos-pmu: allow phys as child ARM: imx: mach-imx6ul: add imx6ulz support ARM: imx: Call ida_simple_remove() for ida_simple_get arm64: drop redundant "ARMv8" from Kconfig option title ARM: ep93xx: Convert to use descriptors for GPIO LEDs ARM: s3c: fix s3c64xx_set_timer_source prototype ARM: OMAP2+: Fix spelling typos in comment ARM: OMAP2+: Remove unneeded #include ARM: OMAP2+: Remove unneeded #include ARM: OMAP1: call platform_device_put() in error case in omap1_dm_timer_init() ARM: BCM63xx: remove useless goto statement ARM: omap2: make functions static ARM: omap2: remove unused omap2_pm_init ARM: omap2: remove unused declarations ARM: omap2: remove unused functions ARM: omap2: smartreflex: remove on_init control ARM: omap2: remove APLL control ARM: omap2: simplify clock2xxx header ARM: omap2: remove unused omap_hwmod_reset.c ARM: omap2: remove unused headers ... commit ff0c7e18629b8bd64681313a88ce55e182c9fee6 Merge: 5b0ed5964928b a1f925bc4fa89 Author: Linus Torvalds Date: Mon Feb 20 15:28:57 2023 -0800 Merge tag 'arm-boardfile-remove-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC boardfile updates from Arnd Bergmann "Unused boardfile removal for 6.3 This is a follow-up to the deprecation of most of the old-style board files that was merged in linux-6.0, removing them for good. This branch is almost exclusively dead code removal based on those annotations. Some device driver removals went through separate subsystem trees, but the majority is in the same branch, in order to better handle dependencies between the patches and avoid breaking bisection. Unfortunately that leads to merge conflicts against other changes in the subsystem trees, but they should all be trivial to resolve by removing the files. See commit 7d0d3fa7339e ("Merge tag 'arm-boardfiles-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc") for the description of which machines were marked unused and are now removed. The only removals that got postponed are Terastation WXL (mv78xx0) and Jornada720 (StrongARM1100), which turned out to still have potential users" * tag 'arm-boardfile-remove-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (91 commits) mmc: omap: drop TPS65010 dependency ARM: pxa: restore mfp-pxa320.h usb: ohci-omap: avoid unused-variable warning ARM: debug: remove references in DEBUG_UART_8250_SHIFT to removed configs ARM: s3c: remove obsolete s3c-cpu-freq header MAINTAINERS: adjust SAMSUNG SOC CLOCK DRIVERS after s3c24xx support removal MAINTAINERS: update file entries after arm multi-platform rework and mach-pxa removal ARM: remove CONFIG_UNUSED_BOARD_FILES mfd: remove htc-pasic3 driver w1: remove ds1wm driver usb: remove ohci-tmio driver fbdev: remove w100fb driver fbdev: remove tmiofb driver mmc: remove tmio_mmc driver mfd: remove ucb1400 support mfd: remove toshiba tmio drivers rtc: remove v3020 driver power: remove pda_power supply driver ASoC: pxa: remove unused board support pcmcia: remove unused pxa/sa1100 drivers ... commit 16541195c6d9bcad568b7c6afbf855ddc3a856aa Author: David Howells Date: Wed Apr 6 21:09:08 2022 +0100 cifs: Add a function to read into an iter from a socket Add a helper function to read data from a socket into the given iterator. Signed-off-by: David Howells cc: Steve French cc: Shyam Prasad N cc: Rohith Surabattula cc: Jeff Layton cc: linux-cifs@vger.kernel.org Link: https://lore.kernel.org/r/164928617874.457102.10021662143234315566.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/165211419563.3154751.18431990381145195050.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/165348879662.2106726.16881134187242702351.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/165364826398.3334034.12541600783145647319.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/166126395495.708021.12328677373159554478.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/166697258876.61150.3530237818849429372.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/166732031039.3186319.10691316510079412635.stgit@warthog.procyon.org.uk/ # rfc Signed-off-by: Steve French commit b8713c4dbfa3ebb86c492bc2a836e3ebb748e063 Author: David Howells Date: Wed Apr 6 19:41:28 2022 +0100 cifs: Add some helper functions Add some helper functions to manipulate the folio marks by iterating through a list of folios held in an xarray rather than using a page list. Signed-off-by: David Howells cc: Steve French cc: Shyam Prasad N cc: Rohith Surabattula cc: Jeff Layton cc: linux-cifs@vger.kernel.org Link: https://lore.kernel.org/r/164928616583.457102.15157033997163988344.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/165211418840.3154751.3090684430628501879.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/165348878940.2106726.204291614267188735.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/165364825674.3334034.3356201708659748648.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/166126394799.708021.10637797063862600488.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/166697258147.61150.9940790486999562110.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/166732030314.3186319.9209944805565413627.stgit@warthog.procyon.org.uk/ # rfc Signed-off-by: Steve French commit 39bc58203f040ebafbec48198a83c246b25eba99 Author: David Howells Date: Thu Oct 27 22:40:17 2022 +0100 cifs: Add a function to Hash the contents of an iterator Add a function to push the contents of a BVEC-, KVEC- or XARRAY-type iterator into a synchronous hash algorithm. UBUF- and IOBUF-type iterators are not supported on the assumption that either we're doing buffered I/O, in which case we won't see them, or we're doing direct I/O, in which case the iterator will have been extracted into a BVEC-type iterator higher up. Signed-off-by: David Howells cc: Steve French cc: Shyam Prasad N cc: Rohith Surabattula cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: linux-crypto@vger.kernel.org Link: https://lore.kernel.org/r/166697257423.61150.12070648579830206483.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/166732029577.3186319.17162612653237909961.stgit@warthog.procyon.org.uk/ # rfc Signed-off-by: Steve French commit e5fbdde430171175f32094c8059eea0d0e2487ae Author: David Howells Date: Thu Oct 27 17:36:11 2022 +0100 cifs: Add a function to build an RDMA SGE list from an iterator Add a function to add elements onto an RDMA SGE list representing page fragments extracted from a BVEC-, KVEC- or XARRAY-type iterator and DMA mapped until the maximum number of elements is reached. Nothing is done to make sure the pages remain present - that must be done by the caller. Signed-off-by: David Howells cc: Steve French cc: Shyam Prasad N cc: Rohith Surabattula cc: Tom Talpey cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: linux-rdma@vger.kernel.org Link: https://lore.kernel.org/r/166697256704.61150.17388516338310645808.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/166732028840.3186319.8512284239779728860.stgit@warthog.procyon.org.uk/ # rfc Signed-off-by: Steve French commit 0185846975339a5c348373aa450a977f5242366b Author: David Howells Date: Thu Oct 27 16:19:44 2022 +0100 netfs: Add a function to extract an iterator into a scatterlist Provide a function for filling in a scatterlist from the list of pages contained in an iterator. If the iterator is UBUF- or IOBUF-type, the pages have a pin taken on them (as FOLL_PIN). If the iterator is BVEC-, KVEC- or XARRAY-type, no pin is taken on the pages and it is left to the caller to manage their lifetime. It cannot be assumed that a ref can be validly taken, particularly in the case of a KVEC iterator. Signed-off-by: David Howells cc: Jeff Layton cc: Steve French cc: Shyam Prasad N cc: Rohith Surabattula cc: linux-cachefs@redhat.com cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org Signed-off-by: Steve French commit 85dd2c8ff368b1446be9febde84afe1d7aec4261 Author: David Howells Date: Thu Oct 20 16:16:32 2022 +0100 netfs: Add a function to extract a UBUF or IOVEC into a BVEC iterator Add a function to extract the pages from a user-space supplied iterator (UBUF- or IOVEC-type) into a BVEC-type iterator, retaining the pages by getting a pin on them (as FOLL_PIN) as we go. This is useful in three situations: (1) A userspace thread may have a sibling that unmaps or remaps the process's VM during the operation, changing the assignment of the pages and potentially causing an error. Retaining the pages keeps some pages around, even if this occurs; futher, we find out at the point of extraction if EFAULT is going to be incurred. (2) Pages might get swapped out/discarded if not retained, so we want to retain them to avoid the reload causing a deadlock due to a DIO from/to an mmapped region on the same file. (3) The iterator may get passed to sendmsg() by the filesystem. If a fault occurs, we may get a short write to a TCP stream that's then tricky to recover from. We don't deal with other types of iterator here, leaving it to other mechanisms to retain the pages (eg. PG_locked, PG_writeback and the pipe lock). Signed-off-by: David Howells cc: Jeff Layton cc: Steve French cc: Shyam Prasad N cc: Rohith Surabattula cc: linux-cachefs@redhat.com cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org Signed-off-by: Steve French commit 4e260a8fd740aa0dcecafe79c4f9d3013a21f1ca Author: David Howells Date: Tue Nov 1 14:52:47 2022 +0000 cifs: Implement splice_read to pass down ITER_BVEC not ITER_PIPE Provide cifs_splice_read() to use a bvec rather than an pipe iterator as the latter cannot so easily be split and advanced, which is necessary to pass an iterator down to the bottom levels. Upstream cifs gets around this problem by using iov_iter_get_pages() to prefill the pipe and then passing the list of pages down. This is done by: (1) Bulk-allocate a bunch of pages to carry as much of the requested amount of data as possible, but without overrunning the available slots in the pipe and add them to an ITER_BVEC. (2) Synchronously call ->read_iter() to read into the buffer. (3) Discard any unused pages. (4) Load the remaining pages into the pipe in order and advance the head pointer. Signed-off-by: David Howells cc: Steve French cc: Shyam Prasad N cc: Rohith Surabattula cc: Jeff Layton cc: Al Viro cc: linux-cifs@vger.kernel.org Link: https://lore.kernel.org/r/166732028113.3186319.1793644937097301358.stgit@warthog.procyon.org.uk/ # rfc Signed-off-by: Steve French commit 7c8e01ebf2361eb397f32cd1c8ee402dda48dce0 Author: David Howells Date: Wed Feb 15 08:00:31 2023 +0000 splice: Export filemap/direct_splice_read() filemap_splice_read() and direct_splice_read() should be exported. Signed-off-by: David Howells cc: Steve French cc: Jens Axboe cc: Christoph Hellwig cc: Al Viro cc: David Hildenbrand cc: John Hubbard cc: linux-cifs@vger.kernel.org cc: linux-mm@kvack.org cc: linux-block@vger.kernel.org cc: linux-fsdevel@vger.kernel.org Signed-off-by: Steve French commit 7d58fe731028128f3a7e20b9c492be48aae133ee Author: David Howells Date: Fri Oct 28 21:50:30 2022 +0100 iov_iter: Add a function to extract a page list from an iterator Add a function, iov_iter_extract_pages(), to extract a list of pages from an iterator. The pages may be returned with a pin added or nothing, depending on the type of iterator. Add a second function, iov_iter_extract_will_pin(), to determine how the cleanup should be done. There are two cases: (1) ITER_IOVEC or ITER_UBUF iterator. Extracted pages will have pins (FOLL_PIN) obtained on them so that a concurrent fork() will forcibly copy the page so that DMA is done to/from the parent's buffer and is unavailable to/unaffected by the child process. iov_iter_extract_will_pin() will return true for this case. The caller should use something like unpin_user_page() to dispose of the page. (2) Any other sort of iterator. No refs or pins are obtained on the page, the assumption is made that the caller will manage page retention. iov_iter_extract_will_pin() will return false. The pages don't need additional disposal. Signed-off-by: David Howells Reviewed-by: Christoph Hellwig Reviewed-by: Jens Axboe cc: Al Viro cc: John Hubbard cc: David Hildenbrand cc: Matthew Wilcox cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org Signed-off-by: Steve French commit f62e52d1276b6cd329fe72d36bdf912b2ce4caaf Author: David Howells Date: Thu Jan 19 12:47:23 2023 +0000 iov_iter: Define flags to qualify page extraction. Define flags to qualify page extraction to pass into iov_iter_*_pages*() rather than passing in FOLL_* flags. For now only a flag to allow peer-to-peer DMA is supported. Signed-off-by: David Howells Reviewed-by: Christoph Hellwig Reviewed-by: John Hubbard Reviewed-by: Jens Axboe cc: Al Viro cc: Logan Gunthorpe cc: linux-fsdevel@vger.kernel.org cc: linux-block@vger.kernel.org Signed-off-by: Steve French commit 33b3b041543e8b3abf9a692d0f8c2ab0e07c50cd Author: David Howells Date: Tue Feb 7 10:45:40 2023 +0000 splice: Add a func to do a splice from an O_DIRECT file without ITER_PIPE Implement a function, direct_file_splice(), that deals with this by using an ITER_BVEC iterator instead of an ITER_PIPE iterator as the former won't free its buffers when reverted. The function bulk allocates all the buffers it thinks it is going to use in advance, does the read synchronously and only then trims the buffer down. The pages we did use get pushed into the pipe. This fixes a problem with the upcoming iov_iter_extract_pages() function, whereby pages extracted from a non-user-backed iterator such as ITER_PIPE aren't pinned. __iomap_dio_rw(), however, calls iov_iter_revert() to shorten the iterator to just the bufferage it is going to use - which has the side-effect of freeing the excess pipe buffers, even though they're attached to a bio and may get written to by DMA (thanks to Hillf Danton for spotting this[1]). This then causes memory corruption that is particularly noticeable when the syzbot test[2] is run. The test boils down to: out = creat(argv[1], 0666); ftruncate(out, 0x800); lseek(out, 0x200, SEEK_SET); in = open(argv[1], O_RDONLY | O_DIRECT | O_NOFOLLOW); sendfile(out, in, NULL, 0x1dd00); run repeatedly in parallel. What I think is happening is that ftruncate() occasionally shortens the DIO read that's about to be made by sendfile's splice core by reducing i_size. This should be more efficient for DIO read by virtue of doing a bulk page allocation, but slightly less efficient by ignoring any partial page in the pipe. Reported-by: syzbot+a440341a59e3b7142895@syzkaller.appspotmail.com Signed-off-by: David Howells Reviewed-by: Jens Axboe cc: Christoph Hellwig cc: Al Viro cc: David Hildenbrand cc: John Hubbard cc: linux-mm@kvack.org cc: linux-block@vger.kernel.org cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/20230207094731.1390-1-hdanton@sina.com/ [1] Link: https://lore.kernel.org/r/000000000000b0b3c005f3a09383@google.com/ [2] Signed-off-by: Steve French commit 07073eb01c5f630344bc1c3e56b0e0d94aedf919 Author: David Howells Date: Tue Feb 14 15:01:42 2023 +0000 splice: Add a func to do a splice from a buffered file without ITER_PIPE Provide a function to do splice read from a buffered file, pulling the folios out of the pagecache directly by calling filemap_get_pages() to do any required reading and then pasting the returned folios into the pipe. A helper function is provided to do the actual folio pasting and will handle multipage folios by splicing as many of the relevant subpages as will fit into the pipe. The code is loosely based on filemap_read() and might belong in mm/filemap.c with that as it needs to use filemap_get_pages(). Signed-off-by: David Howells Reviewed-by: Jens Axboe cc: Christoph Hellwig cc: Al Viro cc: David Hildenbrand cc: John Hubbard cc: linux-mm@kvack.org cc: linux-block@vger.kernel.org cc: linux-fsdevel@vger.kernel.org Signed-off-by: Steve French commit dd5b9d003ebcb469de05f967af7164e6b9450ca2 Author: David Howells Date: Wed Feb 8 18:18:17 2023 +0000 mm: Pass info, not iter, into filemap_get_pages() filemap_get_pages() and a number of functions that it calls take an iterator to provide two things: the number of bytes to be got from the file specified and whether partially uptodate pages are allowed. Change these functions so that this information is passed in directly. This allows it to be called without having an iterator to hand. Signed-off-by: David Howells Reviewed-by: Christoph Hellwig Reviewed-by: Jens Axboe cc: Christoph Hellwig cc: Matthew Wilcox cc: Al Viro cc: David Hildenbrand cc: John Hubbard cc: linux-mm@kvack.org cc: linux-block@vger.kernel.org cc: linux-fsdevel@vger.kernel.org Signed-off-by: Steve French commit eb3e28c1e89b4984308777231887e41aa8a0151f Author: Kees Cook Date: Fri Feb 17 16:24:40 2023 -0800 smb3: Replace smb2pdu 1-element arrays with flex-arrays The kernel is globally removing the ambiguous 0-length and 1-element arrays in favor of flexible arrays, so that we can gain both compile-time and run-time array bounds checking[1]. Replace the trailing 1-element array with a flexible array in the following structures: struct smb2_err_rsp struct smb2_tree_connect_req struct smb2_negotiate_rsp struct smb2_sess_setup_req struct smb2_sess_setup_rsp struct smb2_read_req struct smb2_read_rsp struct smb2_write_req struct smb2_write_rsp struct smb2_query_directory_req struct smb2_query_directory_rsp struct smb2_set_info_req struct smb2_change_notify_rsp struct smb2_create_rsp struct smb2_query_info_req struct smb2_query_info_rsp Replace the trailing 1-element array with a flexible array, but leave the existing structure padding: struct smb2_file_all_info struct smb2_lock_req Adjust all related size calculations to match the changes to sizeof(). No machine code output or .data section differences are produced after these changes. [1] For lots of details, see both: https://docs.kernel.org/process/deprecated.html#zero-length-and-one-element-arrays https://people.kernel.org/kees/bounded-flexible-arrays-in-c Cc: Steve French Cc: Paulo Alcantara Cc: Ronnie Sahlberg Cc: Shyam Prasad N Cc: Tom Talpey Cc: Namjae Jeon Cc: Sergey Senozhatsky Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Reviewed-by: Namjae Jeon Signed-off-by: Kees Cook Signed-off-by: Steve French commit 0e9bd27b2a635d54665fcc1d6398a5f6aeb6b0cb Author: Paulo Alcantara Date: Mon Feb 20 16:36:54 2023 -0300 cifs: get rid of dns resolve worker We already upcall to resolve hostnames during reconnect by calling reconn_set_ipaddr_from_hostname(), so there is no point in having a worker to periodically call it. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by Signed-off-by: Steve French commit 5b0ed5964928b0aaf0d644c17c886c7f5ea4bb3f Merge: 553637f73c314 0aa2988e4fd23 Author: Linus Torvalds Date: Mon Feb 20 14:27:21 2023 -0800 Merge tag 'for-6.3/block-2023-02-16' of git://git.kernel.dk/linux Pull block updates from Jens Axboe: - NVMe updates via Christoph: - Small improvements to the logging functionality (Amit Engel) - Authentication cleanups (Hannes Reinecke) - Cleanup and optimize the DMA mapping cod in the PCIe driver (Keith Busch) - Work around the command effects for Format NVM (Keith Busch) - Misc cleanups (Keith Busch, Christoph Hellwig) - Fix and cleanup freeing single sgl (Keith Busch) - MD updates via Song: - Fix a rare crash during the takeover process - Don't update recovery_cp when curr_resync is ACTIVE - Free writes_pending in md_stop - Change active_io to percpu - Updates to drbd, inching us closer to unifying the out-of-tree driver with the in-tree one (Andreas, Christoph, Lars, Robert) - BFQ update adding support for multi-actuator drives (Paolo, Federico, Davide) - Make brd compliant with REQ_NOWAIT (me) - Fix for IOPOLL and queue entering, fixing stalled IO waiting on timeouts (me) - Fix for REQ_NOWAIT with multiple bios (me) - Fix memory leak in blktrace cleanup (Greg) - Clean up sbitmap and fix a potential hang (Kemeng) - Clean up some bits in BFQ, and fix a bug in the request injection (Kemeng) - Clean up the request allocation and issue code, and fix some bugs related to that (Kemeng) - ublk updates and fixes: - Add support for unprivileged ublk (Ming) - Improve device deletion handling (Ming) - Misc (Liu, Ziyang) - s390 dasd fixes (Alexander, Qiheng) - Improve utility of request caching and fixes (Anuj, Xiao) - zoned cleanups (Pankaj) - More constification for kobjs (Thomas) - blk-iocost cleanups (Yu) - Remove bio splitting from drivers that don't need it (Christoph) - Switch blk-cgroups to use struct gendisk. Some of this is now incomplete as select late reverts were done. (Christoph) - Add bvec initialization helpers, and convert callers to use that rather than open-coding it (Christoph) - Misc fixes and cleanups (Jinke, Keith, Arnd, Bart, Li, Martin, Matthew, Ulf, Zhong) * tag 'for-6.3/block-2023-02-16' of git://git.kernel.dk/linux: (169 commits) brd: use radix_tree_maybe_preload instead of radix_tree_preload block: use proper return value from bio_failfast() block: bio-integrity: Copy flags when bio_integrity_payload is cloned block: Fix io statistics for cgroup in throttle path brd: mark as nowait compatible brd: check for REQ_NOWAIT and set correct page allocation mask brd: return 0/-error from brd_insert_page() block: sync mixed merged request's failfast with 1st bio's Revert "blk-cgroup: pin the gendisk in struct blkcg_gq" Revert "blk-cgroup: pass a gendisk to blkg_lookup" Revert "blk-cgroup: delay blk-cgroup initialization until add_disk" Revert "blk-cgroup: delay calling blkcg_exit_disk until disk_release" Revert "blk-cgroup: move the cgroup information to struct gendisk" nvme-pci: remove iod use_sgls nvme-pci: fix freeing single sgl block: ublk: check IO buffer based on flag need_get_data s390/dasd: Fix potential memleak in dasd_eckd_init() s390/dasd: sort out physical vs virtual pointers usage block: Remove the ALLOC_CACHE_SLACK constant block: make kobj_type structures constant ... commit 553637f73c314c742243b8dc5ef072e9dadbe581 Merge: c1ef500307953 9636e650e16f6 Author: Linus Torvalds Date: Mon Feb 20 14:10:36 2023 -0800 Merge tag 'for-6.3/dio-2023-02-16' of git://git.kernel.dk/linux Pull legacy dio update from Jens Axboe: "We only have a few file systems that use the old dio code, make them select it rather than build it unconditionally" * tag 'for-6.3/dio-2023-02-16' of git://git.kernel.dk/linux: fs: build the legacy direct I/O code conditionally fs: move sb_init_dio_done_wq out of direct-io.c commit c1ef5003079531b5aae12467a350379496752334 Merge: cce5fe5eda058 d46aa786fa53c Author: Linus Torvalds Date: Mon Feb 20 14:03:57 2023 -0800 Merge tag 'for-6.3/iter-ubuf-2023-02-16' of git://git.kernel.dk/linux Pull io_uring ITER_UBUF conversion from Jens Axboe: "Since we now have ITER_UBUF available, switch to using it for single ranges as it's more efficient than ITER_IOVEC for that" * tag 'for-6.3/iter-ubuf-2023-02-16' of git://git.kernel.dk/linux: block: use iter_ubuf for single range iov_iter: move iter_ubuf check inside restore WARN io_uring: use iter_ubuf for single range imports io_uring: switch network send/recv to ITER_UBUF iov: add import_ubuf() commit cce5fe5eda0581363a9c585dabf8a5923f15a708 Merge: eca3a04f140a7 7d3fd88d61a41 Author: Linus Torvalds Date: Mon Feb 20 13:53:39 2023 -0800 Merge tag 'for-6.3/io_uring-2023-02-16' of git://git.kernel.dk/linux Pull io_uring updates from Jens Axboe: - Cleanup series making the async prep and handling of REQ_F_FORCE_ASYNC easier to follow and verify (Dylan) - Enable specifying specific flags for OP_MSG_RING (Breno) - Enable use of KASAN with the internal request cache (Breno) - Split the opcode definition structs into a hot and cold part (Breno) - OP_MSG_RING fixes (Pavel, me) - Fix an issue with IOPOLL cancelation and PREEMPT_NONE (me) - Handle TIF_NOTIFY_RESUME for the io-wq threads that never return to userspace (me) - Add support for using io_uring_register() with a registered ring fd (Josh) - Improve handling of poll on the ring fd (Pavel) - Series improving the task_work handling (Pavel) - Misc cleanups, fixes, improvements (Dmitrii, Quanfa, Richard, Pavel, me) * tag 'for-6.3/io_uring-2023-02-16' of git://git.kernel.dk/linux: (51 commits) io_uring: Support calling io_uring_register with a registered ring fd io_uring,audit: don't log IORING_OP_MADVISE io_uring: mark task TASK_RUNNING before handling resume/task work io_uring: always go async for unsupported open flags io_uring: always go async for unsupported fadvise flags io_uring: for requests that require async, force it io_uring: if a linked request has REQ_F_FORCE_ASYNC then run it async io_uring: add reschedule point to handle_tw_list() io_uring: add a conditional reschedule to the IOPOLL cancelation loop io_uring: return normal tw run linking optimisation io_uring: refactor tctx_task_work io_uring: refactor io_put_task helpers io_uring: refactor req allocation io_uring: improve io_get_sqe io_uring: kill outdated comment about overflow flush io_uring: use user visible tail in io_uring_poll() io_uring: pass in io_issue_def to io_assign_file() io_uring: Enable KASAN for request cache io_uring: handle TIF_NOTIFY_RESUME when checking for task_work io_uring/msg-ring: ensure flags passing works for task_work completions ... commit d9194e009efef9613f48022f3c885191c48120f9 Author: Frank Rowand Date: Mon Feb 13 12:57:02 2023 -0600 of: dynamic: add lifecycle docbook info to node creation functions The existing docbook comments for the functions related to creating a devicetree node do not explain the reference count of a newly created node, how decrementing the reference count to zero will free the associated memory, and the caller's responsibility to call of_node_put() on the node. Explain what happens when the reference count is decremented to zero. Signed-off-by: Frank Rowand Link: https://lore.kernel.org/r/20230213185702.395776-8-frowand.list@gmail.com Signed-off-by: Rob Herring commit ec0b7e24d566a843e3cfba21a6471170fdb0f810 Author: Frank Rowand Date: Mon Feb 13 12:57:01 2023 -0600 of: add consistency check to of_node_release() Add an additional consistency check to of_node_release(), which is called when the reference count of a devicetree node is decremented to zero. The node's children should have been deleted before the node is deleted so check that no children exist. Signed-off-by: Frank Rowand Link: https://lore.kernel.org/r/20230213185702.395776-7-frowand.list@gmail.com Signed-off-by: Rob Herring commit 23522dd7033ad8dcd818f75469907a8fdac8e8a4 Author: Frank Rowand Date: Mon Feb 13 12:57:00 2023 -0600 of: do not use "%pOF" printk format on node with refcount of zero of_node_release() can not use the "%pOF" printk format to report the node name of a node when the node reference count is zero. This is because the formatter device_node_string() calls fwnode_full_name_string() which indirectly calls of_node_get(). Calling of_node_get() on the node with a zero reference count results in a WARNING and stack trace. When the reference count has been decremented to zero, this function is in the subsequent call path which frees memory related to the node. This commit resolves the unittest EXPECT errors that were created in the previous commmit. Signed-off-by: Frank Rowand Link: https://lore.kernel.org/r/20230213185702.395776-6-frowand.list@gmail.com Signed-off-by: Rob Herring commit 74df14cd301a1433947077e79ce2c610654a32e7 Author: Frank Rowand Date: Mon Feb 13 12:56:59 2023 -0600 of: unittest: add node lifecycle tests Add tests to exercise the actions that occur when the reference count of devicetree nodes decrement to zero and beyond. Decrementing to zero triggers freeing memory allocated for the node. This commit will expose a pr_err() issue in of_node_release(), resulting in some kernal warnings and stack traces. When scripts/dtc/of_unittest_expect processes the console messages, it will also report related problems for EXPECT messages due to the pr_err() issue: ** missing EXPECT begin : 5 Signed-off-by: Frank Rowand Link: https://lore.kernel.org/r/20230213185702.395776-5-frowand.list@gmail.com [robh: Fix !CONFIG_OF_DYNAMIC build] Signed-off-by: Rob Herring commit 0af2795f936f1ea1f9f1497447145dfcc7ed2823 Author: Marc Zyngier Date: Mon Feb 20 19:01:01 2023 +0000 genirq/msi: Take the per-device MSI lock before validating the control structure Calling msi_ctrl_valid() ultimately results in calling msi_get_device_domain(), which requires holding the device MSI lock. However, in msi_domain_populate_irqs() the lock is taken right after having called msi_ctrl_valid(), which is just a tad too late. Take the lock before invoking msi_ctrl_valid(). Fixes: 40742716f294 ("genirq/msi: Make msi_add_simple_msi_descs() device domain aware") Reported-by: "Russell King (Oracle)" Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Tested-by: Russell King (Oracle) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/Y/Opu6ETe3ZzZ/8E@shell.armlinux.org.uk Link: https://lore.kernel.org/r/20230220190101.314446-1-maz@kernel.org commit eca3a04f140a7380d8a7b4cd89d681706a69380c Merge: 885ce48739189 723b197bbdf1e Author: Linus Torvalds Date: Mon Feb 20 13:05:24 2023 -0800 Merge tag 'dlm-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm Pull dlm updates from David Teigland: "This fixes some races in the lowcomms startup and shutdown code that were found by targeted stress testing that quickly and repeatedly joins and leaves lockspaces" * tag 'dlm-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm: fs: dlm: remove unnecessary waker_up() calls fs: dlm: move state change into else branch fs: dlm: remove newline in log_print fs: dlm: reduce the shutdown timeout to 5 secs fs: dlm: make dlm sequence id more robust fs: dlm: wait until all midcomms nodes detect version fs: dlm: ignore unexpected non dlm opts msgs fs: dlm: bring back previous shutdown handling fs: dlm: send FIN ack back in right cases fs: dlm: move sending fin message into state change handling fs: dlm: don't set stop rx flag after node reset fs: dlm: fix race setting stop tx flag fs: dlm: be sure to call dlm_send_queue_flush() fs: dlm: fix use after free in midcomms commit fs: dlm: start midcomms before scand fs/dlm: Remove "select SRCU" fs: dlm: fix return value check in dlm_memory_init() commit 885ce48739189fac6645ff42d736ee0de0b5917d Merge: 274978f173276 964a54e5e1a0d Author: Linus Torvalds Date: Mon Feb 20 12:54:27 2023 -0800 Merge tag 'for-6.3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs updates from David Sterba: "The usual mix of performance improvements and new features. The core change is reworking how checksums are processed, with followup cleanups and simplifications. There are two minor changes in block layer and iomap code. Features: - block group allocation class heuristics: - pack files by size (up to 128k, up to 8M, more) to avoid fragmentation in block groups, assuming that file size and life time is correlated, in particular this may help during balance - with tracepoints and extensible in the future Performance: - send: cache directory utimes and only emit the command when necessary - speedup up to 10x - smaller final stream produced (no redundant utimes commands issued) - compatibility not affected - fiemap: skip backref checks for shared leaves - speedup 3x on sample filesystem with all leaves shared (e.g. on snapshots) - micro optimized b-tree key lookup, speedup in metadata operations (sample benchmark: fs_mark +10% of files/sec) Core changes: - change where checksumming is done in the io path: - checksum and read repair does verification at lower layer - cascaded cleanups and simplifications - raid56 refactoring and cleanups Fixes: - sysfs: make sure that a run-time change of a feature is correctly tracked by the feature files - scrub: better reporting of tree block errors Other: - locally enable -Wmaybe-uninitialized after fixing all warnings - misc cleanups, spelling fixes Other code: - block: export bio_split_rw - iomap: remove IOMAP_F_ZONE_APPEND" * tag 'for-6.3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (109 commits) btrfs: make kobj_type structures constant btrfs: remove the bdev argument to btrfs_rmap_block btrfs: don't rely on unchanging ->bi_bdev for zone append remaps btrfs: never return true for reads in btrfs_use_zone_append btrfs: pass a btrfs_bio to btrfs_use_append btrfs: set bbio->file_offset in alloc_new_bio btrfs: use file_offset to limit bios size in calc_bio_boundaries btrfs: do unsigned integer division in the extent buffer binary search loop btrfs: eliminate extra call when doing binary search on extent buffer btrfs: raid56: handle endio in scrub_rbio btrfs: raid56: handle endio in recover_rbio btrfs: raid56: handle endio in rmw_rbio btrfs: raid56: submit the read bios from scrub_assemble_read_bios btrfs: raid56: fold rmw_read_wait_recover into rmw_read_bios btrfs: raid56: fold recover_assemble_read_bios into recover_rbio btrfs: raid56: add a bio_list_put helper btrfs: raid56: wait for I/O completion in submit_read_bios btrfs: raid56: simplify code flow in rmw_rbio btrfs: raid56: simplify error handling and code flow in raid56_parity_write btrfs: replace btrfs_wait_tree_block_writeback by wait_on_extent_buffer_writeback ... commit f9366f4c2a29d14f5992b195e268240c2deb116e Author: Andrew Morton Date: Thu Feb 16 14:44:24 2023 -0800 include/linux/migrate.h: remove unneeded externs As suggested by Matthew. Suggested-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 32cf666eab720b597650d9dea6ff07e99cd36b3d Author: SeongJae Park Date: Thu Feb 16 17:07:03 2023 +0000 mm/memory_hotplug: cleanup return value handing in do_migrate_range() Return value mechanism of do_migrate_range() is not very simple, while no caller of the function checks the return value. Make the function return nothing to be more simple, and cleanup related unnecessary code. Link: https://lkml.kernel.org/r/20230216170703.64574-1-sj@kernel.org Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Reviewed-by: Baolin Wang Signed-off-by: SeongJae Park Cc: Oscar Salvador Signed-off-by: Andrew Morton commit 7a079ba20090ab50d2f4203ceccd1e0f4becd1a6 Author: Peter Xu Date: Wed Feb 15 15:58:00 2023 -0500 mm/uffd: fix comment in handling pte markers The comment is obsolete after f369b07c8614 ("mm/uffd: reset write protection when unregister with wp-mode", 2022-08-20). Remove it. Link: https://lkml.kernel.org/r/20230215205800.223549-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Axel Rasmussen Signed-off-by: Andrew Morton commit cd7755800eb54e8522f5e51f4e71e6494c1f1572 Author: Baolin Wang Date: Wed Feb 15 18:39:37 2023 +0800 mm: change to return bool for isolate_movable_page() Now the isolate_movable_page() can only return 0 or -EBUSY, and no users will care about the negative return value, thus we can convert the isolate_movable_page() to return a boolean value to make the code more clear when checking the movable page isolation state. No functional changes intended. [akpm@linux-foundation.org: remove unneeded comment, per Matthew] Link: https://lkml.kernel.org/r/cb877f73f4fff8d309611082ec740a7065b1ade0.1676424378.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Acked-by: David Hildenbrand Reviewed-by: Matthew Wilcox (Oracle) Acked-by: Linus Torvalds Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton commit 9747b9e92418b61c2281561e0651803f1fad0159 Author: Baolin Wang Date: Wed Feb 15 18:39:36 2023 +0800 mm: hugetlb: change to return bool for isolate_hugetlb() Now the isolate_hugetlb() only returns 0 or -EBUSY, and most users did not care about the negative value, thus we can convert the isolate_hugetlb() to return a boolean value to make code more clear when checking the hugetlb isolation state. Moreover converts 2 users which will consider the negative value returned by isolate_hugetlb(). No functional changes intended. [akpm@linux-foundation.org: shorten locked section, per SeongJae Park] Link: https://lkml.kernel.org/r/12a287c5bebc13df304387087bbecc6421510849.1676424378.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Acked-by: David Hildenbrand Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Mike Kravetz Acked-by: Linus Torvalds Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton commit f7f9c00dfafffd7a5a1a5685e2d874c64913e2ed Author: Baolin Wang Date: Wed Feb 15 18:39:35 2023 +0800 mm: change to return bool for isolate_lru_page() The isolate_lru_page() can only return 0 or -EBUSY, and most users did not care about the negative error of isolate_lru_page(), except one user in add_page_for_migration(). So we can convert the isolate_lru_page() to return a boolean value, which can help to make the code more clear when checking the return value of isolate_lru_page(). Also convert all users' logic of checking the isolation state. No functional changes intended. Link: https://lkml.kernel.org/r/3074c1ab628d9dbf139b33f248a8bc253a3f95f0.1676424378.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Acked-by: David Hildenbrand Reviewed-by: Matthew Wilcox (Oracle) Acked-by: Linus Torvalds Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton commit be2d57563822b7e00b2b16d9354637c4b6d6d5cc Author: Baolin Wang Date: Wed Feb 15 18:39:34 2023 +0800 mm: change to return bool for folio_isolate_lru() Patch series "Change the return value for page isolation functions", v3. Now the page isolation functions did not return a boolean to indicate success or not, instead it will return a negative error when failed to isolate a page. So below code used in most places seem a boolean success/failure thing, which can confuse people whether the isolation is successful. if (folio_isolate_lru(folio)) continue; Moreover the page isolation functions only return 0 or -EBUSY, and most users did not care about the negative error except for few users, thus we can convert all page isolation functions to return a boolean value, which can remove the confusion to make code more clear. No functional changes intended in this patch series. This patch (of 4): Now the folio_isolate_lru() did not return a boolean value to indicate isolation success or not, however below code checking the return value can make people think that it was a boolean success/failure thing, which makes people easy to make mistakes (see the fix patch[1]). if (folio_isolate_lru(folio)) continue; Thus it's better to check the negative error value expilictly returned by folio_isolate_lru(), which makes code more clear per Linus's suggestion[2]. Moreover Matthew suggested we can convert the isolation functions to return a boolean[3], since most users did not care about the negative error value, and can also remove the confusing of checking return value. So this patch converts the folio_isolate_lru() to return a boolean value, which means return 'true' to indicate the folio isolation is successful, and 'false' means a failure to isolation. Meanwhile changing all users' logic of checking the isolation state. No functional changes intended. [1] https://lore.kernel.org/all/20230131063206.28820-1-Kuan-Ying.Lee@mediatek.com/T/#u [2] https://lore.kernel.org/all/CAHk-=wiBrY+O-4=2mrbVyxR+hOqfdJ=Do6xoucfJ9_5az01L4Q@mail.gmail.com/ [3] https://lore.kernel.org/all/Y+sTFqwMNAjDvxw3@casper.infradead.org/ Link: https://lkml.kernel.org/r/cover.1676424378.git.baolin.wang@linux.alibaba.com Link: https://lkml.kernel.org/r/8a4e3679ed4196168efadf7ea36c038f2f7d5aa9.1676424378.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Reviewed-by: SeongJae Park Acked-by: David Hildenbrand Reviewed-by: Matthew Wilcox (Oracle) Acked-by: Linus Torvalds Cc: Johannes Weiner Cc: Miaohe Lin Cc: Michal Hocko Cc: Mike Kravetz Cc: Muchun Song Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Roman Gushchin Cc: Shakeel Butt Signed-off-by: Andrew Morton commit d5d469247264e56960705dc5ae7e1d014861fe40 Author: Arnd Bergmann Date: Wed Feb 15 14:00:58 2023 +0100 objtool: add UACCESS exceptions for __tsan_volatile_read/write A lot of the tsan helpers are already excempt from the UACCESS warnings, but some more functions were added that need the same thing: kernel/kcsan/core.o: warning: objtool: __tsan_volatile_read16+0x0: call to __tsan_unaligned_read16() with UACCESS enabled kernel/kcsan/core.o: warning: objtool: __tsan_volatile_write16+0x0: call to __tsan_unaligned_write16() with UACCESS enabled vmlinux.o: warning: objtool: __tsan_unaligned_volatile_read16+0x4: call to __tsan_unaligned_read16() with UACCESS enabled vmlinux.o: warning: objtool: __tsan_unaligned_volatile_write16+0x4: call to __tsan_unaligned_write16() with UACCESS enabled As Marco points out, these functions don't even call each other explicitly but instead gcc (but not clang) notices the functions being identical and turns one symbol into a direct branch to the other. Link: https://lkml.kernel.org/r/20230215130058.3836177-4-arnd@kernel.org Fixes: 75d75b7a4d54 ("kcsan: Support distinguishing volatile accesses") Signed-off-by: Arnd Bergmann Acked-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Josh Poimboeuf Cc: Kuan-Ying Lee Cc: Peter Zijlstra (Intel) Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit e75a698859a3f62825af06987da6b3e6466e6e56 Author: Arnd Bergmann Date: Wed Feb 15 14:00:57 2023 +0100 kmsan: disable ftrace in kmsan core code objtool warns about some suspicous code inside of kmsan: vmlinux.o: warning: objtool: __msan_metadata_ptr_for_load_n+0x4: call to __fentry__() with UACCESS enabled vmlinux.o: warning: objtool: __msan_metadata_ptr_for_store_n+0x4: call to __fentry__() with UACCESS enabled vmlinux.o: warning: objtool: __msan_metadata_ptr_for_load_1+0x4: call to __fentry__() with UACCESS enabled vmlinux.o: warning: objtool: __msan_metadata_ptr_for_store_1+0x4: call to __fentry__() with UACCESS enabled vmlinux.o: warning: objtool: __msan_metadata_ptr_for_load_2+0x4: call to __fentry__() with UACCESS enabled vmlinux.o: warning: objtool: __msan_metadata_ptr_for_store_2+0x4: call to __fentry__() with UACCESS enabled vmlinux.o: warning: objtool: __msan_metadata_ptr_for_load_4+0x4: call to __fentry__() with UACCESS enabled vmlinux.o: warning: objtool: __msan_metadata_ptr_for_store_4+0x4: call to __fentry__() with UACCESS enabled vmlinux.o: warning: objtool: __msan_metadata_ptr_for_load_8+0x4: call to __fentry__() with UACCESS enabled vmlinux.o: warning: objtool: __msan_metadata_ptr_for_store_8+0x4: call to __fentry__() with UACCESS enabled vmlinux.o: warning: objtool: __msan_instrument_asm_store+0x4: call to __fentry__() with UACCESS enabled vmlinux.o: warning: objtool: __msan_chain_origin+0x4: call to __fentry__() with UACCESS enabled vmlinux.o: warning: objtool: __msan_poison_alloca+0x4: call to __fentry__() with UACCESS enabled vmlinux.o: warning: objtool: __msan_warning+0x4: call to __fentry__() with UACCESS enabled vmlinux.o: warning: objtool: __msan_get_context_state+0x4: call to __fentry__() with UACCESS enabled vmlinux.o: warning: objtool: kmsan_copy_to_user+0x4: call to __fentry__() with UACCESS enabled vmlinux.o: warning: objtool: kmsan_unpoison_memory+0x4: call to __fentry__() with UACCESS enabled vmlinux.o: warning: objtool: kmsan_unpoison_entry_regs+0x4: call to __fentry__() with UACCESS enabled vmlinux.o: warning: objtool: kmsan_report+0x4: call to __fentry__() with UACCESS enabled The Makefile contained a line to turn off ftrace for the entire directory, but this does not work. Replace it with individual lines, matching the approach in kasan. Link: https://lkml.kernel.org/r/20230215130058.3836177-3-arnd@kernel.org Signed-off-by: Arnd Bergmann Fixes: f80be4571b19 ("kmsan: add KMSAN runtime core") Acked-by: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Josh Poimboeuf Cc: Kuan-Ying Lee Cc: Marco Elver Cc: Peter Zijlstra (Intel) Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit 9701c9ff8311fed118fd09d962a90e254e761d97 Author: Arnd Bergmann Date: Wed Feb 15 14:00:56 2023 +0100 kasan: mark addr_has_metadata __always_inline Patch series "objtool warning fixes", v2. These are three of the easier fixes for objtool warnings around kasan/kmsan/kcsan. I dropped one patch since Peter had come up with a better fix, and adjusted the changelog text based on feedback. This patch (of 3): When the compiler decides not to inline this function, objtool complains about incorrect UACCESS state: mm/kasan/generic.o: warning: objtool: __asan_load2+0x11: call to addr_has_metadata() with UACCESS enabled Link: https://lore.kernel.org/all/20230208164011.2287122-1-arnd@kernel.org/ Link: https://lkml.kernel.org/r/20230215130058.3836177-2-arnd@kernel.org Signed-off-by: Arnd Bergmann Acked-by: Peter Zijlstra (Intel) Reviewed-by: Marco Elver Reviewed-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Josh Poimboeuf Cc: Kuan-Ying Lee Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit 274978f173276c5720a3cd8d0b6047d2c0d3a684 Merge: cd776a4342b32 df97f64dfa317 Author: Linus Torvalds Date: Mon Feb 20 12:44:08 2023 -0800 Merge tag 'fixes_for_v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull UDF and ext2 fixes from Jan Kara: - Rewrite of udf directory iteration code to address multiple syzbot reports - Fixes to udf extent handling and block mapping code to address several syzbot reports and filesystem corruption issues uncovered by fsx & fsstress - Convert udf to kmap_local() - Add sanity checks when loading udf bitmaps - Drop old VARCONV support which I've never seen used and which was broken for quite some years without anybody noticing - Finish conversion of ext2 to kmap_local() - One fix to mpage_writepages() on which other udf fixes depend * tag 'fixes_for_v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: (78 commits) udf: Avoid directory type conversion failure due to ENOMEM udf: Use unsigned variables for size calculations udf: remove reporting loc in debug output udf: Check consistency of Space Bitmap Descriptor udf: Fix file counting in LVID udf: Limit file size to 4TB udf: Don't return bh from udf_expand_dir_adinicb() udf: Convert udf_expand_file_adinicb() to avoid kmap_atomic() udf: Convert udf_adinicb_writepage() to memcpy_to_page() udf: Switch udf_adinicb_readpage() to kmap_local_page() udf: Move udf_adinicb_readpage() to inode.c udf: Mark aops implementation static udf: Switch to single address_space_operations udf: Add handling of in-ICB files to udf_bmap() udf: Convert all file types to use udf_write_end() udf: Convert in-ICB files to use udf_write_begin() udf: Convert in-ICB files to use udf_direct_IO() udf: Convert in-ICB files to use udf_writepages() udf: Unify .read_folio for normal and in-ICB files udf: Fix off-by-one error when discarding preallocation ... commit cd776a4342b322a9e3df59b2da949fac4db313a0 Merge: 6639c3ce7fd21 032bffd494e39 Author: Linus Torvalds Date: Mon Feb 20 12:38:27 2023 -0800 Merge tag 'fsnotify_for_v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull fsnotify updates from Jan Kara: "Support for auditing decisions regarding fanotify permission events" * tag 'fsnotify_for_v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fanotify,audit: Allow audit to use the full permission event response fanotify: define struct members to hold response decision context fanotify: Ensure consistent variable type for response commit 6639c3ce7fd217c22b26aa9f2a3cb69dc19221f8 Merge: f18f9845f2f10 51e4e3153ebc3 Author: Linus Torvalds Date: Mon Feb 20 12:33:41 2023 -0800 Merge tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux Pull fsverity updates from Eric Biggers: "Fix the longstanding implementation limitation that fsverity was only supported when the Merkle tree block size, filesystem block size, and PAGE_SIZE were all equal. Specifically, add support for Merkle tree block sizes less than PAGE_SIZE, and make ext4 support fsverity on filesystems where the filesystem block size is less than PAGE_SIZE. Effectively, this means that fsverity can now be used on systems with non-4K pages, at least on ext4. These changes have been tested using the verity group of xfstests, newly updated to cover the new code paths. Also update fs/verity/ to support verifying data from large folios. There's also a similar patch for fs/crypto/, to support decrypting data from large folios, which I'm including in here to avoid a merge conflict between the fscrypt and fsverity branches" * tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux: fscrypt: support decrypting data from large folios fsverity: support verifying data from large folios fsverity.rst: update git repo URL for fsverity-utils ext4: allow verity with fs block size < PAGE_SIZE fs/buffer.c: support fsverity in block_read_full_folio() f2fs: simplify f2fs_readpage_limit() ext4: simplify ext4_readpage_limit() fsverity: support enabling with tree block size < PAGE_SIZE fsverity: support verification with tree block size < PAGE_SIZE fsverity: replace fsverity_hash_page() with fsverity_hash_block() fsverity: use EFBIG for file too large to enable verity fsverity: store log2(digest_size) precomputed fsverity: simplify Merkle tree readahead size calculation fsverity: use unsigned long for level_start fsverity: remove debug messages and CONFIG_FS_VERITY_DEBUG fsverity: pass pos and size to ->write_merkle_tree_block fsverity: optimize fsverity_cleanup_inode() on non-verity files fsverity: optimize fsverity_prepare_setattr() on non-verity files fsverity: optimize fsverity_file_open() on non-verity files commit f18f9845f2f10d3d1fc63e4ad16ee52d2d9292fa Merge: dc483c851ff9a 097d7c1fcb8d4 Author: Linus Torvalds Date: Mon Feb 20 12:29:27 2023 -0800 Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/linux Pull fscrypt updates from Eric Biggers: "Simplify the implementation of the test_dummy_encryption mount option by adding the 'test dummy key' on-demand" * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/linux: fscrypt: clean up fscrypt_add_test_dummy_key() fs/super.c: stop calling fscrypt_destroy_keyring() from __put_super() f2fs: stop calling fscrypt_add_test_dummy_key() ext4: stop calling fscrypt_add_test_dummy_key() fscrypt: add the test dummy encryption key on-demand commit dc483c851ff9a3505069cb326221dc0242d44015 Merge: 91bc559d8d3ae 8d1b80a794526 Author: Linus Torvalds Date: Mon Feb 20 12:23:40 2023 -0800 Merge tag 'erofs-for-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs updates from Gao Xiang: "The most noticeable feature for this cycle is per-CPU kthread decompression since Android use cases need low-latency I/O handling in order to ensure the app runtime performance, currently unbounded workqueue latencies are not quite good for production on many aarch64 hardwares and thus we need to introduce a deterministic expectation for these. Decompression is CPU-intensive and it is sleepable for EROFS, so other alternatives like decompression under softirq contexts are not considered. More details are in the corresponding commit message. Others are random cleanups around the whole codebase and we will continue to clean up further in the next few months. Due to Lunar New Year holidays, some other new features were not completely reviewed and solidified as expected and we may delay them into the next version. Summary: - Add per-cpu kthreads for low-latency decompression for Android use cases - Get rid of tagged pointer helpers since they are rarely used now - Several code cleanups to reduce codebase - Documentation and MAINTAINERS updates" * tag 'erofs-for-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: (21 commits) erofs: fix an error code in z_erofs_init_zip_subsystem() erofs: unify anonymous inodes for blob erofs: relinquish volume with mutex held erofs: maintain cookies of share domain in self-contained list erofs: remove unused device mapping in meta routine MAINTAINERS: erofs: Add Documentation/ABI/testing/sysfs-fs-erofs Documentation/ABI: sysfs-fs-erofs: update supported features erofs: remove unused EROFS_GET_BLOCKS_RAW flag erofs: update print symbols for various flags in trace erofs: make kobj_type structures constant erofs: add per-cpu threads for decompression as an option erofs: tidy up internal.h erofs: get rid of z_erofs_do_map_blocks() forward declaration erofs: move zdata.h into zdata.c erofs: remove tagged pointer helpers erofs: avoid tagged pointers to mark sync decompression erofs: get rid of erofs_inode_datablocks() erofs: simplify iloc() erofs: get rid of debug_one_dentry() erofs: remove linux/buffer_head.h dependency ... commit 91bc559d8d3aed488b4b50e9eba1d7ebb1da7bbf Merge: ea5aac6fae94b 4e1da8fe03130 Author: Linus Torvalds Date: Mon Feb 20 12:14:33 2023 -0800 Merge tag 'fs.acl.v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping Pull vfs acl update from Christian Brauner: "This contains a single update to the internal get acl method and replaces an open-coded cmpxchg() comparison with with try_cmpxchg(). It's clearer and also beneficial on some architectures" * tag 'fs.acl.v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping: posix_acl: Use try_cmpxchg in get_acl commit ea5aac6fae94bff4756051b0503f86e31ef6808b Merge: 05e6295f7b5e0 47d586913f2ab Author: Linus Torvalds Date: Mon Feb 20 12:03:55 2023 -0800 Merge tag 'fs.v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping Pull vfs hardening update from Christian Brauner: "Jan pointed out that during shutdown both filp_close() and super block destruction will use basic printk logging when bugs are detected. This causes issues in a few scenarios: - Tools like syzkaller cannot figure out that the logged message indicates a bug. - Users that explicitly opt in to have the kernel bug on data corruption by selecting CONFIG_BUG_ON_DATA_CORRUPTION should see the kernel crash when they did actually select that option. - When there are busy inodes after the superblock is shut down later access to such a busy inodes walks through freed memory. It would be better to cleanly crash instead. All of this can be addressed by using the already existing CHECK_DATA_CORRUPTION() macro in these places when kernel bugs are detected. Its logging improvement is useful for all users. Otherwise this only has a meaningful behavioral effect when users do select CONFIG_BUG_ON_DATA_CORRUPTION which means this is backward compatible for regular users" * tag 'fs.v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping: fs: Use CHECK_DATA_CORRUPTION() when kernel bugs are detected commit 05e6295f7b5e05f09e369a3eb2882ec5b40fff20 Merge: de630176bdf88 7a80e5b8c6fa7 Author: Linus Torvalds Date: Mon Feb 20 11:53:11 2023 -0800 Merge tag 'fs.idmapped.v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping Pull vfs idmapping updates from Christian Brauner: - Last cycle we introduced the dedicated struct mnt_idmap type for mount idmapping and the required infrastucture in 256c8aed2b42 ("fs: introduce dedicated idmap type for mounts"). As promised in last cycle's pull request message this converts everything to rely on struct mnt_idmap. Currently we still pass around the plain namespace that was attached to a mount. This is in general pretty convenient but it makes it easy to conflate namespaces that are relevant on the filesystem with namespaces that are relevant on the mount level. Especially for non-vfs developers without detailed knowledge in this area this was a potential source for bugs. This finishes the conversion. Instead of passing the plain namespace around this updates all places that currently take a pointer to a mnt_userns with a pointer to struct mnt_idmap. Now that the conversion is done all helpers down to the really low-level helpers only accept a struct mnt_idmap argument instead of two namespace arguments. Conflating mount and other idmappings will now cause the compiler to complain loudly thus eliminating the possibility of any bugs. This makes it impossible for filesystem developers to mix up mount and filesystem idmappings as they are two distinct types and require distinct helpers that cannot be used interchangeably. Everything associated with struct mnt_idmap is moved into a single separate file. With that change no code can poke around in struct mnt_idmap. It can only be interacted with through dedicated helpers. That means all filesystems are and all of the vfs is completely oblivious to the actual implementation of idmappings. We are now also able to extend struct mnt_idmap as we see fit. For example, we can decouple it completely from namespaces for users that don't require or don't want to use them at all. We can also extend the concept of idmappings so we can cover filesystem specific requirements. In combination with the vfs{g,u}id_t work we finished in v6.2 this makes this feature substantially more robust and thus difficult to implement wrong by a given filesystem and also protects the vfs. - Enable idmapped mounts for tmpfs and fulfill a longstanding request. A long-standing request from users had been to make it possible to create idmapped mounts for tmpfs. For example, to share the host's tmpfs mount between multiple sandboxes. This is a prerequisite for some advanced Kubernetes cases. Systemd also has a range of use-cases to increase service isolation. And there are more users of this. However, with all of the other work going on this was way down on the priority list but luckily someone other than ourselves picked this up. As usual the patch is tiny as all the infrastructure work had been done multiple kernel releases ago. In addition to all the tests that we already have I requested that Rodrigo add a dedicated tmpfs testsuite for idmapped mounts to xfstests. It is to be included into xfstests during the v6.3 development cycle. This should add a slew of additional tests. * tag 'fs.idmapped.v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping: (26 commits) shmem: support idmapped mounts for tmpfs fs: move mnt_idmap fs: port vfs{g,u}id helpers to mnt_idmap fs: port fs{g,u}id helpers to mnt_idmap fs: port i_{g,u}id_into_vfs{g,u}id() to mnt_idmap fs: port i_{g,u}id_{needs_}update() to mnt_idmap quota: port to mnt_idmap fs: port privilege checking helpers to mnt_idmap fs: port inode_owner_or_capable() to mnt_idmap fs: port inode_init_owner() to mnt_idmap fs: port acl to mnt_idmap fs: port xattr to mnt_idmap fs: port ->permission() to pass mnt_idmap fs: port ->fileattr_set() to pass mnt_idmap fs: port ->set_acl() to pass mnt_idmap fs: port ->get_acl() to pass mnt_idmap fs: port ->tmpfile() to pass mnt_idmap fs: port ->rename() to pass mnt_idmap fs: port ->mknod() to pass mnt_idmap fs: port ->mkdir() to pass mnt_idmap ... commit 01bb11ad828b320749764fa93ad078db20d08a9e Author: Yury Norov Date: Thu Feb 16 17:39:08 2023 -0800 sched/topology: fix KASAN warning in hop_cmp() Despite that prev_hop is used conditionally on cur_hop is not the first hop, it's initialized unconditionally. Because initialization implies dereferencing, it might happen that the code dereferences uninitialized memory, which has been spotted by KASAN. Fix it by reorganizing hop_cmp() logic. Reported-by: Bruno Goncalves Fixes: cd7f55359c90 ("sched: add sched_numa_find_nth_cpu()") Signed-off-by: Yury Norov Link: https://lore.kernel.org/r/Y+7avK6V9SyAWsXi@yury-laptop/ Signed-off-by: Jakub Kicinski commit de630176bdf885eed442902afe94eb60d8f5f826 Merge: 575a7e0f812a4 58a033c9a3e00 Author: Linus Torvalds Date: Mon Feb 20 11:21:02 2023 -0800 Merge tag 'iversion-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux Pull i_version updates from Jeff Layton: "This overhauls how we handle i_version queries from nfsd. Instead of having special routines and grabbing the i_version field directly out of the inode in some cases, we've moved most of the handling into the various filesystems' getattr operations. As a bonus, this makes ceph's change attribute usable by knfsd as well. This should pave the way for future work to make this value queryable by userland, and to make it more resilient against rolling back on a crash" * tag 'iversion-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: nfsd: remove fetch_iversion export operation nfsd: use the getattr operation to fetch i_version nfsd: move nfsd4_change_attribute to nfsfh.c ceph: report the inode version in getattr if requested nfs: report the inode version in getattr if requested vfs: plumb i_version handling into struct kstat fs: clarify when the i_version counter must be updated fs: uninline inode_query_iversion commit 575a7e0f812a4968ad1e0c00026692ede040e13f Merge: 219ac97a486c1 c65454a947263 Author: Linus Torvalds Date: Mon Feb 20 11:10:38 2023 -0800 Merge tag 'locks-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux Pull file locking updates from Jeff Layton: "The main change here is that I've broken out most of the file locking definitions into a new header file. I also went ahead and completed the removal of locks_inode function" * tag 'locks-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: fs: remove locks_inode filelock: move file locking definitions to separate header file commit 219ac97a486c1ad9c110cb96ebdad7ba068236fb Merge: 69adb0bcb8339 85b93bbd1c976 Author: Linus Torvalds Date: Mon Feb 20 11:02:05 2023 -0800 Merge tag 'tpm-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd Pull tpm updates from Jarkko Sakkinen: "In additon to bug fixes, these are noteworthy changes: - In TPM I2C drivers, migrate from probe() to probe_new() (a new driver model in I2C). - TPM CRB: Pluton support - Add duplicate hash detection to the blacklist keyring in order to give more meaningful klog output than e.g. [1]" Link: https://askubuntu.com/questions/1436856/ubuntu-22-10-blacklist-problem-blacklisting-hash-13-message-on-boot [1] * tag 'tpm-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: tpm: add vendor flag to command code validation tpm: Add reserved memory event log tpm: Use managed allocation for bios event log tpm: tis_i2c: Convert to i2c's .probe_new() tpm: tpm_i2c_nuvoton: Convert to i2c's .probe_new() tpm: tpm_i2c_infineon: Convert to i2c's .probe_new() tpm: tpm_i2c_atmel: Convert to i2c's .probe_new() tpm: st33zp24: Convert to i2c's .probe_new() KEYS: asymmetric: Fix ECDSA use via keyctl uapi certs: don't try to update blacklist keys KEYS: Add new function key_create() certs: make blacklisted hash available in klog tpm_crb: Add support for CRB devices based on Pluton crypto: certs: fix FIPS selftest dependency commit 69adb0bcb833963050d82e645b6a1a0747662490 Merge: d644c670ef241 7ea01d3169a28 Author: Linus Torvalds Date: Mon Feb 20 10:40:42 2023 -0800 Merge tag 'rust-6.3' of https://github.com/Rust-for-Linux/linux Pull Rust updates from Miguel Ojeda: "More core additions, getting closer to a point where the first Rust modules can be upstreamed. The major ones being: - Sync: new types 'Arc', 'ArcBorrow' and 'UniqueArc'. - Types: new trait 'ForeignOwnable' and new type 'ScopeGuard'. There is also a substantial removal in terms of lines: - 'alloc' crate: remove the 'borrow' module (type 'Cow' and trait 'ToOwned')" * tag 'rust-6.3' of https://github.com/Rust-for-Linux/linux: rust: delete rust-project.json when running make clean rust: MAINTAINERS: Add the zulip link rust: types: implement `ForeignOwnable` for `Arc` rust: types: implement `ForeignOwnable` for the unit type rust: types: implement `ForeignOwnable` for `Box` rust: types: introduce `ForeignOwnable` rust: types: introduce `ScopeGuard` rust: prelude: prevent doc inline of external imports rust: sync: add support for dispatching on Arc and ArcBorrow. rust: sync: introduce `UniqueArc` rust: sync: allow type of `self` to be `ArcBorrow` rust: sync: introduce `ArcBorrow` rust: sync: allow coercion from `Arc` to `Arc` rust: sync: allow type of `self` to be `Arc` or variants rust: sync: add `Arc` for ref-counted allocations rust: compiler_builtins: make stubs non-global rust: alloc: remove the `borrow` module (`ToOwned`, `Cow`) commit d54170812ef1c80e0fa3ed3e554a0bbfc2920d9d Author: Mark Rutland Date: Mon Feb 20 16:23:17 2023 +0000 arm64: fix .idmap.text assertion for large kernels When building a kernel with many debug options enabled (which happens in test configurations use by myself and syzbot), the kernel can become large enough that portions of .text can be more than 128M away from .idmap.text (which is placed inside the .rodata section). Where idmap code branches into .text, the linker will place veneers in the .idmap.text section to make those branches possible. Unfortunately, as Ard reports, GNU LD has bseen observed to add 4K of padding when adding such veneers, e.g. | .idmap.text 0xffffffc01e48e5c0 0x32c arch/arm64/mm/proc.o | 0xffffffc01e48e5c0 idmap_cpu_replace_ttbr1 | 0xffffffc01e48e600 idmap_kpti_install_ng_mappings | 0xffffffc01e48e800 __cpu_setup | *fill* 0xffffffc01e48e8ec 0x4 | .idmap.text.stub | 0xffffffc01e48e8f0 0x18 linker stubs | 0xffffffc01e48f8f0 __idmap_text_end = . | 0xffffffc01e48f000 . = ALIGN (0x1000) | *fill* 0xffffffc01e48f8f0 0x710 | 0xffffffc01e490000 idmap_pg_dir = . This makes the __idmap_text_start .. __idmap_text_end region bigger than the 4K we require it to fit within, and triggers an assertion in arm64's vmlinux.lds.S, which breaks the build: | LD .tmp_vmlinux.kallsyms1 | aarch64-linux-gnu-ld: ID map text too big or misaligned | make[1]: *** [scripts/Makefile.vmlinux:35: vmlinux] Error 1 | make: *** [Makefile:1264: vmlinux] Error 2 Avoid this by using an `ADRP+ADD+BLR` sequence for branches out of .idmap.text, which avoids the need for veneers. These branches are only executed once per boot, and only when the MMU is on, so there should be no noticeable performance penalty in replacing `BL` with `ADRP+ADD+BLR`. At the same time, remove the "x" and "w" attributes when placing code in .idmap.text, as these are not necessary, and this will prevent the linker from assuming that it is safe to place PLTs into .idmap.text, causing it to warn if and when there are out-of-range branches within .idmap.text, e.g. | LD .tmp_vmlinux.kallsyms1 | arch/arm64/kernel/head.o: in function `primary_entry': | (.idmap.text+0x1c): relocation truncated to fit: R_AARCH64_CALL26 against symbol `dcache_clean_poc' defined in .text section in arch/arm64/mm/cache.o | arch/arm64/kernel/head.o: in function `init_el2': | (.idmap.text+0x88): relocation truncated to fit: R_AARCH64_CALL26 against symbol `dcache_clean_poc' defined in .text section in arch/arm64/mm/cache.o | make[1]: *** [scripts/Makefile.vmlinux:34: vmlinux] Error 1 | make: *** [Makefile:1252: vmlinux] Error 2 Thus, if future changes add out-of-range branches in .idmap.text, it should be easy enough to identify those from the resulting linker errors. Reported-by: syzbot+f8ac312e31226e23302b@syzkaller.appspotmail.com Link: https://lore.kernel.org/linux-arm-kernel/00000000000028ea4105f4e2ef54@google.com/ Signed-off-by: Mark Rutland Cc: Ard Biesheuvel Cc: Will Deacon Tested-by: Ard Biesheuvel Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20230220162317.1581208-1-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit b361d5d2464a88184f6e17a6462719ba79180b1a Author: Janne Grunau Date: Sun Feb 12 16:41:24 2023 +0100 ASoC: dt-bindings: apple,mca: Add t8112-mca compatible The block found on Apple's M2 SoC is compatible with the existing driver so add its per-SoC compatible. Signed-off-by: Janne Grunau Acked-by: Krzysztof Kozlowski Acked-by: Martin Povišer Link: https://lore.kernel.org/r/20230202-asahi-t8112-dt-v1-14-cb5442d1c229@jannau.net Signed-off-by: Mark Brown commit 3e161c2791f8e661eed24a2c624087084d910215 Author: Zhang Xiaoxu Date: Fri Nov 18 16:42:08 2022 +0800 cifs: Fix warning and UAF when destroy the MR list If the MR allocate failed, the MR recovery work not initialized and list not cleared. Then will be warning and UAF when release the MR: WARNING: CPU: 4 PID: 824 at kernel/workqueue.c:3066 __flush_work.isra.0+0xf7/0x110 CPU: 4 PID: 824 Comm: mount.cifs Not tainted 6.1.0-rc5+ #82 RIP: 0010:__flush_work.isra.0+0xf7/0x110 Call Trace: __cancel_work_timer+0x2ba/0x2e0 smbd_destroy+0x4e1/0x990 _smbd_get_connection+0x1cbd/0x2110 smbd_get_connection+0x21/0x40 cifs_get_tcp_session+0x8ef/0xda0 mount_get_conns+0x60/0x750 cifs_mount+0x103/0xd00 cifs_smb3_do_mount+0x1dd/0xcb0 smb3_get_tree+0x1d5/0x300 vfs_get_tree+0x41/0xf0 path_mount+0x9b3/0xdd0 __x64_sys_mount+0x190/0x1d0 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 BUG: KASAN: use-after-free in smbd_destroy+0x4fc/0x990 Read of size 8 at addr ffff88810b156a08 by task mount.cifs/824 CPU: 4 PID: 824 Comm: mount.cifs Tainted: G W 6.1.0-rc5+ #82 Call Trace: dump_stack_lvl+0x34/0x44 print_report+0x171/0x472 kasan_report+0xad/0x130 smbd_destroy+0x4fc/0x990 _smbd_get_connection+0x1cbd/0x2110 smbd_get_connection+0x21/0x40 cifs_get_tcp_session+0x8ef/0xda0 mount_get_conns+0x60/0x750 cifs_mount+0x103/0xd00 cifs_smb3_do_mount+0x1dd/0xcb0 smb3_get_tree+0x1d5/0x300 vfs_get_tree+0x41/0xf0 path_mount+0x9b3/0xdd0 __x64_sys_mount+0x190/0x1d0 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Allocated by task 824: kasan_save_stack+0x1e/0x40 kasan_set_track+0x21/0x30 __kasan_kmalloc+0x7a/0x90 _smbd_get_connection+0x1b6f/0x2110 smbd_get_connection+0x21/0x40 cifs_get_tcp_session+0x8ef/0xda0 mount_get_conns+0x60/0x750 cifs_mount+0x103/0xd00 cifs_smb3_do_mount+0x1dd/0xcb0 smb3_get_tree+0x1d5/0x300 vfs_get_tree+0x41/0xf0 path_mount+0x9b3/0xdd0 __x64_sys_mount+0x190/0x1d0 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Freed by task 824: kasan_save_stack+0x1e/0x40 kasan_set_track+0x21/0x30 kasan_save_free_info+0x2a/0x40 ____kasan_slab_free+0x143/0x1b0 __kmem_cache_free+0xc8/0x330 _smbd_get_connection+0x1c6a/0x2110 smbd_get_connection+0x21/0x40 cifs_get_tcp_session+0x8ef/0xda0 mount_get_conns+0x60/0x750 cifs_mount+0x103/0xd00 cifs_smb3_do_mount+0x1dd/0xcb0 smb3_get_tree+0x1d5/0x300 vfs_get_tree+0x41/0xf0 path_mount+0x9b3/0xdd0 __x64_sys_mount+0x190/0x1d0 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Let's initialize the MR recovery work before MR allocate to prevent the warning, remove the MRs from the list to prevent the UAF. Fixes: c7398583340a ("CIFS: SMBD: Implement RDMA memory registration") Acked-by: Paulo Alcantara (SUSE) Reviewed-by: Tom Talpey Signed-off-by: Zhang Xiaoxu Signed-off-by: Steve French commit e9d3401d95d62a9531082cd2453ed42f2740e3fd Author: Zhang Xiaoxu Date: Fri Nov 18 16:42:07 2022 +0800 cifs: Fix lost destroy smbd connection when MR allocate failed If the MR allocate failed, the smb direct connection info is NULL, then smbd_destroy() will directly return, then the connection info will be leaked. Let's set the smb direct connection info to the server before call smbd_destroy(). Fixes: c7398583340a ("CIFS: SMBD: Implement RDMA memory registration") Signed-off-by: Zhang Xiaoxu Acked-by: Paulo Alcantara (SUSE) Reviewed-by: David Howells Reviewed-by: Tom Talpey Signed-off-by: Steve French commit 8e843bf38f7be0766642a91523cfa65f2b021a8a Author: Ronnie Sahlberg Date: Fri Feb 17 13:35:01 2023 +1000 cifs: return a single-use cfid if we did not get a lease If we did not get a lease we can still return a single use cfid to the caller. The cfid will not have has_lease set and will thus not be shared with any other concurrent users and will be freed immediately when the caller drops the handle. This avoids extra roundtrips for servers that do not support directory leases where they would first fail to get a cfid with a lease and then fallback to try a normal SMB2_open() Signed-off-by: Ronnie Sahlberg Cc: stable@vger.kernel.org Reviewed-by: Bharath SM Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 66d45ca1350a3bb8d5f4db8879ccad3ed492337a Author: Ronnie Sahlberg Date: Fri Feb 17 13:35:00 2023 +1000 cifs: Check the lease context if we actually got a lease Some servers may return that we got a lease in rsp->OplockLevel but then in the lease context contradict this and say we got no lease at all. Thus we need to check the context if we have a lease. Additionally, If we do not get a lease we need to make sure we close the handle before we return an error to the caller. Signed-off-by: Ronnie Sahlberg Cc: stable@vger.kernel.org Reviewed-by: Bharath SM Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 35235e19b393b54db0e0d7c424d658ba45f20468 Author: Kees Cook Date: Tue Feb 14 16:09:45 2023 -0800 cifs: Replace remaining 1-element arrays The kernel is globally removing the ambiguous 0-length and 1-element arrays in favor of flexible arrays, so that we can gain both compile-time and run-time array bounds checking[1]. Replace the trailing 1-element array with a flexible array in the following structures: struct cifs_spnego_msg struct cifs_quota_data struct get_dfs_referral_rsp struct file_alt_name_info NEGOTIATE_RSP SESSION_SETUP_ANDX TCONX_REQ TCONX_RSP TCONX_RSP_EXT ECHO_REQ ECHO_RSP OPEN_REQ OPENX_REQ LOCK_REQ RENAME_REQ COPY_REQ COPY_RSP NT_RENAME_REQ DELETE_FILE_REQ DELETE_DIRECTORY_REQ CREATE_DIRECTORY_REQ QUERY_INFORMATION_REQ SETATTR_REQ TRANSACT_IOCTL_REQ TRANSACT_CHANGE_NOTIFY_REQ TRANSACTION2_QPI_REQ TRANSACTION2_SPI_REQ TRANSACTION2_FFIRST_REQ TRANSACTION2_GET_DFS_REFER_REQ FILE_UNIX_LINK_INFO FILE_DIRECTORY_INFO FILE_FULL_DIRECTORY_INFO SEARCH_ID_FULL_DIR_INFO FILE_BOTH_DIRECTORY_INFO FIND_FILE_STANDARD_INFO Replace the trailing 1-element array with a flexible array, but leave the existing structure padding: FILE_ALL_INFO FILE_UNIX_INFO Remove unused structures: struct gea struct gealist Adjust all related size calculations to match the changes to sizeof(). No machine code output differences are produced after these changes. [1] For lots of details, see both: https://docs.kernel.org/process/deprecated.html#zero-length-and-one-element-arrays https://people.kernel.org/kees/bounded-flexible-arrays-in-c Cc: Steve French Cc: Paulo Alcantara Cc: Ronnie Sahlberg Cc: Shyam Prasad N Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Kees Cook Signed-off-by: Steve French commit 398d5843c03261a2b68730f2f00643826bcec6ba Author: Kees Cook Date: Tue Feb 14 16:08:39 2023 -0800 cifs: Convert struct fealist away from 1-element array The kernel is globally removing the ambiguous 0-length and 1-element arrays in favor of flexible arrays, so that we can gain both compile-time and run-time array bounds checking[1]. While struct fealist is defined as a "fake" flexible array (via a 1-element array), it is only used for examination of the first array element. Walking the list is performed separately, so there is no reason to treat the "list" member of struct fealist as anything other than a single entry. Adjust the struct and code to match. Additionally, struct fea uses the "name" member either as a dynamic string, or is manually calculated from the start of the struct. Redefine the member as a flexible array. No machine code output differences are produced after these changes. [1] For lots of details, see both: https://docs.kernel.org/process/deprecated.html#zero-length-and-one-element-arrays https://people.kernel.org/kees/bounded-flexible-arrays-in-c Cc: Steve French Cc: Paulo Alcantara Cc: Ronnie Sahlberg Cc: Shyam Prasad N Cc: Tom Talpey Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Kees Cook Signed-off-by: Steve French commit d99e86ebde2d7b3a04190f8d14de5bf6814bf10f Author: Paulo Alcantara Date: Thu Feb 16 15:33:22 2023 -0300 cifs: fix mount on old smb servers The client was sending rfc1002 session request packet with a wrong length field set, therefore failing to mount shares against old SMB servers over port 139. Fix this by calculating the correct length as specified in rfc1002. Fixes: d7173623bf0b ("cifs: use ALIGN() and round_up() macros") Cc: stable@vger.kernel.org Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French commit de036dcaca65cf94bf7ff09c571c077f02bc92b4 Author: Volker Lendecke Date: Wed Jan 11 12:37:58 2023 +0100 cifs: Fix uninitialized memory reads for oparms.mode Use a struct assignment with implicit member initialization Signed-off-by: Volker Lendecke Cc: stable@vger.kernel.org Signed-off-by: Steve French commit 5574920c7a6b0ce7f3d0888ccf1efb9b7870b928 Author: Namjae Jeon Date: Wed Feb 8 18:34:37 2023 +0900 cifs: remove unneeded 2bytes of padding from smb2 tree connect Due to the 2bytes of padding from the smb2 tree connect request, there is an unneeded difference between the rfc1002 length and the actual frame length. In the case of windows client, it is sent by matching it exactly. Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 225a05043cd87a37455bfbff8c35d4e276519387 Author: Matthew Wilcox (Oracle) Date: Wed Feb 8 14:56:11 2023 +0000 filemap: Remove lock_page_killable() There are no more callers; remove this function before any more appear. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Howells Signed-off-by: Steve French commit c191bc070eba9cbbd166322cad293dd09c48c78e Author: Matthew Wilcox (Oracle) Date: Wed Feb 8 14:56:10 2023 +0000 cifs: Use a folio in cifs_page_mkwrite() Avoids many calls to compound_head() and removes calls to various compat functions. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Howells Signed-off-by: Steve French commit d447e794a37288ec7a080aa1b044a8d9deebbab7 Author: Volker Lendecke Date: Wed Jan 11 12:37:58 2023 +0100 cifs: Fix uninitialized memory read in smb3_qfs_tcon() oparms was not fully initialized Signed-off-by: Volker Lendecke Reviewed-by: Paulo Alcantara (SUSE) Cc: stable@vger.kernel.org Signed-off-by: Steve French commit 3891f6c7655a39065e44980f51ba46bb32be3133 Author: Stefan Metzmacher Date: Wed Feb 1 16:21:41 2023 +0100 cifs: don't try to use rdma offload on encrypted connections The aim of using encryption on a connection is to keep the data confidential, so we must not use plaintext rdma offload for that data! It seems that current windows servers and ksmbd would allow this, but that's no reason to expose the users data in plaintext! And servers hopefully reject this in future. Note modern windows servers support signed or encrypted offload, see MS-SMB2 2.2.3.1.6 SMB2_RDMA_TRANSFORM_CAPABILITIES, but we don't support that yet. Signed-off-by: Stefan Metzmacher Cc: Steve French Cc: Tom Talpey Cc: Long Li Cc: Namjae Jeon Cc: David Howells Cc: linux-cifs@vger.kernel.org Cc: stable@vger.kernel.org Signed-off-by: Steve French commit a6559cc1d35d3eeafb0296aca347b2f745a28a74 Author: Stefan Metzmacher Date: Wed Feb 1 16:21:40 2023 +0100 cifs: split out smb3_use_rdma_offload() helper We should have the logic to decide if we want rdma offload in a single spot in order to advance it in future. Signed-off-by: Stefan Metzmacher Cc: Steve French Cc: Tom Talpey Cc: Long Li Cc: Namjae Jeon Cc: David Howells Cc: linux-cifs@vger.kernel.org Cc: stable@vger.kernel.org Signed-off-by: Steve French commit d643a8a446fc46c06837d08a056f69da2ff16025 Author: Stefan Metzmacher Date: Wed Feb 1 16:21:39 2023 +0100 cifs: introduce cifs_io_parms in smb2_async_writev() This will simplify the following changes and makes it easy to get in passed in from the caller in future. Signed-off-by: Stefan Metzmacher Cc: Steve French Cc: Tom Talpey Cc: Long Li Cc: Namjae Jeon Cc: David Howells Cc: linux-cifs@vger.kernel.org Cc: stable@vger.kernel.org Signed-off-by: Steve French commit 89542781737a783d94ace958548caa0651bfbc5e Author: Paulo Alcantara Date: Tue Jan 31 13:22:07 2023 -0300 cifs: get rid of unneeded conditional in cifs_get_num_sgs() Just have @skip set to 0 after first iterations of the two nested loops. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: David Howells Signed-off-by: Steve French commit 3c0070f54b3128de498c2dd9934a21f0dd867111 Author: Paulo Alcantara Date: Mon Jan 30 20:33:29 2023 -0300 cifs: prevent data race in smb2_reconnect() Make sure to get an up-to-date TCP_Server_Info::nr_targets value prior to waiting the server to be reconnected in smb2_reconnect(). It is set in cifs_tcp_ses_needs_reconnect() and protected by TCP_Server_Info::srv_lock. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 77e3f338df79b4584ec4a518e43db38455a6dfb3 Author: Steve French Date: Mon Jan 30 19:32:52 2023 -0600 cifs: fix indentation in make menuconfig options The options that are displayed for the smb3.1.1/cifs client in "make menuconfig" are confusing because some of them are not indented making them not appear to be related to cifs.ko Fix that by adding an if/endif (similar to what ceph and 9pm did) if fs/cifs/Kconfig Suggested-by: David Howells Signed-off-by: Steve French commit ed2f1d9cea0b3b6aef0f3eabf8072f9277de6831 Author: Steve French Date: Mon Jan 30 18:57:06 2023 -0600 cifs: update Kconfig description There were various outdated or missing things in fs/cifs/Kconfig e.g. mention of support for insecure NTLM which has been removed, and lack of mention of some important features. This also shortens it slightly, and fixes some confusing text (e.g. the SMB1 POSIX extensions option). Reviewed-by: Namjae Jeon Acked-by: Paulo Alcantara (SUSE) Acked-by: Ronnie Sahlberg Signed-off-by: Steve French commit d4fba63fe1f78dba749cf7aa04c1dff4b8666eb1 Author: Andy Shevchenko Date: Fri Jan 20 14:08:57 2023 +0200 cifs: Get rid of unneeded conditional in the smb2_get_aead_req() In the smb2_get_aead_req() the skip variable is used only for the very first iteration of the two nested loops, which means it's basically in invariant to those loops. Hence, instead of using conditional on each iteration, unconditionally assign the 'skip' variable before the loops and at the end of the inner loop. Signed-off-by: Andy Shevchenko Reviewed-by: Paulo Alcantara (SUSE) Reviewed-by: David Howells Signed-off-by: Steve French commit 05844bd661d9fd478df1175b6639bf2d9398becb Author: Shyam Prasad N Date: Fri Dec 23 10:41:25 2022 +0000 cifs: print last update time for interface list We store the last updated time for interface list while parsing the interfaces. This change is to just print that info in DebugData. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit 4e551dbdba7015b67f1e7db25a10954d5dc2d123 Author: Gustavo A. R. Silva Date: Mon Jan 9 19:39:00 2023 -0600 cifs: Replace zero-length arrays with flexible-array members Zero-length arrays are deprecated[1] and we are moving towards adopting C99 flexible-array members instead. So, replace zero-length arrays in a couple of structures with flex-array members. 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 [2]. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays [1] Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [2] Link: https://github.com/KSPP/linux/issues/78 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Reviewed-by: Paulo Alcantara Signed-off-by: Steve French commit 9f5d1a8cf8a137c4be180560b796e73b2707e337 Author: Christophe JAILLET Date: Sat Jan 14 09:58:15 2023 +0100 cifs: Use kstrtobool() instead of strtobool() strtobool() is the same as kstrtobool(). However, the latter is more used within the kernel. In order to remove strtobool() and slightly simplify kstrtox.h, switch to the other function name. While at it, include the corresponding header file () Signed-off-by: Christophe JAILLET Reviewed-by: Paulo Alcantara Signed-off-by: Steve French commit d644c670ef24189a93945528720ed545d77dc514 Merge: c9c3395d5e3dc 816477edfba6e Author: Linus Torvalds Date: Mon Feb 20 09:27:39 2023 -0800 Merge tag 'remove-get_kernel_pages-for-6.3' of https://git.linaro.org/people/jens.wiklander/linux-tee Pull TEE update from Jens Wiklander: "Remove get_kernel_pages() Vmalloc page support is removed from shm_get_kernel_pages() and the get_kernel_pages() call is replaced by calls to get_page(). With no remaining callers of get_kernel_pages() the function is removed" [ This looks like it's just some random 'tee' cleanup, but the bigger picture impetus for this is really to to to remove historical confusion with mixed use of kernel virtual addresses and 'struct page' pointers. Kernel virtual pointers in the vmalloc space is then particularly confusing - both for looking up a page pointer (when trying to then unify a "virtual address or page" interface) and _particularly_ when mixed with HIGHMEM support and the kmap*() family of remapping. This is particularly true with HIGHMEM getting much less test coverage with 32-bit architectures being increasingly legacy targets. So we actively wanted to remove get_kernel_pages() to make sure nobody else used it too, and thus the 'tee' part is "finally remove last user". See also commit 6647e76ab623 ("v4l2: don't fall back to follow_pfn() if pin_user_pages_fast() fails") for a totally different version of a conceptually similar "let's stop this confusion of different ways of referring to memory". - Linus ] * tag 'remove-get_kernel_pages-for-6.3' of https://git.linaro.org/people/jens.wiklander/linux-tee: mm: Remove get_kernel_pages() tee: Remove call to get_kernel_pages() tee: Remove vmalloc page support highmem: Enhance is_kmap_addr() to check kmap_local_page() mappings commit d695e44157c8da8d298295d1905428fb2495bc8b Author: XU pengfei Date: Fri Feb 17 09:14:21 2023 +0800 dm: remove unnecessary (void*) conversion in event_callback() Pointer variables of void * type do not require type cast. Signed-off-by: XU pengfei Signed-off-by: Mike Snitzer commit 7dc8e24f0e09834341f84d37433840b353d64bc8 Author: Masami Hiramatsu (Google) Date: Fri Jan 20 18:16:16 2023 +0900 ktest: Restore stty setting at first in dodie The do_send_email() will call die before restoring stty if sendmail setting is not correct or sendmail is not installed. It is safer to restore it in the beginning of dodie(). Link: https://lkml.kernel.org/r/167420617635.2988775.13045295332829029437.stgit@devnote3 Cc: John 'Warthog9' Hawley Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt commit 4e7d2a8f0b52abf23b1dc13b3d88bc0923383cd5 Author: Steven Rostedt Date: Wed Jan 18 16:37:25 2023 -0500 ktest.pl: Add RUN_TIMEOUT option with default unlimited There is a disconnect between the run_command function and the wait_for_input. The wait_for_input has a default timeout of 2 minutes. But if that happens, the run_command loop will exit out to the waitpid() of the executing command. This fails in that it no longer monitors the command, and also, the ssh to the test box can hang when its finished, as it's waiting for the pipe it's writing to to flush, but the loop that reads that pipe has already exited, leaving the command stuck, and the test hangs. Instead, make the default "wait_for_input" of the run_command infinite, and allow the user to override it if they want with a default timeout option "RUN_TIMEOUT". But this fixes the hang that happens when the pipe is full and the ssh session never exits. Cc: stable@vger.kernel.org Fixes: 6e98d1b4415fe ("ktest: Add timeout to ssh command") Signed-off-by: Steven Rostedt commit 83d29d439cd3ef23041570d55841f814af2ecac0 Author: Steven Rostedt Date: Wed Jan 18 16:32:13 2023 -0500 ktest.pl: Give back console on Ctrt^C on monitor When monitoring the console output, the stdout is being redirected to do so. If Ctrl^C is hit during this mode, the stdout is not back to the console, the user does not see anything they type (no echo). Add "end_monitor" to the SIGINT interrupt handler to give back the console on Ctrl^C. Cc: stable@vger.kernel.org Fixes: 9f2cdcbbb90e7 ("ktest: Give console process a dedicated tty") Signed-off-by: Steven Rostedt commit e8bf9b98d40dbdf4e39362e3b85a70c61da68cb7 Author: Steven Rostedt Date: Wed Jan 18 11:31:25 2023 -0500 ktest.pl: Fix missing "end_monitor" when machine check fails In the "reboot" command, it does a check of the machine to see if it is still alive with a simple "ssh echo" command. If it fails, it will assume that a normal "ssh reboot" is not possible and force a power cycle. In this case, the "start_monitor" is executed, but the "end_monitor" is not, and this causes the screen will not be given back to the console. That is, after the test, a "reset" command needs to be performed, as "echo" is turned off. Cc: stable@vger.kernel.org Fixes: 6474ace999edd ("ktest.pl: Powercycle the box on reboot if no connection can be made") Signed-off-by: Steven Rostedt commit d0566564d483e6576868224286632fd95aafd4ac Author: Axel Lin Date: Mon Feb 20 18:56:14 2023 +0800 regulator: max597x: Fix error return code in max597x_get_status REGULATOR_FAILED_RETRY should not be used in max597x_get_status error path. Othewise, the regulator core will treat it as REGULATOR_STATUS_ON. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20230220105614.356187-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 7e43b75d6a062197b3bf39ddd1b10ce2e2d2a9b0 Author: Dharageswari.R Date: Mon Feb 20 10:06:52 2023 +0200 ASoC: Intel: sof_rt5682: Add quirk for Rex board with mx98360a amplifier Add mtl_mx98360a_rt5682 driver data for Chrome Rex board support. Signed-off-by: Dharageswari.R Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230220080652.23136-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 70d1d30355095a22c8aa98dba9ca12486deff020 Author: Trevor Wu Date: Wed Feb 15 20:50:16 2023 +0800 ASoC: mediatek: mt8188: correct etdm control return value In mt8188_etdm_clk_src_sel_put() function, val retrieved by FIELD_PREP is shifted to the corresponding bit filed, so it can compare with the register value directly. Originally, the redundant bit shift of the register value results in the wrong comparison result, so we remove bit shift operation in the patch. Fixes: 2babb4777489 ("ASoC: mediatek: mt8188: support etdm in platform driver") Signed-off-by: Trevor Wu Link: https://lore.kernel.org/r/20230215125017.16044-1-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit 51c58a1ebc047acc4ac2a61a5f215c7a638a685b Author: Kiseok Jo Date: Fri Feb 17 00:44:03 2023 +0000 ASoC: SMA1303: Change the value for right output This device can output mono, left or right. LR data should be swapped to output right data. Signed-off-by: Kiseok Jo Link: https://lore.kernel.org/r/20230217004403.10220-1-kiseok.jo@irondevice.com Signed-off-by: Mark Brown commit 4b471a8b847b82a3035709dcf87661915c340c8a Author: Chuck Lever Date: Tue Feb 14 10:19:30 2023 -0500 NFSD: Clean up nfsd_symlink() The pointer dentry is assigned a value that is never read, the assignment is redundant and can be removed. Cleans up clang-scan warning: fs/nfsd/nfsctl.c:1231:2: warning: Value stored to 'dentry' is never read [deadcode.DeadStores] dentry = ERR_PTR(ret); No need to initialize "int ret = -ENOMEM;" either. These are vestiges of nfsd_mkdir(), from whence I copied nfsd_symlink(). Reported-by: Colin Ian King Reported-by: Dan Carpenter Signed-off-by: Chuck Lever commit 90d2175572470ba7f55da8447c72ddd4942923c4 Author: Chuck Lever Date: Tue Feb 14 10:07:59 2023 -0500 NFSD: copy the whole verifier in nfsd_copy_write_verifier Currently, we're only memcpy'ing the first __be32. Ensure we copy into both words. Fixes: 91d2e9b56cf5 ("NFSD: Clean up the nfsd_net::nfssvc_boot field") Reported-by: Jeff Layton Signed-off-by: Chuck Lever commit 4c475eee02375ade6e864f1db16976ba0d96a0a2 Author: Jeff Layton Date: Tue Feb 7 12:02:46 2023 -0500 nfsd: don't fsync nfsd_files on last close Most of the time, NFSv4 clients issue a COMMIT before the final CLOSE of an open stateid, so with NFSv4, the fsync in the nfsd_file_free path is usually a no-op and doesn't block. We have a customer running knfsd over very slow storage (XFS over Ceph RBD). They were using the "async" export option because performance was more important than data integrity for this application. That export option turns NFSv4 COMMIT calls into no-ops. Due to the fsync in this codepath however, their final CLOSE calls would still stall (since a CLOSE effectively became a COMMIT). I think this fsync is not strictly necessary. We only use that result to reset the write verifier. Instead of fsync'ing all of the data when we free an nfsd_file, we can just check for writeback errors when one is acquired and when it is freed. If the client never comes back, then it'll never see the error anyway and there is no point in resetting it. If an error occurs after the nfsd_file is removed from the cache but before the inode is evicted, then it will reset the write verifier on the next nfsd_file_acquire, (since there will be an unseen error). The only exception here is if something else opens and fsyncs the file during that window. Given that local applications work with this limitation today, I don't see that as an issue. Link: https://bugzilla.redhat.com/show_bug.cgi?id=2166658 Fixes: ac3a2585f018 ("nfsd: rework refcounting in filecache") Reported-and-tested-by: Pierguido Lambri Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 2172e84ea00b0164666cf8de971c8b8b02a5938b Author: Chuck Lever Date: Sun Feb 5 11:58:44 2023 -0500 SUNRPC: Fix occasional warning when destroying gss_krb5_enctypes I'm guessing that the warning fired because there's some code path that is called on module unload where the gss_krb5_enctypes file was never set up. name 'gss_krb5_enctypes' WARNING: CPU: 0 PID: 6187 at fs/proc/generic.c:712 remove_proc_entry+0x38d/0x460 fs/proc/generic.c:712 destroy_krb5_enctypes_proc_entry net/sunrpc/auth_gss/svcauth_gss.c:1543 [inline] gss_svc_shutdown_net+0x7d/0x2b0 net/sunrpc/auth_gss/svcauth_gss.c:2120 ops_exit_list+0xb0/0x170 net/core/net_namespace.c:169 setup_net+0x9bd/0xe60 net/core/net_namespace.c:356 copy_net_ns+0x320/0x6b0 net/core/net_namespace.c:483 create_new_namespaces+0x3f6/0xb20 kernel/nsproxy.c:110 copy_namespaces+0x410/0x500 kernel/nsproxy.c:179 copy_process+0x311d/0x76b0 kernel/fork.c:2272 kernel_clone+0xeb/0x9a0 kernel/fork.c:2684 __do_sys_clone+0xba/0x100 kernel/fork.c:2825 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 Reported-by: syzbot+04a8437497bcfb4afa95@syzkaller.appspotmail.com Signed-off-by: Chuck Lever commit dcd779dc46540e174a6ac8d52fbed23593407317 Author: Jeff Layton Date: Fri Feb 3 13:18:34 2023 -0500 nfsd: fix courtesy client with deny mode handling in nfs4_upgrade_open The nested if statements here make no sense, as you can never reach "else" branch in the nested statement. Fix the error handling for when there is a courtesy client that holds a conflicting deny mode. Fixes: 3d6942715180 ("NFSD: add support for share reservation conflict to courteous server") Reported-by: 張智諺 Signed-off-by: Jeff Layton Reviewed-by: Dai Ngo Signed-off-by: Chuck Lever commit 81e722978ad21072470b73d8f6a50ad62c7d5b7d Author: Dai Ngo Date: Tue Jan 31 11:12:29 2023 -0800 NFSD: fix problems with cleanup on errors in nfsd4_copy When nfsd4_copy fails to allocate memory for async_copy->cp_src, or nfs4_init_copy_state fails, it calls cleanup_async_copy to do the cleanup for the async_copy which causes page fault since async_copy is not yet initialized. This patche rearranges the order of initializing the fields in async_copy and adds checks in cleanup_async_copy to skip un-initialized fields. Fixes: ce0887ac96d3 ("NFSD add nfs4 inter ssc to nfsd4_copy") Fixes: 87689df69491 ("NFSD: Shrink size of struct nfsd4_copy") Signed-off-by: Dai Ngo Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit fb610c4dbc996415d57d7090957ecddd4fd64fb6 Author: Benjamin Coddington Date: Fri Jan 27 11:18:56 2023 -0500 nfsd: fix race to check ls_layouts Its possible for __break_lease to find the layout's lease before we've added the layout to the owner's ls_layouts list. In that case, setting ls_recalled = true without actually recalling the layout will cause the server to never send a recall callback. Move the check for ls_layouts before setting ls_recalled. Fixes: c5c707f96fc9 ("nfsd: implement pNFS layout recalls") Signed-off-by: Benjamin Coddington Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 826b67e6376c2a788e3a62c4860dcd79500a27d5 Author: Jeff Layton Date: Fri Jan 27 07:09:33 2023 -0500 nfsd: don't hand out delegation on setuid files being opened for write We had a bug report that xfstest generic/355 was failing on NFSv4.0. This test sets various combinations of setuid/setgid modes and tests whether DIO writes will cause them to be stripped. What I found was that the server did properly strip those bits, but the client didn't notice because it held a delegation that was not recalled. The recall didn't occur because the client itself was the one generating the activity and we avoid recalls in that case. Clearing setuid bits is an "implicit" activity. The client didn't specifically request that we do that, so we need the server to issue a CB_RECALL, or avoid the situation entirely by not issuing a delegation. The easiest fix here is to simply not give out a delegation if the file is being opened for write, and the mode has the setuid and/or setgid bit set. Note that there is a potential race between the mode and lease being set, so we test for this condition both before and after setting the lease. This patch fixes generic/355, generic/683 and generic/684 for me. (Note that 355 fails only on v4.0, and 683 and 684 require NFSv4.2 to run and fail). Reported-by: Boyang Xue Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 319951eba0fc412a78a8fe3d2ee5e143cc318c14 Author: Chuck Lever Date: Tue Jan 24 15:40:22 2023 -0500 SUNRPC: Remove ->xpo_secure_port() There's no need for the cost of this extra virtual function call during every RPC transaction: the RQ_SECURE bit can be set properly in ->xpo_recvfrom() instead. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit fcebda5a5d0d53f5603e7b9c04b5b63abe4bac03 Author: Chuck Lever Date: Tue Jan 24 15:40:15 2023 -0500 SUNRPC: Clean up the svc_xprt_flags() macro Make this macro more conventional: - Use BIT() instead of open-coding " 1UL << " - Don't display the "XPT_" in every flag name Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 4dbca1c3c6dd0f21b1b6c5898b7579d465d30468 Author: Jeff Layton Date: Tue Jan 24 11:45:38 2023 -0500 nfsd: remove fs/nfsd/fault_inject.c This file is no longer built at all. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 34e8f9ec4c9ac235f917747b23a200a5e0ec857b Author: Dai Ngo Date: Mon Jan 23 21:34:13 2023 -0800 NFSD: fix leaked reference count of nfsd4_ssc_umount_item The reference count of nfsd4_ssc_umount_item is not decremented on error conditions. This prevents the laundromat from unmounting the vfsmount of the source file. This patch decrements the reference count of nfsd4_ssc_umount_item on error. Fixes: f4e44b393389 ("NFSD: delay unmount source's export after inter-server copy completed.") Signed-off-by: Dai Ngo Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 6ba434cb1a8d403ea9aad1b667c3ea3ad8b3191f Author: Jeff Layton Date: Tue Jan 17 14:38:31 2023 -0500 nfsd: clean up potential nfsd_file refcount leaks in COPY codepath There are two different flavors of the nfsd4_copy struct. One is embedded in the compound and is used directly in synchronous copies. The other is dynamically allocated, refcounted and tracked in the client struture. For the embedded one, the cleanup just involves releasing any nfsd_files held on its behalf. For the async one, the cleanup is a bit more involved, and we need to dequeue it from lists, unhash it, etc. There is at least one potential refcount leak in this code now. If the kthread_create call fails, then both the src and dst nfsd_files in the original nfsd4_copy object are leaked. The cleanup in this codepath is also sort of weird. In the async copy case, we'll have up to four nfsd_file references (src and dst for both flavors of copy structure). They are both put at the end of nfsd4_do_async_copy, even though the ones held on behalf of the embedded one outlive that structure. Change it so that we always clean up the nfsd_file refs held by the embedded copy structure before nfsd4_copy returns. Rework cleanup_async_copy to handle both inter and intra copies. Eliminate nfsd4_cleanup_intra_ssc since it now becomes a no-op. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 1f0001d43d0c0ac2a19a34a914f6595ad97cbc1d Author: Jeff Layton Date: Tue Jan 17 14:38:30 2023 -0500 nfsd: zero out pointers after putting nfsd_files on COPY setup error At first, I thought this might be a source of nfsd_file overputs, but the current callers seem to avoid an extra put when nfsd4_verify_copy returns an error. Still, it's "bad form" to leave the pointers filled out when we don't have a reference to them anymore, and that might lead to bugs later. Zero them out as a defensive coding measure. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit ecfa3987731b1ceb7964075cdc0235da1765622a Author: Chuck Lever Date: Wed Jan 18 10:45:36 2023 -0500 SUNRPC: Fix whitespace damage in svcauth_unix.c Signed-off-by: Chuck Lever commit edd2f5526ea87cf6fc66a08bc8a1fbb6022a502f Author: Jeff Layton Date: Wed Jan 18 12:31:39 2023 -0500 nfsd: eliminate __nfs4_get_fd This is wrapper is pointless, and just obscures what's going on. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit ee97e7301582e3100d396e1cf45c7f5a74c7be97 Author: Jeff Layton Date: Wed Jan 18 12:31:38 2023 -0500 nfsd: add some kerneldoc comments for stateid preprocessing functions Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 45ba66cc2ca22a492fb16474d1af804388757a35 Author: Jeff Layton Date: Wed Jan 18 12:31:35 2023 -0500 nfsd: eliminate find_deleg_file_locked We really don't need an accessor function here. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit fcb530973b3c48099108e6e2e7433db9188f7eeb Author: Jeff Layton Date: Wed Jan 18 12:31:34 2023 -0500 nfsd: don't take nfsd4_copy ref for OP_OFFLOAD_STATUS We're not doing any blocking operations for OP_OFFLOAD_STATUS, so taking and putting a reference is a waste of effort. Take the client lock, search for the copy and fetch the wr_bytes_written field and return. Also, make find_async_copy a static function. Signed-off-by: Jeff Layton Reviewed-by: Olga Kornievskaia Signed-off-by: Chuck Lever commit c4a9f0552cf682489d370adccf2f3ee11a8ff272 Author: Chuck Lever Date: Sun Jan 15 12:24:38 2023 -0500 SUNRPC: Add encryption self-tests With the KUnit infrastructure recently added, we are free to define other unit tests particular to our implementation. As an example, I've added a self-test that encrypts then decrypts a string, and checks the result. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit 4d2d15c0f1e05ef2478d4891b79570a87c5dd1a6 Author: Chuck Lever Date: Sun Jan 15 12:24:31 2023 -0500 SUNRPC: Add RFC 8009 encryption KUnit tests RFC 8009 provides sample encryption results. Add KUnit tests to ensure our implementation derives the expected results for the provided sample input. I hate how large this test is, but using non-standard key usage values means rfc8009_encrypt_case() can't simply reuse ->import_ctx to allocate and key its ciphers; and the test provides its own confounders, which means krb5_etm_encrypt() can't be used directly. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit 003caf4f8c6af53ac48759669f0bd0dd7f69e6f5 Author: Chuck Lever Date: Sun Jan 15 12:24:25 2023 -0500 SUNRPC: Add RFC 8009 checksum KUnit tests RFC 8009 provides sample checksum results. Add KUnit tests to ensure our implementation derives the expected results for the provided sample input. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit fcbad14b585d706337f16300747069b34c77e630 Author: Chuck Lever Date: Sun Jan 15 12:24:18 2023 -0500 SUNRPC: Add KDF-HMAC-SHA2 Kunit tests RFC 8009 provides sample key derivation results, so Kunit tests are added to ensure our implementation derives the expected keys for the provided sample input. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit b958cff6b27b763b824ed6eefb28979d8f459bf4 Author: Chuck Lever Date: Sun Jan 15 12:24:12 2023 -0500 SUNRPC: Add encryption KUnit tests for the RFC 6803 encryption types Add tests for the new-to-RPCSEC Camellia cipher. Tested-by: Scott Mayhew Signed-off-by: Chuck Lever commit 02142b2ca8fc10d7771b650780ae082369632dc0 Author: Chuck Lever Date: Sun Jan 15 12:24:06 2023 -0500 SUNRPC: Add checksum KUnit tests for the RFC 6803 encryption types Test the new-to-RPCSEC CMAC digest algorithm. Tested-by: Scott Mayhew Signed-off-by: Chuck Lever commit 35f6e42e813e51fb3a40f74f23a99aa330254ce8 Author: Chuck Lever Date: Sun Jan 15 12:23:59 2023 -0500 SUNRPC: Add KDF KUnit tests for the RFC 6803 encryption types The Camellia enctypes use a new KDF, so add some tests to ensure it is working properly. Tested-by: Scott Mayhew Signed-off-by: Chuck Lever commit e1a9a3849dff9cd980fdccaa8f09cf9226f46a3a Author: Chuck Lever Date: Sun Jan 15 12:23:53 2023 -0500 SUNRPC: Add Kunit tests for RFC 3962-defined encryption/decryption Add Kunit tests for ENCTYPE_AES128_CTS_HMAC_SHA1_96. The test vectors come from RFC 3962 Appendix B. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit 6eb6b8a446a174586427d1a0ab0f7635b05b44f7 Author: Chuck Lever Date: Sun Jan 15 12:23:47 2023 -0500 SUNRPC: Add KUnit tests RFC 3961 Key Derivation RFC 3961 Appendix A provides tests for the KDF specified in that document as well as other parts of Kerberos. The other three usage scenarios in Section 10 are not implemented by the Linux kernel's RPCSEC GSS Kerberos 5 mechanism, so tests are not added for those. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit ddd8c1f975ee7c2fc60ea836540b5b10f97ac919 Author: Chuck Lever Date: Sun Jan 15 12:23:40 2023 -0500 SUNRPC: Export get_gss_krb5_enctype() I plan to add KUnit tests that will need enctype profile information. Export the enctype profile lookup function. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit eebd8c2d1978f5cb6e76e4e3045220b67548cb79 Author: Chuck Lever Date: Sun Jan 15 12:23:34 2023 -0500 SUNRPC: Add KUnit tests for rpcsec_krb5.ko The Kerberos RFCs provide test vectors to verify the operation of an implementation. Introduce a KUnit test framework to exercise the Linux kernel's implementation of Kerberos. Start with test cases for the RFC 3961-defined n-fold function. The sample vectors for that are found in RFC 3961 Section 10. Run the GSS Kerberos 5 mechanism's unit tests with this command: $ ./tools/testing/kunit/kunit.py run \ --kunitconfig ./net/sunrpc/.kunitconfig Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit 6e460c230d2dfb0e5a02b6e0995546bb4b9d208e Author: Chuck Lever Date: Sun Jan 15 12:23:27 2023 -0500 SUNRPC: Move remaining internal definitions to gss_krb5_internal.h The goal is to leave only protocol-defined items in gss_krb5.h so that it can be easily replaced by a generic header. Implementation specific items are moved to the new internal header. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit 6e6d9eee0e78b3d13018e0eb28102b67ad5a8e86 Author: Chuck Lever Date: Sun Jan 15 12:23:21 2023 -0500 SUNRPC: Advertise support for the Camellia encryption types Add the RFC 6803 encryption types to the string of integers that is reported to gssd during upcalls. This enables gssd to utilize keys with these encryption types when support for them is built into the kernel. Tested-by: Scott Mayhew Signed-off-by: Chuck Lever commit 45b4ef46b5e88ced7edd4fba26b5fa0e3103de0b Author: Chuck Lever Date: Sun Jan 15 12:23:15 2023 -0500 SUNRPC: Add KDF_FEEDBACK_CMAC The Camellia enctypes use the KDF_FEEDBACK_CMAC Key Derivation Function defined in RFC 6803 Section 3. Tested-by: Scott Mayhew Signed-off-by: Chuck Lever commit 3394682fba3b9010c6147e94f37633f044876e5e Author: Chuck Lever Date: Sun Jan 15 12:23:08 2023 -0500 SUNRPC: Support the Camellia enctypes RFC 6803 defines two encryption types that use Camellia ciphers (RFC 3713) and CMAC digests. Implement support for those in SunRPC's GSS Kerberos 5 mechanism. There has not been an explicit request to support these enctypes. However, this new set of enctypes provides a good alternative to the AES-SHA1 enctypes that are to be deprecated at some point. As this implementation is still a "beta", the default is to not build it automatically. Tested-by: Scott Mayhew Signed-off-by: Chuck Lever commit f26ec6b1b15c5d84e4c8e5b361e2be119def498d Author: Chuck Lever Date: Sun Jan 15 12:23:02 2023 -0500 SUNRPC: Advertise support for RFC 8009 encryption types Add the RFC 8009 encryption types to the string of integers that is reported to gssd during upcalls. This enables gssd to utilize keys with these encryption types when support for them is built into the kernel. Link: https://bugzilla.linux-nfs.org/show_bug.cgi?id=400 Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit 0d5b5a0f32dfc9be3521803aba53e856759f0250 Author: Chuck Lever Date: Sun Jan 15 12:22:56 2023 -0500 SUNRPC: Add RFC 8009 encryption and decryption functions RFC 8009 enctypes use different crypt formulae than previous Kerberos 5 encryption types. Section 1 of RFC 8009 explains the reason for this change: > The new types conform to the framework specified in [RFC3961], > but do not use the simplified profile, as the simplified profile > is not compliant with modern cryptographic best practices such as > calculating Message Authentication Codes (MACs) over ciphertext > rather than plaintext. Add new .encrypt and .decrypt functions to handle this variation. The new approach described above is referred to as Encrypt-then-MAC (or EtM). Hence the names of the new functions added here are prefixed with "krb5_etm_". A critical second difference with previous crypt formulae is that the cipher state is included in the computed HMAC. Note however that for RPCSEC, the initial cipher state is easy to compute on both initiator and acceptor because it is always all zeroes. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit ae2e4d2bae0007b040e8327f123911c0a6b24d68 Author: Chuck Lever Date: Sun Jan 15 12:22:49 2023 -0500 SUNRPC: Add KDF-HMAC-SHA2 The RFC 8009 encryption types use a different key derivation function than the RFC 3962 encryption types. The new key derivation function is defined in Section 3 of RFC 8009. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit a40cf7530d3104793f9361e69e84ada7960724f2 Author: Chuck Lever Date: Sun Jan 15 12:22:43 2023 -0500 SUNRPC: Add gk5e definitions for RFC 8009 encryption types Fill in entries in the supported_gss_krb5_enctypes array for the encryption types defined in RFC 8009. These new enctypes use the SHA-256 and SHA-384 message digest algorithms (as defined in FIPS-180) instead of the deprecated SHA-1 algorithm, and are thus more secure. Note that NIST has scheduled SHA-1 for deprecation: https://www.nist.gov/news-events/news/2022/12/nist-retires-sha-1-cryptographic-algorithm Thus these new encryption types are placed under a separate CONFIG option to enable distributors to separately introduce support for the AES-SHA2 enctypes and deprecate support for the current set of AES-SHA1 encryption types as their user space allows. As this implementation is still a "beta", the default is to not build it automatically. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit dfb632432a9b2548b5a4429598bb19edf58122f0 Author: Chuck Lever Date: Sun Jan 15 12:22:36 2023 -0500 SUNRPC: Refactor CBC with CTS into helpers Cryptosystem profile enctypes all use cipher block chaining with ciphertext steal (CBC-with-CTS). However enctypes that are currently supported in the Linux kernel SunRPC implementation use only the encrypt-&-MAC approach. The RFC 8009 enctypes use encrypt-then-MAC, which performs encryption and checksumming in a different order. Refactor to make it possible to share the CBC with CTS encryption and decryption mechanisms between e&M and etM enctypes. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit af664fc9023e69d1a90800c0f815c296bf727e18 Author: Chuck Lever Date: Sun Jan 15 12:22:30 2023 -0500 SUNRPC: Add new subkey length fields The aes256-cts-hmac-sha384-192 enctype specifies the length of its checksum and integrity subkeys as 192 bits, but the length of its encryption subkey (Ke) as 256 bits. Add new fields to struct gss_krb5_enctype that specify the key lengths individually, and where needed, use the correct new field instead of ->keylength. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit 8b3a09f3454240cb2c2ab3da02b86f354aab0bd6 Author: Chuck Lever Date: Sun Jan 15 12:22:24 2023 -0500 SUNRPC: Parametrize the key length passed to context_v2_alloc_cipher() Although the Kerberos specs have always listed separate subkey lengths, the Linux kernel's SunRPC GSS Kerberos enctype profiles assume the base key and the derived keys have identical lengths. The aes256-cts-hmac-sha384-192 enctype specifies the length of its checksum and integrity subkeys as 192 bits, but the length of its encryption subkey (Ke) as 256 bits. To support that enctype, parametrize context_v2_alloc_cipher() so that each of its call sites can pass in its desired key length. For now it will be the same length as before (gk5e->keylength), but a subsequent patch will change this. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit ec4aaab39afcec749ff7ed78e560213ff9e1c23c Author: Chuck Lever Date: Sun Jan 15 12:22:17 2023 -0500 SUNRPC: Clean up cipher set up for v1 encryption types De-duplicate some common code. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit 2691a27d9b3e6a48adeb87a9dcf4e8a0ca84a26e Author: Chuck Lever Date: Sun Jan 15 12:22:11 2023 -0500 SUNRPC: Hoist KDF into struct gss_krb5_enctype Each Kerberos enctype can have a different KDF. Refactor the key derivation path to support different KDFs for the enctypes introduced in subsequent patches. In particular, expose the key derivation function in struct gss_krb5_enctype instead of the enctype's preferred random-to-key function. The latter is usually the identity function and is only ever called during key derivation, so have each KDF call it directly. A couple of extra clean-ups: - Deduplicate the set_cdata() helper - Have ->derive_key return negative errnos, in accordance with usual kernel coding conventions This patch is a little bigger than I'd like, but these are all mechanical changes and they are all to the same areas of code. No behavior change is intended. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit ae6ad5d0b7901b301234143e93624417ac9fd9ef Author: Chuck Lever Date: Sun Jan 15 12:22:04 2023 -0500 SUNRPC: Rename .encrypt_v2 and .decrypt_v2 methods Clean up: there is now only one encrypt and only one decrypt method, thus there is no longer a need for the v2-suffixed method names. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit d50b8152c992ac88c5f1f0cc8ade6ee0aa0a3704 Author: Chuck Lever Date: Sun Jan 15 12:21:58 2023 -0500 SUNRPC: Remove ->encrypt and ->decrypt methods from struct gss_krb5_enctype Clean up: ->encrypt is set to only one value. Replace the two remaining call sites with direct calls to krb5_encrypt(). There have never been any call sites for the ->decrypt() method. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit dfe9a123451a6e73306c988eab3dab12df001677 Author: Chuck Lever Date: Sun Jan 15 12:21:52 2023 -0500 SUNRPC: Enable rpcsec_gss_krb5.ko to be built without CRYPTO_DES Because the DES block cipher has been deprecated by Internet standard, highly secure configurations might require that DES support be blacklisted or not installed. NFS Kerberos should still be able to work correctly with only the AES-based enctypes in that situation. Also note that MIT Kerberos has begun a deprecation process for DES encryption types. Their README for 1.19.3 states: > Beginning with the krb5-1.19 release, a warning will be issued > if initial credentials are acquired using the des3-cbc-sha1 > encryption type. In future releases, this encryption type will > be disabled by default and eventually removed. > > Beginning with the krb5-1.18 release, single-DES encryption > types have been removed. Aside from the CONFIG option name change, there are two important policy changes: 1. The 'insecure enctype' group is now disabled by default. Distributors have to take action to enable support for deprecated enctypes. Implementation of these enctypes will be removed in a future kernel release. 2. des3-cbc-sha1 is now considered part of the 'insecure enctype' group, having been deprecated by RFC 8429, and is thus disabled by default After this patch is applied, SunRPC support can be built with Kerberos 5 support but without CRYPTO_DES enabled in the kernel. And, when these enctypes are disabled, the Linux kernel's SunRPC RPCSEC GSS implementation fully complies with BCP 179 / RFC 6649 and BCP 218 / RFC 8429. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit 17781b2ce41a8915163d7cdada021f809ccd49f0 Author: Chuck Lever Date: Sun Jan 15 12:21:45 2023 -0500 SUNRPC: Replace KRB5_SUPPORTED_ENCTYPES macro Now that all consumers of the KRB5_SUPPORTED_ENCTYPES macro are within the SunRPC layer, the macro can be replaced with something private and more flexible. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit 4df750c924f405fe773771add507117a80ae6203 Author: Chuck Lever Date: Sun Jan 15 12:21:39 2023 -0500 NFSD: Replace /proc/fs/nfsd/supported_krb5_enctypes with a symlink Now that I've added a file under /proc/net/rpc that is managed by the SunRPC's Kerberos mechanism, replace NFSD's supported_krb5_enctypes file with a symlink to the new SunRPC proc file, which contains exactly the same content. Remarkably, commit b0b0c0a26e84 ("nfsd: add proc file listing kernel's gss_krb5 enctypes") added the nfsd_supported_krb5_enctypes file in 2011, but this file has never been documented in nfsd(7). Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit bdb12fb157d8d6aea7becbe6eaacf6c7c9b73f5e Author: Chuck Lever Date: Sun Jan 15 12:21:33 2023 -0500 SUNRPC: Add /proc/net/rpc/gss_krb5_enctypes file I would like to replace the KRB5_SUPPORTED_ENCTYPES macro so that there is finer granularity about what enctype support is built in to the kernel and then advertised by it. The /proc/fs/nfsd/supported_krb5_enctypes file is a legacy API that advertises supported enctypes to rpc.svcgssd (I think?). It simply prints the value of the KRB5_SUPPORTED_ENCTYPES macro, so it will need to be replaced with something that can instead display exactly which enctypes are configured and built into the SunRPC layer. Completely decommissioning such APIs is hard. Instead, add a file that is managed by SunRPC's GSS Kerberos mechanism, which is authoritative about enctype support status. A subsequent patch will replace /proc/fs/nfsd/supported_krb5_enctypes with a symlink to this new file. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit 279a67cdd491a53028eb0b52508383098c6d992b Author: Chuck Lever Date: Sun Jan 15 12:21:26 2023 -0500 SUNRPC: Remove another switch on ctx->enctype Replace another switch on encryption type so that it does not have to be modified when adding or removing support for an enctype. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit e01b2c79f4af1298b961116aba3e64367fe73286 Author: Chuck Lever Date: Sun Jan 15 12:21:20 2023 -0500 SUNRPC: Refactor the GSS-API Per Message calls in the Kerberos mechanism Replace a number of switches on encryption type so that all of them don't have to be modified when adding or removing support for an enctype. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit 8270dbfcebea5b68037a84ad1710e2cfa499b82f Author: Chuck Lever Date: Sun Jan 15 12:21:13 2023 -0500 SUNRPC: Obscure Kerberos integrity keys There's no need to keep the integrity keys around if we instead allocate and key a pair of ahashes and keep those. This not only enables the subkeys to be destroyed immediately after deriving them, but it makes the Kerberos integrity code path more efficient. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit 2dbe0cac3cd6d747579b0b347145326eddfd4e5c Author: Chuck Lever Date: Sun Jan 15 12:21:07 2023 -0500 SUNRPC: Obscure Kerberos signing keys There's no need to keep the signing keys around if we instead allocate and key an ahash and keep that. This not only enables the subkeys to be destroyed immediately after deriving them, but it makes the Kerberos signing code path more efficient. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit 9f0b49f933ab1ec5e7140a43eec72b0c5181cabf Author: Chuck Lever Date: Sun Jan 15 12:21:01 2023 -0500 SUNRPC: Obscure Kerberos encryption keys The encryption subkeys are not used after the cipher transforms have been allocated and keyed. There is no need to retain them in struct krb5_ctx. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit 7989a4f4ab5437ec82b0b59984594f848f12b36a Author: Chuck Lever Date: Sun Jan 15 12:20:54 2023 -0500 SUNRPC: Refactor set-up for aux_cipher Hoist the name of the aux_cipher into struct gss_krb5_enctype to prepare for obscuring the encryption keys just after they are derived. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit 01c4e326327a635e1fac75b1aedd2c2c1e8123b5 Author: Chuck Lever Date: Sun Jan 15 12:20:48 2023 -0500 SUNRPC: Obscure Kerberos session key ctx->Ksess is never used after import has completed. Obscure it immediately so it cannot be re-used or copied. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit 7f675ca7757bfeb70e19d187dc3be44deb836da8 Author: Chuck Lever Date: Sun Jan 15 12:20:41 2023 -0500 SUNRPC: Improve Kerberos confounder generation Other common Kerberos implementations use a fully random confounder for encryption. The reason for this is explained in the new comment added by this patch. The current get_random_bytes() implementation does not exhaust system entropy. Since confounder generation is part of Kerberos itself rather than the GSS-API Kerberos mechanism, the function is renamed and moved. Note that light top-down analysis shows that the SHA-1 transform is by far the most CPU-intensive part of encryption. Thus we do not expect this change to result in a significant performance impact. However, eventually it might be necessary to generate an independent stream of confounders for each Kerberos context to help improve I/O parallelism. Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit 4be416a5f2803d421c950cc48e8e0c1eaaa8c773 Author: Chuck Lever Date: Sun Jan 15 12:20:35 2023 -0500 SUNRPC: Remove .conflen field from struct gss_krb5_enctype Now that arcfour-hmac is gone, the confounder length is again the same as the cipher blocksize for every implemented enctype. The gss_krb5_enctype::conflen field is no longer necessary. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit f03640a1a9782f4bf7c1db63e2e6a9598c6d2c6e Author: Chuck Lever Date: Sun Jan 15 12:20:28 2023 -0500 SUNRPC: Remove .blocksize field from struct gss_krb5_enctype It is not clear from documenting comments, specifications, or code usage what value the gss_krb5_enctype.blocksize field is supposed to store. The "encryption blocksize" depends only on the cipher being used, so that value can be derived where it's needed instead of stored as a constant. RFC 3961 Section 5.2 says: > cipher block size, c > This is the block size of the block cipher underlying the > encryption and decryption functions indicated above, used for key > derivation and for the size of the message confounder and initial > vector. (If a block cipher is not in use, some comparable > parameter should be determined.) It must be at least 5 octets. > > This is not actually an independent parameter; rather, it is a > property of the functions E and D. It is listed here to clarify > the distinction between it and the message block size, m. In the Linux kernel's implemenation of the SunRPC RPCSEC GSS Kerberos 5 mechanism, the cipher block size, which is dependent on the encryption and decryption transforms, is used only in krb5_derive_key(), so it is straightforward to replace it. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit 97648b94bd9dbb987fe7e4067deecdb47d4fd7e7 Author: Chuck Lever Date: Sun Jan 15 12:20:22 2023 -0500 SUNRPC: Add header ifdefs to linux/sunrpc/gss_krb5.h Standard convention: Ensure the contents of the header are included only once per source file. Tested-by: Scott Mayhew Reviewed-by: Simo Sorce Signed-off-by: Chuck Lever commit ccf08bed6e7a80519569456edd2ea21b7b1701c6 Author: Chuck Lever Date: Tue Jan 10 10:32:00 2023 -0500 SUNRPC: Replace pool stats with per-CPU variables Eliminate the use of bus-locked operations in svc_xprt_enqueue(), which is a hot path. Replace them with per-cpu variables to reduce cross-CPU memory bus traffic. Signed-off-by: Chuck Lever commit 65ba3d2425bf51165b6e88509c632bd15d12883d Author: Chuck Lever Date: Tue Jan 10 10:31:54 2023 -0500 SUNRPC: Use per-CPU counters to tally server RPC counts - Improves counting accuracy - Reduces cross-CPU memory traffic Signed-off-by: Chuck Lever commit f5f9d4a314da88c0a5faa6d168bf69081b7a25ae Author: Jeff Layton Date: Wed Jan 11 11:19:59 2023 -0500 nfsd: move reply cache initialization into nfsd startup There's no need to start the reply cache before nfsd is up and running, and doing so means that we register a shrinker for every net namespace instead of just the ones where nfsd is running. Move it to the per-net nfsd startup instead. Reported-by: Dai Ngo Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit db1d61656c78ccbeaa1b8741301bcd85a953f4b2 Author: Chuck Lever Date: Sun Jan 8 11:31:11 2023 -0500 SUNRPC: Go back to using gsd->body_start Now that svcauth_gss_prepare_to_wrap() no longer computes the location of RPC header fields in the response buffer, svcauth_gss_accept() can save the location of the databody rather than the location of the verifier. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 4bcf0343e8a69eb22f7e83bfa7cfce32a28c9d95 Author: Chuck Lever Date: Sun Jan 8 11:31:05 2023 -0500 SUNRPC: Set rq_accept_statp inside ->accept methods To navigate around the space that svcauth_gss_accept() reserves for the RPC payload body length and sequence number fields, svcauth_gss_release() does a little dance with the reply's accept_stat, moving the accept_stat value in the response buffer down by two words. Instead, let's have the ->accept() methods each set the proper final location of the accept_stat to avoid having to move things. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit cee4db19452467eef8ab93c6eb6a3a84d11d25d7 Author: Chuck Lever Date: Sun Jan 8 11:30:59 2023 -0500 SUNRPC: Refactor RPC server dispatch method Currently, svcauth_gss_accept() pre-reserves response buffer space for the RPC payload length and GSS sequence number before returning to the dispatcher, which then adds the header's accept_stat field. The problem is the accept_stat field is supposed to go before the length and seq_num fields. So svcauth_gss_release() has to relocate the accept_stat value (see svcauth_gss_prepare_to_wrap()). To enable these fields to be added to the response buffer in the correct (final) order, the pointer to the accept_stat has to be made available to svcauth_gss_accept() so that it can set it before reserving space for the length and seq_num fields. As a first step, move the pointer to the location of the accept_stat field into struct svc_rqst. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 5df25676de2e13b2cb67140fd43bcbfdd60ef0df Author: Chuck Lever Date: Sun Jan 8 11:30:52 2023 -0500 SUNRPC: Remove no-longer-used helper functions The svc_get/put helpers are no longer used. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 5f69d5f65a5468960291ff0c5dfe16b8072bab8a Author: Chuck Lever Date: Sun Jan 8 11:30:46 2023 -0500 SUNRPC: Final clean-up of svc_process_common() The @resv parameter is no longer used. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 649a692e0f2bc4a3b3a2a67aec30e53548930b97 Author: Chuck Lever Date: Sun Jan 8 11:30:40 2023 -0500 SUNRPC: Convert RPC Reply header encoding to use xdr_stream The main part of RPC header encoding and the formation of error responses are now done using the xdr_stream helpers. Bounds checking before each XDR data item is encoded makes the server's encoding path safer against accidental buffer overflows. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit fcef2afffe67db884f2970817b8e721d86df2986 Author: Chuck Lever Date: Sun Jan 8 11:30:34 2023 -0500 SUNRPC: Hoist init_encode out of svc_authenticate() Now that each ->accept method has been converted, the svcxdr_init_encode() calls can be hoisted back up into the generic RPC server code. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 72a1e53a8bf6aef0fa5b10d8327f23b5759040fe Author: Chuck Lever Date: Sun Jan 8 11:30:28 2023 -0500 SUNRPC: Use xdr_stream for encoding GSS reply verifiers Done as part of hardening the server-side RPC header encoding path. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit b2f42f1d999d2b5f33de4b7cba052e356a8e28c2 Author: Chuck Lever Date: Sun Jan 8 11:30:22 2023 -0500 SUNRPC: Use xdr_stream to encode replies in server-side GSS upcall helpers This code constructs replies to the decorated NULL procedure calls that establish GSS contexts. Convert this code path to use struct xdr_stream to encode such responses. Done as part of hardening the server-side RPC header encoding path. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 7bb0dfb2234725ba085cacfd35f34c187def92b2 Author: Chuck Lever Date: Sun Jan 8 11:30:15 2023 -0500 SUNRPC: Convert unwrap data paths to use xdr_stream for replies We're now moving svcxdr_init_encode() to /before/ the flavor's ->accept method has set rq_auth_slack. Add a helper that can set rq_auth_slack /after/ svcxdr_init_encode() has been called. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit df18f9ccb98a90e51d2d3527d880375db15b1fc8 Author: Chuck Lever Date: Sun Jan 8 11:30:09 2023 -0500 SUNRPC: Use xdr_stream to encode Reply verifier in svcauth_tls_accept() Done as part of hardening the server-side RPC header encoding path. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 3b03f3c5d4dbed658ef9a76c3475b2fb37d46451 Author: Chuck Lever Date: Sun Jan 8 11:30:03 2023 -0500 SUNRPC: Use xdr_stream to encode Reply verifier in svcauth_unix_accept() Done as part of hardening the server-side RPC header encoding path. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit b2c88ca65ac829a9570a491bcf1b78f07b1e3841 Author: Chuck Lever Date: Sun Jan 8 11:29:57 2023 -0500 SUNRPC: Use xdr_stream to encode Reply verifier in svcauth_null_accept() Done as part of hardening the server-side RPC header encoding path. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit faca8978163bf8f6c0f3043b0f03cf3fe7bf9d64 Author: Chuck Lever Date: Sun Jan 8 11:29:51 2023 -0500 SUNRPC: Move svcxdr_init_encode() into ->accept methods Refactor: So that the overhaul of each ->accept method can be done in separate smaller patches, temporarily move the svcxdr_init_encode() call into those methods. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 8dd41d70f331c342842e8d349d7a1f73b0ba7ccd Author: Chuck Lever Date: Sun Jan 8 11:29:44 2023 -0500 SUNRPC: Push svcxdr_init_encode() into svc_process_common() Now that all vs_dispatch functions invoke svcxdr_init_encode(), it is common code and can be pushed down into the generic RPC server. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 7b402c8db66414abb4001d0c2676553baa619a2b Author: Chuck Lever Date: Sun Jan 8 11:29:38 2023 -0500 SUNRPC: Add XDR encoding helper for opaque_auth RFC 5531 defines an MSG_ACCEPTED Reply message like this: struct accepted_reply { opaque_auth verf; union switch (accept_stat stat) { case SUCCESS: ... In the current server code, struct opaque_auth encoding is open- coded. Introduce a helper that encodes an opaque_auth data item within the context of a xdr_stream. Done as part of hardening the server-side RPC header decoding and encoding paths. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 6d037b15e43945144d5041db9e62c5f389bd432b Author: Chuck Lever Date: Sun Jan 8 11:29:32 2023 -0500 SUNRPC: Remove the rpc_stat variable in svc_process_common() There's no RPC header field called rpc_stat; more precisely, the variable appears to be recording an accept_stat value. But it looks like we don't need to preserve this value at all, actually, so simply remove the variable. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 99d074d6b135ae2927b6130d448f5b7159f8dbe1 Author: Chuck Lever Date: Sun Jan 8 11:29:26 2023 -0500 SUNRPC: Check rq_auth_stat when preparing to wrap a response Commit 5b304bc5bfcc ("[PATCH] knfsd: svcrpc: gss: fix failure on SVC_DENIED in integrity case") added a check to prevent wrapping an RPC response if reply_stat == MSG_DENIED, assuming that the only way to get to svcauth_gss_release() with that reply_stat value was if the reject_stat was AUTH_ERROR (reject_stat == MISMATCH is handled earlier in svc_process_common()). The code there is somewhat confusing. For one thing, rpc_success is an accept_stat value, not a reply_stat value. The correct reply_stat value to look for is RPC_MSG_DENIED. It happens to be the same value as rpc_success, so it all works out, but it's not terribly readable. Since commit 438623a06bac ("SUNRPC: Add svc_rqst::rq_auth_stat"), the actual auth_stat value is stored in the svc_rqst, so that value is now available to svcauth_gss_prepare_to_wrap() to make its decision to wrap, based on direct information about the authentication status of the RPC caller. No behavior change is intended, this simply replaces some old code with something that should be more self-documenting. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit eb1b780f2fad2abfcc4a32c6129a117effafff12 Author: Chuck Lever Date: Sun Jan 8 11:29:20 2023 -0500 SUNRPC: Convert svcauth_gss_wrap_priv() to use xdr_stream() Actually xdr_stream does not add value here because of how gss_wrap() works. This is just a clean-up patch. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit a84cfbcd5acbb20bebe40aecf9601adf97b7787b Author: Chuck Lever Date: Sun Jan 8 11:29:14 2023 -0500 SUNRPC: Add @head and @tail variables in svcauth_gss_wrap_priv() Simplify the references to the head and tail iovecs for readability. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit ba8b13e5f4303979440bc5c2a45b3d720b9c0b42 Author: Chuck Lever Date: Sun Jan 8 11:29:07 2023 -0500 SUNRPC: Record gss_wrap() errors in svcauth_gss_wrap_priv() Match the error reporting in the other unwrap and wrap functions. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 7b135c65bb4544a5a1f72573b11adbcfc8aade9b Author: Chuck Lever Date: Sun Jan 8 11:29:01 2023 -0500 SUNRPC: Rename automatic variables in svcauth_gss_wrap_resp_priv() Clean up variable names to match the other unwrap and wrap functions. Additionally, the explicit type cast on @gsd in unnecessary; and @resbuf is renamed to match the variable naming in the unwrap functions. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 7702378ac4d4a3be6414408d274df92bdd078249 Author: Chuck Lever Date: Sun Jan 8 11:28:55 2023 -0500 SUNRPC: Convert svcauth_gss_wrap_integ() to use xdr_stream() Done as part of hardening the server-side RPC header decoding path. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit d91f0323a0638688c96988a9daf3e5f6bfb4f5ed Author: Chuck Lever Date: Sun Jan 8 11:28:49 2023 -0500 SUNRPC: Replace checksum construction in svcauth_gss_wrap_integ() Replace finicky logic: Instead of trying to find scratch space in the response buffer, use the scratch buffer from struct gss_svc_data. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 15d8f80891bb4646ff213a9eae89732976396057 Author: Chuck Lever Date: Sun Jan 8 11:28:42 2023 -0500 SUNRPC: Record gss_get_mic() errors in svcauth_gss_wrap_integ() An error computing the checksum here is an exceptional event. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 0adaddd32f57559d1a94d1e00134d8124cdaa245 Author: Chuck Lever Date: Sun Jan 8 11:28:36 2023 -0500 SUNRPC: Rename automatic variables in svcauth_gss_wrap_resp_integ() Clean up: To help orient readers, name the stack variables to match the XDR field names. Additionally, the explicit type cast on @gsd is unnecessary; and @resbuf is renamed to match the variable naming in the unwrap functions. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 5a92938309829cce26c03f62d908ae85209a52b3 Author: Chuck Lever Date: Sun Jan 8 11:28:30 2023 -0500 SUNRPC: Clean up svcauth_gss_release() Now that upper layers use an xdr_stream to track the construction of each RPC Reply message, resbuf->len is kept up-to-date automatically. There's no need to recompute it in svc_gss_release(). Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit bd6aaf781dae436727928cce514881d3c32758b9 Author: Jeff Layton Date: Fri Jan 6 10:33:48 2023 -0500 nfsd: fix potential race in nfs4_find_file The WARN_ON_ONCE check is not terribly useful. It also seems possible for nfs4_find_file to race with the destruction of an fi_deleg_file while trying to take a reference to it. Now that it's safe to pass nfs_get_file a NULL pointer, remove the WARN and NULL pointer check. Take the fi_lock when fetching fi_deleg_file. Cc: NeilBrown Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 70f62231cdfd52357836733dd31db787e0412ab2 Author: Jeff Layton Date: Fri Jan 6 10:33:47 2023 -0500 nfsd: allow nfsd_file_get to sanely handle a NULL pointer ...and remove some now-useless NULL pointer checks in its callers. Suggested-by: NeilBrown Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit df24ac7a2e3a9d0bc68f1756a880e50bfe4b4522 Author: Dai Ngo Date: Sun Dec 18 16:55:53 2022 -0800 NFSD: enhance inter-server copy cleanup Currently nfsd4_setup_inter_ssc returns the vfsmount of the source server's export when the mount completes. After the copy is done nfsd4_cleanup_inter_ssc is called with the vfsmount of the source server and it searches nfsd_ssc_mount_list for a matching entry to do the clean up. The problems with this approach are (1) the need to search the nfsd_ssc_mount_list and (2) the code has to handle the case where the matching entry is not found which looks ugly. The enhancement is instead of nfsd4_setup_inter_ssc returning the vfsmount, it returns the nfsd4_ssc_umount_item which has the vfsmount embedded in it. When nfsd4_cleanup_inter_ssc is called it's passed with the nfsd4_ssc_umount_item directly to do the clean up so no searching is needed and there is no need to handle the 'not found' case. Signed-off-by: Dai Ngo Signed-off-by: Chuck Lever [ cel: adjusted whitespace and variable/function names ] Reviewed-by: Olga Kornievskaia commit f4afc8fead386c81fda2593ad6162271d26667f8 Author: Chuck Lever Date: Mon Jan 2 12:08:04 2023 -0500 SUNRPC: Hoist svcxdr_init_decode() into svc_process() Now the entire RPC Call header parsing path is handled via struct xdr_stream-based decoders. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 1c59a532ae38cc4472a7096d7a50703bce9a153f Author: Chuck Lever Date: Mon Jan 2 12:07:58 2023 -0500 SUNRPC: Remove svc_process_common's argv parameter Clean up: With xdr_stream decoding, the @argv parameter is no longer used. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 163cdfca341b76c958567ae0966bd3575c5c6192 Author: Chuck Lever Date: Mon Jan 2 12:07:52 2023 -0500 SUNRPC: Decode most of RPC header with xdr_stream Done as part of hardening the server-side RPC header decoding path. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 4119bd0306652776cb0b7caa3aea5b2a93aecb89 Author: Chuck Lever Date: Mon Jan 2 12:07:45 2023 -0500 SUNRPC: Eliminate unneeded variable Clean up: Saving the RPC program number in two places is unnecessary. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 2009e32997ed568a305cf9bc7bf27d22e0f6ccda Author: Chuck Lever Date: Mon Jan 2 12:07:39 2023 -0500 SUNRPC: Re-order construction of the first reply fields Clean up: Group these together for legibility. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 6898b47a0f9e118636d82c3e2c39e50f82290a91 Author: Chuck Lever Date: Mon Jan 2 12:07:32 2023 -0500 SUNRPC: Hoist init_decode out of svc_authenticate() Now that each ->accept method has been converted to use xdr_stream, the svcxdr_init_decode() calls can be hoisted back up into the generic RPC server code. The dprintk in svc_authenticate() is removed, since trace_svc_authenticate() reports the same information. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit b0bc53470d1af01f62a0fe2d405cf56477804863 Author: Chuck Lever Date: Mon Jan 2 12:07:26 2023 -0500 SUNRPC: Convert the svcauth_gss_accept() pre-amble to use xdr_stream Done as part of hardening the server-side RPC header decoding path. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 6734706bc0b834c334aed2551ad046bf5b6a50d4 Author: Chuck Lever Date: Mon Jan 2 12:07:20 2023 -0500 SUNRPC: Clean up svcauth_gss_accept's NULL procedure check Micro-optimizations: 1. The value of rqstp->rq_auth_stat is replaced no matter which arm of the switch is taken, so the initial assignment can be safely removed. 2. Avoid checking the value of gc->gc_proc twice in the I/O (RPC_GSS_PROC_DATA) path. The cost is a little extra code redundancy. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 0653028e8f1c97fec30710813a001ad8a2ec34f4 Author: Chuck Lever Date: Mon Jan 2 12:07:13 2023 -0500 SUNRPC: Convert gss_verify_header() to use xdr_stream Done as part of hardening the server-side RPC header decoding path. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 42140718ea26c47fb06c679451a6aa6703545136 Author: Chuck Lever Date: Mon Jan 2 12:07:07 2023 -0500 SUNRPC: Convert unwrap_priv_data() to use xdr_stream Done as part of hardening the server-side RPC header decoding path. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit f4a59e822f8116baf51a9fc86590e4391bd542d2 Author: Chuck Lever Date: Mon Jan 2 12:07:00 2023 -0500 SUNRPC: Rename automatic variables in unwrap_priv_data() Clean up: To help orient readers, name the stack variables to match the XDR field names. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit b68e4c5c32275e23d35badb7287faaa310c15ba0 Author: Chuck Lever Date: Mon Jan 2 12:06:54 2023 -0500 SUNRPC: Convert unwrap_integ_data() to use xdr_stream Done as part of hardening the server-side RPC header decoding path. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit e14673c9c1c193896b155165d526a45c83094c1f Author: Chuck Lever Date: Mon Jan 2 12:06:47 2023 -0500 SUNRPC: Rename automatic variables in unwrap_integ_data() Clean up: To help orient readers, name the stack variables to match the XDR field names. For readability, I'm also going to rename the unwrap and wrap functions in a consistent manner, starting with unwrap_integ_data(). Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 26a949d1db9fd98b64ce4007da0d4a8d1c23ef22 Author: Chuck Lever Date: Mon Jan 2 12:06:41 2023 -0500 SUNRPC: Replace read_u32_from_xdr_buf() with existing XDR helper Clean up / code de-duplication - this functionality is already available in the generic XDR layer. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit c020fa695af64093acf689beaa39d9e956a55f23 Author: Chuck Lever Date: Mon Jan 2 12:06:35 2023 -0500 SUNRPC: Convert server-side GSS upcall helpers to use xdr_stream The entire RPC_GSS_PROC_INIT path is converted over to xdr_stream for decoding the Call credential and verifier. Done as part of hardening the server-side RPC header decoding path. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 1cbfb921978f98d8b3cdd04b3b2a98e7f4e0fcef Author: Chuck Lever Date: Mon Jan 2 12:06:28 2023 -0500 SUNRPC: Remove gss_read_verf() gss_read_verf() is already short. Fold it into its only caller. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 4d51366deeb4e216154511fb04fa195393a2d33d Author: Chuck Lever Date: Mon Jan 2 12:06:22 2023 -0500 SUNRPC: Remove gss_read_common_verf() gss_read_common_verf() is now just a wrapper for dup_netobj(), thus it can be replaced with direct calls to dup_netobj(). Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 20ebe927ede7ad8f89c7826bea04264310fd3fff Author: Chuck Lever Date: Mon Jan 2 12:06:15 2023 -0500 SUNRPC: Hoist common verifier decoding code into svcauth_gss_proc_init() Pre-requisite to replacing gss_read_common_verf(). Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 4ac5e7a6904bc23fec8ba60af686b2ed5cf027ff Author: Chuck Lever Date: Mon Jan 2 12:06:09 2023 -0500 SUNRPC: Move the server-side GSS upcall to a noinline function Since upcalls are infrequent, ensure the compiler places the upcall mechanism out-of-line from the I/O path. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit e8e38e14009afa90f320b9e806f416954b7dc315 Author: Chuck Lever Date: Mon Jan 2 12:06:03 2023 -0500 SUNRPC: Convert svcauth_tls_accept() to use xdr_stream Done as part of hardening the server-side RPC header decoding path. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 6181b0c6432bf0807512e85e0c5863f7aca8e515 Author: Chuck Lever Date: Mon Jan 2 12:05:56 2023 -0500 SUNRPC: Convert svcauth_unix_accept() to use xdr_stream Done as part of hardening the server-side RPC header decoding path. Since the server-side of the Linux kernel SunRPC implementation ignores the contents of the Call's machinename field, there's no need for its RPC_AUTH_UNIX authenticator to reject names that are larger than UNX_MAXNODENAME. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit bee13639c0940abdea4dcaaf7f9bc0b88a68322b Author: Chuck Lever Date: Mon Jan 2 12:05:50 2023 -0500 SUNRPC: Convert svcauth_null_accept() to use xdr_stream Done as part of hardening the server-side RPC header decoding path. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 846b5756d7632523b5bfce78c163aa883aa9d587 Author: Chuck Lever Date: Mon Jan 2 12:05:43 2023 -0500 SUNRPC: Add an XDR decoding helper for struct opaque_auth RFC 5531 defines the body of an RPC Call message like this: struct call_body { unsigned int rpcvers; unsigned int prog; unsigned int vers; unsigned int proc; opaque_auth cred; opaque_auth verf; /* procedure-specific parameters start here */ }; In the current server code, decoding a struct opaque_auth type is open-coded in several places, and is thus difficult to harden everywhere. Introduce a helper for decoding an opaque_auth within the context of a xdr_stream. This helper can be shared with all authentication flavor implemenations, even on the client-side. Done as part of hardening the server-side RPC header decoding paths. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 1e9e177df3e36e93a37bafc3c610ed019e6f48e7 Author: Chuck Lever Date: Mon Jan 2 12:05:37 2023 -0500 SUNRPC: Move svcxdr_init_decode() into ->accept methods Refactor: So that the overhaul of each ->accept method can be done in separate smaller patches, temporarily move the svcxdr_init_decode() call into those methods. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit dba5eaa46b0282cb9607d362c8887dfcb44bfd2e Author: Chuck Lever Date: Mon Jan 2 12:05:30 2023 -0500 SUNRPC: Push svcxdr_init_decode() into svc_process_common() Now that all vs_dispatch functions invoke svcxdr_init_decode(), it is common code and can be pushed down into the generic RPC server. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit f78e44545814b26ab6af7cdd5b022293ceac867e Author: Richard Weinberger Date: Wed Dec 7 09:43:09 2022 +0100 NFS: nfs_encode_fh: Remove S_AUTOMOUNT check Now with NFSD being able to cross into auto mounts, the check can be removed. Signed-off-by: Richard Weinberger Reviewed-by: Ian Kent Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever Acked-by: Anna Schumaker commit e1f19857f94be09f9526f180e64f20138bd4e394 Author: Richard Weinberger Date: Wed Dec 7 09:43:08 2022 +0100 fs: namei: Allow follow_down() to uncover auto mounts This function is only used by NFSD to cross mount points. If a mount point is of type auto mount, follow_down() will not uncover it. Add LOOKUP_AUTOMOUNT to the lookup flags to have ->d_automount() called when NFSD walks down the mount tree. Signed-off-by: Richard Weinberger Reviewed-by: Ian Kent Reviewed-by: Jeff Layton Acked-by: Al Viro Signed-off-by: Chuck Lever commit 50f5fdaea9cd6941e51ea6e07d8c15265917bb86 Author: Richard Weinberger Date: Wed Dec 7 09:43:07 2022 +0100 NFSD: Teach nfsd_mountpoint() auto mounts Currently nfsd_mountpoint() tests for mount points using d_mountpoint(), this works only when a mount point is already uncovered. In our case the mount point is of type auto mount and can be coverted. i.e. ->d_automount() was not called. Using d_managed() nfsd_mountpoint() can test whether a mount point is either already uncovered or can be uncovered later. Signed-off-by: Richard Weinberger Reviewed-by: Ian Kent Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 91dc288f4edf0d768e46c2c6d33e0ab703403459 Author: Randy Dunlap Date: Sun Feb 19 15:15:25 2023 -0800 MIPS: vpe-mt: drop physical_memsize When neither LANTIQ nor MIPS_MALTA is set, 'physical_memsize' is not declared. This causes the build to fail with: mips-linux-ld: arch/mips/kernel/vpe-mt.o: in function `vpe_run': arch/mips/kernel/vpe-mt.c:(.text.vpe_run+0x280): undefined reference to `physical_memsize' LANTIQ is not using 'physical_memsize' and MIPS_MALTA's use of it is self-contained in mti-malta/malta-dtshim.c. Use of physical_memsize in vpe-mt.c appears to be unused, so eliminate this loader mode completely and require VPE programs to be compiled with DFLT_STACK_SIZE and DFLT_HEAP_SIZE defined. Fixes: 9050d50e2244 ("MIPS: lantiq: Set physical_memsize") Fixes: 1a2a6d7e8816 ("MIPS: APRP: Split VPE loader into separate files.") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Link: https://lore.kernel.org/all/202302030625.2g3E98sY-lkp@intel.com/ Cc: Dengcheng Zhu Cc: John Crispin Cc: Thomas Bogendoerfer Cc: Philippe Mathieu-Daudé Cc: "Steven J. Hill" Cc: Qais Yousef Cc: Yang Yingliang Cc: Hauke Mehrtens Cc: James Hogan Cc: linux-mips@vger.kernel.org Signed-off-by: Thomas Bogendoerfer commit 88cd618dcc7b63baa1478730b02eaba3e3148467 Author: Bagas Sanjaya Date: Mon Feb 20 19:47:21 2023 +0700 debugfs: drop inline constant formatting for ERR_PTR(-ERROR) Stephen Rothwell reported htmldocs warning when merging driver-core tree for linux-next: Documentation/filesystems/api-summary:146: fs/debugfs/inode.c:804: WARNING: Inline literal start-string without end-string. The warning is due to inline constant formatting (``%CONST``) doesn't play nice with complex-name constants like ERR_PTR(-ERROR). Drop the formatting for that constant above to be consistent with similar error constants and also to fix the above warning. Link: https://lore.kernel.org/lkml/20230220163133.481e43d8@canb.auug.org.au/ Fixes: d3002468cb5d5d ("debugfs: update comment of debugfs_rename()") Reported-by: Stephen Rothwell Signed-off-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20230220124721.11657-1-bagasdotme@gmail.com Signed-off-by: Greg Kroah-Hartman commit feabecaff5902f896531dde90646ca5dfa9d4f7d Author: Sergey Shtylyov Date: Wed Aug 17 23:00:45 2022 +0300 genirq/ipi: Fix NULL pointer deref in irq_data_get_affinity_mask() If ipi_send_{mask|single}() is called with an invalid interrupt number, all the local variables there will be NULL. ipi_send_verify() which is invoked from these functions does verify its 'data' parameter, resulting in a kernel oops in irq_data_get_affinity_mask() as the passed NULL pointer gets dereferenced. Add a missing NULL pointer check in ipi_send_verify()... Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Fixes: 3b8e29a82dd1 ("genirq: Implement ipi_send_mask/single()") Signed-off-by: Sergey Shtylyov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/b541232d-c2b6-1fe9-79b4-a7129459e4d0@omp.ru commit 3fcdf2dfefb6313ea0395519d1784808c0b6559b Author: Florian Fainelli Date: Fri Feb 17 10:34:14 2023 -0800 net: bcmgenet: Support wake-up from s2idle When we suspend into s2idle we also need to enable the interrupt line that generates the MPD and HFB interrupts towards the host CPU interrupt controller (typically the ARM GIC or MIPS L1) to make it exit s2idle. When we suspend into other modes such as "standby" or "mem" we engage a power management state machine which will gate off the CPU L1 controller (priv->irq0) and ungate the side band wake-up interrupt (priv->wol_irq). It is safe to have both enabled as wake-up sources because they are mutually exclusive given any suspend mode. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 5f1eb1ff58ea122e24adf0bc940f268ed2227462 Author: Eric Dumazet Date: Fri Feb 17 18:24:54 2023 +0000 scm: add user copy checks to put_cmsg() This is a followup of commit 2558b8039d05 ("net: use a bounce buffer for copying skb->mark") x86 and powerpc define user_access_begin, meaning that they are not able to perform user copy checks when using user_write_access_begin() / unsafe_copy_to_user() and friends [1] Instead of waiting bugs to trigger on other arches, add a check_object_size() in put_cmsg() to make sure that new code tested on x86 with CONFIG_HARDENED_USERCOPY=y will perform more security checks. [1] We can not generically call check_object_size() from unsafe_copy_to_user() because UACCESS is enabled at this point. Signed-off-by: Eric Dumazet Cc: Kees Cook Acked-by: Kees Cook Signed-off-by: David S. Miller commit fce10282a03db59bdb1cba6333d0564461d47bd6 Author: Paolo Abeni Date: Fri Feb 17 19:09:20 2023 +0100 devlink: drop leftover duplicate/unused code The recent merge from net left-over some unused code in leftover.c - nomen omen. Just drop the unused bits. Signed-off-by: Paolo Abeni Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit f6aa90a7a94a64f8c7ad28e09c1339624a824506 Merge: 4d3e050b54887 6ad172748db49 Author: David S. Miller Date: Mon Feb 20 11:31:22 2023 +0000 Merge tag 'linux-can-next-for-6.3-20230217' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2023-02-17 - fixed this is a pull request of 4 patches for net-next/master. The first patch is by Yang Li and converts the ctucanfd driver to devm_platform_ioremap_resource(). The last 3 patches are by Frank Jungclaus, target the esd_usb driver and contains preparations for the upcoming support of the esd CAN-USB/3 hardware. ==================== Signed-off-by: David S. Miller commit 4d3e050b548878a14edfa2aeaca5d583b8b980ef Author: Horatiu Vultur Date: Fri Feb 17 14:28:31 2023 +0100 net: lan966x: Use automatic selection of VCAP rule actionset Since commit 81e164c4aec5 ("net: microchip: sparx5: Add automatic selection of VCAP rule actionset") the VCAP API has the capability to select automatically the actionset based on the actions that are attached to the rule. So it is not needed anymore to hardcode the actionset in the driver, therefore it is OK to remove this. Signed-off-by: Horatiu Vultur Reviewed-by: Alexander Lobakin Signed-off-by: David S. Miller commit cf70d01a62c712ee715df1f7892b58c77474bcfb Author: Ben Dooks Date: Fri Dec 23 15:38:15 2022 +0000 pwm: dwc: Use devm_pwmchip_add() Add the PWM chip using devm_pwmchip_add() to avoid having to manually remove it. This is useful for subsequent patches adding platform device support. Signed-off-by: Ben Dooks Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit a357d1493f0c66ce8006dd28c07646d1f891259a Author: Ben Dooks Date: Fri Dec 23 15:38:14 2022 +0000 pwm: dwc: Move memory allocation to own function In preparation for adding other bus support, move the allocation of the PWM structure out of the main driver code. Signed-off-by: Ben Dooks Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit f7c843d6d7f82d26ee9efe689f9b3208dbf7ed87 Author: Ben Dooks Date: Fri Dec 23 15:38:13 2022 +0000 pwm: dwc: Change &pci->dev to dev in probe The dwc_pwm_probe() assigns dev to be &pci->dev but then uses &pci->dev throughout the function. Change these all to the 'dev' variable to make lines shorter. Signed-off-by: Ben Dooks Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 38d711aacc3d6df13bec75577f966c43b83576fb Merge: e469b6268d8cb 3a7d84eae03be Author: David S. Miller Date: Mon Feb 20 11:22:54 2023 +0000 Merge branch 'default_rps_mask-follow-up' Paolo Abeni says: ==================== net: default_rps_mask follow-up The first patch namespacify the setting. In the common case, once proper isolation is in place in the main namespace, forwarding to/from each child netns will allways happen on the desidered CPUs. Any additional RPS stage inside the child namespace will not provide additional isolation and could hurt performance badly if picking a CPU on a remote node. The 2nd patch adds more self-tests coverage. ==================== Signed-off-by: David S. Miller commit 3a7d84eae03bef4c02c39822b2ea6be5ac73de7b Author: Paolo Abeni Date: Fri Feb 17 13:28:50 2023 +0100 self-tests: more rps self tests Explicitly check for child netns and main ns independency Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 50bcfe8df7c73ce51762f65d218b4ef0cc5da3ee Author: Paolo Abeni Date: Fri Feb 17 13:28:49 2023 +0100 net: make default_rps_mask a per netns attribute That really was meant to be a per netns attribute from the beginning. The idea is that once proper isolation is in place in the main namespace, additional demux in the child namespaces will be redundant. Let's make child netns default rps mask empty by default. To avoid bloating the netns with a possibly large cpumask, allocate it on-demand during the first write operation. Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit e469b6268d8cb7c6cf6b9cd5ce7f403de695627f Merge: 1155a2281de9e 38ae319229692 Author: David S. Miller Date: Mon Feb 20 11:18:13 2023 +0000 Merge tag 'wireless-next-2023-02-17' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Kalle Valo says: ==================== wireless-next patches for v6.3 Third set of patches for v6.3. This time only a set of small fixes submitted during the last day or two. ==================== Signed-off-by: David S. Miller commit 4090871d772629a5574fb405319f008717512b48 Merge: 7f604e92fb805 96a4627dbbd48 Author: Paolo Bonzini Date: Mon Feb 20 06:12:42 2023 -0500 Merge tag 'kvmarm-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 updates for 6.3 - Provide a virtual cache topology to the guest to avoid inconsistencies with migration on heterogenous systems. Non secure software has no practical need to traverse the caches by set/way in the first place. - Add support for taking stage-2 access faults in parallel. This was an accidental omission in the original parallel faults implementation, but should provide a marginal improvement to machines w/o FEAT_HAFDBS (such as hardware from the fruit company). - A preamble to adding support for nested virtualization to KVM, including vEL2 register state, rudimentary nested exception handling and masking unsupported features for nested guests. - Fixes to the PSCI relay that avoid an unexpected host SVE trap when resuming a CPU when running pKVM. - VGIC maintenance interrupt support for the AIC - Improvements to the arch timer emulation, primarily aimed at reducing the trap overhead of running nested. - Add CONFIG_USERFAULTFD to the KVM selftests config fragment in the interest of CI systems. - Avoid VM-wide stop-the-world operations when a vCPU accesses its own redistributor. - Serialize when toggling CPACR_EL1.SMEN to avoid unexpected exceptions in the host. - Aesthetic and comment/kerneldoc fixes - Drop the vestiges of the old Columbia mailing list and add [Oliver] as co-maintainer This also drags in arm64's 'for-next/sme2' branch, because both it and the PSCI relay changes touch the EL2 initialization code. commit 1155a2281de9e7c08c5c6e265b32b28d1fe9ea07 Merge: 129ff4de58ff0 2954fe60e33da Author: David S. Miller Date: Mon Feb 20 10:53:56 2023 +0000 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next Pablo Neira Ayuso says: ==================== Netfilter/IPVS updates for net-next The following patchset contains Netfilter updates for net-next: 1) Add safeguard to check for NULL tupe in objects updates via NFT_MSG_NEWOBJ, this should not ever happen. From Alok Tiwari. 2) Incorrect pointer check in the new destroy rule command, from Yang Yingliang. 3) Incorrect status bitcheck in nf_conntrack_udp_packet(), from Florian Westphal. 4) Simplify seq_print_acct(), from Ilia Gavrilov. 5) Use 2-arg optimal variant of kfree_rcu() in IPVS, from Julian Anastasov. 6) TCP connection enters CLOSE state in conntrack for locally originated TCP reset packet from the reject target, from Florian Westphal. The fixes #2 and #3 in this series address issues from the previous pull nf-next request in this net-next cycle. ==================== Signed-off-by: David S. Miller commit 129ff4de58ff0ca981b833834d8b9bddb71d4bfe Author: Arnd Bergmann Date: Fri Feb 17 10:58:06 2023 +0100 net: microchip: sparx5: reduce stack usage The vcap_admin structures in vcap_api_next_lookup_advanced_test() take several hundred bytes of stack frame, but when CONFIG_KASAN_STACK is enabled, each one of them also has extra padding before and after it, which ends up blowing the warning limit: In file included from drivers/net/ethernet/microchip/vcap/vcap_api.c:3521: drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c: In function 'vcap_api_next_lookup_advanced_test': drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:1954:1: error: the frame size of 1448 bytes is larger than 1400 bytes [-Werror=frame-larger-than=] 1954 | } Reduce the total stack usage by replacing the five structures with an array that only needs one pair of padding areas. Fixes: 1f741f001160 ("net: microchip: sparx5: Add KUNIT tests for enabling/disabling chains") Signed-off-by: Arnd Bergmann Reviewed-by: Alexander Lobakin Signed-off-by: David S. Miller commit a59f832a71c938779b8abdb022d6d39903e635c3 Author: Arnd Bergmann Date: Fri Feb 17 10:56:39 2023 +0100 sfc: use IS_ENABLED() checks for CONFIG_SFC_SRIOV One local variable has become unused after a recent change: drivers/net/ethernet/sfc/ef100_nic.c: In function 'ef100_probe_netdev_pf': drivers/net/ethernet/sfc/ef100_nic.c:1155:21: error: unused variable 'net_dev' [-Werror=unused-variable] struct net_device *net_dev = efx->net_dev; ^~~~~~~ The variable is still used in an #ifdef. Replace the #ifdef with an if(IS_ENABLED()) check that lets the compiler see where it is used, rather than adding another #ifdef. This also fixes an uninitialized return value in ef100_probe_netdev_pf() that gcc did not spot. Fixes: 7e056e2360d9 ("sfc: obtain device mac address based on firmware handle for ef100") Signed-off-by: Arnd Bergmann Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 8173c2f9a1a4a5afcf465a62bc8b616c1fef252d Author: Michal Swiatkowski Date: Fri Feb 17 11:50:17 2023 +0100 ice: properly alloc ICE_VSI_LB Devlink reload patchset introduced regression. ICE_VSI_LB wasn't taken into account when doing default allocation. Fix it by adding a case for ICE_VSI_LB in ice_vsi_alloc_def(). Fixes: 6624e780a577 ("ice: split ice_vsi_setup into smaller functions") Reported-by: Maciej Fijalkowski Acked-by: Maciej Fijalkowski Signed-off-by: Michal Swiatkowski Reviewed-by: Alexander Lobakin Signed-off-by: David S. Miller commit 0d39ad3e1b045ca1600169ca8de1267ab4ae1a81 Author: Colin Ian King Date: Fri Feb 17 09:25:28 2023 +0000 sfc: Fix spelling mistake "creationg" -> "creating" There is a spelling mistake in a pci_warn message. Fix it. Signed-off-by: Colin Ian King Reviewed-by:  Alejandro Lucero Signed-off-by: David S. Miller commit 933a01ad599766cf9bcda788f956f425a8b0b0a2 Author: Geetha sowjanya Date: Fri Feb 17 11:21:12 2023 +0530 octeontx2-af: Add NIX Errata workaround on CN10K silicon This patch adds workaround for below 2 HW erratas 1. Due to improper clock gating, NIXRX may free the same NPA buffer multiple times.. to avoid this, always enable NIX RX conditional clock. 2. NIX FIFO does not get initialized on reset, if the SMQ flush is triggered before the first packet is processed, it will lead to undefined state. The workaround to perform SMQ flush only if packet count is non-zero in MDQ. Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Sai Krishna Signed-off-by: David S. Miller commit c2a978c171a6d44d4d9710e7e4455f75d34aecee Author: Andrew Lunn Date: Fri Feb 17 04:15:20 2023 +0100 net: phy: Read EEE abilities when using .features A PHY driver can use a static integer value to indicate what link mode features it supports, i.e, its abilities.. This is the old way, but useful when dynamically determining the devices features does not work, e.g. support of fibre. EEE support has been moved into phydev->supported_eee. This needs to be set otherwise the code assumes EEE is not supported. It is normally set as part of reading the devices abilities. However if a static integer value was used, the dynamic reading of the abilities is not performed. Add a call to genphy_c45_read_eee_abilities() to read the EEE abilities. Fixes: 8b68710a3121 ("net: phy: start using genphy_c45_ethtool_get/set_eee()") Signed-off-by: Andrew Lunn Reviewed-by: Oleksij Rempel Signed-off-by: David S. Miller commit 0b1dbf889d0bebfa533a6220b0379300d4007204 Merge: cf06eef0c86bd 2f987d4866107 Author: David S. Miller Date: Mon Feb 20 10:04:22 2023 +0000 Merge branch 'phydev-locks' Andrew Lunn says: ==================== Add additional phydev locks The phydev lock should be held when accessing members of phydev, or calling into the driver. Some of the phy_ethtool_ functions are missing locks. Add them. To avoid deadlock the marvell driver is modified since it calls one of the functions which gain locks, which would result in a deadlock. The missing locks have not caused noticeable issues, so these patches are for net-next. ==================== Signed-off-by: David S. Miller commit 2f987d486610752b364fd238fa3bb1a142d80b44 Author: Andrew Lunn Date: Fri Feb 17 04:07:14 2023 +0100 net: phy: Add locks to ethtool functions The phydev lock should be held while accessing members of phydev, or calling into the driver. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 3365777a6a2243f1cca5a441f2c89002d16fc580 Author: Andrew Lunn Date: Fri Feb 17 04:07:13 2023 +0100 net: phy: marvell: Use the unlocked genphy_c45_ethtool_get_eee() phy_ethtool_get_eee() is about to gain locking of the phydev lock. This means it cannot be used within a PHY driver without causing a deadlock. Swap to using genphy_c45_ethtool_get_eee() which assumes the lock has already been taken. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit a7515af9fb8f0890fe540b108def4a86b9e8330a Author: Doug Berger Date: Thu Feb 16 11:41:28 2023 -0800 net: bcmgenet: fix MoCA LED control When the bcmgenet_mii_config() code was refactored it was missed that the LED control for the MoCA interface got overwritten by the port_ctrl value. Its previous programming is restored here. Fixes: 4f8d81b77e66 ("net: bcmgenet: Refactor register access in bcmgenet_mii_config") Signed-off-by: Doug Berger Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 9ca5e7ecab064f1f47da07f7c1ddf40e4bc0e5ac Author: Shigeru Yoshida Date: Fri Feb 17 01:37:10 2023 +0900 l2tp: Avoid possible recursive deadlock in l2tp_tunnel_register() When a file descriptor of pppol2tp socket is passed as file descriptor of UDP socket, a recursive deadlock occurs in l2tp_tunnel_register(). This situation is reproduced by the following program: int main(void) { int sock; struct sockaddr_pppol2tp addr; sock = socket(AF_PPPOX, SOCK_DGRAM, PX_PROTO_OL2TP); if (sock < 0) { perror("socket"); return 1; } addr.sa_family = AF_PPPOX; addr.sa_protocol = PX_PROTO_OL2TP; addr.pppol2tp.pid = 0; addr.pppol2tp.fd = sock; addr.pppol2tp.addr.sin_family = PF_INET; addr.pppol2tp.addr.sin_port = htons(0); addr.pppol2tp.addr.sin_addr.s_addr = inet_addr("192.168.0.1"); addr.pppol2tp.s_tunnel = 1; addr.pppol2tp.s_session = 0; addr.pppol2tp.d_tunnel = 0; addr.pppol2tp.d_session = 0; if (connect(sock, (const struct sockaddr *)&addr, sizeof(addr)) < 0) { perror("connect"); return 1; } return 0; } This program causes the following lockdep warning: ============================================ WARNING: possible recursive locking detected 6.2.0-rc5-00205-gc96618275234 #56 Not tainted -------------------------------------------- repro/8607 is trying to acquire lock: ffff8880213c8130 (sk_lock-AF_PPPOX){+.+.}-{0:0}, at: l2tp_tunnel_register+0x2b7/0x11c0 but task is already holding lock: ffff8880213c8130 (sk_lock-AF_PPPOX){+.+.}-{0:0}, at: pppol2tp_connect+0xa82/0x1a30 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(sk_lock-AF_PPPOX); lock(sk_lock-AF_PPPOX); *** DEADLOCK *** May be due to missing lock nesting notation 1 lock held by repro/8607: #0: ffff8880213c8130 (sk_lock-AF_PPPOX){+.+.}-{0:0}, at: pppol2tp_connect+0xa82/0x1a30 stack backtrace: CPU: 0 PID: 8607 Comm: repro Not tainted 6.2.0-rc5-00205-gc96618275234 #56 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.1-2.fc37 04/01/2014 Call Trace: dump_stack_lvl+0x100/0x178 __lock_acquire.cold+0x119/0x3b9 ? lockdep_hardirqs_on_prepare+0x410/0x410 lock_acquire+0x1e0/0x610 ? l2tp_tunnel_register+0x2b7/0x11c0 ? lock_downgrade+0x710/0x710 ? __fget_files+0x283/0x3e0 lock_sock_nested+0x3a/0xf0 ? l2tp_tunnel_register+0x2b7/0x11c0 l2tp_tunnel_register+0x2b7/0x11c0 ? sprintf+0xc4/0x100 ? l2tp_tunnel_del_work+0x6b0/0x6b0 ? debug_object_deactivate+0x320/0x320 ? lockdep_init_map_type+0x16d/0x7a0 ? lockdep_init_map_type+0x16d/0x7a0 ? l2tp_tunnel_create+0x2bf/0x4b0 ? l2tp_tunnel_create+0x3c6/0x4b0 pppol2tp_connect+0x14e1/0x1a30 ? pppol2tp_put_sk+0xd0/0xd0 ? aa_sk_perm+0x2b7/0xa80 ? aa_af_perm+0x260/0x260 ? bpf_lsm_socket_connect+0x9/0x10 ? pppol2tp_put_sk+0xd0/0xd0 __sys_connect_file+0x14f/0x190 __sys_connect+0x133/0x160 ? __sys_connect_file+0x190/0x190 ? lockdep_hardirqs_on+0x7d/0x100 ? ktime_get_coarse_real_ts64+0x1b7/0x200 ? ktime_get_coarse_real_ts64+0x147/0x200 ? __audit_syscall_entry+0x396/0x500 __x64_sys_connect+0x72/0xb0 do_syscall_64+0x38/0xb0 entry_SYSCALL_64_after_hwframe+0x63/0xcd This patch fixes the issue by getting/creating the tunnel before locking the pppol2tp socket. Fixes: 0b2c59720e65 ("l2tp: close all race conditions in l2tp_tunnel_register()") Cc: Cong Wang Signed-off-by: Shigeru Yoshida Reviewed-by: Guillaume Nault Signed-off-by: David S. Miller commit 47e91fdfa511139f2549687edb0d8649b123227b Author: Benjamin Tissoires Date: Thu Feb 16 11:22:58 2023 +0100 HID: mcp-2221: prevent UAF in delayed work If the device is plugged/unplugged without giving time for mcp_init_work() to complete, we might kick in the devm free code path and thus have unavailable struct mcp_2221 while in delayed work. Canceling the delayed_work item is enough to solve the issue, because cancel_delayed_work_sync will prevent the work item to requeue itself. Fixes: 960f9df7c620 ("HID: mcp2221: add ADC/DAC support via iio subsystem") CC: stable@vger.kernel.org Acked-by: Jiri Kosina Link: https://lore.kernel.org/r/20230215-wip-mcp2221-v2-1-109f71fd036e@redhat.com Signed-off-by: Benjamin Tissoires commit cf06eef0c86bd2088bafecb211e06a2855b4c327 Merge: dd1b527831a3e ac03694bc0097 Author: David S. Miller Date: Mon Feb 20 08:54:24 2023 +0000 Merge branch 'icmp6-drop-reason' Eric Dumazet says: ==================== ipv6: icmp6: better drop reason support This series aims to have more precise drop reason reports for icmp6. This should reduce false positives on most usual cases. This can be extended as needed later. ==================== Signed-off-by: David S. Miller commit ac03694bc009703022cf45a9c90675d5505c584c Author: Eric Dumazet Date: Thu Feb 16 16:28:42 2023 +0000 ipv6: icmp6: add drop reason support to icmpv6_echo_reply() Change icmpv6_echo_reply() to return a drop reason. For the moment, return NOT_SPECIFIED or SKB_CONSUMED. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit c34b8bb11ebc135e970653bd6fc8e3f863fb6a81 Author: Eric Dumazet Date: Thu Feb 16 16:28:41 2023 +0000 ipv6: icmp6: add SKB_DROP_REASON_IPV6_NDISC_NS_OTHERHOST Hosts can often receive neighbour discovery messages that are not for them. Use a dedicated drop reason to make clear the packet is dropped for this normal case. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 784d4477f07b930df73bc77e842e03f1dacb83aa Author: Eric Dumazet Date: Thu Feb 16 16:28:40 2023 +0000 ipv6: icmp6: add SKB_DROP_REASON_IPV6_NDISC_BAD_OPTIONS This is a generic drop reason for any error detected in ndisc_parse_options(). Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit ec993edf05ca4eee5878edf51fdb5ffa2b1decc3 Author: Eric Dumazet Date: Thu Feb 16 16:28:39 2023 +0000 ipv6: icmp6: add drop reason support to ndisc_redirect_rcv() Change ndisc_redirect_rcv() to return a drop reason. For the moment, return PKT_TOO_SMALL, NOT_SPECIFIED and values from icmpv6_notify(). More reasons are added later. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 2f326d9d9ff46fb2e45fb3b6ae77eff04332dde6 Author: Eric Dumazet Date: Thu Feb 16 16:28:38 2023 +0000 ipv6: icmp6: add drop reason support to ndisc_router_discovery() Change ndisc_router_discovery() to return a drop reason. For the moment, return PKT_TOO_SMALL, NOT_SPECIFIED and SKB_CONSUMED. More reasons are added later. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 243e37c642ac1d52858bc5f3559e380babf21169 Author: Eric Dumazet Date: Thu Feb 16 16:28:37 2023 +0000 ipv6: icmp6: add drop reason support to ndisc_recv_rs() Change ndisc_recv_rs() to return a drop reason. For the moment, return PKT_TOO_SMALL, NOT_SPECIFIED or SKB_CONSUMED. More reasons are added later. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 3009f9ae21ec539985977dcaa0cebb628afeb181 Author: Eric Dumazet Date: Thu Feb 16 16:28:36 2023 +0000 ipv6: icmp6: add drop reason support to ndisc_recv_na() Change ndisc_recv_na() to return a drop reason. For the moment, return PKT_TOO_SMALL, NOT_SPECIFIED or SKB_CONSUMED. More reasons are added later. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 7c9c8913f4523cda30a710736844d74bfee060a4 Author: Eric Dumazet Date: Thu Feb 16 16:28:35 2023 +0000 ipv6: icmp6: add drop reason support to ndisc_recv_ns() Change ndisc_recv_ns() to return a drop reason. For the moment, return PKT_TOO_SMALL, NOT_SPECIFIED or SKB_CONSUMED. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit dd1b527831a3ed659afa01b672d8e1f7e6ca95a5 Author: Eric Dumazet Date: Thu Feb 16 15:47:18 2023 +0000 net: add location to trace_consume_skb() kfree_skb() includes the location, it makes sense to add it to consume_skb() as well. After patch: taskd_EventMana 8602 [004] 420.406239: skb:consume_skb: skbaddr=0xffff893a4a6d0500 location=unix_stream_read_generic swapper 0 [011] 422.732607: skb:consume_skb: skbaddr=0xffff89597f68cee0 location=mlx4_en_free_tx_desc discipline 9141 [043] 423.065653: skb:consume_skb: skbaddr=0xffff893a487e9c00 location=skb_consume_udp swapper 0 [010] 423.073166: skb:consume_skb: skbaddr=0xffff8949ce9cdb00 location=icmpv6_rcv borglet 8672 [014] 425.628256: skb:consume_skb: skbaddr=0xffff8949c42e9400 location=netlink_dump swapper 0 [028] 426.263317: skb:consume_skb: skbaddr=0xffff893b1589dce0 location=net_rx_action wget 14339 [009] 426.686380: skb:consume_skb: skbaddr=0xffff893a51b552e0 location=tcp_rcv_state_process Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 436864095a95fcc611c20c44a111985fa9848730 Author: Jakub Sitnicki Date: Thu Feb 16 13:43:40 2023 +0100 selftests/net: Interpret UDP_GRO cmsg data as an int value Data passed to user-space with a (SOL_UDP, UDP_GRO) cmsg carries an int (see udp_cmsg_recv), not a u16 value, as strace confirms: recvmsg(8, {msg_name=..., msg_iov=[{iov_base="\0\0..."..., iov_len=96000}], msg_iovlen=1, msg_control=[{cmsg_len=20, <-- sizeof(cmsghdr) + 4 cmsg_level=SOL_UDP, cmsg_type=0x68}], <-- UDP_GRO msg_controllen=24, msg_flags=0}, 0) = 11200 Interpreting the data as an u16 value won't work on big-endian platforms. Since it is too late to back out of this API decision [1], fix the test. [1]: https://lore.kernel.org/netdev/20230131174601.203127-1-jakub@cloudflare.com/ Fixes: 3327a9c46352 ("selftests: add functionals test for UDP GRO") Suggested-by: Eric Dumazet Signed-off-by: Jakub Sitnicki Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 908d4bb7c54caa58253a363d63e797a468eaf321 Author: Manish Chopra Date: Thu Feb 16 03:54:47 2023 -0800 qede: fix interrupt coalescing configuration On default driver load device gets configured with unexpected higher interrupt coalescing values instead of default expected values as memory allocated from krealloc() is not supposed to be zeroed out and may contain garbage values. Fix this by allocating the memory of required size first with kcalloc() and then use krealloc() to resize and preserve the contents across down/up of the interface. Signed-off-by: Manish Chopra Fixes: b0ec5489c480 ("qede: preserve per queue stats across up/down of interface") Cc: stable@vger.kernel.org Cc: Bhaskar Upadhaya Cc: David S. Miller Link: https://bugzilla.redhat.com/show_bug.cgi?id=2160054 Signed-off-by: Alok Prasad Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit 9f78bf330a66cd400b3e00f370f597e9fa939207 Author: Xuan Zhuo Date: Thu Feb 16 16:30:47 2023 +0800 xsk: support use vaddr as ring When we try to start AF_XDP on some machines with long running time, due to the machine's memory fragmentation problem, there is no sufficient contiguous physical memory that will cause the start failure. If the size of the queue is 8 * 1024, then the size of the desc[] is 8 * 1024 * 8 = 16 * PAGE, but we also add struct xdp_ring size, so it is 16page+. This is necessary to apply for a 4-order memory. If there are a lot of queues, it is difficult to these machine with long running time. Here, that we actually waste 15 pages. 4-Order memory is 32 pages, but we only use 17 pages. This patch replaces __get_free_pages() by vmalloc() to allocate memory to solve these problems. Signed-off-by: Xuan Zhuo Acked-by: Magnus Karlsson Reviewed-by: Alexander Lobakin Signed-off-by: David S. Miller commit 475f9ff63ee8c296aa46c6e9e9ad9bdd301c6bdf Author: D. Wythe Date: Thu Feb 16 14:39:05 2023 +0800 net/smc: fix application data exception There is a certain probability that following exceptions will occur in the wrk benchmark test: Running 10s test @ http://11.213.45.6:80 8 threads and 64 connections Thread Stats Avg Stdev Max +/- Stdev Latency 3.72ms 13.94ms 245.33ms 94.17% Req/Sec 1.96k 713.67 5.41k 75.16% 155262 requests in 10.10s, 23.10MB read Non-2xx or 3xx responses: 3 We will find that the error is HTTP 400 error, which is a serious exception in our test, which means the application data was corrupted. Consider the following scenarios: CPU0 CPU1 buf_desc->used = 0; cmpxchg(buf_desc->used, 0, 1) deal_with(buf_desc) memset(buf_desc->cpu_addr,0); This will cause the data received by a victim connection to be cleared, thus triggering an HTTP 400 error in the server. This patch exchange the order between clear used and memset, add barrier to ensure memory consistency. Fixes: 1c5526968e27 ("net/smc: Clear memory when release and reuse buffer") Signed-off-by: D. Wythe Reviewed-by: Wenjia Zhang Signed-off-by: David S. Miller commit e40b801b3603a8f90b46acbacdea3505c27f01c0 Author: D. Wythe Date: Thu Feb 16 14:37:36 2023 +0800 net/smc: fix potential panic dues to unprotected smc_llc_srv_add_link() There is a certain chance to trigger the following panic: PID: 5900 TASK: ffff88c1c8af4100 CPU: 1 COMMAND: "kworker/1:48" #0 [ffff9456c1cc79a0] machine_kexec at ffffffff870665b7 #1 [ffff9456c1cc79f0] __crash_kexec at ffffffff871b4c7a #2 [ffff9456c1cc7ab0] crash_kexec at ffffffff871b5b60 #3 [ffff9456c1cc7ac0] oops_end at ffffffff87026ce7 #4 [ffff9456c1cc7ae0] page_fault_oops at ffffffff87075715 #5 [ffff9456c1cc7b58] exc_page_fault at ffffffff87ad0654 #6 [ffff9456c1cc7b80] asm_exc_page_fault at ffffffff87c00b62 [exception RIP: ib_alloc_mr+19] RIP: ffffffffc0c9cce3 RSP: ffff9456c1cc7c38 RFLAGS: 00010202 RAX: 0000000000000000 RBX: 0000000000000002 RCX: 0000000000000004 RDX: 0000000000000010 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffff88c1ea281d00 R8: 000000020a34ffff R9: ffff88c1350bbb20 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000 R13: 0000000000000010 R14: ffff88c1ab040a50 R15: ffff88c1ea281d00 ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018 #7 [ffff9456c1cc7c60] smc_ib_get_memory_region at ffffffffc0aff6df [smc] #8 [ffff9456c1cc7c88] smcr_buf_map_link at ffffffffc0b0278c [smc] #9 [ffff9456c1cc7ce0] __smc_buf_create at ffffffffc0b03586 [smc] The reason here is that when the server tries to create a second link, smc_llc_srv_add_link() has no protection and may add a new link to link group. This breaks the security environment protected by llc_conf_mutex. Fixes: 2d2209f20189 ("net/smc: first part of add link processing as SMC server") Signed-off-by: D. Wythe Reviewed-by: Larysa Zaremba Reviewed-by: Wenjia Zhang Signed-off-by: David S. Miller commit b148d400f820637bcc95f6aca64c8763a2db858f Merge: c078381856230 64cb6aad12328 Author: Paolo Abeni Date: Mon Feb 20 08:46:59 2023 +0100 Merge branch 'taprio-queuemaxsdu-fixes' Vladimir Oltean says: ==================== taprio queueMaxSDU fixes This fixes 3 issues noticed while attempting to reoffload the dynamically calculated queueMaxSDU values. These are: - Dynamic queueMaxSDU is not calculated correctly due to a lost patch - Dynamically calculated queueMaxSDU needs to be clamped on the low end - Dynamically calculated queueMaxSDU needs to be clamped on the high end ==================== Link: https://lore.kernel.org/r/20230215224632.2532685-1-vladimir.oltean@nxp.com Signed-off-by: Paolo Abeni commit 64cb6aad12328015202af5b2a9623c6bcc021855 Author: Vladimir Oltean Date: Thu Feb 16 00:46:32 2023 +0200 net/sched: taprio: dynamic max_sdu larger than the max_mtu is unlimited It makes no sense to keep randomly large max_sdu values, especially if larger than the device's max_mtu. These are visible in "tc qdisc show". Such a max_sdu is practically unlimited and will cause no packets for that traffic class to be dropped on enqueue. Just set max_sdu_dynamic to U32_MAX, which in the logic below causes taprio to save a max_frm_len of U32_MAX and a max_sdu presented to user space of 0 (unlimited). Signed-off-by: Vladimir Oltean Reviewed-by: Kurt Kanzenbach Signed-off-by: Paolo Abeni commit bdf366bd867c4565b535a5825df7ddcb4773fc28 Author: Vladimir Oltean Date: Thu Feb 16 00:46:31 2023 +0200 net/sched: taprio: don't allow dynamic max_sdu to go negative after stab adjustment The overhead specified in the size table comes from the user. With small time intervals (or gates always closed), the overhead can be larger than the max interval for that traffic class, and their difference is negative. What we want to happen is for max_sdu_dynamic to have the smallest non-zero value possible (1) which means that all packets on that traffic class are dropped on enqueue. However, since max_sdu_dynamic is u32, a negative is represented as a large value and oversized dropping never happens. Use max_t with int to force a truncation of max_frm_len to no smaller than dev->hard_header_len + 1, which in turn makes max_sdu_dynamic no smaller than 1. Fixes: fed87cc6718a ("net/sched: taprio: automatically calculate queueMaxSDU based on TC gate durations") Signed-off-by: Vladimir Oltean Reviewed-by: Kurt Kanzenbach Signed-off-by: Paolo Abeni commit 09dbdf28f9f9fa27e16895c67fbd94ff36124766 Author: Vladimir Oltean Date: Thu Feb 16 00:46:30 2023 +0200 net/sched: taprio: fix calculation of maximum gate durations taprio_calculate_gate_durations() depends on netdev_get_num_tc() and this returns 0. So it calculates the maximum gate durations for no traffic class. I had tested the blamed commit only with another patch in my tree, one which in the end I decided isn't valuable enough to submit ("net/sched: taprio: mask off bits in gate mask that exceed number of TCs"). The problem is that having this patch threw off my testing. By moving the netdev_set_num_tc() call earlier, we implicitly gave to taprio_calculate_gate_durations() the information it needed. Extract only the portion from the unsubmitted change which applies the mqprio configuration to the netdev earlier. Link: https://patchwork.kernel.org/project/netdevbpf/patch/20230130173145.475943-15-vladimir.oltean@nxp.com/ Fixes: a306a90c8ffe ("net/sched: taprio: calculate tc gate durations") Signed-off-by: Vladimir Oltean Reviewed-by: Kurt Kanzenbach Signed-off-by: Paolo Abeni commit c078381856230f1e8e13738661d83c2b4b433819 Author: David Howells Date: Wed Feb 15 21:48:05 2023 +0000 rxrpc: Fix overproduction of wakeups to recvmsg() Fix three cases of overproduction of wakeups: (1) rxrpc_input_split_jumbo() conditionally notifies the app that there's data for recvmsg() to collect if it queues some data - and then its only caller, rxrpc_input_data(), goes and wakes up recvmsg() anyway. Fix the rxrpc_input_data() to only do the wakeup in failure cases. (2) If a DATA packet is received for a call by the I/O thread whilst recvmsg() is busy draining the call's rx queue in the app thread, the call will left on the recvmsg() queue for recvmsg() to pick up, even though there isn't any data on it. This can cause an unexpected recvmsg() with a 0 return and no MSG_EOR set after the reply has been posted to a service call. Fix this by discarding pending calls from the recvmsg() queue that don't need servicing yet. (3) Not-yet-completed calls get requeued after having data read from them, even if they have no data to read. Fix this by only requeuing them if they have data waiting on them; if they don't, the I/O thread will requeue them when data arrives or they fail. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/3386149.1676497685@warthog.procyon.org.uk Signed-off-by: Paolo Abeni commit d269ac136ede573c90c18a66961143294ef564e5 Merge: 1c93e48cc3914 f651334e1ef5d Author: Paolo Abeni Date: Mon Feb 20 08:14:22 2023 +0100 Merge branch 'net-final-gsi-register-updates' Alex Elder says: ==================== net: final GSI register updates I believe this is the last set of changes required to allow IPA v5.0 to be supported. There is a little cleanup work remaining, but that can happen in the next Linux release cycle. Otherwise we just need config data and register definitions for IPA v5.0 (and DTS updates). These are ready but won't be posted without further testing. The first patch in this series fixes a minor bug in a patch just posted, which I found too late. The second eliminates the GSI memory "adjustment"; this was done previously to avoid/delay the need to implement a more general way to define GSI register offsets. Note that this patch causes "checkpatch" warnings due to indentation that aligns with an open parenthesis. The third patch makes use of the newly-defined register offsets, to eliminate the need for a function that hid a few details. The next modifies a different helper function to work properly for IPA v5.0+. The fifth patch changes the way the event ring size is specified based on how it's now done for IPA v5.0+. And the last defines a new register required for IPA v5.0+. ==================== Link: https://lore.kernel.org/r/20230215195352.755744-1-elder@linaro.org Signed-off-by: Paolo Abeni commit f651334e1ef5d1c8fba16a27dff2f3629e7e86e9 Author: Alex Elder Date: Wed Feb 15 13:53:52 2023 -0600 net: ipa: add HW_PARAM_4 GSI register Starting at IPA v5.0, the number of event rings per EE is defined in a field in a new HW_PARAM_4 GSI register rather than HW_PARAM_2. Define this new register and its fields, and update the code that checks the number of rings supported by hardware to use the proper field based on IPA version. Signed-off-by: Alex Elder Signed-off-by: Paolo Abeni commit 37cd29ec84016297e5b834345dd272a7d3bd8fae Author: Alex Elder Date: Wed Feb 15 13:53:51 2023 -0600 net: ipa: support different event ring encoding Starting with IPA v5.0, a channel's event ring index is encoded in a field in the CH_C_CNTXT_1 GSI register rather than CH_C_CNTXT_0. Define a new field ID for the former register and encode the event ring in the appropriate register. Signed-off-by: Alex Elder Signed-off-by: Paolo Abeni commit 62747512ebe6cd292e280aa7dc1dd37d36dcb637 Author: Alex Elder Date: Wed Feb 15 13:53:50 2023 -0600 net: ipa: avoid setting an undefined field The GSI channel protocol field in the CH_C_CNTXT_0 GSI register is widened starting IPA v5.0, making the CHTYPE_PROTOCOL_MSB field added in IPA v4.5 unnecessary. Update the code to reflect this. Signed-off-by: Alex Elder Signed-off-by: Paolo Abeni commit f75f44ddd4cb4bb0ede9c6c7f29679e9794552df Author: Alex Elder Date: Wed Feb 15 13:53:49 2023 -0600 net: ipa: kill ev_ch_e_cntxt_1_length_encode() Now that we explicitly define each register field width there is no need to have a special encoding function for the event ring length. Add a field for this to the EV_CH_E_CNTXT_1 GSI register, and use it in place of ev_ch_e_cntxt_1_length_encode() (which can be removed). Signed-off-by: Alex Elder Signed-off-by: Paolo Abeni commit 59b12b1d27f3f82e56462f0da6413e1849a06d3a Author: Alex Elder Date: Wed Feb 15 13:53:48 2023 -0600 net: ipa: kill gsi->virt_raw Starting at IPA v4.5, almost all GSI registers had their offsets changed by a fixed amount (shifted downward by 0xd000). Rather than defining offsets for all those registers dependent on version, an adjustment was applied for most register accesses. This was implemented in commit cdeee49f3ef7f ("net: ipa: adjust GSI register addresses"). It was later modified to be a bit more obvious about the adjusment, in commit 571b1e7e58ad3 ("net: ipa: use a separate pointer for adjusted GSI memory"). We now are able to define every GSI register with its own offset, so there's no need to implement this special adjustment. So get rid of the "virt_raw" pointer, and just maintain "virt" as the (non-adjusted) base address of I/O mapped GSI register memory. Redefine the offsets of all GSI registers (other than the INTER_EE ones, which were not subject to the adjustment) for IPA v4.5+, subtracting 0xd000 from their defined offsets instead. Move the ERROR_LOG and ERROR_LOG_CLR definitions further down in the register definition files so all registers are defined in order of their offset. Signed-off-by: Alex Elder Signed-off-by: Paolo Abeni commit ecfa80ce3b8740d0760f44cbd9e60f446682b3fa Author: Alex Elder Date: Wed Feb 15 13:53:47 2023 -0600 net: ipa: fix an incorrect assignment I spotted an error in a patch posted this week, unfortunately just after it got accepted. The effect of the bug is that time-based interrupt moderation is disabled. This is not technically a bug, but it is not what is intended. The problem is that a |= assignment got implemented as a simple assignment, so the previously assigned value was ignored. Fixes: edc6158b18af ("net: ipa: define fields for event-ring related registers") Signed-off-by: Alex Elder Signed-off-by: Paolo Abeni commit 1c93e48cc39147723abdcadc251611f6f0c18dee Author: Lorenzo Bianconi Date: Wed Feb 15 15:32:57 2023 +0100 net: dpaa2-eth: do not always set xsk support in xdp_features flag Do not always add NETDEV_XDP_ACT_XSK_ZEROCOPY bit in xdp_features flag but check if the NIC really supports it. Signed-off-by: Lorenzo Bianconi Reviewed-by: Larysa Zaremba Link: https://lore.kernel.org/r/3dba6ea42dc343a9f2d7d1a6a6a6c173235e1ebf.1676471386.git.lorenzo@kernel.org Signed-off-by: Paolo Abeni commit 6f8675a6b06dabe62015c6747df5e957cd159338 Author: Christophe Leroy Date: Sat Feb 18 10:28:50 2023 +0100 powerpc/e500: Add missing prototype for 'relocate_init' Kernel test robot reports: arch/powerpc/mm/nohash/e500.c:314:21: warning: no previous prototype for 'relocate_init' [-Wmissing-prototypes] 314 | notrace void __init relocate_init(u64 dt_ptr, phys_addr_t start) | ^~~~~~~~~~~~~ Add it in mm/mmu_decl.h, close to associated is_second_reloc variable declaration. Reported-by: kernel test robot Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/oe-kbuild-all/202302181136.wgyCKUcs-lkp@intel.com/ Link: https://lore.kernel.org/r/ac9107acf24135e1a07e8f84d2090572d43e3fe4.1676712510.git.christophe.leroy@csgroup.eu commit d3ca9f7aeba793d74361d88a8800b2f205c9236b Author: Hangyu Hua Date: Fri Feb 17 22:29:34 2023 +0900 ksmbd: fix possible memory leak in smb2_lock() argv needs to be free when setup_async_work fails or when the current process is woken up. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Cc: stable@vger.kernel.org Signed-off-by: Hangyu Hua Acked-by: Namjae Jeon Signed-off-by: Steve French commit e1d447157f232c650e6f32c9fb89ff3d0207c69a Author: Darrell Kavanagh Date: Wed Feb 15 11:50:45 2023 +0000 firmware/efi sysfb_efi: Add quirk for Lenovo IdeaPad Duet 3 Another Lenovo convertable which reports a landscape resolution of 1920x1200 with a pitch of (1920 * 4) bytes, while the actual framebuffer has a resolution of 1200x1920 with a pitch of (1200 * 4) bytes. Signed-off-by: Darrell Kavanagh Reviewed-by: Hans de Goede Signed-off-by: Ard Biesheuvel commit 0e68b5517d3767562889f1d83fdb828c26adb24f Author: Pierre Gondois Date: Wed Feb 15 17:10:47 2023 +0100 arm64: efi: Make efi_rt_lock a raw_spinlock Running a rt-kernel base on 6.2.0-rc3-rt1 on an Ampere Altra outputs the following: BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:46 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 9, name: kworker/u320:0 preempt_count: 2, expected: 0 RCU nest depth: 0, expected: 0 3 locks held by kworker/u320:0/9: #0: ffff3fff8c27d128 ((wq_completion)efi_rts_wq){+.+.}-{0:0}, at: process_one_work (./include/linux/atomic/atomic-long.h:41) #1: ffff80000861bdd0 ((work_completion)(&efi_rts_work.work)){+.+.}-{0:0}, at: process_one_work (./include/linux/atomic/atomic-long.h:41) #2: ffffdf7e1ed3e460 (efi_rt_lock){+.+.}-{3:3}, at: efi_call_rts (drivers/firmware/efi/runtime-wrappers.c:101) Preemption disabled at: efi_virtmap_load (./arch/arm64/include/asm/mmu_context.h:248) CPU: 0 PID: 9 Comm: kworker/u320:0 Tainted: G W 6.2.0-rc3-rt1 Hardware name: WIWYNN Mt.Jade Server System B81.03001.0005/Mt.Jade Motherboard, BIOS 1.08.20220218 (SCP: 1.08.20220218) 2022/02/18 Workqueue: efi_rts_wq efi_call_rts Call trace: dump_backtrace (arch/arm64/kernel/stacktrace.c:158) show_stack (arch/arm64/kernel/stacktrace.c:165) dump_stack_lvl (lib/dump_stack.c:107 (discriminator 4)) dump_stack (lib/dump_stack.c:114) __might_resched (kernel/sched/core.c:10134) rt_spin_lock (kernel/locking/rtmutex.c:1769 (discriminator 4)) efi_call_rts (drivers/firmware/efi/runtime-wrappers.c:101) [...] This seems to come from commit ff7a167961d1 ("arm64: efi: Execute runtime services from a dedicated stack") which adds a spinlock. This spinlock is taken through: efi_call_rts() \-efi_call_virt() \-efi_call_virt_pointer() \-arch_efi_call_virt_setup() Make 'efi_rt_lock' a raw_spinlock to avoid being preempted. [ardb: The EFI runtime services are called with a different set of translation tables, and are permitted to use the SIMD registers. The context switch code preserves/restores neither, and so EFI calls must be made with preemption disabled, rather than only disabling migration.] Fixes: ff7a167961d1 ("arm64: efi: Execute runtime services from a dedicated stack") Signed-off-by: Pierre Gondois Cc: # v6.1+ Signed-off-by: Ard Biesheuvel commit 66fb1d5df6ace316a4a6e2c31e13fc123ea2b644 Author: Edward Srouji Date: Thu Feb 16 11:13:45 2023 +0200 IB/mlx5: Extend debug control for CC parameters This patch adds rtt_resp_dscp to the current debug controllability of congestion control (CC) parameters. rtt_resp_dscp can be read or written through debugfs. If set, its value overwrites the DSCP of the generated RTT response. Signed-off-by: Edward Srouji Reviewed-by: Maor Gottlieb Link: https://lore.kernel.org/r/1dcc3440ee53c688f19f579a051ded81a2aaa70a.1676538714.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 85cc91e2ba4262a602ec65e2b76c4391a9e60d3d Author: Elvira Khabirova Date: Sat Feb 18 23:43:59 2023 +0100 mips: fix syscall_get_nr The implementation of syscall_get_nr on mips used to ignore the task argument and return the syscall number of the calling thread instead of the target thread. The bug was exposed to user space by commit 201766a20e30f ("ptrace: add PTRACE_GET_SYSCALL_INFO request") and detected by strace test suite. Link: https://github.com/strace/strace/issues/235 Fixes: c2d9f1775731 ("MIPS: Fix syscall_get_nr for the syscall exit tracing.") Cc: # v3.19+ Co-developed-by: Dmitry V. Levin Signed-off-by: Dmitry V. Levin Signed-off-by: Elvira Khabirova Signed-off-by: Thomas Bogendoerfer commit 6f02e39fa40f16c24e7a5c599a854c0d1682788d Author: Randy Dunlap Date: Fri Feb 17 12:07:49 2023 -0800 MIPS: SMP-CPS: fix build error when HOTPLUG_CPU not set When MIPS_CPS=y, MIPS_CPS_PM is not set, HOTPLUG_CPU is not set, and KEXEC=y, cps_shutdown_this_cpu() attempts to call cps_pm_enter_state(), which is not built when MIPS_CPS_PM is not set. Conditionally execute the else branch based on CONFIG_HOTPLUG_CPU to remove the build error. This build failure is from a randconfig file. mips-linux-ld: arch/mips/kernel/smp-cps.o: in function `$L162': smp-cps.c:(.text.cps_kexec_nonboot_cpu+0x31c): undefined reference to `cps_pm_enter_state' Fixes: 1447864bee4c ("MIPS: kexec: CPS systems to halt nonboot CPUs") Signed-off-by: Randy Dunlap Cc: Dengcheng Zhu Cc: Paul Burton Cc: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org Cc: Sergei Shtylyov Signed-off-by: Thomas Bogendoerfer commit ab47b3dae55300868efd0d4eb0d66a5d43315092 Author: H. Nikolaus Schaller Date: Wed Feb 15 18:31:56 2023 +0100 MIPS: DTS: jz4780: add #clock-cells to rtc_dev This makes the driver present the clk32k signal if requested. It is needed to clock the PMU of the BCM4330 WiFi and Bluetooth module of the CI20 board. Signed-off-by: H. Nikolaus Schaller Reviewed-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 0f7bfd6f8164be32dbbdf36aa1e5d00485c53cd7 Author: Baokun Li Date: Tue Jan 10 21:34:36 2023 +0800 ext4: fix task hung in ext4_xattr_delete_inode Syzbot reported a hung task problem: ================================================================== INFO: task syz-executor232:5073 blocked for more than 143 seconds. Not tainted 6.2.0-rc2-syzkaller-00024-g512dee0c00ad #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-exec232 state:D stack:21024 pid:5073 ppid:5072 flags:0x00004004 Call Trace: context_switch kernel/sched/core.c:5244 [inline] __schedule+0x995/0xe20 kernel/sched/core.c:6555 schedule+0xcb/0x190 kernel/sched/core.c:6631 __wait_on_freeing_inode fs/inode.c:2196 [inline] find_inode_fast+0x35a/0x4c0 fs/inode.c:950 iget_locked+0xb1/0x830 fs/inode.c:1273 __ext4_iget+0x22e/0x3ed0 fs/ext4/inode.c:4861 ext4_xattr_inode_iget+0x68/0x4e0 fs/ext4/xattr.c:389 ext4_xattr_inode_dec_ref_all+0x1a7/0xe50 fs/ext4/xattr.c:1148 ext4_xattr_delete_inode+0xb04/0xcd0 fs/ext4/xattr.c:2880 ext4_evict_inode+0xd7c/0x10b0 fs/ext4/inode.c:296 evict+0x2a4/0x620 fs/inode.c:664 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 RIP: 0033:0x7fa5406fd5ea RSP: 002b:00007ffc7232f968 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fa5406fd5ea RDX: 0000000020000440 RSI: 0000000020000000 RDI: 00007ffc7232f970 RBP: 00007ffc7232f970 R08: 00007ffc7232f9b0 R09: 0000000000000432 R10: 0000000000804a03 R11: 0000000000000202 R12: 0000000000000004 R13: 0000555556a7a2c0 R14: 00007ffc7232f9b0 R15: 0000000000000000 ================================================================== The problem is that the inode contains an xattr entry with ea_inum of 15 when cleaning up an orphan inode <15>. When evict inode <15>, the reference counting of the corresponding EA inode is decreased. When EA inode <15> is found by find_inode_fast() in __ext4_iget(), it is found that the EA inode holds the I_FREEING flag and waits for the EA inode to complete deletion. As a result, when inode <15> is being deleted, we wait for inode <15> to complete the deletion, resulting in an infinite loop and triggering Hung Task. To solve this problem, we only need to check whether the ino of EA inode and parent is the same before getting EA inode. Link: https://syzkaller.appspot.com/bug?extid=77d6fcc37bbb92f26048 Reported-by: syzbot+77d6fcc37bbb92f26048@syzkaller.appspotmail.com Signed-off-by: Baokun Li Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230110133436.996350-1-libaokun1@huawei.com Signed-off-by: Theodore Ts'o commit e6b9bd7290d334451ce054e98e752abc055e0034 Author: Zhihao Cheng Date: Tue Jan 10 09:53:27 2023 +0800 jbd2: fix data missing when reusing bh which is ready to be checkpointed Following process will make data lost and could lead to a filesystem corrupted problem: 1. jh(bh) is inserted into T1->t_checkpoint_list, bh is dirty, and jh->b_transaction = NULL 2. T1 is added into journal->j_checkpoint_transactions. 3. Get bh prepare to write while doing checkpoing: PA PB do_get_write_access jbd2_log_do_checkpoint spin_lock(&jh->b_state_lock) if (buffer_dirty(bh)) clear_buffer_dirty(bh) // clear buffer dirty set_buffer_jbddirty(bh) transaction = journal->j_checkpoint_transactions jh = transaction->t_checkpoint_list if (!buffer_dirty(bh)) __jbd2_journal_remove_checkpoint(jh) // bh won't be flushed jbd2_cleanup_journal_tail __jbd2_journal_file_buffer(jh, transaction, BJ_Reserved) 4. Aborting journal/Power-cut before writing latest bh on journal area. In this way we get a corrupted filesystem with bh's data lost. Fix it by moving the clearing of buffer_dirty bit just before the call to __jbd2_journal_file_buffer(), both bit clearing and jh->b_transaction assignment are under journal->j_list_lock locked, so that jbd2_log_do_checkpoint() will wait until jh's new transaction fininshed even bh is currently not dirty. And journal_shrink_one_cp_list() won't remove jh from checkpoint list if the buffer head is reused in do_get_write_access(). Fetch a reproducer in [Link]. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216898 Cc: Signed-off-by: Zhihao Cheng Signed-off-by: zhanchengbin Suggested-by: Jan Kara Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230110015327.1181863-1-chengzhihao1@huawei.com Signed-off-by: Theodore Ts'o commit 3039d8b8692408438a618fac2776b629852663c3 Author: Baokun Li Date: Sat Jan 7 11:21:26 2023 +0800 ext4: update s_journal_inum if it changes after journal replay When mounting a crafted ext4 image, s_journal_inum may change after journal replay, which is obviously unreasonable because we have successfully loaded and replayed the journal through the old s_journal_inum. And the new s_journal_inum bypasses some of the checks in ext4_get_journal(), which may trigger a null pointer dereference problem. So if s_journal_inum changes after the journal replay, we ignore the change, and rewrite the current journal_inum to the superblock. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216541 Reported-by: Luís Henriques Signed-off-by: Baokun Li Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230107032126.4165860-3-libaokun1@huawei.com Signed-off-by: Theodore Ts'o commit 5cd740287ae5e3f9d1c46f5bfe8778972fd6d3fe Author: Baokun Li Date: Sat Jan 7 11:21:25 2023 +0800 ext4: fail ext4_iget if special inode unallocated In ext4_fill_super(), EXT4_ORPHAN_FS flag is cleared after ext4_orphan_cleanup() is executed. Therefore, when __ext4_iget() is called to get an inode whose i_nlink is 0 when the flag exists, no error is returned. If the inode is a special inode, a null pointer dereference may occur. If the value of i_nlink is 0 for any inodes (except boot loader inodes) got by using the EXT4_IGET_SPECIAL flag, the current file system is corrupted. Therefore, make the ext4_iget() function return an error if it gets such an abnormal special inode. Link: https://bugzilla.kernel.org/show_bug.cgi?id=199179 Link: https://bugzilla.kernel.org/show_bug.cgi?id=216541 Link: https://bugzilla.kernel.org/show_bug.cgi?id=216539 Reported-by: Luís Henriques Suggested-by: Theodore Ts'o Signed-off-by: Baokun Li Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230107032126.4165860-2-libaokun1@huawei.com Signed-off-by: Theodore Ts'o commit d99a55a94a0db8eda4a336a6f21730b844b8d2d2 Author: Kees Cook Date: Wed Jan 4 13:09:12 2023 -0800 ext4: fix function prototype mismatch for ext4_feat_ktype 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. ext4_feat_ktype was setting the "release" handler to "kfree", which doesn't have a matching function prototype. Add a simple wrapper with the correct prototype. This was found as a result of Clang's new -Wcast-function-type-strict flag, which is more sensitive than the simpler -Wcast-function-type, which only checks for type width mismatches. Note that this code is only reached when ext4 is a loadable module and it is being unloaded: CFI failure at kobject_put+0xbb/0x1b0 (target: kfree+0x0/0x180; expected type: 0x7c4aa698) ... RIP: 0010:kobject_put+0xbb/0x1b0 ... Call Trace: ext4_exit_sysfs+0x14/0x60 [ext4] cleanup_module+0x67/0xedb [ext4] Fixes: b99fee58a20a ("ext4: create ext4_feat kobject dynamically") Cc: Theodore Ts'o Cc: Eric Biggers Cc: stable@vger.kernel.org Build-tested-by: Gustavo A. R. Silva Reviewed-by: Gustavo A. R. Silva Reviewed-by: Nathan Chancellor Link: https://lore.kernel.org/r/20230103234616.never.915-kees@kernel.org Signed-off-by: Kees Cook Reviewed-by: Eric Biggers Link: https://lore.kernel.org/r/20230104210908.gonna.388-kees@kernel.org Signed-off-by: Theodore Ts'o commit 7fc51f923ea6b1c6f304789965414149eaedb358 Author: XU pengfei Date: Wed Jan 4 13:52:29 2023 +0800 ext4: remove unnecessary variable initialization Variables are assigned first and then used. Initialization is not required. Signed-off-by: XU pengfei Link: https://lore.kernel.org/r/20230104055229.3663-1-xupengfei@nfschina.com commit 3f5424790d4377839093b68c12b130077a4e4510 Author: zhanchengbin Date: Tue Jan 3 10:28:12 2023 +0800 ext4: fix inode tree inconsistency caused by ENOMEM If ENOMEM fails when the extent is splitting, we need to restore the length of the split extent. In the ext4_split_extent_at function, only in ext4_ext_create_new_leaf will it alloc memory and change the shape of the extent tree,even if an ENOMEM is returned at this time, the extent tree is still self-consistent, Just restore the split extent lens in the function ext4_split_extent_at. ext4_split_extent_at ext4_ext_insert_extent ext4_ext_create_new_leaf 1)ext4_ext_split ext4_find_extent 2)ext4_ext_grow_indepth ext4_find_extent Signed-off-by: zhanchengbin Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230103022812.130603-1-zhanchengbin1@huawei.com Signed-off-by: Theodore Ts'o commit f31173c19901a96bb2ebf6bcfec8a08df7095c91 Author: Jun Nie Date: Tue Jan 3 09:45:17 2023 +0800 ext4: refuse to create ea block when umounted The ea block expansion need to access s_root while it is already set as NULL when umount is triggered. Refuse this request to avoid panic. Reported-by: syzbot+2dacb8f015bf1420155f@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=3613786cb88c93aa1c6a279b1df6a7b201347d08 Link: https://lore.kernel.org/r/20230103014517.495275-3-jun.nie@linaro.org Cc: stable@kernel.org Signed-off-by: Jun Nie Signed-off-by: Theodore Ts'o commit 1e9d62d252812575ded7c620d8fc67c32ff06c16 Author: Jun Nie Date: Tue Jan 3 09:45:16 2023 +0800 ext4: optimize ea_inode block expansion Copy ea data from inode entry when expanding ea block if possible. Then remove the ea entry if expansion success. Thus memcpy to a temporary buffer may be avoided. If the expansion fails, we do not need to recovery the removed ea entry neither in this way. Reported-by: syzbot+2dacb8f015bf1420155f@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=3613786cb88c93aa1c6a279b1df6a7b201347d08 Link: https://lore.kernel.org/r/20230103014517.495275-2-jun.nie@linaro.org Cc: stable@kernel.org Signed-off-by: Jun Nie Signed-off-by: Theodore Ts'o commit 08abd0466ec9113908e674d042ec2a36dfc2875c Author: Tanmay Bhushan <007047221b@gmail.com> Date: Fri Dec 30 15:18:58 2022 +0100 ext4: remove dead code in updating backup sb ext4_update_backup_sb checks for err having some value after unlocking buffer. But err has not been updated till that point in any code which will lead execution of the code in question. Signed-off-by: Tanmay Bhushan <007047221b@gmail.com> Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20221230141858.3828-1-007047221b@gmail.com Signed-off-by: Theodore Ts'o commit 6f3ee0e22b4c62f44b8fa3c8de6e369a4d112a75 Merge: 188a569658584 a83bf176fed4e Author: Thomas Gleixner Date: Sun Feb 19 00:07:56 2023 +0100 Merge tag 'irqchip-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Pull irqchip updates from Marc Zyngier: - New and improved irqdomain locking, closing a number of races that became apparent now that we are able to probe drivers in parallel - A bunch of OF node refcounting bugs have been fixed - We now have a new IPI mux, lifted from the Apple AIC code and made common. It is expected that riscv will eventually benefit from it - Two small fixes for the Broadcom L2 drivers - Various cleanups and minor bug fixes Link: https://lore.kernel.org/r/20230218143452.3817627-1-maz@kernel.org commit 7568a21e52f60930ba8ae7897c2521bdab3ef5a4 Author: Wang ShaoBo Date: Wed Nov 23 14:51:24 2022 +0800 tracing: Remove unnecessary NULL assignment Remove unnecessary NULL assignment int create_new_subsystem(). Link: https://lkml.kernel.org/r/20221123065124.3982439-1-bobo.shaobowang@huawei.com Signed-off-by: Wang ShaoBo Signed-off-by: Steven Rostedt (Google) commit e7bb66f79a7b19a47b3eff745ea9f7ba1ae76032 Author: Jianlin Lv Date: Wed Nov 2 16:02:36 2022 +0000 tracepoint: Allow livepatch module add trace event In the case of keeping the system running, the preferred method for tracing the kernel is dynamic tracing (kprobe), but the drawback of this method is that events are lost, especially when tracing packages in the network stack. Livepatching provides a potential solution, which is to reimplement the function you want to replace and insert a static tracepoint. In such a way, custom stable static tracepoints can be expanded without rebooting the system. Link: https://lkml.kernel.org/r/20221102160236.11696-1-iecedge@gmail.com Signed-off-by: Jianlin Lv Signed-off-by: Steven Rostedt (Google) commit 2455f0e124d317dd08d337a7550a78a224d4ba41 Author: Ross Zwisler Date: Wed Feb 15 15:33:45 2023 -0700 tracing: Always 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 Kconfig help messages in the tracing code still refer to this older debugfs path, so let's update them to avoid confusion. Link: https://lore.kernel.org/linux-trace-kernel/20230215223350.2658616-2-zwisler@google.com Acked-by: Masami Hiramatsu (Google) Reviewed-by: Mukesh Ojha Signed-off-by: Ross Zwisler Signed-off-by: Steven Rostedt (Google) commit 03fada47311a3e668f73efc9278c4a559e64ee85 Author: Mehdi Djait Date: Sat Feb 18 14:51:11 2023 +0100 iio: accel: kionix-kx022a: Get the timestamp from the driver's private data in the trigger_handler The trigger_handler gets called from the IRQ thread handler using iio_trigger_poll_chained() which will only call the bottom half of the pollfunc and therefore pf->timestamp will not get set. Use instead the timestamp from the driver's private data which is always set in the IRQ handler. Fixes: 7c1d1677b322 ("iio: accel: Support Kionix/ROHM KX022A accelerometer") Link: https://lore.kernel.org/linux-iio/Y+6QoBLh1k82cJVN@carbian/ Reviewed-by: Matti Vaittinen Signed-off-by: Mehdi Djait Link: https://lore.kernel.org/r/20230218135111.90061-1-mehdi.djait.k@gmail.com Cc: Signed-off-by: Jonathan Cameron commit 0c6ef985a1fd8a74dcb5cad941ddcadd55cb8697 Author: Nuno Sá Date: Fri Jan 20 13:46:45 2023 +0100 iio: adc: ad7791: fix IRQ flags The interrupt is triggered on the falling edge rather than being a level low interrupt. Fixes: da4d3d6bb9f6 ("iio: adc: ad-sigma-delta: Allow custom IRQ flags") Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20230120124645.819910-1-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit 4ecc96cba8d93d86abf46d17067e9b4c96241a29 Author: Thomas Weißschuh Date: Thu Feb 16 01:10:59 2023 +0000 xen: sysfs: 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: Juergen Gross Link: https://lore.kernel.org/r/20230216-kobj_type-xen-v1-1-742423de7d71@weissschuh.net Signed-off-by: Juergen Gross commit ed9a8ad7d8a1a0eb7d4e1414d0a04ece7c2265df Author: Miquel Raynal Date: Tue Feb 14 14:50:35 2023 +0100 ieee802154: Drop device trackers In order to prevent a device from disappearing when a background job was started, dev_hold() and dev_put() calls were made. During the stabilization phase of the scan/beacon features, it was later decided that removing the device while a background job was ongoing was a valid use case, and we should instead stop the background job and then remove the device, rather than prevent the device from being removed. This is what is currently done, which means manually reference counting the device during background jobs is no longer needed. Fixes: ed3557c947e1 ("ieee802154: Add support for user scanning requests") Fixes: 9bc114504b07 ("ieee802154: Add support for user beaconing requests") Reported-by: Jakub Kicinski Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20230214135035.1202471-7-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt commit 61d7dddf46caa1c6dd869385a275e4d2931e7090 Author: Miquel Raynal Date: Tue Feb 14 14:50:34 2023 +0100 mac802154: Fix an always true condition At this stage we simply do not care about the delayed work value, because active scan is not yet supported, so we can blindly queue another work once a beacon has been sent. It fixes a smatch warning: mac802154_beacon_worker() warn: always true condition '(local->beacon_interval >= 0) => (0-u32max >= 0)' Fixes: 3accf4762734 ("mac802154: Handle basic beaconing") Reported-by: kernel test robot Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20230214135035.1202471-6-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt commit 1375e3ba9d773f2dbac96ebddfdd0d160276ca40 Author: Miquel Raynal Date: Tue Feb 14 14:50:33 2023 +0100 mac802154: Send beacons using the MLME Tx path Using ieee802154_subif_start_xmit() to bypass the net queue when sending beacons is broken because it does not acquire the HARD_TX_LOCK(), hence not preventing datagram buffers to be smashed by beacons upon contention situation. Using the mlme_tx helper is not the best fit either but at least it is not buggy and has little-to-no performance hit. More details are given in the comment explaining this choice in the code. Fixes: 3accf4762734 ("mac802154: Handle basic beaconing") Reported-by: Alexander Aring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20230214135035.1202471-5-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt commit 1edecbd0bd45c9c899e0f82b123342f28423468c Author: Miquel Raynal Date: Tue Feb 14 14:50:32 2023 +0100 ieee802154: Change error code on monitor scan netlink request Returning EPERM gives the impression that "right now" it is not possible, but "later" it could be, while what we want to express is the fact that this is not currently supported at all (might change in the future). So let's return EOPNOTSUPP instead. Fixes: ed3557c947e1 ("ieee802154: Add support for user scanning requests") Suggested-by: Alexander Aring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20230214135035.1202471-4-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt commit a0b6106672b53158bf141d1a713aef2c891d74b1 Author: Miquel Raynal Date: Tue Feb 14 14:50:31 2023 +0100 ieee802154: Convert scan error messages to extack Instead of printing error messages in the kernel log, let's use extack. When there is a netlink error returned that could be further specified with a string, use extack as well. Apply this logic to the very recent scan/beacon infrastructure. Fixes: ed3557c947e1 ("ieee802154: Add support for user scanning requests") Fixes: 9bc114504b07 ("ieee802154: Add support for user beaconing requests") Suggested-by: Jakub Kicinski Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20230214135035.1202471-3-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt commit 648324c9b690bcda0ac6f6499370effc0336ee27 Author: Miquel Raynal Date: Tue Feb 14 14:50:30 2023 +0100 ieee802154: Use netlink policies when relevant on scan parameters Instead of open-coding scan parameters (page, channels, duration, etc), let's use the existing NLA_POLICY* macros. This help greatly reducing the error handling and clarifying the overall logic. Fixes: ed3557c947e1 ("ieee802154: Add support for user scanning requests") Suggested-by: Jakub Kicinski Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20230214135035.1202471-2-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt commit bedd29d793da3312e1350a56245c4971a38d4453 Merge: ceaa837f96adb 9e6a1825aca85 2f599c3ff4e6f 1505e7215eb73 9e6132179a62f 257ec29074192 f451c7a5a3b81 2cc73c5712f97 Author: Joerg Roedel Date: Sat Feb 18 15:43:04 2023 +0100 Merge branches 'apple/dart', 'arm/exynos', 'arm/renesas', 'arm/smmu', 'x86/vt-d', 'x86/amd' and 'core' into next commit f451c7a5a3b818ecfeba2ba258570769998baf3a Author: Vasant Hegde Date: Wed Feb 15 05:26:41 2023 +0000 iommu/amd: Skip attach device domain is same as new domain If device->domain is same as new domain then we can skip the device attach process. Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20230215052642.6016-2-vasant.hegde@amd.com Signed-off-by: Joerg Roedel commit 2cc73c5712f97de98c38c2fafc1f288354a9f3c3 Author: Vasant Hegde Date: Wed Feb 15 05:26:40 2023 +0000 iommu: Attach device group to old domain in error path iommu_attach_group() attaches all devices in a group to domain and then sets group domain (group->domain). Current code (__iommu_attach_group()) does not handle error path. This creates problem as devices to domain attachment is in inconsistent state. Flow: - During boot iommu attach devices to default domain - Later some device driver (like amd/iommu_v2 or vfio) tries to attach device to new domain. - In iommu_attach_group() path we detach device from current domain. Then it tries to attach devices to new domain. - If it fails to attach device to new domain then device to domain link is broken. - iommu_attach_group() returns error. - At this stage iommu_attach_group() caller thinks, attaching device to new domain failed and devices are still attached to old domain. - But in reality device to old domain link is broken. It will result in all sort of failures (like IO page fault) later. To recover from this situation, we need to attach all devices back to the old domain. Also log warning if it fails attach device back to old domain. Suggested-by: Lu Baolu Reported-by: Matt Fagnani Signed-off-by: Vasant Hegde Reviewed-by: Jason Gunthorpe Tested-by: Matt Fagnani Link: https://lore.kernel.org/r/20230215052642.6016-1-vasant.hegde@amd.com Link: https://bugzilla.kernel.org/show_bug.cgi?id=216865 Link: https://lore.kernel.org/lkml/15d0f9ff-2a56-b3e9-5b45-e6b23300ae3b@leemhuis.info/ Signed-off-by: Joerg Roedel commit a83bf176fed4ee88dad84d59f77dde153b9a442a Merge: 7135b35fc9596 13a157b38ca5b Author: Marc Zyngier Date: Sat Feb 18 14:25:09 2023 +0000 Merge branch irq/bcm-l2-fixes into irq/irqchip-next * irq/bcm-l2-fixes: : . : Broadcom L2 irqchip fixes for correct handling of level interrupts, : courtesy of Florian Fainelli. : . irqchip/irq-bcm7120-l2: Set IRQ_LEVEL for level triggered interrupts irqchip/irq-brcmstb-l2: Set IRQ_LEVEL for level triggered interrupts Signed-off-by: Marc Zyngier commit 13a157b38ca5b4f9eed81442b8821db293755961 Author: Florian Fainelli Date: Fri Dec 16 15:09:34 2022 -0800 irqchip/irq-bcm7120-l2: Set IRQ_LEVEL for level triggered interrupts When support for the interrupt controller was added with a5042de2688d, we forgot to update the flags to be set to contain IRQ_LEVEL. While the flow handler is correct, the output from /proc/interrupts does not show such interrupts as being level triggered when they are, correct that. Fixes: a5042de2688d ("irqchip: bcm7120-l2: Add Broadcom BCM7120-style Level 2 interrupt controller") Signed-off-by: Florian Fainelli Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221216230934.2478345-3-f.fainelli@gmail.com commit 94debe03e8afa1267f95a9001786a6aa506b9ff3 Author: Florian Fainelli Date: Fri Dec 16 15:09:33 2022 -0800 irqchip/irq-brcmstb-l2: Set IRQ_LEVEL for level triggered interrupts When support for the level triggered interrupt controller flavor was added with c0ca7262088e, we forgot to update the flags to be set to contain IRQ_LEVEL. While the flow handler is correct, the output from /proc/interrupts does not show such interrupts as being level triggered when they are, correct that. Fixes: c0ca7262088e ("irqchip/brcmstb-l2: Add support for the BCM7271 L2 controller") Signed-off-by: Florian Fainelli Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221216230934.2478345-2-f.fainelli@gmail.com commit 000987a38b53c172f435142a4026dd71378ca464 Author: George Cherian Date: Thu Feb 9 02:11:17 2023 +0000 watchdog: sbsa_wdog: Make sure the timeout programming is within the limits Make sure to honour the max_hw_heartbeat_ms while programming the timeout value to WOR. Clamp the timeout passed to sbsa_gwdt_set_timeout() to make sure the programmed value is within the permissible range. Fixes: abd3ac7902fb ("watchdog: sbsa: Support architecture version 1") Signed-off-by: George Cherian Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230209021117.1512097-1-george.cherian@marvell.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit c76675f4ef35504eb1df8f0f0f0c1e2675d75f67 Author: Bartosz Golaszewski Date: Wed Feb 1 16:20:36 2023 +0100 dt-bindings: watchdog: qcom-wdt: add qcom,apss-wdt-sa8775p compatible Add a compatible for the sa8775p platform's KPSS watchdog. Signed-off-by: Bartosz Golaszewski Acked-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230201152038.203387-4-brgl@bgdev.pl Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit ad8bc199b2e3197f53228fba05128069e31893c7 Author: Thomas Weißschuh Date: Mon Dec 19 21:30:40 2022 +0000 watchdog: report options in sysfs This synchronizes the information reported by ioctl and sysfs. The mismatch is confusing because "wdctl" from util-linux uses the ioctl when used with root privileges and sysfs without. Signed-off-by: Thomas Weißschuh Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221216-watchdog-sysfs-v2-2-6189311103a9@weissschuh.net [groeck: Fixed continuation line alignment] Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit b852e7a4a9ab6a1fb08c5aa36b1043672fd814dc Author: Thomas Weißschuh Date: Mon Dec 19 21:30:39 2022 +0000 watchdog: report fw_version in sysfs This synchronizes the information reported by ioctl and sysfs. The mismatch is confusing because "wdctl" from util-linux uses the ioctl when used with root privileges and sysfs without. The file is called "fw_version" instead of "firmware_version" as "firmware_version" is already used as custom attribute by single drivers. Signed-off-by: Thomas Weißschuh Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221216-watchdog-sysfs-v2-1-6189311103a9@weissschuh.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 12878a9fff5a2d45f4f5c71c83fee77f94aa1f8c Author: Andrej Picej Date: Fri Nov 4 08:03:57 2022 +0100 dt-bindings: watchdog: fsl-imx: document suspend in wait mode Property "fsl,suspend-in-wait" suspends watchdog in "WAIT" mode which corresponds to Linux's Suspend-to-Idle S0 mode. If this property is not set and the device is put into Suspend-to-Idle mode, the watchdog triggers a reset after 128 seconds. Signed-off-by: Andrej Picej Reviewed-by: Fabio Estevam Reviewed-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221104070358.426657-3-andrej.picej@norik.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e42c73f1ef0da5970a71f98440193fa9b1e9fb86 Author: Andrej Picej Date: Fri Nov 4 08:03:56 2022 +0100 watchdog: imx2_wdg: suspend watchdog in WAIT mode Putting device into the "Suspend-To-Idle" mode causes watchdog to trigger and resets the board after set watchdog timeout period elapses. Introduce new device-tree property "fsl,suspend-in-wait" which suspends watchdog in WAIT mode. This is done by setting WDW bit in WCR (Watchdog Control Register). Watchdog operation is restored after exiting WAIT mode as expected. WAIT mode corresponds with Linux's "Suspend-To-Idle". Signed-off-by: Andrej Picej Reviewed-by: Fabio Estevam Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221104070358.426657-2-andrej.picej@norik.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 7d06c07c67100fd0f8e6b3ab7145ce789f788117 Author: Li Hua Date: Wed Nov 16 10:07:06 2022 +0800 watchdog: pcwd_usb: Fix attempting to access uninitialized memory The stack variable msb and lsb may be used uninitialized in function usb_pcwd_get_temperature and usb_pcwd_get_timeleft when usb card no response. The build waring is: drivers/watchdog/pcwd_usb.c:336:22: error: ‘lsb’ is used uninitialized in this function [-Werror=uninitialized] *temperature = (lsb * 9 / 5) + 32; ~~~~^~~ drivers/watchdog/pcwd_usb.c:328:21: note: ‘lsb’ was declared here unsigned char msb, lsb; ^~~ cc1: all warnings being treated as errors scripts/Makefile.build:250: recipe for target 'drivers/watchdog/pcwd_usb.o' failed make[3]: *** [drivers/watchdog/pcwd_usb.o] Error 1 Fixes: b7e04f8c61a4 ("mv watchdog tree under drivers") Signed-off-by: Li Hua Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221116020706.70847-1-hucool.lihua@huawei.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 733318534849044089de8c818a2fb1c67fa39bd1 Author: Krzysztof Kozlowski Date: Fri Jan 13 11:33:45 2023 +0100 dt-bindings: watchdog: qcom-wdt: merge MSM timer Merge Qualcomm MSM timer bindings into watchdog, because the timer compatibles are already included here and the hardware is quite similar. While converting the MSM timer bindings, adjust clock-frequency property to take only one frequency, instead of two, because: 1. DT schema does not allow to frequencies, 2. The Linux timer driver reads only first frequency. Signed-off-by: Krzysztof Kozlowski Acked-by: Daniel Lezcano Reviewed-by: Guenter Roeck Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221212163532.142533-6-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 7c631cdff391dd8af4e56fc4cd162d6e6504aeec Author: Krzysztof Kozlowski Date: Fri Jan 13 11:33:44 2023 +0100 dt-bindings: watchdog: qcom-wdt: allow interrupts Both of type of watchdogs described in the binding (the KPSS watchdog and APSS WDT timer) have interrupts. Allow interrupts and describe them for KPSS watchdog to fix warnings like: watchdog@17c10000: Unevaluated properties are not allowed ('interrupts' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221212163532.142533-5-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 2bb28d179891cb073ea96fb9238257f871e158c1 Author: Krzysztof Kozlowski Date: Fri Jan 13 11:33:43 2023 +0100 dt-bindings: watchdog: qcom-wdt: add qcom,kpss-wdt-mdm9615 Document new MDM9615 qcom,kpss-wdt-mdm9615 watchdog/timer compatible. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221212163532.142533-4-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit b8c8f8649ba1765cbd7e5c92f36c6553a9fadedf Author: Krzysztof Kozlowski Date: Fri Jan 13 11:33:42 2023 +0100 dt-bindings: watchdog: qcom-wdt: fix list of MSM timer compatibles The MSM timer ("qcom,msm-timer") is a bit different timer and watchdog device than KPSS watchdog. It has its own generic and specific compatibles, so fix the list to reflect this. Adjust the example to show the newer KPSS watchdog. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221212163532.142533-3-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit f8e6b3d9e3cf60bb111ccc9294eb3fe7c7759193 Author: Krzysztof Kozlowski Date: Fri Jan 13 11:33:41 2023 +0100 dt-bindings: watchdog: qcom-wdt: do not allow fallback alone The compatible "qcom,kpss-wdt" is too generic and should not be used alone. Mark it as deprecated when not prepended by specific compatible. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221212163532.142533-2-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 8e103beca676b871e06d282ed140bf5a3631e381 Author: Krzysztof Kozlowski Date: Fri Jan 13 11:33:40 2023 +0100 dt-bindings: watchdog: qcom-wdt: require fallback for IPQ4019 The device specific compatibles ("qcom,kpss-wdt-ipq4019") should be follwed by fallback "qcom,kpss-wdt", which is actually used by Linux driver for binding. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221212163532.142533-1-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 13721a2ac66b246f5802ba1b75ad8637e53eeecc Author: Chen Jun Date: Wed Nov 16 01:27:14 2022 +0000 watchdog: Fix kmemleak in watchdog_cdev_register kmemleak reports memory leaks in watchdog_dev_register, as follows: unreferenced object 0xffff888116233000 (size 2048): comm ""modprobe"", pid 28147, jiffies 4353426116 (age 61.741s) hex dump (first 32 bytes): 80 fa b9 05 81 88 ff ff 08 30 23 16 81 88 ff ff .........0#..... 08 30 23 16 81 88 ff ff 00 00 00 00 00 00 00 00 .0#............. backtrace: [<000000007f001ffd>] __kmem_cache_alloc_node+0x157/0x220 [<000000006a389304>] kmalloc_trace+0x21/0x110 [<000000008d640eea>] watchdog_dev_register+0x4e/0x780 [watchdog] [<0000000053c9f248>] __watchdog_register_device+0x4f0/0x680 [watchdog] [<00000000b2979824>] watchdog_register_device+0xd2/0x110 [watchdog] [<000000001f730178>] 0xffffffffc10880ae [<000000007a1a8bcc>] do_one_initcall+0xcb/0x4d0 [<00000000b98be325>] do_init_module+0x1ca/0x5f0 [<0000000046d08e7c>] load_module+0x6133/0x70f0 ... unreferenced object 0xffff888105b9fa80 (size 16): comm ""modprobe"", pid 28147, jiffies 4353426116 (age 61.741s) hex dump (first 16 bytes): 77 61 74 63 68 64 6f 67 31 00 b9 05 81 88 ff ff watchdog1....... backtrace: [<000000007f001ffd>] __kmem_cache_alloc_node+0x157/0x220 [<00000000486ab89b>] __kmalloc_node_track_caller+0x44/0x1b0 [<000000005a39aab0>] kvasprintf+0xb5/0x140 [<0000000024806f85>] kvasprintf_const+0x55/0x180 [<000000009276cb7f>] kobject_set_name_vargs+0x56/0x150 [<00000000a92e820b>] dev_set_name+0xab/0xe0 [<00000000cec812c6>] watchdog_dev_register+0x285/0x780 [watchdog] [<0000000053c9f248>] __watchdog_register_device+0x4f0/0x680 [watchdog] [<00000000b2979824>] watchdog_register_device+0xd2/0x110 [watchdog] [<000000001f730178>] 0xffffffffc10880ae [<000000007a1a8bcc>] do_one_initcall+0xcb/0x4d0 [<00000000b98be325>] do_init_module+0x1ca/0x5f0 [<0000000046d08e7c>] load_module+0x6133/0x70f0 ... The reason is that put_device is not be called if cdev_device_add fails and wdd->id != 0. watchdog_cdev_register wd_data = kzalloc [1] err = dev_set_name [2] .. err = cdev_device_add if (err) { if (wdd->id == 0) { // wdd->id != 0 .. } return err; // [1],[2] would be leaked To fix it, call put_device in all wdd->id cases. Fixes: 72139dfa2464 ("watchdog: Fix the race between the release of watchdog_core_data and cdev") Signed-off-by: Chen Jun Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221116012714.102066-1-chenjun102@huawei.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit a243cb9357cc21a441c464e63b151e292a732d56 Author: Christophe JAILLET Date: Sat Nov 5 12:09:34 2022 +0100 watchdog: Include when appropriate The kstrto() functions have been moved from kernel.h to kstrtox.h. So, in order to eventually remove from , include the latter directly in the appropriate files. Signed-off-by: Christophe JAILLET Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/08fd5512e569558231247515c04c8596a1d11004.1667646547.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 07bec0e09c1afbab4c5674fd2341f4f52d594f30 Author: ruanjinjie Date: Wed Nov 16 17:49:50 2022 +0800 watchdog: at91sam9_wdt: use devm_request_irq to avoid missing free_irq() in error path free_irq() is missing in case of error in at91_wdt_init(), use devm_request_irq to fix that. Fixes: 5161b31dc39a ("watchdog: at91sam9_wdt: better watchdog support") Signed-off-by: ruanjinjie Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221116094950.3141943-1-ruanjinjie@huawei.com [groeck: Adjust multi-line alignment] Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit f769f97917c1e756e12ff042a93f6e3167254b5b Author: Fabrizio Castro Date: Thu Nov 17 11:49:07 2022 +0000 watchdog: rzg2l_wdt: Handle TYPE-B reset for RZ/V2M As per section 48.4 of the HW User Manual, IPs in the RZ/V2M SoC need either a TYPE-A reset sequence or a TYPE-B reset sequence. More specifically, the watchdog IP needs a TYPE-B reset sequence. If the proper reset sequence isn't implemented, then resetting IPs may lead to undesired behaviour. In the restart callback of the watchdog driver the reset has basically no effect on the desired funcionality, as the register writes following the reset happen before the IP manages to come out of reset. Implement the TYPE-B reset sequence in the watchdog driver to address the issues with the restart callback on RZ/V2M. Fixes: ec122fd94eeb ("watchdog: rzg2l_wdt: Add rzv2m support") Signed-off-by: Fabrizio Castro Reviewed-by: Guenter Roeck Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20221117114907.138583-3-fabrizio.castro.jz@renesas.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 6ba6f0f5910d5916539268c0ad55657bb8940616 Author: Lad Prabhakar Date: Thu Nov 17 11:49:06 2022 +0000 watchdog: rzg2l_wdt: Issue a reset before we put the PM clocks On RZ/Five SoC it was observed that setting timeout (to say 1 sec) wouldn't reset the system. The procedure described in the HW manual (Procedure for Activating Modules) for activating the target module states we need to start supply of the clock module before applying the reset signal. This patch makes sure we follow the same procedure to clear the registers of the WDT module, fixing the issues seen on RZ/Five SoC. While at it re-used rzg2l_wdt_stop() in rzg2l_wdt_set_timeout() as it has the same function calls. Fixes: 4055ee81009e ("watchdog: rzg2l_wdt: Add set_timeout callback") Signed-off-by: Lad Prabhakar Reviewed-by: Guenter Roeck Reviewed-by: Geert Uytterhoeven Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20221117114907.138583-2-fabrizio.castro.jz@renesas.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e9651838fe7727c1c8b193b0217307c4c2260777 Author: Konrad Dybcio Date: Thu Nov 17 11:58:45 2022 +0100 dt-bindings: watchdog: Add MSM8994 watchdog timer Document the MSM8994 watchdog timer which is already used in DT. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221117105845.13644-2-konrad.dybcio@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit d237c8d06d5a08a2dacb07c0ab07af696a58516c Author: Lad Prabhakar Date: Fri Nov 18 13:38:29 2022 +0000 dt-bindings: watchdog: renesas,wdt: Document RZ/Five SoC The WDT block on the RZ/Five SoC is identical to one found on the RZ/G2UL SoC. "renesas,r9a07g043-wdt" compatible string will be used on the RZ/Five SoC so to make this clear, update the comment to include RZ/Five SoC. No driver changes are required as generic compatible string "renesas,rzg2l-wdt" will be used as a fallback on RZ/Five SoC. Signed-off-by: Lad Prabhakar Acked-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20221118133829.12855-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 69197b43d9e3b164e847beede62d576ee01ee081 Author: Neil Armstrong Date: Mon Jan 23 11:10:00 2023 +0100 dt-bindings: watchdog: convert meson-wdt.txt to dt-schema Convert the Amlogic Meson6 SoCs Watchdog timer bindings to dt-schema. Take in account the used interrupts property. The "amlogic,meson8-wdt" representation has been simplified since there's no users of this compatible used along the "amlogic,meson6-wdt". Reviewed-by: Krzysztof Kozlowski Reviewed-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221117-b4-amlogic-bindings-convert-v3-3-e28dd31e3bed@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 71708daa6f1446248de107e04cf28ffd322c800f Author: Robert Marko Date: Fri Nov 25 12:29:04 2022 +0100 dt-bindings: watchdog: Convert GPIO binding to json-schema Convert the DT binding for GPIO WDT to JSON schema. Cc: luka.perkov@sartura.hr Signed-off-by: Robert Marko Reviewed-by: Rob Herring Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221125112904.48652-1-robert.marko@sartura.hr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 7bfd2747d3ec2c400857084527448c172a720d2a Author: Cosmin Tanislav Date: Fri Nov 18 17:08:09 2022 +0200 watchdog: dw_wdt: stop on reboot HW running watchdogs are just watchdogs that are enabled before the Linux driver is probed, usually by the bootloader (eg. U-Boot). When the system is shutting down, the mechanism for keeping a HW running watchdog pinged is also stopped, but the watchdog itself is not stopped, causing a reset, and preventing the system from being shut down. Opt into stopping watchdogs on reboot. Signed-off-by: Cosmin Tanislav Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221118150809.102505-1-cosmin.tanislav@analog.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 0d9e42e3c8ccde51a9ff7c49684ed7a3805ebd52 Author: Uwe Kleine-König Date: Fri Nov 18 23:45:30 2022 +0100 watchdog: ziirave_wdt: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221118224540.619276-597-uwe@kleine-koenig.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 4ea6b986dfaff19e014ea634bdca669eebe73def Author: Thomas Weißschuh Date: Fri Nov 25 23:12:40 2022 +0100 watchdog: iTCO_wdt: Report firmware_version Synchronize the reported information in dmesg and the watchdog APIs. Signed-off-by: Thomas Weißschuh Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221125221240.2818-1-linux@weissschuh.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e8b1cb537b8095e1bc528ce2aef56318195d8343 Author: Krzysztof Kozlowski Date: Fri Jan 13 11:33:46 2023 +0100 dt-bindings: watchdog: allow "timer" as node name On some SoCs the watchdog device is actually mixed with timer, e.g. the qcom,msm-timer on older Qualcomm SoCs where this is actually one hardware block responsible for both system timer and watchdog. Allow calling such device nodes as "timer". Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221212174933.208900-1-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit f8ee39b44b75ac955bb54f46d5370481727c47e7 Author: Primoz Fiser Date: Fri Dec 16 09:36:45 2022 +0100 watchdog: da9062: da9063: use unlocked xfer function in restart Machine resets via da9062/da9063 PMICs are challenging since one needs to use special i2c atomic transfers due to the fact interrupts are disabled in such late system stages. This is the reason both PMICs don't use regmap and have instead opted for i2c_smbus_write_byte_data() in restart handlers. However extensive testing revealed that even using atomic safe function is not enough and occasional resets fail with error message "Failed to shutdown (err = -11)". This is due to the fact that function i2c_smbus_write_byte_data() in turn calls __i2c_lock_bus_helper() which might fail with -EAGAIN when bus lock is already taken and cannot be released anymore. Thus replace i2c_smbus_write_byte_data() with unlocked flavor of i2c_smbus_xfer() function to avoid above dead-lock scenario. At this system stage we don't care about proper locking anymore and only want proper machine reset to be carried out. Signed-off-by: Primoz Fiser Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221216083645.2574077-1-primoz.fiser@norik.com [groeck: Fixed continuation line alignment] Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 3da1814184582ed0faf039275a3f02e6f69944ee Author: Nuno Sá Date: Thu Feb 16 11:14:51 2023 +0100 iio: buffer: make sure O_NONBLOCK is respected For output buffers, there's no guarantee that the buffer won't be full in the first iteration of the loop in which case we would block independently of userspace passing O_NONBLOCK or not. Fix it by always checking the flag before going to sleep. While at it (and as it's a bit related), refactored the loop so that the stop condition is 'written != n', i.e, run the loop until all data has been copied into the IIO buffers. This makes the code a bit simpler. Fixes: 9eeee3b0bf190 ("iio: Add output buffer support") Signed-off-by: Nuno Sá Reviewed-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20230216101452.591805-3-nuno.sa@analog.com Cc: Signed-off-by: Jonathan Cameron commit b5184a26a28fac1d708b0bfeeb958a9260c2924c Author: Nuno Sá Date: Thu Feb 16 11:14:50 2023 +0100 iio: buffer: correctly return bytes written in output buffers If for some reason 'rb->access->write()' does not write the full requested data and the O_NONBLOCK is set, we would return 'n' to userspace which is not really truth. Hence, let's return the number of bytes we effectively wrote. Fixes: 9eeee3b0bf190 ("iio: Add output buffer support") Signed-off-by: Nuno Sá Reviewed-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20230216101452.591805-2-nuno.sa@analog.com Cc: Signed-off-by: Jonathan Cameron commit 96a4627dbbd48144a65af936b321701c70876026 Merge: 5dc4c995db9eb 0d3b2b4d23641 Author: Marc Zyngier Date: Sat Feb 18 14:06:10 2023 +0000 Merge tag ' https://github.com/oupton/linux tags/kvmarm-6.3' from into kvmarm-master/next Merge Oliver's kvmarm-6.3 tag: KVM/arm64 updates for 6.3 - Provide a virtual cache topology to the guest to avoid inconsistencies with migration on heterogenous systems. Non secure software has no practical need to traverse the caches by set/way in the first place. - Add support for taking stage-2 access faults in parallel. This was an accidental omission in the original parallel faults implementation, but should provide a marginal improvement to machines w/o FEAT_HAFDBS (such as hardware from the fruit company). - A preamble to adding support for nested virtualization to KVM, including vEL2 register state, rudimentary nested exception handling and masking unsupported features for nested guests. - Fixes to the PSCI relay that avoid an unexpected host SVE trap when resuming a CPU when running pKVM. - VGIC maintenance interrupt support for the AIC - Improvements to the arch timer emulation, primarily aimed at reducing the trap overhead of running nested. - Add CONFIG_USERFAULTFD to the KVM selftests config fragment in the interest of CI systems. - Avoid VM-wide stop-the-world operations when a vCPU accesses its own redistributor. - Serialize when toggling CPACR_EL1.SMEN to avoid unexpected exceptions in the host. - Aesthetic and comment/kerneldoc fixes - Drop the vestiges of the old Columbia mailing list and add myself as co-maintainer This also drags in a couple of branches to avoid conflicts: - The shared 'kvm-hw-enable-refactor' branch that reworks initialization, as it conflicted with the virtual cache topology changes. - arm64's 'for-next/sme2' branch, as the PSCI relay changes, as both touched the EL2 initialization code. Signed-off-by: Marc Zyngier commit 0d9bdd8a550170306c2021b8d6766c5343b870c2 Author: Hans de Goede Date: Fri Feb 17 15:42:08 2023 +0100 platform/x86: nvidia-wmi-ec-backlight: Add force module parameter On some Lenovo Legion models, the backlight might be driven by either one of nvidia_wmi_ec_backlight or amdgpu_bl0 at different times. When the Nvidia WMI EC backlight interface reports the backlight is controlled by the EC, the current backlight handling only registers nvidia_wmi_ec_backlight (and registers no other backlight interfaces). This hides (never registers) the amdgpu_bl0 interface, where as prior to 6.1.4 users would have both nvidia_wmi_ec_backlight and amdgpu_bl0 and could work around things in userspace. Add a force module parameter which can be used with acpi_backlight=native to restore the old behavior as a workound (for now) by passing: "acpi_backlight=native nvidia-wmi-ec-backlight.force=1" Fixes: 8d0ca287fd8c ("platform/x86: nvidia-wmi-ec-backlight: Use acpi_video_get_backlight_type()") Link: https://bugzilla.kernel.org/show_bug.cgi?id=217026 Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Reviewed-by: Daniel Dadap Link: https://lore.kernel.org/r/20230217144208.5721-1-hdegoede@redhat.com commit 993fd9bd656a082c9b713171622c70f72f0af59f Author: Gal Pressman Date: Wed Feb 15 16:09:18 2023 -0800 net/mlx5e: RX, Remove doubtful unlikely call When building an skb in non-linear mode, it is not likely nor unlikely that the xdp buff has fragments, it depends on the size of the packet received. Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed Reviewed-by: Maciej Fijalkowski commit afce9271facb4cd41ffdf063cc6dd3d67341e723 Author: Tariq Toukan Date: Wed Feb 15 16:09:17 2023 -0800 net/mlx5e: Fix outdated TLS comment Comment is outdated since commit 40379a0084c2 ("net/mlx5_fpga: Drop INNOVA TLS support"). Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed commit b5618a6b19c9dfead5133b72c40112f343b55d76 Author: Tariq Toukan Date: Wed Feb 15 16:09:16 2023 -0800 net/mlx5e: Remove unused function mlx5e_sq_xmit_simple The last usage was removed as part of commit 40379a0084c2 ("net/mlx5_fpga: Drop INNOVA TLS support"). Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed commit f869bcb0d28ec981dd5f6d1958c607c457c1bb26 Author: Vlad Buslov Date: Sun Nov 6 17:22:21 2022 +0100 net/mlx5e: Allow offloading of ct 'new' match Allow offloading filters that match on conntrack 'new' state in order to enable UDP NEW offload in the following patch. Unhardcode ct 'established' from ct modify header infrastructure code and determine correct ct state bit according to the metadata action 'cookie' field. Signed-off-by: Vlad Buslov Reviewed-by: Oz Shlomo Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed commit 94ceffb48eac7692677d8093dcde6965b70c4b35 Author: Vlad Buslov Date: Thu Dec 1 16:56:10 2022 +0100 net/mlx5e: Implement CT entry update With support for UDP NEW offload the flow_table may now send updates for existing flows. Support properly replacing existing entries by updating flow restore_cookie and replacing the rule with new one with the same match but new mod_hdr action that sets updated ctinfo. Signed-off-by: Vlad Buslov Reviewed-by: Oz Shlomo Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed commit 3ac0b6aa892a1961d3bc62c87e3e3c9646e9d309 Author: Parav Pandit Date: Wed Feb 15 16:09:13 2023 -0800 net/mlx5: Simplify eq list traversal EQ list is read only while finding the matching EQ. Hence, avoid *_safe() version. Signed-off-by: Parav Pandit Reviewed-by: Shay Drory Signed-off-by: Saeed Mahameed Reviewed-by: Maciej Fijalkowski commit 9da5294e2c6adc7169ccdfa5bef87f9e893d5a12 Author: Tariq Toukan Date: Wed Feb 15 16:09:12 2023 -0800 net/mlx5e: Remove redundant page argument in mlx5e_xdp_handle() Remove the page parameter, it can be derived from the xdp_buff member of mlx5e_xdp_buff. Signed-off-by: Tariq Toukan Reviewed-by: Dragos Tatulea Signed-off-by: Saeed Mahameed commit bfc63c9796900b4f72a0700ac68e4c6306017833 Author: Tariq Toukan Date: Wed Feb 15 16:09:11 2023 -0800 net/mlx5e: Remove redundant page argument in mlx5e_xmit_xdp_buff() Remove the page parameter, it can be derived from the xdp_buff. Signed-off-by: Tariq Toukan Reviewed-by: Dragos Tatulea Signed-off-by: Saeed Mahameed commit 53ee9142717714881fe0b4292b237e1707246f2c Author: Tariq Toukan Date: Wed Feb 15 16:09:10 2023 -0800 net/mlx5e: Switch to using napi_build_skb() Use napi_build_skb() which uses NAPI percpu caches to obtain skbuff_head instead of inplace allocation. napi_build_skb() calls napi_skb_cache_get(), which returns a cached skb, or allocates a bulk of NAPI_SKB_CACHE_BULK (16) if cache is empty. Performance test: TCP single stream, single ring, single core, default MTU (1500B). Before: 26.5 Gbits/sec After: 30.1 Gbits/sec (+13.6%) Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed Reviewed-by: Maciej Fijalkowski Reviewed-by: Alexander Lobakin commit 20e7da1bbba8474839157fb28fb538d2c058128d Author: Jan Beulich Date: Wed Feb 15 12:27:52 2023 +0100 x86/Xen: drop leftover VM-assist uses Both the 4Gb-segments and the PAE-extended-CR3 one are applicable to 32-bit guests only. The PAE-extended-CR3 use, furthermore, was redundant with the PAE_MODE ELF note anyway. Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/215515af-cfb9-3237-03ba-3312e3fa0d34@suse.com Signed-off-by: Juergen Gross commit d065155ec876a65c26bdb414d34feebf3ffdb643 Author: Marek Vasut Date: Fri Dec 16 22:09:22 2022 +0100 clk: rs9: Drop unused pin_xin field The pin_xin field in struct rs9_driver_data is unused, drop it. Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20221216210922.592926-1-marex@denx.de Reviewed-by: Alexander Stein Signed-off-by: Stephen Boyd commit e45dbb81b3953089e048ab4aa2c89aedfb126053 Author: Abel Vesa Date: Mon Feb 13 10:10:38 2023 +0200 MAINTAINERS: clk: imx: Add Peng Fan as reviewer Peng Fan will step up to help with reviewing. Add his email to the i.MX clocks drivers entry. Cc: Peng Fan Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230213081038.3958833-1-abel.vesa@linaro.org Thanks!! Acked-by: Peng Fan : Signed-off-by: Stephen Boyd commit e686c32590f40bffc45f105c04c836ffad3e531a Author: Dan Williams Date: Thu Feb 16 00:36:02 2023 -0800 dax/kmem: Fix leak of memory-hotplug resources While experimenting with CXL region removal the following corruption of /proc/iomem appeared. Before: f010000000-f04fffffff : CXL Window 0 f010000000-f02fffffff : region4 f010000000-f02fffffff : dax4.0 f010000000-f02fffffff : System RAM (kmem) After (modprobe -r cxl_test): f010000000-f02fffffff : **redacted binary garbage** f010000000-f02fffffff : System RAM (kmem) ...and testing further the same is visible with persistent memory assigned to kmem: Before: 480000000-243fffffff : Persistent Memory 480000000-57e1fffff : namespace3.0 580000000-243fffffff : dax3.0 580000000-243fffffff : System RAM (kmem) After (ndctl disable-region all): 480000000-243fffffff : Persistent Memory 580000000-243fffffff : ***redacted binary garbage*** 580000000-243fffffff : System RAM (kmem) The corrupted data is from a use-after-free of the "dax4.0" and "dax3.0" resources, and it also shows that the "System RAM (kmem)" resource is not being removed. The bug does not appear after "modprobe -r kmem", it requires the parent of "dax4.0" and "dax3.0" to be removed which re-parents the leaked "System RAM (kmem)" instances. Those in turn reference the freed resource as a parent. First up for the fix is release_mem_region_adjustable() needs to reliably delete the resource inserted by add_memory_driver_managed(). That is thwarted by a check for IORESOURCE_SYSRAM that predates the dax/kmem driver, from commit: 65c78784135f ("kernel, resource: check for IORESOURCE_SYSRAM in release_mem_region_adjustable") That appears to be working around the behavior of HMM's "MEMORY_DEVICE_PUBLIC" facility that has since been deleted. With that check removed the "System RAM (kmem)" resource gets removed, but corruption still occurs occasionally because the "dax" resource is not reliably removed. The dax range information is freed before the device is unregistered, so the driver can not reliably recall (another use after free) what it is meant to release. Lastly if that use after free got lucky, the driver was covering up the leak of "System RAM (kmem)" due to its use of release_resource() which detaches, but does not free, child resources. The switch to remove_resource() forces remove_memory() to be responsible for the deletion of the resource added by add_memory_driver_managed(). Fixes: c2f3011ee697 ("device-dax: add an allocation interface for device-dax instances") Cc: Cc: Oscar Salvador Cc: David Hildenbrand Cc: Pavel Tatashin Reviewed-by: Vishal Verma Reviewed-by: Pasha Tatashin Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/167653656244.3147810.5705900882794040229.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit e8444bb9fd77f153adcc263eab28e3c2bc1cf540 Author: Nick Hawkins Date: Fri Feb 17 09:50:54 2023 -0600 MAINTAINERS: Add HPE GXP I2C Support Add the I2C controller source and bindings. Signed-off-by: Nick Hawkins Signed-off-by: Wolfram Sang commit 4a55ed6f89f5a877a39b7d06620457f0c4913c42 Author: Nick Hawkins Date: Fri Feb 17 09:50:50 2023 -0600 i2c: Add GXP SoC I2C Controller The GXP SoC supports 10 I2C engines. Each I2C engine is completely independent and can function both as an I2C master and I2C slave. The I2C master can operate in a multi master environment. The engines support a scalable speed from 8kHZ to 1.5 Mhz. Signed-off-by: Nick Hawkins Reviewed-by: Joel Stanley Signed-off-by: Wolfram Sang commit 681f87ddf90964cbf7f2cfe094f82d0f9f6437a3 Author: Nick Hawkins Date: Fri Feb 17 09:50:51 2023 -0600 dt-bindings: i2c: Add hpe,gxp-i2c Document compatibility string to support I2C controller in GXP. Signed-off-by: Nick Hawkins Signed-off-by: Wolfram Sang commit de82c25dab9ac0fa01c95b8914bde8d9ce528e93 Merge: 574fbb95cd9d8 7234d746a8339 Author: Mark Brown Date: Fri Feb 17 22:05:55 2023 +0000 Merge remote-tracking branch 'spi/for-6.3' into spi-next commit f381b31a80bc47102f5a3f3001d8e45c328eb548 Author: Frank Rowand Date: Mon Feb 13 12:56:58 2023 -0600 of: update kconfig unittest help Add more information about the impact the of unittests have on the live devicetree and why the tests should only be enabled for developer kernels. Add information about processing the test output such that the results are more complete and comprehendable. Signed-off-by: Frank Rowand Link: https://lore.kernel.org/r/20230213185702.395776-4-frowand.list@gmail.com Signed-off-by: Rob Herring commit 568a10bfffe88daa42f1b7968352cc6abd948ca3 Author: Frank Rowand Date: Mon Feb 13 12:56:57 2023 -0600 of: add processing of EXPECT_NOT to of_unittest_expect scripts/dtc/of_unittest_expect processes EXPECT messages that document expected kernel messages triggered by unittest. Add processing of EXPECT_NOT messages that document kernel messages triggered by unittest that are not expected. This is commit 2 of 2, implementing the processing of EXPECT_NOT messages. Signed-off-by: Frank Rowand Link: https://lore.kernel.org/r/20230213185702.395776-3-frowand.list@gmail.com Signed-off-by: Rob Herring commit 511f3aa71029ef4d9408065f94110c0e8f9dccba Author: Frank Rowand Date: Mon Feb 13 12:56:56 2023 -0600 of: prepare to add processing of EXPECT_NOT to of_unittest_expect scripts/dtc/of_unittest_expect processes EXPECT messages that document expected kernel messages triggered by unittest. Add processing of EXPECT_NOT messages that document kernel messages triggered by unittest that are not expected. This is commit 1 of 2, renaming existing variables in anticipation of the changes needed to process EXPECT_NOT, so that commit 2 of 2 will be smaller and easier to read. This commit is not intended to make any functional changes. Signed-off-by: Frank Rowand Link: https://lore.kernel.org/r/20230213185702.395776-2-frowand.list@gmail.com Signed-off-by: Rob Herring commit 16b0c7cad99e96b002e26f016f28150cc7c52514 Author: Rob Herring Date: Wed Feb 8 17:13:23 2023 -0600 of: Use preferred of_property_read_* functions Replace instances of of_get_property/of_find_property() with appropriate typed of_property_read_*() functions. Link: https://lore.kernel.org/all/20230215215502.690716-1-robh@kernel.org/ Signed-off-by: Rob Herring commit 8c266d060894a1c979ccc7b233f34ef545e48b09 Author: Christophe JAILLET Date: Wed Feb 15 11:38:07 2023 +0100 i2c: xiic: Remove some dead code wait_for_completion_timeout() never returns negative value. Signed-off-by: Christophe JAILLET Reviewed-by: Michal Simek Signed-off-by: Wolfram Sang commit 6d8ffbe6618c47021c48cfff31f5d9d354ca44b9 Author: Raviteja Narayanam Date: Wed Feb 15 19:02:24 2023 +0530 i2c: xiic: Add SCL frequency configuration support From 'clock-frequency' device tree property, configure I2C SCL frequency by calculating the timing register values according to input clock. After soft reset in reinit function, the timing registers are set to default values (configured in design tool). So, setting SCL frequency is done inside reinit function after the soft reset. This allows configuration of SCL frequency exclusively through software via device tree property, overriding the design. If the clock-frequency parameter is not specified in DT, driver doesn't configure frequency, making it backward compatible. Signed-off-by: Raviteja Narayanam Signed-off-by: Manikanta Guntupalli Acked-by: Michal Simek Signed-off-by: Wolfram Sang commit 9b97cd61ee1ca7ba9a7005afd52f963a811b492c Author: Raviteja Narayanam Date: Wed Feb 15 19:02:23 2023 +0530 i2c: xiic: Update compatible with new IP version Xilinx AXI I2C IP is updated with a bug fix for dynamic mode reads. Older IPs are handled with a workaround in which they are using xiic standard mode for all these effected use cases. Add the new IP version to compatible. Signed-off-by: Raviteja Narayanam Signed-off-by: Manikanta Guntupalli Acked-by: Michal Simek Signed-off-by: Wolfram Sang commit deca7db82bdebfe4713de28574245276cd5e3023 Author: Raviteja Narayanam Date: Wed Feb 15 19:02:22 2023 +0530 dt-bindings: i2c: xiic: Add 'xlnx,axi-iic-2.1' to compatible Add xilinx I2C new version 'xlnx,axi-iic-2.1' string to compatible. Add clock-frequency as optional property. Signed-off-by: Raviteja Narayanam Signed-off-by: Manikanta Guntupalli Acked-by: Michal Simek Reviewed-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang commit 2f0cb4753dd2b5fe71d04407213e2ef253dcdd32 Author: Rob Herring Date: Thu Feb 9 17:20:43 2023 -0600 of: Use of_property_present() helper Use of_property_present() instead of of_get_property/of_find_property() in places where we just need to test presence of a property. Reviewed-by: Frank Rowand Tested-by: Frank Rowand Link: https://lore.kernel.org/all/20230215215547.691573-2-robh@kernel.org/ Signed-off-by: Rob Herring commit 9cbad37ce8122de32a1529e394b468bc101c9e7f Author: Rob Herring Date: Thu Feb 9 15:35:01 2023 -0600 of: Add of_property_present() helper Add an of_property_present() function similar to fwnode_property_present(). of_property_read_bool() could be used directly, but it is cleaner to not use it on non-boolean properties. Reviewed-by: Frank Rowand Tested-by: Frank Rowand Link: https://lore.kernel.org/all/20230215215547.691573-1-robh@kernel.org/ Signed-off-by: Rob Herring commit 6ee7afbabcee4d54024c46f8fc74314c69a04613 Author: Geert Uytterhoeven Date: Thu Feb 16 09:37:25 2023 +0100 of: reserved_mem: Use proper binary prefix The printed reserved memory information uses the non-standard "K" prefix, while all other printed values use proper binary prefixes. Fix this by using "Ki" instead. While at it, drop the superfluous spaces inside the parentheses, to reduce printed line length. Fixes: aeb9267eb6b1df99 ("of: reserved-mem: print out reserved-mem details during boot") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230216083725.1244817-1-geert+renesas@glider.be Signed-off-by: Rob Herring commit 168de0233586fb06c5c5c56304aa9a928a09b0ba Author: Martin KaFai Lau Date: Fri Feb 17 12:55:15 2023 -0800 selftests/bpf: Add bpf_fib_lookup test This patch tests the bpf_fib_lookup helper when looking up a neigh in NUD_FAILED and NUD_STALE state. It also adds test for the new BPF_FIB_LOOKUP_SKIP_NEIGH flag. Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230217205515.3583372-2-martin.lau@linux.dev commit 31de4105f00d64570139bc5494a201b0bd57349f Author: Martin KaFai Lau Date: Fri Feb 17 12:55:14 2023 -0800 bpf: Add BPF_FIB_LOOKUP_SKIP_NEIGH for bpf_fib_lookup The bpf_fib_lookup() also looks up the neigh table. This was done before bpf_redirect_neigh() was added. In the use case that does not manage the neigh table and requires bpf_fib_lookup() to lookup a fib to decide if it needs to redirect or not, the bpf prog can depend only on using bpf_redirect_neigh() to lookup the neigh. It also keeps the neigh entries fresh and connected. This patch adds a bpf_fib_lookup flag, SKIP_NEIGH, to avoid the double neigh lookup when the bpf prog always call bpf_redirect_neigh() to do the neigh lookup. The params->smac output is skipped together when SKIP_NEIGH is set because bpf_redirect_neigh() will figure out the smac also. Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230217205515.3583372-1-martin.lau@linux.dev commit de461a2607c69c4075c5dc4be86f75c6417dda3a Author: Heiner Kallweit Date: Thu Feb 16 17:15:33 2023 +0100 i2c: i801: Call i801_check_post() from i801_access() Avoid code duplication by calling i801_check_post() from i801_access(). Signed-off-by: Heiner Kallweit Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 1f760b87e54cf56a25ab68f8dc625e339f6e46d5 Author: Heiner Kallweit Date: Thu Feb 16 17:14:51 2023 +0100 i2c: i801: Call i801_check_pre() from i801_access() This avoids code duplication, in a next step we'll call i801_check_post() from i801_transaction() as well. Signed-off-by: Heiner Kallweit Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit a3989dc0b059a513ad9e12bab8470edc1cec027f Author: Heiner Kallweit Date: Thu Feb 16 17:14:16 2023 +0100 i2c: i801: Centralize configuring block commands in i801_block_transaction Similar to what was done for non-block commands, centralize block command register settings in i801_block_transaction(). Signed-off-by: Heiner Kallweit Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 24592482d2351071a05d782c9b2be20342e0d1d2 Author: Heiner Kallweit Date: Thu Feb 16 17:12:12 2023 +0100 i2c: i801: Centralize configuring non-block commands in i801_simple_transaction Currently configuring command register settings is distributed over multiple functions. At first centralize this for non-block commands in i801_simple_transaction(). Signed-off-by: Heiner Kallweit Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 63fd342fd121c3eea5ff209ec5fc0128214bb017 Author: Heiner Kallweit Date: Thu Feb 16 17:11:17 2023 +0100 i2c: i801: Handle SMBAUXCTL_E32B in i801_block_transaction_by_block only Currently we touch SMBAUXCTL even if not needed. That's the case for block commands that don't use block buffer mode, either because block buffer mode isn't available or because it's not supported for the respective command (e.g. I2C block transfer). Improve this by setting/resetting SMBAUXCTL_E32B in i801_block_transaction_by_block() only. Small downside is that we now access SMBAUXCTL twice for transactions that use PEC and block buffer mode. But this should a rather rare case and the impact is negligible. Signed-off-by: Heiner Kallweit Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit dd2d18b5c04099698dfe9ead149f9247a2d5c489 Author: Heiner Kallweit Date: Thu Feb 16 17:10:30 2023 +0100 i2c: i801: Add i801_simple_transaction(), complementing i801_block_transaction() Factor out non-block pre/post processing to a new function i801_simple_transaction(), complementing existing function i801_block_transaction(). This makes i801_access() better readable. Signed-off-by: Heiner Kallweit Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 49b5e77ae3e214acff4728595b4ac7bf776693ca Author: Pu Lehui Date: Wed Feb 15 21:52:05 2023 +0800 riscv, bpf: Add bpf trampoline support for RV64 BPF trampoline is the critical infrastructure of the BPF subsystem, acting as a mediator between kernel functions and BPF programs. Numerous important features, such as using BPF program for zero overhead kernel introspection, rely on this key component. We can't wait to support bpf trampoline on RV64. The related tests have passed, as well as the test_verifier with no new failure ceses. Signed-off-by: Pu Lehui Signed-off-by: Daniel Borkmann Tested-by: Björn Töpel Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20230215135205.1411105-5-pulehui@huaweicloud.com commit 596f2e6f9cf41436a5512a3f278c86da5c5598fb Author: Pu Lehui Date: Wed Feb 15 21:52:04 2023 +0800 riscv, bpf: Add bpf_arch_text_poke support for RV64 Implement bpf_arch_text_poke for RV64. For call scenario, to make BPF trampoline compatible with the kernel and BPF context, we follow the framework of RV64 ftrace to reserve 4 nops for BPF programs as function entry, and use auipc+jalr instructions for function call. However, since auipc+jalr call instruction is non-atomic operation, we need to use stop-machine to make sure instructions patching in atomic context. Also, we use auipc+jalr pair and need to patch in stop-machine context for jump scenario. Signed-off-by: Pu Lehui Signed-off-by: Daniel Borkmann Tested-by: Björn Töpel Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20230215135205.1411105-4-pulehui@huaweicloud.com commit 0fd1fd0104954380477353aea29c347e85dff16d Author: Pu Lehui Date: Wed Feb 15 21:52:03 2023 +0800 riscv, bpf: Factor out emit_call for kernel and bpf context The current emit_call function is not suitable for kernel function call as it store return value to bpf R0 register. We can separate it out for common use. Meanwhile, simplify judgment logic, that is, fixed function address can use jal or auipc+jalr, while the unfixed can use only auipc+jalr. Signed-off-by: Pu Lehui Signed-off-by: Daniel Borkmann Tested-by: Björn Töpel Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20230215135205.1411105-3-pulehui@huaweicloud.com commit 5e57fb7b0bd3ea7e994ef1c0ab3562d1fe0676b2 Author: Pu Lehui Date: Wed Feb 15 21:52:02 2023 +0800 riscv: Extend patch_text for multiple instructions Extend patch_text for multiple instructions. This is the preparaiton for multiple instructions text patching in riscv BPF trampoline, and may be useful for other scenario. Signed-off-by: Pu Lehui Signed-off-by: Daniel Borkmann Tested-by: Björn Töpel Reviewed-by: Conor Dooley Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20230215135205.1411105-2-pulehui@huaweicloud.com commit fd8958efe8779d3db19c9124fce593ce681ac709 Author: Patrick Kelsey Date: Thu Feb 16 11:56:28 2023 -0500 IB/hfi1: Fix sdma.h tx->num_descs off-by-one errors Fix three sources of error involving struct sdma_txreq.num_descs. When _extend_sdma_tx_descs() extends the descriptor array, it uses the value of tx->num_descs to determine how many existing entries from the tx's original, internal descriptor array to copy to the newly allocated one. As this value was incremented before the call, the copy loop will access one entry past the internal descriptor array, copying its contents into the corresponding slot in the new array. If the call to _extend_sdma_tx_descs() fails, _pad_smda_tx_descs() then invokes __sdma_tx_clean() which uses the value of tx->num_desc to drive a loop that unmaps all descriptor entries in use. As this value was incremented before the call, the unmap loop will invoke sdma_unmap_desc() on a descriptor entry whose contents consist of whatever random data was copied into it during (1), leading to cascading further calls into the kernel and driver using arbitrary data. _sdma_close_tx() was using tx->num_descs instead of tx->num_descs - 1. Fix all of the above by: - Only increment .num_descs after .descp is extended. - Use .num_descs - 1 instead of .num_descs for last .descp entry. Fixes: f4d26d81ad7f ("staging/rdma/hfi1: Add coalescing support for SDMA TX descriptors") Link: https://lore.kernel.org/r/167656658879.2223096.10026561343022570690.stgit@awfm-02.cornelisnetworks.com Signed-off-by: Brendan Cunningham Signed-off-by: Patrick Kelsey Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit a0d198f79a8d033bd46605b779859193649f1f99 Author: Patrick Kelsey Date: Thu Feb 16 11:56:23 2023 -0500 IB/hfi1: Fix math bugs in hfi1_can_pin_pages() Fix arithmetic and logic errors in hfi1_can_pin_pages() that would allow hfi1 to attempt pinning pages in cases where it should not because of resource limits or lack of required capability. Fixes: 2c97ce4f3c29 ("IB/hfi1: Add pin query function") Link: https://lore.kernel.org/r/167656658362.2223096.10954762619837718026.stgit@awfm-02.cornelisnetworks.com Signed-off-by: Brendan Cunningham Signed-off-by: Patrick Kelsey Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit d88cbbb39b4db057feb1552de31f22c02a21b36f Author: Christophe JAILLET Date: Fri Feb 17 10:29:10 2023 +0100 blk-mq: Reorder fields in 'struct blk_mq_tag_set' Group some variables based on their sizes to reduce hole and avoid padding. On x86_64, this shrinks the size of 'struct blk_mq_tag_set' from 304 to 296 bytes. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/6f249f9b02a3490283ef0278096556de41aa0cf0.1676626130.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jens Axboe commit d2225b838ccad126045e048471441693c7bca217 Author: Zhu Yanjun Date: Fri Feb 17 09:14:25 2023 +0800 RDMA/irdma: Add support for dmabuf pin memory regions This is a followup to the EFA dmabuf[1]. Irdma driver currently does not support on-demand-paging(ODP). So it uses habanalabs as the dmabuf exporter, and irdma as the importer to allow for peer2peer access through libibverbs. In this commit, the function ib_umem_dmabuf_get_pinned() is used. This function is introduced in EFA dmabuf[1] which allows the driver to get a dmabuf umem which is pinned and does not require move_notify callback implementation. The returned umem is pinned and DMA mapped like standard cpu umems, and is released through ib_umem_release(). [1]https://lore.kernel.org/lkml/20211007114018.GD2688930@ziepe.ca/t/ Link: https://lore.kernel.org/r/20230217011425.498847-1-yanjun.zhu@intel.com Reviewed-by: Shiraz Saleem Signed-off-by: Zhu Yanjun Signed-off-by: Jason Gunthorpe commit 181127fb76e62d06ab17a75fd610129688612343 Author: Martin KaFai Lau Date: Fri Feb 17 12:13:09 2023 -0800 Revert "bpf, test_run: fix &xdp_frame misplacement for LIVE_FRAMES" This reverts commit 6c20822fada1b8adb77fa450d03a0d449686a4a9. build bot failed on arch with different cache line size: https://lore.kernel.org/bpf/50c35055-afa9-d01e-9a05-ea5351280e4f@intel.com/ Signed-off-by: Martin KaFai Lau commit 5ef17179da7b779b3029d9a7d3871ba09279d56c Merge: a77a52385e9a7 594cac11ab6a1 Author: Jason Gunthorpe Date: Fri Feb 17 16:24:14 2023 -0400 Merge mlx5-next into rdma.git for-next Synchronize the shared mlx5 branch with net: - From Jiri: fixe a deadlock in mlx5_ib's netdev notifier unregister. - From Mark and Patrisious: add IPsec RoCEv2 support. - From Or: Rely on firmware to get special mkeys * branch mlx5-next: RDMA/mlx5: Use query_special_contexts for mkeys net/mlx5e: Use query_special_contexts for mkeys net/mlx5: Change define name for 0x100 lkey value net/mlx5: Expose bits for querying special mkeys net/mlx5: Configure IPsec steering for egress RoCEv2 traffic net/mlx5: Configure IPsec steering for ingress RoCEv2 traffic net/mlx5: Add IPSec priorities in RDMA namespaces net/mlx5: Implement new destination type TABLE_TYPE net/mlx5: Introduce new destination type TABLE_TYPE RDMA/mlx5: Track netdev to avoid deadlock during netdev notifier unregister net/mlx5e: Propagate an internal event in case uplink netdev changes net/mlx5e: Fix trap event handling Signed-off-by: Jason Gunthorpe commit f9fa0778ee7349a9aa3d2ea10e9f2ab843a0b44e Author: Kajol Jain Date: Wed Feb 15 15:08:27 2023 +0530 perf tests stat_all_metrics: Change true workload to sleep workload for system wide check Testcase stat_all_metrics.sh fails in powerpc: 98: perf all metrics test : FAILED! Logs with verbose: [command]# ./perf test 98 -vv 98: perf all metrics test : --- start --- test child forked, pid 13262 Testing BRU_STALL_CPI Testing COMPLETION_STALL_CPI ---- Testing TOTAL_LOCAL_NODE_PUMPS_P23 Metric 'TOTAL_LOCAL_NODE_PUMPS_P23' not printed in: Error: Invalid event (hv_24x7/PM_PB_LNS_PUMP23,chip=3/) in per-thread mode, enable system wide with '-a'. Testing TOTAL_LOCAL_NODE_PUMPS_RETRIES_P01 Metric 'TOTAL_LOCAL_NODE_PUMPS_RETRIES_P01' not printed in: Error: Invalid event (hv_24x7/PM_PB_RTY_LNS_PUMP01,chip=3/) in per-thread mode, enable system wide with '-a'. ---- Based on above logs, we could see some of the hv-24x7 metric events fails, and logs suggest to run the metric event with -a option. This change happened after the commit a4b8cfcabb1d90ec ("perf stat: Delay metric parsing"), which delayed the metric parsing phase and now before metric parsing phase perf tool identifies, whether target is system-wide or not. With this change, perf_event_open will fails with workload monitoring for uncore events as expected. The perf all metric test case fails as some of the hv-24x7 metric events may need bigger workload with system wide monitoring to get the data. Fix this issue by changing current system wide check from true workload to sleep 0.01 workload. Result with the patch changes in powerpc: 98: perf all metrics test : Ok Fixes: a4b8cfcabb1d90ec ("perf stat: Delay metric parsing") Suggested-by: Ian Rogers Reviewed-by: Athira Rajeev Signed-off-by: Kajol Jain Tested-by: Disha Goel Tested-by: Ian Rogers Cc: Madhavan Srinivasan Cc: Nageswara R Sastry Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230215093827.124921-1-kjain@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 594cac11ab6a1be8022a3c96d181dde7cfb0b8cf Author: Or Har-Toov Date: Tue Jan 17 15:14:52 2023 +0200 RDMA/mlx5: Use query_special_contexts for mkeys Use query_sepcial_contexts to get the correct value of mkeys such as null_mkey, terminate_scatter_list_mkey and dump_fill_mkey, as FW will change them in certain configurations. Link: https://lore.kernel.org/r/000236f0a9487d48809f87bcc3620a3964b2d3d3.1673960981.git.leon@kernel.org Signed-off-by: Or Har-Toov Reviewed-by: Michael Guralnik Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 1b1e4868836a4b5b375be75fd4c9583d29500517 Author: Or Har-Toov Date: Tue Jan 17 15:14:51 2023 +0200 net/mlx5e: Use query_special_contexts for mkeys Use query_sepcial_contexts in order to get the correct value of terminate_scatter_list_mkey, as FW will change it for certain configurations. Link: https://lore.kernel.org/r/fff70d94258233effb0e34f3d62cb08a692f5af5.1673960981.git.leon@kernel.org Signed-off-by: Or Har-Toov Reviewed-by: Michael Guralnik Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit a419bfb7632095410adc3aecb1e863568f049add Author: Or Har-Toov Date: Tue Jan 17 15:14:50 2023 +0200 net/mlx5: Change define name for 0x100 lkey value Change define of 0x100 lkey value from MLX5_INVALID_LKEY to be MLX5_TERMINATE_SCATTER_LIST_LKEY as 0x100 is the value of terminate_scatter_list_mkey. Link: https://lore.kernel.org/r/3a116dc3fbae4cb6b76a63d27d418830b06ade0c.1673960981.git.leon@kernel.org Signed-off-by: Or Har-Toov Reviewed-by: Michael Guralnik Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 4b7296aa6c6618d6a6840fbe857e4990f626bd90 Author: Or Har-Toov Date: Tue Jan 17 15:14:49 2023 +0200 net/mlx5: Expose bits for querying special mkeys Add needed HW bits to query the values of all special mkeys. Link: https://lore.kernel.org/r/080ebb563a9717c15b1ea75d669aede676df386b.1673960981.git.leon@kernel.org Signed-off-by: Or Har-Toov Reviewed-by: Michael Guralnik Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit e2b5cfc978f871996d1f8667515c0e06b33e620e Author: Andrii Nakryiko Date: Wed Feb 15 20:59:54 2023 -0800 selftests/bpf: Add global subprog context passing tests Add tests validating that it's possible to pass context arguments into global subprogs for various types of programs, including a particularly tricky KPROBE programs (which cover kprobes, uprobes, USDTs, a vast and important class of programs). Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20230216045954.3002473-4-andrii@kernel.org commit 95ebb376176c52382293e05e63f142114a5e40ef Author: Andrii Nakryiko Date: Wed Feb 15 20:59:53 2023 -0800 selftests/bpf: Convert test_global_funcs test to test_loader framework Convert 17 test_global_funcs subtests into test_loader framework for easier maintenance and more declarative way to define expected failures/successes. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20230216045954.3002473-3-andrii@kernel.org commit d384dce281ed1b504fae2e279507827638d56fa3 Author: Andrii Nakryiko Date: Wed Feb 15 20:59:52 2023 -0800 bpf: Fix global subprog context argument resolution logic KPROBE program's user-facing context type is defined as typedef bpf_user_pt_regs_t. This leads to a problem when trying to passing kprobe/uprobe/usdt context argument into global subprog, as kernel always strip away mods and typedefs of user-supplied type, but takes expected type from bpf_ctx_convert as is, which causes mismatch. Current way to work around this is to define a fake struct with the same name as expected typedef: struct bpf_user_pt_regs_t {}; __noinline my_global_subprog(struct bpf_user_pt_regs_t *ctx) { ... } This patch fixes the issue by resolving expected type, if it's not a struct. It still leaves the above work-around working for backwards compatibility. Fixes: 91cc1a99740e ("bpf: Annotate context types") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20230216045954.3002473-2-andrii@kernel.org commit cf26e043c2a9213805d7ea9e8cf3e1d7166a62a4 Author: Athira Rajeev Date: Thu Feb 16 11:42:40 2023 +0530 perf vendor events power10: Add JSON metric events to present CPI stall cycles in powerpc Power10 Performance Monitoring Unit (PMU) provides events to understand stall cycles of different pipeline stages. These events along with completed instructions provides useful metrics for application tuning. Patch implements the JSON changes to collect counter statistics to present the high level CPI stall breakdown metrics. New metric group is named as "CPI_STALL_RATIO" and this new metric group presents these stall metrics: - DISPATCHED_CPI ( Dispatch stall cycles per insn ) - ISSUE_STALL_CPI ( Issue stall cycles per insn ) - EXECUTION_STALL_CPI ( Execution stall cycles per insn ) - COMPLETION_STALL_CPI ( Completition stall cycles per insn ) To avoid multipling of events, PM_RUN_INST_CMPL event has been modified to use PMC5(performance monitoring counter5) instead of PMC4. This change is needed, since completion stall event is using PMC4. Usage example: ./perf stat --metric-no-group -M CPI_STALL_RATIO Performance counter stats for 'workload': 63,056,817,982 PM_CMPL_STALL # 0.28 COMPLETION_STALL_CPI 1,743,988,038,896 PM_ISSUE_STALL # 7.73 ISSUE_STALL_CPI 225,597,495,030 PM_RUN_INST_CMPL # 6.18 DISPATCHED_CPI # 37.48 EXECUTION_STALL_CPI 1,393,916,546,654 PM_DISP_STALL_CYC 8,455,376,836,463 PM_EXEC_STALL "--metric-no-group" is used for forcing PM_RUN_INST_CMPL to be scheduled in all group for more accuracy. Signed-off-by: Athira Rajeev Acked-by: Ian Rogers Cc: Andi Kleen Cc: Disha Goel Cc: James Clark Cc: Jiri Olsa Cc: Kajol Jain Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Nageswara R Sastry Cc: Namhyung Kim Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230216061240.18067-1-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit a2f998a78a425edde5a1a1973c1d4854fe9d019f Author: Hou Tao Date: Fri Dec 16 12:23:53 2022 +0800 dm ioctl: remove unnecessary check when using dm_get_mdptr() __hash_remove() removes hash_cell with _hash_lock locked, so acquiring _hash_lock can guarantee no-NULL hc returned from dm_get_mdptr() must have not been removed and hc->md must still be md. __hash_remove() also acquires dm_hash_cells_mutex before setting mdptr as NULL. So in dm_copy_name_and_uuid(), after acquiring dm_hash_cells_mutex and ensuring returned hc is not NULL, the returned hc must still be alive and hc->md must still be md. Remove the unnecessary hc->md != md checks when using dm_get_mdptr() with _hash_lock or dm_hash_cells_mutex acquired. Signed-off-by: Hou Tao Signed-off-by: Mike Snitzer commit 69868bebfe8e9a47b0d8a12f7473b8a3b7239ef3 Author: Mike Snitzer Date: Fri Feb 17 13:08:17 2023 -0500 dm ioctl: assert _hash_lock is held in __hash_remove Also update dm_early_create() to take _hash_lock when calling both __get_name_cell and __hash_remove -- given dm_early_create()'s early boot usecase this locking isn't about correctness but it allows lockdep_assert_held() to be added to __hash_remove. Signed-off-by: Mike Snitzer commit 76227f6dc805e9e960128bcc6276647361e0827c Author: Mike Snitzer Date: Thu Feb 16 15:31:08 2023 -0500 dm cache: add cond_resched() to various workqueue loops Otherwise on resource constrained systems these workqueues may be too greedy. Signed-off-by: Mike Snitzer commit e4f80303c2353952e6e980b23914e4214487f2a6 Author: Mike Snitzer Date: Thu Feb 16 15:29:44 2023 -0500 dm thin: add cond_resched() to various workqueue loops Otherwise on resource constrained systems these workqueues may be too greedy. Signed-off-by: Mike Snitzer commit 7234d746a8339066313518bfa024fa03f363a55e Author: Krzysztof Kozlowski Date: Fri Feb 17 16:58:02 2023 +0100 spi: dt-bindings: qcom,spi-qcom-qspi: document OPP and power-domains QSPI on Qualcomm SDM845, SC7180 and SC7280 SoCs uses OPP table (both in DTS and Linux driver) and is suuplied by CX power domain. Document missing properties to fix: sc7280-idp2.dtb: spi@88dc000: Unevaluated properties are not allowed ('operating-points-v2', 'power-domains' were unexpected) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230217155802.848178-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 64f50f6575721ef03d001e907455cbe3baa2a5b1 Author: Hengqi Chen Date: Tue Feb 14 15:26:33 2023 +0000 LoongArch, bpf: Use 4 instructions for function address in JIT This patch fixes the following issue of function calls in JIT, like: [ 29.346981] multi-func JIT bug 105 != 103 The issus can be reproduced by running the "inline simple bpf_loop call" verifier test. This is because we are emiting 2-4 instructions for 64-bit immediate moves. During the first pass of JIT, the placeholder address is zero, emiting two instructions for it. In the extra pass, the function address is in XKVRANGE, emiting four instructions for it. This change the instruction index in JIT context. Let's always use 4 instructions for function address in JIT. So that the instruction sequences don't change between the first pass and the extra pass for function calls. Fixes: 5dc615520c4d ("LoongArch: Add BPF JIT support") Signed-off-by: Hengqi Chen Signed-off-by: Daniel Borkmann Tested-by: Tiezhu Yang Link: https://lore.kernel.org/bpf/20230214152633.2265699-1-hengqi.chen@gmail.com commit 38ae3192296924181537544e7cfc43ca78eadcda Author: Arnd Bergmann Date: Fri Feb 17 10:59:04 2023 +0100 wifi: rtl8xxxu: add LEDS_CLASS dependency rtl8xxxu now unconditionally uses LEDS_CLASS, so a Kconfig dependency is required to avoid link errors: aarch64-linux-ld: drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.o: in function `rtl8xxxu_disconnect': rtl8xxxu_core.c:(.text+0x730): undefined reference to `led_classdev_unregister' ERROR: modpost: "led_classdev_unregister" [drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.ko] undefined! ERROR: modpost: "led_classdev_register_ext" [drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.ko] undefined! Fixes: 3be01622995b ("wifi: rtl8xxxu: Register the LED and make it blink") Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230217095910.2480356-1-arnd@kernel.org commit 1fe4850b34ab512ff911e2c035c75fb6438f7307 Author: Martin KaFai Lau Date: Thu Feb 16 16:41:48 2023 -0800 bpf: bpf_fib_lookup should not return neigh in NUD_FAILED state The bpf_fib_lookup() helper does not only look up the fib (ie. route) but it also looks up the neigh. Before returning the neigh, the helper does not check for NUD_VALID. When a neigh state (neigh->nud_state) is in NUD_FAILED, its dmac (neigh->ha) could be all zeros. The helper still returns SUCCESS instead of NO_NEIGH in this case. Because of the SUCCESS return value, the bpf prog directly uses the returned dmac and ends up filling all zero in the eth header. This patch checks for NUD_VALID and returns NO_NEIGH if the neigh is not valid. Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230217004150.2980689-3-martin.lau@linux.dev commit af2d0d09eabe98b01bf02b236e381edae4209778 Author: Martin KaFai Lau Date: Thu Feb 16 16:41:47 2023 -0800 bpf: Disable bh in bpf_test_run for xdp and tc prog Some of the bpf helpers require bh disabled. eg. The bpf_fib_lookup helper that will be used in a latter selftest. In particular, it calls ___neigh_lookup_noref that expects the bh disabled. This patch disables bh before calling bpf_prog_run[_xdp], so the testing prog can also use those helpers. Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230217004150.2980689-2-martin.lau@linux.dev commit 0f03bf300833c05d914ab7f5ab3d8bc8564e9912 Author: Ben Dooks Date: Fri Dec 23 15:38:11 2022 +0000 dt-bindings: pwm: Document Synopsys DesignWare snps,pwm-dw-apb-timers-pwm2 Add documentation for the bindings for Synopsys' DesignWare PWM block as we will be adding DT/platform support to the Linux driver soon. Signed-off-by: Ben Dooks Reviewed-by: Krzysztof Kozlowski Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 1596dae2f17ec5c6e8c8f0e3fec78c5ae55c1e0b Author: Maciej Fijalkowski Date: Wed Feb 15 15:33:09 2023 +0100 xsk: check IFF_UP earlier in Tx path Xsk Tx can be triggered via either sendmsg() or poll() syscalls. These two paths share a call to common function xsk_xmit() which has two sanity checks within. A pseudo code example to show the two paths: __xsk_sendmsg() : xsk_poll(): if (unlikely(!xsk_is_bound(xs))) if (unlikely(!xsk_is_bound(xs))) return -ENXIO; return mask; if (unlikely(need_wait)) (...) return -EOPNOTSUPP; xsk_xmit() mark napi id (...) xsk_xmit() xsk_xmit(): if (unlikely(!(xs->dev->flags & IFF_UP))) return -ENETDOWN; if (unlikely(!xs->tx)) return -ENOBUFS; As it can be observed above, in sendmsg() napi id can be marked on interface that was not brought up and this causes a NULL ptr dereference: [31757.505631] BUG: kernel NULL pointer dereference, address: 0000000000000018 [31757.512710] #PF: supervisor read access in kernel mode [31757.517936] #PF: error_code(0x0000) - not-present page [31757.523149] PGD 0 P4D 0 [31757.525726] Oops: 0000 [#1] PREEMPT SMP NOPTI [31757.530154] CPU: 26 PID: 95641 Comm: xdpsock Not tainted 6.2.0-rc5+ #40 [31757.536871] Hardware name: Intel Corporation S2600WFT/S2600WFT, BIOS SE5C620.86B.02.01.0008.031920191559 03/19/2019 [31757.547457] RIP: 0010:xsk_sendmsg+0xde/0x180 [31757.551799] Code: 00 75 a2 48 8b 00 a8 04 75 9b 84 d2 74 69 8b 85 14 01 00 00 85 c0 75 1b 48 8b 85 28 03 00 00 48 8b 80 98 00 00 00 48 8b 40 20 <8b> 40 18 89 85 14 01 00 00 8b bd 14 01 00 00 81 ff 00 01 00 00 0f [31757.570840] RSP: 0018:ffffc90034f27dc0 EFLAGS: 00010246 [31757.576143] RAX: 0000000000000000 RBX: ffffc90034f27e18 RCX: 0000000000000000 [31757.583389] RDX: 0000000000000001 RSI: ffffc90034f27e18 RDI: ffff88984cf3c100 [31757.590631] RBP: ffff88984714a800 R08: ffff88984714a800 R09: 0000000000000000 [31757.597877] R10: 0000000000000001 R11: 0000000000000000 R12: 00000000fffffffa [31757.605123] R13: 0000000000000000 R14: 0000000000000003 R15: 0000000000000000 [31757.612364] FS: 00007fb4c5931180(0000) GS:ffff88afdfa00000(0000) knlGS:0000000000000000 [31757.620571] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [31757.626406] CR2: 0000000000000018 CR3: 000000184b41c003 CR4: 00000000007706e0 [31757.633648] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [31757.640894] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [31757.648139] PKRU: 55555554 [31757.650894] Call Trace: [31757.653385] [31757.655524] sock_sendmsg+0x8f/0xa0 [31757.659077] ? sockfd_lookup_light+0x12/0x70 [31757.663416] __sys_sendto+0xfc/0x170 [31757.667051] ? do_sched_setscheduler+0xdb/0x1b0 [31757.671658] __x64_sys_sendto+0x20/0x30 [31757.675557] do_syscall_64+0x38/0x90 [31757.679197] entry_SYSCALL_64_after_hwframe+0x72/0xdc [31757.687969] Code: 8e f6 ff 44 8b 4c 24 2c 4c 8b 44 24 20 41 89 c4 44 8b 54 24 28 48 8b 54 24 18 b8 2c 00 00 00 48 8b 74 24 10 8b 7c 24 08 0f 05 <48> 3d 00 f0 ff ff 77 3a 44 89 e7 48 89 44 24 08 e8 b5 8e f6 ff 48 [31757.707007] RSP: 002b:00007ffd49c73c70 EFLAGS: 00000293 ORIG_RAX: 000000000000002c [31757.714694] RAX: ffffffffffffffda RBX: 000055a996565380 RCX: 00007fb4c5727c16 [31757.721939] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 [31757.729184] RBP: 0000000000000040 R08: 0000000000000000 R09: 0000000000000000 [31757.736429] R10: 0000000000000040 R11: 0000000000000293 R12: 0000000000000000 [31757.743673] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [31757.754940] To fix this, let's make xsk_xmit a function that will be responsible for generic Tx, where RCU is handled accordingly and pull out sanity checks and xs->zc handling. Populate sanity checks to __xsk_sendmsg() and xsk_poll(). Fixes: ca2e1a627035 ("xsk: Mark napi_id on sendmsg()") Fixes: 18b1ab7aa76b ("xsk: Fix race at socket teardown") Signed-off-by: Maciej Fijalkowski Reviewed-by: Alexander Lobakin Link: https://lore.kernel.org/r/20230215143309.13145-1-maciej.fijalkowski@intel.com Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann commit 860793bbdcdfbeae684d552ce0121846cffc4803 Author: Jeff LaBundy Date: Sun Feb 5 20:56:22 2023 -0600 pwm: iqs620a: Replace one remaining instance of regmap_update_bits() The call to regmap_update_bits() which was responsible for clearing the PWM output enable register bit was recently dropped in favor of a call to regmap_clear_bits(), thereby simplifying the code. Similarly, the call to regmap_update_bits() which sets the same bit can be simplified with a call to regmap_set_bits(). Signed-off-by: Jeff LaBundy Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 327437884e9a752ccbf759cbab641439ca708f5b Author: Uwe Kleine-König Date: Wed Jan 18 16:48:17 2023 +0100 pwm: ab8500: Implement .get_state() The registers are readable, so it's possible to implement the .get_state() callback for this PWM. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 486dd4e846814016443abfcbfee0b8b3f3b35330 Author: Uwe Kleine-König Date: Wed Jan 18 16:48:16 2023 +0100 pwm: ab8500: Fix calculation of duty and period After a check of the manual it becomes obvious that the calculations in .apply() are totally bogus: FreqPWMOutx was always written as zero, so the period was fixed at 3413333.33 ns. However state->period wasn't checked at all. The lower 10 bits of duty_cycle were just used as DutyPWMOutx. So if a duty cycle of 512 ns (or 1536 ns) was requested, it actually programmed 1710000 ns. Other values were wrong by the same factor. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit f98954b293d0a0f9646117af75c82c1b89191c53 Author: Nick Alcock Date: Thu Feb 16 15:24:04 2023 +0000 PCI: Remove MODULE_LICENSE so boolean drivers don't look like modules Since 8b41fc4454e3 ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, MODULE_LICENSE in non-modules causes modprobe to misidentify the object file as a module when it is not, and modprobe might succeed rather than failing with a suitable error message. For tristate modules that can be either built-in or loaded at runtime, modprobe succeeds in both cases: # modprobe ext4 [exit status zero if CONFIG_EXT4_FS=y or =m] For boolean modules like the Standard Hot Plug Controller driver (shpchp) that cannot be loaded at runtime, modprobe should always fail like this: # modprobe shpchp modprobe: FATAL: Module shpchp not found in directory /lib/modules/... [exit status non-zero regardless of CONFIG_HOTPLUG_PCI_SHPC] but prior to this commit, shpchp_core.c contained MODULE_LICENSE, so "modprobe shpchp" silently succeeded when it should have failed. Remove MODULE_LICENSE in files that cannot be built as modules. [bhelgaas: commit log, squash] Suggested-by: Luis Chamberlain Link: https://lore.kernel.org/r/20230216152410.4312-1-nick.alcock@oracle.com/ Signed-off-by: Nick Alcock Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Cc: Luis Chamberlain Cc: Hitomi Hasegawa Cc: Rob Herring Cc: Lorenzo Pieralisi commit 7e55b95651d88e60368087c243525a0d97d43d3d Author: Steinar H. Gunderson Date: Tue Mar 22 09:24:52 2022 +0100 perf intel-pt: Synthesize cycle events There is no good reason why we cannot synthesize "cycle" events from Intel PT just as we can synthesize "instruction" events, in particular when CYC packets are available. This enables using PT to getting much more accurate cycle profiles than regular sampling (record -e cycles) when the work last for very short periods (<10 ms). Thus, add support for this, based off of the existing IPC calculation framework. The new option to --itrace is "y" (for cYcles), as c was taken for calls. Cycle and instruction events can be synthesized together, and are by default. The only real caveat is that CYC packets are only emitted whenever some other packet is, which in practice is when a branch instruction is encountered (and not even all branches). Thus, even at no subsampling (e.g. --itrace=y0ns), it is impossible to get more accuracy than a single basic block, and all cycles spent executing that block will get attributed to the branch instruction that ends the packet. Thus, one cannot know whether the cycles came from e.g. a specific load, a mispredicted branch, or something else. When subsampling (which is the default), the cycle events will get smeared out even more, but will still be generally useful to attribute cycle counts to functions. Reviewed-by: Adrian Hunter Signed-off-by: Steinar H. Gunderson Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220322082452.1429091-1-sesse@google.com Signed-off-by: Arnaldo Carvalho de Melo commit e5cfefa97bccf956ea0bb6464c1f6c84fd7a8d9f Author: Yu Kuai Date: Fri Feb 17 10:22:00 2023 +0800 block: fix scan partition for exclusively open device again As explained in commit 36369f46e917 ("block: Do not reread partition table on exclusively open device"), reread partition on the device that is exclusively opened by someone else is problematic. This patch will make sure partition scan will only be proceed if current thread open the device exclusively, or the device is not opened exclusively, and in the later case, other scanners and exclusive openers will be blocked temporarily until partition scan is done. Fixes: 10c70d95c0f2 ("block: remove the bd_openers checks in blk_drop_partitions") Cc: Suggested-by: Jan Kara Signed-off-by: Yu Kuai Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230217022200.3092987-3-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe commit 0f77b29ad14e34a89961f32edc87b92db623bb37 Author: Yu Kuai Date: Fri Feb 17 10:21:59 2023 +0800 block: Revert "block: Do not reread partition table on exclusively open device" This reverts commit 36369f46e91785688a5f39d7a5590e3f07981316. This patch can't fix the problem in a corner case that device can be opened exclusively after the checking and before blkdev_get_by_dev(). We'll use a new solution to fix the problem in the next patch, and the new solution doesn't need to change apis. Signed-off-by: Yu Kuai Acked-by: Jan Kara Link: https://lore.kernel.org/r/20230217022200.3092987-2-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe commit 0aa2988e4fd23c0c8b33999d7b47dfbc5e6bf24b Author: Pankaj Raghav Date: Fri Feb 17 17:44:44 2023 +0530 brd: use radix_tree_maybe_preload instead of radix_tree_preload Unconditionally calling radix_tree_preload_end() results in a OOPS message as the preload is only conditionally called for gfpflags_allow_blocking(). [ 20.267323] BUG: using smp_processor_id() in preemptible [00000000] code: fio/416 [ 20.267837] caller is brd_insert_page.part.0+0xbe/0x190 [brd] [ 20.269436] Call Trace: [ 20.269598] [ 20.269742] dump_stack_lvl+0x32/0x50 [ 20.269982] check_preemption_disabled+0xd1/0xe0 [ 20.270289] brd_insert_page.part.0+0xbe/0x190 [brd] [ 20.270664] brd_submit_bio+0x33f/0xf40 [brd] Use radix_tree_maybe_preload() which does preload only if gfpflags_allow_blocking() is true but also takes the lock. Therefore, unconditionally calling radix_tree_preload_end() should not create any issues and the message disappears. Fixes: 6ded703c56c2 ("brd: check for REQ_NOWAIT and set correct page allocation mask") Signed-off-by: Pankaj Raghav Link: https://lore.kernel.org/r/20230217121442.33914-1-p.raghav@samsung.com Signed-off-by: Jens Axboe commit 9ec041ea40dbc6425c0ee6ae15786e5ab1d6aad6 Author: Luca Boccassi Date: Fri Feb 10 01:06:12 2023 +0000 sed-opal: add support flag for SUM in status ioctl Not every OPAL drive supports SUM (Single User Mode), so report this information to userspace via the get-status ioctl so that we can adjust the formatting options accordingly. Tested on a kingston drive (which supports it) and a samsung one (which does not). Signed-off-by: Luca Boccassi Link: https://lore.kernel.org/r/20230210010612.28729-1-luca.boccassi@gmail.com Signed-off-by: Jens Axboe commit 2954fe60e33da0f4de4d81a4c95c7dddb517d00c Author: Florian Westphal Date: Wed Feb 1 14:45:22 2023 +0100 netfilter: let reset rules clean out conntrack entries iptables/nftables support responding to tcp packets with tcp resets. The generated tcp reset packet passes through both output and postrouting netfilter hooks, but conntrack will never see them because the generated skb has its ->nfct pointer copied over from the packet that triggered the reset rule. If the reset rule is used for established connections, this may result in the conntrack entry to be around for a very long time (default timeout is 5 days). One way to avoid this would be to not copy the nf_conn pointer so that the rest packet passes through conntrack too. Problem is that output rules might not have the same conntrack zone setup as the prerouting ones, so its possible that the reset skb won't find the correct entry. Generating a template entry for the skb seems error prone as well. Add an explicit "closing" function that switches a confirmed conntrack entry to closed state and wire this up for tcp. If the entry isn't confirmed, no action is needed because the conntrack entry will never be committed to the table. Reported-by: Russel King Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 38d73b671a817328334f2a70a23fed4d1f4a952c Author: Sathvika Vasireddy Date: Fri Feb 17 10:02:26 2023 +0530 powerpc/64: Fix unannotated intra-function call warning objtool throws the following warning: arch/powerpc/kernel/head_64.o: warning: objtool: .text+0x6128: unannotated intra-function call Fix the warning by annotating start_initialization_book3s symbol with the SYM_FUNC_START_LOCAL and SYM_FUNC_END macros. Reported-by: Stephen Rothwell Signed-off-by: Sathvika Vasireddy Fixes: 58f24eea5278 ("powerpc/64s: Refactor initialisation after prom") Suggested-by: Josh Poimboeuf Tested-by: Stephen Rothwell Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230217043226.1020041-1-sv@linux.ibm.com commit 3c2ce4912a6f44dfb11bc5d241b13e9f5d79078b Author: Christophe Leroy Date: Mon Dec 19 19:46:00 2022 +0100 powerpc/epapr: Don't use wrteei on non booke wrteei is only for booke. Use the standard mfmsr/ori/mtmsr when non booke. Reported-by: Jan-Benedict Glaw Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b29c7f1727433b003eae050e44072741c8ac223b.1671475543.git.christophe.leroy@csgroup.eu commit 675f176b4dcc2b75adbcea7ba0e9a649527f53bd Merge: 84cb1b53cdbad ec35307e18ba8 Author: David S. Miller Date: Fri Feb 17 11:06:39 2023 +0000 Merge ra.kernel.org:/pub/scm/linux/kernel/git/netdev/net Some of the devlink bits were tricky, but I think I got it right. Signed-off-by: David S. Miller commit bfb03af71a3798b5a88a945a9c19ad67e1c4986d Author: Christophe Leroy Date: Mon Dec 19 19:45:57 2022 +0100 powerpc: Pass correct CPU reference to assembler Jan-Benedict reported issue with building ppc64e_defconfig with mainline GCC work: powerpc64-linux-gcc -Wp,-MMD,arch/powerpc/kernel/vdso/.gettimeofday-64.o.d -nostdinc -I./arch/powerpc/include -I./arch/powerpc/include/generated -I./include -I./arch/powerpc/include/uapi -I./arch/powerpc/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -D__KERNEL__ -I ./arch/powerpc -DHAVE_AS_ATHIGH=1 -fmacro-prefix-map=./= -D__ASSEMBLY__ -fno-PIE -m64 -Wl,-a64 -mabi=elfv1 -Wa,-me500 -Wa,-me500mc -mabi=elfv1 -mbig-endian -Wl,-soname=linux-vdso64.so.1 -D__VDSO64__ -s -c -o arch/powerpc/kernel/vdso/gettimeofday-64.o arch/powerpc/kernel/vdso/gettimeofday.S arch/powerpc/kernel/vdso/gettimeofday.S: Assembler messages: arch/powerpc/kernel/vdso/gettimeofday.S:72: Error: unrecognized opcode: `stdu' arch/powerpc/kernel/vdso/gettimeofday.S:72: Error: unrecognized opcode: `stdu' arch/powerpc/kernel/vdso/gettimeofday.S:72: Error: unrecognized opcode: `std' arch/powerpc/kernel/vdso/gettimeofday.S:72: Error: unrecognized opcode: `std' arch/powerpc/kernel/vdso/gettimeofday.S:72: Error: unrecognized opcode: `ld' arch/powerpc/kernel/vdso/gettimeofday.S:72: Error: unrecognized opcode: `ld' ... make[1]: *** [arch/powerpc/kernel/vdso/Makefile:76: arch/powerpc/kernel/vdso/gettimeofday-64.o] Error 1 make: *** [arch/powerpc/Makefile:387: vdso_prepare] Error 2 This is due to assembler being called with -me500mc which is a 32 bits target. The problem comes from the fact that CONFIG_PPC_E500MC is selected for both the e500mc (32 bits) and the e5500 (64 bits), and therefore the following makefile rule is wrong: cpu-as-$(CONFIG_PPC_E500MC) += $(call as-option,-Wa$(comma)-me500mc) Today we have CONFIG_TARGET_CPU which provides the identification of the expected CPU, it is used for GCC. Once GCC knows the target CPU, it adds the correct CPU option to assembler, no need to add it explicitly. With that change (And also commit 45f7091aac35 ("powerpc/64: Set default CPU in Kconfig")), it now is: powerpc64-linux-gcc -Wp,-MMD,arch/powerpc/kernel/vdso/.gettimeofday-64.o.d -nostdinc -I./arch/powerpc/include -I./arch/powerpc/include/generated -I./include -I./arch/powerpc/include/uapi -I./arch/powerpc/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -D__KERNEL__ -I ./arch/powerpc -DHAVE_AS_ATHIGH=1 -fmacro-prefix-map=./= -D__ASSEMBLY__ -fno-PIE -m64 -Wl,-a64 -mabi=elfv1 -mcpu=e500mc64 -mabi=elfv1 -mbig-endian -Wl,-soname=linux-vdso64.so.1 -D__VDSO64__ -s -c -o arch/powerpc/kernel/vdso/gettimeofday-64.o arch/powerpc/kernel/vdso/gettimeofday.S Reported-by: Jan-Benedict Glaw Signed-off-by: Christophe Leroy Acked-by: Pali Rohár [mpe: Retain -Wa,-mpower4 -Wa,-many for Book3S 64 builds for now] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/758ad54128fa9dd2fdedc4c511592111cbded900.1671475543.git.christophe.leroy@csgroup.eu commit 097fc054b0244ddc87c94097b490e534f6e4cbdd Author: Genjian Zhang Date: Mon Feb 13 14:24:51 2023 +0800 MIPS: dts: Boston: Fix dtc 'pci_device_reg' warning dtbs_check currently complains that: arch/mips/boot/dts/img/boston.dts:128.19-178.5: Warning (pci_device_reg): /pci@14000000/pci2_root@0,0,0: PCI unit address format error, expected "0,0" The unit-address format should be ','. Fix the unit-address accordingly. Reported-by: k2ci Signed-off-by: Genjian Zhang Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer commit bae833414bfe6a33f6d55d5e0eb38e5989c6fe7b Author: Arınç ÜNAL Date: Sat Feb 11 13:49:15 2023 +0300 mips: dts: ralink: mt7621: add port@5 as CPU port On MT7621AT, MT7621DAT, and MT7621ST SoCs, port 5 of the MT7530 switch is connected to the second MAC of the SoC as a CPU port. Add the port and set up the second MAC on the bindings. Revert PHY muxing on GB-PC1. There's an external PHY connected to the second MAC of the SoC on GB-PC2, therefore, disable port@5 for this device. Signed-off-by: Arınç ÜNAL Acked-by: Sergio Paracuellos Signed-off-by: Thomas Bogendoerfer commit 09e61efd884ca68a768717d60858f138685b161b Author: Arınç ÜNAL Date: Sat Feb 11 13:49:14 2023 +0300 mips: dts: align LED node names with dtschema The node names should be generic and DT schema expects certain pattern: mt7621-gnubee-gb-pc1.dtb: gpio-leds: 'power', 'system' do not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' Signed-off-by: Arınç ÜNAL Reviewed-by: Sergio Paracuellos Signed-off-by: Thomas Bogendoerfer commit 571f235163ac83407e212b78719175236962aede Author: Yang Li Date: Fri Feb 17 16:30:05 2023 +0800 mmc: meson-gx: 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 Link: https://lore.kernel.org/r/20230217083005.128668-1-yang.lee@linux.alibaba.com Signed-off-by: Ulf Hansson commit c5a66dd8926baa60235bc8844925c36a1b83f488 Author: Heiner Kallweit Date: Wed Feb 15 21:01:43 2023 +0100 mmc: meson-gx: constify member data of struct meson_host Constify member data of struct meson_host. This also allows to remove the cast as of_device_get_match_data() returns a const void *. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/70e5520f-e327-111d-9ea4-824460e41561@gmail.com Signed-off-by: Ulf Hansson commit 4c4fe4f0bb02a46f226db88cb1c7e7586e16fc37 Author: Heiner Kallweit Date: Wed Feb 15 20:58:29 2023 +0100 mmc: meson-gx: use devm_clk_get_enabled() for core clock Use devm_clk_get_enabled() to simplify the code. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/b316c6ba-a373-f1d2-27d2-9add5e25a9d2@gmail.com Signed-off-by: Ulf Hansson commit 7245e629dcaaf308f1868aeffa218e9849c77893 Author: Alexandr Sapozhnikov Date: Wed Feb 15 20:15:49 2023 +0300 drm/cirrus: NULL-check pipe->plane.state->fb in cirrus_pipe_update() After having been compared to NULL value at cirrus.c:455, pointer 'pipe->plane.state->fb' is passed as 1st parameter in call to function 'cirrus_fb_blit_rect' at cirrus.c:461, where it is dereferenced at cirrus.c:316. Found by Linux Verification Center (linuxtesting.org) with SVACE. v2: * aligned commit message to line-length limits Signed-off-by: Alexandr Sapozhnikov Reviewed-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230215171549.16305-1-alsp705@gmail.com commit 71d04535e853305a76853b28a01512a62006351d Author: Yang Yingliang Date: Fri Feb 17 10:43:33 2023 +0800 mmc: core: fix return value check in devm_mmc_alloc_host() mmc_alloc_host() returns NULL pointer not PTR_ERR(), if it fails, so replace the IS_ERR() check with NULL pointer check. In commit 418f7c2de133 ("mmc: meson-gx: use devm_mmc_alloc_host"), it checks NULL pointer not PTR_ERR, if devm_mmc_alloc_host() fails, so make it to return NULL pointer to keep same with mmc_alloc_host(), the drivers don't need to change the error handle when switch to use devm_mmc_alloc_host(). Fixes: 80df83c2c57e ("mmc: core: add devm_mmc_alloc_host") Signed-off-by: Yang Yingliang Reviewed-by: Heiner Kallweit Link: https://lore.kernel.org/r/20230217024333.4018279-1-yangyingliang@huawei.com Signed-off-by: Ulf Hansson commit f0c5b325dd80b295bd3959fff9166e1152e558bf Author: Heiner Kallweit Date: Thu Feb 16 20:50:22 2023 +0100 dt-bindings: mmc: meson-gx: fix interrupt binding Reflect in the binding that the cd interrupt is optional, and add a description of the interrupts. Fixes: 09b31a610328 ("dt-bindings: mmc: meson-gx: support specifying cd interrupt") Signed-off-by: Heiner Kallweit Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/c1437eb6-0c01-809f-422b-cb1109489355@gmail.com Signed-off-by: Ulf Hansson commit 3a156b52c73c9491441799bbbac18075bf96480e Author: Johannes Berg Date: Thu Feb 16 21:34:44 2023 +0100 wifi: iwlegacy: avoid fortify warning There are two different alive messages, the "init" one is bigger than the other one, so we have a fortify read warn here. Avoid it by copying from the variable-sized 'raw' instead. Signed-off-by: Johannes Berg Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230216203444.134310-1-johannes@sipsolutions.net commit d9fcf94b8f68f4a0b440d26a1143932525c2f3dd Author: Johannes Berg Date: Thu Feb 16 20:57:54 2023 +0100 wifi: iwlwifi: mvm: remove unused iwl_dbgfs_is_match() This inline function is unused, remove it. Signed-off-by: Johannes Berg Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230216205754.d500dcc2e90c.Id87df297263f86b5bba002f7cbb387abc13adf53@changeid commit 0731d0b664f26f54b6293421af54da15b9eb1c8c Author: Po-Hao Huang Date: Thu Feb 16 16:28:07 2023 +0800 wifi: rtw89: fix AP mode authentication transmission failed For some ICs, packets can't be sent correctly without initializing CMAC table first. Previous flow do this initialization after associated, results in authentication response fails to transmit. Move the initialization up front to a proper place to solve this. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230216082807.22285-1-pkshih@realtek.com commit 4a267bc5ea8f159b614d0549030216d0434eccca Author: Ping-Ke Shih Date: Thu Feb 16 13:36:33 2023 +0800 wifi: rtw88: use RTW_FLAG_POWERON flag to prevent to power on/off twice Use power state to decide whether we can enter or leave IPS accurately, and then prevent to power on/off twice. The commit 6bf3a083407b ("wifi: rtw88: add flag check before enter or leave IPS") would like to prevent this as well, but it still can't entirely handle all cases. The exception is that WiFi gets connected and does suspend/resume, it will power on twice and cause it failed to power on after resuming, like: rtw_8723de 0000:03:00.0: failed to poll offset=0x6 mask=0x2 value=0x2 rtw_8723de 0000:03:00.0: mac power on failed rtw_8723de 0000:03:00.0: failed to power on mac rtw_8723de 0000:03:00.0: leave idle state failed rtw_8723de 0000:03:00.0: failed to leave ips state rtw_8723de 0000:03:00.0: failed to leave idle state rtw_8723de 0000:03:00.0: failed to send h2c command To fix this, introduce new flag RTW_FLAG_POWERON to reflect power state, and call rtw_mac_pre_system_cfg() to configure registers properly between power-off/-on. Reported-by: Paul Gover Link: https://bugzilla.kernel.org/show_bug.cgi?id=217016 Fixes: 6bf3a083407b ("wifi: rtw88: add flag check before enter or leave IPS") Cc: Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230216053633.20366-1-pkshih@realtek.com commit a3583e92d188ec6c58c7f603ac5e72dd8a11c21a Author: Krzysztof Kozlowski Date: Thu Feb 9 11:58:41 2023 +0100 ARM: dts: exynos: correct TMU phandle in Odroid XU3 family TMU node uses 0 as thermal-sensor-cells, thus thermal zone referencing it must not have an argument to phandle. This was not critical before, but since rework of thermal Devicetree initialization in the commit 3fd6d6e2b4e8 ("thermal/of: Rework the thermal device tree initialization"), this leads to errors registering thermal zones other than first one: thermal_sys: cpu0-thermal: Failed to read thermal-sensors cells: -2 thermal_sys: Failed to find thermal zone for tmu id=0 exynos-tmu 10064000.tmu: Failed to register sensor: -2 exynos-tmu: probe of 10064000.tmu failed with error -2 Fixes: f1722d7dd8b8 ("ARM: dts: Define default thermal-zones for exynos5422") Cc: Link: https://lore.kernel.org/r/20230209105841.779596-6-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 2e3d0e20d8456f876607a8af61fdb83dfbf98cb6 Author: Krzysztof Kozlowski Date: Thu Feb 9 11:58:40 2023 +0100 ARM: dts: exynos: correct TMU phandle in Odroid HC1 TMU node uses 0 as thermal-sensor-cells, thus thermal zone referencing it must not have an argument to phandle. This was not critical before, but since rework of thermal Devicetree initialization in the commit 3fd6d6e2b4e8 ("thermal/of: Rework the thermal device tree initialization"), this leads to errors registering thermal zones other than first one: thermal_sys: cpu0-thermal: Failed to read thermal-sensors cells: -2 thermal_sys: Failed to find thermal zone for tmu id=0 exynos-tmu 10064000.tmu: Failed to register sensor: -2 exynos-tmu: probe of 10064000.tmu failed with error -2 Fixes: 1ac49427b566 ("ARM: dts: exynos: Add support for Hardkernel's Odroid HC1 board") Cc: Link: https://lore.kernel.org/r/20230209105841.779596-5-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 9372eca505e7a19934d750b4b4c89a3652738e66 Author: Krzysztof Kozlowski Date: Thu Feb 9 11:58:39 2023 +0100 ARM: dts: exynos: correct TMU phandle in Odroid XU TMU node uses 0 as thermal-sensor-cells, thus thermal zone referencing it must not have an argument to phandle. Since thermal-sensors property is already defined in included exynosi5410.dtsi, drop it from exynos5410-odroidxu.dts to fix the error and remoev redundancy. Fixes: 88644b4c750b ("ARM: dts: exynos: Configure PWM, usb3503, PMIC and thermal on Odroid XU board") Cc: Link: https://lore.kernel.org/r/20230209105841.779596-4-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 33e2c595e2e4016991ead44933a29d1ef93d5f26 Author: Krzysztof Kozlowski Date: Thu Feb 9 11:58:38 2023 +0100 ARM: dts: exynos: correct TMU phandle in Exynos5250 TMU node uses 0 as thermal-sensor-cells, thus thermal zone referencing it must not have an argument to phandle. Cc: Fixes: 9843a2236003 ("ARM: dts: Provide dt bindings identical for Exynos TMU") Link: https://lore.kernel.org/r/20230209105841.779596-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 408ab6786dbf6dd696488054c9559681112ef994 Author: Krzysztof Kozlowski Date: Thu Feb 9 11:58:37 2023 +0100 ARM: dts: exynos: correct TMU phandle in Exynos4210 TMU node uses 0 as thermal-sensor-cells, thus thermal zone referencing it must not have an argument to phandle. Since thermal-sensors property is already defined in included exynos4-cpu-thermal.dtsi, drop it from exynos4210.dtsi to fix the error and remoev redundancy. Fixes: 9843a2236003 ("ARM: dts: Provide dt bindings identical for Exynos TMU") Cc: Link: https://lore.kernel.org/r/20230209105841.779596-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 8e4505e617a80f601e2f53a917611777f128f925 Author: Krzysztof Kozlowski Date: Thu Feb 9 11:58:36 2023 +0100 ARM: dts: exynos: correct TMU phandle in Exynos4 TMU node uses 0 as thermal-sensor-cells, thus thermal zone referencing it must not have an argument to phandle. Fixes: 328829a6ad70 ("ARM: dts: define default thermal-zones for exynos4") Cc: Link: https://lore.kernel.org/r/20230209105841.779596-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit fb073aa27a7e1b8c968c05c5447a77d49e832ec5 Author: Thomas Weißschuh Date: Fri Feb 17 03:13:22 2023 +0000 dma-buf: 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 Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20230217-kobj_type-dma-buf-v1-1-b84a3616522c@weissschuh.net commit f7a449f779608efe1941a0e0c4bd7b5f57000be7 Author: Roman Gushchin Date: Mon Feb 13 11:29:22 2023 -0800 mm: memcontrol: rename memcg_kmem_enabled() Currently there are two kmem-related helper functions with a confusing semantics: memcg_kmem_enabled() and mem_cgroup_kmem_disabled(). The problem is that an obvious expectation memcg_kmem_enabled() == !mem_cgroup_kmem_disabled(), can be false. mem_cgroup_kmem_disabled() is similar to mem_cgroup_disabled(): it returns true only if CONFIG_MEMCG_KMEM is not set or the kmem accounting is disabled using a boot time kernel option "cgroup.memory=nokmem". It never changes the value dynamically. memcg_kmem_enabled() is different: it always returns false until the first non-root memory cgroup will get online (assuming the kernel memory accounting is enabled). It's goal is to improve the performance on systems without the cgroupfs mounted/memory controller enabled or on the systems with only the root memory cgroup. To make things more obvious and avoid potential bugs, let's rename memcg_kmem_enabled() to memcg_kmem_online(). Link: https://lkml.kernel.org/r/20230213192922.1146370-1-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin Acked-by: Muchun Song Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Shakeel Butt Cc: Dennis Zhou Signed-off-by: Andrew Morton commit b4fb12e6c74791ac4c5c98b845628c576366b889 Author: Mike Rapoport (IBM) Date: Tue Feb 14 16:07:29 2023 +0200 sh: initialize max_mapnr sh never initializes max_mapnr which is used by the generic implementation of pfn_valid(). Initialize max_mapnr with set_max_mapnr() in sh::paging_init(). Link: https://lkml.kernel.org/r/20230214140729.1649961-3-rppt@kernel.org Fixes: e5080a967785 ("mm, arch: add generic implementation of pfn_valid() for FLATMEM") Reported-by: Guenter Roeck Signed-off-by: Mike Rapoport (IBM) Acked-by: John Paul Adrian Glaubitz Reviewed-by: David Hildenbrand Cc: Arnd Bergmann Cc: Geert Uytterhoeven Cc: Greg Ungerer Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit 9325ddf90ec3a801c09da374b74532d4589a7346 Author: Mike Rapoport (IBM) Date: Tue Feb 14 16:07:28 2023 +0200 m68k/nommu: add missing definition of ARCH_PFN_OFFSET Patch series "fixups for generic implementation of pfn_valid()". Guenter reported boot failures on m68k-nommu and sh caused by the switch to the generic implementation of pfn_valid(): https://lore.kernel.org/all/20230212173513.GA4052259@roeck-us.net https://lore.kernel.org/all/20230212161320.GA3784076@roeck-us.net These are small fixups that address the issues. This patch (of 2): On m68k/nommu RAM does not necessarily start at 0x0 and when it does not pfn_valid() uses a wrong offset into the memory map which causes silent boot failures. Define ARCH_PFN_OFFSET to make pfn_valid() use the correct offset. Link: https://lkml.kernel.org/r/20230214140729.1649961-1-rppt@kernel.org Link: https://lkml.kernel.org/r/20230214140729.1649961-2-rppt@kernel.org Fixes: d82f07f06cf8 ("m68k: use asm-generic/memory_model.h for both MMU and !MMU") Reported-by: Guenter Roeck Signed-off-by: Mike Rapoport (IBM) Acked-by: Greg Ungerer Reviewed-by: David Hildenbrand Cc: Arnd Bergmann Cc: Geert Uytterhoeven Cc: Rich Felker Cc: Yoshinori Sato Cc: John Paul Adrian Glaubitz Signed-off-by: Andrew Morton commit 2ef8ed7ddd2e6e69da7802be51af8ad71326a74f Author: Yafang Shao Date: Tue Feb 14 15:35:49 2023 +0000 mm: percpu: fix incorrect size in pcpu_obj_full_size() The extra space which is used to store the obj_cgroup membership is only valid when kmemcg is enabled. The kmemcg can be disabled via the kernel parameter "cgroup.memory=nokmem" at boot time. This helper is also used in non-memcg code, for example the tracepoint, so we should fix it. It was found by code review when I was implementing bpf memory usage[1]. No real issue happens in production environment. [1]. https://lwn.net/Articles/921991/ Link: https://lkml.kernel.org/r/20230214153549.12291-1-laoar.shao@gmail.com Signed-off-by: Yafang Shao Reviewed-by: Roman Gushchin Acked-by: Dennis Zhou Cc: Tejun Heo Cc: Christoph Lameter Cc: Vasily Averin Signed-off-by: Andrew Morton commit 44081c77e8a4aac9c5a010ed0d9ccdcf684041e1 Author: Arnd Bergmann Date: Tue Feb 14 11:30:24 2023 +0100 maple_tree: reduce stack usage with gcc-9 and earlier gcc-10 changed the way inlining works to be less aggressive, but older versions run into an oversized stack frame warning whenever CONFIG_KASAN_STACK is enabled, as that forces variables from inlined callees to be non-overlapping: lib/maple_tree.c: In function 'mas_wr_bnode': lib/maple_tree.c:4320:1: error: the frame size of 1424 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] Change the annotations on mas_store_b_node() and mas_commit_b_node() to explicitly forbid inlining in this configuration, which is the same behavior that newer versions already have. Link: https://lkml.kernel.org/r/20230214103030.1051950-1-arnd@kernel.org Signed-off-by: Arnd Bergmann Reviewed-by: David Hildenbrand Reviewed-by: Liam R. Howlett Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Dmitry Vyukov Cc: Vincenzo Frascino Cc: Vernon Yang Signed-off-by: Andrew Morton commit 1bc67ca65b31bcb669c4eaca79b3c8d205bb212a Author: Qi Zheng Date: Sun Feb 12 19:10:27 2023 +0800 mm: page_alloc: call panic() when memoryless node allocation fails In free_area_init(), we will continue to run after allocation of memoryless node pgdat fails. However, in the subsequent process (such as when initializing zonelist), the case that NODE_DATA(nid) is NULL is not handled, which will cause panic. Instead of this, it's better to call panic() directly when the memory allocation fails during system boot. Link: https://lkml.kernel.org/r/20230212111027.95520-1-zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Signed-off-by: Andrew Morton commit 9f550d78b40da21b4da515db4c37d8d7b12aa1a6 Author: Yu Zhao Date: Mon Feb 13 00:53:22 2023 -0700 mm: multi-gen LRU: avoid futile retries Recall that the per-node memcg LRU has two generations and they alternate when the last memcg (of a given node) is moved from one to the other. Each generation is also sharded into multiple bins to improve scalability. A reclaimer starts with a random bin (in the old generation) and, if it fails, it will retry, i.e., to try the rest of the bins. If a reclaimer fails with the last memcg, it should move this memcg to the young generation first, which causes the generations to alternate, and then retry. Otherwise, the retries will be futile because all other bins are empty. Link: https://lkml.kernel.org/r/20230213075322.1416966-1-yuzhao@google.com Fixes: e4dde56cd208 ("mm: multi-gen LRU: per-node lru_gen_folio lists") Signed-off-by: Yu Zhao Reported-by: T.J. Mercier Signed-off-by: Andrew Morton commit 6f7d760e86fa84862d749e36ebd29abf31f4f883 Author: Huang Ying Date: Mon Feb 13 20:34:44 2023 +0800 migrate_pages: move THP/hugetlb migration support check to simplify code This is a code cleanup patch, no functionality change is expected. After the change, the line number reduces especially in the long migrate_pages_batch(). Link: https://lkml.kernel.org/r/20230213123444.155149-10-ying.huang@intel.com Signed-off-by: "Huang, Ying" Suggested-by: Alistair Popple Reviewed-by: Zi Yan Cc: Yang Shi Cc: Baolin Wang Cc: Oscar Salvador Cc: Matthew Wilcox Cc: Bharata B Rao Cc: Xin Hao Cc: Minchan Kim Cc: Mike Kravetz Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Andrew Morton commit 7e12beb8ca2ac98b2ec42e0ea4b76cdc93b58654 Author: Huang Ying Date: Mon Feb 13 20:34:43 2023 +0800 migrate_pages: batch flushing TLB The TLB flushing will cost quite some CPU cycles during the folio migration in some situations. For example, when migrate a folio of a process with multiple active threads that run on multiple CPUs. After batching the _unmap and _move in migrate_pages(), the TLB flushing can be batched easily with the existing TLB flush batching mechanism. This patch implements that. We use the following test case to test the patch. On a 2-socket Intel server, - Run pmbench memory accessing benchmark - Run `migratepages` to migrate pages of pmbench between node 0 and node 1 back and forth. With the patch, the TLB flushing IPI reduces 99.1% during the test and the number of pages migrated successfully per second increases 291.7%. Haoxin helped to test the patchset on an ARM64 server with 128 cores, 2 NUMA nodes. Test results show that the page migration performance increases up to 78%. NOTE: TLB flushing is batched only for normal folios, not for THP folios. Because the overhead of TLB flushing for THP folios is much lower than that for normal folios (about 1/512 on x86 platform). Link: https://lkml.kernel.org/r/20230213123444.155149-9-ying.huang@intel.com Signed-off-by: "Huang, Ying" Tested-by: Xin Hao Reviewed-by: Zi Yan Reviewed-by: Xin Hao Cc: Yang Shi Cc: Baolin Wang Cc: Oscar Salvador Cc: Matthew Wilcox Cc: Bharata B Rao Cc: Alistair Popple Cc: Minchan Kim Cc: Mike Kravetz Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Andrew Morton commit ebe75e4751063dce6f61b579b43de86dcf7b7462 Author: Huang Ying Date: Mon Feb 13 20:34:42 2023 +0800 migrate_pages: share more code between _unmap and _move This is a code cleanup patch to reduce the duplicated code between the _unmap and _move stages of migrate_pages(). No functionality change is expected. Link: https://lkml.kernel.org/r/20230213123444.155149-8-ying.huang@intel.com Signed-off-by: "Huang, Ying" Cc: Zi Yan Cc: Yang Shi Cc: Baolin Wang Cc: Oscar Salvador Cc: Matthew Wilcox Cc: Bharata B Rao Cc: Alistair Popple Cc: Xin Hao Cc: Minchan Kim Cc: Mike Kravetz Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Andrew Morton commit 80562ba0d8378e89fe5836c28ea56c2aab3014e8 Author: Huang Ying Date: Mon Feb 13 20:34:41 2023 +0800 migrate_pages: move migrate_folio_unmap() Just move the position of the functions. There's no any functionality change. This is to make it easier to review the next patch via putting code near its position in the next patch. Link: https://lkml.kernel.org/r/20230213123444.155149-7-ying.huang@intel.com Signed-off-by: "Huang, Ying" Reviewed-by: Zi Yan Cc: Yang Shi Cc: Baolin Wang Cc: Oscar Salvador Cc: Matthew Wilcox Cc: Bharata B Rao Cc: Alistair Popple Cc: Xin Hao Cc: Minchan Kim Cc: Mike Kravetz Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Andrew Morton commit 5dfab109d5193e6c224d96cabf90e9cc2c039884 Author: Huang Ying Date: Mon Feb 13 20:34:40 2023 +0800 migrate_pages: batch _unmap and _move In this patch the _unmap and _move stage of the folio migration is batched. That for, previously, it is, for each folio _unmap() _move() Now, it is, for each folio _unmap() for each folio _move() Based on this, we can batch the TLB flushing and use some hardware accelerator to copy folios between batched _unmap and batched _move stages. Link: https://lkml.kernel.org/r/20230213123444.155149-6-ying.huang@intel.com Signed-off-by: "Huang, Ying" Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Zi Yan Cc: Yang Shi Cc: Baolin Wang Cc: Oscar Salvador Cc: Matthew Wilcox Cc: Bharata B Rao Cc: Alistair Popple Cc: Xin Hao Cc: Minchan Kim Cc: Mike Kravetz Signed-off-by: Andrew Morton commit 64c8902ed4418317cd416c566f896bd4a92b2efc Author: Huang Ying Date: Mon Feb 13 20:34:39 2023 +0800 migrate_pages: split unmap_and_move() to _unmap() and _move() This is a preparation patch to batch the folio unmapping and moving. In this patch, unmap_and_move() is split to migrate_folio_unmap() and migrate_folio_move(). So, we can batch _unmap() and _move() in different loops later. To pass some information between unmap and move, the original unused dst->mapping and dst->private are used. Link: https://lkml.kernel.org/r/20230213123444.155149-5-ying.huang@intel.com Signed-off-by: "Huang, Ying" Reviewed-by: Baolin Wang Reviewed-by: Xin Hao Cc: Zi Yan Cc: Yang Shi Cc: Oscar Salvador Cc: Matthew Wilcox Cc: Bharata B Rao Cc: Alistair Popple Cc: Minchan Kim Cc: Mike Kravetz Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Andrew Morton commit 42012e0436d44aeb2e68f11a28ddd0ad3f38b61f Author: Huang Ying Date: Mon Feb 13 20:34:38 2023 +0800 migrate_pages: restrict number of pages to migrate in batch This is a preparation patch to batch the folio unmapping and moving for non-hugetlb folios. If we had batched the folio unmapping, all folios to be migrated would be unmapped before copying the contents and flags of the folios. If the folios that were passed to migrate_pages() were too many in unit of pages, the execution of the processes would be stopped for too long time, thus too long latency. For example, migrate_pages() syscall will call migrate_pages() with all folios of a process. To avoid this possible issue, in this patch, we restrict the number of pages to be migrated to be no more than HPAGE_PMD_NR. That is, the influence is at the same level of THP migration. Link: https://lkml.kernel.org/r/20230213123444.155149-4-ying.huang@intel.com Signed-off-by: "Huang, Ying" Reviewed-by: Baolin Wang Cc: Zi Yan Cc: Yang Shi Cc: Oscar Salvador Cc: Matthew Wilcox Cc: Bharata B Rao Cc: Alistair Popple Cc: Xin Hao Cc: Minchan Kim Cc: Mike Kravetz Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Andrew Morton commit e5bfff8b10e496378da4b7863479dd6fb907d4ea Author: Huang Ying Date: Mon Feb 13 20:34:37 2023 +0800 migrate_pages: separate hugetlb folios migration This is a preparation patch to batch the folio unmapping and moving for the non-hugetlb folios. Based on that we can batch the TLB shootdown during the folio migration and make it possible to use some hardware accelerator for the folio copying. In this patch the hugetlb folios and non-hugetlb folios migration is separated in migrate_pages() to make it easy to change the non-hugetlb folios migration implementation. Link: https://lkml.kernel.org/r/20230213123444.155149-3-ying.huang@intel.com Signed-off-by: "Huang, Ying" Reviewed-by: Baolin Wang Reviewed-by: Xin Hao Cc: Zi Yan Cc: Yang Shi Cc: Oscar Salvador Cc: Matthew Wilcox Cc: Bharata B Rao Cc: Alistair Popple Cc: Minchan Kim Cc: Mike Kravetz Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Andrew Morton commit 5b855937096aea7f81e73ad6d40d433c9dd49577 Author: Huang Ying Date: Mon Feb 13 20:34:36 2023 +0800 migrate_pages: organize stats with struct migrate_pages_stats Patch series "migrate_pages(): batch TLB flushing", v5. Now, migrate_pages() migrates folios one by one, like the fake code as follows, for each folio unmap flush TLB copy restore map If multiple folios are passed to migrate_pages(), there are opportunities to batch the TLB flushing and copying. That is, we can change the code to something as follows, for each folio unmap for each folio flush TLB for each folio copy for each folio restore map The total number of TLB flushing IPI can be reduced considerably. And we may use some hardware accelerator such as DSA to accelerate the folio copying. So in this patch, we refactor the migrate_pages() implementation and implement the TLB flushing batching. Base on this, hardware accelerated folio copying can be implemented. If too many folios are passed to migrate_pages(), in the naive batched implementation, we may unmap too many folios at the same time. The possibility for a task to wait for the migrated folios to be mapped again increases. So the latency may be hurt. To deal with this issue, the max number of folios be unmapped in batch is restricted to no more than HPAGE_PMD_NR in the unit of page. That is, the influence is at the same level of THP migration. We use the following test to measure the performance impact of the patchset, On a 2-socket Intel server, - Run pmbench memory accessing benchmark - Run `migratepages` to migrate pages of pmbench between node 0 and node 1 back and forth. With the patch, the TLB flushing IPI reduces 99.1% during the test and the number of pages migrated successfully per second increases 291.7%. Xin Hao helped to test the patchset on an ARM64 server with 128 cores, 2 NUMA nodes. Test results show that the page migration performance increases up to 78%. This patch (of 9): Define struct migrate_pages_stats to organize the various statistics in migrate_pages(). This makes it easier to collect and consume the statistics in multiple functions. This will be needed in the following patches in the series. Link: https://lkml.kernel.org/r/20230213123444.155149-1-ying.huang@intel.com Link: https://lkml.kernel.org/r/20230213123444.155149-2-ying.huang@intel.com Signed-off-by: "Huang, Ying" Reviewed-by: Alistair Popple Reviewed-by: Zi Yan Reviewed-by: Baolin Wang Reviewed-by: Xin Hao Cc: Yang Shi Cc: Oscar Salvador Cc: Matthew Wilcox Cc: Bharata B Rao Cc: Minchan Kim Cc: Mike Kravetz Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Andrew Morton commit 0621d160f1003a8aedd3628133568ecffdd724f7 Author: Andrey Konovalov Date: Fri Feb 10 22:16:06 2023 +0100 lib/stackdepot: move documentation comments to stackdepot.h Move all interface- and usage-related documentation comments to include/linux/stackdepot.h. It makes sense to have them in the header where they are available to the interface users. [akpm@linux-foundation.org: grammar fix, per Alexander] Link: https://lkml.kernel.org/r/fbfee41495b306dd8881f9b1c1b80999c885e82f.1676063693.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Signed-off-by: Andrew Morton commit b232b9995a6dbaafe19d07d81acc039bc84bd569 Author: Andrey Konovalov Date: Fri Feb 10 22:16:05 2023 +0100 lib/stackdepot: various comments clean-ups Clean up comments in include/linux/stackdepot.h and lib/stackdepot.c: 1. Rework the initialization comment in stackdepot.h. 2. Rework the header comment in stackdepot.c. 3. Various clean-ups for other comments. Also adjust whitespaces for find_stack and depot_alloc_stack call sites. No functional changes. Link: https://lkml.kernel.org/r/5836231b7954355e2311fc9b5870f697ea8e1f7d.1676063693.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Signed-off-by: Andrew Morton commit beb3c23c69a91a10f247e93ffef1fcd0209d93e4 Author: Andrey Konovalov Date: Fri Feb 10 22:16:04 2023 +0100 lib/stackdepot: annotate racy pool_index accesses Accesses to pool_index are protected by pool_lock everywhere except in a sanity check in stack_depot_fetch. The read access there can race with the write access in depot_alloc_stack. Use WRITE/READ_ONCE() to annotate the racy accesses. As the sanity check is only used to print a warning in case of a violation of the stack depot interface usage, it does not make a lot of sense to use proper synchronization. [andreyknvl@google.com: s/pool_index/pool_index_cached/ in stack_depot_fetch()] Link: https://lkml.kernel.org/r/95cf53f0da2c112aa2cc54456cbcd6975c3ff343.1676129911.git.andreyknvl@google.com Link: https://lkml.kernel.org/r/359ac9c13cd0869c56740fb2029f505e41593830.1676063693.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Signed-off-by: Andrew Morton commit 36aa1e6779c3c6f8e0d4552544214f5cffe3c287 Author: Andrey Konovalov Date: Fri Feb 10 22:16:03 2023 +0100 lib/stacktrace, kasan, kmsan: rework extra_bits interface The current implementation of the extra_bits interface is confusing: passing extra_bits to __stack_depot_save makes it seem that the extra bits are somehow stored in stack depot. In reality, they are only embedded into a stack depot handle and are not used within stack depot. Drop the extra_bits argument from __stack_depot_save and instead provide a new stack_depot_set_extra_bits function (similar to the exsiting stack_depot_get_extra_bits) that saves extra bits into a stack depot handle. Update the callers of __stack_depot_save to use the new interace. This change also fixes a minor issue in the old code: __stack_depot_save does not return NULL if saving stack trace fails and extra_bits is used. Link: https://lkml.kernel.org/r/317123b5c05e2f82854fc55d8b285e0869d3cb77.1676063693.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Signed-off-by: Andrew Morton commit d11a5621f3252120dfc7cef7600a90bd8e605caf Author: Andrey Konovalov Date: Fri Feb 10 22:16:02 2023 +0100 lib/stackdepot: rename next_pool_inited to next_pool_required Stack depot uses next_pool_inited to mark that either the next pool is initialized or the limit on the number of pools is reached. However, the flag name only reflects the former part of its purpose, which is confusing. Rename next_pool_inited to next_pool_required and invert its value. Also annotate usages of next_pool_required with comments. Link: https://lkml.kernel.org/r/484fd2695dff7a9bdc437a32f8a6ee228535aa02.1676063693.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Signed-off-by: Andrew Morton commit cd0fc64e76844758b78d0fd376ae3ca4fd802049 Author: Andrey Konovalov Date: Fri Feb 10 22:16:01 2023 +0100 lib/stackdepot: annotate depot_init_pool and depot_alloc_stack Clean up the exisiting comments and add new ones to depot_init_pool and depot_alloc_stack. As a part of the clean-up, remove mentions of which variable is accessed by smp_store_release and smp_load_acquire: it is clear as is from the code. Link: https://lkml.kernel.org/r/f80b02951364e6b40deda965b4003de0cd1a532d.1676063693.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Signed-off-by: Andrew Morton commit 514d5c557b8b590a80f0569af5ae5f4d455ecef2 Author: Andrey Konovalov Date: Fri Feb 10 22:16:00 2023 +0100 lib/stacktrace: drop impossible WARN_ON for depot_init_pool depot_init_pool has two call sites: 1. In depot_alloc_stack with a potentially NULL prealloc. 2. In __stack_depot_save with a non-NULL prealloc. At the same time depot_init_pool can only return false when prealloc is NULL. As the second call site makes sure that prealloc is not NULL, the WARN_ON there can never trigger. Thus, drop the WARN_ON and also move the prealloc check from depot_init_pool to its first call site. Also change the return type of depot_init_pool to void as it now always returns true. Link: https://lkml.kernel.org/r/ce149f9bdcbc80a92549b54da67eafb27f846b7b.1676063693.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Signed-off-by: Andrew Morton commit cb788e84a4cfe47941cded45b5ca81a917fbb1a6 Author: Andrey Konovalov Date: Fri Feb 10 22:15:59 2023 +0100 lib/stackdepot: rename init_stack_pool Rename init_stack_pool to depot_init_pool to align the name with depot_alloc_stack. No functional changes. Link: https://lkml.kernel.org/r/23106a3e291d8df0aba33c0e2fe86dc596286479.1676063693.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Signed-off-by: Andrew Morton commit 424cafee4a9c66435d8b86e7edbc794c116b52a5 Author: Andrey Konovalov Date: Fri Feb 10 22:15:58 2023 +0100 lib/stackdepot: rename handle and pool constants Change the "STACK_ALLOC_" prefix to "DEPOT_" for the constants that define the number of bits in stack depot handles and the maximum number of pools. The old prefix is unclear and makes wonder about how these constants are related to stack allocations. The new prefix is also shorter. Also simplify the comment for DEPOT_POOL_ORDER. No functional changes. Link: https://lkml.kernel.org/r/84fcceb0acc261a356a0ad4bdfab9ff04bea2445.1676063693.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Signed-off-by: Andrew Morton commit 961c949b012f009c51ce209ded801e34d0a75306 Author: Andrey Konovalov Date: Fri Feb 10 22:15:57 2023 +0100 lib/stackdepot: rename slab to pool Use "pool" instead of "slab" for naming memory regions stack depot uses to store stack traces. Using "slab" is confusing, as stack depot pools have nothing to do with the slab allocator. Also give better names to pool-related global variables: change "depot_" prefix to "pool_" to point out that these variables are related to stack depot pools. Also rename the slabindex (poolindex) field in handle_parts to pool_index to align its name with the pool_index global variable. No functional changes. Link: https://lkml.kernel.org/r/923c507edb350c3b6ef85860f36be489dfc0ad21.1676063693.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Acked-by: Vlastimil Babka Reviewed-by: Alexander Potapenko Signed-off-by: Andrew Morton commit 4c2e9a679468a5bef2100504914481c6ddf0d9bd Author: Andrey Konovalov Date: Fri Feb 10 22:15:56 2023 +0100 lib/stackdepot: rename hash table constants and variables Give more meaningful names to hash table-related constants and variables: 1. Rename STACK_HASH_SCALE to STACK_HASH_TABLE_SCALE to point out that it is related to scaling the hash table. 2. Rename STACK_HASH_ORDER_MIN/MAX to STACK_BUCKET_NUMBER_ORDER_MIN/MAX to point out that it is related to the number of hash table buckets. 3. Rename stack_hash_order to stack_bucket_number_order for the same reason as #2. No functional changes. Link: https://lkml.kernel.org/r/f166dd6f3cb2378aea78600714393dd568c33ee9.1676063693.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Signed-off-by: Andrew Morton commit 0d249ac0e07680960929a2d4f7b32be505c8c7a1 Author: Andrey Konovalov Date: Fri Feb 10 22:15:55 2023 +0100 lib/stackdepot: reorder and annotate global variables Group stack depot global variables by their purpose: 1. Hash table-related variables, 2. Slab-related variables, and add comments. Also clean up comments for hash table-related constants. Link: https://lkml.kernel.org/r/5606a6c70659065a25bee59cd10e57fc60bb4110.1676063693.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Signed-off-by: Andrew Morton commit c60324fbf05d9b1dd3231f5373d4bf31cc23db07 Author: Andrey Konovalov Date: Fri Feb 10 22:15:54 2023 +0100 lib/stackdepot: lower the indentation in stack_depot_init stack_depot_init does most things inside an if check. Move them out and use a goto statement instead. No functional changes. Link: https://lkml.kernel.org/r/8e382f1f0c352e4b2ad47326fec7782af961fe8e.1676063693.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Signed-off-by: Andrew Morton commit df225c877d898992740d26250727a16db65c370d Author: Andrey Konovalov Date: Fri Feb 10 22:15:53 2023 +0100 lib/stackdepot: annotate init and early init functions Add comments to stack_depot_early_init and stack_depot_init to explain certain parts of their implementation. Also add a pr_info message to stack_depot_early_init similar to the one in stack_depot_init. Also move the scale variable in stack_depot_init to the scope where it is being used. Link: https://lkml.kernel.org/r/d17fbfbd4d73f38686c5e3d4824a6d62047213a1.1676063693.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Signed-off-by: Andrew Morton commit 735df3c3a3493cbedfa86739eec6e2ee37fe95f8 Author: Andrey Konovalov Date: Fri Feb 10 22:15:52 2023 +0100 lib/stackdepot: rename stack_depot_disable Rename stack_depot_disable to stack_depot_disabled to make its name look similar to the names of other stack depot flags. Also put stack_depot_disabled's definition together with the other flags. Also rename is_stack_depot_disabled to disable_stack_depot: this name looks more conventional for a function that processes a boot parameter. No functional changes. Link: https://lkml.kernel.org/r/d78a07d222e689926e5ead229e4a2e3d87dc9aa7.1676063693.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Signed-off-by: Andrew Morton commit 1c0310add78e7e47e3357c24369b61453a5a72eb Author: Andrey Konovalov Date: Fri Feb 10 22:15:51 2023 +0100 lib/stackdepot, mm: rename stack_depot_want_early_init Rename stack_depot_want_early_init to stack_depot_request_early_init. The old name is confusing, as it hints at returning some kind of intention of stack depot. The new name reflects that this function requests an action from stack depot instead. No functional changes. [akpm@linux-foundation.org: update mm/kmemleak.c] Link: https://lkml.kernel.org/r/359f31bf67429a06e630b4395816a967214ef753.1676063693.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton commit 4a6b5314d6bd9093dcc3c0c8e185af7df9a0fe34 Author: Andrey Konovalov Date: Fri Feb 10 22:15:50 2023 +0100 lib/stackdepot: use pr_fmt to define message format Use pr_fmt to define the format for printing stack depot messages instead of duplicating the "Stack Depot" prefix in each message. Link: https://lkml.kernel.org/r/3d09db0171a0e92ff3eb0ee74de74558bc9b56c4.1676063693.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Signed-off-by: Andrew Morton commit 15ef6a982f40a2b53b057dad24f00c3fb43e7e70 Author: Andrey Konovalov Date: Fri Feb 10 22:15:49 2023 +0100 lib/stackdepot: put functions in logical order Patch series "lib/stackdepot: fixes and clean-ups", v2. A set of fixes, comments, and clean-ups I came up with while reading the stack depot code. This patch (of 18): Put stack depot functions' declarations and definitions in a more logical order: 1. Functions that save stack traces into stack depot. 2. Functions that fetch and print stack traces. 3. stack_depot_get_extra_bits that operates on stack depot handles and does not interact with the stack depot storage. No functional changes. Link: https://lkml.kernel.org/r/cover.1676063693.git.andreyknvl@google.com Link: https://lkml.kernel.org/r/daca1319b665d826b94c596b992a8d8117846147.1676063693.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Cc: Evgenii Stepanov Cc: Marco Elver Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit f3ca73862453ac1e64fc6968a14bf66d839cd2d8 Author: Jens Axboe Date: Thu Feb 16 19:39:15 2023 -0700 block: use proper return value from bio_failfast() kernel test robot complains about a type mismatch: block/blk-merge.c:984:42: sparse: expected restricted blk_opf_t const [usertype] ff block/blk-merge.c:984:42: sparse: got unsigned int block/blk-merge.c:1010:42: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted blk_opf_t const [usertype] ff @@ got unsigned int @@ block/blk-merge.c:1010:42: sparse: expected restricted blk_opf_t const [usertype] ff block/blk-merge.c:1010:42: sparse: got unsigned int because bio_failfast() is return an unsigned int rather than the appropriate blk_opt_f type. Fix it up. Fixes: 3ce6a115980c ("block: sync mixed merged request's failfast with 1st bio's") Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202302170743.GXypM9Rt-lkp@intel.com/ Signed-off-by: Jens Axboe commit 40f4b05868101e047a8502ebb94f05312186421b Merge: 697c3892d825f c74e7af1245b2 Author: Mark Brown Date: Fri Feb 17 02:14:50 2023 +0000 Merge remote-tracking branch 'regmap/for-6.3' into regmap-next commit df71a42cc37a44cdc7682f57aecf14ff44391eed Author: Taichi Nishimura Date: Thu Feb 16 17:55:37 2023 +0900 Fix typos in selftest/bpf files Run spell checker on files in selftest/bpf and fixed typos. Signed-off-by: Taichi Nishimura Signed-off-by: Andrii Nakryiko Reviewed-by: Randy Dunlap Link: https://lore.kernel.org/bpf/20230216085537.519062-1-awkrail01@gmail.com commit cc29eadef921fe52aa58f32536a93d9ea0ca3eb7 Author: Jerry Hoemann Date: Fri Feb 10 11:42:47 2023 -0700 Documentation/watchdog/hpwdt: Fix Format Add list format so that compiled documentation looks like it was intended to. Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230210184247.221134-3-jerry.hoemann@hpe.com Signed-off-by: Jonathan Corbet commit 5e3be09f3fb2ac3bc1e86680683f2151836e669e Author: Jerry Hoemann Date: Fri Feb 10 11:42:46 2023 -0700 Documentation/watchdog/hpwdt: Fix Reference The IPMI documentation moved to Documentation/driver-api/ipmi.rst. Update reference to reflect new location. Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230210184247.221134-2-jerry.hoemann@hpe.com Signed-off-by: Jonathan Corbet commit c74e7af1245b2073930afc9a2a340d91e08f0f14 Author: Aidan MacDonald Date: Thu Feb 16 22:32:00 2023 +0000 regmap-irq: Remove unused mask_invert flag mask_invert is deprecated and no longer used; it can now be removed. Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20230216223200.150679-2-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown commit 483e6ea1b35aaeffd9b6e6e660d756be49c2a9f5 Author: Aidan MacDonald Date: Thu Feb 16 22:31:59 2023 +0000 regmap-irq: Remove unused type_invert flag type_invert is deprecated and no longer used; it can now be removed. Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20230216223200.150679-1-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown commit d2fb903f7d11e47366a2f6ff4ec530978fb73bfd Author: Randy Dunlap Date: Tue Feb 14 21:37:44 2023 -0800 Documentation: core-api: padata: correct spelling Correct spelling problems for Documentation/core-api/padata.rst as reported by codespell. Signed-off-by: Randy Dunlap Cc: netdev@vger.kernel.org Cc: Steffen Klassert Cc: Daniel Jordan Cc: linux-crypto@vger.kernel.org Cc: Herbert Xu Cc: "David S. Miller" Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Jakub Kicinski Reviewed-by: Mukesh Ojha Acked-by: Daniel Jordan Link: https://lore.kernel.org/r/20230215053744.11716-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 5ea8937ee6b131aec59de890b72994b51a18bb82 Author: Lukas Bulwahn Date: Wed Feb 15 11:08:08 2023 +0100 docs/mm: Physical Memory: correct spelling in reference to CONFIG_PAGE_EXTENSION Commit 5d8c5e430a63 ("docs/mm: Physical Memory: add structure, introduction and nodes description") slips in a minor spelling mistake for the config PAGE_EXTENSION. Correct the config name in the physical-memory documentation. Signed-off-by: Lukas Bulwahn Acked-by: Mike Rapoport (IBM) Link: https://lore.kernel.org/r/20230215100808.9613-1-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet commit c5a237a4db21ca7a28518c994def39d7bd62a0d1 Author: Ilya Leoshkevich Date: Wed Feb 15 00:12:18 2023 +0100 selftests/bpf: Use bpf_{btf,link,map,prog}_get_info_by_fd() Use the new type-safe wrappers around bpf_obj_get_info_by_fd(). Fix a prog/map mixup in prog_holds_map(). Signed-off-by: Ilya Leoshkevich Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230214231221.249277-6-iii@linux.ibm.com commit c0ca277bb8bc43152d2b2fa60b47a1e1d609da45 Author: Ilya Leoshkevich Date: Wed Feb 15 00:12:17 2023 +0100 samples/bpf: Use bpf_{btf,link,map,prog}_get_info_by_fd() Use the new type-safe wrappers around bpf_obj_get_info_by_fd(). Signed-off-by: Ilya Leoshkevich Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230214231221.249277-5-iii@linux.ibm.com commit 38f0408ef756e738387f7d8f62b8d58ca5938da4 Author: Ilya Leoshkevich Date: Wed Feb 15 00:12:16 2023 +0100 bpftool: Use bpf_{btf,link,map,prog}_get_info_by_fd() Use the new type-safe wrappers around bpf_obj_get_info_by_fd(). Split the bpf_obj_get_info_by_fd() call in build_btf_type_table() in two, since knowing the type helps with the Memory Sanitizer. Improve map_parse_fd_and_info() type safety by using struct bpf_map_info * instead of void * for info. Signed-off-by: Ilya Leoshkevich Signed-off-by: Andrii Nakryiko Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20230214231221.249277-4-iii@linux.ibm.com commit 629dfc660cae86a6a48d19f5295226d03caae673 Author: Ilya Leoshkevich Date: Wed Feb 15 00:12:15 2023 +0100 libbpf: Use bpf_{btf,link,map,prog}_get_info_by_fd() Use the new type-safe wrappers around bpf_obj_get_info_by_fd(). Signed-off-by: Ilya Leoshkevich Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230214231221.249277-3-iii@linux.ibm.com commit 55a9ed0e16baf4d025c160d46bc1e3fac0d4cdc4 Author: Ilya Leoshkevich Date: Wed Feb 15 00:12:14 2023 +0100 libbpf: Introduce bpf_{btf,link,map,prog}_get_info_by_fd() These are type-safe wrappers around bpf_obj_get_info_by_fd(). They found one problem in selftests, and are also useful for adding Memory Sanitizer annotations. Signed-off-by: Ilya Leoshkevich Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230214231221.249277-2-iii@linux.ibm.com commit 23c198e3dfaabbc891681aecb0855b9e0ac791e1 Merge: a5fcd228ca1db 1bb31131231dd Author: Dan Williams Date: Thu Feb 16 15:27:12 2023 -0800 Merge branch 'for-6.3/cxl-events' into cxl/next Include some additional fixups for event support for v6.3, namely, rationalize the identifiers in the trace output and fixup a kdoc comment. commit 9574d57f2d43361e2e796ace8b055f4359261ba1 Author: Lukas Bulwahn Date: Thu Dec 15 11:13:10 2022 +0100 PCI: hv: Drop duplicate PCI_MSI dependency Commit a474d3fbe287 ("PCI/MSI: Get rid of PCI_MSI_IRQ_DOMAIN") removed PCI_MSI_IRQ_DOMAIN and made all previous references to it refer to PCI_MSI instead. PCI_HYPERV_INTERFACE already depended on PCI_MSI && PCI_MSI_IRQ_DOMAIN, so we ended up with a redundant dependency on PCI_MSI && PCI_MSI. Drop the duplicate. No functional change. Just a stylistic clean-up. Link: https://lore.kernel.org/r/20221215101310.9135-1-lukas.bulwahn@gmail.com Signed-off-by: Lukas Bulwahn Signed-off-by: Bjorn Helgaas commit 4e98799a7021b51d1e641a8150ef71ef90c756ab Author: Jonathan Corbet Date: Thu Feb 16 16:06:44 2023 -0700 docs: Use HTML comments for the kernel-toc SPDX line This line was initially placed in {# jinja2 comments #}, but that led to an "invalid token" complaint from spdxcheck.py. Rather than fix the script for a usage we'll likely never see anywhere else, just switch to an HTML comment, which spdxcheck.py thinks is fine. Signed-off-by: Jonathan Corbet commit 1bb31131231ddef851bd01299f19603d38a111de Author: Alison Schofield Date: Thu Feb 16 11:24:26 2023 -0800 cxl/mem: Add kdoc param for event log driver state This makes the kernel-doc for cxl_dev_state complete. Signed-off-by: Alison Schofield Link: https://lore.kernel.org/r/20230216192426.1184606-1-alison.schofield@intel.com Signed-off-by: Dan Williams commit 6606f4c3c48c7a75b13816266d3ea562eeec0b44 Author: Logan Gunthorpe Date: Thu Feb 9 10:29:53 2023 -0700 PCI/P2PDMA: Annotate RCU dereference A dereference of the __rcu pointer was noticed by sparse: drivers/pci/p2pdma.c:199:44: sparse: sparse: dereference of noderef expression Dereference the __rcu pointer using rcu_dereference_protected() instead of accessing it directly. It's safe to use rcu_dereference_protected() because a reference is held on the pgmap's percpu reference counter and thus it cannot disappear. Link: https://lore.kernel.org/r/20230209172953.4597-1-logang@deltatee.com Reported-by: kernel test robot Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas Reviewed-by: Chaitanya Kulkarni commit 279676c9aa5e5f11377dddfdecfd22df526ee9b8 Author: Ira Weiny Date: Tue Feb 14 20:12:45 2023 -0800 cxl/trace: Add serial number to trace points Device serial numbers are useful information for the user. Add device serial numbers to all the trace points. Cc: Steven Rostedt Cc: Dave Jiang Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20230208-cxl-event-names-v2-3-fca130c2c68b@intel.com Signed-off-by: Dan Williams commit cd0570172dd8427e0bf36b4d70f0b595616da55d Author: Ira Weiny Date: Tue Feb 14 20:12:44 2023 -0800 cxl/trace: Add host output to trace points The host parameter of where the memdev is connected is useful information. Report host consistently in all trace points. Cc: Steven Rostedt Cc: Dave Jiang Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20230208-cxl-event-names-v2-2-fca130c2c68b@intel.com Signed-off-by: Dan Williams commit 0c8393dcdb1ef4dc358d95a2523297175135874b Author: Ira Weiny Date: Tue Feb 14 20:12:43 2023 -0800 cxl/trace: Standardize device information output The trace points were written to take a struct device input for the trace. In CXL multiple device objects are associated with each CXL hardware device. Using different device objects in the trace point can lead to confusion for users. The PCIe device is nice to have, but the user space tooling relies on the memory device naming. It is better to have those device names reported. Change all trace points to take struct cxl_memdev as a standard and report that name. Furthermore, standardize on the name 'memdev' in both /sys/kernel/tracing/trace and cxl-cli monitor output. Cc: Steven Rostedt Cc: Dave Jiang Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20230208-cxl-event-names-v2-1-fca130c2c68b@intel.com Signed-off-by: Dan Williams commit afeff81765c62da857ff709309f7351a56113795 Merge: ceaa837f96adb 88941ddefc2a2 Author: Arnd Bergmann Date: Thu Feb 16 22:09:53 2023 +0100 Merge tag 'davinci-fixes-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into arm/fixes DaVinci fixes for v6.2 - add myself as maintainer * tag 'davinci-fixes-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: MAINTAINERS: make me the maintainer of DaVinci platforms commit e43efb6d713bca3855909a2f9caec280a2b0a503 Author: Conor Dooley Date: Thu Feb 16 13:15:12 2023 +0000 dt-bindings: riscv: correct starfive visionfive 2 compatibles Using "va" and "vb" doesn't match what's written on the board, or the communications from StarFive. Switching to using the silkscreened version number will ease confusion & the risk of another spin of the board containing a "conflicting" version identifier. As the binding has not made it into mainline yet, take the opportunity to "correct" things. Suggested-by: Emil Renner Berthing Link: https://lore.kernel.org/linux-riscv/Y+4AxDSDLyL1WAqh@wendy/ Fixes: 97b7ed072784 ("dt-bindings: riscv: Add StarFive JH7110 SoC and VisionFive 2 board") Signed-off-by: Conor Dooley Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230216131511.3327943-1-conor.dooley@microchip.com Signed-off-by: Arnd Bergmann commit 5be374d0d1c4fc8731736a269083747412901053 Merge: 18b68c695ca6f 2d050f06485ae Author: Arnd Bergmann Date: Thu Feb 16 22:06:41 2023 +0100 Merge tag 'socfpga_dts_updates_for_v6.3_part2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/dt SoCFPGA dts updates for v6.3, part 2 - Add support for the enclustra PE1 board that is based on Arria10 * tag 'socfpga_dts_updates_for_v6.3_part2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: ARM: dts: socfpga: Add enclustra PE1 devicetree dt-bindings: altera: Add enclustra mercury PE1 Link: https://lore.kernel.org/r/20230216160910.509065-1-dinguyen@kernel.org Signed-off-by: Arnd Bergmann commit 6ad172748db49deef0da9038d29019aedf991a7e Merge: 470ac62dfa573 07c3f9224713c Author: Marc Kleine-Budde Date: Thu Feb 16 20:59:53 2023 +0100 Merge patch series "can: esd_usb: Some more preparation for supporting esd CAN-USB/3" Frank Jungclaus says: Another small batch of patches to be seen as preparation for adding support of the newly available esd CAN-USB/3 to esd_usb.c. Due to some unresolved questions adding support for CAN_CTRLMODE_BERR_REPORTING has been postponed to one of the future patches. v2 -> v3: * More specific subjects * Try to use imperative instead of past tense v1 -> v2: https://lore.kernel.org/all/20230214160223.1199464-1-frank.jungclaus@esd.eu * [Patch v2 1/3]: No changes. * [Patch v2 2/3]: Make use of can_change_state() and relocate testing alloc_can_err_skb() for NULL to the end of esd_usb_rx_event(), to have things like can_bus_off(), can_change_state() working even in out of memory conditions. * [Patch v2 3/3]: No changes. I will 'declare esd_usb_msg as an union instead of a struct' in a separate follow-up patch. v1: https://lore.kernel.org/all/20221219212013.1294820-1-frank.jungclaus@esd.eu https://lore.kernel.org/all/20221219212717.1298282-1-frank.jungclaus@esd.eu Link: https://lore.kernel.org/all/20230216190450.3901254-1-frank.jungclaus@esd.eu Signed-off-by: Marc Kleine-Budde commit 07c3f9224713c1b5f82c4583a456a6abc28f9d73 Author: Frank Jungclaus Date: Thu Feb 16 20:04:50 2023 +0100 can: esd_usb: Improve readability on decoding ESD_EV_CAN_ERROR_EXT messages As suggested by Marc introduce a union plus a struct ev_can_err_ext for easier decoding of an ESD_EV_CAN_ERROR_EXT event message (which simply is a rx_msg with some dedicated data). Suggested-by: Marc Kleine-Budde Link: https://lore.kernel.org/linux-can/20220621071152.ggyhrr5sbzvwpkpx@pengutronix.de/ Signed-off-by: Frank Jungclaus Link: https://lore.kernel.org/all/20230216190450.3901254-4-frank.jungclaus@esd.eu Signed-off-by: Marc Kleine-Budde commit 9684b000a86299b5968fef8ffbf1484def37452a Author: Frank Jungclaus Date: Thu Feb 16 20:04:49 2023 +0100 can: esd_usb: Make use of can_change_state() and relocate checking skb for NULL Start a rework initiated by Vincents remarks "You should not report the greatest of txerr and rxerr but the one which actually increased." [1] and "As far as I understand, those flags should be set only when the threshold is reached" [2] . Therefore make use of can_change_state() to (among others) set the flags CAN_ERR_CRTL_[RT]X_WARNING and CAN_ERR_CRTL_[RT]X_PASSIVE, maintain CAN statistic counters for error_warning, error_passive and bus_off. Relocate testing alloc_can_err_skb() for NULL to the end of esd_usb_rx_event(), to have things like can_bus_off(), can_change_state() working even in out of memory conditions. Fixes: 96d8e90382dc ("can: Add driver for esd CAN-USB/2 device") Signed-off-by: Frank Jungclaus Link: [1] https://lore.kernel.org/all/CAMZ6RqKGBWe15aMkf8-QLf-cOQg99GQBebSm+1wEzTqHgvmNuw@mail.gmail.com/ Link: [2] https://lore.kernel.org/all/CAMZ6Rq+QBO1yTX_o6GV0yhdBj-RzZSRGWDZBS0fs7zbSTy4hmA@mail.gmail.com/ Link: https://lore.kernel.org/all/20230216190450.3901254-3-frank.jungclaus@esd.eu Signed-off-by: Marc Kleine-Budde commit 118469f88180438ef43dee93d71f77c00e7b425d Author: Frank Jungclaus Date: Thu Feb 16 20:04:48 2023 +0100 can: esd_usb: Move mislocated storage of SJA1000_ECC_SEG bits in case of a bus error Move the supply for cf->data[3] (bit stream position of CAN error), in case of a bus- or protocol-error, outside of the "switch (ecc & SJA1000_ECC_MASK){}"-statement, because this bit stream position is independent of the error type. Fixes: 96d8e90382dc ("can: Add driver for esd CAN-USB/2 device") Signed-off-by: Frank Jungclaus Link: https://lore.kernel.org/all/20230216190450.3901254-2-frank.jungclaus@esd.eu Signed-off-by: Marc Kleine-Budde commit 470ac62dfa5732c149adce2cbce84ac678de701f Author: Yang Li Date: Thu Feb 16 17:06:10 2023 +0800 can: ctucanfd: ctucan_platform_probe(): 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 Reviewed-by: Alexander Lobakin Acked-by: Pavel Pisa Link: https://lore.kernel.org/all/20230216090610.130860-1-yang.lee@linux.alibaba.com Signed-off-by: Marc Kleine-Budde commit 84cb1b53cdbad52642571e31a8aee301206d2043 Merge: ca0df43d21103 22551e77e5507 Author: Jakub Kicinski Date: Thu Feb 16 11:36:14 2023 -0800 Merge branch 'mlx5-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Leon Romanovsky says: ==================== mlx5-next changes Following previous conversations [1] and our clear commitment to do the TC work [2], please pull mlx5-next shared branch, which includes low-level steering logic to allow RoCEv2 traffic to be encrypted/ decrypted through IPsec. [1] https://lore.kernel.org/all/20230126230815.224239-1-saeed@kernel.org/ [2] https://lore.kernel.org/all/Y+Z7lVVWqnRBiPh2@nvidia.com/ * 'mlx5-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux: net/mlx5: Configure IPsec steering for egress RoCEv2 traffic net/mlx5: Configure IPsec steering for ingress RoCEv2 traffic net/mlx5: Add IPSec priorities in RDMA namespaces net/mlx5: Implement new destination type TABLE_TYPE net/mlx5: Introduce new destination type TABLE_TYPE ==================== Link: https://lore.kernel.org/r/20230215095624.1365200-1-leon@kernel.org Signed-off-by: Jakub Kicinski commit 5720a18baa4686d56d0a235e6ecbcc55f8d716d7 Author: Guenter Roeck Date: Thu Feb 16 11:34:19 2023 -0800 hwmon: Deprecate [devm_]hwmon_device_register_with_groups Even though the hardware monitoring documentation already stated that new drivers should use [devm_]devm_hwmon_device_register_with_info() to register with the hardware monitoring subsystem, we still get submissions for new drivers using the older APIs. There is no benefit to use those APIs. On the contrary, using the older APIs results in substantially larger code size. Explicitly deprecate [devm_]hwmon_device_register_with_groups() to ensure that all new drivers use the latest API. Signed-off-by: Guenter Roeck commit ca0df43d211039dded5a8f8553356414c9a74731 Merge: 40967f77dfa9f 1a30a6b25f263 Author: Jakub Kicinski Date: Thu Feb 16 11:33:10 2023 -0800 Merge tag 'wireless-next-2023-03-16' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Johannes Berg says: ==================== Major stack changes: * EHT channel puncturing support (client & AP) * some support for AP MLD without mac80211 * fixes for A-MSDU on mesh connections Major driver changes: iwlwifi * EHT rate reporting * Bump FW API to 74 for AX devices * STEP equalizer support: transfer some STEP (connection to radio on platforms with integrated wifi) related parameters from the BIOS to the firmware mt76 * switch to using page pool allocator * mt7996 EHT (Wi-Fi 7) support * Wireless Ethernet Dispatch (WED) reset support libertas * WPS enrollee support brcmfmac * Rename Cypress 89459 to BCM4355 * BCM4355 and BCM4377 support mwifiex * SD8978 chipset support rtl8xxxu * LED support ath12k * new driver for Qualcomm Wi-Fi 7 devices ath11k * IPQ5018 support * Fine Timing Measurement (FTM) responder role support * channel 177 support ath10k * store WLAN firmware version in SMEM image table * tag 'wireless-next-2023-03-16' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (207 commits) wifi: brcmfmac: p2p: Introduce generic flexible array frame member wifi: mac80211: add documentation for amsdu_mesh_control wifi: cfg80211: remove gfp parameter from cfg80211_obss_color_collision_notify description wifi: mac80211: always initialize link_sta with sta wifi: mac80211: pass 'sta' to ieee80211_rx_data_set_sta() wifi: cfg80211: Set SSID if it is not already set wifi: rtw89: move H2C of del_pkt_offload before polling FW status ready wifi: rtw89: use readable return 0 in rtw89_mac_cfg_ppdu_status() wifi: rtw88: usb: drop now unnecessary URB size check wifi: rtw88: usb: send Zero length packets if necessary wifi: rtw88: usb: Set qsel correctly wifi: mac80211: fix off-by-one link setting wifi: mac80211: Fix for Rx fragmented action frames wifi: mac80211: avoid u32_encode_bits() warning wifi: mac80211: Don't translate MLD addresses for multicast wifi: cfg80211: call reg_notifier for self managed wiphy from driver hint wifi: cfg80211: get rid of gfp in cfg80211_bss_color_notify wifi: nl80211: Allow authentication frames and set keys on NAN interface wifi: mac80211: fix non-MLO station association wifi: mac80211: Allow NSS change only up to capability ... ==================== Link: https://lore.kernel.org/r/20230216105406.208416-1-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit d8f0ae3ebed416728077fe94698983c30d409241 Author: Tom Zanussi Date: Fri Feb 10 15:33:06 2023 -0600 tracing/histogram: Fix stacktrace histogram Documententation Fix a small problem with the histogram specification in the Documentation, and change the example to show output using a stacktrace field rather than the global stacktrace. Link: https://lkml.kernel.org/r/f75f807dd4998249e513515f703a2ff7407605f4.1676063532.git.zanussi@kernel.org Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (Google) commit f5914b301a17575a4cbcb85a0169a3148b958064 Author: Tom Zanussi Date: Fri Feb 10 15:33:05 2023 -0600 tracing/histogram: Fix stacktrace key The current code will always use the current stacktrace as a key even if a stacktrace contained in a specific event field was specified. For example, we expect to use the 'unsigned long[] stack' field in the below event in the histogram: # echo 's:block_lat pid_t pid; u64 delta; unsigned long[] stack;' > /sys/kernel/debug/tracing/dynamic_events # echo 'hist:keys=delta.buckets=100,stack.stacktrace:sort=delta' > /sys/kernel/debug/tracing/events/synthetic/block_lat/trigger But in fact, when we type out the trigger, we see that it's using the plain old global 'stacktrace' as the key, which is just the stacktrace when the event was hit and not the stacktrace contained in the event, which is what we want: # cat /sys/kernel/debug/tracing/events/synthetic/block_lat/trigger hist:keys=delta.buckets=100,stacktrace:vals=hitcount:sort=delta.buckets=100:size=2048 [active] And in fact, there's no code to actually retrieve it from the event, so we need to add HIST_FIELD_FN_STACK and hist_field_stack() to get it and hook it into the trigger code. For now, since the stack is just using dynamic strings, this could just use the dynamic string function, but it seems cleaner to have a dedicated function an be able to tweak independently as necessary. Link: https://lkml.kernel.org/r/11aa614c82976adbfa4ea763dbe885b5fb01d59c.1676063532.git.zanussi@kernel.org Signed-off-by: Tom Zanussi [ Fixed 32bit build warning reported by kernel test robot ] Signed-off-by: Steven Rostedt (Google) commit b6a4bdcda430e3ca43bbb9cb1d4d4d34ebe15c40 Author: Martin K. Petersen Date: Wed Feb 15 12:18:01 2023 -0500 block: bio-integrity: Copy flags when bio_integrity_payload is cloned Make sure to copy the flags when a bio_integrity_payload is cloned. Otherwise per-I/O properties such as IP checksum flag will not be passed down to the HBA driver. Since the integrity buffer is owned by the original bio, the BIP_BLOCK_INTEGRITY flag needs to be masked off to avoid a double free in the completion path. Fixes: aae7df50190a ("block: Integrity checksum flag") Fixes: b1f01388574c ("block: Relocate bio integrity flags") Reported-by: Saurav Kashyap Tested-by: Saurav Kashyap Signed-off-by: Martin K. Petersen Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20230215171801.21062-1-martin.petersen@oracle.com Signed-off-by: Jens Axboe commit 0f7c8f0f7934c389b0f9fa1f151e753d8de6348f Author: Jinke Han Date: Thu Feb 16 11:22:50 2023 +0800 block: Fix io statistics for cgroup in throttle path In the current code, io statistics are missing for cgroup when bio was throttled by blk-throttle. Fix it by moving the unreaching code to submit_bio_noacct_nocheck. Fixes: 3f98c753717c ("block: don't check bio in blk_throtl_dispatch_work_fn") Signed-off-by: Jinke Han Reviewed-by: Ming Lei Acked-by: Muchun Song Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230216032250.74230-1-hanjinke.666@bytedance.com Signed-off-by: Jens Axboe commit 1047377754c33bf860d80714f66fa4a8e56cbbec Author: Thomas Weißschuh Date: Thu Feb 16 01:12:25 2023 +0000 PCI/sysfs: Constify struct kobj_type pci_slot_ktype 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://lore.kernel.org/r/20230216-kobj_type-pci-v1-1-46a63c8612b5@weissschuh.net Signed-off-by: Thomas Weißschuh Signed-off-by: Bjorn Helgaas commit 2bacfd9f7e5ac18ae40ecd7b29c63580d0e5b329 Author: Tom Zanussi Date: Fri Feb 10 15:33:04 2023 -0600 tracing/histogram: Fix a few problems with stacktrace variable printing Currently, there are a few problems when printing hist triggers and trace output when using stacktrace variables. This fixes the problems seen below: # echo 'hist:keys=delta.buckets=100,stack.stacktrace:sort=delta' > /sys/kernel/debug/tracing/events/synthetic/block_lat/trigger # cat /sys/kernel/debug/tracing/events/synthetic/block_lat/trigger hist:keys=delta.buckets=100,stacktrace:vals=hitcount:sort=delta.buckets=100:size=2048 [active] # echo 'hist:keys=next_pid:ts=common_timestamp.usecs,st=stacktrace if prev_state == 2' >> /sys/kernel/debug/tracing/events/sched/sched_switch/trigger # cat /sys/kernel/debug/tracing/events/sched/sched_switch/trigger hist:keys=next_pid:vals=hitcount:ts=common_timestamp.usecs,st=stacktrace.stacktrace:sort=hitcount:size=2048:clock=global if prev_state == 2 [active] and also in the trace output (should be stack.stacktrace): { delta: ~ 100-199, stacktrace __schedule+0xa19/0x1520 Link: https://lkml.kernel.org/r/60bebd4e546728e012a7a2bcbf58716d48ba6edb.1676063532.git.zanussi@kernel.org Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (Google) commit 7f604e92fb805d2569aa5fb177a1c7231ea2f0cc Author: David Matlack Date: Mon Feb 13 13:28:44 2023 -0800 KVM: x86/mmu: Make tdp_mmu_allowed static Make tdp_mmu_allowed static since it is only ever used within arch/x86/kvm/mmu/mmu.c. Link: https://lore.kernel.org/kvm/202302072055.odjDVd5V-lkp@intel.com/ Reported-by: kernel test robot Signed-off-by: David Matlack Message-Id: <20230213212844.3062733-1-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit 5e7b9a6ae8c352819a2d998a065910b536de0e8c Author: Christoph Hellwig Date: Thu Feb 16 07:24:19 2023 +0100 swiotlb: remove swiotlb_max_segment swiotlb_max_segment has always been a bogus API, so remove it now that the remaining callers are gone. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit f77692d65d54665d81815349cc727baa85e8b71d Author: Mike Snitzer Date: Thu Feb 16 12:10:05 2023 -0500 dm: add cond_resched() to dm_wq_requeue_work() Otherwise the while() loop in dm_wq_requeue_work() can result in a "dead loop" on systems that have preemption disabled. This is particularly problematic on single cpu systems. Fixes: 8b211aaccb915 ("dm: add two stage requeue mechanism") Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer commit 0ca44fcef241768fd25ee763b3d203b9852f269b Author: Pingfan Liu Date: Wed Feb 15 19:23:40 2023 +0800 dm: add cond_resched() to dm_wq_work() Otherwise the while() loop in dm_wq_work() can result in a "dead loop" on systems that have preemption disabled. This is particularly problematic on single cpu systems. Cc: stable@vger.kernel.org Signed-off-by: Pingfan Liu Acked-by: Ming Lei Signed-off-by: Mike Snitzer commit 67205f80be9910207481406c47f7d85e703fb2e9 Author: Jens Axboe Date: Wed Feb 15 16:43:47 2023 -0700 brd: mark as nowait compatible By default, non-mq drivers do not support nowait. This causes io_uring to use a slower path as the driver cannot be trust not to block. brd can safely set the nowait flag, as worst case all it does is a NOIO allocation. For io_uring, this makes a substantial difference. Before: submitter=0, tid=453, file=/dev/ram0, node=-1 polled=0, fixedbufs=1/0, register_files=1, buffered=0, QD=128 Engine=io_uring, sq_ring=128, cq_ring=128 IOPS=440.03K, BW=1718MiB/s, IOS/call=32/31 IOPS=428.96K, BW=1675MiB/s, IOS/call=32/32 IOPS=442.59K, BW=1728MiB/s, IOS/call=32/31 IOPS=419.65K, BW=1639MiB/s, IOS/call=32/32 IOPS=426.82K, BW=1667MiB/s, IOS/call=32/31 and after: submitter=0, tid=354, file=/dev/ram0, node=-1 polled=0, fixedbufs=1/0, register_files=1, buffered=0, QD=128 Engine=io_uring, sq_ring=128, cq_ring=128 IOPS=3.37M, BW=13.15GiB/s, IOS/call=32/31 IOPS=3.45M, BW=13.46GiB/s, IOS/call=32/31 IOPS=3.43M, BW=13.42GiB/s, IOS/call=32/32 IOPS=3.43M, BW=13.39GiB/s, IOS/call=32/31 IOPS=3.43M, BW=13.38GiB/s, IOS/call=32/31 or about an 8x in difference. Now that brd is prepared to deal with REQ_NOWAIT reads/writes, mark it as supporting that. Cc: stable@vger.kernel.org # 5.10+ Link: https://lore.kernel.org/linux-block/20230203103005.31290-1-p.raghav@samsung.com/ Signed-off-by: Jens Axboe commit 6ded703c56c21bfb259725d4f1831a5feb563e9b Author: Jens Axboe Date: Thu Feb 16 08:01:08 2023 -0700 brd: check for REQ_NOWAIT and set correct page allocation mask If REQ_NOWAIT is set, then do a non-blocking allocation if the operation is a write and we need to insert a new page. Currently REQ_NOWAIT cannot be set as the queue isn't marked as supporting nowait, this change is in preparation for allowing that. radix_tree_preload() warns on attempting to call it with an allocation mask that doesn't allow blocking. While that warning could arguably be removed, we need to handle radix insertion failures anyway as they are more likely if we cannot block to get memory. Remove legacy BUG_ON()'s and turn them into proper errors instead, one for the allocation failure and one for finding a page that doesn't match the correct index. Cc: stable@vger.kernel.org # 5.10+ Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit db0ccc44a20b4bb3039c0f6885a1f9c3323c7673 Author: Jens Axboe Date: Thu Feb 16 07:57:32 2023 -0700 brd: return 0/-error from brd_insert_page() It currently returns a page, but callers just check for NULL/page to gauge success. Clean this up and return the appropriate error directly instead. Cc: stable@vger.kernel.org # 5.10+ Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 22ce6843abec19270bf69b176d7ee0a4ef781da5 Author: Joseph Hunkeler Date: Thu Feb 16 10:50:07 2023 -0500 ASoC: amd: yp: Add OMEN by HP Gaming Laptop 16z-n000 to quirks Enables display microphone on the HP OMEN 16z-n000 (8A42) laptop Signed-off-by: Joseph Hunkeler Link: https://lore.kernel.org/r/20230216155007.26143-1-jhunkeler@gmail.com Signed-off-by: Mark Brown commit a77a52385e9a761f896a88a4162e69fb7ccafe3f Author: Bob Pearson Date: Tue Feb 14 01:10:54 2023 -0600 RDMA/rxe: Fix missing memory barriers in rxe_queue.h An earlier patch which introduced smp_load_acquire/smp_store_release into rxe_queue.h incorrectly assumed that surrounding spin-locks in rxe_verbs.c around queue updates for kernel ulps was sufficient to protect the passing of data through the queues between the ulp and the rxe tasklets. But this was incorrect. The typical sequence was ulp rxe requester tasklet ------------------------ --------------------- spin_lock_irqsave() wqe = queue_head(queue) if (!queue_full(q)) { if (!wqe) spin_unlock_irqrestore return; return -ENOMEM } wqe = queue_producer_addr(q) queue_advance_consumer(queue) queue_advance_producer(q) spin_unlock_irqrestore() queue_head() calls queue_empty() which calls smp_load_acquire() For user space apps queue_advance_producer() calls smp_store_release() so that there is a memory barrier between the producer and the consumer but for kernel ulps queue_advance_produce() just incremented the producer index because the lock function is a release function. But to work the barrier has to come between filling in the wqe and updating the producer index. This patch adds the missing barriers. It also changes the enum names for the ulp queue types to QUEUE_TYPE_FROM/TO_ULP instead of QUEUE_TYPE_TO/FROM_DRIVER which is very ambiguous. This bug is suspected as the cause of very rare lockups in a very high scale storage application. It is a bug in any case and should be corrected. Fixes: 0a67c46d2e99 ("RDMA/rxe: Protect user space index loads/stores") Link: https://lore.kernel.org/r/20230214071053.5395-1-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 89d42b8c85b4c67d310c5ccaf491acbf71a260c3 Author: Long Li Date: Wed Feb 15 16:32:02 2023 -0800 RDMA/mana_ib: Fix a bug when the PF indicates more entries for registering memory on first packet When registering memory in a large chunk that doesn't fit into a single PF message, the PF may return GDMA_STATUS_MORE_ENTRIES on the first message if there are more messages needed for registering more chunks. Fix the VF to make it process the correct return code. Fixes: 0266a177631d ("RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter") Link: https://lore.kernel.org/r/1676507522-21018-1-git-send-email-longli@linuxonhyperv.com Signed-off-by: Long Li Signed-off-by: Jason Gunthorpe commit a46ce4f884817c66d0dc303b663b53b37d2baa24 Author: Bartosz Golaszewski Date: Thu Feb 16 13:30:14 2023 +0100 spi: spidev: drop the incorrect notice from Kconfig The spidev interface has been de-facto stable for many years. This notice has been unchanged since 2007 and is incorrect so remove it. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20230216123014.110541-1-brgl@bgdev.pl Signed-off-by: Mark Brown commit 7f62cb8861190e7cc1018ff37597fc49b2eaafa8 Author: Naresh Solanki Date: Thu Feb 16 08:53:01 2023 +0100 regulator: max597x: Align for simple_mfd_i2c driver Use regmap provided by simple_mfd_i2c driver and remove unused variable. Identify device variant by checking compatible property in DT. Signed-off-by: Naresh Solanki Link: https://lore.kernel.org/r/20230216075302.68935-1-Naresh.Solanki@9elements.com Signed-off-by: Mark Brown commit 72a03627443d5bc7032ab98bd784740cd8a76f8a Author: Bob Pearson Date: Mon Feb 13 16:55:52 2023 -0600 RDMA/rxe: Remove rxe_alloc() Currently all the object types in the rxe driver are allocated in rdma-core except for MRs. By moving tha kzalloc() call outside of the pool code the rxe_alloc() subroutine can be eliminated and code checking for MR as a special case can be removed. This patch moves the kzalloc() and kfree_rcu() calls into the mr registration and destruction verbs. It removes that code from rxe_pool.c including the rxe_alloc() subroutine which is no longer used. Link: https://lore.kernel.org/r/20230213225551.12437-1-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Reviewed-by: Devesh Sharma Reviewed-by: Devesh Sharma Reviewed-by: Zhu Yanjun Signed-off-by: Jason Gunthorpe commit 876e480da2f74715fc70e37723e77ca16a631e35 Author: Kees Cook Date: Wed Feb 8 15:25:53 2023 -0800 RDMA/cma: Distinguish between sockaddr_in and sockaddr_in6 by size Clang can do some aggressive inlining, which provides it with greater visibility into the sizes of various objects that are passed into helpers. Specifically, compare_netdev_and_ip() can see through the type given to the "sa" argument, which means it can generate code for "struct sockaddr_in" that would have been passed to ipv6_addr_cmp() (that expects to operate on the larger "struct sockaddr_in6"), which would result in a compile-time buffer overflow condition detected by memcmp(). Logically, this state isn't reachable due to the sa_family assignment two callers above and the check in compare_netdev_and_ip(). Instead, provide a compile-time check on sizes so the size-mismatched code will be elided when inlining. Avoids the following warning from Clang: ../include/linux/fortify-string.h:652:4: error: call to '__read_overflow' declared with 'error' attribute: detected read beyond size of object (1st parameter) __read_overflow(); ^ note: In function 'cma_netevent_callback' note: which inlined function 'node_from_ndev_ip' 1 error generated. When the underlying object size is not known (e.g. with GCC and older Clang), the result of __builtin_object_size() is SIZE_MAX, which will also compile away, leaving the code as it was originally. Link: https://lore.kernel.org/r/20230208232549.never.139-kees@kernel.org Link: https://github.com/ClangBuiltLinux/linux/issues/1687 Signed-off-by: Kees Cook Tested-by: Nathan Chancellor # build Signed-off-by: Jason Gunthorpe commit 2d050f06485ae987ba57da33bc4f7dccd4fd7485 Author: Steffen Trumtrar Date: Tue Feb 7 14:08:12 2023 +0100 ARM: dts: socfpga: Add enclustra PE1 devicetree The enclustra PE1 is a baseboard from enclustra GmbH for the enclustra Mercury AA1+ SOM. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Steffen Trumtrar Signed-off-by: Dinh Nguyen commit fc8070ec9c50008373b84a447fdfad2bea3d4cc7 Author: Steffen Trumtrar Date: Tue Feb 7 14:08:11 2023 +0100 dt-bindings: altera: Add enclustra mercury PE1 Add binding for the enclustra PE1 baseboard from enclustra GmbH. Acked-by: Krzysztof Kozlowski Signed-off-by: Steffen Trumtrar Signed-off-by: Dinh Nguyen commit 5ff31dfcd6d23f9c1bd5dd1a2c648ba499659357 Author: Bob Pearson Date: Wed Feb 1 22:42:41 2023 -0600 Subject: RDMA/rxe: Handle zero length rdma Currently the rxe driver does not handle all cases of zero length rdma operations correctly. The client does not have to provide an rkey for zero length RDMA read or write operations so the rkey provided may be invalid and should not be used to lookup an mr. This patch corrects the driver to ignore the provided rkey if the reth length is zero for read or write operations and make sure to set the mr to NULL. In read_reply() if length is zero rxe_recheck_mr() is not called. Warnings are added in the routines in rxe_mr.c to catch NULL MRs when the length is non-zero. Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20230202044240.6304-1-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Reviewed-by: Daisuke Matsuda Signed-off-by: Jason Gunthorpe commit ddddedaa0db99481c5e5abe628ad54f65e8765bc Author: Asahi Lina Date: Sun Feb 5 21:51:24 2023 +0900 drm/shmem-helper: Fix locking for drm_gem_shmem_get_pages_sgt() Other functions touching shmem->sgt take the pages lock, so do that here too. drm_gem_shmem_get_pages() & co take the same lock, so move to the _locked() variants to avoid recursive locking. Discovered while auditing locking to write the Rust abstractions. Fixes: 2194a63a818d ("drm: Add library for shmem backed GEM objects") Fixes: 4fa3d66f132b ("drm/shmem: Do dma_unmap_sg before purging pages") Signed-off-by: Asahi Lina Reviewed-by: Javier Martinez Canillas Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230205125124.2260-1-lina@asahilina.net (cherry picked from commit aa8c85affe3facd3842c8912186623415931cc72) Signed-off-by: Javier Martinez Canillas commit 88941ddefc2a2b676135251682376b3163b4e672 Author: Bartosz Golaszewski Date: Fri Aug 19 09:16:58 2022 +0200 MAINTAINERS: make me the maintainer of DaVinci platforms Sekhar is stepping down from supporting DaVinci. As it's quite low-volume, I will keep maintaining it. Acked-by: Sekhar Nori Acked-by: Kevin Hilman Signed-off-by: Bartosz Golaszewski commit 8d1b80a79452630f157bf634ae9cfcd9f4eed161 Author: Dan Carpenter Date: Thu Feb 16 15:13:04 2023 +0300 erofs: fix an error code in z_erofs_init_zip_subsystem() Return -ENOMEM if alloc_workqueue() fails. Don't return success. Fixes: d8a650adf429 ("erofs: add per-cpu threads for decompression as an option") Signed-off-by: Dan Carpenter Reviewed-by: Gao Xiang Link: https://lore.kernel.org/r/Y+4d0FRsUq8jPoOu@kili Signed-off-by: Gao Xiang commit 3ce6a115980c019928fcd06e01f64003886af79c Author: Ming Lei Date: Thu Feb 9 20:55:27 2023 +0800 block: sync mixed merged request's failfast with 1st bio's We support mixed merge for requests/bios with different fastfail settings. When request fails, each time we only handle the portion with same failfast setting, then bios with failfast can be failed immediately, and bios without failfast can be retried. The idea is pretty good, but the current implementation has several defects: 1) initially RA bio doesn't set failfast, however bio merge code doesn't consider this point, and just check its failfast setting for deciding if mixed merge is required. Fix this issue by adding helper of bio_failfast(). 2) when merging bio to request front, if this request is mixed merged, we have to sync request's faifast setting with 1st bio's failfast. Fix it by calling blk_update_mixed_merge(). 3) when merging bio to request back, if this request is mixed merged, we have to mark the bio as failfast, because blk_update_request simply updates request failfast with 1st bio's failfast. Fix it by calling blk_update_mixed_merge(). Fixes one normal EXT4 READ IO failure issue, because it is observed that the normal READ IO is merged with RA IO, and the mixed merged request has different failfast setting with 1st bio's, so finally the normal READ IO doesn't get retried. Cc: Tejun Heo Fixes: 80a761fd33cf ("block: implement mixed merge of different failfast requests") Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20230209125527.667004-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit b14033a3e6ba73a5c68974a80b05cba55553ed5b Author: Nuno Das Neves Date: Thu Feb 9 14:02:52 2023 -0800 x86/hyperv: Fix hv_get/set_register for nested bringup hv_get_nested_reg only translates SINT0, resulting in the wrong sint being registered by nested vmbus. Fix the issue with new utility function hv_is_sint_reg. While at it, improve clarity of hv_set_non_nested_register and hv_is_synic_reg. Signed-off-by: Nuno Das Neves Reviewed-by: Jinank Jain Link: https://lore.kernel.org/r/1675980172-6851-1-git-send-email-nunodasneves@linux.microsoft.com Signed-off-by: Wei Liu commit 1243741f6b02b5f2c06bca910f894c333838f994 Merge: e3eafcf0fabe6 617c331d91077 Author: Greg Kroah-Hartman Date: Thu Feb 16 15:28:28 2023 +0100 Merge tag 'usb-serial-6.3-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for 6.3-rc1 Here are the USB-serial updates for 6.3-rc1; just a new modem device id this time. All have been in linux-next with no reported issues. * tag 'usb-serial-6.3-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: option: add support for VW/Skoda "Carstick LTE" commit 7933b90b42896f5b6596e6a829bb31c5121fc2a9 Merge: 1bdb78368f944 82f1627cb6339 Author: Takashi Iwai Date: Thu Feb 16 15:06:18 2023 +0100 Merge branch 'for-linus' into for-next Pull the pending fixes for 6.3 Signed-off-by: Takashi Iwai commit 257ec290741924f8df678927d0dfecb1deebb9c5 Author: Tina Zhang Date: Thu Feb 16 21:08:16 2023 +0800 iommu/vt-d: Allow to use flush-queue when first level is default Commit 29b32839725f ("iommu/vt-d: Do not use flush-queue when caching-mode is on") forced default domains to be strict mode as long as IOMMU caching-mode is flagged. The reason for doing this is that when vIOMMU uses VT-d caching mode to synchronize shadowing page tables, the strict mode shows better performance. However, this optimization is orthogonal to the first-level page table because the Intel VT-d architecture does not define the caching mode of the first-level page table. Refer to VT-d spec, section 6.1, "When the CM field is reported as Set, any software updates to remapping structures other than first-stage mapping (including updates to not- present entries or present entries whose programming resulted in translation faults) requires explicit invalidation of the caches." Exclude the first-level page table from this optimization. Generally using first-stage translation in vIOMMU implies nested translation enabled in the physical IOMMU. In this case the first-stage page table is wholly captured by the guest. The vIOMMU only needs to transfer the cache invalidations on vIOMMU to the physical IOMMU. Forcing the default domain to strict mode will cause more frequent cache invalidations, resulting in performance degradation. In a real performance benchmark test measured by iperf receive, the performance result on Sapphire Rapids 100Gb NIC shows: w/ this fix ~51 Gbits/s, w/o this fix ~39.3 Gbits/s. Theoretically a first-stage IOMMU page table can still be shadowed in absence of the caching mode, e.g. with host write-protecting guest IOMMU page table to synchronize changed PTEs with the physical IOMMU page table. In this case the shadowing overhead is decoupled from emulating IOTLB invalidation then the overhead of the latter part is solely decided by the frequency of IOTLB invalidations. Hence allowing guest default dma domain to be lazy can also benefit the overall performance by reducing the total VM-exit numbers. Fixes: 29b32839725f ("iommu/vt-d: Do not use flush-queue when caching-mode is on") Reported-by: Sanjay Kumar Suggested-by: Sanjay Kumar Signed-off-by: Tina Zhang Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20230214025618.2292889-1-tina.zhang@intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 194b3348bdbb7db65375c72f3f774aee4cc6614e Author: Jacob Pan Date: Thu Feb 16 21:08:15 2023 +0800 iommu/vt-d: Fix PASID directory pointer coherency On platforms that do not support IOMMU Extended capability bit 0 Page-walk Coherency, CPU caches are not snooped when IOMMU is accessing any translation structures. IOMMU access goes only directly to memory. Intel IOMMU code was missing a flush for the PASID table directory that resulted in the unrecoverable fault as shown below. This patch adds clflush calls whenever allocating and updating a PASID table directory to ensure cache coherency. On the reverse direction, there's no need to clflush the PASID directory pointer when we deactivate a context entry in that IOMMU hardware will not see the old PASID directory pointer after we clear the context entry. PASID directory entries are also never freed once allocated. DMAR: DRHD: handling fault status reg 3 DMAR: [DMA Read NO_PASID] Request device [00:0d.2] fault addr 0x1026a4000 [fault reason 0x51] SM: Present bit in Directory Entry is clear DMAR: Dump dmar1 table entries for IOVA 0x1026a4000 DMAR: scalable mode root entry: hi 0x0000000102448001, low 0x0000000101b3e001 DMAR: context entry: hi 0x0000000000000000, low 0x0000000101b4d401 DMAR: pasid dir entry: 0x0000000101b4e001 DMAR: pasid table entry[0]: 0x0000000000000109 DMAR: pasid table entry[1]: 0x0000000000000001 DMAR: pasid table entry[2]: 0x0000000000000000 DMAR: pasid table entry[3]: 0x0000000000000000 DMAR: pasid table entry[4]: 0x0000000000000000 DMAR: pasid table entry[5]: 0x0000000000000000 DMAR: pasid table entry[6]: 0x0000000000000000 DMAR: pasid table entry[7]: 0x0000000000000000 DMAR: PTE not present at level 4 Cc: Fixes: 0bbeb01a4faf ("iommu/vt-d: Manage scalalble mode PASID tables") Reviewed-by: Kevin Tian Reported-by: Sukumar Ghorai Signed-off-by: Ashok Raj Signed-off-by: Jacob Pan Link: https://lore.kernel.org/r/20230209212843.1788125-1-jacob.jun.pan@linux.intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 16a75bbe480c3598b3af57a2504ea89b1e32c3ac Author: Jacob Pan Date: Thu Feb 16 21:08:14 2023 +0800 iommu/vt-d: Avoid superfluous IOTLB tracking in lazy mode Intel IOMMU driver implements IOTLB flush queue with domain selective or PASID selective invalidations. In this case there's no need to track IOVA page range and sync IOTLBs, which may cause significant performance hit. This patch adds a check to avoid IOVA gather page and IOTLB sync for the lazy path. The performance difference on Sapphire Rapids 100Gb NIC is improved by the following (as measured by iperf send): w/o this fix~48 Gbits/s. with this fix ~54 Gbits/s Cc: Fixes: 2a2b8eaa5b25 ("iommu: Handle freelists when using deferred flushing in iommu drivers") Reviewed-by: Robin Murphy Reviewed-by: Kevin Tian Tested-by: Sanjay Kumar Signed-off-by: Sanjay Kumar Signed-off-by: Jacob Pan Link: https://lore.kernel.org/r/20230209175330.1783556-1-jacob.jun.pan@linux.intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 60b1daa3b168fbc648ae2ad28a84759223e49e18 Author: Lu Baolu Date: Thu Feb 16 21:08:13 2023 +0800 iommu/vt-d: Fix error handling in sva enable/disable paths Roll back all previous actions in error paths of intel_iommu_enable_sva() and intel_iommu_disable_sva(). Fixes: d5b9e4bfe0d8 ("iommu/vt-d: Report prq to io-pgfault framework") Reviewed-by: Kevin Tian Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20230208051559.700109-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 1bdb78368f9448cf0de9b11eb1388e887d1b4849 Merge: 5661706efa200 76f5aaabce492 Author: Takashi Iwai Date: Thu Feb 16 14:32:04 2023 +0100 Merge tag 'asoc-v6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v6.3 There's been quite a lot of activity this release, but not really one big feature - lots of new devices, plus a lot of cleanup and modernisation work spread throughout the subsystem: - More factoring out of common operations into helper functions by Morimoto-san. - DT schema conversons and stylistic nits. - Continued work on building out the new SOF IPC4 scheme. - Support for Awinc AT88395, Infineon PEB2466, Iron Device SMA1303, Mediatek MT8188, Realtek RT712, Renesas IDT821034, Samsung/Tesla FSD SoC I2S, and TI TAS5720A-Q1. commit 5661706efa200252d0e9fea02421b0a5857808c3 Merge: 5791c7699ff1b 5beb5627a2481 Author: Takashi Iwai Date: Thu Feb 16 14:18:54 2023 +0100 Merge branch 'topic/apple-gmux' into for-next Pull vga_switcheroo fix for Macs Signed-off-by: Takashi Iwai commit 5beb5627a2481aade9aa630b7ebb7f99442321b6 Author: Orlando Chamberlain Date: Thu Feb 16 21:34:51 2023 +1100 ALSA: hda/hdmi: Register with vga_switcheroo on Dual GPU Macbooks Commit 586bc4aab878 ("ALSA: hda/hdmi - fix vgaswitcheroo detection for AMD") caused only AMD gpu's with PX to have their audio component register with vga_switcheroo. This meant that Apple Macbooks with apple-gmux as the gpu switcher no longer had the audio client registering, so when the gpu is powered off by vga_switcheroo snd_hda_intel is unaware that it should have suspended the device: amdgpu: switched off snd_hda_intel 0000:03:00.1: Unable to change power state from D3hot to D0, device inaccessible snd_hda_intel 0000:03:00.1: CORB reset timeout#2, CORBRP = 65535 To resolve this, we use apple_gmux_detect() and register a vga_switcheroo audio client when apple-gmux is detected. Fixes: 586bc4aab878 ("ALSA: hda/hdmi - fix vgaswitcheroo detection for AMD") Link: https://lore.kernel.org/all/20230210044826.9834-9-orlandoch.dev@gmail.com/ Signed-off-by: Orlando Chamberlain Link: https://lore.kernel.org/r/20230216103450.12925-1-orlandoch.dev@gmail.com Signed-off-by: Takashi Iwai commit e922bbf37564a4c67efca9dd6133eaadbffb65f5 Author: Aman Kumar Date: Fri Feb 3 17:47:02 2023 +0530 dmaengine: idma64: Update bytes_transferred field Currently when 8250 data transfer is done, bytes_tranferred always returns 0 at /sys/devices/pci0000\:\:**.*/dma/dma*chan*/bytes_transferred. In many cases it gives false impression that data is not being trasferred via DMA. So, updating the bytes_transferred field to count the bytes whenever there is data transfer using idma64. Co-developed-by: Srikanth Thokala Signed-off-by: Srikanth Thokala Signed-off-by: Aman Kumar Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230203121702.15725-1-aman.kumar@intel.com Signed-off-by: Vinod Koul commit 8d1b7bd543833169a5f5f74c4753509ab406f381 Author: Kai-Heng Feng Date: Tue Feb 7 12:57:45 2023 +0800 dmaengine: imx-sdma: Set DMA channel to be private If async-tx is loaded before device drivers that requires imx-sdma, the dmaengine_get() routine from async-tx grabs all non-private channels, so devices that require DMA fail to work. So mark imx-sdma with DMA_PRIVATE to avoid such situation. Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20230207045745.1029959-1-kai.heng.feng@canonical.com Signed-off-by: Vinod Koul commit 255ccd8b16a516209deb4257aa4e89e42a26413a Author: Andy Shevchenko Date: Mon Jan 30 17:17:47 2023 +0200 dmaengine: dw: Move check for paused channel to dwc_get_residue() Move check for paused channel to dwc_get_residue() and rename the latter to dwc_get_residue_and_status(). This improves data integrity as residue and DMA channel status are set in the same function under the same conditions. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230130151747.20704-1-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul commit 928469986171a6f763b34b039427f5667ba3fd50 Author: Eric Pilmore Date: Thu Feb 9 23:51:43 2023 -0800 dmaengine: ptdma: check for null desc before calling pt_cmd_callback Resolves a panic that can occur on AMD systems, typically during host shutdown, after the PTDMA driver had been exercised. The issue was the pt_issue_pending() function is mistakenly assuming that there will be at least one descriptor in the Submitted queue when the function is called. However, it is possible that both the Submitted and Issued queues could be empty, which could result in pt_cmd_callback() being mistakenly called with a NULL pointer. Ref: Bugzilla Bug 216856. Fixes: 6fa7e0e836e2 ("dmaengine: ptdma: fix concurrency issue with multiple dma transfer") Signed-off-by: Eric Pilmore Link: https://lore.kernel.org/r/20230210075142.58253-1-epilmore@gigaio.com Signed-off-by: Vinod Koul commit be4d46edeee4b2459d2f53f37ada88bbfb634b6c Author: Kees Cook Date: Fri Jan 27 14:36:27 2023 -0800 dmaengine: dw-axi-dmac: Do not dereference NULL structure If "vdesc" is NULL, it cannot be used with vd_to_axi_desc(). Leave "bytes" unchanged at 0. Seen under GCC 13 with -Warray-bounds: ../drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c: In function 'dma_chan_tx_status': ../drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:329:46: warning: array subscript 0 is outside array bounds of 'struct virt_dma_desc[46116860184273879]' [-Warray-bounds=] 329 | bytes = vd_to_axi_desc(vdesc)->length; | ^~ Fixes: 8e55444da65c ("dmaengine: dw-axi-dmac: Support burst residue granularity") Cc: Eugeniy Paltsev Cc: Vinod Koul Cc: dmaengine@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230127223623.never.507-kees@kernel.org Signed-off-by: Vinod Koul commit 601bdadadb505a72d9a76cc20cdfa252cba7ddc0 Author: Fenghua Yu Date: Fri Jan 27 11:28:55 2023 -0800 dmaengine: idxd: Fix default allowed read buffers value in group Currently default read buffers that is allowed in a group is 0. grpcfg will be configured to max read buffers that IDXD can support if the group's allowed read buffers value is 0. But 0 is an invalid read buffers value and user may get confused when seeing the invalid initial value 0 through sysfs interface. To show only valid allowed read buffers value and eliminate confusion, directly initialize the allowed read buffers to IDXD's max read buffers. User still can change the value through sysfs interface. Suggested-by: Ramesh Thomas Signed-off-by: Fenghua Yu Reviewed-by: Nikhil Rao Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/20230127192855.966929-1-fenghua.yu@intel.com Signed-off-by: Vinod Koul commit b02e07015a5ac7bbc029da931ae17914b8ae0339 Author: Shravan Chippa Date: Fri Jan 20 15:36:23 2023 +0530 dmaengine: sf-pdma: pdma_desc memory leak fix Commit b2cc5c465c2c ("dmaengine: sf-pdma: Add multithread support for a DMA channel") changed sf_pdma_prep_dma_memcpy() to unconditionally allocate a new sf_pdma_desc each time it is called. The driver previously recycled descs, by checking the in_use flag, only allocating additional descs if the existing one was in use. This logic was removed in commit b2cc5c465c2c ("dmaengine: sf-pdma: Add multithread support for a DMA channel"), but sf_pdma_free_desc() was not changed to handle the new behaviour. As a result, each time sf_pdma_prep_dma_memcpy() is called, the previous descriptor is leaked, over time leading to memory starvation: unreferenced object 0xffffffe008447300 (size 192): comm "irq/39-mchp_dsc", pid 343, jiffies 4294906910 (age 981.200s) hex dump (first 32 bytes): 00 00 00 ff 00 00 00 00 b8 c1 00 00 00 00 00 00 ................ 00 00 70 08 10 00 00 00 00 00 00 c0 00 00 00 00 ..p............. backtrace: [<00000000064a04f4>] kmemleak_alloc+0x1e/0x28 [<00000000018927a7>] kmem_cache_alloc+0x11e/0x178 [<000000002aea8d16>] sf_pdma_prep_dma_memcpy+0x40/0x112 Add the missing kfree() to sf_pdma_free_desc(), and remove the redundant in_use flag. Fixes: b2cc5c465c2c ("dmaengine: sf-pdma: Add multithread support for a DMA channel") Signed-off-by: Shravan Chippa Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230120100623.3530634-1-shravan.chippa@microchip.com Signed-off-by: Vinod Koul commit 4932b1fa61322b737dc3615a298aafdc42f97f79 Author: Geert Uytterhoeven Date: Wed Feb 15 15:17:41 2023 +0100 ASoC: rsnd: adg: Fix BRG typos "BRG" stands for "Baud Rate Generator", but is frequently misspelled as "RBG". Signed-off-by: Geert Uytterhoeven Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/ac6365c17861d71fbc89d823089db4aafdb763ed.1676470202.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit 3584f6392f09440769246d4936e1fcbff76ac3bc Author: Neil Armstrong Date: Wed Feb 8 21:01:58 2023 +0200 phy: qcom: phy-qcom-snps-eusb2: Add support for eUSB2 repeater For USB 2.0 compliance, eUSB2 needs a repeater. The PHY needs to initialize and reset it. So add repeater support Co-developed-by: Abel Vesa Signed-off-by: Abel Vesa Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20230208190200.2966723-6-abel.vesa@linaro.org Signed-off-by: Vinod Koul commit 56d77c9a10d97d15b8da900f861bc28b06b84b1c Author: Abel Vesa Date: Wed Feb 8 21:01:57 2023 +0200 phy: qcom: Add QCOM SNPS eUSB2 repeater driver PM8550B contains a eUSB2 repeater used for making the eUSB2 from SM8550 USB 2.0 compliant. This can be modelled SW-wise as a Phy. So add a new phy driver for it. Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230208190200.2966723-5-abel.vesa@linaro.org Signed-off-by: Vinod Koul commit 1288b5fef159e7ac57fcc0d82d69a107d3f722f7 Author: Abel Vesa Date: Wed Feb 8 21:01:56 2023 +0200 dt-bindings: phy: qcom,snps-eusb2-phy: Add phys property for the repeater The phys property is used for allowing the eusb2 to interface with the repeater, which is modelled as a phy driver. Signed-off-by: Abel Vesa Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230208190200.2966723-4-abel.vesa@linaro.org Signed-off-by: Vinod Koul commit f990aae9d6e4388b9b12b447bf7bad0cdf36c853 Author: Abel Vesa Date: Wed Feb 8 21:01:54 2023 +0200 dt-bindings: phy: Add qcom,snps-eusb2-repeater schema file The SM8550 SoC uses Synopsis eUSB2 repeater found in PM8550b. Add a dt-binding schema for the new driver. Signed-off-by: Abel Vesa Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230208190200.2966723-2-abel.vesa@linaro.org Signed-off-by: Vinod Koul commit 7d3fd88d61a41016da01889f076fd1c60c7298fc Author: Josh Triplett Date: Tue Feb 14 16:42:22 2023 -0800 io_uring: Support calling io_uring_register with a registered ring fd Add a new flag IORING_REGISTER_USE_REGISTERED_RING (set via the high bit of the opcode) to treat the fd as a registered index rather than a file descriptor. This makes it possible for a library to open an io_uring, register the ring fd, close the ring fd, and subsequently use the ring entirely via registered index. Signed-off-by: Josh Triplett Link: https://lore.kernel.org/r/f2396369e638284586b069dbddffb8c992afba95.1676419314.git.josh@joshtriplett.org [axboe: remove extra high bit clear] Signed-off-by: Jens Axboe commit a9b444988026528788c83c995ebb44eda5a54d8c Author: Neil Armstrong Date: Tue Feb 7 16:03:53 2023 +0100 dt-bindings: phy: amlogic,g12a-usb3-pcie-phy: add missing optional phy-supply property Add missing optional phy-supply property used to power up PHY regulators. Fixes: 87a55485f2fc ("dt-bindings: phy: meson-g12a-usb3-pcie-phy: convert to yaml") Signed-off-by: Neil Armstrong Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230207-b4-amlogic-amlogic-g12a-usb3-pcie-phy-fix-v1-1-3e437b759549@linaro.org Signed-off-by: Vinod Koul commit f765c59c5a72546a2d74a92ae5d0eb0329d8e247 Author: Jiapeng Chong Date: Mon Feb 13 11:57:09 2023 +0800 phy: rockchip-typec: Fix unsigned comparison with less than zero The dp and ufp are defined as bool type, the return value type of function extcon_get_state should be int, so the type of dp and ufp are modified to int. ./drivers/phy/rockchip/phy-rockchip-typec.c:827:12-14: WARNING: Unsigned expression compared with zero: dp > 0. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3962 Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20230213035709.99027-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Vinod Koul commit b5929325f06300d28696b9a030539a4009154788 Author: Martin Kaiser Date: Mon Feb 13 20:54:08 2023 +0100 staging: r8188eu: Revert "staging: r8188eu: simplify rtw_get_ff_hwaddr" This reverts commit fd48124e0982 ("staging: r8188eu: simplify rtw_get_ff_hwaddr"). The cleanup in this commit removes the qsel to addr mappings in rtw_get_ff_hwaddr. The underlying assumption is that rtw_write_port uses its addr parameter only for the high_queue check. This is obviously incorrect as rtw_write_port calls ffaddr2pipehdl(pdvobj, addr); where addr is mapped to a usb bulk endpoint. Unfortunately, testing did not show any problems. The Edimax V2 on which I tested has two bulk out endpoints. I guess that with the incorrect patch, addr could only be 0 (no high queue) or 6 (high queue), both of which were mapped to the first bulk out endpoint. Data transfers did still work... Fixes: fd48124e0982 ("staging: r8188eu: simplify rtw_get_ff_hwaddr") Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20230213195407.15085-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit c17ffe008463d3a07b633dd0e956f7c1a3a7c347 Author: Martin Kaiser Date: Sat Feb 11 18:02:23 2023 +0100 staging: r8188eu: replace hand coded loop with list_for_each_entry In function rtw_get_stainfo, we can use list_for_each_entry to iterate over the list of stations and make the code a bit simpler. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230211170223.419205-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit da8b09464c59c7c09f7ca880b607b5d8d0cc90fe Author: Martin Kaiser Date: Sat Feb 11 17:50:45 2023 +0100 staging: r8188eu: merge _rtw_enqueue_cmd into its caller The _rtw_enqueue_cmd function is called only by rtw_enqueue_cmd. When _rtw_enqueue_cmd is called, the caller has already checked that the obj parameter is not NULL. _rtw_enqueue_cmd returns _SUCCESS in any case. We can merge the two functions and simplify the error handling. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230211165045.414424-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit d78c8e32890ef7eca79ffd67c96022c7f9d8cce4 Author: Anders Roxell Date: Wed Aug 10 13:43:18 2022 +0200 powerpc/mm: Rearrange if-else block to avoid clang warning Clang warns: arch/powerpc/mm/book3s64/radix_tlb.c:1191:23: error: variable 'hstart' is uninitialized when used here __tlbiel_va_range(hstart, hend, pid, ^~~~~~ arch/powerpc/mm/book3s64/radix_tlb.c:1191:31: error: variable 'hend' is uninitialized when used here __tlbiel_va_range(hstart, hend, pid, ^~~~ Rework the 'if (IS_ENABLE(CONFIG_TRANSPARENT_HUGEPAGE))' so hstart/hend is always initialized to silence the warnings. That will also simplify the 'else' path. Clang is getting confused with these warnings, but the warnings is a false-positive. Suggested-by: Arnd Bergmann Suggested-by: Nathan Chancellor Reviewed-by: Christophe Leroy Reviewed-by: Nathan Chancellor Signed-off-by: Anders Roxell Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220810114318.3220630-1-anders.roxell@linaro.org commit a7caf3f181f160ae13ece0124e1c268d22263708 Author: Michael Ellerman Date: Thu Feb 16 22:29:15 2023 +1100 powerpc/nohash: Fix build with llvm-as When using the LLVM integrated assembler (llvm-as), the book3e build fails with: arch/powerpc/mm/nohash/tlb_low_64e.S:354:2: error: invalid instruction tlbilxva 0,%r15 ^ tlbilxva is an extended mnemonic for tlbilx, but llvm-as also doesn't support tlbilx, despite it being an e500mc instruction. Fix it by using the existing PPC_TLBILX_VA macro. The resulting binary is identical when building with binutils. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230216112915.1681631-1-mpe@ellerman.id.au commit 91360b446a5cced537d61fc2394253e8c6b9ae7b Author: Michael Ellerman Date: Mon Feb 13 22:23:22 2023 +1100 powerpc/nohash: Fix build error with binutils >= 2.38 With bintils >= 2.38 the ppc64_book3e_allmodconfig build fails: {standard input}: Assembler messages: {standard input}:196: Error: unrecognized opcode: `lbarx' {standard input}:196: Error: unrecognized opcode: `stbcx.' make[5]: *** [scripts/Makefile.build:252: arch/powerpc/mm/nohash/e500_hugetlbpage.o] Error 1 That happens because the default CPU for that config is e5500, set via CONFIG_TARGET_CPU, and so the assembler is building for e5500, which doesn't support those instructions. Fix it by using machine directives to tell the assembler to assemble the relevant code for e6500, which does support lbarx/stbcx. That is safe because the code already has the CPU_FTR_SMT check, which ensures the lbarx sequence doesn't run on e5500, which doesn't support SMT. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230213112322.998003-1-mpe@ellerman.id.au commit 6ec363fc6142226b9ab5a6528f65333d729d2b6b Author: Carlos Llamas Date: Wed Feb 15 18:38:50 2023 +0000 scripts/tags.sh: fix incompatibility with PCRE2 Starting with release 10.38 PCRE2 drops default support for using \K in lookaround patterns as described in [1]. Unfortunately, scripts/tags.sh relies on such functionality to collect all_compiled_soures() leading to the following error: $ make COMPILED_SOURCE=1 tags GEN tags grep: \K is not allowed in lookarounds (but see PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK) The usage of \K for this pattern was introduced in commit 4f491bb6ea2a ("scripts/tags.sh: collect compiled source precisely") which speeds up the generation of tags significantly. In order to fix this issue without compromising the performance we can switch over to an equivalent sed expression. The same matching pattern is preserved here except \K is replaced with a backreference \1. [1] https://www.pcre.org/current/doc/html/pcre2syntax.html#SEC11 Cc: Greg Kroah-Hartman Cc: Cristian Ciocaltea Cc: Masahiro Yamada Cc: Jialu Xu Cc: Vipin Sharma Cc: stable@vger.kernel.org Fixes: 4f491bb6ea2a ("scripts/tags.sh: collect compiled source precisely") Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20230215183850.3353198-1-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit 72206cc730b5c9208e9a99ace1c619f542035312 Author: Daniel Starke Date: Tue Feb 14 13:27:37 2023 +0100 tty: n_gsm: add keep alive support 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. Chapters 5.4.6.3.4 and 5.1.8.1.3 describe the test command which can be used to test the mux connection between both sides. Currently, no algorithm is implemented to make use of this command. This requires that each multiplexed upper layer protocol supervises the underlying muxer connection to handle possible connection losses. Introduce ioctl commands and functions to optionally enable keep alive handling via the test command as described in chapter 5.4.6.3.4. A single incrementing octet "ka_num" is being used for unique identification of each single keep alive packet. Retries will use the same "ka_num" value as the original packet. Retry count and interval are taken from the general parameters N2 and T2. Add usage description and basic example for the new ioctl to the n_gsm documentation. Note that support for the test command is mandatory and already present in the muxer implementation since the very first version. Also note that the previous ioctl structure gsm_config cannot be extended due to missing checks against zero of the field "unused". Signed-off-by: Daniel Starke Link: https://lore.kernel.org/r/20230214122737.1976-1-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman commit 3f92730eed57f8057e1e120a0a2e8ad04ba155d4 Author: Tom Rix Date: Sat Feb 11 07:45:50 2023 -0800 serial: imx: remove a redundant check cpp_check reports drivers/tty/serial/imx.c:1207:15: style: Condition 'r_bytes>0' is always true [knownConditionTrueFalse] if (r_bytes > 0) { r_byte is set to r_bytes = rx_ring->head - rx_ring->tail; The head - tail calculation is also done by the earlier check if (rx_ring->head <= sg_dma_len(sgl) && rx_ring->head > rx_ring->tail) { so r_bytes will always be > 0, so the second check is not needed. Signed-off-by: Tom Rix Reviewed-by: Iuliana Prodan Link: https://lore.kernel.org/r/20230211154550.2130670-1-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit 9f467f6375afd3c7667dbabcfff35c22961e1c0b Author: Qi Zheng Date: Wed Feb 8 12:00:37 2023 +0800 OPP: fix error checking in opp_migrate_dentry() Since commit ff9fb72bc077 ("debugfs: return error values, not NULL") changed return value of debugfs_rename() in error cases from %NULL to %ERR_PTR(-ERROR), we should also check error values instead of NULL. Fixes: ff9fb72bc077 ("debugfs: return error values, not NULL") Signed-off-by: Qi Zheng Link: https://lore.kernel.org/r/20230208040037.60305-1-zhengqi.arch@bytedance.com Signed-off-by: Greg Kroah-Hartman commit d3002468cb5d5da11e22145c9af32facd5c34352 Author: Qi Zheng Date: Wed Feb 8 11:56:34 2023 +0800 debugfs: update comment of debugfs_rename() Since commit ff9fb72bc077 ("debugfs: return error values, not NULL") changed return value of debugfs_rename() in error cases from %NULL to %ERR_PTR(-ERROR), the comment of debugfs_rename should also be updated so as not to mislead readers. Signed-off-by: Qi Zheng Link: https://lore.kernel.org/r/20230208035634.58095-1-zhengqi.arch@bytedance.com Signed-off-by: Greg Kroah-Hartman commit 007ed7900aae514986770f6e14069ebd99c4a4c6 Author: Randy Dunlap Date: Sun Feb 12 23:03:24 2023 -0800 i3c: fix device.h kernel-doc warnings Fix all kernel-doc warnings in : include/linux/i3c/device.h:27: warning: contents before sections include/linux/i3c/device.h:196: warning: Excess function parameter 'dev' description in 'dev_to_i3cdev' Fixes: fa838c8ce537 ("i3c: move dev_to_i3cdev() to use container_of_const()") Fixes: 3a379bbcea0a ("i3c: Add core I3C infrastructure") Signed-off-by: Randy Dunlap Cc: Boris Brezillon Cc: Greg Kroah-Hartman Cc: Alexandre Belloni Cc: linux-i3c@lists.infradead.org Link: https://lore.kernel.org/r/20230213070324.1564-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 1470a108a60e8c0c4d19da10117c9b98f0078654 Author: Feng Tang Date: Tue Feb 14 15:58:23 2023 +0800 perf c2c: Add report option to show false sharing in adjacent cachelines Many platforms have feature of adjacent cachelines prefetch, when it is enabled, for data in RAM of 2 cachelines (2N and 2N+1) granularity, if one is fetched to cache, the other one could likely be fetched too, which sort of extends the cacheline size to double, thus the false sharing could happens in adjacent cachelines. 0Day has captured performance changed related with this [1], and some commercial software explicitly makes its hot global variables 128 bytes aligned (2 cache lines) to avoid this kind of extended false sharing. So add an option "--double-cl" for 'perf c2c report' to show false sharing in double cache line granularity, which acts just like the cacheline size is doubled. There is no change to c2c record. The hardware events of shared cacheline are still per cacheline, and this option just changes the granularity of how events are grouped and displayed. In the 'perf c2c report' output below (will-it-scale's 'pagefault2' case on old kernel): ---------------------------------------------------------------------- 26 31 2 0 0 0 0xffff888103ec6000 ---------------------------------------------------------------------- 35.48% 50.00% 0.00% 0.00% 0.00% 0x10 0 1 0xffffffff8133148b 1153 66 971 3748 74 [k] get_mem_cgroup_from_mm 6.45% 0.00% 0.00% 0.00% 0.00% 0x10 0 1 0xffffffff813396e4 570 0 1531 879 75 [k] mem_cgroup_charge 25.81% 50.00% 0.00% 0.00% 0.00% 0x54 0 1 0xffffffff81331472 949 70 593 3359 74 [k] get_mem_cgroup_from_mm 19.35% 0.00% 0.00% 0.00% 0.00% 0x54 0 1 0xffffffff81339686 1352 0 1073 1022 74 [k] mem_cgroup_charge 9.68% 0.00% 0.00% 0.00% 0.00% 0x54 0 1 0xffffffff813396d6 1401 0 863 768 74 [k] mem_cgroup_charge 3.23% 0.00% 0.00% 0.00% 0.00% 0x54 0 1 0xffffffff81333106 618 0 804 11 9 [k] uncharge_batch The offset 0x10 and 0x54 used to displayed in 2 groups, and now they are listed together to give users a hint of extended false sharing. [1]. https://lore.kernel.org/lkml/20201102091543.GM31092@shao2-debian/ Committer notes: Link: https://lore.kernel.org/r/Y+wvVNWqXb70l4uy@feng-clx Removed -a, leaving just as --double-cl, as this probably is not used so frequently and perhaps will be even auto-detected if we manage to record the MSR where this is configured. Reviewed-by: Andi Kleen Reviewed-by: Leo Yan Signed-off-by: Feng Tang Tested-by: Leo Yan Acked-by: Joe Mario Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Tim Chen Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230214075823.246414-1-feng.tang@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 40967f77dfa9fa728b7f36a5d2eb432f39de185c Merge: f5b12be34249e 5198cb408fcfc Author: Paolo Abeni Date: Thu Feb 16 13:30:06 2023 +0100 Merge branch 'seg6-add-psp-flavor-support-for-srv6-end-behavior' Andrea Mayer says: ==================== seg6: add PSP flavor support for SRv6 End behavior Segment Routing for IPv6 (SRv6 in short) [1] is the instantiation of the Segment Routing (SR) [2] architecture on the IPv6 dataplane. In SRv6, the segment identifiers (SID) are IPv6 addresses and the segment list (SID List) is carried in the Segment Routing Header (SRH). A segment may be bound to a specific packet processing operation called "behavior". The RFC8986 [3] defines and standardizes the most common/relevant behaviors for network operators, e.g., End, End.X and End.T and so on. The RFC8986 also introduces the "flavors" framework aiming to modify or extend the capabilities of SRv6 End, End.X and End.T behaviors. Specifically, these behaviors support the following flavors (either individually or in combinations): - Penultimate Segment Pop (PSP); - Ultimate Segment Pop (USP); - Ultimate Segment Decapsulation (USD). Such flavors enable an End/End.X/End.T behavior to pop the SRH on the penultimate/ultimate SR endpoint node listed in the SID List or to perform a full decapsulation. Currently, the Linux kernel supports a large subset of behaviors described in RFC8986, including the End, End.X and End.T. However, PSP, USP and USD flavors have not yet been implemented. In this patchset, we extend the SRv6 subsystem to implement the PSP flavor in the SRv6 End behavior. To accomplish this task, we leverage the flavor framework previously introduced by another patchset required for supporting the efficient representation of the SID List through the NEXT-C-SID mechanism [4]. In details, the patchset is made of: - patch 1/3: seg6: factor out End lookup nexthop processing to a dedicated function - patch 2/3: seg6: add PSP flavor support for SRv6 End behavior - patch 3/3: selftests: seg6: add selftest for PSP flavor in SRv6 End behavior From the user space perspective, we do not need to change the iproute2 code to support the PSP flavor. However, we provide the man page for the PSP flavor in a separate patch. Comments, improvements and suggestions are always appreciated. [1] - RFC8754: https://datatracker.ietf.org/doc/html/rfc8754 [2] - RFC8402: https://datatracker.ietf.org/doc/html/rfc8402 [3] - RFC8986: https://datatracker.ietf.org/doc/html/rfc8986 [4] - https://datatracker.ietf.org/doc/html/draft-ietf-spring-srv6-srh-compression ==================== Link: https://lore.kernel.org/r/20230215134659.7613-1-andrea.mayer@uniroma2.it Signed-off-by: Paolo Abeni commit 5198cb408fcfc0b49c418314570423efe2217754 Author: Andrea Mayer Date: Wed Feb 15 14:46:59 2023 +0100 selftests: seg6: add selftest for PSP flavor in SRv6 End behavior This selftest is designed for testing the PSP flavor in SRv6 End behavior. It instantiates a virtual network composed of several nodes: hosts and SRv6 routers. Each node is realized using a network namespace that is properly interconnected to others through veth pairs. The test makes use of the SRv6 End behavior and of the PSP flavor needed for removing the SRH from the IPv6 header at the penultimate node. The correct execution of the behavior is verified through reachability tests carried out between hosts. Signed-off-by: Andrea Mayer Signed-off-by: Paolo Lungaroni Reviewed-by: David Ahern Signed-off-by: Paolo Abeni commit bdf3c0b9c10b44c9355dd68f359bad25489445b6 Author: Andrea Mayer Date: Wed Feb 15 14:46:58 2023 +0100 seg6: add PSP flavor support for SRv6 End behavior The "flavors" framework defined in RFC8986 [1] represents additional operations that can modify or extend a subset of existing behaviors such as SRv6 End, End.X and End.T. We report these flavors hereafter: - Penultimate Segment Pop (PSP); - Ultimate Segment Pop (USP); - Ultimate Segment Decapsulation (USD). Depending on how the Segment Routing Header (SRH) has to be handled, an SRv6 End* behavior can support these flavors either individually or in combinations. In this patch, we only consider the PSP flavor for the SRv6 End behavior. A PSP enabled SRv6 End behavior is used by the Source/Ingress SR node (i.e., the one applying the SRv6 Policy) when it needs to instruct the penultimate SR Endpoint node listed in the SID List (carried by the SRH) to remove the SRH from the IPv6 header. Specifically, a PSP enabled SRv6 End behavior processes the SRH by: i) decreasing the Segment Left (SL) from 1 to 0; ii) copying the Last Segment IDentifier (SID) into the IPv6 Destination Address (DA); iii) removing (i.e., popping) the outer SRH from the extension headers following the IPv6 header. It is important to note that PSP operation (steps i, ii, iii) takes place only at a penultimate SR Segment Endpoint node (i.e., when the SL=1) and does not happen at non-penultimate Endpoint nodes. Indeed, when a SID of PSP flavor is processed at a non-penultimate SR Segment Endpoint node, the PSP operation is not performed because it would not be possible to decrease the SL from 1 to 0. SL=2 SL=1 SL=0 | | | For example, given the SRv6 policy (SID List := < X, Y, Z >): - a PSP enabled SRv6 End behavior bound to SID "Y" will apply the PSP operation as Segment Left (SL) is 1, corresponding to the Penultimate Segment of the SID List; - a PSP enabled SRv6 End behavior bound to SID "X" will *NOT* apply the PSP operation as the Segment Left is 2. This behavior instance will apply the "standard" End packet processing, ignoring the configured PSP flavor at all. [1] - RFC8986: https://datatracker.ietf.org/doc/html/rfc8986 Signed-off-by: Andrea Mayer Reviewed-by: David Ahern Signed-off-by: Paolo Abeni commit 525c65ff5696f7ccd8335edde1d9964420707910 Author: Andrea Mayer Date: Wed Feb 15 14:46:57 2023 +0100 seg6: factor out End lookup nexthop processing to a dedicated function The End nexthop lookup/input operations are moved into a new helper function named input_action_end_finish(). This avoids duplicating the code needed to compute the nexthop in the different flavors of the End behavior. Signed-off-by: Andrea Mayer Reviewed-by: David Ahern Signed-off-by: Paolo Abeni commit f5b12be34249e8fd0f866927bc978f9e08fc9770 Author: Lukas Bulwahn Date: Wed Feb 15 11:46:31 2023 +0100 net: dsa: ocelot: fix selecting MFD_OCELOT Commit 3d7316ac81ac ("net: dsa: ocelot: add external ocelot switch control") adds config NET_DSA_MSCC_OCELOT_EXT, which selects the non-existing config MFD_OCELOT_CORE. Replace this select with the intended and existing MFD_OCELOT. Signed-off-by: Lukas Bulwahn Acked-by: Colin Foster Link: https://lore.kernel.org/r/20230215104631.31568-1-lukas.bulwahn@gmail.com Signed-off-by: Paolo Abeni commit e3eafcf0fabe67d0f854b238c0c247a4b0187e38 Author: Andy Shevchenko Date: Wed Feb 15 18:52:39 2023 +0200 usb: dwc3: xilinx: 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 Reviewed-by: Michal Simek Link: https://lore.kernel.org/r/20230215165239.83806-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit fa15072b650a1a90f811239f86fcbe081691a058 Merge: e9ab2559e2c50 3b6096c9b30b9 Author: Paolo Abeni Date: Thu Feb 16 12:03:15 2023 +0100 Merge branch 'sfc-devlink-support-for-ef100' Alejandro Lucero says: ==================== sfc: devlink support for ef100 This patchset adds devlink port support for ef100 allowing setting VFs mac addresses through the VF representor devlink ports. Basic devlink infrastructure is first introduced, then support for info command. Next changes for enumerating MAE ports which will be used for devlink port creation when netdevs are registered. Adding support for devlink port_function_hw_addr_get requires changes in the ef100 driver for getting the mac address based on a client handle. This allows to obtain VFs mac addresses during netdev initialization as well what is included in patch 6. Such client handle is used in patches 7 and 8 for getting and setting devlink port addresses. ==================== Link: https://lore.kernel.org/r/20230215090828.11697-1-alejandro.lucero-palau@amd.com Signed-off-by: Paolo Abeni commit 3b6096c9b30b9d65d09f9f4ee5f473c8c28f45d0 Author: Alejandro Lucero Date: Wed Feb 15 09:08:28 2023 +0000 sfc: add support for devlink port_function_hw_addr_set in ef100 Using the builtin client handle id infrastructure, add support for setting the mac address linked to mports in ef100. This implies to execute an MCDI command for giving the address to the firmware for the specific devlink port. Signed-off-by: Alejandro Lucero Reviewed-by: Jiri Pirko Acked-by: Martin Habets Signed-off-by: Paolo Abeni commit fa78b01718d2f1cc95ce052fad3aa49c46d024eb Author: Alejandro Lucero Date: Wed Feb 15 09:08:27 2023 +0000 sfc: add support for devlink port_function_hw_addr_get in ef100 Using the builtin client handle id infrastructure, add support for obtaining the mac address linked to mports in ef100. This implies to execute an MCDI command for getting the data from the firmware for each devlink port. Signed-off-by: Alejandro Lucero Reviewed-by: Jiri Pirko Acked-by: Martin Habets Signed-off-by: Paolo Abeni commit 7e056e2360d9267a20509aa2cdb8905485499e95 Author: Alejandro Lucero Date: Wed Feb 15 09:08:26 2023 +0000 sfc: obtain device mac address based on firmware handle for ef100 Getting device mac address is currently based on a specific MCDI command only available for the PF. This patch changes the MCDI command to a generic one for PFs and VFs based on a client handle. This allows both PFs and VFs to ask for their mac address during initialization using the CLIENT_HANDLE_SELF. Moreover, the patch allows other client handles which will be used by the PF to ask for mac addresses linked to VFs. This is necessary for suporting the port_function_hw_addr_get devlink function in further patches. Signed-off-by: Alejandro Lucero Acked-by: Martin Habets Signed-off-by: Paolo Abeni commit 25414b2a64ae7ea8742933bd7b1d056e069b15a7 Author: Alejandro Lucero Date: Wed Feb 15 09:08:25 2023 +0000 sfc: add devlink port support for ef100 Using the data when enumerating mports, create devlink ports just before netdevs are registered and remove those devlink ports after netdev has been unregistered. Signed-off-by: Alejandro Lucero Reviewed-by: Jiri Pirko Acked-by: Martin Habets Signed-off-by: Paolo Abeni commit 5227adff37af35fdc3c6f029737708c2d0921618 Author: Alejandro Lucero Date: Wed Feb 15 09:08:24 2023 +0000 sfc: add mport lookup based on driver's mport data Obtaining mport id is based on asking the firmware about it. This is still needed for mport initialization itself, but once the mport data is now kept by the driver, further mport id request can be satisfied internally without firmware interaction. Previous function is just modified in name making clear the firmware interaction. The new function uses the old name and looks for the data in the mport data structure. Signed-off-by: Alejandro Lucero Acked-by: Martin Habets Signed-off-by: Paolo Abeni commit a6a15aca4207b5f5ed44f594ddd0ddeb6a495654 Author: Alejandro Lucero Date: Wed Feb 15 09:08:23 2023 +0000 sfc: enumerate mports in ef100 MAE ports (mports) are the ports on the EF100 embedded switch such as networking PCIe functions, the physical port, and potentially others. Signed-off-by: Alejandro Lucero Acked-by: Martin Habets Signed-off-by: Paolo Abeni commit 14743ddd2495c96caa18e382625c034e49a812e2 Author: Alejandro Lucero Date: Wed Feb 15 09:08:22 2023 +0000 sfc: add devlink info support for ef100 Add devlink info support for ef100. The information reported is obtained through the MCDI interface with the specific meaning defined in new documentation file. Signed-off-by: Alejandro Lucero Reviewed-by: Jiri Pirko Acked-by: Martin Habets Signed-off-by: Paolo Abeni commit fa34a5140a8e8f4120e86a1ae622b5df58414c3a Author: Alejandro Lucero Date: Wed Feb 15 09:08:21 2023 +0000 sfc: add devlink support for ef100 Add devlink infrastructure support. Further patches add devlink info and devlink port support. Signed-off-by: Alejandro Lucero Reviewed-by: Jiri Pirko Acked-by: Martin Habets Signed-off-by: Paolo Abeni commit b94335f899542a0da5fafc38af8edcaf90195843 Author: Pietro Borrello Date: Sun Feb 12 00:01:44 2023 +0000 hid: bigben_probe(): validate report count bigben_probe() does not validate that the output report has the needed report values in the first field. A malicious device registering a report with one field and a single value causes an head OOB write in bigben_worker() when accessing report_field->value[1] to report_field->value[7]. Use hid_validate_values() which takes care of all the needed checks. Fixes: 256a90ed9e46 ("HID: hid-bigbenff: driver for BigBen Interactive PS3OFMINIPAD gamepad") Signed-off-by: Pietro Borrello Link: https://lore.kernel.org/r/20230211-bigben-oob-v1-1-d2849688594c@diag.uniroma1.it Signed-off-by: Benjamin Tissoires commit 996d120b4de2b0d6b592bd9fbbe6e244b81ab3cc Author: Vasant Hegde Date: Wed Feb 15 05:26:42 2023 +0000 iommu/amd: Improve page fault error reporting If IOMMU domain for device group is not setup properly then we may hit IOMMU page fault. Current page fault handler assumes that domain is always setup and it will hit NULL pointer derefence (see below sample log). Lets check whether domain is setup or not and log appropriate message. Sample log: ---------- amdgpu 0000:00:01.0: amdgpu: SE 1, SH per SE 1, CU per SH 8, active_cu_number 6 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] PREEMPT SMP NOPTI CPU: 2 PID: 56 Comm: irq/24-AMD-Vi Not tainted 6.2.0-rc2+ #89 Hardware name: xxx RIP: 0010:report_iommu_fault+0x11/0x90 [...] Call Trace: amd_iommu_int_thread+0x60c/0x760 ? __pfx_irq_thread_fn+0x10/0x10 irq_thread_fn+0x1f/0x60 irq_thread+0xea/0x1a0 ? preempt_count_add+0x6a/0xa0 ? __pfx_irq_thread_dtor+0x10/0x10 ? __pfx_irq_thread+0x10/0x10 kthread+0xe9/0x110 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x2c/0x50 Reported-by: Matt Fagnani Suggested-by: Joerg Roedel Signed-off-by: Vasant Hegde Link: https://bugzilla.kernel.org/show_bug.cgi?id=216865 Link: https://lore.kernel.org/lkml/15d0f9ff-2a56-b3e9-5b45-e6b23300ae3b@leemhuis.info/ Link: https://lore.kernel.org/r/20230215052642.6016-3-vasant.hegde@amd.com Cc: stable@vger.kernel.org [joro: Edit commit message] Signed-off-by: Joerg Roedel commit 7096deb7b5387e7899655213b7430ab043ddda4f Author: Andrew Donnellan Date: Thu Feb 16 18:09:03 2023 +1100 powerpc/pseries: Fix endianness issue when parsing PLPKS secvar flags When a user updates a variable through the PLPKS secvar interface, we take the first 8 bytes of the data written to the update attribute to pass through to the H_PKS_SIGNED_UPDATE hcall as flags. These bytes are always written in big-endian format. Currently, the flags bytes are memcpy()ed into a u64, which is then loaded into a register to pass as part of the hcall. This means that on LE systems, the bytes are in the wrong order. Use be64_to_cpup() instead, to ensure the flags bytes are byteswapped if necessary. Reported-by: Stefan Berger Fixes: ccadf154cb00 ("powerpc/pseries: Implement secvars for dynamic secure boot") Signed-off-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230216070903.355091-1-ajd@linux.ibm.com commit 18792e99ea2fea27c72eb1ecca1879e5e6be304d Author: Vasant Hegde Date: Tue Feb 7 09:17:52 2023 +0000 iommu/amd: Do not identity map v2 capable device when snp is enabled Flow: - Booted system with SNP enabled, memory encryption off and IOMMU DMA translation mode - AMD driver detects v2 capable device and amd_iommu_def_domain_type() returns identity mode - amd_iommu_domain_alloc() returns NULL an SNP is enabled - System will fail to register device On SNP enabled system, passthrough mode is not supported. IOMMU default domain is set to translation mode. We need to return zero from amd_iommu_def_domain_type() so that it allocates translation domain. Fixes: fb2accadaa94 ("iommu/amd: Introduce function to check and enable SNP") CC: Suravee Suthikulpanit Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20230207091752.7656-1-vasant.hegde@amd.com Signed-off-by: Joerg Roedel commit e9ab2559e2c501593c58a02a956a6005a2a749fb Merge: 10d13421a6ae4 2d2e75d2d4a22 Author: Paolo Abeni Date: Thu Feb 16 10:39:30 2023 +0100 Merge branch 'net-sched-transition-actions-to-pcpu-stats-and-rcu' Pedro Tammela says: ==================== net/sched: transition actions to pcpu stats and rcu Following the work done for act_pedit[0], transition the remaining tc actions to percpu stats and rcu, whenever possible. Percpu stats make updating the action stats very cheap, while combining it with rcu action parameters makes it possible to get rid of the per action lock in the datapath. For act_connmark and act_nat we run the following tests: - tc filter add dev ens2f0 ingress matchall action connmark - tc filter add dev ens2f0 ingress matchall action nat ingress any 10.10.10.10 Our setup consists of a 26 cores Intel CPU and a 25G NIC. We use TRex to shoot 10mpps TCP packets and take perf measurements. Both actions improved performance as expected since the datapath lock disappeared. For act_pedit we move the drop counter to percpu, when available. For act_gate we move the counters to percpu, when available. [0] https://lore.kernel.org/all/20230131145149.3776656-1-pctammela@mojatatu.com/ ==================== Link: https://lore.kernel.org/r/20230214211534.735718-1-pctammela@mojatatu.com Signed-off-by: Paolo Abeni commit 2d2e75d2d4a2245175d77899764b56e19c5769b4 Author: Pedro Tammela Date: Tue Feb 14 18:15:34 2023 -0300 net/sched: act_pedit: use percpu overlimit counter when available Since act_pedit now has access to percpu counters, use the tcf_action_inc_overlimit_qstats wrapper that will use the percpu counter whenever they are available. Reviewed-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Signed-off-by: Paolo Abeni commit 7afd073e5521bfc1045096802bc4dc640b63ed54 Author: Pedro Tammela Date: Tue Feb 14 18:15:33 2023 -0300 net/sched: act_gate: use percpu stats The tc action act_gate was using shared stats, move it to percpu stats. tdc results: 1..12 ok 1 5153 - Add gate action with priority and sched-entry ok 2 7189 - Add gate action with base-time ok 3 a721 - Add gate action with cycle-time ok 4 c029 - Add gate action with cycle-time-ext ok 5 3719 - Replace gate base-time action ok 6 d821 - Delete gate action with valid index ok 7 3128 - Delete gate action with invalid index ok 8 7837 - List gate actions ok 9 9273 - Flush gate actions ok 10 c829 - Add gate action with duplicate index ok 11 3043 - Add gate action with invalid index ok 12 2930 - Add gate action with cookie Reviewed-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Signed-off-by: Paolo Abeni commit 288864effe33885988d53faf7830b35cb9a84c7a Author: Pedro Tammela Date: Tue Feb 14 18:15:32 2023 -0300 net/sched: act_connmark: transition to percpu stats and rcu The tc action act_connmark was using shared stats and taking the per action lock in the datapath. Improve it by using percpu stats and rcu. perf before: - 13.55% tcf_connmark_act - 81.18% _raw_spin_lock 80.46% native_queued_spin_lock_slowpath perf after: - 2.85% tcf_connmark_act tdc results: 1..15 ok 1 2002 - Add valid connmark action with defaults ok 2 56a5 - Add valid connmark action with control pass ok 3 7c66 - Add valid connmark action with control drop ok 4 a913 - Add valid connmark action with control pipe ok 5 bdd8 - Add valid connmark action with control reclassify ok 6 b8be - Add valid connmark action with control continue ok 7 d8a6 - Add valid connmark action with control jump ok 8 aae8 - Add valid connmark action with zone argument ok 9 2f0b - Add valid connmark action with invalid zone argument ok 10 9305 - Add connmark action with unsupported argument ok 11 71ca - Add valid connmark action and replace it ok 12 5f8f - Add valid connmark action with cookie ok 13 c506 - Replace connmark with invalid goto chain control ok 14 6571 - Delete connmark action with valid index ok 15 3426 - Delete connmark action with invalid index Reviewed-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Signed-off-by: Paolo Abeni commit 7d12057b45fbc1e1315d327dca13e8d6b5019113 Author: Pedro Tammela Date: Tue Feb 14 18:15:31 2023 -0300 net/sched: act_nat: transition to percpu stats and rcu The tc action act_nat was using shared stats and taking the per action lock in the datapath. Improve it by using percpu stats and rcu. perf before: - 10.48% tcf_nat_act - 81.83% _raw_spin_lock 81.08% native_queued_spin_lock_slowpath perf after: - 0.48% tcf_nat_act tdc results: 1..27 ok 1 7565 - Add nat action on ingress with default control action ok 2 fd79 - Add nat action on ingress with pipe control action ok 3 eab9 - Add nat action on ingress with continue control action ok 4 c53a - Add nat action on ingress with reclassify control action ok 5 76c9 - Add nat action on ingress with jump control action ok 6 24c6 - Add nat action on ingress with drop control action ok 7 2120 - Add nat action on ingress with maximum index value ok 8 3e9d - Add nat action on ingress with invalid index value ok 9 f6c9 - Add nat action on ingress with invalid IP address ok 10 be25 - Add nat action on ingress with invalid argument ok 11 a7bd - Add nat action on ingress with DEFAULT IP address ok 12 ee1e - Add nat action on ingress with ANY IP address ok 13 1de8 - Add nat action on ingress with ALL IP address ok 14 8dba - Add nat action on egress with default control action ok 15 19a7 - Add nat action on egress with pipe control action ok 16 f1d9 - Add nat action on egress with continue control action ok 17 6d4a - Add nat action on egress with reclassify control action ok 18 b313 - Add nat action on egress with jump control action ok 19 d9fc - Add nat action on egress with drop control action ok 20 a895 - Add nat action on egress with DEFAULT IP address ok 21 2572 - Add nat action on egress with ANY IP address ok 22 37f3 - Add nat action on egress with ALL IP address ok 23 6054 - Add nat action on egress with cookie ok 24 79d6 - Add nat action on ingress with cookie ok 25 4b12 - Replace nat action with invalid goto chain control ok 26 b811 - Delete nat action with valid index ok 27 a521 - Delete nat action with invalid index Reviewed-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Signed-off-by: Paolo Abeni commit 4daa861174d56023c2068ddb03de0752f07fa199 Author: Jason Gunthorpe Date: Wed Feb 15 21:21:16 2023 -0400 iommu: Fix error unwind in iommu_group_alloc() If either iommu_group_grate_file() fails then the iommu_group is leaked. Destroy it on these error paths. Found by kselftest/iommu/iommufd_fail_nth Fixes: bc7d12b91bd3 ("iommu: Implement reserved_regions iommu-group sysfs file") Fixes: c52c72d3dee8 ("iommu: Add sysfs attribyte for domain type") Signed-off-by: Jason Gunthorpe Reviewed-by: Lu Baolu Link: https://lore.kernel.org/r/0-v1-8f616bee028d+8b-iommu_group_alloc_leak_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 4762315d1c971312d55848fdc85eee7f0b09c8f2 Author: Randy Dunlap Date: Wed Feb 8 17:03:59 2023 -0800 iommu/of: mark an unused function as __maybe_unused When CONFIG_OF_ADDRESS is not set, there is a build warning/error about an unused function. Annotate the function to quieten the warning/error. ../drivers/iommu/of_iommu.c:176:29: warning: 'iommu_resv_region_get_type' defined but not used [-Wunused-function] 176 | static enum iommu_resv_type iommu_resv_region_get_type(struct device *dev, struct resource *phys, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: a5bf3cfce8cb ("iommu: Implement of_iommu_get_resv_regions()") Signed-off-by: Randy Dunlap Cc: Thierry Reding Cc: Joerg Roedel Cc: Will Deacon Cc: iommu@lists.linux.dev Reviewed-by: Thierry Reding Link: https://lore.kernel.org/r/20230209010359.23831-1-rdunlap@infradead.org [joro: Improve code formatting] Signed-off-by: Joerg Roedel commit 8573df341545b7b66cfacf9526b1f7a0de917b9e Merge: 48075a66fca61 467fbc77f673e Author: Daniel Vetter Date: Thu Feb 16 10:12:34 2023 +0100 Merge tag 'drm-misc-next-fixes-2023-02-09' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Short summary of fixes pull: Contains a number of fixes to vc4 and ivpu. The patches to the probe helpers were cherry-picked from the regular development branch. Signed-off-by: Daniel Vetter From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/Y+S6HBmaRJNPYiBG@linux-uq9g commit 10d13421a6ae414ab91d4f2103fc90d1f4216736 Merge: a1d83abc8f2f9 3ba0bf47edf95 Author: Paolo Abeni Date: Thu Feb 16 10:11:29 2023 +0100 Merge branch 'net-core-commmon-prints-for-promisc' Jesse Brandeburg says: ==================== net/core: commmon prints for promisc Add a print to the kernel log for allmulticast entry and exit, and standardize the print for entry and exit of promiscuous mode. These prints are useful to both user and developer and should have the triggering driver/bus/device info that netdev_info (optionally) gives. ==================== Link: https://lore.kernel.org/r/20230214210117.23123-1-jesse.brandeburg@intel.com Signed-off-by: Paolo Abeni commit 3ba0bf47edf955d6f52fdb16b54acd1932cb9445 Author: Jesse Brandeburg Date: Tue Feb 14 13:01:17 2023 -0800 net/core: refactor promiscuous mode message The kernel stack can be more consistent by printing the IFF_PROMISC aka promiscuous enable/disable messages with the standard netdev_info message which can include bus and driver info as well as the device. typical command usage from user space looks like: ip link set eth0 promisc But lots of utilities such as bridge, tcpdump, etc put the interface into promiscuous mode. old message: [ 406.034418] device eth0 entered promiscuous mode [ 408.424703] device eth0 left promiscuous mode new message: [ 406.034431] ice 0000:17:00.0 eth0: entered promiscuous mode [ 408.424715] ice 0000:17:00.0 eth0: left promiscuous mode Signed-off-by: Jesse Brandeburg Signed-off-by: Paolo Abeni commit 802dcbd6f30feaa7c96a1fb4ecb1db57082df9d7 Author: Jesse Brandeburg Date: Tue Feb 14 13:01:16 2023 -0800 net/core: print message for allmulticast When the user sets or clears the IFF_ALLMULTI flag in the netdev, there are no log messages printed to the kernel log to indicate anything happened. This is inexplicably different from most other dev->flags changes, and could suprise the user. Typically this occurs from user-space when a user: ip link set eth0 allmulticast However, other devices like bridge set allmulticast as well, and many other flows might trigger entry into allmulticast as well. The new message uses the standard netdev_info print and looks like: [ 413.246110] ixgbe 0000:17:00.0 eth0: entered allmulticast mode [ 415.977184] ixgbe 0000:17:00.0 eth0: left allmulticast mode Signed-off-by: Jesse Brandeburg Signed-off-by: Paolo Abeni commit 1a30a6b25f263686dbf2028d56041ac012b10dcb Author: Kees Cook Date: Wed Feb 15 14:41:14 2023 -0800 wifi: brcmfmac: p2p: Introduce generic flexible array frame member Silence run-time memcpy() false positive warning when processing management frames: memcpy: detected field-spanning write (size 27) of single field "&mgmt_frame->u" at drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:1469 (size 26) Due to this (soon to be fixed) GCC bug[1], FORTIFY_SOURCE (via __builtin_dynamic_object_size) doesn't recognize that the union may end with a flexible array, and returns "26" (the fixed size of the union), rather than the remaining size of the allocation. Add an explicit flexible array member and set it as the destination here, so that we get the correct coverage for the memcpy(). [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101832 Reported-by: Ard Biesheuvel Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Kalle Valo Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Johannes Berg Cc: "Jason A. Donenfeld" Cc: Greg Kroah-Hartman Cc: "Darrick J. Wong" Cc: Colin Ian King Cc: Brian Henriquez Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Cc: SHA-cyfmac-dev-list@infineon.com Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20230215224110.never.022-kees@kernel.org [rename 'frame' to 'body'] Signed-off-by: Johannes Berg commit a1d83abc8f2f9d2193017665e6804c8baf65d469 Merge: 8fdf6659974d6 265b4da82dbf5 Author: Paolo Abeni Date: Thu Feb 16 09:27:09 2023 +0100 Merge branch 'net-sched-retire-some-tc-qdiscs-and-classifiers' Jamal Hadi Salim says: ==================== net/sched: Retire some tc qdiscs and classifiers The CBQ + dsmark qdiscs and the tcindex + rsvp classifiers have served us for over 2 decades. Unfortunately, they have not been getting much attention due to reduced usage. While we dont have a good metric for tabulating how much use a specific kernel feature gets, for these specific features we observed that some of the functionality has been broken for some time and no users complained. In addition, syzkaller has been going to town on most of these and finding issues; and while we have been fixing those issues, at times it becomes obvious that we would need to perform bigger surgeries to resolve things found while getting a syzkaller fix in place. After some discussion we feel that in order to reduce the maintenance burden it is best to retire them. This patchset leaves the UAPI alone. I could send another version which deletes the UAPI as well. AFAIK, this has not been done before - so it wasnt clear what how to handle UAPI. It seems legit to just delete it but we would need to coordinate with iproute2 (given they sync up with kernel uapi headers). There are probably other users we don't know of that copy kernel headers. If folks feel differently I will resend the patches deleting UAPI for these qdiscs and classifiers. I will start another thread on iproute2 before sending any patches to iproute2. ==================== Link: https://lore.kernel.org/r/20230214134915.199004-1-jhs@mojatatu.com Signed-off-by: Paolo Abeni commit 265b4da82dbf5df04bee5a5d46b7474b1aaf326a Author: Jamal Hadi Salim Date: Tue Feb 14 08:49:15 2023 -0500 net/sched: Retire rsvp classifier The rsvp classifier has served us well for about a quarter of a century but has has not been getting much maintenance attention due to lack of known users. Signed-off-by: Jamal Hadi Salim Acked-by: Jiri Pirko Signed-off-by: Paolo Abeni commit 8c710f75256bb3cf05ac7b1672c82b92c43f3d28 Author: Jamal Hadi Salim Date: Tue Feb 14 08:49:14 2023 -0500 net/sched: Retire tcindex classifier The tcindex classifier has served us well for about a quarter of a century but has not been getting much TLC due to lack of known users. Most recently it has become easy prey to syzkaller. For this reason, we are retiring it. Signed-off-by: Jamal Hadi Salim Acked-by: Jiri Pirko Signed-off-by: Paolo Abeni commit bbe77c14ee6185a61ba6d5e435c1cbb489d2a9ed Author: Jamal Hadi Salim Date: Tue Feb 14 08:49:13 2023 -0500 net/sched: Retire dsmark qdisc The dsmark qdisc has served us well over the years for diffserv but has not been getting much attention due to other more popular approaches to do diffserv services. Most recently it has become a shooting target for syzkaller. For this reason, we are retiring it. Signed-off-by: Jamal Hadi Salim Acked-by: Jiri Pirko Signed-off-by: Paolo Abeni commit fb38306ceb9e770adfb5ffa6e3c64047b55f7a07 Author: Jamal Hadi Salim Date: Tue Feb 14 08:49:12 2023 -0500 net/sched: Retire ATM qdisc The ATM qdisc has served us well over the years but has not been getting much TLC due to lack of known users. Most recently it has become a shooting target for syzkaller. For this reason, we are retiring it. Signed-off-by: Jamal Hadi Salim Acked-by: Jiri Pirko Signed-off-by: Paolo Abeni commit 051d442098421c28c7951625652f61b1e15c4bd5 Author: Jamal Hadi Salim Date: Tue Feb 14 08:49:11 2023 -0500 net/sched: Retire CBQ qdisc While this amazing qdisc has served us well over the years it has not been getting any tender love and care and has bitrotted over time. It has become mostly a shooting target for syzkaller lately. For this reason, we are retiring it. Goodbye CBQ - we loved you. Signed-off-by: Jamal Hadi Salim Acked-by: Jiri Pirko Signed-off-by: Paolo Abeni commit 5c3d1d0abb12a6915d0f43233837053945621a89 Author: Masahiro Yamada Date: Wed Feb 15 10:20:23 2023 +0900 kbuild: add a tool to list files ignored by git In short, the motivation of this commit is to build a source package without cleaning the source tree. The deb-pkg and (src)rpm-pkg targets first run 'make clean' before creating a source tarball. Otherwise build artifacts such as *.o, *.a, etc. would be included in the tarball. Yet, the tarball ends up containing several garbage files since 'make clean' does not clean everything. Cleaning the tree every time is annoying since it makes the incremental build impossible. It is desirable to create a source tarball without cleaning the tree. In fact, there are some ways to achieve this. The easiest solution is 'git archive'. 'make perf-tar*-src-pkg' uses it, but I do not like it because it works only when the source tree is managed by git, and all files you want in the tarball must be committed in advance. I want to make it work without relying on git. We can do this. Files that are ignored by git are generated files, so should be excluded from the source tarball. We can list them out by parsing the .gitignore files. Of course, .gitignore does not cover all the cases, but it works well enough. tar(1) claims to support it: --exclude-vcs-ignores Exclude files that match patterns read from VCS-specific ignore files. Supported files are: .cvsignore, .gitignore, .bzrignore, and .hgignore. The best scenario would be to use 'tar --exclude-vcs-ignores', but this option does not work. --exclude-vcs-ignore does not understand any of the negation (!), preceding slash, following slash, etc.. So, this option is just useless. Hence, I wrote this gitignore parser. The previous version [1], written in Python, was so slow. This version is implemented in C, so it works much faster. I imported the code from git (commit: 23c56f7bd5f1), so we get the same result. This tool traverses the source tree, parsing all .gitignore files, and prints file paths that are ignored by git. The output is similar to 'git ls-files --ignored --directory --others --exclude-per-directory=.gitignore', except [1] Not sorted [2] No trailing slash for directories [2] is intentional because tar's --exclude-from option cannot handle trailing slashes. [How to test this tool] $ git clean -dfx $ make -s -j$(nproc) defconfig all # or allmodconifg or whatever $ git archive -o ../linux1.tar --prefix=./ HEAD $ tar tf ../linux1.tar | LANG=C sort > ../file-list1 # files emitted by 'git archive' $ make scripts_package HOSTCC scripts/list-gitignored $ scripts/list-gitignored --prefix=./ -o ../exclude-list $ tar cf ../linux2.tar --exclude-from=../exclude-list . $ tar tf ../linux2.tar | LANG=C sort > ../file-list2 # files emitted by 'tar' $ diff ../file-list1 ../file-list2 | grep -E '^(<|>)' < ./Documentation/devicetree/bindings/.yamllint < ./drivers/clk/.kunitconfig < ./drivers/gpu/drm/tests/.kunitconfig < ./drivers/hid/.kunitconfig < ./fs/ext4/.kunitconfig < ./fs/fat/.kunitconfig < ./kernel/kcsan/.kunitconfig < ./lib/kunit/.kunitconfig < ./mm/kfence/.kunitconfig < ./tools/testing/selftests/arm64/tags/ < ./tools/testing/selftests/arm64/tags/.gitignore < ./tools/testing/selftests/arm64/tags/Makefile < ./tools/testing/selftests/arm64/tags/run_tags_test.sh < ./tools/testing/selftests/arm64/tags/tags_test.c < ./tools/testing/selftests/kvm/.gitignore < ./tools/testing/selftests/kvm/Makefile < ./tools/testing/selftests/kvm/config < ./tools/testing/selftests/kvm/settings The source tarball contains most of files that are tracked by git. You see some diffs, but it is just because some .gitignore files are wrong. $ git ls-files -i -c --exclude-per-directory=.gitignore Documentation/devicetree/bindings/.yamllint drivers/clk/.kunitconfig drivers/gpu/drm/tests/.kunitconfig drivers/hid/.kunitconfig fs/ext4/.kunitconfig fs/fat/.kunitconfig kernel/kcsan/.kunitconfig lib/kunit/.kunitconfig mm/kfence/.kunitconfig tools/testing/selftests/arm64/tags/.gitignore tools/testing/selftests/arm64/tags/Makefile tools/testing/selftests/arm64/tags/run_tags_test.sh tools/testing/selftests/arm64/tags/tags_test.c tools/testing/selftests/kvm/.gitignore tools/testing/selftests/kvm/Makefile tools/testing/selftests/kvm/config tools/testing/selftests/kvm/settings [1]: https://lore.kernel.org/all/20230128173843.765212-1-masahiroy@kernel.org/ Signed-off-by: Masahiro Yamada commit 8fdf6659974d697ef09acd216ffff34706a1b83a Merge: 72bc7f163179c ebf44ded76e92 Author: Paolo Abeni Date: Thu Feb 16 08:59:51 2023 +0100 Merge branch 'adding-sparx5-es0-vcap-support' Steen Hegelund says: ==================== Adding Sparx5 ES0 VCAP support This provides the Egress Stage 0 (ES0) VCAP (Versatile Content-Aware Processor) support for the Sparx5 platform. The ES0 VCAP is an Egress Access Control VCAP that uses frame keyfields and previously classified keyfields to add, rewrite or remove VLAN tags on the egress frames, and is therefore often referred to as the rewriter. The ES0 VCAP also supports trapping frames to the host. The ES0 VCAP has 1 lookup accessible with this chain id: - chain 10000000: ES0 Lookup 0 The ES0 VCAP does not do traffic classification to select a keyset, but it does have two keysets that can be used on all traffic. For now only the ISDX keyset is used. The ES0 VCAP can match on an ISDX key (Ingress Service Index) as one of the frame metadata keyfields, similar to the ES2 VCAP. The ES0 VCAP uses external counters in the XQS (statistics) group. ==================== Link: https://lore.kernel.org/r/20230214104049.1553059-1-steen.hegelund@microchip.com Signed-off-by: Paolo Abeni commit ebf44ded76e92e0812e0e4a2acd20c7f86550e2c Author: Steen Hegelund Date: Tue Feb 14 11:40:49 2023 +0100 net: microchip: sparx5: Add TC vlan action support for the ES0 VCAP This provides these 3 actions for rule in the ES0 VCAP: - action vlan pop - action vlan modify id X priority Y - action vlan push id X priority Y protocol Z Signed-off-by: Steen Hegelund Signed-off-by: Paolo Abeni commit 52b28a93c45d2eb6177f073665ca5e4b2f6a229a Author: Steen Hegelund Date: Tue Feb 14 11:40:48 2023 +0100 net: microchip: sparx5: Add TC support for the ES0 VCAP This enables the TC command to use the Sparx5 ES0 VCAP, and handling of rule links between IS0 and ES0. Signed-off-by: Steen Hegelund Signed-off-by: Paolo Abeni commit 3cbe7537a7f1aaafc4eebc124dfcc8eaf67f1ec7 Author: Steen Hegelund Date: Tue Feb 14 11:40:47 2023 +0100 net: microchip: sparx5: Add ES0 VCAP keyset configuration for Sparx5 This adds the ES0 VCAP port keyset configuration for Sparx5. Signed-off-by: Steen Hegelund Signed-off-by: Paolo Abeni commit f2a77dd69f51358ab6fb169f5582c329a2315e6c Author: Steen Hegelund Date: Tue Feb 14 11:40:46 2023 +0100 net: microchip: sparx5: Updated register interface with VCAP ES0 access This provides access to the ES0 VCAP register targets Signed-off-by: Steen Hegelund Signed-off-by: Paolo Abeni commit a5cc98adf3cbb187a7b9063ccb2b1c7065a05401 Author: Steen Hegelund Date: Tue Feb 14 11:40:45 2023 +0100 net: microchip: sparx5: Add ES0 VCAP model and updated KUNIT VCAP model This provides the VCAP model for the Sparx5 ES0 (Egress Stage 0) VCAP. This VCAP provides rewriting functionality in the egress path. Signed-off-by: Steen Hegelund Signed-off-by: Paolo Abeni commit b5b0c364598835739451e6cd8a9dd84d41089c02 Author: Steen Hegelund Date: Tue Feb 14 11:40:44 2023 +0100 net: microchip: sparx5: Improve the error handling for linked rules Ensure that an error is returned if the VCAP instance was not found. The chain offset (diff) is allowed to be zero as this just means that the user did not request rules to be linked. Signed-off-by: Steen Hegelund Signed-off-by: Paolo Abeni commit 0518e914f34ae539a1a6f4a19ead3b1d5d9881f4 Author: Steen Hegelund Date: Tue Feb 14 11:40:43 2023 +0100 net: microchip: sparx5: Use chain ids without offsets when enabling rules This improves the check performed on linked rules when enabling or disabling them. The chain id used must be the chain id without the offset used for linking the rules. Signed-off-by: Steen Hegelund Signed-off-by: Paolo Abeni commit 38f6408c6071f1233644cc1d23e34ec5b36700d7 Author: Steen Hegelund Date: Tue Feb 14 11:40:42 2023 +0100 net: microchip: sparx5: Egress VLAN TPID configuration follows IFH This changes the TPID of the egress frames to use the TPID stored in the IFH (internal frame header), which ensures that this is the TPID classified for the frame at ingress. Signed-off-by: Steen Hegelund Signed-off-by: Paolo Abeni commit d7953da4f2935039430322a31b9da93f978fcc86 Author: Steen Hegelund Date: Tue Feb 14 11:40:41 2023 +0100 net: microchip: sparx5: Clear rule counter even if lookup is disabled The rule counter must be cleared when creating a new rule, even if the VCAP lookup is currently disabled. This ensures that rules located in VCAPs that use external counters (such as Sparx5 IS2 and ES0) will have their counter reset even if the VCAP lookup is not enabled at the moment. Signed-off-by: Steen Hegelund Fixes: 95fa74148daa ("net: microchip: sparx5: Reset VCAP counter for new rules") Signed-off-by: Paolo Abeni commit 65b6625069a42edf2a813dd1c50604c6c6236fe5 Author: Steen Hegelund Date: Tue Feb 14 11:40:40 2023 +0100 net: microchip: sparx5: Discard frames with SMAC multicast addresses A valid frame should never use a multicast address as its source MAC address, so discard these invalid frames. Signed-off-by: Steen Hegelund Signed-off-by: Paolo Abeni commit 72bc7f163179cb0b39e1a18dbf69e175267ce500 Merge: 1f26c8b7507c4 13b599f15e1cb Author: Jakub Kicinski Date: Wed Feb 15 21:52:33 2023 -0800 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2023-02-14 (ice) This series contains updates to ice driver only. Karol extends support for GPIO pins to E823 devices. Daniel Vacek stops processing of PTP packets when link is down. Pawel adds support for BIG TCP for IPv6. Tony changes return type of ice_vsi_realloc_stat_arrays() as it always returns success. Zhu Yanjun updates kdoc stating supported TLVs. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: ice: Mention CEE DCBX in code comment ice: Change ice_vsi_realloc_stat_arrays() to void ice: add support BIG TCP on IPv6 ice/ptp: fix the PTP worker retrying indefinitely if the link went down ice: Add GPIO pin support for E823 products ==================== Link: https://lore.kernel.org/r/20230214213003.2117125-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 1f26c8b7507c42f5fec95e757c435300e8af0d1a Author: Randy Dunlap Date: Tue Feb 14 21:37:38 2023 -0800 Documentation: core-api: packing: correct spelling Correct spelling problems for Documentation/core-api/packing.rst as reported by codespell. Signed-off-by: Randy Dunlap Cc: Vladimir Oltean Cc: Jonathan Corbet Reviewed-by: Mukesh Ojha Acked-by: Daniel Jordan Link: https://lore.kernel.org/r/20230215053738.11562-1-rdunlap@infradead.org Signed-off-by: Jakub Kicinski commit affb6a3fd8f44e4848f17989417415d158c1b8c4 Author: Andrew Halaney Date: Tue Feb 14 11:15:04 2023 -0600 dt-bindings: net: snps,dwmac: Fix snps,reset-delays-us dependency The schema had snps,reset-delay-us as dependent on snps,reset-gpio. The actual property is called snps,reset-delays-us, so fix this to catch any devicetree defining snsps,reset-delays-us without snps,reset-gpio. Fixes: 7db3545aef5f ("dt-bindings: net: stmmac: Convert the binding to a schemas") Reviewed-by: Krzysztof Kozlowski Signed-off-by: Andrew Halaney Link: https://lore.kernel.org/r/20230214171505.224602-1-ahalaney@redhat.com Signed-off-by: Jakub Kicinski commit f58531716ced8975a4ade108ef4af35f98722af7 Author: Davide Caratti Date: Tue Feb 14 10:52:37 2023 +0100 selftests: forwarding: tc_actions: cleanup temporary files when test is aborted remove temporary files created by 'mirred_egress_to_ingress_tcp' test in the cleanup() handler. Also, change variable names to avoid clashing with globals from lib.sh. Suggested-by: Paolo Abeni Signed-off-by: Davide Caratti Link: https://lore.kernel.org/r/091649045a017fc00095ecbb75884e5681f7025f.1676368027.git.dcaratti@redhat.com Signed-off-by: Jakub Kicinski commit 1b8d1c5088efa5af881e8e78c80bd1197dc4c420 Author: Mengyuan Lou Date: Tue Feb 14 17:15:27 2023 +0800 net: wangxun: Add the basic ethtool interfaces Add the basic ethtool ops get_drvinfo and get_link for ngbe and txgbe. Ngbe implements get_link_ksettings, nway_reset and set_link_ksettings for free using phylib code. The code related to the physical interface is not yet fully implemented in txgbe using phylink code. So do not implement get_link_ksettings, nway_reset and set_link_ksettings in txgbe. Signed-off-by: Mengyuan Lou Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230214091527.69943-1-mengyuanlou@net-swift.com Signed-off-by: Jakub Kicinski commit 14ade6ba4120fb38fcb5033998882c5b3d591194 Author: Willem de Bruijn Date: Tue Feb 14 10:57:40 2023 -0500 net: msg_zerocopy: elide page accounting if RLIM_INFINITY MSG_ZEROCOPY ensures that pinned user pages do not exceed the limit. If no limit is set, skip this accounting as otherwise expensive atomic_long operations are called for no reason. This accounting is already skipped for privileged (CAP_IPC_LOCK) users. Rely on the same mechanism: if no mmp->user is set, mm_unaccount_pinned_pages does not decrement either. Tested by running tools/testing/selftests/net/msg_zerocopy.sh with an unprivileged user for the TXMODE binary: ip netns exec "${NS1}" sudo -u "{$USER}" "${BIN}" "-${IP}" ... Signed-off-by: Willem de Bruijn Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20230214155740.3448763-1-willemdebruijn.kernel@gmail.com Signed-off-by: Jakub Kicinski commit c24a34f5a3d7dec595635ad54167a8c471e4e24f Author: Oleksij Rempel Date: Wed Feb 15 06:04:53 2023 +0100 net: phy: c45: genphy_c45_an_config_aneg(): fix uninitialized symbol error Fix warning: drivers/net/phy/phy-c45.c:712 genphy_c45_write_eee_adv() error: uninitialized symbol 'changed' Reported-by: kernel test robot Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/202302150232.q6idsV8s-lkp@intel.com/ Fixes: 022c3f87f88e ("net: phy: add genphy_c45_ethtool_get/set_eee() support") Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230215050453.2251360-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit 9753613f7399601f9bae6ee81e9d4274246c98ab Author: Dan Carpenter Date: Wed Feb 15 07:21:47 2023 +0300 net: phy: motorcomm: uninitialized variables in yt8531_link_change_notify() These booleans are never set to false, but are just used without being initialized. Fixes: 4ac94f728a58 ("net: phy: Add driver for Motorcomm yt8531 gigabit ethernet phy") Signed-off-by: Dan Carpenter Reviewed-by: Frank Sae Link: https://lore.kernel.org/r/Y+xd2yJet2ImHLoQ@kili Signed-off-by: Jakub Kicinski commit 8658db0a4a0f84f50fe6643fe8665efe1a4bdb66 Author: Heiko Stuebner Date: Fri Jan 13 22:19:55 2023 +0100 RISC-V: move some stray __RISCV_INSN_FUNCS definitions from kprobes The __RISCV_INSN_FUNCS originally declared riscv_insn_is_* functions inside the kprobes implementation. This got moved into a central header in commit ec5f90877516 ("RISC-V: Move riscv_insn_is_* macros into a common header"). Though it looks like I overlooked two of them, so fix that. FENCE itself is an instruction defined directly by its own opcode, while the created riscv_isn_is_system function covers all instructions defined under the SYSTEM opcode. Reviewed-by: Conor Dooley Reviewed-by: Andrew Jones Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20230113211955.3534431-1-heiko@sntech.de Signed-off-by: Palmer Dabbelt commit 80c6d6804f31451848a3956a70c2bcb1f07cfcb0 Author: Aurabindo Pillai Date: Wed Feb 15 12:51:20 2023 -0500 drm/amd/display: disable SubVP + DRR to prevent underflow [Why&How] Temporarily disable SubVP+DRR since Xorg has an architectural limitation where freesync will not work in a multi monitor configuration. SubVP+DRR requires that freesync be working. Whether OS has variable refresh setting enabled or not, the state on the crtc remains same unless an application requests VRR. Due to this, there is no way to know whether freesync will actually work or not while we are on the desktop from the kernel's perspective. If userspace does not have a limitation with multi-display freesync (for example wayland), then this feature can be enabled by adding a dcfeaturemask option to amdgpu on the kernel cmdline like: amdgpu.dcfeaturemask=0x200 Signed-off-by: Aurabindo Pillai Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit ac0bb08d2cb711dc0e332f91c4e67783fcbe3439 Author: Leo Li Date: Thu Feb 9 12:15:21 2023 -0500 drm/amd/display: Fail atomic_check early on normalize_zpos error [Why] drm_atomic_normalize_zpos() can return an error code when there's modeset lock contention. This was being ignored. [How] Bail out of atomic check if normalize_zpos() returns an error. Fixes: b261509952bc ("drm/amd/display: Fix double cursor on non-video RGB MPO") Signed-off-by: Leo Li Tested-by: Mikhail Gavrilov Reviewed-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit f989fa298c0f57070dca9816439aa2e72f1bec8d Author: Jonathan Gray Date: Tue Feb 14 17:52:12 2023 +1100 drm/amd/pm: avoid unaligned access warnings When building on OpenBSD/arm64 with clang 15, unaligned access warnings are seen when a union is embedded inside a packed struct. drm/amd/pm/powerplay/hwmgr/vega20_pptable.h:136:17: error: field smcPPTable within 'struct _ATOM_VEGA20_POWERPLAYTABLE' is less aligned than 'PPTable_t' and is usually due to 'struct _ATOM_VEGA20_POWERPLAYTABLE' being packed, which can lead to unaligned accesses [-Werror,-Wunaligned-access] PPTable_t smcPPTable; ^ Make PPTable_t packed to avoid this. Signed-off-by: Jonathan Gray Signed-off-by: Alex Deucher commit 6e60cba666831e148d24b0aed783e1eb5bf99ff4 Author: Jonathan Gray Date: Tue Feb 14 17:49:44 2023 +1100 drm/amd/display: avoid unaligned access warnings When building on OpenBSD/arm64 with clang 15, unaligned access warnings are seen when a union is embedded inside a packed struct. drm/amd/display/dmub/inc/dmub_cmd.h:941:18: error: field cursor_copy_src within 'struct dmub_rb_cmd_mall' is less aligned than 'union dmub_addr' and is usually due to 'struct dmub_rb_cmd_mall' being packed, which can lead to unaligned accesses [-Werror,-Wunaligned-access] union dmub_addr cursor_copy_src; /**< Cursor copy address */ ^ drm/amd/display/dmub/inc/dmub_cmd.h:942:18: error: field cursor_copy_dst within 'struct dmub_rb_cmd_mall' is less aligned than 'union dmub_addr' and is usually due to 'struct dmub_rb_cmd_mall' being packed, which can lead to unaligned accesses [-Werror,-Wunaligned-access] union dmub_addr cursor_copy_dst; /**< Cursor copy destination */ ^ Add pragma pack around dmub_addr to avoid this. Signed-off-by: Jonathan Gray Signed-off-by: Alex Deucher commit e26b51c79bac2bd808c5b6472087011f7c7259a9 Author: Deepak R Varma Date: Fri Feb 10 15:30:43 2023 +0530 drm/amd/display: Remove duplicate/repeating expressions Remove duplicate or repeating expressions in the if condition evaluation. Issue identified using doubletest.cocci Coccinelle semantic patch. Reviewed-by: Harry Wentland Signed-off-by: Deepak R Varma Signed-off-by: Alex Deucher commit 0f19f514dea1837caff0b40c3e966ecedc95fec8 Merge: 388a9c907a514 72ed5d5624af3 Author: Jakub Kicinski Date: Wed Feb 15 19:24:52 2023 -0800 Merge tag 'mlx5-updates-2023-02-10' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2023-02-10 1) From Roi and Mark: MultiPort eswitch support MultiPort E-Switch builds on newer hardware's capabilities and introduces a mode where a single E-Switch is used and all the vports and physical ports on the NIC are connected to it. The new mode will allow in the future a decrease in the memory used by the driver and advanced features that aren't possible today. This represents a big change in the current E-Switch implantation in mlx5. Currently, by default, each E-Switch manager manages its E-Switch. Steering rules in each E-Switch can only forward traffic to the native physical port associated with that E-Switch. While there are ways to target non-native physical ports, for example using a bond or via special TC rules. None of the ways allows a user to configure the driver to operate by default in such a mode nor can the driver decide to move to this mode by default as it's user configuration-driven right now. While MultiPort E-Switch single FDB mode is the preferred mode, older generations of ConnectX hardware couldn't support this mode so it was never implemented. Now that there is capable hardware present, start the transition to having this mode by default. Introduce a devlink parameter to control MultiPort Eswitch single FDB mode. This will allow users to select this mode on their system right now and in the future will allow the driver to move to this mode by default. 2) From Jiri: Improvements and fixes for mlx5 netdev's devlink logic 2.1) Cleanups related to mlx5's devlink port logic 2.2) Move devlink port registration to be done before netdev alloc 2.3) Create auxdev devlink instance in the same ns as parent devlink 2.4) Suspend auxiliary devices only in case of PCI device suspend * tag 'mlx5-updates-2023-02-10' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5: Suspend auxiliary devices only in case of PCI device suspend net/mlx5: Remove "recovery" arg from mlx5_load_one() function net/mlx5e: Create auxdev devlink instance in the same ns as parent devlink net/mlx5e: Move devlink port registration to be done before netdev alloc net/mlx5e: Move dl_port to struct mlx5e_dev net/mlx5e: Replace usage of mlx5e_devlink_get_dl_port() by netdev->devlink_port net/mlx5e: Pass mdev to mlx5e_devlink_port_register() net/mlx5: Remove outdated comment net/mlx5e: TC, Remove redundant parse_attr argument net/mlx5e: Use a simpler comparison for uplink rep net/mlx5: Lag, Add single RDMA device in multiport mode net/mlx5: Lag, set different uplink vport metadata in multiport eswitch mode net/mlx5: E-Switch, rename bond update function to be reused net/mlx5e: TC, Add peer flow in mpesw mode net/mlx5: Lag, Control MultiPort E-Switch single FDB mode ==================== Link: https://lore.kernel.org/r/20230214221239.159033-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 578292aaecfea58cdae0f0b2275cfffc4d47f048 Author: Deepak R Varma Date: Fri Feb 10 15:41:51 2023 +0530 drm/amd/display: Remove duplicate/repeating expression Remove duplicate or repeating expressions in the if condition evaluation. Issue identified using doubletest.cocci Coccinelle semantic patch. Reviewed-by: Harry Wentland Signed-off-by: Deepak R Varma Signed-off-by: Alex Deucher commit 60b07cf5d3462ec0183d463b43619e98bc63c951 Author: Arthur Grillo Date: Mon Feb 13 17:49:22 2023 -0300 drm/amd/display: Make variables declaration inside ifdef guard Make variables declaration inside ifdef guard, as they are only used inside the same ifdef guard. This remove some of the -Wunused-but-set-variable warning. Signed-off-by: Arthur Grillo Signed-off-by: Alex Deucher commit 01543dcf99bdaba32178c7b40998778682f0305d Author: Arthur Grillo Date: Mon Feb 13 17:49:18 2023 -0300 drm/amd/display: Fix excess arguments on kernel-doc Remove arguments present on kernel-doc that are not present on the function declaration and add the new ones if present. Signed-off-by: Arthur Grillo Signed-off-by: Alex Deucher commit 8dc2507f4b24dc322da32dedab65d3d36979a79d Author: Arthur Grillo Date: Mon Feb 13 17:49:17 2023 -0300 drm/amd/display: Add previously missing includes Add includes that were previously missing to reduce the number of -Wmissing-prototypes warnings. Signed-off-by: Arthur Grillo Signed-off-by: Alex Deucher commit 877b57c6b550e44c348b2225ac61e550a64a9942 Author: Arthur Grillo Date: Mon Feb 13 17:49:16 2023 -0300 drm/amd/amdgpu: Add function prototypes to headers Add function prototypes to headers to reduce the number of -Wmissing-prototypes warnings. Signed-off-by: Arthur Grillo Signed-off-by: Alex Deucher commit 6884b0e4077676f21ebd310ac983d819ea109f89 Author: Arthur Grillo Date: Mon Feb 13 17:49:15 2023 -0300 drm/amd/display: Add function prototypes to headers Add function prototypes to headers to reduce the number of -Wmissing-prototypes warnings. Signed-off-by: Arthur Grillo Signed-off-by: Alex Deucher commit 1706d9a412e90959ba0b593ad3b9113a7c9c9b6c Author: Arthur Grillo Date: Mon Feb 13 17:49:14 2023 -0300 drm/amd/display: Turn global functions into static Turn global functions that are only used locally into static ones. This reduces the number of -Wmissing-prototypes warnings. Signed-off-by: Arthur Grillo Signed-off-by: Alex Deucher commit 9a13ff8f52dde1345f2e98468ce74fbb3be82970 Author: Melissa Wen Date: Tue Feb 14 11:14:06 2023 -0100 drm/amd/display: remove unused _calculate_degamma_curve function We don't use this function anywhere, therefore, remove it. Reviewed-by: Christian König Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit 62f9286fc26fb271529ca28e233df65662874900 Author: Melissa Wen Date: Tue Feb 14 11:14:05 2023 -0100 drm/amd/display: remove unused func declaration from resource headers The function resource_validate_ctx_update_pointer_after_copy() is declared in resource.h but never defined, therefore, remove its declaration from headers. Reviewed-by: Christian König Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit af54167d2b35be289a6aa98c0ebbb9bc38a1bdce Author: Melissa Wen Date: Tue Feb 14 11:14:04 2023 -0100 drm/amd/display: unset initial value for tf since it's never used In mod_color_calculate_{degamma/regamma}_params(), a tf variable is initialized as TRANSFER_FUNCTION_SRGB but tf is only used after tf = input->tf, therefore, better to just remove this initial value and avoid misleading interpretations. Reviewed-by: Christian König Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit 6ff387e889c48e0380e41ac6a5b06c71380110cd Author: Melissa Wen Date: Tue Feb 14 11:14:03 2023 -0100 drm/amd/display: camel case cleanup in color_gamma file Rename mapUserRamp to map_user_ramp and doClamping to do_clamping Reviewed-by: Christian König Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit 18c4e319db02c68237021ea7d3040ef3b21f09b9 Author: Lijo Lazar Date: Thu Jan 19 18:43:28 2023 +0530 drm/amd/pm: Allocate dummy table only if needed Only Navi1x requires dummy read workaround. Allocate the table in VRAM only for Navi1x. Signed-off-by: Lijo Lazar Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit d8f3b3951ff4db44cd4695c396e26160de789370 Author: Qingqing Zhuo Date: Wed Feb 15 01:40:40 2023 -0500 Revert "drm/amd/display: enable DPG when disabling plane for phantom pipe" This reverts commit d47d2f9392f69f069c31d60ac3088471b1e1c7d4. regression detected by the change. Revert until fix is available. Signed-off-by: Qingqing Zhuo Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 2f5d28ae2da563f209a964f65c7243403ef37dd0 Author: Aric Cyr Date: Sun Feb 5 13:36:54 2023 -0500 drm/amd/display: Promote DAL to 3.2.223 This version brings along the following: - Move domain power control to DMCUB for DCN314 - Enable P-state validation check for DCN314 - Add support for multiple overlay planes - Fixes in prefetch, k1 k2 divider programming and more - Code cleanup Acked-by: Qingqing Zhuo Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d2994b25e0787eabf7477ccb17b62c7f680809fa Author: Ayush Gupta Date: Fri Feb 3 12:39:14 2023 -0500 drm/amd/display: temporary fix for page faulting This reverts a part of the commit 826e7ffaf079c72607bf3199d4e19730eaf8ca00 ("drm/amd/display: [FW Promotion] Release 0.0.153.0") Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Ayush Gupta Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8e5cfe547bf3beeb29d9608be68d22dff2b5012b Author: Mustapha Ghaddar Date: Fri Jan 27 07:48:55 2023 -0500 drm/amd/display: upstream link_dp_dpia_bw.c [WHY & HOW] - make link_dp_dpia_bw.c available for linux. - add the verify link peak bw - clean up code and comment format. Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Mustapha Ghaddar Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b7c67f72408b11b922f23f06c7df0f6743a2e89d Author: Nicholas Kazlauskas Date: Thu Feb 2 15:15:51 2023 -0500 drm/amd/display: Disable HUBP/DPP PG on DCN314 for now [Why] The DMCUB implementation required to workaround corruption is not currently stable and may cause intermittent corruption or hangs. [How] Disable PG until the sequence is stable. Reviewed-by: Hansen Dsouza Acked-by: Qingqing Zhuo Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 94369589e4ec13c762fe10a1fdc4463bdfee5d5f Author: Melissa Wen Date: Tue Feb 14 11:14:02 2023 -0100 drm/amd/display: clean code-style issues in dcn30_set_mpc_shaper_3dlut This function has many conditions and all code style issues (identation, missing braces, etc.) make reading it really annoying. Reviewed-by: Christian König Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit f52231c4a8ae9b3154626c165d6127cf608ec0a3 Author: Melissa Wen Date: Tue Feb 14 11:14:01 2023 -0100 drm/amd/display: ident braces in dcn30_acquire_post_bldn_3dlut correctly Reviewed-by: Christian König Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit dc907c9db8f71e3ba5faad6038f089a70d18e71f Author: Jack Xiao Date: Fri Feb 10 10:31:32 2023 +0800 drm/amd/amdgpu: fix warning during suspend Freeing memory was warned during suspend. Move the self test out of suspend. Link: https://bugzilla.redhat.com/show_bug.cgi?id=2151825 Cc: jfalempe@redhat.com Signed-off-by: Jack Xiao Reviewed-by: Christian König Reviewed-by: Feifei Xu Reviewed-and-tested-by: Evan Quan Tested-by: Jocelyn Falempe Signed-off-by: Alex Deucher commit 388a9c907a51489bf566165c72e4e8aa4d62ab49 Merge: b6a4103c3538d d0ab772c1f155 Author: Jakub Kicinski Date: Wed Feb 15 19:15:45 2023 -0800 Merge branch 'devlink-cleanups-and-move-devlink-health-functionality-to-separate-file' Moshe Shemesh says: ==================== devlink: cleanups and move devlink health functionality to separate file This patchset moves devlink health callbacks, helpers and related code from leftover.c to new file health.c. About 1.3K LoC are moved by this patchset, covering all devlink health functionality. In addition this patchset includes a couple of small cleanups in devlink health code and documentation update. ==================== Link: https://lore.kernel.org/r/1676392686-405892-1-git-send-email-moshe@nvidia.com Signed-off-by: Jakub Kicinski commit d0ab772c1f1558af84f3293a52e9e886e08e0754 Author: Moshe Shemesh Date: Tue Feb 14 18:38:06 2023 +0200 devlink: Fix TP_STRUCT_entry in trace of devlink health report Fix a bug in trace point definition for devlink health report, as TP_STRUCT_entry of reporter_name should get reporter_name and not msg. Note no fixes tag as this is a harmless bug as both reporter_name and msg are strings and TP_fast_assign for this entry is correct. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit c745cfb27ae3eec2d16e1f8643338f2067d4fef8 Author: Moshe Shemesh Date: Tue Feb 14 18:38:05 2023 +0200 devlink: Update devlink health documentation Update devlink-health.rst file: - Add devlink formatted message (fmsg) API documentation. - Add auto-dump as a condition to do dump once error reported. - Expand OOB to clarify this acronym. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko Reviewed-by: Jakub Kicinski Signed-off-by: Jakub Kicinski commit 12af29e7790af811611409194f61d054e54365b9 Author: Moshe Shemesh Date: Tue Feb 14 18:38:04 2023 +0200 devlink: Move health common function to health file Now that all devlink health callbacks and related code are in file health.c move common health functions and devlink_health_reporter struct to be local in health.c file. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko Reviewed-by: Jakub Kicinski Signed-off-by: Jakub Kicinski commit c9311ee13f0ebd6d684793f88b91092672c21171 Author: Moshe Shemesh Date: Tue Feb 14 18:38:03 2023 +0200 devlink: Move devlink health test to health file Move devlink health report test callback from leftover.c to health.c. No functional change in this patch. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko Reviewed-by: Jakub Kicinski Signed-off-by: Jakub Kicinski commit 7004c6c45761143836d3c8122d91264320d87e8e Author: Moshe Shemesh Date: Tue Feb 14 18:38:02 2023 +0200 devlink: Move devlink health dump to health file Move devlink health report dump callbacks and related code from leftover.c to health.c. No functional change in this patch. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko Reviewed-by: Jakub Kicinski Signed-off-by: Jakub Kicinski commit a929df7fd9c6fbfb4ebbed7c9cf96657e9f622b6 Author: Moshe Shemesh Date: Tue Feb 14 18:38:01 2023 +0200 devlink: Move devlink fmsg and health diagnose to health file Devlink fmsg (formatted message) is used by devlink health diagnose, dump and drivers which support these devlink health callbacks. Therefore, move devlink fmsg helpers and related code to file health.c. Move devlink health diagnose to file health.c. No functional change in this patch. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko Reviewed-by: Jakub Kicinski Signed-off-by: Jakub Kicinski commit 55b9b249685214cc700113e6b677b78d2c0b97f9 Author: Moshe Shemesh Date: Tue Feb 14 18:38:00 2023 +0200 devlink: Move devlink health report and recover to health file Move devlink health report helper and recover callback and related code from leftover.c to health.c. No functional change in this patch. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko Reviewed-by: Jakub Kicinski Signed-off-by: Jakub Kicinski commit db6b5f3ec400479c0906be6884c9ecceaf0b8c46 Author: Moshe Shemesh Date: Tue Feb 14 18:37:59 2023 +0200 devlink: Move devlink health get and set code to health file Move devlink health get and set callbacks and related code from leftover.c to health.c. No functional change in this patch. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko Reviewed-by: Jakub Kicinski Signed-off-by: Jakub Kicinski commit bfd4e6a5dbbc12f77620602e764ac940ccb159de Author: Moshe Shemesh Date: Tue Feb 14 18:37:58 2023 +0200 devlink: health: Fix nla_nest_end in error flow devlink_nl_health_reporter_fill() error flow calls nla_nest_end(). Fix it to call nla_nest_cancel() instead. Note the bug is harmless as genlmsg_cancel() cancel the entire message, so no fixes tag added. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko Reviewed-by: Jakub Kicinski Signed-off-by: Jakub Kicinski commit b4740e3a8137faa5831c690d0bf0b46f41008baf Author: Moshe Shemesh Date: Tue Feb 14 18:37:57 2023 +0200 devlink: Split out health reporter create code Move devlink health reporter create/destroy and related dev code to new file health.c. This file shall include all callbacks and functionality that are related to devlink health. In addition, fix kdoc indentation and make reporter create/destroy kdoc more clear. No functional change in this patch. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit b6a4103c3538dec0a9ec8a6d1de7c009e428e7ab Author: Lorenzo Bianconi Date: Tue Feb 14 15:39:27 2023 +0100 ice: update xdp_features with xdp multi-buff Now ice driver supports xdp multi-buffer so add it to xdp_features. Check vsi type before setting xdp_features flag. Signed-off-by: Lorenzo Bianconi Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/8a4781511ab6e3cd280e944eef69158954f1a15f.1676385351.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski commit 9dd6e53ef63dd384d63263ab9ef3a23471f1cd13 Author: Lorenzo Bianconi Date: Tue Feb 14 21:07:33 2023 +0100 i40e: check vsi type before setting xdp_features flag Set xdp_features flag just for I40E_VSI_MAIN vsi type since XDP is supported just in this configuration. Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/f2b537f86b34fc176fbc6b3d249b46a20a87a2f3.1676405131.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski commit 6c20822fada1b8adb77fa450d03a0d449686a4a9 Author: Alexander Lobakin Date: Wed Feb 15 19:54:40 2023 +0100 bpf, test_run: fix &xdp_frame misplacement for LIVE_FRAMES &xdp_buff and &xdp_frame are bound in a way that xdp_buff->data_hard_start == xdp_frame It's always the case and e.g. xdp_convert_buff_to_frame() relies on this. IOW, the following: for (u32 i = 0; i < 0xdead; i++) { xdpf = xdp_convert_buff_to_frame(&xdp); xdp_convert_frame_to_buff(xdpf, &xdp); } shouldn't ever modify @xdpf's contents or the pointer itself. However, "live packet" code wrongly treats &xdp_frame as part of its context placed *before* the data_hard_start. With such flow, data_hard_start is sizeof(*xdpf) off to the right and no longer points to the XDP frame. Instead of replacing `sizeof(ctx)` with `offsetof(ctx, xdpf)` in several places and praying that there are no more miscalcs left somewhere in the code, unionize ::frm with ::data in a flex array, so that both starts pointing to the actual data_hard_start and the XDP frame actually starts being a part of it, i.e. a part of the headroom, not the context. A nice side effect is that the maximum frame size for this mode gets increased by 40 bytes, as xdp_buff::frame_sz includes everything from data_hard_start (-> includes xdpf already) to the end of XDP/skb shared info. Also update %MAX_PKT_SIZE accordingly in the selftests code. Leave it hardcoded for 64 bit && 4k pages, it can be made more flexible later on. Minor: align `&head->data` with how `head->frm` is assigned for consistency. Minor #2: rename 'frm' to 'frame' in &xdp_page_head while at it for clarity. (was found while testing XDP traffic generator on ice, which calls xdp_convert_frame_to_buff() for each XDP frame) Fixes: b530e9e1063e ("bpf: Add "live packet" mode for XDP in BPF_PROG_RUN") Acked-by: Toke Høiland-Jørgensen Signed-off-by: Alexander Lobakin Link: https://lore.kernel.org/r/20230215185440.4126672-1-aleksander.lobakin@intel.com Signed-off-by: Martin KaFai Lau commit b4ff830eca097df51af10a9be29e8cc817327919 Author: Jason Gunthorpe Date: Mon Feb 13 14:02:42 2023 -0400 iommufd: Do not add the same hwpt to the ioas->hwpt_list twice The hwpt is added to the hwpt_list only during its creation, it is never added again. This hunk is some missed leftover from rework. Adding it twice will corrupt the linked list in some cases. It effects HWPT specific attachment, which is something the test suite cannot cover until we can create a legitimate struct device with a non-system iommu "driver" (ie we need the bus removed from the iommu code) Cc: stable@vger.kernel.org Fixes: e8d57210035b ("iommufd: Add kAPI toward external drivers for physical devices") Link: https://lore.kernel.org/r/1-v1-4336b5cb2fe4+1d7-iommufd_hwpt_jgg@nvidia.com Reviewed-by: Kevin Tian Reported-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit 8261ef2eb35fce689a82d346b25e945e16bcb9d3 Author: Steven Rostedt (Google) Date: Wed Feb 15 20:25:38 2023 -0500 tracing: Add BUILD_BUG() to make sure stacktrace fits in strings The max string length for a histogram variable is 256 bytes. The max depth of a stacktrace is 16. With 8byte words, that's 16 * 8 = 128. Which can easily fit in the string variable. The histogram stacktrace is being stored in the string value (with the given max length), with the assumption it will fit. To make sure that this is always the case (in the case that the stack trace depth increases), add a BUILD_BUG_ON() to test this. Link: https://lore.kernel.org/linux-trace-kernel/20230214002418.0103b9e765d3e5c374d2aa7d@kernel.org/ Signed-off-by: Steven Rostedt (Google) commit fc1a9dc101292403babe0c5c2f99f4748580ed98 Author: Tom Zanussi Date: Fri Feb 10 15:33:03 2023 -0600 tracing/histogram: Don't use strlen to find length of stacktrace variables Because stacktraces are saved in dynamic strings, trace_event_raw_event_synth() uses strlen to determine the length of the stack. Stacktraces may contain 0-bytes, though, in the saved addresses, so the length found and passed to reserve() will be too small. Fix this by using the first unsigned long in the stack variables to store the actual number of elements in the stack and have trace_event_raw_event_synth() use that to determine the length of the stack. Link: https://lkml.kernel.org/r/1ed6906cd9d6477ef2bd8e63c61de20a9ffe64d7.1676063532.git.zanussi@kernel.org Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (Google) commit d964f09af457f79be637a50e726d4bda7f443349 Merge: 3538a0fbbd81b f371f2dc53d10 Author: Andrii Nakryiko Date: Wed Feb 15 16:29:32 2023 -0800 Merge branch 'New benchmark for hashmap lookups' Anton Protopopov says: ==================== Add a new benchmark for hashmap lookups and fix several typos. In commit 3 I've patched the bench utility so that now command line options can be reused by different benchmarks. The benchmark itself is added in the last commit 7. I was using this benchmark to test map lookup productivity when using a different hash function [1]. When run with --quiet, the results can be easily plotted [2]. The results provided by the benchmark look reasonable and match the results of my different benchmarks (requiring to patch kernel to get actual statistics on map lookups). Links: [1] https://fosdem.org/2023/schedule/event/bpf_hashing/ [2] https://github.com/aspsk/bpf-bench/tree/master/hashmap-bench Changes, v1->v2: - percpu_times_index[] is of wrong size (Martin) - use base 0 for strtol (Andrii) - just use -q without argument (Andrii) - use less hacks when parsing arguments (Andrii) ==================== Signed-off-by: Andrii Nakryiko commit f371f2dc53d107af25171f29c852a3908ee0afb6 Author: Anton Protopopov Date: Mon Feb 13 09:15:19 2023 +0000 selftest/bpf/benchs: Add benchmark for hashmap lookups Add a new benchmark which measures hashmap lookup operations speed. A user can control the following parameters of the benchmark: * key_size (max 1024): the key size to use * max_entries: the hashmap max entries * nr_entries: the number of entries to insert/lookup * nr_loops: the number of loops for the benchmark * map_flags The hashmap flags passed to BPF_MAP_CREATE The BPF program performing the benchmarks calls two nested bpf_loop: bpf_loop(nr_loops/nr_entries) bpf_loop(nr_entries) bpf_map_lookup() So the nr_loops determines the number of actual map lookups. All lookups are successful. Example (the output is generated on a AMD Ryzen 9 3950X machine): for nr_entries in `seq 4096 4096 65536`; do echo -n "$((nr_entries*100/65536))% full: "; sudo ./bench -d2 -a bpf-hashmap-lookup --key_size=4 --nr_entries=$nr_entries --max_entries=65536 --nr_loops=1000000 --map_flags=0x40 | grep cpu; done 6% full: cpu01: lookup 50.739M ± 0.018M events/sec (approximated from 32 samples of ~19ms) 12% full: cpu01: lookup 47.751M ± 0.015M events/sec (approximated from 32 samples of ~20ms) 18% full: cpu01: lookup 45.153M ± 0.013M events/sec (approximated from 32 samples of ~22ms) 25% full: cpu01: lookup 43.826M ± 0.014M events/sec (approximated from 32 samples of ~22ms) 31% full: cpu01: lookup 41.971M ± 0.012M events/sec (approximated from 32 samples of ~23ms) 37% full: cpu01: lookup 41.034M ± 0.015M events/sec (approximated from 32 samples of ~24ms) 43% full: cpu01: lookup 39.946M ± 0.012M events/sec (approximated from 32 samples of ~25ms) 50% full: cpu01: lookup 38.256M ± 0.014M events/sec (approximated from 32 samples of ~26ms) 56% full: cpu01: lookup 36.580M ± 0.018M events/sec (approximated from 32 samples of ~27ms) 62% full: cpu01: lookup 36.252M ± 0.012M events/sec (approximated from 32 samples of ~27ms) 68% full: cpu01: lookup 35.200M ± 0.012M events/sec (approximated from 32 samples of ~28ms) 75% full: cpu01: lookup 34.061M ± 0.009M events/sec (approximated from 32 samples of ~29ms) 81% full: cpu01: lookup 34.374M ± 0.010M events/sec (approximated from 32 samples of ~29ms) 87% full: cpu01: lookup 33.244M ± 0.011M events/sec (approximated from 32 samples of ~30ms) 93% full: cpu01: lookup 32.182M ± 0.013M events/sec (approximated from 32 samples of ~31ms) 100% full: cpu01: lookup 31.497M ± 0.016M events/sec (approximated from 32 samples of ~31ms) Signed-off-by: Anton Protopopov Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230213091519.1202813-8-aspsk@isovalent.com commit a237dda05e9101404a634ac53ee65c8f8c8fce58 Author: Anton Protopopov Date: Mon Feb 13 09:15:18 2023 +0000 selftest/bpf/benchs: Print less if the quiet option is set The bench utility will print Setting up benchmark ''... Benchmark '' started. on startup to stdout. Suppress this output if --quiet option if given. This makes it simpler to parse benchmark output by a script. Signed-off-by: Anton Protopopov Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230213091519.1202813-7-aspsk@isovalent.com commit 90c22503cd8910c54a8cd4bfe5bb6873d9ba8e0b Author: Anton Protopopov Date: Mon Feb 13 09:15:17 2023 +0000 selftest/bpf/benchs: Make quiet option common The "local-storage-tasks-trace" benchmark has a `--quiet` option. Move it to the list of common options, so that the main code and other benchmarks can use (new) env.quiet variable. Patch the run_bench_local_storage_rcu_tasks_trace.sh helper script accordingly. Signed-off-by: Anton Protopopov Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230213091519.1202813-6-aspsk@isovalent.com commit 9644546260eac49348b2c0694b01bdf72c627194 Author: Anton Protopopov Date: Mon Feb 13 09:15:16 2023 +0000 selftest/bpf/benchs: Remove an unused header The benchs/bench_bpf_hashmap_full_update.c doesn't set a custom argp, so it shouldn't include the header. Signed-off-by: Anton Protopopov Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230213091519.1202813-5-aspsk@isovalent.com commit 22ff7aeaa9e3d0533df613da3500db1ecf452253 Author: Anton Protopopov Date: Mon Feb 13 09:15:15 2023 +0000 selftest/bpf/benchs: Enhance argp parsing To parse command line the bench utility uses the argp_parse() function. This function takes as an argument a parent 'struct argp' structure which defines common command line options and an array of children 'struct argp' structures which defines additional command line options for particular benchmarks. This implementation doesn't allow benchmarks to share option names, e.g., if two benchmarks want to use, say, the --option option, then only one of them will succeed (the first one encountered in the array). This will be convenient if same option names could be used in different benchmarks (with the same semantics, e.g., --nr_loops=N). Fix this by calling the argp_parse() function twice. The first call is the same as it was before, with all children argps, and helps to find the benchmark name and to print a combined help message if anything is wrong. Given the name, we can call the argp_parse the second time, but now the children array points only to a correct benchmark thus always calling the correct parsers. (If there's no a specific list of arguments, then only one call to argp_parse will be done.) Signed-off-by: Anton Protopopov Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230213091519.1202813-4-aspsk@isovalent.com commit 2f1c59637fb17dbb2a725c3bd48e4d9d3809df89 Author: Anton Protopopov Date: Mon Feb 13 09:15:14 2023 +0000 selftest/bpf/benchs: Make a function static in bpf_hashmap_full_update The hashmap_report_final callback function defined in the benchs/bench_bpf_hashmap_full_update.c file should be static. Signed-off-by: Anton Protopopov Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230213091519.1202813-3-aspsk@isovalent.com commit 4db98ab445c58bd26c303ef7a10ccd8f049acc22 Author: Anton Protopopov Date: Mon Feb 13 09:15:13 2023 +0000 selftest/bpf/benchs: Fix a typo in bpf_hashmap_full_update To call the bpf_hashmap_full_update benchmark, one should say: bench bpf-hashmap-ful-update The patch adds a missing 'l' to the benchmark name. Signed-off-by: Anton Protopopov Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230213091519.1202813-2-aspsk@isovalent.com commit 3538a0fbbd81bc131afe48b4cf02895735944359 Merge: b2d9002ee9a65 f88da2d46cc9a Author: Alexei Starovoitov Date: Wed Feb 15 15:40:06 2023 -0800 Merge branch 'Use __GFP_ZERO in bpf memory allocator' Hou Tao says: ==================== From: Hou Tao Hi, The patchset tries to fix the hard-up problem found when checking how htab handles element reuse in bpf memory allocator. The immediate reuse of freed elements will reinitialize special fields (e.g., bpf_spin_lock) in htab map value and it may corrupt lookup procedure with BFP_F_LOCK flag which acquires bpf-spin-lock during value copying, and lead to hard-lock as shown in patch #2. Patch #1 fixes it by using __GFP_ZERO when allocating the object from slab and the behavior is similar with the preallocated hash-table case. Please see individual patches for more details. And comments are always welcome. Regards, Change Log: v1: * Use __GFP_ZERO instead of ctor to avoid retpoline overhead (from Alexei) * Add comments for check_and_init_map_value() (from Alexei) * split __GFP_ZERO patches out of the original patchset to unblock the development work of others. RFC: https://lore.kernel.org/bpf/20221230041151.1231169-1-houtao@huaweicloud.com ==================== Signed-off-by: Alexei Starovoitov commit f88da2d46cc9a19b0c233285339659cae36c5d9a Author: Hou Tao Date: Wed Feb 15 16:21:32 2023 +0800 selftests/bpf: Add test case for element reuse in htab map The reinitialization of spin-lock in map value after immediate reuse may corrupt lookup with BPF_F_LOCK flag and result in hard lock-up, so add one test case to demonstrate the problem. Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20230215082132.3856544-3-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 997849c4b969034e225153f41026657def66d286 Author: Hou Tao Date: Wed Feb 15 16:21:31 2023 +0800 bpf: Zeroing allocated object from slab in bpf memory allocator Currently the freed element in bpf memory allocator may be immediately reused, for htab map the reuse will reinitialize special fields in map value (e.g., bpf_spin_lock), but lookup procedure may still access these special fields, and it may lead to hard-lockup as shown below: NMI backtrace for cpu 16 CPU: 16 PID: 2574 Comm: htab.bin Tainted: G L 6.1.0+ #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), RIP: 0010:queued_spin_lock_slowpath+0x283/0x2c0 ...... Call Trace: copy_map_value_locked+0xb7/0x170 bpf_map_copy_value+0x113/0x3c0 __sys_bpf+0x1c67/0x2780 __x64_sys_bpf+0x1c/0x20 do_syscall_64+0x30/0x60 entry_SYSCALL_64_after_hwframe+0x46/0xb0 ...... For htab map, just like the preallocated case, these is no need to initialize these special fields in map value again once these fields have been initialized. For preallocated htab map, these fields are initialized through __GFP_ZERO in bpf_map_area_alloc(), so do the similar thing for non-preallocated htab in bpf memory allocator. And there is no need to use __GFP_ZERO for per-cpu bpf memory allocator, because __alloc_percpu_gfp() does it implicitly. Fixes: 0fd7c5d43339 ("bpf: Optimize call_rcu in non-preallocated hash map.") Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20230215082132.3856544-2-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 748ea32d2dbd813d3bd958117bde5191182f909a Author: Nathan Chancellor Date: Wed Feb 15 10:12:12 2023 -0700 macintosh: windfarm: Use unsigned type for 1-bit bitfields Clang warns: drivers/macintosh/windfarm_lm75_sensor.c:63:14: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] lm->inited = 1; ^ ~ drivers/macintosh/windfarm_smu_sensors.c:356:19: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] pow->fake_volts = 1; ^ ~ drivers/macintosh/windfarm_smu_sensors.c:368:18: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] pow->quadratic = 1; ^ ~ There is no bug here since no code checks the actual value of these fields, just whether or not they are zero (boolean context), but this can be easily fixed by switching to an unsigned type. Signed-off-by: Nathan Chancellor Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230215-windfarm-wsingle-bit-bitfield-constant-conversion-v1-1-26415072e855@kernel.org commit 7fde88eda855952766a74026c181c6270b3392fc Author: David Rau Date: Wed Feb 15 10:10:45 2023 +0000 ASoC: da7219: Improve the IRQ process to increase the stability Remove the sleep control in IRQ thread and create an individual task to handel it for Jack plug in event. This commit improves the control of ground switches in the AAD IRQ. Signed-off-by: David Rau Link: https://lore.kernel.org/r/20230215101045.21456-1-David.Rau.opensource@dm.renesas.com Signed-off-by: Mark Brown commit c142872ea40a99258e2a86bf5c471bcc81752f56 Author: Arnd Bergmann Date: Wed Feb 15 13:47:08 2023 +0100 power: reset: odroid-go-ultra: fix I2C dependency Since this driver can only be built-in, it fails to link when the I2C layer is in a loadable module: x86_64-linux-ld: drivers/power/reset/odroid-go-ultra-poweroff.o: in function `odroid_go_ultra_poweroff_get_pmic_device': odroid-go-ultra-poweroff.c:(.text+0x30): undefined reference to `i2c_find_device_by_fwnode' Tighten the dependency to only allow enabling POWER_RESET_ODROID_GO_ULTRA_POWEROFF is I2C is built-in as well. Fixes: cec3b46b8bda ("power: reset: add Odroid Go Ultra poweroff driver") Signed-off-by: Arnd Bergmann Acked-by: Neil Armstrong Signed-off-by: Sebastian Reichel commit 9de10a51b0c6e7c1ca99a65c043243597002202e Author: Thomas Weißschuh Date: Wed Feb 15 01:12:55 2023 +0000 power: supply: leds: 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 Signed-off-by: Sebastian Reichel commit 97b7cea04f52c3263a74b945a4738f678181b117 Author: Dan Carpenter Date: Wed Feb 15 17:05:20 2023 +0300 spi: bcm63xx-hsspi: fix error code in probe This code accidentally returns success instead of a negative error code. Fixes: 50a6620dd1fb ("spi: bcm63xx-hsspi: Add polling mode support") Signed-off-by: Dan Carpenter Reviewed-by: William Zhang Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/Y+zmoGH6LubPhiI0@kili Signed-off-by: Mark Brown commit 0696532e12524855fa8044590d374079f271f216 Author: Dan Carpenter Date: Wed Feb 15 17:05:32 2023 +0300 spi: bcmbca-hsspi: Fix error code in probe() function This code accidentally returns success instead of a negative error code. Fixes: a38a2233f23b ("spi: bcmbca-hsspi: Add driver for newer HSSPI controller") Signed-off-by: Dan Carpenter Reviewed-by: Florian Fainelli Reviewed-by: William Zhang Link: https://lore.kernel.org/r/Y+zmrNJ9zjNQpzWq@kili Signed-off-by: Mark Brown commit b2b911afd86631e601537c7dd7bb0acc0b1f9b51 Author: Konrad Dybcio Date: Tue Feb 14 10:08:48 2023 +0100 dt-bindings: power: supply: pm8941-coincell: Don't require charging properties It's fine for these properties to be absent, as the driver doesn't fail without them and functions with settings inherited from the reset/previous stage bootloader state. Fixes: 6c463222a21d ("dt-bindings: power: supply: pm8941-coincell: Convert to DT schema format") Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit b8ad34ce75a2e029946d7bf6832c363ce5578e39 Author: Konrad Dybcio Date: Tue Feb 14 10:08:47 2023 +0100 dt-bindings: power: supply: pm8941-coincell: Add PM8998 compatible Add a specific compatible for the coincell charger present on PM8998. Acked-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Signed-off-by: Sebastian Reichel commit 25eba1598c8e1e804c02e3a0da50782c50c11c41 Author: Cristian Ciocaltea Date: Thu Feb 9 21:37:35 2023 +0200 dt-bindings: Fix multi pattern support in DT_SCHEMA_FILES DT_SCHEMA_FILES used to allow specifying a space separated list of file paths, but the introduction of partial matches support broke this feature: $ make dtbs_check DT_SCHEMA_FILES="path/to/schema1.yaml path/to/schema2.yaml" [...] LINT Documentation/devicetree/bindings usage: yamllint [-h] [-] [-c CONFIG_FILE | -d CONFIG_DATA] [--list-files] [...] [-v] [FILE_OR_DIR ...] yamllint: error: one of the arguments FILE_OR_DIR - is required [...] Restore the lost functionality by preparing a grep filter that is able to handle multiple search patterns. Additionally, as suggested by Rob, use ':' instead of ' ' as the patterns separator char. Hence, the command above becomes: $ make dtbs_check DT_SCHEMA_FILES="path/to/schema1.yaml:path/to/schema2.yaml" Fixes: 309d955985ee ("dt-bindings: kbuild: Support partial matches with DT_SCHEMA_FILES") Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230209193735.795288-1-cristian.ciocaltea@collabora.com Signed-off-by: Rob Herring commit aeb9267eb6b1df992e39467a620da8fdf434df54 Author: Martin Liu Date: Fri Feb 10 00:09:55 2023 +0800 of: reserved-mem: print out reserved-mem details during boot It's important to know reserved-mem information in mobile world since reserved memory via device tree keeps increased in platform (e.g., 45% in our platform). Therefore, it's crucial to know the reserved memory sizes breakdown for the memory accounting. This patch prints out reserved memory details during boot to make them visible. Below is an example output: [ 0.000000] OF: reserved mem: 0x00000009f9400000..0x00000009fb3fffff ( 32768 KB ) map reusable test1 [ 0.000000] OF: reserved mem: 0x00000000ffdf0000..0x00000000ffffffff ( 2112 KB ) map non-reusable test2 [ 0.000000] OF: reserved mem: 0x0000000091000000..0x00000000912fffff ( 3072 KB ) nomap non-reusable test3 Signed-off-by: Martin Liu Link: https://lore.kernel.org/r/20230209160954.1471909-1-liumartin@google.com Signed-off-by: Rob Herring commit 74ff8864cc842be994853095dba6db48e716400a Author: Lukas Wunner Date: Fri Jan 20 10:19:02 2023 +0100 PCI: hotplug: Allow marking devices as disconnected during bind/unbind On surprise removal, pciehp_unconfigure_device() and acpiphp's trim_stale_devices() call pci_dev_set_disconnected() to mark removed devices as permanently offline. Thereby, the PCI core and drivers know to skip device accesses. However pci_dev_set_disconnected() takes the device_lock and thus waits for a concurrent driver bind or unbind to complete. As a result, the driver's ->probe and ->remove hooks have no chance to learn that the device is gone. That doesn't make any sense, so drop the device_lock and instead use atomic xchg() and cmpxchg() operations to update the device state. As a byproduct, an AB-BA deadlock reported by Anatoli is fixed which occurs on surprise removal with AER concurrently performing a bus reset. AER bus reset: INFO: task irq/26-aerdrv:95 blocked for more than 120 seconds. Tainted: G W 6.2.0-rc3-custom-norework-jan11+ schedule rwsem_down_write_slowpath down_write_nested pciehp_reset_slot # acquires reset_lock pci_reset_hotplug_slot pci_slot_reset # acquires device_lock pci_bus_error_reset aer_root_reset pcie_do_recovery aer_process_err_devices aer_isr pciehp surprise removal: INFO: task irq/26-pciehp:96 blocked for more than 120 seconds. Tainted: G W 6.2.0-rc3-custom-norework-jan11+ schedule_preempt_disabled __mutex_lock mutex_lock_nested pci_dev_set_disconnected # acquires device_lock pci_walk_bus pciehp_unconfigure_device pciehp_disable_slot pciehp_handle_presence_or_link_change pciehp_ist # acquires reset_lock Link: https://bugzilla.kernel.org/show_bug.cgi?id=215590 Fixes: a6bd101b8f84 ("PCI: Unify device inaccessible") Link: https://lore.kernel.org/r/3dc88ea82bdc0e37d9000e413d5ebce481cbd629.1674205689.git.lukas@wunner.de Reported-by: Anatoli Antonovitch Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org # v4.20+ Cc: Keith Busch commit d2ad8f0c89e2a002293aa53a628e9600453a0a53 Merge: a06377c5d01ee b6c0c237bea19 Author: Jens Axboe Date: Wed Feb 15 13:47:57 2023 -0700 Merge tag 'nvme-6.3-2023-02-15' of git://git.infradead.org/nvme into for-6.3/block Pull NVMe fixes from Christoph: "nvme fixes for Linux 6.3 - fix and cleanup freeing single sgl (Keith Busch)" * tag 'nvme-6.3-2023-02-15' of git://git.infradead.org/nvme: nvme-pci: remove iod use_sgls nvme-pci: fix freeing single sgl commit 38bd413638b245246fb35b5e94c63e0f0b791256 Author: Randy Dunlap Date: Sat Jan 28 11:21:09 2023 -0800 Documentation: i2c: correct spelling Correct spelling problems for Documentation/i2c/ as reported by codespell. Signed-off-by: Randy Dunlap Signed-off-by: Wolfram Sang commit b3de755d6041ebb197d89a4dcb27c85521e034c8 Author: Alain Volmat Date: Mon Feb 13 20:16:06 2023 +0100 dt-bindings: i2c: i2c-st: convert to DT schema Convert i2c-st.txt into st,sti-i2c.yaml for the i2c-st driver. Signed-off-by: Alain Volmat Reviewed-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang commit b2d9002ee9a65aa0eaf01ae494876fe16389d535 Merge: 62d101d5f422c 2a33c5a25ef4f Author: Alexei Starovoitov Date: Wed Feb 15 11:48:48 2023 -0800 Merge branch 'Improvements for BPF_ST tracking by verifier ' Eduard Zingerman says: ==================== This patch-set is a part of preparation work for -mcpu=v4 option for BPF C compiler (discussed in [1]). Among other things -mcpu=v4 should enable generation of BPF_ST instruction by the compiler. - Patches #1,2 adjust verifier to track values of constants written to stack using BPF_ST. Currently these are tracked imprecisely, unlike the writes using BPF_STX, e.g.: fp[-8] = 42; currently verifier assumes that fp[-8]=mmmmmmmm after such instruction, where m stands for "misc", just a note that something is written at fp[-8]. r1 = 42; verifier tracks r1=42 after this instruction. fp[-8] = r1; verifier tracks fp[-8]=42 after this instruction. This patch makes both cases equivalent. - Patches #3,4 adjust verifier.c:check_stack_write_fixed_off() to preserve STACK_ZERO marks when BPF_ST writes zero. Currently these are replaced by STACK_MISC, unlike zero writes using BPF_STX, e.g.: ... stack range [X,Y] is marked as STACK_ZERO ... r0 = ... variable offset pointer to stack with range [X,Y] ... fp[r0] = 0; currently verifier marks range [X,Y] as STACK_MISC for such instructions. r1 = 0; fp[r0] = r1; verifier keeps STACK_ZERO marks for range [X,Y]. This patch makes both cases equivalent. Motivating example for patch #1 could be found at [3]. Previous version of the patch-set is here [2], the changes are: - Explicit initialization of fake register parent link is removed from verifier.c:check_stack_write_fixed_off() as parent links are now correctly handled by verifier.c:save_register_state(). - Original patch #1 is split in patches #1 & #3. - Missing test case added for patch #3 verifier.c:check_stack_write_fixed_off() adjustment. - Test cases are updated to use .prog_type = BPF_PROG_TYPE_SK_LOOKUP, which requires return value to be in the range [0,1] (original test cases assumed that such range is always required, which is not true). - Original patch #3 with changes allowing BPF_ST writes to context is withheld for now, w/o compiler support for BPF_ST it requires some creative testing. - Original patch #5 is removed from the patch-set. This patch contained adjustments to expected verifier error messages in some tests, necessary when C compiler generates BPF_ST instruction instead of BPF_STX (changes to expected instruction indices). These changes are not necessary yet. [1] https://lore.kernel.org/bpf/01515302-c37d-2ee5-c950-2f556a4caad0@meta.com/ [2] https://lore.kernel.org/bpf/20221231163122.1360813-1-eddyz87@gmail.com/ [3] https://lore.kernel.org/bpf/f1e4282bf00aa21a72fc5906f8c3be1ae6c94a5e.camel@gmail.com/ ==================== Signed-off-by: Alexei Starovoitov commit 2a33c5a25ef4fb574e6744fe7636956b124ad78f Author: Eduard Zingerman Date: Wed Feb 15 01:20:30 2023 +0200 selftests/bpf: check if BPF_ST with variable offset preserves STACK_ZERO A test case to verify that variable offset BPF_ST instruction preserves STACK_ZERO marks when writes zeros, e.g. in the following situation: *(u64*)(r10 - 8) = 0 ; STACK_ZERO marks for fp[-8] r0 = random(-7, -1) ; some random number in range of [-7, -1] r0 += r10 ; r0 is now variable offset pointer to stack *(u8*)(r0) = 0 ; BPF_ST writing zero, STACK_ZERO mark for ; fp[-8] should be preserved. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230214232030.1502829-5-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 31ff2135121ca9c0fd6c60de6b851509a24446ab Author: Eduard Zingerman Date: Wed Feb 15 01:20:29 2023 +0200 bpf: BPF_ST with variable offset should preserve STACK_ZERO marks BPF_STX instruction preserves STACK_ZERO marks for variable offset writes in situations like below: *(u64*)(r10 - 8) = 0 ; STACK_ZERO marks for fp[-8] r0 = random(-7, -1) ; some random number in range of [-7, -1] r0 += r10 ; r0 is now a variable offset pointer to stack r1 = 0 *(u8*)(r0) = r1 ; BPF_STX writing zero, STACK_ZERO mark for ; fp[-8] is preserved This commit updates verifier.c:check_stack_write_var_off() to process BPF_ST in a similar manner, e.g. the following example: *(u64*)(r10 - 8) = 0 ; STACK_ZERO marks for fp[-8] r0 = random(-7, -1) ; some random number in range of [-7, -1] r0 += r10 ; r0 is now variable offset pointer to stack *(u8*)(r0) = 0 ; BPF_ST writing zero, STACK_ZERO mark for ; fp[-8] is preserved Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230214232030.1502829-4-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 1a24af65bb5fed673a9377e794ee3cf416fec64d Author: Eduard Zingerman Date: Wed Feb 15 01:20:28 2023 +0200 selftests/bpf: check if verifier tracks constants spilled by BPF_ST_MEM Check that verifier tracks the value of 'imm' spilled to stack by BPF_ST_MEM instruction. Cover the following cases: - write of non-zero constant to stack; - write of a zero constant to stack. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230214232030.1502829-3-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit ecdf985d7615356b78241fdb159c091830ed0380 Author: Eduard Zingerman Date: Wed Feb 15 01:20:27 2023 +0200 bpf: track immediate values written to stack by BPF_ST instruction For aligned stack writes using BPF_ST instruction track stored values in a same way BPF_STX is handled, e.g. make sure that the following commands produce similar verifier knowledge: fp[-8] = 42; r1 = 42; fp[-8] = r1; This covers two cases: - non-null values written to stack are stored as spill of fake registers; - null values written to stack are stored as STACK_ZERO marks. Previously both cases above used STACK_MISC marks instead. Some verifier test cases relied on the old logic to obtain STACK_MISC marks for some stack values. These test cases are updated in the same commit to avoid failures during bisect. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230214232030.1502829-2-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 7c855ef7137a67bcff0e039691b969428dd8ef6a Author: Krzysztof Kozlowski Date: Wed Feb 8 11:15:42 2023 +0100 dt-bindings: mailbox: qcom,apcs-kpss-global: drop mbox-names from example Qualcomm G-Link RPM edge bindings do not allow and do not use mbox-names property. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230208101545.45711-4-krzysztof.kozlowski@linaro.org commit dd855f01e8d194d2dfeda36b620203c623c10430 Merge: ace5029856c09 cf3e0251868c5 71bc571c64c13 Author: Rafael J. Wysocki Date: Wed Feb 15 20:09:09 2023 +0100 Merge branches 'pm-tools' and 'pm-docs' Merge power management utilities and documentation updates for 6.3-rc1: - Modify some power management utilities to use the canonical ftrace path (Ross Zwisler). - Correct spelling problems for Documentation/power/ as reported by codespell (Randy Dunlap). * pm-tools: PM: tools: use canonical ftrace path * pm-docs: Documentation: power: correct spelling commit ace5029856c09a63c63eaca066d922c331ed1539 Merge: 7e71a13353ff7 cf835b005b285 0b6200e1e9f53 a0e8c13ccd6a9 99537067aca7e Author: Rafael J. Wysocki Date: Wed Feb 15 20:06:26 2023 +0100 Merge branches 'powercap', 'pm-domains', 'pm-em' and 'pm-opp' Merge updates of the powercap framework, generic PM domains, Energy Model and operating performance points for 6.3-rc1: - Fix possible name leak in powercap_register_zone() (Yang Yingliang). - Add Meteor Lake and Emerald Rapids support to the intel_rapl power capping driver (Zhang Rui). - Modify the idle_inject power capping facility to support 100% idle injection (Srinivas Pandruvada). - Fix large time windows handling in the intel_rapl power capping driver (Zhang Rui). - Fix memory leaks with using debugfs_lookup() in the generic PM domains and Energy Model code (Greg Kroah-Hartman). - Add missing 'cache-unified' property in example for kryo OPP bindings (Rob Herring). - Fix error checking in opp_migrate_dentry() (Qi Zheng). - Remove "select SRCU" (Paul E. McKenney). - Let qcom,opp-fuse-level be a 2-long array for qcom SoCs (Konrad Dybcio). * powercap: powercap: intel_rapl: Fix handling for large time window powercap: idle_inject: Support 100% idle injection powercap: intel_rapl: add support for Emerald Rapids powercap: intel_rapl: add support for Meteor Lake powercap: fix possible name leak in powercap_register_zone() * pm-domains: PM: domains: fix memory leak with using debugfs_lookup() * pm-em: PM: EM: fix memory leak with using debugfs_lookup() * pm-opp: OPP: fix error checking in opp_migrate_dentry() dt-bindings: opp: v2-qcom-level: Let qcom,opp-fuse-level be a 2-long array drivers/opp: Remove "select SRCU" dt-bindings: opp: opp-v2-kryo-cpu: Add missing 'cache-unified' property in example commit ec6311919ea616be69076d03c3e2d2f7769d5f5f Merge: 9a5c09dd97014 6724a76cff85e Author: Palmer Dabbelt Date: Wed Feb 15 10:57:13 2023 -0800 Merge patch series "riscv: Optimize function trace" guoren@kernel.org says: From: Guo Ren The previous ftrace detour implementation fc76b8b8011 ("riscv: Using PATCHABLE_FUNCTION_ENTRY instead of MCOUNT") contain three problems. - The most horrible bug is preemption panic which found by Andy [1]. Let's disable preemption for ftrace first, and Andy could continue the ftrace preemption work. - The "-fpatchable-function-entry= CFLAG" wasted code size !RISCV_ISA_C. - The ftrace detour implementation wasted code size. - When livepatching, the trampoline (ftrace_regs_caller) would not return to but would rather jump to the new function. So, "REG_L ra, -SZREG(sp)" would not run and the original return address would not be restored. The kernel is likely to hang or crash as a result. (Found by Evgenii Shatokhin [4]) [Palmer: The first three patches in this series are pretty concrete fixes, so I'm pulling them ahead of the rest of the series.] * b4-shazam-merge: riscv: ftrace: Reduce the detour code size to half riscv: ftrace: Remove wasted nops for !RISCV_ISA_C riscv: ftrace: Fixup panic by disabling preemption Link: https://lore.kernel.org/r/20230112090603.1295340-1-guoren@kernel.org Signed-off-by: Palmer Dabbelt commit 6724a76cff85ee271bbbff42ac527e4643b2ec52 Author: Guo Ren Date: Thu Jan 12 04:05:59 2023 -0500 riscv: ftrace: Reduce the detour code size to half Use a temporary register to reduce the size of detour code from 16 bytes to 8 bytes. The previous implementation is from 'commit afc76b8b8011 ("riscv: Using PATCHABLE_FUNCTION_ENTRY instead of MCOUNT")'. Before the patch: : 0: REG_S ra, -SZREG(sp) 4: auipc ra, ? 8: jalr ?(ra) 12: REG_L ra, -SZREG(sp) (func_boddy) After the patch: : 0: auipc t0, ? 4: jalr t0, ?(t0) (func_boddy) This patch not just reduces the size of detour code, but also fixes an important issue: An Ftrace callback registered with FTRACE_OPS_FL_IPMODIFY flag can actually change the instruction pointer, e.g. to "replace" the given kernel function with a new one, which is needed for livepatching, etc. In this case, the trampoline (ftrace_regs_caller) would not return to but would rather jump to the new function. So, "REG_L ra, -SZREG(sp)" would not run and the original return address would not be restored. The kernel is likely to hang or crash as a result. This can be easily demonstrated if one tries to "replace", say, cmdline_proc_show() with a new function with the same signature using instruction_pointer_set(&fregs->regs, new_func_addr) in the Ftrace callback. Link: https://lore.kernel.org/linux-riscv/20221122075440.1165172-1-suagrfillet@gmail.com/ Link: https://lore.kernel.org/linux-riscv/d7d5730b-ebef-68e5-5046-e763e1ee6164@yadro.com/ Co-developed-by: Song Shuai Signed-off-by: Song Shuai Signed-off-by: Guo Ren Signed-off-by: Guo Ren Cc: Evgenii Shatokhin Reviewed-by: Evgenii Shatokhin Link: https://lore.kernel.org/r/20230112090603.1295340-4-guoren@kernel.org Cc: stable@vger.kernel.org Fixes: 10626c32e382 ("riscv/ftrace: Add basic support") Signed-off-by: Palmer Dabbelt commit 409c8fb20c66df7150e592747412438c04aeb11f Author: Guo Ren Date: Thu Jan 12 04:05:58 2023 -0500 riscv: ftrace: Remove wasted nops for !RISCV_ISA_C When CONFIG_RISCV_ISA_C=n, -fpatchable-function-entry=8 would generate more nops than we expect. Because it treat nop opcode as 0x00000013 instead of 0x0001. Dump of assembler code for function dw_pcie_free_msi: 0xffffffff806fce94 <+0>: sd ra,-8(sp) 0xffffffff806fce98 <+4>: auipc ra,0xff90f 0xffffffff806fce9c <+8>: jalr -684(ra) # 0xffffffff8000bbec 0xffffffff806fcea0 <+12>: ld ra,-8(sp) 0xffffffff806fcea4 <+16>: nop /* wasted */ 0xffffffff806fcea8 <+20>: nop /* wasted */ 0xffffffff806fceac <+24>: nop /* wasted */ 0xffffffff806fceb0 <+28>: nop /* wasted */ 0xffffffff806fceb4 <+0>: addi sp,sp,-48 0xffffffff806fceb8 <+4>: sd s0,32(sp) 0xffffffff806fcebc <+8>: sd s1,24(sp) 0xffffffff806fcec0 <+12>: sd s2,16(sp) 0xffffffff806fcec4 <+16>: sd s3,8(sp) 0xffffffff806fcec8 <+20>: sd ra,40(sp) 0xffffffff806fcecc <+24>: addi s0,sp,48 Signed-off-by: Guo Ren Signed-off-by: Guo Ren Link: https://lore.kernel.org/r/20230112090603.1295340-3-guoren@kernel.org Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 8547649981e6631328cd64f583667501ae385531 Author: Andy Chiu Date: Thu Jan 12 04:05:57 2023 -0500 riscv: ftrace: Fixup panic by disabling preemption In RISCV, we must use an AUIPC + JALR pair to encode an immediate, forming a jump that jumps to an address over 4K. This may cause errors if we want to enable kernel preemption and remove dependency from patching code with stop_machine(). For example, if a task was switched out on auipc. And, if we changed the ftrace function before it was switched back, then it would jump to an address that has updated 11:0 bits mixing with previous XLEN:12 part. p: patched area performed by dynamic ftrace ftrace_prologue: p| REG_S ra, -SZREG(sp) p| auipc ra, 0x? ------------> preempted ... change ftrace function ... p| jalr -?(ra) <------------- switched back p| REG_L ra, -SZREG(sp) func: xxx ret Fixes: afc76b8b8011 ("riscv: Using PATCHABLE_FUNCTION_ENTRY instead of MCOUNT") Signed-off-by: Andy Chiu Signed-off-by: Guo Ren Link: https://lore.kernel.org/r/20230112090603.1295340-2-guoren@kernel.org Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 964a54e5e1a0d70cd80bd5a0885a1938463625b1 Author: Thomas Weißschuh Date: Fri Feb 10 02:13:40 2023 +0000 btrfs: 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: Anand Jain Signed-off-by: Thomas Weißschuh Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1eb82ef87336045459929d915b8050beaea92951 Author: Christoph Hellwig Date: Mon Dec 12 08:37:24 2022 +0100 btrfs: remove the bdev argument to btrfs_rmap_block The only user in the zoned remap code is gone now, so remove the argument. Reviewed-by: Josef Bacik Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 04f0847c4552b898ec5867a6b36f1e953330beae Author: Christoph Hellwig Date: Mon Dec 12 08:37:23 2022 +0100 btrfs: don't rely on unchanging ->bi_bdev for zone append remaps btrfs_record_physical_zoned relies on a bio->bi_bdev samples in the bio_end_io handler to find the reverse map for remapping the zone append write, but stacked block device drivers can and usually do change bi_bdev when sending on the bio to a lower device. This can happen e.g. with the nvme-multipath driver when a NVMe SSD sets the shared namespace bit. But there is no real need for the bdev in btrfs_record_physical_zoned, as it is only passed to btrfs_rmap_block, which uses it to pick the mapping to report if there are multiple reverse mappings. As zone writes can only do simple non-mirror writes right now, and anything more complex will use the stripe tree there is no chance of the multiple mappings case actually happening. Instead open code the subset of btrfs_rmap_block in btrfs_record_physical_zoned, which also removes a memory allocation and remove the bdev field in the ordered extent. Fixes: d8e3fb106f39 ("btrfs: zoned: use ZONE_APPEND write for zoned mode") Reviewed-by: Josef Bacik Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit fdf9a37dcfd47e9bd18d1218f2d0b2fa3748d00d Author: Christoph Hellwig Date: Mon Dec 12 08:37:22 2022 +0100 btrfs: never return true for reads in btrfs_use_zone_append Using Zone Append only makes sense for writes to the device, so check that in btrfs_use_zone_append. This avoids the possibility of artificially limited read size on zoned file systems. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit 921603c76246a7f716b9a244d7b1fa1653935f31 Author: Christoph Hellwig Date: Mon Dec 12 08:37:21 2022 +0100 btrfs: pass a btrfs_bio to btrfs_use_append struct btrfs_bio has all the information needed for btrfs_use_append, so pass that instead of a btrfs_inode and file_offset. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0d495430db8d704b3a70b244b54d5ee30cf03f69 Author: Christoph Hellwig Date: Mon Dec 12 08:37:20 2022 +0100 btrfs: set bbio->file_offset in alloc_new_bio Instead of digging into the bio_vec in submit_one_bio, set file_offset at bio allocation time from the provided parameter. This also ensures that the file_offset is available all the time when building up the bio payload. Reviewed-by: Josef Bacik Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit 72fcf1a47b8daba82ffdeddd630688df5ac1bddb Author: Christoph Hellwig Date: Mon Dec 12 08:37:18 2022 +0100 btrfs: use file_offset to limit bios size in calc_bio_boundaries btrfs_ordered_extent->disk_bytenr can be rewritten by the zoned I/O completion handler, and thus in general is not a good idea to limit I/O size. But the maximum bio size calculation can easily be done using the file_offset fields in the btrfs_ordered_extent and btrfs_bio structures, so switch to that instead. Reviewed-by: Josef Bacik Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit a724f313f84beb5b63b8844d9ec42a547e4a3c18 Author: Filipe Manana Date: Wed Feb 8 17:46:49 2023 +0000 btrfs: do unsigned integer division in the extent buffer binary search loop In the search loop of the binary search function, we are doing a division by 2 of the sum of the high and low slots. Because the slots are integers, the generated assembly code for it is the following on x86_64: 0x00000000000141f1 <+145>: mov %eax,%ebx 0x00000000000141f3 <+147>: shr $0x1f,%ebx 0x00000000000141f6 <+150>: add %eax,%ebx 0x00000000000141f8 <+152>: sar %ebx It's a few more instructions than a simple right shift, because signed integer division needs to round towards zero. However we know that slots can never be negative (btrfs_header_nritems() returns an u32), so we can instead use unsigned types for the low and high slots and therefore use unsigned integer division, which results in a single instruction on x86_64: 0x00000000000141f0 <+144>: shr %ebx So use unsigned types for the slots and therefore unsigned division. This is part of a small patchset comprised of the following two patches: btrfs: eliminate extra call when doing binary search on extent buffer btrfs: do unsigned integer division in the extent buffer binary search loop The following fs_mark test was run on a non-debug kernel (Debian's default kernel config) before and after applying the patchset: $ cat test.sh #!/bin/bash DEV=/dev/sdi MNT=/mnt/sdi MOUNT_OPTIONS="-o ssd" MKFS_OPTIONS="-O no-holes -R free-space-tree" FILES=100000 THREADS=$(nproc --all) FILE_SIZE=0 umount $DEV &> /dev/null mkfs.btrfs -f $MKFS_OPTIONS $DEV mount $MOUNT_OPTIONS $DEV $MNT OPTS="-S 0 -L 6 -n $FILES -s $FILE_SIZE -t $THREADS -k" for ((i = 1; i <= $THREADS; i++)); do OPTS="$OPTS -d $MNT/d$i" done fs_mark $OPTS umount $MNT Results before applying patchset: FSUse% Count Size Files/sec App Overhead 2 1200000 0 174472.0 11549868 4 2400000 0 253503.0 11694618 4 3600000 0 257833.1 11611508 6 4800000 0 247089.5 11665983 6 6000000 0 211296.1 12121244 10 7200000 0 187330.6 12548565 Results after applying patchset: FSUse% Count Size Files/sec App Overhead 2 1200000 0 207556.0 11393252 4 2400000 0 266751.1 11347909 4 3600000 0 274397.5 11270058 6 4800000 0 259608.4 11442250 6 6000000 0 238895.8 11635921 8 7200000 0 211942.2 11873825 Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7b00dfffebd4f3444a3ec04d9e4203b7ac1acb47 Author: Filipe Manana Date: Wed Feb 8 17:46:48 2023 +0000 btrfs: eliminate extra call when doing binary search on extent buffer The function btrfs_bin_search() is just a wrapper around the function generic_bin_search(), which passes the same arguments plus a default low slot with a value of 0. This adds an unnecessary extra function call, since btrfs_bin_search() is not static. So improve on this by making btrfs_bin_search() an inline function that calls generic_bin_search(), renaming the later to btrfs_generic_bin_search() and exporting it. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 08241d3c745ed7c6de8a762c0737b337c68a6c87 Author: Christoph Hellwig Date: Wed Jan 11 07:23:34 2023 +0100 btrfs: raid56: handle endio in scrub_rbio The only caller of scrub_rbio calls rbio_orig_end_io right after it, move it into scrub_rbio to match the other work item helpers. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 40f87ddb5dbe43fb209901815d24e3e718aef155 Author: Christoph Hellwig Date: Wed Jan 11 07:23:33 2023 +0100 btrfs: raid56: handle endio in recover_rbio Both callers of recover_rbio call rbio_orig_end_io right after it, so move the call into the shared function. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1d0ef1ca119f1a1fbcf5be5acce407147cb15245 Author: Christoph Hellwig Date: Wed Jan 11 07:23:32 2023 +0100 btrfs: raid56: handle endio in rmw_rbio Both callers of rmv_rbio call rbio_orig_end_io right after it, so move the call into the shared function. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 52f0c198645c68b80536384b7e666c4c56777b5e Author: Christoph Hellwig Date: Wed Jan 11 07:23:31 2023 +0100 btrfs: raid56: submit the read bios from scrub_assemble_read_bios Instead of filling in a bio_list and submitting the bios in the only caller, do that in scrub_assemble_read_bios. This removes the need to pass the bio_list, and also makes it clear that the extra bio_list cleanup in the caller is entirely pointless. Rename the function to scrub_read_bios to make it clear that the bios are not only assembled. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 02efa3a6baffdd753dc04034c848a5956784422d Author: Christoph Hellwig Date: Wed Jan 11 07:23:30 2023 +0100 btrfs: raid56: fold rmw_read_wait_recover into rmw_read_bios There is very little extra code in rmw_read_bios, and a large part of it is the superfluous extra cleanup of the bio list. Merge the two functions, and only clean up the bio list after it has been added to but before it has been emptied again by submit_read_wait_bio_list. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit d838d05ea5091044957d664b9f9c38fefcaf6d97 Author: Christoph Hellwig Date: Wed Jan 11 07:23:29 2023 +0100 btrfs: raid56: fold recover_assemble_read_bios into recover_rbio There is very little extra code in recover_rbio, and a large part of it is the superfluous extra cleanup of the bio list. Merge the two functions, and only clean up the bio list after it has been added to but before it has been emptied again by submit_read_wait_bio_list. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 801fcfc5d790f4a9be2897713bd6dd08bed253f1 Author: Christoph Hellwig Date: Wed Jan 11 07:23:28 2023 +0100 btrfs: raid56: add a bio_list_put helper Add a helper to put all bios in a list. This does not need to be added to block layer as there are no other users of such code. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1c76fb7b31a43ad8b63faa3c6612b04eb3dea5d6 Author: Christoph Hellwig Date: Wed Jan 11 07:23:27 2023 +0100 btrfs: raid56: wait for I/O completion in submit_read_bios In addition to setting up the end_io handler and submitting the bios in submit_read_bios, also wait for them to be completed instead of waiting for the completion manually in all three callers. Rename submit_read_bios to submit_read_wait_bio_list to make it clear it waits for the bios as well. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4d7627010bc24f68d617c1c455e12a3dfcffcb2c Author: Christoph Hellwig Date: Wed Jan 11 07:23:26 2023 +0100 btrfs: raid56: simplify code flow in rmw_rbio Remove the write goto label by moving the data page allocation and data read into the branch. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit abb49e87425be0d573bdafb9a5dbe2c64719796f Author: Christoph Hellwig Date: Wed Jan 11 07:23:25 2023 +0100 btrfs: raid56: simplify error handling and code flow in raid56_parity_write Handle the error return on alloc_rbio failure directly instead of using a goto and remove the queue_rbio goto label by moving the plugged check into the if branch. Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 79b02ec1d8ce1fafc8c39f888dbba6a3aa9a35cc Author: Josef Bacik Date: Thu Jan 26 16:01:00 2023 -0500 btrfs: replace btrfs_wait_tree_block_writeback by wait_on_extent_buffer_writeback This is used in the tree-log code and is a holdover from previous iterations of extent buffer writeback. We can simply use wait_on_extent_buffer_writeback here, and remove btrfs_wait_tree_block_writeback completely as it's equivalent (waiting on page write writeback). Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 98c8d683c291285be35c50579ac984e71d17ddc1 Author: Josef Bacik Date: Thu Jan 26 16:00:59 2023 -0500 btrfs: combine btrfs_clear_buffer_dirty and clear_extent_buffer_dirty btrfs_clear_buffer_dirty just does the test_clear_bit() and then calls clear_extent_buffer_dirty and does the dirty metadata accounting. Combine this into clear_extent_buffer_dirty and make the result btrfs_clear_buffer_dirty. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 190a83391bc40862538572d1313c207c348d356d Author: Josef Bacik Date: Thu Jan 26 16:00:58 2023 -0500 btrfs: rename btrfs_clean_tree_block to btrfs_clear_buffer_dirty btrfs_clean_tree_block is a misnomer, it's just clear_extent_buffer_dirty with some extra accounting around it. Rename this to btrfs_clear_buffer_dirty to make it more clear it belongs with it's setter, btrfs_mark_buffer_dirty. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit f88fd6504329ca8de0a04b6214e932c46746800d Author: Josef Bacik Date: Thu Jan 26 16:00:57 2023 -0500 btrfs: do not increment dirty_metadata_bytes in set_btree_ioerr We only add if we set the extent buffer dirty, and we subtract when we clear the extent buffer dirty. If we end up in set_btree_ioerr we have already cleared the buffer dirty, and we aren't resetting dirty on the extent buffer, so this is simply wrong. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit c4e54a65711688e78e81d6e2720f19f0747eb176 Author: Josef Bacik Date: Thu Jan 26 16:00:56 2023 -0500 btrfs: replace clearing extent buffer dirty bit with btrfs_clean_block Now that we're passing in the trans into btrfs_clean_tree_block, we can easily roll in the handling of the !trans case and replace all occurrences of if (test_and_clear_bit(EXTENT_BUFFER_DIRTY, &eb->bflags)) clear_extent_buffer_dirty(eb); with btrfs_tree_lock(eb); btrfs_clean_tree_block(eb); btrfs_tree_unlock(eb); We need the lock because if we are actually dirty we need to make sure we aren't racing with anything that's starting writeout currently. This also makes sure that we're accounting fs_info->dirty_metadata_bytes appropriately. Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit ed25dab3a0d1b14b59a3ad74b9d6bb4f4dca03b8 Author: Josef Bacik Date: Thu Jan 26 16:00:55 2023 -0500 btrfs: add trans argument to btrfs_clean_tree_block We check the header generation in the extent buffer against the current running transaction id to see if it's safe to clear DIRTY on this buffer. Generally speaking if we're clearing the buffer dirty we're holding the transaction open, but in the case of cleaning up an aborted transaction we don't, so we have extra checks in that path to check the transid. To allow for a future cleanup go ahead and pass in the trans handle so we don't have to rely on ->running_transaction being set. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit d3fb66150c05b1b082984c88e6895e663119ac4e Author: Josef Bacik Date: Thu Jan 26 16:00:54 2023 -0500 btrfs: always lock the block before calling btrfs_clean_tree_block We want to clean up the dirty handling for extent buffers so it's a little more consistent, so skip the check for generation == transid and simply always lock the extent buffer before calling btrfs_clean_tree_block. Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 8e81aa16a42169faae1ba15cd648cc8bb83eaa48 Author: Christoph Hellwig Date: Sat Jan 21 07:50:31 2023 +0100 iomap: remove IOMAP_F_ZONE_APPEND No users left now that btrfs takes REQ_OP_WRITE bios from iomap and splits and converts them to REQ_OP_ZONE_APPEND internally. Reviewed-by: Josef Bacik Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit d5e4377d505189c30df50d54f9944d7fb8d528bb Author: Christoph Hellwig Date: Sat Jan 21 07:50:30 2023 +0100 btrfs: split zone append bios in btrfs_submit_bio The current btrfs zoned device support is a little cumbersome in the data I/O path as it requires the callers to not issue I/O larger than the supported ZONE_APPEND size of the underlying device. This leads to a lot of extra accounting. Instead change btrfs_submit_bio so that it can take write bios of arbitrary size and form from the upper layers, and just split them internally to the ZONE_APPEND queue limits. Then remove all the upper layer warts catering to limited write sized on zoned devices, including the extra refcount in the compressed_bio. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit 243cf8d1b6737d4b53ac16b211987bbd299478e6 Author: Christoph Hellwig Date: Sat Jan 21 07:50:29 2023 +0100 btrfs: calculate file system wide queue limit for zoned mode To be able to split a write into properly sized zone append commands, we need a queue_limits structure that contains the least common denominator suitable for all devices. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 35a8d7da3ca87d8612fa86a21fab4e07a70d35cb Author: Christoph Hellwig Date: Sat Jan 21 07:50:28 2023 +0100 btrfs: remove now spurious bio submission helpers Call btrfs_submit_bio and btrfs_submit_compressed_read directly from submit_one_bio now that all additional functionality has moved into btrfs_submit_bio. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit 285599b6fe15d642df643fd4383ab3a278374e35 Author: Christoph Hellwig Date: Sat Jan 21 07:50:27 2023 +0100 btrfs: remove the fs_info argument to btrfs_submit_bio btrfs_submit_bio can derive it trivially from bbio->inode, so stop bothering in the callers. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 48253076c3a93f795fcd84ffdc97c5e763709dee Author: Christoph Hellwig Date: Sat Jan 21 07:50:26 2023 +0100 btrfs: open code submit_encoded_read_bio Open code the functionality in the only caller and remove the now superfluous error handling there. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit f8a02dc6fd38da3dd045509ec321b2f9130bd003 Author: Christoph Hellwig Date: Sat Jan 21 07:50:25 2023 +0100 btrfs: remove struct btrfs_io_geometry Now that btrfs_get_io_geometry has a single caller, we can massage it into a form that is more suitable for that caller and remove the marshalling into and out of struct btrfs_io_geometry. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit a34e4c3f884cc592f105d214d21baee9f9c6bae8 Author: Qu Wenruo Date: Sat Jan 21 07:50:24 2023 +0100 btrfs: remove stripe boundary calculation for encoded I/O Stop looking at the stripe boundary in btrfs_encoded_read_regular_fill_pages() now that btrfs_submit_bio can split bios. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Qu Wenruo Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit 30493ff49f81d0ba42286b72498272db1a1ccae6 Author: Qu Wenruo Date: Sat Jan 21 07:50:23 2023 +0100 btrfs: remove stripe boundary calculation for compressed I/O Stop looking at the stripe boundary in alloc_compressed_bio() now that that btrfs_submit_bio can split bios, open code the now trivial code from alloc_compressed_bio() in btrfs_submit_compressed_read and stop maintaining the pending_ios count for reads as there is always just a single bio now. Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo [hch: remove more cruft in btrfs_submit_compressed_read, use btrfs_zoned_get_device in alloc_compressed_bio] Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit 2380220e1e13b2dec4ae6f561841763ed6e1b0c0 Author: Qu Wenruo Date: Sat Jan 21 07:50:22 2023 +0100 btrfs: remove stripe boundary calculation for buffered I/O Remove btrfs_bio_ctrl::len_to_stripe_boundary, so that buffer I/O will no longer limit its bio size according to stripe length now that btrfs_submit_bio can split bios at stripe boundaries. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Qu Wenruo [hch: simplify calc_bio_boundaries a little more] Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit 67d66982509043962cf15457051e1b840578a323 Author: Christoph Hellwig Date: Sat Jan 21 07:50:21 2023 +0100 btrfs: pass the iomap bio to btrfs_submit_bio Now that btrfs_submit_bio splits the bio when crossing stripe boundaries, there is no need for the higher level code to do that manually. For direct I/O this is really helpful, as btrfs_submit_io can now simply take the bio allocated by iomap and send it on to btrfs_submit_bio instead of allocating clones. For that to work, the bio embedded into struct btrfs_dio_private needs to become a full btrfs_bio as expected by btrfs_submit_bio. With this change there is a single work item to offload the entire iomap bio so the heuristics to skip async processing for bios that were split isn't needed anymore either. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit 852eee62d31abd695cd43e1b875d664ed292a8ca Author: Christoph Hellwig Date: Sat Jan 21 07:50:20 2023 +0100 btrfs: allow btrfs_submit_bio to split bios Currently the I/O submitters have to split bios according to the chunk stripe boundaries. This leads to extra lookups in the extent trees and a lot of boilerplate code. To drop this requirement, split the bio when __btrfs_map_block returns a mapping that is smaller than the requested size and keep a count of pending bios in the original btrfs_bio so that the upper level completion is only invoked when all clones have completed. Based on a patch from Qu Wenruo. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit 542e300e8398ea529a4a20a125c77d234d5ca37e Author: Christoph Hellwig Date: Sat Jan 21 07:50:19 2023 +0100 btrfs: support cloned bios in btree_csum_one_bio To allow splitting bios in btrfs_submit_bio, btree_csum_one_bio needs to be able to handle cloned bios. As btree_csum_one_bio is always called before handing the bio to the block layer that is trivially done by using bio_for_each_segment instead of bio_for_each_segment_all. Also switch the function to take a btrfs_bio and use that to derive the fs_info. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 69ccf3f4244abc5f6d73ca5d8caf6b42a1db42c6 Author: Christoph Hellwig Date: Sat Jan 21 07:50:18 2023 +0100 btrfs: handle recording of zoned writes in the storage layer Move the code that splits the ordered extents and records the physical location for them to the storage layer so that the higher level consumers don't have to care about physical block numbers at all. This will also allow to eventually remove accounting for the zone append write sizes in the upper layer with a little bit more block layer work. Reviewed-by: Naohiro Aota Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit f8a53bb58ec7e2150f9b03f210675ba3e6d8b919 Author: Christoph Hellwig Date: Sat Jan 21 07:50:17 2023 +0100 btrfs: handle checksum generation in the storage layer Instead of letting the callers of btrfs_submit_bio deal with checksumming the (meta)data in the bio and making decisions on when to offload the checksumming to the bio, leave that to btrfs_submit_bio. Do do so the existing btrfs_submit_bio function is split into an upper and a lower half, so that the lower half can be offloaded to a workqueue. Note that this changes the behavior for direct writes to raid56 volumes so that async checksum offloading is not skipped when more I/O is expected. This runs counter to the argument explaining why it was done, although I can't measure any affects of the change. Commits later in this series will make sure the entire direct writes is offloaded to the workqueue at once and thus make sure it is sent to the raid56 code from a single thread. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit f8c44673e5a5f5131773d4a6974fb8ea4db033f8 Author: Christoph Hellwig Date: Sat Jan 21 07:50:16 2023 +0100 btrfs: simplify the btrfs_csum_one_bio calling convention To prepare for further bio submission changes btrfs_csum_one_bio should be able to take all it's arguments from the btrfs_bio structure. It can always use the bbio->inode already, and once the compression code is updated to set ->file_offset that one can be used unconditionally as well instead of looking at the page mapping now that btrfs doesn't allow ordered extents to span discontiguous data ranges. The only slightly tricky bit is the one_ordered flag set by the compressed writes. Replace that one with the driver private bio flag, which gets cleared before the bio is handed off to the block layer so that we don't get in the way of driver use. Note: this leaves an argument and a flag to btrfs_wq_submit_bio unused. But that whole mechanism will be removed in its current form in the next patch. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit deb6216fa0b6b66304fc81e19b509af1b8203f98 Author: Christoph Hellwig Date: Sat Jan 21 07:50:15 2023 +0100 btrfs: open code the submit_bio_start helpers The submit helpers are now trivial and can be called directly. Note that btree_csum_one_bio has to be moved up in the file a bit to avoid a forward declaration. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 295fe46ff19b990c19b84b0d39a88d7e73710b19 Author: Christoph Hellwig Date: Sat Jan 21 07:50:14 2023 +0100 btrfs: remove struct btrfs_bio::is_metadata flag This flag is unused now, so remove it. Re-expand the mirror_num field to 8 bits, and move it to the I/O completion internal section of the structure. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0d3acb25e70d5f58f99ae9c695326a097b4b56be Author: Christoph Hellwig Date: Sat Jan 21 07:50:13 2023 +0100 btrfs: rename btrfs_bio::iter field Rename iter to saved_iter and move it next to the repair internals and nothing outside of bio.c should be touching it. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0571b6357c5e414cd5db8e03150074a5ca1c5c12 Author: Christoph Hellwig Date: Sat Jan 21 07:50:12 2023 +0100 btrfs: remove the io_failure_record infrastructure struct io_failure_record and the io_failure_tree tree are unused now, so remove them. This in turn makes struct btrfs_inode smaller by 16 bytes. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 860c8c451661c72f05713ffdef3707f1fa9184d1 Author: Christoph Hellwig Date: Sat Jan 21 07:50:11 2023 +0100 btrfs: remove struct btrfs_bio::device field The device field is only used by the simple end I/O handler, and for that it can simply be stored in the bi_private field of the bio, which is currently used for the fs_info that can be retrieved through bbio->inode as well. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3d49d0d31237d11268959c7873c56aab166be07b Author: Christoph Hellwig Date: Sat Jan 21 07:50:10 2023 +0100 btrfs: remove now unused checksumming helpers Remove the unused btrfs_verify_data_csum helper, and fold btrfs_check_data_csum into its only caller. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit ac9f942e86941e8e615b04f791214cc04acd09d0 Author: Christoph Hellwig Date: Sat Jan 21 07:50:09 2023 +0100 btrfs: remove btrfs_bio_for_each_sector btrfs_bio_for_each_sector is unused now, so remove it. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7ab0fdfc810209fc493f2f67bdd41d5aafbc3a05 Author: Christoph Hellwig Date: Sat Jan 21 07:50:08 2023 +0100 btrfs: open code btrfs_bio_free_csum btrfs_bio_free_csum has only one caller left, and that caller is always for an data inode and doesn't need zeroing of the csum pointer as that pointer will never be touched again. Just open code the conditional kfree there. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7609afac677546b225d8327d726cc558d3666496 Author: Christoph Hellwig Date: Sat Jan 21 07:50:07 2023 +0100 btrfs: handle checksum validation and repair at the storage layer Currently btrfs handles checksum validation and repair in the end I/O handler for the btrfs_bio. This leads to a lot of duplicate code plus issues with varying semantics or bugs, e.g. - the until recently broken repair for compressed extents - the fact that encoded reads validate the checksums but do not kick of read repair - the inconsistent checking of the BTRFS_FS_STATE_NO_CSUMS flag This commit revamps the checksum validation and repair code to instead work below the btrfs_submit_bio interfaces. In case of a checksum failure (or a plain old I/O error), the repair is now kicked off before the upper level ->end_io handler is invoked. Progress of an in-progress repair is tracked by a small structure that is allocated using a mempool for each original bio with failed sectors, which holds a reference to the original bio. This new structure is allocated using a mempool to guarantee forward progress even under memory pressure. The mempool will be replenished when the repair completes, just as the mempools backing the bios. There is one significant behavior change here: If repair fails or is impossible to start with, the whole bio will be failed to the upper layer. This is the behavior that all I/O submitters except for buffered I/O already emulated in their end_io handler. For buffered I/O this now means that a large readahead request can fail due to a single bad sector, but as readahead errors are ignored the following readpage if the sector is actually accessed will still be able to read. This also matches the I/O failure handling in other file systems. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit e52190441bd6b268aed6ecc0efe3614c4222014e Author: Christoph Hellwig Date: Sat Jan 21 07:50:06 2023 +0100 btrfs: add a btrfs_data_csum_ok helper Add a new checksumming helper that wraps btrfs_check_data_csum and does all the checks to if we're dealing with some form of nodatacsum I/O. This helper will be used by the new storage layer checksum validation and repair code. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1c2b3ee3b0ec4bc971e23fe18d4c92333a6ad18a Author: Christoph Hellwig Date: Sat Jan 21 07:50:05 2023 +0100 btrfs: pre-load data checksum for reads in btrfs_submit_bio Instead of calling btrfs_lookup_bio_sums in every caller of btrfs_submit_bio that reads data, do the call once in btrfs_submit_bio. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7276aa7d38255b40e578267c3634ebc05f5d5236 Author: Christoph Hellwig Date: Sat Jan 21 07:50:04 2023 +0100 btrfs: save the bio iter for checksum validation in common code All callers of btrfs_submit_bio that want to validate checksums currently have to store a copy of the iter in the btrfs_bio. Move the assignment into common code. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9ba0004bd95e059983b4ca8defad82ab41627e51 Author: Christoph Hellwig Date: Sat Jan 21 07:50:03 2023 +0100 btrfs: refactor error handling in btrfs_submit_bio Add a bbio local variable and to prepare for calling functions that return a blk_status_t, rename the existing int used for error handling so that ret can be reused for the blk_status_t, and a label that can be reused for failing the passed in bio. Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4ae2edf12d49fdbaea2dfda0bb2ec06501bd3493 Author: Christoph Hellwig Date: Sat Jan 21 07:50:02 2023 +0100 btrfs: simplify parameters of btrfs_lookup_bio_sums The csums argument is always NULL now, so remove it and always allocate the csums array in the btrfs_bio. Also pass the btrfs_bio instead of inode + bio to document that this function requires a btrfs_bio and not just any bio. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5fa356531e33e7c7783ccd0d7938a070b5df8c22 Author: Christoph Hellwig Date: Sat Jan 21 07:50:01 2023 +0100 btrfs: remove the direct I/O read checksum lookup optimization To prepare for pending changes drop the optimization to only look up csums once per bio that is submitted from the iomap layer. In the short run this does cause additional lookups for fragmented direct reads, but later in the series, the bio based lookup will be used on the entire bio submitted from iomap, restoring the old behavior in common code. Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit d0e5cb2be7703172d98699275d722c4081241144 Author: Christoph Hellwig Date: Sat Jan 21 07:50:00 2023 +0100 btrfs: add a btrfs_inode pointer to struct btrfs_bio All btrfs_bio I/Os are associated with an inode. Add a pointer to that inode, which will allow to simplify a lot of calling conventions, and which will be needed in the I/O completion path in the future. This grow the btrfs_bio structure by a pointer, but that grows will be offset by the removal of the device pointer soon. Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit e0cfbb2ccabbeaea9e6b3b203d83edca49c702b2 Author: Christoph Hellwig Date: Sat Jan 21 07:49:59 2023 +0100 btrfs: better document struct btrfs_bio Update the comments on btrfs_bio to better describe the structure. Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit fd8f8ede239bc0531aca65f408ecf44d6755c558 Author: Christoph Hellwig Date: Sat Jan 21 07:49:58 2023 +0100 block: export bio_split_rw bio_split_rw can be used by file systems to split and incoming write bio into multiple bios fitting the hardware limit for use as ZONE_APPEND bios. Export it for initial use in btrfs. Reviewed-by: Josef Bacik Reviewed-by: Chaitanya Kulkarni Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit c9a43aaf0971660e388b794feb0db4649746390a Author: Qu Wenruo Date: Sat Jan 21 16:06:12 2023 +0800 btrfs: raid56: reduce overhead to calculate the bio length In rbio_update_error_bitmap(), we need to calculate the length of the rbio. As since it's called in the endio function, we can not directly grab the length from bi_iter. Currently we call bio_for_each_segment_all(), which will always return a range inside a page. But that's not necessary as we don't really care about anything inside the page. So use bio_for_each_bvec_all(), which can return a bvec across multiple continuous pages thus reduce the loops. Reviewed-by: Christoph Hellwig Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 67da05b3f28166b24316ecf675637f9b77661983 Author: Colin Ian King Date: Tue Jan 17 10:03:21 2023 +0000 btrfs: fix spelling mistakes found using codespell There quite a few spelling mistakes as found using codespell. Fix them. Signed-off-by: Colin Ian King Reviewed-by: David Sterba Signed-off-by: David Sterba commit e2fd83064a9bae368ce1c88a0cb9aee64ad4e124 Author: Filipe Manana Date: Tue Jan 17 11:21:39 2023 +0000 btrfs: skip backref walking during fiemap if we know the leaf is shared During fiemap, when checking if a data extent is shared we are doing the backref walking even if we already know the leaf is shared, which is a waste of time since if the leaf shared then the data extent is also shared. So skip the backref walking when we know we are in a shared leaf. The following test was measures the gains for a case where all leaves are shared due to a snapshot: $ cat test.sh #!/bin/bash DEV=/dev/sdj MNT=/mnt/sdj umount $DEV &> /dev/null mkfs.btrfs -f $DEV # Use compression to quickly create files with a lot of extents # (each with a size of 128K). mount -o compress=lzo $DEV $MNT # 40G gives 327680 extents, each with a size of 128K. xfs_io -f -c "pwrite -S 0xab -b 1M 0 40G" $MNT/foobar # Add some more files to increase the size of the fs and extent # trees (in the real world there's a lot of files and extents # from other files). xfs_io -f -c "pwrite -S 0xcd -b 1M 0 20G" $MNT/file1 xfs_io -f -c "pwrite -S 0xef -b 1M 0 20G" $MNT/file2 xfs_io -f -c "pwrite -S 0x73 -b 1M 0 20G" $MNT/file3 # Create a snapshot so all the extents become indirectly shared # through subtrees, with a generation less than or equals to the # generation used to create the snapshot. btrfs subvolume snapshot -r $MNT $MNT/snap1 # Unmount and mount again to clear cached metadata. umount $MNT mount -o compress=lzo $DEV $MNT start=$(date +%s%N) # The filefrag tool uses the fiemap ioctl. filefrag $MNT/foobar end=$(date +%s%N) dur=$(( (end - start) / 1000000 )) echo "fiemap took $dur milliseconds (metadata not cached)" echo start=$(date +%s%N) filefrag $MNT/foobar end=$(date +%s%N) dur=$(( (end - start) / 1000000 )) echo "fiemap took $dur milliseconds (metadata cached)" umount $MNT The results were the following on a non-debug kernel (Debian's default kernel config). Before this patch: (...) /mnt/sdi/foobar: 327680 extents found fiemap took 1821 milliseconds (metadata not cached) /mnt/sdi/foobar: 327680 extents found fiemap took 399 milliseconds (metadata cached) After this patch: (...) /mnt/sdi/foobar: 327680 extents found fiemap took 591 milliseconds (metadata not cached) /mnt/sdi/foobar: 327680 extents found fiemap took 123 milliseconds (metadata cached) That's a speedup of 3.1x and 3.2x. Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 4e4488d4efd56951e6c1c0f60f1fc8e0f93b7964 Author: Filipe Manana Date: Tue Jan 17 11:21:38 2023 +0000 btrfs: assert commit root semaphore is held when accessing backref cache During fiemap, when accessing the cache that stores the sharedness of an extent, we need to either be holding a transaction handle or the commit root semaphore. I left comments about this in the comment that precedes store_backref_shared_cache() and lookup_backref_shared_cache(), but have actually not enforced it through assertions. So assert that the commit root semaphore is held if we are not holding a transaction handle. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2b5463fcbdfb24e898916bcae2b1359042d26963 Author: Boris Burkov Date: Thu Jan 12 16:05:11 2023 -0800 btrfs: hold block group refcount during async discard Async discard does not acquire the block group reference count while it holds a reference on the discard list. This is generally OK, as the paths which destroy block groups tend to try to synchronize on cancelling async discard work. However, relying on cancelling work requires careful analysis to be sure it is safe from races with unpinning scheduling more work. While I am unable to find a race with unpinning in the current code for either the unused bgs or relocation paths, I believe we have one in an older version of auto relocation in a Meta internal build. This suggests that this is in fact an error prone model, and could be fragile to future changes to these bg deletion paths. To make this ownership more clear, add a refcount for async discard. If work is queued for a block group, its refcount should be incremented, and when work is completed or canceled, it should be decremented. CC: stable@vger.kernel.org # 5.15+ Signed-off-by: Boris Burkov Signed-off-by: David Sterba commit 3e49363be6330f49e670240e8f46e6fe0bf5628a Author: Filipe Manana Date: Wed Jan 11 11:36:20 2023 +0000 btrfs: send: cache utimes operations for directories if possible Whenever we add or remove an entry to a directory, we issue an utimes command for the directory. If we add 1000 entries to a directory (create 1000 files under it or move 1000 files to it), then we issue the same utimes command 1000 times, which increases the send stream size, results in more pipe IO, one search in the send b+tree, allocating one path for the search, etc, as well as making the receiver do a system call for each duplicated utimes command. We also issue an utimes command when we create a new directory, but later we might add entries to it corresponding to inodes with an higher inode number, so it's pointless to issue the utimes command before we create the last inode under the directory. So use a lru cache to track directories for which we must send a utimes command. When we need to remove an entry from the cache, we issue the utimes command for the respective directory. When finishing the send operation, we go over each cache element and issue the respective utimes command. Finally the caching is entirely optional, just a performance optimization, meaning that if we fail to cache (due to memory allocation failure), we issue the utimes command right away, that is, we fallback to the previous, unoptimized, behaviour. This patch belongs to a patchset comprised of the following patches: btrfs: send: directly return from did_overwrite_ref() and simplify it btrfs: send: avoid unnecessary generation search at did_overwrite_ref() btrfs: send: directly return from will_overwrite_ref() and simplify it btrfs: send: avoid extra b+tree searches when checking reference overrides btrfs: send: remove send_progress argument from can_rmdir() btrfs: send: avoid duplicated orphan dir allocation and initialization btrfs: send: avoid unnecessary orphan dir rbtree search at can_rmdir() btrfs: send: reduce searches on parent root when checking if dir can be removed btrfs: send: iterate waiting dir move rbtree only once when processing refs btrfs: send: initialize all the red black trees earlier btrfs: send: genericize the backref cache to allow it to be reused btrfs: adapt lru cache to allow for 64 bits keys on 32 bits systems btrfs: send: cache information about created directories btrfs: allow a generation number to be associated with lru cache entries btrfs: add an api to delete a specific entry from the lru cache btrfs: send: use the lru cache to implement the name cache btrfs: send: update size of roots array for backref cache entries btrfs: send: cache utimes operations for directories if possible The following test was run before and after applying the whole patchset, and on a non-debug kernel (Debian's default kernel config): #!/bin/bash MNT=/mnt/sdi DEV=/dev/sdi mkfs.btrfs -f $DEV > /dev/null mount $DEV $MNT mkdir $MNT/A for ((i = 1; i <= 20000; i++)); do echo -n > $MNT/A/file_$i done btrfs subvolume snapshot -r $MNT $MNT/snap1 mkdir $MNT/B for ((i = 20000; i <= 40000; i++)); do echo -n > $MNT/B/file_$i done mv $MNT/A/file_* $MNT/B/ btrfs subvolume snapshot -r $MNT $MNT/snap2 start=$(date +%s%N) btrfs send -p $MNT/snap1 $MNT/snap2 > /dev/null end=$(date +%s%N) dur=$(( (end - start) / 1000000 )) echo "Incremental send took $dur milliseconds" umount $MNT Before the whole patchset: 18408 milliseconds After the whole patchset: 1942 milliseconds (9.5x speedup) Using 60000 files instead of 40000: Before the whole patchset: 39764 milliseconds After the whole patchset: 3076 milliseconds (12.9x speedup) Using 20000 files instead of 40000: Before the whole patchset: 5072 milliseconds After the whole patchset: 916 milliseconds (5.5x speedup) Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit ace79df8a44ae1f668615c7177fa1a7bdc04af7e Author: Filipe Manana Date: Wed Jan 11 11:36:19 2023 +0000 btrfs: send: update size of roots array for backref cache entries Currently we limit the size of the roots array, for backref cache entries, to 12 elements. This is because that number is enough for most cases and to make the backref cache entry size to be exactly 128 bytes, so that memory is allocated from the kmalloc-128 slab and no space is wasted. However recent changes in the series refactored the backref cache to be more generic and allow it to be reused for other purposes, which resulted in increasing the size of the embedded structure btrfs_lru_cache_entry in order to allow for supporting inode numbers as keys on 32 bits system and allow multiple generations per key. This resulted in increasing the size of struct backref_cache_entry from 128 bytes to 152 bytes. Since the cache entries are allocated with kmalloc(), it means we end up using the slab kmalloc-192, so we end up wasting 40 bytes of memory. So bump the size of the roots array from 12 elements to 17 elements, so we end up using 192 bytes for each backref cache entry. This patch is part of a larger patchset and the changelog of the last patch in the series contains a sample performance test and results. The patches that comprise the patchset are the following: btrfs: send: directly return from did_overwrite_ref() and simplify it btrfs: send: avoid unnecessary generation search at did_overwrite_ref() btrfs: send: directly return from will_overwrite_ref() and simplify it btrfs: send: avoid extra b+tree searches when checking reference overrides btrfs: send: remove send_progress argument from can_rmdir() btrfs: send: avoid duplicated orphan dir allocation and initialization btrfs: send: avoid unnecessary orphan dir rbtree search at can_rmdir() btrfs: send: reduce searches on parent root when checking if dir can be removed btrfs: send: iterate waiting dir move rbtree only once when processing refs btrfs: send: initialize all the red black trees earlier btrfs: send: genericize the backref cache to allow it to be reused btrfs: adapt lru cache to allow for 64 bits keys on 32 bits systems btrfs: send: cache information about created directories btrfs: allow a generation number to be associated with lru cache entries btrfs: add an api to delete a specific entry from the lru cache btrfs: send: use the lru cache to implement the name cache btrfs: send: update size of roots array for backref cache entries btrfs: send: cache utimes operations for directories if possible Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit c48545debfff5624a1dd2581f6f8f2fa7fb5f287 Author: Filipe Manana Date: Wed Jan 11 11:36:18 2023 +0000 btrfs: send: use the lru cache to implement the name cache The name cache in send is basically a lru cache implemented with a radix tree and linked lists, very similar to the lru cache module which is used for the send backref cache and the cache of previously created directories during a send operation. So remove all the custom caching code for the name cache and make it use the lru cache instead. One particular detail to note is that the current cache behaves a bit differently when it comes to eviction of entries. Namely when after inserting a new name in the cache, if the cache now has 256 entries, we evict the last 128 LRU entries. The lru_cache.{c,h} module behaves a bit differently in that once we reach the cache limit, we evict a single LRU entry. In practice this doesn't make much difference, but it's actually better to evict just one entry instead of half of the entries, as there's always a chance we will need a name stored in one of that last 128 removed entries. This patch is part of a larger patchset and the changelog of the last patch in the series contains a sample performance test and results. The patches that comprise the patchset are the following: btrfs: send: directly return from did_overwrite_ref() and simplify it btrfs: send: avoid unnecessary generation search at did_overwrite_ref() btrfs: send: directly return from will_overwrite_ref() and simplify it btrfs: send: avoid extra b+tree searches when checking reference overrides btrfs: send: remove send_progress argument from can_rmdir() btrfs: send: avoid duplicated orphan dir allocation and initialization btrfs: send: avoid unnecessary orphan dir rbtree search at can_rmdir() btrfs: send: reduce searches on parent root when checking if dir can be removed btrfs: send: iterate waiting dir move rbtree only once when processing refs btrfs: send: initialize all the red black trees earlier btrfs: send: genericize the backref cache to allow it to be reused btrfs: adapt lru cache to allow for 64 bits keys on 32 bits systems btrfs: send: cache information about created directories btrfs: allow a generation number to be associated with lru cache entries btrfs: add an api to delete a specific entry from the lru cache btrfs: send: use the lru cache to implement the name cache btrfs: send: update size of roots array for backref cache entries btrfs: send: cache utimes operations for directories if possible Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit c620f4d5b25bcbb851daa1f88edc764cf5f29cb6 Author: Saranya Gopal Date: Tue Feb 14 17:15:43 2023 +0530 usb: typec: pd: Add higher capability sysfs for sink PDO 28th bit of fixed supply sink PDO represents higher capability. When this bit is set, the sink device needs more than vsafe5V (eg: 12 V) to provide full functionality. This patch adds this higher capability sysfs interface for sink PDO. 28th bit of fixed supply source PDO represents usb_suspend_supported attribute. This usb_suspend_supported sysfs is already exposed for source PDOs. This patch adds 'source-capabilities' in usb_suspend_supported sysfs documentation for additional clarity. Signed-off-by: Saranya Gopal Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230214114543.205103-2-saranya.gopal@intel.com Signed-off-by: Greg Kroah-Hartman commit e4e7b2dc27c4bb877d850eaff69d41410b2f4237 Author: Saranya Gopal Date: Tue Feb 14 17:15:42 2023 +0530 usb: typec: pd: Remove usb_suspend_supported sysfs from sink PDO As per USB PD specification, 28th bit of fixed supply sink PDO represents "higher capability" attribute and not "usb suspend supported" attribute. So, this patch removes the usb_suspend_supported attribute from sink PDO. Fixes: 662a60102c12 ("usb: typec: Separate USB Power Delivery from USB Type-C") Cc: stable Reported-by: Rajaram Regupathy Signed-off-by: Saranya Gopal Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230214114543.205103-1-saranya.gopal@intel.com Signed-off-by: Greg Kroah-Hartman commit 8e5248c3a8778f3e394e9a19195bc7a48f567ca2 Author: Heikki Krogerus Date: Wed Feb 15 15:27:11 2023 +0200 usb: dwc3: pci: add support for the Intel Meteor Lake-M This patch adds the necessary PCI IDs for Intel Meteor Lake-M devices. Signed-off-by: Heikki Krogerus Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230215132711.35668-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ddf1eca4fc5a4038cb323306f51fbba34ce3f4d2 Author: Yangtao Li Date: Wed Feb 15 14:17:01 2023 +0800 f2fs: drop unnecessary arg for f2fs_ioc_*() They are not used, let's remove them. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c7dbc06688292db34c1bb9c715e29ac4935af994 Author: Jaegeuk Kim Date: Tue Feb 14 15:53:52 2023 -0800 f2fs: Revert "f2fs: truncate blocks in batch in __complete_revoke_list()" We should not truncate replaced blocks, and were supposed to truncate the first part as well. This reverts commit 78a99fe6254cad4be310cd84af39f6c46b668c72. Cc: stable@vger.kernel.org Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit e4922088f8e90ea163281ba8e69b98f34a7a1b83 Merge: 33436335e93a1 5fc5b94a27365 Author: Paolo Bonzini Date: Wed Feb 15 12:35:26 2023 -0500 Merge tag 'kvm-s390-next-6.3-1' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD * Two more V!=R patches * The last part of the cmpxchg patches * A few fixes commit 33436335e93a1788a58443fc99c5ab320ce4b9d9 Merge: 27b025ebb0f60 c39cea6f38eef Author: Paolo Bonzini Date: Wed Feb 15 12:33:28 2023 -0500 Merge tag 'kvm-riscv-6.3-1' of https://github.com/kvm-riscv/linux into HEAD KVM/riscv changes for 6.3 - Fix wrong usage of PGDIR_SIZE to check page sizes - Fix privilege mode setting in kvm_riscv_vcpu_trap_redirect() - Redirect illegal instruction traps to guest - SBI PMU support for guest commit 3caf31e7b18a90b74a2709d761a0dfa423f2c2e4 Author: Johannes Berg Date: Wed Feb 15 18:30:26 2023 +0100 wifi: mac80211: add documentation for amsdu_mesh_control This documentation wasn't added in the original patch, add it now. Reported-by: Stephen Rothwell Fixes: 6e4c0d0460bd ("wifi: mac80211: add a workaround for receiving non-standard mesh A-MSDU") Signed-off-by: Johannes Berg commit 4048a6a7380c8be2f06c1c386dd63d1bd3cdb0a0 Author: Lorenzo Bianconi Date: Wed Feb 15 10:32:07 2023 +0100 wifi: cfg80211: remove gfp parameter from cfg80211_obss_color_collision_notify description Get rid of gfp parameter from cfg80211_obss_color_collision_notify routine description. Fixes: 935ef47b16cc ("wifi: cfg80211: get rid of gfp in cfg80211_bss_color_notify") Reported-by: Stephen Rothwell Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/2da652e2cd5c7903191091ae9757718f1be802a1.1676453359.git.lorenzo@kernel.org Signed-off-by: Johannes Berg commit ab5f171e36063b33aba1dd4c7c6d5031b00b42aa Author: Johannes Berg Date: Wed Feb 15 10:40:41 2023 +0100 wifi: mac80211: always initialize link_sta with sta When we have multiple interfaces receiving the same frame, such as a multicast frame, one interface might have a sta and the other not. In this case, link_sta would be set but not cleared again. Always set link_sta, so we keep an invariant that link_sta and sta are either both set or both not set. Signed-off-by: Johannes Berg commit 0d846bdc11101ac0ba4d89c2be359af08cb9379b Author: Johannes Berg Date: Wed Feb 15 10:07:05 2023 +0100 wifi: mac80211: pass 'sta' to ieee80211_rx_data_set_sta() There's at least one case in ieee80211_rx_for_interface() where we might pass &((struct sta_info *)NULL)->sta to it only to then do container_of(), and then checking the result for NULL, but checking the result of container_of() for NULL looks really odd. Fix this by just passing the struct sta_info * instead. Fixes: e66b7920aa5a ("wifi: mac80211: fix initialization of rx->link and rx->link_sta") Signed-off-by: Johannes Berg commit c38c701851011c94ce3be1ccb3593678d2933fd8 Author: Marc Bornand Date: Wed Feb 15 08:47:53 2023 +0000 wifi: cfg80211: Set SSID if it is not already set When a connection was established without going through NL80211_CMD_CONNECT, the ssid was never set in the wireless_dev struct. Now we set it in __cfg80211_connect_result() when it is not already set. When using a userspace configuration that does not call cfg80211_connect() (can be checked with breakpoints in the kernel), this patch should allow `networkctl status device_name` to output the SSID instead of null. Cc: stable@vger.kernel.org Reported-by: Yohan Prod'homme Fixes: 7b0a0e3c3a88 (wifi: cfg80211: do some rework towards MLO link APIs) Link: https://bugzilla.kernel.org/show_bug.cgi?id=216711 Signed-off-by: Marc Bornand Signed-off-by: Johannes Berg commit 62d101d5f422cde39b269f7eb4cbbe2f1e26f9d4 Author: Alexei Starovoitov Date: Tue Feb 14 15:50:51 2023 -0800 selftests/bpf: Fix map_kptr test. The compiler is optimizing out majority of unref_ptr read/writes, so the test wasn't testing much. For example, one could delete '__kptr' tag from 'struct prog_test_ref_kfunc __kptr *unref_ptr;' and the test would still "pass". Convert it to volatile stores. Confirmed by comparing bpf asm before/after. Fixes: 2cbc469a6fc3 ("selftests/bpf: Add C tests for kptr") Signed-off-by: Alexei Starovoitov Acked-by: Stanislav Fomichev Acked-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20230214235051.22938-1-alexei.starovoitov@gmail.com Signed-off-by: Martin KaFai Lau commit 27b025ebb0f6092d5c0a88de2ab73545bc1c496e Merge: 4bc6dcaa159b7 93827a0a36396 Author: Paolo Bonzini Date: Wed Feb 15 12:23:19 2023 -0500 Merge tag 'kvm-x86-vmx-6.3' of https://github.com/kvm-x86/linux into HEAD KVM VMX changes for 6.3: - Handle NMI VM-Exits before leaving the noinstr region - A few trivial cleanups in the VM-Enter flows - Stop enabling VMFUNC for L1 purely to document that KVM doesn't support EPTP switching (or any other VM function) for L1 - Fix a crash when using eVMCS's enlighted MSR bitmaps commit 4bc6dcaa159b77ecc2c0c657433c3f5c8a657711 Merge: e84183f68edb7 f94f053aa3a5d Author: Paolo Bonzini Date: Wed Feb 15 12:23:06 2023 -0500 Merge tag 'kvm-x86-svm-6.3' of https://github.com/kvm-x86/linux into HEAD KVM SVM changes for 6.3: - Fix a mostly benign overflow bug in SEV's send|receive_update_data() - Move the SVM-specific "host flags" into vcpu_svm (extracted from the vNMI enabling series) - A handful for fixes and cleanups commit 4ab3a086d10eeec1424f2e8a968827a6336203df Author: Pietro Borrello Date: Sun Feb 12 19:00:03 2023 +0000 HID: asus: use spinlock to safely schedule workers Use spinlocks to deal with workers introducing a wrapper asus_schedule_work(), and several spinlock checks. Otherwise, asus_kbd_backlight_set() may schedule led->work after the structure has been freed, causing a use-after-free. Fixes: af22a610bc38 ("HID: asus: support backlight on USB keyboards") Signed-off-by: Pietro Borrello Link: https://lore.kernel.org/r/20230125-hid-unregister-leds-v4-5-7860c5763c38@diag.uniroma1.it Signed-off-by: Benjamin Tissoires commit 315c537068a13f0b5681d33dd045a912f4bece6f Author: Pietro Borrello Date: Sun Feb 12 19:00:02 2023 +0000 HID: asus: use spinlock to protect concurrent accesses asus driver has a worker that may access data concurrently. Proct the accesses using a spinlock. Fixes: af22a610bc38 ("HID: asus: support backlight on USB keyboards") Signed-off-by: Pietro Borrello Link: https://lore.kernel.org/r/20230125-hid-unregister-leds-v4-4-7860c5763c38@diag.uniroma1.it Signed-off-by: Benjamin Tissoires commit 76ca8da989c7d97a7f76c75d475fe95a584439d7 Author: Pietro Borrello Date: Sun Feb 12 19:00:01 2023 +0000 HID: bigben: use spinlock to safely schedule workers Use spinlocks to deal with workers introducing a wrapper bigben_schedule_work(), and several spinlock checks. Otherwise, bigben_set_led() may schedule bigben->worker after the structure has been freed, causing a use-after-free. Fixes: 4eb1b01de5b9 ("HID: hid-bigbenff: fix race condition for scheduled work during removal") Signed-off-by: Pietro Borrello Link: https://lore.kernel.org/r/20230125-hid-unregister-leds-v4-3-7860c5763c38@diag.uniroma1.it Signed-off-by: Benjamin Tissoires commit 27d2a2fd844ec7da70d19fabb482304fd1e0595b Author: Pietro Borrello Date: Sun Feb 12 19:00:00 2023 +0000 HID: bigben_worker() remove unneeded check on report_field bigben_worker() checks report_field to be non-NULL. The check has been added in commit 918aa1ef104d ("HID: bigbenff: prevent null pointer dereference") to prevent a NULL pointer crash. However, the true root cause was a missing check for output reports, patched in commit c7bf714f8755 ("HID: check empty report_list in bigben_probe()"), where the type-confused report list_entry was overlapping with a NULL pointer, which was then causing the crash. Fixes: 918aa1ef104d ("HID: bigbenff: prevent null pointer dereference") Signed-off-by: Pietro Borrello Link: https://lore.kernel.org/r/20230125-hid-unregister-leds-v4-2-7860c5763c38@diag.uniroma1.it Signed-off-by: Benjamin Tissoires commit 9fefb6201c4f8dd9f58c581b2a66e5cde2895ea2 Author: Pietro Borrello Date: Sun Feb 12 18:59:59 2023 +0000 HID: bigben: use spinlock to protect concurrent accesses bigben driver has a worker that may access data concurrently. Proct the accesses using a spinlock. Fixes: 256a90ed9e46 ("HID: hid-bigbenff: driver for BigBen Interactive PS3OFMINIPAD gamepad") Signed-off-by: Pietro Borrello Link: https://lore.kernel.org/r/20230125-hid-unregister-leds-v4-1-7860c5763c38@diag.uniroma1.it Signed-off-by: Benjamin Tissoires commit 8843e06f67b14f71c044bf6267b2387784c7e198 Author: Mukesh Ojha Date: Tue Feb 14 17:36:43 2023 +0530 ring-buffer: Handle race between rb_move_tail and rb_check_pages It seems a data race between ring_buffer writing and integrity check. That is, RB_FLAG of head_page is been updating, while at same time RB_FLAG was cleared when doing integrity check rb_check_pages(): rb_check_pages() rb_handle_head_page(): -------- -------- rb_head_page_deactivate() rb_head_page_set_normal() rb_head_page_activate() We do intergrity test of the list to check if the list is corrupted and it is still worth doing it. So, let's refactor rb_check_pages() such that we no longer clear and set flag during the list sanity checking. [1] and [2] are the test to reproduce and the crash report respectively. 1: ``` read_trace.sh while true; do # the "trace" file is closed after read head -1 /sys/kernel/tracing/trace > /dev/null done ``` ``` repro.sh sysctl -w kernel.panic_on_warn=1 # function tracer will writing enough data into ring_buffer echo function > /sys/kernel/tracing/current_tracer ./read_trace.sh & ./read_trace.sh & ./read_trace.sh & ./read_trace.sh & ./read_trace.sh & ./read_trace.sh & ./read_trace.sh & ./read_trace.sh & ``` 2: ------------[ cut here ]------------ WARNING: CPU: 9 PID: 62 at kernel/trace/ring_buffer.c:2653 rb_move_tail+0x450/0x470 Modules linked in: CPU: 9 PID: 62 Comm: ksoftirqd/9 Tainted: G W 6.2.0-rc6+ Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.15.0-0-g2dd4b9b3f840-prebuilt.qemu.org 04/01/2014 RIP: 0010:rb_move_tail+0x450/0x470 Code: ff ff 4c 89 c8 f0 4d 0f b1 02 48 89 c2 48 83 e2 fc 49 39 d0 75 24 83 e0 03 83 f8 02 0f 84 e1 fb ff ff 48 8b 57 10 f0 ff 42 08 <0f> 0b 83 f8 02 0f 84 ce fb ff ff e9 db RSP: 0018:ffffb5564089bd00 EFLAGS: 00000203 RAX: 0000000000000000 RBX: ffff9db385a2bf81 RCX: ffffb5564089bd18 RDX: ffff9db281110100 RSI: 0000000000000fe4 RDI: ffff9db380145400 RBP: ffff9db385a2bf80 R08: ffff9db385a2bfc0 R09: ffff9db385a2bfc2 R10: ffff9db385a6c000 R11: ffff9db385a2bf80 R12: 0000000000000000 R13: 00000000000003e8 R14: ffff9db281110100 R15: ffffffffbb006108 FS: 0000000000000000(0000) GS:ffff9db3bdcc0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005602323024c8 CR3: 0000000022e0c000 CR4: 00000000000006e0 Call Trace: ring_buffer_lock_reserve+0x136/0x360 ? __do_softirq+0x287/0x2df ? __pfx_rcu_softirq_qs+0x10/0x10 trace_function+0x21/0x110 ? __pfx_rcu_softirq_qs+0x10/0x10 ? __do_softirq+0x287/0x2df function_trace_call+0xf6/0x120 0xffffffffc038f097 ? rcu_softirq_qs+0x5/0x140 rcu_softirq_qs+0x5/0x140 __do_softirq+0x287/0x2df run_ksoftirqd+0x2a/0x30 smpboot_thread_fn+0x188/0x220 ? __pfx_smpboot_thread_fn+0x10/0x10 kthread+0xe7/0x110 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x2c/0x50 ---[ end trace 0000000000000000 ]--- [ crash report and test reproducer credit goes to Zheng Yejian] Link: https://lore.kernel.org/linux-trace-kernel/1676376403-16462-1-git-send-email-quic_mojha@quicinc.com Cc: Cc: stable@vger.kernel.org Fixes: 1039221cc278 ("ring-buffer: Do not disable recording when there is an iterator") Reported-by: Zheng Yejian Signed-off-by: Mukesh Ojha Signed-off-by: Steven Rostedt (Google) commit 5e53e5c7edc6d69b8cb48b3b370cfe531e4b4132 Author: Björn Töpel Date: Tue Feb 14 17:12:53 2023 +0100 selftests/bpf: Cross-compile bpftool When the BPF selftests are cross-compiled, only the a host version of bpftool is built. This version of bpftool is used on the host-side to generate various intermediates, e.g., skeletons. The test runners are also using bpftool, so the Makefile will symlink bpftool from the selftest/bpf root, where the test runners will look the tool: | $(Q)ln -sf $(if $2,..,.)/tools/build/bpftool/bootstrap/bpftool \ | $(OUTPUT)/$(if $2,$2/)bpftool There are two problems for cross-compilation builds: 1. There is no native (cross-compilation target) of bpftool 2. The bootstrap/bpftool is never cross-compiled (by design) Make sure that a native/cross-compiled version of bpftool is built, and if CROSS_COMPILE is set, symlink the native/non-bootstrap version. Acked-by: Quentin Monnet Signed-off-by: Björn Töpel Link: https://lore.kernel.org/r/20230214161253.183458-1-bjorn@kernel.org Signed-off-by: Alexei Starovoitov commit 213aacb8a27b1a550edc7641aed818cffa8354b9 Author: David Vernet Date: Tue Feb 14 16:35:53 2023 -0600 bpf, docs: Add myself to BPF docs MAINTAINERS entry In commit 7e2a9ebe8126 ("docs, bpf: Ensure IETF's BPF mailing list gets copied for ISA doc changes"), a new MAINTAINERS entry was added for any BPF IETF documentation updates for the ongoing standardization process. I've been making it a point to try and review as many BPF documentation patches as possible, and have made a committment to Alexei to consistently review BPF standardization patches going forward. This patch adds my name as a reviewer to the MAINTAINERS entry for the standardization effort. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230214223553.78353-1-void@manifault.com Signed-off-by: Alexei Starovoitov commit 524581d1216411a807d34181cb880d991fcb4b96 Author: Tiezhu Yang Date: Wed Feb 15 19:01:07 2023 +0800 selftests/bpf: Fix build error for LoongArch There exists build error when make -C tools/testing/selftests/bpf/ on LoongArch: BINARY test_verifier In file included from test_verifier.c:27: tools/include/uapi/linux/bpf_perf_event.h:14:28: error: field 'regs' has incomplete type 14 | bpf_user_pt_regs_t regs; | ^~~~ make: *** [Makefile:577: tools/testing/selftests/bpf/test_verifier] Error 1 make: Leaving directory 'tools/testing/selftests/bpf' Add missing uapi header for LoongArch to use the following definition: typedef struct user_pt_regs bpf_user_pt_regs_t; Signed-off-by: Tiezhu Yang Link: https://lore.kernel.org/r/1676458867-22052-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Alexei Starovoitov commit e2d323a1f009cbeb4fbc0bad81bf44d6401bd359 Author: Bagas Sanjaya Date: Wed Feb 15 19:32:52 2023 +0700 Documentation: bpf: Add missing line break separator in node_data struct code block Stephen Rothwell reported htmldocs warning when merging bpf-next tree, which was the same warning as reported by kernel test robot: Documentation/bpf/graph_ds_impl.rst:62: ERROR: Error in "code-block" directive: maximum 1 argument(s) allowed, 12 supplied. The error is due to Sphinx confuses node_data struct declaration with code-block directive option. Fix the warning by separating the code-block marker with node_data struct declaration. Link: https://lore.kernel.org/linux-next/20230215144505.4751d823@canb.auug.org.au/ Link: https://lore.kernel.org/linux-doc/202302151123.wUE5FYFx-lkp@intel.com/ Fixes: c31315c3aa0929 ("bpf, documentation: Add graph documentation for non-owning refs") Reported-by: Stephen Rothwell Reported-by: kernel test robot Signed-off-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20230215123253.41552-3-bagasdotme@gmail.com Signed-off-by: Alexei Starovoitov commit 6828e402d06f7c574430b61c05db784cd847b19f Author: Alain Volmat Date: Thu Feb 9 10:16:54 2023 +0100 thermal/drivers/st: Remove syscfg based driver The syscfg based thermal driver is only supporting STiH415 STiH416 and STiD127 platforms which are all no more supported. We can thus safely remove this driver since the remaining STi platform STiH407/STiH410 and STiH418 are all using the memmap based thermal driver. Signed-off-by: Alain Volmat Link: https://lore.kernel.org/r/20230209091659.1409-7-avolmat@me.com Signed-off-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit 9272d2d43b6e532d0c0b6d3a597cf75c9ca1e183 Author: Daniel Lezcano Date: Mon Feb 6 16:34:29 2023 +0100 thermal: Remove core header inclusion from drivers As the name states "thermal_core.h" is the header file for the core components of the thermal framework. Too many drivers are including it. Hopefully the recent cleanups helped to self encapsulate the code a bit more and prevented the drivers to need this header. Remove this inclusion in every place where it is possible. Some other drivers did a confusion with the core header and the one exported in linux/thermal.h. They include the former instead of the latter. The changes also fix this. The tegra/soctherm driver still remains as it uses an internal function which need to be replaced. The Intel HFI driver uses the netlink internal framework core and should be changed to prevent to deal with the internals. No functional changes intended. Signed-off-by: Daniel Lezcano Reviewed-by: Miquel Raynal # armada_thermal.c Reviewed-by: Kunihiko Hayashi # uniphier_thermal.c Reviewed-by: Niklas Söderlund # rcar_gen3_thermal.c Reviewed-by: Neil Armstrong # amlogic_thermal.c Acked-by: Florian Fainelli # bcm2835_thermal.c Acked-by: Thierry Reding # tegra30-tsensor.c Link: https://lore.kernel.org/r/20230206153432.1017282-1-daniel.lezcano@linaro.org Signed-off-by: Rafael J. Wysocki commit ef1ab1657fda1fd38a082b5652a2bbc6d510ffff Author: Vibhav Pant Date: Sat Feb 11 13:49:35 2023 +0530 tools/lib/thermal: Fix include path for libnl3 in pkg-config file. Fixes pkg-config returning malformed CFLAGS for libthermal. Signed-off-by: Vibhav Pant Link: https://lore.kernel.org/r/20230211081935.62690-1-vibhavp@gmail.com Signed-off-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit 15cc25829a97c3957e520e971868aacc84341317 Author: Yongqin Liu Date: Fri Feb 10 22:15:07 2023 +0800 thermal/drivers/hisi: Drop second sensor hi3660 The commit 74c8e6bffbe1 ("driver core: Add __alloc_size hint to devm allocators") exposes a panic "BRK handler: Fatal exception" on the hi3660_thermal_probe funciton. This is because the function allocates memory for only one sensors array entry, but tries to fill up a second one. Fix this by removing the unneeded second access. Fixes: 7d3a2a2bbadb ("thermal/drivers/hisi: Fix number of sensors on hi3660") Signed-off-by: Yongqin Liu Link: https://lore.kernel.org/linux-mm/20221101223321.1326815-5-keescook@chromium.org/ Link: https://lore.kernel.org/r/20230210141507.71014-1-yongqin.liu@linaro.org Signed-off-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit 47b2d3d2ed6c5c20f3521d5b615ffc92ed18b974 Author: Niklas Söderlund Date: Wed Feb 8 20:03:33 2023 +0100 thermal/drivers/rcar_gen3_thermal: Fix device initialization The thermal zone is registered before the device is register and the thermal coefficients are calculated, providing a window for very incorrect readings. The reason why the zone was register before the device was fully initialized was that the presence of the set_trips() callback is used to determine if the driver supports interrupt or not, as it is not defined if the device is incapable of interrupts. Fix this by using the operations structure in the private data instead of the zone to determine if interrupts are available or not, and initialize the device before registering the zone. Signed-off-by: Niklas Söderlund Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/20230208190333.3159879-4-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit aef43e04937ea819c6c1b35030b48f06f73488e0 Author: Niklas Söderlund Date: Wed Feb 8 20:03:32 2023 +0100 thermal/drivers/rcar_gen3_thermal: Create device local ops struct The callback operations are modified on a driver global level. If one device tree description do not define interrupts, the set_trips() operation was disabled globally for all users of the driver. Fix this by creating a device local copy of the operations structure and modify the copy depending on what the device can do. Signed-off-by: Niklas Söderlund Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/20230208190333.3159879-3-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit 1c63f8cd018db726e6cddcbb5abd069fab0e9cea Author: Niklas Söderlund Date: Wed Feb 8 20:03:31 2023 +0100 thermal/drivers/rcar_gen3_thermal: Do not call set_trips() when resuming There is no need to explicitly call set_trips() when resuming from suspend. The thermal framework calls thermal_zone_device_update() that restores the trip points. Suggested-by: Daniel Lezcano Signed-off-by: Niklas Söderlund Link: https://lore.kernel.org/r/20230208190333.3159879-2-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit 883d1552997bedcf6e8eca3c65aa2dc5b28d160f Author: Geert Uytterhoeven Date: Thu Feb 9 17:11:54 2023 +0100 thermal/drivers/rcar_gen3: Add support for R-Car V4H Add support for the Thermal Sensor/Chip Internal Voltage Monitor/Core Voltage Monitor (THS/CIVM/CVM) on the Renesas R-Car V4H (R8A779G0) SoC. According to the R-Car V4H Hardware User's Manual Rev. 0.70, the (preliminary) conversion formula for the thermal sensor is the same as for most other R-Car Gen3 and Gen4 SoCs, while the (preliminary) conversion formula for the chip internal voltage monitor differs. As the driver only uses the former, no further changes are needed. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/852048eb5f4cc001be7a97744f4c5caea912d071.1675958665.git.geert+renesas@glider.be Signed-off-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit 4c27a32c67e11fbc4356f4107c9ca33abcf2af3b Author: Geert Uytterhoeven Date: Thu Feb 9 17:11:53 2023 +0100 dt-bindings: thermal: rcar-gen3-thermal: Add r8a779g0 support Document support for the Thermal Sensor/Chip Internal Voltage Monitor/Core Voltage Monitor (THS/CIVM/CVM) on the Renesas R-Car V4H (R8A779G0) SoC. Unlike most other R-Car Gen3 and Gen4 SoCs, it has 4 instead of 3 sensors, so increase the maximum number of reg tuples. Just like other R-Car Gen4 SoCs, interrupts are not routed to the INTC-AP but to the ECM. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/11f740522ec479011cc8eef6bb450603be394def.1675958665.git.geert+renesas@glider.be Signed-off-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit f5f633b18234cecb0e6ee6e5fbb358807dda15c3 Author: Balsam CHIHI Date: Thu Feb 9 11:56:26 2023 +0100 thermal/drivers/mediatek: Add the Low Voltage Thermal Sensor driver The Low Voltage Thermal Sensor (LVTS) is a multiple sensors, multi controllers contained in a thermal domain. A thermal domains can be the MCU or the AP. Each thermal domains contain up to seven controllers, each thermal controller handle up to four thermal sensors. The LVTS has two Finite State Machines (FSM), one to handle the functionin temperatures range like hot or cold temperature and another one to handle monitoring trip point. The FSM notifies via interrupts when a trip point is crossed. The interrupt is managed at the thermal controller level, so when an interrupt occurs, the driver has to find out which sensor triggered such an interrupt. The sampling of the thermal can be filtered or immediate. For the former, the LVTS measures several points and applies a low pass filter. Signed-off-by: Balsam CHIHI Reviewed-by: AngeloGioacchino Del Regno On MT8195 Tomato Chromebook: Tested-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230209105628.50294-5-bchihi@baylibre.com Signed-off-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit 498e2f7a6e69dcbca24715de2b4b97569fdfeff4 Author: Balsam CHIHI Date: Thu Feb 9 11:56:24 2023 +0100 dt-bindings: thermal: mediatek: Add LVTS thermal controllers Add LVTS thermal controllers dt-binding definition for mt8192 and mt8195. Signed-off-by: Balsam CHIHI Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230209105628.50294-3-bchihi@baylibre.com Signed-off-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit fad399ebdd67f602f306b524e6f62c3570943a48 Author: Balsam CHIHI Date: Thu Feb 9 11:56:23 2023 +0100 thermal/drivers/mediatek: Relocate driver to mediatek folder Add MediaTek proprietary folder to upstream more thermal zone and cooler drivers, relocate the original thermal controller driver to it, and rename it as "auxadc_thermal.c" to show its purpose more clearly. Signed-off-by: Balsam CHIHI Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230209105628.50294-2-bchihi@baylibre.com Signed-off-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit a29cbd76aaf63f5493e962aa2fbaadcdc4615143 Author: Vincent Guittot Date: Thu Feb 2 11:28:12 2023 +0100 tools/lib/thermal: Fix thermal_sampling_exit() thermal_sampling_init() suscribes to THERMAL_GENL_SAMPLING_GROUP_NAME group so thermal_sampling_exit() should unsubscribe from the same group. Fixes: 47c4b0de080a ("tools/lib/thermal: Add a thermal library") Signed-off-by: Vincent Guittot Link: https://lore.kernel.org/r/20230202102812.453357-1-vincent.guittot@linaro.org Signed-off-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit badf1f90502d3fc627a18880dfafd8c636699baf Merge: c3bd6d539f347 fef1f0be10c61 Author: Rafael J. Wysocki Date: Wed Feb 15 17:18:08 2023 +0100 Merge branch 'thermal-intel' Merge thermal control changes related to Intel platforms for 6.3-rc1: - Rework ACPI helper functions for thermal control to retrieve a trip point temperature instead of initializing a trip point objetc (Rafael Wysocki). - Clean up and improve the int340x thermal driver ((Rafael Wysocki). - Simplify and clean up the intel_pch thermal driver ((Rafael Wysocki). - Fix the Intel powerclamp thermal driver and make it use the common idle injection framework (Srinivas Pandruvada). - Add two module parameters, cpumask and max_idle, to the Intel powerclamp thermal driver to allow it to affect only a specific subset of CPUs instead of all of them (Srinivas Pandruvada). - Make the Intel quark_dts thermal driver Use generic trip point objects instead of its own trip point representation (Daniel Lezcano). - Add toctree entry for thermal documents and fix two issues in the Intel powerclamp driver documentation (Bagas Sanjaya). * thermal-intel: (25 commits) Documentation: powerclamp: Fix numbered lists formatting Documentation: powerclamp: Escape wildcard in cpumask description Documentation: admin-guide: Add toctree entry for thermal docs thermal: intel: powerclamp: Add two module parameters Documentation: admin-guide: Move intel_powerclamp documentation thermal: intel: powerclamp: Fix duration module parameter thermal: intel: powerclamp: Return last requested state as cur_state thermal: intel: quark_dts: Use generic trip points thermal: intel: powerclamp: Use powercap idle-inject feature powercap: idle_inject: Add update callback powercap: idle_inject: Export symbols thermal: intel: powerclamp: Fix cur_state for multi package system thermal: intel: intel_pch: Drop struct board_info thermal: intel: intel_pch: Rename board ID symbols thermal: intel: intel_pch: Fold suspend and resume routines into their callers thermal: intel: intel_pch: Fold two functions into their callers thermal: intel: intel_pch: Eliminate device operations object thermal: intel: intel_pch: Rename device operations callbacks thermal: intel: intel_pch: Eliminate redundant return pointers thermal: intel: intel_pch: Make pch_wpt_add_acpi_psv_trip() return int ... commit 1683ed16ff1a51705f58e8083ed93a7428a543f2 Author: Fabio M. De Francesco Date: Fri Jan 27 22:54:52 2023 +0100 fs/nfs: Replace kmap_atomic() with kmap_local_page() in dir.c kmap_atomic() is deprecated in favor of kmap_local_page(). 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 the functions of dir.c 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()). Therefore, replace kmap_atomic() with kmap_local_page() in fs/nfs/dir.c. Tested in a QEMU/KVM x86_32 VM, 6GB RAM, booting a kernel with HIGHMEM64GB enabled. Suggested-by: Ira Weiny Signed-off-by: Fabio M. De Francesco Reviewed-by: Luis Chamberlain Signed-off-by: Anna Schumaker commit 76f5aaabce492aa6991c28c96bb78b00b05d06c5 Author: Andy Shevchenko Date: Wed Feb 15 15:23:43 2023 +0200 ASoC: soc-ac97: Return correct error codes With the switching to dev_err_probe(), during the conversion of GPIO calls, the return code is passed is a paratemer to it. At the same time a copy'n'paste mistake was made, so the wrong variable has been taken for the error reporting. Fix this. Fixes: 3ee0d39c50dc ("ASoC: soc-ac97: Convert to agnostic GPIO API") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230215132343.35547-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit fdff966bfde7cf0c85562d2bfb1ff1ba83da5f7b Author: Lucas Tanure Date: Wed Feb 15 13:28:51 2023 +0000 ASoC: soc-dapm.h: fixup warning struct snd_pcm_substream not declared Add struct snd_pcm_substream forward declaration Fixes: 078a85f2806f ("ASoC: dapm: Only power up active channels from a DAI") Signed-off-by: Lucas Tanure Reviewed-by: Charles Keepax Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230215132851.1626881-1-lucas.tanure@collabora.com Signed-off-by: Mark Brown commit c3bd6d539f34784b235c7070edba978f67516372 Merge: f364beb5b6734 5bbafd4362661 Author: Rafael J. Wysocki Date: Wed Feb 15 17:08:30 2023 +0100 Merge branch 'thermal-core' Merge thermal control core changes for 6.3-rc1: - Clean up thermal device unregistration code (Viresh Kumar). - Fix and clean up thermal control core initialization error code paths (Daniel Lezcano). - Relocate the trip points handling code into a separate file (Daniel Lezcano). - Make the thermal core fail registration of thermal zones and cooling devices if the thermal class has not been registered (Rafael Wysocki). - Make the core thermal control code use sysfs_emit_at() instead of scnprintf() where applicable (ye xingchen). * thermal-core: thermal: core: Use sysfs_emit_at() instead of scnprintf() thermal: Fail object registration if thermal class is not registered thermal/core: Move the thermal trip code to a dedicated file thermal/core: Remove unneeded ida_destroy() thermal/core: Fix unregistering netlink at thermal init time thermal: core: Use device_unregister() instead of device_del/put() thermal: core: Move cdev cleanup to thermal_release() commit 28d4411fc3b58d7ef2cd00060c068a5d90ee9700 Author: Olga Kornievskaia Date: Fri Jan 20 13:40:20 2023 -0500 pNFS/filelayout: treat GETDEVICEINFO errors as layout failure When GETDEVICEINFO call fails, return the layout and fall back to MDS. Signed-off-by: Olga Kornievskaia Signed-off-by: Anna Schumaker commit e6a0b671880207566e1ece983bf989dde60bc1d7 Author: Christophe JAILLET Date: Wed Feb 15 14:01:28 2023 +0100 spi: synquacer: Fix timeout handling in synquacer_spi_transfer_one() wait_for_completion_timeout() never returns a <0 value. It returns either on timeout or a positive value (at least 1, or number of jiffies left till timeout) So, fix the error handling path and return -ETIMEDOUT should a timeout occur. Fixes: b0823ee35cf9 ("spi: Add spi driver for Socionext SynQuacer platform") Signed-off-by: Christophe JAILLET Acked-by: Jassi Brar Link: https://lore.kernel.org/r/c2040bf3cfa201fd8890cfab14fa5a701ffeca14.1676466072.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit 3e2a036827ccb33e93bc6faa66ca40991963593c Author: Dave Wysochanski Date: Mon Jan 23 11:58:47 2023 -0500 Documentation: Fix sysfs path for the NFSv4 client identifier The sysfs path for the NFS4 client identfier should start with the path component of 'nfs' for the kset, and then the 'net' path component for the netns object, followed by the 'nfs_client' path component for the NFS client kobject, and ending with 'identifier' for the netns_client_id kobj_attribute. Fixes: a28faaddb2be ("Documentation: Add an explanation of NFSv4 client identifiers") Link: https://bugzilla.redhat.com/show_bug.cgi?id=1801326 Reviewed-by: Chuck Lever Signed-off-by: Dave Wysochanski Signed-off-by: Anna Schumaker commit fb80ef67e8ff6a00d3faad4cb348dafdb8eccfd8 Author: Bjorn Andersson Date: Mon Jan 9 14:39:31 2023 -0800 rpmsg: glink: Release driver_override Upon termination of the rpmsg_device, driver_override needs to be freed to avoid leaking the potentially assigned string. Fixes: 42cd402b8fd4 ("rpmsg: Fix kfree() of static memory on setting driver_override") Fixes: 39e47767ec9b ("rpmsg: Add driver_override device attribute for rpmsg_device") Reviewed-by: Chris Lew Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109223931.1706429-1-quic_bjorande@quicinc.com commit 4730515378a70064581b27ed112fcfc6f2a379ca Author: Tigran Mkrtchyan Date: Tue Feb 7 18:46:35 2023 +0100 nfs42: do not fail with EIO if ssc returns NFS4ERR_OFFLOAD_DENIED The NFSv4.2 server even if supports intra-SSC might prefer that for a particular file a classic copy is performed. As returning ENOTSUPP will clear the SSC capability of the server by the client, server might return NFS4ERR_OFFLOAD_DENIED (well, spec talks about remote servers there). Update nfs42_proc_copy to handle NFS4ERR_OFFLOAD_DENIED as ENOTSUPP, but without clearing NFS_CAP_COPY bit. Signed-off-by: Tigran Mkrtchyan Signed-off-by: Anna Schumaker commit 8038510b1fe443ffbc0e356db5f47cbb8678a594 Author: Imre Deak Date: Wed Feb 8 13:42:57 2023 +0200 drm/i915: Fix system suspend without fbdev being initialized If fbdev is not initialized for some reason - in practice on platforms without display - suspending fbdev should be skipped during system suspend, fix this up. While at it add an assert that suspending fbdev only happens with the display present. This fixes the following: [ 91.227923] PM: suspend entry (s2idle) [ 91.254598] Filesystems sync: 0.025 seconds [ 91.270518] Freezing user space processes [ 91.272266] Freezing user space processes completed (elapsed 0.001 seconds) [ 91.272686] OOM killer disabled. [ 91.272872] Freezing remaining freezable tasks [ 91.274295] Freezing remaining freezable tasks completed (elapsed 0.001 seconds) [ 91.659622] BUG: kernel NULL pointer dereference, address: 00000000000001c8 [ 91.659981] #PF: supervisor write access in kernel mode [ 91.660252] #PF: error_code(0x0002) - not-present page [ 91.660511] PGD 0 P4D 0 [ 91.660647] Oops: 0002 [#1] PREEMPT SMP NOPTI [ 91.660875] CPU: 4 PID: 917 Comm: bash Not tainted 6.2.0-rc7+ #54 [ 91.661185] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS edk2-20221117gitfff6d81270b5-9.fc37 unknown [ 91.661680] RIP: 0010:mutex_lock+0x19/0x30 [ 91.661914] Code: 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 44 00 00 53 48 89 fb e8 62 d3 ff ff 31 c0 65 48 8b 14 25 00 15 03 00 48 0f b1 13 75 06 5b c3 cc cc cc cc 48 89 df 5b eb b4 0f 1f 40 [ 91.662840] RSP: 0018:ffffa1e8011ffc08 EFLAGS: 00010246 [ 91.663087] RAX: 0000000000000000 RBX: 00000000000001c8 RCX: 0000000000000000 [ 91.663440] RDX: ffff8be455eb0000 RSI: 0000000000000001 RDI: 00000000000001c8 [ 91.663802] RBP: ffff8be459440000 R08: ffff8be459441f08 R09: ffffffff8e1432c0 [ 91.664167] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000001 [ 91.664532] R13: 00000000000001c8 R14: 0000000000000000 R15: ffff8be442f4fb20 [ 91.664905] FS: 00007f28ffc16740(0000) GS:ffff8be4bb900000(0000) knlGS:0000000000000000 [ 91.665334] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 91.665626] CR2: 00000000000001c8 CR3: 0000000114926006 CR4: 0000000000770ee0 [ 91.665988] PKRU: 55555554 [ 91.666131] Call Trace: [ 91.666265] [ 91.666381] intel_fbdev_set_suspend+0x97/0x1b0 [i915] [ 91.666738] i915_drm_suspend+0xb9/0x100 [i915] [ 91.667029] pci_pm_suspend+0x78/0x170 [ 91.667234] ? __pfx_pci_pm_suspend+0x10/0x10 [ 91.667461] dpm_run_callback+0x47/0x150 [ 91.667673] __device_suspend+0x10a/0x4e0 [ 91.667880] dpm_suspend+0x134/0x270 [ 91.668069] dpm_suspend_start+0x79/0x80 [ 91.668272] suspend_devices_and_enter+0x11b/0x890 [ 91.668526] pm_suspend.cold+0x270/0x2fc [ 91.668737] state_store+0x46/0x90 [ 91.668916] kernfs_fop_write_iter+0x11b/0x200 [ 91.669153] vfs_write+0x1e1/0x3a0 [ 91.669336] ksys_write+0x53/0xd0 [ 91.669510] do_syscall_64+0x58/0xc0 [ 91.669699] ? syscall_exit_to_user_mode_prepare+0x18e/0x1c0 [ 91.669980] ? syscall_exit_to_user_mode_prepare+0x18e/0x1c0 [ 91.670278] ? syscall_exit_to_user_mode+0x17/0x40 [ 91.670524] ? do_syscall_64+0x67/0xc0 [ 91.670717] ? __irq_exit_rcu+0x3d/0x140 [ 91.670931] entry_SYSCALL_64_after_hwframe+0x72/0xdc [ 91.671202] RIP: 0033:0x7f28ffd14284 v2: CC stable. (Jani) Fixes: f8cc091e0530 ("drm/i915/fbdev: suspend HPD before fbdev unregistration") References: https://gitlab.freedesktop.org/drm/intel/-/issues/8015 Reported-and-tested-by: iczero Cc: Andrzej Hajda Cc: iczero Cc: # v6.1+ Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230208114300.3123934-2-imre.deak@intel.com (cherry picked from commit 9542d708409a41449e99c9a464deb5e062c4bee2) Signed-off-by: Jani Nikula commit 6a8b2e4984f73f8d00c8c16b87a8b115d34088e4 Author: Lucas De Marchi Date: Mon Feb 6 08:54:09 2023 -0800 drm/i915: Fix GEN8_MISCCPCTL Register 0x9424 is not replicated on any platform, so it shouldn't be declared with REG_MCR(). Declaring it with _MMIO() is basically duplicate of the GEN7 version, so just remove the GEN8 and change all the callers to use the right functions. Old versions of the gen8 bspec page used to contain a table with MCR registers, apparently implying 0x9400 - 0x94ff registers were replicated. However that table went away and there is no information related to the ranges for gen8 anymore. Moreover the current behavior of the driver wouldn't do anything special for 0x9424 since there is no equivalent table in intel_gt_mcr.c: the driver would just fallback to intel_uncore_{read,write}(). Therefore, do not care about the possible special case for gen8 and just use the register as non-MCR for all the platforms. One place doing read + write is also converted to intel_uncore_rmw(). v2: Reword commit message adding the justification wrt gen8 Fixes: a9e69428b1b4 ("drm/i915: Define MCR registers explicitly") Cc: Balasubramani Vivekanandan Cc: Rodrigo Vivi Cc: Gustavo Sousa Cc: Matt Atwood Cc: Ashutosh Dixit Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20230206165410.3056073-1-lucas.demarchi@intel.com (cherry picked from commit 869bace73ae2b4227e57ee3fd994bfa7d4808938) Signed-off-by: Jani Nikula commit effc0905d741b4138806747407baf8de98390c72 Author: Matt Roper Date: Wed Feb 1 14:28:28 2023 -0800 drm/i915/pvc: Annotate two more workaround/tuning registers as MCR XEHPC_LNCFMISCCFGREG0 and XEHPC_L3SCRUB are both in MCR register ranges on PVC (with HALFBSLICE and L3BANK replication respectively), so they should be explicitly declared as MCR registers and use MCR-aware workaround handlers. The workarounds/tuning settings should still be applied properly on PVC even without the MCR annotation, but readback verification on CONFIG_DRM_I915_DEBUG_GEM builds could potentitally give false positive "workaround lost on load" warnings on parts fused such that a unicast read targets a terminated register instance. Fixes: a9e69428b1b4 ("drm/i915: Define MCR registers explicitly") Signed-off-by: Matt Roper Reviewed-by: Gustavo Sousa Link: https://patchwork.freedesktop.org/patch/msgid/20230201222831.608281-1-matthew.d.roper@intel.com (cherry picked from commit 4039e44237e8ebb06f0e4af549fbedf7c41df9db) Signed-off-by: Jani Nikula commit eb66553d356b44c08db56fd5ecea162cfe4bf8fd Author: Jani Nikula Date: Tue Feb 7 13:16:26 2023 +0200 drm/i915/bios: set default backlight controller index With backlight controller set to -1 in intel_panel_init_alloc() to distinguish uninitialized values, and controller later being set only if it's present in VBT, we can end up with -1 for the controller: [drm:intel_bios_init_panel [i915]] VBT backlight PWM modulation frequency 200 Hz, active high, min brightness 0, level 255, controller 4294967295 There's no harm if it happens on platforms that ignore controller due to only one backlight controller being present, like on VLV above, but play it safe. Fixes: bf38bba3e7d6 ("drm/i915: Try to use the correct power sequencer intiially on bxt/glk") Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230207111626.1839645-1-jani.nikula@intel.com (cherry picked from commit a0dcb06d29d9e477e1984dc3859e61568361fc1a) Signed-off-by: Jani Nikula commit c90b155148e9632ae46e6778ee958c319457415f Author: Ville Syrjälä Date: Tue Feb 7 08:43:37 2023 +0200 drm/i915: Pick the backlight controller based on VBT on ICP+ Use the second backlight controller on ICP+ if the VBT asks us to do so. On pre-MTP we also check the chicken bit to make sure the pins have been correctly muxed by the firmware. Cc: stable@vger.kernel.org Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8016 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230207064337.18697-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula (cherry picked from commit b33771546309b46b681388b3540b69a75a0e2e69) Signed-off-by: Jani Nikula commit 14e591a1930c2790fe862af5b01ee3ca587f752f Author: Ville Syrjälä Date: Tue Feb 7 08:43:36 2023 +0200 drm/i915: Populate encoder->devdata for DSI on icl+ We now have some eDP+DSI dual panel systems floating around where the DSI panel is the secondary LFP and thus needs to consult "panel type 2" in VBT in order to locate all the other panel type dependant stuff correctly. To that end we need to pass in the devdata to intel_bios_init_panel_late(), otherwise it'll just assume we want the primary panel type. So let's try to just populate the vbt.ports[] stuff and encoder->devdata for icl+ DSI panels as well. We can't do this on older platforms as there we risk a DSI port aliasing with a HDMI/DP port, which is a totally legal thing as the DSI ports live in their own little parallel universe. Cc: stable@vger.kernel.org Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8016 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230207064337.18697-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula (cherry picked from commit ba00eb6a4bfbe5194ddda50730aba063951f8ce0) Signed-off-by: Jani Nikula commit 8f9f5fb94dbea843621740e6b25b3b430a83cf29 Author: Ville Syrjälä Date: Tue Feb 7 08:43:35 2023 +0200 drm/i915: Fix VBT DSI DVO port handling Turns out modern (icl+) VBTs still declare their DSI ports as MIPI-A and MIPI-C despite the PHYs now being A and B. Remap appropriately to allow the panels declared as MIPI-C to work. Cc: stable@vger.kernel.org Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8016 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230207064337.18697-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula (cherry picked from commit 118b5c136c04da705b274b0d39982bb8b7430fc5) Signed-off-by: Jani Nikula commit 679caae16175d17467ee1ad1f05dd72d8d4b0973 Author: Matt Atwood Date: Wed Feb 1 15:28:01 2023 -0800 drm/i915: Fix memory leaks in scatterlist This patch fixes memory leaks on error escapes in i915_scatterlist.c Fixes: c3bfba9a2225 ("drm/i915: Check for integer truncation on scatterlist creation") Cc: Chris Wilson Signed-off-by: Matt Atwood Reviewed-by: Harish Chegondi Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20230201232801.123684-1-matthew.s.atwood@intel.com (cherry picked from commit 389b9d91dd57fd2d4428bd0c19ed1cacf2fe918d) Signed-off-by: Jani Nikula commit fe7f56a7adfbb17bba2454fd97fd97caf9dbddd5 Author: Bagas Sanjaya Date: Fri Feb 3 17:02:13 2023 +0700 drm/i915/doc: Escape wildcard in method names Stephen Rothwell reported htmldocs warnings: Documentation/gpu/i915:64: drivers/gpu/drm/i915/gt/intel_workarounds.c:32: WARNING: Inline emphasis start-string without end-string. Documentation/gpu/i915:64: drivers/gpu/drm/i915/gt/intel_workarounds.c:57: WARNING: Inline emphasis start-string without end-string. Documentation/gpu/i915:64: drivers/gpu/drm/i915/gt/intel_workarounds.c:66: WARNING: Inline emphasis start-string without end-string. Escape wildcards in *_ctx_workarounds_init(), *_gt_workarounds_init(), and *_whitelist_build() to fix above warnings. Link: https://lore.kernel.org/linux-next/20230203134622.0b6315b9@canb.auug.org.au/ Fixes: 0c3064cf33fbfa ("drm/i915/doc: Document where to implement register workarounds") Reported-by: Stephen Rothwell Signed-off-by: Bagas Sanjaya Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230203100215.31852-2-bagasdotme@gmail.com (cherry picked from commit ec852e3c88d5caa457557406c0c787b56c36dffb) Signed-off-by: Jani Nikula commit 5bab56fff53ce161ed859d9559a10361d4f79578 Author: NeilBrown Date: Wed Feb 8 15:45:38 2023 +1100 NFS: fix disabling of swap When swap is activated to a file on an NFSv4 mount we arrange that the state manager thread is always present as starting a new thread requires memory allocations that might block waiting for swap. Unfortunately the code for allowing the state manager thread to exit when swap is disabled was not tested properly and does not work. This can be seen by examining /proc/fs/nfsfs/servers after disabling swap and unmounting the filesystem. The servers file will still list one entry. Also a "ps" listing will show the state manager thread is still present. There are two problems. 1/ rpc_clnt_swap_deactivate() doesn't walk up the ->cl_parent list to find the primary client on which the state manager runs. 2/ The thread is not woken up properly and it immediately goes back to sleep without checking whether it is really needed. Using nfs4_schedule_state_manager() ensures a proper wake-up. Reported-by: Olga Kornievskaia Fixes: 4dc73c679114 ("NFSv4: keep state manager thread active if swap is enabled") Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit 7e71a13353ff7a3838416992197aa3f2eb0549ea Merge: 73dd3206811af f9901f64536c3 41a337b40e983 52e0452b413d8 Author: Rafael J. Wysocki Date: Wed Feb 15 15:59:48 2023 +0100 Merge branches 'pm-cpuidle', 'pm-core' and 'pm-sleep' Merge cpuidle updates, PM core updates and changes related to system sleep handling for 6.3-rc1: - Make the TEO cpuidle governor check CPU utilization in order to refine idle state selection (Kajetan Puchalski). - Make Kconfig select the haltpoll cpuidle governor when the haltpoll cpuidle driver is selected and replace a default_idle() call in that driver with arch_cpu_idle() which allows MWAIT to be used (Li RongQing). - Add Emerald Rapids Xeon support to the intel_idle driver (Artem Bityutskiy). - Add ARCH_SUSPEND_POSSIBLE dependencies for ARMv4 cpuidle drivers to avoid randconfig build failures (Arnd Bergmann). - Make kobj_type structures used in the cpuidle sysfs interface constant (Thomas Weißschuh). - Make the cpuidle driver registration code update microsecond values of idle state parameters in accordance with their nanosecond values if they are provided (Rafael Wysocki). - Make the PSCI cpuidle driver prevent topology CPUs from being suspended on PREEMPT_RT (Krzysztof Kozlowski). - Document that pm_runtime_force_suspend() cannot be used with DPM_FLAG_SMART_SUSPEND (Richard Fitzgerald). - Add EXPORT macros for exporting PM functions from drivers (Richard Fitzgerald). - Drop "select SRCU" from system sleep Kconfig (Paul E. McKenney). - Remove /** from non-kernel-doc comments in hibernation code (Randy Dunlap). * pm-cpuidle: cpuidle: psci: Do not suspend topology CPUs on PREEMPT_RT cpuidle: driver: Update microsecond values of state parameters as needed cpuidle: sysfs: make kobj_type structures constant cpuidle: add ARCH_SUSPEND_POSSIBLE dependencies intel_idle: add Emerald Rapids Xeon support cpuidle-haltpoll: Replace default_idle() with arch_cpu_idle() cpuidle-haltpoll: select haltpoll governor cpuidle: teo: Introduce util-awareness cpuidle: teo: Optionally skip polling states in teo_find_shallower_state() * pm-core: PM: Add EXPORT macros for exporting PM functions PM: runtime: Document that force_suspend() is incompatible with SMART_SUSPEND * pm-sleep: PM: sleep: Remove "select SRCU" PM: hibernate: swap: don't use /** for non-kernel-doc comments commit 73dd3206811af32695e46ca71e2b0da5dac81ad9 Author: Bagas Sanjaya Date: Wed Feb 15 19:32:53 2023 +0700 Documentation: amd-pstate: disambiguate user space sections kernel test robot reported htmldocs warning: Documentation/admin-guide/pm/amd-pstate.rst:343: WARNING: duplicate label admin-guide/pm/amd-pstate:user space interface in ``sysfs``, other instance in Documentation/admin-guide/pm/amd-pstate.rst The documentation contains two sections with the same "User Space Interface in ``sysfs``" title. The first one deals with per-policy sysfs and the second one is about general attributes (currently only global attributes are documented). Disambiguate title text of both sections to fix the warning. Link: https://lore.kernel.org/linux-doc/202302151041.0SWs1RHK-lkp@intel.com/ Fixes: b9e6a2d47b2565 ("Documentation: amd-pstate: introduce new global sysfs attributes") Reported-by: kernel test robot Signed-off-by: Bagas Sanjaya Reviewed-by: Wyes Karny Acked-by: Huang Rui Signed-off-by: Rafael J. Wysocki commit 6e9d12125fcac048c78f497044370c1da85b552a Author: Wyes Karny Date: Tue Feb 14 07:58:11 2023 +0000 cpufreq: amd-pstate: Fix invalid write to MSR_AMD_CPPC_REQ `amd_pstate_set_epp` function uses `cppc_req_cached` and `epp` variable to update the MSR_AMD_CPPC_REQ register for AMD MSR systems. The recent commit 7cca9a9851a5 ("cpufreq: amd-pstate: avoid uninitialized variable use") changed the sequence of updating cppc_req_cached and writing the MSR_AMD_CPPC_REQ. Therefore while switching from powersave to performance governor and vice-versa in active mode MSR_AMD_CPPC_REQ is set with the previous cached value. To fix this: first update the `cppc_req_cached` variable and then call `amd_pstate_set_epp` function. - Before commit 7cca9a9851a5 ("cpufreq: amd-pstate: avoid uninitialized variable use"): With powersave governor: [ 1.652743] amd_pstate_epp_init: writing to cppc_req_cached = 0x1eff [ 1.652744] amd_pstate_set_epp: writing cppc_req_cached = 0x1eff [ 1.652746] amd_pstate_set_epp: writing min_perf = 30, des_perf = 0, max_perf = 255, epp = 0 Changing to performance governor: [ 300.493842] amd_pstate_epp_init: writing to cppc_req_cached = 0xffff [ 300.493846] amd_pstate_set_epp: writing cppc_req_cached = 0xffff [ 300.493847] amd_pstate_set_epp: writing min_perf = 255, des_perf = 0, max_perf = 255, epp = 0 - After commit 7cca9a9851a5 ("cpufreq: amd-pstate: avoid uninitialized variable use"): With powersave governor: [ 1.646037] amd_pstate_set_epp: writing cppc_req_cached = 0xffff [ 1.646038] amd_pstate_set_epp: writing min_perf = 255, des_perf = 0, max_perf = 255, epp = 0 [ 1.646042] amd_pstate_epp_init: writing to cppc_req_cached = 0x1eff Changing to performance governor: [ 687.117401] amd_pstate_set_epp: writing cppc_req_cached = 0x1eff [ 687.117405] amd_pstate_set_epp: writing min_perf = 30, des_perf = 0, max_perf = 255, epp = 0 [ 687.117419] amd_pstate_epp_init: writing to cppc_req_cached = 0xffff - After this fix: With powersave governor: [ 2.525717] amd_pstate_epp_init: writing to cppc_req_cached = 0x1eff [ 2.525720] amd_pstate_set_epp: writing cppc_req_cached = 0x1eff [ 2.525722] amd_pstate_set_epp: writing min_perf = 30, des_perf = 0, max_perf = 255, epp = 0 Changing to performance governor: [ 3440.152468] amd_pstate_epp_init: writing to cppc_req_cached = 0xffff [ 3440.152473] amd_pstate_set_epp: writing cppc_req_cached = 0xffff [ 3440.152474] amd_pstate_set_epp: writing min_perf = 255, des_perf = 0, max_perf = 255, epp = 0 Fixes: 7cca9a9851a5 ("cpufreq: amd-pstate: avoid uninitialized variable use") Signed-off-by: Wyes Karny Acked-by: Huang Rui Signed-off-by: Rafael J. Wysocki commit 0c2baf6509af1d11310ae4c1c839481a6e9a4bc4 Author: Arnd Bergmann Date: Mon Feb 6 20:40:57 2023 +0100 printf: fix errname.c list On most architectures, gcc -Wextra warns about the list of error numbers containing both EDEADLK and EDEADLOCK: lib/errname.c:15:67: warning: initialized field overwritten [-Woverride-init] 15 | #define E(err) [err + BUILD_BUG_ON_ZERO(err <= 0 || err > 300)] = "-" #err | ^~~ lib/errname.c:172:2: note: in expansion of macro 'E' 172 | E(EDEADLK), /* EDEADLOCK */ | ^ On parisc, a similar error happens with -ECANCELLED, which is an alias for ECANCELED. Make the EDEADLK printing conditional on the number being distinct from EDEADLOCK, and remove the -ECANCELLED bit completely as it can never be hit. To ensure these are correct, add static_assert lines that verify all the remaining aliases are in fact identical to the canonical name. Fixes: 57f5677e535b ("printf: add support for printing symbolic error names") Cc: Petr Mladek Suggested-by: Rasmus Villemoes Acked-by: Uwe Kleine-König Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/all/20210514213456.745039-1-arnd@kernel.org/ Link: https://lore.kernel.org/all/20210927123409.1109737-1-arnd@kernel.org/ Signed-off-by: Arnd Bergmann Reviewed-by: Sergey Senozhatsky Acked-by: Rasmus Villemoes Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20230206194126.380350-1-arnd@kernel.org commit f32309c4d08dbac74d3253ac8310bfcad4e21606 Merge: b7ab6b91b9e7b 2d11eae42d52a a527b0111798e 3082d7efd76a5 Author: Rafael J. Wysocki Date: Wed Feb 15 15:42:59 2023 +0100 Merge branches 'acpi-video', 'acpi-misc' and 'acpi-docs' Merge ACPI backlight driver changes, miscellaneous ACPI-related changes and ACPI-related documentation updates for 6.3-rc1: - Fix Lenovo Ideapad Z570 DMI match in the ACPI backlight driver (Hans de Goede). - Silence missing prototype warnings in some places in the ACPI-related code (Ammar Faizi). - Make kobj_type structures used in the ACPI code constant (Thomas Weißschuh). - Correct spelling in firmware-guide/ACPI (Randy Dunlap). - Clarify the meaning of Explicit and Implicit in the _DSD GPIO properties documentation (Andy Shevchenko). * acpi-video: ACPI: video: Fix Lenovo Ideapad Z570 DMI match * acpi-misc: ACPI: make kobj_type structures constant ACPI: Silence missing prototype warnings * acpi-docs: Documentation: firmware-guide: gpio-properties: Clarify Explicit and Implicit Documentation: firmware-guide/ACPI: correct spelling commit b7ab6b91b9e7b98ce746b22893e45edfc458c231 Merge: 9f4512c2aeca0 17bb7046e7ce0 7de6c3fb6dfbf 91507d25a67c5 53fc7e80f3aa9 Author: Rafael J. Wysocki Date: Wed Feb 15 15:34:12 2023 +0100 Merge branches 'acpi-resource', 'acpi-pmic', 'acpi-battery' and 'acpi-apei' Merge ACPI resources handling changes, ACPI PMIC and battery drivers changes and ACPI APEI changes for 6.3-rc1: - Add two more entries to the ACPI IRQ override quirk list (Adam Niederer, Werner Sembach). - Add a pmic_i2c_address entry for Intel Bay Trail Crystal Cove to allow intel_soc_pmic_exec_mipi_pmic_seq_element() to be used with the Bay Trail Crystal Cove PMIC OpRegion driver (Hans de Goede). - Add comments with DSDT power OpRegion field names to the ACPI PMIC driver (Hans de Goede). - Fix string termination handling in the ACPI battery driver (Armin Wolf). - Limit error type to 32-bit width in the ACPI APEI error injection code (Shuai Xue). * acpi-resource: ACPI: resource: Do IRQ override on all TongFang GMxRGxx ACPI: resource: Add IRQ overrides for MAINGEAR Vector Pro 2 models * acpi-pmic: ACPI: PMIC: Add comments with DSDT power opregion field names ACPI: PMIC: Add pmic_i2c_address to BYT Crystal Cove support * acpi-battery: ACPI: battery: Increase maximum string length ACPI: battery: Fix buffer overread if not NUL-terminated ACPI: battery: Fix missing NUL-termination with large strings * acpi-apei: ACPI: APEI: EINJ: Limit error type to 32-bit width commit 9f4512c2aeca02d75b246fe456e7540043c5e81b Merge: 391712d7536dd e8a0e30b742f7 6ad90f7112921 28a35ac2f5f87 36b20f82b699a Author: Rafael J. Wysocki Date: Wed Feb 15 15:25:26 2023 +0100 Merge branches 'acpi-processor', 'acpi-tables', 'acpi-pnp' and 'acpi-maintainers' Merge ACPI processor driver changes, ACPI table parser changes, ACPI device enumeration changes related to PNP and a MAINTAINERS update related to ACPI for 6.3-rc1: - Drop an unnecessary (void *) conversion from the ACPI processor driver (Zhou jie). - Modify the ACPI processor performance library code to use the "no limit" frequency QoS as appropriate and adjust the intel_pstate driver accordingly (Rafael Wysocki). - Add support for NBFT to the ACPI table parser (Stuart Hayes). - Introduce list of known non-PNP devices to avoid enumerating some of them as PNP devices (Rafael Wysocki). - Add x86 ACPI paths to the ACPI entry in MAINTAINERS to allow scripts to report the actual maintainers information (Rafael Wysocki). * acpi-processor: cpufreq: intel_pstate: Drop ACPI _PSS states table patching ACPI: processor: perflib: Avoid updating frequency QoS unnecessarily ACPI: processor: perflib: Use the "no limit" frequency QoS ACPI: processor: idle: Drop unnecessary (void *) conversion * acpi-tables: ACPI: tables: Add support for NBFT * acpi-pnp: ACPI: PNP: Introduce list of known non-PNP devices * acpi-maintainers: MAINTAINERS: Add x86 ACPI paths to the ACPI entry commit 391712d7536ddba783b10ed4e67447970c3827ae Merge: fda7be2068973 5a9e358f1d1f5 Author: Rafael J. Wysocki Date: Wed Feb 15 15:14:19 2023 +0100 Merge branch 'acpica' Merge ACPICA changes for 6.3-rc1: - Drop port I/O validation for some regions to avoid AML failures due to rejections of legitimate port I/O writes (Mario Limonciello). - Constify acpi_get_handle() pathname argument to allow its callers to pass conts pathnames to it (Sakari Ailus). - Prevent acpi_ns_simple_repair() from crashing in some cases when AE_AML_NO_RETURN_VALUE should be returned (Daniil Tatianin). - Fix typo in CDAT DSMAS struct definition (Lukas Wunner). * acpica: ACPICA: Fix typo in CDAT DSMAS struct definition ACPICA: nsrepair: handle cases without a return value correctly ACPICA: Constify pathname argument for acpi_get_handle() ACPICA: Drop port I/O validation for some regions commit af16544d4abe283e4a1ead6563ae883b9bb35429 Merge: c6cd63f5af392 687bcd03a047e Author: Arnd Bergmann Date: Wed Feb 15 15:05:53 2023 +0100 Merge tag 'qcom-arm64-defconfig-for-6.3-3' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/defconfig Few more Qualcomm ARM64 defconfig updates for v6.3 This enables the drivers needed to support USB Type-C based external display on the SC8280XP laptops. It also enables a couple of core drivers for the Qualcomm SA8775P platform. * tag 'qcom-arm64-defconfig-for-6.3-3' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: defconfig: enable drivers required by the Qualcomm SA8775P platform arm64: defconfig: Enable DisplayPort on SC8280XP laptops Link: https://lore.kernel.org/r/20230215051757.1166709-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 18b68c695ca6f35c24a016c5751bfdefda1d3a3a Merge: 7dbdc16fc85bc 407ef897bd027 Author: Arnd Bergmann Date: Wed Feb 15 15:02:26 2023 +0100 Merge tag 'qcom-arm64-for-6.3-3' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt Last set of Qualcomm ARM64 DTS updates for v6.3 This introduces additional DisplayPort controllers and pmic_glink on SC8280XP (8cx Gen3), which provides support for USB Type-C-based displays on the the Lenovo ThinkPad X13s and the compute reference device. The pmic_glink also provides battery and power supply status. Interrupt-parents are corrected across the SC8280XP PMICs, to allow non-Linux OSs to properly handle interrupts in the various blocks therein. It cleans up the SM8350 base dtsi and introduces GPU support on this platform, as well as enable this for the Hardware Development Kit (HDK). It enables i2c busses on the Fairphone FP4 Lastly it aligns glink node names with bindings across a few platforms, and corrects the compatible for the PON block in the pmk8350 PMIC. * tag 'qcom-arm64-for-6.3-3' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: dts: qcom: msm8996: align RPM G-Link clock-controller node with bindings arm64: dts: qcom: qcs404: align RPM G-Link node with bindings arm64: dts: qcom: ipq6018: align RPM G-Link node with bindings arm64: dts: qcom: sm8550: remove invalid interconnect property from cryptobam arm64: dts: qcom: sc7280: Adjust zombie PWM frequency arm64: dts: qcom: sc8280xp-pmics: Specify interrupt parent explicitly arm64: dts: qcom: sm7225-fairphone-fp4: enable remaining i2c busses arm64: dts: qcom: sm7225-fairphone-fp4: move status property down arm64: dts: qcom: pmk8350: Use the correct PON compatible arm64: dts: qcom: sc8280xp-x13s: Enable external display arm64: dts: qcom: sc8280xp-crd: Introduce pmic_glink arm64: dts: qcom: sc8280xp: Add USB-C-related DP blocks arm64: dts: qcom: sm8350-hdk: enable GPU arm64: dts: qcom: sm8350: add GPU, GMU, GPU CC and SMMU nodes arm64: dts: qcom: sm8350: finish reordering nodes arm64: dts: qcom: sm8350: move more nodes to correct place arm64: dts: qcom: sm8350: reorder device nodes Link: https://lore.kernel.org/r/20230215051530.1165953-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 524af30c931382726b6a46ee4f392fb6e60f8a03 Merge: 4ec98e6db9f24 29e8142b5623b Author: Arnd Bergmann Date: Wed Feb 15 15:00:54 2023 +0100 Merge tag 'qcom-drivers-for-6.3-3' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers One more Qualcomm driver update for 6.3 This introduces the power-supply driver providing battery and power supply status on many recent Qualcomm platforms, including the Qualcomm SC8180X and SC8280XP laptop platforms and the SM8350 mobile platform. It's introduced through the Qualcomm tree due to its dependencies on the pmic_glink driver, which was merged already for v6.3. * tag 'qcom-drivers-for-6.3-3' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: power: supply: Introduce Qualcomm PMIC GLINK power supply Link: https://lore.kernel.org/r/20230215043658.1156472-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit e84183f68edb72e70e232b842d47058cba3476ec Merge: 157ed9cb04306 695fa5a64cf52 Author: Paolo Bonzini Date: Wed Feb 15 08:34:32 2023 -0500 Merge tag 'kvm-x86-selftests-6.3' of https://github.com/kvm-x86/linux into HEAD KVM selftests changes for 6.3: - Cache the CPU vendor (AMD vs. Intel) and use the info to emit the correct hypercall instruction instead of relying on KVM to patch in VMMCALL - A variety of one-off cleanups and fixes commit 157ed9cb04306eae813b7598cf672834cd295b8e Merge: 1c5ec0d433b4b 13738a3647368 Author: Paolo Bonzini Date: Wed Feb 15 08:23:24 2023 -0500 Merge tag 'kvm-x86-pmu-6.3' of https://github.com/kvm-x86/linux into HEAD KVM x86 PMU changes for 6.3: - Add support for created masked events for the PMU filter to allow userspace to heavily restrict what events the guest can use without needing to create an absurd number of events - Clean up KVM's handling of "PMU MSRs to save", especially when vPMU support is disabled - Add PEBS support for Intel SPR commit 1c5ec0d433b4b2af15e7f54366411fd27d7c40b2 Merge: 4f2a5a6b96a00 11b36fe7d4500 Author: Paolo Bonzini Date: Wed Feb 15 08:22:44 2023 -0500 Merge tag 'kvm-x86-mmu-6.3' of https://github.com/kvm-x86/linux into HEAD KVM x86 MMU changes for 6.3: - Fix and cleanup the range-based TLB flushing code, used when KVM is running on Hyper-V - A few one-off cleanups commit 4f2a5a6b96a00544a0d9e40863f492552fd953e7 Merge: cf8e6cf6e7d61 e73ba25fdc241 Author: Paolo Bonzini Date: Wed Feb 15 08:22:09 2023 -0500 Merge tag 'kvm-x86-misc-6.3' of https://github.com/kvm-x86/linux into HEAD KVM x86 changes for 6.3: - Advertise support for Intel's fancy new fast REP string features - Fix a double-shootdown issue in the emergency reboot code - Ensure GIF=1 and disable SVM during an emergency reboot, i.e. give SVM similar treatment to VMX - Update Xen's TSC info CPUID sub-leaves as appropriate - Add support for Hyper-V's extended hypercalls, where "support" at this point is just forwarding the hypercalls to userspace - Clean up the kvm->lock vs. kvm->srcu sequences when updating the PMU and MSR filters - One-off fixes and cleanups commit f9bb7f6a7eb0efd282f7364115f97e652677a29b Author: Arnd Bergmann Date: Wed Feb 15 10:16:56 2023 +0100 x86/build: Make 64-bit defconfig the default Running 'make ARCH=x86 defconfig' on anything other than an x86_64 machine currently results in a 32-bit build, which is rarely what anyone wants these days. Change the default so that the 64-bit config gets used unless the user asks for i386_defconfig, uses ARCH=i386 or runs on a system that "uname -m" identifies as i386/i486/i586/i686. Signed-off-by: Arnd Bergmann Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230215091706.1623070-1-arnd@kernel.org commit 926505cf14258376c3cd244e891c7d739a2a049a Author: Charles Keepax Date: Wed Feb 15 10:58:18 2023 +0000 ASoC: cs35l45: Remove separate namespace for tables Now tables isn't a separate module, definitely no need to have a separate namespace for it. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20230215105818.3315925-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 4dac6f5abc02ffeeb10459c575aba2343363d4ee Author: Charles Keepax Date: Wed Feb 15 10:58:17 2023 +0000 ASoC: cs35l45: Remove separate tables module There is no reason to have a separate module for the tables file it just holds regmap callbacks and register patches used by the main part of the driver. Remove the separate module and merge it into the main driver module. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20230215105818.3315925-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 574fbb95cd9d88bdc9c9c4c64223a38a61d7de9a Author: Mika Westerberg Date: Wed Feb 15 13:00:40 2023 +0200 spi: intel: Check number of chip selects after reading the descriptor The flash decriptor contains the number of flash components that we use to figure out how many flash chips there are connected. Therefore we need to read it first before deciding how many chip selects the controller has. Reported-by: Marcin Witkowski Fixes: 3f03c618bebb ("spi: intel: Add support for second flash chip") Cc: stable@vger.kernel.org Signed-off-by: Mika Westerberg Link: https://lore.kernel.org/r/20230215110040.42186-1-mika.westerberg@linux.intel.com Signed-off-by: Mark Brown commit 91621be65d6812cd74b2ea09573ff9ee0cbf5666 Author: Yang Jihong Date: Wed Feb 15 12:23:24 2023 +0000 perf record: Fix segfault with --overwrite and --max-size When --overwrite and --max-size options of perf record are used together, a segmentation fault occurs. The following is an example: # perf record -e sched:sched* --overwrite --max-size 1K -a -- sleep 1 [ perf record: Woken up 1 times to write data ] perf: Segmentation fault Obtained 12 stack frames. ./perf/perf(+0x197673) [0x55f99710b673] /lib/x86_64-linux-gnu/libc.so.6(+0x3ef0f) [0x7fa45f3cff0f] ./perf/perf(+0x8eb40) [0x55f997002b40] ./perf/perf(+0x1f6882) [0x55f99716a882] ./perf/perf(+0x794c2) [0x55f996fed4c2] ./perf/perf(+0x7b7c7) [0x55f996fef7c7] ./perf/perf(+0x9074b) [0x55f99700474b] ./perf/perf(+0x12e23c) [0x55f9970a223c] ./perf/perf(+0x12e54a) [0x55f9970a254a] ./perf/perf(+0x7db60) [0x55f996ff1b60] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe6) [0x7fa45f3b2c86] ./perf/perf(+0x7dfe9) [0x55f996ff1fe9] Segmentation fault (core dumped) backtrace of the core file is as follows: (gdb) bt #0 record__bytes_written (rec=0x55f99755a200 ) at builtin-record.c:234 #1 record__output_max_size_exceeded (rec=0x55f99755a200 ) at builtin-record.c:242 #2 record__write (map=0x0, size=12816, bf=0x55f9978da2e0, rec=0x55f99755a200 ) at builtin-record.c:263 #3 process_synthesized_event (tool=tool@entry=0x55f99755a200 , event=event@entry=0x55f9978da2e0, sample=sample@entry=0x0, machine=machine@entry=0x55f997893658) at builtin-record.c:618 #4 0x000055f99716a883 in __perf_event__synthesize_id_index (tool=tool@entry=0x55f99755a200 , process=process@entry=0x55f997002aa0 , evlist=0x55f9978928b0, machine=machine@entry=0x55f997893658, from=from@entry=0) at util/synthetic-events.c:1895 #5 0x000055f99716a91f in perf_event__synthesize_id_index (tool=tool@entry=0x55f99755a200 , process=process@entry=0x55f997002aa0 , evlist=, machine=machine@entry=0x55f997893658) at util/synthetic-events.c:1905 #6 0x000055f996fed4c3 in record__synthesize (tail=tail@entry=true, rec=0x55f99755a200 ) at builtin-record.c:1997 #7 0x000055f996fef7c8 in __cmd_record (argc=argc@entry=2, argv=argv@entry=0x7ffc67551260, rec=0x55f99755a200 ) at builtin-record.c:2802 #8 0x000055f99700474c in cmd_record (argc=, argv=0x7ffc67551260) at builtin-record.c:4258 #9 0x000055f9970a223d in run_builtin (p=0x55f997564d88 , argc=10, argv=0x7ffc67551260) at perf.c:330 #10 0x000055f9970a254b in handle_internal_command (argc=10, argv=0x7ffc67551260) at perf.c:384 #11 0x000055f996ff1b61 in run_argv (argcp=, argv=) at perf.c:428 #12 main (argc=, argv=0x7ffc67551260) at perf.c:562 The reason is that record__bytes_written accesses the freed memory rec->thread_data, The process is as follows: __cmd_record -> record__free_thread_data -> zfree(&rec->thread_data) // free rec->thread_data -> record__synthesize -> perf_event__synthesize_id_index -> process_synthesized_event -> record__write -> record__bytes_written // access rec->thread_data We add a member variable "thread_bytes_written" in the struct "record" to save the data size written by the threads. Fixes: 6d57581659f72299 ("perf record: Add support for limit perf output file size") Signed-off-by: Yang Jihong Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Jiwei Sun Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/CAM9d7ci_TRrqBQVQNW8=GwakUr7SsZpYxaaty-S4bxF8zJWyqw@mail.gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit a543f7024e35ea548dd483f06d4c871243663622 Author: Heiner Kallweit Date: Tue Feb 14 22:44:03 2023 +0100 mmc: meson-gx: support platform interrupt as card detect interrupt Use a new mmc core feature and support specifying the card detect gpio interrupt in device tree. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/2bb70611-5dea-1144-51bd-93c46b455392@gmail.com Signed-off-by: Ulf Hansson commit 09b31a6103283577ee407c5c22a9be19fd7f7284 Author: Heiner Kallweit Date: Tue Feb 14 22:42:54 2023 +0100 dt-bindings: mmc: meson-gx: support specifying cd interrupt Support passing a second interrupt as card detect interrupt. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/1c5996a5-491f-39d6-b120-bbef86473729@gmail.com Signed-off-by: Ulf Hansson commit 88f94c782b0ee2297685764f942e7c176d6b89aa Author: Heiner Kallweit Date: Tue Feb 14 22:41:19 2023 +0100 mmc: core: support setting card detect interrupt from drivers On certain platforms like Amlogic Meson gpiod_to_irq() isn't supported due to the design of gpio / interrupt controller. Therefore provide an option for drivers to pass the card detect interrupt number (retrieved e.g. from device tree) to mmc core. Suggested-by refers to the mechanism to pass and store the interrupt. Suggested-by: Ulf Hansson Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/5777f38b-465f-ce48-a87f-5eb8b3c57b0a@gmail.com Signed-off-by: Ulf Hansson commit 9e622229bbf4f2204f7a4bc47f9dffb2307e4949 Author: William Qiu Date: Wed Feb 15 19:32:47 2023 +0800 mmc: starfive: Add sdio/emmc driver support Add sdio/emmc driver support for StarFive JH7110 soc. Tested-by: Conor Dooley Signed-off-by: William Qiu Link: https://lore.kernel.org/r/20230215113249.47727-3-william.qiu@starfivetech.com Signed-off-by: Ulf Hansson commit cf8e6cf6e7d61e5c034f4f7bf94263e133a4955d Merge: 7cb79f433e75b 5bad5d55d884d Author: Paolo Bonzini Date: Wed Feb 15 07:30:43 2023 -0500 Merge tag 'kvm-x86-generic-6.3' of https://github.com/kvm-x86/linux into HEAD Common KVM changes for 6.3: - Account allocations in generic kvm_arch_alloc_vm() - Fix a typo and a stale comment - Fix a memory leak if coalesced MMIO unregistration fails commit 28eb8b5c994881e7fc62b7f15e6bf4a4510bb9be Author: William Qiu Date: Wed Feb 15 19:32:46 2023 +0800 dt-bindings: mmc: Add StarFive MMC module Add documentation to describe StarFive designware mobile storage host controller driver. Signed-off-by: William Qiu Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230215113249.47727-2-william.qiu@starfivetech.com Signed-off-by: Ulf Hansson commit 09e8f154fac2a5e9f2c2dfb98f2a64128b259872 Author: Konrad Dybcio Date: Mon Feb 13 21:55:29 2023 +0100 dt-bindings: mmc: sdhci-msm: Allow 1 icc path Some SoCs (like msm8998) only have a SDHC<->DDR path. Allow this case. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230213205529.2104120-1-konrad.dybcio@linaro.org Signed-off-by: Ulf Hansson commit f613feec700f25231e4cfe515c710b9b7c2d1ad1 Author: Lucas Tanure Date: Mon Feb 13 15:27:39 2023 +0000 dt-bindings: mmc: rockchip-dw-mshc: Add RK3588 compatible string Add RK3588 compatible string for SD interface. Co-developed-by: Shawn Lin Signed-off-by: Shawn Lin Signed-off-by: Lucas Tanure Acked-by: Krzysztof Kozlowski Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20230213152740.359055-1-lucas.tanure@collabora.com Signed-off-by: Ulf Hansson commit 51f5b3056790bc0518e49587996f1e6f3058cca9 Author: Ulf Hansson Date: Mon Feb 13 14:37:07 2023 +0100 mmc: core: Align to common busy polling behaviour for mmc ioctls Let's align to the common busy polling behaviour for mmc ioctls, by updating the below two corresponding parts, that comes into play when using an R1B response for a command. *) A command with an R1B response should be prepared by calling mmc_prepare_busy_cmd(), which make us respects the host's busy timeout constraints. **) When an R1B response is being used and the host also supports HW busy detection, we should skip to poll for busy completion. Suggested-by: Christian Loehle Signed-off-by: Ulf Hansson Reviewed-by: Christian Loehle Link: https://lore.kernel.org/r/20230213133707.27857-1-ulf.hansson@linaro.org commit cb7f0901713930896362c2085a04a840b8ddb572 Author: Kunihiko Hayashi Date: Mon Feb 13 13:52:33 2023 +0900 dt-bindings: mmc: Add resets property to cadence SDHCI binding Cadence SDHCI controller allows reset control support on UniPhier SoC. Add resets property to cadence SDHCI binding. Signed-off-by: Kunihiko Hayashi Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230213045233.32470-1-hayashi.kunihiko@socionext.com Signed-off-by: Ulf Hansson commit 91a3cba783f11c09b11476e64f432b39c933d7e8 Author: Heiner Kallweit Date: Sun Feb 12 22:43:32 2023 +0100 mmc: meson-gx: remove meson_mmc_get_cd MMC core only checks whether return value of .get_cd() equals zero. Therefore -ENOSYS and 1 are effectively the same and the function can be removed. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/16502040-3beb-a3cc-b28d-28184fba0f10@gmail.com Signed-off-by: Ulf Hansson commit 16b492ce0a55735ed6f4c19ee9fb767badb3f19a Author: Sergei Antonov Date: Fri Feb 10 17:38:43 2023 +0300 mmc: moxart: set maximum request/block/segment sizes Per datasheet: maximum block length is 2048 bytes, data length field is in bits 0-23 of the Data Length Register. Also for DMA mode we have to take into account rx/tx buffers' sizes. In my tests this change doubles SD card I/O performance on big files. Before the change Linux used default request size of 4 KB. Signed-off-by: Sergei Antonov Link: https://lore.kernel.org/r/20230210143843.369943-1-saproj@gmail.com Signed-off-by: Ulf Hansson commit 08623d741e94dc9ca033ecb8d04312960a105377 Author: Ye Xingchen Date: Fri Feb 10 16:28:32 2023 +0800 mmc: sdhci-brcmstb: 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/202302101628321403257@zte.com.cn Signed-off-by: Ulf Hansson commit b0ae5b6f3c298a005b73556740526c0e24a5633c Author: Sourabh Jain Date: Fri Dec 16 17:57:08 2022 +0530 powerpc/kexec_file: print error string on usable memory property update failure Print the FDT error description along with the error message if failed to set the "linux,drconf-usable-memory" property in the kdump kernel's FDT. Signed-off-by: Sourabh Jain Acked-by: Hari Bathini Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221216122708.182154-1-sourabhjain@linux.ibm.com commit b16a1756c716235891e298beabd68f3cd6bb5952 Author: Michael S. Tsirkin Date: Thu Dec 22 14:30:13 2022 -0500 virtio_blk: mark all zone fields LE zone is a virtio 1.x feature so all fields are LE, they are handled as such, but have mistakenly been labeled __virtioXX in the header. This results in a bunch of sparse warnings. Use the __leXX tags to make sparse happy. Message-Id: <20221222193214.55146-1-mst@redhat.com> Signed-off-by: Michael S. Tsirkin commit 2a9c844e896b2895cde9fc0276f6243c68d82e70 Author: Michael S. Tsirkin Date: Tue Dec 20 07:37:49 2022 -0500 virtio_blk: zone append in header type tweak virtio blk returns a 64 bit append_sector in an input buffer, in LE format. This field is not tagged as LE correctly, so even though the generated code is ok, we get warnings from sparse: drivers/block/virtio_blk.c:332:33: sparse: sparse: cast to restricted __le64 Make sparse happy by using the correct type. Message-Id: <20221220125154.564265-1-mst@redhat.com> Signed-off-by: Michael S. Tsirkin commit 04e5421e6f61538f510aae9329e77d010159863f Author: Michael S. Tsirkin Date: Tue Dec 20 07:37:49 2022 -0500 virtio_blk: temporary variable type tweak virtblk_result returns blk_status_t which is a bitwise restricted type, so we are not supposed to stuff it in a plain int temporary variable. All we do with it is pass it on to a function expecting blk_status_t so the generated code is ok, but we get warnings from sparse: drivers/block/virtio_blk.c:326:36: sparse: sparse: incorrect type in initializer (different base types) @@ expected int status @@ +got restricted blk_status_t @@ drivers/block/virtio_blk.c:334:33: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted +blk_status_t [usertype] error @@ got int status @@ Make sparse happy by using the correct type. Message-Id: <20221220124152.523531-1-mst@redhat.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Reviewed-by: Chaitanya Kulkarni commit 95bfec41bd3d39b7659cba65b72080420bf5691e Author: Dmitry Fomichev Date: Sat Oct 15 23:41:27 2022 -0400 virtio-blk: add support for zoned block devices This patch adds support for Zoned Block Devices (ZBDs) to the kernel virtio-blk driver. The patch accompanies the virtio-blk ZBD support draft that is now being proposed for standardization. The latest version of the draft is linked at https://github.com/oasis-tcs/virtio-spec/issues/143 . The QEMU zoned device code that implements these protocol extensions has been developed by Sam Li and it is currently in review at the QEMU mailing list. A number of virtblk request structure changes has been introduced to accommodate the functionality that is specific to zoned block devices and, most importantly, make room for carrying the Zoned Append sector value from the device back to the driver along with the request status. The zone-specific code in the patch is heavily influenced by NVMe ZNS code in drivers/nvme/host/zns.c, but it is simpler because the proposed virtio ZBD draft only covers the zoned device features that are relevant to the zoned functionality provided by Linux block layer. includes the following fixup: virtio-blk: fix probe without CONFIG_BLK_DEV_ZONED When building without CONFIG_BLK_DEV_ZONED, VIRTIO_BLK_F_ZONED is excluded from array of driver features. As a result virtio_has_feature panics in virtio_check_driver_offered_feature since that by design verifies that a feature we are checking for is listed in the feature array. To fix, replace the call to virtio_has_feature with a stub. Message-Id: <20221016034127.330942-3-dmitry.fomichev@wdc.com> Co-developed-by: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi Signed-off-by: Dmitry Fomichev Message-Id: <20221220112340.518841-1-mst@redhat.com> Reported-by: Linux Kernel Functional Testing Tested-by: Linux Kernel Functional Testing Reported-by: Xuan Zhuo Debugged-by: Xuan Zhuo Tested-by: Anders Roxell Tested-by: Marek Szyprowski Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit d16c0cd27331179daa86a3a489f50ce409121c80 Author: Ricardo Cañuelo Date: Mon Oct 10 08:43:59 2022 +0200 docs: driver-api: virtio: virtio on Linux Basic doc about Virtio on Linux and a short tutorial on Virtio drivers. includes the following fixup: virtio: fix virtio_config_ops kerneldocs Fixes two warning messages when building htmldocs: warning: duplicate section name 'Note' warning: expecting prototype for virtio_config_ops(). Prototype was for vq_callback_t() instead Message-Id: <20221010064359.1324353-2-ricardo.canuelo@collabora.com> Signed-off-by: Ricardo Cañuelo Reviewed-by: Cornelia Huck Message-Id: <20221220100035.2712449-1-ricardo.canuelo@collabora.com> Reported-by: Stephen Rothwell Reviewed-by: Bagas Sanjaya Signed-off-by: Michael S. Tsirkin commit d5ff73bbb03e69bd92f1f7f134bbfa16624ad42b Author: Michael Sammler Date: Tue Nov 15 21:40:36 2022 +0000 virtio_pmem: populate numa information Compute the numa information for a virtio_pmem device from the memory range of the device. Previously, the target_node was always 0 since the ndr_desc.target_node field was never explicitly set. The code for computing the numa node is taken from cxl_pmem_region_probe in drivers/cxl/pmem.c. Signed-off-by: Michael Sammler Reviewed-by: Pasha Tatashin Reviewed-by: Pankaj Gupta Tested-by: Mina Almasry Message-Id: <20221115214036.1571015-1-sammler@google.com> Signed-off-by: Michael S. Tsirkin commit 388defd5e4180a48e068d7ba9b024ce0ca957968 Author: Nathan Lynch Date: Mon Feb 13 13:23:51 2023 -0600 powerpc/machdep: warn when machine_is() used too early machine_is() can't provide correct results before probe_machine() has run. Warn when it's used too early in boot, placing the WARN_ON() in a helper function so the reported file:line indicates exactly what went wrong. checkpatch complains about __attribute__((weak)) in the patch, so change that to __weak, and align the line continuations as well. Signed-off-by: Nathan Lynch Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210-warn-on-machine-is-before-probe-machine-v2-1-b57f8243c51c@linux.ibm.com commit 77e82fa1f9781a958a6ea4aed7aec41239a5a22f Author: Christophe Leroy Date: Mon Dec 19 19:45:58 2022 +0100 powerpc/64: Replace -mcpu=e500mc64 by -mcpu=e5500 E500MC64 is a processor pre-dating E5500 that has never been commercialised. Use -mcpu=e5500 for E5500 core. More details at https://gcc.gnu.org/PR108149 Signed-off-by: Christophe Leroy Acked-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/fa71ed20d22c156225436374f0ab847daac893bc.1671475543.git.christophe.leroy@csgroup.eu commit 9efcdaac36e1643a1b7f5337e6143ce142d381b1 Author: Ganesh Goudar Date: Thu Feb 9 16:26:49 2023 +0530 powerpc/eeh: Set channel state after notifying the drivers When a PCI error is encountered 6th time in an hour we set the channel state to perm_failure and notify the driver about the permanent failure. However, after upstream commit 38ddc011478e ("powerpc/eeh: Make permanently failed devices non-actionable"), EEH handler stops calling any routine once the device is marked as permanent failure. This issue can lead to fatal consequences like kernel hang with certain PCI devices. Following log is observed with lpfc driver, with and without this change, Without this change kernel hangs, If PCI error is encountered 6 times for a device in an hour. Without the change EEH: Beginning: 'error_detected(permanent failure)' PCI 0132:60:00.0#600000: EEH: not actionable (1,1,1) PCI 0132:60:00.1#600000: EEH: not actionable (1,1,1) EEH: Finished:'error_detected(permanent failure)' With the change EEH: Beginning: 'error_detected(permanent failure)' EEH: Invoking lpfc->error_detected(permanent failure) EEH: lpfc driver reports: 'disconnect' EEH: Invoking lpfc->error_detected(permanent failure) EEH: lpfc driver reports: 'disconnect' EEH: Finished:'error_detected(permanent failure)' To fix the issue, set channel state to permanent failure after notifying the drivers. Fixes: 38ddc011478e ("powerpc/eeh: Make permanently failed devices non-actionable") Suggested-by: Mahesh Salgaonkar Signed-off-by: Ganesh Goudar Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230209105649.127707-1-ganeshgr@linux.ibm.com commit 4f11410bf6da87defe8fd59b0413f0d9f71744da Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:42 2023 -0500 selftests/powerpc: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Cc: stable@vger.kernel.org # v5.18+ Signed-off-by: Mathieu Desnoyers Acked-by: Shuah Khan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230127135755.79929-22-mathieu.desnoyers@efficios.com commit 83e0f265aa8d0e37cc8e15d318b64da0ec03ff41 Merge: 94817983fb2cc 05165248df655 Author: Mauro Carvalho Chehab Date: Wed Feb 15 12:40:21 2023 +0100 Merge git://git.linuxtv.org/media_stage into media_tree * git://git.linuxtv.org/media_stage: (216 commits) media: v4l2-ctrls-api.c: move ctrl->is_new = 1 to the correct line media: Revert "media: saa7146: deprecate hexium_gemini/orion, mxb and ttpci" media: Revert "media: av7110: move to staging/media/deprecated/saa7146" media: imx-pxp: convert to regmap media: imx-pxp: Use non-threaded IRQ media: imx-pxp: Introduce pxp_read() and pxp_write() wrappers media: imx-pxp: Implement frame size enumeration media: imx-pxp: Pass pixel format value to find_format() media: imx-pxp: Add media controller support media: imx-pxp: Don't set bus_info manually in .querycap() media: imx-pxp: Sort headers alphabetically media: imx-pxp: add support for i.MX7D media: imx-pxp: make data_path_ctrl0 platform dependent media: imx-pxp: disable LUT block media: imx-pxp: explicitly disable unused blocks media: imx-pxp: extract helper function to setup data path media: imx-pxp: detect PXP version media: dt-bindings: media: fsl-pxp: convert to yaml media: imx-mipi-csis: Implement .init_cfg() using .set_fmt() media: imx-mipi-csis: Use V4L2 subdev active state ... Signed-off-by: Mauro Carvalho Chehab commit 4ca446b127c568b59cb8d9748b6f70499624bb18 Author: Dan Carpenter Date: Tue Feb 14 18:43:38 2023 +0300 iw_cxgb4: Fix potential NULL dereference in c4iw_fill_res_cm_id_entry() This condition needs to match the previous "if (epcp->state == LISTEN) {" exactly to avoid a NULL dereference of either "listen_ep" or "ep". The problem is that "epcp" has been re-assigned so just testing "if (epcp->state == LISTEN) {" a second time is not sufficient. Fixes: 116aeb887371 ("iw_cxgb4: provide detailed provider-specific CM_ID information") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/Y+usKuWIKr4dimZh@kili Signed-off-by: Leon Romanovsky commit 19ac99072e679f1e3807603206e3f3b1a7c14729 Author: Jon Hunter Date: Thu Feb 9 12:53:19 2023 +0000 usb: gadget: u_ether: Don't warn in gether_setup_name_default() The function gether_setup_name_default() is called by various USB ethernet gadget drivers. Calling this function will select a random host and device MAC addresses. A properly working driver should be silent and not warn the user about default MAC addresses selection. Given that the MAC addresses are also printed when the function gether_register_netdev() is called, remove these unnecessary warnings. Signed-off-by: Jon Hunter Reviewed-by: Andrzej Pietrasiewicz Link: https://lore.kernel.org/r/20230209125319.18589-2-jonathanh@nvidia.com Signed-off-by: Greg Kroah-Hartman commit 938fc645317632d79c048608689683b5437496ea Author: Jon Hunter Date: Thu Feb 9 12:53:18 2023 +0000 usb: gadget: u_ether: Convert prints to device prints The USB ethernet gadget driver implements its own print macros which call printk. Device drivers should use the device prints that print the device name. Fortunately, the same macro names are defined in the header file 'linux/usb/composite.h' and these use the device prints. Therefore, remove the local definitions in the USB ethernet gadget driver and use those in 'linux/usb/composite.h'. The only difference is that now the device name is printed instead of the ethernet interface name. Tested using ethernet gadget on Jetson AGX Orin. Signed-off-by: Jon Hunter Tested-by: Jon Hunter Link: https://lore.kernel.org/r/20230209125319.18589-1-jonathanh@nvidia.com Signed-off-by: Greg Kroah-Hartman commit ade1229caed9433921b69e20bd6fadf1bba9558e Author: Greg Kroah-Hartman Date: Tue Feb 14 15:01:21 2023 +0100 dma-mapping: no need to pass a bus_type into get_arch_dma_ops() The get_arch_dma_ops() arch-specific function never does anything with the struct bus_type that is passed into it, so remove it entirely as it is not needed. Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Thomas Bogendoerfer Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: "David S. Miller" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: x86@kernel.org Cc: "H. Peter Anvin" Cc: Marek Szyprowski Cc: Robin Murphy Cc: Konrad Rzeszutek Wilk Cc: linux-alpha@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-ia64@vger.kernel.org Cc: linux-mips@vger.kernel.org Cc: linux-parisc@vger.kernel.org Cc: sparclinux@vger.kernel.org Cc: iommu@lists.linux.dev Cc: linux-arch@vger.kernel.org Acked-by: Christoph Hellwig Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230214140121.131859-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 50a542a8accc12afd802488f95317155496692f1 Author: Jason Gunthorpe Date: Mon Feb 13 14:14:11 2023 -0400 RDMA/mlx5: Use rdma_umem_for_each_dma_block() Replace an open coding of rdma_umem_for_each_dma_block() with the proper function. Fixes: b3d47ebd4908 ("RDMA/mlx5: Use mlx5_umr_post_send_wait() to update MR pas") Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/0-v1-c13a5b88359b+556d0-mlx5_umem_block_jgg@nvidia.com Reviewed-by: Devesh Sharma Signed-off-by: Leon Romanovsky commit 1b136aeb3c4a122fcca014db09c4db9766403c86 Author: Bastien Nocera Date: Thu Feb 9 16:49:16 2023 +0100 HID: logitech-hidpp: Add myself to authors As discussed with HID maintainer Benjamin Tissoires, add myself to the authors list and MAINTAINERS file. Signed-off-by: Bastien Nocera Link: https://lore.kernel.org/r/20230209154916.462158-2-hadess@hadess.net Signed-off-by: Benjamin Tissoires commit 586e8fede7953b1695b5ccc6112eff9b052e79ac Author: Bastien Nocera Date: Thu Feb 9 16:49:15 2023 +0100 HID: logitech-hidpp: Retry commands when device is busy Handle the busy error coming from the device or receiver. The documentation says a busy error can be returned when: " Device (or receiver) cannot answer immediately to this request for any reason i.e: - already processing a request from the same or another SW - pipe full " Signed-off-by: Bastien Nocera Link: https://lore.kernel.org/r/20230209154916.462158-1-hadess@hadess.net Signed-off-by: Benjamin Tissoires commit 894341ad3ad7dfbced8556efe92a9ebfd5924bd6 Author: Ivan Bornyakov Date: Fri Feb 10 18:46:27 2023 +0300 net: phylink: support validated pause and autoneg in fixed-link In fixed-link setup phylink_parse_fixedlink() unconditionally sets Pause, Asym_Pause and Autoneg bits to "supported" bitmap, while MAC may not support these. This leads to ethtool reporting: > Supported pause frame use: Symmetric Receive-only > Supports auto-negotiation: Yes regardless of what is actually supported. Instead of unconditionally set Pause, Asym_Pause and Autoneg it is sensible to set them according to validated "supported" bitmap, i.e. the result of phylink_validate(). Signed-off-by: Ivan Bornyakov Signed-off-by: David S. Miller commit fe33311c3e371855c4f4c0ab8a5fce5b9a9fdafd Author: Jason Xing Date: Tue Feb 14 12:14:10 2023 +0800 net: no longer support SOCK_REFCNT_DEBUG feature Commit e48c414ee61f ("[INET]: Generalise the TCP sock ID lookup routines") commented out the definition of SOCK_REFCNT_DEBUG in 2005 and later another commit 463c84b97f24 ("[NET]: Introduce inet_connection_sock") removed it. Since we could track all of them through bpf and kprobe related tools and the feature could print loads of information which might not be that helpful even under a little bit pressure, the whole feature which has been inactive for many years is no longer supported. Link: https://lore.kernel.org/lkml/20230211065153.54116-1-kerneljasonxing@gmail.com/ Suggested-by: Kuniyuki Iwashima Signed-off-by: Jason Xing Reviewed-by: Kuniyuki Iwashima Acked-by: Wenjia Zhang Reviewed-by: Eric Dumazet Acked-by: Matthieu Baerts Signed-off-by: David S. Miller commit 6472a2dcc4274452bb46fb5a0d968a1c1ed772ee Author: Heiko Carstens Date: Mon Feb 13 12:35:19 2023 +0100 s390/irq,idle: simplify idle check Use the per-cpu CIF_ENABLED_WAIT flag to decide if an interrupt occurred while a cpu was idle, instead of checking two conditions within the old psw. Also move clearing of the CIF_ENABLED_WAIT bit to the early interrupt handler, which in turn makes arch_vcpu_is_preempted() also a bit more precise, since the flag is now cleared before interrupt handlers have been called. Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens commit f96f41aae2b5bd34d32f462c7b45c0f4fad2b59e Author: Heiko Carstens Date: Mon Feb 13 12:35:18 2023 +0100 s390/processor: add test_and_set_cpu_flag() and test_and_clear_cpu_flag() Add test_and_set_cpu_flag() and test_and_clear_cpu_flag() helper functions. Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens commit b977f03ec44aef7f6728bfe1a48f3ee5b0776001 Author: Heiko Carstens Date: Mon Feb 13 12:35:17 2023 +0100 s390/processor: let cpu helper functions return boolean values Let cpu helper functions return boolean values. This also allows to make the code a bit simpler by getting rid of the "!!" construct. Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens commit d9c2cf67b9cfd643ba85d51bc865a89a92e4f979 Author: Heiko Carstens Date: Mon Feb 13 19:38:58 2023 +0100 s390/kfence: fix page fault reporting Baoquan He reported lots of KFENCE reports when /proc/kcore is read, e.g. with crash or even simpler with dd: BUG: KFENCE: invalid read in copy_from_kernel_nofault+0x5e/0x120 Invalid read at 0x00000000f4f5149f: copy_from_kernel_nofault+0x5e/0x120 read_kcore+0x6b2/0x870 proc_reg_read+0x9a/0xf0 vfs_read+0x94/0x270 ksys_read+0x70/0x100 __do_syscall+0x1d0/0x200 system_call+0x82/0xb0 The reason for this is that read_kcore() simply reads memory that might have been unmapped by KFENCE with copy_from_kernel_nofault(). Any fault due to pages being unmapped by KFENCE would be handled gracefully by the fault handler (exception table fixup). However the s390 fault handler first reports the fault, and only afterwards would perform the exception table fixup. Most architectures have this in reversed order, which also avoids the false positive KFENCE reports when an unmapped page is accessed. Therefore change the s390 fault handler so it handles exception table fixups before KFENCE page faults are reported. Reported-by: Baoquan He Tested-by: Baoquan He Acked-by: Alexander Potapenko Link: https://lore.kernel.org/r/20230213183858.1473681-1-hca@linux.ibm.com Signed-off-by: Heiko Carstens commit ad0faae6ceab7d138dddf9a58eab7151c519e0d3 Author: Harald Freudenberger Date: Tue Feb 8 16:59:47 2022 +0100 s390/zcrypt: introduce ctfm field in struct CPRBX Modify the CPRBX struct to expose a new field ctfm for use with hardware command filtering within a CEX8 crypto card in CCA coprocessor mode. The field replaces a reserved byte padding field so that the layout of the struct and the size does not change. The new field is used only by user space applications which may use this to expose the HW filtering facilities in the crypto firmware layers. Signed-off-by: Harald Freudenberger Signed-off-by: Heiko Carstens commit 38b2d8efd03d2e56431b611e3523f0158306451d Author: Darrell Kavanagh Date: Tue Feb 14 16:46:59 2023 +0000 drm: panel-orientation-quirks: Add quirk for Lenovo IdeaPad Duet 3 10IGL5 Another Lenovo convertable where the panel is installed landscape but is reported to the kernel as portrait. Signed-off-by: Darrell Kavanagh Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20230214164659.3583-1-darrell.kavanagh@gmail.com commit 22551e77e5507a06114c0af2b92bbf1a66ec33c5 Author: Mark Zhang Date: Wed Jan 4 20:17:56 2023 -0800 net/mlx5: Configure IPsec steering for egress RoCEv2 traffic Add steering table/rule in RDMA_TX domain, to forward all traffic to IPsec crypto table in NIC domain. Signed-off-by: Mark Zhang Signed-off-by: Patrisious Haddad Reviewed-by: Raed Salem Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky commit 899577600b25b338072095009d4c578fbd936177 Author: Mark Zhang Date: Wed Jan 4 20:17:55 2023 -0800 net/mlx5: Configure IPsec steering for ingress RoCEv2 traffic Add steering tables/rules to check if the decrypted traffic is RoCEv2, if so then forward it to RDMA_RX domain. Signed-off-by: Mark Zhang Signed-off-by: Patrisious Haddad Reviewed-by: Leon Romanovsky Reviewed-by: Raed Salem Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky commit f91ddd3aa4b313aa4b792d1588ccb63c3e4ace0b Author: Mark Zhang Date: Wed Jan 4 20:17:54 2023 -0800 net/mlx5: Add IPSec priorities in RDMA namespaces Add IPSec flow steering priorities in RDMA namespaces. This allows adding tables/rules to forward RoCEv2 traffic to the IPSec crypto tables in NIC_TX domain, and accept RoCEv2 traffic from NIC_RX domain. Signed-off-by: Mark Zhang Signed-off-by: Patrisious Haddad Reviewed-by: Maor Gottlieb Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky commit 4f226b71f5edc33843e21f92ebe97b1561804d52 Author: Mark Zhang Date: Wed Jan 4 20:17:53 2023 -0800 net/mlx5: Implement new destination type TABLE_TYPE Implement new destination type to support flow transition between different table types. e.g. from NIC_RX to RDMA_RX or from RDMA_TX to NIC_TX. The new destination is described in the tracepoint as follows: "mlx5_fs_add_rule: rule=00000000d53cd0ed fte=0000000048a8a6ed index=0 sw_action=<> [dst] flow_table_type=7 id:262152" Signed-off-by: Mark Zhang Signed-off-by: Patrisious Haddad Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky commit 7368f221e09eac116050475bec5a292a85c5ea8a Author: Patrisious Haddad Date: Wed Jan 4 20:17:52 2023 -0800 net/mlx5: Introduce new destination type TABLE_TYPE This new destination type supports flow transition between different table types, e.g. from NIC_RX to RDMA_RX or from RDMA_TX to NIC_TX. Signed-off-by: Patrisious Haddad Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky commit ce1ba4d782d94fc8ed9116c774e2e5885626836b Author: Chin-Yen Lee Date: Tue Feb 14 19:43:14 2023 +0800 wifi: rtw89: move H2C of del_pkt_offload before polling FW status ready The H2C of del_pkt_offload must be called before polling FW status ready, otherwise the following downloading normal FW will fail. Fixes: 5c12bb66b79d ("wifi: rtw89: refine packet offload flow") Signed-off-by: Chin-Yen Lee Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230214114314.5268-1-pkshih@realtek.com commit 210871887208d1098d65b9bb597e7f9aa1c66900 Author: Ping-Ke Shih Date: Mon Feb 13 17:13:28 2023 +0800 wifi: rtw89: use readable return 0 in rtw89_mac_cfg_ppdu_status() For normal (successful) flow, it must return 0. The original code uses 'return ret', and then we need to backward reference to initial value to know 'ret = 0'. Changing them to 'return 0', because it will be more readable and intuitive. This patch doesn't change logic at all. Reported-by: kernel test robot Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/202302101023.ctlih5q0-lkp@intel.com/ Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230213091328.25481-1-pkshih@realtek.com commit 462c8db6a01160836c68e262d25566f2447148d9 Author: Sascha Hauer Date: Fri Feb 10 12:16:32 2023 +0100 wifi: rtw88: usb: drop now unnecessary URB size check Now that we send URBs with the URB_ZERO_PACKET flag set we no longer need to make sure that the URB sizes are not multiple of the bulkout_size. Drop the check. Signed-off-by: Sascha Hauer Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230210111632.1985205-4-s.hauer@pengutronix.de commit 07ce9fa6ab0e5e4cb5516a1f7c754ab2758fe5cd Author: Sascha Hauer Date: Fri Feb 10 12:16:31 2023 +0100 wifi: rtw88: usb: send Zero length packets if necessary Zero length packets are necessary when sending URBs with size multiple of bulkout_size, otherwise the hardware just stalls. Fixes: a82dfd33d1237 ("wifi: rtw88: Add common USB chip support") Signed-off-by: Sascha Hauer Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230210111632.1985205-3-s.hauer@pengutronix.de commit 7869b834fb07c79933229840c98b02bbb7bd0d75 Author: Sascha Hauer Date: Fri Feb 10 12:16:30 2023 +0100 wifi: rtw88: usb: Set qsel correctly We have to extract qsel from the skb before doing skb_push() on it, otherwise qsel will always be 0. Fixes: a82dfd33d1237 ("wifi: rtw88: Add common USB chip support") Signed-off-by: Sascha Hauer Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230210111632.1985205-2-s.hauer@pengutronix.de commit fb533473d1595fe79ecb528fda1de33552b07178 Author: Namjae Jeon Date: Sat Feb 11 00:27:34 2023 +0900 ksmbd: do not allow the actual frame length to be smaller than the rfc1002 length ksmbd allowed the actual frame length to be smaller than the rfc1002 length. If allowed, it is possible to allocates a large amount of memory that can be limited by credit management and can eventually cause memory exhaustion problem. This patch do not allow it except SMB2 Negotiate request which will be validated when message handling proceeds. Also, Allow a message that padded to 8byte boundary. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Cc: stable@vger.kernel.org Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 8f8c43b125882ac14372f8dca0c8e50a59e78d79 Author: Namjae Jeon Date: Wed Feb 8 09:50:46 2023 +0900 ksmbd: fix wrong data area length for smb2 lock request When turning debug mode on, The following error message from ksmbd_smb2_check_message() is coming. ksmbd: cli req padded more than expected. Length 112 not 88 for cmd:10 mid:14 data area length calculation for smb2 lock request in smb2_get_data_area_len() is incorrect. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Cc: stable@vger.kernel.org Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 63f09a9986eb58578ed6ad0e27a6e2c54e49f797 Author: Jiapeng Chong Date: Wed Feb 8 09:30:30 2023 +0900 ksmbd: Fix parameter name and comment mismatch fs/ksmbd/vfs.c:965: warning: Function parameter or member 'attr_value' not described in 'ksmbd_vfs_setxattr'. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3946 Signed-off-by: Jiapeng Chong Acked-by: Namjae Jeon Reviewed-by: Sergey Senozhatsky Signed-off-by: Steve French commit 9a5c09dd97014e7f3dc3a440d2ee67fdb33dcc6e Merge: 3863f2a431f9b 75c53905f8738 Author: Palmer Dabbelt Date: Tue Feb 14 21:33:27 2023 -0800 Merge patch series "Remove toolchain dependencies for Zicbom" Conor Dooley says: From: Conor Dooley I've yoinked patch 1 from Drew's series adding support for Zicboz & attached two more patches here that remove the need for, and then drop the toolchain support checks for Zicbom. The goal is to remove the need for checking the presence of toolchain Zicbom support in the work being done to support non instruction based CMOs [1]. I've tested compliation on a number of different configurations with the Zicbom config option enabled. The important ones to call out I guess are: - clang/llvm 14 w/ LLVM=1 which doesn't support Zicbom atm. - gcc 11 w/ binutils 2.37 which doesn't support Zicbom atm either. - clang/llvm 15 w/ LLVM=1 BUT with binutils 2.37's ld. This is the configuration that prompted adding the LD checks as cc/as supports Zicbom, but ld doesn't [2]. - gcc 12 w/ binutils 2.39 & clang 15 w/ LLVM=1, both of these supported Zicbom before and still do. I also checked building the THEAD errata etc with CONFIG_RISCV_ISA_ZICBOM disabled, and there were no build issues there either. * b4-shazam-merge: RISC-V: remove toolchain version checks for Zicbom RISC-V: replace cbom instructions with an insn-def RISC-V: insn-def: Add I-type insn-def Link: https://lore.kernel.org/r/20230108163356.3063839-1-conor@kernel.org Signed-off-by: Palmer Dabbelt commit 75c53905f8738fecf691a78de401250e298900f9 Author: Conor Dooley Date: Sun Jan 8 16:33:56 2023 +0000 RISC-V: remove toolchain version checks for Zicbom Commit b8c86872d1dc ("riscv: fix detection of toolchain Zicbom support") fixed building on systems where Zicbom was supported by the compiler/assembler but not by the linker in an easily backportable manner. Now that the we have insn-defs for the 3 instructions, toolchain support is no longer required for Zicbom. Stop emitting "_zicbom" in -march when Zicbom is enabled & drop the version checks entirely. Signed-off-by: Conor Dooley Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20230108163356.3063839-4-conor@kernel.org Signed-off-by: Palmer Dabbelt commit dd23e9535889c8b8d7ea7d6064ad16be903f4270 Author: Conor Dooley Date: Sun Jan 8 16:33:55 2023 +0000 RISC-V: replace cbom instructions with an insn-def Using the cbom instructions directly in ALT_CMO_OP, requires toolchain support for the instructions. Using an insn-def will allow for removal of toolchain version checks in the build system & simplification of the proposed [1] function-based CMO scheme. Link: https://lore.kernel.org/linux-riscv/fb3b34ae-e35e-4dc2-a8f4-19984a2f58a8@app.fastmail.com/ [1] Signed-off-by: Conor Dooley Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20230108163356.3063839-3-conor@kernel.org Signed-off-by: Palmer Dabbelt commit 6067c3aae52f14b025d0a4de5d4d1eb16eb8fe51 Author: Andrew Jones Date: Sun Jan 8 16:33:54 2023 +0000 RISC-V: insn-def: Add I-type insn-def CBO instructions use the I-type of instruction format where the immediate is used to identify the CBO instruction type. Add I-type instruction encoding support to insn-def. Signed-off-by: Andrew Jones Reviewed-by: Conor Dooley Reviewed-by: Heiko Stuebner Signed-off-by: Conor Dooley Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20230108163356.3063839-2-conor@kernel.org Signed-off-by: Palmer Dabbelt commit 1ed32ad4a3cb7c6a8764510565e15ab46b5fdd19 Author: Jakub Kicinski Date: Mon Feb 13 20:32:46 2023 -0800 netlink-specs: add rx-push to ethtool family Commit 5b4e9a7a71ab ("net: ethtool: extend ringparam set/get APIs for rx_push") added a new attr for configuring rx-push, right after tx-push. Add it to the spec, the ring param operation is covered by the otherwise sparse ethtool spec. Reviewed-by: Shannon Nelson Link: https://lore.kernel.org/r/20230214043246.230518-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 1daa8e25ed971eca8cd8c8dfd4d6d6541b1d62a2 Merge: 56193cf96f00e b2793517052d9 Author: Jakub Kicinski Date: Tue Feb 14 20:48:10 2023 -0800 Merge branch 'net-make-kobj_type-structures-constant' Thomas Weißschuh says: ==================== net: 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. ==================== Link: https://lore.kernel.org/r/20230211-kobj_type-net-v2-0-013b59e59bf3@weissschuh.net Signed-off-by: Jakub Kicinski commit b2793517052d9771fbc0bc3db09693aa850eb3de Author: Thomas Weißschuh Date: Tue Feb 14 04:23:12 2023 +0000 net-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 Signed-off-by: Jakub Kicinski commit e8c6cbd7656e4cea9e2336a3a85bd609dd76eb3d Author: Thomas Weißschuh Date: Tue Feb 14 04:23:11 2023 +0000 net: bridge: 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: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 56193cf96f00e9ae4fc95d31c9725c3642ef1e99 Merge: 2edd92570441d 3f3741c9039fe Author: Jakub Kicinski Date: Tue Feb 14 20:39:40 2023 -0800 Merge branch 'net-ipa-define-gsi-register-fields-differently' Alex Elder says: ==================== net: ipa: define GSI register fields differently Now that we have "reg" definitions in place to define GSI register offsets, add the definitions for the fields of GSI registers that have them. There aren't many differences between versions, but a few fields are present only in some versions of IPA, so additional "gsi_reg-vX.Y.c" files are created to capture such differences. As in the previous series, these files are created as near-copies of existing files just before they're needed to represent these differences. The first patch adds files for IPA v4.0, v4.5, and v4.9; the fifth patch adds a file for IPA v4.11. Note that the first and fifth patch cause some checkpatch warnings because they align some continued lines with an open parenthesis that at the fourth column. ==================== Link: https://lore.kernel.org/r/20230213162229.604438-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 3f3741c9039fe20ff2512301af05c83c06f06165 Author: Alex Elder Date: Mon Feb 13 10:22:29 2023 -0600 net: ipa: define fields for remaining GSI registers Define field IDs for the remaining GSI registers, and populate the register definition files accordingly. Use the reg_*() functions to access field values for those regiters, and get rid of the previous field definition constants. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit aa07fd4358f53bc627c504a669408c23158dbdb9 Author: Alex Elder Date: Mon Feb 13 10:22:28 2023 -0600 net: ipa: add "gsi_v4.11.c" The next patch adds a GSI register field that is only valid starting at IPA v4.11. Create "gsi_v4.11.c" from "gsi_v4.9.c", changing only the name of the public regs structure it defines. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit edc6158b18af81e6f48268479996a16ca7599a4e Author: Alex Elder Date: Mon Feb 13 10:22:27 2023 -0600 net: ipa: define fields for event-ring related registers Define field IDs for the EV_CH_E_CNTXT_0 and EV_CH_E_CNTXT_8 GSI registers, and populate the register definition files accordingly. Use the reg_*() functions to access field values for those regiters, and get rid of the previous field definition constants. The remaining EV_CH_E_CNTXT_* registers are written with full 32-bit values (and have no fields). Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 330ce9d3462e825c44368f58c32d2e2fcf819128 Author: Alex Elder Date: Mon Feb 13 10:22:26 2023 -0600 net: ipa: define more fields for GSI registers Beyond the CH_C_QOS register, two other registers whose offset is related to channel number have fields within them. Define the fields within the CH_C_CNTXT_0 GSI register, using an enumerated type to identify the register's fields, and define an array of field masks to use for that register's reg structure. For the CH_C_CNTXT_1 GSI register, ch_c_cntxt_1_length_encode() previously hid the difference in bit width in the channel ring length field. Instead, define a new field CH_R_LENGTH and encode the ring size with reg_encode(). Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit f50ca7cef7c7ceff2b66b610ac5ab17aac36df6a Author: Alex Elder Date: Mon Feb 13 10:22:25 2023 -0600 net: ipa: define GSI CH_C_QOS register fields Define the fields within the CH_C_QOS GSI register using an array of field masks in that register's reg structure. Use the reg functions for encoding values in those fields. One field in the register is present for IPA v4.0-4.2 only, two others are present starting at IPA v4.5, and one more is there starting at IPA v4.9. Drop the "GSI_" prefix in symbols defined in the gsi_prefetch_mode enumerated type, and define their values using decimal rather than hexidecimal values. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 4a4270cff65f4e566b56814d37a1a4f8d49adeb1 Author: Alex Elder Date: Mon Feb 13 10:22:24 2023 -0600 net: ipa: populate more GSI register files Create "gsi_v4.0.c", "gsi_v4.5.c", and "gsi_v4.9.c" as essentially identical copies of "gsi_v3.5.1.c". The only difference is the name of the exported "gsi_regs_vX_Y" structure. The next patch will start differentiating them. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 3e74ec2f39362bffbd42854acbb67c7f4cb808f9 Author: Bjorn Andersson Date: Tue Feb 14 15:42:31 2023 -0800 rpmsg: glink: Avoid infinite loop on intent for missing channel In the event that an intent advertisement arrives on an unknown channel the fifo is not advanced, resulting in the same message being handled over and over. Fixes: dacbb35e930f ("rpmsg: glink: Receive and store the remote intent buffers") Signed-off-by: Bjorn Andersson Reviewed-by: Chris Lew Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230214234231.2069751-1-quic_bjorande@quicinc.com commit 4e816d0318fdfe8932da80dbf04ba318b13e4b3a Author: Bjorn Andersson Date: Tue Feb 14 14:59:33 2023 -0800 rpmsg: glink: Fix GLINK command prefix The upstream GLINK driver was first introduced to communicate with the RPM on MSM8996, presumably as an artifact from that era the command defines was prefixed RPM_CMD, while they actually are GLINK_CMDs. Let's rename these, to keep things tidy. No functional change. Signed-off-by: Bjorn Andersson Reviewed-by: Chris Lew Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230214225933.2025595-1-quic_bjorande@quicinc.com commit a8f500c68673d385b437da678aaf9ebba0ab9db0 Author: Bjorn Andersson Date: Tue Feb 14 14:47:46 2023 -0800 rpmsg: glink: Fix spelling of peek The code is peeking into the buffers, not peaking. Fix this throughout the glink drivers. Signed-off-by: Bjorn Andersson Reviewed-by: Chris Lew Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230214224746.1996130-1-quic_bjorande@quicinc.com commit 3863f2a431f9bc01053f92f8b56852c121bf54e0 Merge: d5a7fab7859dc 991994509ee93 Author: Palmer Dabbelt Date: Tue Feb 14 19:25:10 2023 -0800 Merge patch series "dt-bindings: Add a cpu-capacity property for RISC-V" Conor Dooley says: From: Conor Dooley Ever since RISC-V starting using generic arch topology code, the code paths for cpu-capacity have been there but there's no binding defined to actually convey the information. Defining the same property as used on arm seems to be the only logical thing to do, so do it. [Palmer: This is on top of the fix required to make it work, which itself wasn't merged until late in the 6.2 cycle and thus pulls in various other fixes.] * b4-shazam-merge: dt-bindings: riscv: add a capacity-dmips-mhz cpu property dt-bindings: arm: move cpu-capacity to a shared loation riscv: Move call to init_cpu_topology() to later initialization stage riscv/kprobe: Fix instruction simulation of JALR riscv: fix -Wundef warning for CONFIG_RISCV_BOOT_SPINWAIT MAINTAINERS: add an IRC entry for RISC-V RISC-V: fix compile error from deduplicated __ALTERNATIVE_CFG_2 dt-bindings: riscv: fix single letter canonical order dt-bindings: riscv: fix underscore requirement for multi-letter extensions riscv: uaccess: fix type of 0 variable on error in get_user() riscv, kprobes: Stricter c.jr/c.jalr decoding Link: https://lore.kernel.org/r/20230104180513.1379453-1-conor@kernel.org Signed-off-by: Palmer Dabbelt commit 991994509ee93f7698251e696b8e5591e01b7f68 Author: Conor Dooley Date: Wed Jan 4 18:05:14 2023 +0000 dt-bindings: riscv: add a capacity-dmips-mhz cpu property Since commit 03f11f03dbfe ("RISC-V: Parse cpu topology during boot.") RISC-V has used the generic arch topology code, which provides for disparate CPU capacities. We never defined a binding to acquire this information from the DT though, so document the one already used by the generic arch topology code: "capacity-dmips-mhz". Signed-off-by: Conor Dooley Reviewed-by: Ley Foon Tan Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230104180513.1379453-3-conor@kernel.org Signed-off-by: Palmer Dabbelt commit 7d2078310cbf0fa7fb4323d595fe093c418dcd37 Author: Conor Dooley Date: Wed Jan 4 18:05:13 2023 +0000 dt-bindings: arm: move cpu-capacity to a shared loation RISC-V uses the same generic topology code as arm64 & while there currently exists no binding for cpu-capacity on RISC-V, the code paths can be hit if the property is present. Move the documentation of cpu-capacity to a shared location, ahead of defining a binding for capacity-dmips-mhz on RISC-V. Update some references to this document in the process. Signed-off-by: Conor Dooley Reviewed-by: Ley Foon Tan Acked-by: Rob Herring Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/20230104180513.1379453-2-conor@kernel.org Signed-off-by: Palmer Dabbelt commit 3ef6d9b31af2668bb50cc8b53caa39f53fc2106d Merge: 65b07ecfaba9b b1dec4e78599a Author: Stephen Boyd Date: Tue Feb 14 18:43:54 2023 -0800 Merge tag 'renesas-clk-for-v6.3-tag3' 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: - Disable R-Car H3 ES1.*, as it was only available to an internal development group and needed a lot of quirks and workarounds. * tag 'renesas-clk-for-v6.3-tag3' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: rcar-gen3: Disable R-Car H3 ES1.* commit 240930fb7e6b52229bdee5b1423bfeab0002fed2 Author: Zhang Yi Date: Mon Dec 26 14:20:15 2022 +0800 ext4: dio take shared inode lock when overwriting preallocated blocks In the dio write path, we only take shared inode lock for the case of aligned overwriting initialized blocks inside EOF. But for overwriting preallocated blocks, it may only need to split unwritten extents, this procedure has been protected under i_data_sem lock, it's safe to release the exclusive inode lock and take shared inode lock. This could give a significant speed up for multi-threaded writes. Test on Intel Xeon Gold 6140 and nvme SSD with below fio parameters. direct=1 ioengine=libaio iodepth=10 numjobs=10 runtime=60 rw=randwrite size=100G And the test result are: Before: bs=4k IOPS=11.1k, BW=43.2MiB/s bs=16k IOPS=11.1k, BW=173MiB/s bs=64k IOPS=11.2k, BW=697MiB/s After: bs=4k IOPS=41.4k, BW=162MiB/s bs=16k IOPS=41.3k, BW=646MiB/s bs=64k IOPS=13.5k, BW=843MiB/s Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20221226062015.3479416-1-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 60b730a40c43fbcc034970d3e77eb0f25b8cc1cf Author: Darrick J. Wong Date: Tue Feb 14 17:51:35 2023 -0800 xfs: fix uninitialized variable access If the end position of a GETFSMAP query overlaps an allocated space and we're using the free space info to generate fsmap info, the akeys information gets fed into the fsmap formatter with bad results. Zero-init the space. Reported-by: syzbot+090ae72d552e6bd93cfe@syzkaller.appspotmail.com Signed-off-by: Darrick J. Wong commit 571dc9ae4eefb452d32cfb3761a87089e8f37ca7 Merge: dd07bb8b6baf2 bd4f5d09cc93c Author: Darrick J. Wong Date: Tue Feb 14 17:50:48 2023 -0800 Merge tag 'xfs-alloc-perag-conversion' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs into xfs-6.3-merge-A xfs: per-ag centric allocation alogrithms This series continues the work towards making shrinking a filesystem possible. We need to be able to stop operations from taking place on AGs that need to be removed by a shrink, so before shrink can be implemented we need to have the infrastructure in place to prevent incursion into AGs that are going to be, or are in the process, of being removed from active duty. The focus of this is making operations that depend on access to AGs use the perag to access and pin the AG in active use, thereby creating a barrier we can use to delay shrink until all active uses of an AG have been drained and new uses are prevented. This series starts by fixing some existing issues that are exposed by changes later in the series. They stand alone, so can be picked up independently of the rest of this patchset. The most complex of these fixes is cleaning up the mess that is the AGF deadlock avoidance algorithm. This algorithm stores the first block that is allocated in a transaction in tp->t_firstblock, then uses this to try to limit future allocations within the transaction to AGs at or higher than the filesystem block stored in tp->t_firstblock. This depends on one of the initial bug fixes in the series to move the deadlock avoidance checks to xfs_alloc_vextent(), and then builds on it to relax the constraints of the avoidance algorithm to only be active when a deadlock is possible. We also update the algorithm to record allocations from higher AGs that are allocated from, because we when we need to lock more than two AGs we still have to ensure lock order is correct. Therefore we can't lock AGs in the order 1, 3, 2, even though tp->t_firstblock indicates that we've allocated from AG 1 and so AG is valid to lock. It's not valid, because we already hold AG 3 locked, and so tp->t-first_block should actually point at AG 3, not AG 1 in this situation. It should now be obvious that the deadlock avoidance algorithm should record AGs, not filesystem blocks. So the series then changes the transaction to store the highest AG we've allocated in rather than a filesystem block we allocated. This makes it obvious what the constraints are, and trivial to update as we lock and allocate from various AGs. With all the bug fixes out of the way, the series then starts converting the code to use active references. Active reference counts are used by high level code that needs to prevent the AG from being taken out from under it by a shrink operation. The high level code needs to be able to handle not getting an active reference gracefully, and the shrink code will need to wait for active references to drain before continuing. Active references are implemented just as reference counts right now - an active reference is taken at perag init during mount, and all other active references are dependent on the active reference count being greater than zero. This gives us an initial method of stopping new active references without needing other infrastructure; just drop the reference taken at filesystem mount time and when the refcount then falls to zero no new references can be taken. In future, this will need to take into account AG control state (e.g. offline, no alloc, etc) as well as the reference count, but right now we can implement a basic barrier for shrink with just reference count manipulations. As such, patches to convert the perag state to atomic opstate fields similar to the xfs_mount and xlog opstate fields follow the initial active perag reference counting patches. The first target for active reference conversion is the for_each_perag*() iterators. This captures a lot of high level code that should skip offline AGs, and introduces the ability to differentiate between a lookup that didn't have an online AG and the end of the AG iteration range. From there, the inode allocation AG selection is converted to active references, and the perag is driven deeper into the inode allocation and btree code to replace the xfs_mount. Most of the inode allocation code operates on a single AG once it is selected, hence it should pass the perag as the primary referenced object around for allocation, not the xfs_mount. There is a bit of churn here, but it emphasises that inode allocation is inherently an allocation group based operation. Next the bmap/alloc interface undergoes a major untangling, reworking xfs_bmap_btalloc() into separate allocation operations for different contexts and failure handling behaviours. This then allows us to completely remove the xfs_alloc_vextent() layer via restructuring the xfs_alloc_vextent/xfs_alloc_ag_vextent() into a set of realtively simple helper function that describe the allocation that they are doing. e.g. xfs_alloc_vextent_exact_bno(). This allows the requirements for accessing AGs to be allocation context dependent. The allocations that require operation on a single AG generally can't tolerate failure after the allocation method and AG has been decided on, and hence the caller needs to manage the active references to ensure the allocation does not race with shrink removing the selected AG for the duration of the operation that requires access to that allocation group. Other allocations iterate AGs and so the first AG is just a hint - these do not need to pin a perag first as they can tolerate not being able to access an AG by simply skipping over it. These require new perag iteration functions that can start at arbitrary AGs and wrap around at arbitrary AGs, hence a new set for for_each_perag_wrap*() helpers to do this. Next is the rework of the filestreams allocator. This doesn't change any functionality, but gets rid of the unnecessary multi-pass selection algorithm when the selected AG is not available. It currently does a lookup pass which might iterate all AGs to select an AG, then checks if the AG is acceptible and if not does a "new AG" pass that is essentially identical to the lookup pass. Both of these scans also do the same "longest extent in AG" check before selecting an AG as is done after the AG is selected. IOWs, the filestreams algorithm can be greatly simplified into a single new AG selection pass if the there is no current association or the currently associated AG doesn't have enough contiguous free space for the allocation to proceed. With this simplification of the filestreams allocator, it's then trivial to convert it to use for_each_perag_wrap() for the AG scan algorithm. Signed-off-by: Dave Chinner Signed-off-by: Darrick J. Wong * tag 'xfs-alloc-perag-conversion' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: (42 commits) xfs: refactor the filestreams allocator pick functions xfs: return a referenced perag from filestreams allocator xfs: pass perag to filestreams tracing xfs: use for_each_perag_wrap in xfs_filestream_pick_ag xfs: track an active perag reference in filestreams xfs: factor out MRU hit case in xfs_filestream_select_ag xfs: remove xfs_filestream_select_ag() longest extent check xfs: merge new filestream AG selection into xfs_filestream_select_ag() xfs: merge filestream AG lookup into xfs_filestream_select_ag() xfs: move xfs_bmap_btalloc_filestreams() to xfs_filestreams.c xfs: use xfs_bmap_longest_free_extent() in filestreams xfs: get rid of notinit from xfs_bmap_longest_free_extent xfs: factor out filestreams from xfs_bmap_btalloc_nullfb xfs: convert trim to use for_each_perag_range xfs: convert xfs_alloc_vextent_iterate_ags() to use perag walker xfs: move the minimum agno checks into xfs_alloc_vextent_check_args xfs: fold xfs_alloc_ag_vextent() into callers xfs: move allocation accounting to xfs_alloc_vextent_set_fsbno() xfs: introduce xfs_alloc_vextent_prepare() xfs: introduce xfs_alloc_vextent_exact_bno() ... commit 61fef98945d0b2fea522ef958f57a783e2a072a9 Author: Jingbo Xu Date: Thu Feb 9 14:39:13 2023 +0800 erofs: unify anonymous inodes for blob Currently there're two anonymous inodes (inode and anon_inode in struct erofs_fscache) for each blob. The former was introduced as the address_space of page cache for bootstrap. The latter was initially introduced as both the address_space of page cache and also a sentinel in the shared domain. Since now the management of cookies in share domain has been decoupled with the anonymous inode, there's no need to maintain an extra anonymous inode. Let's unify these two anonymous inodes. Besides, in non-share-domain mode only bootstrap will allocate anonymous inode. To simplify the implementation, always allocate anonymous inode for both bootstrap and data blobs. Similarly release anonymous inodes for data blobs when .put_super() is called, or we'll get "VFS: Busy inodes after unmount." warning. Also remove the redundant set_nlink() when initializing the anonymous inode, since i_nlink has already been initialized to 1 when the inode gets allocated. Signed-off-by: Jingbo Xu Reviewed-by: Jia Zhu Link: https://lore.kernel.org/r/20230209063913.46341-5-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang commit 7032809a44d752b9e2275833787e0aa88a7540af Author: Jingbo Xu Date: Thu Feb 9 14:39:12 2023 +0800 erofs: relinquish volume with mutex held Relinquish fscache volume with mutex held. Otherwise if a new domain is registered when the old domain with the same name gets removed from the list but not relinquished yet, fscache may complain the collision. Fixes: 8b7adf1dff3d ("erofs: introduce fscache-based domain") Signed-off-by: Jingbo Xu Reviewed-by: Jia Zhu Link: https://lore.kernel.org/r/20230209063913.46341-4-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang commit 2dfb8c3b122fad4504a92c34ba68f2fe4444b3f6 Author: Jingbo Xu Date: Thu Feb 9 14:39:11 2023 +0800 erofs: maintain cookies of share domain in self-contained list We'd better not touch sb->s_inodes list and inode->i_count directly. Let's maintain cookies of share domain in a self-contained list in erofs. Besides, relinquish cookie with the mutex held. Otherwise if a cookie is registered when the old cookie with the same name in the same domain has been removed from the list but not relinquished yet, fscache may complain "Duplicate cookie detected". Signed-off-by: Jingbo Xu Reviewed-by: Jia Zhu Link: https://lore.kernel.org/r/20230209063913.46341-3-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang commit bdfa90142eb1f1272d2efc00dda6c0f35814e36a Author: Jingbo Xu Date: Thu Feb 9 14:39:10 2023 +0800 erofs: remove unused device mapping in meta routine Currently metadata is always on bootstrap, and thus device mapping is not needed so far. Remove the redundant device mapping in the meta routine. Signed-off-by: Jingbo Xu Reviewed-by: Jia Zhu Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20230209063913.46341-2-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang commit b7fa1de09f92671ac30424765d655873fb606f89 Author: Yangtao Li Date: Thu Feb 9 13:20:13 2023 +0800 MAINTAINERS: erofs: Add Documentation/ABI/testing/sysfs-fs-erofs Add this doc to the erofs maintainers entry. Signed-off-by: Yangtao Li Reviewed-by: Gao Xiang Reviewed-by: Yue Hu Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20230209052013.34952-1-frank.li@vivo.com Signed-off-by: Gao Xiang commit 6967f6cbcae552c9f3405bd70681c6283d41c315 Author: Yue Hu Date: Thu Feb 9 13:11:28 2023 +0800 Documentation/ABI: sysfs-fs-erofs: update supported features Add missing feaures for sysfs-fs-erofs feature doc. Signed-off-by: Yue Hu Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20230209051128.10571-1-zbestahu@gmail.com Signed-off-by: Gao Xiang commit 8b58f9f02162124c2149779af401c8115c70b649 Author: Jingbo Xu Date: Thu Feb 9 10:48:25 2023 +0800 erofs: remove unused EROFS_GET_BLOCKS_RAW flag For erofs_map_blocks() and erofs_map_blocks_flatmode(), the flags argument is always EROFS_GET_BLOCKS_RAW. Thus remove the unused flags parameter for these two functions. Besides EROFS_GET_BLOCKS_RAW is originally introduced for reading compressed (raw) data for compressed files. However it's never used actually and let's remove it now. Signed-off-by: Jingbo Xu Reviewed-by: Yue Hu Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20230209024825.17335-2-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang commit d60b87600d134d1b76436e555546ff5403f1a2f9 Author: Jingbo Xu Date: Thu Feb 9 10:48:24 2023 +0800 erofs: update print symbols for various flags in trace As new flags introduced, the corresponding print symbols for trace are not added accordingly. Add these missing print symbols for these flags. Signed-off-by: Jingbo Xu Reviewed-by: Yue Hu Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20230209024825.17335-1-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang commit 339bc4d3cd251e8d05e44abebadba5ff9baa1d68 Author: Thomas Weißschuh Date: Thu Feb 9 03:21:13 2023 +0000 erofs: 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 Acked-by: Gao Xiang Reviewed-by: Jingbo Xu Reviewed-by: Yue Hu Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20230209-kobj_type-erofs-v1-1-078c945e2c4b@weissschuh.net Signed-off-by: Gao Xiang commit 3fffb589b9a6e331e39cb75373ee7691acd7b109 Author: Sandeep Dhavale Date: Wed Feb 8 17:33:22 2023 +0800 erofs: add per-cpu threads for decompression as an option Using per-cpu thread pool we can reduce the scheduling latency compared to workqueue implementation. With this patch scheduling latency and variation is reduced as per-cpu threads are high priority kthread_workers. The results were evaluated on arm64 Android devices running 5.10 kernel. The table below shows resulting improvements of total scheduling latency for the same app launch benchmark runs with 50 iterations. Scheduling latency is the latency between when the task (workqueue kworker vs kthread_worker) became eligible to run to when it actually started running. +-------------------------+-----------+----------------+---------+ | | workqueue | kthread_worker | diff | +-------------------------+-----------+----------------+---------+ | Average (us) | 15253 | 2914 | -80.89% | | Median (us) | 14001 | 2912 | -79.20% | | Minimum (us) | 3117 | 1027 | -67.05% | | Maximum (us) | 30170 | 3805 | -87.39% | | Standard deviation (us) | 7166 | 359 | | +-------------------------+-----------+----------------+---------+ Background: Boot times and cold app launch benchmarks are very important to the Android ecosystem as they directly translate to responsiveness from user point of view. While EROFS provides a lot of important features like space savings, we saw some performance penalty in cold app launch benchmarks in few scenarios. Analysis showed that the significant variance was coming from the scheduling cost while decompression cost was more or less the same. Having per-cpu thread pool we can see from the above table that this variation is reduced by ~80% on average. This problem was discussed at LPC 2022. Link to LPC 2022 slides and talk at [1] [1] https://lpc.events/event/16/contributions/1338/ [ Gao Xiang: At least, we have to add this until WQ_UNBOUND workqueue issue [2] on many arm64 devices is resolved. ] [2] https://lore.kernel.org/r/CAJkfWY490-m6wNubkxiTPsW59sfsQs37Wey279LmiRxKt7aQYg@mail.gmail.com Signed-off-by: Sandeep Dhavale Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20230208093322.75816-1-hsiangkao@linux.alibaba.com commit 557afdd94cf853885ac3b5c218bdf49c021f7323 Author: Gao Xiang Date: Sat Feb 4 17:30:40 2023 +0800 erofs: tidy up internal.h Reorder internal.h code so that removing unneeded macros and more. No logic changes. Reviewed-by: Yue Hu Reviewed-by: Jingbo Xu Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20230204093040.97967-6-hsiangkao@linux.alibaba.com commit 999f2f9a63f475192d837a2b8595eb0962984d21 Author: Gao Xiang Date: Sat Feb 4 17:30:39 2023 +0800 erofs: get rid of z_erofs_do_map_blocks() forward declaration The code can be neater without forward declarations. Let's get rid of z_erofs_do_map_blocks() forward declaration. Reviewed-by: Yue Hu Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20230204093040.97967-5-hsiangkao@linux.alibaba.com commit a9a94d9373349e1a53f149d2015eb6f03a8517cf Author: Gao Xiang Date: Sat Feb 4 17:30:38 2023 +0800 erofs: move zdata.h into zdata.c Definitions in zdata.h are only used in zdata.c and for internal use only. No logic changes. Reviewed-by: Yue Hu Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20230204093040.97967-4-hsiangkao@linux.alibaba.com commit b1ed220c6262bff63cdcb53692e492be0b05206c Author: Gao Xiang Date: Sat Feb 4 17:30:37 2023 +0800 erofs: remove tagged pointer helpers Just open-code the remaining one to simplify the code. Reviewed-by: Yue Hu Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20230204093040.97967-3-hsiangkao@linux.alibaba.com commit cdba55067f2f9fdc7870ffcb6aef912d3468cff8 Author: Gao Xiang Date: Sat Feb 4 17:30:36 2023 +0800 erofs: avoid tagged pointers to mark sync decompression We could just use a boolean in z_erofs_decompressqueue for sync decompression to simplify the code. Reviewed-by: Yue Hu Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20230204093040.97967-2-hsiangkao@linux.alibaba.com commit 4efdec36dc9907628e590a68193d6d8e5e74d032 Author: Gao Xiang Date: Sat Feb 4 17:30:35 2023 +0800 erofs: get rid of erofs_inode_datablocks() erofs_inode_datablocks() has the only one caller, let's just get rid of it entirely. No logic changes. Reviewed-by: Yue Hu Reviewed-by: Jingbo Xu Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20230204093040.97967-1-hsiangkao@linux.alibaba.com commit b780d3fc6107464dcc43631a6208c43b6421f1e6 Author: Gao Xiang Date: Sat Jan 14 23:08:23 2023 +0800 erofs: simplify iloc() Actually we could pass in inodes directly to clean up all callers. Also rename iloc() as erofs_iloc(). Link: https://lore.kernel.org/r/20230114150823.432069-1-xiang@kernel.org Reviewed-by: Yue Hu Reviewed-by: Jingbo Xu Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit e324eaa9790614577c93e819651e0a83963dac79 Author: Gao Xiang Date: Sat Jan 14 20:57:45 2023 +0800 erofs: get rid of debug_one_dentry() Since erofsdump is available, no need to keep this debugging functionality at all. Also drop a useless comment since it's the VFS behavior. Link: https://lore.kernel.org/r/20230114125746.399253-1-xiang@kernel.org Reviewed-by: Yue Hu Reviewed-by: Jingbo Xu Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit 768bb10afb99803d1ea3ae2f00afcf53a8e02e5f Author: Gao Xiang Date: Fri Jan 13 14:52:26 2023 +0800 erofs: remove linux/buffer_head.h dependency EROFS actually never uses buffer heads, therefore just get rid of BH_xxx definitions and linux/buffer_head.h inclusive. Link: https://lore.kernel.org/r/20230113065226.68801-2-hsiangkao@linux.alibaba.com Reviewed-by: Yue Hu Reviewed-by: Jingbo Xu Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit 7c3511a2c82005642265a254e6dd578cb38684b2 Author: Gao Xiang Date: Fri Jan 13 14:52:25 2023 +0800 erofs: clean up erofs_iget() Move inode hash function into inode.c and simplify erofs_iget(). Link: https://lore.kernel.org/r/20230113065226.68801-1-hsiangkao@linux.alibaba.com Reviewed-by: Yue Hu Reviewed-by: Jingbo Xu Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit d5a7fab7859dc88657372a448b78babcf134114e Author: Samuel Holland Date: Sat Feb 11 20:15:33 2023 -0600 riscv: Fix Zbb alternative IDs Commit 4bf8860760d9 ("riscv: cpufeature: extend riscv_cpufeature_patch_func to all ISA extensions") switched ISA extension alternatives to use the RISCV_ISA_EXT_* macros instead of CPUFEATURE_*. This was mismerged when applied on top of the Zbb series, so the Zbb alternatives referenced the wrong errata ID values. Fixes: 9daca9a5b9ac ("Merge patch series "riscv: improve boot time isa extensions handling"") Signed-off-by: Samuel Holland Reviewed-by: Conor Dooley Reviewed-by: Andrew Jones Reviewed-by: Guo Ren Tested-by: Conor Dooley Link: https://lore.kernel.org/r/20230212021534.59121-3-samuel@sholland.org Signed-off-by: Palmer Dabbelt commit bfd6fc5d80145e12d0ffa144c4bad89b8f9ddc5a Author: Samuel Holland Date: Sat Feb 11 20:15:32 2023 -0600 riscv: Fix early alternative patching Now that the text to patch is located using a relative offset from the alternative entry, the text address should be computed without applying the kernel mapping offset, both before and after VM setup. Fixes: 8d23e94a4433 ("riscv: switch to relative alternative entries") Signed-off-by: Samuel Holland Reviewed-by: Conor Dooley Reviewed-by: Guo Ren Reviewed-by: Jisheng Zhang Tested-by: Conor Dooley Link: https://lore.kernel.org/r/20230212021534.59121-2-samuel@sholland.org Signed-off-by: Palmer Dabbelt commit a5fcd228ca1db9810ba1ed461c90b6ee933b9daf Merge: 5a6fe61facdb7 6980daaa3ed59 Author: Dan Williams Date: Tue Feb 14 16:06:10 2023 -0800 Merge branch 'for-6.3/cxl-rr-emu' into cxl/next Pick up the CXL DVSEC range register emulation for v6.3, and resolve conflicts with the cxl_port_probe() split (from for-6.3/cxl-ram-region) and event handling (from for-6.3/cxl-events). commit 5f365c133b83a584953179fc771cf131668e82ee Author: Conor Dooley Date: Mon Dec 19 17:28:37 2022 +0000 RISC-V: re-order Kconfig selects alphanumerically Selects should be sorted alphanumerically, and were tidied up originally by Palmer in commit e8c7ef7d5819 ("RISC-V: Sort select statements alphanumerically") since then, things have gotten out of order again. Fish RMK's original script out of commit b1b3f49ce460 ("ARM: config: sort select statements alphanumerically") and do some spring cleaning. Signed-off-by: Conor Dooley Acked-by: Björn Töpel Link: https://lore.kernel.org/r/20221219172836.134709-1-conor@kernel.org Signed-off-by: Palmer Dabbelt commit 2a5303b499b18de7179ee1b4ab759880fb02ec9c Author: Conor Dooley Date: Sun Jan 29 23:57:01 2023 +0000 Documentation: riscv: fix insufficient list item indent When adding the ISA string ordering rules, I didn't sufficiently indent one of the list items. Reported-by: kernel test robot Link: https://lore.kernel.org/linux-doc/202301300743.bp7Dpazv-lkp@intel.com/ Fixes: f07b2b3f9d47 ("Documentation: riscv: add a section about ISA string ordering in /proc/cpuinfo") Signed-off-by: Conor Dooley Reviewed-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20230129235701.2393241-1-conor@kernel.org Signed-off-by: Palmer Dabbelt commit 6980daaa3ed5959bf4fe2719d96b1da437026b58 Author: Dave Jiang Date: Tue Feb 14 11:41:40 2023 -0800 cxl/pci: Remove locked check for dvsec_range_allowed() Remove the CXL_DECODER_F_LOCK check to be permissive of platform BIOSes that allow CXL.mem to be remapped. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/167640370085.935665.13128321011001358077.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit d7a2153762c7369534c432ac7e86996063e246df Author: Dave Jiang Date: Tue Feb 14 11:41:35 2023 -0800 cxl/hdm: Add emulation when HDM decoders are not committed For the case where DVSEC range register(s) are active and HDM decoders are not committed, use RR to provide emulation. A first pass is done to note whether any decoders are committed. If there are no committed endpoint decoders, then DVSEC ranges will be used for emulation. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/167640369536.935665.611974113442400127.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 4474ce565ee4490fb4e6d8443b617a9d98ae10ff Author: Dave Jiang Date: Tue Feb 14 11:41:30 2023 -0800 cxl/hdm: Create emulated cxl_hdm for devices that do not have HDM decoders CXL rev3 spec 8.1.3 RCDs may not have HDM register blocks. Create a fake HDM with information from the CXL PCIe DVSEC registers. The decoder count will be set to the HDM count retrieved from the DVSEC cap register. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/167640368994.935665.15831225724059704620.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit b777e9bec960a29374dc486d47784c73b7ac4cef Author: Dave Jiang Date: Tue Feb 14 11:41:24 2023 -0800 cxl/hdm: Emulate HDM decoder from DVSEC range registers In the case where HDM decoder register block exists but is not programmed and at the same time the DVSEC range register range is active, populate the CXL decoder object 'cxl_decoder' with info from DVSEC range registers. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/167640368454.935665.13806415120298330717.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 9de321e93c3b3fd7fd2621a2557c42fa7d43e314 Author: Dave Jiang Date: Tue Feb 14 11:41:19 2023 -0800 cxl/pci: Refactor cxl_hdm_decode_init() With the previous refactoring of DVSEC range registers out of cxl_hdm_decode_init(), it basically becomes a skeleton function. Squash __cxl_hdm_decode_init() with cxl_hdm_decode_init() to simplify the code. cxl_hdm_decode_init() now returns more error codes than just -EBUSY. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/167640367916.935665.12898404758336059003.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 59c3368b2e69eb7da7f271286a0bd80930dfc070 Author: Dave Jiang Date: Tue Feb 14 11:41:13 2023 -0800 cxl/port: Export cxl_dvsec_rr_decode() to cxl_port Call cxl_dvsec_rr_decode() in the beginning of cxl_port_probe() and preserve the decoded information in a local 'struct cxl_endpoint_dvsec_info'. This info can be passed to various functions later on in order to support the HDM decoder emulation. The invocation of cxl_dvsec_rr_decode() in cxl_hdm_decode_init() is removed and a pointer to the 'struct cxl_endpoint_dvsec_info' is passed in. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/167640367377.935665.2848747799651019676.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 1acba6e9206c655f8eb6736c7cafbf022492f36d Author: Dave Jiang Date: Tue Feb 14 11:41:08 2023 -0800 cxl/pci: Break out range register decoding from cxl_hdm_decode_init() There are 2 scenarios that requires additional handling. 1. A device that has active ranges in DVSEC range registers (RR) but no HDM decoder register block. 2. A device that has both RR active and HDM, but the HDM decoders are not programmed. The goal is to create emulated decoder software structs based on the RR. Move the CXL DVSEC range register decoding code block from cxl_hdm_decode_init() to its own function. Refactor code in preparation for the HDM decoder emulation. There is no functionality change to the code. Name the new function to cxl_dvsec_rr_decode(). The only change is to set range->start and range->end to CXL_RESOURCE_NONE and skipping the reading of base registers if the range size is 0, which equates to range not active. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/167640366839.935665.11816388524993234329.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 5a6fe61facdb7f830895712b31fb39f544ffc165 Merge: ee817acaa01d5 248529edc86f8 Author: Dan Williams Date: Tue Feb 14 15:06:08 2023 -0800 Merge branch 'for-6.3/cxl' into cxl/next Pick up the AER unmasking patches for v6.3. commit ee817acaa01d5c56e5fef396bea05c869b7e9351 Merge: f57aec443c24d 8a3d95ea42921 Author: Dan Williams Date: Tue Feb 14 14:58:26 2023 -0800 Merge branch 'for-6.3/cxl-ram-region' into cxl/next Pick up some fixes from exposure of for-6.3/cxl-ram-region in linux-next. commit 3ee0d39c50dca18c76941f46a6c57dc9cd2bfb9d Author: Andy Shevchenko Date: Mon Feb 13 18:17:13 2023 +0200 ASoC: soc-ac97: Convert to agnostic GPIO API The of_gpio.h is going to be removed. In preparation of that convert the driver to the agnostic API. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230213161713.1450-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit fcb3a81d221750d2a54b4e3a82b3efbbeab8780c Author: Srivatsa S. Bhat (VMware) Date: Fri Jan 27 16:37:51 2023 -0800 x86/hotplug: Remove incorrect comment about mwait_play_dead() The comment that says mwait_play_dead() returns only on failure is a bit misleading because mwait_play_dead() could actually return for valid reasons (such as mwait not being supported by the platform) that do not indicate a failure of the CPU offline operation. So, remove the comment. Suggested-by: Thomas Gleixner Signed-off-by: Srivatsa S. Bhat (VMware) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20230128003751.141317-1-srivatsa@csail.mit.edu commit 248529edc86f8d7d390a15a86bd1904951311665 Author: Dave Jiang Date: Tue Feb 14 10:00:24 2023 -0700 cxl: add RAS status unmasking for CXL By default the CXL RAS mask registers bits are defaulted to 1's and suppress all error reporting. If the kernel has negotiated ownership of error handling for CXL then unmask the mask registers by writing 0s. PCI_EXP_DEVCTL capability is checked to see uncorrectable or correctable errors bits are set before unmasking the respective errors. Acked-by: Bjorn Helgaas # pci_regs.h Reviewed-by: Jonathan Cameron Signed-off-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/167639402301.778884.12556849214955646539.stgit@djiang5-mobl3.local Signed-off-by: Dan Williams commit 72ed5d5624af384eaf74d84915810d54486a75e2 Author: Jiri Pirko Date: Thu Jan 26 13:39:09 2023 +0100 net/mlx5: Suspend auxiliary devices only in case of PCI device suspend The original behavior introduced by commit c6acd629eec7 ("net/mlx5e: Add support for devlink-port in non-representors mode") correctly re-instantiated uplink devlink port and related netdevice during devlink reload. However with migration to auxiliary devices, this behaviour changed. Restore the original behaviour and tear down auxiliary devices completely during devlink reload. Signed-off-by: Jiri Pirko Signed-off-by: Saeed Mahameed commit 5977ac3910f1cbaf44dca48179118b25c206ac29 Author: Jiri Pirko Date: Thu Jan 26 13:23:17 2023 +0100 net/mlx5: Remove "recovery" arg from mlx5_load_one() function mlx5_load_one() is always called with recovery==false, so remove the unneeded function arg. Signed-off-by: Jiri Pirko Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit de411a8226df165a8cab9a426ceaaaafa9304ab9 Author: Jiri Pirko Date: Thu Jan 26 10:46:49 2023 +0100 net/mlx5e: Create auxdev devlink instance in the same ns as parent devlink Commit cited in "fixes" tag moved the devlink port under separate devlink entity created for auxiliary device. Respect the network namespace of parent devlink entity and allocate the devlink there. Fixes: ee75f1fc44dd ("net/mlx5e: Create separate devlink instance for ethernet auxiliary device") Signed-off-by: Jiri Pirko Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 6d6e71e6e5e3713d18c87b16af774b7db51a68c3 Author: Jiri Pirko Date: Wed Jan 18 15:52:33 2023 +0100 net/mlx5e: Move devlink port registration to be done before netdev alloc Move the devlink port registration to be done right after devlink instance registration. Signed-off-by: Jiri Pirko Signed-off-by: Saeed Mahameed commit c30f3faa2a81bc6d7d05967eb07bbe3bd5b359e6 Author: Jiri Pirko Date: Tue Jan 17 14:44:54 2023 +0100 net/mlx5e: Move dl_port to struct mlx5e_dev No need to have dl_port which is tightly coupled with mlx5e code in mlx5 core code. Move it to struct mlx5e_dev and loose mlx5e_devlink_get_dl_port() helper. Signed-off-by: Jiri Pirko Signed-off-by: Saeed Mahameed commit bc1536f369f043fa362a25d51f84bf59f2f48489 Author: Jiri Pirko Date: Wed Jan 18 15:44:48 2023 +0100 net/mlx5e: Replace usage of mlx5e_devlink_get_dl_port() by netdev->devlink_port On places where netdev pointer is available, access related devlink_port pointer by netdev->devlink_port instead of using mlx5e_devlink_get_dl_port() which is going to be removed. Move SET_NETDEV_DEVLINK_PORT() call right after devlink port registration to make sure netdev->devlink_port is valid. Signed-off-by: Jiri Pirko Signed-off-by: Saeed Mahameed commit ccd672bcf3e53ecd666ed99d4901992ebd78fdd9 Author: Jiri Pirko Date: Wed Jan 18 15:39:24 2023 +0100 net/mlx5e: Pass mdev to mlx5e_devlink_port_register() Instead of accessing priv->mdev, pass mdev pointer to mlx5e_devlink_port_register() and access it directly. Signed-off-by: Jiri Pirko Signed-off-by: Saeed Mahameed commit 29a299cb6b2051c1c7394da00c080df5cca7bfc3 Author: Jiri Pirko Date: Fri Jan 13 15:44:42 2023 +0100 net/mlx5: Remove outdated comment The comment is no longer applicable, as the devlink reload and instance cleanup are both protected with devlink instance lock, therefore no race can happen. Signed-off-by: Jiri Pirko Signed-off-by: Saeed Mahameed commit b97653d87bda09441d521a448c69cccd3dd6649d Author: Roi Dayan Date: Sun Jan 29 11:53:42 2023 +0200 net/mlx5e: TC, Remove redundant parse_attr argument The parse_attr argument is not being used in actions_match_supported_fdb(). remove it. Signed-off-by: Roi Dayan Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed commit 197c00029294528e35ba97e4b8b54155c6654261 Author: Roi Dayan Date: Mon Feb 6 14:40:24 2023 +0200 net/mlx5e: Use a simpler comparison for uplink rep get_route_and_out_devs() is uses the following condition mlx5e_eswitch_rep() && mlx5e_is_uplink_rep() to check if a given netdev is the uplink rep. Alternatively we can just use the straight forward version mlx5e_eswitch_uplink_rep() that only checks if a given netdev is uplink rep. Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 27f9e0ccb6da0857a323c1d19a23b6666ddefe05 Author: Mark Bloch Date: Mon Dec 5 15:32:52 2022 +0200 net/mlx5: Lag, Add single RDMA device in multiport mode In MultiPort E-Switch mode a single RDMA is created. This device has multiple RDMA ports that represent the uplink ports that are connected to the E-Switch. Account for this when creating the RDMA device so it has an additional port for the non native uplink. As a side effect of this patch, use shared fdb in multiport eswitch mode. Signed-off-by: Mark Bloch Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 73af3711c7028286136bb7e9422b19f5a016626d Author: Roi Dayan Date: Wed Nov 30 15:12:50 2022 +0200 net/mlx5: Lag, set different uplink vport metadata in multiport eswitch mode In a follow-up commit multiport eswitch mode will use a shared fdb. In shared fdb there is a single eswitch fdb and traffic could come from any port. to distinguish between the ports set a different metadata per uplink port. Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit ab9fc405ffd9690266039662286ed69f98c11738 Author: Roi Dayan Date: Tue Nov 29 16:02:55 2022 +0200 net/mlx5: E-Switch, rename bond update function to be reused The vport bond update function is really updating the vport metadata and there is no direct relation to bond. Rename the function to vport metadata update to be used a followup commit. This commit doesn't change any functionality. Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit 8ce81fc01b52a17073353e0d483a2434abd2e392 Author: Roi Dayan Date: Thu Dec 1 11:10:20 2022 +0200 net/mlx5e: TC, Add peer flow in mpesw mode While at it rename mlx5_lag_mpesw_is_activated() to mlx5_lag_is_mpesw() to be consistent with checking if other lag modes are activated. Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit a32327a3a02c6513feaeb122a6d8fb6e8d168365 Author: Roi Dayan Date: Mon Nov 28 13:33:03 2022 +0200 net/mlx5: Lag, Control MultiPort E-Switch single FDB mode MultiPort E-Switch builds on newer hardware's capabilities and introduces a mode where a single E-Switch is used and all the vports and physical ports on the NIC are connected to it. The new mode will allow in the future a decrease in the memory used by the driver and advanced features that aren't possible today. This represents a big change in the current E-Switch implantation in mlx5. Currently, by default, each E-Switch manager manages its E-Switch. Steering rules in each E-Switch can only forward traffic to the native physical port associated with that E-Switch. While there are ways to target non-native physical ports, for example using a bond or via special TC rules. None of the ways allows a user to configure the driver to operate by default in such a mode nor can the driver decide to move to this mode by default as it's user configuration-driven right now. While MultiPort E-Switch single FDB mode is the preferred mode, older generations of ConnectX hardware couldn't support this mode so it was never implemented. Now that there is capable hardware present, start the transition to having this mode by default. Introduce a devlink parameter to control MultiPort E-Switch single FDB mode. This will allow users to select this mode on their system right now and in the future will allow the driver to move to this mode by default. Example: $ devlink dev param set pci/0000:00:0b.0 name esw_multiport value 1 \ cmode runtime Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit 1922a6dc0502ed3fd0786f57cc9e5f515c902009 Author: Dave Jiang Date: Mon Feb 13 13:28:42 2023 -0700 cxl: remove unnecessary calling of pci_enable_pcie_error_reporting() With this [1] commit upstream, pci_enable_pci_error_report() is no longer necessary for the driver to call. Remove call and related cleanups. [1]: f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native") Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/167632012093.4153151.5360778069735064322.stgit@djiang5-mobl3.local Signed-off-by: Dan Williams commit cec3b46b8bda0cdc93d3ab2bdd14aae5d30ecfd9 Author: Neil Armstrong Date: Tue Feb 14 17:41:18 2023 +0100 power: reset: add Odroid Go Ultra poweroff driver The Hardkernel Odroid Go Ultra poweroff scheme requires requesting a poweroff to its two PMICs in order, this represents the poweroff scheme needed to complete a clean poweroff of the system. This implement this scheme by implementing a self registering driver to permit using probe defer until both pmics are finally probed. Signed-off-by: Neil Armstrong Signed-off-by: Sebastian Reichel commit a06377c5d01eeeaa52ad979b62c3c72efcc3eff0 Author: Christoph Hellwig Date: Tue Feb 14 19:33:08 2023 +0100 Revert "blk-cgroup: pin the gendisk in struct blkcg_gq" This reverts commit 84d7d462b16dd5f0bf7c7ca9254bf81db2c952a2. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230214183308.1658775-6-hch@lst.de Signed-off-by: Jens Axboe commit 9a9c261e6b5512e0b8d9ae9b1c1746c743a15a48 Author: Christoph Hellwig Date: Tue Feb 14 19:33:07 2023 +0100 Revert "blk-cgroup: pass a gendisk to blkg_lookup" This reverts commit 821e840c08ad83736eced4037cdad864e95e2584. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230214183308.1658775-5-hch@lst.de Signed-off-by: Jens Axboe commit b6553bef8cdc2983943f60edb8dc5e49361ebb3b Author: Christoph Hellwig Date: Tue Feb 14 19:33:06 2023 +0100 Revert "blk-cgroup: delay blk-cgroup initialization until add_disk" This reverts commit 178fa7d49815ea8001f43ade37a22072829fd8ab. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230214183308.1658775-4-hch@lst.de Signed-off-by: Jens Axboe commit b4e94f9c2c0822265a6942741d270aa16d229331 Author: Christoph Hellwig Date: Tue Feb 14 19:33:05 2023 +0100 Revert "blk-cgroup: delay calling blkcg_exit_disk until disk_release" This reverts commit c43332fe028c252a2a28e46be70a530f64fc3c9d as it is not needed without moving to disk references in the blkg. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230214183308.1658775-3-hch@lst.de Signed-off-by: Jens Axboe commit 1231039db31cf0703996d0b1797c2702e25a110a Author: Christoph Hellwig Date: Tue Feb 14 19:33:04 2023 +0100 Revert "blk-cgroup: move the cgroup information to struct gendisk" This reverts commit 3f13ab7c80fdb0ada86a8e3e818960bc1ccbaa59 as a patch it depends on caused a few problems. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230214183308.1658775-2-hch@lst.de Signed-off-by: Jens Axboe commit d67307b4147e51b00545e2e17c20bd2cc8e6c745 Author: Thomas Weißschuh Date: Tue Feb 14 04:21:24 2023 +0000 SUNRPC: 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: Anna Schumaker commit 0438499a7f098c35e83134fc04899fe2188e4ef2 Author: Kuninori Morimoto Date: Mon Feb 13 02:13:18 2023 +0000 ASoC: dt-bindings: renesas,rsnd.yaml: drop "dmas/dma-names" from "rcar_sound,ssi" SSI is supporting both "PIO mode" and "DMA mode", thus "dmas/dma-names" are not mandatory property. Drop these from rcar_sound,ssi's required:. This is prepare for Gen4 support. See more details on Link 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 Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/87r0uu8g8x.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 13b599f15e1cb59d6cc907908532dc45bf048e3a Author: Zhu Yanjun Date: Mon Jan 16 13:51:31 2023 -0500 ice: Mention CEE DCBX in code comment From the function ice_parse_org_tlv, CEE DCBX TLV is also supported. So update the comment. Or else, it is confusing. Signed-off-by: Zhu Yanjun Signed-off-by: Tony Nguyen commit d8a23ff6a755eccbebfa1b5173a951cfdd088c8c Author: Tony Nguyen Date: Thu Jan 5 11:33:11 2023 -0800 ice: Change ice_vsi_realloc_stat_arrays() to void smatch reports: smatch warnings: drivers/net/ethernet/intel/ice/ice_lib.c:3612 ice_vsi_rebuild() warn: missing error code 'ret' If an error is encountered for ice_vsi_realloc_stat_arrays(), ret is not assigned an error value so the goto error path would return success. The function, however, only returns 0 so an error will never be reported; due to this, change the function to return void. Reported-by: kernel test robot Signed-off-by: Tony Nguyen Tested-by: Gurucharan G (A Contingent worker at Intel) commit fce92dbc611727525e03c31547c715c65960e5ce Author: Pawel Chmielewski Date: Tue Feb 7 17:23:03 2023 +0100 ice: add support BIG TCP on IPv6 Enable sending BIG TCP packets on IPv6 in the ice driver using generic ipv6_hopopt_jumbo_remove helper for stripping HBH header. Tested: netperf -t TCP_RR -H 2001:db8:0:f101::1 -- -r80000,80000 -O MIN_LATENCY,P90_LATENCY,P99_LATENCY,TRANSACTION_RATE Tested on two different setups. In both cases, the following settings were applied after loading the changed driver: ip link set dev enp175s0f1np1 gso_max_size 130000 ip link set dev enp175s0f1np1 gro_max_size 130000 ip link set dev enp175s0f1np1 mtu 9000 First setup: Before: Minimum 90th 99th Transaction Latency Percentile Percentile Rate Microseconds Latency Latency Tran/s Microseconds Microseconds 134 279 410 3961.584 After: Minimum 90th 99th Transaction Latency Percentile Percentile Rate Microseconds Latency Latency Tran/s Microseconds Microseconds 135 178 216 6093.404 The other setup: Before: Minimum 90th 99th Transaction Latency Percentile Percentile Rate Microseconds Latency Latency Tran/s Microseconds Microseconds 218 414 478 2944.765 After: Minimum 90th 99th Transaction Latency Percentile Percentile Rate Microseconds Latency Latency Tran/s Microseconds Microseconds 146 238 266 4700.596 Signed-off-by: Pawel Chmielewski Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit fcc2cef37fed567564f5b94a9c0aba733bb159ab Author: Daniel Vacek Date: Thu Jan 19 21:23:16 2023 +0100 ice/ptp: fix the PTP worker retrying indefinitely if the link went down When the link goes down the ice_ptp_tx_tstamp() may loop re-trying to process the packets till the 2 seconds timeout finally drops them. In such a case it makes sense to just drop them right away. Signed-off-by: Daniel Vacek Reviewed-by: Jacob Keller Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 634d841dbfa7c530e54db936db05b8bc3a44f429 Author: Karol Kolacinski Date: Wed Sep 14 12:04:29 2022 +0200 ice: Add GPIO pin support for E823 products Add GPIO pin setup for E823, which is only 1PPS input and output. Signed-off-by: Karol Kolacinski Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 35f33086b1b9cf5d85f55b36c75b92f8cccfbf12 Author: Bhawanpreet Lakha Date: Tue Jan 17 14:35:41 2023 -0500 drm/amd/display: Add support for multiple overlay planes [Why] We only allowed 1 overlay plane. But now some ASICS can support multiple overlay planes. [How] Use max_slave_planes as the number of overlays we can support. Also since we cannot draw cursor over a video plane, we need to make sure that we reject commits where the topmost plane is a video plane (overlay only). Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Bhawanpreet Lakha Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5ca38a18b5a47017d0e9a016661dad12322767fa Author: Wenjing Liu Date: Wed Feb 1 16:07:35 2023 -0500 drm/amd/display: move public dc link function implementation to dc_link_exports [why] Link is a subcomponent in dc. DM should be aware of dc link structure as one of the abstracted objects maintained by dc. However it should have no idea of the existence of a link component in dc dedicated to maintain the states of dc link structure. As such we are moving link interfaces out of dc_link.h and directly added to dc.h. We are grandually fading out the explicit inclusion of dc_link header and eventually delete it. On dc side, since link is a subcomponent behind dc interfaces, it is not a good idea to implement dc interfaces in each individual subcomponent of link which is already a subcomponent of dc. So we are decoupling it by implementing a dc_link_exports in dc. This file will be a thin translation layer that breaks the dependency so link is able to make interface changes without breaking DM. Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9b0f51e8449f6f76170fda6a8dd9c417a43ce270 Author: Nicholas Kazlauskas Date: Wed Feb 1 13:38:05 2023 -0500 drm/amd/display: Update Z8 SR exit/enter latencies [Why] Request from HW team to update the latencies to the new measured values. [How] Update the values in the bounding box. Reviewed-by: Charlene Liu Acked-by: Qingqing Zhuo Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6cfb6df2d645c00513ecf17832928e08979fa953 Author: Leo (Hanghong) Ma Date: Wed Feb 1 16:51:42 2023 -0500 drm/amd/display: Fix FreeSync active bit issue [Why] The FreeSync active bit unconditionally set in HDMI VSIF. [How] Set this bit to true when FAMS is enable on desktop. Reviewed-by: Felipe Clark Acked-by: Qingqing Zhuo Signed-off-by: Leo (Hanghong) Ma Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ba7606846579ce6b1eca25b196e0f88de7e3becf Author: Nasir Osman Date: Wed Feb 1 14:37:12 2023 -0500 drm/amd/display: Disable unbounded request mode during rotation [why] HUBP_UNBOUNDED_REQ_MODE being enabled while the display is rotated (eg. going from Portrait mode to Landscape mode) appears to be causing a p-state hang, specifically during full screen mode on the Tiktok PC app. Unbounded request mode doesn't appear to be supported with rotation configs, hence disabling it. [how] Within DML, modified unbounded request mode to be configured only when the rotation angle of the plane is 0. Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Nasir Osman Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit fa9b4155c3d4e8441ea57ad10ec98504845e54bb Author: Yifan Zha Date: Wed Feb 8 16:47:35 2023 +0800 drm/amdgpu: Revert programming GRBM_GFX_* in RLCG interface to support GFX9 [Why] Regression of commit 72fef4980ddf ("drm/amdgpu: Remove writing GRBM_GFX_CNTL in RLCG interface under SRIOV") on GFX9. According to GFX9 VF using different method to access GC registers including MMIO(direct) and RLCG(indirect), removing GRBM_GFX_* writing would make PIPE/ME/VM/QUEUE selection chaos leading to some OCL benchmark failure. For example, using RLCG interface to program GRBM_GFX_CNTL/INDEX for selecting MEC(actually the value is only in scratch2/3), then using MMIO directly program a MEC register in VF driver. The register programming are invalid due to GC switched to incorrect ME. [How] With checking RLCG accessing flag, keep writing GRBM_GFX_* as a legacy way. But it is still skipped on GFX10+ to avoid violation occurrence. Signed-off-by: Yifan Zha Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 48e99fe4d3ba83d6b7bf288e90b360f83e1c6924 Author: Jiapeng Chong Date: Fri Feb 10 10:43:43 2023 +0800 drm/amd/display: Remove the unused variable pre_connection_type Variable pre_connection_type is not effectively used, so delete it. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4031 Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit ee3916b45add7ba9fa59b0e9832a5d24d34047d7 Author: Jiapeng Chong Date: Fri Feb 10 10:28:39 2023 +0800 drm/amd/display: Remove the unused variable ds_port Variable ds_port is not effectively used, so delete it. drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_capability.c:280:35: warning: variable ‘ds_port’ set but not used. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4030 Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit 71c4ca2d3b079d0ba4d9b3033641fea906cebfb6 Author: Nasir Osman Date: Wed Feb 1 14:16:12 2023 -0500 drm/amd/display: Remove stutter only configurations [why] Newer ASICs such as DCN314 needs to allow for both self refresh and mem clk switching rather than just self refresh only. Otherwise, we can see some p-state hangs on ASICs that do support mem clk switching. [how] Added an allow_self_refresh_only flag for dcn30_internal_validate_bw and created a validate_bw method for DCN314 with the allow_self_refresh_only flag set to false (to support mem clk switching). Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Nasir Osman Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d6ed6d0d2aa8f238ca20ed03f24355336ff77dff Author: Tom Chung Date: Wed Feb 1 17:37:51 2023 +0800 drm/amd/display: Fix video glitch while drag window in PSR-SU [Why] Dmub will cache the video position data during PSR-SU enable. The dmub will use an outdated MPO video position if user try to drag the video window and it will cause video glitch. [How] Disable the PSR-SU temporarily while user drag the video window. The PSR-SU will be re-enabled after the video window is stable. Reviewed-by: Sun peng Li Acked-by: Qingqing Zhuo Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e54b214946136ba773fbce9a3b8b4d1ab9d0ad77 Author: Yang Li Date: Fri Feb 10 09:05:58 2023 +0800 drm/amd/display: clean up some inconsistent indentings drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_factory.c:145 get_ddc_line() warn: inconsistent indenting drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_factory.c:201 dc_link_construct_phy() warn: inconsistent indenting Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4026 Signed-off-by: Yang Li Signed-off-by: Alex Deucher commit d2c40a2d750e53f871a732d1cc11b92239cd3405 Author: Yang Li Date: Fri Feb 10 08:58:59 2023 +0800 drm/amd/display: Simplify bool conversion ./drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c:1610:68-73: WARNING: conversion to bool not needed here Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4025 Signed-off-by: Yang Li Signed-off-by: Alex Deucher commit f0584be558719e0a7efc78613baa0eafcae05fbe Author: Charlene Liu Date: Tue Jan 31 12:51:40 2023 -0500 drm/amd/display: add NULL pointer check [Why] In virtual link use case, link->ddc could be NULL. [How] Add null pointer check to avoid undefined behavior. Reviewed-by: Martin Leung Reviewed-by: Hansen Dsouza Acked-by: Qingqing Zhuo Signed-off-by: Charlene Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ed6941b632100169aea453f60461ab79111af48c Author: Wenjing Liu Date: Fri Jan 27 19:16:05 2023 -0500 drm/amd/display: on dp link lost event toggle dpms for master pipe only [why] We mistakenly toggle dpms state for non master pipe when handling link lost. A non master pipe doesn't connect to a backend. So it is toggling dpms for non master is undefined and caused NULL pointer dereference. [how] Add helper functions to find an array of active master pipes for current link and only toggle DPMS for active master pipes connected to the link. Add assert in case we get called to program dpms with non master pipe. Reviewed-by: Alvin Lee Acked-by: Qingqing Zhuo Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3d8fcc6740c9f959bc490cd4a084c5a55b572987 Author: Wenjing Liu Date: Thu Jan 26 15:51:14 2023 -0500 drm/amd/display: Extract temp drm mst deallocation wa into its own function [why] A recent change was made to implement temporary workaround due DRM update in MST interfaces. The workaround is added into our generic deallocation MST sequence. This ticket is to extract this temporary workaround into its own function so it is differentiated from our generic sequence. Reviewed-by: Jerry Zuo Acked-by: Qingqing Zhuo Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d47d2f9392f69f069c31d60ac3088471b1e1c7d4 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 ce05ca0a37e1f27465edee3d14a24ba2bd4bd3e9 Author: Daniel Miess Date: Thu Jan 26 16:54:29 2023 -0500 Revert "drm/amd/display: Correct bw_params population" This reverts commit f5df7725e38853b5b07b7ab41017916f1e5b4e57 [Why] This commit causes corruption when viewing a P010 video clip on a 300Hz eDP Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Daniel Miess Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit fbc0c790b1e274d2e1697df98e469cb982ada84e Author: Wenjing Liu Date: Mon Jan 30 18:21:29 2023 -0500 drm/amd/display: do not set RX back to SST mode for non 0 mst stream count [why] a recent regression has caused us to mistakenly switch RX back to SST mode when there are remaining mst stream enabled to the link. We are missing a condition check for stream count before setting RX back to SST mode. [how] Add stream count check condition back and do some further refactor so the logic is easier to understand to prevent future coding error in this sequence. Reviewed-by: Samson Tam Acked-by: Qingqing Zhuo Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3a61570415690e9d5e7f10a288d25d49163f819d Author: Alvin Lee Date: Tue Jan 31 10:12:43 2023 -0500 drm/amd/display: Fix prefetch vratio check [Why & How] - For prefetch max vratio check, use the calculated prefetch bandwidth from dml32_CalculatePrefetchSchedule instead of max prefetch bandwidth - Also multiply prefetch bandwidth by VRatio since scaling is not considered one calculating require prefetch bw Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 37d184b548db0f64d4a878960b2c6988b38a3e7e Author: Nicholas Kazlauskas Date: Fri Jan 27 10:03:45 2023 -0500 drm/amd/display: Enable P-state validation checks for DCN314 [Why] To align with DCN31 behavior. This helps avoid p-state hangs in the case where underflow does occur. [How] Flip the bit to true. Reviewed-by: Hansen Dsouza Acked-by: Qingqing Zhuo Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3b214bb7185d8284d7d4c53e15127f69a375abf6 Author: Aurabindo Pillai Date: Mon Jan 30 13:07:59 2023 -0500 drm/amd/display: fix k1 k2 divider programming for phantom streams [Why & How] When k1 and k2 divider programming logic is executed for a phantom stream, the corresponding master stream should be used for the calculation. Fix the if condition to use the master stream for checking signal type instead of the phantom stream. Reviewed-by: Alvin Lee Acked-by: Qingqing Zhuo Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b3551ead616318ea155558cdbe7e91495b8d9b33 Author: Jason Gunthorpe Date: Mon Feb 13 10:32:21 2023 -0400 iommufd: Make sure to zero vfio_iommu_type1_info before copying to user Missed a zero initialization here. Most of the struct is filled with a copy_from_user(), however minsz for that copy is smaller than the actual struct by 8 bytes, thus we don't fill the padding. Cc: stable@vger.kernel.org # 6.1+ Fixes: d624d6652a65 ("iommufd: vfio container FD ioctl compatibility") Link: https://lore.kernel.org/r/0-v1-a74499ece799+1a-iommufd_get_info_leak_jgg@nvidia.com Reviewed-by: Kevin Tian Reported-by: syzbot+cb1e0978f6bf46b83a58@syzkaller.appspotmail.com Signed-off-by: Jason Gunthorpe commit 7cd07d9de8711a0d3f361c84d402e3d6b89ccede Author: Alvin Lee Date: Wed Jan 25 12:33:43 2023 -0500 drm/amd/display: Set max vratio for prefetch to 7.9 for YUV420 MPO [Description] - Single 4K60 playing YUV420 MPO video blocks P-State because the required VRatio for prefetch is too high (luma plane for YUV420 is 1bpe, so swath height is 16 and prefetch requires more lines) - Allow max vratio per plane to be 7.9 for single display YUV420 MPO video cases - Ensure that global vratio prefetch (i.e. total prefetch BW vs. total active bandwidth) does not excited 4.0 Reviewed-by: Nevenko Stupar Acked-by: Qingqing Zhuo Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e383b12709e32d6494c948422070c2464b637e44 Author: Nicholas Kazlauskas Date: Mon Jan 23 14:59:28 2023 -0500 drm/amd/display: Move DCN314 DOMAIN power control to DMCUB [Why] DOMAIN power gating control is now required to be done via firmware due to interlock with other power features. This is to avoid intermittent issues in the LB memories. [How] If the firmware supports the command then use the new firmware as the sequence can avoid potential display corruption issues. The command will be ignored on firmware that does not support DOMAIN power control and the pipes will remain always on - frequent PG cycling can cause the issue to occur on the old sequence, so we should avoid it. Reviewed-by: Hansen Dsouza Acked-by: Qingqing Zhuo Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 230dd6bb61173acccdfbf855ba907286e850cd67 Author: Kenneth Feng Date: Fri Feb 10 13:04:17 2023 +0800 drm/amd/amdgpu: implement mode2 reset on smu_v13_0_10 implement mode2 reset on smu_v13_0_10 Signed-off-by: Kenneth Feng Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 677033b5c903e056d27bd58eccb48c79d92008a8 Author: Xiaogang Chen Date: Wed Feb 8 17:10:59 2023 -0600 drm/amdkfd: Prevent user space using both svm and kfd api to register same user buffer When xnack is on user space can use svm page restore to set a vm range without setup it first, then use regular api to register. Currently kfd api and svm are not interoperable. We already have check on that, but for user buffer the mapping address is not same as buffer cpu virtual address. Add checking on that to avoid error propagate to hmm. Signed-off-by: Xiaogang Chen Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit be9f1daad7b4064474a6e5dd03c55b882c9cf928 Author: Ma Jun Date: Wed Feb 8 10:22:55 2023 +0800 drm/amdgpu: Fix the warning info when unload or remove amdgpu Checking INVOKE_CMD to fix the below warning info when unload or remove amdgpu driver [ 319.489809] Call Trace: [ 319.489810] [ 319.489812] psp_ta_unload+0x9a/0xd0 [amdgpu] [ 319.489926] ? smu_smc_hw_cleanup+0x2f6/0x360 [amdgpu] [ 319.490072] psp_hw_fini+0xea/0x170 [amdgpu] [ 319.490231] amdgpu_device_fini_hw+0x2fc/0x413 [amdgpu] [ 319.490398] ? blocking_notifier_chain_unregister+0x56/0xb0 [ 319.490401] amdgpu_driver_unload_kms+0x51/0x60 [amdgpu] [ 319.490493] amdgpu_pci_remove+0x5a/0x140 [amdgpu] [ 319.490583] ? __pm_runtime_resume+0x60/0x90 [ 319.490586] pci_device_remove+0x3b/0xb0 [ 319.490588] __device_release_driver+0x1a8/0x2a0 [ 319.490591] driver_detach+0xf3/0x140 [ 319.490593] bus_remove_driver+0x6c/0xf0 [ 319.490595] driver_unregister+0x31/0x60 [ 319.490597] pci_unregister_driver+0x40/0x90 [ 319.490599] amdgpu_exit+0x15/0x44e [amdgpu] Signed-off-by: Ma Jun Reviewed-by: Alex Deucher Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit b46d80bd2d6e7e063c625a20de54248afe8d4889 Author: Benjamin Coddington Date: Tue Feb 14 08:18:23 2023 -0500 nfs4trace: fix state manager flag printing __print_flags wants a mask, not the enum value. Add two more flags. Fixes: 511ba52e4c01 ("NFS4: Trace state recovery operation") Signed-off-by: Benjamin Coddington Signed-off-by: Anna Schumaker commit 0eb15a47bf437a268b69ab1a1a45fdf1f609b69f Author: Shuah Khan Date: Tue Feb 14 12:19:39 2023 -0700 selftests/user_events: add a note about user_events.h dependency This test depends on exported in uapi The following commit removed user_events.h out of uapi: commit 5cfff569cab8 ("tracing: Move user_events.h temporarily out of include/uapi") This test will not compile until user_events.h is added back to uapi. Signed-off-by: Shuah Khan commit b0bbd86a288ab35234edb704935982c20f74628d Author: Thomas Weißschuh Date: Tue Feb 14 03:20:55 2023 +0000 dm sysfs: 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 Signed-off-by: Mike Snitzer commit a7e8f7fbe2adc132c0222fea96a18610337e2775 Author: Tetsuo Handa Date: Wed Apr 20 14:12:26 2022 +0900 dm: update targets using system workqueues to use a local workqueue Flushing system-wide workqueues is dangerous and will be forbidden. Use a local workqueue in dm-mpath.c, dm-raid1.c, and dm-stripe.c. Link: https://lkml.kernel.org/r/49925af7-78a8-a3dd-bce6-cfc02e1a9236@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa Signed-off-by: Mike Snitzer commit 0b22ff5360f5c4e11050b89206370fdf7dc0a226 Author: Mike Snitzer Date: Tue Feb 14 13:06:05 2023 -0500 dm: remove flush_scheduled_work() during local_exit() Commit acfe0ad74d2e1 ("dm: allocate a special workqueue for deferred device removal") switched from using system workqueue to a single workqueue local to DM. But it didn't eliminate the call to flush_scheduled_work() that was introduced purely for the benefit of deferred device removal with commit 2c140a246dc ("dm: allow remove to be deferred"). Since DM core uses its own workqueue (and queue_work) there is no need to call flush_scheduled_work() from local_exit(). local_exit()'s destroy_workqueue(deferred_remove_workqueue) handles flushing work started with queue_work(). Fixes: acfe0ad74d2e1 ("dm: allocate a special workqueue for deferred device removal") Signed-off-by: Mike Snitzer commit f0ac1598712ff0f7b985d58546449e232487ee0e Author: Heinz Mauelshagen Date: Tue Feb 7 23:29:02 2023 +0100 dm clone: prefer kvmalloc_array() Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 774f13ac2b567207f04eb34d25188f5daec57f9e Author: Heinz Mauelshagen Date: Tue Feb 7 23:15:36 2023 +0100 dm: declare variables static when sensible Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 23fda2effbb1f2f1d2fb0640a4729e6d08ad6e6e Author: Heinz Mauelshagen Date: Tue Feb 7 23:06:47 2023 +0100 dm: fix suspect indent whitespace Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 22a8b84945e9a5027174e06ec5c8ce3d978844d6 Author: Heinz Mauelshagen Date: Tue Feb 7 23:04:01 2023 +0100 dm ioctl: prefer strscpy() instead of strlcpy() Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit b39b73243dd40b8b55a80cce7520745c9559a08d Author: Heinz Mauelshagen Date: Tue Feb 7 22:27:11 2023 +0100 dm: avoid void function return statements Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit ba287d7ccb9b4afb69ce67743db5211c49b35d8b Author: Heinz Mauelshagen Date: Tue Feb 7 22:22:08 2023 +0100 dm integrity: change macros min/max() -> min_t/max_t where appropriate Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 8d1058fb2ac29644d8a427eb3d3eeff2fd88f0a7 Author: Heinz Mauelshagen Date: Tue Feb 7 22:16:53 2023 +0100 dm: fix use of sizeof() macro Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 6cc435fa76cc1786ef460c08c31b1d27c13e9cff Author: Heinz Mauelshagen Date: Tue Feb 7 22:07:22 2023 +0100 dm: avoid 'do {} while(0)' loop in single statement macros Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit dcdd467915de0435bbaf99396f20293166b3d3a4 Author: Heinz Mauelshagen Date: Tue Feb 7 22:02:17 2023 +0100 dm log: avoid multiple line dereference Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit fb99e87b44ff8e77fe1406796361db194c17aedd Author: Heinz Mauelshagen Date: Tue Feb 7 22:00:44 2023 +0100 dm log: avoid trailing semicolon in macro Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 5cae0aa77397015f530aeb34f3ced32db6ac2875 Author: Heinz Mauelshagen Date: Tue Feb 7 21:47:45 2023 +0100 dm ioctl: have constant on the right side of the test Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit a6ba79c0144f449fcf65aa829ca8d7341811f83a Author: Heinz Mauelshagen Date: Tue Feb 7 21:02:51 2023 +0100 dm: don't indent labels Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 9bfeac5d33d8500332d75e32abe32c0df4910add Author: Heinz Mauelshagen Date: Tue Feb 7 20:56:57 2023 +0100 dm: avoid inline filenames Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit b30f1607146c736684c069fe92dc39607d77d15f Author: Heinz Mauelshagen Date: Tue Feb 7 20:48:51 2023 +0100 dm: add missing blank line after declarations/fix those Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 1c3fe2fa946342a784a1375a63be6eb5a25acd76 Author: Heinz Mauelshagen Date: Tue Feb 7 20:35:25 2023 +0100 dm: avoid useless 'else' after 'break' or return' Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit ae99111ecf70c3003b4b1ba38b95fbe35410b2a6 Author: Heinz Mauelshagen Date: Tue Feb 7 18:38:28 2023 +0100 dm: favour __packed versus "__attribute__ ((packed))" Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit f8922a48291d40c4fb07d66ef88c69ea415d8cd9 Author: Heinz Mauelshagen Date: Tue Feb 7 18:35:43 2023 +0100 dm: favour __aligned(N) versus "__attribute__ (aligned(N))" Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 6a808034724b5a36f8e0b712427bfbe9e667d296 Author: Heinz Mauelshagen Date: Mon Feb 6 23:58:05 2023 +0100 dm: avoid using symbolic permissions Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 1c13188669282dac48f1e67d77f07a746a4899d7 Author: Heinz Mauelshagen Date: Mon Feb 6 23:42:32 2023 +0100 dm: prefer '"%s...", __func__' Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit aa07f9d806f994f7cf42494c2b99573e77cdae21 Author: Heinz Mauelshagen Date: Fri Feb 3 22:17:21 2023 +0100 dm: adjust EXPORT_SYMBOL() to follow functions immediately Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 2e84fecf19e1694338deec8bf6c90ff84f8f31fb Author: Heinz Mauelshagen Date: Fri Feb 3 18:55:47 2023 +0100 dm: avoid split of quoted strings where possible Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 2d0f25cbc0d948e01573cc8ff5967e81bd98a4a1 Author: Heinz Mauelshagen Date: Thu Feb 2 17:10:52 2023 +0100 dm: remove unnecessary braces from single statement blocks Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 0ef0b4717aa6849d251b23ae1efe93ca93af540b Author: Heinz Mauelshagen Date: Wed Feb 1 23:42:29 2023 +0100 dm: add missing empty lines Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 02f10ba178e7a43faf7107cd15111e0f81e6ac70 Author: Heinz Mauelshagen Date: Wed Feb 1 22:36:19 2023 +0100 dm: add argument identifier names Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 8ca817c43e12847be182e0bbff9b59398373a3b8 Author: Heinz Mauelshagen Date: Wed Feb 1 22:31:43 2023 +0100 dm: avoid spaces before function arguments or in favour of tabs Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit beecc8438c6c2089b0a1f82720530c82da5765bc Author: Heinz Mauelshagen Date: Wed Feb 1 21:57:45 2023 +0100 dm block-manager: avoid not required parentheses Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit ced6e475c3754dad3b63966d79f375d8f7193750 Author: Heinz Mauelshagen Date: Tue Jan 31 19:47:36 2023 +0100 dm crypt: correct 'foo*' to 'foo *' Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 03b18887703c5fa342896e52e873812ea33d964b Author: Heinz Mauelshagen Date: Mon Jan 30 22:13:54 2023 +0100 dm: fix trailing statements Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 43be9c743c2553519c2093d1798b542f28095a51 Author: Heinz Mauelshagen Date: Mon Jan 30 21:43:57 2023 +0100 dm: fix undue/missing spaces Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit a4a82ce3d24d4409143a7b7b980072ada6e20b2a Author: Heinz Mauelshagen Date: Thu Jan 26 15:48:30 2023 +0100 dm: correct block comments format. Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 255e2646496fcbf836a3dfe1b535692f09f11b45 Author: Heinz Mauelshagen Date: Wed Jan 25 23:31:55 2023 +0100 dm: address indent/space issues Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 96422281baf57f4d9418581fdfaca9617bb805e1 Author: Heinz Mauelshagen Date: Wed Jan 25 22:57:42 2023 +0100 dm: address space issues relative to switch/while/for/... Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 2f06cd12e11422e4a44ad4cb856c3ef0be9bd208 Author: Heinz Mauelshagen Date: Mon Jan 30 21:28:24 2023 +0100 dm: avoid initializing static variables Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 44bc08ed63db7a852bd1ba16611b700ee666091c Author: Heinz Mauelshagen Date: Wed Feb 1 21:51:04 2023 +0100 dm: enclose complex macros into parentheses where possible Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit d715fa23577cd5d36830c4ecd7e2bfcb4750b351 Author: Heinz Mauelshagen Date: Wed Feb 1 21:17:44 2023 +0100 dm: avoid assignment in if conditions Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 86a3238c7b9b759cb864f4f768ab2e24687dc0e6 Author: Heinz Mauelshagen Date: Wed Jan 25 21:14:58 2023 +0100 dm: change "unsigned" to "unsigned int" Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 238d991f054a553e823d12b0ffd52aaeedd65f70 Author: Heinz Mauelshagen Date: Wed Jan 25 22:44:39 2023 +0100 dm: use fsleep() instead of msleep() for deterministic sleep duration Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 0d78954a2d80e648cfed1d306fffe52c6211c432 Author: Heinz Mauelshagen Date: Tue Feb 7 20:22:58 2023 +0100 dm: prefer kmap_local_page() instead of deprecated kmap_atomic() Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 3bd940030752a33ff665eefdd74a1cdb74a4f9b0 Author: Heinz Mauelshagen Date: Wed Jan 25 21:00:44 2023 +0100 dm: add missing SPDX-License-Indentifiers 'GPL-2.0-only' is used instead of 'GPL-2.0' because SPDX has deprecated its use. Suggested-by: John Wiele Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 2de3d04b3bcba3ae0474373cbd0c85f4f09ed9d2 Author: Trond Myklebust Date: Thu Jan 19 16:33:51 2023 -0500 NFS: Remove unnecessary check in nfs_read_folio() All the callers are expected to supply a valid struct file argument, so there is no need for the NULL check. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 256093fec1f0ae2f10eb3aae5903ecb689c55ecc Author: Trond Myklebust Date: Thu Jan 19 16:33:50 2023 -0500 NFS: Improve tracing of nfs_wb_folio() Include info about which folio is being traced. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit eb5654b3b89d5e836312cea9f3fdb49457852e89 Author: Trond Myklebust Date: Thu Jan 19 16:33:49 2023 -0500 NFS: Enable tracing of nfs_invalidate_folio() and nfs_launder_folio() Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 96780ca55e3cbf4f150fd5a833a61492c9947b5b Author: Trond Myklebust Date: Thu Jan 19 16:33:48 2023 -0500 NFS: fix up nfs_release_folio() to try to release the page If the gfp context allows it, and we're not kswapd, then try to write out the folio that has private data. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 70e9db69f927bb378db9aaa807cc83ae550779a9 Author: Trond Myklebust Date: Thu Jan 19 16:33:47 2023 -0500 NFS: Clean up O_DIRECT request allocation Rather than adjusting the index+offset after the call to nfs_create_request(), add a function nfs_page_create_from_page() that takes an offset. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 4fa7a717b432c3311192aa85a34fedf5f8de4689 Author: Trond Myklebust Date: Thu Jan 19 16:33:46 2023 -0500 NFS: Fix up nfs_vm_page_mkwrite() for folios Mechanical conversion of struct page and functions into the folio equivalents. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 54d99381b7371d2999566d1fb4ea88d46cf9d865 Author: Trond Myklebust Date: Thu Jan 19 16:33:45 2023 -0500 NFS: Convert nfs_write_begin/end to use folios Add a helper nfs_folio_grab_cache_write_begin() that can call __filemap_get_folio() directly with the appropriate parameters. Since write_begin()/write_end() take struct page arguments, just pass the folio->page back for now. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 4cbf76948c457f0beb9f184ebb21341c8235846a Author: Trond Myklebust Date: Thu Jan 19 16:33:44 2023 -0500 NFS: Remove unused function nfs_wb_page() Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 0c493b5cf16e28d761b6e77c7c32aa0e7af70813 Author: Trond Myklebust Date: Thu Jan 19 16:33:43 2023 -0500 NFS: Convert buffered writes to use folios Mostly mechanical conversion of struct page and functions into struct folio equivalents. The lack of support for folios in write_cache_pages(), means we still only support order 0 folio allocations. However the rest of the writeback code should now be ready for order n > 0. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 5241060e8b4f09d63a004b7a735346442fd3ab2d Author: Trond Myklebust Date: Thu Jan 19 16:33:42 2023 -0500 NFS: Convert the function nfs_wb_page() to use folios Convert to use the folio functions, but pass the struct page to nfs_writepage_locked() for now. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit ab75bff1140733f1b43e81f055acd7d27af7ac05 Author: Trond Myklebust Date: Thu Jan 19 16:33:41 2023 -0500 NFS: Convert buffered reads to use folios Perform a largely mechanical conversion of references to struct page and page-specific functions to use the folio equivalents. Note that the fscache functionality remains untouched. Instead we just pass in the folio page. This should be OK, as long as we use order 0 folios together with fscache. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 4b27232a6e064f3d779cfa76cd251d6023949d22 Author: Trond Myklebust Date: Thu Jan 19 16:33:40 2023 -0500 NFS: Add a helper nfs_wb_folio() ...and use it in nfs_launder_folio(). Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit cbefa53cb1fe30ae4467be863afc3cf60238fd08 Author: Trond Myklebust Date: Thu Jan 19 16:33:39 2023 -0500 NFS: Convert the remaining pagelist helper functions to support folios Allow creation of subrequests from a request that is carrying a folio. Add helpers to set up and tear down requests carrying folios. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 6dd85e83f3f182b56770f8bb6dbed1f0dafb9117 Author: Trond Myklebust Date: Thu Jan 19 16:33:38 2023 -0500 NFS: Add a helper to convert a struct nfs_page into an inode Replace all the open coded calls to page_file_mapping(req->wb_page)->host. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 8e0bdc7021f713fdf3b985cda3ce715e41b06698 Author: Trond Myklebust Date: Thu Jan 19 16:33:37 2023 -0500 NFS: Fix nfs_coalesce_size() to work with folios Use the helper folio_size() where appropriate. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit eb9f2a5a5e85fd24949480d1d02c2a497f26e154 Author: Trond Myklebust Date: Thu Jan 19 16:33:36 2023 -0500 NFS: Support folios in nfs_generic_pgio() Add support for multi-page folios in the generic NFS i/o engine. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 35c5db0ec49f073e6a2d5236b5fcfb0a134a215a Author: Trond Myklebust Date: Thu Jan 19 16:33:35 2023 -0500 NFS: Add basic functionality for tracking folios in struct nfs_page Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 785207aa3d61ec1cb86e4441bff0a37c412ebd10 Author: Trond Myklebust Date: Thu Jan 19 16:33:34 2023 -0500 NFS: Fix for xfstests generic/208 If the same page and data is being used for multiple requests, then ignore that when the request indicates we're reading from the start of the page. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 7533afa1d27ba1234146d31d2402c195cf195962 Author: Mikulas Patocka Date: Tue Feb 7 08:33:06 2023 -0500 dm: send just one event on resize, not two Device mapper sends an uevent when the device is suspended, using the function set_capacity_and_notify. However, this causes a race condition with udev. Udev skips scanning dm devices that are suspended. If we send an uevent while we are suspended, udev will be racing with device mapper resume code. If the device mapper resume code wins the race, udev will process the uevent after the device is resumed and it will properly scan the device. However, if udev wins the race, it will receive the uevent, find out that the dm device is suspended and skip scanning the device. This causes bugs such as systemd unmounting the device - see https://bugzilla.redhat.com/show_bug.cgi?id=2158628 This commit fixes this race. We replace the function set_capacity_and_notify with set_capacity, so that the uevent is not sent at this point. In do_resume, we detect if the capacity has changed and we pass a boolean variable need_resize_uevent to dm_kobject_uevent. dm_kobject_uevent adds "RESIZE=1" to the uevent if need_resize_uevent is set. Signed-off-by: Mikulas Patocka Tested-by: Peter Rajnoha Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer commit cf08e29db760b144bde51e2444f3430c75763e26 Author: Johannes Berg Date: Tue Feb 14 20:08:15 2023 +0100 wifi: mac80211: fix off-by-one link setting The convention for find_first_bit() is 0-based, while ffs() is 1-based, so this is now off-by-one. I cannot reproduce the gcc-9 problem, but since the -1 is now removed, I'm hoping it will still avoid the original issue. Reported-by: Alexander Lobakin Fixes: 1d8d4af43474 ("wifi: mac80211: avoid u32_encode_bits() warning") Signed-off-by: Johannes Berg commit a46bebd502fe1a3bd1d22f64cedd93e7e7702693 Author: Daeho Jeong Date: Thu Feb 9 10:18:19 2023 -0800 f2fs: synchronize atomic write aborts To fix a race condition between atomic write aborts, I use the inode lock and make COW inode to be re-usable thoroughout the whole atomic file inode lifetime. Reported-by: syzbot+823000d23b3400619f7c@syzkaller.appspotmail.com Fixes: 3db1de0e582c ("f2fs: change the current atomic write way") Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 7e986855fe13de2c8290c1102292d8e5f29dd769 Author: Jaegeuk Kim Date: Mon Feb 13 09:41:33 2023 -0800 f2fs: fix wrong segment count MAIN_SEGS is for data area, while TOTAL_SEGS includes data and metadata. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit dda7d77bcd424ce5da80dd5a7ec92ead00279c02 Author: Yangtao Li Date: Mon Feb 13 22:18:25 2023 +0800 f2fs: replace si->sbi w/ sbi in stat_show() For each loop add a local f2fs_sb_info pointer insted of looking it up. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f2e357893cb7d15994e4ec10838ebb4dccf7eb6e Author: Yangtao Li Date: Mon Feb 13 22:18:24 2023 +0800 f2fs: export ipu policy in debugfs Export ipu_policy as a string in debugfs for better readability and it can help us better understand some strategies of the file system. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 1dd46599f83ac5323a175d32955b1270e95cd11b Author: Vadim Fedorenko Date: Tue Feb 14 05:59:28 2023 -0800 spi: xilinx: add force_irq for QSPI mode Xilinx PG158 page 80 [1] states that master transaction inhibit bit must be set to properly setup the transaction in QSPI mode. Add the force_irq flag to follow this sequence. [1] https://docs.xilinx.com/r/en-US/pg153-axi-quad-spi/Dual/Quad-SPI-Mode-Transactions Signed-off-by: Vadim Fedorenko Link: https://lore.kernel.org/r/20230214135928.1253205-1-vadfed@meta.com Signed-off-by: Mark Brown commit e97622254420ce5f03f3f3e6ad6ecbf86da248d9 Merge: 7ec844a2c7535 d403fb6e76bf8 Author: Mark Brown Date: Tue Feb 14 18:04:11 2023 +0000 spi: STIG Mode Fixes for spi-cadence-qspi driver Merge series from Dhruva Gole : * Reset the CMD_CTRL Register, without which read/writes in STIG mode were failing in some cases. The issue came to light while using STIG Mode for small reads. * Also add a flag that can allow us to do direct reads but distinguish direct writes, thus enabling us to disable writes in DAC mode in some cases that require it. (Like to write to some connected Flash registers) * Fix register reads in STIG mode and also use STIG mode while reading flash registers. Currently if you try to read a register while in STIG mode there is no support for ADDR and thus naturally a register never gets read from the flash. This patch series has been tested on a TI AM625-SK-EVM with both a quad spi nor flash (s25hs) and OSPI NOR Flash (s28hs). Output of ltp-ddt test, "DD_RW_ERASESIZE_UBIFS" run with s25hs512t flash: ... [ 2.334068] spi-nor spi0.0: s25hs512t (65536 Kbytes) [ 2.339185] 7 fixed-partitions partitions found on MTD device fc40000.spi.0 [ 2.346158] Creating 7 MTD partitions on "fc40000.spi.0": [ 2.351555] 0x000000000000-0x000000080000 : "ospi.tiboot3" [ 2.358344] 0x000000080000-0x000000280000 : "ospi.tispl" [ 2.364788] 0x000000280000-0x000000680000 : "ospi.u-boot" [ 2.371311] 0x000000680000-0x0000006c0000 : "ospi.env" [ 2.377519] 0x0000006c0000-0x000000700000 : "ospi.env.backup" [ 2.384419] 0x000000800000-0x000003fc0000 : "ospi.rootfs" [ 2.390890] 0x000003fc0000-0x000004000000 : "ospi.phypattern" ..snip.. Test Start Time: Wed Jan 11 21:14:31 2023 ----------------------------------------- Testcase Result Exit Value -------- ------ ---------- OSPI_S_FUNC_DD_RW_ERASESIZE_UBIFS PASS 0 ----------------------------------------------- Total Tests: 1 Total Skipped Tests: 0 Total Failures: 0 Kernel Version: 6.2.0-rc1-00040-g700d796a94e0-dirty Machine Architecture: aarch64 Hostname: am62xx-evm commit f81dc982fde7f36bbf1de80cb4eb98586a76070b Merge: ec285cb999c14 6611b975eb87d Author: Mark Brown Date: Tue Feb 14 17:59:59 2023 +0000 ASoC: SOF: Intel/ipc4: Support for low power playback Merge series from Peter Ujfalusi : The following series will enable the the Low Power Audio (LPA) playback on Intel platforms when using IPC4. The support is closely follows how IPC3 supports similar use case. All depending patches are upstream and our CI have been testing this feature for some time without issues. commit 0aee6bec0f44dd344c2637632cb13828990524e2 Author: Nick Desaulniers Date: Thu Feb 2 10:05:48 2023 -0800 Documentation/llvm: add Chimera Linux, Google and Meta datacenters Chimera Linux is a Linux distribution from 2021 that builds its kernels with Clang. Google transitioned its data center fleet to run Clang built kernels in 2021, and Meta did so as well in 2022. Meta talked about this at LPC 2022 at a talk titled Kernel Live Patching at Scale. These were important milestones for building the kernel with Clang. Making note of them helps improve confidence in the project. Reviewed-by: Tom Rix Reviewed-by: Nathan Chancellor Reviewed-by: Sedat Dilek Co-developed-by: Yonghong Song Signed-off-by: Nick Desaulniers Signed-off-by: Masahiro Yamada commit 6ab7e1f95e96f0c688ae132b0e9a16c0f206689d Author: Masahiro Yamada Date: Sun Feb 5 21:09:57 2023 +0900 setlocalversion: use only the correct release tag for git-describe Currently, setlocalversion uses any annotated tag for git-describe. If we are at a tagged commit, it will not append the commit hash. $ git checkout v6.2-rc1^ $ make -s defconfig kernelrelease 6.1.0-14595-g292a089d78d3 $ git tag -a foo -m foo $ make -s kernelrelease 6.1.0 If a local tag 'foo' exists, it pretends to be a released version '6.1.0', while there are many commits on top of it. The output should be consistent irrespective of such a local tag. Pass the correct release tag to --match option of git-describe. In the mainline kernel, the SUBLEVEL is always '0', which is omitted from the tag. KERNELVERSION annotated tag 6.1.0 -> v6.1 (mainline) 6.2.0-rc5 -> v6.2-rc5 (mainline, release candidate) 6.1.7 -> v6.1.7 (stable) To preserve the behavior in linux-next, use the tag derived from localversion* files if exists. In linux-next, the local version is specified by the localversion-next file. Signed-off-by: Masahiro Yamada commit 82b34b0800af8c9fc9988c290cdc813e0ca0df31 Author: Manivannan Sadhasivam Date: Mon Feb 13 20:19:22 2023 +0530 PCI: pciehp: Add Qualcomm quirk for Command Completed erratum The Qualcomm PCI bridge device (Device ID 0x010e) found in chipsets such as SC8280XP used in Lenovo Thinkpad X13s, does not set the Command Completed bit unless writes to the Slot Command register change "Control" bits. This results in timeouts like below during boot and resume from suspend: pcieport 0002:00:00.0: pciehp: Timeout on hotplug command 0x03c0 (issued 2020 msec ago) ... pcieport 0002:00:00.0: pciehp: Timeout on hotplug command 0x13f1 (issued 107724 msec ago) Add the device to the Command Completed quirk to mark commands "completed" immediately unless they change the "Control" bits. Link: https://lore.kernel.org/r/20230213144922.89982-1-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas commit f356132229b18ceef5d5ef9103bbaa9bdeb84c8d Author: Robert Marko Date: Fri Jan 13 17:44:47 2023 +0100 PCI: qcom: Add IPQ8074 Gen3 port support IPQ8074 has one Gen2 and one Gen3 port, with Gen2 port already supported. Add compatible for Gen3 port which uses the same controller as IPQ6018. Link: https://lore.kernel.org/r/20230113164449.906002-7-robimarko@gmail.com Signed-off-by: Robert Marko Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas commit 2b1c46ce137b66d38a08aff924137a6fc4e9700e Author: Robert Marko Date: Fri Jan 13 17:44:46 2023 +0100 dt-bindings: PCI: qcom: Add IPQ8074 Gen3 port IPQ8074 has one Gen2 and one Gen3 PCIe port, with Gen2 already supported. Document Gen3 port which uses the same controller as IPQ6018. Link: https://lore.kernel.org/r/20230113164449.906002-6-robimarko@gmail.com Signed-off-by: Robert Marko Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Acked-by: Krzysztof Kozlowski commit 371a6106b71aeda94a6fcdb8f7cb674dd3c34a96 Author: Robert Marko Date: Fri Jan 13 17:44:45 2023 +0100 dt-bindings: PCI: qcom: Sort compatibles alphabetically Sort the compatibles list alphabetically for maintenance. Link: https://lore.kernel.org/r/20230113164449.906002-5-robimarko@gmail.com Signed-off-by: Robert Marko Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Kozlowski commit 997e010de9134474dbfde52be03efd7d1bce902d Author: Johan Hovold Date: Mon Oct 17 13:47:04 2022 +0200 PCI: qcom: Fix host-init error handling Implement the new host_deinit() callback so that the PHY is powered off and regulators and clocks are disabled also on late host-init errors. Link: https://lore.kernel.org/r/20221017114705.8277-2-johan+linaro@kernel.org Fixes: 82a823833f4e ("PCI: qcom: Add Qualcomm PCIe controller driver") Signed-off-by: Johan Hovold Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam commit 720e0d91c9772b60a87eb361da02deb3c0c628e4 Author: Dmitry Baryshkov Date: Sat Nov 19 01:32:37 2022 +0200 PCI: qcom: Add SM8350 support Add support for the PCIe host on Qualcomm SM8350 platform. Link: https://lore.kernel.org/r/20221118233242.2904088-4-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Bjorn Andersson commit 89a7adad3c0dfccf01643913bde7244feea85f59 Author: Dmitry Baryshkov Date: Sat Nov 19 01:32:35 2022 +0200 dt-bindings: PCI: qcom: Add SM8350 Add bindings for two PCIe hosts on SM8350 platform. The only difference between them is in the aggre0 clock, which warrants the oneOf clause for the clocks properties. Link: https://lore.kernel.org/r/20221118233242.2904088-2-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring commit a0754633c32171be7b2a9b8717022f7848efd0c5 Author: Krzysztof Kozlowski Date: Wed Nov 9 12:32:02 2022 +0100 dt-bindings: PCI: qcom-ep: Correct qcom,perst-regs qcom,perst-regs is an phandle array of one item with a phandle and its arguments. Link: https://lore.kernel.org/r/20221109113202.74406-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Reviewed-by: Dmitry Baryshkov Acked-by: Manivannan Sadhasivam commit 0b93acc60cf36b35132ee8d959e7779db2fcf35b Author: Krzysztof Kozlowski Date: Fri Jan 6 09:12:03 2023 +0100 dt-bindings: PCI: qcom: Unify MSM8996 and MSM8998 clock order MSM8996 and MSM8998 use the same clocks, so use one order to make the binding simpler. Link: https://lore.kernel.org/r/20230106081203.14118-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring commit ff0132f7cf11307deb79a37622b11a16c0a294ed Author: Krzysztof Kozlowski Date: Fri Jan 6 09:12:02 2023 +0100 dt-bindings: PCI: qcom: Add MSM8998 specific compatible Add new compatible for MSM8998 (compatible with MSM8996) to allow further customizing if needed and to accurately describe the hardware. Link: https://lore.kernel.org/r/20230106081203.14118-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring commit 75078afebb48a16d042717fe26d204cdd2743ff8 Author: Bjorn Helgaas Date: Fri Oct 21 15:18:38 2022 -0500 alpha: remove unused __SLOW_DOWN_IO and SLOW_DOWN_IO definitions Remove unused __SLOW_DOWN_IO and SLOW_DOWN_IO definitions. Signed-off-by: Bjorn Helgaas Signed-off-by: Matt Turner commit 9f416948706fd9831314e5747fad07b76916d471 Author: Lukas Bulwahn Date: Thu Sep 29 12:13:29 2022 +0200 alpha: update config files Clean up config files by: - removing configs that were deleted in the past - removing configs not in tree and without recently pending patches - adding new configs that are replacements for old configs in the file For some detailed information, see Link. Link: https://lore.kernel.org/kernel-janitors/20220929090645.1389-1-lukas.bulwahn@gmail.com/ Signed-off-by: Lukas Bulwahn Signed-off-by: Matt Turner commit b6b17a8b3ecd878d98d5472a9023ede9e669ca72 Author: Edward Humes Date: Sat Aug 27 02:49:39 2022 -0400 alpha: fix R_ALPHA_LITERAL reloc for large modules Previously, R_ALPHA_LITERAL relocations would overflow for large kernel modules. This was because the Alpha's apply_relocate_add was relying on the kernel's module loader to have sorted the GOT towards the very end of the module as it was mapped into memory in order to correctly assign the global pointer. While this behavior would mostly work fine for small kernel modules, this approach would overflow on kernel modules with large GOT's since the global pointer would be very far away from the GOT, and thus, certain entries would be out of range. This patch fixes this by instead using the Tru64 behavior of assigning the global pointer to be 32KB away from the start of the GOT. The change made in this patch won't work for multi-GOT kernel modules as it makes the assumption the module only has one GOT located at the beginning of .got, although for the vast majority kernel modules, this should be fine. Of the kernel modules that would previously result in a relocation error, none of them, even modules like nouveau, have even come close to filling up a single GOT, and they've all worked fine under this patch. Signed-off-by: Edward Humes Signed-off-by: Matt Turner commit 73c4f828ce6586b83f9d2a1824b5bf7a72acce62 Author: Zhang Jiaming Date: Tue Jun 21 16:15:06 2022 +0800 alpha: Add some spaces to ensure format specification Add a space after ','. Add spaces around the '=', '>' and '=='. Signed-off-by: Zhang Jiaming Signed-off-by: Matt Turner commit d6e595792fb6c02c220bf68b50cf7649b1f05e15 Author: Yang Yang Date: Tue Mar 29 02:57:38 2022 +0000 alpha: replace NR_SYSCALLS by NR_syscalls Reference to other arch likes x86_64 or arm64 to do this replacement. To solve compile error when using NR_syscalls in kernel[1]. [1] https://lore.kernel.org/all/202203270449.WBYQF9X3-lkp@intel.com/ Signed-off-by: Yang Yang Signed-off-by: Matt Turner commit 19fa21d74704a7ee1158337ccccf19f8f6d82719 Author: Maciej W. Rozycki Date: Sun Feb 13 20:01:21 2022 +0000 alpha: Remove redundant local asm header redirections Remove a number of asm headers locally redirected to the respective generic or generated versions. For asm-offsets.h all that is needed is a Kbuild entry for the generic version, and for div64.h, irq_regs.h and kdebug.h nothing is needed as in their absence they will be redirected automatically according to include/asm-generic/Kbuild. Signed-off-by: Maciej W. Rozycki Signed-off-by: Matt Turner commit bd1912de892ce30e1e2242e67716d25188fbfa44 Author: Kees Cook Date: Wed Feb 23 22:05:58 2022 -0800 alpha: Implement "current_stack_pointer" To follow the existing per-arch conventions replace open-coded use of asm "$30" as "current_stack_pointer". This will let it be used in non-arch places (like HARDENED_USERCOPY). Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Geert Uytterhoeven Cc: Andrew Morton Cc: Mike Rapoport Cc: Mark Rutland Cc: "Peter Zijlstra (Intel)" Cc: Kefeng Wang Cc: "Alexander A. Klimov" Cc: linux-alpha@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Matt Turner commit d7cf43edebe577c58c7858cf61b03d618d4336cf Author: Minghao Chi Date: Mon Jan 10 01:29:54 2022 +0000 alpha: remove redundant err variable Return value from __hw_perf_event_init() directly instead of taking this in another redundant variable. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Signed-off-by: CGEL ZTE Signed-off-by: Matt Turner commit 019f48dc8eba723d2201679b804f4600e816604a Author: Colin Ian King Date: Mon Dec 13 18:56:25 2021 +0000 alpha: osf_sys: reduce kernel log spamming on invalid osf_mount call typenr Calling the osf_mount system call with an invalid typenr value will spam the kernel log with error messages. Reduce the spamming by making it a ratelimited printk. Issue found when exercising with the stress-ng enosys system call stressor. Signed-off-by: Colin Ian King Signed-off-by: Matt Turner commit 25d10262ed8aae71cd2f0b3c0a90d06a6b79fba2 Author: Bastian Germann Date: Tue Feb 14 00:19:28 2023 +0100 dt-bindings: hwlock: sun6i: Add missing #hwlock-cells The allwinner,sun6i-a31-hwspinlock.yaml binding needs #hwlock-cells which is required by the hwlock type. Fixes: f9e784dcb63f ("dt-bindings: hwlock: add sun6i_hwspinlock") Signed-off-by: Bastian Germann Acked-by: Krzysztof Kozlowski Reviewed-by: Andre Przywara Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230213231931.6546-2-bage@debian.org commit 6f9c2f19a8743c880903a031c7f3f3c534d4b813 Author: Krzysztof Kozlowski Date: Wed Feb 8 11:15:45 2023 +0100 dt-bindings: remoteproc: qcom,glink-edge: correct label description Correct the description of 'label' property. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230208101545.45711-7-krzysztof.kozlowski@linaro.org commit fdafdddf7b2f5cab8d233ef97f1fad8ec7d2e7a0 Author: Krzysztof Kozlowski Date: Wed Feb 8 11:15:44 2023 +0100 dt-bindings: remoteproc: qcom,glink-rpm-edge: convert to DT schema Convert Qualcomm G-Link RPM edge binding to DT schema. Move it to remoteproc as it better suits the purpose - communication channel with remote processor. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230208101545.45711-6-krzysztof.kozlowski@linaro.org commit 6f998eb2fd02a7a7a529abb4c7d8bbf44fc3ff13 Author: Krzysztof Kozlowski Date: Mon Feb 6 20:33:13 2023 +0100 dt-bindings: remoteproc: qcom,sm8550-pas: correct power domains Correct CDSP and MPSS power domains to match what is used in DTS and the Linux driver: sm8550-mtp.dtb: remoteproc@32300000: power-domain-names: ['cx', 'mxc', 'nsp'] is too long Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Acked-by: Neil Armstrong Fixes: 084258d60712 ("dt-bindings: remoteproc: qcom: adsp: document sm8550 adsp, cdsp & mpss compatible") Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230206193313.30667-1-krzysztof.kozlowski@linaro.org commit a8086bd9723ac8f1f795ab64f1de7dd0b9be889a Author: Neil Armstrong Date: Mon Feb 6 14:53:31 2023 +0100 remoteproc: qcom_q6v5_pas: enable sm8550 adsp & cdsp autoboot Set the SM8550 adsp & cdsp auto_boot to true to match the behavior of the previous platforms. Fixes: 7eddedc97563 ("remoteproc: qcom_q6v5_pas: add sm8550 adsp, cdsp & mpss compatible & data") Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230206-topic-sm8550-upstream-fix-remoteproc-autoboot-v1-1-11445a0c27c6@linaro.org commit 838c558bb8bc3a9a4de840fd25c6ad0ebc4d1ed7 Author: Bhupesh Sharma Date: Sat Jan 28 11:05:04 2023 +0530 dt-bindings: remoteproc: qcom: Add sm6115 pas yaml file This documents the aDSP, cDSP and MPSS DSPs present on the SM6115 SoC. Signed-off-by: Bhupesh Sharma Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230128053504.2099620-2-bhupesh.sharma@linaro.org commit 3c7306589dddbcc0ac53ec6b2c3a14875879e20c Author: Bhupesh Sharma Date: Sat Jan 28 11:05:03 2023 +0530 remoteproc: qcom: pas: Add sm6115 remoteprocs Among the subsystems in the Qualcomm sm6115 platform we find audio, compute and modem DSPs. Add support for controlling these using the peripheral authentication service (PAS) remoteproc driver. Signed-off-by: Bhupesh Sharma Reviewed-by: Mukesh Ojha Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230128053504.2099620-1-bhupesh.sharma@linaro.org commit a376c10d45a8e6ee5ea55791193f90625b35e156 Author: Yogesh Lal Date: Wed Nov 2 22:42:09 2022 +0530 remoteproc: qcom: pas: Adjust the phys addr wrt the mem region The minidump table in the toc contains physical addresses that may lie before the physical address of the first elf segment in relocatable images. This change adds a custom dump function for minidumps which calculates the offset into the carveout region using the start of the physical address instead of the start of the first elf segment. Signed-off-by: Yogesh Lal Reviewed-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1667409129-6254-1-git-send-email-quic_ylal@quicinc.com commit 28980db94742f9f2fb0f68ea35f2171b38007bae Author: Yazen Ghannam Date: Tue Feb 14 10:42:22 2023 +0100 EDAC/amd64: Shut up an -Werror,-Wsometimes-uninitialized clang false positive Reportedly, clang cannot do interprocedural analysis: https://lore.kernel.org/r/20230213-amd64_edac-wsometimes-uninitialized-v1-1-5bde32b89e02@kernel.org and see that those arguments won't be used uninitialized. So, yeah, the code's fine even without this. Normally, such a "fix" won't be applied but that warning gets automatically enabled in -Wall builds and when CONFIG_WERROR is set in allmodconfig builds, the build fails. So shut it up with a minimal fix as this code will see more reorganization very soon. [ bp: Write commit message. ] Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Nathan Chancellor Link: https://lore.kernel.org/r/Y%2BqdVHidnrrKvxiD@dev-arch.thelio-3990X commit 2554dd0ac362738f588ba073d8333eb9b14f9587 Author: Mukesh Ojha Date: Tue Jan 31 21:31:06 2023 +0530 remoteproc: qcom: fix sparse warnings This patch try to address below sparse warnings. drivers/remoteproc/qcom_common.c:126:27: warning: restricted __le32 degrades to integer drivers/remoteproc/qcom_common.c:133:32: warning: cast to restricted __le32 drivers/remoteproc/qcom_common.c:133:32: warning: cast from restricted __le64 Signed-off-by: Mukesh Ojha Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1675180866-16695-1-git-send-email-quic_mojha@quicinc.com commit 8a3d95ea42921a8021b2459e22f91b4f49495e57 Author: Arnd Bergmann Date: Tue Feb 14 14:18:47 2023 +0100 dax/hmem: build hmem device support as module if possible When device_hmem.o is enabled but dax itself is a loadable module, the dax_hmem support fails to link because Kbuild never compiles built-in code under drivers/dax: ERROR: modpost: "walk_hmem_resources" [drivers/dax/hmem/dax_hmem.ko] undefined! Make sure that drivers/dax is entered for compiling built-in code even with CONFIG_DAX=m. Fixes: 7dab174e2e27 ("dax/hmem: Move hmem device registration to dax_hmem.ko") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230214131913.1431969-1-arnd@kernel.org Signed-off-by: Dan Williams commit 0c16c83ed57fc66b033306ba426a5b324966a33e Author: Arnd Bergmann Date: Tue Feb 14 11:30:49 2023 +0100 dax: cxl: add CXL_REGION dependency There is already a dependency on CXL_REGION, which depends on CXL_BUS, but since CXL_REGION is a 'bool' symbol, it's possible to configure DAX as built-in even though CXL itself is a loadable module: x86_64-linux-ld: drivers/dax/cxl.o: in function `cxl_dax_region_probe': cxl.c:(.text+0xb): undefined reference to `to_cxl_dax_region' x86_64-linux-ld: drivers/dax/cxl.o: in function `cxl_dax_region_driver_init': cxl.c:(.init.text+0x10): undefined reference to `__cxl_driver_register' x86_64-linux-ld: drivers/dax/cxl.o: in function `cxl_dax_region_driver_exit': cxl.c:(.exit.text+0x9): undefined reference to `cxl_driver_unregister' Prevent this with another depndency on the tristate symbol. Fixes: 09d09e04d2fc ("cxl/dax: Create dax devices for CXL RAM regions") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230214103054.1082908-1-arnd@kernel.org Signed-off-by: Dan Williams commit 7abcb0b10668eaf3c174ff383f3b2a7a8c95fb34 Author: Arnd Bergmann Date: Mon Feb 13 11:12:11 2023 +0100 cxl: avoid returning uninitialized error code The new cxl_add_to_region() function returns an uninitialized value on success: drivers/cxl/core/region.c:2628:6: error: variable 'rc' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (IS_ERR(cxlr)) { ^~~~~~~~~~~~ drivers/cxl/core/region.c:2654:9: note: uninitialized use occurs here return rc; Simplify the logic to have the rc variable always initialized in the same place. Fixes: a32320b71f08 ("cxl/region: Add region autodiscovery") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230213101220.3821689-1-arnd@kernel.org Signed-off-by: Dan Williams commit 9d5b9ad97f83b2390a6006eeb5ae5e48ec4298ce Author: Mukesh Ojha Date: Tue Feb 14 19:38:11 2023 +0530 remoteproc: qcom: replace kstrdup with kstrndup Since, there is no guarantee that region.name will be 0-terminated from the firmware side, replace kstrdup with kstrndup. Suggested-by: Dmitry Baryshkov Signed-off-by: Mukesh Ojha Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1676383691-29738-1-git-send-email-quic_mojha@quicinc.com commit fb23b97346f9aaa9f7b7a996e7baf066c88d69bd Author: Bjorn Andersson Date: Mon Feb 13 07:52:15 2023 -0800 rpmsg: glink: Cancel pending intent requests at removal During removal of the glink edge interrupts are disabled and no more incoming messages are being serviced. In addition to the remote endpoint being defunct that means that any outstanding requests for intents will not be serviced, and qcom_glink_request_intent() will blindly wait for up to 10 seconds. Mark the intent request as not granted and complete the intent request completion to fail the waiting client immediately. Once the current intent request is failed, any potential clients waiting for the intent request mutex will not enter the same wait, as the qcom_glink_tx() call will fail fast. Reviewed-by: Chris Lew Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230213155215.1237059-7-quic_bjorande@quicinc.com commit 9c96bacf1af51bc71898f31e025f08338c6ca4da Author: Bjorn Andersson Date: Mon Feb 13 07:52:14 2023 -0800 rpmsg: glink: Fail qcom_glink_tx() once remove has been initiated Upon removing the glink edge, communication is at best one-way. This means that the very common scenario of glink requesting intents will not be possible to serve. Typically a successful transmission results in the client waiting for a response, with some timeout and a mechanism for aborting that timeout. Because of this, once the glink edge is defunct once removal is commenced it's better to fail transmissions fast. Reviewed-by: Chris Lew Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230213155215.1237059-6-quic_bjorande@quicinc.com commit f424d1cbe8c7ef78a4b639502fa9904c4198387b Author: Bjorn Andersson Date: Mon Feb 13 07:52:13 2023 -0800 rpmsg: glink: Move irq and mbox handling to transports Not all GLINK transports uses an interrupt and a mailbox instance. The interrupt for RPM needs to be IRQF_NOSUSPEND, while it seems reasonable for the SMEM interrupt to use irq_set_wake. The glink struct device is constructed in the SMEM and RPM drivers but torn down in the core driver. Move the interrupt and kick handling into the SMEM and RPM driver, to improve this and facilitate further improvements. Signed-off-by: Bjorn Andersson Reviewed-by: Chris Lew Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230213155215.1237059-5-quic_bjorande@quicinc.com commit 178c3af447f92c58d5b1153df2cd02b755c083c8 Author: Bjorn Andersson Date: Mon Feb 13 07:52:12 2023 -0800 rpmsg: glink: rpm: Wrap driver context As with the SMEM driver update, wrap the RPM context in a struct to facilitate the upcoming changes of moving IRQ and mailbox registration to the driver. Reviewed-by: Chris Lew Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230213155215.1237059-4-quic_bjorande@quicinc.com commit ab9fdd41d970c38ddc0fd59e5f8f37e8d966d454 Author: Bjorn Andersson Date: Mon Feb 13 07:52:11 2023 -0800 rpmsg: glink: smem: Wrap driver context The Glink SMEM driver allocates a struct device and hangs two devres-allocated pipe objects thereon. To facilitate the move of interrupt and mailbox handling to the driver, introduce a wrapper object capturing the device, glink reference and remote processor id. The type of the remoteproc reference is updated, as these are specifically targeting the SMEM implementation. Signed-off-by: Bjorn Andersson Reviewed-by: Chris Lew Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230213155215.1237059-3-quic_bjorande@quicinc.com commit 8278fd3144779d883779d1f5bcbf49da36587fd1 Author: Bjorn Andersson Date: Mon Feb 13 07:52:10 2023 -0800 rpmsg: glink: Extract tx kick operation Refactor out the tx kick operations to its own function, in preparation for pushing the details to the individual transports. Reviewed-by: Chris Lew Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230213155215.1237059-2-quic_bjorande@quicinc.com commit a527b0111798ed7b9f49830989eaabfe537e09ef Author: Thomas Weißschuh Date: Tue Feb 14 03:23:52 2023 +0000 ACPI: 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: Rafael J. Wysocki commit 3082d7efd76a55f74f263dc01f059f5b5221e8cc Author: Andy Shevchenko Date: Mon Feb 13 22:40:05 2023 +0200 Documentation: firmware-guide: gpio-properties: Clarify Explicit and Implicit Clarify the Explicit and Implicit meanings in the table of Pull Bias. While at it, distinguish pull bias keywords used in ACPI by using bold font in the table of the respective terms. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 779aeb73d925586945b5dacab7453824766f149d Author: Greg Kroah-Hartman Date: Tue Feb 14 15:41:17 2023 +0100 driver core: class: move EXPORT_SYMBOL_GPL() lines to the correct place For some reason, the drivers/base/class.c file still had the "old style" of exports, at the end of the file. Move the exports to the proper location, right after the function, to be correct. Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230214144117.158956-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 99537067aca7e2826bffc514c241e3ce76dc22eb Merge: ceaa837f96adb eca4c0eea5343 Author: Rafael J. Wysocki Date: Tue Feb 14 15:27:41 2023 +0100 Merge tag 'opp-updates-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull OPP (Operating Performance Points) updates for 6.3 from Viresh Kumar: "- Add missing 'cache-unified' property in example for kryo OPP bindings (Rob Herring). - Fix error checking in opp_migrate_dentry() (Qi Zheng). - Remove "select SRCU" (Paul E. McKenney). - Let qcom,opp-fuse-level be a 2-long array for qcom SoCs (Konrad Dybcio)." * tag 'opp-updates-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: OPP: fix error checking in opp_migrate_dentry() dt-bindings: opp: v2-qcom-level: Let qcom,opp-fuse-level be a 2-long array drivers/opp: Remove "select SRCU" dt-bindings: opp: opp-v2-kryo-cpu: Add missing 'cache-unified' property in example commit f0f8e9e730b84dd9255343dc6b2cbd6ecc3a08e0 Merge: 3500e221d50da ba38f3cbe7db2 Author: Rafael J. Wysocki Date: Tue Feb 14 15:25:07 2023 +0100 Merge tag 'cpufreq-arm-updates-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull cpufreq ARM updates for 6.3 from Viresh Kumar: "- Enable thermal cooling for Tegra194 (Yi-Wei Wang). - Register module device table and add missing compatibles for cpufreq-qcom-hw (Nícolas F. R. A. Prado, Abel Vesa and Luca Weiss). - Various dt binding updates for qcom-cpufreq-nvmem and opp-v2-kryo-cpu (Christian Marangi)." * tag 'cpufreq-arm-updates-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: dt-bindings: opp: opp-v2-kryo-cpu: enlarge opp-supported-hw maximum dt-bindings: cpufreq: qcom-cpufreq-nvmem: make cpr bindings optional dt-bindings: cpufreq: qcom-cpufreq-nvmem: specify supported opp tables dt-bindings: cpufreq: cpufreq-qcom-hw: Add SM8550 compatible dt-bindings: cpufreq: cpufreq-qcom-hw: Add missing compatibles cpufreq: mediatek-hw: Register to module device table cpufreq: tegra194: Enable CPUFREQ thermal cooling commit 3500e221d50da5e56603bfde3be1c1f0fabfae23 Merge: 6f098cde9df2c e947925f10c25 Author: Rafael J. Wysocki Date: Tue Feb 14 15:22:31 2023 +0100 Merge back cpufreq material for 6.3-rc1. commit 8fcf2d012c8641c18adcd139dba6a1e556338d36 Author: Harshit Mogalapalli Date: Tue Feb 14 01:38:01 2023 -0800 ubi: block: Fix a possible use-after-free bug in ubiblock_create() Smatch warns: drivers/mtd/ubi/block.c:438 ubiblock_create() warn: '&dev->list' not removed from list 'dev' is freed in 'out_free_dev:, but it is still on the list. To fix this, delete the list item before freeing. Fixes: 91cc8fbcc8c7 ("ubi: block: set BLK_MQ_F_BLOCKING") Signed-off-by: Harshit Mogalapalli Reviewed-by: Christoph Hellwig Signed-off-by: Richard Weinberger commit 5791c7699ff1b8be24e1e3b2c08b180598d3ba28 Author: Stefan Binding Date: Mon Feb 13 14:50:08 2023 +0000 ALSA: hda: cs35l41: Enable Amp High Pass Filter This helps smooth out pops and clicks in the amps. Signed-off-by: Stefan Binding Link: https://lore.kernel.org/r/20230213145008.1215849-4-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai commit cd40dad2ca9196631dcd48e1b991244ab3940d83 Author: Stefan Binding Date: Mon Feb 13 14:50:07 2023 +0000 ALSA: hda: cs35l41: Ensure firmware/tuning pairs are always loaded To ensure firmware for cs35l41 is correctly running, it is necessary that a corresponding tuning file is also loaded. Without both, the firmware may not be performing correctly Ensure that if we load the firmware, we have also loaded the correct tuning file. Otherwise, fall back to default firmware and tuning. If default tuning is also missing, then disable DSP firmware. Signed-off-by: Stefan Binding Link: https://lore.kernel.org/r/20230213145008.1215849-3-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 943f4e64ee177cf44d7f2c235281fcda7c32bb28 Author: Vitaly Rodionov Date: Mon Feb 13 14:50:06 2023 +0000 ALSA: hda: cs35l41: Correct error condition handling Function cs_dsp_coeff_write_ctrl() can return 3 possible values: 0 - no change, 1 - value has changed and -1 - error, so positive value is not an error. Fixes: 7406bdbc4fb8 ("ASoC: wm_adsp: Return whether changed when writing controls") Signed-off-by: Vitaly Rodionov Signed-off-by: Stefan Binding Link: https://lore.kernel.org/r/20230213145008.1215849-2-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 4315eab7054d15db50265ab249b7f87912b49902 Merge: 4ca651df07183 bc30c15f27548 Author: Vinod Koul Date: Tue Feb 14 19:25:45 2023 +0530 Merge tag 'phy-fixes-6.2' into next Merge fixes tag pulled into mainline by Linus into phy/next due to dependency on amlogic patches commit 4ca651df07183e29cdad7272255e23aec0169a1b Author: Neill Kapron Date: Thu Jan 26 00:10:12 2023 +0000 phy: rockchip-typec: fix tcphy_get_mode error case The existing logic in tcphy_get_mode() can cause the phy to be incorrectly configured to USB UFP or DisplayPort mode when extcon_get_state returns an error code. extcon_get_state() can return 0, 1, or a negative error code. It is possible to get into the failing state with an extcon driver which does not support the extcon connector id specified as the second argument to extcon_get_state(). tcphy_get_mode() ->extcon_get_state() -->find_cable_index_by_id() --->return -EINVAL; Fixes: e96be45cb84e ("phy: Add USB Type-C PHY driver for rk3399") Signed-off-by: Neill Kapron Reviewed-by: Lee Jones Link: https://lore.kernel.org/r/20230126001013.3707873-1-nkapron@google.com Signed-off-by: Vinod Koul commit e6f5dcb7ec9badd9500f64b087f7243c37300d63 Author: Gilad Itzkovitch Date: Thu Nov 24 13:53:36 2022 +1300 wifi: mac80211: Fix for Rx fragmented action frames The ieee80211_accept_frame() function performs a number of early checks to decide whether or not further processing needs to be done on a frame. One of those checks is the ieee80211_is_robust_mgmt_frame() function. It requires to peek into the frame payload, but because defragmentation does not occur until later on in the receive path, this peek is invalid for any fragment other than the first one. Also, in this scenario there is no STA and so the fragmented frame will be dropped later on in the process and will not reach the upper stack. This can happen with large action frames at low rates, for example, we see issues with DPP on S1G. This change will only check if the frame is robust if it's the first fragment. Invalid fragmented packets will be discarded later after defragmentation is completed. Signed-off-by: Gilad Itzkovitch Link: https://lore.kernel.org/r/20221124005336.1618411-1-gilad.itzkovitch@morsemicro.com Signed-off-by: Johannes Berg commit 1d8d4af4347420d657be448f8be4c39c558f3b5d Author: Arnd Bergmann Date: Tue Feb 14 14:20:21 2023 +0100 wifi: mac80211: avoid u32_encode_bits() warning gcc-9 triggers a false-postive warning in ieee80211_mlo_multicast_tx() for u32_encode_bits(ffs(links) - 1, ...), since ffs() can return zero on an empty bitmask, and the negative argument to u32_encode_bits() is then out of range: In file included from include/linux/ieee80211.h:21, from include/net/cfg80211.h:23, from net/mac80211/tx.c:23: In function 'u32_encode_bits', inlined from 'ieee80211_mlo_multicast_tx' at net/mac80211/tx.c:4437:17, inlined from 'ieee80211_subif_start_xmit' at net/mac80211/tx.c:4485:3: include/linux/bitfield.h:177:3: error: call to '__field_overflow' declared with attribute error: value doesn't fit into mask 177 | __field_overflow(); \ | ^~~~~~~~~~~~~~~~~~ include/linux/bitfield.h:197:2: note: in expansion of macro '____MAKE_OP' 197 | ____MAKE_OP(u##size,u##size,,) | ^~~~~~~~~~~ include/linux/bitfield.h:200:1: note: in expansion of macro '__MAKE_OP' 200 | __MAKE_OP(32) | ^~~~~~~~~ Newer compiler versions do not cause problems with the zero argument because they do not consider this a __builtin_constant_p(). It's also harmless since the hweight16() check already guarantees that this cannot be 0. Replace the ffs() with an equivalent find_first_bit() check that matches the later for_each_set_bit() style and avoids the warning. Fixes: 963d0e8d08d9 ("wifi: mac80211: optionally implement MLO multicast TX") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230214132025.1532147-1-arnd@kernel.org Signed-off-by: Johannes Berg commit 5ec63fdbca604568890c577753c6f66c5b3ef0b5 Author: Prashanth K Date: Mon Feb 13 23:00:38 2023 +0530 usb: gadget: u_serial: Add null pointer check in gserial_resume Consider a case where gserial_disconnect has already cleared gser->ioport. And if a wakeup interrupt triggers afterwards, gserial_resume gets called, which will lead to accessing of gser->ioport and thus causing null pointer dereference.Add a null pointer check to prevent this. Added a static spinlock to prevent gser->ioport from becoming null after the newly added check. Fixes: aba3a8d01d62 ("usb: gadget: u_serial: add suspend resume callbacks") Cc: stable Signed-off-by: Prashanth K Acked-by: Alan Stern Link: https://lore.kernel.org/r/1676309438-14922-1-git-send-email-quic_prashk@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 7ebb605d2283fb2647b4fa82030307ce00bee436 Author: Yang Yingliang Date: Mon Feb 13 15:09:26 2023 +0800 usb: gadget: uvc: fix missing mutex_unlock() if kstrtou8() fails If kstrtou8() fails, the mutex_unlock() is missed, move kstrtou8() before mutex_lock() to fix it up. Fixes: 0525210c9840 ("usb: gadget: uvc: Allow definition of XUs in configfs") Fixes: b3c839bd8a07 ("usb: gadget: uvc: Make bSourceID read/write") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20230213070926.776447-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 7ec844a2c7535e4c4991e7e453baca85e156f7c1 Author: Alain Volmat Date: Mon Feb 13 20:23:48 2023 +0100 spi: spi-st-ssc: convert to DT schema Convert spi-st-ssc.txt into st,ssc-spi.yaml for the ST Microelectronics SSC SPI driver. Signed-off-by: Alain Volmat Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230213192349.17101-1-avolmat@me.com Signed-off-by: Mark Brown commit 9d77522b45246c3dc5950b9641aea49ce3c973d7 Author: Christophe JAILLET Date: Tue Feb 14 11:34:50 2023 +0100 spi: Reorder fields in 'struct spi_transfer' 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. Turn 'timestamped' into a bitfield so that it can be easily merged with some other bifields and move 'error'. This should have no real impact on memory allocation because 'struct spi_transfer' is mostly used on stack, but it can save a few cycles when the structure is initialized or copied. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/93a051da85a895bc6003aedfb00a13e1c2fc6338.1676370870.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit d403fb6e76bf854ef0f7d84e797e51b9494788e0 Author: Dhruva Gole Date: Wed Jan 25 13:40:23 2023 +0530 spi: cadence-quadspi: use STIG mode for small reads Fix the issue where some flash chips like cypress S25HS256T return the value of the same register over and over in DAC mode. For example in the TI K3-AM62x Processors refer [0] Technical Reference Manual there is a layer of digital logic in front of the QSPI/OSPI Drive when used in DAC mode. This is part of the Flash Subsystem (FSS) which provides access to external Flash devices. The FSS0_0_SYSCONFIG Register (Offset = 4h) has a BIT Field for OSPI_32B_DISABLE_MODE which has a Reset value = 0. This means, OSPI 32bit mode enabled by default. Thus, by default controller operates in 32 bit mode causing it to always align all data to 4 bytes from a 4byte aligned address. In some flash chips like cypress for example if we try to read some regs in DAC mode then it keeps sending the value of the first register that was requested and inorder to read the next reg, we have to stop and re-initiate a new transaction. This causes wrong register values to be read than what is desired when registers are read in DAC mode. Hence if the data.nbytes is very less then prefer STIG mode for such small reads. [0] https://www.ti.com/lit/ug/spruiv7a/spruiv7a.pdf Signed-off-by: Dhruva Gole Link: https://lore.kernel.org/r/20230125081023.1573712-5-d-gole@ti.com Signed-off-by: Mark Brown commit a8674ae02db232927385c2d0a063e10c0118f5ca Author: Dhruva Gole Date: Wed Jan 25 13:40:22 2023 +0530 spi: cadence-quadspi: setup ADDR Bits in cmd reads Setup the Addr bit field while issuing register reads in STIG mode. This is needed for example flashes like cypress define in their transaction table that to read any register there is 1 cmd byte and a few more address bytes trailing the cmd byte. Absence of addr bytes will obviously fail to read correct data from flash register that maybe requested by flash driver because the controller doesn't even specify which address of the flash register the read is being requested from. Signed-off-by: Dhruva Gole Link: https://lore.kernel.org/r/20230125081023.1573712-4-d-gole@ti.com Signed-off-by: Mark Brown commit e8c51b164355c1d519a4b8ad0873f131035d26b7 Author: Dhruva Gole Date: Wed Jan 25 13:40:21 2023 +0530 spi: cadence-quadspi: Add flag for direct mode writes Create new flag inorder to avoid playing with use_direct_mode flag currently being used throughout the driver. Disable DAC write if auto polling is disabled or CQSPI_DISABLE_DAC_MODE is set. Signed-off-by: Dhruva Gole Link: https://lore.kernel.org/r/20230125081023.1573712-3-d-gole@ti.com Signed-off-by: Mark Brown commit d4f43a2d05faf7febb839edb2e9e8f85dfb9d2d2 Author: Dhruva Gole Date: Wed Jan 25 13:40:20 2023 +0530 spi: cadence-quadspi: Reset CMD_CTRL Reg on cmd r/w completion If one leaves the CQSPI_REG_CMDCTRL in an unclean state this may cause issues in future command reads. This issue came to light when some flash reads in STIG mode were coming back dirty. Signed-off-by: Dhruva Gole Link: https://lore.kernel.org/r/20230125081023.1573712-2-d-gole@ti.com Signed-off-by: Mark Brown commit 7464145862d606cf9835f24080341a397cbc0669 Author: Christophe JAILLET Date: Tue Feb 14 09:40:14 2023 +0100 regmap: Reorder fields in 'struct regmap_bus' to save some memory Group some bool variables to reduce hole and avoid padding. On x86_64, this shrinks the size from 136 to 128 bytes. As an example: $ size drivers/base/regmap/regmap-fsi.o (Before) text data bss dec hex filename 4837 136 0 4973 136d drivers/base/regmap/regmap-fsi.o $ size drivers/base/regmap/regmap-fsi.o (After) text data bss dec hex filename 4701 136 0 4837 12e5 drivers/base/regmap/regmap-fsi.o Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/077ca39622c8870a3ea932298a9cec34f7a8295a.1676363976.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit ec285cb999c145f70631f13a284b4696102d06ef Author: Deepak R Varma Date: Mon Feb 13 23:10:46 2023 +0530 ASoC: codecs: wcd934x: Use min macro for comparison and assignment Simplify code by using min helper macro for logical evaluation and value assignment. The change also facilitates code realignment for improved readability. Proposed change is identified using minmax.cocci Coccinelle script. Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/Y+p2Hn0nrtHiKwPR@ubun2204.myguest.virtualbox.org Signed-off-by: Mark Brown commit 1fd61d018aefc9bf366fd73eddc868163f2ed7da Author: Amadeusz Sławiński Date: Mon Feb 13 21:52:23 2023 +0100 ASoC: Intel: Skylake: Fix struct definition The kernel is globally removing the ambiguous 0-length and 1-element arrays in favor of flexible arrays, so that we can gain both compile-time and run-time array bounds checking[1]. In this instance, struct skl_cpr_cfg contains struct skl_cpr_gtw_cfg, which defined "config_data" as a 1-element array. However, case present in sound/soc/intel/skylake/skl-topology.h is not a simple one as the structure takes part in IPC communication. Apparently original definition missed one field, which while not used by AudioDSP firmware when there is no additional data, is still expected to be part of an IPC message. Currently this works because of how 'config_data' is declared: 'config_data[1]'. Now when one replaces it with a flexible array there would be one field missing. Update struct declaration to fix this. Reported-by: Sasa Ostrouska Link: https://lore.kernel.org/all/CALFERdwvq5day_sbDfiUsMSZCQu9HG8-SBpOZDNPeMdZGog6XA@mail.gmail.com/ Cc: Pierre-Louis Bossart Cc: Liam Girdwood Cc: Peter Ujfalusi Cc: Bard Liao Cc: Ranjani Sridharan Cc: Kai Vehmanen Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: "Gustavo A. R. Silva" Cc: alsa-devel@alsa-project.org CC: Kees Cook Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230213205223.2679357-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 7af4222832a10c2726a93c2600652090ae06ecb9 Author: Steffen Aschbacher Date: Tue Feb 14 11:10:51 2023 +0200 ASoC: tlv320adcx140: extend list of supported samplerates The 'tlv320adcx140' driver currently supports 3 devices: TLV320ADC3140, TLV320ADC5140 and TLV320ADC6140. All 3 devices, support higher samplerates, up to 768-kHz according to their datasheets. In our applications, we only tested (and worked) with 96 kHz and 192 kHz. This change extends the list of supported sample-rates for these devices with 96 & 192 kHz. References: https://www.ti.com/product/TLV320ADC3140 https://www.ti.com/product/TLV320ADC5140 https://www.ti.com/product/TLV320ADC6140 Signed-off-by: Steffen Aschbacher Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20230214091051.16323-1-alex@shruggie.ro Signed-off-by: Mark Brown commit 88541443497d47313ec4de1ecc1946288ae0ed16 Author: Deepak R Varma Date: Mon Feb 13 23:43:03 2023 +0530 ASoC: imx-pcm-rpmsg: Remove unused variable Variable ret is initialed but is never modified or used except for returning the initial value 0. The value can be directly returned instead and the variable definition can be dropped. Issue identified using returnvar.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/Y+p9r5y9DPSJkPVf@ubun2204.myguest.virtualbox.org Signed-off-by: Mark Brown commit f7d00a9be147d9c6feeb19591b39f8102f70cc45 Author: Matthias Kaehlcke Date: Thu Feb 9 01:20:23 2023 +0000 SoC: rt5682s: Disable jack detection interrupt during suspend The rt5682s driver switches its regmap to cache-only when the device suspends and back to regular mode on resume. When the jack detect interrupt fires rt5682s_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: [ 19.672162] rt5682s 2-001a: ASoC: error at soc_component_read_no_lock on rt5682s.2-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. Signed-off-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20230209012002.1.Ib4d6481f1d38a6e7b8c9e04913c02ca88c216cf6@changeid Signed-off-by: Mark Brown commit 6611b975eb87d7793e4632575649308762e7d01e Author: Rander Wang Date: Tue Feb 14 12:33:45 2023 +0200 ASoC: SOF: Intel: hda-dsp: Set streaming flag for d0i3 Enable d0i3 streaming if all the active streams can work in d0i3 state and playback is enabled. Signed-off-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230214103345.30669-6-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 3e6b6ed34bda047a818003a8c06d368eb3596bba Author: Rander Wang Date: Tue Feb 14 12:33:44 2023 +0200 ASoC: SOF: Intel: Enable d0i3 work for ipc4 Schedule a delayed work for d0i3 entry after every non-pm ipc msg. Signed-off-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230214103345.30669-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 1c91e927e55cef17bafd8903cb34a7d12968ae6d Author: Rander Wang Date: Tue Feb 14 12:33:43 2023 +0200 ASoC: SOF: ipc4: Wake up dsp core before sending ipc msg The driver shall update the power state to D0i0 before sending a generic IPC. Power-related IPCs are the exception to the rule, they may be sent even when the power-state is D0i3 Signed-off-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230214103345.30669-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 3c168838fb0d64dd64f7d65cdbd7d127ce6112ef Author: Rander Wang Date: Tue Feb 14 12:33:42 2023 +0200 ASoC: SOF: Intel: hda-dsp: use set_pm_gate according to ipc version Use set_pm_gate to unify pm gate setting for different ipc version. Signed-off-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230214103345.30669-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 167ca6a4fd87726e044df2db38fe86f6cb0fb907 Author: Rander Wang Date: Tue Feb 14 12:33:41 2023 +0200 ASoC: SOF: Introduce a new set_pm_gate() IPC PM op Set_pm_gate depends on ipc version. This patch defines the ops for both IPC3 and IPC4. Signed-off-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230214103345.30669-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 77191db5ba7bd321fbbf4315675ee774a2b5a362 Author: Dan Carpenter Date: Thu Feb 9 16:43:45 2023 +0300 xhci: host: potential NULL dereference in xhci_generic_plat_probe() It's possible to exit the loop with "sysdev" set to NULL. In that case we should use "&pdev->dev". Fixes: ec5499d338ec ("xhci: split out rcar/rz support from xhci-plat.c") Signed-off-by: Dan Carpenter Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/Y+T4kTcJwRwxNHJq@kili Signed-off-by: Greg Kroah-Hartman commit 2edd92570441dd33246210042dc167319a5cf7e3 Author: Jiri Pirko Date: Mon Feb 13 12:58:36 2023 +0100 devlink: don't allow to change net namespace for FW_ACTIVATE reload action The change on network namespace only makes sense during re-init reload action. For FW activation it is not applicable. So check if user passed an ATTR indicating network namespace change request and forbid it. Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski Link: https://lore.kernel.org/r/20230213115836.3404039-1-jiri@resnulli.us Signed-off-by: Paolo Abeni commit dca5161f9bd052e9e73be90716ffd57e8762c697 Author: Michael Kelley Date: Sun Feb 12 21:08:01 2023 -0800 hv_netvsc: Check status in SEND_RNDIS_PKT completion message Completion responses to SEND_RNDIS_PKT messages are currently processed regardless of the status in the response, so that resources associated with the request are freed. While this is appropriate, code bugs that cause sending a malformed message, or errors on the Hyper-V host, go undetected. Fix this by checking the status and outputting a rate-limited message if there is an error. Signed-off-by: Michael Kelley Reviewed-by: Haiyang Zhang Link: https://lore.kernel.org/r/1676264881-48928-1-git-send-email-mikelley@microsoft.com Signed-off-by: Paolo Abeni commit c4a07e264d38d5cad5d77298957cbd7d7db70b1f Merge: f87b564686ee4 ceaa837f96adb Author: Greg Kroah-Hartman Date: Tue Feb 14 13:44:08 2023 +0100 Merge 6.2-rc8 into usb-next We need the USB fixes in here for testing. Signed-off-by: Greg Kroah-Hartman commit daf8fb4295dccc032515cdc1bd3873370063542b Author: Andrei Otcheretianski Date: Tue Feb 14 12:10:48 2023 +0200 wifi: mac80211: Don't translate MLD addresses for multicast MLD address translation should be done only for individually addressed frames. Otherwise, AAD calculation would be wrong and the decryption would fail. Fixes: e66b7920aa5ac ("wifi: mac80211: fix initialization of rx->link and rx->link_sta") Signed-off-by: Andrei Otcheretianski Link: https://lore.kernel.org/r/20230214101048.792414-1-andrei.otcheretianski@intel.com Signed-off-by: Johannes Berg commit d99975c4953eb79e389d4630e848435c700e2dfc Author: Wen Gong Date: Wed Feb 1 01:53:13 2023 -0500 wifi: cfg80211: call reg_notifier for self managed wiphy from driver hint Currently the regulatory driver does not call the regulatory callback reg_notifier for self managed wiphys. Sometimes driver needs cfg80211 to calculate the info of ieee80211_channel such as flags and power, and driver needs to get the info of ieee80211_channel after hint of driver, but driver does not know when calculation of the info of ieee80211_channel become finished, so add notify to driver in reg_process_self_managed_hint() from cfg80211 is a good way, then driver could get the correct info in callback of reg_notifier. Signed-off-by: Wen Gong Link: https://lore.kernel.org/r/20230201065313.27203-1-quic_wgong@quicinc.com Signed-off-by: Johannes Berg commit 935ef47b16cc5bc15fcd2b3dbc61abb0b7ea671a Author: Lorenzo Bianconi Date: Wed Feb 1 13:48:30 2023 +0100 wifi: cfg80211: get rid of gfp in cfg80211_bss_color_notify Since cfg80211_bss_color_notify() is now always run in non-atomic context, get rid of gfp_t flags in the routine signature and always use GFP_KERNEL for netlink message allocation. Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/c687724e7b53556f7a2d9cbe3d11cdcf065cb687.1675255390.git.lorenzo@kernel.org Signed-off-by: Johannes Berg commit 9b89495e479c5fedbf3f2eca4f1c4e9dd481265e Author: Vinay Gannevaram Date: Sat Feb 4 19:29:39 2023 +0530 wifi: nl80211: Allow authentication frames and set keys on NAN interface Wi-Fi Aware R4 specification defines NAN Pairing which uses PASN handshake to authenticate the peer and generate keys. Hence allow to register and transmit the PASN authentication frames on NAN interface and set the keys to driver or underlying modules on NAN interface. The driver needs to configure the feature flag NL80211_EXT_FEATURE_SECURE_NAN, which also helps userspace modules to know if the driver supports secure NAN. Signed-off-by: Vinay Gannevaram Link: https://lore.kernel.org/r/1675519179-24174-1-git-send-email-quic_vganneva@quicinc.com Signed-off-by: Johannes Berg commit aaacf1740f2f95e0c5449ff3bbcff252d69cf952 Author: Karthikeyan Periyasamy Date: Mon Feb 6 21:33:30 2023 +0530 wifi: mac80211: fix non-MLO station association Non-MLO station frames are dropped in Rx path due to the condition check in ieee80211_rx_is_valid_sta_link_id(). In multi-link AP scenario, non-MLO stations try to connect in any of the valid links in the ML AP, where the station valid_links and link_id params are valid in the ieee80211_sta object. But ieee80211_rx_is_valid_sta_link_id() always return false for the non-MLO stations by the assumption taken is valid_links and link_id are not valid in non-MLO stations object (ieee80211_sta), this assumption is wrong. Due to this assumption, non-MLO station frames are dropped which leads to failure in association. Fix it by removing the condition check and allow the link validation check for the non-MLO stations. Fixes: e66b7920aa5a ("wifi: mac80211: fix initialization of rx->link and rx->link_sta") Signed-off-by: Karthikeyan Periyasamy Link: https://lore.kernel.org/r/20230206160330.1613-1-quic_periyasa@quicinc.com Signed-off-by: Johannes Berg commit 57b341e9ab13e5688491bfd54f8b5502416c8905 Author: Rameshkumar Sundaram Date: Tue Feb 7 17:11:46 2023 +0530 wifi: mac80211: Allow NSS change only up to capability Stations can update bandwidth/NSS change in VHT action frame with action type Operating Mode Notification. (IEEE Std 802.11-2020 - 9.4.1.53 Operating Mode field) For Operating Mode Notification, an RX NSS change to a value greater than AP's maximum NSS should not be allowed. During fuzz testing, by forcefully sending VHT Op. mode notif. frames from STA with random rx_nss values, it is found that AP accepts rx_nss values greater that APs maximum NSS instead of discarding such NSS change. Hence allow NSS change only up to maximum NSS that is negotiated and capped to AP's capability during association. Signed-off-by: Rameshkumar Sundaram Link: https://lore.kernel.org/r/20230207114146.10567-1-quic_ramess@quicinc.com Signed-off-by: Johannes Berg commit 6e4c0d0460bd32ca9244dff3ba2d2da27235de11 Author: Felix Fietkau Date: Mon Feb 13 11:08:55 2023 +0100 wifi: mac80211: add a workaround for receiving non-standard mesh A-MSDU At least ath10k and ath11k supported hardware (maybe more) does not implement mesh A-MSDU aggregation in a standard compliant way. 802.11-2020 9.3.2.2.2 declares that the Mesh Control field is part of the A-MSDU header (and little-endian). As such, its length must not be included in the subframe length field. Hardware affected by this bug treats the mesh control field as part of the MSDU data and sets the length accordingly. In order to avoid packet loss, keep track of which stations are affected by this and take it into account when converting A-MSDU to 802.3 + mesh control packets. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20230213100855.34315-5-nbd@nbd.name Signed-off-by: Johannes Berg commit 986e43b19ae9176093da35e0a844e65c8bf9ede7 Author: Felix Fietkau Date: Mon Feb 13 11:08:54 2023 +0100 wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces The current mac80211 mesh A-MSDU receive path fails to parse A-MSDU packets on mesh interfaces, because it assumes that the Mesh Control field is always directly after the 802.11 header. 802.11-2020 9.3.2.2.2 Figure 9-70 shows that the Mesh Control field is actually part of the A-MSDU subframe header. This makes more sense, since it allows packets for multiple different destinations to be included in the same A-MSDU, as long as RA and TID are still the same. Another issue is the fact that the A-MSDU subframe length field was apparently accidentally defined as little-endian in the standard. In order to fix this, the mesh forwarding path needs happen at a different point in the receive path. ieee80211_data_to_8023_exthdr is changed to ignore the mesh control field and leave it in after the ethernet header. This also affects the source/dest MAC address fields, which now in the case of mesh point to the mesh SA/DA. ieee80211_amsdu_to_8023s is changed to deal with the endian difference and to add the Mesh Control length to the subframe length, since it's not covered by the MSDU length field. With these changes, the mac80211 will get the same packet structure for converted regular data packets and unpacked A-MSDU subframes. The mesh forwarding checks are now only performed after the A-MSDU decap. For locally received packets, the Mesh Control header is stripped away. For forwarded packets, a new 802.11 header gets added. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20230213100855.34315-4-nbd@nbd.name [fix fortify build error] Signed-off-by: Johannes Berg commit cfd4ea4815d16f7426723a5cb80ee5db811ea1f2 Author: Liming Sun Date: Thu Feb 2 10:29:15 2023 -0500 mmc: sdhci-of-dwcmshc: add the missing device table IDs for acpi This commit adds the missing MODULE_DEVICE_TABLE for acpi, or else it won't be loaded automatically when compiled as a kernel module. Reviewed-by: David Thompson Signed-off-by: Liming Sun Link: https://lore.kernel.org/r/f57ad0f8fdf663465bca74467c344dfa305a3199.1675305696.git.limings@nvidia.com Signed-off-by: Ulf Hansson commit 5c1e269aa5ebafeec69b68ff560522faa5bcb6c1 Author: Felix Fietkau Date: Mon Feb 13 11:08:53 2023 +0100 wifi: mac80211: remove mesh forwarding congestion check Now that all drivers use iTXQ, it does not make sense to check to drop tx forwarding packets when the driver has stopped the queues. fq_codel will take care of dropping packets when the queues fill up Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20230213100855.34315-3-nbd@nbd.name Signed-off-by: Johannes Berg commit 9f718554e7eacea62d3f972cae24d969755bf3b6 Author: Felix Fietkau Date: Mon Feb 13 11:08:52 2023 +0100 wifi: cfg80211: factor out bridge tunnel / RFC1042 header check The same check is done in multiple places, unify it. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20230213100855.34315-2-nbd@nbd.name Signed-off-by: Johannes Berg commit 0f690e6b4dcd7243e2805a76981b252c2d4bdce6 Author: Felix Fietkau Date: Mon Feb 13 11:08:51 2023 +0100 wifi: cfg80211: move A-MSDU check in ieee80211_data_to_8023_exthdr When parsing the outer A-MSDU header, don't check for inner bridge tunnel or RFC1042 headers. This is handled by ieee80211_amsdu_to_8023s already. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20230213100855.34315-1-nbd@nbd.name Signed-off-by: Johannes Berg commit 59336e07b287d91dc4ec265e07724e8f7e3d0209 Author: Shayne Chen Date: Thu Feb 9 19:06:59 2023 +0800 wifi: mac80211: make rate u32 in sta_set_rate_info_rx() The value of last_rate in ieee80211_sta_rx_stats is degraded from u32 to u16 after being assigned to rate variable, which causes information loss in STA_STATS_FIELD_TYPE and later bitfields. Signed-off-by: Shayne Chen Link: https://lore.kernel.org/r/20230209110659.25447-1-shayne.chen@mediatek.com Fixes: 41cbb0f5a295 ("mac80211: add support for HE") Signed-off-by: Johannes Berg commit 796703baead0c2862f7f2ebb9b177590af533035 Author: Bo Liu Date: Mon Feb 6 03:16:41 2023 -0500 rfkill: Use sysfs_emit() to instead of sprintf() Follow the advice of the Documentation/filesystems/sysfs.rst and show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: Bo Liu Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230206081641.3193-1-liubo03@inspur.com Signed-off-by: Johannes Berg commit 19085ef39fa3dd27fa76d1c86dd448403101dcf7 Author: Rameshkumar Sundaram Date: Wed Feb 1 11:46:02 2023 +0530 wifi: cfg80211: Allow action frames to be transmitted with link BSS in MLD Currently action frames TX only with ML address as A3(BSSID) are allowed in an ML AP, but TX for a non-ML Station can happen in any link of an ML BSS with link BSS address as A3. In case of an MLD, if User-space has provided a valid link_id in action frame TX request, allow transmission of the frame in that link. Signed-off-by: Rameshkumar Sundaram Link: https://lore.kernel.org/r/20230201061602.3918-1-quic_ramess@quicinc.com Signed-off-by: Johannes Berg commit 2cc25e4b2a04cdd90dbb2916678745565cc4aeed Author: Aloka Dixit Date: Mon Jan 30 16:12:27 2023 -0800 wifi: mac80211: configure puncturing bitmap - Configure the bitmap in link_conf and notify the driver. - Modify 'change' in ieee80211_start_ap() from u32 to u64 to support BSS_CHANGED_EHT_PUNCTURING. - Propagate the bitmap in channel switch events to userspace. Signed-off-by: Aloka Dixit Signed-off-by: Muna Sinada Link: https://lore.kernel.org/r/20230131001227.25014-5-quic_alokad@quicinc.com Signed-off-by: Johannes Berg commit b345f0637c0042f9e6b78378a32256d90f485774 Author: Aloka Dixit Date: Mon Jan 30 16:12:26 2023 -0800 wifi: cfg80211: include puncturing bitmap in channel switch events Add puncturing bitmap in channel switch notifications and corresponding trace functions. Signed-off-by: Aloka Dixit Link: https://lore.kernel.org/r/20230131001227.25014-4-quic_alokad@quicinc.com [fix qtnfmac] Signed-off-by: Johannes Berg commit d7c1a9a0ed180d8884798ce97afe7283622a484f Author: Aloka Dixit Date: Mon Jan 30 16:12:25 2023 -0800 wifi: nl80211: validate and configure puncturing bitmap - New feature flag, NL80211_EXT_FEATURE_PUNCT, to advertise driver support for preamble puncturing in AP mode. - New attribute, NL80211_ATTR_PUNCT_BITMAP, to receive a puncturing bitmap from the userspace during AP bring up (NL80211_CMD_START_AP) and channel switch (NL80211_CMD_CHANNEL_SWITCH) operations. Each bit corresponds to a 20 MHz channel in the operating bandwidth, lowest bit for the lowest channel. Bit set to 1 indicates that the channel is punctured. Higher 16 bits are reserved. - New members added to structures cfg80211_ap_settings and cfg80211_csa_settings to propagate the bitmap to the driver after validation. Signed-off-by: Aloka Dixit Signed-off-by: Muna Sinada Link: https://lore.kernel.org/r/20230131001227.25014-3-quic_alokad@quicinc.com [move validation against 0xffff into policy] Signed-off-by: Johannes Berg commit b25413fed3d43e1ed3340df4d928971bb8639f66 Author: Aloka Dixit Date: Mon Jan 30 16:12:24 2023 -0800 wifi: cfg80211: move puncturing bitmap validation from mac80211 - Move ieee80211_valid_disable_subchannel_bitmap() from mlme.c to chan.c, rename it as cfg80211_valid_disable_subchannel_bitmap() and export it. - Modify the prototype to include struct cfg80211_chan_def instead of only bandwidth to support a check which returns false if the primary channel is punctured. Signed-off-by: Aloka Dixit Link: https://lore.kernel.org/r/20230131001227.25014-2-quic_alokad@quicinc.com Signed-off-by: Johannes Berg commit 90b2c3cc4b718d7e5591e812313dd72677d9fad0 Author: Jaewan Kim Date: Mon Jan 30 07:45:14 2023 +0000 wifi: nl80211: return error message for malformed chandef Add an error message to the missing frequency case to have all -EINVAL in nl80211_parse_chandef() return a better error. Signed-off-by: Jaewan Kim Link: https://lore.kernel.org/r/20230130074514.1560021-1-jaewan@google.com [rewrite commit message] Signed-off-by: Johannes Berg commit 08b74776a8acb02b7cabb77fc1ccbd93e147edfa Author: Jaewan Kim Date: Mon Jan 30 02:22:52 2023 +0000 wifi: mac80211_hwsim: Rename pid to portid to avoid confusion It is a frequent mistake to confuse the netlink port identifier with a process identifier. Try to reduce this confusion by renaming that hold port identifiers portid instead of pid. This change replicates following commit: commit 15e473046cb6 ("netlink: Rename pid to portid to avoid confusion") Signed-off-by: Jaewan Kim Link: https://lore.kernel.org/r/20230130022252.1514647-1-jaewan@google.com Signed-off-by: Johannes Berg commit cba7217a9269e0c43cb858bdca33b291d6442068 Author: Alvin Šipraga Date: Sat Jan 28 13:58:44 2023 +0100 wifi: nl80211: add MLO_LINK_ID to CMD_STOP_AP event nl80211_send_ap_stopped() can be called multiple times on the same netdev for each link when using Multi-Link Operation. Add the MLO_LINK_ID attribute to the event to allow userspace to distinguish which link the event is for. Signed-off-by: Alvin Šipraga Link: https://lore.kernel.org/r/20230128125844.2407135-2-alvin@pqrs.dk Signed-off-by: Johannes Berg commit 77669c151f1de6de2eaa28d7efdf387d39208309 Author: Alvin Šipraga Date: Sat Jan 28 13:58:43 2023 +0100 wifi: nl80211: emit CMD_START_AP on multicast group when an AP is started Userspace processes such as network daemons may wish to be informed when any AP interface is brought up on the system, for example to initiate a (re)configuration of IP settings or to start a DHCP server. Currently nl80211 does not broadcast any such event on its multicast groups, leaving userspace only two options: 1. the process must be the one that actually issued the NL80211_CMD_START_AP request, so that it can react on the response to that request; 2. the process must react to RTM_NEWLINK events indicating a change in carrier state, and may query for further information about the AP and react accordingly. Option (1) is robust, but it does not cover all scenarios. It is easy to imagine a situation where this is not the case (e.g. hostapd + systemd-networkd). Option (2) is not robust, because RTM_NEWLINK events may be silently discarded by the linkwatch logic (cf. linkwatch_fire_event()). Concretely, consider a scenario in which the carrier state flip-flops in the following way: ^ carrier state (high/low = carrier/no carrier) | | _______ _______ ... | | | | | ______| "foo" |____| "bar" (SSID in "quotes") | +-------A-------B----C---------> time If the time interval between (A) and (C) is less than 1 second, then linkwatch may emit only a single RTM_NEWLINK event indicating carrier gain. This is problematic because it is possible that the network configuration that should be applied is a function of the AP's properties such as SSID (cf. SSID= in systemd.network(5)). As illustrated in the above diagram, it may be that the AP with SSID "bar" ends up being configured as though it had SSID "foo". Address the above issue by having nl80211 emit an NL80211_CMD_START_AP message on the MLME nl80211 multicast group. This allows for arbitrary processes to be reliably informed. Signed-off-by: Alvin Šipraga Link: https://lore.kernel.org/r/20230128125844.2407135-1-alvin@pqrs.dk Signed-off-by: Johannes Berg commit aa87cd8b35736a5183745ab0ec4b82419024dfd7 Author: Johannes Berg Date: Fri Jan 27 12:39:31 2023 +0100 wifi: mac80211: mlme: handle EHT channel puncturing Handle the Puncturing info received from the AP in the EHT Operation element in beacons. If the info is invalid: - during association: disable EHT connection for the AP - after association: disconnect This commit includes many (internal) bugfixes and spec updates various people. Co-developed-by: Miri Korenblit Signed-off-by: Miri Korenblit Link: https://lore.kernel.org/r/20230127123930.4fbc74582331.I3547481d49f958389f59dfeba3fcc75e72b0aa6e@changeid Signed-off-by: Johannes Berg commit 8bb588d975019748ebdab9448e9a274b7463c13b Author: Veerendranath Jakkam Date: Thu Jan 26 20:02:56 2023 +0530 wifi: cfg80211: Extend cfg80211_update_owe_info_event() for MLD AP Add support to offload OWE processing to user space for MLD AP when driver's SME in use. Add new parameters in struct cfg80211_update_owe_info to provide below information in cfg80211_update_owe_info_event() call: - MLO link ID of the AP, with which station requested (re)association. This is applicable for both MLO and non-MLO station connections when the AP affiliated with an MLD. - Station's MLD address if the connection is MLO capable. Signed-off-by: Veerendranath Jakkam Link: https://lore.kernel.org/r/20230126143256.960563-3-quic_vjakkam@quicinc.com [reformat the trace event macro] Signed-off-by: Johannes Berg commit a42e59eb9689e54279227e2af5ed75128d92a82b Author: Veerendranath Jakkam Date: Thu Jan 26 20:02:55 2023 +0530 wifi: cfg80211: Extend cfg80211_new_sta() for MLD AP Add support for drivers to indicate STA connection(MLO/non-MLO) when user space SME (e.g., hostapd) is not used for MLD AP. Add new parameters in struct station_info to provide below information in cfg80211_new_sta() call: - MLO link ID of the AP, with which station completed (re)association. This is applicable for both MLO and non-MLO station connections when the AP affiliated with an MLD. - Station's MLD address if the connection is MLO capable. - (Re)Association Response IEs sent to the station. User space needs this to determine rejected and accepted affiliated links information of the connected station if the connection is MLO capable. Signed-off-by: Veerendranath Jakkam Link: https://lore.kernel.org/r/20230126143256.960563-2-quic_vjakkam@quicinc.com Signed-off-by: Johannes Berg commit 9288188438d85e22c23cfd6657ee8a801babc83c Author: Lorenzo Bianconi Date: Wed Jan 25 12:01:02 2023 +0100 wifi: mac80211: move color collision detection report in a delayed work Move color collision report in a dedicated delayed work and do not run it in interrupt context in order to rate-limit the number of events reported to userspace. Moreover grab wdev mutex in ieee80211_color_collision_detection_work routine since it is required by cfg80211_obss_color_collision_notify(). Tested-by: Nicolas Cavallari Signed-off-by: Lorenzo Bianconi Fixes: 5f9404abdf2a ("mac80211: add support for BSS color change") Link: https://lore.kernel.org/r/3f6cf60c892ad40c1cca4a55d62b1224ef1c6ce9.1674644379.git.lorenzo@kernel.org Signed-off-by: Johannes Berg commit 015b8cc5e7c4d7bb671f1984d7b7338c310b185b Author: Alexander Wetzel Date: Tue Jan 24 15:18:56 2023 +0100 wifi: cfg80211: Fix use after free for wext Key information in wext.connect is not reset on (re)connect and can hold data from a previous connection. Reset key data to avoid that drivers or mac80211 incorrectly detect a WEP connection request and access the freed or already reused memory. Additionally optimize cfg80211_sme_connect() and avoid an useless schedule of conn_work. Fixes: fffd0934b939 ("cfg80211: rework key operation") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230124141856.356646-1-alexander@wetzel-home.de Signed-off-by: Alexander Wetzel Signed-off-by: Johannes Berg commit 8eff2e2410cfe941207cb17ab322b0e6ce780f54 Author: Heiko Carstens Date: Sun Feb 12 17:37:48 2023 +0100 s390: remove confusing comment from uapi types header file The comment for addr_t doesn't make too much sense. Given that also the formatting is incorrect, just remove it. Signed-off-by: Heiko Carstens commit 1c06bb87afb2d95b8e9f4f2e3d0d6772c68f3e76 Author: Eric Farman Date: Fri Feb 10 18:42:27 2023 +0100 vfio/ccw: remove WARN_ON during shutdown The logic in vfio_ccw_sch_shutdown() always assumed that the input subchannel would point to a vfio_ccw_private struct, without checking that one exists. The blamed commit put in a check for this scenario, to prevent the possibility of a missing private. The trouble is that check was put alongside a WARN_ON(), presuming that such a scenario would be a cause for concern. But this can be triggered by binding a subchannel to vfio-ccw, and rebooting the system before starting the mdev (via "mdevctl start" or similar) or after stopping it. In those cases, shutdown doesn't need to worry because either the private was never allocated, or it was cleaned up by vfio_ccw_mdev_remove(). Remove the WARN_ON() piece of this check, since there are plausible scenarios where private would be NULL in this path. Fixes: 9e6f07cd1eaa ("vfio/ccw: create a parent struct") Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Link: https://lore.kernel.org/r/20230210174227.2256424-1-farman@linux.ibm.com Signed-off-by: Heiko Carstens commit adf1e17edc65560ea5615d35ded65834cbf33422 Author: Heiko Carstens Date: Sun Feb 12 18:00:56 2023 +0100 s390/entry: remove toolchain dependent micro-optimization Get rid of CONFIG_AS_IS_LLVM in entry.S to make the code a bit more readable. This removes a micro-optimization, but given that the llvm IAS limitation will likely stay, just use the version that works with llvm. See commit 4c25f0ff6336 ("s390/entry: workaround llvm's IAS limitations") for further details. Signed-off-by: Heiko Carstens commit af0735269b72333d06e9677cb843bf5ce689a38c Author: Vasily Gorbik Date: Fri Feb 10 15:47:06 2023 +0100 s390/mem_detect: do not truncate online memory ranges info Commit bf64f0517e5d ("s390/mem_detect: handle online memory limit just once") introduced truncation of mem_detect online ranges based on identity mapping size. For kdump case however the full set of online memory ranges has to be feed into memblock_physmem_add so that crashed system memory could be extracted. Instead of truncating introduce a "usable limit" which is respected by mem_detect api. Also add extra online memory ranges iterator which still provides full set of online memory ranges disregarding the "usable limit". Fixes: bf64f0517e5d ("s390/mem_detect: handle online memory limit just once") Reported-by: Alexander Egorenkov Tested-by: Alexander Egorenkov Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 55d169c87db1d0faa95313809f18f8b49cafdd75 Author: Heiko Carstens Date: Fri Feb 10 14:09:38 2023 +0100 s390/vx: remove __uint128_t type from __vector128 struct again The __uint128_t member was only added for future convenience to the __vector128 struct. However this is a uapi header file, 31/32 bit (aka compat layer) is still supported, but doesn't know anything about this type: /usr/include/asm/types.h:27:17: error: unknown type name __uint128_t 27 | __uint128_t v; Therefore remove it again. Fixes: b0b7b43fcc46 ("s390/vx: add 64 and 128 bit members to __vector128 struct") Signed-off-by: Heiko Carstens commit 0807b856521f3313d3912ebb52a9144215c4ff08 Author: Gerald Schaefer Date: Mon Feb 6 17:48:21 2023 +0100 s390/mm: add support for RDP (Reset DAT-Protection) RDP instruction allows to reset DAT-protection bit in a PTE, with less CPU synchronization overhead than IPTE instruction. In particular, IPTE can cause machine-wide synchronization overhead, and excessive IPTE usage can negatively impact machine performance. RDP can be used instead of IPTE, if the new PTE only differs in SW bits and _PAGE_PROTECT HW bit, for PTE protection changes from RO to RW. SW PTE bit changes are allowed, e.g. for dirty and young tracking, but none of the other HW-defined part of the PTE must change. This is because the architecture forbids such changes to an active and valid PTE, which is why invalidation with IPTE is always used first, before writing a new entry. The RDP optimization helps mainly for fault-driven SW dirty-bit tracking. Writable PTEs are initially always mapped with HW _PAGE_PROTECT bit set, to allow SW dirty-bit accounting on first write protection fault, where the DAT-protection would then be reset. The reset is now done with RDP instead of IPTE, if RDP instruction is available. RDP cannot always guarantee that the DAT-protection reset is propagated to all CPUs immediately. This means that spurious TLB protection faults on other CPUs can now occur. For this, common code provides a flush_tlb_fix_spurious_fault() handler, which will now be used to do a CPU-local TLB flush. However, this will clear the whole TLB of a CPU, and not just the affected entry. For more fine-grained flushing, by simply doing a (local) RDP again, flush_tlb_fix_spurious_fault() would need to also provide the PTE pointer. Note that spurious TLB protection faults cannot really be distinguished from racing pagetable updates, where another thread already installed the correct PTE. In such a case, the local TLB flush would be unnecessary overhead, but overall reduction of CPU synchronization overhead by not using IPTE is still expected to be beneficial. Reviewed-by: Alexander Gordeev Signed-off-by: Gerald Schaefer Signed-off-by: Heiko Carstens commit d939474b3d92624744a334c9e5f58ce3934584b5 Author: Peter Xu Date: Sun Feb 5 18:17:04 2023 -0500 s390/mm: define private VM_FAULT_* reasons from top bits The current definition already collapse with the generic definition of vm_fault_reason. Move the private definitions to allocate bits from the top of uint so they won't collapse anymore. Signed-off-by: Peter Xu Link: https://lore.kernel.org/r/20230205231704.909536-4-peterx@redhat.com Signed-off-by: Heiko Carstens commit 9a47c1ef5a95d1fd229ee5e375985f809a9d8177 Author: Veerendranath Jakkam Date: Mon Jan 16 18:20:58 2023 +0530 wifi: cfg80211: Authentication offload to user space for MLO connection in STA mode Currently authentication request event interface doesn't have support to indicate the user space whether it should enable MLO or not during the authentication with the specified AP. But driver needs such capability since the connection is MLO or not decided by the driver in case of SME offload to the driver. Add support for driver to indicate MLD address of the AP in authentication offload request to inform user space to enable MLO during authentication process. Driver shall look at NL80211_ATTR_MLO_SUPPORT flag capability in NL80211_CMD_CONNECT to know whether the user space supports enabling MLO during the authentication offload. User space should enable MLO during the authentication only when it receives the AP MLD address in authentication offload request. User space shouldn't enable MLO if the authentication offload request doesn't indicate the AP MLD address even if the AP is MLO capable. When MLO is enabled, user space should use the MAC address of the interface (on which driver sent request) as self MLD address. User space and driver to use MLD addresses in RA, TA and BSSID fields of the frames between them, and driver translates the MLD addresses to/from link addresses based on the link chosen for the authentication. Signed-off-by: Veerendranath Jakkam Link: https://lore.kernel.org/r/20230116125058.1604843-1-quic_vjakkam@quicinc.com Signed-off-by: Johannes Berg commit 991cbd4f34b1d2d4e4cc41aed6eb4799186c3887 Merge: a71fad0fd893b 2b68d659a704a Author: Paolo Abeni Date: Tue Feb 14 11:00:03 2023 +0100 Merge branch 'add-support-for-per-action-hw-stats' Oz Shlomo says: ==================== add support for per action hw stats There are currently two mechanisms for populating hardware stats: 1. Using flow_offload api to query the flow's statistics. The api assumes that the same stats values apply to all the flow's actions. This assumption breaks when action drops or jumps over following actions. 2. Using hw_action api to query specific action stats via a driver callback method. This api assures the correct action stats for the offloaded action, however, it does not apply to the rest of the actions in the flow's actions array, as elaborated below. The current hw_action api does not apply to the following use cases: 1. Actions that are implicitly created by filters (aka bind actions). In the following example only one counter will apply to the rule: tc filter add dev $DEV prio 2 protocol ip parent ffff: \ flower ip_proto tcp dst_ip $IP2 \ action police rate 1mbit burst 100k conform-exceed drop/pipe \ action mirred egress redirect dev $DEV2 2. Action preceding a hw action. In the following example the same flow stats will apply to the sample and mirred actions: tc action add police rate 1mbit burst 100k conform-exceed drop / pipe tc filter add dev $DEV prio 2 protocol ip parent ffff: \ flower ip_proto tcp dst_ip $IP2 \ action sample rate 1 group 10 trunc 60 pipe \ action police index 1 \ action mirred egress redirect dev $DEV2 3. Meter action using jump control. In the following example the same flow stats will apply to both mirred actions: tc action add police rate 1mbit burst 100k conform-exceed jump 2 / pipe tc filter add dev $DEV prio 2 protocol ip parent ffff: \ flower ip_proto tcp dst_ip $IP2 \ action police index 1 \ action mirred egress redirect dev $DEV2 action mirred egress redirect dev $DEV3 This series provides the platform to query per action stats for in_hw flows. The first four patches are preparation patches with no functionality change. The fifth patch re-uses the existing flow action stats api to query action stats for both classifier and action dumps. The rest of the patches add per action stats support to the Mellanox driver. ==================== Link: https://lore.kernel.org/r/20230212132520.12571-1-ozsh@nvidia.com Signed-off-by: Paolo Abeni commit 2b68d659a704abaa61fb3255776b5483bdc4eb35 Author: Oz Shlomo Date: Sun Feb 12 15:25:20 2023 +0200 net/mlx5e: TC, support per action stats Extend the action stats callback implementation to update stats for actions that are associated with hw counters. Note that the callback may be called from tc action utility or from tc flower. Both apis expect the driver to return the stats difference from the last update. As such, query the raw counter value and maintain the diff from the last api call in the tc layer, instead of the fs_core layer. Signed-off-by: Oz Shlomo Reviewed-by: Roi Dayan Signed-off-by: Paolo Abeni commit d13674b1d14c68339173db5dd39c4ab0949234e7 Author: Oz Shlomo Date: Sun Feb 12 15:25:19 2023 +0200 net/mlx5e: TC, map tc action cookie to a hw counter Currently a hardware counter is associated with a flow cookie. This does not apply to flows using branching action which are required to return per action stats. A single counter may apply to multiple actions. Scan the flow actions in reverse (from the last to the first action) while caching the last counter. Associate all the flow attribute tc action cookies with the current cached counter. Signed-off-by: Oz Shlomo Reviewed-by: Roi Dayan Signed-off-by: Paolo Abeni commit cca7eac13856e75306bbdefb1673bcd0310d9abc Author: Oz Shlomo Date: Sun Feb 12 15:25:18 2023 +0200 net/mlx5e: TC, store tc action cookies per attr The tc parse action phase translates the tc actions to mlx5 flow attributes data structure that is used during the flow offload phase. Currently, the flow offload stage instantiates hw counters while associating them to flow cookie. However, flows with branching actions are required to associate a hardware counter with its action cookies. Store the parsed tc action cookies on the flow attribute. Use the list of cookies in the next patch to associate a tc action cookie with its allocated hw counter. Signed-off-by: Oz Shlomo Reviewed-by: Roi Dayan Signed-off-by: Paolo Abeni commit e9d1061d87276d3397157ea947fa28374dcbf974 Author: Oz Shlomo Date: Sun Feb 12 15:25:17 2023 +0200 net/mlx5e: TC, add hw counter to branching actions Currently a hw count action is appended to the last action of the action list. However, a branching action may terminate the action list before reaching the last action. Append a count action to a branching action. In the next patches, filters with branching actions will read this counter when reporting stats per action. Signed-off-by: Oz Shlomo Reviewed-by: Roi Dayan Signed-off-by: Paolo Abeni commit 5246c896b805b043a87fa78af32a33cbce00de05 Author: Oz Shlomo Date: Sun Feb 12 15:25:16 2023 +0200 net/sched: support per action hw stats There are currently two mechanisms for populating hardware stats: 1. Using flow_offload api to query the flow's statistics. The api assumes that the same stats values apply to all the flow's actions. This assumption breaks when action drops or jumps over following actions. 2. Using hw_action api to query specific action stats via a driver callback method. This api assures the correct action stats for the offloaded action, however, it does not apply to the rest of the actions in the flow's actions array. Extend the flow_offload stats callback to indicate that a per action stats update is required. Use the existing flow_offload_action api to query the action's hw stats. In addition, currently the tc action stats utility only updates hw actions. Reuse the existing action stats cb infrastructure to query any action stats. Signed-off-by: Oz Shlomo Reviewed-by: Simon Horman Reviewed-by: Marcelo Ricardo Leitner Acked-by: Jamal Hadi Salim Signed-off-by: Paolo Abeni commit d307b2c6f962ad5d83d7a7df71c2e9c9e4106d82 Author: Oz Shlomo Date: Sun Feb 12 15:25:15 2023 +0200 net/sched: introduce flow_offload action cookie Currently a hardware action is uniquely identified by the tuple. However, the id is set by the flow_act_setup callback and tc core cannot enforce this, and it is possible that a future change could break this. In addition, are not unique across network namespaces. Uniquely identify the action by setting an action cookie by the tc core. Use the unique action cookie to query the action's hardware stats. Signed-off-by: Oz Shlomo Reviewed-by: Simon Horman Reviewed-by: Marcelo Ricardo Leitner Acked-by: Jamal Hadi Salim Signed-off-by: Paolo Abeni commit ac7d27907d5445d0accaf998e1dc3ea570ed1ba6 Author: Oz Shlomo Date: Sun Feb 12 15:25:14 2023 +0200 net/sched: pass flow_stats instead of multiple stats args Instead of passing 6 stats related args, pass the flow_stats. Signed-off-by: Oz Shlomo Reviewed-by: Simon Horman Reviewed-by: Marcelo Ricardo Leitner Acked-by: Jamal Hadi Salim Signed-off-by: Paolo Abeni commit 3320f36fd8ad45312c98857d36ecbef90f829497 Author: Oz Shlomo Date: Sun Feb 12 15:25:13 2023 +0200 net/sched: act_pedit, setup offload action for action stats query A single tc pedit action may be translated to multiple flow_offload actions. Offload only actions that translate to a single pedit command value. Signed-off-by: Oz Shlomo Reviewed-by: Simon Horman Reviewed-by: Marcelo Ricardo Leitner Acked-by: Jamal Hadi Salim Signed-off-by: Paolo Abeni commit 8f2ca70c07f4cee68ed6297c1876c28b73c9af21 Author: Oz Shlomo Date: Sun Feb 12 15:25:12 2023 +0200 net/sched: optimize action stats api calls Currently the hw action stats update is called from tcf_exts_hw_stats_update, when a tc filter is dumped, and from tcf_action_copy_stats, when a hw action is dumped. However, the tcf_action_copy_stats is also called from tcf_action_dump. As such, the hw action stats update cb is called 3 times for every tc flower filter dump. Move the tc action hw stats update from tcf_action_copy_stats to tcf_dump_walker to update the hw action stats when tc action is dumped. Signed-off-by: Oz Shlomo Reviewed-by: Simon Horman Reviewed-by: Marcelo Ricardo Leitner Acked-by: Jamal Hadi Salim Signed-off-by: Paolo Abeni commit 3d9c361713f24f3f55b9622d18d32add1910e6ba Author: Johannes Berg Date: Thu Jan 19 14:45:47 2023 +0100 wifi: cfg80211: trace: remove MAC_PR_{FMT,ARG} With %pM, this really is no longer needed, and actually longer to spell out. Remove it. Signed-off-by: Johannes Berg commit a71fad0fd893b5db8ec5a8a287ff87720b7352a6 Author: Arınç ÜNAL Date: Sun Feb 12 16:12:58 2023 +0300 dt-bindings: net: dsa: mediatek,mt7530: improve binding description Fix inaccurate information about PHY muxing, and merge standalone and multi-chip module MT7530 configuration methods. Signed-off-by: Arınç ÜNAL Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230212131258.47551-1-arinc.unal@arinc9.com Signed-off-by: Paolo Abeni commit 17c45768fdf970b8a2ea9745783ff6a0512fca11 Author: Greg Kroah-Hartman Date: Tue Feb 14 08:59:33 2023 +0100 Revert "driver core: add error handling for devtmpfs_create_node()" This reverts commit 31b4b6730fd4f5d503c9f23619c920ce7b794754 as it is reported to cause boot regressions. Link: https://lore.kernel.org/r/Y+rSXg14z1Myd8Px@dev-arch.thelio-3990X Reported-by: Nathan Chancellor Cc: Longlong Xia Signed-off-by: Greg Kroah-Hartman commit 48c9899affd51f7acfc07a3f4d777b6eeb73a451 Author: Greg Kroah-Hartman Date: Tue Feb 14 08:59:22 2023 +0100 Revert "devtmpfs: add debug info to handle()" This reverts commit 90a9d5ff225267b3376f73c19f21174e3b6d7746 as it is reported to cause boot regressions. Link: https://lore.kernel.org/r/Y+rSXg14z1Myd8Px@dev-arch.thelio-3990X Reported-by: Nathan Chancellor Cc: Longlong Xia Signed-off-by: Greg Kroah-Hartman commit d3583f06782cae72374464f9c29b2056fa0bd012 Author: Greg Kroah-Hartman Date: Tue Feb 14 08:59:13 2023 +0100 Revert "devtmpfs: remove return value of devtmpfs_delete_node()" This reverts commit 9d3fe6aa6b9517408064c7c3134187e8ec77dbf7 as it is reported to cause boot regressions. Link: https://lore.kernel.org/r/Y+rSXg14z1Myd8Px@dev-arch.thelio-3990X Reported-by: Nathan Chancellor Cc: Longlong Xia Signed-off-by: Greg Kroah-Hartman commit 1f5dfcc78ab4cc06ce7dac9de6c1ed361fde7119 Author: Alexei Starovoitov Date: Mon Feb 13 22:01:14 2023 -0800 Revert "bpf: Add --skip_encoding_btf_inconsistent_proto, --btf_gen_optimized to pahole flags for v1.25" This reverts commit 0243d3dfe274832aa0a16214499c208122345173. pahole 1.25 is too aggressive removing functions. With clang compiled kernel the following is seen: WARN: resolve_btfids: unresolved symbol tcp_reno_cong_avoid WARN: resolve_btfids: unresolved symbol dctcp_update_alpha WARN: resolve_btfids: unresolved symbol cubictcp_cong_avoid WARN: resolve_btfids: unresolved symbol bpf_xdp_metadata_rx_timestamp WARN: resolve_btfids: unresolved symbol bpf_xdp_metadata_rx_hash WARN: resolve_btfids: unresolved symbol bpf_task_kptr_get WARN: resolve_btfids: unresolved symbol bpf_task_acquire_not_zero WARN: resolve_btfids: unresolved symbol bpf_rdonly_cast WARN: resolve_btfids: unresolved symbol bpf_kfunc_call_test_static_unused_arg WARN: resolve_btfids: unresolved symbol bpf_kfunc_call_test_ref WARN: resolve_btfids: unresolved symbol bpf_kfunc_call_test_pass_ctx WARN: resolve_btfids: unresolved symbol bpf_kfunc_call_test_pass2 WARN: resolve_btfids: unresolved symbol bpf_kfunc_call_test_pass1 WARN: resolve_btfids: unresolved symbol bpf_kfunc_call_test_mem_len_pass1 WARN: resolve_btfids: unresolved symbol bpf_kfunc_call_test_mem_len_fail2 WARN: resolve_btfids: unresolved symbol bpf_kfunc_call_test_mem_len_fail1 WARN: resolve_btfids: unresolved symbol bpf_kfunc_call_test_kptr_get WARN: resolve_btfids: unresolved symbol bpf_kfunc_call_test_fail3 WARN: resolve_btfids: unresolved symbol bpf_kfunc_call_test_fail2 WARN: resolve_btfids: unresolved symbol bpf_kfunc_call_test_acquire WARN: resolve_btfids: unresolved symbol bpf_kfunc_call_test2 WARN: resolve_btfids: unresolved symbol bpf_kfunc_call_test1 WARN: resolve_btfids: unresolved symbol bpf_kfunc_call_memb_release WARN: resolve_btfids: unresolved symbol bpf_kfunc_call_memb1_release WARN: resolve_btfids: unresolved symbol bpf_kfunc_call_int_mem_release Signed-off-by: Alexei Starovoitov commit 50a7cedb150a628b54aa7f8ce1e922a72c773273 Author: Joanne Koong Date: Mon Feb 13 21:13:32 2023 -0800 selftests/bpf: Clean up dynptr prog_tests Clean up prog_tests/dynptr.c by removing the unneeded "expected_err_msg" in the dynptr_tests struct, which is a remnant from converting the fail tests cases to use the generic verification tester. Signed-off-by: Joanne Koong Link: https://lore.kernel.org/r/20230214051332.4007131-2-joannelkoong@gmail.com Signed-off-by: Alexei Starovoitov commit 8032cad1030279066ce4a1f82b76d0fe7eb578e2 Author: Joanne Koong Date: Mon Feb 13 21:13:31 2023 -0800 selftests/bpf: Clean up user_ringbuf, cgrp_kfunc, kfunc_dynptr_param tests Clean up user_ringbuf, cgrp_kfunc, and kfunc_dynptr_param tests to use the generic verification tester for checking verifier rejections. The generic verification tester uses btf_decl_tag-based annotations for verifying that the tests fail with the expected log messages. Signed-off-by: Joanne Koong Acked-by: David Vernet Reviewed-by: Roberto Sassu Link: https://lore.kernel.org/r/20230214051332.4007131-1-joannelkoong@gmail.com Signed-off-by: Alexei Starovoitov commit b6c0c237bea191fb99b6c2de093262402b0159a6 Author: Keith Busch Date: Fri Feb 10 10:03:47 2023 -0800 nvme-pci: remove iod use_sgls It's not used anywhere anymore, so remove it. Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig commit 8f0edf45bb676ec3558d6b668ad3f6a7d54cf601 Author: Keith Busch Date: Fri Feb 10 10:03:46 2023 -0800 nvme-pci: fix freeing single sgl There may only be a single DMA mapped entry from multiple physical segments, which means we don't allocate a separte SGL list. Check the number of allocations prior to know if we need to free something. Freeing a single list allocation is the same for both PRP and SGL usages, so we don't need to check the use_sgl flag anymore. Fixes: 01df742d8c5c0 ("nvme-pci: remove SGL segment descriptors") Reported-by: Niklas Schnelle Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig Tested-by: Niklas Schnelle commit 8b84475318641c2b89320859332544cf187e1cbd Author: Taehee Yoo Date: Fri Feb 10 18:15:41 2023 +0000 crypto: x86/aria-avx - Do not use avx2 instructions vpbroadcastb and vpbroadcastd are not AVX instructions. But the aria-avx assembly code contains these instructions. So, kernel panic will occur if the aria-avx works on AVX2 unsupported CPU. vbroadcastss, and vpshufb are used to avoid using vpbroadcastb in it. Unfortunately, this change reduces performance by about 5%. Also, vpbroadcastd is simply replaced by vmovdqa in it. Fixes: ba3579e6e45c ("crypto: aria-avx - add AES-NI/AVX/x86_64/GFNI assembler implementation of aria cipher") Reported-by: Herbert Xu Reported-by: Erhard F. Signed-off-by: Taehee Yoo Signed-off-by: Herbert Xu commit eb33108858b64ebc0f79a582123731c2585ae63b Author: Herbert Xu Date: Fri Feb 10 17:40:57 2023 +0800 crypto: aspeed - Fix modular aspeed-acry When aspeed-acry is enabled as a module it doesn't get built at all. Fix this by adding it to obj-m. Signed-off-by: Herbert Xu Reviewed-by: Neal Liu Signed-off-by: Herbert Xu commit ced18fd1794787d57acff1a4d1b2816d5ec99fbc Author: Weili Qian Date: Thu Feb 9 20:36:17 2023 +0800 crypto: hisilicon/qm - fix coding style issues 1. Remove extra blank lines. 2. Remove extra spaces. 3. Use spaces instead of tabs around '=' and '\', to ensure consistent coding styles. 4. Macros should be capital letters, change 'QM_SQC_VFT_NUM_MASK_v2' to 'QM_SQC_VFT_NUM_MASK_V2'. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit 9b4eb8f8b8eccc313663a99904dcfe2660c41b6c Author: Weili Qian Date: Thu Feb 9 20:36:16 2023 +0800 crypto: hisilicon/qm - update comments to match function The return values of some functions have been modified, but the comments have not been modified together. The comments must be updated to be consistent with the functions. Also move comments over the codes instead of right place to ensure consistent coding styles. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit ac80056f2e7bd80184312ccd91a40532eb95b811 Author: Weili Qian Date: Thu Feb 9 20:36:15 2023 +0800 crypto: hisilicon/qm - change function names The accelerator devices support multiple interrupts. To better reflect purpose of each interrupt function, change function name 'qm_irq' to 'qm_eq_irq' and 'do_qm_irq' to 'do_qm_eq_irq'. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit f8de067cbe05a43a3de5d8873cd63c17abb1c7c8 Author: Weili Qian Date: Thu Feb 9 20:36:14 2023 +0800 crypto: hisilicon/qm - use min() instead of min_t() 'act_q_num = min_t(int, act_q_num, max_qp_num)', the type of 'act_q_num' and 'max_qp_num' are both 'u32', so use min() instead of min_t(). Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit a292f2534fb2caec7f3ad32045338f8feac28112 Author: Weili Qian Date: Thu Feb 9 20:36:13 2023 +0800 crypto: hisilicon/qm - remove some unused defines 1. Remove some macros define since it is not used. 2. Remove enum QM_HW_UNKNOWN since it is not used. 3. Remove unused member 'is_frozen' in 'hisi_qm' structure. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit c43cc8823d56b1d34744581e42d6eeaca028f1ab Author: Herbert Xu Date: Thu Feb 9 09:16:45 2023 +0800 crypto: proc - Print fips status As FIPS may disable algorithms it is useful to show their status in /proc/crypto. Signed-off-by: Herbert Xu Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit bcdda4301bdc4955d45f7e1ffefb6207967b067e Author: Herbert Xu Date: Mon Feb 6 14:01:53 2023 +0800 crypto: crypto4xx - Call dma_unmap_page when done In crypto4xx_cipher_done, we should be unmapping the dst page, not mapping it. This was flagged by a sparse warning about the unused addr variable. While we're at it, also fix a sparse warning regarding the unused ctx variable in crypto4xx_ahash_done (by actually using it). Fixes: 049359d65527 ("crypto: amcc - Add crypt4xx driver") Signed-off-by: Herbert Xu Tested-by: Christian Lamparter Signed-off-by: Herbert Xu commit 72bc4e71dbeedee0a446bcbc37c9bb25449072b7 Author: Alexander Lobakin Date: Mon Feb 6 13:18:50 2023 +0800 crypto: octeontx2 - Fix objects shared between several modules cn10k_cpt.o, otx2_cptlf.o and otx2_cpt_mbox_common.o are linked into both rvu_cptpf and rvu_cptvf modules: > scripts/Makefile.build:252: ./drivers/crypto/marvell/octeontx2/Makefile: > cn10k_cpt.o is added to multiple modules: rvu_cptpf rvu_cptvf > scripts/Makefile.build:252: ./drivers/crypto/marvell/octeontx2/Makefile: > otx2_cptlf.o is added to multiple modules: rvu_cptpf rvu_cptvf > scripts/Makefile.build:252: ./drivers/crypto/marvell/octeontx2/Makefile: > otx2_cpt_mbox_common.o is added to multiple modules: rvu_cptpf rvu_cptvf Despite they're build under the same Kconfig option (CONFIG_CRYPTO_DEV_OCTEONTX2_CPT), it's better do link the common code into a standalone module and export the shared functions. Under certain circumstances, this can lead to the same situation as fixed by commit 637a642f5ca5 ("zstd: Fixing mixed module-builtin objects"). Plus, those three common object files are relatively big to duplicate them several times. Introduce the new module, rvu_cptcommon, to provide the common functions to both modules. Fixes: 19d8e8c7be15 ("crypto: octeontx2 - add virtual function driver support") Suggested-by: Masahiro Yamada Signed-off-by: Alexander Lobakin Reviewed-by: Masahiro Yamada Signed-off-by: Herbert Xu commit 6084466e761754815bea11d0fa67dbf79e2b0666 Author: Herbert Xu Date: Mon Feb 6 13:08:48 2023 +0800 crypto: nx - Fix sparse warnings This driver generates a large number of sparse warnings due to two issues. First of all the structure nx842_devdata is defined inline causing the __rcu tag to be added to all users of it. This easily fixed by splitting up the struct definition. The second issue is with kdoc markers being incomplete. The trivial case of nx842_exec_vas has been fixed, while the other incomplete documentation has simply been downgraded to normal C comments. Signed-off-by: Herbert Xu commit 5072b1c211107fca80b75f0ac0ca6f90e3385837 Author: Herbert Xu Date: Mon Feb 6 12:53:38 2023 +0800 crypto: ecc - Silence sparse warning Rewrite the bitwise operations to silence the sparse warnings: CHECK ../crypto/ecc.c ../crypto/ecc.c:1387:39: warning: dubious: !x | y ../crypto/ecc.c:1397:47: warning: dubious: !x | y Signed-off-by: Herbert Xu Reviewed-by: Vitaly Chikunov Signed-off-by: Herbert Xu commit ba38f3cbe7db2cec802c6d60e2bef57a3ff095a4 Author: Christian Marangi Date: Wed Feb 8 16:39:13 2023 +0100 dt-bindings: opp: opp-v2-kryo-cpu: enlarge opp-supported-hw maximum Enlarge opp-supported-hw maximum value. In recent SoC we started matching more bit and we currently match mask of 112. The old maximum of 7 was good for old SoC that didn't had complex id, but now this is limiting and we need to enlarge it to support more variants. Document all the various mask that can be used and limit them to only reasonable values instead of using a generic maximum limit. Signed-off-by: Christian Marangi Reviewed-by: Krzysztof Kozlowski Signed-off-by: Viresh Kumar commit 389de9c5a677c0d950528ee7d1871366ad2a6fd8 Author: Christian Marangi Date: Wed Feb 8 16:39:12 2023 +0100 dt-bindings: cpufreq: qcom-cpufreq-nvmem: make cpr bindings optional The qcom-cpufreq-nvmem driver supports 2 kind of devices: - pre-cpr that doesn't have power-domains and base everything on nvmem cells and multiple named microvolt bindings. Doesn't need required-opp binding in the opp nodes as they are only used for genpd based devices. - cpr-based that require power-domain in the cpu nodes and use various source to decide the correct voltage and freq Require required-opp binding since they need to be linked to the related opp-level. When the schema was introduced, it was wrongly set to always require these binding but this is not the case for pre-cpr devices. Make the power-domain and the required-opp optional and set them required only for qcs404 based devices. Signed-off-by: Christian Marangi Reviewed-by: Krzysztof Kozlowski Signed-off-by: Viresh Kumar commit 26e27f4e382f126d80e230df2a76d5f1c5a1ac42 Author: Christian Marangi Date: Wed Feb 8 16:39:11 2023 +0100 dt-bindings: cpufreq: qcom-cpufreq-nvmem: specify supported opp tables Add additional info on what opp tables the defined devices in this schema supports (operating-points-v2-kryo-cpu and operating-points-v2-qcom-level) and reference them. Signed-off-by: Christian Marangi Reviewed-by: Krzysztof Kozlowski Signed-off-by: Viresh Kumar commit 5dc3750e747f93f9bb7987da3d47a8ab4a5a181e Author: Daniel Bristot de Oliveira Date: Tue Feb 7 22:48:51 2023 +0100 Documentation/rtla: Add hwnoise man page Add a man page for the new rtla hwnoise tool, mostly based in the rtla osnoise top. Link: https://lkml.kernel.org/r/27088e0f42a6129e9b75f789d78adff4171f2e79.1675805361.git.bristot@kernel.org Signed-off-by: Daniel Bristot de Oliveira Reviewed-by: Bagas Sanjaya Cc: Daniel Bristot de Oliveira Cc: Juri Lelli Cc: Clark Williams Cc: Jonathan Corbet Signed-off-by: Steven Rostedt (Google) commit 1f428356c38dcbe49fd2f1c488b41e88720ead92 Author: Daniel Bristot de Oliveira Date: Tue Feb 7 22:48:50 2023 +0100 rtla: Add hwnoise tool The hwnoise tool is a special mode for the osnoise top tool. hwnoise dispatches the osnoise tracer and displays a summary of the noise. The difference is that it runs the tracer with the OSNOISE_IRQ_DISABLE option set, thus only allowing only hardware-related noise, resulting in a simplified output. hwnoise has the same features of osnoise. An example of the tool's output: # rtla hwnoise -c 1-11 -T 1 -d 10m -q Hardware-related Noise duration: 0 00:10:00 | time is in us CPU Period Runtime Noise % CPU Aval Max Noise Max Single HW NMI 1 #599 599000000 138 99.99997 3 3 4 74 2 #599 599000000 85 99.99998 3 3 4 75 3 #599 599000000 86 99.99998 4 3 6 75 4 #599 599000000 81 99.99998 4 4 2 75 5 #599 599000000 85 99.99998 2 2 2 75 Link: https://lkml.kernel.org/r/2d6f49a6f3a4f8b51b2c806458b1cff71ad4d014.1675805361.git.bristot@kernel.org Signed-off-by: Daniel Bristot de Oliveira Cc: Daniel Bristot de Oliveira Cc: Juri Lelli Cc: Clark Williams Cc: Bagas Sanjaya Cc: Jonathan Corbet Signed-off-by: Steven Rostedt (Google) commit 64816aa7683091cb5dbacaf9b355761961c8a657 Merge: 1a940b00013a4 545dbcd124b02 Author: Jakub Kicinski Date: Mon Feb 13 19:55:34 2023 -0800 Merge branch 'ipv6-more-drop-reason' Eric Dumazet says: ==================== ipv6: more drop reason Add more drop reasons to IPv6: - IPV6_BAD_EXTHDR - IPV6_NDISC_FRAG - IPV6_NDISC_HOP_LIMIT - IPV6_NDISC_BAD_CODE ==================== Link: https://lore.kernel.org/r/20230210184708.2172562-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 545dbcd124b02c9dc93c8a5894c71d682effc3e6 Author: Eric Dumazet Date: Fri Feb 10 18:47:08 2023 +0000 ipv6: icmp6: add drop reason support to ndisc_rcv() Creates three new drop reasons: SKB_DROP_REASON_IPV6_NDISC_FRAG: invalid frag (suppress_frag_ndisc). SKB_DROP_REASON_IPV6_NDISC_HOP_LIMIT: invalid hop limit. SKB_DROP_REASON_IPV6_NDISC_BAD_CODE: invalid NDISC icmp6 code. Signed-off-by: Eric Dumazet Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski commit 30c89bad3ea2ef7a2d4686f9c3cc08420fe627bc Author: Eric Dumazet Date: Fri Feb 10 18:47:07 2023 +0000 ipv6: icmp6: add drop reason support to icmpv6_notify() Accurately reports what happened in icmpv6_notify() when handling a packet. This makes use of the new IPV6_BAD_EXTHDR drop reason. Signed-off-by: Eric Dumazet Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski commit 1fb2d41501f38192d8a19da585cd441cf8845697 Author: Eric Dumazet Date: Fri Feb 10 18:47:06 2023 +0000 net: add pskb_may_pull_reason() helper pskb_may_pull() can fail for two different reasons. Provide pskb_may_pull_reason() helper to distinguish between these reasons. It returns: SKB_NOT_DROPPED_YET : Success SKB_DROP_REASON_PKT_TOO_SMALL : packet too small SKB_DROP_REASON_NOMEM : skb->head could not be resized Signed-off-by: Eric Dumazet Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski commit dc68eaf2c29f410fb078fd6da8e56201d3282e0b Author: Eric Dumazet Date: Fri Feb 10 18:47:05 2023 +0000 net: dropreason: add SKB_DROP_REASON_IPV6_BAD_EXTHDR This drop reason can be used whenever an IPv6 packet has a malformed extension header. Signed-off-by: Eric Dumazet Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski commit 1a940b00013a468c0c9dd79dbb485c3ad273939e Author: Uwe Kleine-König Date: Sat Feb 11 12:24:31 2023 +0100 net: stmmac: dwc-qos: Make struct dwc_eth_dwmac_data::remove return void All implementations of the remove callback return 0 unconditionally. So in dwc_eth_dwmac_remove() there is no error handling necessary. Simplify accordingly. This is a preparation for making struct platform_driver::remove return void, too. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230211112431.214252-2-u.kleine-koenig@pengutronix.de Signed-off-by: Jakub Kicinski commit ff0011cf56014b4dfe88adc35e36a25df63d5005 Author: Uwe Kleine-König Date: Sat Feb 11 12:24:30 2023 +0100 net: stmmac: Make stmmac_dvr_remove() return void The function returns zero unconditionally. Change it to return void instead which simplifies some callers as error handing becomes unnecessary. This also makes it more obvious that most platform remove callbacks always return zero. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230211112431.214252-1-u.kleine-koenig@pengutronix.de Signed-off-by: Jakub Kicinski commit 1dc55923296dee3eda1816bcf36be8ab064882e0 Author: Lorenzo Bianconi Date: Sun Feb 12 11:08:26 2023 +0100 net: mvneta: do not set xdp_features for hw buffer devices Devices with hardware buffer management do not support XDP, so do not set xdp_features for them. Fixes: 66c0e13ad236 ("drivers: net: turn on XDP features") Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/19b5838bb3e4515750af822edb2fa5e974d0a86b.1676196230.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski commit 450bdf5bd6c6b78372620da2c32c5a58ab0f124e Author: Lorenzo Bianconi Date: Sun Feb 12 10:57:58 2023 +0100 hv_netvsc: add missing NETDEV_XDP_ACT_NDO_XMIT xdp-features flag Add missing ndo_xdp_xmit bit to xdp_features capability flag. Fixes: 66c0e13ad236 ("drivers: net: turn on XDP features") Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/8e3747018f0fd0b5d6e6b9aefe8d9448ca3a3288.1676195726.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski commit c758fedf08025dd3d08768e8f04dbd9be70c83a3 Author: Lorenzo Bianconi Date: Sun Feb 12 10:54:43 2023 +0100 net: stmmac: add missing NETDEV_XDP_ACT_XSK_ZEROCOPY bit to xdp_features Add missing xsk zero-copy bit to xdp_features capability flag. Fixes: 66c0e13ad236 ("drivers: net: turn on XDP features") Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/c8949baafdf617188dcedb9033ce5a9ca6e9e5ff.1676195440.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski commit 511b88fedab459205693dc4bc2ad690fb0dd89ea Author: Christophe JAILLET Date: Sun Feb 12 07:51:51 2023 +0100 net: ethernet: mtk_wed: No need to clear memory after a dma_alloc_coherent() call dma_alloc_coherent() already clears the allocated memory, there is no need to explicitly call memset(). Moreover, it is likely that the size in the memset() is incorrect and should be "size * sizeof(*ring->desc)". Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/d5acce7dd108887832c9719f62c7201b4c83b3fb.1676184599.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski commit c8ea09974f33c5c516e63ee29d3e6d13ac4bb915 Merge: 6a3cd3318ff65 c31315c3aa092 Author: Alexei Starovoitov Date: Mon Feb 13 19:31:14 2023 -0800 Merge branch 'BPF rbtree next-gen datastructure' Dave Marchevsky says: ==================== This series adds a rbtree datastructure following the "next-gen datastructure" precedent set by recently-added linked-list [0]. This is a reimplementation of previous rbtree RFC [1] to use kfunc + kptr instead of adding a new map type. This series adds a smaller set of API functions than that RFC - just the minimum needed to support current cgfifo example scheduler in ongoing sched_ext effort [2], namely: bpf_rbtree_add bpf_rbtree_remove bpf_rbtree_first The meat of this series is bugfixes and verifier infra work to support these API functions. Adding more rbtree kfuncs in future patches should be straightforward as a result. First, the series refactors and extends linked_list's release_on_unlock logic. The concept of "reference to node that was added to data structure" is formalized as "non-owning reference". From linked_list's perspective this non-owning reference after linked_list_push_{front,back} has same semantics as release_on_unlock, with the addition of writes to such references being valid in the critical section. Such references are no longer marked PTR_UNTRUSTED. Patches 2 and 13 go into more detail. The series then adds rbtree API kfuncs and necessary verifier support for them - namely support for callback args to kfuncs and some non-owning reference interactions that linked_list didn't need. BPF rbtree uses struct rb_root_cached + existing rbtree lib under the hood. From the BPF program writer's perspective, a BPF rbtree is very similar to existing linked list. Consider the following example: struct node_data { long key; long data; struct bpf_rb_node node; } static bool less(struct bpf_rb_node *a, const struct bpf_rb_node *b) { struct node_data *node_a; struct node_data *node_b; node_a = container_of(a, struct node_data, node); node_b = container_of(b, struct node_data, node); return node_a->key < node_b->key; } private(A) struct bpf_spin_lock glock; private(A) struct bpf_rb_root groot __contains(node_data, node); /* ... in BPF program */ struct node_data *n, *m; struct bpf_rb_node *res; n = bpf_obj_new(typeof(*n)); if (!n) /* skip */ n->key = 5; n->data = 10; bpf_spin_lock(&glock); bpf_rbtree_add(&groot, &n->node, less); bpf_spin_unlock(&glock); bpf_spin_lock(&glock); res = bpf_rbtree_first(&groot); if (!res) /* skip */ res = bpf_rbtree_remove(&groot, res); if (!res) /* skip */ bpf_spin_unlock(&glock); m = container_of(res, struct node_data, node); bpf_obj_drop(m); Some obvious similarities: * Special bpf_rb_root and bpf_rb_node types have same semantics as bpf_list_head and bpf_list_node, respectively * __contains is used to associated node type with root * The spin_lock associated with a rbtree must be held when using rbtree API kfuncs * Nodes are allocated via bpf_obj_new and dropped via bpf_obj_drop * Rbtree takes ownership of node lifetime when a node is added. Removing a node gives ownership back to the program, requiring a bpf_obj_drop before program exit Some new additions as well: * Support for callbacks in kfunc args is added to enable 'less' callback use above * bpf_rbtree_first is the first graph API function to return a non-owning reference instead of convering an arg from own->non-own * Because all references to nodes already added to the rbtree are non-owning, bpf_rbtree_remove must accept such a reference in order to remove it from the tree Summary of patches: Patches 1 - 5 implement the meat of rbtree-specific support in this series, gradually building up to implemented kfuncs that verify as expected. Patch 6 adds the bpf_rbtree_{add,first,remove} to bpf_experimental.h. Patch 7 adds tests, Patch 9 adds documentation. [0]: lore.kernel.org/bpf/20221118015614.2013203-1-memxor@gmail.com [1]: lore.kernel.org/bpf/20220830172759.4069786-1-davemarchevsky@fb.com [2]: lore.kernel.org/bpf/20221130082313.3241517-1-tj@kernel.org Changelog: v5 -> v6: lore.kernel.org/bpf/20230212092715.1422619-1-davemarchevsky@fb.com/ Patch #'s below refer to the patch's number in v5 unless otherwise stated. * General / Patch 1 * Rebase onto latest bpf-next: "bpf: Migrate release_on_unlock logic to non-owning ref semantics" * This was Patch 1 of v4, was applied, not included in v6 * Patch 3 - "bpf: Add bpf_rbtree_{add,remove,first} kfuncs" * Use bpf_callback_t instead of plain-C fn ptr for bpf_rbtree_add. This necessitated having bpf_rbtree_add duplicate rbtree_add's functionality. Wrapper function was used w/ internal __bpf_rbtree_add helper so that bpf_experimental.h proto could continue to use plain-C fn ptr so BPF progs could benefit from typechecking (Alexei) v4 -> v5: lore.kernel.org/bpf/20230209174144.3280955-1-davemarchevsky@fb.com/ Patch #'s below refer to the patch's number in v4 unless otherwise stated. * General * Rebase onto latest bpf-next: "Merge branch 'bpf, mm: introduce cgroup.memory=nobpf'" * Patches 1-3 are squashed into "bpf: Migrate release_on_unlock logic to non-owning ref semantics". * Added type_is_non_owning_ref helper (Alexei) * Use a NON_OWN_REF type flag instead of separate bool (Alexei) * Patch 8 - "bpf: Special verifier handling for bpf_rbtree_{remove, first}" * When doing btf_parse_fields, reject structs with both bpf_list_node and bpf_rb_node fields. This is a temporary measure that can be removed after "collection identity" followup. See comment added in btf_parse_fields for more detail (Kumar, Alexei) * Add linked_list BTF test exercising check added to btf_parse_fields * Minor changes and moving around of some reg type checks due to NON_OWN_REF type flag introduction * Patch 10 - "selftests/bpf: Add rbtree selftests" * Migrate failure tests to RUN_TESTS, __failure, __msg() framework (Alexei) v3 -> v4: lore.kernel.org/bpf/20230131180016.3368305-1-davemarchevsky@fb.com/ Patch #'s below refer to the patch's number in v3 unless otherwise stated. * General * Don't base this series on "bpf: Refactor release_regno searching logic", which was submitted separately as a refactor. * Rebase onto latest bpf-next: "samples/bpf: Add openat2() enter/exit tracepoint to syscall_tp sample" * Patch 2 - "bpf: Improve bpf_reg_state space usage for non-owning ref lock" * print_verifier_state change was adding redundant comma after "non_own_ref", fix it to put comma in correct place * invalidate_non_owning_refs no longer needs to take bpf_active_lock param, since any non-owning ref reg in env's cur_state is assumed to use that state's active_lock (Alexei) * invalidate_non_owning_refs' reg loop should check that the reg being inspected is a PTR_TO_BTF_ID before checking reg->non_owning_ref_lock, since that field is part of a union and may be filled w/ meaningless bytes if reg != PTR_TO_BTF_ID (Alexei) * Patch 3 - "selftests/bpf: Update linked_list tests for non-owning ref semantics" * Change the string searched for by the following tests: * linked_list/incorrect_node_off1 * linked_list/double_push_front * linked_list/double_push_back necessary due to rebase / dropping of "release_regno searching logic" patch (see "General" changes) * Patch 8 - "bpf: Special verifier handling for bpf_rbtree_{remove, first}" * Just call invalidate_non_owning_refs w/ env instead of env, lock. (see Patch 2 changes) * Patch 11 - "bpf, documentation: Add graph documentation for non-owning refs" * Fix documentation formatting and improve content (David) * v3's version of patch 11 was missing some changes, v4's patch 11 is still addressing David's feedback from v2 v2 -> v3: lore.kernel.org/bpf/20221217082506.1570898-1-davemarchevsky@fb.com/ Patch #'s below refer to the patch's number in v2 unless otherwise stated. * Patch 1 - "bpf: Support multiple arg regs w/ ref_obj_id for kfuncs" * No longer needed as v3 doesn't have multiple ref_obj_id arg regs * The refactoring pieces were submitted separately (https://lore.kernel.org/bpf/20230121002417.1684602-1-davemarchevsky@fb.com/) * Patch 2 - "bpf: Migrate release_on_unlock logic to non-owning ref semantics" * Remove KF_RELEASE_NON_OWN flag from list API push methods, just match against specific kfuncs for now (Alexei, David) * Separate "release non owning reference" logic from KF_RELEASE logic (Alexei, David) * reg_find_field_offset now correctly tests 'rec' instead of 'reg' after calling reg_btf_record (Dan Carpenter) * New patch added after Patch 2 - "bpf: Improve bpf_reg_state space usage for non-owning ref lock" * Eliminates extra bpf_reg_state memory usage by using a bool instead of copying lock identity * Patch 4 - "bpf: rename list_head -> graph_root in field info types" * v2's version was applied to bpf-next, not including in respins * Patch 6 - "bpf: Add bpf_rbtree_{add,remove,first} kfuncs" * Remove KF_RELEASE_NON_OWN flag from rbtree_add, just add it to specific kfunc matching (Alexei, David) * Patch 9 - "bpf: Special verifier handling for bpf_rbtree_{remove, first}" * Remove KF_INVALIDATE_NON_OWN kfunc flag, just match against specific kfunc for now (Alexei, David) * Patch 11 - "libbpf: Make BTF mandatory if program BTF has spin_lock or alloc_obj type" * Drop for now, will submit separately * Patch 12 - "selftests/bpf: Add rbtree selftests" * Some expected-failure tests have different error messages due to "release non-owning reference logic" being separated from KF_RELEASE logic in Patch 2 changes * Patch 13 - "bpf, documentation: Add graph documentation for non-owning refs" * Fix documentation formatting and improve content (David) v1 -> v2: lore.kernel.org/bpf/20221206231000.3180914-1-davemarchevsky@fb.com/ Series-wide changes: * Rename datastructure_{head,node,api} -> graph_{root,node,api} (Alexei) * "graph datastructure" in patch summaries to refer to linked_list + rbtree instead of "next-gen datastructure" (Alexei) * Move from hacky marking of non-owning references as PTR_UNTRUSTED to cleaner implementation (Alexei) * Add invalidation of non-owning refs to rbtree_remove (Kumar, Alexei) Patch #'s below refer to the patch's number in v1 unless otherwise stated. Note that in v1 most of the meaty verifier changes were in the latter half of the series. Here, about half of that complexity has been moved to "bpf: Migrate release_on_unlock logic to non-owning ref semantics" - was Patch 3 in v1. * Patch 1 - "bpf: Loosen alloc obj test in verifier's reg_btf_record" * Was applied, dropped from further iterations * Patch 2 - "bpf: map_check_btf should fail if btf_parse_fields fails" * Dropped in favor of verifier check-on-use: when some normal verifier checking expects the map to have btf_fields correctly parsed, it won't find any and verification will fail * New patch added before Patch 3 - "bpf: Support multiple arg regs w/ ref_obj_id for kfuncs" * Addition of KF_RELEASE_NON_OWN flag, which requires KF_RELEASE, and tagging of bpf_list_push_{front,back} KF_RELEASE | KF_RELEASE_NON_OWN, means that list-in-list push_{front,back} will trigger "only one ref_obj_id arg reg" logic. This is because "head" arg to those functions can be a list-in-list, which itself can be an owning reference with ref_obj_id. So need to support multiple ref_obj_id for release kfuncs. * Patch 3 - "bpf: Minor refactor of ref_set_release_on_unlock" * Now a major refactor w/ a rename to reflect this * "bpf: Migrate release_on_unlock logic to non-owning ref semantics" * Replaces release_on_unlock with active_lock logic as discussed in v1 * New patch added after Patch 3 - "selftests/bpf: Update linked_list tests for non_owning_ref logic" * Removes "write after push" linked_list failure tests - no longer failure scenarios. * Patch 4 - "bpf: rename list_head -> datastructure_head in field info types" * rename to graph_root instead. Similar renamings across the series - see series-wide changes. * Patch 5 - "bpf: Add basic bpf_rb_{root,node} support" * OWNER_FIELD_MASK -> GRAPH_ROOT_MASK, OWNEE_FIELD_MASK -> GRAPH_NODE_MASK, and change of "owner"/"ownee" in big btf_check_and_fixup_fields comment to "root"/"node" (Alexei) * Patch 6 - "bpf: Add bpf_rbtree_{add,remove,first} kfuncs" * bpf_rbtree_remove can no longer return NULL. v2 continues v1's "use type system to prevent remove of node that isn't in a datastructure" approach, so rbtree_remove should never have been able to return NULL * Patch 7 - "bpf: Add support for bpf_rb_root and bpf_rb_node in kfunc args" * is_bpf_datastructure_api_kfunc -> is_bpf_graph_api_kfunc (Alexei) * Patch 8 - "bpf: Add callback validation to kfunc verifier logic" * Explicitly disallow rbtree_remove in rbtree callback * Explicitly disallow bpf_spin_{lock,unlock} call in rbtree callback, preventing possibility of "unbalanced" unlock (Alexei) * Patch 10 - "bpf, x86: BPF_PROBE_MEM handling for insn->off < 0" * Now that non-owning refs aren't marked PTR_UNTRUSTED it's not necessary to include this patch as part of the series * After conversation w/ Alexei, did another pass and submitted as an independent series (lore.kernel.org/bpf/20221213182726.325137-1-davemarchevsky@fb.com/) * Patch 13 - "selftests/bpf: Add rbtree selftests" * Since bpf_rbtree_remove can no longer return null, remove null checks * Remove test confirming that rbtree_first isn't allowed in callback. We want this to be possible * Add failure test confirming that rbtree_remove's new non-owning reference invalidation behavior behaves as expected * Add SEC("license") to rbtree_btf_fail__* progs. They were previously failing due to lack of this section. Now they're failing for correct reasons. * rbtree_btf_fail__add_wrong_type.c - add locking around rbtree_add, rename the bpf prog to something reasonable * New patch added after patch 13 - "bpf, documentation: Add graph documentation for non-owning refs" * Summarizes details of owning and non-owning refs which we hashed out in v1 ==================== Signed-off-by: Alexei Starovoitov commit c31315c3aa09297d99cb39e837185ef225586d2b Author: Dave Marchevsky Date: Mon Feb 13 16:40:17 2023 -0800 bpf, documentation: Add graph documentation for non-owning refs It is difficult to intuit the semantics of owning and non-owning references from verifier code. In order to keep the high-level details from being lost in the mailing list, this patch adds documentation explaining semantics and details. The target audience of doc added in this patch is folks working on BPF internals, as there's focus on "what should the verifier do here". Via reorganization or copy-and-paste, much of the content can probably be repurposed for BPF program writer audience as well. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230214004017.2534011-9-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit 215249f6adc0359e3546829e7ee622b5e309b0ad Author: Dave Marchevsky Date: Mon Feb 13 16:40:16 2023 -0800 selftests/bpf: Add rbtree selftests This patch adds selftests exercising the logic changed/added in the previous patches in the series. A variety of successful and unsuccessful rbtree usages are validated: Success: * Add some nodes, let map_value bpf_rbtree_root destructor clean them up * Add some nodes, remove one using the non-owning ref leftover by successful rbtree_add() call * Add some nodes, remove one using the non-owning ref returned by rbtree_first() call Failure: * BTF where bpf_rb_root owns bpf_list_node should fail to load * BTF where node of type X is added to tree containing nodes of type Y should fail to load * No calling rbtree api functions in 'less' callback for rbtree_add * No releasing lock in 'less' callback for rbtree_add * No removing a node which hasn't been added to any tree * No adding a node which has already been added to a tree * No escaping of non-owning references past their lock's critical section * No escaping of non-owning references past other invalidation points (rbtree_remove) These tests mostly focus on rbtree-specific additions, but some of the failure cases revalidate scenarios common to both linked_list and rbtree which are covered in the former's tests. Better to be a bit redundant in case linked_list and rbtree semantics deviate over time. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230214004017.2534011-8-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit c834df847ee60eeb678171eb0f1e59f611c62a99 Author: Dave Marchevsky Date: Mon Feb 13 16:40:15 2023 -0800 bpf: Add bpf_rbtree_{add,remove,first} decls to bpf_experimental.h These kfuncs will be used by selftests in following patches Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230214004017.2534011-7-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit a40d3632436b1677a94c16e77be8da798ee9e12b Author: Dave Marchevsky Date: Mon Feb 13 16:40:14 2023 -0800 bpf: Special verifier handling for bpf_rbtree_{remove, first} Newly-added bpf_rbtree_{remove,first} kfuncs have some special properties that require handling in the verifier: * both bpf_rbtree_remove and bpf_rbtree_first return the type containing the bpf_rb_node field, with the offset set to that field's offset, instead of a struct bpf_rb_node * * mark_reg_graph_node helper added in previous patch generalizes this logic, use it * bpf_rbtree_remove's node input is a node that's been inserted in the tree - a non-owning reference. * bpf_rbtree_remove must invalidate non-owning references in order to avoid aliasing issue. Use previously-added invalidate_non_owning_refs helper to mark this function as a non-owning ref invalidation point. * Unlike other functions, which convert one of their input arg regs to non-owning reference, bpf_rbtree_first takes no arguments and just returns a non-owning reference (possibly null) * For now verifier logic for this is special-cased instead of adding new kfunc flag. This patch, along with the previous one, complete special verifier handling for all rbtree API functions added in this series. With functional verifier handling of rbtree_remove, under current non-owning reference scheme, a node type with both bpf_{list,rb}_node fields could cause the verifier to accept programs which remove such nodes from collections they haven't been added to. In order to prevent this, this patch adds a check to btf_parse_fields which rejects structs with both bpf_{list,rb}_node fields. This is a temporary measure that can be removed after "collection identity" followup. See comment added in btf_parse_fields. A linked_list BTF test exercising the new check is added in this patch as well. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230214004017.2534011-6-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit 5d92ddc3de1b44a82108af68ed71f638ca20509a Author: Dave Marchevsky Date: Mon Feb 13 16:40:13 2023 -0800 bpf: Add callback validation to kfunc verifier logic Some BPF helpers take a callback function which the helper calls. For each helper that takes such a callback, there's a special call to __check_func_call with a callback-state-setting callback that sets up verifier bpf_func_state for the callback's frame. kfuncs don't have any of this infrastructure yet, so let's add it in this patch, following existing helper pattern as much as possible. To validate functionality of this added plumbing, this patch adds callback handling for the bpf_rbtree_add kfunc and hopes to lay groundwork for future graph datastructure callbacks. In the "general plumbing" category we have: * check_kfunc_call doing callback verification right before clearing CALLER_SAVED_REGS, exactly like check_helper_call * recognition of func_ptr BTF types in kfunc args as KF_ARG_PTR_TO_CALLBACK + propagation of subprogno for this arg type In the "rbtree_add / graph datastructure-specific plumbing" category: * Since bpf_rbtree_add must be called while the spin_lock associated with the tree is held, don't complain when callback's func_state doesn't unlock it by frame exit * Mark rbtree_add callback's args with ref_set_non_owning to prevent rbtree api functions from being called in the callback. Semantically this makes sense, as less() takes no ownership of its args when determining which comes first. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230214004017.2534011-5-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit cd6791b4b6f66f6b7925c840efe5c8fa0ce1ac87 Author: Dave Marchevsky Date: Mon Feb 13 16:40:12 2023 -0800 bpf: Add support for bpf_rb_root and bpf_rb_node in kfunc args Now that we find bpf_rb_root and bpf_rb_node in structs, let's give args that contain those types special classification and properly handle these types when checking kfunc args. "Properly handling" these types largely requires generalizing similar handling for bpf_list_{head,node}, with little new logic added in this patch. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230214004017.2534011-4-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit bd1279ae8a691d7ec75852c6d0a22139afb034a4 Author: Dave Marchevsky Date: Mon Feb 13 16:40:11 2023 -0800 bpf: Add bpf_rbtree_{add,remove,first} kfuncs This patch adds implementations of bpf_rbtree_{add,remove,first} and teaches verifier about their BTF_IDs as well as those of bpf_rb_{root,node}. All three kfuncs have some nonstandard component to their verification that needs to be addressed in future patches before programs can properly use them: * bpf_rbtree_add: Takes 'less' callback, need to verify it * bpf_rbtree_first: Returns ptr_to_node_type(off=rb_node_off) instead of ptr_to_rb_node(off=0). Return value ref is non-owning. * bpf_rbtree_remove: Returns ptr_to_node_type(off=rb_node_off) instead of ptr_to_rb_node(off=0). 2nd arg (node) is a non-owning reference. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230214004017.2534011-3-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit 9c395c1b99bd23f74bc628fa000480c49593d17f Author: Dave Marchevsky Date: Mon Feb 13 16:40:10 2023 -0800 bpf: Add basic bpf_rb_{root,node} support This patch adds special BPF_RB_{ROOT,NODE} btf_field_types similar to BPF_LIST_{HEAD,NODE}, adds the necessary plumbing to detect the new types, and adds bpf_rb_root_free function for freeing bpf_rb_root in map_values. structs bpf_rb_root and bpf_rb_node are opaque types meant to obscure structs rb_root_cached rb_node, respectively. btf_struct_access will prevent BPF programs from touching these special fields automatically now that they're recognized. btf_check_and_fixup_fields now groups list_head and rb_root together as "graph root" fields and {list,rb}_node as "graph node", and does same ownership cycle checking as before. Note that this function does _not_ prevent ownership type mixups (e.g. rb_root owning list_node) - that's handled by btf_parse_graph_root. After this patch, a bpf program can have a struct bpf_rb_root in a map_value, but not add anything to nor do anything useful with it. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230214004017.2534011-2-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit ef01749f6a0d3d77e18488263fa920c49a001bfb Author: Lorenzo Bianconi Date: Fri Feb 10 20:06:04 2023 +0100 net: lan966x: set xdp_features flag Set xdp_features netdevice flag if lan966x nic supports xdp mode. Signed-off-by: Lorenzo Bianconi Reviewed-by: Horatiu Vultur Link: https://lore.kernel.org/r/01f4412f28899d97b0054c9c1a63694201301b42.1676055718.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski commit f57aec443c24d2e8e1f3b5b4856aea12ddda4254 Author: Dan Williams Date: Mon Feb 13 17:01:05 2023 -0800 cxl/pmem: Fix nvdimm registration races A loop of the form: while true; do modprobe cxl_pci; modprobe -r cxl_pci; done ...fails with the following crash signature: BUG: kernel NULL pointer dereference, address: 0000000000000040 [..] RIP: 0010:cxl_internal_send_cmd+0x5/0xb0 [cxl_core] [..] Call Trace: cxl_pmem_ctl+0x121/0x240 [cxl_pmem] nvdimm_get_config_data+0xd6/0x1a0 [libnvdimm] nd_label_data_init+0x135/0x7e0 [libnvdimm] nvdimm_probe+0xd6/0x1c0 [libnvdimm] nvdimm_bus_probe+0x7a/0x1e0 [libnvdimm] really_probe+0xde/0x380 __driver_probe_device+0x78/0x170 driver_probe_device+0x1f/0x90 __device_attach_driver+0x85/0x110 bus_for_each_drv+0x7d/0xc0 __device_attach+0xb4/0x1e0 bus_probe_device+0x9f/0xc0 device_add+0x445/0x9c0 nd_async_device_register+0xe/0x40 [libnvdimm] async_run_entry_fn+0x30/0x130 ...namely that the bottom half of async nvdimm device registration runs after the CXL has already torn down the context that cxl_pmem_ctl() needs. Unlike the ACPI NFIT case that benefits from launching multiple nvdimm device registrations in parallel from those listed in the table, CXL is already marked PROBE_PREFER_ASYNCHRONOUS. So provide for a synchronous registration path to preclude this scenario. Fixes: 21083f51521f ("cxl/pmem: Register 'pmem' / cxl_nvdimm devices") Cc: Reported-by: Dave Jiang Signed-off-by: Dan Williams commit a2b9b123ccac913e9f9b80337d687a2fe786a634 Author: Mengyuan Lou Date: Tue Feb 7 18:24:19 2023 +0800 PCI: Add ACS quirk for Wangxun NICs Wangxun has verified there is no peer-to-peer between functions for the below selection of SFxxx, RP1000 and RP2000 NICS. They may be multi-function devices, but the hardware does not advertise ACS capability. Add an ACS quirk for these devices so the functions can be in independent IOMMU groups. Link: https://lore.kernel.org/r/20230207102419.44326-1-mengyuanlou@net-swift.com Signed-off-by: Mengyuan Lou Signed-off-by: Bjorn Helgaas commit 6bdfc60cf0f9771d592a006dcd2cf6e40e1ccd79 Author: Jakub Wilk Date: Fri Feb 10 21:33:16 2023 +0100 mm: fix typo in __vm_enough_memory warning Link: https://lkml.kernel.org/r/20230210203316.5613-1-jwilk@jwilk.net Signed-off-by: Jakub Wilk Acked-by: Mike Rapoport (IBM) Cc: Kefeng Wang Signed-off-by: Andrew Morton commit 620932cd285208ef3009ac338b1eeed13ccd1753 Author: SeongJae Park Date: Thu Feb 9 19:20:09 2023 +0000 mm/damon/dbgfs: print DAMON debugfs interface deprecation message DAMON debugfs interface has announced to be deprecated after >v5.15 LTS kernel is released. And, v6.1.y has announced to be an LTS[1]. Though the announcement was there for a while, some people might not noticed that so far. Also, some users could depend on it and have problems at movng to the alternative (DAMON sysfs interface). For such cases, warn DAMON debugfs interface deprecation with contacts to ask helps when any DAMON debugfs interface file is opened. [1] https://git.kernel.org/pub/scm/docs/kernel/website.git/commit/?id=332e9121320bc7461b2d3a79665caf153e51732c [sj@kernel.org: split DAMON debugfs file open warning message, per Randy] Link: https://lkml.kernel.org/r/20230209192009.7885-4-sj@kernel.org Link: https://lkml.kernel.org/r/20230210044838.63723-4-sj@kernel.org Link: https://lkml.kernel.org/r/20230209192009.7885-4-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit 61e88a2f66580d7488bbf7454423c81886d2e8cd Author: SeongJae Park Date: Thu Feb 9 19:20:08 2023 +0000 mm/damon/Kconfig: add DAMON debugfs interface deprecation notice DAMON debugfs interface has announced to be deprecated after >v5.15 LTS kernel is released. And, v6.1.y has announced to be an LTS[1]. Though the announcement was there for a while, some people might not noticed that so far. Also, some users could depend on it and have problems at movng to the alternative (DAMON sysfs interface). For such cases, note DAMON debugfs interface as deprecated, and contacts to ask helps on the Kconfig. [1] https://git.kernel.org/pub/scm/docs/kernel/website.git/commit/?id=332e9121320bc7461b2d3a79665caf153e51732c Link: https://lkml.kernel.org/r/20230209192009.7885-3-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit 5445fcbc4cda770cd07f49624704fabcc284d563 Author: SeongJae Park Date: Thu Feb 9 19:20:07 2023 +0000 Docs/admin-guide/mm/damon/usage: add DAMON debugfs interface deprecation notice Patch series "mm/damon: deprecate DAMON debugfs interface". DAMON debugfs interface has announced to be deprecated after >v5.15 LTS kernel is released. And v6.1.y has been announced to be an LTS[1]. Though the announcement was there for a while, some people might not have noticed that so far. Also, some users could depend on it and have problems at movng to the alternative (DAMON sysfs interface). For such cases, keep the code and documents with warning messages and contacts to ask helps for the deprecation. [1] https://git.kernel.org/pub/scm/docs/kernel/website.git/commit/?id=332e9121320bc7461b2d3a79665caf153e51732c This patch (of 3): DAMON debugfs interface has announced to be deprecated after >v5.15 LTS kernel is released. And, v6.1.y has announced to be an LTS[1]. Though the announcement was there for a while, some people might not noticed that so far. Also, some users could depend on it and have problems at movng to the alternative (DAMON sysfs interface). For such cases, note DAMON debugfs interface as deprecated, and contacts to ask helps on the document. [1] https://git.kernel.org/pub/scm/docs/kernel/website.git/commit/?id=332e9121320bc7461b2d3a79665caf153e51732c Link: https://lkml.kernel.org/r/20230209192009.7885-1-sj@kernel.org Link: https://lkml.kernel.org/r/20230209192009.7885-2-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit 280d724ac20f9cc463d4ab8e2269f598476b070f Author: Vishal Moola (Oracle) Date: Mon Jan 30 13:43:52 2023 -0800 mm/migrate: convert putback_movable_pages() to use folios Removes 6 calls to compound_head(), and replaces putback_movable_page() with putback_movable_folio() as well. Link: https://lkml.kernel.org/r/20230130214352.40538-5-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit 19979497c02a365ed9d8276b5f4cc36557a13ced Author: Vishal Moola (Oracle) Date: Mon Jan 30 13:43:51 2023 -0800 mm/migrate: convert isolate_movable_page() to use folios Removes 6 calls to compound_head() and prepares the function to take in a folio instead of page argument. Link: https://lkml.kernel.org/r/20230130214352.40538-4-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit da707a6d184a8a6ef0b756c3ba49888fec223793 Author: Vishal Moola (Oracle) Date: Mon Jan 30 13:43:50 2023 -0800 mm/migrate: add folio_movable_ops() folio_movable_ops() does the same as page_movable_ops() except uses folios instead of pages. This function will help make folio conversions in migrate.c more readable. Link: https://lkml.kernel.org/r/20230130214352.40538-3-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit 3c1ea2c729ef8ef07bcb80d01ab2ead45b3406dd Author: Vishal Moola (Oracle) Date: Mon Jan 30 13:43:49 2023 -0800 mm: add folio_get_nontail_page() Patch series "Convert a couple migrate functions to use folios", v2. This patchset introduces folio_movable_ops() and converts 3 functions in mm/migrate.c to use folios. It also introduces folio_get_nontail_page() for folio conversions which may want to distinguish between head and tail pages. This patch (of 4): folio_get_nontail_page() returns the folio associated with a head page. This is necessary for folio conversions where the behavior of that function differs between head pages and tail pages. Link: https://lkml.kernel.org/r/20230130214352.40538-1-vishal.moola@gmail.com Link: https://lkml.kernel.org/r/20230130214352.40538-2-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit 4a64981dfee9119aa2c1f243b48f34cbbd67779c Author: Vishal Moola (Oracle) Date: Mon Jan 30 12:18:33 2023 -0800 mm/mempolicy: convert migrate_page_add() to migrate_folio_add() Replace migrate_page_add() with migrate_folio_add(). migrate_folio_add() does the same a migrate_page_add() but takes in a folio instead of a page. This removes a couple of calls to compound_head(). Link: https://lkml.kernel.org/r/20230130201833.27042-7-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Reviewed-by: Yin Fengwei Cc: David Hildenbrand Cc: Jane Chu Signed-off-by: Andrew Morton commit d451b89dcd183da725eda84dfb8a46c0b32a4234 Author: Vishal Moola (Oracle) Date: Mon Jan 30 12:18:32 2023 -0800 mm/mempolicy: convert queue_pages_required() to queue_folio_required() Replace queue_pages_required() with queue_folio_required(). queue_folio_required() does the same as queue_pages_required(), except takes in a folio instead of a page. Link: https://lkml.kernel.org/r/20230130201833.27042-6-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Cc: David Hildenbrand Cc: Jane Chu Cc: "Yin, Fengwei" Signed-off-by: Andrew Morton commit 0a2c1e8183163a31fe8c9838f3108aacf9c05c4a Author: Vishal Moola (Oracle) Date: Mon Jan 30 12:18:31 2023 -0800 mm/mempolicy: convert queue_pages_hugetlb() to queue_folios_hugetlb() This change is in preparation for the conversion of queue_pages_required() to queue_folio_required() and migrate_page_add() to migrate_folio_add(). Link: https://lkml.kernel.org/r/20230130201833.27042-5-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Cc: David Hildenbrand Cc: Jane Chu Cc: "Yin, Fengwei" Signed-off-by: Andrew Morton commit 3dae02bbd07f40e37bbfec2d77119628db461eaa Author: Vishal Moola (Oracle) Date: Mon Jan 30 12:18:30 2023 -0800 mm/mempolicy: convert queue_pages_pte_range() to queue_folios_pte_range() This function now operates on folios associated with ptes instead of pages. This change is in preparation for the conversion of queue_pages_required() to queue_folio_required() and migrate_page_add() to migrate_folio_add(). Link: https://lkml.kernel.org/r/20230130201833.27042-4-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Cc: David Hildenbrand Cc: Jane Chu Cc: "Yin, Fengwei" Signed-off-by: Andrew Morton commit de1f5055523e9a035b38533f25a56df03d45034a Author: Vishal Moola (Oracle) Date: Mon Jan 30 12:18:29 2023 -0800 mm/mempolicy: convert queue_pages_pmd() to queue_folios_pmd() The function now operates on a folio instead of the page associated with a pmd. This change is in preparation for the conversion of queue_pages_required() to queue_folio_required() and migrate_page_add() to migrate_folio_add(). Link: https://lkml.kernel.org/r/20230130201833.27042-3-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Cc: David Hildenbrand Cc: Jane Chu Cc: "Yin, Fengwei" Signed-off-by: Andrew Morton commit fa4e3f5ffa5e6e22f751d289c9afa502dda30b8d Author: Vishal Moola (Oracle) Date: Mon Jan 30 12:18:28 2023 -0800 mm: add folio_estimated_sharers() Patch series "Convert various mempolicy.c functions to use folios", v4. This patch series converts migrate_page_add() and queue_pages_required() to migrate_folio_add() and queue_page_required(). It also converts the callers of the functions to use folios as well, and introduces a helper function to estimate the number of sharers of a folio. This patch (of 6): folio_estimated_sharers() takes in a folio and returns the precise number of times the first subpage of the folio is mapped. This function aims to provide an estimate for the number of sharers of a folio. This is necessary for folio conversions where we care about the number of processes that share a folio, but don't necessarily want to check every single page within that folio. This is in contrast to folio_mapcount() which calculates the total number of the times a folio and all its subpages are mapped. Link: https://lkml.kernel.org/r/20230130201833.27042-1-vishal.moola@gmail.com Link: https://lkml.kernel.org/r/20230130201833.27042-2-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Reviewed-by: Yin Fengwei Acked-by: David Hildenbrand Cc: Jane Chu Signed-off-by: Andrew Morton commit 192a50220342f82826812d0032a82fe441e924e2 Author: Sidhartha Kumar Date: Wed Jan 25 09:05:37 2023 -0800 Documentation/mm: update hugetlbfs documentation to mention alloc_hugetlb_folio Link: https://lkml.kernel.org/r/20230125170537.96973-9-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Cc: Gerald Schaefer Cc: John Hubbard Cc: Matthew Wilcox Cc: Mike Kravetz Cc: Muchun Song Signed-off-by: Andrew Morton commit 371607a3c793d7183b0faecc1fb4aa88fadcf202 Author: Sidhartha Kumar Date: Wed Jan 25 09:05:36 2023 -0800 mm/hugetlb: convert hugetlb_wp() to take in a folio Change the pagecache_page argument of hugetlb_wp to pagecache_folio. Replaces a call to find_lock_page() with filemap_lock_folio(). Link: https://lkml.kernel.org/r/20230125170537.96973-8-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reported-by: gerald.schaefer@linux.ibm.com Cc: John Hubbard Cc: Matthew Wilcox Cc: Mike Kravetz Cc: Muchun Song Signed-off-by: Andrew Morton commit 9b91c0e277a3dbb165c2e4301be7a231dc2f76f7 Author: Sidhartha Kumar Date: Wed Jan 25 09:05:35 2023 -0800 mm/hugetlb: convert hugetlb_add_to_page_cache to take in a folio Every caller of hugetlb_add_to_page_cache() is now passing in &folio->page, change the function to take in a folio directly and clean up the call sites. Link: https://lkml.kernel.org/r/20230125170537.96973-7-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Cc: Gerald Schaefer Cc: John Hubbard Cc: Matthew Wilcox Cc: Mike Kravetz Cc: Muchun Song Signed-off-by: Andrew Morton commit d2d7bb44bfbd29200426ba17741550d36e081f91 Author: Sidhartha Kumar Date: Wed Jan 25 09:05:34 2023 -0800 mm/hugetlb: convert restore_reserve_on_error to take in a folio Every caller of restore_reserve_on_error() is now passing in &folio->page, change the function to take in a folio directly and clean up the call sites. Link: https://lkml.kernel.org/r/20230125170537.96973-6-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Cc: Gerald Schaefer Cc: John Hubbard Cc: Matthew Wilcox Cc: Mike Kravetz Cc: Muchun Song Signed-off-by: Andrew Morton commit d0ce0e47b323a8d7fb5dc3314ce56afa650ade2d Author: Sidhartha Kumar Date: Wed Jan 25 09:05:33 2023 -0800 mm/hugetlb: convert hugetlb fault paths to use alloc_hugetlb_folio() Change alloc_huge_page() to alloc_hugetlb_folio() by changing all callers to handle the now folio return type of the function. In this conversion, alloc_huge_page_vma() is also changed to alloc_hugetlb_folio_vma() and hugepage_add_new_anon_rmap() is changed to take in a folio directly. Many additions of '&folio->page' are cleaned up in subsequent patches. hugetlbfs_fallocate() is also refactored to use the RCU + page_cache_next_miss() API. Link: https://lkml.kernel.org/r/20230125170537.96973-5-sidhartha.kumar@oracle.com Suggested-by: Mike Kravetz Reported-by: kernel test robot Signed-off-by: Sidhartha Kumar Cc: Gerald Schaefer Cc: John Hubbard Cc: Matthew Wilcox Cc: Muchun Song Signed-off-by: Andrew Morton commit ea8e72f4116a995c2aba3fb738ac372c4115375a Author: Sidhartha Kumar Date: Wed Jan 25 09:05:32 2023 -0800 mm/hugetlb: convert putback_active_hugepage to take in a folio Convert putback_active_hugepage() to folio_putback_active_hugetlb(), this removes one user of the Huge Page macros which take in a page. The callers in migrate.c are also cleaned up by being able to directly use the src and dst folio variables. Link: https://lkml.kernel.org/r/20230125170537.96973-4-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Cc: Gerald Schaefer Cc: John Hubbard Cc: Matthew Wilcox Cc: Muchun Song Signed-off-by: Andrew Morton commit 91a2fb956ad993f3cbcfc632611e17e3699fb652 Author: Sidhartha Kumar Date: Wed Jan 25 09:05:31 2023 -0800 mm/hugetlb: convert hugetlbfs_pagecache_present() to folios Refactor hugetlbfs_pagecache_present() to avoid getting and dropping a refcount on a page. Use RCU and page_cache_next_miss() instead. Link: https://lkml.kernel.org/r/20230125170537.96973-3-sidhartha.kumar@oracle.com Suggested-by: Matthew Wilcox Signed-off-by: Sidhartha Kumar Cc: Gerald Schaefer Cc: John Hubbard Cc: kernel test robot Cc: Mike Kravetz Cc: Muchun Song Signed-off-by: Andrew Morton commit ea4c353df37750d170dc0dcbfa8c47c984779733 Author: Sidhartha Kumar Date: Wed Jan 25 09:05:30 2023 -0800 mm/hugetlb: convert hugetlb_install_page to folios Patch series "convert hugetlb fault functions to folios", v2. This series converts the hugetlb page faulting functions to operate on folios. These include hugetlb_no_page(), hugetlb_wp(), copy_hugetlb_page_range(), and hugetlb_mcopy_atomic_pte(). This patch (of 8): Change hugetlb_install_page() to hugetlb_install_folio(). This reduces one user of the Huge Page flag macros which take in a page. Link: https://lkml.kernel.org/r/20230125170537.96973-1-sidhartha.kumar@oracle.com Link: https://lkml.kernel.org/r/20230125170537.96973-2-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Cc: Gerald Schaefer Cc: John Hubbard Cc: Matthew Wilcox Cc: Muchun Song Signed-off-by: Andrew Morton commit bdd7be075acb650cc57d8ee752b5375b966ad07e Author: Sidhartha Kumar Date: Fri Jan 13 16:30:57 2023 -0600 mm/hugetlb: convert demote_free_huge_page to folios Change demote_free_huge_page to demote_free_hugetlb_folio() and change demote_pool_huge_page() pass in a folio. Link: https://lkml.kernel.org/r/20230113223057.173292-9-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Cc: John Hubbard Cc: Matthew Wilcox Cc: Mike Kravetz Cc: Muchun Song Signed-off-by: Andrew Morton commit 0ffdc38eb564c1c71a58bbaf874945ba54293ff9 Author: Sidhartha Kumar Date: Fri Jan 13 16:30:56 2023 -0600 mm/hugetlb: convert restore_reserve_on_error() to folios Use the hugetlb folio flag macros inside restore_reserve_on_error() and update the comments to reflect the use of folios. Link: https://lkml.kernel.org/r/20230113223057.173292-8-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Cc: John Hubbard Cc: Matthew Wilcox Cc: Muchun Song Signed-off-by: Andrew Morton commit e37d3e838d9078538f920957d1e89682b6764977 Author: Sidhartha Kumar Date: Fri Jan 13 16:30:55 2023 -0600 mm/hugetlb: convert alloc_migrate_huge_page to folios Change alloc_huge_page_nodemask() to alloc_hugetlb_folio_nodemask() and alloc_migrate_huge_page() to alloc_migrate_hugetlb_folio(). Both functions now return a folio rather than a page. Link: https://lkml.kernel.org/r/20230113223057.173292-7-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Cc: John Hubbard Cc: Matthew Wilcox Cc: Muchun Song Signed-off-by: Andrew Morton commit ff7d853b031302376a0d3640fa1c463d94079637 Author: Sidhartha Kumar Date: Fri Jan 13 16:30:54 2023 -0600 mm/hugetlb: increase use of folios in alloc_huge_page() Change hugetlb_cgroup_commit_charge{,_rsvd}(), dequeue_huge_page_vma() and alloc_buddy_huge_page_with_mpol() to use folios so alloc_huge_page() is cleaned by operating on folios until its return. Link: https://lkml.kernel.org/r/20230113223057.173292-6-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Cc: John Hubbard Cc: Matthew Wilcox Cc: Muchun Song Signed-off-by: Andrew Morton commit 3a740e8bb56ef7ee6b9098b694caabab843be067 Author: Sidhartha Kumar Date: Fri Jan 13 16:30:53 2023 -0600 mm/hugetlb: convert alloc_surplus_huge_page() to folios Change alloc_surplus_huge_page() to alloc_surplus_hugetlb_folio() and update its callers. Link: https://lkml.kernel.org/r/20230113223057.173292-5-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Cc: John Hubbard Cc: Matthew Wilcox Cc: Muchun Song Signed-off-by: Andrew Morton commit a36f1e9024740c3820427afca4cd375e32a1bb15 Author: Sidhartha Kumar Date: Fri Jan 13 16:30:52 2023 -0600 mm/hugetlb: convert dequeue_hugetlb_page functions to folios dequeue_huge_page_node_exact() is changed to dequeue_hugetlb_folio_node_ exact() and dequeue_huge_page_nodemask() is changed to dequeue_hugetlb_ folio_nodemask(). Update their callers to pass in a folio. Link: https://lkml.kernel.org/r/20230113223057.173292-4-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Cc: John Hubbard Cc: Matthew Wilcox Cc: Mike Kravetz Cc: Muchun Song Signed-off-by: Andrew Morton commit 6f6956cf7e6a3034f61780446547e849aa4e216d Author: Sidhartha Kumar Date: Fri Jan 13 16:30:51 2023 -0600 mm/hugetlb: convert __update_and_free_page() to folios Change __update_and_free_page() to __update_and_free_hugetlb_folio() by changing its callers to pass in a folio. Link: https://lkml.kernel.org/r/20230113223057.173292-3-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Cc: John Hubbard Cc: Matthew Wilcox Cc: Muchun Song Signed-off-by: Andrew Morton commit 6aa3a920125e9f58891e2b5dc2efd4d0c1ff05a6 Author: Sidhartha Kumar Date: Fri Jan 13 16:30:50 2023 -0600 mm/hugetlb: convert isolate_hugetlb to folios Patch series "continue hugetlb folio conversion", v3. This series continues the conversion of core hugetlb functions to use folios. This series converts many helper funtions in the hugetlb fault path. This is in preparation for another series to convert the hugetlb fault code paths to operate on folios. This patch (of 8): Convert isolate_hugetlb() to take in a folio and convert its callers to pass a folio. Use page_folio() to convert the callers to use a folio is safe as isolate_hugetlb() operates on a head page. Link: https://lkml.kernel.org/r/20230113223057.173292-1-sidhartha.kumar@oracle.com Link: https://lkml.kernel.org/r/20230113223057.173292-2-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Cc: John Hubbard Cc: Matthew Wilcox Cc: Mike Kravetz Cc: Muchun Song Signed-off-by: Andrew Morton commit f528260b1a7d52140dfeb58857e13fc98ac193ef Author: Vishal Moola (Oracle) Date: Mon Feb 13 13:43:24 2023 -0800 mm/khugepaged: fix invalid page access in release_pte_pages() release_pte_pages() converts from a pfn to a folio by using pfn_folio(). If the pte is not mapped, pfn_folio() will result in undefined behavior which ends up causing a kernel panic[1]. Only call pfn_folio() once we have validated that the pte is both valid and mapped to fix the issue. [1] https://lore.kernel.org/linux-mm/ff300770-afe9-908d-23ed-d23e0796e899@samsung.com/ Link: https://lkml.kernel.org/r/20230213214324.34215-1-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Fixes: 9bdfeea46f49 ("mm/khugepaged: convert release_pte_pages() to use folios") Reported-by: Marek Szyprowski Tested-by: Marek Szyprowski Debugged-by: Alexandre Ghiti Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit aca5a0944c309c56267b0c1d001aa999ddb2fb1e Author: Shuah Khan Date: Mon Feb 13 14:52:47 2023 -0700 selftests/mount_setattr: fix to make run_tests failure make run_tests doesn't run the test. Fix Makefile to set TEST_GEN_PROGS instead of TEST_GEN_FILES to fix the problem. run_tests runs TEST_GEN_PROGS, TEST_CUSTOM_PROGS, and TEST_PROGS. TEST_GEN_FILES is for files generated by tests. Signed-off-by: Shuah Khan commit d8e45bf1aed2e5fddd8985b5bb1aaf774a97aba8 Author: Shuah Khan Date: Mon Feb 13 11:20:07 2023 -0700 selftests/mount_setattr: fix redefine struct mount_attr build error Fix the following build error due to redefining struct mount_attr by removing duplicate define from mount_setattr_test.c gcc -g -isystem .../tools/testing/selftests/../../../usr/include -Wall -O2 -pthread mount_setattr_test.c -o .../tools/testing/selftests/mount_setattr/mount_setattr_test mount_setattr_test.c:107:8: error: redefinition of ‘struct mount_attr’ 107 | struct mount_attr { | ^~~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/sys/mount.h:32, from mount_setattr_test.c:10: .../usr/include/linux/mount.h:129:8: note: originally defined here 129 | struct mount_attr { | ^~~~~~~~~~ make: *** [../lib.mk:145: .../tools/testing/selftests/mount_setattr/mount_setattr_test] Error 1 Signed-off-by: Shuah Khan commit a7151a8eaa292933cc934deb1dda0f5f51114c82 Author: Shuah Khan Date: Mon Feb 13 10:21:43 2023 -0700 selftests/sched: fix warn_unused_result build warns Fix the following warns by adding return check and error handling. gcc -O2 -Wall -g -I./ -isystem .../tools/testing/selftests/../../../usr/include -Wl,-rpath=./ cs_prctl_test.c -lpthread -o .../tools/testing/selftests/sched/cs_prctl_test cs_prctl_test.c: In function ‘create_processes’: cs_prctl_test.c:187:17: warning: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 187 | read(proc[i].pfd[0], &proc[i].thr_tids, sizeof(int) * proc[i].num_threads); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cs_prctl_test.c: In function ‘child_func_process’: cs_prctl_test.c:159:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 159 | write(ca->pfd[1], &ca->thr_tids, sizeof(int) * ca->num_threads); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Shuah Khan commit b75a52b0dda353aeefb4830a320589a363f49579 Author: Shawn Lin Date: Thu Feb 2 08:35:16 2023 +0800 mmc: sdhci-of-dwcmshc: Update DLL and pre-change delay for rockchip platform For Rockchip platform, DLL bypass bit and start bit need to be set if DLL is not locked. And adjust pre-change delay to 0x3 for better signal test result. Signed-off-by: Shawn Lin Link: https://lore.kernel.org/r/1675298118-64243-2-git-send-email-shawn.lin@rock-chips.com Signed-off-by: Ulf Hansson commit 0d3b2b4d2364166a955d03407ddace9269c603a5 Merge: 022d3f0800682 3fb901cdc9e4a Author: Oliver Upton Date: Mon Feb 13 23:33:41 2023 +0000 Merge branch kvm-arm64/nv-prefix into kvmarm/next * kvm-arm64/nv-prefix: : Preamble to NV support, courtesy of Marc Zyngier. : : This brings in a set of prerequisite patches for supporting nested : virtualization in KVM/arm64. Of course, there is a long way to go until : NV is actually enabled in KVM. : : - Introduce cpucap / vCPU feature flag to pivot the NV code on : : - Add support for EL2 vCPU register state : : - Basic nested exception handling : : - Hide unsupported features from the ID registers for NV-capable VMs KVM: arm64: nv: Use reg_to_encoding() to get sysreg ID KVM: arm64: nv: Only toggle cache for virtual EL2 when SCTLR_EL2 changes KVM: arm64: nv: Filter out unsupported features from ID regs KVM: arm64: nv: Emulate EL12 register accesses from the virtual EL2 KVM: arm64: nv: Allow a sysreg to be hidden from userspace only KVM: arm64: nv: Emulate PSTATE.M for a guest hypervisor KVM: arm64: nv: Add accessors for SPSR_EL1, ELR_EL1 and VBAR_EL1 from virtual EL2 KVM: arm64: nv: Handle SMCs taken from virtual EL2 KVM: arm64: nv: Handle trapped ERET from virtual EL2 KVM: arm64: nv: Inject HVC exceptions to the virtual EL2 KVM: arm64: nv: Support virtual EL2 exceptions KVM: arm64: nv: Handle HCR_EL2.NV system register traps KVM: arm64: nv: Add nested virt VCPU primitives for vEL2 VCPU state KVM: arm64: nv: Add EL2 system registers to vcpu context KVM: arm64: nv: Allow userspace to set PSR_MODE_EL2x KVM: arm64: nv: Reset VCPU to EL2 registers if VCPU nested virt is set KVM: arm64: nv: Introduce nested virtualization VCPU feature KVM: arm64: Use the S2 MMU context to iterate over S2 table arm64: Add ARM64_HAS_NESTED_VIRT cpufeature Signed-off-by: Oliver Upton commit 022d3f0800682f84e1437ad2a2f6fb85fc94abf6 Merge: e4f7417e9680a 67d953d4d7bec Author: Oliver Upton Date: Mon Feb 13 23:32:59 2023 +0000 Merge branch kvm-arm64/misc into kvmarm/next * kvm-arm64/misc: : Miscellaneous updates : : - Convert CPACR_EL1_TTA to the new, generated system register : definitions. : : - Serialize toggling CPACR_EL1.SMEN to avoid unexpected exceptions when : accessing SVCR in the host. : : - Avoid quiescing the guest if a vCPU accesses its own redistributor's : SGIs/PPIs, eliminating the need to IPI. Largely an optimization for : nested virtualization, as the L1 accesses the affected registers : rather often. : : - Conversion to kstrtobool() : : - Common definition of INVALID_GPA across architectures : : - Enable CONFIG_USERFAULTFD for CI runs of KVM selftests KVM: arm64: Fix non-kerneldoc comments KVM: selftests: Enable USERFAULTFD KVM: selftests: Remove redundant setbuf() arm64/sysreg: clean up some inconsistent indenting KVM: MMU: Make the definition of 'INVALID_GPA' common KVM: arm64: vgic-v3: Use kstrtobool() instead of strtobool() KVM: arm64: vgic-v3: Limit IPI-ing when accessing GICR_{C,S}ACTIVER0 KVM: arm64: Synchronize SMEN on vcpu schedule out KVM: arm64: Kill CPACR_EL1_TTA definition Signed-off-by: Oliver Upton commit e4f7417e9680a281a77f0328f1b835557a558b58 Merge: 3f1a14af5e17a ad818e6010ef1 Author: Oliver Upton Date: Mon Feb 13 23:31:23 2023 +0000 Merge branch kvm-arm64/apple-vgic-mi into kvmarm/next * kvm-arm64/apple-vgic-mi: : VGIC maintenance interrupt support for the AIC, courtesy of Marc Zyngier. : : The AIC provides a non-maskable VGIC maintenance interrupt, which until : now was not supported by KVM. This series (1) allows the registration of : a non-maskable maintenance interrupt and (2) wires in support for this : with the AIC driver. irqchip/apple-aic: Correctly map the vgic maintenance interrupt irqchip/apple-aic: Register vgic maintenance interrupt with KVM KVM: arm64: vgic: Allow registration of a non-maskable maintenance interrupt Signed-off-by: Oliver Upton commit 3f1a14af5e17a8d03b2db2085861da68c8405ee3 Merge: 1b915210d9bed 6f10f2ec61c79 Author: Oliver Upton Date: Mon Feb 13 23:30:37 2023 +0000 Merge branch kvm-arm64/psci-relay-fixes into kvmarm/next * kvm-arm64/psci-relay-fixes: : Fixes for CPU on/resume with pKVM, courtesy Quentin Perret. : : A consequence of deprivileging the host is that pKVM relays PSCI calls : on behalf of the host. pKVM's CPU initialization failed to fully : initialize the CPU's EL2 state, which notably led to unexpected SVE : traps resulting in a hyp panic. : : The issue is addressed by reusing parts of __finalise_el2 to restore CPU : state in the PSCI relay. KVM: arm64: Finalise EL2 state from pKVM PSCI relay KVM: arm64: Use sanitized values in __check_override in nVHE KVM: arm64: Introduce finalise_el2_state macro KVM: arm64: Provide sanitized SYS_ID_AA64SMFR0_EL1 to nVHE commit 152b5245e361f9493d930a1aaa51c932e3dff660 Author: Paul Cercueil Date: Tue Jan 31 21:02:29 2023 +0000 mmc: jz4740: Add support for vqmmc power supply Support enabling / disabling the vqmmc power supply if it was provided by the firmware. Provide the .start_signal_voltage_switch callback to change the voltage of the external vqmmc power supply. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20230131210229.68129-2-paul@crapouillou.net Signed-off-by: Ulf Hansson commit 1b915210d9bed44512f6034eacda9e8dcd89bd93 Merge: 073988eb3247a ba82e06cf7f46 Author: Oliver Upton Date: Mon Feb 13 23:26:21 2023 +0000 Merge branch kvm-arm64/nv-timer-improvements into kvmarm/next * kvm-arm64/nv-timer-improvements: : Timer emulation improvements, courtesy of Marc Zyngier. : : - Avoid re-arming an hrtimer for a guest timer that is already pending : : - Only reload the affected timer context when emulating a sysreg access : instead of both the virtual/physical timers. KVM: arm64: timers: Don't BUG() on unhandled timer trap KVM: arm64: Reduce overhead of trapped timer sysreg accesses KVM: arm64: Don't arm a hrtimer for an already pending timer Signed-off-by: Oliver Upton commit 073988eb3247a4fd9ddefb3ae12e655359ce19cb Merge: 52b603628a2c0 960c3028a1d52 Author: Oliver Upton Date: Mon Feb 13 23:25:50 2023 +0000 Merge branch kvm-arm64/MAINTAINERS into kvmarm/next * kvm-arm64/MAINTAINERS: : KVM/arm64 MAINTAINERS updates : : - Drop the old columbia.edu mailing list (you will be missed!) : : - Move Oliver up to co-maintainer w/ Marc KVM: arm64: Drop Columbia-hosted mailing list MAINTAINERS: Add Oliver Upton as co-maintainer of KVM/arm64 Signed-off-by: Oliver Upton commit fe3e137c6d7106d67f37cb76781b90f90a4e988f Merge: 565e46842489b 3f18c5046e633 Author: Ulf Hansson Date: Tue Feb 14 00:19:41 2023 +0100 mmc: Merge branch fixes into next Merge the mmc fixes for v6.2-rc[n] into the next branch, to allow them to get tested together with the new mmc changes that are targeted for v6.3. Signed-off-by: Ulf Hansson commit 565e46842489bf27d5da2ac7061241d7254fc9a7 Author: Jonathan Neuschäfer Date: Sun Jan 29 14:00:59 2023 +0100 dt-bindings: mmc: fsl-imx-esdhc: Improve grammar and fix a typo This makes the text read a little better. Signed-off-by: Jonathan Neuschäfer Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230129130059.1322858-1-j.neuschaefer@gmx.net Signed-off-by: Ulf Hansson commit 418f7c2de1334b70fbee790911a1b46503230137 Author: Heiner Kallweit Date: Sat Feb 4 00:54:48 2023 +0100 mmc: meson-gx: use devm_mmc_alloc_host Use new function devm_mmc_alloc_host() to simplify the code. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/728f159b-885f-c78a-1a3d-f55c245250e1@gmail.com Signed-off-by: Ulf Hansson commit 80df83c2c57e75cb482ccf0c639ce84703ab41a2 Author: Heiner Kallweit Date: Sat Feb 4 00:53:35 2023 +0100 mmc: core: add devm_mmc_alloc_host Add a device-managed version of mmc_alloc_host(). The argument order is reversed compared to mmc_alloc_host() because device-managed functions typically have the device argument first. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/6d8f9fdc-7c9e-8e4f-e6ef-5470b971c74e@gmail.com Signed-off-by: Ulf Hansson commit 9d8ba74a181b1c81def21168795ed96cbe6f05ed Author: Geert Uytterhoeven Date: Fri Feb 10 14:46:39 2023 +0100 PCI: Fix dropping valid root bus resources with .end = zero On r8a7791/koelsch: kmemleak: 1 new suspected memory leaks (see /sys/kernel/debug/kmemleak) # cat /sys/kernel/debug/kmemleak unreferenced object 0xc3a34e00 (size 64): comm "swapper/0", pid 1, jiffies 4294937460 (age 199.080s) hex dump (first 32 bytes): b4 5d 81 f0 b4 5d 81 f0 c0 b0 a2 c3 00 00 00 00 .]...].......... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] __kmalloc+0xf0/0x140 [<34bd6bc0>] resource_list_create_entry+0x18/0x38 [<767046bc>] pci_add_resource_offset+0x20/0x68 [] devm_of_pci_get_host_bridge_resources.constprop.0+0xb0/0x390 When coalescing two resources for a contiguous aperture, the second resource is enlarged to cover the full contiguous range, while the first resource is marked invalid. This invalidation is done by clearing the flags, start, and end members. When adding the initial resources to the bus later, invalid resources are skipped. Unfortunately, the check for an invalid resource considers only the end member, causing false positives. E.g. on r8a7791/koelsch, root bus resource 0 ("bus 00") is skipped, and no longer registered with pci_bus_insert_busn_res() (causing the memory leak), nor printed: pci-rcar-gen2 ee090000.pci: host bridge /soc/pci@ee090000 ranges: pci-rcar-gen2 ee090000.pci: MEM 0x00ee080000..0x00ee08ffff -> 0x00ee080000 pci-rcar-gen2 ee090000.pci: PCI: revision 11 pci-rcar-gen2 ee090000.pci: PCI host bridge to bus 0000:00 -pci_bus 0000:00: root bus resource [bus 00] pci_bus 0000:00: root bus resource [mem 0xee080000-0xee08ffff] Fix this by only skipping resources where all of the flags, start, and end members are zero. Fixes: 7c3855c423b17f6c ("PCI: Coalesce host bridge contiguous apertures") Link: https://lore.kernel.org/r/da0fcd5e86c74239be79c7cb03651c0fce31b515.1676036673.git.geert+renesas@glider.be Tested-by: Niklas Schnelle Signed-off-by: Geert Uytterhoeven Signed-off-by: Bjorn Helgaas Acked-by: Kai-Heng Feng commit 52b603628a2c06be38648aa025daa81e4355a7fc Merge: e8789ab7047a8 1dfc3e905089a Author: Oliver Upton Date: Mon Feb 13 22:33:10 2023 +0000 Merge branch kvm-arm64/parallel-access-faults into kvmarm/next * kvm-arm64/parallel-access-faults: : Parallel stage-2 access fault handling : : The parallel faults changes that went in to 6.2 covered most stage-2 : aborts, with the exception of stage-2 access faults. Building on top of : the new infrastructure, this series adds support for handling access : faults (i.e. updating the access flag) in parallel. : : This is expected to provide a performance uplift for cores that do not : implement FEAT_HAFDBS, such as those from the fruit company. KVM: arm64: Condition HW AF updates on config option KVM: arm64: Handle access faults behind the read lock KVM: arm64: Don't serialize if the access flag isn't set KVM: arm64: Return EAGAIN for invalid PTE in attr walker KVM: arm64: Ignore EAGAIN for walks outside of a fault KVM: arm64: Use KVM's pte type/helpers in handle_access_fault() Signed-off-by: Oliver Upton commit e8789ab7047a824fa415948d511634fea0c3aea3 Merge: 619cec00857f2 5f623a598d128 Author: Oliver Upton Date: Mon Feb 13 22:32:14 2023 +0000 Merge branch kvm-arm64/virtual-cache-geometry into kvmarm/next * kvm-arm64/virtual-cache-geometry: : Virtualized cache geometry for KVM guests, courtesy of Akihiko Odaki. : : KVM/arm64 has always exposed the host cache geometry directly to the : guest, even though non-secure software should never perform CMOs by : Set/Way. This was slightly wrong, as the cache geometry was derived from : the PE on which the vCPU thread was running and not a sanitized value. : : All together this leads to issues migrating VMs on heterogeneous : systems, as the cache geometry saved/restored could be inconsistent. : : KVM/arm64 now presents 1 level of cache with 1 set and 1 way. The cache : geometry is entirely controlled by userspace, such that migrations from : older kernels continue to work. KVM: arm64: Mark some VM-scoped allocations as __GFP_ACCOUNT KVM: arm64: Normalize cache configuration KVM: arm64: Mask FEAT_CCIDX KVM: arm64: Always set HCR_TID2 arm64/cache: Move CLIDR macro definitions arm64/sysreg: Add CCSIDR2_EL1 arm64/sysreg: Convert CCSIDR_EL1 to automatic generation arm64: Allow the definition of UNKNOWN system register fields Signed-off-by: Oliver Upton commit 619cec00857f21dbc6db5ef9e0b9c613479f3745 Merge: 92425e058ab6a 9442d05bba6c1 Author: Oliver Upton Date: Mon Feb 13 22:30:07 2023 +0000 Merge branch arm64/for-next/sme2 into kvmarm/next Merge the SME2 branch to fix up a rather annoying conflict due to the EL2 finalization refactor. Signed-off-by: Oliver Upton commit 92425e058ab6ab1a4c4a9d384d2d86b810f57e23 Merge: 5dc4c995db9eb 9f1a4c004869d Author: Oliver Upton Date: Mon Feb 13 22:28:30 2023 +0000 Merge branch kvm/kvm-hw-enable-refactor into kvmarm/next Merge the kvm_init() + hardware enable rework to avoid conflicts with kvmarm. Signed-off-by: Oliver Upton commit f5edd8715e2ea672e6119c3764041743761fb178 Author: Manivannan Sadhasivam Date: Tue Jan 24 12:41:58 2023 +0530 PCI: endpoint: Use link_up() callback in place of LINK_UP notifier As a part of the transition towards callback mechanism for signalling the events from EPC to EPF, let's use the link_up() callback in the place of the LINK_UP notifier. This also removes the notifier support completely from the PCI endpoint framework. Link: https://lore.kernel.org/linux-pci/20230124071158.5503-6-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Acked-by: Kishon Vijay Abraham I commit 838125b07e7706b1a9069079a73507fd3df244f7 Author: Manivannan Sadhasivam Date: Tue Jan 24 12:41:57 2023 +0530 PCI: endpoint: Use callback mechanism for passing events from EPC to EPF Instead of using the notifiers for passing the events from EPC to EPF, let's introduce a callback based mechanism where the EPF drivers can populate relevant callbacks for EPC events they want to subscribe. The use of notifiers in kernel is not recommended if there is a real link between the sender and receiver, like in this case. Also, the existing atomic notifier forces the notification functions to be in atomic context while the caller may be in non-atomic context. For instance, the two in-kernel users of the notifiers, pcie-qcom and pcie-tegra194, both are calling the notifier functions in non-atomic context (from threaded IRQ handlers). This creates a sleeping in atomic context issue with the existing EPF_TEST driver that calls the EPC APIs that may sleep. For all these reasons, let's get rid of the notifier chains and use the simple callback mechanism for signalling the events from EPC to EPF drivers. This preserves the context of the caller and avoids the latency of going through a separate interface for triggering the notifications. As a first step of the transition, the core_init() callback is introduced in this commit, that'll replace the existing CORE_INIT notifier used for signalling the init complete event from EPC. During the occurrence of the event, EPC will go over the list of EPF drivers attached to it and will call the core_init() callback if available. Link: https://lore.kernel.org/linux-pci/20230124071158.5503-5-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Acked-by: Kishon Vijay Abraham I commit d6dd5bafaabf98a99a76227ab8dc9a89e76a198f Author: Manivannan Sadhasivam Date: Tue Jan 24 12:41:56 2023 +0530 PCI: endpoint: Use a separate lock for protecting epc->pci_epf list The EPC controller maintains a list of EPF drivers added to it. For protecting this list against the concurrent accesses, the epc->lock (used for protecting epc_ops) has been used so far. Since there were no users trying to use epc_ops and modify the pci_epf list simultaneously, this was not an issue. But with the addition of callback mechanism for passing the events, this will be a problem. Because the pci_epf list needs to be iterated first for getting hold of the EPF driver and then the relevant event specific callback needs to be called for the driver. If the same epc->lock is used, then it will result in a deadlock scenario. For instance, ... mutex_lock(&epc->lock); list_for_each_entry(epf, &epc->pci_epf, list) { epf->event_ops->core_init(epf); | |-> pci_epc_set_bar(); | |-> mutex_lock(&epc->lock) # DEADLOCK ... So to fix this issue, use a separate lock called "list_lock" for protecting the pci_epf list against the concurrent accesses. This lock will also be used by the callback mechanism. Link: https://lore.kernel.org/linux-pci/20230124071158.5503-4-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Acked-by: Kishon Vijay Abraham I commit c2cc5cdda46c0a94ff82bf61016ada2e120f1a3f Author: Manivannan Sadhasivam Date: Tue Jan 24 12:41:55 2023 +0530 PCI: tegra194: Move dw_pcie_ep_linkup() to threaded IRQ handler dw_pcie_ep_linkup() may take more time to execute depending on the EPF driver implementation. Calling this API in the hard IRQ handler is not encouraged since the hard IRQ handlers are supposed to complete quickly. So move the dw_pcie_ep_linkup() call to threaded IRQ handler. Link: https://lore.kernel.org/linux-pci/20230124071158.5503-3-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Reviewed-by: Vidya Sagar commit da87d35a6e51480703d6f055e7a1b52c85731d7e Author: Manivannan Sadhasivam Date: Tue Jan 24 12:41:54 2023 +0530 PCI: dra7xx: Use threaded IRQ handler for "dra7xx-pcie-main" IRQ The "dra7xx-pcie-main" hard IRQ handler is just printing the IRQ status and calling the dw_pcie_ep_linkup() API if LINK_UP status is set. But the execution of dw_pcie_ep_linkup() depends on the EPF driver and may take more time depending on the EPF implementation. In general, hard IRQ handlers are supposed to return quickly and not block for so long. Moreover, there is no real need of the current IRQ handler to be a hard IRQ handler. So switch to the threaded IRQ handler for the "dra7xx-pcie-main" IRQ. Link: https://lore.kernel.org/linux-pci/20230124071158.5503-2-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Krzysztof Wilczyński Acked-by: Kishon Vijay Abraham I commit 407ef897bd0275e38ae33d410857e71c092679bd Author: Krzysztof Kozlowski Date: Wed Feb 8 11:15:41 2023 +0100 arm64: dts: qcom: msm8996: align RPM G-Link clock-controller node with bindings qcom,rpmcc bindings expect RPM clock controller to be named generic "clock-controller": rpm-glink: rpm-requests: 'qcom,rpmcc' does not match any of the regexes: '^regulators(-[01])?$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230208101545.45711-3-krzysztof.kozlowski@linaro.org commit 7bf30eb441b3bdaa368e65837a03f9fbba033180 Author: Krzysztof Kozlowski Date: Wed Feb 8 11:15:40 2023 +0100 arm64: dts: qcom: qcs404: align RPM G-Link node with bindings Bindings expect (and most of DTS use) the RPM G-Link node name to be "rpm-requests". Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230208101545.45711-2-krzysztof.kozlowski@linaro.org commit 679ee73bbee28cab441008f8cca38160cc8f3d05 Author: Krzysztof Kozlowski Date: Wed Feb 8 11:15:39 2023 +0100 arm64: dts: qcom: ipq6018: align RPM G-Link node with bindings Bindings expect (and most of DTS use) the RPM G-Link node name to be "rpm-requests". Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230208101545.45711-1-krzysztof.kozlowski@linaro.org commit 687bcd03a047e65fcf12ae2b693043ee44acad4c Author: Bartosz Golaszewski Date: Thu Feb 9 11:35:31 2023 +0100 arm64: defconfig: enable drivers required by the Qualcomm SA8775P platform Enable the pinctrl, GCC clock and interconnect drivers in order to allow booting SA8775P boards. The drivers need to be built-in for QUPv3 and subsequently UART console to work. Signed-off-by: Bartosz Golaszewski Reviewed-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Reviewed-by: Eric Chanudet Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230209103531.469809-1-brgl@bgdev.pl commit 26e95ff8a912fd787a65ae1ae4cc4684f5f84fce Author: Neil Armstrong Date: Thu Feb 9 09:44:43 2023 +0100 arm64: dts: qcom: sm8550: remove invalid interconnect property from cryptobam The interconnect property is already present in the qce node, which is the consumer of the cryptobam, so no need for an interconnect property as documented by the bindings. Fixes: 433477c3bf0b ("arm64: dts: qcom: sm8550: add QCrypto nodes") Suggested-by: Bhupesh Sharma Signed-off-by: Neil Armstrong Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230209-topic-sm8550-upstream-cryptobam-remove-interconnect-v1-1-84587c7bad0f@linaro.org commit f15c1b1bd3c2b3a688d1139593be6c620bb9af6f Author: Owen Yang Date: Mon Feb 13 10:59:05 2023 +0800 arm64: dts: qcom: sc7280: Adjust zombie PWM frequency Tune the PWM to solve screen flashing issue and high frequency noise. While at it, the comment for the PWM settings incorrectly said we were using a 5kHz duty cycle. It should have said "period", not "duty cycle". Correct this while updating the values. Signed-off-by: Owen Yang Reviewed-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230213105803.v2.1.I610cef0ead2d5df1f7bd18bc0e0ae040b03725d0@changeid commit 2d5cab9232ba6bac734186f3e74fb106793bc738 Author: Manivannan Sadhasivam Date: Mon Feb 13 14:31:18 2023 +0530 arm64: dts: qcom: sc8280xp-pmics: Specify interrupt parent explicitly Nodes like pwrkey, resin, iadc, adc-tm, temp-alarm which are the grand children of spmi_bus node represent the interrupt generating devices but don't have "interrupt-parent" property. As per the devicetree spec v0.3, section 2.4: "The physical wiring of an interrupt source to an interrupt controller is represented in the devicetree with the interrupt-parent property. Nodes that represent interrupt-generating devices contain an interrupt-parent property which has a phandle value that points to the device to which the device’s interrupts are routed, typically an interrupt controller. If an interrupt-generating device does not have an interrupt-parent property, its interrupt parent is assumed to be its devicetree parent." This clearly says that if the "interrupt-parent" property is absent, then the immediate devicetree parent will be assumed as the interrupt parent. But the immediate parents of these nodes are not interrupt controllers themselves. This may lead to failure while wiring the interrupt for these nodes by an operating system. But a few operating systems like Linux, workaround this issue by walking up the parent nodes until it finds the "interrupt-cells" property. Then the node that has the "interrupt-cells" property will be used as the interrupt parent. But this workaround is not as per the DT spec and is not being implemented by other operating systems such as OpenBSD. Hence, fix this issue by adding the "interrupts-extended" property that explicitly specifies the spmi_bus node as the interrupt parent. Note that the "interrupts-extended" property is chosen over "interrupt-parent" as it allows specifying both interrupt parent phandle and interrupt specifiers in a single property. Reported-by: Patrick Wildt Signed-off-by: Manivannan Sadhasivam Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230213090118.11527-1-manivannan.sadhasivam@linaro.org commit 574f2ffd45dc786dc443c5e11ea477420ffa5f52 Author: Luca Weiss Date: Mon Feb 13 15:46:31 2023 +0100 arm64: dts: qcom: sm7225-fairphone-fp4: enable remaining i2c busses Enable all i2c busses where something is connected on this phone. Add comments as placeholders for which components are still missing. Also enable gpi_dma and the other qupv3 for that. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230213-fp4-more-i2c-v2-2-1c459c572f80@fairphone.com commit 65aedb0b48c09595065c81722d9cca53760f7220 Author: Luca Weiss Date: Mon Feb 13 15:46:30 2023 +0100 arm64: dts: qcom: sm7225-fairphone-fp4: move status property down Currently the dts contains a mix of status-as-first-property (old qcom style) and status-as-last-property (new style). Move all status properties down to the bottom once and for all so that the style is consistent between different nodes. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230213-fp4-more-i2c-v2-1-1c459c572f80@fairphone.com commit c0ee8e0ba5cc17623e63349a168b41e407b1eef0 Author: Konrad Dybcio Date: Mon Feb 13 22:29:30 2023 +0100 arm64: dts: qcom: pmk8350: Use the correct PON compatible A special compatible was introduced for PMK8350 both in the driver and the bindings to facilitate for 2 base registers (PBS & HLOS). Use it. Fixes: b2de43136058 ("arm64: dts: qcom: pmk8350: Add peripherals for pmk8350") Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230213212930.2115182-1-konrad.dybcio@linaro.org commit 85d81e15862a95d1a0de5a60f5ac8caba7068b9b Author: Bjorn Andersson Date: Mon Feb 13 13:56:19 2023 -0800 arm64: defconfig: Enable DisplayPort on SC8280XP laptops The QCOM_PMIC_GLINK implements the parts of a TCPM necessary for negotiating DP altmode and the TYPEC_MUX_GPIO_SBU driver is used for controlling connection and orientation switching of the SBU lanes in the USB-C connector Enable these to enable USB Type-C DisplayPort on SC8280XP laptops. Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230213215619.1362566-5-quic_bjorande@quicinc.com commit 8fcff430faee2a2e99df80c6e9b09175a0fa5002 Author: Bjorn Andersson Date: Mon Feb 13 13:56:18 2023 -0800 arm64: dts: qcom: sc8280xp-x13s: Enable external display Like on the CRD, add the necessary nodes to enable USB Type-C altmode-based external display on the Lenovo ThinkPad X13s. Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230213215619.1362566-4-quic_bjorande@quicinc.com commit bc9a747ae91f148f97a63ade8b56b81f63bd39ad Author: Bjorn Andersson Date: Mon Feb 13 13:56:17 2023 -0800 arm64: dts: qcom: sc8280xp-crd: Introduce pmic_glink The SC8280XP CRD control over battery management and its two USB Type-C port using pmic_glink and two GPIO-based SBU muxes. Enable the two DisplayPort instances, GPIO SBU mux instance and pmic_glink with the two connectors on the CRD. Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230213215619.1362566-3-quic_bjorande@quicinc.com commit 19d3bb90754ff11e2cd69e2c8f1124dd5b9e40fa Author: Bjorn Andersson Date: Mon Feb 13 13:56:16 2023 -0800 arm64: dts: qcom: sc8280xp: Add USB-C-related DP blocks Add the two DisplayPort controllers that are attached to QMP phys for providing display output on USB Type-C. Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230213215619.1362566-2-quic_bjorande@quicinc.com commit a8ecd17bb681d1743309b0d2a4622b643b61d69c Author: Dmitry Baryshkov Date: Thu Feb 9 15:38:39 2023 +0200 arm64: dts: qcom: sm8350-hdk: enable GPU Enable the GPU on the SM8350-HDK device. The ZAP shader is required for the GPU to function properly. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230209133839.762631-7-dmitry.baryshkov@linaro.org commit 54af0ceb75958a8b7e62138646cfa6c114e71a77 Author: Dmitry Baryshkov Date: Thu Feb 9 15:38:38 2023 +0200 arm64: dts: qcom: sm8350: add GPU, GMU, GPU CC and SMMU nodes Add device nodes required to enable GPU on the SM8350 platform. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio [bjorn: Workaround for lacking RPMH_REGULATOR_LEVEL_LOW_SVS_L1 constant] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230209133839.762631-6-dmitry.baryshkov@linaro.org commit 51f83fbbf1c8d7a09885099f9a8f25b3c9139797 Author: Dmitry Baryshkov Date: Thu Feb 9 15:38:37 2023 +0200 arm64: dts: qcom: sm8350: finish reordering nodes Finish reordering DT nodes by their address. Move PDC, tsens, AOSS, SRAM, SPMI and TLMM nodes to the proper position. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230209133839.762631-5-dmitry.baryshkov@linaro.org commit 1417372f4f846fbc28b4306370eb011d1f0853ca Author: Dmitry Baryshkov Date: Thu Feb 9 15:38:36 2023 +0200 arm64: dts: qcom: sm8350: move more nodes to correct place Continue ordering DT nodes by their address. Move RNG, UFS, system NoC and SLPI nodes to the proper position. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230209133839.762631-4-dmitry.baryshkov@linaro.org commit f5f6bd58186afa4ec1ebcd074bc30255826e8480 Author: Dmitry Baryshkov Date: Thu Feb 9 15:38:35 2023 +0200 arm64: dts: qcom: sm8350: reorder device nodes Somehow sm8350 got its device nodes not fully sorted. Start reordering DT nodes by their address. Move apps SMMU, GIC, timer, apps RSC, cpufreq ADSP and cDSP nodes to the end to the proper position at the end of /soc/. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230209133839.762631-3-dmitry.baryshkov@linaro.org commit 29e8142b5623b5949587bcc4f591c4e6595c4aca Author: Bjorn Andersson Date: Tue Feb 7 06:42:41 2023 -0800 power: supply: Introduce Qualcomm PMIC GLINK power supply The PMIC GLINK service, running on a coprocessor of modern Qualcomm platforms, deals with battery charging and fuel gauging, as well as reporting status of AC and wireless power supplies. As this is just one of the functionalities provided by the PMIC GLINK service, this power supply driver is implemented as an auxilirary bus driver, spawned by the main "pmic glink" driver when the PMIC GLINK service is detected. Signed-off-by: Bjorn Andersson Tested-by: Konrad Dybcio # SM8350 PDX215 Reviewed-by: Neil Armstrong Tested-by: Neil Armstrong # on SM8550-MTP & SM8450-HDK Signed-off-by: Bjorn Andersson Acked-by: Sebastian Reichel Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230207144241.1767973-1-quic_bjorande@quicinc.com commit 6a3cd3318ff65622415e34e8ee39d76331e7c869 Author: Dave Marchevsky Date: Sun Feb 12 01:27:07 2023 -0800 bpf: Migrate release_on_unlock logic to non-owning ref semantics This patch introduces non-owning reference semantics to the verifier, specifically linked_list API kfunc handling. release_on_unlock logic for refs is refactored - with small functional changes - to implement these semantics, and bpf_list_push_{front,back} are migrated to use them. When a list node is pushed to a list, the program still has a pointer to the node: n = bpf_obj_new(typeof(*n)); bpf_spin_lock(&l); bpf_list_push_back(&l, n); /* n still points to the just-added node */ bpf_spin_unlock(&l); What the verifier considers n to be after the push, and thus what can be done with n, are changed by this patch. Common properties both before/after this patch: * After push, n is only a valid reference to the node until end of critical section * After push, n cannot be pushed to any list * After push, the program can read the node's fields using n Before: * After push, n retains the ref_obj_id which it received on bpf_obj_new, but the associated bpf_reference_state's release_on_unlock field is set to true * release_on_unlock field and associated logic is used to implement "n is only a valid ref until end of critical section" * After push, n cannot be written to, the node must be removed from the list before writing to its fields * After push, n is marked PTR_UNTRUSTED After: * After push, n's ref is released and ref_obj_id set to 0. NON_OWN_REF type flag is added to reg's type, indicating that it's a non-owning reference. * NON_OWN_REF flag and logic is used to implement "n is only a valid ref until end of critical section" * n can be written to (except for special fields e.g. bpf_list_node, timer, ...) Summary of specific implementation changes to achieve the above: * release_on_unlock field, ref_set_release_on_unlock helper, and logic to "release on unlock" based on that field are removed * The anonymous active_lock struct used by bpf_verifier_state is pulled out into a named struct bpf_active_lock. * NON_OWN_REF type flag is introduced along with verifier logic changes to handle non-owning refs * Helpers are added to use NON_OWN_REF flag to implement non-owning ref semantics as described above * invalidate_non_owning_refs - helper to clobber all non-owning refs matching a particular bpf_active_lock identity. Replaces release_on_unlock logic in process_spin_lock. * ref_set_non_owning - set NON_OWN_REF type flag after doing some sanity checking * ref_convert_owning_non_owning - convert owning reference w/ specified ref_obj_id to non-owning references. Set NON_OWN_REF flag for each reg with that ref_obj_id and 0-out its ref_obj_id * Update linked_list selftests to account for minor semantic differences introduced by this patch * Writes to a release_on_unlock node ref are not allowed, while writes to non-owning reference pointees are. As a result the linked_list "write after push" failure tests are no longer scenarios that should fail. * The test##missing_lock##op and test##incorrect_lock##op macro-generated failure tests need to have a valid node argument in order to have the same error output as before. Otherwise verification will fail early and the expected error output won't be seen. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230212092715.1422619-2-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit 6fffbc7ae1373e10b989afe23a9eeb9c49fe15c3 Author: Rob Herring Date: Fri Feb 10 10:43:51 2023 -0600 PCI: Honor firmware's device disabled status If a device has a firmware node (DT/ACPI), and the device is marked disabled, that is currently ignored. Add a check for this condition and bail out creating the pci_dev. This assumes the config space for the device can still be accessed because they already have by this point in order to identify the device. Link: https://lore.kernel.org/r/20230210164351.2687475-1-robh@kernel.org Tested-by: Binbin Zhou Signed-off-by: Rob Herring Signed-off-by: Bjorn Helgaas Cc: Liu Peibao Cc: Huacai Chen commit 22d74bc26bbfde150f602b2a6e93fb11df30ce0b Author: Thomas Weißschuh Date: Fri Feb 10 02:16:13 2023 +0000 ubifs: 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: Zhihao Cheng Signed-off-by: Richard Weinberger commit c768f8c5f40fcdc6f058cc2f02592163d6c6716c Author: Huacai Chen Date: Sat Feb 11 10:33:21 2023 +0800 PCI: loongson: Add more devices that need MRRS quirk Loongson-2K SOC and LS7A2000 chipset add new PCI IDs that need MRRS quirk. Add them. Link: https://lore.kernel.org/r/20230211023321.3530080-1-chenhuacai@loongson.cn Signed-off-by: Huacai Chen Signed-off-by: Bjorn Helgaas commit 05b8773ca33253ea562be145cf3145b05ef19f86 Author: Daniel Golle Date: Thu Dec 22 19:33:31 2022 +0000 mtd: ubi: block: wire-up device parent ubiblock devices were previously only identifyable by their name, but not connected to their parent UBI volume device e.g. in sysfs. Properly parent ubiblock device as descendant of a UBI volume device to reflect device model hierachy. Signed-off-by: Daniel Golle Signed-off-by: Richard Weinberger commit 1ecf9e390452e73a362ea7fbde8f3f0db83de856 Author: Daniel Golle Date: Thu Dec 22 19:33:04 2022 +0000 mtd: ubi: wire-up parent MTD device Wire up the device parent pointer of UBI devices to their lower MTD device, typically an MTD partition or whole-chip device. The most noticeable change is that in sysfs, previously ubi devices would be could in /sys/devices/virtual/ubi while after this change they would be correctly attached to their parent MTD device, e.g. /sys/devices/platform/1100d000.spi/spi_master/spi1/spi1.0/mtd/mtd2/ubi0. Locating UBI devices using /sys/class/ubi/ of course still works as well. Signed-off-by: Daniel Golle Signed-off-by: Richard Weinberger commit a13408c205260716e925a734ef399899d69182ba Author: Mike Rapoport Date: Sun Feb 12 10:46:11 2023 +0200 char/agp: introduce asm-generic/agp.h There are several architectures that duplicate definitions of map_page_into_agp(), unmap_page_from_agp() and flush_agp_cache(). Define those in asm-generic/agp.h and use it instead of duplicated per-architecture headers. Signed-off-by: Mike Rapoport (IBM) Signed-off-by: Arnd Bergmann commit 0e4f2c4567953a230b420f2c4460c3368d6509db Author: Mike Rapoport Date: Sun Feb 12 10:46:10 2023 +0200 char/agp: consolidate {alloc,free}_gatt_pages() There is a copy of alloc_gatt_pages() and free_gatt_pages in several architectures in arch/$ARCH/include/asm/agp.h. All the copies do exactly the same: alias alloc_gatt_pages() to __get_free_pages(GFP_KERNEL) and alias free_gatt_pages() to free_pages(). Define alloc_gatt_pages() and free_gatt_pages() in drivers/char/agp/agp.h and drop per-architecture definitions. Signed-off-by: Mike Rapoport (IBM) Signed-off-by: Arnd Bergmann commit 469bb6093f8e963aab3b1836dc9eb86135c14163 Author: Colin Ian King Date: Mon Feb 6 09:17:42 2023 +0000 power: supply: rt9467: Fix spelling mistake "attache" -> "attach" There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King Reviewed-by: ChiaEn Wu Signed-off-by: Sebastian Reichel commit 1d6cdc47fec9f7935e04deb640b444e30322ca57 Author: Yang Yingliang Date: Mon Feb 6 20:20:18 2023 +0800 power: supply: rt9471: fix using wrong ce_gpio in rt9471_probe() Pass the correct 'ce_gpio' to IS_ERR(), and remove the ce_gpio in chip data, make it all by SW control only, not to control by HW pin. Fixes: 4a1a5f6781d8 ("power: supply: rt9471: Add Richtek RT9471 charger driver") Reviewed-by: ChiYuan Huang Signed-off-by: Yang Yingliang Signed-off-by: Sebastian Reichel commit a915dfd099b7e324de60fcbc29ef373479c5f69e Author: Uwe Kleine-König Date: Fri Feb 10 22:25:28 2023 +0100 power: supply: max77650: Make max77650_charger_disable() return void The return value of max77650_charger_disable() is ignored by all but one caller. That one caller propagates the error code in the platform driver's remove function. The only effect of that is that the driver core emits a generic error message (but still removes the device). As max77650_charger_disable() already emits an error message, this can better be changed to return zero. This is a preparation for making struct platform_driver::remove return void, too. Signed-off-by: Uwe Kleine-König Reviewed-by: Bartosz Golaszewski Signed-off-by: Sebastian Reichel commit 7135b35fc9596ec233ea016fc8cfb8c4d175d3bf Merge: df2d85d0b0b5b 9dbb8e3452aba Author: Marc Zyngier Date: Mon Feb 13 19:39:25 2023 +0000 Merge branch irq/irqdomain-locking into irq/irqchip-next * irq/irqdomain-locking: : . : irqdomain locking overhaul courtesy of Johan Hovold. : : From the cover letter: : : "Parallel probing (e.g. due to asynchronous probing) of devices that : share interrupts can currently result in two mappings for the same : hardware interrupt to be created. : : This series fixes this mapping race and reworks the irqdomain locking so : that in the end the global irq_domain_mutex is only used for managing : the likewise global irq_domain_list, while domain operations (e.g. IRQ : allocations) use per-domain (hierarchy) locking." : . irqdomain: Switch to per-domain locking irqchip/mvebu-odmi: Use irq_domain_create_hierarchy() irqchip/loongson-pch-msi: Use irq_domain_create_hierarchy() irqchip/gic-v3-mbi: Use irq_domain_create_hierarchy() irqchip/gic-v3-its: Use irq_domain_create_hierarchy() irqchip/gic-v2m: Use irq_domain_create_hierarchy() irqchip/alpine-msi: Use irq_domain_add_hierarchy() x86/uv: Use irq_domain_create_hierarchy() x86/ioapic: Use irq_domain_create_hierarchy() irqdomain: Clean up irq_domain_push/pop_irq() irqdomain: Drop leftover brackets irqdomain: Drop dead domain-name assignment irqdomain: Drop revmap mutex irqdomain: Fix domain registration race irqdomain: Fix mapping-creation race irqdomain: Refactor __irq_domain_alloc_irqs() irqdomain: Look for existing mapping only once irqdomain: Drop bogus fwspec-mapping error handling irqdomain: Fix disassociation race irqdomain: Fix association race Signed-off-by: Marc Zyngier commit eb50912ec931913e70640cecf75cb993fd26995f Author: Imre Deak Date: Mon Feb 6 13:48:56 2023 +0200 drm/i915/dp_mst: Fix payload removal during output disabling Use the correct old/new topology and payload states in intel_mst_disable_dp(). So far drm_atomic_get_mst_topology_state() it used returned either the old state, in case the state was added already earlier during the atomic check phase or otherwise the new state (but the latter could fail, which can't be handled in the enable/disable hooks). After the first patch in the patchset, the state should always get added already during the check phase, so here we can get the old/new states without a failure. drm_dp_remove_payload() should use time_slots from the old payload state and vc_start_slot in the new one. It should update the new payload states to reflect the sink's current payload table after the payload is removed. Pass the new topology state and the old and new payload states accordingly. This also fixes a problem where the payload allocations for multiple MST streams on the same link got inconsistent after a few commits, as during payload removal the old instead of the new payload state got updated, so the subsequent enabling sequence and commits used a stale payload state. v2: Constify the old payload state pointer. (Ville) Cc: Lyude Paul Cc: Ville Syrjälä Cc: stable@vger.kernel.org # 6.1 Reviewed-by: Ville Syrjälä Reviewed-by: Lyude Paul Acked-by: Lyude Paul Acked-by: Daniel Vetter Acked-by: Wayne Lin Acked-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230206114856.2665066-4-imre.deak@intel.com commit 9ffdb67af0ee625ae127711845532f670cc6a4e7 Author: Imre Deak Date: Mon Feb 6 13:48:55 2023 +0200 drm/display/dp_mst: Add drm_atomic_get_old_mst_topology_state() Add a function to get the old MST topology state, required by a follow-up i915 patch. While at it clarify the code comment of drm_atomic_get_new_mst_topology_state() and add _new prefix to the new state pointer to remind about its difference from the old state. v2: Use old_/new_ prefixes for the state pointers. (Ville) Cc: Lyude Paul Cc: Ville Syrjälä Cc: stable@vger.kernel.org # 6.1 Cc: dri-devel@lists.freedesktop.org Reviewed-by: Ville Syrjälä Reviewed-by: Lyude Paul Acked-by: Lyude Paul Acked-by: Daniel Vetter Acked-by: Wayne Lin Acked-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230206114856.2665066-3-imre.deak@intel.com commit e761cc20946a0094df71cb31a565a6a0d03bd8be Author: Imre Deak Date: Mon Feb 6 13:48:54 2023 +0200 drm/display/dp_mst: Handle old/new payload states in drm_dp_remove_payload() Atm, drm_dp_remove_payload() uses the same payload state to both get the vc_start_slot required for the payload removal DPCD message and to deduct time_slots from vc_start_slot of all payloads after the one being removed. The above isn't always correct, as vc_start_slot must be the up-to-date version contained in the new payload state, but time_slots must be the one used when the payload was previously added, contained in the old payload state. The new payload's time_slots can change vs. the old one if the current atomic commit changes the corresponding mode. This patch let's drivers pass the old and new payload states to drm_dp_remove_payload(), but keeps these the same for now in all drivers not to change the behavior. A follow-up i915 patch will pass in that driver the correct old and new states to the function. Cc: Lyude Paul Cc: Ville Syrjälä Cc: Ben Skeggs Cc: Karol Herbst Cc: Harry Wentland Cc: Alex Deucher Cc: Wayne Lin Cc: stable@vger.kernel.org # 6.1 Cc: dri-devel@lists.freedesktop.org Reviewed-by: Ville Syrjälä Reviewed-by: Lyude Paul Acked-by: Lyude Paul Acked-by: Daniel Vetter Acked-by: Wayne Lin Acked-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230206114856.2665066-2-imre.deak@intel.com commit 326b1e792ff08b4d8ecb9605aec98e4e5feef56e Author: Imre Deak Date: Mon Feb 6 13:48:53 2023 +0200 drm/i915/dp_mst: Add the MST topology state for modesetted CRTCs Add the MST topology for a CRTC to the atomic state if the driver needs to force a modeset on the CRTC after the encoder compute config functions are called. Later the MST encoder's disable hook also adds the state, but that isn't guaranteed to work (since in that hook getting the state may fail, which can't be handled there). This should fix that, while a later patch fixes the use of the MST state in the disable hook. v2: Add missing forward struct declartions, caught by hdrtest. v3: Factor out intel_dp_mst_add_topology_state_for_connector() used later in the patchset. Cc: Lyude Paul Cc: Ville Syrjälä Cc: stable@vger.kernel.org # 6.1 Reviewed-by: Ville Syrjälä # v2 Reviewed-by: Lyude Paul Acked-by: Lyude Paul Acked-by: Daniel Vetter Acked-by: Wayne Lin Acked-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230206114856.2665066-1-imre.deak@intel.com commit 9dbb8e3452aba34e6fa4f63054b3adc66aceb7ec Author: Johan Hovold Date: Mon Feb 13 11:43:02 2023 +0100 irqdomain: Switch to per-domain locking The IRQ domain structures are currently protected by the global irq_domain_mutex. Switch to using more fine-grained per-domain locking, which can speed up parallel probing by reducing lock contention. On a recent arm64 laptop, the total time spent waiting for the locks during boot drops from 160 to 40 ms on average, while the maximum aggregate wait time drops from 550 to 90 ms over ten runs for example. Note that the domain lock of the root domain (innermost domain) must be used for hierarchical domains. For non-hierarchical domains (as for root domains), the new root pointer is set to the domain itself so that &domain->root->mutex always points to the right lock. Also note that hierarchical domains should be constructed using irq_domain_create_hierarchy() (or irq_domain_add_hierarchy()) to avoid having racing allocations access a not fully initialised domain. As a safeguard, the lockdep assertion in irq_domain_set_mapping() will catch any offenders that also fail to set the root domain pointer. Tested-by: Hsin-Yi Wang Tested-by: Mark-PK Tsai Signed-off-by: Johan Hovold Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230213104302.17307-21-johan+linaro@kernel.org commit f743f54fa8d2bcb3f2891b783687d91b76a144f5 Author: Johan Hovold Date: Mon Feb 13 11:43:01 2023 +0100 irqchip/mvebu-odmi: Use irq_domain_create_hierarchy() Use the irq_domain_create_hierarchy() helper to create the hierarchical domain, which both serves as documentation and avoids poking at irqdomain internals. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Hsin-Yi Wang Tested-by: Mark-PK Tsai Signed-off-by: Johan Hovold Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230213104302.17307-20-johan+linaro@kernel.org commit 6159c470f812eab0a2f1900c70acbb3ca7b9e14a Author: Johan Hovold Date: Mon Feb 13 11:43:00 2023 +0100 irqchip/loongson-pch-msi: Use irq_domain_create_hierarchy() Use the irq_domain_create_hierarchy() helper to create the hierarchical domain, which both serves as documentation and avoids poking at irqdomain internals. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Hsin-Yi Wang Tested-by: Mark-PK Tsai Signed-off-by: Johan Hovold Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230213104302.17307-19-johan+linaro@kernel.org commit 331f9aac03267f76a15776260eda4f47b81731f7 Author: Johan Hovold Date: Mon Feb 13 11:42:59 2023 +0100 irqchip/gic-v3-mbi: Use irq_domain_create_hierarchy() Use the irq_domain_create_hierarchy() helper to create the hierarchical domain, which both serves as documentation and avoids poking at irqdomain internals. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Hsin-Yi Wang Tested-by: Mark-PK Tsai Signed-off-by: Johan Hovold Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230213104302.17307-18-johan+linaro@kernel.org commit 1e46e040decede1723a5b11f0689942134c29d9a Author: Johan Hovold Date: Mon Feb 13 11:42:58 2023 +0100 irqchip/gic-v3-its: Use irq_domain_create_hierarchy() Use the irq_domain_create_hierarchy() helper to create the hierarchical domain, which both serves as documentation and avoids poking at irqdomain internals. Note that the domain host_data was first set to the struct its_node during allocation only to immediately be overwritten with the struct msi_domain_info. Tested-by: Hsin-Yi Wang Tested-by: Mark-PK Tsai Signed-off-by: Johan Hovold Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230213104302.17307-17-johan+linaro@kernel.org commit e6e8cd62a56f9ed0dcdf8d01147709b59a111418 Author: Johan Hovold Date: Mon Feb 13 11:42:57 2023 +0100 irqchip/gic-v2m: Use irq_domain_create_hierarchy() Use the irq_domain_create_hierarchy() helper to create the hierarchical domain, which both serves as documentation and avoids poking at irqdomain internals. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Hsin-Yi Wang Tested-by: Mark-PK Tsai Signed-off-by: Johan Hovold Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230213104302.17307-16-johan+linaro@kernel.org commit 6c889231e04dffa4b668c1f0fbc26db679600147 Author: Johan Hovold Date: Mon Feb 13 11:42:56 2023 +0100 irqchip/alpine-msi: Use irq_domain_add_hierarchy() Use the irq_domain_add_hierarchy() helper to create the hierarchical domain, which both serves as documentation and avoids poking at irqdomain internals. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Hsin-Yi Wang Tested-by: Mark-PK Tsai Signed-off-by: Johan Hovold Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230213104302.17307-15-johan+linaro@kernel.org commit a14e7fdd43040a2a5da2cc979063b3c958015aa9 Author: Johan Hovold Date: Mon Feb 13 11:42:55 2023 +0100 x86/uv: Use irq_domain_create_hierarchy() Use the irq_domain_create_hierarchy() helper to create the hierarchical domain, which both serves as documentation and avoids poking at irqdomain internals. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Hsin-Yi Wang Tested-by: Mark-PK Tsai Signed-off-by: Johan Hovold Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230213104302.17307-14-johan+linaro@kernel.org commit bc1bc1b309b42ff3faea957df7ac9382366c5eef Author: Johan Hovold Date: Mon Feb 13 11:42:54 2023 +0100 x86/ioapic: Use irq_domain_create_hierarchy() Use the irq_domain_create_hierarchy() helper to create the hierarchical domain, which both serves as documentation and avoids poking at irqdomain internals. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Hsin-Yi Wang Tested-by: Mark-PK Tsai Signed-off-by: Johan Hovold Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230213104302.17307-13-johan+linaro@kernel.org commit 930a1bbbef01cdcd682d9c2b4bc9e36b9618fed3 Author: Johan Hovold Date: Mon Feb 13 11:42:53 2023 +0100 irqdomain: Clean up irq_domain_push/pop_irq() The irq_domain_push_irq() interface is used to add a new (outmost) level to a hierarchical domain after IRQs have been allocated. Possibly due to differing mental images of hierarchical domains, the names used for the irq_data variables make these functions much harder to understand than what they need to be. Rename the struct irq_data pointer to the data embedded in the descriptor as simply 'irq_data' and refer to the data allocated by this interface as 'parent_irq_data' so that the names reflect how hierarchical domains are implemented. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Hsin-Yi Wang Tested-by: Mark-PK Tsai Signed-off-by: Johan Hovold Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230213104302.17307-12-johan+linaro@kernel.org commit 4e0d86df9344bfd1951eb2571e4ef8f3d37000a4 Author: Johan Hovold Date: Mon Feb 13 11:42:52 2023 +0100 irqdomain: Drop leftover brackets Drop some unnecessary brackets that were left in place when the corresponding code was updated. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Hsin-Yi Wang Tested-by: Mark-PK Tsai Signed-off-by: Johan Hovold Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230213104302.17307-11-johan+linaro@kernel.org commit 28a9ff23d8b56db09cb01cef174a205ea5e2ca49 Author: Johan Hovold Date: Mon Feb 13 11:42:51 2023 +0100 irqdomain: Drop dead domain-name assignment Since commit d59f6617eef0 ("genirq: Allow fwnode to carry name information only") an IRQ domain is always given a name during allocation (e.g. used for the debugfs entry). Drop the leftover name assignment when allocating the first IRQ. Tested-by: Hsin-Yi Wang Tested-by: Mark-PK Tsai Signed-off-by: Johan Hovold Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230213104302.17307-10-johan+linaro@kernel.org commit 47d1932f37de99bae3345bb93f098ac8750ab0fb Author: Johan Hovold Date: Mon Feb 13 11:42:50 2023 +0100 irqdomain: Drop revmap mutex The revmap mutex is essentially only used to maintain the integrity of the radix tree during updates (lookups use RCU). As the global irq_domain_mutex is now held in all paths that update the revmap structures there is strictly no longer any need for the dedicated mutex, which can be removed. Drop the revmap mutex and add lockdep assertions to the revmap helpers to make sure that the global lock is always held when updating the revmap. Tested-by: Hsin-Yi Wang Tested-by: Mark-PK Tsai Signed-off-by: Johan Hovold Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230213104302.17307-9-johan+linaro@kernel.org commit 8932c32c3053accd50702b36e944ac2016cd103c Author: Marc Zyngier Date: Mon Feb 13 11:42:49 2023 +0100 irqdomain: Fix domain registration race Hierarchical domains created using irq_domain_create_hierarchy() are currently added to the domain list before having been fully initialised. This specifically means that a racing allocation request might fail to allocate irq data for the inner domains of a hierarchy in case the parent domain pointer has not yet been set up. Note that this is not really any issue for irqchip drivers that are registered early (e.g. via IRQCHIP_DECLARE() or IRQCHIP_ACPI_DECLARE()) but could potentially cause trouble with drivers that are registered later (e.g. modular drivers using IRQCHIP_PLATFORM_DRIVER_BEGIN(), gpiochip drivers, etc.). Fixes: afb7da83b9f4 ("irqdomain: Introduce helper function irq_domain_add_hierarchy()") Cc: stable@vger.kernel.org # 3.19 Signed-off-by: Marc Zyngier [ johan: add commit message ] Signed-off-by: Johan Hovold Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230213104302.17307-8-johan+linaro@kernel.org commit 601363cc08da25747feb87c55573dd54de91d66a Author: Johan Hovold Date: Mon Feb 13 11:42:48 2023 +0100 irqdomain: Fix mapping-creation race Parallel probing of devices that share interrupts (e.g. when a driver uses asynchronous probing) can currently result in two mappings for the same hardware interrupt to be created due to missing serialisation. Make sure to hold the irq_domain_mutex when creating mappings so that looking for an existing mapping before creating a new one is done atomically. Fixes: 765230b5f084 ("driver-core: add asynchronous probing support for drivers") Fixes: b62b2cf5759b ("irqdomain: Fix handling of type settings for existing mappings") Link: https://lore.kernel.org/r/YuJXMHoT4ijUxnRb@hovoldconsulting.com Cc: stable@vger.kernel.org # 4.8 Cc: Dmitry Torokhov Cc: Jon Hunter Tested-by: Hsin-Yi Wang Tested-by: Mark-PK Tsai Signed-off-by: Johan Hovold Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230213104302.17307-7-johan+linaro@kernel.org commit d55f7f4c58c07beb5050a834bf57ae2ede599c7e Author: Johan Hovold Date: Mon Feb 13 11:42:47 2023 +0100 irqdomain: Refactor __irq_domain_alloc_irqs() Refactor __irq_domain_alloc_irqs() so that it can be called internally while holding the irq_domain_mutex. This will be used to fix a shared-interrupt mapping race, hence the Fixes tag. Fixes: b62b2cf5759b ("irqdomain: Fix handling of type settings for existing mappings") Cc: stable@vger.kernel.org # 4.8 Tested-by: Hsin-Yi Wang Tested-by: Mark-PK Tsai Signed-off-by: Johan Hovold Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230213104302.17307-6-johan+linaro@kernel.org commit 6e6f75c9c98d2d246d90411ff2b6f0cd271f4cba Author: Johan Hovold Date: Mon Feb 13 11:42:46 2023 +0100 irqdomain: Look for existing mapping only once Avoid looking for an existing mapping twice when creating a new mapping using irq_create_fwspec_mapping() by factoring out the actual allocation which is shared with irq_create_mapping_affinity(). The new helper function will also be used to fix a shared-interrupt mapping race, hence the Fixes tag. Fixes: b62b2cf5759b ("irqdomain: Fix handling of type settings for existing mappings") Cc: stable@vger.kernel.org # 4.8 Tested-by: Hsin-Yi Wang Tested-by: Mark-PK Tsai Signed-off-by: Johan Hovold Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230213104302.17307-5-johan+linaro@kernel.org commit e3b7ab025e931accdc2c12acf9b75c6197f1c062 Author: Johan Hovold Date: Mon Feb 13 11:42:45 2023 +0100 irqdomain: Drop bogus fwspec-mapping error handling In case a newly allocated IRQ ever ends up not having any associated struct irq_data it would not even be possible to dispose the mapping. Replace the bogus disposal with a WARN_ON(). This will also be used to fix a shared-interrupt mapping race, hence the CC-stable tag. Fixes: 1e2a7d78499e ("irqdomain: Don't set type when mapping an IRQ") Cc: stable@vger.kernel.org # 4.8 Tested-by: Hsin-Yi Wang Tested-by: Mark-PK Tsai Signed-off-by: Johan Hovold Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230213104302.17307-4-johan+linaro@kernel.org commit 3f883c38f5628f46b30bccf090faec054088e262 Author: Johan Hovold Date: Mon Feb 13 11:42:44 2023 +0100 irqdomain: Fix disassociation race The global irq_domain_mutex is held when mapping interrupts from non-hierarchical domains but currently not when disposing them. This specifically means that updates of the domain mapcount is racy (currently only used for statistics in debugfs). Make sure to hold the global irq_domain_mutex also when disposing mappings from non-hierarchical domains. Fixes: 9dc6be3d4193 ("genirq/irqdomain: Add map counter") Cc: stable@vger.kernel.org # 4.13 Tested-by: Hsin-Yi Wang Tested-by: Mark-PK Tsai Signed-off-by: Johan Hovold Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230213104302.17307-3-johan+linaro@kernel.org commit b06730a571a9ff1ba5bd6b20bf9e50e5a12f1ec6 Author: Johan Hovold Date: Mon Feb 13 11:42:43 2023 +0100 irqdomain: Fix association race The sanity check for an already mapped virq is done outside of the irq_domain_mutex-protected section which means that an (unlikely) racing association may not be detected. Fix this by factoring out the association implementation, which will also be used in a follow-on change to fix a shared-interrupt mapping race. Fixes: ddaf144c61da ("irqdomain: Refactor irq_domain_associate_many()") Cc: stable@vger.kernel.org # 3.11 Tested-by: Hsin-Yi Wang Tested-by: Mark-PK Tsai Signed-off-by: Johan Hovold Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230213104302.17307-2-johan+linaro@kernel.org commit 5a9e358f1d1f5a2c2dfd8055b0e9e44d58a54a49 Author: Lukas Wunner Date: Wed Feb 8 06:59:51 2023 +0100 ACPICA: Fix typo in CDAT DSMAS struct definition ACPICA commit 9d8bd58d5f3495ce76d1b9767ec0b92251cbc366 Link: https://github.com/acpica/acpica/commit/9d8bd58d5f34 Signed-off-by: Lukas Wunner Reviewed-by: Ira Weiny Signed-off-by: Rafael J. Wysocki commit 4ec98e6db9f24a9f4716685c62c9f6c348fec45b Author: Asahi Lina Date: Sat Feb 11 18:13:02 2023 +0900 soc: apple: rtkit: Do not copy the reg state structure to the stack The register state struct is 848 bytes, which ends up bloating the apple_rtkit_crashlog_dump_regs stack frame beyond 1024 on some 32-bit platforms, triggering compile warnings. This doesn't matter for 64BIT/ARM64, but there's also no good reason to copy the structure to the stack in this case. We can use __packed to avoid alignment issues, there are no double-read hazards, and this is a fatal error path so performance does not matter. Fixes: 22991d8d5725 ("soc: apple: rtkit: Add register dump decoding to crashlog") Signed-off-by: Asahi Lina Reviewed-by: Eric Curtin Signed-off-by: Arnd Bergmann commit c6cd63f5af3921c484be5789cf23e0f276de3a2f Author: Mark Brown Date: Fri Feb 10 19:52:49 2023 +0000 arm64: configs: Add virtconfig Provide a slimline configuration intended to be booted on virtual machines, with the goal of providing a light configuration which will boot on and enable features available in mach-virt. This is defined in terms of the standard defconfig, with an additional virt.config fragment which disables options unneeded in a virtual configuration. As a first step we just disable all the ARCH_ configuration options, disabling the build of all the SoC specific drivers. This results in a kernel that builds about 25% faster in my testing, if this approach works for people we can add further options. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230203-arm64-defconfigs-v1-3-cd0694a05f13@kernel.org Signed-off-by: Arnd Bergmann commit a63971257e66bbf354e8801623caffa965e9ba5c Author: Mark Brown Date: Fri Feb 10 19:52:48 2023 +0000 kbuild: Provide a version of merge_into_defconfig without override warnings While warning on overridden Kconfig options is a good default for merging config fragements sometimes that is our explicit intent and the warnings are unhelpful, add a new merge_into_defconfig_override which does the merge but with warnings suppressed. Since merge_into_defconfig accepts any number of fragments it is difficult to allow it to accept the flag. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230203-arm64-defconfigs-v1-2-cd0694a05f13@kernel.org Signed-off-by: Arnd Bergmann commit 46dff8d7e381e74a501cbec6285a21dba1d9fccf Author: Mark Brown Date: Fri Feb 10 19:52:47 2023 +0000 scripts: merge_config: Add option to suppress warning on overrides Currently merge_config.sh will unconditionally warn if a fragment overrides any already set symbol. This is generally desirable but is inconvenient in cases where we want to create a fragment which disables unwanted options in the base configuration, for example when attempting to produce a smaller version of another configuration. Add an option -Q which will suppress these warnings. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230203-arm64-defconfigs-v1-1-cd0694a05f13@kernel.org Signed-off-by: Arnd Bergmann commit 17bb7046e7ce038a73ee97eaa804e0300c5199e2 Author: Werner Sembach Date: Mon Feb 13 19:16:53 2023 +0100 ACPI: resource: Do IRQ override on all TongFang GMxRGxx Apply commit 7592b79ba4a9 ("ACPI: resource: do IRQ override on XMG Core 15") override for all vendors using this mainboard. Signed-off-by: Werner Sembach Fixes: 9946e39fe8d0 ("ACPI: resource: skip IRQ override on AMD Zen platforms") Signed-off-by: Rafael J. Wysocki commit ab407a1919d2676ddc5761ed459d4cc5c7be18ed Merge: 7b0f95f28fc74 0051293c53301 Author: Thomas Gleixner Date: Mon Feb 13 19:28:48 2023 +0100 Merge tag 'clocksource.2023.02.06b' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into timers/core Pull clocksource watchdog changes from Paul McKenney: o Improvements to clocksource-watchdog console messages. o Loosening of the clocksource-watchdog skew criteria to match those of NTP (500 parts per million, relaxed from 400 parts per million). If it is good enough for NTP, it is good enough for the clocksource watchdog. o Suspend clocksource-watchdog checking temporarily when high memory latencies are detected. This avoids the false-positive clock-skew events that have been seen on production systems running memory-intensive workloads. o On systems where the TSC is deemed trustworthy, use it as the watchdog timesource, but only when specifically requested using the tsc=watchdog kernel boot parameter. This permits clock-skew events to be detected, but avoids forcing workloads to use the slow HPET and ACPI PM timers. These last two timers are slow enough to cause systems to be needlessly marked bad on the one hand, and real skew does sometimes happen on production systems running production workloads on the other. And sometimes it is the fault of the TSC, or at least of the firmware that told the kernel to program the TSC with the wrong frequency. o Add a tsc=revalidate kernel boot parameter to allow the kernel to diagnose cases where the TSC hardware works fine, but was told by firmware to tick at the wrong frequency. Such cases are rare, but they really have happened on production systems. Link: https://lore.kernel.org/r/20230210193640.GA3325193@paulmck-ThinkPad-P17-Gen-1 commit cb18703c179713056bd7e3bdfc2260ab4e8658f0 Author: Adam Niederer Date: Sat Feb 11 15:13:33 2023 -0500 ACPI: resource: Add IRQ overrides for MAINGEAR Vector Pro 2 models Fix a regression introduced by commit 9946e39fe8d0 ("ACPI: resource: skip IRQ override on AMD Zen platforms") on MAINGEAR Vector Pro 2 systems, which causes the built-in keyboard to not work. This restores the functionality by adding an IRQ override. No other IRQs were being overridden before, so this should be all that is needed for these systems. I have personally tested this on the 15" model (MG-VCP2-15A3070T), and I have confirmation that the issue is present on the 17" model (MG-VCP2-17A3070T). Fixes: 9946e39fe8d0 ("ACPI: resource: skip IRQ override on AMD Zen platforms") Signed-off-by: Adam Niederer Signed-off-by: Rafael J. Wysocki commit 7b0f95f28fc74f2a92662c26044d9d31c5ffd1e1 Merge: 5b268d8abaec6 5ccb51b06c8bf Author: Thomas Gleixner Date: Mon Feb 13 19:21:38 2023 +0100 Merge tag 'timers-v6.3-rc1' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core Pull clocksource/event changes from Daniel Lezcano: - Add rktimer for rv1126 Rockchip based board (Jagan Teki) - Initialize hrtimer based broadcast clock event device on RISC-V before C3STOP can be used (Conor Dooley) - Add DT binding for RISC-V timer and add the C3STOP flag if the DT tells the timer can not wake up the CPU (Anup Patel) - Increase the RISC-V timer rating as it is more efficient than mmio timers (Samuel Holland) - Drop obsolete dependency on COMPILE_TEST on microchip-pit64b as the OF is already depending on it (Jean Delvare) - Mark sh_cmt, sh_tmu, em_sti drivers as non-removable (Uwe Kleine-König) - Add binding description for mediatek,mt8365-systimer (Bernhard Rosenkränzer) - Add compatibles for T-Head's C9xx (Icenowy Zheng) - Restrict the microchip-pit64b compilation to the ARM architecture and add the delay timer (Claudiu Beznea) - Set the static key to select the SBI or Sstc timer sooner to prevent the first call to use the SBI while Sstc must be used (Matt Evans) - Add the CLOCK_EVT_FEAT_DYNIRQ flag to optimize the timer wake up on the sun4i platform (Yangtao Li) Link: https://lore.kernel/org/r/b7d1d982-d717-2930-b353-19b92cbe390f@linaro.org commit 41a337b40e983db4f0e1602308109f2b93687a06 Author: Richard Fitzgerald Date: Mon Feb 13 16:50:05 2023 +0000 PM: Add EXPORT macros for exporting PM functions Add a pair of macros for exporting functions only if CONFIG_PM is enabled. The naming follows the style of the standard EXPORT_SYMBOL_*() macros that they replace. Sometimes a module wants to export PM functions directly to other drivers, not a complete struct dev_pm_ops. A typical example is where a core library exports the generic (shared) implementation and calling code wraps one or more of these in custom code. Signed-off-by: Richard Fitzgerald Signed-off-by: Rafael J. Wysocki commit 39c536acc3cf89b49c22f9e7f3f6578d3332944e Merge: 0b0757244754e ad07f29b9c9a2 Author: Daniel Borkmann Date: Mon Feb 13 19:13:13 2023 +0100 Merge branch 'xdp-ice-mbuf' Alexander Lobakin says: ==================== The set grew from the poor performance of %BPF_F_TEST_XDP_LIVE_FRAMES when the ice-backed device is a sender. Initially there were around 3.3 Mpps / thread, while I have 5.5 on skb-based pktgen ... After fixing 0005 (0004 is a prereq for it) first (strange thing nobody noticed that earlier), I started catching random OOMs. This is how 0002 (and partially 0001) appeared. 0003 is a suggestion from Maciej to not waste time on refactoring dead lines. 0006 is a "cherry on top" to get away with the final 6.7 Mpps. 4.5 of 6 are fixes, but only the first three are tagged, since it then starts being tricky. I may backport them manually later on. TL;DR for the series is that shortcuts are good, but only as long as they don't make the driver miss important things. %XDP_TX is purely driver-local, however .ndo_xdp_xmit() is not, and sometimes assumptions can be unsafe there. With that series and also one core code patch[0], "live frames" and xdp-trafficgen are now safe'n'fast on ice (probably more to come). [0] https://lore.kernel.org/all/20230209172827.874728-1-alexandr.lobakin@intel.com ==================== Signed-off-by: Daniel Borkmann commit ad07f29b9c9a29eba04b19116c6db51387a638d7 Author: Alexander Lobakin Date: Fri Feb 10 18:06:18 2023 +0100 ice: Micro-optimize .ndo_xdp_xmit() path After the recent mbuf changes, ice_xmit_xdp_ring() became a 3-liner. It makes no sense to keep it global in a different file than its caller. Move it just next to the sole call site and mark static. Also, it doesn't need a full xdp_convert_frame_to_buff(). Save several cycles and fill only the fields used by __ice_xmit_xdp_ring() later on. Finally, since it doesn't modify @xdpf anyhow, mark the argument const to save some more (whole -11 bytes of .text! :D). Thanks to 1 jump less and less calcs as well, this yields as many as 6.7 Mpps per queue. `xdp.data_hard_start = xdpf` is fully intentional again (see xdp_convert_buff_to_frame()) and just works when there are no source device's driver issues. Signed-off-by: Alexander Lobakin Signed-off-by: Daniel Borkmann Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/bpf/20230210170618.1973430-7-alexandr.lobakin@intel.com commit 055d0920685e53ed8c2ad914888724d69dca17c6 Author: Alexander Lobakin Date: Fri Feb 10 18:06:17 2023 +0100 ice: Fix freeing XDP frames backed by Page Pool As already mentioned, freeing any &xdp_frame via page_frag_free() is wrong, as it assumes the frame is backed by either an order-0 page or a page with no "patrons" behind them, while in fact frames backed by Page Pool can be redirected to a device, which's driver doesn't use it. Keep storing a pointer to the raw buffer and then freeing it unconditionally via page_frag_free() for %XDP_TX frames, but introduce a separate type in the enum for frames coming through .ndo_xdp_xmit(), and free them via xdp_return_frame_bulk(). Note that saving xdpf as xdp_buff->data_hard_start is intentional and is always true when everything is configured properly. After this change, %XDP_REDIRECT from a Page Pool based driver to ice becomes zero-alloc as it should be and horrendous 3.3 Mpps / queue turn into 6.6, hehe. Let it go with no "Fixes:" tag as it spans across good 5+ commits and can't be trivially backported. Signed-off-by: Alexander Lobakin Signed-off-by: Daniel Borkmann Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/bpf/20230210170618.1973430-6-alexandr.lobakin@intel.com commit aa1d3faf71a6a46f9b859daa8ffa5b86fa07217c Author: Alexander Lobakin Date: Fri Feb 10 18:06:16 2023 +0100 ice: Robustify cleaning/completing XDP Tx buffers When queueing frames from a Page Pool for redirecting to a device backed by the ice driver, `perf top` shows heavy load on page_alloc() and page_frag_free(), despite that on a properly working system it must be fully or at least almost zero-alloc. The problem is in fact a bit deeper and raises from how ice cleans up completed Tx buffers. The story so far: when cleaning/freeing the resources related to a particular completed Tx frame (skbs, DMA mappings etc.), ice uses some heuristics only without setting any type explicitly (except for dummy Flow Director packets, which are marked via ice_tx_buf::tx_flags). This kinda works, but only up to some point. For example, currently ice assumes that each frame coming to __ice_xmit_xdp_ring(), is backed by either plain order-0 page or plain page frag, while it may also be backed by Page Pool or any other possible memory models introduced in future. This means any &xdp_frame must be freed properly via xdp_return_frame() family with no assumptions. In order to do that, the whole heuristics must be replaced with setting the Tx buffer/frame type explicitly, just how it's always been done via an enum. Let us reuse 16 bits from ::tx_flags -- 1 bit-and instr won't hurt much -- especially given that sometimes there was a check for %ICE_TX_FLAGS_DUMMY_PKT, which is now turned from a flag to an enum member. The rest of the changes is straightforward and most of it is just a conversion to rely now on the type set in &ice_tx_buf rather than to some secondary properties. For now, no functional changes intended, the change only prepares the ground for starting freeing XDP frames properly next step. And it must be done atomically/synchronously to not break stuff. Signed-off-by: Alexander Lobakin Signed-off-by: Daniel Borkmann Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/bpf/20230210170618.1973430-5-alexandr.lobakin@intel.com commit 923096b5cec3a68cc4b3816b1b9a50139df62ac7 Author: Alexander Lobakin Date: Fri Feb 10 18:06:15 2023 +0100 ice: Remove two impossible branches on XDP Tx cleaning The tagged commit started sending %XDP_TX frames from XSk Rx ring directly without converting it to an &xdp_frame. However, when XSk is enabled on a queue pair, it has its separate Tx cleaning functions, so neither ice_clean_xdp_irq() nor ice_unmap_and_free_tx_buf() ever happens there. Remove impossible branches in order to reduce the diffstat of the upcoming change. Fixes: a24b4c6e9aab ("ice: xsk: Do not convert to buff to frame for XDP_TX") Suggested-by: Maciej Fijalkowski Signed-off-by: Alexander Lobakin Signed-off-by: Daniel Borkmann Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/bpf/20230210170618.1973430-4-alexandr.lobakin@intel.com commit 0bd939b60ceaa6cf2894678f40b96f61b2501658 Author: Alexander Lobakin Date: Fri Feb 10 18:06:14 2023 +0100 ice: Fix XDP Tx ring overrun Sometimes, under heavy XDP Tx traffic, e.g. when using XDP traffic generator (%BPF_F_TEST_XDP_LIVE_FRAMES), the machine can catch OOM due to the driver not freeing all of the pages passed to it by .ndo_xdp_xmit(). Turned out that during the development of the tagged commit, the check, which ensures that we have a free descriptor to queue a frame, moved into the branch happening only when a buffer has frags. Otherwise, we only run a cleaning cycle, but don't check anything. ATST, there can be situations when the driver gets new frames to send, but there are no buffers that can be cleaned/completed and the ring has no free slots. It's very rare, but still possible (> 6.5 Mpps per ring). The driver then fills the next buffer/descriptor, effectively overwriting the data, which still needs to be freed. Restore the check after the cleaning routine to make sure there is a slot to queue a new frame. When there are frags, there still will be a separate check that we can place all of them, but if the ring is full, there's no point in wasting any more time. (minor: make `!ready_frames` unlikely since it happens ~1-2 times per billion of frames) Fixes: 3246a10752a7 ("ice: Add support for XDP multi-buffer on Tx side") Signed-off-by: Alexander Lobakin Signed-off-by: Daniel Borkmann Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/bpf/20230210170618.1973430-3-alexandr.lobakin@intel.com commit bc4db83470034b4644a8bf164a984bdb68b61622 Author: Alexander Lobakin Date: Fri Feb 10 18:06:13 2023 +0100 ice: fix ice_tx_ring:: Xdp_tx_active underflow xdp_tx_active is used to indicate whether an XDP ring has any %XDP_TX frames queued to shortcut processing Tx cleaning for XSk-enabled queues. When !XSk, it simply indicates whether the ring has any queued frames in general. It gets increased on each frame placed onto the ring and counts the whole frame, not each frag. However, currently it gets decremented in ice_clean_xdp_tx_buf(), which is called per each buffer, i.e. per each frag. Thus, on completing multi-frag frames, an underflow happens. Move the decrement to the outer function and do it once per frame, not buf. Also, do that on the stack and update the ring counter after the loop is done to save several cycles. XSk rings are fine since there are no frags at the moment. Fixes: 3246a10752a7 ("ice: Add support for XDP multi-buffer on Tx side") Signed-off-by: Alexander Lobakin Signed-off-by: Daniel Borkmann Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/bpf/20230210170618.1973430-2-alexandr.lobakin@intel.com commit 3eea2c615e25f7a3a7b40912358ed54b5d2f0ff2 Merge: 9d5dbfe0e170c 801fc159e30d3 Author: Kalle Valo Date: Mon Feb 13 20:08:01 2023 +0200 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for v6.3. Major changes: ath12k * new driver for Qualcomm Wi-Fi 7 devices ath11k * IPQ5018 support * Fine Timing Measurement (FTM) responder role support * channel 177 support ath10k * store WLAN firmware version in SMEM image table commit 273a51e5521213a13e5852e762cc9c03c66b9baa Author: Thomas Weißschuh Date: Thu Feb 9 03:20:10 2023 +0000 f2fs: 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: Chao Yu Signed-off-by: Jaegeuk Kim commit 9d5dbfe0e170cb5d58422b890d4d23c8e70d1f28 Author: Tom Rix Date: Sat Feb 4 12:09:02 2023 -0800 wifi: zd1211rw: remove redundant decls building with W=2 has these errors redundant redeclaration of ‘zd_rf_generic_patch_6m’ [-Werror=redundant-decls] redundant redeclaration of ‘zd_rf_patch_6m_band_edge’ [-Werror=redundant-decls] Remove the second decls. Signed-off-by: Tom Rix Reviewed-by: Simon Horman Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230204200902.1709343-1-trix@redhat.com commit 6869ba4911df3a0af4863708c0f61449d54eb199 Author: Ping-Ke Shih Date: Thu Jan 19 19:31:46 2023 +0800 wifi: rtl8xxxu: fix txdw7 assignment of TX DESC v3 Type of txdw7 is __le16, so assign __le32 is wrong. Also, the TXDESC_ANTENNA_SELECT_C is defined for __le32, so shift 16 bits to fit the value. Compile test only. sparse warnings: (new ones prefixed by >>) >> rtl8xxxu_core.c:5198:24: sparse: sparse: invalid assignment: |= >> rtl8xxxu_core.c:5198:24: sparse: left side has type restricted __le16 >> rtl8xxxu_core.c:5198:24: sparse: right side has type restricted __le32 Reported-by: kernel test robot Signed-off-by: Ping-Ke Shih Tested-by: Bitterblue Smith Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230119113146.9640-1-pkshih@realtek.com commit 2cef0aeebf2c1e6b49ac7b92f234db8c81e8eb35 Author: Bitterblue Smith Date: Fri Jan 20 17:55:09 2023 +0200 wifi: rtl8xxxu: Add LED control code for RTL8723AU By default the LED will blink when there is some activity. This is only compile tested. Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/73323811-aa58-a1be-7867-a5d45b7ae3d6@gmail.com commit ae0a6df673c2ca9a0843127e4a6e72a1c80f1215 Author: Bitterblue Smith Date: Fri Jan 20 17:54:18 2023 +0200 wifi: rtl8xxxu: Add LED control code for RTL8192EU By default the LED will blink when there is some activity. This was tested with a cheap "HT-WR813" from Aliexpress. Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/8f7fd5d7-5baa-b38b-ad2a-977dcd9edd81@gmail.com commit 873b3811728b39a83a807fbccaa14d517f740ac8 Author: Bitterblue Smith Date: Fri Jan 20 17:52:40 2023 +0200 wifi: rtl8xxxu: Add LED control code for RTL8188EU By default the LED will blink when there is some activity. This was tested with a TP-Link TL-WN725N. Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/34d62bf5-3595-0c77-2ca7-be78555f765d@gmail.com commit 3be01622995bb1a360718f7e5e8cee1879795fa5 Author: Bitterblue Smith Date: Fri Jan 20 17:51:21 2023 +0200 wifi: rtl8xxxu: Register the LED and make it blink If the chip can have an LED, register a struct led_classdev and enable hardware-controlled blinking. When the chip is not transmitting or receiving anything the LED is off. Otherwise the LED will blink faster or slower according to the throughput. The LED can be controlled from userspace by writing 0, 1, or 2 to /sys/class/leds/rtl8xxxu-usbX-Y/brightness: 0 - solid off. 1 - solid on. 2 - hardware-controlled blinking. In this patch none of the chips advertise having an LED. That will be added in the next patches. Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/b8235bca-60c3-d0fe-a958-53c6dd3ba3f6@gmail.com commit c6e3dc99fd321b85b9766d51844aebc9ce769059 Author: Peter Lafreniere Date: Wed Jan 18 13:53:53 2023 -0500 wifi: rsi: Avoid defines prefixed with CONFIG Macros prefixed with CONFIG_ are intended to be defined only by Kconfig scripts. Here we remove the prefix from the CONFIG_AUTO_READ_MODE define to avoid confusion when reading the code. This causes no change to functionality. Signed-off-by: Peter Lafreniere Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230118185353.2422-1-peter@n8pjl.ca commit ddf9a2ead1676db46abe8acca3f689fd572a44d1 Author: Zong-Zhe Yang Date: Fri Feb 3 14:51:57 2023 +0800 wifi: rtw89: phy: set TX power according to RF path number by chip Previously, all supported chips had two RF paths. Therefore, these codes used static number for TX power setting. Now, we are planning to support a new chip which has only one RF path. So, we refine the setting codes to refer to chip's RF path number at runtime. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230203065157.8227-1-pkshih@realtek.com commit 5466ee9a7c63e18d3daea0bf80152944648218d2 Author: Ping-Ke Shih Date: Fri Feb 3 14:49:07 2023 +0800 wifi: rtw89: 8852b: correct register mask name of TX power offset For a packet with 1SS rate, it can also transmit via 2 antenna, called 2T mode. For 2T TX power offset, mask should be 2T as well. Fortunately, the mask of 2T and 1T are the same, so it can still work well without this fix. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230203064907.8046-1-pkshih@realtek.com commit 764f07f4565da0c0f94f24d18f9d6f5ddb39ccd8 Author: Zong-Zhe Yang Date: Wed Feb 1 11:20:57 2023 +0800 wifi: rtw89: use passed channel in set_tx_shape_dfir() In path of setting channel and setting TX power, the rtw89_chan instance to be used is controlled by top and passed down. The set_tx_shape_dfir() is in path of setting TX power, so it should use the passed rtw89_chan instead of querying it itself. Otherwise, it might encounter mismatch between parameters if multi-channel. For example, rtw89_8852ce 0000:04:00.0: set tx shape dfir by unknown ch: 155 on 2GHz Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230201032057.7349-1-pkshih@realtek.com commit 3712888e3dba5df2b4f3fb3ba87e20bac6afc7c0 Author: Chin-Yen Lee Date: Thu Jan 26 19:27:15 2023 +0800 wifi: rtw89: 8852be: enable CLKREQ of PCI capability Enable CLKREQ to reduce power consumption for 8852BE. Signed-off-by: Chin-Yen Lee Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230126112715.5811-1-pkshih@realtek.com commit 7410bd727584ea9b3e1050c56fdf60d883398956 Author: Ping-Ke Shih Date: Mon Jan 23 14:54:01 2023 +0800 wifi: rtw89: 8852b: try to use NORMAL_CE type firmware first New firmware type NORMAL_CE is introduced to support P2P-PS and hardware scan, but no LPS-PG mode. After this patch, old firmware with NORMAL type can still work well. The use of this new type is the same as before, so we add new type to avoid taking wrong firmware. Then, driver log can also give clear information about this change: rtw89_8852be 0000:03:00.0: Firmware version 0.29.26.0, cmd version 0, type 5 rtw89_8852be 0000:03:00.0: Firmware version 0.29.26.0, cmd version 0, type 3 Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230123065401.14174-7-pkshih@realtek.com commit e5624482ba3e98f0c34fc72bca509c6017266253 Author: Ping-Ke Shih Date: Mon Jan 23 14:54:00 2023 +0800 wifi: rtw89: 8852b: don't support LPS-PG mode after firmware 0.29.26.0 Due to firmware size limit of 8852b, LPS-PG mode isn't supported after 0.29.26.0, and then we have more space to support other features, such as P2P-PS, hardware scan and so on. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230123065401.14174-6-pkshih@realtek.com commit 2e5a65f5952fe451777066e99531abc6bc684573 Author: Ping-Ke Shih Date: Mon Jan 23 14:53:59 2023 +0800 wifi: rtw89: 8852b: reset IDMEM mode to default value For different firmware type, it could use different IDMEM mode, so reset it to default to avoid encountering error during we bisect firmware version, like rtw89_8852be 0000:03:00.0: Firmware version 0.29.26.0, cmd version 0, type 5 rtw89_8852be 0000:03:00.0: Firmware version 0.29.26.0, cmd version 0, type 3 rtw89_8852be 0000:03:00.0: fw security fail rtw89_8852be 0000:03:00.0: download firmware fail rtw89_8852be 0000:03:00.0: [ERR]fwdl 0x1E0 = 0x62 rtw89_8852be 0000:03:00.0: [ERR]fwdl 0x83F2 = 0x8 rtw89_8852be 0000:03:00.0: [ERR]fw PC = 0xb8931154 rtw89_8852be 0000:03:00.0: [ERR]fw PC = 0xb8931154 rtw89_8852be 0000:03:00.0: [ERR]fw PC = 0xb8931150 rtw89_8852be 0000:03:00.0: [ERR]fw PC = 0xb8931154 Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230123065401.14174-5-pkshih@realtek.com commit 5da5ba7e6ec4f13c2abba8de3578a3c197925243 Author: Ping-Ke Shih Date: Mon Jan 23 14:53:58 2023 +0800 wifi: rtw89: add use of pkt_list offload to debug entry Driver can prepare pkt_list for firmware that only uses them to send out the packets in specific situations. To understand the usage of current status, and to check if there is leakage problem, dump bitmap and the indices used by certain function. An example looks like: map: ... pkt_ofld: 3f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... [SCAN 0]: 3 [SCAN 1]: 4 [SCAN 3]: 5 VIF [0] xx:xx:xx:xx:xx:xx ... pkt_ofld[GENERAL]: 0 1 2 Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230123065401.14174-4-pkshih@realtek.com commit 5c12bb66b79d08b0f7aae99fc2677cab1141d4d2 Author: Chin-Yen Lee Date: Mon Jan 23 14:53:57 2023 +0800 wifi: rtw89: refine packet offload flow For upcoming firmware, driver needs to do packet offload to firmware to ensure LPS protocol work properly, so we update current connection and disconnect flow to maintain packet offload flow, and integrate with current WoWLAN flow which also needs packet offload. Signed-off-by: Chin-Yen Lee Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230123065401.14174-3-pkshih@realtek.com commit b8e8ff842b1bfe7602409fc71ee812db871ccce6 Author: Chin-Yen Lee Date: Mon Jan 23 14:53:56 2023 +0800 wifi: rtw89: fix potential wrong mapping for pkt-offload When driver fails to send H2C to firmware for pkt-offload, we should not update the pkt_list of driver, and need to release allocated pkt index to avoid wrong mapping between driver and firmware. Signed-off-by: Chin-Yen Lee Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230123065401.14174-2-pkshih@realtek.com commit d881d0a13c3843d213da23cde99bb73f27e53d1e Author: Kuan-Chung Chen Date: Thu Jan 19 14:46:31 2023 +0800 wifi: rtw89: disallow enter PS mode after create TDLS link Buffer STA on TDLS links are not currently supported. Therefore, it is not allowed to enter the PS mode after TDLS link is established. Signed-off-by: Kuan-Chung Chen Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230119064631.66971-1-pkshih@realtek.com commit 0b0757244754ea1d0721195c824770f5576e119e Author: Ilya Leoshkevich Date: Thu Feb 9 00:12:11 2023 +0100 selftests/bpf: Fix out-of-srctree build Building BPF selftests out of srctree fails with: make: *** No rule to make target '/linux-build//ima_setup.sh', needed by 'ima_setup.sh'. Stop. The culprit is the rule that defines convenient shorthands like "make test_progs", which builds $(OUTPUT)/test_progs. These shorthands make sense only for binaries that are built though; scripts that live in the source tree do not end up in $(OUTPUT). Therefore drop $(TEST_PROGS) and $(TEST_PROGS_EXTENDED) from the rule. The issue exists for a while, but it became a problem only after commit d68ae4982cb7 ("selftests/bpf: Install all required files to run selftests"), which added dependencies on these scripts. Fixes: 03dcb78460c2 ("selftests/bpf: Add simple per-test targets to Makefile") Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230208231211.283606-1-iii@linux.ibm.com commit 214a98b151b14d3dbfa60136abcf99df5d347a80 Author: Zong-Zhe Yang Date: Thu Jan 19 14:43:42 2023 +0800 wifi: rtw89: refine MCC C2H debug logs To debug channel concurrency more centrally, we add a new debug flag, RTW89_DBG_CHAN, for channel related things, especially channel concurrency. Then, we change MCC (multi-channel concurrency) C2H (chip to host packets) debug flag to it. Besides, refine debug logs to show TSF in u64 directly. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230119064342.65391-2-pkshih@realtek.com commit 24d72944d79e6795ba4330c114de0387386bf3aa Author: Zong-Zhe Yang Date: Thu Jan 19 14:43:41 2023 +0800 wifi: rtw89: fix parsing offset for MCC C2H A 8-byte offset is missed during parsing C2Hs (chip to host packets) of MCC (multi-channel concurrent) series. So, we fix it. Fixes: ef9dff4cb491 ("wifi: rtw89: mac: process MCC related C2H") Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230119064342.65391-1-pkshih@realtek.com commit 6e81461b06b6a4a24bf97fca37d9b89f72ce8126 Author: Shuah Khan Date: Fri Feb 10 17:20:57 2023 -0700 selftests/ptp: Remove clean target from Makefile Fix the following build warn removing unnecessary clean target from the Makefile. lib.mk handles clean. Makefile:10: warning: overriding recipe for target clean ../lib.mk:124: warning: ignoring old recipe for target clean In addition, fix to use TEST_GEN_PROGS for generated test executables and TES_PROGS for the shell script. Ger rid of all target as lib.mk handles it. Signed-off-by: Shuah Khan commit f5d98831badb89172515ac73015d0e7475a285c1 Author: Zong-Zhe Yang Date: Thu Jan 19 14:35:29 2023 +0800 wifi: rtw89: deal with RXI300 error RXI300 is a HW design to maintain stuffs across BUS, e.g. AXI, AHB, APB. It will feedback an error when host does an invalid BUS operation. For example, * BUS master request without power/clock on. * host reads/writes/accesses an invalid address. They might lead to problems such as BUS timeout, platform hang, etc. So, once if RXI300 feedback an error, it notifies that driver need a L2 SER (system error recovery) to reset things. Previously, driver did not parse the error scenario for RXI300. We add it and assign a corresponding error code which will make SER flow do L2 reset. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230119063529.61563-3-pkshih@realtek.com commit c074da21dd346e0cfef5d08b0715078d7aea7f8d Author: Zong-Zhe Yang Date: Thu Jan 19 14:35:28 2023 +0800 wifi: rtw89: debug: avoid invalid access on RTW89_DBG_SEL_MAC_30 Only 8852C chip has valid pages on RTW89_DBG_SEL_MAC_30. To other chips, this section is an address hole. It will lead to crash if trying to access this section on chips except for 8852C. So, we avoid that. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230119063529.61563-2-pkshih@realtek.com commit 76f478a34dafcee28165022b2f73d0ee1f0f47e5 Author: Zong-Zhe Yang Date: Thu Jan 19 14:24:53 2023 +0800 wifi: rtw89: mac: add function to get TSF Add mac function rtw89_mac_port_get_tsf() to get TSF by port. It will be used when MCC (multi-channel concurrency) calculates timing things. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230119062453.58341-4-pkshih@realtek.com commit 42db7edd5c0523b43a004779caf36e1ebac80b40 Author: Zong-Zhe Yang Date: Thu Jan 19 14:24:52 2023 +0800 wifi: rtw89: split out generic part of rtw89_mac_port_tsf_sync() Originally, rtw89_mac_port_tsf_sync() contains randomization logic internally. However, not all situation, we need the randomization. So, split out the generic part from it. And, make the full logic of original one contained in rtw89_mac_port_tsf_sync_rand(). It will still be used by its original caller as before. Then, the generic one will be used in MCC (multi-channel concurrency) management flow. MCC will implement its logic to decide the offset for TSF sync. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230119062453.58341-3-pkshih@realtek.com commit 1120e6a6c5cd1144694209d6aa6a225af064950a Author: Zong-Zhe Yang Date: Thu Jan 19 14:24:51 2023 +0800 wifi: rtw89: correct unit for port offset and refine macro Strictly speaking, the unit of the offset should be TU instead of ms. So, correct it and the macro for calculation. Then, to make the macro generic, the factor n is moved outside. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230119062453.58341-2-pkshih@realtek.com commit de06588cb95cb3bbece81e9838547c1a3c2aa023 Author: Ching-Te Ku Date: Tue Jan 17 19:41:09 2023 +0800 wifi: rtw89: coex: Update Wi-Fi Bluetooth coexistence version to 7.0.0 Should update the 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 Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230117114109.4298-9-pkshih@realtek.com commit 4b3e7e813bba53402af13ecd5343ac9667ca7608 Author: Ching-Te Ku Date: Tue Jan 17 19:41:08 2023 +0800 wifi: rtw89: coex: Fix test fail when coexist with raspberryPI A2DP idle The origin code will enable TDMA WL:BT = 50:50 to prevent Wi-Fi throughput suddenly drop to 0 in the moment while A2DP pause. And this protection just a short moment, and will turn to Bluetooth idle case when A2DP turn into sniff mode. But the raspberryPI simulated A2DP device will not turn into sniff mode. So the protection will bring the throughput drop. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230117114109.4298-8-pkshih@realtek.com commit c7d2b22f52bd0088cd39dba57bb7c1e8f3df5489 Author: Ching-Te Ku Date: Tue Jan 17 19:41:07 2023 +0800 wifi: rtw89: coex: Correct A2DP exist variable source When Wi-Fi enter and leave LPS, coexistence driver need to know is there A2DP exist or not. And when Wi-Fi sleep in deep power save state will not able to receive mailbox sent from Bluetooth. So update the A2DP exist information from reading register. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230117114109.4298-7-pkshih@realtek.com commit 6d2a479c1f9e957908d0fc9d56b9831a48f5ce80 Author: Ching-Te Ku Date: Tue Jan 17 19:41:06 2023 +0800 wifi: rtw89: coex: Set Bluetooth background scan PTA request priority When Wi-Fi is RX, set Bluetooth background scan to low-priority and not to break Wi-Fi packet. Bluetooth can RX depend on hardware ability even RX request has been rejected. This way can improve Wi-Fi RX throughput performance. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230117114109.4298-6-pkshih@realtek.com commit 7cd8200555d4f01183f0b9071e0760c389a51816 Author: Ching-Te Ku Date: Tue Jan 17 19:41:05 2023 +0800 wifi: rtw89: coex: Refine coexistence log Adjust the log format and correct variable reference to make the log 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/20230117114109.4298-5-pkshih@realtek.com commit 3f857b23dd8dae2c7301476e8e183628edc694d1 Author: Ching-Te Ku Date: Tue Jan 17 19:41:04 2023 +0800 wifi: rtw89: coex: Force to update TDMA parameter when radio state change Force firmware to update TDMA parameter when enter/exit power saving. The TDMA instant feature will make firmware force update TDMA parameter immediately when the TDMA parameter H2C to firmware. Without this feature, it will have a low fail rate trigger Bluetooth audio sound glitch when Wi-Fi is under power saving. Or Wi-Fi fail to turn in to power save state. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230117114109.4298-4-pkshih@realtek.com commit aae256c0f2334691645d52e7cc965bf4241b599b Author: Ching-Te Ku Date: Tue Jan 17 19:41:03 2023 +0800 wifi: rtw89: coex: Clear Bluetooth HW PTA counter when radio state change Reset the counter no matter Wi-Fi is notified turning into power save or not. With rest the counter coexistence will recognize Bluetooth is hanged easily. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230117114109.4298-3-pkshih@realtek.com commit 1742fbae7a49b067649b7c2958d9468711149e37 Author: Ching-Te Ku Date: Tue Jan 17 19:41:02 2023 +0800 wifi: rtw89: coex: Update Wi-Fi external control TDMA parameters/tables This patch update the external control (Wi-Fi firmware control) type of TDMA related parameters, almost all of these case were related to Wi-Fi multi-role situations & AP mode. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230117114109.4298-2-pkshih@realtek.com commit 5fac18583a00dcdc7402d570e22a8d405fe2bde0 Author: Arend van Spriel Date: Tue Jan 3 13:41:17 2023 +0100 wifi: brcmfmac: change cfg80211_set_channel() name and signature The function cfg80211_set_channel() is an static function in brcmfmac but the name is misleading. Hence rename it with 'brcmf' prefix. Also changing the parameters to avoid additional conversions. Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230103124117.271988-4-arend.vanspriel@broadcom.com commit 3cfb7df24cee0f5fdc4cc5d3176cab9aadfcb430 Author: Dan Carpenter Date: Mon Feb 6 17:41:33 2023 +0300 wifi: mwifiex: fix loop iterator in mwifiex_update_ampdu_txwinsize() This code re-uses "i" to be the iterator for both the inside and outside loops. It means the outside loop will exit earlier than intended. Fixes: d219b7eb3792 ("mwifiex: handle BT coex event to adjust Rx BA window size") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/Y+ERnaDaZD7RtLvX@kili commit 235fd607c6cbd0f3922298200573b2b5f86295df Author: Gustavo A. R. Silva Date: Thu Feb 2 19:34:05 2023 -0600 wifi: mwifiex: 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 mwifiex_ie_types_rates_param_set. These are the only binary differences I see after the change: mwifiex.o _@@ -50154,7 +50154,7 @@ 23514: R_X86_64_32S kmalloc_caches+0x50 23518: call 2351d 23519: R_X86_64_PLT32 __tsan_read8-0x4 - 2351d: mov $0x225,%edx + 2351d: mov $0x224,%edx 23522: mov $0xdc0,%esi 23527: mov 0x0(%rip),%rdi # 2352e 2352a: R_X86_64_PC32 kmalloc_caches+0x4c scan.o _@@ -5582,7 +5582,7 @@ 4394: R_X86_64_32S kmalloc_caches+0x50 4398: call 439d 4399: R_X86_64_PLT32 __tsan_read8-0x4 - 439d: mov $0x225,%edx + 439d: mov $0x224,%edx 43a2: mov $0xdc0,%esi 43a7: mov 0x0(%rip),%rdi # 43ae 43aa: R_X86_64_PC32 kmalloc_caches+0x4c and the reason for that is the following line: drivers/net/wireless/marvell/mwifiex/scan.c: 1517 scan_cfg_out = kzalloc(sizeof(union mwifiex_scan_cmd_config_tlv), 1518 GFP_KERNEL); sizeof(union mwifiex_scan_cmd_config_tlv) is now one-byte smaller due to the flex-array transformation: 46 union mwifiex_scan_cmd_config_tlv { 47 /* Scan configuration (variable length) */ 48 struct mwifiex_scan_cmd_config config; 49 /* Max allocated block */ 50 u8 config_alloc_buf[MAX_SCAN_CFG_ALLOC]; 51 }; Notice that MAX_SCAN_CFG_ALLOC is defined in terms of sizeof(struct mwifiex_ie_types_rates_param_set), see: 26 /* Memory needed to store supported rate */ 27 #define RATE_TLV_MAX_SIZE (sizeof(struct mwifiex_ie_types_rates_param_set) \ 28 + HOSTCMD_SUPPORTED_RATES) 37 /* Maximum memory needed for a mwifiex_scan_cmd_config with all TLVs at max */ 38 #define MAX_SCAN_CFG_ALLOC (sizeof(struct mwifiex_scan_cmd_config) \ 39 + sizeof(struct mwifiex_ie_types_num_probes) \ 40 + sizeof(struct mwifiex_ie_types_htcap) \ 41 + CHAN_TLV_MAX_SIZE \ 42 + RATE_TLV_MAX_SIZE \ 43 + WILDCARD_SSID_TLV_MAX_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/79 Link: https://github.com/KSPP/linux/issues/252 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: Kalle Valo Link: https://lore.kernel.org/r/Y9xkjXeElSEQ0FPY@work commit 7fcae8f7f8158d22e667ed55a40e6a1829cc55b0 Author: Gustavo A. R. Silva Date: Thu Feb 2 19:32:00 2023 -0600 wifi: mwifiex: Replace one-element arrays with flexible-array members One-element arrays are deprecated, and we are replacing them with flexible array members instead. So, replace one-element arrays with flexible-array members in multiple structures. 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/256 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: Kalle Valo Link: https://lore.kernel.org/r/Y9xkECG3uTZ6T1dN@work commit 552ac55ee9bc8a30edc87c284a4562ce703f972b Author: Gustavo A. R. Silva Date: Thu Feb 2 19:29:47 2023 -0600 wifi: brcmfmac: 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 brcmf_tlv. 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/253 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: Kalle Valo Link: https://lore.kernel.org/r/Y9xjizhMujNEtpB4@work commit 7715d79553de553532219d82c0fea89fba5f7c79 Author: Lukas Wunner Date: Fri Jan 27 15:03:00 2023 +0100 wifi: mwifiex: Support firmware hotfix version in GET_HW_SPEC responses Support the firmware hotfix version in GET_HW_SPEC responses to avoid an irritating "Unknown api_id: 5" message on probe. Based on this commit in NXP's GPLv2-licensed out-of-tree driver: https://github.com/nxp-imx/mwifiex/commit/27fd8ecca504 Signed-off-by: Lukas Wunner Cc: Sherry Sun Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/111c7ee895f12d951e95a2edcd06d87ca26a7d0f.1674827105.git.lukas@wunner.de commit bba047f15851c8b053221f1b276eb7682d59f755 Author: Lukas Wunner Date: Fri Jan 27 15:02:00 2023 +0100 wifi: mwifiex: Support SD8978 chipset The Marvell SD8978 (aka NXP IW416) uses identical registers as SD8987, so reuse the existing mwifiex_reg_sd8987 definition. Note that mwifiex_reg_sd8977 and mwifiex_reg_sd8997 are likewise identical, save for the fw_dump_ctrl register: They define it as 0xf0 whereas mwifiex_reg_sd8987 defines it as 0xf9. I've verified that 0xf9 is the correct value on SD8978. NXP's out-of-tree driver uses 0xf9 for all of them, so there's a chance that 0xf0 is not correct in the mwifiex_reg_sd8977 and mwifiex_reg_sd8997 definitions. I cannot test that for lack of hardware, hence am leaving it as is. NXP has only released a firmware which runs Bluetooth over UART. Perhaps Bluetooth over SDIO is unsupported by this chipset. Consequently, only an "sdiouart" firmware image is referenced, not an alternative "sdsd" image. Signed-off-by: Lukas Wunner Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/536b4f17a72ca460ad1b07045757043fb0778988.1674827105.git.lukas@wunner.de commit 36dd7a4c6226133b0b7aa92b8e604e688d958d0c Author: Lukas Wunner Date: Fri Jan 27 15:01:00 2023 +0100 wifi: mwifiex: Add missing compatible string for SD8787 Commit e3fffc1f0b47 ("devicetree: document new marvell-8xxx and pwrseq-sd8787 options") documented a compatible string for SD8787 in the devicetree bindings, but neglected to add it to the mwifiex driver. Fixes: e3fffc1f0b47 ("devicetree: document new marvell-8xxx and pwrseq-sd8787 options") Signed-off-by: Lukas Wunner Cc: stable@vger.kernel.org # v4.11+ Cc: Matt Ranostay Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/320de5005ff3b8fd76be2d2b859fd021689c3681.1674827105.git.lukas@wunner.de commit 6a142f70774fd10350a52a10ba1297d52da46780 Author: Hector Martin Date: Sun Feb 12 15:38:13 2023 +0900 wifi: brcmfmac: pcie: Perform correct BCM4364 firmware selection This chip exists in two revisions (B2=r3 and B3=r4) on different platforms, and was added without regard to doing proper firmware selection or differentiating between them. Fix this to have proper per-revision firmwares and support Apple NVRAM selection. Revision B2 is present on at least these Apple T2 Macs: kauai: MacBook Pro 15" (Touch/2018-2019) maui: MacBook Pro 13" (Touch/2018-2019) lanai: Mac mini (Late 2018) ekans: iMac Pro 27" (5K, Late 2017) And these non-T2 Macs: nihau: iMac 27" (5K, 2019) Revision B3 is present on at least these Apple T2 Macs: bali: MacBook Pro 16" (2019) trinidad: MacBook Pro 13" (2020, 4 TB3) borneo: MacBook Pro 16" (2019, 5600M) kahana: Mac Pro (2019) kahana: Mac Pro (2019, Rack) hanauma: iMac 27" (5K, 2020) kure: iMac 27" (5K, 2020, 5700/XT) Also fix the firmware interface for 4364, from BCA to WCC. Fixes: 24f0bd136264 ("brcmfmac: add the BRCM 4364 found in MacBook Pro 15,2") 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/20230212063813.27622-5-marcan@marcan.st commit bf8bbd903f07aabfef8d4cb3b513163a3e974d2b Author: Hector Martin Date: Sun Feb 12 15:38:12 2023 +0900 wifi: brcmfmac: pcie: Add IDs/properties for BCM4377 This chip is present on at least these Apple T2 Macs: * tahiti: MacBook Pro 13" (2020, 2 TB3) * formosa: MacBook Pro 13" (Touch/2019) * fiji: MacBook Air 13" (Scissor, 2020) 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/20230212063813.27622-4-marcan@marcan.st commit 69005e67ce54cb837b8218b002c1bb868c83b7a9 Author: Hector Martin Date: Sun Feb 12 15:38:11 2023 +0900 wifi: brcmfmac: pcie: Add IDs/properties for BCM4355 This chip is present on at least these Apple T2 Macs: * hawaii: MacBook Air 13" (Late 2018) * hawaii: MacBook Air 13" (True Tone, 2019) Users report seeing PCI revision ID 12 for this chip, which Arend reports should be revision C2, but Apple has the firmware tagged as revision C1. Assume the right cutoff point for firmware versions is revision ID 11 then, and leave older revisions using the non-versioned firmware filename (Apple only uses C1 firmware builds). Reviewed-by: Arend van Spriel Signed-off-by: Hector Martin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230212063813.27622-3-marcan@marcan.st commit 54f01f56cf63ebb92ac37450d65c7e4da379d4ca Author: Hector Martin Date: Sun Feb 12 15:38:10 2023 +0900 wifi: brcmfmac: Rename Cypress 89459 to BCM4355 The commit that introduced support for this chip incorrectly claimed it is a Cypress-specific part, while in actuality it is just a variant of BCM4355 silicon (as evidenced by the chip ID). The relationship between Cypress products and Broadcom products isn't entirely clear but given what little information is available and prior art in the driver, it seems the convention should be that originally Broadcom parts should retain the Broadcom name. Thus, rename the relevant constants and firmware file. Also rename the specific 89459 PCIe ID to BCM43596, which seems to be the original subvariant name for this PCI ID (as defined in the out-of-tree bcmdhd driver). Since Cypress added this part and will presumably be providing its supported firmware, we keep the CYW designation for this device. We also drop the RAW device ID in this commit. We don't do this for the other chips since apparently some devices with them exist in the wild, but there is already a 4355 entry with the Broadcom subvendor and WCC firmware vendor, so adding a generic fallback to Cypress seems redundant (no reason why a device would have the raw device ID *and* an explicitly programmed subvendor). Fixes: dce45ded7619 ("brcmfmac: Support 89459 pcie") Reviewed-by: Arend van Spriel Signed-off-by: Hector Martin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230212063813.27622-2-marcan@marcan.st commit 0243d3dfe274832aa0a16214499c208122345173 Author: Alan Maguire Date: Thu Feb 9 13:28:51 2023 +0000 bpf: Add --skip_encoding_btf_inconsistent_proto, --btf_gen_optimized to pahole flags for v1.25 v1.25 of pahole supports filtering out functions with multiple inconsistent function prototypes or optimized-out parameters from the BTF representation. These present problems because there is no additional info in BTF saying which inconsistent prototype matches which function instance to help guide attachment, and functions with optimized-out parameters can lead to incorrect assumptions about register contents. So for now, filter out such functions while adding BTF representations for functions that have "."-suffixes (foo.isra.0) but not optimized-out parameters. This patch assumes that below linked changes land in pahole for v1.25. Signed-off-by: Alan Maguire Signed-off-by: Daniel Borkmann Tested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/1675790102-23037-1-git-send-email-alan.maguire@oracle.com Link: https://lore.kernel.org/bpf/1675949331-27935-1-git-send-email-alan.maguire@oracle.com commit d588adae3b97241ee2e837a4dd74674b9a209cd6 Author: Filipe Manana Date: Wed Jan 11 11:36:17 2023 +0000 btrfs: add an api to delete a specific entry from the lru cache In order to replace the open coded name cache in send with the lru cache, we need an API for the lru cache to delete a specific entry for which we did a previous lookup. This adds the API for it, and a next patch in the series will use it. This patch is part of a larger patchset and the changelog of the last patch in the series contains a sample performance test and results. The patches that comprise the patchset are the following: btrfs: send: directly return from did_overwrite_ref() and simplify it btrfs: send: avoid unnecessary generation search at did_overwrite_ref() btrfs: send: directly return from will_overwrite_ref() and simplify it btrfs: send: avoid extra b+tree searches when checking reference overrides btrfs: send: remove send_progress argument from can_rmdir() btrfs: send: avoid duplicated orphan dir allocation and initialization btrfs: send: avoid unnecessary orphan dir rbtree search at can_rmdir() btrfs: send: reduce searches on parent root when checking if dir can be removed btrfs: send: iterate waiting dir move rbtree only once when processing refs btrfs: send: initialize all the red black trees earlier btrfs: send: genericize the backref cache to allow it to be reused btrfs: adapt lru cache to allow for 64 bits keys on 32 bits systems btrfs: send: cache information about created directories btrfs: allow a generation number to be associated with lru cache entries btrfs: add an api to delete a specific entry from the lru cache btrfs: send: use the lru cache to implement the name cache btrfs: send: update size of roots array for backref cache entries btrfs: send: cache utimes operations for directories if possible Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0da0c5605ed1e6c8138d9c40e5fcc84d3c99ad7b Author: Filipe Manana Date: Wed Jan 11 11:36:16 2023 +0000 btrfs: allow a generation number to be associated with lru cache entries This allows an optional generation number to be associated to each entry of the lru cache. Entries with the same key but different generations, are stored in the linked list to which the maple tree points to. This is meant to be used when there's a small number of different generations, so the impact of searching a linked list is negligible. The goal is to get rid of the open coded name cache in the send code (which uses a radix tree and a similar linked list of values/entries) and use instead the lru cache module. For that particular use case we have at most 2 generations that are associated to each key (inode number): one generation for the send root and another generation for the parent root. The actual migration of the send name cache is done in the next patch in the series. This patch is part of a larger patchset and the changelog of the last patch in the series contains a sample performance test and results. The patches that comprise the patchset are the following: btrfs: send: directly return from did_overwrite_ref() and simplify it btrfs: send: avoid unnecessary generation search at did_overwrite_ref() btrfs: send: directly return from will_overwrite_ref() and simplify it btrfs: send: avoid extra b+tree searches when checking reference overrides btrfs: send: remove send_progress argument from can_rmdir() btrfs: send: avoid duplicated orphan dir allocation and initialization btrfs: send: avoid unnecessary orphan dir rbtree search at can_rmdir() btrfs: send: reduce searches on parent root when checking if dir can be removed btrfs: send: iterate waiting dir move rbtree only once when processing refs btrfs: send: initialize all the red black trees earlier btrfs: send: genericize the backref cache to allow it to be reused btrfs: adapt lru cache to allow for 64 bits keys on 32 bits systems btrfs: send: cache information about created directories btrfs: allow a generation number to be associated with lru cache entries btrfs: add an api to delete a specific entry from the lru cache btrfs: send: use the lru cache to implement the name cache btrfs: send: update size of roots array for backref cache entries btrfs: send: cache utimes operations for directories if possible Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit e8a7f49d9bfce2fc359cc698d98c8b95dce24c6f Author: Filipe Manana Date: Wed Jan 11 11:36:15 2023 +0000 btrfs: send: cache information about created directories During an incremental send, when processing the reference for an inode we need to check if the directory where the new reference is located was already created before creating the new reference. This check, which is done by the helper did_create_dir(), can be expensive if the directory has many entries, since it consists in searching the send root's b+tree and visiting every single dir index key until we either find one which points to an inode with a number smaller than the current inode's number or until we visited all index keys. So it doesn't scale well for very large directories. So improve on this by caching created directories using a lru cache, and limiting its size to 64 entries, which results in using at most 4096 bytes of memory. The caching is optional, if we fail to allocate memory, we just proceed as before and use the existing slower path. This patch is part of a larger patchset and the changelog of the last patch in the series contains a sample performance test and results. The patches that comprise the patchset are the following: btrfs: send: directly return from did_overwrite_ref() and simplify it btrfs: send: avoid unnecessary generation search at did_overwrite_ref() btrfs: send: directly return from will_overwrite_ref() and simplify it btrfs: send: avoid extra b+tree searches when checking reference overrides btrfs: send: remove send_progress argument from can_rmdir() btrfs: send: avoid duplicated orphan dir allocation and initialization btrfs: send: avoid unnecessary orphan dir rbtree search at can_rmdir() btrfs: send: reduce searches on parent root when checking if dir can be removed btrfs: send: iterate waiting dir move rbtree only once when processing refs btrfs: send: initialize all the red black trees earlier btrfs: send: genericize the backref cache to allow it to be reused btrfs: adapt lru cache to allow for 64 bits keys on 32 bits systems btrfs: send: cache information about created directories btrfs: allow a generation number to be associated with lru cache entries btrfs: add an api to delete a specific entry from the lru cache btrfs: send: use the lru cache to implement the name cache btrfs: send: update size of roots array for backref cache entries btrfs: send: cache utimes operations for directories if possible Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6273ee621f3d5829667943c1f53d8115752b45aa Author: Filipe Manana Date: Wed Jan 11 11:36:14 2023 +0000 btrfs: adapt lru cache to allow for 64 bits keys on 32 bits systems The lru cache is backed by a maple tree, which uses the unsigned long type for keys, and that type has a width of 32 bits on 32 bits systems and a width of 64 bits on 64 bits systems. Currently there is only one user of the lru cache, the send backref cache, which uses a sector number as a key, a logical address right shifted by fs_info->sectorsize_bits, so a 32 bits width is not yet a problem (the same happens with the radix tree we use to track extent buffers, fs_info->buffer_radix). However the next patches in the series will start using the lru cache for cases where inode numbers are the keys, and the inode numbers are always 64 bits, even if we are running on a 32 bits system. So adapt the lru cache to allow multiple values under the same key, by having the maple tree store a head entry that points to a list of entries instead of pointing to a single entry. This is a similar approach to what we currently do for the name cache in send (which uses a radix tree that has indexes with an unsigned long type as well), and will allow later to use the lru cache for the send name cache as well. This patch is part of a larger patchset and the changelog of the last patch in the series contains a sample performance test and results. The patches that comprise the patchset are the following: btrfs: send: directly return from did_overwrite_ref() and simplify it btrfs: send: avoid unnecessary generation search at did_overwrite_ref() btrfs: send: directly return from will_overwrite_ref() and simplify it btrfs: send: avoid extra b+tree searches when checking reference overrides btrfs: send: remove send_progress argument from can_rmdir() btrfs: send: avoid duplicated orphan dir allocation and initialization btrfs: send: avoid unnecessary orphan dir rbtree search at can_rmdir() btrfs: send: reduce searches on parent root when checking if dir can be removed btrfs: send: iterate waiting dir move rbtree only once when processing refs btrfs: send: initialize all the red black trees earlier btrfs: send: genericize the backref cache to allow it to be reused btrfs: adapt lru cache to allow for 64 bits keys on 32 bits systems btrfs: send: cache information about created directories btrfs: allow a generation number to be associated with lru cache entries btrfs: add an api to delete a specific entry from the lru cache btrfs: send: use the lru cache to implement the name cache btrfs: send: update size of roots array for backref cache entries btrfs: send: cache utimes operations for directories if possible Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 90b90d4ac03cbaaa87a81ee04e9cdd9b4225cdd4 Author: Filipe Manana Date: Wed Jan 11 11:36:13 2023 +0000 btrfs: send: genericize the backref cache to allow it to be reused The backref cache is a cache backed by a maple tree and a linked list to keep track of temporal access to cached entries (the LRU entry always at the head of the list). This type of caching method is going to be useful in other scenarios, so make the cache implementation more generic and move it into its own header and source files. This patch is part of a larger patchset and the changelog of the last patch in the series contains a sample performance test and results. The patches that comprise the patchset are the following: btrfs: send: directly return from did_overwrite_ref() and simplify it btrfs: send: avoid unnecessary generation search at did_overwrite_ref() btrfs: send: directly return from will_overwrite_ref() and simplify it btrfs: send: avoid extra b+tree searches when checking reference overrides btrfs: send: remove send_progress argument from can_rmdir() btrfs: send: avoid duplicated orphan dir allocation and initialization btrfs: send: avoid unnecessary orphan dir rbtree search at can_rmdir() btrfs: send: reduce searches on parent root when checking if dir can be removed btrfs: send: iterate waiting dir move rbtree only once when processing refs btrfs: send: initialize all the red black trees earlier btrfs: send: genericize the backref cache to allow it to be reused btrfs: adapt lru cache to allow for 64 bits keys on 32 bits systems btrfs: send: cache information about created directories btrfs: allow a generation number to be associated with lru cache entries btrfs: add an api to delete a specific entry from the lru cache btrfs: send: use the lru cache to implement the name cache btrfs: send: update size of roots array for backref cache entries btrfs: send: cache utimes operations for directories if possible Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit d307d2f35ca5c57ef2966d2a7ccb2de1118f61f4 Author: Filipe Manana Date: Wed Jan 11 11:36:12 2023 +0000 btrfs: send: initialize all the red black trees earlier After we allocate the send context object and before we initialize all the red black trees, we can jump to the 'out' label if some errors happen, and then under the 'out' label we use RB_EMPTY_ROOT() against some of the those trees, which we have not yet initialized. This happens to work out ok because the send context object was initialized to zeroes with kzalloc and the RB_ROOT initializer just happens to have the following definition: #define RB_ROOT (struct rb_root) { NULL, } But it's really neither clean nor a good practice as RB_ROOT is supposed to be opaque and in case it changes or we change those red black trees to some other data structure, it leaves us in a precarious situation. So initialize all the red black trees immediately after allocating the send context and before any jump into the 'out' label. This patch is part of a larger patchset and the changelog of the last patch in the series contains a sample performance test and results. The patches that comprise the patchset are the following: btrfs: send: directly return from did_overwrite_ref() and simplify it btrfs: send: avoid unnecessary generation search at did_overwrite_ref() btrfs: send: directly return from will_overwrite_ref() and simplify it btrfs: send: avoid extra b+tree searches when checking reference overrides btrfs: send: remove send_progress argument from can_rmdir() btrfs: send: avoid duplicated orphan dir allocation and initialization btrfs: send: avoid unnecessary orphan dir rbtree search at can_rmdir() btrfs: send: reduce searches on parent root when checking if dir can be removed btrfs: send: iterate waiting dir move rbtree only once when processing refs btrfs: send: initialize all the red black trees earlier btrfs: send: genericize the backref cache to allow it to be reused btrfs: adapt lru cache to allow for 64 bits keys on 32 bits systems btrfs: send: cache information about created directories btrfs: allow a generation number to be associated with lru cache entries btrfs: add an api to delete a specific entry from the lru cache btrfs: send: use the lru cache to implement the name cache btrfs: send: update size of roots array for backref cache entries btrfs: send: cache utimes operations for directories if possible Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8c139e1d780665648c74811d36719ef467c32306 Author: Filipe Manana Date: Wed Jan 11 11:36:10 2023 +0000 btrfs: send: iterate waiting dir move rbtree only once when processing refs When processing the new references for an inode, we unnecessarily iterate twice the waiting dir moves rbtree, once with is_waiting_for_move() and if we found an entry in the rbtree, we iterate it again with a call to get_waiting_dir_move(). This is pointless, we can make this simpler and more efficient by calling only get_waiting_dir_move(), so just do that. This patch is part of a larger patchset and the changelog of the last patch in the series contains a sample performance test and results. The patches that comprise the patchset are the following: btrfs: send: directly return from did_overwrite_ref() and simplify it btrfs: send: avoid unnecessary generation search at did_overwrite_ref() btrfs: send: directly return from will_overwrite_ref() and simplify it btrfs: send: avoid extra b+tree searches when checking reference overrides btrfs: send: remove send_progress argument from can_rmdir() btrfs: send: avoid duplicated orphan dir allocation and initialization btrfs: send: avoid unnecessary orphan dir rbtree search at can_rmdir() btrfs: send: reduce searches on parent root when checking if dir can be removed btrfs: send: iterate waiting dir move rbtree only once when processing refs btrfs: send: initialize all the red black trees earlier btrfs: send: genericize the backref cache to allow it to be reused btrfs: adapt lru cache to allow for 64 bits keys on 32 bits systems btrfs: send: cache information about created directories btrfs: allow a generation number to be associated with lru cache entries btrfs: add an api to delete a specific entry from the lru cache btrfs: send: use the lru cache to implement the name cache btrfs: send: update size of roots array for backref cache entries btrfs: send: cache utimes operations for directories if possible Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 474e4761f6e8b700612d409327661290d7e58d77 Author: Filipe Manana Date: Wed Jan 11 11:36:09 2023 +0000 btrfs: send: reduce searches on parent root when checking if dir can be removed During an incremental send, every time we remove a reference (dentry) for an inode and the parent directory does not exists anymore in the send root, we go check if we can remove the directory by making a call to can_rmdir(). This helper can only return true (value 1) if all dentries were already removed, and for that it always does a search on the parent root for dir index keys - if it finds any dentry referring to an inode with a number higher then the inode currently being processed, then the directory can not be removed and it must return false (value 0). However that means if a directory that was deleted had 1000 dentries, and each one pointed to an inode with a number higher then the number of the directory's inode, we end up doing 1000 searches on the parent root. Typically files are created in a directory after the directory was created and therefore they get an higher inode number than the directory. It's also common to have the each dentry pointing to an inode with a higher number then the inodes the previous dentries point to, for example when creating a series of files inside a directory, a very common pattern. So improve on that by having the first call to can_rmdir() for a directory to check the number of the inode that the last dentry points to and cache that inode number in the orphan dir structure. Then every subsequent call to can_rmdir() can avoid doing a search on the parent root if the number of the inode currently being processed is smaller than cached inode number at the directory's orphan dir structure. This patch is part of a larger patchset and the changelog of the last patch in the series contains a sample performance test and results. The patches that comprise the patchset are the following: btrfs: send: directly return from did_overwrite_ref() and simplify it btrfs: send: avoid unnecessary generation search at did_overwrite_ref() btrfs: send: directly return from will_overwrite_ref() and simplify it btrfs: send: avoid extra b+tree searches when checking reference overrides btrfs: send: remove send_progress argument from can_rmdir() btrfs: send: avoid duplicated orphan dir allocation and initialization btrfs: send: avoid unnecessary orphan dir rbtree search at can_rmdir() btrfs: send: reduce searches on parent root when checking if dir can be removed btrfs: send: iterate waiting dir move rbtree only once when processing refs btrfs: send: initialize all the red black trees earlier btrfs: send: genericize the backref cache to allow it to be reused btrfs: adapt lru cache to allow for 64 bits keys on 32 bits systems btrfs: send: cache information about created directories btrfs: allow a generation number to be associated with lru cache entries btrfs: add an api to delete a specific entry from the lru cache btrfs: send: use the lru cache to implement the name cache btrfs: send: update size of roots array for backref cache entries btrfs: send: cache utimes operations for directories if possible Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 78cf1a954da52a4b290992f2c32dfbf0ffc9ba45 Author: Filipe Manana Date: Wed Jan 11 11:36:08 2023 +0000 btrfs: send: avoid unnecessary orphan dir rbtree search at can_rmdir() At can_rmdir() we start by searching the orphan dirs rbtree for an orphan dir object for the target directory. Later when iterating over the dir index keys, if we find that any dir entry points to inode for which there is a pending dir move or the inode was not yet processed, we exit because we can't remove the directory yet. However we end up always calling add_orphan_dir_info(), which will iterate again the rbtree and if there is already an orphan dir object (created by the first call to can_rmdir()), it returns the existing object. This is unnecessary work because in case there is already an existing orphan dir object, we got a reference to it at the start of can_rmdir(). So skip the call to add_orphan_dir_info() if we already have a reference for an orphan dir object. This patch is part of a larger patchset and the changelog of the last patch in the series contains a sample performance test and results. The patches that comprise the patchset are the following: btrfs: send: directly return from did_overwrite_ref() and simplify it btrfs: send: avoid unnecessary generation search at did_overwrite_ref() btrfs: send: directly return from will_overwrite_ref() and simplify it btrfs: send: avoid extra b+tree searches when checking reference overrides btrfs: send: remove send_progress argument from can_rmdir() btrfs: send: avoid duplicated orphan dir allocation and initialization btrfs: send: avoid unnecessary orphan dir rbtree search at can_rmdir() btrfs: send: reduce searches on parent root when checking if dir can be removed btrfs: send: iterate waiting dir move rbtree only once when processing refs btrfs: send: initialize all the red black trees earlier btrfs: send: genericize the backref cache to allow it to be reused btrfs: adapt lru cache to allow for 64 bits keys on 32 bits systems btrfs: send: cache information about created directories btrfs: allow a generation number to be associated with lru cache entries btrfs: add an api to delete a specific entry from the lru cache btrfs: send: use the lru cache to implement the name cache btrfs: send: update size of roots array for backref cache entries btrfs: send: cache utimes operations for directories if possible Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit d921b9cf91e1f84a39f4beab5c824b9c8ad87c0c Author: Filipe Manana Date: Wed Jan 11 11:36:07 2023 +0000 btrfs: send: avoid duplicated orphan dir allocation and initialization At can_rmdir() we are allocating and initializing an orphan dir object twice. This can be deduplicated outside of the loop that iterates over the dir index keys. So deduplicate that code, even because other patch in the series will need to add more initialization code and another one will add one more condition. This patch is part of a larger patchset and the changelog of the last patch in the series contains a sample performance test and results. The patches that comprise the patchset are the following: btrfs: send: directly return from did_overwrite_ref() and simplify it btrfs: send: avoid unnecessary generation search at did_overwrite_ref() btrfs: send: directly return from will_overwrite_ref() and simplify it btrfs: send: avoid extra b+tree searches when checking reference overrides btrfs: send: remove send_progress argument from can_rmdir() btrfs: send: avoid duplicated orphan dir allocation and initialization btrfs: send: avoid unnecessary orphan dir rbtree search at can_rmdir() btrfs: send: reduce searches on parent root when checking if dir can be removed btrfs: send: iterate waiting dir move rbtree only once when processing refs btrfs: send: initialize all the red black trees earlier btrfs: send: genericize the backref cache to allow it to be reused btrfs: adapt lru cache to allow for 64 bits keys on 32 bits systems btrfs: send: cache information about created directories btrfs: allow a generation number to be associated with lru cache entries btrfs: add an api to delete a specific entry from the lru cache btrfs: send: use the lru cache to implement the name cache btrfs: send: update size of roots array for backref cache entries btrfs: send: cache utimes operations for directories if possible Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 24970ccb2489c8c087d12659df7f74ef1a966a67 Author: Filipe Manana Date: Wed Jan 11 11:36:06 2023 +0000 btrfs: send: remove send_progress argument from can_rmdir() All callers of can_rmdir() pass sctx->cur_ino as the value for the send_progress argument, so remove the argument and directly use sctx->cur_ino. This patch is part of a larger patchset and the changelog of the last patch in the series contains a sample performance test and results. The patches that comprise the patchset are the following: btrfs: send: directly return from did_overwrite_ref() and simplify it btrfs: send: avoid unnecessary generation search at did_overwrite_ref() btrfs: send: directly return from will_overwrite_ref() and simplify it btrfs: send: avoid extra b+tree searches when checking reference overrides btrfs: send: remove send_progress argument from can_rmdir() btrfs: send: avoid duplicated orphan dir allocation and initialization btrfs: send: avoid unnecessary orphan dir rbtree search at can_rmdir() btrfs: send: reduce searches on parent root when checking if dir can be removed btrfs: send: iterate waiting dir move rbtree only once when processing refs btrfs: send: initialize all the red black trees earlier btrfs: send: genericize the backref cache to allow it to be reused btrfs: adapt lru cache to allow for 64 bits keys on 32 bits systems btrfs: send: cache information about created directories btrfs: allow a generation number to be associated with lru cache entries btrfs: add an api to delete a specific entry from the lru cache btrfs: send: use the lru cache to implement the name cache btrfs: send: update size of roots array for backref cache entries btrfs: send: cache utimes operations for directories if possible Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 498581f33c9e60bfdfd28a8565e0ea81a1748aa3 Author: Filipe Manana Date: Wed Jan 11 11:36:05 2023 +0000 btrfs: send: avoid extra b+tree searches when checking reference overrides During an incremental send, when processing the new references of an inode (either it's a new inode or an existing one renamed/moved), he will search the b+tree of the send or parent roots in order to find out the inode item of the parent directory and extract its generation. However we are doing that search twice, once with is_inode_existent() -> get_cur_inode_state() and then again at did_overwrite_ref() or will_overwrite_ref(). So avoid that and get the generation at get_cur_inode_state() and then propagate it up to did_overwrite_ref() and will_overwrite_ref(). This patch is part of a larger patchset and the changelog of the last patch in the series contains a sample performance test and results. The patches that comprise the patchset are the following: btrfs: send: directly return from did_overwrite_ref() and simplify it btrfs: send: avoid unnecessary generation search at did_overwrite_ref() btrfs: send: directly return from will_overwrite_ref() and simplify it btrfs: send: avoid extra b+tree searches when checking reference overrides btrfs: send: remove send_progress argument from can_rmdir() btrfs: send: avoid duplicated orphan dir allocation and initialization btrfs: send: avoid unnecessary orphan dir rbtree search at can_rmdir() btrfs: send: reduce searches on parent root when checking if dir can be removed btrfs: send: iterate waiting dir move rbtree only once when processing refs btrfs: send: initialize all the red black trees earlier btrfs: send: genericize the backref cache to allow it to be reused btrfs: adapt lru cache to allow for 64 bits keys on 32 bits systems btrfs: send: cache information about created directories btrfs: allow a generation number to be associated with lru cache entries btrfs: add an api to delete a specific entry from the lru cache btrfs: send: use the lru cache to implement the name cache btrfs: send: update size of roots array for backref cache entries btrfs: send: cache utimes operations for directories if possible Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit b3047a42f55d8524b23d58c6ee1c75024d901823 Author: Filipe Manana Date: Wed Jan 11 11:36:04 2023 +0000 btrfs: send: directly return from will_overwrite_ref() and simplify it There are no resources to release before will_overwrite_ref() returns, so we don't really need the 'out' label and jumping to it when conditions are met - we can directly return and get rid of the label and jumps. Also we can deal with -ENOENT and other errors in a single if-else logic, as it's more straightforward. This helps the next patch in the series to be more simple as well. This patch is part of a larger patchset and the changelog of the last patch in the series contains a sample performance test and results. The patches that comprise the patchset are the following: btrfs: send: directly return from did_overwrite_ref() and simplify it btrfs: send: avoid unnecessary generation search at did_overwrite_ref() btrfs: send: directly return from will_overwrite_ref() and simplify it btrfs: send: avoid extra b+tree searches when checking reference overrides btrfs: send: remove send_progress argument from can_rmdir() btrfs: send: avoid duplicated orphan dir allocation and initialization btrfs: send: avoid unnecessary orphan dir rbtree search at can_rmdir() btrfs: send: reduce searches on parent root when checking if dir can be removed btrfs: send: iterate waiting dir move rbtree only once when processing refs btrfs: send: initialize all the red black trees earlier btrfs: send: genericize the backref cache to allow it to be reused btrfs: adapt lru cache to allow for 64 bits keys on 32 bits systems btrfs: send: cache information about created directories btrfs: allow a generation number to be associated with lru cache entries btrfs: add an api to delete a specific entry from the lru cache btrfs: send: use the lru cache to implement the name cache btrfs: send: update size of roots array for backref cache entries btrfs: send: cache utimes operations for directories if possible Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit cb689481947a36c4b0e885d21a315ff9ffbb87ab Author: Filipe Manana Date: Wed Jan 11 11:36:03 2023 +0000 btrfs: send: avoid unnecessary generation search at did_overwrite_ref() At did_overwrite_ref() we always call get_inode_gen() to find out the generation of the inode 'ow_inode'. However we don't always need to use that generation, and in fact it's very common to not use it, so we end up doing a b+tree search on the send root, allocating a path, etc, for nothing. So improve on this by getting the generation only if we need to use it. This patch is part of a larger patchset and the changelog of the last patch in the series contains a sample performance test and results. The patches that comprise the patchset are the following: btrfs: send: directly return from did_overwrite_ref() and simplify it btrfs: send: avoid unnecessary generation search at did_overwrite_ref() btrfs: send: directly return from will_overwrite_ref() and simplify it btrfs: send: avoid extra b+tree searches when checking reference overrides btrfs: send: remove send_progress argument from can_rmdir() btrfs: send: avoid duplicated orphan dir allocation and initialization btrfs: send: avoid unnecessary orphan dir rbtree search at can_rmdir() btrfs: send: reduce searches on parent root when checking if dir can be removed btrfs: send: iterate waiting dir move rbtree only once when processing refs btrfs: send: initialize all the red black trees earlier btrfs: send: genericize the backref cache to allow it to be reused btrfs: adapt lru cache to allow for 64 bits keys on 32 bits systems btrfs: send: cache information about created directories btrfs: allow a generation number to be associated with lru cache entries btrfs: add an api to delete a specific entry from the lru cache btrfs: send: use the lru cache to implement the name cache btrfs: send: update size of roots array for backref cache entries btrfs: send: cache utimes operations for directories if possible Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit e739ba307f3a467cd92b37ca92b64571fcfd7cfe Author: Filipe Manana Date: Wed Jan 11 11:36:02 2023 +0000 btrfs: send: directly return from did_overwrite_ref() and simplify it There are no resources to release before did_overwrite_ref() returns, so we don't really need the 'out' label and jumping to it when conditions are met - we can directly return and get rid of the label and jumps. Also we can deal with -ENOENT and other errors in a single if-else logic, as it's more straightforward. This helps the next patch in the series to be more simple as well. This patch is part of a larger patchset and the changelog of the last patch in the series contains a sample performance test and results. The patches that comprise the patchset are the following: btrfs: send: directly return from did_overwrite_ref() and simplify it btrfs: send: avoid unnecessary generation search at did_overwrite_ref() btrfs: send: directly return from will_overwrite_ref() and simplify it btrfs: send: avoid extra b+tree searches when checking reference overrides btrfs: send: remove send_progress argument from can_rmdir() btrfs: send: avoid duplicated orphan dir allocation and initialization btrfs: send: avoid unnecessary orphan dir rbtree search at can_rmdir() btrfs: send: reduce searches on parent root when checking if dir can be removed btrfs: send: iterate waiting dir move rbtree only once when processing refs btrfs: send: initialize all the red black trees earlier btrfs: send: genericize the backref cache to allow it to be reused btrfs: adapt lru cache to allow for 64 bits keys on 32 bits systems btrfs: send: cache information about created directories btrfs: allow a generation number to be associated with lru cache entries btrfs: add an api to delete a specific entry from the lru cache btrfs: send: use the lru cache to implement the name cache btrfs: send: update size of roots array for backref cache entries btrfs: send: cache utimes operations for directories if possible Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit b7625f461da6734a21c38ba6e7558538a116a2e3 Author: Qu Wenruo Date: Fri Jan 13 19:11:39 2023 +0800 btrfs: sysfs: update fs features directory asynchronously [BUG] Since the introduction of per-fs feature sysfs interface (/sys/fs/btrfs//features/), the content of that directory is never updated. Thus for the following case, that directory will not show the new features like RAID56: # mkfs.btrfs -f $dev1 $dev2 $dev3 # mount $dev1 $mnt # btrfs balance start -f -mconvert=raid5 $mnt # ls /sys/fs/btrfs/$uuid/features/ extended_iref free_space_tree no_holes skinny_metadata While after unmount and mount, we got the correct features: # umount $mnt # mount $dev1 $mnt # ls /sys/fs/btrfs/$uuid/features/ extended_iref free_space_tree no_holes raid56 skinny_metadata [CAUSE] Because we never really try to update the content of per-fs features/ directory. We had an attempt to update the features directory dynamically in commit 14e46e04958d ("btrfs: synchronize incompat feature bits with sysfs files"), but unfortunately it get reverted in commit e410e34fad91 ("Revert "btrfs: synchronize incompat feature bits with sysfs files""). The problem in the original patch is, in the context of btrfs_create_chunk(), we can not afford to update the sysfs group. The exported but never utilized function, btrfs_sysfs_feature_update() is the leftover of such attempt. As even if we go sysfs_update_group(), new files will need extra memory allocation, and we have no way to specify the sysfs update to go GFP_NOFS. [FIX] This patch will address the old problem by doing asynchronous sysfs update in the cleaner thread. This involves the following changes: - Make __btrfs_(set|clear)_fs_(incompat|compat_ro) helpers to set BTRFS_FS_FEATURE_CHANGED flag when needed - Update btrfs_sysfs_feature_update() to use sysfs_update_group() And drop unnecessary arguments. - Call btrfs_sysfs_feature_update() in cleaner_kthread If we have the BTRFS_FS_FEATURE_CHANGED flag set. - Wake up cleaner_kthread in btrfs_commit_transaction if we have BTRFS_FS_FEATURE_CHANGED flag By this, all the previously dangerous call sites like btrfs_create_chunk() need no new changes, as above helpers would have already set the BTRFS_FS_FEATURE_CHANGED flag. The real work happens at cleaner_kthread, thus we pay the cost of delaying the update to sysfs directory, but the delayed time should be small enough that end user can not distinguish though it might get delayed if the cleaner thread is busy with removing subvolumes or defrag. 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 58e36c2a0191768ddfc0c529f2bfb1630b18c10b Author: ye xingchen Date: Mon Jan 16 15:58:44 2023 +0800 btrfs: remove duplicate include header in extent-tree.c extent-tree.h is included more than once, added in a0231804affe ("btrfs: move extent-tree helpers into their own header file"). Signed-off-by: ye xingchen Reviewed-by: David Sterba Signed-off-by: David Sterba commit 28232909ba43561887508a6ef46d7f33a648f375 Author: Qu Wenruo Date: Sat Dec 17 10:34:29 2022 +0800 btrfs: scrub: improve tree block error reporting [BUG] When debugging a scrub related metadata error, it turns out that our metadata error reporting is not ideal. The only 3 error messages are: - BTRFS error (device dm-2): bdev /dev/mapper/test-scratch1 errs: wr 0, rd 0, flush 0, corrupt 0, gen 1 Showing we have metadata generation mismatch errors. - BTRFS error (device dm-2): unable to fixup (regular) error at logical 7110656 on dev /dev/mapper/test-scratch1 Showing which tree blocks are corrupted. - BTRFS warning (device dm-2): checksum/header error at logical 24772608 on dev /dev/mapper/test-scratch2, physical 3801088: metadata node (level 1) in tree 5 Showing which physical range the corrupted metadata is at. We have to combine the above 3 to know we have a corrupted metadata with generation mismatch. And this is already the better case, if we have other problems, like fsid mismatch, we can not even know the cause. [CAUSE] The problem is caused by the fact that, scrub_checksum_tree_block() never outputs any error message. It just return two bits for scrub: sblock->header_error, and sblock->generation_error. And later we report error in scrub_print_warning(), but unfortunately we only have two bits, there is not really much thing we can done to print any detailed errors. [FIX] This patch will do the following to enhance the error reporting of metadata scrub: - Add extra warning (ratelimited) for every error we hit This can help us to distinguish the different types of errors. Some errors can help us to know what's going wrong immediately, like bytenr mismatch. - Re-order the checks Currently we check bytenr first, then immediately generation. This can lead to false generation mismatch reports, while the fsid mismatches. Here is the new output for the bug I'm debugging (we forgot to writeback tree blocks for commit roots): BTRFS warning (device dm-2): tree block 24117248 mirror 1 has bad fsid, has b77cd862-f150-4c71-90ec-7baf0544d83f want 17df6abf-23cd-445f-b350-5b3e40bfd2fc BTRFS warning (device dm-2): tree block 24117248 mirror 0 has bad fsid, has b77cd862-f150-4c71-90ec-7baf0544d83f want 17df6abf-23cd-445f-b350-5b3e40bfd2fc Now we can immediately know it's some tree blocks didn't even get written back, other than the original confusing generation mismatch. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit cb0922f264643f03b04352f7a04abb913c609369 Author: Boris Burkov Date: Thu Dec 15 16:06:35 2022 -0800 btrfs: don't use size classes for zoned file systems When a file system has ZNS devices which are constrained by a maximum number of active block groups, then not being able to use all the block groups for every allocation is not ideal, and could cause us to loop a ton with mixed size allocations. In general, since zoned doesn't write into gaps behind where block groups are writing, it is not susceptible to the same sort of fragmentation that size classes are designed to solve, so we can skip size classes for zoned file systems in general, even though there would probably be no harm for SMR devices. Signed-off-by: Boris Burkov Signed-off-by: David Sterba commit c7eec3d9aa955cbd00470f874f34bdba946bd101 Author: Boris Burkov Date: Thu Dec 15 16:06:34 2022 -0800 btrfs: load block group size class when caching Since the size class is an artifact of an arbitrary anti fragmentation strategy, it doesn't really make sense to persist it. Furthermore, most of the size class logic assumes fresh block groups. That is of course not a reasonable assumption -- we will be upgrading kernels with existing filesystems whose block groups are not classified. To work around those issues, implement logic to compute the size class of the block groups as we cache them in. To perfectly assess the state of a block group, we would have to read the entire extent tree (since the free space cache mashes together contiguous extent items) which would be prohibitively expensive for larger file systems with more extents. We can do it relatively cheaply by implementing a simple heuristic of sampling a handful of extents and picking the smallest one we see. In the happy case where the block group was classified, we will only see extents of the correct size. In the unhappy case, we will hopefully find one of the smaller extents, but there is no perfect answer anyway. Autorelocation will eventually churn up the block group if there is significant freeing anyway. There was no regression in mount performance at end state of the fsperf test suite, and the delay until the block group is marked cached is minimized by the constant number of extent samples. Signed-off-by: Boris Burkov Signed-off-by: David Sterba commit 52bb7a2166af490317ce2cca1865b6630e86aca8 Author: Boris Burkov Date: Thu Dec 15 16:06:33 2022 -0800 btrfs: introduce size class to block group allocator The aim of this patch is to reduce the fragmentation of block groups under certain unhappy workloads. It is particularly effective when the size of extents correlates with their lifetime, which is something we have observed causing fragmentation in the fleet at Meta. This patch categorizes extents into size classes: - x < 128KiB: "small" - 128KiB < x < 8MiB: "medium" - x > 8MiB: "large" and as much as possible reduces allocations of extents into block groups that don't match the size class. This takes advantage of any (possible) correlation between size and lifetime and also leaves behind predictable re-usable gaps when extents are freed; small writes don't gum up bigger holes. Size classes are implemented in the following way: - Mark each new block group with a size class of the first allocation that goes into it. - Add two new passes to ffe: "unset size class" and "wrong size class". First, try only matching block groups, then try unset ones, then allow allocation of new ones, and finally allow mismatched block groups. - Filtering is done just by skipping inappropriate ones, there is no special size class indexing. Other solutions I considered were: - A best fit allocator with an rb-tree. This worked well, as small writes didn't leak big holes from large freed extents, but led to regressions in ffe and write performance due to lock contention on the rb-tree with every allocation possibly updating it in parallel. Perhaps something clever could be done to do the updates in the background while being "right enough". - A fixed size "working set". This prevents freeing an extent drastically changing where writes currently land, and seems like a good option too. Doesn't take advantage of size in any way. - The same size class idea, but implemented with xarray marks. This turned out to be slower than looping the linked list and skipping wrong block groups, and is also less flexible since we must have only 3 size classes (max #marks). With the current approach we can have as many as we like. Performance testing was done via: https://github.com/josefbacik/fsperf Of particular relevance are the new fragmentation specific tests. A brief summary of the testing results: - Neutral results on existing tests. There are some minor regressions and improvements here and there, but nothing that truly stands out as notable. - Improvement on new tests where size class and extent lifetime are correlated. Fragmentation in these cases is completely eliminated and write performance is generally a little better. There is also significant improvement where extent sizes are just a bit larger than the size class boundaries. - Regression on one new tests: where the allocations are sized intentionally a hair under the borders of the size classes. Results are neutral on the test that intentionally attacks this new scheme by mixing extent size and lifetime. The full dump of the performance results can be found here: https://bur.io/fsperf/size-class-2022-11-15.txt (there are ANSI escape codes, so best to curl and view in terminal) Here is a snippet from the full results for a new test which mixes buffered writes appending to a long lived set of files and large short lived fallocates: bufferedappendvsfallocate results metric baseline current stdev diff ====================================================================================== avg_commit_ms 31.13 29.20 2.67 -6.22% bg_count 14 15.60 0 11.43% commits 11.10 12.20 0.32 9.91% elapsed 27.30 26.40 2.98 -3.30% end_state_mount_ns 11122551.90 10635118.90 851143.04 -4.38% end_state_umount_ns 1.36e+09 1.35e+09 12248056.65 -1.07% find_free_extent_calls 116244.30 114354.30 964.56 -1.63% find_free_extent_ns_max 599507.20 1047168.20 103337.08 74.67% find_free_extent_ns_mean 3607.19 3672.11 101.20 1.80% find_free_extent_ns_min 500 512 6.67 2.40% find_free_extent_ns_p50 2848 2876 37.65 0.98% find_free_extent_ns_p95 4916 5000 75.45 1.71% find_free_extent_ns_p99 20734.49 20920.48 1670.93 0.90% frag_pct_max 61.67 0 8.05 -100.00% frag_pct_mean 43.59 0 6.10 -100.00% frag_pct_min 25.91 0 16.60 -100.00% frag_pct_p50 42.53 0 7.25 -100.00% frag_pct_p95 61.67 0 8.05 -100.00% frag_pct_p99 61.67 0 8.05 -100.00% fragmented_bg_count 6.10 0 1.45 -100.00% max_commit_ms 49.80 46 5.37 -7.63% sys_cpu 2.59 2.62 0.29 1.39% write_bw_bytes 1.62e+08 1.68e+08 17975843.50 3.23% write_clat_ns_mean 57426.39 54475.95 2292.72 -5.14% write_clat_ns_p50 46950.40 42905.60 2101.35 -8.62% write_clat_ns_p99 148070.40 143769.60 2115.17 -2.90% write_io_kbytes 4194304 4194304 0 0.00% write_iops 2476.15 2556.10 274.29 3.23% write_lat_ns_max 2101667.60 2251129.50 370556.59 7.11% write_lat_ns_mean 59374.91 55682.00 2523.09 -6.22% write_lat_ns_min 17353.10 16250 1646.08 -6.36% There are some mixed improvements/regressions in most metrics along with an elimination of fragmentation in this workload. On the balance, the drastic 1->0 improvement in the happy cases seems worth the mix of regressions and improvements we do observe. Some considerations for future work: - Experimenting with more size classes - More hinting/search ordering work to approximate a best-fit allocator Signed-off-by: Boris Burkov Signed-off-by: David Sterba commit 854c2f365d7e0b5b1250953e03860f09a7847c39 Author: Boris Burkov Date: Thu Dec 15 16:06:32 2022 -0800 btrfs: add more find_free_extent tracepoints find_free_extent is a complicated function. It consists (at least) of: - a hint that jumps into the middle of a for loop macro - a middle loop trying every raid level - an outer loop ascending through ffe loop levels - complicated logic for skipping some of those ffe loop levels - multiple underlying in-bg allocators (zoned, cluster, no cluster) Which is all to say that more tracing is helpful for debugging its behavior. Add two new tracepoints: at the entrance to the block_groups loop (hit for every raid level and every ffe_ctl loop) and at the point we seriously consider a block_group for allocation. This way we can see the whole path through the algorithm, including hints, multiple loops, etc. Reviewed-by: Johannes Thumshirn Signed-off-by: Boris Burkov Reviewed-by: David Sterba Signed-off-by: David Sterba commit cfc2de0fce015d4249c674ef9f5e0b4817ba5c53 Author: Boris Burkov Date: Thu Dec 15 16:06:31 2022 -0800 btrfs: pass find_free_extent_ctl to allocator tracepoints The allocator tracepoints currently have a pile of values from ffe_ctl. In modifying the allocator and adding more tracepoints, I found myself adding to the already long argument list of the tracepoints. It makes it a lot simpler to just send in the ffe_ctl itself. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: Boris Burkov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 36d4556745fe60e0e3c8d9933c2610b1c641b2f0 Author: Christoph Hellwig Date: Mon Dec 12 08:12:43 2022 +0100 btrfs: remove the wait argument to btrfs_start_ordered_extent Given that wait is always set to 1, so remove the argument. Last use of wait with 0 was in 0c304304feab ("Btrfs: remove csum_bytes_left"). Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 235e1c7b872f9cf16e8a3e6050a05774b8763c58 Author: Filipe Manana Date: Tue Jan 10 14:56:41 2023 +0000 btrfs: use a single variable to track return value for log_dir_items() We currently use 'ret' and 'err' to track the return value for log_dir_items(), which is confusing and likely the cause for previous bugs where log_dir_items() did not return an error when it should, fixed in previous patches. So change this and use only a single variable, 'ret', to track the return value. This is simpler and makes it similar to most of the existing code. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 5cce1780dc47906fa06c7be850532c4d1a43822c Author: Filipe Manana Date: Tue Jan 10 14:56:40 2023 +0000 btrfs: use a negative value for BTRFS_LOG_FORCE_COMMIT Currently we use the value 1 for BTRFS_LOG_FORCE_COMMIT, but that value has a few inconveniences: 1) If it's ever used by btrfs_log_inode(), or any function down the call chain, we have to remember to btrfs_set_log_full_commit(), which is repetitive and has a chance to be forgotten in future use cases. btrfs_log_inode_parent() only calls btrfs_set_log_full_commit() when it gets a negative value from btrfs_log_inode(); 2) Down the call chain of btrfs_log_inode(), we may have functions that need to force a log commit, but can return either an error (negative value), false (0) or true (1). So they are forced to return some random negative to force a log commit - using BTRFS_LOG_FORCE_COMMIT would make the intention more clear. Currently the only example is flush_dir_items_batch(). So turn BTRFS_LOG_FORCE_COMMIT into a negative value. The chosen value is -(MAX_ERRNO + 1), so that it does not overlap any errno value and makes it easier to debug. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit ce394a7f39032bc2a85b070af608e3ae8b2cefda Author: Yushan Zhou Date: Tue Jan 3 13:11:37 2023 +0800 btrfs: use PAGE_{ALIGN, ALIGNED, ALIGN_DOWN} macro The header file linux/mm.h provides PAGE_ALIGN, PAGE_ALIGNED, PAGE_ALIGN_DOWN macros. Use these macros to make code more concise. Signed-off-by: Yushan Zhou Reviewed-by: David Sterba Signed-off-by: David Sterba commit d31de3785047a24959eda835b0bafb1f8629f8a9 Author: Peng Hao Date: Mon Jan 9 21:08:31 2023 +0100 btrfs: go to matching label when cleaning em in btrfs_submit_direct When btrfs_get_chunk_map fails to allocate a new em the cleanup does not need to be done so the goto target is out_err, which is consistent with current coding style. Signed-off-by: Peng Hao Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba commit 1ec49744ba83f0429c5c706708610f7821a7b6f4 Author: Josef Bacik Date: Fri Dec 16 15:15:58 2022 -0500 btrfs: turn on -Wmaybe-uninitialized We had a recent bug that would have been caught by a newer compiler with -Wmaybe-uninitialized and would have saved us a month of failing tests that I didn't have time to investigate. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit a6ca692ec22bdac5ae700e82ff575a1b5141fa40 Author: Josef Bacik Date: Fri Dec 16 15:15:51 2022 -0500 btrfs: fix uninitialized variable warning in run_one_async_start With -Wmaybe-uninitialized compiler complains about ret being possibly uninitialized, which isn't possible as the WQ_ constants are set only from our code, however we can handle the default case and get rid of the warning. The value is set to BLK_STS_IOERR so it does not issue any IO and could be potentially detected, but this is basically a "cannot happen" error. To catch any problems during development use the assert. Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ set the error in default: ] Signed-off-by: David Sterba commit cd30d3bc78d9acbd505d0d6a4cff3b87e40a8187 Author: Naohiro Aota Date: Wed Dec 21 16:47:45 2022 +0000 btrfs: zoned: fix uninitialized variable warning in btrfs_get_dev_zones Fix an uninitialized warning we get with -Wmaybe-uninitialized where it thought zno may have been uninitialized, in both cases it depends on zinfo->zone_cache but we know the value won't change between checks. Reported-by: Josef Bacik Link: https://lore.kernel.org/linux-btrfs/af6c527cbd8bdc782e50bd33996ee83acc3a16fb.1671221596.git.josef@toxicpanda.com/ Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit 12adffe6cfb8e279e8ab49504501d894ff79822a Author: Josef Bacik Date: Fri Dec 16 15:15:57 2022 -0500 btrfs: fix uninitialized variable warning in btrfs_sb_log_location We only have 3 possible mirrors, and we have ASSERT()'s to make sure we're not passing in an invalid super mirror into this function, so technically this value isn't uninitialized. However -Wmaybe-uninitialized will complain, so set it to U64_MAX so if we don't have ASSERT()'s turned on it'll error out later on when it see's the zone is beyond our maximum zones. Reviewed-by: Naohiro Aota Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 598643250c47c2a2e2339f25e2be36165eb229a9 Author: Josef Bacik Date: Fri Dec 16 15:15:55 2022 -0500 btrfs: fix uninitialized variable warnings in __set_extent_bit and convert_extent_bit We will pass in the parent and p pointer into our tree_search function to avoid doing a second search when inserting a new extent state into the tree. However because this is conditional upon passing in these pointers the compiler seems to think these values can be uninitialized if we're using -Wmaybe-uninitialized. Fix this by initializing these values. Reviewed-by: Qu Wenruo Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit efbf35a102b20246cfe4409c6ae92e72ecb67ab8 Author: Josef Bacik Date: Fri Dec 16 15:15:54 2022 -0500 btrfs: fix uninitialized variable warning in btrfs_update_block_group reclaim isn't set in the alloc case, however we only care about reclaim in the !alloc case. This isn't an actual problem, however -Wmaybe-uninitialized will complain, so initialize reclaim to quiet the compiler. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit ab199013592abb3499b8316a800a39ab61e6719f Author: Josef Bacik Date: Fri Dec 16 15:15:53 2022 -0500 btrfs: fix uninitialized variable warning in get_inode_gen Anybody that calls get_inode_gen() can have an uninitialized gen if there's an error. This isn't a big deal because all the users just exit if they get an error, however it makes -Wmaybe-uninitialized complain, so fix this up to always initialize the passed in gen, this quiets all of the uninitialized warnings in send.c. Reviewed-by: Qu Wenruo Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0e47b25cafb29338722f68e8c5a260aaf18ce92c Author: Josef Bacik Date: Fri Dec 16 15:15:52 2022 -0500 btrfs: fix uninitialized variable warning in btrfs_cleanup_ordered_extents We can conditionally pass in a locked page, and then we'll use that page range to skip marking errors as that will happen in another layer. However this causes the compiler to complain because it doesn't understand we only use these values when we have the page. Make the compiler stop complaining by setting these values to 0. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit fccf0c842ed4857cff8067b72a79fcf64d972c2f Author: Josef Bacik Date: Wed Dec 7 10:18:04 2022 -0500 btrfs: move btrfs_abort_transaction to transaction.c While trying to sync messages.[ch] I ended up with this dependency on messages.h in the rest of btrfs-progs code base because it's where btrfs_abort_transaction() was now held. We want to keep messages.[ch] limited to the kernel code, and the btrfs_abort_transaction() code better fits in the transaction code and not in messages. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ move the __cold attributes ] Signed-off-by: David Sterba commit 0c555c97ef5a96b57c8955bb3cc1be9d3fbf166e Author: Johannes Thumshirn Date: Mon Dec 12 01:02:49 2022 -0800 btrfs: directly pass in fs_info to btrfs_merge_delayed_refs Now that none of the functions called by btrfs_merge_delayed_refs() needs a btrfs_trans_handle, directly pass in a btrfs_fs_info to btrfs_merge_delayed_refs(). Reviewed-by: Qu Wenruo Reviewed-by: Josef Bacik Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit afe2d748b08ad15ae945ad3b0c2408f8b7ecea22 Author: Johannes Thumshirn Date: Mon Dec 12 01:02:48 2022 -0800 btrfs: drop trans parameter of insert_delayed_ref Now that drop_delayed_ref() doesn't need a btrfs_trans_handle, drop it from insert_delayed_ref() as well. Reviewed-by: Qu Wenruo Reviewed-by: Josef Bacik Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit f09f7851b78b2fdb9d4c3bd5b1a086ab2ab955dd Author: Johannes Thumshirn Date: Mon Dec 12 01:02:47 2022 -0800 btrfs: remove trans parameter of merge_ref Now that drop_delayed_ref() doesn't get the btrfs_trans_handle passed in anymore, we can get rid of it in merge_ref() as well. Reviewed-by: Qu Wenruo Reviewed-by: Josef Bacik Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4c89493f35c4a8143b7bdc23ff446ddbadfb39d9 Author: Johannes Thumshirn Date: Mon Dec 12 01:02:46 2022 -0800 btrfs: drop unused trans parameter of drop_delayed_ref drop_delayed_ref() doesn't use the btrfs_trans_handle it gets passed in, so remove it. Reviewed-by: Qu Wenruo Reviewed-by: Josef Bacik Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1c30e9c0c8ebce7e0ad12a8b01804253823b21f6 Author: Krzysztof Kozlowski Date: Wed Jan 18 18:54:13 2023 +0100 dt-bindings: net: wireless: minor whitespace and name cleanups Minor cleanups: - Drop redundant blank lines, - Correct indentaion in examples, - Correct node names in examples to drop underscore and use generic name. No functional impact except adjusting to preferred coding style. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230118175413.360153-1-krzysztof.kozlowski@linaro.org commit 037d05af382e2915f0a9d028019152b4e2a23ec3 Author: Vinod Koul Date: Mon Feb 13 10:39:26 2023 +0530 phy: qcom: snps-eusb2: Add missing headers The driver was missing to include couple of headers explictly which causes build to fail on other archs drivers/phy/qualcomm/phy-qcom-snps-eusb2.c: In function 'qcom_snps_eusb2_hsphy_write_mask': drivers/phy/qualcomm/phy-qcom-snps-eusb2.c:147:15: error: implicit declaration of function 'readl_relaxed' [-Werror=implicit-function-declaration] 147 | reg = readl_relaxed(base + offset); | ^~~~~~~~~~~~~ drivers/phy/qualcomm/phy-qcom-snps-eusb2.c:150:9: error: implicit declaration of function 'writel_relaxed' [-Werror=implicit-function-declaration] 150 | writel_relaxed(reg, base + offset); | ^~~~~~~~~~~~~~ drivers/phy/qualcomm/phy-qcom-snps-eusb2.c: In function 'qcom_eusb2_default_parameters': drivers/phy/qualcomm/phy-qcom-snps-eusb2.c:161:42: error: implicit declaration of function 'FIELD_PREP' [-Werror=implicit-function-declaration] 161 | FIELD_PREP(PHY_CFG_TX_PREEMP_TUNE_MASK, 0)); | ^~~~~~~~~~ Fix this by adding bitfield.h and iopoll.h explictly Fixes: 80090810f5d3 ("phy: qcom: Add QCOM SNPS eUSB2 driver") Reported-by: Stephen Rothwell Reported-by: kernel test robot Signed-off-by: Vinod Koul commit f9901f64536c39f699e6ed228c5e64e7e7ce8708 Author: Krzysztof Kozlowski Date: Wed Jan 25 12:34:18 2023 +0100 cpuidle: psci: Do not suspend topology CPUs on PREEMPT_RT The runtime Power Management of CPU topology is not compatible with PREEMPT_RT: 1. Core cpuidle path disables IRQs. 2. Core cpuidle calls cpuidle-psci. 3. cpuidle-psci in __psci_enter_domain_idle_state() calls pm_runtime_put_sync_suspend() and pm_runtime_get_sync() which use spinlocks (which are sleeping on PREEMPT_RT). Deep sleep modes are not a priority of Realtime kernels because the latencies might become unpredictable. On the other hand the PSCI CPU idle power domain is a parent of other devices and power domain controllers, thus it cannot be simply skipped (e.g. on Qualcomm SM8250). Disable the idle callbacks in cpuidle-psci and mark the domain as always on. This is a trade-off between making PREEMPT_RT working and still having a proper power domain hierarchy in the system. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Ulf Hansson Tested-by: Adrien Thierry Signed-off-by: Rafael J. Wysocki commit e947925f10c250ba3ad2d905006b2e632510310c Author: Keguang Zhang Date: Fri Feb 10 19:09:34 2023 +0800 MIPS: loongson32: Drop obsolete cpufreq platform device The obsolete cpufreq driver was removed, drop the platform device and data accordingly. Link: https://lore.kernel.org/all/20230112135342.3927338-1-keguang.zhang@gmail.com Signed-off-by: Keguang Zhang Signed-off-by: Rafael J. Wysocki commit 9e34fad00fc889abbb99d751a4c22cf2bded10df Author: Guillaume Tucker Date: Thu Feb 9 09:55:36 2023 +0100 selftests: use printf instead of echo -ne Rather than trying to guess which implementation of "echo" to run with support for "-ne" options, use "printf" instead of "echo -ne". It handles escape characters as a standard feature and it is widespread among modern shells. Reported-by: "kernelci.org bot" Suggested-by: David Laight Fixes: 3297a4df805d ("kselftests: Enable the echo command to print newlines in Makefile") Fixes: 79c16b1120fe ("selftests: find echo binary to use -ne options") Signed-off-by: Guillaume Tucker Reviewed-by: Guenter Roeck Signed-off-by: Shuah Khan commit 1e6b485c922fbedf41d5a9f4e6449c5aeb923a32 Author: Masami Hiramatsu (Google) Date: Sun Jan 22 08:32:50 2023 +0900 selftests/ftrace: Fix bash specific "==" operator Since commit a1d6cd88c897 ("selftests/ftrace: event_triggers: wait longer for test_event_enable") introduced bash specific "==" comparation operator, that test will fail when we run it on a posix-shell. `checkbashisms` warned it as below. possible bashism in ftrace/func_event_triggers.tc line 45 (should be 'b = a'): if [ "$e" == $val ]; then This replaces it with "=". Fixes: a1d6cd88c897 ("selftests/ftrace: event_triggers: wait longer for test_event_enable") Signed-off-by: Masami Hiramatsu (Google) Reviewed-by: Steven Rostedt (Google) Signed-off-by: Shuah Khan commit 787fccb321dd6c1c464bb11d952074edbde5de36 Author: Tzung-Bi Shih Date: Fri Feb 3 18:14:30 2023 +0800 selftests: tpm2: remove redundant ord() When testing with FLAG_DEBUG enabled client, it emits the following error messages: File "/root/tpm2/tpm2.py", line 347, in hex_dump d = [format(ord(x), '02x') for x in d] File "/root/tpm2/tpm2.py", line 347, in d = [format(ord(x), '02x') for x in d] TypeError: ord() expected string of length 1, but int found The input of hex_dump() should be packed binary data. Remove the ord(). Signed-off-by: Tzung-Bi Shih Signed-off-by: Shuah Khan commit 4ebe33398c40c1118b4d8546978036c0e0032d1b Author: Guillaume Tucker Date: Fri Feb 3 16:26:03 2023 +0100 selftests: find echo binary to use -ne options Find the actual echo binary using $(which echo) and use it for formatted output with -ne. On some systems, the default echo command doesn't handle the -e option and the output looks like this (arm64 build): -ne Emit Tests for alsa -ne Emit Tests for amd-pstate -ne Emit Tests for arm64 This is for example the case with the KernelCI Docker images e.g. kernelci/gcc-10:x86-kselftest-kernelci. With the actual echo binary (e.g. in /bin/echo), the output is formatted as expected (x86 build this time): Emit Tests for alsa Emit Tests for amd-pstate Skipping non-existent dir: arm64 Only the install target is using "echo -ne" so keep the $ECHO variable local to it. Reported-by: "kernelci.org bot" Fixes: 3297a4df805d ("kselftests: Enable the echo command to print newlines in Makefile") Signed-off-by: Guillaume Tucker Signed-off-by: Shuah Khan commit 4b225d4f067f544b7594ce8a18216e19f0c1d692 Author: Colin Ian King Date: Thu Feb 2 12:56:21 2023 +0000 selftests: Fix spelling mistake "allright" -> "all right" There are two spelling mistakes in the test messages. Fix them. Signed-off-by: Colin Ian King Signed-off-by: Shuah Khan commit 5adbe55c8ba5c2d03add62386e4722d273e5b893 Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:55 2023 -0500 selftests: tdx: Use installed kernel headers search path Use $(KHDR_INCLUDES) as lookup path for installed kernel headers rather than using kernel headers in include/uapi from the source kernel tree kernel headers. Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Signed-off-by: Shuah Khan commit 4c983a14238d6d4e95c5783b9d93dd4d4aeccdd9 Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:54 2023 -0500 selftests: ptrace: Use installed kernel headers search path Use $(KHDR_INCLUDES) as lookup path for installed kernel headers rather than using kernel headers in include/uapi from the source kernel tree kernel headers. Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Signed-off-by: Shuah Khan commit a24ebb4937034e3b9459a5faf353c26af27f62be Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:53 2023 -0500 selftests: memfd: Use installed kernel headers search path Use $(KHDR_INCLUDES) as lookup path for installed kernel headers rather than using kernel headers in include/uapi from the source kernel tree kernel headers. Remove bogus ../../../../include/ from the search path, because kernel source headers are not needed by those user-space selftests, and it causes issues because -I paths are searched before -isystem paths, and conflicts for files appearing both in kernel sources and in uapi headers with incompatible semantics (e.g. types.h). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Signed-off-by: Shuah Khan commit 0d7a91678aaacf8e2f532c3e04a276af06b42d1c Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:52 2023 -0500 selftests: iommu: Use installed kernel headers search path Use $(KHDR_INCLUDES) as lookup path for installed kernel headers rather than using kernel headers in include/uapi from the source kernel tree kernel headers. Remove bogus ../../../../include/ from the search path, because kernel source headers are not needed by those user-space selftests, and it causes issues because -I paths are searched before -isystem paths, and conflicts for files appearing both in kernel sources and in uapi headers with incompatible semantics (e.g. types.h). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Signed-off-by: Shuah Khan commit ac5ec90e94fe8eddb4499e51398640fa6a89d657 Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:50 2023 -0500 selftests: x86: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Signed-off-by: Shuah Khan commit 8eb3751c73bec746f61fb6bada60d1074d92b8c3 Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:49 2023 -0500 selftests: vm: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Signed-off-by: Shuah Khan commit f3886fd28987c119a98493f625cb9940b5f1c9a0 Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:48 2023 -0500 selftests: user_events: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Signed-off-by: Shuah Khan commit 5ad0c8e42c13623bd996e19ce76f2596e16eb0db Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:47 2023 -0500 selftests: sync: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Acked-by: Shuah Khan Signed-off-by: Shuah Khan commit 07d42dd854446ba3177ad7a217870a5b4edee165 Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:46 2023 -0500 selftests: seccomp: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Signed-off-by: Shuah Khan commit 0d2cace5af50806a6b32ab73d367b80e46acda0f Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:45 2023 -0500 selftests: sched: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Signed-off-by: Shuah Khan commit 2279bfc03211045c8f43a76b01889a5ca86acd5a Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:44 2023 -0500 selftests: rseq: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Signed-off-by: Shuah Khan commit 01ede99e9de16e7a1ed689c99f41022aa878f2f4 Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:43 2023 -0500 selftests: ptp: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Signed-off-by: Shuah Khan commit 3f7d71768795c386019f2295c1986d00035c9f0f Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:41 2023 -0500 selftests: pidfd: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Signed-off-by: Shuah Khan commit e81ff69f66969a16a98a2e0977c1860f1c182c74 Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:40 2023 -0500 selftests: pid_namespace: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Signed-off-by: Shuah Khan commit 465cbb1b9a9fd5f6907adb2d761facaf1a46bfbe Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:39 2023 -0500 selftests: perf_events: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Signed-off-by: Shuah Khan commit 65c68af0131bfef8e395c325735b6c40638cb931 Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:37 2023 -0500 selftests: move_mount_set_group: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Signed-off-by: Shuah Khan commit 5d11f2d0eb39d2b5c5e8f05e1f650c4a4de69918 Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:36 2023 -0500 selftests: mount_setattr: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Signed-off-by: Shuah Khan commit 498bb027726371ba4a94686d251f9be1d437573e Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:35 2023 -0500 selftests: membarrier: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Signed-off-by: Shuah Khan commit f2f9592b736087f695230410fb8dc1afd3cafbbb Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:34 2023 -0500 selftests: media_tests: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Signed-off-by: Shuah Khan commit 5d74231a2caad259f6669d8d6112814cef6bcd60 Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:33 2023 -0500 selftests: kcmp: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Signed-off-by: Shuah Khan commit ecf9fdb5c2a9d63c732acccb6318feb73dd1589f Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:32 2023 -0500 selftests: ipc: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Signed-off-by: Shuah Khan commit 8bb9c1808628babcc7b99ec2439bf102379bd4ac Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:31 2023 -0500 selftests: gpio: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Signed-off-by: Shuah Khan commit 24c55275ba0d538def2b1220002d0e808a85d50f Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:30 2023 -0500 selftests: futex: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Signed-off-by: Shuah Khan commit c2d3cf3653a8ff6e4b402d55e7f84790ac08a8ad Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:29 2023 -0500 selftests: filesystems: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Signed-off-by: Shuah Khan commit 07f0148aafe8c95a3a76cd59e9e75b4d78d1d31d Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:28 2023 -0500 selftests: drivers: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Signed-off-by: Shuah Khan commit f80f09b59fdd45753dd80ac623981ad00ece4c2d Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:27 2023 -0500 selftests: dmabuf-heaps: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Signed-off-by: Shuah Khan commit cf835b005b2857c2fd763a006c1957f332e5254b Author: Zhang Rui Date: Sat Feb 11 11:17:10 2023 +0800 powercap: intel_rapl: Fix handling for large time window When setting the power limit time window, software updates the 'y' bits and 'f' bits in the power limit register, and the value hardware takes follows the formula below Time window = 2 ^ y * (1 + f / 4) * Time_Unit When handling large time window input from userspace, using left shifting breaks in two cases: 1. when ilog2(value) is bigger than 31, in expression "1 << y", left shifting by more than 31 bits has undefined behavior. This breaks 'y'. For example, on an Alderlake platform, "1 << 32" returns 1. 2. when ilog2(value) equals 31, "1 << 31" returns negative value because '1' is recognized as signed int. And this breaks 'f'. Given that 'y' has 5 bits and hardware can never take a value larger than 31, fix the first problem by clamp the time window to the maximum possible value that the hardware can take. Fix the second problem by using unsigned bit left shift. Note that hardware has its own maximum time window limitation, which may be lower than the time window value retrieved from the power limit register. When this happens, hardware clamps the input to its maximum time window limitation. That is why a software clamp is preferred to handle the problem on hand. Signed-off-by: Zhang Rui [ rjw: Adjusted the comment added by this change ] Signed-off-by: Rafael J. Wysocki commit 2f1e07dda1e1310873647abc40bbc49eaf3b10e3 Author: Liu Xiaodong Date: Fri Feb 10 09:13:56 2023 -0500 block: ublk: check IO buffer based on flag need_get_data Currently, uring_cmd with UBLK_IO_FETCH_REQ or UBLK_IO_COMMIT_AND_FETCH_REQ is always checked whether userspace server has provided IO buffer even flag UBLK_F_NEED_GET_DATA is configured. This is a excessive check. If UBLK_F_NEED_GET_DATA is configured, FETCH_RQ doesn't need to provide IO buffer; COMMIT_AND_FETCH_REQ also doesn't need to do that if the IO type is not READ. Check ub_cmd->addr together with ublk_need_get_data() and IO type in ublk_ch_uring_cmd(). With this fix, userspace server doesn't need to preserve buffers for every ublk_io when flag UBLK_F_NEED_GET_DATA is configured, in order to save memory. Signed-off-by: Liu Xiaodong Fixes: c86019ff75c1 ("ublk_drv: add support for UBLK_IO_NEED_GET_DATA") Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20230210141356.112321-1-xiaodong.liu@intel.com Signed-off-by: Jens Axboe commit fef1f0be10c61dd16fd370964c316c399483448f Author: Bagas Sanjaya Date: Mon Feb 13 17:08:01 2023 +0700 Documentation: powerclamp: Fix numbered lists formatting Texts in numbered lists are rendered as continous paragraph when there should have been breaks between first line text in the beginning of list item and the description. Fix this by adding appropriate line breaks and indent the rest of lines to match the first line of numbered list item. Fixes: d6d71ee4a14ae6 ("PM: Introduce Intel PowerClamp Driver") Fixes: 6bbe6f5732faea ("docs: thermal: convert to ReST") Signed-off-by: Bagas Sanjaya Signed-off-by: Rafael J. Wysocki commit e8b703ed75ef859d9b8c77f0ff92558011907b7f Author: Bagas Sanjaya Date: Mon Feb 13 17:08:00 2023 +0700 Documentation: powerclamp: Escape wildcard in cpumask description kernel test robot reported htmldocs warning: Documentation/admin-guide/thermal/intel_powerclamp.rst:328: WARNING: Inline emphasis start-string without end-string. The mistaken asterisk in /proc/irq/*/smp_affinity is rendered as hyperlink as the result. Escape the asterisk to fix above warning. Link: https://lore.kernel.org/linux-doc/202302122247.N4S791c4-lkp@intel.com/ Fixes: ebf51971021881 ("thermal: intel: powerclamp: Add two module parameters") Reported-by: kernel test robot Signed-off-by: Bagas Sanjaya Signed-off-by: Rafael J. Wysocki commit e63273c1bc637fad711488afe9c2f1ab58a7ae86 Author: Bagas Sanjaya Date: Mon Feb 13 17:07:59 2023 +0700 Documentation: admin-guide: Add toctree entry for thermal docs kernel test robot reported htmldocs warnings: Documentation/admin-guide/index.rst:62: WARNING: toctree contains reference to nonexisting document 'admin-guide/thermal' Documentation/admin-guide/thermal/intel_powerclamp.rst: WARNING: document isn't included in any toctree Add toctree entry for thermal/ docs to fix these warnings. Link: https://lore.kernel.org/linux-doc/202302121759.MmJgDTxc-lkp@intel.com/ Fixes: 707bf8e1dfd51d ("Documentation: admin-guide: Move intel_powerclamp documentation") Reported-by: kernel test robot Signed-off-by: Bagas Sanjaya Signed-off-by: Rafael J. Wysocki commit 68907175ec5e6a240e724a8e3fa0064baf392b4c Merge: 01e9d2c6bea98 b0bc8c893ae07 Author: Arnd Bergmann Date: Mon Feb 13 16:22:32 2023 +0100 Merge tag 'qcom-drivers-for-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers More Qualcomm driver updates for 6.3 The qcom_scm.h file is moved into firmware/qcom, to avoid having any Qualcomm-specific files directly in include/linux. Support for PMIC GLINK is introduced, which on newer Qualcomm platforms provides an interface to the firmware implementing battery management and USB Type-C handling. Together with the base driver comes the custom altmode support driver. SMD RPM gains support for IPQ9574, and socinfo is extended with support for revision 17 of the information format and soc_id for IPQ5332 and IPQ8064 are added. The qcom_stats is changes not to fail when not all parts are initialized. * tag 'qcom-drivers-for-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: soc: qcom: socinfo: Add IDs for IPQ5332 and its variant dt-bindings: arm: qcom,ids: Add IDs for IPQ5332 and its variant dt-bindings: power: qcom,rpmpd: add RPMH_REGULATOR_LEVEL_LOW_SVS_L1 firmware: qcom_scm: Move qcom_scm.h to include/linux/firmware/qcom/ MAINTAINERS: Update qcom CPR maintainer entry dt-bindings: firmware: document Qualcomm SM8550 SCM dt-bindings: firmware: qcom,scm: add qcom,scm-sa8775p compatible soc: qcom: socinfo: Add Soc IDs for IPQ8064 and variants dt-bindings: arm: qcom,ids: Add Soc IDs for IPQ8064 and variants soc: qcom: socinfo: Add support for new field in revision 17 soc: qcom: smd-rpm: Add IPQ9574 compatible soc: qcom: pmic_glink: remove redundant calculation of svid soc: qcom: stats: Populate all subsystem debugfs files dt-bindings: soc: qcom,rpmh-rsc: Update to allow for generic nodes soc: qcom: pmic_glink: add CONFIG_NET/CONFIG_OF dependencies soc: qcom: pmic_glink: Introduce altmode support soc: qcom: pmic_glink: Introduce base PMIC GLINK driver dt-bindings: soc: qcom: Introduce PMIC GLINK binding soc: qcom: dcc: Drop driver for now Link: https://lore.kernel.org/r/20230210182242.2023901-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 01e9d2c6bea9823103958bd3d71f61b9900ef5be Merge: 4a54ecf3031c6 6bf3259922363 Author: Arnd Bergmann Date: Mon Feb 13 16:19:55 2023 +0100 Merge tag 'qcom-drivers-for-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers Qualcomm driver updates for v6.3 This introduces a new driver for the Data Capture and Compare block, which provides a mechanism for capturing hardware state (access MMIO registers) either upon request of triggered automatically e.g. upon a watchdog bite, for post mortem analysis. The remote filesystem memory share driver gains support for having its memory bound to more than a single VMID. The SCM driver gains the minimal support needed to support a new mechanism where secure world can put calls on hold and later request them to be retried. Support for the new SA8775P platform is added to rpmhpd, QDU1000 is added to the SCM driver and a long list of platforms are added to the socinfo driver. Support for socinfo data revision 16 is also introduced. Lastly a driver to program the ramp controller in MSM8976 is introduced. * tag 'qcom-drivers-for-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (33 commits) firmware: qcom: scm: Add wait-queue handling logic dt-bindings: firmware: qcom,scm: Add optional interrupt Revert "dt-bindings: power: rpmpd: Add SM4250 support" Revert "soc: qcom: rpmpd: Add SM4250 support" soc: qcom: socinfo: Add a bunch of older SoCs dt-bindings: arm: qcom,ids: Add a bunch of older SoCs dt-bindings: arm: qcom,ids: Add QRD board ID soc: qcom: socinfo: Fix soc_id order dt-bindings: soc: qcom: smd-rpm: Exclude MSM8936 from glink-channels dt-bindings: firmware: qcom: scm: Separate VMIDs from header to bindings soc: qcom: rmtfs: Optionally map RMTFS to more VMs dt-bindings: reserved-memory: rmtfs: Make qcom,vmid an array dt-bindings: firmware: scm: Add QDU1000/QRU1000 compatible dt-bindings: firmware: qcom,scm: narrow clocks and interconnects dt-bindings: firmware: qcom,scm: document MSM8226 clocks soc: qcom: ramp_controller: Make things static soc: qcom: rmphpd: add power domains for sa8775p dt-bindings: power: qcom,rpmpd: document sa8775p PM: AVS: qcom-cpr: Fix an error handling path in cpr_probe() soc: qcom: dcc: rewrite description of dcc sysfs files ... Link: https://lore.kernel.org/r/20230126163008.3676950-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 26e6775f75517ad6844fe5b79bc5f3fa8c22ee61 Author: Jiasheng Jiang Date: Thu Feb 9 09:07:48 2023 +0800 wifi: iwl4965: Add missing check for create_singlethread_workqueue() Add the check for the return value of the create_singlethread_workqueue() in order to avoid NULL pointer dereference. Fixes: b481de9ca074 ("[IWLWIFI]: add iwlwifi wireless drivers") Signed-off-by: Jiasheng Jiang Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230209010748.45454-1-jiasheng@iscas.ac.cn commit 1fdeb8b9f29dfd64805bb49475ac7566a3cb06cb Author: Jiasheng Jiang Date: Wed Feb 8 14:30:32 2023 +0800 wifi: iwl3945: Add missing check for create_singlethread_workqueue Add the check for the return value of the create_singlethread_workqueue in order to avoid NULL pointer dereference. Fixes: b481de9ca074 ("[IWLWIFI]: add iwlwifi wireless drivers") Signed-off-by: Jiasheng Jiang Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230208063032.42763-2-jiasheng@iscas.ac.cn commit 24d54855ff36c7c6256cb48b735a927090142a51 Author: Martin Blumenstingl Date: Sun Feb 5 00:30:01 2023 +0100 wifi: rtw88: mac: Use existing macros in rtw_pwr_seq_parser() Replace the magic numbers for the intf_mask with their existing RTW_PWR_INTF_PCI_MSK and RTW_PWR_INTF_USB_MSK macros to make the code easier to understand. Acked-by: Ping-Ke Shih Signed-off-by: Martin Blumenstingl Reviewed-by: Simon Horman Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230204233001.1511643-5-martin.blumenstingl@googlemail.com commit 7b6e9df91133e13ce7d980fcdb55cc7f26099106 Author: Martin Blumenstingl Date: Sun Feb 5 00:30:00 2023 +0100 wifi: rtw88: Move enum rtw_tx_queue_type mapping code to tx.{c,h} This code is not specific to the PCIe bus type but can be re-used by USB and SDIO bus types. Move it to tx.{c,h} to avoid code-duplication in the future. While here, add checking of the ac argument in rtw_tx_ac_to_hwq() so we're not accessing entries beyond the end of the array. Signed-off-by: Martin Blumenstingl Reviewed-by: Simon Horman Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230204233001.1511643-4-martin.blumenstingl@googlemail.com commit c90897960c19f5bad59fcd391901ac1b7787c50b Author: Martin Blumenstingl Date: Sun Feb 5 00:29:59 2023 +0100 wifi: rtw88: pci: Change queue datatype to enum rtw_tx_queue_type This makes it easier to understand which values are allowed for the "queue" variable when using the enum instead of an u8. Acked-by: Ping-Ke Shih Signed-off-by: Martin Blumenstingl Reviewed-by: Simon Horman Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230204233001.1511643-3-martin.blumenstingl@googlemail.com commit 6152b649a70861e72220de9f9abf2fe570967493 Author: Martin Blumenstingl Date: Sun Feb 5 00:29:58 2023 +0100 wifi: rtw88: pci: Use enum type for rtw_hw_queue_mapping() and ac_to_hwq rtw_hw_queue_mapping() and ac_to_hwq[] hold values of type enum rtw_tx_queue_type. Change their types to reflect this to make it easier to understand this part of the code. While here, also change the array to be static const as it is not supposed to be modified at runtime. Signed-off-by: Martin Blumenstingl Reviewed-by: Simon Horman Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230204233001.1511643-2-martin.blumenstingl@googlemail.com commit 900cad6ef12e1cfacedddf125ba72386e33bc4a6 Author: Jonathan Neuschäfer Date: Sun Jan 29 13:49:18 2023 +0100 wifi: wl1251: Fix a typo ("boradcast") It should be "broadcast". Signed-off-by: Jonathan Neuschäfer Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230129124919.1305057-1-j.neuschaefer@gmx.net commit e6a1c4b9884f1c917e505e5663bdeff489ff1c36 Author: Doug Brown Date: Sun Jan 22 21:31:32 2023 -0800 wifi: libertas: add support for WPS enrollee IE in probe requests Add compatibility with WPS by passing on WPS enrollee information in probe requests. Ignore other IEs supplied in the scan request. This also has the added benefit of restoring compatibility with newer wpa_supplicant versions that always add scan IEs. Previously, with max_scan_ie_len set to 0, scans would always fail. Suggested-by: Dan Williams Signed-off-by: Doug Brown Reviewed-by: Dan Williams Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230123053132.30710-5-doug@schmorgal.com commit 5fb2a7854a9e6cad3f665cf290864c858cbc68d5 Author: Doug Brown Date: Sun Jan 22 21:31:31 2023 -0800 wifi: libertas: add new TLV type for WPS enrollee IE Add a define for the TLV type that will be used to add WPS enrollee information to probe requests. Suggested-by: Dan Williams Signed-off-by: Doug Brown Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230123053132.30710-4-doug@schmorgal.com commit 57db1ba357368b4de0ed3ede334a83929febb5d0 Author: Doug Brown Date: Sun Jan 22 21:31:30 2023 -0800 wifi: libertas: only add RSN/WPA IE in lbs_add_wpa_tlv The existing code only converts the first IE to a TLV, but it returns a value that takes the length of all IEs into account. When there is more than one IE (which happens with modern wpa_supplicant versions for example), the returned length is too long and extra junk TLVs get sent to the firmware, resulting in an association failure. Fix this by finding the first RSN or WPA IE and only adding that. This has the extra benefit of working properly if the RSN/WPA IE isn't the first one in the IE buffer. While we're at it, clean up the code to use the available structs like the other lbs_add_* functions instead of directly manipulating the TLV buffer. Signed-off-by: Doug Brown Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230123053132.30710-3-doug@schmorgal.com commit 53d3a735875e35ccaf7a21b643feb167229515f1 Author: Doug Brown Date: Sun Jan 22 21:31:29 2023 -0800 wifi: libertas: fix code style in Marvell structs Several of the structs are using the deprecated convention of items[1] for a dynamically sized trailing element. Convert these structs to the modern C99 style of items[]. Also fix a couple of camel case struct element names. Signed-off-by: Doug Brown Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230123053132.30710-2-doug@schmorgal.com commit 41204a607679ccca7eabff9f2871b969d6ef2ce3 Author: Rafael J. Wysocki Date: Tue Feb 7 20:59:59 2023 +0100 cpuidle: driver: Update microsecond values of state parameters as needed If the cpuidle driver provides the target residency and exit latency in nanoseconds, the corresponding values in microseconds need to be set to reflect the provided numbers in order for the sysfs interface to show them correctly, so make __cpuidle_driver_init() do that. Signed-off-by: Rafael J. Wysocki Tested-by: Artem Bityutskiy commit 384fcb0bd15ec3d458268294346f4e30e1baeafc Merge: 9330e13e6b802 480ba14b9a956 Author: Arnd Bergmann Date: Mon Feb 13 15:57:32 2023 +0100 Merge tag 'qcom-arm64-defconfig-for-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/defconfig More ARM64 defconfig updates for v6.3 Here are two more defconfig updates for 6.3, enabling the SM8450 Display clock controller driver, as well as the SDAM driver, a driver exposing SRAM on newer Qualcomm PMICs to other devices. * tag 'qcom-arm64-defconfig-for-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: defconfig: enable Qualcomm SDAM nvmem driver arm64: defconfig: enable SM8450 DISPCC clock driver arm64: defconfig: enable the clock driver for Qualcomm SA8775P platforms arm64: defconfig: enable Visionox VTDR6130 DSI Panel driver arm64: defconfig: enable SM8550 DISPCC clock driver arm64: defconfig: enable Qualcomm PCIe modem drivers arm64: defconfig: Enable SC8280XP Display Clock Controller arm64: defconfig: Enable GCC, TCSRCC, pinctrl and interconnect for SM8550 arm64: defconfig: enable crypto userspace API arm64: defconfig: build SDM_LPASSCC_845 as a module arm64: defconfig: enable camera on Thundercomm RB5 platform arm64: defconfig: build PINCTRL_SM8250_LPASS_LPI as module arm64: defconfig: Enable Qualcomm EUD Link: https://lore.kernel.org/r/20230210181516.2021902-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 7dbdc16fc85bcd89a2f3698df37a7202ea266454 Merge: fc54e13d71250 f069ede81ef43 Author: Arnd Bergmann Date: Mon Feb 13 15:47:21 2023 +0100 Merge tag 'qcom-arm64-for-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt More Qualcomm ARM64 DT updates for 6.3 The new Qualcomm QDU1000 and QRU1000 platforms, and the IDP device on these are introduced. New support for a couple of USB modem sticks from THWC are introduced, so is support for Xiaomi Mi Pad 5 Pro and the Pro SKU of the Herobrine device. The Core Bus Fabric (CBF) is introduced on MSM8996. Interconnect paths for UFS are also described. A few fixes related to the power-grid of herobrine, on SC7280, are introduced. QFPROM is introduced on IPQ8074 and Interconnect providers are added for SDM670. On SDM845 the duplicated wcd9340 audio coded description is moved from devices to a common file, audio devices are added to the OnePlus 6 and 6T. On SM6115 debug UART, SMP2P, watchdog nodes are introduced, and the platform is switched to use #address/size-cells of 2, in line with most other platforms. Camera control interface and clock controllers are added for SM6350, and the CCI interface is enabled on the Fairphone FP4. On SM8350 the interconnect reference of SDHCI controller is corrected, DSI1 PHY clocks are properly described as sources for the Display clock controller and DSI1 is wired up to the display controller. The firmware paths are corrected for the Sony Xperia Nagara platform. The GPR bus, audio servic3es and LPASS pinctrl nodes are added for the SM8550 platform. Additionally a few small typos/errors are corrected. gpio-ranges are corrected across MSM8953, SM6115 and SC8280XP and a range of DT validation issues are corrected. * tag 'qcom-arm64-for-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (81 commits) arm64: dts: qcom: sc7280: Power herobrine's 3.3 eDP/TS rail more properly arm64: dts: qcom: pmk8550: fix PON compatible arm64: dts: qcom: sm8550: fix DSI controller compatible arm64: dts: qcom: sc7280: Hook up the touchscreen IO rail on evoker arm64: dts: qcom: sc7280: Hook up the touchscreen IO rail on villager arm64: dts: qcom: sc7280: Add 3ms ramp to herobrine's pp3300_left_in_mlb arm64: dts: qcom: sc7280: On QCard, regulator L3C should be 1.8V arm64: dts: qcom: sc8280xp: correct LPASS GPIO gpio-ranges arm64: dts: qcom: msm8992-lg-bullhead: Enable regulators arm64: dts: qcom: sm6115: correct TLMM gpio-ranges arm64: dts: qcom: msm8953: correct TLMM gpio-ranges arm64: dts: qcom: msm8992-lg-bullhead: Correct memory overlaps with the SMEM and MPSS memory regions arm64: dts: qcom: sm8350-hdk: correct LT9611 pin function arm64: dts: qcom: sm8350-hdk: align pin config node names with bindings arm64: dts: qcom: sm6350: Use specific qmpphy compatible arm64: dts: qcom: sm6115: Add smp2p nodes arm64: dts: qcom: sm7225-fairphone-fp4: Enable CCI busses arm64: dts: qcom: sm6350: Add CCI nodes arm64: dts: qcom: sm6350: Add camera clock controller dt-bindings: clock: add QCOM SM6350 camera clock bindings ... Link: https://lore.kernel.org/r/20230210192908.2039976-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit fc54e13d712501cd2ad99ac015c5ff8a0c6ae184 Merge: 59b05cfa5323f 68e8dd352adc2 Author: Arnd Bergmann Date: Mon Feb 13 15:44:37 2023 +0100 Merge tag 'qcom-dts-for-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt More Qualcomm ARM32 DTS updates for 6.3 This adds backlight, notification LED, vibrator, volume keys and hall sensor to the OnePlus One, and provides a range of Devicetree validation fixes across various platforms. * tag 'qcom-dts-for-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (22 commits) ARM: dts: qcom: align OPP table names with DT schema ARM: dts: qcom: msm8974-oneplus-bacon: Add notification LED ARM: dts: qcom: msm8974-oneplus-bacon: Add backlight ARM: dts: qcom: msm8974-oneplus-bacon: Add volume keys and hall sensor ARM: dts: qcom: msm8974-oneplus-bacon: Add vibrator ARM: dts: qcom: pm8941: Add vibrator node ARM: dts: qcom: sdx55: correct TLMM gpio-ranges dt-bindings: arm: qcom: add the sa8775p-ride board ARM: dts: qcom: apq8064: add second DSI host and PHY ARM: dts: qcom: apq8060-dragonboard: align MPP pin node names with DT schema dt-bindings: arm: qcom: Add Xiaomi Mi Pad 5 Pro (xiaomi-elish) ARM: dts: qcom-sdx65: align RPMh regulator nodes with bindings ARM: dts: qcom-sdx55: align RPMh regulator nodes with bindings ARM: dts: qcom: use "okay" for status ARM: dts: qcom: sdx65: Add Qcom SMMU-500 as the fallback for IOMMU node ARM: dts: qcom: sdx55: Add Qcom SMMU-500 as the fallback for IOMMU node ARM: dts: qcom: apq8064: use hdmi_phy for the MMCC's hdmipll clock ARM: dts: qcom: apq8064: add #clock-cells to the HDMI PHY node ARM: dts: qcom: ipq8064: move reg-less nodes outside soc node dt-bindings: qcom: Document msm8916-thwc-uf896 and ufi001c ... Link: https://lore.kernel.org/r/20230210185846.2032601-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 59b05cfa5323ffefcd5c2f97d6e01f040e7dc637 Merge: 306b8201b0bb6 301d3dd05525e Author: Arnd Bergmann Date: Mon Feb 13 15:38:57 2023 +0100 Merge tag 'samsung-dt-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM changes for v6.3, part two Several cleanups pointed out by `make dtbs_check`: 1. Align LED status node name with bindings. 2. Drop redundant properties. 3. Move i2c-gpio node out of soc to top-level, as soc node is expected to have only MMIO nodes. 4. Correct SPI NOR flash compatible in SMDK5250 and SMDKv310. 5. Align GPIO property names in WM1811-family codec nodes with bindings. 6. Correct MAX98090 codec DAI cells in Snow. * tag 'samsung-dt-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: correct max98090 DAI argument in Snow ARM: dts: s5pv210: add "gpios" suffix to wlf,ldo1ena on Aries ARM: dts: exynos: add "gpios" suffix to wlf,ldo1ena on Arndale ARM: dts: exynos: add "gpios" suffix to wlf,ldo1ena on Midas ARM: dts: exynos: correct SPI nor compatible in SMDK5250 ARM: dts: exynos: correct SPI nor compatible in SMDKv310 ARM: dts: exynos: move I2C10 out of soc node on Arndale ARM: dts: exynos: drop redundant address/size cells from I2C10 on Arndale ARM: dts: exynos: drop default status from I2C10 on Arndale ARM: dts: exynos: align status led name with bindings on Origen4210 Link: https://lore.kernel.org/r/20230211113103.58894-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 3004e8d2a0a98bbf4223ae146464fadbff68bf78 Author: Shyam Sundar S K Date: Mon Feb 13 17:44:57 2023 +0530 platform/x86/amd/pmf: Add depends on CONFIG_POWER_SUPPLY It is reported that amd_pmf driver is missing "depends on" for CONFIG_POWER_SUPPLY causing the following build error. ld: drivers/platform/x86/amd/pmf/core.o: in function `amd_pmf_remove': core.c:(.text+0x10): undefined reference to `power_supply_unreg_notifier' ld: drivers/platform/x86/amd/pmf/core.o: in function `amd_pmf_probe': core.c:(.text+0x38f): undefined reference to `power_supply_reg_notifier' make[1]: *** [scripts/Makefile.vmlinux:34: vmlinux] Error 1 make: *** [Makefile:1248: vmlinux] Error 2 Add this to the Kconfig file. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217028 Fixes: c5258d39fc4c ("platform/x86/amd/pmf: Add helper routine to update SPS thermals") Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20230213121457.1764463-1-Shyam-sundar.S-k@amd.com Cc: stable@vger.kernel.org Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 4827aae061337251bb91801b316157a78b845ec7 Author: Andy Shevchenko Date: Sun Feb 12 16:13:55 2023 +0200 gpio: sim: Use %pfwP specifier instead of calling fwnode API directly Instead of calling fwnode_get_name() and supply as %s, use %pfwP which will do the same inside printf() call. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 816477edfba6e7ab9411acec5f07cfa00e0882f7 Author: Ira Weiny Date: Fri Feb 3 20:06:35 2023 -0800 mm: Remove get_kernel_pages() The only caller to get_kernel_pages() [shm_get_kernel_pages()] has been updated to not need it. Remove get_kernel_pages(). Cc: Mel Gorman Cc: Al Viro Cc: "Fabio M. De Francesco" Cc: Christoph Hellwig Cc: Andrew Morton Acked-by: John Hubbard Signed-off-by: Ira Weiny Acked-by: Andrew Morton Reviewed-by: Christoph Hellwig Reviewed-by: Sumit Garg Signed-off-by: Jens Wiklander commit 0249a75b365911f91b87935bc08a4795a6fa7dd0 Author: Ira Weiny Date: Fri Feb 3 20:06:34 2023 -0800 tee: Remove call to get_kernel_pages() The kernel pages used by shm_get_kernel_pages() are allocated using GFP_KERNEL through the following call stack: trusted_instantiate() trusted_payload_alloc() -> GFP_KERNEL tee_shm_register_kernel_buf() register_shm_helper() shm_get_kernel_pages() Where is one of: trusted_key_unseal() trusted_key_get_random() trusted_key_seal() Because the pages can't be from highmem get_kernel_pages() boils down to a get_page() call. Remove the get_kernel_pages() call and open code the get_page(). In case a highmem page does slip through warn on once for a kmap'ed address. Cc: Jens Wiklander Cc: Al Viro Cc: "Fabio M. De Francesco" Cc: Christoph Hellwig Cc: Linus Torvalds Signed-off-by: Ira Weiny Reviewed-by: Christoph Hellwig Reviewed-by: Sumit Garg Signed-off-by: Jens Wiklander commit c83900393aa133d5fefdbf2ab3377c7fbeec0c07 Author: Ira Weiny Date: Fri Feb 3 20:06:33 2023 -0800 tee: Remove vmalloc page support The kernel pages used by shm_get_kernel_pages() are allocated using GFP_KERNEL through the following call stack: trusted_instantiate() trusted_payload_alloc() -> GFP_KERNEL tee_shm_register_kernel_buf() register_shm_helper() shm_get_kernel_pages() Where is one of: trusted_key_unseal() trusted_key_get_random() trusted_key_seal() Remove the vmalloc page support from shm_get_kernel_pages(). Replace with a warn on once. Cc: Al Viro Cc: "Fabio M. De Francesco" Cc: Christoph Hellwig Cc: Linus Torvalds Reviewed-by: Jens Wiklander Signed-off-by: Ira Weiny Reviewed-by: Christoph Hellwig Reviewed-by: Sumit Garg Signed-off-by: Jens Wiklander commit f3837ab7adbc1799a3c5648d34e3e27eb70709a6 Author: Ira Weiny Date: Fri Feb 3 20:06:32 2023 -0800 highmem: Enhance is_kmap_addr() to check kmap_local_page() mappings is_kmap_addr() is only looking at the kmap() address range which may cause check_heap_object() to miss checking an overflow on a kmap_local_page() page. Add a check for the kmap_local_page() address range to is_kmap_addr(). Cc: Matthew Wilcox Cc: Al Viro Cc: "Fabio M. De Francesco" Cc: Thomas Gleixner Cc: Christoph Hellwig Cc: Andrew Morton Signed-off-by: Ira Weiny Acked-by: Andrew Morton Signed-off-by: Jens Wiklander commit d227116c0e216da2eceba1d51a364ff025dffa58 Author: Yang Li Date: Mon Feb 13 09:05:47 2023 +0800 ASoC: codecs: Remove unneeded semicolon ./sound/soc/codecs/peb2466.c:1851:2-3: Unneeded semicolon ./sound/soc/codecs/peb2466.c:1887:2-3: Unneeded semicolon Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4045 Signed-off-by: Yang Li Acked-by: Herve Codina Link: https://lore.kernel.org/r/20230213010547.105312-1-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown commit 771725efe5e2e5396dd9d1220437e5f9d6b9ca9d Author: Steffen Aschbacher Date: Mon Feb 13 09:38:05 2023 +0200 ASoC: tlv320adcx140: fix 'ti,gpio-config' DT property init When the 'ti,gpio-config' property is not defined, the device_property_count_u32() will return an error, rather than zero. The current check, only handles a return value of zero, which assumes that the property is defined and has nothing defined. This change extends the check to also check for an error case (most likely to be hit by the case that the 'ti,gpio-config' is not defined). In case that the 'ti,gpio-config' and the returned 'gpio_count' is not correct, there is a 'if (gpio_count != ADCX140_NUM_GPIO_CFGS)' check, a few lines lower that will return -EINVAL. This means that someone tried to define 'ti,gpio-config', but with the wrong number of GPIOs. Fixes: d5214321498a ("ASoC: tlv320adcx140: Add support for configuring GPIO pin") Signed-off-by: Steffen Aschbacher Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20230213073805.14640-1-alex@shruggie.ro Signed-off-by: Mark Brown commit 937ca916bf4de427242fb78105a0089af0dd43b3 Author: William Zhang Date: Sun Feb 12 12:50:54 2023 -0800 MAINTAINERS: Remove file reference for Broadcom Broadband SoC HS SPI driver entry brcm,bcm63xx-hsspi-peripheral-props.yaml is not in use at least for now. Remove it from the maintainer entry. Fixes: 80323599e33f ("MAINTAINERS: Add entry for Broadcom Broadband SoC HS SPI drivers") Reported-by: kernel test robot https://lore.kernel.org/oe-kbuild-all/202302121840.GtduUT37-lkp@intel.com/ Signed-off-by: William Zhang Link: https://lore.kernel.org/r/20230212205054.26348-1-william.zhang@broadcom.com Signed-off-by: Mark Brown commit 2cca486cad4bf51da57cdad150697476a702ab69 Author: William Zhang Date: Fri Feb 10 19:27:59 2023 -0800 spi: bcm63xx-hsspi: bcmbca-hsspi: fix _be16 type usage sparse tool report warnings: drivers/spi/spi-bcm63xx-hsspi.c:197:31: sparse: sparse: cast from restricted __be16. The controller requires big endian 16 bit data. Define an intermediate u16 value and use __be16 piointer dereferncing for the data to avoid directly casting to u16 and sparse warning. Fixes: 85a84a616999 ("spi: bcm63xx-hsspi: Endianness fix for ARM based SoC") Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202302110438.sQwQnU54-lkp@intel.com/ Signed-off-by: William Zhang Link: https://lore.kernel.org/r/20230211032759.72967-1-william.zhang@broadcom.com Signed-off-by: Mark Brown commit 9d1c73191f94c79076b5f46a31b8a1e12b18bc79 Author: Axel Lin Date: Sat Feb 11 23:00:19 2023 +0800 regulator: max20411: Fix off-by-one for n_voltages setting Otherwise regulator_list_voltage returns -EINVAL for MAX20411_MAX_SEL. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20230211150019.1545542-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 4680716d6a33f50c96eb7ce6ae9cb868baa04438 Author: Weidong Wang Date: Mon Feb 13 17:36:49 2023 +0800 ASoC: codecs: Modify error implicit declaration of function 'gpiod_set_value_cansleep' Add select GPIOLIB to the sound/soc/codecs/Kconfig file Signed-off-by: Ben Yi Signed-off-by: Weidong Wang Link: https://lore.kernel.org/r/20230213093649.22928-4-wangweidong.a@awinic.com Signed-off-by: Mark Brown commit 14d5d454547adae64a76731c90c37fe33f7d1d44 Author: Weidong Wang Date: Mon Feb 13 17:36:48 2023 +0800 ASoC: codecs: Modify the log print statement Change hdrlen to hdr_len Signed-off-by: Ben Yi Signed-off-by: Weidong Wang Link: https://lore.kernel.org/r/20230213093649.22928-3-wangweidong.a@awinic.com Signed-off-by: Mark Brown commit 27db41a1f73ad18ed6540e1f8a7083422e5b53d6 Author: Weidong Wang Date: Mon Feb 13 17:36:47 2023 +0800 ASoC: codecs: Fixed a spelling error in the function name Change the function name aw88395_plack_event to aw88395_playback_event Signed-off-by: Ben Yi Signed-off-by: Weidong Wang Link: https://lore.kernel.org/r/20230213093649.22928-2-wangweidong.a@awinic.com Signed-off-by: Mark Brown commit 46f5c98e158449a1ddbf9b22e046810184c92d43 Author: Krzysztof Kozlowski Date: Sat Feb 11 14:47:55 2023 +0100 ASoC: dt-bindings: maxim,max98095: Convert to dtschema Convert the Maxim Integrated MAX98095 audio codec bindings to DT schema. Add missing sound-dai-cells during conversion. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230211134755.86061-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 66dc3b9b9a6f4b5c7013f15c66073ddd20852b66 Author: Alexander Sverdlin Date: Sun Feb 12 23:09:23 2023 +0100 ASoC: ep93xx: ignore 0 Hz sysclk Commit 2458adb8f92a ("SoC: simple-card-utils: set 0Hz to sysclk when shutdown") added a call to snd_soc_dai_set_sysclk() with 0 Hz frequency. Being propagated further it causes a division by zero in clk-ep93xx driver: Division by zero in kernel. CPU: 0 PID: 52 Comm: aplay Tainted: G W 6.2.0-rc4-... #1 Hardware name: Generic DT based system unwind_backtrace from show_stack+0x10/0x18 show_stack from dump_stack_lvl+0x28/0x34 dump_stack_lvl from __div0+0x10/0x1c __div0 from Ldiv0+0x8/0x1c Ldiv0 from ep93xx_mux_determine_rate+0x78/0x1d0 ep93xx_mux_determine_rate from clk_core_round_rate_nolock+0x48/0xc8 clk_core_round_rate_nolock from clk_core_set_rate_nolock+0x48/0x160 clk_core_set_rate_nolock from clk_set_rate+0x30/0x8c clk_set_rate from ep93xx_i2s_set_sysclk+0x30/0x6c ep93xx_i2s_set_sysclk from snd_soc_dai_set_sysclk+0x3c/0xa4 snd_soc_dai_set_sysclk from asoc_simple_shutdown+0xb8/0x164 asoc_simple_shutdown from snd_soc_link_shutdown+0x44/0x54 snd_soc_link_shutdown from soc_pcm_clean+0x78/0x180 soc_pcm_clean from soc_pcm_close+0x28/0x40 soc_pcm_close from snd_pcm_release_substream.part.0+0x3c/0x84 snd_pcm_release_substream.part.0 from snd_pcm_release+0x40/0x88 snd_pcm_release from __fput+0x74/0x278 There has been commit f1879d7b98dc ("ASoC: rockchip: ignore 0Hz sysclk"), but it prepared by far not all drivers. Signed-off-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20230212220923.258414-1-alexander.sverdlin@gmail.com Signed-off-by: Mark Brown commit 8222d5910dae08213b6d9d4bc9a7f8502855e624 Author: Herbert Xu Date: Thu Feb 9 09:09:52 2023 +0800 xfrm: Zero padding when dumping algos and encap When copying data to user-space we should ensure that only valid data is copied over. Padding in structures may be filled with random (possibly sensitve) data and should never be given directly to user-space. This patch fixes the copying of xfrm algorithms and the encap template in xfrm_user so that padding is zeroed. Reported-by: syzbot+fa5414772d5c445dac3c@syzkaller.appspotmail.com Reported-by: Hyunwoo Kim Signed-off-by: Herbert Xu Reviewed-by: Sabrina Dubroca Signed-off-by: Steffen Klassert commit f18bd6f539469970a7e6d79377e5cb2c11855cae Merge: b187c70b0366b 518c5d778e985 Author: Kalle Valo Date: Mon Feb 13 14:38:27 2023 +0200 Merge tag 'mt76-for-kvalo-2023-02-03' of https://github.com/nbd168/wireless mt76 patches for 6.3 - fixes - mt7996 cleanups - switch to page pool allocator - mt7996 eht support - WED reset support commit 0e84f918fac8ae61dcb790534fad5e3555ca2930 Author: Eugenio Pérez Date: Wed Jan 18 17:43:58 2023 +0100 vdpa_sim: not reset state in vdpasim_queue_ready vdpasim_queue_ready calls vringh_init_iotlb, which resets split indexes. But it can be called after setting a ring base with vdpasim_set_vq_state. Fix it by stashing them. They're still resetted in vdpasim_vq_reset. This was discovered and tested live migrating the vdpa_sim_net device. Fixes: 2c53d0f64c06 ("vdpasim: vDPA device simulator") Signed-off-by: Eugenio Pérez Message-Id: <20230118164359.1523760-2-eperezma@redhat.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Tested-by: Lei Yang commit 5ccb51b06c8bfcfca99d3f68e671eead7318301d Author: Yangtao Li Date: Thu Feb 9 12:02:39 2023 +0800 clocksource/drivers/timer-sun4i: Add CLOCK_EVT_FEAT_DYNIRQ Add CLOCK_EVT_FEAT_DYNIRQ to allow the IRQ could be runtime set affinity to the cores that needs wake up, otherwise saying core0 has to send IPI to wakeup core1. With CLOCK_EVT_FEAT_DYNIRQ set, when broadcast timer could wake up the cores, IPI is not needed. After enabling this feature, especially the scene where cpuidle is enabled can benefit. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20230209040239.24710-1-frank.li@vivo.com Signed-off-by: Daniel Lezcano commit cf16f631b0bbd98df4b2ccc13346f564412eae68 Author: Uwe Kleine-König Date: Tue Feb 7 20:30:10 2023 +0100 clocksource/drivers/em_sti: 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 em_sti 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 Link: https://lore.kernel.org/r/20230207193010.469495-1-u.kleine-koenig@pengutronix.de Signed-off-by: Daniel Lezcano commit d8c695d310a8607fd1d6a2750368467c4e0cef6a Author: Uwe Kleine-König Date: Tue Feb 7 20:36:14 2023 +0100 clocksource/drivers/sh_tmu: 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_tmu 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 Link: https://lore.kernel.org/r/20230207193614.472060-1-u.kleine-koenig@pengutronix.de Signed-off-by: Daniel Lezcano commit 225b9596cb0227c1c1b1e4a836dad43595c3e61a Author: Matt Evans Date: Wed Feb 1 19:49:42 2023 +0000 clocksource/drivers/riscv: Patch riscv_clock_next_event() jump before first use A static key is used to select between SBI and Sstc timer usage in riscv_clock_next_event(), but currently the direction is resolved after cpuhp_setup_state() is called (which sets the next event). The first event will therefore fall through the sbi_set_timer() path; this breaks Sstc-only systems. So, apply the jump patching before first use. Fixes: 9f7a8ff6391f ("RISC-V: Prefer sstc extension if available") Signed-off-by: Matt Evans Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt Reviewed-by: Anup Patel Link: https://lore.kernel.org/r/CDDAB2D0-264E-42F3-8E31-BA210BEB8EC1@rivosinc.com Signed-off-by: Daniel Lezcano commit f3af3dc7cc351bd22742eac992c72c76749ce8c3 Author: Claudiu Beznea Date: Fri Feb 3 15:05:37 2023 +0200 clocksource/drivers/timer-microchip-pit64b: Add delay timer Add delay timer. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230203130537.1921608-3-claudiu.beznea@microchip.com Signed-off-by: Daniel Lezcano commit d19c8b2ed176c6aaf3dfefd149c740f73ce4875e Author: Claudiu Beznea Date: Fri Feb 3 15:05:36 2023 +0200 clocksource/drivers/timer-microchip-pit64b: Select driver only on ARM Microchip PIT64B is currently available on ARM based devices. Thus select it only for ARM. This allows implementing delay timer. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230203130537.1921608-2-claudiu.beznea@microchip.com Signed-off-by: Daniel Lezcano commit abd873afc889c0b4348ec4b567d83f97df8edaf6 Author: Icenowy Zheng Date: Thu Feb 2 15:28:14 2023 +0800 dt-bindings: timer: sifive,clint: add comaptibles for T-Head's C9xx T-Head C906/C910 CLINT is not compliant to SiFive ones (and even not compliant to the newcoming ACLINT spec) because of lack of mtime register. Add a compatible string formatted like the C9xx-specific PLIC compatible, and do not allow a SiFive one as fallback because they're not really compliant. Signed-off-by: Icenowy Zheng Acked-by: Krzysztof Kozlowski Reviewed-by: Samuel Holland Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20230202072814.319903-1-uwu@icenowy.me Signed-off-by: Daniel Lezcano commit 27788e01a6507c882946b9aa87318c3185cd83e6 Author: Bernhard Rosenkränzer Date: Wed Jan 25 15:35:01 2023 +0100 dt-bindings: timer: mediatek,mtk-timer: add MT8365 Add binding description for mediatek,mt8365-systimer Signed-off-by: Bernhard Rosenkränzer Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230125143503.1015424-8-bero@baylibre.com Signed-off-by: Daniel Lezcano commit 3aff0403f814df6ce2377a6ecf61dd7750a3925f Author: Lad Prabhakar Date: Thu Dec 29 22:46:01 2022 +0000 clocksource/drivers/riscv: Get rid of clocksource_arch_init() callback Having a clocksource_arch_init() callback always sets vdso_clock_mode to VDSO_CLOCKMODE_ARCHTIMER if GENERIC_GETTIMEOFDAY is enabled, this is required for the riscv-timer. This works for platforms where just riscv-timer clocksource is present. On platforms where other clock sources are available we want them to register with vdso_clock_mode set to VDSO_CLOCKMODE_NONE. On the Renesas RZ/Five SoC OSTM block can be used as clocksource [0], to avoid multiple clock sources being registered as VDSO_CLOCKMODE_ARCHTIMER move setting of vdso_clock_mode in the riscv-timer driver instead of doing this in clocksource_arch_init() callback as done similarly for ARM/64 architecture. [0] drivers/clocksource/renesas-ostm.c Signed-off-by: Lad Prabhakar Tested-by: Samuel Holland Reviewed-by: Conor Dooley Reviewed-by: Samuel Holland Link: https://lore.kernel.org/r/20221229224601.103851-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Daniel Lezcano commit c3daa4754f3c57231bf47dcf4bdf897bc5c5f1f1 Author: Uwe Kleine-König Date: Mon Jan 23 23:02:21 2023 +0100 clocksource/drivers/sh_cmt: 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_cmt 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 Link: https://lore.kernel.org/r/20230123220221.48164-1-u.kleine-koenig@pengutronix.de Signed-off-by: Daniel Lezcano commit 8d17aca90bcf36833271de6531edb58a91c40e9f Author: Jean Delvare Date: Sat Jan 21 18:29:11 2023 +0100 clocksource/drivers/timer-microchip-pit64b: 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: Claudiu Beznea Cc: Daniel Lezcano Cc: Thomas Gleixner Reviewed-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230121182911.4e47a5ff@endymion.delvare Signed-off-by: Daniel Lezcano commit 674402b0098b66b8ba91fe93c0d27af703256098 Author: Samuel Holland Date: Tue Dec 27 18:44:44 2022 -0600 clocksource/drivers/riscv: Increase the clock source rating RISC-V provides an architectural clock source via the time CSR. This clock source exposes a 64-bit counter synchronized across all CPUs. Because it is accessed using a CSR, it is much more efficient to read than MMIO clock sources. For example, on the Allwinner D1, reading the sun4i timer in a loop takes 131 cycles/iteration, while reading the RISC-V time CSR takes only 5 cycles/iteration. Adjust the RISC-V clock source rating so it is preferred over the various platform-specific MMIO clock sources. Signed-off-by: Samuel Holland Acked-by: Palmer Dabbelt Reviewed-by: Palmer Dabbelt Reviewed-by: Anup Patel Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/r/20221228004444.61568-1-samuel@sholland.org Signed-off-by: Daniel Lezcano commit 8932a9533a9cdd1fa2924a061dc87277991507ca Author: Anup Patel Date: Tue Jan 3 19:41:02 2023 +0530 clocksource/drivers/timer-riscv: Set CLOCK_EVT_FEAT_C3STOP based on DT We should set CLOCK_EVT_FEAT_C3STOP for a clock_event_device only when riscv,timer-cannot-wake-cpu DT property is present in the RISC-V timer DT node. This way CLOCK_EVT_FEAT_C3STOP feature is set for clock_event_device based on RISC-V platform capabilities rather than having it set for all RISC-V platforms. Signed-off-by: Anup Patel Reviewed-by: Conor Dooley Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20230103141102.772228-4-apatel@ventanamicro.com Signed-off-by: Daniel Lezcano commit e2bcf2d876fd7ca6ecca09794ac58d7e3a544794 Author: Anup Patel Date: Tue Jan 3 19:41:01 2023 +0530 dt-bindings: timer: Add bindings for the RISC-V timer device We add DT bindings for a separate RISC-V timer DT node which can be used to describe implementation specific behaviour (such as timer interrupt not triggered during non-retentive suspend). Signed-off-by: Anup Patel Reviewed-by: Conor Dooley Reviewed-by: Rob Herring Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20230103141102.772228-3-apatel@ventanamicro.com Signed-off-by: Daniel Lezcano commit 8b3b8fbb4896984b5564789a42240e4b3caddb61 Author: Conor Dooley Date: Tue Jan 3 19:41:00 2023 +0530 RISC-V: time: initialize hrtimer based broadcast clock event device Similarly to commit 022eb8ae8b5e ("ARM: 8938/1: kernel: initialize broadcast hrtimer based clock event device"), RISC-V needs to initiate hrtimer based broadcast clock event device before C3STOP can be used. Otherwise, the introduction of C3STOP for the RISC-V arch timer in commit 232ccac1bd9b ("clocksource/drivers/riscv: Events are stopped during CPU suspend") leaves us without any broadcast timer registered. This prevents the kernel from entering oneshot mode, which breaks timer behaviour, for example clock_nanosleep(). A test app that sleeps each cpu for 6, 5, 4, 3 ms respectively, HZ=250 & C3STOP enabled, the sleep times are rounded up to the next jiffy: == CPU: 1 == == CPU: 2 == == CPU: 3 == == CPU: 4 == Mean: 7.974992 Mean: 7.976534 Mean: 7.962591 Mean: 3.952179 Std Dev: 0.154374 Std Dev: 0.156082 Std Dev: 0.171018 Std Dev: 0.076193 Hi: 9.472000 Hi: 10.495000 Hi: 8.864000 Hi: 4.736000 Lo: 6.087000 Lo: 6.380000 Lo: 4.872000 Lo: 3.403000 Samples: 521 Samples: 521 Samples: 521 Samples: 521 Link: https://lore.kernel.org/linux-riscv/YzYTNQRxLr7Q9JR0@spud/ Fixes: 232ccac1bd9b ("clocksource/drivers/riscv: Events are stopped during CPU suspend") Suggested-by: Samuel Holland Signed-off-by: Conor Dooley Signed-off-by: Anup Patel Reviewed-by: Samuel Holland Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20230103141102.772228-2-apatel@ventanamicro.com Signed-off-by: Daniel Lezcano commit b3cbfb7927922e4586f890a70a22f13130247b4e Author: Jagan Teki Date: Thu Nov 24 00:01:18 2022 +0530 dt-bindings: timer: rk-timer: Add rktimer for rv1126 Add rockchip timer compatible string for rockchip rv1126. Signed-off-by: Jagan Teki Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221123183124.6911-3-jagan@edgeble.ai Signed-off-by: Daniel Lezcano commit 08273c9f619cb32fb041935724f576e607101f3b Author: Nathan Lynch Date: Fri Feb 10 12:42:08 2023 -0600 powerpc/rtas: arch-wide function token lookup conversions With the tokens for all implemented RTAS functions now available via rtas_function_token(), which is optimal and safe for arbitrary contexts, there is no need to use rtas_token() or cache its result. Most conversions are trivial, but a few are worth describing in more detail: * Error injection token comparisons for lockdown purposes are consolidated into a simple predicate: token_is_restricted_errinjct(). * A couple of special cases in block_rtas_call() do not use rtas_token() but perform string comparisons against names in the function table. These are converted to compare against token values instead, which is logically equivalent but less expensive. * The lookup for the ibm,os-term token can be deferred until needed, instead of caching it at boot to avoid device tree traversal during panic. * Since rtas_function_token() accesses a read-only data structure without taking any locks, xmon's lookup of set-indicator can be performed as needed instead of cached at startup. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230125-b4-powerpc-rtas-queue-v3-20-26929c8cce78@linux.ibm.com commit 716bfc97bd5fb7b442cdd06081f49df097f2e27b Author: Nathan Lynch Date: Fri Feb 10 12:42:07 2023 -0600 powerpc/rtas: introduce rtas_function_token() API Users of rtas_token() supply a string argument that can't be validated at build time. A typo or misspelling has to be caught by inspection or by observing wrong behavior at runtime. Since the core RTAS code now has consolidated the names of all possible RTAS functions and mapped them to their tokens, token lookup can be implemented using symbolic constants to index a static array. So introduce rtas_function_token(), a replacement API which does that, along with a rtas_service_present()-equivalent helper, rtas_function_implemented(). Callers supply an opaque predefined function handle which is used internally to index the function table. Typos or other inappropriate arguments yield build errors, and the function handle is a type that can't be easily confused with RTAS tokens or other integer types. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230125-b4-powerpc-rtas-queue-v3-19-26929c8cce78@linux.ibm.com commit e58d9e17b11b776e32b1d3d80bdc63d39de3463d Author: Nathan Lynch Date: Fri Feb 10 12:42:06 2023 -0600 powerpc/pseries/lpar: convert to papr_sysparm API Convert the TLB block invalidate characteristics discovery to the new papr_sysparm API. This occurs too early in boot to use papr_sysparm_buf_alloc(), so use a static buffer. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230125-b4-powerpc-rtas-queue-v3-18-26929c8cce78@linux.ibm.com commit 69b9f5a5b2c04ce5993fe43da938f065571bdb25 Author: Nathan Lynch Date: Fri Feb 10 12:42:05 2023 -0600 powerpc/pseries/hv-24x7: convert to papr_sysparm API The new papr_sysparm API handles the details of system parameter retrieval. Use that instead of open-coding the RTAS call, work area management, and retries. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230125-b4-powerpc-rtas-queue-v3-17-26929c8cce78@linux.ibm.com commit fff9846be00c467b4a277492af5be8487b6540e9 Author: Nathan Lynch Date: Fri Feb 10 12:42:04 2023 -0600 powerpc/pseries/lparcfg: convert to papr_sysparm API /proc/powerpc/lparcfg derives the LPAR name and SPLPAR characteristics it reports using bare calls to the RTAS ibm,get-system-parameter function. Convert these to the higher-level papr_sysparm API, which handles the tedious details. While the SPLPAR string parsing code could stand to be updated, that should be done in a separate change. It is minimally modified here to reduce the risk of changing behavior. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230125-b4-powerpc-rtas-queue-v3-16-26929c8cce78@linux.ibm.com commit b8dc71774a51182185ae197ed2f8bd085ce6c848 Author: Nathan Lynch Date: Fri Feb 10 12:42:03 2023 -0600 powerpc/pseries: convert CMO probe to papr_sysparm API Convert the direct invocation of the ibm,get-system-parameter RTAS function to papr_sysparm_get(). Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230125-b4-powerpc-rtas-queue-v3-15-26929c8cce78@linux.ibm.com commit 419e27f32b6dc13c3e6f443d1ad104f2845c444b Author: Nathan Lynch Date: Fri Feb 10 12:42:02 2023 -0600 powerpc/pseries: PAPR system parameter API Introduce a set of APIs for retrieving and updating PAPR system parameters. This encapsulates the toil of temporary RTAS work area management, RTAS function call retries, and translation of RTAS call statuses to conventional error values. There are several places in the kernel that already retrieve system parameters by calling the RTAS ibm,get-system-parameter function directly. These will be converted to papr_sysparm_get() in changes to follow. As for updating system parameters, current practice is to use sys_rtas() from user space; there are no in-kernel users of the RTAS ibm,set-system-parameter function. However this will become deprecated in time because it is not compatible with lockdown. The papr_sysparm_* APIs will form the common basis for in-kernel and user space access to system parameters. The code to expose the set/get capabilities to user space will follow. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230125-b4-powerpc-rtas-queue-v3-14-26929c8cce78@linux.ibm.com commit e27e14231eb541899efc11c33d6eeddcb74767c3 Author: Nathan Lynch Date: Fri Feb 10 12:42:01 2023 -0600 powerpc/pseries/dlpar: use RTAS work area API Hold a work area object for the duration of the RTAS ibm,configure-connector sequence, eliminating locking and copying around each RTAS call. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230125-b4-powerpc-rtas-queue-v3-13-26929c8cce78@linux.ibm.com commit 43033bc62d349d8d852855a336c91d046de819bd Author: Nathan Lynch Date: Fri Feb 10 12:42:00 2023 -0600 powerpc/pseries: add RTAS work area allocator Various pseries-specific RTAS functions take a temporary "work area" parameter - a buffer in memory accessible to RTAS. Typically such functions are passed the statically allocated rtas_data_buf buffer as the argument. This buffer is protected by a global spinlock. So users of rtas_data_buf cannot perform sleeping operations while accessing the buffer. Most RTAS functions that have a work area parameter can return a status (-2/990x) that indicates that the caller should retry. Before retrying, the caller may need to reschedule or sleep (see rtas_busy_delay() for details). This combination of factors leads to uncomfortable constructions like this: do { spin_lock(&rtas_data_buf_lock); rc = rtas_call(token, __pa(rtas_data_buf, ...); if (rc == 0) { /* parse or copy out rtas_data_buf contents */ } spin_unlock(&rtas_data_buf_lock); } while (rtas_busy_delay(rc)); Another unfortunately common way of handling this is for callers to blithely ignore the possibility of a -2/990x status and hope for the best. If users were allowed to perform blocking operations while owning a work area, the programming model would become less tedious and error-prone. Users could schedule away, sleep, or perform other blocking operations without having to release and re-acquire resources. We could continue to use a single work area buffer, and convert rtas_data_buf_lock to a mutex. But that would impose an unnecessarily coarse serialization on all users. As awkward as the current design is, it prevents longer running operations that need to repeatedly use rtas_data_buf from blocking the progress of others. There are more considerations. One is that while 4KB is fine for all current in-kernel uses, some RTAS calls can take much smaller buffers, and some (VPD, platform dumps) would likely benefit from larger ones. Another is that at least one RTAS function (ibm,get-vpd) has *two* work area parameters. And finally, we should expect the number of work area users in the kernel to increase over time as we introduce lockdown-compatible ABIs to replace less safe use cases based on sys_rtas/librtas. So a special-purpose allocator for RTAS work area buffers seems worth trying. Properties: * The backing memory for the allocator is reserved early in boot in order to satisfy RTAS addressing requirements, and then managed with genalloc. * Allocations can block, but they never fail (mempool-like). * Prioritizes first-come, first-serve fairness over throughput. * Early boot allocations before the allocator has been initialized are served via an internal static buffer. Intended to replace rtas_data_buf. New code that needs RTAS work area buffers should prefer this API. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230125-b4-powerpc-rtas-queue-v3-12-26929c8cce78@linux.ibm.com commit 24098f580e2b5ceb2cec4f02833e0a0bb5d46d2e Author: Nathan Lynch Date: Fri Feb 10 12:41:59 2023 -0600 powerpc/rtas: add tracepoints around RTAS entry Decompose the RTAS entry C code into tracing and non-tracing variants, calling the just-added tracepoints in the tracing-enabled path. Skip tracing in contexts known to be unsafe (real mode, CPU offline). Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230125-b4-powerpc-rtas-queue-v3-11-26929c8cce78@linux.ibm.com commit 2c81ca7fbaea06c2aed1aec66a88208d67e1e2de Author: Nathan Lynch Date: Fri Feb 10 12:41:58 2023 -0600 powerpc/tracing: tracepoints for RTAS entry and exit Add two sets of tracepoints to be used around RTAS entry: * rtas_input/rtas_output, which emit the function name, its inputs, the returned status, and any other outputs. These produce an API-level record of OS<->RTAS activity. * rtas_ll_entry/rtas_ll_exit, which are lower-level and emit the entire contents of the parameter block (aka rtas_args) on entry and exit. Likely useful only for debugging. With uses of these tracepoints in do_enter_rtas() to be added in the following patch, examples of get-time-of-day and event-scan functions as rendered by trace-cmd (with some multi-line formatting manually imposed on the rtas_ll_* entries to avoid extremely long lines in the commit message): cat-36800 [059] 4978.518303: rtas_input: get-time-of-day arguments: cat-36800 [059] 4978.518306: rtas_ll_entry: token=3 nargs=0 nret=8 params: [0]=0x00000000 [1]=0x00000000 [2]=0x00000000 [3]=0x00000000 [4]=0x00000000 [5]=0x00000000 [6]=0x00000000 [7]=0x00000000 [8]=0x00000000 [9]=0x00000000 [10]=0x00000000 [11]=0x00000000 [12]=0x00000000 [13]=0x00000000 [14]=0x00000000 [15]=0x00000000 cat-36800 [059] 4978.518366: rtas_ll_exit: token=3 nargs=0 nret=8 params: [0]=0x00000000 [1]=0x000007e6 [2]=0x0000000b [3]=0x00000001 [4]=0x00000000 [5]=0x0000000e [6]=0x00000008 [7]=0x2e0dac40 [8]=0x00000000 [9]=0x00000000 [10]=0x00000000 [11]=0x00000000 [12]=0x00000000 [13]=0x00000000 [14]=0x00000000 [15]=0x00000000 cat-36800 [059] 4978.518366: rtas_output: get-time-of-day status: 0, other outputs: 2022 11 1 0 14 8 772648000 kworker/39:1-336 [039] 4982.731623: rtas_input: event-scan arguments: 4294967295 0 80484920 2048 kworker/39:1-336 [039] 4982.731626: rtas_ll_entry: token=6 nargs=4 nret=1 params: [0]=0xffffffff [1]=0x00000000 [2]=0x04cc1a38 [3]=0x00000800 [4]=0x00000000 [5]=0x0000000e [6]=0x00000008 [7]=0x2e0dac40 [8]=0x00000000 [9]=0x00000000 [10]=0x00000000 [11]=0x00000000 [12]=0x00000000 [13]=0x00000000 [14]=0x00000000 [15]=0x00000000 kworker/39:1-336 [039] 4982.731676: rtas_ll_exit: token=6 nargs=4 nret=1 params: [0]=0xffffffff [1]=0x00000000 [2]=0x04cc1a38 [3]=0x00000800 [4]=0x00000001 [5]=0x0000000e [6]=0x00000008 [7]=0x2e0dac40 [8]=0x00000000 [9]=0x00000000 [10]=0x00000000 [11]=0x00000000 [12]=0x00000000 [13]=0x00000000 [14]=0x00000000 [15]=0x00000000 kworker/39:1-336 [039] 4982.731677: rtas_output: event-scan status: 1, other outputs: Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230125-b4-powerpc-rtas-queue-v3-10-26929c8cce78@linux.ibm.com commit 77f85f69a97ac5f24537261a893436926c3e0cdc Author: Nathan Lynch Date: Fri Feb 10 12:41:57 2023 -0600 powerpc/rtas: strengthen do_enter_rtas() type safety, drop inline Make do_enter_rtas() take a pointer to struct rtas_args and do the __pa() conversion in one place instead of leaving it to callers. This also makes it possible to introduce enter/exit tracepoints that access the rtas_args struct fields. There's no apparent reason to force inlining of do_enter_rtas() either, and it seems to bloat the code a bit. Let the compiler decide. Signed-off-by: Nathan Lynch Reviewed-by: Andrew Donnellan Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230125-b4-powerpc-rtas-queue-v3-9-26929c8cce78@linux.ibm.com commit 8252b88294d2a744df6e3c6d85909ade403a5f2c Author: Nathan Lynch Date: Fri Feb 10 12:41:56 2023 -0600 powerpc/rtas: improve function information lookups The core RTAS support code and its clients perform two types of lookup for RTAS firmware function information. First, mapping a known function name to a token. The typical use case invokes rtas_token() to retrieve the token value to pass to rtas_call(). rtas_token() relies on of_get_property(), which performs a linear search of the /rtas node's property list under a lock with IRQs disabled. Second, and less common: given a token value, looking up some information about the function. The primary example is the sys_rtas filter path, which linearly scans a small table to match the token to a rtas_filter struct. Another use case to come is RTAS entry/exit tracepoints, which will require efficient lookup of function names from token values. Currently there is no general API for this. We need something much like the existing rtas_filters table, but more general and organized to facilitate efficient lookups. Introduce: * A new rtas_function type, aggregating function name, token, and filter. Other function characteristics could be added in the future. * An array of rtas_function, where each element corresponds to a known RTAS function. All information in the table is static save the token values, which are derived from the device tree at boot. The array is sorted by function name to allow binary search. * A named constant for each known RTAS function, used to index the function array. These also will be used in a client-facing API to be added later. * An xarray that maps valid tokens to rtas_function objects. Fold the existing rtas_filter table into the new rtas_function array, with the appropriate adjustments to block_rtas_call(). Remove now-redundant fields from struct rtas_filter. Preserve the function of the CONFIG_CPU_BIG_ENDIAN guard in the current filter table by introducing a per-function flag that is set for the function entries related to pseries LPAR migration. These have never had working users via sys_rtas on ppc64le; see commit de0f7349a0dd ("powerpc/rtas: prevent suspend-related sys_rtas use on LE"). Convert rtas_token() to use a lockless binary search on the function table. Fall back to the old behavior for lookups against names that are not known to be RTAS functions, but issue a warning. rtas_token() is for function names; it is not a general facility for accessing arbitrary properties of the /rtas node. All known misuses of rtas_token() have been converted to more appropriate of_ APIs in preceding changes. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230125-b4-powerpc-rtas-queue-v3-8-26929c8cce78@linux.ibm.com commit d6f7fe3b25f26213953066ce8109ea47dbd33cfa Author: Nathan Lynch Date: Fri Feb 10 12:41:55 2023 -0600 powerpc/pseries: drop RTAS-based timebase synchronization The pseries platform has been LPAR-only for several generations, and the PAPR spec: * Guarantees that timebase synchronization is performed by the platform ("The timebase registers are synchronized by the platform before CPUs are given to the OS" - 7.3.8 SMP Support). * Completely omits the RTAS freeze-time-base and thaw-time-base RTAS functions, which are CHRP artifacts. This code is effectively unused on currently supported models, so drop it. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230125-b4-powerpc-rtas-queue-v3-7-26929c8cce78@linux.ibm.com commit 836b5b9fcc8e09cea7e8a59a070349a00e818308 Author: Nathan Lynch Date: Fri Feb 10 12:41:54 2023 -0600 powerpc/rtas: ensure 4KB alignment for rtas_data_buf Some RTAS functions that have work area parameters impose alignment requirements on the work area passed to them by the OS. Examples include: - ibm,configure-connector - ibm,update-nodes - ibm,update-properties 4KB is the greatest alignment required by PAPR for such buffers. rtas_data_buf used to have a __page_aligned attribute in the arch/ppc64 days, but that was changed to __cacheline_aligned for unknown reasons by commit 033ef338b6e0 ("powerpc: Merge rtas.c into arch/powerpc/kernel"). That works out to 128-byte alignment on ppc64, which isn't right. This was found by inspection and I'm not aware of any real problems caused by this. Either current RTAS implementations don't enforce the alignment constraints, or rtas_data_buf is always being placed at a 4KB boundary by accident (or both, perhaps). Use __aligned(SZ_4K) to ensure the rtas_data_buf has alignment appropriate for all users. Signed-off-by: Nathan Lynch Fixes: 033ef338b6e0 ("powerpc: Merge rtas.c into arch/powerpc/kernel") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230125-b4-powerpc-rtas-queue-v3-6-26929c8cce78@linux.ibm.com commit b7d5333c48a21fd6a20f54b6887bcc191d21c273 Author: Nathan Lynch Date: Fri Feb 10 12:41:53 2023 -0600 powerpc/pseries/setup: add missing RTAS retry status handling The ibm,get-system-parameter RTAS function may return -2 or 990x, which indicate that the caller should try again. pSeries_cmo_feature_init() ignores this, making it possible to fail to detect cooperative memory overcommit capabilities during boot. Move the RTAS call into a conventional rtas_busy_delay()-based loop, dropping unnecessary clearing of rtas_data_buf. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230125-b4-powerpc-rtas-queue-v3-5-26929c8cce78@linux.ibm.com commit 5d08633e5f6564b60f1cbe09af3af40a74d66431 Author: Nathan Lynch Date: Fri Feb 10 12:41:52 2023 -0600 powerpc/pseries/lparcfg: add missing RTAS retry status handling The ibm,get-system-parameter RTAS function may return -2 or 990x, which indicate that the caller should try again. lparcfg's parse_system_parameter_string() ignores this, making it possible to intermittently report incorrect SPLPAR characteristics. Move the RTAS call into a coventional rtas_busy_delay()-based loop. Signed-off-by: Nathan Lynch Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230125-b4-powerpc-rtas-queue-v3-4-26929c8cce78@linux.ibm.com commit daa8ab59044610aa8ef2ee45a6c157b5e11635e9 Author: Nathan Lynch Date: Fri Feb 10 12:41:51 2023 -0600 powerpc/pseries/lpar: add missing RTAS retry status handling The ibm,get-system-parameter RTAS function may return -2 or 990x, which indicate that the caller should try again. pseries_lpar_read_hblkrm_characteristics() ignores this, making it possible to incorrectly detect TLB block invalidation characteristics at boot. Move the RTAS call into a coventional rtas_busy_delay()-based loop. Signed-off-by: Nathan Lynch Fixes: 1211ee61b4a8 ("powerpc/pseries: Read TLB Block Invalidate Characteristics") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230125-b4-powerpc-rtas-queue-v3-3-26929c8cce78@linux.ibm.com commit cc4b26eab1859fa1a70711872caaf6414809973f Author: Nathan Lynch Date: Fri Feb 10 12:41:50 2023 -0600 powerpc/perf/hv-24x7: add missing RTAS retry status handling The ibm,get-system-parameter RTAS function may return -2 or 990x, which indicate that the caller should try again. read_24x7_sys_info() ignores this, allowing transient failures in reporting processor module information. Move the RTAS call into a coventional rtas_busy_delay()-based loop, along with the parsing of results on success. Signed-off-by: Nathan Lynch Fixes: 8ba214267382 ("powerpc/hv-24x7: Add rtas call in hv-24x7 driver to get processor details") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230125-b4-powerpc-rtas-queue-v3-2-26929c8cce78@linux.ibm.com commit 09d1ea72c88198ef5a9e6b8208f544fe18acbff1 Author: Nathan Lynch Date: Fri Feb 10 12:41:49 2023 -0600 powerpc/rtas: handle extended delays safely in early boot Some code that runs early in boot calls RTAS functions that can return -2 or 990x statuses, which mean the caller should retry. An example is pSeries_cmo_feature_init(), which invokes ibm,get-system-parameter but treats these benign statuses as errors instead of retrying. pSeries_cmo_feature_init() and similar code should be made to retry until they succeed or receive a real error, using the usual pattern: do { rc = rtas_call(token, etc...); } while (rtas_busy_delay(rc)); But rtas_busy_delay() will perform a timed sleep on any 990x status. This isn't safe so early in boot, before the CPU scheduler and timer subsystem have initialized. The -2 RTAS status is much more likely to occur during single-threaded boot than 990x in practice, at least on PowerVM. This is because -2 usually means that RTAS made progress but exhausted its self-imposed timeslice, while 990x is associated with concurrent requests from the OS causing internal contention. Regardless, according to the language in PAPR, the OS should be prepared to handle either type of status at any time. Add a fallback path to rtas_busy_delay() to handle this as safely as possible, performing a small delay on 990x. Include a counter to detect retry loops that aren't making progress and bail out. Add __ref to rtas_busy_delay() since it now conditionally calls an __init function. This was found by inspection and I'm not aware of any real failures. However, the implementation of rtas_busy_delay() before commit 38f7b7067dae ("powerpc/rtas: rtas_busy_delay() improvements") was not susceptible to this problem, so let's treat this as a regression. Signed-off-by: Nathan Lynch Fixes: 38f7b7067dae ("powerpc/rtas: rtas_busy_delay() improvements") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230125-b4-powerpc-rtas-queue-v3-1-26929c8cce78@linux.ibm.com commit 4b3e71e9a34c48f370b6281e9477515d588e7b26 Author: Russell Currey Date: Fri Feb 10 19:04:01 2023 +1100 integrity/powerpc: Support loading keys from PLPKS Add support for loading keys from the PLPKS on pseries machines, with the "ibm,plpks-sb-v1" format. The object format is expected to be the same, so there shouldn't be any functional differences between objects retrieved on powernv or pseries. Unlike on powernv, on pseries the format string isn't contained in the device tree. Use secvar_ops->format() to fetch the format string in a generic manner, rather than searching the device tree ourselves. (The current code searches the device tree for a node compatible with "ibm,edk2-compat-v1". This patch switches to calling secvar_ops->format(), which in the case of OPAL/powernv means opal_secvar_format(), which searches the device tree for a node compatible with "ibm,secvar-backend" and checks its "format" property. These are equivalent, as skiboot creates a node with both "ibm,edk2-compat-v1" and "ibm,secvar-backend" as compatible strings.) Signed-off-by: Russell Currey Signed-off-by: Andrew Donnellan Reviewed-by: Stefan Berger Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-27-ajd@linux.ibm.com commit 3c8069b0c3832674abd80a5cf019c913e62de9a5 Author: Russell Currey Date: Fri Feb 10 19:04:00 2023 +1100 integrity/powerpc: Improve error handling & reporting when loading certs A few improvements to load_powerpc.c: - include integrity.h for the pr_fmt() - move all error reporting out of get_cert_list() - use ERR_PTR() to better preserve error detail - don't use pr_err() for missing keys Reviewed-by: Mimi Zohar Signed-off-by: Russell Currey Signed-off-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-26-ajd@linux.ibm.com commit ccadf154cb00b9ee9618d209aa3efc54b35a34b4 Author: Russell Currey Date: Fri Feb 10 19:03:59 2023 +1100 powerpc/pseries: Implement secvars for dynamic secure boot The pseries platform can support dynamic secure boot (i.e. secure boot using user-defined keys) using variables contained with the PowerVM LPAR Platform KeyStore (PLPKS). Using the powerpc secvar API, expose the relevant variables for pseries dynamic secure boot through the existing secvar filesystem layout. The relevant variables for dynamic secure boot are signed in the keystore, and can only be modified using the H_PKS_SIGNED_UPDATE hcall. Object labels in the keystore are encoded using ucs2 format. With our fixed variable names we don't have to care about encoding outside of the necessary byte padding. When a user writes to a variable, the first 8 bytes of data must contain the signed update flags as defined by the hypervisor. When a user reads a variable, the first 4 bytes of data contain the policies defined for the object. Limitations exist due to the underlying implementation of sysfs binary attributes, as is the case for the OPAL secvar implementation - partial writes are unsupported and writes cannot be larger than PAGE_SIZE. (Even when using bin_attributes, which can be larger than a single page, sysfs only gives us one page's worth of write buffer at a time, and the hypervisor does not expose an interface for partial writes.) Co-developed-by: Nayna Jain Signed-off-by: Nayna Jain Co-developed-by: Andrew Donnellan Signed-off-by: Andrew Donnellan Signed-off-by: Russell Currey [mpe: Add NLS dependency to fix build errors, squash fix from ajd] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-25-ajd@linux.ibm.com commit 9b0bf4f77162e5423bc08aff7be0cb80134a2884 Merge: 79cdf17e5131c 8b68710a3121e Author: David S. Miller Date: Mon Feb 13 11:12:31 2023 +0000 Merge branch 'ksz9477-eee-support' Oleksij Rempel says: ==================== net: add EEE support for KSZ9477 switch family changes v8: - fix comment for linkmode_to_mii_eee_cap1_t() function - add Acked-by: Arun Ramadoss - add Reviewed-by: Alexander Duyck changes v7: - update documentation for genphy_c45_eee_is_active() - address review comments on "net: dsa: microchip: enable EEE support" patch changes v6: - split patch set and send only first 9 patches - Add Reviewed-by: Andrew Lunn - use 0xffff instead of GENMASK - Document @supported_eee - use "()" with function name in comments changes v5: - spell fixes - move part of genphy_c45_read_eee_abilities() to genphy_c45_read_eee_cap1() - validate MDIO_PCS_EEE_ABLE register against 0xffff val. - rename *eee_100_10000* to *eee_cap1* - use linkmode_intersects(phydev->supported, PHY_EEE_CAP1_FEATURES) instead of !linkmode_empty() - add documentation to linkmode/register helpers changes v4: - remove following helpers: mmd_eee_cap_to_ethtool_sup_t mmd_eee_adv_to_ethtool_adv_t ethtool_adv_to_mmd_eee_adv_t and port drivers from this helpers to linkmode helpers. - rebase against latest net-next - port phy_init_eee() to genphy_c45_eee_is_active() changes v3: - rework some parts of EEE infrastructure and move it to c45 code. - add supported_eee storage and start using it in EEE code and by the micrel driver. - add EEE support for ar8035 PHY - add SmartEEE support to FEC i.MX series. changes v2: - use phydev->supported instead of reading MII_BMSR regiaster - fix @get_eee > @set_eee With this patch series we provide EEE control for KSZ9477 family of switches and AR8035 with i.MX6 configuration. According to my tests, on a system with KSZ8563 switch and 100Mbit idle link, we consume 0,192W less power per port if EEE is enabled. ==================== Signed-off-by: David S. Miller commit 8b68710a3121e0475b123a20c4220f66a728770e Author: Oleksij Rempel Date: Sat Feb 11 08:41:13 2023 +0100 net: phy: start using genphy_c45_ethtool_get/set_eee() All preparations are done. Now we can start using new functions and remove the old code. Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 6340f9fd43d503ed5675facd5f9958a063651482 Author: Oleksij Rempel Date: Sat Feb 11 08:41:12 2023 +0100 net: phy: migrate phy_init_eee() to genphy_c45_eee_is_active() Reduce code duplicated by migrating phy_init_eee() to genphy_c45_eee_is_active(). Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 5827b168125d16d93fe14284c2c377f32d13fce6 Author: Oleksij Rempel Date: Sat Feb 11 08:41:11 2023 +0100 net: phy: c45: migrate to genphy_c45_write_eee_adv() Migrate from genphy_config_eee_advert() to genphy_c45_write_eee_adv(). It should work as before except write operation to the EEE adv registers will be done only if some EEE abilities was detected. If some driver will have a regression, related driver should provide own .get_features callback. See micrel.c:ksz9477_get_features() as example. Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 9b01c885be364526d8c05794f8358b3e563b7ff8 Author: Oleksij Rempel Date: Sat Feb 11 08:41:10 2023 +0100 net: phy: c22: migrate to genphy_c45_write_eee_adv() Migrate from genphy_config_eee_advert() to genphy_c45_write_eee_adv(). It should work as before except write operation to the EEE adv registers will be done only if some EEE abilities was detected. If some driver will have a regression, related driver should provide own .get_features callback. See micrel.c:ksz9477_get_features() as example. Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 022c3f87f88e2d68e90be7687d981c9cb893a3b1 Author: Oleksij Rempel Date: Sat Feb 11 08:41:09 2023 +0100 net: phy: add genphy_c45_ethtool_get/set_eee() support Add replacement for phy_ethtool_get/set_eee() functions. Current phy_ethtool_get/set_eee() implementation is great and it is possible to make it even better: - this functionality is for devices implementing parts of IEEE 802.3 specification beyond Clause 22. The better place for this code is phy-c45.c - currently it is able to do read/write operations on PHYs with different abilities to not existing registers. It is better to use stored supported_eee abilities to avoid false read/write operations. - the eee_active detection will provide wrong results on not supported link modes. It is better to validate speed/duplex properties against supported EEE link modes. - it is able to support only limited amount of link modes. We have more EEE link modes... By refactoring this code I address most of this point except of the last one. Adding additional EEE link modes will need more work. Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit cf9f6079696840093aa6ea3c0ee405a553afe2fb Author: Oleksij Rempel Date: Sat Feb 11 08:41:08 2023 +0100 net: phy: export phy_check_valid() function This function will be needed for genphy_c45_ethtool_get_eee() provided by next patch. Signed-off-by: Oleksij Rempel Reviewed-by: Alexander Duyck Signed-off-by: David S. Miller commit 48fb19940f2ba6b50dfea70f671be9340fb63d60 Author: Oleksij Rempel Date: Sat Feb 11 08:41:07 2023 +0100 net: phy: micrel: add ksz9477_get_features() KSZ8563R, which has same PHYID as KSZ9477 family, will change "EEE control and capability 1" (Register 3.20) content depending on configuration of "EEE advertisement 1" (Register 7.60). Changes on the 7.60 will affect 3.20 register. So, instead of depending on register 3.20, driver should set supported_eee. Proper supported_eee configuration is needed to make use of generic PHY c45 set/get_eee functions provided by next patches. Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 14e47d1fb8f9596acc90a06a66808657a9c512b5 Author: Oleksij Rempel Date: Sat Feb 11 08:41:06 2023 +0100 net: phy: add genphy_c45_read_eee_abilities() function Add generic function for EEE abilities defined by IEEE 802.3 specification. For now following registers are supported: - IEEE 802.3-2018 45.2.3.10 EEE control and capability 1 (Register 3.20) - IEEE 802.3cg-2019 45.2.1.186b 10BASE-T1L PMA status register (Register 1.2295) Since I was not able to find any flag signaling support of these registers, we should detect link mode abilities first and then based on these abilities doing EEE link modes detection. Results of EEE ability detection will be stored into new variable phydev->supported_eee. Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 69d3b36ca045582356fc3d2c92366b200506f936 Author: Oleksij Rempel Date: Sat Feb 11 08:41:05 2023 +0100 net: dsa: microchip: enable EEE support Some of KSZ9477 family switches provides EEE support. To enable it, we just need to register set_mac_eee/set_mac_eee handlers and validate supported chip version and port. Currently supported chip variants are: KSZ8563, KSZ9477, KSZ9563, KSZ9567, KSZ9893, KSZ9896, KSZ9897. KSZ8563 supports EEE only with 100BaseTX/Full. Other chips support 100BaseTX/Full and 1000BaseTX/Full. Low Power Idle configuration is not supported and currently not documented in the datasheets. EEE PHY specific tunings are not documented in the switch datasheets, but can overlap with KSZ9131 specification. Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Acked-by: Arun Ramadoss Signed-off-by: David S. Miller commit 6113bd52443f3f9035acf27d8793b0246a692e81 Author: Armin Wolf Date: Thu Feb 9 22:15:03 2023 +0100 platform/x86: dell-ddv: Prefer asynchronous probing During probe, both sensor buffers need to be queried to initialize the hwmon channels. This might be slow on some machines, causing a unnecessary delay during boot. Mark the driver with PROBE_PREFER_ASYNCHRONOUS so that it can be probed asynchronously. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20230209211503.2739-3-W_Armin@gmx.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 3b7eeff93d291299841f943a5e9b43bb160b3992 Author: Armin Wolf Date: Thu Feb 9 22:15:02 2023 +0100 platform/x86: dell-ddv: Add hwmon support Thanks to bugreport 216655 on bugzilla triggered by the dell-smm-hwmon driver, the contents of the sensor buffers could be almost completely decoded. Add an hwmon interface for exposing the fan and thermal sensor values. Since the WMI interface can be quite slow on some machines, the sensor buffers are cached for 1 second to lessen the performance impact. The debugfs interface remains in place to aid in reverse-engineering of unknown sensor types and the thermal buffer. Tested-by: Antonín Skala Tested-by: Gustavo Walbon Signed-off-by: Armin Wolf Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230209211503.2739-2-W_Armin@gmx.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit e7210563432a6c6fa65a9c5c11ece2a0adbeeda2 Author: Vadim Pasternak Date: Wed Feb 8 08:33:30 2023 +0200 Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces Add description for new attributes added for rack manager switch and NG800 family systems. Attributes related to power converter board: - reset_pwr_converter_fail; - pwr_converter_prog_en; Attributes related to External Root of Trust (EROT) devices recovery: - erot1_ap_reset; - erot2_ap_reset; - erot1_recovery; - erot2_recovery; - erot1_reset; - erot2_reset; - erot1_wp; - erot2_wp; - spi_chnl_select; Attributes related to clock board failures and recovery: - clk_brd1_boot_fail; - clk_brd2_boot_fail; - clk_brd_fail; - clk_brd_prog_en; Attributes related to power failures: - reset_ac_ok_fail; - asic_pg_fail; Signed-off-by: Vadim Pasternak Reviewed-by: Michael Shych Link: https://lore.kernel.org/r/20230208063331.15560-14-vadimp@nvidia.com Signed-off-by: Hans de Goede commit 50b823fdd357ec0f2fd0a1a0b5104704916fd620 Author: Vadim Pasternak Date: Wed Feb 8 08:33:29 2023 +0200 platform: mellanox: mlx-platform: Move bus shift assignment out of the loop Move assignment of bus shift setting out of the loop to avoid redundant operation. Signed-off-by: Vadim Pasternak Reviewed-by: Michael Shych Link: https://lore.kernel.org/r/20230208063331.15560-13-vadimp@nvidia.com Signed-off-by: Hans de Goede commit cefdbc7815660be4d0f2d290860dcfb0f9d285e4 Author: Vadim Pasternak Date: Wed Feb 8 08:33:28 2023 +0200 platform: mellanox: mlx-platform: Add mux selection register to regmap Extend writeable, readable, volatile registers of the 'regmap' object with for I2C mux selector registers. The motivation is to pass this object extended with selector registers to I2C mux driver working over ‘regmap’. Signed-off-by: Vadim Pasternak Reviewed-by: Michael Shych Link: https://lore.kernel.org/r/20230208063331.15560-12-vadimp@nvidia.com Signed-off-by: Hans de Goede commit 26917eab144c8515435ef9175fdd5dddf9f0f000 Author: Vadim Pasternak Date: Wed Feb 8 08:33:27 2023 +0200 platform_data/mlxreg: Add field with mapped resource address Add field with PCIe remapped based address for passing it across relevant platform drivers sharing common system resources. Signed-off-by: Vadim Pasternak Reviewed-by: Michael Shych Link: https://lore.kernel.org/r/20230208063331.15560-11-vadimp@nvidia.com Signed-off-by: Hans de Goede commit 26e118ea98cf5ec0b53198e643d5fa8d99b73b49 Author: Vadim Pasternak Date: Wed Feb 8 08:33:26 2023 +0200 platform/mellanox: mlxreg-hotplug: Allow more flexible hotplug events configuration Currently hotplug configuration in logic device assumes that all items are provided with no holes. Thus, any group of hotplug events, associated with the specific status/event/mask registers is configured in those registers successively from bit zero to bit #n (#n < 8). This logic is changed int order to allow non-successive definition to support configuration with the skipped bits – for example bits 3, 5, 7 in status/event/mask registers can be associated with hotplug events, while others can be skipped. Signed-off-by: Vadim Pasternak Reviewed-by: Michael Shych Link: https://lore.kernel.org/r/20230208063331.15560-10-vadimp@nvidia.com Signed-off-by: Hans de Goede commit 233fd7e44cd7363ede8025619291b98475024c30 Author: Vadim Pasternak Date: Wed Feb 8 08:33:25 2023 +0200 platform: mellanox: Extend all systems with I2C notification callback Motivation is to provide synchronization between I2C main bus and other platform drivers using this notification callback. Signed-off-by: Vadim Pasternak Reviewed-by: Michael Shych Link: https://lore.kernel.org/r/20230208063331.15560-9-vadimp@nvidia.com Signed-off-by: Hans de Goede commit 158cd83207768abdba86e408fed3169bb3ad3e9f Author: Vadim Pasternak Date: Wed Feb 8 08:33:24 2023 +0200 platform: mellanox: Split logic in init and exit flow Split logic in mlxplat_init()/mlxplat_exit() routines. Separate initialization of I2C infrastructure and others platform drivers. Motivation is to provide synchronization between I2C bus and mux drivers and other drivers using this infrastructure. I2C main bus and MUX busses are implemented in FPGA logic. On some new systems the numbers allocated for these busses could be variable depending on order of initialization of I2C native busses. Since bus numbers are passed to some other platform drivers during initialization flow, it is necessary to synchronize completion of I2C infrastructure drivers and activation of rest of drivers. Thus initialization flow will be performed in synchronized order. Signed-off-by: Vadim Pasternak Reviewed-by: Michael Shych Link: https://lore.kernel.org/r/20230208063331.15560-8-vadimp@nvidia.com Signed-off-by: Hans de Goede commit 79cdf17e5131ccdee0792f6f25d3db0e34861998 Merge: 8024edf3590c8 40bc471dc7140 Author: David S. Miller Date: Mon Feb 13 11:05:12 2023 +0000 Merge branch 'ionic-on-chip-desc' Shannon Nelson says: ==================== ionic: on-chip descriptors We start with a couple of house-keeping patches that were originally presented for 'net', then we add support for on-chip descriptor rings for tx-push, as well as adding support for rx-push. I have a patch for the ethtool userland utility that I can send out once this has been accepted. v4: added rx-push attributes to ethtool netlink converted CMB feature from using a priv-flag to using ethtool tx/rx-push v3: edited commit message to describe interface-down limitation added warn msg if cmb_inuse alloc fails removed unnecessary clearing of phy_cmb_pages and cmb_npages changed cmb_rings_toggle to use cmb_inuse removed unrelated pci_set_drvdata() removed unnecessary (u32) cast added static inline func for writing CMB descriptors v2: dropped the rx buffers patch ==================== Signed-off-by: David S. Miller commit 40bc471dc714036c8ed223f9aa04b1b2072fb9db Author: Shannon Nelson Date: Fri Feb 10 16:50:17 2023 -0800 ionic: add tx/rx-push support with device Component Memory Buffers The ionic device has on-board memory (CMB) that can be used for descriptors as a way to speed descriptor access for faster packet processing. It is rumored to improve latency and/or packets-per-second for some profiles of small packet traffic, although your mileage may vary. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 5b4e9a7a71ab912d150cb2276cb23af51c863150 Author: Shannon Nelson Date: Fri Feb 10 16:50:16 2023 -0800 net: ethtool: extend ringparam set/get APIs for rx_push Similar to what was done for TX_PUSH, add an RX_PUSH concept to the ethtool interfaces. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 896de449f80476dc64b9167c41284532a4cccfec Author: Shannon Nelson Date: Fri Feb 10 16:50:15 2023 -0800 ionic: remove unnecessary void casts Minor Code cleanup details. Signed-off-by: Shannon Nelson Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller commit 7bb990097db7ade1467c731fe4d80223e00004d8 Author: Shannon Nelson Date: Fri Feb 10 16:50:14 2023 -0800 ionic: remove unnecessary indirection We have the pointer already, don't need to go through the lif struct for it. Signed-off-by: Shannon Nelson Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller commit d3777ceaad080716f6d2c1a4c62020d494df00db Author: Herbert Xu Date: Tue Feb 7 16:18:36 2023 +0800 tls: Pass rec instead of aead_req into tls_encrypt_done The function tls_encrypt_done only uses aead_req to get ahold of the tls_rec object. So we could pass that in instead of aead_req to simplify the code. Suggested-by: Jakub Kicinski Signed-off-by: Herbert Xu Reviewed-by: Jakub Kicinski Signed-off-by: Herbert Xu commit 846366b0df0ad19051fbdd38734b1f7690d814c3 Author: Herbert Xu Date: Mon Feb 6 18:22:46 2023 +0800 crypto: api - Remove completion function scaffolding This patch removes the temporary scaffolding now that the comletion function signature has been converted. Signed-off-by: Herbert Xu Acked-by: Jarkko Sakkinen Signed-off-by: Herbert Xu commit 8580e55aa85f5000065450add82707a5ee7f88f5 Author: Herbert Xu Date: Mon Feb 6 18:22:44 2023 +0800 tls: Remove completion function scaffolding This patch removes the temporary scaffolding now that the comletion function signature has been converted. Signed-off-by: Herbert Xu commit 65cb4657bac776967f1f794fb45d2fa419565c63 Author: Herbert Xu Date: Mon Feb 6 18:22:42 2023 +0800 tipc: Remove completion function scaffolding This patch removes the temporary scaffolding now that the comletion function signature has been converted. Signed-off-by: Herbert Xu commit 6002e20dd0f85cfaedc2f2f54a60119f84a60838 Author: Herbert Xu Date: Mon Feb 6 18:22:40 2023 +0800 net: ipv6: Remove completion function scaffolding This patch removes the temporary scaffolding now that the comletion function signature has been converted. Signed-off-by: Herbert Xu commit fd5dabf764f79ced0b128ddad39fb272e884a5b8 Author: Herbert Xu Date: Mon Feb 6 18:22:38 2023 +0800 net: ipv4: Remove completion function scaffolding This patch removes the temporary scaffolding now that the comletion function signature has been converted. Signed-off-by: Herbert Xu commit 23b8b93ba94bff36fb35454df1c93481fc47c160 Author: Herbert Xu Date: Mon Feb 6 18:22:36 2023 +0800 net: macsec: Remove completion function scaffolding This patch removes the temporary scaffolding now that the comletion function signature has been converted. Signed-off-by: Herbert Xu commit dcfe653d7cd4f3891aa0a471a1afdae884941bee Author: Herbert Xu Date: Mon Feb 6 18:22:34 2023 +0800 dm: Remove completion function scaffolding This patch removes the temporary scaffolding now that the comletion function signature has been converted. Signed-off-by: Herbert Xu Acked-by: Mike Snitzer Signed-off-by: Herbert Xu commit 255e48eb17684157336bd6dd98d22c1b2d9e3f43 Author: Herbert Xu Date: Wed Feb 8 13:58:44 2023 +0800 crypto: api - Use data directly in completion function This patch does the final flag day conversion of all completion functions which are now all contained in the Crypto API. Signed-off-by: Herbert Xu commit 234650bd22b4a875a359c83066fd723704aaa7b2 Author: Herbert Xu Date: Tue Jan 31 16:02:50 2023 +0800 crypto: talitos - Use request_complete helpers Use the request_complete helpers instead of calling the completion function directly. Signed-off-by: Herbert Xu commit 555c5661317e9c3090b9d181106d8bc31dd8e29a Author: Herbert Xu Date: Tue Jan 31 16:02:48 2023 +0800 crypto: sahara - Use request_complete helpers Use the request_complete helpers instead of calling the completion function directly. Signed-off-by: Herbert Xu commit e94c1c9b43bcb6a6f094b36fcee0bdf6d0712cd5 Author: Herbert Xu Date: Tue Jan 31 16:02:46 2023 +0800 crypto: s5p-sss - Use request_complete helpers Use the request_complete helpers instead of calling the completion function directly. Signed-off-by: Herbert Xu commit 0cbe89d5d17393f4ef3d5c25af8bc730fd507cf5 Author: Herbert Xu Date: Tue Jan 31 16:02:44 2023 +0800 crypto: qce - Use request_complete helpers Use the request_complete helpers instead of calling the completion function directly. Signed-off-by: Herbert Xu commit 6c621864554c9b767df6839999d5e0465c8be097 Author: Herbert Xu Date: Tue Jan 31 16:02:42 2023 +0800 crypto: qat - Use request_complete helpers Use the request_complete helpers instead of calling the completion function directly. Signed-off-by: Herbert Xu Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 1e5b5df65af99013b4d31607ddb3ca5731dbe44d Author: Randy Dunlap Date: Wed Feb 8 17:08:25 2023 -0800 m68k: /proc/hardware should depend on PROC_FS When CONFIG_PROC_FS is not set, there is a build error for an unused function. Make PROC_HARDWARE depend on PROC_FS to prevent this error. In file included from ../arch/m68k/kernel/setup.c:3: ../arch/m68k/kernel/setup_mm.c:477:12: error: 'hardware_proc_show' defined but not used [-Werror=unused-function] 477 | static int hardware_proc_show(struct seq_file *m, void *v) | ^~~~~~~~~~~~~~~~~~ Fixes: 66d857b08b8c ("m68k: merge m68k and m68knommu arch directories") # v3.0 Signed-off-by: Randy Dunlap Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230209010825.24136-1-rdunlap@infradead.org Signed-off-by: Geert Uytterhoeven commit 25c9d2c358aec584bbbc7dfd09a55f123c4b8258 Author: Herbert Xu Date: Tue Jan 31 16:02:40 2023 +0800 crypto: mxs-dcp - Use request_complete helpers Use the request_complete helpers instead of calling the completion function directly. Signed-off-by: Herbert Xu commit 25085ba5a77b80dbf3b2b06c64452cf748c3cf01 Author: Herbert Xu Date: Tue Jan 31 16:02:38 2023 +0800 crypto: octeontx2 - Use request_complete helpers Use the request_complete helpers instead of calling the completion function directly. Signed-off-by: Herbert Xu commit d80bcdf297e8b03caaaa868941cab47ec2768750 Author: Herbert Xu Date: Tue Jan 31 16:02:35 2023 +0800 crypto: octeontx - Use request_complete helpers Use the request_complete helpers instead of calling the completion function directly. Signed-off-by: Herbert Xu commit 25e3159c79fc1c35ed6bea076d151786e198cf64 Author: Herbert Xu Date: Tue Jan 31 16:02:33 2023 +0800 crypto: marvell/cesa - Use request_complete helpers Use the request_complete helpers instead of calling the completion function directly. Signed-off-by: Herbert Xu commit 0d07ae6ae9cb902214c925778d748af805a0c7f0 Author: Herbert Xu Date: Tue Jan 31 16:02:31 2023 +0800 crypto: ixp4xx - Use request_complete helpers Use the request_complete helpers instead of calling the completion function directly. Signed-off-by: Herbert Xu commit 47c32286fbc6399812b8b10f4f45473f82f16730 Author: Herbert Xu Date: Tue Jan 31 16:02:29 2023 +0800 crypto: safexcel - Use request_complete helpers Use the request_complete helpers instead of calling the completion function directly. Signed-off-by: Herbert Xu commit a712bff02333821639ff4b19ceed5a988ea8c50a Author: Herbert Xu Date: Tue Jan 31 16:02:27 2023 +0800 crypto: img-hash - Use request_complete helpers Use the request_complete helpers instead of calling the completion function directly. Signed-off-by: Herbert Xu commit e2b537b7706284afba9b780e21f879e1c0a0ec20 Author: Herbert Xu Date: Tue Jan 31 16:02:25 2023 +0800 crypto: hisilicon - Use request_complete helpers Use the request_complete helpers instead of calling the completion function directly. Signed-off-by: Herbert Xu commit 17fcc82eebd92a510b2124ae5544491af950a315 Author: Herbert Xu Date: Tue Jan 31 16:02:23 2023 +0800 crypto: hifn_795x - Use request_complete helpers Use the request_complete helpers instead of calling the completion function directly. Signed-off-by: Herbert Xu commit 13c20754c664796a697859d5d329810236cdc131 Author: Herbert Xu Date: Tue Jan 31 16:02:21 2023 +0800 crypto: chelsio - Use request_complete helpers Use the request_complete helpers instead of calling the completion function directly. Signed-off-by: Herbert Xu commit 0c18d05463315ce144c2d72a2699fa54ef429f52 Author: Herbert Xu Date: Tue Jan 31 16:02:19 2023 +0800 crypto: ccp - Use request_complete helpers Use the request_complete helpers instead of calling the completion function directly. Signed-off-by: Herbert Xu Acked-by: Tom Lendacky Signed-off-by: Herbert Xu commit ea2fbe3b1a317498d2c66d6b97bc281db1a18b45 Author: Herbert Xu Date: Tue Jan 31 16:02:17 2023 +0800 crypto: nitrox - Use request_complete helpers Use the request_complete helpers instead of calling the completion function directly. Signed-off-by: Herbert Xu commit b34a6416728812b5ca283598100516852646a133 Author: Herbert Xu Date: Tue Jan 31 16:02:15 2023 +0800 crypto: cpt - Use request_complete helpers Use the request_complete helpers instead of calling the completion function directly. Signed-off-by: Herbert Xu commit 33ccbfd2e02a04d2fdbf8f48a80230f6235493bd Author: Herbert Xu Date: Tue Jan 31 16:02:12 2023 +0800 crypto: bcm - Use request_complete helpers Use the request_complete helpers instead of calling the completion function directly. Signed-off-by: Herbert Xu commit 51bdb2fe01dfad5447b9cb6f565c73b32b519b2e Author: Herbert Xu Date: Tue Jan 31 16:02:10 2023 +0800 crypto: artpec6 - Use request_complete helpers Use the request_complete helpers instead of calling the completion function directly. Signed-off-by: Herbert Xu Acked-by: Jesper Nilsson Signed-off-by: Herbert Xu commit 7d19abdcb7b3443021ce744ded8db1a0203f1594 Author: Herbert Xu Date: Tue Jan 31 16:02:08 2023 +0800 crypto: atmel - Use request_complete helpers Use the request_complete helpers instead of calling the completion function directly. Signed-off-by: Herbert Xu commit f27c94aac5b071f402c0ff8ef439d4b2058502fd Author: Herbert Xu Date: Wed Feb 8 13:56:00 2023 +0800 crypto: cryptd - Use request_complete helpers Use the request_complete helpers instead of calling the completion function directly. Signed-off-by: Herbert Xu commit 564cabc0ca0bdfa8f0fc1ae74b24d0a7554522c5 Author: Herbert Xu Date: Tue Jan 31 16:02:04 2023 +0800 crypto: rsa-pkcs1pad - Use akcipher_request_complete Use the akcipher_request_complete helper instead of calling the completion function directly. In fact the previous code was buggy in that EINPROGRESS was never passed back to the original caller. Fixes: 3d5b1ecdea6f ("crypto: rsa - RSA padding algorithm") Signed-off-by: Herbert Xu commit 6909823d47c17cba84e9244d04050b5db8d53789 Author: Herbert Xu Date: Tue Jan 31 16:02:02 2023 +0800 crypto: engine - Use crypto_request_complete Use the crypto_request_complete helper instead of calling the completion function directly. Signed-off-by: Herbert Xu commit d5770679ad5abc8d62dc5aff7b3f888dfe8a05fa Author: Herbert Xu Date: Tue Jan 31 16:02:00 2023 +0800 crypto: skcipher - Use crypto_request_complete Use the crypto_request_complete helper instead of calling the completion function directly. Signed-off-by: Herbert Xu commit ba354b2fdb1068495ffeabc9f48b799407300f92 Author: Herbert Xu Date: Tue Jan 31 16:01:58 2023 +0800 crypto: kpp - Use crypto_request_complete Use the crypto_request_complete helper instead of calling the completion function directly. Signed-off-by: Herbert Xu commit d9588045f540157e36d8d6aeb54d6ce769a89b5b Author: Herbert Xu Date: Fri Feb 10 20:20:20 2023 +0800 crypto: hash - Use crypto_request_complete Use the crypto_request_complete helper instead of calling the completion function directly. This patch also removes the voodoo programming previously used for unaligned ahash operations and replaces it with a sub-request. Signed-off-by: Herbert Xu commit 700d507805727635e8f57882a7f9641e8ca1eb19 Author: Herbert Xu Date: Tue Jan 31 16:01:53 2023 +0800 crypto: akcipher - Use crypto_request_complete Use the crypto_request_complete helper instead of calling the completion function directly. Signed-off-by: Herbert Xu commit 372e6b80bafe1269f43c750885aa32baa34cd017 Author: Herbert Xu Date: Tue Jan 31 16:01:51 2023 +0800 crypto: aead - Use crypto_request_complete Use the crypto_request_complete helper instead of calling the completion function directly. Signed-off-by: Herbert Xu commit 4cc01c7f3df10a4f7aa11266e8406f7e16898769 Author: Herbert Xu Date: Tue Jan 31 16:01:49 2023 +0800 crypto: acompress - Use crypto_request_complete Use the crypto_request_complete helper instead of calling the completion function directly. Signed-off-by: Herbert Xu Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 256f9e53ae129c9536226b485a8c4e98223088d0 Author: Herbert Xu Date: Wed Feb 8 13:53:24 2023 +0800 crypto: cryptd - Use subreq for AEAD AEAD reuses the existing request object for its child. This is error-prone and unnecessary. This patch adds a subrequest object just like we do for skcipher and hash. This patch also restores the original completion function as we do for skcipher/hash. Signed-off-by: Herbert Xu commit 5419f2b27ea594f97cbeb743789448a9872f283f Author: Herbert Xu Date: Mon Feb 6 18:22:29 2023 +0800 KEYS: DH: Use crypto_wait_req This patch replaces the custom crypto completion function with crypto_req_done. Signed-off-by: Herbert Xu commit 8d338c76f7cfe0eb4bc46078b1c09c8c5fc75353 Author: Herbert Xu Date: Mon Feb 6 18:22:27 2023 +0800 tls: Only use data field in crypto completion function The crypto_async_request passed to the completion is not guaranteed to be the original request object. Only the data field can be relied upon. Fix this by storing the socket pointer with the AEAD request. Signed-off-by: Herbert Xu commit 1dbab1312254602175c805863eaace59ebf162ba Author: Herbert Xu Date: Mon Feb 6 18:22:25 2023 +0800 tipc: Add scaffolding to change completion function signature This patch adds temporary scaffolding so that the Crypto API completion function can take a void * instead of crypto_async_request. Once affected users have been converted this can be removed. Signed-off-by: Herbert Xu commit ec2964e807d1d53dbc7a23d7b2c9019245ae121b Author: Herbert Xu Date: Mon Feb 6 18:22:23 2023 +0800 net: ipv6: Add scaffolding to change completion function signature This patch adds temporary scaffolding so that the Crypto API completion function can take a void * instead of crypto_async_request. Once affected users have been converted this can be removed. Signed-off-by: Herbert Xu commit 14d3109c9c5aa993c46c2219d222fc40eaff113e Author: Herbert Xu Date: Mon Feb 6 18:22:21 2023 +0800 net: ipv4: Add scaffolding to change completion function signature This patch adds temporary scaffolding so that the Crypto API completion function can take a void * instead of crypto_async_request. Once affected users have been converted this can be removed. Signed-off-by: Herbert Xu commit fe93d841dda6885f4cdf40de676f1adf81b4fb45 Author: Herbert Xu Date: Mon Feb 6 18:22:19 2023 +0800 Bluetooth: Use crypto_wait_req This patch replaces the custom crypto completion function with crypto_req_done. Signed-off-by: Herbert Xu commit 20066bf70034007874c546e456c9546bfad3759a Author: Herbert Xu Date: Mon Feb 6 18:22:17 2023 +0800 fs: ecryptfs: Use crypto_wait_req This patch replaces the custom crypto completion function with crypto_req_done. Signed-off-by: Herbert Xu Acked-by: Jarkko Sakkinen Signed-off-by: Herbert Xu commit 30859e97e06ac15d77ee2fc26bfe2583c01f3fc7 Author: Herbert Xu Date: Mon Feb 6 18:22:15 2023 +0800 net: macsec: Add scaffolding to change completion function signature This patch adds temporary scaffolding so that the Crypto API completion function can take a void * instead of crypto_async_request. Once affected users have been converted this can be removed. Signed-off-by: Herbert Xu Acked-by: Jarkko Sakkinen Signed-off-by: Herbert Xu commit 96747228b72509e981c146b06f652e0f17a26675 Author: Herbert Xu Date: Mon Feb 6 18:22:12 2023 +0800 dm: Add scaffolding to change completion function signature This patch adds temporary scaffolding so that the Crypto API completion function can take a void * instead of crypto_async_request. Once affected users have been converted this can be removed. Signed-off-by: Herbert Xu Acked-by: Mike Snitzer Signed-off-by: Herbert Xu commit c35e03eaece71101ff6cbf776b86403860ac8cc3 Author: Herbert Xu Date: Tue Jan 31 16:01:45 2023 +0800 crypto: api - Add scaffolding to change completion function signature The crypto completion function currently takes a pointer to a struct crypto_async_request object. However, in reality the API does not allow the use of any part of the object apart from the data field. For example, ahash/shash will create a fake object on the stack to pass along a different data field. This leads to potential bugs where the user may try to dereference or otherwise use the crypto_async_request object. This patch adds some temporary scaffolding so that the completion function can take a void * instead. Once affected users have been converted this can be removed. The helper crypto_request_complete will remain even after the conversion is complete. It should be used instead of calling the completion function directly. Signed-off-by: Herbert Xu Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 8024edf3590c83f467374857d7c3082d4b3bf079 Merge: 4fab64126891d 5791a73c89165 Author: David S. Miller Date: Mon Feb 13 09:56:17 2023 +0000 Merge branch 'net-ipa-GSI-regs' Alex Elder says: ==================== net: ipa: determine GSI register offsets differently This series changes the way GSI register offset are specified, using the "reg" mechanism currently used for IPA registers. A follow-on series will extend this work so fields within GSI registers are also specified this way. The first patch rearranges the GSI register initialization code so it is similar to the way it's done for the IPA registers. The second identifies all the GSI registers in an enumerated type. The third introduces "gsi_reg-v3.1.c" and uses the "reg" code to define one GSI register offset. The second-to-last patch just adds "gsi_reg-v3.5.1.c", because that version introduces a new register not previously defined. All the rest just define the rest of the GSI register offsets using the "reg" mechanism. Note that, to have continued lines align with an open parenthesis, new files created in this series cause some checkpatch warnings. ==================== Signed-off-by: David S. Miller commit 5791a73c891656b49d89b52fca77c231b4fa56c0 Author: Alex Elder Date: Fri Feb 10 13:36:55 2023 -0600 net: ipa: define IPA remaining GSI register offsets Add the remaining GSI register offset definitions. Use gsi_reg() rather than the corresponding GSI_*_OFFSET() macros to get the offsets for these registers, and get rid of the macros. Note that we are now defining information for the HW_PARAM_2 register, and that doesn't appear until IPA v3.5.1. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 465d1bc9823d842cd5d9236d253487c0953aa54c Author: Alex Elder Date: Fri Feb 10 13:36:54 2023 -0600 net: ipa: add "gsi_v3.5.1.c" The next patch adds a GSI register field that is only valid starting at IPA v3.5.1. Create "gsi_v3.5.1.c" from "gsi_v3.1.c", changing only the name of the public regs structure it defines. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 7ba51aa2d09b50546d29a178f51103a23311cf84 Author: Alex Elder Date: Fri Feb 10 13:36:53 2023 -0600 net: ipa: define IPA v3.1 GSI interrupt register offsets Add definitions of the offsets for IRQ-related GSI registers. Use gsi_reg() rather than the corresponding GSI_CNTXT_*_OFFSET() macros to get the offsets for these registers, and get rid of the macros. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit d1ce6395d4648b41cf762714934e34ae57f0d1a4 Author: Alex Elder Date: Fri Feb 10 13:36:52 2023 -0600 net: ipa: define IPA v3.1 GSI event ring register offsets Add definitions of the offsets and strides for registers whose offset depends on an event ring ID, and use gsi_reg() and its returned value to determine offsets for these registers. Get rid of the corresponding GSI_EV_CH_E_*_OFFSET() macros. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 76924eb92801e6893eb59be7b3a999bc9bd24891 Author: Alex Elder Date: Fri Feb 10 13:36:51 2023 -0600 net: ipa: add more GSI register definitions Continue populating with GSI register definitions, adding remaining registers whose offset depends on a channel ID. Use gsi_reg() and reg_n_offset() to determine offsets for those registers, and get rid of the corresponding GSI_CH_C_*_OFFSET() macros. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit d2bb6e657f164e37fe6d170cac869904d9cc26bc Author: Alex Elder Date: Fri Feb 10 13:36:50 2023 -0600 net: ipa: start creating GSI register definitions Create a new register definition file in the "reg" subdirectory, and begin populating it with GSI register definitions based on IPA version. The GSI registers haven't changed much, so several IPA versions can share the same GSI register definitions. As with IPA registers, an array of pointers indexed by GSI register ID refers to these register definitions, and a new "regs" field in the GSI structure is initialized in gsi_reg_init() to refer to register information based on the IPA version (though for now there's only one). The new function gsi_reg() returns register information for a given GSI register, and the result can be used to look up that register's offset. This patch is meant only to put the infrastructure in place, so only eon register (CH_C_QOS) is defined for each version, and only the offset and stride are defined for that register. Use new function gsi_reg() to look up that register's information to get its offset, This makes the GSI_CH_C_QOS_OFFSET() unnecessary, so get rid of it. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 8f0fece65d9e6c7254cb030487cd5789af36caff Author: Alex Elder Date: Fri Feb 10 13:36:49 2023 -0600 net: ipa: introduce GSI register IDs Create a new gsi_reg_id enumerated type, which identifies each GSI register with a symbolic identifier. Create a function that indicates whether a register ID is valid. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 3c506add35c74acbe5a42d0a86963d11bef10d25 Author: Alex Elder Date: Fri Feb 10 13:36:48 2023 -0600 net: ipa: introduce gsi_reg_init() Create a new source file "gsi_reg.c", and in it, introduce a new function to encapsulate initializing GSI registers, including looking up and I/O mapping their memory. Create gsi_reg_exit() as the inverse of the init function. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 4fab64126891d413f207dacd5762a839b3470315 Author: Eric Dumazet Date: Fri Feb 10 15:26:05 2023 +0000 net/sched: fix error recovery in qdisc_create() If TCA_STAB attribute is malformed, qdisc_get_stab() returns an error, and we end up calling ops->destroy() while ops->init() has not been called yet. While we are at it, call qdisc_put_stab() after ops->destroy(). Fixes: 1f62879e3632 ("net/sched: make stab available before ops->init() call") Reported-by: syzbot+d44d88f1d11e6ca8576b@syzkaller.appspotmail.com Signed-off-by: Eric Dumazet Cc: Vladimir Oltean Cc: Kurt Kanzenbach Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit cafc3662ee3fe29a0027e0a947e6c6493cccaf60 Author: Horatiu Vultur Date: Fri Feb 10 11:27:01 2023 +0100 net: micrel: Add PHC support for lan8841 Add support for PHC and timestamping operations for the lan8841 PHY. PTP 1-step and 2-step modes are supported, over Ethernet and UDP both ipv4 and ipv6. Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller commit 238052e0449d23d9a8aca811242882b27a26c231 Merge: 170677fee45ba 6b4bfa43ce291 Author: David S. Miller Date: Mon Feb 13 09:49:14 2023 +0000 Merge branch 'devlink-params-cleanup' Jiri Pirko says: ==================== devlink: params cleanups and devl_param_driverinit_value_get() fix The primary motivation of this patchset is the patch #6, which fixes an issue introduced by 075935f0ae0f ("devlink: protect devlink param list by instance lock") and reported by Kim Phillips (https://lore.kernel.org/netdev/719de4f0-76ac-e8b9-38a9-167ae239efc7@amd.com/) and my colleagues doing mlx5 driver regression testing. The basis idea is that devl_param_driverinit_value_get() could be possible to the called without holding devlink intance lock in most of the cases (all existing ones in the current codebase), which would fix some mlx5 flows where the lock is not held. To achieve that, make sure that the param value does not change between reloads with patch #2. Also, convert the param list to xarray which removes the worry about list_head consistency when doing lockless lookup. The rest of the patches are doing some small related cleanup of things that poke me in the eye during the work. --- v1->v2: - a small bug was fixed in patch #2, the rest of the code stays the same so I left review/ack tags attached to them ==================== Signed-off-by: David S. Miller commit 6b4bfa43ce29165fb0a2a8ef770d94c1d93e5ad8 Author: Jiri Pirko Date: Fri Feb 10 11:01:31 2023 +0100 devlink: add forgotten devlink instance lock assertion to devl_param_driverinit_value_set() Driver calling devl_param_driverinit_value_set() has to hold devlink instance lock while doing that. Put an assertion there. Signed-off-by: Jiri Pirko Reviewed-by: Simon Horman Acked-by: Jakub Kicinski Reviewed-by: Jacob Keller Signed-off-by: David S. Miller commit 280f7b2adca09c8d5f34b99f49e5c570aa81daad Author: Jiri Pirko Date: Fri Feb 10 11:01:30 2023 +0100 devlink: allow to call devl_param_driverinit_value_get() without holding instance lock If the driver maintains following basic sane behavior, the devl_param_driverinit_value_get() function could be called without holding instance lock: 1) Driver ensures a call to devl_param_driverinit_value_get() cannot race with registering/unregistering the parameter with the same parameter ID. 2) Driver ensures a call to devl_param_driverinit_value_get() cannot race with devl_param_driverinit_value_set() call with the same parameter ID. 3) Driver ensures a call to devl_param_driverinit_value_get() cannot race with reload operation. By the nature of params usage, these requirements should be trivially achievable. If the driver for some off reason is not able to comply, it has to take the devlink->lock while calling devl_param_driverinit_value_get(). Remove the lock assertion and add comment describing the locking requirements. This fixes a splat in mlx5 driver introduced by the commit referenced in the "Fixes" tag. Lore: https://lore.kernel.org/netdev/719de4f0-76ac-e8b9-38a9-167ae239efc7@amd.com/ Reported-by: Kim Phillips Fixes: 075935f0ae0f ("devlink: protect devlink param list by instance lock") Signed-off-by: Jiri Pirko Reviewed-by: Simon Horman Acked-by: Jakub Kicinski Reviewed-by: Jacob Keller Tested-by: Kim Phillips Signed-off-by: David S. Miller commit a72e17b4523223015d3b3fd79bac2b065d6d09a9 Author: Jiri Pirko Date: Fri Feb 10 11:01:29 2023 +0100 devlink: convert param list to xarray Loose the linked list for params and use xarray instead. Note that this is required to be eventually possible to call devl_param_driverinit_value_get() without holding instance lock. Signed-off-by: Jiri Pirko Reviewed-by: Simon Horman Acked-by: Jakub Kicinski Reviewed-by: Jacob Keller Signed-off-by: David S. Miller commit fbcf938150ecd686c6a6195573957db25b43a182 Author: Jiri Pirko Date: Fri Feb 10 11:01:28 2023 +0100 devlink: use xa_for_each_start() helper in devlink_nl_cmd_port_get_dump_one() As xarray has an iterator helper that allows to start from specified index, use this directly and avoid repeated iteration from 0. Signed-off-by: Jiri Pirko Reviewed-by: Simon Horman Acked-by: Jakub Kicinski Reviewed-by: Jacob Keller Signed-off-by: David S. Miller commit 94ba1c316b9c0f9b017f7cd7eac84adae693e80f Author: Jiri Pirko Date: Fri Feb 10 11:01:27 2023 +0100 devlink: fix the name of value arg of devl_param_driverinit_value_get() Probably due to copy-paste error, the name of the arg is "init_val" which is misleading, as the pointer is used to point to struct where to store the current value. Rename it to "val" and change the arg comment a bit on the way. Signed-off-by: Jiri Pirko Reviewed-by: Simon Horman Acked-by: Jakub Kicinski Reviewed-by: Jacob Keller Signed-off-by: David S. Miller commit afd888c3e19ceb5247158fe2fabbf7234937a515 Author: Jiri Pirko Date: Fri Feb 10 11:01:26 2023 +0100 devlink: make sure driver does not read updated driverinit param before reload The driverinit param purpose is to serve the driver during init/reload time to provide a value, either default or set by user. Make sure that driver does not read value updated by user before the reload is performed. Hold the new value in a separate struct and switch it during reload. Note that this is required to be eventually possible to call devl_param_driverinit_value_get() without holding instance lock. Signed-off-by: Jiri Pirko Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit fa2f921f3bf1ed98956ad341b920a55aab69bc35 Author: Jiri Pirko Date: Fri Feb 10 11:01:25 2023 +0100 devlink: don't use strcpy() to copy param value No need to treat string params any different comparing to other types. Rely on the struct assign to copy the whole struct, including the string. Signed-off-by: Jiri Pirko Reviewed-by: Simon Horman Acked-by: Jakub Kicinski Reviewed-by: Jacob Keller Signed-off-by: David S. Miller commit 170677fee45baa955b3f7c1f41e6031d1d1e2272 Author: Yu Xiao Date: Fri Feb 10 10:53:19 2023 +0100 nfp: ethtool: supplement nfp link modes supported Add support for the following modes to the nfp driver: NFP_MEDIA_10GBASE_LR NFP_MEDIA_25GBASE_LR NFP_MEDIA_25GBASE_ER These modes are supported by the hardware and, support for them was recently added to firmware. Signed-off-by: Yu Xiao Signed-off-by: Simon Horman Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller commit 6d86bb0a5cb82bd459b017f180bdc47bec561b2d Author: Jacob Keller Date: Thu Feb 9 14:20:45 2023 -0800 devlink: stop using NL_SET_ERR_MSG_MOD NL_SET_ERR_MSG_MOD inserts the KBUILD_MODNAME and a ':' before the actual extended error message. The devlink feature hasn't been able to be compiled as a module since commit f4b6bcc7002f ("net: devlink: turn devlink into a built-in"). Stop using NL_SET_ERR_MSG_MOD, and just use the base NL_SET_ERR_MSG. This aligns the extended error messages better with the NL_SET_ERR_MSG_ATTR messages as well. Signed-off-by: Jacob Keller Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 68762148d1b011d47bc2ceed7321739b5aea1e63 Author: Pietro Borrello Date: Thu Feb 9 12:26:23 2023 +0000 rds: rds_rm_zerocopy_callback() correct order for list_add_tail() rds_rm_zerocopy_callback() uses list_add_tail() with swapped arguments. This links the list head with the new entry, losing the references to the remaining part of the list. Fixes: 9426bbc6de99 ("rds: use list structure to track information for zerocopy completion notification") Suggested-by: Paolo Abeni Signed-off-by: Pietro Borrello Signed-off-by: David S. Miller commit 04df97e150c83d4640540008e95d0229cb188135 Author: Bagas Sanjaya Date: Mon Feb 13 15:59:20 2023 +0700 Documentation: rust: Fix arch support table Stephen Rothwell reported htmldocs warning when merging uml tree: Documentation/rust/arch-support.rst:20: WARNING: Blank line required after table. Fix the arch support table by removing extraneous simple table marker. Link: https://lore.kernel.org/linux-next/20230213152714.78b844f4@canb.auug.org.au/ Fixes: 0438aadfa69a34 ("rust: arch/um: Add support for CONFIG_RUST under x86_64 UML") Reported-by: Stephen Rothwell Signed-off-by: Bagas Sanjaya Signed-off-by: Richard Weinberger commit 6c7667c9bc12778d5566137fd4b34f03e1f36909 Author: Carlos Bilbao Date: Thu Feb 9 12:16:38 2023 -0600 uml: vector: Remove unused definitions VECTOR_{WRITE,HEADERS} Remove definitions of VECTOR_WRITE and VECTOR_HEADERS since no longer used. Signed-off-by: Carlos Bilbao Acked-By: Anton Ivanov Signed-off-by: Richard Weinberger commit 339b84dcd7113dd076419ea2a47128cc53450305 Author: Benjamin Berg Date: Thu Feb 9 10:00:05 2023 +0100 um: virt-pci: properly remove PCI device from bus Triggering a bus rescan will not cause the PCI device to be removed. It is required to explicitly stop and remove the device from the bus. Fixes: 68f5d3f3b654 ("um: add PCI over virtio emulation driver") Signed-off-by: Benjamin Berg Signed-off-by: Richard Weinberger commit abdeb4fa5e1b5b4918034f02236fd886f40c20c1 Author: Benjamin Berg Date: Thu Feb 9 10:00:04 2023 +0100 um: virtio_uml: move device breaking into workqueue We should not be calling virtio_break_device from an IRQ context. Move breaking the device into the workqueue so that it is done from a reasonable context. Fixes: af9fb41ed315 ("um: virtio_uml: Fix broken device handling in time-travel") Signed-off-by: Benjamin Berg Signed-off-by: Richard Weinberger commit 8e9cd85139a2149d5a7c121b05e0cdb8287311f9 Author: Benjamin Berg Date: Thu Feb 9 10:00:03 2023 +0100 um: virtio_uml: mark device as unregistered when breaking it Mark the device as not registered anymore when scheduling the work to remove it. Otherwise we could end up scheduling the work multiple times in a row, including scheduling it while it is already running. Fixes: af9fb41ed315 ("um: virtio_uml: Fix broken device handling in time-travel") Signed-off-by: Benjamin Berg Signed-off-by: Richard Weinberger commit 8a6ca543646f2940832665dbf4e04105262505e2 Author: Benjamin Berg Date: Thu Feb 9 10:00:02 2023 +0100 um: virtio_uml: free command if adding to virtqueue failed If adding the command fails (i.e. the virtqueue is broken) then free it again if the function allocated a new buffer for it. Fixes: 68f5d3f3b654 ("um: add PCI over virtio emulation driver") Signed-off-by: Benjamin Berg Signed-off-by: Richard Weinberger commit b99ddbe8336ee680257c8ab479f75051eaa49dcf Author: Masahiro Yamada Date: Wed Feb 8 01:41:56 2023 +0900 UML: define RUNTIME_DISCARD_EXIT With CONFIG_VIRTIO_UML=y, GNU ld < 2.36 fails to link UML vmlinux (w/wo CONFIG_LD_SCRIPT_STATIC). `.exit.text' referenced in section `.uml.exitcall.exit' of arch/um/drivers/virtio_uml.o: defined in discarded section `.exit.text' of arch/um/drivers/virtio_uml.o collect2: error: ld returned 1 exit status This fix is similar to the following commits: - 4b9880dbf3bd ("powerpc/vmlinux.lds: Define RUNTIME_DISCARD_EXIT") - a494398bde27 ("s390: define RUNTIME_DISCARD_EXIT to fix link error with GNU ld < 2.36") - c1c551bebf92 ("sh: define RUNTIME_DISCARD_EXIT") Fixes: 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv") Reported-by: SeongJae Park Signed-off-by: Masahiro Yamada Tested-by: SeongJae Park Signed-off-by: Richard Weinberger commit 522c532c4fe730258118fb146577ec9bedf6b807 Author: Vincent Whitchurch Date: Fri Jan 27 15:30:27 2023 +0100 virt-pci: add platform bus support This driver registers PCI busses, but the underlying virtio protocol could just as easily be used to provide a platform bus instead. If the virtio device node in the devicetree indicates that it's compatible with simple-bus, register platform devices instead of handling it as a PCI bus. Only one platform bus is allowed and the logic MMIO region for the platform bus is placed at an arbitrarily-chosen address away from the PCI region. Signed-off-by: Vincent Whitchurch Signed-off-by: Richard Weinberger commit 935f8f7a0123ffa0a2dd7234713dc2ebeeb08955 Author: Vincent Whitchurch Date: Thu Jan 26 11:47:10 2023 +0100 um-virt-pci: Make max delay configurable There is a hard coded maximum time for which the driver busy-loops waiting for a response from the virtio device. This default time may be too short for some systems, so make it a module parameter so that it can be set via the kernel command line. Signed-off-by: Vincent Whitchurch Signed-off-by: Richard Weinberger commit 314a1408b79a844dafdcde867d90de5d509409b7 Author: Vincent Whitchurch Date: Fri Jan 20 09:02:32 2023 +0100 um: virt-pci: implement pcibios_get_phb_of_node() Implement pcibios_get_phb_of_node() as x86 does in order to allow PCI busses to be associated with devicetree nodes. Signed-off-by: Vincent Whitchurch Acked-by: Johannes Berg Signed-off-by: Richard Weinberger commit 83e913f52aba69149261742aa9ea4ceea7bf182d Author: Peter Foley Date: Fri Jan 13 12:03:00 2023 -0500 um: Support LTO Only a handful of changes are necessary to get it to work. Signed-off-by: Peter Foley Signed-off-by: Richard Weinberger commit f09c3fcf67a3294c981b861981143e38895c5a59 Author: Peter Foley Date: Fri Jan 13 11:56:11 2023 -0500 um: put power options in a menu Because having them all dumped at top-level is a bit messy. Signed-off-by: Peter Foley Signed-off-by: Richard Weinberger commit 6aa56115c73b37270e53aa91984bdb8b60164ec7 Author: Peter Foley Date: Thu Jan 12 23:49:10 2023 -0500 um: Use CFLAGS_vmlinux link-vmlinux.sh doesn't use LDFLAGS_vmlinux when linking the kernel for UML. Move the LDFLAGS_EXESTACK options into CFLAGS_vmlinux so they're actually respected. e.g. /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: warning: .tmp_vmlinux.kallsyms3.o: missing .note.GNU-stack section implies executable stack /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: warning: vmlinux has a LOAD segment with RWX permissions Reviewed-by: David Gow Signed-off-by: Peter Foley Signed-off-by: Richard Weinberger commit 910dba41239224069c17bb6c30c9d43c1ba229f1 Author: Peter Foley Date: Thu Jan 12 23:49:09 2023 -0500 um: Prevent building modules incompatible with MODVERSIONS The manual ld invocation in arch/um/drivers doesn't play nicely with genksyms. Given the problematic modules are deprecated anyway, just prevent building them when using MODVERSIONS. e.g. MODPOST Module.symvers arch/um/drivers/.pcap.o.cmd: No such file or directory Signed-off-by: Peter Foley Signed-off-by: Richard Weinberger commit 2c4d3841a82b88ae8a7b518dc6206f84f68e705a Author: Peter Foley Date: Thu Jan 12 23:49:08 2023 -0500 um: Avoid pcap multiple definition errors Change the function name in pcap_kern to avoid conflicting with libpcap.a. e.g. ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../lib64/libpcap.a(pcap.o): in function `pcap_init': (.text+0x7f0): multiple definition of `pcap_init'; arch/um/drivers/pcap_kern.o:pcap_kern.c:(.text.unlikely+0x0): first defined here Signed-off-by: Peter Foley Signed-off-by: Richard Weinberger commit 9a0450ada86e842997db6296244e159879fb6ef9 Author: Gustavo A. R. Silva Date: Thu Feb 2 19:28:23 2023 -0600 xen: 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 xen_page_directory. 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/255 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/Y9xjN6Wa3VslgXeX@work Signed-off-by: Juergen Gross commit 85b93bbd1c9768d09adebbe9f33bab0d4ec94404 Author: Julien Gomes Date: Wed Feb 8 11:58:36 2023 -0800 tpm: add vendor flag to command code validation Some TPM 2.0 devices have support for additional commands which are not part of the TPM 2.0 specifications. These commands are identified with bit 29 of the 32 bits command codes. Contrarily to other fields of the TPMA_CC spec structure used to list available commands, the Vendor flag also has to be present in the command code itself (TPM_CC) when called. Add this flag to tpm_find_cc() mask to prevent blocking vendor command codes that can actually be supported by the underlying TPM device. Signed-off-by: Julien Gomes Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 1e2714bb83fc783d58701967391bea242c65eaff Author: Eddie James Date: Thu Jan 26 15:08:10 2023 -0600 tpm: Add reserved memory event log Some platforms may desire to pass the event log up to Linux in the form of a reserved memory region. In particular, this is desirable for embedded systems or baseboard management controllers (BMCs) booting with U-Boot. IBM OpenBMC BMCs will be the first user. Add support for the reserved memory in the TPM core to find the region and map it. Signed-off-by: Eddie James [jarkko: removed spurious dev_info()'s from tpm_read_log_memory_region()] Reviewed-by: Jarkko Sakkinen [yang: return -ENOMEM when devm_memremap() fails] Signed-off-by: Yang Yingliang Signed-off-by: Jarkko Sakkinen commit 441b7152729f4a2bdb100135a58625fa0aeb69e4 Author: Eddie James Date: Thu Jan 26 15:08:09 2023 -0600 tpm: Use managed allocation for bios event log Since the bios event log is freed in the device release function, let devres handle the deallocation. This will allow other memory allocation/mapping functions to be used for the bios event log. Signed-off-by: Eddie James Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 40078327f6045185775eb7442a02f8edad2dea52 Author: Uwe Kleine-König Date: Fri Nov 18 23:35:39 2022 +0100 tpm: tis_i2c: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Acked-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 8f3fb73b8b8dbac9803952086710fc32de377b8e Author: Uwe Kleine-König Date: Fri Nov 18 23:35:38 2022 +0100 tpm: tpm_i2c_nuvoton: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Acked-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit d5ae2f4760c5b332a805f1caae9eb10101152ddd Author: Uwe Kleine-König Date: Fri Nov 18 23:35:37 2022 +0100 tpm: tpm_i2c_infineon: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Acked-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit d787c95b565fd72259082ca771bfdc1a55ae3960 Author: Uwe Kleine-König Date: Fri Nov 18 23:35:36 2022 +0100 tpm: tpm_i2c_atmel: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Acked-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 376f88f44ec03e8df573888056f1992602498df1 Author: Uwe Kleine-König Date: Fri Nov 18 23:35:35 2022 +0100 tpm: st33zp24: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Acked-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 10de7b54293995368c52d9aa153f3e7a359f04a1 Author: Denis Kenzior Date: Fri Aug 26 09:51:19 2022 -0500 KEYS: asymmetric: Fix ECDSA use via keyctl uapi When support for ECDSA keys was added, constraints for data & signature sizes were never updated. This makes it impossible to use such keys via keyctl API from userspace. Update constraint on max_data_size to 64 bytes in order to support SHA512-based signatures. Also update the signature length constraints per ECDSA signature encoding described in RFC 5480. Fixes: 299f561a6693 ("x509: Add support for parsing x509 certs with ECDSA keys") Signed-off-by: Denis Kenzior Reviewed-by: Stefan Berger Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit c95e8f6fd157b45ef0685c221931561e943e82da Author: Thomas Weißschuh Date: Mon Jan 9 23:59:43 2023 +0000 certs: don't try to update blacklist keys When the same key is blacklisted repeatedly logging at pr_err() level is excessive as no functionality is impaired. When these duplicates are provided by buggy firmware there is nothing the user can do to fix the situation. Instead of spamming the bootlog with errors we use a warning that can still be seen by OEMs when testing their firmware. Link: https://lore.kernel.org/all/c8c65713-5cda-43ad-8018-20f2e32e4432@t-8ch.de/ Link: https://lore.kernel.org/all/20221104014704.3469-1-linux@weissschuh.net/ Signed-off-by: Thomas Weißschuh Tested-by: Paul Menzel Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 6c1976addf3623e979b7a954e216004d559bcb42 Author: Thomas Weißschuh Date: Mon Jan 9 23:59:42 2023 +0000 KEYS: Add new function key_create() key_create() works like key_create_or_update() but does not allow updating an existing key, instead returning ERR_PTR(-EEXIST). key_create() will be used by the blacklist keyring which should not create duplicate entries or update existing entries. Instead a dedicated message with appropriate severity will be logged. Signed-off-by: Thomas Weißschuh Signed-off-by: Jarkko Sakkinen commit 06b53b02945e3021addc6af2da3ac999d2221d23 Author: Thomas Weißschuh Date: Mon Jan 9 23:59:41 2023 +0000 certs: make blacklisted hash available in klog One common situation triggering this log statement are duplicate hashes reported by the system firmware. These duplicates should be removed from the firmware. Without logging the blacklisted hash triggering the issue however the users can not report it properly to the firmware vendors and the firmware vendors can not easily see which specific hash is duplicated. While changing the log message also use the dedicated ERR_PTR format placeholder for the returned error value. Signed-off-by: Thomas Weißschuh Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 4d2732882703791ea4b670df433f88fc4b40a5cb Author: Matthew Garrett Date: Sat Dec 31 01:14:32 2022 -0800 tpm_crb: Add support for CRB devices based on Pluton Pluton is an integrated security processor present in some recent Ryzen parts. If it's enabled, it presents two devices - an MSFT0101 ACPI device that's broadly an implementation of a Command Response Buffer TPM2, and an MSFT0200 ACPI device whose functionality I haven't examined in detail yet. This patch only attempts to add support for the TPM device. There's a few things that need to be handled here. The first is that the TPM2 ACPI table uses a previously undefined start method identifier. The table format appears to include 16 bytes of startup data, which corresponds to one 64-bit address for a start message and one 64-bit address for a completion response. The second is that the ACPI tables on the Thinkpad Z13 I'm testing this on don't define any memory windows in _CRS (or, more accurately, there are two empty memory windows). This check doesn't seem strictly necessary, so I've skipped that. Finally, it seems like chip needs to be explicitly asked to transition into ready status on every command. Failing to do this means that if two commands are sent in succession without an idle/ready transition in between, everything will appear to work fine but the response is simply the original command. I'm working without any docs here, so I'm not sure if this is actually the required behaviour or if I'm missing something somewhere else, but doing this results in the chip working reliably. Reviewed-by: Jarkko Sakkinen Signed-off-by: Matthew Garrett Signed-off-by: Jarkko Sakkinen commit 0f5d4a0b995faa6537c4de79973817a4f8da206a Author: Arnd Bergmann Date: Thu Dec 15 18:02:52 2022 +0100 crypto: certs: fix FIPS selftest dependency The selftest code is built into the x509_key_parser module, and depends on the pkcs7_message_parser module, which in turn has a dependency on the key parser, creating a dependency loop and a resulting link failure when the pkcs7 code is a loadable module: ld: crypto/asymmetric_keys/selftest.o: in function `fips_signature_selftest': crypto/asymmetric_keys/selftest.c:205: undefined reference to `pkcs7_parse_message' ld: crypto/asymmetric_keys/selftest.c:209: undefined reference to `pkcs7_supply_detached_data' ld: crypto/asymmetric_keys/selftest.c:211: undefined reference to `pkcs7_verify' ld: crypto/asymmetric_keys/selftest.c:215: undefined reference to `pkcs7_validate_trust' ld: crypto/asymmetric_keys/selftest.c:219: undefined reference to `pkcs7_free_message' Avoid this by only allowing the selftest to be enabled when either both parts are loadable modules, or both are built-in. Signed-off-by: Arnd Bergmann Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit b187c70b0366b465faa6e78c84feb5817561105f Merge: 75da437a2f172 9cbd5a8abca90 Author: Kalle Valo Date: Mon Feb 13 08:58:37 2023 +0200 Merge tag 'iwlwifi-next-for-kalle-2023-01-30' of http://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next iwlwifi updates towards v6.3, this patch-set contains: * EHT rate reporting * Sniffer support for EHT and a few fixes in the related code * A few general cleanups and small bugfixes * Bump FW API to 74 for AX devices * Fix a compilation error in mei (it still depends on BROKEN) * STEP equalizer support - transfer some Phy related parameters from the BIOS to the firmware commit 2062f9fb6445451b189595e295765c69f43bc12e Author: Oleksandr Tyshchenko Date: Wed Feb 8 17:36:49 2023 +0200 xen/grant-dma-iommu: Implement a dummy probe_device() callback Update stub IOMMU driver (which main purpose is to reuse generic IOMMU device-tree bindings by Xen grant DMA-mapping layer on Arm) according to the recent changes done in the following commit 57365a04c921 ("iommu: Move bus setup to IOMMU device registration"). With probe_device() callback being called during IOMMU device registration, the uninitialized callback just leads to the "kernel NULL pointer dereference" issue during boot. Fix that by adding a dummy callback. Looks like the release_device() callback is not mandatory to be implemented as IOMMU framework makes sure that callback is initialized before dereferencing. Reported-by: Viresh Kumar Fixes: 57365a04c921 ("iommu: Move bus setup to IOMMU device registration") Signed-off-by: Oleksandr Tyshchenko Tested-by: Viresh Kumar Reviewed-by: Stefano Stabellini Link: https://lore.kernel.org/r/20230208153649.3604857-1-olekstysh@gmail.com Signed-off-by: Juergen Gross commit c70b7741dda7586529cc270e0f2c4cae3921b9b1 Author: Volodymyr Babchuk Date: Thu Jan 19 21:11:15 2023 +0000 xen/pvcalls-back: fix permanently masked event channel There is a sequence of events that can lead to a permanently masked event channel, because xen_irq_lateeoi() is newer called. This happens when a backend receives spurious write event from a frontend. In this case pvcalls_conn_back_write() returns early and it does not clears the map->write counter. As map->write > 0, pvcalls_back_ioworker() returns without calling xen_irq_lateeoi(). This leaves the event channel in masked state, a backend does not receive any new events from a frontend and the whole communication stops. Move atomic_set(&map->write, 0) to the very beginning of pvcalls_conn_back_write() to fix this issue. Signed-off-by: Volodymyr Babchuk Reported-by: Oleksii Moisieiev Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20230119211037.1234931-1-volodymyr_babchuk@epam.com Signed-off-by: Juergen Gross commit 3e8cd711c3da6c3d724076048038cd666bdbb2b5 Author: David Woodhouse Date: Wed Jan 18 12:22:38 2023 +0000 xen: Allow platform PCI interrupt to be shared When we don't use the per-CPU vector callback, we ask Xen to deliver event channel interrupts as INTx on the PCI platform device. As such, it can be shared with INTx on other PCI devices. Set IRQF_SHARED, and make it return IRQ_HANDLED or IRQ_NONE according to whether the evtchn_upcall_pending flag was actually set. Now I can share the interrupt: 11: 82 0 IO-APIC 11-fasteoi xen-platform-pci, ens4 Drop the IRQF_TRIGGER_RISING. It has no effect when the IRQ is shared, and besides, the only effect it was having even beforehand was to trigger a debug message in both I/OAPIC and legacy PIC cases: [ 0.915441] genirq: No set_type function for IRQ 11 (IO-APIC) [ 0.951939] genirq: No set_type function for IRQ 11 (XT-PIC) Signed-off-by: David Woodhouse Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/f9a29a68d05668a3636dd09acd94d970269eaec6.camel@infradead.org Signed-off-by: Juergen Gross commit caea091e48ed9d3951506507abf26e9918d08e35 Author: Krister Johansen Date: Fri Dec 16 08:21:18 2022 -0800 x86/xen/time: prefer tsc as clocksource when it is invariant Kvm elects to use tsc instead of kvm-clock when it can detect that the TSC is invariant. (As of commit 7539b174aef4 ("x86: kvmguest: use TSC clocksource if invariant TSC is exposed")). Notable cloud vendors[1] and performance engineers[2] recommend that Xen users preferentially select tsc over xen-clocksource due the performance penalty incurred by the latter. These articles are persuasive and tailored to specific use cases. In order to understand the tradeoffs around this choice more fully, this author had to reference the documented[3] complexities around the Xen configuration, as well as the kernel's clocksource selection algorithm. Many users may not attempt this to correctly configure the right clock source in their guest. The approach taken in the kvm-clock module spares users this confusion, where possible. Both the Intel SDM[4] and the Xen tsc documentation explain that marking a tsc as invariant means that it should be considered stable by the OS and is elibile to be used as a wall clock source. In order to obtain better out-of-the-box performance, and reduce the need for user tuning, follow kvm's approach and decrease the xen clock rating so that tsc is preferable, if it is invariant, stable, and the tsc will never be emulated. [1] https://aws.amazon.com/premiumsupport/knowledge-center/manage-ec2-linux-clock-source/ [2] https://www.brendangregg.com/blog/2021-09-26/the-speed-of-time.html [3] https://xenbits.xen.org/docs/unstable/man/xen-tscmode.7.html [4] Intel 64 and IA-32 Architectures Sofware Developer's Manual Volume 3b: System Programming Guide, Part 2, Section 17.17.1, Invariant TSC Signed-off-by: Krister Johansen Code-reviewed-by: David Reaver Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20221216162118.GB2633@templeofstupid.com Signed-off-by: Juergen Gross commit f697cb00afa90b68748f246540270b5865c801ba Author: Juergen Gross Date: Fri Nov 25 07:32:48 2022 +0100 x86/xen: mark xen_pv_play_dead() as __noreturn Mark xen_pv_play_dead() and related to that xen_cpu_bringup_again() as "__noreturn". Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221125063248.30256-3-jgross@suse.com Signed-off-by: Juergen Gross commit 336f560a8917fd60bcdb71b97263257611411453 Author: Juergen Gross Date: Fri Nov 25 07:32:47 2022 +0100 x86/xen: don't let xen_pv_play_dead() return A function called via the paravirt play_dead() hook should not return to the caller. xen_pv_play_dead() has a problem in this regard, as it currently will return in case an offlined cpu is brought to life again. This can be changed only by doing basically a longjmp() to cpu_bringup_and_idle(), as the hypercall for bringing down the cpu will just return when the cpu is coming up again. Just re-initializing the cpu isn't possible, as the Xen hypervisor will deny that operation. So introduce xen_cpu_bringup_again() resetting the stack and calling cpu_bringup_and_idle(), which can be called after HYPERVISOR_vcpu_op() in xen_pv_play_dead(). Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221125063248.30256-2-jgross@suse.com Signed-off-by: Juergen Gross commit 415dab3c179632d098aadc756b39cebceb977978 Author: Per Bilse Date: Tue Jan 3 13:02:13 2023 +0000 drivers/xen/hypervisor: Expose Xen SIF flags to userspace /proc/xen is a legacy pseudo filesystem which predates Xen support getting merged into Linux. It has largely been replaced with more normal locations for data (/sys/hypervisor/ for info, /dev/xen/ for user devices). We want to compile xenfs support out of the dom0 kernel. There is one item which only exists in /proc/xen, namely /proc/xen/capabilities with "control_d" being the signal of "you're in the control domain". This ultimately comes from the SIF flags provided at VM start. This patch exposes all SIF flags in /sys/hypervisor/start_flags/ as boolean files, one for each bit, returning '1' if set, '0' otherwise. Two known flags, 'privileged' and 'initdomain', are explicitly named, and all remaining flags can be accessed via generically named files, as suggested by Andrew Cooper. Signed-off-by: Per Bilse Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20230103130213.2129753-1-per.bilse@citrix.com Signed-off-by: Juergen Gross commit 2b188a2cfc4d8f319ad23832ec1390bdae52daf6 Author: Thomas Weißschuh Date: Fri Feb 10 02:14:44 2023 +0000 zonefs: 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: Johannes Thumshirn Signed-off-by: Damien Le Moal commit 5aa52ccf692bfef7ddc23c2be1d48524a4427527 Author: Geert Uytterhoeven Date: Mon Dec 19 14:40:29 2022 +0100 m68k: nommu: Fix misspellings of "DragonEngine" Exys produced the "DragonEngine II" board. Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Ungerer commit 8f6077272910d1c7b2ccaacbb02119e18aabecb8 Author: Geert Uytterhoeven Date: Tue Dec 13 09:18:50 2022 +0100 m68k: nommu: Fix misspellings of "uCdimm" Arcturus Networks produced the "uCsimm" and "uCdimm" modules. Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Ungerer commit bd4f5d09cc93c8ca51e4efea86ac90a4bb553d6e Author: Dave Chinner Date: Mon Feb 13 09:14:56 2023 +1100 xfs: refactor the filestreams allocator pick functions Now that the filestreams allocator is largely rewritten, restructure the main entry point and pick function to seperate out the different operations cleanly. The MRU lookup function should not handle the start AG selection on MRU lookup failure, and nor should the pick function handle building the association that is inserted into the MRU. This leaves the filestreams allocator fairly clean and easy to understand, returning to the caller with an active perag reference and a target block to allocate at. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit f8f1ed1ab3babad46b25e2dbe8de43b33fe7aaa6 Author: Dave Chinner Date: Mon Feb 13 09:14:56 2023 +1100 xfs: return a referenced perag from filestreams allocator Now that the filestreams AG selection tracks active perags, we need to return an active perag to the core allocator code. This is because the file allocation the filestreams code will run are AG specific allocations and so need to pin the AG until the allocations complete. We cannot rely on the filestreams item reference to do this - the filestreams association can be torn down at any time, hence we need to have a separate reference for the allocation process to pin the AG after it has been selected. This means there is some perag juggling in allocation failure fallback paths as they will do all AG scans in the case the AG specific allocation fails. Hence we need to track the perag reference that the filestream allocator returned to make sure we don't leak it on repeated allocation failure. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 571e259282a43f58b1f70dcbf2add20d8c83a72b Author: Dave Chinner Date: Mon Feb 13 09:14:56 2023 +1100 xfs: pass perag to filestreams tracing Pass perags instead of raw ag numbers, avoiding the need for the special peek function for the tracing code. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit eb70aa2d8ed9a6fc3525f305226c550524390cd2 Author: Dave Chinner Date: Mon Feb 13 09:14:55 2023 +1100 xfs: use for_each_perag_wrap in xfs_filestream_pick_ag xfs_filestream_pick_ag() is now ready to rework to use for_each_perag_wrap() for iterating the perags during the AG selection scan. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 3054face139f9c77566a90a0524dd85c2f38c7f2 Author: Dave Chinner Date: Mon Feb 13 09:14:55 2023 +1100 xfs: track an active perag reference in filestreams Rather than just track the agno of the reference, track a referenced perag pointer instead. This will allow active filestreams to prevent AGs from going away until the filestreams have been torn down. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit f38b46bbfa76a854c4c2a27b1617d66fefbb3f80 Author: Dave Chinner Date: Mon Feb 13 09:14:55 2023 +1100 xfs: factor out MRU hit case in xfs_filestream_select_ag Because it now stands out like a sore thumb. Factoring out this case starts the process of simplifying xfs_filestream_select_ag() again. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 3e43877a9dac13771ac722462c87bea0bdc50759 Author: Dave Chinner Date: Mon Feb 13 09:14:55 2023 +1100 xfs: remove xfs_filestream_select_ag() longest extent check Picking a new AG checks the longest free extent in the AG is valid, so there's no need to repeat the check in xfs_filestream_select_ag(). Remove it. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit ba34de8defe013e4062bdc2ed57d748d6807a96a Author: Dave Chinner Date: Mon Feb 13 09:14:55 2023 +1100 xfs: merge new filestream AG selection into xfs_filestream_select_ag() This is largely a wrapper around xfs_filestream_pick_ag() that repeats a lot of the lookups that we just merged back into xfs_filestream_select_ag() from the lookup code. Merge the xfs_filestream_new_ag() code back into _select_ag() to get rid of all the unnecessary logic. Indeed, this makes it obvious that if we have no parent inode, the filestreams allocator always selects AG 0 regardless of whether it is fit for purpose or not. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit a52dc2ad363088d0e0ab05a71f0496e2377e5cc9 Author: Dave Chinner Date: Mon Feb 13 09:14:55 2023 +1100 xfs: merge filestream AG lookup into xfs_filestream_select_ag() The lookup currently either returns the cached filestream AG or it calls xfs_filestreams_select_lengths() to looks up a new AG. This has verify the AG that is selected, so we end up doing "select a new AG loop in a couple of places when only one really is needed. Merge the initial lookup functionality with the length selection so that we only need to do a single pick loop on lookup or verification failure. This undoes a lot of the factoring that enabled the selection to be moved over to the filestreams code. It makes xfs_filestream_select_ag() an awful messier, but it has to be made worse before it can get better in future patches... Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 8f7747ad8c52cde585b9456f6dbd1984af7b97bc Author: Dave Chinner Date: Mon Feb 13 09:14:55 2023 +1100 xfs: move xfs_bmap_btalloc_filestreams() to xfs_filestreams.c xfs_bmap_btalloc_filestreams() calls two filestreams functions to select the AG to allocate from. Both those functions end up in the same selection function that iterates all AGs multiple times. Worst case, xfs_bmap_btalloc_filestreams() can iterate all AGs 4 times just to select the initial AG to allocate in. Move the AG selection to fs/xfs/xfs_filestreams.c as a single interface so that the inefficient AG interation is contained entirely within the filestreams code. This will allow the implementation to be simplified and made more efficient in future patches. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 05cf492a8d01f48d4b8d8f0b93f2d75de7349f12 Author: Dave Chinner Date: Mon Feb 13 09:14:55 2023 +1100 xfs: use xfs_bmap_longest_free_extent() in filestreams The code in xfs_bmap_longest_free_extent() is open coded in xfs_filestream_pick_ag(). Export xfs_bmap_longest_free_extent and call it from the filestreams code instead. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 6b637ad0c7be85ecb795697ea51051039b753da2 Author: Dave Chinner Date: Mon Feb 13 09:14:55 2023 +1100 xfs: get rid of notinit from xfs_bmap_longest_free_extent It is only set if reading the AGF gets a EAGAIN error. Just return the EAGAIN error and handle that error in the callers. This means we can remove the not_init parameter from xfs_bmap_select_minlen(), too, because the use of not_init there is pessimistic. If we can't read the agf, it won't increase blen. The only time we actually care whether we checked all the AGFs for contiguous free space is when the best length is less than the minimum allocation length. If not_init is set, then we ignore blen and set the minimum alloc length to the absolute minimum, not the best length we know already is present. However, if blen is less than the minimum we're going to ignore it anyway, regardless of whether we scanned all the AGFs or not. Hence not_init can go away, because we only use if blen is good from the scanned AGs otherwise we ignore it altogether and use minlen. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 89563e7dc099343bf7792515452e1a24005d98a6 Author: Dave Chinner Date: Mon Feb 13 09:14:54 2023 +1100 xfs: factor out filestreams from xfs_bmap_btalloc_nullfb There's many if (filestreams) {} else {} branches in this function. Split it out into a filestreams specific function so that we can then work directly on cleaning up the filestreams code without impacting the rest of the allocation algorithms. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 35bf2b1abc9a753321db3b3787f5b5de6bd2b370 Author: Dave Chinner Date: Mon Feb 13 09:14:54 2023 +1100 xfs: convert trim to use for_each_perag_range To convert it to using active perag references and hence make it shrink safe. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 3432ef6111997f39d2f708dd508159dfaca72942 Author: Dave Chinner Date: Mon Feb 13 09:14:54 2023 +1100 xfs: convert xfs_alloc_vextent_iterate_ags() to use perag walker Now that the AG iteration code in the core allocation code has been cleaned up, we can easily convert it to use a for_each_perag..() variant to use active references and skip AGs that it can't get active references on. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 8b81356825ffb96b3b167b4dabbbbdb506bb0e0b Author: Dave Chinner Date: Mon Feb 13 09:14:54 2023 +1100 xfs: move the minimum agno checks into xfs_alloc_vextent_check_args All of the allocation functions now extract the minimum allowed AG from the transaction and then use it in some way. The allocation functions that are restricted to a single AG all check if the AG requested can be allocated from and return an error if so. These all set args->agno appropriately. All the allocation functions that iterate AGs use it to calculate the scan start AG. args->agno is not set until the iterator starts walking AGs. Hence we can easily set up a conditional check against the minimum AG allowed in xfs_alloc_vextent_check_args() based on whether args->agno contains NULLAGNUMBER or not and move all the repeated setup code to xfs_alloc_vextent_check_args(), further simplifying the allocation functions. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 230e8fe8462ffda0849ea40b61dcf9f233854076 Author: Dave Chinner Date: Mon Feb 13 09:14:54 2023 +1100 xfs: fold xfs_alloc_ag_vextent() into callers We don't need the multiplexing xfs_alloc_ag_vextent() provided anymore - we can just call the exact/near/size variants directly. This allows us to remove args->type completely and stop using args->fsbno as an input to the allocator algorithms. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit e4d174260779ff0e2dc5de951c2e235721b02b05 Author: Dave Chinner Date: Mon Feb 13 09:14:54 2023 +1100 xfs: move allocation accounting to xfs_alloc_vextent_set_fsbno() Move it from xfs_alloc_ag_vextent() so we can get rid of that layer. Rename xfs_alloc_vextent_set_fsbno() to xfs_alloc_vextent_finish() to indicate that it's function is finishing off the allocation that we've run now that it contains much more functionality. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 74b9aa63193b288191d6f01b61c819cef2807138 Author: Dave Chinner Date: Mon Feb 13 09:14:54 2023 +1100 xfs: introduce xfs_alloc_vextent_prepare() Now that we have wrapper functions for each type of allocation we can ask for, we can start unravelling xfs_alloc_ag_vextent(). That is essentially just a prepare stage, the allocation multiplexer and a post-allocation accounting step is the allocation proceeded. The current xfs_alloc_vextent*() wrappers all have a prepare stage, the allocation operation and a post-allocation accounting step. We can consolidate this by moving the AG alloc prep code into the wrapper functions, the accounting code in the wrapper accounting functions, and cut out the multiplexer layer entirely. This patch consolidates the AG preparation stage. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 5f36b2ce79f254dd00cdc88374271df7ce843d56 Author: Dave Chinner Date: Mon Feb 13 09:14:54 2023 +1100 xfs: introduce xfs_alloc_vextent_exact_bno() Two of the callers to xfs_alloc_vextent_this_ag() actually want exact block number allocation, not anywhere-in-ag allocation. Split this out from _this_ag() as a first class citizen so no external extent allocation code needs to care about args->type anymore. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit db4710fd12248e5d4c3842520cd13f034136576b Author: Dave Chinner Date: Mon Feb 13 09:14:54 2023 +1100 xfs: introduce xfs_alloc_vextent_near_bno() The remaining callers of xfs_alloc_vextent() are all doing NEAR_BNO allocations. We can replace that function with a new xfs_alloc_vextent_near_bno() function that does this explicitly. We also multiplex NEAR_BNO allocations through xfs_alloc_vextent_this_ag via args->type. Replace all of these with direct calls to xfs_alloc_vextent_near_bno(), too. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 2a7f6d41d8b72412228ede538bdf0e81bf9738f4 Author: Dave Chinner Date: Mon Feb 13 09:14:53 2023 +1100 xfs: use xfs_alloc_vextent_start_bno() where appropriate Change obvious callers of single AG allocation to use xfs_alloc_vextent_start_bno(). Callers no long need to specify XFS_ALLOCTYPE_START_BNO, and so the type can be driven inward and removed. While doing this, also pass the allocation target fsb as a parameter rather than encoding it in args->fsbno. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 319c9e874ac8721acdb6583e3459ef595e5ed0a6 Author: Dave Chinner Date: Mon Feb 13 09:14:53 2023 +1100 xfs: use xfs_alloc_vextent_first_ag() where appropriate Change obvious callers of single AG allocation to use xfs_alloc_vextent_first_ag(). This gets rid of XFS_ALLOCTYPE_FIRST_AG as the type used within xfs_alloc_vextent_first_ag() during iteration is _THIS_AG. Hence we can remove the setting of args->type from all the callers of _first_ag() and remove the alloctype. While doing this, pass the allocation target fsb as a parameter rather than encoding it in args->fsbno. This starts the process of making args->fsbno an output only variable rather than input/output. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 85843327094f9de9cf0129cd9a3a43128c6f5ac8 Author: Dave Chinner Date: Mon Feb 13 09:14:53 2023 +1100 xfs: factor xfs_bmap_btalloc() There are several different contexts xfs_bmap_btalloc() handles, and large chunks of the code execute independent allocation contexts. Try to untangle this mess a bit. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 74c36a8689d3d8ca9d9e96759c9bbf337e049097 Author: Dave Chinner Date: Mon Feb 13 09:14:53 2023 +1100 xfs: use xfs_alloc_vextent_this_ag() where appropriate Change obvious callers of single AG allocation to use xfs_alloc_vextent_this_ag(). Drive the per-ag grabbing out to the callers, too, so that callers with active references don't need to do new lookups just for an allocation in a context that already has a perag reference. The only remaining caller that does single AG allocation through xfs_alloc_vextent() is xfs_bmap_btalloc() with XFS_ALLOCTYPE_NEAR_BNO. That is going to need more untangling before it can be converted cleanly. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 4811c933ea1ab7de86507dc9f7c9d3d9d71cafb5 Author: Dave Chinner Date: Mon Feb 13 09:14:53 2023 +1100 xfs: combine __xfs_alloc_vextent_this_ag and xfs_alloc_ag_vextent There's a bit of a recursive conundrum around xfs_alloc_ag_vextent(). We can't first call xfs_alloc_ag_vextent() without preparing the AGFL for the allocation, and preparing the AGFL calls xfs_alloc_ag_vextent() to prepare the AGFL for the allocation. This "double allocation" requirement is not really clear from the current xfs_alloc_fix_freelist() calls that are sprinkled through the allocation code. It's not helped that xfs_alloc_ag_vextent() can actually allocate from the AGFL itself, but there's special code to prevent AGFL prep allocations from allocating from the free list it's trying to prep. The naming is also not consistent: args->wasfromfl is true when we allocated _from_ the free list, but the indication that we are allocating _for_ the free list is via checking that (args->resv == XFS_AG_RESV_AGFL). So, lets make this "allocation required for allocation" situation clear by moving it all inside xfs_alloc_ag_vextent(). The freelist allocation is a specific XFS_ALLOCTYPE_THIS_AG allocation, which translated directly to xfs_alloc_ag_vextent_size() allocation. This enables us to replace __xfs_alloc_vextent_this_ag() with a call to xfs_alloc_ag_vextent(), and we drive the freelist fixing further into the per-ag allocation algorithm. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 2edf06a50f5bbe664283f3c55c480fc013221d70 Author: Dave Chinner Date: Mon Feb 13 09:14:53 2023 +1100 xfs: factor xfs_alloc_vextent_this_ag() for _iterate_ags() The core of the per-ag iteration is effectively doing a "this ag" allocation on one AG at a time. Use the same code to implement the core "this ag" allocation in both xfs_alloc_vextent_this_ag() and xfs_alloc_vextent_iterate_ags(). This means we only call xfs_alloc_ag_vextent() from one place so we can easily collapse the call stack in future patches. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit ecd788a92460eef44c5444290757bfd0f38d91b4 Author: Dave Chinner Date: Mon Feb 13 09:14:53 2023 +1100 xfs: rework xfs_alloc_vextent() It's a multiplexing mess that can be greatly simplified, and really needs to be simplified to allow active per-ag references to propagate from initial AG selection code the the bmapi code. This splits the code out into separate a parameter checking function, an iterator function, and allocation completion functions and then implements the individual policies using these functions. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 76257a15873ccce817e0c4441f6bb66fb8f8201c Author: Dave Chinner Date: Mon Feb 13 09:14:53 2023 +1100 xfs: introduce xfs_for_each_perag_wrap() In several places we iterate every AG from a specific start agno and wrap back to the first AG when we reach the end of the filesystem to continue searching. We don't have a primitive for this iteration yet, so add one for conversion of these algorithms to per-ag based iteration. The filestream AG select code is a mess, and this initially makes it worse. The per-ag selection needs to be driven completely into the filestream code to clean this up and it will be done in a future patch that makes the filestream allocator use active per-ag references correctly. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 7ac2ff8bb3713c7cb43564c04384af2ee7cc1f8d Author: Dave Chinner Date: Mon Feb 13 09:14:52 2023 +1100 xfs: perags need atomic operational state We currently don't have any flags or operational state in the xfs_perag except for the pagf_init and pagi_init flags. And the agflreset flag. Oh, there's also the pagf_metadata and pagi_inodeok flags, too. For controlling per-ag operations, we are going to need some atomic state flags. Hence add an opstate field similar to what we already have in the mount and log, and convert all these state flags across to atomic bit operations. Signed-off-by: Dave Chinner Reviewed-by: Allison Henderson Reviewed-by: Darrick J. Wong commit 20a5eab49d354a2837e0af3f07f92a104de52804 Author: Dave Chinner Date: Mon Feb 13 09:14:52 2023 +1100 xfs: convert xfs_ialloc_next_ag() to an atomic This is currently a spinlock lock protected rotor which can be implemented with a single atomic operation. Change it to be more efficient and get rid of the m_agirotor_lock. Noticed while converting the inode allocation AG selection loop to active perag references. Signed-off-by: Dave Chinner Reviewed-by: Allison Henderson Reviewed-by: Darrick J. Wong commit bab8b795185bf37801a4f7ee5c321eee288c2f10 Author: Dave Chinner Date: Mon Feb 13 09:14:52 2023 +1100 xfs: inobt can use perags in many more places than it does Lots of code in the inobt infrastructure is passed both xfs_mount and perags. We only need perags for the per-ag inode allocation code, so reduce the duplication by passing only the perags as the primary object. This ends up reducing the code size by a bit: text data bss dec hex filename orig 1138878 323979 548 1463405 16546d (TOTALS) patched 1138709 323979 548 1463236 1653c4 (TOTALS) Signed-off-by: Dave Chinner Reviewed-by: Allison Henderson Reviewed-by: Darrick J. Wong commit dedab3e4379d298ed60b6c52a15168807b48d57a Author: Dave Chinner Date: Mon Feb 13 09:14:52 2023 +1100 xfs: use active perag references for inode allocation Convert the inode allocation routines to use active perag references or references held by callers rather than grab their own. Also drive the perag further inwards to replace xfs_mounts when doing operations on a specific AG. Signed-off-by: Dave Chinner Reviewed-by: Allison Henderson Reviewed-by: Darrick J. Wong commit 498f0adbcdb6a68403bfb9645a7555b789a7fee4 Author: Dave Chinner Date: Mon Feb 13 09:14:52 2023 +1100 xfs: convert xfs_imap() to take a perag Callers have referenced perags but they don't pass it into xfs_imap() so it takes it's own reference. Fix that so we can change inode allocation over to using active references. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 368e2d09b41caa5b44a61bb518c362f46d6d615c Author: Dave Chinner Date: Mon Feb 13 09:14:52 2023 +1100 xfs: rework the perag trace points to be perag centric So that they all output the same information in the traces to make debugging refcount issues easier. This means that all the lookup/drop functions no longer need to use the full memory barrier atomic operations (atomic*_return()) so will have less overhead when tracing is off. The set/clear tag tracepoints no longer abuse the reference count to pass the tag - the tag being cleared is obvious from the _RET_IP_ that is recorded in the trace point. Signed-off-by: Dave Chinner Reviewed-by: Allison Henderson Reviewed-by: Darrick J. Wong commit c4d5660afbdcd3f0fa3bbf563e059511fba8445f Author: Dave Chinner Date: Mon Feb 13 09:14:42 2023 +1100 xfs: active perag reference counting We need to be able to dynamically remove instantiated AGs from memory safely, either for shrinking the filesystem or paging AG state in and out of memory (e.g. supporting millions of AGs). This means we need to be able to safely exclude operations from accessing perags while dynamic removal is in progress. To do this, introduce the concept of active and passive references. Active references are required for high level operations that make use of an AG for a given operation (e.g. allocation) and pin the perag in memory for the duration of the operation that is operating on the perag (e.g. transaction scope). This means we can fail to get an active reference to an AG, hence callers of the new active reference API must be able to handle lookup failure gracefully. Passive references are used in low level code, where we might need to access the perag structure for the purposes of completing high level operations. For example, buffers need to use passive references because: - we need to be able to do metadata IO during operations like grow and shrink transactions where high level active references to the AG have already been blocked - buffers need to pin the perag until they are reclaimed from memory, something that high level code has no direct control over. - unused cached buffers should not prevent a shrink from being started. Hence we have active references that will form exclusion barriers for operations to be performed on an AG, and passive references that will prevent reclaim of the perag until all objects with passive references have been reclaimed themselves. This patch introduce xfs_perag_grab()/xfs_perag_rele() as the API for active AG reference functionality. We also need to convert the for_each_perag*() iterators to use active references, which will start the process of converting high level code over to using active references. Conversion of non-iterator based code to active references will be done in followup patches. Note that the implementation using reference counting is really just a development vehicle for the API to ensure we don't have any leaks in the callers. Once we need to remove perag structures from memory dyanmically, we will need a much more robust per-ag state transition mechanism for preventing new references from being taken while we wait for existing references to drain before removal from memory can occur.... Signed-off-by: Dave Chinner Reviewed-by: Allison Henderson Reviewed-by: Darrick J. Wong commit eb4d8bac03bc20c5f2975da325e2d669882ef03e Author: Heiner Kallweit Date: Mon Dec 19 19:16:08 2022 +0100 i2c: i801: add helper i801_set_hstadd() Factor out setting SMBHSTADD to a helper. The current code makes the assumption that constant I2C_SMBUS_READ has bit 0 set, that's not ideal. Therefore let the new helper explicitly check for I2C_SMBUS_READ. Signed-off-by: Heiner Kallweit Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit e98a3bc0403bc60e949b565f3b36c6aed399a976 Author: Heiner Kallweit Date: Mon Dec 19 19:15:25 2022 +0100 i2c: i801: make FEATURE_BLOCK_PROC dependent on FEATURE_BLOCK_BUFFER According to the datasheet the block process call requires block buffer mode. The user may disable block buffer mode by module parameter disable_features, in such a case we have to clear FEATURE_BLOCK_PROC. Signed-off-by: Heiner Kallweit Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit f0c8f0ee0787bb6a7f56bc89a7800ffe1ccdfea9 Author: Heiner Kallweit Date: Mon Dec 19 19:14:43 2022 +0100 i2c: i801: make FEATURE_HOST_NOTIFY dependent on FEATURE_IRQ Host notification uses an interrupt, therefore it makes sense only if interrupts are enabled. Make this dependency explicit by removing FEATURE_HOST_NOTIFY if FEATURE_IRQ isn't set. Signed-off-by: Heiner Kallweit Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit c467d919f0da1c83ebee5087e166cf2bcfbb6f6d Author: Heiner Kallweit Date: Mon Dec 19 19:13:44 2022 +0100 i2c: i801: improve interrupt handler Not sure if it can happen, but better play safe: If SMBHSTSTS_BYTE_DONE and an error flag is set, then don't trust the result and skip calling i801_isr_byte_done(). In addition clear status bit SMBHSTSTS_BYTE_DONE in the main interrupt handler, this allows to simplify the code a little. Signed-off-by: Heiner Kallweit Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit fce55da31d091187555a7af9c055de85f0cea6c4 Author: Alain Volmat Date: Mon Feb 6 22:03:23 2023 +0100 i2c: st: use pm_sleep_ptr to avoid ifdef CONFIG_PM_SLEEP Rely on pm_sleep_ptr when setting the pm ops and get rid of the ifdef CONFIG_PM_SLEEP around suspend/resume functions. Signed-off-by: Alain Volmat Signed-off-by: Wolfram Sang commit 001e944fc16b1ba520e5ec74e3af4c16d3f6acc3 Author: Kunihiko Hayashi Date: Thu Feb 9 10:43:40 2023 +0900 dt-bindings: i2c: uniphier: Add resets property UniPhier I2C controller allows reset control support. Add resets property to the controller as optional. Signed-off-by: Kunihiko Hayashi Acked-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang commit 640587182066f75d3e8b62522685041f00ffbbbb Author: Tinghan Shen Date: Fri Feb 10 11:13:54 2023 +0800 remoteproc: mediatek: Check the SCP image format Do a sanity check on the SCP image before loading it to avoid driver crashes. Signed-off-by: Tinghan Shen Reviewed-by: Matthias Brugger Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230210031354.1335-1-tinghan.shen@mediatek.com Signed-off-by: Mathieu Poirier commit 91d088a0304941b88c915cc800617ff4068cdd39 Author: Jason Gunthorpe Date: Thu Feb 9 12:51:36 2023 -0400 RDMA/umem: Remove unused 'work' member from struct ib_umem It is not used now. Fixes: b95df5e3e459 ("drivers/IB,core: reduce scope of mmap_sem") Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/0-v1-22a2667fa089+a3-umem_work_jgg@nvidia.com Reviewed-by: Devesh Sharma Signed-off-by: Leon Romanovsky commit a1ffd3c46267ee5c807acd780e15df9bb692223f Author: Vadim Pasternak Date: Sun Feb 12 16:57:30 2023 +0200 hwmon: (mlxreg-fan) Return zero speed for broken fan Currently for broken fan driver returns value calculated based on error code (0xFF) in related fan speed register. Thus, for such fan user gets fan{n}_fault to 1 and fan{n}_input with misleading value. Add check for fan fault prior return speed value and return zero if fault is detected. Fixes: 65afb4c8e7e4 ("hwmon: (mlxreg-fan) Add support for Mellanox FAN driver") Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20230212145730.24247-1-vadimp@nvidia.com Signed-off-by: Guenter Roeck commit d1c0e1587e6874cec3e3615097b907a9186505c8 Author: Benjamin Marzinski Date: Tue Jan 31 15:22:57 2023 -0600 dm table: check that a dm device doesn't reference itself If a DM device's table references itself, it will crash the kernel with an infinite recursion. Check for a self-reference in dm_get_device(). This is a quick check, but it won't catch more complicated circular references. Signed-off-by: Benjamin Marzinski Signed-off-by: Mike Snitzer commit efdd3c3375aa09dd52284b645cbf0eb367f0e258 Author: Yu Zhe Date: Mon Feb 6 11:27:39 2023 +0800 dm raid: fix some spelling mistakes in comments Signed-off-by: Yu Zhe Signed-off-by: Mike Snitzer commit 00bdbc9a860152cafc0bcfa4fc70f38401101ebc Author: Thomas Weißschuh Date: Thu Dec 22 23:43:31 2022 +0000 watchdog: wdat_wdt: Avoid unimplemented get_timeleft As per the specification the action QUERY_COUNTDOWN_PERIOD is optional. If the action is not implemented by the physical device the driver would always report "0" from get_timeleft(). Avoid confusing userspace by only providing get_timeleft() when implemented by the hardware. Signed-off-by: Thomas Weißschuh Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221221-wdat_wdt-timeleft-v1-1-8e8a314c36cc@weissschuh.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 98b7a1613011d9d5ec76841a2a5a689c3010d1f3 Author: Christophe JAILLET Date: Sat Dec 31 08:57:22 2022 +0100 watchdog: apple: 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 Reviewed-by: Sven Peter Link: https://lore.kernel.org/r/6f312af6160d1e10b616c9adbd1fd8f822db964d.1672473415.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 8c5210dbdf7e924b435c892d979472191d9cec95 Author: Christophe JAILLET Date: Fri Dec 30 17:32:42 2022 +0100 watchdog: visconti: 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/13e8cdf17556da111d1d98a8fe0b1dc1c78007e2.1672417940.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit a42912ac400fdc05cffb6bc1e263eff466bbf8b2 Author: Christophe JAILLET Date: Fri Dec 30 17:36:20 2022 +0100 watchdog: rzn1: 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/b1f8b5453791035ad534bd5ed36b49798ff4d9b2.1672418166.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 1a8d192bccb2fbbdcfcd13e89e86ab8a0945ea75 Author: Christophe JAILLET Date: Fri Dec 30 17:49:47 2022 +0100 watchdog: qcom: 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/7c2d5f3815949faf6d3a0237a7b5f272f00a7ae9.1672418969.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit cd9e5d04dc47264e1101ed134e383020ab45a272 Author: Christophe JAILLET Date: Sat Dec 31 09:00:31 2022 +0100 watchdog: armada_37xx: 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/ccb096879a1309b9918ae956d6bdb9668c69bcda.1672473617.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit be80ae3d799dab1b46c661158b2b5d6695258178 Author: Christophe JAILLET Date: Sat Dec 31 09:10:17 2022 +0100 watchdog: bcm7038: 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 Acked-by: Florian Fainelli Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/9c055911e9f557b7239000c8e6cfa0cc393a19e9.1672474203.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 6cc0768ba6f5293a4435612164a2cfbf2edbd025 Author: Christophe JAILLET Date: Fri Dec 30 17:41:31 2022 +0100 watchdog: rtd119x: 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/14b521b821279bc5111dc80b55d0936c5767c737.1672418470.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit f3a0dd648961f09936278752a8e9299a55f82bc5 Author: Christophe JAILLET Date: Sat Dec 31 11:59:57 2022 +0100 watchdog: imx7ulp: 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/f23a2cf84958adca255b82fd688e7cee0461760f.1672484376.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 0a03207205f95abd90c8e1abb00c158066560ed2 Author: Christophe JAILLET Date: Sat Dec 31 11:37:39 2022 +0100 watchdog: davinci: 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/6a4cf8e8b9d8f555c77395ba2ecadc205553774d.1672483046.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 2cf46c636f4010baf696bb6afa43bebb2aa30a7a Author: Christophe JAILLET Date: Sat Dec 31 13:34:44 2022 +0100 watchdog: meson_gxbb: 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 Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/6c5948373d309408095c1a098b7b4c491c5265f7.1672490071.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 616a2fe3cda63d4e6eb3a29f925f14b3766c633e Author: Christophe JAILLET Date: Sat Dec 31 09:12:28 2022 +0100 watchdog: cadence: 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/615c6c3c46c3ee8e3136725af0ab0b51e1298091.1672474336.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit c4b8e92bc1a8d860ca53a41c25cd84fa03efaf50 Author: Christophe JAILLET Date: Sat Dec 31 11:53:34 2022 +0100 watchdog: imgpdc: 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/1f8d1ce1e6a63c507a291aea624b1337326cc563.1672483996.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 4de0224c6fbebfa4018a640ec34e5c160dffb959 Author: Christophe JAILLET Date: Sat Dec 31 13:57:49 2022 +0100 watchdog: of_xilinx_wdt: 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 Acked-by: Michal Simek Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/2b041dc8230a4ed255051bb2d323da8a51a8d0be.1672491445.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 5eb3fb95eab28a6dbcd2eab6898e03af6658ee0e Author: Christophe JAILLET Date: Sat Dec 31 13:26:09 2022 +0100 watchdog: lpc18xx: 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/d4c675190d3ddfbba5c354edb4274757f9117304.1672489554.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e0912ea8714deb598c7763ec60c9ba83b157acf7 Author: Christophe JAILLET Date: Sat Dec 31 15:20:29 2022 +0100 watchdog: pic32-dmt: 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/f9a4dcfc6d31bd9c1417e2d97a40cc2c1dbc6f30.1672496405.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 7f7f8ad0725cf31af68aaccccee6d24b8c886679 Author: Christophe JAILLET Date: Sat Dec 31 15:22:57 2022 +0100 watchdog: pic32-wdt: 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/4335b4201b535ebc749a98bad0b99e3cb5317c39.1672496563.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit a8a9b98057458cfcbf145af647916ca9f1a63ccb Author: Christophe JAILLET Date: Sat Dec 31 15:25:31 2022 +0100 watchdog: pnx4008: 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/61f4e39db4c88408ee0149580e9aa925b784bc93.1672496714.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 3c22939eb345952b5c814df9cc6f9b2d56982453 Author: Christophe JAILLET Date: Sat Dec 31 16:02:17 2022 +0100 watchdog: realtek_otto: 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 Acked-by: Sander Vanheule Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/5e4255782fbb43d1b4b5cd03bd12d7a184497134.1672498920.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit a224764f97d28f1132cab02b79ae4c08a6de471e Author: Allen-KH Cheng Date: Tue Jan 17 09:40:23 2023 +0800 watchdog: mtk_wdt: Add reset_by_toprgu support In some cases, the MediaTek watchdog requires the TOPRGU to reset timer after system resets. Provide a reset_by_toprgu parameter for configuration. Signed-off-by: Allen-KH Cheng Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230117014023.2993-3-allen-kh.cheng@mediatek.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 9b30eac1b35a448081165cd906daf939d8750bfb Author: Allen-KH Cheng Date: Tue Jan 17 09:40:22 2023 +0800 dt-bindings: watchdog: mtk-wdt: Add reset-by-toprgu support In some applications, the mtk-wdt requires the TOPRGU (Top Reset Generation Unit) to reset timer after system resets. Add optional mediatek,reset-by-toprgu property to enable it. Signed-off-by: Allen-KH Cheng Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230117014023.2993-2-allen-kh.cheng@mediatek.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 91361b5175d2b3704f7e436d0071893c839e1199 Author: Russell Currey Date: Fri Feb 10 19:03:58 2023 +1100 powerpc/pseries: Pass PLPKS password on kexec Before interacting with the PLPKS, we ask the hypervisor to generate a password for the current boot, which is then required for most further PLPKS operations. If we kexec into a new kernel, the new kernel will try and fail to generate a new password, as the password has already been set. Pass the password through to the new kernel via the device tree, in /chosen/ibm,plpks-pw. Check for the presence of this property before trying to generate a new password - if it exists, use the existing password and remove it from the device tree. This only works with the kexec_file_load() syscall, not the older kexec_load() syscall, however if you're using Secure Boot then you want to be using kexec_file_load() anyway. Signed-off-by: Russell Currey Signed-off-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-24-ajd@linux.ibm.com commit 9ee76bd5c7e39b622660cc14833ead1967f2038d Author: Russell Currey Date: Fri Feb 10 19:03:57 2023 +1100 powerpc/pseries: Add helper to get PLPKS password length Add helper function to get the PLPKS password length. This will be used in a later patch to support passing the password between kernels over kexec. Signed-off-by: Russell Currey Signed-off-by: Andrew Donnellan Reviewed-by: Stefan Berger Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-23-ajd@linux.ibm.com commit ca4f1d221c84fe364517b15af65f3f0e4ce9719a Author: Andrew Donnellan Date: Fri Feb 10 19:03:56 2023 +1100 powerpc/pseries: Clarify warning when PLPKS password already set When the H_PKS_GEN_PASSWORD hcall returns H_IN_USE, operations that require authentication (i.e. anything other than reading a world-readable variable) will not work. The current error message doesn't explain this clearly enough. Reword it to emphasise that authenticated operations will fail. Signed-off-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-22-ajd@linux.ibm.com commit 46b2cbebac1e862e4c8317aa26e7d7d632242c2f Author: Andrew Donnellan Date: Fri Feb 10 19:03:55 2023 +1100 powerpc/pseries: Turn PSERIES_PLPKS into a hidden option It seems a bit unnecessary for the PLPKS code to have a user-visible config option when it doesn't do anything on its own, and there's existing options for enabling Secure Boot-related features. It should be enabled by PPC_SECURE_BOOT, which will eventually be what uses PLPKS to populate keyrings. However, we can't get of the separate option completely, because it will also be used for SED Opal purposes. Change PSERIES_PLPKS into a hidden option, which is selected by PPC_SECURE_BOOT. Signed-off-by: Andrew Donnellan Signed-off-by: Russell Currey Reviewed-by: Stefan Berger Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-21-ajd@linux.ibm.com commit 0cf2cc1fe4e2e7a37da077cdd3fba5cfd9a6a36c Author: Andrew Donnellan Date: Fri Feb 10 19:03:54 2023 +1100 powerpc/pseries: Make caller pass buffer to plpks_read_var() Currently, plpks_read_var() allocates a buffer to pass to the H_PKS_READ_OBJECT hcall, then allocates another buffer into which the data is copied, and returns that buffer to the caller. This is a bit over the top - while we probably still want to allocate a separate buffer to pass to the hypervisor in the hcall, we can let the caller allocate the final buffer and specify the size. Don't allocate var->data in plpks_read_var(), instead expect the caller to allocate it. If the caller needs to discover the size, it can set var->data to NULL and var->datalen will be populated. Update header file to document this. Suggested-by: Michael Ellerman Signed-off-by: Andrew Donnellan Signed-off-by: Russell Currey Reviewed-by: Stefan Berger Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-20-ajd@linux.ibm.com commit ebdcd42347157647ffe6c4d2808e4e5c146475d3 Author: Russell Currey Date: Fri Feb 10 19:03:53 2023 +1100 powerpc/pseries: Log hcall return codes for PLPKS debug The plpks code converts hypervisor return codes into their Linux equivalents so that users can understand them. Having access to the original return codes is really useful for debugging, so add a pr_debug() so we don't lose information from the conversion. Signed-off-by: Russell Currey Signed-off-by: Andrew Donnellan Reviewed-by: Stefan Berger Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-19-ajd@linux.ibm.com commit 899d9b8fee66da820eadc60b2a70090eb83db761 Author: Nayna Jain Date: Fri Feb 10 19:03:52 2023 +1100 powerpc/pseries: Implement signed update for PLPKS objects The Platform Keystore provides a signed update interface which can be used to create, replace or append to certain variables in the PKS in a secure fashion, with the hypervisor requiring that the update be signed using the Platform Key. Implement an interface to the H_PKS_SIGNED_UPDATE hcall in the plpks driver to allow signed updates to PKS objects. (The plpks driver doesn't need to do any cryptography or otherwise handle the actual signed variable contents - that will be handled by userspace tooling.) Signed-off-by: Nayna Jain [ajd: split patch, add timeout handling and misc cleanups] Co-developed-by: Andrew Donnellan Signed-off-by: Andrew Donnellan Signed-off-by: Russell Currey Reviewed-by: Stefan Berger Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-18-ajd@linux.ibm.com commit 119da30d037dced29118fb90afe683ff50313386 Author: Nayna Jain Date: Fri Feb 10 19:03:51 2023 +1100 powerpc/pseries: Expose PLPKS config values, support additional fields The plpks driver uses the H_PKS_GET_CONFIG hcall to retrieve configuration and status information about the PKS from the hypervisor. Update _plpks_get_config() to handle some additional fields. Add getter functions to allow the PKS configuration information to be accessed from other files. Validate that the values we're getting comply with the spec. While we're here, move the config struct in _plpks_get_config() off the stack - it's getting large and we also need to make sure it doesn't cross a page boundary. Signed-off-by: Nayna Jain [ajd: split patch, extend to support additional v3 API fields, minor fixes] Co-developed-by: Andrew Donnellan Signed-off-by: Andrew Donnellan Signed-off-by: Russell Currey Reviewed-by: Stefan Berger Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-17-ajd@linux.ibm.com commit 3def7a3e7c2ce2ab5e5c54561da7125206851be4 Author: Russell Currey Date: Fri Feb 10 19:03:50 2023 +1100 powerpc/pseries: Move PLPKS constants to header file Move the constants defined in plpks.c to plpks.h, and standardise their naming, so that PLPKS consumers can make use of them later on. Signed-off-by: Russell Currey Co-developed-by: Andrew Donnellan Signed-off-by: Andrew Donnellan Reviewed-by: Stefan Berger Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-16-ajd@linux.ibm.com commit 90b74e305d6b5a444b1283dd7ad1caf6acaa0340 Author: Russell Currey Date: Fri Feb 10 19:03:49 2023 +1100 powerpc/pseries: Move plpks.h to include directory Move plpks.h from platforms/pseries/ to include/asm/. This is necessary for later patches to make use of the PLPKS from code in other subsystems. Signed-off-by: Russell Currey Signed-off-by: Andrew Donnellan Reviewed-by: Stefan Berger Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-15-ajd@linux.ibm.com commit c96db155ebc6be868d5dde1b5caf6879c181cda4 Author: Andrew Donnellan Date: Fri Feb 10 19:03:48 2023 +1100 powerpc/secvar: Don't print error on ENOENT when reading variables If attempting to read the size or data attributes of a non-existent variable (which will be possible after a later patch to expose the PLPKS via the secvar interface), don't spam the kernel log with error messages. Only print errors for return codes that aren't ENOENT. Reported-by: Sudhakar Kuppusamy Signed-off-by: Andrew Donnellan Reviewed-by: Stefan Berger Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-14-ajd@linux.ibm.com commit 6d64c497a31bd888110785def44529ebb96bce49 Author: Andrew Donnellan Date: Fri Feb 10 19:03:47 2023 +1100 powerpc/secvar: Warn when PAGE_SIZE is smaller than max object size Due to sysfs constraints, when writing to a variable, we can only handle writes of up to PAGE_SIZE. It's possible that the maximum object size is larger than PAGE_SIZE, in which case, print a warning on boot so that the user is aware. Signed-off-by: Andrew Donnellan Signed-off-by: Russell Currey Reviewed-by: Stefan Berger Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-13-ajd@linux.ibm.com commit 50a466bf3e6f6f177dc0aeefa46a2f8927075a1d Author: Andrew Donnellan Date: Fri Feb 10 19:03:46 2023 +1100 powerpc/secvar: Allow backend to populate static list of variable names Currently, the list of variables is populated by calling secvar_ops->get_next() repeatedly, which is explicitly modelled on the OPAL API (including the keylen parameter). For the upcoming PLPKS backend, we have a static list of variable names. It is messy to fit that into get_next(), so instead, let the backend put a NULL-terminated array of variable names into secvar_ops->var_names, which will be used if get_next() is undefined. Signed-off-by: Andrew Donnellan Signed-off-by: Russell Currey Reviewed-by: Stefan Berger Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-12-ajd@linux.ibm.com commit 86b6c0ae2caee9cadee1256d31b204ea54cb55c0 Author: Russell Currey Date: Fri Feb 10 19:03:45 2023 +1100 powerpc/secvar: Extend sysfs to include config vars The forthcoming pseries consumer of the secvar API wants to expose a number of config variables. Allowing secvar implementations to provide their own sysfs attributes makes it easy for consumers to expose what they need to. This is not being used by the OPAL secvar implementation at present, and the config directory will not be created if no attributes are set. Signed-off-by: Russell Currey Co-developed-by: Andrew Donnellan Signed-off-by: Andrew Donnellan Reviewed-by: Stefan Berger Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-11-ajd@linux.ibm.com commit caefd3b77450e330845755ea57add2315fd5e4d9 Author: Andrew Donnellan Date: Fri Feb 10 19:03:44 2023 +1100 powerpc/secvar: Clean up init error messages Remove unnecessary prefixes from error messages in secvar_sysfs_init() (the file defines pr_fmt, so putting "secvar:" in every message is unnecessary). Make capitalisation and punctuation more consistent. Signed-off-by: Andrew Donnellan Signed-off-by: Russell Currey Reviewed-by: Stefan Berger Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-10-ajd@linux.ibm.com commit e02407944052554c1685e11e56175147d1ac56b6 Author: Russell Currey Date: Fri Feb 10 19:03:43 2023 +1100 powerpc/secvar: Handle max object size in the consumer Currently the max object size is handled in the core secvar code with an entirely OPAL-specific implementation, so create a new max_size() op and move the existing implementation into the powernv platform. Should be no functional change. Signed-off-by: Russell Currey Signed-off-by: Andrew Donnellan Reviewed-by: Stefan Berger Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-9-ajd@linux.ibm.com commit ec2f40bd004b4b9142469282d4a6ce9afa22f9c0 Author: Russell Currey Date: Fri Feb 10 19:03:42 2023 +1100 powerpc/secvar: Handle format string in the consumer The code that handles the format string in secvar-sysfs.c is entirely OPAL specific, so create a new "format" op in secvar_operations to make the secvar code more generic. No functional change. Signed-off-by: Russell Currey Signed-off-by: Andrew Donnellan Reviewed-by: Stefan Berger Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-8-ajd@linux.ibm.com commit 16943a2faf94ef671e60c7577511c0d119fbdfc8 Author: Russell Currey Date: Fri Feb 10 19:03:41 2023 +1100 powerpc/secvar: Use sysfs_emit() instead of sprintf() The secvar format string and object size sysfs files are both ASCII text, and should use sysfs_emit(). No functional change. Suggested-by: Greg Kroah-Hartman Signed-off-by: Russell Currey Signed-off-by: Andrew Donnellan Reviewed-by: Stefan Berger Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-7-ajd@linux.ibm.com commit 26149b02021158248b13e323f06372d87f076883 Author: Russell Currey Date: Fri Feb 10 19:03:40 2023 +1100 powerpc/secvar: Warn and error if multiple secvar ops are set The secvar code only supports one consumer at a time. Multiple consumers aren't possible at this point in time, but we'd want it to be obvious if it ever could happen. Signed-off-by: Russell Currey Co-developed-by: Andrew Donnellan Signed-off-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-6-ajd@linux.ibm.com commit 53cea34b0a0a03568e189f8dfe2eb06f938986c8 Author: Michael Ellerman Date: Fri Feb 10 19:03:39 2023 +1100 powerpc/secvar: Use u64 in secvar_operations There's no reason for secvar_operations to use uint64_t vs the more common kernel type u64. The types are compatible, but they require different printk format strings which can lead to confusion. Change all the secvar related routines to use u64. Reviewed-by: Russell Currey Reviewed-by: Andrew Donnellan Signed-off-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-5-ajd@linux.ibm.com commit c9fd2952754a03b2c14433c0318f4b46e9c0f2ef Author: Russell Currey Date: Fri Feb 10 19:03:38 2023 +1100 powerpc/secvar: Fix incorrect return in secvar_sysfs_load() secvar_ops->get_next() returns -ENOENT when there are no more variables to return, which is expected behaviour. Fix this by returning 0 if get_next() returns -ENOENT. This fixes an issue introduced in commit bd5d9c743d38 ("powerpc: expose secure variables to userspace via sysfs"), but the return code of secvar_sysfs_load() was never checked so this issue never mattered. Signed-off-by: Russell Currey Signed-off-by: Andrew Donnellan Reviewed-by: Stefan Berger Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-4-ajd@linux.ibm.com commit fcf63d6b8ab9b12c2ce1b4bde12a3c391029c998 Author: Andrew Donnellan Date: Fri Feb 10 19:03:37 2023 +1100 powerpc/pseries: Fix alignment of PLPKS structures and buffers A number of structures and buffers passed to PKS hcalls have alignment requirements, which could on occasion cause problems: - Authorisation structures must be 16-byte aligned and must not cross a page boundary - Label structures must not cross page boundaries - Password output buffers must not cross page boundaries To ensure correct alignment, we adjust the allocation size of each of these structures/buffers to be the closest power of 2 that is at least the size of the structure/buffer (since kmalloc() guarantees that an allocation of a power of 2 size will be aligned to at least that size). Reported-by: Benjamin Gray Fixes: 2454a7af0f2a ("powerpc/pseries: define driver for Platform KeyStore") Signed-off-by: Andrew Donnellan Reviewed-by: Russell Currey Signed-off-by: Russell Currey Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-3-ajd@linux.ibm.com commit f74dcbfd27c647af9b7b83f3711c63712c677abd Author: Andrew Donnellan Date: Fri Feb 10 19:03:36 2023 +1100 powerpc/pseries: Fix handling of PLPKS object flushing timeout plpks_confirm_object_flushed() uses the H_PKS_CONFIRM_OBJECT_FLUSHED hcall to check whether changes to an object in the Platform KeyStore have been flushed to non-volatile storage. The hcall returns two output values, the return code and the flush status. plpks_confirm_object_flushed() polls the hcall until either the flush status has updated, the return code is an error, or a timeout has been exceeded. While we're still polling, the hcall is returning H_SUCCESS (0) as the return code. In the timeout case, this means that upon exiting the polling loop, rc is 0, and therefore 0 is returned to the user. Handle the timeout case separately and return ETIMEDOUT if triggered. Fixes: 2454a7af0f2a ("powerpc/pseries: define driver for Platform KeyStore") Reported-by: Benjamin Gray Signed-off-by: Andrew Donnellan Tested-by: Russell Currey Reviewed-by: Russell Currey Signed-off-by: Russell Currey Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230210080401.345462-2-ajd@linux.ibm.com commit fc8a898cfdbb0e63cfde547715c2031de22e7893 Merge: 544f823ec7a34 2ea31e2e62bbc Author: Michael Ellerman Date: Sun Feb 12 22:11:56 2023 +1100 Merge branch 'fixes' into next Merge our fixes branch to bring in some changes that conflict with upcoming next content. commit 544f823ec7a34332550f22735959d3e1ffcf4684 Author: Geoff Levand Date: Tue Jan 3 17:51:03 2023 +0000 powerpc/ps3: Refresh ps3_defconfig Refresh ps3_defconfig for v6.2. Signed-off-by: Geoff Levand Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/99e87549b17feca3494e9df6f4def04a9ec7c042.1672767868.git.geoff@infradead.org commit 5705c6d97efc4aa9478fe2887fd911f60ddf17e5 Author: Geoff Levand Date: Tue Jan 3 17:51:03 2023 +0000 powerpc/ps3: Change updateboltedpp() panic to info Commit fdacae8a8402 ("powerpc: Activate CONFIG_STRICT_KERNEL_RWX by default") causes ps3_hpte_updateboltedpp() to be called. The correct fix would be to implement updateboltedpp() for PS3, but it's not clear if that's possible. As a stop-gap, change the panic statment in ps3_hpte_updateboltedpp() to a pr_info statement so that bootup can continue. Signed-off-by: Geoff Levand [mpe: Flesh out change log] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/2df879d982809c05b0dfade57942fe03dbe9e7de.1672767868.git.geoff@infradead.org commit 6f0926c00565a91f3bd7ca1aa05db307daed5e0f Author: Rohan McLure Date: Mon Feb 6 13:18:01 2023 +1100 powerpc/kcsan: Add KCSAN Support Enable HAVE_ARCH_KCSAN for 64-bit Book3S, permitting use of the kernel concurrency sanitiser through the CONFIG_KCSAN_* kconfig options. KCSAN requires compiler builtins __atomic_* 64-bit values, and so only report support on 64-bit. See documentation in Documentation/dev-tools/kcsan.rst for more information. Signed-off-by: Rohan McLure [mpe: Limit to Book3S to avoid build failure on Book3E] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230206021801.105268-6-rmclure@linux.ibm.com commit 3fb901cdc9e4ab01aa32abe93004f94cdfe75648 Author: Oliver Upton Date: Sat Feb 11 19:07:42 2023 +0000 KVM: arm64: nv: Use reg_to_encoding() to get sysreg ID Avoid open-coding and just use the helper to encode the ID from the sysreg table entry. No functional change intended. Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20230211190742.49843-1-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit a1f925bc4fa899b3c0f2dcbc432d572c36e74e71 Author: Arnd Bergmann Date: Sat Feb 11 22:00:06 2023 +0100 mmc: omap: drop TPS65010 dependency The original TPS65010 dependency was only needed for MACH_OMAP_H2, which is now gone, but I messed up the conversion when I removed that symbol. Now the missing TPS65010 causes a boot failure on other machines such as the SX1. Reported-by: Guenter Roeck Fixes: 0d7bb85e9413 ("ARM: omap1: remove unused board files") Signed-off-by: Arnd Bergmann commit c828441f21ddc819a28b5723a72e3c840e9de1c6 Author: Kan Liang Date: Fri Feb 10 11:02:38 2023 -0800 perf/x86/intel/uncore: Add Meteor Lake support The uncore subsystem for Meteor Lake is similar to the previous Alder Lake. The main difference is that MTL provides PMU support for different tiles, while ADL only provides PMU support for the whole package. On ADL, there are CBOX, ARB, and clockbox uncore PMON units. On MTL, they are split into CBOX/HAC_CBOX, ARB/HAC_ARB, and cncu/sncu which provides a fixed counter for clockticks. Also, new MSR addresses are introduced on MTL. The IMC uncore PMON is the same as Alder Lake. Add new PCIIDs of IMC for Meteor Lake. Signed-off-by: Kan Liang Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230210190238.1726237-1-kan.liang@linux.intel.com commit 37064583f63eca93c98a9cdf2360485ea05f617a Author: Josh Poimboeuf Date: Fri Feb 10 14:42:02 2023 -0800 x86/entry: Fix unwinding from kprobe on PUSH/POP instruction If a kprobe (INT3) is set on a stack-modifying single-byte instruction, like a single-byte PUSH/POP or a LEAVE, ORC fails to unwind past it: Call Trace: dump_stack_lvl+0x57/0x90 handler_pre+0x33/0x40 [kprobe_example] aggr_pre_handler+0x49/0x90 kprobe_int3_handler+0xe3/0x180 do_int3+0x3a/0x80 exc_int3+0x7d/0xc0 asm_exc_int3+0x35/0x40 RIP: 0010:kernel_clone+0xe/0x3a0 Code: cc e8 16 b2 bf 00 66 0f 1f 44 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 44 00 00 41 57 41 56 41 55 41 54 cc <53> 48 89 fb 48 83 ec 68 4c 8b 27 65 48 8b 04 25 28 00 00 00 48 89 RSP: 0018:ffffc9000074fda0 EFLAGS: 00000206 RAX: 0000000000808100 RBX: ffff888109de9d80 RCX: 0000000000000000 RDX: 0000000000000011 RSI: ffff888109de9d80 RDI: ffffc9000074fdc8 RBP: ffff8881019543c0 R08: ffffffff81127e30 R09: 00000000e71742a5 R10: ffff888104764a18 R11: 0000000071742a5e R12: ffff888100078800 R13: ffff888100126000 R14: 0000000000000000 R15: ffff888100126005 ? __pfx_call_usermodehelper_exec_async+0x10/0x10 ? kernel_clone+0xe/0x3a0 ? user_mode_thread+0x5b/0x80 ? __pfx_call_usermodehelper_exec_async+0x10/0x10 ? call_usermodehelper_exec_work+0x77/0xb0 ? process_one_work+0x299/0x5f0 ? worker_thread+0x4f/0x3a0 ? __pfx_worker_thread+0x10/0x10 ? kthread+0xf2/0x120 ? __pfx_kthread+0x10/0x10 ? ret_from_fork+0x29/0x50 The problem is that #BP saves the pointer to the instruction immediately *after* the INT3, rather than to the INT3 itself. The instruction replaced by the INT3 hasn't actually run, but ORC assumes otherwise and expects the wrong stack layout. Fix it by annotating the #BP exception as a non-signal stack frame, which tells the ORC unwinder to decrement the instruction pointer before looking up the corresponding ORC entry. Reported-by: Chen Zhongjin Signed-off-by: Josh Poimboeuf Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/baafcd3cc1abb14cb757fe081fa696012a5265ee.1676068346.git.jpoimboe@kernel.org commit ffb1b4a41016295e298409c9dbcacd55680bd6d4 Author: Josh Poimboeuf Date: Fri Feb 10 14:42:01 2023 -0800 x86/unwind/orc: Add 'signal' field to ORC metadata Add a 'signal' field which allows unwind hints to specify whether the instruction pointer should be taken literally (like for most interrupts and exceptions) rather than decremented (like for call stack return addresses) when used to find the next ORC entry. Signed-off-by: Josh Poimboeuf Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/d2c5ec4d83a45b513d8fd72fab59f1a8cfa46871.1676068346.git.jpoimboe@kernel.org commit 2bc19066bda340540468ff88c2b1a798983bfd28 Author: Greg Kroah-Hartman Date: Fri Feb 10 11:24:08 2023 +0100 driver core: cpu: don't hand-override the uevent bus_type callback. Instead of having to change the uevent bus_type callback by hand at runtime, set it at build time based on the build configuration options, making this much simpler to maintain and understand (and allow to make the structure constant.) Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230210102408.1083177-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit fd636b6a9bc6034f2e5bb869658898a2b472c037 Author: silviazhao Date: Wed Feb 8 16:27:22 2023 +0800 x86/perf/zhaoxin: Add stepping check for ZXC Some of Nano series processors will lead GP when accessing PMC fixed counter. Meanwhile, their hardware support for PMC has not announced externally. So exclude Nano CPUs from ZXC by checking stepping information. This is an unambiguous way to differentiate between ZXC and Nano CPUs. Following are Nano and ZXC FMS information: Nano FMS: Family=6, Model=F, Stepping=[0-A][C-D] ZXC FMS: Family=6, Model=F, Stepping=E-F OR Family=6, Model=0x19, Stepping=0-3 Fixes: 3a4ac121c2ca ("x86/perf: Add hardware performance events support for Zhaoxin CPU.") Reported-by: Arjan <8vvbbqzo567a@nospam.xutrox.com> Reported-by: Kevin Brace Signed-off-by: silviazhao Signed-off-by: Peter Zijlstra (Intel) Link: https://bugzilla.kernel.org/show_bug.cgi?id=212389 commit 89e97eb8cec0f1af5ebf2380308913256ca7915a Author: Kan Liang Date: Wed Jan 25 12:49:25 2023 -0800 perf/x86/intel/ds: Fix the conversion from TSC to perf time The time order is incorrect when the TSC in a PEBS record is used. $perf record -e cycles:upp dd if=/dev/zero of=/dev/null count=10000 $ perf script --show-task-events perf-exec 0 0.000000: PERF_RECORD_COMM: perf-exec:915/915 dd 915 106.479872: PERF_RECORD_COMM exec: dd:915/915 dd 915 106.483270: PERF_RECORD_EXIT(915:915):(914:914) dd 915 106.512429: 1 cycles:upp: ffffffff96c011b7 [unknown] ([unknown]) ... ... The perf time is from sched_clock_cpu(). The current PEBS code unconditionally convert the TSC to native_sched_clock(). There is a shift between the two clocks. If the TSC is stable, the shift is consistent, __sched_clock_offset. If the TSC is unstable, the shift has to be calculated at runtime. This patch doesn't support the conversion when the TSC is unstable. The TSC unstable case is a corner case and very unlikely to happen. If it happens, the TSC in a PEBS record will be dropped and fall back to perf_event_clock(). Fixes: 47a3aeb39e8d ("perf/x86/intel/pebs: Fix PEBS timestamps overwritten") Reported-by: Namhyung Kim Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/CAM9d7cgWDVAq8-11RbJ2uGfwkKD6fA-OMwOKDrNUrU_=8MgEjg@mail.gmail.com/ commit 7c4a5b89a0b5a57a64b601775b296abf77a9fe97 Author: Pietro Borrello Date: Mon Feb 6 22:33:54 2023 +0000 sched/rt: pick_next_rt_entity(): check list_entry Commit 326587b84078 ("sched: fix goto retry in pick_next_task_rt()") removed any path which could make pick_next_rt_entity() return NULL. However, BUG_ON(!rt_se) in _pick_next_task_rt() (the only caller of pick_next_rt_entity()) still checks the error condition, which can never happen, since list_entry() never returns NULL. Remove the BUG_ON check, and instead emit a warning in the only possible error condition here: the queue being empty which should never happen. Fixes: 326587b84078 ("sched: fix goto retry in pick_next_task_rt()") Signed-off-by: Pietro Borrello Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Phil Auld Reviewed-by: Steven Rostedt (Google) Link: https://lore.kernel.org/r/20230128-list-entry-null-check-sched-v3-1-b1a71bd1ac6b@diag.uniroma1.it commit 7ea98dfa44917a201e76d4fe96bf61d76e60f524 Author: Valentin Schneider Date: Mon Feb 6 14:06:12 2023 +0000 sched/deadline: Add more reschedule cases to prio_changed_dl() I've been tracking down an issue on a ~5.17ish kernel where: CPUx CPUy
[idle task keeps running here until *something* accidentally sets TIF_NEED_RESCHED] On that kernel, it is quite easy to trigger using rt-tests's deadline_test [1] with the test running on isolated CPUs (this reduces the chance of something unrelated setting TIF_NEED_RESCHED on the idle tasks, making the issue even more obvious as the hung task detector chimes in). I haven't been able to reproduce this using a mainline kernel, even if I revert 2972e3050e35 ("tracing: Make trace_marker{,_raw} stream-like") which gets rid of the lock involved in the above test, *but* I cannot convince myself the issue isn't there from looking at the code. Make prio_changed_dl() issue a reschedule if the current task isn't a deadline one. While at it, ensure a reschedule is emitted when a queued-but-not-current task gets boosted with an earlier deadline that current's. [1]: https://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Acked-by: Juri Lelli Link: https://lore.kernel.org/r/20230206140612.701871-1-vschneid@redhat.com commit 829c1651e9c4a6f78398d3e67651cef9bb6b42cc Author: Zhang Qiao Date: Mon Jan 30 13:22:16 2023 +0100 sched/fair: sanitize vruntime of entity being placed When a scheduling entity is placed onto cfs_rq, its vruntime is pulled to the base level (around cfs_rq->min_vruntime), so that the entity doesn't gain extra boost when placed backwards. However, if the entity being placed wasn't executed for a long time, its vruntime may get too far behind (e.g. while cfs_rq was executing a low-weight hog), which can inverse the vruntime comparison due to s64 overflow. This results in the entity being placed with its original vruntime way forwards, so that it will effectively never get to the cpu. To prevent that, ignore the vruntime of the entity being placed if it didn't execute for much longer than the characteristic sheduler time scale. [rkagan: formatted, adjusted commit log, comments, cutoff value] Signed-off-by: Zhang Qiao Co-developed-by: Roman Kagan Signed-off-by: Roman Kagan Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20230130122216.3555094-1-rkagan@amazon.de commit a2e90611b9f425adbbfcdaa5b5e49958ddf6f61b Author: Vincent Guittot Date: Wed Feb 1 15:36:28 2023 +0100 sched/fair: Remove capacity inversion detection Remove the capacity inversion detection which is now handled by util_fits_cpu() returning -1 when we need to continue to look for a potential CPU with better performance. This ends up almost reverting patches below except for some comments: commit da07d2f9c153 ("sched/fair: Fixes for capacity inversion detection") commit aa69c36f31aa ("sched/fair: Consider capacity inversion in util_fits_cpu()") commit 44c7b80bffc3 ("sched/fair: Detect capacity inversion") Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20230201143628.270912-3-vincent.guittot@linaro.org commit e5ed0550c04c5469ecdc1634d8aa18c8609590f0 Author: Vincent Guittot Date: Wed Feb 1 15:36:27 2023 +0100 sched/fair: unlink misfit task from cpu overutilized By taking into account uclamp_min, the 1:1 relation between task misfit and cpu overutilized is no more true as a task with a small util_avg may not fit a high capacity cpu because of uclamp_min constraint. Add a new state in util_fits_cpu() to reflect the case that task would fit a CPU except for the uclamp_min hint which is a performance requirement. Use -1 to reflect that a CPU doesn't fit only because of uclamp_min so we can use this new value to take additional action to select the best CPU that doesn't match uclamp_min hint. When util_fits_cpu() returns -1, we will continue to look for a possible CPU with better performance, which replaces Capacity Inversion detection with capacity_orig_of() - thermal_load_avg to detect a capacity inversion. Signed-off-by: Vincent Guittot Reviewed-and-tested-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dietmar Eggemann Tested-by: Kajetan Puchalski Link: https://lore.kernel.org/r/20230201143628.270912-2-vincent.guittot@linaro.org commit 443ed4c302fff6a26af980300463343a7adc9ee8 Author: Peter Zijlstra Date: Mon Jan 30 15:21:02 2023 +0100 objtool: mem*() are not uaccess safe For mysterious raisins I listed the new __asan_mem*() functions as being uaccess safe, this is giving objtool fails on KASAN builds because these functions call out to the actual __mem*() functions which are not marked uaccess safe. Removing it doesn't make the robots unhappy. Fixes: 69d4c0d32186 ("entry, kasan, x86: Disallow overriding mem*() functions") Reported-by: "Paul E. McKenney" Bisected-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20230126182302.GA687063@paulmck-ThinkPad-P17-Gen-1 commit 191e0e155521182051fc2f32dde237b6fde2b0b4 Author: Christoffer Dall Date: Thu Feb 9 17:58:20 2023 +0000 KVM: arm64: nv: Only toggle cache for virtual EL2 when SCTLR_EL2 changes So far we were flushing almost the entire universe whenever a VM would load/unload the SCTLR_EL1 and the two versions of that register had different MMU enabled settings. This turned out to be so slow that it prevented forward progress for a nested VM, because a scheduler timer tick interrupt would always be pending when we reached the nested VM. To avoid this problem, we consider the SCTLR_EL2 when evaluating if caches are on or off when entering virtual EL2 (because this is the value that we end up shadowing onto the hardware EL1 register). Reviewed-by: Alexandru Elisei Signed-off-by: Christoffer Dall Signed-off-by: Jintack Lim Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230209175820.1939006-19-maz@kernel.org Signed-off-by: Oliver Upton commit 9f75b6d447d712b6ed9abc869eedf456fe7f5e9b Author: Marc Zyngier Date: Thu Feb 9 17:58:19 2023 +0000 KVM: arm64: nv: Filter out unsupported features from ID regs As there is a number of features that we either can't support, or don't want to support right away with NV, let's add some basic filtering so that we don't advertize silly things to the EL2 guest. Whilst we are at it, advertize FEAT_TTL as well as FEAT_GTG, which the NV implementation will implement. Reviewed-by: Ganapatrao Kulkarni Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230209175820.1939006-18-maz@kernel.org Signed-off-by: Oliver Upton commit 280b748e871e5a9bd61fc13019b8cbda6e0242dd Author: Jintack Lim Date: Thu Feb 9 17:58:18 2023 +0000 KVM: arm64: nv: Emulate EL12 register accesses from the virtual EL2 With HCR_EL2.NV bit set, accesses to EL12 registers in the virtual EL2 trap to EL2. Handle those traps just like we do for EL1 registers. One exception is CNTKCTL_EL12. We don't trap on CNTKCTL_EL1 for non-VHE virtual EL2 because we don't have to. However, accessing CNTKCTL_EL12 will trap since it's one of the EL12 registers controlled by HCR_EL2.NV bit. Therefore, add a handler for it and don't treat it as a non-trap-registers when preparing a shadow context. These registers, being only a view on their EL1 counterpart, are permanently hidden from userspace. Reviewed-by: Alexandru Elisei Signed-off-by: Jintack Lim [maz: EL12_REG(), register visibility] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230209175820.1939006-17-maz@kernel.org Signed-off-by: Oliver Upton commit e6b367db0f9192692a3f3057878f1259fe966d33 Author: Marc Zyngier Date: Thu Feb 9 17:58:17 2023 +0000 KVM: arm64: nv: Allow a sysreg to be hidden from userspace only So far, we never needed to distinguish between registers hidden from userspace and being hidden from a guest (they are always either visible to both, or hidden from both). With NV, we have the ugly case of the EL02 and EL12 registers, which are only a view on the EL0 and EL1 registers. It makes absolutely no sense to expose them to userspace, since it already has the canonical view. Add a new visibility flag (REG_HIDDEN_USER) and a new helper that checks for it and REG_HIDDEN when checking whether to expose a sysreg to userspace. Subsequent patches will make use of it. Reviewed-by: Alexandru Elisei Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230209175820.1939006-16-maz@kernel.org Signed-off-by: Oliver Upton commit d9552fe133f9f7c357460b041e2d3b20310adf8d Author: Marc Zyngier Date: Thu Feb 9 17:58:16 2023 +0000 KVM: arm64: nv: Emulate PSTATE.M for a guest hypervisor We can no longer blindly copy the VCPU's PSTATE into SPSR_EL2 and return to the guest and vice versa when taking an exception to the hypervisor, because we emulate virtual EL2 in EL1 and therefore have to translate the mode field from EL2 to EL1 and vice versa. This requires keeping track of the state we enter the guest, for which we transiently use a dedicated flag. Reviewed-by: Russell King (Oracle) Reviewed-by: Alexandru Elisei Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230209175820.1939006-15-maz@kernel.org Signed-off-by: Oliver Upton commit 9da117eec9243f41c349071773784ca5f9c5d473 Author: Jintack Lim Date: Thu Feb 9 17:58:15 2023 +0000 KVM: arm64: nv: Add accessors for SPSR_EL1, ELR_EL1 and VBAR_EL1 from virtual EL2 For the same reason we trap virtual memory register accesses at virtual EL2, we need to trap SPSR_EL1, ELR_EL1 and VBAR_EL1 accesses. ARM v8.3 introduces the HCR_EL2.NV1 bit to be able to trap on those register accesses in EL1. Do not set this bit until the whole nesting support is completed, which happens further down the line... Reviewed-by: Russell King (Oracle) Signed-off-by: Jintack Lim Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230209175820.1939006-14-maz@kernel.org Signed-off-by: Oliver Upton commit bd36b1a9eb5a2842e1c44d8d8e7ff9b07cff7ed8 Author: Jintack Lim Date: Thu Feb 9 17:58:14 2023 +0000 KVM: arm64: nv: Handle SMCs taken from virtual EL2 Non-nested guests have used the hvc instruction to initiate SMCCC calls into KVM. This is quite a poor fit for NV as hvc exceptions are always taken to EL2. In other words, KVM needs to unconditionally forward the hvc exception back into vEL2 to uphold the architecture. Instead, treat the smc instruction from vEL2 as we would a guest hypercall, thereby allowing the vEL2 to interact with KVM's hypercall surface. Note that on NV-capable hardware HCR_EL2.TSC causes smc instructions executed in non-secure EL1 to trap to EL2, even if EL3 is not implemented. Reviewed-by: Alexandru Elisei Signed-off-by: Jintack Lim Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230209175820.1939006-13-maz@kernel.org [Oliver: redo commit message, only handle smc from vEL2] Signed-off-by: Oliver Upton commit 6b8d5dde5b6903baf82fc7400e0b3376b10805b4 Author: Borislav Petkov (AMD) Date: Sun Dec 18 21:53:36 2022 +0100 x86/tsc: Do feature check as the very first thing Do the feature check as the very first thing in the function. Everything else comes after that and is meaningless work if the TSC CPUID bit is not even set. Switch to cpu_feature_enabled() too, while at it. No functional changes. Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/Y5990CUCuWd5jfBH@zn.tnic commit 8fe6d84947582e2c076abc6253b80709fb047935 Author: Borislav Petkov (AMD) Date: Sun Dec 18 21:52:42 2022 +0100 x86/tsc: Make recalibrate_cpu_khz() export GPL only A quick search doesn't reveal any use outside of the kernel - which would be questionable to begin with anyway - so make the export GPL only. Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/Y599miBzWRAuOwhg@zn.tnic commit 851026a2bf54e739a2e13723bf3c4513f3cbcdc9 Author: Borislav Petkov (AMD) Date: Sat Feb 11 00:45:41 2023 +0100 x86/cacheinfo: Remove unused trace variable 15cd8812ab2c ("x86: Remove the CPU cache size printk's") removed the last use of the trace local var. Remove it too and the useless trace cache case. No functional changes. Reported-by: Jiapeng Chong Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230210234541.9694-1-bp@alien8.de Link: http://lore.kernel.org/r/20220705073349.1512-1-jiapeng.chong@linux.alibaba.com commit 6898a55ce38c13e47a0647380504d309e9b0f631 Author: Christoffer Dall Date: Thu Feb 9 17:58:13 2023 +0000 KVM: arm64: nv: Handle trapped ERET from virtual EL2 When a guest hypervisor running virtual EL2 in EL1 executes an ERET instruction, we will have set HCR_EL2.NV which traps ERET to EL2, so that we can emulate the exception return in software. Reviewed-by: Russell King (Oracle) Reviewed-by: Alexandru Elisei Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230209175820.1939006-12-maz@kernel.org Signed-off-by: Oliver Upton commit 93c33702cd2beb0cb49a857afdbf231c92eb9df5 Author: Jintack Lim Date: Thu Feb 9 17:58:12 2023 +0000 KVM: arm64: nv: Inject HVC exceptions to the virtual EL2 As we expect all PSCI calls from the L1 hypervisor to be performed using SMC when nested virtualization is enabled, it is clear that all HVC instruction from the VM (including from the virtual EL2) are supposed to handled in the virtual EL2. Forward these to EL2 as required. Reviewed-by: Russell King (Oracle) Reviewed-by: Alexandru Elisei Signed-off-by: Jintack Lim [maz: add handling of HCR_EL2.HCD] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230209175820.1939006-11-maz@kernel.org Signed-off-by: Oliver Upton commit 47f3a2fc765ae2719e6daf39c0a1c757934b152e Author: Jintack Lim Date: Thu Feb 9 17:58:11 2023 +0000 KVM: arm64: nv: Support virtual EL2 exceptions Support injecting exceptions and performing exception returns to and from virtual EL2. This must be done entirely in software except when taking an exception from vEL0 to vEL2 when the virtual HCR_EL2.{E2H,TGE} == {1,1} (a VHE guest hypervisor). [maz: switch to common exception injection framework, illegal exeption return handling] Reviewed-by: Ganapatrao Kulkarni Signed-off-by: Jintack Lim Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230209175820.1939006-10-maz@kernel.org Signed-off-by: Oliver Upton commit 6ff9dc238a53f4554d97b561fe4e8467d86544d9 Author: Jintack Lim Date: Thu Feb 9 17:58:10 2023 +0000 KVM: arm64: nv: Handle HCR_EL2.NV system register traps ARM v8.3 introduces a new bit in the HCR_EL2, which is the NV bit. When this bit is set, accessing EL2 registers in EL1 traps to EL2. In addition, executing the following instructions in EL1 will trap to EL2: tlbi, at, eret, and msr/mrs instructions to access SP_EL1. Most of the instructions that trap to EL2 with the NV bit were undef at EL1 prior to ARM v8.3. The only instruction that was not undef is eret. This patch sets up a handler for EL2 registers and SP_EL1 register accesses at EL1. The host hypervisor keeps those register values in memory, and will emulate their behavior. This patch doesn't set the NV bit yet. It will be set in a later patch once nested virtualization support is completed. Reviewed-by: Russell King (Oracle) Signed-off-by: Jintack Lim [maz: EL2_REG() macros] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230209175820.1939006-9-maz@kernel.org Signed-off-by: Oliver Upton commit 0043b29038e23573f529d8cd7c32967c2b6b976d Author: Christoffer Dall Date: Thu Feb 9 17:58:09 2023 +0000 KVM: arm64: nv: Add nested virt VCPU primitives for vEL2 VCPU state When running a nested hypervisor we commonly have to figure out if the VCPU mode is running in the context of a guest hypervisor or guest guest, or just a normal guest. Add convenient primitives for this. Reviewed-by: Russell King (Oracle) Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230209175820.1939006-8-maz@kernel.org Signed-off-by: Oliver Upton commit 5305cc2c34004042ef2683bebd126cf54eb6fc74 Author: Marc Zyngier Date: Thu Feb 9 17:58:08 2023 +0000 KVM: arm64: nv: Add EL2 system registers to vcpu context Add the minimal set of EL2 system registers to the vcpu context. Nothing uses them just yet. Reviewed-by: Andre Przywara Reviewed-by: Russell King (Oracle) Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230209175820.1939006-7-maz@kernel.org Signed-off-by: Oliver Upton commit 1d05d51bac78428764664e8f841ac52ee87f24db Author: Christoffer Dall Date: Thu Feb 9 17:58:07 2023 +0000 KVM: arm64: nv: Allow userspace to set PSR_MODE_EL2x We were not allowing userspace to set a more privileged mode for the VCPU than EL1, but we should allow this when nested virtualization is enabled for the VCPU. Reviewed-by: Russell King (Oracle) Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230209175820.1939006-6-maz@kernel.org Signed-off-by: Oliver Upton commit 2fb32357ae672fa1cb63e046ba387963687300b0 Author: Christoffer Dall Date: Thu Feb 9 17:58:06 2023 +0000 KVM: arm64: nv: Reset VCPU to EL2 registers if VCPU nested virt is set Reset the VCPU with PSTATE.M = EL2h when the nested virtualization feature is enabled on the VCPU. Reviewed-by: Russell King (Oracle) Reviewed-by: Alexandru Elisei Signed-off-by: Christoffer Dall [maz: rework register reset not to use empty data structures] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230209175820.1939006-5-maz@kernel.org Signed-off-by: Oliver Upton commit 89b0e7de3451a17f23bc1c39bc40eee1811f1669 Author: Christoffer Dall Date: Thu Feb 9 17:58:05 2023 +0000 KVM: arm64: nv: Introduce nested virtualization VCPU feature Introduce the feature bit and a primitive that checks if the feature is set behind a static key check based on the cpus_have_const_cap check. Checking vcpu_has_nv() on systems without nested virt enabled should have negligible overhead. We don't yet allow userspace to actually set this feature. Reviewed-by: Ganapatrao Kulkarni Reviewed-by: Russell King (Oracle) Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230209175820.1939006-4-maz@kernel.org Signed-off-by: Oliver Upton commit 8531bd63a8dc6c83fef2e1b7cbfd6f1a50bf87db Author: Marc Zyngier Date: Thu Feb 9 17:58:04 2023 +0000 KVM: arm64: Use the S2 MMU context to iterate over S2 table Most of our S2 helpers take a kvm_s2_mmu pointer, but quickly revert back to using the kvm structure. By doing so, we lose track of which S2 MMU context we were initially using, and fallback to the "canonical" context. If we were trying to unmap a S2 context managed by a guest hypervisor, we end-up parsing the wrong set of page tables, and bad stuff happens (as this is often happening on the back of a trapped TLBI from the guest hypervisor). Instead, make sure we always use the provided MMU context all the way. This has no impact on non-NV, as we always pass the canonical MMU context. Signed-off-by: Marc Zyngier Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/20230209175820.1939006-3-maz@kernel.org Signed-off-by: Oliver Upton commit 675cabc89900732a8a90f19a3c6ed314327a96e0 Author: Jintack Lim Date: Thu Feb 9 17:58:03 2023 +0000 arm64: Add ARM64_HAS_NESTED_VIRT cpufeature Add a new ARM64_HAS_NESTED_VIRT feature to indicate that the CPU has the ARMv8.3 nested virtualization capability, together with the 'kvm-arm.mode=nested' command line option. This will be used to support nested virtualization in KVM. Reviewed-by: Russell King (Oracle) Acked-by: Catalin Marinas Signed-off-by: Jintack Lim Signed-off-by: Andre Przywara Signed-off-by: Christoffer Dall [maz: moved the command-line option to kvm-arm.mode] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230209175820.1939006-2-maz@kernel.org Signed-off-by: Oliver Upton commit 9d3fe6aa6b9517408064c7c3134187e8ec77dbf7 Author: Longlong Xia Date: Fri Feb 10 09:54:44 2023 +0000 devtmpfs: remove return value of devtmpfs_delete_node() The only caller of device_del() does not check the return value. And there's nothing we can do when cleaning things up on a remove path. Let's make it a void function. Signed-off-by: Longlong Xia Link: https://lore.kernel.org/r/20230210095444.4067307-4-xialonglong1@huawei.com Signed-off-by: Greg Kroah-Hartman commit aacdac35b906e476b175a8ffc057165eca563076 Author: Thomas Weißschuh Date: Sat Feb 11 03:33:53 2023 +0000 ALSA: hda: 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/20230211-kobj_type-sound-v1-1-17107ceb25b7@weissschuh.net Signed-off-by: Takashi Iwai commit 75da437a2f172759b2273091a938772e687242d0 Merge: f6075feec4f97 0d5292bb29661 Author: Jakub Kicinski Date: Fri Feb 10 19:50:48 2023 -0800 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2023-02-09 (i40e) Jan removes i40e_status from the driver; replacing them with standard kernel error codes. Kees Cook replaces 0-length array with flexible array. * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: net/i40e: Replace 0-length array with flexible array i40e: use ERR_PTR error print in i40e messages i40e: use int for i40e_status i40e: Remove string printing for i40e_status i40e: Remove unused i40e status codes ==================== Link: https://lore.kernel.org/r/20230209172536.3595838-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit f6075feec4f976cf8c749ba12fba82915f7ac56b Merge: a9c1217436a7b 74c05a3828fda Author: Jakub Kicinski Date: Fri Feb 10 19:49:55 2023 -0800 Merge branch 's390-net-updates-2023-02-06' Alexandra Winter says: ==================== s390/net: updates 2023-02-06 Just maintenance patches, no functional changes. If you disagree with patch 4, we can leave it out. We prefer scnprintf, but no strong opinion. ==================== Link: https://lore.kernel.org/r/20230209110424.1707501-1-wintera@linux.ibm.com Signed-off-by: Jakub Kicinski commit 74c05a3828fda5133abcad60086f400de955d55c Author: Thorsten Winkler Date: Thu Feb 9 12:04:24 2023 +0100 s390/qeth: Convert sprintf/snprintf to scnprintf This LWN article explains the rationale for this change https: //lwn.net/Articles/69419/ Ie. snprintf() returns what *would* be the resulting length, while scnprintf() returns the actual length. Reported-by: Jules Irenge Reviewed-by: Alexandra Winter Signed-off-by: Thorsten Winkler Signed-off-by: Alexandra Winter Signed-off-by: Jakub Kicinski commit dde8769b12110b7f636053bb70febfe25a9502c0 Author: Thorsten Winkler Date: Thu Feb 9 12:04:23 2023 +0100 s390/qeth: Convert sysfs sprintf to sysfs_emit Following the advice of the Documentation/filesystems/sysfs.rst. All sysfs related show()-functions should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Reported-by: Jules Irenge Reported-by: Joe Perches Reviewed-by: Alexandra Winter Signed-off-by: Thorsten Winkler Signed-off-by: Alexandra Winter Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit 180f5131743210aba452888cd16883993f440544 Author: Thorsten Winkler Date: Thu Feb 9 12:04:22 2023 +0100 s390/qeth: Use constant for IP address buffers Use INET6_ADDRSTRLEN constant with size of 48 which be used for char arrays storing ip addresses (for IPv4 and IPv6) Reviewed-by: Alexandra Winter Signed-off-by: Thorsten Winkler Signed-off-by: Alexandra Winter Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit dd4e356c387ce72b3f10d86c89936a13fc64dcd5 Author: Alexandra Winter Date: Thu Feb 9 12:04:21 2023 +0100 s390/ctcm: cleanup indenting Get rid of multiple smatch warnings, like: warn: inconsistent indenting Reviewed-by: Simon Horman Signed-off-by: Alexandra Winter Signed-off-by: Jakub Kicinski commit a9c1217436a7b763e5afe6c4347ee39f63456007 Merge: 183514f7c569c 33f5d733b5890 Author: Jakub Kicinski Date: Fri Feb 10 19:44:19 2023 -0800 Merge branch 'net-renesas-rswitch-improve-tx-timestamp-accuracy' Yoshihiro Shimoda says: ==================== net: renesas: rswitch: Improve TX timestamp accuracy The patch [[123]/4] are minor refacoring for readability. The patch [4/4] is for improving TX timestamp accuracy. To improve the accuracy, it requires refactoring so that this is not a fixed patch. v2: https://lore.kernel.org/all/20230208235721.2336249-1-yoshihiro.shimoda.uh@renesas.com/ v1: https://lore.kernel.org/all/20230208073445.2317192-1-yoshihiro.shimoda.uh@renesas.com/ ==================== Link: https://lore.kernel.org/r/20230209081741.2536034-1-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Jakub Kicinski commit 33f5d733b589031bda69f92f6a0dec230bc6d4fb Author: Yoshihiro Shimoda Date: Thu Feb 9 17:17:41 2023 +0900 net: renesas: rswitch: Improve TX timestamp accuracy In the previous code, TX timestamp accuracy was bad because the irq handler got the timestamp from the timestamp register at that time. This hardware has "Timestamp capture" feature which can store each TX timestamp into the timestamp descriptors. To improve TX timestamp accuracy, implement timestamp descriptors' handling. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Alexander Duyck Signed-off-by: Jakub Kicinski commit 48cf0a25702b2d1d1ca5667d03df91780191657a Author: Yoshihiro Shimoda Date: Thu Feb 9 17:17:40 2023 +0900 net: renesas: rswitch: Remove gptp flag from rswitch_gwca_queue In the previous code, the gptp flag was completely related to the !dir_tx in struct rswitch_gwca_queue because rswitch_gwca_queue_alloc() was called below: < In rswitch_txdmac_alloc() > err = rswitch_gwca_queue_alloc(ndev, priv, rdev->tx_queue, true, false, TX_RING_SIZE); So, dir_tx = true, and gptp = false. < In rswitch_rxdmac_alloc() > err = rswitch_gwca_queue_alloc(ndev, priv, rdev->rx_queue, false, true, RX_RING_SIZE); So, dir_tx = false, and gptp = true. In the future, a new queue handling for timestamp will be implemented and this gptp flag is confusable. So, remove the gptp flag. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Alexander Duyck Signed-off-by: Jakub Kicinski commit e3f38039c681d8ac5956a742ee5d40b00cf57a37 Author: Yoshihiro Shimoda Date: Thu Feb 9 17:17:39 2023 +0900 net: renesas: rswitch: Move linkfix variables to rswitch_gwca To improve readability, move linkfix related variables to struct rswitch_gwca. Also, rename function names "desc" with "linkfix". Signed-off-by: Yoshihiro Shimoda Reviewed-by: Alexander Duyck Signed-off-by: Jakub Kicinski commit 251eadcc640a0b5fd2767aaeb22a6f1ebf9b3c96 Author: Yoshihiro Shimoda Date: Thu Feb 9 17:17:38 2023 +0900 net: renesas: rswitch: Rename rings in struct rswitch_gwca_queue To add a new ring which is really related to timestamp (ts_ring) in the future, rename the following members to improve readability: ring --> tx_ring ts_ring --> rx_ring Signed-off-by: Yoshihiro Shimoda Reviewed-by: Alexander Duyck Signed-off-by: Jakub Kicinski commit 183514f7c569c462da45cc92a3843b666d588413 Author: Dan Carpenter Date: Thu Feb 9 16:43:06 2023 +0300 net: libwx: fix an error code in wx_alloc_page_pool() This function always returns success. We need to preserve the error code before setting rx_ring->page_pool = NULL. Fixes: 850b971110b2 ("net: libwx: Allocate Rx and Tx resources") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/Y+T4aoefc1XWvGYb@kili Signed-off-by: Jakub Kicinski commit f99f22e02f298083763b78a58cf82903d5e2d272 Author: Arnd Bergmann Date: Thu Feb 9 13:44:17 2023 +0100 net: dsa: ocelot: add PTP dependency for NET_DSA_MSCC_OCELOT_EXT A new user of MSCC_OCELOT_SWITCH_LIB was added, bringing back an old link failure that was fixed with e5f31552674e ("ethernet: fix PTP_1588_CLOCK dependencies"): x86_64-linux-ld: drivers/net/ethernet/mscc/ocelot_ptp.o: in function `ocelot_ptp_enable': ocelot_ptp.c:(.text+0x8ee): undefined reference to `ptp_find_pin' x86_64-linux-ld: drivers/net/ethernet/mscc/ocelot_ptp.o: in function `ocelot_get_ts_info': ocelot_ptp.c:(.text+0xd5d): undefined reference to `ptp_clock_index' x86_64-linux-ld: drivers/net/ethernet/mscc/ocelot_ptp.o: in function `ocelot_init_timestamp': ocelot_ptp.c:(.text+0x15ca): undefined reference to `ptp_clock_register' x86_64-linux-ld: drivers/net/ethernet/mscc/ocelot_ptp.o: in function `ocelot_deinit_timestamp': ocelot_ptp.c:(.text+0x16b7): undefined reference to `ptp_clock_unregister' Add the same PTP dependency here, as well as in the MSCC_OCELOT_SWITCH_LIB symbol itself to make it more obvious what is going on when the next driver selects it. Fixes: 3d7316ac81ac ("net: dsa: ocelot: add external ocelot switch control") Signed-off-by: Arnd Bergmann Acked-by: Colin Foster Link: https://lore.kernel.org/r/20230209124435.1317781-1-arnd@kernel.org Signed-off-by: Jakub Kicinski commit 1bc6cc4f7b3bf0f8cca59f95f26156bf0291b6a1 Merge: ee7e1788ae3d4 049139126ec7a Author: Jakub Kicinski Date: Fri Feb 10 19:21:15 2023 -0800 Merge branch 'bridge-mcast-preparations-for-vxlan-mdb' Ido Schimmel says: ==================== bridge: mcast: Preparations for VXLAN MDB This patchset contains small preparations for VXLAN MDB that were split from this RFC [1]. Tested using existing bridge MDB forwarding selftests. [1] https://lore.kernel.org/netdev/20230204170801.3897900-1-idosch@nvidia.com/ ==================== Link: https://lore.kernel.org/r/20230209071852.613102-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski commit 049139126ec7ab55b568b2935aa7db5e6657258c Author: Ido Schimmel Date: Thu Feb 9 09:18:52 2023 +0200 selftests: forwarding: Add MDB dump test cases The kernel maintains three markers for the MDB dump: 1. The last bridge device from which the MDB was dumped. 2. The last MDB entry from which the MDB was dumped. 3. The last port-group entry that was dumped. Add test cases for large scale MDB dump to make sure that all the configured entries are dumped and that the markers are used correctly. Specifically, create 2 bridges with 32 ports and add 256 MDB entries in which all the ports are member of. Test that each bridge reports 8192 (256 * 32) permanent entries. Do that with IPv4, IPv6 and L2 MDB entries. On my system, MDB dump of the above is contained in about 50 netlink messages. Example output: # ./bridge_mdb.sh [...] INFO: # Large scale dump tests TEST: IPv4 large scale dump tests [ OK ] TEST: IPv6 large scale dump tests [ OK ] TEST: L2 large scale dump tests [ OK ] [...] Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 170afa71e3a2bd4ddaa3bac44512ce0b828a026f Author: Ido Schimmel Date: Thu Feb 9 09:18:51 2023 +0200 bridge: mcast: Move validation to a policy Future patches are going to move parts of the bridge MDB code to the common rtnetlink code in preparation for VXLAN MDB support. To facilitate code sharing between both drivers, move the validation of the top level attributes in RTM_{NEW,DEL}MDB messages to a policy that will eventually be moved to the rtnetlink code. Use 'NLA_NESTED' for 'MDBA_SET_ENTRY_ATTRS' instead of NLA_POLICY_NESTED() as this attribute is going to be validated using different policies in the underlying drivers. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 7ea829664d3ce1977c310d532d5494ce3ec8592a Author: Ido Schimmel Date: Thu Feb 9 09:18:50 2023 +0200 bridge: mcast: Remove pointless sequence generation counter assignment The purpose of the sequence generation counter in the netlink callback is to identify if a multipart dump is consistent or not by calling nl_dump_check_consistent() whenever a message is generated. The function is not invoked by the MDB code, rendering the sequence generation counter assignment pointless. Remove it. Note that even if the function was invoked, we still could not accurately determine if the dump is consistent or not, as there is no sequence generation counter for MDB entries, unlike nexthop objects, for example. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit ccd7f25b5b04869ed0786323940b8d1642459cc0 Author: Ido Schimmel Date: Thu Feb 9 09:18:49 2023 +0200 bridge: mcast: Use correct define in MDB dump 'MDB_PG_FLAGS_PERMANENT' and 'MDB_PERMANENT' happen to have the same value, but the latter is uAPI and cannot change, so use it when dumping an MDB entry. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit ee7e1788ae3d4e35e194a7b1340b5103fbc74d68 Merge: de4287336794f c585a92b2f9c6 Author: Jakub Kicinski Date: Fri Feb 10 19:03:05 2023 -0800 Merge tag 'for-net-next-2023-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next Luiz Augusto von Dentz says: ==================== pull-request: bluetooth-next - Add new PID/VID 0489:e0f2 for MT7921 - Add VID:PID 13d3:3529 for Realtek RTL8821CE - Add CIS feature bits to controller information - Set Per Platform Antenna Gain(PPAG) for Intel controllers * tag 'for-net-next-2023-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next: Bluetooth: btintel: Set Per Platform Antenna Gain(PPAG) Bluetooth: Make sure LE create conn cancel is sent when timeout Bluetooth: Free potentially unfreed SCO connection Bluetooth: hci_qca: get wakeup status from serdev device handle Bluetooth: L2CAP: Fix potential user-after-free Bluetooth: MGMT: add CIS feature bits to controller information Bluetooth: hci_conn: Refactor hci_bind_bis() since it always succeeds Bluetooth: HCI: Replace zero-length arrays with flexible-array members Bluetooth: qca: Fix sparse warnings Bluetooth: btusb: Add VID:PID 13d3:3529 for Realtek RTL8821CE Bluetooth: btusb: Add new PID/VID 0489:e0f2 for MT7921 Bluetooth: Fix issue with Actions Semi ATS2851 based devices ==================== Link: https://lore.kernel.org/r/20230209234922.3756173-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit ab86cf337a5b64f0456d2d0d01edc939ad5c20bb Merge: 7e2a9ebe81262 bf39650824916 Author: Alexei Starovoitov Date: Fri Feb 10 18:59:57 2023 -0800 Merge branch 'bpf, mm: introduce cgroup.memory=nobpf' Yafang Shao says: ==================== The bpf memory accouting has some known problems in contianer environment, - The container memory usage is not consistent if there's pinned bpf program After the container restart, the leftover bpf programs won't account to the new generation, so the memory usage of the container is not consistent. This issue can be resolved by introducing selectable memcg, but we don't have an agreement on the solution yet. See also the discussions at https://lwn.net/Articles/905150/ . - The leftover non-preallocated bpf map can't be limited The leftover bpf map will be reparented, and thus it will be limited by the parent, rather than the container itself. Furthermore, if the parent is destroyed, it be will limited by its parent's parent, and so on. It can also be resolved by introducing selectable memcg. - The memory dynamically allocated in bpf prog is charged into root memcg only Nowdays the bpf prog can dynamically allocate memory, for example via bpf_obj_new(), but it only allocate from the global bpf_mem_alloc pool, so it will charge into root memcg only. That needs to be addressed by a new proposal. So let's give the container user an option to disable bpf memory accouting. The idea of "cgroup.memory=nobpf" is originally by Tejun[1]. [1]. https://lwn.net/ml/linux-mm/YxjOawzlgE458ezL@slm.duckdns.org/ Changes, v1->v2: - squash patches (Roman) - commit log improvement in patch #2. (Johannes) ==================== Signed-off-by: Alexei Starovoitov commit bf3965082491601bf9cd6d9a0ce2d88cb219168a Author: Yafang Shao Date: Fri Feb 10 15:47:34 2023 +0000 bpf: allow to disable bpf prog memory accounting We can simply disable the bpf prog memory accouting by not setting the GFP_ACCOUNT. Signed-off-by: Yafang Shao Acked-by: Johannes Weiner Acked-by: Roman Gushchin Link: https://lore.kernel.org/r/20230210154734.4416-5-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit ee53cbfb1ebf990de0d084a7cd6b67b05fe1f7ac Author: Yafang Shao Date: Fri Feb 10 15:47:33 2023 +0000 bpf: allow to disable bpf map memory accounting We can simply set root memcg as the map's memcg to disable bpf memory accounting. bpf_map_area_alloc is a little special as it gets the memcg from current rather than from the map, so we need to disable GFP_ACCOUNT specifically for it. Signed-off-by: Yafang Shao Acked-by: Johannes Weiner Acked-by: Roman Gushchin Link: https://lore.kernel.org/r/20230210154734.4416-4-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit ddef81b5fd1da4d7c3cc8785d2043b73b72f38ef Author: Yafang Shao Date: Fri Feb 10 15:47:32 2023 +0000 bpf: use bpf_map_kvcalloc in bpf_local_storage Introduce new helper bpf_map_kvcalloc() for the memory allocation in bpf_local_storage(). Then the allocation will charge the memory from the map instead of from current, though currently they are the same thing as it is only used in map creation path now. By charging map's memory into the memcg from the map, it will be more clear. Signed-off-by: Yafang Shao Acked-by: Johannes Weiner Acked-by: Roman Gushchin Link: https://lore.kernel.org/r/20230210154734.4416-3-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit b6c1a8af5b1eec42aabc13376f94aa90c3d765f1 Author: Yafang Shao Date: Fri Feb 10 15:47:31 2023 +0000 mm: memcontrol: add new kernel parameter cgroup.memory=nobpf Add new kernel parameter cgroup.memory=nobpf to allow user disable bpf memory accounting. This is a preparation for the followup patch. Signed-off-by: Yafang Shao Acked-by: Johannes Weiner Acked-by: Roman Gushchin Link: https://lore.kernel.org/r/20230210154734.4416-2-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit 7e2a9ebe8126206157056cca5dd30a656f3d8a81 Author: Daniel Borkmann Date: Fri Feb 10 23:40:31 2023 +0100 docs, bpf: Ensure IETF's BPF mailing list gets copied for ISA doc changes Given BPF is increasingly being used beyond just the Linux kernel, with implementations in NICs and other hardware, Windows, etc, there is an ongoing effort to document and standardize parts of the existing BPF infrastructure such as its ISA. As "source of truth" we decided some time ago to rely on the in-tree documentation, in particular, starting out with the Documentation/bpf/instruction-set.rst as a base for later RFC drafts on the ISA. Therefore, we want to ensure that changes to that document have bpf@ietf.org in Cc, so add a MAINTAINERS file entry with a section on documents related to standardization efforts. For now, this only relates to instruction-set.rst, and later additional files will be added. Signed-off-by: Daniel Borkmann Cc: Dave Thaler Cc: bpf@ietf.org Link: https://datatracker.ietf.org/doc/bofreq-thaler-bpf-ebpf/ Link: https://lore.kernel.org/r/57619c0dd8e354d82bf38745f99405e3babdc970.1676068387.git.daniel@iogearbox.net Signed-off-by: Alexei Starovoitov commit b8b9ffced017528bcdd262730ab10bc5084c3bb4 Merge: dfd423e0a3256 09d09e04d2fcf Author: Dan Williams Date: Fri Feb 10 18:11:01 2023 -0800 Merge branch 'for-6.3/cxl-ram-region' into cxl/next Include the support for enumerating and provisioning ram regions for v6.3. This also include a default policy change for ram / volatile device-dax instances to assign them to the dax_kmem driver by default. commit dfd423e0a3256f88b8ea622fbbe04f91594195b6 Merge: dbe9f7d1e155b af73370dcbe58 Author: Dan Williams Date: Fri Feb 10 18:05:59 2023 -0800 Merge branch 'for-6.3/cxl' into cxl/next Pick up some final miscellaneous updates for v6.3 including support for communicating 'exclusive' and 'enabled' state of commands. commit af73370dcbe584f44168872b0bacac899f3c48f2 Author: Ira Weiny Date: Thu Feb 2 17:04:27 2023 -0800 cxl/mem: Fix UAPI command comment The command comment had grammatical errors. In an attempt to fix those it was noted that the comment and the query command were not in sync. Now that the query command returns excluded and device unsupported command information. Update the kdoc and fix the grammatical errors. [1] https://lore.kernel.org/all/63b4ec4e37cc1_5178e2941d@dwillia2-xfh.jf.intel.com.notmuch/ Reviewed-by: Jonathan Cameron Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20221222-cxl-misc-v4-4-62f701c1cdd1@intel.com Signed-off-by: Dan Williams commit 814a15f3b4131d3205bd47e23b50ccc6c666ce1d Author: Ira Weiny Date: Thu Feb 2 17:04:26 2023 -0800 cxl/uapi: Tag commands from cxl_query_cmd() It was pointed out that commands not supported by the device or excluded by the kernel were being returned in cxl_query_cmd().[1] While libcxl correctly handles failing commands, it is more efficient to not issue an invalid command in the first place. This can't be done without additional information being returned from cxl_query_cmd(). In addition, information about the availability of commands can be useful for debugging. Add flags to struct cxl_command_info which reflect if a command is enabled and/or exclusive to the kernel. [1] https://lore.kernel.org/all/63b4ec4e37cc1_5178e2941d@dwillia2-xfh.jf.intel.com.notmuch/ Suggested-by: Dan Williams Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20221222-cxl-misc-v4-3-62f701c1cdd1@intel.com Signed-off-by: Dan Williams commit 11ef026e467b05eac0a2ceb981d351ddc4b12216 Author: Ira Weiny Date: Thu Feb 2 17:04:25 2023 -0800 cxl/uapi: Add warning on CXL command enum The CXL command enum is exported to user space and must maintain backwards compatibility. Add comment that new defines must be added to the end of the list. Suggested-by: Dan Williams Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20221222-cxl-misc-v4-2-62f701c1cdd1@intel.com Signed-off-by: Dan Williams commit 860334e59003f684d85c519179038bd655eeb9ef Author: Ira Weiny Date: Thu Feb 2 17:04:24 2023 -0800 cxl/mem: Remove unused CXL_CMD_FLAG_NONE define CXL_CMD_FLAG_NONE is not used, remove it. Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20221222-cxl-misc-v4-1-62f701c1cdd1@intel.com Signed-off-by: Dan Williams commit de4287336794f49323a5223c8b6e131f4840a866 Merge: d12f9ad028062 17bcd27a08a21 Author: Jakub Kicinski Date: Fri Feb 10 17:51:27 2023 -0800 Daniel Borkmann says: ==================== pull-request: bpf-next 2023-02-11 We've added 96 non-merge commits during the last 14 day(s) which contain a total of 152 files changed, 4884 insertions(+), 962 deletions(-). There is a minor conflict in drivers/net/ethernet/intel/ice/ice_main.c between commit 5b246e533d01 ("ice: split probe into smaller functions") from the net-next tree and commit 66c0e13ad236 ("drivers: net: turn on XDP features") from the bpf-next tree. Remove the hunk given ice_cfg_netdev() is otherwise there a 2nd time, and add XDP features to the existing ice_cfg_netdev() one: [...] ice_set_netdev_features(netdev); netdev->xdp_features = NETDEV_XDP_ACT_BASIC | NETDEV_XDP_ACT_REDIRECT | NETDEV_XDP_ACT_XSK_ZEROCOPY; ice_set_ops(netdev); [...] Stephen's merge conflict mail: https://lore.kernel.org/bpf/20230207101951.21a114fa@canb.auug.org.au/ The main changes are: 1) Add support for BPF trampoline on s390x which finally allows to remove many test cases from the BPF CI's DENYLIST.s390x, from Ilya Leoshkevich. 2) Add multi-buffer XDP support to ice driver, from Maciej Fijalkowski. 3) Add capability to export the XDP features supported by the NIC. Along with that, add a XDP compliance test tool, from Lorenzo Bianconi & Marek Majtyka. 4) Add __bpf_kfunc tag for marking kernel functions as kfuncs, from David Vernet. 5) Add a deep dive documentation about the verifier's register liveness tracking algorithm, from Eduard Zingerman. 6) Fix and follow-up cleanups for resolve_btfids to be compiled as a host program to avoid cross compile issues, from Jiri Olsa & Ian Rogers. 7) Batch of fixes to the BPF selftest for xdp_hw_metadata which resulted when testing on different NICs, from Jesper Dangaard Brouer. 8) Fix libbpf to better detect kernel version code on Debian, from Hao Xiang. 9) Extend libbpf to add an option for when the perf buffer should wake up, from Jon Doron. 10) Follow-up fix on xdp_metadata selftest to just consume on TX completion, from Stanislav Fomichev. 11) Extend the kfuncs.rst document with description on kfunc lifecycle & stability expectations, from David Vernet. 12) Fix bpftool prog profile to skip attaching to offline CPUs, from Tonghao Zhang. ==================== Link: https://lore.kernel.org/r/20230211002037.8489-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 09d09e04d2fcf88c4620dd28097e0e2a8f720eac Author: Dan Williams Date: Fri Feb 10 01:07:19 2023 -0800 cxl/dax: Create dax devices for CXL RAM regions While platform firmware takes some responsibility for mapping the RAM capacity of CXL devices present at boot, the OS is responsible for mapping the remainder and hot-added devices. Platform firmware is also responsible for identifying the platform general purpose memory pool, typically DDR attached DRAM, and arranging for the remainder to be 'Soft Reserved'. That reservation allows the CXL subsystem to route the memory to core-mm via memory-hotplug (dax_kmem), or leave it for dedicated access (device-dax). The new 'struct cxl_dax_region' object allows for a CXL memory resource (region) to be published, but also allow for udev and module policy to act on that event. It also prevents cxl_core.ko from having a module loading dependency on any drivers/dax/ modules. Tested-by: Fan Ni Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/167602003896.1924368.10335442077318970468.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit e9ee9fe3a9d4ae0e1e935fc2ec1218b66a043cae Author: Dan Williams Date: Fri Feb 10 01:07:13 2023 -0800 dax: Assign RAM regions to memory-hotplug by default The default mode for device-dax instances is backwards for RAM-regions as evidenced by the fact that it tends to catch end users by surprise. "Where is my memory?". Recall that platforms are increasingly shipping with performance-differentiated memory pools beyond typical DRAM and NUMA effects. This includes HBM (high-bandwidth-memory) and CXL (dynamic interleave, varied media types, and future fabric attached possibilities). For this reason the EFI_MEMORY_SP (EFI Special Purpose Memory => Linux 'Soft Reserved') attribute is expected to be applied to all memory-pools that are not the general purpose pool. This designation gives an Operating System a chance to defer usage of a memory pool until later in the boot process where its performance properties can be interrogated and administrator policy can be applied. 'Soft Reserved' memory can be anything from too limited and precious to be part of the general purpose pool (HBM), too slow to host hot kernel data structures (some PMEM media), or anything in between. However, in the absence of an explicit policy, the memory should at least be made usable by default. The current device-dax default hides all non-general-purpose memory behind a device interface. The expectation is that the distribution of users that want the memory online by default vs device-dedicated-access by default follows the Pareto principle. A small number of enlightened users may want to do userspace memory management through a device, but general users just want the kernel to make the memory available with an option to get more advanced later. Arrange for all device-dax instances not backed by PMEM to default to attaching to the dax_kmem driver. From there the baseline memory hotplug policy (CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE / memhp_default_state=) gates whether the memory comes online or stays offline. Where, if it stays offline, it can be reliably converted back to device-mode where it can be partitioned, or fronted by a userspace allocator. So, if someone wants device-dax instances for their 'Soft Reserved' memory: 1/ Build a kernel with CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=n or boot with memhp_default_state=offline, or roll the dice and hope that the kernel has not pinned a page in that memory before step 2. 2/ Write a udev rule to convert the target dax device(s) from 'system-ram' mode to 'devdax' mode: daxctl reconfigure-device $dax -m devdax -f Cc: Michal Hocko Cc: David Hildenbrand Cc: Dave Hansen Reviewed-by: Gregory Price Tested-by: Fan Ni Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/167602003336.1924368.6809503401422267885.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 7dab174e2e27eeaf10273e597ffbef4f8ea032bb Author: Dan Williams Date: Fri Feb 10 01:07:07 2023 -0800 dax/hmem: Move hmem device registration to dax_hmem.ko In preparation for the CXL region driver to take over the responsibility of registering device-dax instances for CXL regions, move the registration of "hmem" devices to dax_hmem.ko. Previously the builtin component of this enabling (drivers/dax/hmem/device.o) would register platform devices for each address range and trigger the dax_hmem.ko module to load and attach device-dax instances to those devices. Now, the ranges are collected from the HMAT and EFI memory map walking, but the device creation is deferred. A new "hmem_platform" device is created which triggers dax_hmem.ko to load and register the platform devices. Tested-by: Fan Ni Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/167602002771.1924368.5653558226424530127.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit fe098574a93b4e2acb046b583e9857337d807f38 Author: Dan Williams Date: Fri Feb 10 01:07:02 2023 -0800 dax/hmem: Convey the dax range via memregion_info() In preparation for hmem platform devices to be unregistered, stop using platform_device_add_resources() to convey the address range. The platform_device_add_resources() API causes an existing "Soft Reserved" iomem resource to be re-parented under an inserted platform device resource. When that platform device is deleted it removes the platform device resource and all children. Instead, it is sufficient to convey just the address range and let request_mem_region() insert resources to indicate the devices active in the range. This allows the "Soft Reserved" resource to be re-enumerated upon the next probe event. Reviewed-by: Jonathan Cameron Tested-by: Fan Ni Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/167602002217.1924368.7036275892522551624.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 84fe17f8e9c68a4389c6e89b7ce3b4651b359989 Author: Dan Williams Date: Fri Feb 10 01:06:56 2023 -0800 dax/hmem: Drop unnecessary dax_hmem_remove() Empty driver remove callbacks can just be elided. Reviewed-by: Jonathan Cameron Reviewed-by: Gregory Price Tested-by: Fan Ni Reviewed-by: Vishal Verma Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/167602001664.1924368.9102029637928071240.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit df2798bc778acadcd87d7ff98a4db47197defc5f Author: Dan Williams Date: Fri Feb 10 01:06:51 2023 -0800 dax/hmem: Move HMAT and Soft reservation probe initcall level In preparation for moving more filtering of "hmem" ranges into the dax_hmem.ko module, update the initcall levels. HMAT range registration moves to subsys_initcall() to be done before Soft Reservation probing, and Soft Reservation probing is moved to device_initcall() to be done before dax_hmem.ko initialization if it is built-in. Tested-by: Fan Ni Reviewed-by: Vishal Verma Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/167602001107.1924368.11562316181038595611.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 3d8f7ccaa611a743ae3a1e6f605346993d37c513 Author: Dan Williams Date: Fri Feb 10 01:06:45 2023 -0800 tools/testing/cxl: Define a fixed volatile configuration to parse Take two endpoints attached to the first switch on the first host-bridge in the cxl_test topology and define a pre-initialized region. This is a x2 interleave underneath a x1 CXL Window. $ modprobe cxl_test $ # cxl list -Ru { "region":"region3", "resource":"0xf010000000", "size":"512.00 MiB (536.87 MB)", "interleave_ways":2, "interleave_granularity":4096, "decode_state":"commit" } Tested-by: Fan Ni Reviewed-by: Vishal Verma Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/167602000547.1924368.11613151863880268868.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit a32320b71f085f8d82afedcf285f1682c8c00aed Author: Dan Williams Date: Fri Feb 10 17:31:17 2023 -0800 cxl/region: Add region autodiscovery Region autodiscovery is an asynchronous state machine advanced by cxl_port_probe(). After the decoders on an endpoint port are enumerated they are scanned for actively enabled instances. Each active decoder is flagged for auto-assembly CXL_DECODER_F_AUTO and attached to a region. If a region does not already exist for the address range setting of the decoder one is created. That creation process may race with other decoders of the same region being discovered since cxl_port_probe() is asynchronous. A new 'struct cxl_root_decoder' lock, @range_lock, is introduced to mitigate that race. Once all decoders have arrived, "p->nr_targets == p->interleave_ways", they are sorted by their relative decode position. The sort algorithm involves finding the point in the cxl_port topology where one leg of the decode leads to deviceA and the other deviceB. At that point in the topology the target order in the 'struct cxl_switch_decoder' indicates the relative position of those endpoint decoders in the region. >From that point the region goes through the same setup and validation steps as user-created regions, but instead of programming the decoders it validates that driver would have written the same values to the decoders as were already present. Tested-by: Fan Ni Reviewed-by: Vishal Verma Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/167601999958.1924368.9366954455835735048.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 32ce3f185bbb3802cd0ac925bc8fddf1797e0ad4 Author: Dan Williams Date: Fri Feb 10 01:06:33 2023 -0800 cxl/port: Split endpoint and switch port probe Jonathan points out that the shared code between the switch and endpoint case is small. Before adding another is_cxl_endpoint() conditional, just split the two cases. Rather than duplicate the "Couldn't enumerate decoders" error message take the opportunity to improve the error messages in devm_cxl_enumerate_decoders(). Reported-by: Jonathan Cameron Reviewed-by: Vishal Verma Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/167601999378.1924368.15071142145866277623.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 45d235c56b2bc51749af9cc8fe6ace18aa8b81be Author: Dan Williams Date: Fri Feb 10 01:06:27 2023 -0800 cxl/region: Enable CONFIG_CXL_REGION to be toggled Add help text and a label so the CXL_REGION config option can be toggled. This is mainly to enable compile testing without region support. Reviewed-by: Vishal Verma Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Reviewed-by: Gregory Price Tested-by: Fan Ni Link: https://lore.kernel.org/r/167601998765.1924368.258370414771847699.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 93c177fd6ff0655a5fa43ec945a57d7b0200ad80 Author: Dan Williams Date: Fri Feb 10 01:06:21 2023 -0800 kernel/range: Uplevel the cxl subsystem's range_contains() helper In support of the CXL subsystem's use of 'struct range' to track decode address ranges, add a common range_contains() implementation with identical semantics as resource_contains(); The existing 'range_contains()' in lib/stackinit_kunit.c is namespaced with a 'stackinit_' prefix. Cc: Kees Cook Reviewed-by: Vishal Verma Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Reviewed-by: Gregory Price Reviewed-by: Ira Weiny Tested-by: Fan Ni Link: https://lore.kernel.org/r/167601998163.1924368.6067392174077323935.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 9995576cef48dcbb0ba3de068292ed14f72fa0eb Author: Dan Williams Date: Fri Feb 10 01:06:15 2023 -0800 cxl/region: Move region-position validation to a helper In preparation for region autodiscovery, that needs all devices discovered before their relative position in the region can be determined, consolidate all position dependent validation in a helper. Recall that in the on-demand region creation flow the end-user picks the position of a given endpoint decoder in a region. In the autodiscovery case the position of an endpoint decoder can only be determined after all other endpoint decoders that claim to decode the region's address range have been enumerated and attached. So, in the autodiscovery case endpoint decoders may be attached before their relative position is known. Once all decoders arrive, then positions can be determined and validated with cxl_region_validate_position() the same as user initiated on-demand creation. Reviewed-by: Vishal Verma Tested-by: Fan Ni Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/167601997584.1924368.4615769326126138969.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 86987c766276acf1289700cd38bd6d5b5a167fea Author: Dan Williams Date: Fri Feb 10 01:06:09 2023 -0800 cxl/region: Cleanup target list on attach error Jonathan noticed that the target list setup is not unwound completely upon error. Undo all the setup in the 'err_decrement:' exit path. Fixes: 27b3f8d13830 ("cxl/region: Program target lists") Reported-by: Jonathan Cameron Link: http://lore.kernel.org/r/20230208123031.00006990@Huawei.com Reviewed-by: Ira Weiny Reviewed-by: Vishal Verma Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/167601996980.1924368.390423634911157277.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 3528b1e101a40ff75c8130e0b94e9555d2976f45 Author: Dan Williams Date: Fri Feb 10 01:06:04 2023 -0800 cxl/region: Refactor attach_target() for autodiscovery Region autodiscovery is the process of kernel creating 'struct cxl_region' object to represent active CXL memory ranges it finds already active in hardware when the driver loads. Typically this happens when platform firmware establishes CXL memory regions and then publishes them in the memory map. However, this can also happen in the case of kexec-reboot after the kernel has created regions. In the autodiscovery case the region creation process starts with a known endpoint decoder. Refactor attach_target() into a helper that is suitable to be called from either sysfs, for runtime region creation, or from cxl_port_probe() after it has enumerated all endpoint decoders. The cxl_port_probe() context is an async device-core probing context, so it is not appropriate to allow SIGTERM to interrupt the assembly process. Refactor attach_target() to take @cxled and @state as arguments where @state indicates whether waiting from the region rwsem is interruptible or not. No behavior change is intended. Reviewed-by: Vishal Verma Reviewed-by: Dave Jiang Reviewed-by: Ira Weiny Reviewed-by: Jonathan Cameron Tested-by: Fan Ni Link: https://lore.kernel.org/r/167601996393.1924368.2202255054618600069.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 6e099264185d05f50400ea494f5029264a4fe995 Author: Dan Williams Date: Fri Feb 10 01:05:57 2023 -0800 cxl/region: Add volatile region creation support Expand the region creation infrastructure to enable 'ram' (volatile-memory) regions. The internals of create_pmem_region_store() and create_pmem_region_show() are factored out into helpers __create_region() and __create_region_show() for the 'ram' case to reuse. Reviewed-by: Vishal Verma Reviewed-by: Gregory Price Reviewed-by: Dave Jiang Reviewed-by: Ira Weiny Reviewed-by: Jonathan Cameron Tested-by: Fan Ni Link: https://lore.kernel.org/r/167601995775.1924368.352616146815830591.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 1b9b7a6fd618239db47a83da39dff9e725a5865a Author: Dan Williams Date: Fri Feb 10 01:05:51 2023 -0800 cxl/region: Validate region mode vs decoder mode In preparation for a new region mode, do not, for example, allow 'ram' decoders to be assigned to 'pmem' regions and vice versa. Reviewed-by: Vishal Verma Reviewed-by: Gregory Price Reviewed-by: Dave Jiang Reviewed-by: Ira Weiny Reviewed-by: Jonathan Cameron Tested-by: Fan Ni Link: https://lore.kernel.org/r/167601995111.1924368.7459128614177994602.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit a8e7d558f7e9c2921de8b487baa01d23f068aa93 Author: Dan Williams Date: Fri Feb 10 01:05:45 2023 -0800 cxl/region: Support empty uuids for non-pmem regions Shipping versions of the cxl-cli utility expect all regions to have a 'uuid' attribute. In preparation for 'ram' regions, update the 'uuid' attribute to return an empty string which satisfies the current expectations of 'cxl list -R'. Otherwise, 'cxl list -R' fails in the presence of regions with the 'uuid' attribute missing. Force the attribute to be read-only as there is no facility or expectation for a 'ram' region to recall its uuid from one boot to the next. Reviewed-by: Vishal Verma Tested-by: Fan Ni Reviewed-by: Ira Weiny Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/167601994558.1924368.12612811533724694444.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 7d505f982f53189da819581ad4cc13c8cef76803 Author: Dan Williams Date: Fri Feb 10 01:05:39 2023 -0800 cxl/region: Add a mode attribute for regions In preparation for a new region type, "ram" regions, add a mode attribute to clarify the mode of the decoders that can be added to a region. Share the internals of mode_show() (for decoders) with the region case. Reviewed-by: Vishal Verma Reviewed-by: Dave Jiang Reviewed-by: Gregory Price Reviewed-by: Ira Weiny Reviewed-by: Jonathan Cameron Tested-by: Fan Ni Link: https://lore.kernel.org/r/167601993930.1924368.4305018565539515665.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 8752efd2c79c2f0d97011c414f07340b51c99499 Author: Dan Williams Date: Fri Feb 10 01:05:33 2023 -0800 cxl/Documentation: Update references to attributes added in v6.0 Prior to Linus deciding that the kernel that following v5.19 would be v6.0, the CXL ABI documentation already referenced v5.20. In preparation for updating these entries update the kernel version to v6.0. Reviewed-by: Vishal Verma Reviewed-by: Dave Jiang Reviewed-by: Gregory Price Reviewed-by: Ira Weiny Reviewed-by: Davidlohr Bueso Reviewed-by: Jonathan Cameron Tested-by: Fan Ni Link: https://lore.kernel.org/r/167601993360.1924368.14122892663883462813.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 2345df54249c6fb7779e2a72b427ee79ed3eaad5 Author: Dan Williams Date: Fri Feb 10 17:29:09 2023 -0800 cxl/memdev: Fix endpoint port removal Testing of ram region support [1], stimulates a long standing bug in cxl_detach_ep() where some cxl_ep_remove() cleanup is skipped due to inability to walk ports after dports have been unregistered. That results in a failure to re-register a memdev after the port is re-enabled leading to a crash like the following: cxl_port_setup_targets: cxl region4: cxl_host_bridge.0:port4 iw: 1 ig: 256 general protection fault, ... [..] RIP: 0010:cxl_region_setup_targets+0x897/0x9e0 [cxl_core] dev_name at include/linux/device.h:700 (inlined by) cxl_port_setup_targets at drivers/cxl/core/region.c:1155 (inlined by) cxl_region_setup_targets at drivers/cxl/core/region.c:1249 [..] Call Trace: attach_target+0x39a/0x760 [cxl_core] ? __mutex_unlock_slowpath+0x3a/0x290 cxl_add_to_region+0xb8/0x340 [cxl_core] ? lockdep_hardirqs_on+0x7d/0x100 discover_region+0x4b/0x80 [cxl_port] ? __pfx_discover_region+0x10/0x10 [cxl_port] device_for_each_child+0x58/0x90 cxl_port_probe+0x10e/0x130 [cxl_port] cxl_bus_probe+0x17/0x50 [cxl_core] Change the port ancestry walk to be by depth rather than by dport. This ensures that even if a port has unregistered its dports a deferred memdev cleanup will still be able to cleanup the memdev's interest in that port. The parent_port->dev.driver check is only needed for determining if the bottom up removal beat the top-down removal, but cxl_ep_remove() can always proceed given the port is pinned. That is, the two sources of cxl_ep_remove() are in cxl_detach_ep() and cxl_port_release(), and cxl_port_release() can not run if cxl_detach_ep() holds a reference. Fixes: 2703c16c75ae ("cxl/core/port: Add switch port enumeration") Link: http://lore.kernel.org/r/167564534874.847146.5222419648551436750.stgit@dwillia2-xfh.jf.intel.com [1] Reviewed-by: Vishal Verma Link: https://lore.kernel.org/r/167601992789.1924368.8083994227892600608.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit d12f9ad028062ff3ee2bfca3247f8812269d1f06 Author: Randy Dunlap Date: Wed Feb 8 23:13:44 2023 -0800 Documentation: isdn: correct spelling Correct spelling problems for Documentation/isdn/ as reported by codespell. Signed-off-by: Randy Dunlap Cc: Karsten Keil Cc: Jonathan Corbet Link: https://lore.kernel.org/r/20230209071400.31476-9-rdunlap@infradead.org Signed-off-by: Jakub Kicinski commit 33c6ce4a4c61c89c5d7b5c04f421deac1d47b4a0 Merge: 025a785ff0837 0785407e78d4b Author: Jakub Kicinski Date: Fri Feb 10 16:23:05 2023 -0800 Merge branch 'net-move-more-duplicate-code-of-ovs-and-tc-conntrack-into-nf_conntrack_ovs' Xin Long says: ==================== net: move more duplicate code of ovs and tc conntrack into nf_conntrack_ovs We've moved some duplicate code into nf_nat_ovs in: "net: eliminate the duplicate code in the ct nat functions of ovs and tc" This patchset addresses more code duplication in the conntrack of ovs and tc then creates nf_conntrack_ovs for them, and four functions will be extracted and moved into it: nf_ct_handle_fragments() nf_ct_skb_network_trim() nf_ct_helper() nf_ct_add_helper() ==================== Link: https://lore.kernel.org/r/cover.1675810210.git.lucien.xin@gmail.com Signed-off-by: Jakub Kicinski commit 0785407e78d4bce56e04d92a6c961900b3d513dd Author: Xin Long Date: Tue Feb 7 17:52:10 2023 -0500 net: extract nf_ct_handle_fragments to nf_conntrack_ovs Now handle_fragments() in OVS and TC have the similar code, and this patch removes the duplicate code by moving the function to nf_conntrack_ovs. Note that skb_clear_hash(skb) or skb->ignore_df = 1 should be done only when defrag returns 0, as it does in other places in kernel. Signed-off-by: Xin Long Reviewed-by: Simon Horman Reviewed-by: Aaron Conole Acked-by: Florian Westphal Signed-off-by: Jakub Kicinski commit 558d95e7e11cd9844806e804f4c1243f2c744b00 Author: Xin Long Date: Tue Feb 7 17:52:09 2023 -0500 net: sched: move frag check and tc_skb_cb update out of handle_fragments This patch has no functional changes and just moves frag check and tc_skb_cb update out of handle_fragments, to make it easier to move the duplicate code from handle_fragments() into nf_conntrack_ovs later. Signed-off-by: Xin Long Reviewed-by: Simon Horman Acked-by: Florian Westphal Signed-off-by: Jakub Kicinski commit 1b83bf4489cbc47d88976291cc967a17adb8e118 Author: Xin Long Date: Tue Feb 7 17:52:08 2023 -0500 openvswitch: move key and ovs_cb update out of handle_fragments This patch has no functional changes and just moves key and ovs_cb update out of handle_fragments, and skb_clear_hash() and skb->ignore_df change into handle_fragments(), to make it easier to move the duplicate code from handle_fragments() into nf_conntrack_ovs later. Note that it changes to pass info->family to handle_fragments() instead of key for the packet type check, as info->family is set according to key->eth.type in ovs_ct_copy_action() when creating the action. Signed-off-by: Xin Long Reviewed-by: Simon Horman Reviewed-by: Aaron Conole Acked-by: Florian Westphal Signed-off-by: Jakub Kicinski commit 67fc5d7ffbd4f9cf52adf166f5bc9a35fef37f24 Author: Xin Long Date: Tue Feb 7 17:52:07 2023 -0500 net: extract nf_ct_skb_network_trim function to nf_conntrack_ovs There are almost the same code in ovs_skb_network_trim() and tcf_ct_skb_network_trim(), this patch extracts them into a function nf_ct_skb_network_trim() and moves the function to nf_conntrack_ovs. Signed-off-by: Xin Long Reviewed-by: Simon Horman Reviewed-by: Aaron Conole Acked-by: Florian Westphal Signed-off-by: Jakub Kicinski commit c0c3ab63de603b40f89a9c0d7217209a8840d053 Author: Xin Long Date: Tue Feb 7 17:52:06 2023 -0500 net: create nf_conntrack_ovs for ovs and tc use Similar to nf_nat_ovs created by Commit ebddb1404900 ("net: move the nat function to nf_nat_ovs for ovs and tc"), this patch is to create nf_conntrack_ovs to get these functions shared by OVS and TC only. There are nf_ct_helper() and nf_ct_add_helper() from nf_conntrak_helper in this patch, and will be more in the following patches. Signed-off-by: Xin Long Reviewed-by: Simon Horman Reviewed-by: Aaron Conole Acked-by: Florian Westphal Signed-off-by: Jakub Kicinski commit 998ab667e23e38960d4f967648380292724fa348 Author: Cixi Geng Date: Wed Feb 1 17:13:00 2023 +0800 clk: sprd: Add dependency for SPRD_UMS512_CLK Add depends on and default for ums512 clk config. Signed-off-by: Cixi Geng Link: https://lore.kernel.org/r/20230201091300.3201-1-cixi.geng@linux.dev Signed-off-by: Stephen Boyd commit 35dcae535afc153fa83f2fe51c0812536c192c58 Author: Sergio Paracuellos Date: Mon Feb 6 09:33:05 2023 +0100 clk: ralink: fix 'mt7621_gate_is_enabled()' function Compiling clock driver with CONFIG_UBSAN enabled shows the following trace: UBSAN: shift-out-of-bounds in drivers/clk/ralink/clk-mt7621.c:121:15 shift exponent 131072 is too large for 32-bit type 'long unsigned int' CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.15.86 #0 Stack : ... Call Trace: [<80009a58>] show_stack+0x38/0x118 [<8045ce04>] dump_stack_lvl+0x60/0x80 [<80458868>] ubsan_epilogue+0x10/0x54 [<804590e0>] __ubsan_handle_shift_out_of_bounds+0x118/0x190 [<804c9a10>] mt7621_gate_is_enabled+0x98/0xa0 [<804bb774>] clk_core_is_enabled+0x34/0x90 [<80aad73c>] clk_disable_unused_subtree+0x98/0x1e4 [<80aad6d4>] clk_disable_unused_subtree+0x30/0x1e4 [<80aad6d4>] clk_disable_unused_subtree+0x30/0x1e4 [<80aad900>] clk_disable_unused+0x78/0x120 [<80002030>] do_one_initcall+0x54/0x1f0 [<80a922a4>] kernel_init_freeable+0x280/0x31c [<808047c4>] kernel_init+0x20/0x118 [<80003e58>] ret_from_kernel_thread+0x14/0x1c Shifting a value (131032) larger than the type (32 bit unsigned integer) is undefined behaviour in C. The problem is in 'mt7621_gate_is_enabled()' function which is using the 'BIT()' kernel macro with the bit index for the clock gate to check if the bit is set. When the clock gates structure is created driver is already setting 'bit_idx' using 'BIT()' macro, so we are wrongly applying an extra 'BIT()' mask here. Removing it solve the problem and makes this function correct. However when clock gating is correctly working, the kernel starts disabling those clocks that are not requested. Some drivers for this SoC are older than this clock driver itself. So to avoid the kernel to disable clocks that have been enabled until now, we must apply 'CLK_IS_CRITICAL' flag on gates initialization code. Fixes: 48df7a26f470 ("clk: ralink: add clock driver for mt7621 SoC") Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20230206083305.147582-1-sergio.paracuellos@gmail.com Signed-off-by: Stephen Boyd commit b30a027779a501034488506ae704c5e7d3607ed3 Author: Yang Li Date: Thu Feb 2 09:07:50 2023 +0800 clk: mediatek: clk-mtk: Remove unneeded semicolon ./drivers/clk/mediatek/clk-mtk.c:518:2-3: Unneeded semicolon Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3926 Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20230202010750.79515-1-yang.lee@linux.alibaba.com Reviewed-by: Matthias Brugger Signed-off-by: Stephen Boyd commit d10e9f88139e6b354924a242d458eb4b6a3b0d71 Author: Alain Volmat Date: Thu Feb 9 10:16:58 2023 +0100 dt-bindings: clock: remove stih416 bindings Remove the stih416 clock dt-bindings since this platform is no more supported. Signed-off-by: Alain Volmat Link: https://lore.kernel.org/r/20230209091659.1409-11-avolmat@me.com Acked-by: Krzysztof Kozlowski Signed-off-by: Stephen Boyd commit 8ffba409f495b735859f11dc776c328cc1068467 Author: Yinbo Zhu Date: Tue Nov 29 11:41:57 2022 +0800 dt-bindings: clock: add loongson-2 clock Add the Loongson-2 clock binding with DT schema format using json-schema. Signed-off-by: Yinbo Zhu Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221129034157.15036-4-zhuyinbo@loongson.cn Signed-off-by: Stephen Boyd commit f67d6b26649379f8520abe6a6c7ed335310bf01e Merge: 223ec6ab265ea ce4d9a1ea35ac Author: Andrew Morton Date: Fri Feb 10 15:34:48 2023 -0800 Merge branch 'mm-hotfixes-stable' into mm-stable To pick up depended-upon changes commit 01d63ce42546db93734949ba1cd44359f7f6ee02 Author: Yinbo Zhu Date: Tue Nov 29 11:41:54 2022 +0800 dt-bindings: clock: add loongson-2 clock include file This file defines all Loongson-2 SoC clock indexes, it should be included in the device tree in which there's device using the clocks. Signed-off-by: Yinbo Zhu Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221129034157.15036-1-zhuyinbo@loongson.cn Signed-off-by: Stephen Boyd commit 17bcd27a08a21397698edf143084d7c87ce17946 Author: Ilya Leoshkevich Date: Fri Feb 10 01:12:01 2023 +0100 libbpf: Fix alen calculation in libbpf_nla_dump_errormsg() The code assumes that everything that comes after nlmsgerr are nlattrs. When calculating their size, it does not account for the initial nlmsghdr. This may lead to accessing uninitialized memory. Fixes: bbf48c18ee0c ("libbpf: add error reporting in XDP") Signed-off-by: Ilya Leoshkevich Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230210001210.395194-8-iii@linux.ibm.com commit 64ea30d1a192e2866397169ebfe3d0109878d040 Author: Arnd Bergmann Date: Thu Dec 15 17:58:18 2022 +0100 clk: imx: fix compile testing imxrt1050 Randconfig testing revealed multiple issues with this driver: ERROR: modpost: missing MODULE_LICENSE() in drivers/clk/imx/clk-imxrt1050.o ERROR: modpost: "imx_clk_hw_pllv3" [drivers/clk/imx/clk-imxrt1050.ko] undefined! ERROR: modpost: "imx_clk_hw_pfd" [drivers/clk/imx/clk-imxrt1050.ko] undefined! Export the necessary symbols from the core clk driver and add the license and author tags. To find this type of problem more easily in the future, also enable building on other platforms, as we do for the other i.MX clk drivers. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20221215165836.2136448-1-arnd@kernel.org Acked-by: Jesse Taube Reviewed-by: Abel Vesa Signed-off-by: Stephen Boyd commit 202702e890a41412a7de970b84a970ba1d5001c9 Author: Ilya Leoshkevich Date: Fri Feb 10 01:12:00 2023 +0100 selftests/bpf: Attach to fopen()/fclose() in attach_probe malloc() and free() may be completely replaced by sanitizers, use fopen() and fclose() instead. Signed-off-by: Ilya Leoshkevich Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230210001210.395194-7-iii@linux.ibm.com commit 907300c7a66b3b58fc0039402aa14e0b9f11aad6 Author: Ilya Leoshkevich Date: Fri Feb 10 01:11:59 2023 +0100 selftests/bpf: Attach to fopen()/fclose() in uprobe_autoattach malloc() and free() may be completely replaced by sanitizers, use fopen() and fclose() instead. Signed-off-by: Ilya Leoshkevich Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230210001210.395194-6-iii@linux.ibm.com commit 24a87b477c65c33841c0511d268f46a226271502 Author: Ilya Leoshkevich Date: Fri Feb 10 01:11:58 2023 +0100 selftests/bpf: Forward SAN_CFLAGS and SAN_LDFLAGS to runqslower and libbpf To get useful results from the Memory Sanitizer, all code running in a process needs to be instrumented. When building tests with other sanitizers, it's not strictly necessary, but is also helpful. So make sure runqslower and libbpf are compiled with SAN_CFLAGS and linked with SAN_LDFLAGS. Signed-off-by: Ilya Leoshkevich Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230210001210.395194-5-iii@linux.ibm.com commit 0589d16475ae69da30dde8d0064b3b834ee25310 Author: Ilya Leoshkevich Date: Fri Feb 10 01:11:57 2023 +0100 selftests/bpf: Split SAN_CFLAGS and SAN_LDFLAGS Memory Sanitizer requires passing different options to CFLAGS and LDFLAGS: besides the mandatory -fsanitize=memory, one needs to pass header and library paths, and passing -L to a compilation step triggers -Wunused-command-line-argument. So introduce a separate variable for linker flags. Use $(SAN_CFLAGS) as a default in order to avoid complicating the ASan usage. Signed-off-by: Ilya Leoshkevich Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230210001210.395194-4-iii@linux.ibm.com commit 585bf4640ebe9ea4730b5b603347b4ba39731546 Author: Ilya Leoshkevich Date: Fri Feb 10 01:11:56 2023 +0100 tools: runqslower: Add EXTRA_CFLAGS and EXTRA_LDFLAGS support This makes it possible to add sanitizer flags. Signed-off-by: Ilya Leoshkevich Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230210001210.395194-3-iii@linux.ibm.com commit 795deb3f97472942780283e2af8f38625e3329aa Author: Ilya Leoshkevich Date: Fri Feb 10 01:11:55 2023 +0100 selftests/bpf: Quote host tools Using HOSTCC="ccache clang" breaks building the tests, since, when it's forwarded to e.g. bpftool, the child make sees HOSTCC=ccache and "clang" is considered a target. Fix by quoting it, and also HOSTLD and HOSTAR for consistency. Signed-off-by: Ilya Leoshkevich Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230210001210.395194-2-iii@linux.ibm.com commit 4ac1662105926c963d19e66caab16c77de01e681 Author: Serge Semin Date: Fri Jan 13 20:14:04 2023 +0300 dmaengine: dw-edma: Skip cleanup procedure if no private data found DW eDMA driver private data is preserved in the passed DW eDMA chip info structure. If the probe fails or for some reason the passed info object doesn't have the private data pointer initialized, halt the DMA device cleanup procedure to prevent system crashes. Link: https://lore.kernel.org/r/20230113171409.30470-23-Sergey.Semin@baikalelectronics.ru Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Vinod Koul commit 53c0e2f9b808fafaea7bec91eeec48046bcaaba0 Author: Serge Semin Date: Fri Jan 13 20:14:03 2023 +0300 dmaengine: dw-edma: Replace chip ID number with device name Using an abstract number as the DW eDMA chip identifier isn't practical because there can be more than one DW eDMA controller on the platform. Some may be detected as the PCIe Endpoints, and others may be embedded in DW PCIe Root Port/Endpoint controllers. An abstract number in, for instance, the IRQ handlers list, doesn't give a notion regarding their reference to the particular DMA controller. To preserve the code simplicity and support multi-eDMA platforms, use the parental device name to create the DW eDMA controller name. Link: https://lore.kernel.org/r/20230113171409.30470-22-Sergey.Semin@baikalelectronics.ru Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Vinod Koul commit 7119685cf49033b777c559ae4da093be2a9b225c Author: Serge Semin Date: Fri Jan 13 20:14:02 2023 +0300 dmaengine: dw-edma: Drop DT-region allocation There is no point in allocating additional memory for the data target regions passed to the client drivers. Use the already available structures defined in the dw_edma_chip instance. Note: these regions are unused in normal circumstances since they are specific to the case of eDMA being embedded into the DW PCIe Endpoint and having its CSRs accessible via an Endpoint BAR. This case is only known to be implemented as a part of the Synopsys PCIe Endpoint IP prototype kit. Link: https://lore.kernel.org/r/20230113171409.30470-21-Sergey.Semin@baikalelectronics.ru Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Vinod Koul commit b73bdc5054742d3945ae6e4daa18234c13871240 Author: Serge Semin Date: Tue Feb 1 23:46:14 2022 +0300 dmaengine: dw-edma: Use non-atomic io-64 methods Instead of splitting 64-bits IOs up into two 32-bits ones, use the existing non-atomic readq()/writeq() functions. By doing so we can discard CONFIG_64BIT #ifdefs from the code. Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Vinod Koul commit 5fdca4a995bcd4cf61bda40af154a730589dc524 Author: Serge Semin Date: Wed Jan 25 18:19:00 2023 +0300 dmaengine: dw-edma: Fix readq_ch() return value truncation Previously, readq_ch() did a 64-bit readq(), but truncated the result by storing it in the u32 "value". Change "value" to u64 to avoid the truncation. Note: the method is currently unused, so the bug hasn't caused any problem so far. Fixes: 04e0a39fc10f ("dmaengine: dw-edma: Add writeq() and readq() for 64 bits architectures") Signed-off-by: Serge Semin Signed-off-by: Bjorn Helgaas commit 6cb6e9c6050ac32c33466899b6488d5b6dd1d8e8 Author: Serge Semin Date: Fri Jan 13 20:14:00 2023 +0300 dmaengine: dw-edma: Use DMA engine device debugfs subdirectory Since all DW eDMA read and write channels are now installed in a framework of a single DMA engine device, move all the DW eDMA-specific debugfs nodes into a ready-to-use DMA-engine debugfs subdirectory. It's created during the DMA-device registration and can be found in the dma_device.dbg_dev_root field. Link: https://lore.kernel.org/r/20230113171409.30470-19-Sergey.Semin@baikalelectronics.ru Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Vinod Koul commit 3883d64449ffe80661a3280323bd89c0eb496fe3 Author: Serge Semin Date: Fri Jan 13 20:13:59 2023 +0300 dmaengine: dw-edma: Join read/write channels into a single device There is no point in splitting read/write channels. First of all, eDMA read and write channels belong to one physical controller. Secondly, channel differentiation can be done by filtering and dma_get_slave_caps(). Finally, having these channels handled separately needlessly complicates the code and causes this debugfs warning: debugfs: Directory '1f052000.pcie' with parent 'dmaengine' already present! Join the read/write channels into a single DMA device. Client drivers can choose the correct channel via the DMA slave direction setting. The default value is overridden by the dw_edma_device_caps() callback in accordance with the channel type. Link: https://lore.kernel.org/r/20230113171409.30470-18-Sergey.Semin@baikalelectronics.ru Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Vinod Koul commit d0152168538ea05695a403bc424da3e65aca67f3 Author: Serge Semin Date: Fri Jan 13 20:13:58 2023 +0300 dmaengine: dw-edma: Move eDMA data pointer to debugfs node descriptor The last thing that stops the debugfs part of the eDMA driver from supporting multi-eDMA platforms is keeping the eDMA private data pointer in the static area of the debugfs module. Since the debugfs node descriptors are now heap-allocated, we can freely move that pointer to being preserved in the descriptors. After the debugfs initialization procedure, that pointer will be used in the debugfs files getter to access the common CSRs space and the context CSRs spinlock. So the main part of this change is connected with the debugfs nodes descriptors initialization macros, which aside with already defined prototypes now require to have the DW eDMA private data pointer passed. [bhelgaas: squash in https://lore.kernel.org/r/20230130185101.2883245-1-arnd@kernel.org] Link: https://lore.kernel.org/r/20230113171409.30470-17-Sergey.Semin@baikalelectronics.ru Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Vinod Koul commit 79200d5851c8e7179f68a4a6f162d8f1bde4986f Author: Chen-Yu Tsai Date: Tue Jan 3 17:23:30 2023 +0800 clk: Honor CLK_OPS_PARENT_ENABLE in clk_core_is_enabled() In the previous commits that added CLK_OPS_PARENT_ENABLE, support for this flag was only added to rate change operations (rate setting and reparent) and disabling unused subtree. It was not added to the clock gate related operations. Any hardware driver that needs it for these operations will either see bogus results, or worse, hang. This has been seen on MT8192 and MT8195, where the imp_ii2_* clk drivers set this, but dumping debugfs clk_summary would cause it to hang. Prepare parent on prepare and enable parent on enable dependencies are already handled automatically by the core as part of its sequencing. Whether the case for "enable parent on prepare" should be supported by this flag or not is not clear, and thus ignored for now. This change solely fixes the handling of clk_core_is_enabled, i.e. enabling the parent clock when reading the hardware state. Unfortunately clk_core_is_enabled is called in a variety of places, sometimes with the enable clock already held. To avoid deadlocking, the core will ignore readouts and just return false if CLK_OPS_PARENT_ENABLE is set but the parent isn't currently enabled. Fixes: fc8726a2c021 ("clk: core: support clocks which requires parents enable (part 2)") Fixes: a4b3518d146f ("clk: core: support clocks which requires parents enable (part 1)") Signed-off-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230103092330.494102-1-wenst@chromium.org Tested-by: AngeloGioacchino Del Regno Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Stephen Boyd commit fbe870a72fd1ddc5e08c23764e23e5766f54aa87 Author: Richard Guy Briggs Date: Wed Feb 1 15:33:33 2023 -0500 io_uring,audit: don't log IORING_OP_MADVISE fadvise and madvise both provide hints for caching or access pattern for file and memory respectively. Skip them. Fixes: 5bd2182d58e9 ("audit,io_uring,io-wq: add some basic audit support to io_uring") Signed-off-by: Richard Guy Briggs Link: https://lore.kernel.org/r/b5dfdcd541115c86dbc774aa9dd502c964849c5f.1675282642.git.rgb@redhat.com Acked-by: Paul Moore Signed-off-by: Jens Axboe commit 099f37a539e616f762241ab999495fb8aa2f5971 Author: Abel Vesa Date: Thu Feb 9 09:45:09 2023 +0200 pinctrl: qcom: Add support for i2c specific pull feature Add support for the new i2c_pull property introduced for SM8550 setting a I2C specific pull mode on I2C able pins. Add the bit to the SM8550 specific driver while at it. Co-developed-by: Neil Armstrong Signed-off-by: Neil Armstrong Signed-off-by: Abel Vesa Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230209074510.4153294-1-abel.vesa@linaro.org Signed-off-by: Linus Walleij commit b1170c42141a71e07f9cf5976ecf71323cfcec32 Author: Jianlong Huang Date: Thu Feb 9 22:37:02 2023 +0800 pinctrl: starfive: Add StarFive JH7110 aon controller driver Add pinctrl driver for StarFive JH7110 SoC aon pinctrl controller. Co-developed-by: Emil Renner Berthing Signed-off-by: Emil Renner Berthing Signed-off-by: Jianlong Huang Signed-off-by: Hal Feng Link: https://lore.kernel.org/r/20230209143702.44408-5-hal.feng@starfivetech.com Signed-off-by: Linus Walleij commit 447976ab62c5dd6016f06a2f24798407398b5c07 Author: Jianlong Huang Date: Thu Feb 9 22:37:01 2023 +0800 pinctrl: starfive: Add StarFive JH7110 sys controller driver Add pinctrl driver for StarFive JH7110 SoC sys pinctrl controller. Co-developed-by: Emil Renner Berthing Signed-off-by: Emil Renner Berthing Signed-off-by: Jianlong Huang Signed-off-by: Hal Feng Link: https://lore.kernel.org/r/20230209143702.44408-4-hal.feng@starfivetech.com Signed-off-by: Linus Walleij commit 716129d3b76d060bdfbdfa6cec7091a9fe7729d2 Author: Jianlong Huang Date: Thu Feb 9 22:37:00 2023 +0800 dt-bindings: pinctrl: Add StarFive JH7110 aon pinctrl Add pinctrl bindings for StarFive JH7110 SoC aon pinctrl controller. Reviewed-by: Rob Herring Signed-off-by: Jianlong Huang Co-developed-by: Emil Renner Berthing Signed-off-by: Emil Renner Berthing Signed-off-by: Hal Feng Link: https://lore.kernel.org/r/20230209143702.44408-3-hal.feng@starfivetech.com Signed-off-by: Linus Walleij commit d6e0a660097dcdb80e7c5c859eb12f776060b02e Author: Jianlong Huang Date: Thu Feb 9 22:36:59 2023 +0800 dt-bindings: pinctrl: Add StarFive JH7110 sys pinctrl Add pinctrl bindings for StarFive JH7110 SoC sys pinctrl controller. Reviewed-by: Rob Herring Signed-off-by: Jianlong Huang Co-developed-by: Emil Renner Berthing Signed-off-by: Emil Renner Berthing Signed-off-by: Hal Feng Link: https://lore.kernel.org/r/20230209143702.44408-2-hal.feng@starfivetech.com Signed-off-by: Linus Walleij commit f89ea8f9ce9a76af895cada153fde6e39908aac0 Author: Tom Rix Date: Sat Feb 4 19:01:38 2023 -0800 clk: imx: set imx_clk_gpr_mux_ops storage-class-specifier to static smatch reports drivers/clk/imx/clk-gpr-mux.c:73:22: warning: symbol 'imx_clk_gpr_mux_ops' was not declared. Should it be static? imx_clk_gpr_mux_ops is only used in clk-gpr-mux.c, so it should be static. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230205030138.1723614-1-trix@redhat.com Fixes: ee394f636ad3 ("clk: imx: add clk-gpr-mux driver") Signed-off-by: Stephen Boyd commit 80323599e33f9c19287a1a3707481fb157b27052 Author: William Zhang Date: Thu Feb 9 12:02:46 2023 -0800 MAINTAINERS: Add entry for Broadcom Broadband SoC HS SPI drivers The driver and device tree doc were originally authored by Jonas Gorski and it has been updated from Broadcom recently including the dts yaml file and a new driver for the updated controller. Add Jonas Gorski and Broadcom engineers William Zhang and Kursad Oney as the maintainers. Signed-off-by: William Zhang Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20230209200246.141520-16-william.zhang@broadcom.com Signed-off-by: Mark Brown commit a38a2233f23b568ca06ca679fb2327447d6b0224 Author: William Zhang Date: Thu Feb 9 12:02:45 2023 -0800 spi: bcmbca-hsspi: Add driver for newer HSSPI controller The newer BCMBCA SoCs such as BCM6756, BCM4912 and BCM6855 include an updated SPI controller that add the capability to allow the driver to control chip select explicitly. Driver can control and keep cs low between the transfers natively. Hence the dummy cs workaround or prepend mode found in the bcm63xx-hsspi driver are no longer needed and this new driver is much cleaner. Signed-off-by: William Zhang Link: https://lore.kernel.org/r/20230209200246.141520-15-william.zhang@broadcom.com Signed-off-by: Mark Brown commit c6182a187b33cd00a763ac2490c0f5210b2c4742 Author: William Zhang Date: Thu Feb 9 12:02:44 2023 -0800 spi: bcm63xx-hsspi: Disable spi mem dual io read op support In general the controller supports SPI dual mode operation but the particular SPI flash dual io read op switches from single mode in cmd phase to dual mode in address and data phase. This is not compatible with prepend operation where cmd and address are sent out through the prepend buffer and they must use same the number of io pins. This patch disables these SPI flash dual io read ops through the mem_ops supports_op interface. This makes sure the SPI flash driver selects the compatible read ops at run time. Signed-off-by: William Zhang Link: https://lore.kernel.org/r/20230209200246.141520-14-william.zhang@broadcom.com Signed-off-by: Mark Brown commit 76a85704cb917e3b25e00f02d5fd46e4e0a9077d Author: William Zhang Date: Thu Feb 9 12:02:43 2023 -0800 spi: spi-mem: Allow controller supporting mem_ops without exec_op Currently exec_op is always required if controller driver provides mem_ops. But some controller such as bcm63xx-hsspi may only need to implement other operation like supports_op and use the default execution operation. This patch removes this restriction. Signed-off-by: William Zhang Link: https://lore.kernel.org/r/20230209200246.141520-13-william.zhang@broadcom.com Signed-off-by: Mark Brown commit b7a82103f7c3a9168f0077e35688d4f9ce97294e Author: William Zhang Date: Thu Feb 9 12:02:42 2023 -0800 spi: bcm63xx-hsspi: Add prepend mode support Due to the controller limitation to keep the chip select low during the bus idle time between the transfer, a dummy cs workaround was used when this driver was first upstreamed to the kernel. It basically picks the dummy cs as !actual_cs so typically dummy cs is 1 when most of the case only cs 0 is used in the board design. Then invert the polarity of both cs and tell the controller to start the transfers using dummy cs. Assuming both cs are active low before the inversion, effectively this keeps dummy cs high and actual cs low during the transfer and workaround the issue. This workaround implies that dummy cs 1 pin has to be set to chip selection function in the pinmux when the transfer clock is above 25MHz. The old chips likely have default pinmux set to chip select on the dummy cs pin so it works but this is not case for the new Broadband BCA chips and this workaround stop working. This is specifically an issue to support SPI NAND and SPI NOR flash because these flash devices can typically run at or above 100MHz. This patch utilizes the prepend feature of the controller to combine the multiple transfers in the same message to a single transfer when possible. This way there is no need to keep clock low between transfers and solve the issue without any hardware requirement. Multiple transfers within a SPI message may be combined into one transfer if the following are all true: * One or more half duplex write transfer in single bit mode * Optional full duplex read/write at the end * No delay and cs_change between transfers Most of the SPI device meets this requirements such as SPI NOR, SPI NAND flash, Broadcom SPI voice card and etc. For any SPI message that does not meet the above requirement to combine the transfers, we switch to original dummy cs mode but limit the clock rate to the safe 25MHz. This is the default auto transfer mode and it makes sure all the SPI message can be supported automatically under the hood. This patch also adds the driver sysfs node xfer_mode to provide the option for overriding the default auto mode and force it to dummy cs or prepend mode. Signed-off-by: William Zhang Link: https://lore.kernel.org/r/20230209200246.141520-12-william.zhang@broadcom.com Signed-off-by: Mark Brown commit 811ff802aaf878ebbbaeac0307a0164fa21e7d40 Author: William Zhang Date: Thu Feb 9 12:02:41 2023 -0800 spi: bcm63xx-hsspi: Fix multi-bit mode setting Currently the driver always sets the controller to dual data bit mode for both tx and rx data in the profile mode control register even for single data bit transfer. Luckily the opcode is set correctly according to SPI transfer data bit width so it does not actually cause issues. This change fixes the problem by setting tx and rx data bit mode field correctly according to the actual SPI transfer tx and rx data bit width. Fixes: 142168eba9dc ("spi: bcm63xx-hsspi: add bcm63xx HSSPI driver") Signed-off-by: William Zhang Link: https://lore.kernel.org/r/20230209200246.141520-11-william.zhang@broadcom.com Signed-off-by: Mark Brown commit c00d5e93ea018786d98670fc1d0dab4c36c2217c Author: William Zhang Date: Thu Feb 9 12:02:40 2023 -0800 spi: bcm63xx-hsspi: Handle cs_change correctly The kernel SPI interface includes the cs_change flag that alters how the CS behaves. If we're in the middle of transfers, it tells us to unselect the CS momentarily since the target device requires that. If we're at the end of a transfer, it tells us to keep the CS selected, perhaps because the next transfer is likely targeted to the same device. We implement this scheme in the HSSPI driver in this change. Prior to this change, the CS would toggle momentarily if cs_change was set for the last transfer. This can be ignored by some or most devices, but the Microchip TPM2 device does not ignore it. With the change, the behavior is corrected and the 'glitch' is eliminated. Signed-off-by: Kursad Oney Signed-off-by: William Zhang Link: https://lore.kernel.org/r/20230209200246.141520-10-william.zhang@broadcom.com Signed-off-by: Mark Brown commit 6e80133abeb09721ec4601de5b1e68be67135309 Author: William Zhang Date: Thu Feb 9 12:02:39 2023 -0800 spi: export spi_transfer_cs_change_delay_exec function For SPI controller that implements transfer_one_message, it needs to insert the delay that required by cs change event between the transfers. Add a wrapper for the local function _spi_transfer_cs_change_delay_exec and export it for SPI controller driver to use. Signed-off-by: William Zhang Link: https://lore.kernel.org/r/20230209200246.141520-9-william.zhang@broadcom.com Signed-off-by: Mark Brown commit 2f2be5102480b1058182fa6c4b1e5c1732d6760c Author: Peter Foley Date: Thu Jan 12 23:49:07 2023 -0500 um: Make the definition of cpu_data more compatible Match the x86 implementation to improve build errors. Noticed when building allyesconfig. e.g. ../arch/um/include/asm/processor-generic.h:94:19: error: called object is not a function or function pointer 94 | #define cpu_data (&boot_cpu_data) | ~^~~~~~~~~~~~~~~ ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:2157:16: note: in expansion of macro ‘cpu_data’ 2157 | return cpu_data(first_cpu_of_numa_node).apicid; Signed-off-by: Peter Foley Signed-off-by: Richard Weinberger commit 5541992e512de8c9133110809f767bd1b54ee10d Author: Ammar Faizi Date: Sat Dec 24 00:23:38 2022 +0700 x86: um: vdso: Add '%rcx' and '%r11' to the syscall clobber list The 'syscall' instruction clobbers '%rcx' and '%r11', but they are not listed in the inline Assembly that performs the syscall instruction. No real bug is found. It wasn't buggy by luck because '%rcx' and '%r11' are caller-saved registers, and not used in the functions, and the functions are never inlined. Add them to the clobber list for code correctness. Fixes: f1c2bb8b9964ed31de988910f8b1cfb586d30091 ("um: implement a x86_64 vDSO") Signed-off-by: Ammar Faizi Signed-off-by: Richard Weinberger commit 0438aadfa69a345136f5ba4f582e0f769450ee0d Author: David Gow Date: Sat Dec 17 12:44:36 2022 +0800 rust: arch/um: Add support for CONFIG_RUST under x86_64 UML CONFIG_RUST currently supports x86_64, but does not support it under UML. With the previous patches applied, adding support is trivial: add CONFIG_HAVE_RUST to UML if X86_64 is set. The scripts/generate_rust_target.rs file already checks for CONFIG_X86_64, not CONFIG_X86, so is prepared for UML support. The Rust support does not currently support X86_32. Also, update the Rust architecture support documentation to not that this is being maintained: I intend to look after this as best I can. Signed-off-by: David Gow Reviewed-by: Sergio González Collado Tested-by: Sergio González Collado Signed-off-by: Richard Weinberger commit 8849818679478933dd1d9718741f4daa3f4e8b86 Author: David Gow Date: Sat Dec 17 12:44:35 2022 +0800 rust: arch/um: Disable FP/SIMD instruction to match x86 The kernel disables all SSE and similar FP/SIMD instructions on x86-based architectures (partly because we shouldn't be using floats in the kernel, and partly to avoid the need for stack alignment, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) UML does not do the same thing, which isn't in itself a problem, but does add to the list of differences between UML and "normal" x86 builds. In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when building with SSE, so disabling it fixes rust builds with earlier compiler versions, see: https://github.com/Rust-for-Linux/linux/pull/881 Signed-off-by: David Gow Reviewed-by: Sergio González Collado Signed-off-by: Richard Weinberger commit 905a77077573056d7af508f35373f66ed8b4a39e Author: David Gow Date: Sat Dec 17 12:44:34 2022 +0800 rust: arch/um: Use 'pie' relocation mode under UML UML expects a position independent executable for some reason, so tell rustc to generate pie objects. Otherwise we get a bunch of relocations we can't deal with in libcore. Signed-off-by: David Gow Signed-off-by: Richard Weinberger commit dede211f23e4b4a4d5d080c9923cc4df1e1fac87 Merge: 1b929c02afd37 4e197ee880c24 Author: Stephen Boyd Date: Fri Feb 10 11:26:09 2023 -0800 Merge tag 'clk-imx-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux into clk-imx Pull i.MX clk driver updates from Abel Vesa: - Free the imx_uart_clocks even if imx_register_uart_clocks returns early - Get the stdout clocks count from device tree - Drop the clock count argument from imx_register_uart_clocks. - Keep the uart clocks on i.MX93 for when earlycon is used - Fix SPDX comment in i.MX6SLL clocks bindings header - Drop some unnecessary spaces from i.MX8ULP clocks bindings header - Add a new clk-gpr-mux clock type and use it on i.MX6Q to add ENET ref clocks - Add the imx_obtain_fixed_of_clock for allowing to add a clock that is not configured via devicetree - Fix the ENET1 gate configuration for i.MX6UL according to the reference manual - Add ENET refclock mux support for i.MX6UL * tag 'clk-imx-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux: clk: imx6ul: add ethernet refclock mux support clk: imx6ul: fix enet1 gate configuration clk: imx: add imx_obtain_fixed_of_clock() clk: imx6q: add ethernet refclock mux support clk: imx: add clk-gpr-mux driver dt-bindings: imx8ulp: clock: no spaces before tabs clk: imx6sll: add proper spdx license identifier clk: imx: imx93: invoke imx_register_uart_clocks clk: imx: remove clk_count of imx_register_uart_clocks clk: imx: get stdout clk count from device tree clk: imx: avoid memory leak commit ad4a4d3aff21539263326201d7f5806ea0c1de90 Merge: 960046361e719 ad678be423872 Author: Catalin Marinas Date: Fri Feb 10 18:52:21 2023 +0000 Merge branch 'for-next/signal' into for-next/core * for-next/signal: : Signal handling cleanups arm64/signal: Only read new data when parsing the ZT context arm64/signal: Only read new data when parsing the ZA context arm64/signal: Only read new data when parsing the SVE context arm64/signal: Avoid rereading context frame sizes arm64/signal: Make interface for restore_fpsimd_context() consistent arm64/signal: Remove redundant size validation from parse_user_sigframe() arm64/signal: Don't redundantly verify FPSIMD magic commit 960046361e719e488de08ad9fcf8f907692161e6 Merge: 156010ed9c2ac bfffd469e5296 Author: Catalin Marinas Date: Fri Feb 10 18:52:04 2023 +0000 Merge branch 'for-next/sysreg-hwcaps' into for-next/core * for-next/sysreg-hwcaps: : Make use of sysreg helpers for hwcaps arm64/cpufeature: Use helper macros to specify hwcaps arm64/cpufeature: Always use symbolic name for feature value in hwcaps arm64/sysreg: Initial unsigned annotations for ID registers arm64/sysreg: Initial annotation of signed ID registers arm64/sysreg: Allow enumerations to be declared as signed or unsigned commit 156010ed9c2ac1e9df6c11b1f688cf8a6e0152e6 Merge: e8a709dc2a915 1abf363d085cf b2482807fbd48 2c4192c0a7f2d 004fc58f917cf 9442d05bba6c1 8ced928019353 59b37fe52f499 4f2c9bf16a4bc dc4824faa265d a088cf8eee126 c68cf5285e189 a5f61cc636f48 Author: Catalin Marinas Date: Fri Feb 10 18:51:49 2023 +0000 Merge branches 'for-next/sysreg', 'for-next/sme', 'for-next/kselftest', 'for-next/misc', 'for-next/sme2', 'for-next/tpidr2', 'for-next/scs', 'for-next/compat-hwcap', 'for-next/ftrace', 'for-next/efi-boot-mmu-on', 'for-next/ptrauth' and 'for-next/pseudo-nmi', remote-tracking branch 'arm64/for-next/perf' into for-next/core * arm64/for-next/perf: perf: arm_spe: Print the version of SPE detected perf: arm_spe: Add support for SPEv1.2 inverted event filtering perf: Add perf_event_attr::config3 drivers/perf: fsl_imx8_ddr_perf: Remove set-but-not-used variable perf: arm_spe: Support new SPEv1.2/v8.7 'not taken' event perf: arm_spe: Use new PMSIDR_EL1 register enums perf: arm_spe: Drop BIT() and use FIELD_GET/PREP accessors arm64/sysreg: Convert SPE registers to automatic generation arm64: Drop SYS_ from SPE register defines perf: arm_spe: Use feature numbering for PMSEVFR_EL1 defines perf/marvell: Add ACPI support to TAD uncore driver perf/marvell: Add ACPI support to DDR uncore driver perf/arm-cmn: Reset DTM_PMU_CONFIG at probe drivers/perf: hisi: Extract initialization of "cpa_pmu->pmu" drivers/perf: hisi: Simplify the parameters of hisi_pmu_init() drivers/perf: hisi: Advertise the PERF_PMU_CAP_NO_EXCLUDE capability * for-next/sysreg: : arm64 sysreg and cpufeature fixes/updates KVM: arm64: Use symbolic definition for ISR_EL1.A arm64/sysreg: Add definition of ISR_EL1 arm64/sysreg: Add definition for ICC_NMIAR1_EL1 arm64/cpufeature: Remove 4 bit assumption in ARM64_FEATURE_MASK() arm64/sysreg: Fix errors in 32 bit enumeration values arm64/cpufeature: Fix field sign for DIT hwcap detection * for-next/sme: : SME-related updates arm64/sme: Optimise SME exit on syscall entry arm64/sme: Don't use streaming mode to probe the maximum SME VL arm64/ptrace: Use system_supports_tpidr2() to check for TPIDR2 support * for-next/kselftest: (23 commits) : arm64 kselftest fixes and improvements kselftest/arm64: Don't require FA64 for streaming SVE+ZA tests kselftest/arm64: Copy whole EXTRA context kselftest/arm64: Fix enumeration of systems without 128 bit SME for SSVE+ZA kselftest/arm64: Fix enumeration of systems without 128 bit SME kselftest/arm64: Don't require FA64 for streaming SVE tests kselftest/arm64: Limit the maximum VL we try to set via ptrace kselftest/arm64: Correct buffer size for SME ZA storage kselftest/arm64: Remove the local NUM_VL definition kselftest/arm64: Verify simultaneous SSVE and ZA context generation kselftest/arm64: Verify that SSVE signal context has SVE_SIG_FLAG_SM set kselftest/arm64: Remove spurious comment from MTE test Makefile kselftest/arm64: Support build of MTE tests with clang kselftest/arm64: Initialise current at build time in signal tests kselftest/arm64: Don't pass headers to the compiler as source kselftest/arm64: Remove redundant _start labels from FP tests kselftest/arm64: Fix .pushsection for strings in FP tests kselftest/arm64: Run BTI selftests on systems without BTI kselftest/arm64: Fix test numbering when skipping tests kselftest/arm64: Skip non-power of 2 SVE vector lengths in fp-stress kselftest/arm64: Only enumerate power of two VLs in syscall-abi ... * for-next/misc: : Miscellaneous arm64 updates arm64/mm: Intercept pfn changes in set_pte_at() Documentation: arm64: correct spelling arm64: traps: attempt to dump all instructions arm64: Apply dynamic shadow call stack patching in two passes arm64: el2_setup.h: fix spelling typo in comments arm64: Kconfig: fix spelling arm64: cpufeature: Use kstrtobool() instead of strtobool() arm64: Avoid repeated AA64MMFR1_EL1 register read on pagefault path arm64: make ARCH_FORCE_MAX_ORDER selectable * for-next/sme2: (23 commits) : Support for arm64 SME 2 and 2.1 arm64/sme: Fix __finalise_el2 SMEver check kselftest/arm64: Remove redundant _start labels from zt-test kselftest/arm64: Add coverage of SME 2 and 2.1 hwcaps kselftest/arm64: Add coverage of the ZT ptrace regset kselftest/arm64: Add SME2 coverage to syscall-abi kselftest/arm64: Add test coverage for ZT register signal frames kselftest/arm64: Teach the generic signal context validation about ZT kselftest/arm64: Enumerate SME2 in the signal test utility code kselftest/arm64: Cover ZT in the FP stress test kselftest/arm64: Add a stress test program for ZT0 arm64/sme: Add hwcaps for SME 2 and 2.1 features arm64/sme: Implement ZT0 ptrace support arm64/sme: Implement signal handling for ZT arm64/sme: Implement context switching for ZT0 arm64/sme: Provide storage for ZT0 arm64/sme: Add basic enumeration for SME2 arm64/sme: Enable host kernel to access ZT0 arm64/sme: Manually encode ZT0 load and store instructions arm64/esr: Document ISS for ZT0 being disabled arm64/sme: Document SME 2 and SME 2.1 ABI ... * for-next/tpidr2: : Include TPIDR2 in the signal context kselftest/arm64: Add test case for TPIDR2 signal frame records kselftest/arm64: Add TPIDR2 to the set of known signal context records arm64/signal: Include TPIDR2 in the signal context arm64/sme: Document ABI for TPIDR2 signal information * for-next/scs: : arm64: harden shadow call stack pointer handling arm64: Stash shadow stack pointer in the task struct on interrupt arm64: Always load shadow stack pointer directly from the task struct * for-next/compat-hwcap: : arm64: Expose compat ARMv8 AArch32 features (HWCAPs) arm64: Add compat hwcap SSBS arm64: Add compat hwcap SB arm64: Add compat hwcap I8MM arm64: Add compat hwcap ASIMDBF16 arm64: Add compat hwcap ASIMDFHM arm64: Add compat hwcap ASIMDDP arm64: Add compat hwcap FPHP and ASIMDHP * for-next/ftrace: : Add arm64 support for DYNAMICE_FTRACE_WITH_CALL_OPS arm64: avoid executing padding bytes during kexec / hibernation arm64: Implement HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS arm64: ftrace: Update stale comment arm64: patching: Add aarch64_insn_write_literal_u64() arm64: insn: Add helpers for BTI arm64: Extend support for CONFIG_FUNCTION_ALIGNMENT ACPI: Don't build ACPICA with '-Os' Compiler attributes: GCC cold function alignment workarounds ftrace: Add DYNAMIC_FTRACE_WITH_CALL_OPS * for-next/efi-boot-mmu-on: : Permit arm64 EFI boot with MMU and caches on arm64: kprobes: Drop ID map text from kprobes blacklist arm64: head: Switch endianness before populating the ID map efi: arm64: enter with MMU and caches enabled arm64: head: Clean the ID map and the HYP text to the PoC if needed arm64: head: avoid cache invalidation when entering with the MMU on arm64: head: record the MMU state at primary entry arm64: kernel: move identity map out of .text mapping arm64: head: Move all finalise_el2 calls to after __enable_mmu * for-next/ptrauth: : arm64 pointer authentication cleanup arm64: pauth: don't sign leaf functions arm64: unify asm-arch manipulation * for-next/pseudo-nmi: : Pseudo-NMI code generation optimisations arm64: irqflags: use alternative branches for pseudo-NMI logic arm64: add ARM64_HAS_GIC_PRIO_RELAXED_SYNC cpucap arm64: make ARM64_HAS_GIC_PRIO_MASKING depend on ARM64_HAS_GIC_CPUIF_SYSREGS arm64: rename ARM64_HAS_IRQ_PRIO_MASKING to ARM64_HAS_GIC_PRIO_MASKING arm64: rename ARM64_HAS_SYSREG_GIC_CPUIF to ARM64_HAS_GIC_CPUIF_SYSREGS commit 2ea9b08a661274b9b7b182327bf6ffe29605d671 Author: Mauro Lima Date: Fri Feb 10 13:41:58 2023 -0300 spi: intel: Update help text of PCI and Platform drivers Modern intel hardware uses controllers that work in hardware sequencing mode. In this mode, the controller exposes a subset of operations, like read, write and erase, making it easier and less error-prone for use. On the other hand, most of the controllers handled by the platform driver use software sequencing that exposes the entire set of operations i.e. exposes the low level SPI-NOR opcodes to the software for use. Update PCI and Platform help text with this information. Signed-off-by: Mauro Lima Acked-by: Mika Westerberg Link: https://lore.kernel.org/r/20230210164158.211065-1-mauro.lima@eclypsium.com Signed-off-by: Mark Brown commit 9330e13e6b802b936e673f9feb139ae51f056f7e Author: Arnd Bergmann Date: Fri Feb 10 18:10:22 2023 +0100 ARM: reorder defconfig files Some Kconfig options have moved around, so adapt the defconfig files accordingly. Signed-off-by: Arnd Bergmann commit 55d5c3a386d74d3f374023c8fa386f524a9192e8 Author: Dave Chinner Date: Sat Feb 11 04:12:06 2023 +1100 xfs: don't assert fail on transaction cancel with deferred ops We can error out of an allocation transaction when updating BMBT blocks when things go wrong. This can be a btree corruption, and unexpected ENOSPC, etc. In these cases, we already have deferred ops queued for the first allocation that has been done, and we just want to cancel out the transaction and shut down the filesystem on error. In fact, we do just that for production systems - the assert that we can't have a transaction with defer ops attached unless we are already shut down is bogus and gets in the way of debugging whatever issue is actually causing the transaction to be cancelled. Remove the assert because it is causing spurious test failures to hang test machines. Signed-off-by: Dave Chinner Reviewed-by: Allison Henderson Reviewed-by: Darrick J. Wong commit 692b6cddeb65a5170c1e63d25b1ffb7822e80f7d Author: Dave Chinner Date: Sat Feb 11 04:11:06 2023 +1100 xfs: t_firstblock is tracking AGs not blocks The tp->t_firstblock field is now raelly tracking the highest AG we have locked, not the block number of the highest allocation we've made. It's purpose is to prevent AGF locking deadlocks, so rename it to "highest AG" and simplify the implementation to just track the agno rather than a fsbno. Signed-off-by: Dave Chinner Reviewed-by: Allison Henderson Reviewed-by: Darrick J. Wong commit 36b6ad2d9cb81b0d52ae1598286ca5809cd39003 Author: Dave Chinner Date: Sat Feb 11 04:10:06 2023 +1100 xfs: drop firstblock constraints from allocation setup Now that xfs_alloc_vextent() does all the AGF deadlock prevention filtering for multiple allocations in a single transaction, we no longer need the allocation setup code to care about what AGs we might already have locked. Hence we can remove all the "nullfb" conditional logic in places like xfs_bmap_btalloc() and instead have them focus simply on setting up locality constraints. If the allocation fails due to AGF lock filtering in xfs_alloc_vextent, then we just fall back as we normally do to more relaxed allocation constraints. As a result, any allocation that allows AG scanning (i.e. not confined to a single AG) and does not force a worst case full filesystem scan will now be able to attempt allocation from AGs lower than that defined by tp->t_firstblock. This is because xfs_alloc_vextent() allows try-locking of the AGFs and hence enables low space algorithms to at least -try- to get space from AGs lower than the one that we have currently locked and allocated from. This is a significant improvement in the low space allocation algorithm. Signed-off-by: Dave Chinner Reviewed-by: Allison Henderson Reviewed-by: Darrick J. Wong commit d5753847b216db0e553e8065aa825cfe497ad143 Author: Dave Chinner Date: Sat Feb 11 04:09:06 2023 +1100 xfs: block reservation too large for minleft allocation When we enter xfs_bmbt_alloc_block() without having first allocated a data extent (i.e. tp->t_firstblock == NULLFSBLOCK) because we are doing something like unwritten extent conversion, the transaction block reservation is used as the minleft value. This works for operations like unwritten extent conversion, but it assumes that the block reservation is only for a BMBT split. THis is not always true, and sometimes results in larger than necessary minleft values being set. We only actually need enough space for a btree split, something we already handle correctly in xfs_bmapi_write() via the xfs_bmapi_minleft() calculation. We should use xfs_bmapi_minleft() in xfs_bmbt_alloc_block() to calculate the number of blocks a BMBT split on this inode is going to require, not use the transaction block reservation that contains the maximum number of blocks this transaction may consume in it... Signed-off-by: Dave Chinner Reviewed-by: Allison Henderson Reviewed-by: Darrick J. Wong commit f08f984c63e9980614ae3a0a574b31eaaef284b2 Author: Dave Chinner Date: Sat Feb 11 04:08:06 2023 +1100 xfs: prefer free inodes at ENOSPC over chunk allocation When an XFS filesystem has free inodes in chunks already allocated on disk, it will still allocate new inode chunks if the target AG has no free inodes in it. Normally, this is a good idea as it preserves locality of all the inodes in a given directory. However, at ENOSPC this can lead to using the last few remaining free filesystem blocks to allocate a new chunk when there are many, many free inodes that could be allocated without consuming free space. This results in speeding up the consumption of the last few blocks and inode create operations then returning ENOSPC when there free inodes available because we don't have enough block left in the filesystem for directory creation reservations to proceed. Hence when we are near ENOSPC, we should be attempting to preserve the remaining blocks for directory block allocation rather than using them for unnecessary inode chunk creation. This particular behaviour is exposed by xfs/294, when it drives to ENOSPC on empty file creation whilst there are still thousands of free inodes available for allocation in other AGs in the filesystem. Hence, when we are within 1% of ENOSPC, change the inode allocation behaviour to prefer to use existing free inodes over allocating new inode chunks, even though it results is poorer locality of the data set. It is more important for the allocations to be space efficient near ENOSPC than to have optimal locality for performance, so lets modify the inode AG selection code to reflect that fact. This allows generic/294 to not only pass with this allocator rework patchset, but to increase the number of post-ENOSPC empty inode allocations to from ~600 to ~9080 before we hit ENOSPC on the directory create transaction reservation. Signed-off-by: Dave Chinner Reviewed-by: Allison Henderson Reviewed-by: Darrick J. Wong commit 1dd0510f6d4b85616a36aabb9be38389467122d9 Author: Dave Chinner Date: Sat Feb 11 04:07:06 2023 +1100 xfs: fix low space alloc deadlock I've recently encountered an ABBA deadlock with g/476. The upcoming changes seem to make this much easier to hit, but the underlying problem is a pre-existing one. Essentially, if we select an AG for allocation, then lock the AGF and then fail to allocate for some reason (e.g. minimum length requirements cannot be satisfied), then we drop out of the allocation with the AGF still locked. The caller then modifies the allocation constraints - usually loosening them up - and tries again. This can result in trying to access AGFs that are lower than the AGF we already have locked from the failed attempt. e.g. the failed attempt skipped several AGs before failing, so we have locks an AG higher than the start AG. Retrying the allocation from the start AG then causes us to violate AGF lock ordering and this can lead to deadlocks. The deadlock exists even if allocation succeeds - we can do a followup allocations in the same transaction for BMBT blocks that aren't guaranteed to be in the same AG as the original, and can move into higher AGs. Hence we really need to move the tp->t_firstblock tracking down into xfs_alloc_vextent() where it can be set when we exit with a locked AG. xfs_alloc_vextent() can also check there if the requested allocation falls within the allow range of AGs set by tp->t_firstblock. If we can't allocate within the range set, we have to fail the allocation. If we are allowed to to non-blocking AGF locking, we can ignore the AG locking order limitations as we can use try-locks for the first iteration over requested AG range. This invalidates a set of post allocation asserts that check that the allocation is always above tp->t_firstblock if it is set. Because we can use try-locks to avoid the deadlock in some circumstances, having a pre-existing locked AGF doesn't always prevent allocation from lower order AGFs. Hence those ASSERTs need to be removed. Signed-off-by: Dave Chinner Reviewed-by: Allison Henderson Reviewed-by: Darrick J. Wong commit dd07bb8b6baf2389caff221f043d9188ce6bab8c Author: Darrick J. Wong Date: Fri Feb 10 09:06:06 2023 -0800 xfs: revert commit 8954c44ff477 The name passed into __xfs_xattr_put_listent is exactly namelen bytes long and not null-terminated. Passing namelen+1 to the strscpy function strscpy(offset, (char *)name, namelen + 1); is therefore wrong. Go back to the old code, which works fine because strncpy won't find a null in @name and stops after namelen bytes. It really could be a memcpy call, but it worked for years. Reported-by: syzbot+898115bc6d7140437215@syzkaller.appspotmail.com Fixes: 8954c44ff477 ("xfs: use strscpy() to instead of strncpy()") Signed-off-by: Darrick J. Wong commit 49742e9edab371024aefb828e094c5eba08bd084 Author: Abel Vesa Date: Wed Feb 8 20:34:21 2023 +0200 phy: qcom-qmp-combo: Add support for SM8550 Add SM8550 specific register layout and table configs. Signed-off-by: Abel Vesa Reviewed-by: Johan Hovold Link: https://lore.kernel.org/r/20230208183421.2874423-7-abel.vesa@linaro.org Signed-off-by: Vinod Koul commit dc55a1231e54b47bbad03af76697e1a1b4acdd70 Author: Abel Vesa Date: Wed Feb 8 20:34:20 2023 +0200 phy: qcom-qmp: Add v6 DP register offsets The new SM8550 SoC bumps up the HW version of QMP phy to v6. Add the new DP specific offsets in the generic qmp header file. Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230208183421.2874423-6-abel.vesa@linaro.org Signed-off-by: Vinod Koul commit 39bbf82d8c2b1becfdf10e6f72a6d8c7649d3731 Author: Abel Vesa Date: Wed Feb 8 20:34:19 2023 +0200 phy: qcom-qmp: pcs-usb: Add v6 register offsets The new SM8550 SoC bumps up the HW version of QMP phy to v6 for USB. Add the new PCS USB specific offsets in a dedicated header file. Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230208183421.2874423-5-abel.vesa@linaro.org Signed-off-by: Vinod Koul commit 1c5a654f0d4b698df317013936c26eb8fcf4faef Author: Abel Vesa Date: Wed Feb 8 20:34:18 2023 +0200 dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp: Document SM8550 compatible Add the SM8550 compatible to the list. Signed-off-by: Abel Vesa Acked-by: Rob Herring Reviewed-by: Johan Hovold Link: https://lore.kernel.org/r/20230208183421.2874423-4-abel.vesa@linaro.org Signed-off-by: Vinod Koul commit 80090810f5d332bc41f1e64382ceca41fb1e16e3 Author: Abel Vesa Date: Wed Feb 8 20:34:17 2023 +0200 phy: qcom: Add QCOM SNPS eUSB2 driver The SM8550 SoC uses Synopsis eUSB2 PHY for USB 2.0. Add a new driver for it. The driver is based on a downstream implementation. Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230208183421.2874423-3-abel.vesa@linaro.org Signed-off-by: Vinod Koul commit 5ccacdbed44e6816036ced7f84b604629203923f Author: Abel Vesa Date: Wed Feb 8 20:34:16 2023 +0200 dt-bindings: phy: Add qcom,snps-eusb2-phy schema file The SM8550 SoC uses Synopsis eUSB2 PHY. Add a dt-binding schema for the new driver. Signed-off-by: Abel Vesa Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230208183421.2874423-2-abel.vesa@linaro.org Signed-off-by: Vinod Koul commit 2ee8333529857a702475ce36d3af3ecbbcf5af5a Author: Thomas Weißschuh Date: Thu Feb 9 18:56:48 2023 -0800 xfs: 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: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 269b70e85282e7d754746498962b267392e9da99 Author: Abel Vesa Date: Wed Feb 8 20:00:17 2023 +0200 phy: qcom-qmp-pcie: Add support for SM8550 g3x2 and g4x2 PCIEs Add the SM8550 both g4 and g3 configurations. In addition, there is a new "lane shared" table that needs to be configured for g4, along with the No-CSR list of resets. The no-CSR allows resetting the PHY without actually dropping the PHY configuration. The no-CSR needs to be deasserted only after the PHY has been configured and the PLL has stabilized. Co-developed-by: Neil Armstrong Signed-off-by: Neil Armstrong Signed-off-by: Abel Vesa Reviewed-by: Dmitry Baryshkov Reviewed-by: Johan Hovold Link: https://lore.kernel.org/r/20230208180020.2761766-9-abel.vesa@linaro.org Signed-off-by: Vinod Koul commit d38360e12fbc1b41ae6a2a243ce0b01ce27e5cab Author: Abel Vesa Date: Wed Feb 8 20:00:16 2023 +0200 phy: qcom-qmp: qserdes-lane-shared: Add v6 register offsets The new SM8550 SoC bumps up the HW version of QMP phy to v6.20 for PCIE g4x2. Add the new lane shared PCIE specific offsets in a dedicated header file. Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230208180020.2761766-8-abel.vesa@linaro.org Signed-off-by: Vinod Koul commit cea3e9435e63237aa010e5868f9a38cfccec89f1 Author: Abel Vesa Date: Wed Feb 8 20:00:15 2023 +0200 phy: qcom-qmp: qserdes-txrx: Add v6.20 register offsets The new SM8550 SoC bumps up the HW version of QMP phy to v6.20 for PCIE g4x2. Add the new qserdes TX RX PCIE specific offsets in a dedicated header file. Signed-off-by: Abel Vesa Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230208180020.2761766-7-abel.vesa@linaro.org Signed-off-by: Vinod Koul commit baf172cc04450b9a3845f0f4907c9bc8d717bc58 Author: Abel Vesa Date: Wed Feb 8 20:00:14 2023 +0200 phy: qcom-qmp: pcs-pcie: Add v6.20 register offsets The new SM8550 SoC bumps up the HW version of QMP phy to v6.20 for PCIE g4x2. Add the new PCS PCIE specific offsets in a dedicated header file. Signed-off-by: Abel Vesa Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230208180020.2761766-6-abel.vesa@linaro.org Signed-off-by: Vinod Koul commit 354fc6c513ccb459a67c99a57c8d1a837358a001 Author: Abel Vesa Date: Wed Feb 8 20:00:13 2023 +0200 phy: qcom-qmp: pcs-pcie: Add v6 register offsets The new SM8550 SoC bumps up the HW version of QMP phy to v6 for USB, UFS and PCIE g3x2. Add the new PCS PCIE specific offsets in a dedicated header file. Signed-off-by: Abel Vesa Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230208180020.2761766-5-abel.vesa@linaro.org Signed-off-by: Vinod Koul commit 5f705402739c87b682861f8f06751a8218f52065 Author: Abel Vesa Date: Wed Feb 8 20:00:12 2023 +0200 phy: qcom-qmp: pcs: Add v6.20 register offsets The new SM8550 SoC bumps up the HW version of QMP phy to v6.20 for PCIE g4x2. Add the new PCS offsets in a dedicated header file. Signed-off-by: Abel Vesa Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230208180020.2761766-4-abel.vesa@linaro.org Signed-off-by: Vinod Koul commit efecba3c9f076010701143634c6bf9a75b723107 Author: Abel Vesa Date: Wed Feb 8 20:00:11 2023 +0200 phy: qcom-qmp: pcs: Add v6 register offsets The new SM8550 SoC bumps up the HW version of QMP phy to v6 for USB, UFS and PCIE g3x2. Add the new PCS offsets in a dedicated header file. Signed-off-by: Abel Vesa Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230208180020.2761766-3-abel.vesa@linaro.org Signed-off-by: Vinod Koul commit 496d068e2b881bde0c8b7882a95cbe7d4daa0892 Author: Abel Vesa Date: Wed Feb 8 20:00:10 2023 +0200 dt-bindings: phy: Add QMP PCIe PHY comptible for SM8550 Document the QMP PCIe PHY compatible for SM8550. Signed-off-by: Abel Vesa Reviewed-by: Krzysztof Kozlowski Reviewed-by: Johan Hovold Link: https://lore.kernel.org/r/20230208180020.2761766-2-abel.vesa@linaro.org Signed-off-by: Vinod Koul commit ef14aff107bd79bc205032ca7ed6b84ece2ec1c1 Author: Neil Armstrong Date: Mon Feb 6 10:58:57 2023 +0100 phy: qcom: com-qmp-combo: add SM8350 & SM8450 support Copy the USB tables from the QMP USB3 PHY driver and add the missing DP tables from downstream to enable USB3/DP on the SM8350 and SM8450 platforms. Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20230206-topic-sm8350-upstream-usb-dp-combo-phy-v1-2-ed849ae6b849@linaro.org Signed-off-by: Vinod Koul commit d5011cd5608f9252fe4f6da9a60cce4f42b07080 Author: Neil Armstrong Date: Mon Feb 6 10:58:56 2023 +0100 dt-bindings: phy: qcom,qmp-usb3-dp: document sm8350 & sm8450 compatible Document the USB3/DP Combo PHY compatible found on the SM8350 & SM8450 SoCs. Signed-off-by: Neil Armstrong Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230206-topic-sm8350-upstream-usb-dp-combo-phy-v1-1-ed849ae6b849@linaro.org Signed-off-by: Vinod Koul commit 6caacd82f09c183a91951776cd8d326e46ef84b4 Author: Naresh Solanki Date: Fri Feb 10 17:32:25 2023 +0100 regulator: max597x: Remove unused variable max597x_regmap_config isn't used & hence remove the same. Signed-off-by: Naresh Solanki Link: https://lore.kernel.org/r/20230210163225.1208035-1-Naresh.Solanki@9elements.com Signed-off-by: Mark Brown commit 0170f616f496fcaf25dde0fea042880d4af3089a Author: Vadim Pasternak Date: Wed Feb 8 08:33:23 2023 +0200 platform: mellanox: Split initialization procedure Split mlxplat_init() into two by adding mlxplat_pre_init(). Motivation is to prepare 'mlx-platform' driver to support systems equipped PCIe based programming logic device. Such systems are supposed to use different system resources, thus this commit separates resources allocation related code. Signed-off-by: Vadim Pasternak Reviewed-by: Michael Shych Link: https://lore.kernel.org/r/20230208063331.15560-7-vadimp@nvidia.com Signed-off-by: Hans de Goede commit dd635e33b5c9a3ad3712abae7b845f4353da8cef Author: Vadim Pasternak Date: Wed Feb 8 08:33:22 2023 +0200 platform: mellanox: Introduce support of new Nvidia L1 switch Add support for new L1 switch nodes providing L1 connectivity for multi-node networking chassis. The purpose is to provide compute server with full management and IO subsystems with connections to L1 switches. System contains the following components: - COMe module based on Intel Coffee Lake CPU - Switch baseboard with two ASICs, while 24 ports of each ASICs are connected to one backplane connector 32 ports of each ASIC are connected to 8 OSFPs - Integrated 60mm dual-rotor FANs inside L1 node (N+2 redundancy) - Support 48V or 54V DC input from the external power server. Add the structures related to the new systems to allow proper activation of the all required platform driver. Add poweroff callback to support deep power cycle flow, which should include special actions against CPLD device for performing graceful operation. Signed-off-by: Vadim Pasternak Reviewed-by: Michael Shych Link: https://lore.kernel.org/r/20230208063331.15560-6-vadimp@nvidia.com Signed-off-by: Hans de Goede commit fcf3790b9b63b27ac0269c2285021139a0798a7b Author: Vadim Pasternak Date: Wed Feb 8 08:33:21 2023 +0200 platform: mellanox: Introduce support for next-generation 800GB/s switch Introduce support for Nvidia next-generation 800GB/s ethernet switch SN5600. SN5600 is 51.2 Tbps Ethernet switch based on Nvidia Spectrum-4 ASIC. It can provide up to 64x800Gb/s (ETH) full bidirectional bandwidth per port using PAM-4 modulations. The system supports 64 Belly to Belly 2x4 OSFP cages. The switch was designed to fit standard 2U racks. Features: - 64 OSFP ports support 800GbE - 10GbE speed. - Additional 25GbE - 1GbE service port on the front panel. - Air-cooled with 3 + 1 redundant fan units. - 1 + 1 redundant 3000W or 3600W PSUs. - System management board is based on Intel Coffee-lake CPU E-2276 with secure-boot support. Signed-off-by: Vadim Pasternak Reviewed-by: Michael Shych Link: https://lore.kernel.org/r/20230208063331.15560-5-vadimp@nvidia.com Signed-off-by: Hans de Goede commit acc6ea304590f5ec1590e328c7ae0584f7dd77be Author: Vadim Pasternak Date: Wed Feb 8 08:33:20 2023 +0200 platform: mellanox: Cosmetic changes - rename to more common name Rename 'nvlink_blade' in several declaration to more common name "chassis_blade", since these names are going to be used for different kinds of blades. Fix 'swicth' to 'switch' in comment. Signed-off-by: Vadim Pasternak Reviewed-by: Michael Shych Link: https://lore.kernel.org/r/20230208063331.15560-4-vadimp@nvidia.com Signed-off-by: Hans de Goede commit 488f0fca0db00257c42d44857061bc6726adaa15 Author: Vadim Pasternak Date: Wed Feb 8 08:33:19 2023 +0200 platform: mellanox: Change "reset_pwr_converter_fail" attribute Change "reset_voltmon_upgrade_fail" attribute name to "reset_pwr_converter_fail". For systems using "mlxplat_mlxcpld_default_ng_regs_io_data", relevant CPLD 'register.bit' indicates the failure of power converter, while on older systems same 'register.bit' indicates failure of voltage monitor devices upgrade failure. Signed-off-by: Vadim Pasternak Reviewed-by: Michael Shych Link: https://lore.kernel.org/r/20230208063331.15560-3-vadimp@nvidia.com Signed-off-by: Hans de Goede commit f8dacbf7da2e02d4c0c543cf5c277c906a2bb042 Author: Vadim Pasternak Date: Wed Feb 8 08:33:18 2023 +0200 platform: mellanox: Introduce support for rack manager switch The rack switch is designed to provide high bandwidth, low latency connectivity using optical fiber as the primary interconnect. System supports 32 OSFP ports, non-blocking switching capacity of 25.6Tbps. System equipped with: - 2 replaceable power supplies (AC) with 1+1 redundancy model. - 7 replaceable fan drawers with 6+1 redundancy model. - 2 External Root of Trust or EROT (Glacier) devices for securing ASICs firmware. Signed-off-by: Vadim Pasternak Reviewed-by: Michael Shych Link: https://lore.kernel.org/r/20230208063331.15560-2-vadimp@nvidia.com Signed-off-by: Hans de Goede commit 4a54ecf3031c6631515ae7a708b8ccd5f1bd1fe8 Author: Randy Dunlap Date: Thu Feb 9 09:23:59 2023 -0800 soc: sunxi: SUN20I_PPU should depend on PM An $ARCH or a platform should select PM. Single device drivers should only depend on PM, not select it. Having SUN20I_PPU depend on PM removes a kconfig warning: WARNING: unmet direct dependencies detected for PM Depends on [n]: !MMU [=y] Selected by [y]: - SUN20I_PPU [=y] && (ARCH_SUNXI || COMPILE_TEST [=y]) Fixes: 0ad2185dcb5e ("soc: sunxi: select CONFIG_PM") Signed-off-by: Randy Dunlap Cc: Chen-Yu Tsai Cc: Jernej Skrabec Cc: Samuel Holland Cc: linux-arm-kernel@lists.infradead.org Cc: linux-sunxi@lists.linux.dev Cc: Arnd Bergmann Cc: Geert Uytterhoeven Signed-off-by: Arnd Bergmann commit 0b8ecadc7f5bce64582024737f3c1d97b404353e Author: Thomas Weißschuh Date: Tue Feb 7 16:51:19 2023 +0000 MAINTAINERS: dell-wmi-sysman: drop Divya Bharathi According to the bounce sent by Dell's mailserver this user does not exist (anymore). Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20230207-maintainers-dell-wmi-sysman-v1-1-6594fea12f6c@weissschuh.net Signed-off-by: Hans de Goede commit ad76d9b88c9f6065663fc2005f4b219984b3f8d8 Author: Thomas Weißschuh Date: Tue Feb 7 16:40:46 2023 +0000 x86/platform/uv: 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: Justin Ernst Link: https://lore.kernel.org/r/20230207-kobj_type-pdx86-v1-3-8e2c4fb83105@weissschuh.net Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 881a10355fadd10fc0bbedc729c1a32b98c37e2d Author: Thomas Weißschuh Date: Tue Feb 7 16:40:45 2023 +0000 platform/x86: think-lmi: 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: Mark Pearson Link: https://lore.kernel.org/r/20230207-kobj_type-pdx86-v1-2-8e2c4fb83105@weissschuh.net Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 438688d5ae9ecb734395da09eb0aab440ff30cc3 Author: Thomas Weißschuh Date: Tue Feb 7 16:40:44 2023 +0000 platform/x86: dell-wmi-sysman: 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/20230207-kobj_type-pdx86-v1-1-8e2c4fb83105@weissschuh.net Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 9a90ea7d378486aa358330dafc7e8c3b27de4d84 Author: Srinivas Pandruvada Date: Tue Feb 7 04:58:21 2023 -0800 platform/x86/intel/vsec: Use mutex for ida_alloc() and ida_free() ID alloc and free functions don't have in built protection for parallel invocation of ida_alloc() and ida_free(). With the current flow in the vsec driver, there is no such scenario. But add mutex protection for potential future changes. Suggested-by: Hans de Goede Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20230207125821.3837799-1-srinivas.pandruvada@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit be1ca8ae66851ba6a8131c15e7f9c85430315f57 Author: Shyam Sundar S K Date: Mon Feb 6 20:38:55 2023 +0530 platform/x86/amd: pmc: Add line break for readability Add a line break for the code readability. Reviewed-by: Hans de Goede Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20230206150855.1938810-5-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit 1ac252a5059a77108806ce4b9160721b354bcd84 Author: Shyam Sundar S K Date: Mon Feb 6 20:38:54 2023 +0530 platform/x86/amd: pmc: differentiate STB/SMU messaging prints Modify the dynamic debug print to differentiate between the regular and spill to DRAM usage of the SMU message port. Suggested-by: Sanket Goswami Reviewed-by: Hans de Goede Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20230206150855.1938810-4-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit b0d4bb973539f5e60fff37ea0f211598cac614a8 Author: Shyam Sundar S K Date: Mon Feb 6 20:38:53 2023 +0530 platform/x86/amd: pmc: Write dummy postcode into the STB DRAM Based on the recommendation from the PMFW team in order to get the recent telemetry data present on the STB DRAM the driver is required to send one dummy write to the STB buffer, so it internally triggers the PMFW to emit the latest telemetry data in the STB DRAM region. Reviewed-by: Hans de Goede Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20230206150855.1938810-3-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit 1ecfd30960d4377c2d85181608936dedd35bb171 Author: Shyam Sundar S K Date: Mon Feb 6 20:38:52 2023 +0530 platform/x86/amd: pmc: Add num_samples message id support to STB Recent PMFWs have the support for S2D_NUM_SAMPLES message ID that can tell the current number of samples present within the STB DRAM. num_samples returned would let the driver know the start of the read from the last push location. This way, the driver would emit the top most region of the STB DRAM. Co-developed-by: Sanket Goswami Signed-off-by: Sanket Goswami Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20230206150855.1938810-2-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 4ca26e565e1c91bb45221e15b98e4582f33375c0 Author: Andy Shevchenko Date: Mon Feb 6 17:02:02 2023 +0200 platform/x86: Add include/linux/platform_data/x86 to MAINTAINERS Most of the files there are being used under PDx86 subsystem or tightly related drivers (like drivers/clk/x86/). I think it makes sense to assure that PDx86 keeps an eye on the changes there. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230206150202.27892-1-andriy.shevchenko@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 67c7debbfc3b1ccfe18e10b7e7663737f7dff0e3 Author: Andy Shevchenko Date: Mon Feb 6 16:52:38 2023 +0200 platform/x86: Fix header inclusion in linux/platform_data/x86/soc.h First of all, we don't use intel-family.h directly. On the other hand we actively use boolean type, that is defined in the types.h (we take top-level header for that) and x86_cpu_id, that is provided in the mod_devicetable.h. Secondly, we don't need to spread SOC_INTEL_IS_CPU() macro to the users. Hence, undefine it when it's appropriate. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230206145238.19460-1-andriy.shevchenko@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit b919540aeb58bc164192b07e64fd45eea4f39b91 Author: Arnd Bergmann Date: Wed Feb 8 17:36:52 2023 +0100 platform/x86: int3472/discrete: add LEDS_CLASS dependency int3472 now fails to link when the LED support is disabled: x86_64-linux-ld: drivers/platform/x86/intel/int3472/led.o: in function `skl_int3472_register_pled': led.c:(.text+0xf4): undefined reference to `led_classdev_register_ext' x86_64-linux-ld: led.c:(.text+0x131): undefined reference to `led_add_lookup' x86_64-linux-ld: drivers/platform/x86/intel/int3472/led.o: in function `skl_int3472_unregister_pled': led.c:(.text+0x16b): undefined reference to `led_remove_lookup' x86_64-linux-ld: led.c:(.text+0x177): undefined reference to `led_classdev_unregister' Add an explicit Kconfig dependency. Fixes: 5ae20a8050d0 ("platform/x86: int3472/discrete: Create a LED class device for the privacy LED") Signed-off-by: Arnd Bergmann Reviewed-by: Sakari Ailus Link: https://lore.kernel.org/r/20230208163658.2129009-1-arnd@kernel.org Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit e093e74b819b38074f07289da9933f9c413337ab Author: Shuming Fan Date: Fri Feb 10 16:21:41 2023 +0800 ASoC: rt712-sdca: fix coding style and unconditionally return issues This patch fixes 1. coding style issues 2. check if the setting was set already in rt712_sdca_mux_put callback Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20230210082141.24077-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 1ad059a15707cfb066ae3d7342d59770f04aac5a Author: Kuninori Morimoto Date: Fri Feb 10 05:13:43 2023 +0000 ASoC: rsnd: core.c: indicate warning if strange TDM width was set Current rsnd silently uses default TDM width if it was strange settings. It is difficult to notice about it. This patch indicates warning for it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87lel6ksqn.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 45d5165426ae3ceb35e2c35ad675e7dacd2aa59e Author: Ard Biesheuvel Date: Fri Feb 10 15:08:59 2023 +0100 efi: Add mixed-mode thunk recipe for GetMemoryAttributes EFI mixed mode on x86 requires a recipe for each protocol method or firmware service that takes u64 arguments by value, or returns pointer or 'native int' (UINTN) values by reference (e.g,, through a void ** or unsigned long * parameter), due to the fact that these types cannot be translated 1:1 between the i386 and MS x64 calling conventions. So add the missing recipe for GetMemoryAttributes, which is not actually being used yet on x86, but the code exists and can be built for x86 so let's make sure it works as it should. Cc: Evgeniy Baskov Signed-off-by: Ard Biesheuvel commit befb28f2676a65a5a4cc4626ae224461d8785af6 Author: Christophe JAILLET Date: Sun Feb 5 11:04:01 2023 +0100 ipmi: ipmb: Fix the MODULE_PARM_DESC associated to 'retry_time_ms' 'This should be 'retry_time_ms' instead of 'max_retries'. Fixes: 63c4eb347164 ("ipmi:ipmb: Add initial support for IPMI over IPMB") Signed-off-by: Christophe JAILLET Message-Id: <0d8670cff2c656e99a832a249e77dc90578f67de.1675591429.git.christophe.jaillet@wanadoo.fr> Cc: stable@vger.kernel.org Signed-off-by: Corey Minyard commit 00bb7e763ec9f384cb382455cb6ba5588b5375cf Author: Corey Minyard Date: Wed Jan 25 10:34:47 2023 -0600 ipmi:ssif: Add a timer between request retries The IPMI spec has a time (T6) specified between request retries. Add the handling for that. Reported by: Tony Camuso Cc: stable@vger.kernel.org Signed-off-by: Corey Minyard commit 9e8b89926fb87e5625bdde6fd5de2c31fb1d83bf Author: Corey Minyard Date: Wed Jan 25 10:41:48 2023 -0600 ipmi:ssif: Remove rtc_us_timer It was cruft left over from older handling of run to completion. Cc: stable@vger.kernel.org Signed-off-by: Corey Minyard commit 8230831c43a328c2be6d28c65d3f77e14c59986b Author: Corey Minyard Date: Wed Jan 25 10:13:13 2023 -0600 ipmi_ssif: Rename idle state and check Rename the SSIF_IDLE() to IS_SSIF_IDLE(), since that is more clear, and rename SSIF_NORMAL to SSIF_IDLE, since that's more accurate. Cc: stable@vger.kernel.org Signed-off-by: Corey Minyard commit 95767ed78a181d5404202627499f9cde56053b96 Author: Corey Minyard Date: Wed Jan 25 10:11:06 2023 -0600 ipmi:ssif: resend_msg() cannot fail The resend_msg() function cannot fail, but there was error handling around using it. Rework the handling of the error, and fix the out of retries debug reporting that was wrong around this, too. Cc: stable@vger.kernel.org Signed-off-by: Corey Minyard commit a47a3b7af7501c3b6cee6621ccc4a7dd3de52631 Author: Bastien Nocera Date: Mon Feb 6 23:12:54 2023 +0100 HID: logitech-hidpp: Add more debug statements This should help us figure out some hairy problems with some devices. Signed-off-by: Bastien Nocera Link: https://lore.kernel.org/r/20230206221256.129198-1-hadess@hadess.net Signed-off-by: Benjamin Tissoires commit e8ab7a10edc7d071f64d8a8352b88e7d7477854a Author: Walt Holman Date: Tue Feb 7 13:50:52 2023 -0600 HID: Add support for Logitech G923 Xbox Edition steering wheel We get the same level of features as the regular G920. Signed-off-by: Walt Holman Link: https://lore.kernel.org/r/20230207195051.16373-1-waltholman09@gmail.com Signed-off-by: Benjamin Tissoires commit 3ab1c27f925ba8cc61ed35640c6bdca183657407 Author: Bastien Nocera Date: Mon Apr 4 12:03:11 2022 +0200 HID: logitech-hidpp: Add Signature M650 Add support for HID++ over Bluetooth for the Logitech Signature M650 mouse. It comes with a dongle but can also be used over Bluetooth without one. Signed-off-by: Bastien Nocera Link: https://lore.kernel.org/r/20220404100311.3304-1-hadess@hadess.net Signed-off-by: Benjamin Tissoires commit d83956c8855c6c2ed4bd16cec4a5083d63df17e4 Author: Bastien Nocera Date: Wed Jan 25 13:17:23 2023 +0100 HID: logitech-hidpp: Remove HIDPP_QUIRK_NO_HIDINPUT quirk HIDPP_QUIRK_NO_HIDINPUT isn't used by any devices but still happens to work as HIDPP_QUIRK_DELAYED_INIT is defined to the same value. Remove HIDPP_QUIRK_NO_HIDINPUT and use HIDPP_QUIRK_DELAYED_INIT everywhere instead. Tested on a T650 which requires that quirk, and a number of unifying and Bluetooth devices that don't. Signed-off-by: Bastien Nocera Link: https://lore.kernel.org/r/20230125121723.3122-2-hadess@hadess.net Signed-off-by: Benjamin Tissoires commit 498ba20690357691103de0f766960355247c78be Author: Bastien Nocera Date: Wed Jan 25 13:17:22 2023 +0100 HID: logitech-hidpp: Don't restart communication if not necessary Don't stop and restart communication with the device unless we need to modify the connect flags used because of a device quirk. Signed-off-by: Bastien Nocera Link: https://lore.kernel.org/r/20230125121723.3122-1-hadess@hadess.net Signed-off-by: Benjamin Tissoires commit 43551d9bea826cec4a40a98984ae2db6dac476b3 Author: Bastien Nocera Date: Wed Dec 7 11:00:33 2022 +0100 HID: logitech-hidpp: Add constants for HID++ 2.0 error codes Add constants for HID++ 2.0 error codes listed in "Protocol HID++2.0 essential features" chapter, page 3, in logitech_hidpp_2.0_specification_draft_2012-06-04.pdf Signed-off-by: Bastien Nocera Link: https://lore.kernel.org/r/20221207100033.64095-1-hadess@hadess.net Signed-off-by: Benjamin Tissoires commit cae253d6033da885e71c29c1591b22838a52de76 Author: Bastien Nocera Date: Tue Dec 20 16:43:43 2022 +0100 Revert "HID: logitech-hidpp: add a module parameter to keep firmware gestures" Now that we're in 2022, and the majority of desktop environments can and should support touchpad gestures through libinput, remove the legacy module parameter that made it possible to use gestures implemented in firmware. This will eventually allow simplifying the driver's initialisation code. This reverts commit 9188dbaed68a4b23dc96eba165265c08caa7dc2a. Signed-off-by: Bastien Nocera Signed-off-by: Benjamin Tissoires Link: https://lore.kernel.org/r/20221220154345.474596-1-hadess@hadess.net commit 719acb4d3b7accc9cfbaf21c1c2d51dc7384aee2 Author: Bastien Nocera Date: Mon Jan 16 14:09:37 2023 +0100 HID: logitech-hidpp: Hard-code HID++ 1.0 fast scroll support HID++ 1.0 devices only export whether Fast Scrolling is enabled, not whether they are capable of it. Reinstate the original quirks for the 3 supported mice so fast scrolling works again on those devices. Fixes: 908d325e1665 ("HID: logitech-hidpp: Detect hi-res scrolling support") Link: https://bugzilla.kernel.org/show_bug.cgi?id=216903 Signed-off-by: Bastien Nocera Signed-off-by: Benjamin Tissoires Link: https://lore.kernel.org/r/20230116130937.391441-1-hadess@hadess.net commit d339b2e6b1885aac678aa52f944caa160d480f5e Author: Arnd Bergmann Date: Fri Feb 10 14:22:15 2023 +0100 arm64: reorder defconfig Some Kconfig options has moved around after a 'make savedefconfig' run, so move them to their new location to make it easier to see what other options got removed. Signed-off-by: Arnd Bergmann commit 4f8e09106f6e457c6e9a4ce597fa9ae2bda032c3 Author: Rohan McLure Date: Mon Feb 6 13:18:00 2023 +1100 powerpc/kcsan: Prevent recursive instrumentation with IRQ save/restores Instrumented memory accesses provided by KCSAN will access core-local memories (which will save and restore IRQs) as well as restoring IRQs directly. Avoid recursive instrumentation by applying __no_kcsan annotation to IRQ restore routines. Signed-off-by: Rohan McLure [mpe: Resolve merge conflict with IRQ replay recursion changes] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230206021801.105268-5-rmclure@linux.ibm.com commit b6e259297a6bffb882d55715284bb5219eefda42 Author: Rohan McLure Date: Mon Feb 6 13:17:59 2023 +1100 powerpc/kcsan: Memory barriers semantics Annotate memory barriers *mb() with calls to kcsan_mb(), signaling to compilers supporting KCSAN that the respective memory barrier has been issued. Rename memory barrier *mb() to __*mb() to opt in for asm-generic/barrier.h to generate the respective *mb() macro. Signed-off-by: Rohan McLure Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230206021801.105268-4-rmclure@linux.ibm.com commit 2a7ce82dc46c591c9244057d89a6591c9639b9b9 Author: Rohan McLure Date: Mon Feb 6 13:17:58 2023 +1100 powerpc/kcsan: Exclude udelay to prevent recursive instrumentation In order for KCSAN to increase its likelihood of observing a data race, it sets a watchpoint on memory accesses and stalls, allowing for detection of conflicting accesses by other kernel threads or interrupts. Stalls are implemented by injecting a call to udelay in instrumented code. To prevent recursive instrumentation, exclude udelay from being instrumented. Signed-off-by: Rohan McLure Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230206021801.105268-3-rmclure@linux.ibm.com commit 2fb857bc9f9e106439017ed323f522cc785395bb Author: Rohan McLure Date: Mon Feb 6 13:17:57 2023 +1100 powerpc/kcsan: Add exclusions from instrumentation Exclude various incompatible compilation units from KCSAN instrumentation. Signed-off-by: Rohan McLure Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230206021801.105268-2-rmclure@linux.ibm.com commit 1ee4e35076e36724a62ba2fa29b722fb53eb68f2 Author: Nicholas Piggin Date: Fri Dec 16 21:59:30 2022 +1000 powerpc: Skip stack validation checking alternate stacks if they are not allocated Stack validation in early boot can just bail out of checking alternate stacks if they are not validated yet. Checking against a NULL stack could cause NULLish pointer values to be considered valid. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221216115930.2667772-5-npiggin@gmail.com commit dc222fa7737212fe0da513e5b8937c156d02225d Author: Nicholas Piggin Date: Fri Dec 16 21:59:29 2022 +1000 powerpc/64: Move paca allocation to early_setup() The early paca and boot cpuid dance is complicated and currently does not quite work as expected for boot cpuid != 0 cases. early_init_devtree() currently allocates the paca_ptrs and boot cpuid paca, but until that returns and early_setup() calls setup_paca(), this thread is currently still executing with smp_processor_id() == 0. One problem this causes is the paca_ptrs[smp_processor_id()] pointer is poisoned, so valid_emergency_stack() (any backtrace) and any similar users will crash. Another is that the hardware id which is set here will not be returned by get_hard_smp_processor_id(smp_processor_id()), but it would work correctly for boot_cpuid == 0, which could lead to difficult to reproduce or find bugs. The hard id does not seem to be used by the rest of early_init_devtree(), it just looks like all this code might have been put here to allocate somewhere to store boot CPU hardware id while scanning the devtree. Rearrange things so the hwid is put in a global variable like boot_cpuid, and do all the paca allocation and boot paca setup in the 64-bit early_setup() after we have everything ready to go. The paca_ptrs[0] re-poisoning code in early_setup does not seem to have ever worked, because paca_ptrs[0] was never not-poisoned when boot_cpuid is not 0. Signed-off-by: Nicholas Piggin [mpe: Fix build error on 32-bit] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221216115930.2667772-4-npiggin@gmail.com commit 9fa24404f5044967753a6cd3e5e36f57686bec6e Author: Nicholas Piggin Date: Fri Dec 16 21:59:28 2022 +1000 powerpc/64: Fix task_cpu in early boot when booting non-zero cpuid powerpc/64 can boot on a non-zero SMP processor id. Initially, the boot CPU is said to be "assumed to be 0" until early_init_devtree() discovers the id from the device tree. That is not a good description because the assumption can be wrong and that has to be handled, the better description is that 0 is used as a placeholder, and things are fixed after the real id is discovered. smp_processor_id() is set to the boot cpuid, but task_cpu(current) is not, which causes the smp_processor_id() == task_cpu(current) invariant to be broken until init_idle() in sched_init(). This is quite fragile and could lead to subtle bugs in future. One bug is that validate_sp_size uses task_cpu() to get the process stack, so any stack trace from the booting CPU between early_init_devtree() and sched_init() will have problems. Early on paca_ptrs[0] will be poisoned, so that can cause machine checks dereferencing that memory in real mode. Later, validating the current stack pointer against the idle task of a different secondary will probably cause no stack trace to be printed. Fix this by setting thread_info->cpu right after smp_processor_id() is set to the boot cpuid. Signed-off-by: Nicholas Piggin [mpe: Fix SMP=n build as reported by sfr] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221216115930.2667772-3-npiggin@gmail.com commit dea18da459922d70692ae1e5736d1c760040cb07 Author: Nicholas Piggin Date: Fri Dec 16 21:59:27 2022 +1000 powerpc/64s: Fix stress_hpt memblock alloc alignment The stress_hpt memblock allocation did not pass in an alignment, which causes a stack dump in early boot (that I missed, oops). Fixes: 6b34a099faa1 ("powerpc/64s/hash: add stress_hpt kernel boot option to increase hash faults") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20221216115930.2667772-2-npiggin@gmail.com commit ffc8e90decc531a2dd59ef9e1e6f16a52057ab62 Author: Nicholas Piggin Date: Fri Feb 3 21:38:58 2023 +1000 powerpc/64e: Simplify address calculation in secondary hold loop As the earlier comment explains, __secondary_hold_spinloop does not have to be accessed at its virtual address, slightly simplifying code. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230203113858.1152093-4-npiggin@gmail.com commit 58f24eea5278cb6078552e16063fdd8b0a1b9676 Author: Nicholas Piggin Date: Fri Feb 3 21:38:57 2023 +1000 powerpc/64s: Refactor initialisation after prom Move some basic Book3S initialisation after prom to a function similar to what Book3E looks like. Book3E returns from this function at the virtual address mapping, and Book3S will do the same in a later change, so making them look similar helps with that. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230203113858.1152093-3-npiggin@gmail.com commit 26d53a9c89a8486c5c637cc587e1933a786747d0 Author: Nicholas Piggin Date: Fri Feb 3 21:38:56 2023 +1000 crypto: powerpc - Use address generation helper for asm Replace open-coded toc-relative address calculation with helper macros, commit dab3b8f4fd09 ("powerpc/64: asm use consistent global variable declaration and access") made similar conversions already but missed this one. This allows data addressing model to be changed more easily. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230203113858.1152093-2-npiggin@gmail.com commit e64e71056f323a1e178dccf04d4c0f032d84436c Author: Frederic Barrat Date: Fri Jan 20 10:32:15 2023 +0100 powerpc/powernv/ioda: Skip unallocated resources when mapping to PE pnv_ioda_setup_pe_res() calls opal to map a resource with a PE. However, the code assumes the resource is allocated and it uses the resource address to find out the segment(s) which need to be mapped to the PE. In the unlikely case where the resource hasn't been allocated, the computation for the segment number is garbage, which can lead to invalid memory access and potentially a kernel crash, such as: [ ] pci_bus 0002:02: Configuring PE for bus [ ] pci 0002:02 : [PE# fc] Secondary bus 0x0000000000000002..0x0000000000000002 associated with PE#fc [ ] BUG: Kernel NULL pointer dereference on write at 0x00000000 [ ] Faulting instruction address: 0xc00000000005eac4 [ ] Oops: Kernel access of bad area, sig: 7 [#1] [ ] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA PowerNV [ ] Modules linked in: [ ] CPU: 12 PID: 1 Comm: swapper/20 Not tainted 5.10.50-openpower1 #2 [ ] NIP: c00000000005eac4 LR: c00000000005ea44 CTR: 0000000030061b9c [ ] REGS: c000200007383650 TRAP: 0300 Not tainted (5.10.50-openpower1) [ ] MSR: 9000000000009033 CR: 44000224 XER: 20040000 [ ] CFAR: c00000000005eaa0 DAR: 0000000000000000 DSISR: 02080000 IRQMASK: 0 [ ] GPR00: c00000000005dd98 c0002000073838e0 c00000000185de00 c000200fff018960 [ ] GPR04: 00000000000000fc 0000000000000003 0000000000000000 0000000000000000 [ ] GPR08: 0000000000000000 0000000000000000 0000000000000000 9000000000001033 [ ] GPR12: 0000000031cb0000 c000000ffffe6a80 c000000000010a58 0000000000000000 [ ] GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [ ] GPR20: 0000000000000000 0000000000000000 0000000000000000 c00000000711e200 [ ] GPR24: 0000000000000100 c000200009501120 c00020000cee2800 00000000000003ff [ ] GPR28: c000200fff018960 0000000000000000 c000200ffcb7fd00 0000000000000000 [ ] NIP [c00000000005eac4] pnv_ioda_setup_pe_res+0x94/0x1a0 [ ] LR [c00000000005ea44] pnv_ioda_setup_pe_res+0x14/0x1a0 [ ] Call Trace: [ ] [c0002000073838e0] [c00000000005eb98] pnv_ioda_setup_pe_res+0x168/0x1a0 (unreliable) [ ] [c000200007383970] [c00000000005dd98] pnv_pci_ioda_dma_dev_setup+0x43c/0x970 [ ] [c000200007383a60] [c000000000032cdc] pcibios_bus_add_device+0x78/0x18c [ ] [c000200007383aa0] [c00000000028f2bc] pci_bus_add_device+0x28/0xbc [ ] [c000200007383b10] [c00000000028f3a0] pci_bus_add_devices+0x50/0x7c [ ] [c000200007383b50] [c00000000028f3c4] pci_bus_add_devices+0x74/0x7c [ ] [c000200007383b90] [c00000000028f3c4] pci_bus_add_devices+0x74/0x7c [ ] [c000200007383bd0] [c00000000069ad0c] pcibios_init+0xf0/0x104 [ ] [c000200007383c50] [c0000000000106d8] do_one_initcall+0x84/0x1c4 [ ] [c000200007383d20] [c0000000006910b8] kernel_init_freeable+0x264/0x268 [ ] [c000200007383dc0] [c000000000010a68] kernel_init+0x18/0x138 [ ] [c000200007383e20] [c00000000000cbfc] ret_from_kernel_thread+0x5c/0x80 [ ] Instruction dump: [ ] 7f89e840 409d000c 7fbbf840 409c000c 38210090 4848f448 809c002c e95e0120 [ ] 7ba91764 38a00003 57a7043e 38c00000 <7c8a492e> 5484043e e87e0018 4bff23bd Hitting the problem is not that easy. It was seen with a (semi-bogus) PCI device with a class code of 0. The generic PCI framework doesn't allocate resources in such a case. The patch is simply skipping resources which are still flagged with IORESOURCE_UNSET. We don't have the problem with 64-bit mem resources, as the address of the resource is checked to be within the range of the 64-bit mmio window. See pnv_ioda_reserve_dev_m64_pe() and pnv_pci_is_m64(). Reported-by: Andrew Jeffery Fixes: 23e79425fe7c ("powerpc/powernv: Simplify pnv_ioda_setup_pe_seg()") Signed-off-by: Frederic Barrat Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230120093215.19496-1-fbarrat@linux.ibm.com commit 01f135506e2ed0403512c2467bd50746bdbd576d Author: Nicholas Piggin Date: Sat Jan 21 19:58:05 2023 +1000 powerpc/32: select HAVE_VIRT_CPU_ACCOUNTING_GEN cputime_t is no longer a type, so VIRT_CPU_ACCOUNTING_GEN does not have any affect on the type for 32-bit architectures, so there is no reason it can't be supported. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230121095805.2823731-4-npiggin@gmail.com commit 5c4b710a8157ec271fac4806562ee1aa1b44a53d Author: Nicholas Piggin Date: Sat Jan 21 19:58:04 2023 +1000 powerpc/32: implement HAVE_CONTEXT_TRACKING_USER support Context tracking involves tracking user, kernel, guest switches. 32-bit shares interrupt and syscall entry and exit code (and context tracking calls) with 64-bit, and KVM can not be selected if CONTEXT_TRACKING_USER is enabled, so context tracking can be enabled for 32-bit. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230121095805.2823731-3-npiggin@gmail.com commit fb3b72a3f483f81a33a9693ed03dc62158a6f77e Author: Nicholas Piggin Date: Sat Jan 21 19:58:03 2023 +1000 powerpc: Consolidate 32-bit and 64-bit interrupt_enter_prepare There are two separeate implementations for 32-bit and 64-bit which mostly do the same thing. Consolidating on one implementation ends up being smaller and simpler, there is just irq soft-mask reconcile that is specific to 64-bit. There should be no real functional change with this patch, but it does make the context tracking calls necessary for 32-bit to support context tracking. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230121095805.2823731-2-npiggin@gmail.com commit 60bd7936f99fd8cdbeca67180f80ea13d8b97a76 Author: Kajol Jain Date: Wed Feb 1 00:18:04 2023 +0530 powerpc/hv-24x7: Fix pvr check when setting interface version Commit ec3eb9d941a9 ("powerpc/perf: Use PVR rather than oprofile field to determine CPU version") added usage of pvr value instead of oprofile field to determine the platform. In hv-24x7 pmu driver code, pvr check uses PVR_POWER8 when assigning the interface version for power8 platform. But power8 can also have other pvr values like PVR_POWER8E and PVR_POWER8NVL. Hence the interface version won't be set properly incase of PVR_POWER8E and PVR_POWER8NVL. Fix this issue by adding the checks for PVR_POWER8E and PVR_POWER8NVL as well. Fixes: ec3eb9d941a9 ("powerpc/perf: Use PVR rather than oprofile field to determine CPU version") Reported-by: Sachin Sant Signed-off-by: Kajol Jain Tested-by: Sachin Sant Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230131184804.220756-1-kjain@linux.ibm.com commit 19daf0aef84f33bde9c742ed41b4ded567b8dfbf Author: Christophe Leroy Date: Wed Feb 1 11:04:31 2023 +0100 powerpc/bpf/32: perform three operands ALU operations When an ALU instruction is preceded by a MOV instruction that just moves a source register into the destination register of the ALU, replace that MOV+ALU instructions by an ALU operation taking the source of the MOV as second source instead of using its destination. Before the change, code could look like the following, with superfluous separate register move (mr) instructions. 70: 7f c6 f3 78 mr r6,r30 74: 7f a5 eb 78 mr r5,r29 78: 30 c6 ff f4 addic r6,r6,-12 7c: 7c a5 01 d4 addme r5,r5 With this commit, addition instructions take r30 and r29 directly. 70: 30 de ff f4 addic r6,r30,-12 74: 7c bd 01 d4 addme r5,r29 Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b6719beaf01f9dcbcdbb787ef67c4a2f8e3a4cb6.1675245773.git.christophe.leroy@csgroup.eu commit c88da29b4d2ce8d0070646b8f99729e9b355a4bf Author: Christophe Leroy Date: Wed Feb 1 11:04:30 2023 +0100 powerpc/bpf/32: introduce a second source register for ALU operations At the time being, all ALU operation are performed with same L-source and destination, requiring the L-source to be moved into destination via a separate register move, like: 70: 7f c6 f3 78 mr r6,r30 74: 7f a5 eb 78 mr r5,r29 78: 30 c6 ff f4 addic r6,r6,-12 7c: 7c a5 01 d4 addme r5,r5 Introduce a second source register to all ALU operations. For the time being that second source register is made equal to the destination register. That change will allow, via following patch, to optimise the generated code as: 70: 30 de ff f4 addic r6,r30,-12 74: 7c bd 01 d4 addme r5,r29 Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d5aaaba50d9d6b4a0e9f0cd4a5e34101aca1e247.1675245773.git.christophe.leroy@csgroup.eu commit 8616045fe785229b53a24b8698631826298d1500 Author: Christophe Leroy Date: Wed Feb 1 11:04:29 2023 +0100 powerpc/bpf/32: Optimise some particular const operations Simplify multiplications and divisions with constants when the constant is 1 or -1. When the constant is a power of 2, replace them by bit shits. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e53b1f4a4150ec6cabcaeeef82bf9c361b5f9204.1675245773.git.christophe.leroy@csgroup.eu commit d3921cbb6cd663193cecf04f0b170a30c6d0e390 Author: Christophe Leroy Date: Wed Feb 1 11:04:28 2023 +0100 powerpc/bpf: Only pad length-variable code at initial pass Now that two real additional passes are performed in case of extra pass requested by BPF core, padding is not needed anymore except during initial pass done before memory allocation to count maximum possible program size. So, only do the padding when 'image' is NULL. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/921851d6577badc1e6b08b270a0ced80a6a26d03.1675245773.git.christophe.leroy@csgroup.eu commit 85e031154c7c14edee0705532a9ffc8a2fe591d0 Author: Christophe Leroy Date: Wed Feb 1 11:04:27 2023 +0100 powerpc/bpf: Perform complete extra passes to update addresses BPF core calls the jit compiler again for an extra pass in order to properly set subprog addresses. Unlike other architectures, powerpc only updates the addresses during that extra pass. It means that holes must have been left in the code in order to enable the maximum possible instruction size. In order to avoid waste of space, and waste of CPU time on powerpc processors on which the NOP instruction is not 0-cycle, perform two real additional passes. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d484a4ac95949ff55fc4344b674e7c0d3ddbfcd5.1675245773.git.christophe.leroy@csgroup.eu commit 7dd0e2848764306d7a70943b97584ffdc7754708 Author: Christophe Leroy Date: Wed Feb 1 11:04:26 2023 +0100 powerpc/bpf/32: BPF prog is never called with more than one arg BPF progs are never called with more than one argument, plus the tail call count as a second argument when needed. So, no need to retrieve 9th and 10th argument (5th 64 bits argument) from the stack in prologue. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/89a200fb45048601475c092c5775294dee3886de.1675245773.git.christophe.leroy@csgroup.eu commit d084dcf256bc4565b4b1af9b00297ac7b51c7049 Author: Christophe Leroy Date: Wed Feb 1 11:04:25 2023 +0100 powerpc/bpf/32: Only set a stack frame when necessary Until now a stack frame was set at all time due to the need to keep tail call counter in the stack. But since commit 89d21e259a94 ("powerpc/bpf/32: Fix Oops on tail call tests") the tail call counter is passed via register r4. It is therefore not necessary anymore to have a stack frame for that. Just like PPC64, implement bpf_has_stack_frame() and only sets the frame when needed. The difference with PPC64 is that PPC32 doesn't have a redzone, so the stack is required as soon as non volatile registers are used or when tail call count is set up. Signed-off-by: Christophe Leroy [mpe: Fix commit reference in change log] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/62d7b654a3cfe73d998697cb29bbc5ffd89bfdb1.1675245773.git.christophe.leroy@csgroup.eu commit 6376ed8feca829039d31a208216b958f0e439d87 Author: Christophe Leroy Date: Wed Feb 1 11:04:24 2023 +0100 powerpc/bpf/32: No need to zeroise r4 when not doing tail call r4 is cleared at function entry and used as tail call count. But when the function does not perform tail call, r4 is ignored, so no need to clear it. Replace it by a NOP in that case. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/9c5440b2b6d90a78600257433ac499b5c5101fbb.1675245773.git.christophe.leroy@csgroup.eu commit d9ab6da64fd15608c9feb20d769d8df1a32fe212 Author: Christophe Leroy Date: Wed Feb 1 11:04:23 2023 +0100 powerpc: Remove __kernel_text_address() in show_instructions() That test was introducted in 2006 by commit 00ae36de49cc ("[POWERPC] Better check in show_instructions"). At that time, there was no BPF progs. As seen in message of commit 89d21e259a94 ("powerpc/bpf/32: Fix Oops on tail call tests"), when a page fault occurs in test_bpf.ko for instance, the code is dumped as XXXXXXXXs. Allthough __kernel_text_address() checks is_bpf_text_address(), it seems it is not enough. Today, show_instructions() uses get_kernel_nofault() to read the code, so there is no real need for additional verifications. ARM64 and x86 don't do any additional check before dumping instructions. Do the same and remove __kernel_text_address() in show_instructions(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/4fd69ef7945518c3e27f96b95046a5c1468d35bf.1675245773.git.christophe.leroy@csgroup.eu commit 2115732e548304e52ca1bbdb714f45f4a2461653 Author: Ganesh Goudar Date: Wed Feb 1 15:29:33 2023 +0530 powerpc/mce: log the error for all unrecoverable errors For all unrecoverable errors we are missing to log the error, Since machine_check_log_err() is not getting called for unrecoverable errors. machine_check_log_err() is called from deferred handler, To run deferred handlers we have to do irq work raise from the exception handler. For recoverable errors exception vector code takes care of running deferred handlers. For unrecoverable errors raise irq work in save_mce_event(), So that we log the error from MCE deferred handler. Log without this change MCE: CPU27: machine check (Severe) Real address Load/Store (foreign/control memory) [Not recovered] MCE: CPU27: PID: 10580 Comm: inject-ra-err NIP: [0000000010000df4] MCE: CPU27: Initiator CPU MCE: CPU27: Unknown Log with this change MCE: CPU24: machine check (Severe) Real address Load/Store (foreign/control memory) [Not recovered] MCE: CPU24: PID: 1589811 Comm: inject-ra-err NIP: [0000000010000e48] MCE: CPU24: Initiator CPU MCE: CPU24: Unknown RTAS: event: 5, Type: Platform Error (224), Severity: 3 Signed-off-by: Ganesh Goudar Reviewed-by: Mahesh Salgaonkar Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230201095933.129482-1-ganeshgr@linux.ibm.com commit 90a9d5ff225267b3376f73c19f21174e3b6d7746 Author: Longlong Xia Date: Fri Feb 10 09:54:43 2023 +0000 devtmpfs: add debug info to handle() Because handle() is the core function for processing devtmpfs requests, Let's add some debug info in handle() to help users know why failed. Signed-off-by: Longlong Xia Link: https://lore.kernel.org/r/20230210095444.4067307-3-xialonglong1@huawei.com Signed-off-by: Greg Kroah-Hartman commit 31b4b6730fd4f5d503c9f23619c920ce7b794754 Author: Longlong Xia Date: Fri Feb 10 09:54:42 2023 +0000 driver core: add error handling for devtmpfs_create_node() In some cases, devtmpfs_create_node() can return error value. So, make use of it. Signed-off-by: Longlong Xia Link: https://lore.kernel.org/r/20230210095444.4067307-2-xialonglong1@huawei.com Signed-off-by: Greg Kroah-Hartman commit ccfc901f01170721554963745f7bd94c15235c96 Author: Greg Kroah-Hartman Date: Fri Feb 10 10:13:18 2023 +0100 driver core: bus: update my copyright notice There's been some work done recently to the drivers/base/bus.c file so update the copyright notice in it to make those who track those types of things have an easier job. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230210091318.733561-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit ac56c666f80df0b1dc9c3ef53d0798b74629a116 Author: Randy Dunlap Date: Wed Feb 8 23:13:51 2023 -0800 Documentation: s390: correct spelling Correct spelling problems for Documentation/s390/ as reported by codespell. Signed-off-by: Randy Dunlap Acked-by: Heiko Carstens Link: https://lore.kernel.org/r/20230209071400.31476-16-rdunlap@infradead.org Signed-off-by: Heiko Carstens commit a2522c80f074c35254974fec39fffe8b8d75befe Author: Halil Pasic Date: Thu Feb 9 00:00:24 2023 +0100 s390/ap: fix status returned by ap_qact() Since commit 159491f3b509 ("s390/ap: rework assembler functions to use unions for in/out register variables") the function ap_qact() tries to grab the status from the wrong part of the register. Thus we always end up with zeros. Which is wrong, among others, because we detect failures via status.response_code. Signed-off-by: Halil Pasic Reported-by: Harald Freudenberger Fixes: 159491f3b509 ("s390/ap: rework assembler functions to use unions for in/out register variables") Reviewed-by: Harald Freudenberger Signed-off-by: Heiko Carstens commit 394740d7645ea767795074287769dd26dbd4d782 Author: Halil Pasic Date: Thu Feb 9 00:00:23 2023 +0100 s390/ap: fix status returned by ap_aqic() There function ap_aqic() tries to grab the status from the wrong part of the register. Thus we always end up with zeros. Which is wrong, among others, because we detect failures via status.response_code. Signed-off-by: Halil Pasic Reported-by: Janosch Frank Fixes: 159491f3b509 ("s390/ap: rework assembler functions to use unions for in/out register variables") Reviewed-by: Harald Freudenberger Signed-off-by: Heiko Carstens commit a64a6d23874c574d30a9816124b2dc37467f3811 Author: Halil Pasic Date: Thu Feb 9 00:00:22 2023 +0100 s390: vfio-ap: tighten the NIB validity check The NIB is architecturally invalid if the address designates a storage location that is not installed or if it is zero. Signed-off-by: Halil Pasic Reported-by: Janosch Frank Fixes: ec89b55e3bce ("s390: ap: implement PAPQ AQIC interception in kernel") Reviewed-by: Tony Krowiak Reviewed-by: Pierre Morel Signed-off-by: Heiko Carstens commit b1dec4e78599a2ce5bf8557056cd6dd72e1096b0 Author: Wolfram Sang Date: Thu Feb 2 10:23:31 2023 +0100 clk: renesas: rcar-gen3: 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 for this SoC. Public users only have ES2 onwards. In addition to the ES1 specific removals, a check for it was added preventing the machine to boot further. It may otherwise inherit wrong clock settings from ES2 which could damage the hardware. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230202092332.2504-1-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit 4409c08d806721f0be80bf1c6537a983289272ed Author: Christophe JAILLET Date: Sat Feb 4 21:54:08 2023 +0100 crypto: virtio/akcipher - Do not use GFP_ATOMIC when not needed There is no need to use GFP_ATOMIC here. GFP_KERNEL is already used for another memory allocation just the line after. Signed-off-by: Christophe JAILLET Signed-off-by: Herbert Xu commit eaf05e829f389d172ca7e553f22d49d104b6861c Author: Neal Liu Date: Fri Feb 3 11:35:12 2023 +0800 crypto: aspeed - fix type warnings This patch fixes following warnings: 1. sparse: incorrect type in assignment (different base types) Fix: change to __le32 type. 2. sparse: cast removes address space '__iomem' of expression Fix: use readb to avoid dereferencing the memory. Signed-off-by: Neal Liu Signed-off-by: Herbert Xu commit acd4045db64cdebc6ce4be35abe01000311664aa Author: Zhang Yiqun Date: Thu Feb 2 16:38:05 2023 +0800 crypto: testmgr - add diff-splits of src/dst into default cipher config This type of request is often happened in AF_ALG cases. So add this vector in default cipher config array. Signed-off-by: Zhang Yiqun Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu commit 4e4a08868f15897ca236528771c3733fded42c62 Author: Herbert Xu Date: Thu Feb 2 16:33:47 2023 +0800 crypto: arm64/sm4-gcm - Fix possible crash in GCM cryption An often overlooked aspect of the skcipher walker API is that an error is not just indicated by a non-zero return value, but by the fact that walk->nbytes is zero. Thus it is an error to call skcipher_walk_done after getting back walk->nbytes == 0 from the previous interaction with the walker. This is because when walk->nbytes is zero the walker is left in an undefined state and any further calls to it may try to free uninitialised stack memory. The sm4 arm64 ccm code gets this wrong and ends up calling skcipher_walk_done even when walk->nbytes is zero. This patch rewrites the loop in a form that resembles other callers. Reported-by: Tianjia Zhang Fixes: ae1b83c7d572 ("crypto: arm64/sm4 - add CE implementation for GCM mode") Signed-off-by: Herbert Xu Tested-by: Tianjia Zhang Signed-off-by: Herbert Xu commit 0ceb587dbb94e13bb70988872f1fc0cf412f5f87 Author: Giovanni Cabiddu Date: Wed Feb 1 17:04:41 2023 +0000 crypto: qat - drop log level of msg in get_instance_node() The functions qat_crypto_get_instance_node() and qat_compression_get_instance_node() allow to get a QAT instance (ring pair) on a device close to the node specified as input parameter. When this is not possible, and a QAT device is available in the system, these function return an instance on a remote node and they print a message reporting that it is not possible to find a device on the specified node. This is interpreted by people as an error rather than an info. The print "Could not find a device on node" indicates that a kernel application is running on a core in a socket that does not have a QAT device directly attached to it and performance might suffer. Due to the nature of the message, this can be considered as a debug message, therefore drop the severity to debug and report it only once to avoid flooding. Suggested-by: Vladis Dronov Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Vladis Dronov Tested-by: Vladis Dronov Signed-off-by: Herbert Xu commit f6044cc3030e139f60c281386f28bda6e3049d66 Author: Giovanni Cabiddu Date: Wed Feb 1 15:59:44 2023 +0000 crypto: qat - fix out-of-bounds read When preparing an AER-CTR request, the driver copies the key provided by the user into a data structure that is accessible by the firmware. If the target device is QAT GEN4, the key size is rounded up by 16 since a rounded up size is expected by the device. If the key size is rounded up before the copy, the size used for copying the key might be bigger than the size of the region containing the key, causing an out-of-bounds read. Fix by doing the copy first and then update the keylen. This is to fix the following warning reported by KASAN: [ 138.150574] BUG: KASAN: global-out-of-bounds in qat_alg_skcipher_init_com.isra.0+0x197/0x250 [intel_qat] [ 138.150641] Read of size 32 at addr ffffffff88c402c0 by task cryptomgr_test/2340 [ 138.150651] CPU: 15 PID: 2340 Comm: cryptomgr_test Not tainted 6.2.0-rc1+ #45 [ 138.150659] Hardware name: Intel Corporation ArcherCity/ArcherCity, BIOS EGSDCRB1.86B.0087.D13.2208261706 08/26/2022 [ 138.150663] Call Trace: [ 138.150668] [ 138.150922] kasan_check_range+0x13a/0x1c0 [ 138.150931] memcpy+0x1f/0x60 [ 138.150940] qat_alg_skcipher_init_com.isra.0+0x197/0x250 [intel_qat] [ 138.151006] qat_alg_skcipher_init_sessions+0xc1/0x240 [intel_qat] [ 138.151073] crypto_skcipher_setkey+0x82/0x160 [ 138.151085] ? prepare_keybuf+0xa2/0xd0 [ 138.151095] test_skcipher_vec_cfg+0x2b8/0x800 Fixes: 67916c951689 ("crypto: qat - add AES-CTR support for QAT GEN4 devices") Cc: Reported-by: Vladis Dronov Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Vladis Dronov Tested-by: Vladis Dronov Signed-off-by: Herbert Xu commit 3b9d902153f31998a30b0cf4a0aeb090a05005d3 Author: Tianjia Zhang Date: Wed Feb 1 20:32:07 2023 +0800 crypto: arm64/sm4-ccm - Rewrite skcipher walker loop The fact that an error in the skcipher walker API are indicated not only by a non-zero return value, but also by the fact that walk->nbytes is zero, causes the layout of the skcipher walker loop to be sufficiently different from the usual layout, which is not a problem in itself, but it is likely to cause reading confusion and difficulty in code maintenance. This patch rewrites skcipher walker loop, and separates the last chunk cryption from the loop to avoid wrong calls to the skcipher walker API. In addition to following the usual convention of checking walk->nbytes, it also makes the loop execute logic clearer and easier to understand. Signed-off-by: Tianjia Zhang Signed-off-by: Herbert Xu commit d58fa987be772a9a1e76302d80c1a1e0e15c7d8a Author: Uwe Kleine-König Date: Tue Jan 31 09:13:51 2023 +0100 crypto: atmel - Drop unused id parameter from atmel_i2c_probe() id is unused in atmel_i2c_probe() and the callers have extra efforts to determine the right parameter. So drop the parameter simplifying both atmel_i2c_probe() and its callers. Signed-off-by: Uwe Kleine-König Reviewed-by: Tudor Ambarus Signed-off-by: Herbert Xu commit acc3f5504489691dabc6199e294b40aabe8eccfa Author: Herbert Xu Date: Tue Jan 31 13:44:05 2023 +0800 crypto: safexcel - Use crypto_wait_req This patch replaces the custom crypto completion function with crypto_req_done. Signed-off-by: Herbert Xu commit c9adc75d320c72247ea77b2bf255f1c3c1ca3d6e Author: Peter Lafreniere Date: Mon Jan 30 20:28:40 2023 -0500 crypto: x86/blowfish - Eliminate use of SYM_TYPED_FUNC_START in asm Now that we use the ECB/CBC macros, none of the asm functions in blowfish-x86_64 are called indirectly. So we can safely use SYM_FUNC_START instead of SYM_TYPED_FUNC_START with no effect, allowing us to remove an include. Signed-off-by: Peter Lafreniere Signed-off-by: Herbert Xu commit bc3f42acc4eefc5e7e300596f0836e0d9ad9f4a8 Author: Peter Lafreniere Date: Mon Jan 30 20:27:57 2023 -0500 crypto: x86/blowfish - Convert to use ECB/CBC helpers We can simplify the blowfish-x86_64 glue code by using the preexisting ECB/CBC helper macros. Additionally, this allows for easier reuse of asm functions in later x86 implementations of blowfish. This involves: 1 - Modifying blowfish_dec_blk_4way() to xor outputs when a flag is passed. 2 - Renaming blowfish_dec_blk_4way() to __blowfish_dec_blk_4way(). 3 - Creating two wrapper functions around __blowfish_dec_blk_4way() for use in the ECB/CBC macros. 4 - Removing the custom ecb_encrypt() and cbc_encrypt() routines in favor of macro-based routines. Signed-off-by: Peter Lafreniere Signed-off-by: Herbert Xu commit b529ea65931cb8731c668f1699c845b1eb9909a8 Author: Peter Lafreniere Date: Mon Jan 30 20:27:14 2023 -0500 crypto: x86/blowfish - Remove unused encode parameter The blowfish-x86_64 encryption functions have an unused argument. Remove it. This involves: 1 - Removing xor_block() macros. 2 - Removing handling of fourth argument from __blowfish_enc_blk{,_4way}() functions. 3 - Renaming __blowfish_enc_blk{,_4way}() to blowfish_enc_blk{,_4way}(). 4 - Removing the blowfish_enc_blk{,_4way}() wrappers from blowfish_glue.c 5 - Temporarily using SYM_TYPED_FUNC_START for now indirectly-callable encode functions. Signed-off-by: Peter Lafreniere Signed-off-by: Herbert Xu commit 57ead1bf1c5430c5f663dfd3399040d90db9c7ab Author: Herbert Xu Date: Mon Jan 30 16:58:51 2023 +0800 crypto: arm64/aes-ccm - Rewrite skcipher walker loop An often overlooked aspect of the skcipher walker API is that an error is not just indicated by a non-zero return value, but by the fact that walk->nbytes is zero. Thus it is an error to call skcipher_walk_done after getting back walk->nbytes == 0 from the previous interaction with the walker. This is because when walk->nbytes is zero the walker is left in an undefined state and any further calls to it may try to free uninitialised stack memory. The arm64 ccm code has to deal with zero-length messages, and it needs to process data even when walk->nbytes == 0 is returned. It doesn't have this bug because there is an explicit check for walk->nbytes != 0 prior to the skcipher_walk_done call. However, the loop is still sufficiently different from the usual layout and it appears to have been copied into other code which then ended up with this bug. This patch rewrites it to follow the usual convention of checking walk->nbytes. Signed-off-by: Herbert Xu Tested-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 808d065ad7367e9552b054aa3e092b78027bdf3e Author: Lukas Bulwahn Date: Mon Jan 30 08:31:09 2023 +0100 MAINTAINERS: repair file entry for STARFIVE TRNG DRIVER Commit c388f458bc34 ("hwrng: starfive - Add TRNG driver for StarFive SoC") adds the STARFIVE TRNG DRIVER section to MAINTAINERS, but refers to the non-existing file drivers/char/hw_random/starfive-trng.c rather than to the actually added file drivers/char/hw_random/jh7110-trng.c in this commit. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken reference. Repair this file entry in STARFIVE TRNG DRIVER. Fixes: c388f458bc34 ("hwrng: starfive - Add TRNG driver for StarFive SoC") Signed-off-by: Lukas Bulwahn Acked-by: Jia Jie Ho Signed-off-by: Herbert Xu commit 1d273983fa83d7bc5b3d3b784ec774fb7e52983e Author: Meadhbh Date: Thu Jan 19 09:05:08 2023 +0100 Documentation: qat: change kernel version Change kernel version from 5.20 to 6.0, as 5.20 is not a release. Signed-off-by: Meadhbh Fitzpatrick Reviewed-by: Giovanni Cabiddu Reviewed-by: Vladis Dronov Signed-off-by: Herbert Xu commit 8c99377e614f8abfd881c34611002b2af5ab1ee8 Author: Greg Kroah-Hartman Date: Thu Feb 9 10:35:56 2023 +0100 driver core: bus: add bus_get_dev_root() function Instead of poking around in the struct bus_type directly for the dev_root pointer, provide a function to return it properly reference counted, if it is present in the bus. This will be needed to move the pointer out of struct bus_type in the future. Use the function in the driver core code at the same time it is introduced to verify that it works properly. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230209093556.19132-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 025a785ff083729819dc82ac81baf190cb4aee5c Author: Jakub Kicinski Date: Wed Feb 8 22:06:42 2023 -0800 net: skbuff: drop the word head from skb cache skbuff_head_cache is misnamed (perhaps for historical reasons?) because it does not hold heads. Head is the buffer which skb->data points to, and also where shinfo lives. struct sk_buff is a metadata structure, not the head. Eric recently added skb_small_head_cache (which allocates actual head buffers), let that serve as an excuse to finally clean this up :) Leave the user-space visible name intact, it could possibly be uAPI. Signed-off-by: Jakub Kicinski Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 4fe20d62842eaa858267df1535f3e2bd39275c4a Author: Zhang Yiqun Date: Thu Feb 9 20:17:23 2023 +0800 ALSA: hda: remove redundant variable in snd_hdac_stream_start() This 2nd variables are all set as true in treewide. So I think it can be removed for easy understanding. Signed-off-by: Zhang Yiqun Acked-by: Mark Brown Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230209121723.14328-1-zhangyiqun@phytium.com.cn Signed-off-by: Takashi Iwai commit 1c1ea1c3e21d5ba0867f84f6ad04090bd477df25 Author: Mickaël Salaün Date: Thu Feb 9 23:38:14 2023 +0100 MAINTAINERS: Update Landlock repository I only use the kernel.org repository for Landlock. Signed-off-by: Mickaël Salaün Link: https://lore.kernel.org/r/20230209223814.308370-1-mic@digikod.net Reviewed-by: Paul Moore commit 01a7ee36e7649b3b12212e6648eb017e7f7e1269 Merge: 47400aaea4ffd f1470fd790b04 Author: David S. Miller Date: Fri Feb 10 08:06:33 2023 +0000 Merge branch 'net-ipa-GSI' Alex Elder says: ==================== net: ipa: prepare for GSI register updtaes An upcoming series (or two) will convert the definitions of GSI registers used by IPA so they use the "IPA reg" mechanism to specify register offsets and their fields. This will simplify implementing the fairly large number of changes required in GSI registers to support more than 32 GSI channels (introduced in IPA v5.0). A few minor problems and inconsistencies were found, and they're fixed here. The last three patches in this series change the "ipa_reg" code to separate the IPA-specific part (the base virtual address, basically) from the generic register part, and the now- generic code is renamed to use just "reg_" or "REG_" as a prefix rather than "ipa_reg" or "IPA_REG_". ==================== Signed-off-by: David S. Miller commit f1470fd790b04d0f4624a6ade84d10f8db885c39 Author: Alex Elder Date: Wed Feb 8 14:56:53 2023 -0600 net: ipa: generalize register field functions Rename functions related to register fields so they don't appear to be IPA-specific, and move their definitions into "reg.h": ipa_reg_fmask() -> reg_fmask() ipa_reg_bit() -> reg_bit() ipa_reg_field_max() -> reg_field_max() ipa_reg_encode() -> reg_encode() ipa_reg_decode() -> reg_decode() Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit fc4cecf70675a7d64b76aad190821283306949d6 Author: Alex Elder Date: Wed Feb 8 14:56:52 2023 -0600 net: ipa: generalize register offset functions Rename ipa_reg_offset() to be reg_offset() and move its definition to "reg.h". Rename ipa_reg_n_offset() to be reg_n_offset() also. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 81772e444dbe89ca76d947f6d1e870d00b29c521 Author: Alex Elder Date: Wed Feb 8 14:56:51 2023 -0600 net: ipa: start generalizing "ipa_reg" IPA register definitions have evolved with each new version. The changes required to support more than 32 endpoints in IPA v5.0 made it best to define a unified mechanism for defining registers and their fields. GSI register definitions, meanwhile, have remained fairly stable. And even as the total number of IPA endpoints goes beyond 32, the number of GSI channels on a given EE that underly endpoints still remains 32 or less. Despite that, GSI v3.0 (which is used with IPA v5.0) extends the number of channels (and events) it supports to be about 256, and as a result, many GSI register definitions must change significantly. To address this, we'll use the same "ipa_reg" mechanism to define the GSI registers. As a first step in generalizing the "ipa_reg" to also support GSI registers, isolate the definitions of the "ipa_reg" and "ipa_regs" structure types (and some supporting macros) into a new header file, and remove the "ipa_" and "IPA_" from symbol names. Separate the IPA register ID validity checking from the generic check that a register ID is in range. Aside from that, this is intended to have no functional effect on the code. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 0ec573ef2a1be1437291aa9ce1f752de1b929549 Author: Alex Elder Date: Wed Feb 8 14:56:50 2023 -0600 net: ipa: GSI register cleanup Move some static inline function definitions out of "gsi_reg.h" and into "gsi.c", which is the only place they're used. Rename them so their names identify the register they're associated with. Move the gsi_channel_type enumerated type definition below the offset and field definitions for the CH_C_CNTXT_0 register where it's used. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit c5ebba75c7625e5cb62cb5423883cc3764779420 Author: Alex Elder Date: Wed Feb 8 14:56:49 2023 -0600 net: ipa: use bitmasks for GSI IRQ values There are seven GSI interrupt types that can be signaled by a single GSI IRQ. These are represented in a bitmask, and the gsi_irq_type_id enumerated type defines what each bit position represents. Similarly, the global and general GSI interrupt types each has a set of conditions it signals, and both types have an enumerated type that defines which bit that represents each condition. When used, these enumerated values are passed as an argument to BIT() in *all* cases. So clean up the code a little bit by defining the enumerated type values as one-bit masks rather than bit positions. Rename gsi_general_id to be gsi_general_irq_id for consistency. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit d86603e940ae5107a1669952070027726054142f Author: Alex Elder Date: Wed Feb 8 14:56:48 2023 -0600 net: ipa: tighten up IPA register validity checking When checking the validity of an IPA register ID, compare it against all possible ipa_reg_id values. Rename the function ipa_reg_id_valid() to be specific about what's being checked. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 3aac8ec1c028fb362d60462ade605587b5bbcd9b Author: Alex Elder Date: Wed Feb 8 14:56:47 2023 -0600 net: ipa: add some new IPA versions Soon IPA v5.0+ will be supported, and when that happens we will be able to enable support for the SDX65 (IPA v5.0), SM8450 (IPA v5.1), and SM8550 (IPA v5.5). Fix the comment about the GSI version used for IPA v3.1. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 38028e6f392349702270843cecc4ff80cdd81f03 Author: Alex Elder Date: Wed Feb 8 14:56:46 2023 -0600 net: ipa: get rid of ipa->reg_addr The reg_addr field in the IPA structure is set but never used. Get rid of it. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 2df181f09c961377a55510a864216d48d787fe49 Author: Alex Elder Date: Wed Feb 8 14:56:45 2023 -0600 net: ipa: generic command param fix Starting at IPA v4.11, the GSI_GENERIC_COMMAND GSI register got a new PARAMS field. The code that encodes a value into that field sets it unconditionally, which is wrong. We currently only provide 0 as the field's value, so this error has no real effect. Still, it's a bug, so let's fix it. Fix an (unrelated) incorrect comment as well. Fields in the ERROR_LOG GSI register actually *are* defined for IPA versions prior to v3.5.1. Fixes: fe68c43ce388 ("net: ipa: support enhanced channel flow control") Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 47400aaea4ffdc306f0fd698f8c13b02e133130e Author: Horatiu Vultur Date: Wed Feb 8 14:08:39 2023 +0100 net: microchip: vcap: Add tc flower keys for lan966x Add the following TC flower filter keys to lan966x for IS2: - ipv4_addr (sip and dip) - ipv6_addr (sip and dip) - control (IPv4 fragments) - portnum (tcp and udp port numbers) - basic (L3 and L4 protocol) - vlan (outer vlan tag info) - tcp (tcp flags) - ip (tos field) As the parsing of these keys is similar between lan966x and sparx5, move the code in a separate file to be shared by these 2 chips. And put the specific parsing outside of the common functions. Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller commit 21119e2c6e8461677c86decc9cdbcfb14bde0741 Merge: dc8c41320130b 5a2c5a5b0829e Author: David S. Miller Date: Fri Feb 10 08:00:05 2023 +0000 Merge tag 'rxrpc-next-20230208' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc development Here are some miscellaneous changes for rxrpc: (1) Use consume_skb() rather than kfree_skb_reason(). (2) Fix unnecessary waking when poking and already-poked call. (3) Add ack.rwind to the rxrpc_tx_ack tracepoint as this indicates how many incoming DATA packets we're telling the peer that we are currently willing to accept on this call. (4) Reduce duplicate ACK transmission. We send ACKs to let the peer know that we're increasing the receive window (ack.rwind) as we consume packets locally. Normal ACK transmission is triggered in three places and that leads to duplicates being sent. ==================== Signed-off-by: David S. Miller commit dc8c41320130b2295af3764913f7d1e4df61edaf Author: Clément Léger Date: Wed Feb 8 17:12:49 2023 +0100 net: pcs: rzn1-miic: remove unused struct members and use miic variable Remove unused bulk clocks struct from the miic state and use an already existing miic variable in miic_config(). Signed-off-by: Clément Léger Link: https://lore.kernel.org/r/20230208161249.329631-1-clement.leger@bootlin.com Signed-off-by: Jakub Kicinski commit 5c72b4c644eb68843b3538f452a0a89db7011015 Author: Andy Shevchenko Date: Wed Feb 8 15:31:53 2023 +0200 openvswitch: Use string_is_terminated() helper Use string_is_terminated() helper instead of cpecific memchr() call. This shows better the intention of the call. Signed-off-by: Andy Shevchenko Reviewed-by: Simon Horman Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20230208133153.22528-3-andriy.shevchenko@linux.intel.com Signed-off-by: Jakub Kicinski commit d4545bf9c33baa482daea845ddf8d5fdb26daee3 Author: Andy Shevchenko Date: Wed Feb 8 15:31:52 2023 +0200 genetlink: Use string_is_terminated() helper Use string_is_terminated() helper instead of cpecific memchr() call. This shows better the intention of the call. Signed-off-by: Andy Shevchenko Reviewed-by: Simon Horman Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20230208133153.22528-2-andriy.shevchenko@linux.intel.com Signed-off-by: Jakub Kicinski commit f1db99c07b4f0a9edc45f3498d4d13d13a41836a Author: Andy Shevchenko Date: Wed Feb 8 15:31:51 2023 +0200 string_helpers: Move string_is_valid() to the header Move string_is_valid() to the header for wider use. While at it, rename to string_is_terminated() to be precise about its semantics. Signed-off-by: Andy Shevchenko Reviewed-by: Simon Horman Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20230208133153.22528-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jakub Kicinski commit a136391ae4216a5713f9527c8a05e9364f059a31 Author: Horatiu Vultur Date: Wed Feb 8 12:44:06 2023 +0100 net: micrel: Cable Diagnostics feature for lan8841 PHY Add support for cable diagnostics in lan8841 PHY. It has the same registers layout as lan8814 PHY, therefore reuse the functionality. Signed-off-by: Horatiu Vultur Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230208114406.1666671-1-horatiu.vultur@microchip.com Signed-off-by: Jakub Kicinski commit 436396f26d502ada54281958db0a9f6fc12ff256 Author: Huanhuan Wang Date: Wed Feb 8 10:10:00 2023 +0100 nfp: support IPsec offloading for NFP3800 Add IPsec offloading support for NFP3800. Include data plane and control plane. Data plane: add IPsec packet process flow in NFP3800 datapath (NFDk). Control plane: add an algorithm support distinction flow in xfrm hook function xdo_dev_state_add(), as NFP3800 has a different set of IPsec algorithm support. This matches existing support for the NFP6000/NFP4000 and their NFD3 datapath. In addition, fixup the md_bytes calculation for NFD3 datapath to make sure the two datapahts are keept in sync. Signed-off-by: Huanhuan Wang Reviewed-by: Niklas Söderlund Signed-off-by: Simon Horman Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20230208091000.4139974-1-simon.horman@corigine.com Signed-off-by: Jakub Kicinski commit a1beaa50b583a4f137048ff6e55bd2328a4e4362 Author: Andy Shevchenko Date: Mon Jan 30 13:28:30 2023 +0200 dmaengine: Simplify dmaenginem_async_device_register() function Use devm_add_action_or_reset() instead of devres_alloc() and devres_add(), which works the same. This will simplify the code. There is no functional changes. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230130112830.52353-1-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul commit 40e171c2d306e42057433fb2c2f1fee2d385e1c4 Author: Andy Shevchenko Date: Mon Jan 30 13:11:41 2023 +0200 dmaengine: use sysfs_emit() to instead of scnprintf() Follow the advice of the Documentation/filesystems/sysfs.rst and show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230130111141.59627-1-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul commit 8b5443102cfca7a4346a50918f8ecc8a1644ea2e Author: Andy Shevchenko Date: Mon Jan 30 13:05:03 2023 +0200 dmaengine: Make an order in struct dma_device definition Make an order in struct dma_device: - added missing kernel doc descriptions - put descriptions in the order of appearance in the code - updated indentation where it makes sense Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230130110503.52250-1-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul commit 837b2fafd4cf3e336ab1127c3738c35eba866123 Author: Krzysztof Kozlowski Date: Tue Jan 24 09:11:17 2023 +0100 dt-bindings: dma: cleanup examples - indentation, lowercase hex Cleanup examples: - use 4-space indentation (for cases when it is neither 4 not 2 space), - use lowercase hex, - drop unused node's label. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230124081117.31186-2-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit 10cafa2d458855873ceb91c79c4f2cbcb8419283 Author: Krzysztof Kozlowski Date: Tue Jan 24 09:11:16 2023 +0100 dt-bindings: dma: drop unneeded quotes Cleanup by removing unneeded quotes from refs and redundant blank lines. No functional impact except adjusting to preferred coding style. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Matthias Brugger # mediatek Acked-by: Rob Herring Acked-by: Hector Martin # apple Acked-by: Paul Cercueil Acked-by: Viresh Kumar # Spear Reviewed-by: Andy Shevchenko Reviewed-by: Yoshihiro Shimoda # Renesas Reviewed-by: Kunihiko Hayashi # Socionext Link: https://lore.kernel.org/r/20230124081117.31186-1-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit ecf294a6f63f882319485f807754dacaeae96e9d Author: Lizhi Hou Date: Thu Jan 19 08:32:06 2023 -0800 dmaengine: xilinx: xdma: Add user logic interrupt support The Xilinx DMA/Bridge Subsystem for PCIe (XDMA) provides up to 16 user interrupt wires to user logic that generate interrupts to the host. This patch adds APIs to enable/disable user logic interrupt for a given interrupt wire index. Signed-off-by: Lizhi Hou Signed-off-by: Sonal Santan Signed-off-by: Max Zhen Signed-off-by: Brian Xu Tested-by: Martin Tuma Link: https://lore.kernel.org/r/1674145926-29449-3-git-send-email-lizhi.hou@amd.com Signed-off-by: Vinod Koul commit 17ce252266c7f016ece026492c45838f852ddc79 Author: Lizhi Hou Date: Thu Jan 19 08:32:05 2023 -0800 dmaengine: xilinx: xdma: Add xilinx xdma driver Add driver to enable PCIe board which uses XDMA (the DMA/Bridge Subsystem for PCI Express). For example, Xilinx Alveo PCIe devices. https://www.xilinx.com/products/boards-and-kits/alveo.html The XDMA engine support up to 4 Host to Card (H2C) and 4 Card to Host (C2H) channels. Memory transfers are specified on a per-channel basis in descriptor linked lists, which the DMA fetches from host memory and processes. Events such as descriptor completion and errors are signaled using interrupts. The hardware detail is provided by https://docs.xilinx.com/r/en-US/pg195-pcie-dma/Introduction This driver implements dmaengine APIs. - probe the available DMA channels - use dma_slave_map for channel lookup - use virtual channel to manage dmaengine tx descriptors - implement device_prep_slave_sg callback to handle host scatter gather list - implement device_config to config device address for DMA transfer Signed-off-by: Lizhi Hou Signed-off-by: Sonal Santan Signed-off-by: Max Zhen Signed-off-by: Brian Xu Tested-by: Martin Tuma Link: https://lore.kernel.org/r/1674145926-29449-2-git-send-email-lizhi.hou@amd.com Signed-off-by: Vinod Koul commit 167ce4cbfa370114fee61ad5b58e401d95e2d5cd Author: Donald Douwsma Date: Wed Feb 8 08:59:56 2023 -0800 xfs: allow setting full range of panic tags xfs will not allow combining other panic masks with XFS_PTAG_VERIFIER_ERROR. # sysctl fs.xfs.panic_mask=511 sysctl: setting key "fs.xfs.panic_mask": Invalid argument fs.xfs.panic_mask = 511 Update to the maximum value that can be set to allow the full range of masks. Do this using a mask of possible values to prevent this happening again as suggested by Darrick. Fixes: d519da41e2b7 ("xfs: Introduce XFS_PTAG_VERIFIER_ERROR panic mask") Signed-off-by: Donald Douwsma Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 2894d3530948acd30f2cc5366728a6967fc6569f Merge: 8697a258ae247 c12e0d5f267d7 Author: Jakub Kicinski Date: Thu Feb 9 17:45:57 2023 -0800 Merge branch 'net-introduce-rps_default_mask' Paolo Abeni says: ==================== net: introduce rps_default_mask Real-time setups try hard to ensure proper isolation between time critical applications and e.g. network processing performed by the network stack in softirq and RPS is used to move the softirq activity away from the isolated core. If the network configuration is dynamic, with netns and devices routinely created at run-time, enforcing the correct RPS setting on each newly created device allowing to transient bad configuration became complex. Additionally, when multi-queue devices are involved, configuring rps in user-space on each queue easily becomes very expensive, e.g. some setups use veths with per cpu queues. These series try to address the above, introducing a new sysctl knob: rps_default_mask. The new sysctl entry allows configuring a netns-wide RPS mask, to be enforced since receive queue creation time without any fourther per device configuration required. Additionally, a simple self-test is introduced to check the rps_default_mask behavior. ==================== Link: https://lore.kernel.org/r/cover.1675789134.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit c12e0d5f267d7eb45a2f8eaa9fd44eaa2871a95e Author: Paolo Abeni Date: Tue Feb 7 19:44:58 2023 +0100 self-tests: introduce self-tests for RPS default mask Ensure that RPS default mask changes take place on all newly created netns/devices and don't affect existing ones. Signed-off-by: Paolo Abeni Reviewed-by: Simon Horman Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit 605cfa1b1090b5d9e227d8a8f7d08fdd04f07724 Author: Paolo Abeni Date: Tue Feb 7 19:44:57 2023 +0100 net: introduce default_rps_mask netns attribute If RPS is enabled, this allows configuring a default rps mask, which is effective since receive queue creation time. A default RPS mask allows the system admin to ensure proper isolation, avoiding races at network namespace or device creation time. The default RPS mask is initially empty, and can be modified via a newly added sysctl entry. Signed-off-by: Paolo Abeni Reviewed-by: Simon Horman Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit 370ca718fd5e1fd45ccfdf7a9d76d010f561e607 Author: Paolo Abeni Date: Tue Feb 7 19:44:56 2023 +0100 net-sysctl: factor-out rpm mask manipulation helpers Will simplify the following patch. No functional change intended. Signed-off-by: Paolo Abeni Reviewed-by: Simon Horman Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit 135746c61fa6d7f66dc079027304eaa4d35fe942 Author: Paolo Abeni Date: Tue Feb 7 19:44:55 2023 +0100 net-sysctl: factor out cpumask parsing helper Will be used by the following patch to avoid code duplication. No functional changes intended. The only difference is that now flow_limit_cpu_sysctl() will always compute the flow limit mask on each read operation, even when read() will not return any byte to user-space. Note that the new helper is placed under a new #ifdef at the file start to better fit the usage in the later patch Signed-off-by: Paolo Abeni Reviewed-by: Simon Horman Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit 817013880a6883f7ab08030d1f8cfef5f07ba467 Author: Jesper Juhl Date: Thu Feb 9 17:03:20 2023 -0800 Update CREDITS file entry for Jesper Juhl Link: https://lkml.kernel.org/r/8e18fa82-1095-330f-29fb-80743d22443c@gmail.com Signed-off-by: Jesper Juhl Signed-off-by: Andrew Morton commit 7be6a87c2473957090995b7eb541e31d57a2c801 Author: Randy Dunlap Date: Sat Feb 4 16:43:57 2023 -0800 sparc: allow PM configs for sparc32 COMPILE_TEST When doing randconfig builds for sparc32 with COMPILE_TEST, some (non-Sparc) drivers cause kconfig warnings with the Kconfig symbols PM, PM_GENERIC_DOMAINS, or PM_GENERIC_DOMAINS_OF. This is due to arch/sparc/Kconfig not using the PM Kconfig for Sparc32: if SPARC64 source "kernel/power/Kconfig" endif Arnd suggested adding "|| COMPILE_TEST" to the conditional, instead of trying to track down every driver that selects any of these PM symbols. Fixes the following kconfig warnings: WARNING: unmet direct dependencies detected for PM Depends on [n]: SPARC64 [=n] Selected by [y]: - SUN20I_PPU [=y] && (ARCH_SUNXI || COMPILE_TEST [=y]) WARNING: unmet direct dependencies detected for PM Depends on [n]: SPARC64 [=n] Selected by [y]: - SUN20I_PPU [=y] && (ARCH_SUNXI || COMPILE_TEST [=y]) WARNING: unmet direct dependencies detected for PM_GENERIC_DOMAINS Depends on [n]: SPARC64 [=n] && PM [=y] Selected by [y]: - QCOM_GDSC [=y] && COMMON_CLK [=y] && PM [=y] - SUN20I_PPU [=y] && (ARCH_SUNXI || COMPILE_TEST [=y]) - MESON_GX_PM_DOMAINS [=y] && (ARCH_MESON || COMPILE_TEST [=y]) && PM [=y] && OF [=y] - BCM2835_POWER [=y] && (ARCH_BCM2835 || COMPILE_TEST [=y] && OF [=y]) && PM [=y] - BCM_PMB [=y] && (ARCH_BCMBCA || COMPILE_TEST [=y] && OF [=y]) && PM [=y] - ROCKCHIP_PM_DOMAINS [=y] && (ARCH_ROCKCHIP || COMPILE_TEST [=y]) && PM [=y] Selected by [m]: - ARM_SCPI_POWER_DOMAIN [=m] && (ARM_SCPI_PROTOCOL [=m] || COMPILE_TEST [=y] && OF [=y]) && PM [=y] - MESON_EE_PM_DOMAINS [=m] && (ARCH_MESON || COMPILE_TEST [=y]) && PM [=y] && OF [=y] - QCOM_AOSS_QMP [=m] && (ARCH_QCOM || COMPILE_TEST [=y]) && MAILBOX [=y] && COMMON_CLK [=y] && PM [=y] WARNING: unmet direct dependencies detected for PM_GENERIC_DOMAINS_OF Depends on [n]: SPARC64 [=n] && PM_GENERIC_DOMAINS [=y] && OF [=y] Selected by [y]: - MESON_GX_PM_DOMAINS [=y] && (ARCH_MESON || COMPILE_TEST [=y]) && PM [=y] && OF [=y] Selected by [m]: - MESON_EE_PM_DOMAINS [=m] && (ARCH_MESON || COMPILE_TEST [=y]) && PM [=y] && OF [=y] Link: https://lkml.kernel.org/r/20230205004357.29459-1-rdunlap@infradead.org Fixes: bdde6b3c8ba4 ("sparc64: Hibernation support") Signed-off-by: Randy Dunlap Suggested-by: Arnd Bergmann Acked-by: Sam Ravnborg Cc: "David S. Miller" Cc: Kirill Tkhai Signed-off-by: Andrew Morton commit b1f712b308dcdb1af73e5fcf3d8bf8eb44b36600 Author: fuyuanli Date: Wed Feb 1 21:54:33 2023 +0800 hung_task: print message when hung_task_warnings gets down to zero. It's useful to report it when hung_task_warnings gets down to zero, so that we can know if kernel log was lost or there is no hung task was detected. Link: https://lkml.kernel.org/r/20230201135416.GA6560@didi-ThinkCentre-M920t-N000 Signed-off-by: fuyuanli Reviewed-by: Petr Mladek Cc: Rasmus Villemoes Signed-off-by: Andrew Morton commit 9f79ffc19302253d0b9fe1f5e0cdf1cb04eae78c Author: Juerg Haefliger Date: Wed Feb 1 17:24:35 2023 +0100 arch/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. Link: https://lkml.kernel.org/r/20230201162435.218368-1-juerg.haefliger@canonical.com Signed-off-by: Juerg Haefliger Reviewed-by: Kees Cook Cc: Dan Li Cc: "Eric W. Biederman" Cc: Frederic Weisbecker Cc: Josh Poimboeuf Cc: Juerg Haefliger Cc: Marco Elver Cc: Mark Rutland Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Sami Tolvanen Cc: Tom Rix Signed-off-by: Andrew Morton commit 223ec6ab265ead0b319bc2f15d0d1be05078a74b Author: Li Zhijian Date: Tue Feb 7 06:27:00 2023 +0000 mm/memremap.c: fix outdated comment in devm_memremap_pages commit a4574f63edc6 ("mm/memremap_pages: convert to 'struct range'") converted res to range, update the comment correspondingly. Link: https://lkml.kernel.org/r/1675751220-2-1-git-send-email-lizhijian@fujitsu.com Signed-off-by: Li Zhijian Cc: Dan Williams Signed-off-by: Andrew Morton commit e56397e8c40da82c78dccb6f48bfa21e88ccb1e4 Author: Thomas Weißschuh Date: Tue Feb 7 19:21:15 2023 +0000 mm/damon/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. Link: https://lkml.kernel.org/r/20230207-kobj_type-damon-v1-1-9d4fea6a465b@weissschuh.net Signed-off-by: Thomas Weißschuh Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton commit 2c2241081f7dec878331fdc3a3f2361e99556bca Author: Jason Gunthorpe Date: Tue Jan 24 16:34:34 2023 -0400 mm/gup: move private gup FOLL_ flags to internal.h Move the flags that should not/are not used outside gup.c and related into mm/internal.h to discourage driver abuse. To make this more maintainable going forward compact the two FOLL ranges with new bit numbers from 0 to 11 and 16 to 21, using shifts so it is explicit. Switch to an enum so the whole thing is easier to read. Link: https://lkml.kernel.org/r/13-v2-987e91b59705+36b-gup_tidy_jgg@nvidia.com Signed-off-by: Jason Gunthorpe Reviewed-by: John Hubbard Acked-by: David Hildenbrand Cc: David Howells Cc: Christoph Hellwig Cc: Claudio Imbrenda Cc: Alistair Popple Cc: Mike Rapoport (IBM) Signed-off-by: Andrew Morton commit 63b605128655f2e3968d99e30b293c7e7eaa2fc2 Author: Jason Gunthorpe Date: Tue Jan 24 16:34:33 2023 -0400 mm/gup: move gup_must_unshare() to mm/internal.h This function is only used in gup.c and closely related. It touches FOLL_PIN so it must be moved before the next patch. Link: https://lkml.kernel.org/r/12-v2-987e91b59705+36b-gup_tidy_jgg@nvidia.com Signed-off-by: Jason Gunthorpe Reviewed-by: John Hubbard Reviewed-by: David Hildenbrand Cc: Alistair Popple Cc: Christoph Hellwig Cc: Claudio Imbrenda Cc: David Howells Cc: Mike Rapoport (IBM) Signed-off-by: Andrew Morton commit 9198a9196ee67814a101c178ed828f8ea9c2965e Author: Jason Gunthorpe Date: Tue Jan 24 16:34:32 2023 -0400 mm/gup: make get_user_pages_fast_only() return the common return value There are only two callers, both can handle the common return code: - get_user_page_fast_only() checks == 1 - gfn_to_page_many_atomic() already returns -1, and the only caller checks for negative return values Remove the restriction against returning negative values. Link: https://lkml.kernel.org/r/11-v2-987e91b59705+36b-gup_tidy_jgg@nvidia.com Signed-off-by: Jason Gunthorpe Acked-by: Mike Rapoport (IBM) Reviewed-by: John Hubbard Reviewed-by: David Hildenbrand Cc: Alistair Popple Cc: Christoph Hellwig Cc: Claudio Imbrenda Cc: David Howells Signed-off-by: Andrew Morton commit edad1bb1fbf7e28b49bf76b2aa66bfcaba00f627 Author: Jason Gunthorpe Date: Tue Jan 24 16:34:31 2023 -0400 mm/gup: remove pin_user_pages_fast_only() Commit ed29c2691188 ("drm/i915: Fix userptr so we do not have to worry about obj->mm.lock, v7.") removed the only caller, remove this dead code too. Link: https://lkml.kernel.org/r/10-v2-987e91b59705+36b-gup_tidy_jgg@nvidia.com Signed-off-by: Jason Gunthorpe Acked-by: Mike Rapoport (IBM) Reviewed-by: John Hubbard Reviewed-by: David Hildenbrand Cc: Alistair Popple Cc: Christoph Hellwig Cc: Claudio Imbrenda Cc: David Howells Signed-off-by: Andrew Morton commit 9a863a6a51394bff480c959b713874c090a8f5c6 Author: Jason Gunthorpe Date: Tue Jan 24 16:34:30 2023 -0400 mm/gup: make locked never NULL in the internal GUP functions Now that NULL locked doesn't have a special meaning we can just make it non-NULL in all cases and remove the special tests. get_user_pages() and pin_user_pages() can safely pass in a locked = 1 get_user_pages_remote) and pin_user_pages_remote() can swap in a local variable for locked if NULL is passed. Remove all the NULL checks. Link: https://lkml.kernel.org/r/9-v2-987e91b59705+36b-gup_tidy_jgg@nvidia.com Signed-off-by: Jason Gunthorpe Acked-by: Mike Rapoport (IBM) Reviewed-by: John Hubbard Cc: Alistair Popple Cc: Christoph Hellwig Cc: Claudio Imbrenda Cc: David Hildenbrand Cc: David Howells Signed-off-by: Andrew Morton commit f04740f54594f85935e29a5c8ff6722f427f3dac Author: Jason Gunthorpe Date: Tue Jan 24 16:34:29 2023 -0400 mm/gup: add FOLL_UNLOCKABLE Setting FOLL_UNLOCKABLE allows GUP to lock/unlock the mmap lock on its own. It is a more explicit replacement for locked != NULL. This clears the way for passing in locked = 1, without intending that the lock can be unlocked. Set the flag in all cases where it is used, eg locked is present in the external interface or locked is used internally with locked = 0. Link: https://lkml.kernel.org/r/8-v2-987e91b59705+36b-gup_tidy_jgg@nvidia.com Signed-off-by: Jason Gunthorpe Acked-by: Mike Rapoport (IBM) Reviewed-by: John Hubbard Cc: Alistair Popple Cc: Christoph Hellwig Cc: Claudio Imbrenda Cc: David Hildenbrand Cc: David Howells Signed-off-by: Andrew Morton commit 6e4382c706f7701c4e4e430ebc9f817eeda64857 Author: Jason Gunthorpe Date: Tue Jan 24 16:34:28 2023 -0400 mm/gup: remove locked being NULL from faultin_vma_page_range() The only caller of this function always passes in a non-NULL locked, so just remove this obsolete comment. Link: https://lkml.kernel.org/r/7-v2-987e91b59705+36b-gup_tidy_jgg@nvidia.com Signed-off-by: Jason Gunthorpe Reviewed-by: John Hubbard Cc: Alistair Popple Cc: Christoph Hellwig Cc: Claudio Imbrenda Cc: David Hildenbrand Cc: David Howells Cc: Mike Rapoport (IBM) Signed-off-by: Andrew Morton commit 961ba47242510ac7af7c66733e471b9d3a6ade1a Author: Jason Gunthorpe Date: Tue Jan 24 16:34:27 2023 -0400 mm/gup: add an assertion that the mmap lock is locked Since commit 5b78ed24e8ec ("mm/pagemap: add mmap_assert_locked() annotations to find_vma*()") we already have this assertion, it is just buried in find_vma(): __get_user_pages_locked() __get_user_pages() find_extend_vma() find_vma() Also check it at the top of __get_user_pages_locked() as a form of documentation. Link: https://lkml.kernel.org/r/6-v2-987e91b59705+36b-gup_tidy_jgg@nvidia.com Signed-off-by: Jason Gunthorpe Reviewed-by: John Hubbard Cc: Alistair Popple Cc: Christoph Hellwig Cc: Claudio Imbrenda Cc: David Hildenbrand Cc: David Howells Cc: Mike Rapoport (IBM) Signed-off-by: Andrew Morton commit d64e2dbc33a109a37ad4f5c18945c324345fe873 Author: Jason Gunthorpe Date: Tue Jan 24 16:34:26 2023 -0400 mm/gup: simplify the external interface functions and consolidate invariants The GUP family of functions have a complex, but fairly well defined, set of invariants for their arguments. Currently these are sprinkled about, sometimes in duplicate through many functions. Internally we don't follow all the invariants that the external interface has to follow, so place these checks directly at the exported interface. This ensures the internal functions never reach a violated invariant. Remove the duplicated invariant checks. The end result is to make these functions fully internal: __get_user_pages_locked() internal_get_user_pages_fast() __gup_longterm_locked() And all the other functions call directly into one of these. Link: https://lkml.kernel.org/r/5-v2-987e91b59705+36b-gup_tidy_jgg@nvidia.com Signed-off-by: Jason Gunthorpe Suggested-by: John Hubbard Reviewed-by: John Hubbard Acked-by: Mike Rapoport (IBM) Cc: Alistair Popple Cc: Christoph Hellwig Cc: Claudio Imbrenda Cc: David Hildenbrand Cc: David Howells Signed-off-by: Andrew Morton commit 7ce154fe6917e7db94d63bc4d6c73b678ad1c581 Author: Jason Gunthorpe Date: Tue Jan 24 16:34:25 2023 -0400 mm/gup: move try_grab_page() to mm/internal.h This is part of the internal function of gup.c and is only non-static so that the parts of gup.c in the huge_memory.c and hugetlb.c can call it. Put it in internal.h beside the similarly purposed try_grab_folio() Link: https://lkml.kernel.org/r/4-v2-987e91b59705+36b-gup_tidy_jgg@nvidia.com Signed-off-by: Jason Gunthorpe Reviewed-by: John Hubbard Cc: Alistair Popple Cc: Christoph Hellwig Cc: Claudio Imbrenda Cc: David Hildenbrand Cc: David Howells Cc: Mike Rapoport (IBM) Signed-off-by: Andrew Morton commit afa3c33e2684c2eec4f47d83d2859b76f3568be6 Author: Jason Gunthorpe Date: Tue Jan 24 16:34:24 2023 -0400 mm/gup: don't call __gup_longterm_locked() if FOLL_LONGTERM cannot be set get_user_pages_remote(), get_user_pages_unlocked() and get_user_pages() are never called with FOLL_LONGTERM, so directly call __get_user_pages_locked() The next patch will add an assertion for this. Link: https://lkml.kernel.org/r/3-v2-987e91b59705+36b-gup_tidy_jgg@nvidia.com Signed-off-by: Jason Gunthorpe Suggested-by: John Hubbard Reviewed-by: John Hubbard Acked-by: Mike Rapoport (IBM) Cc: Alistair Popple Cc: Christoph Hellwig Cc: Claudio Imbrenda Cc: David Hildenbrand Cc: David Howells Signed-off-by: Andrew Morton commit 7427c30bea1449a885a1dd9baf991aaad26209ce Author: Jason Gunthorpe Date: Tue Jan 24 16:34:23 2023 -0400 mm/gup: remove obsolete FOLL_LONGTERM comment These days FOLL_LONGTERM is not allowed at all on any get_user_pages*() functions, it must be only be used with pin_user_pages*(), plus it now has universal support for all the pin_user_pages*() functions. Link: https://lkml.kernel.org/r/2-v2-987e91b59705+36b-gup_tidy_jgg@nvidia.com Signed-off-by: Jason Gunthorpe Reviewed-by: John Hubbard Cc: Alistair Popple Cc: Christoph Hellwig Cc: Claudio Imbrenda Cc: David Hildenbrand Cc: David Howells Cc: Mike Rapoport (IBM) Signed-off-by: Andrew Morton commit b2a72dff85fa27fd80349a4f7fae8a6e9bcbbd15 Author: Jason Gunthorpe Date: Tue Jan 24 16:34:22 2023 -0400 mm/gup: have internal functions get the mmap_read_lock() Patch series "Simplify the external interface for GUP", v2. It is quite a maze of EXPORTED symbols leading up to the three actual worker functions of GUP. Simplify this by reorganizing some of the code so the EXPORTED symbols directly call the correct internal function with validated and consistent arguments. Consolidate all the assertions into one place at the top of the call chains. Remove some dead code. Move more things into the mm/internal.h header This patch (of 13): __get_user_pages_locked() and __gup_longterm_locked() both require the mmap lock to be held. They have a slightly unusual locked parameter that is used to allow these functions to unlock and relock the mmap lock and convey that fact to the caller. Several places wrap these functions with a simple mmap_read_lock() just so they can follow the optimized locked protocol. Consolidate this internally to the functions. Allow internal callers to set locked = 0 to cause the functions to acquire and release the lock on their own. Reorganize __gup_longterm_locked() to use the autolocking in __get_user_pages_locked(). Replace all the places obtaining the mmap_read_lock() just to call __get_user_pages_locked() with the new mechanism. Replace all the internal callers of get_user_pages_unlocked() with direct calls to __gup_longterm_locked() using the new mechanism. A following patch will add assertions ensuring the external interface continues to always pass in locked = 1. Link: https://lkml.kernel.org/r/0-v2-987e91b59705+36b-gup_tidy_jgg@nvidia.com Link: https://lkml.kernel.org/r/1-v2-987e91b59705+36b-gup_tidy_jgg@nvidia.com Signed-off-by: Jason Gunthorpe Acked-by: Mike Rapoport (IBM) Reviewed-by: John Hubbard Cc: Alistair Popple Cc: Christoph Hellwig Cc: David Hildenbrand Cc: David Howells Cc: Claudio Imbrenda Signed-off-by: Andrew Morton commit 61a1a9906f66bd0eaaf9bade96f22a60f04240b7 Author: Baoquan He Date: Mon Feb 6 16:40:20 2023 +0800 sh: mm: set VM_IOREMAP flag to the vmalloc area Currently, for vmalloc areas with flag VM_IOREMAP set, except of the specific alignment clamping in __get_vm_area_node(), they will be 1) Shown as ioremap in /proc/vmallocinfo; 2) Ignored by /proc/kcore reading via vread() So for the ioremap in __sq_remap() of sh, we should set VM_IOREMAP in flag to make it handled correctly as above. Link: https://lkml.kernel.org/r/20230206084020.174506-8-bhe@redhat.com Signed-off-by: Baoquan He Reviewed-by: Lorenzo Stoakes Reviewed-by: Uladzislau Rezki (Sony) Cc: Dan Carpenter Cc: Stephen Brennan Signed-off-by: Andrew Morton commit 728e5ae07dd6cf72676e67e376671e52b7ddfac3 Author: Baoquan He Date: Mon Feb 6 16:40:19 2023 +0800 powerpc: mm: add VM_IOREMAP flag to the vmalloc area Currently, for vmalloc areas with flag VM_IOREMAP set, except of the specific alignment clamping in __get_vm_area_node(), they will be 1) Shown as ioremap in /proc/vmallocinfo; 2) Ignored by /proc/kcore reading via vread() So for the io mapping in ioremap_phb() of ppc, we should set VM_IOREMAP in flag to make it handled correctly as above. Link: https://lkml.kernel.org/r/20230206084020.174506-7-bhe@redhat.com Signed-off-by: Baoquan He Reviewed-by: Lorenzo Stoakes Reviewed-by: Uladzislau Rezki (Sony) Cc: Dan Carpenter Cc: Stephen Brennan Signed-off-by: Andrew Morton commit 30a7a9b17c4b0331ec67aadb4b30ff2a951b4ed5 Author: Baoquan He Date: Mon Feb 6 16:40:18 2023 +0800 mm/vmalloc: skip the uninitilized vmalloc areas For areas allocated via vmalloc_xxx() APIs, it searches for unmapped area to reserve and allocates new pages to map into, please see function __vmalloc_node_range(). During the process, flag VM_UNINITIALIZED is set in vm->flags to indicate that the pages allocation and mapping haven't been done, until clear_vm_uninitialized_flag() is called to clear VM_UNINITIALIZED. For this kind of area, if VM_UNINITIALIZED is still set, let's ignore it in vread() because pages newly allocated and being mapped in that area only contains zero data. reading them out by aligned_vread() is wasting time. Link: https://lkml.kernel.org/r/20230206084020.174506-6-bhe@redhat.com Signed-off-by: Baoquan He Reviewed-by: Lorenzo Stoakes Reviewed-by: Uladzislau Rezki (Sony) Cc: Dan Carpenter Cc: Stephen Brennan Signed-off-by: Andrew Morton commit bba9697b42ead45687352fdd0fd498735bc4361d Author: Baoquan He Date: Mon Feb 6 16:40:17 2023 +0800 mm/vmalloc: explicitly identify vm_map_ram area when shown in /proc/vmcoreinfo Now, by marking VMAP_RAM in vmap_area->flags for vm_map_ram area, we can clearly differentiate it with other vmalloc areas. So identify vm_map_area area by checking VMAP_RAM of vmap_area->flags when shown in /proc/vmcoreinfo. Meanwhile, the code comment above vm_map_ram area checking in s_show() is not needed any more, remove it here. Link: https://lkml.kernel.org/r/20230206084020.174506-5-bhe@redhat.com Signed-off-by: Baoquan He Reviewed-by: Lorenzo Stoakes Cc: Dan Carpenter Cc: Stephen Brennan Cc: Uladzislau Rezki (Sony) Signed-off-by: Andrew Morton commit 06c8994626d1b7d8c26dfd06992d67703a274054 Author: Baoquan He Date: Mon Feb 6 16:40:16 2023 +0800 mm/vmalloc.c: allow vread() to read out vm_map_ram areas Currently, vread can read out vmalloc areas which is associated with a vm_struct. While this doesn't work for areas created by vm_map_ram() interface because it doesn't have an associated vm_struct. Then in vread(), these areas are all skipped. Here, add a new function vmap_ram_vread() to read out vm_map_ram areas. The area created with vmap_ram_vread() interface directly can be handled like the other normal vmap areas with aligned_vread(). While areas which will be further subdivided and managed with vmap_block need carefully read out page-aligned small regions and zero fill holes. Link: https://lkml.kernel.org/r/20230206084020.174506-4-bhe@redhat.com Reported-by: Stephen Brennan Signed-off-by: Baoquan He Reviewed-by: Lorenzo Stoakes Tested-by: Stephen Brennan Cc: Dan Carpenter Cc: Uladzislau Rezki (Sony) Signed-off-by: Andrew Morton commit 869176a096068056b338b5cc1b0af93106007f5d Author: Baoquan He Date: Mon Feb 6 16:40:15 2023 +0800 mm/vmalloc.c: add flags to mark vm_map_ram area Through vmalloc API, a virtual kernel area is reserved for physical address mapping. And vmap_area is used to track them, while vm_struct is allocated to associate with the vmap_area to store more information and passed out. However, area reserved via vm_map_ram() is an exception. It doesn't have vm_struct to associate with vmap_area. And we can't recognize the vmap_area with '->vm == NULL' as a vm_map_ram() area because the normal freeing path will set va->vm = NULL before unmapping, please see function remove_vm_area(). Meanwhile, there are two kinds of handling for vm_map_ram area. One is the whole vmap_area being reserved and mapped at one time through vm_map_area() interface; the other is the whole vmap_area with VMAP_BLOCK_SIZE size being reserved, while mapped into split regions with smaller size via vb_alloc(). To mark the area reserved through vm_map_ram(), add flags field into struct vmap_area. Bit 0 indicates this is vm_map_ram area created through vm_map_ram() interface, while bit 1 marks out the type of vm_map_ram area which makes use of vmap_block to manage split regions via vb_alloc/free(). This is a preparation for later use. Link: https://lkml.kernel.org/r/20230206084020.174506-3-bhe@redhat.com Signed-off-by: Baoquan He Reviewed-by: Lorenzo Stoakes Reviewed-by: Uladzislau Rezki (Sony) Cc: Dan Carpenter Cc: Stephen Brennan Signed-off-by: Andrew Morton commit d76f99548cf0474c3bf75f25fab1778e03ade5f2 Author: Baoquan He Date: Mon Feb 6 16:40:14 2023 +0800 mm/vmalloc.c: add used_map into vmap_block to track space of vmap_block Patch series "mm/vmalloc.c: allow vread() to read out vm_map_ram areas", v5. Problem: *** Stephen reported vread() will skip vm_map_ram areas when reading out /proc/kcore with drgn utility. Please see below link to get more details. /proc/kcore reads 0's for vmap_block https://lore.kernel.org/all/87ilk6gos2.fsf@oracle.com/T/#u Root cause: *** The normal vmalloc API uses struct vmap_area to manage the virtual kernel area allocated, and associate a vm_struct to store more information and pass out. However, area reserved through vm_map_ram() interface doesn't allocate vm_struct to associate with. So the current code in vread() will skip the vm_map_ram area through 'if (!va->vm)' conditional checking. Solution: *** To mark the area reserved through vm_map_ram() interface, add field 'flags' into struct vmap_area. Bit 0 indicates this is vm_map_ram area created through vm_map_ram() interface, bit 1 marks out the type of vm_map_ram area which makes use of vmap_block to manage split regions via vb_alloc/free(). And also add bitmap field 'used_map' into struct vmap_block to mark those further subdivided regions being used to differentiate with dirty and free regions in vmap_block. With the help of above vmap_area->flags and vmap_block->used_map, we can recognize and handle vm_map_ram areas successfully. All these are done in patch 1~3. Meanwhile, do some improvement on areas related to vm_map_ram areas in patch 4, 5. And also change area flag from VM_ALLOC to VM_IOREMAP in patch 6, 7 because this will show them as 'ioremap' in /proc/vmallocinfo, and exclude them from /proc/kcore. This patch (of 7): In one vmap_block area, there could be three types of regions: region being used which is allocated through vb_alloc(), dirty region which is freed via vb_free() and free region. Among them, only used region has available data. While there's no way to track those used regions currently. Here, add bitmap field used_map into vmap_block, and set/clear it during allocation or freeing regions of vmap_block area. This is a preparation for later use. Link: https://lkml.kernel.org/r/20230206084020.174506-1-bhe@redhat.com Link: https://lkml.kernel.org/r/20230206084020.174506-2-bhe@redhat.com Signed-off-by: Baoquan He Reviewed-by: Lorenzo Stoakes Reviewed-by: Uladzislau Rezki (Sony) Cc: Dan Carpenter Cc: Stephen Brennan Cc: Uladzislau Rezki (Sony) Signed-off-by: Andrew Morton commit 5ff2121a3336a63aa7060cd71534d39dfb1cd2d1 Author: Matthew Wilcox (Oracle) Date: Mon Feb 6 19:08:50 2023 +0000 shmem: fix W=1 build warnings with CONFIG_SHMEM=n With W=1 and CONFIG_SHMEM=n, shmem.c functions have no prototypes so the compiler emits warnings. Link: https://lkml.kernel.org/r/20230206190850.4054983-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Mark Hemment Cc: Charan Teja Kalla Cc: David Rientjes Cc: Hugh Dickins Cc: Michal Hocko Cc: Pavankumar Kondeti Cc: Shakeel Butt Cc: Suren Baghdasaryan Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit f01b2b3ed8735dacd92f1da548708449525e286a Author: Matthew Wilcox (Oracle) Date: Mon Feb 6 16:25:20 2023 +0000 shmem: add shmem_read_folio() and shmem_read_folio_gfp() These are the folio replacements for shmem_read_mapping_page() and shmem_read_mapping_page_gfp(). [akpm@linux-foundation.org: fix shmem_read_mapping_page_gfp(), per Matthew] Link: https://lkml.kernel.org/r/Y+QdJTuzxeBYejw2@casper.infradead.org Link: https://lkml.kernel.org/r/20230206162520.4029022-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Mark Hemment Cc: Charan Teja Kalla Cc: David Rientjes Cc: Hugh Dickins Cc: Michal Hocko Cc: Pavankumar Kondeti Cc: Shakeel Butt Cc: Suren Baghdasaryan Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 3e629597b8477efbcc0ad14ee80558a080eebdc3 Author: Matthew Wilcox (Oracle) Date: Mon Feb 6 16:25:19 2023 +0000 filemap: add mapping_read_folio_gfp() This is like read_cache_page_gfp() except it returns the folio instead of the precise page. Link: https://lkml.kernel.org/r/20230206162520.4029022-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Charan Teja Kalla Cc: David Rientjes Cc: Hugh Dickins Cc: Mark Hemment Cc: Michal Hocko Cc: Pavankumar Kondeti Cc: Shakeel Butt Cc: Suren Baghdasaryan Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit aa02d3c174abfc506058d3e43f471bc4280563d0 Author: Yajun Deng Date: Fri Feb 3 18:01:32 2023 +0800 mm/page_alloc: reduce fallbacks to (MIGRATE_PCPTYPES - 1) The commit 1dd214b8f21c ("mm: page_alloc: avoid merging non-fallbackable pageblocks with others") has removed MIGRATE_CMA and MIGRATE_ISOLATE from fallbacks list. so there is no need to add an element at the end of every type. Reduce fallbacks to (MIGRATE_PCPTYPES - 1). Link: https://lkml.kernel.org/r/20230203100132.1627787-1-yajun.deng@linux.dev Signed-off-by: Yajun Deng Acked-by: Vlastimil Babka Cc: Zi Yan Cc: Mel Gorman Cc: David Hildenbrand Cc: Mike Rapoport Cc: Oscar Salvador Cc: Mike Rapoport Signed-off-by: Andrew Morton commit 601c3c29dbeb049862faa00917f2daf094a71028 Author: Suren Baghdasaryan Date: Tue Jan 31 16:01:16 2023 -0800 mm: introduce vm_flags_reset_once to replace WRITE_ONCE vm_flags updates Provide vm_flags_reset_once() and replace the vm_flags updates which used WRITE_ONCE() to prevent compiler optimizations. Link: https://lkml.kernel.org/r/20230201000116.1333160-1-surenb@google.com Fixes: 0cce31a0aa0e ("mm: replace vma->vm_flags direct modifications with modifier calls") Signed-off-by: Suren Baghdasaryan Reported-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: Michal Hocko Signed-off-by: Andrew Morton commit 7e4a32c0e8adafdda6161635c9046e6c1e8b95b5 Author: Hyunmin Lee Date: Wed Feb 1 20:51:42 2023 +0900 mm/vmalloc: replace BUG_ON with a simple if statement As per the coding standards, in the event of an abnormal condition that should not occur under normal circumstances, the kernel should attempt recovery and proceed with execution, rather than halting the machine. Specifically, in the alloc_vmap_area() function, use a simple if() instead of using BUG_ON() halting the machine. Link: https://lkml.kernel.org/r/20230201115142.GA7772@min-iamroot Co-developed-by: Gwan-gyeong Mun Signed-off-by: Gwan-gyeong Mun Co-developed-by: Jeungwoo Yoo Signed-off-by: Jeungwoo Yoo Co-developed-by: Sangyun Kim Signed-off-by: Sangyun Kim Signed-off-by: Hyunmin Lee Reviewed-by: Christophe Leroy Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Reviewed-by: Mike Rapoport (IBM) Reviewed-by: Uladzislau Rezki (Sony) Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Andrew Morton commit 1d693a3e69ba786c6c263d51b8e6d0daf16723ae Author: Longlong Xia Date: Tue Jan 31 07:10:35 2023 +0000 mm/swapfile: remove pr_debug in get_swap_pages() It's known that get_swap_pages() may fail to find available space under some extreme case, but pr_debug() provides useless information. Let's remove it. Link: https://lkml.kernel.org/r/20230131071035.1085968-1-xialonglong1@huawei.com Signed-off-by: Longlong Xia Reviewed-by: "Huang, Ying" Cc: Chen Wandun Cc: Kefeng Wang Cc: Nanyong Sun Signed-off-by: Andrew Morton commit e5080a9677854bdd82383713cba168c1b13e46ba Author: Mike Rapoport (IBM) Date: Sun Jan 29 14:42:35 2023 +0200 mm, arch: add generic implementation of pfn_valid() for FLATMEM Every architecture that supports FLATMEM memory model defines its own version of pfn_valid() that essentially compares a pfn to max_mapnr. Use mips/powerpc version implemented as static inline as a generic implementation of pfn_valid() and drop its per-architecture definitions. [rppt@kernel.org: fix the generic pfn_valid()] Link: https://lkml.kernel.org/r/Y9lg7R1Yd931C+y5@kernel.org Link: https://lkml.kernel.org/r/20230129124235.209895-5-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Acked-by: Arnd Bergmann Acked-by: Guo Ren [csky] Acked-by: Huacai Chen [LoongArch] Acked-by: Stafford Horne [OpenRISC] Acked-by: Michael Ellerman [powerpc] Reviewed-by: David Hildenbrand Tested-by: Conor Dooley Cc: Brian Cain Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Greg Ungerer Cc: Helge Deller Cc: Huacai Chen Cc: Matt Turner Cc: Max Filippov Cc: Michal Simek Cc: Palmer Dabbelt Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Thomas Bogendoerfer Cc: Vineet Gupta Cc: WANG Xuerui Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit c2524a6b7de1e8d2767ddc1ee43ee241a580e677 Author: Mike Rapoport (IBM) Date: Sun Jan 29 14:42:34 2023 +0200 mips: drop definition of pfn_valid() for DISCONTIGMEM There is a stale definition of pfn_valid() for DISCONTINGMEM memory model guarded !FLATMEM && !SPARSEMEM && NUMA ifdefery. Remove everything but definition of pfn_valid() for FLATMEM. Link: https://lkml.kernel.org/r/20230129124235.209895-4-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Reviewed-by: David Hildenbrand Cc: Arnd Bergmann Cc: Brian Cain Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Greg Ungerer Cc: Guo Ren Cc: Helge Deller Cc: Huacai Chen Cc: Huacai Chen Cc: Matt Turner Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Vineet Gupta Cc: WANG Xuerui Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit d82f07f06cf85b4fe4560ee7c1a460591db840df Author: Mike Rapoport (IBM) Date: Sun Jan 29 14:42:33 2023 +0200 m68k: use asm-generic/memory_model.h for both MMU and !MMU The MMU variant uses generic definitions of page_to_pfn() and pfn_to_page(), but !MMU defines them in include/asm/page_no.h for no good reason. Include asm-generic/memory_model.h in the common include/asm/page.h and drop redundant definitions. Link: https://lkml.kernel.org/r/20230129124235.209895-3-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Reviewed-by: David Hildenbrand Cc: Arnd Bergmann Cc: Brian Cain Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Greg Ungerer Cc: Guo Ren Cc: Helge Deller Cc: Huacai Chen Cc: Huacai Chen Cc: Matt Turner Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Vineet Gupta Cc: WANG Xuerui Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit 6069b9ec8c0fcd5ee09167020e9e5e673fce93f8 Author: Mike Rapoport (IBM) Date: Sun Jan 29 14:42:32 2023 +0200 arm: include asm-generic/memory_model.h from page.h rather than memory.h Patch series "mm, arch: add generic implementation of pfn_valid() for FLATMEM", v2. Every architecture that supports FLATMEM memory model defines its own version of pfn_valid() that essentially compares a pfn to max_mapnr. Use mips/powerpc version implemented as static inline as a generic implementation of pfn_valid() and drop its per-architecture definitions This patch (of 4): Makes it consistent with other architectures and allows for generic definition of pfn_valid() in asm-generic/memory_model.h with clear override in arch/arm/include/asm/page.h Link: https://lkml.kernel.org/r/20230129124235.209895-1-rppt@kernel.org Link: https://lkml.kernel.org/r/20230129124235.209895-2-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Reviewed-by: David Hildenbrand Cc: Arnd Bergmann Cc: Brian Cain Cc: "David S. Miller" Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Greg Ungerer Cc: Guo Ren Cc: Helge Deller Cc: Huacai Chen Cc: Huacai Chen Cc: Matt Turner Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Vineet Gupta Cc: WANG Xuerui Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit 93419139fa14124c1c507d804f2b28866ebee28d Author: Tong Tiangen Date: Sun Jan 29 04:06:51 2023 +0000 memory tier: release the new_memtier in find_create_memory_tier() In find_create_memory_tier(), if failed to register device, then we should release new_memtier from the tier list and put device instead of memtier. Link: https://lkml.kernel.org/r/20230129040651.1329208-1-tongtiangen@huawei.com Fixes: 9832fb87834e ("mm/demotion: expose memory tier details via sysfs") Signed-off-by: Tong Tiangen Cc: Aneesh Kumar K.V Cc: Hanjun Guo Cc: Kefeng Wang Cc: Guohanjun Cc: Signed-off-by: Andrew Morton commit 8f17febb34ceb464e3ff99e9436d0ae3f47b4862 Author: Kuan-Ying Lee Date: Sun Jan 29 10:14:35 2023 +0800 kasan: infer allocation size by scanning metadata Make KASAN scan metadata to infer the requested allocation size instead of printing cache->object_size. This patch fixes confusing slab-out-of-bounds reports as reported in: https://bugzilla.kernel.org/show_bug.cgi?id=216457 As an example of the confusing behavior, the report below hints that the allocation size was 192, while the kernel actually called kmalloc(184): ================================================================== BUG: KASAN: slab-out-of-bounds in _find_next_bit+0x143/0x160 lib/find_bit.c:109 Read of size 8 at addr ffff8880175766b8 by task kworker/1:1/26 ... The buggy address belongs to the object at ffff888017576600 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 184 bytes inside of 192-byte region [ffff888017576600, ffff8880175766c0) ... Memory state around the buggy address: ffff888017576580: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888017576600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888017576680: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc ^ ffff888017576700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888017576780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== With this patch, the report shows: ================================================================== ... The buggy address belongs to the object at ffff888017576600 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 0 bytes to the right of allocated 184-byte region [ffff888017576600, ffff8880175766b8) ... ================================================================== Also report slab use-after-free bugs as "slab-use-after-free" and print "freed" instead of "allocated" in the report when describing the accessed memory region. Also improve the metadata-related comment in kasan_find_first_bad_addr and use addr_has_metadata across KASAN code instead of open-coding KASAN_SHADOW_START checks. [akpm@linux-foundation.org: fix printk warning] Link: https://bugzilla.kernel.org/show_bug.cgi?id=216457 Link: https://lkml.kernel.org/r/20230129021437.18812-1-Kuan-Ying.Lee@mediatek.com Signed-off-by: Kuan-Ying Lee Co-developed-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Chinwen Chang Cc: Dmitry Vyukov Cc: Matthias Brugger Cc: Qun-Wei Lin Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit c2fdc235300a027adc04a41b383bd78ab5da56f4 Author: Suren Baghdasaryan Date: Thu Jan 26 11:37:52 2023 -0800 mm: export dump_mm() mmap_assert_write_locked() is used in vm_flags modifiers. Because mmap_assert_write_locked() uses dump_mm() and vm_flags are sometimes modified from inside a module, it's necessary to export dump_mm() function. Link: https://lkml.kernel.org/r/20230126193752.297968-8-surenb@google.com Signed-off-by: Suren Baghdasaryan Acked-by: Michal Hocko Acked-by: Mike Rapoport (IBM) Cc: Andy Lutomirski Cc: Arjun Roy Cc: Axel Rasmussen Cc: David Hildenbrand Cc: David Howells Cc: Davidlohr Bueso Cc: David Rientjes Cc: Eric Dumazet Cc: Greg Thelen Cc: Hugh Dickins Cc: Ingo Molnar Cc: Jann Horn Cc: Joel Fernandes Cc: Johannes Weiner Cc: Kent Overstreet Cc: Laurent Dufour Cc: Liam R. Howlett Cc: Lorenzo Stoakes Cc: Matthew Wilcox Cc: Mel Gorman Cc: Minchan Kim Cc: Paul E. McKenney Cc: Peter Oskolkov Cc: Peter Xu Cc: Peter Zijlstra Cc: Punit Agrawal Cc: Sebastian Andrzej Siewior Cc: Sebastian Reichel Cc: Shakeel Butt Cc: Soheil Hassas Yeganeh Cc: Song Liu Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton commit 68f48381d7fdd1cbb9d88c37a4dfbb98ac78226d Author: Suren Baghdasaryan Date: Thu Jan 26 11:37:51 2023 -0800 mm: introduce __vm_flags_mod and use it in untrack_pfn There are scenarios when vm_flags can be modified without exclusive mmap_lock, such as: - after VMA was isolated and mmap_lock was downgraded or dropped - in exit_mmap when there are no other mm users and locking is unnecessary Introduce __vm_flags_mod to avoid assertions when the caller takes responsibility for the required locking. Pass a hint to untrack_pfn to conditionally use __vm_flags_mod for flags modification to avoid assertion. Link: https://lkml.kernel.org/r/20230126193752.297968-7-surenb@google.com Signed-off-by: Suren Baghdasaryan Acked-by: Michal Hocko Acked-by: Mike Rapoport (IBM) Cc: Andy Lutomirski Cc: Arjun Roy Cc: Axel Rasmussen Cc: David Hildenbrand Cc: David Howells Cc: Davidlohr Bueso Cc: David Rientjes Cc: Eric Dumazet Cc: Greg Thelen Cc: Hugh Dickins Cc: Ingo Molnar Cc: Jann Horn Cc: Joel Fernandes Cc: Johannes Weiner Cc: Kent Overstreet Cc: Laurent Dufour Cc: Liam R. Howlett Cc: Lorenzo Stoakes Cc: Matthew Wilcox Cc: Mel Gorman Cc: Minchan Kim Cc: Paul E. McKenney Cc: Peter Oskolkov Cc: Peter Xu Cc: Peter Zijlstra Cc: Punit Agrawal Cc: Sebastian Andrzej Siewior Cc: Sebastian Reichel Cc: Shakeel Butt Cc: Soheil Hassas Yeganeh Cc: Song Liu Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton commit ff126c0ece69de1c12d2f6e77ec77df997dd19e6 Author: Suren Baghdasaryan Date: Thu Jan 26 11:37:50 2023 -0800 mm: replace vma->vm_flags indirect modification in ksm_madvise Replace indirect modifications to vma->vm_flags with calls to modifier functions to be able to track flag changes and to keep vma locking correctness. Link: https://lkml.kernel.org/r/20230126193752.297968-6-surenb@google.com Signed-off-by: Suren Baghdasaryan Acked-by: Michal Hocko Acked-by: Mel Gorman Acked-by: Mike Rapoport (IBM) Acked-by: Michael Ellerman [powerpc] Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Andy Lutomirski Cc: Arjun Roy Cc: Axel Rasmussen Cc: David Hildenbrand Cc: David Howells Cc: Davidlohr Bueso Cc: David Rientjes Cc: Eric Dumazet Cc: Greg Thelen Cc: Hugh Dickins Cc: Ingo Molnar Cc: Jann Horn Cc: Joel Fernandes Cc: Johannes Weiner Cc: Kent Overstreet Cc: Laurent Dufour Cc: Liam R. Howlett Cc: Lorenzo Stoakes Cc: Matthew Wilcox Cc: Minchan Kim Cc: Paul E. McKenney Cc: Peter Oskolkov Cc: Peter Xu Cc: Peter Zijlstra Cc: Punit Agrawal Cc: Sebastian Andrzej Siewior Cc: Sebastian Reichel Cc: Shakeel Butt Cc: Soheil Hassas Yeganeh Cc: Song Liu Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton commit 1c71222e5f2393b5ea1a41795c67589eea7e3490 Author: Suren Baghdasaryan Date: Thu Jan 26 11:37:49 2023 -0800 mm: replace vma->vm_flags direct modifications with modifier calls Replace direct modifications to vma->vm_flags with calls to modifier functions to be able to track flag changes and to keep vma locking correctness. [akpm@linux-foundation.org: fix drivers/misc/open-dice.c, per Hyeonggon Yoo] Link: https://lkml.kernel.org/r/20230126193752.297968-5-surenb@google.com Signed-off-by: Suren Baghdasaryan Acked-by: Michal Hocko Acked-by: Mel Gorman Acked-by: Mike Rapoport (IBM) Acked-by: Sebastian Reichel Reviewed-by: Liam R. Howlett Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Andy Lutomirski Cc: Arjun Roy Cc: Axel Rasmussen Cc: David Hildenbrand Cc: David Howells Cc: Davidlohr Bueso Cc: David Rientjes Cc: Eric Dumazet Cc: Greg Thelen Cc: Hugh Dickins Cc: Ingo Molnar Cc: Jann Horn Cc: Joel Fernandes Cc: Johannes Weiner Cc: Kent Overstreet Cc: Laurent Dufour Cc: Lorenzo Stoakes Cc: Matthew Wilcox Cc: Minchan Kim Cc: Paul E. McKenney Cc: Peter Oskolkov Cc: Peter Xu Cc: Peter Zijlstra Cc: Punit Agrawal Cc: Sebastian Andrzej Siewior Cc: Shakeel Butt Cc: Soheil Hassas Yeganeh Cc: Song Liu Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton commit e430a95a04efc557bc4ff9b3035c7c85aee5d63f Author: Suren Baghdasaryan Date: Thu Jan 26 11:37:48 2023 -0800 mm: replace VM_LOCKED_CLEAR_MASK with VM_LOCKED_MASK To simplify the usage of VM_LOCKED_CLEAR_MASK in vm_flags_clear(), replace it with VM_LOCKED_MASK bitmask and convert all users. Link: https://lkml.kernel.org/r/20230126193752.297968-4-surenb@google.com Signed-off-by: Suren Baghdasaryan Acked-by: Michal Hocko Acked-by: Mel Gorman Acked-by: Mike Rapoport (IBM) Reviewed-by: Davidlohr Bueso Cc: Andy Lutomirski Cc: Arjun Roy Cc: Axel Rasmussen Cc: David Hildenbrand Cc: David Howells Cc: David Rientjes Cc: Eric Dumazet Cc: Greg Thelen Cc: Hugh Dickins Cc: Ingo Molnar Cc: Jann Horn Cc: Joel Fernandes Cc: Johannes Weiner Cc: Kent Overstreet Cc: Laurent Dufour Cc: Liam R. Howlett Cc: Lorenzo Stoakes Cc: Matthew Wilcox Cc: Minchan Kim Cc: Paul E. McKenney Cc: Peter Oskolkov Cc: Peter Xu Cc: Peter Zijlstra Cc: Punit Agrawal Cc: Sebastian Andrzej Siewior Cc: Sebastian Reichel Cc: Shakeel Butt Cc: Soheil Hassas Yeganeh Cc: Song Liu Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton commit bc292ab00f6c7a661a8a605c714e8a148f629ef6 Author: Suren Baghdasaryan Date: Thu Jan 26 11:37:47 2023 -0800 mm: introduce vma->vm_flags wrapper functions vm_flags are among VMA attributes which affect decisions like VMA merging and splitting. Therefore all vm_flags modifications are performed after taking exclusive mmap_lock to prevent vm_flags updates racing with such operations. Introduce modifier functions for vm_flags to be used whenever flags are updated. This way we can better check and control correct locking behavior during these updates. Link: https://lkml.kernel.org/r/20230126193752.297968-3-surenb@google.com Signed-off-by: Suren Baghdasaryan Reviewed-by: Davidlohr Bueso Acked-by: Michal Hocko Acked-by: Mel Gorman Acked-by: Mike Rapoport (IBM) Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Andy Lutomirski Cc: Arjun Roy Cc: Axel Rasmussen Cc: David Hildenbrand Cc: David Howells Cc: David Rientjes Cc: Eric Dumazet Cc: Greg Thelen Cc: Hugh Dickins Cc: Ingo Molnar Cc: Jann Horn Cc: Joel Fernandes Cc: Johannes Weiner Cc: Kent Overstreet Cc: Laurent Dufour Cc: Liam R. Howlett Cc: Lorenzo Stoakes Cc: Matthew Wilcox Cc: Minchan Kim Cc: Paul E. McKenney Cc: Peter Oskolkov Cc: Peter Xu Cc: Peter Zijlstra Cc: Punit Agrawal Cc: Sebastian Andrzej Siewior Cc: Sebastian Reichel Cc: Shakeel Butt Cc: Soheil Hassas Yeganeh Cc: Song Liu Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton commit 06e78b614e3780f9ac32056f2861159fd19d9702 Author: Suren Baghdasaryan Date: Thu Jan 26 11:37:46 2023 -0800 kernel/fork: convert vma assignment to a memcpy Patch series "introduce vm_flags modifier functions", v4. This patchset was originally published as a part of per-VMA locking [1] and was split after suggestion that it's viable on its own and to facilitate the review process. It is now a preprequisite for the next version of per-VMA lock patchset, which reuses vm_flags modifier functions to lock the VMA when vm_flags are being updated. VMA vm_flags modifications are usually done under exclusive mmap_lock protection because this attrubute affects other decisions like VMA merging or splitting and races should be prevented. Introduce vm_flags modifier functions to enforce correct locking. This patch (of 7): Convert vma assignment in vm_area_dup() to a memcpy() to prevent compiler errors when we add a const modifier to vma->vm_flags. Link: https://lkml.kernel.org/r/20230126193752.297968-1-surenb@google.com Link: https://lkml.kernel.org/r/20230126193752.297968-2-surenb@google.com Signed-off-by: Suren Baghdasaryan Acked-by: Mel Gorman Acked-by: Mike Rapoport (IBM) Cc: Andy Lutomirski Cc: Arjun Roy Cc: Axel Rasmussen Cc: David Hildenbrand Cc: David Howells Cc: Davidlohr Bueso Cc: David Rientjes Cc: Eric Dumazet Cc: Greg Thelen Cc: Hugh Dickins Cc: Ingo Molnar Cc: Jann Horn Cc: Joel Fernandes Cc: Johannes Weiner Cc: Kent Overstreet Cc: Laurent Dufour Cc: Liam R. Howlett Cc: Lorenzo Stoakes Cc: Matthew Wilcox Cc: Michal Hocko Cc: Minchan Kim Cc: Paul E. McKenney Cc: Peter Oskolkov Cc: Peter Xu Cc: Peter Zijlstra Cc: Punit Agrawal Cc: Sebastian Andrzej Siewior Cc: Shakeel Butt Cc: Soheil Hassas Yeganeh Cc: Song Liu Cc: Vlastimil Babka Cc: Will Deacon Cc: Sebastian Reichel Signed-off-by: Andrew Morton commit 18b098af2890cdeab07368405409111197f190d2 Author: Liam R. Howlett Date: Fri Jan 20 11:26:50 2023 -0500 vma_merge: set vma iterator to correct position. When merging the previous value, set the vma iterator to the previous slot. Don't use the vma iterator to get the next/prev so that it is in the correct position for a write. Link: https://lkml.kernel.org/r/20230120162650.984577-50-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 0503ea8f5ba73eb3ab13a81c1eefbaf51405385a Author: Liam R. Howlett Date: Fri Jan 20 11:26:49 2023 -0500 mm/mmap: remove __vma_adjust() Inline the work of __vma_adjust() into vma_merge(). This reduces code size and has the added benefits of the comments for the cases being located with the code. Change the comments referencing vma_adjust() accordingly. [Liam.Howlett@oracle.com: fix vma_merge() offset when expanding the next vma] Link: https://lkml.kernel.org/r/20230130195713.2881766-1-Liam.Howlett@oracle.com Link: https://lkml.kernel.org/r/20230120162650.984577-49-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 287051b185048c4aabe666439e64232ac59135a6 Author: Liam R. Howlett Date: Fri Jan 20 11:26:48 2023 -0500 mm/mmap: convert do_brk_flags() to use vma_prepare() and vma_complete() Use the abstracted vma locking for do_brk_flags() Link: https://lkml.kernel.org/r/20230120162650.984577-48-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 04241ffe3f0458d54c61cf6c9d58d703efda4dd5 Author: Liam R. Howlett Date: Fri Jan 20 11:26:47 2023 -0500 mm/mmap: introduce dup_vma_anon() helper Create a helper for duplicating the anon vma when adjusting the vma. This simplifies the logic of __vma_adjust(). Link: https://lkml.kernel.org/r/20230120162650.984577-47-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit cf51e86dfbe39b7cae3a9de650d035af22dd5fb4 Author: Liam R. Howlett Date: Fri Jan 20 11:26:46 2023 -0500 mm/mmap: don't use __vma_adjust() in shift_arg_pages() Introduce shrink_vma() which uses the vma_prepare() and vma_complete() functions to reduce the vma coverage. Convert shift_arg_pages() to use expand_vma() and the new shrink_vma() function. Remove support from __vma_adjust() to reduce a vma size since shift_arg_pages() is the only user that shrinks a VMA in this way. Link: https://lkml.kernel.org/r/20230120162650.984577-46-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 7c9813e886bb52495ff5b97d4b0f1320d36d869b Author: Liam R. Howlett Date: Fri Jan 20 11:26:45 2023 -0500 mm/mremap: convert vma_adjust() to vma_expand() Stop using vma_adjust() in preparation for removing the function. Export vma_expand() to use instead. Link: https://lkml.kernel.org/r/20230120162650.984577-45-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit b2b3b886738fec5e89ca9ebc720eba1a8f615753 Author: Liam R. Howlett Date: Fri Jan 20 11:26:44 2023 -0500 mm: don't use __vma_adjust() in __split_vma() Use the abstracted locking and maple tree operations. Since __split_vma() is the only user of the __vma_adjust() function to use the insert argument, drop that argument. Remove the NULL passed through from fs/exec's shift_arg_pages() and mremap() at the same time. Link: https://lkml.kernel.org/r/20230120162650.984577-44-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 68cefec539206ea691409f0d1e944ed343f23f04 Author: Liam R. Howlett Date: Fri Jan 20 11:26:43 2023 -0500 mm/mmap: introduce init_vma_prep() and init_multi_vma_prep() Add init_vma_prep() and init_multi_vma_prep() to set up the struct vma_prepare. This is to abstract the locking when adjusting the VMAs. Also change __vma_adjust() variable remove_next int in favour of a pointer to the VMA to remove. Rename next_next to remove2 since this better reflects its use. Link: https://lkml.kernel.org/r/20230120162650.984577-43-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 9303d3e1c3f8d8863d561a070489cf44ce5e4103 Author: Liam R. Howlett Date: Fri Jan 20 11:26:42 2023 -0500 mm/mmap: use vma_prepare() and vma_complete() in vma_expand() Use the new locking functions for vma_expand(). This reduces code duplication. At the same time change VM_BUG_ON() to VM_WARN_ON() Link: https://lkml.kernel.org/r/20230120162650.984577-42-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 440703e082b9c79c3d4fffcca8c2dffd621e6dc5 Author: Liam R. Howlett Date: Fri Jan 20 11:26:41 2023 -0500 mm/mmap: refactor locking out of __vma_adjust() Move the locking into vma_prepare() and vma_complete() for use elsewhere Link: https://lkml.kernel.org/r/20230120162650.984577-41-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit e3d73f848e5f2e9da46646c97fb127dfc6868767 Author: Liam R. Howlett Date: Fri Jan 20 11:26:40 2023 -0500 mm/mmap: move anon_vma setting in __vma_adjust() Move the anon_vma setting & warn_no up the function. This is done to clear up the locking later. Link: https://lkml.kernel.org/r/20230120162650.984577-40-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 6b73cff239e52fd43949c40eaabb369298c11aae Author: Liam R. Howlett Date: Fri Jan 20 11:26:39 2023 -0500 mm: change munmap splitting order and move_vma() Splitting can be more efficient when the order is not of concern. Change do_vmi_align_munmap() to reduce walking of the tree during split operations. move_vma() must also be altered to remove the dependency of keeping the original VMA as the active part of the split. Transition to using vma iterator to look up the prev and/or next vma after munmap. [Liam.Howlett@oracle.com: fix vma iterator initialization] Link: https://lkml.kernel.org/r/20230126212011.980350-1-Liam.Howlett@oracle.com Link: https://lkml.kernel.org/r/20230120162650.984577-39-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit cc8d1b097de78bd25b7b1ed32018b21cecbf3f6c Author: Liam R. Howlett Date: Fri Jan 20 11:26:38 2023 -0500 mmap: clean up mmap_region() unrolling Move logic of unrolling to the error path as apposed to duplicating it within the function body. This reduces the potential of missing an update to one path when making changes. Link: https://lkml.kernel.org/r/20230120162650.984577-38-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Cc: Li Zetao Signed-off-by: Andrew Morton commit b373037fa9bb374f26bbabc0779fe990d02d33b7 Author: Liam R. Howlett Date: Fri Jan 20 11:26:37 2023 -0500 mm: add vma iterator to vma_adjust() arguments Change the vma_adjust() function definition to accept the vma iterator and pass it through to __vma_adjust(). Update fs/exec to use the new vma_adjust() function parameters. Update mm/mremap to use the new vma_adjust() function parameters. Revert the __split_vma() calls back from __vma_adjust() to vma_adjust() and pass through the vma iterator. Link: https://lkml.kernel.org/r/20230120162650.984577-37-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 0fd5a9e2b09ff589370f2c536df77654ed2d341f Author: Liam R. Howlett Date: Fri Jan 20 11:26:36 2023 -0500 mm: pass vma iterator through to __vma_adjust() Pass the iterator through to be used in __vma_adjust(). The state of the iterator needs to be correct for the operation that will occur so make the adjustments. Link: https://lkml.kernel.org/r/20230120162650.984577-36-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit c465be97a4bc0022688d99f77a75b9be91843b31 Author: Liam R. Howlett Date: Fri Jan 20 11:26:35 2023 -0500 mm: remove unnecessary write to vma iterator in __vma_adjust() If the vma start address is going to change due to an insert, then it is safe to not write the vma to the tree. The write of the insert vma will alter the tree as necessary. Link: https://lkml.kernel.org/r/20230120162650.984577-35-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 85ab779e3426dc47cc27418821e6577680b509b9 Author: Liam R. Howlett Date: Fri Jan 20 11:26:34 2023 -0500 madvise: use split_vma() instead of __split_vma() The split_vma() wrapper is specifically for this use case, so use it. [Liam.Howlett@oracle.com: fix VMA_ITERATOR start position] Link: https://lkml.kernel.org/r/20230125135809.85262-1-Liam.Howlett@oracle.com Link: https://lkml.kernel.org/r/20230120162650.984577-34-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 9e56044625a1f472edc278105f41a60726991d89 Author: Liam R. Howlett Date: Fri Jan 20 11:26:33 2023 -0500 mm: pass through vma iterator to __vma_adjust() Pass the vma iterator through to __vma_adjust() so the state can be updated. Link: https://lkml.kernel.org/r/20230120162650.984577-33-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit fbcc3104b8437cc1babf04421e8bb8181561343e Author: Liam R. Howlett Date: Fri Jan 20 11:26:32 2023 -0500 mmap: convert __vma_adjust() to use vma iterator Use the vma iterator internally for __vma_adjust(). Avoid using the maple tree interface directly for type safety. Link: https://lkml.kernel.org/r/20230120162650.984577-32-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 34403fa579514a6de378f06f79239821c92305bf Author: Liam R. Howlett Date: Fri Jan 20 11:26:31 2023 -0500 mm/damon/vaddr-test.h: stop using vma_mas_store() for maple tree store Prepare for the removal of the vma_mas_store() function by open coding the maple tree store in this test code. Set the range of the maple state and call the store function directly. Link: https://lkml.kernel.org/r/20230120162650.984577-31-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Reported-by: kernel test robot Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton commit 9760ebffbf5507320e0de41f5b80089bdef996a0 Author: Liam R. Howlett Date: Fri Jan 20 11:26:30 2023 -0500 mm: switch vma_merge(), split_vma(), and __split_vma to vma iterator Drop the vmi_* functions and transition all users to use the vma iterator directly. Link: https://lkml.kernel.org/r/20230120162650.984577-30-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 07f1bc5ad7983356ca79c65b22148dc5700a24e5 Author: Liam R. Howlett Date: Fri Jan 20 11:26:29 2023 -0500 nommu: pass through vma iterator to shrink_vma() Rename the function to vmi_shrink_vma() indicate it takes the vma iterator. Use the iterator to preallocate and drop the delete function. The maple tree is able to do the modification easier than the linked list and rbtree, so just clear the necessary area in the tree. add_vma_to_mm() is no longer used, so drop this function. vmi_add_vma_to_mm() is now only used once, so inline this function into do_mmap(). Link: https://lkml.kernel.org/r/20230120162650.984577-29-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 47d9644de92c1aa9dcd791203397b161c67096ca Author: Liam R. Howlett Date: Fri Jan 20 11:26:28 2023 -0500 nommu: convert nommu to using the vma iterator Gain type safety in nommu by using the vma_iterator and not the maple tree directly. Link: https://lkml.kernel.org/r/20230120162650.984577-28-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit a27a11f92fe2bb1c02c8bba0a8315f9b7ad3b396 Author: Liam R. Howlett Date: Fri Jan 20 11:26:27 2023 -0500 mm/mremap: use vmi version of vma_merge() Use the vma iterator so that the iterator can be invalidated or updated to avoid each caller doing so. Link: https://lkml.kernel.org/r/20230120162650.984577-27-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 076f16bf7698fae4b27030238998474a21d2233c Author: Liam R. Howlett Date: Fri Jan 20 11:26:26 2023 -0500 mmap: use vmi version of vma_merge() Use the vma iterator so that the iterator can be invalidated or updated to avoid each caller doing so. Link: https://lkml.kernel.org/r/20230120162650.984577-26-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 0c0c5bffd0a24637f1601ce15937ae38e572069c Author: Liam R. Howlett Date: Fri Jan 20 11:26:25 2023 -0500 mmap: pass through vmi iterator to __split_vma() Use the vma iterator so that the iterator can be invalidated or updated to avoid each caller doing so. Link: https://lkml.kernel.org/r/20230120162650.984577-25-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 178e22ac2078b1a7d284c7e3b4c3fbdb8e85ae99 Author: Liam R. Howlett Date: Fri Jan 20 11:26:24 2023 -0500 madvise: use vmi iterator for __split_vma() and vma_merge() Use the vma iterator so that the iterator can be invalidated or updated to avoid each caller doing so. Link: https://lkml.kernel.org/r/20230120162650.984577-24-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 214dbc4281374cbbd833edd502d0ed1fd1b0e243 Author: Liam R. Howlett Date: Fri Jan 20 11:26:23 2023 -0500 sched: convert to vma iterator Use the vma iterator so that the iterator can be invalidated or updated to avoid each caller doing so. Link: https://lkml.kernel.org/r/20230120162650.984577-23-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 250cb40f0afee232d8573d7b1d8bc56d4b92f63e Author: Liam R. Howlett Date: Fri Jan 20 11:26:22 2023 -0500 task_mmu: convert to vma iterator Use the vma iterator so that the iterator can be invalidated or updated to avoid each caller doing so. Update the comments to how the vma iterator works. The vma iterator will keep track of the last vm_end and start the search from vm_end + 1. Link: https://lkml.kernel.org/r/20230120162650.984577-22-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit f10c2abcdac4a44795fae9118eaedfe56204afda Author: Liam R. Howlett Date: Fri Jan 20 11:26:21 2023 -0500 mempolicy: convert to vma iterator Use the vma iterator so that the iterator can be invalidated or updated to avoid each caller doing so. Link: https://lkml.kernel.org/r/20230120162650.984577-21-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit e552cdb853dab085d30d54815e044aa4836a6dc6 Author: Liam R. Howlett Date: Fri Jan 20 11:26:20 2023 -0500 coredump: convert to vma iterator Use the vma iterator so that the iterator can be invalidated or updated to avoid each caller doing so. Link: https://lkml.kernel.org/r/20230120162650.984577-20-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 37598f5a9d8b63b91cce0cb6bac5f6374ed1bb80 Author: Liam R. Howlett Date: Fri Jan 20 11:26:19 2023 -0500 mlock: convert mlock to vma iterator Use the vma iterator so that the iterator can be invalidated or updated to avoid each caller doing so. Link: https://lkml.kernel.org/r/20230120162650.984577-19-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 2286a6914c776ec34cd97e4573b1466d055cb9de Author: Liam R. Howlett Date: Fri Jan 20 11:26:18 2023 -0500 mm: change mprotect_fixup to vma iterator Use the vma iterator so that the iterator can be invalidated or updated to avoid each caller doing so. Link: https://lkml.kernel.org/r/20230120162650.984577-18-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 11a9b90274f6a50f7877a61c8e82dd3c845ff1dd Author: Liam R. Howlett Date: Fri Jan 20 11:26:17 2023 -0500 userfaultfd: use vma iterator Use the vma iterator so that the iterator can be invalidated or updated to avoid each caller doing so. Link: https://lkml.kernel.org/r/20230120162650.984577-17-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 27b267011296e35dd5c983bf6c53b7230c78f383 Author: Liam R. Howlett Date: Thu Jan 26 16:20:49 2023 -0500 ipc/shm: introduce new do_vma_munmap() to munmap The shm already has the vma iterator in position for a write. do_vmi_munmap() searches for the correct position and aligns the write, so it is not the right function to use in this case. The shm VMA tree modification is similar to the brk munmap situation, the vma iterator is in position and the VMA is already known. This patch generalizes the brk munmap function do_brk_munmap() to be used for any other callers with the vma iterator already in position to munmap a VMA. Link: https://lkml.kernel.org/r/20230126212049.980501-1-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Reported-by: Sven Schnelle Link: https://lore.kernel.org/linux-mm/yt9dh6wec21a.fsf@linux.ibm.com/ Cc: Arnd Bergmann Signed-off-by: Andrew Morton commit d60beb1f698a429825ea2c463ee9e3dc3b1a79b7 Author: Liam R. Howlett Date: Fri Jan 20 11:26:16 2023 -0500 ipc/shm: use the vma iterator for munmap calls Pass through the vma iterator to do_vmi_munmap() to handle the iterator state internally Link: https://lkml.kernel.org/r/20230120162650.984577-16-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit f2ebfe43ba6c845e70b6acbabd6c69ab74b3c52e Author: Liam R. Howlett Date: Fri Jan 20 11:26:15 2023 -0500 mm: add temporary vma iterator versions of vma_merge(), split_vma(), and __split_vma() These wrappers are short-lived in this patch set so that each user can be converted on its own. In the end, these functions are renamed in one commit. Link: https://lkml.kernel.org/r/20230120162650.984577-15-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 3c441ab7d059ebfd2535a52c001c50eac5d63886 Author: Liam R. Howlett Date: Fri Jan 20 11:26:14 2023 -0500 mmap: convert vma_expand() to use vma iterator Use the vma iterator instead of the maple state for type safety and for consistency through the mm code. Link: https://lkml.kernel.org/r/20230120162650.984577-14-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 183654ce26a5d5bd7bc11bcb02e8086f02f66d7d Author: Liam R. Howlett Date: Fri Jan 20 11:26:13 2023 -0500 mmap: change do_mas_munmap and do_mas_aligned_munmap() to use vma iterator Start passing the vma iterator through the mm code. This will allow for reuse of the state and cleaner invalidation if necessary. Link: https://lkml.kernel.org/r/20230120162650.984577-13-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 0378c0a0e9e463b9e31b94fbbbc10f94b34225b6 Author: Liam R. Howlett Date: Fri Jan 20 11:26:12 2023 -0500 mm/mmap: remove preallocation from do_mas_align_munmap() In preparation of passing the vma state through split, the pre-allocation that occurs before the split has to be moved to after. Since the preallocation would then live right next to the store, just call store instead of preallocating. This effectively restores the potential error path of splitting and not munmap'ing which pre-dates the maple tree. Link: https://lkml.kernel.org/r/20230120162650.984577-12-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 79e4f2caa4401e56f8df34f658c43bacddc0ae03 Author: Liam R. Howlett Date: Fri Jan 20 11:26:11 2023 -0500 mmap: convert vma_link() vma iterator Avoid using the maple tree interface directly. Link: https://lkml.kernel.org/r/20230120162650.984577-11-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 3b9dbd5e91b11911d21effbb80d1976fb21660df Author: Liam R. Howlett Date: Fri Jan 20 11:26:10 2023 -0500 kernel/fork: convert forking to using the vmi iterator Avoid using the maple tree interface directly. This gains type safety. Link: https://lkml.kernel.org/r/20230120162650.984577-10-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 92fed82047d7febc83614a9579c37f1ce80442be Author: Liam R. Howlett Date: Fri Jan 20 11:26:09 2023 -0500 mm/mmap: convert brk to use vma iterator Use the vma iterator API for the brk() system call. This will provide type safety at compile time. Link: https://lkml.kernel.org/r/20230120162650.984577-9-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit b62b633e048bbddef90b2e55d2e33823187b425f Author: Liam R. Howlett Date: Fri Jan 20 11:26:08 2023 -0500 mm: expand vma iterator interface Add wrappers for the maple tree to the vma iterator. This will provide type safety at compile time. Link: https://lkml.kernel.org/r/20230120162650.984577-8-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 17dc622c7b0f94e49bed030726df4db12ecaa6b5 Author: Liam R. Howlett Date: Fri Jan 20 11:26:07 2023 -0500 maple_tree: fix mas_prev() and mas_find() state handling When mas_prev() does not find anything, set the state to MAS_NONE. Handle the MAS_NONE in mas_find() like a MAS_START. Link: https://lkml.kernel.org/r/20230120162650.984577-7-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Reported-by: Signed-off-by: Andrew Morton commit 1202700c3f8cc5f7e4646c3cf05ee6f7c8bc6ccf Author: Liam R. Howlett Date: Fri Jan 20 11:26:06 2023 -0500 maple_tree: fix handle of invalidated state in mas_wr_store_setup() If an invalidated maple state is encountered during write, reset the maple state to MAS_START. This will result in a re-walk of the tree to the correct location for the write. Link: https://lore.kernel.org/all/20230107020126.1627-1-sj@kernel.org/ Link: https://lkml.kernel.org/r/20230120162650.984577-6-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Reported-by: SeongJae Park Signed-off-by: Andrew Morton commit 5159d64b335401fa83f18c27e2267f1eafc41bd3 Author: Liam R. Howlett Date: Fri Jan 20 11:26:05 2023 -0500 test_maple_tree: test modifications while iterating Add a testcase to ensure the iterator detects bad states on modifications and does what the user expects Link: https://lkml.kernel.org/r/20230120162650.984577-5-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 50e81c82ad947045c7ed26ddc9acb17276b653b6 Author: Liam R. Howlett Date: Fri Jan 20 11:26:04 2023 -0500 maple_tree: reduce user error potential When iterating, a user may operate on the tree and cause the maple state to be altered and left in an unintuitive state. Detect this scenario and correct it by setting to the limit and invalidating the state. Link: https://lkml.kernel.org/r/20230120162650.984577-4-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 65be6f058b0eba98dc6c6f197ea9f62c9b6a519f Author: Liam R. Howlett Date: Fri Jan 20 11:26:03 2023 -0500 maple_tree: fix potential rcu issue Ensure the node isn't dead after reading the node end. Link: https://lkml.kernel.org/r/20230120162650.984577-3-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit e7f43ca99fc8bff2333547bb08dae20a35a23450 Author: Liam R. Howlett Date: Fri Jan 20 11:26:02 2023 -0500 maple_tree: add mas_init() function Patch series "VMA tree type safety and remove __vma_adjust()", v4. This patchset does two things: 1. Clean up, including removal of __vma_adjust() and 2. Extends the VMA iterator API to provide type safety to the VMA operations using the maple tree, as requested by Linus [1]. It also addresses another issue of usability brought up by Linus about needing to modify the maple state within the loops. The maple state has been replaced by the VMA iterator and the iterator is now modified within the MM code so the caller should not need to worry about doing the work themselves when tree modifications occur. This brought up a potential inconsistency of the iterator state and what the user expects, so the inconsistency is addressed to keep the VMA iterator safe for use after the looping over a VMA range. This is addressed in patch 3 ("maple_tree: Reduce user error potential") and 4 ("test_maple_tree: Test modifications while iterating"). While cleaning up the state, the duplicate locking code in mm/mmap.c introduced by the maple tree has been address by abstracting it to two functions: vma_prepare() and vma_complete(). These abstractions allowed for a much simpler __vma_adjust(), which eventually leads to the removal of the __vma_adjust() function by placing the logic into the vma_merge() function itself. 1. https://lore.kernel.org/linux-mm/CAHk-=wg9WQXBGkNdKD2bqocnN73rDswuWsavBB7T-tekykEn_A@mail.gmail.com/ This patch (of 49): Add a function that will zero out the maple state struct and set some basic defaults. Link: https://lkml.kernel.org/r/20230120162650.984577-1-Liam.Howlett@oracle.com Link: https://lkml.kernel.org/r/20230120162650.984577-2-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton commit c643e6ebedb435bcf863001f5e69a578f2658055 Author: Matthew Wilcox (Oracle) Date: Fri Feb 3 16:28:40 2023 -0500 mm: fix memcpy_from_file_folio() integer underflow If we have a HIGHMEM system with a large folio, 'offset' may be larger than PAGE_SIZE, and so min_t will cap at 'len' instead of the intended end-of-page. That can overflow into the next page which is likely to be unmapped and fault, but could theoretically copy the wrong data. Link: https://lkml.kernel.org/r/Y919vmSrtAgsf6K3@casper.infradead.org Fixes: 00cdf76012ab ("mm: add memcpy_from_file_folio()") Signed-off-by: Matthew Wilcox (Oracle) Cc: "Fabio M. De Francesco" Cc: Ira Weiny Signed-off-by: Andrew Morton commit 6f74c0ec2095335158015ce29b708e775b9cea3a Author: David Hildenbrand Date: Wed Feb 8 15:08:01 2023 +0100 arm/mm: fix swp type masking in __swp_entry() We're masking with the number of type bits instead of the type mask, which is obviously wrong. Link: https://lkml.kernel.org/r/39fd91e3-c93b-23c6-afc6-cbe473bb0ca9@redhat.com Fixes: 20aae9eff5ac ("arm/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE") Signed-off-by: David Hildenbrand Reported-by: Mark Brown Tested-by: Mark Brown Cc: Russell King (Oracle) Signed-off-by: Andrew Morton commit 460e9bed82e49db1b823dcb4e421783854d86c40 Author: Qiheng Lin Date: Fri Feb 10 01:02:53 2023 +0100 s390/dasd: Fix potential memleak in dasd_eckd_init() `dasd_reserve_req` is allocated before `dasd_vol_info_req`, and it also needs to be freed before the error returns, just like the other cases in this function. Fixes: 9e12e54c7a8f ("s390/dasd: Handle out-of-space constraint") Signed-off-by: Qiheng Lin Link: https://lore.kernel.org/r/20221208133809.16796-1-linqiheng@huawei.com Signed-off-by: Stefan Haberland Link: https://lore.kernel.org/r/20230210000253.1644903-3-sth@linux.ibm.com Signed-off-by: Jens Axboe commit b87c52e431adfe2dfe8634216b317b4a952aa9fc Author: Alexander Gordeev Date: Fri Feb 10 01:02:52 2023 +0100 s390/dasd: sort out physical vs virtual pointers usage This does not fix a real bug, since virtual addresses are currently indentical to physical ones. Signed-off-by: Alexander Gordeev Signed-off-by: Stefan Haberland Link: https://lore.kernel.org/r/20230210000253.1644903-2-sth@linux.ibm.com Signed-off-by: Jens Axboe commit 9af9935494e4b86ec3c44ec42779f08c4ba79ffe Author: Bart Van Assche Date: Thu Feb 9 15:01:35 2023 -0800 block: Remove the ALLOC_CACHE_SLACK constant Commit b99182c501c3 ("bio: add pcpu caching for non-polling bio_put") removed the code that uses this constant. Hence also remove the constant itself. Cc: Pavel Begunkov Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230209230135.3475829-1-bvanassche@acm.org Signed-off-by: Jens Axboe commit 5ddfa148de8cf5491fd1c89522c7cad859db8c88 Author: Paul Cercueil Date: Sun Jan 29 12:04:42 2023 +0000 rtc: jz4740: Register clock provider for the CLK32K pin On JZ4770 and JZ4780, the CLK32K pin is configurable. By default, it is configured as a GPIO in input mode, and its value can be read through GPIO PD14. With this change, clients can now request the 32 kHz clock on the CLK32K pin, through Device Tree. This clock is simply a pass-through of the input oscillator's clock with enable/disable operations. This will permit the WiFi/Bluetooth chip to work on the MIPS CI20 board, which does source one of its clocks from the CLK32K pin. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20230129120442.22858-5-paul@crapouillou.net Signed-off-by: Alexandre Belloni commit ff6fd3770e9687d7b849a0e826a32563bfcb98da Author: Paul Cercueil Date: Sun Jan 29 12:04:41 2023 +0000 rtc: jz4740: Use dev_err_probe() Use dev_err_probe() where it makes sense to simplify a bit the code. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20230129120442.22858-4-paul@crapouillou.net Signed-off-by: Alexandre Belloni commit d644b133f78d6d8efd36f7b1703bebca09036f0b Author: Paul Cercueil Date: Sun Jan 29 12:04:40 2023 +0000 rtc: jz4740: Use readl_poll_timeout Use readl_poll_timeout() from instead of using custom poll loops. The timeout settings are different, but that shouldn't be much of a problem. Instead of polling 10000 times in a close loop, it polls for one millisecond. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20230129120442.22858-3-paul@crapouillou.net Signed-off-by: Alexandre Belloni commit 4737a703528c769c4fde6b68462f656f91f4ad99 Author: Paul Cercueil Date: Sun Jan 29 12:04:39 2023 +0000 dt-bindings: rtc: Add #clock-cells property The RTC in the JZ4770 is compatible with the JZ4760, but has an extra register that permits to configure the behaviour of the CLK32K pin. The same goes for the RTC in the JZ4780. With this change, the RTC node is now also a clock provider on these SoCs, so a #clock-cells property is added. Signed-off-by: Paul Cercueil Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230129120442.22858-2-paul@crapouillou.net Signed-off-by: Alexandre Belloni commit e8c9efd5d52f1da1c9e012466b9df94a38cc1c00 Author: Dmitry Torokhov Date: Tue Jan 31 21:48:14 2023 -0800 dt-bindings: rtc: moxart: use proper names for gpio properties MOXA ART RTC driver has been switched to gpiod API and is now using properly named properties for its gpios (with gpiolib implementing a quirk to recognize legacy names). Change binding document to use proper names as well. Signed-off-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20230201054815.4112632-2-dmitry.torokhov@gmail.com Signed-off-by: Alexandre Belloni commit 2985cda83b8107213e108f95c3cb8caa0da74918 Author: Dmitry Torokhov Date: Tue Jan 31 21:48:13 2023 -0800 rtc: moxart: switch to using gpiod API Switch the driver from legacy gpio API that is deprecated to the newer gpiod API that respects line polarities described in ACPI/DT. This makes driver use standard property name for its gpios ("rtc-*-gpios" vs "gpios-rtc-*"), however there is a quirk in gpiolib to also recognize legacy names and keep compatibility with older DTSes: eaf1a29665cd ("gpiolib: of: add a quirk for legacy names in MOXA ART RTC"). Signed-off-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20230201054815.4112632-1-dmitry.torokhov@gmail.com Signed-off-by: Alexandre Belloni commit c94fb939e65155bc889e62396f83ef4317d643ac Author: Johan Hovold Date: Thu Feb 2 16:54:41 2023 +0100 rtc: pm8xxx: drop error messages For consistency with the rest of the driver, drop the last two error messages for conditions that should only occur during development, if ever. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230202155448.6715-16-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit 9e5a799138042ac8276e6744c548b0411f371600 Author: Johan Hovold Date: Thu Feb 2 16:54:40 2023 +0100 rtc: pm8xxx: clean up local declarations Clean up local declarations somewhat by using the reverse xmas style consistently throughout. Signed-off-by: Johan Hovold Reviewed-by: David Collins Link: https://lore.kernel.org/r/20230202155448.6715-15-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit da862c3df6add928e2f51d6cadec128a9a1940f3 Author: Johan Hovold Date: Thu Feb 2 16:54:39 2023 +0100 rtc: pm8xxx: refactor read_time() In preparation for adding support for setting the time by means of an externally stored offset, refactor read_time() by adding a new helper that can be used to retrieve the raw time as stored in the RTC. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230202155448.6715-14-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit 35d9c472925748a1cb1f5b6cc8ae71cf8138e30f Author: Johan Hovold Date: Thu Feb 2 16:54:38 2023 +0100 rtc: pm8xxx: use u32 for timestamps The PMIC RTC registers are 32-bit so explicitly use u32 rather than unsigned long for timestamps to reflect the hardware. This will also help avoid unintentional range extensions when adding support for managing an external offset. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230202155448.6715-13-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit 3c3326394ba420608d0665aef846b2268c9c9629 Author: Johan Hovold Date: Thu Feb 2 16:54:37 2023 +0100 rtc: pm8xxx: clean up comments Clean up the driver comments somewhat and remove obsolete, incorrect or redundant ones. Signed-off-by: Johan Hovold Reviewed-by: David Collins Link: https://lore.kernel.org/r/20230202155448.6715-12-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit 4727b58fc84daf6d7097ac3528a6517456a5e110 Author: Johan Hovold Date: Thu Feb 2 16:54:36 2023 +0100 rtc: pm8xxx: rename alarm irq variable Clean up the driver somewhat by renaming the driver-data alarm irq variable by dropping the redundant "rtc" prefix. Signed-off-by: Johan Hovold Reviewed-by: David Collins Link: https://lore.kernel.org/r/20230202155448.6715-11-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit a375510efeda0dfbad205cd1de8b57f63d0779c9 Author: Johan Hovold Date: Thu Feb 2 16:54:35 2023 +0100 rtc: pm8xxx: rename struct device pointer Rename the driver-data struct device pointer by dropping the "rtc" prefix which is both redundant and misleading (as this is a pointer to the platform device and not the rtc class device). Signed-off-by: Johan Hovold Reviewed-by: David Collins Link: https://lore.kernel.org/r/20230202155448.6715-10-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit c996956fcc5b7756eb04615cc36618acaa85caa9 Author: Johan Hovold Date: Thu Feb 2 16:54:34 2023 +0100 rtc: pm8xxx: clean up time and alarm debugging Clean up the time and alarm callback debugging by using a consistent and succinct human-readable (i.e. non-raw) format. Signed-off-by: Johan Hovold Reviewed-by: David Collins Link: https://lore.kernel.org/r/20230202155448.6715-9-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit 79dd75661e4284169768859012a4bf6898cef758 Author: Johan Hovold Date: Thu Feb 2 16:54:33 2023 +0100 rtc: pm8xxx: use unaligned le32 helpers Use the unaligned le32 helpers instead of open coding when accessing the time and alarm registers. Signed-off-by: Johan Hovold Reviewed-by: David Collins Link: https://lore.kernel.org/r/20230202155448.6715-8-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit f081b74c1c748a7da972c782c2f974f239a9b51f Author: Johan Hovold Date: Thu Feb 2 16:54:32 2023 +0100 rtc: pm8xxx: drop unused register defines Drop the original register defines which have been unused since commit c8d523a4b053 ("drivers/rtc/rtc-pm8xxx.c: rework to support pm8941 rtc"). Signed-off-by: Johan Hovold Reviewed-by: David Collins Link: https://lore.kernel.org/r/20230202155448.6715-7-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit c585a92b2f9c624b0b62b2af1eb0ea6d11cb5cac Author: Seema Sreemantha Date: Mon Feb 6 12:21:44 2023 +0530 Bluetooth: btintel: Set Per Platform Antenna Gain(PPAG) Antenna gain is defined as the antenna’s ability to increase the Tx power in a given direction. Intel is certifying its products with fixed reference antenna peak gain values (3/5dBi). The feature takes into account the actual antenna gain, and increases output power values, which results in a performance improvement. After firmware download is completed, driver reads from ACPI table and configures PPAG as required. ACPI table entry for PPAG is defined as below. Name (PPAG, Package (0x02) { 0x00000001, Package (0x02) { 0x00000012, /* Bluetooth Domain */ 0x00000001 /* 1 - Enable PPAG, 0 - Disable PPAG */ } }) btmon log: < HCI Command: Intel Configure Per Platform Antenna Gain (0x3f|0x0219) plen 12 Mcc: 0x00000000 Selector: Enable Delta: 0x00000000 > HCI Event: Command Complete (0x0e) plen 4 Intel Configure Per Platform Antenna Gain (0x3f|0x0219) ncmd 1 Status: Success (0x00) Signed-off-by: Kiran K Signed-off-by: Seema Sreemantha Signed-off-by: Luiz Augusto von Dentz commit 5cd39700de9b699ef2f333ba3c405e51afbf0eb0 Author: Archie Pusaka Date: Fri Feb 3 17:39:36 2023 +0800 Bluetooth: Make sure LE create conn cancel is sent when timeout When sending LE create conn command, we set a timer with a duration of HCI_LE_CONN_TIMEOUT before timing out and calling create_le_conn_complete. Additionally, when receiving the command complete, we also set a timer with the same duration to call le_conn_timeout. Usually the latter will be triggered first, which then sends a LE create conn cancel command. However, due to the nature of racing, it is possible for the former to be called first, thereby calling the chain hci_conn_failed -> hci_conn_del -> cancel_delayed_work, thereby preventing LE create conn cancel to be sent. In this situation, the controller will be stuck in trying the LE connection. This patch flushes le_conn_timeout on create_le_conn_complete to make sure we always send LE create connection cancel, if necessary. Signed-off-by: Archie Pusaka Reviewed-by: Ying Hsu Signed-off-by: Luiz Augusto von Dentz commit 0f00cd322d22d4441de51aa80bcce5bb6a8cbb44 Author: Archie Pusaka Date: Fri Feb 3 17:30:55 2023 +0800 Bluetooth: Free potentially unfreed SCO connection It is possible to initiate a SCO connection while deleting the corresponding ACL connection, e.g. in below scenario: (1) < hci setup sync connect command (2) > hci disconn complete event (for the acl connection) (3) > hci command complete event (for(1), failure) When it happens, hci_cs_setup_sync_conn won't be able to obtain the reference to the SCO connection, so it will be stuck and potentially hinder subsequent connections to the same device. This patch prevents that by also deleting the SCO connection if it is still not established when the corresponding ACL connection is deleted. Signed-off-by: Archie Pusaka Reviewed-by: Ying Hsu Signed-off-by: Luiz Augusto von Dentz commit 03b0093f7b310493bc944a20f725228cfe0d3fea Author: Zhengping Jiang Date: Thu Feb 2 09:47:01 2023 -0800 Bluetooth: hci_qca: get wakeup status from serdev device handle Bluetooth controller attached via the UART is handled by the serdev driver. Get the wakeup status from the device handle through serdev, instead of the parent path. Fixes: c1a74160eaf1 ("Bluetooth: hci_qca: Add device_may_wakeup support") Signed-off-by: Zhengping Jiang Signed-off-by: Luiz Augusto von Dentz commit df5703348813235874d851934e957c3723d71644 Author: Luiz Augusto von Dentz Date: Wed Feb 1 14:01:11 2023 -0800 Bluetooth: L2CAP: Fix potential user-after-free This fixes all instances of which requires to allocate a buffer calling alloc_skb which may release the chan lock and reacquire later which makes it possible that the chan is disconnected in the meantime. Fixes: a6a5568c03c4 ("Bluetooth: Lock the L2CAP channel when sending") Reported-by: Alexander Coffin Signed-off-by: Luiz Augusto von Dentz commit 2394186a2cefb9a45a029281a55749804dd8c556 Author: Pauli Virtanen Date: Mon Jan 30 20:37:01 2023 +0200 Bluetooth: MGMT: add CIS feature bits to controller information Userspace needs to know whether the adapter has feature support for Connected Isochronous Stream - Central/Peripheral, so it can set up LE Audio features accordingly. Expose these feature bits as settings in MGMT controller info. Signed-off-by: Pauli Virtanen Signed-off-by: Luiz Augusto von Dentz commit a00a29b0eeea6caaaf9edc3dd284f81b072ee343 Author: Kees Cook Date: Fri Jan 27 16:51:54 2023 -0800 Bluetooth: hci_conn: Refactor hci_bind_bis() since it always succeeds The compiler thinks "conn" might be NULL after a call to hci_bind_bis(), which cannot happen. Avoid any confusion by just making it not return a value since it cannot fail. Fixes the warnings seen with GCC 13: In function 'arch_atomic_dec_and_test', inlined from 'atomic_dec_and_test' at ../include/linux/atomic/atomic-instrumented.h:576:9, inlined from 'hci_conn_drop' at ../include/net/bluetooth/hci_core.h:1391:6, inlined from 'hci_connect_bis' at ../net/bluetooth/hci_conn.c:2124:3: ../arch/x86/include/asm/rmwcc.h:37:9: warning: array subscript 0 is outside array bounds of 'atomic_t[0]' [-Warray-bounds=] 37 | asm volatile (fullop CC_SET(cc) \ | ^~~ ... In function 'hci_connect_bis': cc1: note: source object is likely at address zero Fixes: eca0ae4aea66 ("Bluetooth: Add initial implementation of BIS connections") Cc: Luiz Augusto von Dentz Cc: Marcel Holtmann Cc: Johan Hedberg Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: linux-bluetooth@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Simon Horman Signed-off-by: Luiz Augusto von Dentz commit cb9bb7b2364bb5f4f51226ce1f9ec6ffda618f0a Author: Johan Hovold Date: Thu Feb 2 16:54:31 2023 +0100 rtc: pm8xxx: return IRQ_NONE on errors In the unlikely event that disabling the alarm and clearing the status ever fails, return IRQ_NONE instead of IRQ_HANDLED. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230202155448.6715-6-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit 8d273f33fd090a2c270c67b6ac7fa03f5a7eee3f Author: Johan Hovold Date: Thu Feb 2 16:54:30 2023 +0100 rtc: pm8xxx: drop bogus locking Since commit c8d523a4b053 ("drivers/rtc/rtc-pm8xxx.c: rework to support pm8941 rtc") which removed the shadow control register there is no need for a driver lock. Specifically, the rtc ops are serialised by rtc core and the interrupt handler only unconditionally disables the alarm using the alarm_ctrl register. Note that since only the alarm enable bit of alarm_ctrl is used after enabling the RTC at probe, the locking was not needed when doing open coded read-modify-write cycles either. Signed-off-by: Johan Hovold Reviewed-by: David Collins Link: https://lore.kernel.org/r/20230202155448.6715-5-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit 182c23bbfea3713206b0da3fbbb7350e197a92dd Author: Johan Hovold Date: Thu Feb 2 16:54:29 2023 +0100 rtc: pm8xxx: use regmap_update_bits() Switch to using regmap_update_bits() instead of open coding read-modify-write accesses. Signed-off-by: Johan Hovold Reviewed-by: David Collins Link: https://lore.kernel.org/r/20230202155448.6715-4-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit eb245631836b4843199d7176d1597759dda4ee9e Author: Johan Hovold Date: Thu Feb 2 16:54:28 2023 +0100 rtc: pm8xxx: drop spmi error messages Drop the unnecessary error messages after every spmi regmap access, which are not expected to fail. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230202155448.6715-3-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit c88db0eff9722fc2b6c4d172a50471d20e08ecc6 Author: Johan Hovold Date: Thu Feb 2 16:54:27 2023 +0100 rtc: pm8xxx: fix set-alarm race Make sure to disable the alarm before updating the four alarm time registers to avoid spurious alarms during the update. Note that the disable needs to be done outside of the ctrl_reg_lock section to prevent a racing alarm interrupt from disabling the newly set alarm when the lock is released. Fixes: 9a9a54ad7aa2 ("drivers/rtc: add support for Qualcomm PMIC8xxx RTC") Cc: stable@vger.kernel.org # 3.1 Signed-off-by: Johan Hovold Reviewed-by: David Collins Link: https://lore.kernel.org/r/20230202155448.6715-2-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit 969cf3e670b5532dc345b8fafaf96a94278a7e09 Author: Gustavo A. R. Silva Date: Mon Jan 9 19:37:52 2023 -0600 Bluetooth: HCI: Replace zero-length arrays with flexible-array members Zero-length arrays are deprecated[1] and we are moving towards adopting C99 flexible-array members instead. So, replace zero-length arrays in a couple of structures with flex-array members. 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 [2]. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays [1] Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [2] Link: https://github.com/KSPP/linux/issues/78 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Luiz Augusto von Dentz commit fec2972a3155b3f6deb6fa8f06fcd645695d6b49 Author: Luiz Augusto von Dentz Date: Thu Jan 5 15:58:04 2023 -0800 Bluetooth: qca: Fix sparse warnings This fixes the following warnings: drivers/bluetooth/hci_qca.c:1014:26: warning: cast to restricted __le16 drivers/bluetooth/hci_qca.c:1028:37: warning: cast to restricted __le32 Signed-off-by: Luiz Augusto von Dentz commit 1eec3b95b5ce7fb2cdd273ac4f8b24b1ed6776a1 Author: Moises Cardona Date: Sun Dec 25 14:07:13 2022 -0500 Bluetooth: btusb: Add VID:PID 13d3:3529 for Realtek RTL8821CE This patch adds VID:PID 13d3:3529 to the btusb.c file. This VID:PID is found in the Realtek RTL8821CE module (M.2 module AW-CB304NF on an ASUS E210MA laptop) Output of /sys/kernel/debug/usb/devices: T: Bus=01 Lev=01 Prnt=01 Port=07 Cnt=02 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=13d3 ProdID=3529 Rev= 1.10 S: Manufacturer=Realtek S: Product=Bluetooth Radio 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: Moises Cardona Signed-off-by: Luiz Augusto von Dentz commit 83458a5f272b303479e7d2f451600817a7350b6b Author: Mario Limonciello Date: Wed Dec 14 20:18:54 2022 -0600 Bluetooth: btusb: Add new PID/VID 0489:e0f2 for MT7921 This bluetooth device is found in a combo WLAN/BT card for a MediaTek 7921e. The device information: T: Bus=01 Lev=01 Prnt=01 Port=02 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=0489 ProdID=e0f2 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 Cc: Sean Wang Cc: Anson Tsao Signed-off-by: Mario Limonciello Signed-off-by: Luiz Augusto von Dentz commit 6a22a5dbc69473c2c46d1a13fe6cbc7bdaacb2a6 Author: Heiner Kallweit Date: Wed Jan 25 23:24:24 2023 +0100 dt-bindings: rtc: Convert Amlogic Meson vrtc controller binding Convert Amlogic Meson vrtc controller binding to yaml. Signed-off-by: Heiner Kallweit Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/d820d54b-d082-589a-621f-2795d885696a@gmail.com Signed-off-by: Alexandre Belloni commit 5d44f76fab0839799b19cbc88d13575da968dc08 Author: Marcel Holtmann Date: Fri Dec 16 21:12:47 2022 +0100 Bluetooth: Fix issue with Actions Semi ATS2851 based devices Their devices claim to support the erroneous data reporting, but don't actually support the required commands. So blacklist them and add a quirk. < HCI Command: Read Default Erroneous Data Reporting (0x03|0x005a) plen 0 > HCI Event: Command Status (0x0f) plen 4 Read Default Erroneous Data Reporting (0x03|0x005a) ncmd 1 Status: Unknown HCI Command (0x01) T: Bus=02 Lev=02 Prnt=08 Port=02 Cnt=01 Dev#= 10 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=10d7 ProdID=b012 Rev=88.91 S: Manufacturer=Actions S: Product=general adapter S: SerialNumber=ACTIONS1234 C:* #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr=100mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 64 Ivl=1ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=01(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=01(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=01(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=01(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=01(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=01(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms Signed-off-by: Marcel Holtmann Signed-off-by: Luiz Augusto von Dentz commit e5c594233fcf1a55a439dec103aa815cdbf392a7 Author: Sascha Hauer Date: Wed Nov 23 10:55:27 2022 +0100 rtc: rv8803: invalidate date/time if alarm time is invalid RTC core never calls rv8803_set_alarm with an invalid alarm time, so if an invalid alarm time > 0 is set, external factors must have corrupted the RTC's alarm time and possibly other registers. Play it safe by marking the date/time invalid, so all registers are reinitialized on a ->set_time. This may cause existing setups to lose time if they so far set only date/time, but ignored that the alarm registers had an invalid date value, e.g.: rtc rtc0: invalid alarm value: 2020-3-27 7:82:0 These systems will have their ->get_time return -EINVAL till ->set_time initializes the alarm value (and sets a new time). Signed-off-by: Ahmad Fatoum Signed-off-by: Sascha Hauer Link: https://lore.kernel.org/r/20221123095527.2771434-3-s.hauer@pengutronix.de Signed-off-by: Alexandre Belloni commit 19409796578c879a41e88ddbdbce50c19457658d Author: Ahmad Fatoum Date: Wed Nov 23 10:55:26 2022 +0100 include/linux/bcd.h: provide bcd_is_valid() helper bcd2bin(0x0A) happily returns 10, despite this being an invalid BCD value. RTC drivers converting possibly corrupted BCD timestamps might want to validate their input before calling bcd2bin(). Provide a macro to do so. Unlike bcd2bin and bin2bcd, out-of-line versions are not implemented. Should the macro experience enough use, this can be retrofitted. Signed-off-by: Ahmad Fatoum Signed-off-by: Sascha Hauer Link: https://lore.kernel.org/r/20221123095527.2771434-2-s.hauer@pengutronix.de Signed-off-by: Alexandre Belloni commit 37f322cd58d81a9d46456531281c908de9ef6e42 Author: Ian Rogers Date: Wed Feb 8 22:44:47 2023 -0800 perf stat: Avoid merging/aggregating metric counts twice The added perf_stat_merge_counters combines uncore counters. When metrics are enabled, the counts are merged into a metric_leader via the stat-shadow saved_value logic. As the leader now is passed an aggregated count, it leads to all counters being added together twice and counts appearing approximately doubled in metrics. This change disables the saved_value merging of counts for evsels that are merged. It is recommended that later changes remove the saved_value entirely as the two layers of aggregation in the code is confusing. Fixes: 942c5593393d9418 ("perf stat: Add perf_stat_merge_counters()") Reported-by: Perry Taylor Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Eduard Zingerman Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230209064447.83733-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 6f5e55dfcb061fe6c877c68fc7e3eb84d199f4d0 Author: Kunihiko Hayashi Date: Fri Dec 23 16:07:13 2022 +0900 dt-bindings: PCI: uniphier-ep: Clean up reg, clocks, resets, and their names Instead of "oneOf:" choices, use "allOf:" and "if:" to define reg, clocks, resets, and their names that can be taken by the compatible string. The order of their names doesn't change here. Link: https://lore.kernel.org/r/20221223070713.20549-2-hayashi.kunihiko@socionext.com Signed-off-by: Kunihiko Hayashi Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring commit 8697a258ae24703267d2a37d91ab757c91ef027e Merge: 0b34d68049b09 35674e7875187 Author: Jakub Kicinski Date: Thu Feb 9 12:05:25 2023 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net net/devlink/leftover.c / net/core/devlink.c: 565b4824c39f ("devlink: change port event netdev notifier from per-net to global") f05bd8ebeb69 ("devlink: move code to a dedicated directory") 687125b5799c ("devlink: split out core code") https://lore.kernel.org/all/20230208094657.379f2b1a@canb.auug.org.au/ Signed-off-by: Jakub Kicinski commit fda7be2068973195343d14c1f760adcd481455c9 Author: Yang Li Date: Wed Feb 8 10:31:58 2023 +0800 ACPI: CPPC: Fix some kernel-doc comments Add the description of @pcc_ss_id in pcc_data_alloc(). Add the description of @cpu_num in cppc_get_transition_latency(). clear the below warnings: drivers/acpi/cppc_acpi.c:607: warning: Function parameter or member 'pcc_ss_id' not described in 'pcc_data_alloc' drivers/acpi/cppc_acpi.c:1616: warning: Function parameter or member 'cpu_num' not described in 'cppc_get_transition_latency' Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3983 Signed-off-by: Yang Li [ rjw: Dropped redundant empty code lines, minor edits ] Signed-off-by: Rafael J. Wysocki commit e898b07deb3ce801b21113979a05f4b3166c7cb3 Author: Thomas Weißschuh Date: Tue Feb 7 19:55:19 2023 +0000 cpuidle: 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 Signed-off-by: Rafael J. Wysocki commit ebf519710218814cf827adbf9111af081344c969 Author: Srinivas Pandruvada Date: Tue Feb 7 09:35:34 2023 -0800 thermal: intel: powerclamp: Add two module parameters In some use cases, it is desirable to only inject idle on certain set of CPUs. For example on Alder Lake systems, it is possible that we force idle only on P-Cores for thermal reasons. Also the idle percent can be more than 50% if we only choose partial set of CPUs in the system. Introduce 2 new module parameters for this purpose. They can be only changed when the cooling device is inactive. cpumask (Read/Write): A bit mask of CPUs to inject idle. The format of this bitmask is same as used in other subsystems like in /proc/irq/*/smp_affinity. The mask is comma separated 32 bit groups. Each CPU is one bit. For example for 256 CPU system the full mask is: ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff The rightmost mask is for CPU 0-32. max_idle (Read/Write): Maximum injected idle time to the total CPU time ratio in percent range from 1 to 100. Even if the cooling device max_state is always 100 (100%), this parameter allows to add a max idle percent limit. The default is 50, to match the current implementation of powerclamp driver. Also doesn't allow value more than 75, if the cpumask includes every CPU present in the system. Also when the cpumask doesn't include every CPU, there is no use of compensation using package C-state idle counters. Hence don't start package C-state polling thread even for a single package or a single die system in this case. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki commit 707bf8e1dfd51dd0cafe92da24f5276702edebe5 Author: Srinivas Pandruvada Date: Tue Feb 7 09:32:18 2023 -0800 Documentation: admin-guide: Move intel_powerclamp documentation Create a folder "thermal" under Documentation/admin-guide and move intel_powerclamp documentation to this folder. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki commit 7787943a3a8ade6594a68db28c166adbb1d3708c Author: Arnd Bergmann Date: Mon Feb 6 20:33:06 2023 +0100 cpuidle: add ARCH_SUSPEND_POSSIBLE dependencies Some ARMv4 processors don't support suspend, which leads to a build failure with the tegra and qualcomm cpuidle driver: WARNING: unmet direct dependencies detected for ARM_CPU_SUSPEND Depends on [n]: ARCH_SUSPEND_POSSIBLE [=n] Selected by [y]: - ARM_TEGRA_CPUIDLE [=y] && CPU_IDLE [=y] && (ARM [=y] || ARM64) && (ARCH_TEGRA [=n] || COMPILE_TEST [=y]) && !ARM64 && MMU [=y] arch/arm/kernel/sleep.o: in function `__cpu_suspend': (.text+0x68): undefined reference to `cpu_sa110_suspend_size' (.text+0x68): undefined reference to `cpu_fa526_suspend_size' Add an explicit dependency to make randconfig builds avoid this combination. Fixes: faae6c9f2e68 ("cpuidle: tegra: Enable compile testing") Fixes: a871be6b8eee ("cpuidle: Convert Qualcomm SPM driver to a generic CPUidle driver") Link: https://lore.kernel.org/all/20211013160125.772873-1-arnd@kernel.org/ Cc: All applicable Reviewed-by: Dmitry Osipenko Signed-off-by: Arnd Bergmann Acked-by: Thierry Reding Signed-off-by: Rafael J. Wysocki commit 2531ba0e4ae67d6d0219400af27805fe52cd28e8 Author: Jiri Olsa Date: Thu Feb 9 15:37:35 2023 +0100 tools/resolve_btfids: Pass HOSTCFLAGS as EXTRA_CFLAGS to prepare targets Thorsten reported build issue with command line that defined extra HOSTCFLAGS that were not passed into 'prepare' targets, but were used to build resolve_btfids objects. This results in build fail when these objects are linked together: /usr/bin/ld: /build.../tools/bpf/resolve_btfids//libbpf/libbpf.a(libbpf-in.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE \ object; recompile with -fPIE Fixing this by passing HOSTCFLAGS in EXTRA_CFLAGS as part of HOST_OVERRIDES variable for prepare targets. [1] https://lore.kernel.org/bpf/f7922132-6645-6316-5675-0ece4197bfff@leemhuis.info/ Fixes: 56a2df7615fa ("tools/resolve_btfids: Compile resolve_btfids as host program") Reported-by: Thorsten Leemhuis Signed-off-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Tested-by: Thorsten Leemhuis Acked-by: Ian Rogers Link: https://lore.kernel.org/bpf/20230209143735.4112845-1-jolsa@kernel.org commit 5bbafd436266136a67224b98e6ad864c4ddd762d Author: ye xingchen Date: Tue Jan 17 10:40:26 2023 +0800 thermal: core: Use sysfs_emit_at() instead of scnprintf() Follow the advice in Documentation/filesystems/sysfs.rst that show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: ye xingchen [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit a0e8c13ccd6a9a636d27353da62c2410c4eca337 Author: Greg Kroah-Hartman Date: Thu Feb 2 16:15:15 2023 +0100 PM: EM: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Rafael J. Wysocki commit 0b6200e1e9f53dabdc30d0f6c51af9a5f664d32b Author: Greg Kroah-Hartman Date: Thu Feb 2 15:15:45 2023 +0100 PM: domains: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit 108fcad91109bd7e9374ae9d509085f5ec55799b Author: Thomas Weißschuh Date: Tue Feb 7 19:58:18 2023 +0000 cpufreq: 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: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 5d8f384a9b4fc50f6a18405f1c08e5a87a77b5b3 Author: Uwe Kleine-König Date: Wed Feb 8 10:26:54 2023 +0100 cpufreq: davinci: Fix clk use after free The remove function first frees the clks and only then calls cpufreq_unregister_driver(). If one of the cpufreq callbacks is called just before cpufreq_unregister_driver() is run, the freed clks might be used. Fixes: 6601b8030de3 ("davinci: add generic CPUFreq driver for DaVinci") Signed-off-by: Uwe Kleine-König Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 7cca9a9851a5fb44808949539af6c0428e48a267 Author: Arnd Bergmann Date: Tue Feb 7 17:12:51 2023 +0100 cpufreq: amd-pstate: avoid uninitialized variable use The new epp support causes warnings about three separate but related bugs: 1) failing before allocation should just return an error: drivers/cpufreq/amd-pstate.c:951:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (!dev) ^~~~ drivers/cpufreq/amd-pstate.c:1018:9: note: uninitialized use occurs here return ret; ^~~ 2) wrong variable to store return code: drivers/cpufreq/amd-pstate.c:963:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (rc) ^~ drivers/cpufreq/amd-pstate.c:1019:9: note: uninitialized use occurs here return ret; ^~~ drivers/cpufreq/amd-pstate.c:963:2: note: remove the 'if' if its condition is always false if (rc) ^~~~~~~ 3) calling amd_pstate_set_epp() in cleanup path after determining that it should not be called: drivers/cpufreq/amd-pstate.c:1055:6: error: variable 'epp' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (cpudata->epp_policy == cpudata->policy) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/cpufreq/amd-pstate.c:1080:30: note: uninitialized use occurs here amd_pstate_set_epp(cpudata, epp); ^~~ All three are trivial to fix, but most likely there are additional bugs in this function when the error handling was not really tested. Fixes: ffa5096a7c33 ("cpufreq: amd-pstate: implement Pstate EPP support for the AMD processors") Signed-off-by: Arnd Bergmann Tested-by: Wyes Karny Reviewed-by: Yuan Perry Acked-by: Huang Rui Signed-off-by: Rafael J. Wysocki commit dd329e1e21b54c73f58a440b6164d04d8a7fc542 Author: Uwe Kleine-König Date: Tue Feb 7 20:59:09 2023 +0100 cpufreq: Make cpufreq_unregister_driver() return void All but a few drivers ignore the return value of cpufreq_unregister_driver(). Those few that don't only call it after cpufreq_register_driver() succeeded, in which case the call doesn't fail. Make the function return no value and add a WARN_ON for the case that the function is called in an invalid situation (i.e. without a previous successful call to cpufreq_register_driver()). Signed-off-by: Uwe Kleine-König Acked-by: Florian Fainelli # brcmstb-avs-cpufreq.c Acked-by: Viresh Kumar Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Rafael J. Wysocki commit 3c708a0c4cf2f193a202da927a48315bbc46715b Merge: 50a6620dd1fbc 351c02cb74047 Author: Mark Brown Date: Thu Feb 9 19:17:56 2023 +0000 Add MediaTek MT7986 SPI NAND support Merge series from Xiangsheng Hou : This patch series split from bellow series which pick-up spi relevant patches https://lore.kernel.org/all/20230130030656.12127-1-xiangsheng.hou@mediatek.com. This series add MediaTek MT7986 SPI NAND controller support, add read latch latency, smaple delay adjust and add optional nfi_hclk. commit 5b268d8abaec6cbd4bd70d062e769098d96670aa Author: Greg Kroah-Hartman Date: Thu Feb 2 16:12:14 2023 +0100 time/debug: Fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20230202151214.2306822-1-gregkh@linuxfoundation.org commit 2f09c2ea6c649cb010e0782aed3c96108e693cff Author: Heiko Carstens Date: Wed Feb 8 19:16:45 2023 +0100 Revert "s390/mem_detect: do not update output parameters on failure" This reverts commit cbc29f107e51b1cc7d1e7b0bbe0691a1224205f1. Get rid of the following smatch warnings: arch/s390/include/asm/mem_detect.h:86 get_mem_detect_end() error: uninitialized symbol 'end'. arch/s390/include/asm/mem_detect.h:86 get_mem_detect_end() error: uninitialized symbol 'end'. arch/s390/boot/vmem.c:256 setup_vmem() error: uninitialized symbol 'start'. arch/s390/boot/vmem.c:258 setup_vmem() error: uninitialized symbol 'end'. Note that there is no bug in the code. This is purely to silence smatch. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Heiko Carstens commit be76ea61446095c045641404128bc6862545cda1 Author: Heiko Carstens Date: Tue Feb 7 17:39:42 2023 +0100 s390/idle: remove arch_cpu_idle_time() and corresponding code arch_cpu_idle_time() returns the idle time of any given cpu if it is in idle, or zero if not. All if this is racy and partially incorrect. Time stamps taken with store clock extended and store clock fast from different cpus are compared, while the architecture states that this is nothing which can be relied on (see Principles of Operation; Chapter 4, "Setting and Inspecting the Clock"). A more fundamental problem is that the timestamp when a cpu is leaving idle is taken early in the assembler part of the interrupt handler, and this value is only transferred many cycles later to the cpu's per-cpu idle data structure. This per cpu data structure is read by arch_cpu_idle() to tell for which period of time a remote cpu is idle: if only an idle_enter value is present, the assumed idle time of the cpu is calculated by taking a local timestamp and returning the difference of the local timestamp and the idle_enter value. This is potentially incorrect, since the remote cpu may have already left idle, but the taken timestamp may not have been transferred to the per-cpu data structure. This in turn means that too much idle time may be reported for a cpu, and a subsequent calculation of system idle time may result in a smaller value. Instead of coming up with even more complex code trying to fix this, just remove this code, and only account idle time of a cpu, after idle state is left. Another minor bug is that it is assumed that timestamps are non-zero, which is not necessarily the case for timestamps taken with store clock fast. This however is just a very minor problem, since this can only happen when the epoch increases. Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens commit a02d584e72aa44eb825fb8fddc008bf93f0dfe85 Author: Heiko Carstens Date: Thu Feb 2 15:47:39 2023 +0100 s390/vx: use simple assignments to access __vector128 members Use simple assignments to access __vector128 members instead of hard to read casts. Signed-off-by: Heiko Carstens commit b0b7b43fcc4666232b4ed65d2c8fa08aff1b6042 Author: Heiko Carstens Date: Thu Feb 2 15:47:38 2023 +0100 s390/vx: add 64 and 128 bit members to __vector128 struct Add 64 and 128 bit members to __vector128 struct in order to allow reading of the complete value, or the higher or lower part of vector register contents instead of having to use casts. Add an explicit __aligned(4) statement to avoid that the alignment of the structure changes from 4 to 8. This should make sure that no breakage happens because of this change. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit 1306711ad3bf412852cd357f47a752c761f0095c Author: Heiko Carstens Date: Mon Feb 6 13:56:19 2023 +0100 MAINTAINERS: add diag288_wdt driver to s390 maintained files The diag288_wdt watchdog driver is s390 specific. Document who is responsible for this driver. Signed-off-by: Heiko Carstens commit be20b9d357c722f1fda32b937faf2677ab25cefa Author: Vineeth Vijayan Date: Mon Feb 6 14:26:31 2023 +0100 MAINTAINERS: add entry for s390 SCM driver Storage Class Memory driver support for s390 architecture has been there for a while. The original author of this work, Sebastian Ott has left IBM and I am taking over this module. Adding myself as the upstream maintainer for SCM on s390 architecture. Signed-off-by: Vineeth Vijayan Acked-by: Peter Oberparleiter Signed-off-by: Heiko Carstens commit 87f79d886dd8c53bc61b09078764e50e3ac631cc Author: Heiko Carstens Date: Mon Feb 6 14:49:41 2023 +0100 s390/processor: always inline cpu flag helper functions arch_cpu_idle() is marked noinstr and therefore must only call functions which are also not instrumented. Make sure that cpu flag helper functions are always inlined to avoid that the compiler generates an out-of-line function for e.g. the call within arch_cpu_idle(). Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens commit a9cbc1b471d291c865907542394f1c483b93a811 Author: Heiko Carstens Date: Mon Feb 6 14:49:40 2023 +0100 s390/idle: mark arch_cpu_idle() noinstr linux-next commit ("cpuidle: tracing: Warn about !rcu_is_watching()") adds a new warning which hits on s390's arch_cpu_idle() function: RCU not on for: arch_cpu_idle+0x0/0x28 WARNING: CPU: 2 PID: 0 at include/linux/trace_recursion.h:162 arch_ftrace_ops_list_func+0x24c/0x258 Modules linked in: CPU: 2 PID: 0 Comm: swapper/2 Not tainted 6.2.0-rc6-next-20230202 #4 Hardware name: IBM 8561 T01 703 (z/VM 7.3.0) Krnl PSW : 0404d00180000000 00000000002b55c0 (arch_ftrace_ops_list_func+0x250/0x258) R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:3 CC:1 PM:0 RI:0 EA:3 Krnl GPRS: c0000000ffffbfff 0000000080000002 0000000000000026 0000000000000000 0000037ffffe3a28 0000037ffffe3a20 0000000000000000 0000000000000000 0000000000000000 0000000000f4acf6 00000000001044f0 0000037ffffe3cb0 0000000000000000 0000000000000000 00000000002b55bc 0000037ffffe3bb8 Krnl Code: 00000000002b55b0: c02000840051 larl %r2,0000000001335652 00000000002b55b6: c0e5fff512d1 brasl %r14,0000000000157b58 #00000000002b55bc: af000000 mc 0,0 >00000000002b55c0: a7f4ffe7 brc 15,00000000002b558e 00000000002b55c4: 0707 bcr 0,%r7 00000000002b55c6: 0707 bcr 0,%r7 00000000002b55c8: eb6ff0480024 stmg %r6,%r15,72(%r15) 00000000002b55ce: b90400ef lgr %r14,%r15 Call Trace: [<00000000002b55c0>] arch_ftrace_ops_list_func+0x250/0x258 ([<00000000002b55bc>] arch_ftrace_ops_list_func+0x24c/0x258) [<0000000000f5f0fc>] ftrace_common+0x1c/0x20 [<00000000001044f6>] arch_cpu_idle+0x6/0x28 [<0000000000f4acf6>] default_idle_call+0x76/0x128 [<00000000001cc374>] do_idle+0xf4/0x1b0 [<00000000001cc6ce>] cpu_startup_entry+0x36/0x40 [<0000000000119d00>] smp_start_secondary+0x140/0x150 [<0000000000f5d2ae>] restart_int_handler+0x6e/0x90 Mark arch_cpu_idle() noinstr like all other architectures with CONFIG_ARCH_WANTS_NO_INSTR (should) have it to fix this. Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens commit c01016299dc7db5c7b86107b3e129a18dd683574 Author: Heiko Carstens Date: Mon Feb 6 14:49:39 2023 +0100 s390/idle: move idle time accounting to account_idle_time_irq() There is no reason to do idle time accounting in arch_cpu_idle(). Do idle time accounting in account_idle_time_irq(), where it belongs to. The accounted values don't change between account_idle_time_irq() and arch_cpu_idle(); so the result is the same. Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens commit 740d63b5a0595508e041cba825c1ae64385fc6d9 Merge: 20e6ce4818b96 b33d59fb37ddc Author: Heiko Carstens Date: Thu Feb 9 20:10:35 2023 +0100 Merge branch 'cmpxchg_user_key' into features Signed-off-by: Heiko Carstens commit 966d0ab67350c6206f8053a3e6ed0b892bdc42a5 Author: Srinivas Pandruvada Date: Tue Feb 7 23:09:08 2023 -0800 thermal: intel: powerclamp: Fix duration module parameter After the switch to use the powercap/idle-inject framework in the Intel powerclamp driver, the idle duration unit is microsecond. However, the module parameter for idle duration is in milliseconds, so convert it to microseconds in the "set" callback and back to milliseconds in a new "get" callback. While here, also use mutex protection for setting and getting "duration". The other uses of "duration" are already protected by the mutex. Fixes: 8526eb7fc75a ("thermal: intel: powerclamp: Use powercap idle-inject feature") Signed-off-by: Srinivas Pandruvada [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit c55365a09302516129b819c9031a0de0e33cfb31 Author: Yi Liu Date: Thu Feb 9 00:12:10 2023 -0800 docs: vfio: Update vfio.rst per latest interfaces this imports the latest vfio_device_ops definition to vfio.rst. Signed-off-by: Yi Liu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20230209081210.141372-3-yi.l.liu@intel.com Signed-off-by: Alex Williamson commit ced3960aa0f09329675209c6004bfc4025cc1f26 Merge: 918c5765a1542 b9e6a2d47b256 Author: Rafael J. Wysocki Date: Thu Feb 9 19:49:37 2023 +0100 Merge back cpufreq material for 6.3-rc1. commit 53b54ad074de1896f8b021615f65b27f557ce874 Author: Lukas Wunner Date: Sun Jan 15 09:20:33 2023 +0100 PCI/DPC: Await readiness of secondary bus after reset pci_bridge_wait_for_secondary_bus() is called after a Secondary Bus Reset, but not after a DPC-induced Hot Reset. As a result, the delays prescribed by PCIe r6.0 sec 6.6.1 are not observed and devices on the secondary bus may be accessed before they're ready. One affected device is Intel's Ponte Vecchio HPC GPU. It comprises a PCIe switch whose upstream port is not immediately ready after reset. Because its config space is restored too early, it remains in D0uninitialized, its subordinate devices remain inaccessible and DPC recovery fails with messages such as: i915 0000:8c:00.0: can't change power state from D3cold to D0 (config space inaccessible) intel_vsec 0000:8e:00.1: can't change power state from D3cold to D0 (config space inaccessible) pcieport 0000:89:02.0: AER: device recovery failed Fix it. Link: https://lore.kernel.org/r/9f5ff00e1593d8d9a4b452398b98aa14d23fca11.1673769517.git.lukas@wunner.de Tested-by: Ravi Kishore Koppuravuri Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg Cc: stable@vger.kernel.org commit fae9068022186b832534ea8b325d5242586c4303 Author: Yi Liu Date: Thu Feb 9 00:12:09 2023 -0800 vfio: Update the kdoc for vfio_device_ops this is missed when adding bind_iommufd/unbind_iommufd and attach_ioas. Signed-off-by: Yi Liu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20230209081210.141372-2-yi.l.liu@intel.com Signed-off-by: Alex Williamson commit ce06a7000f0e9ad1ea5f55129ed964a7888d6e1c Author: Yishai Hadas Date: Wed Feb 8 17:22:34 2023 +0200 vfio/mlx5: Fix range size calculation upon tracker creation Fix range size calculation to include the last byte of each range. In addition, log round up the length of the total ranges to be stricter. Fixes: c1d050b0d169 ("vfio/mlx5: Create and destroy page tracker object") Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20230208152234.32370-1-yishaih@nvidia.com Signed-off-by: Alex Williamson commit b0d2d5697e4c12589ef536b2a824f6549fdb2c01 Author: Matthew Rosato Date: Fri Feb 3 16:50:27 2023 -0500 vfio: no need to pass kvm pointer during device open Nothing uses this value during vfio_device_open anymore so it's safe to remove it. Signed-off-by: Matthew Rosato Tested-by: Tony Krowiak Reviewed-by: Kevin Tian Reviewed-by: Yi Liu Link: https://lore.kernel.org/r/20230203215027.151988-3-mjrosato@linux.ibm.com Signed-off-by: Alex Williamson commit 2b48f52f2bff8e8926165983f3a3d7b89b33de08 Author: Matthew Rosato Date: Fri Feb 3 16:50:26 2023 -0500 vfio: fix deadlock between group lock and kvm lock After 51cdc8bc120e, we have another deadlock scenario between the kvm->lock and the vfio group_lock with two different codepaths acquiring the locks in different order. Specifically in vfio_open_device, vfio holds the vfio group_lock when issuing device->ops->open_device but some drivers (like vfio-ap) need to acquire kvm->lock during their open_device routine; Meanwhile, kvm_vfio_release will acquire the kvm->lock first before calling vfio_file_set_kvm which will acquire the vfio group_lock. To resolve this, let's remove the need for the vfio group_lock from the kvm_vfio_release codepath. This is done by introducing a new spinlock to protect modifications to the vfio group kvm pointer, and acquiring a kvm ref from within vfio while holding this spinlock, with the reference held until the last close for the device in question. Fixes: 51cdc8bc120e ("kvm/vfio: Fix potential deadlock on vfio group_lock") Reported-by: Anthony Krowiak Suggested-by: Jason Gunthorpe Signed-off-by: Matthew Rosato Tested-by: Tony Krowiak Reviewed-by: Kevin Tian Reviewed-by: Yi Liu Link: https://lore.kernel.org/r/20230203215027.151988-2-mjrosato@linux.ibm.com Signed-off-by: Alex Williamson commit e592296cd6e15ddeebe4c8411365c550da65c8bf Author: Steve Sistare Date: Tue Jan 31 08:58:09 2023 -0800 vfio: revert "iommu driver notify callback" Revert this dead code: commit ec5e32940cc9 ("vfio: iommu driver notify callback") Signed-off-by: Steve Sistare Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/1675184289-267876-8-git-send-email-steven.sistare@oracle.com Signed-off-by: Alex Williamson commit a5ac1f816563503eb25739ba8cc3d74548169f09 Author: Steve Sistare Date: Tue Jan 31 08:58:08 2023 -0800 vfio/type1: revert "implement notify callback" This is dead code. Revert it. commit 487ace134053 ("vfio/type1: implement notify callback") Signed-off-by: Steve Sistare Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/1675184289-267876-7-git-send-email-steven.sistare@oracle.com Signed-off-by: Alex Williamson commit da4f1c2e1c9cb2832b5a4de3472cd1cad63781b2 Author: Steve Sistare Date: Tue Jan 31 08:58:07 2023 -0800 vfio/type1: revert "block on invalid vaddr" Revert this dead code: commit 898b9eaeb3fe ("vfio/type1: block on invalid vaddr") Signed-off-by: Steve Sistare Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/1675184289-267876-6-git-send-email-steven.sistare@oracle.com Signed-off-by: Alex Williamson commit 90fdd158a695d70403163f9a0e4efc5b20f3fd3e Author: Steve Sistare Date: Tue Jan 31 08:58:06 2023 -0800 vfio/type1: restore locked_vm When a vfio container is preserved across exec or fork-exec, the new task's mm has a locked_vm count of 0. After a dma vaddr is updated using VFIO_DMA_MAP_FLAG_VADDR, locked_vm remains 0, and the pinned memory does not count against the task's RLIMIT_MEMLOCK. To restore the correct locked_vm count, when VFIO_DMA_MAP_FLAG_VADDR is used and the dma's mm has changed, add the dma's locked_vm count to the new mm->locked_vm, subject to the rlimit, and subtract it from the old mm->locked_vm. Fixes: c3cbab24db38 ("vfio/type1: implement interfaces to update vaddr") Cc: stable@vger.kernel.org Signed-off-by: Steve Sistare Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/1675184289-267876-5-git-send-email-steven.sistare@oracle.com Signed-off-by: Alex Williamson commit 18e292705ba21cc9b3227b9ad5b1c28973605ee5 Author: Steve Sistare Date: Tue Jan 31 08:58:05 2023 -0800 vfio/type1: track locked_vm per dma Track locked_vm per dma struct, and create a new subroutine, both for use in a subsequent patch. No functional change. Fixes: c3cbab24db38 ("vfio/type1: implement interfaces to update vaddr") Cc: stable@vger.kernel.org Signed-off-by: Steve Sistare Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/1675184289-267876-4-git-send-email-steven.sistare@oracle.com Signed-off-by: Alex Williamson commit 046eca5018f8a5dd1dc2cedf87fb5843b9ea3026 Author: Steve Sistare Date: Tue Jan 31 08:58:04 2023 -0800 vfio/type1: prevent underflow of locked_vm via exec() When a vfio container is preserved across exec, the task does not change, but it gets a new mm with locked_vm=0, and loses the count from existing dma mappings. If the user later unmaps a dma mapping, locked_vm underflows to a large unsigned value, and a subsequent dma map request fails with ENOMEM in __account_locked_vm. To avoid underflow, grab and save the mm at the time a dma is mapped. Use that mm when adjusting locked_vm, rather than re-acquiring the saved task's mm, which may have changed. If the saved mm is dead, do nothing. locked_vm is incremented for existing mappings in a subsequent patch. Fixes: 73fa0d10d077 ("vfio: Type1 IOMMU implementation") Cc: stable@vger.kernel.org Signed-off-by: Steve Sistare Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/1675184289-267876-3-git-send-email-steven.sistare@oracle.com Signed-off-by: Alex Williamson commit ef3a3f6a294ba65fd906a291553935881796f8a5 Author: Steve Sistare Date: Tue Jan 31 08:58:03 2023 -0800 vfio/type1: exclude mdevs from VFIO_UPDATE_VADDR Disable the VFIO_UPDATE_VADDR capability if mediated devices are present. Their kernel threads could be blocked indefinitely by a misbehaving userland while trying to pin/unpin pages while vaddrs are being updated. Do not allow groups to be added to the container while vaddr's are invalid, so we never need to block user threads from pinning, and can delete the vaddr-waiting code in a subsequent patch. Fixes: c3cbab24db38 ("vfio/type1: implement interfaces to update vaddr") Cc: stable@vger.kernel.org Signed-off-by: Steve Sistare Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/1675184289-267876-2-git-send-email-steven.sistare@oracle.com Signed-off-by: Alex Williamson commit 93be2859e26c3be847780c65313da1b261833451 Author: Ard Biesheuvel Date: Mon Feb 6 13:33:07 2023 +0100 efi: x86: Wire up IBT annotation in memory attributes table UEFI v2.10 extends the EFI memory attributes table with a flag that indicates whether or not all RuntimeServicesCode regions were constructed with ENDBR landing pads, permitting the OS to map these regions with IBT restrictions enabled. So let's take this into account on x86 as well. Suggested-by: Peter Zijlstra # ibt_save() changes Signed-off-by: Ard Biesheuvel Acked-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) commit 906b6f7b20939a8cab1d51dfdb9690a9d68f1cc4 Merge: 67b690b356cc4 777af241a7ce6 Author: Mark Brown Date: Thu Feb 9 18:24:42 2023 +0000 ASoC: qcom: q6dsp and lpass codec stablity fixes Merge series from Srinivas Kandagatla From q6dsp side issues are around locking of position pointer and handle From LPASS codec side most of the staiblity issues were around runtime pm,: While testing X13s audio, we found multiple stablity issues this patchset fixes these issues. From q6dsp side issues are around locking of position pointer and handle multiple prepare cases along with pulse audio timerbased scheduling workaround. From LPASS codec side most of the staiblity issues were around runtime pm, hitting various issues as the codec was firstly resetting the soundwire block for every clk disable/enable which is taking the slaves out of sync and resulting in re-enumerating. Second issue was around fsgen clk is not brining up the codec out of suspend as it was not added after runtime pm enabled. Final issue was with codec mclk rate which should have been 192KHz same as npl instead of 96KHz. We were getting lucky as wsa drivers are setting the same clk to 192KHz. With this patches, x13s audio is pretty stable. commit 67b690b356cc414973a2ad3575365174937a56a7 Merge: 487417f0d1197 11f605633b33c Author: Mark Brown Date: Thu Feb 9 18:24:35 2023 +0000 ASoC: SOF: ipc4-topology: Configure copier sink format Merge series from Peter Ujfalusi : In a course of creating complicated topologies where multiple output pins of a copier is enabled, we have discovered that additional configuration needs to be sent to the firmware to make the use cases working. commit 487417f0d11970f2c3f06d427d90f98c1afb2e51 Merge: b2c0c45d9255b 564972dbf85c0 Author: Mark Brown Date: Thu Feb 9 18:24:27 2023 +0000 Add the Infineon PEB2466 codec support Merge series from Herve Codina : The Infineon PEB2466 codec is a programmable DSP-based four channels codec with filters capabilities. It also provides signals as GPIOs. commit 0b34d68049b09821499b93d50b5a9d7d2ca449f6 Author: Eric Dumazet Date: Wed Feb 8 14:25:08 2023 +0000 net: enable usercopy for skb_small_head_cache syzbot and other bots reported that we have to enable user copy to/from skb->head. [1] We can prevent access to skb_shared_info, which is a nice improvement over standard kmem_cache. Layout of these kmem_cache objects is: < SKB_SMALL_HEAD_HEADROOM >< struct skb_shared_info > usercopy: Kernel memory overwrite attempt detected to SLUB object 'skbuff_small_head' (offset 32, size 20)! ------------[ cut here ]------------ kernel BUG at mm/usercopy.c:102 ! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.2.0-rc6-syzkaller-01425-gcb6b2e11a42d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 RIP: 0010:usercopy_abort+0xbd/0xbf mm/usercopy.c:102 Code: e8 ee ad ba f7 49 89 d9 4d 89 e8 4c 89 e1 41 56 48 89 ee 48 c7 c7 20 2b 5b 8a ff 74 24 08 41 57 48 8b 54 24 20 e8 7a 17 fe ff <0f> 0b e8 c2 ad ba f7 e8 7d fb 08 f8 48 8b 0c 24 49 89 d8 44 89 ea RSP: 0000:ffffc90000067a48 EFLAGS: 00010286 RAX: 000000000000006b RBX: ffffffff8b5b6ea0 RCX: 0000000000000000 RDX: ffff8881401c0000 RSI: ffffffff8166195c RDI: fffff5200000cf3b RBP: ffffffff8a5b2a60 R08: 000000000000006b R09: 0000000000000000 R10: 0000000080000000 R11: 0000000000000000 R12: ffffffff8bf2a925 R13: ffffffff8a5b29a0 R14: 0000000000000014 R15: ffffffff8a5b2960 FS: 0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000000c48e000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __check_heap_object+0xdd/0x110 mm/slub.c:4761 check_heap_object mm/usercopy.c:196 [inline] __check_object_size mm/usercopy.c:251 [inline] __check_object_size+0x1da/0x5a0 mm/usercopy.c:213 check_object_size include/linux/thread_info.h:199 [inline] check_copy_size include/linux/thread_info.h:235 [inline] copy_from_iter include/linux/uio.h:186 [inline] copy_from_iter_full include/linux/uio.h:194 [inline] memcpy_from_msg include/linux/skbuff.h:3977 [inline] qrtr_sendmsg+0x65f/0x970 net/qrtr/af_qrtr.c:965 sock_sendmsg_nosec net/socket.c:722 [inline] sock_sendmsg+0xde/0x190 net/socket.c:745 say_hello+0xf6/0x170 net/qrtr/ns.c:325 qrtr_ns_init+0x220/0x2b0 net/qrtr/ns.c:804 qrtr_proto_init+0x59/0x95 net/qrtr/af_qrtr.c:1296 do_one_initcall+0x141/0x790 init/main.c:1306 do_initcall_level init/main.c:1379 [inline] do_initcalls init/main.c:1395 [inline] do_basic_setup init/main.c:1414 [inline] kernel_init_freeable+0x6f9/0x782 init/main.c:1634 kernel_init+0x1e/0x1d0 init/main.c:1522 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Fixes: bf9f1baa279f ("net: add dedicated kmem_cache for typical/small skb->head") Reported-by: syzbot Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Tested-by: Ido Schimmel Reported-by: Linux Kernel Functional Testing Tested-by: Linux Kernel Functional Testing Link: https://lore.kernel.org/linux-next/CA+G9fYs-i-c2KTSA7Ai4ES_ZESY1ZnM=Zuo8P1jN00oed6KHMA@mail.gmail.com Link: https://lore.kernel.org/r/20230208142508.3278406-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 102be2c2420bd156a94ea509932c9eaef89b9424 Author: Ye Xingchen Date: Wed Feb 8 15:46:06 2023 +0800 hwmon: (gxp-fan-ctrl) 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/202302081546067270324@zte.com.cn Signed-off-by: Guenter Roeck commit 269d119481008cd725ce32553332593c0ecfc91c Author: Chao Yu Date: Tue Feb 7 21:48:08 2023 +0800 f2fs: fix to do sanity check on extent cache correctly In do_read_inode(), sanity check for extent cache should be called after f2fs_init_read_extent_tree(), fix it. Fixes: 72840cccc0a1 ("f2fs: allocate the extent_cache by default") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 351c02cb740472c659145b0027e77a3353e58185 Author: Xiangsheng Hou Date: Wed Feb 1 10:09:21 2023 +0800 spi: dt-bindings: mtk-snfi: Add read latch latency property Add mediatek,rx-latch-latency-ns property which adjust data read latch latency in the unit of nanoseconds. Signed-off-by: Xiangsheng Hou Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230201020921.26712-6-xiangsheng.hou@mediatek.com Signed-off-by: Mark Brown commit 8aa2ef233fa3b985ced1ed31b86fddddfd6be4b2 Author: Xiangsheng Hou Date: Wed Feb 1 10:09:19 2023 +0800 spi: dt-bindings: mtk-snfi: Add compatible for MT7986 Add dt-bindings documentation of SPI NAND controller for MediaTek MT7986 SoC platform. And add optional nfi_hclk property which is needed for MT7986. Signed-off-by: Xiangsheng Hou Reviewed-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230201020921.26712-4-xiangsheng.hou@mediatek.com Signed-off-by: Mark Brown commit 1d36c99062bf4e809271cc534486342442508d4a Author: Xiangsheng Hou Date: Wed Feb 1 10:09:20 2023 +0800 spi: mtk-snfi: Add snfi sample delay and read latency adjustment Add snfi sample delay and read latency adjustment which can get from dts property. Signed-off-by: Xiangsheng Hou Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230201020921.26712-5-xiangsheng.hou@mediatek.com Signed-off-by: Mark Brown commit e40fa328551dd67d14e5dc3e4ed82b5b770f027f Author: Xiangsheng Hou Date: Wed Feb 1 10:09:18 2023 +0800 spi: mtk-snfi: Add optional nfi_hclk which is needed for MT7986 Add optional nfi_hclk which is needed for MT7986. Signed-off-by: Xiangsheng Hou Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230201020921.26712-3-xiangsheng.hou@mediatek.com Signed-off-by: Mark Brown commit 2b1e19811a8ecc776d15da4ca89df48db6974d66 Author: Xiangsheng Hou Date: Wed Feb 1 10:09:17 2023 +0800 spi: mtk-snfi: Change default page format to setup default setting Change default page format to setup default setting since the sector size 1024 on MT7986 will lead to probe fail. Signed-off-by: Xiangsheng Hou Link: https://lore.kernel.org/r/20230201020921.26712-2-xiangsheng.hou@mediatek.com Signed-off-by: Mark Brown commit d874297bc7c8bb69f9fcbe6422ac5623c5897977 Author: Davidlohr Bueso Date: Wed Feb 8 10:19:44 2023 -0800 cxl/mem: Correct full ID range allocation For ID allocations we want 0-(max-1), ie: smatch complains: error: Calling ida_alloc_range() with a 'max' argument which is a power of 2. -1 missing? Correct this and also replace the call to use the max() flavor instead. Signed-off-by: Davidlohr Bueso Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/20230208181944.240261-1-dave@stgolabs.net Signed-off-by: Dan Williams commit 1d959312e2f23c8ee6ed9432a6fa4416b267477b Author: Ard Biesheuvel Date: Wed Feb 1 09:50:07 2023 +0100 efi: arm64: Wire up BTI annotation in memory attributes table UEFI v2.10 extends the EFI memory attributes table with a flag that indicates whether or not all RuntimeServicesCode regions were constructed with BTI landing pads, permitting the OS to map these regions with BTI restrictions enabled. So let's take this into account on arm64. Signed-off-by: Ard Biesheuvel Reviewed-by: Kees Cook Acked-by: Mark Rutland Reviewed-by: Will Deacon commit 5f6224175fbe4c2b91e303c17af4d4eb5e3a60a7 Author: Thomas Weißschuh Date: Wed Feb 8 04:01:22 2023 +0000 block: 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/20230208-kobj_type-block-v1-1-0b3eafd7d983@weissschuh.net Signed-off-by: Jens Axboe commit 0d5292bb29661bd8dbaedf0d768f274474f23196 Author: Kees Cook Date: Thu Jan 5 15:46:01 2023 -0800 net/i40e: Replace 0-length array with flexible array Zero-length arrays are deprecated[1]. Replace struct i40e_lump_tracking's "list" 0-length array with a flexible array. Detected with GCC 13, using -fstrict-flex-arrays=3: In function 'i40e_put_lump', inlined from 'i40e_clear_interrupt_scheme' at drivers/net/ethernet/intel/i40e/i40e_main.c:5145:2: drivers/net/ethernet/intel/i40e/i40e_main.c:278:27: warning: array subscript is outside array bounds of 'u16[0]' {aka 'short unsigned int[]'} [-Warray-bounds=] 278 | pile->list[i] = 0; | ~~~~~~~~~~^~~ drivers/net/ethernet/intel/i40e/i40e.h: In function 'i40e_clear_interrupt_scheme': drivers/net/ethernet/intel/i40e/i40e.h:179:13: note: while referencing 'list' 179 | u16 list[0]; | ^~~~ [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays Cc: Jesse Brandeburg Cc: Tony Nguyen Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: "Gustavo A. R. Silva" Cc: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Reviewed-by: Jiri Pirko Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit d5ba18423f87709146c120b20e4a1b8a5b528a76 Author: Jan Sokolowski Date: Mon Jan 9 15:11:20 2023 +0100 i40e: use ERR_PTR error print in i40e messages In i40e_status removal patches, i40e_status conversion to strings was removed in order to easily refactor the code to use standard errornums. This however made it more difficult for read error logs. Use %pe formatter to print error messages in human-readable format. Signed-off-by: Jan Sokolowski Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 5180ff1364bc26c031b54a68a80aa90ce0028b70 Author: Jan Sokolowski Date: Mon Jan 9 15:11:18 2023 +0100 i40e: use int for i40e_status To prepare for removal of i40e_status, change the variables from i40e_status to int. This eases the transition when values are changed to return standard int error codes over enum i40e_status. As such changes often also change variable orders, a cleanup is also applied here to make variables conform to RCT and some lines are also reformatted where applicable. Signed-off-by: Jan Sokolowski Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 5d968af27a166e055bdd5f832f095d809eadb992 Author: Jan Sokolowski Date: Mon Jan 9 15:11:17 2023 +0100 i40e: Remove string printing for i40e_status Remove the i40e_stat_str() function which prints the string representation of the i40e_status error code. With upcoming changes moving away from i40e_status, there will be no need for this function Signed-off-by: Jan Sokolowski Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 9d135352bb5d885a7b21417103423301a40c1b8b Author: Jan Sokolowski Date: Mon Jan 9 15:11:16 2023 +0100 i40e: Remove unused i40e status codes In an effort to remove i40e status codes and replace them with standard kernel errornums, unused values of i40e_status_code were removed. Signed-off-by: Jan Sokolowski Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 92f3e96d642f5e05b9dc710c06fedc669f1b4f00 Author: Pablo Neira Ayuso Date: Wed Feb 8 11:34:27 2023 +0100 netfilter: nf_tables: allow to fetch set elements when table has an owner NFT_MSG_GETSETELEM returns -EPERM when fetching set elements that belong to table that has an owner. This results in empty set/map listing from userspace. Fixes: 6001a930ce03 ("netfilter: nftables: introduce table ownership") Signed-off-by: Pablo Neira Ayuso commit b2c0c45d9255b4444df65c5f69b4939835fee019 Author: Krzysztof Kozlowski Date: Mon Feb 6 16:05:32 2023 +0100 ASoC: dt-bindings: qcom,q6apm-dai: adjust iommus for SM8550 ADSP It seems that SM8550 ADSP remote processor uses two IOMMUs. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230206150532.513468-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 7ee35b6b099ce6b51c6ac249d19b5b405f8e825d Author: Krzysztof Kozlowski Date: Mon Feb 6 19:08:05 2023 +0100 ASoC: dt-bindings: qcom,wcd934x: Allow usage as IFD device The WCD9340 audio codec appears on Slimbus twice: as IFD device without properties and the actual audio-codec referencing the former via wcd9340_ifd. Allow in the binding both versions to fix several warnings like: sdm850-samsung-w737.dtb: ifd@0,0: 'reset-gpios' is a required property sdm850-samsung-w737.dtb: ifd@0,0: 'slim-ifc-dev' is a required property sdm850-samsung-w737.dtb: ifd@0,0: 'interrupt-controller' is a required property Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230206180805.6621-3-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 636caca3583923b75fa538bc43ce57801fb8a1a2 Author: Krzysztof Kozlowski Date: Mon Feb 6 19:08:04 2023 +0100 ASoC: dt-bindings: qcom,wcd934x: Describe slim-ifc-dev The "slim-ifc-dev" property should not be just "true", because it allows any type. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230206180805.6621-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit edcda9a605bbfdd78d8d79043e01544d8b742828 Author: Krzysztof Kozlowski Date: Mon Feb 6 19:08:03 2023 +0100 ASoC: dt-bindings: qcom,wsa881x: Allow sound-name-prefix Reference common DAI properties to fix: sdm845-db845c.dtb: speaker@0,1: 'sound-name-prefix' 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/20230206180805.6621-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 6c39710da75caabc5f459a3f73fbb7435b4000aa Author: Shuming Fan Date: Tue Feb 7 17:09:46 2023 +0800 ASoC: rt712-sdca: Add RT712 SDCA driver for Jack and Amp topology This is the initial codec driver for rt712 SDCA (Jack+Amp topology). The host should connect with rt712 SdW1 interface. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20230207090946.20659-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 9f138bb2eaf661788df459dfcaf38feb080af41f Author: Sameer Pujar Date: Thu Feb 9 20:06:56 2023 +0530 ASoC: rt5640: Update MCLK rate in set_sysclk() Simple-card/audio-graph-card drivers do not handle MCLK clock when it is specified in the codec device node. The expectation here is that, the codec should actually own up the MCLK clock and do necessary setup in the driver. This is inspired from, commit dbf54a953435 ("ASoC: rt5659: Update MCLK rate in set_sysclk()"). Cc: Oder Chiou Signed-off-by: Sameer Pujar Link: https://lore.kernel.org/r/1675953417-8686-2-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown commit 934b0de1e9fdea93c4c7f2e18915c54fae67bdc6 Author: Wang Jianjian Date: Mon Dec 19 09:51:28 2022 +0800 ext4: don't show commit interval if it is zero If commit interval is 0, it means using default value. Fixes: 6e47a3cc68fc ("ext4: get rid of super block and sbi from handle_mount_ops()") Signed-off-by: Wang Jianjian Link: https://lore.kernel.org/r/20221219015128.876717-1-wangjianjian3@huawei.com Signed-off-by: Theodore Ts'o commit 11768cfd98136dd8399480c60b7a5d3d3c7b109b Author: Eric Biggers Date: Fri Dec 16 21:02:12 2022 -0800 ext4: use ext4_fc_tl_mem in fast-commit replay path To avoid 'sparse' warnings about missing endianness conversions, don't store native endianness values into struct ext4_fc_tl. Instead, use a separate struct type, ext4_fc_tl_mem. Fixes: dcc5827484d6 ("ext4: factor out ext4_fc_get_tl()") Cc: Ye Bin Signed-off-by: Eric Biggers Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20221217050212.150665-1-ebiggers@kernel.org Signed-off-by: Theodore Ts'o commit 564972dbf85c0900521e6273b772fd7f0b720dd7 Author: Herve Codina Date: Mon Feb 6 15:49:04 2023 +0100 MAINTAINERS: add the Infineon PEB2466 codec entry After contributing the driver, add myself as the maintainer for the Infineon PEB2466 codec. Signed-off-by: Herve Codina Link: https://lore.kernel.org/r/20230206144904.91078-4-herve.codina@bootlin.com Signed-off-by: Mark Brown commit 227f609c7c0e44f2103a8406ff9379ee1de3bc28 Author: Herve Codina Date: Mon Feb 6 15:49:03 2023 +0100 ASoC: codecs: Add support for the Infineon PEB2466 codec The Infineon PEB2466 codec is a programmable DSP-based four channels codec with filters capabilities. It also provides signals as GPIOs. Signed-off-by: Herve Codina Link: https://lore.kernel.org/r/20230206144904.91078-3-herve.codina@bootlin.com Signed-off-by: Mark Brown commit 4c03e952ad8688a28aed9b72fc48291240707c7d Author: Herve Codina Date: Mon Feb 6 15:49:02 2023 +0100 ASoC: dt-bindings: Add the Infineon PEB2466 codec The Infineon PEB2466 codec is a programmable DSP-based four channels codec with filters capabilities. Signed-off-by: Herve Codina Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230206144904.91078-2-herve.codina@bootlin.com Signed-off-by: Mark Brown commit 3478c83cf26bbffd026ae6a56bcb1fe544f0834e Author: Theodore Ts'o Date: Wed Dec 14 15:08:18 2022 -0500 ext4: improve xattr consistency checking and error reporting Refactor the in-inode and xattr block consistency checking, and report more fine-grained reports of the consistency problems. Also add more consistency checks for ea_inode number. Reviewed-by: Andreas Dilger Signed-off-by: Theodore Ts'o Link: https://lore.kernel.org/r/20221214200818.870087-1-tytso@mit.edu Signed-off-by: Theodore Ts'o commit 512e8475d2a9db5d424b0047572080183203c4e5 Author: Alex Deucher Date: Thu Feb 9 09:09:45 2023 -0500 Revert "drm/amd/display: disable S/G display on DCN 3.1.5" This reverts commit 3cc67fe1b3aa1ac4720e002f2aa2d08c9199a584. Some users have reported flickerng with S/G display. We've tried extensively to reproduce and debug the issue on a wide variety of platform configurations (DRAM bandwidth, etc.) and a variety of monitors, but so far have not been able to. We disabled S/G display on a number of platforms to address this but that leads to failure to pin framebuffers errors and blank displays when there is memory pressure or no displays at all on systems with limited carveout (e.g., Chromebooks). We have a parameter to disable this as a debugging option as a way for users to disable this, depending on their use case, and for us to help debug this further. Having this enabled seems like the lesser of to evils. Reviewed-by: Harry Wentland Acked-by: Christian König Signed-off-by: Alex Deucher commit c4029779c627ed94253ea2699e43753c052360c1 Author: Alex Deucher Date: Thu Feb 9 09:09:19 2023 -0500 Revert "drm/amd/display: disable S/G display on DCN 2.1.0" This reverts commit 2404f9b0ea0153c3fddb0c4d7a43869dc8608f6f. Some users have reported flickerng with S/G display. We've tried extensively to reproduce and debug the issue on a wide variety of platform configurations (DRAM bandwidth, etc.) and a variety of monitors, but so far have not been able to. We disabled S/G display on a number of platforms to address this but that leads to failure to pin framebuffers errors and blank displays when there is memory pressure or no displays at all on systems with limited carveout (e.g., Chromebooks). We have a parameter to disable this as a debugging option as a way for users to disable this, depending on their use case, and for us to help debug this further. Having this enabled seems like the lesser of to evils. Reviewed-by: Harry Wentland Acked-by: Christian König Signed-off-by: Alex Deucher commit 8f56a0fe1f3c1a5d6be5073d5b4186f53535fee2 Author: Alex Deucher Date: Thu Feb 9 09:07:42 2023 -0500 Revert "drm/amd/display: disable S/G display on DCN 3.1.2/3" This reverts commit f081cd4ca2658752a8c0e2353d50aec80d07c65f. Some users have reported flickerng with S/G display. We've tried extensively to reproduce and debug the issue on a wide variety of platform configurations (DRAM bandwidth, etc.) and a variety of monitors, but so far have not been able to. We disabled S/G display on a number of platforms to address this but that leads to failure to pin framebuffers errors and blank displays when there is memory pressure or no displays at all on systems with limited carveout (e.g., Chromebooks). We have a parameter to disable this as a debugging option as a way for users to disable this, depending on their use case, and for us to help debug this further. Having this enabled seems like the lesser of to evils. Reviewed-by: Harry Wentland Acked-by: Christian König Signed-off-by: Alex Deucher commit bf0207e1727031798f300afa17f9bbeceac6da87 Author: Alex Deucher Date: Thu Feb 9 09:00:02 2023 -0500 drm/amdgpu: add S/G display parameter Some users have reported flickerng with S/G display. We've tried extensively to reproduce and debug the issue on a wide variety of platform configurations (DRAM bandwidth, etc.) and a variety of monitors, but so far have not been able to. We disabled S/G display on a number of platforms to address this but that leads to failure to pin framebuffers errors and blank displays when there is memory pressure or no displays at all on systems with limited carveout (e.g., Chromebooks). Add a option to disable this as a debugging option as a way for users to disable this, depending on their use case, and for us to help debug this further. v2: fix typo Reviewed-by: Harry Wentland Acked-by: Christian König Signed-off-by: Alex Deucher commit 23f3e3272e7a4d9fb870485cd6df1e4f9539282c Author: Xiao Ni Date: Thu Feb 9 11:19:30 2023 +0800 block: Merge bio before checking ->cached_rq It checks if plug->cached_rq is empty before merging bio. But the merge action doesn't have relationship with plug->cached_rq, it trys to merge bio with requests within plug->mq_list. Now it checks if ->cached_rq is empty before merging bio. If it's empty, it will miss the merge chances. So move the merge function before checking ->cached_rq. Signed-off-by: Xiao Ni Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20230209031930.27354-1-xni@redhat.com Signed-off-by: Jens Axboe commit dcb52201435197c56154ff7c8cb139284d254bda Author: Christoph Hellwig Date: Thu Feb 9 06:35:23 2023 +0100 Revert "blk-cgroup: simplify blkg freeing from initialization failure paths" It turns out this was too soon. blkg_conf_prep does to funky locking games with the queue lock for this to work properly. This reverts commit 27b642b07a4a5eb44dffa94a5171ce468bdc46f9. Reported-by: Dan Carpenter Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230209053523.437927-1-hch@lst.de Signed-off-by: Jens Axboe commit c43332fe028c252a2a28e46be70a530f64fc3c9d Author: Christoph Hellwig Date: Wed Feb 8 07:35:14 2023 +0100 blk-cgroup: delay calling blkcg_exit_disk until disk_release While del_gendisk ensures there is no outstanding I/O on the queue, it can't prevent block layer users from building new I/O. This leads to a NULL ->root_blkg reference in bio_associate_blkg when allocating a new bio on a shut down file system. Delay freeing the blk-cgroup subsystems from del_gendisk until disk_release to make sure the blkg and throttle information is still avaіlable for bio submitters, even if those bios will immediately fail. This now can cause a case where disk_release is called on a disk that hasn't been added. That's mostly harmless, except for a case in blk_throttl_exit that now needs to check for a NULL ->td pointer. Fixes: 178fa7d49815 ("blk-cgroup: delay blk-cgroup initialization until add_disk") Reported-by: Ming Lei Signed-off-by: Christoph Hellwig Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20230208063514.171485-1-hch@lst.de Signed-off-by: Jens Axboe commit 09efa4a0e87776fc1cdc96733e8e55813a377d6a Author: Colin Ian King Date: Thu Feb 9 12:53:30 2023 +0000 drm/amd/display: Fix spelling mistakes of function name in error message The function name is being reported as dc_link_contruct when it is actually dc_link_construct_phy. Fix this by using %s and the __func__ for the function name. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit e1ebbf5dbf16a21eaa82db67505b9a735df4a614 Author: Ye Xingchen Date: Thu Feb 9 18:47:54 2023 +0800 drm/amd/display: remove duplicate include header link_hwss.h is included more than once in link_dpms.c . Signed-off-by: Ye Xingchen Signed-off-by: Alex Deucher commit 474876bac2333fcc41b10db61571219e2f990a8a Author: Arnd Bergmann Date: Thu Feb 9 13:45:03 2023 +0100 drm/amd/display: fix link_validation build failure When CONFIG_DRM_AMD_DC_DCN is disabled, the is_frl member is not defined: drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_validation.c: In function 'dp_active_dongle_validate_timing': drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_validation.c:126:66: error: 'const struct dc_dsc_config' has no member named 'is_frl' 126 | if (timing->flags.DSC && !timing->dsc_cfg.is_frl) | ^ Use the same #ifdef as the other references to this. Fixes: 54618888d1ea ("drm/amd/display: break down dc_link.c") Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit 34a24462561ff5b48467243829afd9b2b407528e Author: Tom Rix Date: Thu Feb 9 05:40:49 2023 -0800 drm/amd/display: set should_disable_otg storage-class-specifier to static smatch reports drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c:90:6: warning: symbol 'should_disable_otg' was not declared. Should it be static? should_disable_otg() is only used in dcn315_clk_mgr.c, so it should be static Signed-off-by: Tom Rix Signed-off-by: Alex Deucher commit 4d2c6e89ceec701d93e12161665cee43010555dd Author: Alex Deucher Date: Wed Feb 8 23:38:01 2023 -0500 drm/amd/display: minor cleanup of vm_setup Use fb_start/end for consistency with gmc code for non- XGMI systems, they are equivalent to vram_start/end. Reviewed-by: Hawking Zhang Acked-by: Christian König Signed-off-by: Alex Deucher commit 73ac3f22f518d3307695729d41ef49d4209aa8af Author: Alex Deucher Date: Wed Feb 8 23:31:13 2023 -0500 drm/amdgpu/gmc11: fix system aperture set when AGP is enabled Need to cover both FB and AGP apertures. v2: fix missed gfxhub_v3_0_3.c Fixes: c6eafee038ed ("Revert "Revert "drm/amdgpu/gmc11: enable AGP aperture""") Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 4936458bf989d168f5a89015dd81067c4c2bdc64 Author: Hamza Mahfooz Date: Wed Feb 8 13:25:49 2023 -0500 drm/amd/display: don't call dc_interrupt_set() for disabled crtcs As made mention of in commit 4ea7fc09539b ("drm/amd/display: Do not program interrupt status on disabled crtc"), we shouldn't program disabled crtcs. So, filter out disabled crtcs in dm_set_vupdate_irq() and dm_set_vblank(). Reviewed-by: Harry Wentland Fixes: 589d2739332d ("drm/amd/display: Use crtc enable/disable_vblank hooks") Fixes: d2574c33bb71 ("drm/amd/display: In VRR mode, do DRM core vblank handling at end of vblank. (v2)") Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 50a6620dd1fbc810476422a965b041f1839f8eac Author: William Zhang Date: Mon Feb 6 22:58:18 2023 -0800 spi: bcm63xx-hsspi: Add polling mode support Polling mode provides better throughput in general by avoiding the interrupt overhead as the maximum data size one interrupt can handle is only 512 bytes. So switch to polling mode as the default mode but add a driver sysfs option wait_mode to allow user manually changing the mode at run time between interrupt and polling. Also add driver banner message when the driver is loaded successfully. When test on a Broadcom BCM47622(ARM A7 dual core) reference board with WINBOND W25N01GV SPI NAND chip at 100MHz SPI clock using the MTD speed test suite, it shows about 15% improvement on the write and 30% on the read: ** Interrupt mode ** mtd_speedtest: MTD device: 0 count: 16 mtd_speedtest: MTD device size 134217728, eraseblock size 131072, page size 2048, count of eraseblocks 1024, pages per eraseblock 64, OOB size 64 mtd_test: scanning for bad eraseblocks mtd_test: scanned 16 eraseblocks, 0 are bad mtd_speedtest: testing eraseblock write speed mtd_speedtest: eraseblock write speed is 3072 KiB/s mtd_speedtest: testing eraseblock read speed mtd_speedtest: eraseblock read speed is 6690 KiB/s mtd_speedtest: testing page write speed mtd_speedtest: page write speed is 3066 KiB/s mtd_speedtest: testing page read speed mtd_speedtest: page read speed is 6762 KiB/s mtd_speedtest: testing 2 page write speed mtd_speedtest: 2 page write speed is 3071 KiB/s mtd_speedtest: testing 2 page read speed mtd_speedtest: 2 page read speed is 6772 KiB/s ** Polling mode ** mtd_speedtest: MTD device: 0 count: 16 mtd_speedtest: MTD device size 134217728, eraseblock size 131072, page size 2048, count of eraseblocks 1024, pages per eraseblock 64, OOB size 64 mtd_test: scanning for bad eraseblocks mtd_test: scanned 16 eraseblocks, 0 are bad mtd_speedtest: testing eraseblock write speed mtd_speedtest: eraseblock write speed is 3542 KiB/s mtd_speedtest: testing eraseblock read speed mtd_speedtest: eraseblock read speed is 8825 KiB/s mtd_speedtest: testing page write speed mtd_speedtest: page write speed is 3563 KiB/s mtd_speedtest: testing page read speed mtd_speedtest: page read speed is 8787 KiB/s mtd_speedtest: testing 2 page write speed mtd_speedtest: 2 page write speed is 3572 KiB/s mtd_speedtest: testing 2 page read speed mtd_speedtest: 2 page read speed is 8806 KiB/s Signed-off-by: William Zhang Link: https://lore.kernel.org/r/20230207065826.285013-8-william.zhang@broadcom.com Signed-off-by: Mark Brown commit 85a84a61699990db6a025b5073f337f49933a875 Author: William Zhang Date: Mon Feb 6 22:58:17 2023 -0800 spi: bcm63xx-hsspi: Endianness fix for ARM based SoC HSSPI controller uses big endian for the opcode in the message to the controller ping pong buffer. Use cpu_to_be16 to properly handle the endianness for both big and little endian host. Fixes: 142168eba9dc ("spi: bcm63xx-hsspi: add bcm63xx HSSPI driver") Signed-off-by: Kursad Oney Signed-off-by: William Zhang Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20230207065826.285013-7-william.zhang@broadcom.com Signed-off-by: Mark Brown commit 99d7428ac94bf67d6e9df81dd3b4bf3046196ad6 Author: William Zhang Date: Mon Feb 6 22:58:16 2023 -0800 spi: bcm63xx-hsspi: Add new compatible string support New compatible string brcm,bcmbca-hsspi-v1.0 is introduced based on dts document brcm,bcm63xx-hsspi.yaml. Add it to the driver to support this new binding. Signed-off-by: William Zhang Link: https://lore.kernel.org/r/20230207065826.285013-6-william.zhang@broadcom.com Signed-off-by: Mark Brown commit 0ba979f995324417fd773881bc5a39910a9f2362 Author: William Zhang Date: Mon Feb 6 22:58:13 2023 -0800 spi: Add bcmbca-hsspi controller bindings The new Broadcom Broadband BCMBCA SoCs includes a updated HSSPI controller. Add new compatible strings to differentiate the old and new controller while keeping MIPS based chip with the old compatible. Update property requirements for these two revisions of the controller. Also add myself and Kursad as the maintainers. Signed-off-by: William Zhang Link: https://lore.kernel.org/r/20230207065826.285013-3-william.zhang@broadcom.com Signed-off-by: Mark Brown commit fff948a44b44a628c81294af5498226cb66a2594 Author: William Zhang Date: Mon Feb 6 22:58:12 2023 -0800 spi: Convert bcm63xx-hsspi bindings to json-schema This is the preparation for updates on the bcm63xx hsspi driver. Convert the text based bindings to json-schema per new dts requirement. Signed-off-by: William Zhang Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230207065826.285013-2-william.zhang@broadcom.com Signed-off-by: Mark Brown commit 11f605633b33cdffd4ffe3b8e1e89590e8f521e7 Author: Bard Liao Date: Thu Feb 9 16:21:23 2023 +0200 ASoC: SOF: ipc4-topology: set copier sink format MOD_INIT_INSTANCE IPC for a copier only contains the sink format for output pin 0. Any additional output pins that are used need to have their sink format set using the LARGE_CONFIG_SET IPC message. Otherwise, firmware will report error or crash due to NULL format is used. Signed-off-by: Bard Liao Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230209142123.17193-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit b796ff3bf03fd8c838ddd2709ded15865e4af4a4 Author: Ranjani Sridharan Date: Thu Feb 9 16:21:22 2023 +0200 ASoC: SOF: ipc4-topology: Print queue IDs in error Print the queue ID's during bind/unbind errors as well to make it easier to see what failed exactly. Signed-off-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230209142123.17193-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 777af241a7ce6ed95f8d3fcb028c08f9b40addb6 Author: Srinivas Kandagatla Date: Thu Feb 9 12:28:06 2023 +0000 ASoC: codecs: lpass: remove not so useful verbose log Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230209122806.18923-9-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit ddffe3b82849ba2774d7a06fbe1cc7e83378c4d2 Author: Srinivas Kandagatla Date: Thu Feb 9 12:28:05 2023 +0000 ASoC: codecs: lpass: do not reset soundwire block on clk enable resetting soundwire block will put the slaves out of sync and result in re-enumeration during fsgen disable/enable path this is totally unnecessary and resulting fifo overflows. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230209122806.18923-8-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit e7621434378c40b62ef858c14ae6415fb6469a8e Author: Srinivas Kandagatla Date: Thu Feb 9 12:28:04 2023 +0000 ASoC: codecs: lpass: fix incorrect mclk rate For some reason we ended up with incorrect mclk rate which should be 1920000 instead of 96000, So far we were getting lucky as the same clk is set to 192000 by wsa and va macro. This issue is discovered when there is no wsa macro active and only rx or tx path is tested. Fix this by setting correct rate. Fixes: c39667ddcfc5 ("ASoC: codecs: lpass-tx-macro: add support for lpass tx macro") Fixes: af3d54b99764 ("ASoC: codecs: lpass-rx-macro: add support for lpass rx macro") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230209122806.18923-7-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 1dc3459009c33e335f0d62b84dd39a6bbd7fd5d2 Author: Srinivas Kandagatla Date: Thu Feb 9 12:28:03 2023 +0000 ASoC: codecs: lpass: register mclk after runtime pm move mclk out registration after runtime pm is enabled so that the clk framework can resume the codec if it requires to enable the mclk out. Fixes: c96baa2949b2 ("ASoC: codecs: wsa-macro: add runtime pm support") Fixes: 72ad25eabda0 ("ASoC: codecs: va-macro: add runtime pm support") Fixes: 366ff79ed539 ("ASoC: codecs: rx-macro: add runtime pm support") Fixes: 1fb83bc5cf64 ("ASoC: codecs: tx-macro: add runtime pm support") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230209122806.18923-6-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit dd33c2e7b21d72b151a87b5dafffee2c019043e5 Author: Srinivas Kandagatla Date: Thu Feb 9 12:28:02 2023 +0000 ASoC: qcom: audioreach: fix ADSP ready check currently q6apm_is_adsp_ready() will only return the cached value of previous result. If we are unlucky and previous result is not-ready then the caller will always get not-ready flag. This is not correct, we should query the dsp of its current state in irrespective of previous reported state. Fixes: 47bc8cf60e92 ("ASoC: qdsp6: audioreach: Add ADSP ready check") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230209122806.18923-5-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit aa759f3f9f4394a3af65ad1772fca6cb9dd9e4cc Author: Srinivas Kandagatla Date: Thu Feb 9 12:28:01 2023 +0000 ASoC: qcom: q6apm-dai: Add SNDRV_PCM_INFO_BATCH flag At the moment, playing audio with PulseAudio with the qdsp6 driver results in distorted sound. It seems like its timer-based scheduling does not work properly with qdsp6 since setting tsched=0 in the PulseAudio configuration avoids the issue. Apparently this happens when the pointer() callback is not accurate enough. There is a SNDRV_PCM_INFO_BATCH flag that can be used to stop PulseAudio from using timer-based scheduling by default. According to https://www.alsa-project.org/pipermail/alsa-devel/2014-March/073816.html: The flag is being used in the sense explained in the previous audio meeting -- the data transfer granularity isn't fine enough but aligned to the period size (or less). q6apm-dai reports the position as multiple of prtd->pcm_count = snd_pcm_lib_period_bytes(substream) so it indeed just a multiple of the period size. Therefore adding the flag here seems appropriate and makes audio work out of the box. Comment log inspired by Stephan Gerhold sent for q6asm-dai.c few years back. Fixes: 9b4fe0f1cd79 ("ASoC: qdsp6: audioreach: add q6apm-dai support") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230209122806.18923-4-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 84222ef54bfd8f043c23c8603fd5257a64b00780 Author: Srinivas Kandagatla Date: Thu Feb 9 12:28:00 2023 +0000 ASoC: qcom: q6apm-dai: fix race condition while updating the position pointer It is noticed that the position pointer value seems to get a get corrupted due to missing locking between updating and reading. Fix this by adding a spinlock around the position pointer. Fixes: 9b4fe0f1cd79 ("ASoC: qdsp6: audioreach: add q6apm-dai support") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230209122806.18923-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit c2ac3aec474da0455df79c4a182f19687bc98d1d Author: Srinivas Kandagatla Date: Thu Feb 9 12:27:59 2023 +0000 ASoC: qcom: q6apm-lpass-dai: unprepare stream if its already prepared prepare callback can be called multiple times, so unprepare the stream if its already prepared. Without this DSP is not happy to setting the params on a already prepared graph. Fixes: 9b4fe0f1cd79 ("ASoC: qdsp6: audioreach: add q6apm-dai support") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230209122806.18923-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit eb16f59e8e584e94d68098da86e70f9c4e54fa86 Author: Douglas Anderson Date: Mon Feb 6 18:48:15 2023 -0800 HID: i2c-hid: goodix: Add mainboard-vddio-supply As talked about in the patch ("dt-bindings: HID: i2c-hid: goodix: Add mainboard-vddio-supply") we may need to power up a 1.8V rail on the host associated with touchscreen IO. Let's add support in the driver for it. Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Torokhov Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20230206184744.6.Ic234b931025d1f920ce9e06fff294643943a65ad@changeid Signed-off-by: Benjamin Tissoires commit 1d18c1f3b7d938bdefc44289d137b4e6c7a3d502 Author: Douglas Anderson Date: Mon Feb 6 18:48:14 2023 -0800 dt-bindings: HID: i2c-hid: goodix: Add mainboard-vddio-supply The goodix i2c-hid bindings currently support two models of touchscreen: GT7375P and GT7986U. The datasheets of both touchscreens show the following things: * The mainboard that the touchscreen is connected to is only expected to supply one voltage to the touchscreen: 3.3V. * The touchscreen, depending on stuffing options, can accept IO to the touchscreen as either 3.3V or 1.8V. Presumably this means that the touchscreen has its own way internally to make or deal with 1.8V signals when it's configured for 1.8V IO. NOTE: you've got to look very carefully at the datasheet for the touchscreen to see that the above bullets are true. Specifically, the datasheet shows a signal called VDDIO and one might think that this is where a mainboard would provide VDDIO to the touchscreen. Upon closer inspection, however, a footnote can be found that says "When VDDIO is left floating, the logic level is 1.8V [...]; when VDDIO is connected to AVDD, the logic level is AVDD.". Thus the VDDIO pin on the touchscreen IC is actually a selector and not a pin whre the mainboard would pass a reference voltage. The fact that the touchscreen isn't supplied 1.8V by the mainboard means that when I originally submitted bindings for these touchscreens I only listed the 3.3V rail in the bindings. It can be noted that the original bindings and driver were added for sc7180-trogdor boards and these boards all use 3.3V IO via a level shifter on the mainboard. It turns out that with sc7280-herobrine-evoker, we've got a bit of a strange monkey on our hands. Due to some very interesting but (unfortunately) set-in-stone hardware design, we are doing 1.8V IO to the touchscreen but we _also_ have some extra buffers on the mainboard that need to be powered up to make the IO lines work. After much pondering about this, it seems like the best way to handle this is to add an optional "mainboard-vddio" rail to the bindings that is used to power up the buffers. Specifically, the fact that the touchscreen datasheet documents that its IOs can be at a different voltage level than its main power rail means that there truly are two voltage rails associated with the touchscreen, even if we don't actually provide the IO rail to it. Thus it doesn't feel absurd for the DT node on the host to have a 1.8V rail to power up anything related to its 1.8V logic. Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Torokhov Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230206184744.5.Ia77a96c6c5564f9cc25e6220b5a9171d5c2639e8@changeid Signed-off-by: Benjamin Tissoires commit 557e05fa9fdd0184890ca206cdec250cdd30375e Author: Douglas Anderson Date: Mon Feb 6 18:48:13 2023 -0800 HID: i2c-hid: goodix: Stop tying the reset line to the regulator In commit 18eeef46d359 ("HID: i2c-hid: goodix: Tie the reset line to true state of the regulator"), we started tying the reset line of Goodix touchscreens to the regulator. The primary motivation for that patch was some pre-production hardware (specifically sc7180-trogdor-homestar) where it was proposed to hook the touchscreen's main 3.3V power rail to an always-on supply. In such a case, when we turned "off" the touchscreen in Linux it was bad to assert the "reset" GPIO because that was causing a power drain. The patch accomplished that goal and did it in a general sort of way that didn't require special properties to be added in the device tree for homestar. It turns out that the design of using an always-on power rail for the touchscreen was rejected soon after the patch was written and long before sc7180-trogdor-homestar went into production. The final design of homestar actually fully separates the rail for the touchscreen and the display panel and both can be powered off and on. That means that the original motivation for the feature is gone. There are 3 other users of the goodix i2c-hid driver in mainline. I'll first talk about 2 of the other users in mainline: coachz and mrbland. On both coachz and mrbland the touchscreen power and panel power _are_ shared. That means that the patch to tie the reset line to the true state of the regulator _is_ doing something on those boards. Specifically, the patch reduced power consumption by tens of mA in the case where we turned the touchscreen off but left the panel on. Other than saving a small bit of power, the patch wasn't truly necessary. That being said, even though a small bit of power was saved in the state of "panel on + touchscreen off", that's not actually a state we ever expect to be in, except perhaps for very short periods of time at boot or during suspend/resume. Thus, the patch is truly not necessary. It should be further noted that, as documented in the original patch, the current code still didn't optimize power for every corner case of the "shared rail" situation. The last user in mainline was very recently added: evoker. Evoker is actually the motivation for me removing this bit of code. It turns out that for evoker we need to manage a second power rail for IO to the touchscreen. Trying to fit the management of this IO rail into the regulator notifiers turns out to be extremely hard. To avoid lockdep splats you shouldn't enable/disable other regulators in regulator notifiers and trying to find a way around this was going to be fairly difficult. Given the lack of any true motivation to tie the reset line to the regulator, lets go back to the simpler days and remove the code. This is, effectively, a revert of commit bdbc65eb77ee ("HID: i2c-hid: goodix: Fix a lockdep splat"), commit 25ddd7cfc582 ("HID: i2c-hid: goodix: Use the devm variant of regulator_register_notifier()"), and commit 18eeef46d359 ("HID: i2c-hid: goodix: Tie the reset line to true state of the regulator"). Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Reviewed-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20230206184744.4.I085b32b6140c7d1ac4e7e97b712bff9dd5962b62@changeid Signed-off-by: Benjamin Tissoires commit c4605bde334367b22bbf43cbbef0d1b7c75433dc Author: Yazen Ghannam Date: Fri Jan 27 17:04:02 2023 +0000 EDAC/amd64: Remove early_channel_count() The early_channel_count() function seems to have been useful in the past for knowing how many EDAC mci structures to populate. However, this is no longer needed as the maximum channel count for a system is used instead. Remove the early_channel_count() helper functions and related code. Use the size of the channel layer when iterating over channel structures. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230127170419.1824692-6-yazen.ghannam@amd.com commit cf981562e6270397a2b0dc871a1f11ccc2a687e8 Author: Yazen Ghannam Date: Fri Jan 27 17:04:01 2023 +0000 EDAC/amd64: Remove PCI Function 0 PCI Function 0 is used on Family 17h and later only to read the "dhar" value. This value is printed and provided through a module-specific debug sysfs file. The value is not used for any Family 17h and later code, and it does not have any apparent debug value on these systems. Remove "dhar", Function 0 PCI IDs, and all related code. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230127170419.1824692-5-yazen.ghannam@amd.com commit 03a86105556e23650e4470c09f91cf7c360d5e28 Author: Dmitry Torokhov Date: Tue Feb 7 15:03:30 2023 -0800 HID: retain initial quirks set up when creating HID devices In certain circumstances, such as when creating I2C-connected HID devices, we want to pass and retain some quirks (axis inversion, etc). The source of such quirks may be device tree, or DMI data, or something else not readily available to the HID core itself and therefore cannot be reconstructed easily. To allow this, introduce "initial_quirks" field in hid_device structure and use it when determining the final set of quirks. This fixes the problem with i2c-hid setting up device-tree sourced quirks too late and losing them on device rebind, and also allows to sever the tie between hid-code and i2c-hid when applying DMI-based quirks. Fixes: b60d3c803d76 ("HID: i2c-hid-of: Expose the touchscreen-inverted properties") Fixes: a2f416bf062a ("HID: multitouch: Add quirks for flipped axes") Reviewed-by: Guenter Roeck Tested-by: Allen Ballway Signed-off-by: Dmitry Torokhov Reviewed-by: Alistair Francis Link: https://lore.kernel.org/r/Y+LYwu3Zs13hdVDy@google.com Signed-off-by: Benjamin Tissoires commit eec8ccab1b5760ae2221bc8235c09eb05a1132c6 Author: Parthiban Veerasooran Date: Thu Feb 9 16:36:51 2023 +0530 most: add maintainer entry This patch adds an entry in the MAINTAINERS file for the MOST(R) Technology driver. Signed-off-by: Christian Gromm Signed-off-by: Parthiban Veerasooran Link: https://lore.kernel.org/r/20230209110651.168962-1-Parthiban.Veerasooran@microchip.com Signed-off-by: Greg Kroah-Hartman commit 637581ce60403a27712c657453a210c8fd17cc66 Author: Cong Dang Date: Tue Feb 7 18:30:51 2023 +0100 memory: renesas-rpc-if: Remove redundant division of dummy The dummy cycles value was wrongly calculated if dummy.buswidth > 1, which affects QSPI, OSPI, HyperFlash on various SoCs. We're lucky in Single SPI case since its dummy.buswidth equals to 1, so the result of the division is unchanged This issue can be reproduced using something like the following commands A. QSPI mode: Mount device with jffs2 format jffs2: CLEANMARKER node found at 0x00000004, not first node in block (0x00000000) B. QSPI mode: Write data to mtd10, where mtd10 is a parition on SPI Flash storage, defined properly in a device tree [Correct fragment, read from SPI Flash] root@v3x:~# echo "hello" > /dev/mtd10 root@v3x:~# hexdump -C -n100 /dev/mtd10 00000000 68 65 6c 6c 6f 0a ff ff ff ff ff ff ff ff ff ff |hello...........| 00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| [Incorrect read of the same fragment: see the difference at offsets 0-3] root@v3x:~# echo "hello" > /dev/mtd10 root@v3x:~# hexdump -C -n100 /dev/mtd10 00000000 00 00 00 00 68 65 6c 6c 6f 0a ff ff ff ff ff ff |....hello.......| 00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| As seen from the result, 4 NULL bytes were inserted before the test data. Wrong calculation in rpcif_prepare() led to miss of some dummy cycle. A division by bus width is redundant because it had been performed already in spi-rpc-if.c::rpcif_spi_mem_prepare() Fix this by removing the redundant division. Fixes: ca7d8b980b67 ("memory: add Renesas RPC-IF driver") Signed-off-by: Cong Dang Signed-off-by: Hai Pham Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20230112090655.43367-1-wsa+renesas@sang-engineering.com Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230207173051.449151-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 306b8201b0bb625853efd6da5c5d7a22a1ecc123 Merge: 2508d5efd7a58 3048a4deee801 Author: Arnd Bergmann Date: Thu Feb 9 14:04:19 2023 +0100 Merge tag 'at91-dt-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/dt AT91 device tree updates for 6.3 #2 It contains: - cleanups arround flexcom nodes on SAM9X60 SoC as follows: - preserve same ID for flexcoms and the embedded nodes (e.g. flx4 will embed uart4, spi4, i2c4 but not e.g. uart1, spi2, i2c3); - SoC specific bindings were moved from board specific file to SoC specific file - DMA bindings for all flexcom nodes were added - SoC file was filled with missing flexcom nodes - new SAM9X60 Curiosity board that contains 1 uSDcard interface, 1 SDcard interface, 1 USB device interface, 2 USB Type-A interfaces, 2 CAN interfaces, 1 10/100 Ethernet interface, 1 LCD RGB666 interface, 1 Gb DDR2, 4 Gb NAND Flash, 2Kb EEPROM, leds, button, power regulators, UART and JTAG connectors * tag 'at91-dt-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: at91: sam9x60_curiosity: Add device tree for sam9x60 curiosity board dt-bindings: arm: at91: Add info on sam9x60 curiosity ARM: dts: at91: sam9x60: Add missing flexcom definitions ARM: dts: at91: sam9x60: Add DMA bindings for the flexcom nodes ARM: dts: at91: sam9x60: Specify the FIFO size for the Flexcom UART ARM: dts: at91: sam9x60: fix spi4 node ARM: dts: at91: sam9x60: move flexcom definitions ARM: dts: at91: sam9x60: Fix the label numbering for the flexcom functions Link: https://lore.kernel.org/r/20230209084930.289721-1-claudiu.beznea@microchip.com Signed-off-by: Arnd Bergmann commit 2508d5efd7a588d07915a762e1731173854525f9 Author: Kunihiko Hayashi Date: Tue Feb 7 11:14:29 2023 +0900 arm64: dts: uniphier: Fix property name in PXs3 USB node The property "snps,usb2_gadget_lpm_disable" is wrong. It should be fixed to "snps,usb2-gadget-lpm-disable". Cc: stable@vger.kernel.org Fixes: 19fee1a1096d ("arm64: dts: uniphier: Add USB-device support for PXs3 reference board") Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/20230207021429.28925-1-hayashi.kunihiko@socionext.com Signed-off-by: Arnd Bergmann commit a8d3f2d9d2cc3e420ce58b4888cfc4bf4a53a38e Author: Kunihiko Hayashi Date: Tue Feb 7 11:35:14 2023 +0900 arm64: dts: uniphier: Add syscon-uhs-mode to SD node Add sociopnext,syscon-uhs-mode prpperty to the SD node to refer the handle of the control logic node. Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/20230207023514.29783-9-hayashi.kunihiko@socionext.com Signed-off-by: Arnd Bergmann commit f4d624a174880dec7eefdd26f860d5c92cbeff9a Author: Kunihiko Hayashi Date: Tue Feb 7 11:35:13 2023 +0900 arm64: dts: uniphier: Add syscon compatible string to soc-glue-debug Add "syscon" compatible string to the nodes for soc-glue-debug according to the DT schema. Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/20230207023514.29783-8-hayashi.kunihiko@socionext.com Signed-off-by: Arnd Bergmann commit f45d6207159583175a07c947b69a46e3f9a261b6 Author: Kunihiko Hayashi Date: Tue Feb 7 11:35:12 2023 +0900 arm64: dts: uniphier: Add missing reg properties for glue layer nodes The nodes for some glue layers don't include necessary reg properties. Add the properties according to the DT schema. Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/20230207023514.29783-7-hayashi.kunihiko@socionext.com Signed-off-by: Arnd Bergmann commit 5ebfa90bdd3d78f4967dc0095daf755989a999e0 Author: Kunihiko Hayashi Date: Tue Feb 7 11:35:11 2023 +0900 arm64: dts: uniphier: Align node names for SoC-dependent controller and PHYs with bindings The node names for SoC-dependent controllers and PHYs should be generic ones according to the DT schemas. Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/20230207023514.29783-6-hayashi.kunihiko@socionext.com Signed-off-by: Arnd Bergmann commit 1ae6e6bc7227ced299db13457579b0ce1526c78d Author: Kunihiko Hayashi Date: Tue Feb 7 11:35:10 2023 +0900 ARM: dts: uniphier: Add syscon-uhs-mode to SD node Add sociopnext,syscon-uhs-mode prpperty to the SD node to refer the handle of the control logic node. Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/20230207023514.29783-5-hayashi.kunihiko@socionext.com Signed-off-by: Arnd Bergmann commit 76b2cb8a7023c48cc3d4a14089b2b2fa59d7c87d Author: Kunihiko Hayashi Date: Tue Feb 7 11:35:09 2023 +0900 ARM: dts: uniphier: Add syscon compatible string to soc-glue-debug Add "syscon" compatible string to the nodes for soc-glue-debug according to the DT schema. Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/20230207023514.29783-4-hayashi.kunihiko@socionext.com Signed-off-by: Arnd Bergmann commit 2d1bf1fc778b8795cb478f261013b662bc62101a Author: Kunihiko Hayashi Date: Tue Feb 7 11:35:08 2023 +0900 ARM: dts: uniphier: Add missing reg properties for glue layer The nodes for glue layers should include "reg" property. Add the property according to the DT schema. Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/20230207023514.29783-3-hayashi.kunihiko@socionext.com Signed-off-by: Arnd Bergmann commit 2a03c600fe7e0258df654a0c21a23231dba25b9a Author: Kunihiko Hayashi Date: Tue Feb 7 11:35:07 2023 +0900 ARM: dts: uniphier: Align node names for SoC-dependent controller and PHYs with bindings The node names for SoC-dependent controllers and PHYs should be generic ones according to the DT schemas. Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/20230207023514.29783-2-hayashi.kunihiko@socionext.com Signed-off-by: Arnd Bergmann commit 153927e6f6c9e14bf167538ffaba315559e8a342 Merge: cfd5bdf3e98e3 1480bcf074d34 Author: Arnd Bergmann Date: Thu Feb 9 13:57:06 2023 +0100 Merge tag 'aspeed-6.3-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc into arm/dt ASPEED device tree updates for 6.3 - New machines * Ufispace NCPLite AST2600 BMC * Facebook Greatlakes AST2600 BMC - Updates for ethanolx, bletchley and tyan s8036 * tag 'aspeed-6.3-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc: ARM: dts: aspeed: p10bmc: Enable UART2 ARM: dts: aspeed: Add device tree for Ufispace NCPLite BMC dt-bindings: arm: aspeed: document Ufispace NCPLite BMC dt-bindings: vendor-prefixes: Add prefix for Ufi Space arm: dts: aspeed: tyan s8036: Enable kcs interrupts ARM: dts: aspeed: bletchley: Enable wdtrst1 ARM: dts: aspeed: bletchley: Rename flash1 label ARM: dts: aspeed: ethanolx: Add BIOS flash chip ARM: dts: aspeed: ethanolx: Enable CTS/RTS pins on UART1 ARM: dts: aspeed: ethanolx: Add label for the master partition ARM: dts: aspeed: ethanolx: Correct EEPROM device name ARM: dts: aspeed: ethanolx: Enable VUART ARM: dts: aspeed: greatlakes: Add Facebook greatlakes (AST2600) BMC dt-bindings: arm: aspeed: add Facebook Greatlakes board Link: https://lore.kernel.org/r/CACPK8XdbffU5yRSZF-zR2xv-+6aJK+hEXP8TOkW=SvS+nNTGxg@mail.gmail.com Signed-off-by: Arnd Bergmann commit 8d7253dc447473dfcf3f09fb0fa2bd6f7d05b43b Author: Benjamin Gray Date: Fri Feb 3 11:39:47 2023 +1100 selftests/powerpc: Add automatically allocating read_file A couple of tests roll their own auto-allocating file read logic. Add a generic implementation and convert them to use it. Signed-off-by: Benjamin Gray Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230203003947.38033-6-bgray@linux.ibm.com commit 5c20de57888f0962e25a0eeec1a59c98056fc42e Author: Benjamin Gray Date: Fri Feb 3 11:39:46 2023 +1100 selftests/powerpc: Add {read,write}_{long,ulong} Add helper functions to read and write (unsigned) long values directly from/to files. One of the kernel interfaces uses hex strings, so we need to allow passing a base too. Signed-off-by: Benjamin Gray Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230203003947.38033-5-bgray@linux.ibm.com commit d1bc05b7bf02f8635fe6c445f67d78f85234cbb7 Author: Benjamin Gray Date: Fri Feb 3 11:39:45 2023 +1100 selftests/powerpc: Parse long/unsigned long value safely Often a file is expected to hold an integral value. Existing functions will use a C stdlib function like atoi or strtol to parse the file. These operations are error prone, with complicated error conditions (atoi returns 0 if not a number, and is undefined behaviour if not in range. strtol returns 0 if not a number, and LONG_MIN/MAX if not in range + sets errno to ERANGE). Signed-off-by: Benjamin Gray Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230203003947.38033-4-bgray@linux.ibm.com commit 121d340be9a17ed89d523c56203908c01e09a306 Author: Benjamin Gray Date: Fri Feb 3 11:39:44 2023 +1100 selftests/powerpc: Add read/write debugfs file, int Debugfs files are not always integers, so make *_file return/write a byte buffer, and *_int deal with int values specifically. This increases consistency with the other file read/write helpers. Signed-off-by: Benjamin Gray Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230203003947.38033-3-bgray@linux.ibm.com commit a974f0c131891027fe8490e654a220151b4caa82 Author: Benjamin Gray Date: Fri Feb 3 11:39:43 2023 +1100 selftests/powerpc: Add generic read/write file util File read/write is reimplemented in about 5 different ways in the various PowerPC selftests. This indicates it should be a common util. Add a common read_file / write_file implementation and convert users to it where (easily) possible. Signed-off-by: Benjamin Gray Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230203003947.38033-2-bgray@linux.ibm.com commit 296e7dff61cbaf88846ed0aab05be6141ae106d1 Author: Philipp Hortmann Date: Wed Feb 8 19:56:45 2023 +0100 staging: rtl8192e: Use BIT() instead of << for bit field MSR_LINK_MASK Use commonly used BIT() macro to define MSR_LINK_MASK. Equation is not accepted by checkpatch because of missing spaces. Therefore line needs to change anyhow. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/20230208185645.GA14681@matrix-ESPRIMO-P710 Signed-off-by: Greg Kroah-Hartman commit 370f696e44745b321054496fa351dade03fc4bd9 Author: Conor Dooley Date: Wed Feb 8 17:17:16 2023 +0000 dt-bindings: serial: snps-dw-apb-uart: add dma & dma-names properties Commit 0c559bc8abfb ("dt-bindings: serial: restrict possible child node names") exposed the Allwinner D1 devicetrees as users of unevaluated properties, with a slew of similar warnings now appearing during dtbs_check: sun20i-d1-nezha.dtb: serial@2500400: Unevaluated properties are not allowed ('dma-names', 'dmas' were unexpected) Document the missing properties. Signed-off-by: Conor Dooley Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230208171715.70862-1-conor@kernel.org Signed-off-by: Greg Kroah-Hartman commit 491581f40e4c52c4b36c83e8c75b2210ed7c358a Author: Elliot Berman Date: Fri Feb 3 13:01:32 2023 -0800 soc: qcom: geni-se: Move qcom-geni-se.h to linux/soc/qcom/geni-se.h Move include/linux/qcom-geni-se.h to include/linux/soc/qcom/geni-se.h. This removes 1 of a few remaining Qualcomm-specific headers into a more approciate subdirectory under include/. Signed-off-by: Elliot Berman Acked-by: Bjorn Andersson Acked-by: Wolfram Sang # for I2C Reviewed-by: Guru Das Srinagesh Link: https://lore.kernel.org/r/20230203210133.3552796-1-quic_eberman@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 159c610af8cdf2b3c915e59162fc867b557cbe7e Author: Ye Xingchen Date: Wed Feb 8 10:49:17 2023 +0800 MIPS: ralink: 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: Thomas Bogendoerfer commit 663bf6abe732e13af5d4e4d9a123d59b05c586e1 Author: Ye Xingchen Date: Wed Feb 8 10:48:03 2023 +0800 MIPS: pci-mt7620: 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: Thomas Bogendoerfer commit 7c035a187c51f6b10badc2b9c51b60ed8cddd11c Author: Ye Xingchen Date: Wed Feb 8 10:46:39 2023 +0800 MIPS: pci: lantiq: 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: Thomas Bogendoerfer commit 00c11b40e6b1e36d671fccc1bd82d1dfdfd2605e Author: Ye Xingchen Date: Wed Feb 8 10:45:16 2023 +0800 MIPS: lantiq: xway: 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: Thomas Bogendoerfer commit 301d3dd05525e3a046f6cfa6ee4dea6a3b7111ee Author: Krzysztof Kozlowski Date: Wed Feb 8 17:04:24 2023 +0100 ARM: dts: exynos: correct max98090 DAI argument in Snow The max98090 has only one DAI and does not take argument to DAI phandles: exynos5250-snow-rev5.dtb: audio-codec@10: #sound-dai-cells:0:0: 0 was expected Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/20230208160424.371678-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit fc605b914167de75432c3b5aae239fb191e84a31 Author: Rafał Miłecki Date: Wed Feb 8 08:03:01 2023 +0100 MIPS: BCM47XX: Add support for Linksys E2500 V3 It's a BCM5358 based home WiFi router. 16 MiB flash, 64 MiB RAM, BCM5325 switch, on-SoC 802.11n radio. Signed-off-by: Rafał Miłecki Reviewed-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit 2512839dd648ffa2c2a752e1403aaeb928cff71a Author: Kiseok Jo Date: Thu Feb 9 08:49:03 2023 +0000 ASoC: SMA1303: Remove the sysclk setting in devicetree In SMA1303, this device does not support MCLK. So it need to remove sysclk setting in devicetree. Signed-off-by: Kiseok Jo Link: https://lore.kernel.org/r/20230209084903.13000-2-kiseok.jo@irondevice.com Signed-off-by: Mark Brown commit 35ff1051b9594b05041eb2444a339345944b3241 Author: Krzysztof Kozlowski Date: Wed Feb 8 17:04:10 2023 +0100 ASoC: codecs: max98090: simplify snd_soc_dai_driver The max98090 has only one DAI, so snd_soc_dai_driver does not have to be an array. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230208160410.371609-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 0551ff7cf51abefe7351a8c486e6318196b3b6fe Author: Krzysztof Kozlowski Date: Wed Feb 8 17:04:09 2023 +0100 ASoC: dt-bindings: maxim,max98090: Convert to dtschema Convert the Maxim Integrated MAX98090/MAX98091 audio codecs bindings to DT schema. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230208160410.371609-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit f87b564686ee47c480ccacc3922b38a8c54a6945 Author: Neil Armstrong Date: Tue Feb 7 16:02:04 2023 +0100 dt-bindings: usb: amlogic,meson-g12a-usb-ctrl: make G12A usb3-phy0 optional On the G12A USB complex, the USB3 PHY is shared with the PCIe controller, thus on designs without PCIe enabled the USB3 PHY entry can be ommited from the PHY list. Fixes: cdff2c946f06 ("dt-bindings: usb: amlogic,meson-g12a-usb-ctrl: add the Amlogic AXG Families USB Glue Bindings") Signed-off-by: Neil Armstrong Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230207-b4-amlogic-g12a-usb-ctrl-bindings-fix-v1-1-c310293da7a2@linaro.org Signed-off-by: Greg Kroah-Hartman commit e2ffae3ed92a9f768902c1cf82642c3a09cd0345 Author: Alexander Stein Date: Tue Feb 7 12:05:31 2023 +0100 usb: host: fsl-mph-dr-of: reuse device_set_of_node_from_dev This sets both of_node fields and takes a of_node reference as well. Fixes: bb160ee61c04 ("drivers/usb/host/ehci-fsl: Fix interrupt setup in host mode.") Signed-off-by: Alexander Stein Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230207110531.1060252-4-alexander.stein@ew.tq-group.com Signed-off-by: Greg Kroah-Hartman commit 2295bed9bebe8d1eef276194fed5b5fbe89c5363 Author: Alexander Stein Date: Tue Feb 7 12:05:30 2023 +0100 of: device: Do not ignore error code in of_device_uevent_modalias of_device_get_modalias might return an error code, propagate that one. Otherwise the negative, signed integer is propagated to unsigned integer for the comparison resulting in a huge 'sl' size. Signed-off-by: Alexander Stein Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230207110531.1060252-3-alexander.stein@ew.tq-group.com Signed-off-by: Greg Kroah-Hartman commit 553bd29700145e1849698985e9800f14e967da49 Author: Alexander Stein Date: Tue Feb 7 12:05:29 2023 +0100 of: device: Ignore modalias of reused nodes If of_node is reused, do not use that node's modalias. This will hide the name of the actual device. This is rather prominent in USB glue drivers creating a platform device for the host controller. Signed-off-by: Alexander Stein Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230207110531.1060252-2-alexander.stein@ew.tq-group.com Signed-off-by: Greg Kroah-Hartman commit 8488a831e0c4d59528d20713a14cb8958af15bfe Author: Daniel Scally Date: Thu Feb 9 09:43:59 2023 +0000 usb: gadget: configfs: Fix set but not used variable warning Fix a -Wunused-but-set-variable warning in gadget_string_s_store() Fixes: 15a7cf8caabe ("usb: gadget: configfs: Support arbitrary string descriptors") Reported-by: kernel test robot Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230209094359.1549629-1-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit a81cc43abd23f2769b044b79f4cf58a9ff6e2201 Author: Krzysztof Kozlowski Date: Wed Feb 8 18:26:34 2023 +0100 ARM: dts: s5pv210: add "gpios" suffix to wlf,ldo1ena on Aries The GPIOs properties should end with "gpios" suffix and Linux gpiolib already handles both names, so switch to preferred one. Link: https://lore.kernel.org/r/20230208172634.404452-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 149a903eceb73b8b8af25e12b552c68aa9991802 Author: Krzysztof Kozlowski Date: Wed Feb 8 18:26:33 2023 +0100 ARM: dts: exynos: add "gpios" suffix to wlf,ldo1ena on Arndale The GPIOs properties should end with "gpios" suffix and Linux gpiolib already handles both names, so switch to preferred one. Link: https://lore.kernel.org/r/20230208172634.404452-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 0e06b987d1b7469ff1b4f7a68466859f94e7221a Author: Krzysztof Kozlowski Date: Wed Feb 8 18:26:32 2023 +0100 ARM: dts: exynos: add "gpios" suffix to wlf,ldo1ena on Midas The GPIOs properties should end with "gpios" suffix and Linux gpiolib already handles both names, so switch to preferred one. While touching the lines, replace open-coded GPIO_ACTIVE_HIGH flag. Tested-by: Henrik Grimler Link: https://lore.kernel.org/r/20230208172634.404452-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 428218307dd2ef175314f39f141beb93163ae1ca Author: Krzysztof Kozlowski Date: Wed Feb 8 17:49:42 2023 +0100 ARM: dts: exynos: correct SPI nor compatible in SMDK5250 SPI NOR flash compatible should come with generic jedec,spi-nor fallback and proper vendor prefix: exynos5250-smdk5250.dtb: /soc/spi@12d30000/flash@0: failed to match any schema with compatible: ['w25x80'] Link: https://lore.kernel.org/r/20230208164942.387390-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 44ffd27d83042e31c4dd85c148204b7610f0dc6c Author: Krzysztof Kozlowski Date: Wed Feb 8 17:49:41 2023 +0100 ARM: dts: exynos: correct SPI nor compatible in SMDKv310 SPI NOR flash compatible should come with generic jedec,spi-nor fallback and proper vendor prefix: exynos4210-smdkv310.dtb: /soc/spi@13940000/flash@0: failed to match any schema with compatible: ['w25x80'] Link: https://lore.kernel.org/r/20230208164942.387390-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 27dfcb622b59cbce2c7f55cd87f06d2cdf20d5eb Author: Krzysztof Kozlowski Date: Tue Feb 7 22:00:20 2023 +0100 ARM: dts: exynos: move I2C10 out of soc node on Arndale I2C10 is represented as i2c-gpio device, thus it is not really a part of soc MMIO bus: exynos5250-arndale.dtb: soc: i2c-10: {'pinctrl-names': ['default'], ... } should not be valid under {'type': 'object'} Link: https://lore.kernel.org/r/20230207210020.677007-7-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit c118f3d23531fccab2f64cb02196b2b52ad8392d Author: Krzysztof Kozlowski Date: Tue Feb 7 22:00:19 2023 +0100 ARM: dts: exynos: drop redundant address/size cells from I2C10 on Arndale I2C10 does not have any children because it is used in HDMI DDC, so drop redundant address/size-cells. Link: https://lore.kernel.org/r/20230207210020.677007-6-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 4804e14912bd48db57f1aec0d41f6f92fe80c870 Author: Krzysztof Kozlowski Date: Tue Feb 7 22:00:18 2023 +0100 ARM: dts: exynos: drop default status from I2C10 on Arndale status=okay is by default for new nodes. Link: https://lore.kernel.org/r/20230207210020.677007-5-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 69276d702c7d8f3c9b23b66bd6540cba8d5bd088 Author: Krzysztof Kozlowski Date: Tue Feb 7 22:00:17 2023 +0100 ARM: dts: exynos: align status led name with bindings on Origen4210 The "status" is a reserved keyword and LED nodes should have generic prefix: exynos4210-origen.dtb: leds: status: {'gpios': [[76, 3, 1]], 'function': ['heartbeat'], 'linux,default-trigger': ['heartbeat']} is not of type 'array' Link: https://lore.kernel.org/r/20230207210020.677007-4-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 6229235f7c6616c96ac06fd1094520b037410f46 Author: Yazen Ghannam Date: Fri Jan 27 17:04:00 2023 +0000 EDAC/amd64: Remove PCI Function 6 PCI Function 6 is used on Family 17h and later to access scrub registers. With scrub access removed, this function has no other use. Remove all Function 6 PCI IDs and related code. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230127170419.1824692-4-yazen.ghannam@amd.com commit 6e241bc93c9f0ae6f76ed65b44132948ca70fd76 Author: Yazen Ghannam Date: Fri Jan 27 17:03:59 2023 +0000 EDAC/amd64: Remove scrub rate control for Family 17h and later The scrub registers on AMD Family 17h and later may be inaccessible to the OS. Furthermore, hardware designers recommend that the scrubbing feature is managed by the firmware. Remove support for the sdram_scrub_rate interface for AMD Family 17h systems and later by not setting the scrub function pointers. The EDAC MC core will then not expose the scrub files in sysfs. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230127170419.1824692-3-yazen.ghannam@amd.com commit fdce765a13384cf411d456472d396d8db2b3114f Author: Yazen Ghannam Date: Fri Jan 27 17:03:58 2023 +0000 EDAC/amd64: Don't set up EDAC PCI control on Family 17h+ EDAC PCI control is used to detect/report legacy PCI errors like "Parity" and "SERROR". Modern AMD systems use PCIe Advanced Error Reporting (AER), and legacy PCI errors should not be reported. Remove EDAC PCI control setup on AMD Family 17h and later systems. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230127170419.1824692-2-yazen.ghannam@amd.com commit ad8685d0f61a6fc1dc2e5874f4924ff5028c5954 Author: Greg Kroah-Hartman Date: Wed Feb 8 12:13:30 2023 +0100 driver core: bus: constify bus_unregister() The bus_unregister() 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/20230208111330.439504-22-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 4dd1f3f8f99ec51dbcfeffe95b8ab68161a332a4 Author: Greg Kroah-Hartman Date: Wed Feb 8 12:13:29 2023 +0100 driver core: bus: constify some internal functions The functions add_probe_files() and remove_probe_files() should be taking a const * to bus_type, not just a *, so fix that up. These functions should really be removed entirely and an attribute group used instead, but for now, make this change so that other const work can continue. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230208111330.439504-21-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit f91482be9b480dfce2616f5ba3fa548b8ed41efb Author: Greg Kroah-Hartman Date: Wed Feb 8 12:13:28 2023 +0100 driver core: bus: constify bus_get_kset() The bus_get_kset() function should be taking a const * to bus_type, not just a * so fix that up. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230208111330.439504-20-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit bc8b7931012f0511f016e2f048d1f4222db8e08f Author: Greg Kroah-Hartman Date: Wed Feb 8 12:13:27 2023 +0100 driver core: bus: constify bus_register/unregister_notifier() The bus_register_notifier() and bus_unregister_notifier() functions should be taking a const * to bus_type, not just a * so fix that up. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230208111330.439504-19-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit d2bf38c088e0d5467a0e8a2055d6f95dff5c2125 Author: Greg Kroah-Hartman Date: Wed Feb 8 12:13:26 2023 +0100 driver core: remove private pointer from struct bus_type Now that the driver code has been refactored to not rely on the pointer from a struct bus_type to the private structure it can be safely removed from the structure entirely. This will allow most bus_type structures to now be marked as const. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230208111330.439504-18-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 63b823d7d3cd275c3347233f95bdf966a595dbc8 Author: Greg Kroah-Hartman Date: Wed Feb 8 12:13:25 2023 +0100 driver core: create bus_is_registered() A local function to the driver core to determine if a bus really is registered with the kernel or not. To be used only by the driver core code, as part of the driver registration path as it's not really "safe" because the bus could be unregistered instantly after being called. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230208111330.439504-17-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit fb451966ae7d7e6d6802de39bda5fa2f15781244 Author: Greg Kroah-Hartman Date: Wed Feb 8 12:13:24 2023 +0100 driver core: bus: clean up driver_find() Convert the driver_find() function to use bus_to_subsys() and not use the back-pointer to the private structure. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230208111330.439504-16-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit adc18506941dcafe216aba80766ab51c890358e8 Author: Greg Kroah-Hartman Date: Wed Feb 8 12:13:23 2023 +0100 driver core: move driver_find() to bus.c This function really is a bus function, not a driver one, so move it from driver.c to bus.c so that we can clean up some internal bus logic easier. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230208111330.439504-15-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit b5aaecb82ac0d008ddec8132979398b9b4e925fc Author: Greg Kroah-Hartman Date: Wed Feb 8 12:13:22 2023 +0100 driver core: bus: clean up bus_sort_breadthfirst() Convert the bus_sort_breadthfirst() function to use bus_to_subsys() and not use the back-pointer to the private structure. This also allows us to get rid of bus_get_device_klist() which was only being used by this one internal function. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230208111330.439504-14-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 83b9148df2c95e23d0fcf1f714dec88ce5a0468b Author: Greg Kroah-Hartman Date: Wed Feb 8 12:13:21 2023 +0100 driver core: bus: bus iterator cleanups Convert the bus_for_each_dev(), bus_find_device, and bus_for_each_drv() functions to use bus_to_subsys() and not use the back-pointer to the private structure. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230208111330.439504-13-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit e4f056825ff5939254701d02ff3833ff27116225 Author: Greg Kroah-Hartman Date: Wed Feb 8 12:13:20 2023 +0100 driver core: bus: bus_add/remove_driver() cleanups Convert the bus_add_driver() and bus_remove_driver() functions to use bus_to_subsys() and not use the back-pointer to the private structure. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230208111330.439504-12-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 32a8121a19c4936672440c96371f6a8c2b0c3d4d Author: Greg Kroah-Hartman Date: Wed Feb 8 12:13:19 2023 +0100 driver core: bus: bus_register/unregister_notifier() cleanups Convert the bus_register_notifier() and bus_unregister_notifier() public functions to use bus_to_subsys() and not use the back-pointer to the private structure as well as the bus_notify() function. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230208111330.439504-11-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit beea7892d4339e50f15e5131d51a95503678fdf6 Author: Greg Kroah-Hartman Date: Wed Feb 8 12:13:18 2023 +0100 driver core: bus: bus_get_kset() cleanup Convert the bus_get_kset() function function to use bus_to_subsys() and not use the back-pointer to the private structure. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230208111330.439504-10-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit adac0375380a7d3e50194cc5b03b676b0321bded Author: Greg Kroah-Hartman Date: Wed Feb 8 12:13:17 2023 +0100 driver core: bus: subsys_interface_register/unregister() cleanups Convert the subsys_interface_register and subsys_interface_unregister() functions to use bus_to_subsys() and not use the back-pointer to the private structure. This also requires changing the parameters on subsys_dev_iter_init() to iterate over the list properly. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230208111330.439504-9-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 3465e2e4a24eef9bc9f21aa29d83fd7000c1da48 Author: Greg Kroah-Hartman Date: Wed Feb 8 12:13:16 2023 +0100 driver core: bus: bus_register/unregister() cleanups Convert the bus_register() and bus_unregister() functions to use bus_to_subsys() and not use the back-pointer to the private structure. Because bus_add_groups() and bus_remove_groups() were only called in one place, remove those one-line-wrapper functions and call the real sysfs group function where it is needed instead, saving another layer of indirection. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230208111330.439504-8-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 5221b82d46f26903cf3161fb7d1fc006170811e0 Author: Greg Kroah-Hartman Date: Wed Feb 8 12:13:15 2023 +0100 driver core: bus: bus_add/probe/remove_device() cleanups Convert the bus_add_device(), bus_probe_device(), and bus_remove_device() functions to use bus_to_subsys() and not use the back-pointer to the private structure. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230208111330.439504-7-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit a00fdb988d81200e4d81b81e525b8f90e7d51591 Author: Greg Kroah-Hartman Date: Wed Feb 8 12:13:14 2023 +0100 driver core: bus: sysfs function cleanups Convert the drivers_autoprobe show/store and uevent sysfs callbacks to use bus_to_subsys() and not use the back-pointer to the private structure. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230208111330.439504-6-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 0396f2863f7af3c588033d270f7d979d11cd4708 Author: Greg Kroah-Hartman Date: Wed Feb 8 12:13:13 2023 +0100 driver core: bus: convert bus_create/remove_file to be constant bus_create_file() and bus_remove_file() can be made to take a constant bus pointer, as it should not be modifying anything in the bus structure. Make this change and move the functions to use the internal subsys_get/put() logic as well, to prevent the use of the back-pointer in struct bus_type. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230208111330.439504-5-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit e0766ea4c8f8f94a605e291aa3672a703dc1d2e4 Author: Greg Kroah-Hartman Date: Wed Feb 8 12:13:12 2023 +0100 driver core: bus: constantify the bus_find_* functions All of the bus find and iterator functions do not modify the struct bus_type passed to them, so mark them as constant to enforce this rule. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230208111330.439504-4-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 273afac615adccf97bd4e70ebfb27074f1ff22b9 Author: Greg Kroah-Hartman Date: Wed Feb 8 12:13:11 2023 +0100 driver core: bus: implement bus_get/put() without the private pointer In the quest to make 'struct bus_type' constant and in read-only memory, we need to stop using the private pointer to the subsys_private structure. First step in doing this is to create a helper function that turns a 'struct bus_type' into 'struct subsys_private' called bus_to_subsys(). bus_to_subsys() walks the list of registered busses in the system and finds the matching one based on the pointer to the bus_type itself. As this is a short list, and this function is not on any fast path, it should not be noticable. Implement bus_get() and bus_put() using this new helper function. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230208111330.439504-3-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 789be03a600842ef461968cc5a2d458f51f319b2 Author: Greg Kroah-Hartman Date: Wed Feb 8 12:13:10 2023 +0100 driver core: add local subsys_get and subsys_put functions We need to control the reference count of the subsys private structure instead of directly manipulating the kset reference count of it, so wrap that logic up in a subsys_get() and subsys_put() function to make it more obvious as to what is happening. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230208111330.439504-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit df97f64dfa317a5485daf247b6c043a584ef95f9 Author: Jan Kara Date: Thu Feb 9 10:33:09 2023 +0100 udf: Avoid directory type conversion failure due to ENOMEM When converting directory from in-ICB to normal format, the last iteration through the directory fixing up directory enteries can fail due to ENOMEM. We do not expect this iteration to fail since the directory is already verified to be correct and it is difficult to undo the conversion at this point. So just use GFP_NOFAIL to make sure the small allocation cannot fail. Reported-by: syzbot+111eaa994ff74f8d440f@syzkaller.appspotmail.com Fixes: 0aba4860b0d0 ("udf: Allocate name buffer in directory iterator on heap") Signed-off-by: Jan Kara commit b3574f579ece24439c90e9a179742c61205fbcfa Author: Pali Rohár Date: Sat Jan 14 17:41:25 2023 +0100 PCI: mvebu: Mark driver as BROKEN People are reporting that pci-mvebu.c driver does not work with recent mainline kernel. There are more bugs which prevents its for daily usage. So lets mark it as broken for now, until somebody would be able to fix it in mainline kernel. Link: https://lore.kernel.org/r/20230114164125.1298-1-pali@kernel.org Signed-off-by: Pali Rohár Signed-off-by: Lorenzo Pieralisi commit 467fbc77f673ecc9dcf4e58ffc1fa426a22df7fd Author: Neil Armstrong Date: Tue Feb 7 11:04:36 2023 +0100 dt-bindings: display: panel: visionox,vtdr6130: add missing reg property Add missing reg property and update example to add dsi top node. Fixes: ef85db911134 ("dt-bindings: display: panel: document the Visionox VTDR6130 AMOLED DSI Panel") Acked-by: Sam Ravnborg Acked-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230207-topic-sm8550-upstream-vtdr6130-bindings-fix-v1-1-0ba2323420c5@linaro.org commit e42af72223fdd0a4eca49e1bb904856710fdd46c Author: Douglas Anderson Date: Tue Feb 7 08:12:00 2023 -0800 firmware: coreboot: Remove GOOGLE_COREBOOT_TABLE_ACPI/OF Kconfig entries Ever since commit a28aad66da8b ("firmware: coreboot: Collapse platform drivers into bus core") the Kconfig entries GOOGLE_COREBOOT_TABLE_OF and GOOGLE_COREBOOT_TABLE_ACPI have been dead. They have no "help" text and thus aren't user choosable. They also aren't "select"ed by anything. They also control the compilation of no code. Let's remove them. Fixes: a28aad66da8b ("firmware: coreboot: Collapse platform drivers into bus core") Signed-off-by: Douglas Anderson Reviewed-by: Guenter Roeck Reviewed-by: Jack Rosenthal Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20230207081130.1.I657776750156793721efa247ce6293445137bc8a@changeid Signed-off-by: Greg Kroah-Hartman commit 05165248df6552daaacf5621e3a5e2369117a8a9 Author: Hans Verkuil Date: Wed Dec 28 18:02:27 2022 +0100 media: v4l2-ctrls-api.c: move ctrl->is_new = 1 to the correct line The patch that fixed string control support somehow got mangled when it was merged in mainline: the added line ended up in the wrong place. Fix this. Fixes: 73278d483378 ("media: v4l2-ctrls-api.c: add back dropped ctrl->is_new = 1") Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 39d08ab979b7995d22dd6b3ce74d3179f02847a1 Author: Hans Verkuil Date: Wed Feb 1 13:21:36 2023 +0100 media: Revert "media: saa7146: deprecate hexium_gemini/orion, mxb and ttpci" This reverts commit e33fdb5a02490059e2f48ced2c038c8a46c6476d. The saa7146-based devices are still in use, esp. for DVB. So move these drivers back to mainline. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0fcb867718519060c90afea2d9af0a7cc1c3bd36 Author: Hans Verkuil Date: Wed Feb 1 13:19:27 2023 +0100 media: Revert "media: av7110: move to staging/media/deprecated/saa7146" This reverts commit 3e9ad662e34eb2d42ddef5a2883abd34461dfd9a. The av7110 is still in use, so it can't be deprecated. Move it back to staging/media for now. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 86bdfa267a222c85f95664208e039b94e2ac913b Author: Takashi Sakamoto Date: Thu Feb 9 09:25:48 2023 +0900 ALSA: ppc: fix unused function local variable The function local variable is not used anymore, while it is left. This commit deletes it. Fixes: 25a5a77ae0bc ("ALSA: core: Make snd_card_free() return void") Reported-by: Stephen Rothwell Link: https://lore.kernel.org/r/20230209104823.45899e76@canb.auug.org.au/ Cc: Uwe Kleine-König Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230209002548.94496-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 48075a66fca613477ac1969b576a93ef5db0164f Merge: 78e9800129de1 4c22c61e429f0 Author: Dave Airlie Date: Thu Feb 9 16:16:37 2023 +1000 Merge branch 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux into drm-next This time we've added support for reporting of GPU load via the common fdinfo format, as already supported by multiple other drivers. Improved diagnostic messages for MMU faults. And finally added experimental support for driving the VeriSilicon NPU cores, which are very close relatives to the GPU designs, so close in fact that they can run the same compute instruction set, but with a big NN-fabric/matrix/tensor execution array glued to the side. Signed-off-by: Dave Airlie From: Lucas Stach Link: https://patchwork.freedesktop.org/patch/msgid/80ceb4eedf7d88e434deeb69607d5ce0a0759581.camel@pengutronix.de commit 5131a053f2927158fb42880c69b5dc0d2e28ddee Merge: 9245b518c89fc 65db3d8b5231b Author: Jakub Kicinski Date: Wed Feb 8 21:32:19 2023 -0800 Merge tag 'linux-can-next-for-6.3-20230208' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== can-next 2023-02-08 The 1st patch is by Oliver Hartkopp and cleans up the CAN_RAW's raw_setsockopt() for CAN_RAW_FD_FRAMES. The 2nd patch is by me and fixes the compilation if CONFIG_CAN_CALC_BITTIMING is disabled. (Problem introduced in last pull request to next-next.) * tag 'linux-can-next-for-6.3-20230208' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next: can: bittiming: can_calc_bittiming(): add missing parameter to no-op function can: raw: use temp variable instead of rolling back config ==================== Link: https://lore.kernel.org/r/20230208210014.3169347-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit 9245b518c89fcc38f189a734cd0b78ba61a68d89 Merge: 3ca11619a3cb7 dca55da0a1571 Author: Jakub Kicinski Date: Wed Feb 8 21:00:54 2023 -0800 Merge tag 'mlx5-next-netdev-deadlock' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Saeed Mahameed says: ==================== mlx5-next-netdev-deadlock This series from Jiri solves a deadlock when removing a network namespace with mlx5 devlink instance being in it. The deadlock is between: 1) mlx5_ib->unregister_netdevice_notifier() AND 2) mlx5_core->devlink_reload->cleanup_net() To slove this introduced mlx5 netdev added/removed events to track uplink netdev to be used for register_netdevice_notifier_dev_net() purposes. * tag 'mlx5-next-netdev-deadlock' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux: RDMA/mlx5: Track netdev to avoid deadlock during netdev notifier unregister net/mlx5e: Propagate an internal event in case uplink netdev changes net/mlx5e: Fix trap event handling net/mlx5: Introduce CQE error syndrome ==================== Link: https://lore.kernel.org/r/20230208005626.72930-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 3ca11619a3cb7e4aa154fb5d89beb8706b5ff403 Author: Yang Li Date: Wed Feb 8 08:49:59 2023 +0800 net: libwx: Remove unneeded semicolon ./drivers/net/ethernet/wangxun/libwx/wx_lib.c:683:2-3: Unneeded semicolon Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3976 Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20230208004959.47553-1-yang.lee@linux.alibaba.com Signed-off-by: Jakub Kicinski commit f978fa41f66dadae8a4563aadcfdc6ca25691f54 Author: Yang Li Date: Wed Feb 8 09:32:27 2023 +0800 net: libwx: clean up one inconsistent indenting drivers/net/ethernet/wangxun/libwx/wx_lib.c:1835 wx_setup_all_rx_resources() warn: inconsistent indenting Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3981 Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20230208013227.111605-1-yang.lee@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 78e9800129de14f204b48cbf41f6f42c487721ff Merge: 1c0db6d84f8e0 69ed0c5d44d72 Author: Dave Airlie Date: Thu Feb 9 14:47:15 2023 +1000 Merge tag 'amd-drm-next-6.3-2023-02-03' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.3-2023-02-03: amdgpu: - PCI hotplug fixes - Allow S0ix without BIOS support - GC11 fixes - DCN 3.2.x fixes - Enable freesync over PCon - DSC fix - DCN 3.1.4 fixes - NBIO 4.3 fix - Misc code cleanups and spelling fixes - Temporarily disable S/G on DCN 2.1 and 3.1.2/3 - Fix and re-enable S/G on DCN 3.1.4 - Re-enable the AGP aperture on GMC 11.x Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230203220316.8580-1-alexander.deucher@amd.com commit dca55da0a15717dde509d17163946e951bad56c4 Author: Jiri Pirko Date: Tue Nov 1 15:36:01 2022 +0100 RDMA/mlx5: Track netdev to avoid deadlock during netdev notifier unregister When removing a network namespace with mlx5 devlink instance being in it, following callchain is performed: 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() mlx5r_remove() __mlx5_ib_remove() mlx5_ib_roce_cleanup() mlx5_remove_netdev_notifier() unregister_netdevice_notifier (takes down_write(&pernet_ops_rwsem) This deadlocks. Resolve this by converting to register_netdevice_notifier_dev_net() which does not take pernet_ops_rwsem and moves the notifier block around according to netdev it takes as arg. Use previously introduced netdev added/removed events to track uplink netdev to be used for register_netdevice_notifier_dev_net() purposes. Signed-off-by: Jiri Pirko Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit c7d4e6ab3165693342c21f6faf80d983137fee0c Author: Jiri Pirko Date: Tue Nov 1 15:27:43 2022 +0100 net/mlx5e: Propagate an internal event in case uplink netdev changes Whenever uplink netdev is set/cleared, propagate newly introduced event to inform notifier blocks netdev was added/removed. Move the set() helper to core.c from header, introduce clear() and netdev_added_event_replay() helpers. The last one is going to be called from rdma driver, so export it. Signed-off-by: Jiri Pirko Signed-off-by: Saeed Mahameed commit 3f26a315f88274361aea86c2bcd6af4bb59b1a87 Author: Jiri Pirko Date: Thu Nov 24 13:05:53 2022 +0100 net/mlx5e: Fix trap event handling Current code does not return correct return value from event handler. Fix it by returning NOTIFY_* and propagate err over newly introduce ctx structure. Signed-off-by: Jiri Pirko Signed-off-by: Saeed Mahameed commit f069ede81ef438d99e76112d8738c4dc3d1766f9 Author: Douglas Anderson Date: Tue Feb 7 16:36:10 2023 -0800 arm64: dts: qcom: sc7280: Power herobrine's 3.3 eDP/TS rail more properly This is the equivalent of commit f5b4811e8758 ("arm64: dts: qcom: sc7180: Add trogdor eDP/touchscreen regulator off-on-time") and commit 23ff866987de ("arm64: dts: qcom: sc7180: Start the trogdor eDP/touchscreen regulator on"), but for herobrine instead of trogdor. The motivations for herobrine are the same as for trogdor. NOTES: * Currently for herobrine all boards are eDP, not MIPI. If/when we have herobrine derivatives that are MIPI they we can evaluate whether the same off-on-delay makes sense for them. For trogdor we didn't add the delay to MIPI panels because the problem was found late and nobody had complained about it. For herobrine defaulting to assuming the same 500ms makes sense and if we find we need to optimize later we can. * Currently there are no oddball herobrine boards like homestar where the panel really likes to be power cycled. If we have an oddball board it will need to split the eDP and touchscreen rail anyway (like homestar did) and we'll have to delete the "regulator-boot-on" from that board. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230207163550.1.I5ff72b7746d5fca8f10ea61351bde4150ed1a7f8@changeid commit 12efdeec570c24e205484c1191265593f1dd4679 Author: Neil Armstrong Date: Tue Feb 7 11:06:58 2023 +0100 arm64: dts: qcom: pmk8550: fix PON compatible The right compatible is qcom,pmk8350-pon, it matches the reg resources associated to the node and the subnodes compatible properties. Fixes: e9c0a4e48489 ("arm64: dts: qcom: Add PMK8550 pmic dtsi") Signed-off-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230207-topic-sm8550-upstream-sm8550-dt-fix-v1-2-698d132ab285@linaro.org commit c64c1c245f667e32eb02eaa5d63363d35880664d Author: Neil Armstrong Date: Tue Feb 7 11:06:57 2023 +0100 arm64: dts: qcom: sm8550: fix DSI controller compatible Add missing sm8550 soc specific compatible before fallback to match the updated bindings. Fixes: d7da51db5b81 ("arm64: dts: qcom: sm8550: add display hardware devices") Signed-off-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230207-topic-sm8550-upstream-sm8550-dt-fix-v1-1-698d132ab285@linaro.org commit ef29188fe0b4de5c04b833378db92d3a3e0709e8 Author: Douglas Anderson Date: Mon Feb 6 18:48:16 2023 -0800 arm64: dts: qcom: sc7280: Hook up the touchscreen IO rail on evoker On older revisions of evoker, the touchscreen was either non-functional or needed special hardware magic to get it talking properly. It's been decided that the proper way going forward is to use L3C to power some buffers on the QCard and then configure the touchscreens for 1.8V. Let's do that. Note that this is safe to do even on older revs even if it might not make the touchscreen work there (because they didn't have a properly stuffed QCard). As talked about in the patch ("arm64: dts: qcom: sc7280: On QCard, regulator L3C should be 1.8V") the L3C regulator didn't go anywhere at all on older revs. This patch relies on the patch ("HID: i2c-hid: goodix: Add mainboard-vddio-supply") in order to function properly. Without that patch this one won't do any harm but it won't actually accomplish its goal. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230206184744.7.I2d960ed7f2445db0cf3d227fde985fbd740f3c4d@changeid commit d90b98f5702dccc41a5885b65361573654fcaabf Author: Douglas Anderson Date: Mon Feb 6 18:48:12 2023 -0800 arm64: dts: qcom: sc7280: Hook up the touchscreen IO rail on villager On never revs of sc7280-herobrine-villager (rev2+) the L3C rail is provided to the touchscreen as the IO voltage rail. Let's add it in the device tree. NOTE: Even though this is only really needed on rev2+ villagers (-rev0 had non-functioning touchscreen and -rev1 had some hacky hardware magic), it doesn't actually hurt to do this for old villager revs. As talked about in the patch ("arm64: dts: qcom: sc7280: On QCard, regulator L3C should be 1.8V") the L3C regulator didn't go anywhere at all on older revs. That means that turning it on for older revs doesn't hurt other than drawing a tiny bit of extra power. Since -rev0 and -rev1 villagers will never make it to real customers and it's nice not to have too many old device trees, the better tradeoff seems to be to enable it everywhere. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230206184744.3.I740d409bc5bb69bf4a7b3c4568ea6e7a92f16ccd@changeid commit 4261cea17a2f5e0ec78eb3ceebb68dddb918aee9 Author: Douglas Anderson Date: Mon Feb 6 18:48:11 2023 -0800 arm64: dts: qcom: sc7280: Add 3ms ramp to herobrine's pp3300_left_in_mlb The "pp3300_left_in_mlb" rail on herobrine eventually connects up to "vreg_edp_3p3" on the qcard. On several herobrine designs this rail has been measured to need more than 1ms to turn on. While technically a herobrine derivative (defined as anyone including the "herobrine.dtsi") could change the board to make the rail rise faster or slower, the fact that two boards (evoker and villager) both measured it as taking more than 1ms implies that it's probably going to be the norm. Thus, let's add a "regulator-enable-ramp-delay" straight into the herobrine.dtsi to handle this. If a particular derivative board needs a faster or slower one then they can override it, though that feels unlikely. While we measured something a bit over 1ms, we'll choose 3ms to give us a tiny bit of margin. This isn't a rail that turns off and on all the time anyway and 3ms is nothing compared to the total amount of time to power on a panel. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230206184744.2.I13814cefc5ab3e0a39ebd09f052e3fd25d4e8f1d@changeid commit 428df177013bad1a0a062878e3d5224122b7a5fe Author: Douglas Anderson Date: Mon Feb 6 18:48:10 2023 -0800 arm64: dts: qcom: sc7280: On QCard, regulator L3C should be 1.8V On the first sc7280 QCards the L3C rail was never really used for anything. Stuffing options on the QCard meant that the QCard itself didn't use this rail for anything. This rail did get sent to the mainboard, but no existing mainboards ever did anything with it other that route it to a testpoint. On later sc7280 QCards, the L3C rail was repurposed. Instead of being a (nominally) 3.3V rail, it was decided to make it a 1.8V rail. It is now provided to the display connector (which might route it to the touchscreen) and also used to power some buffers relating to touchscreen IO. This rail is getting the additional tag "ts_avccio", though some places still refer to it as "vreg_l3c_3p0" despite the fact that the name now specifies the wrong voltage. Since it never hurts for this rail to be 1.8V (even on old QCards / old boards), let's just change it to 1.8V across the board and add the extra "ts_avccio" moniker as a label in the device tree. Future patches will start using this rail in their touchscreens. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230206184744.1.I784f4b3d7e4a06edafff4a3129f52e749889bc05@changeid commit 9c23d6848e43c25c4fe7bded4daf75569c360631 Author: Krzysztof Kozlowski Date: Fri Feb 3 17:48:54 2023 +0100 arm64: dts: qcom: sc8280xp: correct LPASS GPIO gpio-ranges The SC8280XP LPASS pin controller has GPIOs 0-18, so correct the number of GPIOs in gpio-ranges. Fixes: c18773d162a6 ("arm64: dts: qcom: sc8280xp: add SoundWire and LPASS") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230203164854.390080-5-krzysztof.kozlowski@linaro.org commit 2866527093ddbc6356bb31f560f0b4b4decf3e2e Author: Petr Vorel Date: Fri Feb 3 11:09:52 2023 +0100 arm64: dts: qcom: msm8992-lg-bullhead: Enable regulators Enable pm8994_s1, pm8994_l{26,29,30,32} regulators. Use values from downstream kernel on bullhead rev 1.01. NOTE: downstream kernel on angler rev 1.01 differences: * pm8994_l29: regulator-min-microvolt = <2700000> * pm8994_l{20,28,31}: use regulator-boot-on Verification: [ 1.832460] s1: Bringing 0uV into 1025000-1025000uV ... [ 2.057667] l26: Bringing 0uV into 987500-987500uV ... [ 2.075722] l29: Bringing 0uV into 2800000-2800000uV [ 2.076604] l30: Bringing 0uV into 1800000-1800000uV [ 2.082431] l31: Bringing 0uV into 1262500-1262500uV [ 2.095767] l32: Bringing 0uV into 1800000-1800000uV Fixes: f3b2c99e73be ("arm64: dts: Enable onboard SDHCI on msm8992") Signed-off-by: Petr Vorel Tested-by: Jamie Douglass Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230203100952.13857-1-pvorel@suse.cz commit 272fc52431611d779de132c4e03de6e0c1199731 Author: Krzysztof Kozlowski Date: Thu Feb 2 11:44:52 2023 +0100 arm64: dts: qcom: sm6115: correct TLMM gpio-ranges Correct the number of GPIOs in TLMM pin controller. Fixes: 97e563bf5ba1 ("arm64: dts: qcom: sm6115: Add basic soc dtsi") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Iskren Chernev Acked-by: Linus Walleij Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230202104452.299048-11-krzysztof.kozlowski@linaro.org commit a4fb71497df23cb0d02d70fa2b8f8786328e325d Author: Krzysztof Kozlowski Date: Thu Feb 2 11:44:51 2023 +0100 arm64: dts: qcom: msm8953: correct TLMM gpio-ranges Correct the number of GPIOs in TLMM pin controller. Fixes: 9fb08c801923 ("arm64: dts: qcom: Add MSM8953 device tree") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Luca Weiss Acked-by: Linus Walleij Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230202104452.299048-10-krzysztof.kozlowski@linaro.org commit d44106883d74992343710f18c4aaae937c7cefab Author: Jamie Douglass Date: Thu Feb 2 16:48:19 2023 +1100 arm64: dts: qcom: msm8992-lg-bullhead: Correct memory overlaps with the SMEM and MPSS memory regions The memory region reserved by a previous commit (see fixes tag below) overlaps with the SMEM and MPSS memory regions, causing error messages in dmesg: OF: reserved mem: OVERLAP DETECTED! reserved@5000000 (0x0000000005000000--0x0000000007200000) overlaps with smem_region@6a00000 (0x0000000006a00000--0x0000000006c00000) OF: reserved mem: OVERLAP DETECTED! reserved@6c00000 (0x0000000006c00000--0x0000000007200000) overlaps with memory@7000000 (0x0000000007000000--0x000000000ca00000) This patch resolves both of these by splitting the previously reserved memory region into two sections either side of the SMEM region and by cutting off the second memory region to 0x7000000. Fixes: 22c7e1a0fa45 ("arm64: dts: msm8992-bullhead: add memory hole region") Signed-off-by: Jamie Douglass Reviewed-by: Petr Vorel Tested-by: Petr Vorel Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230202054819.16079-1-jamiemdouglass@gmail.com commit cd06d923304355762d426b030a30d99fdf765b84 Author: Krzysztof Kozlowski Date: Wed Feb 1 16:43:20 2023 +0100 arm64: dts: qcom: sm8350-hdk: correct LT9611 pin function SM8350 pin controller does not have "normal" pin function, so use "gpio". Signed-off-by: Krzysztof Kozlowski Fixes: d96d8f9192be ("arm64: dts: qcom: sm8350-hdk: Enable lt9611uxc dsi-hdmi bridge") Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230201154321.276419-2-krzysztof.kozlowski@linaro.org commit 9927f8a59f42b6c0bde9ba770ffe9d9d9bce79da Author: Krzysztof Kozlowski Date: Wed Feb 1 16:43:19 2023 +0100 arm64: dts: qcom: sm8350-hdk: align pin config node names with bindings Bindings expect pins to be named with certain pattern. Signed-off-by: Krzysztof Kozlowski Fixes: d96d8f9192be ("arm64: dts: qcom: sm8350-hdk: Enable lt9611uxc dsi-hdmi bridge") Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230201154321.276419-1-krzysztof.kozlowski@linaro.org commit 5ed2b6388b310521fdaa81cf5e075c20e9d0006c Author: Luca Weiss Date: Mon Jan 23 14:29:51 2023 +0100 arm64: dts: qcom: sm6350: Use specific qmpphy compatible The sc7180 phy compatible works fine for some cases, but it turns out sm6350 does need proper phy configuration in the driver, so use the newly added sm6350 compatible. Because the sm6350 compatible is using the new binding, we need to change the node quite a bit to match it. This fixes qmpphy init when no USB cable is plugged in during bootloader stage. Reviewed-by: Johan Hovold Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230120-sm6350-usbphy-v4-3-4d700a90ba16@fairphone.com commit 77b1278ed0caa484f84b2c4a2d184a56ababfbcd Author: Bhupesh Sharma Date: Sun Jan 22 01:34:54 2023 +0530 arm64: dts: qcom: sm6115: Add smp2p nodes Add the adsp, cdsp and modem smp2p nodes to sm6115. Signed-off-by: Bhupesh Sharma Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230121200454.1423567-1-bhupesh.sharma@linaro.org commit bd3dc67bbc34d684c7d94865bb10283508d7cd84 Author: Luca Weiss Date: Fri Jan 20 14:13:47 2023 +0100 arm64: dts: qcom: sm7225-fairphone-fp4: Enable CCI busses Enable the CCI busses that have cameras connected to them. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221213-sm6350-cci-v2-4-15c2c14c34bb@fairphone.com commit 033fb15f39b8f092bf4664144784a3e19c834f26 Author: Luca Weiss Date: Fri Jan 20 14:13:46 2023 +0100 arm64: dts: qcom: sm6350: Add CCI nodes Add nodes for the two CCI blocks found on SM6350. The first contains two i2c busses and while the second one might also contains two busses, the downstream kernel only has one configured, and some boards use the GPIOs for the potential cci1_i2c1 one other purposes, so leave that one unconfigured. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221213-sm6350-cci-v2-3-15c2c14c34bb@fairphone.com commit 4ab96c9c4012770f50f90bda2e61ef774bb63be5 Author: Luca Weiss Date: Fri Jan 20 14:13:45 2023 +0100 arm64: dts: qcom: sm6350: Add camera clock controller Add a node for the camcc found on SM6350 SoC. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221213-sm6350-cci-v2-2-15c2c14c34bb@fairphone.com commit c0cf43f63a013f9989cf4e66658836388bf80828 Merge: fc0ff3e702013 717607f1a4d1a Author: Bjorn Andersson Date: Wed Feb 8 20:09:15 2023 -0800 Merge branch '20221213152617.296426-1-konrad.dybcio@linaro.org' into HEAD Merge DT binding to gain Camera clock defines for SM6350 commit 717607f1a4d1a2e1dc0608be0242c99dcba55eaf Author: Konrad Dybcio Date: Tue Dec 13 16:26:15 2022 +0100 dt-bindings: clock: add QCOM SM6350 camera clock bindings Add device tree bindings for camera clock controller for Qualcomm Technology Inc's SM6350 SoC. Signed-off-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221213152617.296426-1-konrad.dybcio@linaro.org commit 68e8dd352adc2c279f9608eaecbe2ced2f398b48 Author: Krzysztof Kozlowski Date: Fri Jan 20 08:21:12 2023 +0100 ARM: dts: qcom: align OPP table names with DT schema DT schema expects names of operating points tables to match certain pattern: qcom-ipq4018-ap120c-ac.dtb: opp_table0: $nodename:0: 'opp_table0' does not match '^opp-table(-[a-z0-9]+)?$' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230120072113.138656-1-krzysztof.kozlowski@linaro.org commit b0bc8c893ae07acd4829a158e83902897a31a490 Author: Kathiravan T Date: Wed Feb 8 11:27:09 2023 +0530 soc: qcom: socinfo: Add IDs for IPQ5332 and its variant Add SOC ID for Qualcomm IPQ5332 and IPQ5322 variants. Signed-off-by: Kathiravan T Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230208055709.13162-3-quic_kathirav@quicinc.com commit 4ad66c3f4bcb83414181434a7d439cd80ac91a1a Author: Kathiravan T Date: Wed Feb 8 11:27:08 2023 +0530 dt-bindings: arm: qcom,ids: Add IDs for IPQ5332 and its variant Add SOC ID for Qualcomm IPQ5332 and IPQ5322 variants. Signed-off-by: Kathiravan T Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230208055709.13162-2-quic_kathirav@quicinc.com commit 3835f9a0cf56fab884d3072a991482c1f222c942 Author: Luca Weiss Date: Mon Feb 6 21:40:18 2023 +0100 ARM: dts: qcom: msm8974-oneplus-bacon: Add notification LED Add the node describing the sn3193 that's used to provide notification LED. Unfortunately the driver currently supports neither multicolor API nor using the properties function & color, so we use label instead. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230122-msm8974-bacon-features-v2-5-06bb83c20a58@z3ntu.xyz commit 44244ed2a95956b9ac1c3e6c7ffd77c88fac05bd Author: Luca Weiss Date: Mon Feb 6 21:40:17 2023 +0100 ARM: dts: qcom: msm8974-oneplus-bacon: Add backlight Add the node for the lm3630 that is used to control backlight. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230122-msm8974-bacon-features-v2-4-06bb83c20a58@z3ntu.xyz commit de0520a6e27299c6a893c01aa5bb098810ef7349 Author: Luca Weiss Date: Mon Feb 6 21:40:16 2023 +0100 ARM: dts: qcom: msm8974-oneplus-bacon: Add volume keys and hall sensor Add nodes for the volume buttons and the hall sensor that are found on the device. Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230122-msm8974-bacon-features-v2-3-06bb83c20a58@z3ntu.xyz commit b2f82484c5216af9a227a567c31fe03934e05ee4 Author: Luca Weiss Date: Mon Feb 6 21:40:15 2023 +0100 ARM: dts: qcom: msm8974-oneplus-bacon: Add vibrator Enable the pm8941 vibrator that's wired up on this device. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230122-msm8974-bacon-features-v2-2-06bb83c20a58@z3ntu.xyz commit 3d2cc00d6d4e552c9bb4a77b6155104185e8d58f Author: Luca Weiss Date: Mon Feb 6 21:40:14 2023 +0100 ARM: dts: qcom: pm8941: Add vibrator node Add the node describing the vibrator that's found on pm8941. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230122-msm8974-bacon-features-v2-1-06bb83c20a58@z3ntu.xyz commit bdd133c2eeffad142e7c8a48ab7e86e1ca37e67d Author: Dmitry Baryshkov Date: Mon Feb 6 16:57:01 2023 +0200 dt-bindings: power: qcom,rpmpd: add RPMH_REGULATOR_LEVEL_LOW_SVS_L1 Add define for another power saving state used on SM8350 for the GPU. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230206145707.122937-3-dmitry.baryshkov@linaro.org commit 7935b534d32a1823a7d5db449d340f56c201f284 Author: Dmitry Baryshkov Date: Mon Feb 6 16:57:00 2023 +0200 dt-bindings: clock: Merge qcom,gpucc-sm8350 into qcom,gpucc.yaml The GPU clock controller bindings for the Qualcomm sm8350 platform are not correct. The driver uses .fw_name instead of using indices to bind parent clocks, thus demanding the clock-names usage. With the proper clock-names in place, the bindings becomes equal to the bindings defined by qcom,gpucc.yaml, so it is impractical to keep them in a separate file. Signed-off-by: Dmitry Baryshkov Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230206145707.122937-2-dmitry.baryshkov@linaro.org commit 3bf90eca76c98c55c975fa817799789b9176f9f3 Author: Elliot Berman Date: Fri Feb 3 13:09:52 2023 -0800 firmware: qcom_scm: Move qcom_scm.h to include/linux/firmware/qcom/ Move include/linux/qcom_scm.h to include/linux/firmware/qcom/qcom_scm.h. This removes 1 of a few remaining Qualcomm-specific headers into a more approciate subdirectory under include/. Suggested-by: Bjorn Andersson Signed-off-by: Elliot Berman Reviewed-by: Guru Das Srinagesh Acked-by: Mukesh Ojha Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230203210956.3580811-1-quic_eberman@quicinc.com commit 7eadc0a01345514b89c46a916f43de62c4ccfe49 Merge: e6ebe6c123555 f7133135235db Author: Jakub Kicinski Date: Wed Feb 8 19:05:58 2023 -0800 Merge tag 'mlx5-updates-2023-02-07' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2023-02-07 1) Minor and trivial code Cleanups 2) Minor fixes for net-next 3) From Shay: dynamic FW trace strings update. * tag 'mlx5-updates-2023-02-07' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5: fw_tracer, Add support for unrecognized string net/mlx5: fw_tracer, Add support for strings DB update event net/mlx5: fw_tracer, allow 0 size string DBs net/mlx5: fw_tracer: Fix debug print net/mlx5: fs, Remove redundant assignment of size net/mlx5: fs_core, Remove redundant variable err net/mlx5: Fix memory leak in error flow of port set buffer net/mlx5e: Remove incorrect debugfs_create_dir NULL check in TLS net/mlx5e: Remove incorrect debugfs_create_dir NULL check in hairpin net/mlx5: fs, Remove redundant vport_number assignment net/mlx5e: Remove redundant code for handling vlan actions net/mlx5e: Don't listen to remove flows event net/mlx5: fw reset: Skip device ID check if PCI link up failed net/mlx5: Remove redundant health work lock mlx5: reduce stack usage in mlx5_setup_tc ==================== Link: https://lore.kernel.org/r/20230208003712.68386-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 480ba14b9a95641647a6561d5b246de661589514 Author: Johan Hovold Date: Thu Feb 2 16:54:44 2023 +0100 arm64: defconfig: enable Qualcomm SDAM nvmem driver The SDAM nvmem driver can be used to access the Shared Direct Access Memory Module registers in some Qualcomm PMICs. These registers can specifically be used to store a time offset on platforms where the PMIC RTC time registers are read-only in order to allow the RTC time to be updated. Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230202155448.6715-19-johan+linaro@kernel.org commit 8e08e2d5d7c66e4267d84d9f6bc6c4eabd820ae3 Author: Jane Jian Date: Fri Jan 13 18:53:45 2023 +0800 drm/amdgpu/smu: skip pptable init under sriov sriov does not need to init pptable from amdgpu driver we finish it from PF Signed-off-by: Jane Jian Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit e8a9c6884297a6d210b28447619a5c97cfd7fc8c Author: JesseZhang Date: Wed Feb 8 10:07:18 2023 +0800 amd/amdgpu: remove test ib on hw ring test ib function is not necessary on hw ring, so remove it. v2: squash in NULL check fix Signed-off-by: JesseZhang Acked-by: Christian König Signed-off-by: Alex Deucher commit 70f1872e3873f5c34cf02029480307f4b4cfb44f Author: Guilherme G. Piccoli Date: Thu Feb 2 10:48:56 2023 -0300 drm/amdgpu/fence: Fix oops due to non-matching drm_sched init/fini Currently amdgpu calls drm_sched_fini() from the fence driver sw fini routine - such function is expected to be called only after the respective init function - drm_sched_init() - was executed successfully. Happens that we faced a driver probe failure in the Steam Deck recently, and the function drm_sched_fini() was called even without its counter-part had been previously called, causing the following oops: amdgpu: probe of 0000:04:00.0 failed with error -110 BUG: kernel NULL pointer dereference, address: 0000000000000090 PGD 0 P4D 0 Oops: 0002 [#1] PREEMPT SMP NOPTI CPU: 0 PID: 609 Comm: systemd-udevd Not tainted 6.2.0-rc3-gpiccoli #338 Hardware name: Valve Jupiter/Jupiter, BIOS F7A0113 11/04/2022 RIP: 0010:drm_sched_fini+0x84/0xa0 [gpu_sched] [...] Call Trace: amdgpu_fence_driver_sw_fini+0xc8/0xd0 [amdgpu] amdgpu_device_fini_sw+0x2b/0x3b0 [amdgpu] amdgpu_driver_release_kms+0x16/0x30 [amdgpu] devm_drm_dev_init_release+0x49/0x70 [...] To prevent that, check if the drm_sched was properly initialized for a given ring before calling its fini counter-part. Notice ideally we'd use sched.ready for that; such field is set as the latest thing on drm_sched_init(). But amdgpu seems to "override" the meaning of such field - in the above oops for example, it was a GFX ring causing the crash, and the sched.ready field was set to true in the ring init routine, regardless of the state of the DRM scheduler. Hence, we ended-up using sched.ops as per Christian's suggestion [0], and also removed the no_scheduler check [1]. [0] https://lore.kernel.org/amd-gfx/984ee981-2906-0eaf-ccec-9f80975cb136@amd.com/ [1] https://lore.kernel.org/amd-gfx/cd0e2994-f85f-d837-609f-7056d5fb7231@amd.com/ Fixes: 067f44c8b459 ("drm/amdgpu: avoid over-handle of fence driver fini in s3 test (v2)") Suggested-by: Christian König Cc: Guchun Chen Cc: Luben Tuikov Cc: Mario Limonciello Reviewed-by: Luben Tuikov Signed-off-by: Guilherme G. Piccoli Signed-off-by: Alex Deucher commit 2291bbd74f3869fb0400a6f867e2ec6d2620b1c2 Author: Krzysztof Kozlowski Date: Thu Feb 2 11:44:50 2023 +0100 ARM: dts: qcom: sdx55: correct TLMM gpio-ranges Correct the number of GPIOs in TLMM pin controller. Signed-off-by: Krzysztof Kozlowski Acked-by: Linus Walleij Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230202104452.299048-9-krzysztof.kozlowski@linaro.org commit 63a9ab264a8c030482ab9e7e20b6c4c162299531 Author: Alex Deucher Date: Mon Feb 6 11:47:47 2023 -0500 drm/amd/pm/smu7: move variables to where they are used Move variable declarations to where they are used. Fixes a segfault on smu7 V0 structures where some tables don't exist. Cc: Evan Quan Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2388 Fixes: b1a9557a7d00 ("drm/amd/pm: fulfill powerplay peak profiling mode shader/memory clock settings") Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 833f7d4819a88f027033e0033ea44f7ae3e45a9b Author: Christophe JAILLET Date: Sun Jan 15 12:24:17 2023 +0100 scsi: ufs: core: Fix an error handling path in ufshcd_read_desc_param() If an error occurs, some memory may need to be freed, as in the other error handling paths. Before the commit in the Fixes tag, this test was done before the memory allocation, so there was no issue. Fixes: 16ed9d312b42 ("scsi: ufs: core: Remove ufshcd_map_desc_id_to_length()") Link: https://lore.kernel.org/r/2c6e42205e5ec22e5e8c7c85c6deb8fde31c74da.1673781835.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Martin K. Petersen commit 36822124f9de200cedc2f42516301b50d386a6cd Author: Mason Zhang Date: Fri Dec 16 11:25:33 2022 +0800 scsi: ufs: core: Fix device management cmd timeout flow In the UFS error handling flow, the host will send a device management cmd (NOP OUT) to the device for link recovery. If this cmd times out and clearing the doorbell fails, ufshcd_wait_for_dev_cmd() will do nothing and return. hba->dev_cmd.complete struct is not set to NULL. When this happens, if cmd has been completed by device, then we will call complete() in __ufshcd_transfer_req_compl(). Because the complete struct is allocated on the stack, the following crash will occur: ipanic_die+0x24/0x38 [mrdump] die+0x344/0x748 arm64_notify_die+0x44/0x104 do_debug_exception+0x104/0x1e0 el1_dbg+0x38/0x54 el1_sync_handler+0x40/0x88 el1_sync+0x8c/0x140 queued_spin_lock_slowpath+0x2e4/0x3c0 __ufshcd_transfer_req_compl+0x3b0/0x1164 ufshcd_trc_handler+0x15c/0x308 ufshcd_host_reset_and_restore+0x54/0x260 ufshcd_reset_and_restore+0x28c/0x57c ufshcd_err_handler+0xeb8/0x1b6c process_one_work+0x288/0x964 worker_thread+0x4bc/0xc7c kthread+0x15c/0x264 ret_from_fork+0x10/0x30 Link: https://lore.kernel.org/r/20221216032532.1280-1-mason.zhang@mediatek.com Signed-off-by: Mason Zhang Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit cb81719e3c1165ef1bc33137dc628f750eed8ea4 Author: Dmitry Baryshkov Date: Wed Feb 1 19:23:05 2023 +0200 clk: qcom: gpucc-sdm845: fix clk_dis_wait being programmed for CX GDSC The gdsc_init() function will rewrite the CLK_DIS_WAIT field while registering the GDSC (writing the value 0x2 by default). This will override the setting done in the driver's probe function. Set cx_gdsc.clk_dis_wait_val to 8 to follow the intention of the probe function. Fixes: 453361cdd757 ("clk: qcom: Add graphics clock controller driver for SDM845") Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230201172305.993146-2-dmitry.baryshkov@linaro.org commit 658c82caffa042b351f5a1b6325819297a951a04 Author: Dmitry Baryshkov Date: Wed Feb 1 19:23:04 2023 +0200 clk: qcom: gpucc-sc7180: fix clk_dis_wait being programmed for CX GDSC The gdsc_init() function will rewrite the CLK_DIS_WAIT field while registering the GDSC (writing the value 0x2 by default). This will override the setting done in the driver's probe function. Set cx_gdsc.clk_dis_wait_val to 8 to follow the intention of the probe function. Fixes: 745ff069a49c ("clk: qcom: Add graphics clock controller driver for SC7180") Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230201172305.993146-1-dmitry.baryshkov@linaro.org commit a5c5fe58da822709fe6bec8aec1fb179383e7203 Author: Bartosz Golaszewski Date: Wed Feb 1 16:20:37 2023 +0100 dt-bindings: arm: qcom: add the sa8775p-ride board Document the sa8775p SoC and its reference board: sa8775p-ride. Signed-off-by: Bartosz Golaszewski Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230201152038.203387-5-brgl@bgdev.pl commit eade820f7970c18af68591939038b4c3eb111205 Author: Niklas Cassel Date: Mon Jan 23 11:43:05 2023 +0100 MAINTAINERS: Update qcom CPR maintainer entry I do no longer have access to qcom CPR hardware, nor the documentation for said hardware. Based on past and recent activity, I propose Bjorn and Konrad as the new qcom CPR maintainers. Signed-off-by: Niklas Cassel Signed-off-by: Niklas Cassel Acked-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230123104305.44641-1-niklas.cassel@wdc.com commit 240fb292d3aeb20015d1ab3805fb561be8a9c6f5 Author: Dmitry Baryshkov Date: Sat Jan 21 11:12:37 2023 +0200 ARM: dts: qcom: apq8064: add second DSI host and PHY Add second DSI host and PHY available on the APQ8064 platform. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230121091237.2734272-1-dmitry.baryshkov@linaro.org commit e58065542e8e95351df86dd3b5ef45dd05c2aa47 Author: Krzysztof Kozlowski Date: Fri Jan 20 18:40:36 2023 +0100 ARM: dts: qcom: apq8060-dragonboard: align MPP pin node names with DT schema DT schema expects nodes ending with "pins: qcom-apq8060-dragonboard.dtb: mpps@50: cm3605-mpps-state: 'oneOf' conditional failed, one must be fixed: 'mpp5' does not match any of the regexes: '-pins$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230120174036.351937-1-krzysztof.kozlowski@linaro.org commit fc0ff3e702013c8af39f9967daaef1e565f7d165 Author: Krzysztof Kozlowski Date: Thu Jan 19 11:54:34 2023 +0100 arm64: dts: qcom: sm8350: fixup SDHCI interconnect arguments After switching interconnects to 2 cells, the SDHCI interconnects need to get one more argument. Fixes: 4f287e31ff5f ("arm64: dts: qcom: sm8350: Use 2 interconnect cells") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230119105434.51635-1-krzysztof.kozlowski@linaro.org commit 82649c7c0da431d147a75c6ae768ee42c1053f53 Author: David Gow Date: Sat Feb 4 12:04:53 2023 +0800 kunit: Add printf attribute to fail_current_test_impl Add the gnu_printf (__printf()) attribute to the kunit_fail_current_test() implementation in __kunit_fail_current_test_impl(). While it's not actually useful here, as this function is never called directly, it nevertheless was triggering -Wsuggest-attribute=format warnings, so we should add it to reduce the noise. Fixes: cc3ed2fe5c93 ("kunit: Add "hooks" to call into KUnit when it's built as a module") Reported-by: kernel test robot Signed-off-by: David Gow Reviewed-by: Rae Moar Signed-off-by: Shuah Khan commit 06744f24696e1e7598412c3df61a538b57ebec22 Author: Rong Tao Date: Wed Feb 8 09:04:41 2023 +0800 samples/bpf: Add openat2() enter/exit tracepoint to syscall_tp sample Commit fe3300897cbf("samples: bpf: fix syscall_tp due to unused syscall") added openat() syscall tracepoints. This patch adds support for openat2() as well. Signed-off-by: Rong Tao Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/tencent_9381CB1A158ED7ADD12C4406034E21A3AC07@qq.com commit 1519c0a9ab90a239c52d8a6d3e7ef78537868496 Author: Bartosz Golaszewski Date: Mon Jan 30 15:51:54 2023 +0100 dt-bindings: clock: qcom,sa8775p-gcc: add the power-domains property The binding document is missing the power-domains property. Add it and update the example. Fixes: 0fff9fa043f9 ("dt-bindings: clock: Add Qualcomm SA8775P GCC") Signed-off-by: Bartosz Golaszewski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230130145154.195562-1-brgl@bgdev.pl commit 5930196eec0d5dc454db6418d82dcfb094c93373 Author: Krzysztof Kozlowski Date: Mon Jan 23 21:18:10 2023 +0100 clk: qcom: cpu-8996: add missing cputype include Include asm/cputype.h to fix ARMv7 compile test error: drivers/clk/qcom/clk-cpu-8996.c: In function ‘qcom_cpu_clk_msm8996_acd_init’: drivers/clk/qcom/clk-cpu-8996.c:468:16: error: implicit declaration of function ‘read_cpuid_mpidr’ [-Werror=implicit-function-declaration] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio [bjorn: Moved asm-include after linux/, per Stephen's request] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230123201812.1230039-1-krzysztof.kozlowski@linaro.org commit e710abbb1740e60c9f09907cd97e1270055ecdb2 Author: Bartosz Golaszewski Date: Mon Jan 23 11:33:38 2023 +0100 clk: qcom: gcc-sa8775p: remove unused variables There are four struct definitions in the driver that aren't used so remove them. Reported-by: kernel test robot Fixes: ed432b1ed00a ("clk: qcom: add the GCC driver for sa8775p") Signed-off-by: Bartosz Golaszewski Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230123103338.230320-1-brgl@bgdev.pl commit 8bb18e6e164606dac9314349a416e52bdf3410e2 Author: Dmitry Baryshkov Date: Fri Jan 20 08:14:14 2023 +0200 clk: qcom: smd-rpm: provide RPM_SMD_XO_CLK_SRC on MSM8996 platform Extend the list of RPM clocks provided on MSM8996 platform to also include RPM_SMD_XO_CLK_SRC and RPM_SMD_XO_A_CLK_SRC. Fixes: 7066fdd0d742 ("clk: qcom: clk-smd-rpm: add msm8996 rpmclks") Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230120061417.2623751-6-dmitry.baryshkov@linaro.org commit ca574a5de59efce83d0dfb03b8c22d5600e44184 Author: Dmitry Baryshkov Date: Fri Jan 20 08:14:12 2023 +0200 clk: qcom: add msm8996 Core Bus Framework (CBF) support Add CBF clock driver as a part of MSM8996 CPU clocks. Significantly based on AngeloGioacchino del Regno's work at [1]. The CBF is an interconnect between two CPU clusters, setting it up properly is required for booting the MSM8996 with all four cores enabled. [1] https://github.com/sonyxperiadev/kernel/blob/aosp/LE.UM.2.3.2.r1.4/drivers/clk/qcom/clk-cpu-8996.c Co-developed-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov [bjorn: Dropped partially uninitialized variable "ret" from cbf_clk_notifier_cb()] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230120061417.2623751-4-dmitry.baryshkov@linaro.org commit 32fe45274edb5926abc0fac7263d9f889d02d9cf Author: Jiasheng Jiang Date: Sat Jan 28 19:08:32 2023 +0800 scsi: aic94xx: Add missing check for dma_map_single() Add check for dma_map_single() and return error if it fails in order to avoid invalid DMA address. Fixes: 2908d778ab3e ("[SCSI] aic94xx: new driver") Link: https://lore.kernel.org/r/20230128110832.6792-1-jiasheng@iscas.ac.cn Signed-off-by: Jiasheng Jiang Reviewed-by: Jason Yan Signed-off-by: Martin K. Petersen commit ead821268c14a8f87b5cb1079aed10bb16373fe8 Author: Gustavo A. R. Silva Date: Tue Feb 7 15:59:43 2023 -0600 scsi: smartpqi: 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 report_log_lun_list. This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy(). Link: https://lore.kernel.org/r/Y+LJz/r6+UeLqnV3@work Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/204 Signed-off-by: Gustavo A. R. Silva Acked-by: Don Brace Reviewed-by: Kees Cook Signed-off-by: Martin K. Petersen commit 0daef104e4b1d945ac81cb10e35c29f82695b10a Author: Richard Acayan Date: Tue Jan 31 20:00:19 2023 -0500 arm64: dts: qcom: sdm670: add interconnects The interconnects for Snapdragon 670 can be controlled. Add their corresponding nodes in the device tree. Signed-off-by: Richard Acayan Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230201010020.84586-2-mailingradian@gmail.com commit a41b617530bf07e584b18b4ec390d0e39d95c796 Author: Jianhua Lu Date: Tue Jan 31 20:35:15 2023 +0800 arm64: dts: qcom: sm8250: Add device tree for Xiaomi Mi Pad 5 Pro Add support for Xiaomi Mi Pad 5 Pro, codename is xiaomi-elish. This commit brings support for: * ADSP/CDSP/SLPI/VENUS * Backlight * Battery fuel gauge * Framebuffer * PCIe0 * USB2.0 Signed-off-by: Jianhua Lu Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230131123515.833-2-lujianhua000@gmail.com commit f1d6f9d227a0fe887d6a5cc7773425b267e4deff Author: Andrew Halaney Date: Mon Jan 30 09:48:23 2023 -0600 arm64: dts: qcom: sa8540p-ride: Document i2c busses It isn't obvious in the current devicetree what is connected. Go ahead and document what's on the other end. Signed-off-by: Andrew Halaney Reviewed-by: Eric Chanudet Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230130154823.117542-2-ahalaney@redhat.com commit f187e989305a2d57dc0f750ebb63959151b66924 Author: Andrew Halaney Date: Mon Jan 30 09:48:22 2023 -0600 arm64: dts: qcom: sa8540p-ride: Fix some i2c pinctrl settings Some of the pinctrl groups were invalid for the selected pins. Select the proper qup group to fix these warnings: [ 6.523566] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio135" for function "qup15" [ 6.535042] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio136" for function "qup15" [ 6.597536] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio158" for function "qup15" [ 6.597544] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio159" for function "qup15" [ 6.597991] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio0" for function "qup15" [ 6.597996] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio1" for function "qup15" Fixes: e073899ec3e1 ("arm64: dts: qcom: sa8540p-ride: add i2c nodes") Reviewed-by: Shazad Hussain Reviewed-by: Konrad Dybcio Reviewed-by: Brian Masney Signed-off-by: Andrew Halaney Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230130154823.117542-1-ahalaney@redhat.com commit 3a63e478b3c01b7c0eddba1121200b089bf1df12 Author: Abel Vesa Date: Fri Jan 27 15:14:41 2023 +0200 arm64: dts: qcom: sm8550: Fix the aoss_qmp node name The proper name for it is power-management. Currently, with the node name being power-controller, the bindings check fails due to the property #power-domain-cells missing. Fixes: ffc50b2d3828 ("arm64: dts: qcom: Add base SM8550 dtsi") Signed-off-by: Abel Vesa Reviewed-by: Sai Prakash Ranjan Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230127131441.1157679-1-abel.vesa@linaro.org commit c5658e52ba014cf4ab14a113c530d447a3c2c1d0 Author: Krzysztof Kozlowski Date: Fri Jan 27 13:18:43 2023 +0100 arm64: dts: qcom: sm8550-mtp: correct vdd-l5-l16-supply Fix typo in vdd-l5-l16 supply of qcom,pm8550-rpmh-regulators. Fixes: 71342fb91eae ("arm64: dts: qcom: Add base SM8550 MTP dts") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Abel Vesa Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230127121843.349738-1-krzysztof.kozlowski@linaro.org commit 88ec7fb6751e7e1d05d756c9764667aab7428044 Author: Krzysztof Kozlowski Date: Fri Jan 27 12:55:13 2023 +0100 arm64: dts: qcom: sm8550: add specific SMMU compatible Generic SMMU compatibles are not allowed alone and we expect specific one. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Abel Vesa Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230127115513.268843-1-krzysztof.kozlowski@linaro.org commit 6216007a3bcd0deab1a5695c32a141e8a4493ad9 Author: Krzysztof Kozlowski Date: Fri Jan 27 12:43:47 2023 +0100 arm64: dts: qcom: sm8450: 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: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230127114347.235963-11-krzysztof.kozlowski@linaro.org commit 0223fe2b3f46e6cfe644563ec7217d2dc7d603b6 Author: Krzysztof Kozlowski Date: Fri Jan 27 12:43:46 2023 +0100 arm64: dts: qcom: sm8350: 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: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230127114347.235963-10-krzysztof.kozlowski@linaro.org commit 537f572b2f681f48e58a26bef46611f03b33681e Author: Krzysztof Kozlowski Date: Fri Jan 27 12:43:45 2023 +0100 arm64: dts: qcom: sm8250: 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: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230127114347.235963-9-krzysztof.kozlowski@linaro.org commit 5a88bb6146b39773534b627d3431bf7d49115abd Author: Krzysztof Kozlowski Date: Fri Jan 27 12:43:44 2023 +0100 arm64: dts: qcom: sm8150: 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: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230127114347.235963-8-krzysztof.kozlowski@linaro.org commit 45e9251bdd1118cd97061aec502a5747a1cf1bd6 Author: Krzysztof Kozlowski Date: Fri Jan 27 12:43:43 2023 +0100 arm64: dts: qcom: sm7225: 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: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230127114347.235963-7-krzysztof.kozlowski@linaro.org commit 86dd19bbdea2b7d3feb69c0c39f141de30a18ec9 Author: Krzysztof Kozlowski Date: Fri Jan 27 12:43:42 2023 +0100 arm64: dts: qcom: sdm845: 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: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230127114347.235963-6-krzysztof.kozlowski@linaro.org commit 4275d2802b4bfbf06780be778538d0872e657dfd Author: Krzysztof Kozlowski Date: Fri Jan 27 12:43:41 2023 +0100 arm64: dts: qcom: sc8280xp: 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: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230127114347.235963-5-krzysztof.kozlowski@linaro.org commit adfb9d68e976c79e07cb64a87f58ea5f4d243a6d Author: Krzysztof Kozlowski Date: Fri Jan 27 12:43:40 2023 +0100 arm64: dts: qcom: sc7180: 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: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230127114347.235963-4-krzysztof.kozlowski@linaro.org commit f8e749dc7193a4b727659a69f5760a6a94ffcb1e Author: Krzysztof Kozlowski Date: Fri Jan 27 12:43:39 2023 +0100 arm64: dts: qcom: sa8295p-adp: 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: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230127114347.235963-3-krzysztof.kozlowski@linaro.org commit 1b8f9b9109790acf9c9647a721bad9ad345f0b29 Author: Amit Pundir Date: Fri Jan 27 12:03:55 2023 +0530 arm64: dts: qcom: sdm845-xiaomi-beryllium: Add reserved memory region Put cont splash memory region under the reserved-memory as confirmed by the downstream code for both Tianma and EBBG variants. Signed-off-by: Amit Pundir Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230127063355.1775246-1-amit.pundir@linaro.org commit b7b7342868560bb2be158075b4a4218997fb1c75 Author: Caleb Connolly Date: Wed Jan 25 23:18:28 2023 +0000 arm64: dts: qcom: sdm845-oneplus-*: add audio devices Populate the audio devices found on the OnePlus 6 and 6T using the sdm845-sndcard driver. Both devices have the earpiece and headphone jack connected to the WCD9341 codec. The OnePlus 6 uses the MAX98927 speaker codec which is already supported upstream. The OnePlus 6T uses a currently unsupported TFA9894 codec. Two internal microphones are supported, as well as an external headset mic. Each DAI link is expected to be used for a single device. Alsa UCM2 configs for this setup can be found here, they are not yet upstream and include support for call audio which is missing in this patch https://gitlab.com/sdm845-mainline/alsa-ucm-conf/-/tree/9ed12836b269764c4a853411d38ccb6abb70b383/ucm2/OnePlus Co-developed-by: Dylan Van Assche Signed-off-by: Dylan Van Assche Signed-off-by: Caleb Connolly Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230125231829.2621768-1-caleb.connolly@linaro.org commit 47a17dfb65a2caf4fb079102d2ad7c90c393322a Author: Krzysztof Kozlowski Date: Mon Jan 23 09:43:00 2023 +0100 arm64: dts: qcom: sdm845-audio-wcd9340: commonize clocks Clock for WCD9340 is coming from the SoC and is the same in all users, so move it to common file to reduce the code duplication (which still allows further customizations per board). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230123084300.22353-6-krzysztof.kozlowski@linaro.org commit 71c461a325e35bba0481bfacc40209c4d7189cc1 Author: Krzysztof Kozlowski Date: Mon Jan 23 09:42:59 2023 +0100 arm64: dts: qcom: sdm845-audio-wcd9340: commonize pinctrl Pin configuration fow WCD9340 is the same in all users, so move it to common file to reduce the code duplication (which still allows further customizations per board). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230123084300.22353-5-krzysztof.kozlowski@linaro.org commit 34c861737720f89593adb6a4eab1d117b602510f Author: Krzysztof Kozlowski Date: Mon Jan 23 09:42:58 2023 +0100 arm64: dts: qcom: sdm845: move codec to separate file Re-organize SDM845 audio codec into separate, audio DTSI which should be included and customized by the SDM845 boards wanting audio. The codec node is anyway not a property of the SoC, but the boards. On all others boards not using audio, keep the Slimbus node disabled as it is empty. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Caleb Connolly Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230123084300.22353-4-krzysztof.kozlowski@linaro.org commit 099f035d03d2318f5a7edb0305d178c7206fd820 Author: Krzysztof Kozlowski Date: Mon Jan 23 09:42:57 2023 +0100 arm64: dts: qcom: sdm850-lenovo-yoga: correct sound compatible There is dedicated compatible for Lenovo Yoga C630 sound card (documented in bindings and used by Linux driver), so use it along with a generic sound card fallback. The device is actually fully compatible with the generic one. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230123084300.22353-3-krzysztof.kozlowski@linaro.org commit f7c45f3d87a1a2639db67dbdbaf533e20337344e Author: Krzysztof Kozlowski Date: Mon Jan 23 09:42:56 2023 +0100 arm64: dts: qcom: sdm845-xiaomi-beryllium: add generic sound compatible Use generic sound card fallback compatible, because the device is actually fully compatible with the generic one. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230123084300.22353-2-krzysztof.kozlowski@linaro.org commit 077d29e81963b415e49216878563e933d346efa2 Author: Krzysztof Kozlowski Date: Mon Jan 23 09:42:55 2023 +0100 arm64: dts: qcom: sdm845-db845c: add generic sound compatible Use generic sound card fallback compatible, because the device is actually fully compatible with the generic one. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230123084300.22353-1-krzysztof.kozlowski@linaro.org commit 54dd96015e8d7a2a07359e2dfebf05b529d1780c Author: Tomas Henzl Date: Tue Feb 7 16:21:59 2023 +0100 scsi: mpt3sas: Fix a memory leak Add a forgotten kfree(). Fixes: dbec4c9040ed ("scsi: mpt3sas: lockless command submission") Link: https://lore.kernel.org/r/20230207152159.18627-1-thenzl@redhat.com Signed-off-by: Tomas Henzl Signed-off-by: Martin K. Petersen commit a872818f484d69944c10be555941b2a73f6e1d4f Merge: 0abe39dec0651 76fed01420bb8 Author: Jens Axboe Date: Wed Feb 8 16:59:35 2023 -0700 Merge branch 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-6.3/block Pull MD fix from Song: "This commit fixes a rare crash during the takeover process." * 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md: account io_acct_set usage with active_io commit d48a62381a73458d29393cdc3bad09b048b7b913 Author: Jiapeng Chong Date: Tue Feb 7 13:22:34 2023 +0800 scsi: qla2xxx: Remove the unused variable wwn Variable wwn is not used. Delete it. drivers/scsi/qla2xxx/qla_init.c:1657:6: warning: variable 'wwn' set but not used. Link: https://lore.kernel.org/r/20230207052234.24535-1-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Martin K. Petersen commit ba23455e5b53013347537682441098bf83b0aa18 Author: Konrad Dybcio Date: Tue Jan 24 17:46:16 2023 +0100 arm64: dts: qcom: sm8250: Disable wsamacro and swr0 by default They are not used on all boards, so disable them by default. Enable them back on MTP/RB5, which were the only current users. Signed-off-by: Konrad Dybcio Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230124164616.228619-1-konrad.dybcio@linaro.org commit fa3ba1c6a0be9f1924daa312271245cafd3f4305 Author: Krzysztof Kozlowski Date: Tue Jan 24 09:49:51 2023 +0100 arm64: dts: qcom: sm8550: drop incorrect cells from serial The serial/UART device node does not have children with unit addresses, so address/size cells are not correct. Fixes: 377972ac743f ("arm64: dts: qcom: sm8550: add I2C Master Hub nodes") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230124084951.38195-4-krzysztof.kozlowski@linaro.org commit 60d2da2c916956535cf37b7bf1ae8fefbf432e55 Author: Krzysztof Kozlowski Date: Tue Jan 24 09:49:50 2023 +0100 arm64: dts: qcom: sm8450: drop incorrect cells from serial The serial/UART device node does not have children with unit addresses, so address/size cells are not correct. Fixes: f5837418479a ("arm64: dts: qcom: sm8450: add uart20 node") Fixes: 5188049c9b36 ("arm64: dts: qcom: Add base SM8450 DTSI") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230124084951.38195-3-krzysztof.kozlowski@linaro.org commit 6027331e6eae9eb957d1b73a7e3255f4151d6163 Author: Krzysztof Kozlowski Date: Tue Jan 24 09:49:49 2023 +0100 arm64: dts: qcom: sm8350: drop incorrect cells from serial The serial/UART device node does not have children with unit addresses, so address/size cells are not correct. Fixes: cf03cd7e12bd ("arm64: dts: qcom: sm8350: Set up WRAP0 QUPs") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230124084951.38195-2-krzysztof.kozlowski@linaro.org commit f7aaaf3030d8c9873b2bb3abbe506fa4da8936cf Author: Krzysztof Kozlowski Date: Tue Jan 24 09:49:48 2023 +0100 arm64: dts: qcom: use generic node name for Bluetooth Node names should be generic (as Devicetree spec mandates), so use "bluetooth" for BT node. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230124084951.38195-1-krzysztof.kozlowski@linaro.org commit cce9c1d0b0168a08a3fe49bed6ac78731c69914c Author: Konrad Dybcio Date: Mon Jan 23 21:05:52 2023 +0100 arm64: dts: qcom: sm8450: Fix DSIn PHY compatible Use the correct compatible so that the driver can probe properly. Fixes: a6dd1206e45a ("arm64: dts: qcom: sm8450: add display hardware devices") Signed-off-by: Konrad Dybcio Tested-by: Neil Armstrong # on HDK8450 Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230123200552.553181-1-konrad.dybcio@linaro.org commit a1ab382704f59c917a497b44e7552c4f2eb4faf7 Author: Robert Marko Date: Mon Jan 23 11:16:31 2023 +0100 arm64: dts: qcom: ipq8074: add QFPROM node IPQ8074 has efuses like other Qualcomm SoC-s that are required for determining various HW quirks which will be required later for CPR etc, so lets add the QFPROM node for start. Individidual fuses will be added as they are required. Signed-off-by: Robert Marko Reviewed-by: Konrad Dybcio Reviewed-by: Kathiravan T Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230123101631.475712-2-robimarko@gmail.com commit cd649ac4059bd7221e5a1c1370db749c1c9d82f8 Author: Johan Hovold Date: Mon Jan 23 11:16:07 2023 +0100 arm64: dts: qcom: sm8550: fix USB-DP PHY resets The USB-DP PHY resets have been switched. Fixes: 7f7e5c1b037f ("arm64: dts: qcom: sm8550: Add USB PHYs and controller nodes") Signed-off-by: Johan Hovold Reviewed-by: Abel Vesa Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230123101607.2413-1-johan+linaro@kernel.org commit 6701b173956a28858e5efd234e4dc35d1727a494 Author: Dmitry Baryshkov Date: Fri Jan 20 08:14:16 2023 +0200 arm64: dts: qcom: msm8996: add CBF device entry Add device tree node for the CBF clock. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230120061417.2623751-8-dmitry.baryshkov@linaro.org commit 8ae72166c2b73b0f2ce498ea15d4feceb9fef50e Author: Dmitry Baryshkov Date: Fri Jan 20 08:14:15 2023 +0200 arm64: dts: qcom: msm8996 switch from RPM_SMD_BB_CLK1 to RPM_SMD_XO_CLK_SRC The vendor kernel uses RPM_SMD_XO_CLK_SRC clock as an CXO clock rather than using the RPM_SMD_BB_CLK1 directly. Follow this example and switch msm8996.dtsi to use RPM_SMD_XO_CLK_SRC clock instead of RPM_SMB_BB_CLK1. Fixes: 2b8c9c77c268 ("arm64: dts: qcom: msm8996: convert xo_board to RPM_SMD_BB_CLK1") Suggested-by: Konrad Dybcio Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230120061417.2623751-7-dmitry.baryshkov@linaro.org commit b62c8292d223c8e7eafb3cfd2e997cbb63d15e23 Author: Bart Van Assche Date: Thu Feb 2 14:01:42 2023 -0800 scsi: ufs: core: Fix kernel-doc syntax Fix the following kernel-doc warnings: drivers/ufs/core/ufs-mcq.c:87: warning: Function parameter or member 'hba' not described in 'ufshcd_mcq_config_mac' drivers/ufs/core/ufs-mcq.c:87: warning: Function parameter or member 'max_active_cmds' not described in 'ufshcd_mcq_config_mac' drivers/ufs/core/ufs-mcq.c:107: warning: Function parameter or member 'hba' not described in 'ufshcd_mcq_req_to_hwq' drivers/ufs/core/ufs-mcq.c:107: warning: Function parameter or member 'req' not described in 'ufshcd_mcq_req_to_hwq' drivers/ufs/core/ufs-mcq.c:128: warning: Function parameter or member 'hba' not described in 'ufshcd_mcq_decide_queue_depth' Link: https://lore.kernel.org/r/20230202220155.561115-1-bvanassche@acm.org Fixes: 854f84e7feeb ("scsi: ufs: core: mcq: Find hardware queue to queue request") Fixes: 2468da61ea09 ("scsi: ufs: core: mcq: Configure operation and runtime interface") Fixes: 7224c806876e ("scsi: ufs: core: mcq: Calculate queue depth") Cc: Asutosh Das Signed-off-by: Bart Van Assche Reviewed-by: Asutosh Das Signed-off-by: Martin K. Petersen commit 88441a8d355dcbb86aa69f82934ae1ff0fccfa83 Author: Anjana Hari Date: Thu Feb 2 21:40:45 2023 +0530 scsi: ufs: core: Add hibernation callbacks Add freeze, thaw, and restore callbacks for hibernate and restore functionality. Link: https://lore.kernel.org/r/20230202161045.3956-2-quic_ahari@quicinc.com Signed-off-by: Anjana Hari Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit b9fd335389776b7bfd7db4dfdd57c1bfe29c54e1 Author: Abel Vesa Date: Tue Feb 7 14:46:46 2023 +0100 dt-bindings: firmware: document Qualcomm SM8550 SCM Document the compatible for Qualcomm SM8550 SCM. Signed-off-by: Abel Vesa Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230207-topic-sm8550-upstream-scm-bindings-v2-1-ca12bd33fa1c@linaro.org commit ad0e4e2fab928477f74d742e6e77d79245d3d3e7 Author: Greg Kroah-Hartman Date: Thu Feb 2 15:10:09 2023 +0100 scsi: snic: Fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Link: https://lore.kernel.org/r/20230202141009.2290380-1-gregkh@linuxfoundation.org Cc: Karan Tilak Kumar Cc: Sesidhar Baddela Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Martin K. Petersen commit 339aa12218728cad1caf6de3ff7a83771aeed164 Author: Bjorn Andersson Date: Tue Jan 31 19:49:17 2023 -0800 scsi: ufs: core: Limit DMA alignment check The three DMA memory regions allocated for the host memory space are documented to require alignment of 128, 1024, and 1024 respectively, but the returned address is checked for PAGE_SIZE alignment. In the case where these allocations are serviced by e.g. the Arm SMMU, the size and alignment will be determined by its supported page sizes. In most cases SZ_4K and a few larger sizes are available. In the typical configuration this does not cause problems, but in the event that the system PAGE_SIZE is increased beyond 4k, it's no longer reasonable to expect that the allocation will be PAGE_SIZE aligned. Limit the DMA alignment check to the actual alignment requirements written in the comments in the code, to avoid the UFS core refusing to initialize with such configuration. Link: https://lore.kernel.org/r/20230201034917.1902330-1-quic_bjorande@quicinc.com Signed-off-by: Bjorn Andersson Reviewed-by: Manivannan Sadhasivam Reviewed-by: Bart Van Assche Reviewed-by: Asutosh Das Signed-off-by: Martin K. Petersen commit cf065a7da517367fd1b15295933db10631a956d7 Author: Randy Dunlap Date: Sun Jan 29 15:10:51 2023 -0800 scsi: Documentation: Correct spelling Correct spelling problems for Documentation/scsi/ as reported by codespell. Link: https://lore.kernel.org/r/20230129231053.20863-8-rdunlap@infradead.org Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Martin K. Petersen commit 685d5ef436a9a02c50e45a4e090dc669a0b38c95 Author: Randy Dunlap Date: Sun Jan 29 15:10:50 2023 -0800 scsi: Documentation: Correct spelling Correct spelling problems for Documentation/scsi/ ChangeLogs as reported by codespell. Link: https://lore.kernel.org/r/20230129231053.20863-7-rdunlap@infradead.org Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Martin K. Petersen commit c57ac5748be5023561d60954dc3cfd678671a00e Author: Randy Dunlap Date: Thu Jan 26 22:39:58 2023 -0800 scsi: target: Documentation: Correct spelling Correct spelling problems for Documentation/target/ as reported by codespell. Link: https://lore.kernel.org/r/20230127064005.1558-29-rdunlap@infradead.org Signed-off-by: Randy Dunlap Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Cc: target-devel@vger.kernel.org Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Martin K. Petersen commit 7ab734fc759828707dae22fe48b1eb4dcf70beea Author: Kees Cook Date: Fri Jan 27 16:04:13 2023 -0800 scsi: aacraid: Allocate cmd_priv with scsicmd The aac_priv() helper assumes that the private cmd area immediately follows struct scsi_cmnd. Allocate this space as part of scsicmd, else there is a risk of heap overflow. Seen with GCC 13: ../drivers/scsi/aacraid/aachba.c: In function 'aac_probe_container': ../drivers/scsi/aacraid/aachba.c:841:26: warning: array subscript 16 is outside array bounds of 'void[392]' [-Warray-bounds=] 841 | status = cmd_priv->status; | ^~ In file included from ../include/linux/resource_ext.h:11, from ../include/linux/pci.h:40, from ../drivers/scsi/aacraid/aachba.c:22: In function 'kmalloc', inlined from 'kzalloc' at ../include/linux/slab.h:720:9, inlined from 'aac_probe_container' at ../drivers/scsi/aacraid/aachba.c:821:30: ../include/linux/slab.h:580:24: note: at offset 392 into object of size 392 allocated by 'kmalloc_trace' 580 | return kmalloc_trace( | ^~~~~~~~~~~~~~ 581 | kmalloc_caches[kmalloc_type(flags)][index], | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 582 | flags, size); | ~~~~~~~~~~~~ Fixes: 76a3451b64c6 ("scsi: aacraid: Move the SCSI pointer to private command data") Link: https://lore.kernel.org/r/20230128000409.never.976-kees@kernel.org Cc: Bart Van Assche Cc: Hannes Reinecke Cc: Himanshu Madhani Cc: Adaptec OEM Raid Solutions Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Cc: stable@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Vegard Nossum Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 76fed01420bb8b0e282745a4945925b25751d42b Author: Xiao Ni Date: Fri Feb 3 13:13:44 2023 +0800 md: account io_acct_set usage with active_io io_acct_set was enabled for raid0/raid5 io accounting. bios that contain md_io_acct are allocated in the i/o path. There isn't a good method to monitor if these bios are all finished and freed. In the takeover process, io_acct_set (which is used for bios with md_io_acct) need to be freed. However, if some bios finish after io_acct_set is freed, it may trigger the following panic: [ 6973.767999] RIP: 0010:mempool_free+0x52/0x80 [ 6973.786098] Call Trace: [ 6973.786549] md_end_io_acct+0x31/0x40 [ 6973.787227] blk_update_request+0x224/0x380 [ 6973.787994] blk_mq_end_request+0x1a/0x130 [ 6973.788739] blk_complete_reqs+0x35/0x50 [ 6973.789456] __do_softirq+0xd7/0x2c8 [ 6973.790114] ? sort_range+0x20/0x20 [ 6973.790763] run_ksoftirqd+0x2a/0x40 [ 6973.791400] smpboot_thread_fn+0xb5/0x150 [ 6973.792114] kthread+0x10b/0x130 [ 6973.792724] ? set_kthread_struct+0x50/0x50 [ 6973.793491] ret_from_fork+0x1f/0x40 Fix this by increasing and decreasing active_io for each bio with md_io_acct so that mddev_suspend() will wait until all bios from io_acct_set finish before freeing io_acct_set. Reported-by: Fine Fan Signed-off-by: Xiao Ni Signed-off-by: Song Liu commit 33e4a5b5134c37f37cbba8072c609aa756a6a925 Author: Jianhua Lu Date: Tue Jan 31 20:35:14 2023 +0800 dt-bindings: arm: qcom: Add Xiaomi Mi Pad 5 Pro (xiaomi-elish) Add a compatible for Xiaomi Mi Pad 5 Pro. Signed-off-by: Jianhua Lu Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230131123515.833-1-lujianhua000@gmail.com commit ab8684b8cecf711cc9e47c1cbb1a8f4b549f8893 Author: Jon Doron Date: Tue Feb 7 10:19:16 2023 +0200 libbpf: Add sample_period to creation options Add option to set when the perf buffer should wake up, by default the perf buffer becomes signaled for every event that is being pushed to it. In case of a high throughput of events it will be more efficient to wake up only once you have X events ready to be read. So your application can wakeup once and drain the entire perf buffer. Signed-off-by: Jon Doron Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230207081916.3398417-1-arilou@gmail.com commit 78f7a3fd6dc66cb788c21d7705977ed13c879351 Author: Eric Biggers Date: Tue Feb 7 22:51:33 2023 -0800 randstruct: disable Clang 15 support The randstruct support released in Clang 15 is unsafe to use due to a bug that can cause miscompilations: "-frandomize-layout-seed inconsistently randomizes all-function-pointers structs" (https://github.com/llvm/llvm-project/issues/60349). It has been fixed on the Clang 16 release branch, so add a Clang version check. Fixes: 035f7f87b729 ("randstruct: Enable Clang support") Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers Acked-by: Nick Desaulniers Reviewed-by: Nathan Chancellor Reviewed-by: Bill Wendling Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20230208065133.220589-1-ebiggers@kernel.org commit 04ffde1319a715bd0550ded3580d4ea3bc003776 Author: Kees Cook Date: Tue Jan 31 17:37:59 2023 -0800 uaccess: Add minimum bounds check on kernel buffer size While there is logic about the difference between ksize and usize, copy_struct_from_user() didn't check the size of the destination buffer (when it was known) against ksize. Add this check so there is an upper bounds check on the possible memset() call, otherwise lower bounds checks made by callers will trigger bounds warnings under -Warray-bounds. Seen under GCC 13: In function 'copy_struct_from_user', inlined from 'iommufd_fops_ioctl' at ../drivers/iommu/iommufd/main.c:333:8: ../include/linux/fortify-string.h:59:33: warning: '__builtin_memset' offset [57, 4294967294] is out of the bounds [0, 56] of object 'buf' with type 'union ucmd_buffer' [-Warray-bounds=] 59 | #define __underlying_memset __builtin_memset | ^ ../include/linux/fortify-string.h:453:9: note: in expansion of macro '__underlying_memset' 453 | __underlying_memset(p, c, __fortify_size); \ | ^~~~~~~~~~~~~~~~~~~ ../include/linux/fortify-string.h:461:25: note: in expansion of macro '__fortify_memset_chk' 461 | #define memset(p, c, s) __fortify_memset_chk(p, c, s, \ | ^~~~~~~~~~~~~~~~~~~~ ../include/linux/uaccess.h:334:17: note: in expansion of macro 'memset' 334 | memset(dst + size, 0, rest); | ^~~~~~ ../drivers/iommu/iommufd/main.c: In function 'iommufd_fops_ioctl': ../drivers/iommu/iommufd/main.c:311:27: note: 'buf' declared here 311 | union ucmd_buffer buf; | ^~~ Cc: Christian Brauner Cc: Rasmus Villemoes Cc: Arnd Bergmann Cc: Dinh Nguyen Cc: Catalin Marinas Cc: Andrew Morton Cc: Geert Uytterhoeven Cc: Alexander Potapenko Acked-by: Aleksa Sarai Signed-off-by: Kees Cook Link: https://lore.kernel.org/lkml/20230203193523.never.667-kees@kernel.org/ commit 25b84002afb9dc9a91a7ea67166879c13ad82422 Author: Kees Cook Date: Thu Feb 2 22:07:49 2023 +0000 arm64: Support Clang UBSAN trap codes for better reporting When building with CONFIG_UBSAN_TRAP=y on arm64, Clang encodes the UBSAN check (handler) type in the esr. Extract this and actually report these traps as coming from the specific UBSAN check that tripped. Before: Internal error: BRK handler: 00000000f20003e8 [#1] PREEMPT SMP After: Internal error: UBSAN: shift out of bounds: 00000000f2005514 [#1] PREEMPT SMP Acked-by: Mark Rutland Reviewed-by: Ard Biesheuvel Acked-by: Mukesh Ojha Reviewed-by: Fangrui Song Cc: Catalin Marinas Cc: Will Deacon Cc: John Stultz Cc: Yongqin Liu Cc: Sami Tolvanen Cc: Yury Norov Cc: Andrey Konovalov Cc: Marco Elver Cc: linux-arm-kernel@lists.infradead.org Cc: llvm@lists.linux.dev Signed-off-by: Kees Cook commit 48df133578c70185a95a49390d42df1996ddba2a Author: Kees Cook Date: Fri Jan 27 14:39:21 2023 -0800 coda: Avoid partial allocation of sig_inputArgs GCC does not like having a partially allocated object, since it cannot reason about it for bounds checking when it is passed to other code. Instead, fully allocate sig_inputArgs. (Alternatively, sig_inputArgs should be defined as a struct coda_in_hdr, if it is actually not using any other part of the union.) Seen under GCC 13: ../fs/coda/upcall.c: In function 'coda_upcall': ../fs/coda/upcall.c:801:22: warning: array subscript 'union inputArgs[0]' is partly outside array bounds of 'unsigned char[20]' [-Warray-bounds=] 801 | sig_inputArgs->ih.opcode = CODA_SIGNAL; | ^~ Cc: Jan Harkes Cc: coda@cs.cmu.edu Cc: codalist@coda.cs.cmu.edu Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20230127223921.never.882-kees@kernel.org commit 67e6216d9c57bb5d404a0930e7863bf9fa3f164e Merge: 49f262bc3c7ab b8c203891121b Author: Martin K. Petersen Date: Wed Feb 8 18:06:39 2023 -0500 Merge patch series "ufs: host: ufs-qcom: Add support for SM8550" Abel Vesa says: This patchset adds UFS HC support for the new Qualcomm SM8550 SoC. Link: https://lore.kernel.org/r/20230119151406.4168685-1-abel.vesa@linaro.org Signed-off-by: Martin K. Petersen commit b8c203891121bec7d0f4d544377bceb015a3efa5 Author: Abel Vesa Date: Thu Jan 19 17:14:06 2023 +0200 scsi: ufs: qcom: dt-bindings: Add SM8550 compatible string Document the compatible string for the UFS found on SM8550. Signed-off-by: Abel Vesa Reviewed-by: Krzysztof Kozlowski Acked-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen commit 9c02aa24bf404a39ec509d9f50539056b9b128f7 Author: Abel Vesa Date: Thu Jan 19 17:14:05 2023 +0200 scsi: ufs: ufs-qcom: Clear qunipro_g4_sel for HW version major 5 On SM8550, depending on the Qunipro, we can run with G5 or G4. For now, when the major version is 5 or above, we go with G5. Therefore, we need to specifically tell UFS HC that. Signed-off-by: Abel Vesa Signed-off-by: Martin K. Petersen commit 27d71e8063d99b4429832bc52de171ace6b1e562 Author: Bartosz Golaszewski Date: Fri Jan 27 20:21:39 2023 +0100 dt-bindings: firmware: qcom,scm: add qcom,scm-sa8775p compatible Add a compatible for the sa8775p platform's Secure Channel Manager firmware interface. Signed-off-by: Bartosz Golaszewski Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230127192139.299228-1-brgl@bgdev.pl commit bbf814c98f09dc0efd06156d93c97726f3d90d2e Author: Neil Armstrong Date: Fri Jan 27 17:34:33 2023 +0100 arm64: defconfig: enable SM8450 DISPCC clock driver Build the Qualcomm SM8450 Display Clock Controller driver as a module Signed-off-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230127-topic-sm8450-upstream-defconfig-v1-1-93cf603db08b@linaro.org commit 267688c980297262d9043a5c32515b2d02bdd0aa Author: Krzysztof Kozlowski Date: Fri Jan 27 12:43:38 2023 +0100 ARM: dts: qcom-sdx65: 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: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230127114347.235963-2-krzysztof.kozlowski@linaro.org commit 81a02443f4d54511f2e1101a7e694fe0b3c7b77f Author: Krzysztof Kozlowski Date: Fri Jan 27 12:43:37 2023 +0100 ARM: dts: qcom-sdx55: 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: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230127114347.235963-1-krzysztof.kozlowski@linaro.org commit 8676ff664b0ec6de46adf1abc59b7903c6b6049c Author: Krzysztof Kozlowski Date: Fri Jan 27 10:53:19 2023 +0100 ARM: dts: qcom: use "okay" for status "okay" over "ok" is preferred: serial@f991f000: status:0: 'ok' is not one of ['okay', 'disabled', 'reserved'] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230127095319.64560-1-krzysztof.kozlowski@linaro.org commit 79802479250f4ea25b49571f982786c7ef42c43b Author: Christian Marangi Date: Tue Jan 24 15:32:36 2023 +0100 soc: qcom: socinfo: Add Soc IDs for IPQ8064 and variants Add Soc IDs table entries for Qualcomm IPQ8064 and variants. Signed-off-by: Christian Marangi Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230124143236.1038-2-ansuelsmth@gmail.com commit d615ef0c922683320d2f8e814637cf1c9b53ed44 Author: Christian Marangi Date: Tue Jan 24 15:32:35 2023 +0100 dt-bindings: arm: qcom,ids: Add Soc IDs for IPQ8064 and variants Add Soc IDs for Qualcomm IPQ8064 and variants. Signed-off-by: Christian Marangi Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230124143236.1038-1-ansuelsmth@gmail.com commit 157178a7912e00a0aa0371dc9041952c1a21d112 Author: Manivannan Sadhasivam Date: Mon Jan 23 18:49:31 2023 +0530 ARM: dts: qcom: sdx65: Add Qcom SMMU-500 as the fallback for IOMMU node SDX65 uses the Qcom version of the SMMU-500 IP. So use "qcom,smmu-500" compatible as the fallback to the SoC specific compatible. Cc: # 5.19 Fixes: 98187f7b74bf ("ARM: dts: qcom: sdx65: Enable ARM SMMU") Signed-off-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230123131931.263024-4-manivannan.sadhasivam@linaro.org commit af4ab377543853b690cc85b4c46cf976ab560dc2 Author: Manivannan Sadhasivam Date: Mon Jan 23 18:49:30 2023 +0530 ARM: dts: qcom: sdx55: Add Qcom SMMU-500 as the fallback for IOMMU node SDX55 uses the Qcom version of the SMMU-500 IP. So use "qcom,smmu-500" compatible as the fallback to the SoC specific compatible. Cc: # 5.12 Fixes: a2bdfdfba2af ("ARM: dts: qcom: sdx55: Enable ARM SMMU") Signed-off-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230123131931.263024-3-manivannan.sadhasivam@linaro.org commit 0082e2fcd71c13208fcedd75b0599ff09cb5a940 Author: Friedrich Vock Date: Thu Feb 2 17:21:03 2023 +0100 drm/amdgpu: Use the TGID for trace_amdgpu_vm_update_ptes The pid field corresponds to the result of gettid() in userspace. However, userspace cannot reliably attribute PTE events to processes with just the thread id. This patch allows userspace to easily attribute PTE update events to specific processes by comparing this field with the result of getpid(). For attributing events to specific threads, the thread id is also contained in the common fields of each trace event. Reviewed-by: Christian König Signed-off-by: Friedrich Vock Signed-off-by: Alex Deucher commit 35e67ca67635d48ce373ae51f93e4672216adc9d Author: Kent Russell Date: Mon Feb 6 12:21:42 2023 -0500 drm/amdgpu: Add unique_id support for GC 11.0.1/2 These can support unique_id, so create the sysfs file for them Signed-off-by: Kent Russell Reviewed-by: Harish Kasiviswanathan Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 7a58444090f0ef5f3b49503c66aeed81d5a7d6d9 Author: Evan Quan Date: Tue Feb 7 10:42:31 2023 +0800 drm/amd/pm: bump SMU 13.0.7 driver_if header version This can suppress the warning caused by version mismatch. Signed-off-by: Evan Quan Acked-by: Alex Deucher Acked-by: Guchun Chen Signed-off-by: Alex Deucher commit e9cfe648f1da03fafa709b1e7841427eacf9c0a6 Author: Aric Cyr Date: Fri Jan 27 22:07:13 2023 -0500 drm/amd/display: 3.2.222 This version brings along the following: - FW 0.0.153.0 - Code re-organize for dc_link.c - Bug fixes on rotation, DRR and more Acked-by: Qingqing Zhuo Signed-off-by: Aric Cyr Signed-off-by: Alex Deucher commit 3119668c0e0ac8d9ca13c56b4298c28294e2643a Author: Jingwen Zhu Date: Sat Jan 14 00:06:00 2023 +0800 drm/amd/display: avoid disable otg when dig was disabled [Why] This is a workaround for an dcn3.15 hang that happens if otg dispclk is ramped while otg is on and stream enc is off. But this w/a should not trigger when we have a dig active. [How] Avoid disable otg when dig was disabled. [Note] Reapplying commit b07bb766b6d5 ("drm/amd/display: avoid disable otg when dig was disabled") which was incorrectly reverted. Reviewed-by: Josip Pavic Acked-by: Qingqing Zhuo Signed-off-by: Jingwen Zhu Signed-off-by: Alex Deucher commit 2bce0f9bfe6aaed7de9adf3d581321c44c3f4729 Author: Evan Quan Date: Tue Jan 31 10:40:09 2023 +0800 drm/amd/pm: bump SMU 13.0.0 driver_if header version This can suppress the warning caused by version mismatch. Signed-off-by: Evan Quan Acked-by: Alex Deucher Acked-by: Guchun Chen Signed-off-by: Alex Deucher commit a22cb6fc700e3d3206f67a4fdd8b7cb9dc240bcd Author: Evan Quan Date: Fri Feb 3 15:33:59 2023 +0800 drm/amd/pm: add SMU 13.0.7 missing GetPptLimit message mapping Add missing GetPptLimit message mapping. Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 087bad7eb1f6945f8232f132953ecc2bda8bd38d Author: Arnd Bergmann Date: Mon Feb 6 20:36:02 2023 +0100 drm/amdgpu: fix enum odm_combine_mode mismatch A conversion from 'bool' to 'enum odm_combine_mode' was incomplete, and gcc warns about this with many instances of display/dc/dml/dcn20/display_mode_vba_20.c:3899:44: warning: implicit conversion from 'enum ' to 'enum odm_combine_mode' [-Wenum-conversion] 3899 | locals->ODMCombineEnablePerState[i][k] = false; Change the ones that we get a warning for, using the same numerical values to leave the behavior unchanged. Fixes: 5fc11598166d ("drm/amd/display: expand dml structs") Link: https://lore.kernel.org/all/20201026210039.3884312-3-arnd@kernel.org/ Link: https://lore.kernel.org/all/20210927100659.1431744-1-arnd@kernel.org/ Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit 93b1a791c0a09311b61c0f7ed8c5332f7bff3f38 Author: Randy Dunlap Date: Fri Feb 3 19:27:35 2023 -0800 drm/amd/amdgpu: add complete header search path The path for the "mod_info_packet.h" header file is incomplete, so add its location to the header search path in the amdgpu Makefile. See on ARCH=alpha (275 times in one build). In file included from ../drivers/gpu/drm/amd/amdgpu/amdgpu.h:90, from ../drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:43: ../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.h:62:10: fatal error: mod_info_packet.h: No such file or directory 62 | #include "mod_info_packet.h" | ^~~~~~~~~~~~~~~~~~~ compilation terminated. Fixes: 5b49da02ddbe ("drm/amd/display: Enable Freesync over PCon") Signed-off-by: Randy Dunlap Cc: Signed-off-by: Sung Joon Kim Cc: Alex Deucher Cc: Christian König Cc: "Pan, Xinhui" Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Alex Deucher commit 56c121dcd539e8af365525e4d496d63ed2f156e1 Author: Dmitry Baryshkov Date: Fri Jan 20 08:14:10 2023 +0200 dt-bindings: clock: qcom,msm8996-cbf: Describe the MSM8996 CBF clock controller MSM8996 Core Bus Fabric (CBF) clock controller clocks an interconnect between two CPU clusters. The CBF clock should follow the CPU frequencies to provide enough bandwidth between clusters. Thus a single driver implements both a clock and an interconnect to set the clock rate. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230120061417.2623751-2-dmitry.baryshkov@linaro.org commit 2c496a6cf44dc5ac57ff913dac20b19d0b8898ad Author: Kent Russell Date: Mon Feb 6 12:14:09 2023 -0500 drm/amdgpu: Fix incorrect filenames in sysfs comments This looks like a standard copy/paste mistake. Replace the incorrect serial_number references with product_name and product_model Signed-off-by: Kent Russell Reviewed-by: Harish Kasiviswanathan Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 027726365906fc863265635e545d063a45807fe8 Author: Dmitry Baryshkov Date: Fri Jan 27 01:03:19 2023 +0200 clk: qcom: add the driver for the MSM8996 APCS clocks Add a simple driver handling the APCS clocks on MSM8996. For now it supports just a single aux clock, linking GPLL0 to CPU and CBF clocks. Note, there is little sense in registering sys_apcs_aux as a child of gpll0. The PLL is always-on. And listing the gpll0 as a property of the apcs would delay its probing until the GCC has been probed (while we would like for the apcs to be probed as early as possible). Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio [bjorn: Fixed spelling of register, per Stephen's feedback] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230126230319.3977109-8-dmitry.baryshkov@linaro.org commit bc72f13e4456afa34ccbd1dfc61aaea18f877b88 Author: Dmitry Baryshkov Date: Thu Jan 19 16:43:26 2023 +0200 arm64: dts: qcom: msm8996: enable UFS interconnects Specify interconnects to be used by the UFS host controller. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230119144326.2492847-3-dmitry.baryshkov@linaro.org commit f1a359db6d9d198b84877e2340dd7c37809a4882 Author: Dmitry Baryshkov Date: Thu Jan 19 15:22:19 2023 +0200 ARM: dts: qcom: apq8064: use hdmi_phy for the MMCC's hdmipll clock Link hdmi_phy as a clock provider of "hdmipll" clock to the MMCC. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230119132219.2479775-7-dmitry.baryshkov@linaro.org commit c9f678afe0bbdfb3748c1db5ac94d1c02a6eb64b Author: Dmitry Baryshkov Date: Thu Jan 19 15:22:18 2023 +0200 ARM: dts: qcom: apq8064: add #clock-cells to the HDMI PHY node Add #clock-cells property to the HDMI PHY device node to let other nodes resolve the hdmipll clock. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230119132219.2479775-6-dmitry.baryshkov@linaro.org commit 7b54d92a9c85b1c57b1b977f262b6b0e2497efd2 Author: Bhupesh Sharma Date: Thu Jan 19 18:02:00 2023 +0530 arm64: dts: qcom: sm6115: Add watchdog node to dtsi Add watchdog node in Qualcomm sm6115 SoC dtsi. Signed-off-by: Bhupesh Sharma Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230119123200.1021735-1-bhupesh.sharma@linaro.org commit a8ce63441a2ea49606f3b0239df98c5fb0a3b4d2 Author: Krzysztof Kozlowski Date: Thu Jan 19 13:22:05 2023 +0100 arm64: dts: qcom: sc7280-idp: drop incorrect properties The sound card does not expose DAIs and does not use custom qcom properties, so drop '#sound-dai-cells', 'qcom,msm-mbhc-gnd-swh' and 'qcom,msm-mbhc-hphl-swh': sc7280-idp.dtb: sound: '#sound-dai-cells', 'qcom,msm-mbhc-gnd-swh', 'qcom,msm-mbhc-hphl-swh' do not match any of the regexes: '^dai-link@[0-9a-f]$', 'pinctrl-[0-9]+' Reported-by: Srinivasa Rao Mandadapu Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230119122205.73372-2-krzysztof.kozlowski@linaro.org commit a1efba3362fe8acfc3dbd79f0903968186e249b0 Author: Krzysztof Kozlowski Date: Thu Jan 19 13:22:04 2023 +0100 arm64: dts: qcom: sc7280-herobrine-audio-wcd9385: drop incorrect properties The sound card does not expose DAIs and does not use custom qcom properties, so drop '#sound-dai-cells', 'qcom,msm-mbhc-gnd-swh' and 'qcom,msm-mbhc-hphl-swh': sc7280-herobrine-crd.dtb: sound: '#sound-dai-cells', 'qcom,msm-mbhc-gnd-swh', 'qcom,msm-mbhc-hphl-swh' do not match any of the regexes: '^dai-link@[0-9a-f]$', 'pinctrl-[0-9]+' Reported-by: Srinivasa Rao Mandadapu Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230119122205.73372-1-krzysztof.kozlowski@linaro.org commit 70d1e09ebf192fdaf7e62a878842a73ba3a87170 Author: Konrad Dybcio Date: Thu Jan 19 11:16:44 2023 +0100 arm64: dts: qcom: sm6115: Use 64 bit addressing SM6115's SMMU uses 36bit VAs, which is a good indicator that we should increase (dma-)ranges - and by extension #address- and #size-cells to prevent things from getting lost in translation (both literally and figuratively). Do so. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230119101644.10711-2-konrad.dybcio@linaro.org commit 5dbfcd25a02080298ca7c5cf4c3bacaf80b52f90 Author: Melissa Wen Date: Tue Jan 31 15:05:46 2023 -0100 drm/amd/display: fix cursor offset on rotation 180 Cursor gets clipped off in the middle of the screen with hw rotation 180. Fix a miscalculation of cursor offset when it's placed near the edges in the pipe split case. Cursor bugs with hw rotation were reported on AMD issue tracker: https://gitlab.freedesktop.org/drm/amd/-/issues/2247 The issues on rotation 270 was fixed by: https://lore.kernel.org/amd-gfx/20221118125935.4013669-22-Brian.Chang@amd.com/ that partially addressed the rotation 180 too. So, this patch is the final bits for rotation 180. Reported-by: Xaver Hugl Reviewed-by: Harry Wentland Fixes: 9d84c7ef8a87 ("drm/amd/display: Correct cursor position on horizontal mirror") Signed-off-by: Melissa Wen Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 826e7ffaf079c72607bf3199d4e19730eaf8ca00 Author: Anthony Koo Date: Fri Jan 27 11:55:49 2023 -0500 drm/amd/display: [FW Promotion] Release 0.0.153.0 [Why&How] - Reduce reserved size from 9 to 8 dwords to reduce structure size and allow the union dmub_rb_cmd to fit into max 64-bytes cmd size Reviewed-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Anthony Koo Signed-off-by: Alex Deucher commit 942edb737e11b9293068bb56232c08ee2a99df93 Author: Hans de Goede Date: Mon Jun 20 11:43:35 2022 +0200 drm/amd/display: Drop CONFIG_BACKLIGHT_CLASS_DEVICE ifdefs Remove CONFI_BACKLIGHT_CLASS_DEVICE ifdef that was accidently introduced back. Reviewed-by: Hamza Mahfooz Acked-by: Qingqing Zhuo Signed-off-by: Hans de Goede Signed-off-by: Alex Deucher commit 54618888d1ea7a26f8bccfb89e3c2420350c8047 Author: Wenjing Liu Date: Wed Jan 18 17:31:24 2023 -0500 drm/amd/display: break down dc_link.c [why] dc_link contains over 30k line of code, the decision is to break it down to files residing in link folder based on functionality. This change is the last break down change which will remove dc_link.c file after everything is broken down. [how] Move remaining dc_link.c functions into link_detection, link_dpms, link_validation, link_resource, and link_fpga and remove dc_link. Reviewed-by: George Shen Acked-by: Qingqing Zhuo Signed-off-by: Wenjing Liu Signed-off-by: Alex Deucher commit 71d7e8904d540dde6eaae4e3bac9cfd1894f4eaa Author: Leo (Hanghong) Ma Date: Wed Jan 18 13:59:42 2023 -0500 drm/amd/display: Add HDMI manufacturer OUI and device id read [Why && How] Add support to read manufacturer OUI and device id from HDMI SCDC. Reviewed-by: Wenjing Liu Acked-by: Qingqing Zhuo Signed-off-by: Leo (Hanghong) Ma Signed-off-by: Alex Deucher commit af23aee9e9ba3cfe8693928323bf8e06296076d6 Author: Aurabindo Pillai Date: Mon Jan 23 13:44:24 2023 -0500 drm/amd/display: Fix null pointer deref error on rotation [Why&How] Fix the null pointer dererefence error when rotating the monitor on a DCN32 variant, which causes a call trace like: [ 42.469548] RIP: 0010:dcn20_program_front_end_for_ctx.cold+0x68/0x435 [amdgpu] [ 42.477140] Code: c1 4c 01 e8 48 8b b0 f0 01 00 00 e8 b6 1c 4c f9 42 f6 84 2b a0 0a 00 00 02 74 30 4d 03 ac 24 68 04 00 00 49 8b 85 f0 01 00 00 <83> b8 50 06 00 00 02 75 18 49 8b bd e0 02 00 00 48 8b 07 48 8b 40 [ 42.496225] RSP: 0018:ffffaf744326f6a0 EFLAGS: 00010282 [ 42.501539] RAX: 0000000000000000 RBX: ffff948765180000 RCX: 0000000000000000 [ 42.508797] RDX: 0000000000000000 RSI: ffffffffbaea5329 RDI: 00000000ffffffff [ 42.516055] RBP: ffff948701674400 R08: 0000000000000000 R09: ffffaf744326f538 [ 42.523312] R10: 0000000000000003 R11: ffff948a1d33ffe8 R12: ffff948708700000 [ 42.530569] R13: ffff94876e901180 R14: 0000000000000002 R15: 0000000000000001 [ 42.537825] FS: 00007f1c7c04a5c0(0000) GS:ffff948a05a80000(0000) knlGS:0000000000000000 [ 42.546055] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 42.551898] CR2: 0000000000000650 CR3: 0000000127dd6000 CR4: 00000000003506e0 [ 42.559155] Call Trace: [ 42.561645] [ 42.563782] commit_planes_for_stream+0x8b1/0x1410 [amdgpu 2059945d14fb66c82032430b723fcb84d8250d46] [ 42.573298] dc_update_planes_and_stream+0x3f9/0x9f0 [amdgpu 2059945d14fb66c82032430b723fcb84d8250d46] [ 42.582986] amdgpu_dm_atomic_commit_tail+0x19be/0x3270 [amdgpu 2059945d14fb66c82032430b723fcb84d8250d46] [ 42.592944] ? vsnprintf+0x35e/0x550 [ 42.596593] commit_tail+0x94/0x130 [ 42.600146] drm_atomic_helper_commit+0x112/0x140 [ 42.604931] drm_atomic_commit+0x96/0xc0 [ 42.608922] ? drm_plane_get_damage_clips.cold+0x1c/0x1c [ 42.614326] drm_mode_atomic_ioctl+0x97b/0xb90 [ 42.618848] ? drm_atomic_set_property+0xb40/0xb40 [ 42.623633] drm_ioctl_kernel+0xc9/0x170 [ 42.627694] drm_ioctl+0x22f/0x410 [ 42.631157] ? drm_atomic_set_property+0xb40/0xb40 [ 42.636031] amdgpu_drm_ioctl+0x4a/0x80 [amdgpu 2059945d14fb66c82032430b723fcb84d8250d46] [ 42.644537] __x64_sys_ioctl+0x90/0xd0 [ 42.648355] do_syscall_64+0x5b/0x80 [ 42.651992] ? do_syscall_64+0x67/0x80 [ 42.655808] ? exit_to_user_mode_prepare+0x1e/0x140 [ 42.660773] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 42.665913] RIP: 0033:0x7f1c7f31aaff [ 42.669550] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <41> 89 c0 3d 00 f0 ff ff 77 1f 48 8b 44 24 18 64 48 2b 04 25 28 00 [ 42.688635] RSP: 002b:00007fff29eca1a0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 42.696334] RAX: ffffffffffffffda RBX: 00007fff29eca250 RCX: 00007f1c7f31aaff [ 42.703591] RDX: 00007fff29eca250 RSI: 00000000c03864bc RDI: 0000000000000009 [ 42.710848] RBP: 00000000c03864bc R08: 000000000000000e R09: 000000000000000e [ 42.718104] R10: 0000000000000007 R11: 0000000000000246 R12: 00005643f0991d70 [ 42.725361] R13: 0000000000000009 R14: 00005643f22d0c50 R15: 00005643f0a74550 [ 42.732621] Reviewed-by: Samson Tam Acked-by: Qingqing Zhuo Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 8f0d304d21b351d65e8c434c5399a40231876ba1 Author: Wesley Chalmers Date: Fri Nov 4 15:19:22 2022 -0400 drm/amd/display: Do not commit pipe when updating DRR [WHY] DRR and Pipe cannot be updated on the same frame, or else underflow will occur. Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Wesley Chalmers Signed-off-by: Alex Deucher commit 4f1b5e739dfd1edde33329e3f376733a131fb1ff 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] Defer all DPP adjustment requests till optimized_required is false. Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Wesley Chalmers Signed-off-by: Alex Deucher commit 642f1b405255ec5574eb20a3f72e29676b94679c Author: Hamza Mahfooz Date: Fri Feb 3 10:04:11 2023 -0500 drm/amd/display: fix read errors pertaining to dp_lttpr_status_show() Currently, it is likely that we will read the relevant LTTPR caps after link training has completed (which can cause garbage data to be read), however according to the DP 2.0 spec that should be done before link training has commenced. So, instead of reading the registers on demand, use the values provided to us by DC. Reviewed-by: Aurabindo Pillai Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit ad1cebb6f0fbc2a1e8ea0c7a70d658732bc6f2cd Author: Kenneth Feng Date: Fri Feb 3 14:19:37 2023 +0800 drm/amd/amdgpu: enable athub cg 11.0.3 enable athub cg on gc 11.0.3 Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 2f52e87499dd1644bc3ef6d5e8f817c0285aca4e Author: Konrad Dybcio Date: Thu Jan 19 11:16:43 2023 +0100 arm64: dts: qcom: sm6115: Add mdss_ prefix to mdss nodes Add a mdss_ prefix to mdss nodes to keep them all near each other when referencing them by label in device DTs. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230119101644.10711-1-konrad.dybcio@linaro.org commit 6739f57dea1657d410f267c05349b1d2d90771f0 Author: Christian Marangi Date: Tue Jan 17 23:44:17 2023 +0100 ARM: dts: qcom: ipq8064: move reg-less nodes outside soc node Move node that doesn't have a reg outside the soc node as it should only contain reg nodes. No changes intended. Signed-off-by: Christian Marangi Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117224417.7530-1-ansuelsmth@gmail.com commit faf69431464b95a99d74c29cf93497ab64a00ec8 Author: Yang Xiwen Date: Sat Jan 14 14:38:46 2023 +0800 arm64: dts: qcom: msm8916-thwc: Add initial device trees This commit adds support for the ufi-001C and uf896 WiFi/LTE dongle made by Tong Heng Wei Chuang based on MSM8916. uf896 is another variant for the usb stick. The board design differs by using different gpios for the keys and leds. 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 Co-developed-by: Jaime Breva Signed-off-by: Jaime Breva Co-developed-by: Nikita Travkin Signed-off-by: Nikita Travkin Signed-off-by: Yang Xiwen Signed-off-by: Bjorn Andersson commit a91dca40c5340e206623f114862e1f4efb2bd339 Author: Yang Xiwen Date: Sat Jan 14 14:38:45 2023 +0800 dt-bindings: qcom: Document msm8916-thwc-uf896 and ufi001c Document the new thwc,uf896/ufi001c device tree bindings used in their device trees. Signed-off-by: Yang Xiwen Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson commit 4a7257f0a7a4b33bc53075497e305b8988e257d3 Author: Yang Xiwen Date: Sat Jan 14 14:38:44 2023 +0800 dt-bindings: vendor-prefixes: add thwc Shenzhen Tong Heng Wei Chuang Technology Co., Ltd. (hereinafter referred to as "Tong Heng Wei Chuang") is a focus on wireless communications equipment brand manufacturers. Link: http://www.szthwc.com/en/about.html Signed-off-by: Yang Xiwen Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson commit 789538c61fc11dbe8b6456cfb365d52156a7b133 Author: Rae Moar Date: Wed Jan 25 22:54:49 2023 +0000 lib/hashtable_test.c: add test for the hashtable structure Add a KUnit test for the kernel hashtable implementation in include/linux/hashtable.h. Note that this version does not yet test each of the rcu alternative versions of functions. Signed-off-by: Rae Moar Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 9ecc9cdd168e217a42b382468643dde66dfac309 Author: Sadiya Kazi Date: Tue Jan 31 14:46:41 2023 +0800 Documentation: Add Function Redirection API docs Added a new page (functionredirection.rst) that describes the Function Redirection (static stubbing) API. This page will be expanded if we add, for example, ftrace-based stubbing. In addition, 1. Updated the api/index.rst page to create an entry for function redirection api 2. Updated the toctree to be hidden, reducing redundancy on the generated page. Signed-off-by: Sadiya Kazi Co-developed-by: Daniel Latypov Signed-off-by: Daniel Latypov Co-developed-by: David Gow Signed-off-by: David Gow Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit e047c5eaa76324575e1f95664be4c74ce0e2571b Author: David Gow Date: Tue Jan 31 14:46:40 2023 +0800 kunit: Expose 'static stub' API to redirect functions Add a simple way of redirecting calls to functions by including a special prologue in the "real" function which checks to see if the replacement function should be called (and, if so, calls it). To redirect calls to a function, make the first (non-declaration) line of the function: KUNIT_STATIC_STUB_REDIRECT(function_name, [function arguments]); (This will compile away to nothing if KUnit is not enabled, otherwise it will check if a redirection is active, call the replacement function, and return. This check is protected by a static branch, so has very little overhead when there are no KUnit tests running.) Calls to the real function can be redirected to a replacement using: kunit_activate_static_stub(test, real_fn, replacement_fn); The redirection will only affect calls made from within the kthread of the current test, and will be automatically disabled when the test completes. It can also be manually disabled with kunit_deactivate_static_stub(). The 'example' KUnit test suite has a more complete example. Co-developed-by: Daniel Latypov Signed-off-by: Daniel Latypov Signed-off-by: David Gow Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 7170b7ed6acbde523c5d362c8978c60df4c30f30 Author: David Gow Date: Sat Jan 28 15:10:07 2023 +0800 kunit: Add "hooks" to call into KUnit when it's built as a module KUnit has several macros and functions intended for use from non-test code. These hooks, currently the kunit_get_current_test() and kunit_fail_current_test() macros, didn't work when CONFIG_KUNIT=m. In order to support this case, the required functions and static data need to be available unconditionally, even when KUnit itself is not built-in. The new 'hooks.c' file is therefore always included, and has both the static key required for kunit_get_current_test(), and a table of function pointers in struct kunit_hooks_table. This is filled in with the real implementations by kunit_install_hooks(), which is kept in hooks-impl.h and called when the kunit module is loaded. This can be extended for future features which require similar "hook" behaviour, such as static stubs, by simply adding new entries to the struct, and the appropriate code to set them. Fixed white-space errors during commit: Shuah Khan Resolved merge conflicts with: db105c37a4d6 ("kunit: Export kunit_running()") This patch supersedes the above. Shuah Khan Signed-off-by: David Gow Reviewed-by: Rae Moar Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 2dc9d6ca52a47fd00822e818c2a5e48fc5fbbd53 Author: Alexander Pantyukhin Date: Sun Jan 22 02:27:17 2023 +0500 kunit: kunit.py extract handlers The main function contains a wide if-elif block that handles different subcommands. It's possible to make code refactoring to extract subcommands handlers. Fixed commit summary line. Shuah Khan Signed-off-by: Alexander Pantyukhin Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 1fdc6f4f274748f43ebb93eeaaa23c3c69f9c3a5 Author: Alexander Pantyukhin Date: Wed Jan 18 12:42:19 2023 +0500 tools/testing/kunit/kunit.py: remove redundant double check The build_tests function contained double checking for not success result. It is fixed in the current patch. Additional small simplifications of code like using ternary if were applied (avoid using the same operation by calculation times differ in two places). Signed-off-by: Alexander Pantyukhin Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 25aab0b852d63784586ed99148d9af37a820a0c8 Author: Bhupesh Sharma Date: Wed Feb 8 17:57:18 2023 +0530 arm64: dts: qcom: sm6115: Add geni debug uart node for qup0 qup0 on sm6115 / sm4250 has 6 SEs, with SE4 as debug uart. Add the debug uart node in sm6115 dtsi file. Cc: Bjorn Andersson Cc: Rob Herring Signed-off-by: Bhupesh Sharma Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230208122718.338545-1-bhupesh.sharma@linaro.org commit e5b832386ffce4cf1510ac33e225a206284e234c Author: Arnd Bergmann Date: Fri Jan 13 23:47:22 2023 +0100 ARM: pxa: restore mfp-pxa320.h This file was removed in an earlier commit but is actually still needed, so restore it. Reported-by: Randy Dunlap Fixes: d6df7df7ae5a ("ARM: pxa: remove unused board files") Signed-off-by: Arnd Bergmann commit 65db3d8b5231bd430c12150258125aca155aea97 Author: Marc Kleine-Budde Date: Tue Feb 7 21:15:01 2023 +0100 can: bittiming: can_calc_bittiming(): add missing parameter to no-op function In commit 286c0e09e8e0 ("can: bittiming: can_changelink() pass extack down callstack") a new parameter was added to can_calc_bittiming(), however the static inline no-op (which is used if CONFIG_CAN_CALC_BITTIMING is disabled) wasn't converted. Add the new parameter to the static inline no-op of can_calc_bittiming(). Fixes: 286c0e09e8e0 ("can: bittiming: can_changelink() pass extack down callstack") Reported-by: kernel test robot Link: https://lore.kernel.org/20230207201734.2905618-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit f2f527d595963aa86464ca3e05ec27dd5153d56e Author: Oliver Hartkopp Date: Fri Feb 3 10:08:07 2023 +0100 can: raw: use temp variable instead of rolling back config Introduce a temporary variable to check for an invalid configuration attempt from user space. Before this patch the value was copied to the real config variable and rolled back in the case of an error. Suggested-by: Marc Kleine-Budde Signed-off-by: Oliver Hartkopp Link: https://lore.kernel.org/all/20230203090807.97100-1-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde commit c404f5d4f0993e9d75a4de5a91280e9cb2419281 Author: Jonathan Corbet Date: Thu Jan 19 17:03:05 2023 -0700 docs: Add more information to the HTML sidebar Add a new sidebar template that creates a more RTD-like "fisheye" view of the current place in the document hierarchy. It is far from ideal, but some readers may find it better for navigating through the documentation as a whole. Add some CSS trickery as well to make the table of contents less intrusive when viewing the pages on a small screen. Reviewed-by: Akira Yokosawa Reviewed-by: David Gow commit b0d8a67715dae445c065c83a40a581d6563a341f Author: Colin Ian King Date: Tue Feb 7 09:14:43 2023 +0000 platform/chrome: cros_ec_typec: Fix spelling mistake There is a spelling mistake in a dev_warn message, make it lower case and fix the spelling. Signed-off-by: Colin Ian King Reviewed-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230207091443.143995-1-colin.i.king@gmail.com Signed-off-by: Prashant Malani [pmalani fixed up commit message based on tzungbi comment] commit 9b0651e429a04b58c29f2133da4ccc70f81263b8 Author: Lorenzo Bianconi Date: Wed Feb 8 17:58:40 2023 +0100 sfc: move xdp_features configuration in efx_pci_probe_post_io() Move xdp_features configuration from efx_pci_probe() to efx_pci_probe_post_io() since it is where all the other basic netdev features are initialised. Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/9bd31c9a29bcf406ab90a249a28fc328e5578fd1.1675875404.git.lorenzo@kernel.org Signed-off-by: Martin KaFai Lau commit d00d5b82f0734205c718aa1acf7cc9b183fd6751 Author: Dave Thaler Date: Fri Jan 27 01:47:06 2023 +0000 bpf, docs: Add note about type convention Add explanation about use of "u64", "u32", etc. as the type convention used in BPF documentation. Signed-off-by: Dave Thaler Acked-by: David Vernet Link: https://lore.kernel.org/r/20230127014706.1005-1-dthaler1968@googlemail.com Signed-off-by: Alexei Starovoitov commit 27b53b7364e3e925703f3b9e6837ac28b95752bc Author: Toke Høiland-Jørgensen Date: Wed Feb 8 17:41:43 2023 +0100 bpf/docs: Update design QA to be consistent with kfunc lifecycle docs Cong pointed out that there are some inconsistencies between the BPF design QA and the lifecycle expectations documentation we added for kfuncs. Let's update the QA file to be consistent with the kfunc docs, and add references where it makes sense. Also document that modules may export kfuncs now. v3: - Grammar nit + ack from David v2: - Fix repeated word (s/defined defined/defined/) Reported-by: Cong Wang Acked-by: David Vernet Signed-off-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20230208164143.286392-1-toke@redhat.com Signed-off-by: Alexei Starovoitov commit f5451547b8310868f5b5acff7cd4aa7c0267edb3 Author: Thomas Gleixner Date: Tue Feb 7 15:16:53 2023 +0100 mm, slab/slub: Ensure kmem_cache_alloc_bulk() is available early The memory allocators are available during early boot even in the phase where interrupts are disabled and scheduling is not yet possible. The setup is so that GFP_KERNEL allocations work in this phase without causing might_alloc() splats to be emitted because the system state is SYSTEM_BOOTING at that point which prevents the warnings to trigger. Most allocation/free functions use local_irq_save()/restore() or a lock variant of that. But kmem_cache_alloc_bulk() and kmem_cache_free_bulk() use local_[lock]_irq_disable()/enable(), which leads to a lockdep warning when interrupts are enabled during the early boot phase. This went unnoticed so far as there are no early users of these interfaces. The upcoming conversion of the interrupt descriptor store from radix_tree to maple_tree triggered this warning as maple_tree uses the bulk interface. Cure this by moving the kmem_cache_alloc/free() bulk variants of SLUB and SLAB to local[_lock]_irq_save()/restore(). There is obviously no reclaim possible and required at this point so there is no need to expand this coverage further. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 221aa03fb4e0740b1f4d9ecbf3d9af9fd9f7f85e Author: Youquan Song Date: Mon Feb 6 09:14:23 2023 +0800 EDAC/i10nm: Add driver decoder for Sapphire Rapids server Intel SDM (December 2022) vol3B 17.13.2 contains IMC MC error codes for Sapphire Rapids. Current i10nm_edac only supports firmware decoder (ACPI DSM methods) for Sapphire Rapids. So add the driver decoder (decoding DDR memory errors via extracting error information from the IMC MC error codes) for Sapphire Rapids for better decoding performance. Co-developed-by: Qiuxu Zhuo Signed-off-by: Qiuxu Zhuo Signed-off-by: Youquan Song Signed-off-by: Tony Luck commit 65f0a8ea90d2fc2e79a616143f844047e25057c8 Author: Jerome Brunet Date: Wed Feb 8 10:35:19 2023 +0100 ASoC: dt-bindings: meson: convert axg sound card control to schema Convert the DT binding documentation for the Amlogic axg sound card to schema. Signed-off-by: Jerome Brunet Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230208093520.52843-2-jbrunet@baylibre.com Signed-off-by: Mark Brown commit 1ec033f00ceb9c7ccd6a7f42f6d617021d5c8c5e Merge: 6c83b2d94fcca 315dffb843f75 Author: Linus Walleij Date: Wed Feb 8 16:07:59 2023 +0100 Merge tag 'qcom-pinctrl-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into devel Qualcomm pinctrl Devicetree bindings changes for v6.3, part two Several minor cleanups and fixes on Qualcomm pin controller Devicetree bindings - add missing input-disable, correct GPIO pin name patterns in bindings, correct number of GPIOs in gpio-ranges property. commit 695fa5a64cf52ab1aa2c89c93bbb1fd08995304a Author: Shaoqin Huang Date: Wed Feb 8 15:18:00 2023 +0800 KVM: selftests: Remove duplicate macro definition The KVM_GUEST_PAGE_TABLE_MIN_PADDR macro has been defined in include/kvm_util_base.h. So remove the duplicate definition in lib/kvm_util.c. Fixes: cce0c23dd944 ("KVM: selftests: Add wrapper to allocate page table page") Signed-off-by: Shaoqin Huang Link: https://lore.kernel.org/r/20230208071801.68620-1-shahuang@redhat.com Signed-off-by: Sean Christopherson commit 6c77ae716d546d71b21f0c9ee7d405314a3f3f9e Author: Michal Luczaj Date: Mon Feb 6 21:24:30 2023 +0100 KVM: selftests: Clean up misnomers in xen_shinfo_test As discussed[*], relabel the poorly named structs to align with the current KVM nomenclature. Old names are a leftover from before commit 52491a38b2c2 ("KVM: Initialize gfn_to_pfn_cache locks in dedicated helper"), which i.a. introduced kvm_gpc_init() and renamed kvm_gfn_to_pfn_cache_init()/ _destroy() to kvm_gpc_activate()/_deactivate(). Partly in an effort to avoid implying that the cache really is destroyed/freed. While at it, get rid of #define GPA_INVALID, which being used as a GFN, is not only misnamed, but also unnecessarily reinvents a UAPI constant. No functional change intended. [*] https://lore.kernel.org/r/Y5yZ6CFkEMBqyJ6v@google.com Signed-off-by: Michal Luczaj Link: https://lore.kernel.org/r/20230206202430.1898057-1-mhal@rbox.co Signed-off-by: Sean Christopherson commit 7ae69d7087a9a4d014e11b5328a49091cc1682f8 Author: Shaoqin Huang Date: Thu Feb 2 10:57:15 2023 +0800 selftests: KVM: Replace optarg with arg in guest_modes_cmdline The parameter arg in guest_modes_cmdline not being used now, and the optarg should be replaced with arg in guest_modes_cmdline. And this is the chance to change strtoul() to atoi_non_negative(), since guest mode ID will never be negative. Signed-off-by: Shaoqin Huang Fixes: e42ac777d661 ("KVM: selftests: Factor out guest mode code") Reviewed-by: Andrew Jones Reviewed-by: Vipin Sharma Link: https://lore.kernel.org/r/20230202025716.216323-1-shahuang@redhat.com Signed-off-by: Sean Christopherson commit 94817983fb2ccd1869ed0c5a763317a45283a272 Merge: 7120d6bfd6d0b 4ec5183ec4865 Author: Mauro Carvalho Chehab Date: Wed Feb 8 15:18:54 2023 +0100 Merge tag 'v6.2-rc7' into media_tree Linux 6.2-rc7 * tag 'v6.2-rc7': (1549 commits) Linux 6.2-rc7 fbcon: Check font dimension limits efi: fix potential NULL deref in efi_mem_reserve_persistent kernel/irq/irqdomain.c: fix memory leak with using debugfs_lookup() HV: hv_balloon: fix memory leak with using debugfs_lookup() mtk_sgmii: enable PCS polling to allow SFP work net: mediatek: sgmii: fix duplex configuration net: mediatek: sgmii: ensure the SGMII PHY is powered down on configuration MAINTAINERS: update SCTP maintainers MAINTAINERS: ipv6: retire Hideaki Yoshifuji mailmap: add John Crispin's entry MAINTAINERS: bonding: move Veaceslav Falico to CREDITS net: openvswitch: fix flow memory leak in ovs_flow_cmd_new net: ethernet: mtk_eth_soc: disable hardware DSA untagging for second MAC virtio-net: Keep stop() to follow mirror sequence of open() efi: Accept version 2 of memory attributes table ceph: blocklist the kclient when receiving corrupted snap trace ceph: move mount state enum to super.h selftests: net: udpgso_bench_tx: Cater for pending datagrams zerocopy benchmarking selftests: net: udpgso_bench: Fix racing bug between the rx/tx programs ... commit 6a5558f1166473f741de33c32ffb161d7f7732cb Author: Thomas Richter Date: Tue Feb 7 15:04:47 2023 +0100 perf tools: Fix perf tool build error in util/pfm.c I have downloaded linux-next and build the perf tool using # make LIBPFM4=1 to have libpfm4 support built into perf. The build fails: # make LIBPFM4=1 .... INSTALL libbpf_headers CC util/pfm.o util/pfm.c: In function ‘print_libpfm_event’: util/pfm.c:189:9: error: too many arguments to function ‘print_cb->print_event’ 189 | print_cb->print_event(print_state, | ^~~~~~~~ util/pfm.c:220:25: error: too many arguments to function ‘print_cb->print_event’ 220 | print_cb->print_event(print_state, The build error is caused by commit d9dc8874d6ce46cc ("perf pmu-events: Remove now unused event and metric variables") which changes the function prototype of struct print_callbacks { ... void (*print_event)(...); --> last two parameters removed. }; but does not adjust the usage of this function prototype in util/pfm.c. In file util/pfm.c function print_event() is still invoked with 13 parameters instead of 11. The compile fails. When I adjust the file util/pfm.c as in this patch, the build works file. Please check this patch for correctness, I have just fixed the compile issue. Fixes: d9dc8874d6ce46cc ("perf pmu-events: Remove now unused event and metric variables") Signed-off-by: Thomas Richter Tested-by: Arnaldo Carvalho de Melo Tested-by: Ian Rogers Cc: Heiko Carstens Cc: Ian Rogers Cc: Sumanth Korikkar Cc: Sven Schnelle Cc: Vasily Gorbik Cc: egorenar@linux.ibm.com Cc: linux-kernel-next@vger.kernel.org Link: https://lore.kernel.org/r/20230207140447.1827741-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit ffd1240e8f0814262ceb957dbe961f6e0aef1e7a Author: Yicong Yang Date: Tue Feb 7 11:50:57 2023 +0800 perf tools: Fix auto-complete on aarch64 On aarch64 CPU related events are not under event_source/devices/cpu/events, they're under event_source/devices/armv8_pmuv3_0/events on my machine. Using current auto-complete script will generate below error: [root@localhost bin]# perf stat -e ls: cannot access '/sys/bus/event_source/devices/cpu/events': No such file or directory Fix this by not testing /sys/bus/event_source/devices/cpu/events on aarch64 machine. Fixes: 74cd5815d9af6e6c ("perf tool: Improve bash command line auto-complete for multiple events with comma") Reviewed-by: James Clark Signed-off-by: Yicong Yang Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jin Yao Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Cc: prime.zeng@hisilicon.com Link: https://lore.kernel.org/r/20230207035057.43394-1-yangyicong@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 1bece1351c653c3d36bf761513e21ac8428449b4 Author: Namhyung Kim Date: Mon Feb 6 16:24:03 2023 -0800 perf lock contention: Support old rw_semaphore type The old kernel has a different type of the owner field in rwsem. We can check it using bpf_core_type_matches() builtin in clang but it also needs its own version check since it's available on recent versions. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Boqun Feng Cc: Davidlohr Bueso Cc: Hao Luo Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Song Liu Cc: Waiman Long Cc: Will Deacon Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230207002403.63590-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3477f079fe70b3c97a619788d89ac357e207f302 Author: Namhyung Kim Date: Mon Feb 6 16:24:02 2023 -0800 perf lock contention: Add -o/--lock-owner option When there're many lock contentions in the system, people sometimes want to know who caused the contention, IOW who's the owner of the locks. The -o/--lock-owner option tries to follow the lock owners for the contended mutexes and rwsems from BPF, and then attributes the contention time to the owner instead of the waiter. It's a best effort approach to get the owner info at the time of the contention and doesn't guarantee to have the precise tracking of owners if it's changing over time. Currently it only handles mutex and rwsem that have owner field in their struct and it basically points to a task_struct that owns the lock at the moment. Technically its type is atomic_long_t and it comes with some LSB bits used for other meanings. So it needs to clear them when casting it to a pointer to task_struct. Also the atomic_long_t is a typedef of the atomic 32 or 64 bit types depending on arch which is a wrapper struct for the counter value. I'm not aware of proper ways to access those kernel atomic types from BPF so I just read the internal counter value directly. Please let me know if there's a better way. When -o/--lock-owner option is used, it goes to the task aggregation mode like -t/--threads option does. However it cannot get the owner for other lock types like spinlock and sometimes even for mutex. $ sudo ./perf lock con -abo -- ./perf bench sched pipe # Running 'sched/pipe' benchmark: # Executed 1000000 pipe operations between two processes Total time: 4.766 [sec] 4.766540 usecs/op 209795 ops/sec contended total wait max wait avg wait pid owner 403 565.32 us 26.81 us 1.40 us -1 Unknown 4 27.99 us 8.57 us 7.00 us 1583145 sched-pipe 1 8.25 us 8.25 us 8.25 us 1583144 sched-pipe 1 2.03 us 2.03 us 2.03 us 5068 chrome As you can see, the owner is unknown for the most cases. But if we filter only for the mutex locks, it'd more likely get the onwers. $ sudo ./perf lock con -abo -Y mutex -- ./perf bench sched pipe # Running 'sched/pipe' benchmark: # Executed 1000000 pipe operations between two processes Total time: 4.910 [sec] 4.910435 usecs/op 203647 ops/sec contended total wait max wait avg wait pid owner 2 15.50 us 8.29 us 7.75 us 1582852 sched-pipe 7 7.20 us 2.47 us 1.03 us -1 Unknown 1 6.74 us 6.74 us 6.74 us 1582851 sched-pipe Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Boqun Feng Cc: Davidlohr Bueso Cc: Hao Luo Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Song Liu Cc: Waiman Long Cc: Will Deacon Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230207002403.63590-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 55e391852e713f85af4e724443f929b3ce5b5dbe Author: Namhyung Kim Date: Mon Feb 6 16:24:01 2023 -0800 perf lock contention: Fix to save callstack for the default modified The previous change missed to set the con->save_callstack for the LOCK_AGGR_CALLER mode resulting in no caller information. Fixes: ebab291641bed48f ("perf lock contention: Support filters for different aggregation") Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Boqun Feng Cc: Davidlohr Bueso Cc: Hao Luo Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Waiman Long Cc: Will Deacon Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230207002403.63590-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 25a5a77ae0bc55376cac8eedd138669ca2e3699a Author: Uwe Kleine-König Date: Tue Feb 7 20:19:07 2023 +0100 ALSA: core: Make snd_card_free() return void The function returns 0 unconditionally. Make it return void instead and simplify all callers accordingly. Signed-off-by: Uwe Kleine-König Reviewed-by: Jaroslav Kysela Reviewed-by: Takashi Sakamoto Acked-by: Geoff Levand Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20230207191907.467756-4-u.kleine-koenig@pengutronix.de Signed-off-by: Takashi Iwai commit 73c5685c431a090152cbc9e45857feb207f0032f Author: Uwe Kleine-König Date: Tue Feb 7 20:19:06 2023 +0100 ALSA: core: Make snd_card_free_when_closed() return void All callers from other files ignore the return value of this function. And it can only ever return a non-zero value if the parameter card is NULL. This cannot happen in snd_card_free() as card was dereferenced just before snd_card_free_when_closed() is called. So the error handling can be dropped there. Signed-off-by: Uwe Kleine-König Reviewed-by: Jaroslav Kysela Reviewed-by: Takashi Sakamoto Acked-by: Geoff Levand Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20230207191907.467756-3-u.kleine-koenig@pengutronix.de Signed-off-by: Takashi Iwai commit 663f922fd7a9e9342dca512db339c7fb2b59b8e6 Author: Uwe Kleine-König Date: Tue Feb 7 20:19:05 2023 +0100 ALSA: core: Make snd_card_disconnect() return void All callers from other files ignore the return value of this function. And it can only ever return a non-zero value if the parameter card is NULL. Move the check for card being NULL into snd_card_free_when_closed() to keep the previous behaviour. Note this isn't necessary for snd_card_disconnect_sync() because if card was NULL in there the dereference of card for dev_err() would oops the kernel. Replace this by an oops triggered by the dereference of card for spin_lock_irq(). Signed-off-by: Uwe Kleine-König Reviewed-by: Jaroslav Kysela Reviewed-by: Takashi Sakamoto Acked-by: Geoff Levand Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20230207191907.467756-2-u.kleine-koenig@pengutronix.de Signed-off-by: Takashi Iwai commit fb42378dcc7f247df56f0ecddfdae85487495fbc Author: Saravana Kannan Date: Mon Feb 6 17:42:04 2023 -0800 mtd: mtdpart: Don't create platform device that'll never probe These "nvmem-cells" platform devices never get probed because there's no platform driver for it and it's never used anywhere else. So it's a waste of memory. These devices also cause fw_devlink to block nvmem consumers of "nvmem-cells" partition from probing because the supplier device never probes. So stop creating platform devices for nvmem-cells partitions to avoid wasting memory and to avoid blocking probing of consumers. Reported-by: Maxim Kiselev Fixes: bcdf0315a61a ("mtd: call of_platform_populate() for MTD partitions") Signed-off-by: Saravana Kannan Tested-by: Maksim Kiselev Tested-by: Douglas Anderson Tested-by: Geert Uytterhoeven Tested-by: Luca Weiss # qcom/sm7225-fairphone-fp4 Link: https://lore.kernel.org/r/20230207014207.1678715-13-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 96da4a99ce507bb98e2ba77018a2f91999c8c12b Author: Saravana Kannan Date: Mon Feb 6 17:42:03 2023 -0800 firmware: arm_scmi: Set fwnode for the scmi_device This allows fw_devlink to track and enforce supplier-consumer dependencies for scmi_device. Signed-off-by: Saravana Kannan Acked-by: Sudeep Holla Tested-by: Colin Foster Tested-by: Sudeep Holla Tested-by: Douglas Anderson Tested-by: Geert Uytterhoeven Tested-by: Luca Weiss # qcom/sm7225-fairphone-fp4 Link: https://lore.kernel.org/r/20230207014207.1678715-12-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit e2bbea770cafb7e19bbb6cd77fad3c1c6fb4cca5 Author: Saravana Kannan Date: Mon Feb 6 17:42:02 2023 -0800 irqchip/irq-imx-gpcv2: Mark fwnode device as not initialized Since this device is only partially initialized by the irqchip driver, we need to mark the fwnode device as not initialized. This is to let fw_devlink know that the device will be completely initialized at a later point. That way, fw_devlink will continue to defer the probe of the power domain consumers till the power domain driver successfully binds to the struct device and completes the initialization of the device. Signed-off-by: Saravana Kannan Tested-by: Douglas Anderson Tested-by: Geert Uytterhoeven Tested-by: Luca Weiss # qcom/sm7225-fairphone-fp4 Link: https://lore.kernel.org/r/20230207014207.1678715-11-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 4a032827daa89350365166b19d14d82fe8219128 Author: Saravana Kannan Date: Mon Feb 6 17:42:01 2023 -0800 of: property: Simplify of_link_to_phandle() The driver core now: - Has the parent device of a supplier pick up the consumers if the supplier never has a device created for it. - Ignores a supplier if the supplier has no parent device and will never be probed by a driver And already prevents creating a device link with the consumer as a supplier of a parent. So, we no longer need to find the "compatible" node of the supplier or do any other checks in of_link_to_phandle(). We simply need to make sure that the supplier is available in DT. Signed-off-by: Saravana Kannan Tested-by: Colin Foster Tested-by: Sudeep Holla Tested-by: Douglas Anderson Tested-by: Geert Uytterhoeven Tested-by: Luca Weiss # qcom/sm7225-fairphone-fp4 Link: https://lore.kernel.org/r/20230207014207.1678715-10-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 3fb16866b51ded6c016b664caad53f8d4fd9dc56 Author: Saravana Kannan Date: Mon Feb 6 17:42:00 2023 -0800 driver core: fw_devlink: Make cycle detection more robust fw_devlink could only detect a single and simple cycle because it relied mainly on device link cycle detection code that only checked for cycles between devices. The expectation was that the firmware wouldn't have complicated cycles and multiple cycles between devices. That expectation has been proven to be wrong. For example, fw_devlink could handle: +-+ +-+ |A+------> |B+ +-+ +++ ^ | | | +----------+ But it couldn't handle even something as "simple" as: +---------------------+ | | v | +-+ +-+ +++ |A+------> |B+------> |C| +-+ +++ +-+ ^ | | | +----------+ But firmware has even more complicated cycles like: +---------------------+ | | v | +-+ +---+ +++ +--+A+------>| B +-----> |C|<--+ | +-+ ++--+ +++ | | ^ | ^ | | | | | | | | | +---------+ +---------+ | | | +------------------------------+ And this is without including parent child dependencies or nodes in the cycle that are just firmware nodes that'll never have a struct device created for them. The proper way to treat these devices it to not force any probe ordering between them, while still enforce dependencies between node in the cycles (A, B and C) and their consumers. So this patch goes all out and just deals with all types of cycles. It does this by: 1. Following dependencies across device links, parent-child and fwnode links. 2. When it find cycles, it mark the device links and fwnode links as such instead of just deleting them or making the indistinguishable from proxy SYNC_STATE_ONLY device links. This way, when new nodes get added, we can immediately find and mark any new cycles whether the new node is a device or firmware node. Fixes: 2de9d8e0d2fe ("driver core: fw_devlink: Improve handling of cyclic dependencies") Signed-off-by: Saravana Kannan Tested-by: Colin Foster Tested-by: Sudeep Holla Tested-by: Douglas Anderson Tested-by: Geert Uytterhoeven Tested-by: Luca Weiss # qcom/sm7225-fairphone-fp4 Link: https://lore.kernel.org/r/20230207014207.1678715-9-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit cd115c0409f283edde94bd5a9a42dc42bee0aba8 Author: Saravana Kannan Date: Mon Feb 6 17:41:59 2023 -0800 driver core: fw_devlink: Consolidate device link flag computation Consolidate the code that computes the flags to be used when creating a device link from a fwnode link. Fixes: 2de9d8e0d2fe ("driver core: fw_devlink: Improve handling of cyclic dependencies") Signed-off-by: Saravana Kannan Tested-by: Colin Foster Tested-by: Sudeep Holla Tested-by: Douglas Anderson Tested-by: Geert Uytterhoeven Tested-by: Luca Weiss # qcom/sm7225-fairphone-fp4 Link: https://lore.kernel.org/r/20230207014207.1678715-8-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 6a6dfdf8b3ff337be5a447e9f4e71969f18370ad Author: Saravana Kannan Date: Mon Feb 6 17:41:58 2023 -0800 driver core: fw_devlink: Allow marking a fwnode link as being part of a cycle To improve detection and handling of dependency cycles, we need to be able to mark fwnode links as being part of cycles. fwnode links marked as being part of a cycle should not block their consumers from probing. Fixes: 2de9d8e0d2fe ("driver core: fw_devlink: Improve handling of cyclic dependencies") Signed-off-by: Saravana Kannan Tested-by: Colin Foster Tested-by: Sudeep Holla Tested-by: Douglas Anderson Tested-by: Geert Uytterhoeven Tested-by: Luca Weiss # qcom/sm7225-fairphone-fp4 Link: https://lore.kernel.org/r/20230207014207.1678715-7-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 67cad5c67019c38126b749621665b6723d3ae7e6 Author: Saravana Kannan Date: Mon Feb 6 17:41:57 2023 -0800 driver core: fw_devlink: Add DL_FLAG_CYCLE support to device links fw_devlink uses DL_FLAG_SYNC_STATE_ONLY device link flag for two purposes: 1. To allow a parent device to proxy its child device's dependency on a supplier so that the supplier doesn't get its sync_state() callback before the child device/consumer can be added and probed. In this usage scenario, we need to ignore cycles for ensure correctness of sync_state() callbacks. 2. When there are dependency cycles in firmware, we don't know which of those dependencies are valid. So, we have to ignore them all wrt probe ordering while still making sure the sync_state() callbacks come correctly. However, when detecting dependency cycles, there can be multiple dependency cycles between two devices that we need to detect. For example: A -> B -> A and A -> C -> B -> A. To detect multiple cycles correct, we need to be able to differentiate DL_FLAG_SYNC_STATE_ONLY device links used for (1) vs (2) above. To allow this differentiation, add a DL_FLAG_CYCLE that can be use to mark use case (2). We can then use the DL_FLAG_CYCLE to decide which DL_FLAG_SYNC_STATE_ONLY device links to follow when looking for dependency cycles. Fixes: 2de9d8e0d2fe ("driver core: fw_devlink: Improve handling of cyclic dependencies") Signed-off-by: Saravana Kannan Tested-by: Colin Foster Tested-by: Sudeep Holla Tested-by: Douglas Anderson Tested-by: Geert Uytterhoeven Tested-by: Luca Weiss # qcom/sm7225-fairphone-fp4 Link: https://lore.kernel.org/r/20230207014207.1678715-6-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 38dfa56b3db354b4bd399fc686c3e74ad32ffa57 Author: Saravana Kannan Date: Mon Feb 6 17:41:56 2023 -0800 gpiolib: Clear the gpio_device's fwnode initialized flag before adding Registering an irqdomain sets the flag for the fwnode. But having the flag set when a device is added is interpreted by fw_devlink to mean the device has already been initialized and will never probe. This prevents fw_devlink from creating device links with the gpio_device as a supplier. So, clear the flag before adding the device. Signed-off-by: Saravana Kannan Acked-by: Bartosz Golaszewski Tested-by: Colin Foster Tested-by: Sudeep Holla Reviewed-by: Andy Shevchenko Tested-by: Douglas Anderson Tested-by: Geert Uytterhoeven Tested-by: Luca Weiss # qcom/sm7225-fairphone-fp4 Link: https://lore.kernel.org/r/20230207014207.1678715-5-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 8640166f01fe42f2e4a73ab92c797b97b467927d Author: Saravana Kannan Date: Mon Feb 6 17:41:55 2023 -0800 soc: renesas: Move away from using OF_POPULATED for fw_devlink The OF_POPULATED flag was set to let fw_devlink know that the device tree node will not have a struct device created for it. This information is used by fw_devlink to avoid deferring the probe of consumers of this device tree node. Let's use fwnode_dev_initialized() instead because it achieves the same effect without using OF specific flags. This allows more generic code to be written in driver core. Signed-off-by: Saravana Kannan Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Tested-by: Douglas Anderson Tested-by: Geert Uytterhoeven Tested-by: Luca Weiss # qcom/sm7225-fairphone-fp4 Link: https://lore.kernel.org/r/20230207014207.1678715-4-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 411c0d58ca6faa9bc4b9f5382118a31c7bb92a6f Author: Saravana Kannan Date: Mon Feb 6 17:41:54 2023 -0800 driver core: fw_devlink: Improve check for fwnode with no device/driver fw_devlink shouldn't defer the probe of a device to wait on a supplier that'll never have a struct device or will never be probed by a driver. We currently check if a supplier falls into this category, but don't check its ancestors. We need to check the ancestors too because if the ancestor will never probe, then the supplier will never probe either. Signed-off-by: Saravana Kannan Tested-by: Colin Foster Tested-by: Sudeep Holla Tested-by: Douglas Anderson Tested-by: Geert Uytterhoeven Tested-by: Luca Weiss # qcom/sm7225-fairphone-fp4 Link: https://lore.kernel.org/r/20230207014207.1678715-3-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 3a2dbc510c437ca392516b0105bad8e7970e6614 Author: Saravana Kannan Date: Mon Feb 6 17:41:53 2023 -0800 driver core: fw_devlink: Don't purge child fwnode's consumer links When a device X is bound successfully to a driver, if it has a child firmware node Y that doesn't have a struct device created by then, we delete fwnode links where the child firmware node Y is the supplier. We did this to avoid blocking the consumers of the child firmware node Y from deferring probe indefinitely. While that a step in the right direction, it's better to make the consumers of the child firmware node Y to be consumers of the device X because device X is probably implementing whatever functionality is represented by child firmware node Y. By doing this, we capture the device dependencies more accurately and ensure better probe/suspend/resume ordering. Signed-off-by: Saravana Kannan Tested-by: Colin Foster Tested-by: Sudeep Holla Tested-by: Douglas Anderson Tested-by: Geert Uytterhoeven Tested-by: Luca Weiss # qcom/sm7225-fairphone-fp4 Link: https://lore.kernel.org/r/20230207014207.1678715-2-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 2bb3669f576559db273efe49e0e69f82450efbca Author: Greg Kroah-Hartman Date: Thu Feb 2 16:16:33 2023 +0100 kernel/fail_function: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Cc: Andrew Morton Reviewed-by: Yang Yingliang Link: https://lore.kernel.org/r/20230202151633.2310897-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit a0bc3f78d0fffa8be1a73bf945a43bfe1c2871c1 Author: Greg Kroah-Hartman Date: Thu Feb 2 16:15:15 2023 +0100 kernel/power/energy_model.c: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Cc: "Rafael J. Wysocki" Cc: Pavel Machek Cc: Len Brown Link: https://lore.kernel.org/r/20230202151515.2309543-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 5f5139974c2030e0937d3ae01f17da1238281f11 Author: Greg Kroah-Hartman Date: Thu Feb 2 16:12:14 2023 +0100 kernel/time/test_udelay.c: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Link: https://lore.kernel.org/r/20230202151214.2306822-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 862f6a84d1bf01435fdd6aa8b2811c88ab1f06f4 Author: Thomas Weißschuh Date: Wed Feb 8 03:54:51 2023 +0000 samples/kobject: 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/20230208-kobj_type-samples-v1-1-fca804a8e9f3@weissschuh.net Signed-off-by: Greg Kroah-Hartman commit c83d9ab42f1ef70d81bb3c637a12c098a9a05057 Author: Thomas Weißschuh Date: Sat Feb 4 22:36:58 2023 +0000 driver core: 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/20230204-kobj_type-driver-core-v1-1-b9f809419f2c@weissschuh.net Signed-off-by: Greg Kroah-Hartman commit dda6b81f17ad8e72f8bc151c876cd335a471e268 Author: Thomas Weißschuh Date: Sat Feb 4 21:59:50 2023 +0000 kobject: make dynamic_kobj_ktype and kset_ktype const 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/20230204-kobj_type-kobj-v1-1-ddd1b4ef8ab5@weissschuh.net Signed-off-by: Greg Kroah-Hartman commit 8518e9db9f95d7beb453e46ee97e1a630680c4b5 Author: Thomas Weißschuh Date: Sat Feb 4 05:41:26 2023 +0000 const_structs.checkpatch.pl: add kobj_type Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20230204-kobj_type-checkpatch-v1-1-9a94b04adbb2@weissschuh.net Signed-off-by: Greg Kroah-Hartman commit 36c893d3a759ae7c91ee7d4871ebfc7504f08c40 Author: Greg Kroah-Hartman Date: Thu Feb 2 15:16:21 2023 +0100 drivers: base: dd: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230202141621.2296458-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 8deb87b1e810dd558371e88ffd44339fbef27870 Author: Greg Kroah-Hartman Date: Thu Feb 2 15:16:20 2023 +0100 drivers: base: component: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230202141621.2296458-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 5cd73e7c60a9cab27b2eb3270b7fd4a79dafee25 Author: Philipp Hortmann Date: Tue Feb 7 19:17:22 2023 +0100 staging: rtl8192e: Rename DM_RxPathSelTable Rename variable DM_RxPathSelTable to dm_rx_path_sel_table to avoid CamelCase which is not accepted by checkpatch. Remove "extern struct drx_path_sel DM_RxPathSelTable;" in rtl_dm.h as it is dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/8846ad13a4ee4b534d2410c9bca0c2943500c858.1675792435.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 44414e625c35a307707e7963fa608bc02ce5d2fc Author: Philipp Hortmann Date: Tue Feb 7 19:17:15 2023 +0100 staging: rtl8192e: Rename diff_TH and disabledRF Rename variables diff_TH to diff_th and disabledRF to disabled_rf to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/2b95586ed460f90c98721a429aced1ffaf258e49.1675792435.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit a89fbd4b9c890a384b2cb0881fd26bcc5174f13e Author: Philipp Hortmann Date: Tue Feb 7 19:17:07 2023 +0100 staging: rtl8192e: Rename Enable, cck_Rx_path and SS_TH_low Rename variables Enable to enable, cck_Rx_path to cck_rx_path and SS_TH_low to ss_th_low to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/740487e2fd8b98bfcaa8af2e398b9aa7e320fef8.1675792435.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2c3a5d3ed344d5c6de7f90e140be92ed851a9c95 Author: Philipp Hortmann Date: Tue Feb 7 19:17:00 2023 +0100 staging: rtl8192e: Rename RateAdaptiveTH.., VeryLowRSSI and WAIotTHVal Rename constants RateAdaptiveTH_Low_40M to RATE_ADAPTIVE_TH_LOW_40M, VeryLowRSSI to VERY_LOW_RSSI and WAIotTHVal to WA_IOT_TH_VAL to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/ebca576cae161442e51cd5b73930dc53f8ae26ba.1675792435.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1af6ddaba5421a2375acb87778f76e6329447a2c Author: Philipp Hortmann Date: Tue Feb 7 19:16:53 2023 +0100 staging: rtl8192e: Rename RxPathSelectio.., RateAdaptive.. and RateAdap.. Rename constants RxPathSelection_diff_TH to RX_PATH_SEL_DIFF_TH, RateAdaptiveTH_High to RATE_ADAPTIVE_TH_HIGH and RateAdaptiveTH_Low_20M to RATE_ADAPTIVE_TH_LOW_20M to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/3fb44a7f8020b898d3f589f16e9be4f555aa9e1e.1675792435.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 410a384532238ef13363756948fa7d9bbcbdee25 Author: Philipp Hortmann Date: Tue Feb 7 19:16:47 2023 +0100 staging: rtl8192e: Rename OFDM_Table.., CCK_Table_.. and RxPathSelecti.. Rename constants OFDM_Table_Length to OFDM_TABLE_LEN, CCK_Table_length to CCK_TABLE_LEN and RxPathSelection_SS_TH_low to RX_PATH_SEL_SS_TH_LOW to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/197e98073922ec14d56e4a516c493188c88e11c1.1675792435.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0e8696f0e93ceb6d6804352ab04080062cb6209a Author: Philipp Hortmann Date: Tue Feb 7 19:16:39 2023 +0100 staging: rtl8192e: Rename MacBlkCtrl and remove double definition Rename constant MacBlkCtrl to MAC_BLK_CTRL to avoid CamelCase which is not accepted by checkpatch. Remove double definition. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/8c0c46860fdb71660183fce567f7bc80e1d1ad36.1675792435.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 766e9d4ae73fd6ad75ca19dd1abac97f5c49ebae Author: Philipp Hortmann Date: Tue Feb 7 19:16:29 2023 +0100 staging: rtl8192e: Remove blank lines in r8192E_hw.h, rtl_core.h and .. Remove or add blank lines in r8192E_hw.h, rtl_core.h and rtl_dm.h so that code fits to kernel coding style as shown by checkpatch. Remove one line break after "}" to fit to kernel coding style. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/9d7d54c5a2cdba6162e38e8d77faca5e5f39bdea.1675792435.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit ec0eb562a7305073b954d8c8e91f453308351cfa Author: Philipp Hortmann Date: Tue Feb 7 19:16:15 2023 +0100 staging: rtl8192e: Rename AcmHw_ViqEn, AcmHw_VoqEn and ANAPAR_FOR_8192PciE Rename constants AcmHw_ViqEn to ACM_HW_VIQ_EN and AcmHw_VoqEn to ACM_HW_VOQ_EN and ANAPAR_FOR_8192PciE to ANAPAR_FOR_8192PCIE to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/ecdb350dcd9b1860496c1835980d34c5bca0d39e.1675792435.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7652f95f52c06fbd3b243fe3f8d14e95c23212c3 Author: Martin Kaiser Date: Tue Feb 7 20:23:19 2023 +0100 staging: r8188eu: bagg_pkt parameter is not used The bagg_pkt parameter in function update_txdesc is not used, it can be removed. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230207192319.294203-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit fd48124e09825797bdc8ff0120f2401030c618ee Author: Martin Kaiser Date: Tue Feb 7 20:23:18 2023 +0100 staging: r8188eu: simplify rtw_get_ff_hwaddr On both occassions where rtw_get_ff_hwaddr is called, the result is used as addr parameter for rtw_write_port. rtw_write_port only needs the info if the high queue was used or not. Simplify rtw_get_ff_hwaddr accordingly and remove the now unused queue defines. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230207192319.294203-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 2bc00bac61ddc253d67da266372a04a23be08bd2 Author: Martin Kaiser Date: Tue Feb 7 20:23:17 2023 +0100 staging: r8188eu: simplify xmit_buf flags rtw_write_port stores a queue index in pxmitbuf->flags before submitting an urb. The urb completion function reads the flags. All it needs is the info if the high queue was used or not. We can replace the flags with a boolean high_queue variable. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230207192319.294203-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit b5e9b074275fe80b8483260e81979fef720bb73a Author: Martin Kaiser Date: Tue Feb 7 20:23:16 2023 +0100 staging: r8188eu: xmit_buf's ff_hwaddr is not used ff_hwaddr in struct xmit_buf is not used. Remove it. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230207192319.294203-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit b7c269aef0f130273381e70b7b6055908e73d000 Author: Martin Kaiser Date: Tue Feb 7 20:23:15 2023 +0100 staging: r8188eu: remove unused frametag defines Remove some frametag defines which are not used in the r8188eu driver. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230207192319.294203-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit f141c234cbc87a3189cdad67c6d547b77967e715 Author: Martin Kaiser Date: Tue Feb 7 20:23:14 2023 +0100 staging: r8188eu: simplify rtw_alloc_xmitframe Make the rtw_alloc_xmitframe function a bit simpler. The container_of() call never returns NULL. The if (pxframe) check is false only if pfree_xmit_queue is empty. Handle this special case explicitly and save one level of indentation. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230207192319.294203-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit aec9b5bb8f653277a96818d580035f8325de443c Author: Martin Kaiser Date: Tue Feb 7 20:23:13 2023 +0100 staging: r8188eu: merge do_queue_select into its only caller Merge do_queue_select into its only caller. It's only a simple assignment. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230207192319.294203-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 39e1655cc4b583007dce511a928bef2e137f89bb Author: Vitaly Lubart Date: Tue Feb 7 13:55:20 2023 +0200 mei: lower the log level for non-fatal failed messages Some non-fatal log messages should be logged at INFO log level because failure to send/receive them is not breaking mei functionality and may happen during legal firmware resets Signed-off-by: Vitaly Lubart Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20230207115520.846232-2-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 784304ae5e5ff407d81975a406328d57d66de27b Author: Alexander Usyskin Date: Tue Feb 7 13:55:19 2023 +0200 mei: bus: disallow driver match while dismantling device With immediate reply support to enum request and FW reset, a device on MEI bus can be temporarily removed. A driver for a device on MEI bus can try to bind to the device right between bus attempt to remove driver and device structures removal. This leaves device driver with pointers to freed memory of device structures. Avoid bus device driver bind while dismantling device by disallowing device match right before driver release. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20230207115520.846232-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 209cdbd07cfaa4b7385bad4eeb47e5ec1887d33d Author: Greg Kroah-Hartman Date: Thu Feb 2 15:11:00 2023 +0100 misc: vmw_balloon: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Cc: Nadav Amit Cc: VMware PV-Drivers Reviewers Cc: Arnd Bergmann Link: https://lore.kernel.org/r/20230202141100.2291188-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 684ae4f9513c2bb9443794608b7fc754c4ca2483 Author: Daniel Starke Date: Mon Feb 6 12:46:06 2023 +0100 tty: n_gsm: add TIOCMIWAIT support Add support for the TIOCMIWAIT ioctl on the virtual ttys. This enables the user to wait for virtual modem signals like RING. More work is needed to support also TIOCGICOUNT. Signed-off-by: Daniel Starke Link: https://lore.kernel.org/r/20230206114606.2133-4-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman commit 42ec0b93e47f72bc701799330e67e4cef2df02c5 Author: Daniel Starke Date: Mon Feb 6 12:46:05 2023 +0100 tty: n_gsm: add RING/CD control support The status lines ring and carrier detect are used by the modem to signal incoming calls (RING) or an established connection (CD). This is implemented as physical lines on a standard RS232 connection. However, the muxer protocol encodes these status lines as modem bits IC and DV. These incoming lines are masked by tty driver (see tty_io.c) and cannot be set by a user application. Allow setting RING via TIOCM_OUT1 and CD via TIOCM_OUT2 to allow implementation of a modem or modem emulator. Signed-off-by: Daniel Starke Link: https://lore.kernel.org/r/20230206114606.2133-3-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman commit 9bd6dcb8ccb1a7d18534a88ff0d11e466a3a98a4 Author: Daniel Starke Date: Mon Feb 6 12:46:03 2023 +0100 tty: n_gsm: mark unusable ioctl structure fields accordingly gsm_config and gsm_netconfig includes unused fields that have been included to allow future extension without changing the structure size. Unfortunately, no checks have been included for these field. The actual value set by old user space code remains undefined. This means that future extensions can not use these fields without breaking old user space code which may set unexpected values. Mark these fields accordingly to avoid breaking code changes. Signed-off-by: Daniel Starke Link: https://lore.kernel.org/r/20230206114606.2133-1-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman commit f2d9fbb6f4a7175ce41afe292d46685ef7752a67 Author: Sergey Organov Date: Wed Feb 1 17:16:03 2023 +0300 serial: imx: get rid of registers shadowing Neither registers shadowing is functionally needed as all the registers are read-write, nor the shadowing makes much sense for speed-up, as most speed critical reads/writes (of data Rx/Tx registers) are not shadowed anyway. Moreover, the shadowing code is obviously pure overhead on the write path. Get rid of the shadowing code and variables due to above considerations. Signed-off-by: Sergey Organov Link: https://lore.kernel.org/r/20230201141603.4205-1-sorganov@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2af4b918848b4102f0bf5761057e2506258e0bb8 Author: Sergey Organov Date: Wed Feb 1 17:27:00 2023 +0300 serial: imx: refine local variables in rxint() The 'rx' is chip register, similar to 'usr2', so let it be of 'u32' type as well. Move 'flg' to be FIFO read loop local as it's not used outside. Signed-off-by: Sergey Organov Link: https://lore.kernel.org/r/20230201142700.4346-8-sorganov@gmail.com Signed-off-by: Greg Kroah-Hartman commit 53701b6d2ce7202cff88943ee812917c896a8e90 Author: Sergey Organov Date: Wed Feb 1 17:26:59 2023 +0300 serial: imx: stop using USR2 in FIFO reading loop The chip provides all the needed bits in the URXD0 register that we read anyway for data, so get rid of reading USR2 and use only URXD0 bits instead. Signed-off-by: Sergey Organov Link: https://lore.kernel.org/r/20230201142700.4346-7-sorganov@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0fbca4798af88c20a2b9e4c98ac762408a24b668 Author: Sergey Organov Date: Wed Feb 1 17:26:58 2023 +0300 serial: imx: remove redundant USR2 read from FIFO reading loop There is no need to read USR2 twice at every loop iteration: get rid of the second read. Signed-off-by: Sergey Organov Link: https://lore.kernel.org/r/20230201142700.4346-6-sorganov@gmail.com Signed-off-by: Greg Kroah-Hartman commit fbf971701d03ede858f5ca8b8b8e328671ab04f4 Author: Sergey Organov Date: Wed Feb 1 17:26:57 2023 +0300 serial: imx: do not break from FIFO reading loop prematurely There is no reason to prematurely break out of FIFO reading loop, and it might cause needless reenters into ISR, so keep reading until FIFO is empty. Signed-off-by: Sergey Organov Link: https://lore.kernel.org/r/20230201142700.4346-5-sorganov@gmail.com Signed-off-by: Greg Kroah-Hartman commit e1c6a7e5f87d66fce5c6890845400f8425acda4f Author: Sergey Organov Date: Wed Feb 1 17:26:56 2023 +0300 serial: imx: do not sysrq broken chars Do not call uart_handle_sysrq_char() if we got any receive error along with the character, as we don't want random junk to be considered a sysrq. Signed-off-by: Sergey Organov Link: https://lore.kernel.org/r/20230201142700.4346-4-sorganov@gmail.com Signed-off-by: Greg Kroah-Hartman commit 496a4471b7c3ae5c0be1a3fccd69e7debc127e08 Author: Sergey Organov Date: Wed Feb 1 17:26:55 2023 +0300 serial: imx: work-around for hardware RX flood Check if hardware Rx flood is in progress, and issue soft reset to UART to stop the flood. A way to reproduce the flood (checked on iMX6SX) is: open iMX UART at 9600 8N1, and from external source send 0xf0 char at 115200 8N1. In about 90% of cases this starts a flood of "receiving" of 0xff characters by the iMX UART that is terminated by any activity on RxD line, or could be stopped by issuing soft reset to the UART (just stop/start of RX does not help). Note that in essence what we did here is sending isolated start bit about 2.4 times shorter than it is to be if issued on the UART configured baud rate. There was earlier attempt to fix similar issue in: 'commit b38cb7d25711 ("serial: imx: Disable new features of autobaud detection")', but apparently it only gets harder to reproduce the issue after that commit. Signed-off-by: Sergey Organov Link: https://lore.kernel.org/r/20230201142700.4346-3-sorganov@gmail.com Signed-off-by: Greg Kroah-Hartman commit d45fb2e430e54fac6af3cabb39c36171c4bf3f52 Author: Sergey Organov Date: Wed Feb 1 17:26:54 2023 +0300 serial: imx: factor-out common code to imx_uart_soft_reset() We perform soft reset in 2 places, slightly differently for no sufficient reasons, so move more generic variant to a function, and re-use the code. Out of 2 repeat counters, 10 and 100, select 10, as the code works at interrupts disabled, and in practice the reset happens immediately. Signed-off-by: Sergey Organov Link: https://lore.kernel.org/r/20230201142700.4346-2-sorganov@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8cf31a99d3a53a68f7032452cb7de3203b8200c8 Author: Kumaravel Thiagarajan Date: Tue Feb 7 22:18:14 2023 +0530 serial: 8250_pci1xxxx: Add power management functions to quad-uart driver pci1xxxx's quad-uart function has the capability to wake up UART from suspend state. Enable wakeup before entering into suspend and disable wakeup on resume. Co-developed-by: Tharun Kumar P Signed-off-by: Tharun Kumar P Signed-off-by: Kumaravel Thiagarajan Link: https://lore.kernel.org/r/20230207164814.3104605-5-kumaravel.thiagarajan@microchip.com Signed-off-by: Greg Kroah-Hartman commit 08cedda0b3852c0f47a94e64eb586b5507d797f1 Author: Kumaravel Thiagarajan Date: Tue Feb 7 22:18:13 2023 +0530 serial: 8250_pci1xxxx: Add RS485 support to quad-uart driver pci1xxxx uart supports RS485 mode of operation in the hardware with auto-direction control with configurable delay for releasing RTS after the transmission. This patch adds support for the RS485 mode. Co-developed-by: Tharun Kumar P Signed-off-by: Tharun Kumar P Signed-off-by: Kumaravel Thiagarajan Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230207164814.3104605-4-kumaravel.thiagarajan@microchip.com Signed-off-by: Greg Kroah-Hartman commit 32bb477fa7bf386ce87837691c4672854a5231e4 Author: Kumaravel Thiagarajan Date: Tue Feb 7 22:18:12 2023 +0530 serial: 8250_pci1xxxx: Add driver for quad-uart support pci1xxxx is a PCIe switch with a multi-function endpoint on one of its downstream ports. Quad-uart is one of the functions in the multi-function endpoint. This driver loads for the quad-uart and enumerates single or multiple instances of uart based on the PCIe subsystem device ID. Co-developed-by: Tharun Kumar P Signed-off-by: Tharun Kumar P Signed-off-by: Kumaravel Thiagarajan Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230207164814.3104605-3-kumaravel.thiagarajan@microchip.com Signed-off-by: Greg Kroah-Hartman commit 0348386dab3711b8caa0422c2a4852913b8bf4d7 Author: Kumaravel Thiagarajan Date: Tue Feb 7 22:18:11 2023 +0530 serial: 8250_pci: Add serial8250_pci_setup_port definition in 8250_pcilib.c Move implementation of setup_port func() to serial8250_pci_setup_port. Co-developed-by: Tharun Kumar P Signed-off-by: Tharun Kumar P Signed-off-by: Kumaravel Thiagarajan Reviewed-by: Ilpo Järvinen Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230207164814.3104605-2-kumaravel.thiagarajan@microchip.com Signed-off-by: Greg Kroah-Hartman commit 04a189c720aa2b6091442113ce9b9bc93552dff8 Author: Greg Kroah-Hartman Date: Thu Feb 2 15:12:21 2023 +0100 tty: pcn_uart: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Cc: Jiri Slaby Link: https://lore.kernel.org/r/20230202141221.2293012-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 28d49f8cbe9c7966f91ee1b5ec2f997f6e55bf9f Author: Brian King Date: Fri Feb 3 09:58:02 2023 -0600 hvcs: Synchronize hotplug remove with port free Synchronizes hotplug remove with the freeing of the port. This ensures we have freed all the memory associated with this port and are not leaking memory. Signed-off-by: Brian King Link: https://lore.kernel.org/r/20230203155802.404324-6-brking@linux.vnet.ibm.com Signed-off-by: Greg Kroah-Hartman commit d432228bc7b1b3f0ed06510278ff5a77b3749fe6 Author: Brian King Date: Fri Feb 3 09:58:01 2023 -0600 hvcs: Use vhangup in hotplug remove When hotplug removing an hvcs device, we need to ensure the hangup processing is done prior to exiting the remove function, so use tty_vhangup to do the hangup processing directly rather than using tty_hangup which simply schedules the hangup work for later execution. Signed-off-by: Brian King Link: https://lore.kernel.org/r/20230203155802.404324-5-brking@linux.vnet.ibm.com Signed-off-by: Greg Kroah-Hartman commit 3a8d3b366ce47024bf274eac783f8af5df2780f5 Author: Brian King Date: Fri Feb 3 09:58:00 2023 -0600 hvcs: Get reference to tty in remove Grab a reference to the tty when removing the hvcs to ensure it does not get freed unexpectedly. Signed-off-by: Brian King Link: https://lore.kernel.org/r/20230203155802.404324-4-brking@linux.vnet.ibm.com Signed-off-by: Greg Kroah-Hartman commit 503a90dd619d52dcac2cc68bd742aa914c7cd47a Author: Brian King Date: Fri Feb 3 09:57:59 2023 -0600 hvcs: Use driver groups to manage driver attributes Rather than manually creating attributes for the hvcs driver, let the driver core do this for us. This also fixes some hotplug remove issues and ensures that cleanup of these attributes is done in the right order. Signed-off-by: Brian King Link: https://lore.kernel.org/r/20230203155802.404324-3-brking@linux.vnet.ibm.com Signed-off-by: Greg Kroah-Hartman commit 760aa5e81f33e0da82512c4288489739a6d1c556 Author: Brian King Date: Fri Feb 3 09:57:58 2023 -0600 hvcs: Use dev_groups to manage hvcs device attributes Use the dev_groups functionality to manage the attribute groups for hvcs devices. This simplifies the code and also eliminates errors coming from kernfs when attempting to remove a console device that is in use. Signed-off-by: Brian King Link: https://lore.kernel.org/r/20230203155802.404324-2-brking@linux.vnet.ibm.com Signed-off-by: Greg Kroah-Hartman commit ef25e16ea9674b713a68c3bda821556ce9901254 Author: Peng Fan Date: Mon Feb 6 09:30:16 2023 +0800 tty: serial: imx: disable Ageing Timer interrupt request irq There maybe pending USR interrupt before requesting irq, however uart_add_one_port has not executed, so there will be kernel panic: [ 0.795668] Unable to handle kernel NULL pointer dereference at virtual addre ss 0000000000000080 [ 0.802701] Mem abort info: [ 0.805367] ESR = 0x0000000096000004 [ 0.808950] EC = 0x25: DABT (current EL), IL = 32 bits [ 0.814033] SET = 0, FnV = 0 [ 0.816950] EA = 0, S1PTW = 0 [ 0.819950] FSC = 0x04: level 0 translation fault [ 0.824617] Data abort info: [ 0.827367] ISV = 0, ISS = 0x00000004 [ 0.831033] CM = 0, WnR = 0 [ 0.833866] [0000000000000080] user address but active_mm is swapper [ 0.839951] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP [ 0.845953] Modules linked in: [ 0.848869] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.1.1+g56321e101aca #1 [ 0.855617] Hardware name: Freescale i.MX8MP EVK (DT) [ 0.860452] pstate: 000000c5 (nzcv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 0.867117] pc : __imx_uart_rxint.constprop.0+0x11c/0x2c0 [ 0.872283] lr : imx_uart_int+0xf8/0x1ec The issue only happends in the inmate linux when Jailhouse hypervisor enabled. The test procedure is: while true; do jailhouse enable imx8mp.cell jailhouse cell linux xxxx sleep 10 jailhouse cell destroy 1 jailhouse disable sleep 5 done And during the upper test, press keys to the 2nd linux console. When `jailhouse cell destroy 1`, the 2nd linux has no chance to put the uart to a quiese state, so USR1/2 may has pending interrupts. Then when `jailhosue cell linux xx` to start 2nd linux again, the issue trigger. In order to disable irqs before requesting them, both UCR1 and UCR2 irqs should be disabled, so here fix that, disable the Ageing Timer interrupt in UCR2 as UCR1 does. Fixes: 8a61f0c70ae6 ("serial: imx: Disable irqs before requesting them") Suggested-by: Sherry Sun Reviewed-by: Sherry Sun Signed-off-by: Peng Fan Acked-by: Jason Liu Link: https://lore.kernel.org/r/20230206013016.29352-1-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit 3957b9501a5a8fa709ae4a47483714491471f6db Author: Shenwei Wang Date: Tue Feb 7 10:24:20 2023 -0600 serial: fsl_lpuart: fix RS485 RTS polariy inverse issue The previous 'commit 846651eca073 ("serial: fsl_lpuart: RS485 RTS polariy is inverse")' only fixed the inverse issue on lpuart 8bit platforms. This is a follow-up patch to fix the RS485 polarity inverse issue on lpuart 32bit platforms. Fixes: 03895cf41d18 ("tty: serial: fsl_lpuart: Add support for RS-485") Reported-by: Sherry Sun Signed-off-by: Shenwei Wang Link: https://lore.kernel.org/r/20230207162420.3647904-1-shenwei.wang@nxp.com Signed-off-by: Greg Kroah-Hartman commit 677e3ab71f83c71e1482d9698bd8159c44fed93d Author: Kiseok Jo Date: Wed Feb 8 09:24:20 2023 +0000 ASoC: dt-bindings: irondevice,sma1303: Rework binding and add missing properties Add the missing properties as compatible, reg, sound-dai-cells. And then check this file using 'make dt_binding_check'. Signed-off-by: Kiseok Jo Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230208092420.5037-8-kiseok.jo@irondevice.com Signed-off-by: Mark Brown commit 1f5ffd57c1bcdf02e5a35bf301734476c1bf6612 Author: Kiseok Jo Date: Wed Feb 8 09:24:18 2023 +0000 ASoC: SMA1303: Convert the TDM slot properties in devicetree to mixer It seems correct that the user changes the TDM slot needed after device probe. Signed-off-by: Kiseok Jo Link: https://lore.kernel.org/r/20230208092420.5037-6-kiseok.jo@irondevice.com Signed-off-by: Mark Brown commit 1edc70c3a4c2b07dceac3ab7d564a283549a2534 Author: Kiseok Jo Date: Wed Feb 8 09:24:17 2023 +0000 ASoC: SMA1303: Remove the I2C Retry property in devicetree It's necessary to set the value for each device, so remove that. Signed-off-by: Kiseok Jo Link: https://lore.kernel.org/r/20230208092420.5037-5-kiseok.jo@irondevice.com Signed-off-by: Mark Brown commit 55194032620ae97338ac435505f1296e13fbe821 Author: Kuninori Morimoto Date: Wed Feb 8 01:31:38 2023 +0000 ASoC: dt-bindings: renesas,rsnd.yaml: tidyup reg/reg-name Tidyup reg/reg-name "maxItems". Pointed by Krzysztof, and corrected by Rob. Link: https://lore.kernel.org/r/46974ae7-5f7f-8fc1-4ea8-fe77b58f5bfb@linaro.org Link: https://lore.kernel.org/r/20230207211621.GA4158591-robh@kernel.org Reported-by: Krzysztof Kozlowski Signed-off-by: Kuninori Morimoto Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/87pmalt01x.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 88e054e8df1db32cea4ccb911b67dba22f1ddfa2 Merge: cf13d6e4a9aa6 06cbcbfaa6510 Author: Greg Kroah-Hartman Date: Wed Feb 8 12:49:26 2023 +0100 Merge tag 'thunderbolt-for-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-next Mika writes: thunderbolt: Changes for v6.3 merge window This includes following Thunderbolt/USB4 changes for the v6.3 merge window: - Add support for DisplayPort bandwidth allocation mode - Debug logging improvements - Minor cleanups. All these have been in linux-next with no reported issues. * tag 'thunderbolt-for-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Add missing kernel-doc comment to tb_tunnel_maximum_bandwidth() thunderbolt: Handle bandwidth allocation mode enablement notification thunderbolt: Add support for DisplayPort bandwidth allocation mode thunderbolt: Include the additional DP IN double word in debugfs dump thunderbolt: Add functions to support DisplayPort bandwidth allocation mode thunderbolt: Increase timeout of DP OUT adapter handshake thunderbolt: Take CL states into account when waiting for link to come up thunderbolt: Improve debug logging in tb_available_bandwidth() thunderbolt: Log DP adapter type thunderbolt: Use decimal port number in control and tunnel logs too thunderbolt: Refactor tb_acpi_add_link() thunderbolt: Use correct type in tb_port_is_clx_enabled() prototype commit b505063910c134778202dfad9332dfcecb76bab3 Author: Greg Kroah-Hartman Date: Thu Feb 2 15:19:19 2023 +0100 powerpc/iommu: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230202141919.2298821-1-gregkh@linuxfoundation.org commit dcfecb989afdf9101ee42e2adf04756a2ea4819d Author: Nicholas Piggin Date: Fri Feb 3 21:17:18 2023 +1000 powerpc/64s/radix: Remove TLB_FLUSH_ALL test from range flushes This looks like it came across from x86, but x86 uses TLB_FLUSH_ALL as a parameter to internal functions. Powerpc never sets it anywhere. Remove the associated logic and leave a warning for now. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230203111718.1149852-4-npiggin@gmail.com commit d01dc25e47af9d30185ca12bb9e221d6af915d9f Author: Nicholas Piggin Date: Fri Feb 3 21:17:17 2023 +1000 powerpc/64s/radix: mm->context.id should always be valid The MMU_NO_CONTEXT checks are an unnecessary complication. Make these warn to prepare to remove them in future. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230203111718.1149852-3-npiggin@gmail.com commit 45abf5d94b9bd0eebca5c7272788e2d16c8b5b43 Author: Nicholas Piggin Date: Fri Feb 3 21:17:16 2023 +1000 powerpc/64s/radix: Remove need_flush_all test from radix__tlb_flush need_flush_all is only set by arch code to instruct generic tlb_flush to flush all. It is never set by powerpc, so it can be removed. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230203111718.1149852-2-npiggin@gmail.com commit 4b10306e98456aed03cad75ce467e8b1efdccca0 Author: Christophe Leroy Date: Thu Feb 2 12:01:04 2023 +0100 powerpc: Disable CPU unknown by CLANG when CC_IS_CLANG CLANG only knows the following CPUs: generic, 440, 450, 601, 602, 603, 603e, 603ev, 604, 604e, 620, 630, g3, 7400, g4, 7450, g4+, 750, 8548, 970, g5, a2, e500, e500mc, e5500, power3, pwr3, power4, pwr4, power5, pwr5, power5x, pwr5x, power6, pwr6, power6x, pwr6x, power7, pwr7, power8, pwr8, power9, pwr9, power10, pwr10, powerpc, ppc, ppc32, powerpc64, ppc64, powerpc64le, ppc64le, futur Disable other ones when CC_IS_CLANG. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e62892e32c14a7a5738c597e39e0082cb0abf21c.1675335659.git.christophe.leroy@csgroup.eu commit 3048a4deee801c549259fe044f71a3fcd55591a8 Author: Durai Manickam KR Date: Tue Feb 7 16:36:51 2023 +0530 ARM: dts: at91: sam9x60_curiosity: Add device tree for sam9x60 curiosity board Add device tree file for sam9x60 curiosity board. Signed-off-by: Durai Manickam KR Reviewed-by: Claudiu Beznea Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230207110651.197268-9-durai.manickamkr@microchip.com commit 6f712a3081c952f75f55414695902263d70628eb Author: Durai Manickam KR Date: Tue Feb 7 16:36:50 2023 +0530 dt-bindings: arm: at91: Add info on sam9x60 curiosity Adding the sam9x60 curiosity board from Microchip into the atmel AT91 board description yaml file. Signed-off-by: Durai Manickam KR Acked-by: Krzysztof Kozlowski Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230207110651.197268-8-durai.manickamkr@microchip.com commit 99c8083358772362bcf157b752cec9a00445d97a Author: Manikandan Muralidharan Date: Tue Feb 7 16:36:49 2023 +0530 ARM: dts: at91: sam9x60: Add missing flexcom definitions Added the missing flexcom functions for all the flexcom nodes. Signed-off-by: Manikandan Muralidharan [durai.manickamkr@microchip.com: added missing UART compatibles] Signed-off-by: Durai Manickam KR Reviewed-by: Claudiu Beznea Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230207110651.197268-7-durai.manickamkr@microchip.com commit 4be5375b3c351b5c3d7d54d7a9b541d7c589bf94 Author: Manikandan Muralidharan Date: Tue Feb 7 16:36:48 2023 +0530 ARM: dts: at91: sam9x60: Add DMA bindings for the flexcom nodes Add dma bindings for flexcom nodes in the soc dtsi file. Users those who don't wish to use the DMA function for their flexcom functions can overwrite the dma bindings in the board device tree file. Signed-off-by: Manikandan Muralidharan [durai.manickamkr@microchip.com: fixed code indentation and updated commit log] Signed-off-by: Durai Manickam KR Reviewed-by: Claudiu Beznea Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230207110651.197268-6-durai.manickamkr@microchip.com commit bfbde8f751cc2a9bbc184853066c927173d147df Author: Manikandan Muralidharan Date: Tue Feb 7 16:36:47 2023 +0530 ARM: dts: at91: sam9x60: Specify the FIFO size for the Flexcom UART The UART submodule in Flexcom has 16-byte Transmit and Receive FIFOs. Signed-off-by: Manikandan Muralidharan Signed-off-by: Durai Manickam KR Reviewed-by: Claudiu Beznea Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230207110651.197268-5-durai.manickamkr@microchip.com commit 35052e8bc848399592905bd8dd4d239e19c51436 Author: Durai Manickam KR Date: Tue Feb 7 16:36:46 2023 +0530 ARM: dts: at91: sam9x60: fix spi4 node The ranges, #address-cells and #size-cells properties are not required, remove them from the spi4 node. Signed-off-by: Durai Manickam KR Reviewed-by: Claudiu Beznea Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230207110651.197268-4-durai.manickamkr@microchip.com commit 84f23f3284d5e7c85d9240382b536c4aaea90469 Author: Manikandan Muralidharan Date: Tue Feb 7 16:36:45 2023 +0530 ARM: dts: at91: sam9x60: move flexcom definitions Move the flexcom definitions from board specific DTS file to the SoC specific DTSI file for sam9x60ek. [durai.manickamkr@microchip.com: Logical split-up of this patch and added missing UART5 compatibles] Signed-off-by: Manikandan Muralidharan Signed-off-by: Hari Prasath Gujulan Elango Signed-off-by: Durai Manickam KR Reviewed-by: Claudiu Beznea Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230207110651.197268-3-durai.manickamkr@microchip.com commit 250d6747fdd8f347cebd81f9fa932b75a841cea2 Author: Manikandan Muralidharan Date: Tue Feb 7 16:36:44 2023 +0530 ARM: dts: at91: sam9x60: Fix the label numbering for the flexcom functions Fixed the label numbering of the flexcom functions so that all 13 flexcom functions of sam9x60 are in the following order when the missing flexcom functions are added: flx0: uart0, spi0, i2c0 flx1: uart1, spi1, i2c1 flx2: uart2, spi2, i2c2 flx3: uart3, spi3, i2c3 flx4: uart4, spi4, i2c4 flx5: uart5, spi5, i2c5 flx6: uart6, i2c6 flx7: uart7, i2c7 flx8: uart8, i2c8 flx9: uart9, i2c9 flx10: uart10, i2c10 flx11: uart11, i2c11 flx12: uart12, i2c12 Signed-off-by: Manikandan Muralidharan Signed-off-by: Durai Manickam KR Reviewed-by: Claudiu Beznea Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230207110651.197268-2-durai.manickamkr@microchip.com commit e6ebe6c12355538e9238e2051bd6757b12dbfe9c Merge: 6da13bf976578 39b02d6d104a2 Author: David S. Miller Date: Wed Feb 8 09:48:53 2023 +0000 Merge branch 'taprio-auto-qmaxsdu-new-tx' Vladimir Oltean says: ==================== taprio automatic queueMaxSDU and new TXQ selection procedure This patch set addresses 2 design limitations in the taprio software scheduler: 1. Software scheduling fundamentally prioritizes traffic incorrectly, in a way which was inspired from Intel igb/igc drivers and does not follow the inputs user space gives (traffic classes and TC to TXQ mapping). Patch 05/15 handles this, 01/15 - 04/15 are preparations for this work. 2. Software scheduling assumes that the gate for a traffic class closes as soon as the next interval begins. But this isn't true. If consecutive schedule entries have that traffic class gate open, there is no "gate close" event and taprio should keep dequeuing from that TC without interruptions. Patches 06/15 - 15/15 handle this. Patch 10/15 is a generic Qdisc change required for this to work. Future development directions which depend on this patch set are: - Propagating the automatic queueMaxSDU calculation down to offloading device drivers, instead of letting them calculate this, as vsc9959_tas_guard_bands_update() does today. - A software data path for tc-taprio with preemptible traffic and Hold/Release events. v1 at: https://patchwork.kernel.org/project/netdevbpf/cover/20230128010719.2182346-1-vladimir.oltean@nxp.com/ ==================== Signed-off-by: David S. Miller commit 39b02d6d104a285836d98be2ad00c7f484d43a16 Author: Vladimir Oltean Date: Tue Feb 7 15:54:40 2023 +0200 net/sched: taprio: don't segment unnecessarily Improve commit 497cc00224cf ("taprio: Handle short intervals and large packets") to only perform segmentation when skb->len exceeds what taprio_dequeue() expects. In practice, this will make the biggest difference when a traffic class gate is always open in the schedule. This is because the max_frm_len will be U32_MAX, and such large skb->len values as Kurt reported will be sent just fine unsegmented. What I don't seem to know how to handle is how to make sure that the segmented skbs themselves are smaller than the maximum frame size given by the current queueMaxSDU[tc]. Nonetheless, we still need to drop those, otherwise the Qdisc will hang. Signed-off-by: Vladimir Oltean Reviewed-by: Kurt Kanzenbach Signed-off-by: David S. Miller commit 2d5e8071c47a03218f3f658ed13b8a9ff703b396 Author: Vladimir Oltean Date: Tue Feb 7 15:54:39 2023 +0200 net/sched: taprio: split segmentation logic from qdisc_enqueue() The majority of the taprio_enqueue()'s function is spent doing TCP segmentation, which doesn't look right to me. Compilers shouldn't have a problem in inlining code no matter how we write it, so move the segmentation logic to a separate function. Signed-off-by: Vladimir Oltean Reviewed-by: Kurt Kanzenbach Signed-off-by: David S. Miller commit fed87cc6718ad5f80aa739fee3c5979a8b09d3a6 Author: Vladimir Oltean Date: Tue Feb 7 15:54:38 2023 +0200 net/sched: taprio: automatically calculate queueMaxSDU based on TC gate durations taprio today has a huge problem with small TC gate durations, because it might accept packets in taprio_enqueue() which will never be sent by taprio_dequeue(). Since not much infrastructure was available, a kludge was added in commit 497cc00224cf ("taprio: Handle short intervals and large packets"), which segmented large TCP segments, but the fact of the matter is that the issue isn't specific to large TCP segments (and even worse, the performance penalty in segmenting those is absolutely huge). In commit a54fc09e4cba ("net/sched: taprio: allow user input of per-tc max SDU"), taprio gained support for queueMaxSDU, which is precisely the mechanism through which packets should be dropped at qdisc_enqueue() if they cannot be sent. After that patch, it was necessary for the user to manually limit the maximum MTU per TC. This change adds the necessary logic for taprio to further limit the values specified (or not specified) by the user to some minimum values which never allow oversized packets to be sent. Signed-off-by: Vladimir Oltean Reviewed-by: Kurt Kanzenbach Signed-off-by: David S. Miller commit a878fd46fe43ec97f3f8664173fe1d23984c3453 Author: Vladimir Oltean Date: Tue Feb 7 15:54:37 2023 +0200 net/sched: keep the max_frm_len information inside struct sched_gate_list I have one practical reason for doing this and one concerning correctness. The practical reason has to do with a follow-up patch, which aims to mix 2 sources of max_sdu (one coming from the user and the other automatically calculated based on TC gate durations @current link speed). Among those 2 sources of input, we must always select the smaller max_sdu value, but this can change at various link speeds. So the max_sdu coming from the user must be kept separated from the value that is operationally used (the minimum of the 2), because otherwise we overwrite it and forget what the user asked us to do. To solve that, this patch proposes that struct sched_gate_list contains the operationally active max_frm_len, and q->max_sdu contains just what was requested by the user. The reason having to do with correctness is based on the following observation: the admin sched_gate_list becomes operational at a given base_time in the future. Until then, it is inactive and applies no shaping, all gates are open, etc. So the queueMaxSDU dropping shouldn't apply either (this is a mechanism to ensure that packets smaller than the largest gate duration for that TC don't hang the port; clearly it makes little sense if the gates are always open). Signed-off-by: Vladimir Oltean Reviewed-by: Kurt Kanzenbach Signed-off-by: David S. Miller commit a3d91b2c6f6b8ef88785bf8d2fba74916af6c7c5 Author: Vladimir Oltean Date: Tue Feb 7 15:54:36 2023 +0200 net/sched: taprio: warn about missing size table Vinicius intended taprio to take the L1 overhead into account when estimating packet transmission time through user input, specifically through the qdisc size table (man tc-stab). Something like this: tc qdisc replace dev $eth root stab overhead 24 taprio \ 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 \ base-time 0 \ sched-entry S 0x7e 9000000 \ sched-entry S 0x82 1000000 \ max-sdu 0 0 0 0 0 0 0 200 \ flags 0x0 clockid CLOCK_TAI Without the overhead being specified, transmission times will be underestimated and will cause late transmissions. For an offloading driver, it might even cause TX hangs if there is no open gate large enough to send the maximum sized packets for that TC (including L1 overhead). Properly knowing the L1 overhead will ensure that we are able to auto-calculate the queueMaxSDU per traffic class just right, and avoid these hangs due to head-of-line blocking. We can't make the stab mandatory due to existing setups, but we can warn the user that it's important with a warning netlink extack. Link: https://patchwork.kernel.org/project/netdevbpf/patch/20220505160357.298794-1-vladimir.oltean@nxp.com/ Signed-off-by: Vladimir Oltean Reviewed-by: Kurt Kanzenbach Signed-off-by: David S. Miller commit 1f62879e36324d710dfd5ab92833fb1c51d8334a Author: Vladimir Oltean Date: Tue Feb 7 15:54:35 2023 +0200 net/sched: make stab available before ops->init() call Some qdiscs like taprio turn out to be actually pretty reliant on a well configured stab, to not underestimate the skb transmission time (by properly accounting for L1 overhead). In a future change, taprio will need the stab, if configured by the user, to be available at ops->init() time. It will become even more important in upcoming work, when the overhead will be used for the queueMaxSDU calculation that is passed to an offloading driver. However, rcu_assign_pointer(sch->stab, stab) is called right after ops->init(), making it unavailable, and I don't really see a good reason for that. Move it earlier, which nicely seems to simplify the error handling path as well. Signed-off-by: Vladimir Oltean Reviewed-by: Kurt Kanzenbach Signed-off-by: David S. Miller commit a1e6ad30fa193962b5aa61ea4d12ee83a7ce9020 Author: Vladimir Oltean Date: Tue Feb 7 15:54:34 2023 +0200 net/sched: taprio: calculate guard band against actual TC gate close time taprio_dequeue_from_txq() looks at the entry->end_time to determine whether the skb will overrun its traffic class gate, as if at the end of the schedule entry there surely is a "gate close" event for it. Hint: maybe there isn't. For each schedule entry, introduce an array of kernel times which actually tracks when in the future will there be an *actual* gate close event for that traffic class, and use that in the guard band overrun calculation. Signed-off-by: Vladimir Oltean Reviewed-by: Kurt Kanzenbach Signed-off-by: David S. Miller commit d2ad689dec10d4f61647f6963e2c94113049ed6c Author: Vladimir Oltean Date: Tue Feb 7 15:54:33 2023 +0200 net/sched: taprio: calculate budgets per traffic class Currently taprio assumes that the budget for a traffic class expires at the end of the current interval as if the next interval contains a "gate close" event for this traffic class. This is, however, an unfounded assumption. Allow schedule entry intervals to be fused together for a particular traffic class by calculating the budget until the gate *actually* closes. This means we need to keep budgets per traffic class, and we also need to update the budget consumption procedure. Signed-off-by: Vladimir Oltean Reviewed-by: Kurt Kanzenbach Signed-off-by: David S. Miller commit e5517551112ff2395611e552443932152f83672d Author: Vladimir Oltean Date: Tue Feb 7 15:54:32 2023 +0200 net/sched: taprio: rename close_time to end_time There is a confusion in terms in taprio which makes what is called "close_time" to be actually used for 2 things: 1. determining when an entry "closes" such that transmitted skbs are never allowed to overrun that time (?!) 2. an aid for determining when to advance and/or restart the schedule using the hrtimer It makes more sense to call this so-called "close_time" "end_time", because it's not clear at all to me what "closes". Future patches will hopefully make better use of the term "to close". This is an absolutely mechanical change. Signed-off-by: Vladimir Oltean Reviewed-by: Kurt Kanzenbach Signed-off-by: David S. Miller commit a306a90c8ffe1c4a29f8e8a1221d1c000e58a410 Author: Vladimir Oltean Date: Tue Feb 7 15:54:31 2023 +0200 net/sched: taprio: calculate tc gate durations Current taprio code operates on a very simplistic (and incorrect) assumption: that egress scheduling for a traffic class can only take place for the duration of the current interval, or i.o.w., it assumes that at the end of each schedule entry, there is a "gate close" event for all traffic classes. As an example, traffic sent with the schedule below will be jumpy, even though all 8 TC gates are open, so there is absolutely no "gate close" event (effectively a transition from BIT(tc)==1 to BIT(tc)==0 in consecutive schedule entries): tc qdisc replace dev veth0 parent root taprio \ num_tc 2 \ map 0 1 \ queues 1@0 1@1 \ base-time 0 \ sched-entry S 0xff 4000000000 \ clockid CLOCK_TAI \ flags 0x0 This qdisc simply does not have what it takes in terms of logic to *actually* compute the durations of traffic classes. Also, it does not recognize the need to use this information on a per-traffic-class basis: it always looks at entry->interval and entry->close_time. This change proposes that each schedule entry has an array called tc_gate_duration[tc]. This holds the information: "for how long will this traffic class gate remain open, starting from *this* schedule entry". If the traffic class gate is always open, that value is equal to the cycle time of the schedule. We'll also need to keep track, for the purpose of queueMaxSDU[tc] calculation, what is the maximum time duration for a traffic class having an open gate. This gives us directly what is the maximum sized packet that this traffic class will have to accept. For everything else it has to qdisc_drop() it in qdisc_enqueue(). Signed-off-by: Vladimir Oltean Reviewed-by: Kurt Kanzenbach Signed-off-by: David S. Miller commit 2f530df76c8cb5551d7d9395c77eb02282c3dc68 Author: Vladimir Oltean Date: Tue Feb 7 15:54:30 2023 +0200 net/sched: taprio: give higher priority to higher TCs in software dequeue mode Current taprio software implementation is haunted by the shadow of the igb/igc hardware model. It iterates over child qdiscs in increasing order of TXQ index, therefore giving higher xmit priority to TXQ 0 and lower to TXQ N. According to discussions with Vinicius, that is the default (perhaps even unchangeable) prioritization scheme used for the NICs that taprio was first written for (igb, igc), and we have a case of two bugs canceling out, resulting in a functional setup on igb/igc, but a less sane one on other NICs. To the best of my understanding, taprio should prioritize based on the traffic class, so it should really dequeue starting with the highest traffic class and going down from there. We get to the TXQ using the tc_to_txq[] netdev property. TXQs within the same TC have the same (strict) priority, so we should pick from them as fairly as we can. We can achieve that by implementing something very similar to q->curband from multiq_dequeue(). Since igb/igc really do have TXQ 0 of higher hardware priority than TXQ 1 etc, we need to preserve the behavior for them as well. We really have no choice, because in txtime-assist mode, taprio is essentially a software scheduler towards offloaded child tc-etf qdiscs, so the TXQ selection really does matter (not all igb TXQs support ETF/SO_TXTIME, says Kurt Kanzenbach). To preserve the behavior, we need a capability bit so that taprio can determine if it's running on igb/igc, or on something else. Because igb doesn't offload taprio at all, we can't piggyback on the qdisc_offload_query_caps() call from taprio_enable_offload(), but instead we need a separate call which is also made for software scheduling. Introduce two static keys to minimize the performance penalty on systems which only have igb/igc NICs, and on systems which only have other NICs. For mixed systems, taprio will have to dynamically check whether to dequeue using one prioritization algorithm or using the other. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 4c22942734f0814d3c928c25a80f48df0a6ce45e Author: Vladimir Oltean Date: Tue Feb 7 15:54:29 2023 +0200 net/sched: taprio: avoid calling child->ops->dequeue(child) twice Simplify taprio_dequeue_from_txq() by noticing that we can goto one call earlier than the previous skb_found label. This is possible because we've unified the treatment of the child->ops->dequeue(child) return call, we always try other TXQs now, instead of abandoning the root dequeue completely if we failed in the peek() case. Signed-off-by: Vladimir Oltean Reviewed-by: Kurt Kanzenbach Signed-off-by: David S. Miller commit 92f966674f6a257eddfa60a85f9b6741d6087ccb Author: Vladimir Oltean Date: Tue Feb 7 15:54:28 2023 +0200 net/sched: taprio: refactor one skb dequeue from TXQ to separate function Future changes will refactor the TXQ selection procedure, and a lot of stuff will become messy, the indentation of the bulk of the dequeue procedure would increase, etc. Break out the bulk of the function into a new one, which knows the TXQ (child qdisc) we should perform a dequeue from. Signed-off-by: Vladimir Oltean Reviewed-by: Kurt Kanzenbach Signed-off-by: David S. Miller commit 1638bbbe4ececa615b273497d347d59ad71060a2 Author: Vladimir Oltean Date: Tue Feb 7 15:54:27 2023 +0200 net/sched: taprio: continue with other TXQs if one dequeue() failed This changes the handling of an unlikely condition to not stop dequeuing if taprio failed to dequeue the peeked skb in taprio_dequeue(). I've no idea when this can happen, but the only side effect seems to be that the atomic_sub_return() call right above will have consumed some budget. This isn't a big deal, since either that made us remain without any budget (and therefore, we'd exit on the next peeked skb anyway), or we could send some packets from other TXQs. I'm making this change because in a future patch I'll be refactoring the dequeue procedure to simplify it, and this corner case will have to go away. Signed-off-by: Vladimir Oltean Reviewed-by: Kurt Kanzenbach Signed-off-by: David S. Miller commit ecc0cc98632ac80ead7821997fdd5ad9cdede9de Author: Vladimir Oltean Date: Tue Feb 7 15:54:26 2023 +0200 net/sched: taprio: delete peek() implementation There isn't any code in the network stack which calls taprio_peek(). We only see qdisc->ops->peek() being called on child qdiscs of other classful qdiscs, never from the generic qdisc code. Whereas taprio is never a child qdisc, it is always root. This snippet of a comment from qdisc_peek_dequeued() seems to confirm: /* we can reuse ->gso_skb because peek isn't called for root qdiscs */ Since I've been known to be wrong many times though, I'm not completely removing it, but leaving a stub function in place which emits a warning. Signed-off-by: Vladimir Oltean Reviewed-by: Kurt Kanzenbach Signed-off-by: David S. Miller commit 6da13bf9765789e6b9e683d15aa0163adbb33381 Merge: 9ed138ff37670 33e581d76e352 Author: David S. Miller Date: Wed Feb 8 09:16:07 2023 +0000 Merge branch 'micrel-lan8841-support' Horatiu Vultur says: ==================== net: micrel: Add support for lan8841 PHY Add support for lan8841 PHY. The first patch add the support for lan8841 PHY which can run at 10/100/1000Mbit. It also has support for other features, but they are not added in this series. The second patch updates the documentation for the dt-bindings which is similar to the ksz9131. v3->v4: - add space between defines and function names - inside lan8841_config_init use only ret variable v2->v3: - reuse ksz9131_config_init - allow only open-drain configuration - change from single patch to a patch series v1->v2: - Remove hardcoded values - Fix typo in commit message ==================== Signed-off-by: David S. Miller commit 33e581d76e3527dfa5aea59327f969a59322fc2e Author: Horatiu Vultur Date: Tue Feb 7 11:52:12 2023 +0100 dt-bindings: net: micrel-ksz90x1.txt: Update for lan8841 The lan8841 has the same bindings as ksz9131, so just reuse the entire section of ksz9131. Reviewed-by: Andrew Lunn Acked-by: Krzysztof Kozlowski Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller commit a8f1a19d27ef9b13574195ae1571158529473541 Author: Horatiu Vultur Date: Tue Feb 7 11:52:11 2023 +0100 net: micrel: Add support for lan8841 PHY The LAN8841 is completely integrated triple-speed (10BASE-T/ 100BASE-TX/ 1000BASE-T) Ethernet physical layer transceivers for transmission and reception of data on standard CAT-5, as well as CAT-5e and CAT-6, unshielded twisted pair (UTP) cables. The LAN8841 offers the industry-standard GMII/MII as well as the RGMII. Some of the features of the PHY are: - Wake on LAN - Auto-MDIX - IEEE 1588-2008 (V2) - LinkMD Capable diagnosis Currently the patch offers support only for link configuration. Signed-off-by: Horatiu Vultur Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 9ed138ff37670e7eb6291d822f5648de685cfb32 Author: Horatiu Vultur Date: Tue Feb 7 11:35:49 2023 +0100 net: lan966x: Add support for TC flower filter statistics Add flower filter packet statistics. This will just read the TCAM counter of the rule, which mention how many packages were hit by this rule. Reviewed-by: Simon Horman Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller commit 5fc5b94a273655128159186c87662105db8afeb5 Author: Alexander Gordeev Date: Fri Jan 29 12:29:06 2021 +0100 s390/virtio: sort out physical vs virtual pointers usage This does not fix a real bug, since virtual addresses are currently indentical to physical ones. Reviewed-by: Nico Boehr Signed-off-by: Alexander Gordeev Signed-off-by: Janosch Frank commit 1abb32697a0d0a308d24fe75b1b7caf54c1f7a51 Author: Nico Boehr Date: Mon Nov 7 09:57:27 2022 +0100 KVM: s390: GISA: sort out physical vs virtual pointers usage Fix virtual vs physical address confusion (which currently are the same). In chsc_sgib(), do the virtual-physical conversion in the caller since the caller needs to make sure it is a 31-bit address and zero has a special meaning (disassociating the GIB). Signed-off-by: Nico Boehr Reviewed-by: Claudio Imbrenda Reviewed-by: Michael Mueller Link: https://lore.kernel.org/r/20221107085727.1533792-1-nrb@linux.ibm.com Message-Id: <20221107085727.1533792-1-nrb@linux.ibm.com> Signed-off-by: Janosch Frank commit 9cd9842c46996ef62173c36619c746f57416bcb0 Author: Mustafa Ismail Date: Tue Feb 7 14:19:38 2023 -0600 RDMA/irdma: Cap MSIX used to online CPUs + 1 The irdma driver can use a maximum number of msix vectors equal to num_online_cpus() + 1 and the kernel warning stack below is shown if that number is exceeded. The kernel throws a warning as the driver tries to update the affinity hint with a CPU mask greater than the max CPU IDs. Fix this by capping the MSIX vectors to num_online_cpus() + 1. WARNING: CPU: 7 PID: 23655 at include/linux/cpumask.h:106 irdma_cfg_ceq_vector+0x34c/0x3f0 [irdma] RIP: 0010:irdma_cfg_ceq_vector+0x34c/0x3f0 [irdma] Call Trace: irdma_rt_init_hw+0xa62/0x1290 [irdma] ? irdma_alloc_local_mac_entry+0x1a0/0x1a0 [irdma] ? __is_kernel_percpu_address+0x63/0x310 ? rcu_read_lock_held_common+0xe/0xb0 ? irdma_lan_unregister_qset+0x280/0x280 [irdma] ? irdma_request_reset+0x80/0x80 [irdma] ? ice_get_qos_params+0x84/0x390 [ice] irdma_probe+0xa40/0xfc0 [irdma] ? rcu_read_lock_bh_held+0xd0/0xd0 ? irdma_remove+0x140/0x140 [irdma] ? rcu_read_lock_sched_held+0x62/0xe0 ? down_write+0x187/0x3d0 ? auxiliary_match_id+0xf0/0x1a0 ? irdma_remove+0x140/0x140 [irdma] auxiliary_bus_probe+0xa6/0x100 __driver_probe_device+0x4a4/0xd50 ? __device_attach_driver+0x2c0/0x2c0 driver_probe_device+0x4a/0x110 __driver_attach+0x1aa/0x350 bus_for_each_dev+0x11d/0x1b0 ? subsys_dev_iter_init+0xe0/0xe0 bus_add_driver+0x3b1/0x610 driver_register+0x18e/0x410 ? 0xffffffffc0b88000 irdma_init_module+0x50/0xaa [irdma] do_one_initcall+0x103/0x5f0 ? perf_trace_initcall_level+0x420/0x420 ? do_init_module+0x4e/0x700 ? __kasan_kmalloc+0x7d/0xa0 ? kmem_cache_alloc_trace+0x188/0x2b0 ? kasan_unpoison+0x21/0x50 do_init_module+0x1d1/0x700 load_module+0x3867/0x5260 ? layout_and_allocate+0x3990/0x3990 ? rcu_read_lock_held_common+0xe/0xb0 ? rcu_read_lock_sched_held+0x62/0xe0 ? rcu_read_lock_bh_held+0xd0/0xd0 ? __vmalloc_node_range+0x46b/0x890 ? lock_release+0x5c8/0xba0 ? alloc_vm_area+0x120/0x120 ? selinux_kernel_module_from_file+0x2a5/0x300 ? __inode_security_revalidate+0xf0/0xf0 ? __do_sys_init_module+0x1db/0x260 __do_sys_init_module+0x1db/0x260 ? load_module+0x5260/0x5260 ? do_syscall_64+0x22/0x450 do_syscall_64+0xa5/0x450 entry_SYSCALL_64_after_hwframe+0x66/0xdb Fixes: 44d9e52977a1 ("RDMA/irdma: Implement device initialization definitions") Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Sindhu Devale Link: https://lore.kernel.org/r/20230207201938.1329-1-sindhu.devale@intel.com Signed-off-by: Leon Romanovsky commit 4e5bd3fdbeb3100d1f120999130afb2a7d41d82a Author: Michael Tretter Date: Fri Jan 13 10:54:22 2023 +0100 media: imx-pxp: convert to regmap Replace the readl and writel with regmap to ease debugging the registers from userspace. Suggested-by: Alexander Stein Signed-off-by: Michael Tretter Reviewed-by: Philipp Zabel Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 4d25e97747d3f94c0e8ae9c0da2db801256908d0 Author: Laurent Pinchart Date: Fri Jan 13 10:54:21 2023 +0100 media: imx-pxp: Use non-threaded IRQ There's no need to use threaded IRQs with the PXP, as the interrupt handler doesn't need to sleep and doesn't perform any time-consuming operation. Switch to regular IRQ handler. This fixes lockups of the PXP noticed on i.MX7, where the PXP would stop generating interrupts after a variable number of frames (from a few dozens to a few hundreds). The root cause is however unknown. Signed-off-by: Laurent Pinchart Signed-off-by: Michael Tretter Reviewed-by: Philipp Zabel Signed-off-by: Mauro Carvalho Chehab commit 36e5c36240cc94e0d00ad9b900e19479604b8965 Author: Laurent Pinchart Date: Fri Jan 13 10:54:20 2023 +0100 media: imx-pxp: Introduce pxp_read() and pxp_write() wrappers Add pxp_read() and pxp_write() functions to wrap readl() and writel() respectively. This can be useful for debugging register accesses. Signed-off-by: Laurent Pinchart Signed-off-by: Michael Tretter Reviewed-by: Philipp Zabel Signed-off-by: Mauro Carvalho Chehab commit 8293b3ee2418754a1632123501c184e9559210ce Author: Laurent Pinchart Date: Fri Jan 13 10:54:19 2023 +0100 media: imx-pxp: Implement frame size enumeration Implement support for the VIDIOC_ENUM_FRAMESIZES ioctl. Signed-off-by: Laurent Pinchart Signed-off-by: Michael Tretter Reviewed-by: Philipp Zabel Signed-off-by: Mauro Carvalho Chehab commit 8b57a21a77d8e9fac7ad1a542395c4a562571752 Author: Laurent Pinchart Date: Fri Jan 13 10:54:18 2023 +0100 media: imx-pxp: Pass pixel format value to find_format() The find_format() function looks up format information for a given pixel format. It takes a v4l2_format pointer, but only uses the contained pixel format value. To prepare it for being used by callers that don't have v4l2_format, modify it to take the pixel format value directly. Signed-off-by: Laurent Pinchart Signed-off-by: Michael Tretter Reviewed-by: Philipp Zabel Signed-off-by: Mauro Carvalho Chehab commit ff89b9b425c86e91f8a840bf7e037302fb3ed7c1 Author: Laurent Pinchart Date: Fri Jan 13 10:54:17 2023 +0100 media: imx-pxp: Add media controller support Register a media device for the PXP, using the v4l2-mem2mem MC infrastructure to populate the media graph. No media device operation is implemented, the main use of the MC API is to allow consistent discovery of media devices for userspace. Signed-off-by: Laurent Pinchart Signed-off-by: Michael Tretter Reviewed-by: Philipp Zabel Signed-off-by: Mauro Carvalho Chehab commit 15acb0824eca2871ea58d09db664422512677966 Author: Laurent Pinchart Date: Fri Jan 13 10:54:16 2023 +0100 media: imx-pxp: Don't set bus_info manually in .querycap() The v4l2_capability.bus_info field is set by the V4L2 core when left empty by the .querycap() handler. This is the recommended practice, in order to ensure bus_info coherence between drivers. Don't set it manually. Signed-off-by: Laurent Pinchart Signed-off-by: Michael Tretter Reviewed-by: Philipp Zabel Signed-off-by: Mauro Carvalho Chehab commit 371ab9c41be7514c7699aea1ff221519fdb7d127 Author: Laurent Pinchart Date: Fri Jan 13 10:54:15 2023 +0100 media: imx-pxp: Sort headers alphabetically Sorting headers alphabetically helps locating duplicates, and make it easier to figure out where to insert new headers. Signed-off-by: Laurent Pinchart Signed-off-by: Michael Tretter Reviewed-by: Philipp Zabel Signed-off-by: Mauro Carvalho Chehab commit cbcd23735726d544380b0a4fe1409950b4becf1c Author: Michael Tretter Date: Fri Jan 13 10:54:13 2023 +0100 media: imx-pxp: add support for i.MX7D The i.MX7D needs a different data path configuration than the i.MX6ULL. Configure the data path as close as possible to the data path on the i.MX6ULL. Signed-off-by: Michael Tretter Reviewed-by: Philipp Zabel Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 76985f4e8d34e0c20f2cde6017914ab9ce49aa17 Author: Michael Tretter Date: Fri Jan 13 10:54:12 2023 +0100 media: imx-pxp: make data_path_ctrl0 platform dependent Unfortunately, the PXP_HW_VERSION register reports the PXP on the i.MX7D and on the i.MX6ULL as version 3.0, although the PXP versions on these SoCs have significant differences. Use the compatible to configure the ctrl0 register as required dependent on the platform. Signed-off-by: Michael Tretter Reviewed-by: Philipp Zabel Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit fb2e9aa84243db9f2707e4cf257d95a13f9fce23 Author: Michael Tretter Date: Fri Jan 13 10:54:11 2023 +0100 media: imx-pxp: disable LUT block The LUT block is always configured in bypass mode. Take it entirely out of the pipeline by disabling it and routing the data path around the LUT. Signed-off-by: Michael Tretter Reviewed-by: Philipp Zabel Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 47956c921d6a3f6b07007374b6ca96b1675f6114 Author: Michael Tretter Date: Fri Jan 13 10:54:10 2023 +0100 media: imx-pxp: explicitly disable unused blocks Various multiplexers in the pipeline are not used with the currently configured data path. Disable all unused multiplexers by selecting the "no output" (3) option. The datasheet doesn't explicitly require this, but the PXP has been seen to hang after processing a few hundreds of frames otherwise. As at it, add documentation for the multiplexers that are actually relevant for the data path. Signed-off-by: Michael Tretter Reviewed-by: Philipp Zabel Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 9fb41a05837583e28a9e8d7d7e4802626dcbc32a Author: Michael Tretter Date: Fri Jan 13 10:54:09 2023 +0100 media: imx-pxp: extract helper function to setup data path The driver must configure the data path through the Pixel Pipeline. Currently, the driver is using a fixed setup, but once there are different pipeline configurations, it is helpful to have a dedicated function for determining the register value for the data path. Signed-off-by: Michael Tretter Reviewed-by: Philipp Zabel Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit a4a69d1386765102640a45002bff6f7db704486d Author: Michael Tretter Date: Fri Jan 13 10:54:08 2023 +0100 media: imx-pxp: detect PXP version Different versions of the Pixel Pipeline have different blocks and their routing may be different. Read the PXP_HW_VERSION register to determine the version of the PXP and print it to the log for debugging purposes. Signed-off-by: Michael Tretter Reviewed-by: Philipp Zabel Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 3ac7165d7221421f7a44097f43ab7790e6f9432c Author: Michael Tretter Date: Mon Jan 16 12:38:56 2023 +0100 media: dt-bindings: media: fsl-pxp: convert to yaml Convert the bindings of the Freescale Pixel Pipeline to YAML. The conversion drops the previously listed compatibles for several SoCs. It is unclear, if the PXP on these SoCs is compatible to any of the PXPs on the existing SoCs and would allow to reuse the already defined compatibles. The missing compatibles should be brought back when the support for the PXP on these SoCs is added. Reviewed-by: Philipp Zabel Signed-off-by: Michael Tretter Reviewed-by: Krzysztof Kozlowski Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 77645c6e3a1a3707e71732f6d5151c12e9110e37 Author: Laurent Pinchart Date: Thu Jan 26 02:10:01 2023 +0100 media: imx-mipi-csis: Implement .init_cfg() using .set_fmt() The .set_fmt() handler is responsible for adjusting the requested format based on the device limitations. Implement .init_cfg() as a wrapper of .set_fmt(), to ensure that the initial configuration always matches the rules implemented in .set_fmt(), should they ever change. Signed-off-by: Laurent Pinchart Tested-by: Adam Ford #imx8mn-beacon Acked-by: Rui Miguel Silva Signed-off-by: Mauro Carvalho Chehab commit 11927d0fd0d0e428ad19f65768b3abe316bff066 Author: Laurent Pinchart Date: Thu Jan 26 02:10:01 2023 +0100 media: imx-mipi-csis: Use V4L2 subdev active state Use the V4L2 subdev active state API to store the active format. This simplifies the driver not only by dropping the mipi_csis_device csis_fmt and format_mbus fields, but it also allows dropping the device lock, replaced with the state lock. Signed-off-by: Laurent Pinchart Tested-by: Adam Ford #imx8mn-beacon Acked-by: Rui Miguel Silva Signed-off-by: Mauro Carvalho Chehab commit 2f03d3cb06c677bc14fe5697e20aa4e1c9e51d97 Author: Laurent Pinchart Date: Thu Jan 26 02:10:01 2023 +0100 media: imx-mipi-csis: Pass format explicitly to internal functions To prepare for usage of the subdev active state that will replace the csis_fmt and format_mbus fields stored in the mipi_csis_device structure, pass the format explicitly to the functions called when starting streaming to avoid accessing those two fields. Not functional change intended. Signed-off-by: Laurent Pinchart Tested-by: Adam Ford #imx8mn-beacon Acked-by: Rui Miguel Silva Signed-off-by: Mauro Carvalho Chehab commit b6a736e79e473dfd6b6c97ea615d347c93dfb07a Author: Laurent Pinchart Date: Thu Jan 26 02:10:01 2023 +0100 media: imx-mipi-csis: Don't take lock in runtime PM handlers The runtime PM handlers don't need manual locking as - they are serialized by the runtime PM core - they can't race with other functions taking the same lock, as they don't access any data protect by that lock Drop the locking. Signed-off-by: Laurent Pinchart Tested-by: Adam Ford #imx8mn-beacon Acked-by: Rui Miguel Silva Signed-off-by: Mauro Carvalho Chehab commit a42b43f7b6708428ce25239d5c245a18758f68c5 Author: Laurent Pinchart Date: Thu Jan 26 20:29:53 2023 +0100 media: imx-mipi-csis: Rename error labels with 'err_' prefix It is customary to prefix error labels with 'err_' to make their purpose clearer. Do so in the probe function. Signed-off-by: Laurent Pinchart Tested-by: Adam Ford #imx8mn-beacon Acked-by: Rui Miguel Silva Signed-off-by: Mauro Carvalho Chehab commit 1d59fbeb37a70f36ba3f03e41128515eee59f5fb Author: Laurent Pinchart Date: Thu Jan 26 02:10:01 2023 +0100 media: imx: imx7-media-csi: Use V4L2 subdev active state Use the V4L2 subdev active state API to store the active format. This simplifies the driver not only by dropping the state stored in the imx7_csi structure, but also by replacing the manual lock with the state lock. The is_streaming field is now protected by the active state lock, either explicitly in .s_stream(), where the active state is locked manually, or implicitly in .set_fmt(), which is called with the state locked. Signed-off-by: Laurent Pinchart Tested-by: Adam Ford #imx8mm-beacon-kit Acked-by: Rui Miguel Silva Tested-by: Martin Kepplinger Signed-off-by: Mauro Carvalho Chehab commit d01a1c30777e46bad5e87d60bf149f647064dec5 Author: Laurent Pinchart Date: Thu Jan 26 02:10:01 2023 +0100 media: imx: imx7-media-csi: Zero format struct before calling .get_fmt() The v4l2_subdev_format structure passed to the .get_fmt() subdev operation in imx7_csi_video_validate_fmt() isn't zeroed, which can cause undefined behaviour. Fix it. Signed-off-by: Laurent Pinchart Tested-by: Adam Ford #imx8mm-beacon-kit Acked-by: Rui Miguel Silva Tested-by: Martin Kepplinger Signed-off-by: Mauro Carvalho Chehab commit 2c117550d70578b0b9eb183807b0984c11ecb44b Author: Laurent Pinchart Date: Fri Jan 27 02:21:57 2023 +0100 media: imx: imx7-media-csi: Cleanup errors in imx7_csi_async_register() It's good practice for functions to perform error cleanup internally when they fail, in order to not leave the device in a half-initialized state. Move the async notifier cleanup from the probe error path to the imx7_csi_async_register(), and drop the v4l2_async_nf_unregister() call as there is no error path after the async notifier gets registered. Signed-off-by: Laurent Pinchart Tested-by: Adam Ford #imx8mm-beacon-kit Acked-by: Rui Miguel Silva Tested-by: Martin Kepplinger Signed-off-by: Mauro Carvalho Chehab commit 49a82584b87c385b267f4ca12674f08bd229ab57 Author: Laurent Pinchart Date: Fri Jan 27 02:21:57 2023 +0100 media: imx: imx7-media-csi: Drop unneeded pad checks The subdev core guarantees that the .set_fmt() operation is always called with a valid pad. Drop the unneeded pad checks. Signed-off-by: Laurent Pinchart Tested-by: Adam Ford #imx8mm-beacon-kit Acked-by: Rui Miguel Silva Tested-by: Martin Kepplinger Signed-off-by: Mauro Carvalho Chehab commit 8ccfc15380e95e0219c42bc4bb3498d2bdb2cfb6 Author: Laurent Pinchart Date: Fri Jan 27 02:21:57 2023 +0100 media: imx: imx7-media-csi: Drop unneeded src_sd check The .s_stream() and .link_validate() operations can't be called with a NULL src_sd, as subdev nodes are not registered before the async notifier completes. Remove the unneeded checks. Signed-off-by: Laurent Pinchart Tested-by: Adam Ford #imx8mm-beacon-kit Acked-by: Rui Miguel Silva Tested-by: Martin Kepplinger Signed-off-by: Mauro Carvalho Chehab commit db56a4fb6923a37b437a9806189d13c89c38448b Author: Laurent Pinchart Date: Fri Jan 27 02:21:57 2023 +0100 media: imx: imx7-media-csi: Drop unneeded check when starting streaming The .s_stream() operation is guaranteed not to be called to start/stop an already started/stopped subdev. Remove the unneeded check. Signed-off-by: Laurent Pinchart Tested-by: Adam Ford #imx8mm-beacon-kit Acked-by: Rui Miguel Silva Tested-by: Martin Kepplinger Signed-off-by: Mauro Carvalho Chehab commit bc0d3df31ffe87d3162710adc5a6ad0f3744b066 Author: Laurent Pinchart Date: Fri Jan 27 02:21:57 2023 +0100 media: imx: imx7-media-csi: Simplify imx7_csi_video_init_format() The imx7_csi_video_init_format() function instantiates a v4l2_subdev_format on the stack, to only use the .format field of that structure. Replace it with a v4l2_mbus_framefmt instance. Signed-off-by: Laurent Pinchart Tested-by: Adam Ford #imx8mm-beacon-kit Acked-by: Rui Miguel Silva Tested-by: Martin Kepplinger Signed-off-by: Mauro Carvalho Chehab commit 02240a2764f8381f74b3a25742d6d3fd11fa2144 Author: Laurent Pinchart Date: Fri Jan 27 02:21:57 2023 +0100 media: imx: imx7-media-csi: Drop imx7_csi.cc field The imx7_csi.cc field is set but never used. Drop it. Signed-off-by: Laurent Pinchart Tested-by: Adam Ford #imx8mm-beacon-kit Acked-by: Rui Miguel Silva Tested-by: Martin Kepplinger Signed-off-by: Mauro Carvalho Chehab commit bc7635c6435c77a0c168e2cc6535740adfaff4e4 Author: Tasos Sahanidis Date: Thu Jan 26 12:00:59 2023 +0100 media: saa7134: Use video_unregister_device for radio_dev The radio device doesn't use vb2, thus calling vb2_video_unregister_device() which results in the following warning being printed on module unload. WARNING: CPU: 1 PID: 215963 at drivers/media/common/videobuf2/videobuf2-v4l2.c:1236 vb2_video_unregister_device+0xc6/0xe0 [videobuf2_v4l2] Fixes: 11788d9b7e91 ("media: media/pci: use vb2_video_unregister_device()") Signed-off-by: Tasos Sahanidis Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7a46e2b923939b03735720616743a70fe6917c2d Author: Brent Pappas Date: Mon Jan 23 20:17:14 2023 +0100 media: imx: imx-media-fim: Replace macro icap_enabled() with function Replace the macro icap_enabled() with a static function to comply with Linux coding style standards. Signed-off-by: Brent Pappas Reviewed-by: Marco Felsch Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4ab3f69cba785988b7cb386e35e661bfa1aa0706 Author: Benjamin Roszak Date: Mon Jan 23 08:17:08 2023 +0100 media: meson: vdec: remove redundant if statement Checking if sess->fmt_out->pixfmt is V4L2_PIX_FMT_VP9 was already done as a condition to enter the if statement where this additional check is made. Signed-off-by: Benjamin Roszak Signed-off-by: Christian Hewitt Acked-by: Neil Armstrong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ebad8e731c1c06adf04621d6fd327b860c0861b5 Author: Duoming Zhou Date: Mon Jan 23 03:04:38 2023 +0100 media: usb: siano: Fix use after free bugs caused by do_submit_urb There are UAF bugs caused by do_submit_urb(). One of the KASan reports is shown below: [ 36.403605] BUG: KASAN: use-after-free in worker_thread+0x4a2/0x890 [ 36.406105] Read of size 8 at addr ffff8880059600e8 by task kworker/0:2/49 [ 36.408316] [ 36.408867] CPU: 0 PID: 49 Comm: kworker/0:2 Not tainted 6.2.0-rc3-15798-g5a41237ad1d4-dir8 [ 36.411696] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g15584 [ 36.416157] Workqueue: 0x0 (events) [ 36.417654] Call Trace: [ 36.418546] [ 36.419320] dump_stack_lvl+0x96/0xd0 [ 36.420522] print_address_description+0x75/0x350 [ 36.421992] print_report+0x11b/0x250 [ 36.423174] ? _raw_spin_lock_irqsave+0x87/0xd0 [ 36.424806] ? __virt_addr_valid+0xcf/0x170 [ 36.426069] ? worker_thread+0x4a2/0x890 [ 36.427355] kasan_report+0x131/0x160 [ 36.428556] ? worker_thread+0x4a2/0x890 [ 36.430053] worker_thread+0x4a2/0x890 [ 36.431297] ? worker_clr_flags+0x90/0x90 [ 36.432479] kthread+0x166/0x190 [ 36.433493] ? kthread_blkcg+0x50/0x50 [ 36.434669] ret_from_fork+0x22/0x30 [ 36.435923] [ 36.436684] [ 36.437215] Allocated by task 24: [ 36.438289] kasan_set_track+0x50/0x80 [ 36.439436] __kasan_kmalloc+0x89/0xa0 [ 36.440566] smsusb_probe+0x374/0xc90 [ 36.441920] usb_probe_interface+0x2d1/0x4c0 [ 36.443253] really_probe+0x1d5/0x580 [ 36.444539] __driver_probe_device+0xe3/0x130 [ 36.446085] driver_probe_device+0x49/0x220 [ 36.447423] __device_attach_driver+0x19e/0x1b0 [ 36.448931] bus_for_each_drv+0xcb/0x110 [ 36.450217] __device_attach+0x132/0x1f0 [ 36.451470] bus_probe_device+0x59/0xf0 [ 36.452563] device_add+0x4ec/0x7b0 [ 36.453830] usb_set_configuration+0xc63/0xe10 [ 36.455230] usb_generic_driver_probe+0x3b/0x80 [ 36.456166] printk: console [ttyGS0] disabled [ 36.456569] usb_probe_device+0x90/0x110 [ 36.459523] really_probe+0x1d5/0x580 [ 36.461027] __driver_probe_device+0xe3/0x130 [ 36.462465] driver_probe_device+0x49/0x220 [ 36.463847] __device_attach_driver+0x19e/0x1b0 [ 36.465229] bus_for_each_drv+0xcb/0x110 [ 36.466466] __device_attach+0x132/0x1f0 [ 36.467799] bus_probe_device+0x59/0xf0 [ 36.469010] device_add+0x4ec/0x7b0 [ 36.470125] usb_new_device+0x863/0xa00 [ 36.471374] hub_event+0x18c7/0x2220 [ 36.472746] process_one_work+0x34c/0x5b0 [ 36.474041] worker_thread+0x4b7/0x890 [ 36.475216] kthread+0x166/0x190 [ 36.476267] ret_from_fork+0x22/0x30 [ 36.477447] [ 36.478160] Freed by task 24: [ 36.479239] kasan_set_track+0x50/0x80 [ 36.480512] kasan_save_free_info+0x2b/0x40 [ 36.481808] ____kasan_slab_free+0x122/0x1a0 [ 36.483173] __kmem_cache_free+0xc4/0x200 [ 36.484563] smsusb_term_device+0xcd/0xf0 [ 36.485896] smsusb_probe+0xc85/0xc90 [ 36.486976] usb_probe_interface+0x2d1/0x4c0 [ 36.488303] really_probe+0x1d5/0x580 [ 36.489498] __driver_probe_device+0xe3/0x130 [ 36.491140] driver_probe_device+0x49/0x220 [ 36.492475] __device_attach_driver+0x19e/0x1b0 [ 36.493988] bus_for_each_drv+0xcb/0x110 [ 36.495171] __device_attach+0x132/0x1f0 [ 36.496617] bus_probe_device+0x59/0xf0 [ 36.497875] device_add+0x4ec/0x7b0 [ 36.498972] usb_set_configuration+0xc63/0xe10 [ 36.500264] usb_generic_driver_probe+0x3b/0x80 [ 36.501740] usb_probe_device+0x90/0x110 [ 36.503084] really_probe+0x1d5/0x580 [ 36.504241] __driver_probe_device+0xe3/0x130 [ 36.505548] driver_probe_device+0x49/0x220 [ 36.506766] __device_attach_driver+0x19e/0x1b0 [ 36.508368] bus_for_each_drv+0xcb/0x110 [ 36.509646] __device_attach+0x132/0x1f0 [ 36.510911] bus_probe_device+0x59/0xf0 [ 36.512103] device_add+0x4ec/0x7b0 [ 36.513215] usb_new_device+0x863/0xa00 [ 36.514736] hub_event+0x18c7/0x2220 [ 36.516130] process_one_work+0x34c/0x5b0 [ 36.517396] worker_thread+0x4b7/0x890 [ 36.518591] kthread+0x166/0x190 [ 36.519599] ret_from_fork+0x22/0x30 [ 36.520851] [ 36.521405] Last potentially related work creation: [ 36.523143] kasan_save_stack+0x3f/0x60 [ 36.524275] kasan_record_aux_stack_noalloc+0x9d/0xb0 [ 36.525831] insert_work+0x25/0x130 [ 36.527039] __queue_work+0x4d4/0x620 [ 36.528236] queue_work_on+0x72/0xb0 [ 36.529344] __usb_hcd_giveback_urb+0x13f/0x1b0 [ 36.530819] dummy_timer+0x350/0x1a40 [ 36.532149] call_timer_fn+0x2c/0x190 [ 36.533567] expire_timers+0x69/0x1f0 [ 36.534736] __run_timers+0x289/0x2d0 [ 36.535841] run_timer_softirq+0x2d/0x60 [ 36.537110] __do_softirq+0x116/0x380 [ 36.538377] [ 36.538950] Second to last potentially related work creation: [ 36.540855] kasan_save_stack+0x3f/0x60 [ 36.542084] kasan_record_aux_stack_noalloc+0x9d/0xb0 [ 36.543592] insert_work+0x25/0x130 [ 36.544891] __queue_work+0x4d4/0x620 [ 36.546168] queue_work_on+0x72/0xb0 [ 36.547328] __usb_hcd_giveback_urb+0x13f/0x1b0 [ 36.548805] dummy_timer+0x350/0x1a40 [ 36.550116] call_timer_fn+0x2c/0x190 [ 36.551570] expire_timers+0x69/0x1f0 [ 36.552762] __run_timers+0x289/0x2d0 [ 36.553916] run_timer_softirq+0x2d/0x60 [ 36.555118] __do_softirq+0x116/0x380 [ 36.556239] [ 36.556807] The buggy address belongs to the object at ffff888005960000 [ 36.556807] which belongs to the cache kmalloc-4k of size 4096 [ 36.560652] The buggy address is located 232 bytes inside of [ 36.560652] 4096-byte region [ffff888005960000, ffff888005961000) [ 36.564791] [ 36.565355] The buggy address belongs to the physical page: [ 36.567212] page:000000004f0a0731 refcount:1 mapcount:0 mapping:0000000000000000 index:0x00 [ 36.570534] head:000000004f0a0731 order:3 compound_mapcount:0 subpages_mapcount:0 compound0 [ 36.573717] flags: 0x100000000010200(slab|head|node=0|zone=1) [ 36.575481] raw: 0100000000010200 ffff888001042140 dead000000000122 0000000000000000 [ 36.577842] raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000 [ 36.580175] page dumped because: kasan: bad access detected [ 36.581994] [ 36.582548] Memory state around the buggy address: [ 36.583983] ffff88800595ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 36.586240] ffff888005960000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.588884] >ffff888005960080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.591071] ^ [ 36.593295] ffff888005960100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.595705] ffff888005960180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 36.598026] ================================================================== [ 36.600224] Disabling lock debugging due to kernel taint [ 36.602681] general protection fault, probably for non-canonical address 0x43600a000000060I [ 36.607129] CPU: 0 PID: 49 Comm: kworker/0:2 Tainted: G B 6.2.0-rc3-15798-8 [ 36.611115] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g15584 [ 36.615026] Workqueue: events do_submit_urb [ 36.616290] RIP: 0010:_raw_spin_lock_irqsave+0x8a/0xd0 [ 36.618107] Code: 24 00 00 00 00 48 89 df be 04 00 00 00 e8 9e b5 c6 fe 48 89 ef be 04 00 5 [ 36.623522] RSP: 0018:ffff888004b6fcf0 EFLAGS: 00010046 [ 36.625072] RAX: 0000000000000000 RBX: 043600a000000060 RCX: ffffffff9fc0e0d7 [ 36.627206] RDX: 0000000000000000 RSI: dffffc0000000000 RDI: ffff888004b6fcf0 [ 36.629813] RBP: ffff888004b6fcf0 R08: dffffc0000000000 R09: ffffed100096df9f [ 36.631974] R10: dfffe9100096dfa0 R11: 1ffff1100096df9e R12: ffff888005960020 [ 36.634285] R13: ffff8880059600f0 R14: 0000000000000246 R15: 0000000000000001 [ 36.636438] FS: 0000000000000000(0000) GS:ffff88806d600000(0000) knlGS:0000000000000000 [ 36.639092] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 36.640951] CR2: 00007f07476819a3 CR3: 0000000004a34000 CR4: 00000000000006f0 [ 36.643411] Call Trace: [ 36.644215] [ 36.644902] smscore_getbuffer+0x3e/0x1e0 [ 36.646147] do_submit_urb+0x4f/0x190 [ 36.647449] process_one_work+0x34c/0x5b0 [ 36.648777] worker_thread+0x4b7/0x890 [ 36.649984] ? worker_clr_flags+0x90/0x90 [ 36.651166] kthread+0x166/0x190 [ 36.652151] ? kthread_blkcg+0x50/0x50 [ 36.653547] ret_from_fork+0x22/0x30 [ 36.655051] [ 36.655733] Modules linked in: [ 36.656787] ---[ end trace 0000000000000000 ]--- [ 36.658328] RIP: 0010:_raw_spin_lock_irqsave+0x8a/0xd0 [ 36.660045] Code: 24 00 00 00 00 48 89 df be 04 00 00 00 e8 9e b5 c6 fe 48 89 ef be 04 00 5 [ 36.665730] RSP: 0018:ffff888004b6fcf0 EFLAGS: 00010046 [ 36.667448] RAX: 0000000000000000 RBX: 043600a000000060 RCX: ffffffff9fc0e0d7 [ 36.669675] RDX: 0000000000000000 RSI: dffffc0000000000 RDI: ffff888004b6fcf0 [ 36.672645] RBP: ffff888004b6fcf0 R08: dffffc0000000000 R09: ffffed100096df9f [ 36.674921] R10: dfffe9100096dfa0 R11: 1ffff1100096df9e R12: ffff888005960020 [ 36.677034] R13: ffff8880059600f0 R14: 0000000000000246 R15: 0000000000000001 [ 36.679184] FS: 0000000000000000(0000) GS:ffff88806d600000(0000) knlGS:0000000000000000 [ 36.681655] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 36.683383] CR2: 00007f07476819a3 CR3: 0000000004a34000 CR4: 00000000000006f0 [ 36.685733] Kernel panic - not syncing: Fatal exception [ 36.688585] Kernel Offset: 0x1d400000 from 0xffffffff81000000 (relocation range: 0xfffffff) [ 36.692199] ---[ end Kernel panic - not syncing: Fatal exception ]--- When the siano device is plugged in, it may call the following functions to initialize the device. smsusb_probe()-->smsusb_init_device()-->smscore_start_device(). When smscore_start_device() gets failed, the function smsusb_term_device() will be called and smsusb_device_t will be deallocated. Although we use usb_kill_urb() in smsusb_stop_streaming() to cancel transfer requests and wait for them to finish, the worker threads that are scheduled by smsusb_onresponse() may be still running. As a result, the UAF bugs could happen. We add cancel_work_sync() in smsusb_stop_streaming() in order that the worker threads could finish before the smsusb_device_t is deallocated. Fixes: dd47fbd40e6e ("[media] smsusb: don't sleep while atomic") Signed-off-by: Duoming Zhou Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 107b7a219bb6ca4e70254cb2247af54939fb4713 Author: Hans Verkuil Date: Thu Jan 26 14:46:49 2023 +0100 media: dvb-frontends: mb86a16.c: always use the same error path If the message length was wrong, the dprintk() after the 'err' label was bypassed. Fix that, and fix a smatch warning at the same time: mb86a16.c:1514 mb86a16_send_diseqc_msg() warn: missing unwind goto? Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6a4c664539e6de9b32b65ddcf767ec1bcc1d7f8a Author: Hans Verkuil Date: Thu Jan 26 14:03:51 2023 +0100 media: i2c: ov7670: 0 instead of -EINVAL was returned If the media bus is unsupported, then return -EINVAL. Instead it returned 'ret' which happened to be 0. This fixes a smatch warning: ov7670.c:1843 ov7670_parse_dt() warn: missing error code? 'ret' Signed-off-by: Hans Verkuil Fixes: 01b8444828fc ("media: v4l2: i2c: ov7670: Implement OF mbus configuration") Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 0d3732fb1b20d2a636d294cdf51c35f9233d622a Author: Hans Verkuil Date: Thu Jan 26 14:00:47 2023 +0100 media: ti: davinci: vpbe_display.c: return 0 instead of 'ret'. Since 'ret' is known to be 0, just return '0'. This fixes a smatch warning: vpbe_display.c:1152 vpbe_display_open() warn: missing error code? 'err' Signed-off-by: Hans Verkuil Cc: "Lad, Prabhakar" Signed-off-by: Mauro Carvalho Chehab commit 222370776f9da3edcb702139ca0a3a73484b7986 Author: Hans Verkuil Date: Thu Jan 26 13:59:16 2023 +0100 media: mediatek: vcodec/venc: return 0 instead of 'ret'. Since 'ret' is known to be 0, just return '0'. This fixes a smatch warning: venc_h264_if.c:568 h264_encode_frame() warn: missing error code? 'ret' Signed-off-by: Hans Verkuil Cc: Andrew-CT Chen Cc: Yunfei Dong Signed-off-by: Mauro Carvalho Chehab commit 5949afa34a0aebe239e3f5b54deb543a464d2125 Author: Hans Verkuil Date: Thu Jan 26 13:56:20 2023 +0100 media: mediatek: mdp3: replace return by goto for proper unwind An error was returned at one point without going through the goto label for proper unwinding. This fixes a smatch warning: mtk-mdp3-comp.c:1005 mdp_comp_config() warn: missing unwind goto? Signed-off-by: Hans Verkuil Cc: Moudy Ho Signed-off-by: Mauro Carvalho Chehab commit 55869f435d7f6a121722c687e3ac056168e473eb Author: Hans Verkuil Date: Thu Jan 26 13:37:23 2023 +0100 media: dvb-frontends: drx39xyj: replace return with goto for proper unwind In three places there was a return instead of a goto to the unwind code. This fixes three smatch warnings: drxj.c:9542 ctrl_get_qam_sig_quality() warn: missing unwind goto? drxj.c:10919 ctrl_set_standard() warn: missing unwind goto? drxj.c:11466 drxj_open() warn: missing unwind goto? Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5a1a39a8ac30c7f116d427f7271927d976e4723e Author: Hans Verkuil Date: Thu Jan 26 13:33:10 2023 +0100 media: marvell: change return to goto for proper unwind The probe function used 'goto out' everywhere, except in one place where it returned an error. That too should be a 'goto out'. This fixes a smatch warning: mmp-driver.c:257 mmpcam_probe() warn: missing unwind goto? Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e670d7e3c53d0345c7acfa5b9a2b1c33537a0dad Author: Hans Verkuil Date: Thu Jan 26 13:29:11 2023 +0100 media: dvb-frontends: cxd2880: return 0 instead of 'ret'. Since 'ret' is known to be 0, just return '0'. This fixes 10 smatch warnings: cxd2880_tnrdmd_dvbt.c:836 cxd2880_tnrdmd_dvbt_check_demod_lock() warn: missing error code? 'ret' cxd2880_tnrdmd_dvbt.c:841 cxd2880_tnrdmd_dvbt_check_demod_lock() warn: missing error code? 'ret' cxd2880_tnrdmd_dvbt.c:896 cxd2880_tnrdmd_dvbt_check_ts_lock() warn: missing error code? 'ret' cxd2880_tnrdmd_dvbt.c:901 cxd2880_tnrdmd_dvbt_check_ts_lock() warn: missing error code? 'ret' cxd2880_tnrdmd_dvbt.c:904 cxd2880_tnrdmd_dvbt_check_ts_lock() warn: missing error code? 'ret' cxd2880_tnrdmd_dvbt2.c:1027 cxd2880_tnrdmd_dvbt2_check_demod_lock() warn: missing error code? 'ret' cxd2880_tnrdmd_dvbt2.c:1032 cxd2880_tnrdmd_dvbt2_check_demod_lock() warn: missing error code? 'ret' cxd2880_tnrdmd_dvbt2.c:1087 cxd2880_tnrdmd_dvbt2_check_ts_lock() warn: missing error code? 'ret' cxd2880_tnrdmd_dvbt2.c:1092 cxd2880_tnrdmd_dvbt2_check_ts_lock() warn: missing error code? 'ret' cxd2880_tnrdmd_dvbt2.c:1095 cxd2880_tnrdmd_dvbt2_check_ts_lock() warn: missing error code? 'ret' Signed-off-by: Hans Verkuil Cc: Yasunari Takiguchi Signed-off-by: Mauro Carvalho Chehab commit a0ccbc65bc751f9337ed985bac3741a596872854 Author: Hans Verkuil Date: Thu Jan 26 13:26:19 2023 +0100 media: usb: dvb-usb-v2: af9015.c: return 0 instead of 'ret'. Since 'ret' is known to be 0, just return '0'. This fixes two smatch warnings: af9015.c:1168 af9015_rc_query() warn: missing error code? 'ret' af9015.c:1177 af9015_rc_query() warn: missing error code? 'ret' Signed-off-by: Hans Verkuil Cc: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab commit 8963c1195235e5cfff805b84ca7fd40004e8d155 Author: Hans Verkuil Date: Thu Jan 26 13:20:36 2023 +0100 media: dvb-frontends: cxd2880: return 0 instead of 'ret'. Since 'ret' is known to be 0, just return '0'. This fixes two smatch warnings: cxd2880_tnrdmd.c:2165 cxd2880_tnrdmd_check_internal_cpu_status() warn: missing error code? 'ret' cxd2880_tnrdmd.c:2169 cxd2880_tnrdmd_check_internal_cpu_status() warn: missing error code? 'ret' Signed-off-by: Hans Verkuil Cc: Yasunari Takiguchi Signed-off-by: Mauro Carvalho Chehab commit 7e5eb42a4952a7c49c6ac48272fb27b63d87f995 Author: Hans Verkuil Date: Thu Jan 26 13:18:18 2023 +0100 media: i2c: s5c73m3: return 0 instead of 'ret'. Since 'ret' is known to be 0, just return '0'. This fixes a smatch warning: s5c73m3-core.c:439 __s5c73m3_s_stream() warn: missing error code? 'ret' Signed-off-by: Hans Verkuil Cc: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab commit 9996b9655470ff8bd294e587600734ece0ad695a Author: Hans Verkuil Date: Thu Jan 26 13:16:40 2023 +0100 media: davinci/vpif.c: drop unnecessary cast DEFINE_RES_IRQ_NAMED already casts to (struct resource), so no need to do it again. This fixes a sparse warning: vpif.c:483:20: warning: cast to non-scalar Signed-off-by: Hans Verkuil Cc: "Lad, Prabhakar" Signed-off-by: Mauro Carvalho Chehab commit b6a1af0362b3232c7b474b9b46e49b862602018c Author: Hans Verkuil Date: Thu Jan 26 12:58:32 2023 +0100 media: visl: make visl_qops static This struct can be static. This fixes a sparse warning: visl-video.c:690:22: warning: symbol 'visl_qops' was not declared. Should it be static? Signed-off-by: Hans Verkuil Cc: Daniel Almeida Signed-off-by: Mauro Carvalho Chehab commit 738dfb32f1305478c2c1b87e997142cefad4ad7e Author: Brent Pappas Date: Fri Jan 20 18:14:08 2023 +0100 media: atomisp: pci: sh_css: Inline single invocation of macro STATS_ENABLED() Inline the single invocation of the macro STATS_ENABLED(). The macro abstraction is not necessary because the logic behind it is only used once. Link: https://lore.kernel.org/r/20230120171408.16099-1-bpappas@pappasbrent.com Signed-off-by: Brent Pappas Reviewed-by: Andy Shevchenko Reviewed-by: Dan Carpenter Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 197ec0f48d7a3aff984c2502af315e5d3e48eedb Author: Brent Pappas Date: Fri Jan 20 19:26:25 2023 +0100 media: atomisp: pci: hive_isp_css_common: host: vmem: Replace SUBWORD macros with functions Replace the macros SUBWORD() and INV_SUBWORD() with functions to comply with Linux coding style standards. Link: https://lore.kernel.org/r/20230120182625.23227-1-bpappas@pappasbrent.com Signed-off-by: Brent Pappas Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 2e82f054b58546efd062595dcfa448ee3d048273 Author: Brent Pappas Date: Wed Jan 18 17:07:39 2023 +0100 media: atomisp: pci: Replace bytes macros with functions Replace the function-like macros FPNTBL_BYTES(), SCTBL_BYTES(), and MORPH_PLANE_BYTES() with functions to comply with Linux coding style standards. Replace multiplication with calls to array_size() and array3_size() to prevent accidental arithmetic overflow. Link: https://lore.kernel.org/r/20230118160739.26059-1-bpappas@pappasbrent.com Signed-off-by: Brent Pappas Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit b3118a942c820c8d94a11ffd3d950660b3566d35 Author: Hans de Goede Date: Sat Dec 3 21:16:25 2022 +0100 media: atomisp: ov2722: Power on sensor from set_fmt() callback Depending on which order userspace makes various v4l2 calls, the sensor might still be powered down when set_fmt is called. What should really happen here is delay the writing of the mode-related registers till streaming is started, but for now use the same quick fix as the atomisp_ov2680 / atomisp_gc0310 code and call power_up() from set_fmt() in combination with keeping track of the power-state to avoid doing the power-up sequence twice. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 4272fd7ae69aef86aa4c9f7d49a9d15beb50547e Author: Hans de Goede Date: Sat Dec 3 20:44:00 2022 +0100 media: atomisp: ov2722: Don't take the input_lock for try_fmt calls. On ov2722_set_fmt() calls with format->which == V4L2_SUBDEV_FORMAT_TRY, ov2722_set_fmt() does not talk to the sensor, so there is no need to lock the dev->input_lock mutex in this case. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit aec221279a2934de5fbfb8d553fcedb522772d8f Author: Hans de Goede Date: Sat Dec 3 16:44:21 2022 +0100 media: atomisp: ov2722: Fix GPIO1 polarity The comment claims the PWDN pin is active when pulled down in other words, it is /power-down so it needs to be driven high to get the sensor powered-up (not powered down) and flag is 1 when powering-up the sensor so the ! is wrong, drop it. This also matches with the schematics which I have which shows GPIO1 also enables a 3.3v line to the sensor-module which controls the privacy-LED and indeed before this patch the privacy LED was inverted from what it should be (and the sensor did not work). Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 3ddac68f667c15cd1f44a31285d44b2c1a01bfc7 Author: Hans de Goede Date: Sat Dec 3 16:48:07 2022 +0100 media: atomisp: ov2722: Call atomisp_gmin_remove_subdev() on probe failure Call atomisp_gmin_remove_subdev() on probe failure to properly free the GPIOs and other resources acquired by the gmin_camera_platform_data() call earlier. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit b7e155e16601b0c6f34e3345b9eca6a2efc5bc5d Author: Hans de Goede Date: Sun Jan 15 22:03:19 2023 +0100 media: atomisp: ov2680: 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. This has been tested on: -Trekstor Surftab duo W1 10.1, CHT, AXP288 PMIC, 2x ov2680 sensor -Asus T101HA, CHT, TI PMIC, 1x ov2680 sensor -MPMAN Converter 9, BYT, AXP288 PMIC, ov2680 back, gc0310 front sensor Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit e98b8993bfffbe552b7881bd9b7450f10f3bb9d3 Author: Hans de Goede Date: Sun Jan 15 14:05:38 2023 +0100 media: atomisp: ov2680: Use devm_kzalloc() for sensor data struct Use devm_kzalloc() to allocate the sensor 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 ov2680 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 2 changed returns 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 66c7b303c7108db0a6fe6525bf6acc749e979de4 Author: Hans de Goede Date: Sun Jan 29 20:30:40 2023 +0100 media: atomisp: ov2680: Add dev local variable to probe() Add a dev local variable to probe(), to allow shortening &client->dev in various places, including further patches in this series. Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit e25a2589e310d8592ca4197c66ad1bfa6eaf99ca Author: Hans de Goede Date: Sun Jan 15 13:56:20 2023 +0100 media: atomisp: ov2680: s/dev/sensor/ Using dev as name for variables pointing to struct ov2680_device is a bit unfortunate choice. All the recently added / rewritten code is already using sensor for this, replace the remaining usages of "struct ov2680_device *dev" with "struct ov2680_device *sensor". Note the power_up()/power_down() related functions are not changed as these will be removed in one of the next patches. No functional changes. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 361835086993b80fcb1ce006b2c0559ffaf4cfd7 Author: Hans de Goede Date: Sat Jan 14 15:19:18 2023 +0100 media: atomisp: ov2680: 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 9e70de16120807be121f6e2924f834f3a874b892 Author: Hans de Goede Date: Fri Jan 13 21:49:20 2023 +0100 media: atomisp: ov2680: 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 0ba7aaa904bc00cd78f8fe48fc62950d8641949f Author: Hans de Goede Date: Sat Jan 14 13:14:56 2023 +0100 media: atomisp: ov2680: Cleanup includes Remove unused includes and sort the remaining ones alphabetically. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit b8bfc7464bfa6b5ccb9b5556d92124cfca135efe Author: Hans de Goede Date: Sat Jan 14 14:01:49 2023 +0100 media: atomisp: ov2680: Consistently indent define values Use the same indentation level for all #define values. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit bca7822cbc76b22572faf2e17ca9517b68ebeb3e Author: Hans de Goede Date: Fri Jan 13 16:51:54 2023 +0100 media: atomisp: ov2680: Drop MAX_FMTS define The ov2680 only supports a single format, there is no need to use a define for this. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 8cf66250505e54e1d91f7cae7091f8cfefa4a01e Author: Hans de Goede Date: Fri Jan 13 16:51:01 2023 +0100 media: atomisp: ov2680: Remove unused data-types and defines from ov2680.h Remove a bunch of unused data-types and defines from ov2680.h. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 35fd68153dd3f7d93c8f8208193c504850bbac80 Author: Hans de Goede Date: Fri Jan 13 16:55:10 2023 +0100 media: atomisp: ov2680: Fix frame_size list 3 fixes for the framesize list: 1. Drop modes < 640x480, these are made by significant cropping, leading to such a small remainig field-of-view that they are not really usable 2. 1616x1082 is presumably intended to be 1600x1080 + 16 pixels padding in both dimensions, but the height is wrong. Change this to 1616x1096. 3. The 800x600 mode is missing the 16 pixels padding and 720x592 is missing 16 pixels padding in its width and the 720x576 base mode is a mode with non square pixels, while the sensor has square pixels. Replace both with 768x576 + 16 pixels padding -> 784x592 Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit ef6504afd046da6afe7c0f4b36df3654268e97e8 Author: Hans de Goede Date: Fri Jan 13 16:46:40 2023 +0100 media: atomisp: ov2680: Drop struct ov2680_resolution / ov2680_res_preview Drop struct ov2680_resolution and the ov2680_res_preview[] array, this is now only used in ov2680_enum_frame_size() and only the width + height are used there. Replace this with a new struct v4l2_frmsize_discrete ov2680_frame_sizes[] array. No functional changes. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit f4ed8e3ba64a5cef32846e63c59897354bcb6d50 Author: Hans de Goede Date: Fri Jan 13 16:01:40 2023 +0100 media: atomisp: ov2680: Drop v4l2_find_nearest_size() call from set_fmt() Since we now calculate timings baded on the desired width and height, any width and height are valid as long as they don't exceed the sensor's dimensions. Drop the v4l2_find_nearest_size() call and instead clamp the requested width and height. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit a6fc86ed57a108cdc5078d93b17bcf56c234f94c Author: Hans de Goede Date: Fri Jan 13 15:40:58 2023 +0100 media: atomisp: ov2680: Fix ov2680_enum_frame_interval() Fix and simplify ov2680_enum_frame_interval(), the index is not an index into ov2680_res_preview[], so using N_PREVIEW is wrong. Instead it is an index indexing the different framerates for the resolution specified in fie->width, fie->height. Since the ov2680 code only supports a single fixed 30 fps, index must always be 0 and we don't need to check the other fie input values. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 10704b452ab1b1040cfc08fb901e9226b9bfd460 Author: Hans de Goede Date: Sun Jan 8 16:22:42 2023 +0100 media: atomisp: ov2680: Drop unused res member from struct ov2680_device The res member of struct ov2680_device isn't read anywhere anymore, drop it. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 3406639ee2ad5bf736b9b38091bf108ac600327a Author: Hans de Goede Date: Sun Jan 8 15:06:26 2023 +0100 media: atomisp: ov2680: Use defines for fps, lines-per-frame and skip-frames The fps, lines-per-frame and skip-frames values are the same for all resolutions, use defines for these. The ov2680_res_preview[] incorrectly sets fps to 60 for some low-res modes, this is incorrect with the current fixed (resolution independent) lines-per-frame value. Note this not drop the now no longer used fps, lines-per-frame and skip-frames struct ov2680_resolution members. The entire struct is going away in the next patches so that would just cause unnecessary changes. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 0611888592df86c3f348146dc26d4b00f850e194 Author: Hans de Goede Date: Sun Jan 1 18:08:42 2023 +0100 media: atomisp: ov2680: Make setting the modes algorithm based Instead of using a long fixed register settings list for each resolution, calculate the register settings based on the requested width + height. This will allow future enhancements like adding hblank and vblank controls and adding selection support. Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 1c08b2faa88fbcf813a700120ffe89bc2c8c567c Author: Hans de Goede Date: Mon Jan 2 22:02:04 2023 +0100 media: atomisp: ov2680: Fix window settings and enable window for all resolutions By default the ov2680 automatically sets the window to match the outputsize and automatically adjusts it to keep the bayer pattern stable when enabling hflip/vflip. This does not work for the 1616x1216 mode because there is no room to adjust the window there. To make flipping work in the 1616 wide modes the register lists for those modes set bit 0 of 0x5708 (manual_win_en) to 1 and ov2680_set_bayer_order() updates the bayer-order on the pad to match. But ov2680_set_bayer_order() is always called, so when enabling flipping on modes with a width of less then 1616 now results in the wrong bayer order being reported on the pad since the sensor is auto-adjusting the window in this case. Specify the correct (== output-size) window-size in all resolutions register-list and always set the manual_win_en bit, so that the bayer order is changed on hflip/vflip enable on all resolutions. Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 76f39e721e29a0ea7a503da1ed10d4ebefa49e0a Author: Hans de Goede Date: Tue Jan 3 21:32:52 2023 +0100 media: atomisp: ov2680: Add test pattern control Add a test pattern control. This is a 1:1 copy of the test pattern control in the main drivers/media/i2c/ov2680.c driver. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 250b9a99bed87828e1beee8d3e8c2df6d7206d15 Author: Hans de Goede Date: Fri Dec 30 19:37:42 2022 +0100 media: atomisp: ov2680: Add exposure and gain controls Add exposure and gain controls. This allows controlling the exposure and gain through standard v4l2 IOCTLs. Note the register defines for the exposure and gain registers are renamed to match the datasheet. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 8eb47aa3a156fcebe7d5b4d4c34a1341da0df253 Author: Hans de Goede Date: Sun Dec 4 17:24:34 2022 +0100 media: atomisp: ov2680: 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 91caf7975883a53905fe5e126e8083c265b629c2 Author: Hans de Goede Date: Tue Jan 3 19:53:28 2023 +0100 media: atomisp: ov2680: Rework flip ctrls Rework the flip ctrls to be more like those of mainline (non staging) drivers. This is modelled after the main ov2680 and ov5693 drivers. This also introduces __ov2680_get_pad_format() to make the ov2680 code more compliant with the mainline v4l2-subdev APIs. Note the OV2680_FLIP_REG and OV2680_MIRROR_REG defines are renamed to OV2680_REG_FORMAT1 and OV2680_REG_FORMAT2 to match the datasheet. Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit f76855ef2f561c3787e22194b5d51c45e7d994d2 Author: Hans de Goede Date: Sun Dec 4 17:21:02 2022 +0100 media: atomisp: ov2680: Use the new ov_16bit_addr_reg_helpers.h Use the new ov_16bit_addr_reg_helpers.h instead of duplicating the ovxxxx sensor I2C register access helpers found in many different sensor drivers. Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 65b3974173a7ffede971456de064cec3e9368135 Author: Hans de Goede Date: Sun Dec 4 16:48:49 2022 +0100 media: core: add ov_16bit_addr_reg_helpers.h The following drivers under drivers/media/i2c: ov08x40.c, ov13858.c, ov13b10.c, ov2680.c, ov2685.c, ov2740.c, ov4689.c, ov5670.c, ov5675.c, ov5695.c, ov8856.c, ov9282.c and ov9734.c, as well as various "atomisp" sensor drivers in drivers/staging, *all* use register access helpers with the following function prototypes: int ovxxxx_read_reg(struct ovxxxx_dev *sensor, u16 reg, unsigned int len, u32 *val); int ovxxxx_write_reg(struct ovxxxx_dev *sensor, u16 reg, unsigned int len, u32 val); To read/write registers on Omnivision OVxxxx image sensors wich expect a 16 bit register address in big-endian format and which have 1-3 byte wide registers, in big-endian format (for the higher width registers). Add a new ov_16bit_addr_reg_helpers.h header file with static inline versions of these register access helpers, so that this code duplication can be removed. Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit c47060369f9cf6724af70945aef4ee3907a4a5ce Author: Hans de Goede Date: Sun Jan 29 22:01:20 2023 +0100 media: atomisp: Properly initialize function field of media-entity links Don't use MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN to initialize the function field of various media-entity links. This fixes the following warnings showing up in dmesg: atomisp-isp2 0000:00:03.0: Entity type for entity ATOM ISP CSI2-port0 was not initialized! atomisp-isp2 0000:00:03.0: Entity type for entity ATOM ISP CSI2-port1 was not initialized! atomisp-isp2 0000:00:03.0: Entity type for entity ATOM ISP CSI2-port2 was not initialized! atomisp-isp2 0000:00:03.0: Entity type for entity tpg_subdev was not initialized! atomisp-isp2 0000:00:03.0: Entity type for entity ATOMISP_SUBDEV_0 was not initialized! atomisp-isp2 0000:00:03.0: Entity type for entity ATOMISP_SUBDEV_1 was not initialized! Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit c7c49ac854d0d3ef8ff8ab7e667482faa813e757 Author: Hans de Goede Date: Sun Jan 29 21:49:10 2023 +0100 media: atomisp: Remove csi2_link_setup() Looking at csi2_link_setup(), this function can never work, it does a switch-case like this: switch (local->index | is_media_entity_v4l2_subdev(remote->entity)) with cases like this: case ATOMISP_SUBDEV_PAD_SOURCE | MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN where ATOMISP_SUBDEV_PAD_SOURCE matches an index (0-1) and MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN is 0x00020000, but is_media_entity_v4l2_subdev(remote->entity) does not return MEDIA_ENT_F_* values, it return a bool, so 0 or 1 which means that non of the cases can ever match the input value. Looking at the rest of the function all it ever does (if it would actually hit one of the cases) is set the atomisp_mipi_csi2_device struct's output member. And checking the rest of the atomisp code that member is never read. Also userspace does not actually setup media-controller links when using the atomisp /dev/video$ nodes since all the links are fixed. So csi2_link_setup() never runs. Remove the unnecessary and broken csi2_link_setup() function and also remove the unused atomisp_mipi_csi2_device struct's output member. Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 15b5128cafd5760c777945ec24cfadf45b6c1206 Author: Hans de Goede Date: Sun Jan 22 20:59:23 2023 +0100 media: atomisp: Remove isp_subdev_link_setup() Looking at isp_subdev_link_setup(), this function can never work, it does a switch-case like this: switch (local->index | is_media_entity_v4l2_subdev(remote->entity)) with cases like this: case ATOMISP_SUBDEV_PAD_SINK | MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN where ATOMISP_SUBDEV_PAD_SINK matches an index (0-4) and MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN is 0x00020000, but is_media_entity_v4l2_subdev(remote->entity) does not return MEDIA_ENT_F_* values, it return a bool, so 0 or 1 which means that non of the cases can ever match the input value. Looking at the rest of the function all it ever does (if it would actually hit one of the cases) is set the atomisp_sub_device struct's input member. And checking the rest of the atomisp code that member is never read. Also userspace does not actually setup media-controller links when using the atomisp /dev/video$ nodes since all the links are fixed. So isp_subdev_link_setup() never runs. Remove the unnecessary and broken isp_subdev_link_setup() function and also remove the unused atomisp_sub_device struct's input member. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit cb90b196647282fc197804d680ad9d86889e27e4 Author: Hans de Goede Date: Sun Jan 22 20:48:13 2023 +0100 media: atomisp: Put sensor ACPI devices in D3 before disable ACPI power-resources The device core will call ACPI to turn the device (i2c_client) for a sensor on / put it in D0 before calling its probe() method. This takes a reference on all of the ACPI power-resources belonging to the device. Since the atomisp_gmin_platform code disables ACPI power-resource management and does its own pm, this reference never gets released. This is a problem for ACPI power-resources which are shared with other devices since those now never get turned off again (nor back on again). Explicitly put the device in D3 before disabling the ACPI power-resource management. Note that atomisp_register_i2c_module() runs near the end of the sensor driver's probe() function, after the driver is done with probing the hw. So the power-resouces (the same resources as directly controlled by the atomisp platform code) getting turned off (a second time, as they are already off) is not a problem. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit edcb14e5139b09d2e2dc9e9bcf4c1bbdd4ad2e7c Author: Hans de Goede Date: Sun Jan 22 16:47:26 2023 +0100 media: atomisp: Stop overriding padding w/h to 12 on BYT atomisp_set_fmt() first does: v4l2_fill_mbus_format(&vformat.format, ...); vformat.format.height += padding_h; vformat.format.width += padding_w; ret = v4l2_subdev_call(isp->inputs[asd->input_curr].camera, pad, set_fmt, NULL, &vformat); if (ret) return ret; f->fmt.pix.width = vformat.format.width - padding_w; f->fmt.pix.height = vformat.format.height - padding_h; this happens with the original padding w/h = 16 values and then later on it calls: ret = atomisp_set_fmt_to_snr(vdev, &s_fmt, f->fmt.pix.pixelformat, padding_w, padding_h, dvs_env_w, dvs_env_h); Which repeats the above structure. If at that point padding w/h are changed to 12 then it will now request a different output-size of the sensor driver. The sensor drivers so far have actually been ignoring this since they use v4l2_find_nearest_size() on a fixed resolution list and the nearest resolution will be the one from the earlier calls where padding w/h was 16. But there really is no reason for sensor drivers to use a fixed resolution list. They make lower resolutions using cropping so they can make any resolution as long as width/height are even numbers. Dropping the fixed-resolution list limit from sensors on BYT results in trying to start streaming failing because the resolution set to the sensor now no longer matches with the resolution used during the initial part of the configuration done by atomisp_set_fmt(). Drop the BYT specific overriding of the padding_w/h to 12, so that the padding in the first and second s_fmt calls made to the sensor matches, to fix stream start failing when the fixed resolution list is dropped. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit f629e3865701a666f7881fc009d0f0a446421fab Author: Hans de Goede Date: Sun Jan 22 16:51:57 2023 +0100 media: atomisp: Drop ffmt local var from atomisp_set_fmt() ffmt 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. Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit f05cf2545ba86156d6acc024b26f35f21636bb83 Author: Hans de Goede Date: Sun Jan 15 22:09:57 2023 +0100 media: atomisp: Add atomisp_register_sensor_no_gmin() helper 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. Add 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. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit ba49e91e01876be72186faac75eafd2c0944e581 Author: Hans de Goede Date: Sat Jan 14 19:10:39 2023 +0100 media: atomisp: Remove atomisp_gmin_find_subdev() atomisp_gmin_find_subdev() can be used to lookup a subdev given its i2c-adapter + i2c-client-address. But the only caller of it reads this from the intel_v4l2_subdev_table struct and that same struct already contains a pointer to the v4l2_subdev. So this function is not necessary, drop it and modify its only caller to directly take the subdev from the intel_v4l2_subdev_table struct. Also drop struct intel_v4l2_subdev_i2c_board_info since that now no longer is used. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 3f1125db16a5358ac59fd09fab87aa7b7ea622ce Author: Hans de Goede Date: Fri Jan 13 18:06:06 2023 +0100 media: atomisp: Allow sensor drivers without a s_power callback The s_power callback for v4l2-subdevs has been deprecated, allow sensor drivers without a s_power callback to work by ignoring the -ENOIOCTLCMD return value. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 5141562bf46935cb6b41c0e871283b06690f6c52 Author: Hans de Goede Date: Fri Dec 30 19:17:13 2022 +0100 media: atomisp: Do not turn off sensor when the atomisp-sub-dev does not own it The atomisp driver creates 8 /dev/video# device nodes. 4 nodes (preview / video / viewfinder / capture) for each of 2 possible streams aka atomisp-sub-device-s (asd-s). Both streams start with asd->input_curr set to 0 (to the first sensor), opening + releasing a file-handle on one of the nodes of an asd, while streaming from the other asd causes the sensor to get turned off, leading to the stream failing. The atomisp-code already tracks which asd "owns" a specific sensor, use this to only turn the sensor off if it is owned by the asd. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit d24a42b9a643c4999a1710c3a30387208a1b60f6 Author: Hans de Goede Date: Wed Dec 28 22:56:03 2022 +0100 media: atomisp: Remove unnecessary memset(foo, 0, sizeof(foo)) calls The memory for all of struct atomisp_video_pipe is kzalloc()-ed in atomisp_subdev_init() so there is no need to memset parts of struct atomisp_video_pipe to 0. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 20734fcae96c8e5fd164e7afe40088ffe4e71803 Author: Hans de Goede Date: Wed Dec 28 22:48:15 2022 +0100 media: atomisp: Drop atomisp_init_pipe() atomisp_init_pipe() does 3 things: 1. Init a bunch of list-heads / locks 2. Init the vb_queue for the videodev (aka pipe) 3. zero the per-frame parameters related variables of the pipe 1. and 2. really should not be done at file-open time, but once at probe. Currently the code is getting away with doing this on every videodev-open because only 1 open is allowed at a time. 1. is already done at probe time by atomisp_init_subdev_pipe(), move 2. to atomisp_init_subdev_pipe() so that it is also done once at probe. As for 3. The per-frame parameters can only be set from a qbuf ioctl, which can only happen after a reqbufs ioctl and atomisp_buf_cleanup already zeros the per-frame parameters when the buffers are released, so 3. is not necessary at all. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 8972ed6ea7a00a39eab8f652e6f2f16a40ed2c3b Author: Hans de Goede Date: Wed Dec 28 20:14:00 2022 +0100 media: atomisp: Remove deferred firmware loading support Make atomisp behave like any other drivers and have it load the firmware at probe time (as it was already doing by default). The deferred firmware loading support needlessly complicates the v4l2_file_operations.open callback (atomisp_open()), getting in the way of allowing multiple opens like a normal v4l2 device would. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit ebfa8f5e8d66a2406427f5836c603c9b4693321b Author: Hans de Goede Date: Mon Dec 12 22:42:11 2022 +0100 media: atomisp: Remove no longer used binning info from sensor resolution info Remove the no longer used bin_factor_x, bin_factor_y and bin_mode members from the resolution info inside various atomisp camera sensor drivers. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 159a61da965a3f099b35c98e9f635e6d14d87d7a Author: Hans de Goede Date: Mon Dec 12 22:32:22 2022 +0100 media: atomisp: Remove V4L2_CID_BIN_FACTOR_HORZ/_VERT The bin-factor-x and bin-factor-y ctrls are only used internally to get a single value to pass to atomisp_css_input_set_binning_factor(), which is supposed to tune the lens-shading correction for the binning factor. But all sensor drivers return either 0 or 1 for this, with 0 meaning unset and 1 meaning no-binning. Even though some modes do actually do binning ... Also note that the removed atomisp_get_sensor_bin_factor() would fall back to 0 if either the x and y factor differ or if the ctrls are not implemented (not all sensor drivers implement them). Simply always pass 0 to atomisp_css_input_set_binning_factor(). This is part of a patch-series which tries to remove atomisp specific / custom code from the sensor drivers, with as end goal to make the atomisp drivers regular camera sensor drivers. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 7f04875057eb68e6b371f05ff055134dba1e27d5 Author: Hans de Goede Date: Mon Dec 12 22:19:07 2022 +0100 media: atomisp: Remove custom ATOMISP_IOC_G_SENSOR_MODE_DATA ioctl This ioctl returns a number of fixed sensor parameters + a number of mode-specific parameters. With libcamera these fixed parameters are instead stored in a table with sensor-name to parameters mappings (camera_sensor_properties.cpp); and the variable parameters can be derived from the set fmt. So this custom ioctl is not necessary; and it currently has no users. Remove the ioctl and all the sensor drivers xxxx_get_intg_factor() helpers which return this info. This is part of a patch-series which tries to remove atomisp specific / custom code from the sensor drivers, with as end goal to make the atomisp drivers regular camera sensor drivers. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 8b3332b278756f1f40ed74275da9bd2762986363 Author: Hans de Goede Date: Mon Dec 12 00:21:54 2022 +0100 media: atomisp: Remove custom ATOMISP_IOC_ISP_MAKERNOTE ioctl This ioctl simply returns a couple of fixed sensor parameters. With libcamera these fixed parameters are instead stored in a table with sensor-name to parameters mappings (camera_sensor_properties.cpp), so this custom ioctl is not necessary; and it currently has no users. Remove the ioctl and also remove the custom v4l2-ctrls underpinning the ioctl. This is part of a patch-series which tries to remove atomisp specific / custom code from the sensor drivers, with as end goal to make the atomisp drivers regular camera sensor drivers. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 94afce19ff62a89e4c161b0ca7cee2cd4a6454e7 Author: Hans de Goede Date: Sun Jan 15 15:37:41 2023 +0100 media: atomisp: Remove useless msleep(10) before power-on on BYT On BYT on poweron/runtime-resume the code is doing: 1. Do nothing 2. msleep(10) 3. Start actual poweron sequence Since the runtime resume can happen at any moment, waiting 10ms after it does not really make any sense. According to both the comment and to: https://github.com/intel/ProductionKernelQuilts/blob/master/uefi/cht-m1stable/patches/cam-0341-atomisp-WA-sleep-10ms-when-power-up-ISP-on-byt.patch Which is the patch which originally added this this was added as a workaround for a single test failing on a single model tablet/laptop. So lets just drop this. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit e6548795bb10af1e7aa6668224a47fb294ff24d8 Author: Hans de Goede Date: Sun Jan 15 15:27:39 2023 +0100 media: atomisp: Remove non working doorbell check from punit_ddr_dvfs_enable() punit_ddr_dvfs_enable() is only used on CHT devices and there dmesg gets filled with: "DDR DVFS, door bell is not cleared within 3ms" messages, so clearly the doorbell checking is not working. This check was added by: https://github.com/intel/ProductionKernelQuilts/blob/master/uefi/cht-m1stable/patches/cam-0340-atomisp-add-door-bell-for-ddr-dvfs-on-cht.patch Which commit message says: "PUNIT interface added to check Req_ACK of freq status". This suggests that the doorbell mechanism may only be available with certain PUNIT fw versions and it seems that many CHT devices do not have this fw version; that or the doorbell mechanism is not working for other reasons. Revert cam-0340-atomisp-add-door-bell-for-ddr-dvfs-on-cht.patch, replacing the doorbell check with a msleep(20) this fixes dmesg getting filled with error messages. Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit d8ba8ba6d5d1a559b882b2ebd0d35e9d517924ff Author: Hans de Goede Date: Sat Nov 26 23:08:25 2022 +0100 media: atomisp: Silence "isys dma store at addr, val" debug messages These are clearly debug messages, printing these all the time is not useful. Silence these by simply removing them altogether. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 553a64b7e7cef7690203bb07bd0280dd142c1015 Author: Hans de Goede Date: Sat Nov 26 23:02:49 2022 +0100 media: atomisp: Move power-management over to a custom pm-domain The atomisp does not use standard PCI power-management through the PCI config space. Instead this driver directly tells the P-Unit to disable the ISP over the IOSF. The standard PCI subsystem pm_ops will try to access the config space before (resume) / after (suspend) this driver has turned the ISP on / off, resulting in the following errors: Unable to change power state from D0 to D3hot, device inaccessible Unable to change power state from D3cold to D0, device inaccessible Getting logged into dmesg a whole bunch of time during boot as well as every time the camera is used. To avoid these errors use a custom pm_domain instead of standard driver pm-callbacks so that all the PCI subsys suspend / resume handling is skipped and call pci_save_state() / pci_restore_state() ourselves. Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 21b86873711be1aa019ee8991c293efd09c022fd Author: Hans de Goede Date: Mon Nov 21 15:06:09 2022 +0100 media: atomisp: Remove atomisp_sw_contex struct Remove the atomisp_sw_contex struct, it has only 1 member: running_freq, instead store running_freq directly. While at it also change running_freq from an int to an unsigned int, all values stored in it are unsigned and it is compared to the also unsigned new_freq variable. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 0c144c9308a66b4a8d7eb9a0f58d251999870fd1 Author: Hans de Goede Date: Thu Dec 1 22:59:40 2022 +0100 media: atomisp: Fix regulator registers on BYT devices with CRC PMIC The Crystal Cove PMIC used on some BYT/CHT devices has different revisions when paired with Bay Trail (BYT) vs Cherry Trail (CHT) SoCs. The current hardcoded values are only valid for CHT devices, change the code so that it uses the correct register values on both BYT and CHT. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit bcc5997250a4e4d44056fb49367ed46fb97bc300 Author: Hans de Goede Date: Wed Dec 28 20:31:43 2022 +0100 media: atomisp: Check buffer index is in range inside atomisp_qbuf_wrapper() Check buffer index is in range inside atomisp_qbuf_wrapper() before using it do index pipe->frame_request_config_id[]. Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 2e18e118c22594cced8121e6ab7ca27a60bcfc29 Author: Hans de Goede Date: Sat Jan 21 16:54:03 2023 +0100 media: atomisp: Fix WARN() when the vb2 start_streaming callback fails The videobuf2-core expects buffers to be put back in the queued state when the vb2 start_streaming callback fails. But the atomisp atomisp_flush_video_pipe() would unconditionally return them to the core in an error state. This triggers the following warning in the videobuf2-core: drivers/media/common/videobuf2/videobuf2-core.c:1652: /* * If done_list is not empty, then start_streaming() didn't call * vb2_buffer_done(vb, VB2_BUF_STATE_QUEUED) but STATE_ERROR or * STATE_DONE. */ WARN_ON(!list_empty(&q->done_list)); Fix this by adding a state argument to atomisp_flush_video_pipe() and use VB2_BUF_STATE_QUEUED as state when atomisp_start_streaming() fails. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 60ec70a71a9f9975a5d2dd4a7d97c20da0e41976 Author: Hans de Goede Date: Wed Dec 28 23:11:47 2022 +0100 media: atomisp: Only set default_run_mode on first open of a stream/asd Calling v4l2_ctrl_s_ctrl(asd->run_mode, pipe->default_run_mode) when the stream is already active (through another /dev/video# node) causes the stream to stop. Move the call to set the default run-mode so that it is only done on the first open of one of the 4 /dev/video# nodes of one of the 2 streams (atomisp-sub-devices / asd-s). Fixes: 2c45e343c581 ("media: atomisp: set per-device's default mode") Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 3376f06932f85eda824597f6ef93fccbbb92b64f Author: Hans de Goede Date: Thu Dec 22 23:00:48 2022 +0100 media: atomisp: Propagate set_fmt() errors in queue_setup() If set_fmt() fails make queue_setup() actually return the error instead of returning 0. This fixes the following oops on set_fmt() failures: [ 1060.378662] ------------[ cut here ]------------ [ 1060.378805] WARNING: CPU: 0 PID: 2080 at drivers/media/common/videobuf2/videobuf2-core.c:840 vb2_core_reqbufs+0x3f7/0x430 [videobuf2_common] ... [ 1060.381414] RIP: 0010:vb2_core_reqbufs+0x3f7/0x430 [videobuf2_common] ... [ 1060.382066] vb2_ioctl_reqbufs+0x9d/0xe0 [videobuf2_v4l2] [ 1060.382181] __video_do_ioctl+0x18e/0x3c0 [videodev] Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 5b8c1d30dc358c07aa0ef7676c2ddc3787abcf86 Author: Hans Verkuil Date: Thu Dec 8 09:12:00 2022 +0100 media: atomisp: use vb2_start_streaming_called() Don't touch q->start_streaming_called directly, use the vb2_start_streaming_called() function instead. Link: https://lore.kernel.org/r/bc6c24ec-72ea-64a1-9061-311cc7339827@xs4all.nl Signed-off-by: Hans Verkuil Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit be94be1b7fc7e51f9ccef20a0ef76583587275f3 Author: Arnd Bergmann Date: Wed Jan 4 09:21:36 2023 +0100 media: atomisp: fix videobuf2 Kconfig depenendency The recent conversion missed the Kconfig bit, so it can now end up in a link error on randconfig builds: ld.lld: error: undefined symbol: vb2_vmalloc_memops >>> referenced by atomisp_fops.c >>> drivers/staging/media/atomisp/pci/atomisp_fops.o:(atomisp_open) in archive vmlinux.a Link: https://lore.kernel.org/r/20230104082212.3770415-1-arnd@kernel.org Fixes: cb48ae89be3b ("media: atomisp: Convert to videobuf2") Signed-off-by: Arnd Bergmann Tested-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 29b0589a865b6f66d141d79b2dd1373e4e50fe17 Author: Duoming Zhou Date: Tue Jan 24 08:55:33 2023 +0100 media: rc: Fix use-after-free bugs caused by ene_tx_irqsim() When the ene device is detaching, function ene_remove() will be called. But there is no function to cancel tx_sim_timer in ene_remove(), the timer handler ene_tx_irqsim() could race with ene_remove(). As a result, the UAF bugs could happen, the process is shown below. (cleanup routine) | (timer routine) | mod_timer(&dev->tx_sim_timer, ..) ene_remove() | (wait a time) | ene_tx_irqsim() | dev->hw_lock //USE | ene_tx_sample(dev) //USE Fix by adding del_timer_sync(&dev->tx_sim_timer) in ene_remove(), The tx_sim_timer could stop before ene device is deallocated. What's more, The rc_unregister_device() and del_timer_sync() should be called first in ene_remove() and the deallocated functions such as free_irq(), release_region() and so on should be called behind them. Because the rc_unregister_device() is well synchronized. Otherwise, race conditions may happen. The situations that may lead to race conditions are shown below. Firstly, the rx receiver is disabled with ene_rx_disable() before rc_unregister_device() in ene_remove(), which means it can be enabled again if a process opens /dev/lirc0 between ene_rx_disable() and rc_unregister_device(). Secondly, the irqaction descriptor is freed by free_irq() before the rc device is unregistered, which means irqaction descriptor may be accessed again after it is deallocated. Thirdly, the timer can call ene_tx_sample() that can write to the io ports, which means the io ports could be accessed again after they are deallocated by release_region(). Therefore, the rc_unregister_device() and del_timer_sync() should be called first in ene_remove(). Suggested by: Sean Young Fixes: 9ea53b74df9c ("V4L/DVB: STAGING: remove lirc_ene0100 driver") Signed-off-by: Duoming Zhou Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 30040818b338b8ebc956ce0ebd198f8d593586a6 Author: Li Jun Date: Wed Jan 11 10:39:21 2023 +0100 media: rc: gpio-ir-recv: add remove function In case runtime PM is enabled, do runtime PM clean up to remove cpu latency qos request, otherwise driver removal may have below kernel dump: [ 19.463299] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000048 [ 19.472161] Mem abort info: [ 19.474985] ESR = 0x0000000096000004 [ 19.478754] EC = 0x25: DABT (current EL), IL = 32 bits [ 19.484081] SET = 0, FnV = 0 [ 19.487149] EA = 0, S1PTW = 0 [ 19.490361] FSC = 0x04: level 0 translation fault [ 19.495256] Data abort info: [ 19.498149] ISV = 0, ISS = 0x00000004 [ 19.501997] CM = 0, WnR = 0 [ 19.504977] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000049f81000 [ 19.511432] [0000000000000048] pgd=0000000000000000, p4d=0000000000000000 [ 19.518245] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP [ 19.524520] Modules linked in: gpio_ir_recv(+) rc_core [last unloaded: rc_core] [ 19.531845] CPU: 0 PID: 445 Comm: insmod Not tainted 6.2.0-rc1-00028-g2c397a46d47c #72 [ 19.531854] Hardware name: FSL i.MX8MM EVK board (DT) [ 19.531859] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 19.551777] pc : cpu_latency_qos_remove_request+0x20/0x110 [ 19.557277] lr : gpio_ir_recv_runtime_suspend+0x18/0x30 [gpio_ir_recv] [ 19.557294] sp : ffff800008ce3740 [ 19.557297] x29: ffff800008ce3740 x28: 0000000000000000 x27: ffff800008ce3d50 [ 19.574270] x26: ffffc7e3e9cea100 x25: 00000000000f4240 x24: ffffc7e3f9ef0e30 [ 19.574284] x23: 0000000000000000 x22: ffff0061803820f4 x21: 0000000000000008 [ 19.574296] x20: ffffc7e3fa75df30 x19: 0000000000000020 x18: ffffffffffffffff [ 19.588570] x17: 0000000000000000 x16: ffffc7e3f9efab70 x15: ffffffffffffffff [ 19.595712] x14: ffff800008ce37b8 x13: ffff800008ce37aa x12: 0000000000000001 [ 19.602853] x11: 0000000000000001 x10: ffffcbe3ec0dff87 x9 : 0000000000000008 [ 19.609991] x8 : 0101010101010101 x7 : 0000000000000000 x6 : 000000000f0bfe9f [ 19.624261] x5 : 00ffffffffffffff x4 : 0025ab8e00000000 x3 : ffff006180382010 [ 19.631405] x2 : ffffc7e3e9ce8030 x1 : ffffc7e3fc3eb810 x0 : 0000000000000020 [ 19.638548] Call trace: [ 19.640995] cpu_latency_qos_remove_request+0x20/0x110 [ 19.646142] gpio_ir_recv_runtime_suspend+0x18/0x30 [gpio_ir_recv] [ 19.652339] pm_generic_runtime_suspend+0x2c/0x44 [ 19.657055] __rpm_callback+0x48/0x1dc [ 19.660807] rpm_callback+0x6c/0x80 [ 19.664301] rpm_suspend+0x10c/0x640 [ 19.667880] rpm_idle+0x250/0x2d0 [ 19.671198] update_autosuspend+0x38/0xe0 [ 19.675213] pm_runtime_set_autosuspend_delay+0x40/0x60 [ 19.680442] gpio_ir_recv_probe+0x1b4/0x21c [gpio_ir_recv] [ 19.685941] platform_probe+0x68/0xc0 [ 19.689610] really_probe+0xc0/0x3dc [ 19.693189] __driver_probe_device+0x7c/0x190 [ 19.697550] driver_probe_device+0x3c/0x110 [ 19.701739] __driver_attach+0xf4/0x200 [ 19.705578] bus_for_each_dev+0x70/0xd0 [ 19.709417] driver_attach+0x24/0x30 [ 19.712998] bus_add_driver+0x17c/0x240 [ 19.716834] driver_register+0x78/0x130 [ 19.720676] __platform_driver_register+0x28/0x34 [ 19.725386] gpio_ir_recv_driver_init+0x20/0x1000 [gpio_ir_recv] [ 19.731404] do_one_initcall+0x44/0x2ac [ 19.735243] do_init_module+0x48/0x1d0 [ 19.739003] load_module+0x19fc/0x2034 [ 19.742759] __do_sys_finit_module+0xac/0x12c [ 19.747124] __arm64_sys_finit_module+0x20/0x30 [ 19.751664] invoke_syscall+0x48/0x114 [ 19.755420] el0_svc_common.constprop.0+0xcc/0xec [ 19.760132] do_el0_svc+0x38/0xb0 [ 19.763456] el0_svc+0x2c/0x84 [ 19.766516] el0t_64_sync_handler+0xf4/0x120 [ 19.770789] el0t_64_sync+0x190/0x194 [ 19.774460] Code: 910003fd a90153f3 aa0003f3 91204021 (f9401400) [ 19.780556] ---[ end trace 0000000000000000 ]--- Signed-off-by: Li Jun Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit aefcc80b7547f921c99701aaabf4217de03f7c92 Author: Krzysztof Kozlowski Date: Thu Dec 8 11:31:15 2022 +0100 media: dt-bindings: st,stih-cec: convert to DT schema Convert ST STIH4xx HDMI CEC 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 c69dff4fa348a44f4bdffbddec72c259b04a4e2a Author: Krzysztof Kozlowski Date: Thu Dec 8 11:31:14 2022 +0100 media: dt-bindings: nvidia,tegra114-cec: convert to DT schema Convert NVIDIA Tegra HDMI CEC bindings to DT schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Acked-by: Thierry Reding Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 343e1eb45d88762f3be46c5396b6ca2d27f5fc67 Author: Krzysztof Kozlowski Date: Thu Dec 8 11:31:13 2022 +0100 media: dt-bindings: cec-gpio: convert to DT schema Convert HDMI CEC GPIO 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 91b40d445d266591ffa38773438156bc270c9e7f Author: Krzysztof Kozlowski Date: Thu Dec 8 11:31:12 2022 +0100 media: dt-bindings: samsung,s5p-cec: convert to DT schema Convert Samsung S5P HDMI CEC adapter 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 d358c05bf33e39e392ba1aefce749d565a3fdd2a Author: Krzysztof Kozlowski Date: Thu Dec 8 11:31:11 2022 +0100 media: dt-bindings: chrontel,ch7322: reference common CEC properties Reference common HDMI CEC adapter properties to simplify the binding and have only one place of definition for common properties. The common CEC binding expects also node name to be 'cec'. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4498e7ba22ddac18e7f37518fff17b2eb6a77d35 Author: Krzysztof Kozlowski Date: Thu Dec 8 11:31:10 2022 +0100 media: dt-bindings: amlogic,meson-gx-ao-cec: reference common CEC properties Reference common HDMI CEC adapter properties to simplify the binding and have only one place of definition for common properties. Signed-off-by: Krzysztof Kozlowski Acked-by: Neil Armstrong Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f4b0b85e171b2a1f99126b8feb93fd1fcc98fdac Author: Krzysztof Kozlowski Date: Thu Dec 8 11:31:09 2022 +0100 media: dt-bindings: cec: convert common CEC properties to DT schema Convert common HDMI CEC adapter 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 8f43766211afaabe019b0252a805e5afe5331962 Author: Krzysztof Kozlowski Date: Thu Dec 8 11:31:08 2022 +0100 media: dt-bindings: st,stm32-cec: move to cec subfolder Move st,stm32-cec.yaml bindings to cec subfolder and drop unneeded "bindings" in the title. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit da727f82b7356a2b28c3393cec888cf3409349cf Author: Krzysztof Kozlowski Date: Thu Dec 8 11:31:07 2022 +0100 media: dt-bindings: amlogic,meson-gx-ao-cec: move to cec subfolder Move amlogic,meson-gx-ao-cec.yaml bindings to cec subfolder and drop unneeded quotes. Signed-off-by: Krzysztof Kozlowski Acked-by: Neil Armstrong Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit be3ae7cf4326e95bb1d5413b63baabc26f4a1324 Author: Dong Chuanjian Date: Tue Dec 27 03:36:25 2022 +0100 media: drivers/media/v4l2-core/v4l2-h264 : add detection of null pointers When the pointer variable is judged to be null, null is returned directly. [hverkuil: fix two checkpatch warnings] Signed-off-by: Dong Chuanjian Acked-by: Nicolas Dufresne Fixes: d3f756ad629b ("media: v4l2: Trace calculated p/b0/b1 initial reflist") Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c9ca3b53ee31046a9f72cf3ced8dad6582edebfe Author: Chen-Yu Tsai Date: Mon Dec 26 06:26:06 2022 +0100 media: hantro: Use core-generated bus_info value The Hantro driver uses a hardcoded value for the bus_info field in the media device and |struct v4l2_capability|. This worked well when there was just one device. However with the iMX.8 series we are now seeing two Hantro blocks on the same chip. The static bus_info is no longer sufficient for differentiating devices. Since commit f2d8b6917f3b ("media: v4l: ioctl: Set bus_info in v4l_querycap()"), the V4L2 core provides a default value for the bus_info field for platform and PCI devices. This value will match the default value for media devices added by commit cef699749f37 ("media: mc: Set bus_info in media_device_init()"). These defaults are stable and device-specific. Drop the static bus_info values from the hantro driver and use the defaults. Signed-off-by: Chen-Yu Tsai Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 255a4a5f1d2bc70f95ac03defab39f2a7c1fff42 Author: Yunfei Dong Date: Sat Jan 14 10:41:12 2023 +0100 media: mediatek: vcodec: Using pm_runtime_put instead of pm_runtime_put_sync pm_runtime_put will set RPM_ASYNC flag then queue an idle-notification request again, won't return error immediately until current request is scheduled. But pm_runtime_put_sync run the ->runtime_idle() callback directly, return error immediately no matter whether current request is scheduled. Signed-off-by: Yunfei Dong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 809060c8a357e020010dd8f797a5efd3c5432b13 Author: Ming Qian Date: Fri Jan 13 06:25:51 2023 +0100 media: amphion: correct the unspecified color space in the E.2.1 of Rec. ITU-T H.264 (06/2019), 0 of colour primaries is reserved, and 2 is unspecified. driver can map V4L2_COLORSPACE_LAST to 0, and map V4L2_COLORSPACE_DEFAULT to 2. v4l2_xfer_func and v4l2_ycbcr_encoding are similar case. Fixes: 3cd084519c6f ("media: amphion: add vpu v4l2 m2m support") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 61fe43dc9f454bc3caa99dbdd8f5fa3ba813981a Author: Ming Qian Date: Thu Jan 12 10:47:02 2023 +0100 media: imx-jpeg: Apply clk_bulk api instead of operating specific clk using the api of clk_bulk can simplify the code. and the clock of the jpeg codec may be changed, the clk_bulk api can be compatible with the future change. Fixes: 4c2e5156d9fa ("media: imx-jpeg: Add pm-runtime support for imx-jpeg") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 097d7c1fcb8d4b52c62a36f94b8f18bc21a24934 Author: Eric Biggers Date: Tue Feb 7 22:21:07 2023 -0800 fscrypt: clean up fscrypt_add_test_dummy_key() Now that fscrypt_add_test_dummy_key() is only called by setup_file_encryption_key() and not by the individual filesystems, un-export it. Also change its prototype to take the fscrypt_key_specifier directly, as the caller already has it. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20230208062107.199831-6-ebiggers@kernel.org commit ec64036e68634231f5891faa2b7a81cdc5dcd001 Author: Eric Biggers Date: Tue Feb 7 22:21:06 2023 -0800 fs/super.c: stop calling fscrypt_destroy_keyring() from __put_super() Now that the key associated with the "test_dummy_operation" mount option is added on-demand when it's needed, rather than immediately when the filesystem is mounted, fscrypt_destroy_keyring() no longer needs to be called from __put_super() to avoid a memory leak on mount failure. Remove this call, which was causing confusion because it appeared to be a sleep-in-atomic bug (though it wasn't, for a somewhat-subtle reason). Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20230208062107.199831-5-ebiggers@kernel.org commit 1ad2a626762dca9f3fe6954ce148f9e4fc4c1ba7 Author: Eric Biggers Date: Tue Feb 7 22:21:05 2023 -0800 f2fs: stop calling fscrypt_add_test_dummy_key() Now that fs/crypto/ adds the test dummy encryption key on-demand when it's needed, there's no need for individual filesystems to call fscrypt_add_test_dummy_key(). Remove the call to it from f2fs. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20230208062107.199831-4-ebiggers@kernel.org commit 7959eb19e4a369639ff9e55eb1147360d5ac8ddb Author: Eric Biggers Date: Tue Feb 7 22:21:04 2023 -0800 ext4: stop calling fscrypt_add_test_dummy_key() Now that fs/crypto/ adds the test dummy encryption key on-demand when it's needed, there's no need for individual filesystems to call fscrypt_add_test_dummy_key(). Remove the call to it from ext4. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20230208062107.199831-3-ebiggers@kernel.org commit 60e463f0be9874692a56a7d419a6e39029b6290d Author: Eric Biggers Date: Tue Feb 7 22:21:03 2023 -0800 fscrypt: add the test dummy encryption key on-demand When the key for an inode is not found but the inode is using the test_dummy_encryption policy, automatically add the test_dummy_encryption key to the filesystem keyring. This eliminates the need for all the individual filesystems to do this at mount time, which is a bit tricky to clean up from on failure. Note: this covers the call to fscrypt_find_master_key() from inode key setup, but not from the fscrypt ioctls. So, this isn't *exactly* the same as the key being present from the very beginning. I think we can tolerate that, though, since the inode key setup caller is the only one that actually matters in the context of test_dummy_encryption. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20230208062107.199831-2-ebiggers@kernel.org commit c07e734b7a65c7706319e24f9b14ec9d262fa50c Author: Oleg Verych Date: Sat Jan 7 09:37:49 2023 +0100 media: sun4i-csi: Fix 'Unbalanced pm_runtime_enable!' When removing the module, balance PM runtime enable with the corresponding disable call. Signed-off-by: Oleg Verych Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4ee8191c7c9f2dc62bd007dd4ac79b7799785c36 Author: Colin Ian King Date: Thu Jan 5 19:44:03 2023 +0100 media: rkisp1: make a few const arrays static Don't populate the const arrays on the stack, instead make them static. Also makes the object code smaller. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3ef5750989a2b028ce84a0feadd819202de2a66e Author: Colin Ian King Date: Thu Jan 5 19:33:14 2023 +0100 media: vidtv: make const array DURATION static Don't populate the read-only const array DURATION on the stack but instead make it static. Also makes the object code a little smaller. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ee56fa0116e13f39e6d025dbc4f4138878f67a12 Author: Deepak R Varma Date: Tue Jan 3 18:38:20 2023 +0100 media: staging: media: imx: change imx_media_fim_set_stream() to return void At present, the function imx_media_fim_set_stream() always returns 0. So, convert it to be a function returning void instead. Issue identified using the returnvar.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma Reviewed-by: Marco Felsch Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 29bd426764dee14a09e37700406f4a5920825fcc Author: Nicolas Dufresne Date: Fri Dec 23 19:16:47 2022 +0100 media: hantro: Fix JPEG encoder ENUM_FRMSIZE on RK3399 Since 79c987de8b354, enumerating framesize on format set with "MODE_NONE" (any raw formats) is reporting an invalid frmsize. Size: Stepwise 0x0 - 0x0 with step 0/0 Before this change, the driver would return EINVAL, which is also invalid but worked in GStreamer. The original intent was not to implement it, hence the -ENOTTY return in this change. While drivers should implement ENUM_FRMSIZE for all formats and queues, this change is limited in scope to fix the regression. This fixes taking picture in Gnome Cheese software, or any software using GSteamer to encode JPEG with hardware acceleration. Fixes: 79c987de8b35 ("media: hantro: Use post processor scaling capacities") Reported-by: Robert Mader Signed-off-by: Nicolas Dufresne Reviewed-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia Tested-by: Robert Mader Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 637046bb5ac9487e3f059a490f7b3045f1d1077a Author: Zhou jie Date: Fri Dec 23 10:08:58 2022 +0100 media: radio/wl128x: remove unnecessary (void*) conversions The void * type pointer does not need to be cast. Signed-off-by: Zhou jie Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 251c0ea6efd3c3ea0f8a55fdd96c749a98639bd3 Author: Ming Qian Date: Fri Dec 16 10:08:44 2022 +0100 media: v4l2-jpeg: ignore the unknown APP14 marker The legal identifier of APP14 is "Adobe\0", but sometimes it may be "This is an unknown APP marker . Compliant decoders must ignore it." In this case, just ignore it. It won't affect the decode result. Fixes: b8035f7988a8 ("media: Add parsing for APP14 data segment in jpeg helpers") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 41959c4f973b837a12061b84d3a436fc64c73a30 Author: Ming Qian Date: Fri Dec 16 09:30:33 2022 +0100 media: v4l2-jpeg: correct the skip count in jpeg_parse_app14_data The curr pointer has advanced 14 bytes in jpeg_parse_app14_data. 1. jpeg_get_word_be(stream), it goes forward 2 bytes. 2. jpeg_skip(stream, 11), it goes forward 11 bytes. 3. jpeg_get_byte(stream), it goes forward 1 bytes. so the remain bytes of this segment should be (lp - 2 - 11 - 1), but not (lp - 2 - 11). if driver skip 1 extra bytes, the following parsing may go wrong. Fixes: b8035f7988a8 ("media: Add parsing for APP14 data segment in jpeg helpers") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e3f7feb6d89311f369dd4ad903ea62e45328cdbe Author: Arnd Bergmann Date: Thu Dec 15 17:40:08 2022 +0100 media: platform: mtk-mdp3: fix Kconfig dependencies The new mdp3 driver uses 'select' to force-enable a couple of drivers it depends on. This is error-prone and likely to cause dependency loops as well as warnings like: WARNING: unmet direct dependencies detected for VIDEO_MEDIATEK_VPU Depends on [n]: MEDIA_SUPPORT [=m] && MEDIA_PLATFORM_SUPPORT [=y] && MEDIA_PLATFORM_DRIVERS [=y] && V4L_MEM2MEM_DRIVERS [=n] && VIDEO_DEV [=m] && (ARCH_MEDIATEK [=y] || COMPILE_TEST [=y]) Selected by [m]: - VIDEO_MEDIATEK_MDP3 [=m] && MEDIA_SUPPORT [=m] && MEDIA_PLATFORM_SUPPORT [=y] && MEDIA_PLATFORM_DRIVERS [=y] && (MTK_IOMMU [=m] || COMPILE_TEST [=y]) && VIDEO_DEV [=m] && (ARCH_MEDIATEK [=y] || COMPILE_TEST [=y]) && HAS_DMA [=y] && REMOTEPROC [=y] This specific warning was already addressed in a previous patch, but there are similar unnecessary 'select' statements, so turn those into 'depends on'. This also means the dependency on ARCH_MEDIATEK is redundant and can be dropped. Fixes: 61890ccaefaf ("media: platform: mtk-mdp3: add MediaTek MDP3 driver") Fixes: 9195a860ef0a ("media: platform: mtk-mdp3: remove unused VIDEO_MEDIATEK_VPU config") Signed-off-by: Arnd Bergmann Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 05fb9ace34b8645cb76f7e3a21b5c7b754329cae Author: Arnd Bergmann Date: Thu Dec 15 17:28:46 2022 +0100 media: camss: csiphy-3ph: avoid undefined behavior Marking a case of the switch statement as unreachable means the compiler treats it as undefined behavior, which is then caught by an objtool warning: drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.o: warning: objtool: csiphy_lanes_enable() falls through to next function csiphy_lanes_disable() Instead of simply continuing execution at a random place of the driver, print a warning and return from to the caller, which makes it possible to understand what happens and avoids the warning. Fixes: 53655d2a0ff2 ("media: camss: csiphy-3ph: add support for SM8250 CSI DPHY") Signed-off-by: Arnd Bergmann Reviewed-by: Robert Foss Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1fe8a3b61fd6eb4a46fde7c22127ffa99ab27ed2 Merge: cb6b2e11a42de e0645311e1abc Author: Jakub Kicinski Date: Tue Feb 7 21:40:40 2023 -0800 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== ice: various virtualization cleanups Jacob Keller says: This series contains a variety of refactors and cleanups in the VF code for the ice driver. Its primary focus is cleanup and simplification of the VF operations and addition of a few new operations that will be required by Scalable IOV, as well as some other refactors needed for the handling of VF subfunctions. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: ice: remove unnecessary virtchnl_ether_addr struct use ice: introduce .irq_close VF operation ice: introduce clear_reset_state operation ice: convert vf_ops .vsi_rebuild to .create_vsi ice: introduce ice_vf_init_host_cfg function ice: add a function to initialize vf entry ice: Pull common tasks into ice_vf_post_vsi_rebuild ice: move ice_vf_vsi_release into ice_vf_lib.c ice: move vsi_type assignment from ice_vsi_alloc to ice_vsi_cfg ice: refactor VSI setup to use parameter structure ice: drop unnecessary VF parameter from several VSI functions ice: fix function comment referring to ice_vsi_alloc ice: Add more usage of existing function ice_get_vf_vsi(vf) ==================== Link: https://lore.kernel.org/r/20230206214813.20107-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit eca4c0eea53432ec4b711b2a8ad282cbad231b4f Author: Qi Zheng Date: Wed Feb 8 12:00:37 2023 +0800 OPP: fix error checking in opp_migrate_dentry() Since commit ff9fb72bc077 ("debugfs: return error values, not NULL") changed return value of debugfs_rename() in error cases from %NULL to %ERR_PTR(-ERROR), we should also check error values instead of NULL. Fixes: ff9fb72bc077 ("debugfs: return error values, not NULL") Signed-off-by: Qi Zheng Signed-off-by: Viresh Kumar commit cb6b2e11a42decea2afc77df73ec7326db1ac25f Author: Moshe Shemesh Date: Mon Feb 6 17:56:16 2023 +0200 devlink: Fix memleak in health diagnose callback The callback devlink_nl_cmd_health_reporter_diagnose_doit() miss devlink_fmsg_free(), which leads to memory leak. Fix it by adding devlink_fmsg_free(). Fixes: e994a75fb7f9 ("devlink: remove reporter reference counting") Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/1675698976-45993-1-git-send-email-moshe@nvidia.com Signed-off-by: Jakub Kicinski commit f817554786ddc75e0960ea542061fc43a1f2f7e2 Author: James Hershaw Date: Mon Feb 6 16:48:36 2023 +0100 nfp: flower: add check for flower VF netdevs for get/set_eeprom Move the nfp_net_get_port_mac_by_hwinfo() check to ahead in the get/set_eeprom() functions to in order to check for a VF netdev, which this function does not support. It is debatable if this is a fix or an enhancement, and we have chosen to go for the latter. It does address a problem introduced by commit 74b4f1739d4e ("nfp: flower: change get/set_eeprom logic and enable for flower reps"). However, the ethtool->len == 0 check avoids the problem manifesting as a run-time bug (NULL pointer dereference of app). Signed-off-by: James Hershaw Reviewed-by: Louis Peens Signed-off-by: Simon Horman Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20230206154836.2803995-1-simon.horman@corigine.com Signed-off-by: Jakub Kicinski commit b24e9de39880e700f9a6ea9b5d33bb0d81e9cf81 Merge: cf52bd238b75b 9d9a90cda415d Author: Jakub Kicinski Date: Tue Feb 7 20:18:51 2023 -0800 Merge branch 'mlxsw-misc-devlink-changes' Petr Machata says: ==================== mlxsw: Misc devlink changes This patchset adjusts mlxsw to recent devlink changes in net-next. Patch #1 removes a devl_param_driverinit_value_set() call that was unnecessary, but now additionally triggers a WARN_ON. Patches #2-#4 are non-functional preparations for the following patches. Patch #5 fixes a use-after-free that is triggered while changing network namespaces. Patch #6 makes mlxsw consistent with netdevsim by having mlxsw register its devlink instance before its sub-objects. It helps us avoid a warning described in the commit message. ==================== Link: https://lore.kernel.org/r/cover.1675692666.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 9d9a90cda415d1ba9d248c7053e668c1b9a9f50e Author: Ido Schimmel Date: Mon Feb 6 16:39:23 2023 +0100 mlxsw: core: Register devlink instance before sub-objects Recent changes made it possible to register the devlink instance before its sub-objects and under the instance lock. Among other things, it allows us to avoid warnings such as this one [1]. The warning is generated because a buggy firmware is generating a health event during driver initialization, before the devlink instance is registered. Move the registration of the devlink instance to the beginning of the initialization flow to avoid such problems. A similar change was implemented in netdevsim in commit 82a3aef2e6af ("netdevsim: move devlink registration under the instance lock"). [1] WARNING: CPU: 3 PID: 49 at net/devlink/leftover.c:7509 devlink_recover_notify.constprop.0+0xaf/0xc0 [...] Call Trace: devlink_health_report+0x45/0x1d0 mlxsw_core_health_event_work+0x24/0x30 [mlxsw_core] process_one_work+0x1db/0x390 worker_thread+0x49/0x3b0 kthread+0xe5/0x110 ret_from_fork+0x1f/0x30 Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit 74cbc3c03c828ccf265a72f9bcb5aee906978744 Author: Ido Schimmel Date: Mon Feb 6 16:39:22 2023 +0100 mlxsw: spectrum_acl_tcam: Move devlink param to TCAM code Cited commit added 'DEVLINK_CMD_PARAM_DEL' notifications whenever the network namespace of the devlink instance is changed. Specifically, the notifications are generated after calling reload_down(), but before calling reload_up(). At this stage, the data structures accessed while reading the value of the "acl_region_rehash_interval" devlink parameter are uninitialized, resulting in a use-after-free [1]. Fix by moving the registration and unregistration of the devlink parameter to the TCAM code where it is actually used. This means that the parameter is unregistered during reload_down() and then re-registered during reload_up(), avoiding the use-after-free between these two operations. Reproducer: # ip netns add test123 # devlink dev reload pci/0000:06:00.0 netns test123 [1] BUG: KASAN: use-after-free in mlxsw_sp_acl_tcam_vregion_rehash_intrvl_get+0xb2/0xd0 Read of size 4 at addr ffff888162fd37d8 by task devlink/1323 [...] Call Trace: dump_stack_lvl+0x95/0xbd print_report+0x181/0x4a1 kasan_report+0xdb/0x200 mlxsw_sp_acl_tcam_vregion_rehash_intrvl_get+0xb2/0xd0 mlxsw_sp_params_acl_region_rehash_intrvl_get+0x32/0x80 devlink_nl_param_fill.constprop.0+0x29a/0x11e0 devlink_param_notify.constprop.0+0xb9/0x250 devlink_notify_unregister+0xbc/0x470 devlink_reload+0x1aa/0x440 devlink_nl_cmd_reload+0x559/0x11b0 genl_family_rcv_msg_doit.isra.0+0x1f8/0x2e0 genl_rcv_msg+0x558/0x7f0 netlink_rcv_skb+0x170/0x440 genl_rcv+0x2d/0x40 netlink_unicast+0x53f/0x810 netlink_sendmsg+0x961/0xe80 __sys_sendto+0x2a4/0x420 __x64_sys_sendto+0xe5/0x1c0 do_syscall_64+0x38/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Fixes: 7d7e9169a3ec ("devlink: move devlink reload notifications back in between _down() and _up() calls") Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit 194ab9476089bbfc021073214e071a404e375ee6 Author: Ido Schimmel Date: Mon Feb 6 16:39:21 2023 +0100 mlxsw: spectrum_acl_tcam: Reorder functions to avoid forward declarations Move the initialization and de-initialization code further below in order to avoid forward declarations in the next patch. No functional changes. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit 61fe3b9102ac84ba479ab84d8f5454af2e21e468 Author: Ido Schimmel Date: Mon Feb 6 16:39:20 2023 +0100 mlxsw: spectrum_acl_tcam: Make fini symmetric to init Move mutex_destroy() to the end to make the function symmetric with mlxsw_sp_acl_tcam_init(). No functional changes. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit 65823e07b1e4055b6278725fd92f4d7e6f8d53fd Author: Ido Schimmel Date: Mon Feb 6 16:39:19 2023 +0100 mlxsw: spectrum_acl_tcam: Add missing mutex_destroy() Pair mutex_init() with a mutex_destroy() in the error path. Found during code review. No functional changes. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit 8b50ac29854a04c8c35d3d0cb33d2166bf74c6e6 Author: Danielle Ratson Date: Mon Feb 6 16:39:18 2023 +0100 mlxsw: spectrum: Remove pointless call to devlink_param_driverinit_value_set() The "acl_region_rehash_interval" devlink parameter is a "runtime" parameter, making the call to devl_param_driverinit_value_set() pointless. Before cited commit the function simply returned an error (that was not checked), but now it emits a WARNING [1]. Fix by removing the function call. [1] WARNING: CPU: 0 PID: 7 at net/devlink/leftover.c:10974 devl_param_driverinit_value_set+0x8c/0x90 [...] Call Trace: mlxsw_sp2_params_register+0x83/0xb0 [mlxsw_spectrum] __mlxsw_core_bus_device_register+0x5e5/0x990 [mlxsw_core] mlxsw_core_bus_device_register+0x42/0x60 [mlxsw_core] mlxsw_pci_probe+0x1f0/0x230 [mlxsw_pci] local_pci_probe+0x1a/0x40 work_for_cpu_fn+0xf/0x20 process_one_work+0x1db/0x390 worker_thread+0x1d5/0x3b0 kthread+0xe5/0x110 ret_from_fork+0x1f/0x30 Fixes: 85fe0b324c83 ("devlink: make devlink_param_driverinit_value_set() return void") Signed-off-by: Danielle Ratson Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit cf52bd238b75b6e03232aa86758d62d974604d76 Author: Vladimir Oltean Date: Mon Feb 6 11:45:31 2023 +0200 net: enetc: add support for MAC Merge statistics counters Add PF driver support for the following: - Viewing the standardized MAC Merge layer counters. - Viewing the standardized Ethernet MAC and RMON counters associated with the pMAC. Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20230206094531.444988-2-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit c7b9e80869021bcd19394907596a919c3762cb3b Author: Vladimir Oltean Date: Mon Feb 6 11:45:30 2023 +0200 net: enetc: add support for MAC Merge layer Add PF driver support for viewing and changing the MAC Merge sublayer parameters, and seeing the verification state machine's current state. The verification handshake with the link partner is driven by hardware. Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20230206094531.444988-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit a92adde8d3d466e4d945bc4b684795543d0b6594 Author: Dave Thaler Date: Fri Jan 27 22:45:55 2023 +0000 bpf, docs: Use consistent names for the same field Use consistent names for the same field, e.g., 'dst' vs 'dst_reg'. Previously a mix of terms were used for the same thing in various cases. Signed-off-by: Dave Thaler Acked-by: David Vernet Link: https://lore.kernel.org/r/20230127224555.916-1-dthaler1968@googlemail.com Signed-off-by: Alexei Starovoitov commit cc74ca303a658dc4fb69e75df5f79d03d7a9b7e5 Merge: 383d9f87a06dd 2ac4980c57f54 Author: Jakub Kicinski Date: Tue Feb 7 18:20:02 2023 -0800 Merge branch 'sched-cpumask-improve-on-cpumask_local_spread-locality' Yury Norov says: ==================== sched: cpumask: improve on cpumask_local_spread() locality cpumask_local_spread() currently checks local node for presence of i'th CPU, and then if it finds nothing makes a flat search among all non-local CPUs. We can do it better by checking CPUs per NUMA hops. This has significant performance implications on NUMA machines, for example when using NUMA-aware allocated memory together with NUMA-aware IRQ affinity hints. Performance tests from patch 8 of this series for mellanox network driver show: TCP multi-stream, using 16 iperf3 instances pinned to 16 cores (with aRFS on). Active cores: 64,65,72,73,80,81,88,89,96,97,104,105,112,113,120,121 +-------------------------+-----------+------------------+------------------+ | | BW (Gbps) | TX side CPU util | RX side CPU util | +-------------------------+-----------+------------------+------------------+ | Baseline | 52.3 | 6.4 % | 17.9 % | +-------------------------+-----------+------------------+------------------+ | Applied on TX side only | 52.6 | 5.2 % | 18.5 % | +-------------------------+-----------+------------------+------------------+ | Applied on RX side only | 94.9 | 11.9 % | 27.2 % | +-------------------------+-----------+------------------+------------------+ | Applied on both sides | 95.1 | 8.4 % | 27.3 % | +-------------------------+-----------+------------------+------------------+ Bottleneck in RX side is released, reached linerate (~1.8x speedup). ~30% less cpu util on TX. ==================== Link: https://lore.kernel.org/r/20230121042436.2661843-1-yury.norov@gmail.com Signed-off-by: Jakub Kicinski commit 2ac4980c57f54db7c5b416f7946d2921fc16d9d2 Author: Yury Norov Date: Fri Jan 20 20:24:36 2023 -0800 lib/cpumask: update comment for cpumask_local_spread() Now that we have an iterator-based alternative for a very common case of using cpumask_local_spread for all cpus in a row, it's worth to mention that in comment to cpumask_local_spread(). Signed-off-by: Yury Norov Reviewed-by: Valentin Schneider Reviewed-by: Tariq Toukan Signed-off-by: Jakub Kicinski commit 2acda57736de1e486036b90a648e67a3599080a1 Author: Tariq Toukan Date: Fri Jan 20 20:24:35 2023 -0800 net/mlx5e: Improve remote NUMA preferences used for the IRQ affinity hints In the IRQ affinity hints, replace the binary NUMA preference (local / remote) with the improved for_each_numa_hop_cpu() API that minds the actual distances, so that remote NUMAs with short distance are preferred over farther ones. This has significant performance implications when using NUMA-aware allocated memory (follow [1] and derivatives for example). [1] drivers/net/ethernet/mellanox/mlx5/core/en_main.c :: mlx5e_open_channel() int cpu = cpumask_first(mlx5_comp_irq_get_affinity_mask(priv->mdev, ix)); Performance tests: TCP multi-stream, using 16 iperf3 instances pinned to 16 cores (with aRFS on). Active cores: 64,65,72,73,80,81,88,89,96,97,104,105,112,113,120,121 +-------------------------+-----------+------------------+------------------+ | | BW (Gbps) | TX side CPU util | RX side CPU util | +-------------------------+-----------+------------------+------------------+ | Baseline | 52.3 | 6.4 % | 17.9 % | +-------------------------+-----------+------------------+------------------+ | Applied on TX side only | 52.6 | 5.2 % | 18.5 % | +-------------------------+-----------+------------------+------------------+ | Applied on RX side only | 94.9 | 11.9 % | 27.2 % | +-------------------------+-----------+------------------+------------------+ | Applied on both sides | 95.1 | 8.4 % | 27.3 % | +-------------------------+-----------+------------------+------------------+ Bottleneck in RX side is released, reached linerate (~1.8x speedup). ~30% less cpu util on TX. * CPU util on active cores only. Setups details (similar for both sides): NIC: ConnectX6-DX dual port, 100 Gbps each. Single port used in the tests. $ lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 256 On-line CPU(s) list: 0-255 Thread(s) per core: 2 Core(s) per socket: 64 Socket(s): 2 NUMA node(s): 16 Vendor ID: AuthenticAMD CPU family: 25 Model: 1 Model name: AMD EPYC 7763 64-Core Processor Stepping: 1 CPU MHz: 2594.804 BogoMIPS: 4890.73 Virtualization: AMD-V L1d cache: 32K L1i cache: 32K L2 cache: 512K L3 cache: 32768K NUMA node0 CPU(s): 0-7,128-135 NUMA node1 CPU(s): 8-15,136-143 NUMA node2 CPU(s): 16-23,144-151 NUMA node3 CPU(s): 24-31,152-159 NUMA node4 CPU(s): 32-39,160-167 NUMA node5 CPU(s): 40-47,168-175 NUMA node6 CPU(s): 48-55,176-183 NUMA node7 CPU(s): 56-63,184-191 NUMA node8 CPU(s): 64-71,192-199 NUMA node9 CPU(s): 72-79,200-207 NUMA node10 CPU(s): 80-87,208-215 NUMA node11 CPU(s): 88-95,216-223 NUMA node12 CPU(s): 96-103,224-231 NUMA node13 CPU(s): 104-111,232-239 NUMA node14 CPU(s): 112-119,240-247 NUMA node15 CPU(s): 120-127,248-255 .. $ numactl -H .. node distances: node 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0: 10 11 11 11 12 12 12 12 32 32 32 32 32 32 32 32 1: 11 10 11 11 12 12 12 12 32 32 32 32 32 32 32 32 2: 11 11 10 11 12 12 12 12 32 32 32 32 32 32 32 32 3: 11 11 11 10 12 12 12 12 32 32 32 32 32 32 32 32 4: 12 12 12 12 10 11 11 11 32 32 32 32 32 32 32 32 5: 12 12 12 12 11 10 11 11 32 32 32 32 32 32 32 32 6: 12 12 12 12 11 11 10 11 32 32 32 32 32 32 32 32 7: 12 12 12 12 11 11 11 10 32 32 32 32 32 32 32 32 8: 32 32 32 32 32 32 32 32 10 11 11 11 12 12 12 12 9: 32 32 32 32 32 32 32 32 11 10 11 11 12 12 12 12 10: 32 32 32 32 32 32 32 32 11 11 10 11 12 12 12 12 11: 32 32 32 32 32 32 32 32 11 11 11 10 12 12 12 12 12: 32 32 32 32 32 32 32 32 12 12 12 12 10 11 11 11 13: 32 32 32 32 32 32 32 32 12 12 12 12 11 10 11 11 14: 32 32 32 32 32 32 32 32 12 12 12 12 11 11 10 11 15: 32 32 32 32 32 32 32 32 12 12 12 12 11 11 11 10 $ cat /sys/class/net/ens5f0/device/numa_node 14 Affinity hints (127 IRQs): Before: 331: 00000000,00000000,00000000,00000000,00010000,00000000,00000000,00000000 332: 00000000,00000000,00000000,00000000,00020000,00000000,00000000,00000000 333: 00000000,00000000,00000000,00000000,00040000,00000000,00000000,00000000 334: 00000000,00000000,00000000,00000000,00080000,00000000,00000000,00000000 335: 00000000,00000000,00000000,00000000,00100000,00000000,00000000,00000000 336: 00000000,00000000,00000000,00000000,00200000,00000000,00000000,00000000 337: 00000000,00000000,00000000,00000000,00400000,00000000,00000000,00000000 338: 00000000,00000000,00000000,00000000,00800000,00000000,00000000,00000000 339: 00010000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 340: 00020000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 341: 00040000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 342: 00080000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 343: 00100000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 344: 00200000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 345: 00400000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 346: 00800000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 347: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 348: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000002 349: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000004 350: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000008 351: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000010 352: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000020 353: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000040 354: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000080 355: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000100 356: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000200 357: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000400 358: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000800 359: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00001000 360: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00002000 361: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00004000 362: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00008000 363: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00010000 364: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00020000 365: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00040000 366: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00080000 367: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00100000 368: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00200000 369: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00400000 370: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00800000 371: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,01000000 372: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,02000000 373: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,04000000 374: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,08000000 375: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,10000000 376: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,20000000 377: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,40000000 378: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,80000000 379: 00000000,00000000,00000000,00000000,00000000,00000000,00000001,00000000 380: 00000000,00000000,00000000,00000000,00000000,00000000,00000002,00000000 381: 00000000,00000000,00000000,00000000,00000000,00000000,00000004,00000000 382: 00000000,00000000,00000000,00000000,00000000,00000000,00000008,00000000 383: 00000000,00000000,00000000,00000000,00000000,00000000,00000010,00000000 384: 00000000,00000000,00000000,00000000,00000000,00000000,00000020,00000000 385: 00000000,00000000,00000000,00000000,00000000,00000000,00000040,00000000 386: 00000000,00000000,00000000,00000000,00000000,00000000,00000080,00000000 387: 00000000,00000000,00000000,00000000,00000000,00000000,00000100,00000000 388: 00000000,00000000,00000000,00000000,00000000,00000000,00000200,00000000 389: 00000000,00000000,00000000,00000000,00000000,00000000,00000400,00000000 390: 00000000,00000000,00000000,00000000,00000000,00000000,00000800,00000000 391: 00000000,00000000,00000000,00000000,00000000,00000000,00001000,00000000 392: 00000000,00000000,00000000,00000000,00000000,00000000,00002000,00000000 393: 00000000,00000000,00000000,00000000,00000000,00000000,00004000,00000000 394: 00000000,00000000,00000000,00000000,00000000,00000000,00008000,00000000 395: 00000000,00000000,00000000,00000000,00000000,00000000,00010000,00000000 396: 00000000,00000000,00000000,00000000,00000000,00000000,00020000,00000000 397: 00000000,00000000,00000000,00000000,00000000,00000000,00040000,00000000 398: 00000000,00000000,00000000,00000000,00000000,00000000,00080000,00000000 399: 00000000,00000000,00000000,00000000,00000000,00000000,00100000,00000000 400: 00000000,00000000,00000000,00000000,00000000,00000000,00200000,00000000 401: 00000000,00000000,00000000,00000000,00000000,00000000,00400000,00000000 402: 00000000,00000000,00000000,00000000,00000000,00000000,00800000,00000000 403: 00000000,00000000,00000000,00000000,00000000,00000000,01000000,00000000 404: 00000000,00000000,00000000,00000000,00000000,00000000,02000000,00000000 405: 00000000,00000000,00000000,00000000,00000000,00000000,04000000,00000000 406: 00000000,00000000,00000000,00000000,00000000,00000000,08000000,00000000 407: 00000000,00000000,00000000,00000000,00000000,00000000,10000000,00000000 408: 00000000,00000000,00000000,00000000,00000000,00000000,20000000,00000000 409: 00000000,00000000,00000000,00000000,00000000,00000000,40000000,00000000 410: 00000000,00000000,00000000,00000000,00000000,00000000,80000000,00000000 411: 00000000,00000000,00000000,00000000,00000000,00000001,00000000,00000000 412: 00000000,00000000,00000000,00000000,00000000,00000002,00000000,00000000 413: 00000000,00000000,00000000,00000000,00000000,00000004,00000000,00000000 414: 00000000,00000000,00000000,00000000,00000000,00000008,00000000,00000000 415: 00000000,00000000,00000000,00000000,00000000,00000010,00000000,00000000 416: 00000000,00000000,00000000,00000000,00000000,00000020,00000000,00000000 417: 00000000,00000000,00000000,00000000,00000000,00000040,00000000,00000000 418: 00000000,00000000,00000000,00000000,00000000,00000080,00000000,00000000 419: 00000000,00000000,00000000,00000000,00000000,00000100,00000000,00000000 420: 00000000,00000000,00000000,00000000,00000000,00000200,00000000,00000000 421: 00000000,00000000,00000000,00000000,00000000,00000400,00000000,00000000 422: 00000000,00000000,00000000,00000000,00000000,00000800,00000000,00000000 423: 00000000,00000000,00000000,00000000,00000000,00001000,00000000,00000000 424: 00000000,00000000,00000000,00000000,00000000,00002000,00000000,00000000 425: 00000000,00000000,00000000,00000000,00000000,00004000,00000000,00000000 426: 00000000,00000000,00000000,00000000,00000000,00008000,00000000,00000000 427: 00000000,00000000,00000000,00000000,00000000,00010000,00000000,00000000 428: 00000000,00000000,00000000,00000000,00000000,00020000,00000000,00000000 429: 00000000,00000000,00000000,00000000,00000000,00040000,00000000,00000000 430: 00000000,00000000,00000000,00000000,00000000,00080000,00000000,00000000 431: 00000000,00000000,00000000,00000000,00000000,00100000,00000000,00000000 432: 00000000,00000000,00000000,00000000,00000000,00200000,00000000,00000000 433: 00000000,00000000,00000000,00000000,00000000,00400000,00000000,00000000 434: 00000000,00000000,00000000,00000000,00000000,00800000,00000000,00000000 435: 00000000,00000000,00000000,00000000,00000000,01000000,00000000,00000000 436: 00000000,00000000,00000000,00000000,00000000,02000000,00000000,00000000 437: 00000000,00000000,00000000,00000000,00000000,04000000,00000000,00000000 438: 00000000,00000000,00000000,00000000,00000000,08000000,00000000,00000000 439: 00000000,00000000,00000000,00000000,00000000,10000000,00000000,00000000 440: 00000000,00000000,00000000,00000000,00000000,20000000,00000000,00000000 441: 00000000,00000000,00000000,00000000,00000000,40000000,00000000,00000000 442: 00000000,00000000,00000000,00000000,00000000,80000000,00000000,00000000 443: 00000000,00000000,00000000,00000000,00000001,00000000,00000000,00000000 444: 00000000,00000000,00000000,00000000,00000002,00000000,00000000,00000000 445: 00000000,00000000,00000000,00000000,00000004,00000000,00000000,00000000 446: 00000000,00000000,00000000,00000000,00000008,00000000,00000000,00000000 447: 00000000,00000000,00000000,00000000,00000010,00000000,00000000,00000000 448: 00000000,00000000,00000000,00000000,00000020,00000000,00000000,00000000 449: 00000000,00000000,00000000,00000000,00000040,00000000,00000000,00000000 450: 00000000,00000000,00000000,00000000,00000080,00000000,00000000,00000000 451: 00000000,00000000,00000000,00000000,00000100,00000000,00000000,00000000 452: 00000000,00000000,00000000,00000000,00000200,00000000,00000000,00000000 453: 00000000,00000000,00000000,00000000,00000400,00000000,00000000,00000000 454: 00000000,00000000,00000000,00000000,00000800,00000000,00000000,00000000 455: 00000000,00000000,00000000,00000000,00001000,00000000,00000000,00000000 456: 00000000,00000000,00000000,00000000,00002000,00000000,00000000,00000000 457: 00000000,00000000,00000000,00000000,00004000,00000000,00000000,00000000 After: 331: 00000000,00000000,00000000,00000000,00010000,00000000,00000000,00000000 332: 00000000,00000000,00000000,00000000,00020000,00000000,00000000,00000000 333: 00000000,00000000,00000000,00000000,00040000,00000000,00000000,00000000 334: 00000000,00000000,00000000,00000000,00080000,00000000,00000000,00000000 335: 00000000,00000000,00000000,00000000,00100000,00000000,00000000,00000000 336: 00000000,00000000,00000000,00000000,00200000,00000000,00000000,00000000 337: 00000000,00000000,00000000,00000000,00400000,00000000,00000000,00000000 338: 00000000,00000000,00000000,00000000,00800000,00000000,00000000,00000000 339: 00010000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 340: 00020000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 341: 00040000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 342: 00080000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 343: 00100000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 344: 00200000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 345: 00400000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 346: 00800000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 347: 00000000,00000000,00000000,00000000,00000001,00000000,00000000,00000000 348: 00000000,00000000,00000000,00000000,00000002,00000000,00000000,00000000 349: 00000000,00000000,00000000,00000000,00000004,00000000,00000000,00000000 350: 00000000,00000000,00000000,00000000,00000008,00000000,00000000,00000000 351: 00000000,00000000,00000000,00000000,00000010,00000000,00000000,00000000 352: 00000000,00000000,00000000,00000000,00000020,00000000,00000000,00000000 353: 00000000,00000000,00000000,00000000,00000040,00000000,00000000,00000000 354: 00000000,00000000,00000000,00000000,00000080,00000000,00000000,00000000 355: 00000000,00000000,00000000,00000000,00000100,00000000,00000000,00000000 356: 00000000,00000000,00000000,00000000,00000200,00000000,00000000,00000000 357: 00000000,00000000,00000000,00000000,00000400,00000000,00000000,00000000 358: 00000000,00000000,00000000,00000000,00000800,00000000,00000000,00000000 359: 00000000,00000000,00000000,00000000,00001000,00000000,00000000,00000000 360: 00000000,00000000,00000000,00000000,00002000,00000000,00000000,00000000 361: 00000000,00000000,00000000,00000000,00004000,00000000,00000000,00000000 362: 00000000,00000000,00000000,00000000,00008000,00000000,00000000,00000000 363: 00000000,00000000,00000000,00000000,01000000,00000000,00000000,00000000 364: 00000000,00000000,00000000,00000000,02000000,00000000,00000000,00000000 365: 00000000,00000000,00000000,00000000,04000000,00000000,00000000,00000000 366: 00000000,00000000,00000000,00000000,08000000,00000000,00000000,00000000 367: 00000000,00000000,00000000,00000000,10000000,00000000,00000000,00000000 368: 00000000,00000000,00000000,00000000,20000000,00000000,00000000,00000000 369: 00000000,00000000,00000000,00000000,40000000,00000000,00000000,00000000 370: 00000000,00000000,00000000,00000000,80000000,00000000,00000000,00000000 371: 00000001,00000000,00000000,00000000,00000000,00000000,00000000,00000000 372: 00000002,00000000,00000000,00000000,00000000,00000000,00000000,00000000 373: 00000004,00000000,00000000,00000000,00000000,00000000,00000000,00000000 374: 00000008,00000000,00000000,00000000,00000000,00000000,00000000,00000000 375: 00000010,00000000,00000000,00000000,00000000,00000000,00000000,00000000 376: 00000020,00000000,00000000,00000000,00000000,00000000,00000000,00000000 377: 00000040,00000000,00000000,00000000,00000000,00000000,00000000,00000000 378: 00000080,00000000,00000000,00000000,00000000,00000000,00000000,00000000 379: 00000100,00000000,00000000,00000000,00000000,00000000,00000000,00000000 380: 00000200,00000000,00000000,00000000,00000000,00000000,00000000,00000000 381: 00000400,00000000,00000000,00000000,00000000,00000000,00000000,00000000 382: 00000800,00000000,00000000,00000000,00000000,00000000,00000000,00000000 383: 00001000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 384: 00002000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 385: 00004000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 386: 00008000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 387: 01000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 388: 02000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 389: 04000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 390: 08000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 391: 10000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 392: 20000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 393: 40000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 394: 80000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000 395: 00000000,00000000,00000000,00000000,00000000,00000001,00000000,00000000 396: 00000000,00000000,00000000,00000000,00000000,00000002,00000000,00000000 397: 00000000,00000000,00000000,00000000,00000000,00000004,00000000,00000000 398: 00000000,00000000,00000000,00000000,00000000,00000008,00000000,00000000 399: 00000000,00000000,00000000,00000000,00000000,00000010,00000000,00000000 400: 00000000,00000000,00000000,00000000,00000000,00000020,00000000,00000000 401: 00000000,00000000,00000000,00000000,00000000,00000040,00000000,00000000 402: 00000000,00000000,00000000,00000000,00000000,00000080,00000000,00000000 403: 00000000,00000000,00000000,00000000,00000000,00000100,00000000,00000000 404: 00000000,00000000,00000000,00000000,00000000,00000200,00000000,00000000 405: 00000000,00000000,00000000,00000000,00000000,00000400,00000000,00000000 406: 00000000,00000000,00000000,00000000,00000000,00000800,00000000,00000000 407: 00000000,00000000,00000000,00000000,00000000,00001000,00000000,00000000 408: 00000000,00000000,00000000,00000000,00000000,00002000,00000000,00000000 409: 00000000,00000000,00000000,00000000,00000000,00004000,00000000,00000000 410: 00000000,00000000,00000000,00000000,00000000,00008000,00000000,00000000 411: 00000000,00000000,00000000,00000000,00000000,00010000,00000000,00000000 412: 00000000,00000000,00000000,00000000,00000000,00020000,00000000,00000000 413: 00000000,00000000,00000000,00000000,00000000,00040000,00000000,00000000 414: 00000000,00000000,00000000,00000000,00000000,00080000,00000000,00000000 415: 00000000,00000000,00000000,00000000,00000000,00100000,00000000,00000000 416: 00000000,00000000,00000000,00000000,00000000,00200000,00000000,00000000 417: 00000000,00000000,00000000,00000000,00000000,00400000,00000000,00000000 418: 00000000,00000000,00000000,00000000,00000000,00800000,00000000,00000000 419: 00000000,00000000,00000000,00000000,00000000,01000000,00000000,00000000 420: 00000000,00000000,00000000,00000000,00000000,02000000,00000000,00000000 421: 00000000,00000000,00000000,00000000,00000000,04000000,00000000,00000000 422: 00000000,00000000,00000000,00000000,00000000,08000000,00000000,00000000 423: 00000000,00000000,00000000,00000000,00000000,10000000,00000000,00000000 424: 00000000,00000000,00000000,00000000,00000000,20000000,00000000,00000000 425: 00000000,00000000,00000000,00000000,00000000,40000000,00000000,00000000 426: 00000000,00000000,00000000,00000000,00000000,80000000,00000000,00000000 427: 00000000,00000001,00000000,00000000,00000000,00000000,00000000,00000000 428: 00000000,00000002,00000000,00000000,00000000,00000000,00000000,00000000 429: 00000000,00000004,00000000,00000000,00000000,00000000,00000000,00000000 430: 00000000,00000008,00000000,00000000,00000000,00000000,00000000,00000000 431: 00000000,00000010,00000000,00000000,00000000,00000000,00000000,00000000 432: 00000000,00000020,00000000,00000000,00000000,00000000,00000000,00000000 433: 00000000,00000040,00000000,00000000,00000000,00000000,00000000,00000000 434: 00000000,00000080,00000000,00000000,00000000,00000000,00000000,00000000 435: 00000000,00000100,00000000,00000000,00000000,00000000,00000000,00000000 436: 00000000,00000200,00000000,00000000,00000000,00000000,00000000,00000000 437: 00000000,00000400,00000000,00000000,00000000,00000000,00000000,00000000 438: 00000000,00000800,00000000,00000000,00000000,00000000,00000000,00000000 439: 00000000,00001000,00000000,00000000,00000000,00000000,00000000,00000000 440: 00000000,00002000,00000000,00000000,00000000,00000000,00000000,00000000 441: 00000000,00004000,00000000,00000000,00000000,00000000,00000000,00000000 442: 00000000,00008000,00000000,00000000,00000000,00000000,00000000,00000000 443: 00000000,00010000,00000000,00000000,00000000,00000000,00000000,00000000 444: 00000000,00020000,00000000,00000000,00000000,00000000,00000000,00000000 445: 00000000,00040000,00000000,00000000,00000000,00000000,00000000,00000000 446: 00000000,00080000,00000000,00000000,00000000,00000000,00000000,00000000 447: 00000000,00100000,00000000,00000000,00000000,00000000,00000000,00000000 448: 00000000,00200000,00000000,00000000,00000000,00000000,00000000,00000000 449: 00000000,00400000,00000000,00000000,00000000,00000000,00000000,00000000 450: 00000000,00800000,00000000,00000000,00000000,00000000,00000000,00000000 451: 00000000,01000000,00000000,00000000,00000000,00000000,00000000,00000000 452: 00000000,02000000,00000000,00000000,00000000,00000000,00000000,00000000 453: 00000000,04000000,00000000,00000000,00000000,00000000,00000000,00000000 454: 00000000,08000000,00000000,00000000,00000000,00000000,00000000,00000000 455: 00000000,10000000,00000000,00000000,00000000,00000000,00000000,00000000 456: 00000000,20000000,00000000,00000000,00000000,00000000,00000000,00000000 457: 00000000,40000000,00000000,00000000,00000000,00000000,00000000,00000000 Signed-off-by: Tariq Toukan [Tweaked API use] Suggested-by: Yury Norov Signed-off-by: Valentin Schneider Reviewed-by: Yury Norov Signed-off-by: Yury Norov Signed-off-by: Jakub Kicinski commit 06ac01721f7d07da722abe0ec6f147b90bfc8c77 Author: Valentin Schneider Date: Fri Jan 20 20:24:34 2023 -0800 sched/topology: Introduce for_each_numa_hop_mask() The recently introduced sched_numa_hop_mask() exposes cpumasks of CPUs reachable within a given distance budget, wrap the logic for iterating over all (distance, mask) values inside an iterator macro. Signed-off-by: Valentin Schneider Reviewed-by: Yury Norov Signed-off-by: Yury Norov Signed-off-by: Jakub Kicinski commit 9feae65845f7b16376716fe70b7d4b9bf8721848 Author: Valentin Schneider Date: Fri Jan 20 20:24:33 2023 -0800 sched/topology: Introduce sched_numa_hop_mask() Tariq has pointed out that drivers allocating IRQ vectors would benefit from having smarter NUMA-awareness - cpumask_local_spread() only knows about the local node and everything outside is in the same bucket. sched_domains_numa_masks is pretty much what we want to hand out (a cpumask of CPUs reachable within a given distance budget), introduce sched_numa_hop_mask() to export those cpumasks. Link: http://lore.kernel.org/r/20220728191203.4055-1-tariqt@nvidia.com Signed-off-by: Valentin Schneider Reviewed-by: Yury Norov Signed-off-by: Yury Norov Signed-off-by: Jakub Kicinski commit b1beed72b8b75d365fdbc925da856c212195051b Author: Yury Norov Date: Fri Jan 20 20:24:32 2023 -0800 lib/cpumask: reorganize cpumask_local_spread() logic Now after moving all NUMA logic into sched_numa_find_nth_cpu(), else-branch of cpumask_local_spread() is just a function call, and we can simplify logic by using ternary operator. While here, replace BUG() with WARN_ON(). Signed-off-by: Yury Norov Acked-by: Tariq Toukan Reviewed-by: Jacob Keller Reviewed-by: Peter Lafreniere Signed-off-by: Jakub Kicinski commit 406d394abfcd8f16dc1dbcc8fc1b828252befb6d Author: Yury Norov Date: Fri Jan 20 20:24:31 2023 -0800 cpumask: improve on cpumask_local_spread() locality Switch cpumask_local_spread() to use newly added sched_numa_find_nth_cpu(), which takes into account distances to each node in the system. For the following NUMA configuration: root@debian:~# numactl -H available: 4 nodes (0-3) node 0 cpus: 0 1 2 3 node 0 size: 3869 MB node 0 free: 3740 MB node 1 cpus: 4 5 node 1 size: 1969 MB node 1 free: 1937 MB node 2 cpus: 6 7 node 2 size: 1967 MB node 2 free: 1873 MB node 3 cpus: 8 9 10 11 12 13 14 15 node 3 size: 7842 MB node 3 free: 7723 MB node distances: node 0 1 2 3 0: 10 50 30 70 1: 50 10 70 30 2: 30 70 10 50 3: 70 30 50 10 The new cpumask_local_spread() traverses cpus for each node like this: node 0: 0 1 2 3 6 7 4 5 8 9 10 11 12 13 14 15 node 1: 4 5 8 9 10 11 12 13 14 15 0 1 2 3 6 7 node 2: 6 7 0 1 2 3 8 9 10 11 12 13 14 15 4 5 node 3: 8 9 10 11 12 13 14 15 4 5 6 7 0 1 2 3 Signed-off-by: Yury Norov Acked-by: Tariq Toukan Reviewed-by: Jacob Keller Reviewed-by: Peter Lafreniere Signed-off-by: Jakub Kicinski commit cd7f55359c90a4108e6528e326b8623fce1ad72a Author: Yury Norov Date: Fri Jan 20 20:24:30 2023 -0800 sched: add sched_numa_find_nth_cpu() The function finds Nth set CPU in a given cpumask starting from a given node. Leveraging the fact that each hop in sched_domains_numa_masks includes the same or greater number of CPUs than the previous one, we can use binary search on hops instead of linear walk, which makes the overall complexity of O(log n) in terms of number of cpumask_weight() calls. Signed-off-by: Yury Norov Acked-by: Tariq Toukan Reviewed-by: Jacob Keller Reviewed-by: Peter Lafreniere Signed-off-by: Jakub Kicinski commit 62f4386e564d31c7d0ed7d835843e2685f99ae71 Author: Yury Norov Date: Fri Jan 20 20:24:29 2023 -0800 cpumask: introduce cpumask_nth_and_andnot Introduce cpumask_nth_and_andnot() based on find_nth_and_andnot_bit(). It's used in the following patch to traverse cpumasks without storing intermediate result in temporary cpumask. Signed-off-by: Yury Norov Acked-by: Tariq Toukan Reviewed-by: Jacob Keller Reviewed-by: Peter Lafreniere Signed-off-by: Jakub Kicinski commit 43245117806ff8914e37327b610fc08b5ddedc91 Author: Yury Norov Date: Fri Jan 20 20:24:28 2023 -0800 lib/find: introduce find_nth_and_andnot_bit In the following patches the function is used to implement in-place bitmaps traversing without storing intermediate result in temporary bitmaps. Signed-off-by: Yury Norov Acked-by: Tariq Toukan Reviewed-by: Jacob Keller Reviewed-by: Peter Lafreniere Signed-off-by: Jakub Kicinski commit 5bad5d55d884d57acba92a3309cde4cbb26dfefc Author: Wang Yong Date: Thu Feb 2 08:13:42 2023 +0000 KVM: update code comment in struct kvm_vcpu Commit c5b077549136 ("KVM: Convert the kvm->vcpus array to a xarray") changed kvm->vcpus array to a xarray, so update the code comment of kvm_vcpu->vcpu_idx accordingly. Signed-off-by: Wang Yong Link: https://lore.kernel.org/r/20230202081342.856687-1-yongw.kernel@gmail.com Signed-off-by: Sean Christopherson commit 0abe39dec065133e3f92a52219c3728fe7d7617f Author: Ming Lei Date: Tue Feb 7 23:07:00 2023 +0800 block: ublk: improve handling device deletion Inside ublk_ctrl_del_dev(), when the device is removed, we wait until the device number is freed with holding global lock of ublk_ctl_mutex, this way isn't friendly from user viewpoint: 1) if device is in-use, the current delete command hangs in ublk_ctrl_del_dev(), and user can't break from the handling because wait_event() is used 2) global lock is held, so any new device can't be added and other old devices can't be removed. Improve the deleting handling by the following way, suggested by Nadav: 1) wait without holding the global lock 2) replace wait_event() with wait_event_interruptible() Reported-by: Nadav Amit Suggested-by: Nadav Amit Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20230207150700.545530-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit f7133135235dbd11e7cb5fe62fe5d05ce5e82eeb Author: Shay Drory Date: Tue Jan 17 15:24:19 2023 +0200 net/mlx5: fw_tracer, Add support for unrecognized string In case FW is publishing a string which isn't found in the driver's string DBs, keep the string as raw data. Signed-off-by: Shay Drory Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 7dfcd110a4584a4354f6cd0496f22da6db78cb17 Author: Shay Drory Date: Thu Jan 12 14:33:00 2023 +0200 net/mlx5: fw_tracer, Add support for strings DB update event In case a new string DB is added to the FW, the FW publishes an event notifying the strings DB have updated. Add support in driver for handling this event. Signed-off-by: Shay Drory Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit b0118ced6b2e4c4d76083724cd4dba766333b3cd Author: Shay Drory Date: Wed Jan 11 13:44:31 2023 +0200 net/mlx5: fw_tracer, allow 0 size string DBs Device can expose string DB of size 0 which means this string DB is currently not in use. Therefore, allow for 0 size string DBs. Signed-off-by: Shay Drory Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 988c2352273997a242f15c4fc3711773515006a2 Author: Shay Drory Date: Wed Jan 11 13:34:02 2023 +0200 net/mlx5: fw_tracer: Fix debug print The debug message specify tdsn, but takes as an argument the tmsn. The correct argument is tmsn, hence, fix the print. Signed-off-by: Shay Drory Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit beeebdc52caff03e079d89567c9485c7d8f9afad Author: Roi Dayan Date: Tue Jan 17 14:02:00 2023 +0200 net/mlx5: fs, Remove redundant assignment of size size is being reassigned in the line after. remove the redundant assignment. Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit 08929f32da0f9027436ee5b9190163202dd293ec Author: Maor Dickman Date: Mon Jan 23 09:28:19 2023 +0200 net/mlx5: fs_core, Remove redundant variable err Local variable "err" is not used so it is safe to remove. Signed-off-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit e3e01c1c15986f9531b854634eec8381e72cb605 Author: Maher Sanalla Date: Tue Jan 17 14:54:36 2023 +0200 net/mlx5: Fix memory leak in error flow of port set buffer In the cited commit, shared buffer updates were added whenever port buffer gets updated. However, in case the shared buffer update fails, exiting early from port_set_buffer() is performed without freeing previously-allocated memory. Fix it by jumping to out label where memory is freed before returning with error. 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 1e985a8d887cd0b25541ba977db171be47cf575d Author: Gal Pressman Date: Thu Jan 19 14:09:00 2023 +0200 net/mlx5e: Remove incorrect debugfs_create_dir NULL check in TLS Remove the NULL check on debugfs_create_dir() return value as the function returns an ERR pointer on failure, not NULL. The check is not replaced with a IS_ERR_OR_NULL() as debugfs_create_file(), and debugfs functions in general don't need error checking. Fixes: 0fedee1ae9ef ("net/mlx5e: kTLS, Add debugfs") Reported-by: Dan Carpenter Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit afae6254c5ea710cdc0f6d0a16acbf55cbda3bfb Author: Gal Pressman Date: Thu Jan 19 14:09:00 2023 +0200 net/mlx5e: Remove incorrect debugfs_create_dir NULL check in hairpin Remove the NULL check on debugfs_create_dir() return value as the function returns an ERR pointer on failure, not NULL. The check is not replaced with a IS_ERR_OR_NULL() as debugfs_create_file(), and debugfs functions in general don't need error checking. Fixes: 0e414518d6d8 ("net/mlx5e: Add hairpin debugfs files") Reported-by: Dan Carpenter Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 2e762e65998e47096cf06177a6dffc096616a39c Author: Roi Dayan Date: Tue Jan 17 14:34:37 2023 +0200 net/mlx5: fs, Remove redundant vport_number assignment vport_number and other_vport being reassigned outside the if clause anyway. remove the redundant assignment. Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit 633ad4b29c21d81c06c854f3b82a43767e9bdccf Author: Roi Dayan Date: Wed Sep 21 15:28:05 2022 +0300 net/mlx5e: Remove redundant code for handling vlan actions Remove unused code which was used only with deprecated HW which didn't support vlan actions. Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit a2a73ea14b1a7574a3aa0aeb5c0851cd8156e6d8 Author: Leon Romanovsky Date: Mon Jan 9 14:11:01 2023 +0200 net/mlx5e: Don't listen to remove flows event remove_flow_enable event isn't really needed as it will be triggered once user and/or XFRM core explicitly asked to delete state. In such situation, we won't be interested in any event at all. So don't trigger and listen to remove_flow_enable event. Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit 114b295470e7c4dda3f2a7bec0ac9b35e0b94d06 Author: Moshe Shemesh Date: Thu Jan 26 08:58:33 2023 +0200 net/mlx5: fw reset: Skip device ID check if PCI link up failed In case where after reset the PCI link is not ready within timeout, skip reading device ID as if there is no PCI link up we can't have FW response to pci config cycles either. This also fixes err value not used and overwritten in such flow. Signed-off-by: Moshe Shemesh Reviewed-by: Shay Drory Signed-off-by: Saeed Mahameed commit 67257cba905d6c5660851968b55b7c5c3dc1ecc5 Author: Shay Drory Date: Thu Jan 5 10:03:46 2023 +0200 net/mlx5: Remove redundant health work lock Commit 90e7cb78b815 ("net/mlx5: fix missing mutex_unlock in mlx5_fw_fatal_reporter_err_work()") introduced another checking of MLX5_DROP_HEALTH_NEW_WORK. At this point, the first check of MLX5_DROP_HEALTH_NEW_WORK is redundant and so is the lock that protects it. Remove the lock and rename MLX5_DROP_HEALTH_NEW_WORK to reflect these changes. Signed-off-by: Shay Drory Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 7802886274cc850a205e9e334c5a1b1b743ea71c Author: Arnd Bergmann Date: Tue Jan 17 22:01:55 2023 +0100 mlx5: reduce stack usage in mlx5_setup_tc Clang warns about excessive stack usage on 32-bit targets: drivers/net/ethernet/mellanox/mlx5/core/en_main.c:3597:12: error: stack frame size (1184) exceeds limit (1024) in 'mlx5e_setup_tc' [-Werror,-Wframe-larger-than] static int mlx5e_setup_tc(struct net_device *dev, enum tc_setup_type type, It turns out that both the mlx5e_setup_tc_mqprio_dcb() function and the mlx5e_safe_switch_params() function it calls have a copy of 'struct mlx5e_params' on the stack, and this structure is fairly large. Use dynamic allocation for the inner one. Signed-off-by: Arnd Bergmann Reviewed-by: Jacob Keller Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 45f679550d7295b52a1cd8b7afaf2bd31453a5b0 Author: Gavin Shan Date: Wed Jan 18 17:21:33 2023 +0800 KVM: selftests: Assign guest page size in sync area early in memslot_perf_test The guest page size in the synchronization area is needed by all test cases. So it's reasonable to set it in the unified preparation function (prepare_vm()). Signed-off-by: Gavin Shan Reviewed-by: Maciej S. Szmigiero Link: https://lore.kernel.org/r/20230118092133.320003-3-gshan@redhat.com Signed-off-by: Sean Christopherson commit e5b426879fc39063d940902adbf38d5485925304 Author: Gavin Shan Date: Wed Jan 18 17:21:32 2023 +0800 KVM: selftests: Remove duplicate VM creation in memslot_perf_test Remove a spurious call to __vm_create_with_one_vcpu() that was introduced by a merge gone sideways. Fixes: eb5618911af0 ("Merge tag 'kvmarm-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD") Signed-off-by: Gavin Shan Reviewed-by: Maciej S. Szmigiero Link: https://lore.kernel.org/r/20230118092133.320003-2-gshan@redhat.com Signed-off-by: Sean Christopherson commit 5a2c5a5b0829ef8bcb5d868145c1d8c1221c5637 Author: David Howells Date: Tue Jan 31 21:40:18 2023 +0000 rxrpc: Reduce unnecessary ack transmission rxrpc_recvmsg_data() schedules an ACK to be transmitted every time at least two packets have been consumed and any time it runs out of data and would return -EAGAIN to the caller. Both events may occur within a single loop, however, and if the I/O thread is quick enough it may send duplicate ACKs. The ACKs are sent to inform the peer that more space has been made in the local Rx window, but the I/O thread is going to send an ACK every couple of DATA packets anyway, so we end up sending a lot more ACKs than we really need to. So reduce the rate at which recvmsg() schedules ACKs, such that if the I/O thread sends ACKs at its normal faster rate, recvmsg() won't actually schedule ACKs until the Rx flow stops (call->rx_consumed is cleared any time we transmit an ACK for that call, resetting the counter used by recvmsg). Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit f789bff2deb3ddae08950f8e4a1e6f41b916c520 Author: David Howells Date: Tue Jan 31 15:31:49 2023 +0000 rxrpc: Trace ack.rwind Log ack.rwind in the rxrpc_tx_ack tracepoint. This value is useful to see as it represents flow-control information to the peer. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit a33395ab85b9b9cff83948a03a1d6d96347935d8 Author: David Howells Date: Tue Nov 29 12:37:37 2022 +0000 rxrpc: Fix overwaking on call poking If an rxrpc call is given a poke, it will get woken up unconditionally, even if there's already a poke pending (for which there will have been a wake) or if the call refcount has gone to 0. Fix this by only waking the call if it is still referenced and if it doesn't already have a poke pending. Fixes: 15f661dc95da ("rxrpc: Implement a mechanism to send an event notification to a call") Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit 16d5677ef1041beee18b5709bf5759611ec82875 Author: David Howells Date: Tue Feb 7 22:11:30 2023 +0000 rxrpc: Use consume_skb() rather than kfree_skb_reason() Use consume_skb() rather than kfree_skb_reason(). Reported-by: Paolo Abeni Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit f94f053aa3a5d6ff17951870483d9eb9e13de2e2 Author: Peter Gonda Date: Tue Feb 7 09:13:54 2023 -0800 KVM: SVM: Fix potential overflow in SEV's send|receive_update_data() KVM_SEV_SEND_UPDATE_DATA and KVM_SEV_RECEIVE_UPDATE_DATA have an integer overflow issue. Params.guest_len and offset are both 32 bits wide, with a large params.guest_len the check to confirm a page boundary is not crossed can falsely pass: /* Check if we are crossing the page boundary * offset = params.guest_uaddr & (PAGE_SIZE - 1); if ((params.guest_len + offset > PAGE_SIZE)) Add an additional check to confirm that params.guest_len itself is not greater than PAGE_SIZE. Note, this isn't a security concern as overflow can happen if and only if params.guest_len is greater than 0xfffff000, and the FW spec says these commands fail with lengths greater than 16KB, i.e. the PSP will detect KVM's goof. Fixes: 15fb7de1a7f5 ("KVM: SVM: Add KVM_SEV_RECEIVE_UPDATE_DATA command") Fixes: d3d1af85e2c7 ("KVM: SVM: Add KVM_SEND_UPDATE_DATA command") Reported-by: Andy Nguyen Suggested-by: Thomas Lendacky Signed-off-by: Peter Gonda Cc: David Rientjes Cc: Paolo Bonzini Cc: Sean Christopherson Cc: kvm@vger.kernel.org Cc: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Tom Lendacky Link: https://lore.kernel.org/r/20230207171354.4012821-1-pgonda@google.com Signed-off-by: Sean Christopherson commit 26759bee43ea7a29fcf9b06d476f7d02ec990ee3 Author: Lorenzo Bianconi Date: Mon Feb 6 19:00:06 2023 +0100 net, xdp: Add missing xdp_features description Add missing xdp_features field description in the struct net_device documentation. This patch fix the following warning: [...] ./include/linux/netdevice.h:2375: warning: Function parameter or member 'xdp_features' not described in 'net_device' [...] Fixes: d3d854fd6a1d ("netdev-genl: create a simple family for netdev stuff") Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/7878544903d855b49e838c9d59f715bde0b5e63b.1675705948.git.lorenzo@kernel.org commit 30bbf891f1b8fd92db271c7198609a076d7fbf14 Author: Lorenzo Bianconi Date: Tue Feb 7 10:53:40 2023 +0100 virtio_net: Update xdp_features with xdp multi-buff Now virtio-net supports xdp multi-buffer so add it to xdp_features. Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Borkmann Acked-by: Michael S. Tsirkin Link: https://lore.kernel.org/bpf/60c76cd63a0246db785606e8891b925fd5c9bf06.1675763384.git.lorenzo@kernel.org commit 02fc0e73e852f78ec374004f924b9d84275d0006 Author: Lorenzo Bianconi Date: Tue Feb 7 12:11:03 2023 +0100 libbpf: Always use libbpf_err to return an error in bpf_xdp_query() In order to properly set errno, rely on libbpf_err utility routine in bpf_xdp_query() to return an error to the caller. Fixes: 04d58f1b26a4 ("libbpf: add API to get XDP/XSK supported features") Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/827d40181f9f90fb37702f44328e1614df7c0503.1675768112.git.lorenzo@kernel.org commit e0975ab92f2406fd3e12834f62dc57cb10404f85 Author: Ian Rogers Date: Thu Feb 2 14:42:53 2023 -0800 tools/resolve_btfids: Tidy HOST_OVERRIDES Don't set EXTRA_CFLAGS to HOSTCFLAGS, ensure CROSS_COMPILE isn't passed through. Signed-off-by: Ian Rogers Signed-off-by: Daniel Borkmann Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20230202224253.40283-1-irogers@google.com commit 0c559bc8abfb60695beacfc72993dff035d0267f Author: Krzysztof Kozlowski Date: Mon Feb 6 10:26:24 2023 +0100 dt-bindings: serial: restrict possible child node names The re-usable serial.yaml schema matches every property with ".*" pattern, thus any other schema referencing it will not report unknown (unevaluated) properties. This hides several wrong properties. It is a limitation of dtschema, thus provide a simple workaround: expect children to be only of few names matching upstream usage (Bluetooth, GNSS, GPS and MCU). Signed-off-by: Krzysztof Kozlowski Acked-by: Linus Walleij Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20230206092624.22922-4-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit 770ba14bd7fca8a25e6f73ac25dc2cd1377be6fa Author: Krzysztof Kozlowski Date: Mon Feb 6 10:26:23 2023 +0100 dt-bindings: reference MC peripheral properties in relevant devices Several devices can be attached to memory controllers (or memory-mapped buses), thus they can come with additional controller-specific properties, e.g. devices wired under Intel IXP4XX bus: cfi-flash, intel,ixp4xx-compact-flash, NS8250 serial and MAX6369 watchdog. Referencing Memory Controller or IXP4XX bus peripheral properties fixes few dtbs_check warnings like: intel-ixp42x-gateworks-gw2348.dtb: ide@1,0: Unevaluated properties are not allowed ('intel,ixp4xx-eb-ahb-split-transfers', 'intel,ixp4xx-eb-byte-access', ... ' were unexpected) Signed-off-by: Krzysztof Kozlowski Acked-by: Linus Walleij Acked-by: Damien Le Moal Acked-by: Greg Kroah-Hartman Reviewed-by: Miquel Raynal Link: https://lore.kernel.org/r/20230206092624.22922-3-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit 33887fce47e17cdd4df44f3d98320a27908897fa Author: Krzysztof Kozlowski Date: Mon Feb 6 10:26:22 2023 +0100 dt-bindings: intel,ixp4xx-expansion-bus: split out peripheral properties The properties of devices in IXP4xx expansion bus need to be also applied to actual devices' bindings. Prepare for this by splitting them to separate intel,ixp4xx-expansion-peripheral-props binding, just like other memory-controller peripheral properties. Signed-off-by: Krzysztof Kozlowski Acked-by: Linus Walleij Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20230206092624.22922-2-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit 56a2df7615fa050cc67b89245b2a482849077939 Author: Jiri Olsa Date: Thu Feb 2 12:28:39 2023 +0100 tools/resolve_btfids: Compile resolve_btfids as host program Making resolve_btfids to be compiled as host program so we can avoid cross compile issues as reported by Nathan. Also we no longer need HOST_OVERRIDES for BINARY target, just for 'prepare' targets. Fixes: 13e07691a16f ("tools/resolve_btfids: Alter how HOSTCC is forced") Reported-by: Nathan Chancellor Signed-off-by: Jiri Olsa Signed-off-by: Daniel Borkmann Tested-by: Nathan Chancellor Acked-by: Ian Rogers Link: https://lore.kernel.org/bpf/20230202112839.1131892-1-jolsa@kernel.org commit 621084965459d2b9e2713844aac4d803d5bb6d67 Author: Srinivas Pandruvada Date: Fri Feb 3 20:29:02 2023 -0800 thermal: intel: powerclamp: Return last requested state as cur_state When the user is reading cur_state from the thermal cooling device for Intel powerclamp device: - It returns the idle ratio from Package C-state counters when there is active idle injection session. - -1, when there is no active idle injection session. This information is not very useful as the package C-state counters vary a lot from read to read. Instead just return the last requested cur_state. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki commit 4c22c61e429f004d84eba72d7195bccef33ea0ec Author: Lucas Stach Date: Wed Feb 1 16:27:47 2023 +0100 drm/etnaviv: show number of NN cores in GPU debugfs info For NPUs the number of NN cores is a interesting property, which is useful to show in the debugfs information. Signed-off-by: Lucas Stach Reviewed-by: Tomeu Vizoso commit 97804a133c681ed9af7696902508e1ec4d75552a Author: Lucas Stach Date: Wed Feb 1 16:26:09 2023 +0100 drm/etnaviv: export client GPU usage statistics via fdinfo This exposes a accumulated GPU active time per client via the fdinfo infrastructure. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel commit d306788b6e1bc9df1cc427f7db5921e7ecb29369 Author: Lucas Stach Date: Wed Feb 1 16:26:08 2023 +0100 drm/etnaviv: allocate unique ID per drm_file Allows to easily track if several fd are pointing to the same execution context due to being dup'ed. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel commit df622729ddbf6607c10670e52d2cb484b1abe7c7 Author: Lucas Stach Date: Wed Feb 1 16:26:07 2023 +0100 drm/scheduler: track GPU active time per entity Track the accumulated time that jobs from this entity were active on the GPU. This allows drivers using the scheduler to trivially implement the DRM fdinfo when the hardware doesn't provide more specific information than signalling job completion anyways. [Bagas: Append missing colon to @elapsed_ns] Signed-off-by: Bagas Sanjaya Signed-off-by: Lucas Stach Reviewed-by: Andrey Grodzovsky commit dbe9f7d1e155b97a42f7da81e22acc98fe0a9072 Merge: 5485eb955994a 5a84711fd734c Author: Dan Williams Date: Tue Feb 7 11:14:06 2023 -0800 Merge branch 'for-6.3/cxl-events' into cxl/next Add the CXL event and interrupt support for the v6.3 update. commit 5485eb955994a238eafd08d9266005b1c9ac7991 Merge: 711442e29f16f 623c0751336e4 Author: Dan Williams Date: Tue Feb 7 11:12:24 2023 -0800 Merge branch 'for-6.3/cxl' into cxl/next Merge the general CXL updates with fixes targeting v6.2-rc for v6.3. Resolve a conflict with the fix and move of cxl_report_and_clear() from pci.c to core/pci.c. commit 383d9f87a06dd923c4fd0fdcb65b58258851f545 Merge: 61d731e6538dc bf9f1baa279f0 Author: Jakub Kicinski Date: Tue Feb 7 10:57:57 2023 -0800 Merge branch 'net-core-use-a-dedicated-kmem_cache-for-skb-head-allocs' Eric Dumazet says: ==================== net: core: use a dedicated kmem_cache for skb head allocs Our profile data show that using kmalloc(non_const_size)/kfree(ptr) has a certain cost, because kfree(ptr) has to pull a 'struct page' in cpu caches. Using a dedicated kmem_cache for TCP skb->head allocations makes a difference, both in cpu cycles and memory savings. This kmem_cache could also be used for GRO skb allocations, this is left as a future exercise. ==================== Link: https://lore.kernel.org/r/20230206173103.2617121-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit bf9f1baa279f0758dc2297080360c5a616843927 Author: Eric Dumazet Date: Mon Feb 6 17:31:03 2023 +0000 net: add dedicated kmem_cache for typical/small skb->head Recent removal of ksize() in alloc_skb() increased performance because we no longer read the associated struct page. We have an equivalent cost at kfree_skb() time. kfree(skb->head) has to access a struct page, often cold in cpu caches to get the owning struct kmem_cache. Considering that many allocations are small (at least for TCP ones) we can have our own kmem_cache to avoid the cache line miss. This also saves memory because these small heads are no longer padded to 1024 bytes. CONFIG_SLUB=y $ grep skbuff_small_head /proc/slabinfo skbuff_small_head 2907 2907 640 51 8 : tunables 0 0 0 : slabdata 57 57 0 CONFIG_SLAB=y $ grep skbuff_small_head /proc/slabinfo skbuff_small_head 607 624 640 6 1 : tunables 54 27 8 : slabdata 104 104 5 Notes: - After Kees Cook patches and this one, we might be able to revert commit dbae2b062824 ("net: skb: introduce and use a single page frag cache") because GRO_MAX_HEAD is also small. - This patch is a NOP for CONFIG_SLOB=y builds. Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Acked-by: Paolo Abeni Reviewed-by: Alexander Duyck Signed-off-by: Jakub Kicinski commit 5c0e820cbbbe2d1c4cea5cd2bfc1302c123436df Author: Eric Dumazet Date: Mon Feb 6 17:31:02 2023 +0000 net: factorize code in kmalloc_reserve() All kmalloc_reserve() callers have to make the same computation, we can factorize them, to prepare following patch in the series. Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Acked-by: Paolo Abeni Reviewed-by: Alexander Duyck Signed-off-by: Jakub Kicinski commit 65998d2bf857b9ae5acc1f3b70892bd1b429ccab Author: Eric Dumazet Date: Mon Feb 6 17:31:01 2023 +0000 net: remove osize variable in __alloc_skb() This is a cleanup patch, to prepare following change. Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Acked-by: Paolo Abeni Reviewed-by: Alexander Duyck Signed-off-by: Jakub Kicinski commit 115f1a5c42bdad9a9ea356fc0b4a39ec7537947f Author: Eric Dumazet Date: Mon Feb 6 17:31:00 2023 +0000 net: add SKB_HEAD_ALIGN() helper We have many places using this expression: SKB_DATA_ALIGN(sizeof(struct skb_shared_info)) Use of SKB_HEAD_ALIGN() will allow to clean them. Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Acked-by: Paolo Abeni Reviewed-by: Alexander Duyck Signed-off-by: Jakub Kicinski commit 9e615dbba41e2a56bb4ae50c56f4c10294fa16b8 Author: Yangtao Li Date: Mon Feb 6 22:43:09 2023 +0800 f2fs: add missing description for ipu_policy node IPU policy can be disabled, let's add description for it and other policy. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c5bf83483382600988d7db5ffe9fcd1936b491fd Author: Yangtao Li Date: Mon Feb 6 22:43:08 2023 +0800 f2fs: fix to set ipu policy For LFS mode, it should update outplace and no need inplace update. When using LFS mode for small-volume devices, IPU will not be used, and the OPU writing method is actually used, but F2FS_IPU_FORCE can be read from the ipu_policy node, which is different from the actual situation. And remount to lfs mode should be disallowed when f2fs ipu is enabled, let's fix it. Fixes: 84b89e5d943d ("f2fs: add auto tuning for small devices") Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 146949defda868378992171b9e42318b06fcd482 Author: Jinyoung CHOI Date: Mon Feb 6 20:56:00 2023 +0900 f2fs: fix typos in comments This patch is to fix typos in f2fs files. Signed-off-by: Jinyoung Choi Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 267c159f9c7bcb7009dae16889b880c5ed8759a8 Author: Jaegeuk Kim Date: Sun Feb 5 19:13:39 2023 -0800 f2fs: fix kernel crash due to null io->bio We should return when io->bio is null before doing anything. Otherwise, panic. BUG: kernel NULL pointer dereference, address: 0000000000000010 RIP: 0010:__submit_merged_write_cond+0x164/0x240 [f2fs] Call Trace: f2fs_submit_merged_write+0x1d/0x30 [f2fs] commit_checkpoint+0x110/0x1e0 [f2fs] f2fs_write_checkpoint+0x9f7/0xf00 [f2fs] ? __pfx_issue_checkpoint_thread+0x10/0x10 [f2fs] __checkpoint_and_complete_reqs+0x84/0x190 [f2fs] ? preempt_count_add+0x82/0xc0 ? __pfx_issue_checkpoint_thread+0x10/0x10 [f2fs] issue_checkpoint_thread+0x4c/0xf0 [f2fs] ? __pfx_autoremove_wake_function+0x10/0x10 kthread+0xff/0x130 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x2c/0x50 Cc: stable@vger.kernel.org # v5.18+ Fixes: 64bf0eef0171 ("f2fs: pass the bio operation to bio_alloc_bioset") Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d9bac032ac0de8f510b44904b6eb7272679883d1 Author: Yangtao Li Date: Wed Feb 1 18:47:02 2023 +0800 f2fs: use iostat_lat_type directly as a parameter in the iostat_update_and_unbind_ctx() Convert to use iostat_lat_type as parameter instead of raw number. BTW, move NUM_PREALLOC_IOSTAT_CTXS to the header file, adjust iostat_lat[{0,1,2}] to iostat_lat[{READ_IO,WRITE_SYNC_IO,WRITE_ASYNC_IO}] in tracepoint function, and rename iotype to page_type to match the definition. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d23be468eada21c828058e0e8d60409eaec373ab Author: qixiaoyu1 Date: Sat Feb 4 17:43:45 2023 +0800 f2fs: add sysfs nodes to set last_age_weight Signed-off-by: qixiaoyu1 Signed-off-by: xiongping1 Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 2c4192c0a7f2d628b5c1667577316ee9e7471e20 Author: Mark Brown Date: Thu Feb 2 17:31:25 2023 +0000 kselftest/arm64: Don't require FA64 for streaming SVE+ZA tests During early development a dependedncy was added on having FA64 available so we could use the full FPSIMD register set in the signal handler which got copied over into the SSVE+ZA registers test case. Subsequently the ABI was finialised so the handler is run with streaming mode disabled meaning this is redundant but the dependency was never removed, do so now. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230202-arm64-kselftest-sve-za-fa64-v1-1-5c5f3dabe441@kernel.org Signed-off-by: Catalin Marinas commit 6012b8202022d9eec0c09cbb3212e49ccd273438 Author: Mark Brown Date: Thu Feb 2 17:30:44 2023 +0000 kselftest/arm64: Copy whole EXTRA context When copying the EXTRA context our calculation of the amount of data we need to copy is incorrect, we only calculate the amount of data needed within uc_mcontext.__reserved, not taking account of the fixed portion of the context. Add in the offset of the reserved data so that we copy everything we should. This will only cause test failures in cases where the last context in the EXTRA context is smaller than the missing data since we don't currently validate any of the register data and all the buffers we copy into are statically allocated so default to zero meaning that if we walk beyond the end of what we copied we'll encounter what looks like a context with magic and length both 0 which is a valid terminator record. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230201-arm64-kselftest-full-extra-v1-1-93741f32dd29@kernel.org Signed-off-by: Catalin Marinas commit a088cf8eee1263462131fe8364e0fa962e17412b Author: Ard Biesheuvel Date: Sat Feb 4 11:18:07 2023 +0100 arm64: kprobes: Drop ID map text from kprobes blacklist The ID mapped text region is never accessed via the normal kernel mapping of text, and so it was moved into .rodata instead. This means it is no longer considered as a suitable place for kprobes by default, and the explicit blacklist is unnecessary, and actually results in an error message at boot: kprobes: Failed to populate blacklist (error -22), kprobes not restricted, be careful using them! So stop blacklisting the ID map text explicitly. Fixes: af7249b317e4 ("arm64: kernel: move identity map out of .text mapping") Reported-by: Nathan Chancellor Signed-off-by: Ard Biesheuvel Tested-by: Nathan Chancellor Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20230204101807.2862321-1-ardb@kernel.org Signed-off-by: Catalin Marinas commit ac91e6980563ed53afadd925fa6585ffd2bc4a2c Author: Lukas Wunner Date: Sun Jan 15 09:20:32 2023 +0100 PCI: Unify delay handling for reset and resume Sheng Bi reports that pci_bridge_secondary_bus_reset() may fail to wait for devices on the secondary bus to become accessible after reset: Although it does call pci_dev_wait(), it erroneously passes the bridge's pci_dev rather than that of a child. The bridge of course is always accessible while its secondary bus is reset, so pci_dev_wait() returns immediately. Sheng Bi proposes introducing a new pci_bridge_secondary_bus_wait() function which is called from pci_bridge_secondary_bus_reset(): https://lore.kernel.org/linux-pci/20220523171517.32407-1-windy.bi.enflame@gmail.com/ However we already have pci_bridge_wait_for_secondary_bus() which does almost exactly what we need. So far it's only called on resume from D3cold (which implies a Fundamental Reset per PCIe r6.0 sec 5.8). Re-using it for Secondary Bus Resets is a leaner and more rational approach than introducing a new function. That only requires a few minor tweaks: - Amend pci_bridge_wait_for_secondary_bus() to await accessibility of the first device on the secondary bus by calling pci_dev_wait() after performing the prescribed delays. pci_dev_wait() needs two parameters, a reset reason and a timeout, which callers must now pass to pci_bridge_wait_for_secondary_bus(). The timeout is 1 sec for resume (PCIe r6.0 sec 6.6.1) and 60 sec for reset (commit 821cdad5c46c ("PCI: Wait up to 60 seconds for device to become ready after FLR")). Introduce a PCI_RESET_WAIT macro for the 1 sec timeout. - Amend pci_bridge_wait_for_secondary_bus() to return 0 on success or -ENOTTY on error for consumption by pci_bridge_secondary_bus_reset(). - Drop an unnecessary 1 sec delay from pci_reset_secondary_bus() which is now performed by pci_bridge_wait_for_secondary_bus(). A static delay this long is only necessary for Conventional PCI, so modern PCIe systems benefit from shorter reset times as a side effect. Fixes: 6b2f1351af56 ("PCI: Wait for device to become ready after secondary bus reset") Link: https://lore.kernel.org/r/da77c92796b99ec568bd070cbe4725074a117038.1673769517.git.lukas@wunner.de Reported-by: Sheng Bi Tested-by: Ravi Kishore Koppuravuri Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg Reviewed-by: Kuppuswamy Sathyanarayanan Cc: stable@vger.kernel.org # v4.17+ commit 8ef0217227b42e2c34a18de316cee3da16c9bf1e Author: Lukas Wunner Date: Sun Jan 15 09:20:31 2023 +0100 PCI/PM: Observe reset delay irrespective of bridge_d3 If a PCI bridge is suspended to D3cold upon entering system sleep, resuming it entails a Fundamental Reset per PCIe r6.0 sec 5.8. The delay prescribed after a Fundamental Reset in PCIe r6.0 sec 6.6.1 is sought to be observed by: pci_pm_resume_noirq() pci_pm_bridge_power_up_actions() pci_bridge_wait_for_secondary_bus() However, pci_bridge_wait_for_secondary_bus() bails out if the bridge_d3 flag is not set. That flag indicates whether a bridge is allowed to suspend to D3cold at *runtime*. Hence *no* delay is observed on resume from system sleep if runtime D3cold is forbidden. That doesn't make any sense, so drop the bridge_d3 check from pci_bridge_wait_for_secondary_bus(). The purpose of the bridge_d3 check was probably to avoid delays if a bridge remained in D0 during suspend. However the sole caller of pci_bridge_wait_for_secondary_bus(), pci_pm_bridge_power_up_actions(), is only invoked if the previous power state was D3cold. Hence the additional bridge_d3 check seems superfluous. Fixes: ad9001f2f411 ("PCI/PM: Add missing link delays required by the PCIe spec") Link: https://lore.kernel.org/r/eb37fa345285ec8bacabbf06b020b803f77bdd3d.1673769517.git.lukas@wunner.de Tested-by: Ravi Kishore Koppuravuri Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg Reviewed-by: Kuppuswamy Sathyanarayanan Cc: stable@vger.kernel.org # v5.5+ commit 9c1c251d670bc107b9ce600a2c20adb08b4849e9 Author: Steven Rostedt (Google) Date: Tue Feb 7 12:28:53 2023 -0500 tracing: Allow boot instances to have snapshot buffers Add to ftrace_boot_snapshot, "=" name, where the instance will get a snapshot buffer, and will take a snapshot at the end of boot (which will save the boot traces). Link: https://lkml.kernel.org/r/20230207173026.792774721@goodmis.org Cc: Masami Hiramatsu Cc: Andrew Morton Reviewed-by: Ross Zwisler Signed-off-by: Steven Rostedt (Google) commit d503b8f7474fe7ac616518f7fc49773cbab49f36 Author: Steven Rostedt (Google) Date: Tue Feb 7 12:28:52 2023 -0500 tracing: Add trace_array_puts() to write into instance Add a generic trace_array_puts() that can be used to "trace_puts()" into an allocated trace_array instance. This is just another variant of trace_array_printk(). Link: https://lkml.kernel.org/r/20230207173026.584717290@goodmis.org Cc: Masami Hiramatsu Cc: Andrew Morton Reviewed-by: Ross Zwisler Signed-off-by: Steven Rostedt (Google) commit c4846480831ea526bcab0ca0bf6364bfa6ed4227 Author: Steven Rostedt (Google) Date: Tue Feb 7 12:28:51 2023 -0500 tracing: Add enabling of events to boot instances Add the format of: trace_instance=foo,sched:sched_switch,irq_handler_entry,initcall That will create the "foo" instance and enable the sched_switch event (here were the "sched" system is explicitly specified), the irq_handler_entry event, and all events under the system initcall. Link: https://lkml.kernel.org/r/20230207173026.386114535@goodmis.org Cc: Masami Hiramatsu Cc: Andrew Morton Reviewed-by: Ross Zwisler Signed-off-by: Steven Rostedt (Google) commit cb1f98c5e5742273bca39410d504430793ab701a Author: Steven Rostedt (Google) Date: Tue Feb 7 12:28:50 2023 -0500 tracing: Add creation of instances at boot command line Add kernel command line to add tracing instances. This only creates instances at boot but still does not enable any events to them. Later changes will extend this command line to add enabling of events, filters, and triggers. As well as possibly redirecting trace_printk()! Link: https://lkml.kernel.org/r/20230207173026.186210158@goodmis.org Cc: Randy Dunlap Cc: Masami Hiramatsu Cc: Andrew Morton Reviewed-by: Ross Zwisler Signed-off-by: Steven Rostedt (Google) commit 9971c3f944489ff7aacb9d25e0cde841a5f6018a Author: Steven Rostedt (Google) Date: Tue Jan 31 09:52:37 2023 -0500 tracing: Fix trace_event_raw_event_synth() if else statement The test to check if the field is a stack is to be done if it is not a string. But the code had: } if (event->fields[i]->is_stack) { and not } else if (event->fields[i]->is_stack) { which would cause it to always be tested. Worse yet, this also included an "else" statement that was only to be called if the field was not a string and a stack, but this code allows it to be called if it was a string (and not a stack). Also fixed some whitespace issues. Link: https://lore.kernel.org/all/202301302110.mEtNwkBD-lkp@intel.com/ Link: https://lore.kernel.org/linux-trace-kernel/20230131095237.63e3ca8d@gandalf.local.home Cc: Tom Zanussi Fixes: 00cf3d672a9d ("tracing: Allow synthetic events to pass around stacktraces") Reported-by: kernel test robot Signed-off-by: Steven Rostedt (Google) Acked-by: Masami Hiramatsu (Google) commit aef70ebd624cf2959c531b652365da83f2b19352 Author: Tom Rix Date: Mon Jan 30 11:37:08 2023 -0800 samples: ftrace: Make some global variables static smatch reports this representative issue samples/ftrace/ftrace-ops.c:15:14: warning: symbol 'nr_function_calls' was not declared. Should it be static? The nr_functions_calls and several other global variables are only used in ftrace-ops.c, so they should be static. Remove the instances of initializing static int to 0. Link: https://lore.kernel.org/linux-trace-kernel/20230130193708.1378108-1-trix@redhat.com Signed-off-by: Tom Rix Acked-by: Mark Rutland Signed-off-by: Steven Rostedt (Google) commit f94fe7048a352ff8914232a18e2e2f18f8a5ac81 Author: Arnd Bergmann Date: Mon Jan 30 14:02:37 2023 +0100 ftrace: sample: avoid open-coded 64-bit division Calculating the average period requires a 64-bit division that leads to a link failure on 32-bit architectures: x86_64-linux-ld: samples/ftrace/ftrace-ops.o: in function `ftrace_ops_sample_init': ftrace-ops.c:(.init.text+0x23b): undefined reference to `__udivdi3' Use the div_u64() helper to do this instead. Since this is an init function that is not called frequently, the runtime overhead is going to be acceptable. Link: https://lore.kernel.org/linux-trace-kernel/20230130130246.247537-1-arnd@kernel.org Cc: Masami Hiramatsu Fixes: b56c68f705ca ("ftrace: Add sample with custom ops") Signed-off-by: Arnd Bergmann Acked-by: Mark Rutland Signed-off-by: Steven Rostedt (Google) commit 01678fbce3dd2e3042077cf71b68157e733614a0 Author: Song Shuai Date: Mon Jan 30 16:59:54 2023 +0800 samples: ftrace: Include the nospec-branch.h only for x86 When other architectures without the nospec functionality write their direct-call functions of samples/ftrace/*.c, the including of asm/nospec-branch.h must be taken care to fix the no header file found error in building process. This commit (ee3e2469b346 "x86/ftrace: Make it call depth tracking aware") file-globally includes asm/nospec-branch.h providing CALL_DEPTH_ACCOUNT for only x86 direct-call functions. It seems better to move the including to `#ifdef CONFIG_X86_64`. Link: https://lore.kernel.org/linux-trace-kernel/20230130085954.647845-1-suagrfillet@gmail.com Signed-off-by: Song Shuai Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit a9c4bdd505630469f93f5efedfc7a9ca254996c8 Author: Linyu Yuan Date: Mon Jan 30 15:54:09 2023 +0800 tracing: Acquire buffer from temparary trace sequence there is one dwc3 trace event declare as below, DECLARE_EVENT_CLASS(dwc3_log_event, TP_PROTO(u32 event, struct dwc3 *dwc), TP_ARGS(event, dwc), TP_STRUCT__entry( __field(u32, event) __field(u32, ep0state) __dynamic_array(char, str, DWC3_MSG_MAX) ), TP_fast_assign( __entry->event = event; __entry->ep0state = dwc->ep0state; ), TP_printk("event (%08x): %s", __entry->event, dwc3_decode_event(__get_str(str), DWC3_MSG_MAX, __entry->event, __entry->ep0state)) ); the problem is when trace function called, it will allocate up to DWC3_MSG_MAX bytes from trace event buffer, but never fill the buffer during fast assignment, it only fill the buffer when output function are called, so this means if output function are not called, the buffer will never used. add __get_buf(len) which acquiree buffer from iter->tmp_seq when trace output function called, it allow user write string to acquired buffer. the mentioned dwc3 trace event will changed as below, DECLARE_EVENT_CLASS(dwc3_log_event, TP_PROTO(u32 event, struct dwc3 *dwc), TP_ARGS(event, dwc), TP_STRUCT__entry( __field(u32, event) __field(u32, ep0state) ), TP_fast_assign( __entry->event = event; __entry->ep0state = dwc->ep0state; ), TP_printk("event (%08x): %s", __entry->event, dwc3_decode_event(__get_buf(DWC3_MSG_MAX), DWC3_MSG_MAX, __entry->event, __entry->ep0state)) );. Link: https://lore.kernel.org/linux-trace-kernel/1675065249-23368-1-git-send-email-quic_linyyuan@quicinc.com Cc: Masami Hiramatsu Signed-off-by: Linyu Yuan Signed-off-by: Steven Rostedt (Google) commit a2ff84a5d1e65c7d1178f24ecf39fc55283fbd14 Author: Bagas Sanjaya Date: Sun Jan 29 10:14:02 2023 +0700 tracing/histogram: Wrap remaining shell snippets in code blocks Most shell command snippets (echo/cat) and their output are already in literal code blocks. However a few still isn't wrapped, in which the htmldocs output is ugly. Wrap the remaining unwrapped snippets, while also fix recent kernel test robot warnings. Link: https://lore.kernel.org/linux-trace-kernel/20230129031402.47420-1-bagasdotme@gmail.com Cc: Masami Hiramatsu Cc: Jonathan Corbet Link: https://lore.kernel.org/linux-doc/202301290253.LU5yIxcJ-lkp@intel.com/ Fixes: 88238513bb2671 ("tracing/histogram: Document variable stacktrace") Reported-by: kernel test robot Signed-off-by: Bagas Sanjaya Signed-off-by: Steven Rostedt (Google) commit 7180c1d08639f28e63110ad35815f7a1785b8a19 Author: Mika Westerberg Date: Tue Jan 31 11:24:05 2023 +0200 PCI: Distribute available resources for root buses, too Previously we distributed spare resources only upon hot-add, so if the initial root bus scan found devices that had not been fully configured by the BIOS, we allocated only enough resources to cover what was then present. If some of those devices were hotplug bridges, we did not leave any additional resource space for future expansion. Distribute the available resources for root buses, too, to make this work the same way as the normal hotplug case. A previous commit to do this was reverted due to a regression reported by Jonathan Cameron: e96e27fc6f79 ("PCI: Distribute available resources for root buses, too") 5632e2beaf9d ("Revert "PCI: Distribute available resources for root buses, too"") This commit changes pci_bridge_resources_not_assigned() to work with bridges that do not have all the resource windows programmed by the boot firmware (previously we expected all I/O, memory and prefetchable memory were programmed). Link: https://bugzilla.kernel.org/show_bug.cgi?id=216000 Link: https://lore.kernel.org/r/20220905080232.36087-5-mika.westerberg@linux.intel.com Link: https://lore.kernel.org/r/20230131092405.29121-4-mika.westerberg@linux.intel.com Reported-by: Chris Chiu Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas commit b18c58af29e465d21d4cd9e8c5008ae0e0147384 Author: Davidlohr Bueso Date: Mon Jan 23 15:46:49 2023 -0800 tracing/osnoise: No need for schedule_hrtimeout range No slack time is being passed, just use schedule_hrtimeout(). Link: https://lore.kernel.org/linux-trace-kernel/20230123234649.17968-1-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Acked-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) commit dac0da428f8dfb23666ab4ea54a7768c152b857a Author: Borislav Petkov (AMD) Date: Tue Feb 7 16:13:24 2023 +0100 x86/vdso: Fix -Wmissing-prototypes warnings Fix those: In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:4: arch/x86/entry/vdso/vdso32/../vclock_gettime.c:70:5: warning: no previous prototype for ‘__vdso_clock_gettime64’ [-Wmissing-prototypes] 70 | int __vdso_clock_gettime64(clockid_t clock, struct __kernel_timespec *ts) | In file included from arch/x86/entry/vdso/vdso32/vgetcpu.c:3: arch/x86/entry/vdso/vdso32/../vgetcpu.c:13:1: warning: no previous prototype for ‘__vdso_getcpu’ [-Wmissing-prototypes] 13 | __vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused) | ^~~~~~~~~~~~~ Reported-by: kernel test robot Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/202302070742.iYcnoJwk-lkp@intel.com commit f37bf75ca73d523ebaa7ceb44c45d8ecd05374fe Author: Yu Kuai Date: Thu Feb 2 21:49:13 2023 +0800 block, bfq: cleanup 'bfqg->online' After commit dfd6200a0954 ("blk-cgroup: support to track if policy is online"), there is no need to do this again in bfq. However, 'pd->online' is not protected by 'bfqd->lock', in order to make sure bfq won't see that 'pd->online' is still set after bfq_pd_offline(), clear it before bfq_pd_offline() is called. This is fine because other polices doesn't use 'pd->online' and bfq_pd_offline() will move active bfqq to root cgroup anyway. Signed-off-by: Yu Kuai Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230202134913.2364549-1-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe commit 877cff5296faa6ef312f8002216bbf73bea006c7 Author: Sebastian Andrzej Siewior Date: Tue Feb 7 11:46:33 2023 +0100 x86/vdso: Fake 32bit VDSO build on 64bit compile for vgetcpu The 64bit register constrains in __arch_hweight64() cannot be fulfilled in a 32-bit build. The function is only declared but not used within vclock_gettime.c and gcc does not care. LLVM complains and aborts. Reportedly because it validates extended asm even if latter would get compiled out, see https://lore.kernel.org/r/Y%2BJ%2BUQ1vAKr6RHuH@dev-arch.thelio-3990X i.e., a long standing design difference between gcc and LLVM. Move the "fake a 32 bit kernel configuration" bits from vclock_gettime.c into a common header file. Use this from vclock_gettime.c and vgetcpu.c. [ bp: Add background info from Nathan. ] Fixes: 92d33063c081a ("x86/vdso: Provide getcpu for x86-32.") Reported-by: kernel test robot Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/Y+IsCWQdXEr8d9Vy@linutronix.de commit 0dd714bfd200068e3c0d6b37861056367868e612 Author: Janis Schoetterl-Glausch Date: Tue Feb 7 17:42:25 2023 +0100 KVM: s390: selftest: memop: Add cmpxchg tests Test successful exchange, unsuccessful exchange, storage key protection and invalid arguments. Signed-off-by: Janis Schoetterl-Glausch Acked-by: Janosch Frank Link: https://lore.kernel.org/r/20230207164225.2114706-1-scgl@linux.ibm.com Message-Id: <20230207164225.2114706-1-scgl@linux.ibm.com> Signed-off-by: Janosch Frank commit a7b041732802db0dab0a7740a6c8338b803bf933 Author: Janis Schoetterl-Glausch Date: Mon Feb 6 17:46:01 2023 +0100 Documentation: KVM: s390: Describe KVM_S390_MEMOP_F_CMPXCHG Describe the semantics of the new KVM_S390_MEMOP_F_CMPXCHG flag for absolute vm write memops which allows user space to perform (storage key checked) cmpxchg operations on guest memory. Signed-off-by: Janis Schoetterl-Glausch Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20230206164602.138068-14-scgl@linux.ibm.com Message-Id: <20230206164602.138068-14-scgl@linux.ibm.com> [frankja@de.ibm.com: Removed a line from an earlier version] Signed-off-by: Janosch Frank commit 3fd49805d19d1c566e92358d2e3d9fadb3b5ec16 Author: Janis Schoetterl-Glausch Date: Mon Feb 6 17:46:00 2023 +0100 KVM: s390: Extend MEM_OP ioctl by storage key checked cmpxchg User space can use the MEM_OP ioctl to make storage key checked reads and writes to the guest, however, it has no way of performing atomic, key checked, accesses to the guest. Extend the MEM_OP ioctl in order to allow for this, by adding a cmpxchg op. For now, support this op for absolute accesses only. This op can be used, for example, to set the device-state-change indicator and the adapter-local-summary indicator atomically. Signed-off-by: Janis Schoetterl-Glausch Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20230206164602.138068-13-scgl@linux.ibm.com Message-Id: <20230206164602.138068-13-scgl@linux.ibm.com> Signed-off-by: Janosch Frank commit 701422b3438240a98000e0db3ef68d4db7991918 Author: Janis Schoetterl-Glausch Date: Mon Feb 6 17:45:59 2023 +0100 KVM: s390: Refactor vcpu mem_op function Remove code duplication with regards to the CHECK_ONLY flag. Decrease the number of indents. No functional change indented. Suggested-by: Janosch Frank Signed-off-by: Janis Schoetterl-Glausch Link: https://lore.kernel.org/r/20230206164602.138068-12-scgl@linux.ibm.com Message-Id: <20230206164602.138068-12-scgl@linux.ibm.com> Signed-off-by: Janosch Frank commit 0d6d4d23955c8aaa69f361897ec1aad67bf93653 Author: Janis Schoetterl-Glausch Date: Mon Feb 6 17:45:58 2023 +0100 KVM: s390: Refactor absolute vm mem_op function Remove code duplication with regards to the CHECK_ONLY flag. Decrease the number of indents. No functional change indented. Suggested-by: Janosch Frank Signed-off-by: Janis Schoetterl-Glausch Reviewed-by: Thomas Huth Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20230206164602.138068-11-scgl@linux.ibm.com Message-Id: <20230206164602.138068-11-scgl@linux.ibm.com> Signed-off-by: Janosch Frank commit 8550bcb754bc9ee0f8906c416e9e900e4ed5607c Author: Janis Schoetterl-Glausch Date: Mon Feb 6 17:45:57 2023 +0100 KVM: s390: Dispatch to implementing function at top level of vm mem_op Instead of having one function covering all mem_op operations, have a function implementing absolute access and dispatch to that function in its caller, based on the operation code. This way additional future operations can be implemented by adding an implementing function without changing existing operations. Suggested-by: Janosch Frank Signed-off-by: Janis Schoetterl-Glausch Reviewed-by: Thomas Huth Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20230206164602.138068-10-scgl@linux.ibm.com Message-Id: <20230206164602.138068-10-scgl@linux.ibm.com> Signed-off-by: Janosch Frank commit a41f505e9f7f4e13afb6f0e331f99360a3088af7 Author: Janis Schoetterl-Glausch Date: Mon Feb 6 17:45:56 2023 +0100 KVM: s390: Move common code of mem_op functions into function The vcpu and vm mem_op ioctl implementations share some functionality. Move argument checking into a function and call it from both implementations. This allows code reuse in case of additional future mem_op operations. Suggested-by: Janosch Frank Signed-off-by: Janis Schoetterl-Glausch Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20230206164602.138068-9-scgl@linux.ibm.com Message-Id: <20230206164602.138068-9-scgl@linux.ibm.com> Signed-off-by: Janosch Frank commit dc55ceaef616bdac73810d6588c23a5b50d24911 Author: Janis Schoetterl-Glausch Date: Mon Feb 6 17:45:55 2023 +0100 KVM: s390: selftest: memop: Fix integer literal The address is a 64 bit value, specifying a 32 bit value can crash the guest. In this case things worked out with -O2 but not -O0. Signed-off-by: Janis Schoetterl-Glausch Fixes: 1bb873495a9e ("KVM: s390: selftests: Add more copy memop tests") Reviewed-by: Thomas Huth Link: https://lore.kernel.org/r/20230206164602.138068-8-scgl@linux.ibm.com Message-Id: <20230206164602.138068-8-scgl@linux.ibm.com> Signed-off-by: Janosch Frank commit 12c12a9924b475d6a20760f992fbf5e080747ae3 Author: Janis Schoetterl-Glausch Date: Mon Feb 6 17:45:54 2023 +0100 KVM: s390: selftest: memop: Fix wrong address being used in test The guest code sets the key for mem1 only. In order to provoke a protection exception the test codes needs to address mem1. Signed-off-by: Janis Schoetterl-Glausch Reviewed-by: Nico Boehr Link: https://lore.kernel.org/r/20230206164602.138068-7-scgl@linux.ibm.com Message-Id: <20230206164602.138068-7-scgl@linux.ibm.com> Signed-off-by: Janosch Frank commit 76a2ee43ed9a34f163d0331e3ba320c34c66c64e Author: Janis Schoetterl-Glausch Date: Mon Feb 6 17:45:53 2023 +0100 KVM: s390: selftest: memop: Fix typo "acceeded" isn't a word, should be "exceeded". Signed-off-by: Janis Schoetterl-Glausch Reviewed-by: Thomas Huth Reviewed-by: Nico Boehr Link: https://lore.kernel.org/r/20230206164602.138068-6-scgl@linux.ibm.com Message-Id: <20230206164602.138068-6-scgl@linux.ibm.com> Signed-off-by: Janosch Frank commit 06e5da81c66cd688d12c0c38ef35dd7c1c1845e5 Author: Janis Schoetterl-Glausch Date: Mon Feb 6 17:45:52 2023 +0100 KVM: s390: selftest: memop: Add bad address test Add a test that tries a real write to a bad address. The existing CHECK_ONLY test doesn't cover all paths. Signed-off-by: Janis Schoetterl-Glausch Reviewed-by: Nico Boehr Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20230206164602.138068-5-scgl@linux.ibm.com Message-Id: <20230206164602.138068-5-scgl@linux.ibm.com> Signed-off-by: Janosch Frank commit de14e014a7c6a69b31b68374e6fe30f8da683505 Author: Janis Schoetterl-Glausch Date: Mon Feb 6 17:45:51 2023 +0100 KVM: s390: selftest: memop: Move testlist into main This allows checking if the necessary requirements for a test case are met via an arbitrary expression. In particular, it is easy to check if certain bits are set in the memop extension capability. Signed-off-by: Janis Schoetterl-Glausch Reviewed-by: Thomas Huth Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20230206164602.138068-4-scgl@linux.ibm.com Message-Id: <20230206164602.138068-4-scgl@linux.ibm.com> Signed-off-by: Janosch Frank commit 12d27074193bda046122b6f94bacba818e4fd6c6 Author: Janis Schoetterl-Glausch Date: Mon Feb 6 17:45:50 2023 +0100 KVM: s390: selftest: memop: Replace macros by functions Replace the DEFAULT_* test helpers by functions, as they don't need the extra flexibility. Signed-off-by: Janis Schoetterl-Glausch Reviewed-by: Thomas Huth Acked-by: Janosch Frank Link: https://lore.kernel.org/r/20230206164602.138068-3-scgl@linux.ibm.com Message-Id: <20230206164602.138068-3-scgl@linux.ibm.com> Signed-off-by: Janosch Frank commit 7d42b38de9927ab04162f36f8c448aed8d344e40 Author: Janis Schoetterl-Glausch Date: Mon Feb 6 17:45:49 2023 +0100 KVM: s390: selftest: memop: Pass mop_desc via pointer The struct is quite large, so this seems nicer. Signed-off-by: Janis Schoetterl-Glausch Reviewed-by: Thomas Huth Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20230206164602.138068-2-scgl@linux.ibm.com Message-Id: <20230206164602.138068-2-scgl@linux.ibm.com> Signed-off-by: Janosch Frank commit d7b9dc14031b7f8865aeedc90d8bc68a4bb16023 Author: Nina Schoetterl-Glausch Date: Fri Jan 27 18:45:52 2023 +0100 KVM: selftests: Compile s390 tests with -march=z10 The guest used in s390 kvm selftests is not be set up to handle all instructions the compiler might emit, i.e. vector instructions, leading to crashes. Limit what the compiler emits to the oldest machine model currently supported by Linux. Signed-off-by: Nina Schoetterl-Glausch Reviewed-by: Janosch Frank Reviewed-by: Thomas Huth Link: https://lore.kernel.org/r/20230127174552.3370169-1-nsg@linux.ibm.com Message-Id: <20230127174552.3370169-1-nsg@linux.ibm.com> Signed-off-by: Janosch Frank commit f2d3155e2a6bac44d16f04415a321e8707d895c6 Author: Nico Boehr Date: Fri Jan 27 15:05:32 2023 +0100 KVM: s390: disable migration mode when dirty tracking is disabled Migration mode is a VM attribute which enables tracking of changes in storage attributes (PGSTE). It assumes dirty tracking is enabled on all memslots to keep a dirty bitmap of pages with changed storage attributes. When enabling migration mode, we currently check that dirty tracking is enabled for all memslots. However, userspace can disable dirty tracking without disabling migration mode. Since migration mode is pointless with dirty tracking disabled, disable migration mode whenever userspace disables dirty tracking on any slot. Also update the documentation to clarify that dirty tracking must be enabled when enabling migration mode, which is already enforced by the code in kvm_s390_vm_start_migration(). Also highlight in the documentation for KVM_S390_GET_CMMA_BITS that it can now fail with -EINVAL when dirty tracking is disabled while migration mode is on. Move all the error codes to a table so this stays readable. To disable migration mode, slots_lock should be held, which is taken in kvm_set_memory_region() and thus held in kvm_arch_prepare_memory_region(). Restructure the prepare code a bit so all the sanity checking is done before disabling migration mode. This ensures migration mode isn't disabled when some sanity check fails. Cc: stable@vger.kernel.org Fixes: 190df4a212a7 ("KVM: s390: CMMA tracking, ESSA emulation, migration mode") Signed-off-by: Nico Boehr Reviewed-by: Janosch Frank Reviewed-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20230127140532.230651-2-nrb@linux.ibm.com Message-Id: <20230127140532.230651-2-nrb@linux.ibm.com> [frankja@linux.ibm.com: fixed commit message typo, moved api.rst error table upwards] Signed-off-by: Janosch Frank commit 9db0b9b6a14249ef65a5f1e5e3b37762af96f425 Author: Mika Westerberg Date: Tue Jan 31 11:24:04 2023 +0200 PCI: Take other bus devices into account when distributing resources A PCI bridge may reside on a bus with other devices as well. The resource distribution code does not take this into account and therefore it expands the bridge resource windows too much, not leaving space for the other devices (or functions of a multifunction device). This leads to an issue that Jonathan reported when running QEMU with the following topology (QEMU parameters): -device pcie-root-port,port=0,id=root_port13,chassis=0,slot=2 \ -device x3130-upstream,id=sw1,bus=root_port13,multifunction=on \ -device e1000,bus=root_port13,addr=0.1 \ -device xio3130-downstream,id=fun1,bus=sw1,chassis=0,slot=3 \ -device e1000,bus=fun1 The first e1000 NIC here is another function in the switch upstream port. This leads to following errors: pci 0000:00:04.0: bridge window [mem 0x10200000-0x103fffff] to [bus 02-04] pci 0000:02:00.0: bridge window [mem 0x10200000-0x103fffff] to [bus 03-04] pci 0000:02:00.1: BAR 0: failed to assign [mem size 0x00020000] e1000 0000:02:00.1: can't ioremap BAR 0: [??? 0x00000000 flags 0x0] Fix this by taking into account bridge windows, device BARs and SR-IOV PF BARs on the bus (PF BARs include space for VF BARS so only account PF BARs), including the ones belonging to bridges themselves if it has any. Link: https://lore.kernel.org/linux-pci/20221014124553.0000696f@huawei.com/ Link: https://lore.kernel.org/linux-pci/6053736d-1923-41e7-def9-7585ce1772d9@ixsystems.com/ Link: https://lore.kernel.org/r/20230131092405.29121-3-mika.westerberg@linux.intel.com Reported-by: Jonathan Cameron Reported-by: Alexander Motin Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas commit a2ce98d69fabc7d3758063366fe830f682610cf7 Merge: b7bfaa761d760 b33d59fb37ddc Author: Janosch Frank Date: Tue Feb 7 18:04:23 2023 +0100 Merge remote-tracking branch 'l390-korg/cmpxchg_user_key' into kvm-next commit 93827a0a36396f2fd6368a54a020f420c8916e9b Author: Alexandru Matei Date: Tue Jan 24 00:12:08 2023 +0200 KVM: VMX: Fix crash due to uninitialized current_vmcs KVM enables 'Enlightened VMCS' and 'Enlightened MSR Bitmap' when running as a nested hypervisor on top of Hyper-V. When MSR bitmap is updated, evmcs_touch_msr_bitmap function uses current_vmcs per-cpu variable to mark that the msr bitmap was changed. vmx_vcpu_create() modifies the msr bitmap via vmx_disable_intercept_for_msr -> vmx_msr_bitmap_l01_changed which in the end calls this function. The function checks for current_vmcs if it is null but the check is insufficient because current_vmcs is not initialized. Because of this, the code might incorrectly write to the structure pointed by current_vmcs value left by another task. Preemption is not disabled, the current task can be preempted and moved to another CPU while current_vmcs is accessed multiple times from evmcs_touch_msr_bitmap() which leads to crash. The manipulation of MSR bitmaps by callers happens only for vmcs01 so the solution is to use vmx->vmcs01.vmcs instead of current_vmcs. BUG: kernel NULL pointer dereference, address: 0000000000000338 PGD 4e1775067 P4D 0 Oops: 0002 [#1] PREEMPT SMP NOPTI ... RIP: 0010:vmx_msr_bitmap_l01_changed+0x39/0x50 [kvm_intel] ... Call Trace: vmx_disable_intercept_for_msr+0x36/0x260 [kvm_intel] vmx_vcpu_create+0xe6/0x540 [kvm_intel] kvm_arch_vcpu_create+0x1d1/0x2e0 [kvm] kvm_vm_ioctl_create_vcpu+0x178/0x430 [kvm] kvm_vm_ioctl+0x53f/0x790 [kvm] __x64_sys_ioctl+0x8a/0xc0 do_syscall_64+0x5c/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd Fixes: ceef7d10dfb6 ("KVM: x86: VMX: hyper-v: Enlightened MSR-Bitmap support") Cc: stable@vger.kernel.org Suggested-by: Sean Christopherson Signed-off-by: Alexandru Matei Link: https://lore.kernel.org/r/20230123221208.4964-1-alexandru.matei@uipath.com Signed-off-by: Sean Christopherson commit 08f0a15ee8adb4846b08ca5d5c175fbf0f652bc9 Author: Mika Westerberg Date: Tue Jan 31 11:24:03 2023 +0200 PCI: Align extra resources for hotplug bridges properly After division the extra resource space per hotplug bridge may not be aligned according to the window alignment, so align it before passing it down for further distribution. Link: https://lore.kernel.org/r/20230131092405.29121-2-mika.westerberg@linux.intel.com Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas commit 6c6cd913accd77008f74a1a9d57b816db3651daa Author: Paul Moore Date: Tue Feb 7 10:21:47 2023 -0500 audit: update the mailing list in MAINTAINERS We've moved the upstream Linux Kernel audit subsystem discussions to a new mailing list, this patch updates the MAINTAINERS info with the new list address. Marking this for stable inclusion to help speed uptake of the new list across all of the supported kernel releases. This is a doc only patch so the risk should be close to nil. Cc: stable@vger.kernel.org Signed-off-by: Paul Moore commit c39cea6f38eefe356d64d0bc1e1f2267e282cdd3 Author: Atish Patra Date: Tue Feb 7 01:55:29 2023 -0800 RISC-V: KVM: Increment firmware pmu events KVM supports firmware events now. Invoke the firmware event increment function from appropriate places. Reviewed-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Atish Patra Signed-off-by: Anup Patel commit badc386869e2cb255df6183ec05488a05bd07658 Author: Atish Patra Date: Tue Feb 7 01:55:28 2023 -0800 RISC-V: KVM: Support firmware events SBI PMU extension defines a set of firmware events which can provide useful information to guests about the number of SBI calls. As hypervisor implements the SBI PMU extension, these firmware events correspond to ecall invocations between VS->HS mode. All other firmware events will always report zero if monitored as KVM doesn't implement them. This patch adds all the infrastructure required to support firmware events. Reviewed-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Atish Patra Signed-off-by: Anup Patel commit 0cb74b65d2e5e6ec3ed60c8890014b1bcd0c81c9 Author: Atish Patra Date: Tue Feb 7 17:44:28 2023 +0530 RISC-V: KVM: Implement perf support without sampling RISC-V SBI PMU & Sscofpmf ISA extension allows supporting perf in the virtualization enviornment as well. KVM implementation relies on SBI PMU extension for the most part while trapping & emulating the CSRs read for counter access. This patch doesn't have the event sampling support yet. Reviewed-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Atish Patra Signed-off-by: Anup Patel commit a9ac6c37521ff3f81eba7fada8773c362652d75f Author: Atish Patra Date: Tue Feb 7 01:55:26 2023 -0800 RISC-V: KVM: Implement trap & emulate for hpmcounters As the KVM guests only see the virtual PMU counters, all hpmcounter access should trap and KVM emulates the read access on behalf of guests. Reviewed-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Atish Patra Signed-off-by: Anup Patel commit f04bafb52f580552dc22bfb5b7af9a5dbcc2254f Author: Atish Patra Date: Tue Feb 7 01:55:25 2023 -0800 RISC-V: KVM: Disable all hpmcounter access for VS/VU mode Any guest must not get access to any hpmcounter including cycle/instret without any checks. We achieve that by disabling all the bits except TM bit in hcounteren. However, instret and cycle access for guest user space can be enabled upon explicit request (via ONE REG) or on first trap from VU mode to maintain ABI requirement in the future. This patch doesn't support that as ONE REG interface is not settled yet. Reviewed-by: Andrew Jones Reviewed-by: Anup Patel Signed-off-by: Atish Patra Signed-off-by: Anup Patel commit 470926a2900cfdc39b300d87a0ccdf037fa67b9a Author: Atish Patra Date: Tue Feb 7 01:55:24 2023 -0800 RISC-V: KVM: Make PMU functionality depend on Sscofpmf The privilege mode filtering feature must be available in the host so that the host can inhibit the counters while the execution is in HS mode. Otherwise, the guests may have access to critical guest information. Reviewed-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Atish Patra Signed-off-by: Anup Patel commit cbddc4c4cb9e30933777dbf3bc8645399af10140 Author: Atish Patra Date: Tue Feb 7 01:55:23 2023 -0800 RISC-V: KVM: Add SBI PMU extension support SBI PMU extension allows KVM guests to configure/start/stop/query about the PMU counters in virtualized enviornment as well. In order to allow that, KVM implements the entire SBI PMU extension. Reviewed-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Atish Patra Signed-off-by: Anup Patel commit 8f0153ecd3bf184bc06afca25b737c707fa4d765 Author: Atish Patra Date: Tue Feb 7 01:55:22 2023 -0800 RISC-V: KVM: Add skeleton support for perf This patch only adds barebone structure of perf implementation. Most of the function returns zero at this point and will be implemented fully in the future. Reviewed-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Atish Patra Signed-off-by: Anup Patel commit bae0dfd74e0147cbde332e31b7a71bf6db0eab45 Author: Atish Patra Date: Sat Feb 4 17:15:07 2023 -0800 RISC-V: KVM: Modify SBI extension handler to return SBI error code Currently, the SBI extension handle is expected to return Linux error code. The top SBI layer converts the Linux error code to SBI specific error code that can be returned to guest invoking the SBI calls. This model works as long as SBI error codes have 1-to-1 mappings between them. However, that may not be true always. This patch attempts to disassociate both these error codes by allowing the SBI extension implementation to return SBI specific error codes as well. The extension will continue to return the Linux error specific code which will indicate any problem *with* the extension emulation while the SBI specific error will indicate the problem *of* the emulation. Reviewed-by: Anup Patel Reviewed-by: Andrew Jones Suggested-by: Andrew Jones Signed-off-by: Atish Patra Signed-off-by: Anup Patel commit 8cdb8a53857d54fbbabad2593c3c841836e990a9 Author: Atish Patra Date: Sat Feb 4 17:15:06 2023 -0800 RISC-V: KVM: Return correct code for hsm stop function According to the SBI specification, the stop function can only return error code SBI_ERR_FAILED. However, currently it returns -EINVAL which will be mapped SBI_ERR_INVALID_PARAM. Return an linux error code that maps to SBI_ERR_FAILED i.e doesn't map to any other SBI error code. While EACCES is not the best error code to describe the situation, it is close enough and will be replaced with SBI error codes directly anyways. Reviewed-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Atish Patra Signed-off-by: Anup Patel commit 026bac4574b5da5aa8715bf60584679fa269eb14 Author: Atish Patra Date: Sat Feb 4 17:15:05 2023 -0800 RISC-V: KVM: Define a probe function for SBI extension data structures Currently the probe function just checks if an SBI extension is registered or not. However, the extension may not want to advertise itself depending on some other condition. An additional extension specific probe function will allow extensions to decide if they want to be advertised to the caller or not. Any extension that does not require additional dependency checks can avoid implementing this function. Reviewed-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Atish Patra Signed-off-by: Anup Patel commit 2723fb7b1e3d331fe6ce04629be6f66898a4cf3b Author: Atish Patra Date: Sat Feb 4 17:15:04 2023 -0800 RISC-V: Improve SBI PMU extension related definitions This patch fixes/improve few minor things in SBI PMU extension definition. 1. Align all the firmware event names. 2. Add macros for bit positions in cache event ID & ops. The changes were small enough to combine them together instead of creating 1 liner patches. Reviewed-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Atish Patra Signed-off-by: Anup Patel commit 8929283a687bb4b71ec9d3f1e827aecf829c6b1a Author: Atish Patra Date: Sat Feb 4 17:15:03 2023 -0800 perf: RISC-V: Improve privilege mode filtering for perf Currently, the host driver doesn't have any method to identify if the requested perf event is from kvm or bare metal. As KVM runs in HS mode, there are no separate hypervisor privilege mode to distinguish between the attributes for guest/host. Improve the privilege mode filtering by using the event specific config1 field. Reviewed-by: Andrew Jones Reviewed-by: Anup Patel Signed-off-by: Atish Patra Signed-off-by: Anup Patel commit 585e351ff359c032ea7ab48d999b252ba09f8051 Author: Atish Patra Date: Sat Feb 4 17:15:02 2023 -0800 perf: RISC-V: Define helper functions expose hpm counter width and count KVM module needs to know how many hardware counters and the counter width that the platform supports. Otherwise, it will not be able to show optimal value of virtual counters to the guest. The virtual hardware counters also need to have the same width as the logical hardware counters for simplicity. However, there shouldn't be mapping between virtual hardware counters and logical hardware counters. As we don't support hetergeneous harts or counters with different width as of now, the implementation relies on the counter width of the first available programmable counter. Reviewed-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Atish Patra Signed-off-by: Anup Patel commit cdeb59bbf19f456253fd257c744b8383f972cf1e Author: Andy Chiu Date: Fri Jan 27 11:28:55 2023 +0530 RISC-V: KVM: Redirect illegal instruction traps to guest The M-mode redirects an unhandled illegal instruction trap back to S-mode. However, KVM running in HS-mode terminates the VS-mode software when it receives illegal instruction trap. Instead, KVM should redirect the illegal instruction trap back to VS-mode, and let VS-mode trap handler decide the next step. This futher allows guest kernel to implement on-demand enabling of vector extension for a guest user space process upon first-use. Signed-off-by: Andy Chiu Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Reviewed-by: Atish Patra Signed-off-by: Anup Patel commit 06723e124fcbf63a1848c692fad17a023cad5ebc Author: Anup Patel Date: Sat Jan 28 13:18:25 2023 +0530 RISC-V: KVM: Fix privilege mode setting in kvm_riscv_vcpu_trap_redirect() The kvm_riscv_vcpu_trap_redirect() should set guest privilege mode to supervisor mode because guest traps/interrupts are always handled in virtual supervisor mode. Fixes: 9f7013265112 ("RISC-V: KVM: Handle MMIO exits for VCPU") Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Reviewed-by: Atish Patra Signed-off-by: Anup Patel commit c25a6dddc62c84f50e57094bd44e7f9d84907f49 Author: Alexandre Ghiti Date: Mon Jan 23 10:29:28 2023 +0100 KVM: RISC-V: Fix wrong usage of PGDIR_SIZE to check page sizes At the moment, riscv only supports PMD and PUD hugepages. For sv39, PGDIR_SIZE == PUD_SIZE but not for sv48 and sv57. So fix this by changing PGDIR_SIZE into PUD_SIZE. Fixes: 9d05c1fee837 ("RISC-V: KVM: Implement stage2 page table programming") Signed-off-by: Alexandre Ghiti Signed-off-by: Anup Patel commit 61d731e6538dc44abf2dca6e77098ec6e85f7cc2 Merge: ca8e4cbff6d53 3dafbe5cc1409 Author: Paolo Abeni Date: Tue Feb 7 15:54:08 2023 +0100 Merge tag 'linux-can-next-for-6.3-20230206' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2023-02-06 this is a pull request of 47 patches for net-next/master. The first two patch is by Oliver Hartkopp. One adds missing error checking to the CAN_GW protocol, the other adds a missing CAN address family check to the CAN ISO TP protocol. Thomas Kopp contributes a performance optimization to the mcp251xfd driver. The next 11 patches are by Geert Uytterhoeven and add support for R-Car V4H systems to the rcar_canfd driver. Stephane Grosjean and Lukas Magel contribute 8 patches to the peak_usb driver, which add support for configurable CAN channel ID. The last 17 patches are by me and target the CAN bit timing configuration. The bit timing is cleaned up, error messages are improved and forwarded to user space via NL_SET_ERR_MSG_FMT() instead of netdev_err(), and the SJW handling is updated, including the definition of a new default value that will benefit CAN-FD controllers, by increasing their oscillator tolerance. * tag 'linux-can-next-for-6.3-20230206' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next: (47 commits) can: bittiming: can_validate_bitrate(): report error via netlink can: bittiming: can_calc_bittiming(): convert from netdev_err() to NL_SET_ERR_MSG_FMT() can: bittiming: can_calc_bittiming(): clean up SJW handling can: bittiming: can_sjw_set_default(): use Phase Seg2 / 2 as default for SJW can: bittiming: can_sjw_check(): check that SJW is not longer than either Phase Buffer Segment can: bittiming: can_sjw_check(): report error via netlink and harmonize error value can: bittiming: can_fixup_bittiming(): report error via netlink and harmonize error value can: bittiming: factor out can_sjw_set_default() and can_sjw_check() can: bittiming: can_changelink() pass extack down callstack can: netlink: can_changelink(): convert from netdev_err() to NL_SET_ERR_MSG_FMT() can: netlink: can_validate(): validate sample point for CAN and CAN-FD can: dev: register_candev(): bail out if both fixed bit rates and bit timing constants are provided can: dev: register_candev(): ensure that bittiming const are valid can: bittiming: can_get_bittiming(): use direct return and remove unneeded else can: bittiming: can_fixup_bittiming(): set effective tq can: bittiming: can_fixup_bittiming(): use CAN_SYNC_SEG instead of 1 can: bittiming(): replace open coded variants of can_bit_time() can: peak_usb: Reorder include directives alphabetically can: peak_usb: align CAN channel ID format in log with sysfs attribute can: peak_usb: export PCAN CAN channel ID as sysfs device attribute ... ==================== Link: https://lore.kernel.org/r/20230206131620.2758724-1-mkl@pengutronix.de Signed-off-by: Paolo Abeni commit 6c83b2d94fcca735cf7d8aa7a55a4957eb404a9d Author: Daniel Golle Date: Thu Jan 26 00:34:56 2023 +0000 pinctrl: add mt7981 pinctrl driver Add pinctrl driver for the MediaTek MT7981 SoC, based on the driver which can also be found the SDK. Signed-off-by: Daniel Golle Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/ef5112946d16cacc67e65e439ba7b52a9950c1bb.1674693008.git.daniel@makrotopia.org Signed-off-by: Linus Walleij commit d4059de433287ee7b44e1790c7c1460eb5d3d674 Author: Daniel Golle Date: Thu Jan 26 00:34:15 2023 +0000 dt-bindings: pinctrl: add bindings for MT7981 SoC Add bindings for the MT7981 pinctrl driver. As MT7981 has most features in common with MT7986 (but has a different layout in terms on pinctrl and clocks), the existing mediatek,mt7986-pinctrl.yaml was used as an example to create a similar document covering MT7981. Signed-off-by: Daniel Golle Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/3f0fd0becc338eef66caeb7244c3c432b8d1ef7a.1674693008.git.daniel@makrotopia.org Signed-off-by: Linus Walleij commit 9421655de886bc89843412001a7cdd9423b3418f Author: Johan Jonker Date: Sat Jan 21 12:08:20 2023 +0100 dt-bindings: pinctrl: rockchip,pinctrl: mark gpio sub nodes of pinctrl as deprecated Mark gpio sub nodes of pinctrl as deprecated. Gpio nodes are now placed in the root of the device tree. The relation to pinctrl is now described with the "gpio-ranges" property. Signed-off-by: Johan Jonker Acked-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/137b56f0-8e86-f705-4ba7-d5dfe3c0b477@gmail.com Signed-off-by: Linus Walleij commit 75dc7e600ef53ddf6994a753b13385da174e72d4 Author: Kathiravan T Date: Mon Feb 6 12:42:10 2023 +0530 pinctrl: qcom: Introduce IPQ5332 TLMM driver The IPQ5332 SoC comes with a TLMM block, like all other Qualcomm platforms, so add a driver for it. Signed-off-by: Kathiravan T Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230206071217.29313-3-quic_kathirav@quicinc.com Signed-off-by: Linus Walleij commit ca8e4cbff6d5360efc2ced519c4609e02e88cc59 Author: Vladimir Oltean Date: Mon Feb 6 11:49:32 2023 +0200 ethtool: mm: fix get_mm() return code not propagating to user space If ops->get_mm() returns a non-zero error code, we goto out_complete, but there, we return 0. Fix that to propagate the "ret" variable to the caller. If ops->get_mm() succeeds, it will always return 0. Fixes: 2b30f8291a30 ("net: ethtool: add support for MAC Merge layer") Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230206094932.446379-1-vladimir.oltean@nxp.com Signed-off-by: Paolo Abeni commit 455944e4e439efc280da5f59ca6f5b014ac7b242 Merge: 1972d038a5401 baff6491448b4 Author: Jens Axboe Date: Tue Feb 7 07:22:58 2023 -0700 Merge tag 'nvme-6.3-2023-02-07' of git://git.infradead.org/nvme into for-6.3/block Pull NVMe updates from Christoph: "nvme updates for Linux 6.3 - small improvements to the logging functionality (Amit Engel) - authentication cleanups (Hannes Reinecke) - cleanup and optimize the DMA mapping cod in the PCIe driver (Keith Busch) - work around the command effects for Format NVM (Keith Busch) - misc cleanups (Keith Busch, Christoph Hellwig)" * tag 'nvme-6.3-2023-02-07' of git://git.infradead.org/nvme: nvme: mask CSE effects for security receive nvme: always initialize known command effects nvmet: for nvme admin set_features cmd, call nvmet_check_data_len_lte() nvme-tcp: add additional info for nvme_tcp_timeout log nvme: add nvme_opcode_str function for all nvme cmd types nvme: remove nvme_execute_passthru_rq nvme-pci: place descriptor addresses in iod nvme-pci: use mapped entries for sgl decision nvme-pci: remove SGL segment descriptors nvme-auth: don't use NVMe status codes nvme-fabrics: clarify AUTHREQ result handling commit 1972d038a5401781377d3ce2d901bf7763a43589 Author: Ziyang Zhang Date: Tue Feb 7 15:08:39 2023 +0800 ublk: pass NULL to blk_mq_alloc_disk() as queuedata queuedata is not referenced in ublk_drv and we can use driver_data instead. Pass NULL to blk_mq_alloc_disk() as queuedata while allocating ublk's gendisk. Signed-off-by: Ziyang Zhang Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20230207070839.370817-4-ZiyangZhang@linux.alibaba.com Signed-off-by: Jens Axboe commit b352389e7ba34bdb5bcf4254fa1e85319ba76352 Author: Ziyang Zhang Date: Tue Feb 7 15:08:38 2023 +0800 ublk: mention WRITE_ZEROES in comment of ublk_complete_rq() WRITE_ZEROES won't return bytes returned just like FLUSH and DISCARD, and we can end it directly. Add missing comment for it in ublk_complete_rq(). Signed-off-by: Ziyang Zhang Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20230207070839.370817-3-ZiyangZhang@linux.alibaba.com Signed-off-by: Jens Axboe commit 731e208d7b4b38d2bac4b7c53403c8abbf306d01 Author: Ziyang Zhang Date: Tue Feb 7 15:08:37 2023 +0800 ublk: remove unnecessary NULL check in ublk_rq_has_data() bio_has_data() allows a NULL bio so the NULL check in ublk_rq_has_data() is unnecessary. Signed-off-by: Ziyang Zhang Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20230207070839.370817-2-ZiyangZhang@linux.alibaba.com Signed-off-by: Jens Axboe commit a4e771729a51168bc36317effaa9962e336d4f5e Author: Dmitry Baryshkov Date: Tue Jan 24 12:45:48 2023 +0200 drm/probe_helper: sort out poll_running vs poll_enabled There are two flags attemting to guard connector polling: poll_enabled and poll_running. While poll_enabled semantics is clearly defined and fully adhered (mark that drm_kms_helper_poll_init() was called and not finalized by the _fini() call), the poll_running flag doesn't have such clearliness. This flag is used only in drm_helper_probe_single_connector_modes() to guard calling of drm_kms_helper_poll_enable, it doesn't guard the drm_kms_helper_poll_fini(), etc. Change it to only be set if the polling is actually running. Tie HPD enablement to this flag. This fixes the following warning reported after merging the HPD series: Hot plug detection already enabled WARNING: CPU: 2 PID: 9 at drivers/gpu/drm/drm_bridge.c:1257 drm_bridge_hpd_enable+0x94/0x9c [drm] Modules linked in: videobuf2_memops snd_soc_simple_card snd_soc_simple_card_utils fsl_imx8_ddr_perf videobuf2_common snd_soc_imx_spdif adv7511 etnaviv imx8m_ddrc imx_dcss mc cec nwl_dsi gov CPU: 2 PID: 9 Comm: kworker/u8:0 Not tainted 6.2.0-rc2-15208-g25b283acd578 #6 Hardware name: NXP i.MX8MQ EVK (DT) Workqueue: events_unbound deferred_probe_work_func pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : drm_bridge_hpd_enable+0x94/0x9c [drm] lr : drm_bridge_hpd_enable+0x94/0x9c [drm] sp : ffff800009ef3740 x29: ffff800009ef3740 x28: ffff000009331f00 x27: 0000000000001000 x26: 0000000000000020 x25: ffff800001148ed8 x24: ffff00000a8fe000 x23: 00000000fffffffd x22: ffff000005086348 x21: ffff800001133ee0 x20: ffff00000550d800 x19: ffff000005086288 x18: 0000000000000006 x17: 0000000000000000 x16: ffff8000096ef008 x15: 97ffff2891004260 x14: 2a1403e194000000 x13: 97ffff2891004260 x12: 2a1403e194000000 x11: 7100385f29400801 x10: 0000000000000aa0 x9 : ffff800008112744 x8 : ffff000000250b00 x7 : 0000000000000003 x6 : 0000000000000011 x5 : 0000000000000000 x4 : ffff0000bd986a48 x3 : 0000000000000001 x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff000000250000 Call trace: drm_bridge_hpd_enable+0x94/0x9c [drm] drm_bridge_connector_enable_hpd+0x2c/0x3c [drm_kms_helper] drm_kms_helper_poll_enable+0x94/0x10c [drm_kms_helper] drm_helper_probe_single_connector_modes+0x1a8/0x510 [drm_kms_helper] drm_client_modeset_probe+0x204/0x1190 [drm] __drm_fb_helper_initial_config_and_unlock+0x5c/0x4a4 [drm_kms_helper] drm_fb_helper_initial_config+0x54/0x6c [drm_kms_helper] drm_fbdev_client_hotplug+0xd0/0x140 [drm_kms_helper] drm_fbdev_generic_setup+0x90/0x154 [drm_kms_helper] dcss_kms_attach+0x1c8/0x254 [imx_dcss] dcss_drv_platform_probe+0x90/0xfc [imx_dcss] platform_probe+0x70/0xcc really_probe+0xc4/0x2e0 __driver_probe_device+0x80/0xf0 driver_probe_device+0xe0/0x164 __device_attach_driver+0xc0/0x13c bus_for_each_drv+0x84/0xe0 __device_attach+0xa4/0x1a0 device_initial_probe+0x1c/0x30 bus_probe_device+0xa4/0xb0 deferred_probe_work_func+0x90/0xd0 process_one_work+0x200/0x474 worker_thread+0x74/0x43c kthread+0xfc/0x110 ret_from_fork+0x10/0x20 ---[ end trace 0000000000000000 ]--- Reported-by: Laurentiu Palcu Fixes: c8268795c9a9 ("drm/probe-helper: enable and disable HPD on connectors") Tested-by: Marek Szyprowski Tested-by: Chen-Yu Tsai Acked-by: Laurentiu Palcu Tested-by: Laurentiu Palcu Tested-by: Laurent Pinchart Signed-off-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230124104548.3234554-2-dmitry.baryshkov@linaro.org (cherry picked from commit d33a54e3991dfce88b4fc6d9c3360951c2c5660d) Signed-off-by: Thomas Zimmermann commit 91f43949662c9eb4a443203a188e806df8290bc9 Author: Dmitry Baryshkov Date: Tue Jan 24 12:45:47 2023 +0200 drm/probe_helper: extract two helper functions Extract drm_kms_helper_enable_hpd() and drm_kms_helper_disable_hpd(), two helpers that enable and disable HPD handling on all device's connectors. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Reviewed-by: Jani Nikula Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230124104548.3234554-1-dmitry.baryshkov@linaro.org (cherry picked from commit cbf143b282c64e59559cc8351c0b5b1ab4bbdcbe) Signed-off-by: Thomas Zimmermann commit 5f623a598d128dacadf95c9d14f7c8b1313a3dc4 Author: Oliver Upton Date: Mon Feb 6 23:52:29 2023 +0000 KVM: arm64: Mark some VM-scoped allocations as __GFP_ACCOUNT Generally speaking, any memory allocations that can be associated with a particular VM should be charged to the cgroup of its process. Nonetheless, there are a couple spots in KVM/arm64 that aren't currently accounted: - the ccsidr array containing the virtualized cache hierarchy - the cpumask of supported cpus, for use of the vPMU on heterogeneous systems Go ahead and set __GFP_ACCOUNT for these allocations. Reviewed-by: Marc Zyngier Reviewed-by: Akihiko Odaki Reviewed-by: Gavin Shan Link: https://lore.kernel.org/r/20230206235229.4174711-1-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit 67d953d4d7bec5333c1036258753573d9904753b Author: Marc Zyngier Date: Tue Feb 7 09:43:21 2023 +0000 KVM: arm64: Fix non-kerneldoc comments The robots amongts us have started spitting out irritating emails about random errors such as: arch/arm64/kvm/arm.c:2207: warning: expecting prototype for Initialize Hyp(). Prototype was for kvm_arm_init() instead which makes little sense until you finally grok what they are on about: comments that look like a kerneldoc, but that aren't. Let's address this before I get even more irritated... ;-) Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/63e139e1.J5AHO6vmxaALh7xv%25lkp@intel.com Link: https://lore.kernel.org/r/20230207094321.1238600-1-maz@kernel.org Signed-off-by: Oliver Upton commit 7db738b5fea4533fa217dfb05c506c15bd0964d9 Author: Mauro Lima Date: Mon Feb 6 15:31:43 2023 -0300 spi: intel: Remove DANGEROUS tag from pci driver Modern CPUs exposes this controller as PCI device that only uses hardware sequencing capabilities which is safer than software sequencing. Leave the platform driver as *DANGEROUS* and update help text since most of these controllers are using software sequencing. Signed-off-by: Mauro Lima Acked-by: Mika Westerberg Link: https://lore.kernel.org/r/20230206183143.75274-2-mauro.lima@eclypsium.com Signed-off-by: Mark Brown commit 32f7b9102bfc48a210bf655e049145f6450b03a0 Author: Jerome Brunet Date: Mon Feb 6 16:34:48 2023 +0100 ASoC: dt-bindings: meson: convert axg spdif output to schema Convert the DT binding documentation for the Amlogic axg spdif output to schema. Signed-off-by: Jerome Brunet Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230206153449.596326-7-jbrunet@baylibre.com Signed-off-by: Mark Brown commit ede6aa4087abfac527267c4ac5bb6eebdfe958ba Author: Jerome Brunet Date: Mon Feb 6 16:34:47 2023 +0100 ASoC: dt-bindings: meson: convert axg spdif input to schema Convert the DT binding documentation for the Amlogic axg spdif input to schema. Signed-off-by: Jerome Brunet Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230206153449.596326-6-jbrunet@baylibre.com Signed-off-by: Mark Brown commit 6b6f5ea7ab0062d152a3bc9192cee45c7fc31387 Author: Jerome Brunet Date: Mon Feb 6 16:34:46 2023 +0100 ASoC: dt-bindings: meson: convert axg fifo to schema Convert the DT binding documentation for the Amlogic axg audio FIFOs to schema. Signed-off-by: Jerome Brunet Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230206153449.596326-5-jbrunet@baylibre.com Signed-off-by: Mark Brown commit 4d37c72ec42374c5ad416f851b572a9fb794e8ef Author: Jerome Brunet Date: Mon Feb 6 16:34:45 2023 +0100 ASoC: dt-bindings: meson: convert axg pdm to schema Convert the DT binding documentation for the Amlogic axg PDM device to schema. Signed-off-by: Jerome Brunet Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230206153449.596326-4-jbrunet@baylibre.com Signed-off-by: Mark Brown commit c5536e7be70cf2ab55c674b3c2120565e9559c50 Author: Jerome Brunet Date: Mon Feb 6 16:34:44 2023 +0100 ASoC: dt-bindings: meson: convert axg tdm formatters to schema Convert the DT binding documentation for the Amlogic tdm formatters to schema. Signed-off-by: Jerome Brunet Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230206153449.596326-3-jbrunet@baylibre.com Signed-off-by: Mark Brown commit cdff91122de52f480bea730fee6665a7404d758c Author: Jerome Brunet Date: Mon Feb 6 16:34:43 2023 +0100 ASoC: dt-bindings: meson: convert axg tdm interface to schema Convert the DT binding documentation for the Amlogic tdm interface to schema. Signed-off-by: Jerome Brunet Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230206153449.596326-2-jbrunet@baylibre.com Signed-off-by: Mark Brown commit 51e38c92bed26f648ec187c4400fa7512fcd8067 Author: Kees Cook Date: Sat Feb 4 10:34:27 2023 -0800 udf: Use unsigned variables for size calculations To avoid confusing the compiler about possible negative sizes, switch various size variables that can never be negative from int to u32. Seen with GCC 13: ../fs/udf/directory.c: In function 'udf_copy_fi': ../include/linux/fortify-string.h:57:33: warning: '__builtin_memcpy' pointer overflow between offset 80 and size [-2147483648, -1] [-Warray-bounds=] 57 | #define __underlying_memcpy __builtin_memcpy | ^ ... ../fs/udf/directory.c:102:9: note: in expansion of macro 'memcpy' 102 | memcpy(&iter->fi, iter->bh[0]->b_data + off, len); | ^~~~~~ Cc: Jan Kara Signed-off-by: Kees Cook Signed-off-by: Jan Kara Message-Id: <20230204183427.never.856-kees@kernel.org> commit 032bffd494e3924cc8b854b696ef9b5b7396b883 Author: Richard Guy Briggs Date: Fri Feb 3 16:35:16 2023 -0500 fanotify,audit: Allow audit to use the full permission event response This patch passes the full response so that the audit function can use all of it. The audit function was updated to log the additional information in the AUDIT_FANOTIFY record. Currently the only type of fanotify info that is defined is an audit rule number, but convert it to hex encoding to future-proof the field. Hex encoding suggested by Paul Moore . The {subj,obj}_trust values are {0,1,2}, corresponding to no, yes, unknown. Sample records: type=FANOTIFY msg=audit(1600385147.372:590): resp=2 fan_type=1 fan_info=3137 subj_trust=3 obj_trust=5 type=FANOTIFY msg=audit(1659730979.839:284): resp=1 fan_type=0 fan_info=0 subj_trust=2 obj_trust=2 Suggested-by: Steve Grubb Link: https://lore.kernel.org/r/3075502.aeNJFYEL58@x2 Tested-by: Steve Grubb Acked-by: Steve Grubb Signed-off-by: Richard Guy Briggs Signed-off-by: Jan Kara Message-Id: commit 70529a199574c15a40f46b14256633b02ba10ca2 Author: Richard Guy Briggs Date: Fri Feb 3 16:35:15 2023 -0500 fanotify: define struct members to hold response decision context This patch adds a flag, FAN_INFO and an extensible buffer to provide additional information about response decisions. The buffer contains one or more headers defining the information type and the length of the following information. The patch defines one additional information type, FAN_RESPONSE_INFO_AUDIT_RULE, to audit a rule number. This will allow for the creation of other information types in the future if other users of the API identify different needs. The kernel can be tested if it supports a given info type by supplying the complete info extension but setting fd to FAN_NOFD. It will return the expected size but not issue an audit record. Suggested-by: Steve Grubb Link: https://lore.kernel.org/r/2745105.e9J7NaK4W3@x2 Suggested-by: Jan Kara Link: https://lore.kernel.org/r/20201001101219.GE17860@quack2.suse.cz Tested-by: Steve Grubb Acked-by: Steve Grubb Signed-off-by: Richard Guy Briggs Signed-off-by: Jan Kara Message-Id: <10177cfcae5480926b7176321a28d9da6835b667.1675373475.git.rgb@redhat.com> commit 2e0a547164b1384a87fd3500a01297222b0971b0 Author: Richard Guy Briggs Date: Fri Feb 3 16:35:14 2023 -0500 fanotify: Ensure consistent variable type for response The user space API for the response variable is __u32. This patch makes sure that the whole path through the kernel uses u32 so that there is no sign extension or truncation of the user space response. Suggested-by: Steve Grubb Link: https://lore.kernel.org/r/12617626.uLZWGnKmhe@x2 Signed-off-by: Richard Guy Briggs Acked-by: Paul Moore Tested-by: Steve Grubb Acked-by: Steve Grubb Signed-off-by: Jan Kara Message-Id: <3778cb0b3501bc4e686ba7770b20eb9ab0506cf4.1675373475.git.rgb@redhat.com> commit e8a709dc2a9156f223ec953ae70a919e87ad7e9a Author: Rob Herring Date: Mon Feb 6 14:47:46 2023 -0600 perf: arm_spe: Print the version of SPE detected There's up to 4 versions of SPE now. Let's add the version that's been detected to the driver's informational print out. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230206204746.1452942-1-robh@kernel.org Signed-off-by: Will Deacon commit 8d9190f00a9753ff51f18319d928dedd9a272057 Author: Rob Herring Date: Mon Jan 9 13:26:24 2023 -0600 perf: arm_spe: Add support for SPEv1.2 inverted event filtering Arm SPEv1.2 (Arm v8.7/v9.2) adds a new feature called Inverted Event Filter which excludes samples matching the event filter. The feature mirrors the existing event filter in PMSEVFR_EL1 adding a new register, PMSNEVFR_EL1, which has the same event bit assignments. Tested-by: James Clark Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220825-arm-spe-v8-7-v4-8-327f860daf28@kernel.org Signed-off-by: Will Deacon commit 09519ec3b19e4144b5f6e269c54fbb9c294a9fcb Author: Rob Herring Date: Mon Jan 9 13:26:23 2023 -0600 perf: Add perf_event_attr::config3 Arm SPEv1.2 adds another 64-bits of event filtering control. As the existing perf_event_attr::configN fields are all used up for SPE PMU, an additional field is needed. Add a new 'config3' field. Tested-by: James Clark Signed-off-by: Rob Herring Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220825-arm-spe-v8-7-v4-7-327f860daf28@kernel.org Signed-off-by: Will Deacon commit f8d0dd0bc302b237dfa2ef5836e6ee375c0a1773 Author: Tom Rix Date: Fri Jan 27 08:29:06 2023 -0800 udf: remove reporting loc in debug output clang build fails with fs/udf/partition.c:86:28: error: variable 'loc' is uninitialized when used here [-Werror,-Wuninitialized] sb, block, partition, loc, index); ^~~ loc is now only known when bh is valid. So remove reporting loc in debug output. Fixes: 4215db46d538 ("udf: Use udf_bread() in udf_get_pblock_virt15()") Reported-by: kernel test robot Reported-by: "kernelci.org bot" Signed-off-by: Tom Rix Reviewed-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Jan Kara commit 1e0d4adf17e7ef03281d7b16555e7c1508c8ed2d Author: Vladislav Efanov Date: Thu Feb 2 17:04:56 2023 +0300 udf: Check consistency of Space Bitmap Descriptor Bits, which are related to Bitmap Descriptor logical blocks, are not reset when buffer headers are allocated for them. As the result, these logical blocks can be treated as free and be used for other blocks.This can cause usage of one buffer header for several types of data. UDF issues WARNING in this situation: WARNING: CPU: 0 PID: 2703 at fs/udf/inode.c:2014 __udf_add_aext+0x685/0x7d0 fs/udf/inode.c:2014 RIP: 0010:__udf_add_aext+0x685/0x7d0 fs/udf/inode.c:2014 Call Trace: udf_setup_indirect_aext+0x573/0x880 fs/udf/inode.c:1980 udf_add_aext+0x208/0x2e0 fs/udf/inode.c:2067 udf_insert_aext fs/udf/inode.c:2233 [inline] udf_update_extents fs/udf/inode.c:1181 [inline] inode_getblk+0x1981/0x3b70 fs/udf/inode.c:885 Found by Linux Verification Center (linuxtesting.org) with syzkaller. [JK: Somewhat cleaned up the boundary checks] Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Vladislav Efanov Signed-off-by: Jan Kara commit 8e6e49ccf1a0f2b3257394dc8610bb6d48859d3f Author: Dan Carpenter Date: Mon Feb 6 17:40:35 2023 +0300 RDMA/mlx5: Check reg_create() create for errors The reg_create() can fail. Check for errors before dereferencing it. Fixes: dd1b913fb0d0 ("RDMA/mlx5: Cache all user cacheable mkeys on dereg MR flow") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/Y+ERYy4wN0LsKsm+@kili Reviewed-by: Devesh Sharma Signed-off-by: Leon Romanovsky commit 7ea01d3169a28d090fc8f22e7fcb4e4f1090c2d2 Author: Maíra Canal Date: Fri Feb 3 14:37:04 2023 -0300 rust: delete rust-project.json when running make clean rust-project.json is the configuration file used by rust-analyzer. As it is a configuration file and it is not needed to build external modules, it should be delete by make clean. So, delete rust-project.json when running make clean. Link: https://github.com/Rust-for-Linux/linux/issues/939 Suggested-by: Björn Roy Baron Signed-off-by: Maíra Canal Reviewed-by: Finn Behrens Acked-by: Masahiro Yamada Reviewed-by: Vincenzo Palazzo Signed-off-by: Miguel Ojeda commit 0d1fffdedae26809ad59168e24f7c7534bd54c3a Author: Boqun Feng Date: Wed Feb 1 10:45:21 2023 -0800 rust: MAINTAINERS: Add the zulip link Zulip organization "rust-for-linux" was created 2 years ago[1] and has proven to be a great place for Rust related discussion, therefore add the information in MAINTAINERS file so that newcomers have more options to find guide and help. Link: https://lore.kernel.org/rust-for-linux/CANiq72=xVaMQkgCA9rspjV8bhWDGqAn4x78B0_4U1WBJYj1PiA@mail.gmail.com/ [1] Signed-off-by: Boqun Feng Reviewed-by: Vincenzo Palazzo Reviewed-by: Alice Ferrazzi Signed-off-by: Miguel Ojeda commit 0c7ae432576100ce3609bca0508b9fbcb686a5fe Author: Wedson Almeida Filho Date: Mon Jan 30 03:44:04 2023 -0300 rust: types: implement `ForeignOwnable` for `Arc` This allows us to hand ownership of Rust ref-counted objects to the C side of the kernel. Signed-off-by: Wedson Almeida Filho Reviewed-by: Gary Guo Reviewed-by: Vincenzo Palazzo Reviewed-by: Alice Ferrazzi Reviewed-by: Andreas Hindborg Signed-off-by: Miguel Ojeda commit 68e416255b29c25cbf20018d55849bcb8505c858 Author: Deming Wang Date: Mon Feb 6 03:57:25 2023 -0500 RDMA/restrack: Correct spelling Fix spelling errors. Signed-off-by: Deming Wang Link: https://lore.kernel.org/r/20230206085725.1507-1-wangdeming@inspur.com Signed-off-by: Leon Romanovsky commit 5d2eb73aa0fd57844938a22bddc59f7bc8183924 Author: Pali Rohár Date: Mon Feb 6 22:39:02 2023 +1100 powerpc/pci: Add option for using pci_to_OF_bus_map The "pci-OF-bus-map" property was declared deprecated in 2006 [1] and to the best of everyone's knowledge is not used by anything anymore [2]. The creation of the property was disabled on powermac (arch/powerpc) in 2005 by commit 35499c0195e4 ("powerpc: Merge in 64-bit powermac support."). But it is still created by default on CHRP. On powermac the actual map (pci_to_OF_bus_map) is still used by default, even though the device tree property is not created. Add an option to enable/disable use of the pci_to_OF_bus_map, and creation of the property (on CHRP). Disabling the option allows enabling CONFIG_PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT which allows "normal" bus numbering and more than 256 buses, like 64-bit and other architectures. Mark the new option as default n, the intention is that the option and the code will be removed in a future release. [1]: https://lore.kernel.org/linuxppc-dev/1148016268.13249.14.camel@localhost.localdomain/ [2]: https://lore.kernel.org/all/575f239205e8635add81c9f902b7d9db7beb83ea.camel@kernel.crashing.org/ Signed-off-by: Pali Rohár [mpe: Reword commit & help text, shrink option name, rework to fix build errors] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230206113902.1857123-1-mpe@ellerman.id.au commit cf13d6e4a9aa6639c173fd630d82d586a2322ff9 Author: Daniel Scally Date: Mon Feb 6 16:18:02 2023 +0000 usb: gadget: uvc: Use custom strings if available If the user has defined a custom string descriptor for the IAD or the VideoStreaming interfaces then set their index field to point to the custom descriptor instead of the hardcoded defaults. If no custom descriptors have been linked to, then use the default ones. Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230206161802.892954-12-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit fe625755370be6e3945c53bd0ffb4f4db0c4a73c Author: Daniel Scally Date: Mon Feb 6 16:18:01 2023 +0000 usb: gadget: uvc: Allow linking function to string descs Currently the string descriptors for the IAD and VideoStreaming Interfaces are hardcoded into f_uvc. Now that we can create arbitrary string descriptors, add a mechanism to define string descriptors for the IAD, VC and VS interfaces by linking to the appropriate directory at function level. Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230206161802.892954-11-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 9963f7440f4044bd4262d99fdd0a5827131bd934 Author: Daniel Scally Date: Mon Feb 6 16:18:00 2023 +0000 usb: gadget: uvc: Pick up custom string descriptor IDs If any custom string descriptors have been linked to from the extension unit, pick up the string ID that was returned when the strings were attached to the composite dev and use it to set the iExtension field of the Extension Unit Descriptor. Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230206161802.892954-10-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 08ddd71bf020c3b713d343959df39bf8a48ddd0b Author: Daniel Scally Date: Mon Feb 6 16:17:59 2023 +0000 usb: gadget: uvc: Allow linking XUs to string descriptors Add .allow_link() and .drop_link() callbacks to allow users to link an extension unit descriptor to a string descriptor. Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230206161802.892954-9-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit c033563220e0f7a82f4ae8d698284cced94fd6cf Author: Daniel Scally Date: Mon Feb 6 16:17:58 2023 +0000 usb: gadget: configfs: Attach arbitrary strings to cdev Attach any arbitrary strings that are defined to the composite dev. We handle the old-style manufacturer, product and serialnumbers strings in the same function for simplicity. Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230206161802.892954-8-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 15a7cf8caabee4613764abe7814dd3162cb64137 Author: Daniel Scally Date: Mon Feb 6 16:17:57 2023 +0000 usb: gadget: configfs: Support arbitrary string descriptors Add a framework to allow users to define arbitrary string descriptors for a USB Gadget. This is modelled as a new type of config item rather than as hardcoded attributes so as to be as flexible as possible. Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230206161802.892954-7-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 6e2a512d9532c51889a2601cba338c4673a09374 Author: Daniel Scally Date: Mon Feb 6 16:17:56 2023 +0000 usb: gadget: configfs: Rename struct gadget_strings The struct gadget_strings really represents a single language in configfs. Rename it to make that more clear. Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230206161802.892954-6-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit a7289452699644b429fc82a9663b7a85bd0af51d Author: Daniel Scally Date: Mon Feb 6 16:17:55 2023 +0000 usb: gadget: uvc: Copy XU descriptors during .bind() Now that extension unit support is available through configfs we need to copy the descriptors for the XUs during uvc_function_bind() so that they're exposed to the usb subsystem. Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230206161802.892954-5-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 0525210c9840229e42c6b68e886c72a75a67cf8e Author: Daniel Scally Date: Mon Feb 6 16:17:54 2023 +0000 usb: gadget: uvc: Allow definition of XUs in configfs The UVC gadget at present has no support for extension units. Add the infrastructure to uvc_configfs.c that allows users to create XUs via configfs. These will be stored in a new child of uvcg_control_grp_type with the name "extensions". Reported-by: kernel test robot Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230206161802.892954-4-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 0df28607c5cb4fe60bba591e9858a8f7ba39aa4a Author: Daniel Scally Date: Mon Feb 6 16:17:53 2023 +0000 usb: gadget: uvc: Generalise helper functions for reuse The __uvcg_*frm_intrv() helper functions can be helpful when adding support for similar attributes. Generalise the functions and move them higher in the file for better coverage. Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230206161802.892954-3-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit b3c839bd8a07d303bc59a900d55dd35c7826562c Author: Daniel Scally Date: Mon Feb 6 16:17:52 2023 +0000 usb: gadget: uvc: Make bSourceID read/write At the moment, the UVC function graph is hardcoded IT -> PU -> OT. To add XU support we need the ability to insert the XU descriptors into the chain. To facilitate that, make the output terminal's bSourceID attribute writeable so that we can configure its source. Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230206161802.892954-2-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit a7efe3fc7cbe27c6eb2c2a3ab612194f8f800f4c Author: Mark Tomlinson Date: Tue Feb 7 16:33:37 2023 +1300 usb: max-3421: Fix setting of I/O pins To update the I/O pins, the registers are read/modified/written. The read operation incorrectly always read the first register. Although wrong, there wasn't any impact as all the output pins are always written, and the inputs are read only anyway. Fixes: 2d53139f3162 ("Add support for using a MAX3421E chip as a host driver.") Signed-off-by: Mark Tomlinson Link: https://lore.kernel.org/r/20230207033337.18112-1-mark.tomlinson@alliedtelesis.co.nz Signed-off-by: Greg Kroah-Hartman commit 0fb449c5749ce5a6238a53f69bf178405862473e Author: Martin Kaiser Date: Mon Feb 6 22:01:24 2023 +0100 staging: r8188eu: remove change_rfpwrstate Remove the change_rfpwrstate component in struct pwrctrl_priv. change_rfpwrstate is set to rf_off directly before each ips_enter call and then checked in ips_enter. This makes no sense. change_rfpwrstate might have been used to avoid conflicts between suspend and resume operations. If a driver has to do this at all, pwrpriv->ps_processing will do this job. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230206210124.150142-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 75c68a49cb48388eb4225ee97a53bea99238c88c Author: Martin Kaiser Date: Mon Feb 6 22:01:23 2023 +0100 staging: r8188eu: make ips_leave static The ips_leave function is used only in rtw_pwrctrl.c. We can make this function static. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230206210124.150142-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 815950ef52001c169b7fb32781163cf5dc62a53d Author: Martin Kaiser Date: Mon Feb 6 22:01:22 2023 +0100 staging: r8188eu: make ips_enter static The ips_enter function is used only in rtw_pwrctrl.c. We can make this function static. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230206210124.150142-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 64e8bbbc08b00c2207ac536f420f740ac3fb324e Author: Martin Kaiser Date: Mon Feb 6 21:18:00 2023 +0100 staging: r8188eu: remove intf_stop pointer Remove the intf_stop pointer that points to a media-specific stop function. The r8188eu driver supports only usb. For usb drivers, intf_stop points to usb_intf_stop, which is only two lines long. We can remove intf_stop and usb_intf_stop and call the two cancel functions directly. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230206201800.139195-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit da61c45f4804707768545a7bfc227b3e580fcb09 Author: Martin Kaiser Date: Mon Feb 6 21:17:59 2023 +0100 staging: r8188eu: handle rtl8188eu_inirp_init errors The rtl8188eu_inirp_init returns 0 for success or a negative error code. Handle this return value in the two places where rtl8188eu_inirp_init is called. Suggested-by: Pavel Skripkin Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230206201800.139195-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 49c41602a37b5fcad1203270eb95541e773bba0b Author: Martin Kaiser Date: Mon Feb 6 21:17:58 2023 +0100 staging: r8188eu: remove intf_start pointer Remove the intf_start pointer that points to a media-specific start function (pci, usb, sdio, ...). The r8188eu driver supports only usb. We could call usb_intf_start directly instead of going through the function pointer. usb_intf_start is just a call to rtl8188eu_inirp_init so we can directly replace the intf_start pointer with rtl8188eu_inirp_init. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230206201800.139195-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit a0b3a1c269d32a0d96b50de4b2a301add847b3cf Author: Martin Kaiser Date: Mon Feb 6 21:17:57 2023 +0100 staging: r8188eu: use standard error codes in rtl8188eu_inirp_init Replace the driver-specific _SUCCESS and _FAIL error codes in rtl8188eu_inirp_init. Return 0 for success or a negative error code as we do elsewhere in the kernel. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230206201800.139195-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 972b28a485a31e683050a00e1999d49d9bb8b822 Author: Martin Kaiser Date: Mon Feb 6 21:17:56 2023 +0100 staging: r8188eu: use standard error codes in rtw_read_port Replace the driver-specific _SUCCESS and _FAIL error codes in rtw_read_port. Return 0 for success or a negative error code as we do elsewhere in the kernel. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230206201800.139195-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit ca0e0d84aecaa279f9c05bd5852c9958790c8233 Author: Martin Kaiser Date: Mon Feb 6 21:17:55 2023 +0100 staging: r8188eu: pass a struct recv_buf to rtw_read_port The rtw_read_port function needs a struct recv_buf for preparing the usb transfer. Replace its u8 *rmem parameter with a struct recv_buf pointer to avoid casts in the caller and in rtw_read_port. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230206201800.139195-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 15ea59a0e9bf0dce546b6fcab5b00af8b35b870d Author: Eddy Tao Date: Sun Feb 5 09:35:37 2023 +0800 net: openvswitch: reduce cpu_used_mask memory Use actual CPU number instead of hardcoded value to decide the size of 'cpu_used_mask' in 'struct sw_flow'. Below is the reason. 'struct cpumask cpu_used_mask' is embedded in struct sw_flow. Its size is hardcoded to CONFIG_NR_CPUS bits, which can be 8192 by default, it costs memory and slows down ovs_flow_alloc. To address this: Redefine cpu_used_mask to pointer. Append cpumask_size() bytes after 'stat' to hold cpumask. Initialization cpu_used_mask right after stats_last_writer. APIs like cpumask_next and cpumask_set_cpu never access bits beyond cpu count, cpumask_size() bytes of memory is enough. Signed-off-by: Eddy Tao Acked-by: Eelco Chaudron Link: https://lore.kernel.org/r/OS3P286MB229570CCED618B20355D227AF5D59@OS3P286MB2295.JPNP286.PROD.OUTLOOK.COM Signed-off-by: Jakub Kicinski commit bbe641866318b2693e2778862e3b8ed6ccd0843b Author: Arnd Bergmann Date: Fri Feb 3 13:15:36 2023 +0100 amd-xgbe: fix mismatched prototype The forward declaration was introduced with a prototype that does not match the function definition: drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c:2166:13: error: conflicting types for 'xgbe_phy_perform_ratechange' due to enum/integer mismatch; have 'void(struct xgbe_prv_data *, enum xgbe_mb_cmd, enum xgbe_mb_subcmd)' [-Werror=enum-int-mismatch] 2166 | static void xgbe_phy_perform_ratechange(struct xgbe_prv_data *pdata, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c:391:13: note: previous declaration of 'xgbe_phy_perform_ratechange' with type 'void(struct xgbe_prv_data *, unsigned int, unsigned int)' 391 | static void xgbe_phy_perform_ratechange(struct xgbe_prv_data *pdata, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Ideally there should not be any forward declarations here, which would make it easier to show that there is no unbounded recursion. I tried fixing this but could not figure out how to avoid the recursive call. As a hotfix, address only the broken prototype to fix the build problem instead. Fixes: 4f3b20bfbb75 ("amd-xgbe: add support for rx-adaptation") Signed-off-by: Arnd Bergmann Reviewed-by: Simon Horman Acked-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20230203121553.2871598-1-arnd@kernel.org Signed-off-by: Jakub Kicinski commit b1ca2f1b04b8e89629c3c37430213267fd56c956 Author: Colin Foster Date: Sat Feb 4 10:20:56 2023 -0800 net: mscc: ocelot: un-export unused regmap symbols There are no external users of the vsc7514_*_regmap[] symbols or vsc7514_vcap_* functions. They were exported in commit 32ecd22ba60b ("net: mscc: ocelot: split register definitions to a separate file") with the intention of being used, but the actual structure used in commit 2efaca411c96 ("net: mscc: ocelot: expose vsc7514_regmap definition") ended up being all that was needed. Bury these unnecessary symbols. Signed-off-by: Colin Foster Suggested-by: Vladimir Oltean Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20230204182056.25502-1-colin.foster@in-advantage.com Signed-off-by: Jakub Kicinski commit 9ac543c06fd3b657b6f6aec6c5bb00c514c2e367 Merge: c21adf256f8dc 3034322113243 Author: Jakub Kicinski Date: Mon Feb 6 22:24:33 2023 -0800 Merge branch 'aux-bus-v11' of https://github.com/ajitkhaparde1/linux Ajit Khaparde says: ==================== bnxt: Add Auxiliary driver support Add auxiliary device driver for Broadcom devices. The bnxt_en driver will register and initialize an aux device if RDMA is enabled in the underlying device. The bnxt_re driver will then probe and initialize the RoCE interfaces with the infiniband stack. We got rid of the bnxt_en_ops which the bnxt_re driver used to communicate with bnxt_en. Similarly We have tried to clean up most of the bnxt_ulp_ops. In most of the cases we used the functions and entry points provided by the auxiliary bus driver framework. And now these are the minimal functions needed to support the functionality. We will try to work on getting rid of the remaining if we find any other viable option in future. * 'aux-bus-v11' of https://github.com/ajitkhaparde1/linux: bnxt_en: Remove runtime interrupt vector allocation RDMA/bnxt_re: Remove the sriov config callback bnxt_en: Remove struct bnxt access from RoCE driver bnxt_en: Use auxiliary bus calls over proprietary calls bnxt_en: Use direct API instead of indirection bnxt_en: Remove usage of ulp_id RDMA/bnxt_re: Use auxiliary driver interface bnxt_en: Add auxiliary driver support ==================== Link: https://lore.kernel.org/r/20230202033809.3989-1-ajit.khaparde@broadcom.com Signed-off-by: Jakub Kicinski commit 496c917b0989a7a20f9804de14ab2b3cbd6747a1 Author: Yu Zhang Date: Wed Nov 9 15:54:13 2022 +0800 KVM: nVMX: Simplify the setting of SECONDARY_EXEC_ENABLE_VMFUNC for nested. Values of base settings for nested proc-based VM-Execution control MSR come from the ones for non-nested. And for SECONDARY_EXEC_ENABLE_VMFUNC flag, KVM currently a) first mask off it from vmcs_conf->cpu_based_2nd_exec_ctrl; b) then check it against the same source; c) and reset it again if host has it. So just simplify this, by not masking off SECONDARY_EXEC_ENABLE_VMFUNC in the first place. No functional change. Signed-off-by: Yu Zhang Link: https://lore.kernel.org/r/20221109075413.1405803-3-yu.c.zhang@linux.intel.com Signed-off-by: Sean Christopherson commit 41acdd41973548aec573381e1166b5a388708d5b Author: Yu Zhang Date: Wed Nov 9 15:54:12 2022 +0800 KVM: VMX: Do not trap VMFUNC instructions for L1 guests. Explicitly disable VMFUNC in vmcs01 to document that KVM doesn't support any VM-Functions for L1. WARN in the dedicated VMFUNC handler if an exit occurs while L1 is active, but keep the existing handlers as fallbacks to avoid killing the VM as an unexpected VMFUNC VM-Exit isn't fatal Signed-off-by: Yu Zhang Link: https://lore.kernel.org/r/20221109075413.1405803-2-yu.c.zhang@linux.intel.com [sean: don't kill the VM on an unexpected VMFUNC from L1, reword changelog] Signed-off-by: Sean Christopherson commit 0051293c533017e2a860e0a0a33517bc40240fff Author: Paul E. McKenney Date: Wed Feb 1 13:53:07 2023 -0800 clocksource: Enable TSC watchdog checking of HPET and PMTMR only when requested Unconditionally enabling TSC watchdog checking of the HPET and PMTMR clocksources can degrade latency and performance. Therefore, provide a new "watchdog" option to the tsc= boot parameter that opts into such checking. Note that tsc=watchdog is overridden by a tsc=nowatchdog regardless of their relative positions in the list of boot parameters. Reported-by: Thomas Gleixner Reported-by: Waiman Long Signed-off-by: Paul E. McKenney Acked-by: Waiman Long commit 8844f0aa8dc42f54dc278c8d4ecbf32e92f2d6f1 Author: Ondrej Zary Date: Sat Feb 4 21:55:27 2023 +0100 ata: pata_parport: Fix ida_alloc return value error check pi->dev.id is unsigned so error checking of ida_alloc return value does not work. Fix it. Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov Signed-off-by: Damien Le Moal commit 8306829bf845186ec8c470c771243016c30c3d74 Author: Colin Ian King Date: Mon Feb 6 09:22:29 2023 +0000 selftests/bpf: Fix spelling mistake "detecion" -> "detection" There is a spelling mistake in a literal string. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230206092229.46416-1-colin.i.king@gmail.com commit d1d7730ff8756c6db20ff82096b577d8cfbaf547 Author: Hao Xiang Date: Fri Feb 3 23:48:42 2023 +0000 libbpf: Correctly set the kernel code version in Debian kernel. In a previous commit, Ubuntu kernel code version is correctly set by retrieving the information from /proc/version_signature. commit<5b3d72987701d51bf31823b39db49d10970f5c2d> (libbpf: Improve LINUX_VERSION_CODE detection) The /proc/version_signature file doesn't present in at least the older versions of Debian distributions (eg, Debian 9, 10). The Debian kernel has a similar issue where the release information from uname() syscall doesn't give the kernel code version that matches what the kernel actually expects. Below is an example content from Debian 10. release: 4.19.0-23-amd64 version: #1 SMP Debian 4.19.269-1 (2022-12-20) x86_64 Debian reports incorrect kernel version in utsname::release returned by uname() syscall, which in older kernels (Debian 9, 10) leads to kprobe BPF programs failing to load due to the version check mismatch. Fortunately, the correct kernel code version presents in the utsname::version returned by uname() syscall in Debian kernels. This change adds another get kernel version function to handle Debian in addition to the previously added get kernel version function to handle Ubuntu. Some minor refactoring work is also done to make the code more readable. Signed-off-by: Hao Xiang Signed-off-by: Ho-Ren (Jack) Chuang Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230203234842.2933903-1-hao.xiang@bytedance.com commit 6de7f9c34358ce54819b9d3fd5e2da492c219d8a Author: Krzysztof Kozlowski Date: Mon Feb 6 16:07:44 2023 +0100 arm64: dts: qcom: sm8550: add GPR and LPASS pin controller Add the ADSP GPR (Generic Packet Router) and LPASS LPI (Low Power Audio SubSystem Low Power Island) pin controller nodes used as part of audio subsystem on SM8550. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio [bjorn: Shortened stream mask, per Konrad's request] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230206150744.513967-1-krzysztof.kozlowski@linaro.org commit 6bdab60d5cbd7996e371305433e943a82cde0d4c Author: Naman Jain Date: Fri Jan 27 09:42:00 2023 +0530 soc: qcom: socinfo: Add support for new field in revision 17 Add support for new field coming with socinfo structure under v17 to get hardware platform's oem variant id. This is to enable OEMs to have minor changes in the board, but to use the same platform subtype as the one supported by Qualcomm. The new field is to be used in platform overlay file. Default value is 0, reserved for Qualcomm platforms. Also, add debugfs support to read this field for a device. Signed-off-by: Naman Jain Reviewed-by: Mukesh Ojha Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230127041200.29094-1-quic_namajain@quicinc.com commit 64dc69f3f36a71a95bfed8054d49600a7872415e Author: devi priya Date: Fri Jan 13 20:33:05 2023 +0530 soc: qcom: smd-rpm: Add IPQ9574 compatible Adding compatible string to support RPM communication over SMD for IPQ9574 SoC Co-developed-by: Praveenkumar I Signed-off-by: Praveenkumar I Signed-off-by: devi priya Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113150310.29709-2-quic_devipriy@quicinc.com commit dcb4e7a57cbe8d85e4927f517ae28aab17596419 Author: Tom Rix Date: Mon Feb 6 05:58:31 2023 -0800 soc: qcom: pmic_glink: remove redundant calculation of svid gcc with W=1 reports drivers/soc/qcom/pmic_glink_altmode.c:223:13: error: variable ‘svid’ set but not used [-Werror=unused-but-set-variable] 223 | u16 svid; From reviewing the code, the setting of alt_port->svid does the same calculation. Both are not needed. For debuggablity, keep the setting of local svid. Signed-off-by: Tom Rix Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230206135831.1794583-1-trix@redhat.com commit acdbf5f9b2c492505145f6e50c65418521a547c4 Author: Stephen Boyd Date: Wed Jan 18 19:23:29 2023 -0800 soc: qcom: stats: Populate all subsystem debugfs files This driver relies on SMEM to populate items for each subsystem before the device probes. The items in SMEM that are being looked for are populated by the subsystems lazily, and therefore may not exist until the device has booted. For example, if I build this driver into the kernel on Trogdor Lazor and boot up, I don't see a 'modem' debugfs file populated, because the modem boots and populates the SMEM item after this driver probes. Always populate the files for the subsystems if they're in SMEM, and make the qcom_subsystem_sleep_stats_show() function return 0 if the SMEM items still isn't there. This way we can run a simple command like grep ^ /sys/kernel/debug/qcom_stats/* and collect the subsystem sleep stats without interspersed errors or missing details entirely because this driver probed first. Fixes: 1d7724690344 ("soc: qcom: Add Sleep stats driver") Cc: Matthias Kaehlcke Signed-off-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230119032329.2909383-1-swboyd@chromium.org commit 22b0e764c1b41ee75d7ee76287746a65727aa78a Author: Melody Olvera Date: Thu Jan 12 12:36:53 2023 -0800 dt-bindings: soc: qcom,rpmh-rsc: Update to allow for generic nodes Update the bindings to allow for generic regulator nodes instead of device-specific node names. Signed-off-by: Melody Olvera Reviewed-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230112203653.23139-1-quic_molvera@quicinc.com commit 9049453a56300b04164c78a8ae3fbd5c225483bc Author: Arnd Bergmann Date: Mon Feb 6 20:37:58 2023 +0100 soc: qcom: pmic_glink: add CONFIG_NET/CONFIG_OF dependencies QMI is a network protocol, so anything using requires CONFIG_NET to be enabled as well: WARNING: unmet direct dependencies detected for QCOM_QMI_HELPERS Depends on [n]: NET [=n] Selected by [m]: - QCOM_PDR_HELPERS [=m] arm-linux-gnueabi-ld: drivers/soc/qcom/qmi_interface.o: in function `qmi_send_new_lookup': qmi_interface.c:(.text+0xf0): undefined reference to `kernel_sendmsg' Add the dependency to both QCOM_PDR_HELPERS and QCOM_PMIC_GLINK to make it clearly what the dependency is when another PDR user is added. pmic_glink also needs CONFIG_OF: drivers/soc/qcom/pmic_glink_altmode.c: In function 'pmic_glink_altmode_probe': drivers/soc/qcom/pmic_glink_altmode.c:418:33: error: 'struct drm_bridge' has no member named 'of_node' Fixes: 58ef4ece1e41 ("soc: qcom: pmic_glink: Introduce base PMIC GLINK driver") Signed-off-by: Arnd Bergmann Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230206193804.191343-1-arnd@kernel.org commit cfd5bdf3e98e3d21d7f57ad0b76001aa1ab78d66 Merge: f7401f6bc7ae3 2f8ba037c4592 Author: Arnd Bergmann Date: Mon Feb 6 20:48:40 2023 +0100 Merge tag 'socfpga_dts_updates_for_v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/dt SoCFPGA dts updates for v6.3 - Align UART node with bindings - Add pinctrl properties for Stratix10/Agilex - Change address-cells to 2 to support 64-bit address for fpga region * tag 'socfpga_dts_updates_for_v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: arm64: dts: socfpga: change address-cells to support 64-bit addressing arm64: dts: stratix10: add i2c pins for pinctrl arm64: dts: add pinctrl-single property for Stratix10/Agilex ARM: dts: socfpga: align UART node name with bindings Link: https://lore.kernel.org/r/20230206162425.311593-1-dinguyen@kernel.org Signed-off-by: Arnd Bergmann commit d2365054781908bd0bd43b08dd471b40db14b6f4 Author: Mark Brown Date: Thu Feb 2 21:01:36 2023 +0000 KVM: selftests: Enable USERFAULTFD The page_fault_test KVM selftest requires userfaultfd but the config fragment for the KVM selftests does not enable it, meaning that those tests are skipped in CI systems that rely on appropriate settings in the config fragments except on S/390 which happens to have it in defconfig. Enable the option in the config fragment so that the tests get run. Signed-off-by: Mark Brown Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20230202-kvm-selftest-userfaultfd-v1-1-8186ac5a33a5@kernel.org Signed-off-by: Oliver Upton commit 41070a7027e9c4493791266fa38e59ded6aea7b4 Author: Daniel Scally Date: Mon Feb 6 15:11:31 2023 +0000 usb: gadget: uvc: Correct documentation formatting The documentation table added in a36afe780461 ("usb: gadget: uvc: Add new enable_interrupt_ep attribute") was incorrect, resulting in a new warning when compiling the documentation. Correct the formatting to resolve the warning. Fixes: a36afe780461 ("usb: gadget: uvc: Add new enable_interrupt_ep attribute") Reported-by: Stephen Rothwell Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230206151131.863960-1-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 1dc7e37bb0ec1c997fac82031332a38c7610352f Author: Arnd Bergmann Date: Mon Feb 6 13:43:56 2023 +0000 nvmem: stm32: fix OPTEE dependency The stm32 nvmem driver fails to link as built-in when OPTEE is a loadable module: aarch64-linux-ld: drivers/nvmem/stm32-bsec-optee-ta.o: in function `stm32_bsec: stm32-bsec-optee-ta.c:(.text+0xc8): undefined reference to `tee_client_open_session' aarch64-linux-ld: drivers/nvmem/stm32-bsec-optee-ta.o: in function `stm32_bsec: stm32-bsec-optee-ta.c:(.text+0x1fc): undefined reference to `tee_client_open_context' Change the CONFIG_NVMEM_STM32_ROMEM definition so it can only be built-in if OPTEE is either built-in or disabled, and make NVMEM_STM32_BSEC_OPTEE_TA a hidden symbol instead. Signed-off-by: Arnd Bergmann Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230206134356.839737-23-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 62d3cfd2a978313f08e31bce60308404d60eb50c Author: Robert Marko Date: Mon Feb 6 13:43:55 2023 +0000 dt-bindings: nvmem: qfprom: add IPQ8074 compatible Document IPQ8074 compatible for QFPROM, its compatible with the generic QFPROM fallback. Signed-off-by: Robert Marko Acked-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230206134356.839737-22-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit eb7dda20f42a9137e9ee53d5ed3b743d49338cb5 Author: Johan Hovold Date: Mon Feb 6 13:43:54 2023 +0000 nvmem: qcom-spmi-sdam: register at device init time There are currently no in-tree users of the Qualcomm SDAM nvmem driver and there is generally no point in registering a driver that can be built as a module at subsys init time. Register the driver at the normal device init time instead and let driver core sort out the probe order. Signed-off-by: Johan Hovold Reviewed-by: Bjorn Andersson Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230206134356.839737-21-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 3e5ac22aa564026e99defc3a8e02082521a5b231 Author: Randy Dunlap Date: Mon Feb 6 13:43:53 2023 +0000 nvmem: rave-sp-eeprm: fix kernel-doc bad line warning Convert an empty line to " *" to avoid a kernel-doc warning: drivers/nvmem/rave-sp-eeprom.c:48: warning: bad line: Signed-off-by: Randy Dunlap Cc: Srinivas Kandagatla Cc: Andrey Vostrikov Cc: Nikita Yushchenko Cc: Andrey Smirnov Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230206134356.839737-20-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit df2f34ef1d924125ffaf29dfdaf7cdbd3183c321 Author: Patrick Delaunay Date: Mon Feb 6 13:43:52 2023 +0000 nvmem: stm32: detect bsec pta presence for STM32MP15x On STM32MP15x SoC, the SMC backend is optional when OP-TEE is used; the PTA BSEC should be used as it is done on STM32MP13x platform, but the BSEC SMC can be also used: it is a legacy mode in OP-TEE, not recommended but used in previous OP-TEE firmware. The presence of OP-TEE is dynamically detected in STM32MP15x device tree and the supported NVMEM backend is dynamically detected: - PTA with stm32_bsec_pta_find - SMC with stm32_bsec_check With OP-TEE but without PTA and SMC detection, the probe is deferred for STM32MP15x devices. On STM32MP13x platform, only the PTA is supported with cfg->ta = true and this detection is skipped. Signed-off-by: Patrick Delaunay Reviewed-by: Etienne Carriere Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230206134356.839737-19-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 6a0bc3522e746025e2d9a63ab2cb5d7062c2d39c Author: Patrick Delaunay Date: Mon Feb 6 13:43:51 2023 +0000 nvmem: stm32: add OP-TEE support for STM32MP13x For boot with OP-TEE on STM32MP13, the communication with the secure world no more use STMicroelectronics SMC but communication with the STM32MP BSEC TA, for data access (read/write) or lock operation: - all the request are sent to OP-TEE trusted application, - for upper OTP with ECC protection and with word programming only each OTP are permanently locked when programmed to avoid ECC error on the second write operation Signed-off-by: Patrick Delaunay Reviewed-by: Etienne Carriere Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230206134356.839737-18-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 50014d659617dc58780a5d31ceb76c82779a9d8b Author: Michael Walle Date: Mon Feb 6 13:43:50 2023 +0000 nvmem: core: use nvmem_add_one_cell() in nvmem_add_cells_from_of() Convert nvmem_add_cells_from_of() to use the new nvmem_add_one_cell(). This will remove duplicate code and it will make it possible to add a hook to a nvmem layout in between, which can change fields before the cell is finally added. Signed-off-by: Michael Walle Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230206134356.839737-17-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2ded6830d376d5e7bf43d59f7f7fdf1a59abc676 Author: Michael Walle Date: Mon Feb 6 13:43:49 2023 +0000 nvmem: core: add nvmem_add_one_cell() Add a new function to add exactly one cell. This will be used by the nvmem layout drivers to add custom cells. In contrast to the nvmem_add_cells(), this has the advantage that we don't have to assemble a list of cells on runtime. Signed-off-by: Michael Walle Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230206134356.839737-16-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit cc5bdd323dde6494623f3ffe3a5b887fa21cd375 Author: Michael Walle Date: Mon Feb 6 13:43:48 2023 +0000 nvmem: core: drop the removal of the cells in nvmem_add_cells() If nvmem_add_cells() fails, the whole nvmem_register() will fail and the cells will then be removed anyway. This is a preparation to introduce a nvmem_add_one_cell() which can then be used by nvmem_add_cells(). This is then the same to what nvmem_add_cells_from_table() and nvmem_add_cells_from_of() do. Signed-off-by: Michael Walle Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230206134356.839737-15-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit fbd03d27776c6121a483921601418e3c8f0ff37e Author: Michael Walle Date: Mon Feb 6 13:43:47 2023 +0000 nvmem: core: move struct nvmem_cell_info to nvmem-provider.h struct nvmem_cell_info is used to describe a cell. Thus this should really be in the nvmem-provider's header. There are two (unused) nvmem access methods which use the nvmem_cell_info to describe the cell to be accesses. One can argue, that they will create a cell before accessing, thus they are both a provider and a consumer. struct nvmem_cell_info will get used more and more by nvmem-providers, don't force them to also include the consumer header, although they are not. Signed-off-by: Michael Walle Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230206134356.839737-14-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 5d8e6e6c10a3d37486d263b16ddc15991a7e4a88 Author: Michael Walle Date: Mon Feb 6 13:43:46 2023 +0000 nvmem: core: add an index parameter to the cell Sometimes a cell can represend multiple values. For example, a base ethernet address stored in the NVMEM can be expanded into multiple discreet ones by adding an offset. For this use case, introduce an index parameter which is then used to distiguish between values. This parameter will then be passed to the post process hook which can then use it to create different values during reading. At the moment, there is only support for the device tree path. You can add the index to the phandle, e.g. &net { nvmem-cells = <&base_mac_address 2>; nvmem-cell-names = "mac-address"; }; &nvmem_provider { base_mac_address: base-mac-address@0 { #nvmem-cell-cells = <1>; reg = <0 6>; }; }; Signed-off-by: Michael Walle Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230206134356.839737-13-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit e2d8172043d2e50df19fcd59c11e5593de8188d7 Author: Michael Walle Date: Mon Feb 6 13:43:45 2023 +0000 of: property: add #nvmem-cell-cells property Bindings describe the new '#nvmem-cell-cells' property. Now that the arguments count property is optional, we just add this property to the nvmem-cells. Signed-off-by: Michael Walle Tested-by: Miquel Raynal Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230206134356.839737-12-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit ff24fed10ba414d19579e26e60b126fad2f2bb07 Author: Michael Walle Date: Mon Feb 6 13:43:44 2023 +0000 of: property: make #.*-cells optional for simple props Sometimes, future bindings for phandles will get additional arguments. Thus the target node of the phandle will need a new #.*-cells property. To be backwards compatible, this needs to be optional. Prepare the DEFINE_SIMPLE_PROPS() to handle the cells name as optional. Signed-off-by: Michael Walle Tested-by: Miquel Raynal Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230206134356.839737-11-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit c5d264d4b527c96ae8903376a4b195df47b05203 Author: Michael Walle Date: Mon Feb 6 13:43:43 2023 +0000 of: base: add of_parse_phandle_with_optional_args() Add a new variant of the of_parse_phandle_with_args() which treats the cells name as optional. If it's missing, it is assumed that the phandle has no arguments. Up until now, a nvmem node didn't have any arguments, so all the device trees haven't any '#*-cells' property. But there is a need for an additional argument for the phandle, for which we need a '#*-cells' property. Therefore, we need to support nvmem nodes with and without this property. Signed-off-by: Michael Walle Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230206134356.839737-10-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7390609b0121a1b982c5ecdfcd72dc328e5784ee Author: Michael Walle Date: Mon Feb 6 13:43:42 2023 +0000 net: add helper eth_addr_add() Add a helper to add an offset to a ethernet address. This comes in handy if you have a base ethernet address for multiple interfaces. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Acked-by: Jakub Kicinski Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230206134356.839737-9-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2e8dc541ae207349b51c65391be625ffe1f86e0c Author: Russell King (Oracle) Date: Mon Feb 6 13:43:41 2023 +0000 nvmem: core: remove spurious white space Remove a spurious white space in for the ida_alloc() call. Signed-off-by: Russell King (Oracle) Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230206134356.839737-8-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit e3d2a936fcb014160a840b96a132cb05b456c5cf Author: Konrad Dybcio Date: Mon Feb 6 13:43:40 2023 +0000 dt-bindings: nvmem: Add compatible for SM8250 Docuemnt the QFPROM on SM8250. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230206134356.839737-7-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 3644df5050c186b44dfdde52ae4dca31148f8ccc Author: Konrad Dybcio Date: Mon Feb 6 13:43:39 2023 +0000 dt-bindings: nvmem: Add compatible for SM8150 Docuemnt the QFPROM on SM8150. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230206134356.839737-6-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit a1e63b63763d7f272173026d79d941ca53a64152 Author: Richard Acayan Date: Mon Feb 6 13:43:38 2023 +0000 dt-bindings: nvmem: qfprom: add sdm670 compatible There is some configuration in SDM670's QFPROM. Add the compatible for it. Signed-off-by: Richard Acayan Reviewed-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230206134356.839737-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 226198d001df163b05fc4f3052f68c2a0348fb2f Author: Marijn Suijten Date: Mon Feb 6 13:43:37 2023 +0000 dt-bindings: nvmem: Add compatible for MSM8976 Document generic QFPROM compatibility on MSM8976. Signed-off-by: Marijn Suijten Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230206134356.839737-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 31ce495a4ceadb9f396af56214acee7ed283d157 Author: AngeloGioacchino Del Regno Date: Mon Feb 6 13:43:36 2023 +0000 dt-bindings: nvmem: Fix qcom,qfprom compatibles enum ordering Move qcom,msm8974-qfprom after qcom,msm8916-qfprom to respect alphabetical ordering. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230206134356.839737-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit c9dde85d25d3d59068bdb1e8cc5a4b7be5530bd4 Author: Samuel Holland Date: Mon Feb 6 13:43:35 2023 +0000 nvmem: sunxi_sid: Drop the workaround on A64 Now that the SRAM readout code is fixed by using 32-bit accesses, it always returns the same values as register readout, so the A64 variant no longer needs the workaround. This makes the D1 variant structure redundant, so remove it. Signed-off-by: Samuel Holland Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230206134356.839737-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 34266f904abd45731bdade2e92d0536c092ee9bc Author: Athira Rajeev Date: Thu Jan 5 17:47:42 2023 +0530 perf test bpf: Skip test if kernel-debuginfo is not present Perf BPF filter test fails in environment where "kernel-debuginfo" is not installed. Test failure logs: <<>> 42: BPF filter : 42.1: Basic BPF filtering : Ok 42.2: BPF pinning : Ok 42.3: BPF prologue generation : FAILED! <<>> Enabling verbose option provided debug logs, which says debuginfo needs to be installed. Snippet of verbose logs: <<>> 42.3: BPF prologue generation : --- start --- test child forked, pid 28218 <<>> Rebuild with CONFIG_DEBUG_INFO=y, or install an appropriate debuginfo package. bpf_probe: failed to convert perf probe events Failed to add events selected by BPF test child finished with -1 ---- end ---- BPF filter subtest 3: FAILED! <<>> Here the subtest "BPF prologue generation" failed and logs shows debuginfo is needed. After installing kernel-debuginfo package, testcase passes. The "BPF prologue generation" subtest failed because, the do_test() returns TEST_FAIL without checking the error type returned by parse_events_load_bpf_obj(). parse_events_load_bpf_obj() can also return error of type -ENODATA incase kernel-debuginfo package is not installed. Fix this by adding check for -ENODATA error. Test result after the patch changes: Test failure logs: <<>> 42: BPF filter : 42.1: Basic BPF filtering : Ok 42.2: BPF pinning : Ok 42.3: BPF prologue generation : Skip (clang/debuginfo isn't installed or environment missing BPF support) <<>> Fixes: ba1fae431e74bb42 ("perf test: Add 'perf test BPF'") Signed-off-by: Athira Rajeev Cc: Andi Kleen Cc: Disha Goel Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kajol Jain Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Nageswara R Sastry Cc: Namhyung Kim Cc: Wang Nan Cc: linuxppc-dev@lists.ozlabs.org Link: http://lore.kernel.org/linux-perf-users/Y7bIk77mdE4j8Jyi@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3b65010018ec9a228416c4ccda193af6e8d74676 Merge: d38e781ea0354 7bf0008a52930 Author: Greg Kroah-Hartman Date: Mon Feb 6 19:00:54 2023 +0100 Merge tag 'icc-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next Georgi writes: interconnect changes for 6.3 Here are the interconnect changes for the 6.3-rc1 merge window with the significant part being new drivers. Driver changes: - New driver for Qualcomm SM8550 - New driver for Qualcomm QDU1000/QRU1000 - New driver for Qualcomm SDM670 - New driver for Qualcomm SA8775P - Drop the IP0 interconnects and migrate them to RPMh clocks instead - Misc improvements in the DT schema for some existing drivers Signed-off-by: Georgi Djakov * tag 'icc-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc: (25 commits) dt-bindings: interconnect: samsung,exynos-bus: allow opp-table dt-bindings: interconnect: qcom,sa8775p-rpmh: fix a typo dt-bindings: interconnect: Exclude all non msm8939 from snoc-mm interconnect: qcom: add a driver for sa8775p dt-bindings: interconnect: qcom: document the interconnects for sa8775p interconnect: qcom: add sdm670 interconnects dt-bindings: interconnect: add sdm670 interconnects dt-bindings: interconnect: OSM L3: Add SM6350 OSM L3 compatible dt-bindings: interconnect: qcom-bwmon: document SM8550 compatibles dt-bindings: interconnect: split SM8450 to own schema dt-bindings: interconnect: split SC8280XP to own schema dt-bindings: interconnect: split SC7280 to own schema dt-bindings: interconnect: qcom: drop IPA_CORE related defines dt-bindings: interconnect: qcom: Remove ipa-virt compatibles interconnect: qcom: sc8280xp: Drop IP0 interconnects interconnect: qcom: sc8180x: Drop IP0 interconnects interconnect: qcom: sm8250: Drop IP0 interconnects interconnect: qcom: sm8150: Drop IP0 interconnects interconnect: move ignore_list out of of_count_icc_providers() interconnect: qcom: sc7180: drop IP0 remnants ... commit 67ef66bad42b32237a0ddc6bdb5cc2653c354fec Author: Athira Rajeev Date: Thu Jan 5 17:47:41 2023 +0530 perf probe: Update the exit error codes in function try_to_find_probe_trace_event try_to_find_probe_trace_events() uses return error code as ENOENT in two places. First place is after open_debuginfo() when opening debuginfo fails and secondly, after when not finding the probe point. This function is invoked during BPF load and there are other exit points in this code path which returns ENOENT. This makes it difficult to understand the exact reason for exit. Patches changes the exit code from ENOENT to: - ENODATA when it fails to find debuginfo - ENODEV when it fails to find probe point Signed-off-by: Athira Rajeev Cc: Andi Kleen Cc: Disha Goel Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kajol Jain Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Nageswara R Sastry Cc: Namhyung Kim Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230105121742.92249-1-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 2d11eae42d52a131f06061015e49dc0f085c5bfc Author: Hans de Goede Date: Thu Feb 2 13:44:49 2023 +0100 ACPI: video: Fix Lenovo Ideapad Z570 DMI match Multiple Ideapad Z570 variants need acpi_backlight=native to force native use on these pre Windows 8 machines since acpi_video backlight control does not work here. The original DMI quirk matches on a product_name of "102434U" but other variants may have different product_name-s such as e.g. "1024D9U". Move to checking product_version instead as is more or less standard for Lenovo DMI quirks for similar reasons. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 4e846311a9be53999d9c52bba4ce76939d2b0e64 Author: Kan Liang Date: Mon Feb 6 08:21:00 2023 -0800 perf script: Fix missing Retire Latency fields option documentation The 'perf script' documentation is missing the fields option for Retire Latency. Add it. Signed-off-by: Kan Liang Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20230206162100.3329395-2-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 957ed139d760fb5257e5a587f78a339e23d9b741 Author: Kan Liang Date: Mon Feb 6 08:20:59 2023 -0800 perf event x86: Add retire_lat when synthesizing PERF_SAMPLE_WEIGHT_STRUCT In arch_perf_synthesize_sample_weight(), the retire_lat was mistakenly missed, add it. perf test -v "x86 sample parsing" 74: x86 Sample parsing : --- start --- test child forked, pid 72526 Samples differ at 'retire_lat' parsing failed for sample_type 0x1000000 test child finished with -1 ---- end ---- x86 Sample parsing: FAILED! Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Kan Liang Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20230206162100.3329395-1-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit e0645311e1abc6120d2cf18e7611e1c272fdcc88 Author: Jacob Keller Date: Wed Jan 18 17:16:53 2023 -0800 ice: remove unnecessary virtchnl_ether_addr struct use The dev_lan_addr and hw_lan_addr members of ice_vf are used only to store the MAC address for the VF. They are defined using virtchnl_ether_addr, but only the .addr sub-member is actually used. Drop the use of virtchnl_ether_addr and just use a u8 array of length [ETH_ALEN]. Signed-off-by: Jacob Keller Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit 537dfe06accad68123fe780ce4f883549a73db37 Author: Jacob Keller Date: Wed Jan 18 17:16:52 2023 -0800 ice: introduce .irq_close VF operation The Scalable IOV implementation will require notifying the VDCM driver when an IRQ must be closed. This allows the VDCM to handle releasing stale IRQ context values and properly reconfigure. To handle this, introduce a new optional .irq_close callback to the VF operations structure. This will be implemented by Scalable IOV to handle the shutdown of the IRQ context. Since the SR-IOV implementation does not need this, we must check that its non-NULL before calling it. Signed-off-by: Jacob Keller Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit fa4a15c85c849e92257da6dbffeb1e3a6399fd7b Author: Jacob Keller Date: Wed Jan 18 17:16:51 2023 -0800 ice: introduce clear_reset_state operation When hardware is reset, the VF relies on the VFGEN_RSTAT register to detect when the VF is finished resetting. This is a tri-state register where 0 indicates a reset is in progress, 1 indicates the hardware is done resetting, and 2 indicates that the software is done resetting. Currently the PF driver relies on the device hardware resetting VFGEN_RSTAT when a global reset occurs. This works ok, but it does mean that the VF might not immediately notice a reset when the driver first detects that the global reset is occurring. This is also problematic for Scalable IOV, because there is no read/write equivalent VFGEN_RSTAT register for the Scalable VSI type. Instead, the Scalable IOV VFs will need to emulate this register. To support this, introduce a new VF operation, clear_reset_state, which is called when the PF driver first detects a global reset. The Single Root IOV implementation can just write to VFGEN_RSTAT to ensure it's cleared immediately, without waiting for the actual hardware reset to begin. The Scalable IOV implementation will use this as part of its tracking of the reset status to allow properly reporting the emulated VFGEN_RSTAT to the VF driver. Signed-off-by: Jacob Keller Reviewed-by: Paul Menzel Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit 5531bb851fba2a93ed0c1de1873ea563d8c1da76 Author: Jacob Keller Date: Wed Jan 18 17:16:50 2023 -0800 ice: convert vf_ops .vsi_rebuild to .create_vsi The .vsi_rebuild function exists for ice_reset_vf. It is used to release and re-create the VSI during a single-VF reset. This function is only called when we need to re-create the VSI, and not when rebuilding an existing VSI. This makes the single-VF reset process different from the process used to restore functionality after a hardware reset such as the PF reset or EMP reset. When we add support for Scalable IOV VFs, the implementation will be very similar. The primary difference will be in the fact that each VF type uses a different underlying VSI type in hardware. Move the common functionality into a new ice_vf_recreate VSI function. This will allow the two IOV paths to share this functionality. Rework the .vsi_rebuild vf_op into .create_vsi, only performing the task of creating a new VSI. This creates a nice dichotomy between the ice_vf_rebuild_vsi and ice_vf_recreate_vsi, and should make it more clear why the two flows atre distinct. Signed-off-by: Jacob Keller Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit b1b5694235efcc0b7d724961e8300c9a8cae993d Author: Jacob Keller Date: Wed Jan 18 17:16:49 2023 -0800 ice: introduce ice_vf_init_host_cfg function Introduce a new generic helper ice_vf_init_host_cfg which performs common host configuration initialization tasks that will need to be done for both Single Root IOV and the new Scalable IOV implementation. Signed-off-by: Jacob Keller Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit b5dcff1fd57ac0b67229bc008223b6a67176940a Author: Jacob Keller Date: Wed Jan 18 17:16:48 2023 -0800 ice: add a function to initialize vf entry Some of the initialization code for Single Root IOV VFs will need to be reused when we introduce Scalable IOV. Pull this code out into a new ice_initialize_vf_entry helper function. Co-developed-by: Harshitha Ramamurthy Signed-off-by: Harshitha Ramamurthy Signed-off-by: Jacob Keller Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit aeead3d04fa050a94ed314cc5de97125a957dc9f Author: Jacob Keller Date: Wed Jan 18 17:16:47 2023 -0800 ice: Pull common tasks into ice_vf_post_vsi_rebuild The Single Root IOV implementation of .post_vsi_rebuild performs some tasks that will ultimately need to be shared with the Scalable IOV implementation such as rebuilding the host configuration. Refactor by introducing a new wrapper function, ice_vf_post_vsi_rebuild which performs the tasks that will be shared between SR-IOV and Scalable IOV. Move the ice_vf_rebuild_host_cfg and ice_vf_set_initialized calls into this wrapper. Then call the implementation specific post_vsi_rebuild handler afterwards. This ensures that we will properly re-initialize filters and expected settings for both SR-IOV and Scalable IOV. Signed-off-by: Jacob Keller Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit 1efee0734b98fd3242508e942b4d11bdcc83e916 Author: Jacob Keller Date: Wed Jan 18 17:16:46 2023 -0800 ice: move ice_vf_vsi_release into ice_vf_lib.c The ice_vf_vsi_release function will be used in a future change to refactor the .vsi_rebuild function. Move this over to ice_vf_lib.c so that it can be used there. Signed-off-by: Jacob Keller Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit e15881970692f9e65175e9dcb1f4d2dba0672861 Author: Jacob Keller Date: Wed Jan 18 17:16:44 2023 -0800 ice: move vsi_type assignment from ice_vsi_alloc to ice_vsi_cfg The ice_vsi_alloc and ice_vsi_cfg functions are used together to allocate and configure a new VSI, called as part of the ice_vsi_setup function. In the future with the addition of the subfunction code the ice driver will want to be able to allocate a VSI while delaying the configuration to a later point of the port activation. Currently this requires that the port code know what type of VSI should be allocated. This is required because ice_vsi_alloc assigns the VSI type. Refactor the ice_vsi_alloc and ice_vsi_cfg functions so that VSI type assignment isn't done until the configuration stage. This will allow the devlink port addition logic to reserve a VSI as early as possible before the type of the port is known. In this way, the port add can fail in the event that all hardware VSI resources are exhausted. Since the ice_vsi_cfg function already takes the ice_vsi_cfg_params structure, this is relatively straight forward. Signed-off-by: Jacob Keller Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 5e509ab237f175a0985e9ca7d696fbdc62434e56 Author: Jacob Keller Date: Wed Jan 18 17:16:43 2023 -0800 ice: refactor VSI setup to use parameter structure The ice_vsi_setup function, ice_vsi_alloc, and ice_vsi_cfg functions have grown a large number of parameters. These parameters are used to initialize a new VSI, as well as re-configure an existing VSI Any time we want to add a new parameter to this function chain, even if it will usually be unset, we have to change many call sites due to changing the function signature. A future change is going to refactor ice_vsi_alloc and ice_vsi_cfg to move the VSI configuration and initialization all into ice_vsi_cfg. Before this, refactor the VSI setup flow to use a new ice_vsi_cfg_params structure. This will contain the configuration (mainly pointers) used to initialize a VSI. Pass this from ice_vsi_setup into the related functions such as ice_vsi_alloc, ice_vsi_cfg, and ice_vsi_cfg_def. Introduce a helper, ice_vsi_to_params to convert an existing VSI to the parameters used to initialize it. This will aid in the flows where we rebuild an existing VSI. Since we also pass the ICE_VSI_FLAG_INIT to more functions which do not need (or cannot yet have) the VSI parameters, lets make this clear by renaming the function parameter to vsi_flags and using a u32 instead of a signed integer. The name vsi_flags also makes it clear that we may extend the flags in the future. This change will make it easier to refactor the setup flow in the future, and will reduce the complexity required to add a new parameter for configuration in the future. Signed-off-by: Jacob Keller Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 157acda5b1faf896cbe46e8860be02baac2b7f83 Author: Jacob Keller Date: Wed Jan 18 17:16:42 2023 -0800 ice: drop unnecessary VF parameter from several VSI functions The vsi->vf pointer gets assigned early on during ice_vsi_alloc. Several functions currently take a VF pointer, but they can just use the existing vsi->vf pointer as needed. Modify these functions to drop the unnecessary VF parameter. Note that ice_vsi_cfg is not changed as a following change will refactor so that the VF pointer is assigned during ice_vsi_cfg rather than ice_vsi_alloc. Signed-off-by: Jacob Keller Reviewed-by: Michal Swiatkowski Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit a2ca73eae33f4a15304b7f4a71246bb66ded0b80 Author: Jacob Keller Date: Wed Jan 18 17:16:41 2023 -0800 ice: fix function comment referring to ice_vsi_alloc Since commit 1d2e32275de7 ("ice: split ice_vsi_setup into smaller functions") ice_vsi_alloc has not been responsible for all of the behavior implied by the comment for ice_vsi_setup_vector_base. Fix the comment to refer to the new function ice_vsi_alloc_def(). Signed-off-by: Jacob Keller Reviewed-by: Michal Swiatkowski Signed-off-by: Tony Nguyen commit 772dec645934d7788e333cc05f19ac8c1b78f517 Author: Brett Creeley Date: Thu Dec 1 12:58:59 2022 +0100 ice: Add more usage of existing function ice_get_vf_vsi(vf) Extend the usage of function ice_get_vf_vsi(vf) in multiple places instead of VF's VSI by using a long string of dereferences (i.e. vf->pf->vsi[vf->lan_vsi_idx]). Signed-off-by: Brett Creeley Signed-off-by: Kalyan Kodamagula Tested-by: Piotr Tyda Signed-off-by: Tony Nguyen commit df2d85d0b0b5b1533d6db9079f0a0a7b73ef6a9e Merge: 5f61c6931b183 9c1a7bfc29931 Author: Marc Zyngier Date: Mon Feb 6 17:26:11 2023 +0000 Merge branch irq/misc-6.3 into irq/irqchip-next * irq/misc-6.3: : . : - Cleanup Kconfig dependencies for LS_SCFG_MSI : : - Improve save/restore for the loongson-liointc irqchip : : - Correctly initialise status and enable registers for one : of the ASpeed controllers : . irqchip/ls-scfg-msi: Simplify Kconfig dependencies irqchip/loongson-liointc: Save/restore int_edge/int_pol registers during S3/S4 irqchip/aspeed-scu-ic: Correctly initialise status and enable registers Signed-off-by: Marc Zyngier commit 5f61c6931b18369798e561aa378d5ea6236bcdef Merge: 6360ec8f13f6a 02298b7bae129 Author: Marc Zyngier Date: Mon Feb 6 17:26:11 2023 +0000 Merge branch irq/refcount into irq/irqchip-next * irq/refcount: : . : Set of OF refcount fixes from Miaoqian Lin, adding an : of_node_put() call after of_irq_find_parent() calls. : . irqchip/ti-sci: Fix refcount leak in ti_sci_intr_irq_domain_probe irqchip/irq-mvebu-gicp: Fix refcount leak in mvebu_gicp_probe irqchip/alpine-msi: Fix refcount leak in alpine_msix_init_domains irqchip: Fix refcount leak in platform_irqchip_probe Signed-off-by: Marc Zyngier commit 6360ec8f13f6aa1a1a38dca7ec6b9be580fbfc21 Merge: 5dc4c995db9eb 3d812a0f27baa Author: Marc Zyngier Date: Mon Feb 6 17:26:11 2023 +0000 Merge branch irq/ipi-mux into irq/irqchip-next * irq/ipi-mux: : . : Extract the IPI muxing facility from the Apple AIC driver and : move it over to core code. The riscv irqchip code will eventually : make use of this. : . genirq/ipi-mux: Use irq_domain_alloc_irqs() irqchip/apple-aic: Move over to core ipi-mux genirq: Add mechanism to multiplex a single HW IPI Signed-off-by: Marc Zyngier commit 3d812a0f27baa2d094f2c18298d48b012878dc0b Author: Marc Zyngier Date: Mon Feb 6 17:21:15 2023 +0000 genirq/ipi-mux: Use irq_domain_alloc_irqs() Using __irq_domain_alloc_irqs() is an unnecessary complexity. Use irq_domain_alloc_irqs(), which is simpler and makes the code more readable. Reported-by: Stephen Rothwell Signed-off-by: Marc Zyngier commit f5cd71cfdb5c850d93d258c43c379f144acaae35 Author: Philippe Valembois Date: Wed Jan 25 22:15:10 2023 +0100 HID: evision: Add preliminary support for EVision keyboards For now only supports one model and only filters out bogus reports sent when the keyboard has been configured through hidraw. Without this, as events are not released, soft repeat floods userspace with unknown key events. Signed-off-by: Philippe Valembois Link: https://lore.kernel.org/r/20230125211511.12266-1-lephilousophe@gmail.com Signed-off-by: Benjamin Tissoires commit f9b8556d5799b612404e19b21dd7624d551f71df Author: Johan Jonker Date: Thu Dec 22 15:28:53 2022 +0100 dt-bindings: usb: convert fcs,fusb302.txt to yaml Convert fcs,fusb302.txt to yaml. Changed: Add vbus-supply property Signed-off-by: Johan Jonker Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/0336a3c4-4a43-c983-11d7-e2ae16187fc8@gmail.com Signed-off-by: Rob Herring commit ec340077a8477020a347ee2e7cd7415efeec3898 Author: Rob Herring Date: Fri Feb 3 09:13:46 2023 -0600 scripts/dtc: Update to upstream version v1.6.1-66-gabbd523bae6e This adds the following commits from upstream: abbd523bae6e pylibfdt: Work-around SWIG limitations with flexible arrays a41509bea3e7 libfdt: Replace deprecated 0-length arrays with proper flexible arrays 2cd89f862cdb dtc: Warning rather than error on possible truncation of cell values Reviewed-by: Kees Cook Link: https://lore.kernel.org/all/20230203172430.474431-1-robh@kernel.org/ Signed-off-by: Rob Herring commit 20f6d4f2a474fc2dc502358dcee3c9b18304ec1e Author: Thomas Weißschuh Date: Sat Feb 4 05:47:03 2023 +0000 of: make of_node_ktype 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/20230204-kobj_type-of-v1-1-5910c8ecb7a3@weissschuh.net Signed-off-by: Rob Herring commit f412eef03938d3a40d4f6f5a79d0f98ed89b596d Author: Marcos Paulo de Souza Date: Fri Feb 3 09:22:22 2023 -0300 Documentation: livepatch: module-elf-format: Remove local klp_modinfo definition Refer to klp_modinfo declaration using kdoc. Signed-off-by: Marcos Paulo de Souza Signed-off-by: Luis Chamberlain commit eca0edaf6caa66b6eb26277a7dce5d7296cedfca Author: Marcos Paulo de Souza Date: Fri Feb 3 09:22:21 2023 -0300 module.h: Document klp_modinfo struct using kdoc Previously the documentation existed only in Documentation/livepatch directory. Signed-off-by: Marcos Paulo de Souza Signed-off-by: Luis Chamberlain commit 9442d05bba6c12749fdc4039eddcf801398ec82b Author: Marc Zyngier Date: Mon Feb 6 09:24:40 2023 +0000 arm64/sme: Fix __finalise_el2 SMEver check When checking for ID_AA64SMFR0_EL1.SMEver, __check_override assumes that the ID_AA64SMFR0_EL1 value is in x1, and the intent of the code is to reuse value read a few lines above. However, as the comment says at the beginning of the macro, x1 will be clobbered, and the checks always fails. The easiest fix is just to reload the id register before checking it. Fixes: f122576f3533 ("arm64/sme: Enable host kernel to access ZT0") Signed-off-by: Marc Zyngier Reviewed-by: Mark Brown Signed-off-by: Catalin Marinas commit 83e8864fee26f63a7435e941b7c36a20fd6fe93e Author: Greg Kroah-Hartman Date: Thu Feb 2 15:19:56 2023 +0100 trace/blktrace: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Cc: Jens Axboe Cc: Steven Rostedt Cc: Masami Hiramatsu Cc: linux-block@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-trace-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20230202141956.2299521-1-gregkh@linuxfoundation.org Signed-off-by: Jens Axboe commit 01542f651a9f58a9b176c3d3dc3eefbacee53b78 Author: Kemeng Shi Date: Wed Jan 18 17:37:26 2023 +0800 blk-mq: correct stale comment of .get_budget Commit 88022d7201e96 ("blk-mq: don't handle failure in .get_budget") remove BLK_STS_RESOURCE return value and we only check if we can get the budget from .get_budget() now. Correct stale comment that ".get_budget() returns BLK_STS_NO_RESOURCE" to ".get_budget() fails to get the budget". Fixes: 88022d7201e9 ("blk-mq: don't handle failure in .get_budget") Signed-off-by: Kemeng Shi Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 27e8b2bb149aff7b7b673b46c7206f4f37c30093 Author: Kemeng Shi Date: Wed Jan 18 17:37:25 2023 +0800 blk-mq: use switch/case to improve readability in blk_mq_try_issue_list_directly Use switch/case handle error as other function do to improve readability in blk_mq_try_issue_list_directly. Signed-off-by: Kemeng Shi Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit f1ce99f7098d9e7a322caf48eb8af05be7999827 Author: Kemeng Shi Date: Wed Jan 18 17:37:24 2023 +0800 blk-mq: remove set of bd->last when get driver tag for next request fails Commit 113285b473824 ("blk-mq: ensure that bd->last is always set correctly") will set last if we failed to get driver tag for next request to avoid flush miss as we break the list walk and will not send the last request in the list which will be sent with last set normally. This code seems stale now becase the flush introduced is always redundant as: For case tag is really out, we will send a extra flush if we find list is not empty after list walk. For case some tag is freed before retry in blk_mq_prep_dispatch_rq for next, then we can get a tag for next request in retry and flush notified already is not necessary. Just remove these stale codes. Signed-off-by: Kemeng Shi Signed-off-by: Jens Axboe commit 4ea58fe456c21bb259a7cbf8498946f86e9b84aa Author: Kemeng Shi Date: Wed Jan 18 17:37:23 2023 +0800 blk-mq: remove unnecessary error count and check in blk_mq_dispatch_rq_list blk_mq_dispatch_rq_list will notify if hctx is busy in return bool. It will return true if we are not busy and can handle more and return false on the opposite. Inside blk_mq_dispatch_rq_list, errors is only used if list is empty and we will return true if list is empty and (errors + queued) != 0. There are three types of status returned from request: -busy error BLK_STS*_RESOURCE: the failed request will be added back to list and list will not be empty. -BLK_STS_OK: We count queued for BLK_STS_OK -rest error: We count errors for rest error If list is empty, there is no request gets busy error then (errors + queued) will be total requests in the list which is checked not empty at beginning of blk_mq_dispatch_rq_list. So (errors + queued) != 0 is always met if list is empty. Then the (errors + queued) != 0 check and errors number count is not needed. Signed-off-by: Kemeng Shi Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit e4ef2e05e0020db0d61b2cf451ef38a2bba33910 Author: Kemeng Shi Date: Wed Jan 18 17:37:22 2023 +0800 blk-mq: simplify flush check in blk_mq_dispatch_rq_list 1. Remove check of needs_resource and ret == BLK_STS_DEV_RESOURCE. For busy error BLK_STS*_RESOURCE, request will always be added back to list, so need_resource will not be true and ret will not be == BLK_STS_DEV_RESOURCE if list is empty. We could remove these dead check. 2. Check ret of last request instead of errors If list is empty, we only need to explicitly commit_rqs if error happens at last request which is stored in ret. So check ret of last request instead of errors to remove unnecessary commit_rqs triggered by errors returned from previous request. Signed-off-by: Kemeng Shi Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 984ce0a7d75b577fd84f2cc7a83e6e2d2503f90e Author: Kemeng Shi Date: Wed Jan 18 17:37:21 2023 +0800 blk-mq: use blk_mq_commit_rqs helper in blk_mq_try_issue_list_directly Call blk_mq_commit_rqs instead of access ->commit_rqs directly. As you can see in comment of blk_mq_commit_rqs, we only need explicitly call this in two cases: -did not queue everything initially scheduled to queue -the last attempt to queue a request failed Both cases can be checked with ret of last request which breaks list walk. Then we can remove unnecessary error count and unnecessary commit triggered by error besides cases described above. Signed-off-by: Kemeng Shi Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 0d617a83e8d4d3149d76cc074d9779a3b0ee7baf Author: Kemeng Shi Date: Wed Jan 18 17:37:20 2023 +0800 blk-mq: remove unncessary error count and commit in blk_mq_plug_issue_direct We need only to explicitly commit in two error cases: -did not queue everything initially scheduled to queue -the last attempt to queue a request failed (see comment of blk_mq_commit_rqs for more details). Both cases can be checked with ret of last request which breaks list walk. Remove unnecessary error count and unnecessary commit triggered by error which is not covered by cases described above. Signed-off-by: Kemeng Shi Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 34c9f547402f11c0241a44800574ec4fa38cccb8 Author: Kemeng Shi Date: Wed Jan 18 17:37:19 2023 +0800 blk-mq: make blk_mq_commit_rqs a general function for all commits 1. move blk_mq_commit_rqs forward before functions need commits. 2. add queued check and only commits request if any request was queued in blk_mq_commit_rqs to keep commit behavior consistent and remove unnecessary commit. 3. split the queued clearing from blk_mq_plug_commit_rqs as it is not wanted general. 4. sync current caller of blk_mq_commit_rqs with new general blk_mq_commit_rqs. 5. document rule for unusual cases which need explicit commit_rqs. Suggested-by: Christoph Hellwig Signed-off-by: Kemeng Shi Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 3e368fb023ffab83404f628d02789550d79eca9c Author: Kemeng Shi Date: Wed Jan 18 17:37:18 2023 +0800 blk-mq: remove unncessary from_schedule parameter in blk_mq_plug_issue_direct Function blk_mq_plug_issue_direct tries to issue batch requests in plug list to driver directly. We will only issue plug request to driver if we are not from scheduler, so from_scheduler parameter of blk_mq_plug_issue_direct is always false. Remove unncessary from_scheduler of blk_mq_plug_issue_direct. Signed-off-by: Kemeng Shi Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 08e3599e7401a7eae5e68f5e2601cc4a4e53951b Author: Kemeng Shi Date: Wed Jan 18 17:37:17 2023 +0800 blk-mq: remove unnecessary list_empty check in blk_mq_try_issue_list_directly We only break the list walk if we get 'BLK_STS_*RESOURCE'. We also count errors for 'BLK_STS_*RESOURCE' error. If list is not empty, errors will always be non-zero. So we can remove unnecessary list_empty check. This will remove redundant list_empty check for case that error happened at sending last request in list. Reviewed-by: Christoph Hellwig Signed-off-by: Kemeng Shi Signed-off-by: Jens Axboe commit 47df9ce95cd568d3f84218c4f65e9fbd4dfeda55 Author: Kemeng Shi Date: Wed Jan 18 17:37:16 2023 +0800 blk-mq: Fix potential io hung for shared sbitmap per tagset Commit f906a6a0f4268 ("blk-mq: improve tag waiting setup for non-shared tags") mark restart for unshared tags for improvement. At that time, tags is only shared betweens queues and we can check if tags is shared by test BLK_MQ_F_TAG_SHARED. Afterwards, commit 32bc15afed04b ("blk-mq: Facilitate a shared sbitmap per tagset") enabled tags share betweens hctxs inside a queue. We only mark restart for shared hctxs inside a queue and may cause io hung if there is no tag currently allocated by hctxs going to be marked restart. Wait on sbitmap_queue instead of mark restart for shared hctxs case to fix this. Fixes: 32bc15afed04 ("blk-mq: Facilitate a shared sbitmap per tagset") Signed-off-by: Kemeng Shi Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 98b99e9412d0cde8c7b442bf5efb09528a2ede8b Author: Kemeng Shi Date: Wed Jan 18 17:37:15 2023 +0800 blk-mq: wait on correct sbitmap_queue in blk_mq_mark_tag_wait For shared queues case, we will only wait on bitmap_tags if we fail to get driver tag. However, rq could be from breserved_tags, then two problems will occur: 1. io hung if no tag is currently allocated from bitmap_tags. 2. unnecessary wakeup when tag is freed to bitmap_tags while no tag is freed to breserved_tags. Wait on the bitmap which rq from to fix this. Fixes: f906a6a0f426 ("blk-mq: improve tag waiting setup for non-shared tags") Reviewed-by: Christoph Hellwig Signed-off-by: Kemeng Shi Signed-off-by: Jens Axboe commit c31e76bcc379182fe67a82c618493b7b8868c672 Author: Kemeng Shi Date: Wed Jan 18 17:37:14 2023 +0800 blk-mq: remove stale comment for blk_mq_sched_mark_restart_hctx Commit 97889f9ac24f8 ("blk-mq: remove synchronize_rcu() from blk_mq_del_queue_tag_set()") remove handle of TAG_SHARED in restart, then shared_hctx_restart counted for how many hardware queues are marked for restart is removed too. Remove the stale comment that we still count hardware queues need restart. Fixes: 97889f9ac24f ("blk-mq: remove synchronize_rcu() from blk_mq_del_queue_tag_set()") Reviewed-by: Christoph Hellwig Signed-off-by: Kemeng Shi Signed-off-by: Jens Axboe commit 6ee858a3d3270a68902d66bb47c151a83622535c Author: Kemeng Shi Date: Wed Jan 18 17:37:13 2023 +0800 blk-mq: avoid sleep in blk_mq_alloc_request_hctx Commit 1f5bd336b9150 ("blk-mq: add blk_mq_alloc_request_hctx") add blk_mq_alloc_request_hctx to send commands to a specific queue. If BLK_MQ_REQ_NOWAIT is not set in tag allocation, we may change to different hctx after sleep and get tag from unexpected hctx. So BLK_MQ_REQ_NOWAIT must be set in flags for blk_mq_alloc_request_hctx. After commit 600c3b0cea784 ("blk-mq: open code __blk_mq_alloc_request in blk_mq_alloc_request_hctx"), blk_mq_alloc_request_hctx return -EINVAL if both BLK_MQ_REQ_NOWAIT and BLK_MQ_REQ_RESERVED are not set instead of if BLK_MQ_REQ_NOWAIT is not set. So if BLK_MQ_REQ_NOWAIT is not set and BLK_MQ_REQ_RESERVED is set, blk_mq_alloc_request_hctx could alloc tag from unexpected hctx. I guess what we need here is that return -EINVAL if either BLK_MQ_REQ_NOWAIT or BLK_MQ_REQ_RESERVED is not set. Currently both BLK_MQ_REQ_NOWAIT and BLK_MQ_REQ_RESERVED will be set if specific hctx is needed in nvme_auth_submit, nvmf_connect_io_queue and nvmf_connect_admin_queue. Fix the potential BLK_MQ_REQ_NOWAIT missed case in future. Fixes: 600c3b0cea78 ("blk-mq: open code __blk_mq_alloc_request in blk_mq_alloc_request_hctx") Reviewed-by: Christoph Hellwig Signed-off-by: Kemeng Shi Signed-off-by: Jens Axboe commit e81cd5a983bb35dabd38ee472cf3fea1c63e0f23 Author: Christoph Hellwig Date: Fri Feb 3 16:02:09 2023 +0100 block: stub out and deprecated the capability attribute on the gendisk The capability attribute was added in 2017 to expose the kernel internal GENHD_FL_MEDIA_CHANGE_NOTIFY to userspace without ever adding a value to an UAPI header, and without ever setting it in any driver until it was finally removed in Linux 5.7. Deprecate the file and always return 0 instead of exposing the other internal and frequently renumbered other gendisk flags. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20230203150209.3199115-1-hch@lst.de Signed-off-by: Jens Axboe commit 28e538a3093833cbac3e28dd511a8b74629d737a Author: Christoph Hellwig Date: Mon Feb 6 16:02:01 2023 +0100 blk-cgroup: fix freeing NULL blkg in blkg_create new_blkg can be NULL if the caller didn't pass in a pre-allocated blkg. Don't try to free it in that case. Fixes: 27b642b07a4a ("blk-cgroup: simplify blkg freeing from initialization failure paths") Reported-by: Yi Zhang Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20230206150201.3438972-1-hch@lst.de Signed-off-by: Jens Axboe commit aa4a86055b6fd76c414c3ab2af5a1dbd93dd6c93 Author: Greg Kroah-Hartman Date: Thu Feb 2 15:20:22 2023 +0100 mm/slub: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Andrew Morton Cc: Vlastimil Babka Cc: Roman Gushchin Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: Roman Gushchin Acked-by: David Rientjes Signed-off-by: Vlastimil Babka commit 2f2bb1ffc9983e227424d0787289da5483b0c74f Author: Jens Axboe Date: Mon Feb 6 08:20:46 2023 -0700 io_uring: mark task TASK_RUNNING before handling resume/task work Just like for task_work, set the task mode to TASK_RUNNING before doing any potential resume work. We're not holding any locks at this point, but we may have already set the task state to TASK_INTERRUPTIBLE in preparation for going to sleep waiting for events. Ensure that we set it back to TASK_RUNNING if we have work to process, to avoid warnings on calling blocking operations with !TASK_RUNNING. Fixes: b5d3ae202fbf ("io_uring: handle TIF_NOTIFY_RESUME when checking for task_work") Reported-by: kernel test robot Link: https://lore.kernel.org/oe-lkp/202302062208.24d3e563-oliver.sang@intel.com Signed-off-by: Jens Axboe commit e65f91b20c3d170a1e8b1b6b40cd96bea6343194 Author: Kan Liang Date: Thu Feb 2 11:22:09 2023 -0800 perf test x86: Support the retire_lat (Retire Latency) sample_type check Add test for the new field for Retire Latency in the X86 specific test. Signed-off-by: Kan Liang Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20230202192209.1795329-3-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 941811980df00161fe639c252dabe6488875887c Author: Dan Carpenter Date: Mon Feb 6 17:47:38 2023 +0300 spi: spidev: Fix double unlock in spidev_sync() This unlocks twice due to a merge issue. Fixes: 35bba23e6732 ("Merge remote-tracking branch 'spi/for-6.2' into spi-6.2") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/Y+ETCk7XKfAy8yWQ@kili Signed-off-by: Mark Brown commit f8f5a7c902776c18598963b359046ddf0728be84 Merge: 7c62a2279b9e8 35bba23e6732a Author: Mark Brown Date: Mon Feb 6 14:50:53 2023 +0000 spi: Merge fixes The automated merge for the spidev locking fixes is going wrong and merging the unlock twice. commit 5646bbd6684acf5c9b9dedb863b7d2f6f5a330fb Author: Sebastian Andrzej Siewior Date: Fri Nov 25 10:42:16 2022 +0100 selftests: Emit a warning if getcpu() is missing on 32bit The VDSO implementation for getcpu() has been wired up on 32bit so warn if missing. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20221125094216.3663444-4-bigeasy@linutronix.de commit 92d33063c081a82d25dd08a9cce03947c8ed9164 Author: Sebastian Andrzej Siewior Date: Fri Nov 25 10:42:15 2022 +0100 x86/vdso: Provide getcpu for x86-32. Wire up __vdso_getcpu() for x86-32. The 64bit version is reused with trivial modifications. Contrary to vclock_gettime.c there is no requirement to fake any defines in the case of 32bit VDSO on a 64bit kernel because the GDT entry from which the CPU and node information is read is always the native one. Adopt vdso_getcpu.c by: - removing the unneeded time* header files which lead to compile errors for 32bit. - adding segment.h which provides vdso_read_cpunode() and the defines required by it. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20221125094216.3663444-3-bigeasy@linutronix.de commit 717cce3bdcf34705417f641bf2fcdf9b038ec36c Author: Sebastian Andrzej Siewior Date: Fri Nov 25 10:42:14 2022 +0100 x86/cpu: Provide the full setup for getcpu() on x86-32 setup_getcpu() configures two things: - it writes the current CPU & node information into MSR_TSC_AUX - it writes the same information as a GDT entry. By using the "full" setup_getcpu() on i386 it is possible to read the CPU information in userland via RDTSCP() or via LSL from the GDT. Provide an GDT_ENTRY_CPUNODE for x86-32 and make the setup function unconditionally available. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Reviewed-by: Roland Mainz Link: https://lore.kernel.org/r/20221125094216.3663444-2-bigeasy@linutronix.de commit ee739f132f716f28c9fbe70a230e35085c197dd5 Author: Athira Rajeev Date: Tue Jan 31 19:20:01 2023 +0530 perf test bpf: Check for libtraceevent support The "bpf" tests fails in environment with missing libtraceevent support as below: # ./perf test 36 36: BPF filter : 36.1: Basic BPF filtering : FAILED! 36.2: BPF pinning : FAILED! 36.3: BPF prologue generation : FAILED! The environment has clang but missing the libtraceevent devel. Hence perf is compiled without libtraceevent support. Detailed logs: ./perf test -v "Basic BPF filtering" Failed to add BPF event syscalls:sys_enter_epoll_pwait bpf: tracepoint call back failed, stop iterate Failed to add events selected by BPF The bpf tests tris to add probe event which fails at "parse_events_add_tracepoint" function due to missing libtraceevent. Add check for "HAVE_LIBTRACEEVENT" in the "tests/bpf.c" before proceeding with the test. With the change, # ./perf test 36 36: BPF filter : 36.1: Basic BPF filtering : Skip (not compiled in or missing libtraceevent support) 36.2: BPF pinning : Skip (not compiled in or missing libtraceevent support) 36.3: BPF prologue generation : Skip (not compiled in or missing libtraceevent support) Signed-off-by: Athira Jajeev Tested-by: Arnaldo Carvalho de Melo Tested-by: Disha Goel Cc: Andi Kleen Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kajol Jain Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Nageswara R Sastry Cc: Namhyung Kim Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230131135001.54578-1-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 3b4863fa5b7dd50dab1b10abbed938efd203752f Author: Sebastian Andrzej Siewior Date: Wed Oct 26 15:44:07 2022 +0200 vduse: Remove include of rwlock.h rwlock.h should not be included directly. Instead linux/splinlock.h should be included. Including it directly will break the RT build. Remove the rwlock.h include. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Michael S. Tsirkin commit 2edcedcd1dcb542cb09acabda1732de47dd82e68 Author: Sebastian Andrzej Siewior Date: Thu Jun 9 17:36:33 2022 +0200 locking/lockdep: Remove lockdep_init_map_crosslock. The cross-release bits have been removed, lockdep_init_map_crosslock() is a leftover. Remove lockdep_init_map_crosslock. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Reviewed-by: Waiman Long Acked-by: Waiman Long Link: https://lore.kernel.org/r/20220311164457.46461-1-bigeasy@linutronix.de Link: https://lore.kernel.org/r/YqITgY+2aPITu96z@linutronix.de commit 20e6ce4818b965463d629e690b23d321722f6e09 Author: Alexander Egorenkov Date: Fri Feb 3 08:39:58 2023 +0100 watchdog: diag288_wdt: unify lpar and zvm diag288 helpers Change naming of the internal diag288 helper functions to improve overall readability and reduce confusion: * Rename __diag288() to diag288(). * Get rid of the misnamed helper __diag288_lpar() that was used not only on LPARs but also zVM and KVM systems. * Rename __diag288_vm() to diag288_str(). Reviewed-by: Heiko Carstens Signed-off-by: Alexander Egorenkov Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230203073958.1585738-6-egorenar@linux.ibm.com Signed-off-by: Heiko Carstens commit 379008519819b58a4b5d1adb177f4ce8164a54d0 Author: Alexander Egorenkov Date: Fri Feb 3 08:39:57 2023 +0100 watchdog: diag288_wdt: de-duplicate diag_stat_inc() calls Call diag_stat_inc() from __diag288() to reduce code duplication. Reviewed-by: Heiko Carstens Signed-off-by: Alexander Egorenkov Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230203073958.1585738-5-egorenar@linux.ibm.com Signed-off-by: Heiko Carstens commit 221f748ac8633083b7800d4e33a076fce22e341e Author: Alexander Egorenkov Date: Fri Feb 3 08:39:56 2023 +0100 watchdog: diag288_wdt: unify command buffer handling for diag288 zvm Simplify and de-duplicate code by introducing a common single command buffer allocated once at initialization. Moreover, simplify the interface of __diag288_vm() by accepting ASCII strings as the command parameter and converting it to the EBCDIC format within the function itself. Reviewed-by: Heiko Carstens Signed-off-by: Alexander Egorenkov Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230203073958.1585738-4-egorenar@linux.ibm.com Signed-off-by: Heiko Carstens commit f102dd16ebc82131bbc9eecaead4400062a21858 Author: Alexander Egorenkov Date: Fri Feb 3 08:39:55 2023 +0100 watchdog: diag288_wdt: remove power management Remove power management because s390 no longer supports hibernation since commit 394216275c7d ("s390: remove broken hibernate / power management support"). Reviewed-by: Heiko Carstens Signed-off-by: Alexander Egorenkov Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230203073958.1585738-3-egorenar@linux.ibm.com Signed-off-by: Heiko Carstens commit c24def73a2863a8292693ab49a83303213ef3f23 Author: Alexander Egorenkov Date: Fri Feb 3 08:39:54 2023 +0100 watchdog: diag288_wdt: get rid of register asm Using register asm statements has been proven to be very error prone, especially when using code instrumentation where gcc may add function calls, which clobbers register contents in an unexpected way. Therefore, get rid of register asm statements in watchdog code, and make sure this bug class cannot happen. Moreover, remove the register r1 from the clobber list because this register is not changed by DIAG 288. Reviewed-by: Heiko Carstens Signed-off-by: Alexander Egorenkov Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230203073958.1585738-2-egorenar@linux.ibm.com Signed-off-by: Heiko Carstens commit 83089c8f502e87ca74dd5f8cd460536c43318fef Merge: 6bddf115d0bae 7ab41c2c08a32 Author: Heiko Carstens Date: Mon Feb 6 15:13:45 2023 +0100 Merge branch 'fixes' into features Signed-off-by: Heiko Carstens commit 3f16ba1c0768de6cdc6f65105757ef04dbfd8e5c Author: Thomas Weißschuh Date: Fri Dec 23 21:30:19 2022 +0000 HID: use standard debug APIs The custom "debug" module parameter is fairly inflexible. It can only manage debugging for all calls dbg_hid() at the same time. Furthermore it creates a mismatch between calls to hid_dbg() which can be managed by CONFIG_DYNAMIC_DEBUG and dbg_hid() which is managed by the module parameter. Furthermore the change to pr_debug() allows the debugging statements to be completely compiled-out if desired. Signed-off-by: Thomas Weißschuh Tested-by: Bastien Nocera Link: https://lore.kernel.org/r/20221223-hid-dbg-v1-1-5dcf8794f7f9@weissschuh.net Signed-off-by: Benjamin Tissoires commit ff17bb87601453bb9d50e625d45356f07bcb101c Author: Thomas Weißschuh Date: Mon Jan 30 03:59:45 2023 +0000 staging: greybus: hid: Constify lowlevel HID driver Since commit 52d225346904 ("HID: Make lowlevel driver structs const") the lowlevel HID drivers are only exposed as const. Take advantage of this to constify the underlying structure, too. Signed-off-by: Thomas Weißschuh Acked-by: Greg Kroah-Hartman Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230130-hid-const-ll-driver-v1-9-3fc282b3b1d0@weissschuh.net Signed-off-by: Benjamin Tissoires commit 783c3394b493243e7df8b801e754d545247f4833 Author: Thomas Weißschuh Date: Mon Jan 30 03:59:44 2023 +0000 platform/x86: asus-tf103c-dock: Constify toprow keymap This structure is never modified, make it const. Signed-off-by: Thomas Weißschuh Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230130-hid-const-ll-driver-v1-8-3fc282b3b1d0@weissschuh.net Signed-off-by: Benjamin Tissoires commit 63509b149f1bbf7bebfc5543bb3c6e20995828e0 Author: Thomas Weißschuh Date: Mon Jan 30 03:59:43 2023 +0000 platform/x86: asus-tf103c-dock: Constify lowlevel HID driver Since commit 52d225346904 ("HID: Make lowlevel driver structs const") the lowlevel HID drivers are only exposed as const. Take advantage of this to constify the underlying structure, too. Signed-off-by: Thomas Weißschuh Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230130-hid-const-ll-driver-v1-7-3fc282b3b1d0@weissschuh.net Signed-off-by: Benjamin Tissoires commit dd350afc17571b597ce7dc7a05f543f4f10cda57 Author: Thomas Weißschuh Date: Mon Jan 30 03:59:42 2023 +0000 HID: surface-hid: Constify lowlevel HID driver Since commit 52d225346904 ("HID: Make lowlevel driver structs const") the lowlevel HID drivers are only exposed as const. Take advantage of this to constify the underlying structure, too. Signed-off-by: Thomas Weißschuh Reviewed-by: Maximilian Luz Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230130-hid-const-ll-driver-v1-6-3fc282b3b1d0@weissschuh.net Signed-off-by: Benjamin Tissoires commit 3352c3e0bf9b7eb53392ef7e75a1cdc437e73557 Author: Thomas Weißschuh Date: Mon Jan 30 03:59:41 2023 +0000 HID: intel-ish-hid: Constify lowlevel HID driver Since commit 52d225346904 ("HID: Make lowlevel driver structs const") the lowlevel HID drivers are only exposed as const. Take advantage of this to constify the underlying structure, too. Signed-off-by: Thomas Weißschuh Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230130-hid-const-ll-driver-v1-5-3fc282b3b1d0@weissschuh.net Signed-off-by: Benjamin Tissoires commit ddb6792f0ef2f6ba4ddde597bac5488788f503eb Author: Thomas Weißschuh Date: Mon Jan 30 03:59:40 2023 +0000 HID: steam: Constify lowlevel HID driver Since commit 52d225346904 ("HID: Make lowlevel driver structs const") the lowlevel HID drivers are only exposed as const. Take advantage of this to constify the underlying structure, too. Signed-off-by: Thomas Weißschuh Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230130-hid-const-ll-driver-v1-4-3fc282b3b1d0@weissschuh.net Signed-off-by: Benjamin Tissoires commit 662eee8d46dfbf6e329bbf234ecfb0b6eacb6e0a Author: Thomas Weißschuh Date: Mon Jan 30 03:59:39 2023 +0000 HID: logitech-dj: Constify lowlevel HID driver Since commit 52d225346904 ("HID: Make lowlevel driver structs const") the lowlevel HID drivers are only exposed as const. Take advantage of this to constify the underlying structure, too. Signed-off-by: Thomas Weißschuh Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230130-hid-const-ll-driver-v1-3-3fc282b3b1d0@weissschuh.net Signed-off-by: Benjamin Tissoires commit d38213a911c5a5eacd7cc5854c0477d308bef0cb Author: Thomas Weißschuh Date: Mon Jan 30 03:59:38 2023 +0000 HID: hyperv: Constify lowlevel HID driver Since commit 52d225346904 ("HID: Make lowlevel driver structs const") the lowlevel HID drivers are only exposed as const. Take advantage of this to constify the underlying structure, too. Signed-off-by: Thomas Weißschuh Acked-by: Wei Liu Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230130-hid-const-ll-driver-v1-2-3fc282b3b1d0@weissschuh.net Signed-off-by: Benjamin Tissoires commit 65b7015bfe168aa86a600821cd289e7fcd610cc6 Author: Thomas Weißschuh Date: Mon Jan 30 03:59:37 2023 +0000 HID: amd_sfh: Constify lowlevel HID driver Since commit 52d225346904 ("HID: Make lowlevel driver structs const") the lowlevel HID drivers are only exposed as const. Take advantage of this to constify the underlying structure, too. Signed-off-by: Thomas Weißschuh Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230130-hid-const-ll-driver-v1-1-3fc282b3b1d0@weissschuh.net Signed-off-by: Benjamin Tissoires commit 2f7f4efb9411770b4ad99eb314d6418e980248b4 Author: Randy Dunlap Date: Thu Jan 26 22:39:40 2023 -0800 Documentation: hid: correct spelling Correct spelling problems for Documentation/hid/ as reported by codespell. Signed-off-by: Randy Dunlap Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: Srinivas Pandruvada Cc: linux-input@vger.kernel.org Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Acked-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20230127064005.1558-11-rdunlap@infradead.org Signed-off-by: Benjamin Tissoires commit 283861a4c52c1ea4df3dd1b6fc75a50796ce3524 Author: Nikita Zhandarovich Date: Thu Feb 2 10:48:50 2023 -0800 RDMA/cxgb4: Fix potential null-ptr-deref in pass_establish() If get_ep_from_tid() fails to lookup non-NULL value for ep, ep is dereferenced later regardless of whether it is empty. This patch adds a simple sanity check to fix the issue. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 944661dd97f4 ("RDMA/iw_cxgb4: atomically lookup ep and get a reference") Signed-off-by: Nikita Zhandarovich Link: https://lore.kernel.org/r/20230202184850.29882-1-n.zhandarovich@fintech.ru Signed-off-by: Leon Romanovsky commit 23d18a20723b115460014a92c4e9ce631d6455c5 Author: Hans de Goede Date: Sat Feb 4 12:02:23 2023 +0100 platform/x86: int3472/discrete: Drop unnecessary obj->type == string check acpi_evaluate_dsm_typed() already verifies the type is the requested type, so this error check is a no-op, drop it. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230204110223.54625-1-hdegoede@redhat.com commit 85f9e38a5ac7d397f9bb5e57901b2d6af4dcc3b9 Author: Leon Romanovsky Date: Thu Feb 2 11:03:07 2023 +0200 RDMA/mlx5: Remove impossible check of mkey cache cleanup failure mlx5_mkey_cache_cleanup() can't fail and can be changed to be void. Link: https://lore.kernel.org/r/1acd9528995d083114e7dec2a2afc59436406583.1675328463.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 828cf5936bea2438c21a3a6c303b34a2a1f6c3c2 Author: Leon Romanovsky Date: Thu Feb 2 11:03:06 2023 +0200 RDMA/mlx5: Fix MR cache debugfs error in IB representors mode Block MR cache debugfs creation for IB representor flow as MR cache shouldn't be used at all in that mode. As part of this change, add missing debugfs cleanup in error path too. This change fixes the following debugfs errors: bond0: (slave enp8s0f1): Enslaving as a backup interface with an up link mlx5_core 0000:08:00.0: lag map: port 1:1 port 2:1 mlx5_core 0000:08:00.0: shared_fdb:1 mode:queue_affinity mlx5_core 0000:08:00.0: Operation mode is single FDB debugfs: Directory '2' with parent '/' already present! ... debugfs: Directory '22' with parent '/' already present! Fixes: 73d09b2fe833 ("RDMA/mlx5: Introduce mlx5r_cache_rb_key") Signed-off-by: Michael Guralnik Link: https://lore.kernel.org/r/482a78c54acbcfa1742a0e06a452546428900ffa.1675328463.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 7bf0008a52930e4d11ff1d6083cf13d9879bd2d0 Merge: b1f5e7ff0c4ed 3e0df6916f6c8 Author: Georgi Djakov Date: Mon Feb 6 15:40:42 2023 +0200 Merge branch 'icc-dt' into icc-next * icc-dt dt-bindings: interconnect: split SC7280 to own schema dt-bindings: interconnect: split SC8280XP to own schema dt-bindings: interconnect: split SM8450 to own schema dt-bindings: interconnect: qcom-bwmon: document SM8550 compatibles dt-bindings: interconnect: OSM L3: Add SM6350 OSM L3 compatible dt-bindings: interconnect: Exclude all non msm8939 from snoc-mm dt-bindings: interconnect: samsung,exynos-bus: allow opp-table Signed-off-by: Georgi Djakov commit b1f5e7ff0c4eddebbc8a598ae4a1c3f3bf1ebad4 Merge: b9544fb577288 a402d2d55d8b8 Author: Georgi Djakov Date: Mon Feb 6 15:39:41 2023 +0200 Merge branch 'icc-sa8775p' into icc-next * icc-sa8775p dt-bindings: interconnect: qcom: document the interconnects for sa8775p interconnect: qcom: add a driver for sa8775p dt-bindings: interconnect: qcom,sa8775p-rpmh: fix a typo Link: https://lore.kernel.org/r/20230118140825.242544-2-brgl@bgdev.pl Signed-off-by: Georgi Djakov commit b9544fb577288e7f81218fc6f50d74c248bc20a4 Merge: 863ed40ea9035 7e438e18874e3 Author: Georgi Djakov Date: Mon Feb 6 15:39:15 2023 +0200 Merge branch 'icc-sdm670' into icc-next * icc-sdm670 dt-bindings: interconnect: add sdm670 interconnects interconnect: qcom: add sdm670 interconnects Link: https://lore.kernel.org/r/20230111005155.50452-1-mailingradian@gmail.com Signed-off-by: Georgi Djakov commit 863ed40ea903568b8af9a91e3ca1884a778e79a5 Merge: 163ea2048dc8c e51c94dd9c7af Author: Georgi Djakov Date: Mon Feb 6 15:38:22 2023 +0200 Merge branch 'icc-ip0-migration' into icc-next Commits 2f3724930eb4 ("interconnect: qcom: sc7180: Drop IP0 interconnects") and 2fb251c26560 ("interconnect: qcom: sdx55: Drop IP0 interconnects") removed IP0 interconnects (and ipa-virt devices support) in favour of the RPMH clocks. Follow this example for other platforms defining IP0 RPMH resource. While we are at it, remove several leftover from the mentioned patches. * icc-ip0-migration: interconnect: qcom: sdx55: drop IP0 remnants interconnect: qcom: sc7180: drop IP0 remnants interconnect: move ignore_list out of of_count_icc_providers() interconnect: qcom: sm8150: Drop IP0 interconnects interconnect: qcom: sm8250: Drop IP0 interconnects interconnect: qcom: sc8180x: Drop IP0 interconnects interconnect: qcom: sc8280xp: Drop IP0 interconnects dt-bindings: interconnect: qcom: Remove ipa-virt compatibles dt-bindings: interconnect: qcom: drop IPA_CORE related defines Link: https://lore.kernel.org/r/20230109002935.244320-1-dmitry.baryshkov@linaro.org Signed-off-by: Georgi Djakov commit 915d4ad3830aa1a2dafda9b737749fb410cb9790 Author: Uros Bizjak Date: Mon Jan 16 17:53:37 2023 +0100 posix-timers: Use atomic64_try_cmpxchg() in __update_gt_cputime() Use atomic64_try_cmpxchg() instead of atomic64_cmpxchg() in __update_gt_cputime(). The 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, atomic64_try_cmpxchg() implicitly assigns old *ptr value to "old" when cmpxchg() fails. There is no need to re-read the value in the loop. No functional change intended. Signed-off-by: Uros Bizjak Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20230116165337.5810-1-ubizjak@gmail.com commit 05f5504b161054bdce74eef5d9ff602bbebaeca8 Author: Jiapeng Chong Date: Mon Feb 6 15:55:18 2023 +0800 ASoC: codecs: Fix unsigned comparison with less than zero The val is defined as unsigned int type, if(val<0) is redundant, so delete it. sound/soc/codecs/idt821034.c:449 idt821034_kctrl_gain_put() warn: unsigned 'val' is never less than zero. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3947 Signed-off-by: Jiapeng Chong Acked-by: Herve Codina Link: https://lore.kernel.org/r/20230206075518.84169-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Mark Brown commit 983272a2a223de59dbb4cb189aa4d02d7156d209 Author: Tom Rix Date: Sat Feb 4 17:57:33 2023 -0800 ASoC: codecs: aw88395: initialize cur_scene_id to 0 cppcheck reports sound/soc/codecs/aw88395/aw88395_lib.c:789:6: error: Uninitialized variable: cur_scene_id [uninitvar] if (cur_scene_id == 0) { ^ Passing a garbage value to aw_dev_parse_data_by_sec_type_v1() will cause a crash when the value is used as an array index. This check assumes cur_scene_id is initialized to 0, so initialize it to 0. Fixes: 4345865b003b ("ASoC: codecs: ACF bin parsing and check library file for aw88395") Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230205015733.1721009-1-trix@redhat.com Signed-off-by: Mark Brown commit 3dafbe5cc1409dd2e3fc2955b0026c1ba7dfa323 Merge: 36207c34d17fb 6d7934719f265 Author: Marc Kleine-Budde Date: Mon Feb 6 14:02:37 2023 +0100 Merge patch series "can: bittiming: cleanups and rework SJW handling" Marc Kleine-Budde says: several people noticed that on modern CAN controllers with wide bit timing registers the default SJW of 1 can result in unstable or no synchronization to the CAN network. See Patch 14/17 for details. During review of v1 Vincent pointed out that the original code and the series doesn't always check user provided bit timing parameters, sometimes silently limits them and the return error values are not consistent. This series first cleans up some code in bittiming.c, replacing open-coded variants by macros or functions (Patches 1, 2). Patch 3 adds the missing assignment of the effective TQ if the interface is configured with low level timing parameters. Patch 4 is another code cleanup. Patches 5, 6 check the bit timing parameter during interface registration. Patch 7 adds a validation of the sample point. The patches 8-13 convert the error messages from netdev_err() to NL_SET_ERR_MSG_FMT, factor out the SJW handling from can_fixup_bittiming(), add checking and error messages for the individual limits and harmonize the error return values. Patch 14 changes the default SJW value from 1 to min(Phase Seg1, Phase Seg2 / 2). Patch 15 switches can_calc_bittiming() to use the new SJW handling. Patch 16 converts can_calc_bittiming() to NL_SET_ERR_MSG_FMT(). And patch 16 adds a NL_SET_ERR_MSG_FMT() error message to can_validate_bitrate(). v1: https://lore.kernel.org/all/20220907103845.3929288-1-mkl@pengutronix.de Link: https://lore.kernel.org/all/20230202110854.2318594-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 6d7934719f2654587b96cbae5e326c7e33c24da8 Author: Marc Kleine-Budde Date: Wed Feb 1 20:27:47 2023 +0100 can: bittiming: can_validate_bitrate(): report error via netlink Report an error to user space via netlink if the requested bit rate is not supported by the device. Link: https://lore.kernel.org/all/20230202110854.2318594-18-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 06742086a3d225cafa3ee9d7704bbfd28a0d01d4 Author: Marc Kleine-Budde Date: Tue Jan 31 17:10:54 2023 +0100 can: bittiming: can_calc_bittiming(): convert from netdev_err() to NL_SET_ERR_MSG_FMT() Replace the netdev_err() by NL_SET_ERR_MSG_FMT() to better inform the user about the problem. While there, use %u to print unsigned values and improve error message a bit. In case of an error, return -EINVAL instead of -EDOM, this corresponds better to the actual meaning of the error value. Link: https://lore.kernel.org/all/20230202110854.2318594-17-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit c7650728a7024e4f835dcbbb4214740939179596 Author: Marc Kleine-Budde Date: Tue Sep 6 19:15:28 2022 +0200 can: bittiming: can_calc_bittiming(): clean up SJW handling In the current code, if the user configures a bitrate, a default SJW value of 1 is used. If the user configures both a bitrate and a SJW value, can_calc_bittiming() silently limits the SJW value to SJW max and TSEG2. We came to the conclusion that if the user provided an invalid SJW value, it's best to bail out and inform the user [1]. [1] https://lore.kernel.org/all/CAMZ6RqKqhmTgUZiwe5uqUjBDnhhC2iOjZ791+Y845btJYwVDKg@mail.gmail.com Further the ISO 11898-1:2015 standard mandates that "SJW shall be less than or equal to the minimum of these two items: Phase_Seg1 and Phase_Seg2." [2] The current code is missing that check. [2] https://lore.kernel.org/all/BL3PR11MB64844E3FC13C55433CDD0B3DFB449@BL3PR11MB6484.namprd11.prod.outlook.com The previous patches introduced 1) can_sjw_set_default() - sets a default value for SJW if unset 2) can_sjw_check() - implements a SJW check against SJW max, Phase Seg1 and Phase Seg2. In the error case this function reports the error to user space via netlink. Replace both the open-coded SJW default setting and the open-coded and insufficient checks of SJW with the helper functions can_sjw_set_default() and can_sjw_check(). Link: https://lore.kernel.org/all/20230202110854.2318594-16-mkl@pengutronix.de Link: https://lore.kernel.org/all/CAMZ6RqKqhmTgUZiwe5uqUjBDnhhC2iOjZ791+Y845btJYwVDKg@mail.gmail.com Link: https://lore.kernel.org/all/BL3PR11MB64844E3FC13C55433CDD0B3DFB449@BL3PR11MB6484.namprd11.prod.outlook.com Suggested-by: Thomas Kopp Suggested-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde commit 80bcf5ec9927f0a8056495d746b74f57b1e1ad8b Author: Marc Kleine-Budde Date: Tue Sep 6 17:47:58 2022 +0200 can: bittiming: can_sjw_set_default(): use Phase Seg2 / 2 as default for SJW "The (Re-)Synchronization Jump Width (SJW) defines how far a resynchronization may move the Sample Point inside the limits defined by the Phase Buffer Segments to compensate for edge phase errors." [1] In other words, this means that the SJW parameter controls the tolerance of the CAN controller to frequency errors compared to other CAN controllers. If the user space does not provide an SJW parameter, the kernel chooses a default value of 1. This has proven to be a good default value for classic CAN controllers, but no longer for modern CAN-FD controllers. In the past there were CAN controllers like the sja1000 with a rather limited range of bit timing parameters. For the standard bit rates this results in the following bit timing parameters: | Bit timing parameters for sja1000 with 8.000000 MHz ref clock | _----+--------------=> tseg1: 1 … 16 | / / _---------=> tseg2: 1 … 8 | | | / _-----=> sjw: 1 … 4 | | | | / _-=> brp: 1 … 64 (inc: 1) | | | | | / | nominal | | | | | real Bitrt nom real SampP | Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error BTR0 BTR1 | 1000000 125 2 3 2 1 1 1000000 0.0% 75.0% 75.0% 0.0% 0x00 0x14 | 800000 125 3 4 2 1 1 800000 0.0% 80.0% 80.0% 0.0% 0x00 0x16 | 666666 125 4 4 3 1 1 666666 0.0% 80.0% 75.0% 6.2% 0x00 0x27 | 500000 125 6 7 2 1 1 500000 0.0% 87.5% 87.5% 0.0% 0x00 0x1c | 250000 250 6 7 2 1 2 250000 0.0% 87.5% 87.5% 0.0% 0x01 0x1c | 125000 500 6 7 2 1 4 125000 0.0% 87.5% 87.5% 0.0% 0x03 0x1c | 100000 625 6 7 2 1 5 100000 0.0% 87.5% 87.5% 0.0% 0x04 0x1c | 83333 750 6 7 2 1 6 83333 0.0% 87.5% 87.5% 0.0% 0x05 0x1c | 50000 1250 6 7 2 1 10 50000 0.0% 87.5% 87.5% 0.0% 0x09 0x1c | 33333 1875 6 7 2 1 15 33333 0.0% 87.5% 87.5% 0.0% 0x0e 0x1c | 20000 3125 6 7 2 1 25 20000 0.0% 87.5% 87.5% 0.0% 0x18 0x1c | 10000 6250 6 7 2 1 50 10000 0.0% 87.5% 87.5% 0.0% 0x31 0x1c The attentive reader will notice that the SJW is 1 in most cases, while the Seg2 phase is 2. Both values are given in TQ units, which in turn is a duration in nanoseconds. For example the 500 kbit/s configuration: | nominal real Bitrt nom real SampP | Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error BTR0 BTR1 | 500000 125 6 7 2 1 1 500000 0.0% 87.5% 87.5% 0.0% 0x00 0x1c the TQ is 125ns, the Phase Seg2 is "2" (== 250ns), the SJW is "1" (== 125 ns). Looking at a more modern CAN controller like a mcp2518fd, it has wider bit timing registers. | Bit timing parameters for mcp251xfd with 40.000000 MHz ref clock | _----+--------------=> tseg1: 2 … 256 | / / _---------=> tseg2: 1 … 128 | | | / _-----=> sjw: 1 … 128 | | | | / _-=> brp: 1 … 256 (inc: 1) | | | | | / | nominal | | | | | real Bitrt nom real SampP | Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error NBTCFG | 500000 25 34 35 10 1 1 500000 0.0% 87.5% 87.5% 0.0% 0x00440900 The TQ is 25ns, the Phase Seg 2 is "10" (== 250ns), the SJW is "1" (== 25ns). Since the kernel chooses a default SJW of 1 regardless of the TQ, this leads to a much smaller SJW and thus much smaller tolerances to frequency errors. To maintain the same oscillator tolerances on controllers with wide bit timing registers, select a default SJW value of Phase Seg2 / 2 unless Phase Seg 1 is less. This results in the following bit timing parameters: | Bit timing parameters for mcp251xfd with 40.000000 MHz ref clock | _----+--------------=> tseg1: 2 … 256 | / / _---------=> tseg2: 1 … 128 | | | / _-----=> sjw: 1 … 128 | | | | / _-=> brp: 1 … 256 (inc: 1) | | | | | / | nominal | | | | | real Bitrt nom real SampP | Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error NBTCFG | 500000 25 34 35 10 5 1 500000 0.0% 87.5% 87.5% 0.0% 0x00440904 The TQ is 25ns, the Phase Seg 2 is "10" (== 250ns), the SJW is "5" (== 125ns). Which is the same as on the sja1000 controller. [1] http://web.archive.org/http://www.oertel-halle.de/files/cia99paper.pdf Link: https://lore.kernel.org/all/20230202110854.2318594-15-mkl@pengutronix.de Cc: Mark Bath Signed-off-by: Marc Kleine-Budde commit b5a3d0864ee7e43a6ef8a2820f901d60bf4e0703 Author: Marc Kleine-Budde Date: Tue Sep 6 19:15:28 2022 +0200 can: bittiming: can_sjw_check(): check that SJW is not longer than either Phase Buffer Segment According to "The Configuration of the CAN Bit Timing" [1] the SJW "may not be longer than either Phase Buffer Segment". Check SJW against length of both Phase buffers. In case the SJW is greater, report an error via netlink to user space and bail out. [1] http://web.archive.org/http://www.oertel-halle.de/files/cia99paper.pdf Link: https://lore.kernel.org/all/20230202110854.2318594-14-mkl@pengutronix.de Suggested-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde commit 0c017f0910a7f4d90708df853b629f487c8ba739 Author: Marc Kleine-Budde Date: Tue Jan 31 17:43:22 2023 +0100 can: bittiming: can_sjw_check(): report error via netlink and harmonize error value If the user space has supplied an invalid SJW value (greater than the maximum SJW value), report -EINVAL instead of -ERANGE, this better matches the actual meaning of the error value. Additionally report an error message via netlink to the user space. Link: https://lore.kernel.org/all/20230202110854.2318594-13-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit de82d6185b82193e5f798592ed350a3788b78a15 Author: Marc Kleine-Budde Date: Wed Feb 1 17:17:55 2023 +0100 can: bittiming: can_fixup_bittiming(): report error via netlink and harmonize error value Check each bit timing parameter first individually against their limits and report a meaningful error message via netlink to the user space. In case of an error, return -EINVAL instead of -ERANGE, this corresponds better to the actual meaning of the error value. Link: https://lore.kernel.org/all/20230202110854.2318594-12-mkl@pengutronix.de Suggested-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde commit 5988bf737deed86d6186a21e73e2fc253a4ff466 Author: Marc Kleine-Budde Date: Tue Sep 27 17:07:07 2022 +0200 can: bittiming: factor out can_sjw_set_default() and can_sjw_check() Factor out the functionality of assigning a SJW default value into can_sjw_set_default() and the checking the SJW limits into can_sjw_check(). This functions will be improved and called from a different function in the following patches. Link: https://lore.kernel.org/all/20230202110854.2318594-11-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 286c0e09e8e07de0f116a01aa234b05d9956dcf5 Author: Marc Kleine-Budde Date: Tue Jan 31 15:42:59 2023 +0100 can: bittiming: can_changelink() pass extack down callstack This is a preparation patch. In order to pass warning/error messages during netlink calls back to user space, pass the extack struct down the callstack of can_changelink(), the actual error messages will be added in the following ptaches. Link: https://lore.kernel.org/all/20230202110854.2318594-10-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 1494d27f64f0855086bfefa0391f4e9f29315699 Author: Marc Kleine-Budde Date: Tue Sep 27 13:12:35 2022 +0200 can: netlink: can_changelink(): convert from netdev_err() to NL_SET_ERR_MSG_FMT() Since commit 51c352bdbcd2 ("netlink: add support for formatted extack messages") formatted extack messages are supported to inform the user space or warnings/errors during netlink calls. Replace the netdev_err() by NL_SET_ERR_MSG_FMT() to better inform the user about the problem. While there, use %u to print unsigned values and improve error message a bit. Link: https://lore.kernel.org/all/20230202110854.2318594-9-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 73335cfab7fd7c2bfd1696730733b8b952545951 Author: Marc Kleine-Budde Date: Wed Feb 1 17:33:51 2023 +0100 can: netlink: can_validate(): validate sample point for CAN and CAN-FD The sample point is a value in tenths of a percent. Meaningful values are between 0 and 1000. Invalid values are rejected and an error message is returned to user space via netlink. Link: https://lore.kernel.org/all/20230202110854.2318594-8-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit a3db542410af3dd639166ffcb2cdc5936b2950ad Author: Marc Kleine-Budde Date: Tue Sep 27 13:33:44 2022 +0200 can: dev: register_candev(): bail out if both fixed bit rates and bit timing constants are provided The CAN driver framework supports either fixed bit rates or bit timing constants. Bail out during driver registration if both are given. Link: https://lore.kernel.org/all/20230202110854.2318594-7-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit d58ac89d0d388da82630bb9d3823420cddbdabb2 Author: Marc Kleine-Budde Date: Mon Aug 9 21:07:14 2021 +0200 can: dev: register_candev(): ensure that bittiming const are valid Implement the function can_bittiming_const_valid() to check the validity of the specified bit timing constant. Call this function from register_candev() to check the bit timing constants during the registration of the CAN interface. Link: https://lore.kernel.org/all/20230202110854.2318594-6-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 8e0a0b32c4ff7a5c2654a5f8fc37a9f1b6f58816 Author: Marc Kleine-Budde Date: Tue Sep 27 17:14:09 2022 +0200 can: bittiming: can_get_bittiming(): use direct return and remove unneeded else Clean up the code flow a bit, don't assign err variable but directly return. Remove the unneeded else, too. Link: https://lore.kernel.org/all/20230202110854.2318594-5-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 52375446f2b52cfafa1804fc11570c992b894d94 Author: Marc Kleine-Budde Date: Wed Feb 1 17:18:56 2023 +0100 can: bittiming: can_fixup_bittiming(): set effective tq The can_fixup_bittiming() function is used to validate the user-supplied low-level bit timing parameters and calculate the bitrate prescaler (brp) from the requested time quanta (tq) and the CAN clock of the controller. can_fixup_bittiming() selects the best matching integer bit rate prescaler, which may result in a different time quantum than the value specified by the user. Calculate the resulting time quantum and assign it so that the user sees the effective time quantum. Link: https://lore.kernel.org/all/20230202110854.2318594-4-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 9cf670dbe69d11c6f29284aa80d78741f038ecd4 Author: Marc Kleine-Budde Date: Tue Jan 31 17:37:39 2023 +0100 can: bittiming: can_fixup_bittiming(): use CAN_SYNC_SEG instead of 1 Commit 1c47fa6b31c2 ("can: dev: add a helper function to calculate the duration of one bit") made the constant CAN_SYNC_SEG available in a header file. The magic number 1 in can_fixup_bittiming() represents the width of the sync segment, replace it by CAN_SYNC_SEG to make the code more readable. Link: https://lore.kernel.org/all/20230202110854.2318594-3-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 89cfa63565606bf462b4fdc0bd3e91a7cece1380 Author: Marc Kleine-Budde Date: Tue Jan 31 17:11:55 2023 +0100 can: bittiming(): replace open coded variants of can_bit_time() Commit 1c47fa6b31c2 ("can: dev: add a helper function to calculate the duration of one bit") added the helper function can_bit_time(). Replace open coded variants of can_bit_time() by the helper function. Link: https://lore.kernel.org/all/20230202110854.2318594-2-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 42684d44a7f211d1c1ca64737dfc00470e5fa4a3 Author: Srinivas Pandruvada Date: Wed Feb 1 17:07:38 2023 -0800 MAINTAINERS: Add entry for TPMI driver Add entry for TPMI (Topology Aware Register and PM Capsule Interface) driver. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20230202010738.2186174-8-srinivas.pandruvada@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 6d957f1e1646039f51fe1f6c6060738f648c4c70 Author: Srinivas Pandruvada Date: Wed Feb 1 17:07:37 2023 -0800 platform/x86/intel/tpmi: ADD tpmi external interface for tpmi feature drivers Add interface to get resources and platform data. This will avoid code duplication. These interfaces includes: - Get resource count - Get resource at an index Signed-off-by: Srinivas Pandruvada Reviewed-by: Pierre-Louis Bossart Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230202010738.2186174-7-srinivas.pandruvada@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 762ed313574652ac604fb95dd601232a6e0320ef Author: Srinivas Pandruvada Date: Wed Feb 1 17:07:36 2023 -0800 platform/x86/intel/tpmi: Process CPU package mapping There is one Intel Out-of-Band (OOB) PCI device per CPU package. Since TPMI feature is exposed via OOB PCI device, there will be multiple TPMI device instances on a multi CPU package system. There are several PM features, which needs to associate APIC based CPU package ID information to a TPMI instance. For example if Intel Speed Select feature requires control of a CPU package, it needs to identify right TPMI device instance. There is one special TPMI ID (ID = 0x81) in the PFS. The MMIO region of this TPMI ID points to a mapping table: - PCI Bus ID - PCI Device ID - APIC based Package ID This mapping information can be used by any PM feature driver which requires mapping from a CPU package to a TPMI device instance. Unlike other TPMI features, device node is not created for this feature ID (0x81). Instead store the mapping information as platform data, which is part of the per PCI device TPMI instance (struct intel_tpmi_info). Later the TPMI feature drivers can get the mapping information using an interface "tpmi_get_platform_data()" Signed-off-by: Srinivas Pandruvada Reviewed-by: Pierre-Louis Bossart Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230202010738.2186174-6-srinivas.pandruvada@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 47731fd2865fcbcd0b9cdbe90fcd6583c9559631 Author: Srinivas Pandruvada Date: Wed Feb 1 17:07:35 2023 -0800 platform/x86/intel: Intel TPMI enumeration driver The TPMI (Topology Aware Register and PM Capsule Interface) provides a flexible, extendable and PCIe enumerable MMIO interface for PM features. For example Intel RAPL (Running Average Power Limit) provides a MMIO interface using TPMI. This has advantage over traditional MSR (Model Specific Register) interface, where a thread needs to be scheduled on the target CPU to read or write. Also the RAPL features vary between CPU models, and hence lot of model specific code. Here TPMI provides an architectural interface by providing hierarchical tables and fields, which will not need any model specific implementation. The TPMI interface uses a PCI VSEC structure to expose the location of MMIO region. This VSEC structure is present in the PCI configuration space of the Intel Out-of-Band (OOB) device, which is handled by the Intel VSEC driver. The Intel VSEC driver parses VSEC structures present in the PCI configuration space of the given device and creates an auxiliary device object for each of them. In particular, it creates an auxiliary device object representing TPMI that can be bound by an auxiliary driver. Introduce a TPMI driver that will bind to the TPMI auxiliary device object created by the Intel VSEC driver. The TPMI specification defines a PFS (PM Feature Structure) table. This table is present in the TPMI MMIO region. The starting address of PFS is derived from the tBIR (Bar Indicator Register) and "Address" field from the VSEC header. Each TPMI PM feature has one entry in the PFS with a unique TPMI ID and its access details. The TPMI driver creates device nodes for the supported PM features. The names of the devices created by the TPMI driver start with the "intel_vsec.tpmi-" prefix which is followed by a specific name of the given PM feature (for example, "intel_vsec.tpmi-rapl.0"). The device nodes are create by using interface "intel_vsec_add_aux()" provided by the Intel VSEC driver. Signed-off-by: Srinivas Pandruvada Reviewed-by: Pierre-Louis Bossart Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230202010738.2186174-5-srinivas.pandruvada@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 4ec5d0231d2e4aebe41152d57c6b4f1e7ea14f08 Author: Srinivas Pandruvada Date: Wed Feb 1 17:07:34 2023 -0800 platform/x86/intel/vsec: Support private data Add fields to struct intel_vsec_device, so that core module (which creates aux bus devices) can pass private data to the client drivers. For example there is one vsec device instance per CPU package. On a multi package system, this private data can be used to pass the package ID. This package id can be used by client drivers to change power settings for a specific CPU package by targeting MMIO space of the correct PCI device. Signed-off-by: Srinivas Pandruvada Acked-by: David E. Box Link: https://lore.kernel.org/r/20230202010738.2186174-4-srinivas.pandruvada@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 251a41116aebdbb7ff00fbc635b1c1a0f08119e6 Author: Srinivas Pandruvada Date: Wed Feb 1 17:07:33 2023 -0800 platform/x86/intel/vsec: Enhance and Export intel_vsec_add_aux() Remove static for intel_vsec_add_aux() and export this interface so that it can be used by other vsec related modules. This driver creates aux devices by parsing PCI-VSEC, which allows individual drivers to load on those devices. Those driver may further create more devices on aux bus by parsing the PCI MMIO region. For example, TPMI (Topology Aware Register and PM Capsule Interface) creates device nodes for power management features by parsing MMIO region. When TPMI driver creates devices, it can reuse existing function intel_vsec_add_aux() to create aux devices with TPMI device as the parent. Signed-off-by: Srinivas Pandruvada Acked-by: David E. Box Link: https://lore.kernel.org/r/20230202010738.2186174-3-srinivas.pandruvada@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit c00493dc467f3d57169f3b913e2c1ecb3a808ad1 Author: Srinivas Pandruvada Date: Wed Feb 1 17:07:32 2023 -0800 platform/x86/intel/vsec: Add TPMI ID Add TPMI (Topology Aware Register and PM Capsule Interface) VSEC ID to create an aux device. This will allow TPMI driver to enumerate on this aux device. Signed-off-by: Srinivas Pandruvada Acked-by: David E. Box Link: https://lore.kernel.org/r/20230202010738.2186174-2-srinivas.pandruvada@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 65a8fc30fb6722fc25adec6d7dd5b53b0bb85820 Author: Bernard Metzler Date: Thu Feb 2 11:10:00 2023 +0100 RDMA/siw: Fix user page pinning accounting To avoid racing with other user memory reservations, immediately account full amount of pages to be pinned. Fixes: 2251334dcac9 ("rdma/siw: application buffer management") Reported-by: Jason Gunthorpe Suggested-by: Alistair Popple Reviewed-by: Alistair Popple Signed-off-by: Bernard Metzler Link: https://lore.kernel.org/r/20230202101000.402990-1-bmt@zurich.ibm.com Signed-off-by: Leon Romanovsky commit f5e7bdd34aca0ed92a2bef913151dd234e86cb33 Author: Daniel Scally Date: Thu Feb 2 11:41:42 2023 +0000 usb: gadget: uvc: Allow creating new color matching descriptors Allow users to create new color matching descriptors in addition to the default one. These must be associated with a UVC format in order to be transmitted to the host, which is achieved by symlinking from the format to the newly created color matching descriptor - extend the uncompressed and mjpeg formats to support that linking operation. Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230202114142.300858-7-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 58f227871f798825ba44d149d578e8ffbd0d3d6d Author: Daniel Scally Date: Thu Feb 2 11:41:41 2023 +0000 usb: gadget: uvc: Make color matching attributes read/write In preparation for allowing more than the default color matching descriptor, make the color matching attributes writeable. Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230202114142.300858-6-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 4e8a720e2ed24324d2e84daad86874c47c3cbd4d Author: Daniel Scally Date: Thu Feb 2 11:41:40 2023 +0000 usb: gadget: uvc: Remove the hardcoded default color matching A hardcoded default color matching descriptor is embedded in struct f_uvc_opts but no longer has any use - remove it. Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230202114142.300858-5-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit e187408cc1de933851d03eb128c25a742bc92ecc Author: Daniel Scally Date: Thu Feb 2 11:41:39 2023 +0000 usb: gadget: uvc: Copy color matching descriptor for each frame As currently implemented the default color matching descriptor is appended after _all_ the formats and frames that the gadget is configured with. According to the UVC specifications however this is supposed to be on a per-format basis (section 3.9.2.6): "Only one instance is allowed for a given format and if present, the Color Matching descriptor shall be placed following the Video and Still Image Frame descriptors for that format." Associate the default color matching descriptor with struct uvcg_format and copy it once-per-format instead of once only. Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230202114142.300858-4-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 744eb7b821f61eceed60eb4f64227162853c9d5e Author: Daniel Scally Date: Thu Feb 2 11:41:38 2023 +0000 usb: gadget: uvc: Add struct for color matching in configs Color matching descriptors are meant to be a per-format piece of data and we need to be able to support different descriptors for different formats. As a preliminary step towards that goal, switch the default color matching configfs functionality to point to an instance of a new struct uvcg_color_matching. Use the same default values for its attributes as the currently hard-coded ones so that the interface to userspace is consistent. Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230202114142.300858-3-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit e16cab9c1596e251761d2bfb5e1467950d616963 Author: Daniel Scally Date: Thu Feb 2 11:41:37 2023 +0000 usb: uvc: Enumerate valid values for color matching The color matching descriptors defined in the UVC Specification contain 3 fields with discrete numeric values representing particular settings. Enumerate those values so that later code setting them can be more readable. Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230202114142.300858-2-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit ce33e64c1788912976b61314b56935abd4bc97ef Author: Kees Cook Date: Sat Feb 4 10:35:46 2023 -0800 USB: ene_usb6250: Allocate enough memory for full object The allocation of PageBuffer is 512 bytes in size, but the dereferencing of struct ms_bootblock_idi (also size 512) happens at a calculated offset within the allocation, which means the object could potentially extend beyond the end of the allocation. Avoid this case by just allocating enough space to catch any accesses beyond the end. Seen with GCC 13: ../drivers/usb/storage/ene_ub6250.c: In function 'ms_lib_process_bootblock': ../drivers/usb/storage/ene_ub6250.c:1050:44: warning: array subscript 'struct ms_bootblock_idi[0]' is partly outside array bounds of 'unsigned char[512]' [-Warray-bounds=] 1050 | if (le16_to_cpu(idi->wIDIgeneralConfiguration) != MS_IDI_GENERAL_CONF) | ^~ ../include/uapi/linux/byteorder/little_endian.h:37:51: note: in definition of macro '__le16_to_cpu' 37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) | ^ ../drivers/usb/storage/ene_ub6250.c:1050:29: note: in expansion of macro 'le16_to_cpu' 1050 | if (le16_to_cpu(idi->wIDIgeneralConfiguration) != MS_IDI_GENERAL_CONF) | ^~~~~~~~~~~ In file included from ../drivers/usb/storage/ene_ub6250.c:5: In function 'kmalloc', inlined from 'ms_lib_process_bootblock' at ../drivers/usb/storage/ene_ub6250.c:942:15: ../include/linux/slab.h:580:24: note: at offset [256, 512] into object of size 512 allocated by 'kmalloc_trace' 580 | return kmalloc_trace( | ^~~~~~~~~~~~~~ 581 | kmalloc_caches[kmalloc_type(flags)][index], | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 582 | flags, size); | ~~~~~~~~~~~~ Cc: Alan Stern Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20230204183546.never.849-kees@kernel.org Signed-off-by: Greg Kroah-Hartman commit 0fbd2cda92cdb00f72080665554a586f88bca821 Author: Kees Cook Date: Sat Feb 4 10:36:52 2023 -0800 usb: host: xhci: mvebu: Iterate over array indexes instead of using pointer math Walking the dram->cs array was seen as accesses beyond the first array item by the compiler. Instead, use the array index directly. This allows for run-time bounds checking under CONFIG_UBSAN_BOUNDS as well. Seen with GCC 13 with -fstrict-flex-arrays: In function 'xhci_mvebu_mbus_config', inlined from 'xhci_mvebu_mbus_init_quirk' at ../drivers/usb/host/xhci-mvebu.c:66:2: ../drivers/usb/host/xhci-mvebu.c:37:28: warning: array subscript 0 is outside array bounds of 'const struct mbus_dram_window[0]' [-Warray-bounds=] 37 | writel(((cs->size - 1) & 0xffff0000) | (cs->mbus_attr << 8) | | ~~^~~~~~ Cc: Mathias Nyman Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20230204183651.never.663-kees@kernel.org Signed-off-by: Greg Kroah-Hartman commit 7a6952fa0366d4408eb8695af1a0578c39ec718a Author: Greg Kroah-Hartman Date: Thu Feb 2 16:32:34 2023 +0100 USB: gadget: pxa27x_udc: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Link: https://lore.kernel.org/r/20230202153235.2412790-12-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 7a038a681b7df78362d9fc7013e5395a694a9d3a Author: Greg Kroah-Hartman Date: Thu Feb 2 16:32:33 2023 +0100 USB: gadget: pxa25x_udc: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Link: https://lore.kernel.org/r/20230202153235.2412790-11-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit e3965acaf3739fde9d74ad82979b46d37c6c208f Author: Greg Kroah-Hartman Date: Thu Feb 2 16:32:32 2023 +0100 USB: gadget: lpc32xx_udc: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Cc: Jakob Koschel Cc: Miaoqian Lin Acked-by: Vladimir Zapolskiy Link: https://lore.kernel.org/r/20230202153235.2412790-10-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit a91c99b1fe5c6f7e52fb932ad9e57ec7cfe913ec Author: Greg Kroah-Hartman Date: Thu Feb 2 16:32:31 2023 +0100 USB: gadget: bcm63xx_udc: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Cc: Kevin Cernekee Link: https://lore.kernel.org/r/20230202153235.2412790-9-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 73f4451368663ad28daa67980c6dd11d83b303eb Author: Greg Kroah-Hartman Date: Thu Feb 2 16:32:30 2023 +0100 USB: gadget: gr_udc: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Cc: Jakob Koschel Link: https://lore.kernel.org/r/20230202153235.2412790-8-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit c26e682afc14caa87d44beed271eec8991e93c65 Author: Greg Kroah-Hartman Date: Thu Feb 2 16:32:29 2023 +0100 USB: isp1362: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Cc: Vincent Mailhol Link: https://lore.kernel.org/r/20230202153235.2412790-7-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit a95f62d5813facbec20ec087472eb313ee5fa8af Author: Greg Kroah-Hartman Date: Thu Feb 2 16:32:28 2023 +0100 USB: isp116x: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Cc: Olav Kongas Link: https://lore.kernel.org/r/20230202153235.2412790-6-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 6b4040f452037a7e95472577891d57c6b18c89c5 Author: Greg Kroah-Hartman Date: Thu Feb 2 16:32:27 2023 +0100 USB: fotg210: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230202153235.2412790-5-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit e1523c4dbc54e164638ff8729d511cf91e27be04 Author: Greg Kroah-Hartman Date: Thu Feb 2 16:32:26 2023 +0100 USB: sl811: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Cc: Vincent Mailhol Link: https://lore.kernel.org/r/20230202153235.2412790-4-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 0a3f82c79c86278e7f144564b1cb6cc5c3657144 Author: Greg Kroah-Hartman Date: Thu Feb 2 16:32:25 2023 +0100 USB: uhci: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Cc: Alan Stern Link: https://lore.kernel.org/r/20230202153235.2412790-3-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 8f4d25eba599c4bd4b5ea8ae8752cda480a9d563 Author: Greg Kroah-Hartman Date: Thu Feb 2 16:32:24 2023 +0100 USB: ULPI: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230202153235.2412790-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit ff35f3ea3baba5b81416ac02d005cfbf6dd182fa Author: Greg Kroah-Hartman Date: Thu Feb 2 16:32:23 2023 +0100 USB: chipidea: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Cc: Peter Chen Link: https://lore.kernel.org/r/20230202153235.2412790-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 93fd565919cf897adf7e1da81cace1a46e4db7f4 Author: Alan Stern Date: Fri Feb 3 14:32:09 2023 -0500 net: USB: Fix wrong-direction WARNING in plusb.c The syzbot fuzzer detected a bug in the plusb network driver: A zero-length control-OUT transfer was treated as a read instead of a write. In modern kernels this error provokes a WARNING: usb 1-1: BOGUS control dir, pipe 80000280 doesn't match bRequestType c0 WARNING: CPU: 0 PID: 4645 at drivers/usb/core/urb.c:411 usb_submit_urb+0x14a7/0x1880 drivers/usb/core/urb.c:411 Modules linked in: CPU: 1 PID: 4645 Comm: dhcpcd Not tainted 6.2.0-rc6-syzkaller-00050-g9f266ccaa2f5 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 RIP: 0010:usb_submit_urb+0x14a7/0x1880 drivers/usb/core/urb.c:411 ... 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 __usbnet_read_cmd+0xb9/0x390 drivers/net/usb/usbnet.c:2010 usbnet_read_cmd+0x96/0xf0 drivers/net/usb/usbnet.c:2068 pl_vendor_req drivers/net/usb/plusb.c:60 [inline] pl_set_QuickLink_features drivers/net/usb/plusb.c:75 [inline] pl_reset+0x2f/0xf0 drivers/net/usb/plusb.c:85 usbnet_open+0xcc/0x5d0 drivers/net/usb/usbnet.c:889 __dev_open+0x297/0x4d0 net/core/dev.c:1417 __dev_change_flags+0x587/0x750 net/core/dev.c:8530 dev_change_flags+0x97/0x170 net/core/dev.c:8602 devinet_ioctl+0x15a2/0x1d70 net/ipv4/devinet.c:1147 inet_ioctl+0x33f/0x380 net/ipv4/af_inet.c:979 sock_do_ioctl+0xcc/0x230 net/socket.c:1169 sock_ioctl+0x1f8/0x680 net/socket.c:1286 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x197/0x210 fs/ioctl.c:856 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 The fix is to call usbnet_write_cmd() instead of usbnet_read_cmd() and remove the USB_DIR_IN flag. Reported-and-tested-by: syzbot+2a0e7abd24f1eb90ce25@syzkaller.appspotmail.com Signed-off-by: Alan Stern Fixes: 090ffa9d0e90 ("[PATCH] USB: usbnet (9/9) module for pl2301/2302 cables") CC: stable@vger.kernel.org Link: https://lore.kernel.org/r/00000000000052099f05f3b3e298@google.com/ Link: https://lore.kernel.org/r/Y91hOew3nW56Ki4O@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit 9c0e6fbda803dfd66c05c1f683069b46bd4cbba0 Author: Andy Shevchenko Date: Thu Feb 2 17:17:36 2023 +0200 usb: gadget: configfs: Use memcpy_and_pad() Instead of zeroing some memory and then copying data in part or all of it, use memcpy_and_pad(). This avoids writing some memory twice and should save a few cycles. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230202151736.64552-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit be308d68785b205e483b3a0c61ba3a82da468f2c Author: Greg Kroah-Hartman Date: Thu Feb 2 16:28:20 2023 +0100 USB: dwc3: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Note, the root dentry for the debugfs directory for the device needs to be saved so we don't have to keep looking it up, which required a bit more refactoring to properly create and remove it when needed. Reported-by: Bruce Chen Reported-by: Cixi Geng Tested-by: Cixi Geng Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20230202152820.2409908-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 25746a3fa2dad79a6dfc42522b5bb38b4bdec844 Author: Greg Kroah-Hartman Date: Mon Feb 6 13:44:22 2023 +0100 drm/i915: fix up merge with usb-next branch In the manual fixup of the list_count_nodes() logic in drivers/gpu/drm/i915/gt/intel_execlists_submission.c in the usb-next branch, I missed that the print modifier was incorrect, resulting in loads of build warnings on 32bit systems. Fix this up by using "%su" instead of "%lu". Reported-by: kernel test robot Fixes: 924fb3ec50f5 ("Merge 6.2-rc7 into usb-next") Link: https://lore.kernel.org/r/20230206124422.2266892-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit f33e0c893b22bf94d7985f1f2aa3872237560c74 Author: Borislav Petkov (AMD) Date: Mon Jan 30 13:48:04 2023 +0100 x86/microcode/core: Return an error only when necessary Return an error from the late loading function which is run on each CPU only when an error has actually been encountered during the update. Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230130161709.11615-5-bp@alien8.de commit 7ff6edf4fef38ab404ee7861f257e28eaaeed35f Author: Borislav Petkov (AMD) Date: Thu Jan 26 16:26:17 2023 +0100 x86/microcode/AMD: Fix mixed steppings support The AMD side of the loader has always claimed to support mixed steppings. But somewhere along the way, it broke that by assuming that the cached patch blob is a single one instead of it being one per *node*. So turn it into a per-node one so that each node can stash the blob relevant for it. [ NB: Fixes tag is not really the exactly correct one but it is good enough. ] Fixes: fe055896c040 ("x86/microcode: Merge the early microcode loader") Signed-off-by: Borislav Petkov (AMD) Cc: # 2355370cd941 ("x86/microcode/amd: Remove load_microcode_amd()'s bsp parameter") Cc: # a5ad92134bd1 ("x86/microcode/AMD: Add a @cpu parameter to the reloading functions") Link: https://lore.kernel.org/r/20230130161709.11615-4-bp@alien8.de commit ab809efaeba0cca20cfcda23852b0ee958f6ea69 Merge: 17f248aa8664f d2d11f342b179 Author: Arnaldo Carvalho de Melo Date: Mon Feb 6 09:25:56 2023 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core To sync with libbpf, etc. Signed-off-by: Arnaldo Carvalho de Melo commit 84549c816dc317f012798e706e58669b3b013604 Author: Francesco Dolcini Date: Tue Jan 24 11:44:44 2023 +0100 mtd: parsers: ofpart: add workaround for #size-cells 0 Add a mechanism to handle the case in which partitions are present as direct child of the nand controller node and #size-cells is set to <0>. This could happen if the nand-controller node in the DTS is supposed to have #size-cells set to 0, but for some historical reason/bug it was set to 1 in the past, and the firmware (e.g. U-Boot) is adding the partition as direct children of the nand-controller defaulting to #size-cells being to 1. This prevents a real boot failure on colibri-imx7 that happened during v6.1 development cycles. Link: https://lore.kernel.org/all/Y4dgBTGNWpM6SQXI@francesco-nb.int.toradex.com/ Link: https://lore.kernel.org/all/20221202071900.1143950-1-francesco@dolcini.it/ Signed-off-by: Francesco Dolcini Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230124104444.330913-1-francesco@dolcini.it commit ef3e6327ff04af8527b3558e023e99f1cc241bce Author: Samuel Holland Date: Sat Feb 4 08:35:20 2023 -0600 mtd: rawnand: sunxi: Precompute the ECC_CTL register value The value computed by this function never changes for a given chip. Compute the whole register value once up front, instead of every time the ECC engine is enabled. Signed-off-by: Samuel Holland Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230204143520.9682-4-samuel@sholland.org commit ac1c7072e38e492b27353a6e7b144e64cbbf9495 Author: Samuel Holland Date: Sat Feb 4 08:35:19 2023 -0600 mtd: rawnand: sunxi: Embed sunxi_nand_hw_ecc by value The sunxi_nand_hw_ecc object is not shared, and it has the same lifetime as the sunxi_nand_chip which points to it, so we can embed it in the outer structure instead of using a pointer. This removes an unnecessary memory allocation and simplifies the error handling code. Signed-off-by: Samuel Holland Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230204143520.9682-3-samuel@sholland.org commit 3998a4611e8be2e9b5833e7aae29619ea0305437 Author: Samuel Holland Date: Sat Feb 4 08:35:18 2023 -0600 mtd: rawnand: sunxi: Update OOB layout to match hardware When using the hardware ECC engine, the OOB data is made available in the NFC_REG_USER_DATA registers, as one 32-bit word per ECC step. Any additional bytes are only accessible through raw reads and software descrambling. For efficiency, and to match the vendor driver, ignore these extra bytes when using hardware ECC. Note that until commit 34569d869532 ("mtd: rawnand: sunxi: Fix the size of the last OOB region"), this extra free area was reported with length zero, so this is not a functional change for any stable kernel user. Signed-off-by: Samuel Holland Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230204143520.9682-2-samuel@sholland.org commit 2e7851437731cf51010568118efccfd13ee97de0 Author: Kathiravan T Date: Mon Feb 6 12:42:09 2023 +0530 dt-bindings: pinctrl: qcom: add IPQ5332 pinctrl Add device tree bindings for IPQ5332 TLMM block. Signed-off-by: Kathiravan T Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230206071217.29313-2-quic_kathirav@quicinc.com Signed-off-by: Linus Walleij commit 315dffb843f75cec4458714f4d151d5775e797de Author: Krzysztof Kozlowski Date: Fri Feb 3 17:48:50 2023 +0100 dt-bindings: pinctrl: qcom: lpass-lpi: correct GPIO name pattern Narrow the pattern of possible GPIO names for pin controllers: - SC7280 LPASS: GPIOs 0-14 - SM8250 LPASS: GPIOs 0-13 - SM8450 LPASS: GPIOs 0-22 - SC8280XP LPASS: GPIOs 0-18 Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230203164854.390080-1-krzysztof.kozlowski@linaro.org Link: https://lore.kernel.org/r/20230203164854.390080-2-krzysztof.kozlowski@linaro.org Link: https://lore.kernel.org/r/20230203164854.390080-3-krzysztof.kozlowski@linaro.org Link: https://lore.kernel.org/r/20230203164854.390080-4-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 5a6ca1f240d6a268e1f63387a676b2cf9669fe21 Author: Krzysztof Kozlowski Date: Fri Feb 3 18:46:45 2023 +0100 pinctrl: qcom: pinctrl-sm8550-lpass-lpi: add SM8550 LPASS Add druver for pin controller in Low Power Audio SubSystem (LPASS). The driver is similar to SM8450 LPASS pin controller, with differences in few pin groups (qua_mi2s -> i2s0). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230203174645.597053-2-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit 268e97ccc311492707f3bc4b761e77605effcfb2 Author: Krzysztof Kozlowski Date: Fri Feb 3 18:46:44 2023 +0100 dt-bindings: pinctrl: qcom,sm8550-lpass-lpi-pinctrl: add SM8550 LPASS Add bidings for pin controller in Low Power Audio SubSystem (LPASS). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230203174645.597053-1-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit a5ad92134bd153a9ccdcddf09a95b088f36c3cce Author: Borislav Petkov (AMD) Date: Thu Jan 26 00:08:03 2023 +0100 x86/microcode/AMD: Add a @cpu parameter to the reloading functions Will be used in a subsequent change. Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230130161709.11615-3-bp@alien8.de commit 1c4e5c470a56f7f7c649c0c70e603abc1eab15c4 Author: Claudiu Beznea Date: Fri Feb 3 15:27:14 2023 +0200 pinctrl: at91: use devm_kasprintf() to avoid potential leaks Use devm_kasprintf() instead of kasprintf() to avoid any potential leaks. At the moment drivers have no remove functionality thus there is no need for fixes tag. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230203132714.1931596-1-claudiu.beznea@microchip.com Signed-off-by: Linus Walleij commit f7401f6bc7ae3fd20581bbf3cfa22f5269d1d5aa Merge: 3e47c0dfc7072 47d72bbb6c0f7 Author: Arnd Bergmann Date: Mon Feb 6 12:05:34 2023 +0100 Merge tag 'ti-k3-dt-for-v6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into arm/dt TI K3 device tree updates for v6.3 New features: J784S4 SoC and EVM support AM68 and AM69 StarterKit, phyBOARD-Electra-AM642, Siemens IoT2050 M.2 AM62A7 SK additional peripherals AM62 SK USB support Non critical fixes AM62: McSPI Clock ID fixes MMC TAP value updates J7200: pinmux range update All: Cache DT node fixes Cleanups: Reorder dts Makefile entries alphabetically * tag 'ti-k3-dt-for-v6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: (25 commits) arm64: dts: ti: Makefile: Rearrange entries alphabetically arch: arm64: dts: Add support for AM69 Starter Kit dt-bindings: arm: ti: Add binding for AM69 Starter Kit arm64: dts: ti: iot2050: Add support for M.2 variant dt-bindings: arm: ti: Add binding for Siemens IOT2050 M.2 variant arm64: dts: ti: iot2050: Add layout of OSPI flash arm64: dts: ti: k3-j7200: Fix wakeup pinmux range arm64: dts: ti: k3-am68-sk: Add support for AM68 SK base board arm64: dts: ti: Add initial support for AM68 SK System on Module dt-bindings: arm: ti: Add binding for AM68 SK arm64: dts: Update cache properties for ti arm64: dts: ti: Add support for phyBOARD-Electra-AM642 dt-bindings: arm: ti: Add bindings for PHYTEC AM64x based hardware arm64: dts: ti: k3-am62a7-sk: Enable USB1 node arm64: dts: ti: k3-am62a7-sk: Enable ethernet port arm64: dts: ti: k3-am62a-main: Add more peripheral nodes arm64: dts: ti: k3-am62a-mcu: Add MCU domain peripherals arm64: dts: ti: Add support for J784S4 EVM board arm64: dts: ti: Add initial support for J784S4 SoC dt-bindings: pinctrl: k3: Introduce pinmux definitions for J784s4 ... Link: https://lore.kernel.org/r/642cf238-43e5-d6fa-68b5-a9dfbc0277bf@ti.com Signed-off-by: Arnd Bergmann commit e52d5388bd6f4baf6ad9ace983381b5ae659bd3f Author: Linus Walleij Date: Fri Feb 3 15:04:04 2023 +0100 ARM: defconfig: Add IOSCHED_BFQ to the default configs ARM systems are often memory constrained and more often than not use slow single-channel storage such as flash memory or MMC/SD-cards. For any interactive systems (such as mobile phones, tablets, chromebooks...) the BFQ I/O scheduler will be desireable. Make sure the BFQ I/O scheduler is available on these systems. Loongarch, MIPS, m68k, UM and S390 has also enabled BFQ in their defconfigs, cf commit b495dfed706c4c5873c0dab8930ad6eb1d276a6c "um: Cleanup CONFIG_IOSCHED_CFQ" where the motivation is that it replaces the former CFQ scheduler. Cc: Paolo Valente Cc: Krzysztof Kozlowski Reviewed-by: Ulf Hansson Acked-by: Arnd Bergmann Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230203140404.1125850-1-linus.walleij@linaro.org Signed-off-by: Arnd Bergmann commit 7d47f6ffa572fdd24d0c3364cead30f5ff7cc2da Merge: e26f8413cc925 22991d8d57251 Author: Arnd Bergmann Date: Mon Feb 6 12:02:59 2023 +0100 Merge tag 'asahi-soc-rtkit-pmgr-6.3' of https://github.com/AsahiLinux/linux into soc/drivers Apple SoC RTKit/PMGR updates for 6.3. This time around we have a PMGR change to allow IRQ-safe usage, RTKit crash register dump decoding, and a bunch of RTKit API changes used by upcoming drivers. * tag 'asahi-soc-rtkit-pmgr-6.3' of https://github.com/AsahiLinux/linux: soc: apple: rtkit: Add register dump decoding to crashlog soc: apple: rtkit: Export non-devm init/free functions soc: apple: rtkit: Add a private pointer to apple_rtkit_shmem soc: apple: apple-pmgr-pwrstate: Switch to IRQ-safe mode soc: apple: rtkit: Add apple_rtkit_idle() function Link: https://lore.kernel.org/r/4790bdc4-b6e2-228b-771f-023363f65fb3@marcan.st Signed-off-by: Arnd Bergmann commit e26f8413cc925b765f8ce55b1ef600fe09191252 Merge: 426082a214db2 7ecd4e5f5de23 Author: Arnd Bergmann Date: Mon Feb 6 12:01:59 2023 +0100 Merge tag 'samsung-drivers-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/drivers Samsung SoC driver changes for v6.3 Deprecate syscon phandle to the PMU node in MIPI and DP video phy drivers in favor of putting the device nodes directly under the PMU nodes. This better reflects device hierarchy and allows later to solve dtc W=1 and dtbs_check warnings. * tag 'samsung-drivers-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: phy: samsung,mipi-video-phy: deprecate syscon phandle phy: samsung,dp-video-phy: deprecate syscon phandle dt-bindings: phy: samsung,mipi-video-phy: deprecate syscon phandle dt-bindings: phy: samsung,dp-video-phy: deprecate syscon phandle MAINTAINERS: arm64: tesla: correct pattern for directory dt-bindings: soc: samsung: exynos-sysreg: correct indentation for deprecated dt-bindings: soc: samsung: exynos-sysreg: add dedicated SYSREG compatibles to Exynosautov9 dt-bindings: soc: samsung: exynos-sysreg: add dedicated SYSREG compatibles to Exynos850 dt-bindings: soc: samsung: exynos-sysreg: Add tesla FSD sysreg compatibles dt-bindings: soc: samsung: exynos-sysreg: add clocks for Exynos850 dt-bindings: soc: samsung: exynos-sysreg: add dedicated SYSREG compatibles to Exynos5433 dt-bindings: soc: samsung: exynos-sysreg: split from syscon Link: https://lore.kernel.org/r/20230205144657.951749-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit c21adf256f8dcfbc07436d45be4ba2edf7a6f463 Merge: b601135e8d704 66b2c338adce5 Author: David S. Miller Date: Mon Feb 6 10:16:55 2023 +0000 Merge branch 'tuntap-socket-uid' Pietro Borrello says: ==================== tuntap: correctly initialize socket uid sock_init_data() assumes that the `struct socket` passed in input is contained in a `struct socket_alloc` allocated with sock_alloc(). However, tap_open() and tun_chr_open() pass a `struct socket` embedded in a `struct tap_queue` and `struct tun_file` respectively, both allocated with sk_alloc(). This causes a type confusion when issuing a container_of() with SOCK_INODE() in sock_init_data() which results in assigning a wrong sk_uid to the `struct sock` in input. Due to the type confusion, both sockets happen to have their uid set to 0, i.e. root. While it will be often correct, as tuntap devices require CAP_NET_ADMIN, it may not always be the case. Not sure how widespread is the impact of this, it seems the socket uid may be used for network filtering and routing, thus tuntap sockets may be incorrectly managed. Additionally, it seems a socket with an incorrect uid may be returned to the vhost driver when issuing a get_socket() on a tuntap device in vhost_net_set_backend(). Fix the bugs by adding and using sock_init_data_uid(), which explicitly takes a uid as argument. Signed-off-by: Pietro Borrello --- Changes in v3: - Fix the bug by defining and using sock_init_data_uid() - Link to v2: https://lore.kernel.org/r/20230131-tuntap-sk-uid-v2-0-29ec15592813@diag.uniroma1.it Changes in v2: - Shorten and format comments - Link to v1: https://lore.kernel.org/r/20230131-tuntap-sk-uid-v1-0-af4f9f40979d@diag.uniroma1.it ==================== Signed-off-by: David S. Miller commit 66b2c338adce580dfce2199591e65e2bab889cff Author: Pietro Borrello Date: Sat Feb 4 17:39:22 2023 +0000 tap: tap_open(): correctly initialize socket uid sock_init_data() assumes that the `struct socket` passed in input is contained in a `struct socket_alloc` allocated with sock_alloc(). However, tap_open() passes a `struct socket` embedded in a `struct tap_queue` allocated with sk_alloc(). This causes a type confusion when issuing a container_of() with SOCK_INODE() in sock_init_data() which results in assigning a wrong sk_uid to the `struct sock` in input. On default configuration, the type confused field overlaps with padding bytes between `int vnet_hdr_sz` and `struct tap_dev __rcu *tap` in `struct tap_queue`, which makes the uid of all tap sockets 0, i.e., the root one. Fix the assignment by using sock_init_data_uid(). Fixes: 86741ec25462 ("net: core: Add a UID field to struct sock.") Signed-off-by: Pietro Borrello Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit a096ccca6e503a5c575717ff8a36ace27510ab0a Author: Pietro Borrello Date: Sat Feb 4 17:39:21 2023 +0000 tun: tun_chr_open(): correctly initialize socket uid sock_init_data() assumes that the `struct socket` passed in input is contained in a `struct socket_alloc` allocated with sock_alloc(). However, tun_chr_open() passes a `struct socket` embedded in a `struct tun_file` allocated with sk_alloc(). This causes a type confusion when issuing a container_of() with SOCK_INODE() in sock_init_data() which results in assigning a wrong sk_uid to the `struct sock` in input. On default configuration, the type confused field overlaps with the high 4 bytes of `struct tun_struct __rcu *tun` of `struct tun_file`, NULL at the time of call, which makes the uid of all tun sockets 0, i.e., the root one. Fix the assignment by using sock_init_data_uid(). Fixes: 86741ec25462 ("net: core: Add a UID field to struct sock.") Signed-off-by: Pietro Borrello Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 584f3742890e966d2f0a1f3c418c9ead70b2d99e Author: Pietro Borrello Date: Sat Feb 4 17:39:20 2023 +0000 net: add sock_init_data_uid() Add sock_init_data_uid() to explicitly initialize the socket uid. To initialise the socket uid, sock_init_data() assumes a the struct socket* sock is always embedded in a struct socket_alloc, used to access the corresponding inode uid. This may not be true. Examples are sockets created in tun_chr_open() and tap_open(). Fixes: 86741ec25462 ("net: core: Add a UID field to struct sock.") Signed-off-by: Pietro Borrello Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 6bddf115d0baed3095339024d942d7d1b5e7e4d6 Author: Vasily Gorbik Date: Thu Feb 2 19:22:35 2023 +0100 s390/boot: avoid potential amode31 truncation Fixes: bb1520d581a3 ("s390/mm: start kernel with DAT enabled") Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit d1725ca60e8ff7aef3573d29231251c2838ca532 Author: Vasily Gorbik Date: Thu Feb 2 19:21:38 2023 +0100 s390/boot: move detect_facilities() after cmd line parsing Facilities setup has to be done after "facilities" command line option parsing, it might set extra or remove existing facilities bits for testing purposes. Fixes: bb1520d581a3 ("s390/mm: start kernel with DAT enabled") Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 26ced8124a118e8c59d524da9d9f8d5e30502e60 Author: Vasily Gorbik Date: Mon Jan 30 02:11:39 2023 +0100 s390/kasan: avoid mapping KASAN shadow for standby memory KASAN common code is able to handle memory hotplug and create KASAN shadow memory on a fly. Online memory ranges are available from mem_detect, use this information to avoid mapping KASAN shadow for standby memory. Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 8382c963249dafcbe809dea307c2de16d5645579 Author: Vasily Gorbik Date: Fri Jan 27 17:08:29 2023 +0100 s390/boot: avoid page tables memory in kaslr If kernel is build without KASAN support there is a chance that kernel image is going to be positioned by KASLR code to overlap with identity mapping page tables. When kernel is build with KASAN support enabled memory which is potentially going to be used for page tables and KASAN shadow mapping is accounted for in KASLR with the use of kasan_estimate_memory_needs(). Split this function and introduce vmem_estimate_memory_needs() to cover decompressor's vmem identity mapping page tables. Fixes: bb1520d581a3 ("s390/mm: start kernel with DAT enabled") Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 3615d01114047ffce3a0942c21e6402c7b49bb3f Author: Vasily Gorbik Date: Mon Jan 30 00:57:12 2023 +0100 s390/mem_detect: add get_mem_detect_online_total() Add a function to get online memory in total. It is supposed to be used in the decompressor as well as during early kernel startup. Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit bf64f0517e5d0d8f3248143fc49535c1d1594b4f Author: Vasily Gorbik Date: Sat Jan 28 23:55:04 2023 +0100 s390/mem_detect: handle online memory limit just once Introduce mem_detect_truncate() to cut any online memory ranges above established identity mapping size, so that mem_detect users wouldn't have to do it over and over again. Suggested-by: Alexander Gordeev Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 22476f47b6b7fb7d066c71f67ebc11892adb0849 Author: Vasily Gorbik Date: Mon Jan 23 12:49:47 2023 +0100 s390/boot: fix mem_detect extended area allocation Allocation of mem_detect extended area was not considered neither in commit 9641b8cc733f ("s390/ipl: read IPL report at early boot") nor in commit b2d24b97b2a9 ("s390/kernel: add support for kernel address space layout randomization (KASLR)"). As a result mem_detect extended theoretically may overlap with ipl report or randomized kernel image position. But as mem_detect code will allocate extended area only upon exceeding 255 online regions (which should alternate with offline memory regions) it is not seen in practice. To make sure mem_detect extended area does not overlap with ipl report or randomized kernel position extend usage of "safe_addr". Make initrd handling and mem_detect extended area allocation code move it further right and make KASLR takes in into consideration as well. Fixes: 9641b8cc733f ("s390/ipl: read IPL report at early boot") Fixes: b2d24b97b2a9 ("s390/kernel: add support for kernel address space layout randomization (KASLR)") Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit eb33f9eb304a4c18beb5ba6362eaa5c4beaf40d8 Author: Vasily Gorbik Date: Fri Jan 27 14:57:43 2023 +0100 s390/mem_detect: rely on diag260() if sclp_early_get_memsize() fails In case sclp_early_get_memsize() fails but diag260() succeeds make sure some sane value is returned. This error scenario is highly unlikely, but this change makes system able to boot in such case. Suggested-by: Alexander Gordeev Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 18e5cb7a5ce30d0fd28c94551509afe43b100118 Author: Heiko Carstens Date: Thu Feb 2 21:47:11 2023 +0100 s390/diag: make __diag8c_tmp_amode31 static Get rid of this sparse warning: arch/s390/kernel/diag.c:69:29: warning: symbol '__diag8c_tmp_amode31' was not declared. Should it be static? Fixes: fbaee7464fbb ("s390/tty3270: add support for diag 8c") Signed-off-by: Heiko Carstens commit 1e2eb49bb14760cc7ec0c301c705410628bee8e9 Author: Heiko Carstens Date: Thu Feb 2 21:36:07 2023 +0100 s390/rethook: add local rethook header file Compiling the kernel with CONFIG_KPROBES disabled, but CONFIG_RETHOOK enabled, results in this sparse warning: arch/s390/kernel/rethook.c:26:15: warning: no previous prototype for 'arch_rethook_trampoline_callback' [-Wmissing-prototypes] 26 | unsigned long arch_rethook_trampoline_callback(struct pt_regs *regs) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Add a local rethook header file similar to riscv to address this. Reported-by: kernel test robot Fixes: 1a280f48c0e4 ("s390/kprobes: replace kretprobe with rethook") Link: https://lore.kernel.org/all/202302030102.69dZIuJk-lkp@intel.com Signed-off-by: Heiko Carstens commit fb9293b9f32d01ee491606a3655054d539b89f66 Author: Vasily Gorbik Date: Sat Jan 28 18:06:40 2023 +0100 s390/vmem: remove unnecessary KASAN checks Kasan shadow memory area has been moved to the end of kernel address space since commit 9a39abb7c9aa ("s390/boot: simplify and fix kernel memory layout setup"), therefore skipping any memory ranges above VMALLOC_START in empty page tables cleanup code already handles KASAN shadow memory intersection case and explicit checks could be removed. Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 108303b0a2d27cb14eed565e33e64ad9eefe5d7e Author: Vasily Gorbik Date: Sat Jan 28 17:35:12 2023 +0100 s390/vmem: fix empty page tables cleanup under KASAN Commit b9ff81003cf1 ("s390/vmem: cleanup empty page tables") introduced empty page tables cleanup in vmem code, but when the kernel is built with KASAN enabled the code has no effect due to wrong KASAN shadow memory intersection condition, which effectively ignores any memory range below KASAN shadow. Fix intersection condition to make code work as anticipated. Fixes: b9ff81003cf1 ("s390/vmem: cleanup empty page tables") Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit dfca37d36b746a066bf4d62bce3276c7639d8f09 Author: Vasily Gorbik Date: Fri Jan 27 23:27:18 2023 +0100 s390/kasan: update kasan memory layout note Kasan shadow memory area has been moved to the end of kernel address space since commit 9a39abb7c9aa ("s390/boot: simplify and fix kernel memory layout setup"). Change kasan memory layout note accordingly. Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 3400c35a4090704e6c465449616ab7e67a9209e7 Author: Vasily Gorbik Date: Fri Jan 27 14:03:07 2023 +0100 s390/mem_detect: fix detect_memory() error handling Currently if for some reason sclp_early_read_info() fails, sclp_early_get_memsize() will not set max_physmem_end and it will stay uninitialized. Any garbage value other than 0 will lead to detect_memory() taking wrong path or returning a garbage value as max_physmem_end. To avoid that simply initialize max_physmem_end. Fixes: 73045a08cf55 ("s390: unify identity mapping limits handling") Reported-by: Alexander Gordeev Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 03d4907396f30d1fbe37b67f16eaba9f0b6c3702 Author: Heiko Carstens Date: Tue Jan 31 19:50:25 2023 +0100 s390/hmcdrv: use strscpy() instead of strlcpy() Given that strlcpy() is deprecated use strscpy() instead. Signed-off-by: Heiko Carstens commit 6bb361d5d8eb1dbc9e0b190eeee27a2ac4d1119f Author: Sven Schnelle Date: Sun Jan 29 16:39:19 2023 +0100 s390/ipl: add loadparm parameter to eckd ipl/reipl data commit 87fd22e0ae92 ("s390/ipl: add eckd support") missed to add the loadparm attribute to the new eckd ipl/reipl data. Fixes: 87fd22e0ae92 ("s390/ipl: add eckd support") Cc: Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Signed-off-by: Heiko Carstens commit c676aac66f5b2b03a1090bc6b1891486255f7159 Author: Sven Schnelle Date: Sun Jan 29 16:36:03 2023 +0100 s390/ipl: add DEFINE_GENERIC_LOADPARM() In the current code each reipl type implements its own pair of loadparm show/store functions. Add a macro to deduplicate the code a bit. Reviewed-by: Heiko Carstens Signed-off-by: Sven Schnelle Fixes: 87fd22e0ae92 ("s390/ipl: add eckd support") Cc: Signed-off-by: Heiko Carstens commit 2355370cd941cbb20882cc3f34460f9f2b8f9a18 Author: Borislav Petkov (AMD) Date: Tue Jan 17 23:59:24 2023 +0100 x86/microcode/amd: Remove load_microcode_amd()'s bsp parameter It is always the BSP. No functional changes. Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230130161709.11615-2-bp@alien8.de commit b601135e8d704f3218efaf07cdb2ebf310aedc2a Merge: 8437114593910 06b1c9110ad1d Author: David S. Miller Date: Mon Feb 6 10:06:44 2023 +0000 Merge branch 'ENETC-mqprio-taprio-cleanup' Vladimir Oltean says: ==================== net: ENETC mqprio/taprio cleanup Please excuse the increased patch set size compared to v4's 15 patches, but Claudiu stirred up the pot :) when he pointed out that the mqprio TXQ validation procedure is still incorrect, so I had to fix that, and then do some consolidation work so that taprio doesn't duplicate mqprio's bugs. Compared to v4, 3 patches are new and 1 was dropped for now ("net/sched: taprio: mask off bits in gate mask that exceed number of TCs"), since there's not really much to gain from it. Since the previous patch set has largely been reviewed, I hope that a delta overview will help and make up for the large size. v4->v5: - new patches: "[08/17] net/sched: mqprio: allow reverse TC:TXQ mappings" "[11/17] net/sched: taprio: centralize mqprio qopt validation" "[12/17] net/sched: refactor mqprio qopt reconstruction to a library function" - changed patches worth revisiting: "[09/17] net/sched: mqprio: allow offloading drivers to request queue count validation" v4 at: https://patchwork.kernel.org/project/netdevbpf/cover/20230130173145.475943-1-vladimir.oltean@nxp.com/ v3->v4: - adjusted patch 07/15 to not remove "#include " from ti cpsw https://patchwork.kernel.org/project/netdevbpf/cover/20230127001516.592984-1-vladimir.oltean@nxp.com/ v2->v3: - move min_num_stack_tx_queues definition so it doesn't conflict with the ethtool mm patches I haven't submitted yet for enetc (and also to make use of a 4 byte hole) - warn and mask off excess TCs in gate mask instead of failing - finally CC qdisc maintainers v2 at: https://patchwork.kernel.org/project/netdevbpf/patch/20230126125308.1199404-16-vladimir.oltean@nxp.com/ v1->v2: - patches 1->4 are new - update some header inclusions in drivers - fix typo (said "taprio" instead of "mqprio") - better enetc mqprio error handling - dynamically reconstruct mqprio configuration in taprio offload - also let stmmac and tsnep use per-TXQ gate_mask v1 (RFC) at: https://patchwork.kernel.org/project/netdevbpf/cover/20230120141537.1350744-1-vladimir.oltean@nxp.com/ The main goal of this patch set is to make taprio pass the mqprio queue configuration structure down to ndo_setup_tc() - patch 13/17. But mqprio itself is not in the best shape currently, so there are some consolidation patches on that as well. Next, there are some consolidation patches in the enetc driver's handling of TX queues and their traffic class assignment. Then, there is a consolidation between the TX queue configuration for mqprio and taprio. Finally, there is a change in the meaning of the gate_mask passed by taprio through ndo_setup_tc(). We introduce a capability through which drivers can request the gate mask to be per TXQ. The default is changed so that it is per TC. ==================== Signed-off-by: David S. Miller commit 06b1c9110ad1dd5f430df173045efef2f3bcb6f1 Author: Vladimir Oltean Date: Sat Feb 4 15:53:07 2023 +0200 net: enetc: act upon mqprio queue config in taprio offload We assume that the mqprio queue configuration from taprio has a simple 1:1 mapping between prio and traffic class, and one TX queue per TC. That might not be the case. Actually parse and act upon the mqprio config. Signed-off-by: Vladimir Oltean Reviewed-by: Jacob Keller Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 1a353111b6d4a03880f9b02824dcbc6c79f7cc5b Author: Vladimir Oltean Date: Sat Feb 4 15:53:06 2023 +0200 net: enetc: act upon the requested mqprio queue configuration Regardless of the requested queue count per traffic class, the enetc driver allocates a number of TX rings equal to the number of TCs, and hardcodes a queue configuration of "1@0 1@1 ... 1@max-tc". Other configurations are silently ignored and treated the same. Improve that by allowing what the user requests to be actually fulfilled. This allows more than one TX ring per traffic class. For example: $ tc qdisc add dev eno0 root handle 1: mqprio num_tc 4 \ map 0 0 1 1 2 2 3 3 queues 2@0 2@2 2@4 2@6 [ 146.267648] fsl_enetc 0000:00:00.0 eno0: TX ring 0 prio 0 [ 146.273451] fsl_enetc 0000:00:00.0 eno0: TX ring 1 prio 0 [ 146.283280] fsl_enetc 0000:00:00.0 eno0: TX ring 2 prio 1 [ 146.293987] fsl_enetc 0000:00:00.0 eno0: TX ring 3 prio 1 [ 146.300467] fsl_enetc 0000:00:00.0 eno0: TX ring 4 prio 2 [ 146.306866] fsl_enetc 0000:00:00.0 eno0: TX ring 5 prio 2 [ 146.313261] fsl_enetc 0000:00:00.0 eno0: TX ring 6 prio 3 [ 146.319622] fsl_enetc 0000:00:00.0 eno0: TX ring 7 prio 3 $ tc qdisc del dev eno0 root [ 178.238418] fsl_enetc 0000:00:00.0 eno0: TX ring 0 prio 0 [ 178.244369] fsl_enetc 0000:00:00.0 eno0: TX ring 1 prio 0 [ 178.251486] fsl_enetc 0000:00:00.0 eno0: TX ring 2 prio 0 [ 178.258006] fsl_enetc 0000:00:00.0 eno0: TX ring 3 prio 0 [ 178.265038] fsl_enetc 0000:00:00.0 eno0: TX ring 4 prio 0 [ 178.271557] fsl_enetc 0000:00:00.0 eno0: TX ring 5 prio 0 [ 178.277910] fsl_enetc 0000:00:00.0 eno0: TX ring 6 prio 0 [ 178.284281] fsl_enetc 0000:00:00.0 eno0: TX ring 7 prio 0 $ tc qdisc add dev eno0 root handle 1: 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 hw 1 [ 186.113162] fsl_enetc 0000:00:00.0 eno0: TX ring 0 prio 0 [ 186.118764] fsl_enetc 0000:00:00.0 eno0: TX ring 1 prio 1 [ 186.124374] fsl_enetc 0000:00:00.0 eno0: TX ring 2 prio 2 [ 186.130765] fsl_enetc 0000:00:00.0 eno0: TX ring 3 prio 3 [ 186.136404] fsl_enetc 0000:00:00.0 eno0: TX ring 4 prio 4 [ 186.142049] fsl_enetc 0000:00:00.0 eno0: TX ring 5 prio 5 [ 186.147674] fsl_enetc 0000:00:00.0 eno0: TX ring 6 prio 6 [ 186.153305] fsl_enetc 0000:00:00.0 eno0: TX ring 7 prio 7 The driver used to set TC_MQPRIO_HW_OFFLOAD_TCS, near which there is this comment in the UAPI header: TC_MQPRIO_HW_OFFLOAD_TCS, /* offload TCs, no queue counts */ which is what enetc was doing up until now (and no longer is; we offload queue counts too), remove that assignment. Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 735ef62c2f2c4512dbcb6be3f4f7eefaefa16070 Author: Vladimir Oltean Date: Sat Feb 4 15:53:05 2023 +0200 net: enetc: request mqprio to validate the queue counts The enetc driver does not validate the mqprio queue configuration, so it currently allows things like this: $ tc qdisc add dev swp0 root handle 1: mqprio num_tc 8 \ map 0 1 2 3 4 5 6 7 queues 3@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 hw 1 But also things like this, completely omitting the queue configuration: $ tc qdisc add dev eno0 root handle 1: mqprio num_tc 8 \ map 0 1 2 3 4 5 6 7 hw 1 By requesting validation via the mqprio capability structure, this is no longer allowed, and we bring what is accepted by hardware in line with what is accepted by software. The check that num_tc <= real_num_tx_queues also becomes superfluous and can be dropped, because mqprio_validate_queue_counts() validates that no TXQ range exceeds real_num_tx_queues. That is a stronger check, because there is at least 1 TXQ per TC, so there are at least as many TXQs as TCs. Signed-off-by: Vladimir Oltean Reviewed-by: Jacob Keller Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 522d15ea831f88717084304f105b1d195104880e Author: Vladimir Oltean Date: Sat Feb 4 15:53:04 2023 +0200 net/sched: taprio: only pass gate mask per TXQ for igc, stmmac, tsnep, am65_cpsw There are 2 classes of in-tree drivers currently: - those who act upon struct tc_taprio_sched_entry :: gate_mask as if it holds a bit mask of TXQs - those who act upon the gate_mask as if it holds a bit mask of TCs When it comes to the standard, IEEE 802.1Q-2018 does say this in the second paragraph of section 8.6.8.4 Enhancements for scheduled traffic: | A gate control list associated with each Port contains an ordered list | of gate operations. Each gate operation changes the transmission gate | state for the gate associated with each of the Port's traffic class | queues and allows associated control operations to be scheduled. In typically obtuse language, it refers to a "traffic class queue" rather than a "traffic class" or a "queue". But careful reading of 802.1Q clarifies that "traffic class" and "queue" are in fact synonymous (see 8.6.6 Queuing frames): | A queue in this context is not necessarily a single FIFO data structure. | A queue is a record of all frames of a given traffic class awaiting | transmission on a given Bridge Port. The structure of this record is not | specified. i.o.w. their definition of "queue" isn't the Linux TX queue. The gate_mask really is input into taprio via its UAPI as a mask of traffic classes, but taprio_sched_to_offload() converts it into a TXQ mask. The breakdown of drivers which handle TC_SETUP_QDISC_TAPRIO is: - hellcreek, felix, sja1105: these are DSA switches, it's not even very clear what TXQs correspond to, other than purely software constructs. Only the mqprio configuration with 8 TCs and 1 TXQ per TC makes sense. So it's fine to convert these to a gate mask per TC. - enetc: I have the hardware and can confirm that the gate mask is per TC, and affects all TXQs (BD rings) configured for that priority. - igc: in igc_save_qbv_schedule(), the gate_mask is clearly interpreted to be per-TXQ. - tsnep: Gerhard Engleder clarifies that even though this hardware supports at most 1 TXQ per TC, the TXQ indices may be different from the TC values themselves, and it is the TXQ indices that matter to this hardware. So keep it per-TXQ as well. - stmmac: I have a GMAC datasheet, and in the EST section it does specify that the gate events are per TXQ rather than per TC. - lan966x: again, this is a switch, and while not a DSA one, the way in which it implements lan966x_mqprio_add() - by only allowing num_tc == NUM_PRIO_QUEUES (8) - makes it clear to me that TXQs are a purely software construct here as well. They seem to map 1:1 with TCs. - am65_cpsw: from looking at am65_cpsw_est_set_sched_cmds(), I get the impression that the fetch_allow variable is treated like a prio_mask. This definitely sounds closer to a per-TC gate mask rather than a per-TXQ one, and TI documentation does seem to recomment an identity mapping between TCs and TXQs. However, Roger Quadros would like to do some testing before making changes, so I'm leaving this driver to operate as it did before, for now. Link with more details at the end. Based on this breakdown, we have 5 drivers with a gate mask per TC and 4 with a gate mask per TXQ. So let's make the gate mask per TXQ the opt-in and the gate mask per TC the default. Benefit from the TC_QUERY_CAPS feature that Jakub suggested we add, and query the device driver before calling the proper ndo_setup_tc(), and figure out if it expects one or the other format. Link: https://patchwork.kernel.org/project/netdevbpf/patch/20230202003621.2679603-15-vladimir.oltean@nxp.com/#25193204 Cc: Horatiu Vultur Cc: Siddharth Vadapalli Cc: Roger Quadros Signed-off-by: Vladimir Oltean Acked-by: Kurt Kanzenbach # hellcreek Reviewed-by: Gerhard Engleder Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 09c794c0a88d959a603ec49b23df8e6bba68e7b7 Author: Vladimir Oltean Date: Sat Feb 4 15:53:03 2023 +0200 net/sched: taprio: pass mqprio queue configuration to ndo_setup_tc() The taprio qdisc does not currently pass the mqprio queue configuration down to the offloading device driver. So the driver cannot act upon the TXQ counts/offsets per TC, or upon the prio->tc map. It was probably assumed that the driver only wants to offload num_tc (see TC_MQPRIO_HW_OFFLOAD_TCS), which it can get from netdev_get_num_tc(), but there's clearly more to the mqprio configuration than that. I've considered 2 mechanisms to remedy that. First is to pass a struct tc_mqprio_qopt_offload as part of the tc_taprio_qopt_offload. The second is to make taprio actually call TC_SETUP_QDISC_MQPRIO, *in addition to* TC_SETUP_QDISC_TAPRIO. The difference is that in the first case, existing drivers (offloading or not) all ignore taprio's mqprio portion currently, whereas in the second case, we could control whether to call TC_SETUP_QDISC_MQPRIO, based on a new capability. The question is which approach would be better. I'm afraid that calling TC_SETUP_QDISC_MQPRIO unconditionally (not based on a taprio capability bit) would risk introducing regressions. For example, taprio doesn't populate (or validate) qopt->hw, as well as mqprio.flags, mqprio.shaper, mqprio.min_rate, mqprio.max_rate. In comparison, adding a capability is functionally equivalent to just passing the mqprio in a way that drivers can ignore it, except it's slightly more complicated to use it (need to set the capability). Ultimately, what made me go for the "mqprio in taprio" variant was that it's easier for offloading drivers to interpret the mqprio qopt slightly differently when it comes from taprio vs when it comes from mqprio, should that ever become necessary. Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 9dd6ad674cc74a62cc85de6e02cb29d47e9c4eb5 Author: Vladimir Oltean Date: Sat Feb 4 15:53:02 2023 +0200 net/sched: refactor mqprio qopt reconstruction to a library function The taprio qdisc will need to reconstruct a struct tc_mqprio_qopt from netdev settings once more in a future patch, but this code was already written twice, once in taprio and once in mqprio. Refactor the code to a helper in the common mqprio library. Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 1dfe086dd7efb36d3d619a90782c6ca186a1bae9 Author: Vladimir Oltean Date: Sat Feb 4 15:53:01 2023 +0200 net/sched: taprio: centralize mqprio qopt validation There is a lot of code in taprio which is "borrowed" from mqprio. It makes sense to put a stop to the "borrowing" and start actually reusing code. Because taprio and mqprio are built as part of different kernel modules, code reuse can only take place either by writing it as static inline (limiting), putting it in sch_generic.o (not generic enough), or creating a third auto-selectable kernel module which only holds library code. I opted for the third variant. In a previous change, mqprio gained support for reverse TC:TXQ mappings, something which taprio still denies. Make taprio use the same validation logic so that it supports this configuration as well. The taprio code didn't enforce TXQ overlaps in txtime-assist mode and that looks intentional, even if I've no idea why that might be. Preserve that, but add a comment. There isn't any dedicated MAINTAINERS entry for mqprio, so nothing to update there. Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Reviewed-by: Gerhard Engleder Signed-off-by: David S. Miller commit d404959fa23a6fc79ba3989f0491a1e747e30532 Author: Vladimir Oltean Date: Sat Feb 4 15:53:00 2023 +0200 net/sched: mqprio: add extack messages for queue count validation To make mqprio more user-friendly, create netlink extended ack messages which say exactly what is wrong about the queue counts. This uses the new support for printf-formatted extack messages. Example: $ tc qdisc add dev eno0 root handle 1: mqprio num_tc 8 \ map 0 1 2 3 4 5 6 7 queues 3@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 hw 0 Error: sch_mqprio: TC 0 queues 3@0 overlap with TC 1 queues 1@1. Signed-off-by: Vladimir Oltean Reviewed-by: Jacob Keller Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 19278d76915d6b28269e1af1d7b6754c16576572 Author: Vladimir Oltean Date: Sat Feb 4 15:52:59 2023 +0200 net/sched: mqprio: allow offloading drivers to request queue count validation mqprio_parse_opt() proudly has a comment: /* If hardware offload is requested we will leave it to the device * to either populate the queue counts itself or to validate the * provided queue counts. */ Unfortunately some device drivers did not get this memo, and don't validate the queue counts, or populate them. In case drivers don't want to populate the queue counts themselves, just act upon the requested configuration, it makes sense to introduce a tc capability, and make mqprio query it, so they don't have to do the validation themselves. Signed-off-by: Vladimir Oltean Reviewed-by: Jacob Keller Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit d7045f520a74eac28d54fa96cc020c5344baea98 Author: Vladimir Oltean Date: Sat Feb 4 15:52:58 2023 +0200 net/sched: mqprio: allow reverse TC:TXQ mappings By imposing that the last TXQ of TC i is smaller than the first TXQ of any TC j (j := i+1 .. n), mqprio imposes a strict ordering condition for the TXQ indices (they must increase as TCs increase). Claudiu points out that the complexity of the TXQ count validation is too high for this logic, i.e. instead of iterating over j, it is sufficient that the TXQ indices of TC i and i + 1 are ordered, and that will eventually ensure global ordering. This is true, however it doesn't appear to me that is what the code really intended to do. Instead, based on the comments, it just wanted to check for overlaps (and this isn't how one does that). So the following mqprio configuration, which I had recommended to Vinicius more than once for igb/igc (to account for the fact that on this hardware, lower numbered TXQs have higher dequeue priority than higher ones): num_tc 4 map 0 1 2 3 queues 1@3 1@2 1@1 1@0 is in fact denied today by mqprio. The full story is that in fact, it's only denied with "hw 0"; if hardware offloading is requested, mqprio defers TXQ range overlap validation to the device driver (a strange decision in itself). This is most certainly a bug, but it's not one that has any merit for being fixed on "stable" as far as I can tell. This is because mqprio always rejected a configuration which was in fact valid, and this has shaped the way in which mqprio configuration scripts got built for various hardware (see igb/igc in the link below). Therefore, one could consider it to be merely an improvement for mqprio to allow reverse TC:TXQ mappings. Link: https://patchwork.kernel.org/project/netdevbpf/patch/20230130173145.475943-9-vladimir.oltean@nxp.com/#25188310 Link: https://patchwork.kernel.org/project/netdevbpf/patch/20230128010719.2182346-6-vladimir.oltean@nxp.com/#25186442 Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Reviewed-by: Gerhard Engleder Signed-off-by: David S. Miller commit 9adafe2b85460be5b9bed9b6f6597526e7d4f7c5 Author: Vladimir Oltean Date: Sat Feb 4 15:52:57 2023 +0200 net/sched: move struct tc_mqprio_qopt_offload from pkt_cls.h to pkt_sched.h Since mqprio is a scheduler and not a classifier, move its offload structure to pkt_sched.h, where struct tc_taprio_qopt_offload also lies. Also update some header inclusions in drivers that access this structure, to the best of my abilities. Cc: Igor Russkikh Cc: Yisen Zhuang Cc: Salil Mehta Cc: Jesse Brandeburg Cc: Tony Nguyen Cc: Thomas Petazzoni Cc: Saeed Mahameed Cc: Leon Romanovsky Cc: Horatiu Vultur Cc: Lars Povlsen Cc: Steen Hegelund Cc: Daniel Machon Cc: UNGLinuxDriver@microchip.com Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 5cfb45e2fb71f58e795d96c708c27e2fa13134b7 Author: Vladimir Oltean Date: Sat Feb 4 15:52:56 2023 +0200 net/sched: mqprio: refactor offloading and unoffloading to dedicated functions Some more logic will be added to mqprio offloading, so split that code up from mqprio_init(), which is already large, and create a new function, mqprio_enable_offload(), similar to taprio_enable_offload(). Also create the opposite function mqprio_disable_offload(). Signed-off-by: Vladimir Oltean Reviewed-by: Jacob Keller Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit feb2cf3dcfb930aec2ca65c66d1365543d5ba943 Author: Vladimir Oltean Date: Sat Feb 4 15:52:55 2023 +0200 net/sched: mqprio: refactor nlattr parsing to a separate function mqprio_init() is quite large and unwieldy to add more code to. Split the netlink attribute parsing to a dedicated function. Signed-off-by: Vladimir Oltean Reviewed-by: Jacob Keller Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 8437114593910e0ac7a333775a9477e69c25cf75 Author: Praveen Kaligineedi Date: Fri Feb 3 13:20:45 2023 -0800 gve: Fix gve interrupt names IRQs are currently requested before the netdevice is registered and a proper name is assigned to the device. Changing interrupt name to avoid using the format string in the name. Interrupt name before change: eth%d-ntfy-block. Interrupt name after change: gve-ntfy-blk@pci: Signed-off-by: Praveen Kaligineedi Reviewed-by: Jeroen de Borst Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit d78f8d839d055c3de4513de0b950848884a55054 Merge: 9dde0cd3b10f6 31c8db2c4fa79 Author: David S. Miller Date: Mon Feb 6 10:02:17 2023 +0000 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== net: implement devlink reload in ice Michal Swiatkowski says: This is a part of changes done in patchset [0]. Resource management is kind of controversial part, so I split it into two patchsets. It is the first one, covering refactor and implement reload API call. The refactor will unblock some of the patches needed by SIOV or subfunction. Most of this patchset is about implementing driver reload mechanism. Part of code from probe and rebuild is used to not duplicate code. To allow this reuse probe and rebuild path are split into smaller functions. Patch "ice: split ice_vsi_setup into smaller functions" changes boolean variable in function call to integer and adds define for it. Instead of having the function called with true/false now it can be called with readable defines ICE_VSI_FLAG_INIT or ICE_VSI_FLAG_NO_INIT. It was suggested by Jacob Keller and probably this mechanism will be implemented across ice driver in follow up patchset. Previously the code was reviewed here [0]. [0] https://lore.kernel.org/netdev/Y3ckRWtAtZU1BdXm@unreal/T/#m3bb8feba0a62f9b4cd54cd94917b7e2143fc2ecd ==================== Signed-off-by: David S. Miller commit 9dde0cd3b10f63bc4100ebadc7e32275baabfa68 Author: Jesper Dangaard Brouer Date: Fri Feb 3 13:59:29 2023 +0100 net: introduce skb_poison_list and use in kfree_skb_list First user of skb_poison_list is in kfree_skb_list_reason, to catch bugs earlier like introduced in commit eedade12f4cb ("net: kfree_skb_list use kmem_cache_free_bulk"). For completeness mentioned bug have been fixed in commit f72ff8b81ebc ("net: fix kfree_skb_list use of skb_mark_not_on_list"). In case of a bug like mentioned commit we would have seen OOPS with: general protection fault, probably for non-canonical address 0xdead000000000870 And content of one the registers e.g. R13: dead000000000800 In this case skb->len is at offset 112 bytes (0x70) why fault happens at 0x800+0x70 = 0x870 Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit f6b2ce79b5fbbb330f56262f0f4373d6af60b602 Merge: fbe7e38f3e57e 4ec5183ec4865 Author: Greg Kroah-Hartman Date: Mon Feb 6 10:48:49 2023 +0100 Merge 6.2-rc7 into tty-next We need the tty/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 3d281bdbffb330da562df985dc30ed1075b638f4 Author: Michael Straube Date: Sun Feb 5 09:05:59 2023 +0100 staging: r8188eu: correct error logic of _rtw_init_recv_priv() Convert the function _rtw_init_recv_priv() away from returning _FAIL and _SUCCESS, which uses inverted error logic. Return 0 for success and negative values for failure instead. Signed-off-by: Michael Straube Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230205080559.8319-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7e00e0c42d119090373d179a6fdc2ab09db5c4f8 Author: Michael Straube Date: Sun Feb 5 09:05:58 2023 +0100 staging: r8188eu: correct error logic of rtl8188eu_init_recv_priv() Convert the function rtl8188eu_init_recv_priv() away from returning _FAIL and _SUCCESS, which uses inverted error logic. Return 0 for success and negative values for failure instead. Signed-off-by: Michael Straube Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230205080559.8319-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2f36e789e540df6a9fbf471b3a2ba62a8b361586 Author: Greg Kroah-Hartman Date: Thu Feb 2 15:11:38 2023 +0100 staging: pi433: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. This requires saving off the root directory dentry to make creation of individual device subdirectories easier. Cc: Paulo Miguel Almeida Cc: Dan Carpenter Cc: Sidong Yang Cc: Liu Shixin Cc: "Uwe Kleine-König" Link: https://lore.kernel.org/r/20230202141138.2291946-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit eef4e616e7bf351d9f74a50004eecbd6bb192276 Author: Guru Mehar Rachaputi Date: Tue Jan 31 19:14:39 2023 +0100 staging: pi433: Added information about bit_rate configuration Information in the TODO file for bit_rate configuration is insufficient. This patch adds information on how to approach when considering to modify bit_rate to support upto 300kbps. Signed-off-by: Guru Mehar Rachaputi Acked-by: Dan Carpenter Link: https://lore.kernel.org/r/Y9laj+z0TuasBRx5@combine-ThinkPad-S1-Yoga Signed-off-by: Greg Kroah-Hartman commit c6dd307144235f2abd97c974883398176345af9f Author: Martin Kaiser Date: Tue Jan 31 10:00:57 2023 +0100 staging: r8188eu: clean up NULL check for rcu pointer Clean up the NULL check for padapter->pnetdev->rx_handler_data. The current code calls rcu_dereference while it holds the rcu read lock and checks the pointer after releasing the lock. An rcu pointer may only be used between calls to rcu_read_lock and rcu_read_unlock. Replace the check with rcu_access_pointer. My understanding is that this function returns the value of the pointer and needs no locking. We can then check the pointer but we must not dereference it. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20230131090057.241779-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit f047382519ca41702ebaee5a862e87390f687137 Merge: 893fd950c89d5 c0f7ae27539fb Author: Tudor Ambarus Date: Mon Feb 6 11:23:34 2023 +0200 Merge tag 'mtd/fixes-for-6.2-rc4' into spi-nor/next Merge 'mtd/fixes-for-6.2-rc4' into spi-nor/next to fix conflict on include headers in drivers/mtd/spi-nor/core.c. Signed-off-by: Tudor Ambarus commit 149e8fb06cd925c38cfeb14458480be0cbe3a099 Merge: 542bcea4be866 b97f955ec47b4 Author: David S. Miller Date: Mon Feb 6 09:22:49 2023 +0000 Merge branch 'wangxun-interrupts' Jiawen Wu says: ==================== Wangxun interrupt and RxTx support Configure interrupt, setup RxTx ring, support to receive and transmit packets. change log: v3: - Use upper_32_bits() to avoid compile warning. - Remove useless codes. v2: - Andrew Lunn: https://lore.kernel.org/netdev/Y86kDphvyHj21IxK@lunn.ch/ - Add a judgment when allocate dma for descriptor. ==================== Signed-off-by: David S. Miller commit b97f955ec47b49bfac869bbf087105b14e58855d Author: Mengyuan Lou Date: Fri Feb 3 17:11:35 2023 +0800 net: ngbe: Support Rx and Tx process path Add enable and disable operation process for ngbe open/close. Clean Rx and Tx ring interrupts, process packets in the data path. Signed-off-by: Mengyuan Lou Signed-off-by: David S. Miller commit 0d22be525a619d03a603e70da14b8af006d0e58a Author: Jiawen Wu Date: Fri Feb 3 17:11:34 2023 +0800 net: txgbe: Support Rx and Tx process path Clean Rx and Tx ring interrupts, process packets in the data path. Signed-off-by: Jiawen Wu Signed-off-by: David S. Miller commit 09a508800952f8d4b04bf27fd3fe9d38039cf06e Author: Mengyuan Lou Date: Fri Feb 3 17:11:33 2023 +0800 net: libwx: Add tx path to process packets Support to transmit packets without hardware features. Signed-off-by: Mengyuan Lou Signed-off-by: Jiawen Wu Signed-off-by: David S. Miller commit 3c47e8ae113a68da47987750d9896e325d0aeedd Author: Jiawen Wu Date: Fri Feb 3 17:11:32 2023 +0800 net: libwx: Support to receive packets in NAPI Clean all queues associated with a q_vector, to simple receive packets without hardware features. Signed-off-by: Jiawen Wu Signed-off-by: David S. Miller commit 0ef7e1597a17770752fcccadc2e23e5af224ade8 Author: Jiawen Wu Date: Fri Feb 3 17:11:31 2023 +0800 net: txgbe: Setup Rx and Tx ring Improve the configuration of Rx and Tx ring, set Rx flags and implement ndo_set_rx_mode ops. Signed-off-by: Jiawen Wu Signed-off-by: David S. Miller commit 850b971110b20cbcc2367516fefe78e84fec7d79 Author: Jiawen Wu Date: Fri Feb 3 17:11:30 2023 +0800 net: libwx: Allocate Rx and Tx resources Setup Rx and Tx descriptors for specefic rings. Signed-off-by: Jiawen Wu Signed-off-by: David S. Miller commit 18b5b8a9f1786005997d51456b73a3eaa601955e Author: Jiawen Wu Date: Fri Feb 3 17:11:29 2023 +0800 net: libwx: Configure Rx and Tx unit on hardware Configure hardware for preparing to process packets. Including configure receive and transmit unit of the MAC layer, and setup the specific rings. Signed-off-by: Jiawen Wu Signed-off-by: David S. Miller commit 5d3ac705c281977db7a5ba3854d710881dbbceea Author: Jiawen Wu Date: Fri Feb 3 17:11:28 2023 +0800 net: txgbe: Add interrupt support Determine proper interrupt scheme to enable and handle interrupt. Signed-off-by: Jiawen Wu Signed-off-by: David S. Miller commit e7956139a6cf9a39bcddaabbda1b2e684a42fc57 Author: Mengyuan Lou Date: Fri Feb 3 17:11:27 2023 +0800 net: ngbe: Add irqs request flow Add request_irq for tx/rx rings and misc other events. If the application is successful, config vertors for interrupts. Enable some base interrupts mask in ngbe_irq_enable. Signed-off-by: Mengyuan Lou Signed-off-by: David S. Miller commit 3f703186113fac0f3c965204b2cbb22a03322e2c Author: Mengyuan Lou Date: Fri Feb 3 17:11:26 2023 +0800 net: libwx: Add irq flow functions Add irq flow functions for ngbe and txgbe. Alloc pcie msix irqs for drivers, otherwise fall back to msi/legacy. Signed-off-by: Mengyuan Lou Signed-off-by: Jiawen Wu Signed-off-by: David S. Miller commit 542bcea4be866b14b3a5c8e90773329066656c43 Author: Qingfang DENG Date: Fri Feb 3 09:16:11 2023 +0800 net: page_pool: use in_softirq() instead We use BH context only for synchronization, so we don't care if it's actually serving softirq or not. As a side node, in case of threaded NAPI, in_serving_softirq() will return false because it's in process context with BH off, making page_pool_recycle_in_cache() unreachable. Signed-off-by: Qingfang DENG Tested-by: Felix Fietkau Signed-off-by: David S. Miller commit 637bc8f09b0492f979992d38dfae0ebc17799529 Merge: 27369c9c2b722 79efecb41f584 Author: David S. Miller Date: Mon Feb 6 09:09:23 2023 +0000 Merge tag 'mlx5-updates-2023-02-04' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2023-02-04 This series provides misc updates to mlx5 driver: 1) Trivial LAG code cleanup patches from Roi 2) Rahul improves mlx5's documentation structure Separates the documentation into multiple pages related to different components in the device driver. Adds Kconfig parameters, devlink parameters, and tracepoints that were previously introduced but not added to the documentation. Introduces a new page on ethtool statistics counters with information about counters previously implemented in the mlx5_core driver but not documented in the kernel tree. 3) From Raed, policy/state selector support for IPSec. 4) From Fragos, add support for XDR speed in IPoIB mlx5 netdev 5) Few more misc cleanups and trivial changes ==================== Signed-off-by: David S. Miller commit 9cd61c8179781344315c2a9816977ea415c5459e Author: Vicki Pfau Date: Wed Jan 25 19:01:26 2023 -0800 HID: hid-steam: Add rumble on Deck The Steam Deck includes a new report that allows for emulating XInput-style rumble motors with the Deck's actuators. This adds support for passing these values directly to the Deck. Signed-off-by: Vicki Pfau Reviewed-by: Lyude Paul Link: https://lore.kernel.org/r/20230126030126.895670-3-vi@endrift.com Signed-off-by: Benjamin Tissoires commit 9ba9498bff1a3ae6e8661b423453e319af57fc3c Author: Vicki Pfau Date: Wed Jan 25 19:01:25 2023 -0800 HID: hid-steam: Add Steam Deck support Add preliminary support for the Steam Deck's controller interface. Currently, this only supports the controller inputs and toggling lizard mode (Valve's name for a hardware kb/m emulation mode). It does not support any of the advanced features, such as the motion sensors or force-feedback. The Steam Deck also includes a heartbeat for lizard mode that switches it back on if no reports have been received within a few milliseconds. The official Steam client handles this by sending a handful of configuration reports every few ms, so we copy this behavior by sending configuration reports to disable the mouse and reset the digital mappings every 5ms. As this isn't needed for the older Steam Controller, this is only done on the Steam Deck. Signed-off-by: Vicki Pfau Reviewed-by: Lyude Paul Link: https://lore.kernel.org/r/20230126030126.895670-2-vi@endrift.com Signed-off-by: Benjamin Tissoires commit 27369c9c2b722617063d6b80c758ab153f1d95d4 Author: Parav Pandit Date: Fri Feb 3 15:37:38 2023 +0200 virtio-net: Maintain reverse cleanup order To easily audit the code, better to keep the device stop() sequence to be mirror of the device open() sequence. Acked-by: Michael S. Tsirkin Reviewed-by: Jiri Pirko Signed-off-by: Parav Pandit Signed-off-by: David S. Miller commit cb3086cee65646b05d6ea62398a70d46ec0573be Merge: 8b7018fa7177a 3446dcd7df05e Author: David S. Miller Date: Mon Feb 6 08:48:27 2023 +0000 Merge branch 'bridge-mdb-limit' Petr Machata says: ==================== bridge: Limit number of MDB entries per port, port-vlan The MDB maintained by the bridge is limited. When the bridge is configured for IGMP / MLD snooping, a buggy or malicious client can easily exhaust its capacity. In SW datapath, the capacity is configurable through the IFLA_BR_MCAST_HASH_MAX parameter, but ultimately is finite. Obviously a similar limit exists in the HW datapath for purposes of offloading. In order to prevent the issue of unilateral exhaustion of MDB resources, introduce two parameters in each of two contexts: - Per-port and (when BROPT_MCAST_VLAN_SNOOPING_ENABLED is enabled) per-port-VLAN number of MDB entries that the port is member in. - Per-port and (when BROPT_MCAST_VLAN_SNOOPING_ENABLED is enabled) per-port-VLAN maximum permitted number of MDB entries, or 0 for no limit. Per-port number of entries keeps track of the total number of MDB entries configured on a given port. The per-port-VLAN value then keeps track of the subset of MDB entries configured specifically for the given VLAN, on that port. The number is adjusted as port_groups are created and deleted, and therefore under multicast lock. A maximum value, if non-zero, then places a limit on the number of entries that can be configured in a given context. Attempts to add entries above the maximum are rejected. Rejection reason of netlink-based requests to add MDB entries is communicated through extack. This channel is unavailable for rejections triggered from the control path. To address this lack of visibility, the patchset adds a tracepoint, bridge:br_mdb_full: # perf record -e bridge:br_mdb_full & # [...] # perf script | cut -d: -f4- dev v2 af 2 src ::ffff:0.0.0.0 grp ::ffff:239.1.1.112/00:00:00:00:00:00 vid 0 dev v2 af 10 src :: grp ff0e::112/00:00:00:00:00:00 vid 0 dev v2 af 2 src ::ffff:0.0.0.0 grp ::ffff:239.1.1.112/00:00:00:00:00:00 vid 10 dev v2 af 10 src 2001:db8:1::1 grp ff0e::1/00:00:00:00:00:00 vid 10 dev v2 af 2 src ::ffff:192.0.2.1 grp ::ffff:239.1.1.1/00:00:00:00:00:00 vid 10 Another option to consume the tracepoint is e.g. through the bpftrace tool: # bpftrace -e ' tracepoint:bridge:br_mdb_full /args->af != 0/ { printf("dev %s src %s grp %s vid %u\n", str(args->dev), ntop(args->src), ntop(args->grp), args->vid); } tracepoint:bridge:br_mdb_full /args->af == 0/ { printf("dev %s grp %s vid %u\n", str(args->dev), macaddr(args->grpmac), args->vid); }' This tracepoint is triggered for mcast_hash_max exhaustions as well. The following is an example of how the feature is used. A more extensive example is available in patch #8: # bridge vlan set dev v1 vid 1 mcast_max_groups 1 # bridge mdb add dev br port v1 grp 230.1.2.3 temp vid 1 # bridge mdb add dev br port v1 grp 230.1.2.4 temp vid 1 Error: bridge: Port-VLAN is already in 1 groups, and mcast_max_groups=1. The patchset progresses as follows: - In patch #1, set strict_start_type at two bridge-related policies. The reason is we are adding a new attribute to one of these, and want the new attribute to be parsed strictly. The other was adjusted for completeness' sake. - In patches #2 to #5, br_mdb and br_multicast code is adjusted to make the following additions smoother. - In patch #6, add the tracepoint. - In patch #7, the code to maintain number of MDB entries is added as struct net_bridge_mcast_port::mdb_n_entries. The maximum is added, too, as struct net_bridge_mcast_port::mdb_max_entries, however at this point there is no way to set the value yet, and since 0 is treated as "no limit", the functionality doesn't change at this point. Note however, that mcast_hash_max violations already do trigger at this point. - In patch #8, netlink plumbing is added: reading of number of entries, and reading and writing of maximum. The per-port values are passed through RTM_NEWLINK / RTM_GETLINK messages in IFLA_BRPORT_MCAST_N_GROUPS and _MAX_GROUPS, inside IFLA_PROTINFO nest. The per-port-vlan values are passed through RTM_GETVLAN / RTM_NEWVLAN messages in BRIDGE_VLANDB_ENTRY_MCAST_N_GROUPS, _MAX_GROUPS, inside BRIDGE_VLANDB_ENTRY. The following patches deal with the selftest: - Patches #9 and #10 clean up and move around some selftest code. - Patches #11 to #14 add helpers and generalize the existing IGMP / MLD support to allow generating packets with configurable group addresses and varying source lists for (S,G) memberships. - Patch #15 adds code to generate IGMP leave and MLD done packets. - Patch #16 finally adds the selftest itself. v3: - Patch #7: - Access mdb_max_/_n_entries through READ_/WRITE_ONCE - Move extack setting to br_multicast_port_ngroups_inc_one(). Since we use NL_SET_ERR_MSG_FMT_MOD, the correct context (port / port-vlan) can be passed through an argument. This also removes the need for more READ/WRITE_ONCE's at the extack-setting site. - Patch #8: - Move the br_multicast_port_ctx_vlan_disabled() check out to the _vlan_ helpers callers. Thus these helpers cannot fail, which makes them very similar to the _port_ helpers. Have them take the MC context directly and unify them. v2: - Cover letter: - Add an example of a bpftrace-based probe script - Patch #6: - Report IPv4 as an IPv6-mapped address through the IPv6 buffer as well, to save ring buffer space. - Patch #7: - In br_multicast_port_ngroups_inc_one(), bounce if n>=max, not if n==max - Adjust extack messages to mention ngroups, now that the bounces appear when n>=max, not n==max - In __br_multicast_enable_port_ctx(), do not reset max to 0. Also do not count number of entries by going through _inc, as that would end up incorrectly bouncing the entries. - Patch #8: - Drop locks around accesses in br_multicast_{port,vlan}_ngroups_{get,set_max}(), - Drop bounces due to max commit 3446dcd7df05ed6cc0095f21f871a61f1f28ed4e Author: Petr Machata Date: Thu Feb 2 18:59:34 2023 +0100 selftests: forwarding: bridge_mdb_max: Add a new selftest Add a suite covering mcast_n_groups and mcast_max_groups bridge features. Signed-off-by: Petr Machata Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 9ae8546973171230488ad631d2b9eb844466a37d Author: Petr Machata Date: Thu Feb 2 18:59:33 2023 +0100 selftests: forwarding: lib: Add helpers to build IGMP/MLD leave packets The testsuite that checks for mcast_max_groups functionality will need to wipe the added groups as well. Add helpers to build an IGMP or MLD packets announcing that host is leaving a given group. Signed-off-by: Petr Machata Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 705d4bc7b6b6563e7c2d4b3b3da8da9af842aacc Author: Petr Machata Date: Thu Feb 2 18:59:32 2023 +0100 selftests: forwarding: lib: Allow list of IPs for IGMPv3/MLDv2 The testsuite that checks for mcast_max_groups functionality will need to generate IGMP and MLD packets with configurable number of (S,G) addresses. To that end, further extend igmpv3_is_in_get() and mldv2_is_in_get() to allow a list of IP addresses instead of one address. Signed-off-by: Petr Machata Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 506a1ac9d32b52606f59acbb0e20c1a7adbb8511 Author: Petr Machata Date: Thu Feb 2 18:59:31 2023 +0100 selftests: forwarding: lib: Parameterize IGMPv3/MLDv2 generation In order to generate IGMPv3 and MLDv2 packets on the fly, the functions that generate these packets need to be able to generate packets for different groups and different sources. Generating MLDv2 packets further needs the source address of the packet for purposes of checksum calculation. Add the necessary parameters, and generate the payload accordingly by dispatching to helpers added in the previous patches. Adjust the sole client, bridge_mdb.sh, as well. Signed-off-by: Petr Machata Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 952e0ee38c7215c45192d8c899acd1830873f28b Author: Petr Machata Date: Thu Feb 2 18:59:30 2023 +0100 selftests: forwarding: lib: Add helpers for checksum handling In order to generate IGMPv3 and MLDv2 packets on the fly, we will need helpers to calculate the packet checksum. The approach presented in this patch revolves around payload templates for mausezahn. These are mausezahn-like payload strings (01:23:45:...) with possibly one 2-byte sequence replaced with the word PAYLOAD. The main function is payload_template_calc_checksum(), which calculates RFC 1071 checksum of the message. There are further helpers to then convert the checksum to the payload format, and to expand it. For IPv6, MLDv2 message checksum is computed using a pseudoheader that differs from the header used in the payload itself. The fact that the two messages are different means that the checksum needs to be returned as a separate quantity, instead of being expanded in-place in the payload itself. Furthermore, the pseudoheader includes a length of the message. Much like the checksum, this needs to be expanded in mausezahn format. And likewise for number of addresses for (S,G) entries. Thus we have several places where a computed quantity needs to be presented in the payload format. Add a helper u16_to_bytes(), which will be used in all these cases. Signed-off-by: Petr Machata Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit fcf4927632eecb25e40c8c5ac1e40df2090cc2eb Author: Petr Machata Date: Thu Feb 2 18:59:29 2023 +0100 selftests: forwarding: lib: Add helpers for IP address handling In order to generate IGMPv3 and MLDv2 packets on the fly, we will need helpers to expand IPv4 and IPv6 addresses given as parameters in mausezahn payload notation. Add helpers that do it. Signed-off-by: Petr Machata Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit f7ccf60c4adada7e13d3d6798621cabcdaf3828e Author: Petr Machata Date: Thu Feb 2 18:59:28 2023 +0100 selftests: forwarding: bridge_mdb: Fix a typo Add the letter missing from the word "INCLUDE". Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 344dd2c9e74373cca454dcea4b62be50adc35939 Author: Petr Machata Date: Thu Feb 2 18:59:27 2023 +0100 selftests: forwarding: Move IGMP- and MLD-related functions to lib These functions will be helpful for other testsuites as well. Extract them to a common place. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit a1aee20d5db29dc73331067b6a338eb650f0b5f1 Author: Petr Machata Date: Thu Feb 2 18:59:26 2023 +0100 net: bridge: Add netlink knobs for number / maximum MDB entries The previous patch added accounting for number of MDB entries per port and per port-VLAN, and the logic to verify that these values stay within configured bounds. However it didn't provide means to actually configure those bounds or read the occupancy. This patch does that. Two new netlink attributes are added for the MDB occupancy: IFLA_BRPORT_MCAST_N_GROUPS for the per-port occupancy and BRIDGE_VLANDB_ENTRY_MCAST_N_GROUPS for the per-port-VLAN occupancy. And another two for the maximum number of MDB entries: IFLA_BRPORT_MCAST_MAX_GROUPS for the per-port maximum, and BRIDGE_VLANDB_ENTRY_MCAST_MAX_GROUPS for the per-port-VLAN one. Note that the two new IFLA_BRPORT_ attributes prompt bumping of RTNL_SLAVE_MAX_TYPE to size the slave attribute tables large enough. The new attributes are used like this: # ip link add name br up type bridge vlan_filtering 1 mcast_snooping 1 \ mcast_vlan_snooping 1 mcast_querier 1 # ip link set dev v1 master br # bridge vlan add dev v1 vid 2 # bridge vlan set dev v1 vid 1 mcast_max_groups 1 # bridge mdb add dev br port v1 grp 230.1.2.3 temp vid 1 # bridge mdb add dev br port v1 grp 230.1.2.4 temp vid 1 Error: bridge: Port-VLAN is already in 1 groups, and mcast_max_groups=1. # bridge link set dev v1 mcast_max_groups 1 # bridge mdb add dev br port v1 grp 230.1.2.3 temp vid 2 Error: bridge: Port is already in 1 groups, and mcast_max_groups=1. # bridge -d link show 5: v1@v2: mtu 1500 master br [...] [...] mcast_n_groups 1 mcast_max_groups 1 # bridge -d vlan show port vlan-id br 1 PVID Egress Untagged state forwarding mcast_router 1 v1 1 PVID Egress Untagged [...] mcast_n_groups 1 mcast_max_groups 1 2 [...] mcast_n_groups 0 mcast_max_groups 0 Signed-off-by: Petr Machata Acked-by: Nikolay Aleksandrov Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit b57e8d870d522d905720052e6fd9c3bc9bc5f6fb Author: Petr Machata Date: Thu Feb 2 18:59:25 2023 +0100 net: bridge: Maintain number of MDB entries in net_bridge_mcast_port The MDB maintained by the bridge is limited. When the bridge is configured for IGMP / MLD snooping, a buggy or malicious client can easily exhaust its capacity. In SW datapath, the capacity is configurable through the IFLA_BR_MCAST_HASH_MAX parameter, but ultimately is finite. Obviously a similar limit exists in the HW datapath for purposes of offloading. In order to prevent the issue of unilateral exhaustion of MDB resources, introduce two parameters in each of two contexts: - Per-port and per-port-VLAN number of MDB entries that the port is member in. - Per-port and (when BROPT_MCAST_VLAN_SNOOPING_ENABLED is enabled) per-port-VLAN maximum permitted number of MDB entries, or 0 for no limit. The per-port multicast context is used for tracking of MDB entries for the port as a whole. This is available for all bridges. The per-port-VLAN multicast context is then only available on VLAN-filtering bridges on VLANs that have multicast snooping on. With these changes in place, it will be possible to configure MDB limit for bridge as a whole, or any one port as a whole, or any single port-VLAN. Note that unlike the global limit, exhaustion of the per-port and per-port-VLAN maximums does not cause disablement of multicast snooping. It is also permitted to configure the local limit larger than hash_max, even though that is not useful. In this patch, introduce only the accounting for number of entries, and the max field itself, but not the means to toggle the max. The next patch introduces the netlink APIs to toggle and read the values. Signed-off-by: Petr Machata Acked-by: Nikolay Aleksandrov Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit d47230a3480a5f6df98c5870ba26843850a600d5 Author: Petr Machata Date: Thu Feb 2 18:59:24 2023 +0100 net: bridge: Add a tracepoint for MDB overflows The following patch will add two more maximum MDB allowances to the global one, mcast_hash_max, that exists today. In all these cases, attempts to add MDB entries above the configured maximums through netlink, fail noisily and obviously. Such visibility is missing when adding entries through the control plane traffic, by IGMP or MLD packets. To improve visibility in those cases, add a trace point that reports the violation, including the relevant netdevice (be it a slave or the bridge itself), and the MDB entry parameters: # perf record -e bridge:br_mdb_full & # [...] # perf script | cut -d: -f4- dev v2 af 2 src ::ffff:0.0.0.0 grp ::ffff:239.1.1.112/00:00:00:00:00:00 vid 0 dev v2 af 10 src :: grp ff0e::112/00:00:00:00:00:00 vid 0 dev v2 af 2 src ::ffff:0.0.0.0 grp ::ffff:239.1.1.112/00:00:00:00:00:00 vid 10 dev v2 af 10 src 2001:db8:1::1 grp ff0e::1/00:00:00:00:00:00 vid 10 dev v2 af 2 src ::ffff:192.0.2.1 grp ::ffff:239.1.1.1/00:00:00:00:00:00 vid 10 CC: Steven Rostedt CC: linux-trace-kernel@vger.kernel.org Signed-off-by: Petr Machata Reviewed-by: Steven Rostedt (Google) Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit eceb30854f6b7d354ae52551b11aef2e2fa3e82e Author: Petr Machata Date: Thu Feb 2 18:59:23 2023 +0100 net: bridge: Change a cleanup in br_multicast_new_port_group() to goto This function is getting more to clean up in the following patches. Structuring the cleanups in one labeled block will allow reusing the same cleanup from several places. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 976b3858dd14914c5a9254535ad7440c99467944 Author: Petr Machata Date: Thu Feb 2 18:59:22 2023 +0100 net: bridge: Add br_multicast_del_port_group() Since cleaning up the effects of br_multicast_new_port_group() just consists of delisting and freeing the memory, the function br_mdb_add_group_star_g() inlines the corresponding code. In the following patches, number of per-port and per-port-VLAN MDB entries is going to be maintained, and that counter will have to be updated. Because that logic is going to be hidden in the br_multicast module, introduce a new hook intended to again remove a newly-created group. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 1c85b80b20a13d07ec3a7d746ad52b7972c8c730 Author: Petr Machata Date: Thu Feb 2 18:59:21 2023 +0100 net: bridge: Move extack-setting to br_multicast_new_port_group() Now that br_multicast_new_port_group() takes an extack argument, move setting the extack there. The downside is that the error messages end up being less specific (the function cannot distinguish between (S,G) and (*,G) groups). However, the alternative is to check in the caller whether the callee set the extack, and if it didn't, set it. But that is only done when the callee is not exactly known. (E.g. in case of a notifier invocation.) Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 60977a0c63373bfc596b562b1e34e64ede6ef492 Author: Petr Machata Date: Thu Feb 2 18:59:20 2023 +0100 net: bridge: Add extack to br_multicast_new_port_group() Make it possible to set an extack in br_multicast_new_port_group(). Eventually, this function will check for per-port and per-port-vlan MDB maximums, and will use the extack to communicate the reason for the bounce. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit c00041cf1cb82fcc8002454c8c1d80bd7e9b7e3e Author: Petr Machata Date: Thu Feb 2 18:59:19 2023 +0100 net: bridge: Set strict_start_type at two policies Make any attributes newly-added to br_port_policy or vlan_tunnel_policy parsed strictly, to prevent userspace from passing garbage. Note that this patchset only touches the former policy. The latter was adjusted for completeness' sake. There do not appear to be other _deprecated calls with non-NULL policies. Suggested-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 893fd950c89d516a7cf365700b2bd7bb3efc15a5 Author: Tudor Ambarus Date: Thu Feb 2 16:46:28 2023 +0200 mtd: spi-nor: Sort headers alphabetically Sort headers alphabetically - it helps locating duplicates, and makes it easier to figure out where to insert new headers. Alphabetic order should also prove that each header is self-contained, i.e. can be included without prerequisites. Link: https://lore.kernel.org/r/20230202144628.14443-1-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus commit f0f0cfdc3a024e21161714f2e05f0df3b84d42ad Author: Louis Rannou Date: Fri Feb 3 09:07:54 2023 +0200 mtd: spi-nor: Fix shift-out-of-bounds in spi_nor_set_erase_type spi_nor_set_erase_type() was used either to set or to mask out an erase type. When we used it to mask out an erase type a shift-out-of-bounds was hit: UBSAN: shift-out-of-bounds in drivers/mtd/spi-nor/core.c:2237:24 shift exponent 4294967295 is too large for 32-bit type 'int' The setting of the size_{shift, mask} and of the opcode are unnecessary when the erase size is zero, as throughout the code just the erase size is considered to determine whether an erase type is supported or not. Setting the opcode to 0xFF was wrong too as nobody guarantees that 0xFF is an unused opcode. Thus when masking out an erase type, just set the erase size to zero. This will fix the shift-out-of-bounds. Fixes: 5390a8df769e ("mtd: spi-nor: add support to non-uniform SFDP SPI NOR flash memories") Cc: stable@vger.kernel.org Reported-by: Alexander Stein Signed-off-by: Louis Rannou Tested-by: Alexander Stein Link: https://lore.kernel.org/r/20230203070754.50677-1-tudor.ambarus@linaro.org [ta: refine changes, new commit message, fix compilation error] Signed-off-by: Tudor Ambarus commit d20a8f409259f1782f080b434054854020878f23 Author: Stanislaw Gruszka Date: Thu Feb 2 10:21:14 2023 +0100 accel/ivpu: Fix old dma_buf api usage Update according to new dma-buf locking scheme. Remove redundant WARN_ON()'s, dma_buf functions internally have the same warnings already. Fixes: 647371a6609d ("accel/ivpu: Add GEM buffer object management") Signed-off-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20230202092114.2637452-5-stanislaw.gruszka@linux.intel.com (cherry picked from commit ec6ec9c6ca637f7678f1931cb835b2bb8ab6dfd2) Signed-off-by: Jacek Lawrynowicz commit 62079b6f2cf1e6356c6241cbdc5defdb0d66b4fe Author: Stanislaw Gruszka Date: Thu Feb 2 10:21:13 2023 +0100 accel/ivpu: Set dma max_segment_size Avoid below spurious warning: [ 264.844029] DMA-API: intel_vpu 0000:00:0b.0: mapping sg segment longer than device claims to support [len=143360] [max=65536] [ 264.844038] WARNING: CPU: 0 PID: 1254 at kernel/dma/debug.c:1160 debug_dma_map_sg+0x6ca/0xb70 Fixes: 263b2ba5fc93 ("accel/ivpu: Add Intel VPU MMU support") Signed-off-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20230202092114.2637452-4-stanislaw.gruszka@linux.intel.com (cherry picked from commit 07ccb63a5c4cf860754666f1de030a0cbd5193b6) Signed-off-by: Jacek Lawrynowicz commit dffaa98c8bcf973e94a58d8f29c0254e003b538c Author: Andrzej Kacprowski Date: Thu Feb 2 10:21:12 2023 +0100 accel/ivpu: Send VPU_JSM_MSG_CONTEXT_DELETE when deleting context The VPU_JSM_MSG_CONTEXT_DELETE will remove any resources associated with the SSID, that included any blobs create by the user space application. The command can also remove doorbell registrations, but since this does not work in HW scheduling case, we do not depend on this capability and unregister the doorbells explicitly. Fixes: cd7272215c44 ("accel/ivpu: Add command buffer submission logic") Signed-off-by: Andrzej Kacprowski Signed-off-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20230202092114.2637452-3-stanislaw.gruszka@linux.intel.com (cherry picked from commit 38257f514d85cd9d3f7586e768cec4f246635f77) Signed-off-by: Jacek Lawrynowicz commit 8b7018fa7177aa4358f270fc8db36e59c55a6c21 Merge: 042b7858d50f3 6ebf182bfdf15 Author: David S. Miller Date: Mon Feb 6 08:26:26 2023 +0000 Merge branch 'sparx5-PSFP-support' Daniel Machon says: ==================== net: Add support for PSFP in Sparx5 ================================================================================ Add support for Per-Stream Filtering and Policing (802.1Q-2018, 8.6.5.1). ================================================================================ The VCAP CLM (VCAP IS0 ingress classifier) classifies streams, identified by ISDX (Ingress Service Index, frame metadata), and maps ISDX to streams. Flow meters are also classified by ISDX, and implemented using service policers (Service Dual Leacky Buckets, SDLB). Leacky buckets are linked together in a leak chain of a leak group. Leak groups a preconfigured to serve buckets within a certain rate interval. Stream gates are time-based policers used by PSFP. Frames are dropped based on the gate state (OPEN/ CLOSE), whose state will be altered based on the Gate Control List (GCL) and current PTP time. Apart from time-based policing, stream gates can alter egress queue selection for the frames that pass through the Gate. This is done through Internal Priority Selector (IPS). Stream gates are mapped from stream filters. Support for tc actions gate and police, have been added to the VCAP IS0 set of supported actions. Examples: // tc filter with gate action $ tc filter add dev eth1 ingress chain 1100000 prio 1 handle 1001 protocol \ 802.1q flower skip_sw vlan_id 100 action gate base-time 0 sched-entry open \ 700000 7 8m sched-entry close 300000 action goto chain 1200000 // tc filter with police action $ tc filter add dev eth1 ingress chain 1100000 prio 1 handle 1002 protocol \ 802.1q flower skip_sw vlan_id 100 action police rate 1gbit burst 8096 \ conform-exceed drop action goto chain 1200000 ================================================================================ Patches ================================================================================ Patch #1: Adds new register needed for PSFP. Patch #2: Adds resource pools to control PSFP needed chip resources. Patch #3: Adds support for SDLB's needed for flow-meters. Patch #4: Adds support for service policers. Patch #5: Adds support for PSFP flow-meters, using service policers. Patch #6: Adds a new function to calculate basetime, required by flow-meters. Patch #7: Adds support for PSFP stream gates. Patch #8: Adds support for PSFP stream filters. Patch #9: Adds a function to initialize flow-meters, stream gates and stream filters. Patch #10: Adds the required flower code to configure PSFP using the tc command. ==================== Signed-off-by: David S. Miller commit 6ebf182bfdf15bd58ebcf6760b06458694e0fad2 Author: Daniel Machon Date: Thu Feb 2 11:43:55 2023 +0100 sparx5: add support for configuring PSFP via tc Add support for tc actions gate and police, in order to implement support for configuring PSFP through tc. Signed-off-by: Daniel Machon Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit e116b19db20205fba39a64e1cb357c012ef29dc1 Author: Daniel Machon Date: Thu Feb 2 11:43:54 2023 +0100 net: microchip: sparx5: initialize PSFP Initialize the SDLB's, stream gates and stream filters. Signed-off-by: Daniel Machon Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit ae3e691f34422e319d19c0cd27ff5b91cd6a8466 Author: Daniel Machon Date: Thu Feb 2 11:43:53 2023 +0100 net: microchip: sparx5: add support for PSFP stream filters Add support for configuring PSFP stream filters (IEEE 802.1Q-2018, 8.6.5.1.1). The VCAP CLM (VCAP IS0 ingress classifier) classifies streams, identified by ISDX (Ingress Service Index, frame metadata), and maps ISDX to streams. Signed-off-by: Daniel Machon Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit c70a5e2c3d18f2ddad0a3d912afa60a1cc7c8e27 Author: Daniel Machon Date: Thu Feb 2 11:43:52 2023 +0100 net: microchip: sparx5: add support for PSFP stream gates Add support for configuring PSFP stream gates (IEEE 802.1Q-2018, 8.6.5.1.2). Stream gates are time-based policers used by PSFP. Frames are dropped based on the gate state (OPEN/ CLOSE), whose state will be altered based on the Gate Control List (GCL) and current PTP time. Apart from time-based policing, stream gates can alter egress queue selection for the frames that pass through the Gate. This is done through Internal Priority Selector (IPS). Stream gates are mapped from stream filters. Signed-off-by: Daniel Machon Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 9e02131ec272d031508aa36f30dd5d4d4ab7bf55 Author: Daniel Machon Date: Thu Feb 2 11:43:51 2023 +0100 net: microchip: sparx5: add function for calculating PTP basetime Add a new function for calculating PTP basetime, required by the stream gate scheduler to calculate gate state (open / close). Signed-off-by: Daniel Machon Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit d2185e79ba8f1c603af11f0864767d96a787348d Author: Daniel Machon Date: Thu Feb 2 11:43:50 2023 +0100 net: microchip: sparx5: add support for PSFP flow-meters Add support for configuring PSFP flow-meters (IEEE 802.1Q-2018, 8.6.5.1.3). The VCAP CLM (VCAP IS0 ingress classifier) classifies streams, identified by ISDX (Ingress Service Index, frame metadata), and maps ISDX to flow-meters. SDLB's provide the flow-meter parameters. Signed-off-by: Daniel Machon Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 1db82abf19697a83cdf641e4a9c66f4dcf516616 Author: Daniel Machon Date: Thu Feb 2 11:43:49 2023 +0100 net: microchip: sparx5: add support for service policers Add initial API for configuring policers. This patch add support for service policers. Signed-off-by: Daniel Machon Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 9bf50889898359c495c835e6ab15ba92ebf13e0f Author: Daniel Machon Date: Thu Feb 2 11:43:48 2023 +0100 net: microchip: sparx5: add support for Service Dual Leacky Buckets Add support for Service Dual Leacky Buckets (SDLB), used to implement PSFP flow-meters. Buckets are linked together in a leak chain of a leak group. Leak groups a preconfigured to serve buckets within a certain rate interval. Signed-off-by: Daniel Machon Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit bb535c0dbb6f5508bf81ec21b20c18d32a881ef1 Author: Daniel Machon Date: Thu Feb 2 11:43:47 2023 +0100 net: microchip: sparx5: add resource pools Add resource pools and accessor functions. These pools can be queried by the driver, whenever a finite resource is required. Some resources can be reused, in which case an index and a reference count is used to keep track of users. Signed-off-by: Daniel Machon Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit edad83e2ba1e44e104e24f2096e8a64f91b30620 Author: Daniel Machon Date: Thu Feb 2 11:43:46 2023 +0100 net: microchip: add registers needed for PSFP Add registers needed for PSFP. This patch also renames a single register, shortening its name (SYS_CLK_PER_100PS). Uses have been update accordingly. Signed-off-by: Daniel Machon Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 98d4187113d494cebb15f52a715d3091b2de1b4a Author: Andrzej Kacprowski Date: Thu Feb 2 10:21:11 2023 +0100 accel/ivpu: Fix FW API data alignment issues FW API structures have been updated to fix misaligned structure members. Also changed JSM message header format to account for future improvements. Added explicit check for minimum supported JSM API version. Fixes: 5d7422cfb498 ("accel/ivpu: Add IPC driver and JSM messages") Signed-off-by: Andrzej Kacprowski Signed-off-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20230202092114.2637452-2-stanislaw.gruszka@linux.intel.com (cherry picked from commit 4ea1e504db5b776892e2f5b0c5f05af6a046286b) Signed-off-by: Jacek Lawrynowicz commit 617c331d91077f896111044628c096802551dc66 Author: Florian Zumbiehl Date: Mon Feb 6 02:04:28 2023 +0100 USB: serial: option: add support for VW/Skoda "Carstick LTE" Add support for VW/Skoda "Carstick LTE" D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1c9e ProdID=7605 Rev=02.00 S: Manufacturer=USB Modem S: Product=USB Modem C: #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=500mA I: If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) I: If#=0x1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) I: If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) I: If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) The stick has AT command interfaces on interfaces 1, 2, and 3, and does PPP on interface 3. Signed-off-by: Florian Zumbiehl Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit c58bddb1d743e8b25aedd5f67d0bf391ecf79ca8 Author: Uwe Kleine-König Date: Tue Dec 13 16:35:53 2022 +0100 media: chips-media/imx-vdoa: 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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5204a5dce04b382a9131637c613f619afa64f873 Author: Uwe Kleine-König Date: Tue Dec 13 16:35:51 2022 +0100 media: ti/davinci: vpbe_venc: 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: Lad Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit eb78ca6a0496795f3abf16fe64b8450ef0639195 Author: Uwe Kleine-König Date: Tue Dec 13 16:35:50 2022 +0100 media: ti/davinci: vpbe_osd: 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: Lad Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 25e7b6c00dbf5cd319bc8bee1588f67880e45ee0 Author: Hans Verkuil Date: Thu Dec 8 08:52:06 2022 +0100 media: go7007: don't modify q->streaming The streaming state is maintained by the vb2 core, so drivers must never change it themselves. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c43784c856483dded7956175b5786e27af6d87f1 Author: Hans Verkuil Date: Thu Dec 8 08:51:32 2022 +0100 media: v4l2-mem2mem: use vb2_is_streaming() Don't touch q->streaming directly, use the vb2_is_streaming() function instead. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a0799442716c090d8cf4404deec41b96aff03502 Author: Hans Verkuil Date: Thu Dec 8 08:51:19 2022 +0100 media: s5p-mfc: use vb2_is_streaming() Don't touch q->streaming directly, use the vb2_is_streaming() function instead. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ac270a6fa5517c551aacd57210c42f2eccb1707e Author: Jammy Huang Date: Thu Dec 8 02:26:31 2022 +0100 media: docs: pixfmt-reserved: Update reference Use URL rather than plain text. Signed-off-by: Jammy Huang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c3fc806763b285c668e8a916bd7dfe8692caadce Author: Jammy Huang Date: Thu Dec 8 02:24:23 2022 +0100 media: docs: aspeed-video: Update reference Use URL rather than plain text. Signed-off-by: Jammy Huang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4be362d8449fa124c3437c86f278f4b063428c97 Author: Krzysztof Kozlowski Date: Sun Dec 4 19:34:55 2022 +0100 media: exynos4-is: drop unused pctrl field and headers The field 'pctrl' in 'struct fimc_is' is not used, just like linux/pinctrl/consumer.h headers in the headers. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c360945ea4c61262b3062a3a02037dae180f0311 Author: Krzysztof Kozlowski Date: Sun Dec 4 19:33:26 2022 +0100 media: docs: admin-guide: media: align HDMI CEC node names with dtschema The bindings expect "cec" for HDMI CEC node. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1963689bed4d500236938d90c91cdd5e63c1eb28 Author: Qiheng Lin Date: Fri Dec 2 11:18:36 2022 +0100 media: platform: mtk-mdp3: Fix return value check in mdp_probe() In case of error, the function mtk_mutex_get() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). And also fix the err_free_mutex case. Fixes: 61890ccaefaf ("media: platform: mtk-mdp3: add MediaTek MDP3 driver") Signed-off-by: Qiheng Lin Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 01cb370ff6c5abf2d64985832ff165f353ac04bb Author: Hans Verkuil Date: Wed Nov 30 12:15:13 2022 +0100 media: videobuf2-core: drop obsolete sanity check in __vb2_queue_free() The sanity check in __vb2_queue_free() is obsolete ever since commit f035eb4e976e ("[media] videobuf2: fix lockdep warning"). Remove it and let __vb2_queue_free() return void. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1925665ef403c5f5e605d10148870d1cb505b5ab Author: Ming Qian Date: Tue Nov 29 11:22:17 2022 +0100 media: amphion: remove redundant check of colorspace in venc_s_fmt record the colorspace set by user. if it's not supported by h264 vui, then zero will be written to vui, but don't modify the user setting. Fixes: 0401e659c1f9 ("media: amphion: add v4l2 m2m vpu encoder stateful driver") Signed-off-by: Ming Qian Acked-by: Nicolas Dufresne Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7206fcc59399729667260d58c63e3db4503ac511 Author: Yang Li Date: Tue Nov 29 08:53:22 2022 +0100 media: rzg2l-cru: Remove unneeded semicolon ./drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c:409:2-3: Unneeded semicolon ./drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c:407:2-3: Unneeded semicolon Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3273 Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b755063ec0394bca5c688c6ad88315cbb1b23e7b Author: Dmitry Torokhov Date: Mon Nov 28 20:49:45 2022 +0100 media: i2c: s5c73m3: remove support for platform data There are no existing users of s5c73m3_platform_data in the tree, and new users should either be using device tree, ACPI, or static device properties, so let's remove it from the driver. Reviewed-by: Linus Walleij Signed-off-by: Dmitry Torokhov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8d46c5cdadeb64206d2dd7d00f00dd26020ceb3c Author: Eugen Hristev Date: Mon Nov 28 15:07:17 2022 +0100 media: microchip: microchip-isc: replace v4l2_{dbg|info|err} with dev-* v4l2_dbg and friends are legacy and should be removed. Replaced all the calls with dev_dbg equivalent. This also removes the 'debug' module parameter which has become obsolete. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 14cd15e7a1e2a321f6184124bee95560035db4ef Author: Gerald Loacker Date: Mon Jan 30 09:47:10 2023 +0100 media: i2c: add imx415 cmos image sensor driver Add driver for the Sony IMX415 CMOS image sensor. Signed-off-by: Gerald Loacker Co-developed-by: Michael Riesch Signed-off-by: Michael Riesch Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7993dc12d6f2a49b03868e5ada895ad69c52bd23 Author: Michael Riesch Date: Mon Jan 30 09:47:09 2023 +0100 media: dt-bindings: media: i2c: add imx415 cmos image sensor Add devicetree binding for the Sony IMX415 CMOS image sensor. Signed-off-by: Michael Riesch Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 909d3096ac99fa2289f9b8945a3eab2269947a0a Author: Sakari Ailus Date: Wed Dec 21 09:30:11 2022 +0100 media: ipu3-cio2: Fix PM runtime usage_count in driver unbind Get the PM runtime usage_count and forbid PM runtime at driver unbind. The opposite is being done in probe() already. Fixes: commit c2a6a07afe4a ("media: intel-ipu3: cio2: add new MIPI-CSI2 driver") Cc: stable@vger.kernel.org # for >= 4.16 Signed-off-by: Sakari Ailus Reviewed-by: Bingbu Cao Signed-off-by: Mauro Carvalho Chehab commit c5b6f99c91a24c09cc8048b74d40477caad9690c Author: Jacopo Mondi Date: Thu Jan 26 17:59:09 2023 +0100 media: i2c: ov5670: Handle RO controls in set_ctrl The ov5670 driver registers three controls as read-only: - V4L2_CID_PIXEL_RATE - V4L2_CID_LINK_FREQ - V4L2_CID_HBLANK The driver updates the range of HBLANK with __v4l2_ctrl_modify_range() and updates the values of PIXEL_RATE and LINK_FREQ with an explicit call to __v4l2_ctrl_s_ctrl() in ov5670_set_pad_format() time. This causes the .set_ctrl handler to be called on these controls causing a non-fatal warning to be emitted: ov5670_set_ctrl Unhandled id:0x9e0902, val:0x824 This is currently only critical for HBLANK, as LINK_FREQ and PIXEL_RATE currently only support a single value, and the v4l2-ctrl framework skips calling .set_ctrl() if the current control value is not changed. Expand the ov5670_set_ctrl() callback to handle the above controls to remove the above warning and defend against future expansions of the supported pixel rates and link frequencies. Also be stricter and return an error value if a control is actually not handled. Reported-by: Luca Weiss Signed-off-by: Jacopo Mondi Tested-by: Luca Weiss Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 2eadd98dd4de7f983f0fc96586a4a914329fc811 Author: Jean-Michel Hautbois Date: Thu Jan 26 17:59:08 2023 +0100 media: i2c: ov5670: Add .get_selection() support Add support for the .get_selection() pad operation to the ov5670 sensor driver. Report the native sensor size (pixel array), the crop bounds (readable pixel array area) and the current and default analog crop rectangles. Currently all driver's modes use an analog crop rectangle of size [12, 4, 2600, 1952]. Instead of hardcoding the value in the operation implementation, ad an .analog_crop field to the sensor's modes definitions, to make sure that if any mode gets added, its crop rectangle will be defined as well. While at it re-sort the modes' field definition order to match the declaration order and initialize the crop rectangle in init_cfg(). [Sakari Ailus: Fix a typo on comments (03800 -> 0x3800)] Signed-off-by: Jean-Michel Hautbois Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Tested-by: Luca Weiss Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit bbc6071c4c65f8850dce05c54700afbf56e763a9 Author: Jacopo Mondi Date: Thu Jan 26 17:59:07 2023 +0100 media: i2c: ov5670: Implement init_cfg Implement the .init_cfg() pad operation and initialize the default format with the default full resolution mode 2592x1944. With .init_cfg() pad operation implemented the deprecated .open() internal operation can now be dropped. Signed-off-by: Jacopo Mondi Tested-by: Luca Weiss Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 62ab1e32597851450c9d42aab6aaf96f397d0d15 Author: Jacopo Mondi Date: Thu Jan 26 17:59:06 2023 +0100 media: i2c: ov5670: Add runtime_pm operations Implement the runtime resume and suspend routines and install them as runtime_pm handlers. While at it rework the probe() sequence in order to enable runtime_pm before registering the async subdevice. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Tested-by: Luca Weiss Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 0a844ab77bd1ee9349e34c2beac049dc4b50bf58 Author: Jacopo Mondi Date: Thu Jan 26 17:59:05 2023 +0100 media: i2c: ov5670: Probe GPIOs The OV5670 has a powerdown and reset pin, named respectively "PWDN" and "XSHUTDOWN". Optionally probe the gpios connected to the pins during the driver probe routine. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Tested-by: Luca Weiss Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit cf9ab879910f620fca10562ce9223b54463dff70 Author: Jacopo Mondi Date: Thu Jan 26 17:59:04 2023 +0100 media: i2c: ov5670: Probe regulators The OV5670 has three power supplies (AVDD, DOVDD and DVDD). Probe them in the driver to prepare controlling with runtime_pm operations. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Tested-by: Luca Weiss Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 8004c91e20959c241fcc7c87f6f7bc880dc25a27 Author: Jacopo Mondi Date: Thu Jan 26 17:59:03 2023 +0100 media: i2c: ov5670: Use common clock framework Add support for probing the main system clock using the common clock framework and its OF bindings. Maintain ACPI compatibility by falling back to parse 'clock-frequency'. Signed-off-by: Jacopo Mondi Tested-by: Luca Weiss Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 5635500ae516fb834d59077e16e2e4db85538e0d Author: Jacopo Mondi Date: Thu Jan 26 17:59:02 2023 +0100 media: i2c: ov5670: Allow probing with OF The ov5670 driver currently only supports probing using ACPI matching. Add support for OF and add a missing header inclusion. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Tested-by: Luca Weiss Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 3e4ab2342fc26800e8d40a82a6ad5dcedb419924 Author: Jacopo Mondi Date: Sat Jan 28 12:27:36 2023 +0100 media: dt-bindings: Add OV5670 Add the bindings documentation for Omnivision OV5670 image sensor. Signed-off-by: Jacopo Mondi Reviewed-by: Krzysztof Kozlowski Tested-by: Luca Weiss Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 221827ee2da4e61ba0d16b14ad40c6446ca3294f Author: Quentin Schulz Date: Wed Jun 8 15:44:20 2022 +0200 media: i2c: ov5675: add .get_selection support The sensor has 2592*1944 active pixels, surrounded by 16 active dummy pixels and there are an additional 24 black rows "at the bottom". [2624] +-----+------------------+-----+ | | 16 dummy | | +-----+------------------+-----+ | | | | | | [2592] | | | | | | |16 | valid | 16 |[2000] |dummy| |dummy| | | [1944]| | | | | | +-----+------------------+-----+ | | 16 dummy | | +-----+------------------+-----+ | | 24 black lines | | +-----+------------------+-----+ The top-left coordinate is gotten from the registers specified in the modes which are identical for both currently supported modes. There are currently two modes supported by this driver: 2592*1944 and 1296*972. The second mode is obtained thanks to subsampling while keeping the same field of view (FoV). No cropping involved, hence the harcoded values. Signed-off-by: Quentin Schulz Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c8aa2111e17ae8bd624ddc578a7b4cd43a9d469c Author: Quentin Schulz Date: Wed Jun 8 15:44:19 2022 +0200 media: i2c: ov5675: parse and register V4L2 device tree properties Parse V4L2 device tree properties and register controls for them. Reviewed-by: Jacopo Mondi Signed-off-by: Quentin Schulz Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 49d9ad719e8934fcd0de4a8317fd1a735e587f47 Author: Quentin Schulz Date: Wed Jun 8 15:44:18 2022 +0200 media: ov5675: add device-tree support and support runtime PM Until now, this driver only supported ACPI. This adds support for Device Tree too while enabling clock and regulators in runtime PM. Signed-off-by: Quentin Schulz Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c9dd57143e70d9ad164d0047393a02c74bd0fa1f Author: Quentin Schulz Date: Wed Jun 8 15:44:17 2022 +0200 media: dt-bindings: ov5675: document YAML binding This patch adds documentation of device tree in YAML schema for the OV5675 CMOS image sensor from Omnivision. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Quentin Schulz Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit ef86447e775fb1f2ced00d4c7fff2c0a1c63f165 Author: Jai Luthra Date: Tue Jan 17 09:16:23 2023 +0100 media: i2c: imx219: Fix binning for RAW8 capture 2x2 binning works fine for RAW10 capture, but for RAW8 1232p mode it leads to corrupted frames [1][2]. Using the special 2x2 analog binning mode fixes the issue, but causes artefacts for RAW10 1232p capture. So here we choose the binning mode depending upon the frame format selected. As both binning modes work fine for 480p RAW8 and RAW10 capture, it can share the same code path as 1232p for selecting binning mode. [1] https://forums.raspberrypi.com/viewtopic.php?t=332103 [2] https://github.com/raspberrypi/libcamera-apps/issues/281 Fixes: 22da1d56e982 ("media: i2c: imx219: Add support for RAW8 bit bayer format") Signed-off-by: Jai Luthra Reviewed-by: Dave Stevenson Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c699ce1a3838465fb87ecd951f0819404e70030a Author: Oleg Verych Date: Tue Jan 17 00:03:23 2023 +0100 media: sun4i-csi: Use CSI_INT_STA_REG name, fix typo in a comment Fix interrupt status register offset usage to be a defined name CSI_INT_STA_REG (= 0x34) instead of a plain number. Additionally fix a typo in a comment of the same file. Signed-off-by: Oleg Verych Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit cb33db2b6ccfe3ccc13347755ab3ef38691d59c3 Author: Laurent Pinchart Date: Tue Aug 23 02:58:22 2022 +0200 media: i2c: IMX296 camera sensor driver The IMX296LLR is a monochrome 1.60MP CMOS sensor from Sony. The driver supports cropping and binning (but not both at the same time due to hardware limitations) and exposure, gain, vertical blanking and test pattern controls. Preliminary support is also included for the color IMX296LQR sensor. [Sakari Ailus: Make driver's remove function return void] Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit fb6211f1584aad12c267c3333273f42f69438ced Author: Jó Ágila Bitsch Date: Sat Feb 4 13:15:01 2023 +0100 usb: gadget: add doc to struct usb_composite_dev Added documentation to new struct members for WebUSB: * bcd_webusb_version * b_webusb_vendor_code * landing_page * use_webusb to avoid warnings in the build of htmldocs Fixes: 93c473948c58 ("usb: gadget: add WebUSB landing page support") Reported-by: Stephen Rothwell Signed-off-by: Jó Ágila Bitsch Link: https://lore.kernel.org/r/Y95MRZZz3yC5lETB@jo-einhundert Signed-off-by: Greg Kroah-Hartman commit d680dc5805745e68e3c8d769f40685707ca7fe4f Author: Manivannan Sadhasivam Date: Tue Aug 23 02:58:21 2022 +0200 media: dt-bindings: media: i2c: Add IMX296 CMOS sensor binding Add YAML devicetree binding for IMX296 CMOS image sensor. Let's also add MAINTAINERS entry for the binding and driver. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Laurent Pinchart Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit afa4805799c1d332980ad23339fdb07b5e0cf7e0 Author: Paul Elder Date: Mon Nov 28 09:02:01 2022 +0100 media: ov5640: Fix analogue gain control Gain control is badly documented in publicly available (including leaked) documentation. There is an AGC pre-gain in register 0x3a13, expressed as a 6-bit value (plus an enable bit in bit 6). The driver hardcodes it to 0x43, which one application note states is equal to x1.047. The documentation also states that 0x40 is equel to x1.000. The pre-gain thus seems to be expressed as in 1/64 increments, and thus ranges from x1.00 to x1.984. What the pre-gain does is however unspecified. There is then an AGC gain limit, in registers 0x3a18 and 0x3a19, expressed as a 10-bit "real gain format" value. One application note sets it to 0x00f8 and states it is equal to x15.5, so it appears to be expressed in 1/16 increments, up to x63.9375. The manual gain is stored in registers 0x350a and 0x350b, also as a 10-bit "real gain format" value. It is documented in the application note as a Q6.4 values, up to x63.9375. One version of the datasheet indicates that the sensor supports a digital gain: The OV5640 supports 1/2/4 digital gain. Normally, the gain is controlled automatically by the automatic gain control (AGC) block. It isn't clear how that would be controlled manually. There appears to be no indication regarding whether the gain controlled through registers 0x350a and 0x350b is an analogue gain only or also includes digital gain. The words "real gain" don't necessarily mean "combined analogue and digital gains". Some OmniVision sensors (such as the OV8858) are documented as supoprting different formats for the gain values, selectable through a register bit, and they are called "real gain format" and "sensor gain format". For that sensor, we have (one of) the gain registers documented as 0x3503[2]=0, gain[7:0] is real gain format, where low 4 bits are fraction bits, for example, 0x10 is 1x gain, 0x28 is 2.5x gain If 0x3503[2]=1, gain[7:0] is sensor gain format, gain[7:4] is coarse gain, 00000: 1x, 00001: 2x, 00011: 4x, 00111: 8x, gain[7] is 1, gain[3:0] is fine gain. For example, 0x10 is 1x gain, 0x30 is 2x gain, 0x70 is 4x gain (The second part of the text makes little sense) "Real gain" may thus refer to the combination of the coarse and fine analogue gains as a single value. The OV5640 0x350a and 0x350b registers thus appear to control analogue gain. The driver incorrectly uses V4L2_CID_GAIN as V4L2 has a specific control for analogue gain, V4L2_CID_ANALOGUE_GAIN. Use it. If registers 0x350a and 0x350b are later found to control digital gain as well, the driver could then restrict the range of the analogue gain control value to lower than x64 and add a separate digital gain control. Signed-off-by: Paul Elder Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Jai Luthra Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7485edb2b6ca5960205c0a49bedfd09bba30e521 Author: Yuan Can Date: Thu Dec 8 09:06:25 2022 +0100 media: i2c: ov772x: Fix memleak in ov772x_probe() A memory leak was reported when testing ov772x with bpf mock device: AssertionError: unreferenced object 0xffff888109afa7a8 (size 8): comm "python3", pid 279, jiffies 4294805921 (age 20.681s) hex dump (first 8 bytes): 80 22 88 15 81 88 ff ff ."...... backtrace: [<000000009990b438>] __kmalloc_node+0x44/0x1b0 [<000000009e32f7d7>] kvmalloc_node+0x34/0x180 [<00000000faf48134>] v4l2_ctrl_handler_init_class+0x11d/0x180 [videodev] [<00000000da376937>] ov772x_probe+0x1c3/0x68c [ov772x] [<000000003f0d225e>] i2c_device_probe+0x28d/0x680 [<00000000e0b6db89>] really_probe+0x17c/0x3f0 [<000000001b19fcee>] __driver_probe_device+0xe3/0x170 [<0000000048370519>] driver_probe_device+0x49/0x120 [<000000005ead07a0>] __device_attach_driver+0xf7/0x150 [<0000000043f452b8>] bus_for_each_drv+0x114/0x180 [<00000000358e5596>] __device_attach+0x1e5/0x2d0 [<0000000043f83c5d>] bus_probe_device+0x126/0x140 [<00000000ee0f3046>] device_add+0x810/0x1130 [<00000000e0278184>] i2c_new_client_device+0x359/0x4f0 [<0000000070baf34f>] of_i2c_register_device+0xf1/0x110 [<00000000a9f2159d>] of_i2c_notify+0x100/0x160 unreferenced object 0xffff888119825c00 (size 256): comm "python3", pid 279, jiffies 4294805921 (age 20.681s) hex dump (first 32 bytes): 00 b4 a5 17 81 88 ff ff 00 5e 82 19 81 88 ff ff .........^...... 10 5c 82 19 81 88 ff ff 10 5c 82 19 81 88 ff ff .\.......\...... backtrace: [<000000009990b438>] __kmalloc_node+0x44/0x1b0 [<000000009e32f7d7>] kvmalloc_node+0x34/0x180 [<0000000073d88e0b>] v4l2_ctrl_new.cold+0x19b/0x86f [videodev] [<00000000b1f576fb>] v4l2_ctrl_new_std+0x16f/0x210 [videodev] [<00000000caf7ac99>] ov772x_probe+0x1fa/0x68c [ov772x] [<000000003f0d225e>] i2c_device_probe+0x28d/0x680 [<00000000e0b6db89>] really_probe+0x17c/0x3f0 [<000000001b19fcee>] __driver_probe_device+0xe3/0x170 [<0000000048370519>] driver_probe_device+0x49/0x120 [<000000005ead07a0>] __device_attach_driver+0xf7/0x150 [<0000000043f452b8>] bus_for_each_drv+0x114/0x180 [<00000000358e5596>] __device_attach+0x1e5/0x2d0 [<0000000043f83c5d>] bus_probe_device+0x126/0x140 [<00000000ee0f3046>] device_add+0x810/0x1130 [<00000000e0278184>] i2c_new_client_device+0x359/0x4f0 [<0000000070baf34f>] of_i2c_register_device+0xf1/0x110 The reason is that if priv->hdl.error is set, ov772x_probe() jumps to the error_mutex_destroy without doing v4l2_ctrl_handler_free(), and all resources allocated in v4l2_ctrl_handler_init() and v4l2_ctrl_new_std() are leaked. Fixes: 1112babde214 ("media: i2c: Copy ov772x soc_camera sensor driver") Signed-off-by: Yuan Can Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 90f7e76eac50c1ae54a445abc6a286837ade46cf Author: Yassine Oudjana Date: Fri Dec 9 15:37:41 2022 +0100 media: i2c: ak7375: Add regulator management Make the driver get needed regulators on probe and enable/disable them on runtime PM callbacks. Signed-off-by: Yassine Oudjana Tested-by: Umang Jain Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 04a79f078329b14f260db15250e84c97022f42cd Author: Yassine Oudjana Date: Fri Dec 9 15:37:40 2022 +0100 media: dt-bindings: ak7375: Add supplies Add supply properties to describe regulators needed to power the AK7375 VCM. Signed-off-by: Yassine Oudjana Acked-by: Krzysztof Kozlowski Tested-by: Umang Jain Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 6d801f89ad7c485bbb14c0138d991beebd307aa6 Author: Yassine Oudjana Date: Fri Dec 9 15:37:39 2022 +0100 media: dt-bindings: ak7375: Convert to DT schema Convert DT bindings document for AKM AK7375 VCM to DT schema format and add an example. Signed-off-by: Yassine Oudjana Reviewed-by: Krzysztof Kozlowski Tested-by: Umang Jain Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b516354542b71632438d33920f6ce7478ecab0ce Author: Laurent Pinchart Date: Mon Dec 12 14:25:05 2022 +0100 media: mc: entity: Fix minor issues in comments and documentation Commit ae219872834a ("media: mc: entity: Rewrite media_pipeline_start()") incorrectly referred to entity instead of pad in a comment, and forgot to update a second comment accordingly when moving the pipe from entity to pad. Furthermore, it didn't properly reflow the documentation text it updated. Fix those small issues. Fixes: ae219872834a ("media: mc: entity: Rewrite media_pipeline_start()") Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit a967a3a788028f541e4db54beabcebc3648997db Author: Laurent Pinchart Date: Mon Dec 12 14:25:04 2022 +0100 media: mc: Get media_device directly from pad Various functions access the media_device from a pad by going through the entity the pad belongs to. Remove the level of indirection and get the media_device from the pad directly. Fixes: 9e3576a1ae2b ("media: mc: convert pipeline funcs to take media_pad") Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e1610209a8879e7bc6a4910f93b071cf6d91cbef Author: Alexander Stein Date: Tue Dec 13 15:07:27 2022 +0100 media: i2c: ov9282: Switch to use dev_err_probe helper In the probe path, dev_err() can be replaced with dev_err_probe() which will check if error code is -EPROBE_DEFER and prints the error name. It also sets the defer probe reason which can be checked later through debugfs. It's more simple in error path. Signed-off-by: Alexander Stein Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit ea5930a4dcb0d33db9fc018a753f383394409ed8 Author: Alexander Stein Date: Tue Dec 13 15:07:26 2022 +0100 media: i2c: ov9282: remove unused and unset i2c_client member This is not need anyway as the i2c_client is stored in v4l2_subdev. Signed-off-by: Alexander Stein Acked-by: Daniele Alessandrelli Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d38e781ea035456c742605fb21d0dd3c755b7b0b Merge: f5b3c341a46ec 4ec5183ec4865 Author: Greg Kroah-Hartman Date: Mon Feb 6 08:35:30 2023 +0100 Merge 6.2-rc7 into char-misc-next We need the char-misc driver fixes in here as other patches depend on them. Signed-off-by: Greg Kroah-Hartman commit 36c9b753a186a4ea5c18fee0d903c3891c401049 Author: Laurent Pinchart Date: Wed Dec 21 10:33:41 2022 +0100 media: xilinx: dma: Use media_pipeline_for_each_pad() Replace usage of the deprecated media graph walk API with the new media_pipeline_for_each_pad() macro. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 27e45f2e59c9db2c83ed67775e911c8a3c776db2 Author: Laurent Pinchart Date: Wed Dec 21 10:33:40 2022 +0100 media: ti: omap4iss: Use media_pipeline_for_each_entity() Replace usage of the deprecated media graph walk API with the new media_pipeline_for_each_entity() and media_pipeline_for_each_pad() macros. Even though the entity iterator may seem a better match when build the entity bitmap in iss_video_stream(), it would not be more efficient as it would still iterate internally over all pads. As the entity iterator requires explicit iterator initialization and cleanup calls, the code would be more complex. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 3e8537b4c15172bfe1b285c3155ed5c37d523cd3 Author: Laurent Pinchart Date: Wed Dec 21 10:33:39 2022 +0100 media: ti: omap3isp: Use media_pipeline_for_each_entity() Replace usage of the deprecated media graph walk API with the new media_pipeline_for_each_entity() macro. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit eac564de0915433716b83fad800d00675ccc6972 Author: Laurent Pinchart Date: Wed Dec 21 10:33:38 2022 +0100 media: mc: entity: Add entity iterator for media_pipeline Add a media_pipeline_for_each_entity() macro to iterate over entities in a pipeline. This should be used by driver as a replacement of the media_graph_walk API, as iterating over the media_pipeline uses the cached list of pads and is thus more efficient. Deprecate the media_graph_walk API to indicate it shouldn't be used in new drivers. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 924fb3ec50f5156d21e4f484358fb36f75b91ca8 Merge: 4f6dfc2136fb2 4ec5183ec4865 Author: Greg Kroah-Hartman Date: Mon Feb 6 08:33:30 2023 +0100 Merge 6.2-rc7 into usb-next We need the USB fixes in here, and this resolves a merge conflict with the i915 driver as reported in linux-next Signed-off-by: Greg Kroah-Hartman commit d10ac51e8a047e613bee8309739d122e48e00bcb Author: Laurent Pinchart Date: Wed Dec 21 10:33:37 2022 +0100 media: mc: entity: Add pad iterator for media_pipeline Add a media_pipeline_for_each_pad() macro to iterate over pads in a pipeline. This should be used by driver as a replacement of the media_graph_walk API, as iterating over the media_pipeline uses the cached list of pads and is thus more efficient. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d7ff69139908842adf824be4f50c7e9ac5886c04 Author: Jai Luthra Date: Tue Jan 3 13:27:36 2023 +0100 media: ov5640: Handle delays when no reset_gpio set Some module manufacturers [1][2] don't expose the RESETB and PWDN pins of the sensor directly through the 15-pin FFC connector. Instead wiring ~PWDN gpio to the sensor pins with appropriate delays. In such cases, reset_gpio will not be available to the driver, but it will still be toggled when the sensor is powered on, and thus we should still honor the wait time of >= 5ms + 1ms + 20ms (see figure 2-3 in [3]) before attempting any i/o operations over SCCB. Also, rename the function to ov5640_powerup_sequence to better match the datasheet (section 2.7). [1] https://digilent.com/reference/_media/reference/add-ons/pcam-5c/pcam_5c_sch.pdf [2] https://www.alinx.com/public/upload/file/AN5641_User_Manual.pdf [3] https://cdn.sparkfun.com/datasheets/Sensors/LightImaging/OV5640_datasheet.pdf Fixes: 19a81c1426c1 ("[media] add Omnivision OV5640 sensor driver") Reported-by: Nishanth Menon Signed-off-by: Jai Luthra Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit decea0a98b7ac04536c7d659f74783e8d67a06c0 Author: Jai Luthra Date: Tue Jan 3 13:27:35 2023 +0100 media: ov5640: Fix soft reset sequence and timings Move the register-based reset out of the init_setting[] and into the powerup_sequence function. The sensor is power cycled and reset using the gpio pins so the soft reset is not always necessary. This also ensures that soft reset honors the timing sequence from the datasheet [1]. [1] https://cdn.sparkfun.com/datasheets/Sensors/LightImaging/OV5640_datasheet.pdf Fixes: 19a81c1426c1 ("[media] add Omnivision OV5640 sensor driver") Reported-by: Nishanth Menon Suggested-by: Jacopo Mondi Signed-off-by: Jai Luthra Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 51c2bf13a42d82d519660dbfd6ea8f3bf0d962b8 Author: Andy Shevchenko Date: Tue Jan 3 15:52:19 2023 +0100 media: i2c: st-vgxy61: Use asm intead of asm-generic There is no point to specify asm-generic for the unaligned.h. Drop the 'generic' suffix and move the inclusion to be after the non-media linux/* ones. Signed-off-by: Andy Shevchenko Reviewed-by: Benjamin Mugnier Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e13064a32db56a7dad5a3539b7bd2482284f103a Author: Andrey Skvortsov Date: Sun Jan 15 18:30:10 2023 +0100 media: ov5640: Update last busy timestamp to reset autosuspend timer Otherwise autosuspend delay doesn't work and power is cut off immediately as device is freed. Signed-off-by: Andrey Skvortsov Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e14d3ac81bd2264edc76bf5796305b2dfea44487 Author: Nicholas Roth Date: Mon Jan 16 16:44:48 2023 +0100 media: i2c: Add driver for OmniVision OV8858 Add a driver for OmniVision OV8858 image sensor. The driver currently supports operations with 2 and 4 data lanes, in full resolution and half-binned resolution modes. The driver has been upported from the PinephonePro BSP available at https://gitlab.com/pine64-org/linux.git at commit 8c4a90c12dc2 ("media: i2c: ov8858: Use default subdev name"). Signed-off-by: Nicholas Roth Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 8e6cb91f946a059c3714c6d7f0e43e313f389183 Author: Abel Vesa Date: Mon Jan 30 14:30:46 2023 +0200 dt-bindings: cpufreq: cpufreq-qcom-hw: Add SM8550 compatible Add compatible for EPSS CPUFREQ-HW on SM8550. Also document the interrupts. Signed-off-by: Abel Vesa Acked-by: Rob Herring Signed-off-by: Viresh Kumar commit fa68d9c5ff765318adf8e46ff1d89539a8546a0d Author: Luca Weiss Date: Sun Oct 16 11:00:30 2022 +0200 dt-bindings: cpufreq: cpufreq-qcom-hw: Add missing compatibles Document the cpufreq-epss compatibles currently used in the tree, plus the sc7280 which will be added in a separate commit. Signed-off-by: Luca Weiss Signed-off-by: Viresh Kumar commit 09608d62ae5cd9559549637cccb4092d8ecad3a8 Author: Nícolas F. R. A. Prado Date: Thu Jan 26 10:48:56 2023 -0500 cpufreq: mediatek-hw: Register to module device table Register the compatibles for this module on the module device table so it can be automatically loaded when a matching device is found on the system. Signed-off-by: Nícolas F. R. A. Prado Signed-off-by: Viresh Kumar commit 7214015c7f975542d227db6eaec2db2ecc88f2c1 Author: Yi-Wei Wang Date: Tue Jan 24 11:53:23 2023 +0000 cpufreq: tegra194: Enable CPUFREQ thermal cooling Populate the flag CPUFREQ_IS_COOLING_DEV for the Tegra194 CPUFREQ driver to register it as a cooling device. This enables CPU frequency throttling for CPUs when the passive trip points are crossed. Signed-off-by: Yi-Wei Wang Signed-off-by: Jon Hunter Signed-off-by: Viresh Kumar commit 04d7a7ae43fc4eed800efadbb4a18059172afb19 Author: Yangtao Li Date: Thu Feb 2 17:41:23 2023 +0800 f2fs: fix f2fs_show_options to show nogc_merge mount option Commit 5911d2d1d1a3 ("f2fs: introduce gc_merge mount option") forgot to show nogc_merge option, let's fix it. Signed-off-by: Yangtao Li Signed-off-by: Jaegeuk Kim commit 844545c51a5b2a524b22a2fe9d0b353b827d24b4 Author: Eric Biggers Date: Thu Feb 2 17:02:39 2023 -0800 f2fs: fix cgroup writeback accounting with fs-layer encryption When writing a page from an encrypted file that is using filesystem-layer encryption (not inline encryption), f2fs encrypts the pagecache page into a bounce page, then writes the bounce page. It also passes the bounce page to wbc_account_cgroup_owner(). That's incorrect, because the bounce page is a newly allocated temporary page that doesn't have the memory cgroup of the original pagecache page. This makes wbc_account_cgroup_owner() not account the I/O to the owner of the pagecache page as it should. Fix this by always passing the pagecache page to wbc_account_cgroup_owner(). Fixes: 578c647879f7 ("f2fs: implement cgroup writeback support") Cc: stable@vger.kernel.org Reported-by: Matthew Wilcox (Oracle) Signed-off-by: Eric Biggers Acked-by: Tejun Heo Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b03a41a495df35f8e8d25220878bd6b8472d9396 Author: qixiaoyu1 Date: Thu Feb 2 16:20:27 2023 +0800 f2fs: fix wrong calculation of block age Currently we wrongly calculate the new block age to old * LAST_AGE_WEIGHT / 100. Fix it to new * (100 - LAST_AGE_WEIGHT) / 100 + old * LAST_AGE_WEIGHT / 100. Signed-off-by: qixiaoyu1 Signed-off-by: xiongping1 Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0b3bc49c936c1e6f399fcd2028ce24c3de9e7e59 Author: Randy Dunlap Date: Thu Jan 12 22:40:12 2023 -0800 ubi: use correct names in function kernel-doc comments Fix kernel-doc warnings by using the correct function names in their kernel-doc notation: drivers/mtd/ubi/eba.c:72: warning: expecting prototype for next_sqnum(). Prototype was for ubi_next_sqnum() instead drivers/mtd/ubi/wl.c:176: warning: expecting prototype for wl_tree_destroy(). Prototype was for wl_entry_destroy() instead drivers/mtd/ubi/misc.c:24: warning: expecting prototype for calc_data_len(). Prototype was for ubi_calc_data_len() instead Signed-off-by: Randy Dunlap Cc: Richard Weinberger Cc: Miquel Raynal Cc: Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org Signed-off-by: Richard Weinberger commit 91cc8fbcc8c705310fc6e39899e6e6685531935b Author: Christoph Hellwig Date: Thu Jan 12 17:15:40 2023 +0100 ubi: block: set BLK_MQ_F_BLOCKING Set BLK_MQ_F_BLOCKING so that the block layer always calls ->queue_rq from process context and drop the driver internal workqueue. Signed-off-by: Christoph Hellwig Signed-off-by: Richard Weinberger commit c85007e2e3942da1f9361e4b5a9388ea3a8dcc5b Author: Dave Chinner Date: Sun Feb 5 08:48:24 2023 -0800 xfs: don't use BMBT btree split workers for IO completion When we split a BMBT due to record insertion, we offload it to a worker thread because we can be deep in the stack when we try to allocate a new block for the BMBT. Allocation can use several kilobytes of stack (full memory reclaim, swap and/or IO path can end up on the stack during allocation) and we can already be several kilobytes deep in the stack when we need to split the BMBT. A recent workload demonstrated a deadlock in this BMBT split offload. It requires several things to happen at once: 1. two inodes need a BMBT split at the same time, one must be unwritten extent conversion from IO completion, the other must be from extent allocation. 2. there must be a no available xfs_alloc_wq worker threads available in the worker pool. 3. There must be sustained severe memory shortages such that new kworker threads cannot be allocated to the xfs_alloc_wq pool for both threads that need split work to be run 4. The split work from the unwritten extent conversion must run first. 5. when the BMBT block allocation runs from the split work, it must loop over all AGs and not be able to either trylock an AGF successfully, or each AGF is is able to lock has no space available for a single block allocation. 6. The BMBT allocation must then attempt to lock the AGF that the second task queued to the rescuer thread already has locked before it finds an AGF it can allocate from. At this point, we have an ABBA deadlock between tasks queued on the xfs_alloc_wq rescuer thread and a locked AGF. i.e. The queued task holding the AGF lock can't be run by the rescuer thread until the task the rescuer thread is runing gets the AGF lock.... This is a highly improbably series of events, but there it is. There's a couple of ways to fix this, but the easiest way to ensure that we only punt tasks with a locked AGF that holds enough space for the BMBT block allocations to the worker thread. This works for unwritten extent conversion in IO completion (which doesn't have a locked AGF and space reservations) because we have tight control over the IO completion stack. It is typically only 6 functions deep when xfs_btree_split() is called because we've already offloaded the IO completion work to a worker thread and hence we don't need to worry about stack overruns here. The other place we can be called for a BMBT split without a preceeding allocation is __xfs_bunmapi() when punching out the center of an existing extent. We don't remove extents in the IO path, so these operations don't tend to be called with a lot of stack consumed. Hence we don't really need to ship the split off to a worker thread in these cases, either. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 01a3af226b7d4002245a4b12b12dae83d02e11dc Author: Darrick J. Wong Date: Wed Feb 1 10:16:04 2023 -0800 xfs: fix confusing variable names in xfs_refcount_item.c Variable names in this code module are inconsistent and confusing. xfs_phys_extent describe physical mappings, so rename them "pmap". xfs_refcount_intents describe refcount intents, so rename them "ri". Signed-off-by: Darrick J. Wong commit 0b11553ec54a6d88907e60d0595dbcef98539747 Author: Darrick J. Wong Date: Wed Feb 1 10:16:04 2023 -0800 xfs: pass refcount intent directly through the log intent code Pass the incore refcount intent through the CUI logging code instead of repeatedly boxing and unboxing parameters. Signed-off-by: Darrick J. Wong commit ffaa196f622127acb7895723c4849fad68210270 Author: Darrick J. Wong Date: Wed Feb 1 10:16:03 2023 -0800 xfs: fix confusing variable names in xfs_rmap_item.c Variable names in this code module are inconsistent and confusing. xfs_map_extent describe file mappings, so rename them "map". xfs_rmap_intents describe block mapping intents, so rename them "ri". Signed-off-by: Darrick J. Wong commit 1534328bb427f175e5de56c9af62f8f4675da595 Author: Darrick J. Wong Date: Wed Feb 1 10:16:03 2023 -0800 xfs: pass rmap space mapping directly through the log intent code Pass the incore rmap space mapping through the RUI logging code instead of repeatedly boxing and unboxing parameters. Signed-off-by: Darrick J. Wong commit 578c714b215d474c52949e65a914dae67924f0fe Author: Darrick J. Wong Date: Wed Feb 1 10:16:02 2023 -0800 xfs: fix confusing xfs_extent_item variable names Change the name of all pointers to xfs_extent_item structures to "xefi" to make the name consistent and because the current selections ("new" and "free") mean other things in C. Signed-off-by: Darrick J. Wong commit 72ba455599ad13d08c29dafa22a32360e07b1961 Author: Darrick J. Wong Date: Wed Feb 1 10:16:02 2023 -0800 xfs: pass xfs_extent_free_item directly through the log intent code Pass the incore xfs_extent_free_item through the EFI logging code instead of repeatedly boxing and unboxing parameters. Signed-off-by: Darrick J. Wong commit f3ebac4c94c1483cca86296834f6706e1002e7a0 Author: Darrick J. Wong Date: Wed Feb 1 10:16:01 2023 -0800 xfs: fix confusing variable names in xfs_bmap_item.c Variable names in this code module are inconsistent and confusing. xfs_map_extent describe file mappings, so rename them "map". xfs_bmap_intents describe block mapping intents, so rename them "bi". Signed-off-by: Darrick J. Wong commit ddccb81b26ec021ae1f3366aa996cc4c68dd75ce Author: Darrick J. Wong Date: Wed Feb 1 09:50:53 2023 -0800 xfs: pass the xfs_bmbt_irec directly through the log intent code Instead of repeatedly boxing and unboxing the incore extent mapping structure as it passes through the BUI code, pass the pointer directly through. Signed-off-by: Darrick J. Wong commit 8954c44ff47749255a2ee2b1d08ec3deb8345bc1 Author: Xu Panda Date: Wed Feb 1 09:31:34 2023 -0800 xfs: 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 Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit e8254a8ec901b78d939d8ab11a56bc98eb7862db Author: Arınç ÜNAL Date: Sun Feb 5 00:42:49 2023 +0300 mips: ralink: make SOC_MT7621 select PINCTRL_MT7621 and fix help section The dt-binding of the MT7621 SoC uses the pinctrl driver. Therefore, have this driver selected by default. The help section for SOC_MT7621 exceeds 80 columns which is the preferred limit of a single line. A tab character is 8 columns. Rearrange the text accordingly. Signed-off-by: Arınç ÜNAL Signed-off-by: Thomas Bogendoerfer commit 0cb4228f6cc9ed0ca2be0d9ddf29168a8e3a3905 Author: H. Nikolaus Schaller Date: Sun Jan 29 19:57:04 2023 +0100 MIPS: DTS: CI20: fix otg power gpio According to schematics it is PF15 and not PF14 (MIC_SW_EN). Seems as if it was hidden and not noticed during testing since there is no sound DT node. Fixes: 158c774d3c64 ("MIPS: Ingenic: Add missing nodes for Ingenic SoCs and boards.") Cc: stable@vger.kernel.org Signed-off-by: H. Nikolaus Schaller Acked-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 4cd81356f8a0b0fe81d01c083dc623578aba57db Author: Jonathan Neuschäfer Date: Sun Jan 29 16:20:58 2023 +0100 MIPS: dts: lantiq: Remove bogus interrupt-parent; line Specifying interrupt-parent without a value (in other words, as a bool) doesn't really mean anything. Remove one such property in the Lantiq Danube DT, at /sram@1f000000/eiu@101000. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Thomas Bogendoerfer commit eed36d77517786e4b3a9f17c6a66c6df2fc99442 Author: Masahiro Yamada Date: Sun Feb 5 21:09:56 2023 +0900 setlocalversion: clean up the construction of version output Concatenate all components in the last line instead of accumulating them into the 'res' variable. No functional change is intended. A preparation for the next change. Signed-off-by: Masahiro Yamada commit 9c1a7bfc2993112cfb3056b18301fcafe5c2fde5 Author: Lukas Bulwahn Date: Wed Jan 11 11:05:54 2023 +0100 irqchip/ls-scfg-msi: Simplify Kconfig dependencies Having both PCI_MSI and PCI is redundant. Drop PCI. Signed-off-by: Lukas Bulwahn [maz: cut commit message extra verbosity] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230111100554.24500-1-lukas.bulwahn@gmail.com commit 02298b7bae12936ca313975b02e7f98b06670d37 Author: Miaoqian Lin Date: Mon Jan 2 12:56:10 2023 +0400 irqchip/ti-sci: Fix refcount leak in ti_sci_intr_irq_domain_probe of_irq_find_parent() returns a node pointer with refcount incremented, We should use of_node_put() on it when not needed anymore. Add missing of_node_put() to avoid refcount leak. Fixes: cd844b0715ce ("irqchip/ti-sci-intr: Add support for Interrupt Router driver") Signed-off-by: Miaoqian Lin Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230102085611.3955984-1-linmq006@gmail.com commit 9419e700021a393f67be36abd0c4f3acc6139041 Author: Miaoqian Lin Date: Mon Jan 2 12:42:08 2023 +0400 irqchip/irq-mvebu-gicp: Fix refcount leak in mvebu_gicp_probe of_irq_find_parent() returns a node pointer with refcount incremented, We should use of_node_put() on it when not needed anymore. Add missing of_node_put() to avoid refcount leak. Fixes: a68a63cb4dfc ("irqchip/irq-mvebu-gicp: Add new driver for Marvell GICP") Signed-off-by: Miaoqian Lin Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230102084208.3951758-1-linmq006@gmail.com commit 071d068b89e95d1b078aa6bbcb9d0961b77d6aa1 Author: Miaoqian Lin Date: Mon Jan 2 12:28:10 2023 +0400 irqchip/alpine-msi: Fix refcount leak in alpine_msix_init_domains of_irq_find_parent() returns a node pointer with refcount incremented, We should use of_node_put() on it when not needed anymore. Add missing of_node_put() to avoid refcount leak. Fixes: e6b78f2c3e14 ("irqchip: Add the Alpine MSIX interrupt controller") Signed-off-by: Miaoqian Lin Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230102082811.3947760-1-linmq006@gmail.com commit 6caa5a2b78f5f53c433d3a3781e53325da22f0ac Author: Miaoqian Lin Date: Mon Jan 2 16:13:18 2023 +0400 irqchip: Fix refcount leak in platform_irqchip_probe of_irq_find_parent() returns a node pointer with refcount incremented, We should use of_node_put() on it when not needed anymore. Add missing of_node_put() to avoid refcount leak. Fixes: f8410e626569 ("irqchip: Add IRQCHIP_PLATFORM_DRIVER_BEGIN/END and IRQCHIP_MATCH helper macros") Signed-off-by: Miaoqian Lin Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230102121318.3990586-1-linmq006@gmail.com commit c19f897194288ec286bb52001b9ee9551876a614 Author: Marc Zyngier Date: Tue Jan 3 19:42:21 2023 +0530 irqchip/apple-aic: Move over to core ipi-mux Now that the complexity of the AIC IPI mux has been copied into the core code for the benefit of the riscv architecture, shrink the AIC driver by the same amount by using that infrastructure. Signed-off-by: Marc Zyngier Signed-off-by: Anup Patel Acked-by: Hector Martin Link: https://lore.kernel.org/r/20230103141221.772261-10-apatel@ventanamicro.com commit 835a486cd9f55790dee9f6b67ce0057d49f15da5 Author: Anup Patel Date: Tue Jan 3 19:42:15 2023 +0530 genirq: Add mechanism to multiplex a single HW IPI All RISC-V platforms have a single HW IPI provided by the INTC local interrupt controller. The HW method to trigger INTC IPI can be through external irqchip (e.g. RISC-V AIA), through platform specific device (e.g. SiFive CLINT timer), or through firmware (e.g. SBI IPI call). To support multiple IPIs on RISC-V, add a generic IPI multiplexing mechanism which help us create multiple virtual IPIs using a single HW IPI. This generic IPI multiplexing is inspired by the Apple AIC irqchip driver and it is shared by various RISC-V irqchip drivers. Signed-off-by: Anup Patel Reviewed-by: Hector Martin Tested-by: Hector Martin Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230103141221.772261-4-apatel@ventanamicro.com commit fc98adb9a8435cdb4e8349138ac0b728df80ade9 Author: Huacai Chen Date: Wed Dec 7 22:06:43 2022 +0800 irqchip/loongson-liointc: Save/restore int_edge/int_pol registers during S3/S4 If int_edge/int_pol registers are configured to not be the default values, we should save/restore them during S3/S4. Signed-off-by: Yingkun Meng Signed-off-by: Huacai Chen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221207140643.1600743-1-chenhuacai@loongson.cn commit e740604232dc5c3097808f3e91fd02d9316010c5 Author: Ryan Chen Date: Mon Jan 30 16:54:30 2023 +0800 irqchip/aspeed-scu-ic: Correctly initialise status and enable registers The status and enable registers are never initialised with sensible default values. Fix those. Signed-off-by: Ryan Chen [maz: commit message] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230130085430.635583-1-ryan_chen@aspeedtech.com commit 534066a983df0935847061c844eb178f8a53a9e7 Author: Masahiro Yamada Date: Mon Jan 30 17:28:49 2023 +0900 .gitignore: ignore *.cover and *.mbx The 'b4' command creates a *.mbx file, and also a *.cover file if the patch set has a cover-letter. Ignore them. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Reviewed-by: Nick Desaulniers commit 67d7c3023a672c2b73d19d6d23684df670fce648 Author: Masahiro Yamada Date: Sat Jan 28 18:24:23 2023 +0900 kbuild: remove --include-dir MAKEFLAG from top Makefile I added $(srctree)/ to some included Makefiles in the following commits: - 3204a7fb98a3 ("kbuild: prefix $(srctree)/ to some included Makefiles") - d82856395505 ("kbuild: do not require sub-make for separate output tree builds") They were a preparation for removing --include-dir flag. I have never thought --include-dir useful. Rather, it _is_ harmful. For example, run the following commands: $ make -s ARCH=x86 mrproper defconfig $ make ARCH=arm O=foo dtbs make[1]: Entering directory '/tmp/linux/foo' HOSTCC scripts/basic/fixdep Error: kernelrelease not valid - run 'make prepare' to update it UPD include/config/kernel.release make[1]: Leaving directory '/tmp/linux/foo' The first command configures the source tree for x86. The next command tries to build ARM device trees in the separate foo/ directory - this must stop because the directory foo/ has not been configured yet. However, due to --include-dir=$(abs_srctree), the top Makefile includes the wrong include/config/auto.conf from the source tree and continues building. Kbuild traverses the directory tree, but of course it does not work correctly. The Error message is also pointless - 'make prepare' does not help at all for fixing the issue. This commit fixes more arch Makefile, and finally removes --include-dir from the top Makefile. There are more breakages under drivers/, but I do not volunteer to fix them all. I just moved --include-dir to drivers/Makefile. With this commit, the second command will stop with a sensible message. $ make -s ARCH=x86 mrproper defconfig $ make ARCH=arm O=foo dtbs make[1]: Entering directory '/tmp/linux/foo' SYNC include/config/auto.conf.cmd *** *** The source tree is not clean, please run 'make ARCH=arm mrproper' *** in /tmp/linux *** make[2]: *** [../Makefile:646: outputmakefile] Error 1 /tmp/linux/Makefile:770: include/config/auto.conf.cmd: No such file or directory make[1]: *** [/tmp/linux/Makefile:793: include/config/auto.conf.cmd] Error 2 make[1]: Leaving directory '/tmp/linux/foo' make: *** [Makefile:226: __sub-make] Error 2 Signed-off-by: Masahiro Yamada commit feb113ad8be1bafcd0a3b93bae639be939af563c Author: Carlos Llamas Date: Wed Jan 25 18:30:47 2023 +0000 kbuild: fix trivial typo in comment Add missing underscore in CONFIG_DEBUG_INFO_BTF_MODULES. Fixes: f73edc8951b2 ("kbuild: unify two modpost invocations") Signed-off-by: Carlos Llamas Signed-off-by: Masahiro Yamada commit 5573b4daa26a0cf15aa0fecd7f1be16e0b6157bc Author: Masahiro Yamada Date: Thu Jan 26 11:26:43 2023 +0900 kbuild: do not automatically add -w option to modpost When there is a missing input file (vmlinux.o or Module.symvers), you are likely to get a ton of unresolved symbols. Currently, Kbuild automatically adds the -w option to allow module builds to continue with warnings instead of errors. This may not be what the user expects because it is generally more useful to catch all possible issues at build time instead of at run time. Let's not do what the user did not ask. If you still want to build modules anyway, you can proceed by explicitly setting KBUILD_MODPOST_WARN=1. Since you may miss a real issue, you need to be aware of what you are doing. Suggested-by: William McVicker Signed-off-by: Masahiro Yamada Tested-by: Will McVicker commit 4e3feaad6ff8a7a57e3bf3308a93c93e3a2e17a6 Author: Nathan Chancellor Date: Tue Jan 24 09:19:28 2023 -0700 powerpc/vdso: Filter clang's auto var init zero enabler when linking After commit 8d9acfce3332 ("kbuild: Stop using '-Qunused-arguments' with clang"), the PowerPC vDSO shows the following error with clang-13 and older when CONFIG_INIT_STACK_ALL_ZERO is enabled: clang: error: argument unused during compilation: '-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang' [-Werror,-Wunused-command-line-argument] clang-14 added a change to make sure this flag never triggers -Wunused-command-line-argument, so it is fixed with newer releases. For older releases that the kernel still supports building with, just filter out this flag, as has been done for other flags. Fixes: f0a42fbab447 ("powerpc/vdso: Improve linker flags") Fixes: 8d9acfce3332 ("kbuild: Stop using '-Qunused-arguments' with clang") Link: https://github.com/llvm/llvm-project/commit/ca6d5813d17598cd180995fb3bdfca00f364475f Signed-off-by: Nathan Chancellor Signed-off-by: Masahiro Yamada commit 58e0e5c85e31b0b30f16ac835d537ba0b7ff7d37 Author: Masahiro Yamada Date: Tue Jan 24 12:04:16 2023 +0900 kbuild: deb-pkg: add --source-option=-sP If the source package fails to build, ../linux.orig is left over. In the next run of 'make deb-pkg', you will get the following error: dpkg-source: error: orig directory 'linux.orig' already exists, not overwriting, giving up; use -sA, -sK or -sP to override You can manually remove ../linux.orig, but it is annoying. Pass -sP down to dpkg-source. Signed-off-by: Masahiro Yamada commit 1cb86b6c313623486038165f90f4067578c2f5d5 Author: Masahiro Yamada Date: Sat Jan 28 01:19:42 2023 +0900 kbuild: save overridden KERNELRELEASE in include/config/kernel.release ${KERNELRELEASE} is used as a part of the installation path. (INSTALL_DTBS_PATH, MODLIB, etc.) When KERNELRELEASE is overridden from the command line, it should be saved in include/config/kernel.release, so that it will be consistently used for the installation steps. Signed-off-by: Masahiro Yamada commit ec31f868ec674edfcf653cc7c82b365c6f570cd9 Author: Masahiro Yamada Date: Sun Jan 22 23:14:25 2023 +0900 setlocalversion: absorb $(KERNELVERSION) Print $(KERNELVERSION) in setlocalversion so that the callers get simpler. Signed-off-by: Masahiro Yamada commit 75280bdf49b2f563fb5404df7c7b735c118695fe Author: Masahiro Yamada Date: Sun Jan 22 23:14:23 2023 +0900 setlocalversion: make indentation shallower Return earlier if we are not in the correct git repository. This makes the code more readable. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 992ebfab2a75c276fe27f7fd7a3fb326ccd7225b Author: Masahiro Yamada Date: Sun Jan 22 23:14:22 2023 +0900 setlocalversion: simplify the construction of the short version With the --short option given, scm_version() prints "+". Just append it. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 9b4a19153a77890519fc8fbd966672b39373c30d Merge: c5d52d7bf241a 080b4e24852b1 Author: Bjorn Andersson Date: Sat Feb 4 11:00:53 2023 -0800 Merge branch '20230201041853.1934355-1-quic_bjorande@quicinc.com' into drivers-for-6.3 commit 080b4e24852b1d5b66929f69344e6c3eeb963941 Author: Bjorn Andersson Date: Tue Jan 31 20:18:52 2023 -0800 soc: qcom: pmic_glink: Introduce altmode support With the PMIC GLINK service, the host OS subscribes to USB-C altmode messages, which are sent by the firmware to notify the host OS about state updates and HPD interrupts. The pmic_glink_altmode driver registers for these notifications and propagates the notifications as typec_mux, typec_switch and DRM OOB notifications as necessary to implement DisplayPort altmode support. Signed-off-by: Bjorn Andersson Acked-by: Neil Armstrong Tested-by: Konrad Dybcio # SM8350 PDX215 Reviewed-by: Neil Armstrong Tested-by: Neil Armstrong # on SM8550-MTP & SM8450-HDK Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230201041853.1934355-4-quic_bjorande@quicinc.com commit 58ef4ece1e41ac525db3e79529909683325d85df Author: Bjorn Andersson Date: Tue Jan 31 20:18:51 2023 -0800 soc: qcom: pmic_glink: Introduce base PMIC GLINK driver The PMIC GLINK service runs on one of the co-processors of some modern Qualcomm platforms and implements USB-C and battery managements. It uses a message based protocol over GLINK for communication with the OS, hence the name. The driver implemented provides the rpmsg device for communication and uses auxiliary bus to spawn off individual devices in respective subsystem. The auxiliary devices are spawned off from a platform_device, so that the drm_bridge is available early, to allow the DisplayPort driver to probe even before the remoteproc has spun up. Signed-off-by: Bjorn Andersson Tested-by: Konrad Dybcio # SM8350 PDX215 Reviewed-by: Neil Armstrong Tested-by: Neil Armstrong # on SM8550-MTP & SM8450-HDK Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230201041853.1934355-3-quic_bjorande@quicinc.com commit 68d868adc121f68edde0f4c0e16923103b868945 Author: Bjorn Andersson Date: Tue Jan 31 20:18:50 2023 -0800 dt-bindings: soc: qcom: Introduce PMIC GLINK binding The PMIC GLINK service, running on a coprocessor on some modern Qualcomm platforms and implement USB Type-C handling and battery management. This binding describes the component in the OS used to communicate with the firmware and connect it's resources to those described in the Devicetree, particularly the USB Type-C controllers relationship with USB and DisplayPort components. Signed-off-by: Bjorn Andersson Tested-by: Konrad Dybcio # SM8350 PDX215 Signed-off-by: Bjorn Andersson Reviewed-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230201041853.1934355-2-quic_bjorande@quicinc.com commit 056f65c3938bfa40141669b974d441348af3ee54 Author: Corentin Labbe Date: Tue Jan 31 14:03:04 2023 +0000 leds: Remove ide-disk trigger No user of ide-disk remains, so remove this deprecated trigger. Only a few platforms used this and were fixed in 2016. Signed-off-by: Corentin Labbe Acked-by: Rob Herring Reviewed-by: Linus Walleij Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230131140304.626779-2-clabbe@baylibre.com commit d8fe820b989b733470d0193bf7a71d8e1eb4ca50 Author: Corentin Labbe Date: Tue Jan 31 14:03:03 2023 +0000 dt-bindings: leds: Add disk write/read and usb-host/usb-gadget The triggers enum misses 3 cases used by gemini DT. usb-host was added via commit 0cfbd328d60f ("usb: Add LED triggers for USB activity") so we add also as valid trigger usb-gadget which was added along in this commit. disk-read/disk-write were added by commit d1ed7c558612 ("leds: Extends disk trigger for reads and writes") Reviewed-by: Linus Walleij Acked-by: Rob Herring Signed-off-by: Corentin Labbe Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230131140304.626779-1-clabbe@baylibre.com commit 783422d00d7d8f7725dc781fcd3cfcaae13595e5 Author: Hans de Goede Date: Thu Jan 26 16:38:23 2023 +0100 extcon: intel-cht-wc: Add support for Lenovo Yoga Tab 3 Pro YT3-X90F The Lenovo Yoga Tab 3 Pro YT3-X90F needs the same handling as the Lenovo Yogabook models. That is it needs the extcon code to: 1. Control the Vbus regulator and USB-role-switch for the micro-USB port's host/device mode switching. 2. Register a power_supply device so that the charger-chip driver can see what sort of charger (SDP/CDP/DCP) is connected. Signed-off-by: Hans de Goede Acked-by: Chanwoo Choi Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230126153823.22146-4-hdegoede@redhat.com commit 0e61637f0fb5578198c8d95c3fb9b893390bc1e7 Author: Hans de Goede Date: Thu Jan 26 16:38:22 2023 +0100 i2c: cht-wc: Add charger-chip info for the Lenovo Yoga Tab 3 YT3-X90F On x86 devices with a CHT Whiskey Cove PMIC the driver for the I2C bus coming from the PMIC is responsible for instantiating the i2c_client for the charger chip. Add the necessary i2c_board_info for this. Signed-off-by: Hans de Goede Acked-by: Wolfram Sang Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230126153823.22146-3-hdegoede@redhat.com commit 8d9ef69487e114f80e20ffbec14ca8684953fef0 Author: Hans de Goede Date: Thu Jan 26 16:38:21 2023 +0100 mfd: intel_soc_pmic_chtwc: Add Lenovo Yoga Tab 3 X90F to intel_cht_wc_models The drivers for various CHT Whiskey Cove PMIC child-devices need to know the model, since they have model specific behavior. The DMI match table for this is shared between the child-device-drivers inside the MFD driver. Add the Lenovo Yoga Tab 3 X90F, which is a previously unknown tablet model with a CHT Whiskey Cove PMIC, to the intel_cht_wc_models enum and to the DMI match table. Signed-off-by: Hans de Goede Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230126153823.22146-2-hdegoede@redhat.com commit 79efecb41f58430454cbb5809fa7b3135150da6d Author: Maxim Mikityanskiy Date: Tue Aug 30 19:39:49 2022 +0300 net/mlx5e: Trigger NAPI after activating an SQ If an SQ is deactivated and reactivated again, some packets could be sent after MLX5E_SQ_STATE_ENABLED is cleared, but before netif_tx_stop_queue, meaning that NAPI might miss some completions. In order to handle them, make sure to trigger NAPI after SQ activation in all cases where it can be relevant. Regular SQs, XDP SQs and XSK SQs are good. Missing cases added: after recovery, after activating HTB SQs and after activating PTP SQs. Signed-off-by: Maxim Mikityanskiy Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit a7385187a386d0fc4721727e2cbe4a70a9cff6f7 Author: Raed Salem Date: Wed Jan 11 14:58:19 2023 +0200 net/mlx5e: IPsec, support upper protocol selector field offload Add support to policy/state upper protocol selector field offload, this will enable to select traffic for IPsec operation based on l4 protocol (TCP/UDP) with specific source/destination port. Signed-off-by: Raed Salem Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit ce231772da8c7bc4c31d6171379957cd4b2b7a5f Author: Dragos Tatulea Date: Thu Jan 19 21:23:55 2023 +0200 net/mlx5e: IPoIB, Add support for XDR speed Add XDR IB PTYS coding and XDR speed 200Gbps. Signed-off-by: Dragos Tatulea Reviewed-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed commit 7eef93003e5d20e1a6a6e59e12d914b5431cbda2 Author: Jack Morgenstein Date: Wed Jan 18 19:57:04 2023 +0200 net/mlx5: Enhance debug print in page allocation failure Provide more details to aid debugging. Fixes: bf0bf77f6519 ("mlx5: Support communicating arbitrary host page size to firmware") Signed-off-by: Eran Ben Elisha Signed-off-by: Majd Dibbiny Signed-off-by: Jack Morgenstein Signed-off-by: Saeed Mahameed commit b63636b6c170aaf0becd67d14ba7c538d1f8d4f5 Author: Rahul Rameshbabu Date: Mon Nov 21 17:16:38 2022 -0800 net/mlx5: Add firmware support for MTUTC scaled_ppm frequency adjustments When device is capable of handling scaled ppm values for adjusting frequency, conversion to ppb will not be done by the driver. Instead, the scaled ppm value will be passed directly to the device for the frequency adjustment operation. Signed-off-by: Rahul Rameshbabu Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed commit 04937a0f68911a62dfd0a84bb383dcbf0a19d8c8 Author: Rahul Rameshbabu Date: Thu Jan 19 18:14:40 2023 -0800 net/mlx5: Document support for RoCE HCA disablement capability Some mlx5 devices are capable of disabling RoCE. In this situation, disablement does not need to be handled at the driver level. Signed-off-by: Rahul Rameshbabu Reviewed-by: Shay Drory Signed-off-by: Saeed Mahameed commit 8ce3b586faa471ab750bd201c0fd063c2a29e515 Author: Rahul Rameshbabu Date: Tue Oct 11 17:25:28 2022 -0700 net/mlx5: Add counter information to mlx5 driver documentation Update rst file to contain general information about statistics counters for the mlx5 driver. Add specifics about individual counters in list tables. Signed-off-by: Rahul Rameshbabu Reviewed-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit e12ebbf0cc55c98c7bdd30099b1833bc729cbe83 Author: Rahul Rameshbabu Date: Sat Oct 15 22:29:21 2022 -0700 net/mlx5: Document previously implemented mlx5 tracepoints Tracepoints were previously implemented but not documented till this patch series. Signed-off-by: Rahul Rameshbabu Reviewed-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit a12ba19269d727a4f9f68365a8d4542513c369d8 Author: Rahul Rameshbabu Date: Sat Oct 15 22:25:12 2022 -0700 net/mlx5: Update Kconfig parameter documentation Provide information for Kconfig flags defined but not documented till this patch series for the mlx5 driver. Signed-off-by: Rahul Rameshbabu Reviewed-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit f2d51e579359b708d7063eef543bec6a57d2b5e9 Author: Rahul Rameshbabu Date: Tue Oct 11 17:25:28 2022 -0700 net/mlx5: Separate mlx5 driver documentation into multiple pages The mlx5 device driver documentation page has grown in size and should be split into multiple subpages. This change also contains a table of contents for these new subpages. Signed-off-by: Rahul Rameshbabu Reviewed-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 199abf33f4145947c872987be60b6fb3e2dc7279 Author: Roi Dayan Date: Tue Nov 29 11:43:16 2022 +0200 net/mlx5: Lag, Move mpesw related definitions to mpesw.h mpesw definitions should be in mpesw.h and not lag.h. Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit 6a80313d24ac0417e2e12620c10be42c0a07da0e Author: Mark Bloch Date: Mon Dec 5 15:37:49 2022 +0200 net/mlx5: Lag, Use flag to check for shared FDB mode It's redundant and incorrect to check lag is also sriov mode. Signed-off-by: Mark Bloch Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit b399b066e27e82aa04e6281b7e12803063987c7f Author: Roi Dayan Date: Thu Dec 1 11:14:00 2022 +0200 net/mlx5: Lag, Remove redundant bool allocation on the stack There is no need to allocate the bool variable and can just return the value. Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit 9a49a64ea7edbe070d39d945f6fc99c41a011268 Author: Roi Dayan Date: Thu Dec 1 10:58:52 2022 +0200 net/mlx5: Lag, Use mlx5_lag_dev() instead of derefering pointers Use the existing wrapper mlx5_lag_dev() to access the lag object from dev for better maintainability and consistent code. Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit 2afcfae77a0798fa0de4e575dc1ab202c153993c Author: Roi Dayan Date: Mon Nov 28 13:52:07 2022 +0200 net/mlx5: Lag, Update multiport eswitch check to log an error Update the function to log an error to the user if failing to offload the rule and while there add correct prefix for the function name. Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit 042b7858d50f33af1f3569ad23f23afd5234b0f6 Merge: 88c940cccbfd4 aff7bfed90974 Author: David S. Miller Date: Sat Feb 4 09:48:19 2023 +0000 Merge branch 'net-smc-parallelism' D. Wythe says: ==================== net/smc: optimize the parallelism of SMC-R connections This patch set attempts to optimize the parallelism of SMC-R connections, mainly to reduce unnecessary blocking on locks, and to fix exceptions that occur after thoses optimization. According to Off-CPU graph, SMC worker's off-CPU as that: smc_close_passive_work (1.09%) smcr_buf_unuse (1.08%) smc_llc_flow_initiate (1.02%) smc_listen_work (48.17%) __mutex_lock.isra.11 (47.96%) An ideal SMC-R connection process should only block on the IO events of the network, but it's quite clear that the SMC-R connection now is queued on the lock most of the time. The goal of this patchset is to achieve our ideal situation where network IO events are blocked for the majority of the connection lifetime. There are three big locks here: 1. smc_client_lgr_pending & smc_server_lgr_pending 2. llc_conf_mutex 3. rmbs_lock & sndbufs_lock And an implementation issue: 1. confirm/delete rkey msg can't be sent concurrently while protocol allows indeed. Unfortunately,The above problems together affect the parallelism of SMC-R connection. If any of them are not solved. our goal cannot be achieved. After this patch set, we can get a quite ideal off-CPU graph as following: smc_close_passive_work (41.58%) smcr_buf_unuse (41.57%) smc_llc_do_delete_rkey (41.57%) smc_listen_work (39.10%) smc_clc_wait_msg (13.18%) tcp_recvmsg_locked (13.18) smc_listen_find_device (25.87%) smcr_lgr_reg_rmbs (25.87%) smc_llc_do_confirm_rkey (25.87%) We can see that most of the waiting times are waiting for network IO events. This also has a certain performance improvement on our short-lived conenction wrk/nginx benchmark test: +--------------+------+------+-------+--------+------+--------+ |conns/qps |c4 | c8 | c16 | c32 | c64 | c200 | +--------------+------+------+-------+--------+------+--------+ |SMC-R before |9.7k | 10k | 10k | 9.9k | 9.1k | 8.9k | +--------------+------+------+-------+--------+------+--------+ |SMC-R now |13k | 19k | 18k | 16k | 15k | 12k | +--------------+------+------+-------+--------+------+--------+ |TCP |15k | 35k | 51k | 80k | 100k | 162k | +--------------+------+------+-------+--------+------+--------+ The reason why the benefit is not obvious after the number of connections has increased dues to workqueue. If we try to change workqueue to UNBOUND, we can obtain at least 4-5 times performance improvement, reach up to half of TCP. However, this is not an elegant solution, the optimization of it will be much more complicated. But in any case, we will submit relevant optimization patches as soon as possible. Please note that the premise here is that the lock related problem must be solved first, otherwise, no matter how we optimize the workqueue, there won't be much improvement. Because there are a lot of related changes to the code, if you have any questions or suggestions, please let me know. Thanks D. Wythe v1 -> v2: 1. Fix panic in SMC-D scenario 2. Fix lnkc related hashfn calculation exception, caused by operator priority 3. Only wake up one connection if the lnk is not active 4. Delete obsolete unlock logic in smc_listen_work() 5. PATCH format, do Reverse Christmas tree 6. PATCH format, change all xxx_lnk_xxx function to xxx_link_xxx 7. PATCH format, add correct fix tag for the patches for fixes. 8. PATCH format, fix some spelling error 9. PATCH format, rename slow to do_slow v2 -> v3: 1. add SMC-D support, remove the concept of link cluster since SMC-D has no link at all. Replace it by lgr decision maker, who provides suggestions to SMC-D and SMC-R on whether to create new link group. 2. Fix the corruption problem described by PATCH 'fix application data exception' on SMC-D. v3 -> v4: 1. Fix panic caused by uninitialization map. v4 -> v5: 1. Make SMC-D buf creation be serial to avoid Potential error 2. Add a flag to synchronize the success of the first contact with the ready of the link group, including SMC-D and SMC-R. 3. Fixed possible reference count leak in smc_llc_flow_start(). 4. reorder the patch, make bugfix PATCH be ahead. v5 -> v6: 1. Separate the bugfix patches to make it independent. 2. Merge patch 'fix SMC_CLC_DECL_ERR_REGRMB without smc_server_lgr_pending' with patch 'remove locks smc_client_lgr_pending and smc_server_lgr_pending' 3. Format code styles, including alignment and reverse christmas tree style. 4. Fix a possible memory leak in smc_llc_rmt_delete_rkey() and smc_llc_rmt_conf_rkey(). v6 -> v7: 1. Discard patch attempting to remove global locks 2. Discard patch attempting make confirm/delete rkey process concurrently ==================== Signed-off-by: David S. Miller commit aff7bfed9097435ea38de919befbe2d7771a3e87 Author: D. Wythe Date: Thu Feb 2 16:26:42 2023 +0800 net/smc: replace mutex rmbs_lock and sndbufs_lock with rw_semaphore It's clear that rmbs_lock and sndbufs_lock are aims to protect the rmbs list or the sndbufs list. During connection establieshment, smc_buf_get_slot() will always be invoked, and it only performs read semantics in rmbs list and sndbufs list. Based on the above considerations, we replace mutex with rw_semaphore. Only smc_buf_get_slot() use down_read() to allow smc_buf_get_slot() run concurrently, other part use down_write() to keep exclusive semantics. Signed-off-by: D. Wythe Signed-off-by: David S. Miller commit 4da687448de7b51dcca9d024c6049fa223f5363f Author: D. Wythe Date: Thu Feb 2 16:26:41 2023 +0800 net/smc: reduce unnecessary blocking in smcr_lgr_reg_rmbs() Unlike smc_buf_create() and smcr_buf_unuse(), smcr_lgr_reg_rmbs() is exclusive when assigned rmb_desc was not registered, although it can be executed in parallel when assigned rmb_desc was registered already and only performs read semtamics on it. Hence, we can not simply replace it with read semaphore. The idea here is that if the assigned rmb_desc was registered already, use read semaphore to protect the critical section, once the assigned rmb_desc was not registered, keep using keep write semaphore still to keep its exclusivity. Thanks to the reusable features of rmb_desc, which allows us to execute in parallel in most cases. Signed-off-by: D. Wythe Signed-off-by: David S. Miller commit f6421014e88983c5bb7a25c71c01ae6278a01df9 Author: D. Wythe Date: Thu Feb 2 16:26:40 2023 +0800 net/smc: use read semaphores to reduce unnecessary blocking in smc_buf_create() & smcr_buf_unuse() Following is part of Off-CPU graph during frequent SMC-R short-lived processing: process_one_work (51.19%) smc_close_passive_work (28.36%) smcr_buf_unuse (28.34%) rwsem_down_write_slowpath (28.22%) smc_listen_work (22.83%) smc_clc_wait_msg (1.84%) smc_buf_create (20.45%) smcr_buf_map_usable_links rwsem_down_write_slowpath (20.43%) smcr_lgr_reg_rmbs (0.53%) rwsem_down_write_slowpath (0.43%) smc_llc_do_confirm_rkey (0.08%) We can clearly see that during the connection establishment time, waiting time of connections is not on IO, but on llc_conf_mutex. What is more important, the core critical area (smcr_buf_unuse() & smc_buf_create()) only perfroms read semantics on links, we can easily replace it with read semaphore. Signed-off-by: D. Wythe Signed-off-by: David S. Miller commit b5dd4d6981717f7e2682c0419fe832328c7441cf Author: D. Wythe Date: Thu Feb 2 16:26:39 2023 +0800 net/smc: llc_conf_mutex refactor, replace it with rw_semaphore llc_conf_mutex was used to protect links and link related configurations in the same link group, for example, add or delete links. However, in most cases, the protected critical area has only read semantics and with no write semantics at all, such as obtaining a usable link or an available rmb_desc. This patch do simply code refactoring, replace mutex with rw_semaphore, replace mutex_lock with down_write and replace mutex_unlock with up_write. Theoretically, this replacement is equivalent, but after this patch, we can distinguish lock granularity according to different semantics of critical areas. Signed-off-by: D. Wythe Signed-off-by: David S. Miller commit 69218b59be20689cc62ee87cd2890c58c41bae15 Author: Mark Brown Date: Fri Feb 3 19:52:47 2023 +0000 kselftest/alsa: Run PCM tests for multiple cards in parallel With each test taking 4 seconds the runtime of pcm-test can add up. Since generally each card in the system is physically independent and will be unaffected by what's going on with other cards we can mitigate this by testing each card in parallel. Make a list of cards as we enumerate the system and then start a thread for each, then join the threads to ensure they have all finished. The threads each run the same tests we currently run for each PCM on the card before exiting. The list of PCMs is kept global since it helps with global operations like working out our planned number of tests and identifying missing PCMs and it seemed neater to check for PCMs on the right card in the card thread than make every PCM loop iterate over cards as well. We don't run per-PCM tests in parallel since in embedded systems it can be the case that resources are shared between the PCMs and operations on one PCM on a card may constrain what can be done on another PCM on the same card leading to potentially unstable results. We use a mutex to ensure that the reporting of results is serialised and we don't have issues with anything like the current test number, we could do this in the kselftest framework but it seems like this might cause problems for other tests that are doing lower level testing and building in constrained environments such as nolibc so this seems more sensible. Note that the ordering of the tests can't be guaranteed as things stand, this does not seem like a major problem since the numbering of tests often changes as test programs are changed so results parsers are expected to rely on the test name rather than the test numbers. We also now prefix the machine generated test name when printing the description of the test since this is logged before streaming starts. On my two card desktop system this reduces the overall runtime by a third. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230203-alsa-pcm-test-card-thread-v1-1-59941640ebba@kernel.org Signed-off-by: Takashi Iwai commit 0d9eb7ed958a71296c6829869f6304ddfdca64df Author: Takashi Sakamoto Date: Thu Feb 2 22:37:08 2023 +0900 ALSA: fireface: add field for the number of messages copied to user space Current structure includes no field to express the number of messages copied to user space, thus user space application needs to information out of the structure to parse the content of structure. This commit adds a field to express the number of messages copied to user space since It is more preferable to use self-contained structure. Kees Cook proposed an idea of annotation for bound of flexible arrays in his future improvement for flexible-length array in kernel. The additional field for message count is suitable to the idea as well. Reference: https://people.kernel.org/kees/bounded-flexible-arrays-in-c Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230202133708.163936-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit cf1d2ffcc6f17b422239f6ab34b078945d07f9aa Author: Ard Biesheuvel Date: Wed Feb 1 09:48:12 2023 +0100 efi: Discover BTI support in runtime services regions Add the generic plumbing to detect whether or not the runtime code regions were constructed with BTI/IBT landing pads by the firmware, permitting the OS to enable enforcement when mapping these regions into the OS's address space. Signed-off-by: Ard Biesheuvel Reviewed-by: Kees Cook commit 17c9b4e1a7d14719378c3eedefc2960018f5a7bb Author: Florian Lehner Date: Fri Feb 3 13:14:39 2023 +0100 bpf: fix typo in header for bpf_perf_prog_read_value Fix a simple typo in the documentation for bpf_perf_prog_read_value. Signed-off-by: Florian Lehner Acked-by: John Fastabend Link: https://lore.kernel.org/r/20230203121439.25884-1-dev@der-flo.net Signed-off-by: Martin KaFai Lau commit 88c940cccbfd4bf8e16d50aa9dc0c15390cd17e5 Merge: 8788260e8f61c 800db2d125c2b Author: Jakub Kicinski Date: Fri Feb 3 20:05:59 2023 -0800 Merge branch 'updates-to-enetc-txq-management' Vladimir Oltean says: ==================== Updates to ENETC TXQ management The set ensures that the number of TXQs given by enetc to the network stack (mqprio or TX hashing) + the number of TXQs given to XDP never exceeds the number of available TXQs. These are the first 4 patches of series "[v5,net-next,00/17] ENETC mqprio/taprio cleanup" from here: https://patchwork.kernel.org/project/netdevbpf/cover/20230202003621.2679603-1-vladimir.oltean@nxp.com/ There is no change in this version compared to there. I split them off because this contains a fix for net-next and it would be good if it could go in quickly. I also did it to reduce the patch count of that other series, if I need to respin it again. ==================== Link: https://lore.kernel.org/r/20230203001116.3814809-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 800db2d125c2bc22c448e2386c3518e663d6db71 Author: Vladimir Oltean Date: Fri Feb 3 02:11:16 2023 +0200 net: enetc: ensure we always have a minimum number of TXQs for stack Currently it can happen that an mqprio qdisc is installed with num_tc 8, and this will reserve 8 (out of 8) TXQs for the network stack. Then we can attach an XDP program, and this will crop 2 TXQs, leaving just 6 for mqprio. That's not what the user requested, and we should fail it. On the other hand, if mqprio isn't requested, we still give the 8 TXQs to the network stack (with hashing among a single traffic class), but then, cropping 2 TXQs for XDP is fine, because the user didn't explicitly ask for any number of TXQs, so no expectations are violated. Simply put, the logic that mqprio should impose a minimum number of TXQs for the network never existed. Let's say (more or less arbitrarily) that without mqprio, the driver expects a minimum number of TXQs equal to the number of CPUs (on NXP LS1028A, that is either 1, or 2). And with mqprio, mqprio gives the minimum required number of TXQs. Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit 4ea1dd743eb6c76dec6ed28fae7e1629961a55af Author: Vladimir Oltean Date: Fri Feb 3 02:11:15 2023 +0200 net: enetc: recalculate num_real_tx_queues when XDP program attaches Since the blamed net-next commit, enetc_setup_xdp_prog() no longer goes through enetc_open(), and therefore, the function which was supposed to detect whether a BPF program exists (in order to crop some TX queues from network stack usage), enetc_num_stack_tx_queues(), no longer gets called. We can move the netif_set_real_num_rx_queues() call to enetc_alloc_msix() (probe time), since it is a runtime invariant. We can do the same thing with netif_set_real_num_tx_queues(), and let enetc_reconfigure_xdp_cb() explicitly recalculate and change the number of stack TX queues. Fixes: c33bfaf91c4c ("net: enetc: set up XDP program under enetc_reconfigure()") Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit 46a0ecf93b6d188379efe05cdde8564f1fe7fdad Author: Vladimir Oltean Date: Fri Feb 3 02:11:14 2023 +0200 net: enetc: allow the enetc_reconfigure() callback to fail enetc_reconfigure() was modified in commit c33bfaf91c4c ("net: enetc: set up XDP program under enetc_reconfigure()") to take an optional callback that runs while the netdev is down, but this callback currently cannot fail. Code up the error handling so that the interface is restarted with the old resources if the callback fails. Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit 1c81a9b3aaa26f290c23dee8629579b3ebb994b3 Author: Vladimir Oltean Date: Fri Feb 3 02:11:13 2023 +0200 net: enetc: simplify enetc_num_stack_tx_queues() We keep a pointer to the xdp_prog in the private netdev structure as well; what's replicated per RX ring is done so just for more convenient access from the NAPI poll procedure. Simplify enetc_num_stack_tx_queues() by looking at priv->xdp_prog rather than iterating through the information replicated per RX ring. Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit 8788260e8f61cd0444b0db443c2f22af2b49c9fb Merge: dfefcb0c04174 6579f5bacc2c4 Author: Jakub Kicinski Date: Fri Feb 3 19:56:26 2023 -0800 Merge branch 'raw-add-drop-reasons-and-use-another-hash-function' Eric Dumazet says: ==================== raw: add drop reasons and use another hash function Two first patches add drop reasons to raw input processing. Last patch spreads RAW sockets in the shared hash tables to avoid long hash buckets in some cases. ==================== Link: https://lore.kernel.org/r/20230202094100.3083177-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 6579f5bacc2c4cbc5ef6abb45352416939d1f844 Author: Eric Dumazet Date: Thu Feb 2 09:41:00 2023 +0000 raw: use net_hash_mix() in hash function Some applications seem to rely on RAW sockets. If they use private netns, we can avoid piling all RAW sockets bound to a given protocol into a single bucket. Also place (struct raw_hashinfo).lock into its own cache line to limit false sharing. Alternative would be to have per-netns hashtables, but this seems too expensive for most netns where RAW sockets are not used. Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit 42186e6c00352ce9df9e3f12b1ff82e61978d40b Author: Eric Dumazet Date: Thu Feb 2 09:40:59 2023 +0000 ipv4: raw: add drop reasons Use existing helpers and drop reason codes for RAW input path. Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit 8d8ebd77f5ede7ff9e3072653221706655924191 Author: Eric Dumazet Date: Thu Feb 2 09:40:58 2023 +0000 ipv6: raw: add drop reasons Use existing helpers and drop reason codes for RAW input path. Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit dfefcb0c04174996fbfc1484197423c0c0938a6d Merge: d795527d50796 7c976c7cfc70d Author: Jakub Kicinski Date: Fri Feb 3 19:25:27 2023 -0800 Merge branch 'devlink-move-devlink-dev-code-to-a-separate-file' Moshe Shemesh says: ==================== devlink: Move devlink dev code to a separate file This patchset is moving code from the file leftover.c to new file dev.c. About 1.3K lines are moved by this patchset covering most of the devlink dev object callbacks and functionality: reload, eswitch, info, flash and selftest. ==================== Link: https://lore.kernel.org/r/1675349226-284034-1-git-send-email-moshe@nvidia.com Signed-off-by: Jakub Kicinski commit 7c976c7cfc70dbe7abfcd7a74cc0baa02b788c77 Author: Moshe Shemesh Date: Thu Feb 2 16:47:06 2023 +0200 devlink: Move devlink dev selftest code to dev Move devlink dev selftest callbacks and related code from leftover.c to file dev.c. No functional change in this patch. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit ec4a0ce92e0c4abf833ad2c3b1face0f01432bff Author: Moshe Shemesh Date: Thu Feb 2 16:47:05 2023 +0200 devlink: Move devlink_info_req struct to be local As all users of the struct devlink_info_req are already in dev.c, move this struct from devl_internal.c to be local in dev.c. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit a13aab66cbe02daaed3dde3a6d296ad0a5fab543 Author: Moshe Shemesh Date: Thu Feb 2 16:47:04 2023 +0200 devlink: Move devlink dev flash code to dev Move devlink dev flash callbacks, helpers and other related code from leftover.c to dev.c. No functional change in this patch. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit d60191c46ec9379453c674fcaa40531e2c0b2ba4 Author: Moshe Shemesh Date: Thu Feb 2 16:47:03 2023 +0200 devlink: Move devlink dev info code to dev Move devlink dev info callbacks, related drivers helpers functions and other related code from leftover.c to dev.c. No functional change in this patch. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit af2f8c1f82294069c6c02ea7d94c43d7c3e73a36 Author: Moshe Shemesh Date: Thu Feb 2 16:47:02 2023 +0200 devlink: Move devlink dev eswitch code to dev Move devlink dev eswitch callbacks and related code from leftover.c to file dev.c. No functional change in this patch. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit c6ed7d6ef929a4502cc89c90a3c57e8814f4fcc9 Author: Moshe Shemesh Date: Thu Feb 2 16:47:01 2023 +0200 devlink: Move devlink dev reload code to dev Move devlink dev reload callback and related code from leftover.c to file dev.c. No functional change in this patch. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit dbeeca81bd9399fc60ae69ff944836280b4fd094 Author: Moshe Shemesh Date: Thu Feb 2 16:47:00 2023 +0200 devlink: Split out dev get and dump code Move devlink dev get and dump callbacks and related dev code to new file dev.c. This file shall include all callbacks that are specific on devlink dev object. No functional change in this patch. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit d795527d50796b18c08462188e555139bdd6f967 Author: Vladimir Oltean Date: Thu Feb 2 16:03:54 2023 +0200 net: dsa: use NL_SET_ERR_MSG_WEAK_MOD() more consistently Now that commit 028fb19c6ba7 ("netlink: provide an ability to set default extack message") provides a weak function that doesn't override an existing extack message provided by the driver, it makes sense to use it also for LAG and HSR offloading, not just for bridge offloading. Also consistently put the message string on a separate line, to reduce line length from 92 to 84 characters. Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20230202140354.3158129-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 9e69e845ae95227949c400af1037dca023f73038 Author: Jeff LaBundy Date: Fri Jan 27 16:30:09 2023 -0600 dt-bindings: input: iqs626a: Redefine trackpad property types Following a recent refactor of the driver to properly drop unused device nodes, the driver expects trackpad channel touch thresholds and ATI base values to be specified under single trackpad channel child nodes. This enhancement moves both properties to scalar values as opposed to arrays, making their types consistent across bindings. Fixes: a8f1f0dc865c ("dt-bindings: input: Add bindings for Azoteq IQS626A") Signed-off-by: Jeff LaBundy Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/Y9RQcddToBr1rrnJ@nixie71 Signed-off-by: Dmitry Torokhov commit 4d3d2694e168c542b088eef5059d31498f679020 Author: Jeff LaBundy Date: Fri Jan 27 16:29:41 2023 -0600 Input: iqs626a - drop unused device node references Each call to device/fwnode_get_named_child_node() must be matched with a call to fwnode_handle_put() once the corresponding node is no longer in use. This ensures a reference count remains balanced in the case of dynamic device tree support. Currently, the driver never calls fwnode_handle_put(); this patch adds the missing calls. Because fwnode_handle_put() does not take a const *fwnode_handle, the const qualifier is removed across all corresponding *fwnode_handle instances. As part of this change, trackpad channel touch thresholds and ATI base values are now specified under single trackpad channel child nodes. This enhancement moves both properties to scalar values as opposed to arrays, making their types consistent across bindings. Fixes: f1d2809de97a ("Input: Add support for Azoteq IQS626A") Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/Y9RQVe/V1Hnw1oly@nixie71 Signed-off-by: Dmitry Torokhov commit 49f262bc3c7ab90bdb3491a659b28c0b397d52e8 Author: Arnd Bergmann Date: Thu Jan 26 22:17:31 2023 +0100 scsi: ufs: qcom: fix platform_msi_domain_free_irqs() reference The newly added MSI support is mostly hidden inside of an #ifdef, except for one line that now causes a build failure when MSI is disabled: drivers/ufs/host/ufs-qcom.c: In function 'ufs_qcom_remove': drivers/ufs/host/ufs-qcom.c:1698:9: error: implicit declaration of function 'platform_msi_domain_free_irqs' [-Werror=i] 1698 | platform_msi_domain_free_irqs(hba->dev); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Above that, the symbol that guards the other call was recently removed, so that is all dead code at the moment. Remove the incorrect #ifdef and instead of a Kconfig dependency to only allow building the driver when CONFIG_GENERIC_MSI_IRQ is enabled. This symbol is always present when PCI_MSI or ARM_GIC_V3_ITS are enabled, both of which should be present on kernels that can run on Qualcomm SoCs. The 'select RESET_CONTROLLER' in combination with this dependency unfortunately causes a dependency loop and this is a user-visible symbol, so it's better to change both to 'depends on'. Link: https://lore.kernel.org/r/20230126211831.2274211-1-arnd@kernel.org Fixes: 519b6274a777 ("scsi: ufs: qcom: Add MCQ ESI config vendor specific ops") Fixes: 13e7accb81d6 ("genirq: Get rid of GENERIC_MSI_IRQ_DOMAIN") Signed-off-by: Arnd Bergmann Reviewed-by: Manivannan Sadhasivam Acked-by: Can Guo Signed-off-by: Martin K. Petersen commit d94962401cabebe9f81abb24645e376fd19b0aac Author: Krzysztof Kozlowski Date: Fri Feb 3 16:59:58 2023 -0800 dt-bindings: input: touchscreen: st,stmfts: convert to dtschema Convert the ST-Microelectronics FingerTip touchscreen controller bindings to DT schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230127202040.196411-1-krzysztof.kozlowski@linaro.org Signed-off-by: Dmitry Torokhov commit 0424931431b5d593e602ec9c3ed35a34811d30d2 Author: Richard Kjerstadius Date: Fri Feb 3 16:57:05 2023 -0800 Input: cyttsp5 - fix bitmask for touch buttons Prior to this patch, the bitmask ends up being 0x3, as opposed to 0x1 which likely was the intention. The erroneous bit results in the driver reporting 2 different button activations in designs with 2 or more buttons. To detect which button has been pressed, cyttsp5_btn_attention() uses a for loop to iterate through the input buffer, while shifting and applying a bitmask to determine the state for each button. Unfortunately, when the bitmask is 0x3 and there are multiple buttons, this procedure falls apart. Consider a design with 3 buttons. Pressing the third button will result in a call to cyttsp5_btn_attention() with the input buffer containing 0x4 (binary 0100). In the first iteration of the for loop cur_btn_state will be: (0x4 >> 0 * 1) & 0x3 = 0x4 & 0x3 = 0x0 This is correct. However, in the next iteration this happens: (0x4 >> 1 * 1) & 0x3 = 0x2 & 0x3 = 0x2 Which means that a key event for key 1 is generated, even though it's not really active. In the third iteration, the loop detects the button that was actually pressed: (0x4 >> 2 * 1) & 0x3 = 0x1 & 0x3 = 0x1 This key event is the only one that should have been detected, but it is accompanied by the preceding key. Ensuring the applied mask is 0x1 solves this problem. Signed-off-by: Richard Kjerstadius Reviewed-by: Alistair Francis Link: https://lore.kernel.org/r/20230127102903.3317089-1-richard.kjerstadius@teledyne.com Signed-off-by: Dmitry Torokhov commit 79c81d137d36f9635bbcbc3916c0cccb418a61dd Author: Dmitry Torokhov Date: Fri Feb 3 16:43:29 2023 -0800 Input: exc3000 - properly stop timer on shutdown We need to stop the timer on driver unbind or probe failures, otherwise we get UAF/Oops. Fixes: 7e577a17f2ee ("Input: add I2C attached EETI EXC3000 multi touch driver") Reported-by: "Stahl, Michael" Link: https://lore.kernel.org/r/Y9dK57BFqtlf8NmN@google.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit 7997ba1dcd64776879e469300bbcbc53a7d64781 Author: Rayyan Ansari Date: Mon Dec 19 11:47:49 2022 -0800 Input: synaptics-rmi4 - fix SPI device ID Currently, the ID being set to "rmi4_spi" causes this warning: "SPI driver rmi4_spi has no spi_device_id for syna,rmi4-spi" Change the ID to rmi4-spi to stop this warning. Signed-off-by: Rayyan Ansari Link: https://lore.kernel.org/r/20221219133717.1638496-1-rayyan@ansari.sh Signed-off-by: Dmitry Torokhov commit b4bb3310727e978fddcc444355a545966a9d10ea Author: Jiri Valek - 2N Date: Fri Feb 3 16:46:03 2023 -0800 Input: cap11xx - add support for cap1203, cap1293 and cap1298 Add basic support for more CAP1xxx sensors. All models from CAP1xxx family are register-compatible. Some advanced features are not used and disabled by default. Reported-by: kernel test robot Signed-off-by: Jiri Valek - 2N Reviewed-by: Mattijs Korpershoek Link: https://lore.kernel.org/r/20230111131111.475270-3-jiriv@axis.com Signed-off-by: Dmitry Torokhov commit bedd9c67a70faae7988beca4580c91c8a2869571 Author: Jiri Valek - 2N Date: Fri Feb 3 16:45:47 2023 -0800 dt-bindings: input: microchip,cap11xx: add cap1203, cap1293 and cap1298 Add support for cap1203, cap1293 and cap1298. Signed-off-by: Jiri Valek - 2N Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230111131111.475270-2-jiriv@axis.com Signed-off-by: Dmitry Torokhov commit e73ba25fdc241c06ab48a1f708a30305d6036e66 Author: Michal Luczaj Date: Sat Jan 7 01:12:56 2023 +0100 KVM: x86: Simplify msr_io() As of commit bccf2150fe62 ("KVM: Per-vcpu inodes"), __msr_io() doesn't return a negative value. Remove unnecessary checks. Signed-off-by: Michal Luczaj Link: https://lore.kernel.org/r/20230107001256.2365304-7-mhal@rbox.co [sean: call out commit which left behind the unnecessary check] Signed-off-by: Sean Christopherson commit 4559e6cf45b555e7f2d73dd6a09a23afcbac9ec1 Author: Michal Luczaj Date: Sat Jan 7 01:12:55 2023 +0100 KVM: x86: Remove unnecessary initialization in kvm_vm_ioctl_set_msr_filter() Do not initialize the value of `r`, as it will be overwritten. Signed-off-by: Michal Luczaj Link: https://lore.kernel.org/r/20230107001256.2365304-6-mhal@rbox.co Signed-off-by: Sean Christopherson commit 1fdefb8bd862d7c17fc2526ec9fdfb080c15da45 Author: Michal Luczaj Date: Sat Jan 7 01:12:54 2023 +0100 KVM: x86: Explicitly state lockdep condition of msr_filter update Replace `1` with the actual mutex_is_locked() check. Suggested-by: Sean Christopherson Signed-off-by: Michal Luczaj Link: https://lore.kernel.org/r/20230107001256.2365304-5-mhal@rbox.co [sean: delete the comment that explained the hardocded '1'] Signed-off-by: Sean Christopherson commit 4d85cfcaa82f0ceb5dcb7ad369a2cc7efb32c65c Author: Michal Luczaj Date: Sat Jan 7 01:12:53 2023 +0100 KVM: x86: Simplify msr_filter update Replace srcu_dereference()+rcu_assign_pointer() sequence with a single rcu_replace_pointer(). Suggested-by: Sean Christopherson Signed-off-by: Michal Luczaj Link: https://lore.kernel.org/r/20230107001256.2365304-4-mhal@rbox.co Signed-off-by: Sean Christopherson commit 708f799d22fe6b69d2e6e3e0625c30666d5e798a Author: Michal Luczaj Date: Sat Jan 7 01:12:52 2023 +0100 KVM: x86: Optimize kvm->lock and SRCU interaction (KVM_X86_SET_MSR_FILTER) Reduce time spent holding kvm->lock: unlock mutex before calling synchronize_srcu(). There is no need to hold kvm->lock until all vCPUs have been kicked, KVM only needs to guarantee that all vCPUs will switch to the new filter before exiting to userspace. Suggested-by: Paolo Bonzini Suggested-by: Sean Christopherson Signed-off-by: Michal Luczaj Link: https://lore.kernel.org/r/20230107001256.2365304-3-mhal@rbox.co [sean: expand changelog] Signed-off-by: Sean Christopherson commit f816cda0ab2b0250e225dfda41c107733a74faf7 Author: Rajendra Nayak Date: Fri Dec 16 16:59:18 2022 +0530 arm64: dts: qcom: sc7280: Add a herobrine CRD Pro SKU Some of the qualcomm qcard based herobrine devices can come with a Pro variant of the chipset on the qcard. Such Pro qcards have the smps9 from pm8350c ganged up with smps7 and smps8, so add a .dtsi for pro skus that deletes the smps9 node and include it from the new dts for the CRD Pro Signed-off-by: Rajendra Nayak Reviewed-by: Krzysztof Kozlowski Reviewed-by: Matthias Kaehlcke Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221216112918.1243-2-quic_rjendra@quicinc.com commit c9e625bcf67472aee5c3b0d6bdabbe8f8be52f06 Author: Rajendra Nayak Date: Fri Dec 16 16:59:17 2022 +0530 dt-bindings: arm: qcom: Document the sc7280 CRD Pro boards Add compatibles for the Pro SKU of the sc7280 CRD boards which come with a Pro variant of the qcard. The Pro qcard variant has smps9 from pm8350c ganged up with smps7 and smps8. Signed-off-by: Rajendra Nayak Acked-by: Krzysztof Kozlowski Reviewed-by: Matthias Kaehlcke Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221216112918.1243-1-quic_rjendra@quicinc.com commit 95744a90db18437410aa94620b8a330311bd9cf6 Author: Michal Luczaj Date: Sat Jan 7 01:12:51 2023 +0100 KVM: x86: Optimize kvm->lock and SRCU interaction (KVM_SET_PMU_EVENT_FILTER) Reduce time spent holding kvm->lock: unlock mutex before calling synchronize_srcu_expedited(). There is no need to hold kvm->lock until all vCPUs have been kicked, KVM only needs to guarantee that all vCPUs will switch to the new filter before exiting to userspace. Protecting the write to __reprogram_pmi is also unnecessary as a vCPU may process a set bit before receiving the final KVM_REQ_PMU, but the per-vCPU writes are guaranteed to occur after all vCPUs have switched to the new filter. Suggested-by: Paolo Bonzini Suggested-by: Sean Christopherson Signed-off-by: Michal Luczaj Link: https://lore.kernel.org/r/20230107001256.2365304-2-mhal@rbox.co [sean: expand changelog] Signed-off-by: Sean Christopherson commit b0048092f7d3921d56f2c5bfa32062fac5e7500b Author: Dan Williams Date: Fri Feb 3 11:26:49 2023 -0800 efi/cper, cxl: Remove cxl_err.h While going to create include/linux/cxl.h for some cross-subsystem CXL definitions I noticed that include/linux/cxl_err.h was already present. That header has no reason to be global, and it duplicates the RAS Capability Structure definitions in drivers/cxl/cxl.h. A follow-on patch can consider unifying the CXL native error tracing with the CPER error printing. Also fixed up the spec reference as the latest released spec is v3.0. Cc: Smita Koralahalli Signed-off-by: Dan Williams Reviewed-by: Ira Weiny Signed-off-by: Ard Biesheuvel commit 096691e0d2a1a97ce5a0d68cffdc84ce97bce304 Author: Michal Luczaj Date: Thu Jan 26 02:34:04 2023 +0100 KVM: x86/emulator: Fix comment in __load_segment_descriptor() The comment refers to the same condition twice. Make it reflect what the code actually does. No functional change intended. Signed-off-by: Michal Luczaj Reviewed-by: Paolo Bonzini Link: https://lore.kernel.org/r/20230126013405.2967156-3-mhal@rbox.co Signed-off-by: Sean Christopherson commit 0735d1c34e49bc79d4a9860651d10c00b0692276 Author: Michal Luczaj Date: Thu Jan 26 02:34:03 2023 +0100 KVM: x86/emulator: Fix segment load privilege level validation Intel SDM describes what steps are taken by the CPU to verify if a memory segment can actually be used at a given privilege level. Loading DS/ES/FS/GS involves checking segment's type as well as making sure that neither selector's RPL nor caller's CPL are greater than segment's DPL. Emulator implements Intel's pseudocode in __load_segment_descriptor(), even quoting the pseudocode in the comments. Although the pseudocode is correctly translated, the implementation is incorrect. This is most likely due to SDM, at the time, being wrong. Patch fixes emulator's logic and updates the pseudocode in the comment. Below are historical notes. Emulator code for handling segment descriptors appears to have been introduced in March 2010 in commit 38ba30ba51a0 ("KVM: x86 emulator: Emulate task switch in emulator.c"). Intel SDM Vol 2A: Instruction Set Reference, A-M (Order Number: 253666-034US, _March 2010_) lists the steps for loading segment registers in section related to MOV instruction: IF DS, ES, FS, or GS is loaded with non-NULL selector THEN IF segment selector index is outside descriptor table limits or segment is not a data or readable code segment or ((segment is a data or nonconforming code segment) and (both RPL and CPL > DPL)) <--- THEN #GP(selector); FI; This is precisely what __load_segment_descriptor() quotes and implements. But there's a twist; a few SDM revisions later (253667-044US), in August 2012, the snippet above becomes: IF DS, ES, FS, or GS is loaded with non-NULL selector THEN IF segment selector index is outside descriptor table limits or segment is not a data or readable code segment or ((segment is a data or nonconforming code segment) [note: missing or superfluous parenthesis?] or ((RPL > DPL) and (CPL > DPL)) <--- THEN #GP(selector); FI; Many SDMs later (253667-065US), in December 2017, pseudocode reaches what seems to be its final form: IF DS, ES, FS, or GS is loaded with non-NULL selector THEN IF segment selector index is outside descriptor table limits OR segment is not a data or readable code segment OR ((segment is a data or nonconforming code segment) AND ((RPL > DPL) or (CPL > DPL))) <--- THEN #GP(selector); FI; which also matches the behavior described in AMD's APM, which states that a #GP occurs if: The DS, ES, FS, or GS register was loaded and the segment pointed to was a data or non-conforming code segment, but the RPL or CPL was greater than the DPL. Signed-off-by: Michal Luczaj Reviewed-by: Paolo Bonzini Link: https://lore.kernel.org/r/20230126013405.2967156-2-mhal@rbox.co [sean: add blurb to changelog calling out AMD agrees] Signed-off-by: Sean Christopherson commit 6043829fdb714f050ba5117044dbd1384865286c Author: Shaoqin Huang Date: Fri Feb 3 14:10:36 2023 +0800 KVM: selftests: Remove redundant setbuf() Since setbuf(stdout, NULL) has been called in kvm_util.c with __attribute((constructor)). Selftests no need to setup it in their own code. Signed-off-by: Shaoqin Huang Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20230203061038.277655-1-shahuang@redhat.com Signed-off-by: Oliver Upton commit b9e6a2d47b2565eb450d3ee900fba49cc9b25cbd Author: Perry Yuan Date: Tue Jan 31 17:00:16 2023 +0800 Documentation: amd-pstate: introduce new global sysfs attributes The amd-pstate driver supports switching working modes at runtime. Users can view and change modes by interacting with the "status" sysfs attribute. 1) check driver mode: $ cat /sys/devices/system/cpu/amd-pstate/status 2) switch mode: `# echo "passive" | sudo tee /sys/devices/system/cpu/amd-pstate/status` or `# echo "active" | sudo tee /sys/devices/system/cpu/amd-pstate/status` Acked-by: Huang Rui Reviewed-by: Mario Limonciello Reviewed-by: Wyes Karny Tested-by: Wyes Karny Signed-off-by: Perry Yuan Signed-off-by: Rafael J. Wysocki commit 3ec32b6d17c5b229c6f5d05849932af1f0c6f523 Author: Perry Yuan Date: Tue Jan 31 17:00:15 2023 +0800 cpufreq: amd-pstate: convert sprintf with sysfs_emit() replace the sprintf with a more generic sysfs_emit function No intended potential function impact Acked-by: Huang Rui Reviewed-by: Mario Limonciello Reviewed-by: Wyes Karny Tested-by: Wyes Karny Signed-off-by: Perry Yuan Signed-off-by: Rafael J. Wysocki commit 5014603e409b01001bfbeae090a16733f61a7640 Author: Perry Yuan Date: Tue Jan 31 17:00:14 2023 +0800 Documentation: introduce amd pstate active mode kernel command line options AMD Pstate driver support another firmware based autonomous mode with "amd_pstate=active" added to the kernel command line. In autonomous mode SMU firmware decides frequencies at runtime based on workload utilization, usage in other IPs, infrastructure limits such as power, thermals and so on. Acked-by: Huang Rui Reviewed-by: Mario Limonciello Reviewed-by: Wyes Karny Tested-by: Wyes Karny Signed-off-by: Perry Yuan Signed-off-by: Rafael J. Wysocki commit 92e6088427c5da7ef8dc92d6ab2f0f8f6a01fab7 Author: Perry Yuan Date: Tue Jan 31 17:00:13 2023 +0800 Documentation: amd-pstate: add amd pstate driver mode introduction The amd-pstate driver has two operation modes supported: * CPPC Autonomous (active) mode * CPPC non-autonomous (passive) mode. active mode and passive mode can be chosen by different kernel parameters. Acked-by: Huang Rui Reviewed-by: Mario Limonciello Reviewed-by: Wyes Karny Tested-by: Wyes Karny Signed-off-by: Perry Yuan Signed-off-by: Rafael J. Wysocki commit abd61c08ef349af08df0bf587d33f5bde5996a89 Author: Perry Yuan Date: Tue Jan 31 17:00:12 2023 +0800 cpufreq: amd-pstate: add driver working mode switch support While amd-pstate driver was loaded with specific driver mode, it will need to check which mode is enabled for the pstate driver,add this sysfs entry to show the current status $ cat /sys/devices/system/cpu/amd-pstate/status active Meanwhile, user can switch the pstate driver mode with writing mode string to sysfs entry as below. Enable passive mode: $ sudo bash -c "echo passive > /sys/devices/system/cpu/amd-pstate/status" Enable active mode (EPP driver mode): $ sudo bash -c "echo active > /sys/devices/system/cpu/amd-pstate/status" Acked-by: Huang Rui Reviewed-by: Mario Limonciello Reviewed-by: Wyes Karny Tested-by: Wyes Karny Signed-off-by: Perry Yuan Signed-off-by: Rafael J. Wysocki commit 50ddd2f7826927e6dc111a43b3a183f53c260fa4 Author: Perry Yuan Date: Tue Jan 31 17:00:11 2023 +0800 cpufreq: amd-pstate: implement suspend and resume callbacks add suspend and resume support for the AMD processors by amd_pstate_epp driver instance. When the CPPC is suspended, EPP driver will set EPP profile to 'power' profile and set max/min perf to lowest perf value. When resume happens, it will restore the MSR registers with previous cached value. Acked-by: Huang Rui Reviewed-by: Mario Limonciello Reviewed-by: Wyes Karny Tested-by: Wyes Karny Signed-off-by: Perry Yuan Signed-off-by: Rafael J. Wysocki commit d4da12f8033a123353eccf993cb95ee5bff21e7c Author: Perry Yuan Date: Tue Jan 31 17:00:10 2023 +0800 cpufreq: amd-pstate: implement amd pstate cpu online and offline callback Adds online and offline driver callback support to allow cpu cores go offline and help to restore the previous working states when core goes back online later for EPP driver mode. Acked-by: Huang Rui Reviewed-by: Mario Limonciello Reviewed-by: Wyes Karny Tested-by: Wyes Karny Signed-off-by: Perry Yuan Signed-off-by: Rafael J. Wysocki commit ffa5096a7c338641f70fb06d4778e8cf400181a8 Author: Perry Yuan Date: Tue Jan 31 17:00:09 2023 +0800 cpufreq: amd-pstate: implement Pstate EPP support for the AMD processors Add EPP driver support for AMD SoCs which support a dedicated MSR for CPPC. EPP is used by the DPM controller to configure the frequency that a core operates at during short periods of activity. The SoC EPP targets are configured on a scale from 0 to 255 where 0 represents maximum performance and 255 represents maximum efficiency. The amd-pstate driver exports profile string names to userspace that are tied to specific EPP values. The balance_performance string (0x80) provides the best balance for efficiency versus power on most systems, but users can choose other strings to meet their needs as well. $ cat /sys/devices/system/cpu/cpufreq/policy0/energy_performance_available_preferences default performance balance_performance balance_power power $ cat /sys/devices/system/cpu/cpufreq/policy0/energy_performance_preference balance_performance To enable the driver,it needs to add `amd_pstate=active` to kernel command line and kernel will load the active mode epp driver Acked-by: Huang Rui Reviewed-by: Mario Limonciello Reviewed-by: Wyes Karny Tested-by: Wyes Karny Signed-off-by: Perry Yuan Signed-off-by: Rafael J. Wysocki commit 36c5014e5460963ad7766487c0e22a7ff28681fc Author: Wyes Karny Date: Tue Jan 31 17:00:08 2023 +0800 cpufreq: amd-pstate: optimize driver working mode selection in amd_pstate_param() The amd-pstate driver may support multiple working modes. Introduce a variable to keep track of which mode is currently enabled. Here we use cppc_state var to indicate which mode is enabled. This change will help to simplify the the amd_pstate_param() to choose which mode used for the following driver registration. Acked-by: Huang Rui Reviewed-by: Mario Limonciello Tested-by: Wyes Karny Signed-off-by: Perry Yuan Signed-off-by: Wyes Karny Signed-off-by: Rafael J. Wysocki commit e22abc6bb97cee240200d037a16b73951df16f9a Author: Perry Yuan Date: Tue Jan 31 17:00:07 2023 +0800 Documentation: amd-pstate: add EPP profiles introduction The amd-pstate driver supports a feature called energy performance preference (EPP). Add information to the documentation to explain how users can interact with the sysfs files for this feature. 1) See all EPP profiles $ sudo cat /sys/devices/system/cpu/cpu0/cpufreq/energy_performance_available_preferences default performance balance_performance balance_power power 2) Check current EPP profile $ sudo cat /sys/devices/system/cpu/cpu0/cpufreq/energy_performance_preference performance 3) Set new EPP profile $ sudo bash -c "echo power > /sys/devices/system/cpu/cpu0/cpufreq/energy_performance_preference" Acked-by: Huang Rui Reviewed-by: Mario Limonciello Reviewed-by: Wyes Karny Tested-by: Wyes Karny Signed-off-by: Perry Yuan Signed-off-by: Rafael J. Wysocki commit 7bc1fcd399018245575974508c26e882da0bd915 Author: Perry Yuan Date: Tue Jan 31 17:00:06 2023 +0800 ACPI: CPPC: Add AMD pstate energy performance preference cppc control Add support for setting and querying EPP preferences to the generic CPPC driver. This enables downstream drivers such as amd-pstate to discover and use these values. Downstream drivers that want to use the new symbols cppc_get_epp_caps and cppc_set_epp_perf for querying and setting EPP preferences will need to call cppc_set_epp_perf to enable the EPP function firstly. Acked-by: Huang Rui Reviewed-by: Mario Limonciello Reviewed-by: Wyes Karny Tested-by: Wyes Karny Signed-off-by: Perry Yuan Signed-off-by: Rafael J. Wysocki commit 69ed0c5d44d72051b13e65384e9d9354c45d5e14 Author: Alex Deucher Date: Tue Jan 31 13:10:55 2023 -0500 Revert "drm/amd/display: disable S/G display on DCN 3.1.4" This reverts commit 9aa15370819294beb7eb67c9dcbf654d79ff8790. This is fixed now so we can re-enable S/G display on DCN 3.1.4. Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher commit c6eafee038ed4a9ed91a6a21562f65c2ee31867c Author: Alex Deucher Date: Tue Jan 31 10:03:40 2023 -0500 Revert "Revert "drm/amdgpu/gmc11: enable AGP aperture"" This reverts commit 1a65327a84db5b9081a51ccb1c562083f59bfcec. This should be resolved so we can re-enable this. Also, the AGP apeture was bring programmed to 0 on MMHUB 3.0.1 since agp_start and end were not being set. Acked-by: Harry Wentland Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher commit 0294868fd803b48dc354f7cd7ef7ba26a60e5a9b Author: Alex Deucher Date: Tue Jan 31 09:56:46 2023 -0500 drm/amd/display: properly handling AGP aperture in vm setup Take into account whether or not the AGP aperture is enabled or not when calculating the system aperture. Fixes white screens with DCN 3.1.4. Based on a patch from Yifan Zhang Cc: Yifan Zhang Acked-by: Harry Wentland Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher commit f081cd4ca2658752a8c0e2353d50aec80d07c65f Author: Alex Deucher Date: Wed Jan 25 09:57:27 2023 -0500 drm/amd/display: disable S/G display on DCN 3.1.2/3 Causes flickering or white screens in some configurations. Disable it for now until we can fix the issue. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2352 Cc: roman.li@amd.com Cc: yifan1.zhang@amd.com Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher commit 2404f9b0ea0153c3fddb0c4d7a43869dc8608f6f Author: Alex Deucher Date: Thu Jan 26 10:15:37 2023 -0500 drm/amd/display: disable S/G display on DCN 2.1.0 Causes flickering or white screens in some configurations. Disable it for now until we can fix the issue. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2352 Cc: roman.li@amd.com Cc: yifan1.zhang@amd.com Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher commit 72fef4980ddf20792fa095f88b008d896313c2b1 Author: Yifan Zha Date: Tue Jan 31 15:31:27 2023 +0800 drm/amdgpu: Remove writing GRBM_GFX_CNTL in RLCG interface under SRIOV [Why] Accessing GRBM_GFX_CNTL in full access time has risk when VF is doing MMIO attacking. Therefore, VF writing GRBM_GFX_CNTL are blocked by L1 Policy. For RLCG interface, RLCG use SCRATCH_REG2 which is copied from GRBM_GFX_CNTL. [How] Remove writing GRBM_GFX_CNTL in amdgpu_virt_rlcg_reg_rw. v2: Remove directly writing GRBM_GFX_INDEX in amdgpu_virt_rlcg_reg_rw as RLCG interface no need to use it. Signed-off-by: Yifan Zha Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 11cc4652e99f5529a9785b64f78fe005d8782b47 Author: Vitaly Prosyak Date: Fri Jan 20 14:03:45 2023 -0500 drm/amdgpu: always sending PSP messages LOAD_ASD and UNLOAD_TA We allow sending PSP messages LOAD_ASD and UNLOAD_TA without acquiring a lock in drm_dev_enter during driver unload because we must call drm_dev_unplug as the beginning of unload driver sequence. Added WARNING if other PSP messages are sent without a lock. After this commit, the following commands would work -sudo modprobe -r amdgpu -sudo modprobe amdgpu Signed-off-by: Vitaly Prosyak Reviewed-by Alex Deucher Signed-off-by: Alex Deucher commit febb414745d98f0a6f14d7fd53f1965a455e19d5 Author: Guilherme G. Piccoli Date: Mon Jan 30 16:56:07 2023 -0300 drm/amd/display: Trivial swizzle-related code clean-ups This is a very trivial code clean-up related to commit 5468c36d6285 ("drm/amd/display: Filter Invalid 420 Modes for HDMI TMDS"). This commit added a validation on driver probe to prevent invalid TMDS modes, but one of the fake properties (swizzle) ended-up causing a warning on driver probe; was reported here: https://gitlab.freedesktop.org/drm/amd/-/issues/2264. It was fixed by commit a1cbe6916f44 ("drm/amd/display: patch cases with unknown plane state to prevent warning"), but the validation code had a double variable assignment, which we hereby remove. Also, the fix relies in the dcn2{0,1}patch_unknown_plane_state() callbacks, so while at it we took the opportunity to perform a small code clean-up in such routines. Cc: Aurabindo Pillai Cc: Daniel Wheeler Cc: Fangzhi Zuo Cc: Harry Wentland Cc: Leo Li Cc: Mark Broadworth Cc: Melissa Wen Cc: Rodrigo Siqueira Cc: Sung Joon Kim Cc: Swapnil Patel Reviewed-by: Harry Wentland Signed-off-by: Guilherme G. Piccoli Signed-off-by: Alex Deucher commit 1c6d24b8be0cbe8e9a573d069c16fe8a56af6a4f Author: Tom Rix Date: Thu Jan 26 12:49:35 2023 -0800 drm/amd/display: reduce else-if to else in dcn32_calculate_dlg_params() cppcheck reports drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c:1403:76: style: Expression is always true because 'else if' condition is opposite to previous condition at line 1396. [multiCondition] } else if (context->res_ctx.pipe_ctx[i].stream->mall_stream_config.type == SUBVP_PHANTOM) { ^ drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c:1396:69: note: first condition if (context->res_ctx.pipe_ctx[i].stream->mall_stream_config.type != SUBVP_PHANTOM) { ^ drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c:1403:76: note: else if condition is opposite to first condition } else if (context->res_ctx.pipe_ctx[i].stream->mall_stream_config.type == SUBVP_PHANTOM) { It is not necessary to explicitly the check != condition, an else is simplier. Fixes: 238debcaebe4 ("drm/amd/display: Use DML for MALL SS and Subvp allocation calculations") Signed-off-by: Tom Rix Signed-off-by: Alex Deucher commit 67cdd3a5cc03591a98a303e5e2086a470650967f Author: Tom Rix Date: Thu Jan 26 17:38:23 2023 -0800 drm/amd/display: reduce else-if to else in dcn10_blank_pixel_data() checkpatch reports drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c:2902:13: style: Expression is always true because 'else if' condition is opposite to previous condition at line 2895. [multiCondition] } else if (blank) { ^ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c:2895:6: note: first condition if (!blank) { ^ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c:2902:13: note: else if condition is opposite to first condition } else if (blank) { It is not necessary to explicitly the check != condition, an else is simplier. Fixes: aa5a57773042 ("drm/amd/display: Vari-bright looks disabled near end of MM14") Signed-off-by: Tom Rix Signed-off-by: Alex Deucher commit 65a4cfb45e0e29a10fb35655f2375e1fc2f13c65 Author: ye xingchen Date: Sat Jan 28 09:39:08 2023 +0800 drm/amdgpu/display: remove duplicate include header in files opp.h is included more than once. Signed-off-by: ye xingchen Signed-off-by: Alex Deucher commit e27f38e6255306527e32af85592d805f3360ff94 Author: Konrad Dybcio Date: Fri Feb 3 15:23:09 2023 +0100 arm64: dts: qcom: sm8450-nagara: Correct firmware paths Nagara is definitely not SM8350, fix it! Fixes: c53532f7825c ("arm64: dts: qcom: pdx223: correct firmware paths") Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230203142309.1106349-1-konrad.dybcio@linaro.org commit a2f42b5efe6e49b7447e54706925c7016d77388f Author: Jonathan Neuschäfer Date: Sun Jan 29 16:17:52 2023 +0100 drm/amdgpu: Fix a typo ("boradcast") Spell it as "broadcast". Signed-off-by: Jonathan Neuschäfer Signed-off-by: Alex Deucher commit 17f248aa8664ff5b3643491136283e73b5c18166 Author: Kan Liang Date: Wed Jan 4 12:13:49 2023 -0800 perf script: Support Retire Latency The Retire Latency field is added in the var3_w of the PERF_SAMPLE_WEIGHT_STRUCT. The Retire Latency reports the number of elapsed core clocks between the retirement of the instruction indicated by the Instruction Pointer field of the PEBS record and the retirement of the prior instruction. That's quite useful to display the information with perf script. Add a new field retire_lat for the Retire Latency information. Reviewed-by: Andi Kleen Signed-off-by: Kan Liang Cc: Ian Rogers Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20230104201349.1451191-9-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit d7d213e04cf83318681f24870f1144e50d5c91bb Author: Kan Liang Date: Wed Jan 4 12:13:48 2023 -0800 perf report: Support Retire Latency The Retire Latency field is added in the var3_w of the PERF_SAMPLE_WEIGHT_STRUCT. The Retire Latency reports pipeline stall of this instruction compared to the previous instruction in cycles. That's quite useful to display the information with perf mem report. The p_stage_cyc for Power is also from the var3_w. Union the p_stage_cyc and retire_lat to share the code. Implement X86 specific codes to display the X86 specific header. Add a new sort key retire_lat for the Retire Latency. Reviewed-by: Andi Kleen Signed-off-by: Kan Liang Cc: Ian Rogers Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20230104201349.1451191-8-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit ebab291641bed48f62c608e3bf29071c435c2d9b Author: Namhyung Kim Date: Thu Feb 2 18:13:24 2023 -0800 perf lock contention: Support filters for different aggregation It'd be useful to filter other than the current aggregation mode. For example, users may want to see callstacks for specific locks only. Or they may want tasks from a certain callstack. The tracepoints already collected the information but it needs to check the condition again when processing the event. And it needs to change BPF to allow the key combinations. The lock contentions on 'rcu_state' spinlock can be monitored: $ sudo perf lock con -abv -L rcu_state sleep 1 ... contended total wait max wait avg wait type caller 4 151.39 us 62.57 us 37.85 us spinlock rcu_core+0xcb 0xffffffff81fd1666 _raw_spin_lock_irqsave+0x46 0xffffffff8172d76b rcu_core+0xcb 0xffffffff822000eb __softirqentry_text_start+0xeb 0xffffffff816a0ba9 __irq_exit_rcu+0xc9 0xffffffff81fc0112 sysvec_apic_timer_interrupt+0xa2 0xffffffff82000e46 asm_sysvec_apic_timer_interrupt+0x16 0xffffffff81d49f78 cpuidle_enter_state+0xd8 0xffffffff81d4a259 cpuidle_enter+0x29 1 30.21 us 30.21 us 30.21 us spinlock rcu_core+0xcb 0xffffffff81fd1666 _raw_spin_lock_irqsave+0x46 0xffffffff8172d76b rcu_core+0xcb 0xffffffff822000eb __softirqentry_text_start+0xeb 0xffffffff816a0ba9 __irq_exit_rcu+0xc9 0xffffffff81fc00c4 sysvec_apic_timer_interrupt+0x54 0xffffffff82000e46 asm_sysvec_apic_timer_interrupt+0x16 1 28.84 us 28.84 us 28.84 us spinlock rcu_accelerate_cbs_unlocked+0x40 0xffffffff81fd1c60 _raw_spin_lock+0x30 0xffffffff81728cf0 rcu_accelerate_cbs_unlocked+0x40 0xffffffff8172da82 rcu_core+0x3e2 0xffffffff822000eb __softirqentry_text_start+0xeb 0xffffffff816a0ba9 __irq_exit_rcu+0xc9 0xffffffff81fc0112 sysvec_apic_timer_interrupt+0xa2 0xffffffff82000e46 asm_sysvec_apic_timer_interrupt+0x16 0xffffffff81d49f78 cpuidle_enter_state+0xd8 ... To see tasks calling 'rcu_core' function: $ sudo perf lock con -abt -S rcu_core sleep 1 contended total wait max wait avg wait pid comm 19 23.46 us 2.21 us 1.23 us 0 swapper 2 18.37 us 17.01 us 9.19 us 2061859 ThreadPoolForeg 3 5.76 us 1.97 us 1.92 us 3909 pipewire-pulse 1 2.26 us 2.26 us 2.26 us 1809271 MediaSu~isor #2 1 1.97 us 1.97 us 1.97 us 1514882 Chrome_ChildIOT 1 987 ns 987 ns 987 ns 3740 pipewire-pulse Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Hao Luo Cc: Ian Rogers 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/20230203021324.143540-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 16cad1d3597d32e470a4115f11c5e61cce6cd81b Author: Namhyung Kim Date: Thu Feb 2 18:13:23 2023 -0800 perf lock contention: Use lock_stat_find{,new} This is a preparation work to support complex keys of BPF maps. Now it has single value key according to the aggregation mode like stack_id or pid. But we want to use a combination of those keys. Then lock_contention_read() should still aggregate the result based on the key that was requested by user. The other key info will be used for filtering. So instead of creating a lock_stat entry always, Check if it's already there using lock_stat_find() first. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Hao Luo Cc: Ian Rogers 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/20230203021324.143540-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 492fef218a6606c53bbb979a65b8f827c5ea02ce Author: Namhyung Kim Date: Thu Feb 2 18:13:22 2023 -0800 perf lock contention: Factor out lock_contention_get_name() The lock_contention_get_name() returns a name for the lock stat entry based on the current aggregation mode. As it's called sequentially in a single thread, it can return the address of a static buffer for symbol and offset of the caller. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Hao Luo Cc: Ian Rogers 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/20230203021324.143540-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7105311c2d3bce8f52653dbfe87de475a251892b Author: Rob Herring Date: Fri Feb 3 10:24:01 2023 -0600 perf arm-spe: Add raw decoding for SPEv1.2 previous branch address Arm SPEv1.2 adds a new optional address packet type: previous branch target. The recorded address is the target virtual address of the most recently taken branch in program order. Add support for decoding the address packet in raw dumps. Reviewed-by: Leo Yan Signed-off-by: Rob Herring Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230203162401.132931-1-robh@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b777b3d2555feeaa2bf39d6541ed9198e2d2d728 Author: Ian Rogers Date: Thu Jan 26 15:36:45 2023 -0800 perf jevents: Run metric_test.py at compile-time Add a target that generates a log file for running metric_test.py and make this a dependency on generating pmu-events.c. The log output is displayed if the test fails like (the test was modified to make it fail): ``` TEST /tmp/perf/pmu-events/metric_test.log F...... ====================================================================== FAIL: test_Brackets (__main__.TestMetricExpressions) ---------------------------------------------------------------------- Traceback (most recent call last): File "tools/perf/pmu-events/metric_test.py", line 33, in test_Brackets self.assertEqual((a * b + c).ToPerfJson(), 'a * b + d') AssertionError: 'a * b + c' != 'a * b + d' - a * b + c ? ^ + a * b + d ? ^ ---------------------------------------------------------------------- Ran 7 tests in 0.004s FAILED (failures=1) make[3]: *** [pmu-events/Build:32: /tmp/perf/pmu-events/metric_test.log] Error 1 ``` However, normal execution will just show the TEST line. This is roughly modeled on fortify testing in the kernel lib directory. Modify metric_test.py so that it is executable. This is necessary when PYTHON isn't specified in the build, the normal case. Use variables to make the paths to files clearer and more consistent. Committer notes: Add pmu-events/metric_test.log to tools/perf/.gitignore and to the 'clean' target on tools/perf/Makefile.perf. Reviewed-by: Kajol Jain Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Florian Fischer Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jing Zhang Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kang Minchul Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230126233645.200509-16-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit bed9e516f1183faa0e484479701cc669efd9049a Merge: fd9f2a9122551 c9a397cee9f5c Author: Jason Gunthorpe Date: Fri Feb 3 15:45:57 2023 -0400 Merge branch 'vfio-no-iommu' into iommufd.git for-next Shared branch with VFIO for the no-iommu support. Signed-off-by: Jason Gunthorpe commit c9a397cee9f5c93a7f48e18038b14057044db6ba Author: Jason Gunthorpe Date: Wed Jan 18 13:50:28 2023 -0400 vfio: Support VFIO_NOIOMMU with iommufd Add a small amount of emulation to vfio_compat to accept the SET_IOMMU to VFIO_NOIOMMU_IOMMU and have vfio just ignore iommufd if it is working on a no-iommu enabled device. Move the enable_unsafe_noiommu_mode module out of container.c into vfio_main.c so that it is always available even if VFIO_CONTAINER=n. This passes Alex's mini-test: https://github.com/awilliam/tests/blob/master/vfio-noiommu-pci-device-open.c Link: https://lore.kernel.org/r/0-v3-480cd64a16f7+1ad0-iommufd_noiommu_jgg@nvidia.com Reviewed-by: Kevin Tian Acked-by: Alex Williamson Signed-off-by: Jason Gunthorpe commit 7ecd4e5f5de23022d1a1c92058949ddf1a2113ff Author: Krzysztof Kozlowski Date: Fri Jan 27 20:40:54 2023 +0100 phy: samsung,mipi-video-phy: deprecate syscon phandle The MIPI phy is actually part of the Power Management Unit system controller, thus it should be its child, instead of sibling node with syscon phandle. Acked-by: Vinod Koul Link: https://lore.kernel.org/r/20230127194057.186458-6-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 220fc39815e13b1af901a61e5992c1a96b1dca78 Author: Krzysztof Kozlowski Date: Fri Jan 27 20:40:53 2023 +0100 phy: samsung,dp-video-phy: deprecate syscon phandle The DisplayPort phy is actually part of the Power Management Unit system controller, thus it should be its child, instead of sibling node with syscon phandle. Acked-by: Vinod Koul Link: https://lore.kernel.org/r/20230127194057.186458-5-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit e179fc990129118c40267e923b6a35a59c47d588 Author: Krzysztof Kozlowski Date: Fri Jan 27 20:40:52 2023 +0100 dt-bindings: phy: samsung,mipi-video-phy: deprecate syscon phandle The MIPI phy is actually part of the Power Management Unit system controller, thus it should be its child, instead of sibling node with syscon phandle. Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230127194057.186458-4-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 2f22aafa0d3587a60248834891b988ccf014840f Author: Krzysztof Kozlowski Date: Fri Jan 27 20:40:51 2023 +0100 dt-bindings: phy: samsung,dp-video-phy: deprecate syscon phandle The DisplayPort phy is actually part of the Power Management Unit system controller, thus it should be its child, instead of sibling node with syscon phandle. Acked-by: Vinod Koul Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230127194057.186458-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit df4fdd0db4756f8d08285e4a93fa40056aefefbe Author: Rob Herring Date: Tue Jan 24 16:20:23 2023 -0600 dt-bindings: firmware: arm,scmi: Restrict protocol child node properties The SCMI protocol child nodes are missing any constraints on unknown properties. Specifically, either 'unevaluatedProperties' or 'additionalProperties' is needed. The current structure with a regex match for all child nodes doesn't work for this purpose, so let's move the common properties '$defs' entry which each specific protocol node can reference and set 'unevaluatedProperties: false'. Reviewed-by: Sudeep Holla Link: https://lore.kernel.org/r/20230124222023.316089-1-robh@kernel.org Signed-off-by: Rob Herring commit 4d21176f48124e06c3251af38350b05a50ac4b01 Author: Xiangsheng Hou Date: Wed Feb 1 10:15:00 2023 +0800 mtd: nand: ecc-mtk: Add ECC support fot MT7986 IC Add ECC support fot MT7986 IC, and change err_mask value with GENMASK macro. Signed-off-by: Xiangsheng Hou Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230201021500.26769-6-xiangsheng.hou@mediatek.com commit 70d3cf76f937fbef9c55eaffe1c848208e1372e2 Author: Xiangsheng Hou Date: Wed Feb 1 10:14:59 2023 +0800 dt-bindings: mtd: mediatek,nand-ecc-engine: Add compatible for MT7986 Add dt-bindings documentation of ECC for MediaTek MT7986 SoC platform. Signed-off-by: Xiangsheng Hou Acked-by: Krzysztof Kozlowski Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230201021500.26769-5-xiangsheng.hou@mediatek.com commit 3af7ade257649d8e2e17eae96422b7868ed215a8 Author: Xiangsheng Hou Date: Wed Feb 1 10:14:56 2023 +0800 dt-bindings: mtd: Split ECC engine with rawnand controller Split MediaTek ECC engine with rawnand controller and convert to YAML schema. Signed-off-by: Xiangsheng Hou Reviewed-by: Krzysztof Kozlowski Reported-by: kernel test robot Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230201021500.26769-2-xiangsheng.hou@mediatek.com commit 31c8db2c4fa799f5981451a6ce2b38320069d8ef Author: Michal Swiatkowski Date: Wed Dec 21 12:38:22 2022 +0100 ice: implement devlink reinit action Call ice_unload() and ice_load() in driver reinit flow. Block reinit when switchdev, ADQ or SRIOV is active. In reload path we don't want to rebuild all features. Ask user to remove them instead of quitely removing it in reload path. Signed-off-by: Michal Swiatkowski Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit ccf531b2d670cf805787e007196a02321b03b68e Author: Michal Swiatkowski Date: Wed Dec 21 12:38:21 2022 +0100 ice: update VSI instead of init in some case ice_vsi_cfg() is called from different contexts: 1) VSI exsist in HW, but it is reconfigured, because of changing queues for example -> update instead of init should be used 2) VSI doesn't exsist, because rest has happened -> init command should be sent To support both cases pass boolean value which will store information what type of command has to be sent to HW. Signed-off-by: Michal Swiatkowski Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 227bf4500aaaec1e06b527317e05adf42f0da8b4 Author: Michal Swiatkowski Date: Wed Dec 21 12:38:20 2022 +0100 ice: move VSI delete outside deconfig In deconfig VSI shouldn't be deleted from hw. Rewrite VSI delete function to reflect that sometimes it is only needed to remove VSI from hw without freeing the memory: ice_vsi_delete() -> delete from HW and free memory ice_vsi_delete_from_hw() -> delete only from HW Value returned from ice_vsi_free() is never used. Change return type to void. Signed-off-by: Michal Swiatkowski Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 70fbc15a655cc9df29189a8145885c59a720865d Author: Michal Swiatkowski Date: Wed Dec 21 12:38:19 2022 +0100 ice: sync netdev filters after clearing VSI In driver reload path the netdev isn't removed, but VSI is. Remove filters on netdev right after removing them on VSI. Signed-off-by: Michal Swiatkowski Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 5b246e533d0177775c64b40a2af1e62aff5d279b Author: Michal Swiatkowski Date: Wed Dec 21 12:38:18 2022 +0100 ice: split probe into smaller functions Part of code from probe can be reused in reload flow. Move this code to separate function. Create unroll functions for each part of initialization, like: ice_init_dev() and ice_deinit_dev(). It simplifies unrolling and can be used in remove flow. Avoid freeing port info as it could be reused in reload path. Will be freed in remove path since is allocated via devm_kzalloc(). Also clean the remove path to reflect the init steps. Signed-off-by: Michal Swiatkowski Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit a696d61528f08d2fac221dcb618495f43cccdcb3 Author: Jacob Keller Date: Wed Dec 21 12:38:17 2022 +0100 ice: stop hard coding the ICE_VSI_CTRL location When allocating the ICE_VSI_CTRL, the allocated struct ice_vsi pointer is stored into the PF's pf->vsi array at a fixed location. This was historically done on the basis that it could provide an O(1) lookup for the special control VSI. Since we store the ctrl_vsi_idx, we already have O(1) lookup regardless of where in the array we store this VSI. Simplify the logic in ice_vsi_alloc by using the same method of storing the control VSI as other types of VSIs. Signed-off-by: Jacob Keller Signed-off-by: Michal Swiatkowski Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 6624e780a577fc59678853be7959a153558e11b1 Author: Michal Swiatkowski Date: Wed Dec 21 12:38:16 2022 +0100 ice: split ice_vsi_setup into smaller functions Main goal is to reuse the same functions in VSI config and rebuild paths. To do this split ice_vsi_setup into smaller pieces and reuse it during rebuild. ice_vsi_alloc() should only alloc memory, not set the default values for VSI. Move setting defaults to separate function. This will allow config of already allocated VSI, for example in reload path. The path is mostly moving code around without introducing new functionality. Functions ice_vsi_cfg() and ice_vsi_decfg() were added, but they are using code that already exist. Use flag to pass information about VSI initialization during rebuild instead of using boolean value. Co-developed-by: Jacob Keller Signed-off-by: Jacob Keller Signed-off-by: Michal Swiatkowski Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 0db66d20f9cf35a4a2347574af53cfe3472caf44 Author: Michal Swiatkowski Date: Wed Dec 21 12:38:15 2022 +0100 ice: cleanup in VSI config/deconfig code Do few small cleanups: 1) Rename the function to reflect that it doesn't configure all things related to VSI. ice_vsi_cfg_lan() better fits to what function is doing. ice_vsi_cfg() can be use to name function that will configure whole VSI. 2) Remove unused ethtype field from VSI. There is no need to set ethtype here, because it is never used. 3) Remove unnecessary check for ICE_VSI_CHNL. There is check for ICE_VSI_CHNL in ice_vsi_get_qs, so there is no need to check it before calling the function. 4) Simplify ice_vsi_alloc() call. There is no need to check the type of VSI before calling ice_vsi_alloc(). For ICE_VSI_CHNL vf is always NULL (ice_vsi_setup() is called with vf=NULL). For ICE_VSI_VF or ICE_VSI_CTRL ch is always NULL and for other VSI types ch and vf are always NULL. 5) Remove unnecessary call to ice_vsi_dis_irq(). ice_vsi_dis_irq() will be called in ice_vsi_close() flow (ice_vsi_close() -> ice_vsi_down() -> ice_vsi_dis_irq()). Remove unnecessary call. 6) Don't remove specific filters in release. All hw filters are removed in ice_fltr_remove_alli(), which is always called in VSI release flow. There is no need to remove only ethertype filters before calling ice_fltr_remove_all(). 7) Rename ice_vsi_clear() to ice_vsi_free(). As ice_vsi_clear() only free memory allocated in ice_vsi_alloc() rename it to ice_vsi_free() which better shows what function is doing. 8) Free coalesce param in rebuild. There is potential memory leak if configuration of VSI lan fails. Free coalesce to avoid it. Signed-off-by: Michal Swiatkowski Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 2be29286ed9f6b035e1f87514953aa1c75cb045b Author: Michal Swiatkowski Date: Wed Dec 21 12:38:14 2022 +0100 ice: alloc id for RDMA using xa_array Use xa_array instead of deprecated ida to alloc id for RDMA aux driver. Signed-off-by: Michal Swiatkowski Signed-off-by: Tony Nguyen commit 2b8db6afbc95258175da69f31c9bfbea539aaa74 Author: Michal Swiatkowski Date: Wed Dec 21 12:38:13 2022 +0100 ice: move RDMA init to ice_idc.c Simplify probe flow by moving all RDMA related code to ice_init_rdma(). Unroll irq allocation if RDMA initialization fails. Implement ice_deinit_rdma() and use it in remove flow. Signed-off-by: Michal Swiatkowski Acked-by: Dave Ertman Signed-off-by: Tony Nguyen commit 1eb9cd15004fa91b6d1911af9fbaff299d8e9e45 Author: Christoph Hellwig Date: Fri Feb 3 16:06:34 2023 +0100 libceph: use bvec_set_page to initialize bvecs Use the bvec_set_page helper to initialize bvecs. Signed-off-by: Christoph Hellwig Reviewed-by: Ilya Dryomov Link: https://lore.kernel.org/r/20230203150634.3199647-24-hch@lst.de Signed-off-by: Jens Axboe commit 58dfe14073846e416d5b3595314a4f37e1a89c50 Author: Christoph Hellwig Date: Fri Feb 3 16:06:33 2023 +0100 vringh: use bvec_set_page to initialize a bvec Use the bvec_set_page helper to initialize a bvec. Signed-off-by: Christoph Hellwig Acked-by: Jason Wang Link: https://lore.kernel.org/r/20230203150634.3199647-23-hch@lst.de Signed-off-by: Jens Axboe commit 9088151f1bfe670ae9e28b77095f974196bb2343 Author: Christoph Hellwig Date: Fri Feb 3 16:06:32 2023 +0100 sunrpc: use bvec_set_page to initialize bvecs Use the bvec_set_page helper to initialize bvecs. Signed-off-by: Christoph Hellwig Acked-by: Chuck Lever Acked-by: Trond Myklebust Link: https://lore.kernel.org/r/20230203150634.3199647-22-hch@lst.de Signed-off-by: Jens Axboe commit efde918ac66958c568926120841e7692b1e9bd9d Author: Christoph Hellwig Date: Fri Feb 3 16:06:31 2023 +0100 rxrpc: use bvec_set_page to initialize a bvec Use the bvec_set_page helper to initialize a bvec. Signed-off-by: Christoph Hellwig Acked-by: David Howells Link: https://lore.kernel.org/r/20230203150634.3199647-21-hch@lst.de Signed-off-by: Jens Axboe commit 8976fa6d79d70502181fa16b5e023645c0f44ec4 Author: Christoph Hellwig Date: Fri Feb 3 16:06:30 2023 +0100 swap: use bvec_set_page to initialize bvecs Use the bvec_set_page helper to initialize bvecs. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230203150634.3199647-20-hch@lst.de Signed-off-by: Jens Axboe commit cc342a21930f0e3862c5fd0871cd5a65c5b59e27 Author: Christoph Hellwig Date: Fri Feb 3 16:06:29 2023 +0100 io_uring: use bvec_set_page to initialize a bvec Use the bvec_set_page helper to initialize a bvec. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20230203150634.3199647-19-hch@lst.de Signed-off-by: Jens Axboe commit 664e40789abaad892737a696102052dae199a029 Author: Christoph Hellwig Date: Fri Feb 3 16:06:28 2023 +0100 splice: use bvec_set_page to initialize a bvec Use the bvec_set_page helper to initialize a bvec. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230203150634.3199647-18-hch@lst.de Signed-off-by: Jens Axboe commit 8ead80b2c5f8c59d6ca18cd7fb582a3ffc7ea5b7 Author: Christoph Hellwig Date: Fri Feb 3 16:06:27 2023 +0100 orangefs: use bvec_set_{page,folio} to initialize bvecs Use the bvec_set_page and bvec_set_folio helpers to initialize bvecs. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230203150634.3199647-17-hch@lst.de Signed-off-by: Jens Axboe commit 8bb7cd842c44b299586bfed6aadde8863c48b415 Author: Christoph Hellwig Date: Fri Feb 3 16:06:26 2023 +0100 nfs: use bvec_set_page to initialize bvecs Use the bvec_set_page helper to initialize bvecs. Signed-off-by: Christoph Hellwig Acked-by: Trond Myklebust Link: https://lore.kernel.org/r/20230203150634.3199647-16-hch@lst.de Signed-off-by: Jens Axboe commit cd598003206839ed1354902805b52c3a4f6ead2e Author: Christoph Hellwig Date: Fri Feb 3 16:06:25 2023 +0100 coredump: use bvec_set_page to initialize a bvec Use the bvec_set_page helper to initialize a bvec. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230203150634.3199647-15-hch@lst.de Signed-off-by: Jens Axboe commit 220ae4a5c2ba10333b3b01fbf3dea0d759e77a76 Author: Christoph Hellwig Date: Fri Feb 3 16:06:24 2023 +0100 cifs: use bvec_set_page to initialize bvecs Use the bvec_set_page helper to initialize bvecs. Signed-off-by: Christoph Hellwig Acked-by: Paulo Alcantara (SUSE) Link: https://lore.kernel.org/r/20230203150634.3199647-14-hch@lst.de Signed-off-by: Jens Axboe commit 5c6542b6612f635eaa001c54af22018f1e996418 Author: Christoph Hellwig Date: Fri Feb 3 16:06:23 2023 +0100 ceph: use bvec_set_page to initialize a bvec Use the bvec_set_page helper to initialize a bvec. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230203150634.3199647-13-hch@lst.de Reviewed-by: Ilya Dryomov Signed-off-by: Jens Axboe commit 1758817e7ea822b1a7d1b95f0c35dd80d120805b Author: Ard Biesheuvel Date: Mon Jan 30 19:50:55 2023 +0100 efi: Use standard format for printing the EFI revision The UEFI spec section 4.2.1 describes the way the human readable EFI revision should be constructed from the 32-bit revision field in the system table: The upper 16 bits of this field contain the major revision value, and the lower 16 bits contain the minor revision value. The minor revision values are binary coded decimals and are limited to the range of 00..99. When printed or displayed UEFI spec revision is referred as (Major revision).(Minor revision upper decimal).(Minor revision lower decimal) or (Major revision).(Minor revision upper decimal) in case Minor revision lower decimal is set to 0. Let's adhere to this when logging the EFI revision to the kernel log. Note that the bit about binary coded decimals is bogus, and the minor revision lower decimal is simply the minor revision modulo 10, given the symbolic definitions provided by the spec itself: #define EFI_2_40_SYSTEM_TABLE_REVISION ((2<<16) | (40)) #define EFI_2_31_SYSTEM_TABLE_REVISION ((2<<16) | (31)) #define EFI_2_30_SYSTEM_TABLE_REVISION ((2<<16) | (30)) Signed-off-by: Ard Biesheuvel commit 16c294a6aad862d79fc6b8170c45aac11670e9a1 Author: David Vernet Date: Fri Feb 3 09:57:27 2023 -0600 bpf/docs: Document kfunc lifecycle / stability expectations BPF kernel <-> kernel API stability has been discussed at length over the last several weeks and months. Now that we've largely aligned over kfuncs being the way forward, and BPF helpers being considered functionally frozen, it's time to document the expectations for kfunc lifecycles and stability so that everyone (BPF users, kfunc developers, and maintainers) are all aligned, and have a crystal-clear understanding of the expectations surrounding kfuncs. To do that, this patch adds that documentation to the main kfuncs documentation page via a new 'kfunc lifecycle expectations' section. The patch describes how decisions are made in the kernel regarding whether to include, keep, deprecate, or change / remove a kfunc. As described very overtly in the patch itself, but likely worth highlighting here: "kfunc stability" does not mean, nor ever will mean, "BPF APIs may block development elsewhere in the kernel". Rather, the intention and expectation is for kfuncs to be treated like EXPORT_SYMBOL_GPL symbols in the kernel. The goal is for kfuncs to be a safe and valuable option for maintainers and kfunc developers to extend the kernel, without tying anyone's hands, or imposing any kind of restrictions on maintainers in the same way that UAPI changes do. In addition to the 'kfunc lifecycle expectations' section, this patch also adds documentation for a new KF_DEPRECATED kfunc flag which kfunc authors or maintainers can choose to add to kfuncs if and when they decide to deprecate them. Note that as described in the patch itself, a kfunc need not be deprecated before being changed or removed -- this flag is simply provided as an available deprecation mechanism for those that want to provide a deprecation story / timeline to their users. When necessary, kfuncs may be changed or removed to accommodate changes elsewhere in the kernel without any deprecation at all. Reviewed-by: Bagas Sanjaya Co-developed-by: Toke Høiland-Jørgensen Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230203155727.793518-2-void@manifault.com Signed-off-by: Alexei Starovoitov commit 234fa51db95f3236a049557db735606908747f38 Author: Ard Biesheuvel Date: Fri Feb 3 17:39:38 2023 +0100 efi: Drop minimum EFI version check at boot We currently pass a minimum major version to the generic EFI helper that checks the system table magic and version, and refuse to boot if the value is lower. The motivation for this check is unknown, and even the code that uses major version 2 as the minimum (ARM, arm64 and RISC-V) should make it past this check without problems, and boot to a point where we have access to a console or some other means to inform the user that the firmware's major revision number made us unhappy. (Revision 2.0 of the UEFI specification was released in January 2006, whereas ARM, arm64 and RISC-V support where added in 2009, 2013 and 2017, respectively, so checking for major version 2 or higher is completely arbitrary) So just drop the check. Signed-off-by: Ard Biesheuvel commit e30f34053e5bc552829249941120ad042ba27723 Author: Ian Rogers Date: Thu Jan 26 15:36:44 2023 -0800 tools build: Add test echo-cmd Add quiet_cmd_test so that: $(Q)$(call echo-cmd,test) will print: TEST This is useful for executing compile-time tests similar to what happens for fortify tests in the kernel's lib directory. Reviewed-by: Kajol Jain Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Florian Fischer Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jing Zhang Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kang Minchul Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230126233645.200509-15-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit d2e3dc829e389d686194d06f0a64adda4158faae Author: Ian Rogers Date: Thu Jan 26 15:36:43 2023 -0800 perf jevents: Correct bad character encoding A character encoding issue added a "3D" character that breaks the metrics test. Fixes: 40769665b63d8c84 ("perf jevents: Parse metrics during conversion") Reviewed-by: Kajol Jain Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Florian Fischer Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jing Zhang Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kang Minchul Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230126233645.200509-14-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 3340a08354ac286e252738436cf0fbf0d9e72449 Author: Ian Rogers Date: Thu Jan 26 15:36:42 2023 -0800 perf pmu-events: Fix testing with JEVENTS_ARCH=all The #slots literal will return NAN when not on ARM64 which causes a perf test failure when not on an ARM64 for a JEVENTS_ARCH=all build: .. 10.4: Parsing of PMU event table metrics with fake PMUs : FAILED! .. Add an is_test boolean so that the failure can be avoided when running as a test. Fixes: acef233b7ca749fd ("perf pmu: Add #slots literal support for arm64") Reviewed-by: John Garry Reviewed-by: Kajol Jain Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Florian Fischer Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jing Zhang Cc: Jiri Olsa Cc: Kan Liang Cc: Kang Minchul Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230126233645.200509-13-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 5a09b1fd1b1fadf70cbf02a8daa49046e870a7aa Author: Ian Rogers Date: Thu Jan 26 15:36:41 2023 -0800 perf jevents: Add model list option This allows the set of generated jevents events and metrics be limited to a subset of the model names. Appropriate if trying to minimize the binary size where only a set of models are possible. Reviewed-by: Kajol Jain Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Florian Fischer Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jing Zhang Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kang Minchul Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230126233645.200509-12-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 62774db2a05dc878c83824afd8e6594ff277b91a Author: Ian Rogers Date: Thu Jan 26 15:36:40 2023 -0800 perf jevents: Generate metrics and events as separate tables Turn a perf json event into an event, metric or both. This reduces the number of events needed to scan to find an event or metric. As events no longer need the relatively seldom used metric fields, 4 bytes is saved per event. This reduces the big C string's size by 335kb (14.8%) on x86. Note, for the test PMU architecture pme_test_soc_cpu is renamed pmu_events__test_soc_cpu for consistency with the event vs metric naming convention. Reviewed-by: Kajol Jain Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Florian Fischer Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jing Zhang Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kang Minchul Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230126233645.200509-11-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit f8ea2c1524de42a6bae55cef5713d1229030324b Author: Ian Rogers Date: Thu Jan 26 15:36:39 2023 -0800 perf pmu-events: Introduce pmu_metrics_table Add a metrics table that is just a cast from pmu_events_table. This changes the APIs so that event and metric usage of the underlying table is different. For the no jevents case the tables are already separate, later changes will separate the tables for the jevents case. Reviewed-by: Kajol Jain Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Florian Fischer Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jing Zhang Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kang Minchul Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230126233645.200509-10-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 9f587cc93fe98e8d1e6527e18685635e0155fd08 Author: Ian Rogers Date: Thu Jan 26 15:36:38 2023 -0800 perf jevents: Combine table prefix and suffix writing Combine into a single function to simplify, in a later change, writing metrics separately. Reviewed-by: Kajol Jain Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Florian Fischer Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jing Zhang Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kang Minchul Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230126233645.200509-9-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 6f8f98ab6c16101b0694ef7e70425ded9d7af30e Author: Ian Rogers Date: Thu Jan 26 15:36:37 2023 -0800 perf stat: Remove evsel metric_name/expr Metrics are their own unit and these variables held broken metrics previously and now just hold the value NULL. Remove code that used these variables. Reviewed-by: John Garry Reviewed-by: Kajol Jain Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Florian Fischer Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jing Zhang Cc: Jiri Olsa Cc: Kan Liang Cc: Kang Minchul Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230126233645.200509-8-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit d9dc8874d6ce46ccb3a0761e1540927ea07408ea Author: Ian Rogers Date: Thu Jan 26 15:36:36 2023 -0800 perf pmu-events: Remove now unused event and metric variables Previous changes separated the uses of pmu_event and pmu_metric, however, both structures contained all the variables of event and metric. This change removes the event variables from metric and the metric variables from event. Note, this change removes the setting of evsel's metric_name/expr as these fields are no longer part of struct pmu_event. The metric remains but is no longer implicitly requested when the event is. This impacts a few Intel uncore events, however, as the ScaleUnit is shared by the event and the metric this utility is questionable. Also the MetricNames look broken (contain spaces) in some cases and when trying to use the functionality with '-e' the metrics fail but regular metrics with '-M' work. For example, on SkylakeX '-M' works: ``` $ perf stat -M LLC_MISSES.PCIE_WRITE -a sleep 1 Performance counter stats for 'system wide': 0 UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART2 # 57896.0 Bytes LLC_MISSES.PCIE_WRITE (49.84%) 7,174 UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART1 (49.85%) 0 UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART3 (50.16%) 63 UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART0 (50.15%) 1.004576381 seconds time elapsed ``` whilst the event '-e' version is broken even with --group/-g (fwiw, we should also remove -g [1]): ``` $ perf stat -g -e LLC_MISSES.PCIE_WRITE -g -a sleep 1 Add UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART2 event to groups to get metric expression for LLC_MISSES.PCIE_WRITE Add UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART1 event to groups to get metric expression for LLC_MISSES.PCIE_WRITE Add UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART3 event to groups to get metric expression for LLC_MISSES.PCIE_WRITE Add UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART0 event to groups to get metric expression for LLC_MISSES.PCIE_WRITE Add UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART2 event to groups to get metric expression for LLC_MISSES.PCIE_WRITE Add UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART1 event to groups to get metric expression for LLC_MISSES.PCIE_WRITE Add UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART3 event to groups to get metric expression for LLC_MISSES.PCIE_WRITE Add UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART0 event to groups to get metric expression for LLC_MISSES.PCIE_WRITE Add UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART2 event to groups to get metric expression for LLC_MISSES.PCIE_WRITE Add UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART1 event to groups to get metric expression for LLC_MISSES.PCIE_WRITE Add UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART3 event to groups to get metric expression for LLC_MISSES.PCIE_WRITE Add UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART0 event to groups to get metric expression for LLC_MISSES.PCIE_WRITE Add UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART2 event to groups to get metric expression for LLC_MISSES.PCIE_WRITE Add UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART1 event to groups to get metric expression for LLC_MISSES.PCIE_WRITE Add UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART3 event to groups to get metric expression for LLC_MISSES.PCIE_WRITE Add UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART0 event to groups to get metric expression for LLC_MISSES.PCIE_WRITE Add UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART2 event to groups to get metric expression for LLC_MISSES.PCIE_WRITE Add UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART1 event to groups to get metric expression for LLC_MISSES.PCIE_WRITE Add UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART3 event to groups to get metric expression for LLC_MISSES.PCIE_WRITE Add UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART0 event to groups to get metric expression for LLC_MISSES.PCIE_WRITE Add UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART2 event to groups to get metric expression for LLC_MISSES.PCIE_WRITE Add UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART1 event to groups to get metric expression for LLC_MISSES.PCIE_WRITE Add UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART3 event to groups to get metric expression for LLC_MISSES.PCIE_WRITE Add UNC_IIO_DATA_REQ_OF_CPU.MEM_WRITE.PART0 event to groups to get metric expression for LLC_MISSES.PCIE_WRITE Performance counter stats for 'system wide': 27,316 Bytes LLC_MISSES.PCIE_WRITE 1.004505469 seconds time elapsed ``` The code also carries warnings where the user is supposed to select events for metrics [2] but given the lack of use of such a feature, let's clean the code and just remove. [1] https://lore.kernel.org/lkml/20220707195610.303254-1-irogers@google.com/ [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/perf/util/stat-shadow.c?id=01b8957b738f42f96a130079bc951b3cc78c5b8a#n425 Reviewed-by: John Garry Reviewed-by: Kajol Jain Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Florian Fischer Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jing Zhang Cc: Jiri Olsa Cc: Kan Liang Cc: Kang Minchul Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230126233645.200509-7-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 96d2a74618e35c67b1c2245bb927b7d7fbdae526 Author: Ian Rogers Date: Thu Jan 26 15:36:35 2023 -0800 perf pmu-events: Separate the metrics from events for no jevents Separate the event and metric table when building without jevents. Add find_core_metrics_table and perf_pmu__find_metrics_table while renaming existing utilities to be event specific, so that users can find the right table for their need. Committer notes: Fix the build on aarch64 with: tools/perf/arch/arm64/util/pmu.c @@ -32,7 +32,7 @@ const struct pmu_events_table *pmu_events_table__find(void) - return perf_pmu__find_table(pmu); + return perf_pmu__find_events_table(pmu); Reviewed-by: John Garry Reviewed-by: Kajol Jain Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Florian Fischer Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jing Zhang Cc: Jiri Olsa Cc: Kan Liang Cc: Kang Minchul Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230126233645.200509-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 6a185f55580ed0df9865cbae805d0989d8efc3ff Author: Binbin Zhou Date: Fri Feb 3 18:00:02 2023 +0800 MAINTAINERS: Add entry for the Loongson LS2X I2C driver Add myself as maintainer of the Loongson LS2X I2C driver. Signed-off-by: Binbin Zhou Signed-off-by: Wolfram Sang commit 31ec26b2db2ebc9a7b408f8b95c22b86119bbf33 Author: Raviteja Narayanam Date: Thu Feb 2 15:11:35 2023 +0530 i2c: xiic: Remove interrupt enable/disable in Rx path 'DYNAMIC_MODE_READ_BROKEN_BIT' quirk added in the driver, effected IP versions no longer enter dynamic mode. So, remove local_irq_save/local_irq_restore APIs from driver. Signed-off-by: Raviteja Narayanam Signed-off-by: Manikanta Guntupalli Acked-by: Michal Simek Signed-off-by: Wolfram Sang commit e4c1ff772e1a04b6cf52d428b49c9150e959d91c Author: Raviteja Narayanam Date: Thu Feb 2 15:11:34 2023 +0530 i2c: xiic: Add smbus_block_read functionality smbus_block_read is added to xiic driver to read from few sensors which support this command. Since the number of bytes to read is not known prior to transfer, xiic standard mode is being used for low level control of IP. Signed-off-by: Raviteja Narayanam Signed-off-by: Manikanta Guntupalli Acked-by: Michal Simek Signed-off-by: Wolfram Sang commit 317b56c9aa9b0b0f4fae738e27998901b7b3b51c Author: Raviteja Narayanam Date: Thu Feb 2 15:11:33 2023 +0530 i2c: xiic: Add wait for FIFO empty in send_tx If the tx_half_empty interrupt comes first instead of tx_empty, STOP bit is generated even before all the bytes are transmitted out on the bus. STOP bit should be sent only after all the bytes in the FIFO are transmitted out of the FIFO. So wait until FIFO is empty before sending the STOP bit. Signed-off-by: Raviteja Narayanam Signed-off-by: Manikanta Guntupalli Acked-by: Michal Simek Signed-off-by: Wolfram Sang commit 2fd5cf352efa0c62dd20d1e046bc8767395b1ec0 Author: Raviteja Narayanam Date: Thu Feb 2 15:11:32 2023 +0530 i2c: xiic: Switch to Xiic standard mode for i2c-read Xilinx I2C IP has two modes of operation, both of which implement I2C transactions. The only difference from sw perspective is the programming sequence for these modes. Dynamic mode -> Simple to program, less number of steps in sequence. Standard mode -> Gives flexibility, more number of steps in sequence. In dynamic mode, during the i2c-read transactions, if there is a delay(> 200us) between the register writes (address & byte count), read transaction fails. On a system with load, this scenario is occurring frequently. To avoid this, switch to standard mode if there is a read request. Added a quirk to identify the IP version effected by this and follow the standard mode. Signed-off-by: Raviteja Narayanam Signed-off-by: Manikanta Guntupalli Acked-by: Michal Simek Signed-off-by: Wolfram Sang commit 813eac4fcb839bdf22aacfda0f2713fe50a82974 Author: Raviteja Narayanam Date: Thu Feb 2 15:11:31 2023 +0530 i2c: xiic: Fix Rx and Tx paths in standard mode repeated start When a combined message request comes from user space, the controller has to initiate repeated start sequence. In standard mode, this repeated start sequence is corrupted if there is still data in the Tx FIFO. So, always make sure that all the bytes are completely transmitted out of the FIFO by waiting for TXEMPTY, if the previous message is of Tx type. Signed-off-by: Raviteja Narayanam Signed-off-by: Manikanta Guntupalli Acked-by: Michal Simek Signed-off-by: Wolfram Sang commit acea4e4458b40af5df22de1659de618f0ced0ce8 Author: Raviteja Narayanam Date: Thu Feb 2 15:11:30 2023 +0530 i2c: xiic: Add standard mode support for > 255 byte read transfers Added standard mode for AXI I2C controller to enable read transfers of size more than 255 bytes. The driver selects standard mode in the following scenarios. 1. If a single message request comes from user space, requesting a read of more than 255 bytes 2. If a message set request comes from user space consisting of many messages and if any one of them is a read operation, irrespective of the size of transfer. (This is done because it is observed that repeated start operation is not happening in dynamic mode read as expected in a message set request from user space.) Signed-off-by: Raviteja Narayanam Signed-off-by: Manikanta Guntupalli Acked-by: Michal Simek Signed-off-by: Wolfram Sang commit d045bceff5a904bd79d71dede9f927c00ce4906f Author: Jaroslav Kysela Date: Thu Feb 2 10:20:13 2023 +0100 ALSA: hda: Fix the control element identification for multiple codecs Some motherboards have multiple HDA codecs connected to the serial bus. The current code may create multiple mixer controls with the almost identical identification. The current code use id.device field from the control element structure to store the codec address to avoid such clashes for multiple codecs. Unfortunately, the user space do not handle this correctly. For mixer controls, only name and index are used for the identifiers. This patch fixes this problem to compose the index using the codec address as an offset in case, when the control already exists. It is really unlikely that one codec will create 10 similar controls. This patch adds new kernel module parameter 'ctl_dev_id' to allow select the old behaviour, too. The CONFIG_SND_HDA_CTL_DEV_ID Kconfig option sets the default value. BugLink: https://github.com/alsa-project/alsa-lib/issues/294 BugLink: https://github.com/alsa-project/alsa-lib/issues/205 Fixes: 54d174031576 ("[ALSA] hda-codec - Fix connection list parsing") Fixes: 1afe206ab699 ("ALSA: hda - Try to find an empty control index when it's occupied") Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20230202092013.4066998-1-perex@perex.cz Signed-off-by: Takashi Iwai commit eedb923279b78cbfe16dd54dade0d73e9977f118 Author: ChiaEn Wu Date: Tue Jan 3 15:29:58 2023 +0800 Documentation: power: rt9467: Document exported sysfs entries Document the settings exported by rt9467 charger driver through sysfs entries: - sysoff_enable Signed-off-by: ChiaEn Wu [update kernel version and date] Signed-off-by: Sebastian Reichel commit 6f7f70e3a8dd1fbce95eaea2a8eff70f01363c00 Author: ChiaEn Wu Date: Tue Jan 3 15:29:57 2023 +0800 power: supply: rt9467: Add Richtek RT9467 charger driver RT9467 is a switch-mode single cell Li-Ion/Li-Polymer battery charger for portable applications. It integrates a synchronous PWM controller, power MOSFETs, input current sensing and regulation, high-accuracy voltage regulation, and charge termination. The charge current is regulated through integrated sensing resistors. The RT9467 also features USB On-The-Go (OTG) support. It also integrates D+/D- pin for USB host/charging port detection. Co-developed-by: ChiYuan Huang Signed-off-by: ChiYuan Huang Signed-off-by: ChiaEn Wu Signed-off-by: Sebastian Reichel commit e1b4620fb50316e0b271bd50a1dfdd11eee369c4 Author: ChiaEn Wu Date: Tue Jan 3 15:29:56 2023 +0800 dt-bindings: power: supply: Add Richtek RT9467 battery charger Add bindings for the Richtek RT9467 battery charger. Reviewed-by: Krzysztof Kozlowski Co-developed-by: ChiYuan Huang Signed-off-by: ChiYuan Huang Signed-off-by: ChiaEn Wu Signed-off-by: Sebastian Reichel commit ace013a543067ed33cf593144b18c6dbeb517cee Author: Ard Biesheuvel Date: Mon Jan 30 13:11:53 2023 +0100 efi: zboot: Use EFI protocol to remap code/data with the right attributes Use the recently introduced EFI_MEMORY_ATTRIBUTES_PROTOCOL in the zboot implementation to set the right attributes for the code and data sections of the decompressed image, i.e., EFI_MEMORY_RO for code and EFI_MEMORY_XP for data. Signed-off-by: Ard Biesheuvel commit 7505dab78f58c953b863753208eeca682e8126ff Author: Aleksa Savic Date: Fri Feb 3 13:03:24 2023 +0100 hwmon: (aquacomputer_d5next) Add support for Aquacomputer Aquastream Ultimate Extend aquacomputer_d5next driver to expose various hardware sensors of the Aquacomputer Aquastream Ultimate watercooling pump, which communicates through a proprietary USB HID protocol. Coolant temp and external temp sensor readings are available, along with speed, power, voltage and current of both the pump and optionally connected fan. It also exposes pressure and flow speed readings. Additionally, serial number and firmware version are exposed through debugfs. Tested by a user on Github [1]. [1] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/issues/50 Signed-off-by: Aleksa Savic Link: https://lore.kernel.org/r/20230203120324.579808-1-savicaleksa83@gmail.com Signed-off-by: Guenter Roeck commit e0f6c370f0ad2b02637ba4ead082d39cc9a1b094 Author: Aleksa Savic Date: Tue Jan 31 11:12:09 2023 +0100 hwmon: (aquacomputer_d5next) Add support for Aquacomputer Poweradjust 3 Extend aquacomputer_d5next driver to expose the temp sensor of the Aquacomputer Poweradjust 3 fan controller, which communicates through a proprietary USB HID protocol. The Poweradjust 3 is not currently known to expose firmware version and serial number, so don't create debugfs entries if their values can't be retrieved. Tested by a user on Github [1]. [1] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/issues/57 Signed-off-by: Aleksa Savic Link: https://lore.kernel.org/r/20230131101210.8095-1-savicaleksa83@gmail.com Signed-off-by: Guenter Roeck commit 1c999af509b3f834d3d65a90fb72860a6d6a8370 Author: Alexander Stein Date: Tue Jan 31 11:33:59 2023 +0100 hwmon: (iio_hwmon) use dev_err_probe Instead of just returning an error code, add an error message as well. While at it, simplify the code and use a common return path. Upon deferral this also nicely lists the following message in /sys/kernel/debug/devices_deferred: adc iio_hwmon: Failed to get channels Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20230131103359.625081-1-alexander.stein@ew.tq-group.com Signed-off-by: Guenter Roeck commit e1983220ae14ae7bdc8db4fb64e78bb55122c32b Author: Tianfei zhang Date: Tue Jan 31 15:54:50 2023 +0200 hwmon: intel-m10-bmc-hwmon: Add N6000 sensors Add sensors supported by N6000 card with MAX10 BMC to monitor temperature, voltage, current, and power on board. Signed-off-by: Tianfei zhang Link: https://lore.kernel.org/r/20230131135450.43072-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Guenter Roeck commit a37672b072d1d56634db7e164e095abf65c45ebd Author: SeongJae Park Date: Sun Jan 22 21:36:46 2023 +0000 Docs/hwmon/index: Add missing SPDX License Identifier Add missing SPDX License Identifier for hwmon documentation index file. Signed-off-by: SeongJae Park Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20230122213650.187710-5-sj@kernel.org Signed-off-by: Guenter Roeck commit 01189055605cf66096bd3effa49dea490037d7dc Author: Frank Crawford Date: Sat Jan 28 17:03:08 2023 +1100 hwmon: (it87) Updated documentation for recent updates to it87 Updated the driver documentation to list all current chips and describe the module parameters as per descriptions in the code. Signed-off-by: Frank Crawford Link: https://lore.kernel.org/r/20230128060308.1549707-8-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck commit d44cb4cd7456b6eef2689fdfed7bf361ffc8e5ce Author: Frank Crawford Date: Sat Jan 28 17:03:07 2023 +1100 hwmon: (it87) Add new chipset IT87952E Add IT87952E, a new chip ID (DEV ID 0x8695), which appears to be an updated version of the IT8792E and takes the same configuration. The model name comes from the model name printed on the chip. There is no datasheet publicly available. Signed-off-by: Frank Crawford Link: https://lore.kernel.org/r/20230128060308.1549707-7-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck commit 2a64e9d4451758fe4e1dc9106177b3b937b8c186 Author: Frank Crawford Date: Sat Jan 28 17:03:06 2023 +1100 hwmon: (it87) Allow multiple chip IDs for force_id Extend the force_id module parameter to allow specifying one or both chip IDs separately. If only a single parameter is given it defaults to using that value for all chips, similar to previous usage. Signed-off-by: Frank Crawford Link: https://lore.kernel.org/r/20230128060308.1549707-6-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck commit f09c7965053e1608e508e9e2c18b1d77b350cff1 Author: Frank Crawford Date: Sat Jan 28 17:03:05 2023 +1100 hwmon: (it87) Add chip_id in some info message In cases where there are multiple chips, print out which chip is referred to, in the informational message. Signed-off-by: Frank Crawford Link: https://lore.kernel.org/r/20230128060308.1549707-5-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck commit 1f21531d4f42360971a6ebf9d3a4f20a2f4b3be1 Author: Frank Crawford Date: Sat Jan 28 17:03:04 2023 +1100 hwmon: (it87) List full chip model name ITE model names do not always match the chip ID. Convert from just adding a suffix to specifying the full model name. Signed-off-by: Frank Crawford Link: https://lore.kernel.org/r/20230128060308.1549707-4-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck commit e114737850668d4e14be4460e8aa45e668b87b80 Author: Frank Crawford Date: Sat Jan 28 17:03:03 2023 +1100 hwmon: (it87) Disable configuration exit for certain chips IT8790E and IT8792E/IT8795E have been identified as chips that can have issues when disabling configuration mode. Set to never exit configuration mode. Signed-off-by: Frank Crawford Link: https://lore.kernel.org/r/20230128060308.1549707-3-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck commit 4119693bd260dabbbf34abf262ece477bc3ed57c Author: Frank Crawford Date: Sat Jan 28 17:03:02 2023 +1100 hwmon: (it87) Allow disabling exiting of configuration mode Disabling configuration mode on some chips can result in system hang-ups and access failures to the Super-IO chip at the second SIO address. Never exit configuration mode on these chips to avoid the problem. This patch should be applied in conjunction with a previous one to initialise the second chip for certain mother boards. Signed-off-by: Frank Crawford Link: https://lore.kernel.org/r/20230128060308.1549707-2-frank@crawford.emu.id.au [groeck: Change feature bit from 28 to 19 to be continuous] Signed-off-by: Guenter Roeck commit 12087a365f06eca4c3d9ec0de35728bc5215216d Author: Randy Dunlap Date: Sun Jan 29 15:10:47 2023 -0800 Documentation: hwmon: correct spelling Correct spelling problems for Documentation/hwmon/ as reported by codespell. Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Jean Delvare Cc: Guenter Roeck Cc: linux-hwmon@vger.kernel.org Link: https://lore.kernel.org/r/20230129231053.20863-4-rdunlap@infradead.org Signed-off-by: Guenter Roeck commit a6f7c5d0e72ea0000cc03ed2d26559658939b16f Author: Guenter Roeck Date: Tue Jan 24 08:15:08 2023 -0800 hwmon: (pmbus/max16601) Add support for MAX16600 From programming perspective, MAX16600 is identical to MAX16601 and MAX16602. Add support for it. Cc: Steve Foreman Cc: Holly Barrett Signed-off-by: Guenter Roeck commit b11f3d47c0e74e6c0515e31788651713a3a94a50 Author: John Pruitt Date: Thu Jan 26 17:32:26 2023 -0500 hwmon: (ltc2945) Allow setting shunt resistor Add the ability to specify the value of the shunt resistor in the device tree instead of assuming it is 1 milliOhm. The value in the device tree has the name shunt-resistor-micro-ohms and the default value is 1000 micro-ohms in order to preserve the current behavior. Signed-off-by: Jonathan Cormier Signed-off-by: John Pruitt [groeck: Fixed multi-line alignment, squashed last patch of series] Signed-off-by: Guenter Roeck commit 178b01eccfb0b8149682f61388400bd3d903dddc Author: Jonathan Cormier Date: Thu Jan 26 17:32:25 2023 -0500 hwmon: (ltc2945) Handle error case in ltc2945_value_store ltc2945_val_to_reg errors were not being handled which would have resulted in register being set to 0 (clamped) instead of being left alone. Fixes: 6700ce035f83 ("hwmon: Driver for Linear Technologies LTC2945") Signed-off-by: Jonathan Cormier Signed-off-by: Guenter Roeck commit 4b0654e2c35938f5613edb3bc7550130145ebe62 Author: Jonathan Cormier Date: Thu Jan 26 17:32:24 2023 -0500 hwmon: (ltc2945) Add devicetree match table Add adi,ltc2945 compatible Signed-off-by: Jonathan Cormier Signed-off-by: Guenter Roeck commit 7c81970baf8a8fe4f3d8705c6327aa740ae14f53 Author: Jonathan Cormier Date: Thu Jan 26 17:32:23 2023 -0500 dt-bindings: hwmon: adi,ltc2945: Add binding Create initial binding for the LTC2945 I2C power monitor. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jonathan Cormier Signed-off-by: Guenter Roeck commit 95b80c48cfcbe4d752ef229f80a47de92a51cf24 Author: Patrick Rudolph Date: Tue Jan 24 21:23:17 2023 +0100 hwmon: (pmbus/tda38640) Add driver for Infineon TDA38640 Voltage Regulator Add the pmbus driver for the Infineon TDA38640 voltage regulator. Signed-off-by: Patrick Rudolph Signed-off-by: Naresh Solanki Link: https://lore.kernel.org/r/20230124202317.3704963-2-Naresh.Solanki@9elements.com Signed-off-by: Guenter Roeck commit af499400dc117f0254468bc29b05e16dd6b0a56d Author: Naresh Solanki Date: Tue Jan 24 21:23:16 2023 +0100 dt-bindings: trivial-devices: Add Infineon TDA38640 Voltage Regulator Infineon TDA38640 is PMBUS compliant voltage regulator. Signed-off-by: Naresh Solanki Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230124202317.3704963-1-Naresh.Solanki@9elements.com Signed-off-by: Guenter Roeck commit 195f46e5afeedc4a40a7649932f042218b3b58e5 Author: Eric Nguyen Date: Sat Jan 28 11:21:34 2023 +0100 hwmon: (asus-ec-sensors) add zenith ii extreme alpha The ROG ZENITH II EXTREME ALPHA provides the same set of sensors as the no-ALPHA version. Tested with the hardware [1]. [1] https://github.com/zeule/asus-ec-sensors/issues/31 Signed-off-by: Eric Nguyen Signed-off-by: Eugene Shalygin Link: https://lore.kernel.org/r/20230128102135.5199-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck commit 07830d9ab34c0622f577a88286746aa17c144afd Author: Mario Kicherer Date: Wed Jan 18 13:30:19 2023 +0100 hwmon: add initial NXP MC34VR500 PMIC monitoring support Add initial monitoring support for the MC34VR500 PMIC. In its current state, input voltage and temperature alarms are reported to hwmon. Datasheet: - https://www.nxp.com/docs/en/data-sheet/MC34VR500.pdf Signed-off-by: Mario Kicherer Link: https://lore.kernel.org/r/20230118123019.3041303-4-dev@kicherer.org [groeck: Silence stray compiler warning, terminate struct of_device_id] Signed-off-by: Guenter Roeck commit a66c9147916fefc66dba06236ff5307180d95cd4 Author: Mario Kicherer Date: Wed Jan 18 13:30:18 2023 +0100 docs: hwmon: add docs for the NXP MC34VR500 PMIC Add documentation for the NXP MC34VR500 PMIC. Signed-off-by: Mario Kicherer Link: https://lore.kernel.org/r/20230118123019.3041303-3-dev@kicherer.org [groeck: Added to index] Signed-off-by: Guenter Roeck commit 363ab25324754ed77dbc50aad77e16c67f829c08 Author: Mario Kicherer Date: Wed Jan 18 13:30:17 2023 +0100 dt-bindings: hwmon: add nxp,mc34vr500 Add dt-bindings for the NXP MC34VR500 PMIC. Signed-off-by: Mario Kicherer Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230118123019.3041303-2-dev@kicherer.org Signed-off-by: Guenter Roeck commit b361a1cf624546c9ce71c68066b809b9490e0267 Author: Frank Crawford Date: Sat Jan 21 19:57:53 2023 +1100 hwmon: (it87) Group all related MODULE_PARM definitions together Group the MODULE_PARM definitions together to make them easier for future maintenance, rather than having them spread across the file. Signed-off-by: Frank Crawford Link: https://lore.kernel.org/r/20230121085754.1693336-2-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck commit 08be4233521a8ad2de68ebca859c084419b6989f Author: Krzysztof Kozlowski Date: Wed Jan 18 18:22:37 2023 +0100 dt-bindings: hwmon: correct indentation and style in examples Fix mixed indentation to 4-spaces, remove unnecessary suffix from i2c node name and use lower-case hex. No functional impact. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230118172237.349111-2-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck commit 22f0fd208d981622b988b8f91e8afd92189dda1c Author: Krzysztof Kozlowski Date: Wed Jan 18 18:22:36 2023 +0100 dt-bindings: hwmon: adi,ltc2992: correct unit address in example lower-case hex is expected for unit addresses: adi,ltc2992.example.dts:22.24-38.15: Warning (i2c_bus_reg): /example-0/i2c/ltc2992@6F: I2C bus unit address format error, expected "6f" Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230118172237.349111-1-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck commit c184f377a4cc9078d42563ef0fe3de6ea574b0cf Author: Armin Wolf Date: Thu Jan 5 23:51:07 2023 +0100 hwmon: (ftsteutates) Add support for fanX_fault attributes The driver knows internally when a fan is not connected, but does not export this knowledge to userspace. Use the standard fanX_fault attributes to notify userspace if a fan is not connected. Tested on a Fujitsu DS3401-B1. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20230105225107.58308-4-W_Armin@gmx.de Signed-off-by: Guenter Roeck commit 1c5759d8ce054961b454af69568a41e7e3210ee1 Author: Armin Wolf Date: Thu Jan 5 23:51:06 2023 +0100 hwmon: (ftsteutates) Replace fanX_source with pwmX_auto_channels_temp Replace the nonstandard fanX_source attributes with the standardized pwmX_auto_channels_temp attributes and document the special behaviour associated with those attributes. Tested on a Fujitsu DS3401-B1. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20230105225107.58308-3-W_Armin@gmx.de Signed-off-by: Guenter Roeck commit dea60ff028befe061a7b4e1effd09bd7b14df9e0 Author: Armin Wolf Date: Thu Jan 5 23:51:05 2023 +0100 hwmon: (ftsteutates) Convert to devm_hwmon_device_register_with_info() Convert driver to use devm_hwmon_device_register_with_info() to reduce module size by ~30%. Tested on a Fujitsu DS3401-B1. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20230105225107.58308-2-W_Armin@gmx.de Signed-off-by: Guenter Roeck commit ff9dedd2da87bb22fd687ef731c1114b82343f89 Author: Frank Crawford Date: Wed Jan 4 17:09:26 2023 +1100 hwmon: (it87) Set second Super-IO chip in configuration mode On various Gigabyte AM4 boards (AB350, AX370), the second Super-IO chip (IT8792E) needs to be in configuration mode before accessing the first due to a bug in IT8792E which otherwise results in LPC bus access errors. This needs to be done before accessing the first Super-IO chip since the second chip may have been accessed prior to loading this driver. The problem is also reported to affect IT8795E, which is used on X299 boards and has the same chip ID as IT8792E (0x8733). It also appears to affect systems with IT8790E, which is used on some Z97X-Gaming boards as well as Z87X-OC, and other more recent Gigabyte boards. Signed-off-by: Frank Crawford Link: https://lore.kernel.org/r/20230104060926.619686-3-frank@crawford.emu.id.au [groeck: Made description pass checkpatch] Signed-off-by: Guenter Roeck commit d47e377c7b27e656cdf1dfd7297a195d3e68cd2b Author: Frank Crawford Date: Wed Jan 4 17:09:25 2023 +1100 hwmon: (it87) Allow calling __superio_enter outside muxed region Allow for superio_enter to be called without requesting the muxed memory region, in particular for initialisation of the second chipset, which must be put into configuration mode, but without an associated call to leave configuration mode. Signed-off-by: Frank Crawford Link: https://lore.kernel.org/r/20230104060926.619686-2-frank@crawford.emu.id.au [groeck: Clarified subject] Signed-off-by: Guenter Roeck commit 554df454e2fa117b36b2238f3b3467ef02a10fa0 Author: XU pengfei Date: Wed Jan 11 12:36:06 2023 +0800 hwmon: ibmpex: remove unnecessary (void*) conversions Pointer variables of void * type do not require type cast. Signed-off-by: XU pengfei Link: https://lore.kernel.org/r/20230111043605.3726-1-xupengfei@nfschina.com Signed-off-by: Guenter Roeck commit e2e09989ccc21ad428d6393450add78584b143bd Author: Denis Pauk Date: Wed Jan 11 23:22:41 2023 +0200 hwmon: (nct6775) B650/B660/X670 ASUS boards support Boards such as: "EX-B660M-V5 PRO D4", "PRIME B650-PLUS", "PRIME B650M-A", "PRIME B650M-A AX", "PRIME B650M-A II", "PRIME B650M-A WIFI", "PRIME B650M-A WIFI II", "PRIME B660M-A D4", "PRIME B660M-A WIFI D4", "PRIME X670-P", "PRIME X670-P WIFI", "PRIME X670E-PRO WIFI", "Pro B660M-C-D4", "ProArt B660-CREATOR D4", "ProArt X670E-CREATOR WIFI", "ROG CROSSHAIR X670E EXTREME", "ROG CROSSHAIR X670E GENE", "ROG CROSSHAIR X670E HERO", "ROG MAXIMUS XIII EXTREME GLACIAL", "ROG MAXIMUS Z690 EXTREME", "ROG MAXIMUS Z690 EXTREME GLACIAL", "ROG STRIX B650-A GAMING WIFI", "ROG STRIX B650E-E GAMING WIFI", "ROG STRIX B650E-F GAMING WIFI", "ROG STRIX B650E-I GAMING WIFI", "ROG STRIX B660-A GAMING WIFI D4", "ROG STRIX B660-F GAMING WIFI", "ROG STRIX B660-G GAMING WIFI", "ROG STRIX B660-I GAMING WIFI", "ROG STRIX X670E-A GAMING WIFI", "ROG STRIX X670E-E GAMING WIFI", "ROG STRIX X670E-F GAMING WIFI", "ROG STRIX X670E-I GAMING WIFI", "ROG STRIX Z590-A GAMING WIFI II", "ROG STRIX Z690-A GAMING WIFI D4", "TUF GAMING B650-PLUS", "TUF GAMING B650-PLUS WIFI", "TUF GAMING B650M-PLUS", "TUF GAMING B650M-PLUS WIFI", "TUF GAMING B660M-PLUS WIFI", "TUF GAMING X670E-PLUS", "TUF GAMING X670E-PLUS WIFI", "TUF GAMING Z590-PLUS WIFI", have got a NCT6799D chip, but by default there's no use of it because of resource conflict with WMI method. This commit adds such boards to the monitoring list with new ACPI device UID. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204807 Signed-off-by: Denis Pauk Co-developed-by: Ahmad Khalifa Signed-off-by: Ahmad Khalifa Tested-by: Jeroen Beerstra Tested-by: Slawomir Stepien Link: https://lore.kernel.org/r/20230111212241.7456-2-pauk.denis@gmail.com Signed-off-by: Guenter Roeck commit c3b3747d02f571da2543e719066a50dd966989d8 Author: Denis Pauk Date: Wed Jan 11 23:22:40 2023 +0200 hwmon: (nct6775) Directly call ASUS ACPI WMI method New ASUS B650/B660/X670 boards firmware have not exposed WMI monitoring GUID and entrypoint method WMBD could be implemented for different device UID. Implement the direct call to entrypoint method for monitoring the device UID of B550/X570 boards. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204807 Signed-off-by: Denis Pauk Co-developed-by: Ahmad Khalifa Signed-off-by: Ahmad Khalifa Link: https://lore.kernel.org/r/20230111212241.7456-1-pauk.denis@gmail.com [groeck: Fix multi-line formatting] Signed-off-by: Guenter Roeck commit 0be688d04211bed501faf0d5ed952175f7bc2706 Author: Randy Dunlap Date: Thu Jan 12 22:45:49 2023 -0800 hwmon: (hih6130) fix kernel-doc warnings Use the correct function name in kernel-doc comments to prevent these warnings: drivers/hwmon/hih6130.c:164: warning: expecting prototype for hih6130_show_temperature(). Prototype was for hih6130_temperature_show() instead drivers/hwmon/hih6130.c:185: warning: expecting prototype for hih6130_show_humidity(). Prototype was for hih6130_humidity_show() instead Signed-off-by: Randy Dunlap Cc: Jean Delvare Cc: Guenter Roeck Cc: linux-hwmon@vger.kernel.org Link: https://lore.kernel.org/r/20230113064549.21289-1-rdunlap@infradead.org Signed-off-by: Guenter Roeck commit ffdb3ba034e4850fcc678594bb5375fb01f6c063 Author: Randy Dunlap Date: Thu Jan 12 22:45:56 2023 -0800 hwmon: (sht15,sht21) fix kernel-doc warnings Use the correct function names in kernel-doc comments to prevent these warnings: drivers/hwmon/sht15.c:682: warning: expecting prototype for sht15_show_status(). Prototype was for sht15_status_show() instead drivers/hwmon/sht15.c:705: warning: expecting prototype for sht15_store_heater(). Prototype was for sht15_status_store() instead drivers/hwmon/sht15.c:738: warning: expecting prototype for sht15_show_temp(). Prototype was for sht15_temp_show() instead drivers/hwmon/sht15.c:760: warning: expecting prototype for sht15_show_humidity(). Prototype was for sht15_humidity_show() instead drivers/hwmon/sht21.c:128: warning: expecting prototype for sht21_show_temperature(). Prototype was for sht21_temperature_show() instead drivers/hwmon/sht21.c:149: warning: expecting prototype for sht21_show_humidity(). Prototype was for sht21_humidity_show() instead Signed-off-by: Randy Dunlap Cc: Jean Delvare Cc: Guenter Roeck Cc: linux-hwmon@vger.kernel.org Link: https://lore.kernel.org/r/20230113064556.21685-1-rdunlap@infradead.org Signed-off-by: Guenter Roeck commit e11037a5e1dab64d308ebdc0ad7a2a2dcfac66d6 Author: Randy Dunlap Date: Thu Jan 12 22:45:40 2023 -0800 hwmon: (emc2305) fix kernel-doc warnings Fix kernel-doc warnings: drivers/hwmon/emc2305.c:62: warning: Cannot understand * @cdev: cooling device; on line 62 - I thought it was a doc line drivers/hwmon/emc2305.c:89: warning: Cannot understand * @client: i2c client; on line 89 - I thought it was a doc line and drop ';' at end of each struct member line. Signed-off-by: Randy Dunlap Cc: Jean Delvare Cc: Guenter Roeck Cc: linux-hwmon@vger.kernel.org Link: https://lore.kernel.org/r/20230113064540.20179-1-rdunlap@infradead.org Signed-off-by: Guenter Roeck commit d5f80ff774d167d86a84a1907fa903c88dd7a7ae Author: Nick Hawkins Date: Tue Jan 3 14:36:54 2023 -0600 MAINTAINERS: add gxp fan controller and documents Add the gxp-fan-ctrl.c and gxp-fan-ctrl.rst in hwmon driver/documentation. Signed-off-by: Nick Hawkins Reviewed-by: Guenter Roek Link: https://lore.kernel.org/r/20230103203654.59322-6-nick.hawkins@hpe.com Signed-off-by: Guenter Roeck commit 547e9d942f3011c5ec5f4763c51dfcdb4b37b9dd Author: Nick Hawkins Date: Tue Jan 3 14:36:51 2023 -0600 dt-bindings: hwmon: Add hpe,gxp-fan-ctrl Create documentation for the binding to support control of the fans on HPE platforms. Signed-off-by: Nick Hawkins Reviewed-by: Rob Herring Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230103203654.59322-3-nick.hawkins@hpe.com Signed-off-by: Guenter Roeck commit 90905f7c40910a68677ea452ecf0023f31d6b08f Author: Nick Hawkins Date: Tue Jan 3 14:36:50 2023 -0600 hwmon: (gxp-fan-ctrl) Add GXP fan controller The GXP SoC can support up to 16 fans through the interface provided by the CPLD. The current support is limited to 8 fans. The fans speeds are controlled via 8 different PWMs which can vary in value from 0-255. The fans are also capable of reporting if they have failed to the CPLD which in turn reports the status to the GXP SoC. Signed-off-by: Nick Hawkins Link: https://lore.kernel.org/r/20230103203654.59322-2-nick.hawkins@hpe.com [groeck: Improved alignment of defined, added missing include linux/bits.h] Signed-off-by: Guenter Roeck commit 6d03bbff456befeccdd4d663177c4d6c75d0c4ff Author: Robin Murphy Date: Tue Jan 3 12:46:20 2023 +0100 hwmon: (coretemp) Simplify platform device handling Coretemp's platform driver is unconventional. All the real work is done globally by the initcall and CPU hotplug notifiers, while the "driver" effectively just wraps an allocation and the registration of the hwmon interface in a long-winded round-trip through the driver core. The whole logic of dynamically creating and destroying platform devices to bring the interfaces up and down is error prone, since it assumes platform_device_add() will synchronously bind the driver and set drvdata before it returns, thus results in a NULL dereference if drivers_autoprobe is turned off for the platform bus. Furthermore, the unusual approach of doing that from within a CPU hotplug notifier, already commented in the code that it deadlocks suspend, also causes lockdep issues for other drivers or subsystems which may want to legitimately register a CPU hotplug notifier from a platform bus notifier. All of these issues can be solved by ripping this unusual behaviour out completely, simply tying the platform devices to the lifetime of the module itself, and directly managing the hwmon interfaces from the hotplug notifiers. There is a slight user-visible change in that /sys/bus/platform/drivers/coretemp will no longer appear, and /sys/devices/platform/coretemp.n will remain present if package n is hotplugged off, but hwmon users should really only be looking for the presence of the hwmon interfaces, whose behaviour remains unchanged. Link: https://lore.kernel.org/lkml/20220922101036.87457-1-janusz.krzysztofik@linux.intel.com/ Link: https://gitlab.freedesktop.org/drm/intel/issues/6641 Signed-off-by: Robin Murphy Signed-off-by: Janusz Krzysztofik Link: https://lore.kernel.org/r/20230103114620.15319-1-janusz.krzysztofik@linux.intel.com Signed-off-by: Guenter Roeck commit 3d2e9f582a8e024b5f0516c1895ce586aea9c334 Author: Aleksa Savic Date: Sun Jan 1 20:00:56 2023 +0100 hwmon: (aquacomputer_d5next) Add support for reading calculated Aquaero sensors Add support for reading four calculated virtual temp sensors on the Aquacomputer Aquaero. Values of these sensors are calculated on the device itself based on what the user configured in the official software. Configuring these sensors is not currently reverse engineered. Signed-off-by: Aleksa Savic Link: https://lore.kernel.org/r/20230101190056.1357124-1-savicaleksa83@gmail.com Signed-off-by: Guenter Roeck commit 4b8e5a9326258507f0a796afef1f10e85d50b7bb Author: Yang Li Date: Fri Dec 23 16:10:56 2022 +0800 hwmon: (aht10) Fix some kernel-doc comments Make the description of @aht10_data to @data in aht10_read_values() and remove @client in aht10_init() to clear the below warnings: drivers/hwmon/aht10.c:87: warning: Excess function parameter 'client' description in 'aht10_init' drivers/hwmon/aht10.c:131: warning: Function parameter or member 'data' not described in 'aht10_read_values' drivers/hwmon/aht10.c:131: warning: Excess function parameter 'aht10_data' description in 'aht10_read_values' Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3543 Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20221223081056.88345-1-yang.lee@linux.alibaba.com Signed-off-by: Guenter Roeck commit e1515a749276efeff18b091f3367c3e4640ad497 Author: Armin Wolf Date: Sat Dec 24 05:18:55 2022 +0100 hwmon: (ftsteutates) Use devm_watchdog_register_device() Use devm_watchdog_register_device() to let devres take care of unregistering the watchdog at device removal. Remove the now pointless fts_remove() function. Tested on a Fujitsu DS3401-B1. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20221224041855.83981-4-W_Armin@gmx.de Signed-off-by: Guenter Roeck commit ebd4bfee2b972d34a2f72f81767d0cf47e6c914b Author: Derek J. Clark Date: Wed Dec 28 18:56:09 2022 -0800 hwmon: (oxp-sensors) Add AYANEO AIR and AIR Pro Add support for the AYANEO AIR and AYANEO AIR Pro models of handheld devices. These devices use the same EC registers and logic as the One X Player mini AMD. Previous AYANEO models are not supported as they use a different EC and do not have the necessary fan speed write enable and setting registers. The driver is tested on AYANEO AIR while AIR Pro model EC functionality and DMI data were verified using command line tools by another user. Add: - AYANEO AIR (AMD 5560U) - AYANEO AIR Pro (AMD 5560U) - AYANEO AIR Pro (AMD 5825U) While at it, fix spelling error (appart -> apart). Link: https://lore.kernel.org/r/20221229025609.147482-1-derekjohn.clark@gmail.com Signed-off-by: Derek J. Clark [groeck: Sanitize commit description] Signed-off-by: Guenter Roeck commit 2c55211104b44bd1b83009f0af204237a62e28bd Author: Leonard Anderweit Date: Sun Dec 18 12:31:31 2022 +0100 hwmon: (aquacomputer_d5next) Support sensors for Aquacomputer Aquaero Add support for reading sensors of the Aquacomputer Aquaero 5/6 fan controllers. These fan controllers supports 4 fans, 8 physical temperature sensors, 8 virtual temperature sensors and 2 flow sensors. Temperature and flow sensor reading implemented by Aleksa Savic [1] [2] [3]. [1] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/pull/31 [2] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/pull/51 [3] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/pull/55 Originally-from: Aleksa Savic Signed-off-by: Leonard Anderweit Link: https://lore.kernel.org/r/20221218113131.3752-7-leonard.anderweit@gmail.com Signed-off-by: Guenter Roeck commit 1ed5036b3be7db1b694bcaa4095869bdb8657d49 Author: Leonard Anderweit Date: Sun Dec 18 12:31:30 2022 +0100 hwmon: (aquacomputer_d5next) Make fan sensor offsets u16 Make fan sensor offsets u16 as u8 is insufficient for upcoming devices. Signed-off-by: Leonard Anderweit Link: https://lore.kernel.org/r/20221218113131.3752-6-leonard.anderweit@gmail.com Signed-off-by: Guenter Roeck commit ad2f0811fbeb61067e7d3715a3441ece23345e94 Author: Leonard Anderweit Date: Sun Dec 18 12:31:29 2022 +0100 hwmon: (aquacomputer_d5next) Device dependent serial number and firmware offsets Add device dependent serial number and firmware offsets to support devices with different offsets. All currently supported devices share the same offsets. Implemented by Aleksa Savic [1]. [1] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/pull/31/commits/14c3acf78b17397edb5dd356e6f5943a9996a1f9 Originally-from: Aleksa Savic Signed-off-by: Leonard Anderweit Link: https://lore.kernel.org/r/20221218113131.3752-5-leonard.anderweit@gmail.com Signed-off-by: Guenter Roeck commit 249c752110a551818f2e7080d81b93b90ae31095 Author: Leonard Anderweit Date: Sun Dec 18 12:31:28 2022 +0100 hwmon: (aquacomputer_d5next) Add structure for fan layout Introduce structure for per device fan sensor offsets. This allows reading fan sensors in aqc_raw_event() from devices which use a different sensor layout in their status HID report. Currently only one version is implemented as all supported devices use the same structure. Signed-off-by: Leonard Anderweit Link: https://lore.kernel.org/r/20221218113131.3752-4-leonard.anderweit@gmail.com Signed-off-by: Guenter Roeck commit a2ba7ee25c804f69a2ef0e9c7f76a31cacb685aa Author: Leonard Anderweit Date: Sun Dec 18 12:31:27 2022 +0100 hwmon: (aquacomputer_d5next) Restructure flow sensor reading Read flow sensors the same way for all devices instead of in special cases. Implemented by Aleksa Savic [1]. [1] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/commit/1c10912c5fdc8287d88378bcf1ef14d596f29462 Originally-from: Aleksa Savic Signed-off-by: Leonard Anderweit Link: https://lore.kernel.org/r/20221218113131.3752-3-leonard.anderweit@gmail.com Signed-off-by: Guenter Roeck commit 8bcb02bdc638df3c59d2797c57b84b641501c424 Author: Leonard Anderweit Date: Sun Dec 18 12:31:26 2022 +0100 hwmon: (aquacomputer_d5next) Rename AQC_TEMP_SENSOR_SIZE to AQC_SENSOR_SIZE Rename AQC_TEMP_SENSOR_SIZE to AQC_SENSOR_SIZE to use with other sensor types. Signed-off-by: Leonard Anderweit Link: https://lore.kernel.org/r/20221218113131.3752-2-leonard.anderweit@gmail.com Signed-off-by: Guenter Roeck commit ca22c58277470ac195b47f3b4021c6e10f155bc6 Author: Saravanan Sekar Date: Wed Dec 7 18:37:16 2022 +0100 MAINTAINERS: Update the entry for MPQ7932 PMIC driver Update the MAINTAINERS file to include the path for the MPQ7932 Signed-off-by: Saravanan Sekar Link: https://lore.kernel.org/r/20221207173716.123223-5-saravanan@linumiz.com Signed-off-by: Guenter Roeck commit 61d1eb025b237e29cdae0d12bc9feb56cd703bdb Author: Saravanan Sekar Date: Wed Dec 7 18:37:15 2022 +0100 hwmon: (pmbus/mpq7932) Add a support for mpq7932 Power Management IC The MPQ7932 is a power management IC designed to operate from 5V buses to power a variety of Advanced driver-assistance system SOCs. Six integrated buck converters with hardware monitoring capability powers a variety of target rails configurable over PMBus interface. Signed-off-by: Saravanan Sekar Link: https://lore.kernel.org/r/20221207173716.123223-4-saravanan@linumiz.com [groeck: Modified multi-line comments to match standard comment style] Signed-off-by: Guenter Roeck commit b52acefcf741373a3fceea5348e137b685a2d454 Author: Saravanan Sekar Date: Wed Dec 7 18:37:13 2022 +0100 hwmon: (pmbus/core) Add min_uV in pmbus regulator helper macro Some regulator operates in a range of voltage which should not allow below the lower threshold. Signed-off-by: Saravanan Sekar Link: https://lore.kernel.org/r/20221207173716.123223-2-saravanan@linumiz.com Signed-off-by: Guenter Roeck commit bc7fabde40a711fcfb1fb77946b350599f0dd392 Author: Nick Hawkins Date: Wed Nov 30 14:08:42 2022 -0600 ABI: sysfs-class-hwmon: add a description for fanY_fault Document existing fanY_fault attribute. Signed-off-by: Nick Hawkins Link: https://lore.kernel.org/r/20221130200846.4226-3-nick.hawkins@hpe.com Signed-off-by: Guenter Roeck commit 0f8b916bc5b5d74cacef2b616b04db10633b8105 Author: Marcelo Tosatti Date: Fri Dec 16 17:24:08 2022 -0300 hwmon: (coretemp) avoid RDMSR interrupts to isolated CPUs The coretemp driver uses rdmsr_on_cpu calls to read MSR_IA32_PACKAGE_THERM_STATUS/MSR_IA32_THERM_STATUS registers, which contain information about current core temperature. For certain low latency applications, the RDMSR interruption exceeds the applications requirements. So do not create core files in sysfs, for CPUs which have isolation and nohz_full enabled. Temperature information from the housekeeping cores should be sufficient to infer die temperature. Signed-off-by: Marcelo Tosatti Link: https://lore.kernel.org/r/Y5zT6B1mY9/pnwJV@tpad Signed-off-by: Guenter Roeck commit e247510e1baad04e9b7b8ed7190dbb00989387b9 Author: Herman Fries Date: Wed Dec 14 20:46:28 2022 +0100 hwmon: (nzxt-smart2) Add device id Adding support for new device id 1e71:2019 NZXT NZXT RGB & Fan Controller Signed-off-by: Herman Fries Link: https://lore.kernel.org/r/20221214194627.135692-1-baracoder@googlemail.com Signed-off-by: Guenter Roeck commit 95a56de6ed60aa74c91f67fc37fd28fa916a3521 Author: Joaquín Ignacio Aramendía Date: Mon Dec 12 11:12:46 2022 -0300 docs: hwmon: Use file modes explicitly As stated in the mainling list[1] and by checkpatch output, the file modes for is_visible_func should be returned explicitly. Change that in the documentation to avoid confusion. [1]https://lore.kernel.org/linux-hwmon/506a6e7f-4566-2dcf-37f3-0f41f4ce983b@roeck-us.net/ Signed-off-by: Joaquín Ignacio Aramendía Link: https://lore.kernel.org/r/20221212141245.52935-1-samsagax@gmail.com Signed-off-by: Guenter Roeck commit e2de0e6abd91b05411cb1f0953115dbbbe9b11ce Author: Eugene Shalygin Date: Sat Jan 21 12:17:28 2023 +0100 hwmon: (asus-ec-sensors) add missing mutex path Add missing mutex path for ProArt X570-CREATOR WIFI. Fixes: de8fbac5e59e (hwmon: (asus-ec-sensors) implement locking via the ACPI global lock) Signed-off-by: Eugene Shalygin Link: https://lore.kernel.org/r/20230121111728.168514-2-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck commit f00093608fa790580da309bb9feb5108fbe7c331 Author: Zev Weiss Date: Wed Feb 1 18:18:25 2023 -0800 hwmon: (peci/cputemp) Fix off-by-one in coretemp_label allocation The find_last_bit() call produces the index of the highest-numbered core in core_mask; because cores are numbered from zero, the number of elements we need to allocate is one more than that. Signed-off-by: Zev Weiss Cc: stable@kernel.org # v5.18 Fixes: bf3608f338e9 ("hwmon: peci: Add cputemp driver") Reviewed-by: Iwona Winiarska Link: https://lore.kernel.org/r/20230202021825.21486-1-zev@bewilderbeest.net Signed-off-by: Guenter Roeck commit a8173be1863e57393edb5c158860ec43a1f21ed7 Author: Christoph Hellwig Date: Fri Feb 3 16:06:22 2023 +0100 afs: use bvec_set_folio to initialize a bvec Use the bvec_set_folio helper to initialize a bvec. Signed-off-by: Christoph Hellwig Acked-by: David Howells Link: https://lore.kernel.org/r/20230203150634.3199647-12-hch@lst.de Signed-off-by: Jens Axboe commit 13ae4db0c05107814db4e774856aa83e72e8bf04 Author: Christoph Hellwig Date: Fri Feb 3 16:06:21 2023 +0100 zram: use bvec_set_page to initialize bvecs Use the bvec_set_page helper to initialize bvecs. Signed-off-by: Christoph Hellwig Reviewed-by: Sergey Senozhatsky Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20230203150634.3199647-11-hch@lst.de Signed-off-by: Jens Axboe commit b831f3a1031664ae2443bab63d35c416ed30c91d Author: Christoph Hellwig Date: Fri Feb 3 16:06:20 2023 +0100 virtio_blk: use bvec_set_virt to initialize special_vec Use the bvec_set_virt helper to initialize the special_vec. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Acked-by: Michael S. Tsirkin Acked-by: Jason Wang Link: https://lore.kernel.org/r/20230203150634.3199647-10-hch@lst.de Signed-off-by: Jens Axboe commit 7df2af0bb4912cf360045d065f88fe4ed2f702ca Author: Christoph Hellwig Date: Fri Feb 3 16:06:19 2023 +0100 rbd: use bvec_set_page to initialize the copy up bvec Use the bvec_set_page helper to initialize the copy up bvec. Signed-off-by: Christoph Hellwig Reviewed-by: Ilya Dryomov Link: https://lore.kernel.org/r/20230203150634.3199647-9-hch@lst.de Signed-off-by: Jens Axboe commit 4bee16daf13225d6b109bb95d613fd691b04a757 Author: Christoph Hellwig Date: Fri Feb 3 16:06:18 2023 +0100 nvme: use bvec_set_virt to initialize special_vec Use the bvec_set_virt helper to initialize the special_vec. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20230203150634.3199647-8-hch@lst.de Signed-off-by: Jens Axboe commit fc41c97a3a7b08131e6998bc7692f95729f9d359 Author: Christoph Hellwig Date: Fri Feb 3 16:06:17 2023 +0100 nvmet: use bvec_set_page to initialize bvecs Use the bvec_set_page helper to initialize bvecs. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20230203150634.3199647-7-hch@lst.de Signed-off-by: Jens Axboe commit 3c7ebe952fefb646c56b60f1c3e3388f3b938cc7 Author: Christoph Hellwig Date: Fri Feb 3 16:06:16 2023 +0100 target: use bvec_set_page to initialize bvecs Use the bvec_set_page helper to initialize bvecs. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20230203150634.3199647-6-hch@lst.de Signed-off-by: Jens Axboe commit f1e117cbb01a38f764db2f292174b93eab7c2db2 Author: Christoph Hellwig Date: Fri Feb 3 16:06:15 2023 +0100 sd: factor out a sd_set_special_bvec helper Add a helper for setting up the special_bvec instead of open coding it in three place, and use the new bvec_set_page helper to initialize special_vec. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20230203150634.3199647-5-hch@lst.de Signed-off-by: Jens Axboe commit 666e6550cb74e3a7206b5699409c9f31e123887e Author: Christoph Hellwig Date: Fri Feb 3 16:06:14 2023 +0100 block: add a bvec_set_virt helper A small wrapper around bvec_set_page for callers that have a virtual address. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20230203150634.3199647-4-hch@lst.de Signed-off-by: Jens Axboe commit 26db5ee158510108c819aa7be6eb8c75accf85d7 Author: Christoph Hellwig Date: Fri Feb 3 16:06:13 2023 +0100 block: add a bvec_set_folio helper A smaller wrapper around bvec_set_page that takes a folio instead. There are only two potential users for this in the tree, but the number will grow in the future. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20230203150634.3199647-3-hch@lst.de Signed-off-by: Jens Axboe commit d58cdfae6a22e5079656c487aad669597a0635c8 Author: Christoph Hellwig Date: Fri Feb 3 16:06:12 2023 +0100 block: factor out a bvec_set_page helper Add a helper to initialize a bvec based of a page pointer. This will help removing various open code bvec initializations. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20230203150634.3199647-2-hch@lst.de Signed-off-by: Jens Axboe commit 3f13ab7c80fdb0ada86a8e3e818960bc1ccbaa59 Author: Christoph Hellwig Date: Fri Feb 3 16:04:00 2023 +0100 blk-cgroup: move the cgroup information to struct gendisk cgroup information only makes sense on a live gendisk that allows file system I/O (which includes the raw block device). So move over the cgroup related members. Signed-off-by: Christoph Hellwig Reviewed-by: Andreas Herrmann Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230203150400.3199230-20-hch@lst.de Signed-off-by: Jens Axboe commit 479664cee14d8452d3d76f8d0b7fccd0cbe4ed49 Author: Christoph Hellwig Date: Fri Feb 3 16:03:59 2023 +0100 blk-cgroup: pass a gendisk to blkg_lookup Pass a gendisk to blkg_lookup and use that to find the match as part of phasing out usage of the request_queue in the blk-cgroup code. Signed-off-by: Christoph Hellwig Reviewed-by: Andreas Herrmann Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230203150400.3199230-19-hch@lst.de Signed-off-by: Jens Axboe commit 0a0b4f79db2e6e745672aa3852cf5fdf7af14a0f Author: Christoph Hellwig Date: Fri Feb 3 16:03:58 2023 +0100 blk-cgroup: pass a gendisk to pd_alloc_fn No need to the request_queue here, pass a gendisk and extract the node ids from that. Signed-off-by: Christoph Hellwig Reviewed-by: Andreas Herrmann Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230203150400.3199230-18-hch@lst.de Signed-off-by: Jens Axboe commit 40e4996ec099a301083eb7e29095ebdfc31443da Author: Christoph Hellwig Date: Fri Feb 3 16:03:57 2023 +0100 blk-cgroup: pass a gendisk to blkcg_{de,}activate_policy Prepare for storing the blkcg information in the gendisk instead of the request_queue. Signed-off-by: Christoph Hellwig Reviewed-by: Andreas Herrmann Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230203150400.3199230-17-hch@lst.de Signed-off-by: Jens Axboe commit ba91c849fa50dbc6519cf7808177b3a9b7f6bc97 Author: Christoph Hellwig Date: Fri Feb 3 16:03:56 2023 +0100 blk-rq-qos: store a gendisk instead of request_queue in struct rq_qos This is what about half of the users already want, and it's only going to grow more. Signed-off-by: Christoph Hellwig Reviewed-by: Andreas Herrmann Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230203150400.3199230-16-hch@lst.de Signed-off-by: Jens Axboe commit 3963d84df7974b6687cb34bce3b9e0b2686f839c Author: Christoph Hellwig Date: Fri Feb 3 16:03:55 2023 +0100 blk-rq-qos: constify rq_qos_ops These op vectors are constant, so mark them const. Signed-off-by: Christoph Hellwig Reviewed-by: Andreas Herrmann Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230203150400.3199230-15-hch@lst.de Signed-off-by: Jens Axboe commit ce57b558604e68277d31ca5ce49ec4579a8618c5 Author: Christoph Hellwig Date: Fri Feb 3 16:03:54 2023 +0100 blk-rq-qos: make rq_qos_add and rq_qos_del more useful Switch to passing a gendisk, and make rq_qos_add initialize all required fields and drop the not required q argument from rq_qos_del. Signed-off-by: Christoph Hellwig Reviewed-by: Andreas Herrmann Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230203150400.3199230-14-hch@lst.de Signed-off-by: Jens Axboe commit b494f9c566ba5fe2cc8abe67fdeb0332c6b48d4b Author: Christoph Hellwig Date: Fri Feb 3 16:03:53 2023 +0100 blk-rq-qos: move rq_qos_add and rq_qos_del out of line These two functions are rather larger and not in a fast path, so move them out of line. Signed-off-by: Christoph Hellwig Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230203150400.3199230-13-hch@lst.de Signed-off-by: Jens Axboe commit 4e1d91ae876bd12f327340f11a16a1278985e7e1 Author: Christoph Hellwig Date: Fri Feb 3 16:03:52 2023 +0100 blk-wbt: open code wbt_queue_depth_changed in wbt_init wbt_queue_depth_changed just updates a field and calls another function. Open code it in wbt_init, so that the local queue variable can be used instead of the one stored in the rq_qos. This will allow delaying that rq_qos->queue assignment in a subsequent patch. Signed-off-by: Christoph Hellwig Reviewed-by: Andreas Herrmann Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230203150400.3199230-12-hch@lst.de Signed-off-by: Jens Axboe commit 0bc65bd41dfd2f75b9f38812326d767db5cd0663 Author: Christoph Hellwig Date: Fri Feb 3 16:03:51 2023 +0100 blk-wbt: move private information from blk-wbt.h to blk-wbt.c A large part of blk-wbt.h is only used in blk-wbt.c, so move it there. Signed-off-by: Christoph Hellwig Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230203150400.3199230-11-hch@lst.de Signed-off-by: Jens Axboe commit 958f29654747a54f2272eb478e493eb97f492e06 Author: Christoph Hellwig Date: Fri Feb 3 16:03:50 2023 +0100 blk-wbt: pass a gendisk to wbt_init Pass a gendisk to wbt_init to prepare for phasing out usage of the request_queue in the blk-cgroup code. Signed-off-by: Christoph Hellwig Reviewed-by: Andreas Herrmann Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230203150400.3199230-10-hch@lst.de Signed-off-by: Jens Axboe commit 04aad37be1a88de6a1919996a615437ac74de479 Author: Christoph Hellwig Date: Fri Feb 3 16:03:49 2023 +0100 blk-wbt: pass a gendisk to wbt_{enable,disable}_default Pass a gendisk to wbt_enable_default and wbt_disable_default to prepare for phasing out usage of the request_queue in the blk-cgroup code. Signed-off-by: Christoph Hellwig Reviewed-by: Andreas Herrmann Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230203150400.3199230-9-hch@lst.de Signed-off-by: Jens Axboe commit f05837ed73d0c73e950b2d9f2612febb0d3d451e Author: Christoph Hellwig Date: Fri Feb 3 16:03:48 2023 +0100 blk-cgroup: store a gendisk to throttle in struct task_struct Switch from a request_queue pointer and reference to a gendisk once for the throttle information in struct task_struct. Signed-off-by: Christoph Hellwig Reviewed-by: Andreas Herrmann Link: https://lore.kernel.org/r/20230203150400.3199230-8-hch@lst.de Signed-off-by: Jens Axboe commit 84d7d462b16dd5f0bf7c7ca9254bf81db2c952a2 Author: Christoph Hellwig Date: Fri Feb 3 16:03:47 2023 +0100 blk-cgroup: pin the gendisk in struct blkcg_gq Currently each blkcg_gq holds a request_queue reference, which is what is used in the policies. But a lot of these interfaces will move over to use a gendisk, so store a disk in struct blkcg_gq and hold a reference to it. Signed-off-by: Christoph Hellwig Reviewed-by: Andreas Herrmann Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230203150400.3199230-7-hch@lst.de Signed-off-by: Jens Axboe commit 180b04d450a7137270c12dbb6bebf1d5e6c0a6f2 Author: Christoph Hellwig Date: Fri Feb 3 16:03:46 2023 +0100 blk-cgroup: remove the !bdi->dev check in blkg_dev_name bdi_dev_name already performs the same check. Signed-off-by: Christoph Hellwig Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230203150400.3199230-6-hch@lst.de Signed-off-by: Jens Axboe commit 27b642b07a4a5eb44dffa94a5171ce468bdc46f9 Author: Christoph Hellwig Date: Fri Feb 3 16:03:45 2023 +0100 blk-cgroup: simplify blkg freeing from initialization failure paths There is no need to delay freeing a blkg to a workqueue when freeing it after an initialization failure. Signed-off-by: Christoph Hellwig Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230203150400.3199230-5-hch@lst.de Signed-off-by: Jens Axboe commit 0b6f93bdf07e52620f725f721e547408e0d04c9d Author: Christoph Hellwig Date: Fri Feb 3 16:03:44 2023 +0100 blk-cgroup: improve error unwinding in blkg_alloc Unwind only the previous initialization steps that happened in blkg_alloc using goto based unwinding. This avoids the need for the !queue special case in blkg_free and thus ensures that any blkg seens outside of blkg_alloc is always fully constructed. Signed-off-by: Christoph Hellwig Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230203150400.3199230-4-hch@lst.de Signed-off-by: Jens Axboe commit 178fa7d49815ea8001f43ade37a22072829fd8ab Author: Christoph Hellwig Date: Fri Feb 3 16:03:43 2023 +0100 blk-cgroup: delay blk-cgroup initialization until add_disk There is no need to initialize the cgroup code before the disk is marked live. Moving the cgroup initialization earlier will help to have a fully initialized struct device in the gendisk for the cgroup code to use in the future. Similarly tear the cgroup information down in del_gendisk to be symmetric and because none of the cgroup tracking is needed once non-passthrough I/O stops. Signed-off-by: Christoph Hellwig Reviewed-by: Andreas Herrmann Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230203150400.3199230-3-hch@lst.de Signed-off-by: Jens Axboe commit a886001c2da8dd02357d0d336ddb021903347f89 Author: Christoph Hellwig Date: Fri Feb 3 16:03:42 2023 +0100 block: don't call blk_throtl_stat_add for non-READ/WRITE commands blk_throtl_stat_add is called from blk_stat_add explicitly, unlike the other stats that go through q->stats->callbacks. To prepare for cgroup data moving to the gendisk, ensure blk_throtl_stat_add is only called for the plain READ and WRITE commands that it actually handles internally, as blk_stat_add can also be called for passthrough commands on queues that do not have a gendisk associated with them. Signed-off-by: Christoph Hellwig Reviewed-by: Andreas Herrmann Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230203150400.3199230-2-hch@lst.de Signed-off-by: Jens Axboe commit 700ed3bbb7a0bd5eeb805a2c2ba47a6d7b286745 Merge: cfe4585d7f5a6 3937a76c64931 Author: Mark Brown Date: Fri Feb 3 15:07:15 2023 +0000 ASoC: SOF: core/ipc4/mtl: Add support for PCM delay Merge series from Peter Ujfalusi : The following series adds support for the PCM delay reporting in SOF core level and implements the needed infrastructure with IPC4 to finally enable it for MTL. Currently this is only supported on MTL (and via IPC4), but with the infrastructure in place it will be possible to support other platforms with DeepBuffer. commit cfe4585d7f5a6eaa56b7cebaed04bdcd4a7cab86 Merge: 96ebccb2356da dd184c400e102 Author: Mark Brown Date: Fri Feb 3 14:43:55 2023 +0000 ASoC: (SOF) topology: Regression fixes for next Merge series from Peter Ujfalusi : Today I came across two regressions in next with SOF: The topology would not load with a failure of creating playback DAI the first patch is fixing this which was caused by a missing 'else' in the patch After fixing the topology loading, the module unloading caused kernel panic. The second patch is correcting that which is I likely caused by copy-paste to set wrong unload callback for the graph element. With these patches applied SOF is working on next and modules can be unloaded commit 6246541522845a443b7ae4a8f0e16facc5a91198 Author: Matt Evans Date: Wed Feb 1 18:39:48 2023 +0000 locking/atomic: cmpxchg: Make __generic_cmpxchg_local compare against zero-extended 'old' value __generic_cmpxchg_local takes unsigned long old/new arguments which might end up being up-cast from smaller signed types (which will sign-extend). The loaded compare value must be compared against a truncated smaller type, so down-cast appropriately for each size. The issue is apparent on 64-bit machines with code, such as atomic_dec_unless_positive(), that sign-extends from int. 64-bit machines generally don't use the generic cmpxchg but development/early ports might make use of it, so make it correct. Signed-off-by: Matt Evans Signed-off-by: Arnd Bergmann commit 0365df81145a4cfaae5f4da896160de512256e6d Author: Jerome Neanne Date: Fri Feb 3 15:01:19 2023 +0100 regulator: tps65219: use generic set_bypass() Due to wrong interpretation of the specification, custom implementation was used instead of standard regmap helper. LINK: https://lore.kernel.org/all/c2014039-f1e8-6976-33d6-52e2dd4e7b66@baylibre.com/ Fixes: c12ac5fc3e0a ("regulator: drivers: Add TI TPS65219 PMIC regulators support") Regulator does NOT require to be off to be switched to bypass mode. Signed-off-by: Jerome Neanne Link: https://lore.kernel.org/r/20230203140119.13029-1-jneanne@baylibre.com Signed-off-by: Mark Brown commit 3216e828b919675f7bc511f7aa575ee93090b5b1 Author: Jacopo Mondi Date: Mon Jan 16 16:44:47 2023 +0100 media: dt-bindings: media: Add OmniVision OV8858 Add binding schema for the OmniVision OV8858 8 Megapixels camera sensor. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 05ef7ec49d6b7ed364ad68cf348f952ffcc22605 Author: Laurent Pinchart Date: Mon Jan 16 15:44:54 2023 +0100 media: i2c: imx290: Handle error from imx290_set_data_lanes() Check the error status returned by imx290_set_data_lanes() in its caller and propagate it. Signed-off-by: Laurent Pinchart Reviewed-by: Alexander Stein Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 76c001287f6a56f37a5d48682086c334d81ec9f2 Author: Laurent Pinchart Date: Mon Jan 16 15:44:53 2023 +0100 media: i2c: imx290: Simplify imx290_set_data_lanes() There's no need to check for an incorrect number of data lanes in imx290_set_data_lanes() as the value is validated at probe() time. Drop the check. The PHY_LANE_NUM and CSI_LANE_MODE registers are programmed with a value equal to the number of lanes minus one. Compute it instead of handling it in the switch/case. Signed-off-by: Laurent Pinchart Reviewed-by: Alexander Stein Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7d399658f7c666ead4bc3dbe88944bb8ea7746ca Author: Laurent Pinchart Date: Mon Jan 16 15:44:52 2023 +0100 media: i2c: imx290: Configure data lanes at start time There's no need to configure the data lanes in the runtime PM resume handler. Do so in imx290_start_streaming() instead. Signed-off-by: Laurent Pinchart Reviewed-by: Alexander Stein Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 02852c01f65402e2fe4a8a5fe5a0b641f245b529 Author: Laurent Pinchart Date: Mon Jan 16 15:44:51 2023 +0100 media: i2c: imx290: Initialize runtime PM before subdev Initializing the subdev before runtime PM means that no subdev initialization can interact with the runtime PM framework. This can be problematic when modifying controls, as the .s_ctrl() handler commonly calls pm_runtime_get_if_in_use(). These code paths are not trivial, making the driver fragile and possibly causing subtle bugs. To make the subdev initialization more robust, initialize runtime PM first. Signed-off-by: Laurent Pinchart Acked-by: Alexander Stein Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit a8c3e0c1bf1e97b5ee094951ed0f1e57e3b378c7 Author: Laurent Pinchart Date: Mon Jan 16 15:44:50 2023 +0100 media: i2c: imx290: Use runtime PM autosuspend Use runtime PM autosuspend to avoid powering off the sensor during fast stop-reconfigure-restart cycles. This also fixes runtime PM handling in the probe function that didn't suspend the device, effectively leaving it resumed forever. While at it, improve documentation of power management in probe() and remove(). Signed-off-by: Laurent Pinchart Acked-by: Alexander Stein Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 10591fe63691bd8199d5e7244029cc065959ffc9 Author: Laurent Pinchart Date: Mon Oct 17 12:44:27 2022 +0200 media: i2c: imx290: Rename, extend and expand usage of imx290_pixfmt The imx290_pixfmt structure contains information about formats, currently limited to the bpp value. Extend it with the register settings for each format, and rename it to imx290_format_info to make its purpose clearer. Add a function named imx290_format_info() to look up format info for a media bus code, and use it through the code. This allows dropping the imx290 bpp field as the value is now looked up dynamically. The error handling in imx290_setup_format() can also be dropped, as the format is guaranteed by imx290_set_fmt() to be valid. Signed-off-by: Laurent Pinchart Acked-by: Alexander Stein Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit a2514b9a634ac0a2cfbc329822b8fb58ffe23a80 Author: Laurent Pinchart Date: Mon Oct 17 12:44:27 2022 +0200 media: i2c: imx290: Use V4L2 subdev active state Use the V4L2 subdev active state API to store the active format. This simplifies the driver not only by dropping the imx290 current_format field, but it also allows dropping the imx290 lock, replaced with the state lock. The lock check in imx290_ctrl_update() can be dropped as imx290_set_fmt() can't be called anywmore with which set to ACTIVE before controls are initialized. Signed-off-by: Laurent Pinchart Reviewed-by: Alexander Stein Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e5d363ca82b94b26d85043c26e865824f947a80b Author: Laurent Pinchart Date: Mon Jan 16 15:44:47 2023 +0100 media: i2c: imx290: Factor out clock initialization to separate function Move the external clock initialization code from probe() to a separate function to improve readability. No functional change intended. Signed-off-by: Laurent Pinchart Reviewed-by: Alexander Stein Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 63127235bebdd112bf17cbd2339c9daf63c51970 Author: Laurent Pinchart Date: Mon Jan 16 15:44:46 2023 +0100 media: i2c: imx290: Use dev_err_probe() Improve error handling in the probe() function with dev_err_probe(). Signed-off-by: Laurent Pinchart Reviewed-by: Alexander Stein Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 6b69c52277ed113b8d005674dd3d67a542ec0edf Author: Laurent Pinchart Date: Mon Jan 16 15:44:45 2023 +0100 media: i2c: imx290: Factor out DT parsing to separate function Make the probe() function more readable by factoring out the DT parsing code to a separate function. No functional change intended. Signed-off-by: Laurent Pinchart Reviewed-by: Alexander Stein Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit ee4ce89366935da1c044d0417bf09f9f0e4a3457 Author: Laurent Pinchart Date: Mon Jan 16 15:44:44 2023 +0100 media: i2c: imx290: Factor out black level setting to a function The black level programmed in the BLKLEVEL register depends on the output format. The black level value computation is currently performed in imx290_set_ctrl(), in addition to having different black level values in the output-specific register value tables. Move it to a separate function to simplify the imx290_set_ctrl() code. Signed-off-by: Laurent Pinchart Reviewed-by: Alexander Stein Reviewed-by: Dave Stevenson Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 693b5cb598cc787dd61b8b626bfd45c26b5b1290 Author: Laurent Pinchart Date: Mon Jan 16 15:44:43 2023 +0100 media: i2c: imx290: Compute pixel rate and blanking in one place The hblank, vblank, pixel rate and link frequency values and limits are currently computed when creating controls, in imx290_ctrl_init(), and updated in imx290_ctrl_update(). This duplicates the logic in different places. Simplify the code by setting the control values and limits to hardcoded values when creating the controls, and call imx290_ctrl_update() to then update them. Signed-off-by: Laurent Pinchart Acked-by: Alexander Stein Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 31b54a422b3f66f715a0963d1d3ce0c7678fb333 Author: Laurent Pinchart Date: Mon Jan 16 15:44:42 2023 +0100 media: i2c: imx290: Pass format and mode to imx290_calc_pixel_rate() Avoid accessing the imx290 current_format and current_mode fields in imx290_calc_pixel_rate() to prepare for the removal of those fields. Among the two callers of the function, imx290_ctrl_update() has an explicit mode pointer already, and we can also give it a format pointer. Use those explicitly. While at it, inline the imx290_get_link_freq() function in imx290_calc_pixel_rate() as it is only called there. Signed-off-by: Laurent Pinchart Reviewed-by: Alexander Stein Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 70bbf56aa82ca972be424ec110f9a7f4ab9ee732 Author: Laurent Pinchart Date: Mon Jan 16 15:44:41 2023 +0100 media: i2c: imx290: Access link_freq_index directly The imx290_get_link_freq_index() function hides the fact that it relies on the imx290 current_mode field, which obfuscates the code instead of making it more readable. Inline it in the callers, and use the mode pointer we already have in imx290_ctrl_update() instead of using the current_mode field. Signed-off-by: Laurent Pinchart Reviewed-by: Alexander Stein Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit a7941da37c43d60c99843265e8535d47c7dd93a3 Author: Laurent Pinchart Date: Mon Jan 16 15:44:40 2023 +0100 media: i2c: imx290: Factor out control update code to a function Move the control update code to a separate function to group it with all the control-related code and make imx290_set_fmt() more readable. Signed-off-by: Laurent Pinchart Reviewed-by: Alexander Stein Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit dfb704da83003c8f00156b020aaa6fa34b22e600 Author: Laurent Pinchart Date: Mon Jan 16 15:44:39 2023 +0100 media: i2c: imx290: Factor out subdev init and cleanup to functions The probe() function is large. Make it more readable by factoring the subdev initialization code out. While at it, rename the error labels as the "free_" prefix isn't accurate. No functional change intended. Signed-off-by: Laurent Pinchart Reviewed-by: Alexander Stein Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit cb7e1c8dbe60ef8e76518a39ad6ea133ab8532ae Author: Laurent Pinchart Date: Mon Jan 16 15:44:38 2023 +0100 media: i2c: imx290: Group functions in sections Move functions around to group them in logical sections, in order to improve readability. As a result, the IMX290_NUM_SUPPLIES macro has to be changed. No other code change is included, only moves. Signed-off-by: Laurent Pinchart Reviewed-by: Alexander Stein Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 68453b02e422ff42fc73a9469979ff301661dcdd Author: Guoniu.zhou Date: Mon Dec 12 05:05:26 2022 +0100 media: ov5640: set correct default format for CSI-2 mode In commit a89f14bbcfa5 ("media: ov5640: Split DVP and CSI-2 formats"), it splits format list for DVP and CSI-2 mode, but the default format defined in commit 90b0f355c5a3 ("media: ov5640: Implement init_cfg") is only supported by DVP mode, so define a new default format for CSI-2 mode. Signed-off-by: Guoniu.zhou Reviewed-by: Jai Luthra Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit ceddfd4493b3341bc69b278bbecfb19ea0773a69 Author: Adam Ford Date: Tue Dec 20 13:07:54 2022 +0100 media: i2c: imx219: Support four-lane operation The imx219 camera is capable of either two-lane or four-lane operation. When operating in four-lane, both the pixel rate and link frequency change. Regardless of the mode, however, both frequencies remain fixed. Helper functions are needed to read and set pixel and link frequencies which also reduces the number of fixed registers in the table of modes. Signed-off-by: Adam Ford Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 8508455961d5a9e8907bcfd8dcd58f19d9b6ce47 Author: Adam Ford Date: Tue Dec 20 13:07:53 2022 +0100 media: i2c: imx219: Split common registers from mode tables There are four modes, and each mode has a table of registers. Some of the registers are common to all modes, so create new tables for these common registers to reduce duplicate code. Signed-off-by: Adam Ford Reviewed-by: Dave Stevenson Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 5ad2e46030ad97de7fdbdaf63bb1af45c7caf3dd Author: Marco Felsch Date: Fri Dec 16 11:35:45 2022 +0100 media: i2c: tc358746: fix possible endianness issue Using the u64 v4l2_dbg_register.val directly can lead to unexpected results depending on machine endianness. Fix this by using a local variable which is assigned afterwards. Since tc358746_read() will init the val variable to 0 we can assing it without checking the return value first. Addresses-Coverity-ID: 1527256 ("Integer handling issues") Reported-by: coverity-bot Fixes: 80a21da36051 ("media: tc358746: add Toshiba TC358746 Parallel to CSI-2 bridge driver") Signed-off-by: Marco Felsch Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 9d33802c8bcf96c4099ffea4f392afa52897e556 Author: Marco Felsch Date: Fri Dec 16 11:35:44 2022 +0100 media: i2c: tc358746: fix ignoring read error in g_register callback Currently we ignore the return value of tc358746_read() and return alawys return 0 which is wrong. Fix this by returning the actual return value of the read operation which is either 0 on success or an error value. Addresses-Coverity-ID: 1527254 ("Error handling issues") Reported-by: coverity-bot Fixes: 80a21da36051 ("media: tc358746: add Toshiba TC358746 Parallel to CSI-2 bridge driver") Signed-off-by: Marco Felsch Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 0605081142070a41de8f1deb8fdaeb8677e97741 Author: Marco Felsch Date: Fri Dec 16 11:35:43 2022 +0100 media: i2c: tc358746: fix missing return assignment It was intended to return an error if tc358746_update_bits() call fail. Fix this by storing the return code. Addresses-Coverity-ID: 1527252 ("Control flow issues") Reported-by: coverity-bot Fixes: 80a21da36051 ("media: tc358746: add Toshiba TC358746 Parallel to CSI-2 bridge driver") Signed-off-by: Marco Felsch Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit dd74ed6c213003533e3abf4c204374ef01d86978 Author: Shang XiaoJing Date: Thu Dec 8 08:59:38 2022 +0100 media: ov5675: Fix memleak in ov5675_init_controls() There is a kmemleak when testing the media/i2c/ov5675.c with bpf mock device: AssertionError: unreferenced object 0xffff888107362160 (size 16): comm "python3", pid 277, jiffies 4294832798 (age 20.722s) hex dump (first 16 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000abe7d67c>] __kmalloc_node+0x44/0x1b0 [<000000008a725aac>] kvmalloc_node+0x34/0x180 [<000000009a53cd11>] v4l2_ctrl_handler_init_class+0x11d/0x180 [videodev] [<0000000055b46db0>] ov5675_probe+0x38b/0x897 [ov5675] [<00000000153d886c>] i2c_device_probe+0x28d/0x680 [<000000004afb7e8f>] really_probe+0x17c/0x3f0 [<00000000ff2f18e4>] __driver_probe_device+0xe3/0x170 [<000000000a001029>] driver_probe_device+0x49/0x120 [<00000000e39743c7>] __device_attach_driver+0xf7/0x150 [<00000000d32fd070>] bus_for_each_drv+0x114/0x180 [<000000009083ac41>] __device_attach+0x1e5/0x2d0 [<0000000015b4a830>] bus_probe_device+0x126/0x140 [<000000007813deaf>] device_add+0x810/0x1130 [<000000007becb867>] i2c_new_client_device+0x386/0x540 [<000000007f9cf4b4>] of_i2c_register_device+0xf1/0x110 [<00000000ebfdd032>] of_i2c_notify+0xfc/0x1f0 ov5675_init_controls() won't clean all the allocated resources in fail path, which may causes the memleaks. Add v4l2_ctrl_handler_free() to prevent memleak. Fixes: bf27502b1f3b ("media: ov5675: Add support for OV5675 sensor") Signed-off-by: Shang XiaoJing Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 2d899592ed7829d0d5140853bac4d58742a6b8af Author: Shang XiaoJing Date: Thu Dec 8 08:59:37 2022 +0100 media: ov2740: Fix memleak in ov2740_init_controls() There is a kmemleak when testing the media/i2c/ov2740.c with bpf mock device: unreferenced object 0xffff8881090e19e0 (size 16): comm "51-i2c-ov2740", pid 278, jiffies 4294781584 (age 23.613s) hex dump (first 16 bytes): 00 f3 7c 0b 81 88 ff ff 80 75 6a 09 81 88 ff ff ..|......uj..... backtrace: [<000000004e9fad8f>] __kmalloc_node+0x44/0x1b0 [<0000000039c802f4>] kvmalloc_node+0x34/0x180 [<000000009b8b5c63>] v4l2_ctrl_handler_init_class+0x11d/0x180 [videodev] [<0000000038644056>] ov2740_probe+0x37d/0x84f [ov2740] [<0000000092489f59>] i2c_device_probe+0x28d/0x680 [<000000001038babe>] really_probe+0x17c/0x3f0 [<0000000098c7af1c>] __driver_probe_device+0xe3/0x170 [<00000000e1b3dc24>] device_driver_attach+0x34/0x80 [<000000005a04a34d>] bind_store+0x10b/0x1a0 [<00000000ce25d4f2>] drv_attr_store+0x49/0x70 [<000000007d9f4e9a>] sysfs_kf_write+0x8c/0xb0 [<00000000be6cff0f>] kernfs_fop_write_iter+0x216/0x2e0 [<0000000031ddb40a>] vfs_write+0x658/0x810 [<0000000041beecdd>] ksys_write+0xd6/0x1b0 [<0000000023755840>] do_syscall_64+0x38/0x90 [<00000000b2cc2da2>] entry_SYSCALL_64_after_hwframe+0x63/0xcd ov2740_init_controls() won't clean all the allocated resources in fail path, which may causes the memleaks. Add v4l2_ctrl_handler_free() to prevent memleak. Fixes: 866edc895171 ("media: i2c: Add ov2740 image sensor driver") Signed-off-by: Shang XiaoJing Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 8636c5fc7658c7c6299fb8b352d24ea4b9ba99e2 Author: Shang XiaoJing Date: Tue Dec 6 14:05:55 2022 +0100 media: max9286: Fix memleak in max9286_v4l2_register() There is a kmemleak when testing the media/i2c/max9286.c with bpf mock device: kmemleak: 5 new suspected memory leaks (see /sys/kernel/debug/kmemleak) unreferenced object 0xffff88810defc400 (size 256): comm "python3", pid 278, jiffies 4294737563 (age 31.978s) hex dump (first 32 bytes): 28 06 a7 0a 81 88 ff ff 00 fe 22 12 81 88 ff ff (........."..... 10 c4 ef 0d 81 88 ff ff 10 c4 ef 0d 81 88 ff ff ................ backtrace: [<00000000191de6a7>] __kmalloc_node+0x44/0x1b0 [<000000002f4912b7>] kvmalloc_node+0x34/0x180 [<0000000057dc4cae>] v4l2_ctrl_new+0x325/0x10f0 [videodev] [<0000000026030272>] v4l2_ctrl_new_std+0x16f/0x210 [videodev] [<00000000f0d9ea2f>] max9286_probe+0x76e/0xbff [max9286] [<00000000ea8f6455>] i2c_device_probe+0x28d/0x680 [<0000000087529af3>] really_probe+0x17c/0x3f0 [<00000000b08be526>] __driver_probe_device+0xe3/0x170 [<000000004382edea>] driver_probe_device+0x49/0x120 [<000000007bde528a>] __device_attach_driver+0xf7/0x150 [<000000009f9c6ab4>] bus_for_each_drv+0x114/0x180 [<00000000c8aaf588>] __device_attach+0x1e5/0x2d0 [<0000000041cc06b9>] bus_probe_device+0x126/0x140 [<000000002309860d>] device_add+0x810/0x1130 [<000000002827bf98>] i2c_new_client_device+0x359/0x4f0 [<00000000593bdc85>] of_i2c_register_device+0xf1/0x110 max9286_v4l2_register() calls v4l2_ctrl_new_std(), but won't free the created v412_ctrl when fwnode_graph_get_endpoint_by_id() failed, which causes the memleak. Call v4l2_ctrl_handler_free() to free the v412_ctrl. Fixes: 66d8c9d2422d ("media: i2c: Add MAX9286 driver") Signed-off-by: Shang XiaoJing Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 518c5d778e985441a7e8c82c696dd38c002c44f0 Author: Deren Wu Date: Thu Feb 2 22:47:24 2023 +0800 wifi: mt76: support ww power config in dts node support new node for WW regulatory domain Tested-by: Michael Lo Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau commit c625b2c849de3a5513bc44f6240db79c020cba6c Author: Lorenzo Bianconi Date: Thu Feb 2 12:58:23 2023 +0100 wifi: mt76: mt76x0u: report firmware version through ethtool Run mt76x02_set_ethtool_fwver utility routine in mt76x0u_load_firmware() in order to report firmware version through ethtool Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d1abd69534bec16c43c633313e8e937af1354a7a Author: Stephen Boyd Date: Thu Feb 2 13:53:29 2023 -0800 phy: qcom-qmp: Introduce Kconfig symbols for discrete drivers Introduce a config option for each QMP PHY driver now that the QMP PHY mega-driver has been split up into different modules. This allows kernel configurators to limit the binary size of the kernel by only compiling in the QMP PHY driver that they need. Leave the old config QCOM_QMP in place and make it into a menuconfig so that 'make olddefconfig' continues to work. Furthermore, set the default of the new Kconfig symbols to be QCOM_QMP so that the transition is smooth. Reviewed-by: Dmitry Baryshkov Reviewed-by: Johan Hovold Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20230202215330.2152726-1-swboyd@chromium.org Signed-off-by: Vinod Koul commit 72ffc28f2fe8bce4e5b682caedf7a26c4998c756 Author: Daniel Lezcano Date: Wed Feb 1 23:36:16 2023 +0100 thermal: intel: quark_dts: Use generic trip points Make the intel_quark_dts_thermal driver register an array of generic trip points along with the thermal zone and drop the trip points thermal zone callbacks that are not used any more from it. Signed-off-by: Daniel Lezcano [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 8526eb7fc75abcd09d8bd061610215baf0ca948a Author: Srinivas Pandruvada Date: Wed Feb 1 10:28:53 2023 -0800 thermal: intel: powerclamp: Use powercap idle-inject feature There are two idle injection implementation in the Linux kernel. One via intel_powerclamp and the other using powercap/idle_inject. Both implementation end up in calling play_idle* function from a FIFO priority thread. Both can't be used at the same time. It is better to use one idle injection framework for better maintainability. In this way, there is only one caller for play_idle. Here powercap/idle_inject can be used for both per-core and for system wide idle injection. This framework has a well defined interface which allow registry for per-core or for all CPUs (system wide). This reduces code complexity in the intel powerclamp driver as all the per CPU kthreads, delayed work and calls to play_idle can be removed. The changes include: - Remove unneeded include files - Remove per CPU kthread workers: balancing_work and idle_injection_work. - Reuse the compensation related code by moving from previous worker thread to idle_injection callback. - Adjust the idle_duration and runtime by using powercap/idle_inject interface. - Remove all variables, which are not required once powercap/idle_inject is used. - Add mutex to avoid race during removal of idle injection during module unload and user action to change idle inject percent. Also for protection during dynamic adjustment of run and idle time from update() callback. - Remove online/offline callbacks to designate control CPU - Use cpu_present_mask global variable for CPU mask - Remove hot plug locks Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki commit c2b9fb63ccb6c09e1881abe90d85a86bd13d4f07 Author: Lorenzo Bianconi Date: Tue Jan 17 15:02:56 2023 +0100 wifi: mt76: mt7915: complete wed reset support Stop Wireless Ethernet Dispatcher during mt7915 reset procedure. Tested-by: Daniel Golle Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 36b7fce131ffe59aa0ab52c915f19fc2ed0a68de Author: Lorenzo Bianconi Date: Tue Jan 17 15:02:55 2023 +0100 wifi: mt76: mt7915: add mt7915 wed reset callbacks Introduce mt7915_mmio_wed_reset_complete and mt7915_mmio_wed_reset_complete callbacks and the related wait queues in order to wait for wed reset completion during wlan reset. Tested-by: Daniel Golle Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 3bc4b811688dad5d293a7dcc969d0c387bf4e369 Author: Sujuan Chen Date: Tue Jan 17 15:02:54 2023 +0100 wifi: mt76: dma: reset wed queues in mt76_dma_rx_reset This is a preliminary patch to introduce proper wed reset support. Tested-by: Daniel Golle Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi Signed-off-by: Sujuan Chen Signed-off-by: Felix Fietkau commit 1d5f5d55ef08b91e7ada0488733cb4af4bbcd538 Author: Sujuan Chen Date: Tue Jan 17 15:02:53 2023 +0100 wifi: mt76: dma: add reset to mt76_dma_wed_setup signature Export mt76_dma_wed_setup routine. This is a preliminary patch to introduce proper wed reset support. Tested-by: Daniel Golle Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi Signed-off-by: Sujuan Chen Signed-off-by: Felix Fietkau commit ba01944adee9f4a71cf2879b9529057fd8de1972 Author: MeiChia Chiu Date: Tue Jan 31 17:36:11 2023 +0800 wifi: mt76: mt7996: add EHT beamforming support Add mt7996_mcu_sta_bfer_eht() and related capability checks. Signed-off-by: MeiChia Chiu Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 92aa2da9fa4970a53856c7df17f6f615d02e4659 Author: Shayne Chen Date: Tue Jan 31 17:36:10 2023 +0800 wifi: mt76: mt7996: enable EHT support in firmware Add sta_rec_eht command and extend phymode setting. Co-developed-by: Peter Chiu Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 80f5a31d28563ddf3a43de94922f2e5c1fc0ee38 Author: Shayne Chen Date: Tue Jan 31 17:36:09 2023 +0800 wifi: mt76: mt7996: add support for EHT rate report Currenly only EHT TX rate report is supported. EHT RX rate is temporally reported with HE rate. Co-developed-by: MeiChia Chiu Signed-off-by: MeiChia Chiu Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 348533eb968dcc49011014843a234d9e5fc084c6 Author: Shayne Chen Date: Tue Jan 31 17:36:08 2023 +0800 wifi: mt76: mt7996: add EHT capability init Add EHT mac and phy capability init for mt7996 chipsets. Co-developed-by: Peter Chiu Signed-off-by: Peter Chiu Co-developed-by: MeiChia Chiu Signed-off-by: MeiChia Chiu Co-developed-by: Bo Jiao Signed-off-by: Bo Jiao Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 827a6867dd29b1757e49b2818b9a6c5f99385164 Author: Shayne Chen Date: Tue Jan 31 17:36:07 2023 +0800 wifi: mt76: mt7996: rework capability init Rework and extract common code of capability init for the preparation of adding EHT capability. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 434825404eff256a1c870949d72d5a4adef48071 Author: Shayne Chen Date: Tue Jan 31 17:36:06 2023 +0800 wifi: mt76: mt7996: add helpers for wtbl and interface limit Add helpers to get the maximum wtbl size and interface num based on hw caps. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 5d33053be609abfcfa9f5ca75d5554f2109aa40b Author: Shayne Chen Date: Tue Jan 31 17:36:05 2023 +0800 wifi: mt76: mt7996: add variants support There are variants of mt7996 which are different from eht supported and wtbl size limit. Get the hw caps with CHIP_CONFIG command. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 731425f3a940d01be0cab0a5e45382988146aed8 Author: Shayne Chen Date: Tue Jan 31 17:36:04 2023 +0800 wifi: mt76: add EHT rate stats for ethtool Add support to get EHT rate stats from ethtool. This is the preliminary patch to add EHT support for mt7996. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 6b733f7c5a749dbd089077165986bc3d9b7aabf5 Author: Shayne Chen Date: Tue Jan 31 17:36:03 2023 +0800 wifi: mt76: increase wcid size to 1088 Increase wcid size to support up to 1024 station hw entries and 64 bcast/mcast hw entries. This is the preliminary patch to add EHT support for mt7996. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 6aa57e265a56a8e8c5bbb2783ec1dca1627d13e5 Author: Shayne Chen Date: Tue Jan 31 17:36:02 2023 +0800 wifi: mt76: connac: add cmd id related to EHT support This is the preliminary patch to add EHT support for mt7996. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 019039af0adf3f257ba3fad01d2f0b3561f1e85c Author: Shayne Chen Date: Tue Jan 31 17:36:01 2023 +0800 wifi: mt76: connac: add helpers for EHT capability Add helpers to get eht cap and phymode on different bands and vifs. This is the preliminary patch to add EHT support for mt7996. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit e88c07e98b815ee94955bcd2855e4548409de770 Author: Shayne Chen Date: Tue Jan 31 17:36:00 2023 +0800 wifi: mt76: connac: add CMD_CBW_320MHZ Add CMD_CBW_320MHZ for setting bandwidth 320 MHz to firmware. This is the preliminary patch to add EHT support for mt7996. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit c2eccffd9e3bdd15458ceae9d8567e20f77853ec Author: Shayne Chen Date: Tue Jan 31 17:35:59 2023 +0800 wifi: mt76: add EHT phy type Extend phy type and phymode bitfields for EHT support. This is the preliminary patch to add EHT support for mt7996. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 01b7a2cab8053a32b9c715f6f53a5b072a3e5949 Author: Lorenzo Bianconi Date: Mon Jan 23 11:55:29 2023 +0100 wifi: mt76: remove __mt76_mcu_restart macro __mt76_mcu_restart is no longer used Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 25c8638071b61ff43bc982224b6435d25b874509 Author: Lorenzo Bianconi Date: Mon Jan 23 11:55:28 2023 +0100 wifi: mt76: mt7996: avoid mcu_restart function pointer Run mt7996_mcu_restart routine directly and avoid mcu_restart function pointer whenever it is possible. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit c7e1789ae7751add80895ce9c9aa790cb093734e Author: Lorenzo Bianconi Date: Wed Jan 18 17:30:40 2023 +0100 wifi: mt76: mt7996: rely on mt76_connac_tx_complete_skb Drop mt7996_tx_complete_skb routine since it is equivalent to mt76_connac_tx_complete_skb(). Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 30495864acff782145e3cc68d6b66c56414a7abe Author: Lorenzo Bianconi Date: Wed Jan 18 17:30:39 2023 +0100 wifi: mt76: mt7996: rely on mt76_connac_txp_skb_unmap Drop mt7996_txp_skb_unmap routine since it is equivalent to mt76_connac_txp_skb_unmap(). Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 3c38dfc1702d812f7c4a89ed5b0521e2ad8381d6 Author: Lorenzo Bianconi Date: Wed Jan 18 17:30:38 2023 +0100 wifi: mt76: mt7996: rely on mt76_connac_txp_common structure mt7996_txp structure is equal to mt76_connac_fw_txp one. Drop mt7996_txp and rely on mt76_connac_txp_common. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 0b8e2d69467f78a7c9d87b452220e87012435e33 Author: Lorenzo Bianconi Date: Tue Jan 17 01:16:07 2023 +0100 wifi: mt76: mt7996: rely on mt76_connac2_mac_tx_rate_val In order to fix a possible NULL pointer dereference in mt7996_mac_write_txwi() of vif pointer, export mt76_connac2_mac_tx_rate_val utility routine and reuse it in mt7996 driver. Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 888d89034f9eaeab9b5b75f13dbe35376c7dd471 Author: Aaron Ma Date: Mon Jan 16 23:22:35 2023 +0800 wifi: mt76: mt7921: fix error code of return in mt7921_acpi_read Kernel NULL pointer dereference when ACPI SAR table isn't implemented well. Fix the error code of return to mark the ACPI SAR table as invalid. [ 5.077128] mt7921e 0000:06:00.0: sar cnt = 0 [ 5.077381] BUG: kernel NULL pointer dereference, address: 0000000000000004 [ 5.077630] #PF: supervisor read access in kernel mode [ 5.077883] #PF: error_code(0x0000) - not-present page [ 5.078138] PGD 0 P4D 0 [ 5.078398] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 5.079202] RIP: 0010:mt7921_init_acpi_sar+0x106/0x220 [mt7921_common] ... [ 5.080786] Call Trace: [ 5.080786] [ 5.080786] mt7921_register_device+0x37d/0x490 [mt7921_common] [ 5.080786] mt7921_pci_probe.part.0+0x2ee/0x310 [mt7921e] [ 5.080786] mt7921_pci_probe+0x52/0x70 [mt7921e] [ 5.080786] local_pci_probe+0x47/0x90 [ 5.080786] pci_call_probe+0x55/0x190 [ 5.080786] pci_device_probe+0x84/0x120 Fixes: f965333e491e ("mt76: mt7921: introduce ACPI SAR support") Signed-off-by: Aaron Ma Signed-off-by: Felix Fietkau commit a97a467a4421babc218bd3546b093e4e84027487 Author: Sujuan Chen Date: Thu Jan 5 18:30:49 2023 +0100 wifi: mt76: mt7915: release rxwi in mt7915_wed_release_rx_buf Free rxwi cache releasing WED rx buffers in mt7915_wed_release_rx_buf routine Tested-by: Daniel Golle Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi Signed-off-by: Sujuan Chen Signed-off-by: Felix Fietkau commit 192ad4066065ef67cbcaae557e4412871fa8d369 Author: Lorenzo Bianconi Date: Tue Jan 17 14:53:17 2023 +0100 wifi: mt76: enable page_pool stats Enable page_pool ethtool statistics for mt7915 and mt7921 chipsets. Tested-by: Felix Fietkau Tested-by: Deren Wu Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 2f5c3c77fc9b6a34b68b97231bfa970e1194ec28 Author: Lorenzo Bianconi Date: Tue Jan 17 14:53:15 2023 +0100 wifi: mt76: switch to page_pool allocator In order to reduce possible memory allocation failures due to memory fragmentation caused by page_frag_cache allocator, switch to page_pool allocator for dma and usb mt76 drivers. Remove per rx-queue page_frag_cache Co-developed-by: Felix Fietkau Tested-by: Deren Wu Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 412d19b42042fb7e7148ee5293a7ce682a76a0f2 Author: Lorenzo Bianconi Date: Tue Jan 17 14:53:14 2023 +0100 wifi: mt76: mt7915: fix memory leak in mt7915_mmio_wed_init_rx_buf Free mt76_txwi_cache pointer in mt7915_mmio_wed_init_rx_buf routine in case of failure. Fixes: 4f831d18d12d ("wifi: mt76: mt7915: enable WED RX support") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit c222f77fd421bd1a44c395960867cd75273943f1 Author: Neil Chen Date: Tue Jan 17 17:30:59 2023 +0800 wifi: mt76: mt7921: fix rx filter incorrect by drv/fw inconsistent The rx filter, in mt7921 series, may be changed in fw operation. There is a racing problem if rx filter controlled by both driver and firmware at the same time. To avoid this issue, let mt7921 driver set rx filter by new command MCU_CE_CMD_SET_RX_FILTER and allow the firmware controlling it only. Reviewed-by: Lorenzo Bianconi Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Neil Chen Tested-by: AngeloGioacchino Del Regno Signed-off-by: Felix Fietkau commit 5f54237ad798f41cb6a503271aa9ca47188cfb9b Author: Deren Wu Date: Sun Jan 15 12:44:57 2023 +0800 wifi: mt76: add memory barrier to SDIO queue kick Ensure the entry has been fully updated before SDIO bus worker access it. This patch would fix potential memory risk in both mt7663s and mt7921s. Fixes: 764dee47e2c1 ("mt76: sdio: move common code in mt76_sdio module") Signed-off-by: Deren Wu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Felix Fietkau commit 09f4417a451be137a3e848b1888a1e32f8325046 Author: Deren Wu Date: Sat Jan 14 12:56:47 2023 +0800 wifi: mt76: mt7921: reduce polling time in pmctrl Due to the polling tick is 10ms, the wake up flow in the status waiting would cause more 10~20ms than the real HW response time. Reduce tick-interval from 10ms to 1ms to get better network performance, such as ping latency, in low power mode. Reviewed-by: Lorenzo Bianconi Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau commit 35effe6c0c24adcf0f732bb1c3d75573d4c88e63 Author: Deren Wu Date: Sat Jan 14 12:56:46 2023 +0800 wifi: mt76: add flexible polling wait-interval support The default waiting unit is 10ms and the value is too much for data path related control. Provide a new API mt76_poll_msec_tick() to support different cases, such as 1ms polling waiting kick. Reviewed-by: Lorenzo Bianconi Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau commit 0d7084e209a9e2c924cb0d6e7f1f978db2a54127 Author: Ryder Lee Date: Sat Jan 7 05:40:42 2023 +0800 wifi: mt76: mt7915: fix WED TxS reporting The previous commit forgot to remove a leftover check. Fixes: 43eaa3689507 ("wifi: mt76: add PPDU based TxS support for WED device") Reported-By: Sujuan Chen Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 7576a1c42d54086741ee5ece7b2f9ff9d55ca325 Author: Peter Chiu Date: Fri Jan 6 10:44:12 2023 +0800 wifi: mt76: mt7915: wed: enable red per-band token drop Enable RED to limit the number of token used by each band. If single band uses too many tokens, it would hurt the throughput of the other bands.The software path can solve this problem by AQL so enable RED for HW path only. Reviewed-by: Shayne Chen Signed-off-by: Peter Chiu Signed-off-by: Felix Fietkau commit 0ad6b97ee53abcc776040d730f38fe94afebebaf Author: Peter Chiu Date: Fri Jan 6 10:44:11 2023 +0800 wifi: mt76: mt7915: set sku initial value to zero Set sku initial value before mcu starts to prevent mcu from getting an invalid value. Signed-off-by: Peter Chiu Signed-off-by: Felix Fietkau commit e766b7fd41cad2074e43da2e88fc970a88d2c239 Author: Chuanhong Guo Date: Wed Jan 4 14:33:38 2023 +0800 wifi: mt76: mt7921u: add support for Comfast CF-952AX Comfast CF-952AX is a MT7921 based USB WiFi dongle with custom VID/PID. Add an entry for it. Signed-off-by: Chuanhong Guo Signed-off-by: Felix Fietkau commit aed8d9b506c22848add261ffad8fdabc57f21964 Author: Lorenzo Bianconi Date: Tue Jan 3 14:56:19 2023 +0100 wifi: mt76: fix switch default case in mt7996_reverse_frag0_hdr_trans The switch default case for frame_contorl is invalid. Return -EINVAL error for it. Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 2d5dce5a658a0c8bcd2837b7b5d3b2a973b4efb4 Author: Lorenzo Bianconi Date: Sun Jan 1 12:53:21 2023 +0100 wifi: mt76: mt7921: avoid mcu_restart function pointer Avoid mcu_restart function pointer whenever it is possible. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 8e4edae24962ec85b5f85fd218218ed9863e4c0d Author: Lorenzo Bianconi Date: Sun Jan 1 12:53:20 2023 +0100 wifi: mt76: mt7615: avoid mcu_restart function pointer Run mt7615_mcu_restart routine directly and avoid mcu_restart function pointer whenever it is possible. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit a71ace358c8fbeb26b7f1bd82b45902ead1d4628 Author: Lorenzo Bianconi Date: Sun Jan 1 12:53:19 2023 +0100 wifi: mt76: mt7603: avoid mcu_restart function pointer Run mt7603_mcu_restart routine directly and avoid mcu_restart function pointer whenever it is possible. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit f535ccdfc0a3cbb480f92b5d5a39055c11fe0e4e Author: Lorenzo Bianconi Date: Sun Jan 1 12:53:18 2023 +0100 wifi: mt76: mt7915: avoid mcu_restart function pointer Run mt76_connac_mcu_restart routine directly and avoid mcu_restart function pointer whenever it is possible. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 3f7dda36e0b6dfa2cd26191f754ba061ab8191f2 Author: Lorenzo Bianconi Date: Sun Jan 1 12:50:05 2023 +0100 wifi: mt76: dma: fix memory leak running mt76_dma_tx_cleanup Fix device unregister memory leak and alway cleanup all configured rx queues in mt76_dma_tx_cleanup routine. Fixes: 52546e27787e ("wifi: mt76: add WED RX support to dma queue alloc") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 1b88b47e898edef0e56e3a2f4e49f052a136153d Author: Lorenzo Bianconi Date: Sun Jan 1 12:47:57 2023 +0100 wifi: mt76: dma: free rx_head in mt76_dma_rx_cleanup Free rx_head skb in mt76_dma_rx_cleanup routine in order to avoid possible memory leak at module unload. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit da5b4d93e141b52c5a71d0c41a042d1bcaf70d2e Author: Lorenzo Bianconi Date: Sun Jan 1 12:43:52 2023 +0100 wifi: mt76: mt7996: fix memory leak in mt7996_mcu_exit Always purge mcu skb queues in mt7996_mcu_exit routine even if mt7996_firmware_state fails. Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 49bd78282e79ad177d14f37f4049f0605bf92dad Author: Lorenzo Bianconi Date: Sun Jan 1 12:42:04 2023 +0100 wifi: mt76: mt7915: fix memory leak in mt7915_mcu_exit Always purge mcu skb queues in mt7915_mcu_exit routine even if mt7915_firmware_state fails. Fixes: e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 58bcd4ed3d36d3b11c0a28d5ddf8add4cfde6a71 Author: Lorenzo Bianconi Date: Sun Jan 1 12:35:49 2023 +0100 wifi: mt76: introduce mt76_queue_is_wed_rx utility routine This patch does not change any logic, just improve code readability. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit c36457a8f34d1e0fc55fbbd7b8b2d716af3f6289 Author: Deren Wu Date: Sat Dec 31 17:01:10 2022 +0800 wifi: mt76: mt7921: fix invalid remain_on_channel duration round_jiffies_up() may change the duration reported from chip. We should take the real timeout for current channel privilege. Fixes: 034ae28b56f1 ("wifi: mt76: mt7921: introduce remain_on_channel support") Signed-off-by: Deren Wu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Felix Fietkau commit ac922bd60ace311232ab5f33ec295acf8e9952f1 Author: MeiChia Chiu Date: Wed Jan 4 17:03:52 2023 +0800 wifi: mt76: mt7915: remove BW160 and BW80+80 support Remove BW160 and BW80+80 capability in mt7915. Tested-by: AngeloGioacchino Del Regno Reviewed-by: Ryder Lee Reviewed-by: Shayne Chen Signed-off-by: Money Wang Signed-off-by: MeiChia Chiu Signed-off-by: Felix Fietkau commit 0d82fc956edb67b5755cc64ac6b9aee79cfbbff0 Author: Shayne Chen Date: Fri Dec 23 18:13:48 2022 +0800 wifi: mt76: connac: fix POWER_CTRL command name typo Fix typo MCU_UNI_CMD_POWER_CREL to MCU_UNI_CMD_POWER_CTRL. Fixes: 779d34de055e ("wifi: mt76: connac: add more unified command IDs") Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit c5139fc4cf8f06ec2bc4c1d8f92a29ec2937e750 Author: Shayne Chen Date: Fri Dec 23 18:13:47 2022 +0800 wifi: mt76: mt7996: do not hardcode vht beamform cap Use the sts variable when setting vht beamform sts cap. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 793445cf812506375cbe4c59d0fb9f648f716e88 Author: Shayne Chen Date: Fri Dec 23 18:13:46 2022 +0800 wifi: mt76: mt7996: update register for CFEND_RATE In newer chipsets, CFEND_RATE setting has been moved to different hw module. 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 eb1fdb9f5a2280de6820624cd02e0863babab683 Author: Shayne Chen Date: Fri Dec 23 18:13:45 2022 +0800 wifi: mt76: mt7996: fix chainmask calculation in mt7996_set_antenna() Fix per-band chainmask when restoring from the dev chainmask. 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 67fc7a304bf58447b621ebfee619119a3d6d9c09 Author: Deren Wu Date: Fri Dec 16 21:11:20 2022 +0800 wifi: mt76: mt7921: add ack signal support This reports signal strength of ACK packets from the peer as measured at each interface. Reviewed-by: Ryder Lee Signed-off-by: Deren Wu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Felix Fietkau commit 914189af23b83c9a83a0137a3a40f17de7d2c618 Author: Deren Wu Date: Fri Dec 16 19:04:38 2022 +0800 wifi: mt76: mt7921: fix channel switch fail in monitor mode When the chanctx enabled, IEEE80211_CONF_CHANGE_CHANNEL in .config() would not be called anymore. mt76 cannot control RF channel for monitor. Add monitor type set-channel flow in .change_chanctx(). Fixes: 41ac53c899bd ("wifi: mt76: mt7921: introduce chanctx support") Reviewed-by: Sean Wang Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau commit 3b2f02861f1d051f9db3b622b348c3c921c62275 Author: Shayne Chen Date: Fri Dec 16 12:05:31 2022 +0800 wifi: mt76: mt7915: add chip id condition in mt7915_check_eeprom() When flash mode is enabled, and the eeprom data in the flash is not for the current chipset, it'll still be checked valid, and the default eeprom bin won't be loaded. (e.g., mt7915 NIC inserted with mt7916 eeprom data in the flash.) Fix this kind of case by adding chip id into consideration in mt7915_check_eeprom(). Reported-by: Cheng-Ji Li Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 2f2d86309e228adfe658c9c0a23c726d8b3ce475 Author: Howard Hsu Date: Wed Dec 14 10:28:09 2022 +0800 wifi: mt76: mt7915: add error message in mt7915_thermal_set_cur_throttle_state() Add dev_err so that it is easier to see invalid setting while looking at dmesg. Co-developed-by: Ryder Lee Signed-off-by: Ryder Lee Signed-off-by: Howard Hsu Signed-off-by: Felix Fietkau commit ecaccdae7a7e8f76eeb6544295ca0593c2f65a33 Author: Howard Hsu Date: Wed Dec 14 10:28:08 2022 +0800 wifi: mt76: mt7915: rework mt7915_thermal_temp_store() Call mt7915_mcu_set_thermal_protect() through mt7915_thermal_temp_store() to update firmware trigger/restore temp directly. Fixes: 02ee68b95d81 ("mt76: mt7915: add control knobs for thermal throttling") Reviewed-by: Ryder Lee Signed-off-by: Howard Hsu Signed-off-by: Felix Fietkau commit 5ad42d19f6596e54b091827c397fdb7c091d45f7 Author: Howard Hsu Date: Wed Dec 14 10:28:07 2022 +0800 wifi: mt76: mt7915: rework mt7915_mcu_set_thermal_throttling This patch includes 2 changes: 1. Firmware expects to disable thermal protect first before reconfiguring. 2. Separate setting thermal_protect and setting thermal_tx_duty into different functions. These two firmware commands do not need to send together. Fixes: 34b877d972be ("mt76: mt7915: add thermal cooling device support") Reviewed-by: Ryder Lee Signed-off-by: Howard Hsu Signed-off-by: Felix Fietkau commit 7d12b38ab6f6b77198cd3a66db19587bbdd3308c Author: Howard Hsu Date: Wed Dec 14 10:28:06 2022 +0800 wifi: mt76: mt7915: call mt7915_mcu_set_thermal_throttling() only after init_work Enable thermal management by default shall not be executed during mcu init. This causes thermal configuration being reset to the firmware default settings. Fixes: 0063b86c9120 ("mt76: mt7915e: Enable thermal management by default") Reviewed-by: Ryder Lee Signed-off-by: Howard Hsu Signed-off-by: Felix Fietkau commit de19b9c83654e323d83f839a550ca4af37fea15b Author: Felix Fietkau Date: Wed Dec 21 11:47:47 2022 +0100 wifi: mt76: mt7921: fix deadlock in mt7921_abort_roc When mt7921_abort_roc is called with dev->mutex held, it can deadlock while calling cancel_work_sync(&phy->roc_work), because the work function could be waiting to acquire the mutex. Fix this by flushing the work before taking the mutex Reported-by: Mikhail Gavrilov Fixes: 034ae28b56f1 ("wifi: mt76: mt7921: introduce remain_on_channel support") Fixes: 41ac53c899bd ("wifi: mt76: mt7921: introduce chanctx support") Signed-off-by: Felix Fietkau commit ab8174bbc39669321b25a0fbeef630fdbe1b8ffe Author: ChiYuan Huang Date: Fri Jan 13 14:17:46 2023 +0800 Documentation: power: rt9471: Document exported sysfs entries Document the settings exported by rt9471 charger driver through sysfs entries: - sysoff_enable - port_detect_enable Signed-off-by: ChiYuan Huang [update kernel version and date] Signed-off-by: Sebastian Reichel commit 052bfe6ec72c8fd3d14968da36816f97772b5a54 Author: Jon Hunter Date: Wed Jan 11 11:04:46 2023 +0000 dt-bindings: phy: tegra-xusb: Add support for Tegra234 Add the compatible string for the Tegra234 XUSB PHY. Signed-off-by: Jon Hunter Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230111110450.24617-3-jonathanh@nvidia.com Signed-off-by: Vinod Koul commit 4a1a5f6781d8a25f5b1d421bdd4285ee3633b1fe Author: ChiYuan Huang Date: Fri Jan 13 14:17:45 2023 +0800 power: supply: rt9471: Add Richtek RT9471 charger driver Add support for the RT9471 3A 1-Cell Li+ battery charger. The RT9471 is a highly-integrated 3A switch mode battery charger with low impedance power path to better optimize the charging efficiency. Co-developed-by: Alina Yu Signed-off-by: Alina Yu Signed-off-by: ChiYuan Huang Signed-off-by: Sebastian Reichel commit 2bc68e5881a47437150da2edba07f79a71508cdd Author: ChiYuan Huang Date: Fri Jan 13 14:17:44 2023 +0800 dt-bindings: power: supply: Add Richtek RT9471 battery charger Add bindings for the Richtek RT9471 I2C controlled battery charger. Reviewed-by: Krzysztof Kozlowski Co-developed-by: Alina Yu Signed-off-by: Alina Yu Signed-off-by: ChiYuan Huang Signed-off-by: Sebastian Reichel commit 426082a214db267f44b3077c9e2cae9e1baaaa91 Merge: a64c36b8b75c0 6f42f5e73bb43 Author: Arnd Bergmann Date: Fri Feb 3 14:22:02 2023 +0100 Merge tag 'v6.2-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into soc/drivers Introduce MediaTek regulator coupler driver to ensure that the SRAM voltage in par with the GPU voltage. This allows for a stable use of the GPU. mtk-mutex: - add support for MT8188 vdosys0 path - allow it to be build as module - add support for MT8195 vdosys1 path mmsys: - add MT8188 vdosys0 path - allow to be build as a module - add MT8195 vdosys1 path - add support for CMDQ - allow for up to 64 reset bits - add supprot for the MT8195 vppsys[0,1] pathes pm-domains: - keep power for the MT8186 ADSP on by default - add support for MT8188 - add support for buck isolation needed in specific pm-domains for MT8188 and MT8192 mtk-svs: - enable IRQ later to allow using kexec - several improvments on the code base - fix modalias pmic wrapper: - convert binding to yaml. As this is thightly coupled to the MT6357 PMIC, I took patches regarding it as well. * tag 'v6.2-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: (41 commits) soc: mediatek: mtk-svs: add missing MODULE_DEVICE_TABLE soc: mediatek: mtk-devapc: Switch to devm_clk_get_enabled() soc: mtk-svs: mt8183: refactor o_slope calculation soc: mediatek: mtk-svs: delete superfluous platform data entries soc: mediatek: mtk-svs: move svs_platform_probe into probe soc: mediatek: mtk-svs: improve readability of platform_probe soc: mediatek: mtk-svs: clean up platform probing soc: mediatek: mtk-svs: keep svs alive if CONFIG_DEBUG_FS not supported soc: mediatek: mtk-svs: Use pm_runtime_resume_and_get() in svs_init01() soc: mediatek: mtk-svs: reset svs when svs_resume() fail soc: mediatek: mtk-svs: restore default voltages when svs_init02() fail soc: mediatek: mmsys: add support for MT8195 VPPSYS dt-bindings: arm: mediatek: mmsys: Add support for MT8195 VPPSYS soc: mediatek: Introduce mediatek-regulator-coupler driver soc: mediatek: mtk-svs: Enable the IRQ later soc: mediatek: add mtk-mutex support for mt8195 vdosys1 soc: mediatek: add mtk-mutex component - dp_intf1 soc: mediatek: mmsys: add reset control for MT8195 vdosys1 soc: mediatek: mmsys: add mmsys for support 64 reset bits soc: mediatek: add cmdq support of mtk-mmsys config API for mt8195 vdosys1 ... Link: https://lore.kernel.org/r/396d51fc-81f3-4a2b-d7a7-b966bfe3002a@gmail.com Signed-off-by: Arnd Bergmann commit 3e47c0dfc70725442a1c0e5767993a01fc9b80f1 Merge: df5bc88fa178f 5a7363821281f Author: Arnd Bergmann Date: Fri Feb 3 14:14:19 2023 +0100 Merge tag 'mvebu-dt64-6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/dt mvebu dt64 for 6.3 (part 1) Do not use anymore "marvell,armada3710" compatible string for the Armada 3720 boards. * tag 'mvebu-dt64-6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: arm64: dts: marvell: Fix compatible strings for Armada 3720 boards Link: https://lore.kernel.org/r/87zg9w9j6l.fsf@BL-laptop Signed-off-by: Arnd Bergmann commit df5bc88fa178f55d0df9dd88254dd454e99abb31 Merge: 34b84ce9c699e 12cb7a3349a53 Author: Arnd Bergmann Date: Fri Feb 3 14:13:47 2023 +0100 Merge tag 'mvebu-dt-6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/dt mvebu dt for 6.3 (part 1) Fix errors reported by dtbs_check on dove boards * tag 'mvebu-dt-6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: ARM: dts: dove.dtsi: Move ethphy to fix schema error Link: https://lore.kernel.org/r/87357oaxs0.fsf@BL-laptop Signed-off-by: Arnd Bergmann commit 34b84ce9c699e9b10e1b9b8e2dc85564c0b679a6 Merge: eacef7cc523a1 7e1790d26a92e Author: Arnd Bergmann Date: Fri Feb 3 14:12:04 2023 +0100 Merge tag 'stm32-dt-for-v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into arm/dt STM32 DT for v6.3, round 1 Highlights: ---------- - MPU: - ST boards: - Add following peripherals support on stm32mp13: i2s, SAI, SPDIFRX, DFSDM, Timers - Add timers support on stm32mp135f-dk board. - Add decicated BSEC compatible on STM32MP13. - Rename sound card on STM32MP15 DKx. - Fix yaml validation issues. * tag 'stm32-dt-for-v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: dts: stm32: fix compatible for BSEC on STM32MP13 ARM: dts: stm32: Update part number NVMEM description on stm32mp131 ARM: dts: stm32: Use new media bus type macros ARM: dts: stm32: Fix User button on stm32mp135f-dk ARM: dts: stm32: add timers support on stm32mp135f-dk ARM: dts: stm32: add timer pins muxing for stm32mp135f-dk ARM: dts: stm32: add timers support on stm32mp131 ARM: dts: stm32: add dfsdm node on stm32mp131 ARM: dts: stm32: add spdifrx node on stm32mp131 ARM: dts: stm32: add sai nodes on stm32mp131 ARM: dts: stm32: add i2s nodes on stm32mp131 ARM: dts: stm32: Remove the pins-are-numbered property ARM: dts: stm32: rename sound card on stm32mp15xx-dkx ARM: dts: stm32: remove sai kernel clock on stm32mp15xx-dkx ARM: dts: stm32: Fix qspi pinctrl phandle for stm32mp151a-prtt1l ARM: dts: stm32: Fix qspi pinctrl phandle for stm32mp157c-emstamp-argon ARM: dts: stm32: Fix qspi pinctrl phandle for stm32mp15xx-dhcom-som ARM: dts: stm32: Fix qspi pinctrl phandle for stm32mp15xx-dhcor-som Link: https://lore.kernel.org/r/3e815504-e85e-cbd3-6e6d-4e5a7aa7469a@foss.st.com Signed-off-by: Arnd Bergmann commit eacef7cc523a1ae10053dd82748c87c8c6a60f80 Merge: 84afaf4e378d9 0f48b0ed356d8 Author: Arnd Bergmann Date: Fri Feb 3 14:11:08 2023 +0100 Merge tag 'v6.3-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt Two new 32bit SoC were added, the rv1126 and rk3128. New boards are thr rk3128-eval-board, and a number of rv1126-based compute modules from Edgeble AI. Also included are some dt-binding improvements with relevant Acks from maintainers when the changes touch these areas. * tag 'v6.3-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: dt-bindings: phy: rename phy-rockchip-inno-usb2.yaml dt-bindings: soc: rockchip: grf: add rockchip,rk3288-dp-phy.yaml dt-bindings: phy: rockchip: convert rockchip-dp-phy.txt to yaml ARM: dts: rockchip: Enable Ethernet on rv1126 Neu2-IO ARM: dts: rockchip: Add Ethernet GMAC node for RV1126 ARM: dts: rockchip: Add ethernet rgmiim1 pin-control for rv1126 dt-bindings: arm: rockchip: Add Edgeble Neural Compute Module 6 ARM: dts: rockchip: add brcmf node to rk3066a-mk808 ARM: dts: rockchip: add space between label and nodename nfc pinctrl on rk3128 ARM: dts: rockchip: add rk3128-evb ARM: dts: rockchip: add rk3128 soc dtsi dt-bindings: arm: rockchip: Add Rockchip RK3128 Evaluation board ARM: dts: rockchip: Add Edgeble Neural Compute Module 2(Neu2) IO board ARM: dts: rockchip: Add Edgeble RV1126 Neural Compute Module 2(Neu2) dt-bindings: arm: rockchip: Add Edgeble Neural Compute Module 2 dt-bindings: vendor-prefixes: Add Edgeble AI Technologies Pvt. Ltd. ARM: dts: rockchip: Add Rockchip RV1126 SoC ARM: dts: rockchip: Add Rockchip RV1126 pinctrl dt-bindings: arm: rockchip: Add pmu compatible for rv1126 Link: https://lore.kernel.org/r/5651506.31r3eYUQgx@phil Signed-off-by: Arnd Bergmann commit 84afaf4e378d96fe7f3fa34e6dbf97f4b293a67a Merge: 79668653e7e0e ef9134d9bbce0 Author: Arnd Bergmann Date: Fri Feb 3 14:09:51 2023 +0100 Merge tag 'v6.3-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt New SoC supported is the rk3588. New boards rk3588-evb1, EmbedFire Lubancat 1+2 (based on different SoCs), a number of Radxa boards (rock-5a and -5b, compute module 3, cm3i e25), OrangePi R1 plus and the Edgeble Neu6 SoM and baseboard. A number of improvements for the Odroid Go (and its clones) including touchscreen and display support, led and audio changes. As well as some improvements for the rk356x, better gpu thermal values for px30 and some minor improvement for rock3a, rock5a, rk3566-demo, roc-rk3399-pc and bi-r2pro. * tag 'v6.3-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (46 commits) arm64: dts: rockchip: Correct the model name for Radxa E25 arm64: dts: rockchip: Drop unneeded model for Radxa CM3i arm64: dts: rockchip: Add missing CM3i fallback compatible for Radxa E25 arm64: dts: rockchip: Fix compatible for Radxa CM3 arm64: dts: rockchip: rk3566: Enable WiFi, BT support for Radxa CM3 arm64: dts: rockchip: Enable Ethernet for Radxa CM3 IO arm64: dts: rockchip: add display to RG503 arm64: dts: rockchip: add pinctrls for 16-bit/18-bit rgb interface to rk356x arm64: dts: rockchip: Update eMMC, SD aliases for Radxa SBC boards arm64: dts: rockchip: Update eMMC, SD aliases for Radxa SoM boards arm64: dts: rockchip: Add Radxa Compute Module 3 IO board arm64: dts: rockchip: Add rk3566 based Radxa Compute Module 3 dt-bindings: arm: rockchip: Add Radxa Compute Module 3 arm64: dts: rockchip: Fix RX delay for ethernet phy on rk3588s-rock5a arm64: dts: rockchip: add Hynitron cst340 for Anbernic 353 series arm64: dts: rockchip: Enable wifi module AP6398s for rk3566 box demo arm64: dts: rockchip: rk3588: Add Edgeble Neu6 Model A IO arm64: dts: rockchip: rk3588: Add Edgeble Neu6 Model A SoM arm64: dts: rockchip: fix hdmi cec on rock-3a arm64: dts: rockchip: assign rate to clk_rtc_32k on rk356x ... Link: https://lore.kernel.org/r/6491956.DvuYhMxLoT@phil Signed-off-by: Arnd Bergmann commit 79668653e7e0e4d0c4d11d62f177cc2a882412e1 Merge: 195631f73a694 6bbd1241700ac Author: Arnd Bergmann Date: Fri Feb 3 14:06:31 2023 +0100 Merge tag 'v6.2-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/dt mt7986: - add USB host support - add support for mmc, pcie - add support for Bananpi R3 mt8173: - switch to SMC watchdog for Acer Chromebook R13 - move panel under aux bus mt8183: - support detachable keyboards on kukui based Chromebooks - describe 13 MHz clock correctly - complete CPU cache information mt8186: - Add pm-domains, iommu, dsi - describe 13 MHz clock correctly - complete CPU cache information - add crypto support for the eMMC - add audio controler, DPI and ADSP mailbox support - describe CPUs as a single cluster mt8192: - describe 13 MHz clock correctly - complete CPU cache information - enable display regulators, backlight, internal display and audio on Acer Chromebook 514 - describe CPUs as a single cluster mt8195: - Add power domain to t-phy - describe 13 MHz clock correctly - complete CPU cache information - enable audio for Acer Chromebook Spin 513 - add ethernet support for the demo board - add JPG enconder and decoder device - describe CPUs as a single cluster Smaller changes for mt6795, mt7622, mt8516 and mt6358. * tag 'v6.2-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: (58 commits) arm64: dts: mediatek: mt8516: Fix the watchdog node name arm64: dts: mediatek: mt7986: Fix watchdog compatible arm64: dts: mediatek: mt8195: Fix watchdog compatible arm64: dts: mediatek: mt8186: Fix watchdog compatible arm64: dts: mt8173-elm: Switch to SMC watchdog arm64: dts: mediatek: mt7622: Add missing pwm-cells to pwm node arm64: dts: mt8192: Change idle states names to reflect actual function arm64: dts: mt8186: Change idle states names to reflect actual function arm64: dts: mt8195: Change idle states names to reflect actual function arm64: dts: mt8186: Fix CPU map for single-cluster SoC arm64: dts: mt8192: Fix CPU map for single-cluster SoC arm64: dts: mt8195: Fix CPU map for single-cluster SoC arm64: dts: mt8195: add jpeg decode device node arm64: dts: mt8195: add jpeg encode device node arm64: dts: mediatek: mt8183: drop double interrupts arm64: dts: mediatek: mt7622: drop serial clock-names arm64: dts: mt8195: Add efuse node to mt8195 arm64: dts: mt8183: jacuzzi: Move panel under aux-bus arm64: dts: mediatek: mt8173-elm: Move display to ps8640 auxiliary bus arm64: dts: mt8195: Add Ethernet controller ... Link: https://lore.kernel.org/r/2eefe6d4-6ca3-dc5f-6a04-f4f3c49692dd@gmail.com Signed-off-by: Arnd Bergmann commit 195631f73a694b0f051afdf93cbd00c32eb92f61 Merge: 61f1b48445a93 f104d74bbf485 Author: Arnd Bergmann Date: Fri Feb 3 14:05:50 2023 +0100 Merge tag 'v6.2-next-dts32' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/dt Clean ups only: - deleting unsused pins-are-numbered property - not existing second IRQ * tag 'v6.2-next-dts32' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: ARM: dts: mediatek: Remove pins-are-numbered property arm: dts: mt7629: Remove extra interrupt from timer node Link: https://lore.kernel.org/r/17aee808-1f3f-fe75-68d4-adb71915e5cb@gmail.com Signed-off-by: Arnd Bergmann commit 7f49b037397631dc5ec8f6eed67d218edf094fa2 Author: Sascha Hauer Date: Fri Feb 3 13:15:09 2023 +0100 drivers/perf: fsl_imx8_ddr_perf: Remove set-but-not-used variable active_events is set but not used, remove it. Signed-off-by: Sascha Hauer Link: https://lore.kernel.org/r/20230203121509.3580245-1-s.hauer@pengutronix.de Signed-off-by: Will Deacon commit 301cfbc1249759415ff864bdf46e15c7e103279b Author: Minghao Chi Date: Mon Sep 19 02:49:19 2022 +0000 power: supply: max1721x: Use strscpy() is more robust and safer The implementation of strscpy() is more robust and safer. That's now the recommended way to copy NUL terminated strings. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Signed-off-by: Sebastian Reichel commit 3639dbd74e2e827d544bdb28b663a44449c014e1 Author: Xu Panda Date: Fri Dec 23 10:42:35 2022 +0800 power: supply: test-power: use strscpy() 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: Sebastian Reichel commit e2b018cb55151cbee2c4b8f48ef731f0a683b9b6 Author: Sicelo A. Mhlongo Date: Mon Jan 2 11:13:26 2023 +0200 power: supply: bq27xxx: fix reporting critical level The EDV1/SOC1 flag is set when the battery voltage drops below the threshold set in EEPROM. From observing the capacity_level reported by the driver, and reading the datasheet, EDV1 remains set even when EDVF/SOCF gets set. Thus, bq27xxx_battery_capacity_level() never reaches the CAPACITY_LEVEL_CRITICAL code path, since CAPACITY_LEVEL_LOW takes precedence. This commit fixes the issue by swapping the order in which the flags are tested. It was tested with bq27200 in the Nokia N900. Signed-off-by: Sicelo A. Mhlongo Signed-off-by: Sebastian Reichel commit 4651b6b72934e602202def29c88813d95716f7c7 Author: Hermes Zhang Date: Tue Jan 10 10:47:46 2023 +0800 power: supply: bq256xx: Init ichg/vbat value with chip default value Init the ichg/vbat reg with chip default value instead of the max value used now. The max value set in driver will result an unsafe case (e.g. battery is over charging when in a hot environment) if no user space update the value later. Signed-off-by: Hermes Zhang Signed-off-by: Sebastian Reichel commit fccd2b763c3476d20c16e2e8534d345e5e013b4a Author: Andy Shevchenko Date: Thu Jan 12 16:02:09 2023 +0200 power: supply: collie_battery: Convert to GPIO descriptors (part 2) Finish the job started by the commit ba940ed83218 ("power: supply: collie_battery: Convert to GPIO descriptors"), i.e. convert the use of gpio_to_irq() to gpiod_to_irq(). No functional changes intended. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Sebastian Reichel commit c85c191694cb1cf290b11059b3d2de8a2732ffd0 Author: Andreas Kemnade Date: Sat Jan 21 12:16:21 2023 +0100 power: supply: remove faulty cooling logic The rn5t618 power driver fails to register a cooling device because POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT_MAX is missing but availability is not checked before registering cooling device. After improved error checking in the thermal code, the registration of the power supply fails entirely. Checking for availability of _MAX before registering cooling device fixes the rn5t618 problem. But the whole logic feels questionable. First, the logic is inverted here: the code tells: max_current = max_cooling but 0 = max_cooling, so there needs to be some inversion in the code which cannot be found. Comparing with other cooling devices, it can be found that value for fan speed is not inverted, value for cpufreq cooling is inverted (similar situation as here lowest frequency = max cooling) Second, analyzing usage of _MAX: it is seems that maximum capabilities of charging controller are specified and not of the battery. Probably there is not too much mismatch in the drivers actually implementing that. So nothing has exploded yet. So there is no easy and safe way to specifify a max cooling value now. Conclusion for now (as a regression fix) just remove the cooling device registration and do it properly later on. Fixes: e49a1e1ee078 ("thermal/core: fix error code in __thermal_cooling_device_register()") Fixes: 952aeeb3ee28 ("power_supply: Register power supply for thermal cooling device") Signed-off-by: Andreas Kemnade Signed-off-by: Sebastian Reichel commit f46bbb7f9eff7dc92013fe5eb29c2379a245069b Author: Patrick Delaunay Date: Thu Feb 2 14:00:40 2023 +0100 ARM: configs: multi_v7: enable NVMEM driver for STM32 Enable the STMicroelectronics NVMEM drivers used on STM32 MPU, STM32MP15x and STM32MP13x, to access OTPs. Signed-off-by: Patrick Delaunay Signed-off-by: Alexandre Torgue Link: https://lore.kernel.org/r/20230202130040.25233-1-alexandre.torgue@foss.st.com Signed-off-by: Arnd Bergmann commit e6333293f27cd395e77c6521afd52ff0bdc58107 Author: Pali Rohár Date: Mon Dec 26 12:45:12 2022 +0100 power: reset: syscon-reboot: Add support for specifying priority Read new optional device tree property priority for specifying priority level of reset handler. Default value is 192 as before. Signed-off-by: Pali Rohár Signed-off-by: Sebastian Reichel commit d7544cbe04e74e9dd33a94481ffe9b2e63222cd6 Author: Pali Rohár Date: Mon Dec 26 12:45:11 2022 +0100 dt-bindings: reset: syscon-reboot: Add priority property This new optional priority property allows to specify custom priority level of reset device. Prior this change priority level was hardcoded to 192 and not possible to specify or change. Specifying other value is needed for some boards. Default level when not specified stays at 192 as before. Signed-off-by: Pali Rohár Acked-by: Krzysztof Kozlowski [add $ref to existing allOf to fix duplication warning] Signed-off-by: Sebastian Reichel commit 96ebccb2356da5f28726746e53719c5f494e08a7 Author: Vijendar Mukunda Date: Wed Feb 1 22:26:25 2023 +0530 ASoC: amd: update ps platform acp header file Rename Audio buffer and soundwire manager instance registers. Remove scratch registers as these registers can be accessed using ACP_SCRATCH_REG_0 register relative offset. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20230201165626.3169041-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 1c9ded98bd4e5b87756423e0abededda6f4ba0b8 Author: Yang Li Date: Fri Feb 3 09:15:04 2023 +0800 ASoC: codecs: fix platform_no_drv_owner.cocci warning ./sound/soc/codecs/aw88395/aw88395.c:572: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=3935 Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20230203011504.78918-1-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown commit 480b26226873c88e482575ceb0d0a38d76e1be57 Author: Jerome Brunet Date: Thu Feb 2 19:36:46 2023 +0100 ASoC: dt-bindings: meson: fix gx-card codec node regex 'codec' is a valid node name when there is a single codec in the link. Fix the node regular expression to apply this. Fixes: fd00366b8e41 ("ASoC: meson: gx: add sound card dt-binding documentation") Signed-off-by: Jerome Brunet Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230202183653.486216-3-jbrunet@baylibre.com Signed-off-by: Mark Brown commit e398bbb9834a2f6cbe27cbd72956159ecc92055f Author: Jerome Brunet Date: Thu Feb 2 19:36:45 2023 +0100 ASoC: dt-bindings: create component common schema All DAIs are component but not all components are DAI. Move the component properties (sound-name-prefix ATM) to a separate schema file so it can be used by non-DAI components, such as auxiliary devices. Signed-off-by: Jerome Brunet Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230202183653.486216-2-jbrunet@baylibre.com Signed-off-by: Mark Brown commit c5a61db9bf897494fb0657eeb24dfdcb1aab1fc4 Author: Arnd Bergmann Date: Thu Feb 2 11:22:30 2023 +0100 ASoC: SOF: fix intel-soundwire link failure My randconfig build setup ran into a rare build failure with CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE=y CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE=m CONFIG_SOUNDWIRE=y CONFIG_SOUNDWIRE_INTEL=m CONFIG_SND_SOC_SOF_HDA=y CONFIG_SND_SOC_SOF_INTEL_TGL=y x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_init_caps': hda.c:(.text+0x691): undefined reference to `sdw_intel_cnl_hw_ops' x86_64-linux-ld: hda.c:(.text+0x6f2): undefined reference to `sdw_intel_probe' x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_sdw_startup': hda.c:(.text+0x1c40): undefined reference to `sdw_intel_startup' x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_sdw_process_wakeen': hda.c:(.text+0x1cb6): undefined reference to `sdw_intel_process_wakeen_event' x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_dsp_interrupt_thread': hda.c:(.text+0x1d67): undefined reference to `sdw_intel_thread' x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_dsp_remove': hda.c:(.text+0x2655): undefined reference to `sdw_intel_exit' My best understanding is that the definition of SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE was intended to avoid this problem, but got it wrong for the SND_SOC_SOF_INTEL_SOUNDWIRE=m case, where the 'select' is meant to set SOUNDWIRE_INTEL to the value of SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE rather than the intersection of SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE and SND_SOC_SOF_INTEL_SOUNDWIRE. Change the condition to check for SND_SOC_SOF_INTEL_SOUNDWIRE to be a boolean rather than a tristate expression in order to propagate this as intended. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230202102247.806749-1-arnd@kernel.org Signed-off-by: Mark Brown commit 66b9e94cb7783d3c632e2c1b436b26ece8c14e5d Author: Trevor Wu Date: Thu Feb 2 18:37:04 2023 +0800 ASoC: mediatek: mt8188: remove etdm dead code Some Smatch static checker warning like below was found. sound/soc/mediatek/mt8188/mt8188-dai-etdm.c:2487 mt8188_dai_etdm_parse_of() warn: 'ret' returned from snprintf() might be larger than 48 2479 for (i = 0; i < MT8188_AFE_IO_ETDM_NUM; i++) { 2480 dai_id = ETDM_TO_DAI_ID(i); 2481 etdm_data = afe_priv->dai_priv[dai_id]; 2482 2483 ret = snprintf(prop, sizeof(prop), 2484 "mediatek,%s-multi-pin-mode", 2485 of_afe_etdms[i].name); 2486 if (ret < 0) { --> 2487 dev_err(afe->dev, "%s snprintf err=%d\n", 2488 In linux kernel, snprintf() never returns negatives. On the other hand, the format string like "mediatek,%s-multi-pin-mode" must be smaller than sizeof(prop)=48. After discussing in the mail thread[1], I remove the dead code to fix the Smatch warnings. [1]: https://lore.kernel.org/all/Y9EdBg641tJDDrt%2F@kili/ Signed-off-by: Trevor Wu Link: https://lore.kernel.org/r/20230202103704.15626-1-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit 3937a76c64931109dfafa999a0c78b4df2a6e0a1 Author: Rander Wang Date: Thu Feb 2 15:29:54 2023 +0200 ASoC: SOF: ipc4-pcm: add delay function support The delay function is used to calculate the difference between hw_ptr and dai dma position. I2S, DMIC and SDW will use dai dma position in shared SRAM window to calculate the delay. HDaudio will retrieve dai dma position from host mmio memory space since it doesn't support LLP counter reported by firmware. In two cases dai dma position is inaccurate for delay calculation (1) dai pipeline is started before host pipeline (2) multiple streams mixed into one. Each stream has the same dai dma position Firmware calculates correct stream_start_offset for all cases including above two. Driver subtracts stream_start_offset from dai dma position to get accurate one. Signed-off-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230202132954.26773-10-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit faceb3445aaf1704583744b48c622dbc96ef9ab2 Author: Rander Wang Date: Thu Feb 2 15:29:53 2023 +0200 ASoC: SOF: Intel: mtl: add get_stream_position support Get HDaudio link position for current stream delay calculation from hda registers. Signed-off-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230202132954.26773-9-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 7f956297272bbc3535a02fa32579375a0d40283c Author: Rander Wang Date: Thu Feb 2 15:29:52 2023 +0200 ASoC: SOF: add get_stream_position ops for pcm delay PCM delay depends on stream position based on hardware counter to calculate stream delay so add this ops to get stream position according to hardware counter. Signed-off-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230202132954.26773-8-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 27c2100b6bc8b0b064f89250eb4081431299115f Author: Rander Wang Date: Thu Feb 2 15:29:51 2023 +0200 ASoC: SOF: add delay function support in sof framework Sof framework will call specific delay function for different IPC version. Signed-off-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230202132954.26773-7-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 7cb19007baba0c7a76bd3f8f324a6b6548025968 Author: Rander Wang Date: Thu Feb 2 15:29:50 2023 +0200 ASoC: SOF: ipc4-pcm: add hw_params Use the hw_params to init time info for ipc4 delay calculation. Signed-off-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230202132954.26773-6-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit af74dbd0dbcf49e8a3ae3e766683e13ecaf71e3b Author: Rander Wang Date: Thu Feb 2 15:29:49 2023 +0200 ASoC: SOF: ipc4-pcm: allocate time info for pcm delay feature Allocate time info when pcm is loaded by topology and free it when pcm is unloaded by topology. Signed-off-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230202132954.26773-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 65a8ef494aff8bceac9a952ae8f6a1681231aee5 Author: Rander Wang Date: Thu Feb 2 15:29:48 2023 +0200 ASoC: SOF: add time info structure for ipc4 path Start_stream_offset is used to strip invalid sample count in dai for some cases like dai is started before host. llp_offset is used to get current dai position from memory windows. Signed-off-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230202132954.26773-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 4700bfb2bb3acae63ff4cbf82fbde35a325ebdf2 Author: Rander Wang Date: Thu Feb 2 15:29:47 2023 +0200 ASoC: SOF: add fw_info_box support FW can share some information with host driver, .e.g fw status, pipeline status and volume status. On ipc4 platform it is located in memory windows 0 with size of struct sof_ipc4_fw_reg. With this patch, ipc4 driver can find fw information in fw_info_box Signed-off-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230202132954.26773-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 2740dcce918f385aea0fb0a026cc0b91629479af Author: Rander Wang Date: Thu Feb 2 15:29:46 2023 +0200 ASoC: SOF: add ipc4_fw_reg header file Ipc4_fw_reg defines the content of memory window 0 shared by fw. Host driver can get fw information by data structure defined in this file. Signed-off-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230202132954.26773-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 0c05e7bd2d017a3a9a0f4e9a19ad4acf1f616f12 Author: Song Liu Date: Wed Jan 25 10:54:01 2023 -0800 livepatch,x86: Clear relocation targets on a module removal Josh reported a bug: When the object to be patched is a module, and that module is rmmod'ed and reloaded, it fails to load with: module: x86/modules: Skipping invalid relocation target, existing value is nonzero for type 2, loc 00000000ba0302e9, val ffffffffa03e293c livepatch: failed to initialize patch 'livepatch_nfsd' for module 'nfsd' (-8) livepatch: patch 'livepatch_nfsd' failed for module 'nfsd', refusing to load module 'nfsd' The livepatch module has a relocation which references a symbol in the _previous_ loading of nfsd. When apply_relocate_add() tries to replace the old relocation with a new one, it sees that the previous one is nonzero and it errors out. He also proposed three different solutions. We could remove the error check in apply_relocate_add() introduced by commit eda9cec4c9a1 ("x86/module: Detect and skip invalid relocations"). However the check is useful for detecting corrupted modules. We could also deny the patched modules to be removed. If it proved to be a major drawback for users, we could still implement a different approach. The solution would also complicate the existing code a lot. We thus decided to reverse the relocation patching (clear all relocation targets on x86_64). The solution is not universal and is too much arch-specific, but it may prove to be simpler in the end. Reported-by: Josh Poimboeuf Originally-by: Miroslav Benes Signed-off-by: Song Liu Acked-by: Miroslav Benes Reviewed-by: Petr Mladek Acked-by: Josh Poimboeuf Reviewed-by: Joe Lawrence Tested-by: Joe Lawrence Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20230125185401.279042-2-song@kernel.org commit bbb93362a4452282ba51067dfb609476380518dc Author: Song Liu Date: Wed Jan 25 10:54:00 2023 -0800 x86/module: remove unused code in __apply_relocate_add This "#if 0" block has been untouched for many years. Remove it to clean up the code. Suggested-by: Josh Poimboeuf Signed-off-by: Song Liu Reviewed-by: Petr Mladek Acked-by: Josh Poimboeuf Reviewed-by: Joe Lawrence Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20230125185401.279042-1-song@kernel.org commit 9e6a1825aca8568f624abeeb047969c72aa4c183 Author: Eric Curtin Date: Wed Feb 1 12:42:58 2023 +0000 iommu: dart: DART_T8110_ERROR range should be 0 to 5 This was detected by smatch as one "else if" statement could never be reached. Confirmed bit order by comparing with python implementation [1]. drivers/iommu/apple-dart.c:991 apple_dart_t8110_irq() warn: duplicate check 'error_code == ((((1))) << (3))' (previous on line 989) Link: https://github.com/AsahiLinux/m1n1/commit/96b2d584feec1e3f7bfa [1] Fixes: d8bcc870d99d ("iommu: dart: Add t8110 DART support") Reported-by: Dan Carpenter Signed-off-by: Eric Curtin Reviewed-by: Sven Peter Link: https://lore.kernel.org/r/20230201124257.7801-1-ecurtin@redhat.com Signed-off-by: Joerg Roedel commit d8a7c0cf05a2ac79d3cbd0c0ed7d01ec01f75980 Author: Kan Liang Date: Tue Jan 31 15:37:40 2023 +0800 iommu/vt-d: Enable IOMMU perfmon support Register and enable an IOMMU perfmon for each active IOMMU device. The failure of IOMMU perfmon registration doesn't impact other functionalities of an IOMMU device. Signed-off-by: Kan Liang Link: https://lore.kernel.org/r/20230128200428.1459118-8-kan.liang@linux.intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 4a0d4265659b1078db3432cb80ceaf26ad921704 Author: Kan Liang Date: Tue Jan 31 15:37:39 2023 +0800 iommu/vt-d: Add IOMMU perfmon overflow handler support While enabled to count events and an event occurrence causes the counter value to increment and roll over to or past zero, this is termed a counter overflow. The overflow can trigger an interrupt. The IOMMU perfmon needs to handle the case properly. New HW IRQs are allocated for each IOMMU device for perfmon. The IRQ IDs are after the SVM range. In the overflow handler, the counter is not frozen. It's very unlikely that the same counter overflows again during the period. But it's possible that other counters overflow at the same time. Read the overflow register at the end of the handler and check whether there are more. Signed-off-by: Kan Liang Link: https://lore.kernel.org/r/20230128200428.1459118-7-kan.liang@linux.intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 46284c6ceb5e4dfddcb00dafb7c2f3c1437fdca4 Author: Kan Liang Date: Tue Jan 31 15:37:38 2023 +0800 iommu/vt-d: Support cpumask for IOMMU perfmon The perf subsystem assumes that all counters are by default per-CPU. So the user space tool reads a counter from each CPU. However, the IOMMU counters are system-wide and can be read from any CPU. Here we use a CPU mask to restrict counting to one CPU to handle the issue. (with CPU hotplug notifier to choose a different CPU if the chosen one is taken off-line). The CPU is exposed to /sys/bus/event_source/devices/dmar*/cpumask for the user space perf tool. Signed-off-by: Kan Liang Link: https://lore.kernel.org/r/20230128200428.1459118-6-kan.liang@linux.intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 7232ab8b89e9ea32f07370643635a13641ce9c3c Author: Kan Liang Date: Tue Jan 31 15:37:37 2023 +0800 iommu/vt-d: Add IOMMU perfmon support Implement the IOMMU performance monitor capability, which supports the collection of information about key events occurring during operation of the remapping hardware, to aid performance tuning and debug. The IOMMU perfmon support is implemented as part of the IOMMU driver and interfaces with the Linux perf subsystem. The IOMMU PMU has the following unique features compared with the other PMUs. - Support counting. Not support sampling. - Does not support per-thread counting. The scope is system-wide. - Support per-counter capability register. The event constraints can be enumerated. - The available event and event group can also be enumerated. - Extra Enhanced Commands are introduced to control the counters. Add a new variable, struct iommu_pmu *pmu, to in the struct intel_iommu to track the PMU related information. Add iommu_pmu_register() and iommu_pmu_unregister() to register and unregister a IOMMU PMU. The register function setup the IOMMU PMU ops and invoke the standard perf_pmu_register() interface to register a PMU in the perf subsystem. This patch only exposes the functions. The following patch will enable them in the IOMMU driver. The IOMMU PMUs can be found under /sys/bus/event_source/devices/dmar* The available filters and event format can be found at the format folder $ ls /sys/bus/event_source/devices/dmar1/format/ event event_group filter_ats filter_ats_en filter_page_table filter_page_table_en The supported events can be found at the events folder $ ls /sys/bus/event_source/devices/dmar1/events/ ats_blocked fs_nonleaf_hit int_cache_hit_posted iommu_mem_blocked iotlb_hit pasid_cache_lookup ss_nonleaf_hit ctxt_cache_hit fs_nonleaf_lookup int_cache_lookup iommu_mrds iotlb_lookup pg_req_posted ss_nonleaf_lookup ctxt_cache_lookup int_cache_hit_nonposted iommu_clocks iommu_requests pasid_cache_hit pw_occupancy The command below illustrates filter usage with a simple example. $ perf stat -e dmar1/iommu_requests,filter_ats_en=0x1,filter_ats=0x1/ -a sleep 1 Performance counter stats for 'system wide': 368,947 dmar1/iommu_requests,filter_ats_en=0x1,filter_ats=0x1/ 1.002592074 seconds time elapsed Signed-off-by: Kan Liang Link: https://lore.kernel.org/r/20230128200428.1459118-5-kan.liang@linux.intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit dc57875866ab9f6e0c366a6fd342217f71847b8b Author: Kan Liang Date: Tue Jan 31 15:37:36 2023 +0800 iommu/vt-d: Support Enhanced Command Interface The Enhanced Command Register is to submit command and operand of enhanced commands to DMA Remapping hardware. It can supports up to 256 enhanced commands. There is a HW register to indicate the availability of all 256 enhanced commands. Each bit stands for each command. But there isn't an existing interface to read/write all 256 bits. Introduce the u64 ecmdcap[4] to store the existence of each enhanced command. Read 4 times to get all of them in map_iommu(). Add a helper to facilitate an enhanced command launch. Make sure hardware complete the command. Also add a helper to facilitate the check of PMU essentials. These helpers will be used later. Signed-off-by: Kan Liang Link: https://lore.kernel.org/r/20230128200428.1459118-4-kan.liang@linux.intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit a6a5006dad572a53b5df3f47e1471d207ae9ba49 Author: Kan Liang Date: Tue Jan 31 15:37:35 2023 +0800 iommu/vt-d: Retrieve IOMMU perfmon capability information The performance monitoring infrastructure, perfmon, is to support collection of information about key events occurring during operation of the remapping hardware, to aid performance tuning and debug. Each remapping hardware unit has capability registers that indicate support for performance monitoring features and enumerate the capabilities. Add alloc_iommu_pmu() to retrieve IOMMU perfmon capability information for each iommu unit. The information is stored in the iommu->pmu data structure. Capability registers are read-only, so it's safe to prefetch and store them in the pmu structure. This could avoid unnecessary VMEXIT when this code is running in the virtualization environment. Add free_iommu_pmu() to free the saved capability information when freeing the iommu unit. Add a kernel config option for the IOMMU perfmon feature. Unless a user explicitly uses the perf tool to monitor the IOMMU perfmon event, there isn't any impact for the existing IOMMU. Enable it by default. Signed-off-by: Kan Liang Link: https://lore.kernel.org/r/20230128200428.1459118-3-kan.liang@linux.intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 4db96bfe9d7772d6ddedd62ce478895999043fd7 Author: Kan Liang Date: Tue Jan 31 15:37:34 2023 +0800 iommu/vt-d: Support size of the register set in DRHD A new field, which indicates the size of the remapping hardware register set for this remapping unit, is introduced in the DMA-remapping hardware unit definition (DRHD) structure with the VT-d Spec 4.0. With this information, SW doesn't need to 'guess' the size of the register set anymore. Update the struct acpi_dmar_hardware_unit to reflect the field. Store the size of the register set in struct dmar_drhd_unit for each dmar device. The 'size' information is ResvZ for the old BIOS and platforms. Fall back to the old guessing method. There is nothing changed. Signed-off-by: Kan Liang Link: https://lore.kernel.org/r/20230128200428.1459118-2-kan.liang@linux.intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit e06d24435596c8afcaa81c0c498f5b0ec4ee2b7c Author: Lu Baolu Date: Tue Jan 31 15:37:33 2023 +0800 iommu/vt-d: Set No Execute Enable bit in PASID table entry Setup No Execute Enable bit (Bit 133) of a scalable mode PASID entry. This is to allow the use of XD bit of the first level page table. Fixes: ddf09b6d43ec ("iommu/vt-d: Setup pasid entries for iova over first level") Signed-off-by: Ashok Raj Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20230126095438.354205-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit ec9ab12dee30d09bcffdd25943076611654316eb Author: Lu Baolu Date: Tue Jan 31 15:37:32 2023 +0800 iommu/vt-d: Remove sva from intel_svm_dev After commit be51b1d6bbff ("iommu/sva: Refactoring iommu_sva_bind/unbind_device()"), the iommu driver doesn't need to return an iommu_sva pointer anymore. This removes the sva field from intel_svm_dev and cleanups the code accordingly. Reviewed-by: Kevin Tian Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20230109014955.147068-5-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 49cab9d2b846bf69ef1164156ea2f4c7dec02f9f Author: Lu Baolu Date: Tue Jan 31 15:37:31 2023 +0800 iommu/vt-d: Remove users from intel_svm_dev It was used as a reference counter of an existing bond between device and user application memory address. Commit be51b1d6bbff ("iommu/sva: Refactoring iommu_sva_bind/unbind_device()") has added this in iommu core. Remove it to avoid duplicate code. Reviewed-by: Kevin Tian Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20230109014955.147068-4-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 557abbd60c1676cbde5326a17dd517ec48f80bb6 Author: Lu Baolu Date: Tue Jan 31 15:37:30 2023 +0800 iommu/vt-d: Remove unused fields in svm structures They aren't used anywhere. Remove them to avoid dead code. Reviewed-by: Kevin Tian Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20230109014955.147068-3-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit d82e6ae67ac2f9d6ba51690353c477b340bba6b5 Author: Lu Baolu Date: Tue Jan 31 15:37:29 2023 +0800 iommu/vt-d: Remove include/linux/intel-svm.h There's no need to have a public header for Intel SVA implementation. The device driver should interact with Intel SVA implementation via the IOMMU generic APIs. Reviewed-by: Kevin Tian Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20230109014955.147068-2-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit b6b26d86c61c441144c72f842f7469bb686e1211 Author: Gavrilov Ilia Date: Thu Feb 2 08:26:56 2023 +0000 iommu/amd: Add a length limitation for the ivrs_acpihid command-line parameter The 'acpiid' buffer in the parse_ivrs_acpihid function may overflow, because the string specifier in the format string sscanf() has no width limitation. Found by InfoTeCS on behalf of Linux Verification Center (linuxtesting.org) with SVACE. Fixes: ca3bf5d47cec ("iommu/amd: Introduces ivrs_acpihid kernel parameter") Cc: stable@vger.kernel.org Signed-off-by: Ilia.Gavrilov Reviewed-by: Kim Phillips Link: https://lore.kernel.org/r/20230202082719.1513849-1-Ilia.Gavrilov@infotecs.ru Signed-off-by: Joerg Roedel commit cc94cc1c341811baa6b507fc0d4f2f66eac6e0ab Merge: 05bd18348b889 41a435e30eb00 Author: Vinod Koul Date: Fri Feb 3 15:26:14 2023 +0530 Merge tag 'phy-devm_of_phy_optional_get' into next Merge tag phy-devm_of_phy_optional_get into next to bring in the new devm_of_phy_optional_get() API and users commit cf5c1c87c2391649e05e58ecc6dfc3dc5ebebc05 Author: Sven Peter Date: Sat Jan 28 12:35:32 2023 +0100 iommu/dart: Fix apple_dart_device_group for PCI groups pci_device_group() can return an already existing IOMMU group if the PCI device's pagetables have to be shared with another one due to bus toplogy, isolation features and/or DMA alias quirks. apple_dart_device_group() however assumes that the group has just been created and overwrites its iommudata which will eventually lead to apple_dart_release_group leaving stale entries in sid2group. Fix that by merging the iommudata if the returned group already exists. Fixes: f0b636804c7c ("iommu/dart: Clear sid2group entry when a group is freed") Signed-off-by: Sven Peter Reviewed-by: Eric Curtin Link: https://lore.kernel.org/r/20230128113532.94651-1-sven@svenpeter.dev Signed-off-by: Joerg Roedel commit 55bf243c514553e907efcf2bda92ba090eca8c64 Author: Greg Kroah-Hartman Date: Thu Feb 2 16:14:11 2023 +0100 kernel/printk/index.c: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Cc: Chris Down Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: John Ogness Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Reviewed-by: Sergey Senozhatsky Reviewed-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20230202151411.2308576-1-gregkh@linuxfoundation.org commit 189d496b48b1731f21f19ff3b7109ec724f5dcb2 Author: Marek Szyprowski Date: Mon Jan 23 10:31:01 2023 +0100 iommu/exynos: Add missing set_platform_dma_ops callback Add set_platform_dma_ops() required for proper driver operation on ARM 32bit arch after recent changes in the IOMMU framework (detach ops removal). Fixes: c1fe9119ee70 ("iommu: Add set_platform_dma_ops callbacks") Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20230123093102.12392-1-m.szyprowski@samsung.com Signed-off-by: Joerg Roedel commit 8065c0e13f9875f597920a2af47e5dc2940a9c4f Merge: 18390581d0d4d 4ac94f728a588 Author: David S. Miller Date: Fri Feb 3 09:34:51 2023 +0000 Merge branch 'yt8531-support' Frank Sae says: ==================== net: add dts for yt8521 and yt8531s, add driver for yt8531 Add dts for yt8521 and yt8531s, add driver for yt8531. These patches have been verified on our AM335x platform (motherboard) which has one integrated yt8521 and one RGMII interface. It can connect to daughter boards like yt8531s or yt8531 board. v5: - change the compatible of yaml - change the maintainers of yaml from "frank sae" to "Frank Sae" v4: - change default tx delay from 150ps to 1950ps - add compatible for yaml v3: - change default rx delay from 1900ps to 1950ps - moved ytphy_rgmii_clk_delay_config_with_lock from yt8521's patch to yt8531's patch - removed unnecessary checks of phydev->attached_dev->dev_addr v2: - split BIT macro as one patch - split "dts for yt8521/yt8531s ... " patch as two patches - use standard rx-internal-delay-ps and tx-internal-delay-ps, removed motorcomm,sds-tx-amplitude - removed ytphy_parse_dt, ytphy_probe_helper and ytphy_config_init_helper - not store dts arg to yt8521_priv ==================== Signed-off-by: David S. Miller commit 4ac94f728a588e7096dd5010cd7141a309ea7805 Author: Frank Sae Date: Thu Feb 2 11:00:37 2023 +0800 net: phy: Add driver for Motorcomm yt8531 gigabit ethernet phy Add a driver for the motorcomm yt8531 gigabit ethernet phy. We have verified the driver on AM335x platform with yt8531 board. On the board, yt8531 gigabit ethernet phy works in utp mode, RGMII interface, supports 1000M/100M/10M speeds, and wol(magic package). Signed-off-by: Frank Sae Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 36152f87dda4af221b16258751451d9cd3d0fb0b Author: Frank Sae Date: Thu Feb 2 11:00:36 2023 +0800 net: phy: Add dts support for Motorcomm yt8531s gigabit ethernet phy Add dts support for Motorcomm yt8531s gigabit ethernet phy. Change yt8521_probe to support clk config of yt8531s. Becase yt8521_probe does the things which yt8531s is needed, so removed yt8531s function. This patch has been verified on AM335x platform with yt8531s board. Signed-off-by: Frank Sae Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit a6e68f0f8769f79c67cdcfb6302feecd36197dec Author: Frank Sae Date: Thu Feb 2 11:00:35 2023 +0800 net: phy: Add dts support for Motorcomm yt8521 gigabit ethernet phy Add dts support for Motorcomm yt8521 gigabit ethernet phy. Add ytphy_rgmii_clk_delay_config function to support dst config for the delay of rgmii clk. This funciont is common for yt8521, yt8531s and yt8531. This patch has been verified on AM335x platform. Signed-off-by: Frank Sae Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 4869a146cd60fc8115230f0a45e15e534c531922 Author: Frank Sae Date: Thu Feb 2 11:00:34 2023 +0800 net: phy: Add BIT macro for Motorcomm yt8521/yt8531 gigabit ethernet phy Add BIT macro for Motorcomm yt8521/yt8531 gigabit ethernet phy. This is a preparatory patch. Add BIT macro for 0xA012 reg, and supplement for 0xA001 and 0xA003 reg. These will be used to support dts. Signed-off-by: Frank Sae Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit cf08dfe8ae7e32e33eb16e6001f45f940cecbfac Author: Frank Sae Date: Thu Feb 2 11:00:33 2023 +0800 dt-bindings: net: Add Motorcomm yt8xxx ethernet phy Add a YAML binding document for the Motorcomm yt8xxx Ethernet phy. Signed-off-by: Frank Sae Reviewed-by: Rob Herring Signed-off-by: David S. Miller commit 18390581d0d4da50eeaceee903b4965254dd5802 Merge: 942814840127a df25455e5a489 Author: David S. Miller Date: Fri Feb 3 09:31:25 2023 +0000 Merge branch 'act_ct-UDP-NEW' Vlad Buslov says: ==================== net: Allow offloading of UDP NEW connections via act_ct Currently only bidirectional established connections can be offloaded via act_ct. Such approach allows to hardcode a lot of assumptions into act_ct, flow_table and flow_offload intermediate layer codes. In order to enabled offloading of unidirectional UDP NEW connections start with incrementally changing the following assumptions: - Drivers assume that only established connections are offloaded and don't support updating existing connections. Extract ctinfo from meta action cookie and refuse offloading of new connections in the drivers. - Fix flow_table offload fixup algorithm to calculate flow timeout according to current connection state instead of hardcoded "established" value. - Add new flow_table flow flag that designates bidirectional connections instead of assuming it and hardcoding hardware offload of every flow in both directions. - Add new flow_table flow flag that designates connections that are offloaded to hardware as "established" instead of assuming it. This allows some optimizations in act_ct and prevents spamming the flow_table workqueue with redundant tasks. With all the necessary infrastructure in place modify act_ct to offload UDP NEW as unidirectional connection. Pass reply direction traffic to CT and promote connection to bidirectional when UDP connection state changes to "assured". Rely on refresh mechanism to propagate connection state change to supporting drivers. Note that early drop algorithm that is designed to free up some space in connection tracking table when it becomes full (by randomly deleting up to 5% of non-established connections) currently ignores connections marked as "offloaded". Now, with UDP NEW connections becoming "offloaded" it could allow malicious user to perform DoS attack by filling the table with non-droppable UDP NEW connections by sending just one packet in single direction. To prevent such scenario change early drop algorithm to also consider "offloaded" connections for deletion. ==================== Signed-off-by: David S. Miller commit df25455e5a489764508942b77b77de8f550e92cd Author: Vlad Buslov Date: Wed Feb 1 17:31:00 2023 +0100 netfilter: nf_conntrack: allow early drop of offloaded UDP conns Both synchronous early drop algorithm and asynchronous gc worker completely ignore connections with IPS_OFFLOAD_BIT status bit set. With new functionality that enabled UDP NEW connection offload in action CT malicious user can flood the conntrack table with offloaded UDP connections by just sending a single packet per 5tuple because such connections can no longer be deleted by early drop algorithm. To mitigate the issue allow both early drop and gc to consider offloaded UDP connections for deletion. Signed-off-by: Vlad Buslov Signed-off-by: David S. Miller commit 6a9bad0069cf306f3df6ac53cf02438d4e15f296 Author: Vlad Buslov Date: Wed Feb 1 17:30:59 2023 +0100 net/sched: act_ct: offload UDP NEW connections Modify the offload algorithm of UDP connections to the following: - Offload NEW connection as unidirectional. - When connection state changes to ESTABLISHED also update the hardware flow. However, in order to prevent act_ct from spamming offload add wq for every packet coming in reply direction in this state verify whether connection has already been updated to ESTABLISHED in the drivers. If that it the case, then skip flow_table and let conntrack handle such packets which will also allow conntrack to potentially promote the connection to ASSURED. - When connection state changes to ASSURED set the flow_table flow NF_FLOW_HW_BIDIRECTIONAL flag which will cause refresh mechanism to offload the reply direction. All other protocols have their offload algorithm preserved and are always offloaded as bidirectional. Note that this change tries to minimize the load on flow_table add workqueue. First, it tracks the last ctinfo that was offloaded by using new flow 'NF_FLOW_HW_ESTABLISHED' flag and doesn't schedule the refresh for reply direction packets when the offloads have already been updated with current ctinfo. Second, when 'add' task executes on workqueue it always update the offload with current flow state (by checking 'bidirectional' flow flag and obtaining actual ctinfo/cookie through meta action instead of caching any of these from the moment of scheduling the 'add' work) preventing the need from scheduling more updates if state changed concurrently while the 'add' work was pending on workqueue. Signed-off-by: Vlad Buslov Signed-off-by: David S. Miller commit d5774cb6c55c8721c2daf57cc5e5345e3af286ea Author: Vlad Buslov Date: Wed Feb 1 17:30:58 2023 +0100 net/sched: act_ct: set ctinfo in meta action depending on ct state Currently tcf_ct_flow_table_fill_actions() function assumes that only established connections can be offloaded and always sets ctinfo to either IP_CT_ESTABLISHED or IP_CT_ESTABLISHED_REPLY strictly based on direction without checking actual connection state. To enable UDP NEW connection offload set the ctinfo, metadata cookie and NF_FLOW_HW_ESTABLISHED flow_offload flags bit based on ct->status value. Signed-off-by: Vlad Buslov Signed-off-by: David S. Miller commit 1a441a9b8be8849957a01413a144f84932c324cb Author: Vlad Buslov Date: Wed Feb 1 17:30:57 2023 +0100 netfilter: flowtable: cache info of last offload Modify flow table offload to cache the last ct info status that was passed to the driver offload callbacks by extending enum nf_flow_flags with new "NF_FLOW_HW_ESTABLISHED" flag. Set the flag if ctinfo was 'established' during last act_ct meta actions fill call. This infrastructure change is necessary to optimize promoting of UDP connections from 'new' to 'established' in following patches in this series. Signed-off-by: Vlad Buslov Signed-off-by: David S. Miller commit 8f84780b84d645d6e35467f4a6f3236b20d7f4b2 Author: Vlad Buslov Date: Wed Feb 1 17:30:56 2023 +0100 netfilter: flowtable: allow unidirectional rules Modify flow table offload to support unidirectional connections by extending enum nf_flow_flags with new "NF_FLOW_HW_BIDIRECTIONAL" flag. Only offload reply direction when the flag is set. This infrastructure change is necessary to support offloading UDP NEW connections in original direction in following patches in series. Signed-off-by: Vlad Buslov Signed-off-by: David S. Miller commit 0eb5acb16418898c3d813e2c2d59a7ea7763a824 Author: Vlad Buslov Date: Wed Feb 1 17:30:55 2023 +0100 netfilter: flowtable: fixup UDP timeout depending on ct state Currently flow_offload_fixup_ct() function assumes that only replied UDP connections can be offloaded and hardcodes UDP_CT_REPLIED timeout value. To enable UDP NEW connection offload in following patches extract the actual connections state from ct->status and set the timeout according to it. Signed-off-by: Vlad Buslov Signed-off-by: David S. Miller commit 29744a10c59ede4f996c0c893127ac11bcc85c0c Author: Vlad Buslov Date: Wed Feb 1 17:30:54 2023 +0100 net: flow_offload: provision conntrack info in ct_metadata In order to offload connections in other states besides "established" the driver offload callbacks need to have access to connection conntrack info. Flow offload intermediate representation data structure already contains that data encoded in 'cookie' field, so just reuse it in the drivers. Reject offloading IP_CT_NEW connections for now by returning an error in relevant driver callbacks based on value of ctinfo. Support for offloading such connections will need to be added to the drivers afterwards. Signed-off-by: Vlad Buslov Signed-off-by: David S. Miller commit 7a88de319c8ef9a971e8b1c4004512e39b7680f2 Author: Hans de Goede Date: Fri Jan 27 21:37:29 2023 +0100 platform/x86: int3472/discrete: Get the polarity from the _DSM entry According to: https://github.com/intel/ipu6-drivers/blob/master/patch/int3472-support-independent-clock-and-LED-gpios-5.17%2B.patch Bits 31-24 of the _DSM pin entry integer value codes the active-value, that is the actual physical signal (0 or 1) which needs to be output on the pin to turn the sensor chip on (to make it active). So if bits 31-24 are 0 for a reset pin, then the actual value of the reset pin needs to be 0 to take the chip out of reset. IOW in this case the reset signal is active-high rather then the default active-low. And if bits 31-24 are 0 for a clk-en pin then the actual value of the clk pin needs to be 0 to enable the clk. So in this case the clk-en signal is active-low rather then the default active-high. IOW if bits 31-24 are 0 for a pin, then the default polarity of the pin is inverted. Add a check for this and also propagate this new polarity to the clock registration. Signed-off-by: Hans de Goede Reviewed-by: Sakari Ailus Link: https://lore.kernel.org/r/20230127203729.10205-6-hdegoede@redhat.com commit 8cf0e541c1fd76aa9ff1ac5e77ac2ea64220eca6 Author: Hans de Goede Date: Fri Jan 27 21:37:28 2023 +0100 platform/x86: int3472/discrete: Move GPIO request to skl_int3472_register_clock() Move the requesting of the clk-enable GPIO to skl_int3472_register_clock() (and move the gpiod_put to unregister). This mirrors the GPIO handling in skl_int3472_register_regulator() and allows removing skl_int3472_map_gpio_to_clk() from discrete.c. Signed-off-by: Hans de Goede Reviewed-by: Sakari Ailus Link: https://lore.kernel.org/r/20230127203729.10205-5-hdegoede@redhat.com commit 5ae20a8050d08a51fef9769cd53237551f259dbe Author: Hans de Goede Date: Fri Jan 27 21:37:27 2023 +0100 platform/x86: int3472/discrete: Create a LED class device for the privacy LED On some systems, e.g. the Lenovo ThinkPad X1 Yoga gen 7 and the ThinkPad X1 Nano gen 2 there is no clock-enable pin, triggering the: "No clk GPIO. The privacy LED won't work" warning and causing the privacy LED to not work. Fix this by modeling the privacy LED as a LED class device rather then integrating it with the registered clock. Note this relies on media subsys changes to actually turn the LED on/off when the sensor's v4l2_subdev's s_stream() operand gets called. Signed-off-by: Hans de Goede Reviewed-by: Sakari Ailus Link: https://lore.kernel.org/r/20230127203729.10205-4-hdegoede@redhat.com commit 9b1785a2e2af522c2a64034a8716b7d47375ffec Author: Hans de Goede Date: Fri Jan 27 21:37:26 2023 +0100 platform/x86: int3472/discrete: Refactor GPIO to sensor mapping Add a helper function to map the type returned by the _DSM method to a function name + the default polarity for that function. And fold the INT3472_GPIO_TYPE_RESET and INT3472_GPIO_TYPE_POWERDOWN cases into a single generic case. This is a preparation patch for further GPIO mapping changes. Signed-off-by: Hans de Goede Reviewed-by: Sakari Ailus Link: https://lore.kernel.org/r/20230127203729.10205-3-hdegoede@redhat.com commit b6e10ff6c23deb7f01d342875f7a69bae067c3c8 Author: Hans de Goede Date: Fri Jan 27 21:37:25 2023 +0100 media: v4l2-core: Make the v4l2-core code enable/disable the privacy LED if present Make v4l2_async_register_subdev_sensor() try to get a privacy LED associated with the sensor and extend the call_s_stream() wrapper to enable/disable the privacy LED if found. This makes the core handle privacy LED control, rather then having to duplicate this code in all the sensor drivers. Suggested-by: Sakari Ailus Acked-by: Linus Walleij Signed-off-by: Hans de Goede Acked-by: Sakari Ailus Link: https://lore.kernel.org/r/20230127203729.10205-2-hdegoede@redhat.com commit 942814840127a7d6307d0aaf087dbd3cfdeb2a2d Author: Horatiu Vultur Date: Thu Feb 2 15:53:37 2023 +0100 net: lan966x: Add VCAP debugFS support Enable debugfs for vcap for lan966x. This will allow to print all the entries in the VCAP and also the port information regarding which keys are configured. Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller commit 64e09d04b9562eb1cae8bd06afff0f73ae315102 Merge: 2798e36dc233a 04c77d9130b69 Author: David S. Miller Date: Fri Feb 3 09:19:41 2023 +0000 Merge branch 'rswitch-SERDES-PHY-init' Yoshihiro Shimoda says: ==================== net: renesas: rswitch: Modify initialization for SERDES and PHY - My platform has the 88x2110. - The MACTYPE setting of strap pin on the platform is SXGMII. - However, we realized that the SoC cannot communicate the PHY with SXGMII because of mismatching hardware specification. - We have a lot of boards which mismatch the MACTYPE setting. So, I would like to change the MACTYPE as SGMII by software for the platform. The patch [1/5] sets phydev->host_interfaces by phylink for Marvell PHY driver (marvell10g) to initialize the MACTYPE. - The patch [1/5] siplifies the rswitch driver. - The patch [2/5] converts to phy_device from phylink. - The patch [3/5] sets phydev->host_interfaces from this driver without any new functions of phylib. - The patch [4/5] adds phy_power_on() calling to initialize the Ethernet SERDES PHY driver (r8a779f0-eth-serdes) for each channel. - The patch [5/5] adds "max-speed" handling. Changes from v4: https://lore.kernel.org/all/20230127142621.1761278-1-yoshihiro.shimoda.uh@renesas.com/ - No modification of phylink API. - Convert to phylib instead of phylink. - Add "max-speed" handling. Changes from v3: https://lore.kernel.org/all/20230127014812.1656340-1-yoshihiro.shimoda.uh@renesas.com/ - Keep a pointer of "port" and more simplify the code. ==================== Signed-off-by: David S. Miller commit 04c77d9130b693e56a477364af1e1be4379b1b49 Author: Yoshihiro Shimoda Date: Wed Feb 1 22:14:54 2023 +0900 net: renesas: rswitch: Add "max-speed" handling The previous code set the speed by the interface mode of PHY. Also this hardware has a restriction which cannot change the speed at runtime. To use other speed, add "max-speed" handling to set each port's speed if needed. Signed-off-by: Yoshihiro Shimoda Signed-off-by: David S. Miller commit 5cb630925b49dd13bf3aa43f299b11615c8fe9cd Author: Yoshihiro Shimoda Date: Wed Feb 1 22:14:53 2023 +0900 net: renesas: rswitch: Add phy_power_{on,off}() calling Some Ethernet PHYs (like marvell10g) will decide the host interface mode by the media-side speed. So, the rswitch driver needs to initialize one of the Ethernet SERDES (r8a779f0-eth-serdes) ports after linked the Ethernet PHY up. The r8a779f0-eth-serdes driver has .init() for initializing all ports and .power_on() for initializing each port. So, add phy_power_{on,off} calling for it. Signed-off-by: Yoshihiro Shimoda Signed-off-by: David S. Miller commit 0df024d0f1d3e556e38e5418fc3577a2c7263764 Author: Yoshihiro Shimoda Date: Wed Feb 1 22:14:52 2023 +0900 net: renesas: rswitch: Add host_interfaces setting Set phydev->host_interfaces before calling of_phy_connect() to configure the PHY with the information of host_interfaces. Signed-off-by: Yoshihiro Shimoda Signed-off-by: David S. Miller commit c16a5033f77b9ee7e5317efe288e97159f32108b Author: Yoshihiro Shimoda Date: Wed Feb 1 22:14:51 2023 +0900 net: renesas: rswitch: Convert to phy_device Intended to set phy_device->host_interfaces by phylink in the future. But there is difficult to implement phylink properly, especially supporting the in-band mode on this driver because extra initialization is needed after linked the ethernet PHY up. So, convert to phy_device from phylink. Signed-off-by: Yoshihiro Shimoda Signed-off-by: David S. Miller commit b46f1e5793298c67efc2f1b917350a2cefacf9d6 Author: Yoshihiro Shimoda Date: Wed Feb 1 22:14:50 2023 +0900 net: renesas: rswitch: Simplify struct phy * handling Simplify struct phy *serdes handling by keeping the valiable in the struct rswitch_device. Signed-off-by: Yoshihiro Shimoda Signed-off-by: David S. Miller commit 0cb2a8f3456ff1cc51d571e287a48e8fddc98ec2 Author: Sergio Paracuellos Date: Sat Dec 31 08:40:41 2022 +0100 PCI: mt7621: Delay phy ports initialization Some devices like ZBT WE1326 and ZBT WF3526-P and some Netgear models need to delay phy port initialization after calling the mt7621_pcie_init_port() driver function to get into reliable boots for both warm and hard resets. The delay required to detect the ports seems to be in the range [75-100] milliseconds. If the ports are not detected the controller is not functional. There is no datasheet or something similar to really understand why this extra delay is needed only for these devices and it is not for most of the boards that are built on mt7621 SoC. This issue has been reported by openWRT community and the complete discussion is in [0]. The 100 milliseconds delay has been tested in all devices to validate it. Add the extra 100 milliseconds delay to fix the issue. [0]: https://github.com/openwrt/openwrt/pull/11220 Link: https://lore.kernel.org/r/20221231074041.264738-1-sergio.paracuellos@gmail.com Fixes: 2bdd5238e756 ("PCI: mt7621: Add MediaTek MT7621 PCIe host controller driver") Signed-off-by: Sergio Paracuellos Signed-off-by: Lorenzo Pieralisi commit 39f09320500c74a9777fc274d15acd3f0bac41ae Merge: 391bb17d71d7c abc3100fcba68 Author: Hans de Goede Date: Fri Feb 3 10:10:48 2023 +0100 Merge tag 'ib-leds-led_get-v6.3' into HEAD Immutable branch from LEDs due for the v6.3 merge window commit 391bb17d71d7c93987ccc55fa303127fe6cd6775 Author: Deepak R Varma Date: Sat Jan 28 01:35:56 2023 +0530 platform/x86: think-lmi: Use min_t() for comparison and assignment Simplify code by using min_t helper macro for logical evaluation and value assignment. Use the _t variant of min macro since the variable types are not same. This issue is identified by coccicheck using the minmax.cocci file. Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/Y9QupEMPFoZpWIiM@ubun2204.myguest.virtualbox.org Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit bdf2ffb6be35d1ae48cb4b7785a9f0427b601017 Author: Deepak R Varma Date: Fri Jan 27 22:01:49 2023 +0530 platform/x86: dell-smo8800: Use min_t() for comparison and assignment Simplify code by using min_t helper macro for logical evaluation and value assignment. Use the _t variant of min macro since the variable types are not same. This issue is identified by coccicheck using the minmax.cocci file. Signed-off-by: Deepak R Varma Acked-by: Pali Rohár Link: https://lore.kernel.org/r/Y9P8debIztOZXazW@ubun2204.myguest.virtualbox.org Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit cf2cc541423f51731c5844dddb0699e301616a86 Author: Armin Wolf Date: Thu Jan 26 20:40:20 2023 +0100 platform/x86: dell-ddv: Add "force" module param Until now, the dell-wmi-ddv driver needs to be manually patched and compiled to test compatibility with unknown DDV WMI interface versions. Add a module param to allow users to force loading even when a unknown interface version was detected. Since this might cause various unwanted side effects, the module param is marked as unsafe. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20230126194021.381092-5-W_Armin@gmx.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 8b52501c408b3ae5f2c5768a74e3db2fa83b4c52 Author: Armin Wolf Date: Thu Jan 26 20:40:19 2023 +0100 platform/x86: dell-ddv: Replace EIO with ENOMSG When the ACPI WMI interface returns a valid ACPI object which has the wrong type, then ENOMSG instead of EIO should be returned, since the WMI method was still successfully evaluated. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20230126194021.381092-4-W_Armin@gmx.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 36d44825faf42903a0b92dd49a9620e2cbdcbe18 Author: Armin Wolf Date: Thu Jan 26 20:40:18 2023 +0100 platform/x86: dell-ddv: Return error if buffer is empty In several cases, the DDV WMI interface can return buffers with a length of zero. Return -ENODATA in such a case for proper error handling. Also replace some -EIO errors with more specialized ones. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20230126194021.381092-3-W_Armin@gmx.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 3e899fec5dfce37701d49d656954a825275bf867 Author: Armin Wolf Date: Thu Jan 26 20:40:17 2023 +0100 platform/x86: dell-ddv: Add support for interface version 3 While trying to solve a bugreport on bugzilla, i learned that some devices (for example the Dell XPS 17 9710) provide a more recent DDV WMI interface (version 3). Since the new interface version just adds an additional method, no code changes are necessary apart from whitelisting the version. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20230126194021.381092-2-W_Armin@gmx.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit d1fcb7493fc36a192b19fb8b046c416d05b6d6fe Author: Srinivas Pandruvada Date: Tue Jan 17 14:40:34 2023 -0800 tools/power/x86/intel-speed-select: v1.14 release This release adds following change: - Minor fixes for coverity static analysis - Don't read cpufreq on offline CPUs - SST turbo-freq enable on auto mode when user disables SMT from kernel command line - Fix uncore frequency display - Set uncore frequency max/min limits on perf level change Signed-off-by: Srinivas Pandruvada Signed-off-by: Hans de Goede commit 2612ae596129ad9792b9cd5bf5937614edca185f Author: Srinivas Pandruvada Date: Tue Jan 17 14:34:27 2023 -0800 tools/power/x86/intel-speed-select: Adjust uncore max/min frequency When perf level is changed, uncore limits can change. Set the uncore limits via Linux uncore sysfs, when user changes perf level with -o option. Signed-off-by: Srinivas Pandruvada Signed-off-by: Hans de Goede commit 61f9fdcdcd01f9a996b6db4e7092fcdfe8414ad5 Author: Zhang Rui Date: Wed Aug 24 15:44:42 2022 +0800 tools/power/x86/intel-speed-select: Add Emerald Rapid quirk Need memory frequency quirk as Sapphire Rapids in Emerald Rapids. So add Emerald Rapids CPU model check in is_spr_platform(). Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: Subject, changelog and code edits] Signed-off-by: Srinivas Pandruvada Signed-off-by: Hans de Goede commit 0d5eea3527e4618ee32fce91a5d54638a7f8c411 Author: Srinivas Pandruvada Date: Fri Dec 9 11:23:02 2022 -0800 tools/power/x86/intel-speed-select: Fix display of uncore min frequency Uncore P1 is not uncore minmum frequency. This is uncore base frequency. Correct display from uncore-frequency-min(MHz) to uncore-frequency-base(Mhz). To get uncore min frequency use mailbox command CONFIG_TDP_GET_RATIO_INFO. Use this mailbox to get uncore frequency limits when present. Signed-off-by: Srinivas Pandruvada Signed-off-by: Hans de Goede commit 6ed9e363157cb858bdbb8c595f04839d3f245414 Author: Srinivas Pandruvada Date: Fri Jan 6 17:48:07 2023 -0800 tools/power/x86/intel-speed-select: turbo-freq auto mode with SMT off When SMT is disabled from kernel command line, sibling CPUs still appears in the sysfs as offline CPUs. This is a problem when turbo-freq is enabled in auto mode. They are still assigned to CLOS value of 3 as they are still in the present CPU list. But they are not in the sibling list of a CPU. When the CPU is a high priority CPU, because of sibling it will be still set to CLOS to 3 as CLOS is assigned at core level not at CPU level. So, avoid setting CLOS 3 to offline CPU. Signed-off-by: Srinivas Pandruvada Signed-off-by: Hans de Goede commit cf3b8e8f55e1a6c747e89599695fb8783c8a69c2 Author: Srinivas Pandruvada Date: Fri Jan 6 17:44:26 2023 -0800 tools/power/x86/intel-speed-select: cpufreq reads on offline CPUs Due to some recent kernel changes, reading cpufreq attributes like scaling_max_freq on offline CPUs returns error. So avoid reading cpufreq attributes on offline CPUs. Signed-off-by: Srinivas Pandruvada Signed-off-by: Hans de Goede commit 689dfc9e40036cb74f30c0700905b44b2c935846 Author: Zhang Rui Date: Thu Jan 12 14:43:37 2023 +0800 tools/power/x86/intel-speed-select: Use null-terminated string strlen() and strtok() takes null-termimated strings as input. Make sure these strings are null-terminated before using them. Signed-off-by: Zhang Rui Signed-off-by: Srinivas Pandruvada Signed-off-by: Hans de Goede commit 8a44d27542cd84352c69e37deaafb8b8976f21a0 Author: Zhang Rui Date: Thu Jan 12 14:43:36 2023 +0800 tools/power/x86/intel-speed-select: Remove duplicate dup() Remove the duplicate dup() invocation. Signed-off-by: Zhang Rui Signed-off-by: Srinivas Pandruvada Signed-off-by: Hans de Goede commit 364ba3b7115087ab8960473a94cedc7336f345e2 Author: Zhang Rui Date: Thu Jan 12 14:43:35 2023 +0800 tools/power/x86/intel-speed-select: Handle open() failure case Add handling for open() failure case to make sure a valid file descriptor is passed to dup(). Signed-off-by: Zhang Rui Signed-off-by: Srinivas Pandruvada Signed-off-by: Hans de Goede commit b8bebc8e58d5dc8f2c528b0be4e858959c48e340 Author: Zhang Rui Date: Thu Jan 12 14:43:34 2023 +0800 tools/power/x86/intel-speed-select: Remove unused non_block flag variable 'non_block' is always 0, thus remove the variable and the handling for "non_block != 0" case. Signed-off-by: Zhang Rui Signed-off-by: Srinivas Pandruvada Signed-off-by: Hans de Goede commit 507fa17a6c46c111f6b0d2bc483c1b3563fd16c5 Author: Zhang Rui Date: Thu Jan 12 14:43:33 2023 +0800 tools/power/x86/intel-speed-select: Remove wrong check in set_isst_id() struct isst_id *id is a pointer, comparing it with less than zero is wrong. The check is there to make sure the id->pkg and id->die is set to -1, when it is illegal or unavailable. Here comparing with MAX_PACKAGE_COUNT and MAX_DIE_PER_PACKAGE is sufficient. Hence remove the wrong check. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: Subject and changelog edits] Signed-off-by: Srinivas Pandruvada Signed-off-by: Hans de Goede commit 4f6dfc2136fb2e8dc3f571a5caff6b6e88281fc0 Author: Christoph Hellwig Date: Fri Jan 13 07:23:19 2023 +0100 usb: remove the dead USB_OHCI_SH option USB_OHCI_SH is a dummy option that never builds any code, remove it. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230113062339.1909087-3-hch@lst.de Signed-off-by: Greg Kroah-Hartman commit 6f4e10ffa8fbccf220f7c5c869e8373065b9ef7d Author: Krzysztof Kozlowski Date: Thu Feb 2 11:44:49 2023 +0100 dt-bindings: pinctrl: qcom: correct gpio-ranges in examples Correct the number of GPIOs in gpio-ranges to match reality. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230202104452.299048-8-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 174668bf5f6c2dd03441a4660e249cc5e2c78b95 Author: Krzysztof Kozlowski Date: Thu Feb 2 11:44:48 2023 +0100 dt-bindings: pinctrl: qcom,msm8994: correct number of GPIOs The MSM8994 TLMM pin controller has GPIOs 0-145, so narrow the pattern and reduce sizes of arrays with pins. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230202104452.299048-7-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 5c7069712c9be01d1bf9061a7ef5ce78df0af0a5 Author: Krzysztof Kozlowski Date: Thu Feb 2 11:44:47 2023 +0100 dt-bindings: pinctrl: qcom,sdx55: correct GPIO name pattern The SDX55 TLMM pin controller has GPIOs 0-107, so narrow the pattern. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230202104452.299048-6-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 913137a1cd1e792587e8ae2a43d31389fdbaddf6 Author: Krzysztof Kozlowski Date: Thu Feb 2 11:44:46 2023 +0100 dt-bindings: pinctrl: qcom,msm8953: correct GPIO name pattern The MSM8953 TLMM pin controller has GPIOs 0-141, so narrow the pattern. Acked-by: Rob Herring Reviewed-by: Luca Weiss Link: https://lore.kernel.org/r/20230202104452.299048-5-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit a51c1f0244c84e482f1ceb4701c38aaa4b224baf Author: Krzysztof Kozlowski Date: Thu Feb 2 11:44:45 2023 +0100 dt-bindings: pinctrl: qcom,sm6375: correct GPIO name pattern and example The SM6375 TLMM pin controller has GPIOs 0-155, so narrow the pattern and gpio-ranges in the example. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230202104452.299048-4-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 87b93dd1fbb23b9bbae461bb2c01f6d93c7524d9 Author: Krzysztof Kozlowski Date: Thu Feb 2 11:44:44 2023 +0100 dt-bindings: pinctrl: qcom,msm8909: correct GPIO name pattern and example The MSM8909 TLMM pin controller has GPIOs 0-112, so narrow the pattern and gpio-ranges in the example. Fixes: c249ec7ba1b1 ("dt-bindings: pinctrl: Add DT schema for qcom,msm8909-tlmm") Reviewed-by: Stephan Gerhold Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230202104452.299048-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 792349083a7307bf34de26516bc047cfd5c6296b Author: Krzysztof Kozlowski Date: Thu Feb 2 11:44:43 2023 +0100 dt-bindings: pinctrl: qcom,msm8226: correct GPIO name pattern The MSM8226 TLMM pin controller has GPIOs 0-116, so correct the pattern to bring back missing 107-109. Acked-by: Rob Herring Reviewed-by: Luca Weiss Link: https://lore.kernel.org/r/20230202104452.299048-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 91d04c759c85f1fc2d3ed7d1b5bc1a7dbab87f92 Author: Krzysztof Kozlowski Date: Wed Feb 1 16:43:21 2023 +0100 dt-bindings: pinctrl: qcom,sm8350: add input-disable The SM8350 HDK8350 board uses input-disable property, so allow it: sm8350-hdk.dtb: pinctrl@f100000: lt9611-state: 'oneOf' conditional failed, one must be fixed: ... 'input-disable' does not match any of the regexes: 'pinctrl-[0-9]+' Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230201154321.276419-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 21773790a77284777ab538203d1ba16a352b5909 Author: Kevin Hao Date: Sat Jan 28 14:49:16 2023 +0800 scripts/tags.sh: fix the Kconfig tags generation when using latest ctags The Kconfig language has already been built-in in the latest ctags, so it would error exit if we try to define it as an user-defined language via '--langdef=kconfig'. This results that there is no Kconfig tags in the final tag file. Fix this by skipping the user Kconfig definition for the latest ctags. Link: https://lkml.kernel.org/r/20230128064916.912744-1-haokexin@gmail.com Signed-off-by: Kevin Hao Reviewed-by: Cristian Ciocaltea Cc: Greg Kroah-Hartman Cc: Masahiro Yamada Cc: Nicolas Schier Cc: Paulo Miguel Almeida Cc: Vipin Sharma Signed-off-by: Andrew Morton commit 602ce7b8e1343b19c0cf93a3dd1926838ac5a1cc Author: Ryusuke Konishi Date: Fri Jan 27 22:22:02 2023 +0900 nilfs2: prevent WARNING in nilfs_dat_commit_end() If nilfs2 reads a corrupted disk image and its DAT metadata file contains invalid lifetime data for a virtual block number, a kernel warning can be generated by the WARN_ON check in nilfs_dat_commit_end() and can panic if the kernel is booted with panic_on_warn. This patch avoids the issue with a sanity check that treats it as an error. Since error return is not allowed in the execution phase of nilfs_dat_commit_end(), this inserts that sanity check in nilfs_dat_prepare_end(), which prepares for nilfs_dat_commit_end(). As the error code, -EINVAL is returned to notify bmap layer of the metadata corruption. When the bmap layer sees this code, it handles the abnormal situation and replaces the return code with -EIO as it should. Link: https://lkml.kernel.org/r/000000000000154d2c05e9ec7df6@google.com Link: https://lkml.kernel.org/r/20230127132202.6083-1-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Reported-by: Tested-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit e89bd9e7d8eb63a183040eaf0c9640fdb34ec47a Author: Tom Rix Date: Sat Jan 28 08:50:48 2023 -0800 lib/zlib: remove redundation assignement of avail_in dfltcc_gdht() cppcheck reports lib/zlib_dfltcc/dfltcc_deflate.c:65:21: warning: Redundant assignment of 'avail_in' to itself. [selfAssignment] size_t avail_in = avail_in = strm->avail_in; Only setting avail_in once is needed. Link: https://lkml.kernel.org/r/20230128165048.1245792-1-trix@redhat.com Fixes: aa5b395b69b6 ("lib/zlib: add s390 hardware support for kernel zlib_deflate") Signed-off-by: Tom Rix Acked-by: Ilya Leoshkevich Acked-by: Mikhail Zaslonko Signed-off-by: Andrew Morton commit cc6003916ed46d7a67d91ee32de0f9138047d55f Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Sat Jan 21 12:39:42 2023 +0900 lib/Kconfig.debug: do not enable DEBUG_PREEMPT by default In workloads where this_cpu operations are frequently performed, enabling DEBUG_PREEMPT may result in significant increase in runtime overhead due to frequent invocation of __this_cpu_preempt_check() function. This can be demonstrated through benchmarks such as hackbench where this configuration results in a 10% reduction in performance, primarily due to the added overhead within memcg charging path. Therefore, do not to enable DEBUG_PREEMPT by default and make users aware of its potential impact on performance in some workloads. hackbench-process-sockets debug_preempt no_debug_preempt Amean 1 0.4743 ( 0.00%) 0.4295 * 9.45%* Amean 4 1.4191 ( 0.00%) 1.2650 * 10.86%* Amean 7 2.2677 ( 0.00%) 2.0094 * 11.39%* Amean 12 3.6821 ( 0.00%) 3.2115 * 12.78%* Amean 21 6.6752 ( 0.00%) 5.7956 * 13.18%* Amean 30 9.6646 ( 0.00%) 8.5197 * 11.85%* Amean 48 15.3363 ( 0.00%) 13.5559 * 11.61%* Amean 79 24.8603 ( 0.00%) 22.0597 * 11.27%* Amean 96 30.1240 ( 0.00%) 26.8073 * 11.01%* Link: https://lkml.kernel.org/r/20230121033942.350387-1-42.hyeyoo@gmail.com Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: Roman Gushchin Acked-by: Mel Gorman Acked-by: Davidlohr Bueso Cc: Ben Segall Cc: Christoph Lameter Cc: Daniel Bristot de Oliveira Cc: David Rientjes Cc: Dennis Zhou Cc: Dietmar Eggemann Cc: Ingo Molnar Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Juri Lelli Cc: Matthew Wilcox Cc: Muchun Song Cc: Pekka Enberg Cc: Peter Zijlstra Cc: Shakeel Butt Cc: Steven Rostedt (Google) Cc: Tejun Heo Cc: Valentin Schneider Cc: Vincent Guittot Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit f65c35d3336ec8c7af6e12b7fd15acfb4b8e9ffa Author: Mikhail Zaslonko Date: Thu Jan 26 14:14:28 2023 +0100 lib/zlib: DFLTCC always switch to software inflate for Z_PACKET_FLUSH option Since hardware inflate does not support Z_PACKET_FLUSH option (used exclusively by kernel PPP driver), always switch to software like we already do for Z_BLOCK flush option. Without this patch, PPP might get Z_DATA_ERROR return code from zlib_inflate() and disable zlib compression for the packets. Link: https://lkml.kernel.org/r/20230126131428.1222214-9-zaslonko@linux.ibm.com Signed-off-by: Mikhail Zaslonko Acked-by: Ilya Leoshkevich Cc: Heiko Carstens Cc: Vasily Gorbik Signed-off-by: Andrew Morton commit 9010dbc007b853ed55905e40fa8e9d39fcb75935 Author: Mikhail Zaslonko Date: Thu Jan 26 14:14:27 2023 +0100 lib/zlib: DFLTCC support inflate with small window There is no hardware control for DFLTCC window size. After this change, software and hardware window formats no longer match: the software will use wbits and wsize, and the hardware will use HB_BITS and HB_SIZE. Since neither dictionary manipulation nor internal allocation functions are relevant to kernel zlib and zlib_inflate_workspacesize() always use MAX_WBITS for window size calculation, only dfltcc_can_inflate() and dfltcc_inflate() functions are affected by this patch. This commit is based on: https://github.com/zlib-ng/zlib-ng/commit/3eab317 Link: https://lkml.kernel.org/r/20230126131428.1222214-8-zaslonko@linux.ibm.com Signed-off-by: Mikhail Zaslonko Acked-by: Ilya Leoshkevich Cc: Heiko Carstens Cc: Vasily Gorbik Signed-off-by: Andrew Morton commit 9fec9f8ea51c782d58a8b86f8e868fc06c782386 Author: Mikhail Zaslonko Date: Thu Jan 26 14:14:26 2023 +0100 lib/zlib: Split deflate and inflate states for DFLTCC Currently deflate and inflate both use a common state struct. There are several variables in this struct that we don't need for inflate, and more may be coming in the future. Therefore split them in two separate structs. Apart from that, introduce separate headers for dfltcc_deflate and dfltcc_inflate. This commit is based on: https://github.com/zlib-ng/zlib-ng/commit/c592b1b Link: https://lkml.kernel.org/r/20230126131428.1222214-7-zaslonko@linux.ibm.com Signed-off-by: Mikhail Zaslonko Acked-by: Ilya Leoshkevich Cc: Heiko Carstens Cc: Vasily Gorbik Signed-off-by: Andrew Morton commit cbf125408d1ca141cc1c3f8376e091e3cdde2cb2 Author: Mikhail Zaslonko Date: Thu Jan 26 14:14:25 2023 +0100 lib/zlib: DFLTCC not writing header bits when avail_out == 0 This commit is based on: https://github.com/zlib-ng/zlib-ng/commit/ce409c6 Link: https://lkml.kernel.org/r/20230126131428.1222214-6-zaslonko@linux.ibm.com Signed-off-by: Mikhail Zaslonko Acked-by: Ilya Leoshkevich Cc: Heiko Carstens Cc: Vasily Gorbik Signed-off-by: Andrew Morton commit 0dbae46550363c88cf073aafc0e0b244b9f43555 Author: Mikhail Zaslonko Date: Thu Jan 26 14:14:24 2023 +0100 lib/zlib: fix DFLTCC ignoring flush modes when avail_in == 0 This commit is based on: https://github.com/zlib-ng/zlib-ng/commit/40acb3f Link: https://lkml.kernel.org/r/20230126131428.1222214-5-zaslonko@linux.ibm.com Signed-off-by: Mikhail Zaslonko Acked-by: Ilya Leoshkevich Cc: Heiko Carstens Cc: Vasily Gorbik Signed-off-by: Andrew Morton commit 195c5ad9d179dbea1c9026f2af5b3eb77f8205b3 Author: Mikhail Zaslonko Date: Thu Jan 26 14:14:23 2023 +0100 lib/zlib: fix DFLTCC not flushing EOBS when creating raw streams This commit is based on: https://github.com/zlib-ng/zlib-ng/commit/ca99a88 Link: https://lkml.kernel.org/r/20230126131428.1222214-4-zaslonko@linux.ibm.com Signed-off-by: Mikhail Zaslonko Acked-by: Ilya Leoshkevich Cc: Heiko Carstens Cc: Vasily Gorbik Signed-off-by: Andrew Morton commit 9a549338260ac6eaa495095d4c237aee09aa5a99 Author: Mikhail Zaslonko Date: Thu Jan 26 14:14:22 2023 +0100 lib/zlib: implement switching between DFLTCC and software This commit is based on: https://github.com/zlib-ng/zlib-ng/commit/fc04275 Link: https://lkml.kernel.org/r/20230126131428.1222214-3-zaslonko@linux.ibm.com Signed-off-by: Mikhail Zaslonko Acked-by: Ilya Leoshkevich Cc: Heiko Carstens Cc: Vasily Gorbik Signed-off-by: Andrew Morton commit 4cc06c9afbb4dbed007f06450127ab745d6dc450 Author: Mikhail Zaslonko Date: Thu Jan 26 14:14:21 2023 +0100 lib/zlib: adjust offset calculation for dfltcc_state Patch series "lib/zlib: Set of s390 DFLTCC related patches for kernel zlib". Patches 1-7 represent a set of s390 zlib hardware support (DFLTCC) related fixes and enhancements integrated from zlib-ng repo relevant to kernel zlib (https://github.com/zlib-ng/zlib-ng). Since the official zlib repository never got DFLTCC support code merged, all the patches have been picked from zlib-ng fork (zlib data compression library for the next generation systems). This repo contains new optimizations and fixes not getting implemented into the official zlib repository and falls under the same zlib License. All of the original patches from zlib-ng were authored by Ilya Leoshkevich . Coding style has been preserved for future maintainability. Patches 1-2 should have no effect for the kernel zlib but make the code closer to zlib-ng for future maintainability. Only Patch 3 touches common zlib_deflate code, other patches are relevant to s390 tree only. Patch 8 is separate and intends to resolve an issue with kernel PPP driver which can use kernel zlib for packet compression. Without this patch PPP decompression can fail due to error code returned by hardware (dfltcc_inflate) and PPP disables zlib compression for further packets. This patch (of 8): This commit is based on: https://github.com/zlib-ng/zlib-ng/commit/d8b67f5 Link: https://lkml.kernel.org/r/20230126131428.1222214-1-zaslonko@linux.ibm.com Link: https://lkml.kernel.org/r/20230126131428.1222214-2-zaslonko@linux.ibm.com Signed-off-by: Mikhail Zaslonko Acked-by: Ilya Leoshkevich Cc: Heiko Carstens (s390) Cc: Vasily Gorbik Signed-off-by: Andrew Morton commit 5124a0a549857c4b87173280e192eea24dea72ad Author: Ryusuke Konishi Date: Fri Jan 27 01:41:14 2023 +0900 nilfs2: replace WARN_ONs for invalid DAT metadata block requests If DAT metadata file block access fails due to corruption of the DAT file or abnormal virtual block numbers held by b-trees or inodes, a kernel warning is generated. This replaces the WARN_ONs by error output, so that a kernel, booted with panic_on_warn, does not panic. This patch also replaces the detected return code -ENOENT with another internal code -EINVAL to notify the bmap layer of metadata corruption. When the bmap layer sees -EINVAL, it handles the abnormal situation with nilfs_bmap_convert_error() and finally returns code -EIO as it should. Link: https://lkml.kernel.org/r/0000000000005cc3d205ea23ddcf@google.com Link: https://lkml.kernel.org/r/20230126164114.6911-1-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Reported-by: Tested-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 1b381f6fe495fffbbdace1ee530afb74287c809d Author: Luca Ceresoli Date: Thu Jan 26 16:22:05 2023 +0100 scripts/spelling.txt: add "exsits" pattern and fix typo instances Fix typos and add the following to the scripts/spelling.txt: exsits||exists Link: https://lkml.kernel.org/r/20230126152205.959277-1-luca.ceresoli@bootlin.com Signed-off-by: Luca Ceresoli Signed-off-by: Andrew Morton commit bf470202dd9f9f5a29dab007fd2cd6c671aecbed Author: Jan Kara Date: Thu Jan 26 09:51:55 2023 +0100 fs: gracefully handle ->get_block not mapping bh in __mpage_writepage When filesystem's ->get_block function does not map the buffer head when called from __mpage_writepage(), __mpage_writepage() will happily go and pass bogus bdev and block number to bio allocation routines which leads to crashes sooner or later. E.g. UDF can do this because it doesn't want to allocate blocks from ->writepages callbacks. It allocates blocks on write or page fault but writeback can still spot dirty buffers without underlying blocks allocated e.g. if blocksize < pagesize, the tail page is dirtied (which means all its buffers are dirtied), and truncate extends the file so that some buffer starts to be within i_size. Link: https://lkml.kernel.org/r/20230126085155.26395-1-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit a1f46ff2ff88ab8cec64953422f207a81ff379f8 Author: Randy Dunlap Date: Tue Jan 24 10:16:31 2023 -0800 cramfs: Kconfig: fix spelling & punctuation Fix spelling and hyphenation in cramfs Kconfig. Link: https://lkml.kernel.org/r/20230124181631.15204-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Acked-by: Nicolas Pitre Signed-off-by: Andrew Morton commit 362173572a4018e9c8e39c616823189c41d39d41 Author: Joe Perches Date: Tue Jan 24 15:16:55 2023 -0800 checkpatch: improve EMBEDDED_FILENAME test Privately, Heinz Mauelshagen showed that the embedded filename test is not specific enough. > WARNING: It's generally not useful to have the filename in the file > #113: FILE: errors.c:113: > + block < registered_errors.blocks + registered_errors.count; Extend the test to use the appropriate word boundary tests. Link: https://lkml.kernel.org/r/36069dac5d07509dab1c7f1238f8cbb08db80ac6.camel@perches.com Signed-off-by: Joe Perches Reported-by: Heinz Mauelshagen Signed-off-by: Andrew Morton commit 3ee2a3e7c1ca3b263c41cff81619ab1d200fadfb Author: Uros Bizjak Date: Wed Nov 2 08:11:47 2022 +0100 fs/ext4: use try_cmpxchg in ext4_update_bh_state Use try_cmpxchg instead of cmpxchg (*ptr, old, new) == old in ext4_update_bh_state. 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/20221102071147.6642-1-ubizjak@gmail.com Signed-off-by: Uros Bizjak Cc: "Theodore Ts'o" Cc: Andreas Dilger Signed-off-by: Andrew Morton commit 74b7046d329770ea9dd105ca321ad6abb91bdbbb Author: Alexander Potapenko Date: Mon Nov 21 12:21:34 2022 +0100 fs: hfsplus: initialize fsdata in hfsplus_file_truncate() When aops->write_begin() does not initialize fsdata, KMSAN may report an error passing the latter to aops->write_end(). Fix this by unconditionally initializing fsdata. Link: https://lkml.kernel.org/r/20221121112134.407362-5-glider@google.com Signed-off-by: Alexander Potapenko Suggested-by: Eric Biggers Cc: Andreas Dilger Cc: Chao Yu Cc: Jaegeuk Kim Cc: Theodore Ts'o Signed-off-by: Andrew Morton commit e52a418d81fb3c9db187ca9aa519c534b30962a8 Author: Alexander Potapenko Date: Mon Nov 21 12:21:33 2022 +0100 fs: hfs: initialize fsdata in hfs_file_truncate() When aops->write_begin() does not initialize fsdata, KMSAN may report an error passing the latter to aops->write_end(). Fix this by unconditionally initializing fsdata. Link: https://lkml.kernel.org/r/20221121112134.407362-4-glider@google.com Signed-off-by: Alexander Potapenko Suggested-by: Eric Biggers Cc: Andreas Dilger Cc: Chao Yu Cc: Jaegeuk Kim Cc: Theodore Ts'o Signed-off-by: Andrew Morton commit e5576ac8c972a1884950420c3931ddebd018ee9e Author: Diederik de Haas Date: Sun Jan 22 18:32:56 2023 +0100 scripts/spelling.txt: add more spelling corrections Current Debian lintian tool flagged several (more) spelling errors, so add them so they can hopefully be prevented in the future. Link: https://lkml.kernel.org/r/20230122173256.52280-1-didi.debian@cknow.org Signed-off-by: Diederik de Haas Reviewed-by: Randy Dunlap Acked-by: Ian Rogers Cc: Colin Ian King Signed-off-by: Andrew Morton commit 1916f77729b714452bf52efcfd9d87087c7d762e Author: Thorsten Leemhuis Date: Fri Jan 20 13:35:20 2023 +0100 checkpatch: use proper way for show problematic line Instead of using an unnecessarily complicated approach to print a line that is warned about, use `$herecurr` instead, just like everywhere else in checkpatch. While at it, remove a superfluous space in one of the changed lines, too. In a unmodified line also remove a superfluous check for a space before a signed-off-by tag, to me consistent with the check at the start of the section. All three problems were found by Joe Perches during review of new code inspired by the code modified here. Link: https://lkml.kernel.org/r/a6d455c5196219b2095c2ac3645498052845f32e.1674217480.git.linux@leemhuis.info Signed-off-by: Thorsten Leemhuis Cc: Andy Whitcroft Cc: Dwaipayan Ray Cc: Joe Perches Cc: Kai Wasserbäch Cc: Lukas Bulwahn Signed-off-by: Andrew Morton commit d7f1d71e5ef630ab9e15b5821d297a9e1a5fa1da Author: Kai Wasserbäch Date: Fri Jan 20 13:35:19 2023 +0100 checkpatch: warn when Reported-by: is not followed by Link: Encourage patch authors to link to reports by issuing a warning, if a Reported-by: is not accompanied by a link to the report. Those links are often extremely useful for any code archaeologist that wants to know more about the backstory of a change than the commit message provides. That includes maintainers higher up in the patch-flow hierarchy, which is why Linus asks developers to add such links [1, 2, 3]. To quote [1]: > Again, the commit has a link to the patch *submission*, which is > almost entirely useless. There's no link to the actual problem the > patch fixes. > > [...] > > Put another way: I can see that > > Reported-by: Zhangfei Gao > > in the commit, but I don't have a clue what the actual report was, and > there really isn't enough information in the commit itself, except for > a fairly handwavy "Device drivers might, for instance, still need to > flush operations.." > > I don't want to know what device drivers _might_ do. I would want to > have an actual pointer to what they do and where. Another reason why these links are wanted: the ongoing regression tracking efforts can only scale with them, as they allow the regression tracking bot 'regzbot' to automatically connect tracked reports with patches that are posted or committed to fix tracked regressions. Link: https://lore.kernel.org/all/CAHk-=wjMmSZzMJ3Xnskdg4+GGz=5p5p+GSYyFBTh0f-DgvdBWg@mail.gmail.com/ [1] Link: https://lore.kernel.org/all/CAHk-=wgs38ZrfPvy=nOwVkVzjpM3VFU1zobP37Fwd_h9iAD5JQ@mail.gmail.com/ [2] Link: https://lore.kernel.org/all/CAHk-=wjxzafG-=J8oT30s7upn4RhBs6TX-uVFZ5rME+L5_DoJA@mail.gmail.com/ [3] Link: https://lkml.kernel.org/r/bb5dfd55ea2026303ab2296f4a6df3da7dd64006.1674217480.git.linux@leemhuis.info Signed-off-by: Kai Wasserbäch Co-developed-by: Thorsten Leemhuis Signed-off-by: Thorsten Leemhuis Cc: Andy Whitcroft Cc: Dwaipayan Ray Cc: Joe Perches Cc: Lukas Bulwahn Signed-off-by: Andrew Morton commit 76f381bb77a0164267d059dd17112605242b2c56 Author: Kai Wasserbäch Date: Fri Jan 20 13:35:18 2023 +0100 checkpatch: warn when unknown tags are used for links Patch series "checkpatch.pl: warn about discouraged tags and missing Link: tags", v4. The first two changes make checkpatch.pl check for a few mistakes wrt to links to bug reports Linus recently complained about a few times. Avoiding those is also important for my regression tracking efforts a lot, as the automated tracking performed by regzbot relies on the proper usage of the Link: tag. The third patch fixes a few small oddities noticed in existing code during review of the two changes. This patch (of 3): Issue a warning when encountering URLs behind unknown tags, as Linus recently stated ```please stop making up random tags that make no sense. Just use "Link:"```[1]. That statement was triggered by an use of 'BugLink', but that's not the only tag people invented: $ git log -100000 --no-merges --format=email -P \ --grep='^\w+:[ ]*http' | grep -Poh '^\w+:[ ]*http' | \ sort | uniq -c | sort -rn | head -n 20 103958 Link: http 418 BugLink: http 372 Patchwork: http 280 Closes: http 224 Bug: http 123 References: http 84 Bugzilla: http 61 URL: http 42 v1: http 38 Datasheet: http 20 v2: http 9 Ref: http 9 Fixes: http 9 Buglink: http 8 v3: http 8 Reference: http 7 See: http 6 1: http 5 link: http 3 Link:http Some of these non-standard tags make it harder for external tools that rely on use of proper tags. One of those tools is the regression tracking bot 'regzbot', which looks out for "Link:" tags pointing to reports of tracked regressions. The initial idea was to use a disallow list to raise an error when encountering known unwanted tags like BugLink:; during review it was requested to use a list of allowed tags instead[2]. Link: https://lkml.kernel.org/r/cover.1674217480.git.linux@leemhuis.info Link: https://lore.kernel.org/all/CAHk-=wgs38ZrfPvy=nOwVkVzjpM3VFU1zobP37Fwd_h9iAD5JQ@mail.gmail.com/ [1] Link: https://lore.kernel.org/all/15f7df96d49082fb7799dda6e187b33c84f38831.camel@perches.com/ [2] Link: https://lkml.kernel.org/r/3b036087d80b8c0e07a46a1dbaaf4ad0d018f8d5.1674217480.git.linux@leemhuis.info Signed-off-by: Kai Wasserbäch Co-developed-by: Thorsten Leemhuis Signed-off-by: Thorsten Leemhuis Cc: Andy Whitcroft Cc: Dwaipayan Ray Cc: Joe Perches Cc: Lukas Bulwahn Signed-off-by: Andrew Morton commit 030c6ff6498881ac842c7f6da5eec181202b29f4 Author: Uros Bizjak Date: Wed Jan 18 16:07:03 2023 +0100 lib/genalloc: use try_cmpxchg in {set,clear}_bits_ll Use try_cmpxchg instead of cmpxchg (*ptr, old, new) == old in {set,clear}_bits_ll. 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. Note that the value from *ptr should be read using READ_ONCE to prevent the compiler from merging, refetching or reordering the read. The patch also declares these two functions inline, to ensure inlining. No functional change intended. Link: https://lkml.kernel.org/r/20230118150703.4024-1-ubizjak@gmail.com Signed-off-by: Uros Bizjak Signed-off-by: Andrew Morton commit f3296f80c8065b26a27eb8ab686d0c1d67880524 Author: Christophe JAILLET Date: Sat Jan 14 18:21:38 2023 +0100 initramfs: use kstrtobool() instead of strtobool() strtobool() is the same as kstrtobool(). However, the latter is more used within the kernel. In order to remove strtobool() and slightly simplify kstrtox.h, switch to the other function name. While at it, include the corresponding header file () Link: https://lkml.kernel.org/r/2597e80cb7059ec6ad63a01b77d7c944dcc99195.1673716768.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Cc: Christian Brauner Cc: David Disseldorp Cc: "Eric W. Biederman" Cc: Martin Wilck Cc: wuchi Cc: XU pengfei Signed-off-by: Andrew Morton commit a42aaad2e47b23d63037bfc0130e33fc0f74cd71 Author: Ricardo Ribalda Date: Wed Jan 4 15:38:48 2023 +0100 kexec: introduce sysctl parameters kexec_load_limit_* kexec allows replacing the current kernel with a different one. This is usually a source of concerns for sysadmins that want to harden a system. Linux already provides a way to disable loading new kexec kernel via kexec_load_disabled, but that control is very coard, it is all or nothing and does not make distinction between a panic kexec and a normal kexec. This patch introduces new sysctl parameters, with finer tuning to specify how many times a kexec kernel can be loaded. The sysadmin can set different limits for kexec panic and kexec reboot kernels. The value can be modified at runtime via sysctl, but only with a stricter value. With these new parameters on place, a system with loadpin and verity enabled, using the following kernel parameters: sysctl.kexec_load_limit_reboot=0 sysct.kexec_load_limit_panic=1 can have a good warranty that if initrd tries to load a panic kernel, a malitious user will have small chances to replace that kernel with a different one, even if they can trigger timeouts on the disk where the panic kernel lives. Link: https://lkml.kernel.org/r/20221114-disable-kexec-reset-v6-3-6a8531a09b9a@chromium.org Signed-off-by: Ricardo Ribalda Reviewed-by: Steven Rostedt (Google) Acked-by: Baoquan He Cc: Bagas Sanjaya Cc: "Eric W. Biederman" Cc: Guilherme G. Piccoli # Steam Deck Cc: Joel Fernandes (Google) Cc: Jonathan Corbet Cc: Philipp Rudo Cc: Ross Zwisler Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton commit 7e99f8b69c11c104933b9bc8fda226ebfb8aaaa5 Author: Ricardo Ribalda Date: Wed Jan 4 15:38:47 2023 +0100 kexec: factor out kexec_load_permitted Both syscalls (kexec and kexec_file) do the same check, let's factor it out. Link: https://lkml.kernel.org/r/20221114-disable-kexec-reset-v6-2-6a8531a09b9a@chromium.org Signed-off-by: Ricardo Ribalda Reviewed-by: Steven Rostedt (Google) Acked-by: Baoquan He Cc: Bagas Sanjaya Cc: "Eric W. Biederman" Cc: Guilherme G. Piccoli Cc: Joel Fernandes (Google) Cc: Jonathan Corbet Cc: Philipp Rudo Cc: Ross Zwisler Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton commit 06dcb0138f5f815f50142234b2e06f5540471715 Author: Ricardo Ribalda Date: Wed Jan 4 15:38:46 2023 +0100 Documentation: sysctl: correct kexec_load_disabled Patch series "kexec: Add new parameter to limit the access to kexec", v6. Add two parameter to specify how many times a kexec kernel can be loaded. These parameter allow hardening the system. While we are at it, fix a documentation issue and refactor some code. This patch (of 3): kexec_load_disabled affects both ``kexec_load`` and ``kexec_file_load`` syscalls. Make it explicit. Link: https://lkml.kernel.org/r/20221114-disable-kexec-reset-v6-0-6a8531a09b9a@chromium.org Link: https://lkml.kernel.org/r/20221114-disable-kexec-reset-v6-1-6a8531a09b9a@chromium.org Signed-off-by: Ricardo Ribalda Reviewed-by: Steven Rostedt (Google) Acked-by: Baoquan He Cc: Bagas Sanjaya Cc: "Eric W. Biederman" Cc: Guilherme G. Piccoli Cc: Joel Fernandes (Google) Cc: Jonathan Corbet Cc: Philipp Rudo Cc: Ross Zwisler Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton commit 227849a33a8ba2ee6fdff0a0a724b2af1c3b344c Author: Pali Rohár Date: Mon Dec 26 15:25:12 2022 +0100 fat: fix return value of vfat_bad_char() and vfat_replace_char() functions These functions returns boolean value not wide character. Link: https://lkml.kernel.org/r/20221226142512.13848-1-pali@kernel.org Signed-off-by: Pali Rohár Acked-by: OGAWA Hirofumi Signed-off-by: Andrew Morton commit e227db4d4f125efb1cae2f1337da85bc10b3185e Author: Randy Dunlap Date: Sat Jan 7 18:12:43 2023 -0800 userns: fix a struct's kernel-doc notation Use the 'struct' keyword for a struct's kernel-doc notation to avoid a kernel-doc warning: kernel/user_namespace.c:232: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * idmap_key struct holds the information necessary to find an idmapping in a Link: https://lkml.kernel.org/r/20230108021243.16683-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Cc: Eric Biederman Signed-off-by: Andrew Morton commit aa0b42b7b4b54f0341a1ef5c44360e0e386951f1 Author: Randy Dunlap Date: Sun Jan 8 17:00:41 2023 -0800 ntfs: fix multiple kernel-doc warnings Fix many W=1 kernel-doc warnings in fs/ntfs/: fs/ntfs/aops.c:30: warning: Incorrect use of kernel-doc format: * ntfs_end_buffer_async_read - async io completion for reading attributes fs/ntfs/aops.c:46: warning: expecting prototype for aops.c(). Prototype was for ntfs_end_buffer_async_read() instead fs/ntfs/aops.c:1655: warning: cannot understand function prototype: 'const struct address_space_operations ntfs_normal_aops = ' fs/ntfs/aops.c:1670: warning: cannot understand function prototype: 'const struct address_space_operations ntfs_compressed_aops = ' fs/ntfs/aops.c:1685: warning: cannot understand function prototype: 'const struct address_space_operations ntfs_mst_aops = ' fs/ntfs/compress.c:22: warning: Incorrect use of kernel-doc format: * ntfs_compression_constants - enum of constants used in the compression code fs/ntfs/compress.c:24: warning: cannot understand function prototype: 'typedef enum ' fs/ntfs/compress.c:47: warning: cannot understand function prototype: 'u8 *ntfs_compression_buffer; ' fs/ntfs/compress.c:52: warning: expecting prototype for ntfs_cb_lock(). Prototype was for DEFINE_SPINLOCK() instead fs/ntfs/dir.c:21: warning: Incorrect use of kernel-doc format: * The little endian Unicode string $I30 as a global constant. fs/ntfs/dir.c:23: warning: cannot understand function prototype: 'ntfschar I30[5] = ' fs/ntfs/inode.c:31: warning: Incorrect use of kernel-doc format: * ntfs_test_inode - compare two (possibly fake) inodes for equality fs/ntfs/inode.c:47: warning: expecting prototype for inode.c(). Prototype was for ntfs_test_inode() instead fs/ntfs/inode.c:2956: warning: expecting prototype for ntfs_write_inode(). Prototype was for __ntfs_write_inode() instead fs/ntfs/mft.c:24: warning: expecting prototype for mft.c - NTFS kernel mft record operations. Part of the Linux(). Prototype was for MAX_BHS() instead fs/ntfs/namei.c:263: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Inode operations for directories. fs/ntfs/namei.c:368: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Export operations allowing NFS exporting of mounted NTFS partitions. fs/ntfs/runlist.c:16: warning: Incorrect use of kernel-doc format: * ntfs_rl_mm - runlist memmove fs/ntfs/runlist.c:22: warning: expecting prototype for runlist.c - NTFS runlist handling code. Part of the Linux(). Prototype was for ntfs_rl_mm() instead fs/ntfs/super.c:61: warning: missing initial short description on line: * simple_getbool - fs/ntfs/super.c:2661: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * The complete super operations. Link: https://lkml.kernel.org/r/20230109010041.21442-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Cc: Anton Altaparmakov Signed-off-by: Andrew Morton commit d3fcf834b248b94e0d5b849b25dbb53debe1b5dd Author: Randy Dunlap Date: Sun Jan 8 18:29:15 2023 -0800 freevxfs: fix kernel-doc warnings Fix multiple kernel-doc warnings in freevxfs: fs/freevxfs/vxfs_subr.c:45: warning: Function parameter or member 'mapping' not described in 'vxfs_get_page' fs/freevxfs/vxfs_subr.c:45: warning: Excess function parameter 'ip' description in 'vxfs_get_page' 2 warnings fs/freevxfs/vxfs_subr.c:101: warning: expecting prototype for vxfs_get_block(). Prototype was for vxfs_getblk() instead fs/freevxfs/vxfs_super.c:184: warning: expecting prototype for vxfs_read_super(). Prototype was for vxfs_fill_super() instead Link: https://lkml.kernel.org/r/20230109022915.17504-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Reviewed-by: Christoph Hellwig Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton commit 0371ba6f2327ad63ff559244a9693fcdbfed1388 Author: Alexander Pantyukhin Date: Fri Jan 6 14:13:19 2023 +0500 scripts/bloat-o-meter: use the reverse flag for sort The sort function has the inbuilt reversal option. We can use it to save some time. Link: https://lkml.kernel.org/r/20230106091319.3824-1-apantykhin@gmail.com Signed-off-by: Alexander Pantyukhin Cc: Nikolay Borisov Cc: Paul Gortmaker Signed-off-by: Andrew Morton commit e36903b0c19fc6e4cfd84a55840ac9559c3f2831 Author: Dmitrii Bundin Date: Mon Jan 2 20:10:14 2023 +0300 scripts/gdb: add mm introspection utils This command provides a way to traverse the entire page hierarchy by a given virtual address on x86. In addition to qemu's commands info tlb/info mem it provides the complete information about the paging structure for an arbitrary virtual address. It supports 4KB/2MB/1GB and 5 level paging. Here is an example output for 2MB success translation: (gdb) translate-vm address cr3: cr3 binary data 0x1085be003 next entry physical address 0x1085be000 --- bit 3 page level write through False bit 4 page level cache disabled False level 4: entry address 0xffff8881085be7f8 page entry binary data 0x800000010ac83067 next entry physical address 0x10ac83000 --- bit 0 entry present True bit 1 read/write access allowed True bit 2 user access allowed True bit 3 page level write through False bit 4 page level cache disabled False bit 5 entry has been accessed True bit 7 page size False bit 11 restart to ordinary False bit 63 execute disable True level 3: entry address 0xffff88810ac83a48 page entry binary data 0x101af7067 next entry physical address 0x101af7000 --- bit 0 entry present True bit 1 read/write access allowed True bit 2 user access allowed True bit 3 page level write through False bit 4 page level cache disabled False bit 5 entry has been accessed True bit 7 page size False bit 11 restart to ordinary False bit 63 execute disable False level 2: entry address 0xffff888101af7368 page entry binary data 0x80000001634008e7 page size 2MB page physical address 0x163400000 --- bit 0 entry present True bit 1 read/write access allowed True bit 2 user access allowed True bit 3 page level write through False bit 4 page level cache disabled False bit 5 entry has been accessed True bit 7 page size True bit 6 page dirty True bit 8 global translation False bit 11 restart to ordinary True bit 12 pat False bits (59, 62) protection key 0 bit 63 execute disable True [dmitrii.bundin.a@gmail.com: add SPDX line, other tweaks] Link: https://lkml.kernel.org/r/20230113175151.22278-1-dmitrii.bundin.a@gmail.com [akpm@linux-foundation.org: s/physicall/physical/] Link: https://lkml.kernel.org/r/20230102171014.31408-1-dmitrii.bundin.a@gmail.com Signed-off-by: Dmitrii Bundin Acked by: Mike Rapoport (IBM) Cc: Greg Kroah-Hartman Cc: Ingo Molnar Cc: Jan Kiszka Cc: Kieran Bingham Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 9456d539acde9f92a52ffe477b4b86e35d214d1a Author: Andy Shevchenko Date: Tue Jan 3 14:19:37 2023 +0200 util_macros.h: add missing inclusion The header is the direct user of definitions from the math.h, include it. Link: https://lkml.kernel.org/r/20230103121937.32085-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Andrew Morton commit eb79fa7ea744979d2b66b26e9227c92e3ad39ff2 Author: Zqiang Date: Wed Jan 4 22:42:30 2023 +0800 kthread_worker: check all delayed works when destroy kthread worker When destroying a kthread worker warn if there are still some pending delayed works. This indicates that the caller should clear all pending delayed works before destroying the kthread worker. Link: https://lkml.kernel.org/r/20230104144230.938521-1-qiang1.zhang@intel.com Signed-off-by: Zqiang Acked-by: Tejun Heo Reviewed-by: Petr Mladek Signed-off-by: Andrew Morton commit dd106111db3aef93e1dfc951728ee06ec0d0f509 Author: SeongJae Park Date: Wed Jan 4 18:40:17 2023 +0000 scripts/spelling: add a few more typos Add a few more typos that found from real patches[1,2] to 'spelling' file. [1] https://lore.kernel.org/linux-mm/4bc4ab74-3ccd-f892-b387-d48451463d3c@huawei.com/ [2] https://lore.kernel.org/damon/20221228174621.34868-1-sj@kernel.org/ Link: https://lkml.kernel.org/r/20230104184017.1724-1-sj@kernel.org Signed-off-by: SeongJae Park Acked-by: Randy Dunlap Cc: Colin Ian King Cc: Drew Fustini Cc: Joe Perches Cc: SeongJae Park Signed-off-by: Andrew Morton commit a61c01e8f4a5c80e90de80a7fb147101b20afd85 Author: Alexey Dobriyan Date: Fri Dec 30 12:36:02 2022 +0300 proc: mark /proc/cmdline as permanent /proc/cmdline is never removed, mark is as permanent for slightly faster open and close. Link: https://lkml.kernel.org/r/Y66xAveh2yUsP7m9@p183 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton commit a3ea42ff8f3c977ac568f0530d2c13a639858764 Author: Ira Weiny Date: Thu Dec 29 14:17:15 2022 -0800 checkpatch: mark kunmap() and kunmap_atomic() deprecated It was suggested by Fabio that kunmap() be marked deprecated in checkpatch.[1] This did not seem necessary until an invalid conversion of kmap_local_page() appeared in mainline.[2][3] The introduction of this bug would have been flagged with kunmap() being marked deprecated. Add kunmap() and kunmap_atomic() to checkpatch to help prevent further confusion. [1] https://lore.kernel.org/all/1884934.6tgchFWduM@suse/ [2] d406d26745ab ("cifs: skip alloc when request has no pages") [3] https://lore.kernel.org/r/20221229-cifs-kmap-v1-1-c70d0e9a53eb@intel.com Link: https://lkml.kernel.org/r/20221229-kmap-checkpatch-v2-1-919fc4d4e3c2@intel.com Signed-off-by: Ira Weiny Suggested-by: "Fabio M. De Francesco" Acked-by: Joe Perches Cc: Andy Whitcroft Signed-off-by: Andrew Morton commit 828dfc0f7b84b175be32c286a70331ab55e80139 Author: Ricardo Ribalda Date: Tue Dec 20 23:20:30 2022 +0100 scripts/spelling.txt: add `permitted' Patch series "spelling: Fix some trivial typos". Seems like permitted has two t's :), Lets add that to spellings to help others. This patch (of 3): Add another common typo. Noticed when I sent a patch with the typo and in kvm and of. [ribalda@chromium.org: fix trivial typo] Link: https://lkml.kernel.org/r/20221220-permited-v1-2-52ea9857fa61@chromium.org Link: https://lkml.kernel.org/r/20221220-permited-v1-1-52ea9857fa61@chromium.org Signed-off-by: Ricardo Ribalda Cc: Joel Fernandes (Google) Signed-off-by: Andrew Morton commit 1b2fde2d2ed0f99ea3c6c021d1ec0db58de9e7fd Author: XU pengfei Date: Wed Dec 21 11:21:20 2022 +0800 hfsplus: remove unnecessary variable initialization Variables are assigned first and then used. Initialization is not required. [akpm@linux-foundation.org: give hfsplus_listxattr:key_len narrower scope] Link: https://lkml.kernel.org/r/20221221032119.10037-1-xupengfei@nfschina.com Signed-off-by: XU pengfei Reviewed-by: Andrew Morton Cc: Christian Brauner Cc: Kees Cook Signed-off-by: Andrew Morton commit d5528cc16893f1f64b07936b1e88aa023128debb Author: Geert Uytterhoeven Date: Thu Dec 8 15:31:28 2022 +0100 lib: add Dhrystone benchmark test When working on SoC bring-up, (a full) userspace may not be available, making it hard to benchmark the CPU performance of the system under development. Still, one may want to have a rough idea of the (relative) performance of one or more CPU cores, especially when working on e.g. the clock driver that controls the CPU core clock(s). Hence make the classical Dhrystone 2.1 benchmark available as a Linux kernel test module, based on[1]. When built-in, this benchmark can be run without any userspace present. Parallel runs (run on multiple CPU cores) are supported, just kick the "run" file multiple times. Note that the actual figures depend on the configuration options that control compiler optimization (e.g. CONFIG_CC_OPTIMIZE_FOR_SIZE vs. CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE), and on the compiler options used when building the kernel in general. Hence numbers may differ from those obtained by running similar benchmarks in userspace. [1] https://github.com/qris/dhrystone-deb.git Signed-off-by: Geert Uytterhoeven Link: https://lkml.kernel.org/r/4d07ad990740a5f1e426ce4566fb514f60ec9bdd.1670509558.git.geert+renesas@glider.be Signed-off-by: Geert Uytterhoeven Cc: Arnd Bergmann Cc: Brendan Higgins Cc: David Gow [geert+renesas@glider.be: fix uninitialized use of ret] Link: https://lkml.kernel.org/r/alpine.DEB.2.22.394.2212190857310.137329@ramsan.of.borg Signed-off-by: Andrew Morton commit 88ad32a799ddc92eafd2ae204cb43f04ac20a05c Author: Manfred Spraul Date: Fri Dec 16 16:04:40 2022 +0100 include/linux/percpu_counter.h: race in uniprocessor percpu_counter_add() The percpu interface is supposed to be preempt and irq safe. But: The uniprocessor implementation of percpu_counter_add() is not irq safe: if an interrupt happens during the +=, then the result is undefined. Therefore: switch from preempt_disable() to local_irq_save(). This prevents interrupts from interrupting the +=, and as a side effect prevents preemption. Link: https://lkml.kernel.org/r/20221216150441.200533-2-manfred@colorfullife.com Signed-off-by: Manfred Spraul Cc: "Sun, Jiebin" Cc: <1vier1@web.de> Cc: Alexander Sverdlin Cc: Thomas Gleixner Signed-off-by: Andrew Morton commit 805afd8300998948d16bdba0358dcfeb202a70d5 Author: Manfred Spraul Date: Fri Dec 16 16:04:39 2022 +0100 lib/percpu_counter: percpu_counter_add_batch() overflow/underflow Patch series "various irq handling fixes/docu updates". If an interrupt happens between __this_cpu_read(*fbc->counters) and this_cpu_add(*fbc->counters, amount), and that interrupt modifies the per_cpu_counter, then the this_cpu_add() after the interrupt returns may under/overflow. Link: https://lkml.kernel.org/r/20221216150155.200389-1-manfred@colorfullife.com Link: https://lkml.kernel.org/r/20221216150441.200533-1-manfred@colorfullife.com Signed-off-by: Manfred Spraul Cc: "Sun, Jiebin" Cc: <1vier1@web.de> Cc: Alexander Sverdlin Cc: Thomas Gleixner Signed-off-by: Andrew Morton commit a9dc087fd3c484fd1ed18c5efb290efaaf44ce03 Author: Liu Shixin Date: Mon Dec 12 10:16:27 2022 +0800 hfs: fix missing hfs_bnode_get() in __hfs_bnode_create Syzbot found a kernel BUG in hfs_bnode_put(): kernel BUG at fs/hfs/bnode.c:466! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 3634 Comm: kworker/u4:5 Not tainted 6.1.0-rc7-syzkaller-00190-g97ee9d1c1696 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Workqueue: writeback wb_workfn (flush-7:0) RIP: 0010:hfs_bnode_put+0x46f/0x480 fs/hfs/bnode.c:466 Code: 8a 80 ff e9 73 fe ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c a0 fe ff ff 48 89 df e8 db 8a 80 ff e9 93 fe ff ff e8 a1 68 2c ff <0f> 0b e8 9a 68 2c ff 0f 0b 0f 1f 84 00 00 00 00 00 55 41 57 41 56 RSP: 0018:ffffc90003b4f258 EFLAGS: 00010293 RAX: ffffffff825e318f RBX: 0000000000000000 RCX: ffff8880739dd7c0 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc90003b4f430 R08: ffffffff825e2d9b R09: ffffed10045157d1 R10: ffffed10045157d1 R11: 1ffff110045157d0 R12: ffff8880228abe80 R13: ffff88807016c000 R14: dffffc0000000000 R15: ffff8880228abe00 FS: 0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fa6ebe88718 CR3: 000000001e93d000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: hfs_write_inode+0x1bc/0xb40 write_inode fs/fs-writeback.c:1440 [inline] __writeback_single_inode+0x4d6/0x670 fs/fs-writeback.c:1652 writeback_sb_inodes+0xb3b/0x18f0 fs/fs-writeback.c:1878 __writeback_inodes_wb+0x125/0x420 fs/fs-writeback.c:1949 wb_writeback+0x440/0x7b0 fs/fs-writeback.c:2054 wb_check_start_all fs/fs-writeback.c:2176 [inline] wb_do_writeback fs/fs-writeback.c:2202 [inline] wb_workfn+0x827/0xef0 fs/fs-writeback.c:2235 process_one_work+0x877/0xdb0 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 The BUG_ON() is triggered at here: /* Dispose of resources used by a node */ void hfs_bnode_put(struct hfs_bnode *node) { if (node) { BUG_ON(!atomic_read(&node->refcnt)); <- we have issue here!!!! } } By tracing the refcnt, I found the node is created by hfs_bmap_alloc() with refcnt 1. Then the node is used by hfs_btree_write(). There is a missing of hfs_bnode_get() after find the node. The issue happened in following path: hfs_bmap_alloc hfs_bnode_find __hfs_bnode_create <- allocate a new node with refcnt 1. hfs_bnode_put <- decrease the refcnt hfs_btree_write hfs_bnode_find __hfs_bnode_create hfs_bnode_findhash <- find the node without refcnt increased. hfs_bnode_put <- trigger the BUG_ON() since refcnt is 0. Link: https://lkml.kernel.org/r/20221212021627.3766829-1-liushixin2@huawei.com Reported-by: syzbot+5b04b49a7ec7226c7426@syzkaller.appspotmail.com Signed-off-by: Liu Shixin Cc: Fabio M. De Francesco Cc: Viacheslav Dubeyko Cc: Signed-off-by: Andrew Morton commit bef7ec4e8f30173614b3e441924685f2bd8858e7 Author: Masami Hiramatsu (Google) Date: Mon Dec 12 11:46:54 2022 +0900 docs: fault-injection: add requirements of error injectable functions Add a section about the requirements of the error injectable functions and the type of errors. Since this section must be read before using ALLOW_ERROR_INJECTION() macro, that section is referred from the comment of the macro too. Link: https://lkml.kernel.org/r/167081321427.387937.15475445689482551048.stgit@devnote3 Link: https://lore.kernel.org/all/20221211115218.2e6e289bb85f8cf53c11aa97@kernel.org/T/#u Signed-off-by: Masami Hiramatsu (Google) Cc: Alexei Starovoitov Cc: Borislav Petkov (AMD) Cc: Chris Mason Cc: Christoph Hellwig Cc: Florent Revest Cc: Greg Kroah-Hartman Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Kees Cook Cc: KP Singh Cc: Mark Rutland Cc: Peter Zijlstra Cc: Steven Rostedt (Google) Signed-off-by: Andrew Morton commit 6338bb05c15f88e2f4beae296ef389224837758c Author: Masami Hiramatsu (Google) Date: Mon Dec 12 11:46:44 2022 +0900 error-injection: remove EI_ETYPE_NONE Patch series "error-injection: Clarify the requirements of error injectable functions". Patches for clarifying the requirement of error injectable functions and to remove the confusing EI_ETYPE_NONE. This patch (of 2): Since the EI_ETYPE_NONE is confusing type, replace it with appropriate errno. The EI_ETYPE_NONE has been introduced for a dummy (error) value, but it can mislead people that they can use ALLOW_ERROR_INJECTION(func, NONE). So remove it from the EI_ETYPE and use appropriate errno instead. [akpm@linux-foundation.org: include/linux/error-injection.h needs errno.h] Link: https://lkml.kernel.org/r/167081319306.387937.10079195394503045678.stgit@devnote3 Link: https://lkml.kernel.org/r/167081320421.387937.4259807348852421112.stgit@devnote3 Fixes: 663faf9f7bee ("error-injection: Add injectable error types") Signed-off-by: Masami Hiramatsu (Google) Cc: Alexei Starovoitov Cc: Borislav Petkov (AMD) Cc: Chris Mason Cc: Christoph Hellwig Cc: Florent Revest Cc: Greg Kroah-Hartman Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Kees Cook Cc: KP Singh Cc: Mark Rutland Cc: Peter Zijlstra Cc: Steven Rostedt (Google) Signed-off-by: Andrew Morton commit 89b25c0e02359a8663fbc5c5b1502332c3b21305 Author: Li zeming Date: Tue Dec 13 15:36:33 2022 +0800 arch/alpha/kernel/process.c: remove unnecessary (void*) conversions generic_ptr is a void * type and does not require a cast. Link: https://lkml.kernel.org/r/20221213073633.3586-1-zeming@nfschina.com Signed-off-by: Li zeming Cc: "Eric W. Biederman" Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Richard Henderson Signed-off-by: Andrew Morton commit 829715a2d14c7110987bfa5e6173b516c41f8627 Author: Li zeming Date: Tue Dec 13 15:45:22 2022 +0800 arch/alpha/kernel/smp.c: remove unnecessary (void*) conversions The void * type pointer does not need to be cast and assigned to another pointer. Link: https://lkml.kernel.org/r/20221213074522.3738-1-zeming@nfschina.com Signed-off-by: Li zeming Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Richard Henderson Signed-off-by: Andrew Morton commit 9160cffd45ee93bc20de134e4f127dac9af0cc18 Author: Matthew Wilcox (Oracle) Date: Thu Jan 26 20:12:55 2023 +0000 mpage: convert __mpage_writepage() to use a folio more fully This is just a conversion to the folio API. While there are some nods towards supporting multi-page folios in here, the blocks array is still sized for one page's worth of blocks, and there are other assumptions such as the blocks_per_page variable. [willy@infradead.org: fix accidentally-triggering WARN_ON_ONCE] Link: https://lkml.kernel.org/r/Y9kuaBgXf9lKJ8b0@casper.infradead.org Link: https://lkml.kernel.org/r/20230126201255.1681189-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Christoph Hellwig Cc: Jan Kara Signed-off-by: Andrew Morton commit d585bdbeb79aa13b8a9bbe952d90f5252f7fe909 Author: Matthew Wilcox (Oracle) Date: Thu Jan 26 20:12:54 2023 +0000 fs: convert writepage_t callback to pass a folio Patch series "Convert writepage_t to use a folio". More folioisation. I split out the mpage work from everything else because it completely dominated the patch, but some implementations I just converted outright. This patch (of 2): We always write back an entire folio, but that's currently passed as the head page. Convert all filesystems that use write_cache_pages() to expect a folio instead of a page. Link: https://lkml.kernel.org/r/20230126201255.1681189-1-willy@infradead.org Link: https://lkml.kernel.org/r/20230126201255.1681189-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Christoph Hellwig Signed-off-by: Andrew Morton commit 00cdf76012ab78b225345e8cf77d5391b4680b45 Author: Matthew Wilcox (Oracle) Date: Thu Jan 26 20:15:52 2023 +0000 mm: add memcpy_from_file_folio() This is the equivalent of memcpy_from_page(). It differs in that it takes the position in a file instead of offset in a folio, it accepts the total number of bytes to be copied (instead of the number of bytes to be copied from this folio) and it returns how many bytes were copied from the folio, rather than making the caller calculate that and then checking if the caller got it right. [akpm@linux-foundation.org: fix typo in comment] Link: https://lkml.kernel.org/r/20230126201552.1681588-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: "Fabio M. De Francesco" Cc: Ira Weiny Signed-off-by: Andrew Morton commit 3222d8c2a7f888bf38b845b125e9470b12108a4d Author: Christoph Hellwig Date: Wed Jan 25 14:34:36 2023 +0100 block: remove ->rw_page The ->rw_page method is a special purpose bypass of the usual bio handling path that is limited to single-page reads and writes and synchronous which causes a lot of extra code in the drivers, callers and the block layer. The only remaining user is the MM swap code. Switch that swap code to simply submit a single-vec on-stack bio an synchronously wait on it based on a newly added QUEUE_FLAG_SYNCHRONOUS flag set by the drivers that currently implement ->rw_page instead. While this touches one extra cache line and executes extra code, it simplifies the block layer and drivers and ensures that all feastures are properly supported by all drivers, e.g. right now ->rw_page bypassed cgroup writeback entirely. [akpm@linux-foundation.org: fix comment typo, per Dan] Link: https://lkml.kernel.org/r/20230125133436.447864-8-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Dan Williams Cc: Dave Jiang Cc: Ira Weiny Cc: Jens Axboe Cc: Keith Busch Cc: Minchan Kim Cc: Sergey Senozhatsky Cc: Vishal Verma Signed-off-by: Andrew Morton commit 05cda97ecb7046f4192a921741aae33b300dd628 Author: Christoph Hellwig Date: Wed Jan 25 14:34:35 2023 +0100 mm: factor out a swap_writepage_bdev helper Split the block device case from swap_readpage into a separate helper, following the abstraction for file based swap. Link: https://lkml.kernel.org/r/20230125133436.447864-7-hch@lst.de Signed-off-by: Christoph Hellwig Cc: Dan Williams Cc: Dave Jiang Cc: Ira Weiny Cc: Jens Axboe Cc: Keith Busch Cc: Minchan Kim Cc: Sergey Senozhatsky Cc: Vishal Verma Signed-off-by: Andrew Morton commit e3e2762bd3c5e02780618fc42f5b0049a3bedb30 Author: Christoph Hellwig Date: Wed Jan 25 14:34:34 2023 +0100 mm: remove the __swap_writepage return value __swap_writepage always returns 0. Link: https://lkml.kernel.org/r/20230125133436.447864-6-hch@lst.de Signed-off-by: Christoph Hellwig Cc: Dan Williams Cc: Dave Jiang Cc: Ira Weiny Cc: Jens Axboe Cc: Keith Busch Cc: Minchan Kim Cc: Sergey Senozhatsky Cc: Vishal Verma Signed-off-by: Andrew Morton commit 9b4e30bd7309222f74a5198f44bd45feea024b00 Author: Christoph Hellwig Date: Wed Jan 25 14:34:33 2023 +0100 mm: use an on-stack bio for synchronous swapin Optimize the synchronous swap in case by using an on-stack bio instead of allocating one using bio_alloc. Link: https://lkml.kernel.org/r/20230125133436.447864-5-hch@lst.de Signed-off-by: Christoph Hellwig Cc: Dan Williams Cc: Dave Jiang Cc: Ira Weiny Cc: Jens Axboe Cc: Keith Busch Cc: Minchan Kim Cc: Sergey Senozhatsky Cc: Vishal Verma Signed-off-by: Andrew Morton commit 14bd75f57400dba0e75eaee4dcb44ac52a46253f Author: Christoph Hellwig Date: Wed Jan 25 14:34:32 2023 +0100 mm: factor out a swap_readpage_bdev helper Split the block device case from swap_readpage into a separate helper, following the abstraction for file based swap and frontswap. Link: https://lkml.kernel.org/r/20230125133436.447864-4-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Dan Williams Cc: Dave Jiang Cc: Ira Weiny Cc: Jens Axboe Cc: Keith Busch Cc: Minchan Kim Cc: Sergey Senozhatsky Cc: Vishal Verma Signed-off-by: Andrew Morton commit a8c1408f870ef5308088b02c76082136b2c514ad Author: Christoph Hellwig Date: Wed Jan 25 14:34:31 2023 +0100 mm: remove the swap_readpage return value swap_readpage always returns 0, and no caller checks the return value. [akpm@linux-foundation.org: fix void-returning swap_readpage() stub, per Keith] Link: https://lkml.kernel.org/r/20230125133436.447864-3-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Dan Williams Cc: Dave Jiang Cc: Ira Weiny Cc: Jens Axboe Cc: Keith Busch Cc: Minchan Kim Cc: Sergey Senozhatsky Cc: Vishal Verma Signed-off-by: Andrew Morton commit 7d28631786b2333c5d48ad25172eb159aaa2945f Author: Christoph Hellwig Date: Wed Jan 25 14:34:30 2023 +0100 mpage: stop using bdev_{read,write}_page Patch series "remove ->rw_page". This series removes the ->rw_page block_device_operation, which is an old and clumsy attempt at a simple read/write fast path for the block layer. It isn't actually used by the fastest block layer operations that we support (polled I/O through io_uring), but only used by the mpage buffered I/O helpers which are some of the slowest I/O we have and do not make any difference there at all, and zram which is a block device abused to duplicate the zram functionality. Given that zram is heavily used we need to make sure there is a good replacement for synchronous I/O, so this series adds a new flag for drivers that complete I/O synchronously and uses that flag to use on-stack bios and synchronous submission for them in the swap code. This patch (of 7): These are micro-optimizations for synchronous I/O, which do not matter compared to all the other inefficiencies in the legacy buffer_head based mpage code. Link: https://lkml.kernel.org/r/20230125133436.447864-1-hch@lst.de Link: https://lkml.kernel.org/r/20230125133436.447864-2-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Dan Williams Cc: Keith Busch Cc: Dave Jiang Cc: Ira Weiny Cc: Jens Axboe Cc: Minchan Kim Cc: Sergey Senozhatsky Cc: Vishal Verma Signed-off-by: Andrew Morton commit 9e5fa0ae52fc67dea86f95ea4e3909b3e10a160f Author: Christoph Hellwig Date: Sat Jan 21 08:10:51 2023 +0100 mm: refactor va_remove_mappings Move the VM_FLUSH_RESET_PERMS to the caller and rename the function to better describe what it is doing. Link: https://lkml.kernel.org/r/20230121071051.1143058-11-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Uladzislau Rezki (Sony) Reviewed-by: David Hildenbrand Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit 79311c1fe0175941298fb362ba072514e2fe5c54 Author: Christoph Hellwig Date: Sat Jan 21 08:10:50 2023 +0100 mm: split __vunmap vunmap only needs to find and free the vmap_area and vm_strut, so open code that there and merge the rest of the code into vfree. Link: https://lkml.kernel.org/r/20230121071051.1143058-10-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: David Hildenbrand Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Uladzislau Rezki (Sony) Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit 17d3ef432dcbe80c134f1f79e2ed1ebd1076eab1 Author: Christoph Hellwig Date: Sat Jan 21 08:10:49 2023 +0100 mm: move debug checks from __vunmap to remove_vm_area All these checks apply to the free_vm_area interface as well, so move them to the common routine. Link: https://lkml.kernel.org/r/20230121071051.1143058-9-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Uladzislau Rezki (Sony) Reviewed-by: David Hildenbrand Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit 75c59ce74e47d3e11aa7666f1877aa64495f7b03 Author: Christoph Hellwig Date: Sat Jan 21 08:10:48 2023 +0100 mm: use remove_vm_area in __vunmap Use the common helper to find and remove a vmap_area instead of open coding it. Link: https://lkml.kernel.org/r/20230121071051.1143058-8-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Uladzislau Rezki (Sony) Reviewed-by: David Hildenbrand Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit 39e65b7f63392d70f2f6aff5f4c5c3262f49637e Author: Christoph Hellwig Date: Sat Jan 21 08:10:47 2023 +0100 mm: move __remove_vm_area out of va_remove_mappings __remove_vm_area is the only part of va_remove_mappings that requires a vmap_area. Move the call out to the caller and only pass the vm_struct to va_remove_mappings. Link: https://lkml.kernel.org/r/20230121071051.1143058-7-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Uladzislau Rezki (Sony) Reviewed-by: David Hildenbrand Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit 5d3d31d6fb17a8eb83af50ea8a0616a3cfde3e58 Author: Christoph Hellwig Date: Sat Jan 21 08:10:46 2023 +0100 mm: call vfree instead of __vunmap from delayed_vfree_work This adds an extra, never taken, in_interrupt() branch, but will allow to cut down the maze of vfree helpers. Link: https://lkml.kernel.org/r/20230121071051.1143058-6-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Uladzislau Rezki (Sony) Reviewed-by: David Hildenbrand Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit 208162f42f958b37147d3c1c5f947c7c1a8b9c41 Author: Christoph Hellwig Date: Sat Jan 21 08:10:45 2023 +0100 mm: move vmalloc_init and free_work down in vmalloc.c Move these two functions around a bit to avoid forward declarations. Link: https://lkml.kernel.org/r/20230121071051.1143058-5-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Uladzislau Rezki (Sony) Reviewed-by: David Hildenbrand Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit 01e2e8394a527644de5192f92f64e1c883a3e493 Author: Christoph Hellwig Date: Sat Jan 21 08:10:44 2023 +0100 mm: remove __vfree_deferred Fold __vfree_deferred into vfree_atomic, and call vfree_atomic early on from vfree if called from interrupt context so that the extra low-level helper can be avoided. Link: https://lkml.kernel.org/r/20230121071051.1143058-4-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Uladzislau Rezki (Sony) Reviewed-by: David Hildenbrand Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit f41f036b804d0d920f9b6fd3fca9489dd7afd358 Author: Christoph Hellwig Date: Sat Jan 21 08:10:43 2023 +0100 mm: remove __vfree __vfree is a subset of vfree that just skips a few checks, and which is only used by vfree and an error cleanup path. Fold __vfree into vfree and switch the only other caller to call vfree() instead. Link: https://lkml.kernel.org/r/20230121071051.1143058-3-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Uladzislau Rezki (Sony) Reviewed-by: David Hildenbrand Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit 37f3605e5e7af7de12aeb670c5b94e5a3c8dbf74 Author: Christoph Hellwig Date: Sat Jan 21 08:10:42 2023 +0100 mm: reject vmap with VM_FLUSH_RESET_PERMS Patch series "cleanup vfree and vunmap". This little series untangles the vfree and vunmap code path a bit. This patch (of 10): VM_FLUSH_RESET_PERMS is just for use with vmalloc as it is tied to freeing the underlying pages. Link: https://lkml.kernel.org/r/20230121071051.1143058-1-hch@lst.de Link: https://lkml.kernel.org/r/20230121071051.1143058-2-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Uladzislau Rezki (Sony) Reviewed-by: David Hildenbrand Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit cfccd2e63e7e0c84c514676cffa755dd71a3b2bc Author: Mel Gorman Date: Wed Jan 25 13:44:34 2023 +0000 mm, compaction: finish pageblocks on complete migration failure Commit 7efc3b726103 ("mm/compaction: fix set skip in fast_find_migrateblock") address an issue where a pageblock selected by fast_find_migrateblock() was ignored. Unfortunately, the same fix resulted in numerous reports of khugepaged or kcompactd stalling for long periods of time or consuming 100% of CPU. Tracing showed that there was a lot of rescanning between a small subset of pageblocks because the conditions for marking the block skip are not met. The scan is not reaching the end of the pageblock because enough pages were isolated but none were migrated successfully. Eventually it circles back to the same block. Pageblock skip tracking tries to minimise both latency and excessive scanning but tracking exactly when a block is fully scanned requires an excessive amount of state. This patch forcibly rescans a pageblock when all isolated pages fail to migrate even though it could be for transient reasons such as page writeback or page dirty. This will sometimes migrate too many pages but pageblocks will be marked skip and forward progress will be made. "Usemen" from the mmtests configuration workload-usemem-stress-numa-compact was used to stress compaction. The compaction trace events were recorded using a 6.2-rc5 kernel that includes commit 7efc3b726103 and count of unique ranges were measured. The top 5 ranges were 3076 range=(0x10ca00-0x10cc00) 3076 range=(0x110a00-0x110c00) 3098 range=(0x13b600-0x13b800) 3104 range=(0x141c00-0x141e00) 11424 range=(0x11b600-0x11b800) While this workload is very different than what the bugs reported, the pattern of the same subset of blocks being repeatedly scanned is observed. At one point, *only* the range range=(0x11b600 ~ 0x11b800) was scanned for 2 seconds. 14 seconds passed between the first migration-related event and the last. With the series applied including this patch, the top 5 ranges were 1 range=(0x11607e-0x116200) 1 range=(0x116200-0x116278) 1 range=(0x116278-0x116400) 1 range=(0x116400-0x116424) 1 range=(0x116424-0x116600) Only unique ranges were scanned and the time between the first migration-related event was 0.11 milliseconds. Link: https://lkml.kernel.org/r/20230125134434.18017-5-mgorman@techsingularity.net Fixes: 7efc3b726103 ("mm/compaction: fix set skip in fast_find_migrateblock") Signed-off-by: Mel Gorman Cc: Chuyi Zhou Cc: Jiri Slaby Cc: Maxim Levitsky Cc: Michal Hocko Cc: Paolo Bonzini Cc: Pedro Falcato Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit f9d7fc1ae3349759f25903cd867ab72e6ba4a63e Author: Mel Gorman Date: Wed Jan 25 13:44:33 2023 +0000 mm, compaction: finish scanning the current pageblock if requested cc->finish_pageblock is set when the current pageblock should be rescanned but fast_find_migrateblock can select an alternative block. Disable fast_find_migrateblock when the current pageblock scan should be completed. Link: https://lkml.kernel.org/r/20230125134434.18017-4-mgorman@techsingularity.net Signed-off-by: Mel Gorman Cc: Chuyi Zhou Cc: Jiri Slaby Cc: Maxim Levitsky Cc: Michal Hocko Cc: Paolo Bonzini Cc: Pedro Falcato Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 16b3be4034316bf56a171478cf1dccdf94dede43 Author: Mel Gorman Date: Wed Jan 25 13:44:32 2023 +0000 mm, compaction: check if a page has been captured before draining PCP pages If a page has been captured then draining is unnecssary so check first for a captured page. Link: https://lkml.kernel.org/r/20230125134434.18017-3-mgorman@techsingularity.net Signed-off-by: Mel Gorman Cc: Chuyi Zhou Cc: Jiri Slaby Cc: Maxim Levitsky Cc: Michal Hocko Cc: Paolo Bonzini Cc: Pedro Falcato Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 48731c8436c68ce5597dfe72f3836bd6808bedde Author: Mel Gorman Date: Wed Jan 25 13:44:31 2023 +0000 mm, compaction: rename compact_control->rescan to finish_pageblock Patch series "Fix excessive CPU usage during compaction". Commit 7efc3b726103 ("mm/compaction: fix set skip in fast_find_migrateblock") fixed a problem where pageblocks found by fast_find_migrateblock() were ignored. Unfortunately there were numerous bug reports complaining about high CPU usage and massive stalls once 6.1 was released. Due to the severity, the patch was reverted by Vlastimil as a short-term fix[1] to -stable. The underlying problem for each of the bugs is suspected to be the repeated scanning of the same pageblocks. This series should guarantee forward progress even with commit 7efc3b726103. More information is in the changelog for patch 4. [1] http://lore.kernel.org/r/20230113173345.9692-1-vbabka@suse.cz This patch (of 4): The rescan field was not well named albeit accurate at the time. Rename the field to finish_pageblock to indicate that the remainder of the pageblock should be scanned regardless of COMPACT_CLUSTER_MAX. The intent is that pageblocks with transient failures get marked for skipping to avoid revisiting the same pageblock. Link: https://lkml.kernel.org/r/20230125134434.18017-2-mgorman@techsingularity.net Signed-off-by: Mel Gorman Cc: Chuyi Zhou Cc: Jiri Slaby Cc: Maxim Levitsky Cc: Michal Hocko Cc: Paolo Bonzini Cc: Pedro Falcato Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit c5acf1f6f0a11b8e521ad43f59b1bed27dcf34f6 Author: Jongwoo Han Date: Thu Jan 26 03:08:47 2023 +0900 mm/gup.c: fix typo in comments Link: https://lkml.kernel.org/r/20230125180847.4542-1-jongwooo.han@gmail.com Signed-off-by: Jongwoo Han Signed-off-by: Andrew Morton commit 420ef683b5217338bc679c33fd9361b52f53a526 Author: Andrey Konovalov Date: Tue Jan 24 21:35:26 2023 +0100 kasan: reset page tags properly with sampling The implementation of page_alloc poisoning sampling assumed that tag_clear_highpage resets page tags for __GFP_ZEROTAGS allocations. However, this is no longer the case since commit 70c248aca9e7 ("mm: kasan: Skip unpoisoning of user pages"). This leads to kernel crashes when MTE-enabled userspace mappings are used with Hardware Tag-Based KASAN enabled. Reset page tags for __GFP_ZEROTAGS allocations in post_alloc_hook(). Also clarify and fix related comments. [andreyknvl@google.com: update comment] Link: https://lkml.kernel.org/r/5dbd866714b4839069e2d8469ac45b60953db290.1674592780.git.andreyknvl@google.com Link: https://lkml.kernel.org/r/24ea20c1b19c2b4b56cf9f5b354915f8dbccfc77.1674592496.git.andreyknvl@google.com Fixes: 44383cef54c0 ("kasan: allow sampling page_alloc allocations for HW_TAGS") Signed-off-by: Andrey Konovalov Reported-by: Peter Collingbourne Tested-by: Peter Collingbourne Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Marco Elver Signed-off-by: Andrew Morton commit 2e126aa29007353f069c3bab5c2cf52d231cd3ae Author: Mike Rapoport Date: Sat Jan 21 12:11:51 2023 +0200 mm/sparse: fix "unused function 'pgdat_to_phys'" warning W=1 build with clangs complains: mm/sparse.c:347:27: warning: unused function 'pgdat_to_phys' [-Wunused-function] static inline phys_addr_t pgdat_to_phys(struct pglist_data *pgdat) ^ 1 warning generated. pgdat_to_phys() is only used by functions defined when CONFIG_MEMORY_HOTREMOVE=y. Move pgdat_to_phys() under #ifdef CONFIG_MEMORY_HOTREMOVE to make clang happy. Link: https://lkml.kernel.org/r/20230121101151.1703292-1-rppt@kernel.org Signed-off-by: Mike Rapoport Reported-by: kernel test robot Link: https://lore.kernel.org/all/202301210155.1E5zABb5-lkp@intel.com Cc: Miles Chen Signed-off-by: Andrew Morton commit 05a421995503b746095d8ac93fa0ddadfc3c81bc Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Sun Jan 22 01:50:54 2023 +0900 mm/page_owner: record single timestamp value for high order allocations When allocating a high-order page, separate allocation timestamp is recorded for each sub-page resulting in different timestamp values between them. This behavior is not consistent with the behavior when recording free timestamp and caused confusion when analyzing memory dumps. Record single timestamp for the entire allocation, aligning with the behavior for free timestamps. Link: https://lkml.kernel.org/r/20230121165054.520507-1-42.hyeyoo@gmail.com Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: David Hildenbrand Cc: David Rientjes Cc: Joonsoo Kim Cc: Michal Hocko Cc: Mike Rapoport Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 4180887f0625af739896aaafc44ee98103ab8f71 Author: Jiaqi Yan Date: Fri Jan 20 03:46:22 2023 +0000 mm: memory-failure: document memory failure stats Add documentation for memory_failure's per NUMA node sysfs entries Link: https://lkml.kernel.org/r/20230120034622.2698268-4-jiaqiyan@google.com Signed-off-by: Jiaqi Yan Acked-by: Naoya Horiguchi Cc: David Rientjes Cc: Kefeng Wang Cc: Tony Luck Cc: Yang Shi Signed-off-by: Andrew Morton commit 18f41fa616ee4d66c67033eb46b951bf6e1b4a12 Author: Jiaqi Yan Date: Fri Jan 20 03:46:21 2023 +0000 mm: memory-failure: bump memory failure stats to pglist_data Right before memory_failure finishes its handling, accumulate poisoned page's resolution counters to pglist_data's memory_failure_stats, so as to update the corresponding sysfs entries. Tested: 1) Start an application to allocate memory buffer chunks 2) Convert random memory buffer addresses to physical addresses 3) Inject memory errors using EINJ at chosen physical addresses 4) Access poisoned memory buffer and recover from SIGBUS 5) Check counter values under /sys/devices/system/node/node*/memory_failure/* Link: https://lkml.kernel.org/r/20230120034622.2698268-3-jiaqiyan@google.com Signed-off-by: Jiaqi Yan Acked-by: David Rientjes Acked-by: Naoya Horiguchi Cc: Kefeng Wang Cc: Tony Luck Cc: Yang Shi Signed-off-by: Andrew Morton commit 44b8f8bf2438bfee3aceae4d647a7460213ff340 Author: Jiaqi Yan Date: Fri Jan 20 03:46:20 2023 +0000 mm: memory-failure: add memory failure stats to sysfs Patch series "Introduce per NUMA node memory error statistics", v2. Background ========== In the RFC for Kernel Support of Memory Error Detection [1], one advantage of software-based scanning over hardware patrol scrubber is the ability to make statistics visible to system administrators. The statistics include 2 categories: * Memory error statistics, for example, how many memory error are encountered, how many of them are recovered by the kernel. Note these memory errors are non-fatal to kernel: during the machine check exception (MCE) handling kernel already classified MCE's severity to be unnecessary to panic (but either action required or optional). * Scanner statistics, for example how many times the scanner have fully scanned a NUMA node, how many errors are first detected by the scanner. The memory error statistics are useful to userspace and actually not specific to scanner detected memory errors, and are the focus of this patchset. Motivation ========== Memory error stats are important to userspace but insufficient in kernel today. Datacenter administrators can better monitor a machine's memory health with the visible stats. For example, while memory errors are inevitable on servers with 10+ TB memory, starting server maintenance when there are only 1~2 recovered memory errors could be overreacting; in cloud production environment maintenance usually means live migrate all the workload running on the server and this usually causes nontrivial disruption to the customer. Providing insight into the scope of memory errors on a system helps to determine the appropriate follow-up action. In addition, the kernel's existing memory error stats need to be standardized so that userspace can reliably count on their usefulness. Today kernel provides following memory error info to userspace, but they are not sufficient or have disadvantages: * HardwareCorrupted in /proc/meminfo: number of bytes poisoned in total, not per NUMA node stats though * ras:memory_failure_event: only available after explicitly enabled * /dev/mcelog provides many useful info about the MCEs, but doesn't capture how memory_failure recovered memory MCEs * kernel logs: userspace needs to process log text Exposing memory error stats is also a good start for the in-kernel memory error detector. Today the data source of memory error stats are either direct memory error consumption, or hardware patrol scrubber detection (either signaled as UCNA or SRAO). Once in-kernel memory scanner is implemented, it will be the main source as it is usually configured to scan memory DIMMs constantly and faster than hardware patrol scrubber. How Implemented =============== As Naoya pointed out [2], exposing memory error statistics to userspace is useful independent of software or hardware scanner. Therefore we implement the memory error statistics independent of the in-kernel memory error detector. It exposes the following per NUMA node memory error counters: /sys/devices/system/node/node${X}/memory_failure/total /sys/devices/system/node/node${X}/memory_failure/recovered /sys/devices/system/node/node${X}/memory_failure/ignored /sys/devices/system/node/node${X}/memory_failure/failed /sys/devices/system/node/node${X}/memory_failure/delayed These counters describe how many raw pages are poisoned and after the attempted recoveries by the kernel, their resolutions: how many are recovered, ignored, failed, or delayed respectively. This approach can be easier to extend for future use cases than /proc/meminfo, trace event, and log. The following math holds for the statistics: * total = recovered + ignored + failed + delayed These memory error stats are reset during machine boot. The 1st commit introduces these sysfs entries. The 2nd commit populates memory error stats every time memory_failure attempts memory error recovery. The 3rd commit adds documentations for introduced stats. [1] https://lore.kernel.org/linux-mm/7E670362-C29E-4626-B546-26530D54F937@gmail.com/T/#mc22959244f5388891c523882e61163c6e4d703af [2] https://lore.kernel.org/linux-mm/7E670362-C29E-4626-B546-26530D54F937@gmail.com/T/#m52d8d7a333d8536bd7ce74253298858b1c0c0ac6 This patch (of 3): Today kernel provides following memory error info to userspace, but each has its own disadvantage * HardwareCorrupted in /proc/meminfo: number of bytes poisoned in total, not per NUMA node stats though * ras:memory_failure_event: only available after explicitly enabled * /dev/mcelog provides many useful info about the MCEs, but doesn't capture how memory_failure recovered memory MCEs * kernel logs: userspace needs to process log text Exposes per NUMA node memory error stats as sysfs entries: /sys/devices/system/node/node${X}/memory_failure/total /sys/devices/system/node/node${X}/memory_failure/recovered /sys/devices/system/node/node${X}/memory_failure/ignored /sys/devices/system/node/node${X}/memory_failure/failed /sys/devices/system/node/node${X}/memory_failure/delayed These counters describe how many raw pages are poisoned and after the attempted recoveries by the kernel, their resolutions: how many are recovered, ignored, failed, or delayed respectively. The following math holds for the statistics: * total = recovered + ignored + failed + delayed Link: https://lkml.kernel.org/r/20230120034622.2698268-1-jiaqiyan@google.com Link: https://lkml.kernel.org/r/20230120034622.2698268-2-jiaqiyan@google.com Signed-off-by: Jiaqi Yan Acked-by: David Rientjes Acked-by: Naoya Horiguchi Cc: Kefeng Wang Cc: Tony Luck Cc: Yang Shi Signed-off-by: Andrew Morton commit abf086721a2f1e6897c57796f7268df1b194c750 Author: T.J. Alumbaugh Date: Wed Jan 18 00:18:27 2023 +0000 mm: multi-gen LRU: simplify lru_gen_look_around() Update the folio generation in place with or without current->reclaim_state->mm_walk. The LRU lock is held for longer, if mm_walk is NULL and the number of folios to update is more than PAGEVEC_SIZE. This causes a measurable regression from the LRU lock contention during a microbencmark. But a tiny regression is not worth the complexity. Link: https://lkml.kernel.org/r/20230118001827.1040870-8-talumbau@google.com Signed-off-by: T.J. Alumbaugh Cc: Yu Zhao Signed-off-by: Andrew Morton commit b5ff4133617d0eced35b685da0bd0929dd9fabb7 Author: T.J. Alumbaugh Date: Wed Jan 18 00:18:26 2023 +0000 mm: multi-gen LRU: improve walk_pmd_range() Improve readability of walk_pmd_range() and walk_pmd_range_locked(). Link: https://lkml.kernel.org/r/20230118001827.1040870-7-talumbau@google.com Signed-off-by: T.J. Alumbaugh Cc: Yu Zhao Signed-off-by: Andrew Morton commit 37cc99979d04cca677c0ad5c0acd1149ec165d1b Author: T.J. Alumbaugh Date: Wed Jan 18 00:18:25 2023 +0000 mm: multi-gen LRU: improve lru_gen_exit_memcg() Add warnings and poison ->next. Link: https://lkml.kernel.org/r/20230118001827.1040870-6-talumbau@google.com Signed-off-by: T.J. Alumbaugh Cc: Yu Zhao Signed-off-by: Andrew Morton commit 36c7b4db7c942ae9e1b111f0c6b468c8b2e33842 Author: T.J. Alumbaugh Date: Wed Jan 18 00:18:24 2023 +0000 mm: multi-gen LRU: section for memcg LRU Move memcg LRU code into a dedicated section. Improve the design doc to outline its architecture. Link: https://lkml.kernel.org/r/20230118001827.1040870-5-talumbau@google.com Signed-off-by: T.J. Alumbaugh Cc: Yu Zhao Signed-off-by: Andrew Morton commit ccbbbb85945d8f0255aa9dbc1b617017e2294f2c Author: T.J. Alumbaugh Date: Wed Jan 18 00:18:23 2023 +0000 mm: multi-gen LRU: section for Bloom filters Move Bloom filters code into a dedicated section. Improve the design doc to explain Bloom filter usage and connection between aging and eviction in their use. Link: https://lkml.kernel.org/r/20230118001827.1040870-4-talumbau@google.com Signed-off-by: T.J. Alumbaugh Cc: Yu Zhao Signed-off-by: Andrew Morton commit db19a43d9b3a8876552f00f656008206ef9a5efa Author: T.J. Alumbaugh Date: Wed Jan 18 00:18:22 2023 +0000 mm: multi-gen LRU: section for rmap/PT walk feedback Add a section for lru_gen_look_around() in the code and the design doc. Link: https://lkml.kernel.org/r/20230118001827.1040870-3-talumbau@google.com Signed-off-by: T.J. Alumbaugh Cc: Yu Zhao Signed-off-by: Andrew Morton commit 7b8144e63d84716f16a1b929e0c7e03ae5c4d5c1 Author: T.J. Alumbaugh Date: Wed Jan 18 00:18:21 2023 +0000 mm: multi-gen LRU: section for working set protection Patch series "mm: multi-gen LRU: improve". This patch series improves a few MGLRU functions, collects related functions, and adds additional documentation. This patch (of 7): Add a section for working set protection in the code and the design doc. The admin doc already contains its usage. Link: https://lkml.kernel.org/r/20230118001827.1040870-1-talumbau@google.com Link: https://lkml.kernel.org/r/20230118001827.1040870-2-talumbau@google.com Signed-off-by: T.J. Alumbaugh Cc: Yu Zhao Signed-off-by: Andrew Morton commit b2db9ef2c0926ba86898136704cdc757c7a5a60a Author: Zhaoyang Huang Date: Thu Jan 19 09:22:24 2023 +0800 mm: move KMEMLEAK's Kconfig items from lib to mm Have the kmemleak's source code and Kconfig items be in the same directory. Link: https://lkml.kernel.org/r/1674091345-14799-1-git-send-email-zhaoyang.huang@unisoc.com Signed-off-by: Zhaoyang Huang Acked-by: Mike Rapoport (IBM) Acked-by: Vlastimil Babka Cc: ke.wang Cc: Mirsad Goran Todorovac Cc: Nathan Chancellor Cc: Peter Zijlstra (Intel) Cc: Catalin Marinas Signed-off-by: Andrew Morton commit f4c978b6594b7452ef22a2fcff376debafcf25eb Author: SeongJae Park Date: Thu Jan 19 01:38:31 2023 +0000 mm/damon/core-test: add a test for damon_update_monitoring_results() Add a simple unit test for damon_update_monitoring_results() function. Link: https://lkml.kernel.org/r/20230119013831.1911-4-sj@kernel.org Signed-off-by: SeongJae Park Cc: Brendan Higgins Signed-off-by: Andrew Morton commit 2f5bef5a590be4bf4111ee8f49d97a8613a3e980 Author: SeongJae Park Date: Thu Jan 19 01:38:30 2023 +0000 mm/damon/core: update monitoring results for new monitoring attributes region->nr_accesses is the number of sampling intervals in the last aggregation interval that access to the region has found, and region->age is the number of aggregation intervals that its access pattern has maintained. Hence, the real meaning of the two fields' values is depending on current sampling and aggregation intervals. This means the values need to be updated for every sampling and/or aggregation intervals updates. As DAMON core doesn't, it is a duty of in-kernel DAMON framework applications like DAMON sysfs interface, or the userspace users. Handling it in userspace or in-kernel DAMON application is complicated, inefficient, and repetitive compared to doing the update in DAMON core. Do the update in DAMON core. Link: https://lkml.kernel.org/r/20230119013831.1911-3-sj@kernel.org Signed-off-by: SeongJae Park Cc: Brendan Higgins Signed-off-by: Andrew Morton commit 6b3f013bb90e737b06c7955571407190b4c760ce Author: SeongJae Park Date: Thu Jan 19 01:38:29 2023 +0000 mm/damon: update comments in damon.h for damon_attrs Patch series "mm/damon: misc fixes". This patchset contains three miscellaneous simple fixes for DAMON online tuning. This patch (of 3): Commit cbeaa77b0449 ("mm/damon/core: use a dedicated struct for monitoring attributes") moved monitoring intervals from damon_ctx to a new struct, damon_attrs, but a comment in the header file has not updated for the change. Update it. Link: https://lkml.kernel.org/r/20230119013831.1911-1-sj@kernel.org Link: https://lkml.kernel.org/r/20230119013831.1911-2-sj@kernel.org Fixes: cbeaa77b0449 ("mm/damon/core: use a dedicated struct for monitoring attributes") Signed-off-by: SeongJae Park Cc: Brendan Higgins Signed-off-by: Andrew Morton commit 782e4179535971c3574c367bfaaefea8970b3e0b Author: Waiman Long Date: Wed Jan 18 23:01:11 2023 -0500 mm/kmemleak: fix UAF bug in kmemleak_scan() Commit 6edda04ccc7c ("mm/kmemleak: prevent soft lockup in first object iteration loop of kmemleak_scan()") fixes soft lockup problem in kmemleak_scan() by periodically doing a cond_resched(). It does take a reference of the current object before doing it. Unfortunately, if the object has been deleted from the object_list, the next object pointed to by its next pointer may no longer be valid after coming back from cond_resched(). This can result in use-after-free and other nasty problem. Fix this problem by adding a del_state flag into kmemleak_object structure to synchronize the object deletion process between kmemleak_cond_resched() and __remove_object() to make sure that the object remained in the object_list in the duration of the cond_resched() call. Link: https://lkml.kernel.org/r/20230119040111.350923-3-longman@redhat.com Fixes: 6edda04ccc7c ("mm/kmemleak: prevent soft lockup in first object iteration loop of kmemleak_scan()") Signed-off-by: Waiman Long Reviewed-by: Catalin Marinas Cc: Muchun Song Signed-off-by: Andrew Morton commit 6061e740822530a4ef443548b19c4e0bc6342c7a Author: Waiman Long Date: Wed Jan 18 23:01:10 2023 -0500 mm/kmemleak: simplify kmemleak_cond_resched() usage Patch series "mm/kmemleak: Simplify kmemleak_cond_resched() & fix UAF", v2. It was found that a KASAN use-after-free error was reported in the kmemleak_scan() function. After further examination, it is believe that even though a reference is taken from the current object, it does not prevent the object pointed to by the next pointer from going away after a cond_resched(). To fix that, additional flags are added to make sure that the current object won't be removed from the object_list during the duration of the cond_resched() to ensure the validity of the next pointer. While making the change, I also simplify the current usage of kmemleak_cond_resched() to make it easier to understand. This patch (of 2): The presence of a pinned argument and the 64k loop count make kmemleak_cond_resched() a bit more complex to read. The pinned argument is used only by first kmemleak_scan() loop. Simplify the usage of kmemleak_cond_resched() by removing the pinned argument and always do a get_object()/put_object() sequence. In addition, the 64k loop is removed by using need_resched() to decide if kmemleak_cond_resched() should be called. Link: https://lkml.kernel.org/r/20230119040111.350923-1-longman@redhat.com Link: https://lkml.kernel.org/r/20230119040111.350923-2-longman@redhat.com Signed-off-by: Waiman Long Reviewed-by: Catalin Marinas Cc: Muchun Song Signed-off-by: Andrew Morton commit 4cf1fe34fd18b752ae2403927277715d4444f331 Author: Kees Cook Date: Thu Jan 19 16:03:44 2023 +0000 kselftest: vm: add tests for memory-deny-write-execute Add some tests to cover the new PR_SET_MDWE prctl. Link: https://lkml.kernel.org/r/20230119160344.54358-3-joey.gouly@arm.com Co-developed-by: Joey Gouly Signed-off-by: Joey Gouly Signed-off-by: Kees Cook Cc: Shuah Khan Cc: Alexander Viro Cc: Catalin Marinas Cc: Jeremy Linton Cc: Lennart Poettering Cc: Mark Brown Cc: nd Cc: Szabolcs Nagy Cc: Topi Miettinen Cc: Zbigniew Jędrzejewski-Szmek Cc: David Hildenbrand Signed-off-by: Andrew Morton commit b507808ebce23561d4ff8c2aa1fb949fe402bc61 Author: Joey Gouly Date: Thu Jan 19 16:03:43 2023 +0000 mm: implement memory-deny-write-execute as a prctl Patch series "mm: In-kernel support for memory-deny-write-execute (MDWE)", v2. The background to this is that systemd has a configuration option called MemoryDenyWriteExecute [2], implemented as a SECCOMP BPF filter. Its aim is to prevent a user task from inadvertently creating an executable mapping that is (or was) writeable. Since such BPF filter is stateless, it cannot detect mappings that were previously writeable but subsequently changed to read-only. Therefore the filter simply rejects any mprotect(PROT_EXEC). The side-effect is that on arm64 with BTI support (Branch Target Identification), the dynamic loader cannot change an ELF section from PROT_EXEC to PROT_EXEC|PROT_BTI using mprotect(). For libraries, it can resort to unmapping and re-mapping but for the main executable it does not have a file descriptor. The original bug report in the Red Hat bugzilla - [3] - and subsequent glibc workaround for libraries - [4]. This series adds in-kernel support for this feature as a prctl PR_SET_MDWE, that is inherited on fork(). The prctl denies PROT_WRITE | PROT_EXEC mappings. Like the systemd BPF filter it also denies adding PROT_EXEC to mappings. However unlike the BPF filter it only denies it if the mapping didn't previous have PROT_EXEC. This allows to PROT_EXEC -> PROT_EXEC | PROT_BTI with mprotect(), which is a problem with the BPF filter. This patch (of 2): The aim of such policy is to prevent a user task from creating an executable mapping that is also writeable. An example of mmap() returning -EACCESS if the policy is enabled: mmap(0, size, PROT_READ | PROT_WRITE | PROT_EXEC, flags, 0, 0); Similarly, mprotect() would return -EACCESS below: addr = mmap(0, size, PROT_READ | PROT_EXEC, flags, 0, 0); mprotect(addr, size, PROT_READ | PROT_WRITE | PROT_EXEC); The BPF filter that systemd MDWE uses is stateless, and disallows mprotect() with PROT_EXEC completely. This new prctl allows PROT_EXEC to be enabled if it was already PROT_EXEC, which allows the following case: addr = mmap(0, size, PROT_READ | PROT_EXEC, flags, 0, 0); mprotect(addr, size, PROT_READ | PROT_EXEC | PROT_BTI); where PROT_BTI enables branch tracking identification on arm64. Link: https://lkml.kernel.org/r/20230119160344.54358-1-joey.gouly@arm.com Link: https://lkml.kernel.org/r/20230119160344.54358-2-joey.gouly@arm.com Signed-off-by: Joey Gouly Co-developed-by: Catalin Marinas Signed-off-by: Catalin Marinas Cc: Alexander Viro Cc: Jeremy Linton Cc: Kees Cook Cc: Lennart Poettering Cc: Mark Brown Cc: nd Cc: Shuah Khan Cc: Szabolcs Nagy Cc: Topi Miettinen Cc: Zbigniew Jędrzejewski-Szmek Cc: David Hildenbrand Signed-off-by: Andrew Morton commit e6d2c436ff693869e83a65e61643b922e193e162 Author: Herton R. Krzesinski Date: Mon Jan 16 19:49:21 2023 -0300 tools/mm: allow users to provide additional cflags/ldflags Right now there is no way to provide additional cflags/ldflags when building tools/vm binaries. And using eg. make CFLAGS= will override the CFLAGS being set in the Makefile, making the build fail since it requires the include of the ../lib dir (for libapi). This change then allows you to specify: CFLAGS= LDFLAGS= make V=1 -C tools/vm And the options will be correctly appended as can be seen from the make output. Link: https://lkml.kernel.org/r/20230116224921.4106324-1-herton@redhat.com Signed-off-by: Herton R. Krzesinski Cc: Don Zickus Cc: Justin Forbes Cc: Vlastimil Babka Cc: Scott Weaver Signed-off-by: Andrew Morton commit d0634a622be35df2dfa80dc14ee1482ae1889cb2 Author: Deming Wang Date: Tue Jan 17 21:54:03 2023 -0500 Documentation: mm: use `s/higmem/highmem/` fix typo for highmem We should use highmem replace higmem. Link: https://lkml.kernel.org/r/20230118025403.1531-1-wangdeming@inspur.com Signed-off-by: Deming Wang Reviewed-by: Ira Weiny Cc: "Fabio M. De Francesco" Cc: Jonathan Corbet Cc: Mike Rapoport (IBM) Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton commit 148aa87e4f631e98d926d006604116fd2b2f3a93 Author: Levi Yun Date: Wed Jan 18 17:05:23 2023 +0900 mm/cma: fix potential memory loss on cma_declare_contiguous_nid Suppose memblock_alloc_range_nid() with highmem_start succeeds when cma_declare_contiguous_nid is called with !fixed on a 32-bit system with PHYS_ADDR_T_64BIT enabled with memblock.bottom_up == false. But the next trial to memblock_alloc_range_nid() to allocate in [SIZE_4G, limits) nullifies former successfully allocated addr and it retries memblock_alloc_ragne_nid(). In this situation, the first successfully allocated address area is lost. Change the order of allocation (SIZE_4G, high_memory and base) and check whether the allocated succeeded to prevent potential memory loss. Link: https://lkml.kernel.org/r/20230118080523.44522-1-ppbuk5246@gmail.com Signed-off-by: Levi Yun Cc: Laurent Pinchart Cc: Marek Szyprowski Cc: Joonsoo Kim Cc: Minchan Kim Signed-off-by: Andrew Morton commit 5649d113ffce9f532a9ecc5ab96a93e02efbf283 Author: Yang Yang Date: Wed Jan 18 20:13:03 2023 +0800 swap_state: update shadow_nodes for anonymous page Shadow_nodes is for shadow nodes reclaiming of workingset handling, it is updated when page cache add or delete since long time ago workingset only supported page cache. But when workingset supports anonymous page detection, we missied updating shadow nodes for it. This caused that shadow nodes of anonymous page will never be reclaimd by scan_shadow_nodes() even they use much memory and system memory is tense. So update shadow_nodes of anonymous page when swap cache is add or delete by calling xas_set_update(..workingset_update_node). Link: https://lkml.kernel.org/r/202301182013032211005@zte.com.cn Fixes: aae466b0052e ("mm/swap: implement workingset detection for anonymous LRU") Signed-off-by: Yang Yang Reviewed-by: Ran Xiaokai Cc: Bagas Sanjaya Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit 04bac040bc71b4b37550eed5854f34ca161756f9 Author: Sidhartha Kumar Date: Wed Jan 18 09:40:39 2023 -0800 mm/hugetlb: convert get_hwpoison_huge_page() to folios Straightforward conversion of get_hwpoison_huge_page() to get_hwpoison_hugetlb_folio(). Reduces two references to a head page in memory-failure.c [arnd@arndb.de: fix get_hwpoison_hugetlb_folio() stub] Link: https://lkml.kernel.org/r/20230119111920.635260-1-arnd@kernel.org Link: https://lkml.kernel.org/r/20230118174039.14247-1-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Signed-off-by: Arnd Bergmann Acked-by: Naoya Horiguchi Reviewed-by: Matthew Wilcox (Oracle) Cc: Mike Kravetz Cc: Muchun Song Signed-off-by: Andrew Morton commit b46402fa894f88ddb42a2e841618a8f42f57d16d Author: Sergey Senozhatsky Date: Wed Jan 18 09:52:10 2023 +0900 zsmalloc: set default zspage chain size to 8 This changes key characteristics (pages per-zspage and objects per-zspage) of a number of size classes which in results in different pool configuration. With zspage chain size of 8 we have more size clases clusters (123) and higher huge size class watermark (3632 bytes). Please read zsmalloc documentation for more details. Link: https://lkml.kernel.org/r/20230118005210.2814763-5-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Mike Kravetz Signed-off-by: Andrew Morton commit 4ff93b292c0b91b9a7c9fb54643f122bbe59d8d0 Author: Sergey Senozhatsky Date: Wed Jan 18 09:52:09 2023 +0900 zsmalloc: make zspage chain size configurable Remove hard coded limit on the maximum number of physical pages per-zspage. This will allow tuning of zsmalloc pool as zspage chain size changes `pages per-zspage` and `objects per-zspage` characteristics of size classes which also affects size classes clustering (the way size classes are merged). Link: https://lkml.kernel.org/r/20230118005210.2814763-4-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Mike Kravetz Signed-off-by: Andrew Morton commit e1d1f3546913ae0af9da31df8183a6f3da0cd590 Author: Sergey Senozhatsky Date: Wed Jan 18 09:52:08 2023 +0900 zsmalloc: skip chain size calculation for pow_of_2 classes If a class size is power of 2 then it wastes no memory and the best configuration is 1 physical page per-zspage. Link: https://lkml.kernel.org/r/20230118005210.2814763-3-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Mike Kravetz Signed-off-by: Andrew Morton commit 6260ae3583456808dceb4d78077e6388c49ca6d7 Author: Sergey Senozhatsky Date: Wed Jan 18 09:52:07 2023 +0900 zsmalloc: rework zspage chain size selection Patch series "zsmalloc: make zspage chain size configurable". Computers are bad at division. We currently decide the best zspage chain size (max number of physical pages per-zspage) by looking at a `used percentage` value. This is not enough as we lose precision during usage percentage calculations For example, let's look at size class 208: pages per zspage wasted bytes used% 1 144 96 2 80 99 3 16 99 4 160 99 Current algorithm will select 2 page per zspage configuration, as it's the first one to reach 99%. However, 3 pages per zspage waste less memory. Change algorithm and select zspage configuration that has lowest wasted value. Link: https://lkml.kernel.org/r/20230118005210.2814763-1-senozhatsky@chromium.org Link: https://lkml.kernel.org/r/20230118005210.2814763-2-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Mike Kravetz Signed-off-by: Andrew Morton commit 076cf7ea67010d11a97912423f4cdbeff1bd1f5f Author: Anshuman Khandual Date: Thu Jan 5 13:55:06 2023 +0530 mm/page_alloc: use deferred_pages_enabled() wherever applicable Instead of directly accessing static deferred_pages, replace such instances with the helper deferred_pages_enabled(). No functional change is intended. Link: https://lkml.kernel.org/r/20230105082506.241529-1-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Reviewed-by: Mike Rapoport (IBM) Reviewed-by: David Hildenbrand Acked-by: Mel Gorman Signed-off-by: Andrew Morton commit 7ec7096b8577d3b899c1dae456a414f2d08c7ddb Author: Pasha Tatashin Date: Tue Jan 17 20:46:17 2023 +0000 mm/page_ext: init page_ext early if there are no deferred struct pages page_ext must be initialized after all struct pages are initialized. Therefore, page_ext is initialized after page_alloc_init_late(), and can optionally be initialized earlier via early_page_ext kernel parameter which as a side effect also disables deferred struct pages. Allow to automatically init page_ext early when there are no deferred struct pages in order to be able to use page_ext during kernel boot and track for example page allocations early. [pasha.tatashin@soleen.com: fix build with CONFIG_PAGE_EXTENSION=n] Link: https://lkml.kernel.org/r/20230118155251.2522985-1-pasha.tatashin@soleen.com Link: https://lkml.kernel.org/r/20230117204617.1553748-1-pasha.tatashin@soleen.com Signed-off-by: Pasha Tatashin Acked-by: Mike Rapoport (IBM) Acked-by: Vlastimil Babka Cc: Charan Teja Kalla Cc: David Hildenbrand Cc: Li Zhe Cc: Michal Hocko Signed-off-by: Andrew Morton commit 64517d6e1291b5e942b00c53674ecf33f918313f Author: Huaisheng Ye Date: Mon Jan 16 14:23:47 2023 +0800 mm/damon/core: skip apply schemes if empty Sometimes there is no scheme in damon's context, for example just use damo record to monitor workload's data access pattern. If current damon context doesn't have any scheme in the list, kdamond has no need to iterate over list of all targets and regions but do nothing. So, skip apply schemes when ctx->schemes is empty. Link: https://lkml.kernel.org/r/20230116062347.1148553-1-huaisheng.ye@intel.com Signed-off-by: Huaisheng Ye Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton commit 98001fd63d59d2f99c90db823d322de91ff7d771 Author: Colin Ian King Date: Mon Jan 16 16:43:32 2023 +0000 mm/secretmem: remove redundant initiialization of pointer file The pointer file is being initialized with a value that is never read, it is being re-assigned later on. Clean up code by removing the redundant initialization. Link: https://lkml.kernel.org/r/20230116164332.79500-1-colin.i.king@gmail.com Signed-off-by: Colin Ian King Reviewed-by: Andrew Morton Reviewed-by: Mike Rapoport (IBM) Signed-off-by: Andrew Morton commit 11a980420719712f419dbb325940907f5d1afbdd Author: Matthew Wilcox (Oracle) Date: Mon Jan 16 19:39:41 2023 +0000 readahead: convert readahead_expand() to use a folio Replace the uses of page with a folio. Also add a missing test for workingset in the leading edge expansion. Link: https://lkml.kernel.org/r/20230116193941.2148487-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: William Kucharski Signed-off-by: Andrew Morton commit eff3b364b496e01ec789f3e15a51f9a3589e2a23 Author: Matthew Wilcox (Oracle) Date: Mon Jan 16 19:39:40 2023 +0000 filemap: convert filemap_range_has_page() to use a folio The folio isn't returned from this function, so this is an entirely internal change. Link: https://lkml.kernel.org/r/20230116193941.2148487-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: William Kucharski Signed-off-by: Andrew Morton commit 8808ecab3afc18958a9216911cd7967017e7057c Author: Matthew Wilcox (Oracle) Date: Mon Jan 16 19:39:39 2023 +0000 filemap: convert filemap_map_pmd() to take a folio Patch series "Some more filemap folio conversions". Three more places which could easily be converted to folios. The third one fixes a minor bug in readahead_expand(), but it's only a performance bug and there are few users of readahead_expand(), so I don't think it's worth backporting. This patch (of 3): Save a few calls to compound_head(). We specify exactly which page from the folio to use by passing in start_pgoff, which means this will work for a folio which is larger than PMD size. The rest of the VM isn't prepared for that yet, but now this function is. Link: https://lkml.kernel.org/r/20230116193941.2148487-1-willy@infradead.org Link: https://lkml.kernel.org/r/20230116193941.2148487-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: William Kucharski Signed-off-by: Andrew Morton commit 5b4bd90f9ac76136c7148684b12276d4ae2d64a2 Author: Matthew Wilcox (Oracle) Date: Mon Jan 16 19:29:59 2023 +0000 rmap: add folio parameter to __page_set_anon_rmap() Avoid the compound_head() call in PageAnon() by passing in the folio that all callers have. Also save me from wondering whether page->mapping can ever be overwritten on a tail page (I don't think it can, but I'm not 100% sure). Link: https://lkml.kernel.org/r/20230116192959.2147032-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: William Kucharski Signed-off-by: Andrew Morton commit e0650a41f7d024b72669a2a2db846ef70281abd8 Author: Matthew Wilcox (Oracle) Date: Mon Jan 16 19:28:27 2023 +0000 mm: clean up mlock_page / munlock_page references in comments Change documentation and comments that refer to now-renamed functions. Link: https://lkml.kernel.org/r/20230116192827.2146732-5-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 672aa27d0bd241759376e62b78abb8aae1792479 Author: Matthew Wilcox (Oracle) Date: Mon Jan 16 19:28:26 2023 +0000 mm: remove munlock_vma_page() All callers now have a folio and can call munlock_vma_folio(). Update the documentation to refer to munlock_vma_folio(). Link: https://lkml.kernel.org/r/20230116192827.2146732-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 7efecffb8e7968c4a6c53177b0053ca4765fe233 Author: Matthew Wilcox (Oracle) Date: Mon Jan 16 19:28:25 2023 +0000 mm: remove mlock_vma_page() All callers now have a folio and can call mlock_vma_folio(). Update the documentation to refer to mlock_vma_folio(). Link: https://lkml.kernel.org/r/20230116192827.2146732-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 90c9d13a47d45f2f16530c4d62af2fa4d74dfd16 Author: Matthew Wilcox (Oracle) Date: Mon Jan 16 19:28:24 2023 +0000 mm: remove page_evictable() Patch series "Remove leftover mlock/munlock page wrappers". We no longer need the various mlock page functions as all callers have folios. This patch (of 4): This function now has no users. Also update the unevictable-lru documentation to discuss folios instead of pages (mostly). [akpm@linux-foundation.org: fix Documentation/mm/unevictable-lru.rst underlining] Link: https://lkml.kernel.org/r/20230117145106.585b277b@canb.auug.org.au Link: https://lkml.kernel.org/r/20230116192827.2146732-1-willy@infradead.org Link: https://lkml.kernel.org/r/20230116192827.2146732-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 75376c6fb93b99e94192cfff48222d11819ee917 Author: Matthew Wilcox (Oracle) Date: Mon Jan 16 19:25:07 2023 +0000 mm: convert mem_cgroup_css_from_page() to mem_cgroup_css_from_folio() Only one caller doesn't have a folio, so move the page_folio() call to that one caller from mem_cgroup_css_from_folio(). Link: https://lkml.kernel.org/r/20230116192507.2146150-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 9cfb816b1c6c99f4b3c1d4a0fb096162cd17ec71 Author: Matthew Wilcox (Oracle) Date: Mon Jan 16 19:25:06 2023 +0000 mm/fs: convert inode_attach_wb() to take a folio Patch series "Writeback folio conversions". Remove more calls to compound_head() by passing folios around instead of pages. This patch (of 2): The only caller of inode_attach_wb() which doesn't pass NULL already has a folio, so convert the whole call-chain to take folios. Link: https://lkml.kernel.org/r/20230116192507.2146150-1-willy@infradead.org Link: https://lkml.kernel.org/r/20230116192507.2146150-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 14ddee4126fecff5c5c0a84940ba34f0bfe3e708 Author: Matthew Wilcox (Oracle) Date: Mon Jan 16 19:18:13 2023 +0000 mm: use a folio in copy_present_pte() We still have to keep the page around because we need to know which page in the folio we're copying, but we can replace five implict calls to compound_head() with one. Link: https://lkml.kernel.org/r/20230116191813.2145215-6-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Zi Yan Signed-off-by: Andrew Morton commit edf5047058395c89a912783ea29ec8f9e53be414 Author: Matthew Wilcox (Oracle) Date: Mon Jan 16 19:18:12 2023 +0000 mm: use a folio in copy_pte_range() Allocate an order-0 folio instead of a page and pass it all the way down the call chain. Removes dozens of calls to compound_head(). Link: https://lkml.kernel.org/r/20230116191813.2145215-5-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Zi Yan Signed-off-by: Andrew Morton commit 28d41a4863316321bb5aa616bd82d65c84fc0f8b Author: Matthew Wilcox (Oracle) Date: Mon Jan 16 19:18:11 2023 +0000 mm: convert wp_page_copy() to use folios Use new_folio instead of new_page throughout, because we allocated it and know it's an order-0 folio. Most old_page uses become old_folio, but use vmf->page where we need the precise page. Link: https://lkml.kernel.org/r/20230116191813.2145215-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Zi Yan Signed-off-by: Andrew Morton commit cb3184deef10fdc7658fb366189864c89ad118c9 Author: Matthew Wilcox (Oracle) Date: Mon Jan 16 19:18:10 2023 +0000 mm: convert do_anonymous_page() to use a folio Removes six calls to compound_head(); some inline and some external. Link: https://lkml.kernel.org/r/20230116191813.2145215-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Zi Yan Signed-off-by: Andrew Morton commit 6bc56a4d855303705802c5ede4625973637484c7 Author: Matthew Wilcox (Oracle) Date: Mon Jan 16 19:18:09 2023 +0000 mm: add vma_alloc_zeroed_movable_folio() Replace alloc_zeroed_user_highpage_movable(). The main difference is returning a folio containing a single page instead of returning the page, but take the opportunity to rename the function to match other allocation functions a little better and rewrite the documentation to place more emphasis on the zeroing rather than the highmem aspect. Link: https://lkml.kernel.org/r/20230116191813.2145215-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Zi Yan Signed-off-by: Andrew Morton commit c5792d9384113de4085dfbce6940e2a853debb67 Author: Vishal Moola (Oracle) Date: Wed Jan 4 13:14:48 2023 -0800 filemap: remove find_get_pages_range_tag() All callers to find_get_pages_range_tag(), find_get_pages_tag(), pagevec_lookup_range_tag(), and pagevec_lookup_tag() have been removed. Link: https://lkml.kernel.org/r/20230104211448.4804-24-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit 243c5ea4f783922f46779f9071b1948e1c1d0291 Author: Vishal Moola (Oracle) Date: Wed Jan 4 13:14:47 2023 -0800 nilfs2: convert nilfs_clear_dirty_pages() to use filemap_get_folios_tag() Convert function to use folios throughout. This is in preparation for the removal of find_get_pages_range_tag(). This change removes 2 calls to compound_head(). Link: https://lkml.kernel.org/r/20230104211448.4804-23-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Acked-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit d4a16d31334e0a1dd948dfb2977f241805fd0e14 Author: Vishal Moola (Oracle) Date: Wed Jan 4 13:14:46 2023 -0800 nilfs2: convert nilfs_copy_dirty_pages() to use filemap_get_folios_tag() Convert function to use folios throughout. This is in preparation for the removal of find_get_pages_range_tag(). This change removes 8 calls to compound_head(). Link: https://lkml.kernel.org/r/20230104211448.4804-22-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Acked-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 41f3f3b5373e9b7372a0ecf4814c01f62600c124 Author: Vishal Moola (Oracle) Date: Wed Jan 4 13:14:45 2023 -0800 nilfs2: convert nilfs_btree_lookup_dirty_buffers() to use filemap_get_folios_tag() Convert function to use folios throughout. This is in preparation for the removal of find_get_pages_range_tag(). This change removes 1 call to compound_head(). Link: https://lkml.kernel.org/r/20230104211448.4804-21-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Acked-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit a2458658316959a1756d06c2f64ba8a6f316f9de Author: Vishal Moola (Oracle) Date: Wed Jan 4 13:14:44 2023 -0800 nilfs2: convert nilfs_lookup_dirty_node_buffers() to use filemap_get_folios_tag() Convert function to use folios throughout. This is in preparation for the removal of find_get_pages_range_tag(). This change removes 1 call to compound_head(). Link: https://lkml.kernel.org/r/20230104211448.4804-20-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Acked-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 5ee4b25cb7302ae2c62fab7adc1529d9f497bc6d Author: Vishal Moola (Oracle) Date: Wed Jan 4 13:14:43 2023 -0800 nilfs2: convert nilfs_lookup_dirty_data_buffers() to use filemap_get_folios_tag() Convert function to use folios throughout. This is in preparation for the removal of find_get_pages_range_tag(). This change removes 4 calls to compound_head(). Link: https://lkml.kernel.org/r/20230104211448.4804-19-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Acked-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 87ed37e66dfd08f6d692969cbd39282a359a2f7d Author: Vishal Moola (Oracle) Date: Wed Jan 4 13:14:42 2023 -0800 gfs2: convert gfs2_write_cache_jdata() to use filemap_get_folios_tag() Convert function to use folios throughout. This is in preparation for the removal of find_get_pgaes_range_tag(). This change removes 8 calls to compound_head(). Also had to modify and rename gfs2_write_jdata_pagevec() to take in and utilize folio_batch rather than pagevec and use folios rather than pages. gfs2_write_jdata_batch() now supports large folios. Link: https://lkml.kernel.org/r/20230104211448.4804-18-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Reviewed-by: Andreas Gruenbacher Signed-off-by: Andrew Morton commit 580e7a4926089ea735fa09d42030d90e21537f7f Author: Vishal Moola (Oracle) Date: Wed Jan 4 13:14:41 2023 -0800 f2fs: convert f2fs_sync_meta_pages() to use filemap_get_folios_tag() Convert function to use folios throughout. This is in preparation for the removal of find_get_pages_range_tag(). This change removes 5 calls to compound_head(). Initially the function was checking if the previous page index is truly the previous page i.e. 1 index behind the current page. To convert to folios and maintain this check we need to make the check folio->index != prev + folio_nr_pages(previous folio) since we don't know how many pages are in a folio. At index i == 0 the check is guaranteed to succeed, so to workaround indexing bounds we can simply ignore the check for that specific index. This makes the initial assignment of prev trivial, so I removed that as well. Also modify a comment in commit_checkpoint for consistency. Link: https://lkml.kernel.org/r/20230104211448.4804-17-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Acked-by: Chao Yu Signed-off-by: Andrew Morton commit 4f4a4f0febe6009a4cdc8acac52cc5dc980f185c Author: Vishal Moola (Oracle) Date: Wed Jan 4 13:14:40 2023 -0800 f2fs: convert last_fsync_dnode() to use filemap_get_folios_tag() Convert to use a folio_batch instead of pagevec. This is in preparation for the removal of find_get_pages_range_tag(). Link: https://lkml.kernel.org/r/20230104211448.4804-16-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Acked-by: Chao Yu Signed-off-by: Andrew Morton commit 1cd98ee747cff120ee9b93988ddb7315d8d8f8e7 Author: Vishal Moola (Oracle) Date: Wed Jan 4 13:14:39 2023 -0800 f2fs: convert f2fs_write_cache_pages() to use filemap_get_folios_tag() Convert the function to use a folio_batch instead of pagevec. This is in preparation for the removal of find_get_pages_range_tag(). Also modified f2fs_all_cluster_page_ready to take in a folio_batch instead of pagevec. This does NOT support large folios. The function currently only utilizes folios of size 1 so this shouldn't cause any issues right now. This version of the patch limits the number of pages fetched to F2FS_ONSTACK_PAGES. If that ever happens, update the start index here since filemap_get_folios_tag() updates the index to be after the last found folio, not necessarily the last used page. Link: https://lkml.kernel.org/r/20230104211448.4804-15-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Acked-by: Chao Yu Signed-off-by: Andrew Morton commit 7525486affa518c9e7ffc9b9dbc966021041ebde Author: Vishal Moola (Oracle) Date: Wed Jan 4 13:14:38 2023 -0800 f2fs: convert f2fs_sync_node_pages() to use filemap_get_folios_tag() Convert function to use a folio_batch instead of pagevec. This is in preparation for the removal of find_get_pages_range_tag(). Link: https://lkml.kernel.org/r/20230104211448.4804-14-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Acked-by: Chao Yu Signed-off-by: Andrew Morton commit a40a4ad1186a37671070786b8143b16377899b5d Author: Vishal Moola (Oracle) Date: Wed Jan 4 13:14:37 2023 -0800 f2fs: convert f2fs_flush_inline_data() to use filemap_get_folios_tag() Convert function to use a folio_batch instead of pagevec. This is in preparation for the removal of find_get_pages_tag(). Link: https://lkml.kernel.org/r/20230104211448.4804-13-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Acked-by: Chao Yu Signed-off-by: Andrew Morton commit e6e46e1eb7cea179b9b31a62a0bbac6ba24bd050 Author: Vishal Moola (Oracle) Date: Wed Jan 4 13:14:36 2023 -0800 f2fs: convert f2fs_fsync_node_pages() to use filemap_get_folios_tag() Convert function to use a folio_batch instead of pagevec. This is in preparation for the removal of find_get_pages_range_tag(). Link: https://lkml.kernel.org/r/20230104211448.4804-12-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Acked-by: Chao Yu Signed-off-by: Andrew Morton commit 50ead2537441f7df8d493e1085da76034ea92cf1 Author: Vishal Moola (Oracle) Date: Wed Jan 4 13:14:35 2023 -0800 ext4: convert mpage_prepare_extent_to_map() to use filemap_get_folios_tag() Convert the function to use folios throughout. This is in preparation for the removal of find_get_pages_range_tag(). Now supports large folios. This change removes 11 calls to compound_head(). Link: https://lkml.kernel.org/r/20230104211448.4804-11-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit 4cda80f3a7a53a0bc66cd9f16f7872524cfdd87d Author: Vishal Moola (Oracle) Date: Wed Jan 4 13:14:34 2023 -0800 cifs: convert wdata_alloc_and_fillpages() to use filemap_get_folios_tag() This is in preparation for the removal of find_get_pages_range_tag(). Now also supports the use of large folios. Since tofind might be larger than the max number of folios in a folio_batch (15), we loop through filling in wdata->pages pulling more batches until we either reach tofind pages or run out of folios. This function may not return all pages in the last found folio before tofind pages are reached. Link: https://lkml.kernel.org/r/20230104211448.4804-10-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Acked-by: Paulo Alcantara (SUSE) Cc: Tom Talpey Signed-off-by: Andrew Morton commit 590a2b5f0a9b740e415e0d52bd8a0f87fc15b87b Author: Vishal Moola (Oracle) Date: Wed Jan 4 13:14:33 2023 -0800 ceph: convert ceph_writepages_start() to use filemap_get_folios_tag() Convert function to use a folio_batch instead of pagevec. This is in preparation for the removal of find_get_pages_range_tag(). Also some minor renaming for consistency. Link: https://lkml.kernel.org/r/20230104211448.4804-9-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Acked-by: Jeff Layton Signed-off-by: Andrew Morton commit 9f50fd2e92e37441da3a1daa8e27fd0c400b6cdd Author: Vishal Moola (Oracle) Date: Wed Jan 4 13:14:32 2023 -0800 btrfs: convert extent_write_cache_pages() to use filemap_get_folios_tag() Convert function to use folios throughout. This is in preparation for the removal of find_get_pages_range_tag(). Now also supports large folios. Link: https://lkml.kernel.org/r/20230104211448.4804-8-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Acked-by: David Sterba Signed-off-by: Andrew Morton commit 51c5cd3bafe5e1e8a678d661c43b09d7c6584274 Author: Vishal Moola (Oracle) Date: Wed Jan 4 13:14:31 2023 -0800 btrfs: convert btree_write_cache_pages() to use filemap_get_folio_tag() Convert function to use folios throughout. This is in preparation for the removal of find_get_pages_range_tag(). Link: https://lkml.kernel.org/r/20230104211448.4804-7-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Acked-by: David Sterba Signed-off-by: Andrew Morton commit acc8d8588cb7e3e64b0d2fa611dad06574cd67b1 Author: Vishal Moola (Oracle) Date: Wed Jan 4 13:14:30 2023 -0800 afs: convert afs_writepages_region() to use filemap_get_folios_tag() Convert to use folios throughout. This function is in preparation to remove find_get_pages_range_tag(). Also modify this function to write the whole batch one at a time, rather than calling for a new set every single write. Link: https://lkml.kernel.org/r/20230104211448.4804-6-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Tested-by: David Howells Signed-off-by: Andrew Morton commit 0fff435f060c8b29cb068d4068cb2df513046865 Author: Vishal Moola (Oracle) Date: Wed Jan 4 13:14:29 2023 -0800 page-writeback: convert write_cache_pages() to use filemap_get_folios_tag() Convert function to use folios throughout. This is in preparation for the removal of find_get_pages_range_tag(). This change removes 8 calls to compound_head(), and the function now supports large folios. Link: https://lkml.kernel.org/r/20230104211448.4804-5-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Reviewed-by: Matthew Wilcow (Oracle) Signed-off-by: Andrew Morton commit 6817ef514e1aacee228f6a9fbcdc3a2c49cb6c29 Author: Vishal Moola (Oracle) Date: Wed Jan 4 13:14:28 2023 -0800 filemap: convert __filemap_fdatawait_range() to use filemap_get_folios_tag() Convert function to use folios. This is in preparation for the removal of find_get_pages_range_tag(). This change removes 2 calls to compound_head(). Link: https://lkml.kernel.org/r/20230104211448.4804-4-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Reviewed-by: Matthew Wilcow (Oracle) Signed-off-by: Andrew Morton commit 247f9e1feef4e57911510c8f82348efb4491ea0e Author: Vishal Moola (Oracle) Date: Wed Jan 4 13:14:27 2023 -0800 filemap: add filemap_get_folios_tag() This is the equivalent of find_get_pages_range_tag(), except for folios instead of pages. One noteable difference is filemap_get_folios_tag() does not take in a maximum pages argument. It instead tries to fill a folio batch and stops either once full (15 folios) or reaching the end of the search range. The new function supports large folios, the initial function did not since all callers don't use large folios. Link: https://lkml.kernel.org/r/20230104211448.4804-3-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Reviewed-by: Matthew Wilcow (Oracle) Signed-off-by: Andrew Morton commit ee7a5906ff08e435ed95ec9fe7c7eed2c11015d2 Author: Vishal Moola (Oracle) Date: Wed Jan 4 13:14:26 2023 -0800 pagemap: add filemap_grab_folio() Patch series "Convert to filemap_get_folios_tag()", v5. This patch series replaces find_get_pages_range_tag() with filemap_get_folios_tag(). This also allows the removal of multiple calls to compound_head() throughout. It also makes a good chunk of the straightforward conversions to folios, and takes the opportunity to introduce a function that grabs a folio from the pagecache. This patch (of 23): Add function filemap_grab_folio() to grab a folio from the page cache. This function is meant to serve as a folio replacement for grab_cache_page, and is used to facilitate the removal of find_get_pages_range_tag(). Link: https://lkml.kernel.org/r/20230104211448.4804-1-vishal.moola@gmail.com Link: https://lkml.kernel.org/r/20230104211448.4804-2-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 2cf1338454a8a9a0b3c1271ccb521afa2d6ae241 Author: David Stevens Date: Fri Jan 13 11:30:11 2023 +0900 mm: fix khugepaged with shmem_enabled=advise Pass vm_flags as a parameter to shmem_is_huge, rather than reading the flags from the vm_area_struct in question. This allows the updated flags from hugepage_madvise to be passed to the check, which is necessary because madvise does not update the vm_area_struct's flags until after hugepage_madvise returns. This fixes an issue when shmem_enabled=madvise, where MADV_HUGEPAGE on shmem was not able to register the mm_struct with khugepaged. Prior to cd89fb065099, the mm_struct was registered by MADV_HUGEPAGE regardless of the value of shmem_enabled (which was only checked when scanning vmas). Link: https://lkml.kernel.org/r/20230113023011.1784015-1-stevensd@google.com Fixes: cd89fb065099 ("mm,thp,shmem: make khugepaged obey tmpfs mount flags") Signed-off-by: David Stevens Cc: David Stevens Cc: Hugh Dickins Cc: Rik van Riel Signed-off-by: Andrew Morton commit 2973d8229b78d3f148e0c45916a1e8b237dc6167 Author: NeilBrown Date: Fri Jan 13 11:12:17 2023 +0000 mm: discard __GFP_ATOMIC __GFP_ATOMIC serves little purpose. Its main effect is to set ALLOC_HARDER which adds a few little boosts to increase the chance of an allocation succeeding, one of which is to lower the water-mark at which it will succeed. It is *always* paired with __GFP_HIGH which sets ALLOC_HIGH which also adjusts this watermark. It is probable that other users of __GFP_HIGH should benefit from the other little bonuses that __GFP_ATOMIC gets. __GFP_ATOMIC also gives a warning if used with __GFP_DIRECT_RECLAIM. There is little point to this. We already get a might_sleep() warning if __GFP_DIRECT_RECLAIM is set. __GFP_ATOMIC allows the "watermark_boost" to be side-stepped. It is probable that testing ALLOC_HARDER is a better fit here. __GFP_ATOMIC is used by tegra-smmu.c to check if the allocation might sleep. This should test __GFP_DIRECT_RECLAIM instead. This patch: - removes __GFP_ATOMIC - allows __GFP_HIGH allocations to ignore watermark boosting as well as GFP_ATOMIC requests. - makes other adjustments as suggested by the above. The net result is not change to GFP_ATOMIC allocations. Other allocations that use __GFP_HIGH will benefit from a few different extra privileges. This affects: xen, dm, md, ntfs3 the vermillion frame buffer hibernation ksm swap all of which likely produce more benefit than cost if these selected allocation are more likely to succeed quickly. [mgorman: Minor adjustments to rework on top of a series] Link: https://lkml.kernel.org/r/163712397076.13692.4727608274002939094@noble.neil.brown.name Link: https://lkml.kernel.org/r/20230113111217.14134-7-mgorman@techsingularity.net Signed-off-by: NeilBrown Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Matthew Wilcox Cc: Thierry Reding Signed-off-by: Andrew Morton commit 1ebbb21811b76c3b932959787f37985af36f62fa Author: Mel Gorman Date: Fri Jan 13 11:12:16 2023 +0000 mm/page_alloc: explicitly define how __GFP_HIGH non-blocking allocations accesses reserves GFP_ATOMIC allocations get flagged ALLOC_HARDER which is a vague description. In preparation for the removal of GFP_ATOMIC redefine __GFP_ATOMIC to simply mean non-blocking and renaming ALLOC_HARDER to ALLOC_NON_BLOCK accordingly. __GFP_HIGH is required for access to reserves but non-blocking is granted more access. For example, GFP_NOWAIT is non-blocking but has no special access to reserves. A __GFP_NOFAIL blocking allocation is granted access similar to __GFP_HIGH if the only alternative is an OOM kill. Link: https://lkml.kernel.org/r/20230113111217.14134-6-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Michal Hocko Cc: Matthew Wilcox Cc: NeilBrown Cc: Thierry Reding Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit ab3508854353793cd35e348fde89a5c09b2fd8b5 Author: Mel Gorman Date: Fri Jan 13 11:12:15 2023 +0000 mm/page_alloc: explicitly define what alloc flags deplete min reserves As there are more ALLOC_ flags that affect reserves, define what flags affect reserves and clarify the effect of each flag. Link: https://lkml.kernel.org/r/20230113111217.14134-5-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Matthew Wilcox Cc: NeilBrown Cc: Thierry Reding Signed-off-by: Andrew Morton commit eb2e2b425c6984ca8034448a3f2c680622bd3d4d Author: Mel Gorman Date: Fri Jan 13 11:12:14 2023 +0000 mm/page_alloc: explicitly record high-order atomic allocations in alloc_flags A high-order ALLOC_HARDER allocation is assumed to be atomic. While that is accurate, it changes later in the series. In preparation, explicitly record high-order atomic allocations in gfp_to_alloc_flags(). Link: https://lkml.kernel.org/r/20230113111217.14134-4-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Matthew Wilcox Cc: NeilBrown Cc: Thierry Reding Signed-off-by: Andrew Morton commit c988dcbecf3fd5430921eaa3fe9054754f76d185 Author: Mel Gorman Date: Fri Jan 13 11:12:13 2023 +0000 mm/page_alloc: treat RT tasks similar to __GFP_HIGH RT tasks are allowed to dip below the min reserve but ALLOC_HARDER is typically combined with ALLOC_MIN_RESERVE so RT tasks are a little unusual. While there is some justification for allowing RT tasks access to memory reserves, there is a strong chance that a RT task that is also under memory pressure is at risk of missing deadlines anyway. Relax how much reserves an RT task can access by treating it the same as __GFP_HIGH allocations. Note that in a future kernel release that the RT special casing will be removed. Hard realtime tasks should be locking down resources in advance and ensuring enough memory is available. Even a soft-realtime task like audio or video live decoding which cannot jitter should be allocating both memory and any disk space required up-front before the recording starts instead of relying on reserves. At best, reserve access will only delay the problem by a very short interval. Link: https://lkml.kernel.org/r/20230113111217.14134-3-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Matthew Wilcox Cc: NeilBrown Cc: Thierry Reding Signed-off-by: Andrew Morton commit 524c48072e5673f4511f1ad81493e2485863fd65 Author: Mel Gorman Date: Fri Jan 13 11:12:12 2023 +0000 mm/page_alloc: rename ALLOC_HIGH to ALLOC_MIN_RESERVE Patch series "Discard __GFP_ATOMIC", v3. Neil's patch has been residing in mm-unstable as commit 2fafb4fe8f7a ("mm: discard __GFP_ATOMIC") for a long time and recently brought up again. Most recently, I was worried that __GFP_HIGH allocations could use high-order atomic reserves which is unintentional but there was no response so lets revisit -- this series reworks how min reserves are used, protects highorder reserves and then finishes with Neil's patch with very minor modifications so it fits on top. There was a review discussion on renaming __GFP_DIRECT_RECLAIM to __GFP_ALLOW_BLOCKING but I didn't think it was that big an issue and is orthogonal to the removal of __GFP_ATOMIC. There were some concerns about how the gfp flags affect the min reserves but it never reached a solid conclusion so I made my own attempt. The series tries to iron out some of the details on how reserves are used. ALLOC_HIGH becomes ALLOC_MIN_RESERVE and ALLOC_HARDER becomes ALLOC_NON_BLOCK and documents how the reserves are affected. For example, ALLOC_NON_BLOCK (no direct reclaim) on its own allows 25% of the min reserve. ALLOC_MIN_RESERVE (__GFP_HIGH) allows 50% and both combined allows deeper access again. ALLOC_OOM allows access to 75%. High-order atomic allocations are explicitly handled with the caveat that no __GFP_ATOMIC flag means that any high-order allocation that specifies GFP_HIGH and cannot enter direct reclaim will be treated as if it was GFP_ATOMIC. This patch (of 6): __GFP_HIGH aliases to ALLOC_HIGH but the name does not really hint what it means. As ALLOC_HIGH is internal to the allocator, rename it to ALLOC_MIN_RESERVE to document that the min reserves can be depleted. Link: https://lkml.kernel.org/r/20230113111217.14134-1-mgorman@techsingularity.net Link: https://lkml.kernel.org/r/20230113111217.14134-2-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Matthew Wilcox Cc: NeilBrown Cc: Thierry Reding Signed-off-by: Andrew Morton commit 6189eb82f0aec8a877190bf52e629c687ed02773 Author: Pasha Tatashin Date: Fri Jan 13 15:42:53 2023 +0000 mm/page_ext: do not allocate space for page_ext->flags if not needed There is 8 byte page_ext->flags field allocated per page whenever CONFIG_PAGE_EXTENSION is enabled. However, not every user of page_ext uses flags. Therefore, check whether flags is needed at least by one user and if so allocate space for it. For example when page_table_check is enabled, on a machine with 128G of memory before the fix: [ 2.244288] allocated 536870912 bytes of page_ext after the fix: [ 2.160154] allocated 268435456 bytes of page_ext Also, add a kernel-doc comment before page_ext_operations that describes the fields, and remove check if need() is set, as that is now a required field. [pasha.tatashin@soleen.com: address comments from Mike Rapoport] Link: https://lkml.kernel.org/r/20230117202103.1412449-1-pasha.tatashin@soleen.com Link: https://lkml.kernel.org/r/20230113154253.92480-1-pasha.tatashin@soleen.com Signed-off-by: Pasha Tatashin Acked-by: David Hildenbrand Acked-by: Vlastimil Babka Acked-by: David Rientjes Reviewed-by: Mike Rapoport (IBM) Cc: Charan Teja Kalla Cc: Li Zhe Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 950fe885a89770619e315f9b46301eebf0aab7b3 Author: David Hildenbrand Date: Fri Jan 13 18:10:26 2023 +0100 mm: remove __HAVE_ARCH_PTE_SWP_EXCLUSIVE __HAVE_ARCH_PTE_SWP_EXCLUSIVE is now supported by all architectures that support swp PTEs, so let's drop it. Link: https://lkml.kernel.org/r/20230113171026.582290-27-david@redhat.com Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton commit f5c3fe300c5b40ff9af5ce2c9dd9897e91ce5735 Author: David Hildenbrand Date: Fri Jan 13 18:10:25 2023 +0100 xtensa/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE by using bit 1. This bit should be safe to use for our usecase. Most importantly, we can still distinguish swap PTEs from PAGE_NONE PTEs (see pte_present()) and don't use one of the two reserved attribute masks (1101 and 1111). Attribute mask 1100 and 1110 now identify swap PTEs. While at it, remove SWP_TYPE_BITS (not really helpful as it's not used in the actual swap macros) and mask the type in __swp_entry(). Link: https://lkml.kernel.org/r/20230113171026.582290-26-david@redhat.com Signed-off-by: David Hildenbrand Cc: Chris Zankel Cc: Max Filippov Signed-off-by: Andrew Morton commit 93c0eac40d4e3ce4d5a3c6e0dc74eceaf8f63e0d Author: David Hildenbrand Date: Fri Jan 13 18:10:24 2023 +0100 x86/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE also on 32bit Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE just like we already do on x86-64. After deciphering the PTE layout it becomes clear that there are still unused bits for 2-level and 3-level page tables that we should be able to use. Reusing a bit avoids stealing one bit from the swap offset. While at it, mask the type in __swp_entry(); use some helper definitions to make the macros easier to grasp. Link: https://lkml.kernel.org/r/20230113171026.582290-25-david@redhat.com Signed-off-by: David Hildenbrand Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Signed-off-by: Andrew Morton commit e2858d778e6832d8f58dc3b361f78bd9f03cd2dd Author: David Hildenbrand Date: Fri Jan 13 18:10:23 2023 +0100 um/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE by using bit 10, which is yet unused for swap PTEs. The pte_mkuptodate() is a bit weird in __pte_to_swp_entry() for a swap PTE ... but it only messes with bit 1 and 2 and there is a comment in set_pte(), so leave these bits alone. While at it, mask the type in __swp_entry(). Link: https://lkml.kernel.org/r/20230113171026.582290-24-david@redhat.com Signed-off-by: David Hildenbrand Cc: Richard Weinberger Cc: Anton Ivanov Cc: Johannes Berg Signed-off-by: Andrew Morton commit adf8e329ff56a873c789f797a69a330fb8c4ff9e Author: David Hildenbrand Date: Fri Jan 13 18:10:22 2023 +0100 sparc/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE on 64bit Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE by stealing one bit from the type. Generic MM currently only uses 5 bits for the type (MAX_SWAPFILES_SHIFT), so the stolen bit was effectively unused. While at it, mask the type in __swp_entry(). Link: https://lkml.kernel.org/r/20230113171026.582290-23-david@redhat.com Signed-off-by: David Hildenbrand Cc: "David S. Miller" Signed-off-by: Andrew Morton commit e6b37d7f6f17db638275b6f8fd78714c047e3a57 Author: David Hildenbrand Date: Fri Jan 13 18:10:21 2023 +0100 sparc/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE on 32bit Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE by reusing the SRMMU_DIRTY bit as that seems to be safe to reuse inside a swap PTE. This avoids having to steal one bit from the swap offset. While at it, relocate the swap PTE layout documentation and use the same style now used for most other archs. Note that the old documentation was wrong: we use 20 bit for the offset and the reserved bits were 8 instead of 7 bits in the ascii art. Link: https://lkml.kernel.org/r/20230113171026.582290-22-david@redhat.com Signed-off-by: David Hildenbrand Cc: "David S. Miller" Signed-off-by: Andrew Morton commit cca10df1029373cda5904887544ca6fcbbd2bac7 Author: David Hildenbrand Date: Fri Jan 13 18:10:20 2023 +0100 sh/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE by using bit 6 in the PTE, reducing the swap type in the !CONFIG_X2TLB case to 5 bits. Generic MM currently only uses 5 bits for the type (MAX_SWAPFILES_SHIFT), so the stolen bit is effectively unused. Interrestingly, the swap type in the !CONFIG_X2TLB case could currently overlap with the _PAGE_PRESENT bit, because there is a sneaky shift by 1 in __pte_to_swp_entry() and __swp_entry_to_pte(). Bit 0-7 in the architecture specific swap PTE would get shifted to bit 1-8 in the PTE. As generic MM uses 5 bits only, this didn't matter so far. While at it, mask the type in __swp_entry(). Link: https://lkml.kernel.org/r/20230113171026.582290-21-david@redhat.com Signed-off-by: David Hildenbrand Cc: Yoshinori Sato Cc: Rich Felker Signed-off-by: Andrew Morton commit 51a1007d4113c632ec5229c685e2162b72d9746d Author: David Hildenbrand Date: Fri Jan 13 18:10:19 2023 +0100 riscv/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE by stealing one bit from the offset. This reduces the maximum swap space per file: on 32bit to 16 GiB (was 32 GiB). Note that this bit does not conflict with swap PMDs and could also be used in swap PMD context later. While at it, mask the type in __swp_entry(). Link: https://lkml.kernel.org/r/20230113171026.582290-20-david@redhat.com Signed-off-by: David Hildenbrand Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Signed-off-by: Andrew Morton commit 2bba2ffbe0303552142af944b891967ccf69a63b Author: David Hildenbrand Date: Fri Jan 13 18:10:18 2023 +0100 powerpc/nohash/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE on 32bit and 64bit. On 64bit, let's use MSB 56 (LSB 7), located right next to the page type. On 32bit, let's use LSB 2 to avoid stealing one bit from the swap offset. There seems to be no real reason why these bits cannot be used for swap PTEs. The important part is that _PAGE_PRESENT and _PAGE_HASHPTE remain 0. While at it, mask the type in __swp_entry() and remove _PAGE_BIT_SWAP_TYPE from pte-e500.h: while it was used in 64bit code it was ignored in 32bit code. Link: https://lkml.kernel.org/r/20230113171026.582290-19-david@redhat.com Signed-off-by: David Hildenbrand Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Signed-off-by: Andrew Morton commit 8897ebff37fd34920d380cbfafbfb47804eb4009 Author: David Hildenbrand Date: Fri Jan 13 18:10:17 2023 +0100 powerpc/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE on 32bit book3s We already implemented support for 64bit book3s in commit bff9beaa2e80 ("powerpc/pgtable: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE for book3s") Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE also in 32bit by reusing yet unused LSB 2 / MSB 29. There seems to be no real reason why that bit cannot be used, and reusing it avoids having to steal one bit from the swap offset. While at it, mask the type in __swp_entry(). Link: https://lkml.kernel.org/r/20230113171026.582290-18-david@redhat.com Signed-off-by: David Hildenbrand Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Signed-off-by: Andrew Morton commit 6d239fc78c0b0c687e5408573350714e6e789d71 Author: David Hildenbrand Date: Fri Jan 13 18:10:16 2023 +0100 parisc/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE by using the yet-unused _PAGE_ACCESSED location in the swap PTE. Looking at pte_present() and pte_none() checks, there seems to be no actual reason why we cannot use it: we only have to make sure we're not using _PAGE_PRESENT. Reusing this bit avoids having to steal one bit from the swap offset. Link: https://lkml.kernel.org/r/20230113171026.582290-17-david@redhat.com Signed-off-by: David Hildenbrand Cc: "James E.J. Bottomley" Cc: Helge Deller Signed-off-by: Andrew Morton commit 5ae3e74474f82613482ed67b0c234f61ac6ca2dd Author: David Hildenbrand Date: Fri Jan 13 18:10:15 2023 +0100 openrisc/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE by stealing one bit from the type. Generic MM currently only uses 5 bits for the type (MAX_SWAPFILES_SHIFT), so the stolen bit is effectively unused. While at it, mask the type in __swp_entry(). Link: https://lkml.kernel.org/r/20230113171026.582290-16-david@redhat.com Signed-off-by: David Hildenbrand Cc: Stefan Kristiansson Cc: Stafford Horne Signed-off-by: Andrew Morton commit 4d1d955f7c0cdbb7562d19049f859c74276fdfeb Author: David Hildenbrand Date: Fri Jan 13 18:10:14 2023 +0100 nios2/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE by using the yet-unused bit 31. Link: https://lkml.kernel.org/r/20230113171026.582290-15-david@redhat.com Signed-off-by: David Hildenbrand Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit 0a9ad8273ff4643dd50ff6b3ec991ab270e87a89 Author: David Hildenbrand Date: Fri Jan 13 18:10:13 2023 +0100 nios2/mm: refactor swap PTE layout nios2 disables swap for a good reason: it doesn't even provide sufficient type bits as required by core MM. However, swap entries are nowadays also used for other purposes (migration entries, PTE markers, HWPoison, ...), and accidential use could be problematic. Let's properly use 5 bits for the swap type and document the layout. Bits 26--31 should get ignored by hardware completely, so they can be used. Link: https://lkml.kernel.org/r/20230113171026.582290-14-david@redhat.com Signed-off-by: David Hildenbrand Cc: Dinh Nguyen Signed-off-by: Andrew Morton commit 83d3b2b46ea3f8fa542fb7528b3bca6f476d0fab Author: David Hildenbrand Date: Fri Jan 13 18:10:12 2023 +0100 mips/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE. On 64bit, steal one bit from the type. Generic MM currently only uses 5 bits for the type (MAX_SWAPFILES_SHIFT), so the stolen bit is effectively unused. On 32bit we're able to locate unused bits. As the PTE layout for 32 bit is very confusing, document it a bit better. While at it, mask the type in __swp_entry()/mk_swap_pte(). Link: https://lkml.kernel.org/r/20230113171026.582290-13-david@redhat.com Signed-off-by: David Hildenbrand Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit b5c88f21531c3457e3e202817556b68171484e00 Author: David Hildenbrand Date: Fri Jan 13 18:10:11 2023 +0100 microblaze/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE by stealing one bit from the type. Generic MM currently only uses 5 bits for the type (MAX_SWAPFILES_SHIFT), so the stolen bit is effectively unused. The shift by 2 when converting between PTE and arch-specific swap entry makes the swap PTE layout a little bit harder to decipher. While at it, drop the comment from paulus---copy-and-paste leftover from powerpc where we actually have _PAGE_HASHPTE---and mask the type in __swp_entry_to_pte() as well. Link: https://lkml.kernel.org/r/20230113171026.582290-12-david@redhat.com Signed-off-by: David Hildenbrand Cc: Michal Simek Signed-off-by: Andrew Morton commit ed4154067a086c44608b08f55cceb2688b661750 Author: David Hildenbrand Date: Fri Jan 13 18:10:10 2023 +0100 m68k/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE by stealing one bit from the type. Generic MM currently only uses 5 bits for the type (MAX_SWAPFILES_SHIFT), so the stolen bit is effectively unused. While at it, make sure for sun3 that the valid bit never gets set by properly masking it off and mask the type in __swp_entry(). Link: https://lkml.kernel.org/r/20230113171026.582290-11-david@redhat.com Signed-off-by: David Hildenbrand Cc: Geert Uytterhoeven Cc: Greg Ungerer Signed-off-by: Andrew Morton commit ad464ff2c0f91fcacc24167fc435aa45fe0b7d1b Author: David Hildenbrand Date: Fri Jan 13 18:10:09 2023 +0100 m68k/mm: remove dummy __swp definitions for nommu The definitions are not required, let's remove them. Link: https://lkml.kernel.org/r/20230113171026.582290-10-david@redhat.com Signed-off-by: David Hildenbrand Cc: Geert Uytterhoeven Cc: Greg Ungerer Signed-off-by: Andrew Morton commit ad3150f11b099321331f2f74d008e86ab2a04c7a Author: David Hildenbrand Date: Fri Jan 13 18:10:08 2023 +0100 loongarch/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE by stealing one bit from the type. Generic MM currently only uses 5 bits for the type (MAX_SWAPFILES_SHIFT), so the stolen bit is effectively unused. While at it, also mask the type in mk_swap_pte(). Note that this bit does not conflict with swap PMDs and could also be used in swap PMD context later. Link: https://lkml.kernel.org/r/20230113171026.582290-9-david@redhat.com Signed-off-by: David Hildenbrand Cc: Huacai Chen Cc: WANG Xuerui Signed-off-by: Andrew Morton commit 3151cc26565ea864c51a78900101ad68b864f405 Author: David Hildenbrand Date: Fri Jan 13 18:10:07 2023 +0100 ia64/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE by stealing one bit from the type. Generic MM currently only uses 5 bits for the type (MAX_SWAPFILES_SHIFT), so the stolen bit is effectively unused. While at it, also mask the type in __swp_entry(). Link: https://lkml.kernel.org/r/20230113171026.582290-8-david@redhat.com Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton commit 61f4a896e62dee8581fea843479058507fda57fb Author: David Hildenbrand Date: Fri Jan 13 18:10:06 2023 +0100 hexagon/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE by stealing one bit from the offset. This reduces the maximum swap space per file to 16 GiB (was 32 GiB). While at it, mask the type in __swp_entry(). Link: https://lkml.kernel.org/r/20230113171026.582290-7-david@redhat.com Signed-off-by: David Hildenbrand Cc: Brian Cain Signed-off-by: Andrew Morton commit 41e0d49104dbff888ef6446ea46842fde66c0a76 Author: David Hildenbrand Date: Fri Jan 13 18:10:05 2023 +0100 csky/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE by stealing one bit from the offset. This reduces the maximum swap space per file to 16 GiB (was 32 GiB). We might actually be able to reuse one of the other software bits (_PAGE_READ / PAGE_WRITE) instead, because we only have to keep pte_present(), pte_none() and HW happy. For now, let's keep it simple because there might be something non-obvious. Link: https://lkml.kernel.org/r/20230113171026.582290-6-david@redhat.com Signed-off-by: David Hildenbrand Cc: Guo Ren Signed-off-by: Andrew Morton commit 20aae9eff5acd8f50f72adca1176f9269a46b827 Author: David Hildenbrand Date: Fri Jan 13 18:10:04 2023 +0100 arm/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE by stealing one bit from the offset. This reduces the maximum swap space per file to 64 GiB (was 128 GiB). While at it drop the PTE_TYPE_FAULT from __swp_entry_to_pte() which is defined to be 0 and is rather confusing because we should be dealing with "Linux PTEs" not "hardware PTEs". Also, properly mask the type in __swp_entry(). Link: https://lkml.kernel.org/r/20230113171026.582290-5-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Russell King (Oracle) Signed-off-by: Andrew Morton commit 4a446b3dd335d0bd14a5ca3e563688de3637be0c Author: David Hildenbrand Date: Fri Jan 13 18:10:03 2023 +0100 arc/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE by using bit 5, which is yet unused. The only important parts seems to be to not use _PAGE_PRESENT (bit 9). Link: https://lkml.kernel.org/r/20230113171026.582290-4-david@redhat.com Signed-off-by: David Hildenbrand Cc: Vineet Gupta Signed-off-by: Andrew Morton commit a172d5128706028ac07b8db709728379ecc72f6e Author: David Hildenbrand Date: Fri Jan 13 18:10:02 2023 +0100 alpha/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE Let's support __HAVE_ARCH_PTE_SWP_EXCLUSIVE by stealing one bit from the type. Generic MM currently only uses 5 bits for the type (MAX_SWAPFILES_SHIFT), so the stolen bit is effectively unused. While at it, mask the type in mk_swap_pte() as well. Link: https://lkml.kernel.org/r/20230113171026.582290-3-david@redhat.com Signed-off-by: David Hildenbrand Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Signed-off-by: Andrew Morton commit 2321ba3e3733f513e46e29b9c70512ecddbf1085 Author: David Hildenbrand Date: Fri Jan 13 18:10:01 2023 +0100 mm/debug_vm_pgtable: more pte_swp_exclusive() sanity checks Patch series "mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE on all architectures with swap PTEs". This is the follow-up on [1]: [PATCH v2 0/8] mm: COW fixes part 3: reliable GUP R/W FOLL_GET of anonymous pages After we implemented __HAVE_ARCH_PTE_SWP_EXCLUSIVE on most prominent enterprise architectures, implement __HAVE_ARCH_PTE_SWP_EXCLUSIVE on all remaining architectures that support swap PTEs. This makes sure that exclusive anonymous pages will stay exclusive, even after they were swapped out -- for example, making GUP R/W FOLL_GET of anonymous pages reliable. Details can be found in [1]. This primarily fixes remaining known O_DIRECT memory corruptions that can happen on concurrent swapout, whereby we can lose DMA reads to a page (modifying the user page by writing to it). To verify, there are two test cases (requiring swap space, obviously): (1) The O_DIRECT+swapout test case [2] from Andrea. This test case tries triggering a race condition. (2) My vmsplice() test case [3] that tries to detect if the exclusive marker was lost during swapout, not relying on a race condition. For example, on 32bit x86 (with and without PAE), my test case fails without these patches: $ ./test_swp_exclusive FAIL: page was replaced during COW But succeeds with these patches: $ ./test_swp_exclusive PASS: page was not replaced during COW Why implement __HAVE_ARCH_PTE_SWP_EXCLUSIVE for all architectures, even the ones where swap support might be in a questionable state? This is the first step towards removing "readable_exclusive" migration entries, and instead using pte_swp_exclusive() also with (readable) migration entries instead (as suggested by Peter). The only missing piece for that is supporting pmd_swp_exclusive() on relevant architectures with THP migration support. As all relevant architectures now implement __HAVE_ARCH_PTE_SWP_EXCLUSIVE,, we can drop __HAVE_ARCH_PTE_SWP_EXCLUSIVE in the last patch. I tried cross-compiling all relevant setups and tested on x86 and sparc64 so far. CCing arch maintainers only on this cover letter and on the respective patch(es). [1] https://lkml.kernel.org/r/20220329164329.208407-1-david@redhat.com [2] https://gitlab.com/aarcange/kernel-testcases-for-v5.11/-/blob/main/page_count_do_wp_page-swap.c [3] https://gitlab.com/davidhildenbrand/scratchspace/-/blob/main/test_swp_exclusive.c This patch (of 26): We want to implement __HAVE_ARCH_PTE_SWP_EXCLUSIVE on all architectures. Let's extend our sanity checks, especially testing that our PTE bit does not affect: * is_swap_pte() -> pte_present() and pte_none() * the swap entry + type * pte_swp_soft_dirty() Especially, the pfn_pte() is dodgy when the swap PTE layout differs heavily from ordinary PTEs. Let's properly construct a swap PTE from swap type+offset. [david@redhat.com: fix build] Link: https://lkml.kernel.org/r/6aaad548-cf48-77fa-9d6c-db83d724b2eb@redhat.com Link: https://lkml.kernel.org/r/20230113171026.582290-1-david@redhat.com Link: https://lkml.kernel.org/r/20230113171026.582290-2-david@redhat.com Signed-off-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Anton Ivanov Cc: Cc: Borislav Petkov (AMD) Cc: Brian Cain Cc: Christophe Leroy Cc: Chris Zankel Cc: Dave Hansen Cc: David S. Miller Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Greg Ungerer Cc: Guo Ren Cc: Helge Deller Cc: H. Peter Anvin (Intel) Cc: Huacai Chen Cc: Hugh Dickins Cc: Ingo Molnar Cc: Ivan Kokshaysky Cc: James Bottomley Cc: Jason Gunthorpe Cc: Johannes Berg Cc: John Hubbard Cc: Matt Turner Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Mike Rapoport Cc: Nadav Amit Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Xu Cc: Richard Henderson Cc: Richard Weinberger Cc: Rich Felker Cc: Russell King Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vineet Gupta Cc: Vlastimil Babka Cc: Xuerui Wang Cc: Yang Shi Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit 9bdfeea46f4926181b9476037c6af28d6d19cc28 Author: Vishal Moola (Oracle) Date: Fri Jan 13 16:15:56 2023 -0800 mm/khugepaged: convert release_pte_pages() to use folios Converts release_pte_pages() to use folios instead of pages. Link: https://lkml.kernel.org/r/20230114001556.43795-2-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Cc: Matthew Wilcox Cc: Mike Kravetz Signed-off-by: Andrew Morton commit 92644f583d5124b60bc20a3dd21b0bc9142f020c Author: Vishal Moola (Oracle) Date: Fri Jan 13 16:15:55 2023 -0800 mm/khugepaged: introduce release_pte_folio() to replace release_pte_page() release_pte_page() is converted to be a wrapper for release_pte_folio() to help facilitate the khugepaged conversion to folios. This replaces 3 calls to compound_head() with 1, and saves 85 bytes of kernel text. Link: https://lkml.kernel.org/r/20230114001556.43795-1-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Cc: Matthew Wilcox Cc: Mike Kravetz Signed-off-by: Andrew Morton commit 62a9bbf2e999b9dca148bd342ab7a29fcf0cb120 Author: Alexander Potapenko Date: Thu Jan 12 11:31:47 2023 +0100 kmsan: silence -Wmissing-prototypes warnings When building the kernel with W=1, the compiler reports numerous warnings about the missing prototypes for KMSAN instrumentation hooks. Because these functions are not supposed to be called explicitly by the kernel code (calls to them are emitted by the compiler), they do not have to be declared in the headers. Instead, we add forward declarations right before the definitions to silence the warnings produced by -Wmissing-prototypes. Link: https://lkml.kernel.org/r/20230112103147.382416-1-glider@google.com Signed-off-by: Alexander Potapenko Reported-by: Vlastimil Babka Suggested-by: Marco Elver Reviewed-by: Marco Elver Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/202301020356.dFruA4I5-lkp@intel.com/T/ Cc: Dmitry Vyukov Cc: Ingo Molnar Cc: Peter Zijlstra Signed-off-by: Andrew Morton commit a8265cd917a63c0a1e13caf07e9a0a024480372b Author: Lorenzo Stoakes Date: Thu Jan 12 12:39:32 2023 +0000 Documentation/mm: update references to __m[un]lock_page() to *_folio() We now pass folios to these functions, so update the documentation accordingly. Additionally, correct the outdated reference to __pagevec_lru_add_fn(), the referenced action occurs in __munlock_folio() directly now, replace reference to lru_cache_add_inactive_or_unevictable() with the modern folio equivalent folio_add_lru_vma() and reference folio flags by the flag name rather than accessor. Link: https://lkml.kernel.org/r/898c487169d98a7f09c1c1e57a7dfdc2b3f6bf0f.1673526881.git.lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Acked-by: Vlastimil Babka Cc: Christian Brauner Cc: Geert Uytterhoeven Cc: Hugh Dickins Cc: Joel Fernandes (Google) Cc: Jonathan Corbet Cc: Liam R. Howlett Cc: Matthew Wilcox Cc: Mike Rapoport (IBM) Cc: William Kucharski Signed-off-by: Andrew Morton commit 96f97c438f61ddba94117dcd1a1eb0aaafa22309 Author: Lorenzo Stoakes Date: Thu Jan 12 12:39:31 2023 +0000 mm: mlock: update the interface to use folios Update the mlock interface to accept folios rather than pages, bringing the interface in line with the internal implementation. munlock_vma_page() still requires a page_folio() conversion, however this is consistent with the existent mlock_vma_page() implementation and a product of rmap still dealing in pages rather than folios. Link: https://lkml.kernel.org/r/cba12777c5544305014bc0cbec56bb4cc71477d8.1673526881.git.lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Acked-by: Vlastimil Babka Cc: Christian Brauner Cc: Geert Uytterhoeven Cc: Hugh Dickins Cc: Joel Fernandes (Google) Cc: Jonathan Corbet Cc: Liam R. Howlett Cc: Matthew Wilcox Cc: Mike Rapoport (IBM) Cc: William Kucharski Signed-off-by: Andrew Morton commit b213ef6b72b5f1f9d333f8aca05440db4e302b46 Author: Lorenzo Stoakes Date: Thu Jan 12 12:39:30 2023 +0000 m68k/mm/motorola: specify pmd_page() type Failing to specify a specific type here breaks anything that relies on the type being explicitly known, such as page_folio(). Make explicit the type of null pointer returned here. Link: https://lkml.kernel.org/r/ad6be2821bbd6af10966b3704568ff458b270d9c.1673526881.git.lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Acked-by: Geert Uytterhoeven Acked-by: Vlastimil Babka Cc: Christian Brauner Cc: Hugh Dickins Cc: Joel Fernandes (Google) Cc: Jonathan Corbet Cc: Liam R. Howlett Cc: Matthew Wilcox Cc: Mike Rapoport (IBM) Cc: William Kucharski Signed-off-by: Andrew Morton commit 90d07210ab55e458c87048e1ad55582ecff0a3d5 Author: Lorenzo Stoakes Date: Thu Jan 12 12:39:29 2023 +0000 mm: mlock: use folios and a folio batch internally This brings mlock in line with the folio batches declared in mm/swap.c and makes the code more consistent across the two. The existing mechanism for identifying which operation each folio in the batch is undergoing is maintained, i.e. using the lower 2 bits of the struct folio address (previously struct page address). This should continue to function correctly as folios remain at least system word-aligned. All invocations of mlock() pass either a non-compound page or the head of a THP-compound page and no tail pages need updating so this functionality works with struct folios being used internally rather than struct pages. In this patch the external interface is kept identical to before in order to maintain separation between patches in the series, using a rather awkward conversion from struct page to struct folio in relevant functions. However, this maintenance of the existing interface is intended to be temporary - the next patch in the series will update the interfaces to accept folios directly. Link: https://lkml.kernel.org/r/9f894d54d568773f4ed3cb0eef5f8932f62c95f4.1673526881.git.lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Acked-by: Vlastimil Babka Cc: Christian Brauner Cc: Geert Uytterhoeven Cc: Hugh Dickins Cc: Joel Fernandes (Google) Cc: Jonathan Corbet Cc: Liam R. Howlett Cc: Matthew Wilcox Cc: Mike Rapoport (IBM) Cc: William Kucharski Signed-off-by: Andrew Morton commit 8115612883978069fee8793f873a627ff5868718 Author: Lorenzo Stoakes Date: Thu Jan 12 12:39:28 2023 +0000 mm: pagevec: add folio_batch_reinit() Patch series "update mlock to use folios", v4. This series updates mlock to use folios, converting the internal interface to using folios exclusively and exposing the folio interface externally. As a product of this we move to using a folio batch rather than a pagevec for mlock folios, which brings it in line with the core folio batches contained in mm/swap.c. This patch (of 5): This performs the same task as pagevec_reinit(), only modifying a folio batch rather than a pagevec. Link: https://lkml.kernel.org/r/cover.1673526881.git.lstoakes@gmail.com Link: https://lkml.kernel.org/r/9018cecacb39e34c883540f997f9be8281153613.1673526881.git.lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Acked-by: Vlastimil Babka Cc: Christian Brauner Cc: Geert Uytterhoeven Cc: Hugh Dickins Cc: Joel Fernandes (Google) Cc: Jonathan Corbet Cc: Liam R. Howlett Cc: Matthew Wilcox Cc: Mike Rapoport (IBM) Cc: William Kucharski Signed-off-by: Andrew Morton commit 4947ed93c23218c40fb32226b895d8733cd2e05f Author: Kefeng Wang Date: Thu Jan 12 20:40:28 2023 +0800 mm: madvise: use vm_normal_folio() in madvise_free_pte_range() There is already a vm_normal_folio(), use it to make madvise_free_pte_range() only use a folio. Link: https://lkml.kernel.org/r/20230112124028.16964-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Matthew Wilcox (Oracle) Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit 69bbb87b3f144e4778f028fd85992aa8dea6ff28 Author: Matthew Wilcox (Oracle) Date: Thu Jan 12 13:10:31 2023 +0000 shmem: convert shmem_write_end() to use a folio Use a folio internally to shmem_write_end() which saves a number of calls to compound_head() and lets us get rid of the custom code to zero out the rest of a THP and supports folios of arbitrary size. Link: https://lkml.kernel.org/r/20230112131031.1209553-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: William Kucharski Cc: Hugh Dickins Signed-off-by: Andrew Morton commit a6fddef49eef2cf68c23e91d73d6a6d5e2cd448f Author: Sidhartha Kumar Date: Thu Jan 12 14:46:08 2023 -0600 mm/memory-failure: convert unpoison_memory() to folios Use a folio inside unpoison_memory which replaces a compound_head() call with a call to page_folio(). Link: https://lkml.kernel.org/r/20230112204608.80136-9-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Acked-by: Naoya Horiguchi Cc: Matthew Wilcox Cc: Miaohe Lin Signed-off-by: Andrew Morton commit 595dd8185cf1db248b2be4c65ec8936de6ac87c1 Author: Sidhartha Kumar Date: Thu Jan 12 14:46:07 2023 -0600 mm/memory-failure: convert hugetlb_set_page_hwpoison() to folios Change hugetlb_set_page_hwpoison() to folio_set_hugetlb_hwpoison() and use a folio internally. Link: https://lkml.kernel.org/r/20230112204608.80136-8-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Acked-by: Naoya Horiguchi Cc: Matthew Wilcox Cc: Miaohe Lin Signed-off-by: Andrew Morton commit 0858b5eb3aab2de0662a40901699162519628f6e Author: Sidhartha Kumar Date: Thu Jan 12 14:46:06 2023 -0600 mm/memory-failure: convert __free_raw_hwp_pages() to folios Change __free_raw_hwp_pages() to __folio_free_raw_hwp() and modify its callers to pass in a folio. Link: https://lkml.kernel.org/r/20230112204608.80136-7-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Acked-by: Naoya Horiguchi Cc: Matthew Wilcox Cc: Miaohe Lin Signed-off-by: Andrew Morton commit b02e7582ef245e9694fff6aee8e95fd1764cc5ee Author: Sidhartha Kumar Date: Thu Jan 12 14:46:05 2023 -0600 mm/memory-failure: convert raw_hwp_list_head() to folios Change raw_hwp_list_head() to take in a folio and modify its callers to pass in a folio. Also converts two users of hugetlb specific page macro users to their folio equivalents. Link: https://lkml.kernel.org/r/20230112204608.80136-6-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Acked-by: Naoya Horiguchi Cc: Matthew Wilcox Cc: Miaohe Lin Signed-off-by: Andrew Morton commit 9637d7dfb19ce934f81cd56cde23573759c73afb Author: Sidhartha Kumar Date: Thu Jan 12 14:46:04 2023 -0600 mm/memory-failure: convert free_raw_hwp_pages() to folios Change free_raw_hwp_pages() to folio_free_raw_hwp(), converts two users of hugetlb specific page macro users to their folio equivalents. Link: https://lkml.kernel.org/r/20230112204608.80136-5-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Acked-by: Naoya Horiguchi Cc: Matthew Wilcox Cc: Miaohe Lin Signed-off-by: Andrew Morton commit 2ff6cecee669bf0fc63eadebac8cfc81f74b9a4c Author: Sidhartha Kumar Date: Thu Jan 12 14:46:03 2023 -0600 mm/memory-failure: convert hugetlb_clear_page_hwpoison to folios Change hugetlb_clear_page_hwpoison() to folio_clear_hugetlb_hwpoison() by changing the function to take in a folio. This converts one use of ClearPageHWPoison and HPageRawHwpUnreliable to their folio equivalents. Link: https://lkml.kernel.org/r/20230112204608.80136-4-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Acked-by: Naoya Horiguchi Cc: Matthew Wilcox Cc: Miaohe Lin Signed-off-by: Andrew Morton commit bc1cfde194675215857755b75e5fe90f6a654843 Author: Sidhartha Kumar Date: Thu Jan 12 14:46:02 2023 -0600 mm/memory-failure: convert try_memory_failure_hugetlb() to folios Use a struct folio rather than a head page in try_memory_failure_hugetlb. This converts one user of SetHPageMigratable to the folio equivalent. Link: https://lkml.kernel.org/r/20230112204608.80136-3-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Acked-by: Naoya Horiguchi Cc: Matthew Wilcox Cc: Miaohe Lin Signed-off-by: Andrew Morton commit 4c110ec98e39944732ec31bf0415f22632bae2b7 Author: Sidhartha Kumar Date: Thu Jan 12 14:46:01 2023 -0600 mm/memory-failure: convert __get_huge_page_for_hwpoison() to folios Patch series "convert hugepage memory failure functions to folios". This series contains a 1:1 straightforward page to folio conversion for memory failure functions which deal with huge pages. I renamed a few functions to fit with how other folio operating functions are named. These include: hugetlb_clear_page_hwpoison -> folio_clear_hugetlb_hwpoison free_raw_hwp_pages -> folio_free_raw_hwp __free_raw_hwp_pages -> __folio_free_raw_hwp hugetlb_set_page_hwpoison -> folio_set_hugetlb_hwpoison The goal of this series was to reduce users of the hugetlb specific page flag macros which take in a page so users are protected by the compiler to make sure they are operating on a head page. This patch (of 8): Use a folio throughout the function rather than using a head page. This also reduces the users of the page version of hugetlb specific page flags. Link: https://lkml.kernel.org/r/20230112204608.80136-2-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar Acked-by: Naoya Horiguchi Cc: Matthew Wilcox Cc: Miaohe Lin Signed-off-by: Andrew Morton commit 1e15d374bb1cb95f738334018a216e4f6360e821 Author: Alexander Potapenko Date: Wed Jan 11 11:18:06 2023 +0100 Revert "x86: kmsan: sync metadata pages on page fault" This reverts commit 3f1e2c7a9099c1ed32c67f12cdf432ba782cf51f. As noticed by Qun-Wei Lin, arch_sync_kernel_mappings() in arch/x86/mm/fault.c is only used with CONFIG_X86_32, whereas KMSAN is only supported on x86_64, where this code is not compiled. The patch in question dates back to downstream KMSAN branch based on v5.8-rc5, it sneaked into upstream unnoticed in v6.1. Link: https://lkml.kernel.org/r/20230111101806.3236991-1-glider@google.com Signed-off-by: Alexander Potapenko Reported-by: Qun-Wei Lin Link: https://github.com/google/kmsan/issues/91 Cc: Andy Lutomirski Cc: Dmitry Vyukov Cc: Ingo Molnar Cc: Marco Elver Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Andrew Morton commit 82b249361f2d1627acc7dbbdab1c80246a02fd4a Author: Vernon Yang Date: Wed Jan 11 21:20:36 2023 +0800 mm/mmap: fix comment of unmapped_area{_topdown} The low_limit of unmapped area information is inclusive, and the hight_limit is not, so make symbol to be [ instead of (. And replace hight_limit to high_limit. Link: https://lkml.kernel.org/r/20230111132036.801404-1-vernon2gm@gmail.com Fixes: 3499a13168da ("mm/mmap: use maple tree for unmapped_area{_topdown}") Signed-off-by: Vernon Yang Cc: Liam R. Howlett Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit f942b0f0528d1198b94b8211c84d4f28a654c0ff Author: Vernon Yang Date: Wed Jan 11 21:53:48 2023 +0800 maple_tree: fix comment of mte_destroy_walk The parameter name of maple tree is mt, make the comment be mt instead of mn, and the separator between the parameter name and the description to be : instead of -. Link: https://lkml.kernel.org/r/20230111135348.803181-1-vernon2gm@gmail.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Vernon Yang Cc: Liam R. Howlett Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit 6a171c16e62f854e6a7e0f837dbe8f3ace0f00ce Author: Sidhartha Kumar Date: Wed Jan 11 14:29:14 2023 +0000 mm: remove the hugetlb field from struct page Patch series "Get rid of tail page fields". Continue the shrinkage of the struct page definition by getting rid of the 'first tail page' and 'second tail page' fields. I originally did this patch set before Hugh's rewrite of the subpages_mapcount, so it needed substantial updates; hope I didn't miss anything. This patch (of 28): commit dad6a5eb5556(mm,hugetlb: use folio fields in second tail page) added a transitional hugetlb field to struct page and struct folio to make room for another int in the first tail of a compound page. Hugetlb folio conversions have changed all page users of this field to use the fields within the folio so struct page no longer needs this hugetlb specific field. Link: https://lkml.kernel.org/r/20230111142915.1001531-1-willy@infradead.org Link: https://lkml.kernel.org/r/20230111142915.1001531-29-willy@infradead.org Signed-off-by: Sidhartha Kumar Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit f158ed6195ef949060811fd85086928470651944 Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:29:13 2023 +0000 mm: convert deferred_split_huge_page() to deferred_split_folio() Now that both callers use a folio, pass the folio in and save a call to compound_head(). Link: https://lkml.kernel.org/r/20230111142915.1001531-28-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit f8baa6be0368b5d21be34e8bf071b563b0f77584 Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:29:12 2023 +0000 mm/huge_memory: convert get_deferred_split_queue() to take a folio Removes a few calls to compound_head(). Link: https://lkml.kernel.org/r/20230111142915.1001531-27-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 8991de90e99755b13026b1db32d1fa52e94c6a96 Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:29:11 2023 +0000 mm/huge_memory: remove page_deferred_list() Use folio->_deferred_list directly. Link: https://lkml.kernel.org/r/20230111142915.1001531-26-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 4375a553f46c6cb66d1711d8f514dfdf34ce74b0 Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:29:10 2023 +0000 mm: move page->deferred_list to folio->_deferred_list Remove the entire block of definitions for the second tail page, and add the deferred list to the struct folio. This actually moves _deferred_list to a different offset in struct folio because I don't see a need to include the padding. This lets us use list_for_each_entry_safe() in deferred_split_scan() and avoid a number of calls to compound_head(). Link: https://lkml.kernel.org/r/20230111142915.1001531-25-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit a8d55327ccc1f999a5fba4eee67ed08bd36493ad Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:29:09 2023 +0000 doc: correct struct folio kernel-doc Insert appropriate public: and private: markers to make the generated kernel-doc look right. Link: https://lkml.kernel.org/r/20230111142915.1001531-24-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 1c5509be58f636afabbdaf66e7436da8ec0a1828 Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:29:08 2023 +0000 mm: remove 'First tail page' members from struct page All former users now use the folio equivalents, so remove them from the definition of struct page. Link: https://lkml.kernel.org/r/20230111142915.1001531-23-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 2d678c641a4625d2b1cfeb50d7426fab6d3740b3 Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:29:07 2023 +0000 hugetlb: remove uses of compound_dtor and compound_nr Convert the entire file to use the folio equivalents. Link: https://lkml.kernel.org/r/20230111142915.1001531-22-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit a60d5942cc9bd65806b69360020d9b1664c747ad Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:29:06 2023 +0000 mm: convert destroy_large_folio() to use folio_dtor Replace a use of compound_dtor. Link: https://lkml.kernel.org/r/20230111142915.1001531-21-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit f04029f34e8c3750b8fb39b54e788b9355d1b912 Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:29:05 2023 +0000 mm: convert is_transparent_hugepage() to use a folio Replace a use of page->compound_dtor with its folio equivalent. Link: https://lkml.kernel.org/r/20230111142915.1001531-20-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit bad6da64565846ef5ba85b0b685cfde9db0085dc Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:29:04 2023 +0000 mm: convert set_compound_page_dtor() and set_compound_order() to folios Replace uses of compound_dtor, compound_order and compound_nr by their folio equivalents. Link: https://lkml.kernel.org/r/20230111142915.1001531-19-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 21a000fe97a018c6d25be63892afb4fd8210ab57 Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:29:03 2023 +0000 mm: reimplement compound_nr() Turn compound_nr() into a wrapper around folio_nr_pages(). Similarly to compound_order(), casting the struct page directly to struct folio preserves the existing behaviour, while calling page_folio() would change the behaviour. Move thp_nr_pages() down in the file so that compound_nr() can be after folio_nr_pages(). [willy@infradead.org: fix assertion triggering] Link: https://lkml.kernel.org/r/Y8AFgZEEjnUIaCbf@casper.infradead.org Link: https://lkml.kernel.org/r/20230111142915.1001531-18-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Hugh Dickins Signed-off-by: Andrew Morton commit 5eb5cea11dcbafaa37685bc4e89e1d4ae9c434ea Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:29:02 2023 +0000 mm: reimplement compound_order() Make compound_order() use struct folio. It can't be turned into a wrapper around folio_order() as a page can be turned into a tail page between a check in compound_order() and the assertion in folio_test_large(). Link: https://lkml.kernel.org/r/20230111142915.1001531-17-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 1aa4d03b60c0f61a8d96d5d633bf7968dbf6841f Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:29:01 2023 +0000 mm: remove head_compound_mapcount() and _ptr functions folio_mapcount_ptr(), compound_mapcount_ptr() and subpages_mapcount_ptr() are all now unused. Link: https://lkml.kernel.org/r/20230111142915.1001531-16-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit c97eeb8f260dba098ba775e37d216f81f28559a9 Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:29:00 2023 +0000 mm: convert page_mapcount() to use folio_entire_mapcount() Remove a use of head_compound_mapcount(). Link: https://lkml.kernel.org/r/20230111142915.1001531-15-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 46f2722825983a51e849eb0ef2814e5c7f040fef Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:28:59 2023 +0000 hugetlb: remove uses of folio_mapcount_ptr Use the entire_mapcount field directly. Link: https://lkml.kernel.org/r/20230111142915.1001531-14-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 91ec7f284a0c445b251caba942c993ebf7b6db9f Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:28:58 2023 +0000 mm/debug: remove call to head_compound_mapcount() Call folio_entire_mapcount() instead. Link: https://lkml.kernel.org/r/20230111142915.1001531-13-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit c7f84b5723f1a60becd79d895ab214a7d5ee93c1 Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:28:57 2023 +0000 mm: use entire_mapcount in __page_dup_rmap() Remove the use of the compound_mapcount_ptr() wrapper, and add an assertion that we're not passing a tail page if we're duplicating a PMD. Link: https://lkml.kernel.org/r/20230111142915.1001531-12-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit db4e5dbdcdd55482ab23bf4a0ae6746f93efb0d9 Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:28:56 2023 +0000 mm: use a folio in hugepage_add_anon_rmap() and hugepage_add_new_anon_rmap() Remove uses of compound_mapcount_ptr() Link: https://lkml.kernel.org/r/20230111142915.1001531-11-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 65a689f35ad7ebbfb79f429c1bc290b042ebb10b Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:28:55 2023 +0000 page_alloc: use folio fields directly Rmove the uses of compound_mapcount_ptr(), head_compound_mapcount() and subpages_mapcount_ptr() Link: https://lkml.kernel.org/r/20230111142915.1001531-10-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 4d510f3da4c216d4c2695395f67aec38e2aa6cc7 Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:28:54 2023 +0000 mm: add folio_add_new_anon_rmap() In contrast to other rmap functions, page_add_new_anon_rmap() is always called with a freshly allocated page. That means it can't be called with a tail page. Turn page_add_new_anon_rmap() into folio_add_new_anon_rmap() and add a page_add_new_anon_rmap() wrapper. Callers can be converted individually. [akpm@linux-foundation.org: fix NOMMU build. page_add_new_anon_rmap() requires CONFIG_MMU] [willy@infradead.org: folio-compat.c needs rmap.h] Link: https://lkml.kernel.org/r/20230111142915.1001531-9-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit eb01a2ad7e9cba1b9dd131edc5a26ffbda90a5ed Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:28:53 2023 +0000 mm: convert page_add_file_rmap() to use a folio internally The API for page_add_file_rmap() needs to be page-based, because we can add mappings of individual pages. But inside the function, we want to only call compound_head() once and then use the folio APIs instead of the page APIs that each call compound_head(). Link: https://lkml.kernel.org/r/20230111142915.1001531-8-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit ee0800c2f6a9e605947ce499d79fb7e2be16d6dd Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:28:52 2023 +0000 mm: convert page_add_anon_rmap() to use a folio internally The API for page_add_anon_rmap() needs to be page-based, because we can add mappings of individual pages. But inside the function, we want to only call compound_head() once and then use the folio APIs instead of the page APIs that each call compound_head(). Link: https://lkml.kernel.org/r/20230111142915.1001531-7-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 62beb906ef644b0f0555b2b9f9626c27e2038d84 Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:28:51 2023 +0000 mm: convert page_remove_rmap() to use a folio internally The API for page_remove_rmap() needs to be page-based, because we can remove mappings of pages individually. But inside the function, we want to only call compound_head() once and then use the folio APIs instead of the page APIs that each call compound_head(). Link: https://lkml.kernel.org/r/20230111142915.1001531-6-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit b14224fbea62e5bffd680613376fe1268f4103ba Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:28:50 2023 +0000 mm: convert total_compound_mapcount() to folio_total_mapcount() Instead of enforcing that the argument must be a head page by naming, enforce it with the compiler by making it a folio. Also rename the counter in struct folio from _compound_mapcount to _entire_mapcount. Link: https://lkml.kernel.org/r/20230111142915.1001531-5-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 6eee1a0062298601dfc36bd34517affc4458c43d Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:28:49 2023 +0000 doc: clarify refcount section by referring to folios & pages Include the rename of subpages_mapcount to _nr_pages_mapped. Link: https://lkml.kernel.org/r/20230111142915.1001531-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit eec20426d48bd7b63c69969a793943ed1a99b731 Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:28:48 2023 +0000 mm: convert head_subpages_mapcount() into folio_nr_pages_mapped() Calling this 'mapcount' is confusing since mapcount is usually the number of times something is mapped; instead this is the number of mapped pages. It's also better to enforce that this is a folio rather than a head page. Move folio_nr_pages_mapped() into mm/internal.h since this is not something we want device drivers or filesystems poking at. Get rid of folio_subpages_mapcount_ptr() and use folio->_nr_pages_mapped directly. Link: https://lkml.kernel.org/r/20230111142915.1001531-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 94688e8eb453e616098cb930e5f6fed4a6ea2dfa Author: Matthew Wilcox (Oracle) Date: Wed Jan 11 14:28:47 2023 +0000 mm: remove folio_pincount_ptr() and head_compound_pincount() We can use folio->_pincount directly, since all users are guarded by tests of compound/large. Link: https://lkml.kernel.org/r/20230111142915.1001531-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: John Hubbard Signed-off-by: Andrew Morton commit 7d4a8be0c4b2b7ffb367929d2b352651f083806b Author: Alistair Popple Date: Tue Jan 10 13:57:22 2023 +1100 mm/mmu_notifier: remove unused mmu_notifier_range_update_to_read_only export mmu_notifier_range_update_to_read_only() was originally introduced in commit c6d23413f81b ("mm/mmu_notifier: mmu_notifier_range_update_to_read_only() helper") as an optimisation for device drivers that know a range has only been mapped read-only. However there are no users of this feature so remove it. As it is the only user of the struct mmu_notifier_range.vma field remove that also. Link: https://lkml.kernel.org/r/20230110025722.600912-1-apopple@nvidia.com Signed-off-by: Alistair Popple Acked-by: Mike Rapoport (IBM) Reviewed-by: Jason Gunthorpe Reviewed-by: Christoph Hellwig Reviewed-by: Mike Kravetz Cc: Ira Weiny Cc: Jerome Glisse Cc: John Hubbard Cc: Ralph Campbell Signed-off-by: Andrew Morton commit 9e5522715e6941bcfdc08d066a79d6da0f8cec8e Author: Baolin Wang Date: Tue Jan 10 21:36:22 2023 +0800 mm: compaction: avoid fragmentation score calculation for empty zones There is no need to calculate the fragmentation score for empty zones. Link: https://lkml.kernel.org/r/100331ad9d274a9725e687b00d85d75d7e4a17c7.1673342761.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit 8fff8b6f8d0ef7620e06f3f4cfb912171aef6cd5 Author: Baolin Wang Date: Tue Jan 10 21:36:21 2023 +0800 mm: compaction: add missing kcompactd wakeup trace event Add missing kcompactd wakeup trace event for proactive compaction, meanwhile use order = -1 and the highest zone index of the pgdat for the kcompactd wakeup trace event by proactive compaction. Link: https://lkml.kernel.org/r/cbf8097a2d8a1b6800991f2a21575550d3613ce6.1673342761.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit 1bfb7684db1233d9e3f3f26fbbc0c58d40ff65e7 Author: Baolin Wang Date: Tue Jan 10 21:36:20 2023 +0800 mm: compaction: count the migration scanned pages events for proactive compaction The proactive compaction will reuse per-node kcompactd threads, so we should also count the KCOMPACTD_MIGRATE_SCANNED and KCOMPACTD_FREE_SCANNED events for proactive compaction. Link: https://lkml.kernel.org/r/b7f1ece1adc17defa47e3667b5f9fd61f496517a.1673342761.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit 753ec50d976c28b08266dec3110905b377464eb1 Author: Baolin Wang Date: Tue Jan 10 21:36:19 2023 +0800 mm: compaction: move list validation into compact_zone() Move the cc.freepages and cc.migratepages list validation into compact_zone() to remove some duplicate code. Link: https://lkml.kernel.org/r/15cf54f7d762e87b04ac3cc74536f7d1ebbcd8cd.1673342761.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit c6835e8d86bcd8313347e097da140057772307c0 Author: Baolin Wang Date: Tue Jan 10 21:36:18 2023 +0800 mm: compaction: remove redundant VM_BUG_ON() in compact_zone() Patch series "Some small improvements for compaction". When I did some compaction testing, I found some small room for improvement as well as some code cleanups. This patch (of 5): The compaction_suitable() will never return values other than COMPACT_SUCCESS, COMPACT_SKIPPED and COMPACT_CONTINUE, so after validation of COMPACT_SUCCESS and COMPACT_SKIPPED, we will never hit other unexpected case. Thus remove the redundant VM_BUG_ON() validation for the return values of compaction_suitable(). Link: https://lkml.kernel.org/r/cover.1673342761.git.baolin.wang@linux.alibaba.com Link: https://lkml.kernel.org/r/740a2396d9b98154dba76e326cba5e798b640ead.1673342761.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit baabcfc93d3b5b14c52eb5c18d38627c32d2d82b Author: Vernon Yang Date: Tue Jan 10 22:53:53 2023 +0800 mm/mmap: fix typo in comment Replace "parital" with "partial". Link: https://lkml.kernel.org/r/20230110145353.1658435-1-vernon2gm@gmail.com Signed-off-by: Vernon Yang Cc: Liam Howlett Signed-off-by: Andrew Morton commit c5d5546ea06512accc894cd19265c7041a6ac81a Author: Vernon Yang Date: Tue Jan 10 23:42:11 2023 +0800 maple_tree: remove the parameter entry of mas_preallocate The parameter entry of mas_preallocate is not used, so drop it. Link: https://lkml.kernel.org/r/20230110154211.1758562-1-vernon2gm@gmail.com Signed-off-by: Vernon Yang Cc: Liam Howlett Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit 75cb348714f527ce2de3446202b76ce74808b668 Author: SeongJae Park Date: Tue Jan 10 19:04:00 2023 +0000 selftests/damon/debugfs_rm_non_contexts: hide expected write error messages A selftest case for DAMON debugfs interface has a test for expected failure. To make the test output clean, hide the expected failure error message. Link: https://lkml.kernel.org/r/20230110190400.119388-9-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 16ddcb15497e11a2695c604357e77140010d3d51 Author: SeongJae Park Date: Tue Jan 10 19:03:59 2023 +0000 selftests/damon/sysfs: hide expected write failures DAMON selftests for sysfs (sysfs.sh) tests if some writes to DAMON sysfs interface files fails as expected. It makes the test results noisy with the failure error message because it tests a number of such failures. Redirect the expected failure error messages to /dev/null to make the results clean. Link: https://lkml.kernel.org/r/20230110190400.119388-8-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 2d2230efbcecda7747a2bee659eae474f504ef42 Author: SeongJae Park Date: Tue Jan 10 19:03:58 2023 +0000 MAINTAINERS/DAMON: link maintainer profile, git trees, and website Add links to below DAMON development related resource to DAMON section in MAINTAINERS file. - The basic policies and expectations of DAMON development, - DAMON development trees, and - DAMON introduction website. Link: https://lkml.kernel.org/r/20230110190400.119388-7-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit e7366f3a2ed0f554354a1d7fe8bf5d98bab5247e Author: SeongJae Park Date: Tue Jan 10 19:03:57 2023 +0000 Docs/mm/damon: add a maintainer-profile for DAMON Document the basic policies and expectations for DAMON development. Link: https://lkml.kernel.org/r/20230110190400.119388-6-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 9a47c411ccddf843812dbbff707bd45e3bc83f40 Author: SeongJae Park Date: Tue Jan 10 19:03:56 2023 +0000 Docs/admin-guide/mm/damon/usage: update DAMOS actions/filters supports of each DAMON operations set Supports of each DAMOS action and filters are up to DAMON operations set implementation, but it's not mentioned in detail on the documentation. Update the information on the usage document. Link: https://lkml.kernel.org/r/20230110190400.119388-5-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 86834644e3c9301ccd28df1293c37306a6332f3b Author: SeongJae Park Date: Tue Jan 10 19:03:55 2023 +0000 Docs/mm/damon/index: mention DAMOS on the intro What DAMON aims to do is not only access monitoring but efficient and effective access-aware system operations. And DAMon-based Operation Schemes (DAMOS) is the important feature of DAMON for the goal. Make the intro of DAMON documentation to emphasize the goal and mention DAMOS. Link: https://lkml.kernel.org/r/20230110190400.119388-4-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 55901e89d2864b5ef9961892470eedf29279d412 Author: SeongJae Park Date: Tue Jan 10 19:03:54 2023 +0000 mm/damon/core: update kernel-doc comments for DAMOS filters supports of each DAMON operations set Supports of each DAMOS filter type are up to DAMON operations set implementation in use, but not well mentioned on the kernel-doc comments. Add the comment. Link: https://lkml.kernel.org/r/20230110190400.119388-3-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit fb6f026b833a71f4701e12b43800e46d7351f7a2 Author: SeongJae Park Date: Tue Jan 10 19:03:53 2023 +0000 mm/damon/core: update kernel-doc comments for DAMOS action supports of each DAMON operations set Patch series "mm/damon: trivial fixups". This patchset contains patches for trivial fixups of DAMON's documentation, MAINTAINERS section, and selftests. This patch (of 8): Supports of each DAMOS action are up to DAMON operations set implementation in use, but not well mentioned on the kernel-doc comments. Add the comment. Link: https://lkml.kernel.org/r/20230110190400.119388-1-sj@kernel.org Link: https://lkml.kernel.org/r/20230110190400.119388-2-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 92b64bd01fe99325ba0f51125bcb991f1566eadc Author: Fabio M. De Francesco Date: Wed Dec 7 23:53:08 2022 +0100 mm/highmem: add notes about conversions from kmap{,_atomic}() kmap() and kmap_atomic() have been deprecated. kmap_local_page() should always be used in new code and the call sites of the two deprecated functions should be converted. This latter task can lead to errors if it is not carried out with the necessary attention to the context around and between the maps and unmaps. Therefore, add further information to the Highmem's documentation for the purpose to make it clearer that (1) kmap() and kmap_atomic() must not any longer be called in new code and (2) developers doing conversions from kmap() amd kmap_atomic() are expected to take care of the context around and between the maps and unmaps, in order to not break the code. Relevant parts of this patch have been taken from messages exchanged privately with Ira Weiny (thanks!). [fmdefrancesco@gmail.com: merge two sentences into one, per Bagas] Link: https://lkml.kernel.org/r/20230119123945.10471-1-fmdefrancesco@gmail.com Link: https://lkml.kernel.org/r/20221207225308.8290-1-fmdefrancesco@gmail.com Signed-off-by: Fabio M. De Francesco Cc: Ira Weiny Cc: Jonathan Corbet Cc: Mike Rapoport Cc: Peter Zijlstra Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Signed-off-by: Andrew Morton commit f5b3c341a46ec55d93332ee5c254a278af902ffe Author: Andy Shevchenko Date: Thu Feb 2 16:54:12 2023 +0200 mei: Move uuid_le_cmp() to its only user There is only a single user of uuid_le_cmp() API, let's make it private to that user. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230202145412.87569-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 377c16fa3f3c60d21e4b05314c8be034ce37f2eb Author: Tonghao Zhang Date: Thu Feb 2 21:17:01 2023 +0800 bpftool: profile online CPUs instead of possible The number of online cpu may be not equal to possible cpu. "bpftool prog profile" can not create pmu event on possible but on online cpu. $ dmidecode -s system-product-name PowerEdge R620 $ cat /sys/devices/system/cpu/possible 0-47 $ cat /sys/devices/system/cpu/online 0-31 Disable cpu dynamically: $ echo 0 > /sys/devices/system/cpu/cpuX/online If one cpu is offline, perf_event_open will return ENODEV. To fix this issue: * check value returned and skip offline cpu. * close pmu_fd immediately on error path, avoid fd leaking. Fixes: 47c09d6a9f67 ("bpftool: Introduce "prog profile" command") Signed-off-by: Tonghao Zhang Cc: Quentin Monnet Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: Song Liu Cc: Yonghong Song Cc: John Fastabend Cc: KP Singh Cc: Stanislav Fomichev Cc: Hao Luo Cc: Jiri Olsa Acked-by: John Fastabend Link: https://lore.kernel.org/r/20230202131701.29519-1-tong@infragraf.org Signed-off-by: Martin KaFai Lau commit 196db6bb44738b76d7401c33aadadcea307894c2 Merge: cbce3de28c37f 4ae612e4af95d Author: Greg Kroah-Hartman Date: Fri Feb 3 07:01:54 2023 +0100 Merge tag 'iio-for-6.3a' 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.3 cycle The usual mixed bag. So far this has been a quiet cycle for IIO. New device support * adi,ad8686 - Add support for the AD5337 DAC - ID and 8 bit channel support. * maxim,max5522 - New driver for this 2 channel DAC. * nxp,imx93-adc - New driver for this SoC ADC which is a fresh IP that will probably turn up in additional SoCs going forwards. * st,magn - Add support for magnetometer part of LSM303C which is very similar to standalone LIS3MDL already supported. * ti,ads7924 - New driver for this 4 channel, 12-bit I2C ADC. * ti,lmp92064 - New driver for this 12 bit SPI ADC. * ti,tmag5273 - New driver for this 3D Hall-Effect Sensor. Features * core - Add a standard structure for the value pairs in IIO_VAL_INT_PLUS_MICRO available attributes and similar. * cirrus,ep93xx - Add DT binding docs and convert driver to DT based probing. - Enable testing building with CONFIG_COMPILE_TEST. * st,stm32-dfsdm - Enable ID register support for discovery of hardware capabilities on some devices. Cleanups and minor fixes * core - Drop the custom iio_sysfs_match_string_with_gaps(). The special ability of this function to skip gaps in an array was never used by any upstream driver. - Sort headers whilst touching this file. * tools - Fix memory leak in iio_utils.c * various - leftover i2c probe_new() conversions. - scnprintf() -> sysfs_emit() cleanups. - hand rolled devm enables -> devm_regulator[_bulk]_get_enable() - typo fixes - dt-binding cleanup (whitespace, excess quotes and similar) * adi,ad7746 - Set variable without pointless conditional. * fsl,mma9551 - Squash false positives about use of uninitialized variable where garbage undergoes an endian conversion before being ignored. * measspec,ms5611 - Switch to fully devm_ managed probe() and so drop explicit remove() * qcom,spmi-adc - Use dev_err_probe() to suppress deferred print. * qcom,spmi-adc5 - Define a missing channel used for battery identification. * qcom,spmi-iadc - Document a compatible seen in wild. * semtech,sx9360 - Fix units on semtech,resolution dt-binding. * sensiron,scd30 - dev_err_probe() usage to simplify error paths a little. * st,lsm6dsx - Add missing mount matrix for the gyro IIO device. * taos,tsl2563 - Respect firmware configured interrupt polarity if present. - Use i2c_smbus_write_word_data() in a few cases not previously covered. - Factor out duplicated interrupt configuration. - Switch to GENMASK() / BIT() from hand coded equivalents. - Tidy up unused definitions. - Use dev_err_probe() as appropriate. - Drop platform_data as no in kernel users and there are better ways to do equivalent if any are added. - Add local struct device variable to tidy up code. - Avoid dance via i2c_client to get the drvdata. - Tidy up headers ordering and Makefile ordering. * ti,adc128s052 - Use new spi_get_device_match_data(). - Drop ACPI_PTR() protection. - Sort headers whilst here. - Use asm instead of incorrect include of asm-generic/unaligned.h * vishay,vcn4000 - Interrupt support for vcnl4040 (lots of refactoring needed) * xilinx,ams - Use fwnode_device_is_compatible() instead of open coding it. * tag 'iio-for-6.3a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (71 commits) iio: adc: ad7291: Fix indentation error by adding extra spaces iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_config_word() iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_status_word() dt-bindings: iio/proximity: semtech,sx9360: Fix 'semtech,resolution' type iio: imu: fix spdx format iio: adc: imx93: Fix spelling mistake "geting" -> "getting" dt-bindings: iio: cleanup examples - indentation dt-bindings: iio: use lowercase hex in examples dt-bindings: iio: correct node names in examples dt-bindings: iio: minor whitespace cleanups dt-bindings: iio: drop unneeded quotes dt-bindings: iio: adc: Add NXP IMX93 ADC iio: adc: add imx93 adc support dt-bindings: iio: adc: add Texas Instruments ADS7924 iio: adc: ti-ads7924: add Texas Instruments ADS7924 driver iio: imu: st_lsm6dsx: add 'mount_matrix' sysfs entry to gyro channel. iio: imu: st_lsm6dsx: fix naming of 'struct iio_info' in st_lsm6dsx_shub.c. iio: light: vcnl4000: Add interrupt support for vcnl4040 iio: light: vcnl4000: Make irq handling more generic iio: light: vcnl4000: Prepare for more generic setup ... commit cbce3de28c37fdd7531526d8dbb0ae2187667dfe Merge: d45fed4ff61c4 3c54a3ff0a2cd Author: Greg Kroah-Hartman Date: Fri Feb 3 06:58:55 2023 +0100 Merge tag 'mhi-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-next Manivannan writes: MHI Host ======== - Fixed the module description MHI Endpoint ============ - Powered down the MHI EP stack completely during MHI RESET instead of just doing transfer abort as the MMIO register access will be prohibited afterwards. EP stack will also be powered on again in case the RESET happened due to SYS_ERR. - Added a sanity check before processing the command ring to make sure that the channel is supported by the controller. - Added a check to make sure the xfer_cb is available for the channel before trying to send the error status to the client drivers. This helps in avoiding a potential null pointer dereference. - Fixed the debug log of RESET command - Modified the channel ring handler lock to protect the whole handler instead of locking it partially. This helps in avoiding a race that may happen if a channel STOP/RESET command is issued by the host parallely. - Saved the MHI state locally during suspend and resume. Otherwise, the MHI EP stack will not be aware of a channel that got disabled and may try to access it later. - Changed the MHI state_lock to mutex instead of spinlock. This helps in avoiding the sleeping in atomic bug reported by Dan Carpenter and also allows the lock to be held throughout the state change. - Fixed the off by one error while doing the MHI channel check during command ring processing. MHI Generic =========== - Updated the MHI toplevel Makefile to use Kconfig flags for building the host and endpoint sub-directories conditionally. * tag 'mhi-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi: bus: mhi: ep: Fix off by one in mhi_ep_process_cmd_ring() bus: mhi: ep: Change state_lock to mutex bus: mhi: ep: Save channel state locally during suspend and resume bus: mhi: ep: Move chan->lock to the start of processing queued ch ring bus: mhi: ep: Fix the debug message for MHI_PKT_TYPE_RESET_CHAN_CMD cmd bus: mhi: ep: Only send -ENOTCONN status if client driver is available bus: mhi: ep: Check if the channel is supported by the controller bus: mhi: ep: Power up/down MHI stack during MHI RESET bus: mhi: host: Update mhi driver description bus: mhi: Update Makefile to used Kconfig flags commit 41a435e30eb007ca2c8f71db734af6ec3509af4d Author: Geert Uytterhoeven Date: Tue Jan 24 19:37:28 2023 +0100 usb: host: ohci-exynos: Convert to devm_of_phy_optional_get() Use the new devm_of_phy_optional_get() helper instead of open-coding the same operation. As devm_of_phy_optional_get() returns NULL if either the PHY cannot be found, or if support for the PHY framework is not enabled, it is no longer needed to check for -ENODEV or -ENOSYS. This lets us drop several checks for IS_ERR(), as phy_power_{on,off}() handle NULL parameters fine. Signed-off-by: Geert Uytterhoeven Acked-by: Alan Stern Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/3adc5dd1149a17ea7daf4463549feab886c6b145.1674584626.git.geert+renesas@glider.be Signed-off-by: Vinod Koul commit 86a176840c627bd5b676b6dff9a0b98f3fe5fafc Author: Geert Uytterhoeven Date: Tue Jan 24 19:37:27 2023 +0100 usb: host: ehci-exynos: Convert to devm_of_phy_optional_get() Use the new devm_of_phy_optional_get() helper instead of open-coding the same operation. As devm_of_phy_optional_get() returns NULL if either the PHY cannot be found, or if support for the PHY framework is not enabled, it is no longer needed to check for -ENODEV or -ENOSYS. This lets us drop several checks for IS_ERR(), as phy_power_{on,off}() handle NULL parameters fine. Signed-off-by: Geert Uytterhoeven Reviewed-by: Greg Kroah-Hartman Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/a28baf4e07e464c43aff9e52263b5a902f5da9a0.1674584626.git.geert+renesas@glider.be Signed-off-by: Vinod Koul commit a80becc56d274fc5d6226f74eaab1811c3984390 Author: Geert Uytterhoeven Date: Tue Jan 24 19:37:26 2023 +0100 PCI: tegra: 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 Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/56508eeadf7fa8692877e872871f10294d48c49d.1674584626.git.geert+renesas@glider.be Signed-off-by: Vinod Koul commit 9da87c6ef770f5a407952ea2baa0680e7df5ebd9 Author: Geert Uytterhoeven Date: Tue Jan 24 19:37:24 2023 +0100 net: lan966x: 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: Steen Hegelund Link: https://lore.kernel.org/r/993b0f4ac5b84b2b72223011614d2e821f9e7302.1674584626.git.geert+renesas@glider.be Signed-off-by: Vinod Koul commit a6ebcae7de16f3af3c328e8fba7c77aac8a910e9 Author: Geert Uytterhoeven Date: Tue Jan 24 19:37:23 2023 +0100 net: fman: memac: Convert to devm_of_phy_optional_get() Use the new devm_of_phy_optional_get() helper instead of open-coding the same operation. As devm_of_phy_optional_get() returns NULL if either the PHY cannot be found, or if support for the PHY framework is not enabled, it is no longer needed to check for -ENODEV or -ENOSYS. Signed-off-by: Geert Uytterhoeven Reviewed-by: Sean Anderson Link: https://lore.kernel.org/r/f2d801cd73cca36a7162819289480d7fc91fcc7e.1674584626.git.geert+renesas@glider.be Signed-off-by: Vinod Koul commit d02aa181ee595c81738b6bd7ebad6025fbee035a Author: Geert Uytterhoeven Date: Tue Jan 24 19:37:22 2023 +0100 phy: Add devm_of_phy_optional_get() helper Add an optional variant of devm_of_phy_get() that also takes care of printing real errors, so drivers no longer have to open-code this operation. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/4cd0069bcff424ffc5c3a102397c02370b91985b.1674584626.git.geert+renesas@glider.be Signed-off-by: Vinod Koul commit 59c3d3d00d60b6d75ef3faf3b24e6aac037c1085 Author: Geert Uytterhoeven Date: Tue Jan 24 19:37:21 2023 +0100 doc: phy: Document devm_of_phy_get() Add the missing documentation for devm_of_phy_get(), which was forgotten when the function was introduced. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/768d5845668f081620098a0b4479d1481e212bac.1674584626.git.geert+renesas@glider.be Signed-off-by: Vinod Koul commit 1bd9a7b4afd5e0b938868a90b16d514c19808e6c Author: Geert Uytterhoeven Date: Tue Jan 24 19:37:20 2023 +0100 phy: Remove unused phy_optional_get() There were never any upstream users of this function since its introduction almost 10 years ago. Besides, the dummy for phy_optional_get() should have returned NULL instead of an error code. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/df61992b1d66bccf4e6e1eafae94a7f7d7629f34.1674584626.git.geert+renesas@glider.be Signed-off-by: Vinod Koul commit 2798e36dc233a409a5d3f26f73029596dc504020 Author: Eric Dumazet Date: Wed Feb 1 17:43:45 2023 +0000 tcp: add TCP_MINTTL drop reason In the unlikely case incoming packets are dropped because of IP_MINTTL / IPV6_MINHOPCOUNT constraints... Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20230201174345.2708943-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 0719bc3a5c77091192c57e440896a969cd1cf885 Author: Dmitry Torokhov Date: Wed Feb 1 13:53:20 2023 -0800 net: fec: do not double-parse 'phy-reset-active-high' property Conversion to gpiod API done in commit 468ba54bd616 ("fec: convert to gpio descriptor") clashed with gpiolib applying the same quirk to the reset GPIO polarity (introduced in commit b02c85c9458c). This results in the reset line being left active/device being left in reset state when reset line is "active low". Remove handling of 'phy-reset-active-high' property from the driver and rely on gpiolib to apply needed adjustments to avoid ending up with the double inversion/flipped logic. Fixes: 468ba54bd616 ("fec: convert to gpio descriptor") Signed-off-by: Dmitry Torokhov Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230201215320.528319-2-dmitry.torokhov@gmail.com Signed-off-by: Jakub Kicinski commit d7b5e5dd669436328dbf41d89af09b3fa5de3b95 Author: Dmitry Torokhov Date: Wed Feb 1 13:53:19 2023 -0800 net: fec: restore handling of PHY reset line as optional Conversion of the driver to gpiod API done in 468ba54bd616 ("fec: convert to gpio descriptor") incorrectly made reset line mandatory and resulted in aborting driver probe in cases where reset line was not specified (note: this way of specifying PHY reset line is actually deprecated). Switch to using devm_gpiod_get_optional() and skip manipulating reset line if it can not be located. Fixes: 468ba54bd616 ("fec: convert to gpio descriptor") Signed-off-by: Dmitry Torokhov Reviewed-by: Andrew Lunn Reported-by: Marc Kleine-Budde Tested-by: Marc Kleine-Budde Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230201215320.528319-1-dmitry.torokhov@gmail.com Signed-off-by: Jakub Kicinski commit c7410b425de40e9b163eef781e1bdacf1bf2962e Author: Herbert Xu Date: Fri Jan 27 19:03:21 2023 +0800 hwrng: starfive - Enable compile testing Enable compile testing for jh7110. Also remove the dependency on HW_RANDOM. Signed-off-by: Herbert Xu Reviewed-by: Conor Dooley Reviewed-by: Jia Jie Ho Signed-off-by: Herbert Xu commit dd7b7972cb896c33f20915f7c89173b3927340e5 Author: Linus Walleij Date: Wed Jan 25 01:23:11 2023 +0100 crypto: ux500/hash - delete driver It turns out we can just modify the newer STM32 HASH driver to be used with Ux500 and now that we have done that, delete the old and sparsely maintained Ux500 HASH driver. Signed-off-by: Linus Walleij Signed-off-by: Herbert Xu commit b56403a25af703064bed0d7e81d2c9ffb30511ff Author: Linus Walleij Date: Wed Jan 25 01:23:10 2023 +0100 crypto: stm32/hash - Support Ux500 hash The Ux500 has a hash block which is an ancestor to the STM32 hash block. With some minor code path additions we can support also this variant in the STM32 driver. Differences: - Ux500 only supports SHA1 and SHA256 (+/- MAC) so we split up the algorithm registration per-algorithm and register each algorithm along with its MAC variant separately. - Ux500 does not have an interrupt to indicate that hash calculation is complete, so we add code paths to handle polling for completion if the interrupt is missing in the device tree. - Ux500 is lacking the SR status register, to check if an operating is complete, we need to poll the HASH_STR_DCAL bit in the HASH_STR register instead. - Ux500 had the resulting hash at address offset 0x0c and 8 32bit registers ahead. We account for this with a special code path when reading out the hash digest. - Ux500 need a special bit set in the control register before performing the final hash calculation on an empty message. - Ux500 hashes on empty messages will be performed if the above bit is set, but are incorrect. For this reason we just make an inline synchronous hash using a fallback hash. Tested on the Ux500 Golden device with the extended tests. Acked-by: Lionel Debieve Signed-off-by: Linus Walleij Signed-off-by: Herbert Xu commit 5a2d52b54065c2aeb0012d050734ead78252215a Author: Linus Walleij Date: Wed Jan 25 01:23:09 2023 +0100 crypto: stm32/hash - Wait for idle before final CPU xmit When calculating the hash using the CPU, right before the final hash calculation, heavy testing on Ux500 reveals that it is wise to wait for the hardware to go idle before calculating the final hash. The default test vectors mostly worked fine, but when I used the extensive tests and stress the hardware I ran into this problem. Acked-by: Lionel Debieve Signed-off-by: Linus Walleij Signed-off-by: Herbert Xu commit 727f083ff48ae94cd7422e42bb9513ab61160e8a Author: Linus Walleij Date: Wed Jan 25 01:23:08 2023 +0100 crypto: stm32/hash - Use existing busy poll function When exporting state we are waiting indefinitely in the same was as the ordinary stm32_hash_wait_busy() poll-for-completion function but without a timeout, which means we could hang in an eternal loop. Fix this by waiting for completion like the rest of the code. Acked-by: Lionel Debieve Signed-off-by: Linus Walleij Signed-off-by: Herbert Xu commit 2d27267b379f589836949481aec9c9f39dbe1f26 Author: Linus Walleij Date: Wed Jan 25 01:23:07 2023 +0100 crypto: stm32/hash - Simplify code We are passing (rctx->flags & HASH_FLAGS_FINUP) as indicator for the final request but we already know this to be true since we are in the (final) arm of an if-statement set from the same flag. Just open-code it as true. Acked-by: Lionel Debieve Signed-off-by: Linus Walleij Signed-off-by: Herbert Xu commit 85f3fc5446e5315197529736ddfbda61c2777e06 Author: Linus Walleij Date: Wed Jan 25 01:23:06 2023 +0100 dt-bindings: crypto: Let STM32 define Ux500 HASH This adds device tree bindings for the Ux500 HASH block as a compatible in the STM32 HASH bindings. The Ux500 HASH binding has been used for ages in the kernel device tree for Ux500 but was never documented, so fill in the gap by making it a sibling of the STM32 HASH block, which is what it is. The relationship to the existing STM32 HASH block is pretty obvious when looking at the register map, and I have written patches to reuse the STM32 HASH driver on the Ux500. The main difference from the outside is that the Ux500 HASH lacks the interrupt line, so some special if-clauses are needed to accomodate this in the binding. Reviewed-by: Rob Herring Signed-off-by: Linus Walleij Signed-off-by: Herbert Xu commit 5efa7186696e64cd4decb4419f174188ee06c4cb Author: Herbert Xu Date: Tue Jan 24 17:11:11 2023 +0800 crypto: marvell/cesa - Use crypto_wait_req This patch replaces the custom crypto completion function with crypto_req_done. Signed-off-by: Herbert Xu commit 3ce2d5971522adfdec9b17182ce9e513a26707e1 Author: Herbert Xu Date: Tue Jan 24 16:28:39 2023 +0800 crypto: img-hash - Fix sparse endianness warning Use cpu_to_be32 instead of be32_to_cpu in img_hash_read_result_queue to silence sparse. The generated code should be identical. Signed-off-by: Herbert Xu commit 46a334a98f585ef78d51d8f5736596887bdd7f54 Author: Tom Lendacky Date: Mon Jan 23 16:53:08 2023 -0600 crypto: ccp - Flush the SEV-ES TMR memory before giving it to firmware Perform a cache flush on the SEV-ES TMR memory after allocation to prevent any possibility of the firmware encountering an error should dirty cache lines be present. Use clflush_cache_range() to flush the SEV-ES TMR memory. Fixes: 97f9ac3db661 ("crypto: ccp - Add support for SEV-ES to the PSP driver") Signed-off-by: Tom Lendacky Signed-off-by: Herbert Xu commit 7ce515e636ec1807723c30fd3a6181b4ccac6ec6 Author: Lucas Segarra Fernandez Date: Mon Jan 23 11:42:22 2023 +0100 crypto: qat - add qat_zlib_deflate The ZLIB format (RFC 1950) is made of deflate compressed data surrounded by a header and a footer. The QAT accelerators support only the deflate algorithm, therefore the header and the footer need to be inserted in software. This adds logic in the QAT driver to support the ZLIB format. In particular: * Generalize the function qat_comp_alg_compress_decompress() to allow skipping an initial region (header) of the source and/or destination scatter lists. * Add logic to register the qat_zlib_deflate algorithm into the acomp framework. * For ZLIB compression, skip the initial portion of the destination buffer before sending the job to the QAT accelerator and insert the ZLIB header and footer in the callback, after the QAT request has been processed. * For ZLIB decompression, parse the header in the input buffer provided by the user and verify its validity before attempting the decompression of the buffer with QAT. Then submit the buffer to QAT for decompression. In the callback verify the correctness of the footer by comparing the value of the ADLER produced by QAT with the one in the destination buffer. Signed-off-by: Lucas Segarra Fernandez Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit c1e98807b7049dfc04a971b937ca127faa5514f4 Author: Lucas Segarra Fernandez Date: Mon Jan 23 11:42:21 2023 +0100 crypto: qat - extend buffer list logic interface Extend qat_bl_sgl_to_bufl() to allow skipping the mapping of a region of the source and the destination scatter lists starting from byte zero. This is to support the ZLIB format (RFC 1950) in the qat driver. The ZLIB format is made of deflate compressed data surrounded by a header and a footer. The QAT accelerators support only the deflate algorithm, therefore the header should not be mapped since it is inserted in software. Signed-off-by: Lucas Segarra Fernandez Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit d52b0c780c1f8cdd0cef9c6e683ab568d04bb19d Author: Herbert Xu Date: Mon Jan 23 18:08:56 2023 +0800 Revert "crypto: rsa-pkcs1pad - Replace GFP_ATOMIC with GFP_KERNEL in pkcs1pad_encrypt_sign_complete" This reverts commit 1ca2809897155f1adc43e4859b4a3582e235c09a. While the akcipher API as a whole is designed to be called only from thread context, its completion path is still called from softirq context as usual. Therefore we must not use GFP_KERNEL on that path. Signed-off-by: Herbert Xu commit 8a1955f95883cc0cb35b74f0cf58a283680323ac Author: Peter Lafreniere Date: Sat Jan 21 13:34:50 2023 -0500 crypto: x86 - exit fpu context earlier in ECB/CBC macros Currently the ecb/cbc macros hold fpu context unnecessarily when using scalar cipher routines (e.g. when handling odd sizes of blocks per walk). Change the macros to drop fpu context as soon as the fpu is out of use. No performance impact found (on Intel Haswell). Signed-off-by: Peter Lafreniere Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 0a312cf8dbec111df6d5c72e0a6b017d48a829c6 Merge: 150809082aab9 4dba3e7852b77 Author: Alexei Starovoitov Date: Thu Feb 2 20:48:24 2023 -0800 Merge branch 'xdp: introduce xdp-feature support' Lorenzo Bianconi says: ==================== Introduce the capability to export the XDP features supported by the NIC. Introduce a XDP compliance test tool (xdp_features) to check the features exported by the NIC match the real features supported by the driver. Allow XDP_REDIRECT of non-linear XDP frames into a devmap. Export XDP features for each XDP capable driver. Extend libbpf netlink implementation in order to support netlink_generic protocol. Introduce a simple generic netlink family for netdev data. Changes since v4: - rebase on top of bpf-next - get rid of XDP_FEATURE_* enum in XDP compliance test tool - rely on AF_INET6 address family and on IPv6-mapped-IPv6 addresses for IPv4 in XDP compliance test tool - add tsnep driver support Changes since v3: - add IPv6 support to XDP compliance test tool - rely on network_helpers in XDP compliance test tool - cosmetics changes Changes since v2: - rebase on top of bpf-next - fix compilation error Changes since v1: - add Documentation to netdev.yaml - use flags instead of enum as type for netdev.yaml definitions - squash XDP_PASS, XDP_DROP, XDP_TX and XDP_ABORTED into XDP_BASIC since they are supported by all drivers. - add notifier event to xdp_features_set_redirect_target() and xdp_features_clear_redirect_target() - add selftest for xdp-features support in bpf_xdp_detach() - add IPv6 preliminary support to XDP compliance test tool Changes since RFCv2: - do not assume fixed layout for genl kernel messages - fix warnings in netdev_nl_dev_fill - fix capabilities for nfp driver - add supported_sg parameter to xdp_features_set_redirect_target and drop __xdp_features_set_redirect_target routine Changes since RFCv1: - Introduce netdev-genl implementation and get rid of rtnl one. - Introduce netlink_generic support in libbpf netlink implementation - Rename XDP_FEATURE_* in NETDEV_XDP_ACT_* - Rename XDP_FEATURE_REDIRECT_TARGET in NETDEV_XDP_ACT_NDO_XMIT - Rename XDP_FEATURE_FRAG_RX in NETDEV_XDP_ACT_RX_SG - Rename XDP_FEATURE_FRAG_TARFET in NETDEV_XDP_ACT_NDO_XMIT - Get rid of XDP_LOCK feature. - Move xdp_feature field in a netdevice struct hole in the 4th cacheline. Jakub Kicinski (1): netdev-genl: create a simple family for netdev stuff Lorenzo Bianconi (5): libbpf: add the capability to specify netlink proto in libbpf_netlink_send_recv libbpf: add API to get XDP/XSK supported features bpf: devmap: check XDP features in __xdp_enqueue routine selftests/bpf: add test for bpf_xdp_query xdp-features support selftests/bpf: introduce XDP compliance test tool ==================== Signed-off-by: Alexei Starovoitov commit 4dba3e7852b7717a20ba206ab23ad289a0a5c504 Author: Lorenzo Bianconi Date: Wed Feb 1 11:24:24 2023 +0100 selftests/bpf: introduce XDP compliance test tool Introduce xdp_features tool in order to test XDP features supported by the NIC and match them against advertised ones. In order to test supported/advertised XDP features, xdp_features must run on the Device Under Test (DUT) and on a Tester device. xdp_features opens a control TCP channel between DUT and Tester devices to send control commands from Tester to the DUT and a UDP data channel where the Tester sends UDP 'echo' packets and the DUT is expected to reply back with the same packet. DUT installs multiple XDP programs on the NIC to test XDP capabilities and reports back to the Tester some XDP stats. Currently xdp_features supports the following XDP features: - XDP_DROP - XDP_ABORTED - XDP_PASS - XDP_TX - XDP_REDIRECT - XDP_NDO_XMIT Co-developed-by: Kumar Kartikeya Dwivedi Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Lorenzo Bianconi Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/r/7c1af8e7e6ef0614cf32fa9e6bdaa2d8d605f859.1675245258.git.lorenzo@kernel.org Signed-off-by: Alexei Starovoitov commit 84050074e51b68e6f1d3e89ebe8f8f6d73472ec3 Author: Lorenzo Bianconi Date: Wed Feb 1 11:24:23 2023 +0100 selftests/bpf: add test for bpf_xdp_query xdp-features support Introduce a self-test to verify libbpf bpf_xdp_query capability to dump the xdp-features supported by the device (lo and veth in this case). Acked-by: Stanislav Fomichev Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/534550318a2c883e174811683909544c63632f05.1675245258.git.lorenzo@kernel.org Signed-off-by: Alexei Starovoitov commit b9d460c9245541b13de2369e79688f8e0acc0c3d Author: Lorenzo Bianconi Date: Wed Feb 1 11:24:22 2023 +0100 bpf: devmap: check XDP features in __xdp_enqueue routine Check if the destination device implements ndo_xdp_xmit callback relying on NETDEV_XDP_ACT_NDO_XMIT flags. Moreover, check if the destination device supports XDP non-linear frame in __xdp_enqueue and is_valid_dst routines. This patch allows to perform XDP_REDIRECT on non-linear XDP buffers. Acked-by: Jesper Dangaard Brouer Co-developed-by: Kumar Kartikeya Dwivedi Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/26a94c33520c0bfba021b3fbb2cb8c1e69bf53b8.1675245258.git.lorenzo@kernel.org Signed-off-by: Alexei Starovoitov commit 04d58f1b26a436c429581d286528ea3c01624462 Author: Lorenzo Bianconi Date: Wed Feb 1 11:24:21 2023 +0100 libbpf: add API to get XDP/XSK supported features Extend bpf_xdp_query routine in order to get XDP/XSK supported features of netdev over route netlink interface. Extend libbpf netlink implementation in order to support netlink_generic protocol. Co-developed-by: Kumar Kartikeya Dwivedi Signed-off-by: Kumar Kartikeya Dwivedi Co-developed-by: Marek Majtyka Signed-off-by: Marek Majtyka Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/a72609ef4f0de7fee5376c40dbf54ad7f13bfb8d.1675245258.git.lorenzo@kernel.org Signed-off-by: Alexei Starovoitov commit 8f1669319c31dcdd07ae292822c9455aeb3bc7c7 Author: Lorenzo Bianconi Date: Wed Feb 1 11:24:20 2023 +0100 libbpf: add the capability to specify netlink proto in libbpf_netlink_send_recv This is a preliminary patch in order to introduce netlink_generic protocol support to libbpf. Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/7878a54667e74afeec3ee519999c044bd514b44c.1675245258.git.lorenzo@kernel.org Signed-off-by: Alexei Starovoitov commit 0ae0cb2bb22eb8cf943fa07137068347e1b918c4 Author: Marek Majtyka Date: Wed Feb 1 11:24:19 2023 +0100 xsk: add usage of XDP features flags Change necessary condition check for XSK from ndo functions to xdp features flags. Signed-off-by: Marek Majtyka Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/45a98ec67b4556a6a22dfd85df3eb8276beeeb74.1675245258.git.lorenzo@kernel.org Signed-off-by: Alexei Starovoitov commit 66c0e13ad236c74ea88c7c1518f3cef7f372e3da Author: Marek Majtyka Date: Wed Feb 1 11:24:18 2023 +0100 drivers: net: turn on XDP features A summary of the flags being set for various drivers is given below. Note that XDP_F_REDIRECT_TARGET and XDP_F_FRAG_TARGET are features that can be turned off and on at runtime. This means that these flags may be set and unset under RTNL lock protection by the driver. Hence, READ_ONCE must be used by code loading the flag value. Also, these flags are not used for synchronization against the availability of XDP resources on a device. It is merely a hint, and hence the read may race with the actual teardown of XDP resources on the device. This may change in the future, e.g. operations taking a reference on the XDP resources of the driver, and in turn inhibiting turning off this flag. However, for now, it can only be used as a hint to check whether device supports becoming a redirection target. Turn 'hw-offload' feature flag on for: - netronome (nfp) - netdevsim. Turn 'native' and 'zerocopy' features flags on for: - intel (i40e, ice, ixgbe, igc) - mellanox (mlx5). - stmmac - netronome (nfp) Turn 'native' features flags on for: - amazon (ena) - broadcom (bnxt) - freescale (dpaa, dpaa2, enetc) - funeth - intel (igb) - marvell (mvneta, mvpp2, octeontx2) - mellanox (mlx4) - mtk_eth_soc - qlogic (qede) - sfc - socionext (netsec) - ti (cpsw) - tap - tsnep - veth - xen - virtio_net. Turn 'basic' (tx, pass, aborted and drop) features flags on for: - netronome (nfp) - cavium (thunder) - hyperv. Turn 'redirect_target' feature flag on for: - amanzon (ena) - broadcom (bnxt) - freescale (dpaa, dpaa2) - intel (i40e, ice, igb, ixgbe) - ti (cpsw) - marvell (mvneta, mvpp2) - sfc - socionext (netsec) - qlogic (qede) - mellanox (mlx5) - tap - veth - virtio_net - xen Reviewed-by: Gerhard Engleder Reviewed-by: Simon Horman Acked-by: Stanislav Fomichev Acked-by: Jakub Kicinski Co-developed-by: Kumar Kartikeya Dwivedi Signed-off-by: Kumar Kartikeya Dwivedi Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi Signed-off-by: Marek Majtyka Link: https://lore.kernel.org/r/3eca9fafb308462f7edb1f58e451d59209aa07eb.1675245258.git.lorenzo@kernel.org Signed-off-by: Alexei Starovoitov commit d3d854fd6a1d97157f790604e07f6386e8df8fe4 Author: Jakub Kicinski Date: Wed Feb 1 11:24:17 2023 +0100 netdev-genl: create a simple family for netdev stuff Add a Netlink spec-compatible family for netdevs. This is a very simple implementation without much thought going into it. It allows us to reap all the benefits of Netlink specs, one can use the generic client to issue the commands: $ ./cli.py --spec netdev.yaml --dump dev_get [{'ifindex': 1, 'xdp-features': set()}, {'ifindex': 2, 'xdp-features': {'basic', 'ndo-xmit', 'redirect'}}, {'ifindex': 3, 'xdp-features': {'rx-sg'}}] the generic python library does not have flags-by-name support, yet, but we also don't have to carry strings in the messages, as user space can get the names from the spec. Acked-by: Jesper Dangaard Brouer Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi Co-developed-by: Kumar Kartikeya Dwivedi Signed-off-by: Kumar Kartikeya Dwivedi Co-developed-by: Marek Majtyka Signed-off-by: Marek Majtyka Signed-off-by: Jakub Kicinski Link: https://lore.kernel.org/r/327ad9c9868becbe1e601b580c962549c8cd81f2.1675245258.git.lorenzo@kernel.org Signed-off-by: Alexei Starovoitov commit 150809082aab95f7078f343c1c82770d6c9ebe68 Author: Tiezhu Yang Date: Thu Feb 2 14:31:26 2023 +0800 selftests/bpf: Use semicolon instead of comma in test_verifier.c Just silence the following checkpatch warning: WARNING: Possible comma where semicolon could be used Signed-off-by: Tiezhu Yang Link: https://lore.kernel.org/r/1675319486-27744-3-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Alexei Starovoitov commit e2bd9742989b6af873371de48c228a9ac1e87cba Author: Tiezhu Yang Date: Thu Feb 2 14:31:25 2023 +0800 tools/bpf: Use tab instead of white spaces to sync bpf.h Just silence the following build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/bpf.h' differs from latest version at 'include/uapi/linux/bpf.h' Signed-off-by: Tiezhu Yang Link: https://lore.kernel.org/r/1675319486-27744-2-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Alexei Starovoitov commit 158e5e9eeaa0d7a86f2278313746ef6c8521790d Author: Tobias Klauser Date: Thu Feb 2 15:19:21 2023 +0100 bpf: Drop always true do_idr_lock parameter to bpf_map_free_id The do_idr_lock parameter to bpf_map_free_id was introduced by commit bd5f5f4ecb78 ("bpf: Add BPF_MAP_GET_FD_BY_ID"). However, all callers set do_idr_lock = true since commit 1e0bd5a091e5 ("bpf: Switch bpf_map ref counter to atomic64_t so bpf_map_inc() never fails"). While at it also inline __bpf_map_put into its only caller bpf_map_put now that do_idr_lock can be dropped from its signature. Signed-off-by: Tobias Klauser Link: https://lore.kernel.org/r/20230202141921.4424-1-tklauser@distanz.ch Signed-off-by: Alexei Starovoitov commit d9e44c324ce625065a33366fb575c87efb00b443 Merge: 354bb4a0e0b6b cb6018485cd9e Author: Alexei Starovoitov Date: Thu Feb 2 20:21:59 2023 -0800 Merge branch ' docs/bpf: Add description of register liveness tracking algorithm' Eduard Zingerman says: ==================== An overview of the register tracking liveness algorithm. Previous versions posted here: [1], [2], [3]. - Changes from RFC to v2 (suggested by Andrii Nakryiko): - wording corrected to use term "stack slot" instead of "stack spill"; - parentage chain diagram updated to show nil links for frame #1; - added example for non-BPF_DW writes behavior; - explanation in "Read marks propagation for cache hits" is reworked. - Changes from v2 to v3: - lot's of grammatical / wording fixes as suggested by David Vernet; - "Register parentage chains" section is fixed to reflect what happens to r1-r5 when function call is processed (as suggested by David and Alexei); - Example in "Liveness marks tracking" section updated to explain why partial writes should not lead to REG_LIVE_WRITTEN marks (suggested by David); - "Read marks propagation for cache hits" section updates: - Explanation updated to hint why read marks should be propagated before jumping to example (suggested by David); - Removed box around B/D in the diagram updated (suggested by Alexei). - Changes from v3 to v4 (suggested by Edward Cree): - register parentage chain diagram updated to explain why r6 mark is not propagated; - read mark propagation algorithm pseudo-code fixed to correctly show "if state->live & REG_LIVE_WRITTEN" stop condition; - general wording improvements in section "Liveness marks tracking". [1] https://lore.kernel.org/bpf/20230124220343.2942203-1-eddyz87@gmail.com/ [2] https://lore.kernel.org/bpf/20230130182400.630997-1-eddyz87@gmail.com/ [3] https://lore.kernel.org/bpf/20230131181118.733845-1-eddyz87@gmail.com/ ==================== Signed-off-by: Alexei Starovoitov commit cb6018485cd9ede238dc04ed6a77ed1e8e871b37 Author: Eduard Zingerman Date: Thu Feb 2 14:57:13 2023 +0200 docs/bpf: Add description of register liveness tracking algorithm This is a followup for [1], adds an overview for the register liveness tracking, covers the following points: - why register liveness tracking is useful; - how register parentage chains are constructed; - how liveness marks are applied using the parentage chains. [1] https://lore.kernel.org/bpf/CAADnVQKs2i1iuZ5SUGuJtxWVfGYR9kDgYKhq3rNV+kBLQCu7rA@mail.gmail.com/ Signed-off-by: Eduard Zingerman Reviewed-by: Edward Cree Link: https://lore.kernel.org/r/20230202125713.821931-2-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 354bb4a0e0b6be8f55bacbe7f08c94b4741f5658 Author: Ilya Leoshkevich Date: Fri Feb 3 00:53:35 2023 +0100 selftests/bpf: Initialize tc in xdp_synproxy xdp_synproxy/xdp fails in CI with: Error: bpf_tc_hook_create: File exists The XDP version of the test should not be calling bpf_tc_hook_create(); the reason it's happening anyway is that if we don't specify --tc on the command line, tc variable remains uninitialized. Fixes: 784d5dc0efc2 ("selftests/bpf: Add selftests for raw syncookie helpers in TC mode") Reported-by: Alexei Starovoitov Reported-by: Joanne Koong Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230202235335.3403781-1-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 1c0db6d84f8e0ac8f14178f13250e36ebcf457ee Merge: 15a574485700e 84cc4c7aecc4c Author: Dave Airlie Date: Fri Feb 3 13:28:21 2023 +1000 Merge tag 'drm-misc-next-fixes-2023-02-02' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Short summary of fixes pull: A number of simple fixes throughout the DRM codebase. Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/Y9twz2rqOP2+LjaT@linux-uq9g commit bba8d3d17dc2678f9647962900aa421a18c25320 Merge: 8e1704b6a8c91 84ec7c20363f4 Author: Paul E. McKenney Date: Thu Feb 2 16:40:07 2023 -0800 Merge branch 'stall.2023.01.09a' into HEAD stall.2023.01.09a: RCU CPU stall-warning updates. commit 8e1704b6a8c91f37910f4d9957857f6d4424415c Merge: 5e013dc17e2ab cf7066b97e27b 608723c41cd95 dafc4d1603c27 5634469360ddc a4fcfbee8f627 d52d3a2bf408f 5a6cd56ad79a4 Author: Paul E. McKenney Date: Thu Feb 2 16:33:43 2023 -0800 Merge branches 'doc.2023.01.05a', 'fixes.2023.01.23a', 'kvfree.2023.01.03a', 'srcu.2023.01.03a', 'srcu-always.2023.02.02a', 'tasks.2023.01.03a', 'torture.2023.01.05a' and 'torturescript.2023.01.03a' into HEAD doc.2023.01.05a: Documentation update. fixes.2023.01.23a: Miscellaneous fixes. kvfree.2023.01.03a: kvfree_rcu() updates. srcu.2023.01.03a: SRCU updates. srcu-always.2023.02.02a: Finish making SRCU be unconditionally available. tasks.2023.01.03a: Tasks-RCU updates. torture.2023.01.05a: Torture-test updates. torturescript.2023.01.03a: Torture-test scripting updates. commit 1e70c680375aa33cca97bff0bca68c0f82f5023c Author: Kirill A. Shutemov Date: Mon Jan 30 16:53:54 2023 +0300 x86/tdx: Do not corrupt frame-pointer in __tdx_hypercall() If compiled with CONFIG_FRAME_POINTER=y, objtool is not happy that __tdx_hypercall() messes up RBP: objtool: __tdx_hypercall+0x7f: return with modified stack frame Rework the function to store TDX_HCALL_ flags on stack instead of RBP. [ dhansen: minor changelog tweaks ] Fixes: c30c4b2555ba ("x86/tdx: Refactor __tdx_hypercall() to allow pass down more arguments") Reported-by: kernel test robot Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/202301290255.buUBs99R-lkp@intel.com Link: https://lore.kernel.org/all/20230130135354.27674-1-kirill.shutemov%40linux.intel.com commit 608723c41cd951fb32ade2f8371e61c270816175 Author: Uladzislau Rezki (Sony) Date: Wed Feb 1 16:08:07 2023 +0100 rcu/kvfree: Add kvfree_rcu_mightsleep() and kfree_rcu_mightsleep() The kvfree_rcu() and kfree_rcu() APIs are hazardous in that if you forget the second argument, it works, but might sleep. This sleeping can be a correctness bug from atomic contexts, and even in non-atomic contexts it might introduce unacceptable latencies. This commit therefore adds kvfree_rcu_mightsleep() and kfree_rcu_mightsleep(), which will replace the single-argument kvfree_rcu() and kfree_rcu(), respectively. This commit enables a series of commits that switch from single-argument kvfree_rcu() and kfree_rcu() to their _mightsleep() counterparts. Once all of these commits land, the single-argument versions will be removed. Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit 5634469360ddc3337bd73c2cdcdf7849fb779026 Author: Paul E. McKenney Date: Tue Nov 22 18:22:42 2022 -0800 kernel/notifier: Remove CONFIG_SRCU Now that the SRCU Kconfig option is unconditionally selected, there is no longer any point in conditional compilation based on CONFIG_SRCU. Therefore, remove the #ifdef. Signed-off-by: Paul E. McKenney Cc: "Rafael J. Wysocki" Cc: "Michał Mirosław" Cc: Borislav Petkov Cc: Alan Stern Acked-by: Rafael J. Wysocki Reviewed-by: John Ogness commit bc636dcbf1c482f30a5d59415ba43e9907f97840 Author: Paul E. McKenney Date: Tue Nov 22 18:10:15 2022 -0800 init: 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: Nick Desaulniers Cc: Masahiro Yamada Cc: Johannes Weiner Cc: Vlastimil Babka Cc: Nathan Chancellor Cc: Arnd Bergmann Cc: Miguel Ojeda Cc: Masami Hiramatsu Cc: Dmitry Torokhov Cc: Aaron Tomlin Cc: Tejun Heo Cc: Christophe Leroy Reviewed-by: Nick Desaulniers Reviewed-by: John Ogness commit dbea8bcdeda89f1c3808e8eea0e8b5e18582ef8c Author: Paul E. McKenney Date: Tue Nov 22 17:53:17 2022 -0800 fs/quota: 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: Jan Kara Acked-by: Jan Kara Reviewed-by: John Ogness commit 818913feb814177384a15665f4001e1be33861a4 Author: Paul E. McKenney Date: Tue Nov 22 17:52:19 2022 -0800 fs/notify: 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: Jan Kara Cc: Amir Goldstein Cc: Acked-by: Jan Kara Reviewed-by: John Ogness commit cfa71bb282d09556673a62fbdc3d23d9e4df3fa0 Author: Paul E. McKenney Date: Tue Nov 22 17:49:29 2022 -0800 fs/btrfs: 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: Chris Mason Cc: Josef Bacik Cc: David Sterba Cc: Acked-by: David Sterba Reviewed-by: Qu Wenruo Reviewed-by: John Ogness commit 7b3a0473d10c64be7b2b4b4d69fa87128ebb6dd0 Author: Paul E. McKenney Date: Tue Nov 22 18:20:28 2022 -0800 fs: Remove CONFIG_SRCU Now that the SRCU Kconfig option is unconditionally selected, there is no longer any point in conditional compilation based on CONFIG_SRCU. Therefore, remove the #ifdef and throw away the #else clause. Signed-off-by: Paul E. McKenney Cc: Jeff Layton Cc: Chuck Lever Cc: Alexander Viro Cc: Reviewed-by: Jeff Layton Reviewed-by: John Ogness commit a8f0ff9185ae0de54dc6ec1ba4d8c5bdd29cb71b Author: Paul E. McKenney Date: Tue Nov 22 17:48:03 2022 -0800 drivers/pci/controller: 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: Lorenzo Pieralisi Cc: Rob Herring Cc: "Krzysztof Wilczyński" Cc: Bjorn Helgaas Cc: Acked-by: Lorenzo Pieralisi Reviewed-by: John Ogness commit 520bb822d7d9cecab80bb4b16cf81782275cbc96 Author: Paul E. McKenney Date: Tue Nov 22 17:25:33 2022 -0800 drivers/net: 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: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Acked-by: Jakub Kicinski Reviewed-by: John Ogness commit 9276cf8b30a5962d295a01c6fd912fdb9c138ff8 Author: Paul E. McKenney Date: Tue Nov 22 17:24:14 2022 -0800 drivers/md: 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: Song Liu Cc: Alasdair Kergon Cc: Mike Snitzer Cc: Cc: Acked-by: Mike Snitzer Reviewed-by: John Ogness commit 91193b27fb7a31c1f8e22a370989c007fbc3f10b Author: Paul E. McKenney Date: Tue Nov 22 17:22:10 2022 -0800 drivers/hwtracing/stm: 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: Alexander Shishkin Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: Cc: Acked-by: Alexander Shishkin Reviewed-by: John Ogness commit a870acc11230d7bf52b9bbeb6c096448f1176964 Author: Paul E. McKenney Date: Tue Nov 22 16:59:03 2022 -0800 drivers/dax: 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: Dan Williams Cc: Vishal Verma Cc: Dave Jiang Cc: Acked-by: Dan Williams Reviewed-by: John Ogness commit dc7c31b07adee585fe567bf44d8ef7f5a12e521a Author: Paul E. McKenney Date: Tue Nov 22 16:52:36 2022 -0800 drivers/base: Remove CONFIG_SRCU Now that the SRCU Kconfig option is unconditionally selected, there is no longer any point in conditional compilation based on CONFIG_SRCU. Therefore, remove the #ifdef and throw away the #else clause. Signed-off-by: Paul E. McKenney Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Acked-by: Greg Kroah-Hartman Acked-by: Rafael J. Wysocki Reviewed-by: John Ogness commit f3531d1acb4b7177c049211994807b74b231e870 Author: Krzysztof Kozlowski Date: Sun Jan 29 17:05:37 2023 +0100 dt-bindings: display: bridge: sil,sii8620: convert to dtschema Convert the Silicon Image SiI8620 HDMI/MHL bridge bindings to DT schema. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230129160537.32275-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit a222d7d96b586d4f1d54803c28383718f87730a9 Author: Rob Herring Date: Wed Jan 25 16:14:43 2023 -0600 dt-bindings: phy: hisilicon: Fix 'hisilicon,eye-diagram-param' differing types 'hisilicon,eye-diagram-param' is also defined in hisilicon,phy-hi3670-pcie.yaml as a 'uint32-array'. Unify it to use 'uint32-array' everywhere. Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20230125221444.3058631-1-robh@kernel.org Signed-off-by: Rob Herring commit 56f9168f5ec66728fef2e082f637c1888f9a4a23 Author: Rob Herring Date: Wed Jan 25 16:13:39 2023 -0600 dt-bindings: ti,k3: Use common ti,k3-sci-common.yaml schema Instead of redefining the 'ti,sci' and 'ti,sci-dev-id' properties multiple times, reference the common schema where they are defined. Most cases using these properties already do this, just udma and ringacc need to be fixed. Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230125221339.3057322-1-robh@kernel.org Signed-off-by: Rob Herring commit 839c717bec9865e75533bf9b382f399e69043630 Merge: e152a05fa0541 ed821cf84e7b9 Author: Jens Axboe Date: Thu Feb 2 16:04:54 2023 -0700 Merge branch 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-6.3/block Pull MD updates from Song: "Non-urgent fixes: md: don't update recovery_cp when curr_resync is ACTIVE md: Free writes_pending in md_stop Performance optimization: md: Change active_io to percpu" * 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md: use MD_RESYNC_* whenever possible md: Free writes_pending in md_stop md: Change active_io to percpu md: Factor out is_md_suspended helper md: don't update recovery_cp when curr_resync is ACTIVE commit 82b4a9412b4de2f68679f1403f1d229390ace27e Merge: b18ea3d9d214d edb9b8f380c34 Author: Jakub Kicinski Date: Thu Feb 2 14:49:55 2023 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net net/core/gro.c 7d2c89b32587 ("skb: Do mix page pool and page referenced frags in GRO") b1a78b9b9886 ("net: add support for ipv4 big tcp") https://lore.kernel.org/all/20230203094454.5766f160@canb.auug.org.au/ Signed-off-by: Jakub Kicinski commit efc8b329c7fdc30921a7dfc109237523e1e5b1cc Author: Paul E. McKenney Date: Wed Dec 21 16:20:25 2022 -0800 clocksource: Verify HPET and PMTMR when TSC unverified On systems with two or fewer sockets, when the boot CPU has CONSTANT_TSC, NONSTOP_TSC, and TSC_ADJUST, clocksource watchdog verification of the TSC is disabled. This works well much of the time, but there is the occasional production-level system that meets all of these criteria, but which still has a TSC that skews significantly from atomic-clock time. This is usually attributed to a firmware or hardware fault. Yes, the various NTP daemons do express their opinions of userspace-to-atomic-clock time skew, but they put them in various places, depending on the daemon and distro in question. It would therefore be good for the kernel to have some clue that there is a problem. The old behavior of marking the TSC unstable is a non-starter because a great many workloads simply cannot tolerate the overheads and latencies of the various non-TSC clocksources. In addition, NTP-corrected systems sometimes can tolerate significant kernel-space time skew as long as the userspace time sources are within epsilon of atomic-clock time. Therefore, when watchdog verification of TSC is disabled, enable it for HPET and PMTMR (AKA ACPI PM timer). This provides the needed in-kernel time-skew diagnostic without degrading the system's performance. Signed-off-by: Paul E. McKenney Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: Daniel Lezcano Cc: Waiman Long Cc: Tested-by: Feng Tang commit a7ec817d55421ac214cac9d3e5ebb65d848198dc Author: Feng Tang Date: Wed Jan 4 16:19:38 2023 +0800 x86/tsc: Add option to force frequency recalibration with HW timer The kernel assumes that the TSC frequency which is provided by the hardware / firmware via MSRs or CPUID(0x15) is correct after applying a few basic consistency checks. This disables the TSC recalibration against HPET or PM timer. As a result there is no mechanism to validate that frequency in cases where a firmware or hardware defect is suspected. And there was case that some user used atomic clock to measure the TSC frequency and reported an inaccuracy issue, which was later fixed in firmware. Add an option 'recalibrate' for 'tsc' kernel parameter to force the tsc freq recalibration with HPET or PM timer, and warn if the deviation from previous value is more than about 500 PPM, which provides a way to verify the data from hardware / firmware. There is no functional change to existing work flow. Recently there was a real-world case: "The 40ms/s divergence between TSC and HPET was observed on hardware that is quite recent" [1], on that platform the TSC frequence 1896 MHz was got from CPUID(0x15), and the force-reclibration with HPET/PMTIMER both calibrated out value of 1975 MHz, which also matched with check from software 'chronyd', indicating it's a problem of BIOS or firmware. [Thanks tglx for helping improving the commit log] [ paulmck: Wordsmith Kconfig help text. ] [1]. https://lore.kernel.org/lkml/20221117230910.GI4001@paulmck-ThinkPad-P17-Gen-1/ Signed-off-by: Feng Tang Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: Jonathan Corbet Cc: Cc: Signed-off-by: Paul E. McKenney commit ad818e6010ef1c561e0f11ccdbd4ab843f699993 Author: Marc Zyngier Date: Wed Feb 1 16:40:56 2023 +0000 irqchip/apple-aic: Correctly map the vgic maintenance interrupt We currently allocate the vgic maintenance interrupt by calling into the low-level irqdomain code. Not only this is unnecessary, but this is also pretty wrong: we end-up skipping a bunch of irqdesc state setup A simple "cat /proc/interrupt" shows how wrong we are, as the interrupt appears as "Edge" instead of "Level". Instead, just call the standard irq_create_fwspec_mapping(), which is the right tool for the job. Duh. Signed-off-by: Marc Zyngier Reviewed-by: Hector Martin Link: https://lore.kernel.org/r/20230201164056.669509-1-maz@kernel.org Signed-off-by: Oliver Upton commit 8071b210aeb96ff047fcf55fe4fa1f7e07012e90 Author: Rishit Bansal Date: Tue Jan 24 03:11:50 2023 +0530 platform/x86: hp-wmi: Ignore Win-Lock key events Follow up from https://lore.kernel.org/all/20230120221214.24426-1-rishitbansal0@gmail.com/ There is a "Win-Lock" key on HP Omen Laptops which supports enabling and disabling the Windows key, which trigger commands 0x21a4 and 0x121a4 respectively. Currently the hp-wmi driver throws warnings for this event. These can be ignored using KE_IGNORE as the functionality is handled by the keyboard firmware itself. Signed-off-by: Rishit Bansal Link: https://lore.kernel.org/r/20230123214150.62597-1-rishitbansal0@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit df72690ec365394c3850b37679a3b06c582db252 Author: Hans de Goede Date: Mon Jan 23 16:45:12 2023 +0100 platform/x86: apple_gmux: Drop no longer used ACPI_VIDEO Kconfig dependency The apple_gmux code no longer uses any symbols from the ACPI_VIDEO code, so that dependency can be dropped. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230123154512.852921-1-hdegoede@redhat.com commit 92e3524754dc1eb1e690cd109110929e54c76993 Author: Andy Shevchenko Date: Thu Jan 19 20:09:04 2023 +0200 platform/x86: int1092: 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/20230119180904.78446-1-andriy.shevchenko@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 6ab983187d80a10f67c8cf19a0a6640ab79a92b9 Author: Andy Shevchenko Date: Wed Jan 18 11:54:40 2023 +0200 platform/x86: intel/pmc: 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 Reviewed-by: Rajneesh Bhardwaj Link: https://lore.kernel.org/r/20230118095440.41634-1-andriy.shevchenko@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit c6d41f66d50a46ee943124f5079ad0282080cfb1 Author: Andy Shevchenko Date: Wed Jan 18 11:38:23 2023 +0200 platform/surface: 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 Reviewed-by: Maximilian Luz Link: https://lore.kernel.org/r/20230118093823.39679-1-andriy.shevchenko@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit b09ee1cd59918bcf1a6793b663034b6e345b3ced Author: Maximilian Luz Date: Tue Dec 20 18:56:08 2022 +0100 platform/surface: aggregator: Rename top-level request functions to avoid ambiguities We currently have a struct ssam_request_sync and a function ssam_request_sync(). While this is valid C, there are some downsides to it. One of these is that current Sphinx versions (>= 3.0) cannot disambiguate between the two (see disucssion and pull request linked below). It instead emits a "WARNING: Duplicate C declaration" and links for the struct and function in the resulting documentation link to the same entry (i.e. both to either function or struct documentation) instead of their respective own entries. While we could just ignore that and wait for a fix, there's also a point to be made that the current naming can be somewhat confusing when searching (e.g. via grep) or trying to understand the levels of abstraction at play: We currently have struct ssam_request_sync and associated functions ssam_request_sync_[alloc|free|init|wait|...]() operating on this struct. However, function ssam_request_sync() is one abstraction level above this. Similarly, ssam_request_sync_with_buffer() is not a function operating on struct ssam_request_sync, but rather a sibling to ssam_request_sync(), both using the struct under the hood. Therefore, rename the top level request functions: ssam_request_sync() -> ssam_request_do_sync() ssam_request_sync_with_buffer() -> ssam_request_do_sync_with_buffer() ssam_request_sync_onstack() -> ssam_request_do_sync_onstack() Link: https://lore.kernel.org/all/085e0ada65c11da9303d07e70c510dc45f21315b.1656756450.git.mchehab@kernel.org/ Link: https://github.com/sphinx-doc/sphinx/pull/8313 Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20221220175608.1436273-2-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 13eca7d74e331deb5924ad0555355c114a59def2 Author: Maximilian Luz Date: Fri Dec 2 23:33:27 2022 +0100 platform/surface: aggregator_registry: Fix target-ID of base-hub The target ID of the base hub is currently set to KIP (keyboard/ peripherals). However, even though it manages such devices with the KIP target ID, the base hub itself is actually accessed via the SAM target ID. So set it accordingly. Note that the target ID of the hub can be chosen arbitrarily and does not directly correspond to any physical or virtual component of the EC. This change is only a code improvement intended for consistency and clarity, it does not fix an actual bug. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20221202223327.690880-10-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 78abf1b5205534bb7deda408aa5b9b7e0bf1982e Author: Maximilian Luz Date: Fri Dec 2 23:33:26 2022 +0100 platform/surface: aggregator: Enforce use of target-ID enum in device ID macros Similar to the target category (TC), the target ID (TID) can be one value out of a small number of choices, given in enum ssam_ssh_tid. In the device ID macros, SSAM_SDEV() and SSAM_VDEV() we already use text expansion to, both, remove some textual clutter for the target category values and enforce that the value belongs to the known set. Now that we know the names for the target IDs, use the same trick for them as well. Also rename the SSAM_ANY_x macros to SSAM_SSH_x_ANY to better fit in. Signed-off-by: Maximilian Luz Acked-by: Sebastian Reichel Link: https://lore.kernel.org/r/20221202223327.690880-9-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit ea11bf4eb59e029cc54ad294126098dce67e321a Author: Maximilian Luz Date: Fri Dec 2 23:33:25 2022 +0100 HID: surface-hid: Use target-ID enum instead of hard-coding values Instead of hard-coding the target ID, use the respective enum ssam_ssh_tid value. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20221202223327.690880-8-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 1e6201d96ef901eb954c8ea0b16cc14bdc44e4ea Author: Maximilian Luz Date: Fri Dec 2 23:33:24 2022 +0100 platform/surface: dtx: Use target-ID enum instead of hard-coding values Instead of hard-coding the target ID, use the respective enum ssam_ssh_tid value. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20221202223327.690880-7-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 36f672a40e7d82fda7cf93b35949539aee61bfea Author: Maximilian Luz Date: Fri Dec 2 23:33:23 2022 +0100 platform/surface: aggregator_tabletsw: Use target-ID enum instead of hard-coding values Instead of hard-coding the target ID, use the respective enum ssam_ssh_tid value. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20221202223327.690880-6-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 0a603d710c73f551f75fc1d607a1800116664ecc Author: Maximilian Luz Date: Fri Dec 2 23:33:22 2022 +0100 platform/surface: aggregator_hub: Use target-ID enum instead of hard-coding values Instead of hard-coding the target ID, use the respective enum ssam_ssh_tid value. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20221202223327.690880-5-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 2730fc0ab4716bb5d884a8dbd3b0ac73317cfb54 Author: Maximilian Luz Date: Fri Dec 2 23:33:21 2022 +0100 platform/surface: aggregator: Add target and source IDs to command trace events Add command source and target IDs to trace events. Tracing support for the Surface Aggregator driver was originally implemented at a time when only two peers were known: Host and SAM. We now know that there are at least five, with three actively being used (Host, SAM, KIP; four with Debug if you want to count manually enabling that interface). So it makes sense to also explicitly name the peers involved when tracing. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20221202223327.690880-4-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 3f88b459a729ea397aa7cec9a7054a978882370a Author: Maximilian Luz Date: Fri Dec 2 23:33:20 2022 +0100 platform/surface: aggregator: Improve documentation and handling of message target and source IDs The `tid_in` and `tid_out` fields of the serial hub protocol command struct (struct ssh_command) are actually source and target IDs, indicating the peer from which the message originated and the peer for which it is intended. Change the naming of those fields accordingly and improve the protocol documentation. Additionally, introduce an enum containing all currently known peers, i.e. targets and sources. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20221202223327.690880-3-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 070b3098ddefdadcc6310878cf50ef09b380db1d Author: Uwe Kleine-König Date: Tue Dec 13 17:23:59 2022 +0100 platform/x86: intel: punit_ipc: 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 Link: https://lore.kernel.org/r/20221213162359.651529-4-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit c7304c563de8f094dca7c4d7fc84133d3db3e6a4 Author: Uwe Kleine-König Date: Tue Dec 13 17:23:58 2022 +0100 platform/x86: intel: oaktrail: 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 Link: https://lore.kernel.org/r/20221213162359.651529-3-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 72d42499fba913aaf34bace576892883912da3bc Author: Uwe Kleine-König Date: Tue Dec 13 17:23:57 2022 +0100 platform/x86: acerhdf: 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 Acked-by: Peter Kaestle Link: https://lore.kernel.org/r/20221213162359.651529-2-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 6f10f2ec61c7968b44428c551b1b06a4c5e4e544 Author: Quentin Perret Date: Wed Feb 1 10:37:54 2023 +0000 KVM: arm64: Finalise EL2 state from pKVM PSCI relay The EL2 state is not initialised correctly when a CPU comes out of CPU_{SUSPEND,OFF} as the finalise_el2 function is not being called. Let's directly call finalise_el2_state from this path to solve the issue. Fixes: 504ee23611c4 ("arm64: Add the arm64.nosve command line option") Signed-off-by: Quentin Perret Link: https://lore.kernel.org/r/20230201103755.1398086-5-qperret@google.com Signed-off-by: Oliver Upton commit 3c4cc31537ec26c3347cc09792bbdba11b96e54a Author: Quentin Perret Date: Wed Feb 1 10:37:53 2023 +0000 KVM: arm64: Use sanitized values in __check_override in nVHE The nVHE EL2 code has access to sanitized values of certain idregs, so use them directly from __check_override instead of the *_override variants. Signed-off-by: Quentin Perret Link: https://lore.kernel.org/r/20230201103755.1398086-4-qperret@google.com Signed-off-by: Oliver Upton commit e2d4f5ae1771dddf4844fa00742e3d3d3f77d383 Author: Quentin Perret Date: Wed Feb 1 10:37:52 2023 +0000 KVM: arm64: Introduce finalise_el2_state macro Factor out the first half of the finalise_el2 function into a macro to allow its reuse from the nVHE PSCI relay code. While at it, make the register allocation parametric for the check_override macros as they are now more widely exposed. No functional changes intended. Signed-off-by: Quentin Perret Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20230201103755.1398086-3-qperret@google.com Signed-off-by: Oliver Upton commit 8669651ce0d90a79bab22dfe2758fe07e070a02e Author: Quentin Perret Date: Wed Feb 1 10:37:51 2023 +0000 KVM: arm64: Provide sanitized SYS_ID_AA64SMFR0_EL1 to nVHE We will need a sanitized copy of SYS_ID_AA64SMFR0_EL1 from the nVHE EL2 code shortly, so make sure to provide it with a copy. Signed-off-by: Quentin Perret Acked-by: Mark Brown Link: https://lore.kernel.org/r/20230201103755.1398086-2-qperret@google.com Signed-off-by: Oliver Upton commit a84153f939808102dfa10904aa0f743e734a3e1d Author: Chao Yu Date: Tue Jan 31 22:47:01 2023 +0800 f2fs: fix to update age extent in f2fs_do_zero_range() We should update age extent in f2fs_do_zero_range() like we did in f2fs_truncate_data_blocks_range(). Fixes: 71644dff4811 ("f2fs: add block_age-based extent cache") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 8c0ed062ce27f6b7f0a568cb241e2b4dd2d9e6a6 Author: Chao Yu Date: Tue Jan 31 22:47:00 2023 +0800 f2fs: fix to update age extent correctly during truncation nr_free may be less than len, we should update age extent cache w/ range [fofs, len] rather than [fofs, nr_free]. Fixes: 71644dff4811 ("f2fs: add block_age-based extent cache") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0dbbf0fb38d5ec5d4138d1aeaeb43d9217b9a592 Author: Yangtao Li Date: Sat Jan 21 00:16:55 2023 +0800 f2fs: fix to avoid potential memory corruption in __update_iostat_latency() Add iotype sanity check to avoid potential memory corruption. This is to fix the compile error below: fs/f2fs/iostat.c:231 __update_iostat_latency() error: buffer overflow 'io_lat->peak_lat[type]' 3 <= 3 vim +228 fs/f2fs/iostat.c 211 static inline void __update_iostat_latency(struct bio_iostat_ctx *iostat_ctx, 212 enum iostat_lat_type type) 213 { 214 unsigned long ts_diff; 215 unsigned int page_type = iostat_ctx->type; 216 struct f2fs_sb_info *sbi = iostat_ctx->sbi; 217 struct iostat_lat_info *io_lat = sbi->iostat_io_lat; 218 unsigned long flags; 219 220 if (!sbi->iostat_enable) 221 return; 222 223 ts_diff = jiffies - iostat_ctx->submit_ts; 224 if (page_type >= META_FLUSH) ^^^^^^^^^^ 225 page_type = META; 226 227 spin_lock_irqsave(&sbi->iostat_lat_lock, flags); @228 io_lat->sum_lat[type][page_type] += ts_diff; ^^^^^^^^^ Mixup between META_FLUSH and NR_PAGE_TYPE leads to memory corruption. Fixes: a4b6817625e7 ("f2fs: introduce periodic iostat io latency traces") Reported-by: kernel test robot Reported-by: Dan Carpenter Suggested-by: Chao Yu Suggested-by: Jaegeuk Kim Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 3aa51c61cb4a4dcb40df51ac61171e9ac5a35321 Author: Jaegeuk Kim Date: Mon Jan 30 15:20:09 2023 -0800 f2fs: retry to update the inode page given data corruption If the storage gives a corrupted node block due to short power failure and reset, f2fs stops the entire operations by setting the checkpoint failure flag. Let's give more chances to live by re-issuing IOs for a while in such critical path. Cc: stable@vger.kernel.org Suggested-by: Randall Huang Suggested-by: Chao Yu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 933141e4eb49d8b48721e2377835063a1e8fb823 Author: Chao Yu Date: Sat Jan 28 18:32:26 2023 +0800 f2fs: fix to handle F2FS_IOC_START_ATOMIC_REPLACE in f2fs_compat_ioctl() Otherwise, 32-bits binary call ioctl(F2FS_IOC_START_ATOMIC_REPLACE) will fail in 64-bits kernel. Fixes: 41e8f85a75fc ("f2fs: introduce F2FS_IOC_START_ATOMIC_REPLACE") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b90e5086df6bf5ba819216d5ecf0667370bd565f Author: Chao Yu Date: Sat Jan 28 18:30:11 2023 +0800 f2fs: clean up i_compress_flag and i_compress_level usage .i_compress_level was introduced by commit 3fde13f817e2 ("f2fs: compress: support compress level"), but never be used. This patch updates as below: - load high 8-bits of on-disk .i_compress_flag to in-memory .i_compress_level - load low 8-bits of on-disk .i_compress_flag to in-memory .i_compress_flag - change type of in-memory .i_compress_flag from unsigned short to unsigned char. w/ above changes, we can avoid unneeded bit shift whenever during .init_compress_ctx(), and shrink size of struct f2fs_inode_info. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 2eae077e6e46f9046d383631145750e043820dce Author: Chao Yu Date: Thu Feb 2 15:04:56 2023 +0800 f2fs: reduce stack memory cost by using bitfield in struct f2fs_io_info This patch tries to use bitfield in struct f2fs_io_info to improve memory usage. struct f2fs_io_info { ... unsigned int need_lock:8; /* indicate we need to lock cp_rwsem */ unsigned int version:8; /* version of the node */ unsigned int submitted:1; /* indicate IO submission */ unsigned int in_list:1; /* indicate fio is in io_list */ unsigned int is_por:1; /* indicate IO is from recovery or not */ unsigned int retry:1; /* need to reallocate block address */ unsigned int encrypted:1; /* indicate file is encrypted */ unsigned int post_read:1; /* require post read */ ... }; After this patch, size of struct f2fs_io_info reduces from 136 to 120. [Nathan: fix a compile warning (single-bit-bitfield-constant-conversion)] Signed-off-by: Nathan Chancellor Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a28bca0f47feb5cdfc22be0e563bd4da2aed74f7 Author: Christoph Hellwig Date: Thu Jan 19 07:36:21 2023 +0100 f2fs: factor the read/write tracing logic into a helper Factor the logic to log a path for reads and writs into a helper shared between the read_iter and write_iter methods. Signed-off-by: Christoph Hellwig Signed-off-by: Jaegeuk Kim commit 88c9edfd3c4cf129d6259085c4cc899051fa1fdc Author: Christoph Hellwig Date: Thu Jan 19 07:36:25 2023 +0100 f2fs: remove __has_curseg_space Just open code the logic in the only caller, where it is more obvious. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4a2095887340e75dfb07575950fcdb7fbcbec64b Author: Christoph Hellwig Date: Thu Jan 19 07:36:24 2023 +0100 f2fs: refactor next blk selection Remove __refresh_next_blkoff by opencoding the SSR vs LFS segment check in the only caller, and then add helpers for SSR block selection and blkoff randomization instead. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit dede3525edbff6e6244668f81d66a48105d3e43b Author: Christoph Hellwig Date: Thu Jan 19 07:36:23 2023 +0100 f2fs: remove __allocate_new_section Just fold this trivial wrapper into the only caller. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 2df79573ef0215431dc4be6b0d4b084204a0820a Author: Christoph Hellwig Date: Thu Jan 19 07:36:22 2023 +0100 f2fs: refactor __allocate_new_segment Simplify the check whether to allocate a new segment or reuse an open one. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 6392e9ff8bba228746e37b78b960de6de855fc9d Author: Christoph Hellwig Date: Thu Jan 19 07:36:20 2023 +0100 f2fs: add a f2fs_curseg_valid_blocks helper Add a helper to return the valid blocks on log and SSR segments, and replace the last two uses of curseg_blkoff with it. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5a4fed7cd97ac3d9708982d3801e132e2a36c126 Author: Christoph Hellwig Date: Thu Jan 19 07:36:19 2023 +0100 f2fs: simplify do_checkpoint For each loop add a local curseg_info pointer insted of looking it up for each of the three fields. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 015e61f0bffd46600496e50d3b2298f51f6b11a8 Author: Binbin Zhou Date: Tue Jan 31 20:37:31 2023 +0800 i2c: ls2x: Add driver for Loongson-2K/LS7A I2C controller This I2C module is integrated into the Loongson-2K SoCs and Loongson LS7A bridge chip. Signed-off-by: Binbin Zhou Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang commit 57b2ba483cdf4515f37a68d8732c4072ccbf9875 Author: Binbin Zhou Date: Tue Jan 31 20:37:30 2023 +0800 dt-bindings: i2c: Add Loongson LS2X I2C controller Add Loongson LS2X I2C controller binding with DT schema format using json-schema. Signed-off-by: Binbin Zhou Reviewed-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang commit db95818e888a927456686518880ed0145b1f20ce Author: Ian Rogers Date: Thu Jan 26 15:36:34 2023 -0800 perf pmu-events: Add separate metric from pmu_event Create a new pmu_metric for the metric related variables from pmu_event but that is initially just a clone of pmu_event. Add iterators for pmu_metric and use in places that metrics are desired rather than events. Make the event iterator skip metric only events, and the metric iterator skip event only events. Reviewed-by: John Garry Reviewed-by: Kajol Jain Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Florian Fischer Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jing Zhang Cc: Jiri Olsa Cc: Kan Liang Cc: Kang Minchul Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230126233645.200509-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit df5499ddb859bb848ddad5939d258da8a781af3a Author: Ian Rogers Date: Thu Jan 26 15:36:33 2023 -0800 perf jevents: Rewrite metrics in the same file with each other Rewrite metrics within the same file in terms of each other. For example, on Power8 other_stall_cpi is rewritten from: "PM_CMPLU_STALL / PM_RUN_INST_CMPL - PM_CMPLU_STALL_BRU_CRU / PM_RUN_INST_CMPL - PM_CMPLU_STALL_FXU / PM_RUN_INST_CMPL - PM_CMPLU_STALL_VSU / PM_RUN_INST_CMPL - PM_CMPLU_STALL_LSU / PM_RUN_INST_CMPL - PM_CMPLU_STALL_NTCG_FLUSH / PM_RUN_INST_CMPL - PM_CMPLU_STALL_NO_NTF / PM_RUN_INST_CMPL" to: "stall_cpi - bru_cru_stall_cpi - fxu_stall_cpi - vsu_stall_cpi - lsu_stall_cpi - ntcg_flush_cpi - no_ntf_stall_cpi" Which more closely matches the definition on Power9. To avoid recomputation decorate the function with a cache. Reviewed-by: Kajol Jain Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Florian Fischer Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jing Zhang Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kang Minchul Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230126233645.200509-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 2efbb73d46eaf5618d9782648117ad635e6b1251 Author: Ian Rogers Date: Thu Jan 26 15:36:32 2023 -0800 perf jevents metric: Add ability to rewrite metrics in terms of others Add RewriteMetricsInTermsOfOthers that iterates over pairs of names and expressions trying to replace an expression, within the current expression, with its name. Reviewed-by: Kajol Jain Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Florian Fischer Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jing Zhang Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kang Minchul Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230126233645.200509-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 3241cd11d9a093783a97cea7136179206553fa86 Author: Ian Rogers Date: Thu Jan 26 15:36:31 2023 -0800 perf jevents metric: Correct Function equality rhs may not be defined, say for source_count, so add a guard. Reviewed-by: Kajol Jain Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Florian Fischer Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jing Zhang Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kang Minchul Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sandipan Das Cc: Stephane Eranian Cc: Will Deacon Cc: Xing Zhengjun Cc: linux-arm-kernel@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230126233645.200509-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 8eaf8ec3c09b88e35c1c3c761ac4188ee425aeb6 Author: Sandipan Das Date: Thu Feb 2 17:56:15 2023 +0530 perf session: Show branch speculation info in raw dump Show the branch speculation info if provided by the branch recording hardware feature. This can be useful for purposes of code optimization. E.g. $ perf record -j any,u ./test_branch $ perf report --dump-raw-trace Before: [...] 8380958377610 0x40b178 [0x1b0]: PERF_RECORD_SAMPLE(IP, 0x2): 7952/7952: 0x4f851a period: 48973 addr: 0 ... branch stack: nr:16 ..... 0: 00000000004b52fd -> 00000000004f82c0 0 cycles P 0 ..... 1: ffffffff8220137c -> 00000000004b52f0 0 cycles M 0 ..... 2: 000000000041d1c4 -> 00000000004b52f0 0 cycles P 0 ..... 3: 00000000004e7ead -> 000000000041d1b0 0 cycles M 0 ..... 4: 00000000004e7f91 -> 00000000004e7ead 0 cycles P 0 ..... 5: 00000000004e7ea8 -> 00000000004e7f70 0 cycles P 0 ..... 6: 00000000004e7e52 -> 00000000004e7e98 0 cycles M 0 ..... 7: 00000000004e7e1f -> 00000000004e7e40 0 cycles M 0 ..... 8: 00000000004e7f60 -> 00000000004e7df0 0 cycles P 0 ..... 9: 00000000004e7f58 -> 00000000004e7f60 0 cycles M 0 ..... 10: 000000000041d85d -> 00000000004e7f50 0 cycles P 0 ..... 11: 000000000043306a -> 000000000041d840 0 cycles P 0 ..... 12: ffffffff8220137c -> 0000000000433040 0 cycles M 0 ..... 13: 000000000041e4a1 -> 0000000000433040 0 cycles P 0 ..... 14: ffffffff8220137c -> 000000000041e490 0 cycles M 0 ..... 15: 000000000041d89b -> 000000000041e487 0 cycles P 0 ... thread: test_branch:7952 ...... dso: /data/sandipan/test_branch [...] After: [...] 8380958377610 0x40b178 [0x1b0]: PERF_RECORD_SAMPLE(IP, 0x2): 7952/7952: 0x4f851a period: 48973 addr: 0 ... branch stack: nr:16 ..... 0: 00000000004b52fd -> 00000000004f82c0 0 cycles P 0 NON_SPEC_CORRECT_PATH ..... 1: ffffffff8220137c -> 00000000004b52f0 0 cycles M 0 NON_SPEC_CORRECT_PATH ..... 2: 000000000041d1c4 -> 00000000004b52f0 0 cycles P 0 NON_SPEC_CORRECT_PATH ..... 3: 00000000004e7ead -> 000000000041d1b0 0 cycles M 0 NON_SPEC_CORRECT_PATH ..... 4: 00000000004e7f91 -> 00000000004e7ead 0 cycles P 0 NON_SPEC_CORRECT_PATH ..... 5: 00000000004e7ea8 -> 00000000004e7f70 0 cycles P 0 NON_SPEC_CORRECT_PATH ..... 6: 00000000004e7e52 -> 00000000004e7e98 0 cycles M 0 SPEC_CORRECT_PATH ..... 7: 00000000004e7e1f -> 00000000004e7e40 0 cycles M 0 NON_SPEC_CORRECT_PATH ..... 8: 00000000004e7f60 -> 00000000004e7df0 0 cycles P 0 NON_SPEC_CORRECT_PATH ..... 9: 00000000004e7f58 -> 00000000004e7f60 0 cycles M 0 NON_SPEC_CORRECT_PATH ..... 10: 000000000041d85d -> 00000000004e7f50 0 cycles P 0 NON_SPEC_CORRECT_PATH ..... 11: 000000000043306a -> 000000000041d840 0 cycles P 0 NON_SPEC_CORRECT_PATH ..... 12: ffffffff8220137c -> 0000000000433040 0 cycles M 0 NON_SPEC_CORRECT_PATH ..... 13: 000000000041e4a1 -> 0000000000433040 0 cycles P 0 NON_SPEC_CORRECT_PATH ..... 14: ffffffff8220137c -> 000000000041e490 0 cycles M 0 NON_SPEC_CORRECT_PATH ..... 15: 000000000041d89b -> 000000000041e487 0 cycles P 0 NON_SPEC_CORRECT_PATH ... thread: test_branch:7952 ...... dso: /data/sandipan/test_branch [...] With the addition of new branch flags, the "brstacksym" fields in perf script output now shows speculation information after the branch type. Change the regular expressions accordingly for the test to pass. Since branch speculation information may vary across platforms, the test does not look for specific values. E.g. $ perf test -v 110 Before: 110: Check branch stack sampling : --- start --- test child forked, pid 54154 Testing user branch stack sampling + grep -E -m1 ^brstack_bench\+[^ ]*/brstack_foo\+[^ ]*/IND_CALL$ /tmp/__perf_test.program.AfhUI/perf.script + cleanup + rm -rf /tmp/__perf_test.program.AfhUI test child finished with -1 ---- end ---- Check branch stack sampling: FAILED! After: 110: Check branch stack sampling : --- start --- test child forked, pid 43716 Testing user branch stack sampling + grep -E -m1 ^brstack_bench\+[^ ]*/brstack_foo\+[^ ]*/IND_CALL/.*$ /tmp/__perf_test.program.xgzAi/perf.script brstack_bench+0x66/brstack_foo+0x0/P/-/-/0/IND_CALL/NON_SPEC_CORRECT_PATH + grep -E -m1 ^brstack_foo\+[^ ]*/brstack_bar\+[^ ]*/CALL/.*$ /tmp/__perf_test.program.xgzAi/perf.script brstack_foo+0x1b/brstack_bar+0x0/P/-/-/0/CALL/NON_SPEC_CORRECT_PATH + grep -E -m1 ^brstack_bench\+[^ ]*/brstack_foo\+[^ ]*/CALL/.*$ /tmp/__perf_test.program.xgzAi/perf.script brstack_bench+0x58/brstack_foo+0x0/P/-/-/0/CALL/NON_SPEC_CORRECT_PATH + grep -E -m1 ^brstack_bench\+[^ ]*/brstack_bar\+[^ ]*/CALL/.*$ /tmp/__perf_test.program.xgzAi/perf.script brstack_bench+0x5d/brstack_bar+0x0/P/-/-/0/CALL/NON_SPEC_CORRECT_PATH + grep -E -m1 ^brstack_bar\+[^ ]*/brstack_foo\+[^ ]*/RET/.*$ /tmp/__perf_test.program.xgzAi/perf.script brstack_bar+0x31/brstack_foo+0x20/P/-/-/0/RET/NON_SPEC_CORRECT_PATH + grep -E -m1 ^brstack_foo\+[^ ]*/brstack_bench\+[^ ]*/RET/.*$ /tmp/__perf_test.program.xgzAi/perf.script brstack_foo+0x36/brstack_bench+0x5d/P/-/-/0/RET/NON_SPEC_CORRECT_PATH + grep -E -m1 ^brstack_bench\+[^ ]*/brstack_bench\+[^ ]*/COND/.*$ /tmp/__perf_test.program.xgzAi/perf.script brstack_bench+0x76/brstack_bench+0x7d/P/-/-/0/COND/NON_SPEC_CORRECT_PATH + grep -E -m1 ^brstack\+[^ ]*/brstack\+[^ ]*/UNCOND/.*$ /tmp/__perf_test.program.xgzAi/perf.script brstack+0x5a/brstack+0x41/P/-/-/0/UNCOND/NON_SPEC_CORRECT_PATH + set +x Testing branch stack filtering permutation (any_call,CALL|IND_CALL|COND_CALL|SYSCALL|IRQ) Testing branch stack filtering permutation (call,CALL|SYSCALL) Testing branch stack filtering permutation (cond,COND) Testing branch stack filtering permutation (any_ret,RET|COND_RET|SYSRET|ERET) Testing branch stack filtering permutation (call,cond,CALL|SYSCALL|COND) Testing branch stack filtering permutation (any_call,cond,CALL|IND_CALL|COND_CALL|IRQ|SYSCALL|COND) Testing branch stack filtering permutation (cond,any_call,any_ret,COND|CALL|IND_CALL|COND_CALL|SYSCALL|IRQ|RET|COND_RET|SYSRET|ERET) test child finished with 0 ---- end ---- Check branch stack sampling: Ok Signed-off-by: Sandipan Das Cc: Alexander Shishkin Cc: Ananth Narayan Cc: Borislav Petkov Cc: Dave Hansen Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kajol Jain Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Santosh Shukla Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Thomas Richter Cc: x86@kernel.org Link: https://lore.kernel.org/r/048d67c9de3cc8e3dbf19aaa7ff718dec91364c5.1675333809.git.sandipan.das@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit 6ade6c6460357a4878db24f468bbc66e3eddcd42 Author: Sandipan Das Date: Thu Feb 2 17:56:14 2023 +0530 perf script: Show branch speculation info Show the branch speculation info if provided by the branch recording hardware feature. This can be useful for optimizing code further. The speculation info is appended to the end of the list of fields so any existing tools that use "/" as a delimiter for access fields via an index remain unaffected. Also show "-" instead of "N/A" when speculation info is unavailable because "/" is used as the field separator. E.g. $ perf record -j any,u,save_type ./test_branch $ perf script --fields brstacksym Before: [...] check_match+0x60/strcmp+0x0/P/-/-/0/CALL do_lookup_x+0x3c5/check_match+0x0/P/-/-/0/CALL [...] After: [...] check_match+0x60/strcmp+0x0/P/-/-/0/CALL/NON_SPEC_CORRECT_PATH do_lookup_x+0x3c5/check_match+0x0/P/-/-/0/CALL/NON_SPEC_CORRECT_PATH [...] The bitfield swapping scheme used duing sample parsing has changed because of the addition of new branch flags, namely "spec", "new_type" and "priv". Earlier, these were all part of the "reserved" field but now, each of these fields get swapped separately. Change the expected flag values accordingly for the test to pass. E.g. $ perf test -v 27 Before: 27: Sample parsing : --- start --- test child forked, pid 61979 parsing failed for sample_type 0x800 test child finished with -1 ---- end ---- Sample parsing: FAILED! After: 27: Sample parsing : --- start --- test child forked, pid 63293 test child finished with 0 ---- end ---- Sample parsing: Ok Signed-off-by: Sandipan Das Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ananth Narayan Cc: Borislav Petkov Cc: Dave Hansen Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kajol Jain Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Santosh Shukla Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Thomas Richter Cc: x86@kernel.org Link: https://lore.kernel.org/r/56e272583552526e999ba0b536ac009ae3613966.1675333809.git.sandipan.das@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit 79b7ca7802d24cd4042d0fd508afb59169f74a7a Author: Namhyung Kim Date: Wed Feb 1 21:04:55 2023 -0800 perf test: Add more test cases for perf lock contention Check callstack filter with two different aggregation mode. $ sudo ./perf test -v contention 88: kernel lock contention analysis test : --- start --- test child forked, pid 83416 Testing perf lock record and perf lock contention Testing perf lock contention --use-bpf Testing perf lock record and perf lock contention at the same time Testing perf lock contention --threads Testing perf lock contention --lock-addr Testing perf lock contention --type-filter (w/ spinlock) Testing perf lock contention --lock-filter (w/ tasklist_lock) Testing perf lock contention --callstack-filter (w/ unix_stream) Testing perf lock contention --callstack-filter with task aggregation test child finished with 0 ---- end ---- kernel lock contention analysis test: Ok Signed-off-by: Namhyung Kim Cc: Adrian Hunter 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/20230202050455.2187592-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3432e57493c278c1cb48abc2d69c6c055a19723e Author: Zhang Xiaoxu Date: Thu Oct 27 20:49:06 2022 +0800 jffs2: Fix list_del corruption if compressors initialized failed There is a list_del corruption when remove the jffs2 module: list_del corruption, ffffffffa0623e60->next is NULL WARNING: CPU: 6 PID: 6332 at lib/list_debug.c:49 __list_del_entry_valid+0x98/0x130 Modules linked in: jffs2(-) ] CPU: 6 PID: 6332 Comm: rmmod Tainted: G W 6.1.0-rc2+ #5 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-1.fc33 04/01/2014 RIP: 0010:__list_del_entry_valid+0x98/0x130 ... Call Trace: jffs2_unregister_compressor+0x3e/0xe0 [jffs2] jffs2_zlib_exit+0x11/0x30 [jffs2] jffs2_compressors_exit+0x1e/0x30 [jffs2] exit_jffs2_fs+0x16/0x44f [jffs2] __do_sys_delete_module.constprop.0+0x244/0x370 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 If one of the compressor initialize failed, the module always insert success since jffs2_compressors_init() always return success, then something bad may happen during remove the module. For this scenario, let's insmod failed. Signed-off-by: Zhang Xiaoxu Signed-off-by: Richard Weinberger commit d5711ae52d5a548d16e5c177c92c15338ec63624 Author: Zhang Xiaoxu Date: Thu Oct 27 20:49:05 2022 +0800 jffs2: Use function instead of macro when initialize compressors The initialized compressors should be released if one of them initialize fail, this is the pre-patch for fix the problem, use function instead of the macro in jffs2_compressors_init() to simplify the codes, no functional change intended. Signed-off-by: Zhang Xiaoxu Signed-off-by: Richard Weinberger commit 7198c9c00338287fe364d76bba35b3b10feec3c5 Author: Yu Zhe Date: Fri Nov 18 16:51:04 2022 +0800 jffs2: fix spelling mistake "neccecary"->"necessary" There is a spelling mistake in comment. Fix it. Signed-off-by: Yu Zhe Signed-off-by: Richard Weinberger commit 422125232f6200f0490b7d7fb97722723eb8876d Author: Yang Li Date: Wed Nov 17 15:03:04 2021 +0800 ubifs: Fix kernel-doc Fix function name in fs/ubifs/io.c kernel-doc comment to remove some warnings found by clang(make W=1 LLVM=1). fs/ubifs/io.c:497: warning: expecting prototype for wbuf_timer_callback(). Prototype was for wbuf_timer_callback_nolock() instead fs/ubifs/io.c:513: warning: expecting prototype for new_wbuf_timer(). Prototype was for new_wbuf_timer_nolock() instead fs/ubifs/io.c:538: warning: expecting prototype for cancel_wbuf_timer(). Prototype was for cancel_wbuf_timer_nolock() instead Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Richard Weinberger commit 415c94532ebb2838dc9e2e5a5e609a6140caa5c5 Author: Yang Li Date: Thu Jun 2 14:55:56 2022 +0800 ubifs: Fix some kernel-doc comments Remove warnings found by running scripts/kernel-doc, which is caused by using 'make W=1'. fs/ubifs/journal.c:1221: warning: Function parameter or member 'old_inode' not described in 'ubifs_jnl_rename' fs/ubifs/journal.c:1221: warning: Function parameter or member 'old_nm' not described in 'ubifs_jnl_rename' fs/ubifs/journal.c:1221: warning: Function parameter or member 'new_inode' not described in 'ubifs_jnl_rename' fs/ubifs/journal.c:1221: warning: Function parameter or member 'new_nm' not described in 'ubifs_jnl_rename' fs/ubifs/journal.c:1221: warning: Function parameter or member 'whiteout' not described in 'ubifs_jnl_rename' fs/ubifs/journal.c:1221: warning: Excess function parameter 'old_dentry' description in 'ubifs_jnl_rename' fs/ubifs/journal.c:1221: warning: Excess function parameter 'new_dentry' description in 'ubifs_jnl_rename' Reported-by: Abaci Robot Signed-off-by: Yang Li Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit b5dd034f8f4a8405713842fb0a6f35e5062d95b7 Author: Jiapeng Chong Date: Tue Sep 27 11:57:58 2022 +0800 UBI: Fastmap: Fix kernel-doc drivers/mtd/ubi/fastmap.c:104: warning: expecting prototype for new_fm_vhdr(). Prototype was for new_fm_vbuf() instead. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2289 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Richard Weinberger commit 4d57a7333e26040f2b583983e1970d9d460e56b0 Author: Zhihao Cheng Date: Mon Jun 13 14:59:04 2022 +0800 ubi: ubi_wl_put_peb: Fix infinite loop when wear-leveling work failed Following process will trigger an infinite loop in ubi_wl_put_peb(): ubifs_bgt ubi_bgt ubifs_leb_unmap ubi_leb_unmap ubi_eba_unmap_leb ubi_wl_put_peb wear_leveling_worker e1 = rb_entry(rb_first(&ubi->used) e2 = get_peb_for_wl(ubi) ubi_io_read_vid_hdr // return err (flash fault) out_error: ubi->move_from = ubi->move_to = NULL wl_entry_destroy(ubi, e1) ubi->lookuptbl[e->pnum] = NULL retry: e = ubi->lookuptbl[pnum]; // return NULL if (e == ubi->move_from) { // NULL == NULL gets true goto retry; // infinite loop !!! $ top PID USER PR NI VIRT RES SHR S %CPU %MEM COMMAND 7676 root 20 0 0 0 0 R 100.0 0.0 ubifs_bgt0_0 Fix it by: 1) Letting ubi_wl_put_peb() returns directly if wearl leveling entry has been removed from 'ubi->lookuptbl'. 2) Using 'ubi->wl_lock' protecting wl entry deletion to preventing an use-after-free problem for wl entry in ubi_wl_put_peb(). Fetch a reproducer in [Link]. Fixes: 43f9b25a9cdd7b1 ("UBI: bugfix: protect from volume removal") Fixes: ee59ba8b064f692 ("UBI: Fix stale pointers in ubi->lookuptbl") Link: https://bugzilla.kernel.org/show_bug.cgi?id=216111 Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit a240bc5c43130c6aa50831d7caaa02a1d84e1bce Author: Zhihao Cheng Date: Sat Jul 30 19:28:37 2022 +0800 ubi: Fix UAF wear-leveling entry in eraseblk_count_seq_show() Wear-leveling entry could be freed in error path, which may be accessed again in eraseblk_count_seq_show(), for example: __erase_worker eraseblk_count_seq_show wl = ubi->lookuptbl[*block_number] if (wl) wl_entry_destroy ubi->lookuptbl[e->pnum] = NULL kmem_cache_free(ubi_wl_entry_slab, e) erase_count = wl->ec // UAF! Wear-leveling entry updating/accessing in ubi->lookuptbl should be protected by ubi->wl_lock, fix it by adding ubi->wl_lock to serialize wl entry accessing between wl_entry_destroy() and eraseblk_count_seq_show(). Fetch a reproducer in [Link]. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216305 Fixes: 7bccd12d27b7e3 ("ubi: Add debugfs file for tracking PEB state") Fixes: 801c135ce73d5d ("UBI: Unsorted Block Images") Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 76f9476ece445a07aeb72df9d896cd563fb5b50f Author: Zhihao Cheng Date: Tue Aug 9 15:06:19 2022 +0800 ubi: fastmap: Fix missed fm_anchor PEB in wear-leveling after disabling fastmap After disabling fastmap(ubi->fm_disabled = 1), fastmap won't be updated, fm_anchor PEB is missed being scheduled for erasing. Besides, fm_anchor PEB may have smallest erase count, it doesn't participate wear-leveling. The difference of erase count between fm_anchor PEB and other PEBs will be larger and larger later on. In which situation fastmap can be disabled? Initially, we have an UBI image with fastmap. Then the image will be atttached without module parameter 'fm_autoconvert', ubi turns to full scanning mode in one random attaching process(eg. bad fastmap caused by powercut), ubi fastmap is disabled since then. Fix it by not getting fm_anchor if fastmap is disabled in ubi_refill_pools(). Fetch a reproducer in [Link]. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216341 Fixes: 4b68bf9a69d22d ("ubi: Select fastmap anchor PEBs considering ...") Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 66f4742e93523ab2f062d9d9828b3e590bc61536 Author: Zhihao Cheng Date: Wed Jun 1 11:00:00 2022 +0800 ubifs: ubifs_releasepage: Remove ubifs_assert(0) to valid this process There are two states for ubifs writing pages: 1. Dirty, Private 2. Not Dirty, Not Private The normal process cannot go to ubifs_releasepage() which means there exists pages being private but not dirty. Reproducer[1] shows that it could occur (which maybe related to [2]) with following process: PA PB PC lock(page)[PA] ubifs_write_end attach_page_private // set Private __set_page_dirty_nobuffers // set Dirty unlock(page) write_cache_pages[PA] lock(page) clear_page_dirty_for_io(page) // clear Dirty ubifs_writepage do_truncation[PB] truncate_setsize i_size_write(inode, newsize) // newsize = 0 i_size = i_size_read(inode) // i_size = 0 end_index = i_size >> PAGE_SHIFT if (page->index > end_index) goto out // jump out: unlock(page) // Private, Not Dirty generic_fadvise[PC] lock(page) invalidate_inode_page try_to_release_page ubifs_releasepage ubifs_assert(c, 0) // bad assertion! unlock(page) truncate_pagecache[PB] Then we may get following assertion failed: UBIFS error (ubi0:0 pid 1683): ubifs_assert_failed [ubifs]: UBIFS assert failed: 0, in fs/ubifs/file.c:1513 UBIFS warning (ubi0:0 pid 1683): ubifs_ro_mode [ubifs]: switched to read-only mode, error -22 CPU: 2 PID: 1683 Comm: aa Not tainted 5.16.0-rc5-00184-g0bca5994cacc-dirty #308 Call Trace: dump_stack+0x13/0x1b ubifs_ro_mode+0x54/0x60 [ubifs] ubifs_assert_failed+0x4b/0x80 [ubifs] ubifs_releasepage+0x67/0x1d0 [ubifs] try_to_release_page+0x57/0xe0 invalidate_inode_page+0xfb/0x130 __invalidate_mapping_pages+0xb9/0x280 invalidate_mapping_pagevec+0x12/0x20 generic_fadvise+0x303/0x3c0 ksys_fadvise64_64+0x4c/0xb0 [1] https://bugzilla.kernel.org/show_bug.cgi?id=215373 [2] https://linux-mtd.infradead.narkive.com/NQoBeT1u/patch-rfc-ubifs-fix-assert-failed-in-ubifs-set-page-dirty Fixes: 1e51764a3c2ac0 ("UBIFS: add new flash file system") Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit fb8bc4c74ae4526d9489362ab2793a936d072b84 Author: Zhihao Cheng Date: Wed Jun 1 10:59:59 2022 +0800 ubifs: ubifs_writepage: Mark page dirty after writing inode failed There are two states for ubifs writing pages: 1. Dirty, Private 2. Not Dirty, Not Private There is a third possibility which maybe related to [1] that page is private but not dirty caused by following process: PA lock(page) ubifs_write_end attach_page_private // set Private __set_page_dirty_nobuffers // set Dirty unlock(page) write_cache_pages lock(page) clear_page_dirty_for_io(page) // clear Dirty ubifs_writepage write_inode // fail, goto out, following codes are not executed // do_writepage // set_page_writeback // set Writeback // detach_page_private // clear Private // end_page_writeback // clear Writeback out: unlock(page) // Private, Not Dirty PB ksys_fadvise64_64 generic_fadvise invalidate_inode_page // page is neither Dirty nor Writeback invalidate_complete_page // page_has_private is true try_to_release_page ubifs_releasepage ubifs_assert(c, 0) !!! Then we may get following assertion failed: UBIFS error (ubi0:0 pid 1492): ubifs_assert_failed [ubifs]: UBIFS assert failed: 0, in fs/ubifs/file.c:1499 UBIFS warning (ubi0:0 pid 1492): ubifs_ro_mode [ubifs]: switched to read-only mode, error -22 CPU: 2 PID: 1492 Comm: aa Not tainted 5.16.0-rc2-00012-g7bb767dee0ba-dirty Call Trace: dump_stack+0x13/0x1b ubifs_ro_mode+0x54/0x60 [ubifs] ubifs_assert_failed+0x4b/0x80 [ubifs] ubifs_releasepage+0x7e/0x1e0 [ubifs] try_to_release_page+0x57/0xe0 invalidate_inode_page+0xfb/0x130 invalidate_mapping_pagevec+0x12/0x20 generic_fadvise+0x303/0x3c0 vfs_fadvise+0x35/0x40 ksys_fadvise64_64+0x4c/0xb0 Jump [2] to find a reproducer. [1] https://linux-mtd.infradead.narkive.com/NQoBeT1u/patch-rfc-ubifs-fix-assert-failed-in-ubifs-set-page-dirty [2] https://bugzilla.kernel.org/show_bug.cgi?id=215357 Fixes: 1e51764a3c2ac0 ("UBIFS: add new flash file system") Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 122deabfe1428bffe95e2bf364ff8a5059bdf089 Author: Zhihao Cheng Date: Fri Nov 18 17:02:36 2022 +0800 ubifs: dirty_cow_znode: Fix memleak in error handling path 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. Fix it by adding copied znode back to tnc, then it will be freed by ubifs_destroy_tnc_subtree() while closing tnc. Fetch a reproducer in [Link]. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216705 Fixes: 1e51764a3c2a ("UBIFS: add new flash file system") Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 944e096aa24071d3fe22822f6249d3ae309e39ea Author: Zhihao Cheng Date: Fri Nov 18 17:02:35 2022 +0800 ubifs: Re-statistic cleaned znode count if commit failed Dirty znodes will be written on flash in committing process with following states: process A | znode state ------------------------------------------------------ do_commit | DIRTY_ZNODE ubifs_tnc_start_commit | DIRTY_ZNODE get_znodes_to_commit | DIRTY_ZNODE | COW_ZNODE layout_commit | DIRTY_ZNODE | COW_ZNODE fill_gap | 0 write master | 0 or OBSOLETE_ZNODE process B | znode state ------------------------------------------------------ do_commit | DIRTY_ZNODE[1] ubifs_tnc_start_commit | DIRTY_ZNODE get_znodes_to_commit | DIRTY_ZNODE | COW_ZNODE ubifs_tnc_end_commit | DIRTY_ZNODE | COW_ZNODE write_index | 0 write master | 0 or OBSOLETE_ZNODE[2] or | DIRTY_ZNODE[3] [1] znode is dirtied without concurrent committing process [2] znode is copied up (re-dirtied by other process) before cleaned up in committing process [3] znode is re-dirtied after cleaned up in committing process Currently, the clean znode count is updated in free_obsolete_znodes(), which is called only in normal path. If do_commit failed, clean znode count won't be updated, which triggers a failure ubifs assertion[4] in ubifs_tnc_close(): ubifs_assert_failed [ubifs]: UBIFS assert failed: freed == n [4] Commit 380347e9ca7682 ("UBIFS: Add an assertion for clean_zn_cnt"). Fix it by re-statisticing cleaned znode count in tnc_destroy_cnext(). Fetch a reproducer in [Link]. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216704 Fixes: 1e51764a3c2a ("UBIFS: add new flash file system") Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 2de203d8ab51657664a60f2d4cd89cb7d75b7eac Author: ZhaoLong Wang Date: Mon Nov 14 22:46:46 2022 +0800 ubi: Fix permission display of the debugfs files Some interface files in debugfs support the read method dfs_file_read(), but their rwx permissions is shown as unreadable. In the user mode, the following problem can be clearly seen: # ls -l /sys/kernel/debug/ubi/ubi0/ total 0 --w------- 1 root root 0 Oct 22 16:26 chk_fastmap --w------- 1 root root 0 Oct 22 16:26 chk_gen --w------- 1 root root 0 Oct 22 16:26 chk_io -r-------- 1 root root 0 Oct 22 16:26 detailed_erase_block_info --w------- 1 root root 0 Oct 22 16:26 tst_disable_bgt --w------- 1 root root 0 Oct 22 16:26 tst_emulate_bitflips --w------- 1 root root 0 Oct 22 16:26 tst_emulate_io_failures --w------- 1 root root 0 Oct 22 16:26 tst_emulate_power_cut --w------- 1 root root 0 Oct 22 16:26 tst_emulate_power_cut_max --w------- 1 root root 0 Oct 22 16:26 tst_emulate_power_cut_min It shows that these files do not have read permission 'r', but we can actually read their contents. # echo 1 > /sys/kernel/debug/ubi/ubi0/chk_io # cat /sys/kernel/debug/ubi/ubi0/chk_io 1 User's permission access is determined by capabilities. Of course, the root user is not restricted from reading these files. When reading a debugfs file, the process is as follows: ksys_read() vfs_read() if (file->f_op->read) file->f_op->read() full_proxy_open() real_fops->read() dfs_file_read() -- Read method of debugfs file. else if (file->f_op->read_iter) new_sync_read() else ret = -EINVAL -- Return -EINVAL if no read method. This indicates that the debugfs file can be read as long as the read method of the debugfs file is registered. This patch adds the read permission display for file that support the read method. Signed-off-by: ZhaoLong Wang Signed-off-by: Richard Weinberger commit c15859bfd326c10230f09cb48a17f8a35f190342 Author: Yang Yingliang Date: Mon Nov 14 18:26:24 2022 +0800 ubi: Fix possible null-ptr-deref in ubi_free_volume() It willl cause null-ptr-deref in the following case: uif_init() ubi_add_volume() cdev_add() -> if it fails, call kill_volumes() device_register() kill_volumes() -> if ubi_add_volume() fails call this function ubi_free_volume() cdev_del() device_unregister() -> trying to delete a not added device, it causes null-ptr-deref So in ubi_free_volume(), it delete devices whether they are added or not, it will causes null-ptr-deref. Handle the error case whlie calling ubi_add_volume() to fix this problem. If add volume fails, set the corresponding vol to null, so it can not be accessed in kill_volumes() and release the resource in ubi_add_volume() error path. Fixes: 801c135ce73d ("UBI: Unsorted Block Images") Suggested-by: Zhihao Cheng Signed-off-by: Yang Yingliang Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 7af73882dd1cea5d32ac0cc9eda263635295de50 Author: ZhaoLong Wang Date: Tue Oct 25 16:52:49 2022 +0800 ubi: fastmap: Add fastmap control support for module parameter The UBI driver can use the IOCTL to disable the fastmap after the mainline 669d204469c4 ("ubi: fastmap: Add fastmap control support for 'UBI_IOCATT' ioctl"). To destroy the fastmap on a old image, we need to reattach the device in user space. However, if the UBI driver build in kernel and the UBI volume is the root partition, the UBI device cannot be reattached in user space. To disable fastmap in this case, the UBI must provide the kernel cmdline parameters to disable fastmap during attach. This patch add 'enable_fm' as 5th module init parameter of mtd=xx to control fastmap enable or not. When the value is 0, fastmap will not create and existed fastmap will destroyed for the given ubi device. Default value is 0. To enable or disable fastmap during module loading, fm_autoconvert must be set to non-zero. +-----------------+---------------+---------------------------+ | \ | enable_fm=0 | enable_fm=1 | +-----------------+---------------+---------------------------+ |fm_autoconvert=Y | disable fm | enable fm | +---------------------------------+---------------------------+ |fm_autoconvert=N | disable fm | Enable fastmap if fastmap | | | | exists on the old image | +-------------------------------------------------------------+ Example: # - Attach mtd1 to ubi1, disable fastmap, mtd2 to ubi2, enable fastmap. # modprobe ubi mtd=1,0,0,1,0 mtd=2,0,0,2,1 fm_autoconvert=1 # - If 5th parameter is not specified, the value is 0, fastmap is disable # modprobe ubi mtd=1 fm_autoconvert=1 Link: https://bugzilla.kernel.org/show_bug.cgi?id=216623 Signed-off-by: ZhaoLong Wang Signed-off-by: Richard Weinberger commit 4a1ff3c5d04b9079b4f768d9a71b51c4af578dd2 Author: Li Zetao Date: Sat Oct 22 19:52:11 2022 +0800 ubifs: Fix memory leak in alloc_wbufs() kmemleak reported a sequence of memory leaks, and show them as following: unreferenced object 0xffff8881575f8400 (size 1024): comm "mount", pid 19625, jiffies 4297119604 (age 20.383s) 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: [] __kmalloc+0x4d/0x150 [] ubifs_mount+0x307b/0x7170 [ubifs] [] legacy_get_tree+0xed/0x1d0 [] vfs_get_tree+0x7d/0x230 [] path_mount+0xdd4/0x17b0 [] __x64_sys_mount+0x1fa/0x270 [] do_syscall_64+0x35/0x80 [] entry_SYSCALL_64_after_hwframe+0x46/0xb0 unreferenced object 0xffff8881798a6e00 (size 512): comm "mount", pid 19677, jiffies 4297121912 (age 37.816s) hex dump (first 32 bytes): 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk backtrace: [] __kmalloc+0x4d/0x150 [] ubifs_wbuf_init+0x52/0x480 [ubifs] [] ubifs_mount+0x31f5/0x7170 [ubifs] [] legacy_get_tree+0xed/0x1d0 [] vfs_get_tree+0x7d/0x230 [] path_mount+0xdd4/0x17b0 [] __x64_sys_mount+0x1fa/0x270 [] do_syscall_64+0x35/0x80 [] entry_SYSCALL_64_after_hwframe+0x46/0xb0 The problem is that the ubifs_wbuf_init() returns an error in the loop which in the alloc_wbufs(), then the wbuf->buf and wbuf->inodes that were successfully alloced before are not freed. Fix it by adding error hanging path in alloc_wbufs() which frees the memory alloced before when ubifs_wbuf_init() returns an error. Fixes: 1e51764a3c2a ("UBIFS: add new flash file system") Signed-off-by: Li Zetao Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 1e591ea072df7211f64542a09482b5f81cb3ad27 Author: Li Zetao Date: Fri Oct 21 18:21:57 2022 +0800 ubi: Fix unreferenced object reported by kmemleak in ubi_resize_volume() There is a memory leaks problem reported by kmemleak: unreferenced object 0xffff888102007a00 (size 128): comm "ubirsvol", pid 32090, jiffies 4298464136 (age 2361.231s) hex dump (first 32 bytes): ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ backtrace: [] __kmalloc+0x4d/0x150 [] ubi_eba_create_table+0x76/0x170 [ubi] [] ubi_resize_volume+0x1be/0xbc0 [ubi] [] ubi_cdev_ioctl+0x701/0x1850 [ubi] [] __x64_sys_ioctl+0x11d/0x170 [] do_syscall_64+0x35/0x80 [] entry_SYSCALL_64_after_hwframe+0x46/0xb0 This is due to a mismatch between create and destroy interfaces, and in detail that "new_eba_tbl" created by ubi_eba_create_table() but destroyed by kfree(), while will causing "new_eba_tbl->entries" not freed. Fix it by replacing kfree(new_eba_tbl) with ubi_eba_destroy_table(new_eba_tbl) Fixes: 799dca34ac54 ("UBI: hide EBA internals") Signed-off-by: Li Zetao Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 9af31d6ec1a4be4caab2550096c6bd2ba8fba472 Author: Li Zetao Date: Fri Oct 21 18:21:56 2022 +0800 ubi: Fix use-after-free when volume resizing failed There is an use-after-free problem reported by KASAN: ================================================================== BUG: KASAN: use-after-free in ubi_eba_copy_table+0x11f/0x1c0 [ubi] Read of size 8 at addr ffff888101eec008 by task ubirsvol/4735 CPU: 2 PID: 4735 Comm: ubirsvol Not tainted 6.1.0-rc1-00003-g84fa3304a7fc-dirty #14 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-1.fc33 04/01/2014 Call Trace: dump_stack_lvl+0x34/0x44 print_report+0x171/0x472 kasan_report+0xad/0x130 ubi_eba_copy_table+0x11f/0x1c0 [ubi] ubi_resize_volume+0x4f9/0xbc0 [ubi] ubi_cdev_ioctl+0x701/0x1850 [ubi] __x64_sys_ioctl+0x11d/0x170 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 When ubi_change_vtbl_record() returns an error in ubi_resize_volume(), "new_eba_tbl" will be freed on error handing path, but it is holded by "vol->eba_tbl" in ubi_eba_replace_table(). It means that the liftcycle of "vol->eba_tbl" and "vol" are different, so when resizing volume in next time, it causing an use-after-free fault. Fix it by not freeing "new_eba_tbl" after it replaced in ubi_eba_replace_table(), while will be freed in next volume resizing. Fixes: 801c135ce73d ("UBI: Unsorted Block Images") Signed-off-by: Li Zetao Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit e874dcde1cbf82c786c0e7f2899811c02630cc52 Author: Zhihao Cheng Date: Tue Oct 11 11:47:32 2022 +0800 ubifs: Reserve one leb for each journal head while doing budget UBIFS calculates available space by c->main_bytes - c->lst.total_used (which means non-index lebs' free and dirty space is accounted into total available), then index lebs and four lebs (one for gc_lnum, one for deletions, two for journal heads) are deducted. In following situation, ubifs may get -ENOSPC from make_reservation(): LEB 84: DATAHD free 122880 used 1920 dirty 2176 dark 6144 LEB 110:DELETION free 126976 used 0 dirty 0 dark 6144 (empty) LEB 201:gc_lnum free 126976 used 0 dirty 0 dark 6144 LEB 272:GCHD free 77824 used 47672 dirty 1480 dark 6144 LEB 356:BASEHD free 0 used 39776 dirty 87200 dark 6144 OTHERS: index lebs, zero-available non-index lebs UBIFS calculates the available bytes is 6888 (How to calculate it: 126976 * 5[remain main bytes] - 1920[used] - 47672[used] - 39776[used] - 126976 * 1[deletions] - 126976 * 1[gc_lnum] - 126976 * 2[journal heads] - 6144 * 5[dark] = 6888) after doing budget, however UBIFS cannot use BASEHD's dirty space(87200), because UBIFS cannot find next BASEHD to reclaim current BASEHD. (c->bi.min_idx_lebs equals to c->lst.idx_lebs, the empty leb won't be found by ubifs_find_free_space(), and dirty index lebs won't be picked as gced lebs. All non-index lebs has dirty space less then c->dead_wm, non-index lebs won't be picked as gced lebs either. So new free lebs won't be produced.). See more details in Link. To fix it, reserve one leb for each journal head while doing budget. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216562 Fixes: 1e51764a3c2ac0 ("UBIFS: add new flash file system") Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 25fce616a61fc2f1821e4a9ce212d0e064707093 Author: Zhihao Cheng Date: Tue Oct 11 11:47:31 2022 +0800 ubifs: do_rename: Fix wrong space budget when target inode's nlink > 1 If target inode is a special file (eg. block/char device) with nlink count greater than 1, the inode with ui->data will be re-written on disk. However, UBIFS losts target inode's data_len while doing space budget. Bad space budget may let make_reservation() return with -ENOSPC, which could turn ubifs to read-only mode in do_writepage() process. Fetch a reproducer in [Link]. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216494 Fixes: 1e51764a3c2ac0 ("UBIFS: add new flash file system") Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit b248eaf049d9cdc5eb76b59399e4d3de233f02ac Author: Zhihao Cheng Date: Tue Oct 11 11:47:30 2022 +0800 ubifs: Fix wrong dirty space budget for dirty inode Each dirty inode should reserve 'c->bi.inode_budget' bytes in space budget calculation. Currently, space budget for dirty inode reports more space than what UBIFS actually needs to write. Fixes: 1e51764a3c2ac0 ("UBIFS: add new flash file system") Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit c04cc68da856eac2b59e2a421c3f81a2afc560db Author: Zhihao Cheng Date: Tue Oct 11 11:47:29 2022 +0800 ubifs: Add comments and debug info for ubifs_xrename() Just like other operations (eg. ubifs_create, do_rename), add comments and debug information for ubifs_xrename(). Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 1b2ba09060e41adb356b9ae58ef94a7390928004 Author: Zhihao Cheng Date: Tue Oct 11 11:47:28 2022 +0800 ubifs: Rectify space budget for ubifs_xrename() There is no space budget for ubifs_xrename(). It may let make_reservation() return with -ENOSPC, which could turn ubifs to read-only mode in do_writepage() process. Fix it by adding space budget for ubifs_xrename(). Fetch a reproducer in [Link]. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216569 Fixes: 9ec64962afb170 ("ubifs: Implement RENAME_EXCHANGE") Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit c2c36cc6ca23e614f9e4238d0ecf48549ee9002a Author: Zhihao Cheng Date: Tue Oct 11 11:47:27 2022 +0800 ubifs: Rectify space budget for ubifs_symlink() if symlink is encrypted Fix bad space budget when symlink file is encrypted. Bad space budget may let make_reservation() return with -ENOSPC, which could turn ubifs to read-only mode in do_writepage() process. Fetch a reproducer in [Link]. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216490 Fixes: ca7f85be8d6cf9 ("ubifs: Add support for encrypted symlinks") Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 6addbe91fcccd446036d5acc8e54a9b4395ac4bb Author: Mårten Lindahl Date: Thu Oct 13 14:02:49 2022 +0200 ubi: block: Reduce warning print to info for static volumes If volume size is not multiple of the sector size 512 a warning is printed saying that the last non-sector aligned bytes will be ignored. This should be valid for resizable volumes, but when creating static volumes which are read only this will always be printed even if the unaligned data is deliberate. The message is still valid but the severity should be lowered for static volumes. Signed-off-by: Mårten Lindahl Signed-off-by: Richard Weinberger commit 203a55f04f66eea1a1ca7e5a302a7f5c99c62327 Author: Liu Shixin Date: Thu Oct 20 12:30:31 2022 +0800 ubifs: Fix memory leak in ubifs_sysfs_init() When insmod ubifs.ko, a kmemleak reported as below: unreferenced object 0xffff88817fb1a780 (size 8): comm "insmod", pid 25265, jiffies 4295239702 (age 100.130s) hex dump (first 8 bytes): 75 62 69 66 73 00 ff ff ubifs... backtrace: [] slab_post_alloc_hook+0x9c/0x3c0 [] __kmalloc_track_caller+0x183/0x410 [] kstrdup+0x3a/0x80 [] kstrdup_const+0x66/0x80 [] kvasprintf_const+0x155/0x190 [] kobject_set_name_vargs+0x5b/0x150 [] kobject_set_name+0xbb/0xf0 [] do_one_initcall+0x14c/0x5a0 [] do_init_module+0x1f0/0x660 [] load_module+0x6d7e/0x7590 [] __do_sys_finit_module+0x19f/0x230 [] __x64_sys_finit_module+0x73/0xb0 [] do_syscall_64+0x35/0x80 [] entry_SYSCALL_64_after_hwframe+0x63/0xcd When kset_register() failed, we should call kset_put to cleanup it. Fixes: 2e3cbf425804 ("ubifs: Export filesystem error counters") Signed-off-by: Liu Shixin Signed-off-by: Richard Weinberger commit aa6d148e6d6270274e3d5a529b71c54cd329d17f Author: Li Hua Date: Mon Nov 21 19:18:47 2022 +0800 ubifs: Fix build errors as symbol undefined With CONFIG_UBIFS_FS_AUTHENTICATION not set, the compiler can assume that ubifs_node_check_hash() is never true and drops the call to ubifs_bad_hash(). Is CONFIG_CC_OPTIMIZE_FOR_SIZE enabled this optimization does not happen anymore. So When CONFIG_UBIFS_FS and CONFIG_CC_OPTIMIZE_FOR_SIZE is enabled but CONFIG_UBIFS_FS_AUTHENTICATION is not set, the build errors is as followd: ERROR: modpost: "ubifs_bad_hash" [fs/ubifs/ubifs.ko] undefined! Fix it by add no-op ubifs_bad_hash() for the CONFIG_UBIFS_FS_AUTHENTICATION=n case. Fixes: 16a26b20d2af ("ubifs: authentication: Add hashes to index nodes") Signed-off-by: Li Hua Reviewed-by: Sascha Hauer Signed-off-by: Richard Weinberger commit 1b42b1a36fc946f0d7088425b90d491b4257ca3e Author: George Kennedy Date: Tue Nov 15 10:14:44 2022 -0500 ubi: ensure that VID header offset + VID header size <= alloc, size Ensure that the VID header offset + VID header size does not exceed the allocated area to avoid slab OOB. BUG: KASAN: slab-out-of-bounds in crc32_body lib/crc32.c:111 [inline] BUG: KASAN: slab-out-of-bounds in crc32_le_generic lib/crc32.c:179 [inline] BUG: KASAN: slab-out-of-bounds in crc32_le_base+0x58c/0x626 lib/crc32.c:197 Read of size 4 at addr ffff88802bb36f00 by task syz-executor136/1555 CPU: 2 PID: 1555 Comm: syz-executor136 Tainted: G W 6.0.0-1868 #1 Hardware name: Red Hat KVM, BIOS 1.13.0-2.module+el8.3.0+7860+a7792d29 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x85/0xad lib/dump_stack.c:106 print_address_description mm/kasan/report.c:317 [inline] print_report.cold.13+0xb6/0x6bb mm/kasan/report.c:433 kasan_report+0xa7/0x11b mm/kasan/report.c:495 crc32_body lib/crc32.c:111 [inline] crc32_le_generic lib/crc32.c:179 [inline] crc32_le_base+0x58c/0x626 lib/crc32.c:197 ubi_io_write_vid_hdr+0x1b7/0x472 drivers/mtd/ubi/io.c:1067 create_vtbl+0x4d5/0x9c4 drivers/mtd/ubi/vtbl.c:317 create_empty_lvol drivers/mtd/ubi/vtbl.c:500 [inline] ubi_read_volume_table+0x67b/0x288a drivers/mtd/ubi/vtbl.c:812 ubi_attach+0xf34/0x1603 drivers/mtd/ubi/attach.c:1601 ubi_attach_mtd_dev+0x6f3/0x185e drivers/mtd/ubi/build.c:965 ctrl_cdev_ioctl+0x2db/0x347 drivers/mtd/ubi/cdev.c:1043 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x193/0x213 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3e/0x86 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0x0 RIP: 0033:0x7f96d5cf753d Code: RSP: 002b:00007fffd72206f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f96d5cf753d RDX: 0000000020000080 RSI: 0000000040186f40 RDI: 0000000000000003 RBP: 0000000000400cd0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000400be0 R13: 00007fffd72207e0 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 1555: kasan_save_stack+0x20/0x3d mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:437 [inline] ____kasan_kmalloc mm/kasan/common.c:516 [inline] __kasan_kmalloc+0x88/0xa3 mm/kasan/common.c:525 kasan_kmalloc include/linux/kasan.h:234 [inline] __kmalloc+0x138/0x257 mm/slub.c:4429 kmalloc include/linux/slab.h:605 [inline] ubi_alloc_vid_buf drivers/mtd/ubi/ubi.h:1093 [inline] create_vtbl+0xcc/0x9c4 drivers/mtd/ubi/vtbl.c:295 create_empty_lvol drivers/mtd/ubi/vtbl.c:500 [inline] ubi_read_volume_table+0x67b/0x288a drivers/mtd/ubi/vtbl.c:812 ubi_attach+0xf34/0x1603 drivers/mtd/ubi/attach.c:1601 ubi_attach_mtd_dev+0x6f3/0x185e drivers/mtd/ubi/build.c:965 ctrl_cdev_ioctl+0x2db/0x347 drivers/mtd/ubi/cdev.c:1043 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x193/0x213 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3e/0x86 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0x0 The buggy address belongs to the object at ffff88802bb36e00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 0 bytes to the right of 256-byte region [ffff88802bb36e00, ffff88802bb36f00) The buggy address belongs to the physical page: page:00000000ea4d1263 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2bb36 head:00000000ea4d1263 order:1 compound_mapcount:0 compound_pincount:0 flags: 0xfffffc0010200(slab|head|node=0|zone=1|lastcpupid=0x1fffff) raw: 000fffffc0010200 ffffea000066c300 dead000000000003 ffff888100042b40 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88802bb36e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802bb36e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88802bb36f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88802bb36f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802bb37000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Fixes: 801c135ce73d ("UBI: Unsorted Block Images") Reported-by: syzkaller Signed-off-by: George Kennedy Signed-off-by: Richard Weinberger commit 23892d383bee15b64f5463bd7195615734bb2415 Author: Yifei Liu Date: Wed Aug 3 15:53:12 2022 +0000 jffs2: correct logic when creating a hole in jffs2_write_begin Bug description and fix: 1. Write data to a file, say all 1s from offset 0 to 16. 2. Truncate the file to a smaller size, say 8 bytes. 3. Write new bytes (say 2s) from an offset past the original size of the file, say at offset 20, for 4 bytes. This is supposed to create a "hole" in the file, meaning that the bytes from offset 8 (where it was truncated above) up to the new write at offset 20, should all be 0s (zeros). 4. Flush all caches using "echo 3 > /proc/sys/vm/drop_caches" (or unmount and remount) the f/s. 5. Check the content of the file. It is wrong. The 1s that used to be between bytes 9 and 16, before the truncation, have REAPPEARED (they should be 0s). We wrote a script and helper C program to reproduce the bug (reproduce_jffs2_write_begin_issue.sh, write_file.c, and Makefile). We can make them available to anyone. The above example is shown when writing a small file within the same first page. But the bug happens for larger files, as long as steps 1, 2, and 3 above all happen within the same page. The problem was traced to the jffs2_write_begin code, where it goes into an 'if' statement intended to handle writes past the current EOF (i.e., writes that may create a hole). The code computes a 'pageofs' that is the floor of the write position (pos), aligned to the page size boundary. In other words, 'pageofs' will never be larger than 'pos'. The code then sets the internal jffs2_raw_inode->isize to the size of max(current inode size, pageofs) but that is wrong: the new file size should be the 'pos', which is larger than both the current inode size and pageofs. Similarly, the code incorrectly sets the internal jffs2_raw_inode->dsize to the difference between the pageofs minus current inode size; instead it should be the current pos minus the current inode size. Finally, inode->i_size was also set incorrectly. The patch below fixes this bug. The bug was discovered using a new tool for finding f/s bugs using model checking, called MCFS (Model Checking File Systems). Signed-off-by: Yifei Liu Signed-off-by: Erez Zadok Signed-off-by: Manish Adkar Signed-off-by: Richard Weinberger commit acbc661032b8aa0e8359ac77074769ade34a176c Author: Srinivas Pandruvada Date: Wed Feb 1 10:28:52 2023 -0800 powercap: idle_inject: Add update callback The powercap/idle_inject core uses play_idle_precise() to inject idle time. But play_idle_precise() can't ensure that the CPU is fully idle for the specified duration because of wakeups due to interrupts. To compensate for the reduced idle time due to these wakes, the caller can adjust requested idle time for the next cycle. The goal of idle injection is to keep system at some idle percent on average, so this is fine to overshoot or undershoot instantaneous idle times. The idle inject core provides an interface idle_inject_set_duration() to set idle and runtime duration. Some architectures provide interface to get actual idle time observed by the hardware. So, the effective idle percent can be adjusted using the hardware feedback. For example, Intel CPUs provides package idle counters, which is currently used by Intel powerclamp driver to readjust runtime duration. When the caller's desired idle time over a period is less or greater than the actual CPU idle time observed by the hardware, caller can readjust idle and runtime duration for the next cycle. The only way this can be done currently is by monitoring hardware idle time from a different software thread and readjust idle and runtime duration using idle_inject_set_duration(). This can be avoided by adding a callback which callers can register and readjust from this callback function. Add a capability to register an optional update() callback, which can be called from the idle inject core before waking up CPUs for idle injection. This callback can be registered via a new interface: idle_inject_register_full(). During this process of constantly adjusting idle and runtime duration there can be some cases where actual idle time is more than the desired. In this case idle inject can be skipped for a cycle. If update() callback returns false, then the idle inject core skips waking up CPUs for the idle injection. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki commit bbfc3349c4e77a27ea83c765bf593d935f8f5599 Author: Srinivas Pandruvada Date: Wed Feb 1 10:28:51 2023 -0800 powercap: idle_inject: Export symbols Export symbols for external interfaces, so that they can be used in other loadable modules. Export is done under name space IDLE_INJECT. Signed-off-by: Srinivas Pandruvada Acked-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit 8e47363588377e1bdb65e2b020b409cfb44dd260 Author: Srinivas Pandruvada Date: Wed Feb 1 12:39:41 2023 -0800 thermal: intel: powerclamp: Fix cur_state for multi package system The powerclamp cooling device cur_state shows actual idle observed by package C-state idle counters. But the implementation is not sufficient for multi package or multi die system. The cur_state value is incorrect. On these systems, these counters must be read from each package/die and somehow aggregate them. But there is no good method for aggregation. It was not a problem when explicit CPU model addition was required to enable intel powerclamp. In this way certain CPU models could have been avoided. But with the removal of CPU model check with the availability of Package C-state counters, the driver is loaded on most of the recent systems. For multi package/die systems, just show the actual target idle state, the system is trying to achieve. In powerclamp this is the user set state minus one. Also there is no use of starting a worker thread for polling package C-state counters and applying any compensation for multiple package or multiple die systems. Fixes: b721ca0d1927 ("thermal/powerclamp: remove cpu whitelist") Signed-off-by: Srinivas Pandruvada Cc: 4.14+ # 4.14+ Signed-off-by: Rafael J. Wysocki commit 2153a87ff9ef5537b8a96e7c94a9d79a78c7a30c Author: Rafael J. Wysocki Date: Tue Jan 31 14:08:20 2023 +0100 thermal: intel: intel_pch: Drop struct board_info Because the only member of struct board_info is the name, the board_info[] array of struct board_info elements can be replaced with an array of strings. Modify the code accordingly and drop struct board_info. No intentional functional impact. Suggested-by: Zhang Rui Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano Tested-by: Zhang Rui Reviewed-by: Zhang Rui commit ae98e57a6e829dee26c1573134a24709d2cb82a3 Author: Rafael J. Wysocki Date: Mon Jan 30 20:04:55 2023 +0100 thermal: intel: intel_pch: Rename board ID symbols Use capitals in the names of the board ID symbols and add the PCH_ prefix to each of them for consistency. Also rename the board_ids enum accordingly. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano Tested-by: Zhang Rui Reviewed-by: Zhang Rui commit c5f43242f48ac81d57f50592acf7d425640d9f83 Author: Rafael J. Wysocki Date: Mon Jan 30 20:04:05 2023 +0100 thermal: intel: intel_pch: Fold suspend and resume routines into their callers Fold pch_suspend() and pch_resume(), that each have only one caller, into their respective callers to make the code somewhat easier to follow. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano Tested-by: Zhang Rui Reviewed-by: Zhang Rui commit 35c87f948d315ebc820a8784a962a506c1a3d299 Author: Rafael J. Wysocki Date: Mon Jan 30 20:03:11 2023 +0100 thermal: intel: intel_pch: Fold two functions into their callers Fold two functions, pch_hw_init() and pch_get_temp(), that each have only one caller, into their respective callers to make the code somewhat easier to follow. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano Tested-by: Zhang Rui Reviewed-by: Zhang Rui commit 540f8b5640ec08d6ba667d933298bbb350ced77c Author: Tiezhu Yang Date: Thu Nov 10 11:50:08 2022 +0800 perf bench syscall: Add execve syscall benchmark This commit adds the execve syscall benchmark, more syscall benchmarks can be added in the future. Signed-off-by: Tiezhu Yang Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/1668052208-14047-5-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo commit 391f84e5555c20a5b5ca4a2b0c3daec383765a09 Author: Tiezhu Yang Date: Thu Nov 10 11:50:07 2022 +0800 perf bench syscall: Add getpgid syscall benchmark This commit adds a simple getpgid syscall benchmark, more syscall benchmarks can be added in the future. Signed-off-by: Tiezhu Yang Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/1668052208-14047-4-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo commit 3fe91f32620f658adfc073f9df831e7b82498575 Author: Tiezhu Yang Date: Thu Nov 10 11:50:06 2022 +0800 perf bench syscall: Introduce bench_syscall_common() In the current code, there is only a basic syscall benchmark via getppid, this is not enough. Introduce bench_syscall_common() so that we can add more syscalls to benchmark. This is preparation for later patch, no functionality change. Signed-off-by: Tiezhu Yang Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/1668052208-14047-3-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo commit 1bad502775df1fdc824774d0f6e41a629548982a Author: Tiezhu Yang Date: Thu Nov 10 11:50:05 2022 +0800 tools x86: Keep list sorted by number in unistd_{32,64}.h It is better to keep list sorted by number in unistd_{32,64}.h, so that we can add more syscall number to a proper position. This is preparation for later patch, no functionality change. Signed-off-by: Tiezhu Yang Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/1668052208-14047-2-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo commit a912f5975ffc82d52bbb5937eafe367d44db711c Author: Diederik de Haas Date: Wed Feb 1 22:49:45 2023 +0100 perf test: Replace legacy `...` with $(...) As detailed in https://www.shellcheck.net/wiki/SC2006: The use of `...` is legacy syntax with several issues: 1. It has a series of undefined behaviors related to quoting in POSIX. 2. It imposes a custom escaping mode with surprising results. 3. It's exceptionally hard to nest. $(...) command substitution has none of these problems, and is therefore strongly encouraged. Signed-off-by: Diederik de Haas Acked-by: Carsten Haitzler Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230201214945.127474-3-didi.debian@cknow.org Signed-off-by: Arnaldo Carvalho de Melo commit 5b420cf003da4da34955dfd95c5334bec0815114 Author: Diederik de Haas Date: Wed Feb 1 22:49:44 2023 +0100 perf test: Replace 'grep | wc -l' with 'grep -c' To count the number of results from grep, use the '-c' parameter instead of piping it to 'wc'. See also https://www.shellcheck.net/wiki/SC2126 Signed-off-by: Diederik de Haas Acked-by: Carsten Haitzler Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230201214945.127474-2-didi.debian@cknow.org Signed-off-by: Arnaldo Carvalho de Melo commit dd15480a3d67b9cf04a1f6f5d60f1c0dc018e22f Author: Namhyung Kim Date: Wed Jan 25 11:24:31 2023 -0800 perf stat: Hide invalid uncore event output for aggr mode The current display code for perf stat iterates given cpus and build the aggr map to collect the event data for the aggregation mode. But uncore events have their own cpu maps and it won't guarantee that it'd match to the aggr map. For example, per-package uncore events would generate a single value for each socket. When user asks per-core aggregation mode, the output would contain 0 values for other cores. Thus it needs to check the uncore PMU's cpumask and if it matches to the current aggregation id. Before: $ sudo ./perf stat -a --per-core -e power/energy-pkg/ sleep 1 Performance counter stats for 'system wide': S0-D0-C0 1 3.73 Joules power/energy-pkg/ S0-D0-C1 0 Joules power/energy-pkg/ S0-D0-C2 0 Joules power/energy-pkg/ S0-D0-C3 0 Joules power/energy-pkg/ 1.001404046 seconds time elapsed Some events weren't counted. Try disabling the NMI watchdog: echo 0 > /proc/sys/kernel/nmi_watchdog perf stat ... echo 1 > /proc/sys/kernel/nmi_watchdog The core 1, 2 and 3 should not be printed because the event is handled in a cpu in the core 0 only. With this change, the output becomes like below. After: $ sudo ./perf stat -a --per-core -e power/energy-pkg/ sleep 1 Performance counter stats for 'system wide': S0-D0-C0 1 2.09 Joules power/energy-pkg/ Fixes: b897613510890d6e ("perf stat: Update event skip condition for system-wide per-thread mode and merged uncore and hybrid events") Signed-off-by: Namhyung Kim Tested-by: Ian Rogers Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Athira Rajeev Cc: Ingo Molnar Cc: Jiri Olsa Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230125192431.2929677-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7b204399aee0d1048109d37456cd61b7f1bc0aed Author: Namhyung Kim Date: Wed Jan 25 16:09:36 2023 -0800 perf lock contention: Add -S/--callstack-filter option The -S/--callstack-filter is to limit display entries having the given string in the callstack (not only in the caller in the output). The following example shows lock contention results if the callstack has 'net' substring somewhere. Note that the caller '__dev_queue_xmit' does not match to it, but it has 'inet6_csk_xmit' in the callstack. This applies even if you don't use -v option to show the full callstack. $ sudo ./perf lock con -abv -S net sleep 1 ... contended total wait max wait avg wait type caller 5 70.20 us 16.13 us 14.04 us spinlock __dev_queue_xmit+0xb6d 0xffffffffa5dd1c60 _raw_spin_lock+0x30 0xffffffffa5b8f6ed __dev_queue_xmit+0xb6d 0xffffffffa5cd8267 ip6_finish_output2+0x2c7 0xffffffffa5cdac14 ip6_finish_output+0x1d4 0xffffffffa5cdb477 ip6_xmit+0x457 0xffffffffa5d1fd17 inet6_csk_xmit+0xd7 0xffffffffa5c5f4aa __tcp_transmit_skb+0x54a 0xffffffffa5c6467d tcp_keepalive_timer+0x2fd Signed-off-by: Namhyung Kim 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/20230126000936.3017683-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3fd7a168bf51497909dbfb7347af28b5c57e74a6 Author: Namhyung Kim Date: Thu Jan 26 13:36:10 2023 -0800 perf script: Add 'cgroup' field for output There's no field for the cgroup, let's add one. To do that, users need to specify --all-cgroup option for perf record to capture the cgroup info. $ perf record --all-cgroups -- true $ perf script -F comm,pid,cgroup true 337112 /user.slice/user-657345.slice/user@657345.service/... true 337112 /user.slice/user-657345.slice/user@657345.service/... true 337112 /user.slice/user-657345.slice/user@657345.service/... true 337112 /user.slice/user-657345.slice/user@657345.service/... If it's recorded without the --all-cgroups, it'd complain. $ perf script -F comm,pid,cgroup Samples for 'cycles:u' event do not have CGROUP attribute set. Cannot print 'cgroup' field. Hint: run 'perf record --all-cgroups ...' Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20230126213610.3381147-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 1df49ef9ee3179a213754a26cc64065e8aa24c0c Author: Ross Zwisler Date: Mon Jan 30 11:19:10 2023 -0700 perf tools docs: 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 the perf docs still refer to this older debugfs path, so let's update them to avoid confusion. Signed-off-by: Ross Zwisler Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Cc: linux-trace-kernel@vger.kernel.org Link: http://lore.kernel.org/lkml/20230130181915.1113313-5-zwisler@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 2889959489ef4118953116496a06203aaf6c35b6 Author: Rob Herring Date: Fri Jan 27 14:55:46 2023 -0600 perf arm-spe: Only warn once for each unsupported address packet Unknown address packet indexes are not an error as the Arm architecture can (and has with SPEv1.2) define new ones and implementation defined ones are also allowed. The error message for every occurrence of the packet is needlessly noisy as well. Change the message to print just once for each unknown index. Reviewed-by: Leo Yan Signed-off-by: Rob Herring Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Link: https://lore.kernel.org/r/20230127205546.667740-1-robh@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 1c249565426e3a9940102c0ba9f63914f7cda73d Author: Krister Johansen Date: Wed Jan 25 10:34:18 2023 -0800 perf symbols: Symbol lookup with kcore can fail if multiple segments match stext This problem was encountered on an arm64 system with a lot of memory. Without kernel debug symbols installed, and with both kcore and kallsyms available, perf managed to get confused and returned "unknown" for all of the kernel symbols that it tried to look up. On this system, stext fell within the vmalloc segment. The kcore symbol matching code tries to find the first segment that contains stext and uses that to replace the segment generated from just the kallsyms information. In this case, however, there were two: a very large vmalloc segment, and the text segment. This caused perf to get confused because multiple overlapping segments were inserted into the RB tree that holds the discovered segments. However, that alone wasn't sufficient to cause the problem. Even when we could find the segment, the offsets were adjusted in such a way that the newly generated symbols didn't line up with the instruction addresses in the trace. The most obvious solution would be to consult which segment type is text from kcore, but this information is not exposed to users. Instead, select the smallest matching segment that contains stext instead of the first matching segment. This allows us to match the text segment instead of vmalloc, if one is contained within the other. Reviewed-by: Adrian Hunter Signed-off-by: Krister Johansen Cc: Alexander Shishkin Cc: David Reaver Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20230125183418.GD1963@templeofstupid.com Signed-off-by: Arnaldo Carvalho de Melo commit 3980ee9ad8575915cda3790447af700bb865b493 Author: Athira Rajeev Date: Tue Jan 31 19:17:48 2023 +0530 perf probe: Fix usage when libtraceevent is missing While parsing the tracepoint events in parse_events_add_tracepoint() function, code checks for HAVE_LIBTRACEEVENT support. This is needed since libtraceevent is necessary for tracepoint. But while adding probe points, check for LIBTRACEEVENT is not done in case of perf probe. Hence, in environment with missing libtraceevent-devel, it is observed that adding a probe point shows below message though it can't be used via perf record. Example: Adding probe point: ./perf probe 'vfs_getname=getname_flags:72 pathname=result->name:string' Added new event: probe:vfs_getname (on getname_flags:72 with pathname=result->name:string) You can now use it in all perf tools, such as: perf record -e probe:vfs_getname -aR sleep 1 But trying perf record: ./perf record -e probe:vfs_getname -aR sleep 1 event syntax error: 'probe:vfs_getname' \___ unsupported tracepoint libtraceevent is necessary for tracepoint support Run 'perf list' for a list of valid events The builtin tool like perf record needs libtraceevent to parse tracefs. But still the probe can be used by enabling via tracefs. Patch fixes the probe usage message to the user based on presence of libtraceevent. With the fix, # ./perf probe 'pmu:myprobe=schedule' Added new event: pmu:myprobe (on schedule) perf is not linked with libtraceevent, to use the new probe you can use tracefs: cd /sys/kernel/tracing/ echo 1 > events/pmu/myprobe/enable echo 1 > tracing_on cat trace_pipe Before removing the probe, echo 0 > events/pmu/myprobe/enable Signed-off-by: Athira Rajeev Cc: Andi Kleen Cc: Disha Goel Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kajol Jain Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Nageswara R Sastry Cc: Namhyung Kim Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230131134748.54567-1-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit ce4c8e7966f317ef2af896778b5fa9105a5cd351 Author: Adrian Hunter Date: Tue Jan 31 15:16:25 2023 +0200 perf symbols: Get symbols for .plt.got for x86-64 For x86_64, determine a symbol for .plt.got entries. That requires computing the target offset and finding that in .rela.dyn, which in turn means .rela.dyn needs to be sorted by offset. Example: In this example, the GNU C Library is using .plt.got for malloc and free. Before: $ gcc --version gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ perf record -e intel_pt//u uname Linux [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.027 MB perf.data ] $ perf script --itrace=be --ns -F-event,+addr,-period,-comm,-tid,-cpu > /tmp/cmp1.txt After: $ perf script --itrace=be --ns -F-event,+addr,-period,-comm,-tid,-cpu > /tmp/cmp2.txt $ diff /tmp/cmp1.txt /tmp/cmp2.txt | head -12 15509,15510c15509,15510 < 27046.755390907: 7f0b2943e3ab _nl_normalize_codeset+0x5b (/usr/lib/x86_64-linux-gnu/libc.so.6) => 7f0b29428380 offset_0x28380@plt+0x0 (/usr/lib/x86_64-linux-gnu/libc.so.6) < 27046.755390907: 7f0b29428384 offset_0x28380@plt+0x4 (/usr/lib/x86_64-linux-gnu/libc.so.6) => 7f0b294a5120 malloc+0x0 (/usr/lib/x86_64-linux-gnu/libc.so.6) --- > 27046.755390907: 7f0b2943e3ab _nl_normalize_codeset+0x5b (/usr/lib/x86_64-linux-gnu/libc.so.6) => 7f0b29428380 malloc@plt+0x0 (/usr/lib/x86_64-linux-gnu/libc.so.6) > 27046.755390907: 7f0b29428384 malloc@plt+0x4 (/usr/lib/x86_64-linux-gnu/libc.so.6) => 7f0b294a5120 malloc+0x0 (/usr/lib/x86_64-linux-gnu/libc.so.6) 15821,15822c15821,15822 < 27046.755394865: 7f0b2943850c _nl_load_locale_from_archive+0x5bc (/usr/lib/x86_64-linux-gnu/libc.so.6) => 7f0b29428370 offset_0x28370@plt+0x0 (/usr/lib/x86_64-linux-gnu/libc.so.6) < 27046.755394865: 7f0b29428374 offset_0x28370@plt+0x4 (/usr/lib/x86_64-linux-gnu/libc.so.6) => 7f0b294a5460 cfree@GLIBC_2.2.5+0x0 (/usr/lib/x86_64-linux-gnu/libc.so.6) --- > 27046.755394865: 7f0b2943850c _nl_load_locale_from_archive+0x5bc (/usr/lib/x86_64-linux-gnu/libc.so.6) => 7f0b29428370 free@plt+0x0 (/usr/lib/x86_64-linux-gnu/libc.so.6) > 27046.755394865: 7f0b29428374 free@plt+0x4 (/usr/lib/x86_64-linux-gnu/libc.so.6) => 7f0b294a5460 cfree@GLIBC_2.2.5+0x0 (/usr/lib/x86_64-linux-gnu/libc.so.6) Reviewed-by: Namhyung Kim Signed-off-by: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Link: https://lore.kernel.org/r/20230131131625.6964-10-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 51a188ad8c2d89c5c5425d0818cc14cdec336df9 Author: Adrian Hunter Date: Tue Jan 31 15:16:24 2023 +0200 perf symbols: Start adding support for .plt.got for x86 For x86, .plt.got is used, for example, when the address is taken of a dynamically linked function. Start adding support by synthesizing a symbol for each entry. A subsequent patch will attempt to get a better name for the symbol. Example: Before: $ cat tstpltlib.c void fn1(void) {} void fn2(void) {} void fn3(void) {} void fn4(void) {} $ cat tstpltgot.c void fn1(void); void fn2(void); void fn3(void); void fn4(void); void callfn(void (*fn)(void)) { fn(); } int main() { fn4(); fn1(); callfn(fn3); fn2(); fn3(); return 0; } $ gcc --version gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ gcc -Wall -Wextra -shared -o libtstpltlib.so tstpltlib.c $ gcc -Wall -Wextra -o tstpltgot tstpltgot.c -L . -ltstpltlib -Wl,-rpath="$(pwd)" $ readelf -SW tstpltgot | grep 'Name\|plt\|dyn' [Nr] Name Type Address Off Size ES Flg Lk Inf Al [ 6] .dynsym DYNSYM 00000000000003d8 0003d8 0000f0 18 A 7 1 8 [ 7] .dynstr STRTAB 00000000000004c8 0004c8 0000c6 00 A 0 0 1 [10] .rela.dyn RELA 00000000000005d8 0005d8 0000d8 18 A 6 0 8 [11] .rela.plt RELA 00000000000006b0 0006b0 000048 18 AI 6 24 8 [13] .plt PROGBITS 0000000000001020 001020 000040 10 AX 0 0 16 [14] .plt.got PROGBITS 0000000000001060 001060 000020 10 AX 0 0 16 [15] .plt.sec PROGBITS 0000000000001080 001080 000030 10 AX 0 0 16 [23] .dynamic DYNAMIC 0000000000003d90 002d90 000210 10 WA 7 0 8 $ perf record -e intel_pt//u --filter 'filter main @ ./tstpltgot , filter callfn @ ./tstpltgot' ./tstpltgot [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.011 MB perf.data ] $ perf script --itrace=be --ns -F+flags,-event,+addr,-period,-comm,-tid,-cpu,-dso 28393.810326915: tr strt 0 [unknown] => 562350baa1b2 main+0x0 28393.810326915: tr end call 562350baa1ba main+0x8 => 562350baa090 fn4@plt+0x0 28393.810326917: tr strt 0 [unknown] => 562350baa1bf main+0xd 28393.810326917: tr end call 562350baa1bf main+0xd => 562350baa080 fn1@plt+0x0 28393.810326917: tr strt 0 [unknown] => 562350baa1c4 main+0x12 28393.810326917: call 562350baa1ce main+0x1c => 562350baa199 callfn+0x0 28393.810326917: tr end call 562350baa1ad callfn+0x14 => 7f607d36110f fn3+0x0 28393.810326922: tr strt 0 [unknown] => 562350baa1af callfn+0x16 28393.810326922: return 562350baa1b1 callfn+0x18 => 562350baa1d3 main+0x21 28393.810326922: tr end call 562350baa1d3 main+0x21 => 562350baa0a0 fn2@plt+0x0 28393.810326924: tr strt 0 [unknown] => 562350baa1d8 main+0x26 28393.810326924: tr end call 562350baa1d8 main+0x26 => 562350baa060 [unknown] <- call to fn3 via .plt.got 28393.810326925: tr strt 0 [unknown] => 562350baa1dd main+0x2b 28393.810326925: tr end return 562350baa1e3 main+0x31 => 7f607d029d90 __libc_start_call_main+0x80 After: $ perf script --itrace=be --ns -F+flags,-event,+addr,-period,-comm,-tid,-cpu,-dso 28393.810326915: tr strt 0 [unknown] => 562350baa1b2 main+0x0 28393.810326915: tr end call 562350baa1ba main+0x8 => 562350baa090 fn4@plt+0x0 28393.810326917: tr strt 0 [unknown] => 562350baa1bf main+0xd 28393.810326917: tr end call 562350baa1bf main+0xd => 562350baa080 fn1@plt+0x0 28393.810326917: tr strt 0 [unknown] => 562350baa1c4 main+0x12 28393.810326917: call 562350baa1ce main+0x1c => 562350baa199 callfn+0x0 28393.810326917: tr end call 562350baa1ad callfn+0x14 => 7f607d36110f fn3+0x0 28393.810326922: tr strt 0 [unknown] => 562350baa1af callfn+0x16 28393.810326922: return 562350baa1b1 callfn+0x18 => 562350baa1d3 main+0x21 28393.810326922: tr end call 562350baa1d3 main+0x21 => 562350baa0a0 fn2@plt+0x0 28393.810326924: tr strt 0 [unknown] => 562350baa1d8 main+0x26 28393.810326924: tr end call 562350baa1d8 main+0x26 => 562350baa060 offset_0x1060@plt+0x0 28393.810326925: tr strt 0 [unknown] => 562350baa1dd main+0x2b 28393.810326925: tr end return 562350baa1e3 main+0x31 => 7f607d029d90 __libc_start_call_main+0x80 Reviewed-by: Namhyung Kim Signed-off-by: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Link: https://lore.kernel.org/r/20230131131625.6964-9-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit c25da5b7baf1d243e6612ba2b97e2a2c4a1376f6 Author: Nathan Huckleberry Date: Wed Feb 1 17:23:48 2023 -0800 dm verity: stop using WQ_UNBOUND for verify_wq Setting WQ_UNBOUND increases scheduler latency on ARM64. This is likely due to the asymmetric architecture of ARM64 processors. I've been unable to reproduce the results that claim WQ_UNBOUND gives a performance boost on x86-64. This flag is causing performance issues for multiple subsystems within Android. Notably, the same slowdown exists for decompression with EROFS. | open-prebuilt-camera | WQ_UNBOUND | ~WQ_UNBOUND | |-----------------------|------------|---------------| | verity wait time (us) | 11746 | 119 (-98%) | | erofs wait time (us) | 357805 | 174205 (-51%) | | sha256 ramdisk random read | WQ_UNBOUND | ~WQ_UNBOUND | |----------------------------|-----------=---|-------------| | arm64 (accelerated) | bw=42.4MiB/s | bw=212MiB/s | | arm64 (generic) | bw=16.5MiB/s | bw=48MiB/s | | x86_64 (generic) | bw=233MiB/s | bw=230MiB/s | Using a alloc_workqueue() @max_active arg of num_online_cpus() only made sense with WQ_UNBOUND. Switch the @max_active arg to 0 (aka default, which is 256 per-cpu). Also, eliminate 'wq_flags' since it really doesn't serve a purpose. Cc: Sami Tolvanen Cc: Eric Biggers Signed-off-by: Nathan Huckleberry Reviewed-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 5cd6d1d53a1f74222e73d8b42ab7ecf28ee2f34f Author: Jiapeng Chong Date: Tue Jan 31 14:09:41 2023 +0800 dm integrity: Remove bi_sector that's only used by commented debug code drivers/md/dm-integrity.c:1738:13: warning: variable 'bi_sector' set but not used. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3895 Signed-off-by: Jiapeng Chong Signed-off-by: Mike Snitzer commit fc772580a349f2b1349e85629be97e59f6347cdb Author: Christophe JAILLET Date: Sat Jan 28 16:43:00 2023 +0100 dm crypt: Slightly simplify crypt_set_keyring_key() Use strchr() instead of strpbrk() when there is only 1 element in the set of characters to look for. This potentially saves a few cycles, but gcc does already account for optimizing this pattern thanks to it's fold_builtin_strpbrk(). Signed-off-by: Christophe JAILLET Signed-off-by: Mike Snitzer commit 151d812251202aa0dce1fdeabd64794292d40b75 Author: Sergey Shtylyov Date: Tue Jan 17 23:59:55 2023 +0300 dm ioctl: drop always-false condition The expression 'indata[3] > ULONG_MAX' always evaluates to false since indata[] is declared as an array of *unsigned long* elements and #define ULONG_MAX represents the max value of that exact type... Note that gcc seems to be able to detect the dead code here and eliminate this check anyway... Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Signed-off-by: Sergey Shtylyov Reviewed-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit aa56b9b75996ff4c76a0a4181c2fa0206c3d91cc Author: Mikulas Patocka Date: Sun Jan 22 14:03:56 2023 -0500 dm flakey: fix logic when corrupting a bio If "corrupt_bio_byte" is set to corrupt reads and corrupt_bio_flags is used, dm-flakey would erroneously return all writes as errors. Likewise, if "corrupt_bio_byte" is set to corrupt writes, dm-flakey would return errors for all reads. Fix the logic so that if fc->corrupt_bio_byte is non-zero, dm-flakey will not abort reads on writes with an error. Cc: stable@vger.kernel.org Signed-off-by: Mikulas Patocka Reviewed-by: Sweet Tea Dorminy Signed-off-by: Mike Snitzer commit 15a574485700eac3b8611770d69a809b09cc8529 Merge: 535cd7104b4ef 003e11ed2ef4a Author: Dave Airlie Date: Fri Feb 3 04:51:18 2023 +1000 Merge tag 'drm-intel-gt-next-2023-02-01' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Driver Changes: Fixes/improvements/new stuff: - Fix bcs default context on Meteorlake (Lucas De Marchi) - GAM registers don't need to be re-applied on engine resets (Matt Roper) - Correct implementation of Wa_18018781329 (Matt Roper) - Avoid potential vm use-after-free (Rob Clark) - GuC error capture fixes (John Harrison) - Fix potential bit_17 double-free (Rob Clark) - Don't complain about missing regs on MTL (John Harrison) Future platform enablement: - Convert PSS_MODE2 to multicast register (Gustavo Sousa) - Move/adjust register definitions related to Wa_22011450934 (Matt Roper) - Move LSC_CHICKEN_BIT* workarounds to correct function (Gustavo Sousa) - Document where to implement register workarounds (Gustavo Sousa) - Use uabi engines for the default engine map (Tvrtko Ursulin) - Flush all tiles on test exit (Tvrtko Ursulin) - Annotate a couple more workaround registers as MCR (Matt Roper) Driver refactors: - Add and use GuC oriented print macros (Michal Wajdeczko) Miscellaneous: - Fix intel_selftest_modify_policy argument types (Arnd Bergmann) Backmerges: Merge drm/drm-next into drm-intel-gt-next (for conflict resolution) (Tvrtko Ursulin) Signed-off-by: Dave Airlie From: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/Y9pOsq7VKnq7rgnW@tursulin-desk commit 535cd7104b4efacab3bf7e56b8ad263e1160a47f Merge: e9b71eb1b2405 dbd7a2a941b8c Author: Dave Airlie Date: Fri Feb 3 04:45:16 2023 +1000 Merge tag 'drm-msm-next-2023-01-30' of https://gitlab.freedesktop.org/drm/msm into drm-next msm-next for v6.3 There is one devfreq patch, maintainer acked to land via msm-next to avoid a build break on platforms that do not support PM_DEVFREQ. And otherwise the usual assortment: GPU: - Add MSM_SUBMIT_BO_NO_IMPLICIT - a2xx: Support to load legacy firmware - a6xx: GPU devcore dump updates for a650/a660 - GPU devfreq tuning and fixes DPU, DSI, MDSS: - Support for SM8350, SM8450 SM8550 and SC8280XP platform Core: - Added bindings for SM8150 (driver support already present) DPU: - Partial support for DSC on SM8150 and SM8250 - Fixed color transformation matrix being lost on suspend/resume - Include DSC blocks into register snapshot - Misc HW catalog fixes DP: - Support for DP on SDM845 and SC8280XP platforms - HPD fixes - Support for limiting DP link rate via DT property, this enables - Support for HBR3 rates. DSI: - Validate display modes according to the DSI OPP table - DSI PHY support for the SM6375 platform - Fixed byte intf clock selection for 14nm PHYs - Fix the case of empty OPP tables (fixing db410c) - DT schema rework and fixes HDMI: - Turn 8960 HDMI PHY into clock provider, - Make 8960 HDMI PHY use PXO clock from DT MDP5: - Schema conversion to YAML Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGv6zQ-zsgS+NG+WuV=tk51q9vA2QdKqYhNgiXQddAdZjA@mail.gmail.com commit 5c0f220e1b2d349b6241375e19887b5c865a84a1 Merge: 5a6b64adc18d9 be0d8f48ad97f Author: Kees Cook Date: Thu Feb 2 18:43:28 2023 +0000 Merge branch 'for-linus/hardening' into for-next/hardening commit fbabc2eaef9fd761315c0edb2d281e9f3e9db9b7 Author: Wyes Karny Date: Wed Jan 25 17:59:48 2023 +0000 Documentation: KVM: Update AMD memory encryption link Update AMD memory encryption white-paper document link. Previous link is not available. Update new available link. Signed-off-by: Wyes Karny Reviewed-by: Carlos Bilbao Link: https://lore.kernel.org/r/20230125175948.21100-1-wyes.karny@amd.com Signed-off-by: Jonathan Corbet commit a568375ba175d465c7aad2028bd6f7e18c0ff194 Author: Bjorn Helgaas Date: Thu Jan 26 16:54:20 2023 -0600 printk: Document that CONFIG_BOOT_PRINTK_DELAY required for boot_delay= Document the fact that CONFIG_BOOT_PRINTK_DELAY must be enabled for the "boot_delay" kernel parameter to work. Also mention that "lpj=" may be necessary. Signed-off-by: Bjorn Helgaas Reviewed-by: Randy Dunlap Link: https://lore.kernel.org/r/20230126225420.1320276-1-helgaas@kernel.org Signed-off-by: Jonathan Corbet commit c1966bd1f0be067ef0824546de881529908fbb54 Author: Randy Dunlap Date: Sun Jan 29 15:10:53 2023 -0800 Documentation: userspace-api: correct spelling Correct spelling problems for Documentation/userspace-api/ as reported by codespell. Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Sean Young Cc: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Link: https://lore.kernel.org/r/20230129231053.20863-10-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 810edcd5764fb88525934d99baf9aec881a2d500 Author: Randy Dunlap Date: Sun Jan 29 15:10:52 2023 -0800 Documentation: sparc: correct spelling Correct spelling problems for Documentation/sparc/ as reported by codespell. Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Link: https://lore.kernel.org/r/20230129231053.20863-9-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 7852fe3a092721794f92c4d04fb33184501a3c9a Author: Randy Dunlap Date: Sun Jan 29 15:10:46 2023 -0800 Documentation: driver-api: correct spelling Correct spelling problems for Documentation/driver-api/ as reported by codespell. Signed-off-by: Randy Dunlap Cc: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Cc: Vishal Verma Cc: Dave Jiang Cc: nvdimm@lists.linux.dev Cc: Vinod Koul Cc: dmaengine@vger.kernel.org Cc: linux-raid@vger.kernel.org Cc: linux-usb@vger.kernel.org Acked-by: Dan Williams Acked-by: Song Liu Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20230129231053.20863-3-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit dbeb56fe80e5574388ed9767788e8eb493589443 Author: Randy Dunlap Date: Sun Jan 29 15:10:45 2023 -0800 Documentation: admin-guide: correct spelling Correct spelling problems for Documentation/admin-guide/ as reported by codespell. Signed-off-by: Randy Dunlap Reviewed-by: Mukesh Ojha Cc: Tejun Heo Cc: Zefan Li Cc: Johannes Weiner Cc: cgroups@vger.kernel.org Cc: Alasdair Kergon Cc: Mike Snitzer Cc: dm-devel@redhat.com Cc: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Cc: linux-mm@kvack.org Link: https://lore.kernel.org/r/20230129231053.20863-2-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit b7cb8405ba47df1d8abe47c1308774f47d5b9d0e Author: Shuah Khan Date: Tue Jan 31 15:11:05 2023 -0700 docs: add workload-tracing document to admin-guide Add a new section to the admin-guide with information of interest to application developers and system integrators doing analysis of the Linux kernel for safety critical applications. This section will contain documents supporting analysis of kernel interactions with applications, and key kernel subsystems expectations. Add a new workload-tracing document to this new section. Signed-off-by: Shefali Sharma Signed-off-by: Shuah Khan Link: https://lore.kernel.org/r/20230131221105.39216-1-skhan@linuxfoundation.org [jc: tweaked the sphinx formatting a bit] Signed-off-by: Jonathan Corbet commit 218674a45930c700486d27b765bf2f1b43f8cbf7 Author: Nathan Chancellor Date: Thu Feb 2 09:34:19 2023 -0700 ASoC: mchp-spdifrx: Fix uninitialized use of mr in mchp_spdifrx_hw_params() Clang warns: ../sound/soc/atmel/mchp-spdifrx.c:455:3: error: variable 'mr' is uninitialized when used here [-Werror,-Wuninitialized] mr |= SPDIFRX_MR_ENDIAN_BIG; ^~ ../sound/soc/atmel/mchp-spdifrx.c:432:8: note: initialize the variable 'mr' to silence this warning u32 mr; ^ = 0 1 error generated. Zero initialize mr so that these bitwise OR and assignment operation works unconditionally. Fixes: fa09fa60385a ("ASoC: mchp-spdifrx: fix controls which rely on rsr register") Link: https://github.com/ClangBuiltLinux/linux/issues/1797 Signed-off-by: Nathan Chancellor Reviewed-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230202-mchp-spdifrx-fix-uninit-mr-v1-1-629a045d7a2f@kernel.org Signed-off-by: Mark Brown commit 3c54a3ff0a2cdcd902482a62fef813f1d46e5eaf Author: Dan Carpenter Date: Thu Jan 26 12:29:10 2023 +0300 bus: mhi: ep: Fix off by one in mhi_ep_process_cmd_ring() The > comparison should be changed to >= to prevent an out of bounds access into the mhi_cntrl->mhi_chan[] array. The mhi_cntrl->mhi_chan[] array is allocated in mhi_ep_chan_init() and has mhi_cntrl->max_chan elements. Fixes: 6de4941c0215 ("bus: mhi: ep: Check if the channel is supported by the controller") Signed-off-by: Dan Carpenter Reviewed-by: Manivannan Sadhasivam Reviewed-by: Alex Elder Link: https://lore.kernel.org/r/Y9JH5sudiZWvbODv@kili Signed-off-by: Manivannan Sadhasivam commit 00cba6b60fed57c81f297ab0fac9fd32d5f5ff65 Author: Mike Rapoport (IBM) Date: Wed Feb 1 11:41:56 2023 +0200 docs/admin-guide/mm: remove useless markup It is enough to use a file name to cross-reference another rst document. Jon says: The right things will happen in the HTML output, readers of the plain-text will know immediately where to go, and we don't have to add the label clutter. Drop reference markup and unnecessary labels and use plain file names. Signed-off-by: Mike Rapoport (IBM) Link: https://lore.kernel.org/r/20230201094156.991542-4-rppt@kernel.org Signed-off-by: Jonathan Corbet commit ee86588960e259760236a537323d5c7d945e378c Author: Mike Rapoport (IBM) Date: Wed Feb 1 11:41:55 2023 +0200 docs/mm: remove useless markup It is enough to use a file name to cross-reference another rst document. Jon says: The right things will happen in the HTML output, readers of the plain-text will know immediately where to go, and we don't have to add the label clutter. Drop reference markup and unnecessary labels and use plain file names. Signed-off-by: Mike Rapoport (IBM) Link: https://lore.kernel.org/r/20230201094156.991542-3-rppt@kernel.org Signed-off-by: Jonathan Corbet commit 353c7dd636ed12fdaedea782de612aceb1923ed9 Author: Mike Rapoport (IBM) Date: Wed Feb 1 11:41:54 2023 +0200 docs/mm: Physical Memory: remove useless markup Jon says: > +See also :ref:`Page Reclaim `. Can also just be "See also Documentation/mm/page_reclaim.rst". The right things will happen in the HTML output, readers of the plain-text will know immediately where to go, and we don't have to add the label clutter. Remove reference markup and unnecessary labes and use plain file names. Fixes: 5d8c5e430a63 ("docs/mm: Physical Memory: add structure, introduction and nodes description") Suggested-by: Jonathan Corbet Acked-by: Bagas Sanjaya Signed-off-by: Mike Rapoport (IBM) Link: https://lore.kernel.org/r/20230201094156.991542-2-rppt@kernel.org Signed-off-by: Jonathan Corbet commit 42ec40b0883c1cce58b06e8fa82049a61033151c Author: Mårten Lindahl Date: Tue Jan 31 15:01:09 2023 +0100 iio: light: vcnl4000: Fix WARN_ON on uninitialized lock There are different init functions for the sensors in this driver in which only one initializes the generic vcnl4000_lock. With commit e21b5b1f2669 ("iio: light: vcnl4000: Preserve conf bits when toggle power") the vcnl4040 sensor started to depend on the lock, but it was missed to initialize it in vcnl4040's init function. This has not been visible until we run lockdep on it: DEBUG_LOCKS_WARN_ON(lock->magic != lock) at kernel/locking/mutex.c:575 __mutex_lock+0x4f8/0x890 Call trace: __mutex_lock mutex_lock_nested vcnl4200_set_power_state vcnl4200_init vcnl4000_probe Fix this by initializing the lock in the probe function instead of doing it in the chip specific init functions. Fixes: e21b5b1f2669 ("iio: light: vcnl4000: Preserve conf bits when toggle power") Signed-off-by: Mårten Lindahl Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230131140109.2067577-1-marten.lindahl@axis.com Cc: Signed-off-by: Jonathan Cameron commit d9b540ee461cca7edca0dd2c2a42625c6b9ffb8f Author: Arnd Bergmann Date: Tue Jan 31 10:46:11 2023 +0100 iio: adis16480: select CONFIG_CRC32 In rare randconfig builds, the missing CRC32 helper causes a link error: ld.lld: error: undefined symbol: crc32_le >>> referenced by usercopy_64.c >>> vmlinux.o:(adis16480_trigger_handler) Fixes: 941f130881fa ("iio: adis16480: support burst read function") Signed-off-by: Arnd Bergmann Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20230131094616.130238-1-arnd@kernel.org Cc: Signed-off-by: Jonathan Cameron commit 36207c34d17fb573ddaa7c024d2c9c6eef1b8532 Merge: e9ac502cd25ed 73019de17732e Author: Marc Kleine-Budde Date: Thu Feb 2 17:41:57 2023 +0100 Merge patch series "can: peak_usb: Introduce configurable CAN channel ID" Lukas Magel says: This series of patches introduces the CAN channel ID for the PEAK USB CAN interfaces. The id can be read/written via ethtool and is exposed as a read-only attribute via sysfs. This allows users to set the id via ethtool and write udev rules to match against the sysfs attribute. Part of the patches were originally introduced by Stéphane Grosjean and were modified slightly. See the following threads for the original patches: * https://lore.kernel.org/linux-can/20220128150157.1222850-1-s.grosjean@peak-system.com * https://lore.kernel.org/linux-can/20211117150132.37056-1-s.grosjean@peak-system.com changes since v2: https://lore.kernel.org/all/20221030105939.87658-1-lukas.magel@posteo.net * Fix the issues raised on netdev * Rename user device ID to CAN channel ID to make the 1-to-N mapping between USB device and exposed CAN channels more obvious changes since v1: https://lore.kernel.org/all/20221022213535.8495-1-lukas.magel@posteo.net * Fix type of devid_le in ethtool peak_usb_(get|set)_eeprom * Fix signed-off tags Link: https://lore.kernel.org/all/20221213080309.9013-1-lukas.magel@posteo.net [mkl: added links] Signed-off-by: Marc Kleine-Budde commit 73019de17732ec2edde007930407912e491a1c0f Author: Lukas Magel Date: Mon Jan 16 20:09:32 2023 +0000 can: peak_usb: Reorder include directives alphabetically The include directives in all source files are reordered alphabetically according to the names of the header files. Signed-off-by: Lukas Magel Link: https://lore.kernel.org/all/20230116200932.157769-9-lukas.magel@posteo.net [mkl: move header changes from Patch 3 here] Signed-off-by: Marc Kleine-Budde commit 09ce908e50c9ee43732015c36c32b18efe7b9ab6 Author: Lukas Magel Date: Mon Jan 16 20:09:31 2023 +0000 can: peak_usb: align CAN channel ID format in log with sysfs attribute Previously, the CAN channel ID was printed to the kernel log in decimal upon connecting a new PEAK device. This behavior is inconsistent with the hexadecimal format of the CAN channel ID sysfs attribute. This patch updates the log message to output the id in hexadecimal. Signed-off-by: Lukas Magel Link: https://lore.kernel.org/all/20230116200932.157769-8-lukas.magel@posteo.net Signed-off-by: Marc Kleine-Budde commit 6d02f6daeb44c0099ace2e3597d56420eecfaeb2 Author: Lukas Magel Date: Mon Jan 16 20:09:30 2023 +0000 can: peak_usb: export PCAN CAN channel ID as sysfs device attribute This patch exports the CAN channel ID as a sysfs attribute. The CAN channel ID is a user-configurable u8/u32 identifier that can be set individually for each CAN interface of a PEAK USB device. Exporting the channel ID as a sysfs attribute allows users to easily read the ID and to write udev rules that can match against the ID. This is especially useful for PEAK USB devices that do not export a serial number at SUB level. Signed-off-by: Stephane Grosjean Signed-off-by: Lukas Magel Link: https://lore.kernel.org/all/20230116200932.157769-7-lukas.magel@posteo.net Signed-off-by: Marc Kleine-Budde commit 36d007c6fc7962cb70ff4b1496d1e24f8b1c1300 Author: Stephane Grosjean Date: Mon Jan 16 20:09:29 2023 +0000 can: peak_usb: add ethtool interface to user-configurable CAN channel identifier This patch introduces 3 new functions implementing support for ethtool access to the CAN channel ID of all USB CAN network interfaces managed by the driver. With this patch, it is possible to read/write the CAN channel ID from/to the EEPROM via the ethtool interface. The CAN channel ID is a user-configurable device identifier that can be set individually for each CAN interface of a PEAK USB device. Depending on the device, the identifier has a length of 8 or 32 bit. The identifier is stored in the non-volatile memory of the device. The identifier of a CAN interface can be read/written as an 8 or 32 bit byte string in native (little-endian) byte order, where the length depends on the device type. Signed-off-by: Stephane Grosjean Signed-off-by: Lukas Magel Link: https://lore.kernel.org/all/20230116200932.157769-6-lukas.magel@posteo.net Signed-off-by: Marc Kleine-Budde commit e1bd882252439dae49c40cfe80997cde5955939f Author: Stephane Grosjean Date: Mon Jan 16 20:09:28 2023 +0000 can: peak_usb: replace unregister_netdev() with unregister_candev() This patch changes the call to unregister_netdev() in peak_usb_disconnect() with unregister_candev(). Signed-off-by: Stephane Grosjean Signed-off-by: Lukas Magel Link: https://lore.kernel.org/all/20230116200932.157769-5-lukas.magel@posteo.net Signed-off-by: Marc Kleine-Budde commit e7a7b3d22503d79ccd0c2536080ed3f7b10a23f6 Author: Stephane Grosjean Date: Mon Jan 16 20:09:27 2023 +0000 can: peak_usb: allow flashing of the CAN channel ID This patch adds callbacks that allow the user to set a new self-defined CAN channel ID to all USB - CAN/CANFD interfaces of PEAK-System managed by this driver, namely: - PCAN-USB - PCAN-USB FD - PCAN-USB Pro FD - PCAN-USB X6 - PCAN-Chip USB - PCAN-USB Pro The callback functions write the CAN channel ID to the non-volatile memory of the devices. Signed-off-by: Stephane Grosjean Signed-off-by: Lukas Magel Link: https://lore.kernel.org/all/20230116200932.157769-4-lukas.magel@posteo.net Signed-off-by: Marc Kleine-Budde commit 517ad5e6761feca12f0fc78e7c6304560da853f4 Author: Stephane Grosjean Date: Mon Jan 16 20:09:26 2023 +0000 can: peak_usb: add callback to read CAN channel ID of PEAK CAN-FD devices This patch adds a new function that allows to read the CAN channel ID from the non volatile memory of the USB CAN-FD PEAK devices. The CAN channel ID is a user-configurable u8/u32 identifier value that can be set individually for each PEAK CAN interface. Signed-off-by: Stephane Grosjean Signed-off-by: Lukas Magel Link: https://lore.kernel.org/all/20230116200932.157769-3-lukas.magel@posteo.net Signed-off-by: Marc Kleine-Budde commit 404ffaa95a3e88f844461d3f92e03d3423ee9920 Author: Stephane Grosjean Date: Mon Jan 16 20:09:25 2023 +0000 can: peak_usb: rename device_id to CAN channel ID The so-called "device id" is a user-defined identifier value that can be set individually for each CAN interface of a PEAK USB device. Contrary to a static serial number, the value can be changed by the user. With this ID, each CAN interface can be uniquely identified even if the USB device does not export a proper serial number or the USB device exports multiple CAN interfaces. In order to not confuse it with the device ID used by the USB core and emphasize the link to the CAN interface, the functions and variables for reading this user-defined value are renamed to CAN channel ID. Signed-off-by: Stephane Grosjean Signed-off-by: Lukas Magel Link: https://lore.kernel.org/all/20230116200932.157769-2-lukas.magel@posteo.net Signed-off-by: Marc Kleine-Budde commit e9ac502cd25edab49959f19bf3f5b712de1825b9 Merge: e3825a3007735 d5cd5d7fbd8cf Author: Marc Kleine-Budde Date: Thu Feb 2 17:34:19 2023 +0100 Merge patch series "can: ems_pci: Add support for CPC-PCIe v3" Gerhard Uttenthaler says: The CPC-PCIe v3 uses an Asix AX99100 instead of the discontinued PLX PCI9030 bridge chip. This patch series adds support for this card version and cleans some code styling issues. v1: https://lore.kernel.org/all/20230119154528.28425-1-uttenthaler@ems-wuensche.com Link: https://lore.kernel.org/all/20230120112616.6071-1-uttenthaler@ems-wuensche.com Signed-off-by: Marc Kleine-Budde commit d5cd5d7fbd8cfb417d6473cd59136f24c7681972 Author: Gerhard Uttenthaler Date: Fri Jan 20 12:26:16 2023 +0100 can: ems_pci: Add myself as module author Added myself as module author Signed-off-by: Gerhard Uttenthaler Link: https://lore.kernel.org/all/20230120112616.6071-9-uttenthaler@ems-wuensche.com Signed-off-by: Marc Kleine-Budde commit 946c4135fd486f7036b8270207d14628b634097e Author: Gerhard Uttenthaler Date: Fri Jan 20 12:26:15 2023 +0100 can: ems_pci: Deassert hardware reset The reset line from the Asix chip to the SJA1000 is asserted after boot up until it is deasserted by a register write Signed-off-by: Gerhard Uttenthaler Link: https://lore.kernel.org/all/20230120112616.6071-8-uttenthaler@ems-wuensche.com Signed-off-by: Marc Kleine-Budde commit 8b4339f76da76c3c907659189eb627e0fd03b4cf Author: Gerhard Uttenthaler Date: Fri Jan 20 12:26:14 2023 +0100 can: ems_pci: Add IRQ enable Add IRQ enable Signed-off-by: Gerhard Uttenthaler Link: https://lore.kernel.org/all/20230120112616.6071-7-uttenthaler@ems-wuensche.com Signed-off-by: Marc Kleine-Budde commit 79ca81e700f4c171e21aeaf1a1d29dfcdb961d75 Author: Gerhard Uttenthaler Date: Fri Jan 20 12:26:13 2023 +0100 can: ems_pci: Initialize CAN controller base addresses Add CAN controller base registers Signed-off-by: Gerhard Uttenthaler Link: https://lore.kernel.org/all/20230120112616.6071-6-uttenthaler@ems-wuensche.com Signed-off-by: Marc Kleine-Budde commit bb89159ce33101abeabd0d67309cf6bdd7691aaa Author: Gerhard Uttenthaler Date: Fri Jan 20 12:26:12 2023 +0100 can: ems_pci: Add read/write register and post irq functions Add functions to read and write SJA1000 registers and also the post irq routine Signed-off-by: Gerhard Uttenthaler Link: https://lore.kernel.org/all/20230120112616.6071-5-uttenthaler@ems-wuensche.com Signed-off-by: Marc Kleine-Budde commit f94a4f97f001d0b665723698c4b4b49174d60b90 Author: Gerhard Uttenthaler Date: Fri Jan 20 12:26:11 2023 +0100 can: ems_pci: Initialize BAR registers Fix the base register defines and their usage for all three card versions Signed-off-by: Gerhard Uttenthaler Link: https://lore.kernel.org/all/20230120112616.6071-4-uttenthaler@ems-wuensche.com Signed-off-by: Marc Kleine-Budde commit f5ef4d4f5365d3fd633e4827abf1ab2848965413 Author: Gerhard Uttenthaler Date: Fri Jan 20 12:26:10 2023 +0100 can: ems_pci: Add Asix AX99100 definitions Add Asix AX99100 PCI IDs and add the v3 to the ems_pci_tbl. Add define for maximum CAN channel count Signed-off-by: Gerhard Uttenthaler Link: https://lore.kernel.org/all/20230120112616.6071-3-uttenthaler@ems-wuensche.com Signed-off-by: Marc Kleine-Budde commit 2b9ed3b9aaee323511b018a1a05adfcebd986dfc Author: Gerhard Uttenthaler Date: Fri Jan 20 12:26:09 2023 +0100 can: ems_pci: Fix code style, copyright and email address Fix code style complained by checkpatch.pl, add Copyright and fix email address Signed-off-by: Gerhard Uttenthaler Link: https://lore.kernel.org/all/20230120112616.6071-2-uttenthaler@ems-wuensche.com Signed-off-by: Marc Kleine-Budde commit 5a6b64adc18d9adfb497a529ff004d59b6df151f Author: Sam James Date: Wed Feb 1 23:00:09 2023 +0000 gcc-plugins: drop -std=gnu++11 to fix GCC 13 build The latest GCC 13 snapshot (13.0.1 20230129) gives the following: ``` cc1: error: cannot load plugin ./scripts/gcc-plugins/randomize_layout_plugin.so :./scripts/gcc-plugins/randomize_layout_plugin.so: undefined symbol: tree_code_type ``` This ends up being because of https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=b0241ce6e37031 upstream in GCC which changes the visibility of some types used by the kernel's plugin infrastructure like tree_code_type. After discussion with the GCC folks, we found that the kernel needs to be building plugins with the same flags used to build GCC - and GCC defaults to gnu++17 right now. The minimum GCC version needed to build the kernel is GCC 5.1 and GCC 5.1 already defaults to gnu++14 anyway, so just drop the flag, as all GCCs that could be used to build GCC already default to an acceptable version which was >= the version we forced via flags until now. Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108634 Signed-off-by: Sam James Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20230201230009.2252783-1-sam@gentoo.org commit e3825a3007735c531bf0fb446ccd020b800c8d6d Merge: 2e8ca20b40e5b 114246e81fc6e Author: Marc Kleine-Budde Date: Thu Feb 2 17:28:59 2023 +0100 Merge patch series "can: rcar_canfd: Add support for R-Car V4H systems" Geert Uytterhoeven says: This patch series adds support for the CAN-FD interface on the Renesas R-Car V4H (R8A779G0) SoC and support for CAN transceivers described as PHYs to the R-Car CAN-FD driver. It includes several fixes for issues (some minor) detected while adding the support and during testing. More details can be found in the individual patches. This has been tested on the Renesas White-Hawk development board using cansend, candump, and canfdtest: - Channel 0 uses an NXP TJR1443AT CAN transceiver, and works fine, - Channels 1-7 use Microchip MCP2558FD-H/SN CAN transceivers (not mounted for channels 4-7), which do not need explicit description. While channel 1 works fine, channels 2-3 do not seem to work. Hence despite the new fixes, the test results are similar to what Ulrich Hecht reported for R-Car V3U on the Falcon development board before, i.e. only channels 0 and 1 work (FTR, [2] does not help). Whether this is a CAN-FD driver issue, a pin control issue, an IP core issue, or an SoC integration issue is still to be seen... [1] https://lore.kernel.org/all/f53a1bcca637ceeafb04ce3540a605532d3bc34a.1674036164.git.geert+renesas@glider.be [2] commit e3e5bccc92446048 ("can: rcar_canfd: rcar_canfd_configure_afl_rules(): Fix Rx FIFO entry setting") in renesas-bsp/v5.10.147/rcar-5.2.0.rc3. Link: https://lore.kernel.org/all/cover.1674499048.git.geert+renesas@glider.be [mkl: applying patches 1...11 only] Signed-off-by: Marc Kleine-Budde commit 114246e81fc6e6f3c092ba1cc1dec9f0a91c3cbd Author: Geert Uytterhoeven Date: Mon Jan 23 19:56:13 2023 +0100 can: rcar_canfd: Add helper variable dev rcar_canfd_channel_probe() and rcar_canfd_probe() have many users of "pdev->dev". Introduce shorthands to simplify the code. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/all/2965edc7992ab54dc6c862910775f3466fca6b29.1674499048.git.geert+renesas@glider.be Signed-off-by: Marc Kleine-Budde commit d506b151bb95c2a80c15e19c4d4686245af0fccb Author: Geert Uytterhoeven Date: Mon Jan 23 19:56:12 2023 +0100 can: rcar_canfd: Sort included header files This may avoid conflicts when adding or removing files in the future. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/all/f7fa8090487c6e05b2c7f89542e0a1bd045356f1.1674499048.git.geert+renesas@glider.be Signed-off-by: Marc Kleine-Budde commit 3e73d3df4d3861265367b4df6dd7fc5789e05d3c Author: Geert Uytterhoeven Date: Mon Jan 23 19:56:11 2023 +0100 can: rcar_canfd: Fix R-Car Gen4 CFCC.CFTML field width On R-Car Gen4 CAN_FD variants, the Common FIFO TX Message Buffer Link (CFTML) field in the Common FIFO Configuration / Control Register (CCFC) register is one bit wider than on older variants. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/all/9c37aaa799a2391be272dbaa474379cf9a7af147.1674499048.git.geert+renesas@glider.be Signed-off-by: Marc Kleine-Budde commit 0424281688f11bfe79b9461420ca3465995178cc Author: Geert Uytterhoeven Date: Mon Jan 23 19:56:10 2023 +0100 can: rcar_canfd: Fix R-Car Gen4 DCFG.DSJW field width On R-Car Gen4 CAN_FD variants, the Data Bit Rate Resynchronization Jump Width Control (DSJW) field in the Channel n Data Bitrate Configuration Register (DCFG) register is one bit wider than on older variants. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/all/c4e8bc220bf87e6c7e375f7a2ce51e2aa89ea8a7.1674499048.git.geert+renesas@glider.be Signed-off-by: Marc Kleine-Budde commit 8716e6e79a148f58852a393340326ad72fd62a00 Author: Geert Uytterhoeven Date: Mon Jan 23 19:56:09 2023 +0100 can: rcar_canfd: Add support for R-Car Gen4 Despite the name, R-Car V3U (R8A779A0) was the first member of the R-Car Gen4 family. Generalize the support for R-Car V3U to other SoCs in the R-Car Gen4 family by adding a family-specific compatible value, and by replacing all references to "V3U" by "Gen4". Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/all/61f6f34eb7bcc62ff604add98f1bcd2d2584187d.1674499048.git.geert+renesas@glider.be Signed-off-by: Marc Kleine-Budde commit bbf6681d1f0f74a737e0804ab586ac016b2f4ccb Author: Geert Uytterhoeven Date: Mon Jan 23 19:56:08 2023 +0100 can: rcar_canfd: Abstract out DCFG address differences Abstract the different addresses for the Channel n Data Bitrate Configuration Register (DCFG) in the definition of the register macro, like is already done for other register definitions, to simplify code accessing this register. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/all/13e02d710dac3ddef73aa4be2b995766db9b6b4d.1674499048.git.geert+renesas@glider.be Signed-off-by: Marc Kleine-Budde commit 9be8c5583581244d8a77e41afa16b8b0a5ddabc0 Author: Geert Uytterhoeven Date: Mon Jan 23 19:56:07 2023 +0100 can: rcar_canfd: Fix R-Car V3U GAFLCFG field accesses Each Global Acceptance Filter List Configuration Register (GAFLCFG) contains two fields, and stores the number of channel rules for one channel pair. As R-Car V3U and later can have more than 2 channels, the field selection should be based on the LSB (even or odd) of the channel number, instead of on the full channel number. Fixes: 45721c406dcf50d4 ("can: rcar_canfd: Add support for r8a779a0 SoC") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/all/36bcf0ffb96d6aaed970751f9546b901af638bcf.1674499048.git.geert+renesas@glider.be Signed-off-by: Marc Kleine-Budde commit 0a016639ef92b28eb74ba4fed21bee1f1328513a Author: Geert Uytterhoeven Date: Mon Jan 23 19:56:06 2023 +0100 can: rcar_canfd: Fix R-Car V3U CAN mode selection When adding support for R-Car V3U, the Global FD Configuration register (CFDGFDCFG) and the Channel-specific CAN-FD Configuration Registers (CFDCmFDCFG) were mixed up. Use the correct register, and apply the selected CAN mode to all available channels. Annotate the corresponding register bits, to make it clear they do not exist on older variants. Fixes: 45721c406dcf50d4 ("can: rcar_canfd: Add support for r8a779a0 SoC") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/all/388ddf312917eb9f6cc460a481f68402a876f9b5.1674499048.git.geert+renesas@glider.be Signed-off-by: Marc Kleine-Budde commit a707d44dfb4786fdd6444653abf36fc3eb21d503 Author: Geert Uytterhoeven Date: Mon Jan 23 19:56:05 2023 +0100 dt-bindings: can: renesas,rcar-canfd: Add transceiver support Add support for describing CAN transceivers 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 Acked-by: Rob Herring Link: https://lore.kernel.org/all/1bd328b5c9c6cfa633b42af87550f4c7358a05c1.1674499048.git.geert+renesas@glider.be Signed-off-by: Marc Kleine-Budde commit 3e17dc91c8a33b4f90b80243a59b7b2ac8e92533 Author: Geert Uytterhoeven Date: Mon Jan 23 19:56:04 2023 +0100 dt-bindings: can: renesas,rcar-canfd: Document R-Car V4H support Document support for the CAN-FD Interface on the Renesas R-Car V4H (R8A779G0) SoC. Signed-off-by: Geert Uytterhoeven Acked-by: Rob Herring Link: https://lore.kernel.org/all/d8158c78cc786c432df5a5e5bbad848b717aca71.1674499048.git.geert+renesas@glider.be Signed-off-by: Marc Kleine-Budde commit e8b98168761fab16ff35eac0d27d9ca21eb42788 Author: Geert Uytterhoeven Date: Mon Jan 23 19:56:03 2023 +0100 dt-bindings: can: renesas,rcar-canfd: R-Car V3U is R-Car Gen4 Despite the name, R-Car V3U is the first member of the R-Car Gen4 family. Hence generalize this by introducing a family-specific compatible value for R-Car Gen4. While at it, replace "both channels" by "all channels", as the numbers of channels may differ from two. Signed-off-by: Geert Uytterhoeven Acked-by: Rob Herring Link: https://lore.kernel.org/all/4dea4b7dd76d4f859ada85f97094b7adeef5169f.1674499048.git.geert+renesas@glider.be Signed-off-by: Marc Kleine-Budde commit d45fed4ff61c48890e55a590bdd7a9fb22457be8 Merge: 5e6a51787fef2 669c4614236a7 Author: Greg Kroah-Hartman Date: Thu Feb 2 16:56:14 2023 +0100 Merge tag 'coresight-next-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux into char-misc-next Suzuki writes: coresight: Updates for v6.3 - Dynamic TraceID allocation scheme for CoreSight trace source. Allows systems with > 44 CPUs to use the ETMs. TraceID is advertised via AUX_OUTPUT_HWID packets in perf.data. Also allows allocating trace-ids for non-CPU bound trace components (e.g., Qualcomm TPDA). - Support for Qualcomm TPDA and TPDM CoreSight devices. - Support for Ultrasoc SMB CoreSight Sink buffer. - Fixes for HiSilicon PTT driver - MAINTAINERS update: Add Reviewer for HiSilicon PTT driver - Bug fixes for CTI power management and sysfs mode - Fix CoreSight ETM4x TRCSEQRSTEVRn access Signed-off-by: Suzuki K Poulose * tag 'coresight-next-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux: (35 commits) coresight: tmc: Don't enable TMC when it's not ready. coresight: tpda: fix return value check in tpda_probe() Coresight: tpda/tpdm: remove incorrect __exit annotation coresight: perf: Output trace id only once coresight: Fix uninitialised variable use in coresight_disable Documentation: coresight: tpdm: Add dummy comment after sysfs list Documentation: coresight: Extend title heading syntax in TPDM and TPDA documentation Documentation: trace: Add documentation for TPDM and TPDA dt-bindings: arm: Adds CoreSight TPDA hardware definitions Coresight: Add TPDA link driver coresight-tpdm: Add integration test support coresight-tpdm: Add DSB dataset support dt-bindings: arm: Add CoreSight TPDM hardware Coresight: Add coresight TPDM source driver coresight: core: Use IDR for non-cpu bound sources' paths. coresight: trace-id: Add debug & test macros to Trace ID allocation coresight: events: PERF_RECORD_AUX_OUTPUT_HW_ID used for Trace ID kernel: events: Export perf_report_aux_output_id() coresight: trace id: Remove legacy get trace ID function. coresight: etmX.X: stm: Remove trace_id() callback ... commit ce6cc6f70cad4d703ddfe99d74f33990617c0a3c Author: Daniel Bristot de Oliveira Date: Tue Jan 31 16:38:55 2023 +0100 Documentation/rtla: Add timerlat-top auto-analysis options Add the new options to the man page, as well as updating the example to include the new output. Link: https://lkml.kernel.org/r/a3f5fb49432a55c3323b18725fc6e702f16ccc79.1675179318.git.bristot@kernel.org Cc: Daniel Bristot de Oliveira Cc: Jonathan Corbet Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) commit 5def33df84d2326ebf5f29ae9ddc702a4593c337 Author: Daniel Bristot de Oliveira Date: Tue Jan 31 16:38:54 2023 +0100 rtla/timerlat: Add auto-analysis support to timerlat top Currently, timerlat top displays the timerlat tracer latency results, saving the intuitive timerlat trace for the developer to analyze. This patch goes a step forward in the automaton of the scheduling latency analysis by providing a summary of the root cause of a latency higher than the passed "stop tracing" parameter if the trace stops. The output is intuitive enough for non-expert users to have a general idea of the root cause by looking at each factor's contribution percentage while keeping the technical detail in the output for more expert users to start an in dept debug or to correlate a root cause with an existing one. The terminology is in line with recent industry and academic publications to facilitate the understanding of both audiences. Here is one example of tool output: ----------------------------------------- %< ----------------------------------------------------- # taskset -c 0 timerlat -a 40 -c 1-23 -q Timer Latency 0 00:00:12 | IRQ Timer Latency (us) | Thread Timer Latency (us) CPU COUNT | cur min avg max | cur min avg max 1 #12322 | 0 0 1 15 | 10 3 9 31 2 #12322 | 3 0 1 12 | 10 3 9 23 3 #12322 | 1 0 1 21 | 8 2 8 34 4 #12322 | 1 0 1 17 | 10 2 11 33 5 #12322 | 0 0 1 12 | 8 3 8 25 6 #12322 | 1 0 1 14 | 16 3 11 35 7 #12322 | 0 0 1 14 | 9 2 8 29 8 #12322 | 1 0 1 22 | 9 3 9 34 9 #12322 | 0 0 1 14 | 8 2 8 24 10 #12322 | 1 0 0 12 | 9 3 8 24 11 #12322 | 0 0 0 15 | 6 2 7 29 12 #12321 | 1 0 0 13 | 5 3 8 23 13 #12319 | 0 0 1 14 | 9 3 9 26 14 #12321 | 1 0 0 13 | 6 2 8 24 15 #12321 | 1 0 1 15 | 12 3 11 27 16 #12318 | 0 0 1 13 | 7 3 10 24 17 #12319 | 0 0 1 13 | 11 3 9 25 18 #12318 | 0 0 0 12 | 8 2 8 20 19 #12319 | 0 0 1 18 | 10 2 9 28 20 #12317 | 0 0 0 20 | 9 3 8 34 21 #12318 | 0 0 0 13 | 8 3 8 28 22 #12319 | 0 0 1 11 | 8 3 10 22 23 #12320 | 28 0 1 28 | 41 3 11 41 rtla timerlat hit stop tracing ## CPU 23 hit stop tracing, analyzing it ## IRQ handler delay: 27.49 us (65.52 %) IRQ latency: 28.13 us Timerlat IRQ duration: 9.59 us (22.85 %) Blocking thread: 3.79 us (9.03 %) objtool:49256 3.79 us Blocking thread stacktrace -> timerlat_irq -> __hrtimer_run_queues -> hrtimer_interrupt -> __sysvec_apic_timer_interrupt -> sysvec_apic_timer_interrupt -> asm_sysvec_apic_timer_interrupt -> _raw_spin_unlock_irqrestore -> cgroup_rstat_flush_locked -> cgroup_rstat_flush_irqsafe -> mem_cgroup_flush_stats -> mem_cgroup_wb_stats -> balance_dirty_pages -> balance_dirty_pages_ratelimited_flags -> btrfs_buffered_write -> btrfs_do_write_iter -> vfs_write -> __x64_sys_pwrite64 -> do_syscall_64 -> entry_SYSCALL_64_after_hwframe ------------------------------------------------------------------------ Thread latency: 41.96 us (100%) The system has exit from idle latency! Max timerlat IRQ latency from idle: 17.48 us in cpu 4 Saving trace to timerlat_trace.txt ----------------------------------------- >% ----------------------------------------------------- In this case, the major factor was the delay suffered by the IRQ handler that handles timerlat wakeup: 65.52 %. This can be caused by the current thread masking interrupts, which can be seen in the blocking thread stacktrace: the current thread (objtool:49256) disabled interrupts via raw spin lock operations inside mem cgroup, while doing write syscall in a btrfs file system. A simple search for the function name on Google shows that this is a legit case for disabling the interrupts: cgroup: Use irqsave in cgroup_rstat_flush_locked() lore.kernel.org/linux-mm/20220301122143.1521823-2-bigeasy@linutronix.de/ The output also prints other reasons for the latency root cause, such as: - an IRQ that happened before the IRQ handler that caused delays - The interference from NMI, IRQ, Softirq, and Threads The details about how these factors affect the scheduling latency can be found here: https://bristot.me/demystifying-the-real-time-linux-latency/ Link: https://lkml.kernel.org/r/3d45f40e630317f51ac6d678e2d96d310e495729.1675179318.git.bristot@kernel.org Cc: Daniel Bristot de Oliveira Cc: Jonathan Corbet Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) commit 27e348b221f6a78cbe86e7def8e2611f84509211 Author: Daniel Bristot de Oliveira Date: Tue Jan 31 16:38:53 2023 +0100 rtla/timerlat: Add auto-analysis core Currently, timerlat displays a summary of the timerlat tracer results saving the trace if the system hits a stop condition. While this represented a huge step forward, the root cause was not that is accessible to non-expert users. The auto-analysis fulfill this gap by parsing the trace timerlat runs, printing an intuitive auto-analysis. Link: https://lkml.kernel.org/r/1ee073822f6a2cbb33da0c817331d0d4045e837f.1675179318.git.bristot@kernel.org Cc: Daniel Bristot de Oliveira Cc: Jonathan Corbet Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) commit b0425784b942fffbbdb804896197f1dbccda37c5 Author: Mathias Nyman Date: Thu Feb 2 17:05:05 2023 +0200 xhci: decouple usb2 port resume and get_port_status request handling The get port status hub request code in xhci-hub.c will complete usb2 port resume signalling if signalling has been going on for long enough. The code that completes the resume signalling, and the code that returns the port status have gotten too intertwined, so separate them a bit. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230202150505.618915-12-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 0e6275452ce26d7ff274a5c1b15ed581a26f7986 Author: Mathias Nyman Date: Thu Feb 2 17:05:04 2023 +0200 xhci: clear usb2 resume related variables in one place. Initially resume related USB2 variables were cleared once port successfully resumed to U0. Later code was added to clean up stale resume variables in case of port failed to resume to U0. Clear the variables in one place after port is no longer resuming or in suspended U3 state. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230202150505.618915-11-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit a909d629ae77b97b6288bc3cfe68560454bf79c6 Author: Mathias Nyman Date: Thu Feb 2 17:05:03 2023 +0200 xhci: rename resume_done to resume_timestamp resume_done is just a timestamp, avoid confusing it with completions related to port state transitions that are named *_done Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230202150505.618915-10-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 6baf7e749ab3aa4fcfeef3a26e8ec2306572cd05 Author: Mathias Nyman Date: Thu Feb 2 17:05:02 2023 +0200 xhci: Pass port structure as parameter to xhci_disable_port(). Pass the port structure to xhci_disable_port() instead of address, index, and value. re-read the port portsc value before disabling the port. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230202150505.618915-9-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 2996e9fc00c378987c18ecbafe5624581b18c0d6 Author: Mathias Nyman Date: Thu Feb 2 17:05:01 2023 +0200 xhci: move port specific items such as state completions to port structure Now that we have a port structure for each port it makes sense to move per port variables, timestamps and completions there. Get rid of storing bitfileds and arrays of port specific items per bus. Move unsigned long resume_done; insigned long rexit_ports struct completion rexit_done; struct completion u3exit_done; Rename rexit_ports to rexit_active, and remove a redundant hcd speed check while checking if rexit_active is set. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230202150505.618915-8-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit a66095a957ce3ce2a5154f7981845942f26e477d Author: Mathias Nyman Date: Thu Feb 2 17:05:00 2023 +0200 xhci: pass port pointer as parameter to xhci_set_port_power() Pass the port structure pointer directly to xhci_set_port_power() instead of hcd and port index. cleanup Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230202150505.618915-7-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit faaae0190dcd1e230616c85bbc3b339f27ba5b81 Author: Mathias Nyman Date: Thu Feb 2 17:04:59 2023 +0200 xhci: cleanup xhci_hub_control port references Both port number and port structure of a port are referred to several times when handing hub requests in xhci. Use more suitable data types and readable names for these. Cleanup only, no functional changes Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230202150505.618915-6-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 52dd0483e822d097fd6f522af2438a9b6f6eb0a9 Author: Mathias Nyman Date: Thu Feb 2 17:04:58 2023 +0200 xhci: add helpers for enabling and disabling interrupters Simple helpers to set and clear the IE (interrupter enable) bit for an interrupter. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230202150505.618915-5-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit b17a57f89f69069458d0a9d9b04281ce48da7ebb Author: Mathias Nyman Date: Thu Feb 2 17:04:57 2023 +0200 xhci: Refactor interrupter code for initial multi interrupter support. xHC supports several interrupters, each with its own mmio register set, event ring and MSI/MSI-X vector. Transfers can be assigned different interrupters when queued. See xhci 4.17 for details. Current driver only supports one interrupter. Create a xhci_interrupter structure containing an event ring, pointer to mmio registers for this interrupter, variables to store registers over s3 suspend, erst, etc. Add functions to create and free an interrupter, and pass an interrupter pointer to functions that deal with events. Secondary interrupters are also useful without having an interrupt vector. One use case is the xHCI audio sideband offloading where a DSP can take care of specific audio endpoints. When all transfer events of an offloaded endpoint can be mapped to a separate interrupter event ring the DSP can poll this ring, and we can mask these events preventing waking up the CPU. Only minor functional changes such as clearing some of the interrupter registers when freeing the interrupter. Still create only one primary interrupter. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230202150505.618915-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 54f9927dfe2266402a226d5f51d38236bdca0590 Author: Mathias Nyman Date: Thu Feb 2 17:04:56 2023 +0200 xhci: remove xhci_test_trb_in_td_math early development check Time to remove this test trb in td math check that was added in early stage of xhci driver development. It verified that the size, alignment and boundaries of the event and command rings allocated by the driver itself are correct. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230202150505.618915-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 8c1cbec9db1ab044167a7594c88bb5906c9d3ee4 Author: Mathias Nyman Date: Thu Feb 2 17:04:55 2023 +0200 xhci: fix event ring segment table related masks and variables in header xHC controller can supports up to 1024 interrupters. To fit these change the max_interrupters varable from u8 to u16. Add a separate mask for the reserve and preserve bits [5:0] in the erst base register and use it instead of the ERST_PRT_MASK. ERSR_PTR_MASK [3:0] is intended for masking bits in the event ring dequeue pointer register. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230202150505.618915-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 1d78f19d90d1932c83d8c96c6f86fbb06c05e29a Merge: 2a096315be7d8 5579a966229c3 Author: Mark Brown Date: Thu Feb 2 15:36:47 2023 +0000 Fix default DMIC gain on AMD PDM drivers Merge series from Mario Limonciello : It's been reported that a number of laptops have a low volume level from the digital microphone compared to Windows. AMD offers a register that can adjust the gain for PDM which is not configured at maximum gain by default. To fix this change the default for all 3 drivers to raise the gain but also offer a module parameter. The module parameter can be used for debugging if the gain is too high on a given laptop. This is intentionally split into multiple patches for default and parameter so that if the default really does behave better universally we can bring it back to stable too later. commit f492edb40b54862cbd65e6aa5eb39fa40f9949bf Author: David E. Box Date: Thu Jan 19 19:15:22 2023 -0800 PCI: vmd: Add quirk to configure PCIe ASPM and LTR PCIe ports reserved for VMD use are not visible to BIOS and therefore not configured to enable PCIe ASPM or LTR values (which BIOS will configure if they are not set). Lack of this programming results in high power consumption on laptops as reported in bugzilla. For affected products use pci_enable_link_state to set the allowed link states for devices on the root ports. Also set the LTR value to the maximum value needed for the SoC. This is a workaround for products from Rocket Lake through Alder Lake. Raptor Lake, the latest product at this time, has already implemented LTR configuring in BIOS. Future products will move ASPM configuration back to BIOS as well. As this solution is intended for laptops, support is not added for hotplug or for devices downstream of a switch on the root port. Link: https://bugzilla.kernel.org/show_bug.cgi?id=212355 Link: https://bugzilla.kernel.org/show_bug.cgi?id=215063 Link: https://bugzilla.kernel.org/show_bug.cgi?id=213717 Link: https://lore.kernel.org/r/20230120031522.2304439-5-david.e.box@linux.intel.com Signed-off-by: Michael Bottini Signed-off-by: David E. Box Signed-off-by: Lorenzo Pieralisi Reviewed-by: Jon Derrick Reviewed-by: Nirmal Patel Reviewed-by: Kuppuswamy Sathyanarayanan commit 14d2079af64835494fe5c59ed63222d91a38a624 Author: David E. Box Date: Thu Jan 19 19:15:21 2023 -0800 PCI: vmd: Create feature grouping for client products Simplify the device ID list by creating a grouping of features shared by client products. Suggested-by: Jon Derrick Link: https://lore.kernel.org/r/20230120031522.2304439-4-david.e.box@linux.intel.com Signed-off-by: David E. Box Signed-off-by: Lorenzo Pieralisi Reviewed-by: Kuppuswamy Sathyanarayanan commit 56f34e8ddc40d8eca29fb16ada409ac74c180b1f Author: Linus Walleij Date: Tue Jan 31 09:52:20 2023 +0100 memstick: core: Imply IOSCHED_BFQ If we enable the memory stick block layer, use Kconfig to imply the BFQ I/O scheduler. As all memstick devices are single-queue, this is the scheduler that users want so let's be helpful and make sure it gets default-selected into a manual kernel configuration. It will still need to be enabled at runtime (usually with udev scripts). Cc: linux-block@vger.kernel.org Cc: Paolo Valente Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230131085220.1038241-1-linus.walleij@linaro.org Signed-off-by: Ulf Hansson commit 1444fed25b59957452da72ab498afe63589f3419 Author: Linus Walleij Date: Tue Jan 31 09:47:42 2023 +0100 mmc: core: Imply IOSCHED_BFQ If we enable the MMC/SD block layer, use Kconfig to imply the BFQ I/O scheduler. As all MMC/SD devices are single-queue, this is the scheduler that users want so let's be helpful and make sure it gets default-selected into a manual kernel configuration. It will still need to be enabled at runtime (usually with udev scripts). Cc: linux-block@vger.kernel.org Cc: Paolo Valente Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230131084742.1038135-1-linus.walleij@linaro.org Signed-off-by: Ulf Hansson commit cca0dfecdba3f37c08b7ae99ce07197be84b9281 Author: David E. Box Date: Thu Jan 19 19:15:20 2023 -0800 PCI: vmd: Use PCI_VDEVICE in device list Use PCI_VDEVICE to simplify the device table. Link: https://lore.kernel.org/r/20230120031522.2304439-3-david.e.box@linux.intel.com Signed-off-by: David E. Box Signed-off-by: Lorenzo Pieralisi Reviewed-by: Jon Derrick Reviewed-by: Nirmal Patel Reviewed-by: Kuppuswamy Sathyanarayanan commit de82f60f9c86b72635ce49f7ab822e6a00a90dca Author: Michael Bottini Date: Thu Jan 19 19:15:19 2023 -0800 PCI/ASPM: Add pci_enable_link_state() Add pci_enable_link_state() to allow devices to change the default BIOS configured states. Clears the BIOS default settings then sets the new states and reconfigures the link under the semaphore. Also add PCIE_LINK_STATE_ALL macro for convenience for callers that want to enable all link states. Link: https://lore.kernel.org/r/20230120031522.2304439-2-david.e.box@linux.intel.com Signed-off-by: Michael Bottini Signed-off-by: David E. Box Signed-off-by: Lorenzo Pieralisi Reviewed-by: Kuppuswamy Sathyanarayanan Acked-by: Bjorn Helgaas commit cf3e0251868c56b10ccb3e0b3628fcfb0c9c4ec5 Author: Ross Zwisler Date: Mon Jan 30 11:19:11 2023 -0700 PM: tools: 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 scripts in tools/power still refer to this older debugfs path, so let's update them to avoid confusion. Signed-off-by: Ross Zwisler Signed-off-by: Rafael J. Wysocki commit 2e8ca20b40e5ba556cd38495df418b2d0c568195 Author: Thomas Kopp Date: Fri Jan 27 13:42:58 2023 +0100 can: mcp251xfd: regmap: optimizing transfer size for CRC transfers size 1 For CRC transfers with size 1 it is more efficient to use the write_safe command instead of the write_crc command. This saves the length byte on the SPI transfer. changes since v1: https://lore.kernel.org/all/20230127124258.2764-1-thomas.kopp@microchip.com - change logic to remove 1 level of indention Link: https://lore.kernel.org/all/20230202141811.2581795-1-mkl@pengutronix.de Signed-off-by: Thomas Kopp Signed-off-by: Marc Kleine-Budde commit c6adf659a8ba85913e16a571d5a9bcd17d3d1234 Author: Oliver Hartkopp Date: Wed Jan 4 21:18:44 2023 +0100 can: isotp: check CAN address family in isotp_bind() Add missing check to block non-AF_CAN binds. Syzbot created some code which matched the right sockaddr struct size but used AF_XDP (0x2C) instead of AF_CAN (0x1D) in the address family field: bind$xdp(r2, &(0x7f0000000540)={0x2c, 0x0, r4, 0x0, r2}, 0x10) ^^^^ This has no funtional impact but the userspace should be notified about the wrong address family field content. Link: https://syzkaller.appspot.com/text?tag=CrashLog&x=11ff9d8c480000 Reported-by: syzbot+5aed6c3aaba661f5b917@syzkaller.appspotmail.com Signed-off-by: Oliver Hartkopp Link: https://lore.kernel.org/all/20230104201844.13168-1-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde commit 2a30b2bd01c23a7eeace3a3f82c2817227099805 Author: Oliver Hartkopp Date: Wed Jan 25 06:54:07 2023 +0100 can: gw: give feedback on missing CGW_FLAGS_CAN_IIF_TX_OK flag To send CAN traffic back to the incoming interface a special flag has to be set. When creating a routing job for identical interfaces without this flag the rule is created but has no effect. This patch adds an error return value in the case that the CAN interfaces are identical but the CGW_FLAGS_CAN_IIF_TX_OK flag was not set. Reported-by: Jannik Hartung Signed-off-by: Oliver Hartkopp Link: https://lore.kernel.org/all/20230125055407.2053-1-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde commit 86cb1004b6f71b2f79f5fb08502a5bd10c852bf5 Author: Rafael J. Wysocki Date: Mon Jan 30 20:02:19 2023 +0100 thermal: intel: intel_pch: Eliminate device operations object The same device operations object is pointed to by all of the board configurations in the driver, so effectively the same operations callbacks are used by all of them which only adds overhead (that can be significant due to retpolines) for no real purpose. For this reason, drop the device operations object and replace the respective callback invocations by direct calls to the specific functions that were previously pointed to by callback pointers. No intentional change in behavior. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano Tested-by: Zhang Rui Reviewed-by: Zhang Rui commit 1aa4f925d80c44bd70442a8e94718fc921b8a55f Author: Rafael J. Wysocki Date: Mon Jan 30 20:00:48 2023 +0100 thermal: intel: intel_pch: Rename device operations callbacks Because the same device operations callbacks are used for all supported boards, they are in fact generic, so rename them to reflect that. Also rename the operations object itself for consistency. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano Tested-by: Zhang Rui Reviewed-by: Zhang Rui commit 558718f4d3798fa80a9288addc09240910c07df1 Author: Rafael J. Wysocki Date: Mon Jan 30 19:59:48 2023 +0100 thermal: intel: intel_pch: Eliminate redundant return pointers Both pch_wpt_init() and pch_wpt_get_temp() can return the proper result via their return values, so they do not need to use return pointers. Modify them accordingly. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano Tested-by: Zhang Rui Reviewed-by: Zhang Rui commit 2cee73568e8d2f9d63793cf84e9aa65c9dfd85e2 Author: Rafael J. Wysocki Date: Mon Jan 30 19:58:32 2023 +0100 thermal: intel: intel_pch: Make pch_wpt_add_acpi_psv_trip() return int Modify pch_wpt_add_acpi_psv_trip() to return an int value instead of using a return pointer for that. While at it, drop an excessive empty code line. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano Tested-by: Zhang Rui Reviewed-by: Zhang Rui commit 1bcebcab887ba4c4d790d7ccb055303c5dc7dbbb Author: Rafael J. Wysocki Date: Mon Jan 30 19:47:43 2023 +0100 thermal: intel: int340x: Improve int340x_thermal_set_trip_temp() Instead of using snprintf() to populate the ACPI object name in int340x_thermal_set_trip_temp(), use an appropriate initializer and make the function fail if its trip argument is greater than 9, because ACPI object names can only be 4 characters long and it does not make sense to even try to evaluate objects with longer names (that argument is guaranteed to be non-negative, because it comes from the thermal code that will not pass negative trip numbers to zone callbacks). Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano Tested-by: Zhang Rui Reviewed-by: Zhang Rui commit d0009d14e9853bb5f553a36df9fb7791deffc594 Author: Rafael J. Wysocki Date: Mon Jan 30 19:45:17 2023 +0100 thermal: intel: int340x: Drop pointless cast to unsigned long The explicit casting from int to unsigned long in int340x_thermal_get_zone_temp() is pointless, becuase the multiplication result is cast back to int by the assignment in the same statement, so drop it. No expected functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano Tested-by: Zhang Rui Reviewed-by: Zhang Rui commit 67c6945867145edda3092c336aa4cf56f9986ed7 Author: Rafael J. Wysocki Date: Mon Jan 30 19:43:32 2023 +0100 thermal: intel: int340x: Rename variable in int340x_thermal_zone_add() Rename local variables int34x_thermal_zone in int340x_thermal_zone_add() and int340x_thermal_zone_remove() to int34x_zone which allows a number of code lines to be shorter and easier to read and adjust some white space for consistency. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Tested-by: Zhang Rui Reviewed-by: Zhang Rui commit be014c789c717a4328f49d58b53170923bc475f8 Author: Rafael J. Wysocki Date: Mon Jan 30 19:42:16 2023 +0100 thermal: intel: int340x: Assorted minor cleanups Improve some inconsistent usage of white space in int340x_thermal_zone.c, fix up one coding style issue in it (missing braces around an else branch of a conditional) and while at it replace a !ACPI_FAILURE() check with an equivalent ACPI_SUCCESS() one. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano Tested-by: Zhang Rui Reviewed-by: Zhang Rui commit b18ea3d9d214dfb23b0b6bd2acc121cb0d0fa2c5 Author: Bo Liu Date: Wed Feb 1 03:14:38 2023 -0500 net: dsa: Use sysfs_emit() to instead of sprintf() Follow the advice of the Documentation/filesystems/sysfs.rst and show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: Bo Liu Link: https://lore.kernel.org/r/20230201081438.3151-1-liubo03@inspur.com Signed-off-by: Paolo Abeni commit dd3b3d160ea7004091051da60e86f36f40970888 Author: Rafael J. Wysocki Date: Fri Jan 27 19:17:03 2023 +0100 thermal: ACPI: Make helpers retrieve temperature only It is slightly better to make the ACPI thermal helper functions retrieve the trip point temperature only instead of doing the full trip point initialization, because they are also used for updating some already registered trip points, in which case initializing a new trip just in order to update the temperature of an existing one is somewhat wasteful. Modify the ACPI thermal helpers accordingly and update their users. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano commit 886d2278a6db0db06486faa7c47c58f38171d2e6 Merge: 8b6f322e47ba4 4f3b20bfbb752 Author: Paolo Abeni Date: Thu Feb 2 15:17:21 2023 +0100 Merge branch 'amd-xgbe-add-support-for-2-5gbe-and-rx-adaptation' Raju Rangoju says: ==================== amd-xgbe: add support for 2.5GbE and rx-adaptation This patch series adds support for 2.GbE in 10GBaseT mode and rx-adaptation support for Yellow Carp devices. 1) Support for 2.5GbE: Add the necessary changes to the driver to fully recognize and enable 2.5GbE speed in 10GBaseT mode. 2) Support for rx-adaptation: In order to support the 10G backplane mode without Auto-negotiation and to support the longer-length DAC cables, it requires PHY to perform RX Adaptation sequence as mentioned in the Synopsys databook. Add the necessary changes to Yellow Carp devices to ensure seamless RX Adaptation for 10G-SFI (LONG DAC), and 10G-KR modes without Auto-Negotiation (CL72 not present) ==================== Link: https://lore.kernel.org/r/20230201054932.212700-1-Raju.Rangoju@amd.com Signed-off-by: Paolo Abeni commit 4f3b20bfbb75289c18729b6eb2da3f3c5e7f58b0 Author: Raju Rangoju Date: Wed Feb 1 11:19:32 2023 +0530 amd-xgbe: add support for rx-adaptation The existing implementation for non-Autonegotiation 10G speed modes does not enable RX adaptation in the Driver and FW. The RX Equalization settings (AFE settings alone) are manually configured and the existing link-up sequence in the driver does not perform rx adaptation process as mentioned in the Synopsys databook. There's a customer request for 10G backplane mode without Auto-negotiation and for the DAC cables of more significant length that follow the non-Autonegotiation mode. These modes require PHY to perform RX Adaptation. The proposed logic adds the necessary changes to Yellow Carp devices to ensure seamless RX Adaptation for 10G-SFI (LONG DAC) and 10G-KR without AN (CL72 not present). The RX adaptation core algorithm is executed by firmware, however, to achieve that a new mailbox sub-command is required to be sent by the driver. Co-developed-by: Shyam Sundar S K Signed-off-by: Shyam Sundar S K Signed-off-by: Raju Rangoju Signed-off-by: Paolo Abeni commit 3ee217c47b8b7d18c7c6afa62a5451d5da16d7f5 Author: Raju Rangoju Date: Wed Feb 1 11:19:31 2023 +0530 amd-xgbe: add 2.5GbE support to 10G BaseT mode Add support to the driver to fully recognize and enable 2.5GbE speed in 10GBaseT mode. Acked-by: Shyam Sundar S K Signed-off-by: Raju Rangoju Signed-off-by: Paolo Abeni commit fbe7e38f3e57e38916ae7f248fd6efafeb9ecdd3 Author: Uwe Kleine-König Date: Thu Feb 2 11:45:01 2023 +0100 serial: 8250: Fix mismerge regarding serial_lsr_in() The relevant history introducing serial_lsr_in() looks as follows: $ git log --graph --oneline --boundary 9fafe733514b..df36f3e3fbb7 -- drivers/tty/serial/8250/8250_port.c * df36f3e3fbb7 Merge tag 'v5.19-rc3' into tty-next |\ | * be03b0651ffd serial: 8250: Store to lsr_save_flags after lsr read * | ... * | bdb70c424df1 serial: 8250: Create serial_lsr_in() * | ce338e4477cf serial: 8250: Store to lsr_save_flags after lsr read * | ... |/ o 9fafe733514b tty: remove CMSPAR ifdefs So the patch "serial: 8250: Store to lsr_save_flags after lsr read" was introduced twice and in one branch it was followed up by commit bdb70c424df1 ("serial: 8250: Create serial_lsr_in()") which moved explicit lsr_saved_flags handling into a new function serial_lsr_in(). When the two branches were merged in commit df36f3e3fbb7, we got both, serial_lsr_in() and the explicit lsr_saved_flags handling. So drop the explicit lsr_saved_flags handling. Signed-off-by: Uwe Kleine-König Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230202104501.264686-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 05bd18348b8898aaeb894da6c8cbf9ae36599d0b Author: Luca Weiss Date: Mon Jan 23 14:29:50 2023 +0100 phy: qcom-qmp-combo: Add config for SM6350 Add the tables and config for the combo phy found on SM6350. Signed-off-by: Luca Weiss Reviewed-by: Johan Hovold Link: https://lore.kernel.org/r/20230120-sm6350-usbphy-v4-2-4d700a90ba16@fairphone.com Signed-off-by: Vinod Koul commit 5e2714556fa2b4e6ba684e4ebcbdd27c7ea65b22 Author: Luca Weiss Date: Mon Jan 23 14:29:49 2023 +0100 dt-bindings: phy: qcom,qmp-usb3-dp: Add sm6350 compatible Add the compatible describing the combo phy found on SM6350. Reviewed-by: Johan Hovold Acked-by: Krzysztof Kozlowski Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20230120-sm6350-usbphy-v4-1-4d700a90ba16@fairphone.com Signed-off-by: Vinod Koul commit 49094d928618309877c50e589f23e639a3b0c453 Author: Chunfeng Yun Date: Wed Jan 18 16:43:41 2023 +0800 phy: mediatek: remove temporary variable @mask_ Remove the temporary @mask_, this may cause build warning when use clang compiler for powerpc, but can't reproduce it when compile for arm64. the build warning is caused by: "warning: result of comparison of constant 18446744073709551615 with expression of type (aka 'unsigned long') is always false [-Wtautological-constant-out-of-range-compare]" More information provided in below lore link. After removing @mask_, there is a "CHECK:MACRO_ARG_REUSE" when run checkpatch.pl, but due to @mask is constant, no reuse problem will happen. Link: https://lore.kernel.org/lkml/202212160357.jJuesD8n-lkp@intel.com/t/ Fixes: 84513eccd678 ("phy: mediatek: fix build warning of FIELD_PREP()") Reported-by: kernel test robot Signed-off-by: Chunfeng Yun Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230118084343.26913-1-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit 1679bfef906f1a722be6e79071a0a7889d21875f Author: Abel Vesa Date: Wed Jan 18 00:41:48 2023 +0200 phy: qcom-qmp-ufs: Add SM8550 support Add SM8550 specific register layout and table configs. Signed-off-by: Abel Vesa Reviewed-by: Dmitry Baryshkov Reviewed-by: Johan Hovold Link: https://lore.kernel.org/r/20230117224148.1914627-7-abel.vesa@linaro.org Signed-off-by: Vinod Koul commit 5b8154ce500944c6d70c5d3189341c47e5efb4f8 Author: Abel Vesa Date: Wed Jan 18 00:41:47 2023 +0200 phy: qcom-qmp: pcs-ufs: Add v6 register offsets The new SM8550 SoC bumps up the HW version of QMP phy to v6 for USB, UFS and PCIE g3x2. Add the new PCS UFS specific offsets in a dedicated header file. Signed-off-by: Abel Vesa Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230117224148.1914627-6-abel.vesa@linaro.org Signed-off-by: Vinod Koul commit c9736600a64f7d9b374838d065ef85f6bf6c3dd4 Author: Abel Vesa Date: Wed Jan 18 00:41:46 2023 +0200 phy: qcom-qmp: qserdes-txrx-ufs: Add v6 register offsets The new SM8550 SoC bumps up the HW version of QMP phy to v6 for USB, UFS and PCIE g3x2. Add the new qserdes TX RX but UFS specific offsets in a dedicated header file. Signed-off-by: Abel Vesa Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230117224148.1914627-5-abel.vesa@linaro.org Signed-off-by: Vinod Koul commit ddf070f6c9cb8af8e9e4003c31947a3e0e3255d9 Author: Abel Vesa Date: Wed Jan 18 00:41:45 2023 +0200 phy: qcom-qmp: qserdes-txrx: Add v6 register offsets The new SM8550 SoC bumps up the HW version of QMP phy to v6 for USB, UFS and PCIE g3x2. Add the new qserdes TX RX offsets in a dedicated header file. Signed-off-by: Abel Vesa Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230117224148.1914627-4-abel.vesa@linaro.org Signed-off-by: Vinod Koul commit 2df32d96f2e306d2b7ea3a00fa8ee638a71ef3da Author: Abel Vesa Date: Wed Jan 18 00:41:44 2023 +0200 phy: qcom-qmp: qserdes-com: Add v6 register offsets The new SM8550 SoC bumps up the HW version of QMP phy to v6 for USB, UFS and PCIE g3x2. Add the new qserdes com offsets in a dedicated header file. Signed-off-by: Abel Vesa Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230117224148.1914627-3-abel.vesa@linaro.org Signed-off-by: Vinod Koul commit fdb5a86287c178df3d1ea064b93264dda3a7f697 Author: Abel Vesa Date: Wed Jan 18 00:41:43 2023 +0200 dt-bindings: phy: Add QMP UFS PHY comptible for SM8550 Document the QMP UFS PHY compatible for SM8550. Signed-off-by: Abel Vesa Acked-by: Krzysztof Kozlowski Reviewed-by: Johan Hovold Link: https://lore.kernel.org/r/20230117224148.1914627-2-abel.vesa@linaro.org Signed-off-by: Vinod Koul commit e4d0fe71f59dc5137a2793ff7560730d80d1e1f4 Author: Julian Anastasov Date: Wed Feb 1 19:56:53 2023 +0200 ipvs: avoid kfree_rcu without 2nd arg Avoid possible synchronize_rcu() as part from the kfree_rcu() call when 2nd arg is not provided. Signed-off-by: Julian Anastasov Signed-off-by: Pablo Neira Ayuso commit 40445d093e305b13ad6620c2ab26ed78d7411d5d Merge: 8012094e29253 09ea26f1bf31c Author: Arnd Bergmann Date: Thu Feb 2 13:40:30 2023 +0100 Merge tag 'v6.2-next-defconfig' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into soc/defconfig Enable config options needed to boot mt8192 based Chromebooks * tag 'v6.2-next-defconfig' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: arm64: defconfig: Enable DMA_RESTRICTED_POOL arm64: defconfig: Enable missing configs for mt8192-asurada Link: https://lore.kernel.org/r/2330b914-8a8e-8bf3-e98e-88d713c5224d@gmail.com Signed-off-by: Arnd Bergmann commit 352683ea52e3f299a72899c9ee059190c9f769a8 Author: Arnd Bergmann Date: Thu Feb 2 11:23:32 2023 +0100 drm/vc4: allow DRM_VC4_KUNIT_TEST to be a loadable module In configurations with CONFIG_KUNIT=m, builting the unit test into the kernel causes a link failure: arm-linux-gnueabi-ld: drivers/gpu/drm/vc4/tests/vc4_mock.o: in function `__build_mock': vc4_mock.c:(.text+0x6e): undefined reference to `kunit_do_failed_assertion' arm-linux-gnueabi-ld: vc4_mock.c:(.text+0x9c): undefined reference to `kunit_do_failed_assertion' arm-linux-gnueabi-ld: vc4_mock.c:(.text+0x100): undefined reference to `kunit_ptr_not_err_assert_format' ... Allow this to be a loadable module as well to have Kconfig sort out the dependencies correctly. Fixes: f759f5b53f1c ("drm/vc4: tests: Introduce a mocking infrastructure") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230202102346.868771-1-arnd@kernel.org Signed-off-by: Maxime Ripard commit 7e1790d26a92e05cc6a2d0bab98d8ea40ae28d9d Author: Patrick Delaunay Date: Wed Jan 18 18:29:37 2023 +0100 ARM: dts: stm32: fix compatible for BSEC on STM32MP13 Use the correct compatible for stm32mp13 support. The BSEC driver for STM32MP15x is not compatible with STM32MP13x. For example the proprietary's smc STM32_SMC_BSEC is not supported in STM32MP13x OP-TEE, it is replaced by SM32MP BSEC Pseudo Trusted Application in OP-TEE to access to the secured IP BSEC on STM32MP13X SoC. The correct compatible is already used in U-Boot and in upstream is in progress for OP-TEE device tree. As the SoC STM32MP13X is not yet official and it is not available outside STMicroelectronics, it is the good time to break the DTS compatibility and to correct the error done in the introduction of STM32MP131. Signed-off-by: Patrick Delaunay Reviewed-by: Ahmad Fatoum Signed-off-by: Alexandre Torgue commit 366384e495511bea8583e44173629a3012d62db0 Author: Patrick Delaunay Date: Wed Jan 18 13:49:51 2023 +0100 ARM: dts: stm32: Update part number NVMEM description on stm32mp131 The STM32MP13x Device Part Number (also named RPN in reference manual) only uses the first 12 bits in OTP4, all the other bit are reserved and they can be different of zero; they must be masked in NVMEM result, so the number of bits must be defined in the nvmem cell description. Fixes: 1da8779c0029 ("ARM: dts: stm32: add STM32MP13 SoCs support") Signed-off-by: Patrick Delaunay Signed-off-by: Alexandre Torgue commit 8b6f322e47ba4ac95b63bff1fcdd0d3f85fbc61b Merge: a8248fc4ad9b8 95b0693823518 Author: Paolo Abeni Date: Thu Feb 2 13:19:06 2023 +0100 Merge branch 'net-sched-transition-act_pedit-to-rcu-and-percpu-stats' Pedro Tammela says: ==================== net/sched: transition act_pedit to rcu and percpu stats The software pedit action didn't get the same love as some of the other actions and it's still using spinlocks and shared stats. Therefore, transition the action to rcu and percpu stats which improves the action's performance. We test this change with a very simple packet forwarding setup: tc filter add dev ens2f0 ingress protocol ip matchall \ action pedit ex munge eth src set b8:ce:f6:4b:68:35 pipe \ action pedit ex munge eth dst set ac:1f:6b:e4:ff:93 pipe \ action mirred egress redirect dev ens2f1 tc filter add dev ens2f1 ingress protocol ip matchall \ action pedit ex munge eth src set b8:ce:f6:4b:68:34 pipe \ action pedit ex munge eth dst set ac:1f:6b:e4:ff:92 pipe \ action mirred egress redirect dev ens2f0 Using TRex with a http-like profile, in our setup with a 25G NIC and a 26 cores Intel CPU, we observe the following in perf: before: 11.59% 2.30% [kernel] [k] tcf_pedit_act 2.55% tcf_pedit_act 8.38% _raw_spin_lock 6.43% native_queued_spin_lock_slowpath after: 1.46% 1.46% [kernel] [k] tcf_pedit_act tdc results for pedit after the patch: 1..69 ok 1 319a - Add pedit action that mangles IP TTL ok 2 7e67 - Replace pedit action with invalid goto chain ok 3 377e - Add pedit action with RAW_OP offset u32 ok 4 a0ca - Add pedit action with RAW_OP offset u32 (INVALID) ok 5 dd8a - Add pedit action with RAW_OP offset u16 u16 ok 6 53db - Add pedit action with RAW_OP offset u16 (INVALID) ok 7 5c7e - Add pedit action with RAW_OP offset u8 add value ok 8 2893 - Add pedit action with RAW_OP offset u8 quad ok 9 3a07 - Add pedit action with RAW_OP offset u8-u16-u8 ok 10 ab0f - Add pedit action with RAW_OP offset u16-u8-u8 ok 11 9d12 - Add pedit action with RAW_OP offset u32 set u16 clear u8 invert ok 12 ebfa - Add pedit action with RAW_OP offset overflow u32 (INVALID) ok 13 f512 - Add pedit action with RAW_OP offset u16 at offmask shift set ok 14 c2cb - Add pedit action with RAW_OP offset u32 retain value ok 15 1762 - Add pedit action with RAW_OP offset u8 clear value ok 16 bcee - Add pedit action with RAW_OP offset u8 retain value ok 17 e89f - Add pedit action with RAW_OP offset u16 retain value ok 18 c282 - Add pedit action with RAW_OP offset u32 clear value ok 19 c422 - Add pedit action with RAW_OP offset u16 invert value ok 20 d3d3 - Add pedit action with RAW_OP offset u32 invert value ok 21 57e5 - Add pedit action with RAW_OP offset u8 preserve value ok 22 99e0 - Add pedit action with RAW_OP offset u16 preserve value ok 23 1892 - Add pedit action with RAW_OP offset u32 preserve value ok 24 4b60 - Add pedit action with RAW_OP negative offset u16/u32 set value ok 25 a5a7 - Add pedit action with LAYERED_OP eth set src ok 26 86d4 - Add pedit action with LAYERED_OP eth set src & dst ok 27 f8a9 - Add pedit action with LAYERED_OP eth set dst ok 28 c715 - Add pedit action with LAYERED_OP eth set src (INVALID) ok 29 8131 - Add pedit action with LAYERED_OP eth set dst (INVALID) ok 30 ba22 - Add pedit action with LAYERED_OP eth type set/clear sequence ok 31 dec4 - Add pedit action with LAYERED_OP eth set type (INVALID) ok 32 ab06 - Add pedit action with LAYERED_OP eth add type ok 33 918d - Add pedit action with LAYERED_OP eth invert src ok 34 a8d4 - Add pedit action with LAYERED_OP eth invert dst ok 35 ee13 - Add pedit action with LAYERED_OP eth invert type ok 36 7588 - Add pedit action with LAYERED_OP ip set src ok 37 0fa7 - Add pedit action with LAYERED_OP ip set dst ok 38 5810 - Add pedit action with LAYERED_OP ip set src & dst ok 39 1092 - Add pedit action with LAYERED_OP ip set ihl & dsfield ok 40 02d8 - Add pedit action with LAYERED_OP ip set ttl & protocol ok 41 3e2d - Add pedit action with LAYERED_OP ip set ttl (INVALID) ok 42 31ae - Add pedit action with LAYERED_OP ip ttl clear/set ok 43 486f - Add pedit action with LAYERED_OP ip set duplicate fields ok 44 e790 - Add pedit action with LAYERED_OP ip set ce, df, mf, firstfrag, nofrag fields ok 45 cc8a - Add pedit action with LAYERED_OP ip set tos ok 46 7a17 - Add pedit action with LAYERED_OP ip set precedence ok 47 c3b6 - Add pedit action with LAYERED_OP ip add tos ok 48 43d3 - Add pedit action with LAYERED_OP ip add precedence ok 49 438e - Add pedit action with LAYERED_OP ip clear tos ok 50 6b1b - Add pedit action with LAYERED_OP ip clear precedence ok 51 824a - Add pedit action with LAYERED_OP ip invert tos ok 52 106f - Add pedit action with LAYERED_OP ip invert precedence ok 53 6829 - Add pedit action with LAYERED_OP beyond ip set dport & sport ok 54 afd8 - Add pedit action with LAYERED_OP beyond ip set icmp_type & icmp_code ok 55 3143 - Add pedit action with LAYERED_OP beyond ip set dport (INVALID) ok 56 815c - Add pedit action with LAYERED_OP ip6 set src ok 57 4dae - Add pedit action with LAYERED_OP ip6 set dst ok 58 fc1f - Add pedit action with LAYERED_OP ip6 set src & dst ok 59 6d34 - Add pedit action with LAYERED_OP ip6 dst retain value (INVALID) ok 60 94bb - Add pedit action with LAYERED_OP ip6 traffic_class ok 61 6f5e - Add pedit action with LAYERED_OP ip6 flow_lbl ok 62 6795 - Add pedit action with LAYERED_OP ip6 set payload_len, nexthdr, hoplimit ok 63 1442 - Add pedit action with LAYERED_OP tcp set dport & sport ok 64 b7ac - Add pedit action with LAYERED_OP tcp sport set (INVALID) ok 65 cfcc - Add pedit action with LAYERED_OP tcp flags set ok 66 3bc4 - Add pedit action with LAYERED_OP tcp set dport, sport & flags fields ok 67 f1c8 - Add pedit action with LAYERED_OP udp set dport & sport ok 68 d784 - Add pedit action with mixed RAW/LAYERED_OP #1 ok 69 70ca - Add pedit action with mixed RAW/LAYERED_OP #2 ==================== Link: https://lore.kernel.org/r/20230131190512.3805897-1-pctammela@mojatatu.com Signed-off-by: Paolo Abeni commit 95b069382351826c0ae37938070aa82dbeaf288d Author: Pedro Tammela Date: Tue Jan 31 16:05:12 2023 -0300 net/sched: simplify tcf_pedit_act Remove the check for a negative number of keys as this cannot ever happen Reviewed-by: Jamal Hadi Salim Reviewed-by: Simon Horman Signed-off-by: Pedro Tammela Signed-off-by: Paolo Abeni commit 52cf89f78c01bf39973f3e70d366921d70faff7a Author: Pedro Tammela Date: Tue Jan 31 16:05:11 2023 -0300 net/sched: transition act_pedit to rcu and percpu stats The software pedit action didn't get the same love as some of the other actions and it's still using spinlocks and shared stats in the datapath. Transition the action to rcu and percpu stats as this improves the action's performance dramatically on multiple cpu deployments. Reviewed-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Reviewed-by: Simon Horman Signed-off-by: Paolo Abeni commit a8248fc4ad9b815c9345deb73873cc72a543d148 Merge: 609aa68d60965 550130a0ce303 Author: Paolo Abeni Date: Thu Feb 2 12:47:28 2023 +0100 Merge tag 'rxrpc-next-20230131' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== Here's the fifth part of patches in the process of moving rxrpc from doing a lot of its stuff in softirq context to doing it in an I/O thread in process context and thereby making it easier to support a larger SACK table. The full description is in the description for the first part[1] which is now upstream. The second and third parts are also upstream[2]. A subset of the original fourth part[3] got applied as a fix for a race[4]. The fifth part includes some cleanups: (1) Miscellaneous trace header cleanups: fix a trace string, display the security index in rx_packet rather than displaying the type twice, remove some whitespace to make checkpatch happier and remove some excess tabulation. (2) Convert ->recvmsg_lock to a spinlock as it's only ever locked exclusively. (3) Make ->ackr_window and ->ackr_nr_unacked non-atomic as they're only used in the I/O thread. (4) Don't use call->tx_lock to access ->tx_buffer as that is only accessed inside the I/O thread. sendmsg() loads onto ->tx_sendmsg and the I/O thread decants from that to the buffer. (5) Remove local->defrag_sem as DATA packets are transmitted serially by the I/O thread. (6) Remove the service connection bundle is it was only used for its channel_lock - which has now gone. And some more significant changes: (7) Add a debugging option to allow a delay to be injected into packet reception to help investigate the behaviour over longer links than just a few cm. (8) Generate occasional PING ACKs to probe for RTT information during a receive heavy call. (9) Simplify the SACK table maintenance and ACK generation. Now that both parts are done in the same thread, there's no possibility of a race and no need to try and be cunning to avoid taking a BH spinlock whilst copying the SACK table (which in the future will be up to 2K) and no need to rotate the copy to fit the ACK packet table. (10) Use SKB_CONSUMED when freeing received DATA packets (stop dropwatch complaining). * tag 'rxrpc-next-20230131' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: rxrpc: Kill service bundle rxrpc: Change rx_packet tracepoint to display securityIndex not type twice rxrpc: Show consumed and freed packets as non-dropped in dropwatch rxrpc: Remove local->defrag_sem rxrpc: Don't lock call->tx_lock to access call->tx_buffer rxrpc: Simplify ACK handling rxrpc: De-atomic call->ackr_window and call->ackr_nr_unacked rxrpc: Generate extra pings for RTT during heavy-receive call rxrpc: Allow a delay to be injected into packet reception rxrpc: Convert call->recvmsg_lock to a spinlock rxrpc: Shrink the tabulation in the rxrpc trace header a bit rxrpc: Remove whitespace before ')' in trace header rxrpc: Fix trace string ==================== Link: https://lore.kernel.org/all/20230131171227.3912130-1-dhowells@redhat.com/ Signed-off-by: Paolo Abeni commit 7c62a2279b9e88f2cbfa3b92dc49c8b7806c56f8 Author: Mauro Lima Date: Wed Feb 1 17:54:55 2023 -0300 spi: intel: Add support for controllers Add Device IDs to the module table for the following controllers: - 9da4 Cannon Lake 300 Series On-Package - a2a4 200 Series/Z370 Chipset Family SPI Controller - 9d24 Intel® 200 Series Chipset Family (Including Intel® X299), Intel® Z370 Intel® H310C,B365, also Intel® B460 and H410 Chipset Platform Controller Hub Signed-off-by: Mauro Lima Acked-by: Mika Westerberg Link: https://lore.kernel.org/r/20230201205455.550308-3-mauro.lima@eclypsium.com Signed-off-by: Mark Brown commit b4c58d540777124f31ab0cb37a14c6573438d381 Author: Mauro Lima Date: Wed Feb 1 17:54:54 2023 -0300 spi: intel: Fix device private data and PR_NUM for Broxton controllers Some private data fields have to change from bxt_info to cnl_info. Here is the list of Device IDs with the respective documentation taken for validation: 0xa0a4 - Intel® 500 Series Chipset Family On-Package PCH 0x02a4 - Intel® 400 Series Chipset Family On-Package PCH 0x06a4 - Intel® 400 Series Chipset Family Platform Controller Hub 0x34a4 - Intel® 495 Chipset Family On-Package 0xa3a4 - Intel® B460 and H410 Chipset According to documentation Broxton controller type has five PR registers. Signed-off-by: Mauro Lima Acked-by: Mika Westerberg Link: https://lore.kernel.org/r/20230201205455.550308-2-mauro.lima@eclypsium.com Signed-off-by: Mark Brown commit 2a096315be7d8ccad883203876c4b53e7b024f12 Author: Colin Ian King Date: Thu Feb 2 10:32:36 2023 +0000 ASoC: codecs: aw88395: Fix spelling mistake "cersion" -> "version" There are spelling mistakes in dev_err messages. Fix them. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20230202103236.270057-1-colin.i.king@gmail.com Signed-off-by: Mark Brown commit 5579a966229c3365d0e2c91e9a96fc40e293dffa Author: Mario Limonciello Date: Tue Jan 31 12:46:52 2023 -0600 ASoC: amd: ps: Add a module parameter to influence pdm_gain In case of regressions for any users that the new pdm_gain value is too high and for additional debugging, introduce a module parameter that would let them configure it. This parameter should be removed in the future: * If it's determined that the parameter is not needed, just hardcode the correct value as before * If users do end up using it to debug and report different values we should introduce a config knob that can have policy set by ucm. Signed-off-by: Mario Limonciello Reviewed-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20230131184653.10216-7-mario.limonciello@amd.com Signed-off-by: Mark Brown commit 99ecc7889bee68fdf377f328c21ad0f953f8b05e Author: Mario Limonciello Date: Tue Jan 31 12:46:51 2023 -0600 ASoC: amd: ps: Adjust the gain for PDM DMIC No issues have been reported yet for DMIC audio level on ps platforms, but as problems were found both on YC (Rembrandt) and Renoir based designs it's very likely they happen on ps too. Increase the PDM gain to solve this problem. Signed-off-by: Mario Limonciello Reviewed-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20230131184653.10216-6-mario.limonciello@amd.com Signed-off-by: Mark Brown commit b7d8d4ec80ee380a82d6748c1d4e9fd89ce6e595 Author: Mario Limonciello Date: Tue Jan 31 12:46:50 2023 -0600 ASoC: amd: renoir: Add a module parameter to influence pdm_gain In case of regressions for any users that the new pdm_gain value is too high and for additional debugging, introduce a module parameter that would let them configure it. This parameter should be removed in the future: * If it's determined that the parameter is not needed, just hardcode the correct value as before * If users do end up using it to debug and report different values we should introduce a config knob that can have policy set by ucm. Signed-off-by: Mario Limonciello Reviewed-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20230131184653.10216-5-mario.limonciello@amd.com Signed-off-by: Mark Brown commit 47dc601a067d9a79989310c8a1f93ea390ae9ead Author: Mario Limonciello Date: Tue Jan 31 12:46:49 2023 -0600 ASoC: amd: renoir: Adjust the gain for PDM DMIC A similar issue that was reported on Rembrandt based laptops with low DMIC volume is also being reported for Barcelo based laptops that use renoir acp3x. Increase the PDM gain to overcome this problem. Signed-off-by: Mario Limonciello Reviewed-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20230131184653.10216-4-mario.limonciello@amd.com Signed-off-by: Mark Brown commit 02ea45d10fab99040c87d0267656930accb91e3c Author: Mario Limonciello Date: Tue Jan 31 12:46:48 2023 -0600 ASoC: amd: yc: Add a module parameter to influence pdm_gain In case of regressions for any users that the new pdm_gain value is too high and for additional debugging, introduce a module parameter that would let them configure it. This parameter should be removed in the future: * If it's determined that the parameter is not needed, just hardcode the correct value as before * If users do end up using it to debug and report different values we should introduce a config knob that can have policy set by ucm. Signed-off-by: Mario Limonciello Reviewed-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20230131184653.10216-3-mario.limonciello@amd.com Signed-off-by: Mark Brown commit 6d6f62c868a8ad9c451c22f9f20f08a6149f8487 Author: Mario Limonciello Date: Tue Jan 31 12:46:47 2023 -0600 ASoC: amd: yc: Adjust the gain for PDM DMIC A number of users for Lenovo Rembrandt based laptops are reporting that the microphone is too quiet relative to Windows with a dual boot. Increase the PDM gain to overcome this problem. Signed-off-by: Mario Limonciello Reviewed-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20230131184653.10216-2-mario.limonciello@amd.com Signed-off-by: Mark Brown commit dd184c400e10295631e5742fc7318ba071c67007 Author: Peter Ujfalusi Date: Wed Feb 1 13:28:46 2023 +0200 ASoC: topology: Set correct unload callback for graph type Using the control_unload for graph type of elem will lead surprises on module unload. The correct callback to use is the dapm_route_unload. Fixes: 31e9273912bf ("ASoC: topology: Use unload() op directly") Signed-off-by: Peter Ujfalusi Reviewed-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230201112846.27707-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit afd7c141c750f3f043c755bd8d01a2ffee7e95b2 Author: Peter Ujfalusi Date: Wed Feb 1 13:28:45 2023 +0200 ASoC: SOF: topology: Add missed "else" in sof_connect_dai_widget The conversion to use generic helpers missed the else for the dai direction check which leads to failure when loading playback widgets Fixes: 323f09a61d43 ("ASoC: sof: use helper function") Signed-off-by: Peter Ujfalusi Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/20230201112846.27707-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 4bc32df7a9c387ea1a1b7336e2c7d44aa8cee9f4 Author: Ye Xingchen Date: Tue Jan 31 14:40:51 2023 +0800 selftests/bpf: Remove duplicate include header in xdp_hw_metadata The linux/net_tstamp.h is included more than once, thus clean it up. Signed-off-by: Ye Xingchen Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/202301311440516312161@zte.com.cn commit 6a9a733edd46732e906d976dc21a42dd361e53cc Author: Brian King Date: Wed Feb 1 13:57:38 2023 -0600 hvcs: Fix hvcs port reference counting The hvcs driver only ever gets two references to the port. One at initialization time, and one at install time. Remove the code that was trying to do multiple port puts for each open, which would result in more puts than gets. Signed-off-by: Brian King Link: https://lore.kernel.org/r/20230201195743.303163-2-brking@linux.vnet.ibm.com Signed-off-by: Greg Kroah-Hartman commit 8b79b34a66cd61769802255a2a6bdd446d4f93ca Author: Stanislav Fomichev Date: Wed Feb 1 15:36:40 2023 -0800 selftests/bpf: Don't refill on completion in xdp_metadata We only need to consume TX completion instead of refilling 'fill' ring. It's currently not an issue because we never RX more than 8 packets. Fixes: e2a46d54d7a1 ("selftests/bpf: Verify xdp_metadata xdp->af_xdp path") Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230201233640.367646-1-sdf@google.com commit 130c4dcbe8c79595a6ca2e69be9f01411201aa92 Author: Daniel Scally Date: Mon Jan 30 10:50:45 2023 +0000 usb: gadget: uvc: Disable interrupt endpoint by default The f_uvc code includes an interrupt endpoint against the VideoControl interface. According to section 2.4.2 of the UVC specification however this endpoint is optional in at least some cases: "This endpoint is optional, but may be mandatory under certain conditions" The conditions enumerated are whether... 1. The device supports hardware triggers 2. The device implements any AutoUpdate controls 3. The device implements any Asynchronous controls As all of those things are implementation dependent, this endpoint might be unnecessary for some users. Further to that it is unusable in the current implementation as there is no mechanism within the UVC gadget driver that allows data to be sent over that endpoint. Disable the interrupt endpoint by default, but check whether the user has asked for it to be enabled in configfs and continue to generate it if so. Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230130105045.120886-4-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit a36afe7804612c524396e59f9521ed06e39bf62c Author: Daniel Scally Date: Mon Jan 30 10:50:44 2023 +0000 usb: gadget: uvc: Add new enable_interrupt_ep attribute Add a new attribute to the default control config group that allows users to specify whether they want to enable the optional interrupt endpoint for the VideoControl interface. Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230130105045.120886-3-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 3078212cafaece5dfebc7bd57d8c395be7862a5c Author: Daniel Scally Date: Mon Jan 30 10:50:43 2023 +0000 usb: gadget: uvc: Rename uvc_control_ep The f_uvc code defines an endpoint named "uvc_control_ep" but it is configured with a non-zero endpoint address and has its bmAttributes flagged as USB_ENDPOINT_XFER_INT - this cannot be the VideoControl interface's control endpoint, as the default endpoint 0 is used for that purpose. This is instead the optional interrupt endpoint that can be contained by a VideoControl interface. There is also a Class-specific VC Interrupt Endpoint Descriptor and a SuperSpeed companion descriptor that are also for the VC interface's interrupt endpoint but are named as though they are for the control endpoint. Rename the variables to make that clear. Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230130105045.120886-2-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 1f6d59f7f82d3b0a629326c6d043273a84bfc61f Author: Jon Hunter Date: Tue Jan 31 17:57:48 2023 +0000 arm64: defconfig: Enable UCSI support Enable the TYPEC UCSI support and the Cypress UCSI driver that is used on the NVIDIA Jetson platforms. Signed-off-by: Jon Hunter Link: https://lore.kernel.org/r/20230131175748.256423-7-jonathanh@nvidia.com Signed-off-by: Greg Kroah-Hartman commit 430b38764fbb931c6dbd1af13c8b2e4508994662 Author: Wayne Chang Date: Tue Jan 31 17:57:46 2023 +0000 i2c: nvidia-gpu: Remove ccgx,firmware-build property Now the Cypress CCG driver has been updated to support the 'firmware-name' property to align with device-tree, remove the 'ccgx,firmware-build' property as this is no longer needed. Signed-off-by: Wayne Chang Signed-off-by: Jon Hunter Acked-by: Ajay Gupta Acked-by: Wolfram Sang Link: https://lore.kernel.org/r/20230131175748.256423-5-jonathanh@nvidia.com Signed-off-by: Greg Kroah-Hartman commit 6d9e0669099f59473799f529b3c19a55fa164c92 Author: Wayne Chang Date: Tue Jan 31 17:57:45 2023 +0000 usb: typec: ucsi_ccg: Add OF support Add device-tree support for the Cypress CCG UCSI driver. The device-tree binding for the Cypress CCG device uses the standard device-tree 'firmware-name' string property to indicate the firmware build that is used. The NVIDIA GPU I2C driver has been updated to use an ACPI string property that is also named 'firmware-build' and given that this was the only users of the 'ccgx,firmware-build' property, we can now remove support for this legacy property. Signed-off-by: Wayne Chang Co-developed-by: Jon Hunter Signed-off-by: Jon Hunter Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230131175748.256423-4-jonathanh@nvidia.com Signed-off-by: Greg Kroah-Hartman commit f510b0a3565b9231e828e23a7e0f9790b97edf96 Author: Wayne Chang Date: Tue Jan 31 17:57:44 2023 +0000 i2c: nvidia-gpu: Add ACPI property to align with device-tree Device-tree uses the 'firmware-name' string property to pass a name of the firmware build to the Cypress CCGx driver. Add a new ACPI string property to the NVIDIA GPU I2C driver to align with device-tree so that we can migrate to using a common property name for both ACPI and device-tree. Signed-off-by: Wayne Chang Co-developed-by: Jon Hunter Signed-off-by: Jon Hunter Reviewed-by: Heikki Krogerus Acked-by: Ajay Gupta Acked-by: Wolfram Sang Link: https://lore.kernel.org/r/20230131175748.256423-3-jonathanh@nvidia.com Signed-off-by: Greg Kroah-Hartman commit fb9a1b80e68b2a16ff41b644e2a2e559461c6440 Author: Wayne Chang Date: Tue Jan 31 17:57:43 2023 +0000 dt-bindings: usb: Add Cypress cypd4226 Type-C controller Add the device-tree binding documentation for Cypress cypd4226 dual Type-C controller. Signed-off-by: Wayne Chang Signed-off-by: Jon Hunter Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230131175748.256423-2-jonathanh@nvidia.com Signed-off-by: Greg Kroah-Hartman commit 89e7252d6c7e7eeb31971cd7df987316ecc64ff5 Author: Udipto Goswami Date: Wed Feb 1 18:53:08 2023 +0530 usb: gadget: configfs: Restrict symlink creation is UDC already binded During enumeration or composition switch,a userspace process agnostic of the conventions of configs can try to create function symlinks even after the UDC is bound to current config which is not correct. Potentially it can create duplicates within the current config. Prevent this by adding a check if udc_name already exists, then bail out of cfg_link. Following is an example: Step1: ln -s X1 ffs.a -->cfg_link --> usb_get_function(ffs.a) ->ffs_alloc CFG->FUNC_LIST: C->FUNCTION: Step2: echo udc.name > /config/usb_gadget/g1/UDC --> UDC_store ->composite_bind ->usb_add_function CFG->FUNC_LIST: C->FUNCTION: Step3: ln -s Y1 ffs.a -->cfg_link -->usb_get_function(ffs.a) ->ffs_alloc CFG->FUNC_LIST: C->FUNCTION: both the lists corresponds to the same function instance ffs.a but the usb_function* pointer is different because in step 3 ffs_alloc has created a new reference to usb_function* for ffs.a and added it to cfg_list. Step4: Now a composition switch involving is executed. the composition switch will involve 3 things: 1. unlinking the previous functions existing 2. creating new symlinks 3. writing UDC However, the composition switch is generally taken care by userspace process which creates the symlinks in its own nomenclature(X*) and removes only those. So it won't be able to remove Y1 which user had created by own. Due to this the new symlinks cannot be created for ffs.a since the entry already exists in CFG->FUNC_LIST. The state of the CFG->FUNC_LIST is as follows: CFG->FUNC_LIST: Fixes: 88af8bbe4ef7 ("usb: gadget: the start of the configfs interface") Signed-off-by: Krishna Kurapati PSSNV Signed-off-by: Udipto Goswami Link: https://lore.kernel.org/r/20230201132308.31523-1-quic_ugoswami@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 196774960ba176f1f5a506dc6b5b51fd0b2e0e9b Author: Andre Przywara Date: Wed Feb 1 10:53:48 2023 +0000 usb: musb: sunxi: Introduce config struct Currently the probe routine explicitly compares the compatible string of the device node to figure out which features and quirks a certain Allwinner MUSB model requires. This gets harder to maintain for new SoCs. Add a struct sunxi_musb_cfg that names the features and quirks explicitly, and create instances of this struct for every type of MUSB device we support. Then bind this to the compatible strings via the OF data feature. Signed-off-by: Andre Przywara Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20230201105348.1815461-4-andre.przywara@arm.com Signed-off-by: Greg Kroah-Hartman commit d4b2c2852091c9e1c1fa03553e81f5712471578c Author: Icenowy Zheng Date: Wed Feb 1 10:53:47 2023 +0000 usb: musb: sunxi: add support for the F1C100s MUSB controller The suniv SoC has a MUSB controller like the one in A33, but with a SRAM region to be claimed. Add support for it. Signed-off-by: Icenowy Zheng Acked-by: Jernej Skrabec Signed-off-by: Andre Przywara Link: https://lore.kernel.org/r/20230201105348.1815461-3-andre.przywara@arm.com Signed-off-by: Greg Kroah-Hartman commit 56774e274574af8396d7b16618363aabe3a5582d Author: Icenowy Zheng Date: Wed Feb 1 10:53:46 2023 +0000 dt-bindings: usb: sunxi-musb: add F1C100s MUSB compatible string Allwinner F1C100s has a hybrid MUSB controller between the A10 one and the A33 one. Add a compatible string for it. Signed-off-by: Icenowy Zheng Acked-by: Krzysztof Kozlowski Reviewed-by: Samuel Holland Signed-off-by: Andre Przywara Link: https://lore.kernel.org/r/20230201105348.1815461-2-andre.przywara@arm.com Signed-off-by: Greg Kroah-Hartman commit ec5499d338ece9db9b7590649d3cfcc4d7f9603d Author: Arnd Bergmann Date: Tue Jan 31 16:04:31 2023 +0100 xhci: split out rcar/rz support from xhci-plat.c The USB_XHCI_RZV2M and USB_RENESAS_USB3 select other drivers based on the enabled SoC types, which leads to build failures when the dependencies are not met: WARNING: unmet direct dependencies detected for USB_RZV2M_USB3DRD Depends on [n]: USB_SUPPORT [=y] && USB_GADGET [=n] && (ARCH_R9A09G011 [=n] || COMPILE_TEST [=y]) Selected by [m]: - USB_XHCI_RZV2M [=m] && USB_SUPPORT [=y] && USB [=y] && USB_XHCI_HCD [=m] && USB_XHCI_PLATFORM [=m] && (ARCH_R9A09G011 [=n] || COMPILE_TEST [=y]) ERROR: modpost: "rzv2m_usb3drd_reset" [drivers/usb/host/xhci-plat-hcd.ko] undefined! The xhci-rcar driver has a reverse dependency with the xhci core, and it depends on the UDC driver in turn. To untangle this, make the xhci-rcar.ko driver a standalone module that just calls into the xhci-plat.ko module like other drivers do. This allows handling the dependency on the USB_RZV2M_USB3DRD driver to only affect the xhci-rcar module and simplify the xhci-plat module. It also allows leaving out the hacks for broken dma mask and nested devices from the rcar side and keep that only in the generic xhci driver. As a future cleanup, the marvell and dwc3 specific bits of xhci-plat.c could be moved out as well, but that is not required for this bugfix. Fixes: c52c9acc415e ("xhci: host: Add Renesas RZ/V2M SoC support") Signed-off-by: Arnd Bergmann Tested-by: Biju Das Link: https://lore.kernel.org/r/20230131150531.12347-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman commit ba883de971d1ad018f3083d9195b8abe54d87407 Author: Dan Carpenter Date: Tue Jan 24 18:20:46 2023 +0300 usb: musb: mediatek: don't unregister something that wasn't registered This function only calls mtk_otg_switch_init() when the ->port_mode is MUSB_OTG so the clean up code should only call mtk_otg_switch_exit() for that mode. Fixes: 0990366bab3c ("usb: musb: Add support for MediaTek musb controller") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/Y8/3TqpqiSr0RxFH@kili Signed-off-by: Greg Kroah-Hartman commit 5cdc03c5cf471a215c57e540cc86be613c0ba457 Author: Longlong Xia Date: Thu Feb 2 03:32:01 2023 +0000 devtmpfs: convert to pr_fmt Use the pr_fmt() macro to prefix all the output with "devtmpfs: ". while at it, convert printk() to pr_(). Signed-off-by: Longlong Xia Link: https://lore.kernel.org/r/20230202033203.1239239-2-xialonglong1@huawei.com Signed-off-by: Greg Kroah-Hartman commit 2e539b735d8683097846b486c0fb093da5f27fbb Author: Tom Rix Date: Wed Jan 25 13:26:31 2023 -0800 gpio: tegra186: remove unneeded loop in tegra186_gpio_init_route_mapping() Reviewing the j loop over num_irqs_per_bank, in the code previous to the fixes: commit, every j was used. now only when j == 0. If only j == 0 is used, there is no need for the loop. Fixes: 210386804745 ("gpio: tegra186: Support multiple interrupts per bank") Signed-off-by: Tom Rix Acked-by: Thierry Reding Signed-off-by: Bartosz Golaszewski commit e9b71eb1b2405ec2484fbf4844de5cbfd53106bc Merge: 820ba9aa336e5 137272ef1b0f1 Author: Dave Airlie Date: Thu Feb 2 18:17:16 2023 +1000 Merge tag 'mediatek-drm-next-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-next Mediatek DRM Next for Linux 6.3 1. Reduce the time of dsi from LP11 to sending cmd 2. Remove dependency on GEM DMA helper 3. Drop unbalanced obj unref 4. Fix the fallback for mediatek,mt8186-disp-ccorr 5. Fixup for error path. Signed-off-by: Dave Airlie From: Chun-Kuang Hu Link: https://patchwork.freedesktop.org/patch/msgid/20230130125811.2567-1-chunkuang.hu@kernel.org commit ef42520240aacfc0d46c8d780c051d135a8dc9b7 Author: Nikita Zhandarovich Date: Wed Feb 1 09:21:03 2023 -0800 RDMA/cxgb4: add null-ptr-check after ip_dev_find() ip_dev_find() may return NULL and assign it to pdev which is dereferenced later. Fix this by checking the return value of ip_dev_find() for NULL similar to the way it is done with other instances of said function. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 1cab775c3e75 ("RDMA/cxgb4: Fix LE hash collision bug for passive open connection") Signed-off-by: Nikita Zhandarovich Link: https://lore.kernel.org/r/20230201172103.17261-1-n.zhandarovich@fintech.ru Signed-off-by: Leon Romanovsky commit 820ba9aa336e5b6bbf6ef0163ec907883f3590ca Merge: aebd8f0c6f828 1a1ce789e6c5d Author: Dave Airlie Date: Thu Feb 2 17:09:13 2023 +1000 Merge tag 'exynos-drm-next-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next One fixup series - Make sure to restore bridge chain order by enabling the drm panel prepare_prev_first flag of the bridge and panel drivers - tc358764 display bridge device and Samsung s6e3ha2/s6e63j0x03/s6e8aa0 panel devices. In case of any boards using Exynos5433 SoC, below Display pipeline could be configured. Decon -> MIC -> MIPI-DSI -> Panel So, this patch series makes sure to enable previous bridge device before enabling MIPI-DSI device. Signed-off-by: Dave Airlie From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/20230130051055.15340-1-inki.dae@samsung.com commit 609aa68d60965f70485655def733d533f99b341b Author: Sunil Goutham Date: Wed Feb 1 09:33:01 2023 +0530 octeontx2-af: Removed unnecessary debug messages. NPC exact match feature is supported only on one silicon variant, removed debug messages which print that this feature is not available on all other silicon variants. Signed-off-by: Sunil Goutham Signed-off-by: Ratheesh Kannoth Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20230201040301.1034843-1-rkannoth@marvell.com Signed-off-by: Jakub Kicinski commit 981f14d42a7f1610292a1ef0f7cd00138fff361d Author: Heng Qi Date: Tue Jan 31 16:50:04 2023 +0800 virtio-net: fix possible unsigned integer overflow When the single-buffer xdp is loaded and after xdp_linearize_page() is called, *num_buf becomes 0 and (*num_buf - 1) may overflow into a large integer in virtnet_build_xdp_buff_mrg(), resulting in unexpected packet dropping. Fixes: ef75cb51f139 ("virtio-net: build xdp_buff with multi buffers") Signed-off-by: Heng Qi Reviewed-by: Xuan Zhuo Signed-off-by: Michael S. Tsirkin Link: https://lore.kernel.org/r/20230131085004.98687-1-hengqi@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 028fb19c6ba743ed308ba99ac325afa968795e0f Author: Leon Romanovsky Date: Tue Jan 31 15:31:57 2023 +0200 netlink: provide an ability to set default extack message In netdev common pattern, extack pointer is forwarded to the drivers to be filled with error message. However, the caller can easily overwrite the filled message. Instead of adding multiple "if (!extack->_msg)" checks before any NL_SET_ERR_MSG() call, which appears after call to the driver, let's add new macro to common code. [1] https://lore.kernel.org/all/Y9Irgrgf3uxOjwUm@unreal Reviewed-by: Simon Horman Reviewed-by: Nikolay Aleksandrov Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/6993fac557a40a1973dfa0095107c3d03d40bec1.1675171790.git.leon@kernel.org Signed-off-by: Jakub Kicinski commit 62e395f82d04510b0f86e5e603e29412be88596f Author: Brian Haley Date: Mon Jan 30 12:14:28 2023 -0500 neighbor: fix proxy_delay usage when it is zero When set to zero, the neighbor sysctl proxy_delay value does not cause an immediate reply for ARP/ND requests as expected, it instead causes a random delay between [0, U32_MAX). Looking at this comment from __get_random_u32_below() explains the reason: /* * This function is technically undefined for ceil == 0, and in fact * for the non-underscored constant version in the header, we build bug * on that. But for the non-constant case, it's convenient to have that * evaluate to being a straight call to get_random_u32(), so that * get_random_u32_inclusive() can work over its whole range without * undefined behavior. */ Added helper function that does not call get_random_u32_below() if proxy_delay is zero and just uses the current value of jiffies instead, causing pneigh_enqueue() to respond immediately. Also added definition of proxy_delay to ip-sysctl.txt since it was missing. Signed-off-by: Brian Haley Link: https://lore.kernel.org/r/20230130171428.367111-1-haleyb.dev@gmail.com Signed-off-by: Jakub Kicinski commit 983f507c3043e90b2c6429cd67903c4ca8208b5c Merge: d8673afbf5103 b1a78b9b98862 Author: Jakub Kicinski Date: Wed Feb 1 20:54:29 2023 -0800 Merge branch 'net-support-ipv4-big-tcp' Xin Long says: ==================== net: support ipv4 big tcp This is similar to the BIG TCP patchset added by Eric for IPv6: https://lwn.net/Articles/895398/ Different from IPv6, IPv4 tot_len is 16-bit long only, and IPv4 header doesn't have exthdrs(options) for the BIG TCP packets' length. To make it simple, as David and Paolo suggested, we set IPv4 tot_len to 0 to indicate this might be a BIG TCP packet and use skb->len as the real IPv4 total length. This will work safely, as all BIG TCP packets are GSO/GRO packets and processed on the same host as they were created; There is no padding in GSO/GRO packets, and skb->len - network_offset is exactly the IPv4 packet total length; Also, before implementing the feature, all those places that may get iph tot_len from BIG TCP packets are taken care with some new APIs: Patch 1 adds some APIs for iph tot_len setting and getting, which are used in all these places where IPv4 BIG TCP packets may reach in Patch 2-7, Patch 8 adds a GSO_TCP tp_status for af_packet users, and Patch 9 add new netlink attributes to make IPv4 BIG TCP independent from IPv6 BIG TCP on configuration, and Patch 10 implements this feature. Note that the similar change as in Patch 2-6 are also needed for IPv6 BIG TCP packets, and will be addressed in another patchset. The similar performance test is done for IPv4 BIG TCP with 25Gbit NIC and 1.5K MTU: No BIG TCP: for i in {1..10}; do netperf -t TCP_RR -H 192.168.100.1 -- -r80000,80000 -O MIN_LATENCY,P90_LATENCY,P99_LATENCY,THROUGHPUT|tail -1; done 168 322 337 3776.49 143 236 277 4654.67 128 258 288 4772.83 171 229 278 4645.77 175 228 243 4678.93 149 239 279 4599.86 164 234 268 4606.94 155 276 289 4235.82 180 255 268 4418.95 168 241 249 4417.82 Enable BIG TCP: ip link set dev ens1f0np0 gro_ipv4_max_size 128000 gso_ipv4_max_size 128000 for i in {1..10}; do netperf -t TCP_RR -H 192.168.100.1 -- -r80000,80000 -O MIN_LATENCY,P90_LATENCY,P99_LATENCY,THROUGHPUT|tail -1; done 161 241 252 4821.73 174 205 217 5098.28 167 208 220 5001.43 164 228 249 4883.98 150 233 249 4914.90 180 233 244 4819.66 154 208 219 5004.92 157 209 247 4999.78 160 218 246 4842.31 174 206 217 5080.99 Thanks for the feedback from Eric and David Ahern. ==================== Link: https://lore.kernel.org/r/cover.1674921359.git.lucien.xin@gmail.com Signed-off-by: Jakub Kicinski commit b1a78b9b98862cda167b643690e43662ea060625 Author: Xin Long Date: Sat Jan 28 10:58:39 2023 -0500 net: add support for ipv4 big tcp Similar to Eric's IPv6 BIG TCP, this patch is to enable IPv4 BIG TCP. Firstly, allow sk->sk_gso_max_size to be set to a value greater than GSO_LEGACY_MAX_SIZE by not trimming gso_max_size in sk_trim_gso_size() for IPv4 TCP sockets. Then on TX path, set IP header tot_len to 0 when skb->len > IP_MAX_MTU in __ip_local_out() to allow to send BIG TCP packets, and this implies that skb->len is the length of a IPv4 packet; On RX path, use skb->len as the length of the IPv4 packet when the IP header tot_len is 0 and skb->len > IP_MAX_MTU in ip_rcv_core(). As the API iph_set_totlen() and skb_ip_totlen() are used in __ip_local_out() and ip_rcv_core(), we only need to update these APIs. Also in GRO receive, add the check for ETH_P_IP/IPPROTO_TCP, and allows the merged packet size >= GRO_LEGACY_MAX_SIZE in skb_gro_receive(). In GRO complete, set IP header tot_len to 0 when the merged packet size greater than IP_MAX_MTU in iph_set_totlen() so that it can be processed on RX path. Note that by checking skb_is_gso_tcp() in API iph_totlen(), it makes this implementation safe to use iph->len == 0 indicates IPv4 BIG TCP packets. Signed-off-by: Xin Long Reviewed-by: David Ahern Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit 9eefedd58ae1daece2ba907849a44db2941fb4b0 Author: Xin Long Date: Sat Jan 28 10:58:38 2023 -0500 net: add gso_ipv4_max_size and gro_ipv4_max_size per device This patch introduces gso_ipv4_max_size and gro_ipv4_max_size per device and adds netlink attributes for them, so that IPV4 BIG TCP can be guarded by a separate tunable in the next patch. To not break the old application using "gso/gro_max_size" for IPv4 GSO packets, this patch updates "gso/gro_ipv4_max_size" in netif_set_gso/gro_max_size() if the new size isn't greater than GSO_LEGACY_MAX_SIZE, so that nothing will change even if userspace doesn't realize the new netlink attributes. Signed-off-by: Xin Long Reviewed-by: David Ahern Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit 8e08bb75b60f7f9ed319185cef80188b87d9b43a Author: Xin Long Date: Sat Jan 28 10:58:37 2023 -0500 packet: add TP_STATUS_GSO_TCP for tp_status Introduce TP_STATUS_GSO_TCP tp_status flag to tell the af_packet user that this is a TCP GSO packet. When parsing IPv4 BIG TCP packets in tcpdump/libpcap, it can use tp_len as the IPv4 packet len when this flag is set, as iph tot_len is set to 0 for IPv4 BIG TCP packets. Signed-off-by: Xin Long Reviewed-by: David Ahern Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit 50e6fb5c6efb2b33b15ea490dfe355cb312f6eb5 Author: Xin Long Date: Sat Jan 28 10:58:36 2023 -0500 ipvlan: use skb_ip_totlen in ipvlan_get_L3_hdr ipvlan devices calls netif_inherit_tso_max() to get the tso_max_size/segs from the lower device, so when lower device supports BIG TCP, the ipvlan devices support it too. We also should consider its iph tot_len accessing. Signed-off-by: Xin Long Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit 7eb072be41ba4d8ecea17092dece50c7375d8980 Author: Xin Long Date: Sat Jan 28 10:58:35 2023 -0500 cipso_ipv4: use iph_set_totlen in skbuff_setattr It may process IPv4 TCP GSO packets in cipso_v4_skbuff_setattr(), so the iph->tot_len update should use iph_set_totlen(). Note that for these non GSO packets, the new iph tot_len with extra iph option len added may become greater than 65535, the old process will cast it and set iph->tot_len to it, which is a bug. In theory, iph options shouldn't be added for these big packets in here, a fix may be needed here in the future. For now this patch is only to set iph->tot_len to 0 when it happens. Signed-off-by: Xin Long Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit a13fbf5ed5b4fc9095f12e955ca3a59b5507ff01 Author: Xin Long Date: Sat Jan 28 10:58:34 2023 -0500 netfilter: use skb_ip_totlen and iph_totlen There are also quite some places in netfilter that may process IPv4 TCP GSO packets, we need to replace them too. In length_mt(), we have to use u_int32_t/int to accept skb_ip_totlen() return value, otherwise it may overflow and mismatch. This change will also help us add selftest for IPv4 BIG TCP in the following patch. Note that we don't need to replace the one in tcpmss_tg4(), as it will return if there is data after tcphdr in tcpmss_mangle_packet(). The same in mangle_contents() in nf_nat_helper.c, it returns false when skb->len + extra > 65535 in enlarge_skb(). Signed-off-by: Xin Long Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit 043e397e48c58b4442ea5124dc1bdc95367a0a33 Author: Xin Long Date: Sat Jan 28 10:58:33 2023 -0500 net: sched: use skb_ip_totlen and iph_totlen There are 1 action and 1 qdisc that may process IPv4 TCP GSO packets and access iph->tot_len, replace them with skb_ip_totlen() and iph_totlen() accordingly. Note that we don't need to replace the one in tcf_csum_ipv4(), as it will return for TCP GSO packets in tcf_csum_ipv4_tcp(). Signed-off-by: Xin Long Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit ec84c955a0d06cef31664bae328d94be7a3e2f03 Author: Xin Long Date: Sat Jan 28 10:58:32 2023 -0500 openvswitch: use skb_ip_totlen in conntrack IPv4 GSO packets may get processed in ovs_skb_network_trim(), and we need to use skb_ip_totlen() to get iph totlen. Signed-off-by: Xin Long Reviewed-by: Aaron Conole Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit 46abd17302ba6be2e06818088e40a568e8f9e7af Author: Xin Long Date: Sat Jan 28 10:58:31 2023 -0500 bridge: use skb_ip_totlen in br netfilter These 3 places in bridge netfilter are called on RX path after GRO and IPv4 TCP GSO packets may come through, so replace iph tot_len accessing with skb_ip_totlen() in there. Signed-off-by: Xin Long Reviewed-by: Nikolay Aleksandrov Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit 058a8f7f73aae1cc22b53fcefec031b9e391b54d Author: Xin Long Date: Sat Jan 28 10:58:30 2023 -0500 net: add a couple of helpers for iph tot_len This patch adds three APIs to replace the iph->tot_len setting and getting in all places where IPv4 BIG TCP packets may reach, they will be used in the following patches. Note that iph_totlen() will be used when iph is not in linear data of the skb. Signed-off-by: Xin Long Reviewed-by: David Ahern Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit d8673afbf51036ed1d72d9828d0d679035bb0d54 Merge: ca3daf437d9c2 9f62d221a4b0a Author: Jakub Kicinski Date: Wed Feb 1 20:53:06 2023 -0800 Merge branch 'virtio_net-vdpa-update-mac-address-when-it-is-generated-by-virtio-net' Laurent Vivier says: ==================== virtio_net: vdpa: update MAC address when it is generated by virtio-net When the MAC address is not provided by the vdpa device virtio_net driver assigns a random one without notifying the device. The consequence, in the case of mlx5_vdpa, is the internal routing tables of the device are not updated and this can block the communication between two namespaces. To fix this problem, use virtnet_send_command(VIRTIO_NET_CTRL_MAC) to set the address from virtnet_probe() when the MAC address is not provided by the device. ==================== Link: https://lore.kernel.org/r/20230127204500.51930-1-lvivier@redhat.com Signed-off-by: Jakub Kicinski commit 9f62d221a4b0aa6a8d2a18053a0ca349c025297c Author: Laurent Vivier Date: Fri Jan 27 21:45:00 2023 +0100 virtio_net: notify MAC address change on device initialization In virtnet_probe(), if the device doesn't provide a MAC address the driver assigns a random one. As we modify the MAC address we need to notify the device to allow it to update all the related information. The problem can be seen with vDPA and mlx5_vdpa driver as it doesn't assign a MAC address by default. The virtio_net device uses a random MAC address (we can see it with "ip link"), but we can't ping a net namespace from another one using the virtio-vdpa device because the new MAC address has not been provided to the hardware: RX packets are dropped since they don't go through the receive filters, TX packets go through unaffected. Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin Signed-off-by: Jakub Kicinski commit 7c06458c102ee66068c03780527fcfc9b954ad91 Author: Laurent Vivier Date: Fri Jan 27 21:44:59 2023 +0100 virtio_net: disable VIRTIO_NET_F_STANDBY if VIRTIO_NET_F_MAC is not set failover relies on the MAC address to pair the primary and the standby devices: "[...] the hypervisor needs to enable VIRTIO_NET_F_STANDBY feature on the virtio-net interface and assign the same MAC address to both virtio-net and VF interfaces." Documentation/networking/net_failover.rst This patch disables the STANDBY feature if the MAC address is not provided by the hypervisor. Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin Signed-off-by: Jakub Kicinski commit ca3daf437d9c261ca498f518090c3ddbf1bf824f Author: Huayu Chen Date: Tue Jan 31 17:30:33 2023 +0100 nfp: correct cleanup related to DCB resources This patch corrects two oversights relating to releasing resources and DCB initialisation. 1. If mapping of the dcbcfg_tbl area fails: an error should be propagated, allowing partial initialisation (probe) to be unwound. 2. Conversely, if where dcbcfg_tbl is successfully mapped: it should be unmapped in nfp_nic_dcb_clean() which is called via various error cleanup paths, and shutdown or removal of the PCIE device. Fixes: 9b7fe8046d74 ("nfp: add DCB IEEE support") Signed-off-by: Huayu Chen Reviewed-by: Niklas Söderlund Signed-off-by: Simon Horman Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20230131163033.981937-1-simon.horman@corigine.com Signed-off-by: Jakub Kicinski commit bc61761394ce0f0cc35c6fc60426f08d83d0d488 Author: Jiapeng Chong Date: Tue Jan 31 14:34:56 2023 +0800 ipv6: ICMPV6: 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. ./net/ipv6/icmp.c:344:25-26: WARNING opportunity for swap(). Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3896 Signed-off-by: Jiapeng Chong Reviewed-by: Simon Horman Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20230131063456.76302-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 9daca9a5b9ac35361ce2d8d5ec10b19b7048d6cd Merge: 75ab93a244a51 03966594e1170 Author: Palmer Dabbelt Date: Tue Jan 31 23:30:07 2023 -0800 Merge patch series "riscv: improve boot time isa extensions handling" Jisheng Zhang says: Generally, riscv ISA extensions are fixed for any specific hardware platform, so a hart's features won't change after booting, this chacteristic makes it straightforward to use a static branch to check a specific ISA extension is supported or not to optimize performance. However, some ISA extensions such as SVPBMT and ZICBOM are handled via. the alternative sequences. Basically, for ease of maintenance, we prefer to use static branches in C code, but recently, Samuel found that the static branch usage in cpu_relax() breaks building with CONFIG_CC_OPTIMIZE_FOR_SIZE[1]. As Samuel pointed out, "Having a static branch in cpu_relax() is problematic because that function is widely inlined, including in some quite complex functions like in the VDSO. A quick measurement shows this static branch is responsible by itself for around 40% of the jump table." Samuel's findings pointed out one of a few downsides of static branches usage in C code to handle ISA extensions detected at boot time: static branch's metadata in the __jump_table section, which is not discarded after ISA extensions are finalized, wastes some space. I want to try to solve the issue for all possible dynamic handling of ISA extensions at boot time. Inspired by Mark[2], this patch introduces riscv_has_extension_*() helpers, which work like static branches but are patched using alternatives, thus the metadata can be freed after patching. [1]https://lore.kernel.org/linux-riscv/20220922060958.44203-1-samuel@sholland.org/ [2]https://lore.kernel.org/linux-arm-kernel/20220912162210.3626215-8-mark.rutland@arm.com/ [3]https://lore.kernel.org/linux-riscv/20221130225614.1594256-1-heiko@sntech.de/ * b4-shazam-merge: riscv: remove riscv_isa_ext_keys[] array and related usage riscv: KVM: Switch has_svinval() to riscv_has_extension_unlikely() riscv: cpu_relax: switch to riscv_has_extension_likely() riscv: alternative: patch alternatives in the vDSO riscv: switch to relative alternative entries riscv: module: Add ADD16 and SUB16 rela types riscv: module: move find_section to module.h riscv: fpu: switch has_fpu() to riscv_has_extension_likely() riscv: introduce riscv_has_extension_[un]likely() riscv: cpufeature: extend riscv_cpufeature_patch_func to all ISA extensions riscv: hwcap: make ISA extension ids can be used in asm riscv: cpufeature: detect RISCV_ALTERNATIVES_EARLY_BOOT earlier riscv: move riscv_noncoherent_supported() out of ZICBOM probe Link: https://lore.kernel.org/r/20230128172856.3814-1-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit 30343221132430c24b468493c861f71e2bad131f Author: Ajit Khaparde Date: Mon Dec 12 10:36:29 2022 -0800 bnxt_en: Remove runtime interrupt vector allocation Modified the bnxt_en code to create and pre-configure RDMA devices with the right MSI-X vector count for the ROCE driver to use. This is to align the ROCE driver to the auxiliary device model which will simply bind the driver without getting into PCI-related handling. All PCI-related logic will now be in the bnxt_en driver. Suggested-by: Leon Romanovsky Signed-off-by: Ajit Khaparde Reviewed-by: Leon Romanovsky commit a43c26fa2e6ca724360927856c326ebd3247b843 Author: Ajit Khaparde Date: Tue Dec 6 13:29:46 2022 -0800 RDMA/bnxt_re: Remove the sriov config callback Remove the SRIOV config callback which the bnxt_en was calling to reconfigure the chip resources for a PF device when VFs are created. The code is now modified to provision the VF resources based on the total VF count instead of the actual VF count. This allows the SRIOV config callback to be removed from the list of ulp_ops. Suggested-by: Leon Romanovsky Signed-off-by: Ajit Khaparde Reviewed-by: Leon Romanovsky commit 848dc857c8dee61972abdb05ce81f12f0d0e05e4 Author: Hongguang Gao Date: Fri Oct 14 16:31:31 2022 -0700 bnxt_en: Remove struct bnxt access from RoCE driver Decouple RoCE driver from directly accessing L2's private bnxt structure. Move the fields needed by RoCE driver into bnxt_en_dev. They'll be passed to RoCE driver by bnxt_rdma_aux_device_add() function. Signed-off-by: Hongguang Gao Signed-off-by: Ajit Khaparde Reviewed-by: Andy Gospodarek Reviewed-by: Selvin Xavier Reviewed-by: Leon Romanovsky commit 3b65e9456c29217429158203bfdce4361f45e0be Author: Ajit Khaparde Date: Wed Sep 7 13:22:42 2022 -0700 bnxt_en: Use auxiliary bus calls over proprietary calls Wherever possible use the function ops provided by auxiliary bus instead of using proprietary ops. Defined bnxt_re_suspend and bnxt_re_resume calls which can be invoked by the bnxt_en driver instead of the ULP stop/start calls. Signed-off-by: Ajit Khaparde Reviewed-by: Andy Gospodarek Reviewed-by: Selvin Xavier Reviewed-by: Leon Romanovsky commit 63669ab384eadebefd1e2a60a15a5431ee874fab Author: Ajit Khaparde Date: Mon Sep 5 17:16:51 2022 -0700 bnxt_en: Use direct API instead of indirection For a single ULP user there is no need for complicating function indirection calls. Remove all this complexity in favour of direct function calls exported by the bnxt_en driver. This allows to simplify the code greatly. Also remove unused ulp_async_notifier. Suggested-by: Leon Romanovsky Signed-off-by: Ajit Khaparde Reviewed-by: Andy Gospodarek Reviewed-by: Selvin Xavier Reviewed-by: Leon Romanovsky commit dafcdf5e2bd0bba594a51fe335694d4b44d8b8da Author: Ajit Khaparde Date: Thu Sep 1 16:43:46 2022 -0700 bnxt_en: Remove usage of ulp_id Since the driver continues to use the single ULP model, the extra complexity and indirection is unnecessary. Remove the usage of ulp_id from the code. Suggested-by: Leon Romanovsky Signed-off-by: Ajit Khaparde Reviewed-by: Andy Gospodarek Reviewed-by: Selvin Xavier Reviewed-by: Leon Romanovsky commit 6d758147c7b80a46465f72e9e6294d244ee98a21 Author: Ajit Khaparde Date: Fri Oct 14 14:18:04 2022 -0700 RDMA/bnxt_re: Use auxiliary driver interface Use auxiliary driver interface for driver load, unload ROCE driver. The driver does not need to register the interface using the netdev notifier anymore. Removed the bnxt_re_dev_list which is not needed. Currently probe, remove and shutdown ops have been implemented for the auxiliary device. Also remove exccessve validation checks for rdev. Signed-off-by: Ajit Khaparde Reviewed-by: Andy Gospodarek Reviewed-by: Selvin Xavier Reviewed-by: Leon Romanovsky commit d80d88b0dfff5829ab31030692672ba6fe9cde48 Author: Ajit Khaparde Date: Sun Mar 6 20:01:30 2022 -0800 bnxt_en: Add auxiliary driver support Add auxiliary driver support. An auxiliary device will be created if the hardware indicates support for RDMA. The bnxt_ulp_probe() function has been removed and a new bnxt_rdma_aux_device_add() function has been added. The bnxt_free_msix_vecs() and bnxt_req_msix_vecs() will now hold the RTNL lock when they call the bnxt_close_nic()and bnxt_open_nic() since the device close and open need to be protected under RTNL lock. The operations between the bnxt_en and bnxt_re will be protected using the en_ops_lock. This will be used by the bnxt_re driver in a follow-on patch to create ROCE interfaces. Signed-off-by: Ajit Khaparde Reviewed-by: Andy Gospodarek Reviewed-by: Selvin Xavier Reviewed-by: Leon Romanovsky commit a1ab12856f27f37465daf640dce8df044ecbc64b Author: Adrian Hunter Date: Tue Jan 31 15:16:23 2023 +0200 perf symbols: Allow for static executables with .plt A statically linked executable can have a .plt due to IFUNCs, in which case .symtab is used not .dynsym. Check the section header link to see if that is the case, and then use symtab instead. Example: Before: $ cat tstifunc.c #include void thing1(void) { printf("thing1\n"); } void thing2(void) { printf("thing2\n"); } typedef void (*thing_fn_t)(void); thing_fn_t thing_ifunc(void) { int x; if (x & 1) return thing2; return thing1; } void thing(void) __attribute__ ((ifunc ("thing_ifunc"))); int main() { thing(); return 0; } $ gcc --version gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ gcc -static -Wall -Wextra -Wno-uninitialized -o tstifuncstatic tstifunc.c $ readelf -SW tstifuncstatic | grep 'Name\|plt\|dyn' [Nr] Name Type Address Off Size ES Flg Lk Inf Al [ 4] .rela.plt RELA 00000000004002e8 0002e8 000258 18 AI 29 20 8 [ 6] .plt PROGBITS 0000000000401020 001020 000190 00 AX 0 0 16 [20] .got.plt PROGBITS 00000000004c5000 0c4000 0000e0 08 WA 0 0 8 $ perf record -e intel_pt//u --filter 'filter main @ ./tstifuncstatic' ./tstifuncstatic thing1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.008 MB perf.data ] $ perf script --itrace=be --ns -F+flags,-event,+addr,-period,-comm,-tid,-cpu,-dso 15786.690189535: tr strt 0 [unknown] => 4017cd main+0x0 15786.690189535: tr end call 4017d5 main+0x8 => 401170 [unknown] 15786.690197660: tr strt 0 [unknown] => 4017da main+0xd 15786.690197660: tr end return 4017e0 main+0x13 => 401c1a __libc_start_call_main+0x6a After: $ perf script --itrace=be --ns -F+flags,-event,+addr,-period,-comm,-tid,-cpu,-dso 15786.690189535: tr strt 0 [unknown] => 4017cd main+0x0 15786.690189535: tr end call 4017d5 main+0x8 => 401170 thing_ifunc@plt+0x0 15786.690197660: tr strt 0 [unknown] => 4017da main+0xd 15786.690197660: tr end return 4017e0 main+0x13 => 401c1a __libc_start_call_main+0x6a Reviewed-by: Namhyung Kim Signed-off-by: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Link: https://lore.kernel.org/r/20230131131625.6964-8-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 60fbb3e49abe8421b677d5eee32fe7fb27b05e3b Author: Adrian Hunter Date: Tue Jan 31 15:16:22 2023 +0200 perf symbols: Allow for .plt without header A static executable can have a .plt due to the presence of IFUNCs. In that case the .plt does not have a header. Check for whether there is a header by comparing the number of entries to the number of relocation entries. Reviewed-by: Namhyung Kim Signed-off-by: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Link: https://lore.kernel.org/r/20230131131625.6964-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit b7dbc0be6e4f2a5268d76884d6651e29f95673ea Author: Adrian Hunter Date: Tue Jan 31 15:16:21 2023 +0200 perf symbols: Add support for IFUNC symbols for x86_64 For x86_64, the GNU linker is putting IFUNC information in the relocation addend, so use it to try to find a symbol for plt entries that refer to IFUNCs. Example: Before: $ cat tstpltlib.c void fn1(void) {} void fn2(void) {} void fn3(void) {} void fn4(void) {} $ cat tstpltifunc.c #include void thing1(void) { printf("thing1\n"); } void thing2(void) { printf("thing2\n"); } typedef void (*thing_fn_t)(void); thing_fn_t thing_ifunc(void) { int x; if (x & 1) return thing2; return thing1; } void thing(void) __attribute__ ((ifunc ("thing_ifunc"))); void fn1(void); void fn2(void); void fn3(void); void fn4(void); int main() { fn4(); fn1(); thing(); fn2(); fn3(); return 0; } $ gcc --version gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ gcc -Wall -Wextra -shared -o libtstpltlib.so tstpltlib.c $ gcc -Wall -Wextra -Wno-uninitialized -o tstpltifunc tstpltifunc.c -L . -ltstpltlib -Wl,-rpath="$(pwd)" $ readelf -rW tstpltifunc | grep -A99 plt Relocation section '.rela.plt' at offset 0x738 contains 8 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000003f98 0000000300000007 R_X86_64_JUMP_SLOT 0000000000000000 puts@GLIBC_2.2.5 + 0 0000000000003fa8 0000000400000007 R_X86_64_JUMP_SLOT 0000000000000000 __stack_chk_fail@GLIBC_2.4 + 0 0000000000003fb0 0000000500000007 R_X86_64_JUMP_SLOT 0000000000000000 fn1 + 0 0000000000003fb8 0000000600000007 R_X86_64_JUMP_SLOT 0000000000000000 fn3 + 0 0000000000003fc0 0000000800000007 R_X86_64_JUMP_SLOT 0000000000000000 fn4 + 0 0000000000003fc8 0000000900000007 R_X86_64_JUMP_SLOT 0000000000000000 fn2 + 0 0000000000003fd0 0000000b00000007 R_X86_64_JUMP_SLOT 0000000000000000 getrandom@GLIBC_2.25 + 0 0000000000003fa0 0000000000000025 R_X86_64_IRELATIVE 125d $ perf record -e intel_pt//u --filter 'filter main @ ./tstpltifunc' ./tstpltifunc thing2 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.016 MB perf.data ] $ perf script --itrace=be --ns -F+flags,-event,+addr,-period,-comm,-tid,-cpu,-dso 21860.073683659: tr strt 0 [unknown] => 561e212c42be main+0x0 21860.073683659: tr end call 561e212c42c6 main+0x8 => 561e212c4110 fn4@plt+0x0 21860.073683661: tr strt 0 [unknown] => 561e212c42cb main+0xd 21860.073683661: tr end call 561e212c42cb main+0xd => 561e212c40f0 fn1@plt+0x0 21860.073683661: tr strt 0 [unknown] => 561e212c42d0 main+0x12 21860.073683661: tr end call 561e212c42d0 main+0x12 => 561e212c40d0 offset_0x10d0@plt+0x0 21860.073698451: tr strt 0 [unknown] => 561e212c42d5 main+0x17 21860.073698451: tr end call 561e212c42d5 main+0x17 => 561e212c4120 fn2@plt+0x0 21860.073698451: tr strt 0 [unknown] => 561e212c42da main+0x1c 21860.073698451: tr end call 561e212c42da main+0x1c => 561e212c4100 fn3@plt+0x0 21860.073698452: tr strt 0 [unknown] => 561e212c42df main+0x21 21860.073698452: tr end return 561e212c42e5 main+0x27 => 7fb51cc29d90 __libc_start_call_main+0x80 After: $ perf script --itrace=be --ns -F+flags,-event,+addr,-period,-comm,-tid,-cpu,-dso 21860.073683659: tr strt 0 [unknown] => 561e212c42be main+0x0 21860.073683659: tr end call 561e212c42c6 main+0x8 => 561e212c4110 fn4@plt+0x0 21860.073683661: tr strt 0 [unknown] => 561e212c42cb main+0xd 21860.073683661: tr end call 561e212c42cb main+0xd => 561e212c40f0 fn1@plt+0x0 21860.073683661: tr strt 0 [unknown] => 561e212c42d0 main+0x12 21860.073683661: tr end call 561e212c42d0 main+0x12 => 561e212c40d0 thing_ifunc@plt+0x0 21860.073698451: tr strt 0 [unknown] => 561e212c42d5 main+0x17 21860.073698451: tr end call 561e212c42d5 main+0x17 => 561e212c4120 fn2@plt+0x0 21860.073698451: tr strt 0 [unknown] => 561e212c42da main+0x1c 21860.073698451: tr end call 561e212c42da main+0x1c => 561e212c4100 fn3@plt+0x0 21860.073698452: tr strt 0 [unknown] => 561e212c42df main+0x21 21860.073698452: tr end return 561e212c42e5 main+0x27 => 7fb51cc29d90 __libc_start_call_main+0x80 Reviewed-by: Namhyung Kim Signed-off-by: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Link: https://lore.kernel.org/r/20230131131625.6964-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 05963491c094ca3de397ef0cfe5537b666ae4412 Author: Adrian Hunter Date: Tue Jan 31 15:16:20 2023 +0200 perf symbols: Record whether a symbol is an alias for an IFUNC symbol To assist with synthesizing plt symbols for IFUNCs, record whether a symbol is an alias of an IFUNC symbol. Reviewed-by: Namhyung Kim Signed-off-by: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Link: https://lore.kernel.org/r/20230131131625.6964-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 78250284b157490122106516470ec6c40ead3986 Author: Adrian Hunter Date: Tue Jan 31 15:16:19 2023 +0200 perf symbols: Sort plt relocations for x86 For x86, with the addition of IFUNCs, relocation information becomes disordered with respect to plt. Correct that by sorting the relocations by offset. Example: Before: $ cat tstpltlib.c void fn1(void) {} void fn2(void) {} void fn3(void) {} void fn4(void) {} $ cat tstpltifunc.c #include void thing1(void) { printf("thing1\n"); } void thing2(void) { printf("thing2\n"); } typedef void (*thing_fn_t)(void); thing_fn_t thing_ifunc(void) { int x; if (x & 1) return thing2; return thing1; } void thing(void) __attribute__ ((ifunc ("thing_ifunc"))); void fn1(void); void fn2(void); void fn3(void); void fn4(void); int main() { fn4(); fn1(); thing(); fn2(); fn3(); return 0; } $ gcc --version gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ gcc -Wall -Wextra -shared -o libtstpltlib.so tstpltlib.c $ gcc -Wall -Wextra -Wno-uninitialized -o tstpltifunc tstpltifunc.c -L . -ltstpltlib -Wl,-rpath="$(pwd)" $ readelf -rW tstpltifunc | grep -A99 plt Relocation section '.rela.plt' at offset 0x738 contains 8 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000003f98 0000000300000007 R_X86_64_JUMP_SLOT 0000000000000000 puts@GLIBC_2.2.5 + 0 0000000000003fa8 0000000400000007 R_X86_64_JUMP_SLOT 0000000000000000 __stack_chk_fail@GLIBC_2.4 + 0 0000000000003fb0 0000000500000007 R_X86_64_JUMP_SLOT 0000000000000000 fn1 + 0 0000000000003fb8 0000000600000007 R_X86_64_JUMP_SLOT 0000000000000000 fn3 + 0 0000000000003fc0 0000000800000007 R_X86_64_JUMP_SLOT 0000000000000000 fn4 + 0 0000000000003fc8 0000000900000007 R_X86_64_JUMP_SLOT 0000000000000000 fn2 + 0 0000000000003fd0 0000000b00000007 R_X86_64_JUMP_SLOT 0000000000000000 getrandom@GLIBC_2.25 + 0 0000000000003fa0 0000000000000025 R_X86_64_IRELATIVE 125d $ perf record -e intel_pt//u --filter 'filter main @ ./tstpltifunc' ./tstpltifunc thing2 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.029 MB perf.data ] $ perf script --itrace=be --ns -F+flags,-event,+addr,-period,-comm,-tid,-cpu,-dso 20417.302513948: tr strt 0 [unknown] => 5629a74892be main+0x0 20417.302513948: tr end call 5629a74892c6 main+0x8 => 5629a7489110 fn2@plt+0x0 20417.302513949: tr strt 0 [unknown] => 5629a74892cb main+0xd 20417.302513949: tr end call 5629a74892cb main+0xd => 5629a74890f0 fn3@plt+0x0 20417.302513950: tr strt 0 [unknown] => 5629a74892d0 main+0x12 20417.302513950: tr end call 5629a74892d0 main+0x12 => 5629a74890d0 __stack_chk_fail@plt+0x0 20417.302528114: tr strt 0 [unknown] => 5629a74892d5 main+0x17 20417.302528114: tr end call 5629a74892d5 main+0x17 => 5629a7489120 getrandom@plt+0x0 20417.302528115: tr strt 0 [unknown] => 5629a74892da main+0x1c 20417.302528115: tr end call 5629a74892da main+0x1c => 5629a7489100 fn4@plt+0x0 20417.302528115: tr strt 0 [unknown] => 5629a74892df main+0x21 20417.302528115: tr end return 5629a74892e5 main+0x27 => 7ff14da29d90 __libc_start_call_main+0x80 After: $ perf script --itrace=be --ns -F+flags,-event,+addr,-period,-comm,-tid,-cpu,-dso 20417.302513948: tr strt 0 [unknown] => 5629a74892be main+0x0 20417.302513948: tr end call 5629a74892c6 main+0x8 => 5629a7489110 fn4@plt+0x0 20417.302513949: tr strt 0 [unknown] => 5629a74892cb main+0xd 20417.302513949: tr end call 5629a74892cb main+0xd => 5629a74890f0 fn1@plt+0x0 20417.302513950: tr strt 0 [unknown] => 5629a74892d0 main+0x12 20417.302513950: tr end call 5629a74892d0 main+0x12 => 5629a74890d0 offset_0x10d0@plt+0x0 20417.302528114: tr strt 0 [unknown] => 5629a74892d5 main+0x17 20417.302528114: tr end call 5629a74892d5 main+0x17 => 5629a7489120 fn2@plt+0x0 20417.302528115: tr strt 0 [unknown] => 5629a74892da main+0x1c 20417.302528115: tr end call 5629a74892da main+0x1c => 5629a7489100 fn3@plt+0x0 20417.302528115: tr strt 0 [unknown] => 5629a74892df main+0x21 20417.302528115: tr end return 5629a74892e5 main+0x27 => 7ff14da29d90 __libc_start_call_main+0x80 Reviewed-by: Namhyung Kim Signed-off-by: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Link: https://lore.kernel.org/r/20230131131625.6964-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit b2529f829ad65bf124a6b1c4fcc90093d8f0c9cf Author: Adrian Hunter Date: Tue Jan 31 15:16:18 2023 +0200 perf symbols: Add support for x86 .plt.sec The section .plt.sec was originally added for MPX and was first called .plt.bnd. While MPX has been deprecated, .plt.sec is now also used for IBT. On x86_64, IBT may be enabled by default, but can be switched off using gcc option -fcf-protection=none, or switched on by -z ibt or -z ibtplt. On 32-bit, option -z ibt or -z ibtplt will enable IBT. With .plt.sec, calls are made into .plt.sec instead of .plt, so it makes more sense to put the symbols there instead of .plt. A notable difference is that .plt.sec does not have a header entry. For x86, when synthesizing symbols for plt, use offset and entry size of .plt.sec instead of .plt when there is a .plt.sec section. Example on Ubuntu 22.04 gcc 11.3: Before: $ cat tstpltlib.c void fn1(void) {} void fn2(void) {} void fn3(void) {} void fn4(void) {} $ cat tstplt.c void fn1(void); void fn2(void); void fn3(void); void fn4(void); int main() { fn4(); fn1(); fn2(); fn3(); return 0; } $ gcc --version gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ gcc -Wall -Wextra -shared -o libtstpltlib.so tstpltlib.c $ gcc -Wall -Wextra -z ibt -o tstplt tstplt.c -L . -ltstpltlib -Wl,-rpath=$(pwd) $ readelf -SW tstplt | grep 'plt\|Name' [Nr] Name Type Address Off Size ES Flg Lk Inf Al [11] .rela.plt RELA 0000000000000698 000698 000060 18 AI 6 24 8 [13] .plt PROGBITS 0000000000001020 001020 000050 10 AX 0 0 16 [14] .plt.got PROGBITS 0000000000001070 001070 000010 10 AX 0 0 16 [15] .plt.sec PROGBITS 0000000000001080 001080 000040 10 AX 0 0 16 $ perf record -e intel_pt//u --filter 'filter main @ ./tstplt' ./tstplt [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.015 MB perf.data ] $ perf script --itrace=be --ns -F+flags,-event,+addr,-period,-comm,-tid,-cpu,-dso 38970.522546686: tr strt 0 [unknown] => 55fc222a81a9 main+0x0 38970.522546686: tr end call 55fc222a81b1 main+0x8 => 55fc222a80a0 [unknown] 38970.522546687: tr strt 0 [unknown] => 55fc222a81b6 main+0xd 38970.522546687: tr end call 55fc222a81b6 main+0xd => 55fc222a8080 [unknown] 38970.522546688: tr strt 0 [unknown] => 55fc222a81bb main+0x12 38970.522546688: tr end call 55fc222a81bb main+0x12 => 55fc222a80b0 [unknown] 38970.522546688: tr strt 0 [unknown] => 55fc222a81c0 main+0x17 38970.522546688: tr end call 55fc222a81c0 main+0x17 => 55fc222a8090 [unknown] 38970.522546689: tr strt 0 [unknown] => 55fc222a81c5 main+0x1c 38970.522546894: tr end return 55fc222a81cb main+0x22 => 7f3a4dc29d90 __libc_start_call_main+0x80 After: $ perf script --itrace=be --ns -F+flags,-event,+addr,-period,-comm,-tid,-cpu,-dso 38970.522546686: tr strt 0 [unknown] => 55fc222a81a9 main+0x0 38970.522546686: tr end call 55fc222a81b1 main+0x8 => 55fc222a80a0 fn4@plt+0x0 38970.522546687: tr strt 0 [unknown] => 55fc222a81b6 main+0xd 38970.522546687: tr end call 55fc222a81b6 main+0xd => 55fc222a8080 fn1@plt+0x0 38970.522546688: tr strt 0 [unknown] => 55fc222a81bb main+0x12 38970.522546688: tr end call 55fc222a81bb main+0x12 => 55fc222a80b0 fn2@plt+0x0 38970.522546688: tr strt 0 [unknown] => 55fc222a81c0 main+0x17 38970.522546688: tr end call 55fc222a81c0 main+0x17 => 55fc222a8090 fn3@plt+0x0 38970.522546689: tr strt 0 [unknown] => 55fc222a81c5 main+0x1c 38970.522546894: tr end return 55fc222a81cb main+0x22 => 7f3a4dc29d90 __libc_start_call_main+0x80 Reviewed-by: Namhyung Kim Signed-off-by: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Link: https://lore.kernel.org/r/20230131131625.6964-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 66fe2d53a067d343980048bf5c9df3e852a9e436 Author: Adrian Hunter Date: Tue Jan 31 15:16:17 2023 +0200 perf symbols: Correct plt entry sizes for x86 In 32-bit executables the .plt entry size can be set to 4 when it is really 16. In fact the only sizes used for x86 (32 or 64 bit) are 8 or 16, so check for those and, if not, use the alignment to choose which it is. Example on Ubuntu 22.04 gcc 11.3: Before: $ cat tstpltlib.c void fn1(void) {} void fn2(void) {} void fn3(void) {} void fn4(void) {} $ cat tstplt.c void fn1(void); void fn2(void); void fn3(void); void fn4(void); int main() { fn4(); fn1(); fn2(); fn3(); return 0; } $ gcc --version gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ gcc -m32 -Wall -Wextra -shared -o libtstpltlib32.so tstpltlib.c $ gcc -m32 -Wall -Wextra -o tstplt32 tstplt.c -L . -ltstpltlib32 -Wl,-rpath=$(pwd) $ perf record -e intel_pt//u --filter 'filter main @ ./tstplt32' ./tstplt32 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.011 MB perf.data ] $ readelf -SW tstplt32 | grep 'plt\|Name' [Nr] Name Type Addr Off Size ES Flg Lk Inf Al [10] .rel.plt REL 0000041c 00041c 000028 08 AI 5 22 4 [12] .plt PROGBITS 00001030 001030 000060 04 AX 0 0 16 <- ES is 0x04, should be 0x10 [13] .plt.got PROGBITS 00001090 001090 000008 08 AX 0 0 8 $ perf script --itrace=be --ns -F+flags,-event,+addr,-period,-comm,-tid,-cpu,-dso 17894.383903029: tr strt 0 [unknown] => 565b81cd main+0x0 17894.383903029: tr end call 565b81d4 main+0x7 => 565b80d0 __x86.get_pc_thunk.bx+0x0 17894.383903031: tr strt 0 [unknown] => 565b81d9 main+0xc 17894.383903031: tr end call 565b81df main+0x12 => 565b8070 [unknown] 17894.383903032: tr strt 0 [unknown] => 565b81e4 main+0x17 17894.383903032: tr end call 565b81e4 main+0x17 => 565b8050 [unknown] 17894.383903033: tr strt 0 [unknown] => 565b81e9 main+0x1c 17894.383903033: tr end call 565b81e9 main+0x1c => 565b8080 [unknown] 17894.383903033: tr strt 0 [unknown] => 565b81ee main+0x21 17894.383903033: tr end call 565b81ee main+0x21 => 565b8060 [unknown] 17894.383903237: tr strt 0 [unknown] => 565b81f3 main+0x26 17894.383903237: tr end return 565b81fc main+0x2f => f7c21519 [unknown] After: $ perf script --itrace=be --ns -F+flags,-event,+addr,-period,-comm,-tid,-cpu,-dso 17894.383903029: tr strt 0 [unknown] => 565b81cd main+0x0 17894.383903029: tr end call 565b81d4 main+0x7 => 565b80d0 __x86.get_pc_thunk.bx+0x0 17894.383903031: tr strt 0 [unknown] => 565b81d9 main+0xc 17894.383903031: tr end call 565b81df main+0x12 => 565b8070 fn4@plt+0x0 17894.383903032: tr strt 0 [unknown] => 565b81e4 main+0x17 17894.383903032: tr end call 565b81e4 main+0x17 => 565b8050 fn1@plt+0x0 17894.383903033: tr strt 0 [unknown] => 565b81e9 main+0x1c 17894.383903033: tr end call 565b81e9 main+0x1c => 565b8080 fn2@plt+0x0 17894.383903033: tr strt 0 [unknown] => 565b81ee main+0x21 17894.383903033: tr end call 565b81ee main+0x21 => 565b8060 fn3@plt+0x0 17894.383903237: tr strt 0 [unknown] => 565b81f3 main+0x26 17894.383903237: tr end return 565b81fc main+0x2f => f7c21519 [unknown] Reviewed-by: Namhyung Kim Signed-off-by: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Link: https://lore.kernel.org/r/20230131131625.6964-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 766b0beedb2fa8ef86defc5233f4473b71ca091e Author: Athira Rajeev Date: Wed Feb 1 23:34:21 2023 +0530 perf tests shell: Fix check for libtracevent support Test “Use vfs_getname probe to get syscall args filenames” fails in environment with missing libtraceevent support as below: 82: Use vfs_getname probe to get syscall args filenames : --- start --- test child forked, pid 304726 Recording open file: event syntax error: 'probe:vfs_getname*' \___ unsupported tracepoint libtraceevent is necessary for tracepoint support Run 'perf list' for a list of valid events Usage: perf record [] [] or: perf record [] -- [] -e, --event event selector. use 'perf list' to list available events test child finished with -1 ---- end ---- Use vfs_getname probe to get syscall args filenames: FAILED! The environment has debuginfo but is missing the libtraceevent devel. Hence perf is compiled without libtraceevent support. The test tries to add probe “probe:vfs_getname” and then uses it with “perf record”. This fails at function “parse_events_add_tracepoint" due to missing libtraceevent. Similarly "probe libc's inet_pton & backtrace it with ping" test slso fails with same reason. Add a function in 'perf test shell' library to check if perf record with —dry-run reports any error on missing support for libtraceevent. Update both the tests to use this new function “skip_no_probe_record_support” before proceeding With using probe point via perf builtin record. With the change, 82: Use vfs_getname probe to get syscall args filenames : --- start --- test child forked, pid 305014 Recording open file: libtraceevent is necessary for tracepoint support test child finished with -2 ---- end ---- Use vfs_getname probe to get syscall args filenames: Skip 81: probe libc's inet_pton & backtrace it with ping : --- start --- test child forked, pid 305036 libtraceevent is necessary for tracepoint support test child finished with -2 ---- end ---- probe libc's inet_pton & backtrace it with ping: Skip Signed-off-by: Athira Rajeev Cc: Andi Kleen Cc: Disha Goel Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Nageswara R Sastry Cc: Namhyung Kim Cc: kjain@linux.ibm.com, Cc: linuxppc-dev@lists.ozlabs.org Link: http://lore.kernel.org/r/20230201180421.59640-2-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 84cce3d60c220debf126bd0b6ecbd63af2a46f76 Author: Athira Rajeev Date: Wed Feb 1 23:34:20 2023 +0530 perf tests shell: Add check for perf data file in record+probe_libc_inet_pton test The "probe libc's inet_pton & backtrace it with ping" test installs a uprobe and uses perf record/script to check the backtrace. Currently even if the "perf record" fails, the test reports success. Logs below: # ./perf test -v "probe libc's inet_pton & backtrace it with ping" 81: probe libc's inet_pton & backtrace it with ping : --- start --- test child forked, pid 304211 failed to open /tmp/perf.data.Btf: No such file or directory test child finished with 0 ---- end ---- probe libc's inet_pton & backtrace it with ping: Ok Fix this by adding check for presence of perf.data file before proceeding with "perf script". With the patch changes, test reports fail correctly. # ./perf test -v "probe libc's inet_pton & backtrace it with ping" 81: probe libc's inet_pton & backtrace it with ping : --- start --- test child forked, pid 304358 FAIL: perf record failed to create "/tmp/perf.data.Uoi" test child finished with -1 ---- end ---- probe libc's inet_pton & backtrace it with ping: FAILED! Signed-off-by: Athira Rajeev Cc: Andi Kleen Cc: Disha Goel Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kajol Jain Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Nageswara R Sastry Cc: Namhyung Kim Cc: linuxppc-dev@lists.ozlabs.org Link: http://lore.kernel.org/r/20230201180421.59640-1-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 13738a3647368f7f600b30d241779bcd2a3ebbfd Author: Like Xu Date: Wed Nov 9 16:28:02 2022 +0800 perf/x86/intel: Expose EPT-friendly PEBS for SPR and future models According to Intel SDM, the EPT-friendly PEBS is supported by all the platforms after ICX, ADL and the future platforms with PEBS format 5. Currently the only in-kernel user of this capability is KVM, which has very limited support for hybrid core pmu, so ADL and its successors do not currently expose this capability. When both hybrid core and PEBS format 5 are present, KVM will decide on its own merits. Cc: Peter Zijlstra Cc: linux-perf-users@vger.kernel.org Suggested-by: Kan Liang Signed-off-by: Like Xu Reviewed-by: Kan Liang Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221109082802.27543-4-likexu@tencent.com Signed-off-by: Sean Christopherson commit 974850be012583fb8e7f1bd5ecf55763efb2f94a Author: Like Xu Date: Wed Nov 9 16:28:01 2022 +0800 KVM: x86/pmu: Add PRIR++ and PDist support for SPR and later models The pebs capability on the SPR is basically the same as Ice Lake Server with the exception of two special facilities that have been enhanced and require special handling. Upon triggering a PEBS assist, there will be a finite delay between the time the counter overflows and when the microcode starts to carry out its data collection obligations. Even if the delay is constant in core clock space, it invariably manifest as variable "skids" in instruction address space. On the Ice Lake Server, the Precise Distribution of Instructions Retire (PDIR) facility mitigates the "skid" problem by providing an early indication of when the counter is about to overflow. On SPR, the PDIR counter available (Fixed 0) is unchanged, but the capability is enhanced to Instruction-Accurate PDIR (PDIR++), where PEBS is taken on the next instruction after the one that caused the overflow. SPR also introduces a new Precise Distribution (PDist) facility only on general programmable counter 0. Per Intel SDM, PDist eliminates any skid or shadowing effects from PEBS. With PDist, the PEBS record will be generated precisely upon completion of the instruction or operation that causes the counter to overflow (there is no "wait for next occurrence" by default). In terms of KVM handling, when guest accesses those special counters, the KVM needs to request the same index counters via the perf_event kernel subsystem to ensure that the guest uses the correct pebs hardware counter (PRIR++ or PDist). This is mainly achieved by adjusting the event precise level to the maximum, where the semantics of this magic number is mainly defined by the internal software context of perf_event and it's also backwards compatible as part of the user space interface. Opportunistically, refine confusing comments on TNT+, as the only ones that currently support pebs_ept are Ice Lake server and SPR (GLC+). Signed-off-by: Like Xu Link: https://lore.kernel.org/r/20221109082802.27543-3-likexu@tencent.com Signed-off-by: Sean Christopherson commit e072b097d29e40784d4d0dd8a017df54af2a2026 Author: Namhyung Kim Date: Mon Jan 30 18:33:50 2023 -0800 perf test: Add pipe mode test to the Intel PT test suite The test_pipe() function will check perf report and perf inject with pipe input. Reviewed-by: Adrian Hunter Signed-off-by: Namhyung Kim Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20230131023350.1903992-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 14bf4784412c9f89a626798026262daa8fc81034 Author: Namhyung Kim Date: Mon Jan 30 18:33:49 2023 -0800 perf session: Avoid calling lseek(2) for pipe We should not call lseek(2) for pipes as it won't work. And we already in the proper place to read the data for AUXTRACE. Add the comment like in the PERF_RECORD_HEADER_TRACING_DATA. Reviewed-by: Adrian Hunter Reviewed-by: James Clark Signed-off-by: Namhyung Kim Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20230131023350.1903992-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit aeb802f872a7c42e4381f36041e77d1745908255 Author: Namhyung Kim Date: Mon Jan 30 18:33:48 2023 -0800 perf intel-pt: Do not try to queue auxtrace data on pipe When it processes AUXTRACE_INFO, it calls to auxtrace_queue_data() to collect AUXTRACE data first. That won't work with pipe since it needs lseek() to read the scattered aux data. $ perf record -o- -e intel_pt// true | perf report -i- --itrace=i100 # To display the perf.data header info, please use --header/--header-only options. # 0x4118 [0xa0]: failed to process type: 70 Error: failed to process sample For the pipe mode, it can handle the aux data as it gets. But there's no guarantee it can get the aux data in time. So the following warning will be shown at the beginning: WARNING: Intel PT with pipe mode is not recommended. The output cannot relied upon. In particular, time stamps and the order of events may be incorrect. Fixes: dbd134322e74f19d ("perf intel-pt: Add support for decoding AUX area samples") Reviewed-by: Adrian Hunter Reviewed-by: James Clark Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20230131023350.1903992-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit eb98192576315d3f4c6c990d589ab398e7091782 Author: Emanuele Giuseppe Esposito Date: Mon Jan 9 08:06:05 2023 -0500 KVM: selftests: Verify APIC_ID is set when forcing x2APIC=>xAPIC transition Add a sub-test to verify that KVM stuffs the APIC_ID when userspace forces a transition from x2APIC to xAPIC without first disabling the APIC. Such a transition is architecturally disallowed (WRMSR will #GP), but needs to be handled by KVM to allow userspace to emulate RESET (ignoring that userspace should also stuff local APIC state on RESET). Signed-off-by: Emanuele Giuseppe Esposito Link: https://lore.kernel.org/r/20230109130605.2013555-3-eesposit@redhat.com Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson commit e8a3c8bd687068bafb640ca524905f0bec716a13 Author: Jesper Dangaard Brouer Date: Wed Feb 1 18:32:05 2023 +0100 selftests/bpf: xdp_hw_metadata use strncpy for ifname The ifname char pointer is taken directly from the command line as input and the string is copied directly into struct ifreq via strcpy. This makes it easy to corrupt other members of ifreq and generally do stack overflows. Most often the ioctl will fail with: ./xdp_hw_metadata: ioctl(SIOCETHTOOL): Bad address As people will likely copy-paste code for getting NIC queue channels (rxq_num) and enabling HW timestamping (hwtstamp_ioctl) lets make this code a bit more secure by using strncpy. Fixes: 297a3f124155 ("selftests/bpf: Simple program to dump XDP RX metadata") Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/167527272543.937063.16993147790832546209.stgit@firesoul commit 7bd4224deecd2d917fcbb52f9d13ab1453be219a Author: Jesper Dangaard Brouer Date: Wed Feb 1 18:32:00 2023 +0100 selftests/bpf: xdp_hw_metadata correct status value in error(3) The glibc error reporting function error(): void error(int status, int errnum, const char *format, ...); The status argument should be a positive value between 0-255 as it is passed over to the exit(3) function as the value as the shell exit status. The least significant byte of status (i.e., status & 0xFF) is returned to the shell parent. Fix this by using 1 instead of -1. As 1 corresponds to C standard constant EXIT_FAILURE. Fixes: 297a3f124155 ("selftests/bpf: Simple program to dump XDP RX metadata") Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/167527272038.937063.9137108142012298120.stgit@firesoul commit a19a62e56478ba4afadfa7df94d0819542b7ccf8 Author: Jesper Dangaard Brouer Date: Wed Feb 1 18:31:55 2023 +0100 selftests/bpf: xdp_hw_metadata cleanup cause segfault Using xdp_hw_metadata I experince Segmentation fault after seeing "detaching bpf program....". On my system the segfault happened when accessing bpf_obj->skeleton in xdp_hw_metadata__destroy(bpf_obj) call. That doesn't make any sense as this memory have not been freed by program at this point in time. Prior to calling xdp_hw_metadata__destroy(bpf_obj) the function close_xsk() is called for each RX-queue xsk. The real bug lays in close_xsk() that unmap via munmap() the wrong memory pointer. The call xsk_umem__delete(xsk->umem) will free xsk->umem, thus the call to munmap(xsk->umem, UMEM_SIZE) will have unpredictable behavior. And man page explain subsequent references to these pages will generate SIGSEGV. Unmapping xsk->umem_area instead removes the segfault. Fixes: 297a3f124155 ("selftests/bpf: Simple program to dump XDP RX metadata") Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/167527271533.937063.5717065138099679142.stgit@firesoul commit 3fd9dcd689a5582e682fde57b3139066d032367a Author: Jesper Dangaard Brouer Date: Wed Feb 1 18:31:50 2023 +0100 selftests/bpf: xdp_hw_metadata clear metadata when -EOPNOTSUPP The AF_XDP userspace part of xdp_hw_metadata see non-zero as a signal of the availability of rx_timestamp and rx_hash in data_meta area. The kernel-side BPF-prog code doesn't initialize these members when kernel returns an error e.g. -EOPNOTSUPP. This memory area is not guaranteed to be zeroed, and can contain garbage/previous values, which will be read and interpreted by AF_XDP userspace side. Tested this on different drivers. The experiences are that for most packets they will have zeroed this data_meta area, but occasionally it will contain garbage data. Example of failure tested on ixgbe: poll: 1 (0) xsk_ring_cons__peek: 1 0x18ec788: rx_desc[0]->addr=100000000008000 addr=8100 comp_addr=8000 rx_hash: 3697961069 rx_timestamp: 9024981991734834796 (sec:9024981991.7348) 0x18ec788: complete idx=8 addr=8000 Converting to date: date -d @9024981991 2255-12-28T20:26:31 CET I choose a simple fix in this patch. When kfunc fails or isn't supported assign zero to the corresponding struct meta value. It's up to the individual BPF-programmer to do something smarter e.g. that fits their use-case, like getting a software timestamp and marking a flag that gives the type of timestamp. Fixes: 297a3f124155 ("selftests/bpf: Simple program to dump XDP RX metadata") Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/167527271027.937063.5177725618616476592.stgit@firesoul commit f2922f77a6a6e6c549f1fd639ec01d2f7999fbc0 Author: Jesper Dangaard Brouer Date: Wed Feb 1 19:12:54 2023 +0100 selftests/bpf: Fix unmap bug in prog_tests/xdp_metadata.c The function close_xsk() unmap via munmap() the wrong memory pointer. The call xsk_umem__delete(xsk->umem) have already freed xsk->umem. Thus the call to munmap(xsk->umem, UMEM_SIZE) will have unpredictable behavior that can lead to Segmentation fault elsewhere, as man page explain subsequent references to these pages will generate SIGSEGV. Fixes: e2a46d54d7a1 ("selftests/bpf: Verify xdp_metadata xdp->af_xdp path") Reported-by: Martin KaFai Lau Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/167527517464.938135.13750760520577765269.stgit@firesoul commit 052c3b99cbc8d227f8cb8edf1519197808d1d653 Author: Emanuele Giuseppe Esposito Date: Tue Jan 10 10:40:33 2023 -0800 KVM: x86: Reinitialize xAPIC ID when userspace forces x2APIC => xAPIC Reinitialize the xAPIC ID to the vCPU ID when userspace forces the APIC to transition directly from x2APIC to xAPIC mode, e.g. to emulate RESET. KVM already stuffs the xAPIC ID when the APIC is transitioned from DISABLED to xAPIC (commit 49bd29ba1dbd ("KVM: x86: reset APIC ID when enabling LAPIC")), i.e. userspace is conditioned to expect KVM to update the xAPIC ID, but KVM doesn't handle the architecturally-impossible case where userspace forces x2APIC=>xAPIC via KVM_SET_MSRS. On its own, the "bug" is benign, as userspace emulation of RESET will also stuff APIC registers via KVM_SET_LAPIC, i.e. will manually set the xAPIC ID. However, commit 3743c2f02517 ("KVM: x86: inhibit APICv/AVIC on changes to APIC ID or APIC base") introduced a bug, fixed by commit commit ef40757743b4 ("KVM: x86: fix APICv/x2AVIC disabled when vm reboot by itself"), that caused KVM to fail to properly update the xAPIC ID when handling KVM_SET_LAPIC. Refresh the xAPIC ID even though it's not strictly necessary so that KVM provides consistent behavior. Note, KVM follows Intel architecture with regard to handling the xAPIC ID and x2APIC IDs across mode transitions. For the APIC DISABLED case (commit 49bd29ba1dbd), Intel's SDM says the xAPIC ID _may_ be reinitialized 10.4.3 Enabling or Disabling the Local APIC When IA32_APIC_BASE[11] is set to 0, prior initialization to the APIC may be lost and the APIC may return to the state described in Section 10.4.7.1, “Local APIC State After Power-Up or Reset.” 10.4.7.1 Local APIC State After Power-Up or Reset ... The local APIC ID register is set to a unique APIC ID. ... i.e. KVM's behavior is legal as per Intel's architecture. In practice, Intel's behavior is N/A as modern Intel CPUs (since at least Haswell) make the xAPIC ID fully read-only. And for xAPIC => x2APIC transitions (commit 257b9a5faab5 ("KVM: x86: use correct APIC ID on x2APIC transition")), Intel's SDM says: Any APIC ID value written to the memory-mapped local APIC ID register is not preserved. AMD's APM says nothing (that I could find) about the xAPIC ID when the APIC is DISABLED, but testing on bare metal (Rome) shows that the xAPIC ID is preserved when the APIC is DISABLED and re-enabled in xAPIC mode. AMD also preserves the xAPIC ID when the APIC is transitioned from xAPIC to x2APIC, i.e. allows a backdoor write of the x2APIC ID, which is again not emulated by KVM. Signed-off-by: Emanuele Giuseppe Esposito Link: https://lore.kernel.org/all/20230109130605.2013555-2-eesposit@redhat.com [sean: rewrite changelog, set xAPIC ID iff APIC is enabled] Signed-off-by: Sean Christopherson commit 36b0fb13b5474b2f5412435e3c62c639dc626689 Merge: 10d1b0e4daccc 6aed15e330bfe Author: Daniel Borkmann Date: Thu Feb 2 00:25:14 2023 +0100 Merge branch 'kfunc-annotation' David Vernet says: ==================== This is v3 of the patchset [0]. v2 can be found at [1]. [0]: https://lore.kernel.org/bpf/Y7kCsjBZ%2FFrsWW%2Fe@maniforge.lan/T/ [1]: https://lore.kernel.org/lkml/20230123171506.71995-1-void@manifault.com/ Changelog: ---------- v2 -> v3: - Go back to the __bpf_kfunc approach from v1. The BPF_KFUNC macro received pushback as it didn't match the more typical EXPORT_SYMBOL* APIs used elsewhere in the kernel. It's the longer term plan, but for now we're proposing something less controversial to fix kfuncs and BTF encoding. - Add __bpf_kfunc macro to newly added cpumask kfuncs. - Add __bpf_kfunc macro to newly added XDP metadata kfuncs, which were failing to be BTF encoded in the thread in [2]. - Update patch description(s) to reference the discussions in [2]. - Add a selftest that validates that a static kfunc with unused args is properly BTF encoded and can be invoked. [2]: https://lore.kernel.org/all/fe5d42d1-faad-d05e-99ad-1c2c04776950@oracle.com/ v1 -> v2: - Wrap entire function signature in BPF_KFUNC macro instead of using __bpf_kfunc tag (Kumar) - Update all kfunc definitions to use this macro. - Update kfuncs.rst documentation to describe and illustrate the macro. - Also clean up a few small parts of kfuncs.rst, e.g. some grammar, and in general making it a bit tighter. ==================== Signed-off-by: Daniel Borkmann commit 6aed15e330bfec6a423f40582b2a8b53d9ce1757 Author: David Vernet Date: Wed Feb 1 11:30:16 2023 -0600 selftests/bpf: Add testcase for static kfunc with unused arg kfuncs are allowed to be static, or not use one or more of their arguments. For example, bpf_xdp_metadata_rx_hash() in net/core/xdp.c is meant to be implemented by drivers, with the default implementation just returning -EOPNOTSUPP. As described in [0], such kfuncs can have their arguments elided, which can cause BTF encoding to be skipped. The new __bpf_kfunc macro should address this, and this patch adds a selftest which verifies that a static kfunc with at least one unused argument can still be encoded and invoked by a BPF program. Signed-off-by: David Vernet Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230201173016.342758-5-void@manifault.com commit 400031e05adfcef9e80eca80bdfc3f4b63658be4 Author: David Vernet Date: Wed Feb 1 11:30:15 2023 -0600 bpf: Add __bpf_kfunc tag to all kfuncs Now that we have the __bpf_kfunc tag, we should use add it to all existing kfuncs to ensure that they'll never be elided in LTO builds. Signed-off-by: David Vernet Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20230201173016.342758-4-void@manifault.com commit 98e6ab7a04353c95b1f4bad345d156ded865fd96 Author: David Vernet Date: Wed Feb 1 11:30:14 2023 -0600 bpf: Document usage of the new __bpf_kfunc macro Now that the __bpf_kfunc macro has been added to linux/btf.h, include a blurb about it in the kfuncs.rst file. In order for the macro to successfully render with .. kernel-doc, we'll also need to add it to the c_id_attributes array. Signed-off-by: David Vernet Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20230201173016.342758-3-void@manifault.com commit 57e7c169cd6afa093d858b8edfb9bceaf2e1c93b Author: David Vernet Date: Wed Feb 1 11:30:13 2023 -0600 bpf: Add __bpf_kfunc tag for marking kernel functions as kfuncs kfuncs are functions defined in the kernel, which may be invoked by BPF programs. They may or may not also be used as regular kernel functions, implying that they may be static (in which case the compiler could e.g. inline it away, or elide one or more arguments), or it could have external linkage, but potentially be elided in an LTO build if a function is observed to never be used, and is stripped from the final kernel binary. This has already resulted in some issues, such as those discussed in [0] wherein changes in DWARF that identify when a parameter has been optimized out can break BTF encodings (and in general break the kfunc). [0]: https://lore.kernel.org/all/1675088985-20300-2-git-send-email-alan.maguire@oracle.com/ We therefore require some convenience macro that kfunc developers can use just add to their kfuncs, and which will prevent all of the above issues from happening. This is in contrast with what we have today, where some kfunc definitions have "noinline", some have "__used", and others are static and have neither. Note that longer term, this mechanism may be replaced by a macro that more closely resembles EXPORT_SYMBOL_GPL(), as described in [1]. For now, we're going with this shorter-term approach to fix existing issues in kfuncs. [1]: https://lore.kernel.org/lkml/Y9AFT4pTydKh+PD3@maniforge.lan/ Note as well that checkpatch complains about this patch with the following: ERROR: Macros with complex values should be enclosed in parentheses +#define __bpf_kfunc __used noinline There seems to be a precedent for using this pattern in other places such as compiler_types.h (see e.g. __randomize_layout and noinstr), so it seems appropriate. Signed-off-by: David Vernet Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20230201173016.342758-2-void@manifault.com commit 4b6b185599273ecf980e3892006a7a29c5ad653b Author: Yadu MG Date: Wed Feb 1 16:00:11 2023 +0100 pinctrl: qcom: add the tlmm driver sa8775p platforms Add support for Lemans TLMM configuration and control via the pinctrl framework. Signed-off-by: Yadu MG Signed-off-by: Prasad Sodagudi [Bartosz: made the driver ready for upstream] Co-developed-by: Bartosz Golaszewski Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230201150011.200613-3-brgl@bgdev.pl Signed-off-by: Linus Walleij commit 9a2aaee23c7965dc53210bca2a0af161f232368f Author: Bartosz Golaszewski Date: Wed Feb 1 16:00:10 2023 +0100 dt-bindings: pinctrl: describe sa8775p-tlmm Add DT bindings for the TLMM controller on sa8775p platforms. Signed-off-by: Bartosz Golaszewski Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230201150011.200613-2-brgl@bgdev.pl Signed-off-by: Linus Walleij commit 10d1b0e4dacccd617c502a926cd6299a19d40b65 Merge: c1a3daf7363b4 a24b4c6e9aab4 Author: Daniel Borkmann Date: Wed Feb 1 23:30:27 2023 +0100 Merge branch 'xdp-ice-mbuf' Maciej Fijalkowski says: ==================== Although this work started as an effort to add multi-buffer XDP support to ice driver, as usual it turned out that some other side stuff needed to be addressed, so let me give you an overview. First patch adjusts legacy-rx in a way that it will be possible to refer to skb_shared_info being at the end of the buffer when gathering up frame fragments within xdp_buff. Then, patches 2-9 prepare ice driver in a way that actual multi-buffer patches will be easier to swallow. 10 and 11 are the meat. What is worth mentioning is that this set actually *fixes* things as patch 11 removes the logic based on next_dd/rs and we previously stepped away from this for ice_xmit_zc(). Currently, AF_XDP ZC XDP_TX workload is off as there are two cleaning sides that can be triggered and two of them work on different internal logic. This set unifies that and allows us to improve the performance by 2x with a trick on the last (13) patch. 12th is a simple cleanup of no longer fields from Tx ring. I might be wrong but I have not seen anyone reporting performance impact among patches that add XDP multi-buffer support to a particular driver. Numbers below were gathered via xdp_rxq_info and xdp_redirect_map on 1500 MTU: XDP_DROP +1% XDP_PASS -1,2% XDP_TX -0,5% XDP_REDIRECT -3,3% Cherry on top, which is not directly related to mbuf support (last patch): XDP_TX ZC +126% Target the we agreed on was to not degrade performance for any action by anything that would be over 5%, so our goal was met. Basically this set keeps the performance where it was. Redirect is slower due to more frequent tail bumps. ==================== Signed-off-by: Daniel Borkmann Reviewed-by: Alexander Lobakin commit 60325261235accc838158c82b403086e0e76e6a9 Author: Vipin Sharma Date: Mon Dec 12 10:37:20 2022 -0800 KVM: selftests: Test Hyper-V extended hypercall exit to userspace Hyper-V extended hypercalls by default exit to userspace. Verify userspace gets the call, update the result and then verify in guest correct result is received. Add KVM_EXIT_HYPERV to list of "known" hypercalls so errors generate pretty strings. Signed-off-by: Vipin Sharma Reviewed-by: David Matlack Link: https://lore.kernel.org/r/20221212183720.4062037-14-vipinsh@google.com [sean: add KVM_EXIT_HYPERV to exit_reasons_known] Signed-off-by: Sean Christopherson commit a24b4c6e9aab4f39982d40cfeb7c142e93310f8b Author: Maciej Fijalkowski Date: Tue Jan 31 21:45:06 2023 +0100 ice: xsk: Do not convert to buff to frame for XDP_TX Let us store pointer to xdp_buff that came from xsk_buff_pool on tx_buf so that it will be possible to recycle it via xsk_buff_free() on Tx cleaning side. This way it is not necessary to do expensive copy to another xdp_buff backed by a newly allocated page. Signed-off-by: Maciej Fijalkowski Signed-off-by: Daniel Borkmann Reviewed-by: Alexander Lobakin Link: https://lore.kernel.org/bpf/20230131204506.219292-14-maciej.fijalkowski@intel.com commit f4db7b314dd54ab9335bb449640484a6f27baf28 Author: Maciej Fijalkowski Date: Tue Jan 31 21:45:05 2023 +0100 ice: Remove next_{dd,rs} fields from ice_tx_ring Now that both ZC and standard XDP data paths stopped using Tx logic based on next_dd and next_rs fields, we can safely remove these fields and shrink Tx ring structure. Signed-off-by: Maciej Fijalkowski Signed-off-by: Daniel Borkmann Reviewed-by: Alexander Lobakin Link: https://lore.kernel.org/bpf/20230131204506.219292-13-maciej.fijalkowski@intel.com commit 3246a10752a7120878740f345f3956997777b3d6 Author: Maciej Fijalkowski Date: Tue Jan 31 21:45:04 2023 +0100 ice: Add support for XDP multi-buffer on Tx side Similarly as for Rx side in previous patch, logic on XDP Tx in ice driver needs to be adjusted for multi-buffer support. Specifically, the way how HW Tx descriptors are produced and cleaned. Currently, XDP_TX works on strict ring boundaries, meaning it sets RS bit (on producer side) / looks up DD bit (on consumer/cleaning side) every quarter of the ring. It means that if for example multi buffer frame would span across the ring quarter boundary (say that frame consists of 4 frames and we start from 62 descriptor where ring is sized to 256 entries), RS bit would be produced in the middle of multi buffer frame, which would be a broken behavior as it needs to be set on the last descriptor of the frame. To make it work, set RS bit at the last descriptor from the batch of frames that XDP_TX action was used on and make the first entry remember the index of last descriptor with RS bit set. This way, cleaning side can take the index of descriptor with RS bit, look up DD bit's presence and clean from first entry to last. In order to clean up the code base introduce the common ice_set_rs_bit() which will return index of descriptor that got RS bit produced on so that standard driver can store this within proper ice_tx_buf and ZC driver can simply ignore return value. Co-developed-by: Martyna Szapar-Mudlaw Signed-off-by: Martyna Szapar-Mudlaw Signed-off-by: Maciej Fijalkowski Signed-off-by: Daniel Borkmann Reviewed-by: Alexander Lobakin Link: https://lore.kernel.org/bpf/20230131204506.219292-12-maciej.fijalkowski@intel.com commit 2fba7dc5157b6f85dbf1b8e26e63a724db1f3d79 Author: Maciej Fijalkowski Date: Tue Jan 31 21:45:03 2023 +0100 ice: Add support for XDP multi-buffer on Rx side Ice driver needs to be a bit reworked on Rx data path in order to support multi-buffer XDP. For skb path, it currently works in a way that Rx ring carries pointer to skb so if driver didn't manage to combine fragmented frame at current NAPI instance, it can restore the state on next instance and keep looking for last fragment (so descriptor with EOP bit set). What needs to be achieved is that xdp_buff needs to be combined in such way (linear + frags part) in the first place. Then skb will be ready to go in case of XDP_PASS or BPF program being not present on interface. If BPF program is there, it would work on multi-buffer XDP. At this point xdp_buff resides directly on Rx ring, so given the fact that skb will be built straight from xdp_buff, there will be no further need to carry skb on Rx ring. Besides removing skb pointer from Rx ring, lots of members have been moved around within ice_rx_ring. First and foremost reason was to place rx_buf with xdp_buff on the same cacheline. This means that once we touch rx_buf (which is a preceding step before touching xdp_buff), xdp_buff will already be hot in cache. Second thing was that xdp_rxq is used rather rarely and it occupies a separate cacheline, so maybe it is better to have it at the end of ice_rx_ring. Other change that affects ice_rx_ring is the introduction of ice_rx_ring::first_desc. Its purpose is twofold - first is to propagate rx_buf->act to all the parts of current xdp_buff after running XDP program, so that ice_put_rx_buf() that got moved out of the main Rx processing loop will be able to tak an appriopriate action on each buffer. Second is for ice_construct_skb(). ice_construct_skb() has a copybreak mechanism which had an explicit impact on xdp_buff->skb conversion in the new approach when legacy Rx flag is toggled. It works in a way that linear part is 256 bytes long, if frame is bigger than that, remaining bytes are going as a frag to skb_shared_info. This means while memcpying frags from xdp_buff to newly allocated skb, care needs to be taken when picking the destination frag array entry. Upon the time ice_construct_skb() is called, when dealing with fragmented frame, current rx_buf points to the *last* fragment, but copybreak needs to be done against the first one. That's where ice_rx_ring::first_desc helps. When frame building spans across NAPI polls (DD bit is not set on current descriptor and xdp->data is not NULL) with current Rx buffer handling state there might be some problems. Since calls to ice_put_rx_buf() were pulled out of the main Rx processing loop and were scoped from cached_ntc to current ntc, remember that now mentioned function relies on rx_buf->act, which is set within ice_run_xdp(). ice_run_xdp() is called when EOP bit was found, so currently we could put Rx buffer with rx_buf->act being *uninitialized*. To address this, change scoping to rely on first_desc on both boundaries instead. This also implies that cleaned_count which is used as an input to ice_alloc_rx_buffers() and tells how many new buffers should be refilled has to be adjusted. If it stayed as is, what could happen is a case where ntc would go over ntu. Therefore, remove cleaned_count altogether and use against allocing routine newly introduced ICE_RX_DESC_UNUSED() macro which is an equivalent of ICE_DESC_UNUSED() dedicated for Rx side and based on struct ice_rx_ring::first_desc instead of next_to_clean. Signed-off-by: Maciej Fijalkowski Signed-off-by: Daniel Borkmann Reviewed-by: Alexander Lobakin Link: https://lore.kernel.org/bpf/20230131204506.219292-11-maciej.fijalkowski@intel.com commit 8a11b334ec9b8088b54764424a49adb8ef1c002a Author: Maciej Fijalkowski Date: Tue Jan 31 21:45:02 2023 +0100 ice: Use xdp->frame_sz instead of recalculating truesize SKB path calculates truesize on three different functions, which could be avoided as xdp_buff carries the already calculated truesize under xdp_buff::frame_sz. If ice_add_rx_frag() is adjusted to take the xdp_buff as an input just like functions responsible for creating sk_buff initially, codebase could be simplified by removing these redundant recalculations and rely on xdp_buff::frame_sz instead. Signed-off-by: Maciej Fijalkowski Signed-off-by: Daniel Borkmann Reviewed-by: Alexander Lobakin Link: https://lore.kernel.org/bpf/20230131204506.219292-10-maciej.fijalkowski@intel.com commit 9070fe3da0b126044c3cffd169d5fb2565365a0e Author: Maciej Fijalkowski Date: Tue Jan 31 21:45:01 2023 +0100 ice: Do not call ice_finalize_xdp_rx() unnecessarily Currently ice_finalize_xdp_rx() is called only when xdp_prog is present on VSI, which is a good thing. However, this optimization can be enhanced and check only if any of the XDP_TX/XDP_REDIRECT took place in current Rx processing. Non-zero value of @xdp_xmit indicates that xdp_prog is present on VSI. This way XDP_DROP-based workloads will not suffer from unnecessary calls to external function. Signed-off-by: Maciej Fijalkowski Signed-off-by: Daniel Borkmann Reviewed-by: Alexander Lobakin Link: https://lore.kernel.org/bpf/20230131204506.219292-9-maciej.fijalkowski@intel.com commit 60bc72b3c4e9127f29686770005da40b10be0576 Author: Maciej Fijalkowski Date: Tue Jan 31 21:45:00 2023 +0100 ice: Use ice_max_xdp_frame_size() in ice_xdp_setup_prog() This should have been used in there from day 1, let us address that before introducing XDP multi-buffer support for Rx side. Signed-off-by: Maciej Fijalkowski Signed-off-by: Daniel Borkmann Reviewed-by: Alexander Lobakin Link: https://lore.kernel.org/bpf/20230131204506.219292-8-maciej.fijalkowski@intel.com commit 1dc1a7e7f4108bad4af4c7c838f963d342ac0544 Author: Maciej Fijalkowski Date: Tue Jan 31 21:44:59 2023 +0100 ice: Centrallize Rx buffer recycling Currently calls to ice_put_rx_buf() are sprinkled through ice_clean_rx_irq() - first place is for explicit flow director's descriptor handling, second is after running XDP prog and the last one is after taking care of skb. 1st callsite was actually only for ntc bump purpose, as Rx buffer to be recycled is not even passed to a function. It is possible to walk through Rx buffers processed in particular NAPI cycle by caching ntc from beginning of the ice_clean_rx_irq(). To do so, let us store XDP verdict inside ice_rx_buf, so action we need to take on will be known. For XDP prog absence, just store ICE_XDP_PASS as a verdict. Signed-off-by: Maciej Fijalkowski Signed-off-by: Daniel Borkmann Reviewed-by: Alexander Lobakin Link: https://lore.kernel.org/bpf/20230131204506.219292-7-maciej.fijalkowski@intel.com commit e44f4790a2ba3585fad5d40b61e1fd5d2a9835ab Author: Maciej Fijalkowski Date: Tue Jan 31 21:44:58 2023 +0100 ice: Inline eop check This might be in future used by ZC driver and might potentially yield a minor performance boost. While at it, constify arguments that ice_is_non_eop() takes, since they are pointers and this will help compiler while generating asm. Signed-off-by: Maciej Fijalkowski Signed-off-by: Daniel Borkmann Reviewed-by: Alexander Lobakin Link: https://lore.kernel.org/bpf/20230131204506.219292-6-maciej.fijalkowski@intel.com commit d7956d81f1502d3818500cff4847f3e9ae0c6aa4 Author: Maciej Fijalkowski Date: Tue Jan 31 21:44:57 2023 +0100 ice: Pull out next_to_clean bump out of ice_put_rx_buf() Plan is to move ice_put_rx_buf() to the end of ice_clean_rx_irq() so in order to keep the ability of walking through HW Rx descriptors, pull out next_to_clean handling out of ice_put_rx_buf(). Signed-off-by: Maciej Fijalkowski Signed-off-by: Daniel Borkmann Reviewed-by: Alexander Lobakin Link: https://lore.kernel.org/bpf/20230131204506.219292-5-maciej.fijalkowski@intel.com commit ac0753391195011ded23696d7882428e5c419a98 Author: Maciej Fijalkowski Date: Tue Jan 31 21:44:56 2023 +0100 ice: Store page count inside ice_rx_buf This will allow us to avoid carrying additional auxiliary array of page counts when dealing with XDP multi buffer support. Previously combining fragmented frame to skb was not affected in the same way as XDP would be as whole frame is needed to be in place before executing XDP prog. Therefore, when going through HW Rx descriptors one-by-one, calls to ice_put_rx_buf() need to be taken *after* running XDP prog on a potentially multi buffered frame, so some additional storage of page count is needed. By adding page count to rx buf, it will make it easier to walk through processed entries at the end of rx cleaning routine and decide whether or not buffers should be recycled. While at it, bump ice_rx_buf::pagecnt_bias from u16 up to u32. It was proven many times that calculations on variables smaller than standard register size are harmful. This was also the case during experiments with embedding page count to ice_rx_buf - when this was added as u16 it had a performance impact. Signed-off-by: Maciej Fijalkowski Signed-off-by: Daniel Borkmann Reviewed-by: Alexander Lobakin Link: https://lore.kernel.org/bpf/20230131204506.219292-4-maciej.fijalkowski@intel.com commit cb0473e0e9dccaa0ddafb252f2c3ef943b86bb56 Author: Maciej Fijalkowski Date: Tue Jan 31 21:44:55 2023 +0100 ice: Add xdp_buff to ice_rx_ring struct In preparation for XDP multi-buffer support, let's store xdp_buff on Rx ring struct. 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. For now it is kept and layout of Rx ring struct was not inspected, some member movement will be needed later on so that will be the time to take care of it. Signed-off-by: Maciej Fijalkowski Signed-off-by: Daniel Borkmann Reviewed-by: Alexander Lobakin Link: https://lore.kernel.org/bpf/20230131204506.219292-3-maciej.fijalkowski@intel.com commit c61bcebde72de7f5dc194d28f29894f0f7661ff7 Author: Maciej Fijalkowski Date: Tue Jan 31 21:44:54 2023 +0100 ice: Prepare legacy-rx for upcoming XDP multi-buffer support Rx path is going to be modified in a way that fragmented frame will be gathered within xdp_buff in the first place. This approach implies that underlying buffer has to provide tailroom for skb_shared_info. This is currently the case when ring uses build_skb but not when legacy-rx knob is turned on. This case configures 2k Rx buffers and has no way to provide either headroom or tailroom - FWIW it currently has XDP_PACKET_HEADROOM which is broken and in here it is removed. 2k Rx buffers were used so driver in this setting was able to support 9k MTU as it can chain up to 5 Rx buffers. With offset configuring HW writing 2k of a data was passing the half of the page which broke the assumption of our internal page recycling tricks. Now if above got fixed and legacy-rx path would be left as is, when referring to skb_shared_info via xdp_get_shared_info_from_buff(), packet's content would be corrupted again. Hence size of Rx buffer needs to be lowered and therefore supported MTU. This operation will allow us to keep the unified data path and with 8k MTU users (if any of legacy-rx) would still be good to go. However, tendency is to drop the support for this code path at some point. Add ICE_RXBUF_1664 as vsi::rx_buf_len and ICE_MAX_FRAME_LEGACY_RX (8320) as vsi::max_frame for legacy-rx. For bigger page sizes configure 3k Rx buffers, not 2k. Since headroom support is removed, disable data_meta support on legacy-rx. When preparing XDP buff, rely on ice_rx_ring::rx_offset setting when deciding whether to support data_meta or not. Signed-off-by: Maciej Fijalkowski Signed-off-by: Daniel Borkmann Reviewed-by: Alexander Lobakin Link: https://lore.kernel.org/bpf/20230131204506.219292-2-maciej.fijalkowski@intel.com commit 1746212daeba95e9ae1639227dc0c3591d41deeb Author: Namhyung Kim Date: Mon Jan 30 18:33:47 2023 -0800 perf inject: Use perf_data__read() for auxtrace In copy_bytes(), it reads the data from the (input) fd and writes it to the output file. But it does with the read(2) unconditionally which caused a problem of mixing buffered vs unbuffered I/O together. You can see the problem when using pipes. $ perf record -e intel_pt// -o- true | perf inject -b > /dev/null [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.000 MB - ] 0x45c0 [0x30]: failed to process type: 71 It should use perf_data__read() to honor the 'use_stdio' setting. Fixes: 601366678c93618f ("perf data: Allow to use stdio functions for pipe mode") Reviewed-by: Adrian Hunter Reviewed-by: James Clark Signed-off-by: Namhyung Kim Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20230131023350.1903992-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f65092015a83348fdc2f509e4ad8278e0c2df0cd Author: Vipin Sharma Date: Mon Dec 12 10:37:18 2022 -0800 KVM: selftests: Replace hardcoded Linux OS id with HYPERV_LINUX_OS_ID Use HYPERV_LINUX_OS_ID macro instead of hardcoded 0x8100 << 48 Signed-off-by: Vipin Sharma Reviewed-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20221212183720.4062037-12-vipinsh@google.com Signed-off-by: Sean Christopherson commit c4a46627e5a846e59f0097e3196f142eb6142f4f Author: Vipin Sharma Date: Mon Dec 12 10:37:17 2022 -0800 KVM: selftests: Test Hyper-V extended hypercall enablement Test Hyper-V extended hypercall, HV_EXT_CALL_QUERY_CAPABILITIES (0x8001), access denied and invalid parameter cases. Access is denied if CPUID.0x40000003.EBX BIT(20) is not set. Invalid parameter if call has fast bit set. Signed-off-by: Vipin Sharma Link: https://lore.kernel.org/r/20221212183720.4062037-11-vipinsh@google.com Signed-off-by: Sean Christopherson commit db9cf24cea69773410f0049bdfa795d7c2bd0ea9 Author: Vipin Sharma Date: Mon Dec 12 10:37:16 2022 -0800 KVM: x86: hyper-v: Add extended hypercall support in Hyper-v Add support for extended hypercall in Hyper-v. Hyper-v TLFS 6.0b describes hypercalls above call code 0x8000 as extended hypercalls. A Hyper-v hypervisor's guest VM finds availability of extended hypercalls via CPUID.0x40000003.EBX BIT(20). If the bit is set then the guest can call extended hypercalls. All extended hypercalls will exit to userspace by default. This allows for easy support of future hypercalls without being dependent on KVM releases. If there will be need to process the hypercall in KVM instead of userspace then KVM can create a capability which userspace can query to know which hypercalls can be handled by the KVM and enable handling of those hypercalls. Signed-off-by: Vipin Sharma Reviewed-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20221212183720.4062037-10-vipinsh@google.com Signed-off-by: Sean Christopherson commit 1a9df3262a632020071327abf56e9243e4dd7bde Author: Vipin Sharma Date: Mon Dec 12 10:37:15 2022 -0800 KVM: x86: hyper-v: Use common code for hypercall userspace exit Remove duplicate code to exit to userspace for hyper-v hypercalls and use a common place to exit. No functional change intended. Signed-off-by: Vipin Sharma Suggested-by: Sean Christopherson Reviewed-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20221212183720.4062037-9-vipinsh@google.com Signed-off-by: Sean Christopherson commit d5dbcfe7ee31ccea85a8cbf7ff84a2808d6c8f76 Author: Benjamin Berg Date: Tue Nov 22 11:07:33 2022 +0100 um: Declare fix_range_common as a static function It is only used within the same file. Signed-off-by: Benjamin Berg Signed-off-by: Richard Weinberger commit d119595f873e4cf4c7a03aa9ac00d960772487e1 Author: Benjamin Berg Date: Tue Nov 22 11:07:32 2022 +0100 um: Switch printk calls to adhere to correct coding style This means having the string literal in one line and using __func__ where appropriate. Signed-off-by: Benjamin Berg Signed-off-by: Richard Weinberger commit 8f88c73afe481f93d40801596927e8c0047b6d96 Author: Xiang Yang Date: Tue Nov 15 15:32:25 2022 +0800 um: vector: Fix memory leak in vector_config If the return value of the uml_parse_vector_ifspec function is NULL, we should call kfree(params) to prevent memory leak. Fixes: 49da7e64f33e ("High Performance UML Vector Network Driver") Signed-off-by: Xiang Yang Acked-By: Anton Ivanov Signed-off-by: Richard Weinberger commit 3271e27bba90f676fa530592ba8ec9fe51938abf Author: Johannes Berg Date: Tue Oct 18 12:49:49 2022 +0200 um: protect VMA iteration Due to changes in the iteration, there are now lockdep checks indicating that we're missing locking here. Add the missing locking where it's needed. Signed-off-by: Johannes Berg Acked-By: Anton Ivanov Signed-off-by: Richard Weinberger commit e0820368d0101452a9a35c903a549b7f32a6edff Author: Fabio M. De Francesco Date: Thu Oct 13 18:17:00 2022 +0200 hostfs: Replace kmap() with kmap_local_page() The use of kmap() is being deprecated in favor of kmap_local_page(). There are two main problems with kmap(): (1) It comes with an overhead as the mapping space is restricted and protected by a global lock for synchronization and (2) it also requires global TLB invalidation when the kmap’s pool wraps and it might block when the mapping space is fully utilized until a slot becomes available. With kmap_local_page() the mappings are per thread, CPU local, can take page faults, and can be called from any context (including interrupts). It is faster than kmap() in kernels with HIGHMEM enabled. Furthermore, the tasks can be preempted and, when they are scheduled to run again, the kernel virtual addresses are restored and still valid. Therefore, replace kmap() with kmap_local_page() in hostfs_kern.c, it being the only file with kmap() call sites currently left in fs/hostfs. Cc: "Venkataramanan, Anirudh" Suggested-by: Ira Weiny Signed-off-by: Fabio M. De Francesco Signed-off-by: Richard Weinberger commit 28b2bb06a381816c2c111afba4984f8ea2c17e0f Author: Yang Li Date: Wed Sep 21 09:06:09 2022 +0800 um: remove unneeded semicolon while(){}, semicolon do not need to be appended. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2237 Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Richard Weinberger commit a0a9ad95ddccaefa0f743d0af427cba936b9daac Author: ye xingchen Date: Tue Sep 20 06:30:53 2022 +0000 um: Remove the unneeded result variable Return the value epoll_ctl() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen Signed-off-by: Richard Weinberger commit 6130543654e0e5a79485ed8538c0bf2259fe7431 Author: Dmitry Torokhov Date: Tue Jan 31 21:34:47 2023 -0800 ieee802154: at86rf230: switch to using gpiod API Switch the driver from legacy gpio API that is deprecated to the newer gpiod API that respects line polarities described in ACPI/DT. Signed-off-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20230201053447.4098486-2-dmitry.torokhov@gmail.com Signed-off-by: Stefan Schmidt commit 9b26ed18545056794bf9d3f3defd9e09719ff4f5 Author: Dmitry Torokhov Date: Tue Jan 31 21:34:46 2023 -0800 ieee802154: at86rf230: drop support for platform data There are no users of platform data in the mainline tree, and new boards should use either ACPI or device tree, so let's stop supporting it. This will help with converting the driver to gpiod API. Signed-off-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20230201053447.4098486-1-dmitry.torokhov@gmail.com Signed-off-by: Stefan Schmidt commit 9f2ad955f98366003e887e32bdd4ea98ef2a04f4 Author: Stefan Schmidt Date: Wed Feb 1 21:10:26 2023 +0100 Revert "at86rf230: convert to gpio descriptors" This reverts commit 622bd6ea90086beb98ac439edd7d57de73d1d6f9. Dmitry Torokhov points out that this conversion leaves an existing board in reset state due to not properly handled polarity. Additionally, the GPIO name inadvertenly changes from "reset-gpio" to "rstn-gpios". Revert to avoid these regressions. Follow up patches for a better conversion are applied as well. Signed-off-by: Stefan Schmidt commit 168a9c91fe0a1180959b6394f4566de7080244b6 Author: Tomasz Duszynski Date: Tue Jan 31 09:33:49 2023 +0100 vfio: platform: ignore missing reset if disabled at module init If reset requirement was relaxed via module parameter, errors caused by missing reset should not be propagated down to the vfio core. Otherwise initialization will fail. Signed-off-by: Tomasz Duszynski Fixes: 5f6c7e0831a1 ("vfio/platform: Use the new device life cycle helpers") Reviewed-by: Kevin Tian Reviewed-by: Eric Auger Link: https://lore.kernel.org/r/20230131083349.2027189-1-tduszynski@marvell.com Signed-off-by: Alex Williamson commit b1cb1fac22abf102ffeb29dd3eeca208a3869d54 Author: Sean Christopherson Date: Mon Dec 19 17:19:24 2022 +0000 KVM: Destroy target device if coalesced MMIO unregistration fails Destroy and free the target coalesced MMIO device if unregistering said device fails. As clearly noted in the code, kvm_io_bus_unregister_dev() does not destroy the target device. BUG: memory leak unreferenced object 0xffff888112a54880 (size 64): comm "syz-executor.2", pid 5258, jiffies 4297861402 (age 14.129s) hex dump (first 32 bytes): 38 c7 67 15 00 c9 ff ff 38 c7 67 15 00 c9 ff ff 8.g.....8.g..... e0 c7 e1 83 ff ff ff ff 00 30 67 15 00 c9 ff ff .........0g..... backtrace: [<0000000006995a8a>] kmalloc include/linux/slab.h:556 [inline] [<0000000006995a8a>] kzalloc include/linux/slab.h:690 [inline] [<0000000006995a8a>] kvm_vm_ioctl_register_coalesced_mmio+0x8e/0x3d0 arch/x86/kvm/../../../virt/kvm/coalesced_mmio.c:150 [<00000000022550c2>] kvm_vm_ioctl+0x47d/0x1600 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3323 [<000000008a75102f>] vfs_ioctl fs/ioctl.c:46 [inline] [<000000008a75102f>] file_ioctl fs/ioctl.c:509 [inline] [<000000008a75102f>] do_vfs_ioctl+0xbab/0x1160 fs/ioctl.c:696 [<0000000080e3f669>] ksys_ioctl+0x76/0xa0 fs/ioctl.c:713 [<0000000059ef4888>] __do_sys_ioctl fs/ioctl.c:720 [inline] [<0000000059ef4888>] __se_sys_ioctl fs/ioctl.c:718 [inline] [<0000000059ef4888>] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:718 [<000000006444fa05>] do_syscall_64+0x9f/0x4e0 arch/x86/entry/common.c:290 [<000000009a4ed50b>] entry_SYSCALL_64_after_hwframe+0x49/0xbe BUG: leak checking failed Fixes: 5d3c4c79384a ("KVM: Stop looking for coalesced MMIO zones if the bus is destroyed") Cc: stable@vger.kernel.org Reported-by: 柳菁峰 Reported-by: Michal Luczaj Link: https://lore.kernel.org/r/20221219171924.67989-1-seanjc@google.com Link: https://lore.kernel.org/all/20230118220003.1239032-1-mhal@rbox.co Signed-off-by: Sean Christopherson commit 37e98d9bedb50644654fd196e38acad49903fadc Author: Greg Kroah-Hartman Date: Wed Feb 1 09:33:49 2023 +0100 driver core: bus: move lock_class_key into dynamic structure Move the lock_class_key structure out of struct bus_type and into the dynamic structure we create already for all bus_types registered with the kernel. This saves on static space and removes one more writable field in struct bus_type. In the future, the same field can be moved out of the struct class logic because it shares this same private structure. Most everyone will never notice this change, as lockdep is not enabled in real systems so no memory or logic changes are happening for them. Cc: "Rafael J. Wysocki" Acked-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20230201083349.4038660-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 074dd3b35aaa4807306268c1654200d3608ebbf3 Merge: dd25cfab16e6b 8589ba4e642aa Author: Jakub Kicinski Date: Wed Feb 1 10:57:03 2023 -0800 Merge branch 'devlink-trivial-names-cleanup' Jiri Pirko says: ==================== devlink: trivial names cleanup This is a follow-up to Jakub's devlink code split and dump iteration helper patchset. No functional changes, just couple of renames to makes things consistent and perhaps easier to follow. ==================== Link: https://lore.kernel.org/r/20230131090613.2131740-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit 8589ba4e642aa257fa46ee82c975921e19db47d5 Author: Jiri Pirko Date: Tue Jan 31 10:06:13 2023 +0100 devlink: rename and reorder instances of struct devlink_cmd In order to maintain naming consistency, rename and reorder all usages of struct struct devlink_cmd in the following way: 1) Remove "gen" and replace it with "cmd" to match the struct name 2) Order devl_cmds[] and the header file to match the order of enum devlink_command 3) Move devl_cmd_rate_get among the peers 4) Remove "inst" for DEVLINK_CMD_GET 5) Add "_get" suffix to all to match DEVLINK_CMD_*_GET (only rate had it done correctly) Signed-off-by: Jiri Pirko Reviewed-by: Leon Romanovsky Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit f87445953d4c1cbcaa110f95dfd64193756f7353 Author: Jiri Pirko Date: Tue Jan 31 10:06:12 2023 +0100 devlink: remove "gen" from struct devlink_gen_cmd name No need to have "gen" inside name of the structure for devlink commands. Remove it. Signed-off-by: Jiri Pirko Reviewed-by: Leon Romanovsky Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit c3a4fd5718ea6756f2289f4d89468b54ad3d02aa Author: Jiri Pirko Date: Tue Jan 31 10:06:11 2023 +0100 devlink: rename devlink_nl_instance_iter_dump() to "dumpit" To have the name of the function consistent with the struct cb name, rename devlink_nl_instance_iter_dump() to devlink_nl_instance_iter_dumpit(). Signed-off-by: Jiri Pirko Reviewed-by: Jacob Keller Reviewed-by: Leon Romanovsky Signed-off-by: Jakub Kicinski commit 8b3517f88ff2983f52698893519227c10aac90b2 Author: Huacai Chen Date: Wed Feb 1 12:30:18 2023 +0800 PCI: loongson: Prevent LS7A MRRS increases Except for isochronous-configured devices, software may set Max_Read_Request_Size (MRRS) to any value up to 4096. If a device issues a read request with size greater than the completer's Max_Payload_Size (MPS), the completer is required to break the response into multiple completions. Instead of correctly responding with multiple completions to a large read request, some LS7A Root Ports respond with a Completer Abort. To prevent this, the MRRS must be limited to an implementation-specific value. The OS cannot detect that value, so rely on BIOS to configure MRRS before booting, and quirk the Root Ports so we never set an MRRS larger than that BIOS value for any downstream device. N.B. Hot-added devices are not configured by BIOS, and they power up with MRRS = 512 bytes, so these devices will be limited to 512 bytes. If the LS7A limit is smaller, those hot-added devices may not work correctly, but per [1], hotplug is not supported with this chipset revision. [1] https://lore.kernel.org/r/073638a7-ae68-2847-ac3d-29e5e760d6af@loongson.cn [bhelgaas: commit log] Link: https://bugzilla.kernel.org/show_bug.cgi?id=216884 Link: https://lore.kernel.org/r/20230201043018.778499-3-chenhuacai@loongson.cn Signed-off-by: Huacai Chen Signed-off-by: Bjorn Helgaas commit 62b6dee1b44aa23b3935543aff7df80399ec726b Author: Huacai Chen Date: Wed Feb 1 12:30:17 2023 +0800 PCI/portdrv: Prevent LS7A Bus Master clearing on shutdown After cc27b735ad3a ("PCI/portdrv: Turn off PCIe services during shutdown") we observe hangs during poweroff/reboot on systems with LS7A chipset. This happens because the portdrv .shutdown() method (pcie_portdrv_remove()) clears PCI_COMMAND_MASTER via pci_disable_device(), which prevents bridges from forwarding memory or I/O Requests in the upstream direction (PCIe r6.0, sec 7.5.1.1.3). LS7A Root Ports have a hardware defect: clearing PCI_COMMAND_MASTER *also* prevents the bridge from forwarding CPU MMIO requests in the downstream direction, and these MMIO accesses to devices below the bridge happen even after .shutdown(), e.g., to print console messages. LS7A neither forwards the requests nor sends an unsuccessful completion to the CPU, so the CPU waits forever, resulting in the hang. The purpose of .shutdown() is to disable interrupts and DMA from the device. PCIe ports may generate interrupts (either MSI/MSI-X or INTx) for AER, DPC, PME, hotplug, etc., but they never perform DMA except MSI/MSI-X. Clearing PCI_COMMAND_MASTER effectively disables MSI/MSI-X, but not INTx. The port service driver .remove() methods clear the interrupt enables in PCI_ERR_ROOT_COMMAND, PCI_EXP_DPC_CTL, PCI_EXP_SLTCTL, and PCI_EXP_RTCTL, etc., which disables interrupts regardless of whether they are MSI/MSI-X or INTx. Add a pcie_portdrv_shutdown() method that calls all the port service driver .remove() methods to clear the interrupt enables for each service but does not clear Bus Mastering on the port itself. [bhelgaas: commit log] Link: https://lore.kernel.org/r/20230201043018.778499-2-chenhuacai@loongson.cn Signed-off-by: Huacai Chen Signed-off-by: Bjorn Helgaas commit ad678be4238720384fa9e21b9b08b5540ac7ca5d Author: Mark Brown Date: Tue Jan 31 22:20:45 2023 +0000 arm64/signal: Only read new data when parsing the ZT context When we parse the ZT signal context we read the entire context from userspace, including the generic signal context header which was already read by parse_user_sigframe() and padding bytes that we ignore. Avoid the possibility of relying on the second read of the data read twice by only reading the data which we are actually going to use. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221212-arm64-signal-cleanup-v3-7-4545c94b20ff@kernel.org Signed-off-by: Catalin Marinas commit 24d68345a02aee155b22deb26fde3e08332d8f88 Author: Mark Brown Date: Tue Jan 31 22:20:44 2023 +0000 arm64/signal: Only read new data when parsing the ZA context When we parse the ZA signal context we read the entire context from userspace, including the generic signal context header which was already read by parse_user_sigframe() and padding bytes that we ignore. Avoid the possibility of relying on the second read of the data read twice by only reading the data which we are actually going to use. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221212-arm64-signal-cleanup-v3-6-4545c94b20ff@kernel.org Signed-off-by: Catalin Marinas commit f3ac48aa3a58b0d0b1104416a652dc7da9c03b4a Author: Mark Brown Date: Tue Jan 31 22:20:43 2023 +0000 arm64/signal: Only read new data when parsing the SVE context When we parse the SVE signal context we read the entire context from userspace, including the generic signal context header which was already read by parse_user_sigframe() and padding bytes that we ignore. Avoid the possibility of relying on the second read of the data read twice by only reading the data which we are actually going to use. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221212-arm64-signal-cleanup-v3-5-4545c94b20ff@kernel.org Signed-off-by: Catalin Marinas commit b57682b315588aab496439e317c0f433f28600ae Author: Mark Brown Date: Tue Jan 31 22:20:42 2023 +0000 arm64/signal: Avoid rereading context frame sizes We need to read the sizes of the signal context frames as part of parsing the overall signal context in parse_user_sigframe(). In the cases where we defer frame specific parsing to other functions those functions (other than the recently added TPIDR2 parser) reread the size and validate the version they read, opening the possibility that the value may change. Avoid this possibility by passing the size read in parse_user_sigframe() through user_ctxs and referring to that. For consistency we move the size check for the TPIDR2 context into the TPIDR2 parsing function. Note that for SVE, ZA and ZT contexts we still read the size again but after this change we no longer use the value, further changes will avoid the read. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221212-arm64-signal-cleanup-v3-4-4545c94b20ff@kernel.org Signed-off-by: Catalin Marinas commit 4e4e93045fe1ad83dce7448690458b7f73669044 Author: Mark Brown Date: Tue Jan 31 22:20:41 2023 +0000 arm64/signal: Make interface for restore_fpsimd_context() consistent Instead of taking a pointer to struct user_ctxs like the other two restore_blah_context() functions the FPSIMD function takes a pointer to the user struct it should read. Change it to be consistent with the rest, both for consistency and to prepare for changes which avoid rereading data that has already been read by the core parsing code. There should be no functional change from this patch. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221212-arm64-signal-cleanup-v3-3-4545c94b20ff@kernel.org Signed-off-by: Catalin Marinas commit 0eb23720f29e4e7010c4b5195cf0d6500921a146 Author: Mark Brown Date: Tue Jan 31 22:20:40 2023 +0000 arm64/signal: Remove redundant size validation from parse_user_sigframe() There is some minimal size validation in parse_user_sigframe() however all of the individual parsing functions perform frame specific validation of the sizing information, remove the frame specific size checks in the core so that there isn't any confusion about what we validate for size. Since the checks in the SVE and ZA parsing are after we have read the relevant context and since they won't report an error if the frame is undersized they are adjusted to check for this before doing anything else. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221212-arm64-signal-cleanup-v3-2-4545c94b20ff@kernel.org Signed-off-by: Catalin Marinas commit 92f14518cc43dcaebfb281dfff2fe14b87633cf4 Author: Mark Brown Date: Tue Jan 31 22:20:39 2023 +0000 arm64/signal: Don't redundantly verify FPSIMD magic We validate that the magic in the struct fpsimd_context is correct in restore_fpsimd_context() but this is redundant since parse_user_sigframe() uses this magic to decide to call the function in the first place. Remove the extra validation. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221212-arm64-signal-cleanup-v3-1-4545c94b20ff@kernel.org Signed-off-by: Catalin Marinas commit ea776e4932302b965a2800e7905d9fa48c0d9e85 Merge: 8ced928019353 b2ab432bcf65e Author: Catalin Marinas Date: Wed Feb 1 17:55:29 2023 +0000 Merge branches 'for-next/tpidr2' and 'for-next/sme2' into for-next/signal Patches on this branch depend on the branches merged above. commit bfffd469e5296b86418aacf6a0142bdef860b22d Author: Mark Brown Date: Tue Jan 31 00:18:47 2023 +0000 arm64/cpufeature: Use helper macros to specify hwcaps At present the hwcaps are hard to read and a bit error prone since the macros used to specify matches require us to write out the register name multiple times and explicitly specify the width of the field, hopefully using the correct constant. Now that all the ID registers are generated we can improve this somewhat by redoing the macros so that we specify the register, field and minimum value symbolically and use token pasting to initialise the capability struct with the appropriate values. We move from specifying like this: HWCAP_CAP(SYS_ID_AA64PFR1_EL1, ID_AA64PFR1_EL1_BT_SHIFT, 4, FTR_UNSIGNED, ID_AA64PFR1_EL1_BT_IMP, CAP_HWCAP, KERNEL_HWCAP_BTI), to this: HWCAP_CAP(ID_AA64PFR1_EL1, BT, IMP, CAP_HWCAP, KERNEL_HWCAP_BTI), which is shorter due to having less duplicate information and makes it much harder to make an error like specifying the wrong field width or an invalid enumeration value since everything must be a constant defined for the sysreg and names are only typed once. There should be no functional effect from this change, a check of the generated .rodata showed no differences. Acked-by: Mark Rutland Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221207-arm64-sysreg-helpers-v4-5-25b6b3fb9d18@kernel.org Signed-off-by: Catalin Marinas commit 82c5acefc9cb8478413610acf5904cec73ddd343 Author: Mark Brown Date: Tue Jan 31 00:18:46 2023 +0000 arm64/cpufeature: Always use symbolic name for feature value in hwcaps Our table of hwcaps sometimes uses the defined constant to specify the enumeration value they are attempting to match but in some cases an unadorned number is used. In preparation for using helper macros to to specify the hwcaps less verbosely replace the magic numbers with their constants, this will hopefully make the conversion to helper macros easier to review. There should be no functional effect from this change, a check of the generate .rodata showed no differences. Acked-by: Mark Rutland Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221207-arm64-sysreg-helpers-v4-4-25b6b3fb9d18@kernel.org Signed-off-by: Catalin Marinas commit ad16d4cf0b4f88b54085036102476588ea0e7626 Author: Mark Brown Date: Tue Jan 31 00:18:45 2023 +0000 arm64/sysreg: Initial unsigned annotations for ID registers In order to allow the simplification of way we declare hwcaps annotate most of the unsigned fields in the identification registers as such. This is not a complete annotation, it does cover all the cases where we already annotate signedness of the field in the hwcaps and some others which I happened to look at and seemed clear but there will be more and nothing outside the identification registers was even looked at. Other fields can be annotated as incrementally as people have the time and need to do so. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221207-arm64-sysreg-helpers-v4-3-25b6b3fb9d18@kernel.org Signed-off-by: Catalin Marinas commit c3ac60aa1cfeee4f3976392a9d1d32e79e78d207 Author: Mark Brown Date: Tue Jan 31 00:18:44 2023 +0000 arm64/sysreg: Initial annotation of signed ID registers We currently annotate a few bitfields as signed in hwcaps, update all of these to be SignedEnum in the sysreg generation. Further signed bitfields can be done incrementally, this is the minimum required for the conversion of the hwcaps to use token pasting to simplify their declaration. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221207-arm64-sysreg-helpers-v4-2-25b6b3fb9d18@kernel.org Signed-off-by: Catalin Marinas commit a55d1425fb2f4000a415164ba08712de9c1b7755 Author: Mark Brown Date: Tue Jan 31 00:18:43 2023 +0000 arm64/sysreg: Allow enumerations to be declared as signed or unsigned Many of our enumerations follow a standard scheme where the values can be treated as signed however there are some where the value must be treated as signed and others that are simple enumerations where there is no clear ordering to the values. Provide new field types SignedEnum and UnsignedEnum which allows the signedness to be specified in the sysreg definition and emit a REG_FIELD_SIGNED define for these which is a boolean corresponding to our current FTR_UNSIGNED and FTR_SIGNED macros. Existing Enums will need to be converted, since these do not have a define generated anyone wishing to use the sign of one of these will need to explicitly annotate that field so nothing should start going wrong by default. Acked-by: Mark Rutland Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221207-arm64-sysreg-helpers-v4-1-25b6b3fb9d18@kernel.org Signed-off-by: Catalin Marinas commit 9b074bb1ea3a0c3fe9183076dbaa337fb0776724 Merge: 1abf363d085cf 4f2c9bf16a4bc b2ab432bcf65e Author: Catalin Marinas Date: Wed Feb 1 17:49:01 2023 +0000 Merge branches 'for-next/sysreg', 'for-next/compat-hwcap' and 'for-next/sme2' into for-next/sysreg-hwcaps Patches on this branch depend on the branches merged above. commit ed821cf84e7b969fb5b63598c89d3428a30d8d31 Author: Hou Tao Date: Wed Feb 1 15:59:20 2023 +0800 md: use MD_RESYNC_* whenever possible Just replace magic numbers by MD_RESYNC_* enumerations. Signed-off-by: Hou Tao Reviewed-by: Logan Gunthorpe Signed-off-by: Song Liu commit 0f48b0ed356d8868f62f7c6814fc2edcd70d1816 Author: Johan Jonker Date: Thu Dec 29 12:39:17 2022 +0100 dt-bindings: phy: rename phy-rockchip-inno-usb2.yaml Rename phy-rockchip-inno-usb2.yaml to a more common format of rockchip,inno-usb2phy.yaml Signed-off-by: Johan Jonker Acked-By: Vinod Koul Acked-by: Rob Herring Link: https://lore.kernel.org/r/99794484-d67e-ee1f-4e76-200de20a879c@gmail.com Signed-off-by: Heiko Stuebner commit 47d72bbb6c0f7dc0901d7601d1aa6b1419282049 Author: Vignesh Raghavendra Date: Thu Jan 26 12:41:59 2023 +0530 arm64: dts: ti: Makefile: Rearrange entries alphabetically Entries are first grouped as per SoC present on the board. Groups are sorted alphabetically. This makes it easy to know SoC to board mapping and also add new entries in alphabetical order. Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230126071159.2337584-1-vigneshr@ti.com commit 635fb18ba00893f4d9ca468326277d445533f05e Author: Dasnavis Sabiya Date: Thu Jan 19 18:59:58 2023 +0530 arch: arm64: dts: Add support for AM69 Starter Kit AM69 Starter Kit is a single board designed for TI AM69 SOC that provides advanced system integration in automotive ADAS applications, autonomous mobile robot and edge AI applications. The SOC comprises of Cortex-A72s in dual clusters, lockstep capable dual Cortex-R5F MCUs, Vision Processing Accelerators (VPAC) with Image Signal Processor (ISP) and multiple vision assist accelerators, Depth and Motion Processing Accelerators (DMPAC), Deep-learning Matrix Multiply Accelerator(MMA) and C7x floating point vector DSP AM69 SK supports the following interfaces: * 32 GB LPDDR4 RAM * x1 Gigabit Ethernet interface * x3 USB 3.0 Type-A ports * x1 USB 3.0 Type-C port * x1 UHS-1 capable micro-SD card slot * x4 MCAN instances * 32 GB eMMC Flash * 512 Mbit OSPI flash * x2 Display connectors * x1 PCIe M.2 M Key * x1 PCIe M.2 E Key * x1 4L PCIe Card Slot * x3 CSI2 Camera interface * 40-pin Raspberry Pi header Add initial support for the AM69 SK board. Design Files: https://www.ti.com/lit/zip/SPRR466 TRM: https://www.ti.com/lit/zip/spruj52 Signed-off-by: Dasnavis Sabiya Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230119132958.124435-3-sabiya.d@ti.com commit aec7cb182db703dc493274090640daad3fb56a95 Author: Dasnavis Sabiya Date: Thu Jan 19 18:59:57 2023 +0530 dt-bindings: arm: ti: Add binding for AM69 Starter Kit AM69 Starter Kit is a single board designed for TI AM69 SoC. The AM69 SoC belongs to the K3 Multicore SoC architecture platform, providing advanced system integration in automotive ADAS applications, autonomous mobile robot and edge AI applications. Add DT binding for AM69 Starter Kit. Signed-off-by: Dasnavis Sabiya Acked-by: Krzysztof Kozlowski Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230119132958.124435-2-sabiya.d@ti.com commit a7db82f18cd3d85ea8ef70fca5946b441187ed6d Author: Mark Brown Date: Tue Jan 31 22:56:35 2023 +0000 kselftest/arm64: Fix enumeration of systems without 128 bit SME for SSVE+ZA The current signal handling tests for SME do not account for the fact that unlike SVE all SME vector lengths are optional so we can't guarantee that we will encounter the minimum possible VL, they will hang enumerating VLs on such systems. Abort enumeration when we find the lowest VL in the newly added ssve_za_regs test. Fixes: bc69da5ff087 ("kselftest/arm64: Verify simultaneous SSVE and ZA context generation") Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230131-arm64-kselftest-sig-sme-no-128-v1-2-d47c13dc8e1e@kernel.org Signed-off-by: Catalin Marinas commit 5f389238534ac8ca4ee3ab12eeb89d3984d303a1 Author: Mark Brown Date: Tue Jan 31 22:56:34 2023 +0000 kselftest/arm64: Fix enumeration of systems without 128 bit SME The current signal handling tests for SME do not account for the fact that unlike SVE all SME vector lengths are optional so we can't guarantee that we will encounter the minimum possible VL, they will hang enumerating VLs on such systems. Abort enumeration when we find the lowest VL. Fixes: 4963aeb35a9e ("kselftest/arm64: signal: Add SME signal handling tests") Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230131-arm64-kselftest-sig-sme-no-128-v1-1-d47c13dc8e1e@kernel.org Signed-off-by: Catalin Marinas commit 4365eec8190c237aea723e6ac9529789215558e1 Author: Mark Brown Date: Tue Jan 31 18:28:05 2023 +0000 kselftest/arm64: Don't require FA64 for streaming SVE tests During early development a dependedncy was added on having FA64 available so we could use the full FPSIMD register set in the signal handler. Subsequently the ABI was finialised so the handler is run with streaming mode disabled meaning this is redundant but the dependency was never removed, do so now. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230131-arm64-kselfetest-ssve-fa64-v1-1-f418efcc2b60@kernel.org Signed-off-by: Catalin Marinas commit a20717aca33b1ff133f513721050fe6c3d7f97b5 Author: Thomas Weißschuh Date: Tue Dec 27 16:01:03 2022 +0000 objtool: Optimize layout of struct special_alt Reduce the size of struct special_alt from 72 to 64 bytes. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20221216-objtool-memory-v2-7-17968f85a464@weissschuh.net Signed-off-by: Josh Poimboeuf commit 21a899f9fc78be6b289ee4627bccadf560930eb5 Author: Thomas Weißschuh Date: Tue Dec 27 16:01:02 2022 +0000 objtool: Optimize layout of struct symbol Reduce the size of struct symbol on x86_64 from 208 to 200 bytes. This structure is allocated a lot and never freed. This reduces maximum memory usage while processing vmlinux.o from 2919716 KB to 2917988 KB (-0.5%) on my notebooks "localmodconfig". Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20221216-objtool-memory-v2-6-17968f85a464@weissschuh.net Signed-off-by: Josh Poimboeuf commit 8045b8f0b17edf375849f83c80dd05194850b6ed Author: Thomas Weißschuh Date: Tue Dec 27 16:00:59 2022 +0000 objtool: Allocate multiple structures with calloc() By using calloc() instead of malloc() in a loop, libc does not have to keep around bookkeeping information for each single structure. This reduces maximum memory usage while processing vmlinux.o from 3153325 KB to 3035668 KB (-3.7%) on my notebooks "localmodconfig". Note this introduces memory leaks, because some additional structs get added to the lists later after reading the symbols and sections from the original object. Luckily we don't really care about memory leaks in objtool. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20221216-objtool-memory-v2-3-17968f85a464@weissschuh.net Signed-off-by: Josh Poimboeuf commit cfd66e81799f4a2fdc6447fa99bdb1871f45ff08 Author: Thomas Weißschuh Date: Tue Dec 27 16:00:58 2022 +0000 objtool: Make struct check_options static It is not used outside of builtin-check.c. Also remove the unused declaration from builtin.h . Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20221216-objtool-memory-v2-2-17968f85a464@weissschuh.net Signed-off-by: Josh Poimboeuf commit d93ee0553cf2e83c1696a18423bcf05b94b85e1d Author: Thomas Weißschuh Date: Tue Dec 27 16:00:57 2022 +0000 objtool: Make struct entries[] static and const This data is not modified and not used outside of special.c. Also adapt its users to the constness. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20221216-objtool-memory-v2-1-17968f85a464@weissschuh.net Signed-off-by: Josh Poimboeuf commit cd955bdd6aa5ec54cdef622a142f8899a64b5446 Author: Ian Rogers Date: Thu Jan 26 11:06:06 2023 -0800 objtool: Fix HOSTCC flag usage HOSTCC is always wanted when building objtool. Setting CC to HOSTCC happens after tools/scripts/Makefile.include is included, meaning flags (like CFLAGS) are set assuming say CC is gcc, but then it can be later set to HOSTCC which may be clang. tools/scripts/Makefile.include is needed for host set up and common macros in objtool's Makefile. Rather than override the CC variable to HOSTCC, just pass CC as HOSTCC to the sub-makes of Makefile.build, the libsubcmd builds and also to the linkage step. Signed-off-by: Ian Rogers Link: https://lore.kernel.org/r/20230126190606.40739-4-irogers@google.com Signed-off-by: Josh Poimboeuf commit bf7499553732e68d1b3156ae9ce494c6ab9668d1 Merge: d4bde04318c0d 303feb3cc06ac Author: Mark Brown Date: Wed Feb 1 16:56:47 2023 +0000 spi: Abstract access to chip selects Merge series from Amit Kumar Mahapatra : In preparation for supporting devices with multiple chip selects add an interface for accessing the chip selects via a function. commit 8012094e29253ab52a5e8b621f16bea1e60fbfa4 Author: Jonathan Neuschäfer Date: Wed Feb 1 15:45:34 2023 +1030 ARM: Add wpcm450_defconfig for Nuvoton WPCM450 This defconfig aims to offer a reasonable set of defaults for all systems running on a Nuvoton WPCM450 chip. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20230129041547.942335-1-j.neuschaefer@gmx.net Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20230201051534.1005847-1-joel@jms.id.au Signed-off-by: Arnd Bergmann commit 8eb29c4fbf9661e6bd4dd86197a37ffe0ecc9d50 Author: Mikulas Patocka Date: Sun Jan 22 14:03:31 2023 -0500 dm flakey: fix a bug with 32-bit highmem systems The function page_address does not work with 32-bit systems with high memory. Use bvec_kmap_local/kunmap_local instead. Cc: stable@vger.kernel.org Signed-off-by: Mikulas Patocka Reviewed-by: Sweet Tea Dorminy Signed-off-by: Mike Snitzer commit f50714b57aecb6b3dc81d578e295f86d9c73f078 Author: Mikulas Patocka Date: Sun Jan 22 14:02:57 2023 -0500 dm flakey: don't corrupt the zero page When we need to zero some range on a block device, the function __blkdev_issue_zero_pages submits a write bio with the bio vector pointing to the zero page. If we use dm-flakey with corrupt bio writes option, it will corrupt the content of the zero page which results in crashes of various userspace programs. Glibc assumes that memory returned by mmap is zeroed and it uses it for calloc implementation; if the newly mapped memory is not zeroed, calloc will return non-zeroed memory. Fix this bug by testing if the page is equal to ZERO_PAGE(0) and avoiding the corruption in this case. Cc: stable@vger.kernel.org Fixes: a00f5276e266 ("dm flakey: Properly corrupt multi-page bios.") Signed-off-by: Mikulas Patocka Reviewed-by: Sweet Tea Dorminy Signed-off-by: Mike Snitzer commit 07dbb13542cc022677b64acc6e0bd0d8a2cbf4dc Author: Xiao Ni Date: Sat Jan 21 09:48:10 2023 +0800 md: Free writes_pending in md_stop dm raid calls md_stop to stop the raid device. It needs to free the writes_pending here. Signed-off-by: Xiao Ni Signed-off-by: Song Liu commit 72adae23a72cb12e2ef0dcd7c0aa042867f27998 Author: Xiao Ni Date: Tue Jan 31 13:17:10 2023 +0800 md: Change active_io to percpu Now the type of active_io is atomic. It's used to count how many ios are in the submitting process and it's added and decreased very time. But it only needs to check if it's zero when suspending the raid. So we can switch atomic to percpu to improve the performance. After switching active_io to percpu type, we use the state of active_io to judge if the raid device is suspended. And we don't need to wake up ->sb_wait in md_handle_request anymore. It's done in the callback function which is registered when initing active_io. The argument mddev->suspended is only used to count how many users are trying to set raid to suspend state. Signed-off-by: Xiao Ni Signed-off-by: Song Liu commit d19329133d25ad3dc32f8a62635692cb2f189014 Author: Xiao Ni Date: Tue Jan 31 13:17:09 2023 +0800 md: Factor out is_md_suspended helper This helper function will be used in next patch. It's easy for understanding. Signed-off-by: Xiao Ni Signed-off-by: Song Liu commit 1d1f25bfda432a6b61bd0205d426226bbbd73504 Author: Hou Tao Date: Tue Jan 31 15:07:19 2023 +0800 md: don't update recovery_cp when curr_resync is ACTIVE Don't update recovery_cp when curr_resync is MD_RESYNC_ACTIVE, otherwise md may skip the resync of the first 3 sectors if the resync procedure is interrupted before the first calling of ->sync_request() as shown below: md_do_sync thread control thread // setup resync mddev->recovery_cp = 0 j = 0 mddev->curr_resync = MD_RESYNC_ACTIVE // e.g., set array as idle set_bit(MD_RECOVERY_INTR, &&mddev_recovery) // resync loop // check INTR before calling sync_request !test_bit(MD_RECOVERY_INTR, &mddev->recovery // resync interrupted // update recovery_cp from 0 to 3 // the resync of three 3 sectors will be skipped mddev->recovery_cp = 3 Fixes: eac58d08d493 ("md: Use enum for overloaded magic numbers used by mddev->curr_resync") Cc: stable@vger.kernel.org # 6.0+ Signed-off-by: Hou Tao Reviewed-by: Logan Gunthorpe Signed-off-by: Song Liu commit 903b39e119245b52b9e929984189d7c96aa44d55 Author: Arnd Bergmann Date: Wed Jan 18 09:27:34 2023 +0100 usb: ohci-omap: avoid unused-variable warning The dead code removal has led to 'need_transceiver' not being used at all when OTG support is disabled: drivers/usb/host/ohci-omap.c: In function 'ohci_omap_reset': drivers/usb/host/ohci-omap.c:99:33: error: unused variable 'need_transceiver' [-Werror=unused-variable] 99 | int need_transceiver = (config->otg != 0); Change the #ifdef check into an IS_ENABLED() check to make the code more readable and let the compiler see where it is used. Fixes: 8825acd7cc8a ("ARM: omap1: remove dead code") Reviewed-by: Greg Kroah-Hartman Acked-by: Alan Stern Signed-off-by: Arnd Bergmann commit ae4cc020379ac2a3e53ffcfdfc39453e1dc745fa Author: Lukas Bulwahn Date: Thu Jan 12 09:37:46 2023 +0100 ARM: debug: remove references in DEBUG_UART_8250_SHIFT to removed configs Commit 67d3928c3df5 ("ARM: omap1: remove unused board files") removes configs DEBUG_OMAP7XXUART{1,2,3}. The config DEBUG_UART_8250_SHIFT still refers to those removed configs. Remove those obsolete references. Signed-off-by: Lukas Bulwahn Signed-off-by: Arnd Bergmann commit b5018dd5aa7d3418755a758210c3195d9bd1c98e Author: Lukas Bulwahn Date: Thu Jan 12 09:37:43 2023 +0100 ARM: s3c: remove obsolete s3c-cpu-freq header The s3c-cpu-freq header was previously included by: ./arch/arm/mach-s3c/mach-bast.c ./arch/arm/mach-s3c/mach-osiris-dvs.c ./arch/arm/mach-s3c/mach-osiris.c ./include/linux/soc/samsung/s3c-cpufreq-core.h Commit a4946a153cb9 ("ARM: s3c: remove all s3c24xx support") removes the files in ./arch/arm/mach-s3c/; commit daf0ee583fc7 ("cpufreq: remove s3c24xx drivers") removes the file s3c-cpufreq-core.h. Remove this obsolete header file. This issue was identified, as s3c-cpu-freq.h referred to the removed config ARM_S3C_CPUFREQ. Signed-off-by: Lukas Bulwahn Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann commit d0610c6e97b5975b38ced92abb7258492200fe05 Author: Lukas Bulwahn Date: Wed Jan 11 10:28:28 2023 +0100 MAINTAINERS: adjust SAMSUNG SOC CLOCK DRIVERS after s3c24xx support removal Commit a4946a153cb9 ("ARM: s3c: remove all s3c24xx support") removes all files that match the file pattern 'include/dt-bindings/clock/s3c*.h'. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a obsolete file pattern in SAMSUNG SOC CLOCK DRIVERS, as it does not match any file in the repository after the commit above. Remove this obsolete file entry in SAMSUNG SOC CLOCK DRIVERS. Fixes: a4946a153cb9 ("ARM: s3c: remove all s3c24xx support") Signed-off-by: Lukas Bulwahn Signed-off-by: Arnd Bergmann commit 323c54b97f833e8cd7b81eb773e3cdc0112a9984 Author: Lukas Bulwahn Date: Wed Jan 11 10:28:27 2023 +0100 MAINTAINERS: update file entries after arm multi-platform rework and mach-pxa removal In the work of Arnd's arm multi-platform support, various files in arch/arm are moved and after the arm mach-pxa removal, only a few files remain to be not aligned with entries in MAINTAINERS. These file movements still require adjustments in MAINTAINERS: Files in arch/arm/mach-ep93xx/include/mach/ are made local: arch/arm/{mach-ep93xx/include/mach/uncompress.h => boot/compressed/misc-ep93xx.h} arch/arm/mach-ep93xx/{include/mach => }/ep93xx-regs.h arch/arm/mach-ep93xx/{include/mach => }/mach/irqs.h Files in arch/arm/mach-vexpress/ are moved to mach-versatile. Correct the remaining references accordingly after these refactorings. Signed-off-by: Lukas Bulwahn Signed-off-by: Arnd Bergmann commit 3821de13308bc71875cf11c11dbc1b1ab7dab81f Author: Arnd Bergmann Date: Thu Sep 29 15:39:48 2022 +0200 ARM: remove CONFIG_UNUSED_BOARD_FILES All unused board files are removed, so the Kconfig symbol is no longer needed. Signed-off-by: Arnd Bergmann commit 61d9420a213826e0088b6e377b55237f1c53887d Author: Arnd Bergmann Date: Fri Oct 7 12:13:29 2022 +0200 mfd: remove htc-pasic3 driver The htc-pasic3 MFD device was only used in the PXA magician machine that is now removed, so this can be recycled as well. Cc: Lee Jones Cc: Philipp Zabel Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann commit 652719b1003a7509a8760fc55f0ff1940bc04310 Author: Arnd Bergmann Date: Fri Oct 7 14:28:15 2022 +0200 w1: remove ds1wm driver This driver was used by the mfd/asic3 and mfd/htc-pasic3 drivers, but both of those are removed as part of the PXA spring cleaning, which leaves the w1 support orphaned as well. Cc: Evgeniy Polyakov Cc: Szabolcs Gyurko Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann commit 89480065bc4ccacb470c9b8b4e4ac38fc2c2b005 Author: Arnd Bergmann Date: Fri Oct 7 12:10:01 2022 +0200 usb: remove ohci-tmio driver The TMIO MFD driver is getting removed, so its OHCI portion is not used any more either. Cc: Alan Stern Cc: linux-usb@vger.kernel.org Acked-by: Greg Kroah-Hartman Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann commit 7244785e1f707d8a628814009d4b60189f45ba88 Author: Arnd Bergmann Date: Thu Oct 6 18:41:48 2022 +0200 fbdev: remove w100fb driver The w100fb was used on various PXA based pocketpc machines, all of which are now removed, so remove this dirver sd well. Cc: Helge Deller Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann commit aceae7848624a7c4055a90a3e5d849cc45cb8d37 Author: Arnd Bergmann Date: Fri Oct 7 12:08:52 2022 +0200 fbdev: remove tmiofb driver With the TMIO MFD support removed, the framebuffer driver can be removed as well. Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Acked-by: Helge Deller Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann commit bef64d2908e825c5782d7aef3c16d42540f0b79c Author: Arnd Bergmann Date: Fri Oct 7 12:08:38 2022 +0200 mmc: remove tmio_mmc driver With the TMIO MFD support gone, the corresponding MMC host driver can be removed as well. The remaining tmio_mmc_core module however is still used by both the Renesas and Socionext host drivers. Cc: Ian Molton Cc: Ulf Hansson Cc: linux-mmc@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org Acked-by: Wolfram Sang Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann commit 2e99b1b065fb9c6e771ce573cf6c2dbb52c14627 Author: Arnd Bergmann Date: Thu Oct 6 22:52:32 2022 +0200 mfd: remove ucb1400 support The ucb1400 MFD driver and its gpio and touchscreen child drivers were only used on a few PXA machines that were unused for a while and are now removed. Removing these leaves the AC97 support as ALSA specific, no other drivers are now connected through this interface. Cc: Linus Walleij Cc: Bartosz Golaszewski Cc: Dmitry Torokhov Cc: Lee Jones Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Marek Vasut Cc: linux-kernel@vger.kernel.org Cc: linux-gpio@vger.kernel.org Cc: linux-input@vger.kernel.org Cc: alsa-devel@alsa-project.org Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann commit 8971bb812e3c14aa730e751ddf2d90c32e9dc519 Author: Arnd Bergmann Date: Thu Oct 6 22:53:30 2022 +0200 mfd: remove toshiba tmio drivers Four separate mfd drivers are in the "tmio" family, and all of them were used in now-removed PXA machines (eseries, tosa, and hx4700), so the mfd drivers and all its children can be removed as well. Cc: Lee Jones Cc: Wolfram Sang Cc: linux-kernel@vger.kernel.org Cc: linux-mmc@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann commit 6388bbad4a26a765cdd310478ef077fbf7e6ea35 Author: Arnd Bergmann Date: Thu Oct 6 18:42:54 2022 +0200 rtc: remove v3020 driver The v3020 RTC driver was exclusively used by the now removed cm-x300.c machine. Cc: Alessandro Zummo Cc: Alexandre Belloni Cc: linux-kernel@vger.kernel.org Cc: linux-rtc@vger.kernel.org Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann commit 0f9b85edcae8b3a4511222592acec6697c018b90 Author: Arnd Bergmann Date: Thu Oct 6 17:52:11 2022 +0200 power: remove pda_power supply driver This driver was used for a couple of Intel PXA and Samsung S3C24xx based PDAs, but all of those are now removed from the kernel, so the driver itself is no longer useful. Cc: Anton Vorontsov Cc: linux-pm@vger.kernel.org Acked-by: Sebastian Reichel Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann commit b401d1fd805379344750dffb0e3938676a047a2a Author: Arnd Bergmann Date: Thu Sep 29 16:27:43 2022 +0200 ASoC: pxa: remove unused board support Most PXA/MMP boards were removed, so the board specific ASoC support is no longer needed, leaving only support for DT based ones, as well as the "gumstix" and "spitz" machines that may get converted to DT later. Cc: Ian Molton Cc: Ken McGuire Cc: Marek Vasut Cc: Mike Rapoport Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-devel@alsa-project.org Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann commit 7aeffbf2ddec5ef0f8b8690bd392e5dabbfed820 Author: Arnd Bergmann Date: Fri Sep 30 16:23:21 2022 +0200 pcmcia: remove unused pxa/sa1100 drivers A number of boards got removed, so this code is now orphaned. Cc: Dominik Brodowski Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann commit 8f00ddfb7684fae69d2108991f9c72fcb72b3f5e Author: Arnd Bergmann Date: Fri Sep 30 15:25:56 2022 +0200 input: remove zylonite touchscreen driver The PXA zylonite platform was removed, so this driver has no remaining users. Cc: Dmitry Torokhov Cc: Mark Brown Cc: linux-input@vger.kernel.org Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann commit 119df5ee5b56392070936199857de4ddaabf0b89 Author: Arnd Bergmann Date: Fri Sep 30 14:35:42 2022 +0200 input: remove pxa930_rotary keyboard driver The pxa930 platform is getting removed and no upstream machine ever defined a rotary keyboard device. Cc: Dmitry Torokhov Cc: linux-input@vger.kernel.org Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann commit 82d40986a6a34a83f9d4df35241ff109e9468c48 Author: Arnd Bergmann Date: Fri Sep 30 14:32:54 2022 +0200 input: remove pxa930_trkball driver The pxa930 SoC support is getting removed, and no upstream board ever provided the trkball device that this driver relies on. Cc: Dmitry Torokhov Cc: Arnd Bergmann Cc: linux-input@vger.kernel.org Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann commit a64c36b8b75c0160f0b3a42bf3895d9b323638df Merge: 7dbb4a38bff34 a4b2e6063cfea Author: Arnd Bergmann Date: Wed Feb 1 17:14:08 2023 +0100 Merge tag 'zynqmp-soc-for-v6.3' of https://github.com/Xilinx/linux-xlnx into soc/drivers arm64: ZynqMP SoC changes for v6.3 Firmware changes - fix memory leak in error path inside notification code - trivial comment cleanup - add workaround for SD tap delay programming with old PMUFW * tag 'zynqmp-soc-for-v6.3' of https://github.com/Xilinx/linux-xlnx: firmware: xilinx: Clear IOCTL_SET_SD_TAPDELAY using PM_MMIO_WRITE firmware: xilinx: Remove kernel-doc marking in the code driver: soc: xilinx: fix memory leak in xlnx_add_cb_for_notify_event() Link: https://lore.kernel.org/r/42be5129-3ca2-ddbc-ac3b-6448245b61c2@monstr.eu Signed-off-by: Arnd Bergmann commit 27aaad0e7c7259101568ac8763a34810e81336cd Merge: ae3147bb301d5 9eedb910a3be0 Author: Arnd Bergmann Date: Wed Feb 1 17:13:27 2023 +0100 Merge tag 'zynq-soc-for-v6.3' of https://github.com/Xilinx/linux-xlnx into arm/soc ARM: Zynq SoC changes for v6.3 - Fix refcount leak in zynq_early_slcr_init * tag 'zynq-soc-for-v6.3' of https://github.com/Xilinx/linux-xlnx: ARM: zynq: Fix refcount leak in zynq_early_slcr_init Link: https://lore.kernel.org/r/5d7785ca-7fe0-1597-c56a-7a0f4d230db8@monstr.eu Signed-off-by: Arnd Bergmann commit 36acae192d65195342d02595f45e404cc0f2eca0 Author: Christophe Branchereau Date: Sun Jan 22 22:07:03 2023 +0100 ASoC: codecs/jz4760: add digital gain controls Both the DAC and ADC have digital gain controls available for their mixers, which go from -31 to 0db by step of 1db. Signed-off-by: Christophe Branchereau Link: https://lore.kernel.org/r/20230122210703.2552384-1-cbranchereau@gmail.com Signed-off-by: Mark Brown commit 7dbb4a38bff3449317abec5e0187ad97f699d5a6 Author: Jonathan Neuschäfer Date: Wed Feb 1 15:47:17 2023 +1030 soc: nuvoton: Add SoC info driver for WPCM450 Add a SoC information driver for Nuvoton WPCM450 SoCs. It provides information such as the SoC revision. Usage example: # grep . /sys/devices/soc0/* /sys/devices/soc0/family:Nuvoton NPCM /sys/devices/soc0/revision:A3 /sys/devices/soc0/soc_id:WPCM450 Signed-off-by: Jonathan Neuschäfer Reviewed-by: Joel Stanley Reviewed-by: Paul Menzel Link: https://lore.kernel.org/r/20221031223926.241641-1-j.neuschaefer@gmx.net Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20230201051717.1005938-1-joel@jms.id.au Signed-off-by: Arnd Bergmann commit 61f1b48445a935bf9088ea12bd0bdf5869b7b347 Merge: 777d90d5f29e3 8932a99240f53 Author: Arnd Bergmann Date: Wed Feb 1 16:48:40 2023 +0100 Merge tag 'zynq-dt-for-v6.3' of https://github.com/Xilinx/linux-xlnx into arm/dt ARM: Zynq DT changes for v6.3 - Fix node names to be aligned with dt schema - Describe qspi controller - Use xlnx prefix for ethernet IP * tag 'zynq-dt-for-v6.3' of https://github.com/Xilinx/linux-xlnx: ARM: zynq: Use recommended dma-controller name instead of dmac ARM: dts: zynq: Add xlnx prefix to GEM compatible string ARM: zynq: Comment interrupt names IRQs for pl330 ARM: dts: zynq: add QSPI controller node Link: https://lore.kernel.org/r/850bb18f-ca22-f3d7-71a7-f367bfef4ccc@monstr.eu Signed-off-by: Arnd Bergmann commit 777d90d5f29e3ad744f979b42401c046aa7d7dac Merge: 551413fe93880 b993ea2b75fdb Author: Arnd Bergmann Date: Wed Feb 1 16:46:55 2023 +0100 Merge tag 'zynqmp-dt-for-v6.3' of https://github.com/Xilinx/linux-xlnx into arm/dt arm64: ZynqMP SOC changes for v6.3 - Fix node names to be aligned with dt schema - Rename DT overlay files to dtso - Add snps,resume-hs-terminations to usb nodes - Describe gpio-modepin node - Use xlnx prefix for ethernet IP * tag 'zynqmp-dt-for-v6.3' of https://github.com/Xilinx/linux-xlnx: arm64: dts: zynqmp: Add xlnx prefix to GEM compatible string arm64: dts: zynqmp: Remove clock-names from GEM in zynqmp-clk-ccf.dtsi arm64: dts: zynqmp: Add mode-pin GPIO controller DT node arm64: zynqmp: Enable hs termination flag for USB dwc3 controller arm64: dts: xilinx: Rename DTB overlay source files from .dts to .dtso arm64: xilinx: Fix opp-table-cpu arm64: dts: xilinx: align LED node names with dtschema Link: https://lore.kernel.org/r/89d82a7e-6b42-97ce-2912-aa7dec965ff2@monstr.eu Signed-off-by: Arnd Bergmann commit 84cc4c7aecc4c6a17ea1030c49199ad7dc0a6b55 Author: Randy Dunlap Date: Mon Jan 30 17:21:07 2023 -0800 drm/client: fix kernel-doc warning in drm_client.h scripts/kernel-doc complains about the comment for hotplug_failed, so fix it: include/drm/drm_client.h:111: warning: Incorrect use of kernel-doc format: * @hotplug failed: Fixes: 6a9d5ad3af65 ("drm/client: Add hotplug_failed flag") Signed-off-by: Randy Dunlap Cc: Thomas Zimmermann Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Javier Martinez Canillas Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230131012107.20943-1-rdunlap@infradead.org commit 6b05266a0d6b6c02faa0a2749456dfc85277bae6 Author: Paul Cercueil Date: Tue Nov 29 19:17:19 2022 +0000 drm/etnaviv: Remove #ifdef guards for PM related functions Use the RUNTIME_PM_OPS() and pm_ptr() macros to handle the .runtime_suspend/.runtime_resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Some #ifdef CONFIG_PM guards were protecting simple statements, and were also converted to "if (IS_ENABLED(CONFIG_PM))". Signed-off-by: Paul Cercueil Signed-off-by: Lucas Stach commit 764be12345c34d4a8f066c4e25682028bcd1046a Author: Lucas Stach Date: Thu Dec 1 18:48:46 2022 +0100 drm/etnaviv: convert user fence tracking to XArray This simplifies the driver code a bit, as XArray already provides internal locking. IDRs are implemented using XArrays anyways, so this drops one level of unneeded abstraction. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel commit 2cd5bd98a5578f5eb14d65c6173841c5822aac44 Author: Lucas Stach Date: Thu Dec 1 18:48:45 2022 +0100 drm/etnaviv: split fence lock The fence lock currently protects two distinct things. It protects the fence IDR from concurrent inserts and removes and also keeps drm_sched_job_arm and drm_sched_entity_push_job in one atomic section to guarantee the fence seqno monotonicity. Split the lock into those two functions. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel commit b4bc0e7493cfbfc5d83dd7028b8f42ddc8c362e1 Author: Christian Gmeiner Date: Fri Dec 2 10:19:29 2022 +0100 drm/etnaviv: print MMU exception cause The MMU tells us the fault status. While the raw register value is already printed, it's a bit more user friendly to translate the fault reasons into human readable format. Signed-off-by: Christian Gmeiner Reviewed-by: Philipp Zabel Signed-off-by: Lucas Stach commit 50f79da49e117f54349650cee37106b8794f823f Author: Lucas Stach Date: Fri Dec 2 10:19:28 2022 +0100 drm/etnaviv: update hardware headers from rnndb Update the state HI header from the rnndb commit 640a009e7e66 ("rnndb: fix AXI1_TOTAL_REQUEST_COUNT"). Signed-off-by: Lucas Stach commit 49b5ff4c11305dec03e94490071931bf85981f65 Author: Tomeu Vizoso Date: Thu Dec 1 11:30:23 2022 +0100 drm/etnaviv: add HWDB entry for VIPNano-QI.7120.0055 This is a compute-only module marketed towards AI and vision acceleration. This particular version can be found on the Amlogic A311D SoC. The feature bits are taken from the Khadas downstream kernel driver 6.4.4.3.310723AAA. Signed-off-by: Tomeu Vizoso Signed-off-by: Lucas Stach commit d801e6f4e1acca0c578051f2733dda04441e42d0 Author: Tomeu Vizoso Date: Thu Dec 1 11:30:22 2022 +0100 drm/etnaviv: Warn when probing on NPUs Userspace is still not making full use of the hardware, so we don't know yet if changes to the UAPI won't be needed. Warn about it. Signed-off-by: Tomeu Vizoso Signed-off-by: Lucas Stach commit ab3d7b6d48abb61d5354b5b1024e4e11f70eda9d Author: Tomeu Vizoso Date: Thu Dec 1 11:30:21 2022 +0100 drm/etnaviv: Add nn_core_count to chip feature struct We will use these for differentiating between GPUs and NPUs, as the downstream driver does. Signed-off-by: Tomeu Vizoso Signed-off-by: Lucas Stach commit e152a05fa054170c05f1d5e04e93e2e75ea11405 Author: Bart Van Assche Date: Mon Jan 30 13:13:47 2023 -0800 loop: Improve the hw_queue_depth kernel module parameter implementation Make the following minor changes which were reported by colleagues while reviewing this code: - Remove the parentheses from around the LOOP_DEFAULT_HW_Q_DEPTH definition since these are superfluous. - Accept other number formats than decimal, e.g. hexadecimal. - Do not set hw_queue_depth to an out-of-range value, even if that value won't be used. - Use the LOOP_DEFAULT_HW_Q_DEPTH macro in the kernel module parameter description to prevent that the description gets out of sync. This patch has been tested as follows: # modprobe -r loop # modprobe loop hw_queue_depth=-1 modprobe: ERROR: could not insert 'loop': Invalid argument # modprobe loop hw_queue_depth=0 modprobe: ERROR: could not insert 'loop': Invalid argument # modprobe loop hw_queue_depth=1; cat /sys/module/loop/parameters/hw_queue_depth 1 # modprobe -r loop; modprobe loop; cat /sys/module/loop/parameters/hw_queue_depth hw_queue_depth=0x10 16 # modprobe -r loop; modprobe loop; cat /sys/module/loop/parameters/hw_queue_depth hw_queue_depth=128 128 # modprobe -r loop; modprobe loop hw_queue_depth=129; cat /sys/module/loop/parameters/hw_queue_depth 129 # modprobe -r loop; modprobe loop hw_queue_depth=$((1<<32)) modprobe: ERROR: could not insert 'loop': Numerical result out of range See also commit ef44c50837ab ("loop: allow user to set the queue depth"). Cc: Chaitanya Kulkarni Cc: Himanshu Madhani Signed-off-by: Bart Van Assche Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20230130211347.832110-1-bvanassche@acm.org Signed-off-by: Jens Axboe commit baff6491448b487e920faaa117e432989cbafa89 Author: Keith Busch Date: Fri Jan 27 08:56:20 2023 -0800 nvme: mask CSE effects for security receive The nvme driver will freeze the IO queues in response to an admin command with CSE bits set. These bits notify the host that the command that's about to be executed needs to be done exclusively, hence the freeze. The Security Receive command is often reported by multiple vendors with CSE bits set. The reason for this is that the result depends on the previous Security Send. This has nothing to do with IO queues, though, so the driver is taking an overly cautious response to seeing this passthrough command, while unable to fufill the intended admin queue action. Rather than freeze IO during this harmless command, mask off the effects. This freezing is observed to cause IO latency spikes when host software periodically validates the security state of the drives. Signed-off-by: Keith Busch Reviewed-by: Jens Axboe Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit cc115cbe12d932b2f081038bf32c815add2b20d7 Author: Keith Busch Date: Fri Jan 27 08:56:19 2023 -0800 nvme: always initialize known command effects Instead of appending command effects flags per IO, set the known effects flags the driver needs to react to just once during initial setup. Signed-off-by: Keith Busch Reviewed-by: Kanchan Joshi Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 303feb3cc06ac0665d0ee9c1414941200e60e8a3 Author: Amit Kumar Mahapatra Date: Fri Jan 20 00:23:30 2023 +0530 spi: Add APIs in spi core to set/get spi->chip_select and spi->cs_gpiod Supporting multi-cs in spi core and spi controller 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 in spi core with the 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. Suggested-by: Lars-Peter Clausen Signed-off-by: Amit Kumar Mahapatra Reviewed-by: Michal Simek Link: https://lore.kernel.org/r/20230119185342.2093323-2-amit.kumar-mahapatra@amd.com Signed-off-by: Mark Brown commit 6bbd1241700ac10c0ae71b86030ad9a6ca41b93b Author: Allen-KH Cheng Date: Tue Nov 8 11:32:06 2022 +0800 arm64: dts: mediatek: mt8516: Fix the watchdog node name The proper name is 'watchdog', not 'toprgu' and remove the unused label. Signed-off-by: Allen-KH Cheng Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20221108033209.22751-5-allen-kh.cheng@mediatek.com Signed-off-by: Matthias Brugger commit 70d24df30d06e5c822ba94751166ef55d0e28a89 Author: Allen-KH Cheng Date: Tue Nov 8 11:32:05 2022 +0800 arm64: dts: mediatek: mt7986: Fix watchdog compatible MT7986's watchdog embeds a reset controller and needs only the mediatek,mt7986-wdt compatible string as the MT6589 one is there for watchdogs that don't have any reset controller capability. Fixes: 50137c150f5f ("arm64: dts: mediatek: add basic mt7986 support") Signed-off-by: Allen-KH Cheng Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20221108033209.22751-4-allen-kh.cheng@mediatek.com Signed-off-by: Matthias Brugger commit 02938f460cde0d360dde48056c4d1c0a4bd49230 Author: AngeloGioacchino Del Regno Date: Tue Nov 8 11:32:04 2022 +0800 arm64: dts: mediatek: mt8195: Fix watchdog compatible MT8195's watchdog embeds a reset controller and needs only the mediatek,mt8195-wdt compatible string as the MT6589 one is there for watchdogs that don't have any reset controller capability. Fixes: 37f2582883be ("arm64: dts: Add mediatek SoC mt8195 and evaluation board") Signed-off-by: AngeloGioacchino Del Regno Co-developed-by: Allen-KH Cheng Signed-off-by: Allen-KH Cheng Reviewed-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20221108033209.22751-3-allen-kh.cheng@mediatek.com Signed-off-by: Matthias Brugger commit e5e961628d696237ddc3d53d9d5ac11f43e0bf67 Author: AngeloGioacchino Del Regno Date: Tue Nov 8 11:32:03 2022 +0800 arm64: dts: mediatek: mt8186: Fix watchdog compatible MT8186's watchdog embeds a reset controller and needs only the mediatek,mt8186-wdt compatible string as the MT6589 one is there for watchdogs that don't have any reset controller capability. Fixes: 2e78620b1350 ("arm64: dts: Add MediaTek MT8186 dts and evaluation board and Makefile") Signed-off-by: AngeloGioacchino Del Regno Co-developed-by: Allen-KH Cheng Signed-off-by: Allen-KH Cheng Reviewed-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20221108033209.22751-2-allen-kh.cheng@mediatek.com Signed-off-by: Matthias Brugger commit 6f42f5e73bb431c7e01c15dadfdc15872aa85db5 Author: Zeng Heng Date: Wed Sep 28 23:13:46 2022 +0800 soc: mediatek: mtk-svs: 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 an external module. Signed-off-by: Zeng Heng Link: https://lore.kernel.org/r/20220928151346.1942977-1-zengheng4@huawei.com Signed-off-by: Matthias Brugger commit 916120df5aa926d65f4666c075ed8d4955ef7bab Author: AngeloGioacchino Del Regno Date: Thu Oct 6 13:09:35 2022 +0200 soc: mediatek: mtk-devapc: Switch to devm_clk_get_enabled() This driver does exactly devm_clk_get() and clk_prepare_enable() right after, which is exactly what devm_clk_get_enabled() does: clean that up by switching to the latter. This commit brings no functional changes. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221006110935.59695-1-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit ddf91717693f1ac524329a88f86ab09e66b18cbe Author: Amit Engel Date: Wed Jan 4 10:44:32 2023 +0200 nvmet: for nvme admin set_features cmd, call nvmet_check_data_len_lte() This is due to the fact that the host is allowed to pass the controller an sgl describing a buffer that is larger than the payload itself Signed-off-by: Amit Engel Signed-off-by: Christoph Hellwig commit 99607843e7ed8ffeffc1010bd8001087db756535 Author: Amit Engel Date: Mon Dec 12 21:40:36 2022 +0200 nvme-tcp: add additional info for nvme_tcp_timeout log This provides additional details about the rq/cmd that is timed out example log if CONFIG_NVME_VERBOSE_ERRORS is configured: "nvme nvme0: queue 2 timeout cid 0xd058 type 4 opc Write (0x1)" example log if CONFIG_NVME_VERBOSE_ERRORS is not configured: "nvme nvme0: queue 2 timeout cid 0xd058 type 4 opc I/O Cmd (0x1)" Signed-off-by: Amit Engel Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 567da14d46aa726ee05749278355517489e01331 Author: Amit Engel Date: Mon Dec 12 21:40:35 2022 +0200 nvme: add nvme_opcode_str function for all nvme cmd types nvme_opcode_str will handle io/admin/fabrics ops This improves NVMe errors logging Signed-off-by: Amit Engel Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 62281b9ed671bee71737b42cb72f3c140ac2aef1 Author: Christoph Hellwig Date: Wed Dec 14 10:13:16 2022 +0100 nvme: remove nvme_execute_passthru_rq After moving the nvme_passthru_end call to the callers of nvme_execute_passthru_rq, this function has become quite pointless, so remove it. Signed-off-by: Christoph Hellwig Reviewed-by: Jens Axboe Reviewed-by: Chaitanya Kulkarni commit 7846c1b5a5db8bb8475603069df7c7af034fd081 Author: Keith Busch Date: Thu Jan 5 12:28:32 2023 -0800 nvme-pci: place descriptor addresses in iod The 'struct nvme_iod' space is appended at the end of the preallocated 'struct request', and padded to the cache line size. This leaves some free memory (in most kernel configs) up for grabs. Instead of appending the nvme data descriptor addresses after the scatterlist, inline these for free within struct nvme_iod. There is now enough space in the mempool for 128 possibe segments. And without increasing the size of the preallocated requests, we can hold up to 5 PRP descriptor elements, allowing the driver to increase its max transfer size to 8MB. Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig commit ae5829350324a6bd93c1d9fc3ac67afc0c647e32 Author: Keith Busch Date: Thu Jan 5 12:28:31 2023 -0800 nvme-pci: use mapped entries for sgl decision The driver uses the dma entries for setting up its command's SGL/PRP lists. The dma mapping might have fewer entries than the physical segments, so check the dma mapped count to determine which nvme data layout method is more optimal. Signed-off-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 01df742d8c5c070f92fa9c046907506a2a0f7a9f Author: Keith Busch Date: Thu Jan 5 12:28:30 2023 -0800 nvme-pci: remove SGL segment descriptors The max segments this driver can see is 127, well below the 256 threshold needed to add an nvme sgl segment descriptor. Remove all the useless checks and dead code. Signed-off-by: Keith Busch Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit b0ef1b11d3909d8f246dd3af9c94e38880d349b0 Author: Hannes Reinecke Date: Tue Dec 13 20:00:26 2022 +0100 nvme-auth: don't use NVMe status codes NVMe status codes are part of the wire protocol, and shouldn't be fabricated in the stack. So with this patch the authentication code is switched over to use error codes; as a side effect authentication failures due to internal error won't be retried anymore. But that shouldn't have happened anyway. Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 0686fb3cc535c4c1685553c56f4efe3eeee57b09 Author: Hannes Reinecke Date: Thu Dec 8 08:49:20 2022 +0100 nvme-fabrics: clarify AUTHREQ result handling The NVMe 2.0 spec defines the ATR and ASCR bits in the AUTHREQ connect response field to be mutually exclusive. So to clarify the handling here switch the AUTHREQ handling to use the bit definitions and check for both bits. And while we're at it, add a message to the user that secure concatenation is not supported (yet). Suggested-by: Mark Lehrer Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 6ea4696818bf5868b1551119b733f02bee509c00 Author: Pin-yen Lin Date: Fri Jul 29 13:32:54 2022 +0800 arm64: dts: mt8173-elm: Switch to SMC watchdog Switch to SMC watchdog because we need direct control of HW watchdog registers from kernel. The corresponding firmware was uploaded in https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/3405. Signed-off-by: Pin-yen Lin Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220729053254.220585-1-treapking@chromium.org Signed-off-by: Matthias Brugger commit 40b3880dc29b89c39139eba11eba2b3107dc2e38 Author: Greg Kroah-Hartman Date: Tue Jan 31 09:24:59 2023 +0100 driver core: platform: simplify __platform_driver_probe() __platform_driver_probe() pokes around in some bus and driver private lists and locks in a way that is not needed at all. The code only wants to know if a device was bound to the driver that was registered, so walk all devices on the bus to see if there was a match. If there is not a match, return an error. This is the same logic as was originally present, but just done in a simpler and more obvious way that is not a layering violation. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230131082459.301603-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit b4ce0bf7ab02c46676276ca1e8d4c5789528b439 Author: Greg Kroah-Hartman Date: Tue Jan 31 09:24:58 2023 +0100 driver core: platform: removed unneeded variable from __platform_driver_probe() In the reworking of the function __platform_driver_probe() over the years, it turns out that the variable 'code' does not actually do anything or mean anything anymore and can be removed to simplify the logic when trying to read and understand what this function is actually doing. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230131082459.301603-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit a69ea7a76d52353b17d7bedf43818c2578517e9e Author: Greg Kroah-Hartman Date: Wed Feb 1 13:56:42 2023 +0100 maple: remove unneeded maple_bus_uevent() callback. The driver core recently changed the uevent bus callback to take a const pointer, and the maple_bus_uevent() was not correctly fixed up. Instead of fixing the function parameter types, just remove the callback entirely as it does not do anything, so it is not necessary. Cc: Yoshinori Sato Cc: Rich Felker Cc: Hans de Goede Cc: "Rafael J. Wysocki" Reported-by: Linux Kernel Functional Testing Reported-by: Naresh Kamboju Fixes: 2a81ada32f0e ("driver core: make struct bus_type.uevent() take a const *") Link: https://lore.kernel.org/r/20230201125642.624255-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 7118594466b8ed7285adb1dc177f2c84bfa33265 Author: Wedson Almeida Filho Date: Mon Jan 30 03:44:03 2023 -0300 rust: types: implement `ForeignOwnable` for the unit type This allows us to use the unit type `()` when we have no object whose ownership must be managed but one implementing the `ForeignOwnable` trait is needed. Signed-off-by: Wedson Almeida Filho Reviewed-by: Vincenzo Palazzo Reviewed-by: Gary Guo Reviewed-by: Andreas Hindborg Signed-off-by: Miguel Ojeda commit 26949bac1e8264c711a81f962845aa0538279c78 Author: Wedson Almeida Filho Date: Mon Jan 30 03:44:02 2023 -0300 rust: types: implement `ForeignOwnable` for `Box` This allows us to hand ownership of Rust dynamically allocated objects to the C side of the kernel. Signed-off-by: Wedson Almeida Filho Reviewed-by: Gary Guo Reviewed-by: Vincenzo Palazzo Reviewed-by: Alice Ferrazzi Reviewed-by: Andreas Hindborg Signed-off-by: Miguel Ojeda commit 0fc4424d24a230c7fb539d5d708c81c68aafa9be Author: Wedson Almeida Filho Date: Mon Jan 30 03:44:01 2023 -0300 rust: types: introduce `ForeignOwnable` It was originally called `PointerWrapper`. It is used to convert a Rust object to a pointer representation (void *) that can be stored on the C side, used, and eventually returned to Rust. Signed-off-by: Wedson Almeida Filho Reviewed-by: Vincenzo Palazzo Reviewed-by: Martin Rodriguez Reboredo Reviewed-by: Gary Guo Reviewed-by: Andreas Hindborg Signed-off-by: Miguel Ojeda commit c2bc65274a307e11743d0f56a762f8e57f279b9e Author: Kuninori Morimoto Date: Wed Feb 1 02:02:22 2023 +0000 ASoC: rsnd: add R-Car Gen4 Sound support This patch is tested on V4H White Hawk + ARD-AUDIO-DA7212 Signed-off-by: Linh Phung Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87o7qe5ej5.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f76fec606d07b43d21475a0dda6294613379e224 Author: Kuninori Morimoto Date: Wed Feb 1 02:02:07 2023 +0000 ASoC: dt-bindings: renesas: add R8A779G0 V4H Document R-Car V4H (R8A779G0), and R-Car Gen4 SoC bindings. Link: https://lore.kernel.org/r/87zga6t5r4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87pmau5ejk.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit beab0aad7276795952d4bb52f88fe6bd2406404c Author: Kuninori Morimoto Date: Wed Feb 1 02:00:49 2023 +0000 ASoC: rsnd: dma.c: tidyup rsnd_dma_probe() This patch tidyups rsnd_dma_probe(), but there is no effect. This is prepare for Gen4 support. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87r0va5elq.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit c20bc7c9ce3a3ad8d51b26823e2ad2ba9b8bb447 Author: Kuninori Morimoto Date: Wed Feb 1 02:00:42 2023 +0000 ASoC: rsnd: tidyup rsnd_dma_addr() This patch tidyups rsnd_dma_addr(), but there is no effect. This is prepare for Gen4 support. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87sffq5elx.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 662721ece4f0146a09a0fe4108e7a05274723d7e Author: Kuninori Morimoto Date: Wed Feb 1 02:00:36 2023 +0000 ASoC: rsnd: use array for 44.1kHz/48kHz rate handling ADG need to know output rate of 44.1kHz/48kHz. It is using single variable for each, but this patch changes it to array. Nothing is changed by this patch. This is prepare for R-Car Gen4 support. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87tu065em3.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit efaab61588c4a85814ebf1fe983710bceb662d58 Author: Kuninori Morimoto Date: Wed Feb 1 02:00:32 2023 +0000 ASoC: rsnd: use clkin/out_size Current adg.c is assuming number of clkin/clkout are fixed, but it is not correct on Gen4. This patch uses clkin/out_size to handling it. This is prepare for R-Car Gen4 support. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87v8km5em7.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit da2f9e859413465c11d8aff01ff6f112d516c58e Author: Kuninori Morimoto Date: Wed Feb 1 02:00:27 2023 +0000 ASoC: rsnd: moves clkout_name to top of the file This patch moves clkout_name to top of the file to handling both clkin/clkout in the same place. This is prepare for R-Car Gen4 support. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87wn525emc.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 4bbff16d26e83a150851e19a1e24f4ee71125863 Author: Kuninori Morimoto Date: Wed Feb 1 02:00:22 2023 +0000 ASoC: rsnd: rename clk to clkin Current adg.c is usig "clk" as clock IN, but is using "clkout" for clock OUT. This patch arranges "clk" to "clkin". This is prepare for R-Car Gen4 support. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87y1pi5emh.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 184d82e142eeb0a741ba9335601c075fc45b34aa Author: Kuninori Morimoto Date: Wed Feb 1 02:00:18 2023 +0000 ASoC: rsnd: remove unnecessary ADG flags The flag LRCLK_ASYNC / AUDIO_OUT_48 had been added to handling special case of Salvator-X board, but it is not used on upstream. It makes code complex today, let's remove these. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87zg9y5emm.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 3e262e9592bb18c4f491c2db8fd6cc49d9e23c38 Author: Kuninori Morimoto Date: Wed Feb 1 02:00:13 2023 +0000 ASoC: rsnd: use same debug message format on clkout This patch follows clkin debug message style on clkout. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/871qna6t77.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 6d612f67a8d430ab1905f795fb440e6e3545d94f Author: Kuninori Morimoto Date: Wed Feb 1 02:00:08 2023 +0000 ASoC: rsnd: indicate warning once if it can't handle requested rule Some SoC can't handle all requested hw rule. In such case, it will indicate like below, but it is unclear why it didn't work to user. This patch indicates warning in such case once, because player will try to similar rule many times. # aplay sound.wav Playing WAVE 'sound.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo aplay: aplay.c: 1359: set_params: Assertion `err >= 0' failed. Aborted by signal Aborted... Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87357q6t7b.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit c12dc0f6655bbf41d32a863b8e314f18f746fb0b Author: Kuninori Morimoto Date: Wed Feb 1 02:00:03 2023 +0000 ASoC: rsnd: indicate necessary error when clock start failed rsnd_ssi_master_clk_start() indicates error message if it couldn't handle requested clock/rate, but it is not caring all cases. This patch cares it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/874js66t7g.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e5a3c491e194768f4899e8d1746301542cd7c1e8 Author: Kuninori Morimoto Date: Wed Feb 1 01:59:58 2023 +0000 ASoC: rsnd: Remove unnecessary rsnd_dbg_dai_call() commit b43b8ae87c8e0a8 ("ASoC: rsnd: protect mod->status") removed RSND_DEBUG_NO_DAI_CALL and rsnd_dbg_dai_call(), but these are still exist on rsnd.h. This patch removes it. Fixes: b43b8ae87c8e ("ASoC: rsnd: protect mod->status") Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/875ycm6t7l.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 49123b51cd896e00b256a27c2ce9e6bfe1bbc22f Author: Kuninori Morimoto Date: Wed Feb 1 01:59:52 2023 +0000 ASoC: rsnd: fixup #endif position commit 1f9c82b5ab83ff2 ("ASoC: rsnd: add debugfs support") added CONFIG_DEBUG_FS related definitions on rsnd.h, but it should be added inside of RSND_H. This patch fixup it. Fixes: 1f9c82b5ab83 ("ASoC: rsnd: add debugfs support") Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/877cx26t7r.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 68a410aff971e59b9e94aa22c4c5cb6a6af30729 Author: Kuninori Morimoto Date: Wed Feb 1 01:59:46 2023 +0000 ASoC: rsnd: check whether playback/capture property exists Current rsnd sets "channels_min" which is used from snd_soc_dai_stream_valid() without checking DT playback/capture property. Thus, "aplay -l" or "arecord -l" will indicate un-exising device. This patch checks DT proerty and do nothing playback/capture settings if not exist. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/878rhi6t7x.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f6477ec62fda59561826b29339a04097bfb46a80 Author: Gavrilov Ilia Date: Mon Jan 23 14:31:54 2023 +0000 netfilter: conntrack: remote a return value of the 'seq_print_acct' function. The static 'seq_print_acct' function always returns 0. Change the return value to 'void' and remove unnecessary checks. Found by InfoTeCS on behalf of Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 1ca9e41770cb ("netfilter: Remove uses of seq_ return values") Signed-off-by: Ilia.Gavrilov Reviewed-by: Leon Romanovsky Signed-off-by: Pablo Neira Ayuso commit 28af0f009dded735f8d42cc85e95f9c3db212124 Author: Florian Westphal Date: Mon Jan 23 13:04:33 2023 +0100 netfilter: conntrack: udp: fix seen-reply test IPS_SEEN_REPLY_BIT is only useful for test_bit() api. Fixes: 4883ec512c17 ("netfilter: conntrack: avoid reload of ct->status") Reported-by: Roi Dayan Signed-off-by: Florian Westphal Reviewed-by: Roi Dayan Signed-off-by: Pablo Neira Ayuso commit 1fb7696ac6c3ac470dd002e639af80e7e170b25f Author: Yang Yingliang Date: Thu Jan 19 15:51:25 2023 +0800 netfilter: nf_tables: fix wrong pointer passed to PTR_ERR() It should be 'chain' passed to PTR_ERR() in the error path after calling nft_chain_lookup() in nf_tables_delrule(). Fixes: f80a612dd77c ("netfilter: nf_tables: add support to destroy operation") Signed-off-by: Yang Yingliang Reviewed-by: Simon Horman Acked-by: Fernando Fernandez Mancera Signed-off-by: Pablo Neira Ayuso commit dac7f50a45216d652887fb92d6cd3b7ca7f006ea Author: Alok Tiwari Date: Tue Jan 17 07:45:49 2023 -0800 netfilter: nf_tables: NULL pointer dereference in nf_tables_updobj() static analyzer detect null pointer dereference case for 'type' function __nft_obj_type_get() can return NULL value which require to handle if type is NULL pointer return -ENOENT. This is a theoretical issue, since an existing object has a type, but better add this failsafe check. Signed-off-by: Alok Tiwari Signed-off-by: Pablo Neira Ayuso commit 22925af785fa3470efdf566339616d801119d348 Author: AngeloGioacchino Del Regno Date: Mon Nov 28 12:20:27 2022 +0100 arm64: dts: mediatek: mt7622: Add missing pwm-cells to pwm node Specify #pwm-cells on pwm@11006000 to make it actually usable. Fixes: ae457b7679c4 ("arm64: dts: mt7622: add SoC and peripheral related device nodes") Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221128112028.58021-2-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 86b753a86f6dc31ca9bccb489ebde1968d26c89b Author: Yassine Oudjana Date: Wed Jun 22 10:11:06 2022 +0400 ASoC: qcom: apq8096: set driver name correctly Set driver name to allow matching different UCM2 configurations for the multiple devices sharing the same APQ8096 ASoC. Signed-off-by: Yassine Oudjana Link: https://lore.kernel.org/r/20220622061106.35071-1-y.oudjana@protonmail.com Signed-off-by: Mark Brown commit cbfa85a5c5ab123f4dc99efae1b0182d2f8d956c Author: Kuninori Morimoto Date: Wed Feb 1 01:06:15 2023 +0000 ASoC: cs42l42: use helper function Current ASoC has many helper function. Link: https://lore.kernel.org/r/20230201111415.67bd4b7e@canb.auug.org.au Reported-by: Stephen Rothwell Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87bkme6vp5.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 4739e893a1f3cde2790946b8a7e6c2c3d8680054 Author: Arnd Bergmann Date: Thu Jan 26 17:37:55 2023 +0100 accel/ivpu: avoid duplicate assignment With extra warnings enabled, gcc warns about two assignments of the same .mmap callback: In file included from drivers/accel/ivpu/ivpu_drv.c:10: include/drm/drm_accel.h:31:27: error: initialized field overwritten [-Werror=override-init] 31 | .mmap = drm_gem_mmap | ^~~~~~~~~~~~ drivers/accel/ivpu/ivpu_drv.c:360:9: note: in expansion of macro 'DRM_ACCEL_FOPS' 360 | DRM_ACCEL_FOPS, | ^~~~~~~~~~~~~~ Remove the unused local assignment. Fixes: e868cc591e89 ("accel: Add .mmap to DRM_ACCEL_FOPS") Signed-off-by: Arnd Bergmann Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20230126163804.3648051-2-arnd@kernel.org (cherry picked from commit 918b8f7eeea1c9f7f54b3d8ea74e8c6fa68e5a9d) Signed-off-by: Thomas Zimmermann commit 9f20c9f4b1e17e83e9ccc247cfdc0b61041bff3d Author: Arnd Bergmann Date: Fri Jan 27 23:14:55 2023 +0100 accel: fix CONFIG_DRM dependencies At the moment, accel drivers can be built-in even with CONFIG_DRM=m, but this causes a link failure: x86_64-linux-ld: drivers/accel/ivpu/ivpu_drv.o: in function `ivpu_dev_init': ivpu_drv.c:(.text+0x1535): undefined reference to `drmm_kmalloc' x86_64-linux-ld: ivpu_drv.c:(.text+0x1562): undefined reference to `drmm_kmalloc' x86_64-linux-ld: drivers/accel/ivpu/ivpu_drv.o: in function `ivpu_remove': ivpu_drv.c:(.text+0x1faa): undefined reference to `drm_dev_unregister' x86_64-linux-ld: drivers/accel/ivpu/ivpu_drv.o: in function `ivpu_probe': ivpu_drv.c:(.text+0x1fef): undefined reference to `__devm_drm_dev_alloc' The problem is that DRM_ACCEL is a 'bool' symbol, so driver that only depend on DRM_ACCEL but not also on DRM do not see the restriction to =m configs. To ensure that each accel driver has an implied dependency on CONFIG_DRM, enclose the entire Kconfig file in an if/endif check. Fixes: 8bf4889762a8 ("drivers/accel: define kconfig and register a new major") Signed-off-by: Arnd Bergmann Reviewed-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Reviewed-by: Oded Gabbay Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20230127221504.2522909-1-arnd@kernel.org (cherry picked from commit 3524c96a121952f214271622bb372661ced86101) Signed-off-by: Thomas Zimmermann commit 3ad8173b4d8788c983c2e850cc2a7a68aafbdb45 Author: Rob Clark Date: Mon Jan 23 07:48:31 2023 -0800 drm/shmem: Cleanup drm_gem_shmem_create_with_handle() Once we create the handle, the handle owns the reference. Currently nothing was doing anything with the shmem ptr after the handle was created, but let's change drm_gem_shmem_create_with_handle() to not return the pointer, so-as to not encourage problematic use of this function in the future. As a bonus, it makes the code a bit cleaner. Signed-off-by: Rob Clark Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20230123154831.3191821-1-robdclark@gmail.com (cherry picked from commit d023d6f741c85bb00d2ca43d338327fbc150c113) Signed-off-by: Thomas Zimmermann commit 76b1d904ad2f4059c12310872c23bc1bcd6f35c8 Author: Danilo Krummrich Date: Thu Jan 26 01:28:44 2023 +0100 dma-buf: actually set signaling bit for private stub fences In dma_fence_allocate_private_stub() set the signaling bit of the newly allocated private stub fence rather than the signaling bit of the shared dma_fence_stub. Fixes: c85d00d4fd8b ("dma-buf: set signaling bit for the stub fence") Reviewed-by: Christian König Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20230126002844.339593-1-dakr@redhat.com (cherry picked from commit 851a4a77a9f6441bd73625fe6dbc29c814ae681f) Signed-off-by: Thomas Zimmermann commit 9bdd9424bfec5eebf38dd4928f2d171ec7b1a57e Author: Dan Carpenter Date: Thu Jan 26 12:28:44 2023 +0300 drm/simpledrm: Fix an NULL vs IS_ERR() bug The devm_memremap() function doesn't return NULL, it returns error pointers. Fixes: 9a10c7e6519b ("drm/simpledrm: Add support for system memory framebuffers") Signed-off-by: Dan Carpenter Reviewed-by: Thomas Zimmermann Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/Y9JHzImRcUaa0mi1@kili (cherry picked from commit e566507bf2f460967f53030ef84b67ef26dcaf8e) Signed-off-by: Thomas Zimmermann commit 04596d4b3e0d20697193341694e8c99961702259 Author: Uwe Kleine-König Date: Mon Dec 19 09:14:40 2022 +0100 rtc: max8907: Drop unused i2c include rtc-max8907 is a platform driver that doesn't use any symbol provided in . So drop the include. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20221219081440.1399791-1-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 4bbdced5db096bded4e2d10259e9a5e0070a4cb3 Author: Alexandre Belloni Date: Mon Jan 23 21:02:06 2023 +0100 rtc: rx8010: use IRQ flags obtained from fwnode Allow the IRQ type to be passed from the device tree if available as there may be components changing the trigger type of the interrupt between the RTC and the IRQ controller. Link: https://lore.kernel.org/r/20230123200217.1236011-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 11bfd6fcebfa25a77e601e68f5d4ba897e7b3047 Author: Alexandre Belloni Date: Mon Jan 23 21:02:17 2023 +0100 rtc: rv8803: use IRQ flags obtained from fwnode Allow the IRQ type to be passed from the device tree if available as there may be components changing the trigger type of the interrupt between the RTC and the IRQ controller. Link: https://lore.kernel.org/r/20230123200217.1236011-12-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit c4b12f89f5aefe559522e4e41528a6c719fcdcdb Author: Alexandre Belloni Date: Mon Jan 23 21:02:16 2023 +0100 rtc: rv3032: use IRQ flags obtained from fwnode Allow the IRQ type to be passed from the device tree if available as there may be components changing the trigger type of the interrupt between the RTC and the IRQ controller. Link: https://lore.kernel.org/r/20230123200217.1236011-11-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit bfff849f1deff5607c8fb1031be319cd88e0ecd7 Author: Alexandre Belloni Date: Mon Jan 23 21:02:15 2023 +0100 rtc: rv3029c2: use IRQ flags obtained from fwnode Allow the IRQ type to be passed from the device tree if available as there may be components changing the trigger type of the interrupt between the RTC and the IRQ controller. Link: https://lore.kernel.org/r/20230123200217.1236011-10-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 827009a8d3f80d81c6da634f4ab1a33e2d539aa4 Author: Alexandre Belloni Date: Mon Jan 23 21:02:14 2023 +0100 rtc: pcf8563: use IRQ flags obtained from fwnode Allow the IRQ type to be passed from the device tree if available as there may be components changing the trigger type of the interrupt between the RTC and the IRQ controller. Link: https://lore.kernel.org/r/20230123200217.1236011-9-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit dd7166c8ba6e27568ba1c3fa8874316150ce694c Author: Alexandre Belloni Date: Mon Jan 23 21:02:13 2023 +0100 rtc: pcf85363: use IRQ flags obtained fromfwnode Allow the IRQ type to be passed from the device tree if available as there may be components changing the trigger type of the interrupt between the RTC and the IRQ controller. Link: https://lore.kernel.org/r/20230123200217.1236011-8-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 3542db1d1fd62f75eb69079d219d88170626444f Author: Alexandre Belloni Date: Mon Jan 23 21:02:12 2023 +0100 rtc: pcf8523: use IRQ flags obtained from fwnode Allow the IRQ type to be passed from the device tree if available as there may be components changing the trigger type of the interrupt between the RTC and the IRQ controller. Link: https://lore.kernel.org/r/20230123200217.1236011-7-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 7e815272c8d0922ad1d0def11496ac63fa71fa78 Author: Alexandre Belloni Date: Mon Jan 23 21:02:11 2023 +0100 rtc: pcf85063: use IRQ flags obtained from fwnode Allow the IRQ type to be passed from the device tree if available as there may be components changing the trigger type of the interrupt between the RTC and the IRQ controller. Link: https://lore.kernel.org/r/20230123200217.1236011-6-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 5434a4e472c71448bbdc061f21ebf1b0a2d23753 Author: Alexandre Belloni Date: Mon Jan 23 21:02:10 2023 +0100 rtc: pcf2123: use IRQ flags obtained from fwnode Allow the IRQ type to be passed from the device tree if available as there may be components changing the trigger type of the interrupt between the RTC and the IRQ controller. Link: https://lore.kernel.org/r/20230123200217.1236011-5-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit f181987ef4772c2d9412b43bc3d0e34fe368cddb Author: Alexandre Belloni Date: Mon Jan 23 21:02:09 2023 +0100 rtc: m41t80: use IRQ flags obtained from fwnode Allow the IRQ type to be passed from the device tree if available as there may be components changing the trigger type of the interrupt between the RTC and the IRQ controller. Link: https://lore.kernel.org/r/20230123200217.1236011-4-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit badba1e5b111c6f32038953efc8078cba3390326 Author: Alexandre Belloni Date: Mon Jan 23 21:02:08 2023 +0100 rtc: hym8563: use IRQ flags obtained from fwnode Allow the IRQ type to be passed from the device tree if available as there may be components changing the trigger type of the interrupt between the RTC and the IRQ controller. Link: https://lore.kernel.org/r/20230123200217.1236011-3-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 37abc36ed2d39e57ac0fad163d061366b4a015cb Author: Alexandre Belloni Date: Mon Jan 23 21:02:07 2023 +0100 rtc: ab-eoz9: use IRQ flags obtained from fwnode Allow the IRQ type to be passed from the device tree if available as there may be components changing the trigger type of the interrupt between the RTC and the IRQ controller. Link: https://lore.kernel.org/r/20230123200217.1236011-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 5a7363821281f981b3f6cb8e77d1868d092705c8 Author: Pali Rohár Date: Wed Jul 13 14:56:44 2022 +0200 arm64: dts: marvell: Fix compatible strings for Armada 3720 boards All Armada 3720 boards have Armada 3720 processor which is of Armada 3700 family and do not have Armada 3710 processor. So none of them should have compatible string for Armada 3710 processor. Fix compatible string for all these boards by removing wrong processor string "marvell,armada3710" and adding family string "marvell,armada3700" as the last one. (Note that this is same way how are defined Armada 3710 DTS files). [gclement: fix conflict for v6.2] Signed-off-by: Pali Rohár Signed-off-by: Gregory CLEMENT commit 03966594e1170303c037b0cded35c464a13a4a45 Author: Jisheng Zhang Date: Sun Jan 29 01:28:56 2023 +0800 riscv: remove riscv_isa_ext_keys[] array and related usage All users have switched to riscv_has_extension_*, remove unused definitions, vars and related setting code. Signed-off-by: Jisheng Zhang Reviewed-by: Andrew Jones Reviewed-by: Heiko Stuebner Reviewed-by: Conor Dooley Reviewed-by: Guo Ren Link: https://lore.kernel.org/r/20230128172856.3814-14-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit e8ad17d2b5f38e595d597a3e2419d6d7cc727b17 Author: Andrew Jones Date: Sun Jan 29 01:28:55 2023 +0800 riscv: KVM: Switch has_svinval() to riscv_has_extension_unlikely() Switch has_svinval() from static branch to the new helper riscv_has_extension_unlikely(). Signed-off-by: Andrew Jones Reviewed-by: Guo Ren Acked-by: Anup Patel Link: https://lore.kernel.org/r/20230128172856.3814-13-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit 95bc69a47be2d5cdccf40ba3f23c99e9a6c57597 Author: Jisheng Zhang Date: Sun Jan 29 01:28:54 2023 +0800 riscv: cpu_relax: switch to riscv_has_extension_likely() Switch cpu_relax() from static branch to the new helper riscv_has_extension_likely() Signed-off-by: Jisheng Zhang Reviewed-by: Andrew Jones Reviewed-by: Heiko Stuebner Reviewed-by: Guo Ren Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230128172856.3814-12-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit cabfd146b371462ed480a968f98eb0c2c80e3c8a Author: Jisheng Zhang Date: Sun Jan 29 01:28:53 2023 +0800 riscv: alternative: patch alternatives in the vDSO Make it possible to use alternatives in the vDSO, so that better implementations can be used if possible. Signed-off-by: Jisheng Zhang Reviewed-by: Guo Ren Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20230128172856.3814-11-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit 8d23e94a443388e81c42ea7e476a5d79c1c795c9 Author: Jisheng Zhang Date: Sun Jan 29 01:28:52 2023 +0800 riscv: switch to relative alternative entries Instead of using absolute addresses for both the old instrucions and the alternative instructions, use offsets relative to the alt_entry values. So this not only cuts the size of the alternative entry, but also meets the prerequisite for patching alternatives in the vDSO, since absolute alternative entries are subject to dynamic relocation, which is incompatible with the vDSO building. Signed-off-by: Jisheng Zhang Reviewed-by: Andrew Jones Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230128172856.3814-10-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit 1bc400ffb52b460eedc51ebd9b7753b7f2314878 Author: Andrew Jones Date: Sun Jan 29 01:28:51 2023 +0800 riscv: module: Add ADD16 and SUB16 rela types To prepare for 16-bit relocation types to be emitted in alternatives add support for ADD16 and SUB16. Signed-off-by: Andrew Jones Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230128172856.3814-9-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit e0c267e03b0c77c9ac79ac08eada41ba8eb1b95f Author: Jisheng Zhang Date: Sun Jan 29 01:28:50 2023 +0800 riscv: module: move find_section to module.h Move find_section() to module.h so that the implementation can be shared by the alternatives code. This will allow us to use alternatives in the vdso. Reviewed-by: Conor Dooley Reviewed-by: Andrew Jones Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20230128172856.3814-8-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit 702e64550b12cf36089672af8f110660da7f847e Author: Jisheng Zhang Date: Sun Jan 29 01:28:49 2023 +0800 riscv: fpu: switch has_fpu() to riscv_has_extension_likely() Switch has_fpu() from static branch to the new helper riscv_has_extension_likely(). Signed-off-by: Jisheng Zhang Reviewed-by: Andrew Jones Reviewed-by: Heiko Stuebner Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230128172856.3814-7-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit bdda5d554e43f21d06e0b7485e6241ca46c26b99 Author: Jisheng Zhang Date: Sun Jan 29 01:28:48 2023 +0800 riscv: introduce riscv_has_extension_[un]likely() Generally, riscv ISA extensions are fixed for any specific hardware platform, so a hart's features won't change after booting. This chacteristic makes it straightforward to use a static branch to check if a specific ISA extension is supported or not to optimize performance. However, some ISA extensions such as SVPBMT and ZICBOM are handled via. the alternative sequences. Basically, for ease of maintenance, we prefer to use static branches in C code, but recently, Samuel found that the static branch usage in cpu_relax() breaks building with CONFIG_CC_OPTIMIZE_FOR_SIZE[1]. As Samuel pointed out, "Having a static branch in cpu_relax() is problematic because that function is widely inlined, including in some quite complex functions like in the VDSO. A quick measurement shows this static branch is responsible by itself for around 40% of the jump table." Samuel's findings pointed out one of a few downsides of static branches usage in C code to handle ISA extensions detected at boot time: static branch's metadata in the __jump_table section, which is not discarded after ISA extensions are finalized, wastes some space. I want to try to solve the issue for all possible dynamic handling of ISA extensions at boot time. Inspired by Mark[2], this patch introduces riscv_has_extension_*() helpers, which work like static branches but are patched using alternatives, thus the metadata can be freed after patching. Link: https://lore.kernel.org/linux-riscv/20220922060958.44203-1-samuel@sholland.org/ [1] Link: https://lore.kernel.org/linux-arm-kernel/20220912162210.3626215-8-mark.rutland@arm.com/ [2] Signed-off-by: Jisheng Zhang Reviewed-by: Andrew Jones Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20230128172856.3814-6-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit 4bf8860760d9930019e4839fb4e8adc1e0bf1f91 Author: Jisheng Zhang Date: Sun Jan 29 01:28:47 2023 +0800 riscv: cpufeature: extend riscv_cpufeature_patch_func to all ISA extensions riscv_cpufeature_patch_func() currently only scans a limited set of cpufeatures, explicitly defined with macros. Extend it to probe for all ISA extensions. Signed-off-by: Jisheng Zhang Reviewed-by: Andrew Jones Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230128172856.3814-5-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit d8a3d8a75206d3dfba64b6d4468b7cf44d4eb4d7 Author: Jisheng Zhang Date: Sun Jan 29 01:28:46 2023 +0800 riscv: hwcap: make ISA extension ids can be used in asm So that ISA extensions can be used in assembly files, convert the multi-letter RISC-V ISA extension IDs enums to macros. In order to make them visible, move the #ifndef __ASSEMBLY__ guard to a later point in the header Signed-off-by: Jisheng Zhang Reviewed-by: Heiko Stuebner Reviewed-by: Andrew Jones Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230128172856.3814-4-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit 191b27c7c0e8c1a587832f8680132564743af76c Author: Jisheng Zhang Date: Sun Jan 29 01:28:45 2023 +0800 riscv: cpufeature: detect RISCV_ALTERNATIVES_EARLY_BOOT earlier Currently riscv_cpufeature_patch_func() does nothing at the RISCV_ALTERNATIVES_EARLY_BOOT stage. Add a check to detect whether we are in this stage and exit early. This will allow us to use riscv_cpufeature_patch_func() for scanning of all ISA extensions. Signed-off-by: Jisheng Zhang Reviewed-by: Andrew Jones Reviewed-by: Heiko Stuebner Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230128172856.3814-3-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit abcc445acdbeb561e881fcbd8e1dc4684628cc9b Author: Jisheng Zhang Date: Sun Jan 29 01:28:44 2023 +0800 riscv: move riscv_noncoherent_supported() out of ZICBOM probe It's a bit weird to call riscv_noncoherent_supported() each time when insmoding a module. Move the calling out of feature patch func. Signed-off-by: Jisheng Zhang Reviewed-by: Andrew Jones Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230128172856.3814-2-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit dd25cfab16e6bff1bbd75b42b8334c4419c90a4f Merge: 71af6a2ddf146 5157d6bfcad38 Author: Jakub Kicinski Date: Tue Jan 31 21:45:53 2023 -0800 Merge branch 'net-ipa-remaining-ipa-v5-0-support' Alex Elder says: ==================== net: ipa: remaining IPA v5.0 support This series includes almost all remaining IPA code changes required to support IPA v5.0. IPA register definitions and configuration data for IPA v5.0 will be sent later (soon). Note that the GSI register definitions still require work. GSI for IPA v5.0 supports up to 256 (rather than 32) channels, and this changes the way GSI register offsets are calculated. A few GSI register fields also change. The first patch in this series increases the number of IPA endpoints supported by the driver, from 32 to 36. The next updates the width of the destination field for the IP_PACKET_INIT immediate command so it can represent up to 256 endpoints rather than just 32. The next adds a few definitions of some IPA registers and fields that are first available in IPA v5.0. The next two patches update the code that handles router and filter table caches. Previously these were referred to as "hashed" tables, and the IPv4 and IPv6 tables are now combined into one "unified" table. The sixth and seventh patches add support for a new pulse generator, which allows time periods to be specified with a wider range of clock resolution. And the last patch just defines two new memory regions that were not previously used. ==================== Link: https://lore.kernel.org/r/20230130210158.4126129-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 5157d6bfcad38f8b652bd869ffc2b0aac50d5f64 Author: Alex Elder Date: Mon Jan 30 15:01:58 2023 -0600 net: ipa: define two new memory regions IPA v5.0 uses two memory regions not previously used. Define them and treat them as valid only for IPA v5.0. Signed-off-by: Alex Elder Reviewed-by: Leon Romanovsky Signed-off-by: Jakub Kicinski commit 2cdbcbfd482989eca2c0d3731f361bed70adb157 Author: Alex Elder Date: Mon Jan 30 15:01:57 2023 -0600 net: ipa: support a third pulse register The AP has third pulse generator available starting with IPA v5.0. Redefine ipa_qtime_val() to support that possibility. Pass the IPA pointer as an argument so the version can be determined. And stop using the sign of the returned tick count to indicate which of two pulse generators to use. Instead, have the caller provide the address of a variable that will hold the selected pulse generator for the Qtime value. And for version 5.0, check whether the third pulse generator best represents the time period. Add code in ipa_qtime_config() to configure the fourth pulse generator for IPA v5.0+; in that case configure both the third and fourth pulse generators to use 10 msec granularity. Consistently use "ticks" for local variables that represent a tick count. Signed-off-by: Alex Elder Reviewed-by: Leon Romanovsky Signed-off-by: Jakub Kicinski commit 32079a4ab10668a28535747399a5d8a527e775dd Author: Alex Elder Date: Mon Jan 30 15:01:56 2023 -0600 net: ipa: greater timer granularity options Starting with IPA v5.0, the head-of-line blocking timer has more than two pulse generators available to define timer granularity. To prepare for that, change the way the field value is encoded to use ipa_reg_encode() rather than ipa_reg_bit(). The aggregation granularity selection could (in principle) also use an additional pulse generator starting with IPA v5.0. Encode the AGGR_GRAN_SEL field differently to allow that as well. Signed-off-by: Alex Elder Reviewed-by: Leon Romanovsky Signed-off-by: Jakub Kicinski commit a08cedc31d50b698c2e36a08c5a69a42d73313c9 Author: Alex Elder Date: Mon Jan 30 15:01:55 2023 -0600 net: ipa: support zeroing new cache tables IPA v5.0+ separates the configuration of entries in the cached (previously "hashed") routing and filtering tables into distinct registers. Previously a single "filter and router" register updated entries in both tables at once; now the routing and filter table caches have separate registers that define their content. This patch updates the code that zeroes entries in the cached filter and router tables to support IPA versions including v5.0+. Signed-off-by: Alex Elder Reviewed-by: Leon Romanovsky Signed-off-by: Jakub Kicinski commit 8e7c89d84a2b73cc66485f1749b5e4f8d3a62e6a Author: Alex Elder Date: Mon Jan 30 15:01:54 2023 -0600 net: ipa: update table cache flushing Update the code that causes filter and router table caches to be flushed so that it supports IPA versions 5.0+. It adds a comment in ipa_hardware_config_hashing() that explains that cacheing does not need to be enabled, just as before, because it's enabled by default. (For the record, the FILT_ROUT_CACHE_CFG register would have been used if we wanted to explicitly enable these.) Signed-off-by: Alex Elder Reviewed-by: Leon Romanovsky Signed-off-by: Jakub Kicinski commit 8ba59716d16ac64d81a0b6bbe82ba5cb53af2135 Author: Alex Elder Date: Mon Jan 30 15:01:53 2023 -0600 net: ipa: define IPA v5.0+ registers Define some new registers that appear starting with IPA v5.0, along with enumerated types identifying their fields. Code that uses these will be added by upcoming patches. Most of the new registers are related to filter and routing tables, and in particular, their "hashed" variant. These tables are better described as "cached", where a hash value determines which entries are cached. From now on, naming related to this functionality will use "cache" instead of "hash", and that is reflected in these new register names. Some registers for managing these caches and their contents have changed as well. A few other new field definitions for registers (unrelated to table caches) are also defined. Signed-off-by: Alex Elder Reviewed-by: Leon Romanovsky Signed-off-by: Jakub Kicinski commit c84ddc119704bbd1fd7a5b1cdce3146c5840f07d Author: Alex Elder Date: Mon Jan 30 15:01:52 2023 -0600 net: ipa: extend endpoints in packet init command The IP_PACKET_INIT immediate command defines the destination endpoint to which a packet should be sent. Prior to IPA v5.0, a 5 bit field in that command represents the endpoint, but starting with IPA v5.0, the field is extended to 8 bits to support more than 32 endpoints. Signed-off-by: Alex Elder Reviewed-by: Leon Romanovsky Signed-off-by: Jakub Kicinski commit 07abde549bc1204685b0aec29acc8c75b18ac1f5 Author: Alex Elder Date: Mon Jan 30 15:01:51 2023 -0600 net: ipa: support more endpoints Increase the number of endpoints supported by the driver to 36, which IPA v5.0 supports. This makes it impossible to check at build time whether the supported number is too big to fit within the (5-bit) PACKET_INIT destination endpoint field. Instead, convert the build time check to compare against what fits in 8 bits. Add a check in ipa_endpoint_config() to also ensure the hardware reports an endpoint count that's in the expected range. Just open-code 32 as the limit (the PACKET_INIT field mask is not available where we'd want to use it). Signed-off-by: Alex Elder Reviewed-by: Leon Romanovsky Signed-off-by: Jakub Kicinski commit 71af6a2ddf146db4120ea220b93815e3993dcd94 Merge: c925ed5f66bf7 f741db1a5171e Author: Jakub Kicinski Date: Tue Jan 31 21:35:34 2023 -0800 Merge tag 'mlx5-updates-2023-01-30' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2023-01-30 Add fast update encryption key Jianbo Liu Says: ================ Data encryption keys (DEKs) are the keys used for data encryption and decryption operations. Starting from version 22.33.0783, firmware is optimized to accelerate the update of user keys into DEK object in hardware. The support for bulk allocation and destruction of DEK objects is added, and the bulk allocated DEKs are uninitialized, as the bulk creation requires no input key. When offload encryption/decryption, user gets one object from a bulk, and updates key by a new "modify DEK" command. This command is the same as create DEK object, but requires no heavy context memory allocation in firmware, which consumes most cpu cycles of the create DEK command. DEKs are cached internally by the NIC, so invalidating internal NIC caches is required before reusing DEKs. The SYNC_CRYPTO command is added to support it. DEK object can be reused, the keys in it can be updated after this command is executed. This patchset enhances the key creation and destruction flow, to get use of this new feature. Any user, for example, ktls, ipsec and macsec, can use it to offload keys. But, only ktls uses it, as others don't need many keys, and caching two many DEKs in pool is wasteful. There are two new data struts added: a. DEK pool. One pool is created for each key type. The bulks by the type, are placed in the pool's different bulk lists, according to the number of available and in_used DEKs in the bulk. b. DEK bulk. All DEKs in one bulk allocation are store here. There are two bitmaps to indicate the state of each DEK. New APIs are then added. When user need a DEK object, a. Fetch one bulk with avail DEKs, from the partial_list or avail_list, otherwise create new one. b. Pick one DEK, and set its need_sync and in_used bits to 1. Move the bulk to full_list if no more available keys, or put it to partial_list if the bulk is newly created. c. Update DEK object's key with user key, by the "modify DEK" command. d. Return DEK struct to user, then it gets the object id and fills it into the offload commands. When user free a DEK, a. Set in_use bit to 0. If all need_sync bits are 1 and all in_use bits of this bulk are 0, move it to sync_list. b. If the number of DEKs, which are freed by users, is over the threshold (128), schedule a workqueue to do the sync process. For the sync process, the SYNC_CRYPTO command is executed first. Then, for each bulks in partial_list, full_list and sync_list, reset need_sync bits of the freed DEK objects. If all need_sync bits in one bulk are zero, move it to avail_list. We already supported TIS pool to recycle the TISes. With this series and TIS pool, TLS CPS performance is improved greatly. And we tested https on the system: CPU: dual AMD EPYC 7763 64-Core processors RAM: 512G DEV: ConnectX-6 DX, with FW ver 22.33.0838 and TLS_OPTIMISE=true TLS CPS performance numbers are: Before: 11k connections/sec After: 101 connections/sec ================ * tag 'mlx5-updates-2023-01-30' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5e: kTLS, Improve connection rate by using fast update encryption key net/mlx5: Keep only one bulk of full available DEKs net/mlx5: Add async garbage collector for DEK bulk net/mlx5: Reuse DEKs after executing SYNC_CRYPTO command net/mlx5: Use bulk allocation for fast update encryption key net/mlx5: Add bulk allocation and modify_dek operation net/mlx5: Add support SYNC_CRYPTO command net/mlx5: Add new APIs for fast update encryption key net/mlx5: Refactor the encryption key creation net/mlx5: Add const to the key pointer of encryption key creation net/mlx5: Prepare for fast crypto key update if hardware supports it net/mlx5: Change key type to key purpose net/mlx5: Add IFC bits and enums for crypto key net/mlx5: Add IFC bits for general obj create param net/mlx5: Header file for crypto ==================== Link: https://lore.kernel.org/r/20230131031201.35336-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 2115a84d3688faef106abd19581a5a3b77845824 Author: Krzysztof Kozlowski Date: Tue Jan 24 10:19:16 2023 +0100 dt-bindings: serial: example cleanup Adjust example DTS indentation to match recommended style of 4-spaces and use lower-case hex for address in reg. No functional change. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230124091916.45054-10-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit eec2c477d9f45812193170a30fc12bf7eb75de4c Author: Krzysztof Kozlowski Date: Tue Jan 24 10:19:15 2023 +0100 dt-bindings: serial: drop unneeded quotes Cleanup by removing unneeded quotes from refs. No functional impact except adjusting to preferred coding style. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230124091916.45054-9-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 8fc7d03c3fd35b571890c04ce04d5d991808881b Author: Krzysztof Kozlowski Date: Tue Jan 24 10:19:14 2023 +0100 dt-bindings: serial: st,stm32-uart: drop common properties The binding references serial and rs485 schemas, so there is no need to list their properties. Simplify a bit by removing unneeded entries. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230124091916.45054-8-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit a36ed81cadb69ebe864ab56b561ef269acb53325 Author: Krzysztof Kozlowski Date: Tue Jan 24 10:19:13 2023 +0100 dt-bindings: serial: fsl-lpuart: allow other serial properties Reference common serial properties bindings to allow typical serial properties: imx8qxp-ai_ml.dtb: serial@5a060000: Unevaluated properties are not allowed ('uart-has-rtscts' were unexpected) Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230124091916.45054-7-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4bb0e9bcefe0526834c9fef6b2e73c703d100a58 Author: Krzysztof Kozlowski Date: Tue Jan 24 10:19:12 2023 +0100 dt-bindings: serial: fsl-lpuart: drop rs485 properties The binding references rs485 schema, so there is no need to list its properties. Simplify a bit by removing unneeded entries. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230124091916.45054-6-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 1f406109ec466ce20a8aaeab7b9b9ba33bd6e9fa Author: Krzysztof Kozlowski Date: Tue Jan 24 10:19:11 2023 +0100 dt-bindings: serial: fsl-imx-uart: drop common properties The binding references serial and rs485 schemas, so there is no need to list their properties. Simplify a bit by removing unneeded entries. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230124091916.45054-5-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 767d3467eb60e7332b425b5705cee090c96183d1 Author: Krzysztof Kozlowski Date: Tue Jan 24 10:19:10 2023 +0100 dt-bindings: serial: 8250_omap: drop rs485 properties The binding references rs485 schema, so there is no need to list its properties. Simplify a bit by removing unneeded entries. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230124091916.45054-4-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 3a7f73e3475d4f4288f8bd560253aca5cd0d0cad Author: Krzysztof Kozlowski Date: Tue Jan 24 10:19:09 2023 +0100 dt-bindings: serial: cdsn,uart: add power-domains Few Xilinx DTS have power domains in serial node: zynqmp-zc1232-revA.dtb: serial@ff000000: Unevaluated properties are not allowed ('power-domains' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Michal Simek Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230124091916.45054-3-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit bd99d12535165b761cfdb1fa19814e6885d59baf Author: Krzysztof Kozlowski Date: Tue Jan 24 10:19:08 2023 +0100 dt-bindings: serial: correct ref to serial.yaml The serial bindings should reference the local (in kernel) serial.yaml, not the /schemas/serial.yaml. The latter comes from dtschema package and is a small subset of serial bindings. Usage of the local serial.yaml allows typical properties and children: xilinx/avnet-ultra96-rev1.dtb: serial@ff000000: Unevaluated properties are not allowed ('bluetooth' were unexpected) Signed-off-by: Krzysztof Kozlowski Acked-by: Michal Simek Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230124091916.45054-2-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit c7a9a84eba45abfadb72f8d553d3533e6ae11598 Author: Krzysztof Kozlowski Date: Tue Jan 24 10:19:07 2023 +0100 dt-bindings: serial: pl011: allow ARM Primecell properties Reference ARM Primecell bindings to allow typical Primecell device node properties: broadcom/bcm2711-rpi-400.dtb: serial@7e201000: Unevaluated properties are not allowed ('arm,primecell-periphid' was unexpected) Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Reviewed-by: Stefan Wahren Link: https://lore.kernel.org/r/20230124091916.45054-1-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 531f1ca42741f3ba391bd01bf8f5847029cd9912 Author: Krzysztof Kozlowski Date: Tue Jan 24 10:15:52 2023 +0100 dt-bindings: serial: 8250: correct Nuvoton NPCM850 compatible Nuvoton NPCM850 UART is compatible with NPCM750, so add proper fallback to match existing DTS and Linux driver. Fixes: c8177f90b7c6 ("dt-bindings: serial: 8250: Add npcm845 compatible string") Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230124091602.44027-3-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4cb074028624fa28650a5c020c3354a84d340737 Author: Krzysztof Kozlowski Date: Tue Jan 24 10:15:51 2023 +0100 dt-bindings: serial: amlogic,meson-uart: allow other serial properties Reference common serial properties bindings to allow typical serial properties: meson-axg-jethome-jethub-j100.dtb: serial@23000: 'bluetooth', 'uart-has-rtscts' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230124091602.44027-2-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit c925ed5f66bf70eb5327fd67382a12994d9b1fce Merge: 67971c381fbe1 dec6b80164451 Author: Jakub Kicinski Date: Tue Jan 31 21:04:25 2023 -0800 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== Intel Wired LAN: Remove redundant Device Control Error Reporting Enable Bjorn Helgaas says: Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core sets the Device Control bits that enable error reporting for PCIe devices. This series removes redundant calls to pci_enable_pcie_error_reporting() that do the same thing from several NIC drivers. There are several more drivers where this should be removed; I started with just the Intel drivers here. * '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: ixgbe: Remove redundant pci_enable_pcie_error_reporting() igc: Remove redundant pci_enable_pcie_error_reporting() igb: Remove redundant pci_enable_pcie_error_reporting() ice: Remove redundant pci_enable_pcie_error_reporting() iavf: Remove redundant pci_enable_pcie_error_reporting() i40e: Remove redundant pci_enable_pcie_error_reporting() fm10k: Remove redundant pci_enable_pcie_error_reporting() e1000e: Remove redundant pci_enable_pcie_error_reporting() ==================== Link: https://lore.kernel.org/r/20230130192519.686446-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 67971c381fbe1c89d3f0bec30dcc33850c8acbd2 Merge: 88b49402faa8f bd32ff68721c3 Author: Jakub Kicinski Date: Tue Jan 31 21:02:12 2023 -0800 Merge branch 'selftests-mlxsw-convert-to-iproute2-dcb' Petr Machata says: ==================== selftests: mlxsw: Convert to iproute2 dcb There is a dedicated tool for configuration of DCB in iproute2. Use it in the selftests instead of lldpad. Patches #1-#3 convert three tests. Patch #4 drops the now-unnecessary lldpad helpers. ==================== Link: https://lore.kernel.org/r/cover.1675096231.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit bd32ff68721c3c1c5943f5493b62aae99190af36 Author: Petr Machata Date: Mon Jan 30 17:40:04 2023 +0100 selftests: net: forwarding: lib: Drop lldpad_app_wait_set(), _del() The existing users of these helpers have been converted to iproute2 dcb. Drop the helpers. Signed-off-by: Petr Machata Reviewed-by: Danielle Ratson Signed-off-by: Jakub Kicinski commit 5b3ef0452c593b3439278cbc919119c770786f25 Author: Petr Machata Date: Mon Jan 30 17:40:03 2023 +0100 selftests: mlxsw: qos_defprio: Convert from lldptool to dcb Set up default port priority through the iproute2 dcb tool, which is easier to understand and manage. Signed-off-by: Petr Machata Reviewed-by: Danielle Ratson Signed-off-by: Jakub Kicinski commit 10d5bd0b69edb5af7933ba76dd23af3ff9d63b29 Author: Petr Machata Date: Mon Jan 30 17:40:02 2023 +0100 selftests: mlxsw: qos_dscp_router: Convert from lldptool to dcb Set up DSCP prioritization through the iproute2 dcb tool, which is easier to understand and manage. Signed-off-by: Petr Machata Reviewed-by: Danielle Ratson Signed-off-by: Jakub Kicinski commit 1680801ef64d12b44048e0a35a913d7b13d78be0 Author: Petr Machata Date: Mon Jan 30 17:40:01 2023 +0100 selftests: mlxsw: qos_dscp_bridge: Convert from lldptool to dcb Set up DSCP prioritization through the iproute2 dcb tool, which is easier to understand and manage. Signed-off-by: Petr Machata Reviewed-by: Danielle Ratson Signed-off-by: Jakub Kicinski commit 88b49402faa8f65251904dd7fa77d7475e2162fe Merge: 1b98ac0fc841e 9a24e1ff4326c Author: Jakub Kicinski Date: Tue Jan 31 20:59:09 2023 -0800 Merge branch 'net-mdio-add-amlogic-gxl-mdio-mux-support' Jerome Brunet says: ==================== net: mdio: add amlogic gxl mdio mux support Add support for the MDIO multiplexer found in the Amlogic GXL SoC family. This multiplexer allows to choose between the external (SoC pins) MDIO bus, or the internal one leading to the integrated 10/100M PHY. This multiplexer has been handled with the mdio-mux-mmioreg generic driver so far. When it was added, it was thought the logic was handled by a single register. It turns out more than a single register need to be properly set. As long as the device is using the Amlogic vendor bootloader, or upstream u-boot with net support, it is working fine since the kernel is inheriting the bootloader settings. Without net support in the bootloader, this glue comes unset in the kernel and only the external path may operate properly. With this driver (and the associated change in arch/arm64/boot/dts/amlogic/meson-gxl.dtsi), the kernel no longer relies on the bootloader to set things up, fixing the problem. ==================== Link: https://lore.kernel.org/r/20230130151616.375168-1-jbrunet@baylibre.com Signed-off-by: Jakub Kicinski commit 9a24e1ff4326c9c25dc2daf9dab3cc93ed9b8ab9 Author: Jerome Brunet Date: Mon Jan 30 16:16:16 2023 +0100 net: mdio: add amlogic gxl mdio mux support Add support for the mdio mux and internal phy glue of the GXL SoC family Reported-by: Da Xue Signed-off-by: Jerome Brunet Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit cc732d235126887cf445801a01ce54096820ceef Author: Jerome Brunet Date: Mon Jan 30 16:16:15 2023 +0100 dt-bindings: net: add amlogic gxl mdio multiplexer Add documentation for the MDIO bus multiplexer found on the Amlogic GXL SoC family Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jerome Brunet Signed-off-by: Jakub Kicinski commit 1480bcf074d34e754990204240f8473cdbef0072 Author: Eddie James Date: Thu Jan 26 16:08:42 2023 -0600 ARM: dts: aspeed: p10bmc: Enable UART2 The APSS can be accessed over the second uart on these systems. Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20230126220842.885965-1-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit 1b98ac0fc841e8f87ea96acd9654bd40470f4ef0 Merge: df54fde451db9 981cbcb030d91 Author: Jakub Kicinski Date: Tue Jan 31 20:36:05 2023 -0800 Merge branch 'tools-ynl-more-docs-and-basic-ethtool-support' Jakub Kicinski says: ==================== tools: ynl: more docs and basic ethtool support I got discouraged from supporting ethtool in specs, because generating the user space C code seems a little tricky. The messages are ID'ed in a "directional" way (to and from kernel are separate ID "spaces"). There is value, however, in having the spec and being able to for example use it in Python. After paying off some technical debt - add a partial ethtool spec. Partial because the header for ethtool is almost a 1000 LoC, so converting in one sitting is tough. But adding new commands should be trivial now. Last but not least I add more docs, I realized that I've been sending a similar "instructions" email to people working on new families. It's now intro-specs.rst. ==================== Link: https://lore.kernel.org/r/20230131023354.1732677-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 981cbcb030d919ee49ebbfc2889839c6882d9ea7 Author: Jakub Kicinski Date: Mon Jan 30 18:33:54 2023 -0800 tools: net: use python3 explicitly The scripts require Python 3 and some distros are dropping Python 2 support. Reported-by: Stanislav Fomichev Signed-off-by: Jakub Kicinski commit 01e47a372268beaec517dc0ea8d9101550600df4 Author: Jakub Kicinski Date: Mon Jan 30 18:33:53 2023 -0800 docs: netlink: add a starting guide for working with specs We have a bit of documentation about the internals of Netlink and the specs, but really the goal is for most people to not worry about those. Add a practical guide for beginners who want to poke at the specs. Signed-off-by: Jakub Kicinski commit b784db7ae840811dfb3eea900620f6bb4ae6e0b1 Author: Jakub Kicinski Date: Mon Jan 30 18:33:52 2023 -0800 netlink: specs: add partial specification for ethtool Ethtool is one of the most actively developed families. With the changes to the CLI it should be possible to use the YNL based code for easy prototyping and development. Add a partial family definition. I've tested the string set and rings. I don't have any MAC Merge implementation to test with, but I added the definition for it, anyway, because it's last. New commands can simply be added at the end without having to worry about manually providing IDs / values. Set (with notification support - None is the response, the data is from the notification): $ sudo ./tools/net/ynl/cli.py \ --spec Documentation/netlink/specs/ethtool.yaml \ --do rings-set \ --json '{"header":{"dev-name":"enp0s31f6"}, "rx":129}' \ --subscribe monitor None [{'msg': {'header': {'dev-index': 2, 'dev-name': 'enp0s31f6'}, 'rx': 136, 'rx-max': 4096, 'tx': 256, 'tx-max': 4096, 'tx-push': 0}, 'name': 'rings-ntf'}] Do / dump (yes, the kernel requires that even for dump and even if empty - the "header" nest must be there): $ ./tools/net/ynl/cli.py \ --spec Documentation/netlink/specs/ethtool.yaml \ --do rings-get \ --json '{"header":{"dev-index": 2}}' {'header': {'dev-index': 2, 'dev-name': 'enp0s31f6'}, 'rx': 136, 'rx-max': 4096, 'tx': 256, 'tx-max': 4096, 'tx-push': 0} $ ./tools/net/ynl/cli.py \ --spec Documentation/netlink/specs/ethtool.yaml \ --dump rings-get \ --json '{"header":{}}' [{'header': {'dev-index': 2, 'dev-name': 'enp0s31f6'}, 'rx': 136, 'rx-max': 4096, 'tx': 256, 'tx-max': 4096, 'tx-push': 0}, {'header': {'dev-index': 3, 'dev-name': 'wlp0s20f3'}, 'tx-push': 0}, {'header': {'dev-index': 19, 'dev-name': 'enp58s0u1u1'}, 'rx': 100, 'rx-max': 4096, 'tx-push': 0}] And error reporting: $ ./tools/net/ynl/cli.py \ --spec Documentation/netlink/specs/ethtool.yaml \ --dump rings-get \ --json '{"header":{"flags":5}}' Netlink error: Invalid argument nl_len = 68 (52) nl_flags = 0x300 nl_type = 2 error: -22 extack: {'msg': 'reserved bit set', 'bad-attr-offs': 24, 'bad-attr': '.header.flags'} None Signed-off-by: Jakub Kicinski commit 8403bf04453044397219bc70715a3a94730199cc Author: Jakub Kicinski Date: Mon Jan 30 18:33:51 2023 -0800 netlink: specs: finish up operation enum-models I had a (bright?) idea of introducing the concept of enum-models to account for all the weird ways families enumerate their messages. I've never finished it because generating C code for each of them is pretty daunting. But for languages which can use ID values directly the support is simple enough, so clean this up a bit. "unified" model is what I recommend going forward. "directional" model is what ethtool uses. "notify-split" is used by the proposed DPLL code, but we can just make them use "unified", it hasn't been merged :) Signed-off-by: Jakub Kicinski commit 5c6674f6eb52f7968b805b25c7478b3d96b6b4f7 Author: Jakub Kicinski Date: Mon Jan 30 18:33:50 2023 -0800 tools: ynl: load jsonschema on demand The CLI script tries to validate jsonschema by default. It's seems better to validate too many times than too few. However, when copying the scripts to random servers having to install jsonschema is tedious. Load jsonschema via importlib, and let the user opt out. Signed-off-by: Jakub Kicinski commit 8dfec0a8886880868802094967c6a769b6d15737 Author: Jakub Kicinski Date: Mon Jan 30 18:33:49 2023 -0800 tools: ynl: use operation names from spec on the CLI When I wrote the first version of the Python code I was quite excited that we can generate class methods directly from the spec. Unfortunately we need to use valid identifiers for method names (specifically no dashes are allowed). Don't reuse those names on the CLI, it's much more natural to use the operation names exactly as listed in the spec. Instead of: ./cli --do rings_get use: ./cli --do rings-get Signed-off-by: Jakub Kicinski commit 4cd2796f3f8d82aa3a13d3eca39950fe6fe9d672 Author: Jakub Kicinski Date: Mon Jan 30 18:33:48 2023 -0800 tools: ynl: support pretty printing bad attribute names One of my favorite features of the Netlink specs is that they make decoding structured extack a ton easier. Implement pretty printing bad attribute names in YNL. For example it will now say: 'bad-attr': '.header.flags' rather than the useless: 'bad-attr-offs': 32 Proof: $ ./cli.py --spec ethtool.yaml --do rings_get \ --json '{"header":{"dev-index":1, "flags":4}}' Netlink error: Invalid argument nl_len = 68 (52) nl_flags = 0x300 nl_type = 2 error: -22 extack: {'msg': 'reserved bit set', 'bad-attr': '.header.flags'} Signed-off-by: Jakub Kicinski commit 90256f3f8093284ef4f162229438ff1eea3a928e Author: Jakub Kicinski Date: Mon Jan 30 18:33:47 2023 -0800 tools: ynl: support multi-attr Ethtool uses mutli-attr, add the support to YNL. Signed-off-by: Jakub Kicinski commit fd0616d34274fb489e3ea9aed089414d533b58e6 Author: Jakub Kicinski Date: Mon Jan 30 18:33:46 2023 -0800 tools: ynl: support directional enum-model in CLI Support families which use different IDs for messages to and from the kernel. Signed-off-by: Jakub Kicinski commit 19b64b48a33e986dd21430e759629af2562373b2 Author: Jakub Kicinski Date: Mon Jan 30 18:33:45 2023 -0800 tools: ynl: add support for types needed by ethtool Ethtool needs support for handful of extra types. It doesn't have the definitions section yet. Signed-off-by: Jakub Kicinski commit 30a5c6c8104f34ed02c50041b82f3ef80924de6d Author: Jakub Kicinski Date: Mon Jan 30 18:33:44 2023 -0800 tools: ynl: use the common YAML loading and validation code Adapt the common object hierarchy in code gen and CLI. Signed-off-by: Jakub Kicinski commit 3aacf8281336ac57fe4a4e85fa55a68218e90b5c Author: Jakub Kicinski Date: Mon Jan 30 18:33:43 2023 -0800 tools: ynl: add an object hierarchy to represent parsed spec There's a lot of copy and pasting going on between the "cli" and code gen when it comes to representing the parsed spec. Create a library which both can use. Signed-off-by: Jakub Kicinski commit 4e4480e89c47b52b3f4fbc1ddf07a7ce541f0839 Author: Jakub Kicinski Date: Mon Jan 30 18:33:42 2023 -0800 tools: ynl: move the cli and netlink code around Move the CLI code out of samples/ and the library part of it into tools/net/ynl/lib/. This way we can start sharing some code with the code gen. Initially I thought that code gen is too C-specific to share anything but basic stuff like calculating values for enums can easily be shared. Signed-off-by: Jakub Kicinski commit eaf317e7d2bbb04486c9842aea9be1e94bd416ed Author: Jakub Kicinski Date: Mon Jan 30 18:33:41 2023 -0800 tools: ynl-gen: prevent do / dump reordering An earlier fix tried to address generated code jumping around one code-gen run to another. Turns out dict()s are already ordered since Python 3.7, the problem is that we iterate over operation modes using a set(). Sets are unordered in Python. Signed-off-by: Jakub Kicinski commit 32e69f232db4ca11f26e5961daeff93906ce232f Author: Maxim Levitsky Date: Tue Nov 29 21:37:11 2022 +0200 KVM: x86: Use emulator callbacks instead of duplicating "host flags" Instead of re-defining the "host flags" bits, just expose dedicated helpers for each of the two remaining flags that are consumed by the emulator. The emulator never consumes both "is guest" and "is SMM" in close proximity, so there is no motivation to avoid additional indirect branches. Also while at it, garbage collect the recently removed host flags. No functional change is intended. Signed-off-by: Maxim Levitsky Tested-by: Santosh Shukla Link: https://lore.kernel.org/r/20221129193717.513824-6-mlevitsk@redhat.com [sean: fix CONFIG_KVM_SMM=n builds, tweak names of wrappers] Signed-off-by: Sean Christopherson commit 5ab0fc155dc0cac3b74584f7bc972569b0f8a57b Merge: 9a3f21fe5cb9f ac86f547ca100 Author: Andrew Morton Date: Tue Jan 31 17:25:17 2023 -0800 Sync mm-stable with mm-hotfixes-stable to pick up dependent patches Merge branch 'mm-hotfixes-stable' into mm-stable commit 18b616d0c0ff51136b775429dfb2b9432459fe47 Author: Rob Herring Date: Wed Jan 25 16:14:50 2023 -0600 dt-bindings: reserved-memory: Refine 'size' and 'alignment' types Both 'size' and 'alignment' are single values, but can be 32 or 64 bits. Use the precise types rather than the 2 32-bit cell encoding. Link: https://lore.kernel.org/r/20230125221450.3058762-1-robh@kernel.org Signed-off-by: Rob Herring commit 92ec34fecc5d0f652f5adeb0c19e051981c15b42 Author: Rob Herring Date: Wed Jan 25 16:14:32 2023 -0600 dt-bindings: PCI: ti,j721e-pci-host: Simplify 'device-id' schema 'device-id' is just a scalar value, so just 'enum' is sufficient. Link: https://lore.kernel.org/r/20230125221432.3058405-1-robh@kernel.org Signed-off-by: Rob Herring commit 0be465c61d4623e49672a2e7942d9d101184b8f8 Author: Rob Herring Date: Wed Jan 25 16:14:23 2023 -0600 dt-bindings: interrupt-controller: brcm,bcm7120-l2-intc: Fix 'brcm,int-fwd-mask' differing type 'brcm,int-fwd-mask' is also defined in brcm,bcm7038-l1-intc.yaml as a 'uint32-array', so unify the type definition. Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20230125221423.3058221-1-robh@kernel.org Signed-off-by: Rob Herring commit dbc2af0ace20a0b60f97ed763edd8cfc2c71aab3 Author: Rob Herring Date: Wed Jan 25 16:13:56 2023 -0600 dt-bindings: display: msm: Drop type from 'memory-region' 'memory-region' is a common property and already has a type. Link: https://lore.kernel.org/r/20230125221357.3057655-1-robh@kernel.org Signed-off-by: Rob Herring commit 1fab1469b66baf7847298b205e5c4aff47c2ae8a Author: Andreas Ziegler Date: Tue Jan 3 11:34:00 2023 +0100 tools/tracing/rtla: osnoise_hist: display average with two-digit precision Calculate average value in osnoise-hist summary with two-digit precision to avoid displaying too optimitic results. Link: https://lkml.kernel.org/r/20230103103400.275566-3-br015@umbiko.net Signed-off-by: Andreas Ziegler Acked-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) commit fe137a4fe0e77eb95396cfc5c3dd7df404421aa4 Author: Andreas Ziegler Date: Tue Jan 3 11:33:59 2023 +0100 tools/tracing/rtla: osnoise_hist: use total duration for average calculation Sampled durations must be weighted by observed quantity, to arrive at a correct average duration value. Perform calculation of total duration by summing (duration * count). Link: https://lkml.kernel.org/r/20230103103400.275566-2-br015@umbiko.net Fixes: 829a6c0b5698 ("rtla/osnoise: Add the hist mode") Signed-off-by: Andreas Ziegler Acked-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) commit a37380ef8b54b18717e908e173179bf78c143ed2 Author: zhang songyi Date: Mon Dec 19 14:31:05 2022 +0800 tools/rv: Remove unneeded semicolon The semicolon after the "}" is unneeded. Link: https://lore.kernel.org/linux-trace-devel/202212191431057948891@zte.com.cn Signed-off-by: zhang songyi Acked-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) commit 003e11ed2ef4af01b808f0f193eaa5a32f32383b Author: John Harrison Date: Tue Jan 24 15:11:11 2023 -0800 drm/i915/mtl: Wa_22011802037: don't complain about missing regs on MTL Wa_22011802037 requires waiting for an engine-specific register to clear. A missing entry for GSC engine in the register table is flagged as a drm_err. The drm_err was originally intended to catch missing register entries for newer engines, however, it was later found that the WA is only required for 'legacy' engines. So just drop the drm_err. Signed-off-by: John Harrison Reviewed-by: Andrzej Hajda Signed-off-by: Umesh Nerlige Ramappa Link: https://patchwork.freedesktop.org/patch/msgid/20230124231111.1786429-1-umesh.nerlige.ramappa@intel.com commit 4d4692a2ff836487c17960a6211a4cce7094f09c Author: Wedson Almeida Filho Date: Mon Jan 30 03:44:00 2023 -0300 rust: types: introduce `ScopeGuard` This allows us to run some code when the guard is dropped (e.g., implicitly when it goes out of scope). We can also prevent the guard from running by calling its `dismiss()` method. Signed-off-by: Wedson Almeida Filho Reviewed-by: Vincenzo Palazzo Reviewed-by: Andreas Hindborg Signed-off-by: Miguel Ojeda commit 7c841564105851654d478d8b48259e544a1d448f Author: Carlos Bilbao Date: Wed Jan 25 12:18:40 2023 -0600 docs/sp_SP: Add process magic-number translation Translate the following document into Spanish: - process/magic-number.rst Signed-off-by: Carlos Bilbao Link: https://lore.kernel.org/r/20230125181840.3007341-1-carlos.bilbao@amd.com [jc: escaped '*' to eliminate sphinx warning ] Signed-off-by: Jonathan Corbet commit b66f723bb552ad59c2acb5d45ea45c890f84498b Author: Andreas Gruenbacher Date: Tue Jan 31 15:06:53 2023 +0100 gfs2: Improve gfs2_make_fs_rw error handling In gfs2_make_fs_rw(), make sure to call gfs2_consist() to report an inconsistency and mark the filesystem as withdrawn when gfs2_find_jhead() fails. At the end of gfs2_make_fs_rw(), when we discover that the filesystem has been withdrawn, make sure we report an error. This also replaces the gfs2_withdrawn() check after gfs2_find_jhead(). Reported-by: Tetsuo Handa Cc: syzbot+f51cb4b9afbd87ec06f2@syzkaller.appspotmail.com Signed-off-by: Andreas Gruenbacher commit 445cb1277e10d7e19b631ef8a64aa3f055df377d Author: Bob Peterson Date: Mon Jan 9 15:42:15 2023 -0500 Revert "GFS2: free disk inode which is deleted by remote node -V2" This reverts commit 970343cd4904 ("GFS2: free disk inode which is deleted by remote node -V2"). The original intent behind commit 970343cd49 was to cull dentries when a remote node requests to demote an iopen glock, which happens when the remote node tries to delete the inode. This is now handled by gfs2_try_evict(), which is called via iopen_go_callback() -> gfs2_queue_try_to_evict(). Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit b88beb9a246f7506778f8680ee9627cd85262ba4 Author: Andreas Gruenbacher Date: Thu Jan 26 20:23:40 2023 +0100 gfs2: Evict inodes cooperatively Add a gfs2_evict_inodes() helper that evicts inodes cooperatively across the cluster. This avoids running into timeouts during unmount unnecessarily. Signed-off-by: Andreas Gruenbacher commit 6b388abc33998330c6fe55a712d61be888fd7b67 Author: Andreas Gruenbacher Date: Tue Dec 6 17:27:14 2022 +0100 gfs2: Flush delete work before shrinking inode cache In gfs2_kill_sb(), flush the delete work queue after setting the SDF_DEACTIVATING flag. This ensures that no new inodes will be instantiated anymore, and the inode cache will be empty after the following kill_block_super() -> generic_shutdown_super() -> evict_inodes() call. With that, function gfs2_make_fs_ro() now calls gfs2_flush_delete_work() after the workqueue has been destroyed. Skip that by checking for the presence of the SDF_DEACTIVATING flag. Signed-off-by: Andreas Gruenbacher commit 6c0246a96e08cd1b5036c34c52de99bd9dffbb48 Author: Bob Peterson Date: Tue Dec 6 00:12:59 2022 +0100 gfs2: Cease delete work during unmount Add a check to delete_work_func() so that it quits when it finds that the filesystem is deactivating. This speeds up the delete workqueue draining in gfs2_kill_sb(). In addition, make sure that iopen_go_callback() won't queue any new delete work while the filesystem is deactivating. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 1c9001515e8adc0743c6ae0707dc6f3aac926d0e Author: Bob Peterson Date: Tue Dec 6 17:27:14 2022 +0100 gfs2: Add SDF_DEACTIVATING super block flag Add a new SDF_DEACTIVATING super block flag that is set when the filesystem has started to deactivate. This will be used in the next patch to stop and drain the delete work during unmount. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit fd5f446f0b3d529e55cf2f81f3b994a7216808ca Author: Bob Peterson Date: Tue Jan 24 14:55:18 2023 -0500 gfs2: check gl_object in rgrp glops Function gfs2_clear_rgrpd() is called during unmount to free all rgrps and their sub-objects. If the rgrp glock is held (e.g. in SH) it calls gfs2_glock_cb() to unlock, then calls flush_delayed_work() to make sure any glock work is finished. However, there is a race with other cluster nodes who may request the rgrp glock in another mode (say, EX). Func gfs2_clear_rgrpd() calls glock_clear_object() which sets gl_object to NULL but that's done without holding the gl_lockref spin_lock. While the lock is not held Another node's demote request can cause the state machine to run again, and since the gl_lockref is released in do_xmote, the second process's call to do_xmote can call go_inval (rgrp_go_inval) after the gl_object has been cleared, which results in NULL pointer reference of the rgrp glock's gl_object. Other go_inval glops functions don't require the gl_object to exist, as evidenced by function inode_go_inval() which explicitly checks for if (ip) before referencing gl_object. This patch does the same thing for rgrp glocks. Both the go_inval and go_sync ops are patched to check the existence of gl_object (rgd) before trying to dereference it. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit f0e56edc2ec7a40f4e94590172f21317baafb196 Author: Andreas Gruenbacher Date: Wed Dec 21 00:52:51 2022 +0100 gfs2: Split the two kinds of glock "delete" work Function delete_work_func() is used for two purposes: * to immediately try to evict the glock's inode, and * to verify after a little while that the inode has been deleted as expected, and didn't just get skipped. These two operations are not separated very well, so introduce two new glock flags to improved that. Split gfs2_queue_delete_work() into gfs2_queue_try_to_evict and gfs2_queue_verify_evict(). Signed-off-by: Andreas Gruenbacher commit 0247f4e959c01f6ce1fcc2091c571f8c0742a065 Author: Andreas Gruenbacher Date: Tue Dec 6 16:04:22 2022 +0100 gfs2: Move delete workqueue into super block Move the global delete workqueue into struct gfs2_sbd so that we can flush / drain it without interfering with other filesystems. Signed-off-by: Andreas Gruenbacher commit 3056dc46559bfe3fc4b79771dcbc2d003f9fd313 Author: Andreas Gruenbacher Date: Fri Dec 9 18:28:20 2022 +0100 gfs2: Get rid of GLF_PENDING_DELETE flag Get rid of the GLF_PENDING_DELETE glock flag introduced by commit a0e3cc65fa29 ("gfs2: Turn gl_delete into a delayed work"). The only use of that flag is to prevent the iopen glock from being demoted (i.e., unlocked) while delete work is pending. It turns out that demoting the iopen glock while delete work is pending is perfectly fine; we only need to make sure that the glock isn't being freed while still in use. This is ensured by the previous patch because delete_work_func() owns a reference while the work is queued or running. With these changes, gfs2_queue_delete_work() no longer takes the glock spin lock, so we can use it in iopen_go_callback() instead of open-coding it there. Signed-off-by: Andreas Gruenbacher commit 228804a35caa7edae4a81049281e7f106dea1ad1 Author: Andreas Gruenbacher Date: Sat Dec 10 02:21:32 2022 +0100 gfs2: Make glock lru list scanning safer In __gfs2_glock_put(), remove the glock from the lru list *after* dropping the glock lock. This prevents deadlocks against gfs2_scan_glock_lru(). In gfs2_scan_glock_lru(), make sure that the glock's reference count is zero before moving the glock to the dispose list. This skips glocks that are marked dead as well as glocks that are still in use. Additionally, switch to spin_trylock() as we already do in gfs2_dispose_glock_lru(); this alone would also be enough to prevent deadlocks against __gfs2_glock_put(). Signed-off-by: Andreas Gruenbacher commit 8fb8f70ec71eb5ca51ecbfc2303523ff836648db Author: Andreas Gruenbacher Date: Sat Dec 10 02:14:04 2022 +0100 gfs2: Clean up gfs2_scan_glock_lru Switch to list_for_each_entry_safe() and eliminate the "skipped" list in gfs2_scan_glock_lru(). At the same time, scan the requested number of items to scan, not one more than that number. Signed-off-by: Andreas Gruenbacher commit 2d1439557ffeab3b9729f1c64fa86830070f9a04 Author: Andreas Gruenbacher Date: Tue Jan 24 14:14:42 2023 +0100 gfs2: Improve gfs2_upgrade_iopen_glock comment Improve the comment describing the inode and iopen glock interactions and the glock poking related to inode evict. Signed-off-by: Andreas Gruenbacher commit b132c2a8ea115cf2353acf1e1ba06c71a46aead0 Author: Moudy Ho Date: Wed Jan 18 11:15:08 2023 +0800 clk: mediatek: remove MT8195 vppsys/0/1 simple_probe MT8195 VPPSYS0/1 will be probed by the compatible name in the mtk-mmsys driver and then probe its own clock driver as a platform driver. Signed-off-by: Moudy Ho Link: https://lore.kernel.org/r/20230118031509.29834-4-moudy.ho@mediatek.com Signed-off-by: Stephen Boyd commit d7133d6d25fbc9374447e2ca4e23a04023824779 Author: Dmitry Baryshkov Date: Wed Jan 18 05:20:24 2023 +0200 arm64: dts: qcom: sm8350: use qcom,sm8350-dsi-ctrl compatibles Add the per-SoC (qcom,sm8350-dsi-ctrl) compatible strings to DSI nodes to follow the pending DSI bindings changes. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230118032024.1715857-1-dmitry.baryshkov@linaro.org commit 19eee67386fe68b8f39dc947d15711a5b5cef6ac Author: Dmitry Baryshkov Date: Wed Jan 18 05:17:18 2023 +0200 arm64: dts: qcom: sc8280xp: add p1 register blocks to DP nodes Per DT bindings add p1 register blocks to all DP controllers on SC8280XP platform. Fixes: 6f299ae7f96d ("arm64: dts: qcom: sc8280xp: add p1 register blocks to DP nodes") Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230118031718.1714861-4-dmitry.baryshkov@linaro.org commit 3cfa9e245d71f498a27f2dd8d09bbaaf50738723 Author: Dmitry Baryshkov Date: Wed Jan 18 05:17:17 2023 +0200 arm64: dts: qcom: sc8280xp-crd: drop #sound-dai-cells from eDP node The eDP device doesn't provide sound DAI. Drop corresponding property from the eDP node. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230118031718.1714861-3-dmitry.baryshkov@linaro.org commit 2abfcd293b79baf62895894fa3ea2386ffbe6338 Author: Ross Zwisler Date: Wed Jan 25 14:32:51 2023 -0700 docs: ftrace: always 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 parts of Documentation still reference this older debugfs path, so let's update them to avoid confusion. Signed-off-by: Ross Zwisler Reviewed-by: Steven Rostedt (Google) Link: https://lore.kernel.org/r/20230125213251.2013791-1-zwisler@google.com Signed-off-by: Jonathan Corbet commit b05ada5615f844c3fdcf5e2a0fa35a4bc1a394f2 Author: Hui Su Date: Sat Jan 28 17:11:48 2023 +0800 Doc/damon: fix the data path error %s/modules/module/ Signed-off-by: Hui Su Reviewed-by: Alex Shi Reviewed-by: SeongJae Park Link: https://lore.kernel.org/r/Y9Tm1FiKBPKA2Tcx@localhost.localdomain Signed-off-by: Jonathan Corbet commit 916b54a7688b0b9a1c48c708b848e4348c3ae2ab Author: Maxim Levitsky Date: Mon Jan 30 17:20:03 2023 -0800 KVM: x86: Move HF_NMI_MASK and HF_IRET_MASK into "struct vcpu_svm" Move HF_NMI_MASK and HF_IRET_MASK (a.k.a. "waiting for IRET") out of the common "hflags" and into dedicated flags in "struct vcpu_svm". The flags are used only for the SVM and thus should not be in hflags. Tracking NMI masking in software isn't SVM specific, e.g. VMX has a similar flag (soft_vnmi_blocked), but that's much more of a hack as VMX can't intercept IRET, is useful only for ancient CPUs, i.e. will hopefully be removed at some point, and again the exact behavior is vendor specific and shouldn't ever be referenced in common code. converting VMX No functional change is intended. Suggested-by: Sean Christopherson Signed-off-by: Maxim Levitsky Tested-by: Santosh Shukla Link: https://lore.kernel.org/r/20221129193717.513824-5-mlevitsk@redhat.com [sean: split from HF_GIF_MASK patch] Signed-off-by: Sean Christopherson commit c760e86f27fed4aeb46e206a6476b82d8e2d1762 Author: Maxim Levitsky Date: Mon Jan 30 16:32:53 2023 -0800 KVM: x86: Move HF_GIF_MASK into "struct vcpu_svm" as "guest_gif" Move HF_GIF_MASK out of the common "hflags" and into vcpu_svm.guest_gif. GIF is an SVM-only concept and has should never be consulted outside of SVM-specific code. No functional change is intended. Suggested-by: Sean Christopherson Signed-off-by: Maxim Levitsky Tested-by: Santosh Shukla Link: https://lore.kernel.org/r/20221129193717.513824-5-mlevitsk@redhat.com [sean: split to separate patch] Signed-off-by: Sean Christopherson commit 8957cbcfed0a7e423695d90600b2643dda31fc7b Author: Maxim Levitsky Date: Tue Nov 29 21:37:07 2022 +0200 KVM: nSVM: Don't sync tlb_ctl back to vmcb12 on nested VM-Exit Don't sync the TLB control field from vmcb02 to vmcs12 on nested VM-Exit. Per AMD's APM, the field is not modified by hardware: The VMRUN instruction reads, but does not change, the value of the TLB_CONTROL field Signed-off-by: Maxim Levitsky Tested-by: Santosh Shukla Link: https://lore.kernel.org/r/20221129193717.513824-2-mlevitsk@redhat.com [sean: massage changelog] Signed-off-by: Sean Christopherson commit 7ee6095fe885bd4374f7a562cb62eef4b80c1556 Author: Jonathan Neuschäfer Date: Sun Jan 29 12:59:17 2023 +0100 dma-buf: Add "dma-buf" to title of documentation To make it easier to find the dma-buf documentation when looking through tables-of-contents etc., put the name "dma-buf" in the title. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20230129115917.1229529-1-j.neuschaefer@gmx.net Signed-off-by: Jonathan Corbet commit 3bdd9f075f54fea81572ef4d6f4edaef0027b5bc Author: Jonathan Neuschäfer Date: Sun Jan 29 16:04:35 2023 +0100 scripts: kernel-doc: Remove workaround for @param... syntax Commit 43756e347f21 ("scripts/kernel-doc: Add support for named variable macro arguments") improved how named variable macro arguments are handled, and changed how they are documented in kerneldoc comments from "@param...", to "@param", deprecating the old syntax. All users of the old syntax have since been converted, so this commit finally removes support for it. The output of "make htmldocs" is the same with and without this commit. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20230129150435.1510400-1-j.neuschaefer@gmx.net Signed-off-by: Jonathan Corbet commit 19a1261322335642282cc100867cb93579b03f0b Author: Jonathan Neuschäfer Date: Sun Jan 29 16:14:08 2023 +0100 Documentation: coccinelle: Escape --options to fix Sphinx output Without such escaping, -- is rendered as – (en dash). Signed-off-by: Jonathan Neuschäfer Acked-by: Julia Lawall Link: https://lore.kernel.org/r/20230129151408.1525324-1-j.neuschaefer@gmx.net Signed-off-by: Jonathan Corbet commit 9625f579b7f2536c508a6e741606ca4102c64bc5 Author: Zang Leigang Date: Mon Jan 30 20:05:09 2023 +0800 docs/zh_CN: add damon lru_sort translation Translate .../admin-guide/mm/damon/lru_sort.rst into Chinese. Signed-off-by: Zang Leigang Reviewed-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20230130120509.12029-1-zangleigang@hisilicon.com Signed-off-by: Jonathan Corbet commit 45bf39f8df7f05efb83b302c65ae3b9bc92b7065 Author: Alan Stern Date: Tue Jan 31 15:49:04 2023 -0500 USB: core: Don't hold device lock while reading the "descriptors" sysfs file Ever since commit 83e83ecb79a8 ("usb: core: get config and string descriptors for unauthorized devices") was merged in 2013, there has been no mechanism for reallocating the rawdescriptors buffers in struct usb_device after the initial enumeration. Before that commit, the buffers would be deallocated when a device was deauthorized and reallocated when it was authorized and enumerated. This means that the locking in the read_descriptors() routine is not needed, since the buffers it reads will never be reallocated while the routine is running. This locking can interfere with user programs trying to read a hub's descriptors via sysfs while new child devices of the hub are being initialized, since the hub is locked during this procedure. Since the locking in read_descriptors() hasn't been needed for over nine years, we can remove it. Reported-and-tested-by: Troels Liebe Bentsen Signed-off-by: Alan Stern CC: stable@vger.kernel.org Link: https://lore.kernel.org/r/Y9l+wDTRbuZABzsE@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit 242b6f34b5b51ec151dc3abafd16edb1f685bb3c Author: Jiapeng Chong Date: Tue Jan 31 16:27:03 2023 +0800 arm64/sysreg: clean up some inconsistent indenting No functional modification involved. ./arch/arm64/kvm/sys_regs.c:80:2-9: code aligned with following code on line 82. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3897 Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20230131082703.118101-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Oliver Upton commit 75ab93a244a516d1d3c03c4e27d5d0deff76ebfb Merge: 285b6a18daf13 b6fcdb191e36f Author: Palmer Dabbelt Date: Tue Jan 31 11:43:27 2023 -0800 Merge patch series "Zbb string optimizations" Heiko Stuebner says: From: Heiko Stuebner This series still tries to allow optimized string functions for specific extensions. The last approach of using an inline base function to hold the alternative calls did cause some issues in a number of places So instead of that we're now just using an alternative j at the beginning of the generic function to jump to a separate place inside the function itself. * b4-shazam-merge: RISC-V: add zbb support to string functions RISC-V: add infrastructure to allow different str* implementations Link: https://lore.kernel.org/r/20230113212301.3534711-1-heiko@sntech.de Signed-off-by: Palmer Dabbelt commit b6fcdb191e36f82336f9b5e126d51c02e7323480 Author: Heiko Stuebner Date: Fri Jan 13 22:23:01 2023 +0100 RISC-V: add zbb support to string functions Add handling for ZBB extension and add support for using it as a variant for optimized string functions. Support for the Zbb-str-variants is limited to the GNU-assembler for now, as LLVM has not yet acquired the functionality to selectively change the arch option in assembler code. This is still under review at https://reviews.llvm.org/D123515 Co-developed-by: Christoph Muellner Signed-off-by: Christoph Muellner Signed-off-by: Heiko Stuebner Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230113212301.3534711-3-heiko@sntech.de Signed-off-by: Palmer Dabbelt commit 56e0790c7f9e59ba6a0f4b59981d1d6fbf43efb0 Author: Heiko Stuebner Date: Fri Jan 13 22:23:00 2023 +0100 RISC-V: add infrastructure to allow different str* implementations Depending on supported extensions on specific RISC-V cores, optimized str* functions might make sense. This adds basic infrastructure to allow patching the function calls via alternatives later on. The Linux kernel provides standard implementations for string functions but when architectures want to extend them, they need to provide their own. The added generic string functions are done in assembler (taken from disassembling the main-kernel functions for now) to allow us to control the used registers and extend them with optimized variants. This doesn't override the compiler's use of builtin replacements. So still first of all the compiler will select if a builtin will be better suitable i.e. for known strings. For all regular cases we will want to later select possible optimized variants and in the worst case fall back to the generic implemention added with this change. Reviewed-by: Andrew Jones Signed-off-by: Heiko Stuebner Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230113212301.3534711-2-heiko@sntech.de Signed-off-by: Palmer Dabbelt commit 7914695743d598b189d549f2f57af24aa5633705 Author: Alexey Kardashevskiy Date: Fri Jan 20 14:10:45 2023 +1100 x86/amd: Cache debug register values in percpu variables Reading DR[0-3]_ADDR_MASK MSRs takes about 250 cycles which is going to be noticeable with the AMD KVM SEV-ES DebugSwap feature enabled. KVM is going to store host's DR[0-3] and DR[0-3]_ADDR_MASK before switching to a guest; the hardware is going to swap these on VMRUN and VMEXIT. Store MSR values passed to set_dr_addr_mask() in percpu variables (when changed) and return them via new amd_get_dr_addr_mask(). The gain here is about 10x. As set_dr_addr_mask() uses the array too, change the @dr type to unsigned to avoid checking for <0. And give it the amd_ prefix to match the new helper as the whole DR_ADDR_MASK feature is AMD-specific anyway. While at it, replace deprecated boot_cpu_has() with cpu_feature_enabled() in set_dr_addr_mask(). Signed-off-by: Alexey Kardashevskiy Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230120031047.628097-2-aik@amd.com commit 44900af0401fd2a2f76f5e65d42a252665bb7bdb Author: Alex Deucher Date: Wed Jan 25 14:35:16 2023 -0500 drm/amd/display: Properly handle additional cases where DCN is not supported There could be boards with DCN listed in IP discovery, but no display hardware actually wired up. In this case the vbios display table will not be populated. Detect this case and skip loading DM when we detect it. v2: Mark DCN as harvested as well so other display checks elsewhere in the driver are handled properly. Cc: Aurabindo Pillai Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 2f68c414981a10af42a90522ef831d59c0923ce1 Author: Yiqing Yao Date: Tue Jan 31 16:02:47 2023 +0800 drm/amdgpu: Enable vclk dclk node for gc11.0.3 These sysfs nodes are tested supported, so enable them. Signed-off-by: Yiqing Yao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 4ce11e833319c2794905c51be7ab00b12f25b264 Author: Mario Limonciello Date: Mon Jan 30 10:16:06 2023 -0600 drm/amd: Fix initialization for nbio 4.3.0 A mistake has been made on some boards with NBIO 4.3.0 where some NBIO registers aren't properly set by the hardware. Ensure that they're set during initialization. Cc: Natikar Basavaraj Tested-by: Satyanarayana ReddyTVN Tested-by: Rutvij Gajjar Signed-off-by: Mario Limonciello Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 20e6220b4154a57a9d26873b137070cddd301b38 Author: Evan Quan Date: Sat Jan 28 14:24:34 2023 +0800 drm/amdgpu: enable HDP SD for gfx 11.0.3 Enable HDP clock gating control for gfx 11.0.3. Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 402ed4f1e23d63c9cd11789c500b86d35d4f5bc3 Author: Tim Huang Date: Sat Jan 21 10:35:04 2023 +0800 drm/amd/pm: drop unneeded dpm features disablement for SMU 13.0.4/11 PMFW will handle the features disablement properly for gpu reset case, driver involvement may cause some unexpected issues. Cc: stable@vger.kernel.org # 6.1 Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher commit 504f9ba8e02b2fb4496f6bccfa331b10fd34d14a Author: Aric Cyr Date: Sun Jan 22 16:42:45 2023 -0500 drm/amd/display: 3.2.221 This version brings along following fixes: - fix linux dp link lost handled only one time - Reset DMUB mailbox SW state after HW reset - Unassign does_plane_fit_in_mall function from dcn3.2 - Add Function delaration in dc_link - Fix crash when connecting 2 displays with video playback - Adjust downscaling limits for dcn314 - fix FCLK pstate change underflow - Fix only one ABM pipe enabled under ODM combined case - Add missing brackets in calculation - Correct bw_params population - Fix Z8 support configurations - Add Debug Log for MST and PCON - fix MALL size hardcoded for DCN321 - add rc_params_override option in dc_dsc_config - Enable Freesync over PCon Acked-by: Alex Hung Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e322843e5e33e72ff218d661f3d15ff9c9f2f1b5 Author: Hersen Wu Date: Tue Jan 17 10:58:34 2023 -0500 drm/amd/display: fix linux dp link lost handled only one time [Why] linux amdgpu defer handle link lost irq. dm add handle request to irq work queue for the first irq of link lost. if link training fails for link lost handle, link will not be enabled anymore. [How] allow adding handle request of link lost to work queue before running dp link training for link lost. Signed-off-by: Hersen Wu Acked-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4b0b4c17f5f6d4df40f2f79068909236858d61e0 Author: Nicholas Kazlauskas Date: Fri Jan 20 11:14:30 2023 -0500 drm/amd/display: Reset DMUB mailbox SW state after HW reset [Why] Otherwise we can be out of sync with what's in the hardware, leading to us rerunning every command that's presently in the ringbuffer. [How] Reset software state for the mailboxes in hw_reset callback. This is already done as part of the mailbox init in hw_init, but we do need to remember to reset the last cached wptr value as well here. Reviewed-by: Hansen Dsouza Acked-by: Alex Hung Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit cf76ce68c214b78bf151e84abaa0a2704fd38574 Author: George Shen Date: Thu Jan 19 17:09:54 2023 -0500 drm/amd/display: Unassign does_plane_fit_in_mall function from dcn3.2 [Why] The hwss function does_plane_fit_in_mall not applicable to dcn3.2 asics. Using it with dcn3.2 can result in undefined behaviour. [How] Assign the function pointer to NULL. Reviewed-by: Alvin Lee Acked-by: Alex Hung Signed-off-by: George Shen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0c2bfcc338ebd920cb0f4ddcfe6ad8f07e0064b0 Author: Mustapha Ghaddar Date: Wed Jan 18 11:46:37 2023 -0500 drm/amd/display: Add Function declaration in dc_link [WHY] Housekeeping cleaning and adding declaration for function to be called from DM layer [HOW] Adding public functions to dc_link.h Reviewed-by: Jun Lei Acked-by: Alex Hung Signed-off-by: Mustapha Ghaddar Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b07bb766b6d54fb280ff257e5a6d1c3b418832f9 Author: Aric Cyr Date: Thu Jan 19 09:31:28 2023 -0500 drm/amd/display: Revert "avoid disable otg when dig was disabled" This reverts commit 7cf5ceb30d4d527d763ae78c5405e3faca1fb8b1. Acked-by: Alex Hung Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ed9ca86b8c434f8f24355278f020a86bd445034f Author: Daniel Miess Date: Tue Jan 17 15:45:30 2023 -0500 drm/amd/display: Adjust downscaling limits for dcn314 [Why] Lower max_downscale_ratio and ARGB888 downscale factor to prevent cases where underflow may occur on dcn314 [How] Set max_downscale_ratio to 400 and ARGB downscale factor to 250 for dcn314 Reviewed-by: Nicholas Kazlauskas Acked-by: Alex Hung Signed-off-by: Daniel Miess Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 972243f973eb0821084e5833d5f7f4ed025f42da Author: Vladimir Stempen Date: Tue Jan 17 14:14:42 2023 -0500 drm/amd/display: fix FCLK pstate change underflow [Why] Currently we set FCLK p-state change watermark calculated based on dummy p-state latency when UCLK p-state is not supported [How] Calculate FCLK p-state change watermark based on on FCLK pstate change latency in case UCLK p-state is not supported Reviewed-by: Nevenko Stupar Acked-by: Alex Hung Signed-off-by: Vladimir Stempen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 32e3da4310bb1c55b076ed477dea6ddf5a965e69 Author: Leon Huang Date: Tue Jan 17 14:17:40 2023 +0800 drm/amd/display: Fix only one ABM pipe enabled under ODM combined case [Why] ABM set pipe before updating ODM status, it leads to incorrect ABM pipe setting when enabling ODM combine. [How] Call ABM set pipe flow after ODM status update in program pipe sequence. Reviewed-by: Chun-Liang Chang Reviewed-by: Nicholas Kazlauskas Acked-by: Alex Hung Signed-off-by: Leon Huang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 1715339b45c46f4b588d940f50cc91ef0f10d4a1 Author: Daniel Miess Date: Tue Jan 17 15:34:35 2023 -0500 drm/amd/display: Add missing brackets in calculation [Why] Brackets missing in the calculation for MIN_DST_Y_NEXT_START [How] Add missing brackets for this calculation Reviewed-by: Nicholas Kazlauskas Acked-by: Alex Hung Signed-off-by: Daniel Miess Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f5df7725e38853b5b07b7ab41017916f1e5b4e57 Author: Daniel Miess Date: Tue Jan 17 15:23:06 2023 -0500 drm/amd/display: Correct bw_params population [Why] Underflow observed during P010 video playback on dcn314 due to incorrectly populated bw_params [How] Populate fclk, memclk and voltage in bw_params with values from max pstate rather than min pstate Reviewed-by: Nicholas Kazlauskas Acked-by: Alex Hung Signed-off-by: Daniel Miess Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 73dd4ca4b5a01235607231839bd351bbef75a1d2 Author: Nicholas Kazlauskas Date: Mon Jan 16 09:49:32 2023 -0500 drm/amd/display: Fix Z8 support configurations [Why] It's not supported in multi-display, but it is supported in 2nd eDP screen only. [How] Remove multi display support, restrict number of planes for all z-states support, but still allow Z8 if we're not using PWRSEQ0. Reviewed-by: Charlene Liu Acked-by: Alex Hung Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e3834491b92a10d97f0cc0029e276d1938469bfe Author: Fangzhi Zuo Date: Mon Jan 16 16:29:26 2023 -0500 drm/amd/display: Add Debug Log for MST and PCON Add log for MST/PCON specific use case: 1. If DP1.2 hub where gives reduced link bw and no dsc support. 2. If less than 4-lane configuration where gives reduced bw. 3. If FRL PCON enabled for asic. 4. Track MST sink count. Reviewed-by: Hersen Wu Acked-by: Alex Hung Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 918d5166439078364453f2eb5b4d8e75095a510e Author: Samson Tam Date: Tue Jan 17 03:47:13 2023 -0500 drm/amd/display: fix MALL size hardcoded for DCN321 [Why] MALL size available can vary for different SKUs MALL size was still hardcoded for DCN321 [How] Remove hardcoding MALL size for DCN321 Reviewed-by: Alvin Lee Acked-by: Alex Hung Signed-off-by: Samson Tam Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0a31efb4d606884d1ed17d5df64e9d02f50a0713 Author: Wenjing Liu Date: Fri Jan 13 16:07:10 2023 -0500 drm/amd/display: add rc_params_override option in dc_dsc_config [why] Current RC params are based on VESA recommended configurations. Some DSC sink may prefer non standard rc params values due to hardware limitations. To support those DSC sink we will allow DM to optionally pass rc_params_ovrd in dc_dsc_config so DC will override the default VESA recommended configurations. Reviewed-by: Martin Leung Acked-by: Alex Hung Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5b49da02ddbe1b9082cfc9be1cd848375da178ea Author: Sung Joon Kim Date: Thu Jan 12 10:38:10 2023 -0500 drm/amd/display: Enable Freesync over PCon [why] Enable Freesync over PCon on Linux environment. [how] Adding Freesync over PCon support in amdgpu_dm - Read DPCD for Freesync over PCon capabilitiy - Add whitelist for compatible branch devices Reviewed-by: Chao-kai Wang Acked-by: Alex Hung Signed-off-by: Sung Joon Kim Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 634d0aa54e3eb507744a6350705fe454c7cf78b9 Author: Graham Sider Date: Mon Jan 16 10:43:11 2023 -0500 drm/amdgpu: update wave data type to 3 for gfx11 SQ_WAVE_INST_DW0 isn't present on gfx11 compared to gfx10, so update wave data type to signify a difference. Signed-off-by: Graham Sider Reviewed-by: Mukul Joshi Signed-off-by: Alex Deucher commit cf488dcd0ab75d01bb09edd529aa6381c5ebec68 Author: Mario Limonciello Date: Wed Jan 25 12:22:40 2023 -0600 drm/amd: Allow s0ix without BIOS support We guard the suspend entry code from running unless we have proper BIOS support for either S3 mode or s0ix mode. If a user's system doesn't support either of these modes the kernel still does offer s2idle in `/sys/power/mem_sleep` so there is an expectation from users that it works even if the power consumption remains very high. Rafael Ávila de Espíndola reports that a system of his has a non-functional graphics stack after resuming. That system doesn't support S3 and the FADT doesn't indicate support for low power idle. Through some experimentation it was concluded that even without the hardware s0i3 support provided by the amd_pmc driver the power consumption over suspend is decreased by running amdgpu's s0ix suspend routine. The numbers over suspend showed: * No patch: 9.2W * Skip amdgpu suspend entirely: 10.5W * Run amdgpu s0ix routine: 7.7W As this does improve the power, remove some of the guard rails in `amdgpu_acpi.c` for only running s0ix suspend routines in the right circumstances. However if this turns out to cause regressions for anyone, we should revert this change and instead opt for skipping suspend/resume routines entirely or try to fix the underlying behavior that makes graphics fail after resume without underlying platform support. Reported-by: Rafael Ávila de Espíndola Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2364 Acked-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 39934d3ed5725c5e3570ed1b67f612f1ea60ce03 Author: Vitaly Prosyak Date: Fri Jan 20 13:19:50 2023 -0500 Revert "drm/amdgpu: TA unload messages are not actually sent to psp when amdgpu is uninstalled" This reverts commit fac53471d0ea9693d314aa2df08d62b2e7e3a0f8. The following change: move the drm_dev_unplug call after amdgpu_driver_unload_kms in amdgpu_pci_remove. The reason is the following: amdgpu_pci_remove calls drm_dev_unregister and it should be called first to ensure userspace can't access the device instance anymore. If we call drm_dev_unplug after amdgpu_driver_unload_kms then we observe IGT PCI software unplug test failure (kernel hung) for all ASICs. This is how this regression was found. After this revert, the following commands do work not, but it would be fixed in the next commit: - sudo modprobe -r amdgpu - sudo modprobe amdgpu Signed-off-by: Vitaly Prosyak Reviewed-by Alex Deucher Signed-off-by: Alex Deucher commit 2163a691c5f3d30326ff09193c97aec47cec9eba Author: Christoph Hellwig Date: Thu Jan 19 07:36:18 2023 +0100 f2fs: remove __add_sum_entry This function just assigns a summary entry. This can be done entirely typesafe with an open code struct assignment that relies on array indexing. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit ae267fc1cfe9f941afcb90dc963ee6448dae73cf Author: Chao Yu Date: Mon Jan 9 11:44:51 2023 +0800 f2fs: fix to abort atomic write only during do_exist() Commit 7a10f0177e11 ("f2fs: don't give partially written atomic data from process crash") attempted to drop atomic write data after process crash, however, f2fs_abort_atomic_write() may be called from noncrash case, fix it by adding missed PF_EXITING check condition f2fs_file_flush(). - application crashs - do_exit - exit_signals -- sets PF_EXITING - exit_files - put_files_struct - close_files - filp_close - flush (f2fs_file_flush) - check atomic_write_task && PF_EXITING - f2fs_abort_atomic_write Fixes: 7a10f0177e11 ("f2fs: don't give partially written atomic data from process crash") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit e6261beb0c629403dc58997294dd521bd23664af Author: Yangtao Li Date: Mon Jan 23 17:46:01 2023 +0800 f2fs: allow set compression option of files without blocks Files created by truncate have a size but no blocks, so they can be allowed to set compression option. Fixes: e1e8debec656 ("f2fs: add F2FS_IOC_SET_COMPRESS_OPTION ioctl") Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 9a5571cff4ffcfc24847df9fd545cc5799ac0ee5 Author: Eric Biggers Date: Sun Jan 22 23:04:14 2023 -0800 f2fs: fix information leak in f2fs_move_inline_dirents() When converting an inline directory to a regular one, f2fs is leaking uninitialized memory to disk because it doesn't initialize the entire directory block. Fix this by zero-initializing the block. This bug was introduced by commit 4ec17d688d74 ("f2fs: avoid unneeded initializing when converting inline dentry"), which didn't consider the security implications of leaking uninitialized memory to disk. This was found by running xfstest generic/435 on a KMSAN-enabled kernel. Fixes: 4ec17d688d74 ("f2fs: avoid unneeded initializing when converting inline dentry") Cc: # v4.3+ Signed-off-by: Eric Biggers Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b1b9896718bc1a212dc288ad66a5fa2fef11353d Author: Alexander Potapenko Date: Mon Nov 21 12:21:32 2022 +0100 fs: f2fs: initialize fsdata in pagecache_write() When aops->write_begin() does not initialize fsdata, KMSAN may report an error passing the latter to aops->write_end(). Fix this by unconditionally initializing fsdata. Suggested-by: Eric Biggers Fixes: 95ae251fe828 ("f2fs: add fs-verity support") Signed-off-by: Alexander Potapenko Reviewed-by: Eric Biggers Signed-off-by: Jaegeuk Kim commit 9b13a8662ea61430005d3de3fc1d73e383b1ce5a Author: Yangtao Li Date: Tue Jan 17 21:24:42 2023 +0800 f2fs: fix to check warm_data_age_threshold hot_data_age_threshold is a non-zero positive number, and condition 2 includes condition 1, so there is no need to additionally judge whether t is 0. And let's remove it. Signed-off-by: Yangtao Li Signed-off-by: Jaegeuk Kim commit b1c5ef26e4e80277641afcfedffe598c3023c095 Author: Yangtao Li Date: Fri Jan 13 03:14:04 2023 +0800 f2fs: return true if all cmd were issued or no cmd need to be issued for f2fs_issue_discard_timeout() f2fs_issue_discard_timeout() returns whether discard cmds are dropped, which does not match the meaning of the function. Let's change it to return whether all discard cmd are issued. After commit 4d67490498ac ("f2fs: Don't create discard thread when device doesn't support realtime discard"), f2fs_issue_discard_timeout() is alse called by f2fs_remount(). Since the comments of f2fs_issue_discard_timeout() doesn't make much sense, let's update it. Signed-off-by: Yangtao Li Signed-off-by: Jaegeuk Kim commit c1085957dece02bda586cbffc1328f3bca09325f Author: Yangtao Li Date: Thu Jan 12 21:34:43 2023 +0800 f2fs: clarify compress level bit offset commit 3fde13f817e2 ("f2fs: compress: support compress level") introduce compress level, which macro(COMPRESS_LEVEL_OFFSET) is 8, But use wrong comment about compress level. Let's fix it. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 2381a68556c0d2cb027f9dbfabc654a899782c62 Author: Yangtao Li Date: Mon Jan 16 22:12:28 2023 +0800 f2fs: fix to show discard_unit mount opt Convert to show discard_unit only when has DISCARD opt. Signed-off-by: Yangtao Li Signed-off-by: Jaegeuk Kim commit d48a7b3a72f121655d95b5157c32c7d555e44c05 Author: Chao Yu Date: Mon Jan 9 11:49:20 2023 +0800 f2fs: fix to do sanity check on extent cache correctly In do_read_inode(), sanity_check_inode() should be called after f2fs_init_read_extent_tree(), fix it. Fixes: 72840cccc0a1 ("f2fs: allocate the extent_cache by default") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 71a298ca208e48bd69e1bf61a22a762624885093 Author: Chao Yu Date: Mon Jan 9 11:47:34 2023 +0800 f2fs: remove unneeded f2fs_cp_error() in f2fs_create_whiteout() f2fs_rename() has checked CP_ERROR_FLAG, so remove redundant check in f2fs_create_whiteout(). Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f54c013e7eef2962e610c9223e13659e65dfb550 Author: Prashant Malani Date: Thu Jan 26 20:55:46 2023 +0000 platform/chrome: cros_typec_vdm: Add Attention support Add support to retrieve VDM attention messages and forward them to the appropriate alt mode driver. Signed-off-by: Prashant Malani Reviewed-by: Benson Leung Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230126205620.3714994-2-pmalani@chromium.org commit 4b1936cd081496865151eaab539f767240952306 Author: Prashant Malani Date: Thu Jan 26 20:55:45 2023 +0000 platform/chrome: cros_ec: Add VDM attention headers Incorporate updates to the EC headers to support the retrieval of VDM Attention messages from port partners. These headers are already present in the ChromeOS EC codebase. [1] [1] https://source.chromium.org/chromium/chromiumos/platform/ec/+/main:include/ec_commands.h Signed-off-by: Prashant Malani [pmalani: Removed extra tab in header #define] Reviewed-by: Benson Leung Reviewed-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20230126205620.3714994-1-pmalani@chromium.org commit 4958db3245fa655bf18251bd2a83bcc164071c39 Author: Roberto Sassu Date: Tue Jan 31 18:42:44 2023 +0100 ima: Introduce MMAP_CHECK_REQPROT hook Commit 98de59bfe4b2f ("take calculation of final prot in security_mmap_file() into a helper") caused ima_file_mmap() to receive the protections requested by the application and not those applied by the kernel. After restoring the original MMAP_CHECK behavior, existing attestation servers might be broken due to not being ready to handle new entries (previously missing) in the IMA measurement list. Restore the original correct MMAP_CHECK behavior, instead of keeping the current buggy one and introducing a new hook with the correct behavior. Otherwise, there would have been the risk of IMA users not noticing the problem at all, as they would actively have to update the IMA policy, to switch to the correct behavior. Also, introduce the new MMAP_CHECK_REQPROT hook to keep the current behavior, so that IMA users could easily fix a broken attestation server, although this approach is discouraged due to potentially missing measurements. Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar commit 4971c268b85e1c7a734a61622fc0813c86e2362e Author: Roberto Sassu Date: Tue Jan 31 18:42:43 2023 +0100 ima: Align ima_file_mmap() parameters with mmap_file LSM hook Commit 98de59bfe4b2f ("take calculation of final prot in security_mmap_file() into a helper") moved the code to update prot, to be the actual protections applied to the kernel, to a new helper called mmap_prot(). However, while without the helper ima_file_mmap() was getting the updated prot, with the helper ima_file_mmap() gets the original prot, which contains the protections requested by the application. A possible consequence of this change is that, if an application calls mmap() with only PROT_READ, and the kernel applies PROT_EXEC in addition, that application would have access to executable memory without having this event recorded in the IMA measurement list. This situation would occur for example if the application, before mmap(), calls the personality() system call with READ_IMPLIES_EXEC as the first argument. Align ima_file_mmap() parameters with those of the mmap_file LSM hook, so that IMA can receive both the requested prot and the final prot. Since the requested protections are stored in a new variable, and the final protections are stored in the existing variable, this effectively restores the original behavior of the MMAP_CHECK hook. Cc: stable@vger.kernel.org Fixes: 98de59bfe4b2 ("take calculation of final prot in security_mmap_file() into a helper") Signed-off-by: Roberto Sassu Reviewed-by: Stefan Berger Signed-off-by: Mimi Zohar commit cbc29f107e51b1cc7d1e7b0bbe0691a1224205f1 Author: Alexander Gordeev Date: Wed Jan 25 19:16:10 2023 +0100 s390/mem_detect: do not update output parameters on failure Function __get_mem_detect_block() resets start and end output parameters in case of invalid mem_detect array index is provided. That violates the rule of sparing the output on fail path and leads e.g to a below anomaly: for_each_mem_detect_block(i, &start, &end) continue; One would expect start and end contain addresses of the last memory block (if available), but in fact the two will be reset to zeroes. That is not how an iterator is expected to work. Reviewed-by: Vasily Gorbik Signed-off-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit 0c6924c262e819c4997b9cae0df6bd6e7b0b8754 Author: Vineeth Vijayan Date: Fri Nov 11 13:46:33 2022 +0100 s390/cio: introduce locking for register/unregister functions Unbinding an I/O subchannel with a child-CCW device in disconnected state sometimes causes a kernel-panic. The race condition was seen mostly during testing, when setting all the CHPIDs of a device to offline and at the same time, the unbinding the I/O subchannel driver. The kernel-panic occurs because of double delete, the I/O subchannel driver calls device_del on the CCW device while another device_del invocation for the same device is in-flight. For instance, disabling all the CHPIDs will trigger the ccw_device_remove function, which will call a ccw_device_unregister(), which ends up calling the device_del() which is asynchronous via cdev's todo workqueue. And unbinding the I/O subchannel driver calls io_subchannel_remove() function which calls the ccw_device_unregister() and device_del(). This double delete can be prevented by serializing all CCW device registration/unregistration calls into the driver core. This patch introduces a mutex which will be used for this purpose. Signed-off-by: Vineeth Vijayan Reported-by: Boris Fiuczynski Reviewed-by: Peter Oberparleiter Signed-off-by: Heiko Carstens commit 05178996e1a77e2a4664536e6d101a086a905034 Author: Vasily Gorbik Date: Tue Jan 24 18:08:38 2023 +0100 s390/mm,ptdump: avoid Kasan vs Memcpy Real markers swapping ---[ Real Memory Copy Area Start ]--- 0x001bfffffffff000-0x001c000000000000 4K PTE I ---[ Kasan Shadow Start ]--- ---[ Real Memory Copy Area End ]--- 0x001c000000000000-0x001c000200000000 8G PMD RW NX ... ---[ Kasan Shadow End ]--- ptdump does a stable sort of markers. Move kasan markers after memcpy real to avoid swapping. Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 39da9a979c4f5b07862289146b9db38209b92634 Author: Vasily Gorbik Date: Tue Jan 24 17:03:24 2023 +0100 s390/boot: remove pgtable_populate_end setup_vmem() already calls populate for all online memory regions. pgtable_populate_end() could be removed. Also rename pgtable_populate_begin() to pgtable_populate_init(). Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit e966ccf836e8964edf984adc4b4af5f3a3e07de6 Author: Vasily Gorbik Date: Mon Jan 23 15:24:17 2023 +0100 s390/boot: avoid mapping standby memory Commit bb1520d581a3 ("s390/mm: start kernel with DAT enabled") doesn't consider online memory holes due to potential memory offlining and erroneously creates pgtables for stand-by memory, which bear RW+X attribute and trigger a warning: RANGE SIZE STATE REMOVABLE BLOCK 0x0000000000000000-0x0000000c3fffffff 49G online yes 0-48 0x0000000c40000000-0x0000000c7fffffff 1G offline 49 0x0000000c80000000-0x0000000fffffffff 14G online yes 50-63 0x0000001000000000-0x00000013ffffffff 16G offline 64-79 s390/mm: Found insecure W+X mapping at address 0xc40000000 WARNING: CPU: 14 PID: 1 at arch/s390/mm/dump_pagetables.c:142 note_page+0x2cc/0x2d8 Map only online memory ranges which fit within identity mapping limit. Fixes: bb1520d581a3 ("s390/mm: start kernel with DAT enabled") Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 8250865c164e3ddb930953523c93b3c821bdd322 Author: Xiu Jianfeng Date: Tue Jan 31 10:00:31 2023 +0800 evm: call dump_security_xattr() in all cases to remove code duplication Currently dump_security_xattr() is used to dump security xattr value which is larger than 64 bytes, otherwise, pr_debug() is used. In order to remove code duplication, refactor dump_security_xattr() and call it in all cases. Signed-off-by: Xiu Jianfeng Signed-off-by: Mimi Zohar commit 98fda42a85b4324b6c404ec163940371c63625df Merge: 6570befb4fccc 16838bfbf6e70 Author: Mark Brown Date: Tue Jan 31 17:07:56 2023 +0000 ASoC: cs42l42: Add SoundWire support Merge series from Stefan Binding : The CS42L42 has a SoundWire interface for control and audio. This chain of patches adds support for this. Patches #1 .. #5 split out various changes to the existing code that are needed for adding Soundwire. These are mostly around clocking and supporting the separate probe and enumeration stages in SoundWire. Patches #6 .. #8 actually adds the SoundWire handling. commit 6570befb4fccce7ba49e5c74adbdae9bba5d9824 Merge: 01b17067f4f31 3653480c68120 Author: Mark Brown Date: Tue Jan 31 17:07:49 2023 +0000 ASoC: use helper function and cleanup Merge series from Kuninori Morimoto : struct snd_soc_dai need to have info for playback/capture, but it is using "playback/capture_xxx" or "tx/tx_xxx" or array. This kind of random definition is very difficult to read. This patch-set add helper functions and each driver use it. And cleanup the definition. commit 550130a0ce303f7cd754c7067b0a971ca179db63 Author: David Howells Date: Wed Nov 16 16:42:02 2022 +0000 rxrpc: Kill service bundle Now that the bundle->channel_lock has been eliminated, we don't need the dummy service bundle anymore. It's purpose was purely to provide the channel_lock for service connections. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit 83836eb4df75d9d0bfb1a5c508130658b8d13244 Author: David Howells Date: Mon Dec 5 17:38:31 2022 +0000 rxrpc: Change rx_packet tracepoint to display securityIndex not type twice Change the rx_packet tracepoint to display the securityIndex from the packet header instead of displaying the type in numeric form. There's no need for the latter, as the display of the type in symbolic form will fall back automatically to displaying the hex value if no symbol is available. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit f20fe3ff82b321287ba59cab12e4f34eec9a7e10 Author: David Howells Date: Fri Nov 11 22:01:04 2022 +0000 rxrpc: Show consumed and freed packets as non-dropped in dropwatch Set a reason when freeing a packet that has been consumed such that dropwatch doesn't complain that it has been dropped. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit e7f40f4a701b67ada4a843bcc253711d8a34b1f1 Author: David Howells Date: Mon Oct 17 22:52:06 2022 +0100 rxrpc: Remove local->defrag_sem We no longer need local->defrag_sem as all DATA packet transmission is now done from one thread, so remove it. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit b30d61f4b12899101f754238f02069ff4d6161c2 Author: David Howells Date: Mon Oct 17 22:48:58 2022 +0100 rxrpc: Don't lock call->tx_lock to access call->tx_buffer call->tx_buffer is now only accessed within the I/O thread (->tx_sendmsg is the way sendmsg passes packets to the I/O thread) so there's no need to lock around it. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit f21e93485bcbfa2753d1447b6198604a2c3d57be Author: David Howells Date: Sun Oct 16 08:01:32 2022 +0100 rxrpc: Simplify ACK handling Now that general ACK transmission is done from the same thread as incoming DATA packet wrangling, there's no possibility that the SACK table will be being updated by the latter whilst the former is trying to copy it to an ACK. This means that we can safely rotate the SACK table whilst updating it without having to take a lock, rather than keeping all the bits inside it in fixed place and copying and then rotating it in the transmitter. Therefore, simplify SACK handing by keeping track of starting point in the ring and rotate slots down as we consume them. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit 5bbf953382bec6d3b7003e9389668c1d0863db31 Author: David Howells Date: Mon Oct 17 11:44:22 2022 +0100 rxrpc: De-atomic call->ackr_window and call->ackr_nr_unacked call->ackr_window doesn't need to be atomic as ACK generation and ACK transmission are now done in the same thread, so drop the atomic64 handling and split it into two separate members. Similarly, call->ackr_nr_unacked doesn't need to be atomic now either. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit 84e28aa513af814807a5e9a0e5f3cab773946f3c Author: David Howells Date: Mon Oct 17 10:55:41 2022 +0100 rxrpc: Generate extra pings for RTT during heavy-receive call When doing a call that has a single transmitted data packet and a massive amount of received data packets, we only ping for one RTT sample, which means we don't get a good reading on it. Fix this by converting occasional IDLE ACKs into PING ACKs to elicit a response. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit af094824f20b454ee23b7b5a860b3ba58f4e6938 Author: David Howells Date: Mon Oct 17 08:54:57 2022 +0100 rxrpc: Allow a delay to be injected into packet reception If CONFIG_AF_RXRPC_DEBUG_RX_DELAY=y, then a delay is injected between packets and errors being received and them being made available to the processing code, thereby allowing the RTT to be artificially increased. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit 223f59016fa2b6d01814dc53ace1c146857ba236 Author: David Howells Date: Wed Oct 12 22:06:52 2022 +0100 rxrpc: Convert call->recvmsg_lock to a spinlock Convert call->recvmsg_lock to a spinlock as it's only ever write-locked. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit 828bebc80a031b9c07c0d5f2465910b6350cd616 Author: David Howells Date: Tue Jan 31 08:39:46 2023 +0000 rxrpc: Shrink the tabulation in the rxrpc trace header a bit Shrink the tabulation in the rxrpc trace header a bit to allow for fields with long type names that have been removed. Signed-off-by: David Howells commit 371e68ba0306f6279b03990c2e721e7634f0fe33 Author: David Howells Date: Tue Jan 31 08:35:16 2023 +0000 rxrpc: Remove whitespace before ')' in trace header Work around checkpatch warnings in the rxrpc trace header by removing whitespace before ')' on lines defining the trace record struct. Signed-off-by: David Howells commit 2d97930d74b12467fd5f48d8560e48c1cf5edcb1 Author: Matthew Wilcox Date: Tue Jan 31 05:01:32 2023 +0000 block: Remove mm.h from bvec.h This was originally added for the definition of nth_page(), but we no longer use nth_page() in this header, so we can drop the heavyweight mm.h now. Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20230131050132.2627124-1-willy@infradead.org Signed-off-by: Jens Axboe commit a5f61cc636f48bdf09450dba72c0bc914f9eed2f Author: Mark Rutland Date: Mon Jan 30 14:54:29 2023 +0000 arm64: irqflags: use alternative branches for pseudo-NMI logic Due to the way we use alternatives in the irqflags code, even when CONFIG_ARM64_PSEUDO_NMI=n, we generate unused alternative code for pseudo-NMI management. This patch reworks the irqflags code to remove the redundant code when CONFIG_ARM64_PSEUDO_NMI=n, which benefits the more common case, and will permit further rework of our DAIF management (e.g. in preparation for ARMv8.8-A's NMI feature). Prior to this patch a defconfig kernel has hundreds of redundant instructions to access ICC_PMR_EL1 (which should only need to be manipulated in setup code), which this patch removes: | [mark@lakrids:~/src/linux]% usekorg 12.1.0 aarch64-linux-objdump -d vmlinux-before-defconfig | grep icc_pmr_el1 | wc -l | 885 | [mark@lakrids:~/src/linux]% usekorg 12.1.0 aarch64-linux-objdump -d vmlinux-after-defconfig | grep icc_pmr_el1 | wc -l | 5 Those instructions alone account for more than 3KiB of kernel text, and will be associated with additional alt_instr entries, padding and branches, etc. These redundant instructions exist because we use alternative sequences for to choose between DAIF / PMR management in irqflags.h, and even when CONFIG_ARM64_PSEUDO_NMI=n, those alternative sequences will generate the code for PMR management, along with alt_instr entries. We use alternatives here as this was necessary to ensure that we never encounter a mismatched local_irq_save() ... local_irq_restore() sequence in the middle of patching, which was possible to see if we used static keys to choose between DAIF and PMR management. Since commit: 21fb26bfb01ffe0d ("arm64: alternatives: add alternative_has_feature_*()") ... we have a mechanism to use alternatives similarly to static keys, allowing us to write the bulk of the logic in C code while also being able to rely on all sites being patched in one go, and avoiding a mismatched mismatched local_irq_save() ... local_irq_restore() sequence during patching. This patch rewrites arm64's local_irq_*() functions to use alternative branches. This allows for the pseudo-NMI code to be entirely elided when CONFIG_ARM64_PSEUDO_NMI=n, making a defconfig Image 64KiB smaller, and not affectint the size of an Image with CONFIG_ARM64_PSEUDO_NMI=y: | [mark@lakrids:~/src/linux]% ls -al vmlinux-* | -rwxr-xr-x 1 mark mark 137473432 Jan 18 11:11 vmlinux-after-defconfig | -rwxr-xr-x 1 mark mark 137918776 Jan 18 11:15 vmlinux-after-pnmi | -rwxr-xr-x 1 mark mark 137380152 Jan 18 11:03 vmlinux-before-defconfig | -rwxr-xr-x 1 mark mark 137523704 Jan 18 11:08 vmlinux-before-pnmi | [mark@lakrids:~/src/linux]% ls -al Image-* | -rw-r--r-- 1 mark mark 38646272 Jan 18 11:11 Image-after-defconfig | -rw-r--r-- 1 mark mark 38777344 Jan 18 11:14 Image-after-pnmi | -rw-r--r-- 1 mark mark 38711808 Jan 18 11:03 Image-before-defconfig | -rw-r--r-- 1 mark mark 38777344 Jan 18 11:08 Image-before-pnmi Some sensitive code depends on being run with interrupts enabled or with interrupts disabled, and so when enabling or disabling interrupts we must ensure that the compiler does not move such code around the actual enable/disable. Before this patch, that was ensured by the combined asm volatile blocks having memory clobbers (and any sensitive code either being asm volatile, or touching memory). This patch consistently uses explicit barrier() operations before and after the enable/disable, which allows us to use the usual sysreg accessors (which are asm volatile) to manipulate the interrupt masks. The use of pmr_sync() is pulled within this critical section for consistency. Signed-off-by: Mark Rutland Reviewed-by: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20230130145429.903791-6-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 8bf0a8048b155eebc05aa8896f4c378a4c538214 Author: Mark Rutland Date: Mon Jan 30 14:54:28 2023 +0000 arm64: add ARM64_HAS_GIC_PRIO_RELAXED_SYNC cpucap When Priority Mask Hint Enable (PMHE) == 0b1, the GIC may use the PMR value to determine whether to signal an IRQ to a PE, and consequently after a change to the PMR value, a DSB SY may be required to ensure that interrupts are signalled to a CPU in finite time. When PMHE == 0b0, interrupts are always signalled to the relevant PE, and all masking occurs locally, without requiring a DSB SY. Since commit: f226650494c6aa87 ("arm64: Relax ICC_PMR_EL1 accesses when ICC_CTLR_EL1.PMHE is clear") ... we handle this dynamically: in most cases a static key is used to determine whether to issue a DSB SY, but the entry code must read from ICC_CTLR_EL1 as static keys aren't accessible from plain assembly. It would be much nicer to use an alternative instruction sequence for the DSB, as this would avoid the need to read from ICC_CTLR_EL1 in the entry code, and for most other code this will result in simpler code generation with fewer instructions and fewer branches. This patch adds a new ARM64_HAS_GIC_PRIO_RELAXED_SYNC cpucap which is only set when ICC_CTLR_EL1.PMHE == 0b0 (and GIC priority masking is in use). This allows us to replace the existing users of the `gic_pmr_sync` static key with alternative sequences which default to a DSB SY and are relaxed to a NOP when PMHE is not in use. The entry assembly management of the PMR is slightly restructured to use a branch (rather than multiple NOPs) when priority masking is not in use. This is more in keeping with other alternatives in the entry assembly, and permits the use of a separate alternatives for the PMHE-dependent DSB SY (and removal of the conditional branch this currently requires). For consistency I've adjusted both the save and restore paths. According to bloat-o-meter, when building defconfig + CONFIG_ARM64_PSEUDO_NMI=y this shrinks the kernel text by ~4KiB: | add/remove: 4/2 grow/shrink: 42/310 up/down: 332/-5032 (-4700) The resulting vmlinux is ~66KiB smaller, though the resulting Image size is unchanged due to padding and alignment: | [mark@lakrids:~/src/linux]% ls -al vmlinux-* | -rwxr-xr-x 1 mark mark 137508344 Jan 17 14:11 vmlinux-after | -rwxr-xr-x 1 mark mark 137575440 Jan 17 13:49 vmlinux-before | [mark@lakrids:~/src/linux]% ls -al Image-* | -rw-r--r-- 1 mark mark 38777344 Jan 17 14:11 Image-after | -rw-r--r-- 1 mark mark 38777344 Jan 17 13:49 Image-before Prior to this patch we did not verify the state of ICC_CTLR_EL1.PMHE on secondary CPUs. As of this patch this is verified by the cpufeature code when using GIC priority masking (i.e. when using pseudo-NMIs). Note that since commit: 7e3a57fa6ca831fa ("arm64: Document ICC_CTLR_EL3.PMHE setting requirements") ... Documentation/arm64/booting.rst specifies: | - ICC_CTLR_EL3.PMHE (bit 6) must be set to the same value across | all CPUs the kernel is executing on, and must stay constant | for the lifetime of the kernel. ... so that should not adversely affect any compliant systems, and as we'll only check for the absense of PMHE when using pseudo-NMIs, this will only fire when such mismatch will adversely affect the system. Signed-off-by: Mark Rutland Reviewed-by: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20230130145429.903791-5-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 4b43f1cd70df69c99aeee9758c16f4de913c7bad Author: Mark Rutland Date: Mon Jan 30 14:54:27 2023 +0000 arm64: make ARM64_HAS_GIC_PRIO_MASKING depend on ARM64_HAS_GIC_CPUIF_SYSREGS Currently the arm64_cpu_capabilities structure for ARM64_HAS_GIC_PRIO_MASKING open-codes the same CPU field definitions as the arm64_cpu_capabilities structure for ARM64_HAS_GIC_CPUIF_SYSREGS, so that can_use_gic_priorities() can use has_useable_gicv3_cpuif(). This duplication isn't ideal for the legibility of the code, and sets a bad example for any ARM64_HAS_GIC_* definitions added by subsequent patches. Instead, have ARM64_HAS_GIC_PRIO_MASKING check for the ARM64_HAS_GIC_CPUIF_SYSREGS cpucap, and add a comment explaining why this is safe. Subsequent patches will use the same pattern where one cpucap depends upon another. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Reviewed-by: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20230130145429.903791-4-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit c888b7bd916c4d85e06a6c3e507d5d68b229518f Author: Mark Rutland Date: Mon Jan 30 14:54:26 2023 +0000 arm64: rename ARM64_HAS_IRQ_PRIO_MASKING to ARM64_HAS_GIC_PRIO_MASKING Subsequent patches will add more GIC-related cpucaps. When we do so, it would be nice to give them a consistent HAS_GIC_* prefix. In preparation for doing so, this patch renames the existing ARM64_HAS_IRQ_PRIO_MASKING cap to ARM64_HAS_GIC_PRIO_MASKING. The cpucaps file was hand-modified; all other changes were scripted with: find . -type f -name '*.[chS]' -print0 | \ xargs -0 sed -i 's/ARM64_HAS_IRQ_PRIO_MASKING/ARM64_HAS_GIC_PRIO_MASKING/' There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Reviewed-by: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20230130145429.903791-3-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 0e62ccb9598dae492588bef0453a059bb2bbbabe Author: Mark Rutland Date: Mon Jan 30 14:54:25 2023 +0000 arm64: rename ARM64_HAS_SYSREG_GIC_CPUIF to ARM64_HAS_GIC_CPUIF_SYSREGS Subsequent patches will add more GIC-related cpucaps. When we do so, it would be nice to give them a consistent HAS_GIC_* prefix. In preparation for doing so, this patch renames the existing ARM64_HAS_SYSREG_GIC_CPUIF cap to ARM64_HAS_GIC_CPUIF_SYSREGS. The 'CPUIF_SYSREGS' suffix is chosen so that this will be ordered ahead of other ARM64_HAS_GIC_* definitions in subsequent patches. The cpucaps file was hand-modified; all other changes were scripted with: find . -type f -name '*.[chS]' -print0 | \ xargs -0 sed -i 's/ARM64_HAS_SYSREG_GIC_CPUIF/ARM64_HAS_GIC_CPUIF_SYSREGS/' There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Reviewed-by: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20230130145429.903791-2-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit c68cf5285e1896a2b725ec01a1351f08610165b8 Author: Mark Rutland Date: Tue Jan 31 10:58:09 2023 +0000 arm64: pauth: don't sign leaf functions Currently, when CONFIG_ARM64_PTR_AUTH_KERNEL=y (and CONFIG_UNWIND_PATCH_PAC_INTO_SCS=n), we enable pointer authentication for all functions, including leaf functions. This isn't necessary, and is unfortunate for a few reasons: * Any PACIASP instruction is implicitly a `BTI C` landing pad, and forcing the addition of a PACIASP in every function introduces a larger set of BTI gadgets than is necessary. * The PACIASP and AUTIASP instructions make leaf functions larger than necessary, bloating the kernel Image. For a defconfig v6.2-rc3 kernel, this appears to add ~64KiB relative to not signing leaf functions, which is unfortunate but not entirely onerous. * The PACIASP and AUTIASP instructions potentially make leaf functions more expensive in terms of performance and/or power. For many trivial leaf functions, this is clearly unnecessary, e.g. | : | d503233f paciasp | d53b4220 mrs x0, daif | d50323bf autiasp | d65f03c0 ret | : | d503233f paciasp | d50323bf autiasp | d65f03c0 ret | d503201f nop * When CONFIG_UNWIND_PATCH_PAC_INTO_SCS=y we disable pointer authentication for leaf functions, so clearly this is not functionally necessary, indicates we have an inconsistent threat model, and convolutes the Makefile logic. We've used pointer authentication in leaf functions since the introduction of in-kernel pointer authentication in commit: 74afda4016a7437e ("arm64: compile the kernel with ptrauth return address signing") ... but at the time we had no rationale for signing leaf functions. Subsequently, we considered avoiding signing leaf functions: https://lore.kernel.org/linux-arm-kernel/1586856741-26839-1-git-send-email-amit.kachhap@arm.com/ https://lore.kernel.org/linux-arm-kernel/1588149371-20310-1-git-send-email-amit.kachhap@arm.com/ ... however at the time we didn't have an abundance of reasons to avoid signing leaf functions as above (e.g. the BTI case), we had no hardware to make performance measurements, and it was reasoned that this gave some level of protection against a limited set of code-reuse gadgets which would fall through to a RET. We documented this in commit: 717b938e22f8dbf0 ("arm64: Document why we enable PAC support for leaf functions") Notably, this was before we supported any forward-edge CFI scheme (e.g. Arm BTI, or Clang CFI/kCFI), which would prevent jumping into the middle of a function. In addition, even with signing forced for leaf functions, AUTIASP may be placed before a number of instructions which might constitute such a gadget, e.g. | : | f9400022 ldr x2, [x1] | d503233f paciasp | d50323bf autiasp | f9408401 ldr x1, [x0, #264] | 720b005f tst w2, #0x200000 | b26b0022 orr x2, x1, #0x200000 | 926af821 and x1, x1, #0xffffffffffdfffff | 9a820021 csel x1, x1, x2, eq // eq = none | f9008401 str x1, [x0, #264] | d65f03c0 ret | : | 2a0003e3 mov w3, w0 | 9000ff42 adrp x2, ffff800009ffd000 | 9120e042 add x2, x2, #0x838 | 52800000 mov w0, #0x0 // #0 | d503233f paciasp | f000d041 adrp x1, ffff800009a20000 | d50323bf autiasp | 9102c021 add x1, x1, #0xb0 | f8635842 ldr x2, [x2, w3, uxtw #3] | f821685f str xzr, [x2, x1] | d65f03c0 ret | d503201f nop So generally, trying to use AUTIASP to detect such gadgetization is not robust, and this is dealt with far better by forward-edge CFI (which is designed to prevent such cases). We should bite the bullet and stop pretending that AUTIASP is a mitigation for such forward-edge gadgetization. For the above reasons, this patch has the kernel consistently sign non-leaf functions and avoid signing leaf functions. Considering a defconfig v6.2-rc3 kernel built with LLVM 15.0.6: * The vmlinux is ~43KiB smaller: | [mark@lakrids:~/src/linux]% ls -al vmlinux-* | -rwxr-xr-x 1 mark mark 338547808 Jan 25 17:17 vmlinux-after | -rwxr-xr-x 1 mark mark 338591472 Jan 25 17:22 vmlinux-before * The resulting Image is 64KiB smaller: | [mark@lakrids:~/src/linux]% ls -al Image-* | -rwxr-xr-x 1 mark mark 32702976 Jan 25 17:17 Image-after | -rwxr-xr-x 1 mark mark 32768512 Jan 25 17:22 Image-before * There are ~400 fewer BTI gadgets: | [mark@lakrids:~/src/linux]% usekorg 12.1.0 aarch64-linux-objdump -d vmlinux-before 2> /dev/null | grep -ow 'paciasp\|bti\sc\?' | sort | uniq -c | 1219 bti c | 61982 paciasp | [mark@lakrids:~/src/linux]% usekorg 12.1.0 aarch64-linux-objdump -d vmlinux-after 2> /dev/null | grep -ow 'paciasp\|bti\sc\?' | sort | uniq -c | 10099 bti c | 52699 paciasp Which is +8880 BTIs, and -9283 PACIASPs, for -403 unnecessary BTI gadgets. While this is small relative to the total, distinguishing the two cases will make it easier to analyse and reduce this set further in future. Signed-off-by: Mark Rutland Reviewed-by: Ard Biesheuvel Reviewed-by: Mark Brown Cc: Amit Daniel Kachhap Cc: Will Deacon Link: https://lore.kernel.org/r/20230131105809.991288-3-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 1e249c41ea43157fc69e1496e3b4feea999f107a Author: Mark Rutland Date: Tue Jan 31 10:58:08 2023 +0000 arm64: unify asm-arch manipulation Assemblers will reject instructions not supported by a target architecture version, and so we must explicitly tell the assembler the latest architecture version for which we want to assemble instructions from. We've added a few AS_HAS_ARMV8_ definitions for this, in addition to an inconsistently named AS_HAS_PAC definition, from which arm64's top-level Makefile determines the architecture version that we intend to target, and generates the `asm-arch` variable. To make this a bit clearer and easier to maintain, this patch reworks the Makefile to determine asm-arch in a single if-else-endif chain. AS_HAS_PAC, which is defined when the assembler supports `-march=armv8.3-a`, is renamed to AS_HAS_ARMV8_3. As the logic for armv8.3-a is lifted out of the block handling pointer authentication, `asm-arch` may now be set to armv8.3-a regardless of whether support for pointer authentication is selected. This means that it will be possible to assemble armv8.3-a instructions even if we didn't intend to, but this is consistent with our handling of other architecture versions, and the compiler won't generate armv8.3-a instructions regardless. For the moment there's no need for an CONFIG_AS_HAS_ARMV8_1, as the code for LSE atomics and LDAPR use individual `.arch_extension` entries and do not require the baseline asm arch to be bumped to armv8.1-a. The other armv8.1-a features (e.g. PAN) do not require assembler support. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Reviewed-by: Ard Biesheuvel Reviewed-by: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20230131105809.991288-2-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit b2ab432bcf65e6fa3ec3fef6dd08796404b009d0 Author: Mark Brown Date: Mon Jan 30 23:45:57 2023 +0000 kselftest/arm64: Remove redundant _start labels from zt-test The newly added zt-test program copied the pattern from the other FP stress test programs of having a redundant _start label which is rejected by clang, as we did in a parallel series for the other tests remove the label so we can build with clang. No functional change. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230130-arm64-fix-sme2-clang-v1-1-3ce81d99ea8f@kernel.org Signed-off-by: Catalin Marinas commit d1f2cfe2f669148791fbd057ad246f696a9e9715 Author: Melody Olvera Date: Thu Jan 12 13:07:22 2023 -0800 arm64: dts: qcom: Add base QDU1000/QRU1000 IDP DTs Add DTs for Qualcomm IDP platforms using the QDU1000 and QRU1000 SoCs. Signed-off-by: Melody Olvera Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230112210722.6234-3-quic_molvera@quicinc.com commit 6bd20c54b5895c44ca3e6775abf14ee2cfa9135b Author: Melody Olvera Date: Thu Jan 12 13:07:21 2023 -0800 arm64: dts: qcom: Add base QDU1000/QRU1000 DTSIs Add the base DTSI files for QDU1000 and QRU1000 SoCs, including base descriptions of CPUs, GCC, RPMHCC, QUP, TLMM, and interrupt-controller to boot to shell with console on these SoCs. Signed-off-by: Melody Olvera Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230112210722.6234-2-quic_molvera@quicinc.com commit 3ef1569b2b61ef94b5c6a0e86694221147a46cd4 Merge: ac4fdb86a0100 8c8acefcee879 Author: Bjorn Andersson Date: Mon Jan 30 13:10:59 2023 -0600 Merge branch '20230112204446.30236-2-quic_molvera@quicinc.com' into arm64-for-6.3 Merge DT binding in order to get GCC clock defines. commit ac4fdb86a010017571273c1ff3887330f7866741 Merge: b904227a4b693 1f51339f7dd0e Author: Bjorn Andersson Date: Tue Jan 31 10:01:18 2023 -0600 Merge branch 'icc-qdu1000-immutable' of https://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into HEAD Merge DT binding to gain interconnect defines. commit 004fc58f917cfea5d7190139e3ed1b7a13e39c25 Author: Anshuman Khandual Date: Mon Jan 30 17:44:57 2023 +0530 arm64/mm: Intercept pfn changes in set_pte_at() Changing pfn on a user page table mapped entry, without first going through break-before-make (BBM) procedure is unsafe. This just updates set_pte_at() to intercept such changes, via an updated pgattr_change_is_safe(). This new check happens via __check_racy_pte_update(), which has now been renamed as __check_safe_pte_update(). Cc: Will Deacon Cc: Mark Rutland Cc: Andrew Morton Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Acked-by: Mark Rutland Signed-off-by: Anshuman Khandual Link: https://lore.kernel.org/r/20230130121457.1607675-1-anshuman.khandual@arm.com Signed-off-by: Catalin Marinas commit a70f00e7f1a3132a2ff6f0516fe990e710ae8c1c Author: Randy Dunlap Date: Thu Jan 26 22:39:32 2023 -0800 Documentation: arm64: correct spelling Correct spelling problems for Documentation/arm64/ as reported by codespell. Signed-off-by: Randy Dunlap Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Reviewed-by: Mukesh Ojha Link: https://lore.kernel.org/r/20230127064005.1558-3-rdunlap@infradead.org Signed-off-by: Catalin Marinas commit 25d0dc4b957cc8674f8554e85f18a00467e876d7 Author: Ashok Raj Date: Mon Jan 30 13:39:48 2023 -0800 x86/microcode: Allow only "1" as a late reload trigger value Microcode gets reloaded late only if "1" is written to the reload file. However, the code silently treats any other unsigned integer as a successful write even though no actions are performed to load microcode. Make the loader more strict to accept only "1" as a trigger value and return an error otherwise. [ bp: Massage commit message. ] Suggested-by: Thomas Gleixner Signed-off-by: Ashok Raj Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230130213955.6046-3-ashok.raj@intel.com commit 89ff30b9b72079a1c677500218bdc511eac246d4 Author: Mark Brown Date: Wed Jan 11 15:02:41 2023 +0000 kselftest/arm64: Limit the maximum VL we try to set via ptrace When SVE was initially merged we chose to export the maximum VQ in the ABI as being 512, rather more than the architecturally supported maximum of 16. For the ptrace tests this results in us generating a lot of test cases and hence log output which are redundant since a system couldn't possibly support them. Instead only check values up to the current architectural limit, plus one more so that we're covering the constraining of higher vector lengths. This makes no practical difference to our test coverage, speeds things up on slower consoles and makes the output much more managable. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230111-arm64-kselftest-ptrace-max-vl-v1-1-8167f41d1ad8@kernel.org Signed-off-by: Catalin Marinas commit 921e672dee91af86f8f9e44a067c735ebac0744b Author: Pierre Gondois Date: Tue Jan 24 16:40:48 2023 +0100 cacheinfo: Remove unused check in init_cache_level() commit e75d18cecbb3 ("arm64: cacheinfo: Fix incorrect assignment of signed error value to unsigned fw_level") checks the fw_level value in init_cache_level() in case the value is negative. Remove this check as the error code is not returned through fw_level anymore, and reset fw_level if acpi_get_cache_info() failed. This allows to try fetching the cache information from clidr_el1. Signed-off-by: Pierre Gondois Link: https://lore.kernel.org/r/20230124154053.355376-4-pierre.gondois@arm.com Signed-off-by: Greg Kroah-Hartman commit d931b83e62b1dd352fc326c0b1cf3be3ef19e113 Author: Pierre Gondois Date: Tue Jan 24 16:40:47 2023 +0100 cacheinfo: Make default acpi_get_cache_info() return an error commit bd500361a937 ("ACPI: PPTT: Update acpi_find_last_cache_level() to acpi_get_cache_info()") updates the prototype of acpi_get_cache_info(). The cache 'levels' is update through a pointer and not the return value of the function. If CONFIG_ACPI_PPTT is not defined, acpi_get_cache_info() doesn't update its *levels and *split_levels parameters and returns 0. This can lead to a faulty behaviour. Make acpi_get_cache_info() return an error code if CONFIG_ACPI_PPTT is not defined. Also, In init_cache_level(), if no PPTT is present or CONFIG_ACPI_PPTT is not defined, instead of aborting if acpi_get_cache_info() returns an error code, just continue. This allows to try fetching the cache information from clidr_el1. Signed-off-by: Pierre Gondois Link: https://lore.kernel.org/r/20230124154053.355376-3-pierre.gondois@arm.com Signed-off-by: Greg Kroah-Hartman commit ecaef469920fd6d2c7687f19081946f47684a423 Author: Pierre Gondois Date: Tue Jan 24 16:40:46 2023 +0100 cacheinfo: Initialize variables in fetch_cache_info() Set potentially uninitialized variables to 0. This is particularly relevant when CONFIG_ACPI_PPTT is not set. Reported-by: kernel test robot Link: https://lore.kernel.org/all/202301052307.JYt1GWaJ-lkp@intel.com/ Reported-by: Dan Carpenter Link: https://lore.kernel.org/all/Y86iruJPuwNN7rZw@kili/ Fixes: 5944ce092b97 ("arch_topology: Build cacheinfo from primary CPU") Signed-off-by: Pierre Gondois Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230124154053.355376-2-pierre.gondois@arm.com Signed-off-by: Greg Kroah-Hartman commit 48a9051980242128f844defe44c7e83217f79872 Author: Ming Lei Date: Tue Jan 31 12:04:46 2023 +0800 ublk_drv: only allow owner to open unprivileged disk Owner of one unprivileged ublk device could be one evil user, which can grant this disk's privilege to other users deliberately, and this way could be like making one trap and waiting for other users to be caught. So only owner to open unprivileged disk even though the owner grants disk privilege to other user. This way is reasonable too given anyone can create ublk disk, and no need other's grant. Reported-by: Stefan Hajnoczi Fixes: 4093cb5a0634 ("ublk_drv: add mechanism for supporting unprivileged ublk device") Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20230131040446.214583-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 5e6a51787fef20b849682d8c49ec9c2beed5c373 Author: Andy Shevchenko Date: Tue Jan 24 15:38:38 2023 +0200 uuid: Decouple guid_t and uuid_le types and respective macros The guid_t type and respective macros are being used internally only. The uuid_le has its user outside the kernel. Decouple these types and macros, and make guid_t completely internal type to the kernel. Signed-off-by: Andy Shevchenko Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230124133838.22645-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 12cb7a3349a53efa8698a01fe0efdc61d887e541 Author: Michał Grzelak Date: Thu Dec 29 19:01:55 2022 +0100 ARM: dts: dove.dtsi: Move ethphy to fix schema error Running 'make dtbs_check' with schema in net/marvell,orion-mdio.yaml gives following warnings: mdio-bus@72004: Unevaluated properties are not allowed ('ethernet-phy' was unexpected) arch/arm/boot/dts/dove-cubox.dtb arch/arm/boot/dts/dove-cubox-es.dtb arch/arm/boot/dts/dove-d2plug.dtb arch/arm/boot/dts/dove-d2plug.dtb arch/arm/boot/dts/dove-dove-db.dtb arch/arm/boot/dts/dove-d3plug.dtb arch/arm/boot/dts/dove-sbc-a510.dtb As every subnode of mdio is expected to have an @X, ethernet-phy subnode in dove.dtsi doesn't have one. Fix these errors by moving ethernet-phy into relevant .dts files with correct @. Signed-off-by: Michał Grzelak Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit 66f95de7c13be5e442d8ed4cf00e13f8dbdc1315 Author: Pierre-Louis Bossart Date: Thu Jan 19 15:32:11 2023 +0800 soundwire: cadence: further simplify low-level xfer_msg_defer() callback The message pointer is already stored in the bus->defer structure, not need to pass it as an argument. Suggested-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230119073211.85979-5-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit dd0b9619a21ef77127e6002f9cb2d254c03ceed1 Author: Pierre-Louis Bossart Date: Thu Jan 19 15:32:10 2023 +0800 soundwire: cadence: use directly bus sdw_defer structure Copying the bus sdw_defer structure into the Cadence internals leads to using stale pointers and kernel oopses on errors. It's just simpler and safer to use the bus sdw_defer structure directly. Link: https://github.com/thesofproject/linux/issues/4056 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230119073211.85979-4-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 45cb70f99993f74bb46cef72158f59677dbea318 Author: Pierre-Louis Bossart Date: Thu Jan 19 15:32:09 2023 +0800 soundwire: bus: remove sdw_defer argument in sdw_transfer_defer() There's no point in passing an argument that is a pointer to a bus member. We can directly get the member and do an indirection when needed. This is a first step before simplifying the hardware-specific callbacks further. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230119073211.85979-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 5ec0c8721c06fc55d8a0bb32c403228358987eb6 Author: Pierre-Louis Bossart Date: Thu Jan 19 15:32:08 2023 +0800 soundwire: stream: use consistent pattern for freeing buffers The code should free the message buffer used for data, the message structure used for control and assign the latter to NULL. The last part is missing for multi-link cases, and the order is inconsistent for single-link cases. Link: https://github.com/thesofproject/linux/issues/4056 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230119073211.85979-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit df54fde451db9534f2fd9838d4c7d2a10ccfb6e8 Author: Caleb Connolly Date: Fri Jan 27 20:27:58 2023 +0000 net: ipa: use dev PM wakeirq handling Replace the enable_irq_wake() call with one to dev_pm_set_wake_irq() instead. This will let the dev PM framework automatically manage the the wakeup capability of the ipa IRQ and ensure that userspace requests to enable/disable wakeup for the IPA via sysfs are respected. Signed-off-by: Caleb Connolly Reviewed-by: Alex Elder Link: https://lore.kernel.org/r/20230127202758.2913612-1-caleb.connolly@linaro.org Signed-off-by: Paolo Abeni commit b41499a1085b9278d73c6132d49849a6a86a81bc Author: Geert Uytterhoeven Date: Wed Jan 18 11:39:24 2023 +0100 phy: phy-can-transceiver: Add support for NXP TJR1443 The NXP TJR1443 High-speed CAN transceiver with Sleep mode is a pin-compatible alternative for the TI TCAN1043. Signed-off-by: Geert Uytterhoeven Acked-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/0bfa1e4c43632e49c9512b4e7daa970545545dcf.1674037830.git.geert+renesas@glider.be Signed-off-by: Vinod Koul commit 01b17067f4f31a9c243ee06f4826279dae97abf2 Merge: 41e0207f16488 514d7f9df3f40 Author: Mark Brown Date: Tue Jan 31 14:12:09 2023 +0000 ASoC: mchp-spdifrx: add runtime PM support and fixes Merge series from Claudiu Beznea : This series adds runtime PM support for Microchip SPDIFRX driver. Along with it I added few fixes identified while going though the code and playing with Microchip SPDIFRX controller. commit 41e0207f16488320cb3166137cb787d5ab7ef092 Merge: 381ee169e3f14 f88b6c0c070ea Author: Mark Brown Date: Tue Jan 31 14:12:02 2023 +0000 ASoC: codecs: Add Awinic AW88395 audio amplifier Merge series from wangweidong.a@awinic.com: The Awinic AW88395 is an I2S/TDM input, high efficiency digital Smart K audio amplifier with an integrated 10.25V smart boost converter. Add a DT schema for describing Awinic AW88395 audio amplifiers. They are controlled using I2C commit 381ee169e3f14483d81671cd08e3ddcea7b07d8a Merge: 1c24d12b68fa8 e60259f77c46a Author: Mark Brown Date: Tue Jan 31 14:11:55 2023 +0000 Add the Renesas IDT821034 codec support Merge series from Herve Codina : The Renesas IDT821034 codec is four channel PCM codec with on-chip filters and programmable gain setting. It also provides SLIC (Subscriber Line Interface Circuit) signals as GPIOs. commit 923510c88d2b7d947c4217835fd9ca6bd65cc56c Author: Peter Zijlstra Date: Thu Jan 26 16:34:27 2023 +0100 x86/static_call: Add support for Jcc tail-calls Clang likes to create conditional tail calls like: 0000000000000350 : 350: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 351: R_X86_64_NONE __fentry__-0x4 355: 48 83 bf 20 01 00 00 00 cmpq $0x0,0x120(%rdi) 35d: 0f 85 00 00 00 00 jne 363 35f: R_X86_64_PLT32 __SCT__amd_pmu_branch_add-0x4 363: e9 00 00 00 00 jmp 368 364: R_X86_64_PLT32 __x86_return_thunk-0x4 Where 0x35d is a static call site that's turned into a conditional tail-call using the Jcc class of instructions. Teach the in-line static call text patching about this. Notably, since there is no conditional-ret, in that case patch the Jcc to point at an empty stub function that does the ret -- or the return thunk when needed. Reported-by: "Erhard F." Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Masami Hiramatsu (Google) Link: https://lore.kernel.org/r/Y9Kdg9QjHkr9G5b5@hirez.programming.kicks-ass.net commit ac0ee0a9560c97fa5fe1409e450c2425d4ebd17a Author: Peter Zijlstra Date: Mon Jan 23 21:59:17 2023 +0100 x86/alternatives: Teach text_poke_bp() to patch Jcc.d32 instructions In order to re-write Jcc.d32 instructions text_poke_bp() needs to be taught about them. The biggest hurdle is that the whole machinery is currently made for 5 byte instructions and extending this would grow struct text_poke_loc which is currently a nice 16 bytes and used in an array. However, since text_poke_loc contains a full copy of the (s32) displacement, it is possible to map the Jcc.d32 2 byte opcodes to Jcc.d8 1 byte opcode for the int3 emulation. This then leaves the replacement bytes; fudge that by only storing the last 5 bytes and adding the rule that 'length == 6' instruction will be prefixed with a 0x0f byte. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Masami Hiramatsu (Google) Link: https://lore.kernel.org/r/20230123210607.115718513@infradead.org commit db7adcfd1cec4e95155e37bc066fddab302c6340 Author: Peter Zijlstra Date: Mon Jan 23 21:59:16 2023 +0100 x86/alternatives: Introduce int3_emulate_jcc() Move the kprobe Jcc emulation into int3_emulate_jcc() so it can be used by more code -- specifically static_call() will need this. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Masami Hiramatsu (Google) Link: https://lore.kernel.org/r/20230123210607.057678245@infradead.org commit 4d627628d7584f3d3add1d53342d0f01aa878e04 Author: Peter Zijlstra Date: Thu Jan 26 16:08:38 2023 +0100 cpuidle: Fix poll_idle() noinstr annotation The instrumentation_begin()/end() annotations in poll_idle() were complete nonsense. Specifically they caused tracing to happen in the middle of noinstr code, resulting in RCU splats. Now that local_clock() is noinstr, mark up the rest and let it rip. Fixes: 00717eb8c955 ("cpuidle: Annotate poll_idle()") Reported-by: kernel test robot Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/oe-lkp/202301192148.58ece903-oliver.sang@intel.com Link: https://lore.kernel.org/r/20230126151323.819534689@infradead.org commit 776f22913b8e50011004c6ae43004711dab7efa5 Author: Peter Zijlstra Date: Thu Jan 26 16:08:37 2023 +0100 sched/clock: Make local_clock() noinstr With sched_clock() noinstr, provide a noinstr implementation of local_clock(). Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230126151323.760767043@infradead.org commit 8739c6811572b087decd561f96382087402cc343 Author: Peter Zijlstra Date: Thu Jan 26 16:08:36 2023 +0100 sched/clock/x86: Mark sched_clock() noinstr In order to use sched_clock() from noinstr code, mark it and all it's implenentations noinstr. The whole pvclock thing (used by KVM/Xen) is a bit of a pain, since it calls out to watchdogs, create a pvclock_clocksource_read_nowd() variant doesn't do that and can be noinstr. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230126151323.702003578@infradead.org commit 5c9da9fe826d4a0d84bb322cca27cc8ad8d23b24 Author: Uros Bizjak Date: Thu Jan 26 16:08:35 2023 +0100 x86/pvclock: Improve atomic update of last_value in pvclock_clocksource_read() Improve atomic update of last_value in pvclock_clocksource_read: - Atomic update can be skipped if the "last_value" is already equal to "ret". - The detection of atomic update failure is not correct. The value, returned by atomic64_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 "last_value" location is updated to "ret" in an atomic way. Otherwise, the atomic update failed and it should be retried with the value from "last_value" - exactly what atomic64_try_cmpxchg does in a correct and more optimal way. Signed-off-by: Uros Bizjak Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20230118202330.3740-1-ubizjak@gmail.com Link: https://lore.kernel.org/r/20230126151323.643408110@infradead.org commit 7aab7aa4b4bed2b9030fcdd207e0f3a5d257bda0 Author: Peter Zijlstra Date: Thu Jan 26 16:08:34 2023 +0100 x86/atomics: Always inline arch_atomic64*() As already done for regular arch_atomic*(), always inline arch_atomic64*(). Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230126151323.585115019@infradead.org commit 3017ba4b831bc7fd67cc82e744116b6e45e259a4 Author: Peter Zijlstra Date: Tue Jan 31 09:50:36 2023 +0100 cpuidle: tracing, preempt: Squash _rcuidle tracing Extend/fix commit: 9aedeaed6fc6 ("tracing, hardirq: No moar _rcuidle() tracing") ... to also cover trace_preempt_{on,off}() which were mysteriously untouched. Fixes: 9aedeaed6fc6 ("tracing, hardirq: No moar _rcuidle() tracing") Reported-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Mark Rutland Link: https://lkml.kernel.org/r/Y9D5AfnOukWNOZ5q@hirez.programming.kicks-ass.net Link: https://lore.kernel.org/r/Y9jWXKgkxY5EZVwW@hirez.programming.kicks-ass.net commit d099dbfd330686a8c09cd8944bcc77a56f9e7815 Author: Peter Zijlstra Date: Thu Jan 26 16:08:32 2023 +0100 cpuidle: tracing: Warn about !rcu_is_watching() When using noinstr, WARN when tracing hits when RCU is disabled. Suggested-by: Steven Rostedt (Google) Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230126151323.466670589@infradead.org commit 5a5d7e9badd2cb8065db171961bd30bd3595e4b6 Author: Peter Zijlstra Date: Thu Jan 26 16:08:31 2023 +0100 cpuidle: lib/bug: Disable rcu_is_watching() during WARN/BUG In order to avoid WARN/BUG from generating nested or even recursive warnings, force rcu_is_watching() true during WARN/lockdep_rcu_suspicious(). Notably things like unwinding the stack can trigger rcu_dereference() warnings, which then triggers more unwinding which then triggers more warnings etc.. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230126151323.408156109@infradead.org commit 393e2ea30aec634b37004d401863428e120d5e1b Author: Mark Rutland Date: Thu Jan 26 16:08:30 2023 +0100 cpuidle: drivers: firmware: psci: Dont instrument suspend code The PSCI suspend code is currently instrumentable, which is not safe as instrumentation (e.g. ftrace) may try to make use of RCU during idle periods when RCU is not watching. To fix this we need to ensure that psci_suspend_finisher() and anything it calls are not instrumented. We can do this fairly simply by marking psci_suspend_finisher() and the psci*_cpu_suspend() functions as noinstr, and the underlying helper functions as __always_inline. When CONFIG_DEBUG_VIRTUAL=y, __pa_symbol() can expand to an out-of-line instrumented function, so we must use __pa_symbol_nodebug() within psci_suspend_finisher(). The raw SMCCC invocation functions are written in assembly, and are not subject to compiler instrumentation. Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230126151323.349423061@infradead.org commit 57a30218fa25c469ed507964bbf028b7a064309a Merge: 68efe8f7a1c51 6d796c50f84ca Author: Ingo Molnar Date: Tue Jan 31 15:01:20 2023 +0100 Merge tag 'v6.2-rc6' into sched/core, to pick up fixes Pick up fixes before merging another batch of cpuidle updates. Signed-off-by: Ingo Molnar commit 2fe03412e2e1be3d5ab37b8351a37c3aec506556 Author: Peng Zhang Date: Sun Jan 29 17:00:34 2023 +0800 memblock: Avoid useless checks in memblock_merge_regions(). memblock_merge_regions() is called after regions have been modified to merge the neighboring compatible regions. That will check all regions but most checks are useless. Most of the time we only insert one or a few new regions, or modify one or a few regions. At this time, we don't need to check all the regions. We only need to check the changed regions, because other not related regions cannot be merged. Add two parameters to memblock_merge_regions() to indicate the lower and upper boundary to scan. Debug code that counts the number of total iterations in memblock_merge_regions(), like for instance void memblock_merge_regions(struct memblock_type *type) { static int iteration_count = 0; static int max_nr_regions = 0; max_nr_regions = max(max_nr_regions, (int)type->cnt); ... while () { iteration_count++; ... } pr_info("iteration_count: %d max_nr_regions %d", iteration_count, max_nr_regions); } Produces the following numbers on a physical machine with 1T of memory: before: [2.472243] iteration_count: 45410 max_nr_regions 178 after: [2.470869] iteration_count: 923 max_nr_regions 176 The actual startup speed seems to change little, but it does reduce the scan overhead. Signed-off-by: Peng Zhang Link: https://lore.kernel.org/r/20230129090034.12310-3-zhangpeng.00@bytedance.com [rppt: massaged the changelog] Signed-off-by: Mike Rapoport (IBM) commit ad500fb2d11b3739dcbc17a31976828b9161ecf5 Author: Peng Zhang Date: Sun Jan 29 17:00:33 2023 +0800 memblock: Make a boundary tighter in memblock_add_range(). When type->cnt * 2 + 1 is less than or equal to type->max, there is enough empty regions to insert. Signed-off-by: Peng Zhang Link: https://lore.kernel.org/r/20230129090034.12310-2-zhangpeng.00@bytedance.com Signed-off-by: Mike Rapoport (IBM) commit cbdb1f163af2bb90d01be1f0263df1d8d5c9d9d3 Author: Andy Shevchenko Date: Mon Nov 28 16:10:03 2022 +0200 vdso/bits.h: Add BIT_ULL() for the sake of consistency The minimization done in 3945ff37d2f4 ("linux/bits.h: Extract common header for vDSO") was required to isolate the VDSO build from the larger kernel header impact. The split added some inconsistency since BIT() and BIT_ULL() are now defined in the different files which confuses unprepared reader. Move BIT_ULL() to vdso/bits.h. No functional change. Signed-off-by: Andy Shevchenko Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20221128141003.77929-1-andriy.shevchenko@linux.intel.com commit d5a7d809907c5df9e79625cd5f7d5a43b70dd913 Author: Roger Lu Date: Wed Jan 11 15:45:28 2023 +0800 soc: mtk-svs: mt8183: refactor o_slope calculation The o_slope value is dependent of the o_slope_sign, refactor code to get rid of unnecessary if constructs. Signed-off-by: Roger Lu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230111074528.29354-15-roger.lu@mediatek.com Signed-off-by: Matthias Brugger commit 01c9a8bd23ca43c708043c712fb4579848ae8dae Author: Matthias Brugger Date: Wed Jan 11 15:45:25 2023 +0800 soc: mediatek: mtk-svs: delete superfluous platform data entries The platform name and efuse parsing function pointer are only used while probing the device. Use them from the svs_platform_data struct instead. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Roger Lu Link: https://lore.kernel.org/r/20230111074528.29354-12-roger.lu@mediatek.com Signed-off-by: Matthias Brugger commit 5343e9ffb4337c22b9aef41161bc92ee5b449a17 Author: Matthias Brugger Date: Wed Jan 11 15:45:24 2023 +0800 soc: mediatek: mtk-svs: move svs_platform_probe into probe Moving svs_platform_probe into driver probe function will allow us to reduce svs_platform members. This will be done in a follow-up patch. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Roger Lu Link: https://lore.kernel.org/r/20230111074528.29354-11-roger.lu@mediatek.com Signed-off-by: Matthias Brugger commit 227fafd73b1c1f67114da6322fc32cb545b3a20b Author: Matthias Brugger Date: Wed Jan 11 15:45:23 2023 +0800 soc: mediatek: mtk-svs: improve readability of platform_probe If a compatible misses a match data entry, then something is wrong in the development phase, we don't need to check for that at runtime. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Roger Lu Link: https://lore.kernel.org/r/20230111074528.29354-10-roger.lu@mediatek.com Signed-off-by: Matthias Brugger commit 3bab727bef488c3a8da281ae4f89fd5070e37559 Author: Matthias Brugger Date: Wed Jan 11 15:45:22 2023 +0800 soc: mediatek: mtk-svs: clean up platform probing We only ever call the SoC specific probe function from svs_platform_probe. No need to carry that function in a global datastructure around. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Roger Lu Link: https://lore.kernel.org/r/20230111074528.29354-9-roger.lu@mediatek.com Signed-off-by: Matthias Brugger commit 8bf305087629a98224aa97769587434ea4016767 Author: Roger Lu Date: Wed Jan 11 15:45:21 2023 +0800 soc: mediatek: mtk-svs: keep svs alive if CONFIG_DEBUG_FS not supported Some projects might not support CONFIG_DEBUG_FS but still needs svs to be alive. Therefore, enclose debug cmd codes with CONFIG_DEBUG_FS to make sure svs can be alive when CONFIG_DEBUG_FS not supported. Signed-off-by: Roger Lu Link: https://lore.kernel.org/r/20230111074528.29354-8-roger.lu@mediatek.com Signed-off-by: Matthias Brugger commit 37fa2aff8fe490771f2229b0f2fcd15796b1bfca Author: Shang XiaoJing Date: Wed Jan 11 15:45:18 2023 +0800 soc: mediatek: mtk-svs: Use pm_runtime_resume_and_get() in svs_init01() svs_init01() calls pm_runtime_get_sync() and added fail path as svs_init01_finish to put usage_counter. However, pm_runtime_get_sync() will increment usage_counter even it failed. Fix it by replacing it with pm_runtime_resume_and_get() to keep usage counter balanced. Fixes: 681a02e95000 ("soc: mediatek: SVS: introduce MTK SVS engine") Signed-off-by: Shang XiaoJing Signed-off-by: Roger Lu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230111074528.29354-5-roger.lu@mediatek.com Signed-off-by: Matthias Brugger commit f4f8ad204a15d57c1a3e8ea7eca62157b44cbf59 Author: Roger Lu Date: Wed Jan 11 15:45:16 2023 +0800 soc: mediatek: mtk-svs: reset svs when svs_resume() fail Add svs reset when svs_resume() fail. Fixes: a825d72f74a3 ("soc: mediatek: fix missing clk_disable_unprepare() on err in svs_resume()") Signed-off-by: Roger Lu Link: https://lore.kernel.org/r/20230111074528.29354-3-roger.lu@mediatek.com Signed-off-by: Matthias Brugger commit a0674cd237fc24b08c7dcb4f8e48df3ee769293a Author: Roger Lu Date: Wed Jan 11 15:45:15 2023 +0800 soc: mediatek: mtk-svs: restore default voltages when svs_init02() fail If svs init02 fail, it means we cannot rely on svs bank voltages anymore. We need to disable svs function and restore DVFS opp voltages back to the default voltages for making sure we have enough DVFS voltages. Fixes: 681a02e95000 ("soc: mediatek: SVS: introduce MTK SVS engine") Fixes: 0bbb09b2af9d ("soc: mediatek: SVS: add mt8192 SVS GPU driver") Signed-off-by: Roger Lu Link: https://lore.kernel.org/r/20230111074528.29354-2-roger.lu@mediatek.com Signed-off-by: Matthias Brugger commit 4e197ee880c24ecb63f7fe17449b3653bc64b03c Author: Oleksij Rempel Date: Tue Jan 31 09:46:39 2023 +0100 clk: imx6ul: add ethernet refclock mux support Add ethernet refclock mux support and set it to internal clock by default. This configuration will not affect existing boards. clock tree before this patch: fec1 <- enet1_ref_125m (gate) <- enet1_ref (divider) <-, |- pll6_enet fec2 <- enet2_ref_125m (gate) <- enet2_ref (divider) <-´ after this patch: fec1 <- enet1_ref_sel(mux) <- enet1_ref_125m (gate) <- ... `--<> enet1_ref_pad |- pll6_enet fec2 <- enet2_ref_sel(mux) <- enet2_ref_125m (gate) <- ... `--<> enet2_ref_pad Signed-off-by: Oleksij Rempel Acked-by: Lee Jones Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230131084642.709385-17-o.rempel@pengutronix.de commit 5f82bfced6118450cb9ea3f12316568f6fac10ab Author: Oleksij Rempel Date: Tue Jan 31 09:46:38 2023 +0100 clk: imx6ul: fix enet1 gate configuration According to the "i.MX 6UltraLite Applications Processor Reference Manual, Rev. 2, 03/2017", BIT(13) is ENET1_125M_EN which is not controlling root of PLL6. It is controlling ENET1 separately. So, instead of this picture (implementation before this patch): fec1 <- enet_ref (divider) <---------------------------, |- pll6_enet (gate) fec2 <- enet2_ref_125m (gate) <- enet2_ref (divider) <-´ we should have this one (after this patch): fec1 <- enet1_ref_125m (gate) <- enet1_ref (divider) <-, |- pll6_enet fec2 <- enet2_ref_125m (gate) <- enet2_ref (divider) <-´ With this fix, the RMII reference clock will be turned off, after setting network interface down on each separate interface (ip l s dev eth0 down). Which was not working before, on system with both FECs enabled. Signed-off-by: Oleksij Rempel Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230131084642.709385-16-o.rempel@pengutronix.de commit 7757731053406dd00ad39fd136092ff05ec6fffe Author: Oleksij Rempel Date: Tue Jan 31 09:46:37 2023 +0100 clk: imx: add imx_obtain_fixed_of_clock() Add imx_obtain_fixed_of_clock() to optionally add clock not configured in the devicetree. Signed-off-by: Oleksij Rempel Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230131084642.709385-15-o.rempel@pengutronix.de commit 8bb289bb48b3e2966e8e165a4b9dcbba09573aa9 Author: Oleksij Rempel Date: Tue Jan 31 09:46:25 2023 +0100 clk: imx6q: add ethernet refclock mux support Add ethernet refclock mux support and set it to internal clock by default. This configuration will not affect existing boards since machine code currently overwrites this default. The machine code will be fixed in a separate patch. Signed-off-by: Oleksij Rempel Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230131084642.709385-3-o.rempel@pengutronix.de commit ee394f636ad3cf0793042db049796147f708d483 Author: Oleksij Rempel Date: Tue Jan 31 09:46:24 2023 +0100 clk: imx: add clk-gpr-mux driver Almost(?) every i.MX variant has clk mux for ethernet (rgmii/rmii) reference clock located in the GPR1 register. So far this clk is configured in different ways: - mach-imx6q is doing mux configuration based on ptp vs enet_ref clk comparison. - mach-imx7d is setting mux to PAD for all boards - mach-imx6ul is setting mux to internal clock for all boards. Since we have imx7d and imx6ul board variants which do not work with configurations forced by kernel mach code, we need to implement this clk mux properly as part of the clk framework. Which is done by this patch. Signed-off-by: Oleksij Rempel Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230131084642.709385-2-o.rempel@pengutronix.de commit 562c65486cf197f28f84283979c076601eb50042 Author: Arnd Bergmann Date: Mon Jan 30 14:17:51 2023 +0100 net: dsa: microchip: ptp: fix up PTP dependency When NET_DSA_MICROCHIP_KSZ_COMMON is built-in but PTP is a loadable module, the ksz_ptp support still causes a link failure: ld.lld-16: error: undefined symbol: ptp_clock_index >>> referenced by ksz_ptp.c >>> drivers/net/dsa/microchip/ksz_ptp.o:(ksz_get_ts_info) in archive vmlinux.a This can happen if NET_DSA_MICROCHIP_KSZ8863_SMI is enabled, or even if none of the KSZ9477_I2C/KSZ_SPI/KSZ8863_SMI ones are active but only the common module is. The most straightforward way to address this is to move the dependency to NET_DSA_MICROCHIP_KSZ_PTP itself, which can now only be enabled if both PTP_1588_CLOCK support is reachable from NET_DSA_MICROCHIP_KSZ_COMMON. Alternatively, one could make NET_DSA_MICROCHIP_KSZ_COMMON a hidden Kconfig symbol and extend the PTP_1588_CLOCK_OPTIONAL dependency to NET_DSA_MICROCHIP_KSZ8863_SMI as well, but that is a little more fragile. Fixes: eac1ea20261e ("net: dsa: microchip: ptp: add the posix clock support") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230130131808.1084796-1-arnd@kernel.org Signed-off-by: Paolo Abeni commit 2f8c06cb6622b55ebd0092abaa49630b411cb720 Author: Michal Wajdeczko Date: Sat Jan 28 20:59:07 2023 +0100 drm/i915/guc: Update GT/GuC messages in intel_uc.c Use new macros to have common prefix that also include GT#. v2: pass gt to print_fw_ver v3: prefer guc_dbg in suspend/resume logs Signed-off-by: Michal Wajdeczko Cc: John Harrison Reviewed-by: John Harrison Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20230128195907.1837-9-michal.wajdeczko@intel.com commit f0c4fc416e5ea21cfb8f4b3f8d0955bd5a69b154 Author: Michal Wajdeczko Date: Sat Jan 28 20:59:06 2023 +0100 drm/i915/guc: Update GuC messages in intel_guc_submission.c Use new macros to have common prefix that also include GT#. v2: improve few existing messages Signed-off-by: Michal Wajdeczko Cc: John Harrison Reviewed-by: John Harrison Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20230128195907.1837-8-michal.wajdeczko@intel.com commit 357d420ef21258ab7203be1ef31b31cda470f8b9 Author: Michal Wajdeczko Date: Sat Jan 28 20:59:05 2023 +0100 drm/i915/guc: Update GuC messages in intel_guc_log.c Use new macros to have common prefix that also include GT#. v2: drop redundant GuC strings, minor improvements v3: more message improvements Signed-off-by: Michal Wajdeczko Cc: John Harrison Reviewed-by: John Harrison Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20230128195907.1837-7-michal.wajdeczko@intel.com commit d8ff10816243a643cf4b77536f13c4138aaec702 Author: Michal Wajdeczko Date: Sat Jan 28 20:59:04 2023 +0100 drm/i915/guc: Update GuC messages in intel_guc_fw.c Use new macros to have common prefix that also include GT#. Signed-off-by: Michal Wajdeczko Cc: John Harrison Reviewed-by: John Harrison Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20230128195907.1837-6-michal.wajdeczko@intel.com commit 7388acb253d9222adb30c3e333b64bf993b33b19 Author: Michal Wajdeczko Date: Sat Jan 28 20:59:03 2023 +0100 drm/i915/guc: Update GuC messages in intel_guc_ct.c Use new macros to have common prefix that also include GT#. v2: drop unused helpers Signed-off-by: Michal Wajdeczko Cc: John Harrison Reviewed-by: John Harrison Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20230128195907.1837-5-michal.wajdeczko@intel.com commit 140f9309d25402283024574d33adb504b4c3d78b Author: Michal Wajdeczko Date: Sat Jan 28 20:59:02 2023 +0100 drm/i915/guc: Update GuC messages in intel_guc_ads.c Use new macros to have common prefix that also include GT#. Signed-off-by: Michal Wajdeczko Cc: John Harrison Reviewed-by: John Harrison Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20230128195907.1837-4-michal.wajdeczko@intel.com commit ecb89c2c4d3a91c874466936152527acc1847aa9 Author: Michal Wajdeczko Date: Sat Jan 28 20:59:01 2023 +0100 drm/i915/guc: Update GuC messages in intel_guc.c Use new macros to have common prefix that also include GT#. v2: drop now redundant "GuC" word from the message Signed-off-by: Michal Wajdeczko Cc: John Harrison Reviewed-by: John Harrison Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20230128195907.1837-3-michal.wajdeczko@intel.com commit e03a9d4063cb63cce4b3e29181d4ce3d9633ba7c Author: Michal Wajdeczko Date: Sat Jan 28 20:59:00 2023 +0100 drm/i915/guc: Add GuC oriented print macros While we do have GT oriented print macros, add few more GuC specific to have common look and feel across all messages related to the GuC and to avoid chasing the gt pointer. We will use these macros shortly in upcoming patches. Signed-off-by: Michal Wajdeczko Cc: Tvrtko Ursulin Cc: John Harrison Reviewed-by: John Harrison Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20230128195907.1837-2-michal.wajdeczko@intel.com commit 697c3892d825fb78f42ec8e53bed065dd728db3e Author: Daniel Golle Date: Mon Jan 30 02:04:57 2023 +0000 regmap: apply reg_base and reg_downshift for single register ops reg_base and reg_downshift currently don't have any effect if used with a regmap_bus or regmap_config which only offers single register operations (ie. reg_read, reg_write and optionally reg_update_bits). Fix that and take them into account also for regmap_bus with only reg_read and read_write operations by applying reg_base and reg_downshift in _regmap_bus_reg_write, _regmap_bus_reg_read. Also apply reg_base and reg_downshift in _regmap_update_bits, but only in case the operation is carried out with a reg_update_bits call defined in either regmap_bus or regmap_config. Fixes: 0074f3f2b1e43d ("regmap: allow a defined reg_base to be added to every address") Fixes: 86fc59ef818beb ("regmap: add configurable downshift for addresses") Signed-off-by: Daniel Golle Tested-by: Colin Foster Link: https://lore.kernel.org/r/Y9clyVS3tQEHlUhA@makrotopia.org Signed-off-by: Mark Brown commit 16838bfbf6e70b7a3381ab302248bd18c085aba5 Author: Stefan Binding Date: Fri Jan 27 16:51:11 2023 +0000 ASoC: cs42l42: Wait for debounce interval after resume Since clock stop causes bus reset on Intel controllers, we need to wait for the debounce interval on resume, to ensure all the interrupt status registers are set correctly. Signed-off-by: Stefan Binding Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230127165111.3010960-9-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown commit e0bd53a4d1d5afa7d3a3bf46e2f0ec7940f94710 Author: Richard Fitzgerald Date: Fri Jan 27 16:51:10 2023 +0000 ASoC: cs42l42: Don't set idle_bias_on idle_bias_on was set because cs42l42 has a "VMID" type pseudo-midrail supply (named FILT+), and these typically take a long time to charge. But the driver never enabled pm_runtime so it would never have powered- down the cs42l42 anyway. In fact, FILT+ can charge to operating voltage within 12.5 milliseconds of enabling HP or ADC. This time is already covered by the startup delay of the HP/ADC. The datasheet warning about FILT+ taking up to 1 second to charge only applies in the special cases that either the PLL is started or DETECT_MODE set to non-zero while both HP and ADC are off. The driver never does either of these. Removing idle_bias_on allows the Soundwire host controller to suspend if there isn't a snd_soc_jack handler registered. Signed-off-by: Richard Fitzgerald Signed-off-by: Stefan Binding Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230127165111.3010960-8-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown commit 90f6a2a20bd2e88bd7ea4b4f99509b831c5c1c47 Author: Richard Fitzgerald Date: Fri Jan 27 16:51:09 2023 +0000 ASoC: cs42l42: Add SoundWire support This adds support for using CS42L42 as a SoundWire device. SoundWire-specifics are kept separate from the I2S implementation as much as possible, aiming to limit the risk of breaking the I2C+I2S support. There are some important differences in the silicon behaviour between I2S and SoundWire mode that are reflected in the implementation: - ASP (I2S) most not be used in SoundWire mode because the two interfaces share pins. - The SoundWire capture (record) port only supports 1 channel. It does not have left-to-right duplication like the ASP. - DP2 can only be prepared if the HP has powered-up. DP1 can only be prepared if the ADC has powered-up. (This ordering restriction does not exist for ASPs.) The SoundWire core port-prepare step is triggered by the DAI-link prepare(). This happens before the codec DAI prepare() or the DAPM sequence so these cannot be used to enable HP/ADC. Instead the HP/ADC enable/disable are done during the port_prep callback. - The SRCs are an integral part of the audio chain but in silicon their power control is linked to the ASP. There is no equivalent power link to SoundWire DPs so the driver must take "manual" control of SRC power. - The SoundWire control registers occupy the lower part of the SoundWire address space so cs42l42 registers are offset by 0x8000 (non-paged) in SoundWire mode. - Register addresses are 8-bit paged in I2C mode but 16-bit unpaged in SoundWire. - Special procedures are needed on register read/writes to (a) ensure that the previous internal bus transaction has completed, and (b) handle delayed read results, when the read value could not be returned within the SoundWire read command. There are also some differences in driver implementation between I2S and SoundWire operation: - CS42L42 I2S does not runtime_suspend, but runtime_suspend/resume support has been added into the driver in SoundWire mode as the most convenient way to power-up the bus manager and to handle the unattach_request condition, though the CS42L42 chip does not itself suspend or resume. - Intel SoundWire host controllers have a low-power clock-stop mode that requires resetting all peripherals when resuming. This means that the interrupt registers will be reset in between the interrupt being generated and the interrupt being handled, and since the interrupt status is debounced, these values may not be accurate immediately, and may cause spurious unplug events before settling. - As in I2S mode, the PLL is only used while audio is active because of clocking quirks in the silicon. For SoundWire the cs42l42_pll_config() is deferred until the DAI prepare(), to allow the cs42l42_bus_config() callback to set the SCLK. Signed-off-by: Richard Fitzgerald Signed-off-by: Stefan Binding Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230127165111.3010960-7-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown commit 0998816ab2d85d67ebace9993b5a97e79a24d816 Author: Richard Fitzgerald Date: Fri Jan 27 16:51:08 2023 +0000 ASoC: cs42l42: Export some functions for SoundWire Export functions that will be needed by a SoundWire module. Signed-off-by: Richard Fitzgerald Signed-off-by: Stefan Binding Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230127165111.3010960-6-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown commit 7209d5ebb34aff3fbdd504c7deeb9b74df632086 Author: Richard Fitzgerald Date: Fri Jan 27 16:51:07 2023 +0000 ASoC: cs42l42: Separate ASP config from PLL config Setup of the ASP (audio serial port) was being done as a side-effect of cs42l42_pll_config() and forces a restriction on the ratio of sample_rate to bit_clock that is invalid for Soundwire. Move the ASP setup into a dedicated function. Signed-off-by: Richard Fitzgerald Signed-off-by: Stefan Binding Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230127165111.3010960-5-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown commit 17cb563baef9c4f2d244035a95e361dd673941fa Author: Richard Fitzgerald Date: Fri Jan 27 16:51:06 2023 +0000 ASoC: cs42l42: Ensure MCLKint is a multiple of the sample rate The chosen clocking configuration must give an internal MCLK (MCLKint) that is an integer multiple of the sample rate. On I2S each of the supported bit clock frequencies can only be generated from one sample rate group (either the 44100 or the 48000) so the code could use only the bitclock to look up a PLL config. The relationship between sample rate and bitclock frequency is more complex on Soundwire and so it is possible to set a frame shape to generate a bitclock from the "wrong" group. For example 2*147 with a 48000 sample rate would give a bitclock of 14112000 which on I2S could only be derived from a 44100 sample rate. Signed-off-by: Richard Fitzgerald Signed-off-by: Stefan Binding Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230127165111.3010960-4-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown commit b558c6fd08f59b78166828c342beb2a36258e9fe Author: Richard Fitzgerald Date: Fri Jan 27 16:51:05 2023 +0000 ASoC: cs42l42: Add SOFT_RESET_REBOOT register The SOFT_RESET_REBOOT register is needed to recover CS42L42 state after a Soundwire bus reset. This is required to be set whenever there is severe/hard bus reset. Signed-off-by: Richard Fitzgerald Signed-off-by: Stefan Binding Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230127165111.3010960-3-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown commit 43f1a7f905fcc796620c6488a7098068a05484ca Author: Stefan Binding Date: Fri Jan 27 16:51:04 2023 +0000 soundwire: stream: Add specific prep/deprep commands to port_prep callback Currently, port_prep callback only has commands for PRE_PREP, PREP, and POST_PREP, which doesn't directly say whether this is for a prepare or deprepare call. Extend the command list enum to say whether the call is for prepare or deprepare aswell. Also remove SDW_OPS_PORT_PREP from sdw_port_prep_ops as this is unused, and update this enum to be simpler and more consistent with enum sdw_clk_stop_type. Note: Currently, the only users of SDW_OPS_PORT_POST_PREP are codec drivers sound/soc/codecs/wsa881x.c and sound/soc/codecs/wsa883x.c, both of which seem to assume that POST_PREP only occurs after a prepare, even though it would also have occurred after a deprepare. Since it doesn't make sense to mark the port prepared after a deprepare, changing the enum to separate PORT_DEPREP from PORT_PREP should make the check for PORT_PREP in those drivers be more logical. Signed-off-by: Stefan Binding Reviewed-by: Pierre-Louis Bossart Acked-By: Vinod Koul Link: https://lore.kernel.org/r/20230127165111.3010960-2-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown commit 3bd3bc2ada84229e74f974d4dafcaca59ae8347f Author: Richard Fitzgerald Date: Mon Jan 23 16:49:49 2023 +0000 soundwire: bus: Remove unused reset_page_addr() callback A previous patch removed unnecessary zeroing of the page registers after a paged transaction, so now the reset_page_addr callback is unused and can be removed. Signed-off-by: Richard Fitzgerald Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230123164949.245898-3-rf@opensource.cirrus.com Signed-off-by: Vinod Koul commit c8a0d6b256dfc54c6ee5f2d16706219ccedcb856 Author: Richard Fitzgerald Date: Mon Jan 23 16:49:48 2023 +0000 soundwire: bus: Don't zero page registers after every transaction Zeroing the page registers at the end of every paged transaction is just overhead (40% overhead on a 1-register access, 25% on a 4-register transaction). According to the spec a peripheral that supports paging should only use the values in the page registers if the address is paged (address bit 15 set). The core SoundWire code always writes the page registers at the start of a paged transaction so there will never be a transaction that uses the stale values from a previous paged transaction. For peripherals that need large amounts of data to be transferred, for example firmware or filter coefficients, the overhead of page register zeroing can become quite significant. Signed-off-by: Richard Fitzgerald Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230123164949.245898-2-rf@opensource.cirrus.com Signed-off-by: Vinod Koul commit 3dca1f89ae3455963d7b53245ecf298ea9bae857 Author: Richard Fitzgerald Date: Mon Jan 23 17:25:20 2023 +0000 soundwire: bus_type: Avoid lockdep assert in sdw_drv_probe() Don't hold sdw_dev_lock while calling the peripheral driver probe() and remove() callbacks. Holding sdw_dev_lock around the probe() and remove() calls causes a theoretical mutex inversion which lockdep will assert on. During probe() the sdw_dev_lock mutex is taken first and then ASoC/ALSA locks are taken by the probe() implementation. During normal operation ASoC can take its locks and then trigger a runtime resume of the component. The SoundWire resume will then take sdw_dev_lock. This is the reverse order compared to probe(). It's not necessary to hold sdw_dev_lock when calling the probe() and remove(), it is only used to prevent the bus core calling the driver callbacks if there isn't a driver or the driver is removing. All calls to the driver callbacks are guarded by the 'probed' flag. So if sdw_dev_lock is held while setting and clearing the 'probed' flag this is sufficient to guarantee the safety of callback functions. Removing the mutex from around the call to probe() means that it is now possible for a bus event (PING response) to be handled in parallel with the probe(). But sdw_bus_probe() already has handling for this by calling the device update_status() after the probe() has completed. Example lockdep assert: [ 46.098514] ====================================================== [ 46.104736] WARNING: possible circular locking dependency detected [ 46.110961] 6.1.0-rc4-jamerson #1 Tainted: G E [ 46.116842] ------------------------------------------------------ [ 46.123063] mpg123/1130 is trying to acquire lock: [ 46.127883] ffff8b445031fb80 (&slave->sdw_dev_lock){+.+.}-{3:3}, at: sdw_update_slave_status+0x26/0x70 [ 46.137225] but task is already holding lock: [ 46.143074] ffffffffc1455310 (&card->pcm_mutex){+.+.}-{3:3}, at: dpcm_fe_dai_open+0x49/0x830 [ 46.151536] which lock already depends on the new lock.[ 46.159732] the existing dependency chain (in reverse order) is: [ 46.167231] -> #4 (&card->pcm_mutex){+.+.}-{3:3}: [ 46.173428] __mutex_lock+0x94/0x920 [ 46.177542] snd_soc_dpcm_runtime_update+0x2e/0x100 [ 46.182958] snd_soc_dapm_put_enum_double+0x1c2/0x200 [ 46.188548] snd_ctl_elem_write+0x10c/0x1d0 [ 46.193268] snd_ctl_ioctl+0x126/0x850 [ 46.197556] __x64_sys_ioctl+0x87/0xc0 [ 46.201845] do_syscall_64+0x38/0x90 [ 46.205959] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 46.211553] -> #3 (&card->controls_rwsem){++++}-{3:3}: [ 46.218188] down_write+0x2b/0xd0 [ 46.222038] snd_ctl_add_replace+0x39/0xb0 [ 46.226672] snd_soc_add_controls+0x53/0x80 [ 46.231393] soc_probe_component+0x1e4/0x2a0 [ 46.236202] snd_soc_bind_card+0x51a/0xc80 [ 46.240836] devm_snd_soc_register_card+0x43/0x90 [ 46.246079] mc_probe+0x982/0xfe0 [snd_soc_sof_sdw] [ 46.251500] platform_probe+0x3c/0xa0 [ 46.255700] really_probe+0xde/0x390 [ 46.259814] __driver_probe_device+0x78/0x180 [ 46.264710] driver_probe_device+0x1e/0x90 [ 46.269347] __driver_attach+0x9f/0x1f0 [ 46.273721] bus_for_each_dev+0x78/0xc0 [ 46.278098] bus_add_driver+0x1ac/0x200 [ 46.282473] driver_register+0x8f/0xf0 [ 46.286759] do_one_initcall+0x58/0x310 [ 46.291136] do_init_module+0x4c/0x1f0 [ 46.295422] __do_sys_finit_module+0xb4/0x130 [ 46.300321] do_syscall_64+0x38/0x90 [ 46.304434] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 46.310027] -> #2 (&card->mutex){+.+.}-{3:3}: [ 46.315883] __mutex_lock+0x94/0x920 [ 46.320000] snd_soc_bind_card+0x3e/0xc80 [ 46.324551] devm_snd_soc_register_card+0x43/0x90 [ 46.329798] mc_probe+0x982/0xfe0 [snd_soc_sof_sdw] [ 46.335219] platform_probe+0x3c/0xa0 [ 46.339420] really_probe+0xde/0x390 [ 46.343532] __driver_probe_device+0x78/0x180 [ 46.348430] driver_probe_device+0x1e/0x90 [ 46.353065] __driver_attach+0x9f/0x1f0 [ 46.357437] bus_for_each_dev+0x78/0xc0 [ 46.361812] bus_add_driver+0x1ac/0x200 [ 46.366716] driver_register+0x8f/0xf0 [ 46.371528] do_one_initcall+0x58/0x310 [ 46.376424] do_init_module+0x4c/0x1f0 [ 46.381239] __do_sys_finit_module+0xb4/0x130 [ 46.386665] do_syscall_64+0x38/0x90 [ 46.391299] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 46.397416] -> #1 (client_mutex){+.+.}-{3:3}: [ 46.404307] __mutex_lock+0x94/0x920 [ 46.408941] snd_soc_add_component+0x24/0x2c0 [ 46.414345] devm_snd_soc_register_component+0x54/0xa0 [ 46.420522] cs35l56_common_probe+0x280/0x370 [snd_soc_cs35l56] [ 46.427487] cs35l56_sdw_probe+0xf4/0x170 [snd_soc_cs35l56_sdw] [ 46.434442] sdw_drv_probe+0x80/0x1a0 [ 46.439136] really_probe+0xde/0x390 [ 46.443738] __driver_probe_device+0x78/0x180 [ 46.449120] driver_probe_device+0x1e/0x90 [ 46.454247] __driver_attach+0x9f/0x1f0 [ 46.459106] bus_for_each_dev+0x78/0xc0 [ 46.463971] bus_add_driver+0x1ac/0x200 [ 46.468825] driver_register+0x8f/0xf0 [ 46.473592] do_one_initcall+0x58/0x310 [ 46.478441] do_init_module+0x4c/0x1f0 [ 46.483202] __do_sys_finit_module+0xb4/0x130 [ 46.488572] do_syscall_64+0x38/0x90 [ 46.493158] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 46.499229] -> #0 (&slave->sdw_dev_lock){+.+.}-{3:3}: [ 46.506737] __lock_acquire+0x1121/0x1df0 [ 46.511765] lock_acquire+0xd5/0x300 [ 46.516360] __mutex_lock+0x94/0x920 [ 46.520949] sdw_update_slave_status+0x26/0x70 [ 46.526409] sdw_clear_slave_status+0xd8/0xe0 [ 46.531783] intel_resume_runtime+0x139/0x2a0 [ 46.537155] __rpm_callback+0x41/0x120 [ 46.541919] rpm_callback+0x5d/0x70 [ 46.546422] rpm_resume+0x531/0x7e0 [ 46.550920] __pm_runtime_resume+0x4a/0x80 [ 46.556024] snd_soc_pcm_component_pm_runtime_get+0x2f/0xc0 [ 46.562611] __soc_pcm_open+0x62/0x520 [ 46.567375] dpcm_be_dai_startup+0x116/0x210 [ 46.572661] dpcm_fe_dai_open+0xf7/0x830 [ 46.577597] snd_pcm_open_substream+0x54a/0x8b0 [ 46.583145] snd_pcm_open.part.0+0xdc/0x200 [ 46.588341] snd_pcm_playback_open+0x51/0x80 [ 46.593625] chrdev_open+0xc0/0x250 [ 46.598129] do_dentry_open+0x15f/0x430 [ 46.602981] path_openat+0x75e/0xa80 [ 46.607575] do_filp_open+0xb2/0x160 [ 46.612162] do_sys_openat2+0x9a/0x160 [ 46.616922] __x64_sys_openat+0x53/0xa0 [ 46.621767] do_syscall_64+0x38/0x90 [ 46.626352] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 46.632414] other info that might help us debug this:[ 46.641862] Chain exists of: &slave->sdw_dev_lock --> &card->controls_rwsem --> &card->pcm_mutex[ 46.655145] Possible unsafe locking scenario:[ 46.662048] CPU0 CPU1 [ 46.667080] ---- ---- [ 46.672108] lock(&card->pcm_mutex); [ 46.676267] lock(&card->controls_rwsem); [ 46.683382] lock(&card->pcm_mutex); [ 46.690063] lock(&slave->sdw_dev_lock); [ 46.694574] *** DEADLOCK ***[ 46.701942] 2 locks held by mpg123/1130: [ 46.706356] #0: ffff8b4457b22b90 (&pcm->open_mutex){+.+.}-{3:3}, at: snd_pcm_open.part.0+0xc9/0x200 [ 46.715999] #1: ffffffffc1455310 (&card->pcm_mutex){+.+.}-{3:3}, at: dpcm_fe_dai_open+0x49/0x830 [ 46.725390] stack backtrace: [ 46.730752] CPU: 0 PID: 1130 Comm: mpg123 Tainted: G E 6.1.0-rc4-jamerson #1 [ 46.739703] Hardware name: AAEON UP-WHL01/UP-WHL01, BIOS UPW1AM19 11/10/2020 [ 46.747270] Call Trace: [ 46.750239] [ 46.752857] dump_stack_lvl+0x56/0x73 [ 46.757045] check_noncircular+0x102/0x120 [ 46.761664] __lock_acquire+0x1121/0x1df0 [ 46.766197] lock_acquire+0xd5/0x300 [ 46.770292] ? sdw_update_slave_status+0x26/0x70 [ 46.775432] ? lock_is_held_type+0xe2/0x140 [ 46.780143] __mutex_lock+0x94/0x920 [ 46.784241] ? sdw_update_slave_status+0x26/0x70 [ 46.789387] ? find_held_lock+0x2b/0x80 [ 46.793750] ? sdw_update_slave_status+0x26/0x70 [ 46.798894] ? lock_release+0x147/0x2f0 [ 46.803262] ? lockdep_init_map_type+0x47/0x250 [ 46.808315] ? sdw_update_slave_status+0x26/0x70 [ 46.813456] sdw_update_slave_status+0x26/0x70 [ 46.818422] sdw_clear_slave_status+0xd8/0xe0 [ 46.823302] ? pm_generic_runtime_suspend+0x30/0x30 [ 46.828706] intel_resume_runtime+0x139/0x2a0 [ 46.833583] ? _raw_spin_unlock_irq+0x24/0x50 [ 46.838462] ? pm_generic_runtime_suspend+0x30/0x30 [ 46.843866] __rpm_callback+0x41/0x120 [ 46.848142] ? pm_generic_runtime_suspend+0x30/0x30 [ 46.853550] rpm_callback+0x5d/0x70 [ 46.857568] rpm_resume+0x531/0x7e0 [ 46.861578] ? _raw_spin_lock_irqsave+0x62/0x70 [ 46.866634] __pm_runtime_resume+0x4a/0x80 [ 46.871258] snd_soc_pcm_component_pm_runtime_get+0x2f/0xc0 [ 46.877358] __soc_pcm_open+0x62/0x520 [ 46.881634] ? dpcm_add_paths.isra.0+0x35d/0x4c0 [ 46.886784] dpcm_be_dai_startup+0x116/0x210 [ 46.891592] dpcm_fe_dai_open+0xf7/0x830 [ 46.896046] ? debug_mutex_init+0x33/0x50 [ 46.900591] snd_pcm_open_substream+0x54a/0x8b0 [ 46.905658] snd_pcm_open.part.0+0xdc/0x200 [ 46.910376] ? wake_up_q+0x90/0x90 [ 46.914312] snd_pcm_playback_open+0x51/0x80 [ 46.919118] chrdev_open+0xc0/0x250 [ 46.923147] ? cdev_device_add+0x90/0x90 [ 46.927608] do_dentry_open+0x15f/0x430 [ 46.931976] path_openat+0x75e/0xa80 [ 46.936086] do_filp_open+0xb2/0x160 [ 46.940194] ? lock_release+0x147/0x2f0 [ 46.944563] ? _raw_spin_unlock+0x29/0x50 [ 46.949101] do_sys_openat2+0x9a/0x160 [ 46.953377] __x64_sys_openat+0x53/0xa0 [ 46.957733] do_syscall_64+0x38/0x90 [ 46.961829] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 46.967402] RIP: 0033:0x7fa6397ccd3b [ 46.971506] Code: 25 00 00 41 00 3d 00 00 41 00 74 4b 64 8b 04 25 18 00 00 00 85 c0 75 67 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 0f 87 91 00 00 00 48 8b 4c 24 28 64 48 33 0c 25 [ 46.991413] RSP: 002b:00007fff838e8990 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 [ 46.999580] RAX: ffffffffffffffda RBX: 0000000000080802 RCX: 00007fa6397ccd3b [ 47.007311] RDX: 0000000000080802 RSI: 00007fff838e8b50 RDI: 00000000ffffff9c [ 47.015047] RBP: 00007fff838e8b50 R08: 0000000000000000 R09: 0000000000000011 [ 47.022787] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000080802 [ 47.030539] R13: 0000000000000004 R14: 0000000000000000 R15: 00007fff838e8b50 [ 47.038289] Signed-off-by: Richard Fitzgerald Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230123172520.339367-1-rf@opensource.cirrus.com Signed-off-by: Vinod Koul commit e6acaf25cba14661211bb72181c35dd13b24f5b3 Author: Alper Nebi Yasak Date: Sun Jan 22 22:04:31 2023 +0300 firmware: coreboot: framebuffer: Ignore reserved pixel color bits The coreboot framebuffer doesn't support transparency, its 'reserved' bit field is merely padding for byte/word alignment of pixel colors [1]. When trying to match the framebuffer to a simplefb format, the kernel driver unnecessarily requires the format's transparency bit field to exactly match this padding, even if the former is zero-width. Due to a coreboot bug [2] (fixed upstream), some boards misreport the reserved field's size as equal to its position (0x18 for both on a 'Lick' Chromebook), and the driver fails to probe where it would have otherwise worked fine with e.g. the a8r8g8b8 or x8r8g8b8 formats. Remove the transparency comparison with reserved bits. When the bits-per-pixel and other color components match, transparency will already be in a subset of the reserved field. Not forcing it to match reserved bits allows the driver to work on the boards which misreport the reserved field. It also enables using simplefb formats that don't have transparency bits, although this doesn't currently happen due to format support and ordering in linux/platform_data/simplefb.h. [1] https://review.coreboot.org/plugins/gitiles/coreboot/+/4.19/src/commonlib/include/commonlib/coreboot_tables.h#255 [2] https://review.coreboot.org/plugins/gitiles/coreboot/+/4.13/src/drivers/intel/fsp2_0/graphics.c#82 Signed-off-by: Alper Nebi Yasak Link: https://lore.kernel.org/r/20230122190433.195941-1-alpernebiyasak@gmail.com Signed-off-by: Greg Kroah-Hartman commit 31d5f93454f2efb7152a70fb736afa858aafc6ae Author: Jonathan Neuschäfer Date: Sun Jan 29 17:19:41 2023 +0100 drivers: misc: ti-st: Fix a typo ("unknow") Spell it as "unknown". Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20230129161942.1627267-1-j.neuschaefer@gmx.net Signed-off-by: Greg Kroah-Hartman commit cc3db79bb1389b3e95e84a4ef73d85f2a1cb8fe0 Author: Bo Liu Date: Sun Jan 29 04:23:57 2023 -0500 misc: isl29003: Use sysfs_emit() to instead of sprintf() Follow the advice of the Documentation/filesystems/sysfs.rst and show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: Bo Liu Link: https://lore.kernel.org/r/20230129092357.3143-1-liubo03@inspur.com Signed-off-by: Greg Kroah-Hartman commit dd08ebe761328de4f894a4909e01e145bc68ef4c Merge: 7c306cb1941e0 01f714ee022ec Author: Greg Kroah-Hartman Date: Tue Jan 31 13:01:11 2023 +0100 Merge tag 'counter-updates-for-6.3a' of git://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter into char-misc-next William writes: First set of Counter updates for the 6.3 cycle This set of updates consists only of Kconfig cleanup and changes for the Counter subsystem. In particular, the Kconfig entries are reorganized to to alphabetical order, and dependencies added to restrict building certain drivers (intel-qep, ftm-quaddec, and microchip-tcp-capture) to systems that support them. Changes * counter - Sort the Kconfig entries alphabetically * ftm-quaddec - Depend on the Layerscape SoC * microchip-tcp-capture - Add appropriate arch deps for TCP driver - fix dependency references for config MICROCHIP_TCB_CAPTURE * intel-qep - Depend on X86 * tag 'counter-updates-for-6.3a' of git://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter: counter: fix dependency references for config MICROCHIP_TCB_CAPTURE counter: microchip-tcp-capture: Add appropriate arch deps for TCP driver counter: ftm-quaddec: Depend on the Layerscape SoC counter: intel-qep: Depend on X86 counter: Sort the Kconfig entries alphabetically commit a266ef69b890f099069cf51bb40572611c435a54 Author: Randy Dunlap Date: Sun Jan 29 15:10:48 2023 -0800 Documentation: networking: correct spelling Correct spelling problems for Documentation/networking/ as reported by codespell. Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Jiri Pirko Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: netdev@vger.kernel.org Link: https://lore.kernel.org/r/20230129231053.20863-5-rdunlap@infradead.org Signed-off-by: Paolo Abeni commit 22991d8d57251509b8ee5c0b3dac04506fe5ed7a Author: Asahi Lina Date: Mon Jan 23 12:17:28 2023 +0900 soc: apple: rtkit: Add register dump decoding to crashlog When the coprocessor crashes, it's useful to get a proper register dump so we can find out what the firmware was doing. Add a decoder for this. Originally this had ESR decoding by reusing the ARM64 arch header for this, but that introduces some module linking and cross-arch compilation issues, so let's leave that out for now. Reviewed-by: Sven Peter Reviewed-by: Eric Curtin Signed-off-by: Asahi Lina Signed-off-by: Hector Martin commit 2b8e35337605ca581f777cad73d7a6ac2ccbf6ec Author: Andy Shevchenko Date: Mon Jan 30 13:17:46 2023 +0200 container_of: Update header inclusions The commit 848dba781f19 ("container_of: remove container_of_safe()") removed the code that uses err.h. Replace the inclusion by stddef.h which provides offsetof() definition which is still in use. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230130111746.59830-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 090bd20c6021976400b8ba3faf9ca9a75173f7ea Author: AngeloGioacchino Del Regno Date: Thu Jan 26 11:35:26 2023 +0100 arm64: dts: mt8192: Change idle states names to reflect actual function The names of the idle states are misleading being this a single cluster SoC, a cluster-sleep idle state is impossible! After some research in ATF, it emerged that the cpu-sleep state is in reality putting CPUs in retention state, while the cluster-sleep one is turning off the CPUs. Summarizing renaming: - cpu-sleep -> cpu-retention - cluster-sleep -> cpu-off Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230126103526.417039-7-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit f3ca158008afc6531daccd9a49cb2e16b3dacedf Author: AngeloGioacchino Del Regno Date: Thu Jan 26 11:35:25 2023 +0100 arm64: dts: mt8186: Change idle states names to reflect actual function The names of the idle states are misleading being this a single cluster SoC, a cluster-off idle state is impossible! After some research in ATF, it emerged that the cpu-off state is in reality putting CPUs in retention state, while the cluster-off one is turning off the CPUs. Summarizing renaming: - cpu-off -> cpu-retention - cluster-off -> cpu-off Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230126103526.417039-6-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 66fe2431faa227e75a16c2ee2f90b2bb6665b2b3 Author: AngeloGioacchino Del Regno Date: Thu Jan 26 11:35:24 2023 +0100 arm64: dts: mt8195: Change idle states names to reflect actual function The names of the idle states are misleading being this a single cluster SoC, a cluster-off idle state is impossible! After some research in ATF, it emerged that the cpu-off state is in reality putting CPUs in retention state, while the cluster-off one is turning off the CPUs. Summarizing renaming: - cpu-off -> cpu-retention - cluster-off -> cpu-off Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230126103526.417039-5-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 1c473804b0c8a68c6ef2cf519b38ec6725ca4aa5 Author: AngeloGioacchino Del Regno Date: Thu Jan 26 11:35:23 2023 +0100 arm64: dts: mt8186: Fix CPU map for single-cluster SoC MT8186 features the ARM DynamIQ technology and combines both two Cortex-A76 (big) and six Cortex-A55 (LITTLE) CPUs in one cluster: fix the CPU map to reflect that. Signed-off-by: AngeloGioacchino Del Regno Fixes: 2e78620b1350 ("arm64: dts: Add MediaTek MT8186 dts and evaluation board and Makefile") Link: https://lore.kernel.org/r/20230126103526.417039-4-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 160ce54d635455ffb5e9b42c5ba9cb9aaa98cdb2 Author: AngeloGioacchino Del Regno Date: Thu Jan 26 11:35:22 2023 +0100 arm64: dts: mt8192: Fix CPU map for single-cluster SoC MT8192 features the ARM DynamIQ technology and combines both four Cortex-A76 (big) and four Cortex-A55 (LITTLE) CPUs in one cluster: fix the CPU map to reflect that. Signed-off-by: AngeloGioacchino Del Regno Fixes: 48489980e27e ("arm64: dts: Add Mediatek SoC MT8192 and evaluation board dts and Makefile") Link: https://lore.kernel.org/r/20230126103526.417039-3-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit cc4f0b13a887b483faa45084616998a21b63889d Author: AngeloGioacchino Del Regno Date: Thu Jan 26 11:35:21 2023 +0100 arm64: dts: mt8195: Fix CPU map for single-cluster SoC MT8195 features the ARM DynamIQ technology and combines both four Cortex-A78 (big) and four Cortex-A55 (LITTLE) CPUs in one cluster: fix the CPU map to reflect that. Signed-off-by: AngeloGioacchino Del Regno Fixes: 37f2582883be ("arm64: dts: Add mediatek SoC mt8195 and evaluation board") Link: https://lore.kernel.org/r/20230126103526.417039-2-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit b3892860f50920ea46342d32bf51323877365082 Author: Asahi Lina Date: Sat Jan 21 16:41:35 2023 +0900 soc: apple: rtkit: Export non-devm init/free functions While we normally encourage devm usage by drivers, some consumers (and in particular the upcoming Rust abstractions) might want to manually manage memory. Export the raw functions to make this possible. Signed-off-by: Asahi Lina Reviewed-by: Sven Peter Reviewed-by: Eric Curtin Signed-off-by: Hector Martin commit 4435d63f172851b57a6a0943b73a6b8055a9356f Author: Asahi Lina Date: Sat Jan 21 16:42:53 2023 +0900 soc: apple: rtkit: Add a private pointer to apple_rtkit_shmem This allows downstream consumers to keep track of private data for shmem mappings. In particular, the Rust abstraction will use this to safely drop data associated with a mapping when it is unmapped. Signed-off-by: Asahi Lina Reviewed-by: Sven Peter Reviewed-by: Eric Curtin Signed-off-by: Hector Martin commit c289d5bce8521352a596f3ad27cd6d70b9f9f821 Author: Hector Martin Date: Mon Jan 23 15:51:25 2023 +0900 soc: apple: apple-pmgr-pwrstate: Switch to IRQ-safe mode This requires changing the reset path locking primitives to the spinlock path in genpd, instead of the mutex path. Reviewed-by: Eric Curtin Reviewed-by: Sven Peter Signed-off-by: Hector Martin commit 40eaa8c0cbba4a27668c7e01373ccd5b38381e2f Author: Hector Martin Date: Mon Jan 23 15:53:54 2023 +0900 soc: apple: rtkit: Add apple_rtkit_idle() function This is yet another low power mode, used by DCP. Reviewed-by: Eric Curtin Reviewed-by: Sven Peter Signed-off-by: Hector Martin commit 72f2b0b2185099dce354c805009f591dda3ab73d Author: Ondrej Zary Date: Mon Jan 30 22:10:50 2023 +0100 drivers/block: Move PARIDE protocol modules to drivers/ata/pata_parport Move PARIDE protocol modules out of drivers/block into drivers/ata/pata_parport and update the CONFIG_ symbol names to PATA_PARPORT. [Damien] The pata_parport driver file itsef is also moved together with the protocol modules in drivers/ata/pata_parport. Signed-off-by: Ondrej Zary Acked-by: Jens Axboe Signed-off-by: Damien Le Moal commit 09ea26f1bf31c381faf4504774326755d8c47108 Author: Nícolas F. R. A. Prado Date: Mon Jan 30 15:08:20 2023 -0500 arm64: defconfig: Enable DMA_RESTRICTED_POOL Enable support for restricted DMA pools which provide a level of DMA memory protection on systems with limited hardware protection capabilities, such as those lacking an IOMMU. For instance, mt8192-asurada-spherion makes use of this to provide a restricted DMA region for WiFi since its MT7921E WiFi card is connected through PCIe, and the MT8192 SoC doesn't have an IOMMU context for the PCIe controller. Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20230130200820.82084-2-nfraprado@collabora.com Signed-off-by: Matthias Brugger commit 900785741289abbcf8cb4c090416715f0c1c8e08 Author: Nícolas F. R. A. Prado Date: Mon Jan 30 15:08:19 2023 -0500 arm64: defconfig: Enable missing configs for mt8192-asurada Enable missing configs in the arm64 defconfig to get all devices probing on mt8192-asurada based machines. The devices enabled are: MediaTek Bluetooth USB controller, MediaTek PCIe Gen3 MAC controller, MT7921E wireless adapter, Elan I2C Trackpad, MediaTek SPI NOR flash controller, Mediatek SPMI Controller, ChromeOS EC regulators, MT6315 PMIC, MediaTek Video Codec, MT8192 sound cards, ChromeOS EC rpmsg communication, all MT8192 clocks. REGULATOR_CROS_EC is enabled as builtin since it powers the MMC controller for the SD card, making it required for booting on some setups. The MT8192 clocks are enabled as builtin for now since their Kconfigs are bool, and will be changed to modules after those Kconfigs are reworked. Restricted DMA pool support is also required to get working WiFi, but it is enabled in a separate commit since it alters behavior of other platforms and devices. By enabling the support for all of this platform's devices on the defconfig we make it effortless to test the relevant hardware both by developers as well as CI systems like KernelCI. Reviewed-by: AngeloGioacchino Del Regno Tested-by: AngeloGioacchino Del Regno Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20230130200820.82084-1-nfraprado@collabora.com Signed-off-by: Matthias Brugger commit aebd8f0c6f8280ba35bc989f4a9ea47469d3589a Merge: 155c6b16eec2e 6d796c50f84ca Author: Daniel Vetter Date: Tue Jan 31 11:22:15 2023 +0100 Merge v6.2-rc6 into drm-next Due to holidays we started -next with more -fixes in-flight than usual, and people have been asking where they are. Backmerge to get things better in sync. Conflicts: - Tiny conflict in drm_fbdev_generic.c between variable rename and missing error handling that got added. - Conflict in drm_fb_helper.c between the added call to vgaswitcheroo in drm_fb_helper_single_fb_probe and a refactor patch that extracted lots of helpers and incidentally removed the dev local variable. Readd it to make things compile. Signed-off-by: Daniel Vetter commit 1c24d12b68fa85fe51184ac64f446b27a4ccfaec Author: Kiseok Jo Date: Tue Jan 31 05:09:47 2023 +0000 ASoC: dt-bindings: irondevice,sma1303.yaml: Fix about breaking the checks Fix the bindings checks like syntax error. Signed-off-by: Kiseok Jo Reported-by: Rob Herring Link: https://lore.kernel.org/r/20230131050946.14385-1-kiseok.jo@irondevice.com Signed-off-by: Mark Brown commit 30cf002579969120ce926dffa3630afbb2ae899f Author: Uwe Kleine-König Date: Tue Jan 31 09:21:07 2023 +0100 ASoC: sma1303: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230131082107.174739-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 4a639a757128debbede924736f255680740a4364 Author: Kiseok Jo Date: Tue Jan 31 05:45:27 2023 +0000 MAINTAINERS: add IRON DEVICE AUDIO CODEC DRIVERS Add Kiseok Jo as maintainer for Iron Device audio codec drivers. Signed-off-by: Kiseok Jo Link: https://lore.kernel.org/r/20230131054526.14653-1-kiseok.jo@irondevice.com Signed-off-by: Mark Brown commit 3653480c68120dc16ebfeb80e529200dbbd98f92 Author: Kuninori Morimoto Date: Tue Jan 31 02:02:04 2023 +0000 ASoC: soc-dai.h: cleanup Playback/Capture data for snd_soc_dai Current snd_soc_dai has data for Playback/Capture, but it is very random. Someone is array (A), someone is playback/capture (B), and someone is tx/rx (C); struct snd_soc_dai { ... (A) unsigned int stream_active[SNDRV_PCM_STREAM_LAST + 1]; (B) struct snd_soc_dapm_widget *playback_widget; (B) struct snd_soc_dapm_widget *capture_widget; (B) void *playback_dma_data; (B) void *capture_dma_data; ... (C) unsigned int tx_mask; (C) unsigned int rx_mask; }; Because of it, the code was very complicated. This patch creates new data structure to merge these into one, and tidyup the code. Signed-off-by: Kuninori Morimoto Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/87cz6vea1v.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2b34c1359cca4812d7c8253ff70c394871c22590 Author: Kuninori Morimoto Date: Tue Jan 31 02:01:59 2023 +0000 ASoC: soc-topology.c: use helper function Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87edrbea20.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e15ff262e212387a05316dc465d754c0a62d9691 Author: Kuninori Morimoto Date: Tue Jan 31 02:01:54 2023 +0000 ASoC: soc-pcm.c: use helper function Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/87fsbrea25.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 8ede4b7109f618b3267a9577083b38984857a267 Author: Kuninori Morimoto Date: Tue Jan 31 02:01:49 2023 +0000 ASoC: soc-dai.c: use helper function Current ASoC has many helper function. This patch use it. Link: https://lore.kernel.org/all/6f047ec5-4055-761d-c1ea-c2d0b606e53a@linux.intel.com/ Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87h6w7ea2a.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 6855ec72102921814aaa43eab305b541af3e9757 Author: Kuninori Morimoto Date: Tue Jan 31 02:01:34 2023 +0000 ASoC: soc-dapm.c: use helper function Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/87ilgnea2p.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 9024bae4bb229c38522bb8c5dc45b82f9c27e0fc Author: Kuninori Morimoto Date: Tue Jan 31 02:01:29 2023 +0000 ASoC: soc-core.c: use helper function Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/87k013ea2u.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2abde57fb82b4259b790212135b2194f2fd4dc7c Author: Kuninori Morimoto Date: Tue Jan 31 02:01:18 2023 +0000 ASoC: ti: use helper function Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87leljea35.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 1c1a778401b8ad04ae618eb8baa9a34a8b7e3d50 Author: Kuninori Morimoto Date: Tue Jan 31 02:01:13 2023 +0000 ASoC: tegra: use helper function Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87mt5zea3a.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 323f09a61d43da2aff9b71e8a4764f4c9a88a5e0 Author: Kuninori Morimoto Date: Tue Jan 31 02:01:08 2023 +0000 ASoC: sof: use helper function Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87o7qfea3f.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 67cc242679b106909be52f8476e372dbb03c0a88 Author: Kuninori Morimoto Date: Tue Jan 31 02:01:02 2023 +0000 ASoC: rockchip: use helper function Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87pmavea3l.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit c765ceda78f0bd9df1217f9beaefea58ecf3865c Author: Kuninori Morimoto Date: Tue Jan 31 02:00:57 2023 +0000 ASoC: meson: use helper function Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto Reviewed-by: Jerome Brunet Link: https://lore.kernel.org/r/87r0vbea3r.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 0df2ec8e4706a6adc36d12cc5cf8e1fa7485fbf5 Author: Kuninori Morimoto Date: Tue Jan 31 02:00:49 2023 +0000 ASoC: mediatek: use helper function Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/87sffrea3z.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit ec4b2099c6e01342e5c3289a906615c3abef85b8 Author: Kuninori Morimoto Date: Tue Jan 31 02:00:42 2023 +0000 ASoC: intel: use helper function Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87tu07ea45.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e87abb83fc24a481ba490d8596969e1de3a16384 Author: Kuninori Morimoto Date: Tue Jan 31 02:00:37 2023 +0000 ASoC: sdw-mockup: use helper function Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87v8knea4b.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit c4d78c4127f9371dcfc77e71417addddcc5a9533 Author: Kuninori Morimoto Date: Tue Jan 31 02:00:29 2023 +0000 ASoC: spear: use helper function Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87wn53ea4i.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 0e478b88b257049e1e22077b880419a431595645 Author: Kuninori Morimoto Date: Tue Jan 31 02:00:24 2023 +0000 ASoC: cirrus: use helper function Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87y1pjea4n.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 8ec352362848d8cc9500ccfb051810597c0abf8a Author: Kuninori Morimoto Date: Tue Jan 31 02:00:16 2023 +0000 ASoC: rt: use helper function Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87zg9zea4w.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 812c2852c59f1f532ea9b53d9bbe86231dd83fea Author: Kuninori Morimoto Date: Tue Jan 31 01:59:58 2023 +0000 ASoC: max: use helper function Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/871qnbfopt.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 5bf13408fd06068aeef751597748c9d0569c3708 Author: Kuninori Morimoto Date: Tue Jan 31 01:59:50 2023 +0000 ASoC: hda: use helper function Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87357rfoq1.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit c59331b39045fcc9ed3c66cb5c80a8ef3ade820f Author: Kuninori Morimoto Date: Tue Jan 31 01:59:40 2023 +0000 ASoC: hdmi-codec: use helper function Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/874js7foqb.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2e5f86174e31cc1eda92b308f23f3b29684b339e Author: Kuninori Morimoto Date: Tue Jan 31 01:59:27 2023 +0000 ASoC: soc.h: add snd_soc_card_is_instantiated() helper ASoC framework/driver checks whether card was instantiated every where. Then, it should check card pointer too in such case. This patch adds snd_soc_card_is_instantiated() for it. Signed-off-by: Kuninori Morimoto Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/875ycnfoqp.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 944d721ee5defb376410c7054a7db0a0ef5ff584 Author: Kuninori Morimoto Date: Tue Jan 31 01:59:17 2023 +0000 ASoC: soc-dai.h: add snd_soc_dai_get/set_widget_playback/capture() helper snd_soc_dai_get_widget() requests SNDRV_PCM_STREAM_PLAYBACK/CAPTURE. This patch adds helper for it. Signed-off-by: Kuninori Morimoto Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/877cx3foqz.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit d4c0326e6ea038cf99fde6f22296e4e68de4f2b5 Author: Kuninori Morimoto Date: Tue Jan 31 01:59:07 2023 +0000 ASoC: soc-dai.h: add snd_soc_dai_tdm_mask_set/get() helper Current ASoC has tx/rx_mask, and is directly accessing to them, but accessing to it via function is nice idea. This patch adds snd_soc_dai_tdm_mask_set/get() for it. Signed-off-by: Kuninori Morimoto Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/878rhjfor8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 60df5935c27e19cc6595bd1740479a60f1880a32 Author: Kuninori Morimoto Date: Tue Jan 31 01:58:58 2023 +0000 ASoC: soc-dai.h: add snd_soc_dai_dma_data_set/get() for low level Current ASoC has snd_soc_dai_set/get_dma_data() which is assuming struct snd_pcm_substream to get Playback/Capture direction. But, many drivers want to use it not through snd_pcm_substream. This patch adds more low level snd_soc_dai_dma_data_set/get() for it, and previous functions will be macro for it. Signed-off-by: Kuninori Morimoto Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/87a61zfori.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 37ed123689968fa7f733598d9a6966e8a2db66fb Author: Kuninori Morimoto Date: Tue Jan 31 01:58:50 2023 +0000 ASoC: soc-dai.h: add missing snd_soc_dai_set_widget() Current ASoC has snd_soc_dai_get_widget() (= _get_) but doesn't have _set_ function. This patch adds it. This patch also cleanup unnecessary line break for _get_ function. Signed-off-by: Kuninori Morimoto Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/87bkmfforp.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 0c52310f260014d95c1310364379772cb74cf82d Author: Davidlohr Bueso Date: Mon Jan 23 09:32:06 2023 -0800 hrtimer: Ignore slack time for RT tasks in schedule_hrtimeout_range() While in theory the timer can be triggered before expires + delta, for the cases of RT tasks they really have no business giving any lenience for extra slack time, so override any passed value by the user and always use zero for schedule_hrtimeout_range() calls. Furthermore, this is similar to what the nanosleep(2) family already does with current->timer_slack_ns. Signed-off-by: Davidlohr Bueso Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20230123173206.6764-3-dave@stgolabs.net commit c14fd3dcacaa480394d3ac0b4a91a7d17a4b5516 Author: Davidlohr Bueso Date: Mon Jan 23 09:32:05 2023 -0800 hrtimer: Rely on rt_task() for DL tasks too Checking dl_task() is redundant as rt_task() returns true for deadline tasks too. Signed-off-by: Davidlohr Bueso Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20230123173206.6764-2-dave@stgolabs.net commit 5eb6e280432ddc9b755193552f3a070da8d7455c Author: Nathan Chancellor Date: Sun Jan 29 15:49:07 2023 +0100 ARM: 9289/1: Allow pre-ARMv5 builds with ld.lld 16.0.0 and newer Commit 6a7ee50f8f56 ("ARM: disallow pre-ARMv5 builds with ld.lld") prevented v4 or v4t kernels when ld.lld will link the kernel due to inserting unsupported blx instructions. ld.lld has been fixed in current main (16.0.0) to avoid inserting these instructions by inserting position independent thunks instead. Allow these configurations to be enabled when ld.lld 16.0.0 is used to link the kernel. Additionally, add a link to the upstream LLVM issue so that the reason for this dependency is clearly documented. Link: https://github.com/ClangBuiltLinux/linux/issues/964 Link: https://github.com/llvm/llvm-project/commit/6f9ff1beee9d12aca0c9caa9ae0051dc6d0a718c Suggested-by: Nick Desaulniers Tested-by: Arnd Bergmann Signed-off-by: Nathan Chancellor Signed-off-by: Russell King (Oracle) commit cfb1076d1549f6d500da65a4593a67cba19cb041 Author: Randy Dunlap Date: Tue Jan 24 19:16:18 2023 +0100 ARM: 9288/1: Kconfigs: fix spelling & grammar Fix spelling (reported by codespell) and grammar in Arm Kconfig files. Signed-off-by: Randy Dunlap Cc: linux-arm-kernel@lists.infradead.org Cc: patches@armlinux.org.uk Signed-off-by: Russell King (Oracle) commit 7f0c12449aa91867efb00f080fb34c77d40c81e6 Author: Jongwoo Han Date: Tue Jan 31 01:42:50 2023 +0900 staging: vc04_services: mmal-vchiq: fix typo in comment Correct typo from 'witin' to 'within' in comment. Signed-off-by: Jongwoo Han Link: https://lore.kernel.org/r/20230130164250.51877-1-jongwooo.han@gmail.com Signed-off-by: Greg Kroah-Hartman commit edb3e231e47de091a169b4cd70852f29ba705c82 Author: Martin Kaiser Date: Mon Jan 30 20:53:03 2023 +0100 staging: r8188eu: replace switch-case with if Replace a switch-case in rtw_write_port with an if statement and make the code a bit shorter. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20230130195303.138941-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit b6d2e4e0f3cc3f8d182e35c359cae9032b337435 Author: Martin Kaiser Date: Mon Jan 30 20:53:02 2023 +0100 staging: r8188eu: option in struct sta_xmit_priv is not used The option component in struct sta_xmit_priv is not used, remove it. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20230130195303.138941-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 6a800cf38665ca47488acf2c88dad49ded557406 Author: Martin Kaiser Date: Mon Jan 30 20:53:01 2023 +0100 staging: r8188eu: apsd is initialised but never used apsd in struct sta_xmit_priv is initialised but not used. It can be removed. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20230130195303.138941-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 5a4d1fd1586959578fdcdbbaa687d1f79b88448f Author: Martin Kaiser Date: Mon Jan 30 20:53:00 2023 +0100 staging: r8188eu: legacy_dz is initialised but never used legacy_dz in struct sta_xmit_priv is initialised but not used. It can be removed. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20230130195303.138941-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 9cc5265ac8ed52b5d13684dc36947b3d0856add5 Author: Martin Kaiser Date: Mon Jan 30 20:52:59 2023 +0100 staging: r8188eu: use kernel helper to iterate over a list rtw_free_xmitframe_list iterates over the list of xmit_frames and frees each entry. We can use list_for_each_entry_safe instead of coding this manually. We need the _safe version as the current pxmitframe will be removed from the list by rtw_free_xmitframe. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20230130195303.138941-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit f5a894957063918bac8e05850c6e88eae5c93b6e Author: Martin Kaiser Date: Mon Jan 30 20:52:58 2023 +0100 staging: r8188eu: make sta_pending a list_head We can now change sta_pending in struct tx_servq from __queue to list_head. The driver defines __queue as list_head + spinlock, the spinlock is not used for sta_pending. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20230130195303.138941-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 5bdc94816bf2988e12f16684d9ba6f4ec466581d Author: Martin Kaiser Date: Mon Jan 30 20:52:57 2023 +0100 staging: r8188eu: change another function param from __queue to list_head Modify the rtw_free_xmitframe_queue function to take a list_head pointer instead of a __queue pointer. This is an intermediate step towards changing struct tx_servq's sta_pending from __queue to list_head. Now that the function takes a list instead of a queue, we should also rename it to rtw_free_xmitframe_list. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20230130195303.138941-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 5ae3750cca311cc1ae79e1972b0aa2a68b5ed122 Author: Martin Kaiser Date: Mon Jan 30 20:52:56 2023 +0100 staging: r8188eu: change function param from __queue to list_head Modify the dequeue_xmitframes_to_sleeping_queue function to take a list_head pointer instead of a __queue pointer. This is an intermediate step towards changing struct tx_servq's sta_pending from __queue to list_head. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20230130195303.138941-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 9bd121f827637485fa32237ff90c882f8915fd1b Author: Martin Kaiser Date: Mon Jan 30 20:52:55 2023 +0100 staging: r8188eu: rtw_free_xmitframe_queue needs no spinlock There's no need for a spinlock in rtw_free_xmitframe_queue. This function is called only from rtw_free_stainfo. rtw_free_stainfo holds pxmitpriv->lock during all rtw_free_xmitframe_queue calls. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20230130195303.138941-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 0ac62072cfc846fa2daf8c9f29db49577894a2ad Author: Philipp Hortmann Date: Sun Jan 29 15:59:05 2023 +0100 staging: rtl8192e: Rename TPPoll_CQ, AcmHwCtrl and AcmHw_BeqEn Rename variable TPPoll_CQ to TP_POLL_CQ and AcmHwCtrl to ACM_HW_CTRL and AcmHw_BeqEn to ACM_HW_BEQ_EN to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/f6731b36c0f3f22213436ba01abc8f1c685844ad.1675003608.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 18e203db238e27302e36ac6e64378b57a668c9f9 Author: Philipp Hortmann Date: Sun Jan 29 15:58:57 2023 +0100 staging: rtl8192e: Rename _RTL8192Pci_HW, MXDMA2_NoLimit and TPPoll Rename enum _RTL8192Pci_HW to _RTL8192PCI_HW and variable MXDMA2_NoLimit to MXDMA2_NO_LIMIT and TPPoll to TP_POLL to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/1911a2bf4dfe6633e778d86d3aad1553cb629eb3.1675003608.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit b1266d9233e42d86e1d77b53d979ae9a387c4ca3 Author: Philipp Hortmann Date: Sun Jan 29 15:58:49 2023 +0100 staging: rtl8192e: Remove used constants MSR_LINK_SH.. and MSR_LINK_N.. Remove used constants MSR_LINK_SHIFT = 0 and MSR_LINK_NONE = 0. Use rules a << 0 = a, 0 << 0 = 0 and msr | 0 = msr to remove dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/46bd1f075d5e4d211e1fc827843933907f7fee29.1675003608.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit d48455b0d1741f3cdb98b9395d121059d0869235 Author: Philipp Hortmann Date: Sun Jan 29 15:58:43 2023 +0100 staging: rtl8192e: Remove unused constants in _RTL8192Pci_HW Remove unused constants in and after _RTL8192Pci_HW of r8192E_hw.h. A part of the constants would need to be renamed because of CamelCase on others spaces are missing before and after "<<". Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/7eef6b217c00d123ee7194191209ff3bee707f8c.1675003608.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit a010c5a5dd63c7633db6f6fe0189458af735d720 Author: Philipp Hortmann Date: Sun Jan 29 15:58:36 2023 +0100 staging: rtl8192e: Remove unused constants at beginning of r8192E_hw.h Remove unused constants at beginning of r8192E_hw.h. A part of the constants would need to be renamed because of CamelCase on others spaces are missing before and after "<<". Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/d01232f5ef10eac02abb3f31f2ac6f53614fa954.1675003608.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 04f11af2f0567a08f331a53249065f7a193b0347 Author: Philipp Hortmann Date: Sun Jan 29 15:58:30 2023 +0100 staging: rtl8192e: Rename BaseBand_Config_PHY_REG and BaseBand_Config_AGC_TAB Rename constants BaseBand_Config_PHY_REG to BB_CONFIG_PHY_REG and BaseBand_Config_AGC_TAB to BB_CONFIG_AGC_TAB to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/6d26690c7c2c68cc7c766c981293bd8e40999ed0.1675003608.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 997ee23ba610ac23117a3d1b5ee622a1bbf1cf72 Author: Philipp Hortmann Date: Sun Jan 29 15:58:21 2023 +0100 staging: rtl8192e: Remove unused constants from enum rt_customer_id Remove unused constants from enum rt_customer_id. A part of the constants would need to be renamed because of CamelCase. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/108d80f0ae1006b716205dce0ca9a7ee597ba1dd.1675003608.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 885278a3dd4b3909067dd9bdce36db61adb0f14c Author: Philipp Hortmann Date: Sun Jan 29 15:58:14 2023 +0100 staging: rtl8192e: Remove unused variable rxSNRdB rxSNRdB is initialized and set but never read. Remove dead code. Local variable rx_snrX is then of no use. Remove rx_snrX as well. Local variable tmp_rxsnr is then of no use. Remove tmp_rxsnr as well. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/b3150d506556375c4b155c51eabf79e128f50780.1675003608.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit e38e65eb18ce54bdab7f353cec7e70a2cb07be68 Author: Philipp Hortmann Date: Sun Jan 29 15:58:07 2023 +0100 staging: rtl8192e: Rename sCrcLng Rename constant sCrcLng to S_CRC_LEN to avoid CamelCase which is not accepted by checkpatch. Use S_CRC_LEN instead of fix value with comment to improve readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/b0139a958123881fd04b60110a6889f726d943cc.1675003608.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 59f6f02ead58fe4c825f5129bd219f2d8861872b Author: Philipp Hortmann Date: Sun Jan 29 15:57:59 2023 +0100 staging: rtl8192e: Rename TxBBGainTab.., CCKTxBBGainTab.. and RT_CID_81.. Rename constant TxBBGainTableLength to TX_BB_GAIN_TABLE_LEN, CCKTxBBGainTableLength to CCK_TX_BB_GAIN_TABLE_LEN and RT_CID_819x_Netcore to RT_CID_819X_NETCORE to avoid CamelCase which is not accepted by checkpatch. Added spaces before and after "-" to fix checkpatch message. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/0f390222d1bd272c3e63d1b2936109ac50e9f05f.1675003608.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 436eae7e70ef020afba69cb08ec78432904eb2a0 Author: Rob Herring Date: Wed Jan 25 16:15:12 2023 -0600 dt-bindings: serial: 8250: Fix 'aspeed,lpc-io-reg' differing types The 'aspeed,lpc-io-reg' property is also defined in ipmi/aspeed,ast2400-kcs-bmc.yaml as a 'uint32-array'. Unify it to use 'uint32-array' everywhere. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230125221513.3059177-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit 646b4cd9909aaf2bfb9e05897e9c3871a7385219 Author: Andy Shevchenko Date: Mon Jan 23 21:26:04 2023 +0200 serial: liteuart: Remove a copy of UART id in private structure The struct liteuart_port keeps tracking of UART ID which is also saved in the struct uart_port as line member. Drop the former one and use the latter everywhere. Signed-off-by: Andy Shevchenko Reviewed-by: Gabriel Somlo Link: https://lore.kernel.org/r/20230123192604.81452-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 297cb3f0b94bfedd781426814f1798a5c5658050 Author: Andy Shevchenko Date: Mon Jan 23 21:17:41 2023 +0200 serial: liteuart: Don't mix devm_*() with non-devm_*() calls In the probe we need to call all devm_*() first followed by non-devm_*() calls. This is due to reversed clean up that may happen in a wrong order otherwise. The driver currently allocates xarray before calling devm_platform_get_and_ioremap_resource(). While it's not an issue in this certain case, it's still better to be pedantic. Signed-off-by: Andy Shevchenko Reviewed-by: Gabriel Somlo Link: https://lore.kernel.org/r/20230123191741.79751-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ed35d9dc3a80f874b511c2dd6fea7112a779dacc Author: Sherry Sun Date: Mon Jan 30 14:44:49 2023 +0800 tty: serial: fsl_lpuart: add imx8ulp support The lpuart of imx8ulp is basically the same as imx7ulp, but it supports some new features based on imx7ulp, such as it can assert the DMA request on EOP(end-of-packet). Here add lpuart support for imx8ulp, and rx_watermark is set to 3 as imx8ulp RX FIFO depth is 8. Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20230130064449.9564-7-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit ecba98f9ddf426af337fb8b63d7581c254fe6e87 Author: Sherry Sun Date: Mon Jan 30 14:44:48 2023 +0800 tty: serial: fsl_lpuart: set RTS watermark for lpuart Add RTS watermark support for LPUART. The RX RTS_B output negates when the number of empty words in the receive FIFO is greater or equal to RTSWATER. Here set the RTSWATER to half of the rxfifo_size. Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20230130064449.9564-6-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit 96f54fd4894711b0dce6a1c8c26c882295dc9234 Author: Sherry Sun Date: Mon Jan 30 14:44:47 2023 +0800 tty: serial: fsl_lpuart: Enable Receiver Idle Empty function for LPUART With the growth of rx watermark, it's useful to enable the Receiver Idle Empty function, it can assert the RDRF(Receive Data Register Full Flag) when the receiver is idle for a number of idle characters and the FIFO is not empty. It will generate a DMA request or interrupt, which can avoid receive data being trapped in the RX FIFO since the number of words received is less than the watermark. Here set the RXIDEN as 0x3 which enable the RDRF assertion due to partially filled FIFO when receiver is idle for 4 characters. Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20230130064449.9564-5-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit 9ad9df8447547febe9dd09b040f4528a09e495f0 Author: Sherry Sun Date: Mon Jan 30 14:44:46 2023 +0800 tty: serial: fsl_lpuart: Fix the wrong RXWATER setting for rx dma case The RXWATER value must be greater than 0 according to the LPUART reference manual. And when the number of datawords in the receive FIFO is greater than RXWATER, an interrupt or a DMA request is generated, so no need to set the different value for lpuart interrupt case and dma case. Here delete the wrong RXWATER setting for dma case directly. Fixes: 42b68768e51b ("serial: fsl_lpuart: DMA support for 32-bit variant") Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20230130064449.9564-4-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit 7c0105901778500f6d11ddfd99f6efa1987c37a6 Author: Sherry Sun Date: Mon Jan 30 14:44:45 2023 +0800 tty: serial: fsl_lpuart: set receive watermark for imx8qxp platform Since imx8qxp RX FIFO depth is 64 datawords, it will be better to set the rx watermark as 31, which means when the number of datawords in the receive FIFO(>= 32) is greater than the watermark, an interrupt or a DMA request is generated. Also keep the console rx watermark as 1 to make sure it responsive. Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20230130064449.9564-3-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit 34ebb26f12a84b744f43c5c4869516f122a2dfaa Author: Sherry Sun Date: Mon Jan 30 14:44:44 2023 +0800 tty: serial: fsl_lpuart: make rx_watermark configurable for different platforms Add rx_watermark parameter for struct lpuart_port to make the receive watermark configurable for different platforms. No function changed. Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20230130064449.9564-2-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit 8a79052c329ed7d738411286dba8c5896fa96140 Author: Sherry Sun Date: Mon Jan 30 13:41:07 2023 +0800 tty: serial: fsl_lpuart: don't enable receiver/transmitter before rx/tx dma ready lpuart32_setup_watermark_enable() will configure the UART FIFO and watermark, also enable the receiver and transmitter, this should be done after the rx/tx dma steup ready. Also add lpuart32_hw_disable() to make sure the receiver/transmitter and interrupts are disabled during the dma steup. Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20230130054107.9119-1-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit 49814e2c9c5776c7dc7cfd151aba15bd91804c3c Author: Christophe JAILLET Date: Sun Jan 29 19:23:10 2023 +0100 usb: early: xhci-dbc: Use memcpy_and_pad() Instead of zeroing some memory and then copying data in part or all of it, use memcpy_and_pad(). This avoids writing some memory twice and should save a few cycles. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/b447a7e9778d3f9e6997eb9494f1687dc2d5d3bf.1675016180.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit e662c16f822fe93ae11769cffb8bf0d867417633 Author: Christophe JAILLET Date: Sun Jan 29 19:23:09 2023 +0100 usb: early: xhci-dbc: Optimize early_xdbc_write() There is no point in zeroing 'buf'. It would be cleared only once, and if the 'while' loop is executed several times, all but the first run would have a 'dirty' buffer. Moreover, the size of the chunk is computed in the loop and this size is passed to xdbc_bulk_write(). So remove this useless memset(). Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/687bbcd940c59fbddd0e3a8b578fd3422962e50f.1675016180.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit a4a97ab3db5c081eb6e7dba91306adefb461e0bd Author: Christophe JAILLET Date: Sun Jan 29 19:23:08 2023 +0100 usb: early: xhci-dbc: Fix a potential out-of-bound memory access If xdbc_bulk_write() fails, the values in 'buf' can be anything. So the string is not guaranteed to be NULL terminated when xdbc_trace() is called. Reserve an extra byte, which will be zeroed automatically because 'buf' is a static variable, in order to avoid troubles, should it happen. Fixes: aeb9dd1de98c ("usb/early: Add driver for xhci debug capability") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/d6a7562c5e839a195cee85db6dc81817f9372cb1.1675016180.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 33bb1a9459989ef501bda9b127b38173fb2224c9 Author: Fabien Parent Date: Wed Jan 25 15:35:00 2023 +0100 dt-bindings: usb: mediatek,mtk-xhci: add MT8365 SoC bindings Add binding documentation for the MT8365 SoC. Signed-off-by: Fabien Parent [bero@baylibre.com: Cleanups suggested by reviewers] Signed-off-by: Bernhard Rosenkränzer Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Reviewed-by: Chunfeng Yun Link: https://lore.kernel.org/r/20230125143503.1015424-7-bero@baylibre.com Signed-off-by: Greg Kroah-Hartman commit 903261c68b947cd0c70a32dd671839e9034c0fdb Author: Fabien Parent Date: Wed Jan 25 15:34:59 2023 +0100 dt-bindings: usb: mediatek,mtu3: add MT8365 SoC bindings Add binding documentation for the MT8365 SoC. Signed-off-by: Fabien Parent Acked-by: Krzysztof Kozlowski Signed-off-by: Bernhard Rosenkränzer Reviewed-by: Matthias Brugger Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Chunfeng Yun Link: https://lore.kernel.org/r/20230125143503.1015424-6-bero@baylibre.com Signed-off-by: Greg Kroah-Hartman commit 3a1bd0494352bd89ec50ee595ababfe180f2d63e Author: Alexander Stein Date: Mon Jan 30 10:41:51 2023 +0100 usb: chipidea: ci_hdrc_imx: use dev_err_probe Add error message if finding USB PHY fails or is deferred. Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20230130094151.95174-1-alexander.stein@ew.tq-group.com Signed-off-by: Greg Kroah-Hartman commit e225947035bcd15f95e6f340e708fa37f309c2c3 Author: Konrad Dybcio Date: Mon Jan 30 12:31:50 2023 +0100 dt-bindings: usb: fsa4480: Use generic node name Node names should be generic. Change fsa4480@ to typec-mux@. Fixes: 01afa882f12d ("dt-bindings: usb: Add binding for fcs,fsa4480") Signed-off-by: Konrad Dybcio Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230130113151.2130063-1-konrad.dybcio@linaro.org Signed-off-by: Greg Kroah-Hartman commit c2c304dfc983060085c92153071d0e0f4cb12a37 Author: Jonathan Neuschäfer Date: Sun Jan 29 13:42:58 2023 +0100 dt-bindings: usb: phy: nop: Fix a typo ("specifiy") Spell it correctly as "specify". Signed-off-by: Jonathan Neuschäfer Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230129124258.1295503-1-j.neuschaefer@gmx.net Signed-off-by: Greg Kroah-Hartman commit d4f6b987f3986ea67bf8ac5fbf5923bd681c8761 Author: Krzysztof Kozlowski Date: Fri Jan 27 22:17:48 2023 +0100 dt-bindings: usb: samsung,exynos-dwc3: allow unit address in DTS The Samsung Exynos SoC USB 3.0 DWC3 Controller is a simple wrapper of actual DWC3 Controller device node. It handles necessary Samsung Exynos-specific resources (regulators, clocks), but does not have its own MMIO address space. However neither simple-bus bindings nor dtc W=1 accept device nodes in soc@ node which do not have unit address. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230127211748.260718-1-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 21ef9c91f0ab4f11d31fddbdc6d886fed114be74 Author: Yang Yingliang Date: Mon Jan 30 20:06:33 2023 +0800 usb: fotg210: fix return value check in fotg210_probe() devm_platform_get_and_ioremap_resource() never returns NULL pointer, it will return ERR_PTR() when it fails, so replace the check with IS_ERR(). Fixes: baef5330d35b ("usb: fotg210: Acquire memory resource in core") Signed-off-by: Yang Yingliang Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230130120633.3342285-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 8cb9c36b812591e36405708d0ee693b1c135fcbd Author: Anand Moon Date: Mon Jan 30 08:47:43 2023 +0000 dt-bindings: usb: vialab,vl817: Cleanup compatible, reset-gpios and required Cleanup by removing unneeded quotes from refs and add maxItems to reset-gpios and fix the required list. Fixes: 31360c28dfdd ("dt-bindings: usb: Add binding for Via lab VL817 hub controller") Signed-off-by: Anand Moon Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230130084744.2539-5-linux.amoon@gmail.com Signed-off-by: Greg Kroah-Hartman commit ff826648e1059606f8418f12b69a4b15a1eed1ba Author: Mark Tomlinson Date: Fri Jan 27 15:47:34 2023 +1300 USB: MAX3421: Handle USB NAK correctly A USB peripheral can respond with a NAK if it is not yet ready to send/receive data. In this case, the transaction should be retried. The MAX3421 driver did do this, and switched to a different type of retry after a number of 'fast' retries. On at least some USB flash devices, this second type of retry never succeeds. This patch changes the behaviour so that 'fast' retries continue. Signed-off-by: Mark Tomlinson Link: https://lore.kernel.org/r/20230127024734.8777-1-mark.tomlinson@alliedtelesis.co.nz Signed-off-by: Greg Kroah-Hartman commit 7194e5e0907b802ca76c9297399ab540fbf0513d Author: Krzysztof Kozlowski Date: Fri Jan 27 13:11:22 2023 +0100 dt-bindings: usb: qcom,dwc3: allow required-opps Few Qualcomm SoCs require minimum performance level of power domain, so allow it: sm8550-mtp.dtb: usb@a6f8800: 'required-opps' does not match any of the regexes: '^usb@[0-9a-f]+$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Abel Vesa Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230127121122.342191-1-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 582cef438551ca6373f8c3901a15947b2c9643b9 Author: Andy Shevchenko Date: Fri Jan 27 13:26:38 2023 +0200 usg: gadget: Move validation out of lock in webusb_bcdVersion_store() Validation has nothing to do with any protected data, move it out of the lock and make code neater. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230127112638.84806-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 2bf40502badf9bc15a487244dd23ce0b08c306c0 Author: Andy Shevchenko Date: Wed Jan 25 16:34:25 2023 +0200 usb: gadget: Use correct APIs and data types for UUID handling We have two types for UUIDs depending on the byte ordering. Instead of explaining how bytes should go over the wire, use dedicated APIs and data types. This removes a confusion over the byte ordering. Signed-off-by: Andy Shevchenko Tested-By: Jó Ágila Bitsch Link: https://lore.kernel.org/r/20230125143425.85268-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit e4157519ad46c7bd81b1c1e76d634aa0033d00e5 Author: Randy Dunlap Date: Thu Jan 26 22:40:02 2023 -0800 Documentation: usb: correct spelling Correct spelling problems for Documentation/usb/ as reported by codespell. Signed-off-by: Randy Dunlap Cc: linux-usb@vger.kernel.org Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20230127064005.1558-33-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 6831582937bd23fc1640e6f65620ebf75b3b9ef4 Author: Nick Child Date: Fri Jan 27 15:43:58 2023 -0600 ibmvnic: Toggle between queue types in affinity mapping Previously, ibmvnic IRQs were assigned to CPU numbers by assigning all the IRQs for transmit queues then assigning all the IRQs for receive queues. With multi-threaded processors, in a heavy RX or TX environment, physical cores would either be overloaded or underutilized (due to the IRQ assignment algorithm). This approach is sub-optimal because IRQs for the same subprocess (RX or TX) would be bound to adjacent CPU numbers, meaning they were more likely to be contending for the same core. For example, in a system with 64 CPU's and 32 queues, the IRQs would be bound to CPU in the following pattern: IRQ type | CPU number ----------------------- TX0 | 0-1 TX1 | 2-3 RX0 | 32-33 RX1 | 34-35 Observe that in SMT-8, the first 4 tx queues would be sharing the same core. A more optimal algorithm would balance the number RX and TX IRQ's across the physical cores. Therefore, to increase performance, distribute RX and TX IRQs across cores by alternating between assigning IRQs for RX and TX queues to CPUs. With a system with 64 CPUs and 32 queues, this results in the following pattern: IRQ type | CPU number ----------------------- TX0 | 0-1 RX0 | 2-3 TX1 | 4-5 RX1 | 6-7 Observe that in SMT-8, there is equal distribution of RX and TX IRQs per core. In the above case, each core handles 2 TX and 2 RX IRQ's. Signed-off-by: Nick Child Reviewed-by: Haren Myneni Link: https://lore.kernel.org/r/20230127214358.318152-1-nnac123@linux.ibm.com Signed-off-by: Paolo Abeni commit 2d83eb5d24e1c8dba386928fcbf76d3b581a632d Author: Michael Grzeschik Date: Fri Jan 27 00:14:56 2023 +0100 usb: uvc: use v4l2_fill_fmtdesc instead of open coded format name Since v4l2_fill_fmtdesc will be called in the ioctl v4l_enum_fmt anyway. We can set the format description and compressed flag from v4l_fill_fmtdesc and can remove the extra name field in uvc_format_desc. Reviewed-by: Daniel Scally Tested-by: Daniel Scally Signed-off-by: Michael Grzeschik Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20230126231456.3402323-6-m.grzeschik@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 8ecb17a86c0fbb86ea9fb4fa26e742600e945794 Author: Michael Grzeschik Date: Fri Jan 27 00:14:55 2023 +0100 usb: uvc: make uvc_format_desc table const Since the uvc_fmts array can not be modified we declare it const and change every user of the uvc_format_by_guid function aswell. Reviewed-by: Laurent Pinchart Reviewed-by: Daniel Scally Tested-by: Daniel Scally Signed-off-by: Michael Grzeschik Link: https://lore.kernel.org/r/20230126231456.3402323-5-m.grzeschik@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 466be4c9a6f0b7810991b4ac6c3e55345ea63954 Author: Michael Grzeschik Date: Fri Jan 27 00:14:54 2023 +0100 usb: uvc: move uvc_fmts and uvc_format_by_guid to own compile unit The media driver USB_VIDEO_CLASS and USB_F_UVC are using the same function uvc_format_by_guid. Since the function is inline, every user will get a copy of the used uvc_fmts array and the function. This patch moves the code to an own compile unit and add this dependency as UVC_COMMON to both users. Reviewed-by: Laurent Pinchart Reviewed-by: Daniel Scally Tested-by: Daniel Scally Signed-off-by: Michael Grzeschik Link: https://lore.kernel.org/r/20230126231456.3402323-4-m.grzeschik@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit e1d5d71d189f290343fb1f18eecf77335c5d1ef3 Author: Michael Grzeschik Date: Fri Jan 27 00:14:53 2023 +0100 usb: uvc: move media/v4l2-uvc.h to usb/uvc.h Since the headerfile is only used in usb devices it is better placed with the other usb files. Reviewed-by: Laurent Pinchart Reviewed-by: Daniel Scally Tested-by: Daniel Scally Signed-off-by: Michael Grzeschik Link: https://lore.kernel.org/r/20230126231456.3402323-3-m.grzeschik@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 015d44c2b700ba9639dd29672ba362796cc0be54 Author: Marek Vasut Date: Fri Jan 27 00:14:52 2023 +0100 media: uvcvideo: Add GUID for BGRA/X 8:8:8:8 The Cypress EZUSB FX3 UVC example can be configured to report pixel format "e436eb7e-524f-11ce-9f53-0020af0ba770". This is its GUID for BGRA/X 8:8:8:8. The UVC 1.5 spec [1] only defines GUIDs for YUY2, NV12, M420 and I420. This seems to be an extension documented in the Microsoft Windows Media Format SDK[2]. This Media Format SDK defines this GUID as corresponding to `MEDIASUBTYPE_RGB32`, which is confirmed by [4] as `MEDIASUBTYPE_ARGB32` has different GUID. Note that in my case, the FX3 UVC can output either channel order, BGR or RGB or any other mix for that matter. Since Linux commit 1b8dc32286a1a ("[media] uvcvideo: Add GUID for BGR 8:8:8") defined a GUID for `MEDIASUBTYPE_RGB24` channel order as BGR, keep this change consistent and define `MEDIASUBTYPE_RGB32` as BGR as well. Document [3] also indicates the channel order is BGR. [1] https://www.usb.org/document-library/video-class-v15-document-set [2] https://learn.microsoft.com/en-us/windows/win32/wmformat/media-type-identifiers [3] https://learn.microsoft.com/en-us/windows/win32/directshow/uncompressed-rgb-video-subtypes [4] https://gix.github.io/media-types/ Signed-off-by: Marek Vasut Reviewed-by: Laurent Pinchart Reviewed-by: Ricardo Ribalda Signed-off-by: Michael Grzeschik Link: https://lore.kernel.org/r/20230126231456.3402323-2-m.grzeschik@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 745656a39ee40e2888ffb1a108511be296e267e9 Merge: c52c9acc415eb b839212988575 Author: Greg Kroah-Hartman Date: Tue Jan 31 09:35:41 2023 +0100 Merge tag 'media-uvc-next-20230115' of git://git.kernel.org/pub/scm/linux/kernel/git/pinchartl/linux into usb-next Merge in this tag from the media tree so that future USB uvc patches will apply properly. Signed-off-by: Greg Kroah-Hartman * tag 'media-uvc-next-20230115' of git://git.kernel.org/pub/scm/linux/kernel/git/pinchartl/linux: (27 commits) media: uvcvideo: Silence memcpy() run-time false positive warnings media: uvcvideo: Quirk for autosuspend in Logitech B910 and C910 media: uvcvideo: Fix race condition with usb_kill_urb media: uvcvideo: Use standard names for menus media: uvcvideo: Fix power line control for Lenovo Integrated Camera media: uvcvideo: Refactor power_line_frequency_controls_limited media: uvcvideo: Refactor uvc_ctrl_mappings_uvcXX media: uvcvideo: Implement mask for V4L2_CTRL_TYPE_MENU media: uvcvideo: Extend documentation of uvc_video_clock_decode() media: uvcvideo: Limit power line control for Acer EasyCamera media: uvcvideo: Refactor __uvc_ctrl_add_mapping media: uvcvideo: Fix handling on Bitmask controls media: uvcvideo: Do not return positive errors in uvc_query_ctrl() media: uvcvideo: Return -EACCES for Wrong state error media: uvcvideo: Improve error logging in uvc_query_ctrl() media: uvcvideo: Check for INACTIVE in uvc_ctrl_is_accessible() media: uvcvideo: Factor out usb_string() calls media: uvcvideo: Limit power line control for Acer EasyCamera media: uvcvideo: Recover stalled ElGato devices media: uvcvideo: Remove void casting for the status endpoint ... commit 372a0d7856be29671fc03e2f28ac27114e8c6805 Author: Miquel Raynal Date: Mon Jan 30 17:29:24 2023 +0100 ALSA: doc: Fix PCM interface section typos Fix two mistakes in the PCM interface section: 1/ Members of the snd_pcm_hardware structure are channels_{min,max} and not channel_{min,max} (mind the 's'). 2/ Another sentence is incomplete as the reference to one structure member (period_bytes_max) is missing. There is no relevant 'Fixes:' tag to apply as both typos predate the Git era. Signed-off-by: Miquel Raynal Reviewed-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230130162924.119389-1-miquel.raynal@bootlin.com Signed-off-by: Takashi Iwai commit d8dc8720468a6585120740529d085118c27a85c2 Author: Takashi Sakamoto Date: Mon Jan 30 23:15:32 2023 +0900 ALSA: firewire-lib: fix uninitialized local variable The function local variable, curr_cycle_time is declared without initialization. When tracepoints event is not probed, it looks to be used as is. This commit fixes it. Fortunately, the value of local variable is not used unless the event is probed, thus this commit is for better coding. Reported-by: Dan Carpenter Fixes: fef4e61b0b76 ("ALSA: firewire-lib: extend tracepoints event including CYCLE_TIME of 1394 OHCI") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230130141532.102838-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit ae3147bb301d5da9de897300515fe0cfbd6e2aca Merge: 3f0f5d224c759 7c355b572ecdc Author: Arnd Bergmann Date: Tue Jan 31 09:15:15 2023 +0100 Merge tag 'imx-soc-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/soc i.MX SoC update for 6.3: - Call ida_simple_remove() to free up ID allocated by ida_simple_get() for MMDC driver. - Add i.MX6ULZ compatible string to match table. * tag 'imx-soc-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx: mach-imx6ul: add imx6ulz support ARM: imx: Call ida_simple_remove() for ida_simple_get Link: https://lore.kernel.org/r/20230130023947.11780-2-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 3f0f5d224c7594d33e9ac1d4a014cedfd6f42f9f Merge: 521d844dc85a8 fe6a952b567f6 Author: Arnd Bergmann Date: Tue Jan 31 09:14:14 2023 +0100 Merge tag 'samsung-soc-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/soc Samsung mach/soc changes for v6.3 1. Correct s3c64xx_set_timer_source() prototype. 2. Re-work MIPI and DP phys as children of Exynos PMU system controller. This both better reflects actual device hierarchy and allows to remove later few warnings from dtc W=1 and dtbs_check. * tag 'samsung-soc-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: dt-bindings: soc: samsung: exynos-pmu: allow phys as child ARM: s3c: fix s3c64xx_set_timer_source prototype Link: https://lore.kernel.org/r/20230129143944.5104-3-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 521d844dc85a8d6c01a3d0faf4809113f1f7beaf Merge: b22fbaa707fc2 a46674396189d Author: Arnd Bergmann Date: Tue Jan 31 09:13:31 2023 +0100 Merge tag 'arm-soc/for-6.3/soc' of https://github.com/Broadcom/stblinux into arm/soc This pull request contains Broadcom ARM SoCs machine updates for 6.3, please pull the following: - Dario removes an useless goto in the BCM63xx SMP bring up code * tag 'arm-soc/for-6.3/soc' of https://github.com/Broadcom/stblinux: ARM: BCM63xx: remove useless goto statement Link: https://lore.kernel.org/r/20230128193849.1628945-1-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit 90be1f15c39858a4f0f4346c39fa150697d231c1 Author: Greg Kroah-Hartman Date: Mon Jan 30 18:10:59 2023 +0100 driver core: soc: remove layering violation for the soc_bus The soc_bus code pokes around in the internal bus structures assuming that it "knows" if a field is not set that it has not been registered yet. That isn't a safe assumption, so just remove the layering violation entirely and keep track if the bus has been registered or not ourselves. Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230130171059.1784057-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit f6fae7ab6d9ad5aa49204264c39351debf865bd9 Merge: 7d576289b276a 06f985d227d07 Author: Arnd Bergmann Date: Tue Jan 31 09:08:26 2023 +0100 Merge tag 'imx-defconfig-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/defconfig i.MX defconfig change for 6.3: - Drop PROVE_LOCKING option from imx_v6_v7_defconfig. - Enable i.MX ICC and DEVFREQ driver as they are required by i.MX8MP boot. * tag 'imx-defconfig-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx_v6_v7_defconfig: Don't enable PROVE_LOCKING arm64: defconfig: select i.MX ICC and DEVFREQ Link: https://lore.kernel.org/r/20230130023947.11780-6-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 7d576289b276af01dc7391429907375e4bd39fe7 Merge: 7ba26a7201cbf 0207a7dea8b3c Author: Arnd Bergmann Date: Tue Jan 31 09:07:50 2023 +0100 Merge tag 'arm-soc/for-6.3/defconfig' of https://github.com/Broadcom/stblinux into soc/defconfig This pull request contains Broadcom ARM SoCs defconfig updates for 6.3, please pull the following: - Stefan enables the necessary configuration options to make use of the framebuffer on Raspberry Pi devices * tag 'arm-soc/for-6.3/defconfig' of https://github.com/Broadcom/stblinux: ARM: bcm2835_defconfig: Switch to SimpleDRM ARM: bcm2835_defconfig: Enable the framebuffer Link: https://lore.kernel.org/r/20230128193823.1628716-1-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit 7ba26a7201cbfb067991dc988fecd59476be14f2 Merge: b6a60b49bb00d eb20e7cb91ba3 Author: Arnd Bergmann Date: Tue Jan 31 09:07:17 2023 +0100 Merge tag 'sunxi-config-for-6.3-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into soc/defconfig - Enable Allwinner D1 platform and drivers * tag 'sunxi-config-for-6.3-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: riscv: defconfig: Enable the Allwinner D1 platform and drivers Link: https://lore.kernel.org/r/Y9Ra7dxkfMI9Xp3F@jernej-laptop Signed-off-by: Arnd Bergmann commit 6755dee8343cbc4af45e001d904c9a857a451bec Author: Arnd Bergmann Date: Thu Jan 26 17:15:59 2023 +0100 cc2520: move to gpio descriptors cc2520 supports both probing from static platform_data and from devicetree, but there have never been any definitions of the platform data in the mainline kernel, so it's safe to assume that only the DT path is used. After folding cc2520_platform_data into the driver itself, the GPIO handling can be simplified by moving to the modern gpiod interface. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230126161658.2983292-1-arnd@kernel.org Signed-off-by: Stefan Schmidt commit 6a8ab436831d16cb8c732bc0247ddd0fa9b668ce Merge: 3c1dc22162d67 8dccdd277e0b0 Author: Jakub Kicinski Date: Mon Jan 30 21:07:22 2023 -0800 Merge branch 'add-support-for-the-the-vsc7512-internal-copper-phys' Colin Foster says: ==================== add support for the the vsc7512 internal copper phys This patch series is a continuation to add support for the VSC7512: https://patchwork.kernel.org/project/netdevbpf/list/?series=674168&state=* That series added the framework and initial functionality for the VSC7512 chip. Several of these patches grew during the initial development of the framework, which is why v1 will include changelogs. It was during v9 of that original MFD patch set that these were dropped. With that out of the way, the VSC7512 is mainly a subset of the VSC7514 chip. The 7512 lacks an internal MIPS processor, but otherwise many of the register definitions are identical. That is why several of these patches are simply to expose common resources from drivers/net/ethernet/mscc/*. This patch only adds support for the first four ports (swp0-swp3). The remaining ports require more significant changes to the felix driver, and will be handled in the future. ==================== Link: https://lore.kernel.org/r/20230127193559.1001051-1-colin.foster@in-advantage.com Signed-off-by: Jakub Kicinski commit 8dccdd277e0b0df14957ad0704e0f7b8bad3d248 Author: Colin Foster Date: Fri Jan 27 11:35:59 2023 -0800 mfd: ocelot: add external ocelot switch control Utilize the existing ocelot MFD interface to add switch functionality to the Microsemi VSC7512 chip. Signed-off-by: Colin Foster Acked-for-MFD-by: Lee Jones Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean # regression Signed-off-by: Jakub Kicinski commit 3d7316ac81ac329efce221b5584138e8c637a7b1 Author: Colin Foster Date: Fri Jan 27 11:35:58 2023 -0800 net: dsa: ocelot: add external ocelot switch control Add control of an external VSC7512 chip. Currently the four copper phy ports are fully functional. Communication to external phys is also functional, but the SGMII / QSGMII interfaces are currently non-functional. Signed-off-by: Colin Foster Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean # regression Signed-off-by: Jakub Kicinski commit 11fc80cbb225a96ecc385f1612db8b6f7fdcbca1 Author: Colin Foster Date: Fri Jan 27 11:35:57 2023 -0800 dt-bindings: mfd: ocelot: add ethernet-switch hardware support The main purpose of the Ocelot chips are the Ethernet switching functionalities. Document the support for these features. Signed-off-by: Colin Foster Reviewed-by: Rob Herring Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean # regression Signed-off-by: Jakub Kicinski commit dd43f5e7684ca5666bc7ec298eb15951ae693fb5 Author: Colin Foster Date: Fri Jan 27 11:35:56 2023 -0800 dt-bindings: net: mscc,vsc7514-switch: add dsa binding for the vsc7512 The VSC7511, VSC7512, VSC7513 and VSC7514 all have the ability to be controlled either internally by a memory-mapped CPU, or externally via interfaces like SPI and PCIe. The internal CPU of the VSC7511 and 7512 don't have the resources to run Linux, so must be controlled via these external interfaces in a DSA configuration. Add mscc,vsc7512-switch compatible string to indicate that the chips are being controlled externally in a DSA configuration. Signed-off-by: Colin Foster Reviewed-by: Rob Herring Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean # regression Signed-off-by: Jakub Kicinski commit fde0b6ced8ed8130f2f1d69052539f0130345d6e Author: Colin Foster Date: Fri Jan 27 11:35:55 2023 -0800 mfd: ocelot: prepend resource size macros to be 32-bit The *_RES_SIZE macros are initally <= 0x100. Future resource sizes will be upwards of 0x200000 in size. To keep things clean, fully align the RES_SIZE macros to 32-bit to do nothing more than make the code more consistent. Signed-off-by: Colin Foster Acked-for-MFD-by: Lee Jones Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean # regression Signed-off-by: Jakub Kicinski commit de879a016a94a670fafeb3eb03b3d5803d81ab37 Author: Colin Foster Date: Fri Jan 27 11:35:54 2023 -0800 net: dsa: felix: add functionality when not all ports are supported When the Felix driver would probe the ports and verify functionality, it would fail if it hit single port mode that wasn't supported by the driver. The initial case for the VSC7512 driver will have physical ports that exist, but aren't supported by the driver implementation. Add the OCELOT_PORT_MODE_NONE macro to handle this scenario, and allow the Felix driver to continue with all the ports that are currently functional. Signed-off-by: Colin Foster Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean # regression Signed-off-by: Jakub Kicinski commit dc454fa4b764ab75038e822dfc9a1b2526757a63 Author: Colin Foster Date: Fri Jan 27 11:35:53 2023 -0800 net: dsa: felix: add support for MFD configurations The architecture around the VSC7512 differs from existing felix drivers. In order to add support for all the chip's features (pinctrl, MDIO, gpio) the device had to be laid out as a multi-function device (MFD). One difference between an MFD and a standard platform device is that the regmaps are allocated to the parent device before the child devices are probed. As such, there is no need for felix to initialize new regmaps in these configurations, they can simply be requested from the parent device. Add support for MFD configurations by performing this request from the parent device. Signed-off-by: Colin Foster Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean # regression Signed-off-by: Jakub Kicinski commit 1dc6a2a02320dab136c5f2e94b39dbb85f9e698c Author: Colin Foster Date: Fri Jan 27 11:35:52 2023 -0800 net: dsa: felix: add configurable device quirks The define FELIX_MAC_QUIRKS was used directly in the felix.c shared driver. Other devices (VSC7512 for example) don't require the same quirks, so they need to be configured on a per-device basis. Signed-off-by: Colin Foster Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Tested-by: Vladimir Oltean # regression Signed-off-by: Jakub Kicinski commit 2efaca411c96784272699622b7afadcc6c6c0036 Author: Colin Foster Date: Fri Jan 27 11:35:51 2023 -0800 net: mscc: ocelot: expose vsc7514_regmap definition The VSC7514 target regmap is identical for ones shared with similar hardware, specifically the VSC7512. Share this resource, and change the name to match the pattern of other exported resources. Signed-off-by: Colin Foster Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean # regression Signed-off-by: Jakub Kicinski commit b67f5502136f1c0761fb88e8412711d7a4a800d4 Author: Colin Foster Date: Fri Jan 27 11:35:50 2023 -0800 net: mscc: ocelot: expose ocelot_reset routine Resetting the switch core is the same whether it is done internally or externally. Move this routine to the ocelot library so it can be used by other drivers. Signed-off-by: Colin Foster Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean # regression Signed-off-by: Jakub Kicinski commit beb9a74e0bf72d514210447a31520805f717963d Author: Colin Foster Date: Fri Jan 27 11:35:49 2023 -0800 net: mscc: ocelot: expose vcap_props structure The vcap_props structure is common to other devices, specifically the VSC7512 chip that can only be controlled externally. Export this structure so it doesn't need to be recreated. Signed-off-by: Colin Foster Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean # regression Signed-off-by: Jakub Kicinski commit 728d8019f1a38891ad72a1f21b5ac35691e8aae7 Author: Colin Foster Date: Fri Jan 27 11:35:48 2023 -0800 net: mscc: ocelot: expose regfield definition to be used by other drivers The ocelot_regfields struct is common between several different chips, some of which can only be controlled externally. Export this structure so it doesn't have to be duplicated in these other drivers. Rename the structure as well, to follow the conventions of other shared resources. Signed-off-by: Colin Foster Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Tested-by: Vladimir Oltean # regression Signed-off-by: Jakub Kicinski commit c6a9321b08111c0e0b4c2499ce7e82765fa680b6 Author: Colin Foster Date: Fri Jan 27 11:35:47 2023 -0800 net: mscc: ocelot: expose ocelot wm functions Expose ocelot_wm functions so they can be shared with other drivers. Signed-off-by: Colin Foster Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Tested-by: Vladimir Oltean # regression Signed-off-by: Jakub Kicinski commit 3c1dc22162d673d595855d24f95200ed2643f88f Author: Frank Sae Date: Sat Jan 28 14:35:58 2023 +0800 net: phy: motorcomm: change the phy id of yt8521 and yt8531s to lowercase The phy id is usually defined in lower case. Signed-off-by: Frank Sae Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230128063558.5850-2-Frank.Sae@motor-comm.com Signed-off-by: Jakub Kicinski commit 4104a713204d62aca482eebb0c6226d82a0721eb Author: Frank Sae Date: Sat Jan 28 14:35:57 2023 +0800 net: phy: fix the spelling problem of Sentinel CHECK: 'sentinal' may be misspelled - perhaps 'sentinel'? Signed-off-by: Frank Sae Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230128063558.5850-1-Frank.Sae@motor-comm.com Signed-off-by: Jakub Kicinski commit 2083656bb30df231caad56abb4f1c2a6366f5923 Author: Jakub Kicinski Date: Fri Jan 27 23:31:08 2023 -0800 sh: checksum: add missing linux/uaccess.h include SuperH does not include uaccess.h, even tho it calls access_ok(). Fixes: 68f4eae781dd ("net: checksum: drop the linux/uaccess.h include") Reviewed-by: Simon Horman Tested-by: Simon Horman Link: https://lore.kernel.org/r/20230128073108.1603095-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 1586f31e30ed041650e32147e79bb0837a42e11d Author: Jiapeng Chong Date: Sat Jan 28 17:04:13 2023 +0800 net: b44: Remove the unused function __b44_cam_read() The function __b44_cam_read() is defined in the b44.c file, but not called elsewhere, so remove this unused function. drivers/net/ethernet/broadcom/b44.c:199:20: warning: unused function '__b44_cam_read'. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3858 Signed-off-by: Jiapeng Chong Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230128090413.79824-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 68d8ad3bd9c397f2bf009368cb13e48cb91ea018 Author: Konrad Dybcio Date: Mon Jan 16 10:38:42 2023 +0100 dt-bindings: opp: v2-qcom-level: Let qcom,opp-fuse-level be a 2-long array In some instances (particularly with CPRh) we might want to specifiy more than one qcom,opp-fuse-level, as the same OPP subnodes may be used by different "CPR threads". We need to make sure that n = num_threads entries is legal and so far nobody seems to use more than two, so let's allow that. Acked-by: Rob Herring Signed-off-by: Konrad Dybcio Signed-off-by: Viresh Kumar commit f741db1a5171ebb93289258e64e69c2a780e3103 Author: Jianbo Liu Date: Mon Nov 28 00:55:16 2022 +0000 net/mlx5e: kTLS, Improve connection rate by using fast update encryption key As the fast DEK update is fully implemented, use it for kTLS to get better performance. TIS pool was already supported to recycle the TISes. With this series and TIS pool, TLS CPS is improved by 9x higher, from 11k/s to 101k/s. Signed-off-by: Jianbo Liu Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 8a6fa6df61ffc44681727ee05f051fd6df420a81 Author: Jianbo Liu Date: Mon Apr 25 03:17:47 2022 +0000 net/mlx5: Keep only one bulk of full available DEKs One bulk with full available keys is left undestroyed, to service the possible requests from users quickly. Signed-off-by: Jianbo Liu Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 12a9e1b73db00d38d0953c2fd45bd2854c34880a Author: Jianbo Liu Date: Mon Apr 25 03:17:47 2022 +0000 net/mlx5: Add async garbage collector for DEK bulk After invalidation, the idle bulk with all DEKs available for use, is destroyed, to free keys and mem. To get better performance, the firmware destruction operation is done asynchronously. So idle bulks are enqueued in destroy_list first, then destroyed in system workqueue. This will improve performance, as the destruction doesn't need to hold pool's mutex. Signed-off-by: Jianbo Liu Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 709f07fe1a595dae3c891e18f8dca297402f95ea Author: Jianbo Liu Date: Wed Mar 16 02:06:22 2022 +0000 net/mlx5: Reuse DEKs after executing SYNC_CRYPTO command To fast update encryption keys, those freed keys with need_sync bit 1 and in_use bit 0 in a bulk, can be recycled. The keys are cached internally by the NIC, so invalidating internal NIC caches by SYNC_CRYPTO command is required before reusing them. A threshold in driver is added to avoid invalidating for every update. Only when the number of DEKs, which need to be synced, is over this threshold, the sync process will start. Besides, it is done in system workqueue. After SYNC_CRYPTO command is executed successfully, the bitmaps of each bulk must be reset accordingly, so that the freed DEKs can be reused. From the analysis in previous patch, the number of reused DEKs can be calculated by hweight_long(need_sync XOR in_use), and the need_sync bits can be reset by simply copying from in_use bits. Two more list (avail_list and sync_list) are added for each pool. The avail_list is for a bulk when all bits in need_sync are reset after sync. If there is no avail deks, and all are be freed by users, the bulk is moved to sync_list, instead of being destroyed in previous patch, and waiting for the invalidation. While syncing, they are simply reset need_sync bits, and moved to avail_list. Besides, add a wait_for_free list for the to-be-free DEKs. It is to avoid this corner case: when thread A is done with SYNC_CRYPTO but just before starting to reset the bitmaps, thread B is alloc dek, and free it immediately. It's obvious that this DEK can't be reused this time, so put it to waiting list, and do free after bulk bitmaps reset is finished. Signed-off-by: Jianbo Liu Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit c6e7d8171045e1425c2a813b8e04d86a94d4e7bc Author: Jianbo Liu Date: Wed Jul 20 07:20:01 2022 +0000 net/mlx5: Use bulk allocation for fast update encryption key We create a pool for each key type. For the pool, there is a struct to store the info for all DEK objects of one bulk allocation. As we use crypto->log_dek_obj_range, which is set to 12 in previous patch, for the log_obj_range of bulk allocation, 4096 DEKs are allocated in one time. To trace the state of all the keys in a bulk, two bitmaps are created. The need_sync bitmap is used to indicate the available state of the corresponding key. If the bit is 0, it can be used (available) as it either is newly created by FW, or SYNC_CRYPTO is executed and bit is reset after it is freed by upper layer user (this is the case to be handled in later patch). Otherwise, the key need to be synced. The in_use bitmap is used to indicate the key is being used, and reset when user free it. When ktls, ipsec or macsec need a key from a bulk, it get one with need_sync bit 0, then set both need_sync and in_used bit to 1. When user free a key, only in_use bit is reset to 0. So, for the combinations of (need_sync, in_use) of one DEK object, - (0,0) means the key is ready for use, - (1,1) means the key is currently being used by a user, - (1,0) means the key is freed, and waiting for being synced, - (0,1) is invalid state. There are two lists in each pool, partial_list and full_list, according to the number for available DEKs in a bulk. When user need a key, it get a bulk, either from partial list, or create new one from FW. Then the bulk is put in the different pool's lists according to the num of avail deks it has. If there is no avail deks, and all of them are be freed by users, for now, the bulk is destroyed. To speed up the bitmap search, a variable (avail_start) is added to indicate where to start to search need_sync bitmap for available key. Signed-off-by: Jianbo Liu Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 4d570c7117ddfa96da96bc8917effcfa906e6bd1 Author: Jianbo Liu Date: Wed Jul 20 03:57:37 2022 +0000 net/mlx5: Add bulk allocation and modify_dek operation To support fast update of keys into hardware, we optimize firmware to achieve the maximum rate. The approach is to create DEK objects in bulk, and update each of them with modify command. This patch supports bulk allocation and modify_dek commands for new firmware. However, as log_obj_range is 0 for now, only one DEK obj is allocated each time, and then updated with user key by modify_dek. Signed-off-by: Jianbo Liu Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 7a5b72c2a8e4f2292958b96423905948da583628 Author: Jianbo Liu Date: Wed Jul 20 02:43:40 2022 +0000 net/mlx5: Add support SYNC_CRYPTO command Add support for SYNC_CRYPTO command. For now, it is executed only when initializing DEK, but needed when reusing keys in later patch. Signed-off-by: Jianbo Liu Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 204369e718e9f276bdc8677e8dbb648d3298735f Author: Jianbo Liu Date: Wed Jul 20 02:36:05 2022 +0000 net/mlx5: Add new APIs for fast update encryption key New APIs are added to support fast update DEKs. As a pool is created for each key purpose (type), one pair of pool APIs to get/put pool. Anotehr pair of DEKs APIs is to get DEK object from pool and update it with user key, or free it back to the pool. As The bulk allocation and destruction will be supported in later patches, old implementation is used here. To support these APIs, pool and dek structs are defined first. Only small number of fields are stored in them. For example, key_purpose and refcnt in pool struct, DEK object id in dek struct. More fields will be added to these structs in later patches, for example, the different bulk lists for pool struct, the bulk pointer dek struct belongs to, and a list_entry for the list in a pool, which is used to save keys waiting for being freed while other thread is doing sync. Besides the creation and destruction interfaces, new one is also added to get obj id. Currently these APIs are planned to used by TLS only. Signed-off-by: Jianbo Liu Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 942192541675b80222e98b4eb410695c5ab619a3 Author: Jianbo Liu Date: Thu Jul 28 03:59:29 2022 +0000 net/mlx5: Refactor the encryption key creation Move the common code to general functions which can be used by fast update encryption key in later patches. Signed-off-by: Jianbo Liu Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 55f0d6d200612ea01f20acabafe4c5c31c728250 Author: Jianbo Liu Date: Mon Aug 8 02:47:17 2022 +0000 net/mlx5: Add const to the key pointer of encryption key creation Change key pointer to const void *, as there is no need to change the key content. This is also to avoid modifying the key by mistake. Signed-off-by: Jianbo Liu Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit fe298bdf6f654d4ad93069db9fe93b3b6632f4f1 Author: Jianbo Liu Date: Mon May 23 04:10:02 2022 +0000 net/mlx5: Prepare for fast crypto key update if hardware supports it Add CAP for crypto offload, do the simple initialization if hardware supports it. Currently set log_dek_obj_range to 12, so 4k DEKs will be created in one bulk allocation. Signed-off-by: Jianbo Liu Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 60c8972d2cccba19ce5a993bb8221e609702ef0d Author: Jianbo Liu Date: Tue Nov 22 06:09:22 2022 +0000 net/mlx5: Change key type to key purpose Change the naming of key type in DEK fields and macros, to be consistent with the device spec. Signed-off-by: Jianbo Liu Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 9a0ed4f2bfe220e9389cc86d7f9b284119037eb8 Author: Jianbo Liu Date: Thu Feb 17 09:29:35 2022 +0000 net/mlx5: Add IFC bits and enums for crypto key Add and extend structure layouts and defines for fast crypto key update. This is a prerequisite to support bulk creation, key modification and destruction, software wrapped DEK, and SYNC_CRYPTO command. Signed-off-by: Jianbo Liu Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 4744c7ad2299108bc3ecbea574cffb052863ba26 Author: Jianbo Liu Date: Wed Jul 6 13:06:30 2022 +0000 net/mlx5: Add IFC bits for general obj create param Before this patch, the log_obj_range was defined inside general_obj_in_cmd_hdr to support bulk allocation. However, we need to modify/query one of the object in the bulk in later patch, so change those fields to param bits for parameters specific for cmd header, and add general_obj_create_param according to what was updated in spec. We will also add general_obj_query_param for modify/query later. Signed-off-by: Jianbo Liu Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit c673b6772abcc4161b80014b5f5ff01bad703f0b Author: Tariq Toukan Date: Mon Mar 14 00:22:40 2022 +0200 net/mlx5: Header file for crypto Take crypto API out of the generic mlx5.h header into a dedicated header. Signed-off-by: Tariq Toukan Signed-off-by: Jianbo Liu Signed-off-by: Saeed Mahameed commit 7a17c61ee3b2683c40090179c273f4701fca9677 Author: Colin Ian King Date: Mon Jan 30 09:23:57 2023 +0000 ksmbd: Fix spelling mistake "excceed" -> "exceeded" There is a spelling mistake in an error message. Fix it. Signed-off-by: Colin Ian King Acked-by: Namjae Jeon Signed-off-by: Steve French commit d280a958f8b2b62610c280ecdf35d780e7922620 Author: Steve French Date: Sun Jan 29 17:49:59 2023 -0600 ksmbd: update Kconfig to note Kerberos support and fix indentation Fix indentation of server config options, and also since support for very old, less secure, NTLM authentication was removed (and quite a while ago), remove the mention of that in Kconfig, but do note Kerberos (not just NTLMv2) which are supported and much more secure. Acked-by: Namjae Jeon Acked-by: David Howells Signed-off-by: Steve French commit 7010357004096e54c884813e702d71147dc081f8 Author: Dawei Li Date: Tue Jan 17 23:29:19 2023 +0900 ksmbd: Remove duplicated codes ksmbd_neg_token_init_mech_token() and ksmbd_neg_token_targ_resp_token() share same implementation, unify them. Signed-off-by: Dawei Li Acked-by: Namjae Jeon Signed-off-by: Steve French commit f8d6e7442aa716a233c7eba99dec628f8885e00b Author: Dawei Li Date: Sun Jan 15 18:32:09 2023 +0800 ksmbd: fix typo, syncronous->synchronous syncronous->synchronous Signed-off-by: Dawei Li Acked-by: Namjae Jeon Reviewed-by: Sergey Senozhatsky Signed-off-by: Steve French commit c5d52d7bf241a4d06b651362446644948621c426 Author: Bjorn Andersson Date: Mon Jan 30 20:30:54 2023 -0600 soc: qcom: dcc: Drop driver for now Arnd asks for the DCC driver to be dropped for now, in order to allow for more thorough review, by a wider audience, of the ABI introduced. The Devicetree binding is adequately describing the hardware block, so this is kept. Requested-by: Arnd Bergmann Signed-off-by: Bjorn Andersson commit 7750d8b51061467d9de8407a17c26cba9e15da10 Author: Ondrej Zary Date: Mon Jan 30 22:10:49 2023 +0100 drivers/block: Remove PARIDE core and high-level protocols Remove PARIDE core and high level protocols, taking care not to break low-level drivers (used by pata_parport). Also update documentation. Signed-off-by: Ondrej Zary Acked-by: Jens Axboe Signed-off-by: Damien Le Moal commit dfea6ae346d7782bbe81696fe815e0f467d79e07 Author: Moudy Ho Date: Wed Jan 18 11:15:06 2023 +0800 dt-bindings: arm: mediatek: migrate MT8195 vppsys0/1 to mtk-mmsys driver MT8195 VPPSYS 0/1 should be probed from mtk-mmsys driver to populate device by platform_device_register_data then start its own clock driver. Signed-off-by: Moudy Ho Link: https://lore.kernel.org/r/20230118031509.29834-2-moudy.ho@mediatek.com Acked-by: Krzysztof Kozlowski Reviewed-by: Matthias Brugger Signed-off-by: Stephen Boyd commit 813c3b53b55ba7ee0f4d7ee1dc290373da8e1f3e Author: Daniel Golle Date: Thu Jan 26 03:34:24 2023 +0000 clk: mediatek: add MT7981 clock support Add MT7981 clock support, include topckgen, apmixedsys, infracfg and ethernet subsystem clocks. The drivers are based on clk-mt7981.c which can be found in MediaTek's SDK sources. To be fit for upstream inclusion the driver has been split into clock domains and the infracfg part has been significantly de-bloated by removing all the 1:1 factors (aliases). Signed-off-by: Jianhui Zhao Signed-off-by: Daniel Golle Link: https://lore.kernel.org/r/8136eb5b2049177bc2f6d3e0f2aefecc342d626f.1674703830.git.daniel@makrotopia.org Reviewed-by: AngeloGioacchino Del Regno [sboyd@kernel.org: Add module license] Signed-off-by: Stephen Boyd commit a6473d0f9f07b1196f3a67099826f50a2a4e84e8 Author: Daniel Golle Date: Thu Jan 26 03:34:05 2023 +0000 dt-bindings: clock: mediatek: add mt7981 clock IDs Add MT7981 clock dt-bindings, include topckgen, apmixedsys, infracfg, and ethernet subsystem clocks. Acked-by: Krzysztof Kozlowski Signed-off-by: Jianhui Zhao Signed-off-by: Daniel Golle Link: https://lore.kernel.org/r/e353d32b5a4481766519a037afe1ed44e31ece1a.1674703830.git.daniel@makrotopia.org Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Stephen Boyd commit cc4d9e0c77494fcf6bccbc57e23db0007cf681b7 Author: Daniel Golle Date: Thu Jan 26 03:33:46 2023 +0000 dt-bindings: clock: Add compatibles for MT7981 Add compatible string for MT7981 to existing bindings at - mediatek,apmixedsys.yaml - mediatek,topckgen.yaml - mediatek,ethsys.txt - mediatek,infracfg.yaml - mediatek,sgmiisys.txt Signed-off-by: Jianhui Zhao Signed-off-by: Daniel Golle Link: https://lore.kernel.org/r/cc85ee470c781ff4013f6c21c92c0a21574b12b2.1674703830.git.daniel@makrotopia.org Signed-off-by: Stephen Boyd commit 9d8d1fe539d4512cebe9dbcca7b40457af4c5b2e Author: AngeloGioacchino Del Regno Date: Fri Jan 20 10:20:53 2023 +0100 clk: mediatek: clk-mt7986-topckgen: Migrate to mtk_clk_simple_probe() There are no more non-common calls in clk_mt7986_topckgen_probe(): migrate this driver to mtk_clk_simple_probe(). Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Miles Chen Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230120092053.182923-24-angelogioacchino.delregno@collabora.com Tested-by: Mingming Su Signed-off-by: Stephen Boyd commit a0c3ef2519b26368d6cdd178ad986a85d5c4bbf3 Author: AngeloGioacchino Del Regno Date: Fri Jan 20 10:20:52 2023 +0100 clk: mediatek: clk-mt7986-topckgen: Properly keep some clocks enabled Instead of calling clk_prepare_enable() on a bunch of clocks at probe time, set the CLK_IS_CRITICAL flag to the same as these are required to be always on, and this is the right way of achieving that. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Reviewed-by: Miles Chen Link: https://lore.kernel.org/r/20230120092053.182923-23-angelogioacchino.delregno@collabora.com Tested-by: Mingming Su Signed-off-by: Stephen Boyd commit 72feb6f1eadee482c8ae96bbb2576fc9dd52de89 Author: AngeloGioacchino Del Regno Date: Fri Jan 20 10:20:51 2023 +0100 clk: mediatek: clk-mt6795-topckgen: Migrate to mtk_clk_simple_probe() Migrate away from custom probe functions and use the commonized mtk_clk_simple_{probe, remove}(). Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Miles Chen Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230120092053.182923-22-angelogioacchino.delregno@collabora.com Tested-by: Mingming Su Signed-off-by: Stephen Boyd commit 75c12ea37ab06bda219598a8e001bc448035c453 Author: AngeloGioacchino Del Regno Date: Fri Jan 20 10:20:50 2023 +0100 clk: mediatek: clk-mt8186-topckgen: Migrate to mtk_clk_simple_probe() As done with MT8192, migrate MT8186 topckgen away from a custom probe function and use mtk_clk_simple_{probe, remove}(). Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Miles Chen Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230120092053.182923-21-angelogioacchino.delregno@collabora.com Tested-by: Mingming Su Signed-off-by: Stephen Boyd commit e09eb9d24053a450cdcb465c40e9982b4a808941 Author: AngeloGioacchino Del Regno Date: Fri Jan 20 10:20:49 2023 +0100 clk: mediatek: clk-mt8192: Migrate topckgen to mtk_clk_simple_probe() Since the common simple probe function for MediaTek clock drivers can now register the MFG MUX notifier, it's possible to migrate MT8192's topckgen to that, allowing for some code size reduction. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Miles Chen Link: https://lore.kernel.org/r/20230120092053.182923-20-angelogioacchino.delregno@collabora.com Tested-by: Mingming Su Signed-off-by: Stephen Boyd commit fd9fe654f41c0271dbfe55d975c6d1bfa88820fb Author: AngeloGioacchino Del Regno Date: Fri Jan 20 10:20:48 2023 +0100 clk: mediatek: clk-mtk: Register MFG notifier in mtk_clk_simple_probe() In preparation for commonizing topckgen probe on various MediaTek SoCs clock drivers, add the ability to register the MFG MUX notifier in mtk_clk_simple_probe() by passing a custom notifier register function pointer, as this function will be slightly different across different SoCs. Signed-off-by: AngeloGioacchino Del Regno Tested-by: Miles Chen Link: https://lore.kernel.org/r/20230120092053.182923-19-angelogioacchino.delregno@collabora.com Tested-by: Mingming Su Signed-off-by: Stephen Boyd commit d7595ddeeca672d39ec692976c9c51609608a3bc Author: AngeloGioacchino Del Regno Date: Fri Jan 20 10:20:47 2023 +0100 clk: mediatek: clk-mt8183: Join top_aud_muxes and top_aud_divs Join the two to register them in one shot. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230120092053.182923-18-angelogioacchino.delregno@collabora.com Tested-by: Mingming Su Signed-off-by: Stephen Boyd commit 66c8773b435f4363e07dd6a89fc5d53b1ef9fc8d Author: AngeloGioacchino Del Regno Date: Fri Jan 20 10:20:46 2023 +0100 clk: mediatek: mt8186: Join top_adj_div and top_muxes Like done for MT8192, join the two to register them in one shot, as there's no point in doing that separately from one another. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230120092053.182923-17-angelogioacchino.delregno@collabora.com Tested-by: Mingming Su Signed-off-by: Stephen Boyd commit 8bc0ed9dc4a0ccc16735b98affdd939824a68dca Author: AngeloGioacchino Del Regno Date: Fri Jan 20 10:20:45 2023 +0100 clk: mediatek: mt8192: Join top_adj_divs and top_muxes These two are both mtk_composite arrays, one dependent on another, but that's something that the clock framework is supposed to sort out and anyway registering them separately isn't going to ease the framework's job in checking dependencies. Put the contents of top_adj_divs in top_muxes to join them together and register them in one shot. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Miles Chen Link: https://lore.kernel.org/r/20230120092053.182923-16-angelogioacchino.delregno@collabora.com Tested-by: Mingming Su Signed-off-by: Stephen Boyd commit 3b5bc4691f13e19d72f1fc5312ce5ee89ef51748 Author: AngeloGioacchino Del Regno Date: Fri Jan 20 10:20:44 2023 +0100 clk: mediatek: clk-mt8192: Move CLK_TOP_CSW_F26M_D2 in top_divs This driver is registered early in clk_mt8192_top_init_early() and then again in clk_mt8192_top_probe(): the difference between the two is that the early one is probed with CLK_OF_DECLARE_DRIVER and the latter is regularly probed as a platform_driver. Knowing that it is not necessary for this platform to register the TOP_CSW_F26M_D2 clock that early, move it to top_divs and register it with the others during platform_driver probe for topckgen; While at it, since the only reason why the early probe existed was to register that clock, remove that entirely - leaving this driver to use only platform_driver. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Miles Chen Reviewed-by: Chen-Yu Tsai Tested-by: Miles Chen Link: https://lore.kernel.org/r/20230120092053.182923-15-angelogioacchino.delregno@collabora.com Tested-by: Mingming Su Signed-off-by: Stephen Boyd commit e4078219e934e6b43ab3049af0dbd41664951dd8 Author: AngeloGioacchino Del Regno Date: Fri Jan 20 10:20:43 2023 +0100 clk: mediatek: mt8173: Migrate pericfg/topckgen to mtk_clk_simple_probe() Function mtk_clk_simple_probe() gained the ability to register multiple clock types: migrate MT8173's pericfg and topckgen to this common probe function to reduce duplication and code size. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Miles Chen Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230120092053.182923-14-angelogioacchino.delregno@collabora.com Tested-by: Mingming Su Signed-off-by: Stephen Boyd commit 7b6183108c8ccf0dc295f39cdf78bd8078455636 Author: AngeloGioacchino Del Regno Date: Fri Jan 20 10:20:42 2023 +0100 clk: mediatek: clk-mtk: Extend mtk_clk_simple_probe() As a preparation to increase probe functions commonization across various MediaTek SoC clock controller drivers, extend function mtk_clk_simple_probe() to be able to register not only gates, but also fixed clocks, factors, muxes and composites. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Miles Chen Reviewed-by: Chen-Yu Tsai Tested-by: Miles Chen Link: https://lore.kernel.org/r/20230120092053.182923-13-angelogioacchino.delregno@collabora.com Tested-by: Mingming Su Signed-off-by: Stephen Boyd commit 0f69a423c458f0a6586b7e4ac99e9c2d901ecf56 Author: AngeloGioacchino Del Regno Date: Fri Jan 20 10:20:41 2023 +0100 clk: mediatek: Switch to mtk_clk_simple_probe() where possible mtk_clk_simple_probe() is a function that registers mtk gate clocks and, if reset data is present, a reset controller and across all of the MTK clock drivers, such a function is duplicated many times: switch to the common mtk_clk_simple_probe() function for all of the clock drivers that are registering as platform drivers. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Miles Chen Tested-by: Miles Chen Link: https://lore.kernel.org/r/20230120092053.182923-12-angelogioacchino.delregno@collabora.com Tested-by: Mingming Su Signed-off-by: Stephen Boyd commit 4c02c9af3cb9449cd176300b288e8addb5083934 Author: AngeloGioacchino Del Regno Date: Fri Jan 20 10:20:40 2023 +0100 clk: mediatek: mt8173: Break down clock drivers and allow module build Split the giant clock driver for MT8173 into smaller drivers and make it possible to build the non boot critical clock controller drivers as modules by adding remove functions and both module description and license where needed. While at it, also change a mtk_register_reset_controller() call to mtk_register_reset_controller_with_dev() in mt8173-infracfg. Some spare code style cleanups were also performed. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230120092053.182923-11-angelogioacchino.delregno@collabora.com Tested-by: Mingming Su Signed-off-by: Stephen Boyd commit a87d143c47eb0dff5b7f2a97b58e92aa59707a94 Author: AngeloGioacchino Del Regno Date: Fri Jan 20 10:20:39 2023 +0100 clk: mediatek: mt8173: Remove mtk_clk_enable_critical() The entire point of mtk_clk_enable_critical() is to raise the refcount of some clocks so that they won't be turned off during runtime, but this is the same as what the CLK_IS_CRITICAL flag does. Set CLK_IS_CRITICAL on all of the critical clocks and remove the aforementioned function as a cleanup. No functional changes. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230120092053.182923-10-angelogioacchino.delregno@collabora.com Tested-by: Mingming Su Signed-off-by: Stephen Boyd commit 41138fbf876ca6154aa3aa68e07e1b37d246b8d0 Author: AngeloGioacchino Del Regno Date: Fri Jan 20 10:20:38 2023 +0100 clk: mediatek: mt8173: Migrate to platform driver and common probe This driver is using CLK_OF_DECLARE() for all clocks: while this definitely works, it's not preferred as this makes it impossible to compile non boot critical clock drivers as modules and to take advantage of clock controller Runtime PM. As a preparation for a larger cleanup, migrate all of the clock controller drivers for MT8173 to platform_driver and use the common mtk_clk_simple_probe() where possible; while at it, also add proper error handling to the various probe functions. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230120092053.182923-9-angelogioacchino.delregno@collabora.com Tested-by: Mingming Su Signed-off-by: Stephen Boyd commit b8eb1081d267708ba976525a1fe2162901b34f3a Author: AngeloGioacchino Del Regno Date: Fri Jan 20 10:20:37 2023 +0100 clk: mediatek: clk-mtk: Add dummy clock ops In order to migrate some (few) old clock drivers to the common mtk_clk_simple_probe() function, add dummy clock ops to be able to insert a dummy clock with ID 0 at the beginning of the list. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Miles Chen Reviewed-by: Chen-Yu Tsai Tested-by: Miles Chen Link: https://lore.kernel.org/r/20230120092053.182923-8-angelogioacchino.delregno@collabora.com Tested-by: Mingming Su Signed-off-by: Stephen Boyd commit d3d6bd5e25cdc460df33ae1db4f051c4bdd3aa60 Author: AngeloGioacchino Del Regno Date: Fri Jan 20 10:20:36 2023 +0100 clk: mediatek: clk-mux: Propagate struct device for mtk-mux Like done for other clocks, propagate struct device for mtk mux clocks registered through clk-mux helpers to enable runtime pm support. Signed-off-by: AngeloGioacchino Del Regno Tested-by: Miles Chen Link: https://lore.kernel.org/r/20230120092053.182923-7-angelogioacchino.delregno@collabora.com Tested-by: Mingming Su Signed-off-by: Stephen Boyd commit 01a6c1ab57c3a474c8d23c7d82c3fcce85f62612 Author: AngeloGioacchino Del Regno Date: Fri Jan 20 10:20:35 2023 +0100 clk: mediatek: clk-mtk: Propagate struct device for composites Like done for cpumux clocks, propagate struct device for composite clocks registered through clk-mtk helpers to be able to get runtime pm support for MTK clocks. Signed-off-by: AngeloGioacchino Del Regno Tested-by: Miles Chen Link: https://lore.kernel.org/r/20230120092053.182923-6-angelogioacchino.delregno@collabora.com Tested-by: Mingming Su Signed-off-by: Stephen Boyd commit f0b3140f4b81bd8e886f534d9eda43ff5d3382a9 Author: AngeloGioacchino Del Regno Date: Fri Jan 20 10:20:34 2023 +0100 clk: mediatek: cpumux: Propagate struct device where possible Take a pointer to a struct device in mtk_clk_register_cpumuxes() and propagate the same to mtk_clk_register_cpumux() => clk_hw_register(). Even though runtime pm is unlikely to be used with CPU muxes, this helps with code consistency and possibly opens to commonization of some mtk_clk_register_(x) functions. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Reviewed-by: Markus Schneider-Pargmann Tested-by: Miles Chen Link: https://lore.kernel.org/r/20230120092053.182923-5-angelogioacchino.delregno@collabora.com Tested-by: Mingming Su Signed-off-by: Stephen Boyd commit 20498d52c9c1a68b1d92c42bce1dc893d3e74f30 Author: AngeloGioacchino Del Regno Date: Fri Jan 20 10:20:33 2023 +0100 clk: mediatek: clk-gate: Propagate struct device with mtk_clk_register_gates() Commit e4c23e19aa2a ("clk: mediatek: Register clock gate with device") introduces a helper function for the sole purpose of propagating a struct device pointer to the clk API when registering the mtk-gate clocks to take advantage of Runtime PM when/where needed and where a power domain is defined in devicetree. Function mtk_clk_register_gates() then becomes a wrapper around the new mtk_clk_register_gates_with_dev() function that will simply pass NULL as struct device: this is essential when registering drivers with CLK_OF_DECLARE instead of as a platform device, as there will be no struct device to pass... but we can as well simply have only one function that always takes such pointer as a param and pass NULL when unavoidable. This commit removes the mtk_clk_register_gates() wrapper and renames mtk_clk_register_gates_with_dev() to the former and all of the calls to either of the two functions were fixed in all drivers in order to reflect this change; also, to improve consistency with other kernel functions, the pointer to struct device was moved as the first param. Since a lot of MediaTek clock drivers are actually registering as a platform device, but were still registering the mtk-gate clocks without passing any struct device to the clock framework, they've been changed to pass a valid one now, as to make all those platforms able to use runtime power management where available. While at it, some much needed indentation changes were also done. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Reviewed-by: Markus Schneider-Pargmann Tested-by: Miles Chen Link: https://lore.kernel.org/r/20230120092053.182923-4-angelogioacchino.delregno@collabora.com Tested-by: Mingming Su Signed-off-by: Stephen Boyd commit fdc325c8f79cb4155009db8394db19793c4d07cd Author: AngeloGioacchino Del Regno Date: Fri Jan 20 10:20:32 2023 +0100 clk: mediatek: mt8192: Propagate struct device for gate clocks Convert instances of mtk_clk_register_gates() to use the newer mtk_clk_register_gates_with_dev() to propagate struct device to the clk framework. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Miles Chen Link: https://lore.kernel.org/r/20230120092053.182923-3-angelogioacchino.delregno@collabora.com Tested-by: Mingming Su Signed-off-by: Stephen Boyd commit 0cbe12694990501be92f997d987925132002dbe5 Author: AngeloGioacchino Del Regno Date: Fri Jan 20 10:20:31 2023 +0100 clk: mediatek: mt8192: Correctly unregister and free clocks on failure If anything fails during probe of the clock controller(s), unregister (and kfree!) whatever we have previously registered to leave with a clean state and prevent leaks. Fixes: 710573dee31b ("clk: mediatek: Add MT8192 basic clocks support") Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Reviewed-by: Markus Schneider-Pargmann Tested-by: Miles Chen Link: https://lore.kernel.org/r/20230120092053.182923-2-angelogioacchino.delregno@collabora.com Tested-by: Mingming Su Signed-off-by: Stephen Boyd commit 246a1c4c6b7ffba88a2553d2b88f7b6280f253a2 Author: Ondrej Zary Date: Mon Jan 23 20:09:54 2023 +0100 ata: pata_parport: add driver (PARIDE replacement) The pata_parport is a libata-based replacement of the old PARIDE subsystem - driver for parallel port IDE devices. It uses the original paride low-level protocol drivers but does not need the high-level drivers (pd, pcd, pf, pt, pg). The IDE devices behind parallel port adapters are handled by the ATA layer. This will allow paride and its high-level drivers to be removed. Unfortunately, libata drivers cannot sleep so pata_parport claims parport before activating the ata host and keeps it claimed (and protocol connected) until the ata host is removed. This means that no devices can be chained (neither other pata_parport devices nor a printer). paride and pata_parport are mutually exclusive because the compiled protocol drivers are incompatible. Tested with: - Imation SuperDisk LS-120 and HP C4381A (EPAT) - Freecom Parallel CD (FRPW) - Toshiba Mobile CD-RW 2793008 w/Freecom Parallel Cable rev.903 (FRIQ) - Backpack CD-RW 222011 and CD-RW 19350 (BPCK6) The following bugs in low-level protocol drivers were found and will be fixed later: Note: EPP-32 mode is buggy in EPAT - and also in all other protocol drivers - they don't handle non-multiple-of-4 block transfers correctly. This causes problems with LS-120 drive. There is also another bug in EPAT: EPP modes don't work unless a 4-bit or 8-bit mode is used first (probably some initialization missing?). Once the device is initialized, EPP works until power cycle. So after device power on, you have to: echo "parport0 epat 0" >/sys/bus/pata_parport/new_device echo pata_parport.0 >/sys/bus/pata_parport/delete_device echo "parport0 epat 4" >/sys/bus/pata_parport/new_device (autoprobe will initialize correctly as it tries the slowest modes first but you'll get the broken EPP-32 mode) Note: EPP modes are buggy in FRPW, only modes 0 and 1 work. Signed-off-by: Ondrej Zary Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Acked-by: Jens Axboe Signed-off-by: Damien Le Moal commit 8c4526ca6a45e7ff915c2b33b54db6b773291fac Author: Ian Rogers Date: Thu Jan 26 11:06:05 2023 -0800 objtool: Properly support make V=1 The Q variable was being used but never correctly set up. Add the setting up and use in place of @. Signed-off-by: Ian Rogers Link: https://lore.kernel.org/r/20230126190606.40739-3-irogers@google.com Signed-off-by: Josh Poimboeuf commit bdb8bf7d56afd1d22c12c61455d732d3baff2bde Author: Ian Rogers Date: Thu Jan 26 11:06:04 2023 -0800 objtool: Install libsubcmd in build Including from tools/lib can create inadvertent dependencies. Install libsubcmd in the objtool build and then include the headers from there. Signed-off-by: Ian Rogers Link: https://lore.kernel.org/r/20230126190606.40739-2-irogers@google.com Signed-off-by: Josh Poimboeuf commit 5a84711fd734c09b7d991b00657ba61a96612254 Author: Dan Williams Date: Mon Jan 30 15:39:26 2023 -0800 cxl/pci: Fix irq oneshot expectations The IRQ core expects that users of the default hardirq handler specify IRQF_ONESHOT to keep interrupts disabled until the threaded handler runs. That meets the CXL driver's expectations since it is an edge triggered MSI and this flag would have been passed by default using pci_request_irq() instead of devm_request_threaded_irq(). Fixes: a49aa8141b65 ("cxl/mem: Wire up event interrupts") Reported-by: kernel test robot Reported-by: Julia Lawall Cc: Davidlohr Bueso Cc: Ira Weiny Signed-off-by: Dan Williams commit 633ff55419948987036537864ac10db4957f7627 Merge: 1b929c02afd37 e6f2ffeaf58b2 Author: Stephen Boyd Date: Mon Jan 30 15:31:03 2023 -0800 Merge tag 'sunxi-clk-for-6.3-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-allwinner Pull Allwinner clk driver updates from Jernej Skrabec: - add D1 CAN bus gates and resets - mark D1 CPUX clock as critical - reuse D1 driver for R528/T113 - cleanup sunxi-ng kconfig - fix sunxi-ng kernel-doc issues - model H3/H5 DRAM clock as fixed clock * tag 'sunxi-clk-for-6.3-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: d1: Add CAN bus gates and resets dt-bindings: clock: Add D1 CAN bus gates and resets clk: sunxi-ng: d1: Mark cpux clock as critical clk: sunxi-ng: d1: Allow building for R528/T113 clk: sunxi-ng: Move SoC driver conditions to dependencies clk: sunxi-ng: Remove duplicate ARCH_SUNXI dependencies clk: sunxi-ng: Avoid computing the rate twice clk: sunxi-ng: h3/h5: Model H3 CLK_DRAM as a fixed clock clk: sunxi-ng: fix ccu_mmc_timing.c kernel-doc issues commit 5ab4909d0b2542cc31bba370dcba029261f392f3 Merge: 19a2c394a273c 88f8ac47bddc1 Author: Linus Walleij Date: Mon Jan 30 23:46:29 2023 +0100 Merge tag 'intel-pinctrl-v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel into devel intel-pinctrl for v6.3-1 * Add ~4kOhm bias support to Intel pin control drivers * Convert Intel pin control drivers to use INTEL_COMMUNITY_*() * Add struct pinfunction and use it in Intel pin control drivers * Make pin control documentation up to date * Miscellaneous cleanups The following is an automated git shortlog grouped by driver: pinctrl: - Proofreading and updating the documentation accordingly - Proofreading and updating the documentation (part 2) alderlake: - Replace ADL_COMMUNITY() by INTEL_COMMUNITY_GPPS() baytrail: - Convert to use new memeber in struct intel_function broxton: - Replace BXT_COMMUNITY() by INTEL_COMMUNITY_SIZE() cannonlake: - Replace CNL_COMMUNITY() by INTEL_COMMUNITY_GPPS() cedarfork: - Replace CDF_COMMUNITY() by INTEL_COMMUNITY_GPPS() cherryview: - Convert to use new memeber in struct intel_function denverton: - Replace DNV_COMMUNITY() by INTEL_COMMUNITY_GPPS() elkhartlake: - Replace EHL_COMMUNITY() by INTEL_COMMUNITY_GPPS() emmitsburg: - Replace EBG_COMMUNITY() by INTEL_COMMUNITY_GPPS() geminilake: - Replace GLK_COMMUNITY() by INTEL_COMMUNITY_SIZE() icelake: - Replace ICL_COMMUNITY() by INTEL_COMMUNITY_GPPS() intel: - Get rid of unused members in struct intel_function - Make use of struct pinfunction and PINCTRL_PINFUNCTION() - Define maximum pad number in the group - Use same order of bit fields for PADCFG2 - Add ~4k bias support - Add definitions to all possible biases - Deduplicate some code in intel_config_set_pull() - Add default case to intel_config_set_pull() - Convert to generic_handle_domain_irq() - Always use gpp_num_padown_regs in the main driver - Introduce INTEL_COMMUNITY_*() to unify community macros Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro: - Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro jasperlake: - Replace JSL_COMMUNITY() by INTEL_COMMUNITY_GPPS() lakefield: - Replace LKF_COMMUNITY() by INTEL_COMMUNITY_GPPS() lewisburg: - Replace LBG_COMMUNITY() by INTEL_COMMUNITY_SIZE() lynxpoint: - Convert to use new memeber in struct intel_function merrifield: - Convert to use new memeber in struct intel_function meteorlake: - Replace MTL_COMMUNITY() by INTEL_COMMUNITY_GPPS() moorefield: - Convert to use new memeber in struct intel_function sunrisepoint: - Replace SPT_COMMUNITY() by INTEL_COMMUNITY_*() tigerlake: - Replace TGL_COMMUNITY() by INTEL_COMMUNITY_GPPS() commit 0e8d040bfa4c476d7d2a23119527c744c7de13cd Author: Chao Yu Date: Mon Jan 9 11:44:50 2023 +0800 f2fs: clear atomic_write_task in f2fs_abort_atomic_write() Otherwise, last .atomic_write_task will be remained in structure f2fs_inode_info, resulting in aborting atomic_write accidentally in race case. Meanwhile, clear original_i_size as well. Fixes: 7a10f0177e11 ("f2fs: don't give partially written atomic data from process crash") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 2f3a9ae990a7881c9a57a073bb52ebe34fdc3160 Author: Chao Yu Date: Mon Jan 9 11:44:49 2023 +0800 f2fs: introduce trace_f2fs_replace_atomic_write_block Commit 3db1de0e582c ("f2fs: change the current atomic write way") removed old tracepoints, but it missed to add new one, this patch fixes to introduce trace_f2fs_replace_atomic_write_block to trace atomic_write commit flow. Fixes: 3db1de0e582c ("f2fs: change the current atomic write way") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 19a2c394a273c92b1692c1af2c4a2e8e3852b3c8 Merge: 9da134e270736 698485cd875be Author: Linus Walleij Date: Mon Jan 30 23:12:12 2023 +0100 Merge tag 'renesas-pinctrl-for-v6.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: renesas: Updates for v6.3 - Add pin groups for Video-In channels 4 and 5 on R-Car H3 ES1.x, - Miscellaneous fixes and improvements. commit 551413fe938808c78287c855f8076a612f9e9f50 Merge: d70eec528ee7e 5f4416849f0e2 Author: Arnd Bergmann Date: Mon Jan 30 23:10:35 2023 +0100 Merge tag 'amlogic-arm-dt-for-v6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into arm/dt Amlogic ARM mach-meson changes for v6.3: - align OPP table names with DT schema - meson8/8b: Add more L2 (PL310) cache properties - align LED node names with dtschema * tag 'amlogic-arm-dt-for-v6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: ARM: dts: meson8: align OPP table names with DT schema ARM: dts: meson8b: Add more L2 (PL310) cache properties ARM: dts: meson8: Add more L2 (PL310) cache properties ARM: dts: meson: align LED node names with dtschema Link: https://lore.kernel.org/r/61700737-c226-1c07-fba7-6dca896fdab4@linaro.org Signed-off-by: Arnd Bergmann commit d70eec528ee7e95f96e4c3366e187a4635d5cf14 Merge: 4503fc6ea3339 d747e7f76a5fa Author: Arnd Bergmann Date: Mon Jan 30 23:07:32 2023 +0100 Merge tag 'amlogic-arm64-dt-for-v6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into arm/dt Amlogic ARM64 DT changes for v6.3: - Merge of immutable bindings branch with Reset & power domain binding - New boards: - Odroid-N2L (Smaller version of Odroid-N2+) - BananaPi M2-Pro (Variant of BPI=M5 with on-board wifi) - Radxa Zero2 (New version of Radza Zero with A311D SoC) - Add DT node for the VIPNano-QI on the A311D - DT bindings fixups covering all SoC families - MAC address nodes - ethernet PHY node name - scpi & child node names - SD/SDIO node name - USB supply name - invalid clock-names - rng node name - rtc node name - ETH phy mux node name - button & adc keys node name - leds node names - RK818 pmic properties - remove CPU opps below 1GHz for G12A boards, like it was done for G12B/SM1 - Fix WiFi/Bt definition around P212 & Khadas VIM1 - Add audio node to P212 - Fix FAN trip definition to Odroid-HC4 - Fix gpio-fan gpios definition - Permit Radxa Zero OTG on USB1 - Fix VDDIO_C enable gpio by using OPEN DRAIN flag * tag 'amlogic-arm64-dt-for-v6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: (43 commits) arm64: dts: meson: add support for Radxa Zero2 dt-bindings: arm: amlogic: add support for Radxa Zero2 arm64: dts: meson: add support for BananaPi M2-Pro dt-bindings: arm: amlogic: add support for BananaPi M2-Pro arm64: dts: meson: bananapi-m5: convert dts to dtsi arm64: dts: meson: bananapi-m5: remove redundant status from sound node arm64: dts: meson: bananapi-m5: switch VDDIO_C pin to OPEN_DRAIN arm64: dts: meson: radxa-zero: allow usb otg mode arm64: dts: meson-gxm-khadas-vim2: use gpio-fan matrix instead of an array arm64: dts: meson-g12b-odroid: Add initial support for Hardkernel ODROID-N2L arm64: dts: meson-g12b: move common node into new odroid.dtsi dt-bindings: arm: amlogic: document Odroid-N2L arm64: dts: amlogic: meson-sm1-odroid-hc4: fix active fan thermal trip arm64: dts: meson: add audio playback to S905X-P212 dts arm64: dts: meson: remove WiFi/BT nodes from Khadas VIM1 arm64: dts: meson: move pwm_ef node in P212 dtsi arm64: dts: meson: add Broadcom WiFi to P212 dtsi arm64: dts: amlogic: meson-g12b-odroid-go-ultra: fix rk818 pmic properties arm64: dts: amlogic: meson-gxbb-kii-pro: fix led node name arm64: dts: amlogic: meson-gxl-s905d-phicomm-n1: fix led node name ... Link: https://lore.kernel.org/r/c1641ffd-71c9-9ac9-89d9-c22da4acea10@linaro.org Signed-off-by: Arnd Bergmann commit 4503fc6ea33398c093a7a50cdbdbed811e998a9f Merge: 739a7c29a704e 46e828026cc8d Author: Arnd Bergmann Date: Mon Jan 30 23:05:14 2023 +0100 Merge tag 'imx-dt64-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX arm64 device tree change for 6.3: - New board support: i.MX8MP Beacon Kit, Debix Model A Board, Verdin Yavia boards. - Add Flexcan and ADC support for i.MX93. - A series from Krzysztof Kozlowski to align LED node names with dtschema and use generic node name for rave-sp. - Move PCIe controller clock setup from board dts to SoC dtsi. - Add clock-cells to i.MX8MP hsio-blk-ctrl device. - Add TMU phandle to calibration data in OCOTP for i.MX8M. - Improve bluetooth UART on DH electronics i.MX8M Plus DHCOM. - Drop sd-vsel-gpios from i.MX8M Verdin SoM and DHCOM SoM. - A series from Peng Fan to improve iomuxc-gpr device for i.MX8M. - Declare IOMMU cache-coherent page table walk feature for LS1028A and LS1088A. - A few small corrections and random updates. * tag 'imx-dt64-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (50 commits) arm64: ls1046ardb: Use in-band-status for SFP module arm64: dts: imx8mp-verdin: Add yavia carrier board arm64: dts: imx8mm-verdin: Add yavia carrier board arm64: dts: imx8q: use generic node name for rave-sp arm64: dts: imx8mp-verdin-dev: Do not include dahlia dtsi arm64: dts: imx8mm-verdin-dev: Do not include dahlia dtsi arm64: dts: imx8mp: Drop sd-vsel-gpios from i.MX8M Plus DHCOM SoM arm64: dts: imx8mp: Drop sd-vsel-gpios from i.MX8M Plus Verdin SoM arm64: dts: imx8mm: Drop sd-vsel-gpios from i.MX8M Mini Verdin SoM arm64: dts: imx8mp: Improve bluetooth UART on DH electronics i.MX8M Plus DHCOM arm64: dts: freescale: Introduce imx8mp-beacon-kit arm64: dts: imx8mm-evk: use correct gpio-expander compatible arm64: dts: imx93: add ADC support arm64: dts: imx8mp: Reorder clock to match fsl,imx6q-pcie.yaml arm64: dts: imx8mq: Deduplicate PCIe clock-names property arm64: dts: imx8mm: Deduplicate PCIe clock-names property arm64: dts: verdin-imx8mp: unify gpio-key node name arm64: dts: ls1028a: sl28: get MAC addresses from VPD arm64: dts: freescale: Add LVDS overlay for TQMa8MPxL arm64: dts: imx8mp: Add LCDIF2 & LDB nodes ... Link: https://lore.kernel.org/r/20230130023947.11780-5-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 145df2fdc38f24b3e52e4c2a59b02d874a074fbd Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:25 2023 -0500 selftests: core: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Signed-off-by: Shuah Khan commit 739a7c29a704ed6bc2297865a469431becb664ba Merge: ae3ddc2076390 addaaf0a18b79 Author: Arnd Bergmann Date: Mon Jan 30 23:03:26 2023 +0100 Merge tag 'imx-dt-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX arm device tree change for 6.3: - New board support: SK-iMX53, DHCOM i.MX6ULL based boards. - Increase MMC maximum frequency for i.MXRT1050. - A series from Krzysztof Kozlowski to align LED node names with dtschema, and use use generic node name for rave-sp device. - Use new media bus type macros for i.MX device trees. - A series from Marcel Ziswiler to improve gpio-key for Colibri and Apalis device trees. - A series from Marek Vasut to drop interrupt-names from dma-apb device. - A series from Philippe Schenker to disable USB over-current for Colibri and Apalis boards. - A few other small corrections and random changes. * tag 'imx-dt-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (29 commits) ARM: dts: imx6ull-dhcom: Add DHSOM based DRC02 board ARM: dts: imx6ull-dhcom: Add DHCOM based PicoITX board ARM: dts: imx6ull-dhcom: Add DH electronics DHCOM i.MX6ULL SoM and PDK2 board ARM: dts: imx7s: correct iomuxc gpr mux controller cells ARM: dts: imx: use generic node name for rave-sp ARM: dts: ls1021a: Disable CAN nodes by default ARM: dts: apalis/colibri-imx6/6ull/7: proper gpio-key node names ARM: dts: colibri-imx6ull: improve wake-up with gpio key ARM: dts: colibri-imx6: improve wake-up with gpio key ARM: dts: imx: e70k02: Add touchscreen ARM: dts: vfxxx: Swap SAI DMA order ARM: dts: freescale: Use new media bus type macros ARM: dts: tqma6ul + mba6ulx: Fix temperature sensor compatible ARM: dts: imx: Add support for SK-iMX53 board ARM: dts: imx7s: Drop dma-apb interrupt-names ARM: dts: imx6ul: Drop dma-apb interrupt-names ARM: dts: imx6sx: Drop dma-apb interrupt-names ARM: dts: imx6qdl: Drop dma-apb interrupt-names ARM: dts: mxs: Drop dma-apb interrupt-names ARM: dts: imx6qdl: use MAC-address from nvmem ... Link: https://lore.kernel.org/r/20230130023947.11780-4-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit ae3ddc207639020f8806e157e33c80f3aa3642bb Merge: f0f4c73ac03ec 551460d15a05c Author: Arnd Bergmann Date: Mon Jan 30 23:02:26 2023 +0100 Merge tag 'imx-bindings-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX DT bindings for 6.3: - New board compatibles: Beacon EmbeddedWorks i.MX8M Plus kit, DHCOM PDK2, PicoITX and DRC02, Enumerate Debix, Starterkit SK-iMX53, verdin yavia carrier-board. - Add vendor prefix for Polyhex Technology Co. - A series from Krzysztof Kozlowski to fix up fsl,imx-gpc bindings. - Add clock cells for imx8mp-hsio-blk-ctrl bindings. - A series from Marek Vasut to shuffle i.MX8MM board entries. - A couple changes from Stefan Wahren to update compatibles for i.MX28 based boards. * tag 'imx-bindings-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: dt-bindings: arm: fsl: Add verdin yavia carrier-board dt-bindings: arm: fsl: Add PDK2, PicoITX and DRC02 boards for the DHCOM i.MX6ULL SoM dt-bindings: arm: Document the rest of i.MX28 based boards dt-bindings: arm: fsl: Fix bindings for APF28Dev board dt-bindings: power: fsl,imx-gpc: document interrupt-controller dt-bindings: power: fsl,imx-gpc: correct compatibles dt-bindings: power: fsl,imx-gpc: document fsl,imx6ul-gpc compatible dt-bindings: arm: Add Beacon EmbeddedWorks i.MX8M Plus kit dt-bindings: arm: Move i.MX8MM Cloos PHG Board to TQM entry dt-bindings: arm: Split i.MX8M Plus DHCOM based boards dt-bindings: arm: Split i.MX8M Mini NITROGEN SoM based boards dt-bindings: arm: Move MX8Menlo board to i.MX8M Mini Toradex Verdin SoM entry dt-bindings: soc: imx: add IOMUXC GPR support dt-bindings: arm: fsl: Add the Starterkit SK-iMX53 board dt-bindings: vendor-prefixes: add Startkit dt-bindings: soc: imx8mp-hsio-blk-ctrl: add clock cells dt-bindings: arm: fsl: Enumerate Debix Model A Board dt-bindings: vendor-prefixes: Add Polyhex Technology Co. Link: https://lore.kernel.org/r/20230130023947.11780-3-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 612cf4d283414a5ee2733db6608d917deb45fa46 Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:24 2023 -0500 selftests: clone3: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Acked-by: Shuah Khan Acked-by: Christian Brauner Signed-off-by: Shuah Khan commit f0f4c73ac03ec9ff53b1f17a2ab61485aab644b5 Merge: 54a39a28aeca1 2ba4ff82f9dd3 Author: Arnd Bergmann Date: Mon Jan 30 23:01:11 2023 +0100 Merge tag 'dt-cleanup-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into arm/dt Minor improvements in ARM DTS for v6.3, part two Align UART node names and OPP table names with bindings (alpine, arm boards, axm55xx, berlin, cx92755, dm814x, moxart, mstar, stih418). * tag 'dt-cleanup-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt: ARM: dts: berlin: align UART node name with bindings ARM: dts: stih418: align OPP table names with DT schema ARM: dts: dm814x: align UART node name with bindings ARM: dts: moxart: align UART node name with bindings ARM: dts: axm55xx: align UART node name with bindings ARM: dts: alpine: align UART node name with bindings ARM: dts: arm: align UART node name with bindings ARM: dts: cx92755: align UART node name with bindings ARM: dts: mstar: align UART node name with bindings Link: https://lore.kernel.org/r/20230129144525.5802-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 7482c19173b7eb044d476b3444d7ee55bc669d03 Author: Mathieu Desnoyers Date: Fri Jan 27 08:57:22 2023 -0500 selftests: arm64: Fix incorrect kernel headers search path Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Acked-by: Shuah Khan Acked-by: Catalin Marinas Signed-off-by: Shuah Khan commit 54a39a28aeca173eb748020ece6d7ad57b9c7ea7 Merge: 5868fc77e257c 9f2c9170934ea Author: Arnd Bergmann Date: Mon Jan 30 22:59:59 2023 +0100 Merge tag 'dt64-cleanup-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into arm/dt Minor improvements in ARM64 DTS for v6.3, part two 1. Drop deprecated "device_type" property from serial nodes (apm, amazon). 2. Align UART node names and OPP table names with bindings (hisilicon, realtek, synaptics). 3. Use "okay" for status, as expected by Devicetree specification and dtschema. * tag 'dt64-cleanup-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt: arm64: dts: amd: use "okay" for status arm64: dts: apm: use "okay" for status arm64: dts: microchip: use "okay" for status arm64: dts: synaptics: align UART node name with bindings arm64: dts: hisilicon: align UART node name with bindings arm64: dts: realtek: align UART node name with bindings arm64: dts: amazon: drop deprecated serial device_type arm64: dts: apm: drop deprecated serial device_type Link: https://lore.kernel.org/r/20230129144525.5802-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 5868fc77e257ca6a1bba1315686389879100e472 Merge: 00ef63ec1cc69 28dd277e54ebb Author: Arnd Bergmann Date: Mon Jan 30 22:58:28 2023 +0100 Merge tag 'samsung-dt64-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM64 changes for v6.3, part two Big cleanup and rework towards achieving zero-warning of dtbs_check and dtc W=1: - drop or correct incorrect properties in several boards, - add dummy regulator supplies when necessary to fullfil bindings requirements, - use lowercase hex, - move non-MMIO exynos-bus nodes out of soc node, - add unit address to USB DWC3 nodes. * tag 'samsung-dt64-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: exynos: add unit address to DWC3 node wrapper in Exynos7 arm64: dts: exynos: add unit address to DWC3 node wrapper in Exynos5433 arm64: dts: exynos: move exynos-bus nodes out of soc in Exynos5433 arm64: dts: exynos: use lowercase hex addresses arm64: dts: exynos: correct wlf,micd-dbtime on TM2 arm64: dts: exynos: add interrupt-controller to WM5110 on TM2 arm64: dts: exynos: add VPH_PWR regulator on TM2 arm64: dts: exynos: correct Bluetooth LED triger on E850-96 arm64: dts: exynos: add ADC supply on Exynos7 Espresso arm64: dts: exynos: disable non-working GPU on Exynos7 Espresso arm64: dts: exynos: drop unsupported UFS properties in ExynosAutov9 SADK Link: https://lore.kernel.org/r/20230129143944.5104-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 00ef63ec1cc69e7a97b736745c55edbdfe77e146 Merge: d18eff504da5c 27be20e3b9d12 Author: Arnd Bergmann Date: Mon Jan 30 22:56:46 2023 +0100 Merge tag 'samsung-dt-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM changes for v6.3 1. Big cleanup and rework towards achieving zero-warning of dtbs_check and dtc W=1: - align node names with the bindings, - drop or correct incorrect properties in several boards, - correct HDMI bridge ports nodes on Exynos4412 Midas, - add dummy regulator supplies when necessary to fullfil bindings requirements, - use lowercase hex, - move non-MMIO exynos-bus nodes out of soc node, - add unit address to USB DWC3 nodes. 2. Correct Exynos5420 MIPI DSI and phy compatibles. 3. Correct Exynos4210 and Exynos4412 HDMI phy compatibles. 4. Add Samsung Galaxy S5 (SM-G900H) board. * tag 'samsung-dt-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: (27 commits) ARM: dts: exynos: add unit address to DWC3 node wrapper in Exynos54xx ARM: dts: exynos: add unit address to DWC3 node wrapper in Exynos5250 ARM: dts: exynos: move exynos-bus nodes out of soc in Exynos4412 ARM: dts: exynos: move exynos-bus nodes out of soc in Exynos4210 ARM: dts: exynos: move exynos-bus nodes out of soc in Exynos3250 ARM: dts: exynos: move exynos-bus nodes out of soc in Exynos5420 ARM: dts: exynos: use lowercase hex addresses ARM: dts: exynos: use generic node names for phy ARM: dts: exynos: correct HDMI phy compatible in Exynos4 ARM: dts: exynos: Add Samsung Galaxy S5 (SM-G900H) board dt-bindings: arm: samsung: Add compatible for Samsung Galaxy S5 (SM-G900H) ARM: dts: exynos: Use Exynos5422 compatible for the DSI controller ARM: dts: exynos: Use Exynos5420 compatible for the MIPI video phy ARM: dts: exynos: correct HSI2C properties in Exynos5410 Odroid XU ARM: dts: exynos: correct HS200 property in Exynos5260 ARM: dts: exynos: correct SATA clocks in Exynos5250 ARM: dts: exynos: align HSOTG/USB node names ARM: dts: exynos: add backlight supply in P4 Note ARM: dts: exynos: add panel supply in Tiny4412 ARM: dts: exynos: add ports in HDMI bridge in Exynos4412 Midas ... Link: https://lore.kernel.org/r/20230129143944.5104-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit d18eff504da5cb3e03fc0a38fce671ee7087be85 Merge: 0c826ec36dbff 3a7b283821650 Author: Arnd Bergmann Date: Mon Jan 30 22:55:59 2023 +0100 Merge tag 'arm-soc/for-6.3/devicetree-arm64' of https://github.com/Broadcom/stblinux into arm/dt This pull request contains Broadcom ARM64 SoCs Device Tree updates for 6.3, please pull the following: - Krzysztof aligns the SMMMU Device Tree nodes to use the desired regular expression matched by the dtschema and he also removes the deprecated "device_type" property for serial node(s) * tag 'arm-soc/for-6.3/devicetree-arm64' of https://github.com/Broadcom/stblinux: arm64: dts: broadcom: drop deprecated serial device_type arm64: dts: broadcom: align SMMU node names with DT schema Link: https://lore.kernel.org/r/20230128193834.1628831-1-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit 0c826ec36dbff5a8a39e5f553c7144ebe2717319 Merge: ffe4bd3db832a 031eeba1102c0 Author: Arnd Bergmann Date: Mon Jan 30 22:55:09 2023 +0100 Merge tag 'arm-soc/for-6.3/devicetree' of https://github.com/Broadcom/stblinux into arm/dt This pull request contains Broadcom ARM SoCs Device Tree updates for 6.3, please pull the following: - Krzysztof aligns the various Broadcom SoCs DTS UART nodes with the binding convention to use "serial" * tag 'arm-soc/for-6.3/devicetree' of https://github.com/Broadcom/stblinux: ARM: dts: broadcom: align UART node name with bindings Link: https://lore.kernel.org/r/20230128193829.1628773-1-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit ffe4bd3db832a36b69a764d3895e34c726f4f3cf Merge: 248c07f92c2c3 dca36f7b3dd7e Author: Arnd Bergmann Date: Mon Jan 30 22:42:37 2023 +0100 Merge tag 'sunxi-dt-for-6.3-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt - introduce Allwinner D1 DTSI - add boards: Dongshan Nezha STU, MangoPi MQ (Pro), Sipeed Lichee RV, Nezha - add D1 power controller node - Add SATA regulator to Bananapi M3 - fix regulator reference for nanopi-duo2 - fix GPIO node names - align HDMI CEC node name for h3-beelink-x2 - add DPHY interrupt to A64 and A33 * tag 'sunxi-dt-for-6.3-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: riscv: dts: allwinner: d1: Add power controller node riscv: Add the Allwinner SoC family Kconfig option riscv: dts: allwinner: Add Dongshan Nezha STU devicetree riscv: dts: allwinner: Add MangoPi MQ Pro devicetree riscv: dts: allwinner: Add Sipeed Lichee RV devicetrees riscv: dts: allwinner: Add Allwinner D1 Nezha devicetree riscv: dts: allwinner: Add MangoPi MQ devicetree riscv: dts: allwinner: Add the D1/D1s SoC devicetree dt-bindings: riscv: Add Allwinner D1/D1s board compatibles dt-bindings: vendor-prefixes: Add Allwinner D1/D1s board vendors MAINTAINERS: Match the sun20i family of Allwinner SoCs ARM: dts: sun8i: a83t: bananapi-m3: describe SATA disk regulator ARM: dts: sun8i: nanopi-duo2: Fix regulator GPIO reference ARM: dts: sunxi: Fix GPIO LED node names ARM: dts: sun8i: h3-beelink-x2: align HDMI CEC node names with dtschema arm64: dts: allwinner: a64: Add DPHY interrupt ARM: dts: sun8i: a33: Add DPHY interrupt Signed-off-by: Arnd Bergmann commit 0ad2185dcb5ed3f3c26be8262e4180d5d97f244f Author: Arnd Bergmann Date: Mon Jan 30 10:49:01 2023 +0100 soc: sunxi: select CONFIG_PM Selecting CONFIG_PM_GENERIC_DOMAINS without CONFIG_PM leads to a build failure: WARNING: unmet direct dependencies detected for PM_GENERIC_DOMAINS Depends on [n]: PM [=n] Selected by [y]: - SUN20I_PPU [=y] && (ARCH_SUNXI [=n] || COMPILE_TEST [=y]) drivers/base/power/domain_governor.c: In function 'default_suspend_ok': drivers/base/power/domain_governor.c:85:24: error: 'struct dev_pm_info' has no member named 'ignore_children' 85 | if (!dev->power.ignore_children) | ^ drivers/base/power/domain.c: In function 'genpd_queue_power_off_work': drivers/base/power/domain.c:657:20: error: 'pm_wq' undeclared (first use in this function) 657 | queue_work(pm_wq, &genpd->power_off_work); | ^~~~~ Unfortunately platforms are inconsistent between using 'select PM' and 'depends on PM' here. CONFIG_PM is a user-visible symbol, so in principle we should be using 'depends on', but on the other hand using 'select' here is more common among drivers/soc. Go with the majority for now, as this has a smaller risk of introducing circular dependencies. We may need to clean this up for consistency later. Fixes: 0e30ca5ab0a8 ("soc: sunxi: Add Allwinner D1 PPU driver") Acked-by: Jernej Skrabec Signed-off-by: Arnd Bergmann commit 120e0ea12d90ad15127ad50944975fc8c81666b7 Author: Yangtao Li Date: Wed Jan 4 19:40:29 2023 +0800 f2fs: introduce discard_io_aware_gran sysfs node The current discard_io_aware_gran is a fixed value, change it to be configurable through the sys node. Signed-off-by: Yangtao Li Signed-off-by: Jaegeuk Kim commit c5f9db2548d0ac988df81aa34cc63f3b2ed374f9 Author: Yangtao Li Date: Thu Dec 22 16:18:55 2022 +0800 f2fs: drop useless initializer and unneeded local variable No need to initialize idx twice. BTW, remove the unnecessary cnt variable. Signed-off-by: Yangtao Li Signed-off-by: Jaegeuk Kim commit 193a639fed92793ad10e327cfb2be7175be01425 Author: Yangtao Li Date: Thu Dec 22 03:20:01 2022 +0800 f2fs: add iostat support for flush In this patch, it adds to account flush count. Signed-off-by: Yangtao Li Signed-off-by: Jaegeuk Kim commit 67aa59afcf3f15183811157b7742762ed5ab416f Merge: 7f27be23ab4a4 31e9273912bf5 Author: Mark Brown Date: Mon Jan 30 20:59:22 2023 +0000 ASoC: topology: Fixes and cleanups Merge series from Amadeusz Sławiński : Following is series of fixes and cleanups for core topology code. Few patches fixing various problems all around and few fixing function names. commit 7f27be23ab4a406c74e8df55b9c38685898340d0 Merge: 8d076a992eb86 9e8593ec9ef74 Author: Mark Brown Date: Mon Jan 30 20:46:25 2023 +0000 ASoC: dt-bindings: audio-graph-port related update Merge series from Kuninori Morimoto : Audio-Graph-Card and Simple-Audio-Card are similar Card and are sharing same utils. Thus we can also sharing same schema. This patch-set fixup some Renesas's "make dtbs_check". commit f88b6c0c070ea9b1fcf9d042d77ce8af62a020cd Author: Weidong Wang Date: Fri Jan 13 13:53:01 2023 +0800 ASoC: dt-bindings: Add schema for "awinic,aw88395" Add a DT schema for describing Awinic AW88395 audio amplifiers. They are controlled using I2C. Signed-off-by: Weidong Wang Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230113055301.189541-6-wangweidong.a@awinic.com Signed-off-by: Mark Brown commit 14bd857286115bab1e7860ab6e30016b0cae8233 Author: Weidong Wang Date: Fri Jan 13 13:53:00 2023 +0800 ASoC: codecs: Aw88395 chip register file, data type file and Kconfig Makefile The Awinic AW88395 is an I2S/TDM input, high efficiency digital Smart K audio amplifier with an integrated 10.25V smart boost convert Signed-off-by: Nick Li Signed-off-by: Bruce zhao Signed-off-by: Weidong Wang Link: https://lore.kernel.org/r/20230113055301.189541-5-wangweidong.a@awinic.com Signed-off-by: Mark Brown commit 06d2fe9cb42354e9910b1305ec984d0de7225f3e Author: Weidong Wang Date: Fri Jan 13 13:52:59 2023 +0800 ASoC: codecs: Aw88395 function for ALSA Audio Driver The Awinic AW88395 is an I2S/TDM input, high efficiency digital Smart K audio amplifier with an integrated 10.25V smart boost convert Signed-off-by: Nick Li Signed-off-by: Bruce zhao Signed-off-by: Ben Yi Signed-off-by: Weidong Wang Link: https://lore.kernel.org/r/20230113055301.189541-4-wangweidong.a@awinic.com Signed-off-by: Mark Brown commit 4345865b003be60fed335efbed5aee61aac86da0 Author: Weidong Wang Date: Fri Jan 13 13:52:58 2023 +0800 ASoC: codecs: ACF bin parsing and check library file for aw88395 The Awinic AW88395 is an I2S/TDM input, high efficiency digital Smart K audio amplifier with an integrated 10.25V smart boost convert Signed-off-by: Nick Li Signed-off-by: Bruce zhao Signed-off-by: Weidong Wang Link: https://lore.kernel.org/r/20230113055301.189541-3-wangweidong.a@awinic.com Signed-off-by: Mark Brown commit 62fc25fbab5f416372b2890de313e38bec75b61d Author: Weidong Wang Date: Fri Jan 13 13:52:57 2023 +0800 ASoC: codecs: Add i2c and codec registration for aw88395 and their associated operation functions The Awinic AW88395 is an I2S/TDM input, high efficiency digital Smart K audio amplifier with an integrated 10.25V smart boost convert Signed-off-by: Nick Li Signed-off-by: Bruce zhao Signed-off-by: Weidong Wang Link: https://lore.kernel.org/r/20230113055301.189541-2-wangweidong.a@awinic.com Signed-off-by: Mark Brown commit fa8843451bec55f900b8673d9ddc0be02a61528a Author: Jonathan Cameron Date: Mon Jan 30 15:13:27 2023 +0000 cxl/pci: Set the device timestamp CXL r3.0 section 8.2.9.4.2 "Set Timestamp" recommends that the host sets the timestamp after every Conventional or CXL Reset to ensure accurate timestamps. This should include on initial boot up. The time base that is being set is used by a device for the poison list overflow timestamp and all event timestamps. Note that the command is optional and if not supported and the device cannot return accurate timestamps it will fill the fields in with an appropriate marker (see the specification description of each timestamp). Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20230130151327.32415-1-Jonathan.Cameron@huawei.com Signed-off-by: Dan Williams commit 7ebf38c9115ec3b4502c73b4377a7648374d700f Author: Jonathan Cameron Date: Mon Jan 30 15:34:37 2023 +0000 cxl/mbox: Add missing parameter to docs. Kernel-doc should be complete, so add documentation for the status parameter. Signed-off-by: Jonathan Cameron Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/20230130153437.3153-1-Jonathan.Cameron@huawei.com Signed-off-by: Dan Williams commit 22c40e134c4c7a828ac09d25a5a8597b1e45c031 Author: Joe Thornber Date: Thu Jan 26 10:14:26 2023 +0000 dm cache: Add some documentation to dm-cache-background-tracker.h Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer commit 95ab80a8a0fef2ce0cc494a306dd283948066ce7 Author: Joe Thornber Date: Thu Jan 26 09:59:10 2023 +0000 dm cache: free background tracker's queued work in btracker_destroy Otherwise the kernel can BUG with: [ 2245.426978] ============================================================================= [ 2245.435155] BUG bt_work (Tainted: G B W ): Objects remaining in bt_work on __kmem_cache_shutdown() [ 2245.445233] ----------------------------------------------------------------------------- [ 2245.445233] [ 2245.454879] Slab 0x00000000b0ce2b30 objects=64 used=2 fp=0x000000000a3c6a4e flags=0x17ffffc0000200(slab|node=0|zone=2|lastcpupid=0x1fffff) [ 2245.467300] CPU: 7 PID: 10805 Comm: lvm Kdump: loaded Tainted: G B W 6.0.0-rc2 #19 [ 2245.476078] Hardware name: Dell Inc. PowerEdge R7525/0590KW, BIOS 2.5.6 10/06/2021 [ 2245.483646] Call Trace: [ 2245.486100] [ 2245.488206] dump_stack_lvl+0x34/0x48 [ 2245.491878] slab_err+0x95/0xcd [ 2245.495028] __kmem_cache_shutdown.cold+0x31/0x136 [ 2245.499821] kmem_cache_destroy+0x49/0x130 [ 2245.503928] btracker_destroy+0x12/0x20 [dm_cache] [ 2245.508728] smq_destroy+0x15/0x60 [dm_cache_smq] [ 2245.513435] dm_cache_policy_destroy+0x12/0x20 [dm_cache] [ 2245.518834] destroy+0xc0/0x110 [dm_cache] [ 2245.522933] dm_table_destroy+0x5c/0x120 [dm_mod] [ 2245.527649] __dm_destroy+0x10e/0x1c0 [dm_mod] [ 2245.532102] dev_remove+0x117/0x190 [dm_mod] [ 2245.536384] ctl_ioctl+0x1a2/0x290 [dm_mod] [ 2245.540579] dm_ctl_ioctl+0xa/0x20 [dm_mod] [ 2245.544773] __x64_sys_ioctl+0x8a/0xc0 [ 2245.548524] do_syscall_64+0x5c/0x90 [ 2245.552104] ? syscall_exit_to_user_mode+0x12/0x30 [ 2245.556897] ? do_syscall_64+0x69/0x90 [ 2245.560648] ? do_syscall_64+0x69/0x90 [ 2245.564394] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 2245.569447] RIP: 0033:0x7fe52583ec6b ... [ 2245.646771] ------------[ cut here ]------------ [ 2245.651395] kmem_cache_destroy bt_work: Slab cache still has objects when called from btracker_destroy+0x12/0x20 [dm_cache] [ 2245.651408] WARNING: CPU: 7 PID: 10805 at mm/slab_common.c:478 kmem_cache_destroy+0x128/0x130 Found using: lvm2-testsuite --only "cache-single-split.sh" Ben bisected and found that commit 0495e337b703 ("mm/slab_common: Deleting kobject in kmem_cache_destroy() without holding slab_mutex/cpu_hotplug_lock") first exposed dm-cache's incomplete cleanup of its background tracker work objects. Reported-by: Benjamin Marzinski Tested-by: Benjamin Marzinski Cc: stable@vger.kernel.org # 6.0+ Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer commit c87791bcc455a91e51ca9800faaacc21c8d67785 Author: Mike Snitzer Date: Wed Jan 25 13:01:46 2023 -0500 dm: improve shrinker debug names Commit e33c267ab70d ("mm: shrinkers: provide shrinkers with names") chose some fairly bad names for DM's shrinkers. Fixes: e33c267ab70d ("mm: shrinkers: provide shrinkers with names") Signed-off-by : Mike Snitzer commit f4f0c25e5d726e353369258b5ce28a01bd71aa47 Author: Yishai Hadas Date: Tue Jan 24 16:49:55 2023 +0200 vfio/mlx5: Improve the target side flow to reduce downtime Improve the target side flow to reduce downtime as of below. - Support reading an optional record which includes the expected stop_copy size. - Once the source sends this record data, which expects to be sent as part of the pre_copy flow, prepare the data buffers that may be large enough to hold the final stop_copy data. The above reduces the migration downtime as the relevant stuff that is needed to load the image data is prepared ahead as part of pre_copy. Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20230124144955.139901-4-yishaih@nvidia.com Signed-off-by: Alex Williamson commit b04e2e86e919633825728007484508dbdc44c7bb Author: Yishai Hadas Date: Tue Jan 24 16:49:54 2023 +0200 vfio/mlx5: Improve the source side flow upon pre_copy Improve the source side flow upon pre_copy as of below. - Prepare the stop_copy buffers as part of moving to pre_copy. - Send to the target a record that includes the expected stop_copy size to let it optimize its stop_copy flow as well. As for sending the target this new record type (i.e. MLX5_MIGF_HEADER_TAG_STOP_COPY_SIZE) we split the current 64 header flags bits into 32 flags bits and another 32 tag bits, each record may have a tag and a flag whether it's optional or mandatory. Optional records will be ignored in the target. The above reduces the downtime upon stop_copy as the relevant data stuff is prepared ahead as part of pre_copy. Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20230124144955.139901-3-yishaih@nvidia.com Signed-off-by: Alex Williamson commit caf094b5a156272708b46f423833392af464b664 Author: Shay Drory Date: Tue Jan 24 16:49:53 2023 +0200 vfio/mlx5: Check whether VF is migratable Add a check whether VF is migratable. Only if VF is migratable, mark the VFIO device as migration capable. Signed-off-by: Shay Drory Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20230124144955.139901-2-yishaih@nvidia.com Signed-off-by: Alex Williamson commit e951eaaf839921165b0622bc5338c7bf24131812 Author: ye xingchen Date: Mon Jan 30 10:13:51 2023 +0800 samples: fix the prompt about SAMPLE_VFIO_MDEV_MBOCHS Change the prompt about SAMPLE_VFIO_MDEV_MBOCHS as 'Build VFIO mbochs example mediated device sample code'. Signed-off-by: ye xingchen Link: https://lore.kernel.org/r/202301301013518438986@zte.com.cn Signed-off-by: Alex Williamson commit 038ef0a4765e78c1f08bace52a3f8238b9517b9c Author: Bo Liu Date: Sun Jan 29 03:41:17 2023 -0500 vfio/mdev: Use sysfs_emit() to instead of sprintf() Follow the advice of the Documentation/filesystems/sysfs.rst and show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: Bo Liu Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20230129084117.2384-1-liubo03@inspur.com Signed-off-by: Alex Williamson commit e60259f77c46a6b4733b20f1fb44547d67302c67 Author: Herve Codina Date: Thu Jan 26 09:51:37 2023 +0100 MAINTAINERS: add the Renesas IDT821034 codec entry After contributing the driver, add myself as the maintainer for the Renesas IDT821034 codec. Signed-off-by: Herve Codina Link: https://lore.kernel.org/r/20230126085137.375814-4-herve.codina@bootlin.com Signed-off-by: Mark Brown commit e51166990e81754d2cd30593558c3ff47fa49f15 Author: Herve Codina Date: Thu Jan 26 09:51:36 2023 +0100 ASoC: codecs: Add support for the Renesas IDT821034 codec The Renesas IDT821034 codec is four channel PCM codec with on-chip filters and programmable gain setting. It also provides SLIC (Subscriber Line Interface Circuit) signals as GPIOs. Signed-off-by: Herve Codina Link: https://lore.kernel.org/r/20230126085137.375814-3-herve.codina@bootlin.com Signed-off-by: Mark Brown commit 545679837eef1819aee3868fbb9dfced9a56de02 Author: Herve Codina Date: Thu Jan 26 09:51:35 2023 +0100 ASoC: Add Renesas IDT821034 codec bindings The Renesas IDT821034 codec is a quad PCM codec with programmable gain. Signed-off-by: Herve Codina Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230126085137.375814-2-herve.codina@bootlin.com Signed-off-by: Mark Brown commit 514d7f9df3f409cbb0ad59e726b4923d83251e4f Author: Claudiu Beznea Date: Mon Jan 30 14:06:47 2023 +0200 ASoC: mchp-spdifrx: document data structures Document data structures used by mchp-spdifrx driver. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230130120647.638049-9-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit c7db2a59438959bc881bc5722abf0d0a38681c2b Author: Claudiu Beznea Date: Mon Jan 30 14:06:46 2023 +0200 ASoC: mchp-spdifrx: add runtime pm support Add runtime PM support for Microchip SPDIFRX driver. On runtime suspend the clocks are disabled and regmap is set in caching mode. On runtime resume the clocks are enabled and regmap is synced with the device. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230130120647.638049-8-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit ddce4aeccacb6f575cbfad623da5f0deb2592baf Author: Claudiu Beznea Date: Mon Jan 30 14:06:45 2023 +0200 ASoC: mchp-spdifrx: remove struct mchp_spdifrx_dev::fmt member Remove member fmt of struct mchp_spdifrx_dev as it is not used anywhere. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230130120647.638049-7-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit 36187a67ab931eae8b7d13d80fccd097971b7bac Author: Claudiu Beznea Date: Mon Jan 30 14:06:44 2023 +0200 ASoC: mchp-spdifrx: use unsigned long to store clk_get_rate() value clk_get_rate() returns an unsigned long. Use a variable of type unsigned long to store it. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230130120647.638049-6-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit aaecdc32b7e35b4f9b457fb3509414aa9a932589 Author: Claudiu Beznea Date: Mon Jan 30 14:06:43 2023 +0200 ASoC: mchp-spdifrx: disable all interrupts in mchp_spdifrx_dai_remove() CSC interrupts which might be used in controls are on bits 8 and 9 of SPDIFRX_IDR register. Thus disable all the interrupts that are exported by driver. Fixes: ef265c55c1ac ("ASoC: mchp-spdifrx: add driver for SPDIF RX") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230130120647.638049-5-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit d3681df44e856aab523a6eb7ba15b5e41efcbb1c Author: Claudiu Beznea Date: Mon Jan 30 14:06:42 2023 +0200 ASoC: mchp-spdifrx: fix controls that works with completion mechanism Channel status get and channel subcode get controls relies on data returned by controls when certain IRQs are raised. To achieve that completions are used b/w controls and interrupt service routine. The concurrent accesses to these controls are protected by struct snd_card::controls_rwsem. Issues identified: - reinit_completion() may be called while waiting for completion which should be avoided - in case of multiple threads waiting, the complete() call in interrupt will signal only one waiting thread per interrupt which may lead to timeout for the others - in case of channel status get as the CSC interrupt is not refcounted ISR may disable interrupt for threads that were just enabled it. To solve these the access to controls were protected by a mutex. Along with this there is no need for spinlock to protect the software cache reads/updates b/w controls and ISR as the update is happening only when requested from control, and only one reader can reach the control. Fixes: ef265c55c1ac ("ASoC: mchp-spdifrx: add driver for SPDIF RX") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230130120647.638049-4-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit a4c4161d6eae3ef5f486d1638ef452d9bc1376b0 Author: Claudiu Beznea Date: Mon Jan 30 14:06:41 2023 +0200 ASoC: mchp-spdifrx: fix return value in case completion times out wait_for_completion_interruptible_timeout() returns 0 in case of timeout. Check this into account when returning from function. Fixes: ef265c55c1ac ("ASoC: mchp-spdifrx: add driver for SPDIF RX") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230130120647.638049-3-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit fa09fa60385abbf99342494b280da8b4aebbc0e9 Author: Claudiu Beznea Date: Mon Jan 30 14:06:40 2023 +0200 ASoC: mchp-spdifrx: fix controls which rely on rsr register The SPDIFRX block is clocked by 2 clocks: peripheral and generic clocks. Peripheral clock feeds user interface (registers) and generic clock feeds the receiver. To enable the receiver the generic clock needs to be enabled and also the ENABLE bit of MCHP_SPDIFRX_MR register need to be set. The signal control exported by mchp-spdifrx driver reports wrong status when the receiver is disabled. This can happen when requesting the signal and the capture was not previously started. To solve this the receiver needs to be enabled (by enabling generic clock and setting ENABLE bit of MR register) before reading the signal status. As with this fix there are 2 paths now that need to control the generic clock and ENABLE bit of SPDIFRX_MR register (one path though controls, one path though configuration) a mutex has been introduced. We can't rely on subsystem locking as the controls are protected by struct snd_card::controls_rwsem semaphore and configuration is protected by a different lock (embedded in snd_pcm_stream_lock_irq()). The introduction of mutex is also extended to other controls which rely on SPDIFRX_RSR.ULOCK bit as it has been discovered experimentally that having both clocks enabled but not the receiver (through ENABLE bit of SPDIFRX.MR) leads to inconsistent values of SPDIFRX_RSR.ULOCK. Thus on some controls we rely on software state (dev->trigger_enabled protected by mutex) to retrieve proper values. Fixes: ef265c55c1ac ("ASoC: mchp-spdifrx: add driver for SPDIF RX") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230130120647.638049-2-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit 71bc571c64c13734c69c854e97fb97ac7bf7b54a Author: Randy Dunlap Date: Thu Jan 26 22:39:51 2023 -0800 Documentation: power: correct spelling Correct spelling problems for Documentation/power/ as reported by codespell. Signed-off-by: Randy Dunlap Signed-off-by: Rafael J. Wysocki commit fd9f2a912255106d3b53163d816a4bd99ba29664 Merge: 84798f2849942 429f27e36874e Author: Jason Gunthorpe Date: Mon Jan 30 13:53:04 2023 -0400 Merge branch 'iommu-memory-accounting' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/joro/iommu intoiommufd/for-next Jason Gunthorpe says: ==================== iommufd follows the same design as KVM and uses memory cgroups to limit the amount of kernel memory a iommufd file descriptor can pin down. The various internal data structures already use GFP_KERNEL_ACCOUNT to charge its own memory. However, one of the biggest consumers of kernel memory is the IOPTEs stored under the iommu_domain and these allocations are not tracked. This series is the first step in fixing it. The iommu driver contract already includes a 'gfp' argument to the map_pages op, allowing iommufd to specify GFP_KERNEL_ACCOUNT and then having the driver allocate the IOPTE tables with that flag will capture a significant amount of the allocations. Update the iommu_map() API to pass in the GFP argument, and fix all call sites. Replace iommu_map_atomic(). Audit the "enterprise" iommu drivers to make sure they do the right thing. Intel and S390 ignore the GFP argument and always use GFP_ATOMIC. This is problematic for iommufd anyhow, so fix it. AMD and ARM SMMUv2/3 are already correct. A follow up series will be needed to capture the allocations made when the iommu_domain itself is allocated, which will complete the job. ==================== * 'iommu-memory-accounting' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/s390: Use GFP_KERNEL in sleepable contexts iommu/s390: Push the gfp parameter to the kmem_cache_alloc()'s iommu/intel: Use GFP_KERNEL in sleepable contexts iommu/intel: Support the gfp argument to the map_pages op iommu/intel: Add a gfp parameter to alloc_pgtable_page() iommufd: Use GFP_KERNEL_ACCOUNT for iommu_map() iommu/dma: Use the gfp parameter in __iommu_dma_alloc_noncontiguous() iommu: Add a gfp parameter to iommu_map_sg() iommu: Remove iommu_map_atomic() iommu: Add a gfp parameter to iommu_map() Link: https://lore.kernel.org/linux-iommu/0-v3-76b587fe28df+6e3-iommu_map_gfp_jgg@nvidia.com Signed-off-by: Jason Gunthorpe commit c6535b6ba93477c491e3816af5eed845813c6f3b Author: Mike Leach Date: Fri Jan 20 15:37:06 2023 +0000 perf cs-etm: Update decoder code for OpenCSD version 1.4 OpenCSD version 1.4 is released with support for FEAT_ITE. This adds a new packet type, with associated output element ID in the packet type enum - OCSD_GEN_TRC_ELEM_INSTRUMENTATION. As we just ignore this packet in perf, add to the switch statement to avoid the "enum not handled in switch error", but conditionally so as not to break the perf build for older OpenCSD installations. Reviewed-by: James Clark Signed-off-by: Mike Leach Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230120153706.20388-1-mike.leach@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit dfadf8b315f5cf5d0077181d9882a7e1f3da1749 Author: Naveen N. Rao Date: Wed Jan 25 18:04:42 2023 +0530 perf test: Fix DWARF unwind test by adding non-inline to expected function in a backtrace 'DWARF unwind' 'perf test' can sometimes fail: $ perf test -v 74 Couldn't bump rlimit(MEMLOCK), failures may take place when creating BPF maps, etc 74: Test dwarf unwind : --- start --- test child forked, pid 3785254 Problems creating module maps, continuing anyway... Problems creating module maps, continuing anyway... unwind: test__arch_unwind_sample:ip = 0x102d0ad4c (0x36ad4c) unwind: access_mem addr 0x7fffc33128c8, val 1031c3228, offset 120 unwind: access_mem addr 0x7fffc33128d0, val 12427cc70, offset 128 unwind: test_dwarf_unwind__krava_3:ip = 0x102b8768b (0x1e768b) unwind: access_mem addr 0x7fffc3313048, val 7fffc3313050, offset 2040 unwind: access_mem addr 0x7fffc3313060, val 102b8777c, offset 2064 unwind: test_dwarf_unwind__krava_2:ip = 0x102b8770b (0x1e770b) unwind: access_mem addr 0x7fffc3313088, val 7fffc3313090, offset 2104 unwind: access_mem addr 0x7fffc33130a0, val 102b87890, offset 2128 unwind: test_dwarf_unwind__krava_1:ip = 0x102b8777b (0x1e777b) unwind: access_mem addr 0x7fffc3313108, val 10323a274, offset 2232 unwind: access_mem addr 0x7fffc3313110, val ffffffffffffffff, offset 2240 unwind: access_mem addr 0x7fffc3313118, val 102c08ed0, offset 2248 unwind: access_mem addr 0x7fffc3313120, val 1031db000, offset 2256 unwind: access_mem addr 0x7fffc3313128, val 7fffc3313130, offset 2264 unwind: access_mem addr 0x7fffc3313140, val 102b45ee8, offset 2288 unwind: '':ip = 0x102b8788f (0x1e788f) failed: got unresolved address 0x102b8788f unwind: failed with 'no error' got wrong number of stack entries 0 != 8 test child finished with -1 ---- end ---- Test dwarf unwind: FAILED! We expect to resolve test__dwarf_unwind as the last symbol, but that function can be optimized away: $ objdump -tT /usr/bin/perf | grep dwarf_unwind 000000000083b018 g DO .data 0000000000000040 Base tests__dwarf_unwind 00000000001e7750 g DF .text 0000000000000068 Base 0x60 test_dwarf_unwind__krava_1 00000000001e76e0 g DF .text 0000000000000068 Base 0x60 test_dwarf_unwind__krava_2 00000000001e7620 g DF .text 00000000000000b4 Base 0x60 test_dwarf_unwind__krava_3 00000000001e74f0 g DF .text 0000000000000128 Base 0x60 test_dwarf_unwind__compare 00000000001e7350 g DF .text 000000000000019c Base 0x60 test_dwarf_unwind__thread 000000000083b000 g DO .data 0000000000000018 Base suite__dwarf_unwind Fix this similar to commit fdf7c49c200d1b99 ("perf tests: Fix dwarf unwind for stripped binaries") by marking the function as a global and adding the 'noinline' attribute to it. With this patch: $ objdump -tT perf | grep dwarf_unwind 000000000083b018 g DO .data 0000000000000040 Base tests__dwarf_unwind 00000000001e80f0 g DF .text 0000000000000068 Base 0x60 test_dwarf_unwind__krava_1 00000000001e8080 g DF .text 0000000000000068 Base 0x60 test_dwarf_unwind__krava_2 00000000001e7fc0 g DF .text 00000000000000b4 Base 0x60 test_dwarf_unwind__krava_3 00000000001e7e90 g DF .text 0000000000000128 Base 0x60 test_dwarf_unwind__compare 00000000001e7cf0 g DF .text 000000000000019c Base 0x60 test_dwarf_unwind__thread 00000000001e8160 g DF .text 0000000000000248 Base 0x60 test__dwarf_unwind 000000000083b000 g DO .data 0000000000000018 Base suite__dwarf_unwind $ ./perf test 74 74: Test dwarf unwind : Ok Reported-by: Disha Goel Signed-off-by: Naveen N. Rao Link: http://lore.kernel.org/lkml/20230125123442.107156-1-naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit dec6b801644518d3fac0686a580d10f5b1730afc Author: Bjorn Helgaas Date: Wed Jan 18 17:46:12 2023 -0600 ixgbe: Remove 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 doesn't control interrupt generation by the Root Port; that is controlled by the AER Root Error Command register, which is managed by the AER service driver. Signed-off-by: Bjorn Helgaas Cc: Jesse Brandeburg Cc: Tony Nguyen Cc: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit c3c14ecfe04a78e9512da5cc5e4ef0ff45e8828b Author: Bjorn Helgaas Date: Wed Jan 18 17:46:11 2023 -0600 igc: Remove 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 doesn't control interrupt generation by the Root Port; that is controlled by the AER Root Error Command register, which is managed by the AER service driver. Signed-off-by: Bjorn Helgaas Cc: Jesse Brandeburg Cc: Tony Nguyen Cc: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org Tested-by: Naama Meir Signed-off-by: Tony Nguyen commit 8aea4c325296896a00277e3b71e439013ed1459f Author: Bjorn Helgaas Date: Wed Jan 18 17:46:10 2023 -0600 igb: Remove 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 doesn't control interrupt generation by the Root Port; that is controlled by the AER Root Error Command register, which is managed by the AER service driver. Signed-off-by: Bjorn Helgaas Cc: Jesse Brandeburg Cc: Tony Nguyen Cc: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit ba153552c18d7eb839ec0bad7d7484e29ba4719c Author: Bjorn Helgaas Date: Wed Jan 18 17:46:09 2023 -0600 ice: Remove 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 doesn't control interrupt generation by the Root Port; that is controlled by the AER Root Error Command register, which is managed by the AER service driver. Signed-off-by: Bjorn Helgaas Cc: Jesse Brandeburg Cc: Tony Nguyen Cc: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit bc4fddc3b306b204c5af664656ae62a1f23e2aab Author: Bjorn Helgaas Date: Wed Jan 18 17:46:08 2023 -0600 iavf: Remove 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 doesn't control interrupt generation by the Root Port; that is controlled by the AER Root Error Command register, which is managed by the AER service driver. Signed-off-by: Bjorn Helgaas Cc: Jesse Brandeburg Cc: Tony Nguyen Cc: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit d04d9e769993dff6b74bc4e771d73f93b0c386a4 Author: Bjorn Helgaas Date: Wed Jan 18 17:46:07 2023 -0600 i40e: Remove 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 doesn't control interrupt generation by the Root Port; that is controlled by the AER Root Error Command register, which is managed by the AER service driver. Signed-off-by: Bjorn Helgaas Cc: Jesse Brandeburg Cc: Tony Nguyen Cc: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 3218487afdc4c0bd8b30cfdafdc6f5774b36e91c Author: Bjorn Helgaas Date: Wed Jan 18 17:46:06 2023 -0600 fm10k: Remove 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 doesn't control interrupt generation by the Root Port; that is controlled by the AER Root Error Command register, which is managed by the AER service driver. Signed-off-by: Bjorn Helgaas Cc: Jesse Brandeburg Cc: Tony Nguyen Cc: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org Signed-off-by: Tony Nguyen commit 601f46282cd8e4c05602b5d2f30c67cabe08df96 Author: Bjorn Helgaas Date: Wed Jan 18 17:46:05 2023 -0600 e1000e: Remove 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 doesn't control interrupt generation by the Root Port; that is controlled by the AER Root Error Command register, which is managed by the AER service driver. Signed-off-by: Bjorn Helgaas Cc: Jesse Brandeburg Cc: Tony Nguyen Cc: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org Signed-off-by: Tony Nguyen commit d4bde04318c0d33705e9a77d4c7df72f262011e0 Author: Arnd Bergmann Date: Mon Jan 30 15:01:40 2023 +0100 spi: dw_bt1: fix MUX_MMIO dependencies Selecting a symbol with additional dependencies requires adding the same dependency here: WARNING: unmet direct dependencies detected for MUX_MMIO Depends on [n]: MULTIPLEXER [=y] && OF [=n] Selected by [y]: - SPI_DW_BT1 [=y] && SPI [=y] && SPI_MASTER [=y] && SPI_DESIGNWARE [=y] && (MIPS_BAIKAL_T1 || COMPILE_TEST [=y]) Drop the 'select' here to avoid the problem. Anyone using the dw-bt1 SPI driver should make sure they include the mux driver as well now. Fixes: 7218838109fe ("spi: dw-bt1: Fix undefined devm_mux_control_get symbol") Fixes: abf00907538e ("spi: dw: Add Baikal-T1 SPI Controller glue driver") Link: https://lore.kernel.org/all/20221218192523.c6vnfo26ua6xqf26@mobilestation/ Signed-off-by: Arnd Bergmann Reviewed-by: Serge Semin Link: https://lore.kernel.org/r/20230130140156.3620863-1-arnd@kernel.org Signed-off-by: Mark Brown commit 248c07f92c2c38cb4ba254ea78af0298f6cbbbfe Merge: cdd070a4e1161 682e1c498ae79 Author: Arnd Bergmann Date: Mon Jan 30 18:16:35 2023 +0100 Merge tag 'tegra-for-6.3-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt arm64: tegra: Device tree changes for v6.3-rc1 There are two big changes in this: one is to bump the #address-cells and the #size-cells properties to 2 so that bus address translations work correctly and another to sort nodes according to a scheme that we've been trying to follow, but where some inconsistencies have accumulated over the years. As for the rest, this adds mostly new things on Tegra234, such as USB host and device support and identification EEPROMs found on Jetson AGX Orin. Some cleanups are also included, such as the removal of unneeded properties or duplicated nodes. * tag 'tegra-for-6.3-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Drop I2C iommus and dma-coherent properties arm64: tegra: Mark host1x as dma-coherent on Tegra194/234 arm64: tegra: Populate the XUDC node for Tegra234 arm64: tegra: Add dma-coherent property for Tegra194 XUDC arm64: tegra: Populate Jetson AGX Orin EEPROMs arm64: tegra: Populate address/size cells for Tegra234 I2C arm64: tegra: Enable XUSB host function on Jetson AGX Orin arm64: tegra: Sort nodes by unit-address, then alphabetically arm64: tegra: Bump #address-cells and #size-cells arm64: tegra: Sort includes arm64: tegra: Fix duplicate regulator on Jetson TX1 arm64: tegra: Fix typo in gpio-ranges property Link: https://lore.kernel.org/r/20230127163719.460954-3-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit cdd070a4e1161b8a17eed9d416ab51428600d72a Merge: 3fb0520dcc3a7 d1e34a8abfd6c Author: Arnd Bergmann Date: Mon Jan 30 18:15:48 2023 +0100 Merge tag 'tegra-for-6.3-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt ARM: tegra: Device tree changes for v6.3-rc1 Just a single patch to properly sort nodes and make the DTS files easier to read. * tag 'tegra-for-6.3-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: Sort nodes by unit-address, then alphabetically Link: https://lore.kernel.org/r/20230127163719.460954-2-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 3fb0520dcc3a790574846ce6baeb166275d0aa75 Merge: ad3c046a26f80 6427569ff1476 Author: Arnd Bergmann Date: Mon Jan 30 18:15:19 2023 +0100 Merge tag 'tegra-for-6.3-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt dt-bindings: Changes for v6.3-rc1 Device tree files for 64-bit ARM Tegra SoCs have recently had to bump the #address-cells and #size-cells to 2 in order to support bus address translations across the entire device tree hierarchy. Explicitly allow this in DT schemas to prevent validation errors. * tag 'tegra-for-6.3-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: dt-bindings: tegra: Allow #{address,size}-cells = <2> Link: https://lore.kernel.org/r/20230127163719.460954-1-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit ad3c046a26f80d2660c04c1c9dd68f03a683b84b Merge: edb3f74332c3a 46fe3950ced3f Author: Arnd Bergmann Date: Mon Jan 30 18:14:15 2023 +0100 Merge tag 'renesas-dts-for-v6.3-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas DT updates for v6.3 (take two) - High Performance mode (1.8 GHz) support for the Cortex-A76 CPU cores on R-Car V4H, - GPIO interrupt support for the RZ/G2UL SoC and the RZ/G2UL SMARC EVK development board, - USB Function support for the RZ/N1D SoC, - Generic Sound Card driver examples for the Renesas R-Car Starter Kit Premier/Pro and Shimafugi Kingfisher development board stack, - Universal Flash Storage support for the Renesas Spider development board, - External Power Sequence Controller (PWC) support for the RZ/V2M SoC and the RZ/V2M Evaluation Kit 2.0, - IOMMU support for MMC on the R-Car S4-8 SoC, - Miscellaneous fixes and improvements. * tag 'renesas-dts-for-v6.3-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: (25 commits) arm64: dts: renesas: r8a779f0: Add iommus to MMC node arm64: dts: renesas: v2mevk2: Add PWC support arm64: dts: renesas: r9a09g011: Add PWC support arm64: dts: renesas: r9a09g011: Reword ethernet status arm64: dts: renesas: r8a774[be]1-beacon: Sync aliases with RZ/G2M arm64: dts: renesas: beacon-renesom: Fix audio clock rate arm64: dts: renesas: beacon-renesom: Update Ethernet PHY ID arm64: dts: renesas: beacon-renesom: Fix gpio expander reference arm64: dts: renesas: spider-cpu: Enable UFS device arm64: dts: renesas: Add ulcb{-kf} Simple Audio Card MIX + TDM Split dtsi arm64: dts: renesas: Add ulcb{-kf} Audio Graph Card MIX + TDM Split dtsi arm64: dts: renesas: Add ulcb{-kf} Audio Graph Card2 MIX + TDM Split dtsi arm64: dts: renesas: Add ulcb{-kf} Simple Audio Card dtsi arm64: dts: renesas: Add ulcb{-kf} Audio Graph Card2 dtsi arm64: dts: renesas: Add ulcb{-kf} Audio Graph Card dtsi arm64: dts: renesas: #sound-dai-cells is used when simple-card ARM: dts: renesas: #sound-dai-cells is used when simple-card arm64: dts: renesas: eagle: Add SCIF_CLK support ARM: dts: r9a06g032: Add the USBF controller node arm64: dts: renesas: rzg2ul-smarc-som: Add PHY interrupt support for ETH{0/1} ... Link: https://lore.kernel.org/r/cover.1674815099.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit edb3f74332c3a139596a5ce10de1db6a6b300d40 Merge: 2e0f3acb90401 6e1456f925196 Author: Arnd Bergmann Date: Mon Jan 30 18:12:34 2023 +0100 Merge tag 'renesas-dt-bindings-for-v6.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas DT binding updates for v6.3 - Document support for the Renesas RZ/V2M External Power Sequence Controller (PWC). * tag 'renesas-dt-bindings-for-v6.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: dt-bindings: soc: renesas: Add RZ/V2M PWC Link: https://lore.kernel.org/r/cover.1674815097.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 31e9273912bf5e4c23a876b5dfe0760fbecde92c Author: Amadeusz Sławiński Date: Sat Jan 28 00:11:11 2023 +0100 ASoC: topology: Use unload() op directly struct snd_soc_dobj only needs pointer to the unload function, instead however, there is pointer to all topology operations. Change code to use the function pointer instead of pointer to structure containing all operations. Reviewed-by: Cezary Rojewski Reviewed-by: Ranjani Sridharan Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230127231111.937721-12-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit fdfa3661f830c98fb0f6380c3876fae33bc83b1d Author: Amadeusz Sławiński Date: Sat Jan 28 00:11:10 2023 +0100 ASoC: topology: Unify kcontrol removal code Functions removing bytes, enum and mixer kcontrols are identical. Unify them under one function and use it to free associated kcontrols. Reviewed-by: Cezary Rojewski Reviewed-by: Ranjani Sridharan Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230127231111.937721-11-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit d9b07b790a5c47dd4fd66c9264a3b38a103fa09b Author: Amadeusz Sławiński Date: Sat Jan 28 00:11:09 2023 +0100 ASoC: topology: Remove unnecessary check for EOF Caller already checks if hdr_pos is behind EOF, before calling soc_tplg_valid_header(), so there is no need to recheck it again. This also allows to remove behaviour of return 0 - forcing the caller to break out of while loop. Reviewed-by: Cezary Rojewski Reviewed-by: Ranjani Sridharan Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230127231111.937721-10-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit b784617a407c4f7e079e1694c3161ab29eb4bab1 Author: Amadeusz Sławiński Date: Sat Jan 28 00:11:08 2023 +0100 ASoC: topology: Return an error on complete() failure Function soc_tplg_dapm_complete() detects an error and logs it, but doesn't return failure to the caller, fix it by returning the error. Reviewed-by: Cezary Rojewski Reviewed-by: Ranjani Sridharan Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230127231111.937721-9-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 9e2ee00039a8ff236ae4db2366f4d2325658bea6 Author: Amadeusz Sławiński Date: Sat Jan 28 00:11:07 2023 +0100 ASoC: topology: Pass correct pointer instead of casting Instead of passing address of structure, the containing structure is cast to target structure. While it works - the expected structure is the first field of containing one - it is bad practice, fix this by passing pointer to structure field. Reviewed-by: Cezary Rojewski Reviewed-by: Ranjani Sridharan Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230127231111.937721-8-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 70a7cd09a6368e0c9d351185a8fbfb3bae5a74f3 Author: Amadeusz Sławiński Date: Sat Jan 28 00:11:06 2023 +0100 ASoC: topology: Remove unnecessary forward declarations There is no need to forward declare functions if their use is after their definition. Reviewed-by: Cezary Rojewski Reviewed-by: Ranjani Sridharan Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230127231111.937721-7-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 2abfd4bd7b0700df4996ae2b60a12f22a0ef633d Author: Amadeusz Sławiński Date: Sat Jan 28 00:11:05 2023 +0100 ASoC: topology: Rename remove_ handlers Those are the only functions missing soc_tplg_ prefix, add it for consistency. Reviewed-by: Cezary Rojewski Reviewed-by: Ranjani Sridharan Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230127231111.937721-6-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 23e591dc0f8ce0298857a1445993fa7549a1f2e0 Author: Amadeusz Sławiński Date: Sat Jan 28 00:11:04 2023 +0100 ASoC: topology: Fix function name Functions other than soc_valid_header have soc_tplg_ prefix. Rename function to follow convention in file. Reviewed-by: Cezary Rojewski Reviewed-by: Ranjani Sridharan Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230127231111.937721-5-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 8f9974d9d767d11ce17280bec0d0f2e95e91954d Author: Amadeusz Sławiński Date: Sat Jan 28 00:11:03 2023 +0100 ASoC: topology: Fix typo in functions name Topology is being abbreviated to "tplg", not "tplc", however, few functions have typo in name, fix it. Reviewed-by: Cezary Rojewski Reviewed-by: Ranjani Sridharan Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230127231111.937721-4-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 6257d224b894b676540998ae9563c211410c9436 Author: Amadeusz Sławiński Date: Sat Jan 28 00:11:02 2023 +0100 ASoC: topology: Remove unused SOC_TPLG_PASS_PINS constant The constant is unused, so it can be safely removed. Reviewed-by: Cezary Rojewski Reviewed-by: Ranjani Sridharan Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230127231111.937721-3-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit c5d184c92df2b631fb81fe2ce6e96bfc5ba720e5 Author: Amadeusz Sławiński Date: Sat Jan 28 00:11:01 2023 +0100 ASoC: topology: Properly access value coming from topology file When accessing values coming from topology, le32_to_cpu should be used. One of recent commits missed that. Fixes: 86e2d14b6d1a ("ASoC: topology: Add header payload_size verification") Reviewed-by: Cezary Rojewski Reviewed-by: Ranjani Sridharan Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230127231111.937721-2-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 2e0f3acb904018e64e8b1e2a6b8d10dabc0ebf79 Merge: b453988c59abe a63a420d050d4 Author: Arnd Bergmann Date: Mon Jan 30 17:52:35 2023 +0100 Merge tag 'qcom-arm64-for-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt Qualcomm ARM64 Devicetree updates for v6.3 This introduces support for the new Snapdragon 8 Gen 2 (SM8550) platform. In addition to the adding support for the MTP on this platform, support the following devices is introduced: - GPLUS FL8005A - Google Zombie with LTE and NVMe - Google Zombie with NVMe - Lenovo Tab P11 - Motorola G5 Plus - Motorola G7 Power - Motorola Moto G6 - Samsung Galaxy J5 (2016) - Samsung Galaxy Tab A 8.0 - Samsung Galaxy Tab A 9.7 - Xiaomi Mi A1 - Xiaomi Mi A2 Lite - Xiaomi Redmi 5 Plus - Xiaomi Redmi Note 4X On IPQ8074 the PCIe PHY register regions and PHY clock names are corrected. On MSM8916 DMA for the I2C controllers are introduced and blsp_dma is unconditionally enabled. Per-sensor calibration data is provided for the thermal sensor (tsens) block. The GPLUS FL8005A device is introduced and gains support for touchscreen and flash LED. An additional Samsung Galaxy J5 variant is added, and support is added for hall sensor and MUIC. Per-sensor calibration information is introduced for the thermal sensor on MSM8956 as well. On MSM8996, GPLL0 is added as a possible Kryo clock controller input, a carveout is added to get modem metadata out of System RAM. Missing bus clocks are added for agnoc2. SDHCI1 is enabled on the Sony Xperia Tone platform and USB is limited to high-speed, to make USB work. MSM8998 gains the same modem carveout as other platforms, and the description of the clock hierarchy is improved. On QCS404 the clock hierarchy description is improved, the CDSP PAS node is adjusted to match the binding and the thermal sensor (tsens) gains per-sensor calibration information. On SC7180 the Data Capture and Compare block is intorduced, and a carveout for the modem metadata is introduced, to get this out of System RAM. Pazquel360 gains touchscreen support, the regulator off-on-time is adjusted for the Trogdor eDP and touchscreen. Data lane and frequency properties are introduced for the DisplayPort links. SC7280 also gets Data Capture and Compare support, as well as the dedicated modem metadata region. Herobrine gains DP audio support. IPA description is updated so that it's only active on boards with a modem. On SC8280XP the display subsystem is introduced, currently with support for most of the DisplayPort controllers. GPR, SoundWire and LPASS is introduced, for audio support. Missing I2C and SPI controllers are introduced. Support for EDP is introduced for the CRD, the Lenovo ThinkPad X13s and the SA8295P ADP automotive board. The SA8540P Ride platform enables one i2c and pcie controllers. A CMA region is defined for the CRD and X13s, to avoid allocation issues from the NVMe support. Fairphone FP3 gains NFC support and the Sony Xperia Nile platform gains a description of simplefb. SDM670 gains QFPROM definition. SDM845 gains a carveout for the modem metadata and support for the Data Capture and Compare block is introduced. Lenovo Yoga C630 firmware paths are aligned with all other Qualcomm platforms. On SM6125 apss SMMU is introduced and streams are defined for USB and SDHCI controllers. GPI DMA description is introduced, as well as missing SPI and I2C serial engines. On Sony Xperia 10 IIa regulator definitions are improved, SDHCI2 is introduced, and I2C and related GPI DMA blocks are enabled. On SM6350 IPA is introduced. DDR and L3 scaling is introduced based on CPUfreq. Fairphone FP4, on SM7225 also has IPA enabled, and the Flash LED is enabled as well. On SM8150 the display subsystem is introduced, with clock controller, DPU and two DSI controllers. The Data Capture and Compare block is introduced. For the Sony Xperia Kumano platform, GPIO keys and NFC support is introduced. For SM8350 PCIe is introduced, as is the display subsystem with display clock controller, DPU and two DSI controllers. #interconnect-cells is changed to 2, to align with other platforms and allow for active-only votes. The display is enabled and the LT9611uxc found on the SM8350 Hardware Development Kit board is described, to provide HDMI output. On SM8450 the display subsystem is introduced, with DPU and two DSI controllers. GIC-ITS support is introduced for both PCIe0 and PCIe1. SPMI bus support is introduced and pmics are wired up across the various devices. The display subsystem is enabled and the LT9611uxc is described to provide HDMI output on the SM8450 Hardware Development Kit. On Sony Xperia Nagara platform, GPIO keys and GPIO line names are introduced. As is the SLG51000 PMIC and camera regulators are defined. Support for SM8550 is introduced, with support for storage, USB, remoteprocs, PCIe, low-speed buses, crypto and display subsystem. These blocks are enabled on the MTP. Lastly, the work continue to align Devicetree source with bindings across all platforms. * tag 'qcom-arm64-for-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (320 commits) arm64: dts: qcom: sc7280: Add a carveout for modem metadata arm64: dts: qcom: sc7180: Add a carveout for modem metadata arm64: dts: qcom: sdm845: Add a carveout for modem metadata arm64: dts: qcom: msm8998: Add a carveout for modem metadata arm64: dts: qcom: msm8996: Add a carveout for modem metadata arm64: dts: qcom: ipq8074: correct PCIe QMP PHY output clock names arm64: dts: qcom: ipq8074: fix Gen3 PCIe node arm64: dts: qcom: ipq8074: set Gen2 PCIe pcie max-link-speed arm64: dts: qcom: ipq8074: correct Gen2 PCIe ranges arm64: dts: qcom: ipq8074: fix Gen3 PCIe QMP PHY arm64: dts: qcom: ipq8074: fix Gen2 PCIe QMP PHY arm64: dts: qcom: sdm845-db845c: drop label from I2C controllers arm64: dts: qcom: msm8996: support using GPLL0 as kryocc input arm64: dts: qcom: sm8450: Allow both GIC-ITS and internal MSI controller arm64: dts: qcom: sm8550-mtp: Add USB PHYs and HC nodes arm64: dts: qcom: sm8550: Add USB PHYs and controller nodes arm64: dts: qcom: sm8250: drop unused properties from tx-macro arm64: dts: qcom: sm8250: drop unused clock-frequency from wsa-macro arm64: dts: qcom: align OPP table node name with DT schema arm64: dts: qcom: rename mdp nodes to display-controller ... Link: https://lore.kernel.org/r/20230126202528.3691539-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit de858a05c9d8cecfb294d3cb89e491a36b8688fd Author: Arnd Bergmann Date: Thu Jan 26 22:08:31 2023 +0100 vfio-mdev: add back CONFIG_VFIO dependency CONFIG_VFIO_MDEV cannot be selected when VFIO itself is disabled, otherwise we get a link failure: WARNING: unmet direct dependencies detected for VFIO_MDEV Depends on [n]: VFIO [=n] Selected by [y]: - SAMPLE_VFIO_MDEV_MTTY [=y] && SAMPLES [=y] - SAMPLE_VFIO_MDEV_MDPY [=y] && SAMPLES [=y] - SAMPLE_VFIO_MDEV_MBOCHS [=y] && SAMPLES [=y] /home/arnd/cross/arm64/gcc-13.0.1-nolibc/x86_64-linux/bin/x86_64-linux-ld: samples/vfio-mdev/mdpy.o: in function `mdpy_remove': mdpy.c:(.text+0x1e1): undefined reference to `vfio_unregister_group_dev' /home/arnd/cross/arm64/gcc-13.0.1-nolibc/x86_64-linux/bin/x86_64-linux-ld: samples/vfio-mdev/mdpy.o: in function `mdpy_probe': mdpy.c:(.text+0x149e): undefined reference to `_vfio_alloc_device' Fixes: 8bf8c5ee1f38 ("vfio-mdev: turn VFIO_MDEV into a selectable symbol") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230126211211.1762319-1-arnd@kernel.org Signed-off-by: Alex Williamson commit b453988c59abe1f9cee762b795817bad80348849 Merge: be836a16f4223 d9c36d016f611 Author: Arnd Bergmann Date: Mon Jan 30 17:48:54 2023 +0100 Merge tag 'riscv-dt-for-v6.3-mw0' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into arm/dt RISC-V Devicetrees for v6.3-mw0 Microchip: A vendor prefix for Aldec and both a binding and Devicetree for the Aldec TySoM devkit for PolarFire SoC. This Devicetree corresponds to what they are shipping in the SDK for rev2 boards. StarFive: Just the binding for the new StarFive JH7110 SoC and its first-party SDC the VisionFive 2. Other: I was expecting the Devicetree for the aforementioned board to be ready for this window, as the pinctrl driver had seem some review prior to v6.2 and both it & the base clock drivers are heavily based on the existing drivers for the JH7110. That didn't come to be.. Christmas, the RISC-V Summit in December and the Lunar New Year all playing a part perhaps. Because of that, both Palmer and I have the Kconfig.socs work in our branches, although in hindsight it probably wasn't needed here as I only added the TySoM Devicetree & the conflict would've been trivial. Signed-off-by: Conor Dooley * tag 'riscv-dt-for-v6.3-mw0' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: riscv: dts: microchip: add the Aldec TySoM's devicetree dt-bindings: riscv: microchip: document the Aldec TySoM dt-bindings: vendor-prefixes: Add entry for Aldec RISC-V: stop directly selecting drivers for SOC_CANAAN RISC-V: stop selecting SiFive clock and serial drivers directly RISC-V: stop selecting the PolarFire SoC clock driver RISC-V: kbuild: convert all use of SOC_FOO to ARCH_FOO RISC-V: kconfig.socs: convert usage of SOC_CANAAN to ARCH_CANAAN RISC-V: introduce ARCH_FOO kconfig aliases for SOC_FOO symbols dt-bindings: riscv: Add StarFive JH7110 SoC and VisionFive 2 board Link: https://lore.kernel.org/r/Y9LP+Za1h0fkBa58@spud Signed-off-by: Arnd Bergmann commit be836a16f4223c4245b480540e3456c7ea8e6ca7 Merge: 42bea43c1f91b 34d50b12d6779 Author: Arnd Bergmann Date: Mon Jan 30 17:47:00 2023 +0100 Merge tag 'qcom-dts-for-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt Qualcomm ARM DT updates for v6.3 This introduces support for Acer Iconia Talk S A1-724 The Samsung Galaxy Tab 4 10.1 gains ADSP and backlight support. The Xperia Z2 Tablet gets charging enabled and the touchscreen is given a little bit more time to start up. APQ8064 and MSM8974 gains improvements in clock hierarchy. APQ8064 thermal sensor (tsens) driver gains per-censor calibration data. Lastly a set of patches that improves DT binding compliance. * tag 'qcom-dts-for-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (50 commits) ARM: dts: qcom: msm8226: add RPMCC node ARM: dts: qcom: apq8084: add clocks and clock-names to gcc device ARM: dts: qcom: align OPP table node name with DT schema ARM: dts: qcom: rename mdp nodes to display-controller ARM: dts: qcom-msm8974: rename mdss node to display-subsystem ARM: dts: qcom-msm8974: add SoC specific compat string to mdp5 node dt-bindings: qcom: Document samsung,gt58 and gt510 dt-bindings: qcom: Document bindings for msm8916-samsung-j5x ARM: dts: qcom: use qcom,gsi-loader for IPA ARM: dts: qcom-apq8084: specify per-sensor calibration cells ARM: dts: qcom-msm8974: specify per-sensor calibration cells dt-bindings: arm: qcom: Document MSM8939 SoC binding ARM: dts: qcom: msm8974: add xo clock to rpm clock controller dt-bindings: qcom: Document msm8916-gplus-fl8005a dt-bindings: vendor-prefixes: Add GPLUS ARM: dts: qcom: apq8026-samsung-matisse-wifi: Add display backlight dt-bindings: arm: qcom: Add SM6115(P) and Lenovo Tab P11 ARM: dts: qcom: add missing space before { dt-bindings: arm: qcom: add board-id/msm-id for MSM8956, SDM636 and SM4250 dt-bindings: arm: qcom: Add zombie with NVMe ... Link: https://lore.kernel.org/r/20230126174725.3681745-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 4a6a7bc21d4726c5772e47525e6039852555b391 Author: Ulf Hansson Date: Mon Jan 30 13:12:40 2023 +0100 block: Default to use cgroup support for BFQ Assuming that both Kconfig options, BLK_CGROUP and IOSCHED_BFQ are set, we most likely want cgroup support for BFQ too (BFQ_GROUP_IOSCHED), so let's make it default y. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230130121240.159456-1-ulf.hansson@linaro.org Signed-off-by: Jens Axboe commit 2781f8e9203685208c9f3717593601d4b4674372 Author: Uwe Kleine-König Date: Mon Dec 19 09:10:08 2022 +0100 pwm: lp3943: Drop unused i2c include lp3943 is a platform driver that doesn't use any symbol provided in . So drop the include. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit b56265257d38af5abf43bd5461ca166b401c35a5 Author: Pali Rohár Date: Sat Jan 28 14:41:11 2023 +0100 mtd: rawnand: fsl_elbc: Propagate HW ECC settings to HW It is possible that current chip->ecc.engine_type value does not match to configured HW value (if HW ECC checking and generating is enabled or not). This can happen with old U-Boot bootloader version which either does not initialize NAND (and let it in some default unusable state) or initialize NAND with different parameters than what is specified in kernel DTS file. So if kernel chose to use some chip->ecc.engine_type settings (e.g. from DTS file) then do not depend on bootloader HW configuration and configures HW ECC settings according to chip->ecc.engine_type value. BR_DECC must be set to BR_DECC_CHK_GEN when HW is doing ECC (both generating and checking), or to BR_DECC_OFF when HW is not doing ECC. This change fixes usage of SW ECC support in case bootloader explicitly enabled HW ECC support and kernel DTS file has specified to use SW ECC. (Of course this works only in case when NAND is not a boot device and both bootloader and kernel are loaded from different location, e.g. FLASH NOR.) Fixes: f6424c22aa36 ("mtd: rawnand: fsl_elbc: Make SW ECC work") Signed-off-by: Pali Rohár Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230128134111.32559-1-pali@kernel.org commit 8338304c2719fb7aec8e4b5dd9fa684b719db06e Author: Miquel Raynal Date: Mon Jan 30 16:43:06 2023 +0100 mac802154: Avoid superfluous endianness handling When compiling scan.c with C=1, Sparse complains with: sparse: expected unsigned short [usertype] val sparse: got restricted __le16 [usertype] pan_id sparse: sparse: cast from restricted __le16 sparse: expected unsigned long long [usertype] val sparse: got restricted __le64 [usertype] extended_addr sparse: sparse: cast from restricted __le64 The tool is right, both pan_id and extended_addr already are rightfully defined as being __le16 and __le64 on both sides of the operations and do not require extra endianness handling. Fixes: 3accf4762734 ("mac802154: Handle basic beaconing") Reported-by: kernel test robot Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20230130154306.114265-1-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt commit 724ef01569519d1e7a95231688b6a5f8eaba29f2 Author: Mario Kicherer Date: Thu Jan 26 15:40:50 2023 +0100 mtd: spinand: Add support for AllianceMemory AS5F34G04SND Add support for AllianceMemory AS5F34G04SND SPI NAND flash Datasheet: - https://www.alliancememory.com/wp-content/uploads/pdf/flash/AllianceMemory_SPI_NAND_Flash_July2020_Rev1.0.pdf Signed-off-by: Mario Kicherer Reviewed-by: Dhruva Gole Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230126144050.2656358-1-dev@kicherer.org commit 050bbd6e5822fc5c9da0fc70e52eb9f0cfa406fb Merge: e0530b9ea708d fcdc53aceed41 Author: Arnd Bergmann Date: Mon Jan 30 17:10:26 2023 +0100 Merge tag 'amlogic-drivers-for-v6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into soc/drivers Amlogic Drivers changes for v6.3: - Merge of immutable bindings branch with Reset & power domain binding - Addition of NNA power domain for A311D SoC - meson_sm.txt conversionto dt-schema - mark amlogic,meson-gx-pwrc bindings as deprecated - fix of meson_sm driver by using NULL instead of 0 * tag 'amlogic-drivers-for-v6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: firmware: meson_sm: stop using 0 as NULL pointer dt-bindings: power: amlogic,meson-gx-pwrc: mark bindings as deprecated dt-bindings: firmware: convert meson_sm.txt to dt-schema soc: amlogic: meson-pwrc: Add NNA power domain for A311D dt-bindings: power: Add G12A NNA power domain dt-bindings: reset: meson-g12a: Add missing NNA reset Link: https://lore.kernel.org/r/ec9552d8-96df-a677-ab94-9723f5c30f1c@linaro.org Signed-off-by: Arnd Bergmann commit e0530b9ea708d7d8d2e7764536e95fed15019476 Merge: 938370c6684f0 9ec590a8a1bbf Author: Arnd Bergmann Date: Mon Jan 30 17:09:25 2023 +0100 Merge tag 'imx-drivers-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/drivers i.MX drivers change for 6.3: - A couple of cleanups to drop device_driver owner setting from i.MX93 PD and SRC driver. - A series from Lucas Stach to add high performance PLL clock support for imx8mp-blk-ctrl driver. - A couple of changes to set LCDIF panic read hurry level for i.MX8M blk-ctrl drivers. - Use devm_platform_get_and_ioremap_resource() for imx-weim bus driver. * tag 'imx-drivers-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: soc: imx: imx8mp-blk-ctrl: set HDMI LCDIF panic read hurry level soc: imx: imx93-src: No need to set device_driver owner soc: imx: imx93-pd: No need to set device_driver owner soc: imx: imx8m-blk-ctrl: set LCDIF panic read hurry level soc: imx: imx8mp-blk-ctrl: expose high performance PLL clock soc: imx: imx8mp-blk-ctrl: add instance specific probe function soc: imx: add Kconfig symbols for blk-ctrl drivers bus: imx-weim: use devm_platform_get_and_ioremap_resource() Link: https://lore.kernel.org/r/20230130023947.11780-1-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit c705e63a323a1a6c8d5830c2c3992586ef5fba26 Author: Rob Herring Date: Thu Jan 19 20:04:53 2023 -0600 dt-bindings: mtd: partitions: Fix partition node name pattern The 'partition' node name pattern is missing start and end anchors, so anything is allowed before or after the regex pattern. There's no in tree users needing that, so add anchors to the pattern. Signed-off-by: Rob Herring Reviewed-by: Pratyush Yadav Reviewed-by: Dhruva Gole Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230120020454.3225796-1-robh@kernel.org commit b7810ea80ff0e1f7035c87296eb5ec77e4c13ec7 Author: Stephen Rothwell Date: Mon Jan 30 15:28:18 2023 +1100 driver core: fixup for "driver core: make struct bus_type.uevent() take a const *" After merging the driver-core tree, today's linux-next build (powerpc ppc64_defconfig) failed like this: arch/powerpc/platforms/ps3/system-bus.c:472:19: error: initialization of 'int (*)(const struct device *, struct kobj_uevent_env *)' from incompatible pointer type 'int (*)(struct device *, struct kobj_uevent_env *)' [-Werror=incompatible-pointer-types] 472 | .uevent = ps3_system_bus_uevent, | ^~~~~~~~~~~~~~~~~~~~~ arch/powerpc/platforms/ps3/system-bus.c:472:19: note: (near initialization for 'ps3_system_bus_type.uevent') arch/powerpc/platforms/pseries/ibmebus.c:436:22: error: initialization of 'int (*)(const struct device *, struct kobj_uevent_env *)' from incompatible pointer type 'int (*)(struct device *, struct kobj_uevent_env *)' [-Werror=incompatible-pointer-types] 436 | .uevent = ibmebus_bus_modalias, | ^~~~~~~~~~~~~~~~~~~~ arch/powerpc/platforms/pseries/ibmebus.c:436:22: note: (near initialization for 'ibmebus_bus_type.uevent') Signed-off-by: Stephen Rothwell Fixes: 2a81ada32f0e ("driver core: make struct bus_type.uevent() take a const *") Link: https://lore.kernel.org/r/20230130152818.03c00ea3@canb.auug.org.au Signed-off-by: Greg Kroah-Hartman commit 63ba51db24ed1b8f8088a897290eb6c036c5435d Author: Damien Le Moal Date: Sat Jan 28 10:39:51 2023 +0900 PCI: Avoid FLR for AMD FCH AHCI adapters PCI passthrough to VMs does not work with AMD FCH AHCI adapters: the guest OS fails to correctly probe devices attached to the controller due to FIS communication failures: ata4: softreset failed (1st FIS failed) ... ata4.00: qc timeout after 5000 msecs (cmd 0xec) ata4.00: failed to IDENTIFY (I/O error, err_mask=0x4) Forcing the "bus" reset method before unbinding & binding the adapter to the vfio-pci driver solves this issue, e.g.: echo "bus" > /sys/bus/pci/devices//reset_method gives a working guest OS, indicating that the default FLR reset method doesn't work correctly. Apply quirk_no_flr() to AMD FCH AHCI devices to work around this issue. Link: https://lore.kernel.org/r/20230128013951.523247-1-damien.lemoal@opensource.wdc.com Reported-by: Niklas Cassel Signed-off-by: Damien Le Moal Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org commit faffb0831ad683a33e3b0f2e70eb2957874a71bb Author: Randy Dunlap Date: Thu Jan 26 22:39:39 2023 -0800 Documentation: firmware-guide/ACPI: correct spelling Correct spelling problems for Documentation/firmware-guide/ as reported by codespell. Signed-off-by: Randy Dunlap Signed-off-by: Rafael J. Wysocki commit 7de6c3fb6dfbf9b920caa8cad953d8ac406f6790 Author: Hans de Goede Date: Wed Jan 25 12:38:11 2023 +0100 ACPI: PMIC: Add comments with DSDT power opregion field names The DSDTs of CHT devices using the Dollar Cove TI PMIC, all use LDO1 - LDO14 names for the DSDT power opregion field names. Add comments with these fields to make it easier to see which PMIC registers are being set by ACPI code using these. Note that LDO4 is missing and the mapped registers jump from 0x43 to 0x45 to match. This matches with how the fields are declared in the DSDT where LDO4 is skipped too. Note there is no hole in the field addresses, LDO4 is simply just not defined on either side. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 3e98855ca0cf823330b27f51be41e92fdbaa9057 Author: AngeloGioacchino Del Regno Date: Mon Nov 28 12:20:28 2022 +0100 dt-bindings: pwm: mediatek: Convert pwm-mediatek to DT schema This converts pwm-mediatek.txt to mediatek,mt2712-pwm.yaml schema; while at it, the clock names were clarified as previously they were documented as "pwmX-Y", but valid names are "pwmN" only. Also, the example was changed to use "mediatek,mt2712-pwm" instead for consistency with the schema filename. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding commit 91507d25a67c561f97c34fdd9fdf04e9a1dd7355 Author: Armin Wolf Date: Thu Jan 19 15:21:15 2023 +0100 ACPI: battery: Increase maximum string length On the Dell Inspiron 3505, the battery model name is represented as a hex string containing seven numbers, causing it to be larger than the current maximum string length (32). Increase this length to 64 to avoid truncating the string in such cases. Also introduce a common define for the length. Signed-off-by: Armin Wolf Signed-off-by: Rafael J. Wysocki commit a1a32ded2887fd421d67e9c9b67ae4504bdb08c9 Author: Armin Wolf Date: Thu Jan 19 15:21:14 2023 +0100 ACPI: battery: Fix buffer overread if not NUL-terminated If a buffer containing ASCII characters is not NUL-terminated (which is perfectly legal according to the ACPI specification), the ACPI battery driver might not honor its length. Fix this by limiting the amount of data to be copied to the buffer length while also using strscpy() to make sure that the resulting string is always NUL-terminated. Also replace strncpy() vs strscpy(). Signed-off-by: Armin Wolf Signed-off-by: Rafael J. Wysocki commit 3066bc2d58be31275afb51a589668f265e419c37 Author: Fabrice Gasnier Date: Wed Nov 23 14:36:52 2022 +0100 pwm: stm32-lp: fix the check on arr and cmp registers update The ARR (auto reload register) and CMP (compare) registers are successively written. The status bits to check the update of these registers are polled together with regmap_read_poll_timeout(). The condition to end the loop may become true, even if one of the register isn't correctly updated. So ensure both status bits are set before clearing them. Fixes: e70a540b4e02 ("pwm: Add STM32 LPTimer PWM driver") Signed-off-by: Fabrice Gasnier Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit b3c650ad9bb88ecf36b9aeacf9e7eb7478258da7 Author: Geert Uytterhoeven Date: Mon Nov 21 17:15:41 2022 +0100 pwm: Move pwm_capture() dummy to restore order Move the dummy pwm_capture(), to make the declaration order of all dummies to match the declaration order of the real functions. Signed-off-by: Geert Uytterhoeven Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 334c7b13d38321e47d1a51dba0bef9f4c403ec75 Author: Emil Renner Berthing Date: Wed Nov 9 12:37:24 2022 +0100 pwm: sifive: Always let the first pwm_apply_state succeed Commit 2cfe9bbec56ea579135cdd92409fff371841904f added support for the RGB and green PWM controlled LEDs on the HiFive Unmatched board managed by the leds-pwm-multicolor and leds-pwm drivers respectively. All three colours of the RGB LED and the green LED run from different lines of the same PWM, but with the same period so this works fine when the LED drivers are loaded one after the other. Unfortunately it does expose a race in the PWM driver when both LED drivers are loaded at roughly the same time. Here is an example: | Thread A | Thread B | | led_pwm_mc_probe | led_pwm_probe | | devm_fwnode_pwm_get | | | pwm_sifive_request | | | ddata->user_count++ | | | | devm_fwnode_pwm_get | | | pwm_sifive_request | | | ddata->user_count++ | | ... | ... | | pwm_state_apply | pwm_state_apply | | pwm_sifive_apply | pwm_sifive_apply | Now both calls to pwm_sifive_apply will see that ddata->approx_period, initially 0, is different from the requested period and the clock needs to be updated. But since ddata->user_count >= 2 both calls will fail with -EBUSY, which will then cause both LED drivers to fail to probe. Fix it by letting the first call to pwm_sifive_apply update the clock even when ddata->user_count != 1. Fixes: 9e37a53eb051 ("pwm: sifive: Add a driver for SiFive SoC PWM") Signed-off-by: Emil Renner Berthing Signed-off-by: Thierry Reding commit be6c50d315f92071e481eacd1c0260cb4f7c325f Author: Michael Schmitz Date: Thu Jan 12 16:55:29 2023 +1300 selftests/seccomp: Add m68k support Add m68k seccomp definitions to seccomp_bpf self test code. Tested on ARAnyM. Signed-off-by: Michael Schmitz Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230112035529.13521-4-schmitzmic@gmail.com Signed-off-by: Geert Uytterhoeven commit 6baaade15594b28195da369962208b1f658e7342 Author: Michael Schmitz Date: Thu Jan 12 16:55:28 2023 +1300 m68k: Add kernel seccomp support Add secure_computing() call to syscall_trace_enter to actually filter system calls. Add necessary arch Kconfig options, define TIF_SECCOMP trace flag and provide basic seccomp filter support in asm/syscall.h syscall_get_nr currently uses the syscall nr stored in orig_d0 because we change d0 to a default return code before starting a syscall trace. This may be inconsistent with syscall_rollback copying orig_d0 to d0 (which we never check upon return from trace). We use d0 for the return code from syscall_trace_enter in entry.S currently, and could perhaps expand that to store a new syscall number returned by the seccomp filter before executing the syscall. This clearly needs some discussion. seccomp_bpf self test on ARAnyM passes 81 out of 94 tests. Signed-off-by: Michael Schmitz Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230112035529.13521-3-schmitzmic@gmail.com Signed-off-by: Geert Uytterhoeven commit 2ca8a1de4437f21562e57f9ac123914747a8e7a1 Author: Michael Schmitz Date: Thu Jan 12 16:55:27 2023 +1300 m68k: Check syscall_trace_enter() return code Check return code of syscall_trace_enter(), and skip syscall if -1. Return code will be left at what had been set by ptrace or seccomp (in regs->d0). No regression seen in testing with strace on ARAnyM. Signed-off-by: Michael Schmitz Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230112035529.13521-2-schmitzmic@gmail.com Signed-off-by: Geert Uytterhoeven commit 65a1601609e542e2f392213b121146762edfc19d Author: Geert Uytterhoeven Date: Mon Jan 9 10:04:16 2023 +0100 m68k: defconfig: Update defconfigs for v6.2-rc3 - Drop CONFIG_NFT_OBJREF=m (removed in commit d037abc2414b4539 ("netfilter: nft_objref: make it builtin")), - Drop CONFIG_TEST_STRSCPY=m (replaced by auto-modular CONFIG_STRSCPY_KUNIT_TEST in commit 41eefc46a3a46829 ("string: Convert strscpy() self-test to KUnit")), - Drop CONFIG_TEST_SIPHASH=m (replaced by auto-modular CONFIG_SIPHASH_KUNIT_TEST in commit fb3d88ab354b3b07 ("siphash: Convert selftest to KUnit")). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/fdd3b827ebc5abea6c295df4121048a6a03b698a.1672654705.git.geert@linux-m68k.org Link: https://lore.kernel.org/r/6c4589bc56ffba0f923a7361262397f6c32a3dc1.1673255008.git.geert@linux-m68k.org commit 53fc7e80f3aa9c34d396bcfbcc03a4c0d2eaac96 Author: Shuai Xue Date: Wed Jan 18 14:35:04 2023 +0800 ACPI: APEI: EINJ: Limit error type to 32-bit width The bit map of error types to inject is 32-bit width [1]. Add parameter check to reflect the fact. [1] ACPI Specification 6.4, Section 18.6.4. Error Types Signed-off-by: Shuai Xue Reviewed-by: Tony Luck Signed-off-by: Rafael J. Wysocki commit 40202cca4b0abd05502c4efc5747d3920bc380b5 Author: Xin Gao Date: Mon Jul 18 18:55:53 2022 +0800 m68k: q40: Do not initialise statics to 0 Remove initialization to zero of static variables. Signed-off-by: Xin Gao Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20220718105553.6529-1-gaoxin@cdjrlc.com Signed-off-by: Geert Uytterhoeven commit dbd7a2a941b8cbf9e5f79a777ed9fe0090eebb61 Author: Rob Clark Date: Mon Jan 23 07:37:45 2023 -0800 PM / devfreq: Fix build issues with devfreq disabled The existing no-op shims for when PM_DEVFREQ (or an individual governor) only do half the job. The governor specific config/tuning structs need to be available to avoid compile errors in drivers using devfreq. Fixes: 6563f60f14cb ("drm/msm/gpu: Add devfreq tuning debugfs") Signed-off-by: Rob Clark Acked-by: MyungJoo Ham Acked-by: Chanwoo Choi Patchwork: https://patchwork.freedesktop.org/patch/519801/ Link: https://lore.kernel.org/r/20230123153745.3185032-1-robdclark@gmail.com commit 68efe8f7a1c5168be2228bfb806ddc05475b7205 Author: Mark Brown Date: Fri Jan 6 19:24:19 2023 +0000 KVM: selftests: Fix build of rseq test The KVM rseq test is failing to build in -next due to a commit merged from the tip tree which adds a wrapper for sys_getcpu() to the rseq kselftests, conflicting with the wrapper already included in the KVM selftest: rseq_test.c:48:13: error: conflicting types for 'sys_getcpu' 48 | static void sys_getcpu(unsigned *cpu) | ^~~~~~~~~~ In file included from rseq_test.c:23: ../rseq/rseq.c:82:12: note: previous definition of 'sys_getcpu' was here 82 | static int sys_getcpu(unsigned *cpu, unsigned *node) | ^~~~~~~~~~ Fix this by removing the local wrapper and moving the result check up to the caller. Fixes: 99babd04b250 ("selftests/rseq: Implement rseq numa node id field selftest") Signed-off-by: Mark Brown Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mathieu Desnoyers Link: https://lore.kernel.org/r/20230106-fix-kvm-rseq-build-v1-1-b704d9831d02@kernel.org commit 938370c6684f005da58476202582ab247aff0cbe Merge: d5d39b46f0231 94214f145bdf9 Author: Arnd Bergmann Date: Mon Jan 30 16:22:53 2023 +0100 Merge tag 'arm-soc/for-6.3/drivers' of https://github.com/Broadcom/stblinux into soc/drivers This pull request contains Broadcom ARM/ARM64 SoCs drivers updates for 6.3, please pull the following: - Uwe removes an empty platform driver remove function in the bcm2835-power driver * tag 'arm-soc/for-6.3/drivers' of https://github.com/Broadcom/stblinux: soc: bcm: bcm2835-power: Drop empty platform remove function Link: https://lore.kernel.org/r/20230128193844.1628888-1-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit d5d39b46f0231e3120d78bc79c4cc23075ac1610 Merge: 80dea24a49798 0e30ca5ab0a80 Author: Arnd Bergmann Date: Mon Jan 30 16:12:12 2023 +0100 Merge tag 'sunxi-drivers-for-6.3-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into soc/drivers - introduce Allwinner PPU driver - limit iteration in sram debugfs * tag 'sunxi-drivers-for-6.3-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: soc: sunxi: Add Allwinner D1 PPU driver dt-bindings: power: Add Allwinner D1 PPU soc: sunxi: sram: Only iterate over SRAM children Link: https://lore.kernel.org/r/Y9RXXATRNqEv0GJT@jernej-laptop Signed-off-by: Arnd Bergmann commit 80dea24a49798700ed83b493c5d6e22a6a723b11 Merge: 75dae633c9c0c 0c56f949f626e Author: Arnd Bergmann Date: Mon Jan 30 16:10:29 2023 +0100 Merge tag 'renesas-drivers-for-v6.3-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/drivers Renesas driver updates for v6.3 (take two) - Add support for the Renesas RZ/V2M External Power Sequence Controller (PWC). * tag 'renesas-drivers-for-v6.3-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: soc: renesas: Add PWC support for RZ/V2M Link: https://lore.kernel.org/r/cover.1674815095.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 75dae633c9c0c8d106e97bcf17bec79f652feb2c Merge: 0d01e09022c55 f3460326e38d6 Author: Arnd Bergmann Date: Mon Jan 30 16:08:36 2023 +0100 Merge tag 'riscv-soc-for-v6.3-mw0' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/drivers RISC-V SoC drivers for v6.3-mw0 It's all StarFive stuff this time: Their new JH7110 SoC uses a SiFive core complex, and therefore a SiFive cache controller too. That needed a compatible added to both the binding and driver. The JH7110 also has power domains, which are supported by a new driver and a corresponding dt-binding. Signed-off-by: Conor Dooley * tag 'riscv-soc-for-v6.3-mw0' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: soc: starfive: Add StarFive JH71XX pmu driver dt-bindings: power: Add starfive,jh7110-pmu soc: sifive: ccache: Add StarFive JH7110 support dt-bindings: sifive,ccache0: Support StarFive JH7110 SoC Link: https://lore.kernel.org/r/Y9LNIm9pkr+Owv/e@spud Signed-off-by: Arnd Bergmann commit eed5a3bfafe6840494f7752b5cecd2a610b54fef Author: Andy Shevchenko Date: Thu Jan 12 16:51:40 2023 +0200 gpiolib: of: Move enum of_gpio_flags to its only user GPIO library for OF is the only user for enum of_gpio_flags. Move it there. Signed-off-by: Andy Shevchenko Acked-by: Rob Herring Reviewed-by: Arnd Bergmann Signed-off-by: Bartosz Golaszewski commit 3101b1e4ba3874a7dbcc4da6d788e1408a69a5d7 Author: Uwe Kleine-König Date: Fri Jan 20 08:53:33 2023 +0100 gpio: mvebu: Use IS_REACHABLE instead of IS_ENABLED for CONFIG_PWM To check if a certain function (here e.g. pwmchip_add()) can be called IS_REACHABLE is the better check. The relevant difference to IS_ENABLED is that IS_REACHABLE evaluates to 0 if the current code is builtin but the checked symbol is =m and so must not be used. Today there is no practical impact as CONFIG_PWM is a bool. Signed-off-by: Uwe Kleine-König Signed-off-by: Bartosz Golaszewski commit fd648e1010b1c6f248ae5ed089808f031fedcfba Author: Andy Shevchenko Date: Sat Jan 21 13:18:35 2023 +0200 gpio: zevio: Add missing header The commit 899f6a9c4364 ("gpio: zevio: Use proper headers and drop OF_GPIO dependency") missed one header this driver depends on. Add it. Fixes: 899f6a9c4364 ("gpio: zevio: Use proper headers and drop OF_GPIO dependency") Reported-by: kernel test robot Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit e3863fa123c8fd9647782bc560216c6b910711e8 Author: Linus Walleij Date: Fri Jan 20 10:38:00 2023 +0100 gpio: Get rid of gpio_to_chip() The gpio_to_chip() function refers to the global GPIO numberspace which is a problem we want to get rid of. Get this function out of the header and open code it into gpiolib with appropriate FIXME notices so no new users appear in the kernel. Signed-off-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 51435300df229cab06c3efdd80a303b79278e7a7 Author: Andy Shevchenko Date: Mon Jan 16 14:47:04 2023 +0200 gpio: pcf857x: Drop unneeded explicit casting The s32 is compatible with int, no need to cast. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit e2d181211641598103bcc8a06bade63121b9be49 Author: Andy Shevchenko Date: Mon Jan 16 14:47:03 2023 +0200 gpio: pcf857x: Make use of device properties Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Add mod_devicetable.h include. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 91a0192e90e9df40d4b63c4ce11126114ed5d79d Author: Andy Shevchenko Date: Mon Jan 16 14:47:02 2023 +0200 gpio: pcf857x: Get rid of legacy platform data Platform data is a legacy interface to supply device properties to the driver. In this case we don't have in-kernel users for it. Moreover it uses plain GPIO numbers which is no-no for a new code. Just remove it for good. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit b0047b90db71d0d555d645745b40f0170e5ff4c7 Author: Andy Shevchenko Date: Thu Jan 12 15:46:53 2023 +0200 gpio: rockchip: Do not mention legacy API in the code Replace mentioning of legacy API by the latest one. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit a060dc6620c13435b78e92cd2ebdbb6d11af237a Author: Andy Shevchenko Date: Fri Jan 13 20:26:18 2023 +0200 gpio: wcd934x: Remove duplicate assignment of of_gpio_n_cells The of_gpio_n_cells default is 2 when ->of_xlate() callback is not defined. No need to assign it explicitly in the driver. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 9c8224d04b2ee0c5b9cc6f536fdc23aefff63257 Author: Andy Shevchenko Date: Thu Jan 12 18:39:41 2023 +0200 gpio: zevio: Use proper headers and drop OF_GPIO dependency The driver doesn't depend on the OF_GPIO to be compiled. Hence the proper header to use is mod_devicetable.h. Replace of*.h with the above mentioned and drop redundant dependency. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit a25d1dfdfcad505c49cc19e8ac64d0fcb8d12fa6 Author: Andy Shevchenko Date: Thu Jan 12 18:39:40 2023 +0200 gpio: zevio: Remove duplicate assignment of of_gpio_n_cells The of_gpio_n_cells default is 2 when ->of_xlate() callback is not defined. No need to assign it explicitly in the driver. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 13e856b8dfca9d75dc201829445e44b647d469b4 Author: Andy Shevchenko Date: Thu Jan 12 18:39:51 2023 +0200 gpio: xilinx: Remove duplicate assignment of of_gpio_n_cells The of_gpio_n_cells default is 2 when ->of_xlate() callback is not defined. No need to assign it explicitly in the driver. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 3c0c7b1dc686529f0ab32c6a70c74b694b59bb39 Author: Chunyan Zhang Date: Tue Jan 10 09:49:43 2023 +0800 dt-bindings: gpio: Add compatible string for Unisoc UMS512 UMS512 use the same GPIO and EIC controller with SC9860. Signed-off-by: Chunyan Zhang Reviewed-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit bf26a472a26ea286d8d48810989bbc5af613c581 Author: Chunyan Zhang Date: Tue Jan 10 09:49:42 2023 +0800 dt-bindings: gpio: Convert Unisoc EIC controller binding to yaml Convert the Unisoc EIC controller binding to DT schema format. Update the maxItems of 'reg' property, since the current gpio-eic-sprd driver supports 3 reg items. Also removed a few similar examples. Signed-off-by: Chunyan Zhang Reviewed-by: Rob Herring Signed-off-by: Bartosz Golaszewski commit 59184e1273ebb4cf32c28086faeb12725e417c9f Author: Chunyan Zhang Date: Tue Jan 10 09:49:41 2023 +0800 dt-bindings: gpio: Convert Unisoc GPIO controller binding to yaml Convert the Unisoc gpio controller binding to DT schema format. Signed-off-by: Chunyan Zhang Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bartosz Golaszewski commit 83b9e0fc9ed6129aeb1ac18bee85f17fa32e91e2 Author: Andy Shevchenko Date: Thu Jan 12 18:39:05 2023 +0200 gpio: ge: Remove duplicate assignment of of_gpio_n_cells The of_gpio_n_cells default is 2 when ->of_xlate() callback is not defined. No need to assign it explicitly in the driver. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit e226cb199c3d5bde57a4439cdc0360d900270816 Author: Andy Shevchenko Date: Thu Jan 12 18:38:55 2023 +0200 gpio: davinci: Remove duplicate assignment of of_gpio_n_cells The of_gpio_n_cells default is 2 when ->of_xlate() callback is not defined. No need to assign it explicitly in the driver. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 92bf78b33b0b463b00c6b0203b49aea845daecc8 Author: Andreas Kemnade Date: Fri Jan 13 21:59:22 2023 +0100 gpio: omap: use dynamic allocation of base Static allocatin is deprecated and may cause probe mess, if probe order is unusual. like this example [ 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 So probing was done in an unusual order, causing mess and chips not getting their gpio in the end. Signed-off-by: Andreas Kemnade Signed-off-by: Bartosz Golaszewski commit a5ec171efdc6151d3a51c4e1a59abb3ab9d8b710 Author: Andy Shevchenko Date: Thu Jan 12 15:39:42 2023 +0200 gpio: Remove unused and obsoleted irq_to_gpio() irq_to_gpio() is legacy and unused API, remove it for good. This leaves gpio_to_irq() as it's used yet in many places. Nevertheless, removal of its counterpart is a good signal to whoever even trying to consider using them that do not. Signed-off-by: Andy Shevchenko Acked-by: Geert Uytterhoeven Signed-off-by: Bartosz Golaszewski commit 029d14e900e7766eb2330bd4912dc28c0466db06 Author: Andy Shevchenko Date: Thu Jan 12 15:46:45 2023 +0200 gpio: davinci: Do not mention legacy API in the code Replace mentioning of legacy API by the latest one. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 149a028a5134ab740079bc88ee58c24a7d072ab9 Author: Andy Shevchenko Date: Thu Jan 12 16:45:26 2023 +0200 gpiolib: Remove unused of_mm_gpiochip_add() of_mm_gpiochip_add() is unused API, remove it for good. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 9a7dcaefdb8ab1c2f8558e3a66261165c86c5059 Author: Andy Shevchenko Date: Thu Jan 12 16:17:43 2023 +0200 gpiolib: Do not mention legacy API in the code Replace mentioning of legacy API by the latest one. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 64d2f4594e33b84d4e091efb8b2c3282fe82e72f Author: Radu Rendec Date: Fri Jan 6 11:04:19 2023 -0500 gpio: pcf857x: Implement get_multiple/set_multiple methods This change allows the GPIO core to read/change multiple pins in a single driver call and subsequent I2C transfer. It helps a lot with PCF857x devices, since their I2C protocol always reads/changes all existing pins anyway. Therefore, when the GPIO client code does a bulk operation on multiple pins, the driver makes a single I2C transfer. Signed-off-by: Radu Rendec Signed-off-by: Bartosz Golaszewski commit 17a5f49b49fdd9a5b8b2ed6a30d0b8efc9b1e9b9 Author: Radu Rendec Date: Fri Jan 6 11:04:18 2023 -0500 gpio: pcf857x: Fix indentation of variable declarations No functional changes. This is a whitespace change only. Signed-off-by: Radu Rendec Signed-off-by: Bartosz Golaszewski commit 4628cb0d8e0639e13a36af96f99a0f26dec42d99 Author: Radu Rendec Date: Fri Jan 6 11:04:17 2023 -0500 gpio: pcf857x: Replace 'unsigned' with 'unsigned int' Cosmetic change only to improve the coding style. No functional change, since 'unsigned' and 'unsigned int' are identical as far as the compiler is concerned. Signed-off-by: Radu Rendec Signed-off-by: Bartosz Golaszewski commit 0c27537ad07c178bb2023f1e4e5c49cfcb1a3747 Author: Prathamesh Shete Date: Tue Aug 16 15:57:25 2022 +0530 gpio: tegra186: add Tegra234 PMC compatible in GPIO driver Using this patch we are adding PMC compatible string for Tegra234 in GPIO driver so the IRQ hierarchy can be set. Signed-off-by: Manish Bhardwaj Signed-off-by: Prathamesh Shete Reviewed-by: Linus Walleij Acked-by: Thierry Reding Signed-off-by: Bartosz Golaszewski commit 297a44f664a8ac2139c25c51ba0064cc12a6f1e5 Author: Michael Walle Date: Thu Jan 5 16:06:03 2023 +0100 gpio: regmap: use new regmap_might_sleep() Now that the regmap can be queried whether it might sleep, we can get rid of the conservative setting "can_sleep = true". New drivers which want to use gpio-regmap and can access the registers memory-mapped won't have the restriction that their consumers have to use the gpiod_*cansleep() variants anymore. Signed-off-by: Michael Walle Signed-off-by: Bartosz Golaszewski commit 79aabb1ece8104b114516b059a2e42b33ed38be1 Author: Andy Shevchenko Date: Wed Dec 28 11:20:45 2022 +0200 gpiolib: sort header inclusion alphabetically Sort header inclusion alphabetically. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 70d0fc4288dabd65025fde7774b4f9262afa9034 Author: Andy Shevchenko Date: Wed Dec 28 11:20:44 2022 +0200 gpiolib: Get rid of not used of_node member All new drivers should use fwnode and / or parent to provide the necessary information to the GPIO library. Cc: Thierry Reding Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit dc0989e3aa58dc424a18baf85639248ce9baf818 Author: Andy Shevchenko Date: Wed Dec 28 11:20:43 2022 +0200 gpiolib: Introduce gpio_device_get() and gpio_device_put() Introduce gpio_device_get() and gpio_device_put() helpers and convert existing users. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit f2527d8f566a45fa00ee5abd04d1c9476d4d704f Author: Andy Shevchenko Date: Mon Jan 2 23:08:50 2023 +0200 gpio: Remove unused and obsoleted gpio_export_link() gpio_export_link() is legacy and unused API, remove it for good. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Reviewed-by: Yanteng Si Signed-off-by: Bartosz Golaszewski commit 6f8ecb7f85f441eb7d78ba2a4df45ee8a821934e Author: Haibo Chen Date: Tue Dec 20 17:02:47 2022 +0800 gpio: vf610: connect GPIO label to dev name Current GPIO label is fixed, so can't distinguish different GPIO controllers through labels. Use dev name instead. Fixes: 7f2691a19627 ("gpio: vf610: add gpiolib/IRQ chip driver for Vybrid") Signed-off-by: Clark Wang Signed-off-by: Haibo Chen Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit a3f7c1d6ddcbd487964c58ff246506a781e5be8f Author: Bartosz Golaszewski Date: Fri Dec 30 11:00:44 2022 +0100 gpio: pca9570: rename platform_data to chip_data By convention platform_data refers to structures passed to drivers by code that registers devices. When talking about model-specific data structures associated with OF compatibles, we usually call them chip_data. In order to avoid confusion rename all mentions of platform_data to chip_data. Fixes: fbb19fe17eae ("gpio: pca9570: add slg7xl45106 support") Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij commit 650f2dc970539b3344a98c4bd18efa309e66623b Author: Dmitry Torokhov Date: Mon Dec 19 11:20:16 2022 -0800 gpiolib: of: remove [devm_]gpiod_get_from_of_node() APIs Now that everyone is using [devm_]fwnode_gpiod_get[_index]() APIs, remove OF-specific [devm_]gpiod_get_from_of_node(). Signed-off-by: Dmitry Torokhov Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 40fc56ee608cdb20022c225ac6f1e4b7ba63f8f1 Author: Dmitry Torokhov Date: Mon Dec 19 11:20:15 2022 -0800 gpiolib: of: remove of_get_gpio[_flags]() and of_get_named_gpio_flags() There are no more users of these APIs in the mainline kernel, remove them. This leaves of_get_named_gpio() as the only legacy OF-specific API. Signed-off-by: Dmitry Torokhov Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit f9792ba054f86b9eee1fab017294554914837ab5 Author: Dmitry Torokhov Date: Mon Dec 19 11:20:14 2022 -0800 gpiolib: of: remove obsolete comment for of_gpio_get_count() The function is only being called form the main gpiolib module, so remove comment saying that it is also used by external callers. Signed-off-by: Dmitry Torokhov Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit c7835652a85df183c967f574d1999505ebf80b88 Author: Dmitry Torokhov Date: Mon Dec 19 11:20:13 2022 -0800 gpiolib: of: stop exporting of_gpio_named_count() The only user of this function is gpiolib-of.c so move it there. Signed-off-by: Dmitry Torokhov Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 45e888ef99d9f378c2cbadc3caa4eee1aaf09eac Author: Dmitry Torokhov Date: Mon Dec 19 11:20:12 2022 -0800 gpiolib: of: remove of_gpio_count() There are no more users of of_gpio_count() in the mainline kernel, remove it. Signed-off-by: Dmitry Torokhov Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 1da5aa27bec5defc4f4550edce4b41f80e7accd1 Author: Rob Herring Date: Fri Dec 9 11:16:28 2022 -0600 dt-bindings: gpio: Convert Fujitsu MB86S7x GPIO to DT schema Convert the Fujitsu MB86S7x GPIO binding to DT schema format. The "socionext,synquacer-gpio" compatible was not documented, but is compatible with "fujitsu,mb86s70-gpio" and is in use (in u-boot Synquacer dts). Signed-off-by: Rob Herring Acked-by: Jassi Brar Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bartosz Golaszewski commit 6ecb741e349a909bc4c0430867d2e21bec56714e Author: William Breathitt Gray Date: Tue Dec 27 09:09:46 2022 -0500 gpio: i8255: Remove unused legacy interface All i8255 library consumers have migrated to the new interface leveraging the gpio-regmap API. Legacy interface functions and code are removed as no longer needed. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Signed-off-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski commit 1c05004f99af222fc1bf3eb7fab817efbb1da4d6 Author: William Breathitt Gray Date: Tue Dec 27 09:09:45 2022 -0500 gpio: gpio-mm: Migrate to 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. The gpio-mm module is migrated to the new i8255 library interface leveraging the gpio-regmap API. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Signed-off-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski commit 0b4243406897d819daddc06f5efc793f84d3824c Author: William Breathitt Gray Date: Tue Dec 27 09:09:44 2022 -0500 gpio: 104-dio-48e: Migrate to 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. The 104-dio-48e module is migrated to the new i8255 library interface leveraging the gpio-regmap API. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Signed-off-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski commit 0b7c490d7de3255ad1db82000b42f3f021f6dbf0 Author: William Breathitt Gray Date: Tue Dec 27 09:09:43 2022 -0500 gpio: i8255: Migrate to gpio-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. By leveraging the gpio-regmap API, the i8255 library is reduced to simply a devm_i8255_regmap_register() function, a configuration structure struct i8255_regmap_config, and a helper macro i8255_volatile_regmap_range() provided to simplify volatile PPI register hinting for the regmap. Legacy functions and code will be removed once all consumers have migrated to the new i8255 library interface. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Signed-off-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski commit 59e2131accfd1f4964c766fabdcd19419f1c551b Author: William Breathitt Gray Date: Tue Dec 27 09:09:42 2022 -0500 gpio: 104-idi-48: Migrate to gpio-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. Despite the underlying interface being based on i8255, it is simpler to use the gpio-regmap API directly because the 104-IDI-48 device features only input signals. Therefore, the dependence on the i8255 GPIO library is removed in this patch. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Signed-off-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski commit e28432a773651b753445b1aec927224664156d79 Author: William Breathitt Gray Date: Tue Dec 27 09:09:41 2022 -0500 gpio: 104-idi-48: Migrate to the regmap-irq 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. For the 104-idi-48, we get an IRQ register with some status information and basic masking, but it's broken down by banks rather than individual GPIO. There are six banks (8 GPIO lines each) that correspond to the lower six bits of the IRQ register (bits 0-5): Base Address + 7 (Read): IRQ Status Register/IRQ Clear Bit 0-5: Respective Bank IRQ Statuses Bit 6: IRQ Status (Active Low) Bit 7: IRQ Enable Status Base Address + 7 (Write): IRQ Enable/Disable Bit 0-5: Respective Bank IRQ Enable/Disable Reviewed-by: Andy Shevchenko Signed-off-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski commit 2f7e845f512fdcdafdc922f23a91e560ef33ce4a Author: William Breathitt Gray Date: Tue Dec 27 09:09:40 2022 -0500 gpio: 104-dio-48e: Migrate to the regmap-irq 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. For the 104-dio-48e we have the following IRQ registers (0xB and 0xF): Base Address +B (Write): Enable Interrupt Base Address +B (Read): Disable Interrupt Base Address +F (Read/Write): Clear Interrupt Any write to 0xB will enable interrupts, while any read will disable interrupts. Interrupts are cleared by a write to 0xF. There's no IRQ status register, so software has to assume that if an interrupt is raised then it was for the 104-DIO-48E device. Reviewed-by: Andy Shevchenko Signed-off-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski commit 8978277c229b9502aba4654b1d6ec59c819e82ea Author: William Breathitt Gray Date: Tue Dec 27 09:09:39 2022 -0500 gpio: regmap: Always set gpio_chip get_direction If you only have reg_dat_base set, then it is input-only; if you only have reg_set_base set, then it is output-only. Thus, we can always set gpio_chip get_direction to gpio_regmap_get_direction and return GPIO_LINE_DIRECTION_IN/GPIO_LINE_DIRECTION_OUT given the respective register base addresses configuration. Reviewed-by: Andy Shevchenko Acked-by: Michael Walle Signed-off-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski commit 9eeaa60ead4b6dc84cef012aa9aee3eb48dc4930 Author: Andy Shevchenko Date: Sun Dec 11 00:06:01 2022 +0200 gpio: pca953x: Remove unused PCAL953X_OUT_CONF from pcal6534_recalc_addr() First of all, PCAL953X_OUT_CONF is not used in the driver. Second, it's not a per-bank register, it's a single for the chip and should be handled differently anyway. To avoid confusion, drop PCAL953X_OUT_CONF from pcal6534_recalc_addr(). Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit a87f901b59326c12313dbf224cc4591ae2c63785 Author: Andy Shevchenko Date: Sun Dec 11 00:06:00 2022 +0200 gpio: pca953x: Clean up pcal6534_check_register() The pcal6534_check_register() is a bit too verbose. Clean up it, by deduplicating some operations and switching to the modulo operation as on some architectures / and % can become a single assembly instruction. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit b1453d1eb93fd34848082fd181ff247f19c0ee86 Author: Haibo Chen Date: Sun Dec 11 00:05:59 2022 +0200 gpio: pca953x: avoid logically dead code The current code logic make the condition "else if (reg >= 0x54)" can't be true, cause the dead code. So fix it to match the coder expectation. This is reported by Coverity. Fixes: 13c5d4ce8060 ("gpio: pca953x: Add support for PCAL6534") Signed-off-by: Haibo Chen Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 29f5c6e69f6198219c966acc91f99eb7f2669d61 Author: Uwe Kleine-König Date: Mon Dec 12 23:04:57 2022 +0100 gpio: msc313: 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: Romain Perier Signed-off-by: Bartosz Golaszewski commit 908334ab0be334cd268e2bf6a2384e7f5ffd4aa2 Author: Johan Hovold Date: Tue Dec 13 14:52:27 2022 +0100 gpiolib: use irq_domain_alloc_irqs() Use the irq_domain_alloc_irqs() wrapper instead of the full __irq_domain_alloc_irqs() interface, which was only intended for some legacy (x86) use cases. Signed-off-by: Johan Hovold Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit d4cb3e7113f82f7378527890aa7b4006234665fe Author: Arnd Bergmann Date: Mon Jan 30 14:55:47 2023 +0100 clk: qcom: gcc-qcs404: fix duplicate initializer warning In one of the clocks, a redundant initialization for .num_parents got left behind by a recent patch: drivers/clk/qcom/gcc-qcs404.c:63:32: error: initialized field overwritten [-Werror=override-init] 63 | .num_parents = 1, | ^ Fixes: 2ce81afa0c7c ("clk: qcom: gcc-qcs404: sort out the cxo clock") Signed-off-by: Arnd Bergmann Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230130135555.3268172-1-arnd@kernel.org commit 3e0df6916f6c85174b4deda08726afea2918b367 Author: Krzysztof Kozlowski Date: Wed Jan 25 10:08:49 2023 +0100 dt-bindings: interconnect: samsung,exynos-bus: allow opp-table The opp-table can be located in the exynos-bus node which uses it, so allow such child node. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230125090849.122189-1-krzysztof.kozlowski@linaro.org Signed-off-by: Georgi Djakov commit 8395406b3495235d73c7aa86ef8df97830e036d6 Author: David Howells Date: Mon Dec 19 14:22:12 2022 +0000 rxrpc: Fix trace string Fix a trace string to indicate that it's discarding the local endpoint for a preallocated peer, not a preallocated connection. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit a402d2d55d8b89602c2650d55a51fb076c6ad8bc Author: Bartosz Golaszewski Date: Fri Jan 27 10:26:15 2023 +0100 dt-bindings: interconnect: qcom,sa8775p-rpmh: fix a typo The name of the chip is sa8775p, not sa8875p. Reported-by: Eric Chanudet Link: https://lore.kernel.org/lkml/20230126203618.nbqwppaddncq7on7@echanude/ Fixes: 2579af94c813 ("dt-bindings: interconnect: qcom: document the interconnects for sa8775p") Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20230127092615.39690-1-brgl@bgdev.pl Signed-off-by: Georgi Djakov commit 16700acc328efde9801691b9794266dfcee31d4b Author: Bryan O'Donoghue Date: Mon Jan 23 02:31:23 2023 +0000 dt-bindings: interconnect: Exclude all non msm8939 from snoc-mm New properties should be defined before the allOf. Move the patternProperties definition to before the additionalProperties: false in this file. Exclude all non msm8939 compats from containing a matching patternProperties. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20230123023127.1186619-3-bryan.odonoghue@linaro.org Signed-off-by: Georgi Djakov commit 8d076a992eb86b99afb04980ac4b57e3a79f6704 Author: Steffen Aschbacher Date: Sat Jan 28 10:27:44 2023 +0200 ASoC: dt-bindings: add entry for TAS5720A-Q1 driver Add entry for the TAS5720A-Q1 driver in the dt-bindings doc. Acked-by: Krzysztof Kozlowski Signed-off-by: Steffen Aschbacher Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20230128082744.41849-4-alex@shruggie.ro Signed-off-by: Mark Brown commit 88f748e38b283702a620e635820f1864bf32db0e Author: Steffen Aschbacher Date: Sat Jan 28 10:27:43 2023 +0200 ASoC: tas5720: set bit 7 in ANALOG_CTRL_REG for TAS5720A-Q1 during probe Set the reserved bit 7 in the ANALOG_CTRL_REG for the TAS5720A-Q1 device, when probing. The datasheet mentions that the bit should be 1 during reset/powerup. The device did not initialize before setting this value to 1. So, this could be a quirk of this device. Or it could be a quirk with the board on which it was tested. That is why this patch is separate from the patch that adds support for the TAS5720A-Q1 device. Signed-off-by: Steffen Aschbacher Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20230128082744.41849-3-alex@shruggie.ro Signed-off-by: Mark Brown commit c24a62be09d8a0c7ede1c209055a4ac6760a45ee Author: Steffen Aschbacher Date: Sat Jan 28 10:27:42 2023 +0200 ASoC: codecs: tas5720: add support for TAS5720A-Q1 (automotive) variant This change adds support the TAS5720A-Q1 audio codec, in the same driver as tas5720. Functionally, this driver is pretty similar to it's TAS5720x variant. The first 3 registers are the same, so the main control and device identification can happen with these registers. The next registers differ. This variant offers control (in the registers) for 2 speakers, which is implemented here (in a basic manner). Signed-off-by: Steffen Aschbacher Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20230128082744.41849-2-alex@shruggie.ro Signed-off-by: Mark Brown commit 879142be618c05d234db31cbf69f101c53b7892f Author: Alexandru Ardelean Date: Sat Jan 28 10:27:41 2023 +0200 ASoC: codecs: tas5720: split a tas5720_mute_soc_component() function This is to be re-used in tas5720_mute() (which is part of the dai_ops) and also in the tas5720_fault_check_work() hook. The benefit here isn't too great (now). It's only when we add support for a new device with a slightly different regmap that this becomes more useful. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20230128082744.41849-1-alex@shruggie.ro Signed-off-by: Mark Brown commit 21d64f6f63eeca9f136ac514ca801a5a6485cd78 Author: Marek Vasut Date: Thu Jan 5 15:41:44 2023 +0100 ASoC: dt-bindings: fsl-sai: Simplify the VFxxx dmas binding Get rid of the vf610 sai special case, instead update the vfxxx.dtsi DT to use the same DMA channel ordering as all the other devices. The sai DMA channel ordering has not been aligned with other IP DMA channel ordering in the vfxxx.dtsi anyway. Signed-off-by: Marek Vasut Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230105144145.165010-1-marex@denx.de Signed-off-by: Mark Brown commit 5b28c049ff53cf49e3a97d80cebd2e9c2779ea96 Author: Colin Ian King Date: Mon Jan 30 09:21:57 2023 +0000 ASoC: SMA1303: Fix spelling mistake "Invald" -> "Invalid" There are spelling mistakes in dev_err messages. Fix them. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20230130092157.36446-1-colin.i.king@gmail.com Signed-off-by: Mark Brown commit 55e681c950d89bcc9dc13bc15f5b64393ef58897 Author: Venkata Prasad Potturu Date: Mon Jan 30 15:31:00 2023 +0530 ASoC: amd: acp: Refactor bit width calculation Refactor bit width calculation using params_physical_width() instead hard-code values. Signed-off-by: Venkata Prasad Potturu Link: https://lore.kernel.org/r/20230130100104.4076640-1-venkataprasad.potturu@amd.com Reviewed-by: Peter Ujfalusi Signed-off-by: Mark Brown commit f364beb5b6734cefbfa01a79aacdf6c086082e6a Merge: 79b2027097dd3 f4118dbe61bb3 Author: Rafael J. Wysocki Date: Mon Jan 30 14:13:26 2023 +0100 Merge branch 'thermal-intel' Merge changes affecting thermal control on Intel platforms for 6.3-rc1: - Consolidate code accessing the Intel TCC (Thermal Control Circuitry) MSRs by introducing library functions for that and making the TCC-related code in thermal drivers use them (Zhang Rui). - Enhance the x86_pkg_temp_thermal driver to support dynamic tjmax changes (Zhang Rui). - Address an "unsigned expression compared with zero" warning in the intel_soc_dts_iosf thermal driver (Yang Li). - Update comments regarding two functions in the Intel Menlow thermal driver (Deming Wang). - Use sysfs_emit_at() instead of scnprintf() in the int340x thermal driver (ye xingchen). - Make the intel_pch thermal driver support the Wellsburg PCH (Tim Zimmermann). - Add trip point initialization helper functions for ACPI-defined trip points and modify two thermal drivers to use them (Rafael Wysocki, Daniel Lezcano). - Modify the intel_pch and processor_thermal_device_pci thermal drivers use generic trip point tables instead of thermal zone trip point callbacks (Daniel Lezcano). - Add production mode attribute sysfs attribute to the int340x thermal driver (Srinivas Pandruvada). - Rework dynamic trip point updates handling and locking in the int340x thermal driver (Rafael Wysocki). - Make the int340x thermal driver use a generic trip points table instead of thermal zone trip point callbacks (Rafael Wysocki, Daniel Lezcano). * thermal-intel: thermal: intel: int340x: Use generic trip points table thermal: intel: int340x: Use zone lock for synchronization thermal: intel: int340x: Rework updating trip points thermal: ACPI: Initialize trips if temperature is out of range thermal: intel: processor_thermal_device_pci: Use generic trip point thermal: intel: int340x: Add production mode attribute thermal: intel: intel_pch: Use generic trip points thermal: ACPI: Add ACPI trip point routines thermal: intel: intel_pch: Add support for Wellsburg PCH thermal: int340x_thermal: Use sysfs_emit_at() instead of scnprintf() thermal: intel: menlow: Update function descriptions thermal: intel: Fix unsigned comparison with less than zero thermal/x86_pkg_temp_thermal: Add support for handling dynamic tjmax thermal/x86_pkg_temp_thermal: Use Intel TCC library thermal/intel/intel_tcc_cooling: Use Intel TCC library thermal/intel/intel_soc_dts_iosf: Use Intel TCC library thermal/int340x/processor_thermal: Use Intel TCC library thermal/intel: Introduce Intel TCC library commit 9e8593ec9ef74a4731ab1a07ba0838fc48c98466 Author: Kuninori Morimoto Date: Mon Jan 23 05:27:06 2023 +0000 ASoC: dt-bindings: simple-card: add missing #address-cells/#size-cells In case of using MIXer with Simple Audio Card, it needs below DT. simple-audio-card,dai-link@1 { cpu@0 { ... }; cpu@1 { ... }; ... }; This case, it requires "reg = " which needs #address-cells/#size-cells, but simple-audio-card.yaml is missing these. This patch adds it. Without this patch, we will get below warning. ${LINUX}/arch/arm64/boot/dts/renesas/r8a77950-ulcb.dtb: sound: simple-audio-card,dai-link@0: '#address-cells', '#size-cells' do not match any of the regexes: '^codec(@[0-9a-f]+)?', '^cpu(@[0-9a-f]+)?', 'pinctrl-[0-9]+' From schema: ${LINUX}/Documentation/devicetree/bindings/sound/simple-card.yaml Link: https://lore.kernel.org/r/167344317928.394453.14105689826645262807.robh@kernel.org Reported-by: Rob Herring Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87cz757rdi.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 60cc61a68c98f23f6fe543bd5ad830a815537677 Author: Kuninori Morimoto Date: Mon Jan 23 05:26:07 2023 +0000 ASoC: dt-bindings: renesas,rsnd: #sound-dai-cells is not mandatory Current renesas,rsnd is requesting #sound-dai-cells, but it is needed in case of it is using "simple-card", but not needed in case of "audio-graph". We will get below warning without this patch. This patch fiup it. ${LINUX}/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dtb: sound@ec500000: '#sound-dai-cells' is a required property From schema: ${LINUX}/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87edrl7rf4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f292f4d36744fb8369055d3dd7e50705babdce37 Author: Kuninori Morimoto Date: Mon Jan 23 05:26:01 2023 +0000 ASoC: dt-bindings: renesas,rsnd: tidyup rcar_sound,src Some SRC is not implemented on some SoC, thus interrupts/dmas/dma-names are not mandatory. This patch solve it. Without this patch we will get below error when 'make DT_CHECKER_FLAGS=-m dt_binding_check'. dtschema/dtc warnings/errors: ${LINUX}/Documentation/devicetree/bindings/sound/renesas,rsnd.example.dtb: \ sound@ec500000: Unevaluated properties are not allowed ('rcar_sound,src' was unexpected) From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml Link: https://lore.kernel.org/r/167344317928.394453.14105689826645262807.robh@kernel.org Reported-by: Rob Herring Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87fsc17rfa.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit fcedf6547e650ae42bc4afc15389c840edc2b2f8 Author: Kuninori Morimoto Date: Mon Jan 23 05:25:52 2023 +0000 ASoC: dt-bindings: renesas,rsnd: add missing playback/capture renesas,rsnd.yaml is possible to use ports/port/endpoint if it is using Audio Graph Card/Card2 for sound. The schema is defined under audio-graph-port.yaml. rsnd driver needs "playback/capture" property under endpoint, but it is not defined in audio-graph-port.yaml. This patch adds missing "playback/capture" properties under endpoint. Without this patch, we will get below warning ${LINUX}/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dtb: sound@ec500000: ports:port@0:endpoint: Unevaluated properties are not allowed ('playback', 'capture' were unexpected) From schema: ${LINUX}/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87h6wh7rfj.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2657e28b28aee9da8d7c43ba3022c8fcd446ef59 Author: Kuninori Morimoto Date: Mon Jan 23 05:25:46 2023 +0000 ASoC: dt-bindings: ak4613: enable Of-graph (Audio-Graph-Card) style ak4613 is possible to use Of-graph (Audio-Graph-Card) style, but we need to indicate it. Otherwise we will get below warning. This patch add it. ${LINUX}/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dtb: codec@10: 'port' does not match any of the regexes: '^asahi-kasei,in[1-2]-single-end$', '^asahi-kasei,out[1-6]-single-end$', 'pinctrl-[0-9]+' From schema: ${LINUX}/Documentation/devicetree/bindings/sound/ak4613.yaml Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87ilgx7rfp.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 13a7d9e992fa47bb94f55149a3a3b80e7148dc17 Author: Geert Uytterhoeven Date: Mon Jan 23 05:25:41 2023 +0000 ASoC: dt-bindings: ti,pcm3168a: Convert to json-schema Convert the Texas Instruments PCM3168A Audio Codec Device Tree binding documentation to json-schema. Add missing properties. Drop unneeded pinctrl properties from example. Link: https://lore.kernel.org/r/cover.1669980383.git.geert+renesas@glider.be Link: https://lore.kernel.org/r/87mt7qpylw.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Kuninori Morimoto Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/87k01d7rfv.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f2a7ef1acffee5804c00029d7f273a8b7ca46227 Author: Kuninori Morimoto Date: Mon Jan 23 05:25:29 2023 +0000 ASoC: dt-bindings: audio-graph-port: remove prefix Audio Graph port doesn't use prefix. This patch removes it. Signed-off-by: Kuninori Morimoto Acked-by: Rob Herring Link: https://lore.kernel.org/r/87lelt7rg6.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2f0be75c9ff9351b4968b52e536cef9614ccf4b7 Author: Kuninori Morimoto Date: Mon Jan 23 05:25:19 2023 +0000 ASoC: dt-bindings: audio-graph-port: add clocks on endpoint Audio Graph endpoint is possible to have clocks, and system-clock-xxx, but these are missing on audio-graph-port.yaml. These have been already defined on simple-card.yaml. This patch re-use these. We will get below warning without this patch. ${LINUX}/arch/arm64/boot/dts/renesas/r8a77950-ulcb-kf.dtb: audio-codec@44: ports:port@0:endpoint: Unevaluated properties are not allowed ('clocks' was unexpected) From schema: ${LINUX}/Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml Link: https://lore.kernel.org/r/87pmcmpyml.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87mt697rgg.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit a2fabeaaf5e29df03ff90ec4ad8ecc8663c5ef16 Author: Kuninori Morimoto Date: Mon Jan 23 05:25:11 2023 +0000 ASoC: dt-bindings: audio-graph-port: add missing mclk-fs audio-graph-port is missing "mclk-fs" on ports/port, it is used not only endpoint. It is already defined on simple-card. This patch fixup it. Without this patch, we will get below warning. ${LINUX}/arch/arm64/boot/dts/renesas/r8a77951-ulcb-kf.dtb: audio-codec@44: ports: 'mclk-fs' does not match any of the regexes: '^port@[0-9a-f]+$', 'pinctrl-[0-9]+' From schema: ${LINUX}/Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87o7qp7rgp.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 6a7216db63c884863db8200334ddaf991935ff45 Author: Kuninori Morimoto Date: Mon Jan 23 05:24:58 2023 +0000 ASoC: dt-bindings: audio-graph-port: add definitions/ports Audio Graph user needs "ports" not only "port". This patch adds standard "ports" as definitions to use it easily. If user needs standard "ports", it can use ports: $ref: audio-graph-port.yaml#/definitions/ports If user want to use custom ports, it can re-use audio-graph-port.yaml#/definitions/port-base" audio-graph-port.yaml#/definitions/endpoint-base" Link: https://lore.kernel.org/r/87sfhipynv.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87pmb57rh2.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit bbda859e02a4df3ef3f841c72e55d220ca75f90d Author: Kuninori Morimoto Date: Mon Jan 23 05:23:43 2023 +0000 ASoC: dt-bindings: audio-graph-port: use definitions for port/endpoint Audio Graph base driver might need to add its own properties. In such case, having definitions for port/endpoint is easy to handle it. This patch adds definitions for port/endpoint. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87r0vl7rj4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 79729f26b074a5d2722c27fa76cc45ef721e65cd Author: Evgeniy Baskov Date: Tue Nov 22 14:12:31 2022 +0300 efi/libstub: Add memory attribute protocol definitions EFI_MEMORY_ATTRIBUTE_PROTOCOL servers as a better alternative to DXE services for setting memory attributes in EFI Boot Services environment. This protocol is better since it is a part of UEFI specification itself and not UEFI PI specification like DXE services. Add EFI_MEMORY_ATTRIBUTE_PROTOCOL definitions. Support mixed mode properly for its calls. Tested-by: Mario Limonciello Signed-off-by: Evgeniy Baskov Signed-off-by: Ard Biesheuvel commit 669c4614236a7f78a2b693d0024cbdfa8536eb5a Author: Yabin Cui Date: Fri Jan 27 23:10:01 2023 +0000 coresight: tmc: Don't enable TMC when it's not ready. If TMC ETR is enabled without being ready, in later use we may see AXI bus errors caused by accessing invalid addresses. Signed-off-by: Yabin Cui [ Tweak error message ] Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230127231001.1920947-1-yabinc@google.com commit 78ce3093f055a695bf1dbe1f30adf48b8b19772b Author: Roy-CW.Yeh Date: Wed Jan 18 11:15:09 2023 +0800 soc: mediatek: mmsys: add support for MT8195 VPPSYS Add MT8195 VPPSYS0 and VPPSYS1 driver data. Signed-off-by: Roy-CW.Yeh Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230118031509.29834-5-moudy.ho@mediatek.com Signed-off-by: Matthias Brugger commit 1873da264caedf6b84417ff8cb0f843659f75dac Author: Moudy Ho Date: Wed Jan 18 11:15:07 2023 +0800 dt-bindings: arm: mediatek: mmsys: Add support for MT8195 VPPSYS For MT8195, VPPSYS0 and VPPSYS1 are 2 display pipes with hardware differences in power domains, clocks and subsystem counts, which should be determined by compatible names. Signed-off-by: Moudy Ho Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230118031509.29834-3-moudy.ho@mediatek.com Signed-off-by: Matthias Brugger commit 9cbd5a8abca904441e36861e3a92961bec41d13f Author: Gregory Greenman Date: Fri Jan 27 00:28:21 2023 +0200 wifi: iwlwifi: mei: fix compilation errors in rfkill() The rfkill() callback was invoked with wrong parameters. It was missed since MEI is defined now as depending on BROKEN. Fix that. Fixes: d288067ede4b ("wifi: iwlwifi: mei: avoid blocking sap messages handling due to rtnl lock") Fixes: 5aa7ce31bd84 ("wifi: iwlwifi: mei: make sure ownership confirmed message is sent") Fixes: 95170a46b7dd ("wifi: iwlwifi: mei: don't send SAP commands if AMT is disabled") Link: https://lore.kernel.org/r/20230126222821.305122-2-gregory.greenman@intel.com Signed-off-by: Gregory Greenman commit 09b4c35d73a59c092cf8466958b62cf896786472 Author: Ayala Barazani Date: Fri Jan 27 00:28:20 2023 +0200 wifi: iwlwifi: mvm: Support STEP equalizer settings from BIOS. Read the STEP equalizer parameters from the BIOS during init and transfer it to the firmware. This table provides values to configure an equalizer at the transmitter that can be used to compensate for PCB channel attenuation. Signed-off-by: Ayala Barazani Link: https://lore.kernel.org/r/20230127002430.f25f871c5e17.I8390ab916c8f681229433ebc576ed37a594c6d30@changeid Signed-off-by: Gregory Greenman commit 9ad1e7e5b0c488e4518edd698238a87ac6a73caa Author: Golan Ben Ami Date: Fri Jan 27 00:28:19 2023 +0200 wifi: iwlwifi: bump FW API to 74 for AX devices Start supporting API version 74 for AX devices. Signed-off-by: Golan Ben Ami Link: https://lore.kernel.org/r/20230127002430.80012ee4c5d6.I45ba1f8bf923d242ef2ffeb160d736120c8add65@changeid Signed-off-by: Gregory Greenman commit 9387e3596d42fb9dc5c299aa4226862de858788d Author: Mukesh Sisodiya Date: Fri Jan 27 00:28:18 2023 +0200 wifi: iwlwifi: mvm: Reset rate index if rate is wrong Setting rate index should not depend on net_ratelimit(). Fix that for the case of invalid rate. Signed-off-by: Mukesh Sisodiya Link: https://lore.kernel.org/r/20230127002430.8eede67758bb.I585ab389e27d61153540b7cb5ebed66e21f765f0@changeid Signed-off-by: Gregory Greenman commit 3f7a9d577d47b83b8911f82e37fdd626c91d95cc Author: Mordechay Goodstein Date: Fri Jan 27 00:28:17 2023 +0200 wifi: iwlwifi: mvm: simplify by using SKB MAC header pointer Instead of calculating the offset to the 802.11 header based on radiotap bits and length, shorten the code path by always setting the MAC header in the skb and using skb_mac_header(). Signed-off-by: Mordechay Goodstein Link: https://lore.kernel.org/r/20230127002430.3ec5493934a4.I1d41a2af28588b5899fcd2402f8c4bd8cc29a12e@changeid Signed-off-by: Gregory Greenman commit 0ac93c06dca70f0806099771f96a097fb05efbb8 Author: Mordechay Goodstein Date: Fri Jan 27 00:28:16 2023 +0200 wifi: iwlwifi: mvm: add sniffer meta data APIs We add TSF overwrite for EHT MU/TB high and low, and add definitions for EHT Data 5 meta data. Signed-off-by: Mordechay Goodstein Link: https://lore.kernel.org/r/20230127002430.6729c0be66aa.I95ad94d5e137ec80010facd8ee57cd40461a0721@changeid Signed-off-by: Gregory Greenman commit 8dd51b5ff5e9bb364da71cfff6b771e07b3b583c Author: Mordechay Goodstein Date: Fri Jan 27 00:28:15 2023 +0200 wifi: iwlwifi: rx: add sniffer support for EHT mode Start by adding a parsing option for all the new fields coming from FW and checking that we have the right version for parsing EHT. Signed-off-by: Mordechay Goodstein Link: https://lore.kernel.org/r/20230127002430.ba9b364fbacf.I469af2a07b3ff51cbd8d67e572478f4c56ce22ba@changeid Signed-off-by: Gregory Greenman commit 7d577d76d292f74afaf2f9783e8987734cd71d7f Author: Gregory Greenman Date: Fri Jan 27 00:28:14 2023 +0200 wifi: iwlwifi: mvm: always send nullfunc frames on MGMT queue Non-QOS nullfunc frames should be sent on MGMT queue similarly to the QOS nullfunc frames. It means that the corresponding TID should remain IWL_MAX_TID_COUNT. Make the condition more strict, so the TID won't be changed to IWL_TID_NON_QOS. Link: https://lore.kernel.org/r/20230127002430.a05bf77c9e29.I06262424878232b46fecd58743c889e4c3216bbf@changeid Signed-off-by: Gregory Greenman commit 4de5ceef3647e6c68fa9b9611ce10dfd27f5045d Author: Tom Rix Date: Fri Jan 27 00:28:13 2023 +0200 wifi: iwlwifi: mvm: remove h from printk format specifier This change fixes the checkpatch warning described in this commit commit cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging use of unnecessary %h[xudi] and %hh[xudi]") Standard integer promotion is already done and %hx and %hhx is useless so do not encourage the use of %hh[xudi] or %h[xudi]. Signed-off-by: Tom Rix Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20230127002430.a25158d58fd7.Ibfe217f12a63c1d5349218e74c4b802c70c13c7c@changeid Signed-off-by: Gregory Greenman commit 12de5de4d18869bb226c02e11faa91fa8e84df2c Author: Heiner Kallweit Date: Fri Jan 27 00:28:12 2023 +0200 wifi: iwlwifi: improve tag handling in iwl_request_firmware We can remove the intermediary string conversion and use drv->fw_index in the final snprintf directly. Signed-off-by: Heiner Kallweit Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20230127002430.175bfffdf2f5.I7ec7a29b2d93a977cb0a39dbcc7c875032eb14b7@changeid Signed-off-by: Gregory Greenman commit 24091f873e15e3fe964ea2f86725b77fe920edd5 Author: Emmanuel Grumbach Date: Fri Jan 27 00:28:11 2023 +0200 wifi: iwlwifi: mention the response structure in the kerneldoc Add a comment to mention the structure used for the response for the flush command. Signed-off-by: Emmanuel Grumbach Link: https://lore.kernel.org/r/20230127002430.422c9fbac12c.I2da0954d1c62007b5f01faf06df3e4081e52204f@changeid Signed-off-by: Gregory Greenman commit 23dcee948a5ffa61dec94ceb35896eb28f89b169 Author: Johannes Berg Date: Mon Jan 9 13:07:22 2023 +0200 wifi: iwlwifi: mvm: add minimal EHT rate reporting Now with all the prework, this is fairly simple, just report the new bandwidth and RX_ENC_EHT type in RX, and for now just do a minimal report of the EHT TLC rate in iwl_mvm_set_sta_rate(). Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20230109130329.5f34d73d1f74.Ib27ae7bd23bc152d61021fd73aabdc76679b9fe4@changeid Signed-off-by: Gregory Greenman commit 35bba23e6732a593722c96cbe03ced627f0d8831 Merge: 50028988403ab eede42c9459b5 Author: Mark Brown Date: Mon Jan 30 10:47:16 2023 +0000 Merge remote-tracking branch 'spi/for-6.2' into spi-6.2 commit c200774a6df47cfc1053334c98ab777563de5bd8 Author: AngeloGioacchino Del Regno Date: Thu Oct 6 13:58:16 2022 +0200 soc: mediatek: Introduce mediatek-regulator-coupler driver This driver currently deals with GPU-SRAM regulator coupling, ensuring that the SRAM voltage is always between a specific range of distance to the GPU voltage, depending on the SoC, necessary in order to achieve system stability across the full range of supported GPU frequencies. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Dmitry Osipenko Reviewed-by: Alyssa Rosenzweig Link: https://lore.kernel.org/r/20221006115816.66853-1-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 10e0cbaaf1104f449d695c80bcacf930dcd3c42e Author: Rob Clark Date: Fri Jan 27 12:05:31 2023 -0800 drm/i915: Fix potential bit_17 double-free A userspace with multiple threads racing I915_GEM_SET_TILING to set the tiling to I915_TILING_NONE could trigger a double free of the bit_17 bitmask. (Or conversely leak memory on the transition to tiled.) Move allocation/free'ing of the bitmask within the section protected by the obj lock. Signed-off-by: Rob Clark Fixes: 2850748ef876 ("drm/i915: Pull i915_vma_pin under the vm->mutex") Cc: # v5.5+ [tursulin: Correct fixes tag and added cc stable.] Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20230127200550.3531984-1-robdclark@gmail.com commit c88a15d9dd7dfabe2a13473fd1f9c4b9cd1b62c9 Author: Yang Yingliang Date: Sun Jan 29 16:42:46 2023 +0800 coresight: tpda: fix return value check in tpda_probe() devm_ioremap_resource() never returns NULL pointer, it will return ERR_PTR() when it fails, so replace the check with IS_ERR(). Fixes: 5b7916625c01 ("Coresight: Add TPDA link driver") Signed-off-by: Yang Yingliang [ Fix return value to the PTR_ERR(base) ] Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230129084246.537694-1-yangyingliang@huawei.com commit 90e8ca0abb05ada6c1e2710eaa21688dafca26f2 Merge: 166a1a5a12b05 fb8421a94c561 Author: David S. Miller Date: Mon Jan 30 08:37:46 2023 +0000 Merge branch 'devlink-next' Jakub Kicinski says: ==================== devlink: fix reload notifications and remove features First two patches adjust notifications during devlink reload. The last patch removes no longer needed devlink features. ==================== Signed-off-by: David S. Miller Reviewed-by: Jakub Kicinski commit fb8421a94c5613fee86e192bab0892ecb1d56e4c Author: Jiri Pirko Date: Fri Jan 27 16:50:42 2023 +0100 devlink: remove devlink features Devlink features were introduced to disallow devlink reload calls of userspace before the devlink was fully initialized. The reason for this workaround was the fact that devlink reload was originally called without devlink instance lock held. However, with recent changes that converted devlink reload to be performed under devlink instance lock, this is redundant so remove devlink features entirely. Note that mlx5 used this to enable devlink reload conditionally only when device didn't act as multi port slave. Move the multi port check into mlx5_devlink_reload_down() callback alongside with the other checks preventing the device from reload in certain states. Signed-off-by: Jiri Pirko Reviewed-by: Jacob Keller Signed-off-by: David S. Miller commit a131315a47bbb5e89a3330cac69fe6ab4836f762 Author: Jiri Pirko Date: Fri Jan 27 16:50:41 2023 +0100 devlink: send objects notifications during devlink reload Currently, the notifications are only sent for params. People who introduced other objects forgot to add the reload notifications here. To make sure all notifications happen according to existing comment, benefit from existence of devlink_notify_register/unregister() helpers and use them in reload code. Signed-off-by: Jiri Pirko Reviewed-by: Jacob Keller Signed-off-by: David S. Miller commit 7d7e9169a3ecdc14a4921b2130066ce26952c9e1 Author: Jiri Pirko Date: Fri Jan 27 16:50:40 2023 +0100 devlink: move devlink reload notifications back in between _down() and _up() calls This effectively reverts commit 05a7f4a8dff1 ("devlink: Break parameter notification sequence to be before/after unload/load driver"). Cited commit resolved a problem in mlx5 params implementation, when param notification code accessed memory previously freed during reload. Now, when the params can be registered and unregistered when devlink instance is registered, mlx5 code unregisters the problematic param during devlink reload. The fix is therefore no longer needed. Current behavior is a it problematic, as it sends DEL notifications even in potential case when reload_down() call fails which might confuse userspace notifications listener. So move the reload notifications back where they were originally in between reload_down() and reload_up() calls. Signed-off-by: Jiri Pirko Reviewed-by: Jacob Keller Signed-off-by: David S. Miller commit 34557b7504778e32b166cf46c6f774086124e845 Author: Pali Rohár Date: Sat Jan 28 14:34:58 2023 +0100 powerpc/pci: Enable PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT by default It makes sense to enable CONFIG_PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT by default (when possible by dependencies) to take advantages of all 256 PCI buses on each PCI domain, like it is already on all other kernel architectures. Fixes: 566356813082 ("powerpc/pci: Add config option for using all 256 PCI buses") Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230128133459.32123-1-pali@kernel.org commit acf63c458b55ecfb2015b33dd6ba3cc8fbc1c5d3 Author: Ilpo Järvinen Date: Mon Jan 16 12:08:45 2023 +0200 fpga: m10bmc-sec: Add support for N6000 Add support for PMCI-based flash access path and N6000 sec update support. Access to flash staging area is different for N6000 from that of the SPI interfaced counterparts. Introduce intel_m10bmc_flash_bulk_ops to allow interface specific differentiations for the flash access path for sec update and make m10bmc_sec_read/write() in sec update driver to use the new operations. The .flash_mutex serializes read/read. Flash update (erase+write) must use ->lock/unlock_write() to prevent reads during update (reads would timeout on setting flash MUX as BMC will prevent it). Create a type specific RSU status reg handler for N6000 because the field has moved from doorbell to auth result register. If a failure is detected while altering the flash MUX, it seems safer to try to set it back and doesn't seem harmful. Likely there are enough troubles in that case anyway so setting it back fails too (which is harmless sans the small extra delay) or just confirms that the value wasn't changed. Co-developed-by: Tianfei zhang Signed-off-by: Tianfei zhang Co-developed-by: Russ Weight Signed-off-by: Russ Weight Acked-by: Xu Yilun Signed-off-by: Ilpo Järvinen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230116100845.6153-12-ilpo.jarvinen@linux.intel.com commit 4aea8f30475f472047d2b877e985b343ddc6882f Author: Randy Dunlap Date: Thu Jan 26 22:39:44 2023 -0800 Documentation: leds: Correct spelling Correct spelling problems for Documentation/leds/ as reported by codespell. Signed-off-by: Randy Dunlap Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230127064005.1558-15-rdunlap@infradead.org commit 227e9611cd740ebf2b547ebb2b3b8a7ac80829be Author: Geert Uytterhoeven Date: Sun Jan 22 11:47:27 2023 +0100 dt-bindings: leds: Document Bluetooth and WLAN triggers Add the missing trigger patterns for Bluetooth and WLAN activity, which are already in active use. While at it, move the mmc pattern comment where it belongs, and restore alphabetical sort order. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/0d0de1bc949d24e08174205c13c0b59bd73c1ea8.1674384302.git.geert+renesas@glider.be commit 0ca222c81977c2622ca4ab6ddceeb85a414e1155 Author: Arnd Bergmann Date: Thu Jan 5 14:46:19 2023 +0100 leds: Remove asic3 driver Since ASIC3 MFD driver is removed, the LED support is also obsolete. Signed-off-by: Arnd Bergmann Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230105134622.254560-25-arnd@kernel.org commit c64964ebee2a415384385205950ee7a05f78451e Author: Henning Schild Date: Fri Oct 7 17:33:23 2022 +0200 leds: simatic-ipc-leds-gpio: Make sure we have the GPIO providing driver If we register a "leds-gpio" platform device for GPIO pins that do not exist we get a -EPROBE_DEFER and the probe will be tried again later. If there is no driver to provide that pin we will poll forever and also create a lot of log messages. So check if that GPIO driver is configured, if so it will come up eventually. If not, we exit our probe function early and do not even bother registering the "leds-gpio". This method was chosen over "Kconfig depends" since this way we can add support for more devices and GPIO backends more easily without "depends":ing on all GPIO backends. Fixes: a6c80bec3c93 ("leds: simatic-ipc-leds-gpio: Add GPIO version of Siemens driver") Signed-off-by: Henning Schild Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221007153323.1326-1-henning.schild@siemens.com commit 8f47707acd0b65a9e797bc7288a9183131d5ce74 Author: Andy Shevchenko Date: Thu Jan 19 19:51:50 2023 +0200 leds: tca6507: Convert to use fwnode_device_is_compatible() Replace open coded fwnode_device_is_compatible() in the driver. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230119175150.77250-1-andriy.shevchenko@linux.intel.com commit 265d313ee6072e26f55bb1b5455f6e92424a7989 Author: Andy Shevchenko Date: Tue Jan 3 15:12:55 2023 +0200 leds: syscon: 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 Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230103131256.33894-11-andriy.shevchenko@linux.intel.com commit bf8a9a7684460b1a39bfcf0f45eb758fa367b088 Author: Andy Shevchenko Date: Tue Jan 3 15:12:54 2023 +0200 leds: pm8058: 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 Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230103131256.33894-10-andriy.shevchenko@linux.intel.com commit 0dd37b1cf51e567b63d632dc47efb5de18bd03bf Author: Andy Shevchenko Date: Tue Jan 3 15:12:53 2023 +0200 leds: pca955x: 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 Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230103131256.33894-9-andriy.shevchenko@linux.intel.com commit 43ee1e3fbaa0b815c63409a8bc95cabc07086b8d Author: Andy Shevchenko Date: Tue Jan 3 15:12:52 2023 +0200 leds: mt6360: 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: Matthias Brugger Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230103131256.33894-8-andriy.shevchenko@linux.intel.com commit 99cade83477852e4785524a6914e8a534f6d89b0 Author: Andy Shevchenko Date: Tue Jan 3 15:12:51 2023 +0200 leds: mt6323: 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: AngeloGioacchino Del Regno Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230103131256.33894-7-andriy.shevchenko@linux.intel.com commit e41ff817670edc5a71001352c9cbfdce43aa3bc4 Author: Andy Shevchenko Date: Tue Jan 3 15:12:50 2023 +0200 leds: bcm6358: 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: Florian Fainelli Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230103131256.33894-6-andriy.shevchenko@linux.intel.com commit 67d162e8bf48733c72d0e0cff305c24b8f341b8a Author: Andy Shevchenko Date: Tue Jan 3 15:12:49 2023 +0200 leds: bcm6328: 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: Florian Fainelli Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230103131256.33894-5-andriy.shevchenko@linux.intel.com commit 5ff422a77d1a4e7ec7de063bfd3dabe3b1a70510 Author: Andy Shevchenko Date: Tue Jan 3 15:12:48 2023 +0200 leds: an30259a: 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 Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230103131256.33894-4-andriy.shevchenko@linux.intel.com commit 156a5bb89ca6f3edd2be0bfd0de15e575442927e Author: Andy Shevchenko Date: Tue Jan 3 15:12:47 2023 +0200 leds: Move led_init_default_state_get() to the global header There are users inside and outside LED framework that have implemented a local copy of led_init_default_state_get(). In order to deduplicate that, as the first step move the declaration from LED header to the global one. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230103131256.33894-3-andriy.shevchenko@linux.intel.com commit d35d0c9de762e003129dfc1240df7152a4bc31e8 Author: Andy Shevchenko Date: Tue Jan 3 15:12:46 2023 +0200 leds: Add missing includes and forward declarations in leds.h Add missing includes and forward declarations to leds.h. While at it, replace headers by forward declarations and vise versa. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230103131256.33894-2-andriy.shevchenko@linux.intel.com commit a82c7cf803d98751cd3ddb35828faad925d71982 Author: Andy Shevchenko Date: Wed Dec 28 11:32:38 2022 +0200 leds: is31fl319x: Wrap mutex_destroy() for devm_add_action_or_rest() Clang complains that devm_add_action() takes a parameter with a wrong type: warning: cast from 'void (*)(struct mutex *)' to 'void (*)(void *)' converts to incompatible function type [-Wcast-function-type-strict] err = devm_add_action(dev, (void (*)(void *))mutex_destroy, &is31->lock); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. It appears that the commit e1af5c815586 ("leds: is31fl319x: Fix devm vs. non-devm ordering") missed two things: - whilst the commit mentions devm_add_action_or_reset() the actual change utilised devm_add_action() call by mistake - strictly speaking the parameter is not compatible by type Fix both issues by switching to devm_add_action_or_reset() and adding a wrapper for mutex_destroy() call. Reported-by: kernel test robot Fixes: e1af5c815586 ("leds: is31fl319x: Fix devm vs. non-devm ordering") Signed-off-by: Andy Shevchenko Tested-by: Vincent Knecht Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221228093238.82713-1-andriy.shevchenko@linux.intel.com commit 4934630409cb6042621d760210bbd3d734daba5d Author: Uwe Kleine-König Date: Fri Nov 18 23:40:22 2022 +0100 leds: turris-omnia: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Marek Behún Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-289-uwe@kleine-koenig.org commit cef9efd5b4674e46a6dac4c1685ab4d5cb0d1893 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:21 2022 +0100 leds: tlc591xx: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-288-uwe@kleine-koenig.org commit e916e052ac81558592c881296298d6c54bb5af63 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:20 2022 +0100 leds: tca6507: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-287-uwe@kleine-koenig.org commit 2c6aaf88a265c44d094ab1edd07d2f6b003f5d1b Author: Uwe Kleine-König Date: Fri Nov 18 23:40:19 2022 +0100 leds: pca963x: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-286-uwe@kleine-koenig.org commit 1e1e667fe3871bd52b2c8e6104fec9301a14aeee Author: Uwe Kleine-König Date: Fri Nov 18 23:40:18 2022 +0100 leds: pca9532: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-285-uwe@kleine-koenig.org commit c3dab3a932bd982db791d1f7e09e7dcf5db4dbcd Author: Uwe Kleine-König Date: Fri Nov 18 23:40:17 2022 +0100 leds: lp8860: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-284-uwe@kleine-koenig.org commit bc14a85ec88d62b7bb3ec779a25e6965c354c5d4 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:16 2022 +0100 leds: lp8501: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-283-uwe@kleine-koenig.org commit 6231f926c9ae8fc4895e82119762121060c77542 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:15 2022 +0100 leds: lp5562: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-282-uwe@kleine-koenig.org commit 69674a710c1e222679560debf65df3632576857a Author: Uwe Kleine-König Date: Fri Nov 18 23:40:14 2022 +0100 leds: lp5523: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-281-uwe@kleine-koenig.org commit 4a37cff204945e837da4f76652285cc1c4ced400 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:13 2022 +0100 leds: lp5521: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-280-uwe@kleine-koenig.org commit 1fd9dadcb1c39465b4c5ff45fa1f666a24c3e86f Author: Uwe Kleine-König Date: Fri Nov 18 23:40:12 2022 +0100 leds: lp3952: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-279-uwe@kleine-koenig.org commit 1ba5916064e70095604832f9ed8a9fe9701c2dd5 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:11 2022 +0100 leds: lp3944: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-278-uwe@kleine-koenig.org commit 90955588fff6a56152943831c3c70446b6b907fb Author: Uwe Kleine-König Date: Fri Nov 18 23:40:10 2022 +0100 leds: lm3697: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-277-uwe@kleine-koenig.org commit 4d7b4def01c3d14119e5ef0524f4f726803c034b Author: Uwe Kleine-König Date: Fri Nov 18 23:40:09 2022 +0100 leds: lm3692x: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-276-uwe@kleine-koenig.org commit dc01357c5cf04eb95b742f10a2e9e05146c59a8a Author: Uwe Kleine-König Date: Fri Nov 18 23:40:08 2022 +0100 leds: lm3642: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-275-uwe@kleine-koenig.org commit 0712cb933631c196264b4526e4e9b2d1d022cafa Author: Uwe Kleine-König Date: Fri Nov 18 23:40:07 2022 +0100 leds: lm355x: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-274-uwe@kleine-koenig.org commit 912bcc8af39c4d5313d8dd16ebb9066579502197 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:06 2022 +0100 leds: lm3532: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-273-uwe@kleine-koenig.org commit 5d080668ba3ad5a7e68a4cb1c0709ae279d1a1d3 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:05 2022 +0100 leds: lm3530: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-272-uwe@kleine-koenig.org commit 7d24e11b1de7fc9b5425101ebfec653326eba66b Author: Uwe Kleine-König Date: Fri Nov 18 23:40:04 2022 +0100 leds: is31fl32xx: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-271-uwe@kleine-koenig.org commit 65c084d848cd717d5913032dfa9e9c62ed33babd Author: Uwe Kleine-König Date: Fri Nov 18 23:40:03 2022 +0100 leds: blinkm: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-270-uwe@kleine-koenig.org commit 6900cd261b4d3d81f326c82a8b032d0f78a2030c Author: Uwe Kleine-König Date: Fri Nov 18 23:40:02 2022 +0100 leds: bd2802: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221118224540.619276-269-uwe@kleine-koenig.org commit da1afe8e6099980fe1e2fd7436dca284af9d3f29 Author: Miaoqian Lin Date: Tue Dec 20 16:18:07 2022 +0400 leds: led-core: Fix refcount leak in of_led_get() class_find_device_by_of_node() calls class_find_device(), it will take the reference, use the put_device() to drop the reference when not need anymore. Fixes: 699a8c7c4bd3 ("leds: Add of_led_get() and led_put()") Signed-off-by: Miaoqian Lin Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221220121807.1543790-1-linmq006@gmail.com commit d8960dfb9d6dd940265cd48d7de6ad7060aa6963 Author: Hui Wang Date: Tue Dec 20 15:33:35 2022 +0800 leds: pwm: Clear the led structure before parsing each child node I defined 2 leds in the device tree, in the 1st led node, the max-brightness is set to 248, while in the 2nd led node, I mis-spelled the max-brightness to max-brighttness, but the driver is still able to get the max-brightness 248 for the 2nd node, that is because the led structure is not cleared before parsing each child node. pwmleds { compatible = "pwm-leds"; pwm-green { ... max-brightness = <248>; }; pwm-red { ... max-brighttness = <128>; }; Signed-off-by: Hui Wang Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221220073335.393489-1-hui.wang@canonical.com commit 166a1a5a12b056a389b8dc529033cafaa290ca7c Merge: 5dd3beba22022 1f741f0011608 Author: David S. Miller Date: Mon Jan 30 07:36:23 2023 +0000 Merge branch 'sparx5-ES2-VCAP-support' Steen Hegelund says: ==================== Adding Sparx5 ES2 VCAP support This provides the Egress Stage 2 (ES2) VCAP (Versatile Content-Aware Processor) support for the Sparx5 platform. The ES2 VCAP is an Egress Access Control VCAP that uses frame keyfields and previously classified keyfields to apply e.g. policing, trapping or mirroring to frames. The ES2 VCAP has 2 lookups and they are accessible with a TC chain id: - chain 20000000: ES2 Lookup 0 - chain 20100000: ES2 Lookup 1 As the other Sparx5 VCAPs the ES2 VCAP has its own lookup/port keyset configuration that decides which keys will be used for matching on which traffic type. The ES2 VCAP has these traffic classifications: - IPv4 frames - IPv6 frames - Other frames The ES2 VCAP can match on an ISDX key (Ingress Service Index) as one of the frame metadata keyfields. The IS0 VCAP can update this key using its actions, and this allows a IS0 VCAP rule to be linked to an ES2 rule. This is similar to how the IS0 VCAP and the IS2 VCAP use the PAG (Policy Association Group) keyfield to link rules. From user space this is exposed via "chain offsets", so an IS0 rule with a "goto chain 20000015" action will use an ISDX key value of 15 to link to a rule in the ES2 VCAP attached to the same chain id. ==================== Signed-off-by: David S. Miller commit 1f741f0011608ddbf4761c9bb8e2c4ecf6d6dedb Author: Steen Hegelund Date: Fri Jan 27 14:08:30 2023 +0100 net: microchip: sparx5: Add KUNIT tests for enabling/disabling chains This enhances the KUNIT test of the VCAP API with tests of the chaining functionality. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit 7b911a5311b8d473832a6d0b6f3da88e48011894 Author: Steen Hegelund Date: Fri Jan 27 14:08:29 2023 +0100 net: microchip: sparx5: Add TC support for the ES2 VCAP This enables the TC command to use the Sparx5 ES2 VCAP, and provides a new ES2 ethertype table and handling of rule links between IS0 and ES2. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit e7e3f514713e87a2c09d774aec88c2a9b117e76f Author: Steen Hegelund Date: Fri Jan 27 14:08:28 2023 +0100 net: microchip: sparx5: Add ingress information to VCAP instance This allows the check of the goto action to be specific to the ingress and egress VCAP instances. The debugfs support is also updated to show this information. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit b95d9e2c20c912806f5427d7bbf1a63207575f13 Author: Steen Hegelund Date: Fri Jan 27 14:08:27 2023 +0100 net: microchip: sparx5: Add ES2 VCAP keyset configuration for Sparx5 This adds the ES2 VCAP port keyset configuration for Sparx5 and also updates the debugFS support to show the keyset configuration and the egress port mask. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit 9d712b8ddbb47ee8e51d08a7326e446880f895c7 Author: Steen Hegelund Date: Fri Jan 27 14:08:26 2023 +0100 net: microchip: sparx5: Add ES2 VCAP model and updated KUNIT VCAP model This provides the VCAP model for the Sparx5 ES2 (Egress Stage 2) VCAP. This VCAP provides tagging and remarking functionality This also renames a VCAP keyfield: VCAP_KF_MIRROR_ENA becomes VCAP_KF_MIRROR_PROBE, as the first name was caused by a mistake in the model transformation. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit a5300724ce7368ad324000c2aa205f60c1e58631 Author: Steen Hegelund Date: Fri Jan 27 14:08:25 2023 +0100 net: microchip: sparx5: Improve error message when parsing CVLAN filter This improves the error message when a TC filter with CVLAN tag is used and the selected VCAP instance does not support this. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit 4114ef2ce27383e3c14f68f56f3ec731ab6421a2 Author: Steen Hegelund Date: Fri Jan 27 14:08:24 2023 +0100 net: microchip: sparx5: Improve the IP frame key match for IPv6 frames This ensures that it will be possible for a VCAP rule to distinguish IPv6 frames from non-IP frames, as the IS0 keyset usually selected for the IPv6 traffic class in (7TUPLE) does not offer a key that specifies IPv6 directly: only non-IPv4. The IP_SNAP key ensures that we select (at least) IP frames. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit c02b19edc78dceef9508e6db9ef45a5f7a0d257b Author: Steen Hegelund Date: Fri Jan 27 14:08:23 2023 +0100 net: microchip: sparx5: Add support for getting keysets without a type id When there is only one keyset available for a certain VCAP rule size, the particular keyset does not need a type id when encoded in the VCAP Hardware. This provides support for getting a keyset from a rule, when this is the case: only one keyset fits this rule size. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit 5dd3beba220224bd3539243d68d6bf322478d5a8 Merge: 5c0862c2c9620 0c4061c0d0e2c Author: David S. Miller Date: Mon Jan 30 07:33:06 2023 +0000 Merge tag 'batadv-next-pullrequest-20230127' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== This feature/cleanup patchset includes the following patches: - bump version strings, by Simon Wunderlich - drop prandom.h includes, by Sven Eckelmann - fix mailing list address, by Sven Eckelmann - multicast feature preparation, by Linus Lüssing (2 patches) ==================== Signed-off-by: David S. Miller commit 5c0862c2c962052ed5055220a00ac1cefb92fbcd Author: Florian Fainelli Date: Thu Jan 26 16:08:19 2023 -0800 net: bcmgenet: Add a check for oversized packets Occasionnaly we may get oversized packets from the hardware which exceed the nomimal 2KiB buffer size we allocate SKBs with. Add an early check which drops the packet to avoid invoking skb_over_panic() and move on to processing the next packet. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 5746ca131e2496ccd5bb4d7a0244d6c38070cbf5 Author: Nicholas Piggin Date: Sat Jan 21 20:26:18 2023 +1000 powerpc/64: Don't recurse irq replay Interrupt handlers called by soft-pending irq replay code can run softirqs, softirq replay enables and disables local irqs, which allows interrupts to come in including soft-masked interrupts, and it can cause pending irqs to be replayed again. That makes the soft irq replay state machine and possible races more complicated and fragile than it needs to be. Use irq_enter/irq_exit around irq replay to prevent softirqs running while interrupts are being replayed. Softirqs will now be run at the irq_exit() call after all the irq replaying is done. This prevents irqs being replayed while irqs are being replayed, and should hopefully make things simpler and easier to think about and debug. A new PACA_IRQ_REPLAYING is added to prevent asynchronous interrupt handlers hard-enabling EE while pending irqs are being replayed, because that causes new pending irqs to arrive which is also a complexity. This means pending irqs won't be profiled quite so well because perf irqs can't be taken. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230121102618.2824429-1-npiggin@gmail.com commit 468ba54bd616db995514f9671ac116eb4b62e0ea Author: Arnd Bergmann Date: Thu Jan 26 22:05:59 2023 +0100 fec: convert to gpio descriptor The driver can be trivially converted, as it only triggers the gpio pin briefly to do a reset, and it already only supports DT. Signed-off-by: Arnd Bergmann Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 453d9fdc364b87601df168c962e93407fbe5e91a Author: Heiner Kallweit Date: Thu Jan 26 21:39:16 2023 +0100 net: mdio: mux-meson-g12a: use __clk_is_enabled to simplify the code By using __clk_is_enabled () we can avoid defining an own variable for tracking whether enable counter is zero. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit bab537805a10bdbf55b31324ba4a9599e0651e5e Author: Christophe Leroy Date: Mon Jan 23 13:26:46 2023 +0100 powerpc: Check !irq instead of irq == NO_IRQ and remove NO_IRQ NO_IRQ is a relic from the old days. It is not used anymore in core functions. By the way, function irq_of_parse_and_map() returns value 0 on error. In some drivers, NO_IRQ is erroneously used to check the return of irq_of_parse_and_map(). It is not a real bug today because the only architectures using the drivers being fixed by this patch define NO_IRQ as 0, but there are architectures which define NO_IRQ as -1. If one day those architectures start using the non fixed drivers, there will be a problem. Long time ago Linus advocated for not using NO_IRQ, see https://lore.kernel.org/all/Pine.LNX.4.64.0511211150040.13959@g5.osdl.org He re-iterated the same view recently in https://lore.kernel.org/all/CAHk-=wg2Pkb9kbfbstbB91AJA2SF6cySbsgHG-iQMq56j3VTcA@mail.gmail.com So test !irq instead of tesing irq == NO_IRQ. All other usage of NO_IRQ for powerpc were removed in previous cycles so the time has come to remove NO_IRQ completely for powerpc. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/4b8d4f96140af01dec3a3330924dda8b2451c316.1674476798.git.christophe.leroy@csgroup.eu commit 12fd66651df6c807b7b6f420ee0fd420f54991f4 Author: Nathan Lynch Date: Tue Jan 24 08:04:48 2023 -0600 powerpc/rtas: upgrade internal arch spinlocks At the time commit f97bb36f705d ("powerpc/rtas: Turn rtas lock into a raw spinlock") was written, the spinlock lockup detection code called __delay(), which will not make progress if the timebase is not advancing. Since the interprocessor timebase synchronization sequence for chrp, cell, and some now-unsupported Power models can temporarily freeze the timebase through an RTAS function (freeze-time-base), the lock that serializes most RTAS calls was converted to arch_spinlock_t to prevent kernel hangs in the lockup detection code. However, commit bc88c10d7e69 ("locking/spinlock/debug: Remove spinlock lockup detection code") removed that inconvenient property from the lock debug code several years ago. So now it should be safe to reintroduce generic locks into the RTAS support code, primarily to increase lockdep coverage. Making rtas_lock a spinlock_t would violate lock type nesting rules because it can be acquired while holding raw locks, e.g. pci_lock and irq_desc->lock. So convert it to raw_spinlock_t. There's no apparent reason not to upgrade timebase_lock as well. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230124140448.45938-5-nathanl@linux.ibm.com commit 599af49155467148afaf0bc3c0114bd80fd4491f Author: Nathan Lynch Date: Tue Jan 24 08:04:47 2023 -0600 powerpc/rtas: remove lock and args fields from global rtas struct Only code internal to the RTAS subsystem needs access to the central lock and parameter block. Remove these from the globally visible 'rtas' struct and make them file-static in rtas.c. Some changed lines in rtas_call() lack appropriate spacing around operators and cause checkpatch errors; fix these as well. Suggested-by: Laurent Dufour Signed-off-by: Nathan Lynch Reviewed-by: Laurent Dufour Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230124140448.45938-4-nathanl@linux.ibm.com commit 9bce6243848dfd0ff7c2be6e8d82ab9b1e6c7858 Author: Nathan Lynch Date: Tue Jan 24 08:04:46 2023 -0600 powerpc/rtas: make all exports GPL The first symbol exports of RTAS functions and data came with the (now removed) scanlog driver in 2003: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit/?id=f92e361842d5251e50562b09664082dcbd0548bb At the time this was applied, EXPORT_SYMBOL_GPL() was very new, and the exports of rtas_call() etc have remained non-GPL. As new APIs have been added to the RTAS subsystem, their symbol exports have followed the convention set by existing code. However, the historical evidence is that RTAS function exports have been added over time only to satisfy the needs of in-kernel users, and these clients must have fairly intimate knowledge of how the APIs work to use them safely. No out of tree users are known, and future ones seem unlikely. Arguably the default for RTAS symbols should have become EXPORT_SYMBOL_GPL once it was available. Let's make it so now, and exceptions can be evaluated as needed. Signed-off-by: Nathan Lynch Reviewed-by: Laurent Dufour Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230124140448.45938-3-nathanl@linux.ibm.com commit 0d7e812fd282bf248b54523cc550a34b77c2e9a2 Author: Michael Ellerman Date: Thu Jan 26 21:49:00 2023 +1100 powerpc/rtas: Drop unused export symbols Some RTAS symbols are never used by modular code, drop their exports. Signed-off-by: Michael Ellerman Reviewed-by: Nathan Lynch Link: https://lore.kernel.org/r/20230127111231.84294-1-mpe@ellerman.id.au commit 5ff92e2f274dc42a9e534473121273cd209d3501 Author: Nathan Lynch Date: Tue Jan 24 08:04:45 2023 -0600 powerpc/rtas: unexport 'rtas' symbol No modular code needs access to the 'rtas' struct, so remove the symbol export. Suggested-by: Michael Ellerman Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230124140448.45938-2-nathanl@linux.ibm.com commit ff7c76f66d8bad4e694c264c789249e1d3a8205d Author: Pali Rohár Date: Wed Jan 25 08:39:00 2023 +0100 powerpc/boot: Don't always pass -mcpu=powerpc when building 32-bit uImage When CONFIG_TARGET_CPU is specified then pass its value to the compiler -mcpu option. This fixes following build error when building kernel with powerpc e500 SPE capable cross compilers: BOOTAS arch/powerpc/boot/crt0.o powerpc-linux-gnuspe-gcc: error: unrecognized argument in option ‘-mcpu=powerpc’ powerpc-linux-gnuspe-gcc: note: valid arguments to ‘-mcpu=’ are: 8540 8548 native make[1]: *** [arch/powerpc/boot/Makefile:231: arch/powerpc/boot/crt0.o] Error 1 Similar change was already introduced for the main powerpc Makefile in commit 446cda1b21d9 ("powerpc/32: Don't always pass -mcpu=powerpc to the compiler"). Fixes: 40a75584e526 ("powerpc/boot: Build wrapper for an appropriate CPU") Cc: stable@vger.kernel.org # v5.19+ Signed-off-by: Pali Rohár Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/2ae3ae5887babfdacc34435bff0944b3f336100a.1674632329.git.christophe.leroy@csgroup.eu commit 45f7091aac3546ef8112bf62836650ca0bbf0b79 Author: Christophe Leroy Date: Wed Jan 25 08:38:59 2023 +0100 powerpc/64: Set default CPU in Kconfig Since commit 0069f3d14e7a ("powerpc/64e: Tie PPC_BOOK3E_64 to PPC_E500MC"), the only possible BOOK3E/64 are E500, so no need of a default CPU over the E5500. When the user selects book3e, they must have an e500 compatible compiler, and it won't work anymore with the default -mcpu=power64, see commit d6b551b8f90c ("powerpc/64e: Fix build failure with GCC 12 (unrecognized opcode: `wrteei')"). For book3s/64, replace GENERIC_CPU by POWERPC64_CPU to match the PPC32 POWERPC_CPU, and set a default mpcu value in Kconfig directly. When a user selects a particular CPU, they must ensure the compiler has the requested capability. Therefore, remove hidden fallback, instead offer user the possibility to say they want to use the toolchain default. Fixes: d6b551b8f90c ("powerpc/64e: Fix build failure with GCC 12 (unrecognized opcode: `wrteei')") Reported-by: Pali Rohár Tested-by: Pali Rohár Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/76c11197b058193dcb8e8b26adffba09cfbdab11.1674632329.git.christophe.leroy@csgroup.eu commit 155c6b16eec2eaaaf6c71abf2d5e71641770d7ba Merge: dae437d568bbc cdf657fc1f4c9 Author: Dave Airlie Date: Mon Jan 30 15:37:55 2023 +1000 Merge tag 'amd-drm-next-6.3-2023-01-27' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.3-2023-01-27: amdgpu: - GC11 fixes - SMU13 fixes - Freesync fixes - DP MST fixes - DP MST code rework and cleanup - AV1 fixes for VCN4 - DCN 3.2.x fixes - PSR fixes - DML optimizations - DC link code rework Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230127225917.2419162-1-alexander.deucher@amd.com commit 04f8b4ea20c85f579e8bbcd9da138779e9d4d36f Author: Randy Dunlap Date: Sun Jan 29 20:33:30 2023 -0800 Input: pmic8xxx-keypad - fix a Kconfig spelling mistake & hyphenation Correct a spelling mistake (reported by codespell). Also hyphenate "matrix-based". Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20230124233453.22893-1-rdunlap@infradead.org Signed-off-by: Dmitry Torokhov commit 62c5e854b457c319c794a75cb378a7b47624e153 Author: Dario Binacchi Date: Sun Jan 29 18:31:15 2023 -0800 Input: edt-ft5x06 - fix typo in a comment Replace 'firmares' with 'firmwares'. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20230128162325.64467-1-dario.binacchi@amarulasolutions.com Signed-off-by: Dmitry Torokhov commit 83ea7df6e72b464aaf572984e269e38fea9f53b5 Author: ye xingchen Date: Sun Jan 29 18:31:02 2023 -0800 Input: tegra-kbc - 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/202301281613032191431@zte.com.cn Signed-off-by: Dmitry Torokhov commit babc94da39eca0eafec5f180c07a963ef27881e7 Author: ye xingchen Date: Sun Jan 29 18:30:36 2023 -0800 Input: st-keyscan - 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/202301281611305841413@zte.com.cn Signed-off-by: Dmitry Torokhov commit 27d5e05be4fde8dcaa833a4faded4de13e18e7e2 Author: ye xingchen Date: Sun Jan 29 18:30:23 2023 -0800 Input: spear-keyboard - 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/202301281609576851394@zte.com.cn Signed-off-by: Dmitry Torokhov commit 492ec555a59a674c030ba1b429fb2d50e1b8de67 Author: ye xingchen Date: Sun Jan 29 18:30:09 2023 -0800 Input: olpc_apsp - 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/202301281608287301370@zte.com.cn Signed-off-by: Dmitry Torokhov commit 24b915d1664a90f1871a96df426721b99bae7265 Author: ye xingchen Date: Sun Jan 29 18:29:58 2023 -0800 Input: arc_ps2 - 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/202301281606309671328@zte.com.cn Signed-off-by: Dmitry Torokhov commit 12b11142ee95e68891211268ce6a826f3396e870 Author: ye xingchen Date: Sun Jan 29 18:29:35 2023 -0800 Input: apbps2 - 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/202301281604596831304@zte.com.cn Signed-off-by: Dmitry Torokhov commit 6cb86b0a87bedd42b2c77c2714d66f812cf6fe74 Author: ye xingchen Date: Sun Jan 29 18:29:22 2023 -0800 Input: altera_ps2 - 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/202301281603290601283@zte.com.cn Signed-off-by: Dmitry Torokhov commit dae437d568bbc3d4211b88d23fa0868a5019caf6 Merge: 54587d9943c90 2abdd44e3126e Author: Dave Airlie Date: Mon Jan 30 14:17:06 2023 +1000 Merge tag 'drm/tegra/for-6.3-rc1' of https://gitlab.freedesktop.org/drm/tegra into drm-next drm/tegra: Changes for v6.3-rc1 This set of changes includes a rework of the custom syncpoint interrupt code to take better advantage of existing DRM/KMS infrastructure. There's also various bits of cleanup and fixes included. Signed-off-by: Dave Airlie From: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20230127170119.495943-1-thierry.reding@gmail.com commit f6e09b07cc12a4d104bb19fe7566b0636f60c413 Author: Masahiro Yamada Date: Sun Jan 22 23:14:21 2023 +0900 kbuild: do not put .scmversion into the source tarball .scmversion is used by (src)rpm-pkg and deb-pkg to carry KERNELRELEASE. In fact, deb-pkg does not rely on it any more because the generated debian/rules specifies KERNELRELEASE from the command line. Do likwise for (src)rpm-pkg, and remove this feature. For the same reason, you do not need to save LOCALVERSION in the spec file. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 54587d9943c906dd8ec2732dca3e9fd791aa789e Merge: 49ed9f39c8e9a fd228eb0b482c Author: Dave Airlie Date: Mon Jan 30 13:49:46 2023 +1000 Merge tag 'drm-next-20230127' of git://git.kernel.org/pub/scm/linux/kernel/git/pinchartl/linux into drm-next Renesas R-Car DU fixes and improvements Signed-off-by: Dave Airlie From: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/Y9QCw3SkHm6k1bwJ@pendragon.ideasonboard.com commit 49ed9f39c8e9ab82665e0783e132d43ba056524a Merge: 729b3c15303bf d3eb347da1148 Author: Dave Airlie Date: Mon Jan 30 13:35:56 2023 +1000 Merge tag 'drm-intel-next-2023-01-27' of git://anongit.freedesktop.org/drm/drm-intel into drm-next drm/i915 feature pull #2 v6.3: Features and functionality: - Enable HF-EEODB by switching HDMI, DP and LVDS to use struct drm_edid (Jani) - Start using unversioned DMC firmware paths for new platforms (Gustavo) Refactoring and cleanups: - ELD refactor: Stop using hardware buffer, precompute ELD, and wire up ELD in the state checker (Ville) - Use generics for debugfs device parameters (Jani) - DSB refactoring and fixes (Ville) - Header refactoring, add new intel_display_limits.h (Jani) - Split out GMCH code to a new file (Jani) - Split out vblank code to a new file (Jani) - i915_drv.h and struct drm_i915_private cleanups (Jani) - Simplify FBC and DRRS debug attributes (Deepak R Varma) - Remove some single-use macros (Rodrigo) Fixes: - Fix scaler limits for display versions 12 and 13 (Luca) - Fix plane source size check for zero height (Drew Davenport) - Implement PSR2 selective fetch workaround (Jouni) - Expand a PSR workaound to more platforms and pipes (Jouni) - Expand an HDMI infoframe workaround to all MTL steppings (Jouni) - Enable PIPEDMC whenever its corresponding pipe is enabled (Imre) Merges: - Backmerge drm-next (Jani) Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87tu0c44gv.fsf@intel.com commit c1a3daf7363b48c6c4b86aee2efa2287f695f649 Merge: 07dcbd7325cee ee105d5a50d40 Author: Alexei Starovoitov Date: Sun Jan 29 19:16:29 2023 -0800 Merge branch 'Support bpf trampoline for s390x' Ilya Leoshkevich says: ==================== v2: https://lore.kernel.org/bpf/20230128000650.1516334-1-iii@linux.ibm.com/#t v2 -> v3: - Make __arch_prepare_bpf_trampoline static. (Reported-by: kernel test robot ) - Support both old- and new- style map definitions in sk_assign. (Alexei) - Trim DENYLIST.s390x. (Alexei) - Adjust s390x vmlinux path in vmtest.sh. - Drop merged fixes. v1: https://lore.kernel.org/bpf/20230125213817.1424447-1-iii@linux.ibm.com/#t v1 -> v2: - Fix core_read_macros, sk_assign, test_profiler, test_bpffs (24/31; I'm not quite happy with the fix, but don't have better ideas), and xdp_synproxy. (Andrii) - Prettify liburandom_read and verify_pkcs7_sig fixes. (Andrii) - Fix bpf_usdt_arg using barrier_var(); prettify barrier_var(). (Andrii) - Change BPF_MAX_TRAMP_LINKS to enum and query it using BTF. (Andrii) - Improve bpf_jit_supports_kfunc_call() description. (Alexei) - Always check sign_extend() return value. - Cc: Alexander Gordeev. Hi, This series implements poke, trampoline, kfunc, and mixing subprogs and tailcalls on s390x. The following failures still remain: #82 get_stack_raw_tp:FAIL get_stack_print_output:FAIL:user_stack corrupted user stack Known issue: We cannot reliably unwind userspace on s390x without DWARF. #101 ksyms_module:FAIL address of kernel function bpf_testmod_test_mod_kfunc is out of range Known issue: Kernel and modules are too far away from each other on s390x. #190 stacktrace_build_id:FAIL Known issue: We cannot reliably unwind userspace on s390x without DWARF. #281 xdp_metadata:FAIL See patch 6. None of these seem to be due to the new changes. Best regards, Ilya ==================== Signed-off-by: Alexei Starovoitov commit ee105d5a50d4075be81b2d924bfc630e0d7cdb90 Author: Ilya Leoshkevich Date: Sun Jan 29 20:05:01 2023 +0100 selftests/bpf: Trim DENYLIST.s390x Now that trampoline is implemented, enable a number of tests on s390x. 18 of the remaining failures have to do with either lack of rethook (fixed by [1]) or syscall symbols missing from BTF (fixed by [2]). Do not re-classify the remaining failures for now; wait until the s390/for-next fixes are merged and re-classify only the remaining few. [1] https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git/commit/?h=for-next&id=1a280f48c0e403903cf0b4231c95b948e664f25a [2] https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git/commit/?h=for-next&id=2213d44e140f979f4b60c3c0f8dd56d151cc8692 Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230129190501.1624747-9-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit af320fb7ddb091a401a407bb256a9abd85587624 Author: Ilya Leoshkevich Date: Sun Jan 29 20:05:00 2023 +0100 selftests/bpf: Fix s390x vmlinux path After commit edd4a8667355 ("s390/boot: get rid of startup archive") there is no more compressed/ subdirectory. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230129190501.1624747-8-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 63d7b53ab59f0dd8540e672b49836493d1fa0a79 Author: Ilya Leoshkevich Date: Sun Jan 29 20:04:59 2023 +0100 s390/bpf: Implement bpf_jit_supports_kfunc_call() Implement calling kernel functions from eBPF. In general, the eBPF ABI is fairly close to that of s390x, with one important difference: on s390x callers should sign-extend signed arguments. Handle that by using information returned by bpf_jit_find_kfunc_model(). Here is an example of how sign extensions works. Suppose we need to call the following function from BPF: ; long noinline bpf_kfunc_call_test4(signed char a, short b, int c, long d) 0000000000936a78 : 936a78: c0 04 00 00 00 00 jgnop bpf_kfunc_call_test4 ; return (long)a + (long)b + (long)c + d; 936a7e: b9 08 00 45 agr %r4,%r5 936a82: b9 08 00 43 agr %r4,%r3 936a86: b9 08 00 24 agr %r2,%r4 936a8a: c0 f4 00 1e 3b 27 jg <__s390_indirect_jump_r14> As per the s390x ABI, bpf_kfunc_call_test4() has the right to assume that a, b and c are sign-extended by the caller, which results in using 64-bit additions (agr) without any additional conversions. Without sign extension we would have the following on the JITed code side: ; tmp = bpf_kfunc_call_test4(-3, -30, -200, -1000); ; 5: b4 10 00 00 ff ff ff fd w1 = -3 0x3ff7fdcdad4: llilf %r2,0xfffffffd ; 6: b4 20 00 00 ff ff ff e2 w2 = -30 0x3ff7fdcdada: llilf %r3,0xffffffe2 ; 7: b4 30 00 00 ff ff ff 38 w3 = -200 0x3ff7fdcdae0: llilf %r4,0xffffff38 ; 8: b7 40 00 00 ff ff fc 18 r4 = -1000 0x3ff7fdcdae6: lgfi %r5,-1000 0x3ff7fdcdaec: mvc 64(4,%r15),160(%r15) 0x3ff7fdcdaf2: lgrl %r1,bpf_kfunc_call_test4@GOT 0x3ff7fdcdaf8: brasl %r14,__s390_indirect_jump_r1 This first 3 llilfs are 32-bit loads, that need to be sign-extended to 64 bits. Note: at the moment bpf_jit_find_kfunc_model() does not seem to play nicely with XDP metadata functions: add_kfunc_call() adds an "abstract" bpf_*() version to kfunc_btf_tab, but then fixup_kfunc_call() puts the concrete version into insn->imm, which bpf_jit_find_kfunc_model() cannot find. But this seems to be a common code problem. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230129190501.1624747-7-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit dd691e847d28ac5f8b8e3005be44fd0e46722809 Author: Ilya Leoshkevich Date: Sun Jan 29 20:04:58 2023 +0100 s390/bpf: Implement bpf_jit_supports_subprog_tailcalls() Allow mixing subprogs and tail calls by passing the current tail call count to subprogs. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230129190501.1624747-6-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 528eb2cb87bc1353235a6384696b4849bde8b0ba Author: Ilya Leoshkevich Date: Sun Jan 29 20:04:57 2023 +0100 s390/bpf: Implement arch_prepare_bpf_trampoline() arch_prepare_bpf_trampoline() is used for direct attachment of eBPF programs to various places, bypassing kprobes. It's responsible for calling a number of eBPF programs before, instead and/or after whatever they are attached to. Add a s390x implementation, paying attention to the following: - Reuse the existing JIT infrastructure, where possible. - Like the existing JIT, prefer making multiple passes instead of backpatching. Currently 2 passes is enough. If literal pool is introduced, this needs to be raised to 3. However, at the moment adding literal pool only makes the code larger. If branch shortening is introduced, the number of passes needs to be increased even further. - Support both regular and ftrace calling conventions, depending on the trampoline flags. - Use expolines for indirect calls. - Handle the mismatch between the eBPF and the s390x ABIs. - Sign-extend fmod_ret return values. invoke_bpf_prog() produces about 120 bytes; it might be possible to slightly optimize this, but reaching 50 bytes, like on x86_64, looks unrealistic: just loading cookie, __bpf_prog_enter, bpf_func, insnsi and __bpf_prog_exit as literals already takes at least 5 * 12 = 60 bytes, and we can't use relative addressing for most of them. Therefore, lower BPF_MAX_TRAMP_LINKS on s390x. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230129190501.1624747-5-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit f1d5df84cd8c3ec6460c78f5b86be7c84577a83f Author: Ilya Leoshkevich Date: Sun Jan 29 20:04:56 2023 +0100 s390/bpf: Implement bpf_arch_text_poke() bpf_arch_text_poke() is used to hotpatch eBPF programs and trampolines. s390x has a very strict hotpatching restriction: the only thing that is allowed to be hotpatched is conditional branch mask. Take the same approach as commit de5012b41e5c ("s390/ftrace: implement hotpatching"): create a conditional jump to a "plt", which loads the target address from memory and jumps to it; then first patch this address, and then the mask. Trampolines (introduced in the next patch) respect the ftrace calling convention: the return address is in %r0, and %r1 is clobbered. With that in mind, bpf_arch_text_poke() does not differentiate between jumps and calls. However, there is a simple optimization for jumps (for the epilogue_ip case): if a jump already points to the destination, then there is no "plt" and we can just flip the mask. For simplicity, the "plt" template is defined in assembly, and its size is used to define C arrays. There doesn't seem to be a way to convey this size to C as a constant, so it's hardcoded and double-checked during runtime. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230129190501.1624747-4-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit bb4ef8fc3d193ed8d5583fb47cbeff5d8fb8302f Author: Ilya Leoshkevich Date: Sun Jan 29 20:04:55 2023 +0100 s390/bpf: Add expoline to tail calls All the indirect jumps in the eBPF JIT already use expolines, except for the tail call one. Fixes: de5cb6eb514e ("s390: use expoline thunks in the BPF JIT") Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230129190501.1624747-3-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 7ce878ca81bca7811e669db4c394b86780e0dbe4 Author: Ilya Leoshkevich Date: Sun Jan 29 20:04:54 2023 +0100 selftests/bpf: Fix sk_assign on s390x sk_assign is failing on an s390x machine running Debian "bookworm" for 2 reasons: legacy server_map definition and uninitialized addrlen in recvfrom() call. Fix by adding a new-style server_map definition and dropping addrlen (recvfrom() allows NULL values for src_addr and addrlen). Since the test should support tc built without libbpf, build the prog twice: with the old-style definition and with the new-style definition, then select the right one at runtime. This could be done at compile time too, but this would not be cross-compilation friendly. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230129190501.1624747-2-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 323745a3aa9ba172582d4549689146298fb68405 Author: Kemeng Shi Date: Mon Jan 16 17:51:53 2023 +0800 block, bfq: remove unused bfq_wr_max_time in struct bfq_data bfqd->bfq_wr_max_time is set to 0 in bfq_init_queue and is never changed. It is only used in bfq_wr_duration when bfq_wr_max_time > 0 which never meets, so bfqd->bfq_wr_max_time is not used actually. Just remove it. Signed-off-by: Kemeng Shi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230116095153.3810101-9-shikemeng@huaweicloud.com Signed-off-by: Jens Axboe commit 87c971de8157b90494490d7c869a21b7f2123305 Author: Kemeng Shi Date: Mon Jan 16 17:51:52 2023 +0800 block, bfq: remove unnecessary goto tag in bfq_dispatch_rq_from_bfqq We jump to tag only for returning current rq. Return directly to remove this tag. Reviewed-by: Jan Kara Reviewed-by: Damien Le Moal Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20230116095153.3810101-8-shikemeng@huaweicloud.com Signed-off-by: Jens Axboe commit 433d4b03e722bdfb1b6a75563cb45e8dca6784e7 Author: Kemeng Shi Date: Mon Jan 16 17:51:51 2023 +0800 block, bfq: remove redundant check in bfq_put_cooperator We have already avoided a circular list in bfq_setup_merge (see comments in bfq_setup_merge() for details), so bfq_queue will not appear in it's new_bfqq list. Just remove this check. Signed-off-by: Kemeng Shi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230116095153.3810101-7-shikemeng@huaweicloud.com Signed-off-by: Jens Axboe commit 86f8382e6d3a74f783c23a3d773285e2637b8bc2 Author: Kemeng Shi Date: Mon Jan 16 17:51:50 2023 +0800 block, bfq: remove unnecessary dereference to get async_bfqq The async_bfqq is assigned with bfqq->bic->bfqq[0], use it directly. Signed-off-by: Kemeng Shi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230116095153.3810101-6-shikemeng@huaweicloud.com Signed-off-by: Jens Axboe commit 8ac2e43c3559f29513377df8aff7a22a8277fcf8 Author: Kemeng Shi Date: Mon Jan 16 17:51:49 2023 +0800 block, bfq: use helper macro RQ_BFQQ to get bfqq of request Use helper macro RQ_BFQQ to get bfqq of request. Signed-off-by: Kemeng Shi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230116095153.3810101-5-shikemeng@huaweicloud.com Signed-off-by: Jens Axboe commit 1c970450a7fd8be0298758c4e2c631e4a739292d Author: Kemeng Shi Date: Mon Jan 16 17:51:48 2023 +0800 block, bfq: initialize bfqq->decrease_time_jif correctly Inject limit is updated or reset when time_is_before_eq_jiffies( decrease_time_jif + several msecs) or think-time state changes. decrease_time_jif is initialized to 0 and will be set to current jiffies when inject limit is updated or reset. If the jiffies is slightly greater than LONG_MAX, time_is_after_eq_jiffies(0) will keep for a long time, so as time_is_after_eq_jiffies(decrease_time_jif + several msecs). If the think-time state never chages, then the injection will not work as expected for long time. To be more specific: Function bfq_update_inject_limit maybe triggered when jiffies pasts decrease_time_jif + msecs_to_jiffies(10) in bfq_add_request by setting bfqd->wait_dispatch to true. Function bfq_reset_inject_limit are called in two conditions: 1. jiffies pasts bfqq->decrease_time_jif + msecs_to_jiffies(1000) in function bfq_add_request. 2. jiffies pasts bfqq->decrease_time_jif + msecs_to_jiffies(100) or bfq think-time state change from short to long. Fix this by initializing bfqq->decrease_time_jif to current jiffies to trigger service injection soon when service injection conditions are met. Signed-off-by: Kemeng Shi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230116095153.3810101-4-shikemeng@huaweicloud.com Signed-off-by: Jens Axboe commit bebeb9e582e8040944b12942ccc56f4ebacaa9f8 Author: Kemeng Shi Date: Mon Jan 16 17:51:47 2023 +0800 block, bfq: remove unsed parameter reason in bfq_bfqq_is_slow Parameter reason is never used, just remove it. Signed-off-by: Kemeng Shi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230116095153.3810101-3-shikemeng@huaweicloud.com Signed-off-by: Jens Axboe commit 0c3e09e8854bcd3f7c45de85007ed283342b3464 Author: Kemeng Shi Date: Mon Jan 16 17:51:46 2023 +0800 block, bfq: correctly raise inject limit in bfq_choose_bfqq_for_injection Function bfq_choose_bfqq_for_injection may temporarily raise inject limit to one request if current inject_limit is 0 before search of the source queue for injection. However the search below will reset inject limit to bfqd->in_service_queue which is zero for raised inject limit. Then the temporarily raised inject limit never works as expected. Assigment limit to bfqd->in_service_queue in search is needed as limit maybe overwriten to min_t(unsigned int, 1, limit) for condition that a large in-flight request is on non-rotational devices in found queue. So we need to reset limit to bfqd->in_service_queue for normal case. Actually, we have already make sure bfqd->rq_in_driver is < limit before search, then -Limit is >= 1 as bfqd->rq_in_driver is >= 0. Then min_t(unsigned int, 1, limit) is always 1. So we can simply check bfqd->rq_in_driver with 1 instead of result of min_t(unsigned int, 1, limit) for larget request in non-rotational device case to avoid overwritting limit and the bug is gone. -For normal case, we have already check bfqd->rq_in_driver is < limit, so we can return found bfqq unconditionally to remove unncessary check. Signed-off-by: Kemeng Shi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230116095153.3810101-2-shikemeng@huaweicloud.com Signed-off-by: Jens Axboe commit b5fcf7871acb7f9a3a8ed341a68bd86aba3e254a Author: Kemeng Shi Date: Tue Jan 17 04:50:59 2023 +0800 sbitmap: correct wake_batch recalculation to avoid potential IO hung Commit 180dccb0dba4f ("blk-mq: fix tag_get wait task can't be awakened") mentioned that in case of shared tags, there could be just one real active hctx(queue) because of lazy detection of tag idle. Then driver tag allocation may wait forever on this real active hctx(queue) if wake_batch is > hctx_max_depth where hctx_max_depth is available tags depth for the actve hctx(queue). However, the condition wake_batch > hctx_max_depth is not strong enough to avoid IO hung as the sbitmap_queue_wake_up will only wake up one wait queue for each wake_batch even though there is only one waiter in the woken wait queue. After this, there is only one tag to free and wake_batch may not be reached anymore. Commit 180dccb0dba4f ("blk-mq: fix tag_get wait task can't be awakened") methioned that driver tag allocation may wait forever. Actually, the inactive hctx(queue) will be truely idle after at most 30 seconds and will call blk_mq_tag_wakeup_all to wake one waiter per wait queue to break the hung. But IO hung for 30 seconds is also not acceptable. Set batch size to small enough that depth of the shared hctx(queue) is enough to wake up all of the queues like sbq_calc_wake_batch do to fix this potential IO hung. Although hctx_max_depth will be clamped to at least 4 while wake_batch recalculation does not do the clamp, the wake_batch will be always recalculated to 1 when hctx_max_depth <= 4. Fixes: 180dccb0dba4 ("blk-mq: fix tag_get wait task can't be awakened") Reviewed-by: Jan Kara Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20230116205059.3821738-6-shikemeng@huaweicloud.com Signed-off-by: Jens Axboe commit 678418c6128f112fc5584beb5cdd21fbc225badf Author: Kemeng Shi Date: Tue Jan 17 04:50:58 2023 +0800 sbitmap: add sbitmap_find_bit to remove repeat code in __sbitmap_get/__sbitmap_get_shallow There are three differences between __sbitmap_get and __sbitmap_get_shallow when searching free bit: 1. __sbitmap_get_shallow limit number of bit to search per word. __sbitmap_get has no such limit. 2. __sbitmap_get_shallow always searches with wrap set. __sbitmap_get set wrap according to round_robin. 3. __sbitmap_get_shallow always searches from first bit in first word. __sbitmap_get searches from first bit when round_robin is not set otherwise searches from SB_NR_TO_BIT(sb, alloc_hint). Add helper function sbitmap_find_bit function to do common search while accept "limit depth per word", "wrap flag" and "first bit to search" from caller to support the need of both __sbitmap_get and __sbitmap_get_shallow. Reviewed-by: Jan Kara Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20230116205059.3821738-5-shikemeng@huaweicloud.com Signed-off-by: Jens Axboe commit 08470a98a7d7e32c787b23b87353f13b03c23195 Author: Kemeng Shi Date: Tue Jan 17 04:50:57 2023 +0800 sbitmap: rewrite sbitmap_find_bit_in_index to reduce repeat code Rewrite sbitmap_find_bit_in_index as following: 1. Rename sbitmap_find_bit_in_index to sbitmap_find_bit_in_word 2. Accept "struct sbitmap_word *" directly instead of accepting "struct sbitmap *" and "int index" to get "struct sbitmap_word *". 3. Accept depth/shallow_depth and wrap for __sbitmap_get_word from caller to support need of both __sbitmap_get_shallow and __sbitmap_get. With helper function sbitmap_find_bit_in_word, we can remove repeat code in __sbitmap_get_shallow to find bit considring deferred clear. Reviewed-by: Jan Kara Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20230116205059.3821738-4-shikemeng@huaweicloud.com Signed-off-by: Jens Axboe commit 903e86f3a64d9573352bbab2f211fdbbaa5772b7 Author: Kemeng Shi Date: Tue Jan 17 04:50:56 2023 +0800 sbitmap: remove redundant check in __sbitmap_queue_get_batch Commit fbb564a557809 ("lib/sbitmap: Fix invalid loop in __sbitmap_queue_get_batch()") mentioned that "Checking free bits when setting the target bits. Otherwise, it may reuse the busying bits." This commit add check to make sure all masked bits in word before cmpxchg is zero. Then the existing check after cmpxchg to check any zero bit is existing in masked bits in word is redundant. Actually, old value of word before cmpxchg is stored in val and we will filter out busy bits in val by "(get_mask & ~val)" after cmpxchg. So we will not reuse busy bits methioned in commit fbb564a557809 ("lib/sbitmap: Fix invalid loop in __sbitmap_queue_get_batch()"). Revert new-added check to remove redundant check. Fixes: fbb564a55780 ("lib/sbitmap: Fix invalid loop in __sbitmap_queue_get_batch()") Reviewed-by: Jan Kara Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20230116205059.3821738-3-shikemeng@huaweicloud.com Signed-off-by: Jens Axboe commit f1591a8bb3e02713f4ee2efe20df0d84ed80da48 Author: Kemeng Shi Date: Tue Jan 17 04:50:55 2023 +0800 sbitmap: remove unnecessary calculation of alloc_hint in __sbitmap_get_shallow Updates to alloc_hint in the loop in __sbitmap_get_shallow() are mostly pointless and equivalent to setting alloc_hint to zero (because SB_NR_TO_BIT() considers only low sb->shift bits from alloc_hint). So simplify the logic. Reviewed-by: Jan Kara Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20230116205059.3821738-2-shikemeng@huaweicloud.com Signed-off-by: Jens Axboe commit 729b3c15303bf5b4e2ff4976821550e4abecff04 Merge: 2e2245efc1049 4dc7c58023e86 Author: Dave Airlie Date: Mon Jan 30 12:43:10 2023 +1000 Merge tag 'drm-habanalabs-next-2023-01-26' 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.3: - Moved the driver to the accel subsystem. Currently only the files were moved (including the uapi file which was also renamed). This doesn't include registering to the accel subsystem. This will probably be only in the next kernel version. - In case of decoder error (axi error) in Gaudi2, we can now find the exact IP that initiated the erroneous transaction and print the details for better debug. - Add more trace events. We now can trace mmio transactions and communication with the preboot firmware. - Add to Gaudi2 support for abrupt reset that is done by the firmware. This was support so far only for Gaudi1. - Add uAPI to flush memory transactions (to the device memory). This is needed by the communications library in case of doing p2p with a host NIC which access our HBM directly through the PCI BAR. - Add uAPI to pass-through a request from user-space to firmware and get the result back to user-space. This will allow the driver code to avoid the need to add new packet (in the communication channel with the firmware) for every new request type. - Remove the option to export dma-buf by memory allocation handle in our uAPI. This was planned for Gaudi2 but was never used. Instead, we will do export by memory address (same as Gaudi1). In addition, we added the option to specify an offset to the address. This is needed in Gaudi2 because there the user allocates the entire HBM in one allocation, but would like to export only small part of it. - Multiple bug fixes, refactors and small optimizations. Signed-off-by: Dave Airlie From: Oded Gabbay Link: https://patchwork.freedesktop.org/patch/msgid/20230126213317.GA1520525@ogabbay-vm-u20.habana-labs.com commit fa9f4275b20ec7b2a8fb05c66362d10b36f9efec Author: Luca Ellero Date: Thu Jan 26 11:52:27 2023 +0100 Input: ads7846 - don't check penirq immediately for 7845 To discard false readings, one should use "ti,penirq-recheck-delay-usecs". Checking get_pendown_state() at the beginning, most of the time fails causing malfunctioning. Fixes: ffa458c1bd9b ("spi: ads7846 driver") Signed-off-by: Luca Ellero Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230126105227.47648-4-l.ellero@asem.it Signed-off-by: Dmitry Torokhov commit 13f82ca3878db8284a70ef9711d7f710a31eb562 Author: Luca Ellero Date: Thu Jan 26 11:52:26 2023 +0100 Input: ads7846 - always set last command to PWRDOWN Controllers that report pressure (e.g. ADS7846) use 5 commands and the correct sequence is READ_X, READ_Y, READ_Z1, READ_Z2, PWRDOWN. Controllers that don't report pressure (e.g. ADS7845/ADS7843) use only 3 commands and the correct sequence should be READ_X, READ_Y, PWRDOWN. But the sequence sent was incorrect: READ_X, READ_Y, READ_Z1. Fix this by setting the third (and last) command to PWRDOWN. Fixes: ffa458c1bd9b ("spi: ads7846 driver") Signed-off-by: Luca Ellero Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230126105227.47648-3-l.ellero@asem.it Signed-off-by: Dmitry Torokhov commit d50584d783313c8b05b84d0b07a2142f1bde46dd Author: Luca Ellero Date: Thu Jan 26 11:52:25 2023 +0100 Input: ads7846 - don't report pressure for ads7845 ADS7845 doesn't support pressure. Avoid the following error reported by libinput-list-devices: "ADS7845 Touchscreen: kernel bug: device has min == max on ABS_PRESSURE". Fixes: ffa458c1bd9b ("spi: ads7846 driver") Signed-off-by: Luca Ellero Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230126105227.47648-2-l.ellero@asem.it Signed-off-by: Dmitry Torokhov commit 46e828026cc8daf29b251efca27b93eaaf906081 Author: Sean Anderson Date: Tue Jan 24 12:47:57 2023 -0500 arm64: ls1046ardb: Use in-band-status for SFP module net10 is connected to an SFP module. Unfortunately, the I2C lines are not connected due to an address conflict. Now that DPAA uses phylink, we can use in-band-status. This lets us determine whether the link is up or down instead of assuming it is up all the time. Also fix the phy mode while we're here. Signed-off-by: Sean Anderson Signed-off-by: Shawn Guo commit b694fbe2ff40fedca0ef6f6649391f3c40e44df7 Author: Philippe Schenker Date: Thu Jan 26 19:54:38 2023 +0800 arm64: dts: imx8mp-verdin: Add yavia carrier board Add new carrier board device tree Yavia for the Verdin iMX8M Plus SoM. Yavia is a compact carrier board providing easy access to the most common features of the Verdin family. The intended use of the carrier board is application software development. The board is compatible with all current and future Verdin SoMs. Co-developed-by: Aishwarya Kothari Signed-off-by: Aishwarya Kothari Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit a1558dc19976e3d39e608c3d0904d1fee7f9b8cf Author: Philippe Schenker Date: Mon Jan 23 16:17:33 2023 +0100 arm64: dts: imx8mm-verdin: Add yavia carrier board Add new carrier board device tree Yavia for the Verdin iMX8M Mini SoM. Yavia is a compact carrier board providing easy access to the most common features of the Verdin family. The intended use of the carrier board is application software development. The board is compatible with all current and future Verdin SoMs. Co-developed-by: Aishwarya Kothari Signed-off-by: Aishwarya Kothari Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit 52eb0c6511218f831c4aa78e7e1a698dc0ebf2ff Author: Krzysztof Kozlowski Date: Mon Jan 23 16:15:55 2023 +0100 arm64: dts: imx8q: use generic node name for rave-sp Use generic "mcu" node name for rave-sp node, as recommended by Devicetree specification. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit addaaf0a18b7964913a289f5933f618974a408b3 Author: Christoph Niedermaier Date: Sun Jan 22 17:20:13 2023 +0100 ARM: dts: imx6ull-dhcom: Add DHSOM based DRC02 board Add DT for DH DRC02 unit, which is a universal controller device. The system has two ethernet ports, two CANs, RS485 and RS232, USB, capacitive buttons and an OLED display. For this board a DHCOM i.MX6ULL SoM configuration without WiFi/BT is used. The interface is used for the SD card instead. Signed-off-by: Christoph Niedermaier Reviewed-by: Marek Vasut Signed-off-by: Shawn Guo commit bae9847e120aee3a101fb3e42f9ac131d93351ac Author: Christoph Niedermaier Date: Sun Jan 22 17:20:12 2023 +0100 ARM: dts: imx6ull-dhcom: Add DHCOM based PicoITX board Add DT for DH PicoITX unit, which is a bare-bones carrier board for the DHCOM. The board has ethernet port, USB, CAN, LED and a custom board-to-board expansion connector. For this board a DHCOM i.MX6ULL SoM configuration without WiFi/BT is used. The interface is used for the SD card instead. Make this adjustment by using a separate DT include file. Signed-off-by: Christoph Niedermaier Reviewed-by: Marek Vasut Signed-off-by: Shawn Guo commit 611b6c891e403b099d39717afa3d098712b58473 Author: Christoph Niedermaier Date: Sun Jan 22 17:20:11 2023 +0100 ARM: dts: imx6ull-dhcom: Add DH electronics DHCOM i.MX6ULL SoM and PDK2 board Add support for DH electronics DHCOM SoM and PDK2 rev. 400 carrier board. This is an SoM with i.MX6ULL and an evaluation kit. The baseboard provides Ethernet, UART, USB, CAN and optional display. Signed-off-by: Christoph Niedermaier Reviewed-by: Marek Vasut Signed-off-by: Shawn Guo commit 2e2245efc1049d16379a8c627085659f9e207214 Merge: 68de345e101ce 6ca80b9e5cc01 Author: Dave Airlie Date: Mon Jan 30 11:26:08 2023 +1000 Merge tag 'drm-misc-next-2023-01-26' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v6.3: UAPI Changes: Cross-subsystem Changes: Core Changes: * fbdev-helper: Streamline code in generic fbdev and its helpers * TTM: Fixes plus their reverts Driver Changes: * accel/ivpu: Typo fixes * i915: TTM-related fixes * nouveau: Remove unused return value from disable helper Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/Y9I2nOzHxTxPeTjg@linux-uq9g commit 9ec590a8a1bbf6610f72124ad79231f2c5875fc9 Author: Lucas Stach Date: Mon Jan 9 17:12:42 2023 +0100 soc: imx: imx8mp-blk-ctrl: set HDMI LCDIF panic read hurry level Same as done for both LCDIF interfaces in the MEDIA domain, set the panic priority of the LCDIF instance in the HDMI domain to the maximium NoC priority of 7 to minimize chances of display underflows. Signed-off-by: Lucas Stach Reviewed-by: Peng Fan Signed-off-by: Shawn Guo commit 0e3e1946606a2919b1dda9967ab2e1c5af2fedd6 Author: Peng Fan Date: Fri Dec 23 11:04:33 2022 +0800 ARM: dts: imx7s: correct iomuxc gpr mux controller cells Per binding doc reg-mux.yaml, the #mux-control-cells should be 1 Signed-off-by: Peng Fan Reviewed-by: Marco Felsch Fixes: 94a905a79f2c ("ARM: dts: imx7s: add multiplexer controls") Signed-off-by: Shawn Guo commit b685757c7b08d5073046fb379be965fd6c06aafc Author: Dawei Li Date: Sun Jan 15 18:32:05 2023 +0800 ksmbd: Implements sess->rpc_handle_list as xarray For some ops on rpc handle: 1. ksmbd_session_rpc_method(), possibly on high frequency. 2. ksmbd_session_rpc_close(). id is used as indexing key to lookup channel, in that case, linear search based on list may suffer a bit for performance. Implements sess->rpc_handle_list as xarray. Signed-off-by: Dawei Li Acked-by: Namjae Jeon Signed-off-by: Steve French commit 1d9c4172110e645b383ff13eee759728d74f1a5d Author: Dawei Li Date: Sun Jan 15 18:32:04 2023 +0800 ksmbd: Implements sess->ksmbd_chann_list as xarray For some ops on channel: 1. lookup_chann_list(), possibly on high frequency. 2. ksmbd_chann_del(). Connection is used as indexing key to lookup channel, in that case, linear search based on list may suffer a bit for performance. Implements sess->ksmbd_chann_list as xarray. Signed-off-by: Dawei Li Acked-by: Namjae Jeon Signed-off-by: Steve French commit f1c006f1c6850c14040f8337753a63119bba39b9 Author: Yu Kuai Date: Thu Jan 19 19:03:50 2023 +0800 blk-cgroup: synchronize pd_free_fn() from blkg_free_workfn() and blkcg_deactivate_policy() Currently parent pd can be freed before child pd: t1: remove cgroup C1 blkcg_destroy_blkgs blkg_destroy list_del_init(&blkg->q_node) // remove blkg from queue list percpu_ref_kill(&blkg->refcnt) blkg_release call_rcu t2: from t1 __blkg_release blkg_free schedule_work t4: deactivate policy blkcg_deactivate_policy pd_free_fn // parent of C1 is freed first t3: from t2 blkg_free_workfn pd_free_fn If policy(for example, ioc_timer_fn() from iocost) access parent pd from child pd after pd_offline_fn(), then UAF can be triggered. Fix the problem by delaying 'list_del_init(&blkg->q_node)' from blkg_destroy() to blkg_free_workfn(), and using a new disk level mutex to synchronize blkg_free_workfn() and blkcg_deactivate_policy(). Signed-off-by: Yu Kuai Acked-by: Tejun Heo Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230119110350.2287325-4-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe commit dfd6200a095440b663099d8d42f1efb0175a1ce3 Author: Yu Kuai Date: Thu Jan 19 19:03:49 2023 +0800 blk-cgroup: support to track if policy is online A new field 'online' is added to blkg_policy_data to fix following 2 problem: 1) In blkcg_activate_policy(), if pd_alloc_fn() with 'GFP_NOWAIT' failed, 'queue_lock' will be dropped and pd_alloc_fn() will try again without 'GFP_NOWAIT'. In the meantime, remove cgroup can race with it, and pd_offline_fn() will be called without pd_init_fn() and pd_online_fn(). This way null-ptr-deference can be triggered. 2) In order to synchronize pd_free_fn() from blkg_free_workfn() and blkcg_deactivate_policy(), 'list_del_init(&blkg->q_node)' will be delayed to blkg_free_workfn(), hence pd_offline_fn() can be called first in blkg_destroy(), and then blkcg_deactivate_policy() will call it again, we must prevent it. The new field 'online' will be set after pd_online_fn() and will be cleared after pd_offline_fn(), in the meantime pd_offline_fn() will only be called if 'online' is set. Signed-off-by: Yu Kuai Acked-by: Tejun Heo Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230119110350.2287325-3-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe commit c7241babf0855d8a6180cd1743ff0ec34de40b4e Author: Yu Kuai Date: Thu Jan 19 19:03:48 2023 +0800 blk-cgroup: dropping parent refcount after pd_free_fn() is done Some cgroup policies will access parent pd through child pd even after pd_offline_fn() is done. If pd_free_fn() for parent is called before child, then UAF can be triggered. Hence it's better to guarantee the order of pd_free_fn(). Currently refcount of parent blkg is dropped in __blkg_release(), which is before pd_free_fn() is called in blkg_free_work_fn() while blkg_free_work_fn() is called asynchronously. This patch make sure pd_free_fn() called from removing cgroup is ordered by delaying dropping parent refcount after calling pd_free_fn() for child. BTW, pd_free_fn() will also be called from blkcg_deactivate_policy() from deleting device, and following patches will guarantee the order. Signed-off-by: Yu Kuai Acked-by: Tejun Heo Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230119110350.2287325-2-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe commit b36781034c42f9932bc6305e9a06490d61d9b8ff Author: Zhong Jinghua Date: Sat Jan 28 11:04:19 2023 +0800 blk-mq: cleanup unused methods: blk_mq_hw_sysfs_store We found that the blk_mq_hw_sysfs_store interface has no place to use. The object default_hw_ctx_attrs using blk_mq_hw_sysfs_ops only uses the show method and does not use the store method. Since this patch: 4a46f05ebf99 ("blk-mq: move hctx and ctx counters from sysfs to debugfs") moved the store method to debugfs, the store method is not used anymore. So let me do some tiny work to clean up unused code. Signed-off-by: Zhong Jinghua Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20230128030419.2780298-1-zhongjinghua@huawei.com Signed-off-by: Jens Axboe commit 9607cd36bb23e1c3271a394407c0caf4f7a207ab Author: Christoph Hellwig Date: Mon Jan 23 08:53:56 2023 +0100 s390/dcssblk:: don't call bio_split_to_limits s390 iterates over the bio using bio_for_each_segment and doesn't need any bio splitting. Signed-off-by: Christoph Hellwig Acked-by: Alexander Gordeev Link: https://lore.kernel.org/r/20230123075356.60847-1-hch@lst.de Signed-off-by: Jens Axboe commit 1bf7a749efdc5183e83239e030596ef74b9c8b13 Author: Christoph Hellwig Date: Mon Jan 23 08:47:18 2023 +0100 ps3vram: remove bio splitting ps3vram iterates over the bio one segment, that is page aligned and max page sized chunk, a time. Because of that there is no point in calling bio_split_to_limits, or explicitly setting the default limits that are only used by bio_split_to_limits. Signed-off-by: Christoph Hellwig Tested-by: Geoff Levand Link: https://lore.kernel.org/r/20230123074718.57951-1-hch@lst.de Signed-off-by: Jens Axboe commit 33391eecd63158536fb5257fee5be3a3bdc30e3c Author: Jens Axboe Date: Fri Jan 20 07:51:07 2023 -0700 block: treat poll queue enter similarly to timeouts We ran into an issue where a production workload would randomly grind to a halt and not continue until the pending IO had timed out. This turned out to be a complicated interaction between queue freezing and polled IO: 1) You have an application that does polled IO. At any point in time, there may be polled IO pending. 2) You have a monitoring application that issues a passthrough command, which is marked with side effects such that it needs to freeze the queue. 3) Passthrough command is started, which calls blk_freeze_queue_start() on the device. At this point the queue is marked frozen, and any attempt to enter the queue will fail (for non-blocking) or block. 4) Now the driver calls blk_mq_freeze_queue_wait(), which will return when the queue is quiesced and pending IO has completed. 5) The pending IO is polled IO, but any attempt to poll IO through the normal iocb_bio_iopoll() -> bio_poll() will fail when it gets to bio_queue_enter() as the queue is frozen. Rather than poll and complete IO, the polling threads will sit in a tight loop attempting to poll, but failing to enter the queue to do so. The end result is that progress for either application will be stalled until all pending polled IO has timed out. This causes obvious huge latency issues for the application doing polled IO, but also long delays for passthrough command. Fix this by treating queue enter for polled IO just like we do for timeouts. This allows quick quiesce of the queue as we still poll and complete this IO, while still disallowing queueing up new IO. Reviewed-by: Keith Busch Signed-off-by: Jens Axboe commit b3260329658483d8e46f0298bfa4ce0b772a6555 Author: Li Nan Date: Tue Jan 17 15:08:06 2023 +0800 blk-iocost: change div64_u64 to DIV64_U64_ROUND_UP in ioc_refresh_params() vrate_min is calculated by DIV64_U64_ROUND_UP, but vrate_max is calculated by div64_u64. Vrate_min may be 1 greater than vrate_max if the input values min and max of cost.qos are equal. Signed-off-by: Li Nan Signed-off-by: Yu Kuai Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230117070806.3857142-6-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe commit 984af1e66b4126cf145153661cc24c213e2ec231 Author: Li Nan Date: Tue Jan 17 15:08:05 2023 +0800 blk-iocost: fix divide by 0 error in calc_lcoefs() echo max of u64 to cost.model can cause divide by 0 error. # echo 8:0 rbps=18446744073709551615 > /sys/fs/cgroup/io.cost.model divide error: 0000 [#1] PREEMPT SMP RIP: 0010:calc_lcoefs+0x4c/0xc0 Call Trace: ioc_refresh_params+0x2b3/0x4f0 ioc_cost_model_write+0x3cb/0x4c0 ? _copy_from_iter+0x6d/0x6c0 ? kernfs_fop_write_iter+0xfc/0x270 cgroup_file_write+0xa0/0x200 kernfs_fop_write_iter+0x17d/0x270 vfs_write+0x414/0x620 ksys_write+0x73/0x160 __x64_sys_write+0x1e/0x30 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd calc_lcoefs() uses the input value of cost.model in DIV_ROUND_UP_ULL, overflow would happen if bps plus IOC_PAGE_SIZE is greater than ULLONG_MAX, it can cause divide by 0 error. Fix the problem by setting basecost Signed-off-by: Li Nan Signed-off-by: Yu Kuai Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230117070806.3857142-5-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe commit 35198e32300190d52e7f50413dde4f86dea1de92 Author: Yu Kuai Date: Tue Jan 17 15:08:04 2023 +0800 blk-iocost: read params inside lock in sysfs apis Otherwise, user might get abnormal values if params is updated concurrently. Signed-off-by: Yu Kuai Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230117070806.3857142-4-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe commit 235a5a83f637e32646cd004c9b580decf1225566 Author: Yu Kuai Date: Tue Jan 17 15:08:03 2023 +0800 blk-iocost: don't allow to configure bio based device iocost is based on rq_qos, which can only work for request based device, thus it doesn't make sense to configure iocost for bio based device. Signed-off-by: Yu Kuai Reviewed-by: Christoph Hellwig Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230117070806.3857142-3-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe commit 7b7c5ae4402f810612e84c4ded7a302a61eeba59 Author: Yu Kuai Date: Tue Jan 17 15:08:02 2023 +0800 blk-iocost: check return value of match_u64() This patch fixs that the return value of match_u64() from ioc_qos_write() is not checked, Signed-off-by: Yu Kuai Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230117070806.3857142-2-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe commit 5f2779dfa7b8cc7dfd4a1b6586d86e0d193266f3 Author: Arnd Bergmann Date: Wed Jan 18 09:07:01 2023 +0100 blk-iocost: avoid 64-bit division in ioc_timer_fn The behavior of 'enum' types has changed in gcc-13, so now the UNBUSY_THR_PCT constant is interpreted as a 64-bit number because it is defined as part of the same enum definition as some other constants that do not fit within a 32-bit integer. This in turn leads to some inefficient code on 32-bit architectures as well as a link error: arm-linux-gnueabi/bin/arm-linux-gnueabi-ld: block/blk-iocost.o: in function `ioc_timer_fn': blk-iocost.c:(.text+0x68e8): undefined reference to `__aeabi_uldivmod' arm-linux-gnueabi-ld: blk-iocost.c:(.text+0x6908): undefined reference to `__aeabi_uldivmod' Split the enum definition to keep the 64-bit timing constants in a separate enum type from those constants that can clearly fit within a smaller type. Signed-off-by: Arnd Bergmann Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230118080706.3303186-1-arnd@kernel.org Signed-off-by: Jens Axboe commit 464544fb93fc7b5ac92b49c3ce60ab95a48aadf7 Author: Ming Lei Date: Wed Jan 18 12:23:18 2023 +0800 block: ublk: fix doc build warning Fix the following warning: Documentation/block/ublk.rst:157: WARNING: Enumerated list ends without a blank line; unexpected unindent. Documentation/block/ublk.rst:171: WARNING: Enumerated list ends without a blank line; unexpected unindent. Fixes: 56f5160bc1b8 ("ublk_drv: add mechanism for supporting unprivileged ublk device") Reported-by: Stephen Rothwell Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20230118042318.127900-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit d67ea690ce0983dadf59cd06facc18f3acc89cea Author: Pankaj Raghav Date: Tue Jan 10 15:36:35 2023 +0100 block: introduce bdev_zone_no helper Add a generic bdev_zone_no() helper to calculate zone number for a given sector in a block device. This helper internally uses disk_zone_no() to find the zone number. Use the helper bdev_zone_no() to calculate nr of zones. This lets us make modifications to the math if needed in one place. Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Signed-off-by: Pankaj Raghav Link: https://lore.kernel.org/r/20230110143635.77300-4-p.raghav@samsung.com Signed-off-by: Jens Axboe commit e29b210021dcf8e03e0dcc035107afaeb55e6631 Author: Pankaj Raghav Date: Tue Jan 10 15:36:34 2023 +0100 block: add a new helper bdev_{is_zone_start, offset_from_zone_start} Instead of open coding to check for zone start, add a helper to improve readability and store the logic in one place. Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Signed-off-by: Pankaj Raghav Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20230110143635.77300-3-p.raghav@samsung.com Signed-off-by: Jens Axboe commit fea127b36c93d9afe49561b640fe1fc541dc3ba4 Author: Pankaj Raghav Date: Tue Jan 10 15:36:33 2023 +0100 block: remove superfluous check for request queue in bdev_is_zoned() Remove the superfluous request queue check in bdev_is_zoned() as bdev_get_queue() can never return NULL. Reviewed-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Bart Van Assche Reviewed-by: Chaitanya Kulkarni Reviewed-by: Johannes Thumshirn Signed-off-by: Pankaj Raghav Link: https://lore.kernel.org/r/20230110143635.77300-2-p.raghav@samsung.com Signed-off-by: Jens Axboe commit 7e2e355dd9c9031e19b573d2c48171b0418ec552 Author: Anuj Gupta Date: Tue Jan 17 17:36:38 2023 +0530 block: extend bio-cache for non-polled requests This patch modifies the present check, so that bio-cache is not limited to iopoll. Signed-off-by: Anuj Gupta Signed-off-by: Kanchan Joshi Link: https://lore.kernel.org/r/20230117120638.72254-3-anuj20.g@samsung.com Signed-off-by: Jens Axboe commit 888545cb43d7639457883dc325c303a3737c0a64 Author: Anuj Gupta Date: Tue Jan 17 17:36:37 2023 +0530 nvme: set REQ_ALLOC_CACHE for uring-passthru request This patch sets REQ_ALLOC_CACHE flag for uring-passthru requests. This is a prep-patch so that normal / IRQ-driven uring-passthru I/Os can also leverage bio-cache. Signed-off-by: Anuj Gupta Signed-off-by: Kanchan Joshi Link: https://lore.kernel.org/r/20230117120638.72254-2-anuj20.g@samsung.com Signed-off-by: Jens Axboe commit 4093cb5a06343ea3936ae46664d132c82576b153 Author: Ming Lei Date: Fri Jan 6 12:17:11 2023 +0800 ublk_drv: add mechanism for supporting unprivileged ublk device unprivileged ublk device is helpful for container use case, such as: ublk device created in one unprivileged container can be controlled and accessed by this container only. Implement this feature by adding flag of UBLK_F_UNPRIVILEGED_DEV, and if this flag isn't set, any control command has been run from privileged user. Otherwise, any control command can be sent from any unprivileged user, but the user has to be permitted to access the ublk char device to be controlled. In case of UBLK_F_UNPRIVILEGED_DEV: 1) for command UBLK_CMD_ADD_DEV, it is always allowed, and user needs to provide owner's uid/gid in this command, so that udev can set correct ownership for the created ublk device, since the device owner uid/gid can be queried via command of UBLK_CMD_GET_DEV_INFO. 2) for other control commands, they can only be run successfully if the current user is allowed to access the specified ublk char device, for running the permission check, path of the ublk char device has to be provided by these commands. Also add one control of command UBLK_CMD_GET_DEV_INFO2 which always include the char dev path in payload since userspace may not have knowledge if this device is created in unprivileged mode. For applying this mechanism, system administrator needs to take the following policies: 1) chmod 0666 /dev/ublk-control 2) change ownership of ublkcN & ublkbN - chown owner_uid:owner_gid /dev/ublkcN - chown owner_uid:owner_gid /dev/ublkbN Both can be done via one simple udev rule. Userspace: https://github.com/ming1/ubdsrv/tree/unprivileged-ublk 'ublk add -t $TYPE --un_privileged=1' is for creating one un-privileged ublk device if the user is un-privileged. Link: https://lore.kernel.org/linux-block/YoOr6jBfgVm8GvWg@stefanha-x1.localdomain/ Suggested-by: Stefan Hajnoczi Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20230106041711.914434-7-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 403ebc877832752da9fc851284fa00ceca7b2fae Author: Ming Lei Date: Fri Jan 6 12:17:10 2023 +0800 ublk_drv: add module parameter of ublks_max for limiting max allowed ublk dev Prepare for supporting unprivileged ublk device by limiting max number ublk devices added. Otherwise too many ublk devices could be added by un-trusted user, which can be thought as one DoS. Reviewed-by: ZiyangZhang Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20230106041711.914434-6-ming.lei@redhat.com Signed-off-by: Jens Axboe commit abb864d380854b5427b6b070beb2ebc291ce4d1e Author: Ming Lei Date: Fri Jan 6 12:17:09 2023 +0800 ublk_drv: add device parameter UBLK_PARAM_TYPE_DEVT Userspace side only knows device ID, but the associated path of ublkc* and ublkb* could be changed by udev, and that depends on userspace's policy, so add parameter of UBLK_PARAM_TYPE_DEVT for retrieving major/minor of the ublkc* and ublkb*, then user may figure out major/minor of the ublk disks he/she owns. With major/minor, it is easy to find the device node path. Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20230106041711.914434-5-ming.lei@redhat.com Signed-off-by: Jens Axboe commit bfbcef036396a73fbf4b3fee385cc670159df5ad Author: Ming Lei Date: Fri Jan 6 12:17:08 2023 +0800 ublk_drv: move ublk_get_device_from_id into ublk_ctrl_uring_cmd It is annoying for each control command handler to get/put ublk device and deal with failure. Control command handler is simplified a lot by moving ublk_get_device_from_id into ublk_ctrl_uring_cmd(). Reviewed-by: ZiyangZhang Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20230106041711.914434-4-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 73a166d9749230d598320fdae3b687cdc0e2e205 Author: Ming Lei Date: Fri Jan 6 12:17:07 2023 +0800 ublk_drv: don't probe partitions if the ubq daemon isn't trusted If any ubq daemon is unprivileged, the ublk char device is allowed for unprivileged user actually, and we can't trust the current user, so not probe partitions. Fixes: 71f28f3136af ("ublk_drv: add io_uring based userspace block driver") Reviewed-by: ZiyangZhang Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20230106041711.914434-3-ming.lei@redhat.com Signed-off-by: Jens Axboe commit ed878d1c1c641c4a6bd366658fc8e6bc842b80d1 Author: Ming Lei Date: Fri Jan 6 12:17:06 2023 +0800 ublk_drv: remove nr_aborted_queues from ublk_device No one uses 'nr_aborted_queues' any more, so remove it. Reviewed-by: ZiyangZhang Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20230106041711.914434-2-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 67d59247d4b52c917e373f05a807027756ab216f Author: Jens Axboe Date: Mon Jan 16 08:55:53 2023 -0700 block: don't allow multiple bios for IOCB_NOWAIT issue If we're doing a large IO request which needs to be split into multiple bios for issue, then we can run into the same situation as the below marked commit fixes - parts will complete just fine, one or more parts will fail to allocate a request. This will result in a partially completed read or write request, where the caller gets EAGAIN even though parts of the IO completed just fine. Do the same for large bios as we do for splits - fail a NOWAIT request with EAGAIN. This isn't technically fixing an issue in the below marked patch, but for stable purposes, we should have either none of them or both. This depends on: 613b14884b85 ("block: handle bio_split_to_limits() NULL return") Cc: stable@vger.kernel.org # 5.15+ Fixes: 9cea62b2cbab ("block: don't allow splitting of a REQ_NOWAIT bio") Link: https://github.com/axboe/liburing/issues/766 Reported-and-tested-by: Michael Kelley Signed-off-by: Jens Axboe commit 2bb34fa6ff4183b42c397866ec2443ab5eabc280 Author: Andreas Gruenbacher Date: Fri Jan 13 13:35:38 2023 +0100 drbd: drbd_insert_interval(): Clarify comment Signed-off-by: Andreas Gruenbacher Signed-off-by: Christoph Böhmwalder Link: https://lore.kernel.org/r/20230113123538.144276-9-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe commit 2990ca29f36171e052ea42d8464ec2e21cf4485a Author: Lars Ellenberg Date: Fri Jan 13 13:35:37 2023 +0100 drbd: interval tree: make removing an "empty" interval a no-op Trying to remove an "empty" (just initialized, or "cleared") interval from the tree, this results in an endless loop. As we typically protect the tree with a spinlock_irq, the result is a hung system. Be nice to error cleanup code paths, ignore removal of empty intervals. Signed-off-by: Lars Ellenberg Signed-off-by: Christoph Böhmwalder Link: https://lore.kernel.org/r/20230113123538.144276-8-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe commit 6d9be160df486d95cee30ba1f20d0c669db57c2a Author: Christoph Böhmwalder Date: Fri Jan 13 13:35:36 2023 +0100 MAINTAINERS: add drbd headers Signed-off-by: Christoph Böhmwalder Reviewed-by: Joel Colledge Link: https://lore.kernel.org/r/20230113123538.144276-7-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe commit 9cf766a457995a95d7f66d78cf749d05067d68a4 Author: Christoph Böhmwalder Date: Fri Jan 13 13:35:35 2023 +0100 drbd: remove macros using require_context This require_context attribute originated in a proposed sparse patch by Philipp Reisner back in 2008. Johannes Berg had a different solution to a similar problem, and that patch "won" in the end; so the require_context thing never got merged. The whole history can be read at [0]. DRBD kept using these annotations anyway for a while. Nowadays, on a modern unmodified sparse, they obviously do nothing, and they are hardly used anymore anyway. So, just remove the definitions of these macros. [0] https://www.spinics.net/lists/linux-sparse/msg01150.html Signed-off-by: Christoph Böhmwalder Reviewed-by: Joel Colledge Link: https://lore.kernel.org/r/20230113123538.144276-6-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe commit 069182007d1ad05b6aaadd9f3864c33b279e2685 Author: Christoph Böhmwalder Date: Fri Jan 13 13:35:34 2023 +0100 drbd: remove unnecessary assignment in vli_encode_bits Signed-off-by: Christoph Böhmwalder Reviewed-by: Joel Colledge Link: https://lore.kernel.org/r/20230113123538.144276-5-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe commit c10bdcf9838e556f54eee63253f629028e01dee9 Author: Christoph Böhmwalder Date: Fri Jan 13 13:35:33 2023 +0100 drbd: make limits unsigned These are almost always used as unsigned integers, so mark them as such. Signed-off-by: Christoph Böhmwalder Reviewed-by: Joel Colledge Link: https://lore.kernel.org/r/20230113123538.144276-4-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe commit 2167879655b3a9a0a970d50b202e45f7fc45d092 Author: Robert Altnoeder Date: Fri Jan 13 13:35:32 2023 +0100 drbd: fix DRBD_VOLUME_MAX 65535 -> 65534 The protocol uses -1 as a reserved value for 'no specific volume', and since the protocol field is a 16 bit unsigned value, -1 is converted to 65535. Therefore, limit the range of valid volume numbers to [0, 65534]. Signed-off-by: Robert Altnoeder Signed-off-by: Christoph Böhmwalder Reviewed-by: Joel Colledge Link: https://lore.kernel.org/r/20230113123538.144276-3-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe commit 37800068673220326fcdf7f40ccf05ca54854585 Author: Christoph Böhmwalder Date: Fri Jan 13 13:35:31 2023 +0100 drbd: adjust drbd_limits license header See also commit 93c68cc46a07 ("drbd: use consistent license"). We only want to license drbd under GPL-2.0, so use the corresponding SPDX header consistently. Signed-off-by: Christoph Böhmwalder Reviewed-by: Joel Colledge Link: https://lore.kernel.org/r/20230113123538.144276-2-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe commit 20f2a34a421b1716b96d1e34d4f4948bf4b4ba1e Author: Christoph Böhmwalder Date: Fri Jan 13 13:35:06 2023 +0100 drbd: split off drbd_config into separate file To be more similar to what we do in the out-of-tree module and ease the upstreaming process. Signed-off-by: Christoph Böhmwalder Reviewed-by: Joel Colledge Link: https://lore.kernel.org/r/20230113123506.144082-4-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe commit 4e2da933b9f19d8098374515ee0984a20202e674 Author: Christoph Böhmwalder Date: Fri Jan 13 13:35:05 2023 +0100 drbd: drop API_VERSION define Use the genetlink api version as defined in drbd_genl_api.h. Signed-off-by: Christoph Böhmwalder Reviewed-by: Joel Colledge Link: https://lore.kernel.org/r/20230113123506.144082-3-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe commit 887b98c74fdf9ab44e93ad9166977cbbb766d2c2 Author: Christoph Böhmwalder Date: Fri Jan 13 13:35:04 2023 +0100 drbd: split off drbd_buildtag into separate file To be more similar to what we do in the out-of-tree module and ease the upstreaming process. Signed-off-by: Christoph Böhmwalder Reviewed-by: Joel Colledge Link: https://lore.kernel.org/r/20230113123506.144082-2-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe commit a3df2e456c0f9db4cc7f2013eb0beb853945b937 Author: Jens Axboe Date: Mon Jan 9 10:45:56 2023 -0700 block: add a BUILD_BUG_ON() for adding more bio flags than we have space We have BIO_FLAG_LAST in the enum for bio specific flags, but it's not used to check that we're not exceeding the size of them. Add such a check. Reviewed-by: Damien Le Moal Signed-off-by: Jens Axboe commit c9c77418a98273fe96835c42666f7427b3883f48 Author: Keith Busch Date: Thu Jan 5 12:51:46 2023 -0800 block: save user max_sectors limit The user can set the max_sectors limit to any valid value via sysfs /sys/block//queue/max_sectors_kb attribute. If the device limits are ever rescanned, though, the limit reverts back to the potentially artificially low BLK_DEF_MAX_SECTORS value. Preserve the user's setting as the max_sectors limit as long as it's valid. The user can reset back to defaults by writing 0 to the sysfs file. Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20230105205146.3610282-3-kbusch@meta.com Signed-off-by: Jens Axboe commit 0a26f327e46c203229e72c823dfec71a2b405ec5 Author: Keith Busch Date: Thu Jan 5 12:51:45 2023 -0800 block: make BLK_DEF_MAX_SECTORS unsigned This is used as an unsigned value, so define it that way to avoid having to cast it. Suggested-by: Christoph Hellwig Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20230105205146.3610282-2-kbusch@meta.com Signed-off-by: Jens Axboe commit 1bd43e19de1b99179b9beb92b14697e113326d00 Author: Davide Zini Date: Tue Jan 3 15:55:03 2023 +0100 block, bfq: balance I/O injection among underutilized actuators Upon the invocation of its dispatch function, BFQ returns the next I/O request of the in-service bfq_queue, unless some exception holds. One such exception is that there is some underutilized actuator, different from the actuator for which the in-service queue contains I/O, and that some other bfq_queue happens to contain I/O for such an actuator. In this case, the next I/O request of the latter bfq_queue, and not of the in-service bfq_queue, is returned (I/O is injected from that bfq_queue). To find such an actuator, a linear scan, in increasing index order, is performed among actuators. Performing a linear scan entails a prioritization among actuators: an underutilized actuator may be considered for injection only if all actuators with a lower index are currently fully utilized, or if there is no pending I/O for any lower-index actuator that happens to be underutilized. This commits breaks this prioritization and tends to distribute injection uniformly across actuators. This is obtained by adding the following condition to the linear scan: even if an actuator A is underutilized, A is however skipped if its load is higher than that of the next actuator. Reviewed-by: Damien Le Moal Signed-off-by: Paolo Valente Signed-off-by: Davide Zini Link: https://lore.kernel.org/r/20230103145503.71712-9-paolo.valente@linaro.org Signed-off-by: Jens Axboe commit 2d31c684a053b46f75b230899d00c0f56708243d Author: Davide Zini Date: Tue Jan 3 15:55:02 2023 +0100 block, bfq: inject I/O to underutilized actuators The main service scheme of BFQ for sync I/O is serving one sync bfq_queue at a time, for a while. In particular, BFQ enforces this scheme when it deems the latter necessary to boost throughput or to preserve service guarantees. Unfortunately, when BFQ enforces this policy, only one actuator at a time gets served for a while, because each bfq_queue contains I/O only for one actuator. The other actuators may remain underutilized. Actually, BFQ may serve (inject) extra I/O, taken from other bfq_queues, in parallel with that of the in-service queue. This injection mechanism may provide the ground for dealing also with the above actuator-underutilization problem. Yet BFQ does not take the actuator load into account when choosing which queue to pick extra I/O from. In addition, BFQ may happen to inject extra I/O only when the in-service queue is temporarily empty. In view of these facts, this commit extends the injection mechanism in such a way that the latter: (1) takes into account also the actuator load; (2) checks such a load on each dispatch, and injects I/O for an underutilized actuator, if there is one and there is I/O for it. To perform the check in (2), this commit introduces a load threshold, currently set to 4. A linear scan of each actuator is performed, until an actuator is found for which the following two conditions hold: the load of the actuator is below the threshold, and there is at least one non-in-service queue that contains I/O for that actuator. If such a pair (actuator, queue) is found, then the head request of that queue is returned for dispatch, instead of the head request of the in-service queue. We have set the threshold, empirically, to the minimum possible value for which an actuator is fully utilized, or close to be fully utilized. By doing so, injected I/O 'steals' as few drive-queue slots as possibile to the in-service queue. This reduces as much as possible the probability that the service of I/O from the in-service bfq_queue gets delayed because of slot exhaustion, i.e., because all the slots of the drive queue are filled with I/O injected from other queues (NCQ provides for 32 slots). This new mechanism also counters actuator underutilization in the case of asymmetric configurations of bfq_queues. Namely if there are few bfq_queues containing I/O for some actuators and many bfq_queues containing I/O for other actuators. Or if the bfq_queues containing I/O for some actuators have lower weights than the other bfq_queues. Reviewed-by: Damien Le Moal Signed-off-by: Paolo Valente Signed-off-by: Davide Zini Link: https://lore.kernel.org/r/20230103145503.71712-8-paolo.valente@linaro.org Signed-off-by: Jens Axboe commit 4fdb3b9f2a280eeea3407321705275fc9a77e3a6 Author: Federico Gavioli Date: Tue Jan 3 15:55:01 2023 +0100 block, bfq: retrieve independent access ranges from request queue This patch implements the code to gather the content of the independent_access_ranges structure from the request_queue and copy it into the queue's bfq_data. This copy is done at queue initialization. We copy the access ranges into the bfq_data to avoid taking the queue lock each time we access the ranges. This implementation, however, puts a limit to the maximum independent ranges supported by the scheduler. Such a limit is equal to the constant BFQ_MAX_ACTUATORS. This limit was placed to avoid the allocation of dynamic memory. Reviewed-by: Damien Le Moal Co-developed-by: Rory Chen Signed-off-by: Rory Chen Signed-off-by: Federico Gavioli Signed-off-by: Paolo Valente Link: https://lore.kernel.org/r/20230103145503.71712-7-paolo.valente@linaro.org Signed-off-by: Jens Axboe commit 8b7fd7411176b9e4478d46b00fd05e46ce18a28d Author: Davide Zini Date: Tue Jan 3 15:55:00 2023 +0100 block, bfq: split also async bfq_queues on a per-actuator basis Similarly to sync bfq_queues, also async bfq_queues need to be split on a per-actuator basis. Reviewed-by: Damien Le Moal Signed-off-by: Paolo Valente Signed-off-by: Davide Zini Link: https://lore.kernel.org/r/20230103145503.71712-6-paolo.valente@linaro.org Signed-off-by: Jens Axboe commit fd571df0ac5b289af8c659891f9b72f4c0cfdbd2 Author: Paolo Valente Date: Tue Jan 3 15:54:59 2023 +0100 block, bfq: turn bfqq_data into an array in bfq_io_cq When a bfq_queue Q is merged with another queue, several pieces of information are saved about Q. These pieces are stored in the bfqq_data field in the bfq_io_cq data structure of the process associated with Q. Yet, with a multi-actuator drive, a process may get associated with multiple bfq_queues: one queue for each of the N actuators. Each of these queues may undergo a merge. So, the bfq_io_cq data structure must be able to accommodate the above information for N queues. This commit solves this problem by turning the bfqq_data scalar field into an array of N elements (and by changing code so as to handle this array). This solution is written under the assumption that bfq_queues associated with different actuators cannot be cross-merged. This assumption holds naturally with basic queue merging: the latter is triggered by spatial locality, and sectors for different actuators are not close to each other (apart from the corner case of the last sectors served by a given actuator and the first sectors served by the next actuator). As for stable cross-merging, the assumption here is that it is disabled. Reviewed-by: Damien Le Moal Signed-off-by: Gabriele Felici Signed-off-by: Gianmarco Lusvardi Signed-off-by: Giulio Barabino Signed-off-by: Emiliano Maccaferri Signed-off-by: Paolo Valente Link: https://lore.kernel.org/r/20230103145503.71712-5-paolo.valente@linaro.org Signed-off-by: Jens Axboe commit a61230470c8cbd4eec0dc4dd99a3867d009c0b05 Author: Paolo Valente Date: Tue Jan 3 15:54:58 2023 +0100 block, bfq: move io_cq-persistent bfqq data into a dedicated struct With a multi-actuator drive, a process may get associated with multiple bfq_queues: one queue for each of the N actuators. So, the bfq_io_cq data structure must be able to accommodate its per-queue persistent information for N queues. Currently it stores this information for just one queue, in several scalar fields. This is a preparatory commit for moving to accommodating persistent information for N queues. In particular, this commit packs all the above scalar fields into a single data structure. Then there is now only one field, in bfq_io_cq, that stores all the above information. This scalar field will then be turned into an array by a following commit. Suggested-by: Damien Le Moal Reviewed-by: Damien Le Moal Signed-off-by: Gianmarco Lusvardi Signed-off-by: Giulio Barabino Signed-off-by: Emiliano Maccaferri Signed-off-by: Paolo Valente Link: https://lore.kernel.org/r/20230103145503.71712-4-paolo.valente@linaro.org Signed-off-by: Jens Axboe commit b752989897b4b71260e5456be16c44e9a96c999b Author: Paolo Valente Date: Tue Jan 3 15:54:57 2023 +0100 block, bfq: forbid stable merging of queues associated with different actuators If queues associated with different actuators are merged, then control is lost on each actuator. Therefore some actuator may be underutilized, and throughput may decrease. This problem cannot occur with basic queue merging, because the latter is triggered by spatial locality, and sectors for different actuators are not close to each other. Yet it may happen with stable merging. To address this issue, this commit prevents stable merging from occurring among queues associated with different actuators. Reviewed-by: Damien Le Moal Signed-off-by: Paolo Valente Link: https://lore.kernel.org/r/20230103145503.71712-3-paolo.valente@linaro.org Signed-off-by: Jens Axboe commit 9778369a2d6c5ed2b81a04164c4aa9da1bdb193d Author: Paolo Valente Date: Tue Jan 3 15:54:56 2023 +0100 block, bfq: split sync bfq_queues on a per-actuator basis Single-LUN multi-actuator SCSI drives, as well as all multi-actuator SATA drives appear as a single device to the I/O subsystem [1]. Yet they address commands to different actuators internally, as a function of Logical Block Addressing (LBAs). A given sector is reachable by only one of the actuators. For example, Seagate’s Serial Advanced Technology Attachment (SATA) version contains two actuators and maps the lower half of the SATA LBA space to the lower actuator and the upper half to the upper actuator. Evidently, to fully utilize actuators, no actuator must be left idle or underutilized while there is pending I/O for it. The block layer must somehow control the load of each actuator individually. This commit lays the ground for allowing BFQ to provide such a per-actuator control. BFQ associates an I/O-request sync bfq_queue with each process doing synchronous I/O, or with a group of processes, in case of queue merging. Then BFQ serves one bfq_queue at a time. While in service, a bfq_queue is emptied in request-position order. Yet the same process, or group of processes, may generate I/O for different actuators. In this case, different streams of I/O (each for a different actuator) get all inserted into the same sync bfq_queue. So there is basically no individual control on when each stream is served, i.e., on when the I/O requests of the stream are picked from the bfq_queue and dispatched to the drive. This commit enables BFQ to control the service of each actuator individually for synchronous I/O, by simply splitting each sync bfq_queue into N queues, one for each actuator. In other words, a sync bfq_queue is now associated to a pair (process, actuator). As a consequence of this split, the per-queue proportional-share policy implemented by BFQ will guarantee that the sync I/O generated for each actuator, by each process, receives its fair share of service. This is just a preparatory patch. If the I/O of the same process happens to be sent to different queues, then each of these queues may undergo queue merging. To handle this event, the bfq_io_cq data structure must be properly extended. In addition, stable merging must be disabled to avoid loss of control on individual actuators. Finally, also async queues must be split. These issues are described in detail and addressed in next commits. As for this commit, although multiple per-process bfq_queues are provided, the I/O of each process or group of processes is still sent to only one queue, regardless of the actuator the I/O is for. The forwarding to distinct bfq_queues will be enabled after addressing the above issues. [1] https://www.linaro.org/blog/budget-fair-queueing-bfq-linux-io-scheduler-optimizations-for-multi-actuator-sata-hard-drives/ Reviewed-by: Damien Le Moal Signed-off-by: Gabriele Felici Signed-off-by: Carmine Zaccagnino Signed-off-by: Paolo Valente Link: https://lore.kernel.org/r/20230103145503.71712-2-paolo.valente@linaro.org Signed-off-by: Jens Axboe commit 0ffae640ad83de46865c6b8dc3fda370823e4f1d Author: Dylan Yudaken Date: Fri Jan 27 05:52:27 2023 -0800 io_uring: always go async for unsupported open flags No point in issuing -> return -EAGAIN -> go async, when it can be done upfront. Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20230127135227.3646353-5-dylany@meta.com Signed-off-by: Jens Axboe commit c31cc60fddd11134031e7f9eb76812353cfaac84 Author: Dylan Yudaken Date: Fri Jan 27 05:52:26 2023 -0800 io_uring: always go async for unsupported fadvise flags No point in issuing -> return -EAGAIN -> go async, when it can be done upfront. Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20230127135227.3646353-4-dylany@meta.com Signed-off-by: Jens Axboe commit aebb224fd4fc7352cd839ad90414c548387142fd Author: Dylan Yudaken Date: Fri Jan 27 05:52:25 2023 -0800 io_uring: for requests that require async, force it Some requests require being run async as they do not support non-blocking. Instead of trying to issue these requests, getting -EAGAIN and then queueing them for async issue, rather just force async upfront. Add WARN_ON_ONCE to make sure surprising code paths do not come up, however in those cases the bug would end up being a blocking io_uring_enter(2) which should not be critical. Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20230127135227.3646353-3-dylany@meta.com Signed-off-by: Jens Axboe commit 6bb30855560e6343e7b88595d7c3159d0f848a04 Author: Dylan Yudaken Date: Fri Jan 27 05:52:24 2023 -0800 io_uring: if a linked request has REQ_F_FORCE_ASYNC then run it async REQ_F_FORCE_ASYNC was being ignored for re-queueing linked requests. Instead obey that flag. Signed-off-by: Dylan Yudaken Link: https://lore.kernel.org/r/20230127135227.3646353-2-dylany@meta.com Signed-off-by: Jens Axboe commit f58680085478dd292435727210122960d38e8014 Author: Jens Axboe Date: Fri Jan 27 09:50:31 2023 -0700 io_uring: add reschedule point to handle_tw_list() If CONFIG_PREEMPT_NONE is set and the task_work chains are long, we could be running into issues blocking others for too long. Add a reschedule check in handle_tw_list(), and flush the ctx if we need to reschedule. Cc: stable@vger.kernel.org # 5.10+ Signed-off-by: Jens Axboe commit fcc926bb857949dbfa51a7d95f3f5ebc657f198c Author: Jens Axboe Date: Fri Jan 27 09:28:13 2023 -0700 io_uring: add a conditional reschedule to the IOPOLL cancelation loop If the kernel is configured with CONFIG_PREEMPT_NONE, we could be sitting in a tight loop reaping events but not giving them a chance to finish. This results in a trace ala: rcu: INFO: rcu_sched self-detected stall on CPU rcu: 2-...!: (5249 ticks this GP) idle=935c/1/0x4000000000000000 softirq=4265/4274 fqs=1 (t=5251 jiffies g=465 q=4135 ncpus=4) rcu: rcu_sched kthread starved for 5249 jiffies! g465 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x0 ->cpu=0 rcu: Unless rcu_sched kthread gets sufficient CPU time, OOM is now expected behavior. rcu: RCU grace-period kthread stack dump: task:rcu_sched state:R running task stack:0 pid:12 ppid:2 flags:0x00000008 Call trace: __switch_to+0xb0/0xc8 __schedule+0x43c/0x520 schedule+0x4c/0x98 schedule_timeout+0xbc/0xdc rcu_gp_fqs_loop+0x308/0x344 rcu_gp_kthread+0xd8/0xf0 kthread+0xb8/0xc8 ret_from_fork+0x10/0x20 rcu: Stack dump where RCU GP kthread last ran: Task dump for CPU 0: task:kworker/u8:10 state:R running task stack:0 pid:89 ppid:2 flags:0x0000000a Workqueue: events_unbound io_ring_exit_work Call trace: __switch_to+0xb0/0xc8 0xffff0000c8fefd28 CPU: 2 PID: 95 Comm: kworker/u8:13 Not tainted 6.2.0-rc5-00042-g40316e337c80-dirty #2759 Hardware name: linux,dummy-virt (DT) Workqueue: events_unbound io_ring_exit_work pstate: 61400005 (nZCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--) pc : io_do_iopoll+0x344/0x360 lr : io_do_iopoll+0xb8/0x360 sp : ffff800009bebc60 x29: ffff800009bebc60 x28: 0000000000000000 x27: 0000000000000000 x26: ffff0000c0f67d48 x25: ffff0000c0f67840 x24: ffff800008950024 x23: 0000000000000001 x22: 0000000000000000 x21: ffff0000c27d3200 x20: ffff0000c0f67840 x19: ffff0000c0f67800 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: 0000000000000001 x13: 0000000000000001 x12: 0000000000000000 x11: 0000000000000179 x10: 0000000000000870 x9 : ffff800009bebd60 x8 : ffff0000c27d3ad0 x7 : fefefefefefefeff x6 : 0000646e756f626e x5 : ffff0000c0f67840 x4 : 0000000000000000 x3 : ffff0000c2398000 x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000000 Call trace: io_do_iopoll+0x344/0x360 io_uring_try_cancel_requests+0x21c/0x334 io_ring_exit_work+0x90/0x40c process_one_work+0x1a4/0x254 worker_thread+0x1ec/0x258 kthread+0xb8/0xc8 ret_from_fork+0x10/0x20 Add a cond_resched() in the cancelation IOPOLL loop to fix this. Cc: stable@vger.kernel.org # 5.10+ Signed-off-by: Jens Axboe commit 50470fc5723ae0adb2f429a8b27ff6bf1a41913e Author: Pavel Begunkov Date: Mon Jan 23 14:37:19 2023 +0000 io_uring: return normal tw run linking optimisation io_submit_flush_completions() may produce new task_work items, so it's a good idea to recheck the task_work list after flushing completions. The optimisation is not new and was accidentially removed by f88262e60bb9 ("io_uring: lockless task list") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/a7ed5ede84de190832cc33ebbcdd6e91cd90f5b6.1674484266.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit cb6bf7f285c270d7808807128b5bce414e3f254a Author: Pavel Begunkov Date: Mon Jan 23 14:37:18 2023 +0000 io_uring: refactor tctx_task_work Merge almost identical sections of tctx_task_work(), this will make code modifications later easier and also inlines handle_tw_list(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d06592d91e3e7559e7a4dbb8907d110863008dc7.1674484266.git.asml.silence@gmail.com [axboe: fold in setting count to zero patch from Tom Rix] Signed-off-by: Jens Axboe commit 5afa4650713918e60865ed42d9439e82f6d24773 Author: Pavel Begunkov Date: Mon Jan 23 14:37:17 2023 +0000 io_uring: refactor io_put_task helpers Add a helper for putting refs from the target task context, rename __io_put_task() and add a couple of comments around. Use the remote version for __io_req_complete_post(), the local is only needed for __io_submit_flush_completions(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/3bf92ebd594769d8a5d648472a8e335f2031d542.1674484266.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit c8576f3e612d3c5b01d434ae296b9b76d7907708 Author: Pavel Begunkov Date: Mon Jan 23 14:37:16 2023 +0000 io_uring: refactor req allocation Follow the io_get_sqe pattern returning the result via a pointer and hide request cache refill inside io_alloc_req(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/8c37c2e8a3cb5e4cd6a8ae3b91371227a92708a6.1674484266.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit b5083dfa36676e7b5d72bf3d70f429a0d08c5075 Author: Pavel Begunkov Date: Mon Jan 23 14:37:15 2023 +0000 io_uring: improve io_get_sqe Return an SQE from io_get_sqe() as a parameter and use the return value to determine if it failed or not. This enables the compiler to compile out the sqe NULL check when we know that the return SQE is valid. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/9cceb11329240ea097dffef6bf0a675bca14cf42.1674484266.git.asml.silence@gmail.com [axboe: remove bogus const modifier on return value] Signed-off-by: Jens Axboe commit b2aa66aff60c841b2c93242752c25abf4c82a28c Author: Pavel Begunkov Date: Mon Jan 23 14:37:14 2023 +0000 io_uring: kill outdated comment about overflow flush __io_cqring_overflow_flush() doesn't return anything anymore, remove outdate comment. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/4ce2bcbb17eac80cdf883fd1459d5ee6586e238c.1674484266.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit c10bb64684813a326174c3eebcafb3ee5af52ca3 Author: Pavel Begunkov Date: Mon Jan 23 14:37:13 2023 +0000 io_uring: use user visible tail in io_uring_poll() We return POLLIN from io_uring_poll() depending on whether there are CQEs for the userspace, and so we should use the user visible tail pointer instead of a transient cached value. Cc: stable@vger.kernel.org Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/228ffcbf30ba98856f66ffdb9a6a60ead1dd96c0.1674484266.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit f499254474a83bf60191c86de82c1fec1d8eb9f9 Author: Jens Axboe Date: Fri Jan 20 09:10:30 2023 -0700 io_uring: pass in io_issue_def to io_assign_file() This generates better code for me, avoiding an extra load on arm64, and both call sites already have this variable available for easy passing. Signed-off-by: Jens Axboe commit c1755c25a7190494b45861284b4a30bd9cd813ff Author: Breno Leitao Date: Wed Jan 18 07:56:30 2023 -0800 io_uring: Enable KASAN for request cache Every io_uring request is represented by struct io_kiocb, which is cached locally by io_uring (not SLAB/SLUB) in the list called submit_state.freelist. This patch simply enabled KASAN for this free list. This list is initially created by KMEM_CACHE, but later, managed by io_uring. This patch basically poisons the objects that are not used (i.e., they are the free list), and unpoisons it when the object is allocated/removed from the list. Touching these poisoned objects while in the freelist will cause a KASAN warning. Suggested-by: Jens Axboe Signed-off-by: Breno Leitao Reviewed-by: Pavel Begunkov Signed-off-by: Jens Axboe commit b5d3ae202fbfe055aa2a8ae8524531ee1dcab717 Author: Jens Axboe Date: Tue Jan 24 08:24:25 2023 -0700 io_uring: handle TIF_NOTIFY_RESUME when checking for task_work If TIF_NOTIFY_RESUME is set, then we need to call resume_user_mode_work() for PF_IO_WORKER threads. They never return to usermode, hence never get a chance to process any items that are marked by this flag. Most notably this includes the final put of files, but also any throttling markers set by block cgroups. Cc: stable@vger.kernel.org # 5.10+ Signed-off-by: Jens Axboe commit 8572df941cbef2b295282535b013828e7df39471 Author: Jens Axboe Date: Sat Jan 21 19:53:41 2023 -0700 io_uring/msg-ring: ensure flags passing works for task_work completions If the target ring is using IORING_SETUP_SINGLE_ISSUER and we're posting a message from a different thread, then we need to ensure that the fallback task_work that posts the CQE knwos about the flags passing as well. If not we'll always be posting 0 as the flags. Fixes: 3563d7ed58a5 ("io_uring/msg_ring: Pass custom flags to the cqe") Signed-off-by: Jens Axboe commit f30bd4d03824fb437bf080c2b2f926cfee3f09d0 Author: Breno Leitao Date: Thu Jan 12 06:44:11 2023 -0800 io_uring: Split io_issue_def struct This patch removes some "cold" fields from `struct io_issue_def`. The plan is to keep only highly used fields into `struct io_issue_def`, so, it may be hot in the cache. The hot fields are basically all the bitfields and the callback functions for .issue and .prep. The other less frequently used fields are now located in a secondary and cold struct, called `io_cold_def`. This is the size for the structs: Before: io_issue_def = 56 bytes After: io_issue_def = 24 bytes; io_cold_def = 40 bytes Signed-off-by: Breno Leitao Reviewed-by: Pavel Begunkov Link: https://lore.kernel.org/r/20230112144411.2624698-2-leitao@debian.org Signed-off-by: Jens Axboe commit a7dd27828b00be8c0c7520c53baf0b360f4d8bea Author: Breno Leitao Date: Thu Jan 12 06:44:10 2023 -0800 io_uring: Rename struct io_op_def The current io_op_def struct is becoming huge and the name is a bit generic. The goal of this patch is to rename this struct to `io_issue_def`. This struct will contain the hot functions associated with the issue code path. For now, this patch only renames the structure, and an upcoming patch will break up the structure in two, moving the non-issue fields to a secondary struct. Signed-off-by: Breno Leitao Reviewed-by: Pavel Begunkov Link: https://lore.kernel.org/r/20230112144411.2624698-1-leitao@debian.org Signed-off-by: Jens Axboe commit 68a2cc1bba98144340f6ed66f3aed57e914766d0 Author: Pavel Begunkov Date: Mon Jan 16 16:49:01 2023 +0000 io_uring: refactor __io_req_complete_post Keep parts of __io_req_complete_post() relying on req->flags together so the value can be cached. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/2b4fbb42f404a0e75c4d9f0a5b16f314a839d0a9.1673887636.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 632ffe0956740ba56ae3f83778f3bf97edd57c69 Author: Pavel Begunkov Date: Mon Jan 16 16:49:00 2023 +0000 io_uring: optimise ctx flags layout There may be different cost for reeading just one byte or more, so it's benificial to keep ctx flag bits that we access together in a single byte. That affected code generation of __io_cq_unlock_post_flush() and removed one memory load. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/bbe8ca4705704690319d65e45845f9fc9d35f420.1673887636.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 31f084b7b0288fd51740b1e1efdb0ff61fb81e48 Author: Pavel Begunkov Date: Mon Jan 16 16:48:59 2023 +0000 io_uring: simplify fallback execution Lock the ring with uring_lock in io_fallback_req_func(), which should make it a bit safer and easier. With that we also don't need refs pinning as io_ring_exit_work() will wait until uring_lock is freed. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/56170e6a0cbfc8edee2794c6613e8f6f1d76d276.1673887636.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 89800a2dd570919bfe01ced90c80e3b472d1c723 Author: Pavel Begunkov Date: Mon Jan 16 16:48:58 2023 +0000 io_uring: don't export io_put_task() io_put_task() is only used in uring.c so enclose it there together with __io_put_task(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/43c7f9227e2ab215f1a6069dadbc5382bed346fe.1673887636.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit b0b7a7d24b66109a940d09d8d2dcf513e4eaf3a1 Author: Pavel Begunkov Date: Mon Jan 16 16:48:57 2023 +0000 io_uring: return back links tw run optimisation io_submit_flush_completions() may queue new requests for tw execution, especially true for linked requests. Recheck the tw list for emptiness after flushing completions. Note that this doesn't really fix the commit referenced below, but it does reinstate an optimization that existed before that got merged. Fixes: f88262e60bb9 ("io_uring: lockless task list") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/6328acdbb5e60efc762b18003382de077e6e1367.1673887636.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 88b80534f60f5ddf5f42218b280e0370f95eae78 Author: Quanfa Fu Date: Sun Jan 15 15:15:19 2023 +0800 io_uring: make io_sqpoll_wait_sq return void Change the return type to void since it always return 0, and no need to do the checking in syscall io_uring_enter. Signed-off-by: Quanfa Fu Link: https://lore.kernel.org/r/20230115071519.554282-1-quanfafu@gmail.com Signed-off-by: Jens Axboe commit c3f4d39ee4bc06f975ff45012398342ff276eb69 Author: Pavel Begunkov Date: Mon Jan 9 14:46:13 2023 +0000 io_uring: optimise deferred tw execution We needed fake nodes in __io_run_local_work() and to avoid unecessary wake ups while the task already running task_works, but we don't need them anymore since wake ups are protected by cq_waiting, which is always cleared by the time we're executing deferred task_work items. Note that because of loose sync around cq_waiting clearing io_req_local_work_add() may wake the task more than once, but that's fine and should be rare to not hurt perf. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/8839534891f0a2f1076e78554a31ea7e099f7de5.1673274244.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit d80c0f00d04766972c95e72b7535a842d6f4680d Author: Pavel Begunkov Date: Mon Jan 9 14:46:12 2023 +0000 io_uring: add io_req_local_work_add wake fast path Don't wake the master task after queueing a deferred tw unless it's currently waiting in io_cqring_wait. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/717702d772825a6647e6c315b4690277ba84c3fc.1673274244.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 130bd686d9be918e4cc8c03abf5794ba2d860502 Author: Pavel Begunkov Date: Mon Jan 9 14:46:11 2023 +0000 io_uring: waitqueue-less cq waiting With DEFER_TASKRUN only ctx->submitter_task might be waiting for CQEs, we can use this to optimise io_cqring_wait(). Replace ->cq_wait waitqueue with waking the task directly. It works but misses an important optimisation covered by the following patch, so this patch without follow ups might hurt performance. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/103d174d35d919d4cb0922d8a9c93a8f0c35f74a.1673274244.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 3181e22fb79910c7071e84a43af93ac89e8a7106 Author: Pavel Begunkov Date: Mon Jan 9 14:46:10 2023 +0000 io_uring: wake up optimisations Flush completions is done either from the submit syscall or by the task_work, both are in the context of the submitter task, and when it goes for a single threaded rings like implied by ->task_complete, there won't be any waiters on ->cq_wait but the master task. That means that there can be no tasks sleeping on cq_wait while we run __io_submit_flush_completions() and so waking up can be skipped. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/60ad9768ec74435a0ddaa6eec0ffa7729474f69f.1673274244.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit bca39f39058567643487cd654970717705784ba3 Author: Pavel Begunkov Date: Mon Jan 9 14:46:09 2023 +0000 io_uring: add lazy poll_wq activation Even though io_poll_wq_wake()'s waitqueue_active reuses a barrier we do for another waitqueue, it's not going to be the case in the future and so we want to have a fast path for it when the ring has never been polled. Move poll_wq wake ups into __io_commit_cqring_flush() using a new flag called ->poll_activated. The idea behind the flag is to set it when the ring was polled for the first time. This requires additional sync to not miss events, which is done here by using task_work for ->task_complete rings, and by default enabling the flag for all other types of rings. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/060785e8e9137a920b232c0c7f575b131af19cac.1673274244.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 7b235dd82ad32c1626e51303d94ec5ef4d7bc994 Author: Pavel Begunkov Date: Mon Jan 9 14:46:08 2023 +0000 io_uring: separate wq for ring polling Don't use ->cq_wait for ring polling but add a separate wait queue for it. We need it for following patches. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/dea0be0bf990503443c5c6c337fc66824af7d590.1673274244.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 360173ab9e1a8a50bc9092ae8c741f0a05d499b7 Author: Pavel Begunkov Date: Mon Jan 9 14:46:07 2023 +0000 io_uring: move io_run_local_work_locked io_run_local_work_locked() is only used in io_uring.c, move it there. With that we can also make __io_run_local_work() static. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/91757bcb33e5774e49fed6f2b6e058630608119b.1673274244.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 3e5655552a8299492d54117a15b6ddf5a2e7512c Author: Pavel Begunkov Date: Mon Jan 9 14:46:06 2023 +0000 io_uring: mark io_run_local_work static io_run_local_work is enclosed in io_uring.c, we don't need to export it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/b477fb81f5e77044f724a06fe245d5c078659364.1673274244.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 2f413956cc8a72fc11c2779228112559bbca8279 Author: Pavel Begunkov Date: Mon Jan 9 14:46:05 2023 +0000 io_uring: don't set TASK_RUNNING in local tw runner The CQ waiting loop sets TASK_RUNNING before trying to execute task_work, no need to repeat it in io_run_local_work(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/9d9422c429ef3f9457b4f4b8288bf4789564f33b.1673274244.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit bd550173acc2dc782d9c57852f6b6e71f5d9a159 Author: Pavel Begunkov Date: Mon Jan 9 14:46:04 2023 +0000 io_uring: refactor io_wake_function Remove a local variable ctx in io_wake_function(), we don't need it if io_should_wake() triggers it to wake up. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/e60eb1008aebe286aab7d34c772ed01c447bddb1.1673274244.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit dde40322ae20f2d6b0bcb781a9eedcfc7ca3aa73 Author: Pavel Begunkov Date: Mon Jan 9 14:46:03 2023 +0000 io_uring: move submitter_task out of cold cacheline ->submitter_task is used somewhat more frequent now than before, i.e. for local tw enqueue and run, let's move it from the end of ctx, which is full of cold data, to the first cacheline with mostly constants. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/415ca91dc5ad1dec612b892e489cda98e1069542.1673274244.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 81594e7e7a146888f0bac4fa782b0b5d3c37fdff Author: Dmitrii Bundin Date: Mon Jan 9 21:58:54 2023 +0300 io_uring: remove excessive unlikely on IS_ERR The IS_ERR function uses the IS_ERR_VALUE macro under the hood which already wraps the condition into unlikely. Signed-off-by: Dmitrii Bundin Link: https://lore.kernel.org/r/20230109185854.25698-1-dmitrii.bundin.a@gmail.com Signed-off-by: Jens Axboe commit cbeb47a7b5f003429ded32b1fb3a7108ce5c1b54 Author: Breno Leitao Date: Tue Jan 3 08:05:07 2023 -0800 io_uring/msg_ring: Pass custom flags to the cqe This patch adds a new flag (IORING_MSG_RING_FLAGS_PASS) in the message ring operations (IORING_OP_MSG_RING). This new flag enables the sender to specify custom flags, which will be copied over to cqe->flags in the receiving ring. These custom flags should be specified using the sqe->file_index field. This mechanism provides additional flexibility when sending messages between rings. Signed-off-by: Breno Leitao Link: https://lore.kernel.org/r/20230103160507.617416-1-leitao@debian.org Signed-off-by: Jens Axboe commit d33a39e577687e12d4468e9dd999375b9973d700 Author: Pavel Begunkov Date: Thu Jan 5 11:22:29 2023 +0000 io_uring: keep timeout in io_wait_queue Move waiting timeout into io_wait_queue Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/e4b48a9e26a3b1cf97c80121e62d4b5ab873d28d.1672916894.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 46ae7eef44f6dfd825a3bcfa43392d3ad9836ada Author: Pavel Begunkov Date: Thu Jan 5 11:22:28 2023 +0000 io_uring: optimise non-timeout waiting Unlike the jiffy scheduling version, schedule_hrtimeout() jumps a few functions before getting into schedule() even if there is no actual timeout needed. Some tests showed that it takes up to 1% of CPU cycles. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/89f880574eceee6f4899783377ead234df7b3d04.1672916894.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 326a9e482e2134d7a44b7f8f9a721b38c6bbb146 Author: Pavel Begunkov Date: Thu Jan 5 11:22:27 2023 +0000 io_uring: set TASK_RUNNING right after schedule Instead of constantly watching that the state of the task is running before executing tw or taking locks in io_cqring_wait(), switch it back to TASK_RUNNING immediately. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/246dddee247d89fd52023f785ed17cc34962a008.1672916894.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 490c00eb4fa5e5e25e0127240f6d6c1b499da95b Author: Pavel Begunkov Date: Thu Jan 5 11:22:26 2023 +0000 io_uring: simplify io_has_work ->work_llist should never be non-empty for a non DEFER_TASKRUN ring, so we can safely skip checking the flag. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/26af9f73c09a56c9a035f94db56127358688f3aa.1672916894.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 846072f16eed3b3fb4e59b677f3ed8afb8509b89 Author: Pavel Begunkov Date: Thu Jan 5 11:22:25 2023 +0000 io_uring: mimimise io_cqring_wait_schedule io_cqring_wait_schedule() is called after we started waiting on the cq wq and set the state to TASK_INTERRUPTIBLE, for that reason we have to constantly worry whether we has returned the state back to running or not. Leave only quick checks in io_cqring_wait_schedule() and move the rest including running task work to the callers. Note, we run tw in the loop after the sched checks because of the fast path in the beginning of the function. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/2814fabe75e2e019e7ca43ea07daa94564349805.1672916894.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 3fcf19d592d5cb63eb209400b22055651e3c27d0 Author: Pavel Begunkov Date: Thu Jan 5 11:22:24 2023 +0000 io_uring: parse check_cq out of wq waiting We already avoid flushing overflows in io_cqring_wait_schedule() but only return an error for the outer loop to handle it. Minimise it even further by moving all ->check_cq parsing there. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/9dfcec3121013f98208dbf79368d636d74e1231a.1672916894.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 140102ae9a9f2f83f0592b98b3c5c6119d9a9b32 Author: Pavel Begunkov Date: Thu Jan 5 11:22:23 2023 +0000 io_uring: move defer tw task checks Most places that want to run local tw explicitly and in advance check if they are allowed to do so. Don't rely on a similar check in __io_run_local_work(), leave it as a just-in-case warning and make sure callers checks capabilities themselves. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/990fe0e8e70fd4d57e43625e5ce8fba584821d1a.1672916894.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 1414d62985848d095af5a400a4ca074a4888b77f Author: Pavel Begunkov Date: Thu Jan 5 11:22:22 2023 +0000 io_uring: kill io_run_task_work_ctx There is only one user of io_run_task_work_ctx(), inline it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/40953c65f7c88fb00cdc4d870ca5d5319fb3d7ea.1672916894.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit f36ba6cf1ab6b05a538aae9cca896917db14ba27 Author: Pavel Begunkov Date: Thu Jan 5 11:22:21 2023 +0000 io_uring: don't iterate cq wait fast path Task work runners keep running until all queues tw items are exhausted. It's also rare for defer tw to queue normal tw and vise versa. Taking it into account, there is only a dim chance that further iterating the io_cqring_wait() fast path will get us anything and so we can remove the loop there. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1f9565726661266abaa5d921e97433c831759ecf.1672916894.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 0c4fe008c9cb2215b3f838769886857ae986014b Author: Pavel Begunkov Date: Thu Jan 5 11:22:20 2023 +0000 io_uring: rearrange defer list checks There should be nothing in the ->work_llist for non DEFER_TASKRUN rings, so we can skip flag checks and test the list emptiness directly. Also move it out of io_run_local_work() for inlining. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/331d63fd15ca79b35b95c82a82d9246110686392.1672916894.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 8864eac5511b061753133213c8e4dcbb85933892 Author: Marcel Ziswiler Date: Thu Jan 19 09:54:21 2023 +0100 dt-bindings: imx8ulp: clock: no spaces before tabs This fixes the following warnings: include/dt-bindings/clock/imx8ulp-clock.h:204: warning: please, no space before tabs include/dt-bindings/clock/imx8ulp-clock.h:215: warning: please, no space before tabs Signed-off-by: Marcel Ziswiler Acked-by: Krzysztof Kozlowski Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230119085421.102804-3-marcel@ziswiler.com commit 899788efa45bb619787ee692048ae3f1e8c64754 Author: Marcel Ziswiler Date: Thu Jan 19 09:54:20 2023 +0100 clk: imx6sll: add proper spdx license identifier This fixes the following error: include/dt-bindings/clock/imx6sll-clock.h:1: warning: Improper SPDX comment style for 'include/dt-bindings/clock/imx6sll-clock.h', please use '/*' instead include/dt-bindings/clock/imx6sll-clock.h:1: warning: Missing or malformed SPDX-License-Identifier tag in line 1 Signed-off-by: Marcel Ziswiler Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230119085421.102804-2-marcel@ziswiler.com commit 8cdaad718f1af2bf397d140329bdbdcb6110b74f Author: Peng Fan Date: Wed Jan 4 19:00:32 2023 +0800 clk: imx: imx93: invoke imx_register_uart_clocks Invoke imx_register_uart_clocks to keep uart clk on when earlycon specified. Signed-off-by: Peng Fan Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230104110032.1220721-5-peng.fan@oss.nxp.com commit 2d5513bf7563b425b74867c254a7352373613b74 Author: Peng Fan Date: Wed Jan 4 19:00:31 2023 +0800 clk: imx: remove clk_count of imx_register_uart_clocks The clk count has been get with of_clk_get_parent_count, there is no need to pass clk_count from users. Signed-off-by: Peng Fan Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230104110032.1220721-4-peng.fan@oss.nxp.com commit 8658f0acc8b0ab67f66b028e8f6136038b7b7379 Author: Peng Fan Date: Wed Jan 4 19:00:30 2023 +0800 clk: imx: get stdout clk count from device tree Currently the clk_count is specified by API users, but this parameter is wrongly used, for example, i.MX8M clk driver use 4, however the uart device tree node only use 2 clock entries. So let using of_clk_get_parent_count to get the exact clock count. Signed-off-by: Peng Fan Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230104110032.1220721-3-peng.fan@oss.nxp.com commit f4419db4086e8c31821da14140e81498516a3c75 Author: Peng Fan Date: Wed Jan 4 19:00:29 2023 +0800 clk: imx: avoid memory leak In case imx_register_uart_clocks return early, the imx_uart_clocks memory will be no freed. So execute kfree always to avoid memory leak. Fixes: 379c9a24cc23 ("clk: imx: Fix reparenting of UARTs not associated with stdout") Signed-off-by: Peng Fan Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230104110032.1220721-2-peng.fan@oss.nxp.com commit 51b2089284f3f08ca8971b65d5b2f66f926f7d14 Author: Johan Jonker Date: Thu Dec 29 10:45:16 2022 +0100 dt-bindings: soc: rockchip: grf: add rockchip,rk3288-dp-phy.yaml Add new converted rockchip,rk3288-dp-phy.yaml to grf.yaml file. Signed-off-by: Johan Jonker Acked-by: Krzysztof Kozlowski [dropped the unrelated blank line removals that didn't apply] Link: https://lore.kernel.org/r/5759c6e1-9c89-4cb2-dd57-83a8db09f547@gmail.com Signed-off-by: Heiko Stuebner commit fc7b83bcaf0334a80d175ab6b280fd838e8a5596 Author: Johan Jonker Date: Thu Dec 29 10:44:28 2022 +0100 dt-bindings: phy: rockchip: convert rockchip-dp-phy.txt to yaml Convert rockchip-dp-phy.txt to yaml. Signed-off-by: Johan Jonker Acked-By: Vinod Koul Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/aa6fe473-71f2-edba-f009-994a3dbc9802@gmail.com Signed-off-by: Heiko Stuebner commit ef9134d9bbce071c9e4ebdcbb6f8fb1a5dd0a67e Author: Jagan Teki Date: Mon Jan 23 12:46:53 2023 +0530 arm64: dts: rockchip: Correct the model name for Radxa E25 Radxa E25 is a Carrier board, so update the model name for Radxa E25 as suggested by the Radxa website. Fixes: 2bf2f4d9f673 ("arm64: dts: rockchip: Add Radxa CM3I E25") Cc: Chukun Pan Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20230123071654.73139-4-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit 421c059d413812444318d27c1b4d6e71f1c1134c Author: Jagan Teki Date: Mon Jan 23 12:46:52 2023 +0530 arm64: dts: rockchip: Drop unneeded model for Radxa CM3i With module and carrier board topology, carrier board dts will include module dtsi files for creating complete platform. The carrier board dts will have final model name and compatible string so any model name added in module dtsi will eventually replaced. This happened for any devicetree property if the same property is updated or added twice. So, drop this unneeded model name from module dtsi. Cc: Chukun Pan Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20230123071654.73139-3-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit c4d2b02d63ee38b381fbc886c02eecfec4f981cc Author: Jagan Teki Date: Mon Jan 23 12:46:51 2023 +0530 arm64: dts: rockchip: Add missing CM3i fallback compatible for Radxa E25 In order to function the Radxa E25 Carrier board, it is mandatory to mount the Radxa CM3i module.  Add Radxa CM3i compatible as fallback compatible to string to satisfy the Module and Carrier board topology. Fixes: 2bf2f4d9f673 ("arm64: dts: rockchip: Add Radxa CM3I E25") Cc: Chukun Pan Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20230123071654.73139-2-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit 8f19828844f20b22182719cf53be64f8c955aee8 Author: Jagan Teki Date: Mon Jan 23 12:46:50 2023 +0530 arm64: dts: rockchip: Fix compatible for Radxa CM3 The compatible string "radxa,radxa-cm3" referring the product name as "Radxa Radxa CM3" but the actual product name is "Radxa CM3". Fix the compatible strings. Fixes: 24a28d3eb07d ("dt-bindings: arm: rockchip: Add Radxa Compute Module 3") Fixes: 7469ab529bca ("arm64: dts: rockchip: Add rk3566 based Radxa Compute Module 3") Fixes: 096ebfb74b19 ("arm64: dts: rockchip: Add Radxa Compute Module 3 IO board") Suggested-by: Krzysztof Kozlowski Signed-off-by: Jagan Teki Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230123071654.73139-1-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit af5a803bf212e077e5fb7a1d4cf6be02f74a74ca Author: Jagan Teki Date: Wed Jan 25 21:40:23 2023 +0530 arm64: dts: rockchip: rk3566: Enable WiFi, BT support for Radxa CM3 Radxa Compute Module 3 has an onboard AW_CM256SM WiFi/BT module. Add nodes for enabling it. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20230125161023.12115-2-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit cc52bfc04726a574fc4440bbbe0c710890e7040a Author: Manoj Sai Date: Wed Jan 25 21:40:22 2023 +0530 arm64: dts: rockchip: Enable Ethernet for Radxa CM3 IO Add ethernet nodes for enabling gmac1 on the Radxa CM3 IO board. Signed-off-by: Manoj Sai Link: https://lore.kernel.org/r/20230125161023.12115-1-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit 97ce9f36631dafd6daaab0c06a6a48b4301199b5 Author: Chris Morgan Date: Mon Jan 23 09:46:03 2023 -0600 arm64: dts: rockchip: add display to RG503 Add Samsung AMS495QA01 panel to RG503. Co-developed-by: Maya Matuszczyk Signed-off-by: Maya Matuszczyk Signed-off-by: Chris Morgan Link: https://lore.kernel.org/r/20230123154603.1315112-5-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner commit 381b6d432f6eb00e1faff763f55e67519af9fa23 Author: Michael Riesch Date: Tue Jan 24 06:47:06 2023 +0100 arm64: dts: rockchip: add pinctrls for 16-bit/18-bit rgb interface to rk356x The rk3568-pinctrl.dtsi only defines the 24-bit RGB interface. Add separate nodes for the 16-bit and 18-bit version, respectively. While at it, split off the clock/sync signals from the data signals. The exact mapping of the data pins was discussed here: https://lore.kernel.org/linux-rockchip/f33a0488-528c-99de-3279-3c0346a03fd6@wolfvision.net/T/ Signed-off-by: Michael Riesch Link: https://lore.kernel.org/r/20230124054706.3921383-7-michael.riesch@wolfvision.net Signed-off-by: Heiko Stuebner commit 7c306cb1941e05f513db1c0ee35a6edcb48ac678 Merge: 99ba2ad1db623 9d18515e4a2b9 Author: Greg Kroah-Hartman Date: Sun Jan 29 12:34:44 2023 +0100 Merge tag 'fpga-for-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga into char-misc-next Xu writes: FPGA Manager changes for 6.3-rc1 Microchip: - Ivan's reliability improvements for Microchip Polarfire FPGA FPGA DFL doc: - Randy and Yilun's kernel doc fixes. The 2 patches, "fpga: dfl: more kernel-doc corrections" & "fpga: dfl: kernel-doc corrections" conflicts with Matthew's FPGA patch "fpga: dfl: add basic support for DFHv1" on tty-next. Yilun resolved the conflicts on: --branch for-next https://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga.git/ On that branch, Matthew's patch is applied first then kernel doc fixes follow. Intel m10 bmc MFD & sub devices: - Lee's topic branch merged, to support new BMC board type with new PMCI interface to host, as well as its new sub devices. Signed-off-by: Xu Yilun * tag 'fpga-for-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga: fpga: bridge: return errors in the show() method of the "state" attribute fpga: dfl: more kernel-doc corrections fpga: dfl: kernel-doc corrections fpga: microchip-spi: separate data frame write routine fpga: microchip-spi: rewrite status polling in a time measurable way fpga: microchip-spi: move SPI I/O buffers out of stack mfd: intel-m10-bmc: Add PMCI driver fpga: m10bmc-sec: Make rsu status type specific fpga: m10bmc-sec: Create helpers for rsu status/progress checks mfd: intel-m10-bmc: Prefix register defines with M10BMC_N3000 fpga: intel-m10-bmc: Rework flash read/write mfd: intel-m10-bmc: Support multiple CSR register layouts mfd: intel-m10-bmc: Split into core and spi specific parts mfd: intel-m10-bmc: Rename the local variables mfd: intel-m10-bmc: Create m10bmc_platform_info for type specific info mfd: intel-m10-bmc: Add missing includes to header commit fe6a952b567f6a771d087d2e969914f31574d6ab Author: Krzysztof Kozlowski Date: Fri Jan 27 20:40:50 2023 +0100 dt-bindings: soc: samsung: exynos-pmu: allow phys as child The MIPI and DisplayPort phys are actually part of the Power Management Unit system controller, thus allow them as its children, instead of specifying as separate device nodes with syscon phandle. Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230127194057.186458-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 28dd277e54ebb499bc59c166078596767bbbbdd7 Author: Krzysztof Kozlowski Date: Fri Jan 27 22:27:13 2023 +0100 arm64: dts: exynos: add unit address to DWC3 node wrapper in Exynos7 Neither simple-bus bindings nor dtc W=1 accept device nodes in soc@ node which do not have unit address. Therefore usethe address space of child device (actual DWC3 Controller) as the wrapper's address to fix: exynos7-espresso.dtb: soc@0: usb: {'compatible': ['samsung,exynos7-dwusb3'], ... should not be valid under {'type': 'object'} Reviewed-by: Alim Akhtar Tested-by: Alim Akhtar Link: https://lore.kernel.org/r/20230127212713.267014-4-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit becad83e0f2a54c8a43ece3f0437b72842278a42 Author: Krzysztof Kozlowski Date: Fri Jan 27 22:27:12 2023 +0100 arm64: dts: exynos: add unit address to DWC3 node wrapper in Exynos5433 Neither simple-bus bindings nor dtc W=1 accept device nodes in soc@ node which do not have unit address. Therefore usethe address space of child device (actual DWC3 Controller) as the wrapper's address to fix: exynos5433-tm2e.dtb: soc@0: usbdrd: {'compatible': ['samsung,exynos5433-dwusb3'], ... should not be valid under {'type': 'object'} Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/20230127212713.267014-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 27be20e3b9d125f2c1b066d1d238c67bf5b89dc3 Author: Krzysztof Kozlowski Date: Fri Jan 27 22:27:11 2023 +0100 ARM: dts: exynos: add unit address to DWC3 node wrapper in Exynos54xx Neither simple-bus bindings nor dtc W=1 accept device nodes in soc@ node which do not have unit address. Therefore usethe address space of child device (actual DWC3 Controller) as the wrapper's address to fix: exynos5422-odroidhc1.dtb: soc: usb3-0: {'compatible': ['samsung,exynos5250-dwusb3'], ... } should not be valid under {'type': 'object'} exynos54xx.dtsi:145.21-159.5: Warning (simple_bus_reg): /soc/usb3-0: missing or empty reg/ranges property Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/20230127212713.267014-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 47fea512b4bd18b0a69142f85bf1863c221539ef Author: Krzysztof Kozlowski Date: Fri Jan 27 22:27:10 2023 +0100 ARM: dts: exynos: add unit address to DWC3 node wrapper in Exynos5250 Neither simple-bus bindings nor dtc W=1 accept device nodes in soc@ node which do not have unit address. Therefore usethe address space of child device (actual DWC3 Controller) as the wrapper's address to fix: exynos5250-smdk5250.dtb: soc: usb3: {'compatible': ['samsung,exynos5250-dwusb3'], ... } should not be valid under {'type': 'object'} exynos5250.dtsi:638.16-653.5: Warning (simple_bus_reg): /soc/usb3: missing or empty reg/ranges property Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/20230127212713.267014-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 9ee57955d106ebf4439db7b787497f3f375bc9d7 Author: Krzysztof Kozlowski Date: Wed Jan 25 10:45:12 2023 +0100 arm64: dts: exynos: move exynos-bus nodes out of soc in Exynos5433 The soc node is supposed to have only device nodes with MMIO addresses, as reported by dtc W=1: exynos5433-bus.dtsi:10.20-16.4: Warning (simple_bus_reg): /soc@0/bus0: missing or empty reg/ranges property and dtbs_check: exynos5433-tm2.dtb: soc@0: bus1: {'compatible': ['samsung,exynos-bus'], 'clocks': [[21, 220]], 'clock-names': ['bus'], 'operating-points-v2': [[165]], 'status': ['okay'], 'devfreq': [[166]]} should not be valid under {'type': 'object'} Move the bus nodes and their OPP tables out of SoC to fix this. Link: https://lore.kernel.org/r/20230125094513.155063-8-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit adf8238ef403190ffc1e60c0cfe3ea284b401314 Author: Krzysztof Kozlowski Date: Wed Jan 25 10:45:09 2023 +0100 ARM: dts: exynos: move exynos-bus nodes out of soc in Exynos4412 The soc node is supposed to have only device nodes with MMIO addresses, as reported by dtc W=1: exynos4412.dtsi:407.20-413.5: Warning (simple_bus_reg): /soc/bus-acp: missing or empty reg/ranges property and dtbs_check: exynos4412-i9300.dtb: soc: bus-acp: {'compatible': ['samsung,exynos-bus'], 'clocks': [[7, 456]], 'clock-names': ['bus'], 'operating-points-v2': [[132]], 'status': ['okay'], 'devfreq': [[117]]} should not be valid under {'type': 'object'} Move the bus nodes and their OPP tables out of SoC to fix this. Re-order them alphabetically while moving and put some of the OPP tables in device nodes (if they are not shared). Link: https://lore.kernel.org/r/20230125094513.155063-5-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 09dd37396ab6e7d1ce66a7cb22019cea19c1d338 Author: Krzysztof Kozlowski Date: Wed Jan 25 10:45:08 2023 +0100 ARM: dts: exynos: move exynos-bus nodes out of soc in Exynos4210 The soc node is supposed to have only device nodes with MMIO addresses, as reported by dtc W=1: exynos4210.dtsi:218.20-224.5: Warning (simple_bus_reg): /soc/bus-dmc: missing or empty reg/ranges property and dtbs_check: exynos4210-i9100.dtb: soc: bus-dmc: {'compatible': ['samsung,exynos-bus'], 'clocks': [[5, 457]], 'clock-names': ['bus'], 'operating-points-v2': [[82]], 'status': ['disabled']} should not be valid under {'type': 'object'} Move the bus nodes and their OPP tables out of SoC to fix this. Re-order them alphabetically while moving and put some of the OPP tables in device nodes (if they are not shared). Link: https://lore.kernel.org/r/20230125094513.155063-4-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 37da6ed22b67ae0c15a55dd02d10596f120ca9c7 Author: Krzysztof Kozlowski Date: Wed Jan 25 10:45:07 2023 +0100 ARM: dts: exynos: move exynos-bus nodes out of soc in Exynos3250 The soc node is supposed to have only device nodes with MMIO addresses, as reported by dtc W=1: exynos3250.dtsi:775.20-781.5: Warning (simple_bus_reg): /soc/bus-dmc: missing or empty reg/ranges property and dtbs_check: exynos3250-artik5-eval.dtb: soc: bus-dmc: {'compatible': ['samsung,exynos-bus'], 'clocks': [[67, 16]], 'clock-names': ['bus'], 'operating-points-v2': [[68]], 'status': ['disabled']} should not be valid under {'type': 'object'} Move the bus nodes and their OPP tables out of SoC to fix this. Re-order them alphabetically while moving and put some of the OPP tables in device nodes (if they are not shared). Link: https://lore.kernel.org/r/20230125094513.155063-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit eb87086bfc967f92a4f9c8e4a51754db03a04537 Author: Krzysztof Kozlowski Date: Wed Jan 25 10:45:06 2023 +0100 ARM: dts: exynos: move exynos-bus nodes out of soc in Exynos5420 The soc node is supposed to have only device nodes with MMIO addresses, as reported by dtc W=1: arch/arm/boot/dts/exynos5420.dtsi:1070.24-1075.5: Warning (simple_bus_reg): /soc/bus-wcore: missing or empty reg/ranges property and dtbs_check: exynos5420-arndale-octa.dtb: soc: bus-wcore: {'compatible': ['samsung,exynos-bus'], 'clocks': [[2, 769]], 'clock-names': ['bus'], 'status': ['disabled']} should not be valid under {'type': 'object'} Move the bus nodes and their OPP tables out of SoC to fix this. Re-order them alphabetically while moving and put some of the OPP tables in device nodes (if they are not shared). Link: https://lore.kernel.org/r/20230125094513.155063-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit ba35c3a599ddd4848a6dc8511e9d16c2b9c55cf0 Author: Randy Dunlap Date: Thu Jan 26 22:39:56 2023 -0800 Documentation: sound: correct spelling Correct spelling problems for Documentation/sound/ as reported by codespell. Signed-off-by: Randy Dunlap Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-devel@alsa-project.org Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20230127064005.1558-27-rdunlap@infradead.org Signed-off-by: Takashi Iwai commit 137272ef1b0f17a1815fec00d583515a0163f85e Author: Allen-KH Cheng Date: Wed Jan 18 17:18:28 2023 +0800 dt-bindings: display: mediatek: Fix the fallback for mediatek,mt8186-disp-ccorr The mt8186-disp-ccorr is not fully compatible with the mt8183-disp-ccorr implementation. It causes a crash when system resumes if it binds to the device. We should use mt8192-disp-ccorr as fallback of mt8186-disp-ccorr. Fixes: 8a26ea19d4dc ("dt-bindings: display: mediatek: add MT8186 SoC binding") Signed-off-by: Allen-KH Cheng Reviewed-by: Rob Herring Reviewed-by: Matthias Brugger Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230118091829.755-10-allen-kh.cheng@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 02f6015127e00ab19ab84819ff159341fde866d0 Author: Rob Clark Date: Fri Jan 27 08:54:09 2023 -0800 drm/mediatek: Remove unused GEM DMA header include No longer needed since the removal of dependency on DMA helper. Signed-off-by: Rob Clark Reported-by: Douglas Anderson Reviewed-by: Douglas Anderson Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230127165409.3512501-1-robdclark@gmail.com/ Signed-off-by: Chun-Kuang Hu commit 51e4e3153ebc32d3280d5d17418ae6f1a44f1ec1 Author: Eric Biggers Date: Fri Jan 27 14:25:14 2023 -0800 fscrypt: support decrypting data from large folios Try to make the filesystem-level decryption functions in fs/crypto/ aware of large folios. This includes making fscrypt_decrypt_bio() support the case where the bio contains large folios, and making fscrypt_decrypt_pagecache_blocks() take a folio instead of a page. There's no way to actually test this with large folios yet, but I've tested that this doesn't cause any regressions. Note that this patch just handles *decryption*, not encryption which will be a little more difficult. Signed-off-by: Eric Biggers Reviewed-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20230127224202.355629-1-ebiggers@kernel.org commit 07dcbd7325cee92d5798536f417b9b1da497f9da Author: Ilya Leoshkevich Date: Sat Jan 28 01:06:45 2023 +0100 s390/bpf: Fix a typo in a comment "desription" should be "description". Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230128000650.1516334-27-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 49f67f393ff264e8d83f6fcec0728a6aa8eed102 Author: Ilya Leoshkevich Date: Sat Jan 28 01:06:44 2023 +0100 bpf: btf: Add BTF_FMODEL_SIGNED_ARG flag s390x eBPF JIT needs to know whether a function return value is signed and which function arguments are signed, in order to generate code compliant with the s390x ABI. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230128000650.1516334-26-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 0f0e5f5bd5066c9ffaa006e26fc7d092b04d4088 Author: Ilya Leoshkevich Date: Sat Jan 28 01:06:43 2023 +0100 bpf: iterators: Split iterators.lskel.h into little- and big- endian versions iterators.lskel.h is little-endian, therefore bpf iterator is currently broken on big-endian systems. Introduce a big-endian version and add instructions regarding its generation. Unfortunately bpftool's cross-endianness capabilities are limited to BTF right now, so the procedure requires access to a big-endian machine or a configured emulator. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230128000650.1516334-25-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 42fae973c2b168d527c8b4f6a02828ecd1e19626 Author: Ilya Leoshkevich Date: Sat Jan 28 01:06:42 2023 +0100 libbpf: Fix BPF_PROBE_READ{_STR}_INTO() on s390x BPF_PROBE_READ_INTO() and BPF_PROBE_READ_STR_INTO() should map to bpf_probe_read() and bpf_probe_read_str() respectively in order to work correctly on architectures with !ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230128000650.1516334-24-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 25c76ed428219127aba385d40756f6d5814e96e9 Author: Ilya Leoshkevich Date: Sat Jan 28 01:06:41 2023 +0100 libbpf: Fix unbounded memory access in bpf_usdt_arg() Loading programs that use bpf_usdt_arg() on s390x fails with: ; if (arg_num >= BPF_USDT_MAX_ARG_CNT || arg_num >= spec->arg_cnt) 128: (79) r1 = *(u64 *)(r10 -24) ; frame1: R1_w=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) R10=fp0 129: (25) if r1 > 0xb goto pc+83 ; frame1: R1_w=scalar(umax=11,var_off=(0x0; 0xf)) ... ; arg_spec = &spec->args[arg_num]; 135: (79) r1 = *(u64 *)(r10 -24) ; frame1: R1_w=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) R10=fp0 ... ; switch (arg_spec->arg_type) { 139: (61) r1 = *(u32 *)(r2 +8) R2 unbounded memory access, make sure to bounds check any such access The reason is that, even though the C code enforces that arg_num < BPF_USDT_MAX_ARG_CNT, the verifier cannot propagate this constraint to the arg_spec assignment yet. Help it by forcing r1 back to stack after comparison. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230128000650.1516334-23-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit e85465e420be1e408f9465f8b6fd9e2f7b17aea1 Author: Ilya Leoshkevich Date: Sat Jan 28 01:06:40 2023 +0100 libbpf: Simplify barrier_var() Use a single "+r" constraint instead of the separate "=r" and "0". Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230128000650.1516334-22-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 1b5e385325810b23e4e8d46f97d0e2e838e26802 Author: Ilya Leoshkevich Date: Sat Jan 28 01:06:39 2023 +0100 selftests/bpf: Fix profiler on s390x Use bpf_probe_read_kernel() and bpf_probe_read_kernel_str() instead of bpf_probe_read() and bpf_probe_read_kernel(). Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230128000650.1516334-21-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 438a2edf26b7384d3c781ff98015d58135b848d5 Author: Ilya Leoshkevich Date: Sat Jan 28 01:06:38 2023 +0100 selftests/bpf: Fix xdp_synproxy/tc on s390x Use the correct datatype for the values map values; currently the test works by accident, since on little-endian machines it is sometimes acceptable to access u64 as u32. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230128000650.1516334-20-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit d504270a233d2710cf9203b9ecec820736d0e042 Author: Ilya Leoshkevich Date: Sat Jan 28 01:06:36 2023 +0100 selftests/bpf: Fix vmlinux test on s390x Use a syscall macro to access the nanosleep()'s first argument; currently the code uses gprs[2] instead of orig_gpr2. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230128000650.1516334-18-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 26e8a014947948387790a029b310276ac083971b Author: Ilya Leoshkevich Date: Sat Jan 28 01:06:35 2023 +0100 selftests/bpf: Fix test_xdp_adjust_tail_grow2 on s390x s390x cache line size is 256 bytes, so skb_shared_info must be aligned on a much larger boundary than for x86. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230128000650.1516334-17-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 207612eb12b912cad40c0299fefcabf3d6cc1f3f Author: Ilya Leoshkevich Date: Sat Jan 28 01:06:34 2023 +0100 selftests/bpf: Fix test_lsm on s390x Use syscall macros to access the setdomainname() arguments; currently the code uses gprs[2] instead of orig_gpr2 for the first argument. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230128000650.1516334-16-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit be6b5c10ecc4014446e5c807d6a69c5a7cc1c497 Author: Ilya Leoshkevich Date: Sat Jan 28 01:06:33 2023 +0100 selftests/bpf: Add a sign-extension test for kfuncs s390x ABI requires the caller to zero- or sign-extend the arguments. eBPF already deals with zero-extension (by definition of its ABI), but not with sign-extension. Add a test to cover that potentially problematic area. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230128000650.1516334-15-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 80a611904eef65e8c60e0c8c8f50fa98a0bd0c69 Author: Ilya Leoshkevich Date: Sat Jan 28 01:06:32 2023 +0100 selftests/bpf: Increase SIZEOF_BPF_LOCAL_STORAGE_ELEM on s390x sizeof(struct bpf_local_storage_elem) is 512 on s390x: struct bpf_local_storage_elem { struct hlist_node map_node; /* 0 16 */ struct hlist_node snode; /* 16 16 */ struct bpf_local_storage * local_storage; /* 32 8 */ struct callback_head rcu __attribute__((__aligned__(8))); /* 40 16 */ /* XXX 200 bytes hole, try to pack */ /* --- cacheline 1 boundary (256 bytes) --- */ struct bpf_local_storage_data sdata __attribute__((__aligned__(256))); /* 256 8 */ /* size: 512, cachelines: 2, members: 5 */ /* sum members: 64, holes: 1, sum holes: 200 */ /* padding: 248 */ /* forced alignments: 2, forced holes: 1, sum forced holes: 200 */ } __attribute__((__aligned__(256))); As the existing comment suggests, use a larger number in order to be future-proof. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230128000650.1516334-14-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 2934565f04fd21319fd2dfcc68bebebff503ceb2 Author: Ilya Leoshkevich Date: Sat Jan 28 01:06:31 2023 +0100 selftests/bpf: Check stack_mprotect() return value If stack_mprotect() succeeds, errno is not changed. This can produce misleading error messages, that show stale errno. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230128000650.1516334-13-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 06cea99e683c66e16cdf04ef91d2a008b34d7d3d Author: Ilya Leoshkevich Date: Sat Jan 28 01:06:30 2023 +0100 selftests/bpf: Fix cgrp_local_storage on s390x Sync the definition of socket_cookie between the eBPF program and the test. Currently the test works by accident, since on little-endian it is sometimes acceptable to access u64 as u32. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230128000650.1516334-12-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 06c1865b0b0c7820ea53af2394dd7aff31100295 Author: Ilya Leoshkevich Date: Sat Jan 28 01:06:29 2023 +0100 selftests/bpf: Fix xdp_do_redirect on s390x s390x cache line size is 256 bytes, so skb_shared_info must be aligned on a much larger boundary than for x86. This makes the maximum packet size smaller. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230128000650.1516334-11-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 56e1a50483194b2e0ac54849e94cc2b80480895e Author: Ilya Leoshkevich Date: Sat Jan 28 01:06:28 2023 +0100 selftests/bpf: Fix verify_pkcs7_sig on s390x Use bpf_probe_read_kernel() instead of bpf_probe_read(), which is not defined on all architectures. While at it, improve the error handling: do not hide the verifier log, and check the return values of bpf_probe_read_kernel() and bpf_copy_from_user(). Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230128000650.1516334-10-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 98e13848cf43b66b0f32f10011aa398c2bff5ae6 Author: Ilya Leoshkevich Date: Sat Jan 28 01:06:27 2023 +0100 selftests/bpf: Fix decap_sanity_ns cleanup decap_sanity prints the following on the 1st run: decap_sanity: sh: 1: Syntax error: Bad fd number and the following on the 2nd run: Cannot create namespace file "/run/netns/decap_sanity_ns": File exists The problem is that the cleanup command has a typo and does nothing. Fix the typo. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230128000650.1516334-9-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 804acdd251e837bb1a588074752d69698ac36b5f Author: Ilya Leoshkevich Date: Sat Jan 28 01:06:26 2023 +0100 selftests/bpf: Set errno when urand_spawn() fails The result of urand_spawn() is checked with ASSERT_OK_PTR, which treats NULL as success if errno == 0. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230128000650.1516334-8-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 31da9be64a1136e5699a1fc59a45001d6b98acdc Author: Ilya Leoshkevich Date: Sat Jan 28 01:06:25 2023 +0100 selftests/bpf: Fix kfree_skb on s390x h_proto is big-endian; use htons() in order to make comparison work on both little- and big-endian machines. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230128000650.1516334-7-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 6eab2370d142cdfe853d168881b0d4abd3c6f7a6 Author: Ilya Leoshkevich Date: Sat Jan 28 01:06:24 2023 +0100 selftests/bpf: Fix symlink creation error When building with O=, the following error occurs: ln: failed to create symbolic link 'no_alu32/bpftool': No such file or directory Adjust the code to account for $(OUTPUT). Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230128000650.1516334-6-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit b14b01f281f728f465d2440ce6ed0491df735169 Author: Ilya Leoshkevich Date: Sat Jan 28 01:06:23 2023 +0100 selftests/bpf: Fix liburandom_read.so linker error When building with O=, the following linker error occurs: clang: error: no such file or directory: 'liburandom_read.so' Fix by adding $(OUTPUT) to the linker search path. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230128000650.1516334-5-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 8fb9fb2f1728a56a2a6dba79de6f17975def658d Author: Ilya Leoshkevich Date: Sat Jan 28 01:06:22 2023 +0100 selftests/bpf: Query BPF_MAX_TRAMP_LINKS using BTF Do not hard-code the value, since for s390x it will be smaller than for x86. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230128000650.1516334-4-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 390a07a921b3b1fe544cb2921de7abb94ebb7f26 Author: Ilya Leoshkevich Date: Sat Jan 28 01:06:21 2023 +0100 bpf: Change BPF_MAX_TRAMP_LINKS to enum This way it's possible to query its value from testcases using BTF. Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230128000650.1516334-3-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit bf3849755ac606f2a04808b6b706a16867d1e1b8 Author: Ilya Leoshkevich Date: Sat Jan 28 01:06:20 2023 +0100 bpf: Use ARG_CONST_SIZE_OR_ZERO for 3rd argument of bpf_tcp_raw_gen_syncookie_ipv{4,6}() These functions already check that th_len < sizeof(*th), and propagating the lower bound (th_len > 0) may be challenging in complex code, e.g. as is the case with xdp_synproxy test on s390x [1]. Switch to ARG_CONST_SIZE_OR_ZERO in order to make the verifier accept code where it cannot prove that th_len > 0. [1] https://lore.kernel.org/bpf/CAEf4Bzb3uiSHtUbgVWmkWuJ5Sw1UZd4c_iuS4QXtUkXmTTtXuQ@mail.gmail.com/ Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230128000650.1516334-2-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 1d3cab43f4c73936ba55820a0501469e36ed6dd3 Author: Randy Dunlap Date: Sat Jan 28 11:50:46 2023 -0800 Documentation: bpf: correct spelling Correct spelling problems for Documentation/bpf/ as reported by codespell. Signed-off-by: Randy Dunlap Cc: Andrii Nakryiko Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: bpf@vger.kernel.org Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Reviewed-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20230128195046.13327-1-rdunlap@infradead.org Signed-off-by: Alexei Starovoitov commit cb4a21ea592f5753ab54cd8688306cf6423783a8 Author: David Vernet Date: Sat Jan 28 08:15:37 2023 -0600 bpf: Build-time assert that cpumask offset is zero The first element of a struct bpf_cpumask is a cpumask_t. This is done to allow struct bpf_cpumask to be cast to a struct cpumask. If this element were ever moved to another field, any BPF program passing a struct bpf_cpumask * to a kfunc expecting a const struct cpumask * would immediately fail to load. Add a build-time assertion so this is assumption is captured and verified. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230128141537.100777-1-void@manifault.com Signed-off-by: Alexei Starovoitov commit 1c7c5fca523ed623ffc9718061b2773f9cecb4da Author: Shyam Sundar S K Date: Tue Jan 24 17:17:32 2023 +0530 i2c: designware: Change from u32 to unsigned int for regmap_read() calls regmap_read() API signature expects the caller to send "unsigned int" type to return back the read value, but there are some occurrences of 'u32' across i2c-designware-* files. Change them to match the regmap_read() signature. Signed-off-by: Shyam Sundar S K Reviewed-by: Andy Shevchenko Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang commit 60a1f9f28660657f863a3846a64b6c3cbb18f07d Author: Shyam Sundar S K Date: Tue Jan 24 16:41:27 2023 +0530 i2c: designware: add a new bit check for IC_CON control On some AMD platforms, based on the new designware datasheet, BIOS sets the BIT(11) within the IC_CON register to advertise the "bus clear feature capability". AMD/Designware datasheet says: Bit(11) BUS_CLEAR_FEATURE_CTRL. Read-write,Volatile. Reset: 0. Description: In Master mode: - 1'b1: Bus Clear Feature is enabled. - 1'b0: Bus Clear Feature is Disabled. In Slave mode, this register bit is not applicable. On AMD platform designs: 1. BIOS programs the BUS_CLEAR_FEATURE_CTRL and enables the detection of SCL/SDA stuck low. 2. Whenever the stuck low is detected, the SMU FW shall do the bus recovery procedure. Currently, the way in which the "master_cfg" is built in the driver, it overrides the BUS_CLEAR_FEATURE_CTRL advertised by BIOS and the SMU FW cannot initiate the bus recovery if the stuck low is detected. Hence add a check in i2c_dw_probe_master() that if the BIOS advertises the bus clear feature, let driver not ignore it and adapt accordingly. Reviewed-by: Andy Shevchenko Signed-off-by: Shyam Sundar S K Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang commit 4ae612e4af95d72e36f478cad66d47c06b86de68 Author: Anup Sharma Date: Sat Jan 28 23:18:17 2023 +0530 iio: adc: ad7291: Fix indentation error by adding extra spaces Added extra spaces before statements to fix following indentation warnings reported by checkpatch.pl. WARNING: Statements should start on a tabstop + return 0; Signed-off-by: Anup Sharma Link: https://lore.kernel.org/r/Y9Vf4Tp8JKvy+y0u@yoga Signed-off-by: Jonathan Cameron commit 6327a930ab7bfa1ab33bcdffd5f5f4b1e7131504 Author: Ian Ray Date: Fri Jan 27 14:57:14 2023 +0200 drivers: iio: adc: ltc2497: fix LSB shift Correct the "sub_lsb" shift for the ltc2497 and drop the sub_lsb element which is now constant. An earlier version of the code shifted by 14 but this was a consequence of reading three bytes into a __be32 buffer and using be32_to_cpu(), so eight extra bits needed to be skipped. Now we use get_unaligned_be24() and thus the additional skip is wrong. Fixes: 2187cfeb3626 ("drivers: iio: adc: ltc2497: LTC2499 support") Signed-off-by: Ian Ray Link: https://lore.kernel.org/r/20230127125714.44608-1-ian.ray@ge.com Cc: Signed-off-by: Jonathan Cameron commit 64a68158738ec8f520347144352f7a09bdb9e169 Author: Harshit Mogalapalli Date: Thu Jan 26 07:36:09 2023 -0800 iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_config_word() Smatch Warns: drivers/iio/accel/mma9551_core.c:299 mma9551_read_config_word() error: uninitialized symbol 'v'. When (offset >= 1 << 12) is true mma9551_transfer() will return -EINVAL without 'v' being initialized, so check for the error and return. Note: No actual bug as caller checks the return value and does not use the parameter in the problem case. Signed-off-by: Harshit Mogalapalli Link: https://lore.kernel.org/r/20230126153610.3586243-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Jonathan Cameron commit e56d2c34ce9dc122b1a618172ec0e05e50adb9e9 Author: Harshit Mogalapalli Date: Thu Jan 26 07:21:46 2023 -0800 iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_status_word() Smatch Warns: drivers/iio/accel/mma9551_core.c:357 mma9551_read_status_word() error: uninitialized symbol 'v'. When (offset >= 1 << 12) is true mma9551_transfer() will return -EINVAL without 'v' being initialized, so check for the error and return. Note: Not a bug as such because the caller checks return value and doesn't not use this parameter in the problem case. Signed-off-by: Harshit Mogalapalli Link: https://lore.kernel.org/r/20230126152147.3585874-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Jonathan Cameron commit e314e15a0b58f9d051c00b25951073bcdae61953 Author: Kees Cook Date: Fri Jan 27 16:53:58 2023 -0800 regulator: s5m8767: Bounds check id indexing into arrays The compiler has no way to know if "id" is within the array bounds of the regulators array. Add a check for this and a build-time check that the regulators and reg_voltage_map arrays are sized the same. Seen with GCC 13: ../drivers/regulator/s5m8767.c: In function 's5m8767_pmic_probe': ../drivers/regulator/s5m8767.c:936:35: warning: array subscript [0, 36] is outside array bounds of 'struct regulator_desc[37]' [-Warray-bounds=] 936 | regulators[id].vsel_reg = | ~~~~~~~~~~^~~~ Cc: Krzysztof Kozlowski Cc: Liam Girdwood Cc: Mark Brown Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230128005358.never.313-kees@kernel.org Signed-off-by: Mark Brown commit 6adaa9a4ece44e22e0c4d2e9dbce175679383cc5 Author: Hans de Goede Date: Wed Jan 25 11:58:50 2023 +0100 power: supply: bq25890: Add new linux,iinlim-percentage property Some devices, such as the Lenovo Yoga Tab 3 Pro (YT3-X90F) have multiple batteries with a separate bq25890 charger for each battery. This requires the maximum current the external power-supply can deliver to be divided over the chargers. The Android vendor kernel shipped on the YT3-X90F divides this current with a 40/60 percent split so that batteries are done charging at approx. the same time if both were fully empty at the start. Add support for a new "linux,iinlim-percentage" percentage property which can be set to indicate that a bq25890 charger should only use that percentage of the external power-supply's maximum current. So far this new 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 Reviewed-by: Marek Vasut Signed-off-by: Sebastian Reichel commit d54bf877fd878ee45cbc88d399fb98b0b1c4484d Author: Hans de Goede Date: Wed Jan 25 11:58:49 2023 +0100 power: supply: bq25890: Add support for having a secondary charger IC Some devices, such as the Lenovo Yoga Tab 3 Pro (YT3-X90F) have multiple batteries with a separate bq25890 charger for each battery. This requires some coordination between the chargers specifically the main charger needs to put the secondary charger in Hi-Z mode when: 1. Enabling its 5V boost (OTG) output to power an external USB device, to avoid the secondary charger IC seeing this as external Vbus and then trying to charge the secondary battery from this. 2. Talking the Pump Express protocol to increase the external Vbus voltage. Having the secondary charger drawing current when the main charger is trying to talk the Pump Express protocol results in the external Vbus voltage not being raised. Add a new "linux,secondary-charger-name" string device-property, which can be set to the power_supply class device's name of the secondary charger when there is a secondary charger; and make the Vbus regulator and Pump Express code put the secondary charger in Hi-Z mode when necessary. So far this new 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. Reviewed-by: Marek Vasut Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel commit 9d18515e4a2b9d3828b6d64087feeeed3aa1cf65 Merge: 48ca6e5fa4ffc 869b9eddf0b38 Author: Xu Yilun Date: Sun Jan 29 00:31:22 2023 +0800 Merge tag 'ib-mfd-fpga-hwmon-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into for-fpga-v6.3-rc1 Lee writes: Immutable branch between MFD, FPGA and HWMON due for the v6.3 merge window * tag 'ib-mfd-fpga-hwmon-v6.3' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/lee/mfd: mfd: intel-m10-bmc: Add PMCI driver fpga: m10bmc-sec: Make rsu status type specific fpga: m10bmc-sec: Create helpers for rsu status/progress checks mfd: intel-m10-bmc: Prefix register defines with M10BMC_N3000 fpga: intel-m10-bmc: Rework flash read/write mfd: intel-m10-bmc: Support multiple CSR register layouts mfd: intel-m10-bmc: Split into core and spi specific parts mfd: intel-m10-bmc: Rename the local variables mfd: intel-m10-bmc: Create m10bmc_platform_info for type specific info mfd: intel-m10-bmc: Add missing includes to header commit b186b18efdff219002298f3d87714cf5784b1926 Author: Rob Herring Date: Wed Jan 25 16:14:04 2023 -0600 dt-bindings: iio/proximity: semtech,sx9360: Fix 'semtech,resolution' type 'semtech,resolution' is a single value, not an array. Note that it is also defined as a string in semtech,sx9310.yaml. Sigh. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230125221404.3057806-1-robh@kernel.org Signed-off-by: Jonathan Cameron commit c612bcb75fa17807f17ef2dbb1b56fde7234bd9f Author: Tom Rix Date: Tue Jan 24 11:43:01 2023 -0800 iio: imu: fix spdx format checkpatch reports WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 FILE: drivers/iio/imu/bno055/bno055_ser_trace.c:1: +//SPDX-License-Identifier: GPL-2.0 Add a space Fixes: 2eef5a9cc643 ("iio: imu: add BNO055 serdev driver") Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230124194301.656518-1-trix@redhat.com Signed-off-by: Jonathan Cameron commit 20d889a91ce94abfc9c240d19294ac1f2e716780 Author: Colin Ian King Date: Tue Jan 24 10:04:13 2023 +0000 iio: adc: imx93: Fix spelling mistake "geting" -> "getting" Thrre is a spelling mistake in a dev_err_probe message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20230124100413.684416-1-colin.i.king@gmail.com Signed-off-by: Jonathan Cameron commit f14ed2f378bc35ba3fca39523766ef46b82d3dea Author: Krzysztof Kozlowski Date: Tue Jan 24 09:10:37 2023 +0100 dt-bindings: iio: cleanup examples - indentation Use 4-space indentation (for cases when it is neither 4 not 2 space). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alexandru Lazar # max1241 Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230124081037.31013-5-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron commit 57b73eb9a3522910479f690e7e6aebedb60cd0e6 Author: Krzysztof Kozlowski Date: Tue Jan 24 09:10:36 2023 +0100 dt-bindings: iio: use lowercase hex in examples Use lowercase hex in addresses in examples. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230124081037.31013-4-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron commit 46908557a59ef8f470e4689e94a9cb06b284abb3 Author: Krzysztof Kozlowski Date: Tue Jan 24 09:10:35 2023 +0100 dt-bindings: iio: correct node names in examples Do not use underscores and unneeded suffixes (e.g. i2c0) in node name in examples. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230124081037.31013-3-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron commit 5c4712316ac9d34c91c54210bded55351e621dfc Author: Krzysztof Kozlowski Date: Tue Jan 24 09:10:34 2023 +0100 dt-bindings: iio: minor whitespace cleanups Drop redundant blank lines and add such when needed. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230124081037.31013-2-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron commit 34d1e754155be8f9bcf3e5f0fb0ed2d2450762f0 Author: Krzysztof Kozlowski Date: Tue Jan 24 09:10:33 2023 +0100 dt-bindings: iio: drop unneeded quotes Cleanup by removing unneeded quotes from refs and redundant blank lines. No functional impact except adjusting to preferred coding style. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Rokosov # memsensing Reviewed-by: Claudiu Beznea # sama5d2-adc Reviewed-by: Puranjay Mohan # tmp117 Acked-by: Rob Herring Acked-by: Marcelo Schmitt # ad7292 Link: https://lore.kernel.org/r/20230124081037.31013-1-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron commit 48ca6e5fa4ffc40a14fe45bd5499428a5a108a68 Author: Marco Pagani Date: Wed Jan 25 15:06:22 2023 +0100 fpga: bridge: return errors in the show() method of the "state" attribute This patch changes the show() method of the "state" sysfs attribute to propagate errors returned by the enable_show() op. In this way, userspace can distinguish between when the bridge is actually "enabled" (i.e., allowing signals) or "disabled" (i.e., gating signals), or when there is an error. Currently, enable_show() returns an integer representing the bridge's state (enabled or disabled) or an error code. However, this integer value is interpreted in state_show() as a bool, resulting in the method printing "enabled" (i.e., the bridge allows signals to pass), without propagating the error, even when enable_show() returns an error code. Signed-off-by: Marco Pagani Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20230125140622.176870-1-marpagan@redhat.com Signed-off-by: Xu Yilun commit 701c875aded880013aacac608832995c4b052257 Author: Andy Shevchenko Date: Wed Jan 18 12:06:23 2023 +0200 iio: adc: qcom-spmi-adc5: Fix the channel name The node name can contain an address part which is unused by the driver. Moreover, this string is propagated into the userspace label, sysfs filenames *and breaking ABI*. Cut the address part out before assigning the channel name. Fixes: 4f47a236a23d ("iio: adc: qcom-spmi-adc5: convert to device properties") Reported-by: Marijn Suijten Signed-off-by: Andy Shevchenko Reviewed-by: Marijn Suijten Link: https://lore.kernel.org/r/20230118100623.42255-1-andriy.shevchenko@linux.intel.com Cc: Signed-off-by: Jonathan Cameron commit a73c125bbbcf6185b5a77ae946aa240876b4fe71 Author: Xu Yilun Date: Sat Jan 14 23:54:44 2023 +0800 fpga: dfl: more kernel-doc corrections Fix more kernel-doc warnings in drivers/fpga/: $ ./scripts/kernel-doc -none drivers/fpga/* drivers/fpga/dfl-afu.h:61: warning: expecting prototype for struct fpga_afu_dma_region. Prototype was for struct dfl_afu_dma_region instead drivers/fpga/dfl-afu-region.c:52: warning: Function parameter or member 'pdata' not described in 'afu_mmio_region_add' drivers/fpga/dfl-fme-perf.c:161: warning: Function parameter or member 'node' not described in 'fme_perf_priv' drivers/fpga/dfl-fme-pr.h:70: warning: expecting prototype for struct dfl_fme_bridge_pdata. Prototype was for struct dfl_fme_br_pdata instead drivers/fpga/dfl.h:256: warning: Function parameter or member 'revision' not described in 'dfl_feature' Signed-off-by: Xu Yilun Reviewed-by: Randy Dunlap Link: https://lore.kernel.org/r/20230114155444.794712-1-yilun.xu@intel.com commit 782d8e61b5d6c15c5b7cfd5726da1f20f7cc8366 Author: Randy Dunlap Date: Thu Jan 12 22:37:20 2023 -0800 fpga: dfl: kernel-doc corrections Fix W=1 kernel-doc warnings in drivers/fpga/: drivers/fpga/dfl.c:54: warning: cannot understand function prototype: 'struct dfl_dev_info ' drivers/fpga/dfl.c:74: warning: cannot understand function prototype: 'struct dfl_chardev_info ' drivers/fpga/dfl-fme-pr.c:175: warning: Function parameter or member 'feature' not described in 'dfl_fme_create_mgr' drivers/fpga/dfl-fme-pr.c:280: warning: expecting prototype for dfl_fme_destroy_bridge(). Prototype was for dfl_fme_destroy_bridges() instead Signed-off-by: Randy Dunlap Cc: Wu Hao Cc: Tom Rix Cc: Moritz Fischer Cc: Xu Yilun Cc: linux-fpga@vger.kernel.org Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20230113063720.10668-1-rdunlap@infradead.org Signed-off-by: Xu Yilun commit 9d94ec985702a454638d49816fa66718cb8b228a Author: Ivan Bornyakov Date: Fri Dec 30 12:29:22 2022 +0300 fpga: microchip-spi: separate data frame write routine mpf_ops_write() function writes bitstream data to the FPGA by a smaller frames. Introduce mpf_spi_frame_write() function which is for writing a single data frame and use it in mpf_ops_write(). No functional changes intended. Signed-off-by: Ivan Bornyakov Acked-by: Conor Dooley Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20221230092922.18822-4-i.bornyakov@metrotek.ru Signed-off-by: Xu Yilun commit 88e705697e801299a13ecaf2ba54599964fe711c Author: Ivan Bornyakov Date: Fri Dec 30 12:29:21 2022 +0300 fpga: microchip-spi: rewrite status polling in a time measurable way Original busy loop with retries count in mpf_poll_status() is not too reliable, as it takes different times on different systems. Replace it with read_poll_timeout() macro. While at it, fix polling stop condition to met function's original intention declared in the comment. The issue with original polling stop condition is that it stops if any of mask bits is set, while intention was to stop if all mask bits is set. This was not noticible because only MPF_STATUS_READY is passed as mask argument and it is BIT(1). Fixes: 5f8d4a900830 ("fpga: microchip-spi: add Microchip MPF FPGA manager") Signed-off-by: Ivan Bornyakov Reviewed-by: Ilpo Järvinen Acked-by: Conor Dooley Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20221230092922.18822-3-i.bornyakov@metrotek.ru Signed-off-by: Xu Yilun commit 1da53d23a41c5f77963984d8da5623ed56918ada Author: Ivan Bornyakov Date: Fri Dec 30 12:29:20 2022 +0300 fpga: microchip-spi: move SPI I/O buffers out of stack As spi-summary doc says: > I/O buffers use the usual Linux rules, and must be DMA-safe. > You'd normally allocate them from the heap or free page pool. > Don't use the stack, or anything that's declared "static". Replace spi_write() with spi_write_then_read(), which is dma-safe for on-stack buffers. Use cacheline aligned buffers for transfers used in spi_sync_transfer(). Although everything works OK with stack-located I/O buffers, better follow the doc to be safe. Fixes: 5f8d4a900830 ("fpga: microchip-spi: add Microchip MPF FPGA manager") Signed-off-by: Ivan Bornyakov Acked-by: Conor Dooley Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20221230092922.18822-2-i.bornyakov@metrotek.ru Signed-off-by: Xu Yilun commit 622bd6ea90086beb98ac439edd7d57de73d1d6f9 Author: Arnd Bergmann Date: Thu Jan 26 17:22:59 2023 +0100 at86rf230: convert to gpio descriptors There are no remaining in-tree users of the platform_data, so this driver can be converted to using the simpler gpiod interfaces. Any out-of-tree users that rely on the platform data can provide the data using the device_property and gpio_lookup interfaces instead. Reviewed-by: Miquel Raynal Reviewed-by: Andy Shevchenko Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230126162323.2986682-1-arnd@kernel.org Signed-off-by: Stefan Schmidt commit 3accf4762734a69ebd03cba989249c78ac7dfc7e Author: Miquel Raynal Date: Wed Jan 25 11:29:23 2023 +0100 mac802154: Handle basic beaconing Implement the core hooks in order to provide the softMAC layer support for sending beacons. Coordinators may be requested to send beacons in a beacon enabled PAN in order for the other devices around to self discover the available PANs automatically. Changing the channels is prohibited while a beacon operation is ongoing. The implementation uses a workqueue triggered at a certain interval depending on the symbol duration for the current channel and the interval order provided. Sending beacons in response to a BEACON_REQ frame (ie. answering active scans) is not yet supported. This initial patchset has no security support (llsec). Co-developed-by: David Girault Signed-off-by: David Girault Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20230125102923.135465-3-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt commit 9bc114504b07207d671593f6f6d787d55dcf91bd Author: Miquel Raynal Date: Wed Jan 25 11:29:22 2023 +0100 ieee802154: Add support for user beaconing requests Parse user requests for sending beacons, start sending beacons at a regular pace. If needed, the pace can be updated with a new request. The process can also be interrupted at any moment. The page and channel must be changed beforehands if needed. Interval orders above 14 are reserved to tell a device it must answer BEACON_REQ coming from another device as part of an active scan procedure and this is not yet supported. A netlink "beacon request" structure is created to list the requirements. Mac layers may now implement the ->send_beacons() and ->stop_beacons() hooks. Co-developed-by: David Girault Signed-off-by: David Girault Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20230125102923.135465-2-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt commit 4fd8bcec5fd7c0d586206fa2f42bd67b06cdaa7e Author: Kees Cook Date: Fri Jan 27 14:52:07 2023 -0800 regulator: max77802: Bounds check regulator id against opmode Explicitly bounds-check the id before accessing the opmode array. Seen with GCC 13: ../drivers/regulator/max77802-regulator.c: In function 'max77802_enable': ../drivers/regulator/max77802-regulator.c:217:29: warning: array subscript [0, 41] is outside array bounds of 'unsigned int[42]' [-Warray-bounds=] 217 | if (max77802->opmode[id] == MAX77802_OFF_PWRREQ) | ~~~~~~~~~~~~~~~~^~~~ ../drivers/regulator/max77802-regulator.c:62:22: note: while referencing 'opmode' 62 | unsigned int opmode[MAX77802_REG_MAX]; | ^~~~~~ Cc: Javier Martinez Canillas Cc: Liam Girdwood Cc: Mark Brown Signed-off-by: Kees Cook Acked-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20230127225203.never.864-kees@kernel.org Signed-off-by: Mark Brown commit ffe4c0f0bfaa571a676a0e946d4a6a0607f94294 Author: Kuninori Morimoto Date: Mon Jan 23 23:17:20 2023 +0000 ASoC: soc-compress.c: fixup private_data on snd_soc_new_compress() commit d3268a40d4b19f ("ASoC: soc-compress.c: fix NULL dereference") enables DPCM capture, but it should independent from playback. This patch fixup it. Fixes: d3268a40d4b1 ("ASoC: soc-compress.c: fix NULL dereference") Link: https://lore.kernel.org/r/87tu0i6j7j.wl-kuninori.morimoto.gx@renesas.com Acked-by: Charles Keepax Acked-by: Pierre-Louis Bossart Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/871qnkvo1s.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit b3bcedc0402fcdc5c8624c433562d9d1882749d8 Author: Kees Cook Date: Fri Jan 27 14:41:29 2023 -0800 ASoC: kirkwood: Iterate over array indexes instead of using pointer math Walking the dram->cs array was seen as accesses beyond the first array item by the compiler. Instead, use the array index directly. This allows for run-time bounds checking under CONFIG_UBSAN_BOUNDS as well. Seen with GCC 13 with -fstrict-flex-arrays: ../sound/soc/kirkwood/kirkwood-dma.c: In function 'kirkwood_dma_conf_mbus_windows.constprop': ../sound/soc/kirkwood/kirkwood-dma.c:90:24: warning: array subscript 0 is outside array bounds of 'const struct mbus_dram_window[0]' [-Warray-bounds=] 90 | if ((cs->base & 0xffff0000) < (dma & 0xffff0000)) { | ~~^~~~~~ Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-devel@alsa-project.org Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20230127224128.never.410-kees@kernel.org Signed-off-by: Mark Brown commit 362e8d0f27c40864b4f8994624409f7b4316d2dd Author: Alexander Stein Date: Thu Jan 19 08:34:16 2023 +0100 ASoC: imx-hdmi: Use dev_err_probe This silences -517 errors and helps figuring out why the device probe is deferred. Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20230119073416.3064918-1-alexander.stein@ew.tq-group.com Signed-off-by: Mark Brown commit dcf6d2ef0e823346a3c1eae3f96e733e92ca656c Author: Kiseok Jo Date: Thu Jan 26 02:01:56 2023 +0000 ASoC: Modified the schema binding and added the vendor prefixes. Signed-off-by: Kiseok Jo Link: https://lore.kernel.org/r/20230126020156.3252-4-kiseok.jo@irondevice.com Signed-off-by: Mark Brown commit 68cd394efd0fdce25d0def8d6cb1b8898b2c13d9 Author: KiseokJo Date: Thu Jan 26 02:01:55 2023 +0000 ASoC: The Iron Device SMA1303 is a boosted Class-D audio amplifier. Signed-off-by: KiseokJo Reported-by: Mark Brown Link: https://lore.kernel.org/r/20230126020156.3252-3-kiseok.jo@irondevice.com Signed-off-by: Mark Brown commit 18e16350558ac42c8cc55c5df714fd28412452ad Author: Luca Ceresoli Date: Thu Jan 26 16:24:12 2023 +0100 ASoC: fsl-asoc-card: constify fsl_asoc_card_dai This is never modified and can be made const. Signed-off-by: Luca Ceresoli Link: https://lore.kernel.org/r/20230126152412.959574-1-luca.ceresoli@bootlin.com Signed-off-by: Mark Brown commit 3d0690140f37dbdad956c5bb18eb2854161ec44f Merge: 6c9802b82f368 251a2b1185153 Author: Mark Brown Date: Sat Jan 28 10:46:16 2023 +0000 ASoC: SOF: ipc4: Multi-stream playback and capture support Merge series from Peter Ujfalusi : The following series will enable multi-stream support for playback and capture streams. Currently only a single PCM can be connected to a DAI, with the multi-stream support it is possible to connect multiple PCMs to a single DAI. To achieve this we need to make sure that DAIs/AIF are only set up once since other stream could be connected to it later. We also need to introduce reference or use counting for widgets to make sure that they are not going to be destroyed while other streams are still using them. With the multi-stream support we also need to extend our current locking scheme which worked well for simple paths. commit 6c9802b82f368cfe1dbd0611d0f9ac0b7cfd1ca0 Merge: aa9ff6a4955fd 087b9dda86580 Author: Mark Brown Date: Sat Jan 28 10:46:10 2023 +0000 ASoC: simple-card-utils: create jack inputs for Merge series from Astrid Rost : Add a generic way to create jack inputs for auxiliary jack detection drivers (e.g. via i2c, spi), which are not part of any real codec. The simple-card can be used as combining card driver to add the jacks, no new one is required. Create a jack (for input-events) for jack devices in the auxiliary device list (aux_devs). A device which returns a valid value on get_jack_type counts as jack device; set_jack is required to add the jack to the device. commit 9f2c9170934eace462499ba0bfe042cc72900173 Author: Krzysztof Kozlowski Date: Fri Jan 27 11:18:29 2023 +0100 arm64: dts: amd: use "okay" for status "okay" over "ok" is preferred for status property. Link: https://lore.kernel.org/r/20230127101829.93761-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 2f3086577f41a4569de4842049bff12f0926b71b Author: Krzysztof Kozlowski Date: Fri Jan 27 11:18:27 2023 +0100 arm64: dts: apm: use "okay" for status "okay" over "ok" is preferred for status property. Link: https://lore.kernel.org/r/20230127101827.93728-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit d105729968404fd42a624bfea01b2f8e46a4947a Author: Krzysztof Kozlowski Date: Fri Jan 27 11:18:24 2023 +0100 arm64: dts: microchip: use "okay" for status "okay" over "ok" is preferred for status property. Reviewed-by: Steen Hegelund Link: https://lore.kernel.org/r/20230127101824.93684-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 987414b1cfffa30b42bafb7063b20a616c54eec7 Author: Krzysztof Kozlowski Date: Wed Jan 25 10:45:13 2023 +0100 arm64: dts: exynos: use lowercase hex addresses By convention the hex addresses should be lowercase. Link: https://lore.kernel.org/r/20230125094513.155063-9-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit db00347974e68b3820ae57575d1f94fe75ce9deb Author: Krzysztof Kozlowski Date: Fri Jan 20 18:31:16 2023 +0100 arm64: dts: exynos: correct wlf,micd-dbtime on TM2 The wlf,micd-dbtime property of WM5110 codec can be either 2 or 4 (driver ignores other values, so assume author wanted something here): exynos5433-tm2e.dtb: audio-codec@0: wlf,micd-dbtime:0:0: 1 is not one of [2, 4] Link: https://lore.kernel.org/r/20230120173116.341270-6-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit d7cd5b50ea7a75771bbbf046ada668f5a497834e Author: Krzysztof Kozlowski Date: Fri Jan 20 18:31:15 2023 +0100 arm64: dts: exynos: add interrupt-controller to WM5110 on TM2 The WM5110 bindings expect node to be interrupt controller: exynos5433-tm2.dtb: audio-codec@0: 'interrupt-controller' is a required property exynos5433-tm2.dtb: audio-codec@0: '#interrupt-cells' is a required property Link: https://lore.kernel.org/r/20230120173116.341270-5-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit b838792a624244bbd972ca691c4fd5272ccfdcf8 Author: Krzysztof Kozlowski Date: Fri Jan 20 18:31:14 2023 +0100 arm64: dts: exynos: add VPH_PWR regulator on TM2 VPH_PWR is routed to battery, so it is not configurable. However few devices, e.g. WM5110 expect speaker power supplies, thus provide the regulator for full hardware description. Audio amplifier also accepts that power supply. Keep ordering the nodes by renaming existing IRDA regulator. This fixes dtbs_check warnings: exynos5433-tm2e.dtb: audio-codec@0: 'SPKVDDL-supply' is a required property exynos5433-tm2e.dtb: audio-codec@0: 'SPKVDDR-supply' is a required property Link: https://lore.kernel.org/r/20230120173116.341270-4-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 2bbd69327ab67eb00a641ec66f08a98fc4aa36ef Author: Krzysztof Kozlowski Date: Fri Jan 20 18:31:13 2023 +0100 arm64: dts: exynos: correct Bluetooth LED triger on E850-96 Switch source of LED activity to hci0-power from RX, to match bindings (same effect expected): exynos850-e850-96.dtb: leds: led-5:linux,default-trigger: 'oneOf' conditional failed, one must be fixed: 'hci0rx' is not one of ['backlight', 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern'] 'hci0rx' does not match '^cpu[0-9]*$' 'hci0rx' does not match '^hci[0-9]+-power$' 'hci0rx' does not match '^mmc[0-9]+$' 'hci0rx' does not match '^phy[0-9]+tx$' Link: https://lore.kernel.org/r/20230120173116.341270-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 682319f63d80df6460388d0da8f7601761b86c14 Author: Krzysztof Kozlowski Date: Fri Jan 20 18:31:12 2023 +0100 arm64: dts: exynos: add ADC supply on Exynos7 Espresso ADC requires supply and it seems LDO3 (same as on Exynos5433 TM2 boards) fits in voltage range of 1.8 V. Use it to silence warning: exynos7-espresso.dtb: adc@13620000: 'vdd-supply' is a required property Link: https://lore.kernel.org/r/20230120173116.341270-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar commit 5f762c4008e886d8dfa755b2d6d29a3d2cd9935a Author: Krzysztof Kozlowski Date: Fri Jan 20 18:31:11 2023 +0100 arm64: dts: exynos: disable non-working GPU on Exynos7 Espresso The Panfrost GPU drivers require clock but such was not provided in Exynos7 DTSI. The CMU_G3D clock controller was not upstreamed, thus consider GPU as non-working and simply disable it to silence warnings like: exynos7-espresso.dtb: gpu@14ac0000: 'clocks' is a required property Link: https://lore.kernel.org/r/20230120173116.341270-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar commit 70eb3911d80f548a76fb9a40c8a3fd93ac061a42 Author: Johannes Berg Date: Fri Jan 27 08:45:06 2023 +0100 net: netlink: recommend policy range validation For large ranges (outside of s16) the documentation currently recommends open-coding the validation, but it's better to use the NLA_POLICY_FULL_RANGE() or NLA_POLICY_FULL_RANGE_SIGNED() policy validation instead; recommend that. Signed-off-by: Johannes Berg Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/20230127084506.09f280619d64.I5dece85f06efa8ab0f474ca77df9e26d3553d4ab@changeid Signed-off-by: Jakub Kicinski commit 2d104c390f0d3901c4915dcb141cb96da96cffe7 Merge: d8afe2f8a92d2 16809afdcbad5 Author: Jakub Kicinski Date: Fri Jan 27 23:59:45 2023 -0800 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== bpf-next 2023-01-28 We've added 124 non-merge commits during the last 22 day(s) which contain a total of 124 files changed, 6386 insertions(+), 1827 deletions(-). The main changes are: 1) Implement XDP hints via kfuncs with initial support for RX hash and timestamp metadata kfuncs, from Stanislav Fomichev and Toke Høiland-Jørgensen. Measurements on overhead: https://lore.kernel.org/bpf/875yellcx6.fsf@toke.dk 2) Extend libbpf's bpf_tracing.h support for tracing arguments of kprobes/uprobes and syscall as a special case, from Andrii Nakryiko. 3) Significantly reduce the search time for module symbols by livepatch and BPF, from Jiri Olsa and Zhen Lei. 4) Enable cpumasks to be used as kptrs, which is useful for tracing programs tracking which tasks end up running on which CPUs in different time intervals, from David Vernet. 5) Fix several issues in the dynptr processing such as stack slot liveness propagation, missing checks for PTR_TO_STACK variable offset, etc, from Kumar Kartikeya Dwivedi. 6) Various performance improvements, fixes, and introduction of more than just one XDP program to XSK selftests, from Magnus Karlsson. 7) Big batch to BPF samples to reduce deprecated functionality, from Daniel T. Lee. 8) Enable struct_ops programs to be sleepable in verifier, from David Vernet. 9) Reduce pr_warn() noise on BTF mismatches when they are expected under the CONFIG_MODULE_ALLOW_BTF_MISMATCH config anyway, from Connor O'Brien. 10) Describe modulo and division by zero behavior of the BPF runtime in BPF's instruction specification document, from Dave Thaler. 11) Several improvements to libbpf API documentation in libbpf.h, from Grant Seltzer. 12) Improve resolve_btfids header dependencies related to subcmd and add proper support for HOSTCC, from Ian Rogers. 13) Add ipip6 and ip6ip decapsulation support for bpf_skb_adjust_room() helper along with BPF selftests, from Ziyang Xuan. 14) Simplify the parsing logic of structure parameters for BPF trampoline in the x86-64 JIT compiler, from Pu Lehui. 15) Get BTF working for kernels with CONFIG_RUST enabled by excluding Rust compilation units with pahole, from Martin Rodriguez Reboredo. 16) Get bpf_setsockopt() working for kTLS on top of TCP sockets, from Kui-Feng Lee. 17) Disable stack protection for BPF objects in bpftool given BPF backends don't support it, from Holger Hoffstätte. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (124 commits) selftest/bpf: Make crashes more debuggable in test_progs libbpf: Add documentation to map pinning API functions libbpf: Fix malformed documentation formatting selftests/bpf: Properly enable hwtstamp in xdp_hw_metadata selftests/bpf: Calls bpf_setsockopt() on a ktls enabled socket. bpf: Check the protocol of a sock to agree the calls to bpf_setsockopt(). bpf/selftests: Verify struct_ops prog sleepable behavior bpf: Pass const struct bpf_prog * to .check_member libbpf: Support sleepable struct_ops.s section bpf: Allow BPF_PROG_TYPE_STRUCT_OPS programs to be sleepable selftests/bpf: Fix vmtest static compilation error tools/resolve_btfids: Alter how HOSTCC is forced tools/resolve_btfids: Install subcmd headers bpf/docs: Document the nocast aliasing behavior of ___init bpf/docs: Document how nested trusted fields may be defined bpf/docs: Document cpumask kfuncs in a new file selftests/bpf: Add selftest suite for cpumask kfuncs selftests/bpf: Add nested trust selftests suite bpf: Enable cpumasks to be queried and used as kptrs bpf: Disallow NULLable pointers for trusted kfuncs ... ==================== Link: https://lore.kernel.org/r/20230128004827.21371-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit d8afe2f8a92d2aac3df645772f6ee61b0b2fc147 Author: Breno Leitao Date: Wed Jan 25 10:52:30 2023 -0800 netpoll: Remove 4s sleep during carrier detection This patch removes the msleep(4s) during netpoll_setup() if the carrier appears instantly. Here are some scenarios where this workaround is counter-productive in modern ages: Servers which have BMC communicating over NC-SI via the same NIC as gets used for netconsole. BMC will keep the PHY up, hence the carrier appearing instantly. The link is fibre, SERDES getting sync could happen within 0.1Hz, and the carrier also appears instantly. Other than that, if a driver is reporting instant carrier and then losing it, this is probably a driver bug. Reported-by: Michael van der Westhuizen Signed-off-by: Breno Leitao Link: https://lore.kernel.org/r/20230125185230.3574681-1-leitao@debian.org Signed-off-by: Jakub Kicinski commit b568d3072a443fac22d35d6342f48ee27b811661 Merge: c2ea552065e43 ff445b8397745 Author: Jakub Kicinski Date: Fri Jan 27 22:25:19 2023 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Conflicts: drivers/net/ethernet/intel/ice/ice_main.c 418e53401e47 ("ice: move devlink port creation/deletion") 643ef23bd9dd ("ice: Introduce local var for readability") https://lore.kernel.org/all/20230127124025.0dacef40@canb.auug.org.au/ https://lore.kernel.org/all/20230124005714.3996270-1-anthony.l.nguyen@intel.com/ drivers/net/ethernet/engleder/tsnep_main.c 3d53aaef4332 ("tsnep: Fix TX queue stop/wake for multiple queues") 25faa6a4c5ca ("tsnep: Replace TX spin_lock with __netif_tx_lock") https://lore.kernel.org/all/20230127123604.36bb3e99@canb.auug.org.au/ net/netfilter/nf_conntrack_proto_sctp.c 13bd9b31a969 ("Revert "netfilter: conntrack: add sctp DATA_SENT state"") a44b7651489f ("netfilter: conntrack: unify established states for SCTP paths") f71cb8f45d09 ("netfilter: conntrack: sctp: use nf log infrastructure for invalid packets") https://lore.kernel.org/all/20230127125052.674281f9@canb.auug.org.au/ https://lore.kernel.org/all/d36076f3-6add-a442-6d4b-ead9f7ffff86@tessares.net/ Signed-off-by: Jakub Kicinski commit da27f796a832122ee533c7685438dad1c4e338dd Author: Rik van Riel Date: Fri Jan 27 13:46:51 2023 -0500 ipc,namespace: batch free ipc_namespace structures Instead of waiting for an RCU grace period between each ipc_namespace structure that is being freed, wait an RCU grace period for every batch of ipc_namespace structures. Thanks to Al Viro for the suggestion of the helper function. This speeds up the run time of the test case that allocates ipc_namespaces in a loop from 6 minutes, to a little over 1 second: real 0m1.192s user 0m0.038s sys 0m1.152s Signed-off-by: Rik van Riel Reported-by: Chris Mason Tested-by: Giuseppe Scrivano Suggested-by: Al Viro Signed-off-by: Al Viro commit a80c4adcb574821e534779c48ae13953b7d1d996 Author: Rik van Riel Date: Fri Jan 27 13:46:50 2023 -0500 ipc,namespace: make ipc namespace allocation wait for pending free Currently the ipc namespace allocation will fail when there are ipc_namespace structures pending to be freed. This results in the simple test case below, as well as some real world workloads, to get allocation failures even when the number of ipc namespaces in actual use is way below the limit. int main() { int i; for (i = 0; i < 100000; i++) { if (unshare(CLONE_NEWIPC) < 0) error(EXIT_FAILURE, errno, "unshare"); } } Make the allocation of an ipc_namespace wait for pending frees, so it will succeed. real 6m19.197s user 0m0.041s sys 0m1.019s Signed-off-by: Rik van Riel Reported-by: Chris Mason Signed-off-by: Al Viro commit 16809afdcbad5fa45f34622f62873c7d7114cde5 Author: Stanislav Fomichev Date: Fri Jan 27 13:57:05 2023 -0800 selftest/bpf: Make crashes more debuggable in test_progs Reset stdio before printing verbose log of the SIGSEGV'ed test. Otherwise, it's hard to understand what's going on in the cases like [0]. With the following patch applied: --- a/tools/testing/selftests/bpf/prog_tests/xdp_metadata.c +++ b/tools/testing/selftests/bpf/prog_tests/xdp_metadata.c @@ -392,6 +392,11 @@ void test_xdp_metadata(void) "generate freplace packet")) goto out; + + ASSERT_EQ(1, 2, "oops"); + int *x = 0; + *x = 1; /* die */ + while (!retries--) { if (bpf_obj2->bss->called) break; Before: #281 xdp_metadata:FAIL Caught signal #11! Stack trace: ./test_progs(crash_handler+0x1f)[0x55c919d98bcf] /lib/x86_64-linux-gnu/libc.so.6(+0x3bf90)[0x7f36aea5df90] ./test_progs(test_xdp_metadata+0x1db0)[0x55c919d8c6d0] ./test_progs(+0x23b438)[0x55c919d9a438] ./test_progs(main+0x534)[0x55c919d99454] /lib/x86_64-linux-gnu/libc.so.6(+0x2718a)[0x7f36aea4918a] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85)[0x7f36aea49245] ./test_progs(_start+0x21)[0x55c919b82ef1] After: test_xdp_metadata:PASS:ip netns add xdp_metadata 0 nsec open_netns:PASS:malloc token 0 nsec open_netns:PASS:open /proc/self/ns/net 0 nsec open_netns:PASS:open netns fd 0 nsec open_netns:PASS:setns 0 nsec .. test_xdp_metadata:FAIL:oops unexpected oops: actual 1 != expected 2 #281 xdp_metadata:FAIL Caught signal #11! Stack trace: ./test_progs(crash_handler+0x1f)[0x562714a76bcf] /lib/x86_64-linux-gnu/libc.so.6(+0x3bf90)[0x7fa663f9cf90] ./test_progs(test_xdp_metadata+0x1db0)[0x562714a6a6d0] ./test_progs(+0x23b438)[0x562714a78438] ./test_progs(main+0x534)[0x562714a77454] /lib/x86_64-linux-gnu/libc.so.6(+0x2718a)[0x7fa663f8818a] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85)[0x7fa663f88245] ./test_progs(_start+0x21)[0x562714860ef1] 0: https://github.com/kernel-patches/bpf/actions/runs/4019879316/jobs/6907358876 Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20230127215705.1254316-1-sdf@google.com Signed-off-by: Martin KaFai Lau commit 21617de3b4647175a4c6a2a58f40515a94a13df4 Author: John Butler Date: Fri Jan 27 14:57:04 2023 -0800 Input: xpad - add 8BitDo Pro 2 Wired Controller support Add VID and PID to the xpad_device table to allow driver to use the 8BitDo Pro 2 Wired Controller, which is XTYPE_XBOX360 compatible by default. Signed-off-by: John Butler Reviewed-by: Mattijs Korpershoek Link: https://lore.kernel.org/r/20230124005206.80706-1-radon86dev@gmail.com Signed-off-by: Dmitry Torokhov commit ac8810d2b6390df57f09c797b128e4eafe6c7332 Author: Arnd Bergmann Date: Tue Jan 17 17:45:33 2023 +0100 Input: ipaq-micro-ts - fix DEFINE_SIMPLE_DEV_PM_OPS typo The previous change was not properly build tested and needs a trivial spelling change: ipaq-micro-ts.c:146:8: error: type defaults to 'int' in declaration of 'DEFINE_SIMPLE_DEV_PM' [-Werror=implicit-int] Fixes: 144ff5e03d74 ("Input: ipaq-micro-ts - use DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()") Signed-off-by: Arnd Bergmann Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20230117164539.1631336-1-arnd@kernel.org Signed-off-by: Dmitry Torokhov commit 47e79d310928ee21c0718cff5058251cd2dc71c0 Author: Jonathan Cameron Date: Sat Jan 14 17:16:20 2023 +0000 Input: wistron_btns - use pm_sleep_ptr() to allow removal of ifdef CONFIG_PM guards As the guards only apply to suspend and resume, #ifdef CONFIG_PM_SLEEP would have been a tighter protection. As pm_sleep_ptr() lets the compiler see the protected ops structure and callbacks but also lets the compiler remove it as unused code if !CONFIG_PM_SLEEP this allows the #ifdef guards to be removed, slightly simplifying the resulting code. -- It seems likely that DEFINE_SIMPLE_DEV_PM_OPS() would work here but I'd prefer not to make that change unless someone can confirm that the extra callbacks registered will have no unwanted side effects in this driver. Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20230114171620.42891-17-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit f33f61a75ad24b1bc14a8edf2f313f33ae54e5f2 Author: Jonathan Cameron Date: Sat Jan 14 17:16:19 2023 +0000 Input: cma3000 - use pm_sleep_ptr() to allow removal of ifdef CONFIG_PM guards As the guards only apply to suspend and resume, #ifdef CONFIG_PM_SLEEP would have been a tighter protection. As pm_sleep_ptr() lets the compiler see the protected ops structure and callbacks but also lets the compiler remove it as unused code if !CONFIG_PM_SLEEP this allows the #ifdef guards to be removed, slightly simplifying the resulting code. Signed-off-by: Jonathan Cameron -- It seems likely that DEFINE_SIMPLE_DEV_PM_OPS() would work here but I'd prefer not to make that change unless someone can confirm that the extra callbacks registered will have no unwanted side effects in this driver. Link: https://lore.kernel.org/r/20230114171620.42891-16-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 345c7b741c4631fad38bb8dc8d6659ac05d92380 Author: Jonathan Cameron Date: Sat Jan 14 17:16:18 2023 +0000 Input: Use pm_sleep_ptr() to avoid need for ifdef CONFIG_PM_SLEEP As the new pm_sleep_ptr() macro lets the compiler see the code, but then remove it if !CONFIG_PM_SLEEP it can be used to avoid the need for #ifdef guards. Use that in the input core to simplify the code a little. Note pm_sleep_ptr() has not been applied to each callback in the ops structure because the pm_sleep_ptr() at the usage site is sufficient. Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20230114171620.42891-15-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit f31e7388dd1633ed2273cc5c6a99f225ec1a5350 Author: Jonathan Cameron Date: Sat Jan 14 17:16:17 2023 +0000 Input: omap4-keyad - use pm_ptr() and RUNTIME_DEV_PM_OPS() SET_RUNTIME_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_ptr() and RUNTIME_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Note that DEFINE_RUNTIME_DEV_PM_OPS() is not used because that adds additional callbacks for suspend and resume and would need testing. Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20230114171620.42891-14-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 6b9c160853657accdc38c0a24e70ded3547db326 Author: Jonathan Cameron Date: Sat Jan 14 17:16:16 2023 +0000 Input: applespi - use pm_sleep_ptr() and SYSTEM_SLEEP_PM_OPS() SET_SYSTEM_SLEEP_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and SYSTEM_SLEEP_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. In this case we also have a .poweroff_late() callback. Whilst not strictly necessary, to future proof against relaxation of the protection of the main driver.pm = pm_sleep_ptr() protect this pointer with pm_sleep_ptr() as would be done if the LATE_SYSTEM_SLEEP_PM_OPS() macro were used to set it. Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20230114171620.42891-13-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit c3c2f2bc0c44cd3da542e2c48b680a3025661500 Author: Jonathan Cameron Date: Sat Jan 14 17:16:15 2023 +0000 Input: cyttsp - use EXPORT_GPL_SIMPLE_DEV_PM_OPS() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and EXPORT_GPL_SIMPLE_DEV_PMU_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. It also rolls in the EXPORT_SYMBOL() so that we only export it if CONFIG_PM_SLEEP. Signed-off-by: Jonathan Cameron Cc: Javier Martinez Canillas Cc: Linus Walleij Link: https://lore.kernel.org/r/20230114171620.42891-12-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit ebbdbef28facff7ceadc091aa5279b3751da1d4a Author: Jonathan Cameron Date: Sat Jan 14 17:16:14 2023 +0000 Input: cyttsp4 - use EXPORT_GPL_RUNTIME_DEV_PM_OPS() SET_SYSTEM_SLEEP_PM_OPS() and RUNTIME_PM_OPS() are deprecated as they requires explicit protection against unused function warnings. The new combination of pm_ptr() EXPORT_GPL_RUNTIME_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the #ifdef guards. Note that we are replacing an unconditional call to the suspend and resume functions for sleep use cases with one via pm_runtime_force_suspend() / pm_runtime_force_resume() that only do anything to the device if we are not already in the appropriate runtime suspended state. Signed-off-by: Jonathan Cameron -- I 'think' this should be fine in that it can only reduce the number of unnecessary suspends. If anyone can test that would be great. Link: https://lore.kernel.org/r/20230114171620.42891-11-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 6470215b883eba58909871ec2268f734f1b3d646 Author: Jonathan Cameron Date: Sat Jan 14 17:16:13 2023 +0000 Input: tsc200x - use EXPORT_GPL_SIMPLE_DEV_PM_OPS() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and EXPORT_GPL_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. This function also removes the need for separate EXPORT_SYMBOL_GPL() Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20230114171620.42891-10-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 40be06463e3d7d26fb520b4b73ae6d86c1776d42 Author: Jonathan Cameron Date: Sat Jan 14 17:16:12 2023 +0000 Input: adxl34x - unify dev_pm_ops using EXPORT_SIMPLE_DEV_PM_OPS() The I2C and SPI PM callbacks were identical (though wrapped in some bouncing out to the bus specific container of the struct device and then back again to get the drvdata). As such rather than just moving these to SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() take the opportunity to unify the struct dev_pm_ops and use the new EXPORT_SIMPLE_DEV_PM_OPS() macro so that we can drop the unused suspend and resume callbacks as well as the structure if !CONFIG_PM_SLEEP without needing to mark the callbacks __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Michael Hennerich Link: https://lore.kernel.org/r/20230114171620.42891-9-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit c0a150eee35f9a955cd47a737e97271ec262fd30 Author: Jonathan Cameron Date: Sat Jan 14 17:16:11 2023 +0000 Input: ad714x - unify dev_pm_ops using EXPORT_SIMPLE_DEV_PM_OPS() The I2C and SPI PM callbacks were identical (though wrapped in some bouncing out to the bus specific container of the struct device and then back again to get the drvdata). As such rather than just moving these to SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() take the opportunity to unify the struct dev_pm_ops and use the new EXPORT_SIMPLE_DEV_PM_OPS() macro so that we can drop the unused suspend and resume callbacks as well as the structure if !CONFIG_PM_SLEEP without needing to mark the callbacks __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Michael Hennerich Link: https://lore.kernel.org/r/20230114171620.42891-8-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 90208b31f9380c376269bf7f24f4ab1f0e144617 Author: Jonathan Cameron Date: Sat Jan 14 17:16:10 2023 +0000 Input: stmfts - switch to SYSTEM_SLEEP_/RUNTIME_PM_OPS() and pm_ptr() SET_SYSTEM_SLEEP_PM_OPS() and SET_RUNTIME_PM_OPS() are deprecated as they require explicit protection against unused function warnings. The new combination of pm_ptr() and SYSTEM_SLEEP_PM_OPS()/ RUNTIME_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Andi Shyti Link: https://lore.kernel.org/r/20230114171620.42891-7-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 452fcd2dcb1d74de99608930397857204f1335e6 Author: Jonathan Cameron Date: Sat Jan 14 17:16:09 2023 +0000 Input: rmi4 - switch to SYSTEM_SLEEP/RUNTIME_PM_OPS() and pm_ptr() SET_SYSTEM_SLEEP_PM_OPS() and SET_RUNTIME_PM_OPS() are deprecated as they requires explicit protection against unused function warnings. The new combination of pm_ptr() and SYSTEM_SLEEP_PM_OPS() / RUNTIME_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the #ifdef guards. Whilst all 3 sets of callbacks are similar, there are small differences that make it challenging to use a single pm_dev_ops structure - hence leave the duplication as it stands. Signed-off-by: Jonathan Cameron Cc: Matthias Schiffer Cc: Lyude Paul Cc: Andrew Duggan Link: https://lore.kernel.org/r/20230114171620.42891-6-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit e2eaf9e0e10c8ce2b2740a89d1fab0649345e353 Author: Jonathan Cameron Date: Sat Jan 14 17:16:08 2023 +0000 Input: s6sy761 - switch to SYSTEM_SLEEP_/RUNTIME_PM_OPS() and pm_ptr() SET_SYSTEM_SLEEP_PM_OPS() and SET_RUNTIME_PM_OPS() are deprecated as they require explicit protection against unused function warnings. The new combination of pm_ptr() and SYSTEM_SLEEP_PM_OPS()/ RUNTIME_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Caleb Connolly Cc: Andi Shyti Tested-by: Caleb Connolly # oneplus-guacamole Link: https://lore.kernel.org/r/20230114171620.42891-5-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit c51283d76bcaa7bb94645b3917ef32d0e8187547 Author: Jonathan Cameron Date: Sat Jan 14 17:16:07 2023 +0000 Input: samsung-keypad - switch to pm_ptr() and SYSTEM_SLEEP/RUNTIME_PM_OPS() The SET_ variants are deprecated as they require explicit protection against unused function warnings. The new combination of pm_ptr() and SYSTEM_SLEEP/RUNTIME_DEV_PM_OPS() allow the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the #ifdef guards. Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20230114171620.42891-4-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit e04a088b6d970890e52f15a418a1b32894eb8ae1 Author: Jonathan Cameron Date: Sat Jan 14 17:16:06 2023 +0000 Input: axp20x-pek - switch to SYSTEM_SLEEP_PM_OPS() and pm_sleep_ptr() SET_SYSTEM_SLEEP_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and SYSTEM_SLEEP_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Here the additional .resume_noirq callback is protected with pm_sleep_ptr(). This isn't strictly necessary but is done for consistency with the other callbacks. Signed-off-by: Jonathan Cameron Cc: Hans de Goede Link: https://lore.kernel.org/r/20230114171620.42891-3-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 28bbeca2f627267f0c9a445525296b63a2ad73b4 Author: Jonathan Cameron Date: Sat Jan 14 17:16:05 2023 +0000 Input: cyapa - switch to SYSTEM_SLEEP/RUNTIME_PM_OPS() and pm_ptr() SET_SYSTEM_SLEEP_PM_OPS() and SET_RUNTIME_PM_OPS() are deprecated as they require explicit protection against unused function warnings. The new combination of pm_ptr() and SYSTEM_SLEEP_PM_OPS()/ RUNTIME_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20230114171620.42891-2-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 5d0f0e57ed900917836385527ce5b122fa1425a3 Author: Eric Biggers Date: Fri Jan 27 14:15:29 2023 -0800 fsverity: support verifying data from large folios Try to make fs/verity/verify.c aware of large folios. This includes making fsverity_verify_bio() support the case where the bio contains large folios, and adding a function fsverity_verify_folio() which is the equivalent of fsverity_verify_page(). There's no way to actually test this with large folios yet, but I've tested that this doesn't cause any regressions. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20230127221529.299560-1-ebiggers@kernel.org commit cdf657fc1f4c9758f86ae3adeb32ee68cbd90691 Author: Dave Airlie Date: Fri Jan 27 12:15:13 2023 +1000 amdgpu: fix build on non-DCN platforms. This fixes the build here locally on my 32-bit arm build. Signed-off-by: Dave Airlie (cherry picked from commit f439a959dcfb6b39d6fd4b85ca1110a1d1de1587) Signed-off-by: Alex Deucher commit dca36f7b3dd7eb574f0958484d3d21cfd8af2651 Author: Samuel Holland Date: Thu Jan 26 00:34:19 2023 -0600 riscv: dts: allwinner: d1: Add power controller node The Allwinner D1 family of SoCs contain a PPU power domain controller separate from the PRCM. It can power down the video engine and DSP, and it contains special logic for hardware-assisted CPU idle. Signed-off-by: Samuel Holland Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20230126063419.15971-4-samuel@sholland.org Signed-off-by: Jernej Skrabec commit 0e30ca5ab0a80fdc7f1055f63c1436dfdc4d317d Author: Samuel Holland Date: Thu Jan 26 00:34:18 2023 -0600 soc: sunxi: Add Allwinner D1 PPU driver The PPU contains a series of identical MMIO register ranges, one for each power domain. Each range contains control/status bits for a clock gate, reset line, output gates, and a power switch. (The clock and reset are separate from, and in addition to, the bits in the CCU.) It also contains a hardware power sequence engine to control the other bits. Acked-by: Jernej Skrabec Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20230126063419.15971-3-samuel@sholland.org Signed-off-by: Jernej Skrabec commit 84def5abbb5252681bb5aa7e3e253c37b75ed9e7 Author: Samuel Holland Date: Thu Jan 26 00:34:17 2023 -0600 dt-bindings: power: Add Allwinner D1 PPU The Allwinner D1 family of SoCs contain a PPU power domain controller separate from the PRCM. It can power down the video engine and DSP, and it contains special logic for hardware-assisted CPU idle. Other recent Allwinner SoCs (e.g. TV303) have a PPU with a different set of domains. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20230126063419.15971-2-samuel@sholland.org Signed-off-by: Jernej Skrabec commit eb20e7cb91ba3e5dbd94b6bfc8b9609bd5fd5770 Author: Samuel Holland Date: Wed Jan 25 22:57:38 2023 -0600 riscv: defconfig: Enable the Allwinner D1 platform and drivers Now that several D1-based boards are supported, enable the platform in our defconfig. Build in the drivers which are necessary to boot, such as the pinctrl, MMC, RTC (which provides critical clocks), SPI (for flash), and watchdog (which may be left enabled by the bootloader). Other common onboard peripherals are enabled as modules. Acked-by: Conor Dooley Acked-by: Palmer Dabbelt Reviewed-by: Guo Ren Reviewed-by: Heiko Stuebner Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20230126045738.47903-12-samuel@sholland.org Signed-off-by: Jernej Skrabec commit e4ce876f10a21fb4e550d1743468791021a430f5 Author: Grant Seltzer Date: Wed Jan 25 21:42:25 2023 -0500 libbpf: Add documentation to map pinning API functions This adds documentation for the following API functions: - bpf_map__set_pin_path() - bpf_map__pin_path() - bpf_map__is_pinned() - bpf_map__pin() - bpf_map__unpin() - bpf_object__pin_maps() - bpf_object__unpin_maps() Signed-off-by: Grant Seltzer Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230126024225.520685-1-grantseltzer@gmail.com commit 6f5178acf63614f2ee27450b2ab4d4980a698161 Author: Samuel Holland Date: Wed Jan 25 22:57:37 2023 -0600 riscv: Add the Allwinner SoC family Kconfig option Allwinner manufactures the sunxi family of application processors. This includes the "sun8i" series of ARMv7 SoCs, the "sun50i" series of ARMv8 SoCs, and now the "sun20i" series of 64-bit RISC-V SoCs. The first SoC in the sun20i series is D1, containing a single T-HEAD C906 core. D1s is a low-pin-count variant of D1 with co-packaged DRAM. Most peripherals are shared across the entire chip family. In fact, the ARMv7 T113 SoC is pin-compatible and almost entirely register-compatible with the D1s. This means many existing device drivers can be reused. To facilitate this reuse, name the symbol ARCH_SUNXI, since that is what the existing drivers have as their dependency. Acked-by: Conor Dooley Acked-by: Palmer Dabbelt Reviewed-by: Guo Ren Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20230126045738.47903-11-samuel@sholland.org Signed-off-by: Jernej Skrabec commit 139df64d26fd5bb83cd04b330f7a849eefa1a889 Author: Grant Seltzer Date: Wed Jan 25 21:47:49 2023 -0500 libbpf: Fix malformed documentation formatting This fixes the doxygen format documentation above the user_ring_buffer__* APIs. There has to be a newline before the @brief, otherwise doxygen won't render them for libbpf.readthedocs.org. Signed-off-by: Grant Seltzer Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230126024749.522278-1-grantseltzer@gmail.com commit 72cee3dbb4d975983a5f23571eb7ec0847c46cfd Author: Samuel Holland Date: Wed Jan 25 22:57:36 2023 -0600 riscv: dts: allwinner: Add Dongshan Nezha STU devicetree The 100ask Dongshan Nezha STU is a system-on-module that can be used standalone or with a carrier board. The SoM provides gigabit Ethernet, HDMI, a USB peripheral port, and WiFi/Bluetooth via an RTL8723DS chip. The "DIY" carrier board exposes almost every pin from the D1 SoC to 0.1" headers, but contains no digital circuitry, so it does not have its own devicetree. Acked-by: Jernej Skrabec Acked-by: Palmer Dabbelt Reviewed-by: Guo Ren Signed-off-by: Samuel Holland Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20230126045738.47903-10-samuel@sholland.org Signed-off-by: Jernej Skrabec commit 96a35ab9a8d4d651e8fe7adddbb5dd6889b0a0ea Author: Samuel Holland Date: Wed Jan 25 22:57:35 2023 -0600 riscv: dts: allwinner: Add MangoPi MQ Pro devicetree The MangoPi MQ Pro is a tiny SBC with a layout compatible to the Raspberry Pi Zero. It includes the Allwinner D1 SoC, 512M or 1G of DDR3, and an RTL8723DS-based WiFi/Bluetooth module. The board also exposes GPIO Port E via a connector on the end of the board, which can support either a camera or an RMII Ethernet PHY. The additional regulators supply that connector. Acked-by: Jernej Skrabec Acked-by: Palmer Dabbelt Reviewed-by: Guo Ren Signed-off-by: Samuel Holland Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20230126045738.47903-9-samuel@sholland.org Signed-off-by: Jernej Skrabec commit 7705ce5ab056fd44e6580d8044a0bf4612ae1e01 Author: Samuel Holland Date: Wed Jan 25 22:57:34 2023 -0600 riscv: dts: allwinner: Add Sipeed Lichee RV devicetrees Sipeed manufactures a "Lichee RV" system-on-module, which provides a minimal working system on its own, as well as a few carrier boards. The "Dock" board provides audio, USB, and WiFi. The "86 Panel" additionally provides 100M Ethernet and a built-in display panel. The 86 Panel repurposes the USB ID and VBUS detection GPIOs for its RGB panel interface, since the USB OTG port is inaccessible inside the case. Co-developed-by: Jisheng Zhang Signed-off-by: Jisheng Zhang Acked-by: Jernej Skrabec Acked-by: Palmer Dabbelt Signed-off-by: Samuel Holland Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20230126045738.47903-8-samuel@sholland.org Signed-off-by: Jernej Skrabec commit 88ea69891451be38c3cf78aa36090b49ca533da1 Author: Samuel Holland Date: Wed Jan 25 22:57:33 2023 -0600 riscv: dts: allwinner: Add Allwinner D1 Nezha devicetree "D1 Nezha" is Allwinner's first-party development board for the D1 SoC. It was shipped with 512M, 1G, or 2G of DDR3. It supports onboard audio, HDMI, gigabit Ethernet, WiFi and Bluetooth, USB 2.0 host and OTG ports, plus low-speed I/O from the SoC and a GPIO expander chip. Acked-by: Jernej Skrabec Acked-by: Palmer Dabbelt Reviewed-by: Guo Ren Reviewed-by: Heiko Stuebner Tested-by: Conor Dooley Tested-by: Heiko Stuebner Signed-off-by: Samuel Holland Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20230126045738.47903-7-samuel@sholland.org Signed-off-by: Jernej Skrabec commit 2a93adfb09e5075ddee3ab7b6f779b3b74739874 Author: Samuel Holland Date: Wed Jan 25 22:57:32 2023 -0600 riscv: dts: allwinner: Add MangoPi MQ devicetree The MangoPi MQ is a tiny SBC built around the Allwinner D1s. Its onboard peripherals include two USB Type-C ports (1 device, 1 host) and RTL8189FTV WLAN. A MangoPi MQ-R variant of the board also exists. The MQ-R has a different form factor, but the onboard peripherals are the same. Most D1 and D1s boards use a similar power tree, with the 1.8V rail powered by the SoC's internal LDOA, analog domains powered by ALDO, and the rest of the board powered by always-on fixed regulators. To avoid duplication, factor out the regulator information that is common across boards. The board also exposes GPIO Port E via a FPC connector, which can support either a camera or an RMII Ethernet PHY. The additional regulators supply that connector. Acked-by: Jernej Skrabec Acked-by: Palmer Dabbelt Reviewed-by: Guo Ren Signed-off-by: Samuel Holland Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20230126045738.47903-6-samuel@sholland.org Signed-off-by: Jernej Skrabec commit 077e5f4f5528777ab72f4dc336569207504dc876 Author: Samuel Holland Date: Wed Jan 25 22:57:31 2023 -0600 riscv: dts: allwinner: Add the D1/D1s SoC devicetree D1 (aka D1-H), D1s (aka F133), R528, and T113 are a family of SoCs based on a single die, or at a pair of dies derived from the same design. D1 and D1s contain a single T-HEAD Xuantie C906 CPU, whereas R528 and T113 contain a pair of Cortex-A7's. D1 and R528 are the full version of the chip with a BGA package, whereas D1s and T113 are low-pin-count QFP variants. Because the original design supported both ARM and RISC-V CPUs, some peripherals are duplicated. In addition, all variants except D1s contain a HiFi 4 DSP with its own set of peripherals. The devicetrees are organized to minimize duplication: - Common perhiperals are described in sunxi-d1s-t113.dtsi - DSP-related peripherals are described in sunxi-d1-t113.dtsi - RISC-V specific hardware is described in sun20i-d1s.dtsi - Functionality unique to the D1 variant is described in sun20i-d1.dtsi The SOC_PERIPHERAL_IRQ macro handles the different #interrupt-cells values between the ARM (GIC) and RISC-V (PLIC) versions of the SoC. Acked-by: Jernej Skrabec Acked-by: Palmer Dabbelt Reviewed-by: Andre Przywara Reviewed-by: Conor Dooley Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner Signed-off-by: Samuel Holland Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20230126045738.47903-5-samuel@sholland.org Signed-off-by: Jernej Skrabec commit a0097fec3be61a816325173b425bba64d302bb39 Author: Samuel Holland Date: Wed Jan 25 22:57:30 2023 -0600 dt-bindings: riscv: Add Allwinner D1/D1s board compatibles Several SoMs and boards are available that feature the Allwinner D1 or D1s SoC. Document their compatible strings. Acked-by: Palmer Dabbelt Acked-by: Rob Herring Reviewed-by: Conor Dooley Reviewed-by: Guo Ren Reviewed-by: Heiko Stuebner Signed-off-by: Samuel Holland Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20230126045738.47903-4-samuel@sholland.org Signed-off-by: Jernej Skrabec commit 2fca4a33254eaaea08ec1df1ace5ce50a50de040 Author: Samuel Holland Date: Wed Jan 25 22:57:29 2023 -0600 dt-bindings: vendor-prefixes: Add Allwinner D1/D1s board vendors Some boards using the Allwinner D1 or D1s SoC are made by vendors not previously documented. Clockwork Tech LLC (https://www.clockworkpi.com/) manufactures the ClockworkPi and DevTerm boards. Beijing Widora Technology Co., Ltd. (https://mangopi.cc/) manufactures the MangoPi family of boards. Acked-by: Palmer Dabbelt Acked-by: Rob Herring Reviewed-by: Guo Ren Reviewed-by: Heiko Stuebner Signed-off-by: Samuel Holland Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20230126045738.47903-3-samuel@sholland.org Signed-off-by: Jernej Skrabec commit 46b8bb9ae32e12b8ad8427279d764bf32a637440 Author: Samuel Holland Date: Wed Jan 25 22:57:28 2023 -0600 MAINTAINERS: Match the sun20i family of Allwinner SoCs Allwinner sunxi SoCs with a RISC-V CPU use the sun20i designator. Match that pattern in addition to the designators for 32 and 64-bit ARM SoCs. Acked-by: Jernej Skrabec Reviewed-by: Guo Ren Reviewed-by: Heiko Stuebner Signed-off-by: Samuel Holland Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20230126045738.47903-2-samuel@sholland.org Signed-off-by: Jernej Skrabec commit 623c0751336e4035ab0047f2c152a02bd26b612b Author: Robert Richter Date: Thu Jan 19 10:49:34 2023 +0100 cxl/mbox: Fix Payload Length check for Get Log command Commit 2aeaf663b85e introduced strict checking for variable length payload size validation. The payload length of received data must match the size of the requested data by the caller except for the case where the min_out value is set. The Get Log command does not have a header with a length field set. The Log size is determined by the Get Supported Logs command (CXL 3.0, 8.2.9.5.1). However, the actual size can be smaller and the number of valid bytes in the payload output must be determined reading the Payload Length field (CXL 3.0, Table 8-36, Note 2). Two issues arise: The command can successfully complete with a payload length of zero. And, the valid payload length must then also be consumed by the caller. Change cxl_xfer_log() to pass the number of payload bytes back to the caller to determine the number of log entries. Implement the payload handling as a special case where mbox_cmd->size_out is consulted when cxl_internal_send_cmd() returns -EIO. A WARN_ONCE() is added to check that -EIO is only returned in case of an unexpected output size. Logs can be bigger than the maximum payload length and multiple Get Log commands can be issued. If the received payload size is smaller than the maximum payload size we can assume all valid bytes have been fetched. Stop sending further Get Log commands then. On that occasion, change debug messages to also report the opcodes of supported commands. The variable payload commands GET_LSA and SET_LSA are not affected by this strict check: SET_LSA cannot be broken because SET_LSA does not return an output payload, and GET_LSA never expects short reads. Fixes: 2aeaf663b85e ("cxl/mbox: Add variable output size validation for internal commands") Signed-off-by: Robert Richter Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20230119094934.86067-1-rrichter@amd.com Signed-off-by: Dan Williams commit beabd511e657d0b95fca1d02950083a77572debe Author: Andre Przywara Date: Fri Jan 20 01:26:16 2023 +0000 ARM: dts: sun8i: a83t: bananapi-m3: describe SATA disk regulator The Bananapi-M3 has a SATA connector, driven by a USB-to-SATA bridge soldered on the board. The power for the SATA device is provided by a GPIO controlled regulator. Since the SATA device is behind USB, it has no DT node, so we never described this regulator. Instead U-Boot was turning this on in a rather hackish way, which we now want to get rid of. On top of that it seems fragile to leave this GPIO undescribed, as userland could claim it and turn the disk off. Add a fixed regulator, controlled by the PD25 GPIO, and mark it as always-on. This would mimic the current situation, but in a safer way, and would allow U-Boot to drop the CONFIG_SATAPWR enable hack. Signed-off-by: Andre Przywara Acked-by: Samuel Holland Link: https://lore.kernel.org/r/20230120012616.30960-1-andre.przywara@arm.com Signed-off-by: Jernej Skrabec commit 2177d4ae971f79b4a9a3c411f2fb8ae6113d1430 Author: Samuel Holland Date: Sat Dec 31 16:58:54 2022 -0600 ARM: dts: sun8i: nanopi-duo2: Fix regulator GPIO reference The property named in the schema is 'enable-gpios', not 'enable-gpio'. This makes no difference at runtime, because the regulator is marked as always-on, but it breaks validation. Fixes: 4701fc6e5dd9 ("ARM: dts: sun8i: add FriendlyARM NanoPi Duo2") Reviewed-by: Andre Przywara Acked-by: Jernej Skrabec Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20221231225854.16320-2-samuel@sholland.org Signed-off-by: Jernej Skrabec commit a5978fb368cacf1fc8d2780624d01cd0123c0f89 Author: Samuel Holland Date: Sat Dec 31 16:58:53 2022 -0600 ARM: dts: sunxi: Fix GPIO LED node names These board devicetrees fail to validate because the gpio-leds schema requires its child nodes to have "led" in the node name. Signed-off-by: Samuel Holland Reviewed-by: Jernej Skrabec Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/20221231225854.16320-1-samuel@sholland.org Signed-off-by: Jernej Skrabec commit 04961fbe8e17d30d08fc884d39dd06cdc95a22bd Author: Krzysztof Kozlowski Date: Sun Dec 4 19:33:41 2022 +0100 ARM: dts: sun8i: h3-beelink-x2: align HDMI CEC node names with dtschema The bindings expect "cec" for HDMI CEC node. Signed-off-by: Krzysztof Kozlowski Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20221204183341.139946-1-krzysztof.kozlowski@linaro.org Signed-off-by: Jernej Skrabec commit 862ee64b3a4e765a61cf4b140067fce639523ef6 Author: Samuel Holland Date: Sun Nov 13 20:21:08 2022 -0600 arm64: dts: allwinner: a64: Add DPHY interrupt The DPHY has an interrupt line which is shared with the DSI controller. Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20221114022113.31694-4-samuel@sholland.org Signed-off-by: Jernej Skrabec commit 6c462d7f2e7e73b000907310190671e4ccd5fbf2 Author: Samuel Holland Date: Sun Nov 13 20:21:07 2022 -0600 ARM: dts: sun8i: a33: Add DPHY interrupt The DPHY has an interrupt line which is shared with the DSI controller. Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20221114022113.31694-3-samuel@sholland.org Signed-off-by: Jernej Skrabec commit 65b07ecfaba9b6521b3b3e2fd247631a4d06a829 Merge: ce45dff1370ea bd176e46e9c23 Author: Stephen Boyd Date: Fri Jan 27 13:05:33 2023 -0800 Merge tag 'renesas-clk-for-v6.3-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-renesas Pull more Renesas clk driver updates from Geert Uytterhoeven: - Add support for USB host/device configuration on RZ/N1 - Add PLL2 programming support, and CAN-FD clocks on R-Car V4H - Miscellaneous fixes and improvements * tag 'renesas-clk-for-v6.3-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: r8a779g0: Add CAN-FD clocks clk: renesas: r8a779g0: Tidy up DMAC name on SYS-DMAC clk: renesas: r8a779a0: Tidy up DMAC name on SYS-DMAC clk: renesas: r8a779g0: Add custom clock for PLL2 clk: renesas: cpg-mssr: Remove superfluous check in resume code clk: renesas: r9a06g032: Handle h2mode setting based on USBF presence commit 583ebae783b8241a30581c084ad6226051b594c5 Author: John Harrison Date: Thu Jan 26 16:28:42 2023 -0800 drm/i915/guc: Rename GuC register state capture node to be more obvious The GuC specific register state entry in the error capture object was just called 'capture'. Although the companion 'node' entry was called 'guc_capture_node'. Rename the base entry to be 'guc_capture' instead so that it is a) more consistent and b) more obvious what it is. Signed-off-by: John Harrison Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20230127002842.3169194-9-John.C.Harrison@Intel.com commit e9823f0fc375b87a461faaaeea886491660b3083 Author: John Harrison Date: Thu Jan 26 16:28:41 2023 -0800 drm/i915/guc: Add a debug print on GuC triggered reset For understanding bug reports, it can be useful to have an explicit dmesg print when a reset notification is received from GuC. As opposed to simply inferring that this happened from other messages. Signed-off-by: John Harrison Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20230127002842.3169194-8-John.C.Harrison@Intel.com commit d907852d29d3665f94096c6cfed39429dad39ee2 Author: John Harrison Date: Thu Jan 26 16:28:40 2023 -0800 drm/i915/guc: Look for a guilty context when an engine reset fails Engine resets are supposed to never fail. But in the case when one does (due to unknown reasons that normally come down to a missing w/a), it is useful to get as much information out of the system as possible. Given that the GuC intentionally dies on such a situation, it is not possible to get a guilty context notification back. So do a manual search instead. Given that GuC is dead, this is safe because GuC won't be changing the engine state asynchronously. v2: Change comment to be less alarming (Tvrtko) Signed-off-by: John Harrison Acked-by: Tvrtko Ursulin Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20230127002842.3169194-7-John.C.Harrison@Intel.com commit e7696d652102dd5ac2681d69da2004925d6a6b30 Author: John Harrison Date: Thu Jan 26 16:28:39 2023 -0800 drm/i915: Allow error capture of a pending request A hang situation has been observed where the only requests on the context were either completed or not yet started according to the breaadcrumbs. However, the register state claimed a batch was (maybe) in progress. So, allow capture of the pending request on the grounds that this might be better than nothing. v2: Reword 'not started' warning message (Tvrtko) Signed-off-by: John Harrison Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20230127002842.3169194-6-John.C.Harrison@Intel.com commit e8a3319c31a14aa9925418bc7813c2866903b2c6 Author: John Harrison Date: Thu Jan 26 16:28:38 2023 -0800 drm/i915: Allow error capture without a request There was a report of error captures occurring without any hung context being indicated despite the capture being initiated by a 'hung context notification' from GuC. The problem was not reproducible. However, it is possible to happen if the context in question has no active requests. For example, if the hang was in the context switch itself then the breadcrumb write would have occurred and the KMD would see an idle context. In the interests of attempting to provide as much information as possible about a hang, it seems wise to include the engine info regardless of whether a request was found or not. As opposed to just prentending there was no hang at all. So update the error capture code to always record engine information if a context is given. Which means updating record_context() to take a context instead of a request (which it only ever used to find the context anyway). And split the request agnostic parts of intel_engine_coredump_add_request() out into a seaprate function. v2: Remove a duplicate 'if' statement (Umesh) and fix a put of a null pointer. v3: Tidy up request locking code flow (Tvrtko) v4: Pull in improved info message from next patch and fix up potential leak of GuC register state (Daniele) Signed-off-by: John Harrison Reviewed-by: Umesh Nerlige Ramappa (v2) Reviewed-by: Daniele Ceraolo Spurio Acked-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20230127002842.3169194-5-John.C.Harrison@Intel.com commit a4be3dca53172d9d2091e4b474fb795c81ed3d6c Author: John Harrison Date: Thu Jan 26 16:28:37 2023 -0800 drm/i915: Fix up locking around dumping requests lists The debugfs dump of requests was confused about what state requires the execlist lock versus the GuC lock. There was also a bunch of duplicated messy code between it and the error capture code. So refactor the hung request search into a re-usable function. And reduce the span of the execlist state lock to only the execlist specific code paths. In order to do that, also move the report of hold count (which is an execlist only concept) from the top level dump function to the lower level execlist specific function. Also, move the execlist specific code into the execlist source file. v2: Rename some functions and move to more appropriate files (Daniele). v3: Rename new execlist dump function (Daniele) Fixes: dc0dad365c5e ("drm/i915/guc: Fix for error capture after full GPU reset with GuC") Signed-off-by: John Harrison Reviewed-by: Daniele Ceraolo Spurio Acked-by: Tvrtko Ursulin Cc: Matthew Brost Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Matt Roper Cc: Umesh Nerlige Ramappa Cc: Michael Cheng Cc: Lucas De Marchi Cc: Bruce Chang Cc: Alan Previn Cc: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20230127002842.3169194-4-John.C.Harrison@Intel.com commit 3700e353781e27f1bc7222f51f2cc36cbeb9b4ec Author: John Harrison Date: Thu Jan 26 16:28:36 2023 -0800 drm/i915: Fix request ref counting during error capture & debugfs dump When GuC support was added to error capture, the reference counting around the request object was broken. Fix it up. The context based search manages the spinlocking around the search internally. So it needs to grab the reference count internally as well. The execlist only request based search relies on external locking, so it needs an external reference count but within the spinlock not outside it. The only other caller of the context based search is the code for dumping engine state to debugfs. That code wasn't previously getting an explicit reference at all as it does everything while holding the execlist specific spinlock. So, that needs updaing as well as that spinlock doesn't help when using GuC submission. Rather than trying to conditionally get/put depending on submission model, just change it to always do the get/put. v2: Explicitly document adding an extra blank line in some dense code (Andy Shevchenko). Fix multiple potential null pointer derefs in case of no request found (some spotted by Tvrtko, but there was more!). Also fix a leaked request in case of !started and another in __guc_reset_context now that intel_context_find_active_request is actually reference counting the returned request. v3: Add a _get suffix to intel_context_find_active_request now that it grabs a reference (Daniele). v4: Split the intel_guc_find_hung_context change to a separate patch and rename intel_context_find_active_request_get to intel_context_get_active_request (Tvrtko). v5: s/locking/reference counting/ in commit message (Tvrtko) Fixes: dc0dad365c5e ("drm/i915/guc: Fix for error capture after full GPU reset with GuC") Fixes: 573ba126aef3 ("drm/i915/guc: Capture error state on context reset") Signed-off-by: John Harrison Reviewed-by: Daniele Ceraolo Spurio Acked-by: Tvrtko Ursulin Cc: Matthew Brost Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Andrzej Hajda Cc: Matthew Auld Cc: Matt Roper Cc: Umesh Nerlige Ramappa Cc: Michael Cheng Cc: Lucas De Marchi Cc: Tejas Upadhyay Cc: Andy Shevchenko Cc: Aravind Iddamsetty Cc: Alan Previn Cc: Bruce Chang Link: https://patchwork.freedesktop.org/patch/msgid/20230127002842.3169194-3-John.C.Harrison@Intel.com commit d1c3717501bcf56536e8b8c1bdaf5cd5357f6bb2 Author: John Harrison Date: Thu Jan 26 16:28:35 2023 -0800 drm/i915/guc: Fix locking when searching for a hung request intel_guc_find_hung_context() was not acquiring the correct spinlock before searching the request list. So fix that up. While at it, add some extra whitespace padding for readability. Fixes: dc0dad365c5e ("drm/i915/guc: Fix for error capture after full GPU reset with GuC") Signed-off-by: John Harrison Reviewed-by: Daniele Ceraolo Spurio Acked-by: Tvrtko Ursulin Cc: Matthew Brost Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Matt Roper Cc: Umesh Nerlige Ramappa Cc: Michael Cheng Cc: Lucas De Marchi Cc: Tejas Upadhyay Cc: Chris Wilson Cc: Bruce Chang Cc: Alan Previn Cc: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20230127002842.3169194-2-John.C.Harrison@Intel.com commit a8c55407a7230798eb157ed2cf5398a6a2b123b6 Author: Andy Shevchenko Date: Fri Jan 27 17:51:35 2023 +0200 lib/string: Use strchr() in strpbrk() Use strchr() instead of open coding it as it's done elsewhere in the same file. Either we will have similar to what it was or possibly better performance in case architecture implements its own strchr(). Memory wise on x86_64 bloat-o-meter shows the following Function old new delta strsep 111 102 -9 Total: Before=2763, After=2754, chg -0.33% Signed-off-by: Andy Shevchenko Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20230127155135.27153-1-andriy.shevchenko@linux.intel.com commit aa85923a954e7704bc9d3847dabeb8540aa98d13 Author: Kees Cook Date: Thu Jan 5 20:19:48 2023 -0800 crypto: hisilicon: Wipe entire pool on error To work around a Clang __builtin_object_size bug that shows up under CONFIG_FORTIFY_SOURCE and UBSAN_BOUNDS, move the per-loop-iteration mem_block wipe into a single wipe of the entire pool structure after the loop. Reported-by: Nathan Chancellor Link: https://github.com/ClangBuiltLinux/linux/issues/1780 Cc: Weili Qian Cc: Zhou Wang Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Signed-off-by: Kees Cook Tested-by: Nathan Chancellor # build Link: https://lore.kernel.org/r/20230106041945.never.831-kees@kernel.org commit 8500689095a39a8c245ba62709f5e8735668e535 Author: Kees Cook Date: Thu Jan 5 15:46:01 2023 -0800 net/i40e: Replace 0-length array with flexible array Zero-length arrays are deprecated[1]. Replace struct i40e_lump_tracking's "list" 0-length array with a flexible array. Detected with GCC 13, using -fstrict-flex-arrays=3: In function 'i40e_put_lump', inlined from 'i40e_clear_interrupt_scheme' at drivers/net/ethernet/intel/i40e/i40e_main.c:5145:2: drivers/net/ethernet/intel/i40e/i40e_main.c:278:27: warning: array subscript is outside array bounds of 'u16[0]' {aka 'short unsigned int[]'} [-Warray-bounds=] 278 | pile->list[i] = 0; | ~~~~~~~~~~^~~ drivers/net/ethernet/intel/i40e/i40e.h: In function 'i40e_clear_interrupt_scheme': drivers/net/ethernet/intel/i40e/i40e.h:179:13: note: while referencing 'list' 179 | u16 list[0]; | ^~~~ [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays Cc: Jesse Brandeburg Cc: Tony Nguyen Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: "Gustavo A. R. Silva" Cc: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Jiri Pirko Tested-by: Gurucharan G (A Contingent worker at Intel) Reviewed-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20230105234557.never.799-kees@kernel.org commit 36632d062975a9ff4410c90dd6d37922b68d0920 Author: Kees Cook Date: Thu Jan 5 11:05:11 2023 -0800 io_uring: Replace 0-length array with flexible array Zero-length arrays are deprecated[1]. Replace struct io_uring_buf_ring's "bufs" with a flexible array member. (How is the size of this array verified?) Detected with GCC 13, using -fstrict-flex-arrays=3: In function 'io_ring_buffer_select', inlined from 'io_buffer_select' at io_uring/kbuf.c:183:10: io_uring/kbuf.c:141:23: warning: array subscript 255 is outside the bounds of an interior zero-length array 'struct io_uring_buf[0]' [-Wzero-length-bounds] 141 | buf = &br->bufs[head]; | ^~~~~~~~~~~~~~~ In file included from include/linux/io_uring.h:7, from io_uring/kbuf.c:10: include/uapi/linux/io_uring.h: In function 'io_buffer_select': include/uapi/linux/io_uring.h:628:41: note: while referencing 'bufs' 628 | struct io_uring_buf bufs[0]; | ^~~~ [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays Fixes: c7fb19428d67 ("io_uring: add support for ring mapped supplied buffers") Cc: Jens Axboe Cc: Pavel Begunkov Cc: "Gustavo A. R. Silva" Cc: stable@vger.kernel.org Cc: io-uring@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20230105190507.gonna.131-kees@kernel.org commit 118901ad1f25d2334255b3d50512fa20591531cd Author: Kees Cook Date: Wed Jan 4 13:09:12 2023 -0800 ext4: Fix function prototype mismatch for ext4_feat_ktype 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. ext4_feat_ktype was setting the "release" handler to "kfree", which doesn't have a matching function prototype. Add a simple wrapper with the correct prototype. This was found as a result of Clang's new -Wcast-function-type-strict flag, which is more sensitive than the simpler -Wcast-function-type, which only checks for type width mismatches. Note that this code is only reached when ext4 is a loadable module and it is being unloaded: CFI failure at kobject_put+0xbb/0x1b0 (target: kfree+0x0/0x180; expected type: 0x7c4aa698) ... RIP: 0010:kobject_put+0xbb/0x1b0 ... Call Trace: ext4_exit_sysfs+0x14/0x60 [ext4] cleanup_module+0x67/0xedb [ext4] Fixes: b99fee58a20a ("ext4: create ext4_feat kobject dynamically") Cc: Theodore Ts'o Cc: Eric Biggers Cc: stable@vger.kernel.org Build-tested-by: Gustavo A. R. Silva Reviewed-by: Gustavo A. R. Silva Reviewed-by: Nathan Chancellor Link: https://lore.kernel.org/r/20230103234616.never.915-kees@kernel.org Signed-off-by: Kees Cook Reviewed-by: Eric Biggers Link: https://lore.kernel.org/r/20230104210908.gonna.388-kees@kernel.org commit 16a738f2f6b31f9edf0691e0f357539f7ac66662 Author: Paulo Miguel Almeida Date: Tue Dec 20 16:41:15 2022 +1300 i915/gvt: 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 gvt_firmware_header and refactor the rest of the code accordingly. Additionally, previous implementation was allocating 8 bytes more than required to represent firmware_header + cfg_space data + mmio data. 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]. To make reviewing this patch easier, I'm pasting before/after struct sizes. pahole -C gvt_firmware_header before/drivers/gpu/drm/i915/gvt/firmware.o struct gvt_firmware_header { u64 magic; /* 0 8 */ u32 crc32; /* 8 4 */ u32 version; /* 12 4 */ u64 cfg_space_size; /* 16 8 */ u64 cfg_space_offset; /* 24 8 */ u64 mmio_size; /* 32 8 */ u64 mmio_offset; /* 40 8 */ unsigned char data[1]; /* 48 1 */ /* size: 56, cachelines: 1, members: 8 */ /* padding: 7 */ /* last cacheline: 56 bytes */ }; pahole -C gvt_firmware_header after/drivers/gpu/drm/i915/gvt/firmware.o struct gvt_firmware_header { u64 magic; /* 0 8 */ u32 crc32; /* 8 4 */ u32 version; /* 12 4 */ u64 cfg_space_size; /* 16 8 */ u64 cfg_space_offset; /* 24 8 */ u64 mmio_size; /* 32 8 */ u64 mmio_offset; /* 40 8 */ unsigned char data[]; /* 48 0 */ /* size: 48, cachelines: 1, members: 8 */ /* last cacheline: 48 bytes */ }; As you can see the additional byte of the fake-flexible array (data[1]) forced the compiler to pad the struct but those bytes aren't actually used as first & last bytes (of both cfg_space and mmio) are controlled by the <>_size and <>_offset members present in the gvt_firmware_header struct. Link: https://github.com/KSPP/linux/issues/79 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 [1] Signed-off-by: Paulo Miguel Almeida Reviewed-by: Zhenyu Wang Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/Y6Eu2604cqtryP4g@mail.google.com commit 4076ea2419cf15bc1e1580f8b24ddf675fbdb02c Author: Kees Cook Date: Sun Nov 27 10:30:41 2022 -0800 drm/nouveau/disp: Fix nvif_outp_acquire_dp() argument size Both Coverity and GCC with -Wstringop-overflow noticed that nvif_outp_acquire_dp() accidentally defined its second argument with 1 additional element: drivers/gpu/drm/nouveau/dispnv50/disp.c: In function 'nv50_pior_atomic_enable': drivers/gpu/drm/nouveau/dispnv50/disp.c:1813:17: error: 'nvif_outp_acquire_dp' accessing 16 bytes in a region of size 15 [-Werror=stringop-overflow=] 1813 | nvif_outp_acquire_dp(&nv_encoder->outp, nv_encoder->dp.dpcd, 0, 0, false, false); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/nouveau/dispnv50/disp.c:1813:17: note: referencing argument 2 of type 'u8[16]' {aka 'unsigned char[16]'} drivers/gpu/drm/nouveau/include/nvif/outp.h:24:5: note: in a call to function 'nvif_outp_acquire_dp' 24 | int nvif_outp_acquire_dp(struct nvif_outp *, u8 dpcd[16], | ^~~~~~~~~~~~~~~~~~~~ Avoid these warnings by defining the argument size using the matching define (DP_RECEIVER_CAP_SIZE, 15) instead of having it be a literal (and incorrect) value (16). Reported-by: coverity-bot Addresses-Coverity-ID: 1527269 ("Memory - corruptions") Addresses-Coverity-ID: 1527268 ("Memory - corruptions") Link: https://lore.kernel.org/lkml/202211100848.FFBA2432@keescook/ Link: https://lore.kernel.org/lkml/202211100848.F4C2819BB@keescook/ Fixes: 813443721331 ("drm/nouveau/disp: move DP link config into acquire") Reviewed-by: Lyude Paul Cc: Ben Skeggs 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 Link: https://lore.kernel.org/r/20221127183036.never.139-kees@kernel.org commit 22e06e682537193a426ef13e57c34d52c45c5581 Author: Ian Rogers Date: Fri Jan 20 10:58:28 2023 -0800 perf buildid: Avoid copy of uninitialized memory build_id__init() only copies the buildid data up to size leaving the rest of the data array uninitialized. Copying the full array during synthesis means the written event contains uninitialized memory. Ensure the size is less that the buffer size and only copy the bytes that were initialized. This was detected by the Clang/LLVM memory sanitizer. v2. Avoids the potential for copying too much as suggested by Arnaldo. Suggested-by: Arnaldo Carvalho de Melo Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Tom Rix Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230120185828.43231-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 86569c0ab166abdd268032a25ecd369cf0959d2b Author: James Clark Date: Tue Jan 24 14:59:29 2023 +0000 perf mem/c2c: Document that SPE is used for mem and c2c on ARM Setup is non-trivial so also link to the full SPE docs. Signed-off-by: James Clark Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-perf-users@vger.kernel.or Link: https://lore.kernel.org/r/20230124145929.557891-1-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 6bc75b4c9042325e62fe43f73161b17b5687be6c Author: James Clark Date: Tue Jan 24 11:02:20 2023 +0000 perf cs-etm: Improve missing sink warning message Make the sink error message more similar to the event error message that reminds about missing kernel support. The available sinks are also determined by the hardware so mention that too. Also, usually it's not necessary to specify the sink, so add that as a hint. Now the error for a made up sink looks like this: $ perf record -e cs_etm/@abc/ Couldn't find sink "abc" on event cs_etm/@abc/. Missing kernel or device support? Hint: An appropriate sink will be picked automatically if one isn't is specified. For any error other than ENOENT, the same message as before is displayed. Signed-off-by: James Clark Acked-by: Suzuki Poulouse Suggested-by: Arnaldo Carvalho de Melo Link: https://lore.kernel.org/r/ec7502e6-b406-3997-c2a5-24f98e5c4854@arm.com Cc: Alexander Shishkin 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: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230124110220.460551-1-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 0b58d89b1e7ca46ca4f7457a6aacb2ce6ce75051 Author: Arnaldo Carvalho de Melo Date: Mon Jan 23 14:49:18 2023 -0300 perf tools: Add Ian Rogers to MAINTAINERS as a reviewer Ian has been reviewing perf tooling patches consistently for a long time, so lets reflect that in the MAINTAINERS file so that contributors add him to the CC list in patch submissions. Reviewed-by: Ian Rogers Acked-by: Ingo Molnar Acked-by: Jiri Olsa Acked-by: Namhyung Kim Acked-by: Peter Zijlstra Signed-off-by: Arnaldo Carvalho de Melo commit 8677e555f17f51321d0730b945aeb7d4b95f998f Author: Jeff Xu Date: Sat Jan 14 02:03:06 2023 +0000 selftests/landlock: Test ptrace as much as possible with Yama Update ptrace tests according to all potential Yama security policies. This is required to make such tests pass even if Yama is enabled. Tests are not skipped but they now check both Landlock and Yama boundary restrictions at run time to keep a maximum test coverage (i.e. positive and negative testing). Signed-off-by: Jeff Xu Link: https://lore.kernel.org/r/20230114020306.1407195-2-jeffxu@google.com Cc: stable@vger.kernel.org [mic: Add curly braces around EXPECT_EQ() to make it build, and improve commit message] Co-developed-by: Mickaël Salaün Signed-off-by: Mickaël Salaün commit a873bb493fb192abf7696f84ec4496c5c49a483d Author: Mark Rutland Date: Fri Jan 27 12:12:56 2023 +0000 arm64: traps: attempt to dump all instructions Currently dump_kernel_instr() dumps a few instructions around the pt_regs::pc value, dumping 4 instructions before the PC before dumping the instruction at the PC. If an attempt to read an instruction fails, it gives up and does not attempt to dump any subsequent instructions. This is unfortunate when the pt_regs::pc value points to the start of a page with a leading guard page, where the instruction at the PC can be read, but prior instructions cannot. This patch makes dump_kernel_instr() attempt to dump each instruction regardless of whether reading a prior instruction could be read, which gives a more useful code dump in such cases. When an instruction cannot be read, it is reported as "????????", which cannot be confused with a hex value, For example, with a `UDF #0` (AKA 0x00000000) early in the kexec control page, we'll now get the following code dump: | Internal error: Oops - Undefined instruction: 0000000002000000 [#1] SMP | Modules linked in: | CPU: 0 PID: 261 Comm: kexec Not tainted 6.2.0-rc5+ #26 | Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015 | pstate: 604003c5 (nZCv DAIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) | pc : 0x48c00000 | lr : machine_kexec+0x190/0x200 | sp : ffff80000d36ba80 | x29: ffff80000d36ba80 x28: ffff000002dfc380 x27: 0000000000000000 | x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000 | x23: ffff80000a9f7858 x22: 000000004c460000 x21: 0000000000000010 | x20: 00000000ad821000 x19: ffff000000aa0000 x18: 0000000000000006 | x17: ffff8000758a2000 x16: ffff800008000000 x15: ffff80000d36b568 | x14: 0000000000000000 x13: ffff80000d36b707 x12: ffff80000a9bf6e0 | x11: 00000000ffffdfff x10: ffff80000aaaf8e0 x9 : ffff80000815eff8 | x8 : 000000000002ffe8 x7 : c0000000ffffdfff x6 : 00000000000affa8 | x5 : 0000000000001fff x4 : 0000000000000001 x3 : ffff80000a263008 | x2 : ffff80000a9e20f8 x1 : 0000000048c00000 x0 : ffff000000aa0000 | Call trace: | 0x48c00000 | kernel_kexec+0x88/0x138 | __do_sys_reboot+0x108/0x288 | __arm64_sys_reboot+0x2c/0x40 | invoke_syscall+0x78/0x140 | el0_svc_common.constprop.0+0x4c/0x100 | do_el0_svc+0x34/0x80 | el0_svc+0x34/0x140 | el0t_64_sync_handler+0xf4/0x140 | el0t_64_sync+0x194/0x1c0 | Code: ???????? ???????? ???????? ???????? (00000000) | ---[ end trace 0000000000000000 ]--- | Kernel panic - not syncing: Oops - Undefined instruction: Fatal exception | Kernel Offset: disabled | CPU features: 0x002000,00050108,c8004203 | Memory Limit: none Signed-off-by: Mark Rutland Cc: Ard Biesheuvel Cc: James Morse Cc: Will Deacon Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20230127121256.2141368-1-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 8de62af018cc9262649d7688f7eb1409b2d8f594 Author: Kirill A. Shutemov Date: Fri Jan 27 01:11:59 2023 +0300 x86/tdx: Disable NOTIFY_ENABLES == Background == There is a class of side-channel attacks against SGX enclaves called "SGX Step"[1]. These attacks create lots of exceptions inside of enclaves. Basically, run an in-enclave instruction, cause an exception. Over and over. There is a concern that a VMM could attack a TDX guest in the same way by causing lots of #VE's. The TDX architecture includes new countermeasures for these attacks. It basically counts the number of exceptions and can send another *special* exception once the number of VMM-induced #VE's hits a critical threshold[2]. == Problem == But, these special exceptions are independent of any action that the guest takes. They can occur anywhere that the guest executes. This includes sensitive areas like the entry code. The (non-paranoid) #VE handler is incapable of handling exceptions in these areas. == Solution == Fortunately, the special exceptions can be disabled by the guest via write to NOTIFY_ENABLES TDCS field. NOTIFY_ENABLES is disabled by default, but might be enabled by a bootloader, firmware or an earlier kernel before the current kernel runs. Disable NOTIFY_ENABLES feature explicitly and unconditionally. Any NOTIFY_ENABLES-based #VE's that occur before this point will end up in the early #VE exception handler and die due to unexpected exit reason. [1] https://github.com/jovanbulck/sgx-step [2] https://intel.github.io/ccc-linux-guest-hardening-docs/security-spec.html#safety-against-ve-in-kernel-code Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Reviewed-by: Dave Hansen Link: https://lore.kernel.org/all/20230126221159.8635-8-kirill.shutemov%40linux.intel.com commit 47e67cf317ed6ad22a3df9762daae75dfcba76a8 Author: Kirill A. Shutemov Date: Fri Jan 27 01:11:58 2023 +0300 x86/tdx: Relax SEPT_VE_DISABLE check for debug TD A "SEPT #VE" occurs when a TDX guest touches memory that is not properly mapped into the "secure EPT". This can be the result of hypervisor attacks or bugs, *OR* guest bugs. Most notably, buggy guests might touch unaccepted memory for lots of different memory safety bugs like buffer overflows. TDX guests do not want to continue in the face of hypervisor attacks or hypervisor bugs. They want to terminate as fast and safely as possible. SEPT_VE_DISABLE ensures that TDX guests *can't* continue in the face of these kinds of issues. But, that causes a problem. TDX guests that can't continue can't spit out oopses or other debugging info. In essence SEPT_VE_DISABLE=1 guests are not debuggable. Relax the SEPT_VE_DISABLE check to warning on debug TD and panic() in the #VE handler on EPT-violation on private memory. It will produce useful backtrace. Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20230126221159.8635-7-kirill.shutemov%40linux.intel.com commit 71acdcd7cd0abee7698c2d5e5a8a66602a00b12c Author: Kirill A. Shutemov Date: Fri Jan 27 01:11:57 2023 +0300 x86/tdx: Use ReportFatalError to report missing SEPT_VE_DISABLE Linux TDX guests require that the SEPT_VE_DISABLE "attribute" be set. If it is not set, the kernel is theoretically required to handle exceptions anywhere that kernel memory is accessed, including places like NMI handlers and in the syscall entry gap. Rather than even try to handle these exceptions, the kernel refuses to run if SEPT_VE_DISABLE is unset. However, the SEPT_VE_DISABLE detection and refusal code happens very early in boot, even before earlyprintk runs. Calling panic() will effectively just hang the system. Instead, call a TDX-specific panic() function. This makes a very simple TDVMCALL which gets a short error string out to the hypervisor without any console infrastructure. Use TDG.VP.VMCALL to report the error. The hypercall can encode message up to 64 bytes in eight registers. [ dhansen: tweak comment and remove while loop brackets. ] Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20230126221159.8635-6-kirill.shutemov%40linux.intel.com commit dc4824faa265db1bc93449e8ec386a0245404fa6 Author: Mark Rutland Date: Fri Jan 27 11:08:20 2023 +0000 arm64: avoid executing padding bytes during kexec / hibernation Currently we rely on the HIBERNATE_TEXT section starting with the entry point to swsusp_arch_suspend_exit, and the KEXEC_TEXT section starting with the entry point to arm64_relocate_new_kernel. In both cases we copy the entire section into a dynamically-allocated page, and then later branch to the start of this page. SYM_FUNC_START() will align the function entry points to CONFIG_FUNCTION_ALIGNMENT, and when the linker later processes the assembled code it will place padding bytes before the function entry point if the location counter was not already sufficiently aligned. The linker happens to use the value zero for these padding bytes. This padding may end up being applied whenever CONFIG_FUNCTION_ALIGNMENT is greater than 4, which can be the case with CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B=y or CONFIG_DYNAMIC_FTRACE_WITH_CALL_OPS=y. When such padding is applied, attempting to kexec or resume from hibernate will result ina crash: the kernel will branch to the padding bytes as the start of the dynamically-allocated page, and as those bytes are zero they will decode as UDF #0, which reliably triggers an UNDEFINED exception. For example: | # ./kexec --reuse-cmdline -f Image | [ 46.965800] kexec_core: Starting new kernel | [ 47.143641] psci: CPU1 killed (polled 0 ms) | [ 47.233653] psci: CPU2 killed (polled 0 ms) | [ 47.323465] psci: CPU3 killed (polled 0 ms) | [ 47.324776] Bye! | [ 47.327072] Internal error: Oops - Undefined instruction: 0000000002000000 [#1] SMP | [ 47.328510] Modules linked in: | [ 47.329086] CPU: 0 PID: 259 Comm: kexec Not tainted 6.2.0-rc5+ #3 | [ 47.330223] Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015 | [ 47.331497] pstate: 604003c5 (nZCv DAIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) | [ 47.332782] pc : 0x43a95000 | [ 47.333338] lr : machine_kexec+0x190/0x1e0 | [ 47.334169] sp : ffff80000d293b70 | [ 47.334845] x29: ffff80000d293b70 x28: ffff000002cc0000 x27: 0000000000000000 | [ 47.336292] x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000 | [ 47.337744] x23: ffff80000a837858 x22: 0000000048ec9000 x21: 0000000000000010 | [ 47.339192] x20: 00000000adc83000 x19: ffff000000827000 x18: 0000000000000006 | [ 47.340638] x17: ffff800075a61000 x16: ffff800008000000 x15: ffff80000d293658 | [ 47.342085] x14: 0000000000000000 x13: ffff80000d2937f7 x12: ffff80000a7ff6e0 | [ 47.343530] x11: 00000000ffffdfff x10: ffff80000a8ef8e0 x9 : ffff80000813ef00 | [ 47.344976] x8 : 000000000002ffe8 x7 : c0000000ffffdfff x6 : 00000000000affa8 | [ 47.346431] x5 : 0000000000001fff x4 : 0000000000000001 x3 : ffff80000a0a3008 | [ 47.347877] x2 : ffff80000a8220f8 x1 : 0000000043a95000 x0 : ffff000000827000 | [ 47.349334] Call trace: | [ 47.349834] 0x43a95000 | [ 47.350338] kernel_kexec+0x88/0x100 | [ 47.351070] __do_sys_reboot+0x108/0x268 | [ 47.351873] __arm64_sys_reboot+0x2c/0x40 | [ 47.352689] invoke_syscall+0x78/0x108 | [ 47.353458] el0_svc_common.constprop.0+0x4c/0x100 | [ 47.354426] do_el0_svc+0x34/0x50 | [ 47.355102] el0_svc+0x34/0x108 | [ 47.355747] el0t_64_sync_handler+0xf4/0x120 | [ 47.356617] el0t_64_sync+0x194/0x198 | [ 47.357374] Code: bad PC value | [ 47.357999] ---[ end trace 0000000000000000 ]--- | [ 47.358937] Kernel panic - not syncing: Oops - Undefined instruction: Fatal exception | [ 47.360515] Kernel Offset: disabled | [ 47.361230] CPU features: 0x002000,00050108,c8004203 | [ 47.362232] Memory Limit: none Note: Unfortunately the code dump reports "bad PC value" as it attempts to dump some instructions prior to the UDF (i.e. before the start of the page), and terminates early upon a fault, obscuring the problem. This patch fixes this issue by aligning the section starter markes to CONFIG_FUNCTION_ALIGNMENT using the ALIGN_FUNCTION() helper, which ensures that the linker never needs to place padding bytes within the section. Assertions are added to verify each section begins with the function we expect, making our implicit requirement explicit. In future it might be nice to rework the kexec and hibernation code to decouple the section start from the entry point, but that involves much more significant changes that come with a higher risk of error, so I've tried to keep this fix as simple as possible for now. Fixes: 47a15aa54427 ("arm64: Extend support for CONFIG_FUNCTION_ALIGNMENT") Reported-by: CKI Project Link: https://lore.kernel.org/linux-arm-kernel/29992.123012504212600261@us-mta-139.us.mimecast.lan/ Signed-off-by: Mark Rutland Cc: James Morse Cc: Will Deacon Reviewed-by: Ard Biesheuvel Signed-off-by: Catalin Marinas commit 752d13305c78b2f0f0d783132f94acc9ce93d38e Author: Kirill A. Shutemov Date: Fri Jan 27 01:11:56 2023 +0300 x86/tdx: Expand __tdx_hypercall() to handle more arguments So far __tdx_hypercall() only handles six arguments for VMCALL. Expanding it to six more register would allow to cover more use-cases like ReportFatalError() and Hyper-V hypercalls. With all preparations in place, the expansion is pretty straight forward. Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20230126221159.8635-5-kirill.shutemov%40linux.intel.com commit c30c4b2555ba93b845559a036293fcaf7ffd2b82 Author: Kirill A. Shutemov Date: Fri Jan 27 01:11:55 2023 +0300 x86/tdx: Refactor __tdx_hypercall() to allow pass down more arguments RDI is the first argument to __tdx_hypercall() that used to pass pointer to struct tdx_hypercall_args. RSI is the second argument that contains flags, such as TDX_HCALL_HAS_OUTPUT and TDX_HCALL_ISSUE_STI. RDI and RSI can also be used as arguments to TDVMCALL leafs. Move RDI to RAX and RSI to RBP to free up them for the hypercall arguments. RAX saved on stack during TDCALL as it returns status code in the register. RBP value has to be restored before returning from __tdx_hypercall() as it is callee-saved register. This is preparatory patch. No functional change. Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20230126221159.8635-4-kirill.shutemov%40linux.intel.com commit 0da908c291070d89482f6211dbe81d4d43c3f7cb Author: Kirill A. Shutemov Date: Fri Jan 27 01:11:54 2023 +0300 x86/tdx: Add more registers to struct tdx_hypercall_args struct tdx_hypercall_args is used to pass down hypercall arguments to __tdx_hypercall() assembly routine. Currently __tdx_hypercall() handles up to 6 arguments. In preparation to changes in __tdx_hypercall(), expand the structure to 6 more registers and generate asm offsets for them. Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20230126221159.8635-3-kirill.shutemov%40linux.intel.com commit 3543f8830babe2666051fb239545f51e0aae4c84 Author: Kirill A. Shutemov Date: Fri Jan 27 01:11:53 2023 +0300 x86/tdx: Fix typo in comment in __tdx_hypercall() Comment in __tdx_hypercall() points that RAX==0 indicates TDVMCALL failure which is opposite of the truth: RAX==0 is success. Fix the comment. No functional changes. Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20230126221159.8635-2-kirill.shutemov%40linux.intel.com commit 627122280c878cf5d3cda2d2c5a0a8f6a7e35cb7 Author: Michael Guralnik Date: Thu Jan 26 00:28:07 2023 +0200 RDMA/mlx5: Add work to remove temporary entries from the cache The non-cache mkeys are stored in the cache only to shorten restarting application time. Don't store them longer than needed. Configure cache entries that store non-cache MRs as temporary entries. If 30 seconds have passed and no user reclaimed the temporarily cached mkeys, an asynchronous work will destroy the mkeys entries. Link: https://lore.kernel.org/r/20230125222807.6921-7-michaelgur@nvidia.com Signed-off-by: Michael Guralnik Signed-off-by: Jason Gunthorpe commit dd1b913fb0d0e3e6d55e92d2319d954474dd66ac Author: Michael Guralnik Date: Thu Jan 26 00:28:06 2023 +0200 RDMA/mlx5: Cache all user cacheable mkeys on dereg MR flow Currently, when dereging an MR, if the mkey doesn't belong to a cache entry, it will be destroyed. As a result, the restart of applications with many non-cached mkeys is not efficient since all the mkeys are destroyed and then recreated. This process takes a long time (for 100,000 MRs, it is ~20 seconds for dereg and ~28 seconds for re-reg). To shorten the restart runtime, insert all cacheable mkeys to the cache. If there is no fitting entry to the mkey properties, create a temporary entry that fits it. After a predetermined timeout, the cache entries will shrink to the initial high limit. The mkeys will still be in the cache when consuming them again after an application restart. Therefore, the registration will be much faster (for 100,000 MRs, it is ~4 seconds for dereg and ~5 seconds for re-reg). The temporary cache entries created to store the non-cache mkeys are not exposed through sysfs like the default cache entries. Link: https://lore.kernel.org/r/20230125222807.6921-6-michaelgur@nvidia.com Signed-off-by: Michael Guralnik Signed-off-by: Jason Gunthorpe commit 73d09b2fe8336f5f37935e46418666ddbcd3c343 Author: Michael Guralnik Date: Thu Jan 26 00:28:05 2023 +0200 RDMA/mlx5: Introduce mlx5r_cache_rb_key Switch from using the mkey order to using the new struct as the key to the RB tree of cache entries. The key is all the mkey properties that UMR operations can't modify. Using this key to define the cache entries and to search and create cache mkeys. Link: https://lore.kernel.org/r/20230125222807.6921-5-michaelgur@nvidia.com Signed-off-by: Michael Guralnik Signed-off-by: Jason Gunthorpe commit b9584517832858a0f78d6851d09b697a829514cd Author: Michael Guralnik Date: Thu Jan 26 00:28:04 2023 +0200 RDMA/mlx5: Change the cache structure to an RB-tree Currently, the cache structure is a static linear array. Therefore, his size is limited to the number of entries in it and is not expandable. The entries are dedicated to mkeys of size 2^x and no access_flags. Mkeys with different properties are not cacheable. In this patch, we change the cache structure to an RB-tree. This will allow to extend the cache to support more entries with different mkey properties. Link: https://lore.kernel.org/r/20230125222807.6921-4-michaelgur@nvidia.com Signed-off-by: Michael Guralnik Signed-off-by: Jason Gunthorpe commit 18b1746bddf5e7f6b2618966596d9517172a5cd7 Author: Aharon Landau Date: Thu Jan 26 00:28:03 2023 +0200 RDMA/mlx5: Remove implicit ODP cache entry Implicit ODP mkey doesn't have unique properties. It shares the same properties as the order 18 cache entry. There is no need to devote a special entry for that. Link: https://lore.kernel.org/r/20230125222807.6921-3-michaelgur@nvidia.com Signed-off-by: Aharon Landau Signed-off-by: Jason Gunthorpe commit a2a88b8e22d1b202225d0e40b02ad068afab2ccb Author: Aharon Landau Date: Thu Jan 26 00:28:02 2023 +0200 RDMA/mlx5: Don't keep umrable 'page_shift' in cache entries mkc.log_page_size can be changed using UMR. Therefore, don't treat it as a cache entry property. Removing it from struct mlx5_cache_ent. All cache mkeys will be created with default PAGE_SHIFT, and updated with the needed page_shift using UMR when passing them to a user. Link: https://lore.kernel.org/r/20230125222807.6921-2-michaelgur@nvidia.com Signed-off-by: Aharon Landau Signed-off-by: Jason Gunthorpe commit d747e7f76a5fa6e3deb4c419df768f9ee49c2161 Author: Yuntian Zhang Date: Fri Jan 27 15:05:36 2023 +0000 arm64: dts: meson: add support for Radxa Zero2 Radxa Zero2 is a small form factor SBC based on the Amlogic A311D chipset that ships in a number of eMMC configurations: - Amlogic A311D (Quad A73 + Dual A53) CPU - 4GB LPDDR4 RAM - 32/64/128GB eMMC - Mali G52-MP4 GPU - HDMI 2.1 output (micro) - BCM4345 WiFi (2.4/5GHz a/b/g/n/ac) and BT 5.0 - 1x USB 2.0 port - Type C (OTG) - 1x USB 3.0 port - Type C (Host) - 1x micro SD Card slot - 40 Pin GPIO header Signed-off-by: Yuntian Zhang Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230127150536.3719090-2-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit 229cfc6b16ccedfcae1ee10dc1aed04e7a85ed32 Author: Christian Hewitt Date: Fri Jan 27 15:05:35 2023 +0000 dt-bindings: arm: amlogic: add support for Radxa Zero2 The Radxa Zero2 is a small form-factor SBC using the Amlogic A311D chip. Signed-off-by: Christian Hewitt Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230127150536.3719090-1-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit 5bcfbee7d58d8512493b03b1d1622fe138d0aaee Author: Christian Hewitt Date: Fri Jan 27 14:22:21 2023 +0000 arm64: dts: meson: add support for BananaPi M2-Pro BPI-M2-PRO is based upon the BPI-M5 design except for a different physical board layout and the following changes: - USB 3.0 ports reduced from 4x to 2x - 3.5mm Combined CVBS/Audio Jack removed - RTL8821BU WiFi/BT module (internal USB connected) Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230127142221.3718184-6-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit bd2529aa41ccb93c2ffcb045ac97121711277fe0 Author: Christian Hewitt Date: Fri Jan 27 14:22:20 2023 +0000 dt-bindings: arm: amlogic: add support for BananaPi M2-Pro BPI-M2-PRO is based upon the BPI-M5 using the Amlogic SM1 (S905X3) chipset. Signed-off-by: Christian Hewitt Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230127142221.3718184-5-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit ca8dac3a019ac190c39365c99a632c0748c72f58 Author: Christian Hewitt Date: Fri Jan 27 14:22:19 2023 +0000 arm64: dts: meson: bananapi-m5: convert dts to dtsi Convert the BPI-M5 dts into meson-sm1-bananapi.dtsi to support the addition of new boards based on the same design. Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230127142221.3718184-4-christianshewitt@gmail.com [narmstrong: fixed adc-keys node name] Signed-off-by: Neil Armstrong commit ce3ba2af9695e4bd64d797e0026321e5dca29dd3 Author: Alexander Potapenko Date: Fri Nov 18 18:23:05 2022 +0100 x86: Suppress KMSAN reports in arch_within_stack_frames() arch_within_stack_frames() performs stack walking and may confuse KMSAN by stepping on stale shadow values. To prevent false positive reports, disable KMSAN checks in this function. This fixes KMSAN's interoperability with CONFIG_HARDENED_USERCOPY. Signed-off-by: Alexander Potapenko Signed-off-by: Dave Hansen Tested-by: Eric Biggers Link: https://github.com/google/kmsan/issues/89 Link: https://lore.kernel.org/lkml/Y3b9AAEKp2Vr3e6O@sol.localdomain/ Link: https://lore.kernel.org/all/20221118172305.3321253-1-glider%40google.com commit 31752ffeece8b8dc2cf2be36614c8a4e8e8dcf57 Author: Christian Hewitt Date: Fri Jan 27 14:22:18 2023 +0000 arm64: dts: meson: bananapi-m5: remove redundant status from sound node The sound device is enabled by default so remove the redundant status. Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230127142221.3718184-3-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit 856968e066bd77b113965f1a355ec7401edff65f Author: Christian Hewitt Date: Fri Jan 27 14:22:17 2023 +0000 arm64: dts: meson: bananapi-m5: switch VDDIO_C pin to OPEN_DRAIN For proper warm (re)boot from SD card the BPI-M5 board requires TFLASH_VDD_EN and VDDIO_C pins to be switched to high impedance mode. This can be achieved using OPEN_DRAIN instead of ACTIVE_HIGH to leave the GPIO pins in input mode and retain high state (pin has the pull-up). This change is inspired by meson-sm1-odroid.dtsi where OPEN_DRAIN has been used to resolve similar problems with the Odroid C4 board (TF_IO in the C4 dts is the equivalent regulator). Fixes: 976e920183e4 ("arm64: dts: meson-sm1: add Banana PI BPI-M5 board dts") Suggested-by: Neil Armstrong Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230127142221.3718184-2-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit 2abdd44e3126e29cc310cbf5f1eda7ca7d979df3 Author: Thierry Reding Date: Thu Nov 17 13:34:23 2022 +0100 drm/tegra: nvdec: Use tegra_dev_iommu_get_stream_id() Use the newly implemented tegra_dev_iommu_get_stream_id() helper to encapsulate and centralize the IOMMU stream ID access. Signed-off-by: Thierry Reding commit b50ad38d8718937928aab5de4ee89eb44fdada02 Author: Thierry Reding Date: Thu Nov 17 13:35:20 2022 +0100 drm/tegra: vic: Use tegra_dev_iommu_get_stream_id() Use the newly implemented tegra_dev_iommu_get_stream_id() helper to encapsulate and centralize the IOMMU stream ID access. Signed-off-by: Thierry Reding commit b8cbb04f6567ac16e3be13f3d0c369d264815832 Author: Thierry Reding Date: Thu Nov 17 13:34:50 2022 +0100 drm/tegra: Use tegra_dev_iommu_get_stream_id() Use the newly implemented tegra_dev_iommu_get_stream_id() helper to encapsulate and centralize the IOMMU stream ID access. Signed-off-by: Thierry Reding commit 9026ba722360ce5fb72ff7bbc445c49dc9a736ac Author: Thierry Reding Date: Thu Nov 17 13:36:19 2022 +0100 gpu: host1x: Use tegra_dev_iommu_get_stream_id() Use the newly implemented tegra_dev_iommu_get_stream_id() helper to encapsulate and centralize the IOMMU stream ID access. Signed-off-by: Thierry Reding commit 109d587a4b4d7ccca2200ab1f808f43ae23e2585 Author: xurui Date: Wed Jan 18 16:59:12 2023 +0800 MIPS: Fix a compilation issue arch/mips/include/asm/mach-rc32434/pci.h:377: cc1: error: result of ‘-117440512 << 16’ requires 44 bits to represent, but ‘int’ only has 32 bits [-Werror=shift-overflow=] All bits in KORINA_STAT are already at the correct position, so there is no addtional shift needed. Signed-off-by: xurui Signed-off-by: Thomas Bogendoerfer commit 6427569ff14766aea855afca782424918668536b Author: Thierry Reding Date: Thu Nov 17 18:56:19 2022 +0100 dt-bindings: tegra: Allow #{address,size}-cells = <2> Both 1 and 2 are valid values for #address-cells and #size-cells on the various busses specified in these bindings, so explicitly allow 2. Acked-by: Rob Herring Signed-off-by: Thierry Reding commit 00498167650b682a053b85e0e705f59a54f427a3 Author: Serge Semin Date: Fri Jan 13 20:13:57 2023 +0300 dmaengine: dw-edma: Simplify debugfs context CSRs init procedure DW eDMA v4.70a and older have the read and write channels context CSRs indirectly accessible, which means CSRs like Channel Control, Xfer size, SAR, DAR and LLP address are accessed at a fixed MMIO address, with their reference to the corresponding channel determined by the Viewport CSR. To have a coherent access to these registers the CSR IOs are supposed to be protected with a spinlock. DW eDMA v4.80a and newer normally have unrolled Read/Write channel context registers, with these CSRs directly mapped in the controller MMIO space. Both normal and viewport-based registers are exposed via debugfs nodes, and the original algorithm was based on the unrolled CSRs mapping and recalculated the viewport addresses when required. This is unscalable (it only supports a platform with a single eDMA since a base address is statically preserved) and also needlessly overcomplicated (it loops over all Rd/Wr context addresses and recalculates the viewport base address on each debugfs node access). Simplify the algorithm by adding the channel ID and its direction fields in the eDMA debugfs node descriptor. These new fields can be used to find a CSR offset in the channel register space. The DW eDMA debugfs node getter will also use them to activate the respective context CSRs viewport before reading data from the specified register. For the unrolled CSR mapping, no spinlock or viewport activation is needed. Note: this replaces some REGISTER() uses with CTX_REGISTER(), which avoids an implicit dependency on a local variable name. The same problem with the rest of the macro will be fixed in the next commit. Link: https://lore.kernel.org/r/20230113171409.30470-16-Sergey.Semin@baikalelectronics.ru Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Vinod Koul commit 95c55b7836f579ea6e46002226b02dddd6642a0d Author: Serge Semin Date: Fri Jan 13 20:13:56 2023 +0300 dmaengine: dw-edma: Rename debugfs dentry variables to 'dent' Since we are about to add the eDMA channels direction support to the debugfs module it will be confusing to have both the debugfs directory and the channels direction short names used in the same code. Rename the debugfs dentry 'dir' variables to 'dent' to prevent confusion. Suggested-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20230113171409.30470-15-Sergey.Semin@baikalelectronics.ru Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Vinod Koul commit 782536aac16166e85232e20e63596e9d6946dd15 Author: Serge Semin Date: Fri Jan 13 20:13:55 2023 +0300 dmaengine: dw-edma: Convert debugfs descs to being heap-allocated Currently DW eDMA debugfs node descriptors are allocated on the stack, which won't work for multi-eDMA platforms. As a preparation to supporting multi-eDMA systems, allocate each debugfs node separately. Afterwards we'll add info like Read/Write channel flag, channel ID, DW eDMA private data reference. Note: this conversion is mainly required due to having the legacy DW eDMA controllers with indirect Read/Write channels context CSRs access. If we didn't need to synchronize access to these registers, the debugfs code of the driver would have been much simpler. Link: https://lore.kernel.org/r/20230113171409.30470-14-Sergey.Semin@baikalelectronics.ru Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Vinod Koul commit 345e3a95b2fb469eb62c54f650ffa560ba5ee79a Author: Serge Semin Date: Fri Jan 13 20:13:54 2023 +0300 dmaengine: dw-edma: Add dw_edma prefix to debugfs nodes descriptor Other local names include a "dw_edma" prefix. Add a "dw_edma" prefix to the debugfs_entries structure, too, so it won't be confused with global debugfs things. Link: https://lore.kernel.org/r/20230113171409.30470-13-Sergey.Semin@baikalelectronics.ru Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Vinod Koul commit 37d058aae75b965a1c597979a194c9dba79ac913 Author: Serge Semin Date: Fri Jan 13 20:13:53 2023 +0300 dmaengine: dw-edma: Stop checking debugfs_create_*() return value The debugfs_create_*() functions never return NULL, so checking their return value for NULL is pointless. Secondly, the debugfs subsystem is designed to be as simple as possible, so if one of the debugfs_create_*() method in a hierarchy fails, the following methods should silently return the passed erroneous parental dentry. Finally, the code should work no matter whether anything debugfs-related fails. To make code simpler and debugfs-independent, stop checking the debugfs_create_*() return values. If the debugfs file system is unavailable, skip the debugfs node initialization altogether to preserve some memory space. Link: https://lore.kernel.org/r/20230113171409.30470-12-Sergey.Semin@baikalelectronics.ru Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Vinod Koul commit 7ca9f025a731b3391f9321a324d8eb7a5b008c5a Author: Serge Semin Date: Fri Jan 13 20:13:52 2023 +0300 dmaengine: dw-edma: Drop unnecessary debugfs reg casts The debugfs_entries structure declared in dw-edma-v0-debugfs.c contains the debugfs node register address. The address is declared as dma_addr_t type, but is cast to "void *". Change the type to "void __iomem *" and drop the unnecessary casts. Link: https://lore.kernel.org/r/20230113171409.30470-11-Sergey.Semin@baikalelectronics.ru Fixes: 305aebeff879 ("dmaengine: Add Synopsys eDMA IP version 0 debugfs support") Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Vinod Koul commit 2271216e0aac2409f2cd9a0650c460b89f7d2446 Author: Serge Semin Date: Fri Jan 13 20:13:51 2023 +0300 dmaengine: dw-edma: Drop chancnt initialization The DMA engine core manages dma_device.chancnt itself, e.g., in dma_async_device_register(). DMA device drivers should not initialize chancnt because it causes the wrong number of channels printed in the device summary. Drop the dw-edma chancnt initialization. Link: https://lore.kernel.org/r/20230113171409.30470-10-Sergey.Semin@baikalelectronics.ru Fixes: e63d79d1ffcd ("dmaengine: Add Synopsys eDMA IP core driver") Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Vinod Koul commit aa92fa1e53befd7c0ff50f8346cb7980584f0beb Author: Serge Semin Date: Fri Jan 13 20:13:50 2023 +0300 dmaengine: dw-edma: Add PCI bus address getter to the remote EP glue driver The Synopsys PCIe Endpoint IP prototype kit can be attached via any PCI host controller, including one where the PCI bus address space is different from the CPU address space. Therefore, we need to make sure the source and destination addresses of the DMA slave devices are converted to the PCI bus address space; otherwise DMA transactions may cause memory corruption. Add a new dw_edma_pcie_address() interface to perform this translation by using pcibios_resource_to_bus(). Link: https://lore.kernel.org/r/20230113171409.30470-9-Sergey.Semin@baikalelectronics.ru Fixes: 41aaff2a2ac0 ("dmaengine: Add Synopsys eDMA IP PCIe glue-logic") Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Vinod Koul commit 993d57bbaacf7ad7a742e51cb717e21e0eb4ef72 Author: Serge Semin Date: Fri Jan 13 20:13:49 2023 +0300 dmaengine: dw-edma: Add CPU to PCI bus address translation Since 9575632052ba ("dmaengine: make slave address physical"), the source and destination addresses of the DMA slave device have been converted to physical addresses in the CPU address space. It's the DMA device driver's responsibility to convert them to the DMA bus address space. In case of the DW eDMA device, the source or destination peripheral (slave) devices reside in PCI bus space. Thus we need to perform the PCI Host/Endpoint windows- based (i.e. DT "ranges" property) address translation; otherwise the eDMA transactions won't work as expected (or can be even harmful) if the CPU and PCI address spaces don't match. Note 1: Even though the DMA interleaved template has both source and destination addresses declared as dma_addr_t, only the CPU memory range should be mapped to be seen by the DMA device since it's a subject of the DMA getting towards the system side. The device part must not be mapped since the slave device resides in the PCI bus space, which isn't affected by IOMMUs or iATU translations. DW PCIe eDMA generates corresponding MWr/MRd TLPs on its own. Note 2: This functionality is mainly required for the remote eDMA setup since the CPU address must be manually translated into the PCI bus space before being written to LLI.{SAR,DAR}. If eDMA is embedded in the locally accessible DW PCIe Root Port/Endpoint, software-based translation isn't required since hardware will translate it via the Outbound iATU as long as the DMA_BYPASS flag is cleared. If DMA_BYPASS is set or there is no Outbound iATU entry that contains the SAR or DAR (for Read and Write channel respectively), there won't be any translation performed but DMA will proceed with the corresponding source/destination address as-is. Link: https://lore.kernel.org/r/20230113171409.30470-8-Sergey.Semin@baikalelectronics.ru Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Vinod Koul commit 7ad06f218491bf30f13fd88933bb807de5330cdd Author: Serge Semin Date: Fri Jan 13 20:13:48 2023 +0300 dmaengine: dw-edma: Fix invalid interleaved xfers semantics The interleaved DMA transfer support added by 85e7518f42c8 ("dmaengine: dw-edma: Add device_prep_interleave_dma() support") seems contradictory to what the DMA engine defines. The next conditional statements: if (!xfer->xfer.il->numf) return NULL; if (xfer->xfer.il->numf > 0 && xfer->xfer.il->frame_size > 0) return NULL; mean that numf can't be zero and frame_size must always be zero, otherwise the transfer won't be executed. Furthermore, the transfer execution method takes the frame size from the dma_interleaved_template.sgl[] array for each frame. That array in accordance with [1] is supposed to be of dma_interleaved_template.frame_size size, which as we discovered before the code expects to be zero. So judging by the dw_edma_device_transfer() implementation, the method implies the dma_interleaved_template.sgl[] array being of dma_interleaved_template.numf size, which is wrong. Since the dw_edma_device_transfer() method doesn't permit dma_interleaved_template.frame_size being non-zero, the multi-chunk interleaved transfer turns to be unsupported even though the code implies having it supported. Add fully functioning support of interleaved DMA transfers. First of all, dma_interleaved_template.frame_size is supposed to be greater or equal to one thus having at least simple linear chunked frames. Secondly, we can create a walk-through over all the chunks and frames by initializing the number of the eDMA burst transactions as a multiple of dma_interleaved_template.numf and dma_interleaved_template.frame_size and getting the frame_size-modulo of the iteration step as an index of the dma_interleaved_template.sgl[] array. [1] include/linux/dmaengine.h: doc struct dma_interleaved_template Link: https://lore.kernel.org/r/20230113171409.30470-7-Sergey.Semin@baikalelectronics.ru Fixes: 85e7518f42c8 ("dmaengine: dw-edma: Add device_prep_interleave_dma() support") Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Vinod Koul commit c8ed49182286cb9c64f0c503b98090bd11a3fb60 Author: Serge Semin Date: Fri Jan 13 20:13:47 2023 +0300 dmaengine: dw-edma: Don't permit non-inc interleaved xfers The DW eDMA controller always increments both source and destination addresses. Permitting DMA interleaved transfers with no src_inc/dst_inc flags set may lead to unexpected behaviour for the device users. Terminate interleaved transfers if at least one of the dma_interleaved_template.{src_inc,dst_inc} flag is initialized to "false". Note that in addition, we need to increase the source and destination addresses after each iteration. Link: https://lore.kernel.org/r/20230113171409.30470-6-Sergey.Semin@baikalelectronics.ru Fixes: 85e7518f42c8 ("dmaengine: dw-edma: Add device_prep_interleave_dma() support") Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Vinod Koul commit 13b6299cf66165a442089fa895a7f70250703584 Author: Serge Semin Date: Fri Jan 13 20:13:46 2023 +0300 dmaengine: dw-edma: Fix missing src/dst address of interleaved xfers Interleaved DMA transfer support was added by 85e7518f42c8 ("dmaengine: dw-edma: Add device_prep_interleave_dma() support"), but depending on the selected channel, either source or destination address are left uninitialized which was obviously wrong. Initialize the destination address of the eDMA burst descriptors for DEV_TO_MEM interleaved operations and the source address for MEM_TO_DEV operations. Link: https://lore.kernel.org/r/20230113171409.30470-5-Sergey.Semin@baikalelectronics.ru Fixes: 85e7518f42c8 ("dmaengine: dw-edma: Add device_prep_interleave_dma() support") Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Vinod Koul commit 002bbaa2f60e07d465f92a163365569481d34108 Author: Serge Semin Date: Fri Jan 13 20:13:45 2023 +0300 dmaengine: dw-edma: Convert ll/dt phys address to PCI bus/DMA address The dw_edma_region.paddr field should be a memory base address visible by the DW eDMA controller. If the DMA engine is embedded in the DW PCIe Host/Endpoint controller, the address should belong to the Local CPU/ Application memory. If eDMA is remotely accessible across the PCI bus via PCI memory IOs, the address should be part of the PCI bus memory space. The latter case hasn't been well covered in the corresponding glue-driver. Since pci_dev.resource[] contains resources defined in the CPU memory space, they need to be converted to the PCI bus address space. Convert the LL, DT and CSRs PCI memory ranges with pci_bus_address(). In addition, extend the dw_edma_region.paddr field size. The field normally contains a memory range base address to be set in the DW eDMA Linked-List pointer register or as a base address of the Linked-List data buffer. In accordance with [1] the LL range is supposed to be created in the Local CPU/Application memory, but depending on the DW eDMA utilization the memory can be created as a part of the PCI bus address space (as in the case of the DW PCIe Endpoint prototype kit). In the former case dw_edma_region.paddr should be a dma_addr_t, while in the latter one it should be a pci_bus_addr_t. Since the corresponding CSRs are always 64 bits wide, convert dw_edma_region.paddr to be u64, and let the client make sure it has a valid address visible by the DW eDMA controller. For instance, the DW eDMA PCIe glue-driver initializes the field with addresses from the PCI bus memory space. [1] DesignWare Cores PCI Express Controller Databook - DWC PCIe Root Port, v.5.40a, March 2019, p.1103 Link: https://lore.kernel.org/r/20230113171409.30470-4-Sergey.Semin@baikalelectronics.ru Fixes: 41aaff2a2ac0 ("dmaengine: Add Synopsys eDMA IP PCIe glue-logic") Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Vinod Koul commit 0278067445626de4d9c46919d0ee1af0b987ee45 Author: Serge Semin Date: Fri Jan 13 20:13:44 2023 +0300 dmaengine: dw-edma: Release requested IRQs on failure If dw_edma_irq_request() fails to initialize an IRQ handler, any previously requested IRQs will be left initialized. Release the previously requested IRQs in the cleanup-on-error path of dw_edma_irq_request(). Link: https://lore.kernel.org/r/20230113171409.30470-3-Sergey.Semin@baikalelectronics.ru Fixes: e63d79d1ffcd ("dmaengine: Add Synopsys eDMA IP core driver") Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Vinod Koul commit 37fe46051dc94c589b616018ba9d2fd4bacfbd8a Author: Serge Semin Date: Fri Jan 13 20:13:43 2023 +0300 dmaengine: Fix dma_slave_config.dst_addr description The dst_addr member of the dma_slave_config structure has been mistakenly marked as ignored if the *source* address belongs to the memory. That is relevant to the src_addr field of the structure, while the dst_addr field contains a destination device address that should be ignored if the destination is the CPU memory. Correct the @dst_addr description accordingly. Link: https://lore.kernel.org/r/20230113171409.30470-2-Sergey.Semin@baikalelectronics.ru Tested-by: Manivannan Sadhasivam Signed-off-by: Serge Semin Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Vinod Koul commit f048158c428e766fc46bb7dc52c9fc2662a4b4bd Author: Masahiro Yamada Date: Fri Jan 20 15:33:51 2023 +0900 MIPS: remove CONFIG_MIPS_LD_CAN_LINK_VDSO Given commit e4412739472b ("Documentation: raise minimum supported version of binutils to 2.25"), CONFIG_MIPS_LD_CAN_LINK_VDSO is always 'y'. Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer commit 592627ccbdff0ec6fff00fc761142a76db750dd4 Author: Bob Pearson Date: Thu Jan 19 17:59:37 2023 -0600 RDMA/rxe: Replace rxe_map and rxe_phys_buf by xarray Replace struct rxe-phys_buf and struct rxe_map by struct xarray in rxe_verbs.h. This allows using rcu locking on reads for the memory maps stored in each mr. This is based off of a sketch of a patch from Jason Gunthorpe in the link below. Some changes were needed to make this work. It applies cleanly to the current for-next and passes the pyverbs, perftest and the same blktests test cases which run today. Link: https://lore.kernel.org/r/20230119235936.19728-7-rpearsonhpe@gmail.com Link: https://lore.kernel.org/linux-rdma/Y3gvZr6%2FNCii9Avy@nvidia.com/ Co-developed-by: Jason Gunthorpe Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit b74cc639f796ecc0b43b23424ee33d9a56dfa468 Author: Sander Vanheule Date: Sun Jan 15 13:19:22 2023 +0100 mips: Realtek RTL: select NO_EXCEPT_FILL The CPUs in these SoCs support MIPS32 R2, and allow ebase relocation. Even if the default exception base of 0x80000000 is used, the MIPS_GENERIC load address of 0x80100000 leaves sufficient space to not need an extra 0x400 bytes of padding. Suggested-by: Olliver Schinagl Signed-off-by: Sander Vanheule Signed-off-by: Thomas Bogendoerfer commit 4a24f6e0cc17ba259d72c5f687dd8e02098a2b7e Author: Ladislav Michl Date: Wed Dec 21 15:23:49 2022 +0100 MIPS: OCTEON: octeon-usb: Consolidate error messages Console output currently looks like USB clocks initialized succesfully even in case of error. Fix that and use consistently dev_err for fatal errors otherwise dev_warn. Signed-off-by: Ladislav Michl Signed-off-by: Thomas Bogendoerfer commit 682e1c498ae793ad90587171c93c1f7ec87aa208 Author: Thierry Reding Date: Mon Oct 17 19:03:39 2022 +0200 arm64: tegra: Drop I2C iommus and dma-coherent properties Drop the iommus and dma-coherent properties for the I2C controller device tree nodes. These are only needed for the device tree nodes that represent the GPC DMA controller, since that is the device performing the direct memory accesses. Signed-off-by: Thierry Reding commit 36aa8c61af55675ed967900fbe5deb32d776f051 Author: Nícolas F. R. A. Prado Date: Tue Nov 22 09:39:49 2022 -0500 drm/mediatek: Clean dangling pointer on bind error path mtk_drm_bind() can fail, in which case drm_dev_put() is called, destroying the drm_device object. However a pointer to it was still being held in the private object, and that pointer would be passed along to DRM in mtk_drm_sys_prepare() if a suspend were triggered at that point, resulting in a panic. Clean the pointer when destroying the object in the error path to prevent this from happening. Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20221122143949.3493104-1-nfraprado@collabora.com/ Signed-off-by: Chun-Kuang Hu commit 9ffa18884cceb2e5731e422140fad06292de0577 Author: Andreas Gruenbacher Date: Mon Jan 23 18:58:27 2023 +0100 gfs2: gl_object races fix Function glock_clear_object() checks if the specified glock is still pointing at the right object and clears the gl_object pointer. To handle the case of incompletely constructed inodes, glock_clear_object() also allows gl_object to be NULL. However, in the teardown case, when iget_failed() is called and the inode is removed from the inode hash, by the time we get to the glock_clear_object() calls in gfs2_put_super() and its helpers, we don't have exclusion against concurrent gfs2_inode_lookup() and gfs2_create_inode() calls, and the inode and iopen glocks may already be pointing at another inode, so the checks in glock_clear_object() are incorrect. To better handle this case, always completely disassociate an inode from its glocks before tearing it down. In addition, get rid of a duplicate glock_clear_object() call in gfs2_evict_inode(). That way, glock_clear_object() will only ever be called when the glock points at the current inode, and the NULL check in glock_clear_object() can be removed. Signed-off-by: Andreas Gruenbacher commit 79b2027097dd3046ff95a2701af441405f1ff298 Merge: acd7e9ee57c88 02be605946b64 Author: Rafael J. Wysocki Date: Fri Jan 27 15:55:23 2023 +0100 Merge back thermal control material for 6.3. commit 5bf1e3bd7da625ccf9a22c8cb7d65271e6e47f4c Author: ruanjinjie Date: Mon Dec 5 17:51:15 2022 +0800 drm/mediatek: mtk_drm_crtc: Add checks for devm_kcalloc As the devm_kcalloc may return NULL, the return value needs to be checked to avoid NULL poineter dereference. Fixes: 31c5558dae05 ("drm/mediatek: Refactor plane init") Signed-off-by: ruanjinjie Reviewed-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20221205095115.2905090-1-ruanjinjie@huawei.com/ Signed-off-by: Chun-Kuang Hu commit f4118dbe61bb30038ca7f3ecaf333cabc9c54141 Author: Rafael J. Wysocki Date: Wed Jan 25 15:55:24 2023 +0100 thermal: intel: int340x: Use generic trip points table Modify int340x_thermal_zone_add() to register the thermal zone along with a trip points table, which allows the trip-related zone callbacks to be dropped, because they are not needed any more. In order to consolidate the code, use ACPI trip library functions to populate generic trip points in int340x_thermal_read_trips() and to update them in int340x_thermal_update_trips(). Signed-off-by: Daniel Lezcano Co-developed-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit 9e9b7e182cf34ce5e5f50f1fa2470d051e3c8f90 Author: Rafael J. Wysocki Date: Wed Jan 25 15:54:03 2023 +0100 thermal: intel: int340x: Use zone lock for synchronization Because the ->get_trip_temp() and ->get_trip_type() thermal zone callbacks are only invoked from __thermal_zone_get_trip() which is always called by the thermal core under the zone lock, it is sufficient for int340x_thermal_update_trips() to acquire the zone lock for mutual exclusion with those callbacks. Accordingly, modify int340x_thermal_update_trips() to use the zone lock instead of the internal trip_mutex and drop the latter which is not necessary any more. Signed-off-by: Rafael J. Wysocki commit b1bf9dbffc3049ca22ab36cb807b671655a936d0 Author: Rafael J. Wysocki Date: Wed Jan 25 15:52:25 2023 +0100 thermal: intel: int340x: Rework updating trip points It is generally invalid to change the trip point indices after they have been exposed via sysfs. Moreover, the thermal objects in the ACPI namespace cannot go away and appear on the fly. In practice, the only thing that can happen when the INT3403_PERF_TRIP_POINT_CHANGED notification is sent by the platform firmware is a change of the return values of those thermal objects. For this reason, add a special function for updating the trip point temperatures after re-evaluating the respective ACPI thermal objects and change int3403_notify() to invoke it instead of int340x_thermal_read_trips() that would change the trip point indices on errors. Also remove the locking from the latter, because it is only called before registering the thermal zone and it cannot race with the zone's callbacks. Signed-off-by: Rafael J. Wysocki commit 97efecfdbf6fe4915e7f71603b634d5ad3f210b1 Author: Rafael J. Wysocki Date: Thu Jan 26 13:53:49 2023 +0100 thermal: ACPI: Initialize trips if temperature is out of range In some cases it is still useful to register a trip point if the temperature returned by the corresponding ACPI thermal object (for example, _HOT) is invalid to start with, because the same ACPI thermal object may start to return a valid temperature after a system configuration change (for example, from an AC power source to battery an vice versa). For this reason, if the ACPI thermal object evaluated by thermal_acpi_trip_init() successfully returns a temperature value that is out of the range of values taken into account, initialize the trip point using THERMAL_TEMP_INVALID as the temperature value instead of returning an error to allow the user of the trip point to decide what to do with it. Also update pch_wpt_add_acpi_psv_trip() to reject trip points with invalid temperature values. Fixes: 7a0e39748861 ("thermal: ACPI: Add ACPI trip point routines") Reported-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki commit a5c926acd03aacbf558605f3352939dda86c8808 Merge: acd7e9ee57c88 e90eb1df708c0 Author: Rafael J. Wysocki Date: Fri Jan 27 15:08:08 2023 +0100 Merge back Intel thermal control changes for 6.3. commit 99343c46d4e2b34c285d3d5f68ff04274c2f9fb4 Author: Rob Clark Date: Thu Jan 19 09:32:58 2023 -0800 drm/i915: Avoid potential vm use-after-free Adding the vm to the vm_xa table makes it visible to userspace, which could try to race with us to close the vm. So we need to take our extra reference before putting it in the table. Signed-off-by: Rob Clark Reviewed-by: Matthew Auld Fixes: 9ec8795e7d91 ("drm/i915: Drop __rcu from gem_context->vm") Cc: # v5.16+ Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20230119173321.2825472-1-robdclark@gmail.com commit ce43ea00b927805c1fd0450ccc9b4b6069e292c5 Author: Christian Hewitt Date: Fri Jan 27 10:39:13 2023 +0000 arm64: dts: meson: radxa-zero: allow usb otg mode Setting dr_mode to "host" prevents otg which can be useful on a board with limited connectivity options. So don't force host mode. Fixes: 26d1400f7457 ("arm64: dts: amlogic: add support for Radxa Zero") Signed-off-by: Christian Hewitt Acked-by: Neil Armstrong Link: https://lore.kernel.org/r/20230127103913.3386435-1-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit 47d586913f2abec4d240bae33417f537fda987ec Author: Jann Horn Date: Mon Jan 16 20:14:25 2023 +0100 fs: Use CHECK_DATA_CORRUPTION() when kernel bugs are detected Currently, filp_close() and generic_shutdown_super() use printk() to log messages when bugs are detected. This is problematic because infrastructure like syzkaller has no idea that this message indicates a bug. In addition, some people explicitly want their kernels to BUG() when kernel data corruption has been detected (CONFIG_BUG_ON_DATA_CORRUPTION). And finally, when generic_shutdown_super() detects remaining inodes on a system without CONFIG_BUG_ON_DATA_CORRUPTION, it would be nice if later accesses to a busy inode would at least crash somewhat cleanly rather than walking through freed memory. To address all three, use CHECK_DATA_CORRUPTION() when kernel bugs are detected. Signed-off-by: Jann Horn Reviewed-by: Christian Brauner (Microsoft) Reviewed-by: Kees Cook Signed-off-by: Christian Brauner (Microsoft) commit 9da134e270736116d8bb3fb065c6ebc19c07254f Merge: 91da7032d86a2 5b8c304c94d79 Author: Linus Walleij Date: Fri Jan 27 14:02:01 2023 +0100 Merge tag 'qcom-pinctrl-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into devel Qualcomm pinctrl Devicetree bindings changes for v6.3 Set of cleanups and fixes for Qualcomm pin controller bindings, to match existing DTS and correct the schema. commit 91da7032d86a2aa2ae4b43d82008282bb672f9f2 Author: Rob Herring Date: Thu Jul 12 13:22:22 2018 -0600 pinctrl: at91: fix deferred probing support AT91 pinctrl deferred probing support is broken if the GPIO devices haven't probed first and set gpio_banks to non-zero. The later condition that only some GPIO devices haven't probed can't actually happen as either all the GPIO devices have probed first or none of them have. Plus the pinctrl driver has already returned -EINVAL, so it's not on the deferred list to retry probing. Fix this by consolidating the checking that all GPIO devices are probed. Cc: Jean-Christophe Plagniol-Villard Cc: Linus Walleij Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: linux-arm-kernel@lists.infradead.org Cc: linux-gpio@vger.kernel.org Signed-off-by: Rob Herring Acked-by: Ludovic Desroches Tested-by: Nicolas Ferre # on sama5d3 xplained Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20180712192222.32481-1-robh@kernel.org Signed-off-by: Linus Walleij commit 56d5f362ad0f8f60bc7c6fd5d7bc2b528d6963f5 Author: Greg Kroah-Hartman Date: Wed Jan 11 12:30:18 2023 +0100 kobject: kset_uevent_ops: make uevent() callback take a const * The uevent() callback in struct kset_uevent_ops does not modify the kobject passed into it, so make the pointer const to enforce this restriction. When doing so, fix up all existing uevent() callbacks to have the correct signature to preserve the build. Cc: Christine Caulfield Cc: David Teigland Cc: Bob Peterson Cc: Andreas Gruenbacher Acked-by: Rafael J. Wysocki Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20230111113018.459199-17-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 2a81ada32f0e584fc0c943e0d3a8c9f4fae411d6 Author: Greg Kroah-Hartman Date: Wed Jan 11 12:30:17 2023 +0100 driver core: make struct bus_type.uevent() take a const * The uevent() callback in struct bus_type should not be modifying the device that is passed into it, so mark it as a const * and propagate the function signature changes out into all relevant subsystems that use this callback. Acked-by: Rafael J. Wysocki Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20230111113018.459199-16-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit c6e8418521a8fd2068ade2c6a1514315c99cc717 Author: Greg Kroah-Hartman Date: Wed Jan 11 12:30:16 2023 +0100 xen/xenbus: move to_xenbus_device() to use container_of_const() The driver core is changing to pass some pointers as const, so move to_xenbus_device() to use container_of_const() to handle this change. to_xenbus_device() now properly keeps the const-ness of the pointer passed into it, while as before it could be lost. Cc: Stefano Stabellini Cc: Oleksandr Tyshchenko Cc: xen-devel@lists.xenproject.org Acked-by: Juergen Gross Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20230111113018.459199-15-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit deaf8b21c803b3932071a7cf9b11f36e13000f5c Author: Greg Kroah-Hartman Date: Wed Jan 11 12:30:15 2023 +0100 mcb: move to_mcb_device() to use container_of_const() The driver core is changing to pass some pointers as const, so move to_mcb_device() to use container_of_const() to handle this change. to_mcb_device() now properly keeps the const-ness of the pointer passed into it, while as before it could be lost. Cc: Johannes Thumshirn Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20230111113018.459199-14-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit dad1b442840f690f39ce376ee0d1a1e67346983c Author: Greg Kroah-Hartman Date: Wed Jan 11 12:30:14 2023 +0100 drm/mipi-dsi: move to_mipi_dsi_device() to use container_of_const() The driver core is changing to pass some pointers as const, so move to_mipi_dsi_device() to use container_of_const() to handle this change. to_mipi_dsi_device() now properly keeps the const-ness of the pointer passed into it, while as before it could be lost. Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20230111113018.459199-13-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit af3011b6637cd7e94b2420455d41ba9e66c03aed Author: Greg Kroah-Hartman Date: Wed Jan 11 12:30:13 2023 +0100 virtio: move dev_to_virtio() to use container_of_const() The driver core is changing to pass some pointers as const, so move dev_to_virtio() to use container_of_const() to handle this change. dev_to_virtio() now properly keeps the const-ness of the pointer passed into it, while as before it could be lost. Cc: "Michael S. Tsirkin" Cc: Jason Wang Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20230111113018.459199-12-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 8afdae83e318f3cfb6eb1ee2ce289356936a663c Author: Greg Kroah-Hartman Date: Wed Jan 11 12:30:12 2023 +0100 drivers: hv: move device_to_hv_device to use container_of_const() The driver core is changing to pass some pointers as const, so move device_to_hv_device() to use container_of_const() to handle this change. device_to_hv_device() now properly keeps the const-ness of the pointer passed into it, while as before it could be lost. Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Dexuan Cui Acked-by: Wei Liu Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20230111113018.459199-11-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 2f89e23bc03e31b8e6f4994cdd954c0a7e35ca4a Author: Greg Kroah-Hartman Date: Wed Jan 11 12:30:11 2023 +0100 platform/x86: wmi: move dev_to_wblock() and dev_to_wdev to use container_of_const() The driver core is changing to pass some pointers as const, so move the dev_to_wdev() and dev_to_wblock() functions to use container_of_const() to handle this change. Both of these functions now properly keep the const-ness of the pointer passed into it, while as before it could be lost. Cc: Hans de Goede Cc: Mark Gross Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20230111113018.459199-10-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit b84d6d3b4580ad1551ada9046fbed85f3b1373af Author: Greg Kroah-Hartman Date: Wed Jan 11 12:30:10 2023 +0100 vio: move to_vio_dev() to use container_of_const() The driver core is changing to pass some pointers as const, so move to_vio_dev() to use container_of_const() to handle this change. to_vio_dev() now properly keeps the const-ness of the pointer passed into it, while as before it could be lost. Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: "David S. Miller" Cc: "Gustavo A. R. Silva" Cc: Kees Cook Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20230111113018.459199-9-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 42bb5be8936f40a1d0e618766645e7fd0cbfe591 Author: Greg Kroah-Hartman Date: Wed Jan 11 12:30:09 2023 +0100 driver core: device_get_devnode() should take a const * device_get_devnode() should take a constant * to struct device as it does not modify it in any way, so modify the function definition to do this and move it out of device.h as it does not need to be exposed to the whole kernel tree. Cc: Thomas Gleixner Cc: Jason Gunthorpe Cc: Ira Weiny Cc: Dan Williams Cc: Won Chung Acked-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20230111113018.459199-8-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit a9b12f8b4e3309c4c25d39e7ab818943b9c48c1c Author: Greg Kroah-Hartman Date: Wed Jan 11 12:30:08 2023 +0100 driver core: make struct device_type.devnode() take a const * The devnode() callback in struct device_type should not be modifying the device that is passed into it, so mark it as a const * and propagate the function signature changes out into all relevant subsystems that use this callback. Cc: Jens Axboe Cc: Alison Schofield Cc: Vishal Verma Cc: Ira Weiny Cc: Ben Widawsky Cc: Jeremy Kerr Cc: Joel Stanley Cc: Alistar Popple Cc: Eddie James Cc: Jonathan Cameron Cc: Jilin Yuan Cc: Heikki Krogerus Cc: Alan Stern Cc: Andy Shevchenko Cc: Thomas Gleixner Cc: Jason Gunthorpe Cc: "Rafael J. Wysocki" Cc: Won Chung Acked-by: Dan Williams Acked-by: Alexander Shishkin Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20230111113018.459199-7-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 162736b0d71a9630f7c99dda7cefd5600fa03d69 Author: Greg Kroah-Hartman Date: Wed Jan 11 12:30:07 2023 +0100 driver core: make struct device_type.uevent() take a const * The uevent() callback in struct device_type should not be modifying the device that is passed into it, so mark it as a const * and propagate the function signature changes out into all relevant subsystems that use this callback. Cc: Alan Stern Cc: Andreas Noever Cc: Andy Shevchenko Cc: Bard Liao Cc: Chaitanya Kulkarni Cc: Dan Williams Cc: Dmitry Torokhov Cc: Frank Rowand Cc: Ira Weiny Cc: Jason Gunthorpe Cc: Jens Axboe Cc: Jilin Yuan Cc: Jiri Slaby Cc: Len Brown Cc: Mark Gross Cc: "Martin K. Petersen" Cc: "Matthew Wilcox (Oracle)" Cc: Maximilian Luz Cc: Michael Jamet Cc: Ming Lei Cc: Pierre-Louis Bossart Cc: Rob Herring Cc: Sakari Ailus Cc: Sanyog Kale Cc: Sean Young Cc: Stefan Richter Cc: Thomas Gleixner Cc: Won Chung Cc: Yehezkel Bernat Acked-by: Rafael J. Wysocki Acked-by: Mika Westerberg # for Thunderbolt Acked-by: Mauro Carvalho Chehab Acked-by: Alexandre Belloni Acked-by: Heikki Krogerus Acked-by: Wolfram Sang Acked-by: Vinod Koul Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20230111113018.459199-6-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 49b7fc1c25481c823e391b5617546b1ad4af0852 Author: Greg Kroah-Hartman Date: Wed Jan 11 12:30:06 2023 +0100 firewire: move fw_device() and fw_unit() to use container_of_const() The driver core is changing to pass some pointers as const, so move fw_device() and fw_unit() functions to use container_of_const() to handle this change. fw_device() and fw_unit() now properly keeps the const-ness of the pointer passed into it, while as before it could be lost. This also required turning fw_parent_device() into a macro to preserve the const-ness of the pointer passed into it if necessary. Cc: Stefan Richter Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20230111113018.459199-5-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 34be683add6ccdbc9d589b79077ea7f48ff7ee0c Author: Greg Kroah-Hartman Date: Wed Jan 11 12:30:05 2023 +0100 platform/surface: aggregator: move to_ssam_device() to use container_of_const() The driver core is changing to pass some pointers as const, so move to_ssam_device() to use container_of_const() to handle this change. to_ssam_device() now properly keeps the const-ness of the pointer passed into it, while as before it could be lost. Reviewed-by: Maximilian Luz Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20230111113018.459199-4-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit fa838c8ce53714eba788ea877520788bc72c27bd Author: Greg Kroah-Hartman Date: Wed Jan 11 12:30:04 2023 +0100 i3c: move dev_to_i3cdev() to use container_of_const() The driver core is changing to pass some pointers as const, so move dev_to_i3cdev() to use container_of_const() to handle this change. dev_to_i3cdev() now properly keeps the const-ness of the pointer passed into it, while as before it could be lost. Acked-by: Alexandre Belloni Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20230111113018.459199-3-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit a77ad4bf792652340ab334956e69b46ec2fdaefb Author: Greg Kroah-Hartman Date: Wed Jan 11 12:30:03 2023 +0100 of: device: make of_device_uevent_modalias() take a const device * of_device_uevent_modalias() does not modify the device pointer passed to it, so mark it constant. In order to properly do this, a number of busses need to have a modalias function added as they were attempting to just point to of_device_uevent_modalias instead of their bus-specific modalias function. This is fine except if the prototype for a bus and device type modalias function diverges and then problems could happen. To prevent all of that, just wrap the call to of_device_uevent_modalias() directly for each bus and device type individually. Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Chen-Yu Tsai Cc: Jernej Skrabec Cc: Samuel Holland Cc: David Airlie Cc: Daniel Vetter Cc: Benjamin Herrenschmidt Cc: Rob Herring Cc: Frank Rowand Cc: Liang He Cc: Thomas Gleixner Cc: Christophe JAILLET Cc: Thomas Zimmermann Cc: Dmitry Baryshkov Cc: Douglas Anderson Cc: Lyude Paul Cc: Corentin Labbe Cc: Zou Wei Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-sunxi@lists.linux.dev Cc: dri-devel@lists.freedesktop.org Cc: devicetree@vger.kernel.org Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20230111113018.459199-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit c2ea552065e43d05bce240f53c3185fd3a066204 Merge: 86e99b5bf2781 d2a651ef18c02 Author: David S. Miller Date: Fri Jan 27 12:32:03 2023 +0000 Merge branch 'devlink-parama-cleanup' Jiri Pirko says: ==================== devlink: Cleanup params usage This patchset takes care of small cleanup of devlink params usage. Some of the patches (first 2/3) are cosmetic, but I would like to point couple of interesting ones: Patch 9 is the main one of this set and introduces devlink instance locking for params, similar to other devlink objects. That allows params to be registered/unregistered when devlink instance is registered. Patches 10-12 change mlx5 code to register non-driverinit params in the code they are related to, and thanks to patch 8 this might be when devlink instance is registered - for example during devlink reload. --- v1->v2: - Just small fix in the last patch ==================== Signed-off-by: David S. Miller commit d2a651ef18c025f672d229a3f9a274bf2c28be17 Author: Jiri Pirko Date: Thu Jan 26 08:58:38 2023 +0100 net/mlx5: Move eswitch port metadata devlink param to flow eswitch code Move the param registration and handling code into the eswitch offloads code as they are related to each other. No point in having the devlink param registration done in separate file. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit db492c1e5b1b9284f213181879f9e6aaa5ad9faf Author: Jiri Pirko Date: Thu Jan 26 08:58:37 2023 +0100 net/mlx5: Move flow steering devlink param to flow steering code Move the param registration and handling code into the flow steering code as they are related to each other. No point in having the devlink param registration done in separate file. Signed-off-by: Jiri Pirko Reviewed-by: Jacob Keller Signed-off-by: David S. Miller commit c2077fbc42aeec2f2dea1ea5ed6c86bd9b8b5e9d Author: Jiri Pirko Date: Thu Jan 26 08:58:36 2023 +0100 net/mlx5: Move fw reset devlink param to fw reset code Move the param registration and handling code into the fw reset code as they are related to each other. No point in having the devlink param registration done in separate file. Signed-off-by: Jiri Pirko Reviewed-by: Jacob Keller Signed-off-by: David S. Miller commit 075935f0ae0fbbe469a911d685f6cc59de892700 Author: Jiri Pirko Date: Thu Jan 26 08:58:35 2023 +0100 devlink: protect devlink param list by instance lock Commit 1d18bb1a4ddd ("devlink: allow registering parameters after the instance") as the subject implies introduced possibility to register devlink params even for already registered devlink instance. This is a bit problematic, as the consistency or params list was originally secured by the fact it is static during devlink lifetime. So in order to protect the params list, take devlink instance lock during the params operations. Introduce unlocked function variants and use them in drivers in locked context. Put lock assertions to appropriate places. Signed-off-by: Jiri Pirko Reviewed-by: Jakub Kicinski Reviewed-by: Jacob Keller Reviewed-by: Ido Schimmel Reviewed-by: Simon Horman Tested-by: Simon Horman Signed-off-by: David S. Miller commit 3f716a620e1314aa9abe69052bdc9df719372bd4 Author: Jiri Pirko Date: Thu Jan 26 08:58:34 2023 +0100 devlink: put couple of WARN_ONs in devlink_param_driverinit_value_get() Put couple of WARN_ONs in devlink_param_driverinit_value_get() function to clearly indicate, that it is a driver bug if used without reload support or for non-driverinit param. Signed-off-by: Jiri Pirko Reviewed-by: Jakub Kicinski Reviewed-by: Jacob Keller Signed-off-by: David S. Miller commit 85fe0b324c830ac671b811efc70ea80c3dcb2390 Author: Jiri Pirko Date: Thu Jan 26 08:58:33 2023 +0100 devlink: make devlink_param_driverinit_value_set() return void devlink_param_driverinit_value_set() currently returns int with possible error, but no user is checking it anyway. The only reason for a fail is a driver bug. So convert the function to return void and put WARN_ONs on error paths. Signed-off-by: Jiri Pirko Reviewed-by: Jakub Kicinski Reviewed-by: Jacob Keller Signed-off-by: David S. Miller commit 6fd6eda0e65d127872667054edd92e01c64f990a Author: Jiri Pirko Date: Thu Jan 26 08:58:32 2023 +0100 qed: remove pointless call to devlink_param_driverinit_value_set() devlink_param_driverinit_value_set() call makes sense only for " driverinit" params. However here, the param is "runtime". devlink_param_driverinit_value_set() returns -EOPNOTSUPP in such case and does not do anything. So remove the pointless call to devlink_param_driverinit_value_set() entirely. Signed-off-by: Jiri Pirko Reviewed-by: Jakub Kicinski Reviewed-by: Jacob Keller Signed-off-by: David S. Miller commit 2fc631b5d75d442b18c729830eb7cbaccc14c55a Author: Jiri Pirko Date: Thu Jan 26 08:58:31 2023 +0100 ice: remove pointless calls to devlink_param_driverinit_value_set() devlink_param_driverinit_value_set() call makes sense only for "driverinit" params. However here, both params are "runtime". devlink_param_driverinit_value_set() returns -EOPNOTSUPP in such case and does not do anything. So remove the pointless calls to devlink_param_driverinit_value_set() entirely. Signed-off-by: Jiri Pirko Reviewed-by: Jakub Kicinski Reviewed-by: Jacob Keller Signed-off-by: David S. Miller commit bb9bb6bfd1c37b1c0786248c2785536146603fa8 Author: Jiri Pirko Date: Thu Jan 26 08:58:30 2023 +0100 devlink: don't work with possible NULL pointer in devlink_param_unregister() There is a WARN_ON checking the param_item for being NULL when the param is not inserted in the list. That indicates a driver BUG. Instead of continuing to work with NULL pointer with its consequences, return. Signed-off-by: Jiri Pirko Reviewed-by: Jakub Kicinski Reviewed-by: Jacob Keller Signed-off-by: David S. Miller commit 020dd127a3fef9dfc6c03cd5d1c231d5e55d7632 Author: Jiri Pirko Date: Thu Jan 26 08:58:29 2023 +0100 devlink: make devlink_param_register/unregister static There is no user outside the devlink code, so remove the export and make the functions static. Move them before callers to avoid forward declarations. Signed-off-by: Jiri Pirko Reviewed-by: Jakub Kicinski Reviewed-by: Jacob Keller Signed-off-by: David S. Miller commit a756185ac3b9a846b7710a49422f7f57da638f30 Author: Jiri Pirko Date: Thu Jan 26 08:58:28 2023 +0100 net/mlx5: Covert devlink params registration to use devlink_params_register/unregister() Since mlx5 is the only user of devlink API to register/unregister a single param, convert it to use array registration function allowing to simplify the devlink API by removing the single param registration functions. Signed-off-by: Jiri Pirko Reviewed-by: Jakub Kicinski Reviewed-by: Jacob Keller Signed-off-by: David S. Miller commit c8aebff4599f4a701c271657a9ddc5e64ab98d55 Author: Jiri Pirko Date: Thu Jan 26 08:58:27 2023 +0100 net/mlx5: Change devlink param register/unregister function names The functions are registering and unregistering devlink params, so change the names accordingly. Signed-off-by: Jiri Pirko Reviewed-by: Jakub Kicinski Reviewed-by: Jacob Keller Signed-off-by: David S. Miller commit 6c488fbb1de2bf3821307f4a81449d7b2f300b34 Author: Rob Herring Date: Thu Jan 19 20:05:36 2023 -0600 dt-bindings: pinctrl: mediatek: Fix child node name patterns The child node name patterns in Mediatek pinctrl bindings don't match reality. I don't know where '-[0-9]+$' came from, but I don't see any nodes with a matching pattern. Also, patterns such as 'pins' or 'mux' are ambiguous because any prefix or suffix is allowed. If that's desired, it should be explicit. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230120020536.3229300-1-robh@kernel.org Signed-off-by: Linus Walleij commit a08cbeb1d10f2f091d4169a0ca0f4b719a53446a Author: Linus Walleij Date: Fri Jan 27 13:28:26 2023 +0100 pinctrl: at91: Tag suspend/resume __maybe_unused Tag the suspend/resume callbacks as __maybe_unused to silence complaints from the build robots. Signed-off-by: Linus Walleij commit 86e99b5bf2781735e3cc3d0fe3a57a9e6393e811 Merge: c766e077d927e 04007961bfaf7 Author: David S. Miller Date: Fri Jan 27 12:24:32 2023 +0000 Merge branch 'ethtool-netlink-next' Jakub Kicinski says: ==================== ethtool: netlink: handle SET intro/outro in the common code Factor out the boilerplate code from SET handlers to common code. I volunteered to refactor the extack in GET in a conversation with Vladimir but I gave up. The handling of failures during dump in GET handlers is a bit unclear to me. Some code uses presence of info as indication of dump and tries to avoid reporting errors altogether (including extack messages). There's also the question of whether we should have a validation callback (similar to .set_validate here) for GET. It looks like .parse_request was expected to perform the validation. It takes the extack and tb directly, not via info: int (*parse_request)(struct ethnl_req_info *req_info, struct nlattr **tb, struct netlink_ext_ack *extack); int (*prepare_data)(const struct ethnl_req_info *req_info, struct ethnl_reply_data *reply_data, struct genl_info *info); so no crashes dereferencing info possible. But .parse_request doesn't run under rtnl nor ethnl_ops_begin(). As a result some implementations defer validation until .prepare_data where all the locks are held and they can call out to the driver. All this makes me think that maybe we should refactor GET in the same direction I'm refactoring SET. Split .prepare_data, take more locks in the core, and add a validation helper which would take extack directly: - ret = ops->prepare_data(req_info, reply_data, info); + ret = ops->prepare_data_validate(req_info, reply_data, attrs, extack); + if (ret < 1) // if 0 -> skip for dump; -EOPNOTSUPP in do + goto err1; + + ret = ethnl_ops_begin(dev); + if (ret) + goto err1; + + ret = ops->prepare_data(req_info, reply_data); // no extack + ethnl_ops_complete(dev); I'll file that away as a TODO for posterity / older me. v2: - invert checks for coalescing to avoid error code changes - rebase and convert MM as well v1: https://lore.kernel.org/all/20230121054430.642280-1-kuba@kernel.org/ ==================== Signed-off-by: David S. Miller commit 04007961bfaf76894b65de2af67f96d9d1fa82cf Author: Jakub Kicinski Date: Wed Jan 25 15:05:19 2023 -0800 ethtool: netlink: convert commands to common SET Convert all SET commands where new common code is applicable. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 99132b6eb7927a549351f57638a1d560039f06f9 Author: Jakub Kicinski Date: Wed Jan 25 15:05:18 2023 -0800 ethtool: netlink: handle SET intro/outro in the common code Most ethtool SET callbacks follow the same general structure. ethnl_parse_header_dev_get() rtnl_lock() ethnl_ops_begin() ... do stuff ... ethtool_notify() ethnl_ops_complete() rtnl_unlock() ethnl_parse_header_dev_put() This leads to a lot of copy / pasted code an bugs when people mis-handle the error path. Add a generic implementation of this pattern with a .set callback in struct ethnl_request_ops called to "do stuff". Also add an optional .set_validate which is called before ethnl_ops_begin() -- a lot of implementations do basic request capability / sanity checking at that point. Because we want to avoid generating the notification when no change happened - adopt a slightly hairy return values: - 0 means nothing to do (no notification) - 1 means done / continue - negative error codes on error Reuse .hdr_attr from struct ethnl_request_ops, GET and SET use the same attr spaces in all cases. Convert pause as an example (and to avoid unused function warnings). Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 087b9dda8658052a33031ef82a8d8ef77a7c94ea Author: Astrid Rost Date: Mon Jan 23 14:59:13 2023 +0100 ASoC: ts3a227e: add set_jack and get_jack_type Add set_jack and get_jack_type to allow simple-card-utils to add a jack for it. Signed-off-by: Astrid Rost Link: https://lore.kernel.org/r/20230123135913.2720991-4-astrid.rost@axis.com Signed-off-by: Mark Brown commit 9b271207ac83db362fac757d367923bde57dce86 Author: Astrid Rost Date: Mon Jan 23 14:59:12 2023 +0100 ASoC: simple-card-utils: create jack inputs for aux_devs Add a generic way to create jack inputs for auxiliary jack detection drivers (e.g. via i2c, spi), which are not part of any real codec. The simple-card can be used as combining card driver to add the jacks, no new one is required. Create a jack (for input-events) for jack devices in the auxiliary device list (aux_devs). A device which returns a valid value on get_jack_type counts as jack device; set_jack is required to add the jack to the device. Signed-off-by: Astrid Rost Link: https://lore.kernel.org/r/20230123135913.2720991-3-astrid.rost@axis.com Signed-off-by: Mark Brown commit df55122ba0955951a85ef3ffb19f0dcb0ad3ffbb Author: Astrid Rost Date: Mon Jan 23 14:59:11 2023 +0100 ASoC: soc-component: add get_jack_type Add function to return the jack type of snd_jack_types. This allows a generic card driver to add a jack with the specified type. Signed-off-by: Astrid Rost Link: https://lore.kernel.org/r/20230123135913.2720991-2-astrid.rost@axis.com Signed-off-by: Mark Brown commit 0f6d2cee58f1ff2ebf66f0bceb113d79f66ecb07 Author: Randy Dunlap Date: Thu Jan 26 22:39:57 2023 -0800 spi: correct spelling Correct spelling problems for Documentation/spi/ as reported by codespell. Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20230127064005.1558-28-rdunlap@infradead.org Signed-off-by: Mark Brown commit fad8ddda1c40c00bff4ac45eb9b85e1f717f17f4 Author: Uwe Kleine-König Date: Fri Jan 27 11:17:26 2023 +0100 regulator: max20411: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230127101726.1313927-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 251a2b11851531526260db1dbc5673a7d6177895 Author: Peter Ujfalusi Date: Fri Jan 27 14:00:31 2023 +0200 ASoC: SOF: ipc4-pcm: Do not run the trigger pipelines if no spipe is stored If the pipeline setup fails at the first widget/pipeline then we will have no spipe stored under the pipeline_list->pipelines, the pipeline_list->count is 0. If this is the case we would have a NULL pointer dereference if the execution is allowed to proceed. Check for this condition along with the pipeline_list->pipelines check Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20230127120031.10709-19-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit f94f3915274d22d5cd8b253e0533822b934f5f41 Author: Peter Ujfalusi Date: Fri Jan 27 14:00:30 2023 +0200 ASoC: SOF: Protect swidget->use_count with mutex for kcontrol access race The use_count of the swidget is protect by ALSA core PCM locking with the exception when an associated kcontrol is changed. It has been observed that a rightly timed kcontrol access during stream stop can result of an attempt to send a control update to a widget which has been freed up between the check of the use_count and the message sending. We need to protect the entire sof_widget_setup() and sof_widget_free() execution to make it safe to rely on the use_count. Move the code under an _unlocked() function and use a mutex to protect the execution of the functions for concurrency. On the control path we need to use the lock only for the kcontrol access, the widget_kcontrol_setup() op is called with the lock already held. Reported-by: Guennadi Liakhovetski Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20230127120031.10709-18-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 955a6f131a50c3685c560ef7b75880d272337b33 Author: Peter Ujfalusi Date: Fri Jan 27 14:00:29 2023 +0200 ASoC: SOF: Avoid double decrementing use_count in sof_widget_setup on error The sof_widget_free() on the error path will decrement the use count and if we jump to widget_free: then the use_count will be decremented by two, which is not correct as we only incremented once with 1. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20230127120031.10709-17-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 6bc4d1b714aafc0ee3c7649c36aa19998b4c11f9 Author: Ranjani Sridharan Date: Fri Jan 27 14:00:28 2023 +0200 ASoC: SOF: ipc4-topology: Protect pipeline free with mutex When starting/stopping multiple streams in parallel, pipeline triggers and pipeline frees can get interleaved. So use the same mutex used for pipeline trigger to protect the pipeline frees as well. Rename the trigger_mutex to pipeline_state_mutex for more clarity. Signed-off-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230127120031.10709-16-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 32c4b69872e5fe5fd9517826be31dbf2c3dd917a Author: Ranjani Sridharan Date: Fri Jan 27 14:00:27 2023 +0200 ASoC: SOF: ipc4-pcm: Implement pipeline trigger reference counting Use the started_count and paused_count to implement reference counting when making decisions to start/stop/pause pipelines during the FE DAI trigger. This is necessary to trigger the shared pipelines in the FE DAI trigger properly. With IPC4, the FE trigger will issue multiple pipeline state changes, and the triggers are propagated downstream to connected pipelines by the SOF driver - not the firmware. This creates a window for race conditions where an FE trigger preempts another one, which results in inconsistent pipeline states and refcounts. This patch introduces a mutex lock for the pcm trigger that guarantees that IPC4 state and resources are accessed in a serialized manner. 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/20230127120031.10709-15-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 6f9eb19a33d608ba36162a9ccbd34a77249fcc2e Author: Ranjani Sridharan Date: Fri Jan 27 14:00:26 2023 +0200 ASoC: SOF: ipc4-pcm: Rename 'data' variable to trigger_list For more clarity, rename the struct ipc4_pipeline_set_state_data variable to trigger_list instead of data. No functionality change. 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/20230127120031.10709-14-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 9c04363d222bc94d49d883458b2854334a848b5f Author: Ranjani Sridharan Date: Fri Jan 27 14:00:25 2023 +0200 ASoC: SOF: Introduce struct snd_sof_pipeline Introduce struct snd_sof_pipeline to save the information about pipelines including the pipeline widget, their status wrt how many PCM's are using them and whether they are complete or not. In struct snd_sof_widget, replace pipe_widget with spipe and remove complete. In struct snd_sof_pcm_stream_pipeline_list, replace pipe_widgets with pipelines. Update all users accordingly. 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/20230127120031.10709-13-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 2d271af1af241e64726ada07c6bef6572f1be6a5 Author: Ranjani Sridharan Date: Fri Jan 27 14:00:24 2023 +0200 ASoC: SOF: ipc4-pcm: Use the PCM stream's pipeline_info during trigger Use the list of pipelines in the PCM stream's pipeline info to trigger the pipelines in the right order. Add a helper for triggering pipelines in batch mode that will be used to trigger multiple pipelines at the same time. Signed-off-by: Ranjani Sridharan Reviewed-by: Libin Yang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230127120031.10709-12-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 19137532dbe32ff2c8b5b1442c077bf3abff86f3 Author: Ranjani Sridharan Date: Fri Jan 27 14:00:23 2023 +0200 ASoC: SOF: sof-audio: Populate the PCM stream pipeline_info Populate the pipeline_info for the PCM stream with the list of pipeline widgets that need to be handled during the PCM trigger. This will be used in the IPC-specific PCM trigger op to trigger the pipelines. Signed-off-by: Ranjani Sridharan Reviewed-by: Libin Yang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230127120031.10709-11-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 37a26eec53b09b7054234b77200ce729601b0ccb Author: Ranjani Sridharan Date: Fri Jan 27 14:00:22 2023 +0200 ASoC: SOF: ipc4: Add flag to skip triggering pipelines during FE DAI trigger Add a new flag, skip_during_fe_trigger, to struct sof_ipc4_pipeline to skip triggering pipelines in the FE DAI trigger. Set this flag for the HDA DAI BE pipelines so that their BE pipeline will not be triggered in the FE DAI trigger. Also, move the trigger handling for all commands include START/PAUSE_RELEASE for the HDA DAI's to the backend DAI trigger ops. For the SSP/DMIC/SDW cases, remove the BE DAI trigger as they involve no DMA operations and can be triggered in the FE DAI trigger. This is in preparation to perform batch triggering of all pipelines for the non-HDA case. Signed-off-by: Ranjani Sridharan Reviewed-by: Libin Yang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230127120031.10709-10-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit ba223b3ad0b9f1753f0822c5c441a925cc82b63a Author: Ranjani Sridharan Date: Fri Jan 27 14:00:21 2023 +0200 ASoC: SOF: ipc4-pcm: Define pcm_setup/free ops Define the pcm_setup/pcm_free ops for IPC4. Define a new struct snd_sof_pcm_stream_trigger_info and add a new field trigger_info of this type to struct snd_sof_pcm_stream. This will be used to save the list of pipelines that need to be triggered. Signed-off-by: Ranjani Sridharan Reviewed-by: Libin Yang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230127120031.10709-9-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 7201a3d47e8a6a0b3a55125e70a9c650afabe7b0 Author: Ranjani Sridharan Date: Fri Jan 27 14:00:20 2023 +0200 ASoC: SOF: Introduce PCM setup/free PCM IPC ops These will be used to perform IPC-specific PCM setup/free. Signed-off-by: Ranjani Sridharan Reviewed-by: Libin Yang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230127120031.10709-8-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit e380c9071032b89ea2e77b871792d908d0f15512 Author: Ranjani Sridharan Date: Fri Jan 27 14:00:19 2023 +0200 ASoC: SOF: topology: Set IPC-specific trigger order for DAI links Add a new topology IPC op to set up DAI links and set the link trigger order to match the expectation based on the IPC type. Note that the link_setup op implementations for IPC3 and IPC4 are not identical and have contrasting trigger orders for playback and capture. Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230127120031.10709-7-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 82b18242ae68214c44ccb13e993c2bc925f28428 Author: Ranjani Sridharan Date: Fri Jan 27 14:00:18 2023 +0200 ASoC: SOF: pcm: do not free widgets during suspend trigger IPC3 and IPC4 have different requirements for the order in which the FE CPU and BE CPU DAI trigger callbacks must be invoked. With a regular PCM start/stop, pipeline widgets are set up during hw_params and freed during hw_free. But when the system is suspended when a PCM is running, pipeline widgets are freed during the SUSPEND trigger callback for the FE CPU DAI. In order to avoid freeing the pipeline widgets before the BE CPU DAI trigger is executed, the trigger order was modified in previous contributions in the PCM dai_link_fixup callback to make sure that the BE CPU DAI trigger stop/suspend is always invoked before the FE CPU DAI trigger. But this contradicts the firmware requirement for IPC4 w.r.t. ordering of pipeline triggers. So, remove the freeing of pipeline widgets during FE CPU DAI suspend trigger and handle it during system suspend when the tear_down_all_pipelines() IPC op is invoked. This will be followed up with a patch to fix the trigger order for IPC4. Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230127120031.10709-6-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 4639029b046bcab11bd566afa2979c68edeb338a Author: Ranjani Sridharan Date: Fri Jan 27 14:00:17 2023 +0200 ASoC: SOF: sof-audio: Only process widgets in the connected widget list When walking the list of the widgets from the source to the sink, we accidentally also end up preparing/setting up the widgets that are not in the list of connected DAPM widgets associated with the PCM. Avoid this by checking if a widget is part of the connected DAPM widget list during widget prepare, unprepare, setup or free. Signed-off-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230127120031.10709-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 73ea660947b52969214473434396a33d283c5ac8 Author: Ranjani Sridharan Date: Fri Jan 27 14:00:16 2023 +0200 ASoC: SOF: sof-audio: Set up/free DAI/AIF widgets only once Calling the sof_widget_setup/free() for the DAI/AIF widgets inside the snd_soc_dapm_widget_for_each_sink_path() loop will end up setting up or freeing the widget multiple times if there are multiple paths leaving the widget. Fix this by moving the widget setup/free for the starting widget in each path outside the loop. Signed-off-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230127120031.10709-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 5edcf2a3aad41ee398ac011cda7bccca400b56f0 Author: Ranjani Sridharan Date: Fri Jan 27 14:00:15 2023 +0200 ASoC: soc-pcm: Export widget_in_list() Export the widget_in_list() function to be used by other modules. Signed-off-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230127120031.10709-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 9a62d87acee94919af1fe92f2412fff83dcbcda0 Author: Ranjani Sridharan Date: Fri Jan 27 14:00:14 2023 +0200 ASoC: SOF: ipc4-topology: No need to unbind routes within a pipeline The FW currently ignores unbinding routes if the source and sink widgets belong to the same pipeline. So no need to send the IPC at all in the first place. 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/20230127120031.10709-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit c766e077d927e1775902c18827205ea2ade3a35d Author: Christian Marangi Date: Wed Jan 25 21:35:17 2023 +0100 net: dsa: qca8k: convert to regmap read/write API Convert qca8k to regmap read/write bulk API. The mgmt eth can write up to 32 bytes of data at times. Currently we use a custom function to do it but regmap now supports declaration of read/write bulk even without a bus. Drop the custom function and rework the regmap function to this new implementation. Rework the qca8k_fdb_read/write function to use the new regmap_bulk_read/write as the old qca8k_bulk_read/write are now dropped. Cc: Mark Brown Signed-off-by: Christian Marangi Signed-off-by: David S. Miller commit e03cea60c3db8c6b011cc36ecef9281dff8377f3 Author: Christian Marangi Date: Wed Jan 25 21:35:16 2023 +0100 net: dsa: qca8k: add QCA8K_ATU_TABLE_SIZE define for fdb access Add and use QCA8K_ATU_TABLE_SIZE instead of hardcoding the ATU size with a pure number and using sizeof on the array. Signed-off-by: Christian Marangi Signed-off-by: David S. Miller commit b34fc158d56620fd2f5db40e39326424082b2683 Merge: 6e65bb52e3fbc 21bf73158fe7a Author: David S. Miller Date: Fri Jan 27 11:19:46 2023 +0000 Merge branch 'net-skbuff-includes' Jakub Kicinski says: ==================== net: skbuff: clean up unnecessary includes skbuff.h is included in a significant portion of the tree. Clean up unused dependencies to speed up builds. This set only takes care of the most obvious cases. ==================== Signed-off-by: David S. Miller commit 21bf73158fe7ae8a3d55618e58edc958f84739a8 Author: Jakub Kicinski Date: Wed Jan 25 23:14:24 2023 -0800 net: remove unnecessary includes from net/flow.h This file is included by a lot of other commonly included headers, it doesn't need socket.h or flow_dissector.h. This reduces the size of this file after pre-processing from 28165 to 4663. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 9dd0db2b1303a489dd9a6d6de499fa89e6f88b93 Author: Jakub Kicinski Date: Wed Jan 25 23:14:23 2023 -0800 net: skbuff: drop the linux/hrtimer.h include linux/hrtimer.h include was added because apparently it used to contain ktime related code. This is no longer the case and we include linux/time.h explicitly. Sadly this change is currently a noop because linux/dma-mapping.h and net/page_pool.h pull in half of the universe. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 5255c0ca798347fbfa9e2ec24276d6515cf2a7e3 Author: Jakub Kicinski Date: Wed Jan 25 23:14:22 2023 -0800 net: skbuff: drop the linux/splice.h include splice.h is included since commit a60e3cc7c929 ("net: make skb_splice_bits more configureable") but really even then all we needed is some forward declarations. Most of that code is now gone, and remaining has fwd declarations. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 509f15b9c551b750d8f634d404805c3860e9ea17 Author: Jakub Kicinski Date: Wed Jan 25 23:14:21 2023 -0800 net: add missing includes of linux/splice.h Number of files depend on linux/splice.h getting included by linux/skbuff.h which soon will no longer be the case. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 422164224e32525f88aa9633dea176484fe2c50c Author: Jakub Kicinski Date: Wed Jan 25 23:14:20 2023 -0800 net: skbuff: drop the linux/sched.h include linux/sched.h was added for skb_mstamp_* (all the way back before linux/sched.h got split and linux/sched/clock.h created). We don't need it in skbuff.h any more. Sadly this change is currently a noop because linux/dma-mapping.h and net/page_pool.h pull in half of the universe. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 9ac849f2c4925a29749d27586790f8365ee91889 Author: Jakub Kicinski Date: Wed Jan 25 23:14:19 2023 -0800 net: skbuff: drop the linux/sched/clock.h include It used to be necessary for skb_mstamp_* static inlines, but those are gone since we moved to usec timestamps in TCP, in 2017. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 2870c4d6a5e479659cb84992717189634c1e71e0 Author: Jakub Kicinski Date: Wed Jan 25 23:14:18 2023 -0800 net: add missing includes of linux/sched/clock.h Number of files depend on linux/sched/clock.h getting included by linux/skbuff.h which soon will no longer be the case. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 2195e2a024aef567aea6ea0b0dab52f77bcc7b55 Author: Jakub Kicinski Date: Wed Jan 25 23:14:17 2023 -0800 net: skbuff: drop the linux/textsearch.h include This include was added for skb_find_text() but all we need there is a forward declaration of struct ts_config. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 68f4eae781dd25aca2eb84ca2279663689db8d19 Author: Jakub Kicinski Date: Wed Jan 25 23:14:16 2023 -0800 net: checksum: drop the linux/uaccess.h include net/checksum.h pulls in linux/uaccess.h which is large. In the x86 header the include seems to not be needed at all. ARM on the other hand does not include uaccess.h, even tho it calls access_ok(). In the generic implementation guard the include of linux/uaccess.h with the same condition as the code that needs it. With this change pre-processed net/checksum.h shrinks on x86 from 30616 lines to just 1193. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 9a859da287870715a22ce05d6ae377ae8ac79cc3 Author: Jakub Kicinski Date: Wed Jan 25 23:14:15 2023 -0800 net: skbuff: drop the linux/net.h include It appears nothing needs it. The kernel builds fine with this include removed, building an otherwise empty source file with: #include #ifdef _LINUX_NET_H #error linux/net.h is back #endif works too (meaning net.h is not just pulled in indirectly). This gives us a slight 0.5% reduction in the pre-processed size of skbuff.h. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit ac62f60619fa5b53144fefdca6d2a219125a0228 Author: Jakub Kicinski Date: Wed Jan 25 23:14:14 2023 -0800 net: add missing includes of linux/net.h linux/net.h will soon not be included by linux/skbuff.h. Fix the cases where source files were depending on the implicit include. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 6e65bb52e3fbcf6c65aee0e46a6b082e54faa89a Merge: c8005511f3875 55c6eae70ff18 Author: David S. Miller Date: Fri Jan 27 11:16:29 2023 +0000 Merge branch 'ipa-abstract-status' Alex Elder says: ==================== net: ipa: abstract status parsing Under some circumstances, IPA generates a "packet status" structure that describes information about a packet. This is used, for example, when offload hardware detects an error in a packet, or otherwise discovers a packet needs special handling. In this case, the status is delivered (along with the packet it describes) to a "default" endpoint so that it can be handled by the AP. Until now, the structure of this status information hasn't changed. However, to support more than 32 endpoints, this structure required some changes, such that some fields are rearranged in ways that are tricky to represent using C code. This series updates code related to the IPA status structure. The first patch uses a local variable to avoid recomputing a packet length more than once. The second stops using sizeof() to determine the size of an IPA packet status structure. Patches 3-5 extend the definitions for values held in packet status fields. Patch 6 does a little general cleanup to make patch 7 simpler. Patch 7 stops using a C structure to represent packet status; instead, a new function fetches values "by name" from a buffer containing such a structure. The last patch updates this function so it also supports IPA v5.0+. ==================== Signed-off-by: David S. Miller commit 55c6eae70ff1833a5080bfef0bed10ebf4e22cec Author: Alex Elder Date: Wed Jan 25 14:45:45 2023 -0600 net: ipa: add IPA v5.0 packet status support Update ipa_status_extract() to support IPA v5.0 and beyond. Because the format of the IPA packet status depends on the version, pass an IPA pointer to the function. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit ebd2a82ecea8f6cb9165d6a05c23da16e1ec5669 Author: Alex Elder Date: Wed Jan 25 14:45:44 2023 -0600 net: ipa: introduce generalized status decoder Stop assuming the IPA packet status has a fixed format (defined by a C structure). Instead, use a function to extract each field from a block of data interpreted as an IPA packet status. Define an enumerated type that identifies the fields that can be extracted. The current function extracts fields based on the existing ipa_status structure format (which is no longer used). Define IPA_STATUS_RULE_MISS, to replace the calls to field_max() to represent that condition; those depended on the knowing the width of a filter or router rule in the IPA packet status structure. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 02c5077439fc7d4cd885add2d4e2d3e678b23e21 Author: Alex Elder Date: Wed Jan 25 14:45:43 2023 -0600 net: ipa: IPA status preparatory cleanups The next patch reworks how the IPA packet status structure is interpreted. This patch does some preparatory work, to make it easier to see the effect of that change: - Change a few functions that access fields in a IPA packet status structure to store field values in local variables with names related to the field. - Pass a void pointer rather than an (equivalent) status pointer to two functions called by ipa_endpoint_status_parse(). - Use "rule" rather than "val" as the name of a variable that holds a routing rule ID. - Consistently use "IPA packet status" rather than "status element" when referring to this data structure. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit ec4c24f6a51104579bf54fa3a90df9fd5e8152d1 Author: Alex Elder Date: Wed Jan 25 14:45:42 2023 -0600 net: ipa: define remaining IPA status field values Define the remaining values for opcode and exception fields in the IPA packet status structure. Most of these values are powers-of-2, suggesting they are meant to be used as bitmasks, but that is not the case. Add comments to be clear about this, and express the values in decimal format. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit cbea4761173dd962c7d057b580f991d3e713039a Author: Alex Elder Date: Wed Jan 25 14:45:41 2023 -0600 net: ipa: rename the NAT enumerated type Rename the ipa_nat_en enumerated type to be ipa_nat_type, and rename its symbols accordingly. Add a comment indicating those values are also used in the IPA status nat_type field. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 8e71708bb25e8f8a33d1bc90e651d73988b15dde Author: Alex Elder Date: Wed Jan 25 14:45:40 2023 -0600 net: ipa: define all IPA status mask bits There is a 16 bit status mask defined in the IPA packet status structure, of which only one (TAG_VALID) is currently used. Define all other IPA status mask values in an enumerated type whose numeric values are bit mask values (in CPU byte order) in the status mask. Use the TAG_VALID value from that type rather than defining a separate field mask. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit b8dc7d0eea5a7709bb534f1b3ca70d2d7de0b42c Author: Alex Elder Date: Wed Jan 25 14:45:39 2023 -0600 net: ipa: stop using sizeof(status) The IPA packet status structure changes in IPA v5.0 in ways that are difficult to represent cleanly. As a small step toward redefining it as a parsed block of data, use a constant to define its size, rather than the size of the IPA status structure type. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 63a560b5289a0f9d66d099fb093c20b0abe01027 Author: Alex Elder Date: Wed Jan 25 14:45:38 2023 -0600 net: ipa: refactor status buffer parsing The packet length encoded in an IPA packet status buffer is computed more than once in ipa_endpoint_status_parse(). It is also checked again in ipa_endpoint_status_skip(), which that function calls. Compute the length once, and use that computed value later rather than recomputing it. Check for it being zero in the parse function rather than in ipa_endpoint_status_skip(). Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit abc3100fcba6827444ef4bdb17065ac3b6619dff Author: Hans de Goede Date: Fri Jan 20 12:45:17 2023 +0100 leds: led-class: Add generic [devm_]led_get() Add a generic [devm_]led_get() method which can be used on both devicetree and non devicetree platforms to get a LED classdev associated with a specific function on a specific device, e.g. the privacy LED associated with a specific camera sensor. Note unlike of_led_get() this takes a string describing the function rather then an index. This is done because e.g. camera sensors might have a privacy LED, or a flash LED, or both and using an index approach leaves it unclear what the function of index 0 is if there is only 1 LED. This uses a lookup-table mechanism for non devicetree platforms. This allows the platform code to map specific LED class_dev-s to a specific device,function combinations this way. For devicetree platforms getting the LED by function-name could be made to work using the standard devicetree pattern of adding a -names string array to map names to the indexes. Reviewed-by: Linus Walleij Signed-off-by: Hans de Goede Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230120114524.408368-5-hdegoede@redhat.com commit 537bdca2a085f524b74ac2aa83822d081c585ca6 Author: Hans de Goede Date: Fri Jan 20 12:45:16 2023 +0100 leds: led-class: Add __devm_led_get() helper Add a __devm_led_get() helper which registers a passed in led_classdev with devm for unregistration. This is a preparation patch for adding a generic (non devicetree specific) devm_led_get() function. Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Hans de Goede Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230120114524.408368-4-hdegoede@redhat.com commit fafef58ef419f08bb761714a109870b617ac0bc0 Author: Hans de Goede Date: Fri Jan 20 12:45:15 2023 +0100 leds: led-class: Add led_module_get() helper Split out part of of_led_get() into a generic led_module_get() helper function. This is a preparation patch for adding a generic (non devicetree specific) led_get() function. Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Hans de Goede Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230120114524.408368-3-hdegoede@redhat.com commit 445110941eb94709216363f9d807d2508e64abd7 Author: Hans de Goede Date: Fri Jan 20 12:45:14 2023 +0100 leds: led-class: Add missing put_device() to led_put() led_put() is used to "undo" a successful of_led_get() call, of_led_get() uses class_find_device_by_of_node() which returns a reference to the device which must be free-ed with put_device() when the caller is done with it. Add a put_device() call to led_put() to free the reference returned by class_find_device_by_of_node(). And also add a put_device() in the error-exit case of try_module_get() failing. Fixes: 699a8c7c4bd3 ("leds: Add of_led_get() and led_put()") Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Hans de Goede Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230120114524.408368-2-hdegoede@redhat.com commit 42a9a08b9aa69134981d1564f95eb06c0469eff3 Author: Herbert Xu Date: Sun Jan 22 16:56:02 2023 +0800 crypto: engine - Fix excess parameter doc warning The engine parameter should not be marked for kernel doc as it triggers a warning. Signed-off-by: Herbert Xu commit 51c082514c2dedf2711c99d93c196cc4eedceb40 Author: Herbert Xu Date: Sun Jan 22 16:07:37 2023 +0800 crypto: xts - Handle EBUSY correctly As it is xts only handles the special return value of EINPROGRESS, which means that in all other cases it will free data related to the request. However, as the caller of xts may specify MAY_BACKLOG, we also need to expect EBUSY and treat it in the same way. Otherwise backlogged requests will trigger a use-after-free. Fixes: 8083b1bf8163 ("crypto: xts - add support for ciphertext stealing") Signed-off-by: Herbert Xu Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 4bc713a49d7f97f7328e5a595b8f5d231d9ebfca Author: Herbert Xu Date: Sun Jan 22 15:32:03 2023 +0800 crypto: caam - Use ahash_request_complete Instead of calling the base completion function directly, use the correct ahash helper which is ahash_request_complete. Signed-off-by: Herbert Xu Reviewed-by: Gaurav Jain Signed-off-by: Herbert Xu commit 654627ad0beeb8658cbb809028a0e17df961ee9d Author: Herbert Xu Date: Thu Jan 19 18:36:58 2023 +0800 crypto: bcm - Use subrequest for fallback Instead of doing saving and restoring on the AEAD request object for fallback processing, use a subrequest instead. Signed-off-by: Herbert Xu commit e16dda2b69ba36c01522735221f08e9dd8f438d3 Author: Herbert Xu Date: Thu Jan 19 17:01:39 2023 +0800 crypto: cryptd - Remove unnecessary skcipher_request_zero Previously the child skcipher request was stored on the stack and therefore needed to be zeroed. As it is now dynamically allocated we no longer need to do so. Signed-off-by: Herbert Xu commit e9040736d24852a618602300beec1f35fe0c42f8 Author: ye xingchen Date: Thu Jan 19 15:36:49 2023 +0800 crypto: aspeed - 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: Herbert Xu commit aaf16cdca641267c93aa0826de5f13582304bcb8 Author: Yang Yingliang Date: Thu Jan 19 09:48:59 2023 +0800 crypto: aspeed - change aspeed_acry_akcipher_algs to static aspeed_acry_akcipher_algs is only used in aspeed-acry.c now, change it to static. Signed-off-by: Yang Yingliang Acked-by: Andrew Jeffery Reviewed-by: Neal Liu Signed-off-by: Herbert Xu commit 1b4744e107e3d6eeda6473fefee5e2b904b85b8b Author: Vladis Dronov Date: Tue Jan 17 18:20:06 2023 +0100 crypto: testmgr - disallow certain DRBG hash functions in FIPS mode According to FIPS 140-3 IG, section D.R "Hash Functions Acceptable for Use in the SP 800-90A DRBGs", modules certified after May 16th, 2023 must not support the use of: SHA-224, SHA-384, SHA512-224, SHA512-256, SHA3-224, SHA3-384. Disallow HMAC and HASH DRBGs using SHA-384 in FIPS mode. Signed-off-by: Vladis Dronov Reviewed-by: Stephan Müller Signed-off-by: Herbert Xu commit c388f458bc34eb3a5728b67f6614f9375cd99087 Author: Jia Jie Ho Date: Tue Jan 17 09:54:44 2023 +0800 hwrng: starfive - Add TRNG driver for StarFive SoC This adds driver support for the hardware random number generator in Starfive SoCs and adds StarFive TRNG entry to MAINTAINERS. Co-developed-by: Jenny Zhang Signed-off-by: Jenny Zhang Signed-off-by: Jia Jie Ho Signed-off-by: Herbert Xu commit a482b02d6ae0d82c3c616ec0fb2a7b3080707e48 Author: Jia Jie Ho Date: Tue Jan 17 09:54:43 2023 +0800 dt-bindings: rng: Add StarFive TRNG module Add documentation to describe Starfive true random number generator module. Co-developed-by: Jenny Zhang Signed-off-by: Jenny Zhang Signed-off-by: Jia Jie Ho Reviewed-by: Krzysztof Kozlowski Reviewed-by: Conor Dooley Signed-off-by: Herbert Xu commit 4fc790d7d6b15eb4b90d297eb8c93589748e0c49 Author: Tom Lendacky Date: Mon Jan 16 14:04:40 2023 -0600 crypto: ccp - Add a firmware definition for EPYC gen 4 processors Add a new MODULE_FIRMWARE() entry for 4th generation EPYC processors. Signed-off-by: Tom Lendacky Signed-off-by: Herbert Xu commit 675c39196ce3b47307dfc339dade6e6946ee1e1b Author: Tom Lendacky Date: Mon Jan 16 14:03:26 2023 -0600 crypto: ccp - Provide MMIO register naming for documenation Add comments next to the version data MMIO register values to identify the register name being used. Signed-off-by: Tom Lendacky Signed-off-by: Herbert Xu commit 2cda1de0cb578900de6ac17a32d1d859f4798b99 Author: Kunihiko Hayashi Date: Wed Jan 25 10:01:59 2023 +0900 mmc: uniphier-sd: Add control to switch UHS speed SD interface logic has the register to switch UHS speed. The default is up to SDR25 and to support SDR50 or faster, add uniphier_sd_speed_switch() function to switch the speed mode. Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/20230125010201.28246-4-hayashi.kunihiko@socionext.com Signed-off-by: Ulf Hansson commit 1c325ed9f95ad283926753558d364df1cd73410a Author: Kunihiko Hayashi Date: Wed Jan 25 10:01:58 2023 +0900 mmc: uniphier-sd: Add control of UHS mode using SD interface logic Transition of UHS mode needs to control the register in SD interface logic. Add access to the register in the logic using the regmap from "socionext,syscon-uhs-mode" property. Define the start_signal_voltage_switch function only if UHS mode is available. Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/20230125010201.28246-3-hayashi.kunihiko@socionext.com Signed-off-by: Ulf Hansson commit 388dcd9505a40dbff7016a01ae02de4e946acf82 Author: Kunihiko Hayashi Date: Wed Jan 25 10:01:57 2023 +0900 dt-bindings: mmc: uniphier-sd: Add socionext,syscon-uhs-mode property UHS mode control is included in the interface logic represented by syscon. To refer this, add new property "socionext,syscon-uhs-mode". Signed-off-by: Kunihiko Hayashi Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230125010201.28246-2-hayashi.kunihiko@socionext.com Signed-off-by: Ulf Hansson commit 869b9eddf0b38a22c27a400e2fa849d2ff2aa7e1 Author: Ilpo Järvinen Date: Mon Jan 16 12:08:44 2023 +0200 mfd: intel-m10-bmc: Add PMCI driver Add the mfd driver for the Platform Management Component Interface (PMCI) based interface of Intel MAX10 BMC controller. PMCI is a software-visible interface, connected to card BMC which provided the basic functionality of read/write BMC register. The access to the register is done indirectly via a hardware controller/bridge that handles read/write/clear commands and acknowledgments for the commands. Previously, intel-m10-bmc provided sysfs under /sys/bus/spi/devices/... which is generalized in this change because not all MAX10 BMC appear under SPI anymore. Co-developed-by: Tianfei zhang Signed-off-by: Tianfei zhang Co-developed-by: Russ Weight Signed-off-by: Russ Weight Co-developed-by: Matthew Gerlach Signed-off-by: Matthew Gerlach Reviewed-by: Xu Yilun Signed-off-by: Ilpo Järvinen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230116100845.6153-11-ilpo.jarvinen@linux.intel.com commit 001a734a55d09aa1716eb2cd5ccab8b4d7a068a2 Author: Ilpo Järvinen Date: Mon Jan 16 12:08:43 2023 +0200 fpga: m10bmc-sec: Make rsu status type specific The rsu status field moves from the doorbell register to the auth result register in the PMCI implementation of the MAX10 BMC. In order to prepare for that, refactor the sec update driver code to have a type specific ops that provides ->rsu_status(). Co-developed-by: Tianfei zhang Signed-off-by: Tianfei zhang Co-developed-by: Russ Weight Signed-off-by: Russ Weight Signed-off-by: Ilpo Järvinen Acked-by: Xu Yilun Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230116100845.6153-10-ilpo.jarvinen@linux.intel.com commit da04fa8c40c339da7bb6de463ef83bc141d1111e Author: Ilpo Järvinen Date: Mon Jan 16 12:08:42 2023 +0200 fpga: m10bmc-sec: Create helpers for rsu status/progress checks RSU_STAT_* and RSU_PROG_* checks are done in more than one place in the sec update code. Move the checks into new helper functions. No function changes intended. Co-developed-by: Tianfei zhang Signed-off-by: Tianfei zhang Co-developed-by: Russ Weight Signed-off-by: Russ Weight Acked-by: Xu Yilun Signed-off-by: Ilpo Järvinen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230116100845.6153-9-ilpo.jarvinen@linux.intel.com commit bcababfc60ccc622268b2317a22fabd879fbc0a3 Author: Ilpo Järvinen Date: Mon Jan 16 12:08:41 2023 +0200 mfd: intel-m10-bmc: Prefix register defines with M10BMC_N3000 Prefix the M10BMC defines register defines with M10BMC_N3000 to make it more obvious these are related to some board type. All current non-N3000 board types have the same layout so they'll be reused. The less generic makes it more obvious they're not meant for the generic/interface agnostic code. Reviewed-by: Russ Weight Reviewed-by: Xu Yilun Signed-off-by: Ilpo Järvinen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230116100845.6153-8-ilpo.jarvinen@linux.intel.com commit 3e10c805b382d0a8906a4fed109958cac637f5e0 Author: Ilpo Järvinen Date: Mon Jan 16 12:08:40 2023 +0200 fpga: intel-m10-bmc: Rework flash read/write Access to flash staging area is different for N6000 from that of the SPI interfaced counterparts. To make it easier to differentiate flash access path, move read/write into new functions where the new access path can be easily placed into. Rework the unaligned access such the behavior it matches for both read and write. This change also renames m10bmc_sec_write() to m10bmc_sec_fw_write() as it would have a name conflict otherwise. Co-developed-by: Tianfei zhang Signed-off-by: Tianfei zhang Co-developed-by: Russ Weight Signed-off-by: Russ Weight Acked-by: Xu Yilun Signed-off-by: Ilpo Järvinen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230116100845.6153-7-ilpo.jarvinen@linux.intel.com commit 6052a005caf9cd484fe6368a31c736ac17ebaf66 Author: Ilpo Järvinen Date: Mon Jan 16 12:08:39 2023 +0200 mfd: intel-m10-bmc: Support multiple CSR register layouts There are different addresses for the MAX10 CSR registers. Introducing a new data structure m10bmc_csr_map for the register definition of MAX10 CSR. Provide the csr_map for SPI. Co-developed-by: Tianfei zhang Signed-off-by: Tianfei zhang Reviewed-by: Russ Weight Reviewed-by: Xu Yilun Signed-off-by: Ilpo Järvinen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230116100845.6153-6-ilpo.jarvinen@linux.intel.com commit eca5bd666b0aa7dc0bca63292e4778968241134e Author: Tobias Schramm Date: Fri Dec 30 20:43:15 2022 +0100 mmc: atmel-mci: fix race between stop command and start of next command This commit fixes a race between completion of stop command and start of a new command. Previously the command ready interrupt was enabled before stop command was written to the command register. This caused the command ready interrupt to fire immediately since the CMDRDY flag is asserted constantly while there is no command in progress. Consequently the command state machine will immediately advance to the next state when the tasklet function is executed again, no matter actual completion state of the stop command. Thus a new command can then be dispatched immediately, interrupting and corrupting the stop command on the CMD line. Fix that by dropping the command ready interrupt enable before calling atmci_send_stop_cmd. atmci_send_stop_cmd does already enable the command ready interrupt, no further writes to ATMCI_IER are necessary. Signed-off-by: Tobias Schramm Acked-by: Ludovic Desroches Link: https://lore.kernel.org/r/20221230194315.809903-2-t.schramm@manjaro.org Signed-off-by: Ulf Hansson commit 603aed8ffd4c9cb633c05a514cfb5e8ca6b0751d Author: Ilpo Järvinen Date: Mon Jan 16 12:08:38 2023 +0200 mfd: intel-m10-bmc: Split into core and spi specific parts Split the common code from intel-m10-bmc driver into intel-m10-bmc-core and move the SPI bus parts into an interface specific file. intel-m10-bmc-core becomes the core MFD functions which can support multiple bus interface like SPI bus. Co-developed-by: Tianfei zhang Signed-off-by: Tianfei zhang Reviewed-by: Russ Weight Acked-by: Guenter Roeck # hwmon Reviewed-by: Xu Yilun Signed-off-by: Ilpo Järvinen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230116100845.6153-5-ilpo.jarvinen@linux.intel.com commit 85ba469090ed77bfbc14c418ad79646681e6606d Author: Ilpo Järvinen Date: Mon Jan 16 12:08:37 2023 +0200 mfd: intel-m10-bmc: Rename the local variables Local variables directly interact with dev_get_drvdata/dev_set_drvdata should be named ddata. Reviewed-by: Russ Weight Reviewed-by: Xu Yilun Signed-off-by: Ilpo Järvinen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230116100845.6153-4-ilpo.jarvinen@linux.intel.com commit 16e5d95a5c451027a2e7ef89dd146a1c6c74ca6a Author: Ilpo Järvinen Date: Mon Jan 16 12:08:36 2023 +0200 mfd: intel-m10-bmc: Create m10bmc_platform_info for type specific info BMC type specific info is currently set by a switch/case block. The size of this info is expected to grow as more dev types and features are added which would have made the switch block bloaty. Store type specific info into struct and place them into .driver_data instead because it makes things a bit cleaner. The m10bmc_type enum can be dropped as the differentiation is now fully handled by the platform info. The info member of struct intel_m10bmc that is added here is not used yet in this change but its addition logically still belongs to this change. The CSR map change that comes after this change needs to have the info member. Reviewed-by: Russ Weight Reviewed-by: Xu Yilun Signed-off-by: Ilpo Järvinen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230116100845.6153-3-ilpo.jarvinen@linux.intel.com commit 206351c5c2d9906b0304c5b10d5162707d5d4bcb Author: Ilpo Järvinen Date: Mon Jan 16 12:08:35 2023 +0200 mfd: intel-m10-bmc: Add missing includes to header linux/mfd/intel-m10-bmc.h is using: - pr_err(), thus include also linux/dev_printk.h - FIELD_GET(), this include also linux/bitfield.h - GENMASK(), thus include also linux/bits.h Signed-off-by: Ilpo Järvinen Reviewed-by: Russ Weight Reviewed-by: Xu Yilun Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230116100845.6153-2-ilpo.jarvinen@linux.intel.com commit d5d4a2bc5fb83266a0a488767cad49da23c087a1 Author: Kathiravan T Date: Wed Jan 25 16:15:18 2023 +0530 dt-bindings: mmc: sdhci-msm: add IPQ5332 compatible The IPQ5332 supports eMMC with an SDHCI controller. Add the appropriate compatible to the documentation. Signed-off-by: Kathiravan T Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230125104520.89684-9-quic_kathirav@quicinc.com Signed-off-by: Ulf Hansson commit 124a4c13a84d98ca6cbe950a591c3b3acaee7694 Author: devi priya Date: Tue Jan 24 19:45:39 2023 +0530 dt-bindings: mmc: sdhci-msm: Document the IPQ9574 compatible Document the compatible for SDHCI on IPQ9574. Signed-off-by: devi priya Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230124141541.8290-7-quic_devipriy@quicinc.com Signed-off-by: Ulf Hansson commit 2ba4ff82f9dd312fb9f77168f159698c93f4841b Author: Krzysztof Kozlowski Date: Mon Jan 23 16:15:39 2023 +0100 ARM: dts: berlin: align UART node name with bindings Bindings expect UART/serial node names to be "serial". Link: https://lore.kernel.org/r/20230123151539.369654-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 0a9b7bee0056dd686da688f530ebd7f00ec4652d Author: Krzysztof Kozlowski Date: Mon Jan 23 16:15:40 2023 +0100 arm64: dts: synaptics: align UART node name with bindings Bindings expect UART/serial node names to be "serial". berlin4ct-dmp.dtb: uart@d000: $nodename:0: 'uart@d000' does not match '^serial(@.*)?$' Link: https://lore.kernel.org/r/20230123151540.369690-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit b8081b9a80945158e21e62ad31f50b704990cd8a Author: Krzysztof Kozlowski Date: Mon Jan 23 16:15:16 2023 +0100 arm64: dts: hisilicon: align UART node name with bindings Bindings expect UART/serial node names to be "serial". Link: https://lore.kernel.org/r/20230123151516.369130-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 5ad30c5fc0a72c2aaa1d26f9e4061d8646231adb Author: Krzysztof Kozlowski Date: Mon Jan 23 16:15:14 2023 +0100 arm64: dts: realtek: align UART node name with bindings Bindings expect UART/serial node names to be "serial". Link: https://lore.kernel.org/r/20230123151514.369101-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 46fe3950ced3fcddb51acd0bc8c26aaa0b86ae70 Author: Yoshihiro Shimoda Date: Mon Jan 23 10:34:45 2023 +0900 arm64: dts: renesas: r8a779f0: Add iommus to MMC node Add iommus property to the MMC node for r8a779f0. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230123013448.1250991-3-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit 3d28ccb9b37db5f17ec1b41c31718cd9842d5dbf Author: Fabrizio Castro Date: Wed Jan 18 14:47:46 2023 +0000 arm64: dts: renesas: v2mevk2: Add PWC support The RZ/V2M EVK uses the PWC IP to control external power supplies and the I/O voltage for the uSD card. This patch enables the PWC node, and it also enables the poweroff features since PWC is actually used to control the board power rails. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230118144747.24968-3-fabrizio.castro.jz@renesas.com Signed-off-by: Geert Uytterhoeven commit cf67b31904d42275e7b5eaf55c191db1925abb7a Author: Fabrizio Castro Date: Wed Jan 18 14:47:45 2023 +0000 arm64: dts: renesas: r9a09g011: Add PWC support The RZ/V2M SoC contains an External Power Sequence Controller (PWC) module. This module provides an external power supply on/off sequence, on/off signal for the LPDDR4 core power supply, General Purpose Outputs, and key input signals. This patch adds PWC support to the SoC specific device tree. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230118144747.24968-2-fabrizio.castro.jz@renesas.com Signed-off-by: Geert Uytterhoeven commit 11ffdcdfa2125859b298f9a66f9eefba493a37c0 Author: Fabrizio Castro Date: Wed Jan 18 13:52:59 2023 +0000 arm64: dts: renesas: r9a09g011: Reword ethernet status Although of_fdt_device_is_available returns true when the DT property "status" is assigned "ok" or "okay", and false for every other value, it's become common practice to assign "disabled" when we want of_fdt_device_is_available to return false. For some reason, the status property of the ethernet node was assigned "disable" when originally added to the kernel. Change it to "disabled" for consistency. Signed-off-by: Fabrizio Castro Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230118135259.19249-1-fabrizio.castro.jz@renesas.com Signed-off-by: Geert Uytterhoeven commit 3deb0c759d2105086913d42d28d289ae104c6dfb Author: Adam Ford Date: Tue Jan 17 17:26:08 2023 -0600 arm64: dts: renesas: r8a774[be]1-beacon: Sync aliases with RZ/G2M The Beacon Embedded RZ/G2[MNH] boards all have the same baseboard and all share the same PCB. To make sure all instances appear the same, make the aliases for RZ/G2N and RZ/G2H match RZ/G2M to keep them consistent. Signed-off-by: Adam Ford Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230117232609.477247-1-aford173@gmail.com Link: https://lore.kernel.org/r/20230117232609.477247-2-aford173@gmail.com Signed-off-by: Geert Uytterhoeven commit 63acac8a020ea776a095c50bb4d12184cb688a9f Author: Adam Ford Date: Sat Jan 14 16:56:47 2023 -0600 arm64: dts: renesas: beacon-renesom: Fix audio clock rate The WM8962 is configured so the SoC is driving the clock, and it's currently set to 24 MHz. However, when playing audio it shows the following message: wm8962 5-001a: Unsupported sysclk ratio 500 While not harmful, a better clock ratio is 512. It makes the message disappear, and it still plays sound. Signed-off-by: Adam Ford Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230114225647.227972-3-aford173@gmail.com Signed-off-by: Geert Uytterhoeven commit a0d23b8645b2d577657ec08f25b01338c6bc39d6 Author: Adam Ford Date: Sat Jan 14 16:56:46 2023 -0600 arm64: dts: renesas: beacon-renesom: Update Ethernet PHY ID Due to the part shortage, the AR8031 PHY was replaced with a Micrel KSZ9131. Hard-coding the ID of the PHY makes this new PHY non-operational on newer hardware. Since previous hardware had only shipped to a limited number of people, and they have not gone to production, it should be safe to update the PHY ID. Signed-off-by: Adam Ford Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230114225647.227972-2-aford173@gmail.com Signed-off-by: Geert Uytterhoeven commit d7f9492dfc03153ac56ab59066a196558748f575 Author: Adam Ford Date: Sat Jan 14 16:56:45 2023 -0600 arm64: dts: renesas: beacon-renesom: Fix gpio expander reference The board used to originally introduce the Beacon Embedded RZ/G2[M/N/H] boards had a GPIO expander with address 20, but this was changed when the final board went to production. The production boards changed both the part itself and the address. With the incorrect address, the LCD cannot come up. If the LCD fails, the rcar-du driver fails to come up, and that also breaks HDMI. Pre-release board were not shipped to the general public, so it should be safe to push this as a fix. Anyone with a production board would have video fail due to this GPIO expander change. Fixes: a1d8a344f1ca ("arm64: dts: renesas: Introduce r8a774a1-beacon-rzg2m-kit") Signed-off-by: Adam Ford Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230114225647.227972-1-aford173@gmail.com Signed-off-by: Geert Uytterhoeven commit c3b8f309de8c6cd7d02908996f0471adb301190f Author: Yoshihiro Shimoda Date: Fri Jan 13 22:46:39 2023 +0900 arm64: dts: renesas: spider-cpu: Enable UFS device Enable UFS device for R-Car S4-8 Spider CPU board. Note that the conditions of RC21012 on the Spider are: - OUT11 (for UFS30_REFCLK_V) is disabled as default. - OUT11 is controlled by GPIO0 pin. - The GPIO0 pin is inverted sense (low active) and pull-up enabled. To output the clock, pin 4 of TCA9554 on the Spider board needs to output low level so that using "gpio-gate-clock" for it. Signed-off-by: Yoshihiro Shimoda Tested-by: Geert Uytterhoeven Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230113134639.338908-1-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit 88c190736580b2b3f2a830e465e5a0915b90a922 Author: Martin Kaiser Date: Tue Jan 24 22:01:08 2023 +0100 staging: r8188eu: remove usb_ops_linux.h There's only two defines left in usb_ops_linux.h. Move those defines to usb_ops_linux.c, where they are used. Remove the now empty file usb_ops_linux.h. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230124210108.62170-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit e39c36d0d01cc586dfe3df7a1727ba80f4feeba6 Author: Martin Kaiser Date: Tue Jan 24 22:01:07 2023 +0100 staging: r8188eu: remove unused defines Remove some unused defines from usb_ops_linux.h. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230124210108.62170-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 3dc04d5b5327eae02b0a237df4676973acd9cce6 Author: Martin Kaiser Date: Tue Jan 24 22:01:06 2023 +0100 staging: r8188eu: remove defines that strip regs parameter usb_ops_linux.h has a number of defines that strip the regs parameter from function that should be used as urb callbacks. Remove the defines for functions that don't exist in the r8188eu driver. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230124210108.62170-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit cbfc31a71d664bece503190f890b897e76d708f8 Author: Martin Kaiser Date: Tue Jan 24 22:01:05 2023 +0100 staging: r8188eu: usb_read_port_complete needs no regs parameter Remove the regs parameter from usb_read_port_complete, it is not used. Without the regs parameter, there's no need for the define that makes usb_read_port_complete usable as urb callback function. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230124210108.62170-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit ed9700c1657dc3be4ff72497626dab712ea0e2ed Author: Philipp Hortmann Date: Wed Jan 25 21:09:32 2023 +0100 staging: rtl8192e: Remove unused variables txbytes.., txbyt.. and signa.. txbytesmulticast, txbytesbroadcast and signal_quality are initialized and increased or set but never read. Remove dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/c469f82619625fecbed95532967cc7ec2b12e5f9.1674675808.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1faee1c4d02f7fb4b43fb9d83d6073a32e194c27 Author: Philipp Hortmann Date: Wed Jan 25 21:09:26 2023 +0100 staging: rtl8192e: Remove unused variables txbeac.., txman.. and txcmdp.. txbeaconerr, txmanageokint and txcmdpktokint are initialized and increased but never read. Remove dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/6c922591c48512692f77729ac91849ebb4e61bd1.1674675808.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5f08cb0d9a51b3d87ebc0de70343c148c3dcdb01 Author: Philipp Hortmann Date: Wed Jan 25 21:09:20 2023 +0100 staging: rtl8192e: Remove unused variables txviok.., txvook.. and txbea.. txviokint, txvookint and txbeaconokint are initialized and increased but never read. Remove dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/c45501eee5fbf2cc3e5ad999bbbe8e071e341a2c.1674675808.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 576a1948326457fa435810a1eaebd8c4879e44e2 Author: Philipp Hortmann Date: Wed Jan 25 21:09:14 2023 +0100 staging: rtl8192e: Remove unused variables txov.., txbeokint and txbkokint txoverflow, txbeokint and txbkokint are initialized and increased but never read. Remove dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/023f612dc35eca3a74c31344f7dbb168180bf437.1674675808.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit f345b9779b8a58efc990c3c5c0e11eb258ba11dc Author: Philipp Hortmann Date: Wed Jan 25 21:09:06 2023 +0100 staging: rtl8192e: Remove unused variables rxint, ints and shints rxint, ints and shints are initialized and increased but never read. Remove dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/ee6ee009d139a3da3d2c171d7ac6454271b4da9b.1674675808.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0d55d6ec2e286cfa04babd41183c06a712237ab1 Author: Philipp Hortmann Date: Wed Jan 25 21:08:59 2023 +0100 staging: rtl8192e: Remove unused variables num_proc.., recei.. and rxov.. num_process_phyinfo, received_bwtype and rxoverflow are initialized and increased but never read. Remove dead code. As a result prxsc is unused which in result makes rxsc_sgien_exflg unused. Remove prxsc and rxsc_sgien_exflg as well. Reported-by: kernel test robot Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/ff9daec237b795a01629080d0d5f7ec73b2d89da.1674675808.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit a4a2a256a70261a3751bffdce93d38cafc17ec07 Author: Philipp Hortmann Date: Wed Jan 25 21:08:53 2023 +0100 staging: rtl8192e: Remove unused variables numqry_.. numqry_phystatus, numqry_phystatusCCK and numqry_phystatusHT are initialized and increased but never read. Remove dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/20aedc3bd3cc860ee8d86d205461f479ac201fea.1674675808.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 58e7509dac66c008a9085c490127590cc9ab0fa2 Author: Philipp Hortmann Date: Wed Jan 25 21:08:47 2023 +0100 staging: rtl8192e: Remove unused variables numpacket.. and received_pre.. numpacket_toself, numpacket_matchbssid and received_preamble_GI are initialized and increased but never read. Remove dead code. As a result the local variable preamble_guardinterval is unused. Remove it also. Reported-by: kernel test robot Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/0ed5f4134176393110fdb0b7424df7a8a6fc6262.1674675808.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3690e799821ef8227d31275209ead7ed03e236ab Author: Philipp Hortmann Date: Wed Jan 25 21:08:40 2023 +0100 staging: rtl8192e: Remove unused variables rxcrcerrmin and friends rxcrcerrmin, rxcrcerrmax and rxcrcerrmid are initialized and increased but never read. Remove dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/4c791fbb3559ce15de60b7bdcabbc50b0ee9adb9.1674675808.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit baa988e1b711cbcede35e2c53d40b8871d1f5081 Author: Philipp Hortmann Date: Wed Jan 25 21:08:31 2023 +0100 staging: rtl8192e: Remove unused variables rxdatacrcerr and rxmgmtcrcerr rxdatacrcerr and rxmgmtcrcerr are initialized and increased but never read. Remove dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/32c9183fa2f4edd24ae6f93d56b808eb1821832b.1674675808.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 29c6d9394874dbccef61482c72ae3e9f6177fbe0 Author: Philipp Hortmann Date: Wed Jan 25 21:08:22 2023 +0100 staging: rtl8192e: Remove unused variables rxrdu and rxok rxrdu and rxok are initialized and increased but never read. Remove dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/20738d339066e36f5347c7e5011bd3d1aa3e4f53.1674675808.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit f9a8a192300026b8729d3498fc9134ea9bf9368f Author: Stefan Wahren Date: Mon Jan 23 20:16:29 2023 +0100 staging: vchiq_arm: Improve error log for vchiq_platform_init During sending the base address of the slots to the VideoCore firmware via mailbox property, issues could happened on the ARM and on the VideoCore side. So better separate the error handling in order to provide more details. This should help to narrow down the possible cause. Signed-off-by: Stefan Wahren Reviewed-by: Umang Jain Link: https://lore.kernel.org/r/20230123191629.21019-1-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit cfe635af8a1310468d0cce41485759e7604d3bca Author: Martin Kaiser Date: Mon Jan 23 21:53:42 2023 +0100 staging: r8188eu: merge rtw_free_hwxmits into its only caller rtw_free_hwxmits is called only by _rtw_free_xmit_priv. We can merge the two functions and make the code a bit shorter. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230123205342.229589-24-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit b87a04c4a8480fd1fcb6f8eb254b0373cb0ca980 Author: Martin Kaiser Date: Mon Jan 23 21:53:41 2023 +0100 staging: r8188eu: apsd_setting is unused apsd_setting in struct tx_servq is not used, it can be removed. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230123205342.229589-23-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit b666a3ea67a66cc97c7f4423b67b42425fc0cc7f Author: Martin Kaiser Date: Mon Jan 23 21:53:40 2023 +0100 staging: r8188eu: struct agg_pkt_info is unused struct agg_pkt_info is not used in the r8188eu driver. Remove it. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230123205342.229589-22-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit a548cdc58be01f00b211836b8f1cf29269e3d9b2 Author: Martin Kaiser Date: Mon Jan 23 21:53:39 2023 +0100 staging: r8188eu: remove rtw_xmitframe_enqueue The rtw_xmitframe_enqueue function is only one line. We can remove it and call rtw_xmit_classifier directly. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230123205342.229589-21-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 9c07d8cc8837486a9e619154ffa5d391894f8715 Author: Martin Kaiser Date: Mon Jan 23 21:53:38 2023 +0100 staging: r8188eu: fix rtw_xmitframe_enqueue error handling In function rtw_xmitframe_enqueue, we can simply relay the error code from rtw_xmit_classifier. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230123205342.229589-20-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit e558c192787ed698c48ec2ae6a56e95eb4084cfd Author: Martin Kaiser Date: Mon Jan 23 21:53:37 2023 +0100 staging: r8188eu: use lists for hwxmits struct hw_xmit's sta_list points to one of vo, vi, be or bk_pending in struct xmit_priv. All of these are defined as struct __queue, which is a list plus a spinlock. For these components, the spinlock is unused, we need only the list. This patch converts sta_list and vo, vi, be and bk_pending to struct list_head. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230123205342.229589-19-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 45bbc110e9b3093a058d5f2dcdba0b22c80d228b Author: Martin Kaiser Date: Mon Jan 23 21:53:36 2023 +0100 staging: r8188eu: merge dequeue_one_xmitframe into its caller dequeue_one_xmitframe is a small function that is called only from rtw_dequeue_xframe. Merge the two functions. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230123205342.229589-18-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit dfac03bde0bb7da07b52ade3a8743d52cb97bfa5 Author: Martin Kaiser Date: Mon Jan 23 21:53:35 2023 +0100 staging: r8188eu: use list_head for xmitframe list The r8188eu driver defines a struct __queue that contains a list_head and a spinlock. struct tx_servq describes a station for which we have pending tx packets. This struct contains a __queue for the pending packets (a __queue of struct xmit_frame entries). In this particular case, the queue's spinlock is not used, we need only the list_head. rtw_dequeue_xframe uses a local variable for such an xmit_frame queue. This patch replaces this variable with a list_head. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230123205342.229589-17-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit ca21b2db6804d2d1d03e376c8e1dc57b0875d38e Author: Martin Kaiser Date: Mon Jan 23 21:53:34 2023 +0100 staging: r8188eu: simplify dequeue_one_xmitframe Simplify the dequeue_one_xmitframe function without changing its behaviour. Drop the temporary variable xmitframe_plist. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230123205342.229589-16-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 6500084a41758542c839e280703eddebdd367b10 Author: Martin Kaiser Date: Mon Jan 23 21:53:33 2023 +0100 staging: r8188eu: decrement qcnt in rtw_dequeue_xframe rtw_dequeue_xframe calls dequeue_one_xmitframe and passes a struct tx_servq. The only use for this parameter is to decrement its qcnt if an xmit_frame could be extracted. It makes more sense to remove the struct tx_servq parameter from dequeue_one_xmitframe and decrement qcnt in the calling function when dequeue_one_xmitframe returns success, i.e. when an xmit_frame was extracted. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230123205342.229589-15-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 081c4835102538d6efcc0b8d95a1839eb88c19f6 Author: Martin Kaiser Date: Mon Jan 23 21:53:32 2023 +0100 staging: r8188eu: make rtw_chk_hi_queue_cmd a void function Both callers of rtw_chk_hi_queue_cmd do not check the return value. Convert rtw_chk_hi_queue_cmd to a void function. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230123205342.229589-14-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit c00ed7dde89ae4a04fdd57a78dfcf7d0fcba20b1 Author: Martin Kaiser Date: Mon Jan 23 21:53:31 2023 +0100 staging: r8188eu: remove redundant parameter The rtl8188eu_xmitframe_complete function takes two parameters: adapter and xmit_priv. xmit_priv is part of struct adapter, this parameter can be removed. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230123205342.229589-13-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 8d97399bebe8de645489f5ec941b271ae9fe4d31 Author: Martin Kaiser Date: Mon Jan 23 21:53:30 2023 +0100 staging: r8188eu: simplify dequeue_one_xmitframe Revert the if condition and exit immediately if the list of xmitframes is empty. Hopefully, this makes the code a little bit simpler. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230123205342.229589-12-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit d5986148e802d1704720202b1e1c94d69c936ebd Author: Martin Kaiser Date: Mon Jan 23 21:53:29 2023 +0100 staging: r8188eu: use list_empty Use list_empty to check for an empty list instead of coding the check manually. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230123205342.229589-11-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit cbdd52099d66d387e67cef9c78400220c4a5d9f4 Author: Martin Kaiser Date: Mon Jan 23 21:53:28 2023 +0100 staging: r8188eu: remove dead assignment There's no point in moving xmitframe_plist to the next list element. xmitframe_plist is not used any more after this assignment. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230123205342.229589-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 22e8707aa1eed5a0c362fc1e1fe5ccd36968e63a Author: Martin Kaiser Date: Mon Jan 23 21:53:27 2023 +0100 staging: r8188eu: remove unused function parameter The pxmitpriv parameter in function dequeue_one_xmitframe is not needed. It can be removed. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230123205342.229589-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 6a936ea652aba4f1897e3d56633fc09593240db6 Author: Martin Kaiser Date: Mon Jan 23 21:53:26 2023 +0100 staging: r8188eu: remove an obsolete comment Remove an obsolete comment in rtw_dequeue_xframe. There is no break statement any more. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230123205342.229589-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit ce2e8fa2067f02a00d1364324d589661345b07db Author: Martin Kaiser Date: Mon Jan 23 21:53:25 2023 +0100 staging: r8188eu: simplify the code to initialise inx Simplify the code to initialise the inx array in function rtw_dequeue_xframe and make the code a tiny bit smaller. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230123205342.229589-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 36b7dd48b3aaacc28dded0e88a2a4d02e09be870 Author: Martin Kaiser Date: Mon Jan 23 21:53:24 2023 +0100 staging: r8188eu: simplify the sta loop in rtw_dequeue_xframe Use list_for_each_entry_safe to iterate over the station entries in function rtw_dequeue_xframe instead of coding the loop manually. We have to use the safe version, the loop body may remove a station from the list over which we iterate. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230123205342.229589-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 6feaef197f9dc8c433c50028afee1ebcabfb013f Author: Martin Kaiser Date: Mon Jan 23 21:53:23 2023 +0100 staging: r8188eu: remove struct intf_priv struct intf_priv is not used in the r8188eu driver. It can be removed. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230123205342.229589-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit f9e39a96f1c5aafbd34ec9d8ce1e9f6c4572d9b7 Author: Martin Kaiser Date: Mon Jan 23 21:53:22 2023 +0100 staging: r8188eu: remove struct intf_hdl There are no more users of struct intf_hdl in the r8188eu driver. We can now remove this struct. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230123205342.229589-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit efa1c4e56c7d513bbca46f4f98ff8de25791654d Author: Martin Kaiser Date: Mon Jan 23 21:53:21 2023 +0100 staging: r8188eu: pass struct adapter to usb_write The usb_write function takes a struct intf_hdl only to extract the struct adapter from it. We can pass struct adapter directly. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230123205342.229589-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 11617b77ad730903dc9a9cc659656b0ade03ef3e Author: Martin Kaiser Date: Mon Jan 23 21:53:20 2023 +0100 staging: r8188eu: we use a constant number of hw_xmit entries struct xmit_priv contains a pointer to an array of struct hw_xmit entries. xmit_priv's (ill-named) hwxmit_entry component stores the size of this array, i.e. the number of hw_xmit entries that are used. The array size is constant, it's initialised to HWXMIT_ENTRY and never updated. Simplify the code accordingly. Remove hwxmit_entry, do not pass the array size as a function parameter and use HWXMIT_ENTRY in the code that handles the array. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230123205342.229589-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 8e3938a5d2d89d8a4b9688ba9cbec500640d401d Author: Luis Chamberlain Date: Mon Jan 23 13:52:55 2023 -0800 docs: embargoed-hardware-issues: add embargoed HW contact for Samsung After discussions internally at the company, Javier has been volunteered and is willing to be the embargoed hardware contact for Samsung. Cc: Javier González Signed-off-by: Luis Chamberlain Acked-by: Javier González Link: https://lore.kernel.org/r/20230123215255.381312-1-mcgrof@kernel.org Signed-off-by: Greg Kroah-Hartman commit 527c9552f5f8a99b6c31bfb39e9470cec07faf49 Author: David Heidelberg Date: Thu Jan 26 20:37:32 2023 +0100 arm64: dts: meson-gxm-khadas-vim2: use gpio-fan matrix instead of an array No functional changes. Adjust to comply with dt-schema requirements and make it possible to validate values. Acked-by: Martin Blumenstingl Signed-off-by: David Heidelberg Link: https://lore.kernel.org/r/20230126193732.69699-1-david@ixit.cz Signed-off-by: Neil Armstrong commit c8005511f38757ef071b34c0a98cf3d8a1c920a7 Author: Vladimir Oltean Date: Wed Jan 25 16:57:16 2023 +0200 net: dsa: ocelot: build felix.c into a dedicated kernel module The build system currently complains: scripts/Makefile.build:252: drivers/net/dsa/ocelot/Makefile: felix.o is added to multiple modules: mscc_felix mscc_seville Since felix.c holds the DSA glue layer, create a mscc_felix_dsa_lib.ko. This is similar to how mscc_ocelot_switch_lib.ko holds a library for configuring the hardware. Signed-off-by: Vladimir Oltean Acked-by: Colin Foster Link: https://lore.kernel.org/r/20230125145716.271355-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 82fe335b78f76772acb6053b57bce95a0ad789bb Merge: 0313afe8b83a0 2723f3b5d4ff5 Author: Jakub Kicinski Date: Thu Jan 26 23:29:12 2023 -0800 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== virtchnl: update and refactor Jesse Brandeburg says: The virtchnl.h file is used by i40e/ice physical function (PF) drivers and irdma when talking to the iavf driver. This series cleans up the header file by removing unused elements, adding/cleaning some comments, fixing the data structures so they are explicitly defined, including padding, and finally does a long overdue rename of the IWARP members in the structures to RDMA, since the ice driver and it's associated Intel Ethernet E800 series adapters support both RDMA and IWARP. The whole series should result in no functional change, but hopefully clearer code. * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: virtchnl: i40e/iavf: rename iwarp to rdma virtchnl: do structure hardening virtchnl: update header and increase header clarity virtchnl: remove unused structure declaration ==================== Link: https://lore.kernel.org/r/20230125212441.4030014-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 1ddc7618294084fff8d673217a9479550990ee84 Author: Manivannan Sadhasivam Date: Mon Jan 23 12:59:45 2023 +0530 bus: mhi: ep: Change state_lock to mutex state_lock, the spinlock type is meant to protect race against concurrent MHI state transitions. In mhi_ep_set_m0_state(), while the state_lock is being held, the channels are resumed in mhi_ep_resume_channels() if the previous state was M3. This causes sleeping in atomic bug, since mhi_ep_resume_channels() use mutex internally. Since the state_lock is supposed to be held throughout the state change, it is not ideal to drop the lock before calling mhi_ep_resume_channels(). So to fix this issue, let's change the type of state_lock to mutex. This would also allow holding the lock throughout all state transitions thereby avoiding any potential race. Cc: # 5.19 Fixes: e4b7b5f0f30a ("bus: mhi: ep: Add support for suspending and resuming channels") Reported-by: Dan Carpenter Reviewed-by: Jeffrey Hugo Signed-off-by: Manivannan Sadhasivam commit 8a1c24bb908f9ecbc4be0fea014df67d43161551 Author: Manivannan Sadhasivam Date: Wed Dec 28 21:47:04 2022 +0530 bus: mhi: ep: Save channel state locally during suspend and resume During suspend and resume, the channel state needs to be saved locally. Otherwise, the endpoint may access the channels while they were being suspended and causing access violations. Fix it by saving the channel state locally during suspend and resume. Cc: # 5.19 Fixes: e4b7b5f0f30a ("bus: mhi: ep: Add support for suspending and resuming channels") Signed-off-by: Manivannan Sadhasivam Reviewed-by: Jeffrey Hugo commit 8d6a1fea53864cd9545741f48f4ae4df804db557 Author: Manivannan Sadhasivam Date: Wed Dec 28 21:47:03 2022 +0530 bus: mhi: ep: Move chan->lock to the start of processing queued ch ring There is a good chance that while the channel ring gets processed, the STOP or RESET command for the channel might be received from the MHI host. In those cases, the entire channel ring processing needs to be protected by chan->lock to prevent the race where the corresponding channel ring might be reset. While at it, let's also add a sanity check to make sure that the ring is started before processing it. Because, if the STOP/RESET command gets processed while mhi_ep_ch_ring_worker() waited for chan->lock, the ring would've been reset. Cc: # 5.19 Fixes: 03c0bb8ec983 ("bus: mhi: ep: Add support for processing channel rings") Signed-off-by: Manivannan Sadhasivam Reviewed-by: Jeffrey Hugo Link: https://lore.kernel.org/r/20221228161704.255268-6-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam commit 8e697fcfdb9809634e268058ca743369c216b7ac Author: Manivannan Sadhasivam Date: Wed Dec 28 21:47:02 2022 +0530 bus: mhi: ep: Fix the debug message for MHI_PKT_TYPE_RESET_CHAN_CMD cmd The debug log incorrectly mentions that STOP command is received instead of RESET command. Fix that. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Jeffrey Hugo Link: https://lore.kernel.org/r/20221228161704.255268-5-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam commit e6cebcc27519dcf1652e604c73b9fd4f416987c0 Author: Manivannan Sadhasivam Date: Wed Dec 28 21:47:01 2022 +0530 bus: mhi: ep: Only send -ENOTCONN status if client driver is available For the STOP and RESET commands, only send the channel disconnect status -ENOTCONN if client driver is available. Otherwise, it will result in null pointer dereference. Cc: # 5.19 Fixes: e827569062a8 ("bus: mhi: ep: Add support for processing command rings") Signed-off-by: Manivannan Sadhasivam Reviewed-by: Jeffrey Hugo Link: https://lore.kernel.org/r/20221228161704.255268-4-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam commit 6de4941c0215ac1ea54918ace695a28f4a5ca89b Author: Manivannan Sadhasivam Date: Wed Dec 28 21:47:00 2022 +0530 bus: mhi: ep: Check if the channel is supported by the controller Before processing the command ring for the channel, check if the channel is supported by the controller or not. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Jeffrey Hugo Link: https://lore.kernel.org/r/20221228161704.255268-3-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam commit 47a1dcaea07367c84238e71c08244ae3ed48c1cc Author: Manivannan Sadhasivam Date: Wed Dec 28 21:46:59 2022 +0530 bus: mhi: ep: Power up/down MHI stack during MHI RESET During graceful shutdown scenario, host will issue MHI RESET to the endpoint device before initiating shutdown. In that case, it makes sense to completely power down the MHI stack as sooner or later the access to MMIO registers will be prohibited. Also, the stack needs to be powered up in the case of SYS_ERR to recover the device. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Jeffrey Hugo Link: https://lore.kernel.org/r/20221228161704.255268-2-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam commit a33ca17426c0dcd21d9266f708de0559a936e229 Author: Slark Xiao Date: Thu Dec 29 09:13:58 2022 +0800 bus: mhi: host: Update mhi driver description This should be a mistake. MHI contains "Host Interface" already. So we shall update "MHI" to "Modem" and the full name shall be "Modem Host Interface". Signed-off-by: Slark Xiao Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20221229011358.15874-1-slark_xiao@163.com Signed-off-by: Manivannan Sadhasivam commit 1501da7696b23c9a211aca732801156b90d3e4ba Author: Carl Vanderlip Date: Wed Dec 7 11:26:13 2022 -0800 bus: mhi: Update Makefile to used Kconfig flags Makefile was always suggesting to build subdirectories regardless of Kconfig. Use the Kconfig flags as intended. Signed-off-by: Carl Vanderlip Reviewed-by: Manivannan Sadhasivam Reviewed-by: Jeffrey Hugo Link: https://lore.kernel.org/r/20221207192613.2098614-1-quic_carlv@quicinc.com [mani: fixed the subject prefix] Signed-off-by: Manivannan Sadhasivam commit 06cbcbfaa6510eed406e3b6d5d071386b9830689 Author: Mika Westerberg Date: Wed Jan 18 14:44:10 2023 +0200 thunderbolt: Add missing kernel-doc comment to tb_tunnel_maximum_bandwidth() These were missing from the original commit so add them now. No functional changes. Signed-off-by: Mika Westerberg commit ace75e18e736bffda1eaf9fd7eab596ecccb4877 Author: Mika Westerberg Date: Mon Jan 23 08:28:20 2023 +0200 thunderbolt: Handle bandwidth allocation mode enablement notification When the graphics side enables bandwidth allocation mode the DP IN adapter sends notification to the connection manager about this. Currently the handler misses this and tries to allocate 0 Mb/s that then makes the graphics side to think the request failed. Fix this by properly handling the enablement notification. Fixes: 6ce3563520be ("thunderbolt: Add support for DisplayPort bandwidth allocation mode") Signed-off-by: Mika Westerberg commit a5f3a3f7c17273f825e96d1b3369164a39345a35 Author: Stanislav Fomichev Date: Thu Jan 26 14:50:30 2023 -0800 selftests/bpf: Properly enable hwtstamp in xdp_hw_metadata The existing timestamping_enable() is a no-op because it applies to the socket-related path that we are not verifying here anymore. (but still leaving the code around hoping we can have xdp->skb path verified here as well) poll: 1 (0) xsk_ring_cons__peek: 1 0xf64788: rx_desc[0]->addr=100000000008000 addr=8100 comp_addr=8000 rx_hash: 3697961069 rx_timestamp: 1674657672142214773 (sec:1674657672.1422) XDP RX-time: 1674657709561774876 (sec:1674657709.5618) delta sec:37.4196 AF_XDP time: 1674657709561871034 (sec:1674657709.5619) delta sec:0.0001 (96.158 usec) 0xf64788: complete idx=8 addr=8000 Also, maybe something to archive here, see [0] for Jesper's note about NIC vs host clock delta. 0: https://lore.kernel.org/bpf/f3a116dc-1b14-3432-ad20-a36179ef0608@redhat.com/ v2: - Restore original value (Martin) Fixes: 297a3f124155 ("selftests/bpf: Simple program to dump XDP RX metadata") Reported-by: Jesper Dangaard Brouer Tested-by: Jesper Dangaard Brouer Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20230126225030.510629-1-sdf@google.com Signed-off-by: Martin KaFai Lau commit 4deef811828e87e26a978d5d6433b261d4713849 Author: Rob Clark Date: Thu Jan 19 15:12:55 2023 -0800 drm/mediatek: Drop unbalanced obj unref In the error path, mtk_drm_gem_object_mmap() is dropping an obj reference that it doesn't own. Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Rob Clark Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230119231255.2883365-1-robdclark@gmail.com/ Signed-off-by: Chun-Kuang Hu commit 2ea8aec56bf17d5032364c227bde1c871a7cc6fd Author: Rob Clark Date: Thu Jan 19 14:40:52 2023 -0800 drm/mediatek: Remove dependency on GEM DMA helper It appears that the dependency on the DMA helpers was only for drm_gem_dma_vm_ops. Signed-off-by: Rob Clark Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230119224052.2879106-1-robdclark@gmail.com/ Signed-off-by: Chun-Kuang Hu commit 2de154f541fc5b9f2aed3fe06e218130718ce320 Author: Sean Christopherson Date: Tue Jan 24 23:49:05 2023 +0000 KVM: x86/pmu: Provide "error" semantics for unsupported-but-known PMU MSRs Provide "error" semantics (read zeros, drop writes) for userspace accesses to MSRs that are ultimately unsupported for whatever reason, but for which KVM told userspace to save and restore the MSR, i.e. for MSRs that KVM included in KVM_GET_MSR_INDEX_LIST. Previously, KVM special cased a few PMU MSRs that were problematic at one point or another. Extend the treatment to all PMU MSRs, e.g. to avoid spurious unsupported accesses. Note, the logic can also be used for non-PMU MSRs, but as of today only PMU MSRs can end up being unsupported after KVM told userspace to save and restore them. Link: https://lore.kernel.org/r/20230124234905.3774678-7-seanjc@google.com Signed-off-by: Sean Christopherson commit e33b6d79acac169bfe1a9682fc5b4f8202fa4c41 Author: Like Xu Date: Tue Jan 24 23:49:04 2023 +0000 KVM: x86/pmu: Don't tell userspace to save MSRs for non-existent fixed PMCs Limit the set of MSRs for fixed PMU counters based on the number of fixed counters actually supported by the host so that userspace doesn't waste time saving and restoring dummy values. Signed-off-by: Like Xu [sean: split for !enable_pmu logic, drop min(), write changelog] Link: https://lore.kernel.org/r/20230124234905.3774678-6-seanjc@google.com Signed-off-by: Sean Christopherson commit c3531edc79a7adbe4451d34084e8bf227c022872 Author: Sean Christopherson Date: Tue Jan 24 23:49:03 2023 +0000 KVM: x86/pmu: Don't tell userspace to save PMU MSRs if PMU is disabled Omit all PMU MSRs from the "MSRs to save" list if the PMU is disabled so that userspace doesn't waste time saving and restoring dummy values. KVM provides "error" semantics (read zeros, drop writes) for such known-but- unsupported MSRs, i.e. has fudged around this issue for quite some time. Keep the "error" semantics as-is for now, the logic will be cleaned up in a separate patch. Cc: Aaron Lewis Cc: Weijiang Yang Link: https://lore.kernel.org/r/20230124234905.3774678-5-seanjc@google.com Signed-off-by: Sean Christopherson commit 2374b7310b662e29e3468d510bfaded60fbae99c Author: Sean Christopherson Date: Tue Jan 24 23:49:02 2023 +0000 KVM: x86/pmu: Use separate array for defining "PMU MSRs to save" Move all potential to-be-saved PMU MSRs into a separate array so that a future patch can easily omit all PMU MSRs from the list when the PMU is disabled. No functional change intended. Link: https://lore.kernel.org/r/20230124234905.3774678-4-seanjc@google.com Signed-off-by: Sean Christopherson commit e76ae52747a82a548742107b4100e90da41a624d Author: Sean Christopherson Date: Tue Jan 24 23:49:01 2023 +0000 KVM: x86/pmu: Gate all "unimplemented MSR" prints on report_ignored_msrs Add helpers to print unimplemented MSR accesses and condition all such prints on report_ignored_msrs, i.e. honor userspace's request to not print unimplemented MSRs. Even though vcpu_unimpl() is ratelimited, printing can still be problematic, e.g. if a print gets stalled when host userspace is writing MSRs during live migration, an effective stall can result in very noticeable disruption in the guest. E.g. the profile below was taken while calling KVM_SET_MSRS on the PMU counters while the PMU was disabled in KVM. - 99.75% 0.00% [.] __ioctl - __ioctl - 99.74% entry_SYSCALL_64_after_hwframe do_syscall_64 sys_ioctl - do_vfs_ioctl - 92.48% kvm_vcpu_ioctl - kvm_arch_vcpu_ioctl - 85.12% kvm_set_msr_ignored_check svm_set_msr kvm_set_msr_common printk vprintk_func vprintk_default vprintk_emit console_unlock call_console_drivers univ8250_console_write serial8250_console_write uart_console_write Reported-by: Aaron Lewis Reviewed-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20230124234905.3774678-3-seanjc@google.com Signed-off-by: Sean Christopherson commit 8911ce66697e04ce7e92753dbf5645f748e27e12 Author: Sean Christopherson Date: Tue Jan 24 23:49:00 2023 +0000 KVM: x86/pmu: Cap kvm_pmu_cap.num_counters_gp at KVM's internal max Limit kvm_pmu_cap.num_counters_gp during kvm_init_pmu_capability() based on the vendor PMU capabilities so that consuming num_counters_gp naturally does the right thing. This fixes a mostly theoretical bug where KVM could over-report its PMU support in KVM_GET_SUPPORTED_CPUID for leaf 0xA, e.g. if the number of counters reported by perf is greater than KVM's hardcoded internal limit. Incorporating input from the AMD PMU also avoids over-reporting MSRs to save when running on AMD. Link: https://lore.kernel.org/r/20230124234905.3774678-2-seanjc@google.com Signed-off-by: Sean Christopherson commit 6bdabdd2458254b95c5be51b4a85a7ad81ad7478 Author: Deepak R Varma Date: Sat Jan 14 21:11:22 2023 +0530 drm/mediatek: dp: Remove extra semicolon Remove unnecessary semicolon at the end of switch block closing brace. Issue identified using semicolon Coccinelle semantic patch. Signed-off-by: Deepak R Varma Link: https://patchwork.kernel.org/project/linux-mediatek/patch/Y8LNIt97qxLk8e70@ubun2204.myguest.virtualbox.org/ Signed-off-by: Chun-Kuang Hu commit aa9ff6a4955fdba02b54fbc4386db876603703b7 Author: 강신형 Date: Thu Dec 8 14:18:18 2022 +0900 ASoC: soc-compress: Reposition and add pcm_mutex If panic_on_warn is set and compress stream(DPCM) is started, then kernel panic occurred because card->pcm_mutex isn't held appropriately. In the following functions, warning were issued at this line "snd_soc_dpcm_mutex_assert_held". static int dpcm_be_connect(struct snd_soc_pcm_runtime *fe, struct snd_soc_pcm_runtime *be, int stream) { ... snd_soc_dpcm_mutex_assert_held(fe); ... } void dpcm_be_disconnect(struct snd_soc_pcm_runtime *fe, int stream) { ... snd_soc_dpcm_mutex_assert_held(fe); ... } void snd_soc_runtime_action(struct snd_soc_pcm_runtime *rtd, int stream, int action) { ... snd_soc_dpcm_mutex_assert_held(rtd); ... } int dpcm_dapm_stream_event(struct snd_soc_pcm_runtime *fe, int dir, int event) { ... snd_soc_dpcm_mutex_assert_held(fe); ... } These functions are called by soc_compr_set_params_fe, soc_compr_open_fe and soc_compr_free_fe without pcm_mutex locking. And this is call stack. [ 414.527841][ T2179] pc : dpcm_process_paths+0x5a4/0x750 [ 414.527848][ T2179] lr : dpcm_process_paths+0x37c/0x750 [ 414.527945][ T2179] Call trace: [ 414.527949][ T2179] dpcm_process_paths+0x5a4/0x750 [ 414.527955][ T2179] soc_compr_open_fe+0xb0/0x2cc [ 414.527972][ T2179] snd_compr_open+0x180/0x248 [ 414.527981][ T2179] snd_open+0x15c/0x194 [ 414.528003][ T2179] chrdev_open+0x1b0/0x220 [ 414.528023][ T2179] do_dentry_open+0x30c/0x594 [ 414.528045][ T2179] vfs_open+0x34/0x44 [ 414.528053][ T2179] path_openat+0x914/0xb08 [ 414.528062][ T2179] do_filp_open+0xc0/0x170 [ 414.528068][ T2179] do_sys_openat2+0x94/0x18c [ 414.528076][ T2179] __arm64_sys_openat+0x78/0xa4 [ 414.528084][ T2179] invoke_syscall+0x48/0x10c [ 414.528094][ T2179] el0_svc_common+0xbc/0x104 [ 414.528099][ T2179] do_el0_svc+0x34/0xd8 [ 414.528103][ T2179] el0_svc+0x34/0xc4 [ 414.528125][ T2179] el0t_64_sync_handler+0x8c/0xfc [ 414.528133][ T2179] el0t_64_sync+0x1a0/0x1a4 [ 414.528142][ T2179] Kernel panic - not syncing: panic_on_warn set ... So, I reposition and add pcm_mutex to resolve lockdep error. Signed-off-by: Shinhyung Kang Link: https://lore.kernel.org/r/016401d90ac4$7b6848c0$7238da40$@samsung.com Signed-off-by: Mark Brown commit bab2a5e6fe7fddc00be0356bd538e38161bab085 Author: Ira Weiny Date: Tue Jan 17 21:53:43 2023 -0800 cxl/test: Simulate event log overflow Log overflow is marked by a separate trace message. Simulate a log with lots of messages and flag overflow until space is cleared. Reviewed-by: Dan Williams Reviewed-by: Jonathan Cameron Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20221216-cxl-ev-log-v7-8-2316a5c8f7d8@intel.com Signed-off-by: Dan Williams commit 0092f62acc31ada89af09fe84b65999b8f434dd9 Author: Ira Weiny Date: Tue Jan 17 21:53:42 2023 -0800 cxl/test: Add specific events Each type of event has different trace point outputs. Add mock General Media Event, DRAM event, and Memory Module Event records to the mock list of events returned. Reviewed-by: Dan Williams Reviewed-by: Jonathan Cameron Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20221216-cxl-ev-log-v7-7-2316a5c8f7d8@intel.com Signed-off-by: Dan Williams commit d1dca858f058f53f68aeacb6db0e1cb3568fa6ef Author: Ira Weiny Date: Tue Jan 17 21:53:41 2023 -0800 cxl/test: Add generic mock events Facilitate testing basic Get/Clear Event functionality by creating multiple logs and generic events with made up UUID's. Data is completely made up with data patterns which should be easy to spot in trace output. A single sysfs entry resets the event data and triggers collecting the events for testing. Test traces are easy to obtain with a small script such as this: #!/bin/bash -x devices=`find /sys/devices/platform -name cxl_mem*` # Turn on tracing echo "" > /sys/kernel/tracing/trace echo 1 > /sys/kernel/tracing/events/cxl/enable echo 1 > /sys/kernel/tracing/tracing_on # Generate fake interrupt for device in $devices; do echo 1 > $device/event_trigger done # Turn off tracing and report events echo 0 > /sys/kernel/tracing/tracing_on cat /sys/kernel/tracing/trace Reviewed-by: Dan Williams Reviewed-by: Jonathan Cameron Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20221216-cxl-ev-log-v7-6-2316a5c8f7d8@intel.com Signed-off-by: Dan Williams commit 95b4947992858f725ad6a65a2087a3533749660f Author: Ira Weiny Date: Tue Jan 17 21:53:40 2023 -0800 cxl/mem: Trace Memory Module Event Record CXL rev 3.0 section 8.2.9.2.1.3 defines the Memory Module Event Record. Determine if the event read is memory module record and if so trace the record. Reviewed-by: Dan Williams Reviewed-by: Jonathan Cameron Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20221216-cxl-ev-log-v7-5-2316a5c8f7d8@intel.com Signed-off-by: Dan Williams commit 2d6c1e6d60ba3030450ca8396a332da84e8b7614 Author: Ira Weiny Date: Tue Jan 17 21:53:39 2023 -0800 cxl/mem: Trace DRAM Event Record CXL rev 3.0 section 8.2.9.2.1.2 defines the DRAM Event Record. Determine if the event read is a DRAM event record and if so trace the record. Reviewed-by: Dan Williams Reviewed-by: Davidlohr Bueso Reviewed-by: Jonathan Cameron Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20221216-cxl-ev-log-v7-4-2316a5c8f7d8@intel.com Signed-off-by: Dan Williams commit d54a531a430b775ae505563934a03720329fa5bd Author: Ira Weiny Date: Tue Jan 17 21:53:38 2023 -0800 cxl/mem: Trace General Media Event Record CXL rev 3.0 section 8.2.9.2.1.1 defines the General Media Event Record. Determine if the event read is a general media record and if so trace the record as a General Media Event Record. Reviewed-by: Dan Williams Reviewed-by: Davidlohr Bueso Reviewed-by: Jonathan Cameron Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20221216-cxl-ev-log-v7-3-2316a5c8f7d8@intel.com Signed-off-by: Dan Williams commit a49aa8141b657a7fd33d86f7bed3ca07567ab37a Author: Davidlohr Bueso Date: Tue Jan 17 21:53:37 2023 -0800 cxl/mem: Wire up event interrupts Currently the only CXL features targeted for irq support require their message numbers to be within the first 16 entries. The device may however support less than 16 entries depending on the support it provides. Attempt to allocate these 16 irq vectors. If the device supports less then the PCI infrastructure will allocate that number. Upon successful allocation, users can plug in their respective isr at any point thereafter. CXL device events are signaled via interrupts. Each event log may have a different interrupt message number. These message numbers are reported in the Get Event Interrupt Policy mailbox command. Add interrupt support for event logs. Interrupts are allocated as shared interrupts. Therefore, all or some event logs can share the same message number. In addition all logs are queried on any interrupt in order of the most to least severe based on the status register. Finally place all event configuration logic into cxl_event_config(). Previously the logic was a simple 'read all' on start up. But interrupts must be configured prior to any reads to ensure no events are missed. A single event configuration function results in a cleaner over all implementation. Cc: Bjorn Helgaas Cc: Jonathan Cameron Co-developed-by: Ira Weiny Signed-off-by: Davidlohr Bueso Reviewed-by: Jonathan Cameron Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20221216-cxl-ev-log-v7-2-2316a5c8f7d8@intel.com Signed-off-by: Dan Williams commit 807e2f3f58b174ff3f908c063c0ce13602ab555b Author: Miles Chen Date: Tue Jan 10 17:16:46 2023 +0800 drm/mediatek: Include missing headers Fix the follow sparse warnings by adding missing headers: drivers/gpu/drm/mediatek/mtk_cec.c:251:24: sparse: warning: symbol 'mtk_cec_driver' was not declared. Should it be static? drivers/gpu/drm/mediatek/mtk_disp_ccorr.c:221:24: sparse: warning: symbol 'mtk_disp_ccorr_driver' was not declared. Should it be static? drivers/gpu/drm/mediatek/mtk_disp_rdma.c:390:24: sparse: warning: symbol 'mtk_disp_rdma_driver' was not declared. Should it be static? drivers/gpu/drm/mediatek/mtk_disp_gamma.c:209:24: sparse: warning: symbol 'mtk_disp_gamma_driver' was not declared. Should it be static? drivers/gpu/drm/mediatek/mtk_disp_ovl.c:565:24: sparse: warning: symbol 'mtk_disp_ovl_driver' was not declared. Should it be static? drivers/gpu/drm/mediatek/mtk_disp_color.c:164:24: sparse: warning: symbol 'mtk_disp_color_driver' was not declared. Should it be static? drivers/gpu/drm/mediatek/mtk_disp_aal.c:161:24: sparse: warning: symbol 'mtk_disp_aal_driver' was not declared. Should it be static? drivers/gpu/drm/mediatek/mtk_dpi.c:1109:24: sparse: warning: symbol 'mtk_dpi_driver' was not declared. Should it be static? drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c:340:24: sparse: warning: symbol 'mtk_hdmi_ddc_driver' was not declared. Should it be static? drivers/gpu/drm/mediatek/mtk_dsi.c:1223:24: sparse: warning: symbol 'mtk_dsi_driver' was not declared. Should it be static? Signed-off-by: Miles Chen Reviewed-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230110091647.13265-1-miles.chen@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 4744cde06f57dd6fbaac468663b1fe2f653eaa16 Author: Miles Chen Date: Wed Jan 11 10:44:41 2023 +0800 drm/mediatek: Use NULL instead of 0 for NULL pointer Use NULL for NULL pointer to fix the following sparse warning: drivers/gpu/drm/mediatek/mtk_drm_gem.c:265:27: sparse: warning: Using plain integer as NULL pointer Fixes: 3df64d7b0a4f ("drm/mediatek: Implement gem prime vmap/vunmap function") Signed-off-by: Miles Chen Reviewed-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230111024443.24559-1-miles.chen@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 0313afe8b83a0ab888966c914f9e3812e8edcf98 Merge: 868c82f34cab6 3a43ded081f86 Author: Jakub Kicinski Date: Thu Jan 26 16:32:43 2023 -0800 Merge branch 'tools-ynl-prevent-reorder-and-fix-flags' Jakub Kicinski says: ==================== tools: ynl: prevent reorder and fix flags Some codegen improvements for YAML specs. First, Lorenzon discovered when switching the XDP feature family to use flags instead of pure enum that the kdoc got garbled. The support for enum and flags is therefore unified. Second when regenerating all families we discussed so far I noticed that some netlink policies jumped around. We need to ensure we don't render code based on their ordering in a hash. ==================== Link: https://lore.kernel.org/r/20230126000235.1085551-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 3a43ded081f862aa2f66a8f4f6630a45a9081e58 Author: Jakub Kicinski Date: Wed Jan 25 16:02:35 2023 -0800 tools: ynl: store ops in ordered dict to avoid random ordering When rendering code we should walk the ops in the order in which they are declared in the spec. This is both more intuitive and prevents code from jumping around when hashing in the dict changes. Signed-off-by: Jakub Kicinski commit b49c34e217c629a9d282e84889dbe0128917b8c1 Author: Jakub Kicinski Date: Wed Jan 25 16:02:34 2023 -0800 tools: ynl: rename ops_list -> msg_list ops_list contains all the operations, but the main iteration use case is to walk only ops which define attrs. Rename ops_list to msg_list, because now it looks like the contents are the same, just the format is different. While at it convert from tuple to just keys, none of the users care about the name of the op. Signed-off-by: Jakub Kicinski commit 66fa34b9c2a51baa2b8b6e529eddfe80c298f21a Author: Jakub Kicinski Date: Wed Jan 25 16:02:33 2023 -0800 tools: ynl: support kdocs for flags in code generation Lorenzo reports that after switching from enum to flags netdev family lost ability to render kdoc (and the enum contents got generally garbled). Combine the flags and enum handling in uAPI handling. Reported-by: Lorenzo Bianconi Signed-off-by: Jakub Kicinski commit 868c82f34cab6d3ac9e25e355a1c3c5fcb84ec2b Merge: 9179f5fe41733 8c284ea429d2d Author: Jakub Kicinski Date: Thu Jan 26 16:28:50 2023 -0800 Merge branch 'convert-drivers-to-return-xfrm-configuration-errors-through-extack' Leon Romanovsky says: ==================== Convert drivers to return XFRM configuration errors through extack This series continues effort started by Sabrina to return XFRM configuration errors through extack. It allows for user space software stack easily present driver failure reasons to users. As a note, Intel drivers have a path where extack is equal to NULL, and error prints won't be available in current patchset. If it is needed, it can be changed by adding special to Intel macro to print to dmesg in case of extack == NULL. ==================== Link: https://lore.kernel.org/r/cover.1674560845.git.leon@kernel.org Signed-off-by: Jakub Kicinski commit 8c284ea429d2dc6da76c30af281c292d3d428614 Author: Leon Romanovsky Date: Tue Jan 24 13:55:06 2023 +0200 cxgb4: fill IPsec state validation failure reason Rely on extack to return failure reason. Signed-off-by: Leon Romanovsky Signed-off-by: Jakub Kicinski commit 3fe57986271aeebca11343e966c6d2774535f7e0 Author: Leon Romanovsky Date: Tue Jan 24 13:55:05 2023 +0200 bonding: fill IPsec state validation failure reason Rely on extack to return failure reason. Signed-off-by: Leon Romanovsky Signed-off-by: Jakub Kicinski commit 505c500cfcb4bac4de9a49db22e5be1d1e5c2b13 Author: Leon Romanovsky Date: Tue Jan 24 13:55:04 2023 +0200 ixgbe: fill IPsec state validation failure reason Rely on extack to return failure reason. Signed-off-by: Leon Romanovsky Signed-off-by: Jakub Kicinski commit c068ec5c964dfc4fb86a4309351f7ea5cc44905a Author: Leon Romanovsky Date: Tue Jan 24 13:55:03 2023 +0200 ixgbevf: fill IPsec state validation failure reason Rely on extack to return failure reason. Signed-off-by: Leon Romanovsky Signed-off-by: Jakub Kicinski commit 05ddf5f8cb6ce59a4cc21ffa9ab2acd807f73019 Author: Leon Romanovsky Date: Tue Jan 24 13:55:02 2023 +0200 nfp: fill IPsec state validation failure reason Rely on extack to return failure reason. Reviewed-by: Simon Horman Signed-off-by: Leon Romanovsky Signed-off-by: Jakub Kicinski commit 6c48697955681ab1de1dfb7451c62898373b7e03 Author: Leon Romanovsky Date: Tue Jan 24 13:55:01 2023 +0200 netdevsim: Fill IPsec state validation failure reason Rely on extack to return failure reason. Signed-off-by: Leon Romanovsky Signed-off-by: Jakub Kicinski commit 902812b81604dd6969a5457dd2eb0dd58f9d0436 Author: Leon Romanovsky Date: Tue Jan 24 13:55:00 2023 +0200 net/mlx5e: Fill IPsec state validation failure reason Rely on extack to return failure reason. Signed-off-by: Leon Romanovsky Signed-off-by: Jakub Kicinski commit 7681a4f58fb9c338d6dfe1181607f84c793d77de Author: Leon Romanovsky Date: Tue Jan 24 13:54:59 2023 +0200 xfrm: extend add state callback to set failure reason Almost all validation logic is in the drivers, but they are missing reliable way to convey failure reason to userspace applications. Let's use extack to return this information to users. Signed-off-by: Leon Romanovsky Signed-off-by: Jakub Kicinski commit 1bb70c5ab6ec55c2cbb16b8d8dd1c7b552c5afba Author: Leon Romanovsky Date: Tue Jan 24 13:54:58 2023 +0200 net/mlx5e: Fill IPsec policy validation failure reason Rely on extack to return failure reason. Signed-off-by: Leon Romanovsky Signed-off-by: Jakub Kicinski commit 3089386db0901ac6ac3d99fbd601212c98217e60 Author: Leon Romanovsky Date: Tue Jan 24 13:54:57 2023 +0200 xfrm: extend add policy callback to set failure reason Almost all validation logic is in the drivers, but they are missing reliable way to convey failure reason to userspace applications. Let's use extack to return this information to users. Signed-off-by: Leon Romanovsky Signed-off-by: Jakub Kicinski commit 28cfb03afcb20a841e96e821ba20870a7c437034 Author: Jordan Chang Date: Thu Jan 19 18:21:02 2023 +0800 ARM: dts: aspeed: Add device tree for Ufispace NCPLite BMC Add initial version of device tree for Ufispace NCPlite platform which is equipped with AST2600-based BMC. Signed-off-by: Jordan Chang Link: https://lore.kernel.org/r/20230119102102.73414-4-jordan.chang@ufispace.com Signed-off-by: Joel Stanley commit 64e4f2412f548a8537b9da44267f7490e294edf8 Author: Jordan Chang Date: Thu Jan 19 18:21:01 2023 +0800 dt-bindings: arm: aspeed: document Ufispace NCPLite BMC Document Ufispace NCPLite board compatible. Signed-off-by: Jordan Chang Link: https://lore.kernel.org/r/20230119102102.73414-3-jordan.chang@ufispace.com Signed-off-by: Joel Stanley commit 4fa180f7fc1921e235f80e4672c80b560b4946c7 Author: Jordan Chang Date: Thu Jan 19 18:21:00 2023 +0800 dt-bindings: vendor-prefixes: Add prefix for Ufi Space Add a vendor prefix for Ufi Space (https://www.ufispace.com). Signed-off-by: Jordan Chang Link: https://lore.kernel.org/r/20230119102102.73414-2-jordan.chang@ufispace.com Signed-off-by: Joel Stanley commit 8803d9438ef65c96b03ae95472e19b3ac072c930 Author: Ali El-Haj-Mahmoud Date: Wed Jan 18 10:00:30 2023 -0500 arm: dts: aspeed: tyan s8036: Enable kcs interrupts When the BIOS is built with kcs interrupts enabled, not enabling interrupts on the BMC results in very poor IPMI performance. The other way around (BIOS with interrupts disabled, BMC with interrupts enabled) doesn't suffer degraded IPMI performance. Enabling interrupts on the BMC covers both scenarios, and should be the default. TESTED: manually verified IPMI performance when BIOS is built with and without KCS interrupts. Signed-off-by: Ali El-Haj-Mahmoud Link: https://lore.kernel.org/r/20230118150030.2079226-1-aaelhaj@google.com Signed-off-by: Joel Stanley commit 91aeaed2c1147e3b1157dc084d23f190856a6c23 Author: Xinlei Lee Date: Tue Jan 10 13:54:51 2023 +0800 drm/mediatek: dsi: Reduce the time of dsi from LP11 to sending cmd According to Figure 16 Turnaround Procedure on page 36 in [1], you can see the status of LP-00 -> LP10 -> LP11. This state can correspond to the state of DSI from LP00 -> LP11 in mtk_dsi_lane_ready function in mtk_dsi.c. LP-00 -> LP10 -> LP11 takes about 2*TLPX time (refer to [1] page 51 to see that TLPX is 50ns) The delay at the end of the mtk_dsi_lane_ready function should be greater than the 2*TLPX specified by the DSI spec, and less than the time specified by the DSI_RX (generally 6ms to 40ms), to avoid problems caused by the RX specification [1]:mipi_D-PHY_specification_v1-1 Fixes: 39e8d062b03c ("drm/mediatek: Keep dsi as LP00 before dcs cmds transfer") Signed-off-by: Xinlei Lee Acked-by: Sam Ravnborg Reviewed-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/linux-mediatek/patch/1673330093-6771-2-git-send-email-xinlei.lee@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit cbbd05d036e91b9dd976af4382f6c8d91b69b38a Author: Randy Dunlap Date: Tue Jan 24 19:22:21 2023 -0800 cxl: fix spelling mistakes Correct spelling mistakes (reported by codespell). Signed-off-by: Randy Dunlap Cc: Alison Schofield Cc: Vishal Verma Cc: Ira Weiny Cc: Ben Widawsky Cc: Dan Williams Cc: linux-cxl@vger.kernel.org Reviewed-by: Vishal Verma Reviewed-by: Alison Schofield Link: https://lore.kernel.org/r/20230125032221.21277-1-rdunlap@infradead.org Signed-off-by: Dan Williams commit 66f3cb7993c2729b72e20313f8dc6e0716416186 Author: Alison Schofield Date: Thu Jan 26 09:05:55 2023 -0800 tools/testing/cxl: Remove cxl_test module math loading message Commit "tools/testing/cxl: Add XOR Math support to cxl_test" added a module parameter to cxl_test for the interleave_arithmetic option. In doing so, it also added this dev_dbg() message describing which option cxl_test used during load: "[ 111.743246] (NULL device *): cxl_test loading modulo math option" That "(NULL device *)" has raised needless user concern. Remove the dev_dbg() message and make the module_param readable via sysfs for users that need to know which math option is active. Suggested-by: Dan Williams Reviewed-by: Vishal Verma Link: https://lore.kernel.org/r/20230126170555.701240-1-alison.schofield@intel.com Signed-off-by: Alison Schofield Signed-off-by: Dan Williams commit ee611e5e6616f7981939cc0441a5fb531312c2b6 Author: Robert Richter Date: Wed Jan 25 09:57:28 2023 +0100 cxl/mbox: Add debug messages for enabled mailbox commands Only unsupported mailbox commands are reported in debug messages. A list of enabled commands is useful too. Change debug messages to also report the opcodes of enabled commands. Esp. if card initialization fails there is no way to get this information from userland. On that occasion also add missing trailing newlines. Signed-off-by: Robert Richter Reviewed-by: Alison Schofield Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20230125085728.234697-1-rrichter@amd.com Signed-off-by: Dan Williams commit 6b985af556e5c50e89d00a79864423582bfd3c69 Author: Bjorn Helgaas Date: Wed Jan 18 17:46:04 2023 -0600 PCI/AER: Remove redundant Device Control Error Reporting Enable The following bits in the PCIe Device Control register enable sending of ERR_COR, ERR_NONFATAL, or ERR_FATAL Messages (or reporting internally in the case of Root Ports): Correctable Error Reporting Enable Non-Fatal Error Reporting Enable Fatal Error Reporting Enable Unsupported Request Reporting Enable These enable bits are set by pci_enable_pcie_error_reporting(), and since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), we do that in this path during enumeration: pci_init_capabilities pci_aer_init pci_enable_pcie_error_reporting Previously, the AER service driver also traversed the hierarchy when claiming a Root Port, enabling error reporting for downstream devices, but this is redundant. Remove the code that enables this error reporting in the AER .probe() path. Also remove similar code that disables error reporting in the AER .remove() path. Note that these Device Control Reporting Enable bits do not control interrupt generation. That's done by the similarly-named bits in the AER Root Error Command register, which are still set by aer_probe() and cleared by aer_remove(), since the AER service driver handles those interrupts. See PCIe r6.0, sec 6.2.6. Link: https://lore.kernel.org/r/20230118234612.272916-2-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Stefan Roese Reviewed-by: Kuppuswamy Sathyanarayanan Cc: Ashok Raj Cc: Keith Busch commit 65177e47d3035c083cff034ffbfc7ab750a4675c Author: Jakub Kicinski Date: Wed Jan 25 15:13:56 2023 -0800 testing: kselftest_harness: add filtering and enumerating tests As the number of test cases and length of execution grows it's useful to select only a subset of tests. In TLS for instance we have a matrix of variants for different crypto protocols and during development mostly care about testing a handful. This is quicker and makes reading output easier. This patch adds argument parsing to kselftest_harness. It supports a couple of ways to filter things, I could not come up with one way which will cover all cases. The first and simplest switch is -r which takes the name of a test to run (can be specified multiple times). For example: $ ./my_test -r some.test.name -r some.other.name will run tests some.test.name and some.other.name (where "some" is the fixture, "test" and "other" and "name is the test.) Then there is a handful of group filtering options. f/v/t for filtering by fixture/variant/test. They have both positive (match -> run) and negative versions (match -> skip). If user specifies any positive option we assume the default is not to run the tests. If only negative options are set we assume the tests are supposed to be run by default. Usage: ./tools/testing/selftests/net/tls [-h|-l] [-t|-T|-v|-V|-f|-F|-r name] -h print help -l list all tests -t name include test -T name exclude test -v name include variant -V name exclude variant -f name include fixture -F name exclude fixture -r name run specified test Test filter options can be specified multiple times. The filtering stops at the first match. For example to include all tests from variant 'bla' but not test 'foo' specify '-T foo -v bla'. Here we can request for example all tests from fixture "foo" to run: ./my_test -f foo or to skip variants var1 and var2: ./my_test -V var1 -V var2 Signed-off-by: Jakub Kicinski Signed-off-by: Shuah Khan commit 668f777d02f61faa834f1e24f3b99576dbe5ff6b Author: Cristian Marussi Date: Thu Jan 26 18:05:11 2023 +0000 regulator: scmi: Allow for zero voltage domains SCMI Voltage protocol allows the platform to report no voltage domains on discovery, while warning the user about such an odd configuration. As a consequence this condition should not be treated as error by the SCMI regulator driver either. Allow SCMI regulator driver to probe successfully even when no voltage domains are discovered. Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20230126180511.766373-1-cristian.marussi@arm.com Signed-off-by: Mark Brown commit d5b4c8b909f5670e292fa655b22e3d35bf699c46 Author: Mark Brown Date: Thu Jan 26 22:51:39 2023 +0000 regulator: max20411: Directly include bitfield.h The max20411 driver uses bitfield.h but does not directly include it, add an inclusion to avoid build errors in configurations which do not result in an implicit inclusion. Signed-off-by: Mark Brown commit 2a3003e9507c0315e0642247230899485c488ff8 Author: Like Xu Date: Mon Dec 5 20:20:48 2022 +0800 KVM: x86/pmu: Drop event_type and rename "struct kvm_event_hw_type_mapping" After commit ("02791a5c362b KVM: x86/pmu: Use PERF_TYPE_RAW to merge reprogram_{gp,fixed}counter()"), vPMU starts to directly use the hardware event eventsel and unit_mask to reprogram perf_event, and the event_type field in the "struct kvm_event_hw_type_mapping" is simply no longer being used. Convert the struct into an anonymous struct as the current name is obsolete as the structure no longer has any mapping semantics, and placing the struct definition directly above its sole user makes its easier to understand what the array is filling in. Signed-off-by: Like Xu Link: https://lore.kernel.org/r/20221205122048.16023-1-likexu@tencent.com [sean: drop new comment, use anonymous struct] Signed-off-by: Sean Christopherson commit 6ebe28f9ec7228e1a35df6074695ac11d7cdcf68 Author: Ira Weiny Date: Tue Jan 17 21:53:36 2023 -0800 cxl/mem: Read, trace, and clear events on driver load CXL devices have multiple event logs which can be queried for CXL event records. Devices are required to support the storage of at least one event record in each event log type. Devices track event log overflow by incrementing a counter and tracking the time of the first and last overflow event seen. Software queries events via the Get Event Record mailbox command; CXL rev 3.0 section 8.2.9.2.2 and clears events via CXL rev 3.0 section 8.2.9.2.3 Clear Event Records mailbox command. If the result of negotiating CXL Error Reporting Control is OS control, read and clear all event logs on driver load. Ensure a clean slate of events by reading and clearing the events on driver load. The status register is not used because a device may continue to trigger events and the only requirement is to empty the log at least once. This allows for the required transition from empty to non-empty for interrupt generation. Handling of interrupts is in a follow on patch. The device can return up to 1MB worth of event records per query. Allocate a shared large buffer to handle the max number of records based on the mailbox payload size. This patch traces a raw event record and leaves specific event record type tracing to subsequent patches. Macros are created to aid in tracing the common CXL Event header fields. Each record is cleared explicitly. A clear all bit is specified but is only valid when the log overflows. Reviewed-by: Jonathan Cameron Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20221216-cxl-ev-log-v7-1-2316a5c8f7d8@intel.com Signed-off-by: Dan Williams commit b904227a4b693fbb9d5eabc9d7100dc01d9eb973 Author: Konrad Dybcio Date: Fri Jan 20 22:01:00 2023 +0100 arm64: dts: qcom: sm8350: Hook up DSI1 to MDP Somehow DSI1 was not hooked up to MDP resulting in it not working. Fix it. Fixes: d4a4410583ed ("arm64: dts: qcom: sm8350: Add display system nodes") Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230120210101.2146852-8-konrad.dybcio@linaro.org commit 2a07efb8c08619888428cc8fd47643c438111f29 Author: Konrad Dybcio Date: Fri Jan 20 22:00:59 2023 +0100 arm64: dts: qcom: sm8350: Add mdss_ prefix to DSIn out labels Add the mdss_ prefix to DSIn labels, so that the hardware blocks can be organized near each other while retaining the alphabetical order in device DTs when referencing by label. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230120210101.2146852-7-konrad.dybcio@linaro.org commit e3e654ced376060d64ede8e2dfde0b1bac0f9086 Author: Konrad Dybcio Date: Fri Jan 20 22:00:58 2023 +0100 arm64: dts: qcom: sm8350: Fix DSI PLL size As downstream indicates, DSI PLL is actually 0x27c and not 0x260- wide. Fix that to reserve the correct registers. Fixes: d4a4410583ed ("arm64: dts: qcom: sm8350: Add display system nodes") Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230120210101.2146852-6-konrad.dybcio@linaro.org commit 45cd807de14388010a279765486c13f8ac540dfa Author: Konrad Dybcio Date: Fri Jan 20 22:00:57 2023 +0100 arm64: dts: qcom: sm8350: Fix DSI PHY compatibles The compatibles were wrong, resulting in the driver not probing. Fix that. Fixes: d4a4410583ed ("arm64: dts: qcom: sm8350: Add display system nodes") Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230120210101.2146852-5-konrad.dybcio@linaro.org commit 0af6a4012b3815ebca7b8080a286edc01e4a89e1 Author: Konrad Dybcio Date: Fri Jan 20 22:00:56 2023 +0100 arm64: dts: qcom: sm8350: Feed DSI1 PHY clocks to DISPCC This was omitted but is necessary for DSI1 to function. Fix it. Fixes: d4a4410583ed ("arm64: dts: qcom: sm8350: Add display system nodes") Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230120210101.2146852-4-konrad.dybcio@linaro.org commit 1eed7995d9da0489e5a46c13bd888ffa987ead98 Author: Konrad Dybcio Date: Fri Jan 20 22:00:55 2023 +0100 arm64: dts: qcom: sm8350: Fix DSI1 interrupt The interrupt was wrong, likely copypasted from DSI0. Fix it. Fixes: d4a4410583ed ("arm64: dts: qcom: sm8350: Add display system nodes") Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230120210101.2146852-3-konrad.dybcio@linaro.org commit 6636818ecf0f1d448360835017473cf94a0ee967 Author: Konrad Dybcio Date: Fri Jan 20 22:00:54 2023 +0100 arm64: dts: qcom: sm8350: Add missing #address/size-cells to DSIn Panels/DRM bridges definitely don't need 64bits of address space and are usually not 32-bit wide. Set address-cells to 1 and size-cells to 0. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230120210101.2146852-2-konrad.dybcio@linaro.org commit 0217a40d7ba6e71d7f3422fbe89b436e8ee7ece7 Author: Johan Hovold Date: Thu Jan 19 17:42:55 2023 +0100 efi: efivars: prevent double registration Add the missing sanity check to efivars_register() so that it is no longer possible to override an already registered set of efivar ops (without first deregistering them). This can help debug initialisation ordering issues where drivers have so far unknowingly been relying on overriding the generic ops. Signed-off-by: Johan Hovold Signed-off-by: Ard Biesheuvel commit bad267f9e18f8e9e628abd1811d2899b1735a4e1 Author: Johan Hovold Date: Thu Jan 19 17:42:54 2023 +0100 efi: verify that variable services are supported Current Qualcomm UEFI firmware does not implement the variable services but not all revisions clear the corresponding bits in the RT_PROP table services mask and instead the corresponding calls return EFI_UNSUPPORTED. This leads to efi core registering the generic efivar ops even when the variable services are not supported or when they are accessed through some other interface (e.g. Google SMI or the upcoming Qualcomm SCM implementation). Instead of playing games with init call levels to make sure that the custom implementations are registered after the generic one, make sure that get_next_variable() is actually supported before registering the generic ops. Signed-off-by: Johan Hovold Signed-off-by: Ard Biesheuvel commit 301de9a2055357375a4e1053d9df0f8f3467ff00 Author: Johan Hovold Date: Thu Jan 19 17:42:53 2023 +0100 efivarfs: always register filesystem The efivar ops are typically registered at subsys init time so that they are available when efivarfs is registered at module init time. Other efivars implementations, such as Google SMI, exist and can currently be built as modules which means that efivar may not be available when efivarfs is initialised. Move the efivar availability check from module init to when the filesystem is mounted to allow late registration of efivars. Signed-off-by: Johan Hovold Signed-off-by: Ard Biesheuvel commit 1d233b1cb149ec78c20fac58331b27bb460f9558 Author: Dmitry Baryshkov Date: Thu Dec 29 21:18:30 2022 +0200 drm/msm/dpu: set pdpu->is_rt_pipe early in dpu_plane_sspp_atomic_update() The function dpu_plane_sspp_atomic_update() updates pdpu->is_rt_pipe flag, but after the commit 854f6f1c653b ("drm/msm/dpu: update the qos remap only if the client type changes") it sets the flag late, after all the qos functions have updated QoS programming. Move the flag update back to the place where it happened before the mentioned commit to let the pipe be programmed according to its current RT/non-RT state. Fixes: 854f6f1c653b ("drm/msm/dpu: update the qos remap only if the client type changes") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/516239/ Link: https://lore.kernel.org/r/20221229191856.3508092-2-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 0b5a8e81877b5149e5df9817fb4fa1864daab512 Author: Dmitry Baryshkov Date: Wed Dec 7 16:28:32 2022 +0200 drm/msm/dpu: correct the UBWC version on sm6115 According to downstream (bengal-sde.dtsi), the sm6115 uses UBWC 1.0. Change the catalog entry accordingly. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/514337/ Link: https://lore.kernel.org/r/20221207142833.204193-3-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 213e63e0ef0d31a5f9391fe3b06578a944d5330f Author: Dmitry Baryshkov Date: Wed Dec 7 16:28:31 2022 +0200 drm/msm/dpu: handle UBWC 1.0 in dpu_hw_sspp_setup_format Extend dpu_hw_sspp_setup_format() to also handle the UBWC 1.0 case. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/514336/ Link: https://lore.kernel.org/r/20221207142833.204193-2-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 59817b9030f6cd7874867154c44f7a2ad8399ce1 Author: Dmitry Baryshkov Date: Thu Jan 19 15:22:17 2023 +0200 drm/msm/hdmi: make hdmi_phy_8960 OF clk provider On MSM8960 the HDMI PHY provides the PLL clock to the MMCC. As we are preparing to convert the MSM8960 to use DT clocks properties (rather than global clock names), register the OF clock provider. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/519211/ Link: https://lore.kernel.org/r/20230119132219.2479775-5-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit a42964ce9cddb65ee6945dd24db517b7aac65128 Author: Dmitry Baryshkov Date: Thu Jan 19 15:22:16 2023 +0200 drm/msm/hdmi: switch hdmi_pll_8960 to use parent_data Replace parent_names usage with parent_data. Note, that this makes the PLL default to board's `pxo_board' clock rather than just `pxo' clock, as we are on a way to deprecate the global cxo/pxo clocks. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/519210/ Link: https://lore.kernel.org/r/20230119132219.2479775-4-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit c5c92b2ad6c6ef51040aa6bd090d61def25033bf Author: Dmitry Baryshkov Date: Thu Jan 19 15:22:15 2023 +0200 dt-bindings: phy: qcom, hdmi-phy-other: mark it as clock provider Eventually all HDMI PHYs are going to provide the HDMI PLL clock to the MMCC. Add #clock-cells property required to provide the HDMI PLL clock to other devices. Signed-off-by: Dmitry Baryshkov Acked-by: Rob Herring Patchwork: https://patchwork.freedesktop.org/patch/519213/ Link: https://lore.kernel.org/r/20230119132219.2479775-3-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 2cc7566d924bd064eae39cdfd730e2793602034d Author: Dmitry Baryshkov Date: Thu Jan 19 15:22:14 2023 +0200 dt-bindings: phy: qcom, hdmi-phy-other: use pxo clock Add pxo clock to the 8960 bindings (used by the HDMI PLL) Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/519206/ Link: https://lore.kernel.org/r/20230119132219.2479775-2-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 325a7eb85199ec9c5b5a7af812f43ea16b735569 Author: Bob Pearson Date: Thu Jan 19 17:59:36 2023 -0600 RDMA/rxe: Cleanup page variables in rxe_mr.c Cleanup usage of mr->page_shift and mr->page_mask and introduce an extractor for mr->ibmr.page_size. Normal usage in the kernel has page_mask masking out offset in page rather than masking out the page number. The rxe driver had reversed that which was confusing. Implicitly there can be a per mr page_size which was not uniformly supported. Link: https://lore.kernel.org/r/20230119235936.19728-6-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit d8bdb0ebca086b5845d782e800ad2bf2a7eb4877 Author: Bob Pearson Date: Thu Jan 19 17:59:35 2023 -0600 RDMA-rxe: Isolate mr code from atomic_write_reply() Isolate mr specific code from atomic_write_reply() in rxe_resp.c into a subroutine rxe_mr_do_atomic_write() in rxe_mr.c. Check length for atomic write operation. Make iova_to_vaddr() static. Link: https://lore.kernel.org/r/20230119235936.19728-5-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit f04d5b3d916c61752ac2c2adea5dfe78f8e12f78 Author: Bob Pearson Date: Thu Jan 19 17:59:34 2023 -0600 RDMA-rxe: Isolate mr code from atomic_reply() Isolate mr specific code from atomic_reply() in rxe_resp.c into a subroutine rxe_mr_do_atomic_op() in rxe_mr.c. Minor cleanups to rxe_check_range() and iova_to_vaddr(). Move enum resp_state to rxe.h Link: https://lore.kernel.org/r/20230119235936.19728-4-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit db4729a5251992ed535da09c0fcf9b590ac7fe6c Author: Bob Pearson Date: Thu Jan 19 17:59:33 2023 -0600 RDMA/rxe: Move rxe_map_mr_sg to rxe_mr.c Move rxe_map_mr_sg() to rxe_mr.c where it makes a little more sense. Link: https://lore.kernel.org/r/20230119235936.19728-3-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit ade58da2a73de1b65616e4b1080dc078d1ce0b5d Author: Bob Pearson Date: Thu Jan 19 17:59:32 2023 -0600 RDMA/rxe: Cleanup mr_check_range Remove blank lines and replace EFAULT by EINVAL when an invalid mr type is used. Link: https://lore.kernel.org/r/20230119235936.19728-2-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 2ec56b232b9775b4814c207ed6da9f065b29711c Author: Dmitry Baryshkov Date: Tue Jan 24 22:36:00 2023 +0200 drm/msm/dsi: properly handle the case of empty OPP table in dsi_mgr_bridge_mode_valid It was left unnoticed during the review that even if there is no OPP table in device tree, one will be created by a call to the function devm_pm_opp_set_clkname(). This leads to dsi_mgr_bridge_mode_valid() rejecting all modes if DT contains no OPP table for the DSI host. Rework dsi_mgr_bridge_mode_valid() to handle this case by actually checking that the table is populated with frequency entries before returning an error. Fixes: 8328041b8c82 ("drm/msm/dsi: implement opp table based check for dsi_mgr_bridge_mode_valid()") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/520076/ Link: https://lore.kernel.org/r/20230124203600.3488766-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit a7efe60e36b9c0e966d7f82ac90a89b591d984e9 Author: Marijn Suijten Date: Wed Jan 25 11:14:11 2023 +0100 drm/msm/dpu: Add DSC hardware blocks to register snapshot Add missing DSC hardware block register ranges to the snapshot utility to include them in dmesg (on MSM_DISP_SNAPSHOT_DUMP_IN_CONSOLE) and the kms debugfs file. Signed-off-by: Marijn Suijten Reviewed-by: Neil Armstrong Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/520175/ Link: https://lore.kernel.org/r/20230125101412.216924-1-marijn.suijten@somainline.org Signed-off-by: Dmitry Baryshkov commit ba82e06cf7f46ac97fe935a6abfe2392ae694ab0 Author: Marc Zyngier Date: Thu Jan 12 12:38:29 2023 +0000 KVM: arm64: timers: Don't BUG() on unhandled timer trap Although not handling a trap is a pretty bad situation to be in, panicing the kernel isn't useful and provides no valuable information to help debugging the situation. Instead, dump the encoding of the unhandled sysreg, and inject an UNDEF in the guest. At least, this gives a user an opportunity to report the issue with some information to help debugging it. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230112123829.458912-4-maz@kernel.org Signed-off-by: Oliver Upton commit fc6ee952cf0008fb4a60dd8e539d9f17decaabe5 Author: Marc Zyngier Date: Thu Jan 12 12:38:28 2023 +0000 KVM: arm64: Reduce overhead of trapped timer sysreg accesses Each read/write to a trapped timer system register results in a whole kvm_timer_vcpu_put/load() cycle which affects all of the timers, and a bit more. There is no need for such a thing, and we can limit the impact to the timer being affected, and only this one. This drastically simplifies the emulated case, and limits the damage for trapped accesses. This also brings some performance back for NV. Whilst we're at it, fix a comment that didn't quite capture why we always set CNTVOFF_EL2 to 0 when disabling the virtual timer. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230112123829.458912-3-maz@kernel.org Signed-off-by: Oliver Upton commit 4d74ecfa6458bf482d93ad9a98c7f0423ff0564b Author: Marc Zyngier Date: Thu Jan 12 12:38:27 2023 +0000 KVM: arm64: Don't arm a hrtimer for an already pending timer When fully emulating a timer, we back it with a hrtimer that is armver on vcpu_load(). However, we do this even if the timer is already pending. This causes spurious interrupts to be taken, though the guest doesn't observe them (the interrupt is already pending). Although this is a waste of precious cycles, this isn't the end of the world with the current state of KVM. However, this can lead to a situation where a guest doesn't make forward progress anymore with NV. Fix it by checking that if the timer is already pending before arming a new hrtimer. Also drop the hrtimer cancelling, which is useless, by construction. Reported-by: D Scott Phillips Fixes: bee038a67487 ("KVM: arm/arm64: Rework the timer code to use a timer_map") Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230112123829.458912-2-maz@kernel.org Signed-off-by: Oliver Upton commit 960c3028a1d521f3199460fa1e6ef947244b8281 Author: Marc Zyngier Date: Fri Jan 13 13:28:09 2023 +0000 KVM: arm64: Drop Columbia-hosted mailing list After many years of awesome service, the kvmarm mailing list hosted by Columbia is being decommissioned, and replaced by kvmarm@lists.linux.dev. Many thanks to Columbia for having hosted us for so long, and to the kernel.org folks for giving us a new home. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230113132809.1979119-1-maz@kernel.org Signed-off-by: Oliver Upton commit 58817be467621cf9d31b0a00e7dad08936e39748 Author: Oliver Upton Date: Mon Jan 23 21:02:56 2023 +0000 MAINTAINERS: Add Oliver Upton as co-maintainer of KVM/arm64 Going forward I intend to help Marc with maintaining KVM/arm64. We've spoken about this quite a bit and he has been a tremendous help in ramping up to the task (thank you!). We haven't worked out the exact details of how the process will work, but the goal is to even out the maintenance responsibilities to give us both ample time for development. To that end, updating the maintainers entry to reflect the change. Acked-by: Will Deacon Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20230123210256.2728218-1-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit 608348285a5c4aad5bea3709f73cf030b5865562 Author: Wang Yong Date: Tue Jan 10 15:00:46 2023 +0000 Documentation: KVM: fix typos in running-nested-guests.rst change "gues" to "guest" and remove redundant ")". Signed-off-by: Wang Yong Reviewed-by: Kashyap Chamarthy Link: https://lore.kernel.org/r/20230110150046.549755-1-yongw.kernel@gmail.com Signed-off-by: Jonathan Corbet commit 6b219431037bf98c9efd49716aea9b68440477a3 Author: Jakob Koschel Date: Fri Jan 20 00:23:20 2023 +0100 docs/scripts/gdb: add necessary make scripts_gdb step In order to debug the kernel successfully with gdb you need to run 'make scripts_gdb' nowadays. This was changed with the following commit: Commit 67274c083438340ad16c ("scripts/gdb: delay generation of gdb constants.py") In order to have a complete guide for beginners this remark should be added to the offial documentation. Signed-off-by: Jakob Koschel Link: https://lore.kernel.org/r/20230112-documentation-gdb-v2-1-292785c43dc9@gmail.com Signed-off-by: Jonathan Corbet commit 835205f61f84b61de4e475f09802ad1cc0f87d49 Author: Shuah Khan Date: Wed Jan 25 08:44:26 2023 -0700 docs: leds: fix the following docu build warning Add leds-qcom-lpg to Documentation/leds/index.rst to fix the following doc build warning. Documentation/leds/leds-qcom-lpg.rst: WARNING: document isn't included in any toctree Signed-off-by: Shuah Khan Link: https://lore.kernel.org/r/20230125154426.12464-1-skhan@linuxfoundation.org Signed-off-by: Jonathan Corbet commit 0c1ccc158bbc4d14fe1a52e99f3933f34f309dac Author: Arnd Bergmann Date: Thu Jan 26 17:35:14 2023 +0100 Coresight: tpda/tpdm: remove incorrect __exit annotation 'remove' callbacks get called whenever a device is unbound from the driver, which can get triggered from user space. Putting it into the __exit section means that the function gets dropped in for built-in drivers, as pointed out by this build warning: `tpda_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-tpda.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-tpda.o `tpdm_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-tpdm.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-tpdm.o Fixes: 5b7916625c01 ("Coresight: Add TPDA link driver") Fixes: b3c71626a933 ("Coresight: Add coresight TPDM source driver") Signed-off-by: Arnd Bergmann Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230126163530.3495413-1-arnd@kernel.org commit 5d8c5e430a63fec5ef810e5e33de03d9b944e82d Author: Mike Rapoport (IBM) Date: Wed Jan 25 21:28:41 2023 +0200 docs/mm: Physical Memory: add structure, introduction and nodes description Add structure, introduction and Nodes section to Physical Memory chapter. As the new documentation references core-api/dma-api and mm/page_reclaim, add page labels to those documents. Reviewed-by: Bagas Sanjaya Reviewed-by: Lorenzo Stoakes Acked-by: Michal Hocko Acked-by: Vlastimil Babka Signed-off-by: Mike Rapoport (IBM) Link: https://lore.kernel.org/r/20230125192841.25342-2-rppt@kernel.org Signed-off-by: Jonathan Corbet commit 77a0812c962baec49c9928342f9020f05fbb5db1 Author: Jules Maselbas Date: Thu Jan 26 18:32:17 2023 +0100 Documentation/mm: Fix typo emluation -> emulation Fix typo emluation -> emulation Signed-off-by: Jules Maselbas Link: https://lore.kernel.org/r/20230126173217.12912-1-jmaselbas@kalray.eu Signed-off-by: Jonathan Corbet commit 54c968bec344b101ba3596f2544f0f3b4c1eef2f Author: Ard Biesheuvel Date: Tue Dec 13 15:28:49 2022 +0100 arm64: Apply dynamic shadow call stack patching in two passes Code patching for the dynamically enabled shadow call stack comes down to finding PACIASP and AUTIASP instructions -which behave as NOPs on cores that do not implement pointer authentication- and converting them into shadow call stack pushes and pops, respectively. Due to past bad experiences with the highly complex and overengineered DWARF standard that describes the unwind metadata that we are using to locate these instructions, let's make this patching logic a little bit more robust so that any issues with the unwind metadata detected at boot time can de dealt with gracefully. The DWARF annotations that are used for this are emitted at function granularity, and due to the fact that the instructions we are patching will simply behave as NOPs if left unpatched, we can abort on errors as long as we don't leave any functions in a half-patched state. So do a dry run of each FDE frame (covering a single function) before performing the actual patching, and give up if the DWARF metadata cannot be understood. Signed-off-by: Ard Biesheuvel Acked-by: Will Deacon Reviewed-by: Sami Tolvanen Link: https://lore.kernel.org/r/20221213142849.1629026-1-ardb@kernel.org Signed-off-by: Catalin Marinas commit 59273180299ad264d086135e8199c1b05ea51b69 Author: Miquel Raynal Date: Thu Dec 15 09:12:33 2022 +0100 mtd: spi-nor: Create macros to define chip IDs and geometries The INFO() macro defines an ID array and a couple of geometry properties. Right now all its lines are duplicated twice because of the INFO6() macro (for extended IDs) and soon as well we will need to add a geometry parameter to include the number of banks. In order to limit the code duplication, let's create a number of intermediate macros which will facilitate defining high-level INFOX() macros. There is no functional change. Signed-off-by: Miquel Raynal Reviewed-by: Pratyush Yadav Link: https://lore.kernel.org/r/20221215081241.407098-2-miquel.raynal@bootlin.com Signed-off-by: Tudor Ambarus commit bb457bddee41077768759f6706fa641227877fa0 Author: Prathu Baronia Date: Mon Jan 23 16:36:38 2023 +0530 arm64: el2_setup.h: fix spelling typo in comments - "evailable" -> "available" Signed-off-by: Prathu Baronia Reviewed-by: Mukesh Ojha Link: https://lore.kernel.org/r/20230123110639.10473-1-prathubaronia2011@gmail.com Signed-off-by: Catalin Marinas commit 11fc944f7e14a67a2fbf578da5d7244525cf9571 Author: Randy Dunlap Date: Tue Jan 24 10:16:05 2023 -0800 arm64: Kconfig: fix spelling Fix spelling typos in arm64: (reported by codespell) s/upto/up to/ s/familly/family/ Signed-off-by: Randy Dunlap Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230124181605.14144-1-rdunlap@infradead.org Signed-off-by: Catalin Marinas commit 2ced0f30a426c7301350681f838344d5aea711e3 Author: Ard Biesheuvel Date: Wed Jan 25 19:59:10 2023 +0100 arm64: head: Switch endianness before populating the ID map Ensure that the endianness used for populating the ID map matches the endianness that the running kernel will be using, as this is no longer guaranteed now that create_idmap() is invoked before init_kernel_el(). Note that doing so is only safe if the MMU is off, as switching the endianness with the MMU on results in the active ID map to become invalid. So also clear the M bit when toggling the EE bit in SCTLR, and mark the MMU as disabled at boot. Note that the same issue has resulted in preserve_boot_args() recording the contents of registers X0 ... X3 in the wrong byte order, although this is arguably a very minor concern. Fixes: 32b135a7fafe ("arm64: head: avoid cache invalidation when entering with the MMU on") Reported-by: Nathan Chancellor Signed-off-by: Ard Biesheuvel Tested-by: Nathan Chancellor Link: https://lore.kernel.org/r/20230125185910.962733-1-ardb@kernel.org Signed-off-by: Catalin Marinas commit ca5a16db010018095da35c074397289a5bbcb543 Author: Tudor Ambarus Date: Tue Jan 10 18:47:03 2023 +0200 mtd: spi-nor: spansion: Make CFRx reg fields generic Cypress defines two flavors of configuration registers, volatile and non volatile, and both use the same bit fields. Rename the bitfields in the configuration registers so that they can be used for both flavors. Signed-off-by: Tudor Ambarus Reviewed-by: Dhruva Gole Reviewed-by: Takahiro Kuwano Reviewed-by: Pratyush Yadav Link: https://lore.kernel.org/linux-mtd/20230110164703.83413-2-tudor.ambarus@linaro.org commit 3f592a869f87723314f0cb1ac232bd3bf8245be8 Author: Tudor Ambarus Date: Tue Jan 10 18:47:02 2023 +0200 mtd: spi-nor: spansion: Consider reserved bits in CFR5 register CFR5[6] is reserved bit and must be always 1. Set it to comply with flash requirements. While fixing SPINOR_REG_CYPRESS_CFR5V_OCT_DTR_{EN, DS} definition, stop using magic numbers and describe the missing bit fields in CFR5 register. This is useful for both readability and future possible addition of Octal STR mode support. Fixes: c3266af101f2 ("mtd: spi-nor: spansion: add support for Cypress Semper flash") Cc: stable@vger.kernel.org Reported-by: Takahiro Kuwano Signed-off-by: Tudor Ambarus Reviewed-by: Dhruva Gole Reviewed-by: Pratyush Yadav Tested-by: Dhruva Gole Link: https://lore.kernel.org/linux-mtd/20230110164703.83413-1-tudor.ambarus@linaro.org commit 25e3f30601a368642678744fc8a9b1dce183c7bc Author: Zeng Heng Date: Fri Sep 23 11:14:57 2022 +0800 mtd: spi-nor: core: fix implicit declaration warning spi-nor/core.c needs to include linux/delay.h, or it would raise below compile warning: drivers/mtd/spi-nor/core.c: In function ‘spi_nor_soft_reset’: drivers/mtd/spi-nor/core.c:2779:2: error: implicit declaration of function ‘usleep_range’ [-Werror=implicit-function-declaration] 2779 | usleep_range(SPI_NOR_SRST_SLEEP_MIN, SPI_NOR_SRST_SLEEP_MAX); | ^~~~~~~~~~~~ Fixes: d73ee7534cc5 ("mtd: spi-nor: core: perform a Soft Reset on shutdown") Signed-off-by: Zeng Heng Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20220923031457.56103-1-zengheng4@huawei.com commit 9636e650e16f6b01f0044f7662074958c23e4707 Author: Christoph Hellwig Date: Wed Jan 25 07:58:39 2023 +0100 fs: build the legacy direct I/O code conditionally Add a new LEGACY_DIRECT_IO config symbol that is only selected by the file systems that still use the legacy blockdev_direct_IO code, so that kernels without support for those file systems don't need to build the code. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Eric Biggers Link: https://lore.kernel.org/r/20230125065839.191256-3-hch@lst.de Signed-off-by: Jens Axboe commit 439bc39b3cf0014b1b75075812f7ef0f8baa9674 Author: Christoph Hellwig Date: Wed Jan 25 07:58:38 2023 +0100 fs: move sb_init_dio_done_wq out of direct-io.c sb_init_dio_done_wq is also used by the iomap code, so move it to super.c in preparation for building direct-io.c conditionally. Signed-off-by: Christoph Hellwig Reviewed-by: Eric Biggers Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230125065839.191256-2-hch@lst.de Signed-off-by: Jens Axboe commit aa326917f58fa577bfba8976da214080bdec2699 Author: Dan Carpenter Date: Thu Jan 26 12:26:35 2023 +0300 ASoC: mediatek: mt8188: remove some dead code We know that "irq < 0", so delete the unnecessary check. Signed-off-by: Dan Carpenter Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/Y9JHSwcfdNcfMjjt@kili Signed-off-by: Mark Brown commit 892e0d3f42e7dabc874c734e80e4e12276470332 Merge: 0390a102cc18c ec9009724027b Author: Mark Brown Date: Thu Jan 26 17:04:48 2023 +0000 Update lpass dt-bindings Merge series from Srinivasa Rao Mandadapu : Update va-macro driver dt-bindings and add missing properties in sc7280 machine driver dt-bindings. Changes since v2: -- Update commit message and example in "Add platform property" patch. -- Update commit message in "Update clock name" patch. Changes since v1: -- Remove sound-dai cells property patch. -- Update example in clock name change patch. -- Update commit message and add maxItems in platform proerty patch. Srinivasa Rao Mandadapu (2): ASoC: qcom: dt-bindings: lpass-va-macro: Update clock name ASoC: dt-bindings: google,sc7280-herobrine: Add platform property .../devicetree/bindings/sound/google,sc7280-herobrine.yaml | 12 ++++++++++++ .../devicetree/bindings/sound/qcom,lpass-va-macro.yaml | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) -- 2.7.4 commit 1cc4606d19e3710bfab3f6704b87ff9580493c69 Author: Alexander Mikhalitsyn Date: Thu Jan 26 11:23:18 2023 +0100 fuse: add inode/permission checks to fileattr_get/fileattr_set It looks like these checks were accidentally lost during the conversion to fileattr API. Fixes: 72227eac177d ("fuse: convert to fileattr") Cc: # v5.13 Signed-off-by: Alexander Mikhalitsyn Signed-off-by: Miklos Szeredi commit 02be605946b64df6d328811eb2488f7a245a5206 Merge: a2c81dc59d41e 8c5ee9155f8ae Author: Rafael J. Wysocki Date: Thu Jan 26 17:21:24 2023 +0100 Merge tag 'thermal-v6.3-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux into thermal-next Pull thermal control material for 6.3-rc1 from Daniel Lezcano: "- Fix kerneldoc format errors for Rockchip, Mediatek and Uniphier (Randy Dunlap) - Add the missing 'qcom,adc-tm7' compatible string in the dt-bindings (Krzysztof Kozlowski) - Improve the calibration routine by relying on the nvmem to read the values and provide a set of fixes for the QCom tsens driver (Dmitry Baryshkov) - Remove the duplicate interrupt setting routine in the QCom tsens driver (Daniel Lezcano) - Fix a wrong loop condition in the i.MX SC thermal driver and add the iMX8QM sensors (Viorel Suman) - Fix header inclusion asm-generic.h by asm.h for the qcom-spmi-adc-tm5 driver (Andy Shevchenko) - Use the devm_platform_get_and_ioremap_resource() combo function in all the drivers where the conversion applies (Ye Xingchen) - Replace a literal mask by an existing corresponding macro (Yangtao Li) - Add support for MT7986 and MT7981 (Daniel Golle) - Use thermal_zone_get_crit_temp() for the Armada thermal driver (Daniel Lezcano)" * tag 'thermal-v6.3-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (35 commits) thermal/drivers/armada: Use the thermal_zone_get_crit_temp() thermal/drivers/mtk: Add support for MT7986 and MT7981 thermal/drivers/mtk: Use function pointer for raw_to_mcelsius thermal/drivers/sun8i: Convert to use macro thermal/drivers/spear: Use devm_platform_get_and_ioremap_resource() thermal/drivers/kirkwood: Use devm_platform_get_and_ioremap_resource() thermal/drivers/thermal_mmio: Use devm_platform_get_and_ioremap_resource() thermal/drivers/rockchip: Use devm_platform_get_and_ioremap_resource() thermal/drivers/mtk_thermal: Use devm_platform_get_and_ioremap_resource() thermal/drivers/armada: Use devm_platform_get_and_ioremap_resource() thermal/drivers/dove: Use devm_platform_get_and_ioremap_resource() thermal/drivers/bcm2835: Use devm_platform_get_and_ioremap_resource() thermal/drivers/brcmstb_thermal: Use devm_platform_get_and_ioremap_resource() thermal/drivers/qcom-spmi-adc-tm5: Use asm intead of asm-generic thermal/drivers/imx_sc_thermal: Add iMX8QM sensors thermal/drivers/imx_sc_thermal: Fix the loop condition thermal/drivers/qcom: Remove duplicate set next trip point interrupt code thermal/drivers/tsens: Drop single-cell code for msm8976/msm8956 thermal/drivers/tsens: Drop single-cell code for msm8939 thermal/drivers/tsens: Drop single-cell code for mdm9607 ... commit 06bbb761c12dd147e4499f4d7a187699c5a0391f Author: Randy Dunlap Date: Sun Jan 8 17:00:23 2023 -0800 fuse: fix all W=1 kernel-doc warnings Use correct function name in kernel-doc notation. (1) Don't use "/**" to begin non-kernel-doc comments. (3) Fixes these warnings: fs/fuse/cuse.c:272: warning: expecting prototype for cuse_parse_dev_info(). Prototype was for cuse_parse_devinfo() instead fs/fuse/dev.c:212: warning: expecting prototype for A new request is available, wake fiq(). Prototype was for fuse_dev_wake_and_unlock() instead fs/fuse/dir.c:149: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Mark the attributes as stale due to an atime change. Avoid the invalidate if fs/fuse/file.c:656: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * In case of short read, the caller sets 'pos' to the position of Signed-off-by: Randy Dunlap Signed-off-by: Miklos Szeredi commit 5a8bee63b10f6f2f52f6d22e109a4a147409842a Author: Eric W. Biederman Date: Thu Jan 26 17:10:58 2023 +0100 fuse: in fuse_flush only wait if someone wants the return code If a fuse filesystem is mounted inside a container, there is a problem during pid namespace destruction. The scenario is: 1. task (a thread in the fuse server, with a fuse file open) starts exiting, does exit_signals(), goes into fuse_flush() -> wait 2. fuse daemon gets killed, tries to wake everyone up 3. task from 1 is stuck because complete_signal() doesn't wake it up, since it has PF_EXITING. The result is that the thread will never be woken up, and pid namespace destruction will block indefinitely. To add insult to injury, nobody is waiting for these return codes, since the pid namespace is being destroyed. To fix this, let's not block on flush operations when the current task has PF_EXITING. This does change the semantics slightly: the wait here is for posix locks to be unlocked, so the task will exit before things are unlocked. To quote Miklos: "remote" posix locks are almost never used due to problems like this, so I think it's safe to do this. Signed-off-by: "Eric W. Biederman" Signed-off-by: Tycho Andersen Link: https://lore.kernel.org/all/YrShFXRLtRt6T%2Fj+@risky/ Tested-by: Tycho Andersen Signed-off-by: Miklos Szeredi commit 8ed7cb3f279fe67a93f407ee2ec3ea661a483a65 Author: Miklos Szeredi Date: Thu Nov 10 15:46:33 2022 +0100 fuse: optional supplementary group in create requests Permission to create an object (create, mkdir, symlink, mknod) needs to take supplementary groups into account. Add a supplementary group request extension. This can contain an arbitrary number of group IDs and can be added to any request. This extension is not added to any request by default. Add FUSE_CREATE_SUPP_GROUP init flag to enable supplementary group info in creation requests. This adds just a single supplementary group that matches the parent group in the case described above. In other cases the extension is not added. Signed-off-by: Miklos Szeredi commit 15d937d7ca8c55d2b0ce9116e20c780fdd0b67cc Author: Miklos Szeredi Date: Thu Nov 10 15:46:33 2022 +0100 fuse: add request extension Will need to add supplementary groups to create messages, so add the general concept of a request extension. A request extension is appended to the end of the main request. It has a header indicating the size and type of the extension. The create security context (fuse_secctx_*) is similar to the generic request extension, so include that as well in a backward compatible manner. Add the total extension length to the request header. The offset of the extension block within the request can be calculated by: inh->len - inh->total_extlen * 8 Signed-off-by: Miklos Szeredi commit 085cf7b7e2ef7bdd88c8f2f56a17d756bd18f1a4 Author: Jan Kara Date: Wed Jan 25 19:31:38 2023 +0100 udf: Fix file counting in LVID numFiles entry in LVID should actually contain number for non-dir file entries, not the number of non-dir inodes. Move the counting from inode allocation / deallocation into directory entry handling functions. Signed-off-by: Jan Kara commit c2efd13a2ed4f29bf9ef14ac2fbb7474084655f8 Author: Jan Kara Date: Wed Jan 25 17:56:06 2023 +0100 udf: Limit file size to 4TB UDF disk format supports in principle file sizes up to 1<<64-1. However the file space (including holes) is described by a linked list of extents, each of which can have at most 1GB. Thus the creation and handling of extents gets unusably slow beyond certain point. Limit the file size to 4TB to avoid locking up the kernel too easily. Signed-off-by: Jan Kara commit f386c802a6fda8f9fe4a5cf418c49aa84dfc52e4 Author: Jan Kara Date: Tue Jan 24 14:49:52 2023 +0100 udf: Don't return bh from udf_expand_dir_adinicb() Nobody uses the bh returned from udf_expand_dir_adinicb(). Don't return it. Signed-off-by: Jan Kara commit 1eeceaec794ef937d161379d89504990c82133ad Author: Jan Kara Date: Wed Jan 25 10:33:37 2023 +0100 udf: Convert udf_expand_file_adinicb() to avoid kmap_atomic() Remove the last two remaining kmap_atomic() uses in UDF in udf_expand_file_adinicb(). The first use can be actually conveniently replaced with udf_adinicb_readpage(), the second with memcpy_to_page(). Signed-off-by: Jan Kara commit 5cfc45321a6d81c2587b38f26187dbe0018c6b04 Author: Jan Kara Date: Wed Jan 25 10:23:33 2023 +0100 udf: Convert udf_adinicb_writepage() to memcpy_to_page() Instead of mapping the page manually with kmap() atomic, use helper memcpy_to_page(). Also delete the pointless SetPageUptodate() call. Signed-off-by: Jan Kara commit 7b7f68655fca72de0d342412034cbdb2102adb7f Author: Jan Kara Date: Tue Jan 24 12:35:45 2023 +0100 udf: Switch udf_adinicb_readpage() to kmap_local_page() Instead of using kmap_atomic() use kmap_local_page() in udf_adinicb_readpage(). Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara commit 174cb748d88819d8a6420aa5040f9f065fcbdbab Author: Jan Kara Date: Tue Jan 24 12:29:57 2023 +0100 udf: Move udf_adinicb_readpage() to inode.c udf_adinicb_readpage() is only called from aops functions, move it to the same file as its callers and also drop the stale comment - invalidate_lock is protecting us against races with truncate. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara commit 759e4d74c072aadba7cf7c026434ef7e267e4520 Author: Jan Kara Date: Tue Jan 24 12:25:46 2023 +0100 udf: Mark aops implementation static Mark functions implementing aops static since they are not needed outside of inode.c anymore. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara commit 37a8a39f7ad34d4ad31c7f5cf6b2237113963c48 Author: Jan Kara Date: Tue Jan 24 12:23:04 2023 +0100 udf: Switch to single address_space_operations Now that udf_aops and udf_adiniicb_aops are functionally identical, just drop udf_adiniicb_aops. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara commit 907c6c2ffa6a6d28f59db22ac0686ca3103c61d8 Author: Jan Kara Date: Tue Jan 24 12:16:38 2023 +0100 udf: Add handling of in-ICB files to udf_bmap() Add detection of in-ICB files to udf_bmap() and return error in that case. This will allow us o use single address_space_operations in UDF. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara commit c694e40ba231e854fcddd25cce46db3918fca291 Author: Jan Kara Date: Tue Jan 24 12:13:57 2023 +0100 udf: Convert all file types to use udf_write_end() Switching address_space_operations while a file is used is difficult to do in a race-free way. To be able to use single address_space_operations in UDF, create udf_write_end() function that is able to handle both normal and in-ICB files. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara commit 60b99a1b9fa731453e1b69a3e0b3e4dcab7a6ea5 Author: Jan Kara Date: Tue Jan 24 12:07:37 2023 +0100 udf: Convert in-ICB files to use udf_write_begin() Switching address_space_operations while a file is used is difficult to do in a race-free way. To be able to use single address_space_operations in UDF, make in-ICB files use udf_write_begin(). Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara commit d5abfb1b7b26086db19ee430dea7282f01d4ef44 Author: Jan Kara Date: Tue Jan 24 11:59:32 2023 +0100 udf: Convert in-ICB files to use udf_direct_IO() Switching address_space_operations while a file is used is difficult to do in a race-free way. To be able to use single address_space_operations in UDF, make in-ICB files use udf_direct_IO(). Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara commit 79d3c6dbada4a20193467f72c531ab99c173bf4f Author: Jan Kara Date: Tue Jan 24 11:54:08 2023 +0100 udf: Convert in-ICB files to use udf_writepages() Switching address_space_operations while a file is used is difficult to do in a race-free way. To be able to use single address_space_operations in UDF, make in-ICB files use udf_writepages(). Reported-by: syzbot+c27475eb921c46bbdc62@syzkaller.appspotmail.com Reported-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara commit b7c31e6f14779324a39927cdaf493dc193576da1 Author: Jan Kara Date: Tue Jan 24 11:40:28 2023 +0100 udf: Unify .read_folio for normal and in-ICB files Switching address_space_operations while a file is used is difficult to do in a race-free way. To be able to use single address_space_operations in UDF, make udf_read_folio() handle both normal and in-ICB files. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara commit f54aa97fb7e5329a373f9df4e5e213ced4fc8759 Author: Jan Kara Date: Mon Jan 23 14:29:15 2023 +0100 udf: Fix off-by-one error when discarding preallocation The condition determining whether the preallocation can be used had an off-by-one error so we didn't discard preallocation when new allocation was just following it. This can then confuse code in inode_getblk(). CC: stable@vger.kernel.org Fixes: 16d055656814 ("udf: Discard preallocation before extending file with a hole") Signed-off-by: Jan Kara commit 36ec52ea038b18a53e198116ef7d7e70c87db046 Author: Jan Kara Date: Mon Jan 23 14:18:47 2023 +0100 udf: Fix file corruption when appending just after end of preallocated extent When we append new block just after the end of preallocated extent, the code in inode_getblk() wrongly determined we're going to use the preallocated extent which resulted in adding block into a wrong logical offset in the file. Sequence like this manifests it: xfs_io -f -c "pwrite 0x2cacf 0xd122" -c "truncate 0x2dd6f" \ -c "pwrite 0x27fd9 0x69a9" -c "pwrite 0x32981 0x7244" The code that determined the use of preallocated extent is actually stale because udf_do_extend_file() does not create preallocation anymore so after calling that function we are sure there's no usable preallocation. Just remove the faulty condition. CC: stable@vger.kernel.org Fixes: 16d055656814 ("udf: Discard preallocation before extending file with a hole") Signed-off-by: Jan Kara commit 36580ed08776224f25f9a34ede6eed7a4e11aed8 Author: Jan Kara Date: Wed Jan 18 15:09:49 2023 +0100 udf: Do not allocate blocks on page writeback Now when we allocate blocks on write page fault there should be no block allocation happening on page writeback. So just ignore the 'create' flag passed to udf_get_block(). Note that we can spot dirty buffers without underlying blocks allocated in writeback when we race with expanding truncate. However in that case these buffers do not contain valid data so we can safely ignore them and we would just create ourselves problem when to trim the tail extent. Signed-off-by: Jan Kara commit 7010839ccfd4f875c23c1758f6321ee6312cc548 Author: Jan Kara Date: Wed Jan 25 14:59:14 2023 +0100 fs: gracefully handle ->get_block not mapping bh in __mpage_writepage When filesystem's ->get_block function does not map the buffer head when called from __mpage_writepage(), the function will happily go and pass bogus bdev and block number to bio allocation routines which leads to crashes sooner or later. E.g. UDF can do this because it doesn't want to allocate blocks from ->writepages callbacks. It allocates blocks on write or page fault but writeback can still spot dirty buffers without underlying blocks allocated e.g. if blocksize < pagesize, the tail page is dirtied (which means all its buffers are dirtied), and truncate extends the file so that some buffer starts to be within i_size. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara commit 3c21204818ae45504b5d8ce8902748ef2306f0f3 Author: Jan Kara Date: Thu Jan 19 10:51:21 2023 +0100 udf: Allocate blocks on write page fault Currently if file with holes is mapped, udf allocates blocks for dirtied pages during page writeback. This however creates problems when to truncate final extent to proper size and currently we leave the last extent untruncated which violates UDF standard. So allocate blocks on write page fault instead. In that case the last extent gets truncated the file is closed and everything is happy. Signed-off-by: Jan Kara commit b9a861fd527ab123e76effb492b4eb7e8115d4ca Author: Jan Kara Date: Thu Jan 19 12:46:09 2023 +0100 udf: Protect truncate and file type conversion with invalidate_lock Protect truncate and file type conversion in udf_file_write_iter() with invalidate lock. That will allow us to serialize these paths with page faults so that the page fault can determine the file type in a racefree way. Signed-off-by: Jan Kara commit 96eeaaaea592079fcbf0b18a2b6f99165b32c942 Author: Jan Kara Date: Thu Jan 19 12:44:34 2023 +0100 udf: Simplify error handling in udf_file_write_iter() When udf_expand_file_adinicb() fails, we can now use the standard exit path instead of implementing our own. Signed-off-by: Jan Kara commit 2d532616c768c7473b7ebcf39aa16c824c73b7fc Author: Jan Kara Date: Thu Jan 19 12:37:04 2023 +0100 udf: Push i_data_sem locking into udf_extend_file() Push i_data_sem locking into udf_extend_file(). It somewhat simplifies the code around it. Signed-off-by: Jan Kara commit 6a3b37e0ea20bcb50e519c75fae3387199f35400 Author: Jan Kara Date: Thu Jan 19 12:28:37 2023 +0100 udf: Push i_data_sem locking into udf_expand_file_adinicb() The checks we do in udf_setsize() and udf_file_write_iter() are safe to do only with i_rwsem locked as it stabilizes both file type and file size. Hence we don't need to lock i_data_sem before we enter udf_expand_file_adinicb() which simplifies the locking somewhat. Signed-off-by: Jan Kara commit f950fd0529130a617b3da526da9fb6a896ce87c2 Author: Jan Kara Date: Wed Jan 18 19:42:35 2023 +0100 udf: Protect rename against modification of moved directory When we are renaming a directory to a different directory, we need to update '..' entry in the moved directory. However nothing prevents moved directory from being modified and even converted from the in-ICB format to the normal format which results in a crash. Fix the problem by locking the moved directory. Reported-by: syzbot+aebf90eea2671c43112a@syzkaller.appspotmail.com Signed-off-by: Jan Kara commit 32f123a3f34283f9c6446de87861696f0502b02e Author: Jan Kara Date: Wed Jan 18 15:33:41 2023 +0100 udf: Fold udf_getblk() into udf_bread() udf_getblk() has a single call site. Fold it there. Signed-off-by: Jan Kara commit 541e047b14c8f07de05262fce948ee7667117986 Author: Jan Kara Date: Wed Jan 18 15:30:06 2023 +0100 udf: Use udf_map_block() in udf_getblk() Use the new function udf_map_block() in udf_getblk(). Signed-off-by: Jan Kara commit 809425217805c2866a7a3019eeff92312edbd7e8 Author: Jan Kara Date: Wed Jan 18 15:18:41 2023 +0100 udf: Add flag to disable block preallocation In some cases we don't want to create block preallocation when allocating blocks. Add a flag to udf_map_rq controlling the behavior. Signed-off-by: Jan Kara commit b3c03fcef2712eb957a7633806a98d2c84d55468 Author: Jan Kara Date: Wed Jan 18 14:57:34 2023 +0100 udf: Pass mapping request into inode_getblk() Pass struct udf_map_rq into inode_getblk() instead of unfolding it and the putting the results back. Signed-off-by: Jan Kara commit 364a6665d573128790bf52481ed2898579fbc472 Author: Jan Kara Date: Wed Jan 18 14:38:35 2023 +0100 udf: Fold udf_block_map() into udf_map_block() udf_block_map() has now only a single caller. Fold it there. Signed-off-by: Jan Kara commit 15a08f51624a252ddadf7ce95ad5256d634873fc Author: Jan Kara Date: Wed Jan 18 14:32:45 2023 +0100 udf: Convert udf_symlink_filler() to use udf_bread() Convert udf_symlink_filler() to use udf_bread() instead of mapping and reading buffer head manually. Signed-off-by: Jan Kara commit f33321b29b672d0d1e565e3c1a6886bfd14d4673 Author: Jan Kara Date: Wed Jan 18 14:26:04 2023 +0100 udf: Do not call udf_block_map() on ICB files Currently udf_symlink_filler() called udf_block_map() even on files which have data stored inside the ICB. This is invalid as we cannot map blocks for such files (although so far the error got silently ignored). The call happened because we could not call block mapping function once we've acquired i_data_sem and determined whether the file has data stored in the ICB. For symlinks the situation is luckily simple as they get never modified so file type never changes once it is set. Hence we can check the file type even without i_data_sem. Just drop the i_data_sem locking and move block mapping to where it is needed. Signed-off-by: Jan Kara commit 08931b78932d56185753af77b93b8dcaace31e04 Author: Jan Kara Date: Wed Jan 18 14:08:10 2023 +0100 udf: Use udf_bread() in udf_load_vat() Use udf_bread() instead of mapping and loadign buffer head manually in udf_load_vat(). Signed-off-by: Jan Kara commit 4215db46d5389066bba103f87d6fb4aa392ec849 Author: Jan Kara Date: Wed Jan 18 13:41:12 2023 +0100 udf: Use udf_bread() in udf_get_pblock_virt15() Use udf_bread() instead of mapping and reading buffer head manually in udf_get_pblock_virt15(). Signed-off-by: Jan Kara commit f3a30be777508c371067ca2b47a55c4cb142d5f5 Author: Jan Kara Date: Wed Jan 18 12:29:22 2023 +0100 udf: Factor out block mapping into udf_map_block() Create new block mapping function udf_map_block() that takes new udf_map_rq structure describing mapping request. We will convert other places to use this function for block mapping. Signed-off-by: Jan Kara commit de80dae03c436b43017dd5e479486f1f73fa6769 Author: Jan Kara Date: Wed Jan 18 12:05:58 2023 +0100 udf: Move incrementing of goal block directly into inode_getblk() inode_getblk() sets goal block for the next allocation to the currently allocated block. This is obviously one less than what the goal block should be which we fixup in udf_get_block(). Just set the right goal block directly in inode_getblk(). Signed-off-by: Jan Kara commit 101ee137d32adc5b53f5c2a61fbda8f70f994845 Author: Jan Kara Date: Wed Jan 18 13:27:07 2023 +0100 udf: Drop VARCONV support UDF was supporting a strange mode where the media was containing 7 blocks of unknown data for every 32 blocks of the filesystem. I have yet to see the media that would need such conversion (maybe it comes from packet writing times) and the conversions have been inconsistent in the code. In particular any write will write to a wrong block and corrupt the media. This is an indication and no user actually needs this so let's just drop the support instead of trying to fix it. Signed-off-by: Jan Kara commit bd904f3c74969442b0ac42f81c0d02da54cd47eb Author: Jan Kara Date: Wed Jan 18 13:55:31 2023 +0100 udf: Unify types in anchor block detection When detecting last recorded block and from it derived anchor block position, we were mixing unsigned long, u32, and sector_t types. Since udf supports only 32-bit block numbers this is harmless but sometimes makes things awkward. Convert everything to udf_pblk_t and also handle the situation when block device size would not fit into udf_pblk_t. Signed-off-by: Jan Kara commit 1ea1cd11c72d1405a6b98440a9d5ea82dfa07166 Author: Jan Kara Date: Wed Jan 25 11:43:03 2023 +0100 udf: Fix directory iteration for longer tail extents When directory's last extent has more that one block and its length is not multiple of a block side, the code wrongly decided to move to the next extent instead of processing the last partial block. This led to directory corruption. Fix the rounding issue. Signed-off-by: Jan Kara commit ee454ad2fce7baa272fc0a69f93d47013ea06b07 Author: Jan Kara Date: Wed Jan 25 11:46:19 2023 +0100 udf: Propagate errors from udf_advance_blk() When we spot directory corruption when trying to load next directory extent, we didn't propagate the error up properly, leading to possibly indefinite looping on corrupted directories. Fix the problem by propagating the error properly. Signed-off-by: Jan Kara commit 3bea4ae1c97bab48bef4b1694915b43a5543c9c7 Author: Jan Kara Date: Wed Jan 25 16:49:00 2023 +0100 udf: Zero udf name padding Padding of name in the directory entry needs to be zeroed out. Fix it. Signed-off-by: Jan Kara commit 7649a5d1f263b8cc5c2827ef0443ead9bee9ae0e Author: Matt Roper Date: Wed Jan 25 15:41:59 2023 -0800 drm/i915/xehp: Annotate a couple more workaround registers as MCR GAMSTLB_CTRL and GAMCNTRL_CTRL became multicast/replicated registers on Xe_HP. They should be defined accordingly and use MCR-aware operations. These registers have only been used for some dg2/xehpsdv workarounds, so this fix is mostly just for consistency/future-proofing; even lacking the MCR annotation, workarounds will always be properly applied in a multicast manner on these platforms. Cc: Gustavo Sousa Fixes: 58bc2453ab8a ("drm/i915: Define multicast registers as a new type") Signed-off-by: Matt Roper Reviewed-by: Gustavo Sousa Link: https://patchwork.freedesktop.org/patch/msgid/20230125234159.3015385-3-matthew.d.roper@intel.com commit 698485cd875be1109b2130e0ff6c927010a6b56b Author: Geert Uytterhoeven Date: Wed Jan 11 09:21:38 2023 +0100 pinctrl: renesas: r8a77950: Add VIN[45] pins, groups, and functions Add pins, groups, and functions for channels 4 and 5 of the Video Input Module (VIN) on the Renesas R-Car H3 ES1.x (R8A77950) SoC, based on the version for the R-Car H3 ES2.0+ (R8A77951) SoC. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/92c9b3b535d27ea7fcc0aa73d298783d710c214a.1673425207.git.geert+renesas@glider.be commit 2d4a628cade2fe9cf7aa5629cffe768afe0e7ae1 Author: Lad Prabhakar Date: Mon Jan 2 22:18:12 2023 +0000 pinctrl: renesas: rzg2l: Add BUILD_BUG_ON() checks Add BUILD_BUG_ON() checks to avoid overflows for GPIO configs for each supported SoC. While at it, for readability set n_port_pins based on the GPIO pin configs and not on GPIO names for r9a07g044_data as done for r9a07g043_data. Suggested-by: Geert Uytterhoeven Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20230102221815.273719-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 00dfe29887761405ccd23cc0aa07cb86623bb2b7 Author: Lad Prabhakar Date: Mon Jan 2 22:18:11 2023 +0000 pinctrl: renesas: rzg2l: Fix configuring the GPIO pins as interrupts On the RZ/G2UL SoC we have less number of pins compared to RZ/G2L and also the pin configs are completely different. This patch makes sure we use the appropriate pin configs for each SoC (which is passed as part of the OF data) while configuring the GPIO pin as interrupts instead of using rzg2l_gpio_configs[] for all the SoCs. Fixes: bfc69bdbaad1 ("pinctrl: renesas: rzg2l: Add RZ/G2UL support") Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20230102221815.273719-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit eda94a6e6a4f2d3d1574ff4f2bd4b9f844504f71 Author: Matt Roper Date: Wed Jan 25 15:41:58 2023 -0800 drm/i915/mtl: Correct implementation of Wa_18018781329 Workaround Wa_18018781329 has applied to several recent Xe_HP-based platforms. However there are some extra gotchas to implementing this properly for MTL that we need to take into account: * Due to the separation of media and render/compute into separate GTs, this workaround needs to be implemented on each GT, not just the primary GT. Since each class of register only exists on one of the two GTs, we should program the appropriate registers on each GT. * As with past Xe_HP platforms, the registers on the primary GT (Xe_LPG IP) are multicast/replicated registers and should be handled with the MCR-aware functions. However the registers on the media GT (Xe_LPM+ IP) are regular singleton registers and should _not_ use MCR handling. We need to create separate register definitions for the Xe_HP multicast form and the Xe_LPM+ singleton form and use each in the appropriate place. * Starting with MTL, workarounds documented by the hardware teams are technically associated with IP versions/steppings rather than top-level platforms. That means we should take care to check the media IP version rather than the graphics IP version when deciding whether the workaround is needed on the Xe_LPM+ media GT (in this case the workaround applies to both IPs and the stepping bounds are identical, but we should still write the code appropriately to set a proper precedent for future workaround implementations). * It's worth noting that the GSC register and the CCS register are defined with the same MMIO offset (0xCF30). Since the CCS is only relevant to the primary GT and the GSC is only relevant to the media GT there isn't actually a clash here (the media GT automatically adds the additional 0x380000 GSI offset). However there's currently a glitch in the bspec where the CCS register doesn't show up at all and the GSC register is listed as existing on both GTs. That's a known documentation problem for several registers with shared GSC/CCS offsets; rest assured that the CCS register really does still exist. Cc: Gustavo Sousa Signed-off-by: Matt Roper Fixes: 41bb543f5598 ("drm/i915/mtl: Add initial gt workarounds") Reviewed-by: Gustavo Sousa Link: https://patchwork.freedesktop.org/patch/msgid/20230125234159.3015385-2-matthew.d.roper@intel.com commit 34cf9a859f14dab836eaf984bc9a778afb409b6f Author: Geert Uytterhoeven Date: Mon Nov 21 14:18:36 2022 +0100 pinctrl: renesas: r8a779g0: Fix alignment in GPSR[678]_* macros The alignment of the second column in the definitions of the GPSR[678]_* macros does not match the alignment used in other definitions. Fix this to improve uniformity. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/9424a0e7f6d66a94d333df9fdc5cdf3b7defb8f5.1669036423.git.geert+renesas@glider.be commit 49cbda6386efc5f023f396dca087aaba5d4f885e Author: Matt Roper Date: Wed Jan 25 15:41:57 2023 -0800 drm/i915/xehp: GAM registers don't need to be re-applied on engine resets Register reset characteristics (i.e., whether the register maintains or loses its value on engine reset) is an important factor that determines which wa_list we want to add workarounds to. We recently found out that the bspec documentation for the Xe_HP's "GAM" registers in the 0xC800 - 0xCFFF range was misleading; these registers do not actually lose their value on engine resets as the documentation implied. This means there's no need to re-apply workarounds touching these registers after a reset, and the corresponding workarounds should be moved from the 'engine' lists back to the 'gt' list. v2: - Don't add Wa_18018781329 to xehpsdv; the original condition didn't include that platform. (Gustavo) - Move the MTL code to the GT function as-is for now; we'll take care of the additional fixes needed in a follow-up patch. Cc: Gustavo Sousa Fixes: edf176f48d87 ("drm/i915/dg2: Move misplaced 'ctx' & 'gt' wa's to engine wa list") Fixes: b2006061ae28 ("drm/i915/xehpsdv: Move render/compute engine reset domains related workarounds") Fixes: 41bb543f5598 ("drm/i915/mtl: Add initial gt workarounds") Signed-off-by: Matt Roper Reviewed-by: Gustavo Sousa Link: https://patchwork.freedesktop.org/patch/msgid/20230125234159.3015385-1-matthew.d.roper@intel.com commit e90eb1df708c07240e323a4dbec8313736d1b500 Author: Daniel Lezcano Date: Wed Jan 18 19:16:20 2023 +0100 thermal: intel: processor_thermal_device_pci: Use generic trip point Make proc_thermal_pci_probe() register the TCPU_PCI thermal zone along with the trip point used by it and drop the zone callbacks related to this trip point that are not needed any more. Signed-off-by: Daniel Lezcano [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit c9d95cf0bc50a320b779018854c8dda38fcf9276 Author: Kuninori Morimoto Date: Fri Jan 13 02:04:33 2023 +0000 arm64: dts: renesas: Add ulcb{-kf} Simple Audio Card MIX + TDM Split dtsi ALSA SoC has many types of Generic Audio Card drivers (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto wants to test these. The Generic Audio Card driver had been requested on ALSA SoC. It supports many types of device connection methods, and historically, the requested connection support range of the generic driver has been upgraded. Upgrading the connection support range itself could not be implemented in the generic driver, because we need to keep compatibility with old DTBs. This is one of the reasons why we have many types of Generic Audio Card driver. The ULCB/KF combo is a good board stack to test these. Kuninori has been testing these Generic Audio Card drivers by using his local patches to switching drivers. But from an information sharing point of view, it is a good idea to upstream these, because the DT configuration is complex. Hence this can be a good sample for the user. Hence add a "Simple Audio Card + MIXer + TDM Split" DT setting file for ULCB/KF. Because of the limited number of subdevices, the HDMI output is ignored. This setting can be enabled by updating ulcb.dtsi / ulcb-kf.dtsi. From a normal user point of view who doesn't need to test the driver, everything should stay as-is, and nothing changes. Note that because this needs "switching driver", and not "adding extra feature", this does not use a Device Tree overlay. Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/874jsvi40e.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit ccb26ac5e7dbc28a0d957ea4e911345b74c768c6 Author: Kuninori Morimoto Date: Fri Jan 13 02:04:27 2023 +0000 arm64: dts: renesas: Add ulcb{-kf} Audio Graph Card MIX + TDM Split dtsi ALSA SoC has many types of Generic Audio Card drivers (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto wants to test these. The Generic Audio Card driver had been requested on ALSA SoC. It supports many types of device connection methods, and historically, the requested connection support range of the generic driver has been upgraded. Upgrading the connection support range itself could not be implemented in the generic driver, because we need to keep compatibility with old DTBs. This is one of the reasons why we have many types of Generic Audio Card driver. The ULCB/KF combo is a good board stack to test these. Kuninori has been testing these Generic Audio Card drivers by using his local patches to switching drivers. But from an information sharing point of view, it is a good idea to upstream these, because the DT configuration is complex. Hence this can be a good sample for the user. Hence add an "Audio Graph Card + MIXer + TDM Split" DT setting file for ULCB/KF. Because of the limited number of subdevices, the HDMI output is ignored. This setting can be enabled by updating ulcb.dtsi / ulcb-kf.dtsi. From a normal user point of view who doesn't need to test the driver, everything should stay as-is, and nothing changes. Note that because this needs "switching driver", and not "adding extra feature", this does not use a Device Tree overlay. Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/875ydbi40l.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit 15ec87e017d36afc0b39a91b62b32511a84fb171 Author: Kuninori Morimoto Date: Fri Jan 13 02:04:22 2023 +0000 arm64: dts: renesas: Add ulcb{-kf} Audio Graph Card2 MIX + TDM Split dtsi ALSA SoC has many types of Generic Audio Card drivers (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto wants to test these. The Generic Audio Card driver had been requested on ALSA SoC. It supports many types of device connection methods, and historically, the requested connection support range of the generic driver has been upgraded. Upgrading the connection support range itself could not be implemented in the generic driver, because we need to keep compatibility with old DTBs. This is one of the reasons why we have many types of Generic Audio Card driver. The ULCB/KF combo is a good board stack to test these. Kuninori has been testing these Generic Audio Card drivers by using his local patches to switching drivers. But from an information sharing point of view, it is a good idea to upstream these, because the DT configuration is complex. Hence this can be a good sample for the user. Hence add an "Audio Graph Card2 + MIXer + TDM Split" DT setting file for ULCB/KF. Because of the limited number of subdevices, the HDMI output is ignored. This setting can be enabled by updating ulcb.dtsi / ulcb-kf.dtsi. From a normal user point of view who doesn't need to test the driver, everything should stay as-is, and nothing changes. Note that because this needs "switching driver", and not "adding extra feature", this does not use a Device Tree overlay. Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/877cxri40q.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit 62661f3b076e35de5d68593a2bde54e9cefdd85e Author: Kuninori Morimoto Date: Fri Jan 13 02:04:17 2023 +0000 arm64: dts: renesas: Add ulcb{-kf} Simple Audio Card dtsi ALSA SoC has many types of Generic Audio Card drivers (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto wants to test these. The Generic Audio Card driver had been requested on ALSA SoC. It supports many types of device connection methods, and historically, the requested connection support range of the generic driver has been upgraded. Upgrading the connection support range itself could not be implemented in the generic driver, because we need to keep compatibility with old DTBs. This is one of the reasons why we have many types of Generic Audio Card driver. The ULCB/KF combo is a good board stack to test these. Kuninori has been testing these Generic Audio Card drivers by using his local patches to switching drivers. But from an information sharing point of view, it is a good idea to upstream these, because the DT configuration is complex. Hence this can be a good sample for the user. Hence add a "Simple Audio Card" DT setting file for ULCB/KF. This can be enabled by updating ulcb.dtsi / ulcb-kf.dtsi. From a normal user point of view who doesn't need to test the driver, everything should stay as-is, and nothing changes. Note that because this needs "switching driver", and not "adding extra feature", this does not use a Device Tree overlay. Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/878ri7i40u.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit 3e2db2c2418d5373205f7214ff1ef4e70aafefe1 Author: Kuninori Morimoto Date: Fri Jan 13 02:04:13 2023 +0000 arm64: dts: renesas: Add ulcb{-kf} Audio Graph Card2 dtsi ALSA SoC has many types of Generic Audio Card drivers (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto wants to test these. The Generic Audio Card driver had been requested on ALSA SoC. It supports many types of device connection methods, and historically, the requested connection support range of the generic driver has been upgraded. Upgrading the connection support range itself could not be implemented in the generic driver, because we need to keep compatibility with old DTBs. This is one of the reasons why we have many types of Generic Audio Card driver. The ULCB/KF combo is a good board stack to test these. Kuninori has been testing these Generic Audio Card drivers by using his local patches to switching drivers. But from an information sharing point of view, it is a good idea to upstream these, because the DT configuration is complex. Hence this can be a good sample for the user. Hence add an "Audio Graph Card2" DT setting file for ULCB/KF, and switch to use it. You can switch to a different Generic Audio Graph driver by updating ulcb.dtsi / ulcb-kf.dtsi. From a normal user point of view who doesn't need to test the driver, everything should stay as-is, and nothing changes. Note that because this needs "switching driver", and not "adding extra feature", this does not use a Device Tree overlay. Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/87a62ni40z.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit baa19ec4c6311ce2573d5eb198d7a24788636cb9 Author: Kuninori Morimoto Date: Fri Jan 13 02:04:08 2023 +0000 arm64: dts: renesas: Add ulcb{-kf} Audio Graph Card dtsi ALSA SoC has many types of Generic Audio Card drivers (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto wants to test these. The Generic Audio Card driver had been requested on ALSA SoC. It supports many types of device connection methods, and historically, the requested connection support range of the generic driver has been upgraded. Upgrading the connection support range itself could not be implemented in the generic driver, because we need to keep compatibility with old DTBs. This is one of the reasons why we have many types of Generic Audio Card driver. The ULCB/KF combo is a good board stack to test these. Kuninori has been testing these Generic Audio Card drivers by using his local patches to switching drivers. But from an information sharing point of view, it is a good idea to upstream these, because the DT configuration is complex. Hence this can be a good sample for the user. Hence add an "Audio Graph Card" DT setting file for ULCB/KF. This can be enabled by updating ulcb.dtsi / ulcb-kf.dtsi. From a normal user point of view who doesn't need to test the driver, everything should stay as-is, and nothing changes. Note that because this needs "switching driver", and not "adding extra feature", this does not use a Device Tree overlay. Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/87bkn3i414.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit 9e72606cd2db5a19cdd52834818d2d72eaac08a6 Author: Kuninori Morimoto Date: Fri Jan 13 02:04:03 2023 +0000 arm64: dts: renesas: #sound-dai-cells is used when simple-card Current sound comment is indicating that #sound-dai-cells is required, but it is needed only if board is using "simple-card". Hence tidy up the comments. As ulcb.dtsi and salvator-common.dtsi are already using "audio-graph", the unneeded #sound-dai-cells are removed. Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/87cz7ji418.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit e9ae752fa0198044611af563bf71ae12e94d4b9f Author: Kuninori Morimoto Date: Fri Jan 13 02:03:58 2023 +0000 ARM: dts: renesas: #sound-dai-cells is used when simple-card Current sound comment is indicating that #sound-dai-cells is required, but it is needed only if the board is using "simple-card". Hence tidy up the comments. Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/87edrzi41e.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit a6a4bfeae9167190b80e0e32e187d1b949845b47 Author: Geert Uytterhoeven Date: Mon Jan 9 14:35:48 2023 +0100 arm64: dts: renesas: eagle: Add SCIF_CLK support Describe the external SCIF clock crystal, which can be used as a clock source for the (High Speed) Serial Communication Interfaces with FIFO. This improves serial console accuracy from 115200-257 bps to 115200+0 bps. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/7dddaa362945118deab534ccfddfc0870abe8526.1673271243.git.geert+renesas@glider.be commit 9a5db2f7f175597b04cbd7e017e75602fc275f6d Author: Herve Codina Date: Thu Jan 5 16:22:56 2023 +0100 ARM: dts: r9a06g032: Add the USBF controller node Add the USBF controller available in the r9a06g032 SoC. Signed-off-by: Herve Codina Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230105152257.310642-5-herve.codina@bootlin.com Signed-off-by: Geert Uytterhoeven commit f4673e52dbab9d890d236ed75264653bcd43bac1 Author: Lad Prabhakar Date: Mon Jan 2 22:18:15 2023 +0000 arm64: dts: renesas: rzg2ul-smarc-som: Add PHY interrupt support for ETH{0/1} The PHY interrupt (INT_N) pin is connected to IRQ2 and IRQ7 for ETH0 and ETH1 respectively. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230102221815.273719-7-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 85169df721078bf90fb0fc3bf15e4743fea45b2d Author: Lad Prabhakar Date: Mon Jan 2 22:18:14 2023 +0000 arm64: dts: renesas: r9a07g043u: Update pinctrl node to handle GPIO interrupts Add required properties in pinctrl node to handle GPIO interrupts. Note as IRQC is not enabled in RZ/Five the phandle for interrupt-parent is added in RZ/G2UL specific dtsi so that RZ/Five pinctrl driver continues without waiting for IRQC to probe. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230102221815.273719-6-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 48ab6eddd8bbcf7e9c8ae27bf42d0b52a777aaba Author: Lad Prabhakar Date: Mon Jan 2 22:18:13 2023 +0000 arm64: dts: renesas: r9a07g043u: Add IRQC node Add IRQC node to R9A07G043 (RZ/G2UL) SoC DTSI. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230102221815.273719-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 7dd48e96d0cda9af79a2fee85e9135b4781f9ee1 Author: Lad Prabhakar Date: Mon Jan 2 22:27:08 2023 +0000 riscv: dts: renesas: rzfive-smarc-som: Drop PHY interrupt support for ETH{0,1} IRQC support for RZ/Five is still missing so drop the interrupts and interrupt-parent properties from the PHY nodes of ETH{0,1}. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230102222708.274369-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 87d85b48f8109980c83b57b37ba963949ffbef25 Author: Geert Uytterhoeven Date: Thu Dec 8 10:57:00 2022 +0100 arm64: dts: renesas: r8a779g0: Add Cortex-A76 1.8 GHz opp Add an operating point for running the Cortex-A76 CPU cores on R-Car V4H at 1.8 GHz (High Performance mode). Based on a patch in the BSP by Tho Vu. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/cc2bae27776523f499d01655ef18fe463a3ae1ae.1670492384.git.geert+renesas@glider.be commit 900cd8f065de8d867bc436c1ba05873dc893f2cb Author: Paul Cercueil Date: Tue Nov 29 19:19:36 2022 +0000 drm/tegra: Remove #ifdef guards for PM related functions Use the RUNTIME_PM_OPS() and pm_ptr() macros to handle the .runtime_suspend/.runtime_resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil Signed-off-by: Thierry Reding commit 584f13e75356936736930c501bce2db3616fb70e Author: Yushan Zhou Date: Tue Nov 29 17:45:46 2022 +0800 drm/tegra: Remove redundant null checks before kfree Fix the following coccicheck warning: ./drivers/gpu/drm/tegra/submit.c:689:2-7: WARNING: NULL check before some freeing functions is not needed. Signed-off-by: Yushan Zhou Signed-off-by: Thierry Reding commit d5179020f5ce44fd449790a9c12ef6c1a90a2ca7 Author: Mikko Perttunen Date: Thu Jan 19 15:09:21 2023 +0200 gpu: host1x: External timeout/cancellation for fences Currently all fences have a 30 second timeout to ensure they are cleaned up if the fence never completes otherwise. However, this one size fits all solution doesn't actually fit in every case, such as syncpoint waiting where we want to be able to have timeouts longer than 30 seconds. As such, we want to be able to give control over fence cancellation to the caller (and maybe eventually get rid of the internal timeout altogether). Here we add this cancellation mechanism by essentially adding a function for entering the timeout path by function call, and changing the syncpoint wait function to use it. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding commit 625d4ffb438cacc9b1ebaa48748cdc7171587cdc Author: Mikko Perttunen Date: Thu Jan 19 15:09:20 2023 +0200 gpu: host1x: Rewrite syncpoint interrupt handling Move from the old, complex intr handling code to a new implementation based on dma_fences. While there is a fair bit of churn to get there, the new implementation is much simpler and likely faster as well due to allowing signaling directly from interrupt context. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding commit c24973ed795fec5c12d8a822a0de99a4b7bab394 Author: Mikko Perttunen Date: Thu Jan 19 15:09:19 2023 +0200 gpu: host1x: Implement job tracking using DMA fences In anticipation of removal of the intr API, implement job tracking using DMA fences instead. The main two things about this are making cdma_update schedule the work since fence completion can now be called from interrupt context, and some complication in ensuring the callback is not running when we free the fence. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding commit f0fb260a0cdb014b22a5f7733279c205f2cba62a Author: Mikko Perttunen Date: Thu Jan 19 15:09:18 2023 +0200 gpu: host1x: Implement syncpoint wait using DMA fences In anticipation of removal of the intr API, move host1x_syncpt_wait to use DMA fences instead. As of this patch, this means that waits have a 30 second maximum timeout because of the implicit timeout we have with fences, but that will be lifted in a follow-up patch. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding commit 1b5c09de25e8c08655c270a70e5e74e93b6bad1f Author: Mikko Perttunen Date: Thu Jan 19 15:39:01 2023 +0200 drm/tegra: firewall: Check for is_addr_reg existence in IMM check In the IMM opcode check, don't call is_addr_reg if it's not set. Fixes: 8cc95f3fd35e ("drm/tegra: Add job firewall") Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding commit eb258cc1fd458e584082be987dbc6ec42668c05e Author: Mikko Perttunen Date: Thu Jan 19 15:39:00 2023 +0200 gpu: host1x: Don't skip assigning syncpoints to channels The code to write the syncpoint channel assignment register incorrectly skips the write if hypervisor registers are not available. The register, however, is within the guest aperture so remove the check and assign syncpoints properly even on virtualized systems. Fixes: c3f52220f276 ("gpu: host1x: Enable Tegra186 syncpoint protection") Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding commit 79aad29c7d2d2cd64790115d3a6ebac28c00a8ec Author: Mikko Perttunen Date: Thu Jan 19 15:38:59 2023 +0200 gpu: host1x: Fix mask for syncpoint increment register On Tegra186+, the syncpoint ID has 10 bits of space. To allow using more than 256 syncpoints, fix the mask. Fixes: 9abdd497cd0a ("gpu: host1x: Tegra234 device data and headers") Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding commit 3d9057514c37357c1bae8f0fda58297f1780f8db Author: Thierry Reding Date: Thu Jan 26 12:41:17 2023 +0100 MAINTAINERS: Update Tegra DRM tree The Tegra DRM tree moved to freedesktop.org's gitlab a few releases ago, so update the MAINTAINERS entry accordingly. Signed-off-by: Thierry Reding commit 361238cdc52523fd7b1f3aa447c0579f42448b00 Author: Mikko Perttunen Date: Thu Jan 19 15:38:58 2023 +0200 arm64: tegra: Mark host1x as dma-coherent on Tegra194/234 Ensure appropriate configuration is done to make the host1x device and context devices DMA coherent by adding the dma-coherent flag. Fixes: b35f5b53a87b ("arm64: tegra: Add context isolation domains on Tegra234") Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding commit 9179f5fe41733ff56f7dfcb83c0c1456f6d2e4ae Author: Vladimir Oltean Date: Wed Jan 25 13:02:14 2023 +0200 net: ethtool: provide shims for stats aggregation helpers when CONFIG_ETHTOOL_NETLINK=n ethtool_aggregate_*_stats() are implemented in net/ethtool/stats.c, a file which is compiled out when CONFIG_ETHTOOL_NETLINK=n. In order to avoid adding Kbuild dependencies from drivers (which call these helpers) on CONFIG_ETHTOOL_NETLINK, let's add some shim definitions which simply make the helpers dead code. This means the function prototypes should have been located in include/linux/ethtool_netlink.h rather than include/linux/ethtool.h. Fixes: 449c5459641a ("net: ethtool: add helpers for aggregate statistics") Reported-by: kernel test robot Signed-off-by: Vladimir Oltean Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20230125110214.4127759-1-vladimir.oltean@nxp.com Signed-off-by: Paolo Abeni commit 2f8ba037c45925b372194df4bc27fca85fbeeffb Author: Dinh Nguyen Date: Wed Jan 25 14:07:00 2023 -0600 arm64: dts: socfpga: change address-cells to support 64-bit addressing Update the address-cells and size-cells to 2 in order to support 64-bit addressing. Signed-off-by: Dinh Nguyen commit bd176e46e9c23f669b28630cc8f3fb1b89fd610e Author: Geert Uytterhoeven Date: Mon Jan 23 19:31:24 2023 +0100 clk: renesas: r8a779g0: Add CAN-FD clocks Add the CANFD core clock and the CANFD0 module clock, which are used by the CAN-FD Interface on the Renesas R-Car V4H (R8A779G0) SoC. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/a78f534bd80f170f3f1267f3270fdb3b7a73b5d4.1674498643.git.geert+renesas@glider.be commit 3797edf94b51387cc97fc5773d3e3e11c8d10dd4 Author: Kuninori Morimoto Date: Thu Jan 19 01:51:59 2023 +0000 clk: renesas: r8a779g0: Tidy up DMAC name on SYS-DMAC "sydm" is a bit name. Let's rename it to the common "sys-dmac". Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/87v8l3z3y8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit c9baa3bbe909b8e4a263394afc80b5a499bd23c2 Author: Kuninori Morimoto Date: Thu Jan 19 01:52:16 2023 +0000 clk: renesas: r8a779a0: Tidy up DMAC name on SYS-DMAC "sydm" is a bit name. Let's rename it to the common "sys-dmac". Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/87tu0nz3xr.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit b2ea28b885a44a5bedc73fc2ba7adbe648eb18e2 Author: Bernhard Rosenkränzer Date: Wed Jan 25 15:34:58 2023 +0100 dt-bindings: pinctrl: add bindings for Mediatek MT8365 SoC Add devicetree bindings for Mediatek MT8365 pinctrl driver. Signed-off-by: Bernhard Rosenkränzer Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230125143503.1015424-5-bero@baylibre.com Signed-off-by: Linus Walleij commit 5c36cf27846a364f830e5ea86b411e05f7c8bd2b Author: Srinivas Pandruvada Date: Mon Jan 23 08:30:46 2023 -0800 thermal: intel: int340x: Add production mode attribute It is possible that the system manufacturer locks down thermal tuning beyond what is usually done on the given platform. In that case user space calibration tools should not try to adjust the thermal configuration of the system. To allow user space to check if that is the case, add a new sysfs attribute "production_mode" that will be present when the ACPI DCFG method is present under the INT3400 device object in the ACPI Namespace. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki commit 2e34f82ba214134ecf590fbe0cdbd87401645a8a Author: Guodong Liu Date: Wed Jan 18 14:20:36 2023 +0800 pinctrl: mediatek: Initialize variable *buf to zero Coverity spotted that *buf is not initialized to zero in mtk_pctrl_dbg_show. Using uninitialized variable *buf as argument to %s when calling seq_printf. Fix this coverity by initializing *buf as zero. Fixes: 184d8e13f9b1 ("pinctrl: mediatek: Add support for pin configuration dump via debugfs.") Signed-off-by: Guodong Liu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230118062036.26258-3-Guodong.Liu@mediatek.com Signed-off-by: Linus Walleij commit a298c70a10c604a6b3df5a0aa56597b705ba0f6b Author: Guodong Liu Date: Wed Jan 18 14:20:35 2023 +0800 pinctrl: mediatek: Initialize variable pullen and pullup to zero Coverity spotted that pullen and pullup is not initialized to zero in mtk_pctrl_show_one_pin. The uninitialized variable pullen is used in assignment statement "rsel = pullen;" in mtk_pctrl_show_one_pin, and Uninitialized variable pullup is used when calling scnprintf. Fix this coverity by initializing pullen and pullup as zero. Fixes: 184d8e13f9b1 ("pinctrl: mediatek: Add support for pin configuration dump via debugfs.") Signed-off-by: Guodong Liu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230118062036.26258-2-Guodong.Liu@mediatek.com Signed-off-by: Linus Walleij commit 0390a102cc18cb7456d6c1f15ac51f1af90fcf9c Author: Bard Liao Date: Wed Jan 25 16:13:17 2023 +0200 ASoC: SOF: ipc4-topology: use different channel mask for each sdw amp feedback Currently, we use the same channel mask for aggregated speakers. It works fine for playback because we duplicate the audio data for all aggregated speakers. But we need to get audio data from each aggregated speaker and combine them to the captured audio. So we need to set non-overlapping channel mask for aggregated ALH DAIs. Signed-off-by: Bard Liao 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/20230125141317.30302-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 167b3a2b23c86ce44518afde93c82b65295ea60a Author: Krzysztof Kozlowski Date: Thu Jan 26 11:07:22 2023 +0100 ASoC: dt-bindings: renesas,rsnd: simplify list of compatibles The fallback compatible in a list (the last one) cannot be enum, because it is always fixed. Also if such fallback is used alone ("Generic" case), it's not a list anymore. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230126100722.9473-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 7d573425d87642539480929e0172ad9a1917aced Author: Bard Liao Date: Thu Jan 26 13:06:37 2023 +0200 ASoC: SOF: ipc4-topology: add buffer type support The corresponding IPC4 module of snd_soc_dapm_buffer widget is module -to-module copier. The module-to-module copier is a buffer-like component with demuxing capabilities. Rename the host_token_list to common_copier_token_list since it will be used by host copier and module-to-module copier. The setup callback is almost the same as sof_ipc4_widget_setup_pcm except the gtw_cfg data, and the free callback is exactly the same as sof_ipc4_widget_free_comp_pcm. To reduce the duplication, the commit reuses the setup and free callbacks. Signed-off-by: Bard Liao Reviewed-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230126110637.25542-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit ec9009724027b6599ee79a8ac6c97de442ad6f6d Author: Srinivasa Rao Mandadapu Date: Mon Jan 23 15:43:22 2023 +0530 ASoC: dt-bindings: google,sc7280-herobrine: Add platform property Add platform property in sc7280 machine driver bindings for including platform subnode in dai-links. This is required for binding the frontend dai driver to do dynamic pcm routing in ADSP based platforms. Signed-off-by: Srinivasa Rao Mandadapu Acked-by: Rob Herring Link: https://lore.kernel.org/r/1674468802-14834-3-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown commit 7a35498982e84e4d39e8c259f251dfa588f0f039 Author: Srinivasa Rao Mandadapu Date: Mon Jan 23 15:43:21 2023 +0530 ASoC: qcom: dt-bindings: lpass-va-macro: Update clock name Update clock name from core to macro in lpass-va-macro node to make it compatible with existing driver and existing DTS files. Fixes: 67d99b23c881 ("ASoC: qcom: dt-bindings: add bindings for lpass va macro codec") Signed-off-by: Srinivasa Rao Mandadapu Reported-by: Krzysztof Kozlowski Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/1674468802-14834-2-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown commit 21813d631de33c92ae7754223658fce7bb74622f Author: Tvrtko Ursulin Date: Wed Jan 25 11:00:03 2023 +0100 drm/i915/selftests: Flush all tiles on test exit We want to idle all tiles when exiting selftests. Cc: Matt Roper Signed-off-by: Tvrtko Ursulin Signed-off-by: Nirmoy Das Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20230125100003.18243-1-nirmoy.das@intel.com commit 9bd73ce087354628983bc4392ba6894d6b6c15a7 Author: Andy Shevchenko Date: Sat Jan 14 00:07:03 2023 +0200 pinctrl: qcom: Unify accessing to device fwnode The device fwnode can be get via dev_fwnode() getter. Use it where it makes sense. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230113220703.45686-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit b8f9301c91bff54570181db9dffa9b5716c3c75d Author: Andy Shevchenko Date: Fri Jan 13 23:53:52 2023 +0200 Revert "gpiolib: of: Introduce hook for missing gpio-ranges" This reverts commit 3550bba25d5587a701e6edf20e20984d2ee72c78. No users for this one, revert it for good. The ->add_pin_ranges() can be used instead. Signed-off-by: Andy Shevchenko Tested-by: Stefan Wahren Tested-by: Florian Fainelli Reviewed-by: Florian Fainelli Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20230113215352.44272-5-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit bc96299707d925286d67212704dca45d73031c53 Author: Andy Shevchenko Date: Fri Jan 13 23:53:51 2023 +0200 pinctrl: bcm2835: Switch to use ->add_pin_ranges() Yeah, while the ->add_pin_ranges() shouldn't be used by DT drivers, this one requires it to support quite old firmware descriptions that do not have gpio-ranges property. The change allows to clean up GPIO library from OF specifics. There is no functional change intended. Signed-off-by: Andy Shevchenko Tested-by: Stefan Wahren Tested-by: Florian Fainelli Reviewed-by: Florian Fainelli Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20230113215352.44272-4-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 2d578dd27871372f7159dd3206149ec616700d87 Author: Andy Shevchenko Date: Fri Jan 13 23:53:50 2023 +0200 pinctrl: bcm2835: Remove of_node_put() in bcm2835_of_gpio_ranges_fallback() Remove wrong of_node_put() in bcm2835_of_gpio_ranges_fallback(), there is no counterpart of_node_get() for it. Fixes: d2b67744fd99 ("pinctrl: bcm2835: implement hook for missing gpio-ranges") Signed-off-by: Andy Shevchenko Reviewed-by: Stefan Wahren Tested-by: Stefan Wahren Tested-by: Florian Fainelli Reviewed-by: Florian Fainelli Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20230113215352.44272-3-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit c40aa80dd4569848ac89454321fa035a6ca26976 Author: Andy Shevchenko Date: Fri Jan 13 23:53:49 2023 +0200 gpiolib: Check "gpio-ranges" before calling ->add_pin_ranges() The ->add_pin_ranges() is supposed to be called for the backward compatiblity on Device Tree platforms or non-DT ones. Ensure that by checking presense of the "gpio-ranges" property. This allows to clean up a few existing drivers to avoid duplication of the check. Signed-off-by: Andy Shevchenko Tested-by: Stefan Wahren Tested-by: Florian Fainelli Reviewed-by: Florian Fainelli Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20230113215352.44272-2-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 97f7d3dd761a6c5306105595eb9218bfd4a59623 Merge: d0941130c9351 8dbdf24f4e9e0 Author: Paolo Abeni Date: Thu Jan 26 13:33:32 2023 +0100 Merge branch 'mptcp-add-mixed-v4-v6-support-for-the-in-kernel-pm' Matthieu Baerts says: ==================== mptcp: add mixed v4/v6 support for the in-kernel PM Before these patches, the in-kernel Path-Manager would not allow, for the same MPTCP connection, having a mix of subflows in v4 and v6. MPTCP's RFC 8684 doesn't forbid that and it is even recommended to do so as the path in v4 and v6 are likely different. Some networks are also v4 or v6 only, we cannot assume they all have both v4 and v6 support. Patch 1 then removes this artificial constraint in the in-kernel PM currently enforcing there are no mixed subflows in place, either in address announcement or in subflow creation areas. Patch 2 makes sure the sk_ipv6only attribute is also propagated to subflows, just in case a new PM wouldn't respect it. Some selftests have also been added for the in-kernel PM (patch 3). Patches 4 to 8 are just some cleanups and small improvements in the printed messages in the userspace PM. It is not linked to the rest but identified when working on a related patch modifying this selftest, already in -net: commit 4656d72c1efa ("selftests: mptcp: userspace: validate v4-v6 subflows mix") --- ==================== Link: https://lore.kernel.org/r/20230123-upstream-net-next-pm-v4-v6-v1-0-43fac502bfbf@tessares.net Signed-off-by: Paolo Abeni commit 8dbdf24f4e9e060e4c4a3ad282a4a57f80f48b1f Author: Matthieu Baerts Date: Wed Jan 25 11:47:28 2023 +0100 selftests: mptcp: userspace: avoid read errors During the cleanup phase, the server pids were killed with a SIGTERM directly, not using a SIGUSR1 first to quit safely. As a result, this test was often ending with two error messages: read: Connection reset by peer While at it, use a for-loop to terminate all the PIDs the same way. Also the different files are now removed after having killed the PIDs using them. It makes more sense to do that in this order. Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Paolo Abeni commit 10d4273411be6ead4d4d8a50a0593da15154f43f Author: Matthieu Baerts Date: Wed Jan 25 11:47:27 2023 +0100 selftests: mptcp: userspace: print error details if any Before, only '[FAIL]' was printed in case of error during the validation phase. Now, in case of failure, the variable name, its value and expected one are displayed to help understand what was wrong. Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Paolo Abeni commit 1c0b0ee2640bbbf225c9bdf2f7b121fcf4ee2059 Author: Matthieu Baerts Date: Wed Jan 25 11:47:26 2023 +0100 selftests: mptcp: userspace: refactor asserts Instead of having a long list of conditions to check, it is possible to give a list of variable names to compare with their 'e_XXX' version. This will ease the introduction of the following commit which will print which condition has failed (if any). Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Paolo Abeni commit f790ae03db33e6a3efd18fe7aefe3c7897195cc2 Author: Matthieu Baerts Date: Wed Jan 25 11:47:25 2023 +0100 selftests: mptcp: userspace: print titles This script is running a few tests after having setup the environment. Printing titles helps understand what is being tested. Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Paolo Abeni commit 40c71f763f87b68fe43199c1702220c91afed288 Author: Matthieu Baerts Date: Wed Jan 25 11:47:24 2023 +0100 mptcp: userspace pm: use a single point of exit Like in all other functions in this file, a single point of exit is used when extra operations are needed: unlock, decrement refcount, etc. There is no functional change for the moment but it is better to do the same here to make sure all cleanups are done in case of intermediate errors. Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Paolo Abeni commit ad3493746ebe9e9adf3d8c5b003fa0240f25242a Author: Paolo Abeni Date: Wed Jan 25 11:47:23 2023 +0100 selftests: mptcp: add test-cases for mixed v4/v6 subflows Note that we can't guess the listener family anymore based on the client target address: always use IPv6. The fullmesh flag with endpoints from different families is also validated here. Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Paolo Abeni commit 7e9740e0e84e21281759590ccec4e3c926eb54bf Author: Matthieu Baerts Date: Wed Jan 25 11:47:22 2023 +0100 mptcp: propagate sk_ipv6only to subflows Usually, attributes are propagated to subflows as well. Here, if subflows are created by other ways than the MPTCP path-manager, it is important to make sure they are in v6 if it is asked by the userspace. Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Paolo Abeni commit b9d69db87fb77fc80997993d40f091b323b3651e Author: Paolo Abeni Date: Wed Jan 25 11:47:21 2023 +0100 mptcp: let the in-kernel PM use mixed IPv4 and IPv6 addresses Currently the in-kernel PM arbitrary enforces that created subflow's family must match the main MPTCP socket while the RFC allows mixing IPv4 and IPv6 subflows. This patch changes the in-kernel PM logic to create subflows matching the currently selected source (or destination) address. IPv4 sockets can pick only IPv4 addresses (and v4 mapped in v6), while IPv6 sockets not restricted to V6ONLY can pick either IPv4 and IPv6 addresses as long as the source and destination matches. A helper, previously introduced is used to ease family matching checks, taking care of IPv4 vs IPv4-mapped-IPv6 vs IPv6 only addresses. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/269 Co-developed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Paolo Abeni commit 58a033c9a3e003e048a0431a296e58c6b363b02b Author: Jeff Layton Date: Wed Oct 5 06:32:23 2022 -0400 nfsd: remove fetch_iversion export operation Now that the i_version counter is reported in struct kstat, there is no need for this export operation. Acked-by: Chuck Lever Reviewed-by: NeilBrown Signed-off-by: Jeff Layton commit 638e3e7d9493dadca16cac7ea66e7cf368d4065a Author: Jeff Layton Date: Wed Sep 7 14:45:01 2022 -0400 nfsd: use the getattr operation to fetch i_version Now that we can call into vfs_getattr to get the i_version field, use that facility to fetch it instead of doing it in nfsd4_change_attribute. Neil also pointed out recently that IS_I_VERSION directory operations are always logged, and so we only need to mitigate the rollback problem on regular files. Also, we don't need to factor in the ctime when reexporting NFS or Ceph. Set the STATX_CHANGE_COOKIE (and BTIME) bits in the request when we're dealing with a v4 request. Then, instead of looking at IS_I_VERSION when generating the change attr, look at the result mask and only use it if STATX_CHANGE_COOKIE is set. Change nfsd4_change_attribute to only factor in the ctime if it's a regular file and the fs doesn't advertise STATX_ATTR_CHANGE_MONOTONIC. Acked-by: Chuck Lever Reviewed-by: NeilBrown Signed-off-by: Jeff Layton commit 3139b1d79588f65977b3543149df01063dc3d323 Author: Jeff Layton Date: Wed Oct 5 06:26:41 2022 -0400 nfsd: move nfsd4_change_attribute to nfsfh.c This is a pretty big function for inlining. Move it to being non-inlined. Acked-by: Chuck Lever Reviewed-by: NeilBrown Signed-off-by: Jeff Layton commit f6102994338c950f55233643c90f334305996758 Author: Jeff Layton Date: Fri Aug 5 13:50:02 2022 -0400 ceph: report the inode version in getattr if requested When getattr requests the STX_CHANGE_COOKIE, request the full gamut of caps (similarly to how ctime is handled). When the change attribute seems to be valid, return it in the change_cookie field and set the flag in the reply mask. Also, unconditionally enable STATX_ATTR_CHANGE_MONOTONIC. Reviewed-by: Xiubo Li Signed-off-by: Jeff Layton commit 61a968b4f05e3c8880cfb127f122d7a3af882afa Author: Jeff Layton Date: Fri Aug 5 13:47:00 2022 -0400 nfs: report the inode version in getattr if requested Allow NFS to report the i_version in getattr requests. Since the cost to fetch it is relatively cheap, do it unconditionally and just set the flag if it looks like it's valid. Also, conditionally enable the MONOTONIC flag when the server reports its change attr type as such. Reviewed-by: NeilBrown Signed-off-by: Jeff Layton commit a1175d6b1bdaf4f74eda47ab18eb44194f9cb796 Author: Jeff Layton Date: Sun Dec 4 09:29:46 2016 -0500 vfs: plumb i_version handling into struct kstat The NFS server has a lot of special handling for different types of change attribute access, depending on the underlying filesystem. In most cases, it's doing a getattr anyway and then fetching that value after the fact. Rather that do that, add a new STATX_CHANGE_COOKIE flag that is a kernel-only symbol (for now). If requested and getattr can implement it, it can fill out this field. For IS_I_VERSION inodes, add a generic implementation in vfs_getattr_nosec. Take care to mask STATX_CHANGE_COOKIE off in requests from userland and in the result mask. Since not all filesystems can give the same guarantees of monotonicity, claim a STATX_ATTR_CHANGE_MONOTONIC flag that filesystems can set to indicate that they offer an i_version value that can never go backward. Eventually if we decide to make the i_version available to userland, we can just designate a field for it in struct statx, and move the STATX_CHANGE_COOKIE definition to the uapi header. Reviewed-by: NeilBrown Reviewed-by: Jan Kara Signed-off-by: Jeff Layton commit a3bb710383cbca2a0f1f4e5a1c7ef8dde14eff95 Author: Jeff Layton Date: Mon Aug 22 09:04:04 2022 -0400 fs: clarify when the i_version counter must be updated The i_version field in the kernel has had different semantics over the decades, but NFSv4 has certain expectations. Update the comments in iversion.h to describe when the i_version must change. Cc: Colin Walters Cc: NeilBrown Cc: Trond Myklebust Cc: Dave Chinner Reviewed-by: Christian Brauner Signed-off-by: Jeff Layton commit d3eb347da1148fdb1c2462ae83090a4553d3f46f Author: Jouni Högander Date: Tue Jan 24 12:26:36 2023 +0200 drm/i915/mtl: Apply Wa_14013475917 for all MTL steppings Wa_14013475917 has to be applied for all MTL steppings. Bspec: 66624 Cc: Mika Kahola Cc: José Roberto de Souza Signed-off-by: Jouni Högander Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230124102636.2567292-3-jouni.hogander@intel.com commit 3d35fe712e3a775548aeb6b6bdc75b7f1766583c Author: Jouni Högander Date: Tue Jan 24 12:26:35 2023 +0200 drm/i915/psr: Implement Wa_14014971492 Implement Wa_14014971492 and apply it for affected platforms. Bspec: 52890, 54369, 55378, 66624 v2: Adjust platforms where applied Cc: Rodrigo Vivi Cc: Mika Kahola Cc: José Roberto de Souza Signed-off-by: Jouni Högander Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230124102636.2567292-2-jouni.hogander@intel.com commit 551460d15a05c2f4dfbb80deedcb1acb7437e165 Author: Philippe Schenker Date: Mon Jan 23 16:17:32 2023 +0100 dt-bindings: arm: fsl: Add verdin yavia carrier-board Add the Verdin Yavia Carrier-Board that exists for both Verdin iMX8M Plus and Verdin iMX8M Mini. Signed-off-by: Philippe Schenker Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 66bd7a309682db3812ff0680eec84c4a5672ed25 Author: Krzysztof Kozlowski Date: Mon Jan 23 16:15:54 2023 +0100 ARM: dts: imx: use generic node name for rave-sp Use generic "mcu" node name for rave-sp node, as recommended by Devicetree specification. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 0eb01eae0c95f3a81ffcb124908b2ffeb6a9028a Author: Christoph Niedermaier Date: Sun Jan 22 17:20:10 2023 +0100 dt-bindings: arm: fsl: Add PDK2, PicoITX and DRC02 boards for the DHCOM i.MX6ULL SoM Add DH electronics DHCOM PDK2, PicoITX and DRC02 boards for the DHCOM i.MX6ULL SoM. Signed-off-by: Christoph Niedermaier Acked-by: Krzysztof Kozlowski Reviewed-by: Marek Vasut Signed-off-by: Shawn Guo commit 7c355b572ecdc17a426cf90511aaa143b293fa8b Author: Pierluigi Passaro Date: Sat Jan 21 15:52:42 2023 +0100 ARM: imx: mach-imx6ul: add imx6ulz support imx6ulz is derived SoC from imx6ull. Currently, the boards based on imx6ulz are correctly recognized only if the compatible includes "fsl,imx6ull", while "fsl,imx6ulz" is ignored. Signed-off-by: Pierluigi Passaro Signed-off-by: Shawn Guo commit 2f25e3bab00e97658a454a3e017b49157909321f Author: Zhu Yanjun Date: Mon Jan 16 14:35:02 2023 -0500 RDMA/irdma: Split CQ handler into irdma_reg_user_mr_type_cq Split the source codes related with CQ handling into a new function. Reviewed-by: Shiraz Saleem Signed-off-by: Zhu Yanjun Link: https://lore.kernel.org/r/20230116193502.66540-5-yanjun.zhu@intel.com Signed-off-by: Leon Romanovsky commit e965ef0e7b2ce2564f20f13c1fc369d886bc2544 Author: Zhu Yanjun Date: Mon Jan 16 14:35:01 2023 -0500 RDMA/irdma: Split QP handler into irdma_reg_user_mr_type_qp Split the source codes related with QP handling into a new function. Reviewed-by: Shiraz Saleem Signed-off-by: Zhu Yanjun Link: https://lore.kernel.org/r/20230116193502.66540-4-yanjun.zhu@intel.com Signed-off-by: Leon Romanovsky commit 693a5386eff0bad4dd6a1f6f1792a60c222d3c74 Author: Zhu Yanjun Date: Mon Jan 16 14:35:00 2023 -0500 RDMA/irdma: Split mr alloc and free into new functions In the function irdma_reg_user_mr, the mr allocation and free will be used by other functions. As such, the source codes related with mr allocation and free are split into the new functions. Reviewed-by: Shiraz Saleem Signed-off-by: Zhu Yanjun Link: https://lore.kernel.org/r/20230116193502.66540-3-yanjun.zhu@intel.com Signed-off-by: Leon Romanovsky commit 01798df19878e87718487046581ef6cdd114f2e0 Author: Zhu Yanjun Date: Mon Jan 16 14:34:59 2023 -0500 RDMA/irdma: Split MEM handler into irdma_reg_user_mr_type_mem The source codes related with IRDMA_MEMREG_TYPE_MEM are split into a new function irdma_reg_user_mr_type_mem. Reviewed-by: Shiraz Saleem Signed-off-by: Zhu Yanjun Link: https://lore.kernel.org/r/20230116193502.66540-2-yanjun.zhu@intel.com Signed-off-by: Leon Romanovsky commit 890a0794b34f89fcd90e94ec970ad2bc18b70e73 Author: Uros Bizjak Date: Mon Jan 16 17:25:22 2023 +0100 x86/ACPI/boot: Use try_cmpxchg() in __acpi_{acquire,release}_global_lock() Use try_cmpxchg instead of cmpxchg (*ptr, old, new) == old in __acpi_{acquire,release}_global_lock(). x86 CMPXCHG instruction returns success in ZF flag, so this change saves a compare after CMPXCHG (and related MOV 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. Note that the value from *ptr should be read using READ_ONCE() to prevent the compiler from merging, refetching or reordering the read. No functional change intended. Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230116162522.4072-1-ubizjak@gmail.com commit 50fd4d5e6914b60ea6f89c2cbff7a07799414c62 Author: Uros Bizjak Date: Mon Jan 16 17:34:46 2023 +0100 x86/PAT: Use try_cmpxchg() in set_page_memtype() Use try_cmpxchg instead of cmpxchg (*ptr, old, new) == old in set_page_memtype. 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. Note that the value from *ptr should be read using READ_ONCE to prevent the compiler from merging, refetching or reordering the read. No functional change intended. Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230116163446.4734-1-ubizjak@gmail.com commit 1d61659ced6bd8881cf2fb5cbcb28f9541fc7430 Author: Waiman Long Date: Wed Jan 25 19:36:27 2023 -0500 locking/rwsem: Disable preemption in all down_write*() and up_write() code paths The previous patch has disabled preemption in all the down_read() and up_read() code paths. For symmetry, this patch extends commit: 48dfb5d2560d ("locking/rwsem: Disable preemption while trying for rwsem lock") ... to have preemption disabled in all the down_write() and up_write() code paths, including downgrade_write(). Suggested-by: Peter Zijlstra Signed-off-by: Waiman Long Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230126003628.365092-4-longman@redhat.com commit 3f5245538a1964ae186ab7e1636020a41aa63143 Author: Waiman Long Date: Wed Jan 25 19:36:26 2023 -0500 locking/rwsem: Disable preemption in all down_read*() and up_read() code paths Commit: 91d2a812dfb9 ("locking/rwsem: Make handoff writer optimistically spin on owner") ... assumes that when the owner field is changed to NULL, the lock will become free soon. But commit: 48dfb5d2560d ("locking/rwsem: Disable preemption while trying for rwsem lock") ... disabled preemption when acquiring rwsem for write. However, preemption has not yet been disabled when acquiring a read lock on a rwsem. So a reader can add a RWSEM_READER_BIAS to count without setting owner to signal a reader, got preempted out by a RT task which then spins in the writer slowpath as owner remains NULL leading to live lock. One easy way to fix this problem is to disable preemption at all the down_read*() and up_read() code paths as implemented in this patch. Fixes: 91d2a812dfb9 ("locking/rwsem: Make handoff writer optimistically spin on owner") Reported-by: Mukesh Ojha Suggested-by: Peter Zijlstra Signed-off-by: Waiman Long Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230126003628.365092-3-longman@redhat.com commit b613c7f31476c44316bfac1af7cac714b7d6bef9 Author: Waiman Long Date: Wed Jan 25 19:36:25 2023 -0500 locking/rwsem: Prevent non-first waiter from spinning in down_write() slowpath A non-first waiter can potentially spin in the for loop of rwsem_down_write_slowpath() without sleeping but fail to acquire the lock even if the rwsem is free if the following sequence happens: Non-first RT waiter First waiter Lock holder ------------------- ------------ ----------- Acquire wait_lock rwsem_try_write_lock(): Set handoff bit if RT or wait too long Set waiter->handoff_set Release wait_lock Acquire wait_lock Inherit waiter->handoff_set Release wait_lock Clear owner Release lock if (waiter.handoff_set) { rwsem_spin_on_owner((); if (OWNER_NULL) goto trylock_again; } trylock_again: Acquire wait_lock rwsem_try_write_lock(): if (first->handoff_set && (waiter != first)) return false; Release wait_lock A non-first waiter cannot really acquire the rwsem even if it mistakenly believes that it can spin on OWNER_NULL value. If that waiter happens to be an RT task running on the same CPU as the first waiter, it can block the first waiter from acquiring the rwsem leading to live lock. Fix this problem by making sure that a non-first waiter cannot spin in the slowpath loop without sleeping. Fixes: d257cc8cb8d5 ("locking/rwsem: Make handoff bit handling more consistent") Signed-off-by: Waiman Long Signed-off-by: Ingo Molnar Tested-by: Mukesh Ojha Reviewed-by: Mukesh Ojha Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230126003628.365092-2-longman@redhat.com commit 6397859c8e9d87190f49dabbb835114ad0ea9fcb Merge: 4282494a20cdc 2241ab53cbb5c Author: Ingo Molnar Date: Thu Jan 26 11:42:56 2023 +0100 Merge tag 'v6.2-rc5' into locking/core, to pick up fixes Refresh this branch with the latest locking fixes, before applying a new series of changes. Signed-off-by: Ingo Molnar commit c5bc1b3ff35ae321d018d0c4ba66b062e4fb1e05 Author: Jeff Layton Date: Fri Sep 16 09:37:51 2022 -0400 fs: uninline inode_query_iversion Reviewed-by: NeilBrown Reviewed-by: Jan Kara Reviewed-by: Christian Brauner Signed-off-by: Jeff Layton commit 15d045fd85eb202fbd78bfae236cef565d958e40 Author: Jani Nikula Date: Wed Jan 25 13:10:52 2023 +0200 drm/i915/panel: move panel fixed EDID to struct intel_panel It's a bit confusing to have two cached EDIDs in struct intel_connector with slightly different purposes. Make the distinction a bit clearer by moving the EDID cached for eDP and LVDS panels at connector init time to struct intel_panel, and name it fixed_edid. That's what it is, a fixed EDID for the panels. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/328350ef918638928a8286cdbab3107c8258332d.1674643465.git.jani.nikula@intel.com commit 91ec555f5e9ebf1747273ffc60d4be36fb915e43 Author: Jani Nikula Date: Wed Jan 25 13:10:51 2023 +0200 drm/i915/opregion: convert intel_opregion_get_edid() to struct drm_edid Simplify validation and use by converting to drm_edid. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/6abb01f1e97d54a3c11bec24377f035df412b492.1674643465.git.jani.nikula@intel.com commit c36225a1e046e82050a4279b01b2302c2a38835f Author: Jani Nikula Date: Wed Jan 25 13:10:50 2023 +0200 drm/i915/bios: convert intel_bios_init_panel() to drm_edid Try to use struct drm_edid where possible, even if having to fall back to looking into struct edid down low via drm_edid_raw(). v2: Rebase Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/897807d62f74f690a173ecd405e25c6ccdd63b98.1674643465.git.jani.nikula@intel.com commit 25fa6b0f69ac365e97b63c898d2ac3b96f76aafd Author: Jani Nikula Date: Wed Jan 25 13:10:49 2023 +0200 drm/i915/edid: convert DP, HDMI and LVDS to drm_edid Convert all the connectors that use cached connector edid and detect_edid to drm_edid. Since drm_get_edid() calls drm_connector_update_edid_property() while drm_edid_read*() do not, we need to call drm_edid_connector_update() separately, in part due to the EDID caching behaviour in HDMI and DP. Especially DP depends on the details parsed from EDID. (The big behavioural change conflating EDID reading with parsing and property update was done in commit 5186421cbfe2 ("drm: Introduce epoch counter to drm_connector")) v6: Rebase on drm_edid_connector_add_modes() v5: Fix potential uninitialized var use (kernel test robot ) v4: Call drm_edid_connector_update() after reading HDMI/DP EDID v3: Don't leak vga switcheroo EDID in LVDS init (Ville) v2: Don't leak opregion fallback EDID (Ville) Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/eabb4de932841b38b34cc2818ea9fbf7c10224fd.1674643465.git.jani.nikula@intel.com commit d2468138927cc18ac9923146d49e2a5d06377d1d Author: Krzysztof Kozlowski Date: Fri Jan 20 08:21:10 2023 +0100 ARM: dts: stih418: align OPP table names with DT schema DT schema expects names of operating points tables to match certain pattern: stih418-b2264.dtb: opp_table: $nodename:0: 'opp_table' does not match '^opp-table(-[a-z0-9]+)?$' Link: https://lore.kernel.org/r/20230120072110.138627-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 0f36161a9a140b1d30bf0935e4166fcbf8c8b847 Author: Krzysztof Kozlowski Date: Mon Jan 23 16:15:36 2023 +0100 ARM: dts: dm814x: align UART node name with bindings Bindings expect UART/serial node names to be "serial". Link: https://lore.kernel.org/r/20230123151536.369623-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 6fd6759567ec82c61d54b257db3cebbc154cb631 Author: Krzysztof Kozlowski Date: Mon Jan 23 16:15:25 2023 +0100 ARM: dts: moxart: align UART node name with bindings Bindings expect UART/serial node names to be "serial". Link: https://lore.kernel.org/r/20230123151525.369255-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 79a5b931a2af63cd1249abd696566a7ffbe44c17 Author: Krzysztof Kozlowski Date: Mon Jan 23 16:15:29 2023 +0100 ARM: dts: axm55xx: align UART node name with bindings Bindings expect UART/serial node names to be "serial". Link: https://lore.kernel.org/r/20230123151529.369313-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 55eecc11eafa3ef307d68dcc3f802ad38aa1be0a Author: Krzysztof Kozlowski Date: Mon Jan 23 16:15:45 2023 +0100 ARM: dts: alpine: align UART node name with bindings Bindings expect UART/serial node names to be "serial". Link: https://lore.kernel.org/r/20230123151545.369762-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 91fef8a860faa1ab4c36ab04a789ab60f8caea56 Author: Krzysztof Kozlowski Date: Mon Jan 23 16:15:47 2023 +0100 arm64: dts: amazon: drop deprecated serial device_type The device_type property is deprecated by Devicetree specification and bindings do not allow it. Link: https://lore.kernel.org/r/20230123151547.369791-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 5fc3037ae3def493360cc1b7844a9971ba2bd08e Author: Krzysztof Kozlowski Date: Mon Jan 23 16:15:49 2023 +0100 arm64: dts: apm: drop deprecated serial device_type The device_type property is deprecated by Devicetree specification and bindings do not allow it. Link: https://lore.kernel.org/r/20230123151549.369818-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit cba9e7dbf1119e9f11cef0379a88c42a92029bde Author: Krzysztof Kozlowski Date: Mon Jan 23 16:15:33 2023 +0100 ARM: dts: arm: align UART node name with bindings Bindings expect UART/serial node names to be "serial". Reviewed-by: Linus Walleij Acked-by: Sudeep Holla Link: https://lore.kernel.org/r/20230123151533.369533-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 9ca5a7ce492d182c25ea2e785eeb72cee1d5056b Author: Krzysztof Kozlowski Date: Wed Jan 25 10:45:11 2023 +0100 ARM: dts: exynos: use lowercase hex addresses By convention the hex addresses should be lowercase. Link: https://lore.kernel.org/r/20230125094513.155063-7-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 7bac2cd7fff73dc2b3600c83aeb1c57100cafe70 Author: Krzysztof Kozlowski Date: Wed Jan 25 10:45:10 2023 +0100 ARM: dts: exynos: use generic node names for phy Align HDMI and USB phy node names with bindings expectation. Link: https://lore.kernel.org/r/20230125094513.155063-6-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit af1c89ddb74f170eccd5a57001d7317560b638ea Author: Krzysztof Kozlowski Date: Wed Jan 25 10:45:05 2023 +0100 ARM: dts: exynos: correct HDMI phy compatible in Exynos4 The HDMI phy compatible was missing vendor prefix. Fixes: ed80d4cab772 ("ARM: dts: add hdmi related nodes for exynos4 SoCs") Cc: Link: https://lore.kernel.org/r/20230125094513.155063-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 793207bad71c5339c614d12ac21d627da7bf771d Author: Borislav Petkov (AMD) Date: Tue Jan 24 19:01:05 2023 +0100 x86/resctrl: Fix a silly -Wunused-but-set-variable warning clang correctly complains arch/x86/kernel/cpu/resctrl/rdtgroup.c:1456:6: warning: variable \ 'h' set but not used [-Wunused-but-set-variable] u32 h; ^ but it can't know whether this use is innocuous or really a problem. There's a reason why those warning switches are behind a W=1 and not enabled by default - yes, one needs to do: make W=1 CC=clang HOSTCC=clang arch/x86/kernel/cpu/resctrl/ with clang 14 in order to trigger it. I would normally not take a silly fix like that but this one is simple and doesn't make the code uglier so... Reported-by: kernel test robot Signed-off-by: Borislav Petkov (AMD) Acked-by: Reinette Chatre Tested-by: Babu Moger Link: https://lore.kernel.org/r/202301242015.kbzkVteJ-lkp@intel.com commit 37251c7114e1b743b077ca74b93557c1ad92a97e Author: Josh Poimboeuf Date: Tue Jan 24 19:38:05 2023 -0800 powerpc/module_64: Fix "expected nop" error on module re-patching When a module with a livepatched function is unloaded and then reloaded, klp attempts to dynamically re-patch it. On ppc64, that fails with the following error: module_64: livepatch_nfsd: Expected nop after call, got e8410018 at e_show+0x60/0x548 [livepatch_nfsd] livepatch: failed to initialize patch 'livepatch_nfsd' for module 'nfsd' (-8) livepatch: patch 'livepatch_nfsd' failed for module 'nfsd', refusing to load module 'nfsd' The error happens because the restore r2 instruction had already previously been written into the klp module's replacement function when the original function was patched the first time. So the instruction wasn't a nop as expected. When the restore r2 instruction has already been patched in, detect that and skip the warning and the instruction write. Signed-off-by: Josh Poimboeuf Reviewed-by: Petr Mladek Acked-by: Song Liu Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/2f6329ffd9674df6ff57e03edeb2ca54414770ab.1674617130.git.jpoimboe@kernel.org commit bc2c6f5695ffa05c838b8b6fc5cd581a672151a1 Author: Josh Poimboeuf Date: Tue Jan 24 19:38:04 2023 -0800 powerpc/module_64: Improve restore_r2() return semantics restore_r2() returns 1 on success, which is surprising for a non-boolean function. Change it to return 0 on success and -errno on error to match kernel coding convention. Signed-off-by: Josh Poimboeuf Reviewed-by: Petr Mladek Acked-by: Song Liu Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/15baf76c271a0ae09f7b8556e50f2b4251e7049d.1674617130.git.jpoimboe@kernel.org commit d0941130c93515411c8d66fc22bdae407b509a6d Author: Jamie Bainbridge Date: Wed Jan 25 11:16:52 2023 +1100 icmp: Add counters for rate limits There are multiple ICMP rate limiting mechanisms: * Global limits: net.ipv4.icmp_msgs_burst/icmp_msgs_per_sec * v4 per-host limits: net.ipv4.icmp_ratelimit/ratemask * v6 per-host limits: net.ipv6.icmp_ratelimit/ratemask However, when ICMP output is limited, there is no way to tell which limit has been hit or even if the limits are responsible for the lack of ICMP output. Add counters for each of the cases above. As we are within local_bh_disable(), use the __INC stats variant. Example output: # nstat -sz "*RateLimit*" IcmpOutRateLimitGlobal 134 0.0 IcmpOutRateLimitHost 770 0.0 Icmp6OutRateLimitHost 84 0.0 Signed-off-by: Jamie Bainbridge Suggested-by: Abhishek Rawal Link: https://lore.kernel.org/r/273b32241e6b7fdc5c609e6f5ebc68caf3994342.1674605770.git.jamie.bainbridge@gmail.com Signed-off-by: Paolo Abeni commit 4dc7c58023e86352abead441e2f257c752a13562 Author: Bagas Sanjaya Date: Fri Jan 20 19:35:33 2023 +0700 habanalabs: Fix list of /sys/class/habanalabs/hl/status Stephen Rothwell reported htmldocs warnings when merging accel tree: Documentation/ABI/testing/sysfs-driver-habanalabs:201: ERROR: Unexpected indentation. Documentation/ABI/testing/sysfs-driver-habanalabs:201: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/ABI/testing/sysfs-driver-habanalabs:201: ERROR: Unexpected indentation. Documentation/ABI/testing/sysfs-driver-habanalabs:201: WARNING: Block quote ends without a blank line; unexpected unindent. Fix these by fixing alignment of list of card status returned by /sys/class/habanalabs/hl/status. Link: https://lore.kernel.org/linux-next/20230120130634.61c3e857@canb.auug.org.au/ Reported-by: Stephen Rothwell Signed-off-by: Bagas Sanjaya Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 183ebe0355530835a046f8360aea67528e11ed5d Author: Bagas Sanjaya Date: Fri Jan 20 19:35:32 2023 +0700 Documentation: accel: escape wildcard in special file path Stephen Rothwell reported htmldocs warning then merging accel tree: Documentation/accel/introduction.rst:72: WARNING: Inline emphasis start-string without end-string. Sphinx confuses the file wildcards with inline emphasis (italics), hence the warning. Fix the warning by escaping wildcards. Link: https://lore.kernel.org/linux-next/20230120132116.21de1104@canb.auug.org.au/ Reported-by: Stephen Rothwell Signed-off-by: Bagas Sanjaya Reviewed-by: Jeffrey Hugo Signed-off-by: Oded Gabbay commit 24444a99331af2b51b46f55c06d02ab6e7cb29b4 Author: Jeffrey Hugo Date: Thu Jan 19 09:26:08 2023 -0700 docs: accel: Fix debugfs path The device specific directory in debugfs does not have "accel". For example, the documentation says device 0 should have a debugfs entry as /sys/kernel/debug/accel/accel0/ but in reality the entry is /sys/kernel/debug/accel/0/ Fix the documentation to match the implementation. Fixes: 8c5577a5ccc6 ("doc: add documentation for accel subsystem") Signed-off-by: Jeffrey Hugo Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit f7d67c1cfdccfe7168d28c26b935c9da18bfdb8c Author: Koby Elbaz Date: Sun Jan 15 12:38:53 2023 +0200 habanalabs/gaudi2: find decode error root cause When a decode error happens, we often don't know the exact root cause (the erroneous address that was accessed) and the exact engine that created the erroneous transaction. To find out, we need to go over all the relevant register blocks in the ASIC. Once we find the relevant engine, we print its details and the offending address. This helps tremendously when debugging an error that was created by running a user workload. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit ce582bea86bf0c7ae6f8269873bd82dbc0158e53 Author: Ofir Bitton Date: Wed Jan 18 09:36:06 2023 +0200 habanalabs/gaudi2: unsecure tpc kernel_config registers This is required in order to allow the kernel to control relevant configuration space via load and store instructions. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 44155bb62762335c3e0e9cdec04ad7c03cd41fb2 Author: Tomer Tayar Date: Tue Jan 17 19:45:24 2023 +0200 habanalabs: clear in_compute_reset when escalating to hard reset If resetting device upon release while the release watchdog work is scheduled, the compute reset is replaced with hard reset. In this case, need to clear the in_compute_reset indication in the device reset information structure. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 0c93eb098f21074555b9b08ab60d1c3e3129f3da Author: Tomer Tayar Date: Tue Jan 17 15:50:41 2023 +0200 habanalabs: run error handling if scrub_device_mem fails after reset If device memory scrubbing from hl_device_reset() fails, we return with an error code but not perform error handling code. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit eba773d30d94de4b0cc7845d2579ebf46c8d662b Author: Moti Haimovski Date: Tue Jan 3 10:28:24 2023 +0200 habanalabs: enhance info printed on FW load errors This commit enhances the following error messages to also provide the type of error occurred, this in order to ease debugging of errors detected during firmware-load. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 75b6984ef659a0d2a86cd937a208f8d1e98e957e Author: Ofir Bitton Date: Tue Jan 10 11:41:39 2023 +0200 habanalabs: optimize command submission completion timestamp Completion timestamp is taken during the actual command submission release. As the release happens in a work queue, the timestamp taken is not accurate. Hence, we will take the timestamp in the interrupt handler itself while propagating it to the release function. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 9a7d530a8048980c76e1e61078ed5223bf6fa283 Author: Ofir Bitton Date: Mon Jan 16 20:20:22 2023 +0200 habanalabs: refactor user interrupt type In order to support more user interrupt types in the future, we enumerate the user interrupt type instead of using a boolean. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 12d3ea014d3d08abadedd9c01422b1f17b2ddeec Author: Dani Liberman Date: Mon Jan 16 12:00:05 2023 +0200 habanalabs/gaudi2: fix emda range registers razwi handling Handling edma razwi is different than all other engines since edma uses sft routers. For hbw transactions sft router contain separate interface for each edma and for lbw there is common interface for both edma engines of the same dcore. To handle the razwi correctly we need to: 1. Simplify the calculation of the sft router address. 2. Add razwi handling for edma qm errors, since edma qman doesn't reports axi error response. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit a6685b573c8e0e0ec2149e48038b26d6676274f1 Author: Koby Elbaz Date: Wed Jan 11 15:43:21 2023 +0200 habanalabs: block soft-reset on an unusable device A device with status malfunction indicates that it can't be used. In such a case we do not support certain reset types, e.g., all kinds of soft-resets (compute reset, inference soft-reset), and reset upon device release. A hard-reset is the only way that an unusable device can change its status. All other reset procedures can't put the device in a reset procedure, which might ultimately cause the device to change its status, unintentionally, to become operational again. Such a scenario has recently occurred, when a user requested a hard-reset while another heavy user workload was ongoing (reset request is queued). Since the workload couldn't finish within reset's timeout limits, the reset has failed and set a device status malfunction. Eventually, when the user released the FD, an unsuccessful soft-reset occurred, hence followed by an additional hard-reset that changed the ASICs status back to be operational. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 436479522d5691d278d69d4e9478e4a2fb062c6c Author: Dani Liberman Date: Tue Jan 10 15:48:36 2023 +0200 habanalabs/gaudi2: print page fault axi transaction id AXI transaction id holds information about the initiator which caused the page fault. In the future it will be translated automatically by driver to an initiator name. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit b86b73ec0499a421a42b3e9ab4232de4f4659d31 Author: Ofir Bitton Date: Tue Jan 10 21:43:28 2023 +0200 habanalabs: update device status sysfs documentation As device status was changed recently, we must update the documentation as well. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit e868cc591e89cf735a11fb24f38d48c7574c4d01 Author: Jeffrey Hugo Date: Tue Jan 17 10:45:58 2023 -0700 accel: Add .mmap to DRM_ACCEL_FOPS In reviewing the ivpu driver, DEFINE_DRM_ACCEL_FOPS could have been used if DRM_ACCEL_FOPS defined .mmap to be drm_gem_mmap. Lets add that since accel drivers are a variant of drm drivers, modern drm drivers are expected to use GEM, and mmap() is a common operation that is expected to be heavily used in accel drivers thus the common accel driver should be able to just use DEFINE_DRM_ACCEL_FOPS() for convenience. Signed-off-by: Jeffrey Hugo Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 641477fd688515d977a6daeace441cf6f2512e01 Author: Jeffrey Hugo Date: Tue Jan 17 11:04:30 2023 -0700 MAINTAINERS/ACCEL: Add include/drm/drm_accel.h to the accel entry get_maintainer.pl does not suggest Oded Gabbay, the DRM COMPUTE ACCELERATORS DRIVERS AND FRAMEWORK maintainer for changes that touch the Accel Subsystem header - drm_accel.h. This is because that file is missing from the Accel Subsystem entry. Fix this. Signed-off-by: Jeffrey Hugo Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit c89d19f7a37b26cf27f8bdf1074bdc05a4ca57dd Author: Dani Liberman Date: Wed Jan 11 10:50:09 2023 +0200 habanalabe/gaudi2: add cfg base when displaying razwi addresses Captured addresses of low b/w razwi information contains only the offset from the cfg base. To make it more user readable, add the cfg base to it. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit c21f9f347131607ad1aae99b67c5d2dee3dc968c Author: Dani Liberman Date: Thu Jan 5 17:12:28 2023 +0200 habanalabs/gaudi2: read mmio razwi information In gaudi2 there night be different routers for low b/w and high b/w transactions. But in the code that collects razwi information, we used the same router for high b/w and low b/w. Fixed it by reading the information also from low b/w routers. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit ac5af9900f82b7034de7c9eb1d70d030ba325607 Author: farah kassabri Date: Tue Jan 10 12:29:55 2023 +0200 habanalabs: fix bug in timestamps registration code Protect re-using the same timestamp buffer record before actually adding it to the to interrupt wait list. Mark ts buff offset as in use in the spinlock protection area of the interrupt wait list to avoid getting in the re-use section in ts_buff_get_kernel_ts_record before adding the node to the list. this scenario might happen when multiple threads are racing on same offset and one thread could set data in the ts buff in ts_buff_get_kernel_ts_record then the other thread takes over and get to ts_buff_get_kernel_ts_record and we will try to re-use the same ts buff offset then we will try to delete a non existing node from the list. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 1693fef9e95dbe8ab767d208a02328fff13fbb94 Author: farah kassabri Date: Sun Jan 8 17:33:44 2023 +0200 habanalabs: bugs fixes in timestamps buff alloc use argument instead of fixed GFP value for allocation in Timestamps buffers alloc function. change data type of size to size_t. Fixes: 9158bf69e74f ("habanalabs: Timestamps buffers registration") Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 72848de04bbac214f927ec2f7f4e16a20161c169 Author: farah kassabri Date: Tue Jan 3 14:23:55 2023 +0200 habanalabs: check pad and reserved fields in ioctls Make sure all reserved/pad fields in uapi input structures are set to 0. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 0970380a7eba3808e12749713ac6acd0ac76d1bc Author: XU pengfei Date: Tue Jan 10 18:35:13 2023 +0800 habanalabs: remove unnecessary (void*) conversions data is a void * type and does not require a cast. Signed-off-by: XU pengfei Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 7d352a816056068daa8bd8c2be9f66a6afde8365 Author: Gustavo A. R. Silva Date: Mon Jan 9 19:39:47 2023 -0600 habanalabs: Replace zero-length arrays with flexible-array members Zero-length arrays are deprecated[1] and we are moving towards adopting C99 flexible-array members instead. So, replace zero-length arrays in a couple of structures with flex-array members. 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 [2]. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays [1] Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [2] Link: https://github.com/KSPP/linux/issues/78 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Stanislaw Gruszka Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 2a0a839b6a28f7c4c528bb75b740c7f38ef79a37 Author: Moti Haimovski Date: Thu Dec 29 12:44:09 2022 +0200 habanalabs: extend fatal messages to contain PCI info This commit attaches the PCI device address to driver fatal messages in order to ease debugging in multi-device setups. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit eaca606e88ca22932af5b8ea36f302de14e81ed9 Author: Dani Liberman Date: Wed Jan 4 00:05:03 2023 +0200 habanalabs/gaudi2: remove use of razwi info received from f/w Because f/w does not update razwi info when sending events, remove the use of it. The driver is responsible to check if razwi happened and to collect razwi data. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 54fcb384be6044ef17ec95a0aec0f86ad114b8d6 Author: Ohad Sharabi Date: Wed Nov 30 14:41:49 2022 +0200 habanalabs: trace LBW reads/writes Add traces to LBW reads/writes. This may be handy when debugging configuration failure or events when tracking configuration flow. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit d5077a55006c4af513e9b19acfa8e44b069a4fde Author: Ohad Sharabi Date: Wed Nov 30 14:02:00 2022 +0200 habanalabs: define events to trace PCI LBW access There are cases where it may be useful to dump the whole LBW configs. Yet, doing so while spamming the kernel log will probably shade other important messages since the LBW access is done in sheer volume. To answer this we add trace events for those too. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 200f3cf047f084834949ea6eea43d558c39a6abe Author: Carmit Carmel Date: Wed Jan 4 11:13:01 2023 +0200 habanalabs/gaudi2: fix log for sob value overflow/underflow The value in SM_SEI_CAUSE includes the SOB index and not the SOB group index. Remove usage of log_mask in sm_sei_cause structure as it was never used. Signed-off-by: Carmit Carmel Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit ab509d81c959367404067f1625f6b0e36770fa6d Author: Ohad Sharabi Date: Mon Jan 2 16:44:28 2023 +0200 habanalabs: add set engines masks ASIC function This function shall be used whenever components enable/binning masks should be updated. Usage is in one of the below cases: - update user (or default) component masks - update when getting the masks from FW (either CPUCP or COMMS) Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 571d1a7222851ef5075f55702074ed7713dba304 Author: Koby Elbaz Date: Fri Dec 23 15:02:05 2022 +0200 habanalabs: protect access to dynamic mem 'user_mappings' When HL_INFO_USER_MAPPINGS IOCTL is called, we copy_to_user from a dynamically allocated memory - 'user_mappings'. Since freeing/allocating it happens in runtime (upon a page fault), it not unlikely to access it even before being initially allocated (i.e., accessing a NULL pointer). The solution is to simply mark the spot when the err info has been collected, and that way to know whether err info (either page fault or RAZWI) is available to be read. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit c7d7b9aca2423d243748361cfb72e7fbdb8b37b9 Author: Tom Rix Date: Sat Jan 7 13:48:27 2023 -0500 habanalabs: remove redundant memset From reviewing the code, the line memset(kdata, 0, usize); is not needed because kdata is either zeroed by kdata = kzalloc(asize, GFP_KERNEL); when allocated at runtime or by char stack_kdata[128] = {0}; at compile time. Signed-off-by: Tom Rix Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 78baccbdc343b0d4c3e3fd05644dadc3fc3f94c0 Author: Koby Elbaz Date: Sun Dec 25 12:43:04 2022 +0200 habanalabs: refactor razwi/page-fault information structures This refactor makes the code clearer and the new variables' names better describe their roles. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 6cfb00139dc3b7b64996ecff3c76eaf08d6c8c4b Author: Koby Elbaz Date: Wed Dec 21 17:49:42 2022 +0200 habanalabs/gaudi2: avoid reconfiguring the same PB registers It appears that, within the sync manager security configuration, we reconfigure PB registers over and over without any need to do that. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 4083697a3672d0eb6e41ba51bff168171a3bf398 Author: Ofir Bitton Date: Sun Dec 25 16:27:24 2022 +0200 habanalabs/gaudi: allow device acquire while in debug mode During device acquire, the driver is using a QMAN for clearing some registers. In order to avoid internal races, the driver verifies the device is idle before submitting the register clear job. This check introduces an issue, as debug mode will cause the device to be non-idle which will lead to device acquire failure. In order to overcome this issue we can entirely remove the idle check as the driver is using the QMAN only when there is no active context. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit e1e8e7472b8c647c4e117191d6b44b852c90cd24 Author: Oded Gabbay Date: Thu Dec 22 12:28:54 2022 +0200 habanalabs: move some prints to debug level When entering an IOCTL, the driver prints a message in case device is not operational. This message should be printed in debug level as it can spam the kernel log and it is not an error. Signed-off-by: Oded Gabbay commit 139dad04712e803c7b844ccb57ef9302be64a3d0 Author: Oded Gabbay Date: Wed Dec 21 12:51:13 2022 +0200 habanalabs: update f/w files Update common firmware files with the latest version. There is no functional change. Signed-off-by: Oded Gabbay commit bcace6f058a94d2adb45c54b2e63b879c7849341 Author: Oded Gabbay Date: Wed Dec 21 12:18:55 2022 +0200 habanalabs/gaudi2: update f/w files Update gaudi2 firmware files with the latest version. There is no functional change. Signed-off-by: Oded Gabbay commit 2fd7db3c80d2391a2382db324577e2a6fd54d3a1 Author: Oded Gabbay Date: Wed Dec 21 11:55:54 2022 +0200 habanalabs/gaudi2: update asic register files Update some register files with the latest h/w auto-generated files. There is no functional change. Signed-off-by: Oded Gabbay commit e2a079a206869b5e2164afa15bdf8d6d6299ca13 Author: Tomer Tayar Date: Tue Dec 6 19:54:10 2022 +0200 habanalabs: verify that kernel CB is destroyed only once Remove the distinction between user CB and kernel CB, and verify for both that they are not destroyed more than once. As kernel CB might be taken from the pre-allocated CB pool, so we need to clear the handle destroyed indication when returning a CB to the pool. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 20faaeec3794661c1d73578316691174a5a0e5a9 Author: Ohad Sharabi Date: Sun Dec 18 09:42:34 2022 +0200 habanalabs: add uapi to flush inbound HBM transactions When doing p2p with a NIC device, the NIC needs to make sure all the writes to the HBM (through the PCI bar of the Gaudi device) were flushed. It can be done by either the NIC or the host reading through the PCI bar. To support the host side, we supply a simple uapi to perform this flush through the driver, because the user can't create such a transaction by itself (the PCI bar isn't exposed to normal users). Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit e65e175b07bef5974045cc42238de99057669ca7 Author: Oded Gabbay Date: Mon Dec 26 23:05:00 2022 +0200 habanalabs: move driver to accel subsystem Now that we have a subsystem for compute accelerators, move the habanalabs driver to it. This patch only moves the files and fixes the Makefiles. Future patches will change the existing code to register to the accel subsystem and expose the accel device char files instead of the habanalabs device char files. Update the MAINTAINERS file to reflect this change. Signed-off-by: Oded Gabbay commit 8ddbc7b9ef9862c34117ec552f00a054101ffc36 Author: Stefan Wahren Date: Sat Jan 21 15:00:53 2023 +0100 dt-bindings: arm: Document the rest of i.MX28 based boards Not all compatibles of i.MX28 based boards are documented, which cause dtbs_check warnings. So add the missing compatibles to fsl.yaml. Signed-off-by: Stefan Wahren Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit c5a57dd6069df2014a2aca783afb1ecb27a69491 Author: Stefan Wahren Date: Sat Jan 21 15:00:52 2023 +0100 dt-bindings: arm: fsl: Fix bindings for APF28Dev board Adjust the compatibles for the APF28Dev board in order to fix the dtbs_check warning: DTC_CHK arch/arm/boot/dts/imx28-apf28dev.dtb /home/stefanw/torvalds/arch/arm/boot/dts/imx28-apf28dev.dtb: /: compatible: oneOf' conditional failed, one must be fixed: ['armadeus,imx28-apf28dev', 'armadeus,imx28-apf28', 'fsl,imx28'] is too long ['armadeus,imx28-apf28dev', 'armadeus,imx28-apf28', 'fsl,imx28'] is too short ... Fixes: 3d735471d066 ("dt-bindings: arm: Document Armadeus SoM and Dev boards devicetree binding") Signed-off-by: Stefan Wahren Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 9f92752788d719a4978d31082c98300274dd6ffc Merge: 3f17e16f385f5 52df82cc91994 Author: Paolo Abeni Date: Thu Jan 26 10:08:05 2023 +0100 Merge branch 'adding-sparx5-is0-vcap-support' Steen Hegelund says: ==================== Adding Sparx5 IS0 VCAP support This provides the Ingress Stage 0 (IS0) VCAP (Versatile Content-Aware Processor) support for the Sparx5 platform. The IS0 VCAP (also known in the datasheet as CLM) is a classifier VCAP that mainly extracts frame information to metadata that follows the frame in the Sparx5 processing flow all the way to the egress port. The IS0 VCAP has 4 lookups and they are accessible with a TC chain id: - chain 1000000: IS0 Lookup 0 - chain 1100000: IS0 Lookup 1 - chain 1200000: IS0 Lookup 2 - chain 1300000: IS0 Lookup 3 - chain 1400000: IS0 Lookup 4 - chain 1500000: IS0 Lookup 5 Each of these lookups have their own port keyset configuration that decides which keys will be used for matching on which traffic type. The IS0 VCAP has these traffic classifications: - IPv4 frames - IPv6 frames - Unicast MPLS frames (ethertype = 0x8847) - Multicast MPLS frames (ethertype = 0x8847) - Other frame types than MPLS, IPv4 and IPv6 The IS0 VCAP has an 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. This allow rules in the IS0 VCAP to 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. As an example a "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/20230124104511.293938-1-steen.hegelund@microchip.com Signed-off-by: Paolo Abeni commit 52df82cc919945f58c10c24b799822e9e6e0359f Author: Steen Hegelund Date: Tue Jan 24 11:45:11 2023 +0100 net: microchip: sparx5: Add support for IS0 VCAP CVLAN TC keys This adds support for parsing and matching on the CVLAN tags in the Sparx5 IS0 VCAP. Signed-off-by: Steen Hegelund Signed-off-by: Paolo Abeni commit 63e3564507ea0f2e8eac5ebadf44c430d56d3fbc Author: Steen Hegelund Date: Tue Jan 24 11:45:10 2023 +0100 net: microchip: sparx5: Add support for IS0 VCAP ethernet protocol types This allows the IS0 VCAP to have its own list of supported ethernet protocol types matching what is supported by the VCAPs port lookup classification. Signed-off-by: Steen Hegelund Signed-off-by: Paolo Abeni commit 81e164c4aec5904156867d56b06adc0097262474 Author: Steen Hegelund Date: Tue Jan 24 11:45:09 2023 +0100 net: microchip: sparx5: Add automatic selection of VCAP rule actionset With more than one possible actionset in a VCAP instance, the VCAP API will now use the actions in a VCAP rule to select the actionset that fits these actions the best possible way. Signed-off-by: Steen Hegelund Signed-off-by: Paolo Abeni commit 88bd9ea70b2ec59298125ff2bf9837034d73e3b7 Author: Steen Hegelund Date: Tue Jan 24 11:45:08 2023 +0100 net: microchip: sparx5: Add TC filter chaining support for IS0 and IS2 VCAPs This allows rules to be chained between VCAP instances, e.g. from IS0 Lookup 0 to IS0 Lookup 1, or from one of the IS0 Lookups to one of the IS2 Lookups. Chaining from an IS2 Lookup to another IS2 Lookup is not supported in the hardware. Signed-off-by: Steen Hegelund Signed-off-by: Paolo Abeni commit 542e6e2c20e502cd8829304c5b4d6a45460d0a51 Author: Steen Hegelund Date: Tue Jan 24 11:45:07 2023 +0100 net: microchip: sparx5: Add TC support for IS0 VCAP This enables the TC command to use the Sparx5 IS0 VCAP Signed-off-by: Steen Hegelund Signed-off-by: Paolo Abeni commit 7306fcd17c0c78ea51b792f31d2b8e717591b3cb Author: Steen Hegelund Date: Tue Jan 24 11:45:06 2023 +0100 net: microchip: sparx5: Add actionset type id information to rule This adds the actionset type id to the rule information. This is needed as we now have more than one actionset in a VCAP instance (IS0). Signed-off-by: Steen Hegelund Signed-off-by: Paolo Abeni commit 545609fd4e7fe840b3188e2d1034d3d5a91ecdeb Author: Steen Hegelund Date: Tue Jan 24 11:45:05 2023 +0100 net: microchip: sparx5: Add IS0 VCAP keyset configuration for Sparx5 This adds the IS0 VCAP port keyset configuration for Sparx5 and also updates the debugFS support to show the keyset configuration. Signed-off-by: Steen Hegelund Signed-off-by: Paolo Abeni commit f274a659fb08da5e7c88ba934a4aee0e5de17510 Author: Steen Hegelund Date: Tue Jan 24 11:45:04 2023 +0100 net: microchip: sparx5: Add IS0 VCAP model and updated KUNIT VCAP model This provides the IS0 (Ingress Stage 0) or CLM VCAP model for Sparx5. This VCAP provides classification actions for Sparx5. Signed-off-by: Steen Hegelund Signed-off-by: Paolo Abeni commit 42bea43c1f91b30cc9bba1cd98725d9341e82121 Merge: 4f848f23f5ffc 80b3303221a0a Author: Arnd Bergmann Date: Thu Jan 26 10:06:05 2023 +0100 Merge tag 'ux500-dts-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into arm/dt Some Ux500 DTS updates for the v6.3 kernel: - Fix up LED node names - Add a clkout-node for the external clock * tag 'ux500-dts-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik: ARM: dts: ux500: Add clkout-clock node ARM: dts: ste: align LED node names with dtschema Signed-off-by: Arnd Bergmann commit 7d25cae7abf4505129f92dc581789c330640564d Author: Oded Gabbay Date: Tue Dec 20 14:12:19 2022 +0200 habanalabs/uapi: move uapi file to drm Move the habanalabs.h uapi file from include/uapi/misc to include/uapi/drm, and rename it to habanalabs_accel.h. This is required before moving the actual driver to the accel subsystem. Update MAINTAINERS file accordingly. Signed-off-by: Oded Gabbay commit 9b3d9f917f81aed559d19377c11d6fac3db89fd7 Author: Tomer Tayar Date: Thu Dec 15 16:36:53 2022 +0200 habanalabs: fix dma-buf release handling if dma_buf_fd() fails The dma-buf private object is freed if a call to dma_buf_fd() fails, and because a file was already associated with the dma-buf in dma_buf_export(), the release op will be called and will use this object. Mark the 'priv' field as NULL in this case, and avoid accessing it from the release op. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 6bdb7bc990cbed81f703c4a265843f959359489c Author: Ofir Bitton Date: Wed Dec 14 16:52:05 2022 +0200 habanalabs/gaudi2: dump event description even if no cause In order to have the no-cause error print be more informative, we add the event description in addition to the event id. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit c2239a251d2d738f435c46bae7d66899c62ce493 Author: farah kassabri Date: Wed Nov 16 15:40:30 2022 +0200 habanalabs: pass-through request from user to f/w Add a uAPI, as part of the INFO IOCTL, to allow users to send requests directly to f/w, according to a pre-defined set of opcodes that the f/w exposes. The f/w will put the result in a kernel-allocated buffer, which the driver will then copy to the user-supplied buffer. This will allow f/w tools to communicate directly with the f/w without the need to add a new uAPI to the driver for each new type of request. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 2dd89591d8c7fe7b24daeac0faf8a0afa30f9b0b Author: Tal Cohen Date: Thu Dec 1 16:37:30 2022 +0200 habanalabs: support receiving ascii message from preboot f/w An Ascii message that is sent from preboot towards the driver will indicate the specific error that occurred on the f/w. This commit supports that message and parse the ascii string in order to print it into the kernel log The commit also changes the way the descriptor struct is declared. While its size increased (it now above 1024 bytes), it will be allocated by using kmalloc instead of stack declaration. Signed-off-by: Tal Cohen Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 2b30873abd49fa8f8e21c3e1cbcf2795adfb7f73 Author: Ohad Sharabi Date: Thu Dec 8 15:19:10 2022 +0200 habanalabs: fix asic-specific functions documentation - Add missing documentation of set DRAM props - fix typo Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit b4af9ee9b91347a968c1232089c6b3750859900e Author: farah kassabri Date: Mon Nov 28 13:11:44 2022 +0200 habanalabs: fix wrong variable type used for vzalloc vzalloc expects void* and not void __iomem*. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit f304d1309cf243960f293681d7bc0fcc05088a8c Author: Ohad Sharabi Date: Wed Nov 30 14:26:10 2022 +0200 habanalabs/gaudi2: wait for preboot ready if HW state is dirty Instead of waiting for BTM indication we should wait for preboot ready. Consider the below scenario: 1. FW update is being triggered - setting the dirty bit 2. hard reset will be triggered due to the dirty bit 3. FW initiates the reset: - dirty bit cleared - BTM indication cleared - preboot ready indication cleared 4. during hard reset: - BTM indication will be set - BIST test performed and another reset triggered 5. only after this reset the preboot will set the preboot ready When polling on BTM indication alone we can lose sync with FW while trying to communicate with FW that is during reset. To overcome this we will always wait to preboot ready indication. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 7df5319a239a50d3b2ac6d416cbe53a187d86b8d Author: Tomer Tayar Date: Sun Dec 4 23:23:47 2022 +0200 habanalabs: put fences in case of unexpected wait status Need to put fences even if an unexpected status value is received while waiting for a fence. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit dd7a82b52cc16c110269c608533ec1ee47d342fd Author: Tomer Tayar Date: Sun Dec 4 22:09:08 2022 +0200 habanalabs: fix handling of wait CS for interrupting signals The -ERESTARTSYS return value is not handled correctly when a signal is received while waiting for CS completion. This can lead to bad output values to user when waiting for a single CS completion, and more severe, it can cause a non-stopping loop when waiting to multi-CS completion and until a CS timeout. Fix the handling and exit the waiting if this return value is received. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 5f8ee3c98ed31b60bffdd332d38ff3a27b9f2609 Author: Ohad Sharabi Date: Thu Nov 10 13:43:02 2022 +0200 habanalabs: fix dmabuf to export only required size This patch fixes a bug that was found in the dmabuf flow. Bug description as found on Gaudi2 device: 1. User allocates 4MB of device memory - Note that although the allocation size was 4MB the HMMU allocated a full page of 768MB to back the request. - The user gets a memory handle that points to a single page (768MB) - Mapping the handle, the user gets virtual address to the start of the page. 2. User exports the buffer 3. User registers the exported buffer in the importer. This flow has a callback to the exporter which in turn converts the phys_page_pack to an SG list for the importer. This SG list is of single entry of size 768MB. However, the size that was passed to the importer was only 4MB. The solution for this is to make sure the importer gets exposure only to the exported size. This will be done by fixing the SG created by the exporter to be of the total size of the actual exported memory requested by the user. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit d70885800c4b87505171216796f91be94d9ed2cf Author: Ohad Sharabi Date: Mon Nov 14 12:16:37 2022 +0200 habanalabs: modify export dmabuf API A previous commit deprecated the option to export from handle, leaving the code with no support for devices with virtual memory. This commit modifies the export API in a way that unifies the uAPI to user address for both cases (i.e. with and without MMU support) and add the actual support for devices with virtual memory. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 54fde5505c1311d45a96d7ad8fb8809581d38f22 Author: Ohad Sharabi Date: Tue Nov 29 09:13:34 2022 +0200 habanalabs: helper function to validate export params Validate export parameters in a dedicated function instead of in the main export flow. This will be useful later when support to export dmabuf for devices with virtual memory will be added. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 303dad15ed8ccbb1702f3476642d8a43680f97b5 Author: Ohad Sharabi Date: Tue Nov 29 14:02:07 2022 +0200 habanalabs: remove support to export dmabuf from handle The API to the user which allows exporting DMA buffer from handle is deprecated here. It was never used as it is relevant only for Gaudi2, and the user stack has yet to add support for dmabuf in Gaudi2. Looking forward, a modified API to export DMA buffer for ASICs that supports virtual memory will be added. Until the new API will be ready- exporting DMA buffer will not be supported for ASICs with virtual memory. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 849591f675120bd0210aa5514dab36c424dbf650 Author: farah kassabri Date: Tue Nov 29 15:37:55 2022 +0200 habanalabs: set log level for descriptor validation to debug This warning doesn't have real consequences, and therefore can be printed in debug level. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 5ceb35035edbdbb64e2895ea4f87af3522b1e650 Author: Ohad Sharabi Date: Wed Nov 30 11:31:39 2022 +0200 habanalabs: trace COMMS protocol Call COMMS tracepoints from within the dynamic CPU FW load. This can help debug failures or delays in the dynamic FW load flow. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 811c74baede043905ffdc8283055fac801b9a6e5 Author: Ohad Sharabi Date: Wed Nov 30 11:16:51 2022 +0200 habanalabs: define traces for COMMS protocol As the COMMS protocol is being used more widely in our driver, an available debug tool for the handshake will be handy. This commit defines tracepoints to various key points of the COMMS protocol. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit b219d209ab38f20865ad992bc8e54dba761bca26 Author: Ofir Bitton Date: Wed Nov 30 14:35:32 2022 +0200 habanalabs/gaudi2: support abrupt device reset event In certain scenarios, firmware might encounter a fatal event for which a device reset is required. Hence, a proper notification is needed for driver to be aware and initiate a reset sequence. In secured environments the reset will be performed by firmware without an explicit request from the driver. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 086ab54ac00ca8c2614311a8acf9a3b19760eecc Author: Tomer Tayar Date: Wed Nov 30 12:07:06 2022 +0200 habanalabs: skip device idle check in hpriv_release if in reset When user context is released and hpriv_release() is called, there is a device idle status check, to understand if user has left the device not idle and then a reset is required. However, if the user process is killed because of device hard reset, the device at this point would always be not idle, because the device engines were already forcefully halted. Modify hpriv_release() to skip the idle check if reset is in progress. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 853413b234b002597df19f092892a1b1f52a2a47 Author: Tamir Gilad-Raz Date: Sun Nov 6 11:22:16 2022 +0200 habanalabs: adjacent timestamps should be more accurate timestamp events that expire on the same interrupt will get the same timestamp value Signed-off-by: Tamir Gilad-Raz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 35d8944480ab892a725ed4edae08a675c600b1de Author: Ofir Bitton Date: Wed Nov 16 17:27:26 2022 +0200 habanalabs/gaudi2: remove duplicated event prints In order to reduce error log, we try to minimize the dumped rows while keeping all relevant error info. In addition we completely remove clock throttling debug logs. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 8768c212f67df65d1edb5ee850c46b9291c06aa3 Author: Ofir Bitton Date: Wed Nov 23 11:03:17 2022 +0200 habanalabs/gaudi2: count interrupt causes During event handling we extract interrupt cause and count it. In case we could not find any cause we should add proper error. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 6d62d4402fec005f02f611510d096ee472b50ecb Author: Ohad Sharabi Date: Sun Nov 27 12:46:23 2022 +0200 habanalabs: update DRAM props according to preboot data If the f/w reports the binning masks at the preboot stage, the driver must align its DRAM properties according to the new information. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 8364fb3cdd03d8c3ee5c1074eba0028a6ea7acfd Author: Marco Pagani Date: Tue Nov 29 12:52:17 2022 +0100 habanalabs: fix double assignment in MMU V1 Removing double assignment of the hop2_pte_addr variable in dram_default_mapping_fini(). Dead store reported by clang-analyzer. Signed-off-by: Marco Pagani Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit cda6797b0018771cf240525b1b3d225d118e23fe Author: Ohad Sharabi Date: Sun Nov 27 12:38:49 2022 +0200 habanalabs: make set_dram_properties an ASIC function As ASICs are evolving, we will need to update the DRAM properties at various points because we may get different information from the f/w at different points of the initialization. This ASIC function is a foundation for this capability. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 39d15301f43eed211344e534ede8e4da7b2d018b Author: Tomer Tayar Date: Thu Nov 24 11:12:38 2022 +0200 habanalabs: use dev_dbg() when hl_mmap_mem_buf_get() fails As hl_mmap_mem_buf_get() is called also from IOCTLs which can have a bad handle from user, modify the print for "no match to handle" to use dev_dbg(). Calls to this function which are not dependent on user, already have an error print when the function fails. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 6003cb46e661e134e9e1f1449a6ea77d1e4ba6a9 Author: Tomer Tayar Date: Wed Nov 23 15:09:43 2022 +0200 habanalabs: don't allow user to destroy CB handle more than once The refcount of a CB buffer is initialized when user allocates a CB, and is decreased when he destroys the CB handle. If this refcount is increased also from kernel and user sends more than one destroy requests for the handle, the buffer will be released/freed and later be accessed when the refcount is put from kernel side. To avoid it, prevent user from destroying the handle more than once. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 6710444cfeb533f8c7817c7ec1adfb52206a6d00 Author: Ofir Bitton Date: Thu Nov 24 11:01:44 2022 +0200 habanalabs: don't notify user about clk throttling due to power As clock throttling due to high power consumption can happen very frequently and there is no real reason to notify the user about it, we skip this notification in all asics. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit ce259804d22f16eac8e6e4757b48fe4d98e76cc6 Author: Tomer Tayar Date: Tue Nov 8 14:34:43 2022 +0200 habanalabs: abort waiting user threads upon error User should close the FD when being notified about an error, after which a device reset takes place. However, if the user has pending threads that wait for completions, the device release won't be called and eventually the watchdog timeout will expire, leading to hard reset and killing the user process. To avoid it, abort such waiting threads right after the error notification, and block following waiting operations. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit cdacf3c0007e42feca23ad4021eaa2de5a589988 Author: Tomer Tayar Date: Sun Nov 6 20:29:18 2022 +0200 habanalabs: remove releasing of user threads from device release The device file is not in use when hl_device_release() is called, and there aren't any user threads that use IOCTLs to wait for interrupts. Therefore there is no need to release them at this point. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 089a19218df5640f4b45715de4a5cf6be122d21d Author: farah kassabri Date: Sun Nov 13 17:44:17 2022 +0200 habanalabs: read binning info from preboot Sometimes we need the binning info at a very early state of the driver initialization. Therefore, support was added in preboot to provide the binning info as part of the f/w descriptor and the driver can now use that. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 932fba60c98c22f207b424333481609b2ab42428 Author: tal albo Date: Wed Nov 16 22:54:24 2022 +0200 habanalabs/gaudi2: fix BMON 3rd address range Fix programming incorrect value of address range Signed-off-by: tal albo Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 30f6359c7b83769db3bc39e07d00c44aa99d0f9f Author: Krzysztof Kozlowski Date: Fri Jan 20 08:17:17 2023 +0100 dt-bindings: power: fsl,imx-gpc: document interrupt-controller The fsl,imx6q-gpc is used as interrupt controller (routing back to GIC): imx6sl-evk.dtb: gpc@20dc000: '#interrupt-cells', 'interrupt-controller' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 5f693adf41b81e9646dd65a5e077c0102cd7f90b Author: Krzysztof Kozlowski Date: Fri Jan 20 08:17:16 2023 +0100 dt-bindings: power: fsl,imx-gpc: correct compatibles fsl,imx6qp-gpc, fsl,imx6sl-gpc and fsl,imx6sx-gpc use generic fallback fsl,imx6q-gpc in the DTS, even though these are different devices. The common part (thus the fallback) is a interrupt controller routing back to GIC. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Shawn Guo commit cd6ba75227f96c9aacf7eace2b8ec1f22e955b55 Author: Krzysztof Kozlowski Date: Fri Jan 20 08:17:15 2023 +0100 dt-bindings: power: fsl,imx-gpc: document fsl,imx6ul-gpc compatible Document existing fsl,imx6ul-gpc compatible used with fsl,imx6q-gpc fallback: imx6sl-evk.dtb: gpc@20dc000: compatible: ['fsl,imx6sl-gpc', 'fsl,imx6q-gpc'] is too long Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 64a59c39e90d865aeed4b3f71f029fa4c06039b8 Author: Philippe Schenker Date: Wed Jan 18 11:52:51 2023 +0100 arm64: dts: imx8mp-verdin-dev: Do not include dahlia dtsi Follow the change that has been done on imx8mm-verdin-dev.dtsi and remove the include from dahlia to be consistent. Put back all nodes that previously had been included. Signed-off-by: Philippe Schenker Reviewed-by: Laurent Pinchart Signed-off-by: Shawn Guo commit 99d7ad964010b6f857e3a560fb0bd6d37a9d7214 Author: Philippe Schenker Date: Wed Jan 18 11:52:50 2023 +0100 arm64: dts: imx8mm-verdin-dev: Do not include dahlia dtsi Inheriting the dahlia devicetree leads to inheriting certain settings for the audio-codec that are not correct and hence the dt schema check failing. Remove that include and put all nodes back that had been included. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit a51e4faccae4e7a6311e735de146fa6ec9ca0590 Author: Marek Vasut Date: Wed Jan 18 04:07:57 2023 +0100 arm64: dts: imx8mp: Drop sd-vsel-gpios from i.MX8M Plus DHCOM SoM The VSELECT pin is configured as MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT and not as a GPIO, drop the bogus sd-vsel-gpios property as the eSDHC block handles the VSELECT pin on its own. Signed-off-by: Marek Vasut Reviewed-by: Frieder Schrempf Signed-off-by: Shawn Guo commit 7364fbba55f88e71e5a535d6ae90bd2c8c863a9e Author: Marek Vasut Date: Wed Jan 18 04:07:56 2023 +0100 arm64: dts: imx8mp: Drop sd-vsel-gpios from i.MX8M Plus Verdin SoM The VSELECT pin is configured as MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT and not as a GPIO, drop the bogus sd-vsel-gpios property as the eSDHC block handles the VSELECT pin on its own. Signed-off-by: Marek Vasut Reviewed-by: Frieder Schrempf Signed-off-by: Shawn Guo commit 8bad8c923f217d238ba4f1a6d19d761e53bfbd26 Author: Marek Vasut Date: Wed Jan 18 04:07:55 2023 +0100 arm64: dts: imx8mm: Drop sd-vsel-gpios from i.MX8M Mini Verdin SoM The VSELECT pin is configured as MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT and not as a GPIO, drop the bogus sd-vsel-gpios property as the eSDHC block handles the VSELECT pin on its own. Signed-off-by: Marek Vasut Reviewed-by: Frieder Schrempf Signed-off-by: Shawn Guo commit ab15670727832c0dcf8324dcb01f8bd6fecdbd89 Author: Marek Vasut Date: Tue Jan 17 23:39:42 2023 +0100 arm64: dts: imx8mp: Improve bluetooth UART on DH electronics i.MX8M Plus DHCOM Use PLL1_80M instead of PLL3 to drive UART2 clock divided down to 80 MHz instead of 64 MHz to obtain suitable block clock for exact 4 Mbdps, which is the maximum supported baud rate by the muRata 2AE BT UART. The difference here is that at 64 MHz UART block clock, the clock with are divided by 16 (due to oversampling) to 4 MHz and the baud rate generator then needs to be set to UBIR+1/UBMR+1 = 1/1 to yield 4 Mbdps . In case of 80 MHz UART block clock divided by 16 to 5 MHz, the baud rate generator needs to be set to UBIR+1/UBMR+1 = 4/5 to yield 4 Mbdps . Both options are valid and yield the same result, except using the PLL1_80M output requires fewer clock tree changes, since the PLL1 already generates the 80 MHz usable for UART, which frees the PLL3 for other uses. Suggested-by: Christoph Niedermaier Signed-off-by: Marek Vasut Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 25a5ccdce76753fc62c8668c53128791f2adfd8f Author: Adam Ford Date: Tue Jan 17 16:38:45 2023 -0600 arm64: dts: freescale: Introduce imx8mp-beacon-kit Beacon Embedded has an i.MX8M Plus development kit which consists of a SOM + baseboard. The SOM includes Bluetooth, WiFi, QSPI, eMMC, and one Ethernet PHY. The baseboard includes audio, HDMI, USB-C Dual Role port, USB Hub with five ports, a PCIe slot, and a second Ethernet PHY. Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 04b9df755e82557e38b02088ec0697e48ee94ad0 Author: Marco Felsch Date: Tue Jan 17 18:18:37 2023 +0100 arm64: dts: imx8mm-evk: use correct gpio-expander compatible Commit c871335217e7 ("arm64: dts: imx8mm-evk: Enable pca6416 on i2c3 bus") says that the assembled expander is a PCA6416 and not a TCA6416. No functional change since the driver handles both expanders the same way. Signed-off-by: Marco Felsch Signed-off-by: Shawn Guo commit 5d11fe56a6e826f2687f32848f8a8df8222cadc9 Author: Haibo Chen Date: Tue Jan 17 21:51:37 2023 +0800 arm64: dts: imx93: add ADC support Add ADC support for imx93-11x11-evk board. Signed-off-by: Haibo Chen Signed-off-by: Shawn Guo commit bae293e9e7a14cc5c6b6976865cec6ee41ed370d Author: Marek Vasut Date: Mon Jan 16 11:16:49 2023 +0100 arm64: dts: imx8mp: Reorder clock to match fsl,imx6q-pcie.yaml Reorder the PCIe clock in DT to match YAML DT schema. No functional change. Signed-off-by: Marek Vasut Reviewed-by: Richard Zhu Signed-off-by: Shawn Guo commit 1a9629f78a10af4f19e44e45f82a599f417f502c Author: Marek Vasut Date: Mon Jan 16 11:14:22 2023 +0100 arm64: dts: imx8mq: Deduplicate PCIe clock-names property Move the PCIe clock-names property from various DTs into SoC dtsi to reduce duplication. In case of a couple of boards, reorder the clock so they match the order in yaml DT bindings. Reviewed-by: Alexander Stein # imx8mq.dtsi, imx8mq-tqma8mq-mba8mx.dts Signed-off-by: Marek Vasut Reviewed-by: Richard Zhu Signed-off-by: Shawn Guo commit 3c033fb13925898a3fb692b4bdd071250133adda Author: Marek Vasut Date: Mon Jan 16 11:14:21 2023 +0100 arm64: dts: imx8mm: Deduplicate PCIe clock-names property Move the PCIe clock-names property from various DTs into SoC dtsi to reduce duplication. In case of a couple of boards, reorder the clock so they match the order in yaml DT bindings. Reviewed-by: Alexander Stein # imx8mm.dtsi, imx8mm-tqma8mqml-mba8mx.dts Signed-off-by: Marek Vasut Reviewed-by: Richard Zhu Signed-off-by: Shawn Guo commit f1193c5c09b1bb6e214c804c7dd1c7fb07046631 Author: Neil Armstrong Date: Wed Jan 25 09:18:39 2023 +0100 arm64: dts: meson-g12b-odroid: Add initial support for Hardkernel ODROID-N2L ODROID-N2L is a variant SBC in small form factor and some peripherals are removed from ODROID-N2PLUS based on S922X SoC. - On-board ethernet is removed - On-board RTC is removed - USB 3.0 hub is removed, so one USB 2.0 and one USB 3.0 host ports are available - Huge heatsink is replaced with 40x40mm heatsink, 5V active heatsink is recommended or a tall passive sink is optional - 3.5mm earjack is removed - IR remote receiver is removed - MIPI DSI port is added new but not yet supported Signed-off-by: Dongjin Kim Link: https://lore.kernel.org/r/20230122-topic-odroid-n2l-upstream-initial-v2-3-8d3fea6d403d@linaro.org Signed-off-by: Neil Armstrong commit 379ae64609c7a3301b60483eb65bd8bc78f76328 Author: Neil Armstrong Date: Wed Jan 25 09:18:38 2023 +0100 arm64: dts: meson-g12b: move common node into new odroid.dtsi In order to introduce Odroid-N2L which is basically an Odroid-N2+ without some on-board peripherals (Ethernet, RTC, Hub, Jack), move the common nodes into a new meson-g12b-odroid.dtsi which will will be the common dtsi for all the Odroid-N2 derived boards. Link: https://lore.kernel.org/r/20230122-topic-odroid-n2l-upstream-initial-v2-2-8d3fea6d403d@linaro.org Signed-off-by: Neil Armstrong commit 8280a4ea1d7dd1d635c1ecdb9375b156e83358b9 Author: Neil Armstrong Date: Wed Jan 25 09:18:37 2023 +0100 dt-bindings: arm: amlogic: document Odroid-N2L ODROID-N2L is a variant SBC in small form factor and some peripherals are removed from ODROID-N2PLUS based on S922X SoC. - On-board ethernet is removed - On-board RTC is removed - USB 3.0 hub is removed, so one USB 2.0 and one USB 3.0 host ports are available - Huge heatsink is replaced with 40x40mm heatsink, 5V active heatsink is recommended or a tall passive sink is optional - 3.5mm earjack is removed - IR remote receiver is removed - MIPI DSI port is added Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230122-topic-odroid-n2l-upstream-initial-v2-1-8d3fea6d403d@linaro.org Signed-off-by: Neil Armstrong commit 1d2f14117aa7773efff50f832b85fc7779e586e0 Author: Neil Armstrong Date: Tue Jan 24 12:39:08 2023 +0100 arm64: dts: amlogic: meson-sm1-odroid-hc4: fix active fan thermal trip Add an active trip tied to the on-board fan cooling device, which is better than describing it along the passive cooling maps. Fixes: 33b14f663df8 ("arm64: dts: meson: add initial device-tree for ODROID-HC4") Reported-by: Ricardo Pardini Link: https://lore.kernel.org/r/20230124-topic-odroid-hc4-upstream-fix-fan-trip-v1-1-b0c6aa355d93@linaro.org Tested-by: Ricardo Pardini [narmstrong: added Ricardo's tested-by from off-list chat] Signed-off-by: Neil Armstrong commit 7e01e14e9f75385910d1e42f97a5e98f36244967 Author: Christian Hewitt Date: Mon Jan 23 06:58:34 2023 +0000 arm64: dts: meson: add audio playback to S905X-P212 dts Add initial support for the HDMI and Analogue i2s audio outputs. Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230123065834.2670125-1-christianshewitt@gmail.com [narmstrong: removed useless status property in /sound] Signed-off-by: Neil Armstrong commit 3384645fb6cf31542650b89ecabe1fb04d0662fd Author: Christian Hewitt Date: Mon Jan 23 06:55:04 2023 +0000 arm64: dts: meson: remove WiFi/BT nodes from Khadas VIM1 The Broadcom WiFi/BT SDIO nodes are now inherited from the P212 common dtsi so we can remove them from the VIM1 board dts. Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230123065504.2669769-4-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit 81351d2f0b006302a72310c95203a767cf68631e Author: Christian Hewitt Date: Mon Jan 23 06:55:03 2023 +0000 arm64: dts: meson: move pwm_ef node in P212 dtsi Cosmetic-only change to alpha-sort the pwm_ef node. Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230123065504.2669769-3-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit ac714d0925b4fae6a2a8c03da743a91d559f2b5c Author: Christian Hewitt Date: Mon Jan 23 06:55:02 2023 +0000 arm64: dts: meson: add Broadcom WiFi to P212 dtsi The P212 has a combined WiFi/BT module. The BT side is already enabled in the dtsi but the WiFi side is not. Let's enable the WiFi module. Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230123065504.2669769-2-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit ce9999722656f2433af9029571bc2b99448dda74 Author: Neil Armstrong Date: Tue Jan 24 11:34:35 2023 +0100 arm64: dts: amlogic: meson-g12b-odroid-go-ultra: fix rk818 pmic properties Fixes: pmic@1c: '#clock-cells' is a required property pmic@1c: 'switch-supply' does not match any of the regexes: 'pinctrl-[0-9]+' The switch supply is described by vcc9-supply per bindings documentation. Link: https://lore.kernel.org/r/20230124-b4-amlogic-bindings-fixups-v1-14-44351528957e@linaro.org Signed-off-by: Neil Armstrong commit afdef3b188c934f79ad4b0a7bd8c692742f9b5af Author: Neil Armstrong Date: Tue Jan 24 11:34:34 2023 +0100 arm64: dts: amlogic: meson-gxbb-kii-pro: fix led node name Fixes: leds: status: {...} is not of type 'array' Link: https://lore.kernel.org/r/20230124-b4-amlogic-bindings-fixups-v1-13-44351528957e@linaro.org Signed-off-by: Neil Armstrong commit eee64d8fbbdaab72bbab3e462f3a7b742d20c8c2 Author: Neil Armstrong Date: Tue Jan 24 11:34:33 2023 +0100 arm64: dts: amlogic: meson-gxl-s905d-phicomm-n1: fix led node name Fixes: leds: status: {...} is not of type 'array' Link: https://lore.kernel.org/r/20230124-b4-amlogic-bindings-fixups-v1-12-44351528957e@linaro.org Signed-off-by: Neil Armstrong commit d519a73332b6c3d14e15f8fd20d7c6f29ed13d41 Author: Neil Armstrong Date: Tue Jan 24 11:34:32 2023 +0100 arm64: dts: amlogic: meson-sm1-bananapi-m5: fix adc keys node names Fixes: adc_keys: 'key' does not match any of the regexes: '^button-', 'pinctrl-[0-9]+' Also fix the invalid "adc_keys" node name. Link: https://lore.kernel.org/r/20230124-b4-amlogic-bindings-fixups-v1-11-44351528957e@linaro.org Signed-off-by: Neil Armstrong commit 6bb506ed36968207a8832f0143ebc127f0770eef Author: Neil Armstrong Date: Tue Jan 24 11:34:31 2023 +0100 arm64: dts: amlogic: meson-gx-libretech-pc: fix update button name Fixes: adc-keys: 'update-button' does not match any of the regexes: '^button-', 'pinctrl-[0-9]+' Link: https://lore.kernel.org/r/20230124-b4-amlogic-bindings-fixups-v1-10-44351528957e@linaro.org Signed-off-by: Neil Armstrong commit d19189f70ba596798ea49166d2d1ef36a8df5289 Author: Neil Armstrong Date: Tue Jan 24 11:34:30 2023 +0100 arm64: dts: amlogic: meson-gxl: add missing unit address to eth-phy-mux node name Fixes: bus@c8834000: eth-phy-mux: {...} should not be valid under {'type': 'object'} Link: https://lore.kernel.org/r/20230124-b4-amlogic-bindings-fixups-v1-9-44351528957e@linaro.org Signed-off-by: Neil Armstrong commit 956f52025c5dd92c80c12e31c99c854086a6fc55 Author: Neil Armstrong Date: Tue Jan 24 11:34:29 2023 +0100 arm64: dts: amlogic: meson-axg-jethome-jethub-j1xx: fix invalid rtc node name Fixes: pcf8563@51: $nodename:0: 'pcf8563@51' does not match '^rtc(@.*|-[0-9a-f])*$' Link: https://lore.kernel.org/r/20230124-b4-amlogic-bindings-fixups-v1-8-44351528957e@linaro.org Signed-off-by: Neil Armstrong commit 11172a97c092eaeb0a65c6434df0fc73f886a495 Author: Neil Armstrong Date: Tue Jan 24 11:34:28 2023 +0100 arm64: dts: amlogic: meson-gxl-s905w-jethome-jethub-j80: fix invalid rtc node name Fixes: pcf8563@51: $nodename:0: 'pcf8563@51' does not match '^rtc(@.*|-[0-9a-f])*$' Link: https://lore.kernel.org/r/20230124-b4-amlogic-bindings-fixups-v1-7-44351528957e@linaro.org Signed-off-by: Neil Armstrong commit 61ff70708b98a85516eccb3755084ac97b42cf48 Author: Neil Armstrong Date: Tue Jan 24 11:34:27 2023 +0100 arm64: dts: amlogic: meson-gx: add missing unit address to rng node name Fixes: bus@c8834000: rng: {...} should not be valid under {'type': 'object'} Link: https://lore.kernel.org/r/20230124-b4-amlogic-bindings-fixups-v1-6-44351528957e@linaro.org Signed-off-by: Neil Armstrong commit e3bd275ccbacf5eb18eaa311cea39f8bf8655feb Author: Neil Armstrong Date: Tue Jan 24 11:34:26 2023 +0100 arm64: dts: amlogic: meson-gxl-s905d-sml5442tw: drop invalid clock-names property Fixes: bluetooth: 'clock-names' does not match any of the regexes: 'pinctrl-[0-9]+' Link: https://lore.kernel.org/r/20230124-b4-amlogic-bindings-fixups-v1-5-44351528957e@linaro.org Signed-off-by: Neil Armstrong commit a69cb1042cea840bc7b60fea1c26a6b259e68bf2 Author: Neil Armstrong Date: Tue Jan 24 11:34:25 2023 +0100 arm64: dts: amlogic: meson-axg-jethome-jethub-j1xx: fix supply name of USB controller node Fixes: usb@ffe09080: 'phy-supply' does not match any of the regexes: '^usb@[0-9a-f]+$', 'pinctrl-[0-9]+' Link: https://lore.kernel.org/r/20230124-b4-amlogic-bindings-fixups-v1-4-44351528957e@linaro.org Signed-off-by: Neil Armstrong commit 2ff650051493d5bdb6dd09d4c2850bb37db6be31 Author: Neil Armstrong Date: Tue Jan 24 11:34:24 2023 +0100 arm64: dts: amlogic: meson-gx: add missing SCPI sensors compatible Fixes: scpi: sensors:compatible: 'oneOf' conditional failed, one must be fixed: ['amlogic,meson-gxbb-scpi-sensors'] is too short 'arm,scpi-sensors' was expected Link: https://lore.kernel.org/r/20230124-b4-amlogic-bindings-fixups-v1-3-44351528957e@linaro.org Signed-off-by: Neil Armstrong commit 5b7069d72f03c92a0ab919725017394ebce03a81 Author: Neil Armstrong Date: Tue Jan 24 11:34:23 2023 +0100 arm64: dts: amlogic: meson-axg: fix SCPI clock dvfs node name Fixes: scpi: clocks: 'clock-controller' does not match any of the regexes: '^clocks-[0-9a-f]+$', 'pinctrl-[0-9]+' Link: https://lore.kernel.org/r/20230124-b4-amlogic-bindings-fixups-v1-2-44351528957e@linaro.org Signed-off-by: Neil Armstrong commit 127f79212b07c5d9a6657a87e3eafdd889335814 Author: Neil Armstrong Date: Tue Jan 24 11:34:22 2023 +0100 arm64: dts: amlogic: meson-gx: fix SCPI clock dvfs node name Fixes: scpi: clocks: 'clock-controller' does not match any of the regexes: '^clocks-[0-9a-f]+$', 'pinctrl-[0-9]+' Link: https://lore.kernel.org/r/20230124-b4-amlogic-bindings-fixups-v1-1-44351528957e@linaro.org Signed-off-by: Neil Armstrong commit 175357d1deedfacba8770edc706c6d96c8a09b2b Author: chao zeng Date: Thu Jan 19 07:40:42 2023 +0100 arm64: dts: ti: iot2050: Add support for M.2 variant The M.2 variant comes with 2 slots, one B-keyed and another one E-keyed. They are configured by the firmware during startup. Also the device tree will be adjusted according to the detect or manually configured interface mode by the firmware. The kernel only carries a single configuration as base device tree. It has to be built with a symbols node so that the firmware can apply overlays for the connector modes. Signed-off-by: chao zeng [Jan: refactored to a single DT] Signed-off-by: Jan Kiszka Reviewed-by: Siddharth Vadapalli Link: https://lore.kernel.org/r/878e3a023767b5a6d9d2cff09015678aaba13fce.1674110442.git.jan.kiszka@siemens.com Signed-off-by: Vignesh Raghavendra commit 31170b8c028fe8bc60e9f4daed4eed3a2196de4b Author: Jan Kiszka Date: Thu Jan 19 07:40:41 2023 +0100 dt-bindings: arm: ti: Add binding for Siemens IOT2050 M.2 variant This new variant is derived from the Advanced PG2 board, replacing the MiniPCI slot with B and E-keyed M.2 slots. Signed-off-by: Jan Kiszka Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/e49b4451b6c85ba28bdbbe42b25d9eeecebbe2d7.1674110442.git.jan.kiszka@siemens.com Signed-off-by: Vignesh Raghavendra commit 12f0158f3e986d51fccf36300a53c1d764b32b38 Author: Jan Kiszka Date: Thu Jan 19 07:40:40 2023 +0100 arm64: dts: ti: iot2050: Add layout of OSPI flash Describe the layout of the OSPI flash as the latest firmware uses it. Specifically the location of the U-Boot envs is important for userspace in order to access it. Signed-off-by: Jan Kiszka Link: https://lore.kernel.org/r/d135b246bd302060175276d3653f2891077eb109.1674110442.git.jan.kiszka@siemens.com Signed-off-by: Vignesh Raghavendra commit 6ca80b9e5cc0120c37e2e7dd367b08e3e0eb8289 Author: Thomas Zimmermann Date: Wed Jan 25 21:04:15 2023 +0100 drm/fbdev-generic: Rename struct fb_info 'fbi' to 'info' The generic fbdev emulation names variables of type struct fb_info both 'fbi' and 'info'. The latter seems to be more common in fbdev code, so name fbi accordingly. Also replace the duplicate variable in drm_fbdev_fb_destroy(). Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230125200415.14123-11-tzimmermann@suse.de commit 7f5fe873968d49aeb9d805235acf57641a691b8f Author: Thomas Zimmermann Date: Wed Jan 25 21:04:14 2023 +0100 drm/fbdev-generic: Inline clean-up helpers into drm_fbdev_fb_destroy() The fbdev framebuffer cleanup in drm_fbdev_fb_destroy() calls drm_fbdev_release() and drm_fbdev_cleanup(). Inline both into the caller. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230125200415.14123-10-tzimmermann@suse.de commit 032116bbe152594f5528683c671a04259e6b4ed7 Author: Thomas Zimmermann Date: Wed Jan 25 21:04:13 2023 +0100 drm/fbdev-generic: Minimize client unregistering For uninitialized framebuffers, only release the DRM client and free the fbdev memory. Do not attempt to clean up the framebuffer. DRM fbdev clients have a two-step initialization: first create the DRM client; then create the framebuffer device on the first successful hotplug event. In cases where the client never creates the framebuffer, only the client state needs to be released. We can detect which case it is, full or client-only cleanup, by looking at the presence of fb_helper's info field. v3: * fix typo in commit message (Javier) * release client before unpreparing fbdev v2: * remove test for (fbi != NULL) in drm_fbdev_cleanup() (Sam) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230125200415.14123-9-tzimmermann@suse.de commit 643231b28380c9e9cba11675ef8f480016feaec3 Author: Thomas Zimmermann Date: Wed Jan 25 21:04:12 2023 +0100 drm/fbdev-generic: Minimize hotplug error handling Call drm_fb_helper_fini() in the generic-fbdev hotplug helper to revert the effects of drm_fb_helper_init(). No full cleanup is required. v3: * fix error in commit message (Javier) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230125200415.14123-8-tzimmermann@suse.de commit 6c80a93be62d398e1854d95069340b2e60f96166 Author: Thomas Zimmermann Date: Wed Jan 25 21:04:11 2023 +0100 drm/fb-helper: Initialize fb-helper's preferred BPP in prepare function Initialize the fb-helper's preferred_bpp field early from within drm_fb_helper_prepare(); instead of the later client hot-plugging callback. This simplifies the generic fbdev setup function. No real changes, but all drivers' fbdev code has to be adapted. v3: * build with CONFIG_DRM_FBDEV_EMULATION unset (kernel test bot) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230125200415.14123-7-tzimmermann@suse.de commit ec9361a1374f8f1ff23d5b6c217326648a8191de Author: Thomas Zimmermann Date: Wed Jan 25 21:04:10 2023 +0100 drm/fb-helper: Remove preferred_bpp parameter from fbdev internals Store the console's preferred BPP value in struct drm_fb_helper and remove the respective function parameters from the internal fbdev code. The BPP value is only required as a fallback and will now always be available in the fb-helper instance. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230125200415.14123-6-tzimmermann@suse.de commit f73ab51bfd3ac6b4d2b9d0bbbef3e0cc57a0f079 Author: Thomas Zimmermann Date: Wed Jan 25 21:04:09 2023 +0100 drm/fbdev-generic: Initialize fb-helper structure in generic setup Initialize the fb-helper structure immediately after its allocation in drm_fbdev_generic_setup(). That will make it easier to fill it with driver-specific values, such as the preferred BPP. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230125200415.14123-5-tzimmermann@suse.de commit 4825797c36da5537706a020567cb64933568d1eb Author: Thomas Zimmermann Date: Wed Jan 25 21:04:08 2023 +0100 drm/fb-helper: Introduce drm_fb_helper_unprepare() Move the fb-helper clean-up code into drm_fb_helper_unprepare(). No functional changes. v2: * declare as static inline (kernel test robot) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230125200415.14123-4-tzimmermann@suse.de commit 6a9d5ad3af65a1e7af97f25bbf83ce97bcfbab72 Author: Thomas Zimmermann Date: Wed Jan 25 21:04:07 2023 +0100 drm/client: Add hotplug_failed flag Signal failed hotplugging with a flag in struct drm_client_dev. If set, the client helpers will not further try to set up the fbdev display. This used to be signalled with a combination of cleared pointers in struct drm_fb_helper, which prevents us from initializing these pointers early after allocation. The change also harmonizes behavior among DRM clients. Additional DRM clients will now handle failed hotplugging like fbdev does. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230125200415.14123-3-tzimmermann@suse.de commit c2bb3be64eb7182285846123219230375af61abd Author: Thomas Zimmermann Date: Wed Jan 25 21:04:06 2023 +0100 drm/client: Test for connectors before sending hotplug event Test for connectors in the client code and remove a similar test from the generic fbdev emulation. Do nothing if the test fails. Not having connectors indicates a driver bug. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230125200415.14123-2-tzimmermann@suse.de commit 029d8028b406a7b0f5225bbfc51a0904955d1192 Author: Adam Ford Date: Tue Jan 17 16:38:44 2023 -0600 dt-bindings: arm: Add Beacon EmbeddedWorks i.MX8M Plus kit Add DT compatible string for a Beacon EmbeddedWorks development kit based on the i.MX8M Plus from NXP. Signed-off-by: Adam Ford Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 22c0db9f9534bbf7e612c5ffe28313a649822418 Author: Alexander Stein Date: Tue Jan 17 12:15:38 2023 +0100 ARM: dts: ls1021a: Disable CAN nodes by default These are peripherals with external signals, so disable them by default. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 3f17e16f385f57841ec1ff12726ab0c00a6ef7bb Merge: 6a7a2c18a9def ae5439658ccec Author: Jakub Kicinski Date: Wed Jan 25 22:45:02 2023 -0800 Merge branch 'add-ip_local_port_range-socket-option' Jakub Sitnicki says: ==================== Add IP_LOCAL_PORT_RANGE socket option This patch set is a follow up to the "How to share IPv4 addresses by partitioning the port space" talk given at LPC 2022 [1]. Please see patch #1 for the motivation & the use case description. Patch #2 adds tests exercising the new option in various scenarios. Documentation ------------- Proposed update to the ip(7) man-page: IP_LOCAL_PORT_RANGE (since Linux X.Y) Set or get the per-socket default local port range. This option can be used to clamp down the global local port range, defined by the ip_local_port_range /proc interface described below, for a given socket. The option takes an uint32_t value with the high 16 bits set to the upper range bound, and the low 16 bits set to the lower range bound. Range bounds are inclusive. The 16-bit values should be in host byte order. The lower bound has to be less than the upper bound when both bounds are not zero. Otherwise, setting the option fails with EINVAL. If either bound is outside of the global local port range, or is zero, then that bound has no effect. To reset the setting, pass zero as both the upper and the lower bound. Interaction with SELinux bind() hook ------------------------------------ SELinux bind() hook - selinux_socket_bind() - performs a permission check if the requested local port number lies outside of the netns ephemeral port range. The proposed socket option cannot be used change the ephemeral port range to extend beyond the per-netns port range, as set by net.ipv4.ip_local_port_range. Hence, there is no interaction with SELinux, AFAICT. RFC -> v1 RFC: https://lore.kernel.org/netdev/20220912225308.93659-1-jakub@cloudflare.com/ * Allow either the high bound or the low bound, or both, to be zero * Add getsockopt support * Add selftests Links: ------ [1]: https://lpc.events/event/16/contributions/1349/ ==================== Link: https://lore.kernel.org/r/20221221-sockopt-port-range-v6-0-be255cc0e51f@cloudflare.com Signed-off-by: Jakub Kicinski commit ae5439658ccec3dcef1754dcd2ea3d3529b3508d Author: Jakub Sitnicki Date: Tue Jan 24 14:36:44 2023 +0100 selftests/net: Cover the IP_LOCAL_PORT_RANGE socket option Exercise IP_LOCAL_PORT_RANGE socket option in various scenarios: 1. pass invalid values to setsockopt 2. pass a range outside of the per-netns port range 3. configure a single-port range 4. exhaust a configured multi-port range 5. check interaction with late-bind (IP_BIND_ADDRESS_NO_PORT) 6. set then get the per-socket port range Reviewed-by: Kuniyuki Iwashima Signed-off-by: Jakub Sitnicki Signed-off-by: Jakub Kicinski commit 91d0b78c5177f3e42a4d8738af8ac19c3a90d002 Author: Jakub Sitnicki Date: Tue Jan 24 14:36:43 2023 +0100 inet: Add IP_LOCAL_PORT_RANGE socket option Users who want to share a single public IP address for outgoing connections between several hosts traditionally reach for SNAT. However, SNAT requires state keeping on the node(s) performing the NAT. A stateless alternative exists, where a single IP address used for egress can be shared between several hosts by partitioning the available ephemeral port range. In such a setup: 1. Each host gets assigned a disjoint range of ephemeral ports. 2. Applications open connections from the host-assigned port range. 3. Return traffic gets routed to the host based on both, the destination IP and the destination port. An application which wants to open an outgoing connection (connect) from a given port range today can choose between two solutions: 1. Manually pick the source port by bind()'ing to it before connect()'ing the socket. This approach has a couple of downsides: a) Search for a free port has to be implemented in the user-space. If the chosen 4-tuple happens to be busy, the application needs to retry from a different local port number. Detecting if 4-tuple is busy can be either easy (TCP) or hard (UDP). In TCP case, the application simply has to check if connect() returned an error (EADDRNOTAVAIL). That is assuming that the local port sharing was enabled (REUSEADDR) by all the sockets. # Assume desired local port range is 60_000-60_511 s = socket(AF_INET, SOCK_STREAM) s.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1) s.bind(("192.0.2.1", 60_000)) s.connect(("1.1.1.1", 53)) # Fails only if 192.0.2.1:60000 -> 1.1.1.1:53 is busy # Application must retry with another local port In case of UDP, the network stack allows binding more than one socket to the same 4-tuple, when local port sharing is enabled (REUSEADDR). Hence detecting the conflict is much harder and involves querying sock_diag and toggling the REUSEADDR flag [1]. b) For TCP, bind()-ing to a port within the ephemeral port range means that no connecting sockets, that is those which leave it to the network stack to find a free local port at connect() time, can use the this port. IOW, the bind hash bucket tb->fastreuse will be 0 or 1, and the port will be skipped during the free port search at connect() time. 2. Isolate the app in a dedicated netns and use the use the per-netns ip_local_port_range sysctl to adjust the ephemeral port range bounds. The per-netns setting affects all sockets, so this approach can be used only if: - there is just one egress IP address, or - the desired egress port range is the same for all egress IP addresses used by the application. For TCP, this approach avoids the downsides of (1). Free port search and 4-tuple conflict detection is done by the network stack: system("sysctl -w net.ipv4.ip_local_port_range='60000 60511'") s = socket(AF_INET, SOCK_STREAM) s.setsockopt(SOL_IP, IP_BIND_ADDRESS_NO_PORT, 1) s.bind(("192.0.2.1", 0)) s.connect(("1.1.1.1", 53)) # Fails if all 4-tuples 192.0.2.1:60000-60511 -> 1.1.1.1:53 are busy For UDP this approach has limited applicability. Setting the IP_BIND_ADDRESS_NO_PORT socket option does not result in local source port being shared with other connected UDP sockets. Hence relying on the network stack to find a free source port, limits the number of outgoing UDP flows from a single IP address down to the number of available ephemeral ports. To put it another way, partitioning the ephemeral port range between hosts using the existing Linux networking API is cumbersome. To address this use case, add a new socket option at the SOL_IP level, named IP_LOCAL_PORT_RANGE. The new option can be used to clamp down the ephemeral port range for each socket individually. The option can be used only to narrow down the per-netns local port range. If the per-socket range lies outside of the per-netns range, the latter takes precedence. UAPI-wise, the low and high range bounds are passed to the kernel as a pair of u16 values in host byte order packed into a u32. This avoids pointer passing. PORT_LO = 40_000 PORT_HI = 40_511 s = socket(AF_INET, SOCK_STREAM) v = struct.pack("I", PORT_HI << 16 | PORT_LO) s.setsockopt(SOL_IP, IP_LOCAL_PORT_RANGE, v) s.bind(("127.0.0.1", 0)) s.getsockname() # Local address between ("127.0.0.1", 40_000) and ("127.0.0.1", 40_511), # if there is a free port. EADDRINUSE otherwise. [1] https://github.com/cloudflare/cloudflare-blog/blob/232b432c1d57/2022-02-connectx/connectx.py#L116 Reviewed-by: Marek Majkowski Reviewed-by: Kuniyuki Iwashima Signed-off-by: Jakub Sitnicki Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit 6a7a2c18a9defa922dbc096a8d71e7f74da10582 Author: Randy Dunlap Date: Tue Jan 24 10:17:24 2023 -0800 net: Kconfig: fix spellos Fix spelling in net/ Kconfig files. (reported by codespell) Signed-off-by: Randy Dunlap Cc: Pablo Neira Ayuso Cc: Jozsef Kadlecsik Cc: Florian Westphal Cc: coreteam@netfilter.org Cc: Jamal Hadi Salim Cc: Cong Wang Cc: Jiri Pirko Link: https://lore.kernel.org/r/20230124181724.18166-1-rdunlap@infradead.org Signed-off-by: Jakub Kicinski commit 1a1ce789e6c5da5a16d3d17bc228c6ab0b5863ed Author: Jagan Teki Date: Mon Dec 12 23:59:23 2022 +0530 drm: exynos: dsi: Restore proper bridge chain order Restore the proper bridge chain by finding the previous bridge in the chain instead of passing NULL. This establishes a proper bridge chain while attaching downstream bridges. Reviewed-by: Marek Vasut Signed-off-by: Marek Szyprowski Signed-off-by: Jagan Teki Reviewed-by: Frieder Schrempf Signed-off-by: Inki Dae commit 4aa5fc8dbb85e8e2c486ede4056ca3d4e757c50d Author: Marek Szyprowski Date: Mon Dec 12 23:59:22 2022 +0530 drm/bridge: tc358764: Enable pre_enable_prev_first flag Enable the drm bridge pre_enable_prev_first flag so that the previous bridge pre_enable should be called first before the pre_enable for the tc358764 bridge is called. This makes sure that the previous bridge should be initialized properly before the tc358764 bridge is powered up. Signed-off-by: Marek Szyprowski Signed-off-by: Jagan Teki Reviewed-by: Frieder Schrempf Signed-off-by: Inki Dae commit a91d0e7d00e97ed7acb82cf834c6e04cae0a27d8 Author: Jagan Teki Date: Mon Dec 12 23:59:21 2022 +0530 drm: panel: Enable prepare_prev_first flag for samsung-s6e panels Enable the drm panel prepare_prev_first flag so-that the previous controller should be prepared first before the prepare for the panel is called. samsung-s6e3ha2, samsung-s6e63j0x03 and samsung-s6e8aa0 are the effected samsung-s6e panels for this change. This makes sure that the previous controller, likely to be a DSI host controller should be initialized to LP-11 before the panel is powered up. Signed-off-by: Marek Szyprowski Signed-off-by: Jagan Teki Reviewed-by: Frieder Schrempf Signed-off-by: Inki Dae commit c9f9cf2560e40b62015c6c4a04be60f55ce5240e Author: Bastian Germann Date: Wed May 26 01:01:37 2021 +0200 builddeb: clean generated package content For each binary Debian package, a directory with the package name is created in the debian directory. Correct the generated file matches in the package's clean target, which were renamed without adjusting the target. Fixes: 1694e94e4f46 ("builddeb: match temporary directory name to the package name") Signed-off-by: Bastian Germann Signed-off-by: Masahiro Yamada commit a5e40d86317774ebc94307da395817902ef78252 Author: Sven Joachim Date: Thu Oct 29 16:39:10 2020 +0100 builddeb: Consolidate consecutive chmod calls into one No need to call chmod three times when it can do everything at once. Signed-off-by: Sven Joachim Signed-off-by: Masahiro Yamada commit ec61452aaad6bb0d4f3f4d4b78d27bed90eb2494 Author: Masahiro Yamada Date: Thu Jan 19 16:12:15 2023 +0900 scripts: remove bin2c Commit 80f8be7af03f ("tomoyo: Omit use of bin2c") removed the last use of bin2c. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Reviewed-by: Sedat Dilek commit 87c7ee67deb7fce9951a5f9d80641138694aad17 Author: Masahiro Yamada Date: Thu Jan 12 11:30:06 2023 +0900 scripts: handle BrokenPipeError for python scripts In the follow-up of commit fb3041d61f68 ("kbuild: fix SIGPIPE error message for AR=gcc-ar and AR=llvm-ar"), Kees Cook pointed out that tools should _not_ catch their own SIGPIPEs [1] [2]. Based on his feedback, LLVM was fixed [3]. However, Python's default behavior is to show noisy bracktrace when SIGPIPE is sent. So, scripts written in Python are basically in the same situation as the buggy llvm tools. Example: $ make -s allnoconfig $ make -s allmodconfig $ scripts/diffconfig .config.old .config | head -n1 -ALIX n Traceback (most recent call last): File "/home/masahiro/linux/scripts/diffconfig", line 132, in main() File "/home/masahiro/linux/scripts/diffconfig", line 130, in main print_config("+", config, None, b[config]) File "/home/masahiro/linux/scripts/diffconfig", line 64, in print_config print("+%s %s" % (config, new_value)) BrokenPipeError: [Errno 32] Broken pipe Python documentation [4] notes how to make scripts die immediately and silently: """ Piping output of your program to tools like head(1) will cause a SIGPIPE signal to be sent to your process when the receiver of its standard output closes early. This results in an exception like BrokenPipeError: [Errno 32] Broken pipe. To handle this case, wrap your entry point to catch this exception as follows: import os import sys def main(): try: # simulate large output (your code replaces this loop) for x in range(10000): print("y") # flush output here to force SIGPIPE to be triggered # while inside this try block. sys.stdout.flush() except BrokenPipeError: # Python flushes standard streams on exit; redirect remaining output # to devnull to avoid another BrokenPipeError at shutdown devnull = os.open(os.devnull, os.O_WRONLY) os.dup2(devnull, sys.stdout.fileno()) sys.exit(1) # Python exits with error code 1 on EPIPE if __name__ == '__main__': main() Do not set SIGPIPE’s disposition to SIG_DFL in order to avoid BrokenPipeError. Doing that would cause your program to exit unexpectedly whenever any socket connection is interrupted while your program is still writing to it. """ Currently, tools/perf/scripts/python/intel-pt-events.py seems to be the only script that fixes the issue that way. tools/perf/scripts/python/compaction-times.py uses another approach signal.signal(signal.SIGPIPE, signal.SIG_DFL) but the Python documentation clearly says "Don't do it". I cannot fix all Python scripts since there are so many. I fixed some in the scripts/ directory. [1]: https://lore.kernel.org/all/202211161056.1B9611A@keescook/ [2]: https://github.com/llvm/llvm-project/issues/59037 [3]: https://github.com/llvm/llvm-project/commit/4787efa38066adb51e2c049499d25b3610c0877b [4]: https://docs.python.org/3/library/signal.html#note-on-sigpipe Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers Reviewed-by: Nicolas Schier commit 8d9acfce33329d1f4b0f0969a9ba884bea7501c6 Author: Nathan Chancellor Date: Wed Jan 11 20:05:11 2023 -0700 kbuild: Stop using '-Qunused-arguments' with clang This option masks all unused command line argument warnings, which can hide potential issues, such as an architecture Makefile adding an unsupported flag to KBUILD_AFLAGS or KBUILD_CFLAGS, which will cause all as-option and cc-options to silently fail due to -Werror with no indication as to why in the main kernel build. Remove this flag so that warnings of this nature can be caught early and obviously in a build. Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Tested-by: Linux Kernel Functional Testing Tested-by: Anders Roxell Signed-off-by: Masahiro Yamada commit db1547c56886742283d7566c872f89cbad76a14c Author: Nathan Chancellor Date: Wed Jan 11 20:05:10 2023 -0700 kbuild: Turn a couple more of clang's unused option warnings into errors Currently, these warnings are hidden with -Qunused-arguments in KBUILD_CPPFLAGS. Once that option is removed, these warnings should be turned into hard errors to make unconditionally added but unsupported flags for the current compilation mode or target obvious due to a failed build; otherwise, the warnings might just be ignored if the build log is not checked. Link: https://github.com/ClangBuiltLinux/linux/issues/1587 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Tested-by: Linux Kernel Functional Testing Tested-by: Anders Roxell Signed-off-by: Masahiro Yamada commit 7db038d9790eda558dd6c1dde4cdd58b64789c47 Author: Nathan Chancellor Date: Wed Jan 11 20:05:09 2023 -0700 drm/amd/display: Do not add '-mhard-float' to dml_ccflags for clang When clang's -Qunused-arguments is dropped from KBUILD_CPPFLAGS, it warns: clang-16: error: argument unused during compilation: '-mhard-float' [-Werror,-Wunused-command-line-argument] Similar to commit 84edc2eff827 ("selftest/fpu: avoid clang warning"), just add this flag to GCC builds. Commit 0f0727d971f6 ("drm/amd/display: readd -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines") added '-msse2' to prevent clang from emitting software floating point routines. Signed-off-by: Nathan Chancellor Acked-by: Alex Deucher Tested-by: Linux Kernel Functional Testing Tested-by: Anders Roxell Signed-off-by: Masahiro Yamada commit 66bfe497d044a0dd4505e5179b3874b1a869c0b1 Author: Nathan Chancellor Date: Wed Jan 11 20:05:08 2023 -0700 s390/purgatory: Remove unused '-MD' and unnecessary '-c' flags When clang's -Qunused-arguments is dropped from KBUILD_CPPFLAGS, it warns while building objects in the purgatory folder: clang-16: error: argument unused during compilation: '-MD' [-Werror,-Wunused-command-line-argument] '-MMD' is always passed to the preprocessor via c_flags, even when KBUILD_CFLAGS is overridden in a folder, so clang complains the addition of '-MD' will be unused. Remove '-MD' to clear up this warning, as it is unnecessary with '-MMD'. Additionally, '-c' is also unnecessary, remove it while in the area. Signed-off-by: Nathan Chancellor Acked-by: Heiko Carstens Reviewed-by: Sven Schnelle Tested-by: Linux Kernel Functional Testing Tested-by: Anders Roxell Signed-off-by: Masahiro Yamada commit fd8589dce8107e2ce62e92f76089654462dd67b4 Author: Nathan Chancellor Date: Wed Jan 11 20:05:07 2023 -0700 s390/vdso: Drop '-shared' from KBUILD_CFLAGS_64 When clang's -Qunused-arguments is dropped from KBUILD_CPPFLAGS, it points out that there is a linking phase flag added to CFLAGS, which will only be used for compiling clang-16: error: argument unused during compilation: '-shared' [-Werror,-Wunused-command-line-argument] '-shared' is already present in ldflags-y so it can just be dropped. Fixes: 2b2a25845d53 ("s390/vdso: Use $(LD) instead of $(CC) to link vDSO") Signed-off-by: Nathan Chancellor Acked-by: Heiko Carstens Reviewed-by: Sven Schnelle Tested-by: Linux Kernel Functional Testing Tested-by: Anders Roxell Signed-off-by: Masahiro Yamada commit f8210229f1f3e187ed4c40191b0101a8504b2f80 Author: Nathan Chancellor Date: Wed Jan 11 20:05:06 2023 -0700 s390/vdso: Drop unused '-s' flag from KBUILD_AFLAGS_64 When clang's -Qunused-arguments is dropped from KBUILD_CPPFLAGS, it warns: clang-16: error: argument unused during compilation: '-s' [-Werror,-Wunused-command-line-argument] The compiler's '-s' flag is a linking option (it is passed along to the linker directly), which means it does nothing when the linker is not invoked by the compiler. The kernel builds all .o files with '-c', which stops the compilation pipeline before linking, so '-s' can be safely dropped from KBUILD_AFLAGS_64. Signed-off-by: Nathan Chancellor Acked-by: Heiko Carstens Reviewed-by: Sven Schnelle Tested-by: Linux Kernel Functional Testing Tested-by: Anders Roxell Signed-off-by: Masahiro Yamada commit 05e05bfc92d196669a3d087fc34d3998b6ddb758 Author: Nathan Chancellor Date: Wed Jan 11 20:05:05 2023 -0700 powerpc/vdso: Remove an unsupported flag from vgettimeofday-32.o with clang When clang's -Qunused-arguments is dropped from KBUILD_CPPFLAGS, it warns: clang-16: error: argument unused during compilation: '-fno-stack-clash-protection' [-Werror,-Wunused-command-line-argument] This warning happens because vgettimeofday-32.c gets its base CFLAGS from the main kernel, which may contain flags that are only supported on a 64-bit target but not a 32-bit one, which is the case here. -fstack-clash-protection and its negation are only suppported by the 64-bit powerpc target but that flag is included in an invocation for a 32-bit powerpc target, so clang points out that while the flag is one that it recognizes, it is not actually used by this compiler job. To eliminate the warning, remove -fno-stack-clash-protection from vgettimeofday-32.c's CFLAGS when using clang, as has been done for other flags previously. Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Tested-by: Linux Kernel Functional Testing Tested-by: Anders Roxell Signed-off-by: Masahiro Yamada commit f0a42fbab447ed9f55bbd99751183e71f3a1f6ec Author: Nathan Chancellor Date: Wed Jan 11 20:05:04 2023 -0700 powerpc/vdso: Improve linker flags When clang's -Qunused-arguments is dropped from KBUILD_CPPFLAGS, there are several warnings in the PowerPC vDSO: clang-16: error: -Wl,-soname=linux-vdso32.so.1: 'linker' input unused [-Werror,-Wunused-command-line-argument] clang-16: error: -Wl,--hash-style=both: 'linker' input unused [-Werror,-Wunused-command-line-argument] clang-16: error: argument unused during compilation: '-shared' [-Werror,-Wunused-command-line-argument] clang-16: error: argument unused during compilation: '-nostdinc' [-Werror,-Wunused-command-line-argument] clang-16: error: argument unused during compilation: '-Wa,-maltivec' [-Werror,-Wunused-command-line-argument] The first group of warnings point out that linker flags were being added to all invocations of $(CC), even though they will only be used during the final vDSO link. Move those flags to ldflags-y. The second group of warnings are compiler or assembler flags that will be unused during linking. Filter them out from KBUILD_CFLAGS so that they are not used during linking. Additionally, '-z noexecstack' was added directly to the ld_and_check rule in commit 1d53c0192b15 ("powerpc/vdso: link with -z noexecstack") but now that there is a common ldflags variable, it can be moved there. Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Tested-by: Linux Kernel Functional Testing Tested-by: Anders Roxell Signed-off-by: Masahiro Yamada commit 024734d132846dcb27f07deb1ec5be64d4cbfae9 Author: Nathan Chancellor Date: Wed Jan 11 20:05:03 2023 -0700 powerpc/vdso: Remove unused '-s' flag from ASFLAGS When clang's -Qunused-arguments is dropped from KBUILD_CPPFLAGS, it warns: clang-16: error: argument unused during compilation: '-s' [-Werror,-Wunused-command-line-argument] The compiler's '-s' flag is a linking option (it is passed along to the linker directly), which means it does nothing when the linker is not invoked by the compiler. The kernel builds all .o files with '-c', which stops the compilation pipeline before linking, so '-s' can be safely dropped from ASFLAGS. Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Reviewed-by: Segher Boessenkool Tested-by: Linux Kernel Functional Testing Tested-by: Anders Roxell Acked-by: Michael Ellerman Signed-off-by: Masahiro Yamada commit 31f48f16264bc70962fb3e7ec62da64d0a2ba04a Author: Nathan Chancellor Date: Wed Jan 11 20:05:02 2023 -0700 powerpc: Remove linker flag from KBUILD_AFLAGS When clang's -Qunused-arguments is dropped from KBUILD_CPPFLAGS, it points out that KBUILD_AFLAGS contains a linker flag, which will be unused: clang: error: -Wl,-a32: 'linker' input unused [-Werror,-Wunused-command-line-argument] This was likely supposed to be '-Wa,-a$(BITS)'. However, this change is unnecessary, as all supported versions of clang and gcc will pass '-a64' or '-a32' to GNU as based on the value of '-m'; the behavior of the latest stable release of the oldest supported major version of each compiler is shown below and each compiler's latest release exhibits the same behavior (GCC 12.2.0 and Clang 15.0.6). $ powerpc64-linux-gcc --version | head -1 powerpc64-linux-gcc (GCC) 5.5.0 $ powerpc64-linux-gcc -m64 -### -x assembler-with-cpp -c -o /dev/null /dev/null &| grep 'as ' .../as -a64 -mppc64 -many -mbig -o /dev/null /tmp/cctwuBzZ.s $ powerpc64-linux-gcc -m32 -### -x assembler-with-cpp -c -o /dev/null /dev/null &| grep 'as ' .../as -a32 -mppc -many -mbig -o /dev/null /tmp/ccaZP4mF.sg $ clang --version | head -1 Ubuntu clang version 11.1.0-++20211011094159+1fdec59bffc1-1~exp1~20211011214622.5 $ clang --target=powerpc64-linux-gnu -fno-integrated-as -m64 -### \ -x assembler-with-cpp -c -o /dev/null /dev/null &| grep gnu-as "/usr/bin/powerpc64-linux-gnu-as" "-a64" "-mppc64" "-many" "-o" "/dev/null" "/tmp/null-80267c.s" $ clang --target=powerpc64-linux-gnu -fno-integrated-as -m64 -### \ -x assembler-with-cpp -c -o /dev/null /dev/null &| grep gnu-as "/usr/bin/powerpc64-linux-gnu-as" "-a32" "-mppc" "-many" "-o" "/dev/null" "/tmp/null-ab8f8d.s" Remove this flag altogether to avoid future issues. Fixes: 1421dc6d4829 ("powerpc/kbuild: Use flags variables rather than overriding LD/CC/AS") Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Tested-by: Linux Kernel Functional Testing Tested-by: Anders Roxell Acked-by: Michael Ellerman Signed-off-by: Masahiro Yamada commit d5c8d6e0fa61401a729e9eb6a9c7077b2d3aebb0 Author: Nick Desaulniers Date: Wed Jan 11 20:05:01 2023 -0700 kbuild: Update assembler calls to use proper flags and language target as-instr uses KBUILD_AFLAGS, but as-option uses KBUILD_CFLAGS. This can cause as-option to fail unexpectedly when CONFIG_WERROR is set, because clang will emit -Werror,-Wunused-command-line-argument for various -m and -f flags in KBUILD_CFLAGS for assembler sources. Callers of as-option and as-instr should be adding flags to KBUILD_AFLAGS / aflags-y, not KBUILD_CFLAGS / cflags-y. Use KBUILD_AFLAGS in all macros to clear up the initial problem. Unfortunately, -Wunused-command-line-argument can still be triggered with clang by the presence of warning flags or macro definitions because '-x assembler' is used, instead of '-x assembler-with-cpp', which will consume these flags. Switch to '-x assembler-with-cpp' in places where '-x assembler' is used, as the compiler is always used as the driver for out of line assembler sources in the kernel. Finally, add -Werror to these macros so that they behave consistently whether or not CONFIG_WERROR is set. [nathan: Reworded and expanded on problems in commit message Use '-x assembler-with-cpp' in a couple more places] Link: https://github.com/ClangBuiltLinux/linux/issues/1699 Suggested-by: Masahiro Yamada Signed-off-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Tested-by: Linux Kernel Functional Testing Tested-by: Anders Roxell Signed-off-by: Masahiro Yamada commit 337ff6bb8960fdc128cabd264aaea3d42ca27a32 Author: Nathan Chancellor Date: Wed Jan 11 20:05:00 2023 -0700 MIPS: Prefer cc-option for additions to cflags A future change will switch as-option to use KBUILD_AFLAGS instead of KBUILD_CFLAGS to allow clang to drop -Qunused-arguments, which may cause issues if the flag being tested requires a flag previously added to KBUILD_CFLAGS but not KBUILD_AFLAGS. Use cc-option for cflags additions so that the flags are tested properly. Signed-off-by: Nathan Chancellor Acked-by: Thomas Bogendoerfer Reviewed-by: Nick Desaulniers Reviewed-by: Philippe Mathieu-Daudé Tested-by: Linux Kernel Functional Testing Tested-by: Anders Roxell Signed-off-by: Masahiro Yamada commit 80a20d2f8288afcd6036bbab8717061806ace4f2 Author: Nathan Chancellor Date: Wed Jan 11 20:04:59 2023 -0700 MIPS: Always use -Wa,-msoft-float and eliminate GAS_HAS_SET_HARDFLOAT -Wa,-msoft-float is tested with as-option, which will be a problem for clang with an upcoming change to move as-option to use KBUILD_AFLAGS instead of KBUILD_CFLAGS due to a lack of '-mno-abicalls' in KBUILD_AFLAGS at the point that this check occurs; $(cflags-y) is added to KBUILD_AFLAGS towards the end of this file. clang: error: ignoring '-fno-PIE' option as it cannot be used with implicit usage of -mabicalls and the N64 ABI [-Werror,-Woption-ignored] This could be resolved by switching to a cc-option check but '$(cflags-y)' would need to be added so that '-mno-abicalls' is present for the test. However, this check is no longer necessary, as -msoft-float is supported by all supported assembler versions (GNU as 2.25+ and LLVM 11+). Eliminate GAS_HAS_SET_HARDFLOAT and all of its uses, inlining SET_HARDFLOAT where necessary. Link: https://lore.kernel.org/202209101939.bvk64Fok-lkp@intel.com/ Reported-by: kernel test robot Signed-off-by: Nathan Chancellor Acked-by: Thomas Bogendoerfer Reviewed-by: Nick Desaulniers Reviewed-by: Philippe Mathieu-Daudé Tested-by: Linux Kernel Functional Testing Tested-by: Anders Roxell Signed-off-by: Masahiro Yamada commit 994f5f7816ff963f49269cfc97f63cb2e4edb84f Author: Nick Desaulniers Date: Wed Jan 11 20:04:58 2023 -0700 x86/boot/compressed: prefer cc-option for CFLAGS additions as-option tests new options using KBUILD_CFLAGS, which causes problems when using as-option to update KBUILD_AFLAGS because many compiler options are not valid assembler options. This will be fixed in a follow up patch. Before doing so, move the assembler test for -Wa,-mrelax-relocations=no from using as-option to cc-option. Link: https://lore.kernel.org/llvm/CAK7LNATcHt7GcXZ=jMszyH=+M_LC9Qr6yeAGRCBbE6xriLxtUQ@mail.gmail.com/ Suggested-by: Masahiro Yamada Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Tested-by: Linux Kernel Functional Testing Tested-by: Anders Roxell Signed-off-by: Masahiro Yamada commit 0b9a0789e9b8fec59e7465a004e1d26ec495d000 Merge: 8966a72c1964f 047ebaffd8171 Author: Mark Brown Date: Thu Jan 26 00:27:35 2023 +0000 regulator: Add Maxim MAX20411 support Merge series from Bjorn Andersson : Introduce binding and driver for the Maxim MAX20411, and wire these up on the Qualcomm SA8295P ADP. commit 7e5f78c7de3247b3e25f35557530bcf0593014cd Author: Marcel Ziswiler Date: Mon Jan 9 14:20:01 2023 +0100 arm64: dts: verdin-imx8mp: unify gpio-key node name Any other of our modules calls it key-wakeup rather than button-wakeup so let us stick to that. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo commit 6e19c001b15c01432e039f1bc70672ca3c7ce938 Author: Marcel Ziswiler Date: Mon Jan 9 14:20:00 2023 +0100 ARM: dts: apalis/colibri-imx6/6ull/7: proper gpio-key node names The node names should be generic and DT schema expects certain pattern (e.g. starting with key/button/switch). Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo commit 800a4ea17eb86b1f2cfad9fd7a252a3803bc5264 Author: Marcel Ziswiler Date: Mon Jan 9 14:19:59 2023 +0100 ARM: dts: colibri-imx6ull: improve wake-up with gpio key The pin GPIO5_IO01 externally pulls down, it is required to sequentially connect this pin (signal WAKE_MICO#) to +3v3 and then disconnect it to trigger a wakeup interrupt. Adding the flag GPIO_PULL_DOWN allows the system to be woken up just connecting the pin GPIO5_IO01 to +3v3. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo commit 752ddcd291f30f71de747ce25c4ffe843ec6a380 Author: Marcel Ziswiler Date: Mon Jan 9 14:19:58 2023 +0100 ARM: dts: colibri-imx6: improve wake-up with gpio key The pin GPIO2_IO22 externally pulls down, it is required to sequentially connect this pin (signal WAKE_MICO#) to +3v3 and then disconnect it to trigger a wakeup interrupt. Adding the flag GPIO_PULL_DOWN allows the system to be woken up just connecting the pin GPIO2_IO22 to +3v3. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo commit 9a1bee3fb7e2669eb321b600f3ca57f4f792fd38 Author: Andreas Kemnade Date: Sat Jan 7 13:36:21 2023 +0100 ARM: dts: imx: e70k02: Add touchscreen Add the touchscreen now, since the driver is available. Signed-off-by: Andreas Kemnade Signed-off-by: Shawn Guo commit 06f985d227d079d77426e484c091330209859518 Author: Mark Brown Date: Fri Jan 6 23:12:33 2023 +0000 ARM: imx_v6_v7_defconfig: Don't enable PROVE_LOCKING For some reason that is unclear to me the i.MX defconfig for v6 and v7 boards enables PROVE_LOCKING. Since the defconfigs are generally intended to be more production style configurations this doesn't seem particularly intentional so drop this from the defconfig. Signed-off-by: Mark Brown Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit b203e6f1e8336659878b6b604abd2a5fda0d8767 Author: Michael Walle Date: Thu Jan 5 16:22:30 2023 +0100 arm64: dts: ls1028a: sl28: get MAC addresses from VPD Now that it is finally possible to get the MAC addresses from the OTP memory, use it to set the addresses of the network devices. There are 8 reserved MAC addresses in total per board. Distribute them as follows: +----------+------+------+------+------+------+ | | var1 | var2 | var3 | var4 | kbox | +----------+------+------+------+------+------+ | enetc #0 | +0 | | | +0 | +0 | | enetc #1 | | | +0 | +1 | +1 | | enetc #2 | | +2 | | | +2 | | enetc #3 | | +3 | | | +3 | | felix p0 | | +0 | | | +4 | | felix p1 | | +1 | | | +5 | | felix p2 | | | | | +6 | | felix p3 | | | | | +7 | | felix p4 | | | | | | | felix p5 | | | | | | +----------+------+------+------+------+------+ An empty cell means, the port is not available and thus doesn't need an ethernet address. Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit 5bd9ffed9e66a27f5b00f5f878f4cef0b981082c Author: Marek Vasut Date: Thu Jan 5 15:41:45 2023 +0100 ARM: dts: vfxxx: Swap SAI DMA order Swap the SAI dmas and dma-names to match the order documented in Documentation/devicetree/bindings/sound/fsl,sai.yaml No functional change. Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit ebeb49f43c8952f12aa20f03f00d7009edc2d1c5 Author: Angus Chen Date: Thu Jan 5 14:11:23 2023 +0800 ARM: imx: Call ida_simple_remove() for ida_simple_get The function call ida_simple_get maybe fail,we should deal with it. And if ida_simple_get success ,it need to call ida_simple_remove also. BTW,devm_kasprintf can handle id is zero for consistency. Fixes: e76bdfd7403a ("ARM: imx: Added perf functionality to mmdc driver") Signed-off-by: Angus Chen Signed-off-by: Shawn Guo commit 947e8876c0426971c34c422569c29ec02d711bb3 Author: Hugo Villeneuve Date: Tue Dec 20 10:22:37 2022 -0500 dt-bindings: rtc: pcf2127: remove pca/pcf2129 from trivial RTC devices list pca/pcf2129 devices can also have the 'reset-source' property, so remove them from the trivial RTC devices list. Signed-off-by: Hugo Villeneuve Reviewed-by: Bruno Thomsen Reviewed-by: Rob Herring Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221220152237.1125178-1-hugo@hugovil.com Signed-off-by: Alexandre Belloni commit 172738bbccdb4ef76bdd72fc72a315c741c39161 Author: Dan Williams Date: Wed Jan 25 15:32:57 2023 -0800 cxl/port: Link the 'parent_dport' in portX/ and endpointX/ sysfs Similar to the justification in: 1b58b4cac6fc ("cxl/port: Record parent dport when adding ports") ...userspace wants to know the routing information for ports for calculating the memdev order for region creation among other things. Cache the information the kernel discovers at enumeration time in a 'parent_dport' attribute to save userspace the time of trawling sysfs to recover the same information. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/167124082375.1626103.6047000000121298560.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit af3ea9ab61d728d5a8be01bbec6d5cf7551b9600 Author: Dan Williams Date: Fri Dec 16 17:33:38 2022 -0800 cxl/region: Clarify when a cxld->commit() callback is mandatory Both cxl_switch_decoders() and cxl_endpoint_decoders() are considered by cxl_region_decode_commit(). Flag cases where cxl_switch_decoders with multiple targets, or cxl_endpoint_decoders do not have a commit callback set. The switch case is unlikely to happen since switches are only enumerated by the CXL core, but the endpoint case may support decoders defined by drivers outside of drivers/cxl, like accerator drivers. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/167124081824.1626103.1555704405392757219.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 0164776a2ce782a342b66b7980055e96efff746c Merge: a5f6b9d577eba d1246f9360231 Author: Martin KaFai Lau Date: Wed Jan 25 14:49:12 2023 -0800 Merge branch 'Enable bpf_setsockopt() on ktls enabled sockets.' Kui-Feng Lee says: ==================== This patchset implements a change to bpf_setsockopt() which allows ktls enabled sockets to be used with the SOL_TCP level. This is necessary as when ktls is enabled, it changes the function pointer of setsockopt of the socket, which bpf_setsockopt() checks in order to make sure that the socket is a TCP socket. Checking sk_protocol instead of the function pointer will ensure that bpf_setsockopt() with the SOL_TCP level still works on sockets with ktls enabled. The major differences form v2 are: - Add a read() call to make sure that the FIN has arrived. - Remove the dependency on other test's header. The major differences from v1 are: - Test with a IPv6 connect as well. - Use ASSERT_OK() v2: https://lore.kernel.org/bpf/20230124181220.2871611-1-kuifeng@meta.com/ v1: https://lore.kernel.org/bpf/20230121025716.3039933-1-kuifeng@meta.com/ ==================== Signed-off-by: Martin KaFai Lau commit d1246f93602316e2dda1000f185e8d13dd611871 Author: Kui-Feng Lee Date: Wed Jan 25 12:16:08 2023 -0800 selftests/bpf: Calls bpf_setsockopt() on a ktls enabled socket. Ensures that whenever bpf_setsockopt() is called with the SOL_TCP option on a ktls enabled socket, the call will be accepted by the system. The provided test makes sure of this by performing an examination when the server side socket is in the CLOSE_WAIT state. At this stage, ktls is still enabled on the server socket and can be used to test if bpf_setsockopt() works correctly with linux. Signed-off-by: Kui-Feng Lee Link: https://lore.kernel.org/r/20230125201608.908230-3-kuifeng@meta.com Signed-off-by: Martin KaFai Lau commit 2ab42c7b871f4e85f21e1a85dfa3f87e4d31221d Author: Kui-Feng Lee Date: Wed Jan 25 12:16:07 2023 -0800 bpf: Check the protocol of a sock to agree the calls to bpf_setsockopt(). Resolve an issue when calling sol_tcp_sockopt() on a socket with ktls enabled. Prior to this patch, sol_tcp_sockopt() would only allow calls if the function pointer of setsockopt of the socket was set to tcp_setsockopt(). However, any socket with ktls enabled would have its function pointer set to tls_setsockopt(). To resolve this issue, the patch adds a check of the protocol of the linux socket and allows bpf_setsockopt() to be called if ktls is initialized on the linux socket. This ensures that calls to sol_tcp_sockopt() will succeed on sockets with ktls enabled. Signed-off-by: Kui-Feng Lee Link: https://lore.kernel.org/r/20230125201608.908230-2-kuifeng@meta.com Signed-off-by: Martin KaFai Lau commit 80b3303221a0a3d3731076e1c52e93f69c657d3b Author: Linus Walleij Date: Mon Mar 14 00:03:54 2022 +0100 ARM: dts: ux500: Add clkout-clock node This adds the DTS node and picks up the include file from the bindings required to obtain externally routed CLKOUT1 and CLKOUT2 clocks. Cc: Ulf Hansson Signed-off-by: Linus Walleij commit f72ef0cfda421971d03dc43a82c68ea7d5115fb9 Author: Krzysztof Kozlowski Date: Fri Nov 25 15:41:14 2022 +0100 ARM: dts: ste: align LED node names with dtschema The node names should be generic and DT schema expects certain pattern. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221125144114.476849-1-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit fbed4fea6422a237382bf317db88a37993955f3b Author: Christophe JAILLET Date: Tue Nov 1 22:14:06 2022 +0100 module: Use kstrtobool() instead of strtobool() strtobool() is the same as kstrtobool(). However, the latter is more used within the kernel. In order to remove strtobool() and slightly simplify kstrtox.h, switch to the other function name. While at it, include the corresponding header file () Signed-off-by: Christophe JAILLET Reviewed-by: Luis Chamberlain Reviewed-by: Aaron Tomlin Signed-off-by: Luis Chamberlain commit def7b92efd868a6c78da86770704c1a03506016e Author: Christophe JAILLET Date: Sat Jan 14 10:08:13 2023 +0100 kernel/params.c: Use kstrtobool() instead of strtobool() strtobool() is the same as kstrtobool(). However, the latter is more used within the kernel. In order to remove strtobool() and slightly simplify kstrtox.h, switch to the other function name. While at it, include the corresponding header file () Signed-off-by: Christophe JAILLET Reviewed-by: Miroslav Benes Signed-off-by: Luis Chamberlain commit c093a74dac1c008daee92d6d613e9e3fe20b6585 Author: Randy Dunlap Date: Mon Jan 2 13:16:05 2023 -0800 test_kmod: stop kernel-doc warnings Use kernel-doc notation to prevent warnings: lib/test_kmod.c:58: warning: contents before sections lib/test_kmod.c:94: warning: cannot understand function prototype: 'struct kmod_test_device_info ' lib/test_kmod.c:119: warning: cannot understand function prototype: 'struct kmod_test_device ' Signed-off-by: Randy Dunlap Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Signed-off-by: Luis Chamberlain commit b74d7bb7ca2412ab37bab782591573b5f265872b Author: Luis Chamberlain Date: Wed Dec 14 15:17:18 2022 -0800 kbuild: Modify default INSTALL_MOD_DIR from extra to updates The default INSTALL_MOD_DIR of using the /lib/modules/$(uname -r)/extra directory for external modules assumes distributions will have something like /etc/depmod.d/dist.conf with: search updates extra built-in However, only some Red Hat releases have and use the "extra" stuff for years now. Meanwhile, the depmod.c tool in kmod has *forever* used the "updates" directory as part of the search path by default *if* your distribution does not have any depmod.d configuration. If you compile and install an external module today, even upstream kernel mock drivers (tools/testing/cxl) the modules_install target will pick up the new drivers but will not allow override of drivers from updates to override built-in ones. Since module-init-tools was deprecated over 11 years ago and now kmod has since its inception used the "updates" directory as part of its default search path to allow overrides, and since the "extra" stuff was in practice only used by Red Hat stuff, use the more distro agnostic override path "updates" to allow external modules to also override proper production kernel modules. This would allow mocking drivers tools to not have to muck with depmod.d config files or assume that your distro will have extra on a configuration file over built-in. With today's default you end up actually *crashing* Linux when trying to load cxl_test with the default "extra" [0] directory being used. This fixes that and allows other mocking drivers to do less work. [0] https://lkml.kernel.org/r/20221209062919.1096779-1-mcgrof@kernel.org Signed-off-by: Luis Chamberlain Acked-by: Dan Williams Acked-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit da2b1a0a40d8ea8f23f9d13e10ec3160ef92178d Author: Deepak R Varma Date: Wed Jan 25 20:37:14 2023 +0530 drm/nouveau/devinit: Convert function disable() to be void The current design of callback function disable() of struct nvkm_devinit_func is defined to return a u64 value. In its implementation in the driver modules, the function always returns a fixed value 0. Hence the design and implementation of this function should be enhanced to return void instead of a fixed value. This change also eliminates untouched return variables. The change is identified using the returnvar.cocci Coccinelle semantic patch script. Signed-off-by: Deepak R Varma Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/Y9FFoooIXjlr+UP1@ubun2204.myguest.virtualbox.org commit f45d63c1218636f77b9c3c53318c56ecd27dc8ec Author: Luis Chamberlain Date: Mon Dec 19 11:50:50 2022 -0800 tools/testing/cxl: require 64-bit size_t is limited to 32-bits and so the gen_pool_alloc() using the size of SZ_64G would map to 0, triggering a low allocation which is not expected. Force the dependency on 64-bit for cxl_test as that is what it was designed for. This issue was found by build test reports when converting this driver as a proper upstream driver. Signed-off-by: Luis Chamberlain Link: https://lore.kernel.org/r/20221219195050.325959-1-mcgrof@kernel.org Signed-off-by: Dan Williams commit 245edf445c3421584f541307cd7a8cd847c3d8d7 Author: Eric Biggers Date: Wed Jan 25 12:28:37 2023 -0800 fsverity.rst: update git repo URL for fsverity-utils The fsverity-utils git repo is moving out of my personal directory; see the announcement at https://lore.kernel.org/r/Y9GKm+hcm70myZkr@sol.localdomain. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20230125203025.28187-1-ebiggers@kernel.org commit 2c3aa5b1f20a90f1dc254be5542e33a5758c55cd Author: Krzysztof Kozlowski Date: Thu Jan 19 14:00:27 2023 +0100 dt-bindings: clock: qcom,sm8450-camcc: constrain required-opps Be specific how many required-opps are allowed. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230119130028.106817-1-krzysztof.kozlowski@linaro.org Acked-by: Rob Herring Signed-off-by: Stephen Boyd commit 8d71c78e1aeec37eca4f0a4c190fd3e9548721de Merge: 0c8fb24694382 68de345e101ce Author: Thomas Zimmermann Date: Wed Jan 25 21:12:51 2023 +0100 Merge drm/drm-next into drm-misc-next Backmerging to sync with other DRM trees. Signed-off-by: Thomas Zimmermann commit 2213d44e140f979f4b60c3c0f8dd56d151cc8692 Author: Heiko Carstens Date: Mon Jan 23 14:30:46 2023 +0100 s390/syscalls: get rid of system call alias functions bpftrace and friends only consider functions present in /sys/kernel/tracing/available_filter_functions. For system calls there is the s390 specific problem that the system call function itself is present via __se_sys##name() while the system call itself is wired up via an __s390x_sys##name() alias. The required DWARF debug information however is only available for the original function, not the alias, but within available_filter_functions only the functions with __s390x_ prefix are available. Which means the required DWARF debug information cannot be found. While this could be solved via tooling, it is easier to change the s390 specific system call wrapper handling. Therefore get rid of this alias handling and implement system call wrappers like most other architectures are doing. In result the implementation generates the following functions: long __s390x_sys##name(struct pt_regs *regs) static inline long __se_sys##name(...) static inline long __do_sys##name(...) __s390x_sys##name() is the visible system call function which is also wired up in the system call table. Its only parameter is a pt_regs variable. This function calls the corresponding __se_sys##name() function, which has as many parameters like the system call definition. This function in turn performs all zero and sign extensions of all system call parameters, taken from the pt_regs structure, and finally calls __do_sys##name(). __do_sys##name() is the actual inlined system call function implementation. For all 64 bit system calls there is a 31/32 bit system call function __s390_sys##name() generated, which handles all system call parameters correctly as required by compat handling. This function may be wired up within the compat system call table, unless there exists an explicit compat system call function, which is then used instead. Reported-by: Ilya Leoshkevich Tested-by: Ilya Leoshkevich Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens commit 0efc5d58bd28260b42d934e95092e26bdf2a4724 Author: Heiko Carstens Date: Mon Jan 23 14:30:45 2023 +0100 s390/syscalls: remove trailing semicolon Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens commit 2e4532d4ac0e9675769258a85030b3ec89708af2 Author: Heiko Carstens Date: Mon Jan 23 14:30:44 2023 +0100 s390/syscalls: move __S390_SYS_STUBx() macro Move __S390_SYS_STUBx() the end of the CONFIG_COMPAT section, so both variants (compat and non-compat) are close together and can be easily compared. Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens commit 82c1b3e7e5ff4df9b151a61910a244746a631910 Author: Heiko Carstens Date: Mon Jan 23 14:30:43 2023 +0100 s390/syscalls: remove __SC_COMPAT_TYPE define Remove __SC_COMPAT_TYPE define which is an unused leftover. Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens commit 7be215ba35dbeecdcb502f15686b1430184df43a Author: Heiko Carstens Date: Mon Jan 23 14:30:42 2023 +0100 s390/syscalls: remove SYSCALL_METADATA() from compat syscalls SYSCALL_METADATA() is only supposed to be used for non-compat system calls. Otherwise there would be a name clash. This also removes the inconsistency that s390 is the only architecture which uses SYSCALL_METADATA() for compat system calls, and even that only for compat system calls without parameters. Only two such compat system calls exist. Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens commit e9c9cb90e76ffaabcc7ca8f275d9e82195fd6367 Author: Ilya Leoshkevich Date: Mon Jan 23 22:50:32 2023 +0100 s390: discard .interp section When debugging vmlinux with QEMU + GDB, the following GDB error may occur: (gdb) c Continuing. Warning: Cannot insert breakpoint -1. Cannot access memory at address 0xffffffffffff95c0 Command aborted. (gdb) The reason is that, when .interp section is present, GDB tries to locate the file specified in it in memory and put a number of breakpoints there (see enable_break() function in gdb/solib-svr4.c). Sometimes GDB finds a bogus location that matches its heuristics, fails to set a breakpoint and stops. This makes further debugging impossible. The .interp section contains misleading information anyway (vmlinux does not need ld.so), so fix by discarding it. Signed-off-by: Ilya Leoshkevich Cc: Signed-off-by: Heiko Carstens commit 0d5f0dc83073cd36d1e92bbcbcc3bc046918bc69 Author: Thomas Richter Date: Tue Jan 24 12:20:55 2023 +0100 s390/cpum_cf: simplify PMC_INIT and PMC_RELEASE usage Simplify the use of constants PMC_INIT and PMC_RELEASE. Suggested-by: Heiko Carstens Signed-off-by: Thomas Richter Signed-off-by: Heiko Carstens commit 1e99c242acb2fc211aa9f57cd1060622e66bbf63 Author: Thomas Richter Date: Tue Jan 24 12:20:54 2023 +0100 s390/cpum_cf: merge source files for CPU Measurement counter facility With no in-kernel user, the source files can be merged. Move all functions and the variable definitions to file perf_cpum_cf.c This file now contains all the necessary functions and definitions for the CPU Measurement counter facility device driver. The files cpu_mcf.h and perf_cpum_cf_common.c are deleted. Signed-off-by: Thomas Richter Acked-by: Hendrik Brueckner Signed-off-by: Heiko Carstens commit ea53e6995f45e857fd34e4fbfbd436b5457da5f7 Author: Thomas Richter Date: Tue Jan 24 12:20:53 2023 +0100 s390/cpum_cf: remove in-kernel counting facility interface Commit 17bebcc68eee ("s390/cpum_cf: Add minimal in-kernel interface for counter measurements") introduced a small in-kernel interface for CPU Measurement counter facility. There are no users of this interface, therefore remove it. The following functions are removed: kernel_cpumcf_alert(), kernel_cpumcf_begin(), kernel_cpumcf_end(), kernel_cpumcf_avail() there is no need for them anymore. With the removal of function kernel_cpumcf_alert(), also remove member alert in struct cpu_cf_events. Its purpose was to counter measurement alert interrupts for the in-kernel interface. Signed-off-by: Thomas Richter Signed-off-by: Heiko Carstens commit 7a8f09ac1850b17ca0cc9e1e4d6621a64661347e Author: Thomas Richter Date: Tue Jan 24 12:20:52 2023 +0100 s390/cpum_cf: move stccm_avail() Function stccm_avail() is defined in a header file and the only user is one single source file. Move this function to the source file where it is also used and remove it from the header file. No functional change. Signed-off-by: Thomas Richter Acked-by: Hendrik Brueckner Signed-off-by: Heiko Carstens commit 345d2a4dcdb7d0f33ebd990a19aeb3f3f458817d Author: Thomas Richter Date: Tue Jan 24 12:20:51 2023 +0100 s390/cpum_cf: move cpum_cf_ctrset_size() Function cpum_cf_ctrset_size() is defined in one source file and the only user is in another source file. Move this function to the source file where it is used and remove its prototype from the header file. No functional change. Signed-off-by: Thomas Richter Acked-by: Hendrik Brueckner Signed-off-by: Heiko Carstens commit 1ce357cb825f184519cf1d3c2b01581a0b97663c Author: Thomas Richter Date: Tue Jan 24 12:20:50 2023 +0100 s390/cpum_cf: simplify hw_perf_event_destroy() To remove an event from the CPU Measurement counter facility use the lock/unlock scheme as done in event creation. Remove the atomic_add_unless function to make the code easier. Signed-off-by: Thomas Richter Acked-by: Hendrik Brueckner Signed-off-by: Heiko Carstens commit 7a725b770271deba6c288d075abc8dc9d5aa61d0 Author: Heiko Carstens Date: Sun Jan 22 19:13:03 2023 +0100 s390/cache: change type from unsigned long long to unsigned long The unsigned long long type is a leftover of the 31 bit area. Get rid of it. Signed-off-by: Heiko Carstens commit 9645ccfaad4d6c8be6742a062496751ef5336352 Merge: 1b929c02afd37 80519d8ccc6b6 Author: Stephen Boyd Date: Wed Jan 25 11:35:32 2023 -0800 Merge tag 'clk-microchip-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into clk-microchip Pull Microchip clk updates from Claudiu Beznea: Only updates for AT91 SoCs this time as follows: - DDR clocks were marked as critical in the proper clock driver for each AT91 SoC such that drivers/memory/atmel-sdramc.c to be deleted in the next releases as it only does clock enablement; - Patch to avoid compiling dt-compat.o for all AT91 SoCs as only some of them may use it. * tag 'clk-microchip-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: clk: at91: do not compile dt-compat.c for sama7g5 and sam9x60 clk: at91: mark ddr clocks as critical commit df43ce489d3399966878a999eccbcae3ea21738e Merge: 1b929c02afd37 716592fdb5e25 Author: Stephen Boyd Date: Wed Jan 25 11:31:13 2023 -0800 Merge tag 'clk-meson-v6.3-1' of https://github.com/BayLibre/clk-meson into clk-amlogic Pull Amlogic clk updates from Jerome Brunet: - Use .determine_rate() instead of .round_rate() for the dualdiv, mpll, sclk-div and cpu-dyn-div amlogic clock drivers * tag 'clk-meson-v6.3-1' of https://github.com/BayLibre/clk-meson: clk: meson: clk-cpu-dyndiv: switch from .round_rate to .determine_rate clk: meson: sclk-div: switch from .round_rate to .determine_rate clk: meson: dualdiv: switch from .round_rate to .determine_rate clk: meson: mpll: Switch from .round_rate to .determine_rate commit b74952aba6c3f47e7f2c5165abaeefa44c377140 Author: Ricardo Ribalda Date: Tue Dec 20 22:35:59 2022 +0100 soc: mediatek: mtk-svs: Enable the IRQ later If the system does not come from reset (like when is booted via kexec()), the peripheral might triger an IRQ before the data structures are initialised. Fixes: [ 0.227710] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000f08 [ 0.227913] Call trace: [ 0.227918] svs_isr+0x8c/0x538 Signed-off-by: Ricardo Ribalda Link: https://lore.kernel.org/r/20221127-mtk-svs-v2-0-145b07663ea8@chromium.org Signed-off-by: Matthias Brugger commit a5f6b9d577eba18601c14bba2dbff4a9b76af962 Merge: 2514a31241e1e 7dd880592a887 Author: Alexei Starovoitov Date: Wed Jan 25 10:25:57 2023 -0800 Merge branch 'Enable struct_ops programs to be sleepable' David Vernet says: ==================== This is part 4 of https://lore.kernel.org/bpf/20230123232228.646563-1-void@manifault.com/ Part 3: https://lore.kernel.org/all/20230125050359.339273-1-void@manifault.com/ Part 2: https://lore.kernel.org/all/20230124160802.1122124-1-void@manifault.com/ Changelog: ---------- v3 -> v4: - Fix accidental typo in name of dummy_st_ops introduced in v2, moving it back to dummy_st_ops from dummy_st_ops_success. Should fix s390x testruns. v2 -> v3: - Don't call a KF_SLEEPABLE kfunc from the dummy_st_ops testsuite, and remove the newly added bpf_kfunc_call_test_sleepable() test kfunc (Martin). - Include vmlinux.h from progs/dummy_st_ops_success.c (previously progs/dummy_st_ops.c) rather than manually defining struct bpf_dummy_ops_state and struct bpf_dummy_ops. (Martin). - Fix a typo added to prog_tests/dummy_st_ops.c in a previous version: s/trace_dummy_st_ops_success__open/trace_dummy_st_ops__open. v1 -> v2: - Add support for specifying sleepable struct_ops programs with struct_ops.s in libbpf (Alexei). - Move failure test case into new dummy_st_ops_fail.c prog file. - Update test_dummy_sleepable() to use struct_ops.s instead of manually setting prog flags. Also remove open_load_skel() helper which is no longer needed. - Fix verifier tests to expect new sleepable prog failure message. ==================== Signed-off-by: Alexei Starovoitov commit 7dd880592a88799f3ef48fda507849a75f11cbf0 Author: David Vernet Date: Wed Jan 25 10:47:35 2023 -0600 bpf/selftests: Verify struct_ops prog sleepable behavior In a set of prior changes, we added the ability for struct_ops programs to be sleepable. This patch enhances the dummy_st_ops selftest suite to validate this behavior by adding a new sleepable struct_ops entry to dummy_st_ops. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230125164735.785732-5-void@manifault.com Signed-off-by: Alexei Starovoitov commit 51a52a29ebaa8395de090fa415c6e1b2899a50f1 Author: David Vernet Date: Wed Jan 25 10:47:34 2023 -0600 bpf: Pass const struct bpf_prog * to .check_member The .check_member field of struct bpf_struct_ops is currently passed the member's btf_type via const struct btf_type *t, and a const struct btf_member *member. This allows the struct_ops implementation to check whether e.g. an ops is supported, but it would be useful to also enforce that the struct_ops prog being loaded for that member has other qualities, like being sleepable (or not). This patch therefore updates the .check_member() callback to also take a const struct bpf_prog *prog argument. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230125164735.785732-4-void@manifault.com Signed-off-by: Alexei Starovoitov commit 913b2255c3d876254e968f1e8e2c817cca283a29 Author: David Vernet Date: Wed Jan 25 10:47:33 2023 -0600 libbpf: Support sleepable struct_ops.s section In a prior change, the verifier was updated to support sleepable BPF_PROG_TYPE_STRUCT_OPS programs. A caller could set the program as sleepable with bpf_program__set_flags(), but it would be more ergonomic and more in-line with other sleepable program types if we supported suffixing a struct_ops section name with .s to indicate that it's sleepable. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230125164735.785732-3-void@manifault.com Signed-off-by: Alexei Starovoitov commit 1e12d3ef47d228e4e7d30f9bc5e6744ede90319c Author: David Vernet Date: Wed Jan 25 10:47:32 2023 -0600 bpf: Allow BPF_PROG_TYPE_STRUCT_OPS programs to be sleepable BPF struct_ops programs currently cannot be marked as sleepable. This need not be the case -- struct_ops programs can be sleepable, and e.g. invoke kfuncs that export the KF_SLEEPABLE flag. So as to allow future struct_ops programs to invoke such kfuncs, this patch updates the verifier to allow struct_ops programs to be sleepable. A follow-on patch will add support to libbpf for specifying struct_ops.s as a sleepable struct_ops program, and then another patch will add testcases to the dummy_st_ops selftest suite which test sleepable struct_ops behavior. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230125164735.785732-2-void@manifault.com Signed-off-by: Alexei Starovoitov commit 24304a87158aab01b4ccb9b2638c2c623a9a7bd4 Author: Doug Berger Date: Tue Jan 24 12:14:30 2023 -0800 rtc: brcmstb-waketimer: allow use as non-wake alarm The wake interrupt only fires when the system is in a suspend state. Fortunately we have another interrupt that fires in a non-suspend state at the L2 controller UPG_AUX_AON. Add support for this interrupt line so we can use the alarm in a non-wake context. Signed-off-by: Doug Berger Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20230124201430.2502371-3-opendmb@gmail.com Signed-off-by: Alexandre Belloni commit 6cc7a8262b57db0a2ff6c141bb163c1395b7c4ef Author: Doug Berger Date: Tue Jan 24 12:14:29 2023 -0800 dt-bindings: rtc: brcm,brcmstb-waketimer: add alarm interrupt A second interrupt can optionally be specified for this device to be used for generating RTC alarm interrupts. Signed-off-by: Doug Berger Acked-by: Florian Fainelli Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230124201430.2502371-2-opendmb@gmail.com Signed-off-by: Alexandre Belloni commit 2514a31241e1e9067d379e0fbdb60e4bc2bf4659 Author: Daniel T. Lee Date: Wed Jan 25 19:04:40 2023 +0900 selftests/bpf: Fix vmtest static compilation error As stated in README.rst, in order to resolve errors with linker errors, 'LDLIBS=-static' should be used. Most problems will be solved by this option, but in the case of urandom_read, this won't fix the problem. So the Makefile is currently implemented to strip the 'static' option when compiling the urandom_read. However, stripping this static option isn't configured properly on $(LDLIBS) correctly, which is now causing errors on static compilation. # LDLIBS=-static ./vmtest.sh ld.lld: error: attempted static link of dynamic object liburandom_read.so clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [Makefile:190: /linux/tools/testing/selftests/bpf/urandom_read] Error 1 make: *** Waiting for unfinished jobs.... This commit fixes this problem by configuring the strip with $(LDLIBS). Fixes: 68084a136420 ("selftests/bpf: Fix building bpf selftests statically") Signed-off-by: Daniel T. Lee Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230125100440.21734-1-danieltimlee@gmail.com commit 13e07691a16ff31b209fbfce25c01ff296b05e45 Author: Ian Rogers Date: Mon Jan 23 22:43:24 2023 -0800 tools/resolve_btfids: Alter how HOSTCC is forced HOSTCC is always wanted when building. Setting CC to HOSTCC happens after tools/scripts/Makefile.include is included, meaning flags are set assuming say CC is gcc, but then it can be later set to HOSTCC which may be clang. tools/scripts/Makefile.include is needed for host set up and common macros in objtool's Makefile. Rather than override CC to HOSTCC, just pass CC as HOSTCC to Makefile.build, the libsubcmd builds and the linkage step. This means the Makefiles don't see things like CC changing and tool flag determination, and similar, work properly. Also, clear the passed subdir as otherwise an outer build may break by inadvertently passing an inappropriate value. Signed-off-by: Ian Rogers Signed-off-by: Daniel Borkmann Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20230124064324.672022-2-irogers@google.com commit af03299d8536d62b49c7f3cb929349eb2d66bcd5 Author: Ian Rogers Date: Mon Jan 23 22:43:23 2023 -0800 tools/resolve_btfids: Install subcmd headers Previously tools/lib/subcmd was added to the include path, switch to installing the headers and then including from that directory. This avoids dependencies on headers internal to tools/lib/subcmd. Add the missing subcmd directory to the affected #include. Signed-off-by: Ian Rogers Signed-off-by: Daniel Borkmann Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20230124064324.672022-1-irogers@google.com commit 2723f3b5d4ff5853503aae368c6b165b57fac651 Author: Jesse Brandeburg Date: Fri Dec 16 12:06:58 2022 -0800 virtchnl: i40e/iavf: rename iwarp to rdma Since the latest Intel hardware does both IWARP and ROCE, rename the term IWARP in the virtchnl header to be RDMA. Do this for both upper and lower case instances. Many of the non-virtchnl.h changes were done with regular expression replacements using perl like: perl -p -i -e 's/_IWARP/_RDMA/' perl -p -i -e 's/_iwarp/_rdma/' and I had to pick up a few instances manually. The virtchnl.h header has some comments and clarity added around when to use certain defines. note: had to fix a checkpatch warning for a long line by wrapping one of the lines I changed. Signed-off-by: Jesse Brandeburg Tested-by: Jakub Andrysiak Signed-off-by: Tony Nguyen commit 4e4df55941f0784e08e0ab50b04a08c7e1c949eb Author: Jesse Brandeburg Date: Fri Dec 16 12:06:57 2022 -0800 virtchnl: do structure hardening The virtchnl interface can have a bunch of "soft" defined structures hardened by using explicit sizes for declarations, and then referring to the enum type that uses them in a comment. None of these changes should change any of the structure sizes. Also, remove a duplicate line in a switch statement and let two cases uses the same code. Signed-off-by: Jesse Brandeburg Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit 43fc70a208ce848f2ec93dadf160ebcc77ec71e8 Author: Jesse Brandeburg Date: Fri Dec 16 12:06:56 2022 -0800 virtchnl: update header and increase header clarity We already have the SPDX header, so just leave a copyright notice with an updated year and get rid of the boilerplate header (so 2002!). In addition, update a couple of comments to clarify how the various parts of the virtchannel header interaction work. No functional changes. Signed-off-by: Jesse Brandeburg Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit 3a6a9b3be290299309299a9fd1345521668a2896 Author: Jesse Brandeburg Date: Fri Dec 16 12:06:55 2022 -0800 virtchnl: remove unused structure declaration Nothing uses virtchnl_msg, just remove it. Signed-off-by: Jesse Brandeburg Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit 0c8fb2469438256a9cbb690d538437db6f845df8 Author: Christian König Date: Wed Jan 25 16:49:02 2023 +0100 drm/ttm: revert "stop allocating dummy resources during BO creation" This reverts commit 00984ad39599bb2a1e6ec5d4e9c75a749f7f45c9. It seems to still breka i915. Signed-off-by: Christian König Acked-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20230125155023.105584-1-christian.koenig@amd.com commit fc1137070b9c59f8f1772e632215da0ad5725661 Author: Christian König Date: Wed Jan 25 16:48:36 2023 +0100 drm/ttm: revert "stop allocating a dummy resource for pipelined gutting" This reverts commit 4110872b8115aab2adb3a52149c144d8465440de. This still seems to break i915. Signed-off-by: Christian König Acked-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20230125155023.105584-1-christian.koenig@amd.com commit 2847a67d3aa518a29e8a8db01bbec630d3bd5011 Author: Christian König Date: Wed Jan 25 17:14:37 2023 +0100 drm/ttm: revert "prevent moving of pinned BOs" This reverts commit b49323aa35d502b0d9a7950327f30a1a52eae534. This still seems to break i915. Signed-off-by: Christian König Acked-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20230125155023.105584-1-christian.koenig@amd.com commit 8c19b6f257fa71ed3a7a9df6ce466c6be31ca04c Author: Kim Phillips Date: Tue Jan 24 10:33:19 2023 -0600 KVM: x86: Propagate the AMD Automatic IBRS feature to the guest Add the AMD Automatic IBRS feature bit to those being propagated to the guest, and enable the guest EFER bit. Signed-off-by: Kim Phillips Signed-off-by: Borislav Petkov (AMD) Acked-by: Sean Christopherson Link: https://lore.kernel.org/r/20230124163319.2277355-9-kim.phillips@amd.com commit ba987eaaabf99b462cdfed86274e3455d5126349 Author: Qiuxu Zhuo Date: Fri Jan 13 11:28:02 2023 +0800 EDAC/i10nm: Add Intel Granite Rapids server support The Granite Rapids CPU model uses similar memory controller registers as Sapphire Rapids server but with some different configurations: - Various memory controller numbers for different Granite Rapids CPUs. So detect the number of present memory controllers at run time. - Different MMIO offsets of memory controllers. - Different triples of bus/dev/fun of some PCI devices used in i10nm_edac. Add above configurations and Granite Rapids CPU model ID for EDAC support. [Tony: Fixed 2 typos s/strcture/structure/] Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Link: https://lore.kernel.org/all/20230113032802.41752-1-qiuxu.zhuo@intel.com commit dd7814b78539416c6e561eeaa0951b3e88ac799e Author: Qiuxu Zhuo Date: Fri Jan 13 11:28:01 2023 +0800 EDAC/i10nm: Make more configurations CPU model specific The numbers of memory controllers per socket, channels per memory controller, DIMMs per channel and the triples of bus/device/function of PCI devices used in i10nm_edac can be CPU model specific. Add new fields to the structure res_config for above numbers and triples to make them CPU model specific. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Link: https://lore.kernel.org/all/20230113032802.41752-1-qiuxu.zhuo@intel.com commit e4b2bc6616e21f4a7ce4e7452f716e3db8fe66b6 Author: Qiuxu Zhuo Date: Fri Jan 13 11:28:00 2023 +0800 EDAC/i10nm: Add Intel Emerald Rapids server support The Emerald Rapids CPU model uses similar memory controller registers as Sapphire Rapids server. Add Emerald Rapids CPU model number ID for EDAC support. Tested-by: Li Zhang Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Link: https://lore.kernel.org/all/20230113032802.41752-1-qiuxu.zhuo@intel.com commit d2415e2e5330fc11f4c688fa518751bdc90259f5 Author: Qiuxu Zhuo Date: Fri Jan 13 11:27:59 2023 +0800 EDAC/skx_common: Delete duplicated and unreachable code skx_mce_check_error() returns early if the error isn't from memory. So when skx_mce_output_error() is invoked from skx_mce_check_error(), it doesn't need to re-check whether the error is from memory. Delete the duplicated and unreachable code from skx_mce_output_error(). Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Link: https://lore.kernel.org/all/20230113032802.41752-1-qiuxu.zhuo@intel.com commit 6e8746cb735166eaf3ceb086b31bb0431f5e3532 Author: Qiuxu Zhuo Date: Fri Jan 13 11:27:58 2023 +0800 EDAC/skx_common: Enable EDAC support for the "near" memory The current {skx,i10nm}_edac miss the EDAC support to decode errors from the 1st level memory (the fast "near" memory as cache) of the 2-level memory system. Introduce a helper function skx_error_in_mem() to check whether errors are from memory at the beginning of skx_mce_check_error(). As long as the errors are from memory (either the 1-level memory system or the 2-level memory system), decode the errors. Reported-and-tested-by: Youquan Song Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Link: https://lore.kernel.org/all/20230113032802.41752-1-qiuxu.zhuo@intel.com commit e7862eda309ecfccc36bb5558d937ed3ace07f3f Author: Kim Phillips Date: Tue Jan 24 10:33:18 2023 -0600 x86/cpu: Support AMD Automatic IBRS The AMD Zen4 core supports a new feature called Automatic IBRS. It is a "set-and-forget" feature that means that, like Intel's Enhanced IBRS, h/w manages its IBRS mitigation resources automatically across CPL transitions. The feature is advertised by CPUID_Fn80000021_EAX bit 8 and is enabled by setting MSR C000_0080 (EFER) bit 21. Enable Automatic IBRS by default if the CPU feature is present. It typically provides greater performance over the incumbent generic retpolines mitigation. Reuse the SPECTRE_V2_EIBRS spectre_v2_mitigation enum. AMD Automatic IBRS and Intel Enhanced IBRS have similar enablement. Add NO_EIBRS_PBRSB to cpu_vuln_whitelist, since AMD Automatic IBRS isn't affected by PBRSB-eIBRS. The kernel command line option spectre_v2=eibrs is used to select AMD Automatic IBRS, if available. Signed-off-by: Kim Phillips Signed-off-by: Borislav Petkov (AMD) Acked-by: Sean Christopherson Acked-by: Dave Hansen Link: https://lore.kernel.org/r/20230124163319.2277355-8-kim.phillips@amd.com commit 4f848f23f5ffcd73e538a003626350c2930be06a Merge: 6042a5880aafb 3a48b303d44a1 Author: Arnd Bergmann Date: Wed Jan 25 17:00:47 2023 +0100 Merge tag 'dt-cleanup-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into arm/dt Minor improvements in ARM DTS for v6.3 1. Drop 0x from unit address (socpfga). 2. Align HDMI CEC and LED nodes with bindings (stih410, keystone, dove, at91). * tag 'dt-cleanup-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt: ARM: dts: at91: align LED node names with dtschema ARM: dts: dove: align LED node names with dtschema ARM: dts: keystone: align LED node names with dtschema ARM: dts: stih410: align HDMI CEC node names with dtschema ARM: dts: socfpga: drop 0x from unit address Link: https://lore.kernel.org/r/20230122121541.29312-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 6042a5880aafb9591053c30cc5de0cfface30682 Author: Corentin Labbe Date: Wed Jan 25 08:58:38 2023 +0100 ARM: dts: intel-ixp42x-welltech-epbx100: add ethernet node Add ethernet node for the first port of intel-ixp42x-welltech-epbx100. Signed-off-by: Corentin Labbe Link: https://lore.kernel.org/r/20221005105510.3512132-1-clabbe@baylibre.com Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230125075838.2801020-1-linus.walleij@linaro.org Signed-off-by: Arnd Bergmann commit 0cea651d6fdbcb279a1c5441a419a2f437896e7b Merge: b613d335a743c 027bdec89364e Author: Alexei Starovoitov Date: Wed Jan 25 07:57:50 2023 -0800 Merge branch 'Enable cpumasks to be used as kptrs' David Vernet says: ==================== This is part 3 of https://lore.kernel.org/all/20230119235833.2948341-1-void@manifault.com/ Part 2: https://lore.kernel.org/bpf/20230120192523.3650503-1-void@manifault.com/ This series is based off of commit b613d335a743 ("bpf: Allow trusted args to walk struct when checking BTF IDs"). Changelog: ---------- v2 -> v3: - Rebase onto master (commit described above). Only conflict that required resolution was updating the task_kfunc selftest suite error message location. - Put copyright onto one line in kernel/bpf/cpumask.c. - Remove now-unneeded pid-checking logic from progs/nested_trust_success.c. - Fix a couple of small grammatical typos in documentation. v1 -> v2: - Put back 'static' keyword in bpf_find_btf_id() (kernel test robot ) - Surround cpumask kfuncs in __diag() blocks to avoid no-prototype build warnings (kernel test robot ) - Enable ___init suffixes to a type definition to signal that a type is a nocast alias of another type. That is, that when passed to a kfunc that expects one of the two types, the verifier will reject the other even if they're equivalent according to the C standard (Kumar and Alexei) - Reject NULL for all trusted args, not just PTR_TO_MEM (Kumar) - Reject both NULL and PTR_MAYBE_NULL for all trusted args (Kumar and Alexei ) - Improve examples given in cpumask documentation (Alexei) - Use __success macro for nested_trust test (Alexei) - Fix comment typo in struct bpf_cpumask comment header. - Fix another example in the bpf_cpumask doc examples. - Add documentation for ___init suffix change mentioned above. ==================== Signed-off-by: Alexei Starovoitov commit 027bdec89364e94753a2211ca87800c765fbd75d Author: David Vernet Date: Wed Jan 25 08:38:16 2023 -0600 bpf/docs: Document the nocast aliasing behavior of ___init When comparing BTF IDs for pointers being passed to kfunc arguments, the verifier will allow pointer types that are equivalent according to the C standard. For example, for: struct bpf_cpumask { cpumask_t cpumask; refcount_t usage; }; The verifier will allow a struct bpf_cpumask * to be passed to a kfunc that takes a const struct cpumask * (cpumask_t is a typedef of struct cpumask). The exception to this rule is if a type is suffixed with ___init, such as: struct nf_conn___init { struct nf_conn ct; }; The verifier will _not_ allow a struct nf_conn___init * to be passed to a kfunc that expects a struct nf_conn *. This patch documents this behavior in the kfuncs documentation page. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230125143816.721952-8-void@manifault.com Signed-off-by: Alexei Starovoitov commit d94cbde2183ff329f36ce1d8f99361a63da68a72 Author: David Vernet Date: Wed Jan 25 08:38:15 2023 -0600 bpf/docs: Document how nested trusted fields may be defined A prior change defined a new BTF_TYPE_SAFE_NESTED macro in the verifier which allows developers to specify when a pointee field in a struct type should inherit its parent pointer's trusted status. This patch updates the kfuncs documentation to specify this macro and how it can be used. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230125143816.721952-7-void@manifault.com Signed-off-by: Alexei Starovoitov commit bdbda395845e7579c0ce76280104627510af929b Author: David Vernet Date: Wed Jan 25 08:38:14 2023 -0600 bpf/docs: Document cpumask kfuncs in a new file Now that we've added a series of new cpumask kfuncs, we should document them so users can easily use them. This patch adds a new cpumasks.rst file to document them. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230125143816.721952-6-void@manifault.com Signed-off-by: Alexei Starovoitov commit 7b6abcfa15cd18de21e5bfb952df57268af2f041 Author: David Vernet Date: Wed Jan 25 08:38:13 2023 -0600 selftests/bpf: Add selftest suite for cpumask kfuncs A recent patch added a new set of kfuncs for allocating, freeing, manipulating, and querying cpumasks. This patch adds a new 'cpumask' selftest suite which verifies their behavior. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230125143816.721952-5-void@manifault.com Signed-off-by: Alexei Starovoitov commit a6541f4d280465e3dff08a45734c0d4ac3f363a4 Author: David Vernet Date: Wed Jan 25 08:38:12 2023 -0600 selftests/bpf: Add nested trust selftests suite Now that defining trusted fields in a struct is supported, we should add selftests to verify the behavior. This patch adds a few such testcases. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230125143816.721952-4-void@manifault.com Signed-off-by: Alexei Starovoitov commit 516f4d3397c9e90f4da04f59986c856016269aa1 Author: David Vernet Date: Wed Jan 25 08:38:11 2023 -0600 bpf: Enable cpumasks to be queried and used as kptrs Certain programs may wish to be able to query cpumasks. For example, if a program that is tracing percpu operations wishes to track which tasks end up running on which CPUs, it could be useful to associate that with the tasks' cpumasks. Similarly, programs tracking NUMA allocations, CPU scheduling domains, etc, could potentially benefit from being able to see which CPUs a task could be migrated to. This patch enables these types of use cases by introducing a series of bpf_cpumask_* kfuncs. Amongst these kfuncs, there are two separate "classes" of operations: 1. kfuncs which allow the caller to allocate and mutate their own cpumask kptrs in the form of a struct bpf_cpumask * object. Such kfuncs include e.g. bpf_cpumask_create() to allocate the cpumask, and bpf_cpumask_or() to mutate it. "Regular" cpumasks such as p->cpus_ptr may not be passed to these kfuncs, and the verifier will ensure this is the case by comparing BTF IDs. 2. Read-only operations which operate on const struct cpumask * arguments. For example, bpf_cpumask_test_cpu(), which tests whether a CPU is set in the cpumask. Any trusted struct cpumask * or struct bpf_cpumask * may be passed to these kfuncs. The verifier allows struct bpf_cpumask * even though the kfunc is defined with struct cpumask * because the first element of a struct bpf_cpumask is a cpumask_t, so it is safe to cast. A follow-on patch will add selftests which validate these kfuncs, and another will document them. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230125143816.721952-3-void@manifault.com Signed-off-by: Alexei Starovoitov commit caf713c338bd95bf9ac003d8985d2c4e46d452dd Author: David Vernet Date: Wed Jan 25 08:38:10 2023 -0600 bpf: Disallow NULLable pointers for trusted kfuncs KF_TRUSTED_ARGS kfuncs currently have a subtle and insidious bug in validating pointers to scalars. Say that you have a kfunc like the following, which takes an array as the first argument: bool bpf_cpumask_empty(const struct cpumask *cpumask) { return cpumask_empty(cpumask); } ... BTF_ID_FLAGS(func, bpf_cpumask_empty, KF_TRUSTED_ARGS) ... If a BPF program were to invoke the kfunc with a NULL argument, it would crash the kernel. The reason is that struct cpumask is defined as a bitmap, which is itself defined as an array, and is accessed as a memory address by bitmap operations. So when the verifier analyzes the register, it interprets it as a pointer to a scalar struct, which is an array of size 8. check_mem_reg() then sees that the register is NULL and returns 0, and the kfunc crashes when it passes it down to the cpumask wrappers. To fix this, this patch adds a check for KF_ARG_PTR_TO_MEM which verifies that the register doesn't contain a possibly-NULL pointer if the kfunc is KF_TRUSTED_ARGS. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230125143816.721952-2-void@manifault.com Signed-off-by: Alexei Starovoitov commit d5d480412870537489a4f9c9309cd87e4a935b63 Merge: 1ba4a8a6ce7a2 776e8ee7a3cb8 Author: Arnd Bergmann Date: Wed Jan 25 16:55:32 2023 +0100 Merge tag 'gemini-dts-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into arm/dt Gemini DTS additions and fixes for the v6.3 kernel cycle: - Fix a schema warning by pushing down flash address/size to each device tree. - Use RedBoot partition parsing properly on Wiliboard devices. - Fix the FOTG200 USB block version. - Activate device mode on the DNS-313 now that we merged the necessary USB changes. * tag 'gemini-dts-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik: ARM: dts: gemini: Enable DNS313 FOTG210 as periph ARM: dts: gemini: Fix USB block version ARM: dts: gemini: wbd222: Use RedBoot partion parser ARM: dts: gemini: wbd111: Use RedBoot partion parser ARM: dts: gemini: Push down flash address/size cells Link: https://lore.kernel.org/r/CACRpkdb=dDD-y91jdEM01iuioJVDgDwMgS8F46iN84vw_V8BvA@mail.gmail.com Signed-off-by: Arnd Bergmann commit 9e0a9be24bdd61a160631227ee995b579be566a5 Author: Rafael J. Wysocki Date: Mon Jan 23 21:44:03 2023 +0100 thermal: Fail object registration if thermal class is not registered If thermal_class is not registered with the driver core, there is no way to expose the interfaces used by the thermal control framework, so prevent thermal zones and cooling devices from being registered in that case by returning an error from object registration functions. For this purpose, use a thermal_class pointer that will be NULL if the class is not registered. To avoid wasting memory in that case, allocate the thermal class object dynamically and if it fails to register, free it and clear the thermal_class pointer to NULL. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano Reviewed-by: Zhang Rui Reviewed-by: Greg Kroah-Hartman commit 5b8de18ee9027c647db4c1905f7fd0550d17d67a Author: Daniel Lezcano Date: Mon Jan 23 16:27:56 2023 +0100 thermal/core: Move the thermal trip code to a dedicated file The thermal_core.c files contains a lot of functions handling different thermal components like the governors, the trip points, the cooling device, the OF cooling device, etc ... This organization does not help to migrate to a more sane code where there is a better self-encapsulation as all the components' internals can be directly accessed from a single file. For the sake of clarity, let's move the thermal trip points code in a dedicated thermal_trip.c file and add a function to browse all the trip points like we do with the thermal zones, the govenors and the cooling devices. The same can be done for the cooling devices and the governor code but that will come later as the current work in the thermal framework is to fix the trip point handling and use a generic trip point structure. No functional changes intended. Signed-off-by: Daniel Lezcano Reviewed-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit b57d62862d171e402fca649882f0fec4e25bd312 Author: Daniel Lezcano Date: Mon Jan 23 16:27:55 2023 +0100 thermal/core: Remove unneeded ida_destroy() As per documentation for the ida_destroy() function: "If the IDA is already empty, there is no need to call this function." The thermal framework is in the init sequence, so the ida was not yet used and consequently it is empty in case of error. There is no need to call ida_destroy(), let's remove the calls. Signed-off-by: Daniel Lezcano Reviewed-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit 58d1c9fd0e859912ae322d24aa0baedc9030b8ed Author: Daniel Lezcano Date: Mon Jan 23 16:27:54 2023 +0100 thermal/core: Fix unregistering netlink at thermal init time The thermal subsystem initialization miss an netlink unregistering function in the error. Add it. Signed-off-by: Daniel Lezcano Reviewed-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit faabfcb194a8d0686396e3fff6a5b42911f65191 Author: Kim Phillips Date: Tue Jan 24 10:33:17 2023 -0600 x86/cpu, kvm: Add the SMM_CTL MSR not present feature The SMM_CTL MSR not present feature was being open-coded for KVM. Add it to its newly added CPUID leaf 0x80000021 EAX proper. Also drop the bit description comments now the code is more self-describing. Signed-off-by: Kim Phillips Signed-off-by: Borislav Petkov (AMD) Acked-by: Sean Christopherson Link: https://lore.kernel.org/r/20230124163319.2277355-7-kim.phillips@amd.com commit dc513fd5321d4c15ac1f820c224b2e5220b6e14f Author: Steven Rostedt (Google) Date: Tue Jan 24 15:22:40 2023 -0500 bpf/tracing: Use stage6 of tracing to not duplicate macros The bpf events are created by the same macro magic as tracefs trace events are. But to hook into bpf, it has its own code. It duplicates many of the same macros as the tracefs macros and this is an issue because it misses bug fixes as well as any new enhancements that come with the other trace macros. As the trace macros have been put into their own staging files, have bpf take advantage of this and use the tracefs stage 6 macros that the "fast ssign" portion of the trace event macro uses. Link: https://lkml.kernel.org/r/20230124202515.873075730@goodmis.org Link: https://lore.kernel.org/lkml/1671181385-5719-1-git-send-email-quic_linyyuan@quicinc.com/ Cc: bpf@vger.kernel.org Cc: Peter Zijlstra Cc: Alexei Starovoitov Cc: Daniel Borkmann Acked-by: Alexei Starovoitov Reported-by: Linyu Yuan Signed-off-by: Steven Rostedt (Google) commit 92a22cea4c847b518af646a809cd662d55f9d8ac Author: Steven Rostedt (Google) Date: Tue Jan 24 15:22:39 2023 -0500 perf/tracing: Use stage6 of tracing to not duplicate macros The perf events are created by the same macro magic as tracefs trace events are. But to hook into perf, it has its own code. It duplicates many of the same macros as the tracefs macros and this is an issue because it misses bug fixes as well as any new enhancements that come with the other trace macros. As the trace macros have been put into their own staging files, have perf take advantage of this and use the tracefs stage 6 macros that the "fast assign" portion of the trace event macro uses. Link: https://lkml.kernel.org/r/20230124202515.716458410@goodmis.org Link: https://lore.kernel.org/lkml/1671181385-5719-1-git-send-email-quic_linyyuan@quicinc.com/ Cc: Frederic Weisbecker Cc: Arnaldo Carvalho de Melo Acked-by: Peter Zijlstra (Intel) Reported-by: Linyu Yuan Signed-off-by: Steven Rostedt (Google) commit b81a3a100cca1bd63d897efa339d047986615c9f Author: Steven Rostedt (Google) Date: Tue Jan 17 10:21:31 2023 -0500 tracing/histogram: Add simple tests for stacktrace usage of synthetic events Update the selftests to include a test of passing a stacktrace between the events of a synthetic event. Link: https://lkml.kernel.org/r/20230117152236.475439286@goodmis.org Cc: Masami Hiramatsu Cc: Andrew Morton Cc: Tom Zanussi Cc: Ross Zwisler Cc: Ching-lin Yu Signed-off-by: Steven Rostedt (Google) commit 88238513bb26713ef6d4418bdf1af062fe608bcb Author: Steven Rostedt (Google) Date: Tue Jan 17 10:21:30 2023 -0500 tracing/histogram: Document variable stacktrace Add a little documentation (and a useful example) of how a stacktrace can be used within a histogram variable and synthetic event. Link: https://lkml.kernel.org/r/20230117152236.320181354@goodmis.org Cc: Masami Hiramatsu Cc: Andrew Morton Cc: Tom Zanussi Cc: Ross Zwisler Cc: Ching-lin Yu Signed-off-by: Steven Rostedt (Google) commit cc5fc8bfc961eeb99b7e8dffbeff7a3f6995d314 Author: Steven Rostedt (Google) Date: Tue Jan 17 10:21:29 2023 -0500 tracing/histogram: Add stacktrace type Now that stacktraces can be part of synthetic events, allow a key to be typed as a stacktrace. # cd /sys/kernel/tracing # echo 's:block_lat u64 delta; unsigned long stack[];' >> dynamic_events # echo 'hist:keys=next_pid:ts=common_timestamp.usecs,st=stacktrace if prev_state == 2' >> events/sched/sched_switch/trigger # echo 'hist:keys=prev_pid:delta=common_timestamp.usecs-$ts,st2=$st:onmatch(sched.sched_switch).trace(block_lat,$delta,$st2)' >> events/sched/sched_switch/trigger # echo 'hist:keys=delta.buckets=100,stack.stacktrace:sort=delta' > events/synthetic/block_lat/trigger # cat events/synthetic/block_lat/hist # event histogram # # trigger info: hist:keys=delta.buckets=100,stacktrace:vals=hitcount:sort=delta.buckets=100:size=2048 [active] # { delta: ~ 0-99, stacktrace: event_hist_trigger+0x464/0x480 event_triggers_call+0x52/0xe0 trace_event_buffer_commit+0x193/0x250 trace_event_raw_event_sched_switch+0xfc/0x150 __traceiter_sched_switch+0x41/0x60 __schedule+0x448/0x7b0 schedule_idle+0x26/0x40 cpu_startup_entry+0x19/0x20 start_secondary+0xed/0xf0 secondary_startup_64_no_verify+0xe0/0xeb } hitcount: 6 { delta: ~ 0-99, stacktrace: event_hist_trigger+0x464/0x480 event_triggers_call+0x52/0xe0 trace_event_buffer_commit+0x193/0x250 trace_event_raw_event_sched_switch+0xfc/0x150 __traceiter_sched_switch+0x41/0x60 __schedule+0x448/0x7b0 schedule_idle+0x26/0x40 cpu_startup_entry+0x19/0x20 __pfx_kernel_init+0x0/0x10 arch_call_rest_init+0xa/0x24 start_kernel+0x964/0x98d secondary_startup_64_no_verify+0xe0/0xeb } hitcount: 3 { delta: ~ 0-99, stacktrace: event_hist_trigger+0x464/0x480 event_triggers_call+0x52/0xe0 trace_event_buffer_commit+0x193/0x250 trace_event_raw_event_sched_switch+0xfc/0x150 __traceiter_sched_switch+0x41/0x60 __schedule+0x448/0x7b0 schedule+0x5a/0xb0 worker_thread+0xaf/0x380 kthread+0xe9/0x110 ret_from_fork+0x2c/0x50 } hitcount: 1 { delta: ~ 100-199, stacktrace: event_hist_trigger+0x464/0x480 event_triggers_call+0x52/0xe0 trace_event_buffer_commit+0x193/0x250 trace_event_raw_event_sched_switch+0xfc/0x150 __traceiter_sched_switch+0x41/0x60 __schedule+0x448/0x7b0 schedule_idle+0x26/0x40 cpu_startup_entry+0x19/0x20 start_secondary+0xed/0xf0 secondary_startup_64_no_verify+0xe0/0xeb } hitcount: 15 [..] { delta: ~ 8500-8599, stacktrace: event_hist_trigger+0x464/0x480 event_triggers_call+0x52/0xe0 trace_event_buffer_commit+0x193/0x250 trace_event_raw_event_sched_switch+0xfc/0x150 __traceiter_sched_switch+0x41/0x60 __schedule+0x448/0x7b0 schedule_idle+0x26/0x40 cpu_startup_entry+0x19/0x20 start_secondary+0xed/0xf0 secondary_startup_64_no_verify+0xe0/0xeb } hitcount: 1 Totals: Hits: 89 Entries: 11 Dropped: 0 Link: https://lkml.kernel.org/r/20230117152236.167046397@goodmis.org Cc: Masami Hiramatsu Cc: Andrew Morton Cc: Tom Zanussi Cc: Ross Zwisler Cc: Ching-lin Yu Signed-off-by: Steven Rostedt (Google) commit 00cf3d672a9dd409418647e9f98784c339c3ff63 Author: Steven Rostedt (Google) Date: Tue Jan 17 10:21:28 2023 -0500 tracing: Allow synthetic events to pass around stacktraces Allow a stacktrace from one event to be displayed by the end event of a synthetic event. This is very useful when looking for the longest latency of a sleep or something blocked on I/O. # cd /sys/kernel/tracing/ # echo 's:block_lat pid_t pid; u64 delta; unsigned long[] stack;' > dynamic_events # echo 'hist:keys=next_pid:ts=common_timestamp.usecs,st=stacktrace if prev_state == 1||prev_state == 2' > events/sched/sched_switch/trigger # echo 'hist:keys=prev_pid:delta=common_timestamp.usecs-$ts,s=$st:onmax($delta).trace(block_lat,prev_pid,$delta,$s)' >> events/sched/sched_switch/trigger The above creates a "block_lat" synthetic event that take the stacktrace of when a task schedules out in either the interruptible or uninterruptible states, and on a new per process max $delta (the time it was scheduled out), will print the process id and the stacktrace. # echo 1 > events/synthetic/block_lat/enable # cat trace # TASK-PID CPU# ||||| TIMESTAMP FUNCTION # | | | ||||| | | kworker/u16:0-767 [006] d..4. 560.645045: block_lat: pid=767 delta=66 stack=STACK: => __schedule => schedule => pipe_read => vfs_read => ksys_read => do_syscall_64 => 0x966000aa -0 [003] d..4. 561.132117: block_lat: pid=0 delta=413787 stack=STACK: => __schedule => schedule => schedule_hrtimeout_range_clock => do_sys_poll => __x64_sys_poll => do_syscall_64 => 0x966000aa <...>-153 [006] d..4. 562.068407: block_lat: pid=153 delta=54 stack=STACK: => __schedule => schedule => io_schedule => rq_qos_wait => wbt_wait => __rq_qos_throttle => blk_mq_submit_bio => submit_bio_noacct_nocheck => ext4_bio_write_page => mpage_submit_page => mpage_process_page_bufs => mpage_prepare_extent_to_map => ext4_do_writepages => ext4_writepages => do_writepages => __writeback_single_inode Link: https://lkml.kernel.org/r/20230117152236.010941267@goodmis.org Cc: Masami Hiramatsu Cc: Andrew Morton Cc: Tom Zanussi Cc: Ross Zwisler Cc: Ching-lin Yu Signed-off-by: Steven Rostedt (Google) commit 288709c9f3b0236000754824bcabc9a9ffaa3738 Author: Steven Rostedt (Google) Date: Tue Jan 17 10:21:27 2023 -0500 tracing: Allow stacktraces to be saved as histogram variables Allow to save stacktraces into a histogram variable. This will be used by synthetic events to allow a stacktrace from one event to be passed and displayed by another event. The special keyword "stacktrace" is to be used to trigger a stack trace for the event that the histogram trigger is attached to. echo 'hist:keys=pid:st=stacktrace" > events/sched/sched_waking/trigger Currently nothing can get access to the "$st" variable above that contains the stack trace, but that will soon change. Link: https://lkml.kernel.org/r/20230117152235.856323729@goodmis.org Cc: Masami Hiramatsu Cc: Andrew Morton Cc: Tom Zanussi Cc: Ross Zwisler Cc: Ching-lin Yu Signed-off-by: Steven Rostedt (Google) commit 19ff80496450f58a148effa2551350f3b89e4990 Author: Steven Rostedt (Google) Date: Tue Jan 17 10:21:26 2023 -0500 tracing: Simplify calculating entry size using struct_size() When tracing a dynamic string field for a synthetic event, the offset calculation for where to write the next event can use struct_size() to find what the current size of the structure is. This simplifies the code and makes it less error prone. Link: https://lkml.kernel.org/r/20230117152235.698632147@goodmis.org Cc: Masami Hiramatsu Cc: Andrew Morton Cc: Tom Zanussi Cc: Ross Zwisler Cc: Ching-lin Yu Signed-off-by: Steven Rostedt (Google) commit 3e4272b9954094907f16861199728f14002fcaf6 Author: Jia-Ju Bai Date: Fri Jan 13 20:55:01 2023 +0800 tracing: Add NULL checks for buffer in ring_buffer_free_read_page() In a previous commit 7433632c9ff6, buffer, buffer->buffers and buffer->buffers[cpu] in ring_buffer_wake_waiters() can be NULL, and thus the related checks are added. However, in the same call stack, these variables are also used in ring_buffer_free_read_page(): tracing_buffers_release() ring_buffer_wake_waiters(iter->array_buffer->buffer) cpu_buffer = buffer->buffers[cpu] -> Add checks by previous commit ring_buffer_free_read_page(iter->array_buffer->buffer) cpu_buffer = buffer->buffers[cpu] -> No check Thus, to avod possible null-pointer derefernces, the related checks should be added. These results are reported by a static tool designed by myself. Link: https://lkml.kernel.org/r/20230113125501.760324-1-baijiaju1990@gmail.com Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai Signed-off-by: Steven Rostedt (Google) commit b56c68f705cad0cff61fbe132c66ced2c737c65c Author: Mark Rutland Date: Tue Jan 3 12:49:12 2023 +0000 ftrace: Add sample with custom ops When reworking core ftrace code or architectural ftrace code, it's often necessary to test/analyse/benchmark a number of ftrace_ops configurations. This patch adds a module which can be used to explore some of those configurations. I'm using this to benchmark various options for changing the way trampolines and handling of ftrace_ops work on arm64, and ensuring other architectures aren't adversely affected. For example, in a QEMU+KVM VM running on a 2GHz Xeon E5-2660 workstation, loading the module in various configurations produces: | # insmod ftrace-ops.ko | ftrace_ops: registering: | relevant ops: 1 | tracee: tracee_relevant [ftrace_ops] | tracer: ops_func_nop [ftrace_ops] | irrelevant ops: 0 | tracee: tracee_irrelevant [ftrace_ops] | tracer: ops_func_nop [ftrace_ops] | saving registers: NO | assist recursion: NO | assist RCU: NO | ftrace_ops: Attempted 100000 calls to tracee_relevant [ftrace_ops] in 1681558ns (16ns / call) | # insmod ftrace-ops.ko nr_ops_irrelevant=5 | ftrace_ops: registering: | relevant ops: 1 | tracee: tracee_relevant [ftrace_ops] | tracer: ops_func_nop [ftrace_ops] | irrelevant ops: 5 | tracee: tracee_irrelevant [ftrace_ops] | tracer: ops_func_nop [ftrace_ops] | saving registers: NO | assist recursion: NO | assist RCU: NO | ftrace_ops: Attempted 100000 calls to tracee_relevant [ftrace_ops] in 1693042ns (16ns / call) | # insmod ftrace-ops.ko nr_ops_relevant=2 | ftrace_ops: registering: | relevant ops: 2 | tracee: tracee_relevant [ftrace_ops] | tracer: ops_func_nop [ftrace_ops] | irrelevant ops: 0 | tracee: tracee_irrelevant [ftrace_ops] | tracer: ops_func_nop [ftrace_ops] | saving registers: NO | assist recursion: NO | assist RCU: NO | ftrace_ops: Attempted 100000 calls to tracee_relevant [ftrace_ops] in 11965582ns (119ns / call) | # insmod ftrace-ops.ko save_regs=true | ftrace_ops: registering: | relevant ops: 1 | tracee: tracee_relevant [ftrace_ops] | tracer: ops_func_nop [ftrace_ops] | irrelevant ops: 0 | tracee: tracee_irrelevant [ftrace_ops] | tracer: ops_func_nop [ftrace_ops] | saving registers: YES | assist recursion: NO | assist RCU: NO | ftrace_ops: Attempted 100000 calls to tracee_relevant [ftrace_ops] in 4459624ns (44ns / call) Link: https://lkml.kernel.org/r/20230103124912.2948963-4-mark.rutland@arm.com Cc: Florent Revest Acked-by: Masami Hiramatsu (Google) Signed-off-by: Mark Rutland Signed-off-by: Steven Rostedt (Google) commit 7f09d639b8c4959736ff112d0fb42780c37ff6db Author: Steven Rostedt (Google) Date: Mon Dec 19 13:31:08 2022 -0500 tracing/selftests: Add test for event filtering on function name With the new filter logic of passing in the name of a function to match an instruction pointer (or the address of the function), add a test to make sure that it is functional. This is also the first test to test plain filtering. The filtering has been tested via the trigger logic, which uses the same code, but there was nothing to test just the event filter, so this test is the first to add such a case. Link: https://lkml.kernel.org/r/20221219183214.075559302@goodmis.org Cc: Andrew Morton Cc: Tom Zanussi Cc: Zheng Yejian Cc: linux-kselftest@vger.kernel.org Suggested-by: Masami Hiramatsu (Google) Reviewed-by: Ross Zwisler Acked-by: Shuah Khan Signed-off-by: Steven Rostedt (Google) commit e6745a4da964f5f49b21cbcce5125456984ddc6b Author: Steven Rostedt (Google) Date: Mon Dec 19 13:31:07 2022 -0500 tracing: Add a way to filter function addresses to function names There's been several times where an event records a function address in its field and I needed to filter on that address for a specific function name. It required looking up the function in kallsyms, finding its size, and doing a compare of "field >= function_start && field < function_end". But this would change from boot to boot and is unreliable in scripts. Also, it is useful to have this at boot up, where the addresses will not be known. For example, on the boot command line: trace_trigger="initcall_finish.traceoff if func.function == acpi_init" To implement this, add a ".function" prefix, that will check that the field is of size long, and the only operations allowed (so far) are "==" and "!=". Link: https://lkml.kernel.org/r/20221219183213.916833763@goodmis.org Cc: Masami Hiramatsu Cc: Andrew Morton Cc: Tom Zanussi Cc: Zheng Yejian Reviewed-by: Ross Zwisler Signed-off-by: Steven Rostedt (Google) commit 5b909d4ae59aedc711b7a432da021be0e82c95a0 Author: Kim Phillips Date: Tue Jan 24 10:33:16 2023 -0600 x86/cpu, kvm: Add the Null Selector Clears Base feature The Null Selector Clears Base feature was being open-coded for KVM. Add it to its newly added native CPUID leaf 0x80000021 EAX proper. Also drop the bit description comments now it's more self-describing. [ bp: Convert test in check_null_seg_clears_base() too. ] Signed-off-by: Kim Phillips Signed-off-by: Borislav Petkov (AMD) Acked-by: Sean Christopherson Link: https://lore.kernel.org/r/20230124163319.2277355-6-kim.phillips@amd.com commit 936f9741a5f85a03bb109c84b63b3d225ca31465 Author: kyrie wu Date: Thu Jan 12 16:45:03 2023 +0800 arm64: dts: mt8195: add jpeg decode device node add mt8195 jpegdec device node Signed-off-by: kyrie wu Signed-off-by: irui wang Link: https://lore.kernel.org/r/20230112084503.4277-3-irui.wang@mediatek.com Signed-off-by: Matthias Brugger commit a32a371f907d66db050a34103e560b3d907f7b75 Author: kyrie wu Date: Thu Jan 12 16:45:02 2023 +0800 arm64: dts: mt8195: add jpeg encode device node add mt8195 jpegenc device node Signed-off-by: kyrie wu Signed-off-by: irui wang Link: https://lore.kernel.org/r/20230112084503.4277-2-irui.wang@mediatek.com Signed-off-by: Matthias Brugger commit 4ea6aa8902fc62bd3576eaef248067cc106f8a41 Author: Nancy.Lin Date: Fri Jan 13 18:44:34 2023 +0800 soc: mediatek: add mtk-mutex support for mt8195 vdosys1 Add mtk-mutex support for mt8195 vdosys1. The vdosys1 path component contains ovl_adaptor, merge5, and dp_intf1. Ovl_adaptor is composed of several sub-elements which include MDP_RDMA0~7, MERGE0~3, and ETHDR. Signed-off-by: Nancy.Lin Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: CK Hu Tested-by: AngeloGioacchino Del Regno Tested-by: Bo-Chen Chen Link: https://lore.kernel.org/r/20230113104434.28023-12-nancy.lin@mediatek.com Signed-off-by: Matthias Brugger commit 8150a0e3a9d49a99cbfafc950f2ed8fe448b4117 Author: Nancy.Lin Date: Fri Jan 13 18:44:33 2023 +0800 soc: mediatek: add mtk-mutex component - dp_intf1 Add mtk-mutex DDP_COMPONENT_DP_INTF1 component. The MT8195 vdosys1 path component contains ovl_adaptor, merge5, and dp_intf1. It is a preparation for adding support for MT8195 vdosys1 path component. Signed-off-by: Nancy.Lin Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: CK Hu Tested-by: AngeloGioacchino Del Regno Tested-by: Bo-Chen Chen Link: https://lore.kernel.org/r/20230113104434.28023-11-nancy.lin@mediatek.com Signed-off-by: Matthias Brugger commit 7f0a38f46b67ba15c0fb5fc6c075a74ae9bb385d Author: Nancy.Lin Date: Fri Jan 13 18:44:32 2023 +0800 soc: mediatek: mmsys: add reset control for MT8195 vdosys1 MT8195 vdosys1 has more than 32 reset bits and a different reset base than other chips. Add the number of reset bits and reset base in mmsys private data. Signed-off-by: Nancy.Lin Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: CK Hu Tested-by: AngeloGioacchino Del Regno Tested-by: Bo-Chen Chen Link: https://lore.kernel.org/r/20230113104434.28023-10-nancy.lin@mediatek.com Signed-off-by: Matthias Brugger commit 2004f8be8483ad0e5c73bcf9f5985dd4386e2061 Author: Nancy.Lin Date: Fri Jan 13 18:44:31 2023 +0800 soc: mediatek: mmsys: add mmsys for support 64 reset bits Add mmsys for support 64 reset bits. It is a preparation for MT8195 vdosys1 HW reset. MT8195 vdosys1 has more than 32 reset bits. 1. Add the number of reset bits in mmsys private data 2. move the whole "reset register code section" behind the "get mmsys->data" code section for getting the num_resets in mmsys->data. Signed-off-by: Nancy.Lin Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: CK Hu Tested-by: Bo-Chen Chen Reviewed-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20230113104434.28023-9-nancy.lin@mediatek.com Signed-off-by: Matthias Brugger commit 8af1f6b5bccb61edc40c3c00cefa7be07c1e5a91 Author: Nancy.Lin Date: Fri Jan 13 18:44:30 2023 +0800 soc: mediatek: add cmdq support of mtk-mmsys config API for mt8195 vdosys1 Add cmdq support for mtk-mmsys config API. The mmsys config register settings need to take effect with the other HW settings(like OVL_ADAPTOR...) at the same vblanking time. If we use CPU to write the mmsys reg, we can't guarantee all the settings can be written in the same vblanking time. Cmdq is used for this purpose. We prepare all the related HW settings in one cmdq packet. The first command in the packet is "wait stream done", and then following with all the HW settings. After the cmdq packet is flush to GCE HW. The GCE waits for the "stream done event" to coming and then starts flushing all the HW settings. This can guarantee all the settings flush in the same vblanking. Signed-off-by: Nancy.Lin Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: CK Hu Tested-by: AngeloGioacchino Del Regno Tested-by: Bo-Chen Chen Link: https://lore.kernel.org/r/20230113104434.28023-8-nancy.lin@mediatek.com Signed-off-by: Matthias Brugger commit 3dd20b715c4483ae5d8ddb22cbc8e116944094e4 Author: Nancy.Lin Date: Fri Jan 13 18:44:29 2023 +0800 soc: mediatek: add mtk-mmsys config API for mt8195 vdosys1 Add four mmsys config APIs. The config APIs are used for config mmsys reg. Some mmsys regs need to be set according to the HW engine binding to the mmsys simultaneously. 1. mtk_mmsys_merge_async_config: config merge async width/height. async is used for cross-clock domain synchronization. 2. mtk_mmsys_hdr_confing: config hdr backend async width/height. 3. mtk_mmsys_mixer_in_config and mtk_mmsys_mixer_in_config: config mixer related settings. Signed-off-by: Nancy.Lin Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: CK Hu Tested-by: AngeloGioacchino Del Regno Tested-by: Bo-Chen Chen Link: https://lore.kernel.org/r/20230113104434.28023-7-nancy.lin@mediatek.com Signed-off-by: Matthias Brugger commit 0a815034a52ab315befb191ef6381fbd19019793 Author: Nancy.Lin Date: Fri Jan 13 18:44:28 2023 +0800 soc: mediatek: refine code to use mtk_mmsys_update_bits API Simplify code for update mmsys reg. Signed-off-by: Nancy.Lin Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: CK Hu Tested-by: AngeloGioacchino Del Regno Tested-by: Bo-Chen Chen Reviewed-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20230113104434.28023-6-nancy.lin@mediatek.com Signed-off-by: Matthias Brugger commit 39170127c1ed12e178c31f02527cca45c2f24416 Author: Nancy.Lin Date: Fri Jan 13 18:44:27 2023 +0800 soc: mediatek: add mtk-mmsys support for mt8195 vdosys1 Add mt8195 vdosys1 routing table to the driver data of mtk-mmsys. Signed-off-by: Nancy.Lin Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rex-BC Chen Reviewed-by: CK Hu Tested-by: AngeloGioacchino Del Regno Tested-by: Bo-Chen Chen Link: https://lore.kernel.org/r/20230113104434.28023-5-nancy.lin@mediatek.com Signed-off-by: Matthias Brugger commit be234d00240cbb53d5a1fa0e58b2d14ff121dca2 Author: Nancy.Lin Date: Fri Jan 13 18:44:26 2023 +0800 soc: mediatek: add mtk-mmsys ethdr and mdp_rdma components Add new mmsys component: ethdr_mixer and mdp_rdma. These components will use in mt8195 vdosys1. Signed-off-by: Nancy.Lin Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: CK Hu Tested-by: AngeloGioacchino Del Regno Tested-by: Bo-Chen Chen Link: https://lore.kernel.org/r/20230113104434.28023-4-nancy.lin@mediatek.com Signed-off-by: Matthias Brugger commit 664a39b8e7693482f07dddcf986797d54f2427f7 Author: Nancy.Lin Date: Fri Jan 13 18:44:25 2023 +0800 dt-bindings: reset: mt8195: add vdosys1 reset control bit Add vdosys1 reset control bit for MT8195 platform. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rex-BC Chen Acked-by: Krzysztof Kozlowski Acked-by: Philipp Zabel Tested-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230113104434.28023-3-nancy.lin@mediatek.com Signed-off-by: Matthias Brugger commit 82219cfbef1805abcc050d667e71873a10963781 Author: Nancy.Lin Date: Fri Jan 13 18:44:24 2023 +0800 dt-bindings: arm: mediatek: mmsys: add vdosys1 compatible for MT8195 Add vdosys1 mmsys compatible for MT8195 platform. For MT8195, VDOSYS0 and VDOSYS1 are 2 display HW pipelines binding to 2 different power domains, different clock drivers and different mediatek-drm drivers. Signed-off-by: Nancy.Lin Reviewed-by: Nícolas F. R. A. Prado Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230113104434.28023-2-nancy.lin@mediatek.com Signed-off-by: Matthias Brugger commit c52c9acc415eb6ff54f658492f8c53da0fc3528a Author: Biju Das Date: Sat Jan 21 14:58:50 2023 +0000 xhci: host: Add Renesas RZ/V2M SoC support RZ/V2M is similar to R-Car XHCI but it doesn't require any firmware, we need to reset the USB Host reset release in DRD Module before accessing host registers. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20230121145853.4792-10-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 224eb5311d6a8c180932465873d809b48a2470bf Author: Biju Das Date: Sat Jan 21 14:58:49 2023 +0000 usb: host: xhci-plat: Add reset support Add optional reset support. This is in preparation to adding USB xHCI support for RZ/V2M SoC. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230121145853.4792-9-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 8c6e8b09617915e8af3ab7dbfecd8f0a9c7cf94f Author: Biju Das Date: Sat Jan 21 14:58:48 2023 +0000 usb: host: xhci-plat: Improve clock handling in probe() It is always better to acquire all the clock resources first and then do the clock operations. This patch acquires all the optional clocks first and then calls corresponding prepare_enable(). There is no functional change. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230121145853.4792-8-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 3827fa1ef38f52d9de7ec6e52b4f724dd7b60bb2 Author: Biju Das Date: Sat Jan 21 14:58:47 2023 +0000 usb: gadget: udc: renesas_usb3: Add role switch support for RZ/V2M As RZ/V2M has both HOST and PERI reset module, we need to do reset release before accessing registers in respective IP module. This patch adds role switch support for RZ/V2M. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20230121145853.4792-7-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 9cad72dfc5567c66ab0e5a0a2474c5f36c268694 Author: Biju Das Date: Sat Jan 21 14:58:46 2023 +0000 usb: gadget: Add support for RZ/V2M USB3DRD driver The RZ/V2M USB3.1 Gen1 Interface (USB) composed of a USB3.1 Gen1 Dual Role Device controller (USB3DRD), a USB3.1 Gen1 Host controller (USB3HOST), a USB3.1 Gen1 Peripheral controller (USB3PERI). The reset for both host and peri are located in USB3DRD block. The USB3DRD registers are mapped in the AXI address space of the Peripheral module. Add USB3DRD driver to handle reset for both host and peri modules. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20230121145853.4792-6-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 9486e56c49be7dc771ecae9bf67b1034cd440d10 Author: Biju Das Date: Sat Jan 21 14:58:45 2023 +0000 dt-bindings: usb: Add RZ/V2M USB3DRD binding Add device tree bindings for the RZ/V2{M, MA} USB3DRD module. Signed-off-by: Biju Das Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230121145853.4792-5-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 2c5502a4dc9ffb9145ef80e642be0f1f03c037e8 Author: Biju Das Date: Sat Jan 21 14:58:44 2023 +0000 dt-bindings: usb: renesas,usb3-peri: Document RZ/V2MA bindings Document RZ/V2MA usb3-peri bindings. RZ/V2MA usb3-peri is identical to one found on the RZ/V2M SoC. No driver changes are required as generic compatible string "renesas,rzv2m-usb3-peri" will be used as a fallback. Signed-off-by: Biju Das Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230121145853.4792-4-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 29218d6ce4da741f8a1a86974999e8790683c23b Author: Biju Das Date: Sat Jan 21 14:58:43 2023 +0000 dt-bindings: usb: renesas,usb3-peri: Update reset, clock-name and interrupts properties On RZ/V2M, USB3DRD module manages the drd_reset. Moreover, the interrupts drd, gpi and bc are part of USB3DRD block. This patch removes drd_reset and the interrupts drd, bc and gpi from usb3_peri bindings. After this, there is only one reset and interrupts and therefore removing reset-names and interrupt-names as well. Whilst, Update the clock-name "aclk"->"axi" to make it consistent with DRD and host blocks. There is any harm in making such a change as, no users of renesas,r9a09g011-usb3-peri yet in kernel release. Signed-off-by: Biju Das Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230121145853.4792-3-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit e696d70f600abbe2b7fe81008bcb24d239a74672 Author: Biju Das Date: Sat Jan 21 14:58:42 2023 +0000 dt-bindings: usb: renesas,usb-xhci: Document RZ/V2M support Document the RZ/V2M SoC bindings. The RZ/V2M SoC is a little different to the R-Car implementations. You can access the registers associated with the currently set DRD mode, therefore as part of init, we have to set the DRD mode to host. Signed-off-by: Biju Das Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230121145853.4792-2-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 331df1f3bbbc5e783dbf6f6100daabd40e12fb87 Author: Sing-Han Chen Date: Thu Jan 19 10:42:07 2023 +0000 usb: gadget: tegra-xudc: Add Tegra234 support This commit adds support for XUSB device mode controller support on Tegra234 SoC. This is very similar to the existing Tegra194 XUDC. Signed-off-by: Sing-Han Chen Signed-off-by: Wayne Chang Signed-off-by: Jon Hunter Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20230119104208.28726-5-jonathanh@nvidia.com Signed-off-by: Greg Kroah-Hartman commit f816267867f01ea7e8b80941ec7ba853e2901002 Author: Wayne Chang Date: Thu Jan 19 10:42:06 2023 +0000 dt-bindings: usb: tegra-xudc: Add Tegra234 XUDC support Extend the Tegra XUSB controller device (XUDC) tree binding with Tegra234 support. Signed-off-by: Wayne Chang Co-developed-by: Jon Hunter Signed-off-by: Jon Hunter Acked-by: Krzysztof Kozlowski Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20230119104208.28726-4-jonathanh@nvidia.com Signed-off-by: Greg Kroah-Hartman commit 173bee52a0f15572e4df8e2d2b4d53c34f0bee9c Author: Jon Hunter Date: Thu Jan 19 10:42:04 2023 +0000 dt-bindings: usb: tegra-xudc: Add dma-coherent for Tegra194 DMA operations for XUSB device controller are coherent for Tegra194 and so update the device-tree binding to add this property. Signed-off-by: Jon Hunter Acked-by: Thierry Reding Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230119104208.28726-2-jonathanh@nvidia.com Signed-off-by: Greg Kroah-Hartman commit ec13100fcf2374f013ac836f806d1eb0abf06194 Author: Rob Herring Date: Mon Jan 23 21:05:19 2023 -0600 dt-bindings: usb: Convert Nuvoton EHCI to DT schema The Nuvoton EHCI binding is just some compatible strings, so add it to the generic-ehci.yaml schema. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230110-dt-usb-v3-5-5af0541fcf8c@kernel.org Signed-off-by: Greg Kroah-Hartman commit c1140ebfd7bf64dbd8dae25a92a6bf8aa97276f8 Author: Rob Herring Date: Mon Jan 23 21:05:18 2023 -0600 dt-bindings: usb: Convert Marvell Orion EHCI to DT schema The Marvell Orion EHCI binding is just some compatible strings, so add it to the generic-ehci.yaml schema. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230110-dt-usb-v3-4-5af0541fcf8c@kernel.org Signed-off-by: Greg Kroah-Hartman commit 76ea4926dc8d1d68d611ebcd8a2790bc846589e6 Author: Rob Herring Date: Mon Jan 23 21:05:17 2023 -0600 dt-bindings: usb: Convert OMAP OHCI/EHCI bindings to schema The OMAP OHCI and EHCI USB host bindings follow the generic binding, so add the compatibles and remove the old txt binding docs. The examples in omap-usb-host.txt don't match actual users, so update them dropping the fallback compatible. Signed-off-by: Rob Herring Acked-by: Lee Jones Link: https://lore.kernel.org/r/20230110-dt-usb-v3-3-5af0541fcf8c@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4aa466190a2d49a90fa7a6f9dac2dd10e46fdece Author: Rob Herring Date: Mon Jan 23 21:05:16 2023 -0600 dt-bindings: usb: Convert multiple "usb-ohci" bindings to DT schema "usb-ohci" is another "generic" OHCI controller compatible string used by several platforms. Add it to the generic-ohci.yaml schema and remove all the old binding docs. Marvell pxa-usb.txt has "usb-ohci" in the example, but actual users don't, so drop it. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230110-dt-usb-v3-2-5af0541fcf8c@kernel.org Signed-off-by: Greg Kroah-Hartman commit 60c4da9f3c3c6e8fcd3a12452bcd14181e17cb2c Author: Rob Herring Date: Mon Jan 23 21:05:15 2023 -0600 dt-bindings: usb: Remove obsolete brcm,bcm3384-usb.txt The "brcm,bcm3384-ohci" and "brcm,bcm3384-ehci" compatibles are already documented in generic-ohci.yaml and generic-ehci.yaml, respectively, so remove the old txt binding. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230110-dt-usb-v3-1-5af0541fcf8c@kernel.org Signed-off-by: Greg Kroah-Hartman commit 5442e7912050bff9f866d03ee5005731dbd7a708 Author: Rob Herring Date: Mon Jan 23 20:59:36 2023 -0600 dt-bindings: usb: rockchip,dwc3: Move RK3399 to its own schema The rockchip,dwc3.yaml schema defines a single DWC3 node, but the RK3399 uses the discouraged parent wrapper node and child 'generic' DWC3 node. The intent was to modify the RK3399 DTs to use a single node, but the DT changes were rejected for ABI reasons. However, the schema was accepted as-is. To fix this, we need to move the RK3399 binding to its own schema file. The RK3328 and RK3568 bindings are correct and use a single node. Cc: Johan Jonker Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230124025936.3256213-2-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit 353a17ec62f48495a0ba8ffaac7f5ea3cebe5039 Author: Rob Herring Date: Mon Jan 23 20:59:35 2023 -0600 dt-bindings: usb: snps,dwc3: Allow power-domains property The Rockchip RK3399 DWC3 node has 'power-domains' property which isn't allowed by the schema: usb@fe900000: Unevaluated properties are not allowed ('power-domains' was unexpected) Allow DWC3 nodes to have a power-domains entry. We could instead move the power-domains property to the parent wrapper node, but the could be an ABI break (Linux shouldn't care). Also, we don't want to encourage the pattern of wrapper nodes just to define resources such as clocks, resets, power-domains, etc. when not necessary. Reviewed-by: Thinh Nguyen Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230124025936.3256213-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit e538e3614c5c5a9a692c96a76e9b06e552dc9b6c Author: Randy Dunlap Date: Tue Jan 24 15:35:11 2023 -0800 usb: fotg210: fix a Kconfig spelling mistake Correct a spelling mistake (reported by codespell). Signed-off-by: Randy Dunlap Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230124233511.23616-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 8622f5c63e779e7eaf65c6b9a8c517fd5f7947da Author: Krzysztof Kozlowski Date: Mon Jan 23 16:16:34 2023 +0100 arm64: dts: mediatek: mt8183: drop double interrupts The DTSI comes with interrupts property, so it must be removed if interrupts-extended are used: mt8183-kukui-jacuzzi-cozmo.dtb: serial@11003000: More than one condition true in oneOf schema: Signed-off-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230123151634.370011-2-krzysztof.kozlowski@linaro.org Signed-off-by: Matthias Brugger commit d198081733f5d00661977ee1d18b292544b7f0a0 Author: Krzysztof Kozlowski Date: Mon Jan 23 16:16:33 2023 +0100 arm64: dts: mediatek: mt7622: drop serial clock-names The serial node does not use clock-names: mt7622-bananapi-bpi-r64.dtb: serial@1100c000: Unevaluated properties are not allowed ('clock-names' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230123151634.370011-1-krzysztof.kozlowski@linaro.org Signed-off-by: Matthias Brugger commit 304feb6b9092a0efff25d0adc0bcdcf482bb8849 Author: Alexander Stein Date: Thu Dec 8 10:08:42 2022 +0100 arm64: dts: freescale: Add LVDS overlay for TQMa8MPxL This adds an overlay for the supported LVDS display tianma tm070jvhg33. The display timings have to be specified explicitly. Using the typical pixel clock, the LDB clock can not be configured as the 7-fold of that. By setting pixel clock to 74.25 MHz, LDB can be configured to exactly 519.75 MHz. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 01ce74463718a6ca6b71ede2e68b9ecc74d3f177 Author: Jani Nikula Date: Wed Jan 18 17:18:00 2023 +0200 drm/i915/params: use generics for parameter debugfs file creation Replace the __builtin_strcmp() if ladder with generics. Signed-off-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20230118151800.3669913-4-jani.nikula@intel.com commit 7448d336bc976984a9d6bb0b9c3c6f219c5f52ce Author: Jani Nikula Date: Wed Jan 18 17:17:59 2023 +0200 drm/i915/params: use generics for parameter free Replace the __builtin_strcmp() if ladder with generics. Signed-off-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20230118151800.3669913-3-jani.nikula@intel.com commit 7ce59bcf6750fb797451020f8d4db9822b58b1b5 Author: Jani Nikula Date: Wed Jan 18 17:17:58 2023 +0200 drm/i915/params: use generics for parameter dup Replace the __builtin_strcmp() if ladder with generics. Signed-off-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20230118151800.3669913-2-jani.nikula@intel.com commit bfe7586b118198869f707bcc6619b60904bc6070 Author: Jani Nikula Date: Wed Jan 18 17:17:57 2023 +0200 drm/i915/params: use generics for parameter printing Replace the __builtin_strcmp() if ladder with generics. Signed-off-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20230118151800.3669913-1-jani.nikula@intel.com commit 94e6197dadc9c1f01c6704e9a097e48863036c61 Author: Alexander Stein Date: Thu Dec 8 10:08:41 2022 +0100 arm64: dts: imx8mp: Add LCDIF2 & LDB nodes LCDIF2 is directly attached to the LVDS Display Bridge (LDB). Both need the same clock source (VIDEO_PLL1). Signed-off-by: Alexander Stein Tested-by: Richard Leitner Tested-by: Rasmus Villemoes Signed-off-by: Shawn Guo commit 89b045d3c2cdffbb62f81c659e69653d862feee3 Author: Balsam CHIHI Date: Tue Jan 24 14:17:14 2023 +0100 arm64: dts: mt8195: Add efuse node to mt8195 Add efuse node. This will be required by the thermal driver to get the calibration data. Signed-off-by: Balsam CHIHI Reviewed-by: Matthias Brugger Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230124131717.128660-4-bchihi@baylibre.com Signed-off-by: Matthias Brugger commit 636be128d659131739df62e08455bbf6678fc58b Author: Randy Dunlap Date: Tue Jan 24 10:17:46 2023 -0800 ASoC: Kconfig: fix spelling of "up to" Fix spelling in sound/soc/ Kconfig files: s/upto/up to/ (reported by codespell) Signed-off-by: Randy Dunlap Reviewed-by: Heiko Stuebner #rockchip Link: https://lore.kernel.org/r/20230124181746.19028-1-rdunlap@infradead.org Signed-off-by: Mark Brown commit 01270f905eea786f418cbc2040f7a52b969ef377 Author: Judy Hsiao Date: Thu Dec 8 08:42:00 2022 +0000 ASoC: qcom: lpass-platform: Use SNDRV_DMA_TYPE_NONCOHERENT page allocation Replace SNDRV_DMA_TYPE_DEV by SNDRV_DMA_TYPE_NONCOHERENT for pcm buffer allocation. We measured about 18x performance improvement when accessing the snd_pcm_mmap() buffer from userspace. Eg: aarch64 with internal speaker == SNDRV_DMA_TYPE_DEV frames_per_second=66.4557M/s max_time_per_4096_frames=106.094u time_per_4096_frames=61.6351us SNDRV_DMA_TYPE_NONCOHERENT frames_per_second=1028.58M/s max_time_per_4096_frames=20.312u time_per_4096_frames=3.98221us Signed-off-by: Judy Hsiao Link: https://lore.kernel.org/r/20221208084200.2136311-1-judyhsiao@chromium.org Signed-off-by: Mark Brown commit fc64adc56b8302ed21189607dd4b4f4719f2c78f Author: Colin Ian King Date: Fri Jan 20 09:28:42 2023 +0000 accel/ivpu: Fix spelling mistake "tansition" -> "transition" There are spelling mistakes in two ivpu_err error messages. Fix them. Signed-off-by: Colin Ian King Reviewed-by: Stanislaw Gruszka Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20230120092842.79238-1-colin.i.king@gmail.com commit 047ebaffd8171a47eb5462aec0f6006416fbe62e Author: Bjorn Andersson Date: Tue Jan 24 10:44:39 2023 -0800 regulator: Introduce Maxim MAX20411 Step-Down converter Introduce a driver to control the Maxim MAX20411 family of high-efficiency, syncrhonous step-down converters. Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230124184440.1421074-3-quic_bjorande@quicinc.com Signed-off-by: Mark Brown commit c1bf8de25d0aa6e399399d6410b1140d4402c2e0 Author: Bjorn Andersson Date: Tue Jan 24 10:44:38 2023 -0800 regulator: dt-bindings: Describe Maxim MAX20411 Add binding for the Maxim MAX20411 step-down DC-DC converter. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230124184440.1421074-2-quic_bjorande@quicinc.com Signed-off-by: Mark Brown commit 22913a63b477c5f167012d4f1265d023a102c1fe Author: Randy Dunlap Date: Tue Jan 24 15:35:02 2023 -0800 spi: Kconfig: fix a spelling mistake & hyphenation Correct a spelling mistake (reported by codespell). Also hyphenate "8-bit". Signed-off-by: Randy Dunlap Cc: Mark Brown Cc: linux-spi@vger.kernel.org Link: https://lore.kernel.org/r/20230124233502.23330-1-rdunlap@infradead.org Signed-off-by: Mark Brown commit ee8d422c91d87ebe230769b2cb89f087e56b560a Author: Krzysztof Kozlowski Date: Tue Jan 24 09:33:42 2023 +0100 spi: dt-bindings: cleanup examples - indentation, lowercase hex Cleanup examples: - use 4-space indentation (for cases when it is neither 4 not 2 space), - drop redundant blank lines, - use lowercase hex. No functional impact except adjusting to preferred coding style. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Geert Uytterhoeven # renesas Reviewed-by: Andrew Jeffery # aspeed Reviewed-by: Neil Armstrong # meson Link: https://lore.kernel.org/r/20230124083342.34869-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 99a7fa0e75a3a595a577fb5efa4b84a491f664a2 Author: Krzysztof Kozlowski Date: Tue Jan 24 09:33:41 2023 +0100 spi: dt-bindings: drop unneeded quotes Cleanup by removing unneeded quotes from refs and redundant blank lines. No functional impact except adjusting to preferred coding style. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andrew Jeffery # aspeed Reviewed-by: Neil Armstrong # meson Reviewed-by: Patrice Chotard # st Reviewed-by: Heiko Stuebner # rockchip Reviewed-by: Serge Semin # synopsys Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230124083342.34869-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 8966a72c1964f74e5a415fee8629f698ccb13342 Author: Konrad Dybcio Date: Wed Jan 18 19:18:10 2023 +0100 regulator: dt-bindings: qcom-labibb: Allow regulator-common properties Allow regulator-common properties on lab/ibb regulators, such as regulator-always-on, etc. Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230118181810.119922-1-konrad.dybcio@linaro.org Signed-off-by: Mark Brown commit 3a14adc51605452fdf1c009cc3333c7e399821d9 Author: Krzysztof Kozlowski Date: Wed Jan 18 11:15:42 2023 +0100 ASoC: qcom: sdm845: add remark about unneeded compatibles If all devices are the same or compatible, there is no single need to keep growing of_device_id list with new entries. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230118101542.96705-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit b4090b7cda255daafe816a00f2848f4f8e761786 Author: Krzysztof Kozlowski Date: Wed Jan 18 11:15:41 2023 +0100 ASoC: dt-bindings: qcom,sm8250: use fallback for SDM845 sound cards All SDM845 sound cards are compatible with each other, so use one generic fallback compatible for them. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230118101542.96705-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 73ab5b3aa59036e0e6689b0a20a5080ef7ab7c03 Author: Krzysztof Kozlowski Date: Fri Jan 20 16:30:20 2023 +0100 ASoC: dt-bindings: samsung-i2s: drop unneeded assigned-clock* assigned-clock-parents and assigned-clocks are coming from dtschema, so there is no need anymore to keep them in bindings. Their presence were also causing false positives: exynos5422-odroidxu3.dtb: i2s@3830000: Unevaluated properties are not allowed ('assigned-clock-rates' was unexpected) Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230120153020.320270-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit cc5be0e5477f53f2d4b3c9211206f34505ec17ba Author: Krzysztof Kozlowski Date: Fri Jan 20 16:30:19 2023 +0100 ASoC: dt-bindings: samsung,odroid: correct codec DAI phandles The order of codec DAI phandles is reversed - first comes HDMI (always present) and then codec (physically not present on Odroid XU4). Fixes: 97709d365bbd ("ASoC: dt-bindings: Centralize the 'sound-dai' definition") Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230120153020.320270-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 27681129b089d9a5d597a05f6e1821eb6d82919b Author: Krzysztof Kozlowski Date: Tue Jan 24 17:39:53 2023 +0100 ASoC: codecs: wsa88xx: remove unneeded includes Remove unneeded includes from wsa881x and wsa883x drivers. The drivers do not reference anything from the headers. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230124163953.345949-3-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 57dc05c4e6faaab5d8e7fb631f285120d7ed4b07 Author: Krzysztof Kozlowski Date: Tue Jan 24 17:39:52 2023 +0100 ASoC: codecs: constify static sdw_port_config struct The struct sdw_port_config is not modified, so make it a const for code safety. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230124163953.345949-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 65b7b869da9bd3bd0b9fa60e6fe557bfbc0a75e8 Author: Krzysztof Kozlowski Date: Tue Jan 24 17:39:51 2023 +0100 ASoC: codecs: constify static sdw_slave_ops struct The struct sdw_slave_ops is not modified and sdw_driver takes pointer to const, so make it a const for code safety. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230124163953.345949-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 84168ae786f8a15a7eb0f79d34f20b8d261ce2f5 Author: Kim Phillips Date: Tue Jan 24 10:33:15 2023 -0600 x86/cpu, kvm: Move X86_FEATURE_LFENCE_RDTSC to its native leaf The LFENCE always serializing feature bit was defined as scattered LFENCE_RDTSC and its native leaf bit position open-coded for KVM. Add it to its newly added CPUID leaf 0x80000021 EAX proper. With LFENCE_RDTSC in its proper place, the kernel's set_cpu_cap() will effectively synthesize the feature for KVM going forward. Also, DE_CFG[1] doesn't need to be set on such CPUs anymore. [ bp: Massage and merge diff from Sean. ] Signed-off-by: Kim Phillips Signed-off-by: Borislav Petkov (AMD) Acked-by: Sean Christopherson Link: https://lore.kernel.org/r/20230124163319.2277355-5-kim.phillips@amd.com commit acc855d30194b5c862e5aa0fc95e9debfc8ffea2 Author: Jani Nikula Date: Mon Jan 16 18:46:44 2023 +0200 drm/i915/display: add intel_display_limits.h for key enums Move a handful of key enums to a new file intel_display_limits.h. These are the enum types, and the MAX/NUM enumerations within them, that are used in other headers. Otherwise, there's no common theme between them. Replace intel_display.h include with intel_display_limit.h where relevant, and add the intel_display.h include directly in the .c files where needed. Since intel_display.h is used almost everywhere in display/, include it from intel_display_types.h to avoid massive changes across the board. There are very few files that would need intel_display_types.h but not intel_display.h so this is neglible, and further cleanup between these headers can be left for the future. Overall this change drops the direct and indirect dependencies on intel_display.h from about 300 to about 100 compilation units, because we can drop the include from i915_drv.h. Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Acked-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230116164644.1752009-1-jani.nikula@intel.com commit eee838e40a621168993515b4b50cc1545857df8f Author: Jani Nikula Date: Tue Jan 17 14:33:09 2023 +0200 drm/i915/gmch: move VGA set state to GMCH code This is the only user for the GMCH bridge device in display. Move it to GMCH code. Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Acked-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/9bd50fe508246a547cf6e7abfe44ed686a4b3e3a.1673958757.git.jani.nikula@intel.com commit b1e7d8b008439615df69ba632d66098004a5367d Author: Jani Nikula Date: Tue Jan 17 14:33:08 2023 +0200 drm/i915/gmch: mass rename dev_priv to i915 Prefer the contemporary naming. Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Acked-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/3e4aaadeb4a027165f5724027963aa5e8d747190.1673958757.git.jani.nikula@intel.com commit a13144e2286b0fbabd0794218ee699e37a8d4210 Author: Jani Nikula Date: Tue Jan 17 14:33:07 2023 +0200 drm/i915/gmch: split out soc/intel_gmch The GMCH related code is a bit too low level and out of place for the high level i915_driver.c file. Split out to a separate file under soc/. Rename the functions accordingly. Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Acked-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/980a5e08b397bc0dbccf93cd84798772233ce75c.1673958757.git.jani.nikula@intel.com commit 9bd5de4abd444fd4466150091d4bb38ef2052e8d Author: Jani Nikula Date: Tue Jan 17 14:33:06 2023 +0200 drm/i915: add gmch substruct to struct drm_i915_private Group the GMCH related members together. Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Acked-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/c10c8f16cb5d12041e009f788bd9810225d6962d.1673958757.git.jani.nikula@intel.com commit a9dc9ec5a1fafc3d2fe7a7b594eefaeaccf89a6b Author: Kim Phillips Date: Tue Jan 24 10:33:14 2023 -0600 x86/cpu, kvm: Add the NO_NESTED_DATA_BP feature The "Processor ignores nested data breakpoints" feature was being open-coded for KVM. Add the feature to its newly introduced CPUID leaf 0x80000021 EAX proper. Signed-off-by: Kim Phillips Signed-off-by: Borislav Petkov (AMD) Acked-by: Sean Christopherson Link: https://lore.kernel.org/r/20230124163319.2277355-4-kim.phillips@amd.com commit cb3ea4b7671b7cfbac3ee609976b790aebd0bbda Author: Jens Axboe Date: Tue Jan 24 08:23:20 2023 -0700 x86/fpu: Don't set TIF_NEED_FPU_LOAD for PF_IO_WORKER threads We don't set it on PF_KTHREAD threads as they never return to userspace, and PF_IO_WORKER threads are identical in that regard. As they keep running in the kernel until they die, skip setting the FPU flag on them. More of a cosmetic thing that was found while debugging and issue and pondering why the FPU flag is set on these threads. Signed-off-by: Jens Axboe Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/560c844c-f128-555b-40c6-31baff27537f@kernel.dk commit 4c382d723edce1b3c72b55b1b505cf5526a56afc Author: Brian Gerst Date: Tue Jan 24 13:40:19 2023 -0500 x86/vdso: Move VDSO image init to vdso2c generated code Generate an init function for each VDSO image, replacing init_vdso() and sysenter_setup(). Signed-off-by: Brian Gerst Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230124184019.26850-1-brgerst@gmail.com commit c35ac8c4bf600ee23bacb20f863aa7830efb23fb Author: Kim Phillips Date: Tue Jan 24 10:33:13 2023 -0600 KVM: x86: Move open-coded CPUID leaf 0x80000021 EAX bit propagation code Move code from __do_cpuid_func() to kvm_set_cpu_caps() in preparation for adding the features in their native leaf. Also drop the bit description comments as it will be more self-describing once the individual features are added. Whilst there, switch to using the more efficient cpu_feature_enabled() instead of static_cpu_has(). Note, LFENCE_RDTSC and "NULL selector clears base" are currently synthetic, Linux-defined feature flags as Linux tracking of the features predates AMD's definition. Keep the manual propagation of the flags from their synthetic counterparts until the kernel fully converts to AMD's definition, otherwise KVM would stop synthesizing the flags as intended. Signed-off-by: Kim Phillips Signed-off-by: Borislav Petkov (AMD) Acked-by: Sean Christopherson Link: https://lore.kernel.org/r/20230124163319.2277355-3-kim.phillips@amd.com commit 8415a74852d7c24795007ee9862d25feb519007c Author: Kim Phillips Date: Tue Jan 10 16:46:37 2023 -0600 x86/cpu, kvm: Add support for CPUID_80000021_EAX Add support for CPUID leaf 80000021, EAX. The majority of the features will be used in the kernel and thus a separate leaf is appropriate. Include KVM's reverse_cpuid entry because features are used by VM guests, too. [ bp: Massage commit message. ] Signed-off-by: Kim Phillips Signed-off-by: Borislav Petkov (AMD) Acked-by: Sean Christopherson Link: https://lore.kernel.org/r/20230124163319.2277355-2-kim.phillips@amd.com commit 54628de6792bfa86a8d73520b6fa0029971f9fc6 Author: Randy Dunlap Date: Tue Jan 24 10:17:53 2023 -0800 x86/Kconfig: Fix spellos & punctuation Fix spelling (reported by codespell) & punctuation in arch/x86/ Kconfig. Signed-off-by: Randy Dunlap Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230124181753.19309-1-rdunlap@infradead.org commit d9c36d016f6112e636f18a49a5f779c7f8667deb Merge: 093ee97e24f85 497e6b37b0099 Author: Conor Dooley Date: Wed Jan 25 11:09:32 2023 +0000 Merge patch series "Add a devicetree for the Aldec PolarFire SoC TySoM" As it says on the tin, add a DT for this board. It's been sitting on my desk for a while, so may as well have it upstream... The DT is only partially complete, as it needs the fabric content added. Unfortunately, I don't have a reference design in RTL or SmartDesign for it and therefore don't know what that fabric content is. Signed-off-by: Conor Dooley commit 497e6b37b0099dc415578488287fd84fb74433eb Author: Conor Dooley Date: Wed Jan 11 12:41:07 2023 +0000 riscv: dts: microchip: add the Aldec TySoM's devicetree The TySOM-M-MPFS250 is a compact SoC prototyping board featuring a Microchip PolarFire SoC MPFS250T-FCG1152. Features include: - 16 Gib FPGA DDR4 - 16 Gib MSS DDR4 with ECC - eMMC - SPI flash memory - 2x Ethernet 10/100/1000 - USB 2.0 - PCIe x4 Gen2 - HDMI OUT - 2x FMC connector (HPC and LPC) Specifically flag this board as rev2, in case later boards have an FPGA design revision with more features available in the future. Link: https://www.aldec.com/en/products/emulation/tysom_boards/polarfire_microchip/tysom_m_mpfs250 [Fixed a mistake where I read 16 Gib as 16 GiB!] Signed-off-by: Conor Dooley commit 2f599c3ff4e6f89dfd27fe2f4e1a4c040ba5f92f Author: Sam Protsenko Date: Tue Jul 26 23:07:39 2022 +0300 iommu/exynos: Implement fault handling on SysMMU v7 SysMMU v7 has a bit different registers for getting the fault info: - there is one single register (MMU_FAULT_VA) to get the fault address - fault access type (R/W) can be read from MMU_FAULT_TRANS_INFO register now - interrupt status register has different bits w.r.t. previous SysMMU versions - VM and non-VM layouts have different register addresses Add correct fault handling implementation for SysMMU v7, according to all mentioned differences. Only VID #0 (default) is handled, as VM domains support is not implemented yet. Signed-off-by: Sam Protsenko Link: https://lore.kernel.org/r/20220726200739.30017-3-semen.protsenko@linaro.org Signed-off-by: Joerg Roedel commit c64074bfe2abbe18a57eb19c95f686298e8692b5 Author: Sam Protsenko Date: Tue Jul 26 23:07:38 2022 +0300 iommu/exynos: Abstract getting the fault info Fault info obtaining is implemented for SysMMU v1..v5 in a very hardware specific way, as it relies on: - interrupt bits being tied to read or write access - having separate registers for the fault address w.r.t. AR/AW ops Newer SysMMU versions (like SysMMU v7) have different way of providing the fault info via registers: - the transaction type (read or write) should be read from the register (instead of hard-coding it w.r.t. corresponding interrupt status bit) - there is only one single register for storing the fault address Because of that, it is not possible to add newer SysMMU support into existing paradigm. Also it's not very effective performance-wise: - checking SysMMU version in ISR each time is not necessary - performing linear search to find the fault info by interrupt bit can be replaced with a single lookup operation Pave the way for adding support for new SysMMU versions by abstracting the getting of fault info in ISR. While at it, do some related style cleanups as well. This is mostly a refactoring patch, but there are some minor functional changes: - fault message format is a bit different; now instead of AR/AW prefixes for the fault's name, the request direction is printed as [READ]/[WRITE]. It has to be done to prepare an abstraction for SysMMU v7 support - don't panic on unknown interrupts; print corresponding message and continue - if fault wasn't recovered, panic with some sane message instead of just doing BUG_ON() The whole fault message looks like this now: [READ] PAGE FAULT occurred at 0x12341000 Signed-off-by: Sam Protsenko Acked-by: Marek Szyprowski Link: https://lore.kernel.org/r/20220726200739.30017-2-semen.protsenko@linaro.org Signed-off-by: Joerg Roedel commit 1505e7215eb73b20bb2bcc7c4a7e328c615811d7 Author: Yoshihiro Shimoda Date: Thu Jan 19 22:18:33 2023 +0900 dt-bindings: iommu: renesas,ipmmu-vmsa: add r8a779g0 support Document the compatible values for the IPMMU-VMSA blocks in the Renesas R-Car V4H (R8A779G0) SoC. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20230119131833.1008752-1-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Joerg Roedel commit ff489fe002ab20daf0985f119682474cfda83496 Merge: 5cef282e295f7 429f27e36874e Author: Joerg Roedel Date: Wed Jan 25 11:54:58 2023 +0100 Merge branch 'iommu-memory-accounting' into core Merge patch-set from Jason: "Let iommufd charge IOPTE allocations to the memory cgroup" Description: IOMMUFD follows the same design as KVM and uses memory cgroups to limit the amount of kernel memory a iommufd file descriptor can pin down. The various internal data structures already use GFP_KERNEL_ACCOUNT to charge its own memory. However, one of the biggest consumers of kernel memory is the IOPTEs stored under the iommu_domain and these allocations are not tracked. This series is the first step in fixing it. The iommu driver contract already includes a 'gfp' argument to the map_pages op, allowing iommufd to specify GFP_KERNEL_ACCOUNT and then having the driver allocate the IOPTE tables with that flag will capture a significant amount of the allocations. Update the iommu_map() API to pass in the GFP argument, and fix all call sites. Replace iommu_map_atomic(). Audit the "enterprise" iommu drivers to make sure they do the right thing. Intel and S390 ignore the GFP argument and always use GFP_ATOMIC. This is problematic for iommufd anyhow, so fix it. AMD and ARM SMMUv2/3 are already correct. A follow up series will be needed to capture the allocations made when the iommu_domain itself is allocated, which will complete the job. Link: https://lore.kernel.org/linux-iommu/0-v3-76b587fe28df+6e3-iommu_map_gfp_jgg@nvidia.com/ commit 429f27e36874e34727a1f8495be2ea3a7060732c Author: Jason Gunthorpe Date: Mon Jan 23 16:36:03 2023 -0400 iommu/s390: Use GFP_KERNEL in sleepable contexts These contexts are sleepable, so use the proper annotation. The GFP_ATOMIC was added mechanically in the prior patches. Reviewed-by: Niklas Schnelle Reviewed-by: Matthew Rosato Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/10-v3-76b587fe28df+6e3-iommu_map_gfp_jgg@nvidia.com Signed-off-by: Joerg Roedel commit d3b82825217aab0ed56e2426a0d07af2e2ebd7df Author: Jason Gunthorpe Date: Mon Jan 23 16:36:02 2023 -0400 iommu/s390: Push the gfp parameter to the kmem_cache_alloc()'s dma_alloc_cpu_table() and dma_alloc_page_table() are eventually called by iommufd through s390_iommu_map_pages() and it should not be forced to atomic. Thread the gfp parameter through the call chain starting from s390_iommu_map_pages(). Reviewed-by: Niklas Schnelle Reviewed-by: Matthew Rosato Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/9-v3-76b587fe28df+6e3-iommu_map_gfp_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 4951eb262384c24602b61b97d0bedcb54c3e4c9f Author: Jason Gunthorpe Date: Mon Jan 23 16:36:01 2023 -0400 iommu/intel: Use GFP_KERNEL in sleepable contexts These contexts are sleepable, so use the proper annotation. The GFP_ATOMIC was added mechanically in the prior patches. Reviewed-by: Lu Baolu Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/8-v3-76b587fe28df+6e3-iommu_map_gfp_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 2d4d767659ff4d48464836a0a6de47e7540c6b13 Author: Jason Gunthorpe Date: Mon Jan 23 16:36:00 2023 -0400 iommu/intel: Support the gfp argument to the map_pages op Flow it down to alloc_pgtable_page() via pfn_to_dma_pte() and __domain_mapping(). Reviewed-by: Kevin Tian Reviewed-by: Lu Baolu Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/7-v3-76b587fe28df+6e3-iommu_map_gfp_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 2552d3a2292aa9bc14e84afe846027e9bd98eb78 Author: Jason Gunthorpe Date: Mon Jan 23 16:35:59 2023 -0400 iommu/intel: Add a gfp parameter to alloc_pgtable_page() This is eventually called by iommufd through intel_iommu_map_pages() and it should not be forced to atomic. Push the GFP_ATOMIC to all callers. Reviewed-by: Kevin Tian Reviewed-by: Lu Baolu Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/6-v3-76b587fe28df+6e3-iommu_map_gfp_jgg@nvidia.com Signed-off-by: Joerg Roedel commit e787a38e31e57c35682d363e71891956d804f7e3 Author: Jason Gunthorpe Date: Mon Jan 23 16:35:58 2023 -0400 iommufd: Use GFP_KERNEL_ACCOUNT for iommu_map() iommufd follows the same design as KVM and uses memory cgroups to limit the amount of kernel memory a iommufd file descriptor can pin down. The various internal data structures already use GFP_KERNEL_ACCOUNT. However, one of the biggest consumers of kernel memory is the IOPTEs stored under the iommu_domain. Many drivers will allocate these at iommu_map() time and will trivially do the right thing if we pass in GFP_KERNEL_ACCOUNT. Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/5-v3-76b587fe28df+6e3-iommu_map_gfp_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 96d57808808595d33f98cef5b3c0f75dde6a72f2 Author: Jason Gunthorpe Date: Mon Jan 23 16:35:57 2023 -0400 iommu/dma: Use the gfp parameter in __iommu_dma_alloc_noncontiguous() This function does an allocation of a buffer to return to the caller and then goes on to allocate some internal memory, eg the scatterlist and IOPTEs. Instead of hard wiring GFP_KERNEL and a wrong GFP_ATOMIC, continue to use the passed in gfp flags for all of the allocations. Clear the zone and policy bits that are only relevant for the buffer allocation before re-using them for internal allocations. Auditing says this is never called from an atomic context, so the GFP_ATOMIC is the incorrect flag. Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/4-v3-76b587fe28df+6e3-iommu_map_gfp_jgg@nvidia.com Signed-off-by: Joerg Roedel commit f2b2c051be6262edc3c6fce50d3d4f01b59ba228 Author: Jason Gunthorpe Date: Mon Jan 23 16:35:56 2023 -0400 iommu: Add a gfp parameter to iommu_map_sg() Follow the pattern for iommu_map() and remove iommu_map_sg_atomic(). This allows __iommu_dma_alloc_noncontiguous() to use a GFP_KERNEL allocation here, based on the provided gfp flags. Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/3-v3-76b587fe28df+6e3-iommu_map_gfp_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 4dc6376af596d9b2a46fa9baf94c9f2fa5a3d246 Author: Jason Gunthorpe Date: Mon Jan 23 16:35:55 2023 -0400 iommu: Remove iommu_map_atomic() There is only one call site and it can now just pass the GFP_ATOMIC to the normal iommu_map(). Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/2-v3-76b587fe28df+6e3-iommu_map_gfp_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 1369459b2e219a6f4c861404c4f195cd81dcbb40 Author: Jason Gunthorpe Date: Mon Jan 23 16:35:54 2023 -0400 iommu: Add a gfp parameter to iommu_map() The internal mechanisms support this, but instead of exposting the gfp to the caller it wrappers it into iommu_map() and iommu_map_atomic() Fix this instead of adding more variants for GFP_KERNEL_ACCOUNT. Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/1-v3-76b587fe28df+6e3-iommu_map_gfp_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 5cef282e295f7cf623672470d040716d1e3eacf2 Author: Thierry Reding Date: Fri Jan 20 18:42:51 2023 +0100 iommu: dma: Use of_iommu_get_resv_regions() For device tree nodes, use the standard of_iommu_get_resv_regions() implementation to obtain the reserved memory regions associated with a device. Cc: Rob Herring Cc: Frank Rowand Cc: devicetree@vger.kernel.org Acked-by: Robin Murphy Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20230120174251.4004100-5-thierry.reding@gmail.com Signed-off-by: Joerg Roedel commit a5bf3cfce8cb77d9d24613ab52d520896f83dd48 Author: Thierry Reding Date: Fri Jan 20 18:42:50 2023 +0100 iommu: Implement of_iommu_get_resv_regions() This is an implementation that IOMMU drivers can use to obtain reserved memory regions from a device tree node. It uses the reserved-memory DT bindings to find the regions associated with a given device. If these regions are marked accordingly, identity mappings will be created for them in the IOMMU domain that the devices will be attached to. Cc: Frank Rowand Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring Acked-by: Robin Murphy Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20230120174251.4004100-4-thierry.reding@gmail.com Signed-off-by: Joerg Roedel commit af0d81357cc558ff40968b4e04131e08ae540127 Author: Thierry Reding Date: Fri Jan 20 18:42:49 2023 +0100 dt-bindings: reserved-memory: Document iommu-addresses This adds the "iommu-addresses" property to reserved-memory nodes, which allow describing the interaction of memory regions with IOMMUs. Two use- cases are supported: 1. Static mappings can be described by pairing the "iommu-addresses" property with a "reg" property. This is mostly useful for adopting firmware-allocated buffers via identity mappings. One common use- case where this is required is if early firmware or bootloaders have set up a bootsplash framebuffer that a display controller is actively scanning out from during the operating system boot process. 2. If an "iommu-addresses" property exists without a "reg" property, the reserved-memory node describes an IOVA reservation. Such memory regions are excluded from the IOVA space available to operating system drivers and can be used for regions that must not be used to map arbitrary buffers. Each mapping or reservation is tied to a specific device via a phandle to the device's device tree node. This allows a reserved-memory region to be reused across multiple devices. Reviewed-by: Rob Herring Reviewed-by: Robin Murphy Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20230120174251.4004100-3-thierry.reding@gmail.com Signed-off-by: Joerg Roedel commit e251c21372c07694f547afe3c9828f7f6ef01267 Author: Thierry Reding Date: Fri Jan 20 18:42:48 2023 +0100 of: Introduce of_translate_dma_region() This function is similar to of_translate_dma_address() but also reads a length in addition to an address from a device tree property. Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20230120174251.4004100-2-thierry.reding@gmail.com Signed-off-by: Joerg Roedel commit 9e6132179a62f170b7131e4d5efe84f3092c28e2 Merge: b7bfaa761d760 8a24401701aa6 Author: Joerg Roedel Date: Wed Jan 25 11:44:02 2023 +0100 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.3 - Device-tree binding updates: * Cater for three power domains on SM6375 * Document existing compatible strings for Qualcomm SoCs * Tighten up clocks description for platform-specific compatible strings - Enable Qualcomm workarounds for some additional platforms that need them commit 60e6cca8a2610379c1d29cdc8db42c020de28d8d Author: Krzysztof Kozlowski Date: Mon Jan 23 16:15:27 2023 +0100 ARM: dts: cx92755: align UART node name with bindings Bindings expect UART/serial node names to be "serial". Acked-by: Baruch Siach Link: https://lore.kernel.org/r/20230123151527.369285-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 5e4505d22f2c3c739bdd063e5348bca3ff34dae2 Author: Krzysztof Kozlowski Date: Mon Jan 23 16:15:23 2023 +0100 ARM: dts: mstar: align UART node name with bindings Bindings expect UART/serial node names to be "serial". Reviewed-by: Daniel Palmer Link: https://lore.kernel.org/r/20230123151523.369225-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 31395fba97f2bbe33237125e2dc97b4c998d0b68 Author: Ville Syrjälä Date: Tue Jan 24 16:46:28 2023 +0200 drm/i915/audio: Clean up the PCH type checks Use explicit PCH type checks to make it more clear which platforms use which codepaths. Also reorder the branches in ibx_audio_regs_init() a bit to be more in chronological order. Cc: Chaitanya Kumar Borah Cc: Takashi Iwai Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230124144628.4649-14-ville.syrjala@linux.intel.com commit 7e95cb0963f021dc3e84b3eb012981ecf0bdf3d6 Author: Ville Syrjälä Date: Tue Jan 24 16:46:27 2023 +0200 drm/i915/audio: s/ilk/ibx/ Rename the ilk stuff to ibx, as the audio logic lives in the PCH. The only exception are VLV/CHV but their audio hardware was stolen from ibx so the name still fits. Also most of the register defines also use the IBX namespace. Cc: Chaitanya Kumar Borah Cc: Takashi Iwai Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230124144628.4649-13-ville.syrjala@linux.intel.com commit ba9f03fd896bfac5ef53c9fc9da1a0fec7de303f Author: Ville Syrjälä Date: Tue Jan 24 16:46:26 2023 +0200 drm/i915/audio: Include ELD in the state dump Include the ELD has a hex blob in the crtc state dump. Cc: Chaitanya Kumar Borah Cc: Takashi Iwai Reviewed-by: Jani Nikula Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230124144628.4649-12-ville.syrjala@linux.intel.com commit 8b5a2aedd298c433af9c89d338c949a4f703d5c9 Author: Ville Syrjälä Date: Tue Jan 24 16:46:25 2023 +0200 drm/i915/audio: Hook up ELD into the state checker Have the state checker validate the ELD. For now we'll just dump it out as a hex buffer on a mismatch, maybe someone will get inspired to decode it properly at some point... Cc: Chaitanya Kumar Borah Cc: Takashi Iwai Reviewed-by: Jani Nikula Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230124144628.4649-11-ville.syrjala@linux.intel.com commit 72715b54d4601dca6ebfdaee8a5d327d4441e95f Author: Ville Syrjälä Date: Tue Jan 24 16:46:24 2023 +0200 drm/i915/sdvo: Do ELD hardware readout Read out the ELD from the hw so the state checker can verify it. v2: Check the "ELD valid" bit separately v3: Fix ELD tx rate handling during readout Cc: Chaitanya Kumar Borah Cc: Takashi Iwai Reviewed-by: Jani Nikula #v1 Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230124144628.4649-10-ville.syrjala@linux.intel.com commit b9c92d78151f330524e90ac3ed21568b87c7cec3 Author: Ville Syrjälä Date: Tue Jan 24 16:46:23 2023 +0200 drm/i915/sdvo: Only use "presence detect" for has_audio readout Align the SDVO audio code with the native HDMI/DP audio and use just the "presence detect" bit for the has_audio readout. The "ELD valid" bit will be used for ELD readout soon. Cc: Chaitanya Kumar Borah Cc: Takashi Iwai Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230124144628.4649-9-ville.syrjala@linux.intel.com commit 8e10cd133de3dd4557eec0f4b9853f4e72b40eba Author: Ville Syrjälä Date: Tue Jan 24 16:46:22 2023 +0200 drm/i915/sdvo: Precompute the ELD Use the precomputed crtc_state->eld for audio setup on SDVO just like we do with native HDMI. Cc: Chaitanya Kumar Borah Cc: Takashi Iwai Reviewed-by: Jani Nikula Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230124144628.4649-8-ville.syrjala@linux.intel.com commit 61a60df6271fae484f3871fcbd91ecdd89a3fff3 Author: Ville Syrjälä Date: Tue Jan 24 16:46:21 2023 +0200 drm/i915/audio: Hardware ELD readout Read out the ELD from the hardware buffer, or from our stashed copy for the audio component, so that we can hook up the state checker to validate it. v2: Deal with the platforms using acomp Cc: Chaitanya Kumar Borah Cc: Takashi Iwai Reviewed-by: Jani Nikula #v1 Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230124144628.4649-7-ville.syrjala@linux.intel.com commit d6393793848550e22cf7f4263f1a520b987d589a Author: Ville Syrjälä Date: Tue Jan 24 16:46:20 2023 +0200 drm/i915/audio: Don't enable audio with bogus ELD Currently we just print a debug message if the ELD is bogus. Maybe we should just not enable audio at all in that case? Cc: Chaitanya Kumar Borah Cc: Takashi Iwai Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230124144628.4649-6-ville.syrjala@linux.intel.com commit 5d986635e2969a7eba8a8b475744256d3fec6160 Author: Ville Syrjälä Date: Tue Jan 24 16:46:19 2023 +0200 drm/i915/audio: Precompute the ELD Stash the ELD into the crtc_state and precompute it. This gets rid of the ugly ELD mutation during intel_audio_codec_enable(), and opens the door for the state checker. v2: Make another copy for the acomp hooks (Chaitanya) Split out the bogus ELD handling change (Jani) Cc: Chaitanya Kumar Borah Cc: Takashi Iwai Reviewed-by: Jani Nikula #v1 Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230124144628.4649-5-ville.syrjala@linux.intel.com commit c7104c382b10b9ea020ee6bca8ab9644770925a9 Author: Ville Syrjälä Date: Tue Jan 24 16:46:18 2023 +0200 drm/i915/audio: Introduce a struct for the acomp audio state Currently we're spreading the stashed state for use of the audio component hooks all over the place. Start collecting it up into a single spot. Cc: Chaitanya Kumar Borah Cc: Takashi Iwai Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230124144628.4649-4-ville.syrjala@linux.intel.com commit 68470541e630bb43f047cd372cc49489c0e82084 Author: Ville Syrjälä Date: Tue Jan 24 16:46:17 2023 +0200 drm/i915/audio: Don't program the hardware ELD buffer on hsw+ Since we use the audio component to transfer the ELD to the audio driver on hsw+ platforms there is no point in even programming the hardware ELD buffer. Stop doing so. The one slight caveat here is that this is not strictly legal according to the HDA spec. PD=1;ELD=0 is only documented as an intermediate state during modeset. But if there is no hardware that depends on that then I guess we're fine. Or we could perhaps set ELD=1 without actually programming the buffer? Note that the bspec sequence of PD=0;ELD=0 -> PD=1;ELD=0 -> PD=1;ELD=1 is also not strictly correct according to the HDA spec, as the only documented transition from PD=0;ELD=0 is straight to PD=1;ELD=1. Additionally on hsw/bdw the hardware buffer is tied in with the dedicated display HDA controller's power state, so currently we mostly fail at proramming the buffer anyway. When the HDA side is not sufficiently powered up the ELD address bits get stuck and the ELD data register accesses go nowhere. Cc: Chaitanya Kumar Borah Cc: Takashi Iwai References: https://lore.kernel.org/intel-gfx/20221012104936.30911-1-ville.syrjala@linux.intel.com/ Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230124144628.4649-3-ville.syrjala@linux.intel.com commit 343cb0f9234ec5f5d86e47c33d2c6fa649cef2fa Author: Ville Syrjälä Date: Tue Jan 24 16:46:16 2023 +0200 drm/i915/audio: Don't program the hardware ELD buffer on ilk+ Since we use the audio component to transfer the ELD to the audio driver on ilk+ platforms there is no point in even programming the hardware ELD buffer. Stop doing so. The one slight caveat here is that this is not strictly legal according to the HDA spec. PD=1;ELD=0 is only documented as an intermediate state during modeset. But if there is no hardware that depends on that then I guess we're fine. Or we could perhaps set ELD=1 without actually programming the buffer? Note that the bspec sequence of PD=0;ELD=0 -> PD=1;ELD=0 -> PD=1;ELD=1 is also not strictly correct according to the HDA spec, as the only documented transition from PD=0;ELD=0 is straight to PD=1;ELD=1. But that is not even possible on these platforms as the bits live in different registers. Cc: Chaitanya Kumar Borah Cc: Takashi Iwai Reviewed-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230124144628.4649-2-ville.syrjala@linux.intel.com commit f5be9caf7bf022ab550f62ea68f1c1bb8f5287ee Author: Vladimir Oltean Date: Tue Jan 24 13:13:28 2023 +0200 net: ethtool: fix NULL pointer dereference in pause_prepare_data() In the following call path: ethnl_default_dumpit -> ethnl_default_dump_one -> ctx->ops->prepare_data -> pause_prepare_data struct genl_info *info will be passed as NULL, and pause_prepare_data() dereferences it while getting the extended ack pointer. To avoid that, just set the extack to NULL if "info" is NULL, since the netlink extack handling messages know how to deal with that. The pattern "info ? info->extack : NULL" is present in quite a few other "prepare_data" implementations, so it's clear that it's a more general problem to be dealt with at a higher level, but the code should have at least adhered to the current conventions to avoid the NULL dereference. Fixes: 04692c9020b7 ("net: ethtool: netlink: retrieve stats from multiple sources (eMAC, pMAC)") Reported-by: Eric Dumazet Signed-off-by: Vladimir Oltean Reported-by: syzbot+9d44aae2720fc40b8474@syzkaller.appspotmail.com Signed-off-by: David S. Miller commit c96de136329b38172f21214021fc30d67f05c399 Author: Vladimir Oltean Date: Tue Jan 24 13:08:01 2023 +0200 net: ethtool: fix NULL pointer dereference in stats_prepare_data() In the following call path: ethnl_default_dumpit -> ethnl_default_dump_one -> ctx->ops->prepare_data -> stats_prepare_data struct genl_info *info will be passed as NULL, and stats_prepare_data() dereferences it while getting the extended ack pointer. To avoid that, just set the extack to NULL if "info" is NULL, since the netlink extack handling messages know how to deal with that. The pattern "info ? info->extack : NULL" is present in quite a few other "prepare_data" implementations, so it's clear that it's a more general problem to be dealt with at a higher level, but the code should have at least adhered to the current conventions to avoid the NULL dereference. Fixes: 04692c9020b7 ("net: ethtool: netlink: retrieve stats from multiple sources (eMAC, pMAC)") Reported-by: Eric Dumazet Signed-off-by: Vladimir Oltean Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller commit 99db6fb04317c289528e0d51d65c41938a375621 Merge: d0671115869d1 8c81ba20349da Author: David S. Miller Date: Wed Jan 25 09:46:49 2023 +0000 Merge branch 's390-ism-generalized-interface' Jan Karcher says: ==================== drivers/s390/net/ism: Add generalized interface Previously, there was no clean separation between SMC-D code and the ISM device driver.This patch series addresses the situation to make ISM available for uses outside of SMC-D. In detail: SMC-D offers an interface via struct smcd_ops, which only the ISM module implements so far. However, there is no real separation between the smcd and ism modules, which starts right with the ISM device initialization, which calls directly into the SMC-D code. This patch series introduces a new API in the ISM module, which allows registration of arbitrary clients via include/linux/ism.h: struct ism_client. Furthermore, it introduces a "pure" struct ism_dev (i.e. getting rid of dependencies on SMC-D in the device structure), and adds a number of API calls for data transfers via ISM (see ism_register_dmb() & friends). Still, the ISM module implements the SMC-D API, and therefore has a number of internal helper functions for that matter. Note that the ISM API is consciously kept thin for now (as compared to the SMC-D API calls), as a number of API calls are only used with SMC-D and hardly have any meaningful usage beyond SMC-D, e.g. the VLAN-related calls. v1 -> v2: Removed s390x dependency which broke config for other archs. ==================== Signed-off-by: David S. Miller commit 8c81ba20349daf9f7e58bb05a0c12f4b71813a30 Author: Stefan Raspl Date: Mon Jan 23 19:17:52 2023 +0100 net/smc: De-tangle ism and smc device initialization The struct device for ISM devices was part of struct smcd_dev. Move to struct ism_dev, provide a new API call in struct smcd_ops, and convert existing SMCD code accordingly. Furthermore, remove struct smcd_dev from struct ism_dev. This is the final part of a bigger overhaul of the interfaces between SMC and ISM. Signed-off-by: Stefan Raspl Signed-off-by: Jan Karcher Signed-off-by: Wenjia Zhang Signed-off-by: David S. Miller commit 820f21009f1bc7a69e28752f6c6d9544401ca526 Author: Stefan Raspl Date: Mon Jan 23 19:17:51 2023 +0100 s390/ism: Consolidate SMC-D-related code The ism module had SMC-D-specific code sprinkled across the entire module. We are now consolidating the SMC-D-specific parts into the latter parts of the module, so it becomes more clear what code is intended for use with ISM, and which parts are glue code for usage in the context of SMC-D. This is the fourth part of a bigger overhaul of the interfaces between SMC and ISM. Signed-off-by: Stefan Raspl Signed-off-by: Jan Karcher Signed-off-by: Wenjia Zhang Signed-off-by: David S. Miller commit 9de4df7b6be1cfca500f8ba21137d53eec45418a Author: Stefan Raspl Date: Mon Jan 23 19:17:50 2023 +0100 net/smc: Separate SMC-D and ISM APIs We separate the code implementing the struct smcd_ops API in the ISM device driver from the functions that may be used by other exploiters of ISM devices. Note: We start out small, and don't offer the whole breadth of the ISM device for public use, as many functions are specific to or likely only ever used in the context of SMC-D. This is the third part of a bigger overhaul of the interfaces between SMC and ISM. Signed-off-by: Stefan Raspl Signed-off-by: Jan Karcher Signed-off-by: Wenjia Zhang Signed-off-by: David S. Miller commit 8747716f3942a610efdd12e3655df47269c268ac Author: Stefan Raspl Date: Mon Jan 23 19:17:49 2023 +0100 net/smc: Register SMC-D as ISM client Register the smc module with the new ism device driver API. This is the second part of a bigger overhaul of the interfaces between SMC and ISM. Signed-off-by: Stefan Raspl Signed-off-by: Jan Karcher Signed-off-by: Wenjia Zhang Signed-off-by: David S. Miller commit 89e7d2ba61b742a7525ff06ea4d4378c4a5560d0 Author: Stefan Raspl Date: Mon Jan 23 19:17:48 2023 +0100 net/ism: Add new API for client registration Add a new API that allows other drivers to concurrently access ISM devices. To do so, we introduce a new API that allows other modules to register for ISM device usage. Furthermore, we move the GID to struct ism, where it belongs conceptually, and rename and relocate struct smcd_event to struct ism_event. This is the first part of a bigger overhaul of the interfaces between SMC and ISM. Signed-off-by: Stefan Raspl Signed-off-by: Jan Karcher Signed-off-by: Wenjia Zhang Signed-off-by: David S. Miller commit 1baedb13f1d50ae8c7852134fdf934b4463e9baa Author: Stefan Raspl Date: Mon Jan 23 19:17:47 2023 +0100 s390/ism: Introduce struct ism_dmb Conceptually, a DMB is a structure that belongs to ISM devices. However, SMC currently 'owns' this structure. So future exploiters of ISM devices would be forced to include SMC headers to work - which is just weird. Therefore, we switch ISM to struct ism_dmb, introduce a new public header with the definition (will be populated with further API calls later on), and, add a thin wrapper to please SMC. Since structs smcd_dmb and ism_dmb are identical, we can simply convert between the two for now. Signed-off-by: Stefan Raspl Signed-off-by: Jan Karcher Signed-off-by: Wenjia Zhang Signed-off-by: David S. Miller commit 462502ff9acb7bb02405e3e486428472db7c48dc Author: Stefan Raspl Date: Mon Jan 23 19:17:46 2023 +0100 net/ism: Add missing calls to disable bus-mastering Signed-off-by: Stefan Raspl Signed-off-by: Jan Karcher Signed-off-by: Wenjia Zhang Signed-off-by: David S. Miller commit c40bff4132e5c1320635ae809d001ccb5598dac6 Author: Stefan Raspl Date: Mon Jan 23 19:17:45 2023 +0100 net/smc: Terminate connections prior to device removal Removing an ISM device prior to terminating its associated connections doesn't end well. Signed-off-by: Stefan Raspl Signed-off-by: Jan Karcher Signed-off-by: Wenjia Zhang Signed-off-by: David S. Miller commit 902ecddc95c68efe71be733c57e8976948537926 Merge: 81f66500f7c9e 68de345e101ce Author: Jani Nikula Date: Wed Jan 25 11:41:16 2023 +0200 Merge drm/drm-next into drm-intel-next Backmerge to get the EDID handling changes. Signed-off-by: Jani Nikula commit ebd3ad60a688131de7df1dd05fd2d7c57f542268 Author: Borislav Petkov (AMD) Date: Wed Jan 25 08:50:13 2023 +0100 x86/cpu: Use cpu_feature_enabled() when checking global pages support X86_FEATURE_PGE determines whether the CPU has enabled global page translations support. Use the faster cpu_feature_enabled() check to shave off some more cycles when flushing all TLB entries, including the global ones. What this practically saves is: mov 0x82eb308(%rip),%rax # 0xffffffff8935bec8 test $0x20,%ah ... which test the bit. Not a lot, but TLB flushing is a timing-sensitive path, so anything to make it even faster. No functional changes. Signed-off-by: Borislav Petkov (AMD) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230125075013.9292-1-bp@alien8.de commit d0671115869d19ec76d658c4bf86d3211a8ea121 Author: Parav Pandit Date: Mon Jan 23 05:55:11 2023 +0200 virtio-net: Reduce debug name field size to 16 bytes virtio queue index can be maximum of 65535. 16 bytes are enough to store the vq name with the existing string prefix. With this change, send queue struct saves 24 bytes and receive queue saves whole cache line worth 64 bytes per structure due to saving in alignment bytes. Pahole results before: pahole -s drivers/net/virtio_net.o | \ grep -e "send_queue" -e "receive_queue" send_queue 1112 0 receive_queue 1280 1 Pahole results after: pahole -s drivers/net/virtio_net.o | \ grep -e "send_queue" -e "receive_queue" send_queue 1088 0 receive_queue 1216 1 Signed-off-by: Parav Pandit Reviewed-by: Pavan Chebbi Signed-off-by: David S. Miller commit b49323aa35d502b0d9a7950327f30a1a52eae534 Author: Christian König Date: Tue Dec 13 10:07:36 2022 +0100 drm/ttm: prevent moving of pinned BOs We have checks for this in the individual drivers move callback, but it's probably better to generally forbid that on a higher level. Also stops exporting ttm_resource_compat() since that's not necessary any more after removing the extra checks in vmwgfx. Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20230124125726.13323-4-christian.koenig@amd.com commit 4110872b8115aab2adb3a52149c144d8465440de Author: Christian König Date: Thu Feb 17 16:51:44 2022 +0100 drm/ttm: stop allocating a dummy resource for pipelined gutting That should not be necessary any more when drivers should at least be able to handle a move without a resource. Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20230124125726.13323-3-christian.koenig@amd.com commit 00984ad39599bb2a1e6ec5d4e9c75a749f7f45c9 Author: Christian König Date: Thu Feb 17 16:29:43 2022 +0100 drm/ttm: stop allocating dummy resources during BO creation That should not be necessary any more when drivers should at least be able to handle the move without a resource. Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20230124125726.13323-2-christian.koenig@amd.com commit 516198d317d81f33839ca850e83f6717b0d80e80 Author: Christian König Date: Thu Sep 1 13:49:30 2022 +0100 drm/i915: audit bo->resource usage v3 Make sure we can at least move and alloc TT objects without backing store. v2: clear the tt object even when no resource is allocated. v3: add Matthews changes for i915 as well. Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20230124125726.13323-1-christian.koenig@amd.com commit 47c59e0c213fc87d054bda9c9e0e31e82dfae0d4 Author: Dawei Li Date: Fri Jan 6 23:17:46 2023 +0800 ALSA: aoa: make remove callback of soundbus driver void returned Since commit fc7a6209d571 ("bus: Make remove callback return void") forces bus_type::remove be void-returned, it doesn't make much sense for any bus based driver implementing remove callbalk to return non-void to its caller. As such, change the remove function for soundbus based drivers to return void. Signed-off-by: Dawei Li Link: https://lore.kernel.org/r/TYCP286MB23234FED40A3AE6797DEBAB7CAFB9@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM Signed-off-by: Takashi Iwai commit 7351324c6f486ae35865b430c8e30f07da9f378e Author: Dawei Li Date: Fri Jan 6 23:13:49 2023 +0800 ALSA: ac97: make remove callback of ac97 driver void returned Since commit fc7a6209d571 ("bus: Make remove callback return void") forces bus_type::remove be void-returned, it doesn't make much sense for any bus based driver implementing remove callbalk to return non-void to its caller. As such, change the remove function for ac97 based drivers to return void. Signed-off-by: Dawei Li Link: https://lore.kernel.org/r/TYCP286MB2323A5AB1B2578EF4FA15DA7CAFB9@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM Signed-off-by: Takashi Iwai commit b22fbaa707fc258cb3679adb1b682dcb00e6fd9b Merge: 69d8a5f884372 d4ac37916e42d Author: Arnd Bergmann Date: Wed Jan 25 09:30:23 2023 +0100 Merge tag 'at91-soc-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/soc AT91 SoC updates for 6.3: It contains: - the addition of SAMA7G54D1G, SAMA7G54D2G, SAMA7G54D4G SiP identifiers * tag 'at91-soc-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: at91: add support in soc driver for new SAMA7G54 SiPs Link: https://lore.kernel.org/r/20230119113202.43543-1-claudiu.beznea@microchip.com Signed-off-by: Arnd Bergmann commit b6a60b49bb00d871004b19e0f4b7662bc08966b9 Author: Nick Hawkins Date: Fri Jan 13 10:06:51 2023 -0600 ARM: multi_v7_defconfig: Add GXP Fan and SPI support In order for HPE platforms to be supported by linux on GXP it is necessary for there to be fan and spi driver support. There fan driver can support up to 16 fans that are driven by pwm through the CPLD. The SPI driver supports access to the core flash and bios part. The SPI driver spi-gxp was added previously to linux. Signed-off-by: Nick Hawkins Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20230113160651.51201-3-nick.hawkins@hpe.com Signed-off-by: Arnd Bergmann commit 776e8ee7a3cb8a6a15067ca4b287ac4a3640ea87 Author: Linus Walleij Date: Mon Jan 23 08:39:16 2023 +0100 ARM: dts: gemini: Enable DNS313 FOTG210 as periph Add the GPIO-based VBUS phy, and enable the FOTG210 USB1 block for use as peripheral. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230123073916.2350839-2-linus.walleij@linaro.org commit b041c9d038f7defe20cfbdfeeb1b80f855394bfc Author: Linus Walleij Date: Mon Jan 23 08:39:15 2023 +0100 ARM: dts: gemini: Fix USB block version The FOTG version in the Gemini is the FOTG200, fix this up. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230123073916.2350839-1-linus.walleij@linaro.org commit e6c7d0ad2a916b0d8e95e0625d6f337ce0a02979 Author: Linus Walleij Date: Sun Dec 4 20:02:30 2022 +0100 ARM: dts: gemini: wbd222: Use RedBoot partion parser This is clearly a RedBoot partitioned device with 0x20000 sized erase blocks. Link: https://lore.kernel.org/r/20221204190230.3345590-3-linus.walleij@linaro.org Signed-off-by: Linus Walleij commit 747749045e4b50b51582f6ee24e9abacadccfad0 Author: Linus Walleij Date: Sun Dec 4 20:02:29 2022 +0100 ARM: dts: gemini: wbd111: Use RedBoot partion parser This is clearly a RedBoot partitioned device with 0x20000 sized erase blocks. Link: https://lore.kernel.org/r/20221204190230.3345590-2-linus.walleij@linaro.org Signed-off-by: Linus Walleij commit 41054628c45e300e3174f6a0b1a33f30ccb6b591 Author: Linus Walleij Date: Sun Dec 4 20:02:28 2022 +0100 ARM: dts: gemini: Push down flash address/size cells The platforms not defining any OF partions complain like this: ../arch/arm/boot/dts/gemini.dtsi:19.25-28.5: Warning (avoid_unnecessary_addr_size): /soc/flash@30000000: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property Get rid of this by only defining the address-cells and size-cells where it is actually used by OF partitions. Link: https://lore.kernel.org/r/20221204190230.3345590-1-linus.walleij@linaro.org Signed-off-by: Linus Walleij commit 285b6a18daf1358e70a4c842884d9ff2d2fe53e2 Author: Heiko Stuebner Date: Wed Jan 18 15:22:52 2023 +0100 RISC-V: Fix do_notify_resume / do_work_pending prototype Commit b0f4c74eadbf ("RISC-V: Fix unannoted hardirqs-on in return to userspace slow-path") renamed the do_notify_resume function to do_work_pending but did not change the prototype in signal.h Do that now, as the original function does not exist anymore. Fixes: b0f4c74eadbf ("RISC-V: Fix unannoted hardirqs-on in return to userspace slow-path") Signed-off-by: Heiko Stuebner Reviewed-by: Andrew Jones Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230118142252.337103-1-heiko@sntech.de Signed-off-by: Palmer Dabbelt commit 4373a023e0388fc19e27d37f61401bce6ff4c9d7 Author: Jakub Kicinski Date: Mon Jan 23 19:52:31 2023 -0800 devlink: remove a dubious assumption in fmsg dumping Build bot detects that err may be returned uninitialized in devlink_fmsg_prepare_skb(). This is not really true because all fmsgs users should create at least one outer nest, and therefore fmsg can't be completely empty. That said the assumption is not trivial to confirm, so let's follow the bots advice, anyway. This code does not seem to have changed since its inception in commit 1db64e8733f6 ("devlink: Add devlink formatted message (fmsg) API") Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20230124035231.787381-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit b613d335a743cf0e0ef0ccba9ad129904e2a26fb Author: David Vernet Date: Fri Jan 20 13:25:16 2023 -0600 bpf: Allow trusted args to walk struct when checking BTF IDs When validating BTF types for KF_TRUSTED_ARGS kfuncs, the verifier currently enforces that the top-level type must match when calling the kfunc. In other words, the verifier does not allow the BPF program to pass a bitwise equivalent struct, despite it being allowed according to the C standard. For example, if you have the following type: struct nf_conn___init { struct nf_conn ct; }; The C standard stipulates that it would be safe to pass a struct nf_conn___init to a kfunc expecting a struct nf_conn. The verifier currently disallows this, however, as semantically kfuncs may want to enforce that structs that have equivalent types according to the C standard, but have different BTF IDs, are not able to be passed to kfuncs expecting one or the other. For example, struct nf_conn___init may not be queried / looked up, as it is allocated but may not yet be fully initialized. On the other hand, being able to pass types that are equivalent according to the C standard will be useful for other types of kfunc / kptrs enabled by BPF. For example, in a follow-on patch, a series of kfuncs will be added which allow programs to do bitwise queries on cpumasks that are either allocated by the program (in which case they'll be a 'struct bpf_cpumask' type that wraps a cpumask_t as its first element), or a cpumask that was allocated by the main kernel (in which case it will just be a straight cpumask_t, as in task->cpus_ptr). Having the two types of cpumasks allows us to distinguish between the two for when a cpumask is read-only vs. mutatable. A struct bpf_cpumask can be mutated by e.g. bpf_cpumask_clear(), whereas a regular cpumask_t cannot be. On the other hand, a struct bpf_cpumask can of course be queried in the exact same manner as a cpumask_t, with e.g. bpf_cpumask_test_cpu(). If we were to enforce that top level types match, then a user that's passing a struct bpf_cpumask to a read-only cpumask_t argument would have to cast with something like bpf_cast_to_kern_ctx() (which itself would need to be updated to expect the alias, and currently it only accommodates a single alias per prog type). Additionally, not specifying KF_TRUSTED_ARGS is not an option, as some kfuncs take one argument as a struct bpf_cpumask *, and another as a struct cpumask * (i.e. cpumask_t). In order to enable this, this patch relaxes the constraint that a KF_TRUSTED_ARGS kfunc must have strict type matching, and instead only enforces strict type matching if a type is observed to be a "no-cast alias" (i.e., that the type names are equivalent, but one is suffixed with ___init). Additionally, in order to try and be conservative and match existing behavior / expectations, this patch also enforces strict type checking for acquire kfuncs. We were already enforcing it for release kfuncs, so this should also improve the consistency of the semantics for kfuncs. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230120192523.3650503-3-void@manifault.com Signed-off-by: Alexei Starovoitov commit 57539b1c0ac2dcccbe64a7675ff466be009c040f Author: David Vernet Date: Fri Jan 20 13:25:15 2023 -0600 bpf: Enable annotating trusted nested pointers In kfuncs, a "trusted" pointer is a pointer that the kfunc can assume is safe, and which the verifier will allow to be passed to a KF_TRUSTED_ARGS kfunc. Currently, a KF_TRUSTED_ARGS kfunc disallows any pointer to be passed at a nonzero offset, but sometimes this is in fact safe if the "nested" pointer's lifetime is inherited from its parent. For example, the const cpumask_t *cpus_ptr field in a struct task_struct will remain valid until the task itself is destroyed, and thus would also be safe to pass to a KF_TRUSTED_ARGS kfunc. While it would be conceptually simple to enable this by using BTF tags, gcc unfortunately does not yet support this. In the interim, this patch enables support for this by using a type-naming convention. A new BTF_TYPE_SAFE_NESTED macro is defined in verifier.c which allows a developer to specify the nested fields of a type which are considered trusted if its parent is also trusted. The verifier is also updated to account for this. A patch with selftests will be added in a follow-on change, along with documentation for this feature. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230120192523.3650503-2-void@manifault.com Signed-off-by: Alexei Starovoitov commit 9d5567ccf96fb2f1eb83d531eee23ead4aa8f2a3 Author: Jisheng Zhang Date: Fri Jan 13 22:22:05 2023 +0100 riscv: fix jal offsets in patched alternatives Alternatives live in a different section, so offsets used by jal instruction will point to wrong locations after the patch got applied. Similar to arm64, adjust the location to consider that offset. Co-developed-by: Heiko Stuebner Signed-off-by: Jisheng Zhang Reviewed-by: Conor Dooley Reviewed-by: Andrew Jones Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20230113212205.3534622-1-heiko@sntech.de Fixes: 27c653c06505 ("RISC-V: fix auipc-jalr addresses in patched alternatives") Signed-off-by: Palmer Dabbelt commit 28113cfada8bce91c627b057f68cd723cac2cf73 Author: Vladimir Oltean Date: Mon Jan 23 20:45:38 2023 +0200 net: mscc: ocelot: fix incorrect verify_enabled reporting in ethtool get_mm() We don't read the verify_enabled variable from hardware in the MAC Merge layer state GET operation, instead we always leave it set to "false". The user may think something is wrong if they set verify_enabled to true, then read it back and see it's still false, even though the configuration took place. Fixes: 6505b6805655 ("net: mscc: ocelot: add MAC Merge layer support for VSC9959") Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20230123184538.3420098-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 74b4f1739d4e81810e1d20f0e6ad3d3c63a32c13 Author: James Hershaw Date: Mon Jan 23 14:41:35 2023 +0100 nfp: flower: change get/set_eeprom logic and enable for flower reps The changes in this patch are as follows: - Alter the logic of get/set_eeprom functions to use the helper function nfp_app_from_netdev() which handles differentiating between an nfp_net and a nfp_repr. This allows us to get an agnostic backpointer to the pdev. - Enable the various eeprom commands by adding the 'get_eeprom_len', 'get_eeprom', 'set_eeprom' callbacks to the nfp_port_ethtool_ops struct. This allows the eeprom commands to work on representor interfaces, similar to a previous patch which added it to the vnics. Currently these are being used to configure persistent MAC addresses for the physical ports on the nfp. Signed-off-by: James Hershaw Reviewed-by: Louis Peens Signed-off-by: Simon Horman Link: https://lore.kernel.org/r/20230123134135.293278-1-simon.horman@corigine.com Signed-off-by: Jakub Kicinski commit 68de345e101ce9a24e5c8849e69dd0dba2e8c9b2 Merge: 7dd1be30f02f7 51affef35bb39 Author: Dave Airlie Date: Wed Jan 25 12:14:07 2023 +1000 Merge tag 'drm-misc-next-2023-01-24' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v6.3: UAPI Changes: Cross-subsystem Changes: Core Changes: * EDID: Improved mode parsing and refactoring * fbdev: Cleanups * format-helper: Add conversion from XRGB8888 to XBGR8888 and ABGR8888 Driver Changes: * accel/ivpu: Add driver for Intel VPU accelerator * bridge: Support i.MX93 LDB plus DT bindings * exynos: Fixes * panel: vtdr6130: Fixes; Support AUO A030JTN01 plus DT bindings * simpledrm: Support system-memory framebuffers plus DT bindings * ssd130x: Fix sparse warning Signed-off-by: Dave Airlie # -----BEGIN PGP SIGNATURE----- # # iQEzBAABCAAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAmPQN9YACgkQaA3BHVML # eiNmmQf/bTV3oaMo55i3tYxhMCWYDtPVk+GGglDAykW7Lid8pvy6mJqJoW6uvgQF # c6CcoY+6yG2WvnVLhXyhPaACiG5weQSdu3S/DdZ2nuJCb50YCwWNNKcu3qYnLVlz # 2NQ/s0HN+Xvvy76GJFNarKlxSNADPWCNJ8wExAdBkWr7q8NiDfsWuMGrQRQORrm3 # zEkSJPKtWNHa+vmsQOO9yebD0LFx97CoU40FrVXZTtF0FugGIXjiknQwekzuFxdY # fGBiFKsI+Y3s51gAppbmRRJ0jGLj3KDF5S+5GM8FNbgJQF67Wxttl/YtY6lJGcsa # l0vpRoCe1ilhNVvoikzAu7UewkPKKA== # =GLLt # -----END PGP SIGNATURE----- # gpg: Signature made Wed 25 Jan 2023 05:56:06 AEST # gpg: using RSA key 7217FBAC8CE9CF6344A168E5680DC11D530B7A23 # gpg: Can't check signature: No public key From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/Y9A5ceDknyQixM3R@linux-uq9g commit 90317bcdbd337b9e88f253650f6ab9dfe667be64 Author: Guillaume Nault Date: Mon Jan 23 18:47:09 2023 +0100 ipv6: Make ip6_route_output_flags_noref() static. This function is only used in net/ipv6/route.c and has no reason to be visible outside of it. Signed-off-by: Guillaume Nault Reviewed-by: David Ahern Link: https://lore.kernel.org/r/50706db7f675e40b3594d62011d9363dce32b92e.1674495822.git.gnault@redhat.com Signed-off-by: Jakub Kicinski commit 1d14345b874af1ce78daf38ab9ac380a2d6b4885 Author: Laurent Pinchart Date: Thu Jun 16 01:14:07 2022 +0300 ARM: dts: freescale: Use new media bus type macros Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT sources. Signed-off-by: Laurent Pinchart Signed-off-by: Shawn Guo commit 451fb217cdca0ead3f396f00f8da331401344950 Author: Geert Uytterhoeven Date: Wed Jan 11 09:15:33 2023 +0100 RISC-V: Kconfig: Remove trailing whitespace Remove trailing whitespace that hurts my eyes. Signed-off-by: Geert Uytterhoeven Acked-by: Conor Dooley Link: https://lore.kernel.org/r/080aa959266ad842a8e7efca7111f1350c6a065a.1673424858.git.geert+renesas@glider.be Signed-off-by: Palmer Dabbelt commit 7dd1be30f02f7115002fe00f1f6802bbcf79f857 Merge: b8f55f24bc82e b4a9b36e69e93 Author: Dave Airlie Date: Wed Jan 25 12:07:53 2023 +1000 Merge tag 'amd-drm-next-6.3-2023-01-20' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.3-2023-01-20: amdgpu: - Secure display fixes - Fix scaling - Misc code cleanups - Display BW alloc logic updates - DCN 3.2 fixes - Fix power reporting on certain firmwares for CZN/RN - SR-IOV fixes - Link training cleanup and code rework - HDCP fixes - Reserved VMID fix - Documentation updates - Colorspace fixes - RAS updates - GC11.0 fixes - VCN instance harvesting fixes - DCN 3.1.4/5 workarounds for S/G displays - Add PCIe info to the INFO IOCTL amdkfd: - XNACK fix UAPI: - Add PCIe gen/lanes info to the amdgpu INFO IOCTL Nesa ultimately plans to use this to make decisions about buffer placement optimizations Mesa MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20790 Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230120234523.7610-1-alexander.deucher@amd.com commit 852db33c6c180a48268eca52e25b267ed32de3ab Author: Robert Richter Date: Tue Jan 3 22:01:50 2023 +0100 cxl/pci: Show opcode in debug messages when sending a command For debugging it is very helpful to see which commands are sent. Add it to the debug message. Signed-off-by: Robert Richter Link: https://lore.kernel.org/r/20230103210151.1126873-1-rrichter@amd.com Signed-off-by: Dan Williams commit ec8f7d495b3d37c5f0d66cdc7e43ef76939293b6 Author: Jakub Kicinski Date: Mon Jan 23 14:22:24 2023 -0800 netlink: fix spelling mistake in dump size assert Commit 2c7bc10d0f7b ("netlink: add macro for checking dump ctx size") misspelled the name of the assert as asset, missing an R. Reported-by: Ido Schimmel Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/20230123222224.732338-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 6be1ff430dab9fc047762b10b2c9669399ea1f37 Author: Guo Ren Date: Tue Jan 10 03:04:19 2023 -0500 riscv: pgtable: Fixup comment for KERN_VIRT_SIZE KERN_VIRT_SIZE is 1/4 of the entries of the page global directory, not half. Fixes: f7ae02333d13 ("riscv: Move KASAN mapping next to the kernel mapping") Signed-off-by: Guo Ren Signed-off-by: Guo Ren Cc: Alexandre Ghiti Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20230110080419.931185-1-guoren@kernel.org Signed-off-by: Palmer Dabbelt commit c54ba4178159e440bea3826d22d43a9d0d94b071 Author: Willy Tarreau Date: Sat Jan 21 09:53:20 2023 +0100 selftests/nolibc: Add a "run-user" target to test the program in user land When developing tests, it is much faster to use the QEMU Linux emulator instead of the system emulator, which among other things avoids kernel-build latencies. Although use of the QEMU Linux emulator does have its limitations (please see below), it is sufficient to test startup code, stdlib code, and syscall calling conventions. However, the current mainline Linux-kernel nolibc setup does not support this. Therefore, add a "run-user" target that immediately executes the prebuilt executable. Again, this approach does have its limitations. For example, the executable runs with the user's privilege level, which can cause some false-positive failures due to insufficient permissions. In addition, if the underlying kernel is old enough to lack some features that nolibc relies on, the result will be false-positive failures in the corresponding tests. However, for nolibc changes not affected by these limittions, the result is a much faster code-compile-test-debug cycle. With this patch, running a userland test is as simple as issuing: make ARCH=xxx CROSS_COMPILE=xxx run-user Signed-off-by: Willy Tarreau Tested-by: Ammar Faizi Signed-off-by: Paul E. McKenney commit f9b06695ba64bca310ada3df05264273106c5184 Author: Willy Tarreau Date: Sat Jan 21 09:53:19 2023 +0100 selftests/nolibc: Support "x86_64" for arch name Building the kernel with ARCH=x86_64 works fine, but nolibc-test only supports "x86", which causes errors when reusing existing build environment. Let's permit this environment to be used as well by making nolibc also accept ARCH=x86_64. Signed-off-by: Willy Tarreau Tested-by: Ammar Faizi Signed-off-by: Paul E. McKenney commit b7082cdfc464bf9231300605d03eebf943dda307 Author: Feng Tang Date: Tue Dec 20 16:25:12 2022 +0800 clocksource: Suspend the watchdog temporarily when high read latency detected Bugs have been reported on 8 sockets x86 machines in which the TSC was wrongly disabled when the system is under heavy workload. [ 818.380354] clocksource: timekeeping watchdog on CPU336: hpet wd-wd read-back delay of 1203520ns [ 818.436160] clocksource: wd-tsc-wd read-back delay of 181880ns, clock-skew test skipped! [ 819.402962] clocksource: timekeeping watchdog on CPU338: hpet wd-wd read-back delay of 324000ns [ 819.448036] clocksource: wd-tsc-wd read-back delay of 337240ns, clock-skew test skipped! [ 819.880863] clocksource: timekeeping watchdog on CPU339: hpet read-back delay of 150280ns, attempt 3, marking unstable [ 819.936243] tsc: Marking TSC unstable due to clocksource watchdog [ 820.068173] TSC found unstable after boot, most likely due to broken BIOS. Use 'tsc=unstable'. [ 820.092382] sched_clock: Marking unstable (818769414384, 1195404998) [ 820.643627] clocksource: Checking clocksource tsc synchronization from CPU 267 to CPUs 0,4,25,70,126,430,557,564. [ 821.067990] clocksource: Switched to clocksource hpet This can be reproduced by running memory intensive 'stream' tests, or some of the stress-ng subcases such as 'ioport'. The reason for these issues is the when system is under heavy load, the read latency of the clocksources can be very high. Even lightweight TSC reads can show high latencies, and latencies are much worse for external clocksources such as HPET or the APIC PM timer. These latencies can result in false-positive clocksource-unstable determinations. These issues were initially reported by a customer running on a production system, and this problem was reproduced on several generations of Xeon servers, especially when running the stress-ng test. These Xeon servers were not production systems, but they did have the latest steppings and firmware. Given that the clocksource watchdog is a continual diagnostic check with frequency of twice a second, there is no need to rush it when the system is under heavy load. Therefore, when high clocksource read latencies are detected, suspend the watchdog timer for 5 minutes. Signed-off-by: Feng Tang Acked-by: Waiman Long Cc: John Stultz Cc: Thomas Gleixner Cc: Stephen Boyd Cc: Feng Tang Signed-off-by: Paul E. McKenney commit 1c7b394a5651f9b7bc2cebe4d219e36a160ce35f Author: SeongJae Park Date: Sun Jan 22 21:36:50 2023 +0000 Docs/sound/index: Add missing SPDX License Identifier Add missing SPDX License Identifier for sound documentation index file. Signed-off-by: SeongJae Park Acked-by: Takashi Iwai Link: https://lore.kernel.org/r/20230122213650.187710-9-sj@kernel.org Signed-off-by: Jonathan Corbet commit 4f46ae9f3aeb72d60e3efec5a2c60c372520e532 Author: SeongJae Park Date: Sun Jan 22 21:36:44 2023 +0000 Docs/driver-api/index: Add missing SPDX License Identifier Add missing SPDX License Identifier for driver-api documentation index file. Signed-off-by: SeongJae Park Link: https://lore.kernel.org/r/20230122213650.187710-3-sj@kernel.org Signed-off-by: Jonathan Corbet commit 941c95fdd61f4a0d2cd01520282a713962f485f6 Author: SeongJae Park Date: Sun Jan 22 18:48:34 2023 +0000 Docs/subsystem-apis: Remove '[The ]Linux' prefixes from titles of listed documents Some documents that listed on subsystem-apis have 'Linux' or 'The Linux' title prefixes. It's duplicated information, and makes finding the document of interest with human eyes not easy. Remove the prefixes from the titles. Signed-off-by: SeongJae Park Acked-by: Iwona Winiarska Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20230122184834.181977-1-sj@kernel.org Signed-off-by: Jonathan Corbet commit c70313cd177d28ea15a3f5cb3e6f10292a782c63 Author: Jeffrey Hugo Date: Thu Jan 19 09:26:08 2023 -0700 docs: accel: Fix debugfs path The device specific directory in debugfs does not have "accel". For example, the documentation says device 0 should have a debugfs entry as /sys/kernel/debug/accel/accel0/ but in reality the entry is /sys/kernel/debug/accel/0/ Fix the documentation to match the implementation. Fixes: 8c5577a5ccc6 ("doc: add documentation for accel subsystem") Signed-off-by: Jeffrey Hugo Reviewed-by: Oded Gabbay Link: https://lore.kernel.org/r/1674145568-31513-1-git-send-email-quic_jhugo@quicinc.com Signed-off-by: Jonathan Corbet commit 3abd57ccdda64996101b486fda9c286505e2ae54 Author: Carlos Bilbao Date: Tue Jan 17 08:47:22 2023 -0600 docs/sp_SP: Add process email-clients translation Translate the following document into Spanish: - process/email-clients.rst Signed-off-by: Carlos Bilbao Link: https://lore.kernel.org/r/20230117144722.31195-1-carlos.bilbao@amd.com Signed-off-by: Jonathan Corbet commit 5d18c23c763d4cc4f9abcf413457a7a12659a46f Author: Yoann Congal Date: Sat Jan 21 23:53:05 2023 +0100 Documentation: kprobetrace: Split paragraphs Add an empty line to force the output to split paragraphs like it is splitin the REST source. Signed-off-by: Yoann Congal Reviewed-by: Steven Rostedt (Google) Acked-by: Masami Hiramatsu (Google) Link: https://lore.kernel.org/r/20230121225304.1711635-4-yoann.congal@smile.fr Signed-off-by: Jonathan Corbet commit 015b5162be05b95bd97c8c4afc37b11ac6466900 Author: Yoann Congal Date: Sat Jan 21 23:53:04 2023 +0100 Documentation: kprobetrace: Fix code block markup This display the following code extract as a code block instead of a normal paragraph. Signed-off-by: Yoann Congal Reviewed-by: Steven Rostedt (Google) Acked-by: Masami Hiramatsu (Google) Link: https://lore.kernel.org/r/20230121225304.1711635-3-yoann.congal@smile.fr Signed-off-by: Jonathan Corbet commit 776b32b7567a7402e7d8f971ea88001a42829434 Author: Yoann Congal Date: Sat Jan 21 23:53:03 2023 +0100 Documentation: kprobetrace: Fix some typos * Uncapitalise tracepoint * Hyphen in *-based * Plurals * fetch-args -> fetchargs * 2bytes hex -> 2-byte hex * .. -> . * arch -> architecture Signed-off-by: Yoann Congal Reviewed-by: Steven Rostedt (Google) Acked-by: Masami Hiramatsu (Google) Link: https://lore.kernel.org/r/20230121225304.1711635-2-yoann.congal@smile.fr Signed-off-by: Jonathan Corbet commit e9faf9b0b07a317f6ac40ab67e5490a1c4df5fc6 Author: Nicolas Saenz Julienne Date: Tue Jan 24 12:02:13 2023 +0100 ARM: add multi_v7_lpae_defconfig The only missing configuration option preventing us from using multi_v7_defconfig with the Raspberry Pi 4 is ARM_LPAE. It's needed as the PCIe controller found on the SoC depends on 64bit addressing, yet can't be included as not all v7 boards support LPAE. Introduce multi_v7_lpae_defconfig, built off multi_v7_defconfig, which will avoid us having to duplicate and maintain multiple similar configurations. Needless to say the Raspberry Pi 4 is not the only platform that can benefit from this new configuration. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20230124110213.3221264-11-alexander.stein@ew.tq-group.com Signed-off-by: Arnd Bergmann commit a400c287ce985992c78941a130869cb5b68e2c2f Author: Nicolas Saenz Julienne Date: Tue Jan 24 12:02:12 2023 +0100 kbuild: Add config fragment merge functionality So far this function was only used locally in powerpc, some other architectures might benefit from it. Move it into scripts/Makefile.defconf. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Alexander Stein Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230124110213.3221264-10-alexander.stein@ew.tq-group.com Signed-off-by: Arnd Bergmann commit af8bd008315aba621519bb35297fbe3e293fffa1 Author: Alexander Stein Date: Tue Jan 24 12:02:11 2023 +0100 ARM: multi_v7_defconfig: Add options to support TQMLS102xA series Enable drivers used on TQMLS102xA + MBLS1021A. Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20230124110213.3221264-9-alexander.stein@ew.tq-group.com Signed-off-by: Arnd Bergmann commit 1ba4a8a6ce7a265b9d87c289346c3c43e7ea261d Merge: 6e3347ecd44df 5e487164afbcd Author: Arnd Bergmann Date: Tue Jan 24 21:57:52 2023 +0100 Merge tag 'samsung-drivers-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung SoC bindings changes for v6.3 1. System Controller: use dedicated/specific compatibles to identify different controllers with different register layout (Exynos, Tesla FSD). Extend the bindings with missing clocks. 2. Correct maintainers entry for Tesla FSD DTS. * tag 'samsung-drivers-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: MAINTAINERS: arm64: tesla: correct pattern for directory dt-bindings: soc: samsung: exynos-sysreg: correct indentation for deprecated dt-bindings: soc: samsung: exynos-sysreg: add dedicated SYSREG compatibles to Exynosautov9 dt-bindings: soc: samsung: exynos-sysreg: add dedicated SYSREG compatibles to Exynos850 dt-bindings: soc: samsung: exynos-sysreg: Add tesla FSD sysreg compatibles dt-bindings: soc: samsung: exynos-sysreg: add clocks for Exynos850 dt-bindings: soc: samsung: exynos-sysreg: add dedicated SYSREG compatibles to Exynos5433 dt-bindings: soc: samsung: exynos-sysreg: split from syscon Link: https://lore.kernel.org/r/20230122122605.30720-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 0d01e09022c558c54fa2d5fb7fe7e32b7a9a8554 Merge: f938b29d277a5 bbaf6624f23d6 Author: Arnd Bergmann Date: Tue Jan 24 21:55:46 2023 +0100 Merge tag 'memory-controller-drv-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers Memory controller drivers for v6.3 1. TI Emif: simplify device_get_match_data(). 2. Renesas RPC IF: - Few fixes (decouple driver's private data structure from other drivers; unbind and rebind due to triggering managed resources allocation from other drivers); - Bigger rework around improved runtime Power Management. * tag 'memory-controller-drv-6.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: memory: ti-emif-pm: Use device_get_match_data() to simplify the code memory: renesas-rpc-if: Remove Runtime PM wrappers memory: renesas-rpc-if: Pass device instead of rpcif to rpcif_*() memory: renesas-rpc-if: Improve Runtime PM handling memory: renesas-rpc-if: Always use dev in rpcif_probe() memory: renesas-rpc-if: Move resource acquisition to .probe() memory: renesas-rpc-if: Split-off private data from struct rpcif Link: https://lore.kernel.org/r/20230123105330.63709-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit f938b29d277a506dd6a22007b9417b2eef6e331d Merge: faa4cd063bcee 32a55bbdd74e2 Author: Arnd Bergmann Date: Tue Jan 24 21:44:03 2023 +0100 Merge tag 'scmi-updates-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/drivers Arm SCMI updates for v6.3 The main addition is a unified userspace interface for SCMI irrespective of the underlying transport and along with some changed to refactor the SCMI stack probing sequence. 1. SCMI unified userspace interface This is to have a unified way of testing an SCMI platform firmware implementation for compliance, fuzzing etc., from the perspective of the non-secure OSPM irrespective of the underlying transport supporting SCMI. It is just for testing/development and not a feature intended fo use in production. Currently an SCMI Compliance Suite[1] can only work by injecting SCMI messages using the mailbox test driver only which makes it transport specific and can't be used with any other transport like virtio, smc/hvc, optee, etc. Also the shared memory can be transport specific and it is better to even abstract/hide those details while providing the userspace access. So in order to scale with any transport, we need a unified interface for the same. In order to achieve that, SCMI "raw mode support" is being added through debugfs which is more configurable as well. A userspace application can inject bare SCMI binary messages into the SCMI core stack; such messages will be routed by the SCMI regular kernel stack to the backend platform firmware using the configured transport transparently. This eliminates the to know about the specific underlying transport internals that will be taken care of by the SCMI core stack itself. Further no additional changes needed in the device tree like in the mailbox-test driver. [1] https://gitlab.arm.com/tests/scmi-tests 2. Refactoring of the SCMI stack probing sequence On some platforms, SCMI transport can be provide by OPTEE/TEE which introduces certain dependency in the probe ordering. In order to address the same, the SCMI bus is split into its own module which continues to be initialized at subsys_initcall, while the SCMI core stack, including its various transport backends (like optee, mailbox, virtio, smc), is now moved into a separate module at module_init level. This allows the other possibly dependent subsystems to register and/or access SCMI bus well before the core SCMI stack and its dependent transport backends. * tag 'scmi-updates-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: (31 commits) firmware: arm_scmi: Clarify raw per-channel ABI documentation firmware: arm_scmi: Add per-channel raw injection support firmware: arm_scmi: Add the raw mode co-existence support firmware: arm_scmi: Call raw mode hooks from the core stack firmware: arm_scmi: Reject SCMI drivers when configured in raw mode firmware: arm_scmi: Add debugfs ABI documentation for raw mode firmware: arm_scmi: Add core raw transmission support firmware: arm_scmi: Add debugfs ABI documentation for common entries firmware: arm_scmi: Populate a common SCMI debugfs root debugfs: Export debugfs_create_str symbol include: trace: Add platform and channel instance references firmware: arm_scmi: Add internal platform/channel identifiers firmware: arm_scmi: Move errors defs and code to common.h firmware: arm_scmi: Add xfer helpers to provide raw access firmware: arm_scmi: Add flags field to xfer firmware: arm_scmi: Refactor scmi_wait_for_message_response firmware: arm_scmi: Refactor polling helpers firmware: arm_scmi: Refactor xfer in-flight registration routines firmware: arm_scmi: Split bus and driver into distinct modules firmware: arm_scmi: Introduce a new lifecycle for protocol devices ... Link: https://lore.kernel.org/r/20230120162152.1438456-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit faa4cd063bcee3875ec8fa9085075dc1abbba8db Merge: b7bfaa761d760 499e364cd2508 Author: Arnd Bergmann Date: Tue Jan 24 21:43:12 2023 +0100 Merge tag 'renesas-drivers-for-v6.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/drivers Renesas driver updates for v6.3 - Add missing A3DUL power domain on R-Car V4H. * tag 'renesas-drivers-for-v6.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: soc: renesas: r8a779g0-sysc: Add missing A3DUL power domain dt-bindings: power: r8a779g0: Add missing A3DUL power domain Link: https://lore.kernel.org/r/cover.1673702291.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 69d8a5f8843720ff98d644400920211426bd8186 Author: Krzysztof Kozlowski Date: Fri Jan 20 13:57:22 2023 +0100 arm64: drop redundant "ARMv8" from Kconfig option title All these platforms are ARMv8 or newer and choosing the platforms in menuconfig is much easier if the titles start with something specific. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230120125722.270722-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 91aa6280e30875f77b9ecefc909c216c8f1faa68 Author: Linus Walleij Date: Wed Jan 11 14:22:10 2023 +0100 ARM: ep93xx: Convert to use descriptors for GPIO LEDs This converts the EP93xx to use GPIO descriptors for the LEDs. Cc: Nikita Shubin Cc: Alexander Sverdlin Cc: Hartley Sweeten Cc: Lukasz Majewski Tested-by: Alexander Sverdlin Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230111132210.134478-1-linus.walleij@linaro.org Signed-off-by: Arnd Bergmann commit e62f40452d1f0284facda0cf1e47fc6a25e3be78 Merge: fc939b172eaf3 0414a100d6ab3 Author: Arnd Bergmann Date: Tue Jan 24 21:33:23 2023 +0100 Merge tag 'omap-for-v6.3/omap1-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/soc One clean-up for omap1 for v6.3 One non-urgent change to use platform_device_put() instead of platform_device_unregister(). * tag 'omap-for-v6.3/omap1-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP1: call platform_device_put() in error case in omap1_dm_timer_init() Link: https://lore.kernel.org/r/pull-1674566532-427457@atomide.com Signed-off-by: Arnd Bergmann commit fc939b172eaf31970c16789ec00fe2a45c0c584d Merge: 721c46bfc5dc5 5fc1f76a85ce5 Author: Arnd Bergmann Date: Tue Jan 24 21:32:15 2023 +0100 Merge tag 'omap-for-v6.3/cleanup-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/soc Clean-up for omaps for v6.3 Non-urgent fixes for missing of_node_put() and clk_put(), drop few unnecessary includes, and fix a typo. None of these are urgent and can be merged along with other clean-up when suitable. * tag 'omap-for-v6.3/cleanup-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Fix spelling typos in comment ARM: OMAP2+: Remove unneeded #include ARM: OMAP2+: Remove unneeded #include ARM: OMAP2+: Fix memory leak in realtime_counter_init() ARM: OMAP2+: omap4-common: Fix refcount leak bug Link: https://lore.kernel.org/r/pull-1674566471-434733@atomide.com-2 Signed-off-by: Arnd Bergmann commit fee19c692160ae83f50e7b561076e4bd4cceb830 Author: Daniel Lezcano Date: Mon Jan 23 19:40:33 2023 +0100 thermal: intel: intel_pch: Use generic trip points The thermal framework gives the possibility to register the trip points along with the thermal zone. When that is done, no get_trip_* callbacks are needed and they can be removed. Convert the existing callbacks content logic into generic trip points initialization code and register them along with the thermal zone. In order to consolidate the code, use an ACPI trip library function to populate a generic trip point. Signed-off-by: Daniel Lezcano Reviewed-by: Zhang Rui [ rjw: Subject and changelog edits, rebase ] Signed-off-by: Rafael J. Wysocki Tested-by: Srinivas Pandruvada commit 7a0e39748861272e6f4b088d5a7e7ffa53c4d5eb Author: Rafael J. Wysocki Date: Mon Jan 23 19:38:31 2023 +0100 thermal: ACPI: Add ACPI trip point routines Add library routines to populate a generic thermal trip point structure with data obtained by evaluating a specific object in the ACPI Namespace. Signed-off-by: Rafael J. Wysocki Co-developed-by: Daniel Lezcano Signed-off-by: Daniel Lezcano Tested-by: Srinivas Pandruvada commit 40dc1929089fc844ea06d9f8bdb6211ed4517c2e Author: Tim Zimmermann Date: Sat Jan 7 20:25:13 2023 +0100 thermal: intel: intel_pch: Add support for Wellsburg PCH Add the PCI ID for the Wellsburg C610 series chipset PCH. The driver can read the temperature from the Wellsburg PCH with only the PCI ID added and no other modifications. Signed-off-by: Tim Zimmermann Signed-off-by: Rafael J. Wysocki commit 8ef0ca4a177d2dbe6680fb4388173897900a4ed1 Merge: 763bd29fd3d17 a2c81dc59d41e Author: Rafael J. Wysocki Date: Tue Jan 24 21:12:49 2023 +0100 Merge back other thermal control material for 6.3. * thermal: (734 commits) thermal: core: call put_device() only after device_register() fails Linux 6.2-rc4 kbuild: Fix CFI hash randomization with KASAN firmware: coreboot: Check size of table entry and use flex-array kallsyms: Fix scheduling with interrupts disabled in self-test ata: pata_cs5535: Don't build on UML lockref: stop doing cpu_relax in the cmpxchg loop x86/pci: Treat EfiMemoryMappedIO as reservation of ECAM space efi: tpm: Avoid READ_ONCE() for accessing the event log io_uring: lock overflowing for IOPOLL ALSA: pcm: Move rwsem lock inside snd_ctl_elem_read to prevent UAF iommu/mediatek-v1: Fix an error handling path in mtk_iommu_v1_probe() iommu/iova: Fix alloc iova overflows issue iommu: Fix refcount leak in iommu_device_claim_dma_owner iommu/arm-smmu-v3: Don't unregister on shutdown iommu/arm-smmu: Don't unregister on shutdown iommu/arm-smmu: Report IOMMU_CAP_CACHE_COHERENCY even betterer platform/x86: thinkpad_acpi: Fix profile mode display in AMT mode ALSA: usb-audio: Fix possible NULL pointer dereference in snd_usb_pcm_has_fixed_rate() platform/x86: int3472/discrete: Ensure the clk/power enable pins are in output mode ... commit 81f66500f7c9e80c01bde8eb2cb78054051058e2 Author: Gustavo Sousa Date: Mon Jan 23 15:20:21 2023 -0300 drm/i915/dmc: Use unversioned path for ADLP The new DMC release for ADLP (v2.18) in linux-firmware adopted the new convention of using unversioned filenames, so update the driver code for that new release. Keep the latest versioned path as fallback so we do not cause regressions. Signed-off-by: Gustavo Sousa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230123182021.31239-3-gustavo.sousa@intel.com commit ff6f11afd792b59563b12b382d496279d63a55c0 Author: Gustavo Sousa Date: Mon Jan 23 15:20:20 2023 -0300 drm/i915/dmc: Prepare to use unversioned paths New DMC releases in linux-firmware will stop using version number in blob filenames. This new convention provides the following benefits: 1. It simplifies code maintenance, as new DMC releases for a platform using the new convention will always use the same filename for the blob. 2. It allows DMC to be loaded even if the target system does not have the most recent firmware installed. Prepare the driver by: - Using the new convention for DMC_PATH() and renaming the currently used one to make it clear it is for the legacy scheme. - Implementing a fallback mechanism for future transitions from versioned to unversioned paths so that we do not cause a regression for systems not having the most up-to-date linux-firmware files. v2: - Keep using request_firmware() instead of firmware_request_nowarn(). (Jani) v3: - Keep current DMC paths instead of directly using unversioned ones, so that we do not disturb initrd generation. (Lucas, Rodrigo) Signed-off-by: Gustavo Sousa Cc: Jani Nikula Cc: Lucas De Marchi Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230123182021.31239-2-gustavo.sousa@intel.com commit 47e3f00074c27661268674d832f743f1940ae17c Author: Viresh Kumar Date: Wed Jan 18 14:08:26 2023 +0530 thermal: core: Use device_unregister() instead of device_del/put() Lets not open code device_unregister() unnecessarily. Signed-off-by: Viresh Kumar Reviewed-by: Yang Yingliang Signed-off-by: Rafael J. Wysocki commit e398421fd03cf70c8d6e1d69a0773ee2fc426b25 Author: Viresh Kumar Date: Wed Jan 18 14:08:25 2023 +0530 thermal: core: Move cdev cleanup to thermal_release() thermal_release() already frees cdev, let it do rest of the cleanup as well in order to simplify the error paths in __thermal_cooling_device_register(). Signed-off-by: Viresh Kumar Reviewed-by: Yang Yingliang Signed-off-by: Rafael J. Wysocki commit 478f32ab4daae8a9bae3723d1040c6e4e3a09bc5 Author: Prashant Malani Date: Fri Jan 13 18:26:26 2023 +0000 platform/chrome: cros_typec_vdm: Fix VDO copy The usage of memcpy() affects the representation of the VDOs as they are copied to the EC Host Command buffer. Specifically, all higher order bits get dropped (for example: a VDO of 0x406 just gets copied as 0x6). Avoid this by explicitly copying each VDO in the array. The number of VDOs generated by alternate mode drivers in their VDMs is almost always just 1 (apart from the header) so this doesn't affect performance in a meaningful way). Fixes: 40a9b13a09ef ("platform/chrome: cros_typec_vdm: Add VDM send support") Signed-off-by: Prashant Malani Reviewed-by: Benson Leung Link: https://lore.kernel.org/r/20230113182626.1149539-1-pmalani@chromium.org Signed-off-by: Prashant Malani commit 13aba1e532f047459a683f76439ad90fb29eab05 Author: Victor Ding Date: Tue Jan 24 07:56:32 2023 +0000 platform/chrome: cros_ec_typec: allow deferred probe of switch handles `fwnode_typec_{retimer,mux,switch}_get()` could return `-EPROBE_DEFER`, which is called from `cros_typec_get_switch_handles`. When this happens, it does not indicate absence of switches; instead, it only hints that probing of switches should occur at a later time. Progagate `-EPROBE_DEFER` to upper layer logic so that they can re-try probing switches as a better time. Signed-off-by: Victor Ding Reviewed-by: Benson Leung Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230124075555.v3.1.I6c0a089123fdf143f94ef4cca8677639031856cf@changeid Signed-off-by: Prashant Malani commit 2eb398df77a1bae6839df39193f6bca35ea65f87 Author: ye xingchen Date: Wed Nov 16 17:18:43 2022 +0800 KVM: x86: Replace IS_ERR() with IS_ERR_VALUE() Avoid type casts that are needed for IS_ERR() and use IS_ERR_VALUE() instead. Signed-off-by: ye xingchen Link: https://lore.kernel.org/r/202211161718436948912@zte.com.cn Signed-off-by: Sean Christopherson commit 11df586d774f4aab1835144fd2a8dc3cb2add8d4 Author: Sean Christopherson Date: Tue Dec 13 06:09:12 2022 +0000 KVM: VMX: Handle NMI VM-Exits in noinstr region Move VMX's handling of NMI VM-Exits into vmx_vcpu_enter_exit() so that the NMI is handled prior to leaving the safety of noinstr. Handling the NMI after leaving noinstr exposes the kernel to potential ordering problems as an instrumentation-induced fault, e.g. #DB, #BP, #PF, etc. will unblock NMIs when IRETing back to the faulting instruction. Reported-by: Peter Zijlstra Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221213060912.654668-8-seanjc@google.com Signed-off-by: Sean Christopherson commit 4f76e86f7e0dc33af14256d30177bf65de2f9cab Author: Sean Christopherson Date: Tue Dec 13 06:09:11 2022 +0000 KVM: VMX: Provide separate subroutines for invoking NMI vs. IRQ handlers Split the asm subroutines for handling NMIs versus IRQs that occur in the guest so that the NMI handler can be called from a noinstr section. As a bonus, the NMI path doesn't need an indirect branch. Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221213060912.654668-7-seanjc@google.com Signed-off-by: Sean Christopherson commit 54a3b70a75dcde8173e3d8ccc60f9ecd7af7b5f2 Author: Sean Christopherson Date: Tue Dec 13 06:09:10 2022 +0000 x86/entry: KVM: Use dedicated VMX NMI entry for 32-bit kernels too Use a dedicated entry for invoking the NMI handler from KVM VMX's VM-Exit path for 32-bit even though using a dedicated entry for 32-bit isn't strictly necessary. Exposing a single symbol will allow KVM to reference the entry point in assembly code without having to resort to more #ifdefs (or #defines). identry.h is intended to be included from asm files only once, and so simply including idtentry.h in KVM assembly isn't an option. Bypassing the ESP fixup and CR3 switching in the standard NMI entry code is safe as KVM always handles NMIs that occur in the guest on a kernel stack, with a kernel CR3. Cc: Andy Lutomirski Cc: Thomas Gleixner Reviewed-by: Lai Jiangshan Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221213060912.654668-6-seanjc@google.com Signed-off-by: Sean Christopherson commit 432727f1cb6e35cb3416d5aeea3dd281e460cbab Author: Sean Christopherson Date: Tue Dec 13 06:09:09 2022 +0000 KVM: VMX: Always inline to_vmx() and to_kvm_vmx() Tag to_vmx() and to_kvm_vmx() __always_inline as they both just reflect the passed in pointer (the embedded struct is the first field in the container), and drop the @vmx param from vmx_vcpu_enter_exit(), which likely existed purely to make noinstr validation happy. Amusingly, when the compiler decides to not inline the helpers, e.g. for KASAN builds, to_vmx() and to_kvm_vmx() may end up pointing at the same symbol, which generates very confusing objtool warnings. E.g. the use of to_vmx() in a future patch led to objtool complaining about to_kvm_vmx(), and only once all use of to_kvm_vmx() was commented out did to_vmx() pop up in the obj tool report. vmlinux.o: warning: objtool: vmx_vcpu_enter_exit+0x160: call to to_kvm_vmx() leaves .noinstr.text section Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221213060912.654668-5-seanjc@google.com Signed-off-by: Sean Christopherson commit 11633f69506d038120925691626f2851203af241 Author: Sean Christopherson Date: Tue Dec 13 06:09:08 2022 +0000 KVM: VMX: Always inline eVMCS read/write helpers Tag all evmcs_{read,write}() helpers __always_inline so that they can be freely used in noinstr sections, e.g. to get the VM-Exit reason in vcpu_vmx_enter_exit() (in a future patch). For consistency and to avoid more spot fixes in the future, e.g. see commit 010050a86393 ("x86/kvm: Always inline evmcs_write64()"), tag all accessors even though evmcs_read32() is the only anticipated use case in the near future. In practice, non-KASAN builds are all but guaranteed to inline the helpers anyways. vmlinux.o: warning: objtool: vmx_vcpu_enter_exit+0x107: call to evmcs_read32() leaves .noinstr.text section Reported-by: kernel test robot Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221213060912.654668-4-seanjc@google.com Signed-off-by: Sean Christopherson commit 8578f59657c505982e1d05232272c6bf304cf8aa Author: Sean Christopherson Date: Tue Dec 13 06:09:07 2022 +0000 KVM: VMX: Allow VM-Fail path of VMREAD helper to be instrumented Allow instrumentation in the VM-Fail path of __vmcs_readl() so that the helper can be used in noinstr functions, e.g. to get the exit reason in vmx_vcpu_enter_exit() in order to handle NMI VM-Exits in the noinstr section. While allowing instrumentation isn't technically safe, KVM has much bigger problems if VMREAD fails in a noinstr section. Note, all other VMX instructions also allow instrumentation in their VM-Fail paths for similar reasons, VMREAD was simply omitted by commit 3ebccdf373c2 ("x86/kvm/vmx: Move guest enter/exit into .noinstr.text") because VMREAD wasn't used in a noinstr section at the time. Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221213060912.654668-3-seanjc@google.com Signed-off-by: Sean Christopherson commit fc9465be8aad2042978590d44c01350534c1ac11 Author: Sean Christopherson Date: Tue Dec 13 06:09:06 2022 +0000 KVM: x86: Make vmx_get_exit_qual() and vmx_get_intr_info() noinstr-friendly Add an extra special noinstr-friendly helper to test+mark a "register" available and use it when caching vmcs.EXIT_QUALIFICATION and vmcs.VM_EXIT_INTR_INFO. Make the caching helpers __always_inline too so that they can be used in noinstr functions. A future fix will move VMX's handling of NMI exits into the noinstr vmx_vcpu_enter_exit() so that the NMI is processed before any kind of instrumentation can trigger a fault and thus IRET, i.e. so that KVM doesn't invoke the NMI handler with NMIs enabled. Cc: Peter Zijlstra Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221213060912.654668-2-seanjc@google.com Signed-off-by: Sean Christopherson commit f732e2b3c6b3882e0648a4e44ff4eafaf998ad47 Author: Alex Deucher Date: Tue Jan 10 17:44:26 2023 -0500 drm/amdgpu/vcn4: add missing encoder cap VCN4.x supports AV1 encode. Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit acd82cb42bd7cbffeaab15818b4334159b6f6e5a Author: Aric Cyr Date: Sun Jan 15 23:21:20 2023 -0500 drm/amd/display: 3.2.220 This version brings along following fixes: - Fix timing not changning when freesync video is enabled - avoid disable otg when dig was disabled - Properly reuse completion structure - Pass DSC slice height to PSR FW - merge dc_link_dp into dc_link - move dp cts functions from dc_link_dp to link_dp_cts - move dp irq handler functions from dc_link_dp to link_dp_irq_handler - Enable AdaptiveSync in DC interface - adjust MALL size available for DCN32 and DCN321 - Set init freq for DCFCLK DS - Use |= when assigning wm_optimized_required - move eDP panel control logic to link_edp_panel_control - create accessories, hwss and protocols sub folders in link - Disable SubVP for PSR panels Acked-by: Alan Liu Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0f5f1ee45ff8e76916be2290ef91cc2234450ccb Author: Aurabindo Pillai Date: Wed Jan 11 14:56:22 2023 -0500 drm/amd/display: Fix timing not changning when freesync video is enabled [Why&How] Switching between certain modes that are freesync video modes and those are not freesync video modes result in timing not changing as seen by the monitor due to incorrect timing being driven. The issue is fixed by ensuring that when a non freesync video mode is set, we reset the freesync status on the crtc. Reviewed-by: Nicholas Kazlauskas Acked-by: Alan Liu Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7cf5ceb30d4d527d763ae78c5405e3faca1fb8b1 Author: Jingwen Zhu Date: Sat Jan 14 00:06:00 2023 +0800 drm/amd/display: avoid disable otg when dig was disabled [Why] This is a workaround for an dcn3.1 hang that happens if otg dispclk is ramped while otg is on and stream enc is off. But this w/a should not trigger when we have a dig active. [How] Avoid disable otg when dig was disabled. Reviewed-by: Nicholas Kazlauskas Acked-by: Alan Liu Signed-off-by: Jingwen Zhu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0cf8307adbc6beb5ff3b8a76afedc6e4e0b536a9 Author: Stylon Wang Date: Tue Jan 10 14:38:33 2023 +0800 drm/amd/display: Properly reuse completion structure [Why] Connecting displays to TBT3 docks often produces invalid replies for DPIA AUX requests. It turns out the completion structure was not re-initialized before reusing it, resulting in immature wake up to completion. [How] Properly call reinit_completion() on reused completion structure. Cc: stable@vger.kernel.org Reviewed-by: Solomon Chiu Acked-by: Alan Liu Signed-off-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c84ff24a77fa66aaf7c591cdf806456dcb5c2fcd Author: Robin Chen Date: Tue Jan 10 16:53:55 2023 +0800 drm/amd/display: Pass DSC slice height to PSR FW [Why] When DSC is enabled, the PSRSU seletive update region must be multiple number of DSC slice height number. The original solution is to overwrite the SU Y granularity by DSC slice height in DAL driver. However, the size of the SU Y granularity variable only has 8 bytes and the DSC slice height may over the 8 bytes size. [How] Instead of overwriting the SU Y granularity value, add a new DSC slice height pararmeter and pass it to DMUB PSRSU FW. The PSRSU FW will refer to the DSC slice height value and extend the SU region. Reviewed-by: Dennis Chan Reviewed-by: ChunTao Tso Acked-by: Alan Liu Signed-off-by: Robin Chen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6ca7415f11af5200ab10bd420b513f846e9bfb99 Author: Wenjing Liu Date: Mon Jan 9 16:52:39 2023 -0500 drm/amd/display: merge dc_link_dp into dc_link [why] Temporarly merge dc_link_dp functions into dc_link for the purpose of removing dc_link_dp files. This is a transitional change for later commits where we will further refactor dc_link file. Reviewed-by: George Shen Acked-by: Alan Liu Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit de3fb390175b573710f80d5812907d5afaa1d819 Author: Wenjing Liu Date: Mon Jan 9 15:25:43 2023 -0500 drm/amd/display: move dp cts functions from dc_link_dp to link_dp_cts Create new files link_dp_cts.c and link_dp_cts.h, and move DP cts functions into them. Reviewed-by: George Shen Acked-by: Alan Liu Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c5a31f178e3523802f497094d53aaccf77192813 Author: Wenjing Liu Date: Mon Jan 9 14:38:35 2023 -0500 drm/amd/display: move dp irq handler functions from dc_link_dp to link_dp_irq_handler Create new files link_dp_irq_handler.c and link_dp_irq_handler.h, and move DP irq handler functions into them. Reviewed-by: George Shen Acked-by: Alan Liu Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e95afc1cf7c66e010ef47a0df729f1baf3199671 Author: Sung Joon Kim Date: Wed Jan 11 13:12:21 2023 -0500 drm/amd/display: Enable AdaptiveSync in DC interface [why] Start enabling AdaptiveSync feature on Linux environment. [how] Adding AdaptiveSync support in DC layer - building AdaptiveSync info_packets - adjusting the v_startup parameter Reviewed-by: Harry Wentland Reviewed-by: Anthony Koo Acked-by: Alan Liu Signed-off-by: Sung Joon Kim Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 235fef6c7fd341026eee90cc546e6e8ff8b2c315 Author: Samson Tam Date: Wed Jan 11 13:31:31 2023 -0500 drm/amd/display: adjust MALL size available for DCN32 and DCN321 [Why] MALL size available can vary for different SKUs. Use num_chans read from VBIOS to determine the available MALL size we can use [How] Define max_chans for DCN32 and DCN321. If num_chans is max_chans, then return max_chans as we can access the entire MALL space. Otherwise, define avail_chans as the number of available channels we are allowed instead. Return corresponding number of channels back and use this to calculate available MALL size. Reviewed-by: Nevenko Stupar Acked-by: Alan Liu Signed-off-by: Samson Tam Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 01ecd870ce2f06fe9ef5ef67b449e3f24289c575 Author: Alvin Lee Date: Wed Jan 11 17:31:13 2023 -0500 drm/amd/display: Set init freq for DCFCLK DS [Description] - Set init frequency for DCFCLK DS - For now choose 10Mhz after turning off all pipes on init - DCN32 spreadsheet shows 8Mhz is min for any display config Reviewed-by: Jun Lei Acked-by: Alan Liu Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2710d6c1e32d26b9020f4afbc9fe2eeee3757a81 Author: Alvin Lee Date: Wed Jan 11 10:33:44 2023 -0500 drm/amd/display: Use |= when assigning wm_optimized_required [Description] Use |= when assigning to wm_optimized required because we don't want to overwrite the flag in case the optimize did not happen yet Reviewed-by: Aric Cyr Acked-by: Alan Liu Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0078c924e733cdf21df8e304d85b297f7dea3926 Author: Wenjing Liu Date: Mon Dec 19 14:54:31 2022 -0500 drm/amd/display: move eDP panel control logic to link_edp_panel_control Create new file link_edp_panel_control.c and link_edp_panel_control.h, and move eDP panel control logic into them. Reviewed-by: George Shen Reviewed-by: Jun Lei Acked-by: Alan Liu Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit bc33f5e5f05ba44e48909e2cfc5a97475ec69a4d Author: Wenjing Liu Date: Fri Dec 16 17:16:19 2022 -0500 drm/amd/display: create accessories, hwss and protocols sub folders in link [why] link component contains three sub folders: accessories - utilities for improving testability, logging or tracing, doesn't impact end user use cases. protocols - specs defined protocols used in end user use cases hwss - hwss owned link_hwss object, served as an abstraction layer in hwss to access various types of encoder/phy/dpia endpoints in a unified interface. sooner we will have files directly under link folder one for the implementation of each major link behavior such as link_create, link_detect, link_validate and link_set_dpms. Reviewed-by: George Shen Reviewed-by: Jun Lei Acked-by: Alan Liu Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 997336483200fef8eb43012307eb08410edddf15 Author: Alvin Lee Date: Tue Jan 10 11:27:59 2023 -0500 drm/amd/display: Disable SubVP for PSR panels [Description] - We cannot enable subvp on PSR panels because when PSR is active, HUBP is turned off and we cannot rely on the HUBP vline interrupt - When in PSR, surface data also cannot be prefetched to MALL because the main HUBP will be off Reviewed-by: Jun Lei Reviewed-by: Nevenko Stupar Acked-by: Alan Liu Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e019a7ba38fba807076c501deb757ed18cd6a0df Author: Aric Cyr Date: Sun Jan 8 22:33:21 2023 -0500 drm/amd/display: 3.2.219 This version brings along following fixes: - [FW Promotion] Release 0.0.150.0 - Correcting prefetch mode for fast validate - Set hvm_enabled flag for S/G mode - set allow_freesync parameter in DM - Revert "ignore msa parameter only if freesync is enabled" - Allow idle optimization after turning off all pipes - Guard Freesync HDMI parsing with dc_lock - Speed up DML fast_validate path - Disable MALL SS and messages for PSR supported configs - force connector state when bpc changes during compliance Acked-by: Alan Liu Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0888aa30bb6ed6d5f7a718aa0d722d2f75c48d7a Author: Anthony Koo Date: Sat Jan 7 23:20:48 2023 -0500 drm/amd/display: [FW Promotion] Release 0.0.150.0 - Add comments to reserved bit Reviewed-by: Aric Cyr Acked-by: Alan Liu Signed-off-by: Anthony Koo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f823323b4abdc171b510190280a01565e21bd392 Author: David (Ming Qiang) Wu Date: Fri Jan 13 13:44:26 2023 -0500 drm/amdgpu: limit AV1 to the first instance on VCN4 encode AV1 is only supported on the first instance. Added vcn_v4_0_enc_find_ib_param() to help search for an IB param. Signed-off-by: David (Ming Qiang) Wu Reviewed-by: Ruijing Dong Signed-off-by: Alex Deucher commit ae284577d8a4a2ffdd25acc221d51a4ac05a2b2d Author: Saaem Rizvi Date: Thu Jan 5 18:28:34 2023 -0500 drm/amd/display: Correcting prefetch mode for fast validate [WHY and HOW] When fast validating, we should be agnostic to any sort of optimizations such as supporting Pstate or stutter in Vblank. We should change our prefetch mode for fast validate to support none of these optimizations. For example, Valve Index running at 144Hz can only be validated without any support these optimizations. Reviewed-by: Alvin Lee Acked-by: Alan Liu Signed-off-by: Saaem Rizvi Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 40e9f3f067bc6fb47b878f8ba0a9cc7b93abbf49 Author: Roman Li Date: Thu Jan 5 17:44:10 2023 -0500 drm/amd/display: Set hvm_enabled flag for S/G mode [Why] After enabling S/G on dcn314 a screen corruption may be observed. HostVM flag should be set in S/G mode to be included in DML calculations. [How] In S/G mode gpu_vm_support flag is set. Use its value to init is_hvm_enabled. Reviewed-by: Nicholas Kazlauskas Acked-by: Alan Liu Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ba512eaa75e4bcf596ac616ca8388959556855b3 Author: Wayne Lin Date: Wed Jan 18 18:01:15 2023 +0800 drm/amdgpu/display/mst: adjust the logic in 2nd phase of updating payload [why & how] adjust the coding in dm_helpers_dp_mst_send_payload_allocation() for reading easily. Signed-off-by: Wayne Lin Signed-off-by: Harry Wentland Acked-by: Harry Wentland Reviewed-by: Lyude Paul Signed-off-by: Alex Deucher commit f0127cb11299df80df45583b216e13f27c408545 Author: Wayne Lin Date: Wed Dec 28 19:47:12 2022 +0800 drm/amdgpu/display/mst: adjust the naming of mst_port and port of aconnector [why & how] The term (i.e. port & mst_port) that we used to use in amdgpu is a bit confusing. Rename them to mst_output_port & mst_root respectively. Signed-off-by: Wayne Lin Signed-off-by: Harry Wentland Acked-by: Harry Wentland Reviewed-by: Lyude Paul Signed-off-by: Alex Deucher commit 9b2d019144a00627ed95cc1f664fc681b6fe1c7d Author: Wayne Lin Date: Wed Dec 28 14:50:43 2022 +0800 drm/display/dp_mst: Correct the kref of port. [why & how] We still need to refer to port while removing payload at commit_tail. we should keep the kref till then to release. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2171 Signed-off-by: Wayne Lin Signed-off-by: Harry Wentland Fixes: 4d07b0bc4034 ("drm/display/dp_mst: Move all payload info into the atomic state") Cc: stable@vger.kernel.org # 6.1 Acked-by: Harry Wentland Reviewed-by: Lyude Paul Tested-by: Didier Raboud Signed-off-by: Alex Deucher commit d987150b539271b0394f24c1c648d2846662adb4 Author: Wayne Lin Date: Fri Dec 23 09:57:02 2022 +0800 drm/drm_print: correct format problem [why & how] __drm_dbg() parameter set format is wrong and not aligned with the format under CONFIG_DRM_USE_DYNAMIC_DEBUG is on. Fix it. Signed-off-by: Wayne Lin Signed-off-by: Harry Wentland Acked-by: Harry Wentland Reviewed-by: Lyude Paul Signed-off-by: Alex Deucher commit 2daeb74b7d66362de8e15b983e310e85f01930e5 Author: Wayne Lin Date: Mon Dec 12 15:41:18 2022 +0800 drm/amdgpu/display/mst: update mst_mgr relevant variable when long HPD [Why & How] Now the vc_start_slot is controlled at drm side. When we service a long HPD, we still need to run dm_helpers_dp_mst_write_payload_allocation_table() to update drm mst_mgr's relevant variable. Otherwise, on the next plug-in, payload will get assigned with a wrong start slot. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2171 Signed-off-by: Wayne Lin Signed-off-by: Harry Wentland Fixes: 4d07b0bc4034 ("drm/display/dp_mst: Move all payload info into the atomic state") Cc: stable@vger.kernel.org # 6.1 Acked-by: Harry Wentland Reviewed-by: Lyude Paul Tested-by: Didier Raboud Signed-off-by: Alex Deucher commit ea38dd57b0a65a7d434a7d9528c7b0445a5ea3ed Author: Wayne Lin Date: Fri Dec 9 19:05:33 2022 +0800 drm/amdgpu/display/mst: limit payload to be updated one by one [Why] amdgpu expects to update payload table for one stream one time by calling dm_helpers_dp_mst_write_payload_allocation_table(). Currently, it get modified to try to update HW payload table at once by referring mst_state. [How] This is just a quick workaround. Should find way to remove the temporary struct dc_dp_mst_stream_allocation_table later if set struct link_mst_stream_allocatio directly is possible. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2171 Signed-off-by: Wayne Lin Signed-off-by: Harry Wentland Fixes: 4d07b0bc4034 ("drm/display/dp_mst: Move all payload info into the atomic state") Cc: stable@vger.kernel.org # 6.1 Acked-by: Harry Wentland Reviewed-by: Lyude Paul Tested-by: Didier Raboud Signed-off-by: Alex Deucher commit c689e1e362ea29d10fbd9a5e94b17be991d0e231 Author: Lyude Paul Date: Wed Nov 23 14:50:16 2022 -0500 drm/amdgpu/display/mst: Fix mst_state->pbn_div and slot count assignments Looks like I made a pretty big mistake here without noticing: it seems when I moved the assignments of mst_state->pbn_div I completely missed the fact that the reason for us calling drm_dp_mst_update_slots() earlier was to account for the fact that we need to call this function using info from the root MST connector, instead of just trying to do this from each MST encoder's atomic check function. Otherwise, we end up filling out all of DC's link information with zeroes. So, let's restore that and hopefully fix this DSC regression. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2171 Signed-off-by: Lyude Paul Signed-off-by: Harry Wentland Fixes: 4d07b0bc4034 ("drm/display/dp_mst: Move all payload info into the atomic state") Cc: stable@vger.kernel.org # 6.1 Reviewed-by: Harry Wentland Tested-by: Didier Raboud Signed-off-by: Alex Deucher commit e8733482f59e23a8bf79526b7f83ed0d0ff5a9b2 Author: Alexey Dobriyan Date: Fri Nov 18 20:05:21 2022 +0300 KVM: VMX: don't use "unsigned long" in vmx_vcpu_enter_exit() __vmx_vcpu_run_flags() returns "unsigned int" and uses only 2 bits of it so using "unsigned long" is very much pointless. Furthermore, __vmx_vcpu_run() and vmx_spec_ctrl_restore_host() take an "unsigned int", i.e. actually relying on an "unsigned long" value won't work. Signed-off-by: Alexey Dobriyan Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/Y3e7UW0WNV2AZmsZ@p183 Signed-off-by: Sean Christopherson commit 5a7a64779e7ad21f71824faee234b33654df57bb Author: Sean Christopherson Date: Sat Nov 19 00:37:47 2022 +0000 KVM: VMX: Access @flags as a 32-bit value in __vmx_vcpu_run() Access @flags using 32-bit operands when saving and testing @flags for VMX_RUN_VMRESUME, as using 8-bit operands is unnecessarily fragile due to relying on VMX_RUN_VMRESUME being in bits 0-7. The behavior of treating @flags a single byte is a holdover from when the param was "bool launched", i.e. is not deliberate. Cc: Alexey Dobriyan Reviewed-by: Jim Mattson Link: https://lore.kernel.org/r/20221119003747.2615229-1-seanjc@google.com Signed-off-by: Sean Christopherson commit a31b531cd2fa2e6b2a736833a94b990d5cf56b40 Author: Anish Ghulati Date: Fri Jan 13 22:09:23 2023 +0000 KVM: SVM: Account scratch allocations used to decrypt SEV guest memory Account the temp/scratch allocation used to decrypt unaligned debug accesses to SEV guest memory, the allocation is very much tied to the target VM. Reported-by: Mingwei Zhang Signed-off-by: Anish Ghulati Link: https://lore.kernel.org/r/20230113220923.2834699-1-aghulati@google.com Signed-off-by: Sean Christopherson commit 36b0256789a72f4d9d173f1a37d6fcb5ded4c244 Author: Like Xu Date: Wed Nov 9 19:59:52 2022 +0800 KVM: svm/avic: Drop "struct kvm_x86_ops" for avic_hardware_setup() Even in commit 4bdec12aa8d6 ("KVM: SVM: Detect X2APIC virtualization (x2AVIC) support"), where avic_hardware_setup() was first introduced, its only pass-in parameter "struct kvm_x86_ops *ops" is not used at all. Clean it up a bit to avoid compiler ranting from LLVM toolchain. Signed-off-by: Like Xu Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20221109115952.92816-1-likexu@tencent.com Signed-off-by: Sean Christopherson commit 5f6015b26ba2e0352c17b9034f1f62c653170713 Author: zhang songyi Date: Mon Nov 28 20:03:38 2022 +0800 KVM: SVM: remove redundant ret variable Return value from svm_nmi_blocked() directly instead of taking this in another redundant variable. Signed-off-by: zhang songyi Link: https://lore.kernel.org/r/202211282003389362484@zte.com.cn Signed-off-by: Sean Christopherson commit 78332517a5dab54514ae719805eec218715de1fc Author: Jing Zhang Date: Tue Jan 17 14:27:07 2023 -0800 KVM: selftests: Stop assuming stats are contiguous in kvm_binary_stats_test Remove the assumption from kvm_binary_stats_test that all stats are laid out contiguously in memory. The current stats in KVM are contiguously laid out in memory, but that may change in the future and the ABI specifically allows holes in the stats data (since each stat exposes its own offset). While here drop the check that each stats' offset is less than size_data, as that is now always true by construction. Link: https://lore.kernel.org/kvm/20221208193857.4090582-9-dmatlack@google.com/ Fixes: 0b45d58738cd ("KVM: selftests: Add selftest for KVM statistics data binary interface") Signed-off-by: Jing Zhang [dmatlack: Re-worded the commit message.] Signed-off-by: David Matlack Link: https://lore.kernel.org/r/20230117222707.3949974-1-dmatlack@google.com Signed-off-by: Sean Christopherson commit 96e78ebbe8e47d096c1ed74ec1d28a107126c26c Author: zhang songyi Date: Mon Dec 19 14:32:27 2022 +0800 KVM: x86/xen: Remove unneeded semicolon The semicolon after the "}" is unneeded. Signed-off-by: zhang songyi Link: https://lore.kernel.org/r/202212191432274558936@zte.com.cn Signed-off-by: Sean Christopherson commit ea25ace7710b918fe49647350d4dee363563908f Author: Vishal Annapurve Date: Wed Jan 11 00:44:45 2023 +0000 KVM: selftests: x86: Use host's native hypercall instruction in kvm_hypercall() Use the host CPU's native hypercall instruction, i.e. VMCALL vs. VMMCALL, in kvm_hypercall(), as relying on KVM to patch in the native hypercall on a #UD for the "wrong" hypercall requires KVM_X86_QUIRK_FIX_HYPERCALL_INSN to be enabled and flat out doesn't work if guest memory is encrypted with a private key, e.g. for SEV VMs. Suggested-by: Sean Christopherson Reviewed-by: David Matlack Signed-off-by: Vishal Annapurve Link: https://lore.kernel.org/r/20230111004445.416840-4-vannapurve@google.com Signed-off-by: Sean Christopherson commit e6df2ae3f57c6bfab29e767796ce8d4796a84ebb Author: Vishal Annapurve Date: Wed Jan 11 00:44:44 2023 +0000 KVM: selftests: x86: Cache host CPU vendor (AMD vs. Intel) Cache the host CPU vendor for userspace and share it with guest code. All the current callers of this_cpu* actually care about host cpu so they are updated to check host_cpu_is*. Suggested-by: Sean Christopherson Reviewed-by: David Matlack Signed-off-by: Vishal Annapurve Link: https://lore.kernel.org/r/20230111004445.416840-3-vannapurve@google.com Signed-off-by: Sean Christopherson commit e99b0d4cc2b679c5892d0994610b44e7b584d98b Author: Vishal Annapurve Date: Wed Jan 11 00:44:43 2023 +0000 KVM: selftests: x86: Use "this_cpu" prefix for cpu vendor queries Replace is_intel/amd_cpu helpers with this_cpu_* helpers to better convey the intent of querying vendor of the current cpu. Suggested-by: Sean Christopherson Reviewed-by: David Matlack Signed-off-by: Vishal Annapurve Link: https://lore.kernel.org/r/20230111004445.416840-2-vannapurve@google.com Signed-off-by: Sean Christopherson commit ca17899693518acde9ba1adcf46b95d76286106d Author: Aaron Lewis Date: Fri Dec 9 20:13:27 2022 +0000 KVM: selftests: Fix a typo in the vcpu_msrs_set assert The assert incorrectly identifies the ioctl being called. Switch it from KVM_GET_MSRS to KVM_SET_MSRS. Fixes: 6ebfef83f03f ("KVM: selftest: Add proper helpers for x86-specific save/restore ioctls") Signed-off-by: Aaron Lewis Reviewed-by: Jim Mattson Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20221209201326.2781950-1-aaronlewis@google.com Signed-off-by: Sean Christopherson commit bf10993313e909bbf928bc40fd03141ffe23c7ec Author: Reiji Watanabe Date: Tue Dec 20 09:09:21 2022 -0800 KVM: selftests: kvm_vm_elf_load() and elfhdr_get() should close fd kvm_vm_elf_load() and elfhdr_get() open one file each, but they never close the opened file descriptor. If a test repeatedly creates and destroys a VM with __vm_create(), which (directly or indirectly) calls those two functions, the test might end up getting a open failure with EMFILE. Fix those two functions to close the file descriptor. Signed-off-by: Reiji Watanabe Reviewed-by: Oliver Upton Reviewed-by: Andrew Jones Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20221220170921.2499209-2-reijiw@google.com Signed-off-by: Sean Christopherson commit 647ffac11ebbbd21e04dd11a7125decb99eeee65 Author: Aaron Lewis Date: Tue Dec 20 16:12:36 2022 +0000 KVM: selftests: Test masked events in PMU filter Add testing to show that a pmu event can be filtered with a generalized match on it's unit mask. These tests set up test cases to demonstrate various ways of filtering a pmu event that has multiple unit mask values. It does this by setting up the filter in KVM with the masked events provided, then enabling three pmu counters in the guest. The test then verifies that the pmu counters agree with which counters should be counting and which counters should be filtered for both a sparse filter list and a dense filter list. Signed-off-by: Aaron Lewis Link: https://lore.kernel.org/r/20221220161236.555143-8-aaronlewis@google.com Signed-off-by: Sean Christopherson commit 7b7027937d0155aaf583afbb9da4311fb5f28dd8 Author: Aaron Lewis Date: Tue Dec 20 16:12:35 2022 +0000 KVM: selftests: Add testing for KVM_SET_PMU_EVENT_FILTER Test that masked events are not using invalid bits, and if they are, ensure the pmu event filter is not accepted by KVM_SET_PMU_EVENT_FILTER. The only valid bits that can be used for masked events are set when using KVM_PMU_ENCODE_MASKED_ENTRY() with one exception: If any of the high bits (35:32) of the event select are set when using Intel, the pmu event filter will fail. Also, because validation was not being done prior to the introduction of masked events, only expect validation to fail when masked events are used. E.g. in the first test a filter event with all its bits set is accepted by KVM_SET_PMU_EVENT_FILTER when flags = 0. Signed-off-by: Aaron Lewis Link: https://lore.kernel.org/r/20221220161236.555143-7-aaronlewis@google.com Signed-off-by: Sean Christopherson commit f1e06fa10e37341a4a642d93fbd0a9babe129655 Author: Aaron Lewis Date: Tue Dec 20 16:12:34 2022 +0000 KVM: selftests: Add flags when creating a pmu event filter Now that the flags field can be non-zero, pass it in when creating a pmu event filter. This is needed in preparation for testing masked events. No functional change intended. Signed-off-by: Aaron Lewis Link: https://lore.kernel.org/r/20221220161236.555143-6-aaronlewis@google.com Signed-off-by: Sean Christopherson commit 14329b825ffb7f2710c13fdcc37fc2e7c67b6781 Author: Aaron Lewis Date: Tue Dec 20 16:12:33 2022 +0000 KVM: x86/pmu: Introduce masked events to the pmu event filter When building a list of filter events, it can sometimes be a challenge to fit all the events needed to adequately restrict the guest into the limited space available in the pmu event filter. This stems from the fact that the pmu event filter requires each event (i.e. event select + unit mask) be listed, when the intention might be to restrict the event select all together, regardless of it's unit mask. Instead of increasing the number of filter events in the pmu event filter, add a new encoding that is able to do a more generalized match on the unit mask. Introduce masked events as another encoding the pmu event filter understands. Masked events has the fields: mask, match, and exclude. When filtering based on these events, the mask is applied to the guest's unit mask to see if it matches the match value (i.e. umask & mask == match). The exclude bit can then be used to exclude events from that match. E.g. for a given event select, if it's easier to say which unit mask values shouldn't be filtered, a masked event can be set up to match all possible unit mask values, then another masked event can be set up to match the unit mask values that shouldn't be filtered. Userspace can query to see if this feature exists by looking for the capability, KVM_CAP_PMU_EVENT_MASKED_EVENTS. This feature is enabled by setting the flags field in the pmu event filter to KVM_PMU_EVENT_FLAG_MASKED_EVENTS. Events can be encoded by using KVM_PMU_ENCODE_MASKED_ENTRY(). It is an error to have a bit set outside the valid bits for a masked event, and calls to KVM_SET_PMU_EVENT_FILTER will return -EINVAL in such cases, including the high bits of the event select (35:32) if called on Intel. With these updates the filter matching code has been updated to match on a common event. Masked events were flexible enough to handle both event types, so they were used as the common event. This changes how guest events get filtered because regardless of the type of event used in the uAPI, they will be converted to masked events. Because of this there could be a slight performance hit because instead of matching the filter event with a lookup on event select + unit mask, it does a lookup on event select then walks the unit masks to find the match. This shouldn't be a big problem because I would expect the set of common event selects to be small, and if they aren't the set can likely be reduced by using masked events to generalize the unit mask. Using one type of event when filtering guest events allows for a common code path to be used. Signed-off-by: Aaron Lewis Link: https://lore.kernel.org/r/20221220161236.555143-5-aaronlewis@google.com Signed-off-by: Sean Christopherson commit c5a287fa0dccd3e43a6ea5602191f9ac09a68889 Author: Aaron Lewis Date: Tue Dec 20 16:12:32 2022 +0000 KVM: x86/pmu: prepare the pmu event filter for masked events Refactor check_pmu_event_filter() in preparation for masked events. No functional changes intended Signed-off-by: Aaron Lewis Link: https://lore.kernel.org/r/20221220161236.555143-4-aaronlewis@google.com Signed-off-by: Sean Christopherson commit 8589827fd5342b0ae3703e3093a946d708c44f3a Author: Aaron Lewis Date: Tue Dec 20 16:12:31 2022 +0000 KVM: x86/pmu: Remove impossible events from the pmu event filter If it's not possible for an event in the pmu event filter to match a pmu event being programmed by the guest, it's pointless to have it in the list. Opt for a shorter list by removing those events. Because this is established uAPI the pmu event filter can't outright rejected these events as garbage and return an error. Instead, play nice and remove them from the list. Also, opportunistically rewrite the comment when the filter is set to clarify that it guards against *all* TOCTOU attacks on the verified data. Signed-off-by: Aaron Lewis Link: https://lore.kernel.org/r/20221220161236.555143-3-aaronlewis@google.com Signed-off-by: Sean Christopherson commit 6a5cba7bed35580effda9fb1872b274da47e6b23 Author: Aaron Lewis Date: Tue Dec 20 16:12:30 2022 +0000 KVM: x86/pmu: Correct the mask used in a pmu event filter lookup When checking if a pmu event the guest is attempting to program should be filtered, only consider the event select + unit mask in that decision. Use an architecture specific mask to mask out all other bits, including bits 35:32 on Intel. Those bits are not part of the event select and should not be considered in that decision. Fixes: 66bb8a065f5a ("KVM: x86: PMU Event Filter") Signed-off-by: Aaron Lewis Link: https://lore.kernel.org/r/20221220161236.555143-2-aaronlewis@google.com Signed-off-by: Sean Christopherson commit 11b36fe7d4500c8ef73677c087f302fd713101c2 Author: Christophe JAILLET Date: Sat Jan 14 10:39:11 2023 +0100 KVM: x86/mmu: Use kstrtobool() instead of strtobool() strtobool() is the same as kstrtobool(). However, the latter is more used within the kernel. In order to remove strtobool() and slightly simplify kstrtox.h, switch to the other function name. While at it, include the corresponding header file () Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/670882aa04dbdd171b46d3b20ffab87158454616.1673689135.git.christophe.jaillet@wanadoo.fr Signed-off-by: Sean Christopherson commit 4ad980aea7f58632638d036ac5697fccf8234dde Author: Hou Wenlong Date: Mon Oct 10 20:19:17 2022 +0800 KVM: x86/mmu: Cleanup range-based flushing for given page Use the new kvm_flush_remote_tlbs_gfn() helper to cleanup the call sites of range-based flushing for given page, which makes the code clear. Signed-off-by: Hou Wenlong Link: https://lore.kernel.org/r/593ee1a876ece0e819191c0b23f56b940d6686db.1665214747.git.houwenlong.hwl@antgroup.com Signed-off-by: Sean Christopherson commit 3cdf93746f9a9a8a81b044219dcf51ce98bd0abf Author: Hou Wenlong Date: Mon Oct 10 20:19:16 2022 +0800 KVM: x86/mmu: Fix wrong gfn range of tlb flushing in validate_direct_spte() The spte pointing to the children SP is dropped, so the whole gfn range covered by the children SP should be flushed. Although, Hyper-V may treat a 1-page flush the same if the address points to a huge page, it still would be better to use the correct size of huge page. Fixes: c3134ce240eed ("KVM: Replace old tlb flush function with new one to flush a specified range.") Suggested-by: Sean Christopherson Signed-off-by: Hou Wenlong Link: https://lore.kernel.org/r/5f297c566f7d7ff2ea6da3c66d050f69ce1b8ede.1665214747.git.houwenlong.hwl@antgroup.com Signed-off-by: Sean Christopherson commit 1b2dc7360463932d2e7cac9461de16ce6fa11cb7 Author: Hou Wenlong Date: Mon Oct 10 20:19:15 2022 +0800 KVM: x86/mmu: Fix wrong start gfn of tlb flushing with range When a spte is dropped, the start gfn of tlb flushing should be the gfn of spte not the base gfn of SP which contains the spte. Also introduce a helper function to do range-based flushing when a spte is dropped, which would help prevent future buggy use of kvm_flush_remote_tlbs_with_address() in such case. Fixes: c3134ce240eed ("KVM: Replace old tlb flush function with new one to flush a specified range.") Suggested-by: David Matlack Signed-off-by: Hou Wenlong Link: https://lore.kernel.org/r/72ac2169a261976f00c1703e88cda676dfb960f5.1665214747.git.houwenlong.hwl@antgroup.com Signed-off-by: Sean Christopherson commit 1e203847aa9245bd782d6dc904ece124ca1b89cb Author: Hou Wenlong Date: Mon Oct 10 20:19:14 2022 +0800 KVM: x86/mmu: Reduce gfn range of tlb flushing in tdp_mmu_map_handle_target_level() Since the children SP is zapped, the gfn range of tlb flushing should be the range covered by children SP not parent SP. Replace sp->gfn which is the base gfn of parent SP with iter->gfn and use the correct size of gfn range for children SP to reduce tlb flushing range. Fixes: bb95dfb9e2df ("KVM: x86/mmu: Defer TLB flush to caller when freeing TDP MMU shadow pages") Signed-off-by: Hou Wenlong Reviewed-by: David Matlack Link: https://lore.kernel.org/r/528ab9c784a486e9ce05f61462ad9260796a8732.1665214747.git.houwenlong.hwl@antgroup.com Signed-off-by: Sean Christopherson commit 9ffe9265375cbaf6c01647e31ae9fee8595b698c Author: Hou Wenlong Date: Mon Oct 10 20:19:13 2022 +0800 KVM: x86/mmu: Fix wrong gfn range of tlb flushing in kvm_set_pte_rmapp() When the spte of hupe page is dropped in kvm_set_pte_rmapp(), the whole gfn range covered by the spte should be flushed. However, rmap_walk_init_level() doesn't align down the gfn for new level like tdp iterator does, then the gfn used in kvm_set_pte_rmapp() is not the base gfn of huge page. And the size of gfn range is wrong too for huge page. Use the base gfn of huge page and the size of huge page for flushing tlbs for huge page. Also introduce a helper function to flush the given page (huge or not) of guest memory, which would help prevent future buggy use of kvm_flush_remote_tlbs_with_address() in such case. Fixes: c3134ce240eed ("KVM: Replace old tlb flush function with new one to flush a specified range.") Signed-off-by: Hou Wenlong Link: https://lore.kernel.org/r/0ce24d7078fa5f1f8d64b0c59826c50f32f8065e.1665214747.git.houwenlong.hwl@antgroup.com Signed-off-by: Sean Christopherson commit c667a3baeddcc982bf512c126aec8d0f04adecfe Author: Hou Wenlong Date: Mon Oct 10 20:19:12 2022 +0800 KVM: x86/mmu: Move round_gfn_for_level() helper into mmu_internal.h Rounding down the GFN to a huge page size is a common pattern throughout KVM, so move round_gfn_for_level() helper in tdp_iter.c to mmu_internal.h for common usage. Also rename it as gfn_round_for_level() to use gfn_* prefix and clean up the other call sites. Signed-off-by: Hou Wenlong Link: https://lore.kernel.org/r/415c64782f27444898db650e21cf28eeb6441dfa.1665214747.git.houwenlong.hwl@antgroup.com Signed-off-by: Sean Christopherson commit a7e48ef77ff27ba2647edec271b302804a0b14c3 Author: Wei Liu Date: Mon Nov 28 21:47:09 2022 +0000 KVM: x86/mmu: fix an incorrect comment in kvm_mmu_new_pgd() There is no function named kvm_mmu_ensure_valid_pgd(). Fix the comment and remove the pair of braces to conform to Linux kernel coding style. Signed-off-by: Wei Liu Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20221128214709.224710-1-wei.liu@kernel.org Signed-off-by: Sean Christopherson commit 9e3fbdfd9b894f15c52965bbc1696a65d377f3cd Author: Lai Jiangshan Date: Thu Jan 5 18:03:10 2023 +0800 kvm: x86/mmu: Don't clear write flooding for direct SP Although there is no harm, but there is no point to clear write flooding for direct SP. Signed-off-by: Lai Jiangshan Link: https://lore.kernel.org/r/20230105100310.6700-1-jiangshanlai@gmail.com Signed-off-by: Sean Christopherson commit dc1ae59fc4310bdb54d495bdad180b46f646a9ea Author: Lai Jiangshan Date: Thu Jan 5 18:02:03 2023 +0800 kvm: x86/mmu: Rename SPTE_TDP_AD_ENABLED_MASK to SPTE_TDP_AD_ENABLED SPTE_TDP_AD_ENABLED_MASK, SPTE_TDP_AD_DISABLED_MASK and SPTE_TDP_AD_WRPROT_ONLY_MASK are actual value, not mask. Remove "MASK" from their names. Signed-off-by: Lai Jiangshan Link: https://lore.kernel.org/r/20230105100204.6521-1-jiangshanlai@gmail.com Signed-off-by: Sean Christopherson commit a2b07fa7b93321c059af0c6d492cc9a4f1e390aa Author: Sean Christopherson Date: Wed Nov 30 23:36:50 2022 +0000 x86/reboot: Disable SVM, not just VMX, when stopping CPUs Disable SVM and more importantly force GIF=1 when halting a CPU or rebooting the machine. Similar to VMX, SVM allows software to block INITs via CLGI, and thus can be problematic for a crash/reboot. The window for failure is smaller with SVM as INIT is only blocked while GIF=0, i.e. between CLGI and STGI, but the window does exist. Fixes: fba4f472b33a ("x86/reboot: Turn off KVM when halting a CPU") Cc: stable@vger.kernel.org Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/20221130233650.1404148-5-seanjc@google.com Signed-off-by: Sean Christopherson commit d81f952aa657b76cea381384bef1fea35c5fd266 Author: Sean Christopherson Date: Wed Nov 30 23:36:49 2022 +0000 x86/reboot: Disable virtualization in an emergency if SVM is supported Disable SVM on all CPUs via NMI shootdown during an emergency reboot. Like VMX, SVM can block INIT, e.g. if the emergency reboot is triggered between CLGI and STGI, and thus can prevent bringing up other CPUs via INIT-SIPI-SIPI. Cc: stable@vger.kernel.org Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/20221130233650.1404148-4-seanjc@google.com Signed-off-by: Sean Christopherson commit 6a3236580b0b1accc3976345e723104f74f6f8e6 Author: Sean Christopherson Date: Wed Nov 30 23:36:48 2022 +0000 x86/virt: Force GIF=1 prior to disabling SVM (for reboot flows) Set GIF=1 prior to disabling SVM to ensure that INIT is recognized if the kernel is disabling SVM in an emergency, e.g. if the kernel is about to jump into a crash kernel or may reboot without doing a full CPU RESET. If GIF is left cleared, the new kernel (or firmware) will be unabled to awaken APs. Eat faults on STGI (due to EFER.SVME=0) as it's possible that SVM could be disabled via NMI shootdown between reading EFER.SVME and executing STGI. Link: https://lore.kernel.org/all/cbcb6f35-e5d7-c1c9-4db9-fe5cc4de579a@amd.com Cc: stable@vger.kernel.org Cc: Andrew Cooper Cc: Tom Lendacky Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/20221130233650.1404148-3-seanjc@google.com Signed-off-by: Sean Christopherson commit 26044aff37a5455b19a91785086914fd33053ef4 Author: Sean Christopherson Date: Wed Nov 30 23:36:47 2022 +0000 x86/crash: Disable virt in core NMI crash handler to avoid double shootdown Disable virtualization in crash_nmi_callback() and rework the emergency_vmx_disable_all() path to do an NMI shootdown if and only if a shootdown has not already occurred. NMI crash shootdown fundamentally can't support multiple invocations as responding CPUs are deliberately put into halt state without unblocking NMIs. But, the emergency reboot path doesn't have any work of its own, it simply cares about disabling virtualization, i.e. so long as a shootdown occurred, emergency reboot doesn't care who initiated the shootdown, or when. If "crash_kexec_post_notifiers" is specified on the kernel command line, panic() will invoke crash_smp_send_stop() and result in a second call to nmi_shootdown_cpus() during native_machine_emergency_restart(). Invoke the callback _before_ disabling virtualization, as the current VMCS needs to be cleared before doing VMXOFF. Note, this results in a subtle change in ordering between disabling virtualization and stopping Intel PT on the responding CPUs. While VMX and Intel PT do interact, VMXOFF and writes to MSR_IA32_RTIT_CTL do not induce faults between one another, which is all that matters when panicking. Harden nmi_shootdown_cpus() against multiple invocations to try and capture any such kernel bugs via a WARN instead of hanging the system during a crash/dump, e.g. prior to the recent hardening of register_nmi_handler(), re-registering the NMI handler would trigger a double list_add() and hang the system if CONFIG_BUG_ON_DATA_CORRUPTION=y. list_add double add: new=ffffffff82220800, prev=ffffffff8221cfe8, next=ffffffff82220800. WARNING: CPU: 2 PID: 1319 at lib/list_debug.c:29 __list_add_valid+0x67/0x70 Call Trace: __register_nmi_handler+0xcf/0x130 nmi_shootdown_cpus+0x39/0x90 native_machine_emergency_restart+0x1c9/0x1d0 panic+0x237/0x29b Extract the disabling logic to a common helper to deduplicate code, and to prepare for doing the shootdown in the emergency reboot path if SVM is supported. Note, prior to commit ed72736183c4 ("x86/reboot: Force all cpus to exit VMX root if VMX is supported"), nmi_shootdown_cpus() was subtly protected against a second invocation by a cpu_vmx_enabled() check as the kdump handler would disable VMX if it ran first. Fixes: ed72736183c4 ("x86/reboot: Force all cpus to exit VMX root if VMX is supported") Cc: stable@vger.kernel.org Reported-by: Guilherme G. Piccoli Cc: Vitaly Kuznetsov Cc: Paolo Bonzini Link: https://lore.kernel.org/all/20220427224924.592546-2-gpiccoli@igalia.com Tested-by: Guilherme G. Piccoli Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/20221130233650.1404148-2-seanjc@google.com Signed-off-by: Sean Christopherson commit f422f853af0369be27d2a9f1b20079f2bc3d1ca2 Author: Paul Durrant Date: Fri Jan 6 10:36:00 2023 +0000 KVM: x86/xen: update Xen CPUID Leaf 4 (tsc info) sub-leaves, if present The scaling information in subleaf 1 should match the values set by KVM in the 'vcpu_info' sub-structure 'time_info' (a.k.a. pvclock_vcpu_time_info) which is shared with the guest, but is not directly available to the VMM. The offset values are not set since a TSC offset is already applied. The TSC frequency should also be set in sub-leaf 2. Signed-off-by: Paul Durrant Reviewed-by: David Woodhouse Link: https://lore.kernel.org/r/20230106103600.528-3-pdurrant@amazon.com Signed-off-by: Sean Christopherson commit 48639df8a9e3a1dfcb5880f77556681bd1e53657 Author: Paul Durrant Date: Fri Jan 6 10:35:59 2023 +0000 KVM: x86/cpuid: generalize kvm_update_kvm_cpuid_base() and also capture limit A subsequent patch will need to acquire the CPUID leaf range for emulated Xen so explicitly pass the signature of the hypervisor we're interested in to the new function. Also introduce a new kvm_hypervisor_cpuid structure so we can neatly store both the base and limit leaf indices. Signed-off-by: Paul Durrant Reviewed-by: David Woodhouse Link: https://lore.kernel.org/r/20230106103600.528-2-pdurrant@amazon.com Signed-off-by: Sean Christopherson commit ee661d8ea94e11b3452cd27c301241f2cfa95fca Author: David Matlack Date: Thu Jan 5 13:43:03 2023 -0800 KVM: x86: Replace cpu_dirty_logging_count with nr_memslots_dirty_logging Drop cpu_dirty_logging_count in favor of nr_memslots_dirty_logging. Both fields count the number of memslots that have dirty-logging enabled, with the only difference being that cpu_dirty_logging_count is only incremented when using PML. So while nr_memslots_dirty_logging is not a direct replacement for cpu_dirty_logging_count, it can be combined with enable_pml to get the same information. Signed-off-by: David Matlack Link: https://lore.kernel.org/r/20230105214303.2919415-1-dmatlack@google.com Signed-off-by: Sean Christopherson commit 6213b701a9df047242e69672f56eba62ba0e2d8a Author: Kees Cook Date: Wed Jan 18 11:59:09 2023 -0800 KVM: x86: Replace 0-length arrays with flexible arrays Zero-length arrays are deprecated[1]. Replace struct kvm_nested_state's "data" union 0-length arrays with flexible arrays. (How are the sizes of these arrays verified?) Detected with GCC 13, using -fstrict-flex-arrays=3: arch/x86/kvm/svm/nested.c: In function 'svm_get_nested_state': arch/x86/kvm/svm/nested.c:1536:17: error: array subscript 0 is outside array bounds of 'struct kvm_svm_nested_state_data[0]' [-Werror=array-bounds=] 1536 | &user_kvm_nested_state->data.svm[0]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/uapi/linux/kvm.h:15, from include/linux/kvm_host.h:40, from arch/x86/kvm/svm/nested.c:18: arch/x86/include/uapi/asm/kvm.h:511:50: note: while referencing 'svm' 511 | struct kvm_svm_nested_state_data svm[0]; | ^~~ [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays Cc: Sean Christopherson Cc: Paolo Bonzini Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "Gustavo A. R. Silva" Cc: x86@kernel.org Cc: "H. Peter Anvin" Cc: kvm@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20230105190548.never.323-kees@kernel.org Link: https://lore.kernel.org/r/20230118195905.gonna.693-kees@kernel.org Signed-off-by: Sean Christopherson commit 2a4209d6a9cb51082813e3081e1172ae68d27935 Author: Jim Mattson Date: Thu Sep 1 14:18:07 2022 -0700 KVM: x86: Advertise fast REP string features inherent to the CPU Fast zero-length REP MOVSB, fast short REP STOSB, and fast short REP {CMPSB,SCASB} are inherent features of the processor that cannot be hidden by the hypervisor. When these features are present on the host, enumerate them in KVM_GET_SUPPORTED_CPUID. Signed-off-by: Jim Mattson Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20220901211811.2883855-2-jmattson@google.com Signed-off-by: Sean Christopherson commit f8df91e73a6827a4569bb56cd53e55b4ea2f5b1f Author: Jim Mattson Date: Thu Sep 1 14:18:06 2022 -0700 x86/cpufeatures: Add macros for Intel's new fast rep string features KVM_GET_SUPPORTED_CPUID should reflect these host CPUID bits. The bits are already cached in word 12. Give the bits X86_FEATURE names, so that they can be easily referenced. Hide these bits from /proc/cpuinfo, since the host kernel makes no use of them at present. Signed-off-by: Jim Mattson Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20220901211811.2883855-1-jmattson@google.com Signed-off-by: Sean Christopherson commit b9926482ab91cd6dc19e28ae4f0ae98c6c1217d7 Author: Wang Liang Date: Tue Sep 20 14:02:10 2022 +0800 kvm_host.h: fix spelling typo in function declaration Make parameters in function declaration consistent with those in function definition for better cscope-ability Signed-off-by: Wang Liang Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20220920060210.4842-1-wangliangzz@126.com Signed-off-by: Sean Christopherson commit b1cd16330c8c6bc73e769b7b63e46cec2e292d6c Author: Alexey Dobriyan Date: Thu Nov 17 23:34:19 2022 +0300 KVM: account allocation in generic version of kvm_arch_alloc_vm() Account the allocation of VMs in the generic version of kvm_arch_alloc_vm(), the VM is tied to the current task/process. Note, x86 already accounts its allocation. Signed-off-by: Alexey Dobriyan Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/Y3aay2u2KQgiR0un@p183 [sean: reworded changelog] Signed-off-by: Sean Christopherson commit 8e6ed96cdd5001c55fccc80a17f651741c1ca7d2 Author: Li RongQing Date: Fri Jan 6 12:06:25 2023 +0800 KVM: x86: fire timer when it is migrated and expired, and in oneshot mode when the vCPU was migrated, if its timer is expired, KVM _should_ fire the timer ASAP, zeroing the deadline here will cause the timer to immediately fire on the destination Cc: Sean Christopherson Cc: Peter Shier Cc: Jim Mattson Cc: Wanpeng Li Cc: Paolo Bonzini Signed-off-by: Li RongQing Link: https://lore.kernel.org/r/20230106040625.8404-1-lirongqing@baidu.com Signed-off-by: Sean Christopherson commit 02efd818a6c095bcbf422f47fccc4ef27d53f344 Author: Sean Christopherson Date: Sat Jan 7 01:10:25 2023 +0000 KVM: VMX: Intercept reads to invalid and write-only x2APIC registers Intercept reads to invalid (non-existent) and write-only x2APIC registers when configuring VMX's MSR bitmaps for x2APIC+APICv. When APICv is fully enabled, Intel hardware doesn't validate the registers on RDMSR and instead blindly retrieves data from the vAPIC page, i.e. it's software's responsibility to intercept reads to non-existent and write-only MSRs. Fixes: 8d14695f9542 ("x86, apicv: add virtual x2apic support") Reviewed-by: Maxim Levitsky Link: https://lore.kernel.org/r/20230107011025.565472-7-seanjc@google.com Signed-off-by: Sean Christopherson commit c39857ce8daaaa429ccae2a393301ffeed67e235 Author: Sean Christopherson Date: Sat Jan 7 01:10:24 2023 +0000 KVM: VMX: Always intercept accesses to unsupported "extended" x2APIC regs Don't clear the "read" bits for x2APIC registers above SELF_IPI (APIC regs 0x400 - 0xff0, MSRs 0x840 - 0x8ff). KVM doesn't emulate registers in that space (there are a smattering of AMD-only extensions) and so should intercept reads in order to inject #GP. When APICv is fully enabled, Intel hardware doesn't validate the registers on RDMSR and instead blindly retrieves data from the vAPIC page, i.e. it's software's responsibility to intercept reads to non-existent MSRs. Fixes: 8d14695f9542 ("x86, apicv: add virtual x2apic support") Reviewed-by: Maxim Levitsky Reviewed-by: Jim Mattson Link: https://lore.kernel.org/r/20230107011025.565472-6-seanjc@google.com Signed-off-by: Sean Christopherson commit b5fcc59be72a76b5cf7bcc6d4aba6cdb14557d44 Author: Sean Christopherson Date: Sat Jan 7 01:10:23 2023 +0000 KVM: x86: Split out logic to generate "readable" APIC regs mask to helper Move the generation of the readable APIC regs bitmask to a standalone helper so that VMX can use the mask for its MSR interception bitmaps. No functional change intended. Reviewed-by: Maxim Levitsky Link: https://lore.kernel.org/r/20230107011025.565472-5-seanjc@google.com Signed-off-by: Sean Christopherson commit b223649576fc21bec46260805c2cd70e1cb3b8e8 Author: Sean Christopherson Date: Sat Jan 7 01:10:22 2023 +0000 KVM: x86: Mark x2APIC DFR reg as non-existent for x2APIC Mark APIC_DFR as being invalid/non-existent in x2APIC mode instead of handling it as a one-off check in kvm_x2apic_msr_read(). This will allow reusing "valid_reg_mask" to generate VMX's interception bitmaps for x2APIC. Handling DFR in the common read path may also fix the Hyper-V PV MSR interface, if that can coexist with x2APIC. Reviewed-by: Maxim Levitsky Link: https://lore.kernel.org/r/20230107011025.565472-4-seanjc@google.com Signed-off-by: Sean Christopherson commit ab52be1b310bcb39e6745d34a8f0e8475d67381a Author: Sean Christopherson Date: Sat Jan 7 01:10:21 2023 +0000 KVM: x86: Inject #GP on x2APIC WRMSR that sets reserved bits 63:32 Reject attempts to set bits 63:32 for 32-bit x2APIC registers, i.e. all x2APIC registers except ICR. Per Intel's SDM: Non-zero writes (by WRMSR instruction) to reserved bits to these registers will raise a general protection fault exception Opportunistically fix a typo in a nearby comment. Reported-by: Marc Orr Cc: stable@vger.kernel.org Reviewed-by: Maxim Levitsky Link: https://lore.kernel.org/r/20230107011025.565472-3-seanjc@google.com Signed-off-by: Sean Christopherson commit ba5838abb05334e4abfdff1490585c7f365e0424 Author: Sean Christopherson Date: Sat Jan 7 01:10:20 2023 +0000 KVM: x86: Inject #GP if WRMSR sets reserved bits in APIC Self-IPI Inject a #GP if the guest attempts to set reserved bits in the x2APIC-only Self-IPI register. Bits 7:0 hold the vector, all other bits are reserved. Reported-by: Marc Orr Cc: Ben Gardon Cc: Venkatesh Srinivas Cc: stable@vger.kernel.org Reviewed-by: Maxim Levitsky Link: https://lore.kernel.org/r/20230107011025.565472-2-seanjc@google.com Signed-off-by: Sean Christopherson commit 85e64d09f7934166b77dfbe42eec600c93703cb3 Author: zhang songyi Date: Wed Nov 23 17:04:45 2022 +0800 KVM: x86: remove redundant ret variable Return value from apic_get_tmcct() directly instead of taking this in another redundant variable. Signed-off-by: zhang songyi Link: https://lore.kernel.org/r/202211231704457807160@zte.com.cn Signed-off-by: Sean Christopherson commit 7cb79f433e75b05d1635aefaa851cfcd1cb7dc4f Author: Sean Christopherson Date: Thu Jan 19 18:21:58 2023 +0000 KVM: PPC: Fix refactoring goof in kvmppc_e500mc_init() Fix a build error due to a mixup during a recent refactoring. The error was reported during code review, but the fixed up patch didn't make it into the final commit. Fixes: 474856bad921 ("KVM: PPC: Move processor compatibility check to module init") Link: https://lore.kernel.org/all/87cz93snqc.fsf@mpe.ellerman.id.au Cc: Michael Ellerman Signed-off-by: Sean Christopherson Message-Id: <20230119182158.4026656-1-seanjc@google.com> Signed-off-by: Paolo Bonzini commit e11c775030c5585370fda43035204bb5fa23b139 Author: Tim Huang Date: Fri Jan 20 22:27:32 2023 +0800 drm/amdgpu: skip psp suspend for IMU enabled ASICs mode2 reset The psp suspend & resume should be skipped to avoid destroy the TMR and reload FWs again for IMU enabled APU ASICs. Signed-off-by: Tim Huang Acked-by: Alex Deucher Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit 7eaef1163b820caf202bbb0b1e823806ab836a38 Author: Aurabindo Pillai Date: Thu Jan 5 14:21:45 2023 -0500 drm/amd/display: set allow_freesync parameter in DM [Why&how] There are cases where VRR is possible but not enabled. If allow_freesync parameter is not set, SubVP logic defaults to checking only the ignore MSA parameter that is always set if display is DRR capable, which breaks the system while trying to enable SubVP on multi monitor configs where freesync does not work due to Xorg limitation. SubVP uses allow_freesync parameter to check if SubVP + DRR case can be executed. Reviewed-by: Alvin Lee Acked-by: Alan Liu Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7e5098abffca0b9f884e4b602c7ce2f0a50f48e1 Author: Aurabindo Pillai Date: Thu Jan 5 14:18:09 2023 -0500 drm/amd/display: Revert "ignore msa parameter only if freesync is enabled" This reverts commit 6ffa679916474b26c9b6c81003b42f2e1f0feda1. This commit introduced a regression in Unigine Heaven benchmark where the display would turn off due to incorrect handling of the parameter to ignore MSA packets. Reviewed-by: Alvin Lee Acked-by: Alan Liu Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 174a05af39175bdf59bf50bd1c599384514e1dae Author: Alvin Lee Date: Thu Jan 5 10:46:47 2023 -0500 drm/amd/display: Allow idle optimization after turning off all pipes [Why] In certain D3 cases (BOCO / BOMACO) the hardware is reset but software state still has idle_optimizations = true. This prevents us from entering idle optimizations again if no display is connected. [How] In hw init, reset the idle optimization state, and allow idle optimizations after all pipes have been turned off. Reviewed-by: Jun Lei Acked-by: Alan Liu Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 53f4da731bf36afc32e46c3b7a5f3bd563c93e83 Author: Stylon Wang Date: Wed Dec 21 19:28:16 2022 +0800 drm/amd/display: Guard Freesync HDMI parsing with dc_lock [Why] All calls into DC must be guarded by dc_lock because DC code is not safe against multi-thread or re-entry. [How] Hold dc_lock when calling DC interfaces to parse Freesync HDMI. Reviewed-by: Roman Li Acked-by: Alan Liu Signed-off-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3a9c6f9a6159d8ecdf715f7eda0777ead96bcdc0 Author: Ilya Bakoulin Date: Thu Nov 24 13:58:49 2022 -0500 drm/amd/display: Speed up DML fast_validate path [Why] Iterating over every voltage state when we need to validate thousands of configurations all at once (i.e. display hotplug) can take a significant amount of time. [How] Check just the highest voltage state when fast_validate is true to verify whether the configuration can work at all, then do a proper validation including all voltage states later when fast_validate is false. Reviewed-by: Nevenko Stupar Acked-by: Alan Liu Signed-off-by: Ilya Bakoulin Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0bed85e48af1a1a2851f44bd4c486bff414f1079 Author: Dillon Varone Date: Wed Jan 4 11:00:31 2023 -0500 drm/amd/display: Disable MALL SS and messages for PSR supported configs [Description] The two features are not supported at the same time in driver at this time, so disable it. Reviewed-by: Alvin Lee Acked-by: Alan Liu Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 028c4ccfb8127255d60f8d9edde96cacf2958082 Author: Qingqing Zhuo Date: Mon Oct 3 17:14:13 2022 -0400 drm/amd/display: force connector state when bpc changes during compliance [Why] During DP DSC compliance tests, bpc requested would change between sub-tests, which requires stream to be recommited. [How] Force connector to disconnect and reconnect whenever there is a bpc change in automated test. Reviewed-by: Jerry Zuo Acked-by: Alan Liu Signed-off-by: Qingqing Zhuo Signed-off-by: hersen wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 31769ce9542de804f2cb7c6b9ef1c480345230f1 Author: Hamza Mahfooz Date: Fri Jan 20 12:22:21 2023 -0500 drm/amd/display: use a more appropriate return value in dp_retrieve_lttpr_cap() Not all ASICs support LTTPR, however if they don't it doesn't mean that we have encountered unexpected behaviour. So, use DC_NOT_SUPPORTED instead of DC_ERROR_UNEXPECTED. Reviewed-by: Wenjing Liu Acked-by: Alex Deucher Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit a462ef872fd1e83ebd075cf82d91f111acaa629e Author: Li Ma Date: Fri Jan 20 15:41:22 2023 +0800 drm/amdgpu: declare firmware for new MES 11.0.4 To support new mes ip block Signed-off-by: Li Ma Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher commit 96a5dec18e714a88c8e4c67b495b02ea81aa9a8d Author: Li Ma Date: Fri Jan 20 15:38:33 2023 +0800 drm/amdgpu: enable imu firmware for GC 11.0.4 The GC 11.0.4 needs load IMU to power up GFX before loads GFX firmware. Signed-off-by: Li Ma Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher commit c94c02dbf4d8d425b14e8381b318fb5e19e20d1e Author: Evan Quan Date: Fri Jan 20 11:21:53 2023 +0800 drm/amd/pm: add missing AllowIHInterrupt message mapping for SMU13.0.0 Add SMU13.0.0 AllowIHInterrupt message mapping. Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 601ff52237a7cd2a5a13d71ed5c42dd25838fab2 Author: Jonathan Kim Date: Thu Jan 19 18:42:03 2023 -0500 drm/amdgpu: remove unconditional trap enable on add gfx11 queues Rebase of driver has incorrect unconditional trap enablement for GFX11 when adding mes queues. Reported-by: Graham Sider Signed-off-by: Jonathan Kim Reviewed-by: Graham Sider Signed-off-by: Alex Deucher commit 9e6f4c8b880bb34851c21db3869e3096d113ccbf Author: Prashant Malani Date: Fri Jan 20 20:58:28 2023 +0000 usb: typec: tcpm: Remove altmode active state updates Since the "active" state for partner altmodes is now being taken care of by the altmode driver itself (specifically, DisplayPort altmode), we no longer need to do so from the port driver. So remove the calls to typec_altmode_update_active() from TCPM. Suggested-by: Heikki Krogerus Reviewed-by: Benson Leung Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Prashant Malani Link: https://lore.kernel.org/r/20230120205827.740900-2-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman commit 25d6d1bfc213bce03d2e34c9e43477e01ffba7c3 Author: Prashant Malani Date: Fri Jan 20 20:58:26 2023 +0000 usb: typec: altmodes/displayport: Update active state Update the altmode "active" state when we receive Acks for Enter and Exit Mode commands. Having the right state is necessary to change Pin Assignments using the 'pin_assignment" sysfs file. Cc: Heikki Krogerus Reviewed-by: Benson Leung Reviewed-by: Heikki Krogerus Reviewed-by: Guenter Roeck Signed-off-by: Prashant Malani Link: https://lore.kernel.org/r/20230120205827.740900-1-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman commit 6f7fb48d2478091e5d7a49d331c230715c4dc65e Author: Andy Shevchenko Date: Fri Jan 20 20:24:34 2023 +0200 usb: gadget: Move kstrtox() out of lock The kstrtox() calls operate on local (to the function) variables and do not need to be serialized. We may call them out of the lock. Reviewed-by: John Keeping Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230120182434.24245-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 065ded319d39ce91a3785fa15020cd5a17c6c5d2 Author: Bjorn Andersson Date: Thu Jan 12 20:11:15 2023 -0800 usb: typec: mux: Introduce GPIO-based SBU mux A design found in various Qualcomm-based boards is to use a USB switch, controlled through a pair of GPIO lines to connect, disconnect and switch the orientation of the SBU lines in USB Type-C applications. This introduces a generic driver, which implements the typec_switch and typec_mux interfaces to perform these operations. Reviewed-by: Heikki Krogerus Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113041115.4189210-2-quic_bjorande@quicinc.com Signed-off-by: Greg Kroah-Hartman commit b39483d66af1a6244927e02e4433569a8fb90b17 Author: Bjorn Andersson Date: Thu Jan 12 20:11:14 2023 -0800 dt-bindings: usb: Introduce GPIO-based SBU mux Introduce a binding for GPIO-based mux hardware used for connecting, disconnecting and switching orientation of the SBU lines in USB Type-C applications. Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113041115.4189210-1-quic_bjorande@quicinc.com Signed-off-by: Greg Kroah-Hartman commit c05ad0fb639c10cce0a92757f9777ec48ceafef2 Author: Andy Shevchenko Date: Fri Jan 20 17:44:37 2023 +0200 usb: fotg210: 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: Andy Shevchenko Link: https://lore.kernel.org/r/20230120154437.22025-5-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 6df3d3aadb6474b9cda105576d042d5d31adec0c Author: Andy Shevchenko Date: Fri Jan 20 17:44:36 2023 +0200 usb: fotg210: Switch to use dev_err_probe() Switch to use dev_err_probe() to simplify the error paths and unify message template. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230120154437.22025-4-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 6a426eb418791975c39680b7abd5f26dc2c4f66e Author: Andy Shevchenko Date: Fri Jan 20 17:44:35 2023 +0200 usb: fotg210-udc: 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. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230120154437.22025-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 7159deb7622741efc1730ffb24df707384db73bb Author: Andy Shevchenko Date: Fri Jan 20 17:44:34 2023 +0200 usb: fotg210-hcd: Don't shadow error codes in store() kstrtox() along with regmap API can return different error codes based on circumstances. Don't shadow them when returning to the caller. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230120154437.22025-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 861fa1c3fafffe47e6845ce95c847b2422792fcc Author: Andy Shevchenko Date: Fri Jan 20 17:44:33 2023 +0200 usb: fotg210-hcd: use sysfs_emit() to instead of scnprintf() Follow the advice of the Documentation/filesystems/sysfs.rst and show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230120154437.22025-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit c5d4297f0c20dd8650019786ab7e94296e6b8647 Author: Fabian Vogt Date: Mon Jan 23 08:35:08 2023 +0100 fotg210-udc: Improve device initialization Reset the device explicitly to get into a known state and also set the chip enable bit. Additionally, mask interrupts which aren't handled. Signed-off-by: Fabian Vogt Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230123073508.2350402-4-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman commit 76d62981b5bc2397bff3478a62514c7ec488dc60 Author: Fabian Vogt Date: Mon Jan 23 08:35:07 2023 +0100 fotg210-udc: Introduce and use a fotg210_ack_int function This is in preparation of support for devices where interrupts are acked differently. Signed-off-by: Fabian Vogt Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230123073508.2350402-3-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman commit e55f67391fa986f7357edba0ca59e668d99c3a5f Author: Fabian Vogt Date: Mon Jan 23 08:35:06 2023 +0100 fotg210-udc: Add missing completion handler This is used when responding to GET_STATUS requests. Without this, it crashes on completion. Fixes: b84a8dee23fd ("usb: gadget: add Faraday fotg210_udc driver") Signed-off-by: Fabian Vogt Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230123073508.2350402-2-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4ba2e7cd986270dbb44eb693199a9d3dd3edf984 Author: Alexander Stein Date: Mon Jan 23 11:00:07 2023 +0100 usb: host: ehci-fsl: Use DRV_NAME "fsl-ehci" is used for both MODULE_ALIAS and driver name. As they have to match use DRV_NAME in both locations. Acked-by: Alan Stern Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20230123100007.1479090-1-alexander.stein@ew.tq-group.com Signed-off-by: Greg Kroah-Hartman commit 6e3347ecd44df10c0a463fc9e0846eb70700c0a7 Merge: 6932b6ed40683 9dd320f0075fc Author: Arnd Bergmann Date: Tue Jan 24 18:08:04 2023 +0100 Merge tag 'omap-for-v6.3/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt Devicetree related changes for omaps for v6.3 Updates for am335x-nano, n900, and gta04 for the connected peripherals. Also few corrections for node names. * tag 'omap-for-v6.3/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: omap: gta04a5: cleanup i2c node names ARM: dts: omap: gta04: add BNO055 IMU chip ARM: dts: n900: use iio driver for accelerometer ARM: dts: n900: rename accelerometer node ARM: dts: am335x-nano: Enable USB host ARM: dts: am335x-nano: Fix GPIO settings for MMC pins ARM: dts: am335x-nano: Enable I2C temperature sensor ARM: dts: am335x-nano: Enable RS485 mode for UART3 & 4 ARM: dts: am335x-nano: Fix GPIO settings for RTS/CTS pins on UART3 & 4 ARM: dts: ti: Fix pca954x i2c-mux node names ARM: dts: omap: Use new media bus type macros Link: https://lore.kernel.org/r/pull-1674566471-434733@atomide.com Signed-off-by: Arnd Bergmann commit 6932b6ed40683815a1b03865f9b40ebb8689394b Merge: 65edaea65d8aa 56a14f01a5456 Author: Arnd Bergmann Date: Tue Jan 24 18:07:12 2023 +0100 Merge tag 'samsung-dt64-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM64 changes for v6.3 1. Add L2 cache properties (Exynos, Tesla FSD). 2. Tesla FSD: add Bosch MCAN (CAN bus), sound card (audio card with codec and I2S controllers), system controller nodes. 3. Tesla FSD: correct pin pull up/down properties to match recommendation in user manual. 4. Minor cleanups: use dedicated/specific sysreg compatibles, fix dtbs_check warnings, drop unsupported properties1 * tag 'samsung-dt64-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: fsd: Add sound card node for Tesla FSD arm64: dts: fsd: Add codec node for Tesla FSD arm64: dts: fsd: Add I2S DAI node for Tesla FSD arm64: dts: exynos: drop unsupported I2C properties in Espresso arm64: dts: fsd: fix PUD values as per FSD HW UM arm64: dts: exynos: add dedicated SYSREG compatibles to Exynosautov9 arm64: dts: exynos: add dedicated SYSREG compatibles to Exynos850 arm64: dts: fsd: add sysreg device node arm64: dts: exynos: correct properties of MAX98504 in TM2 arm64: dts: exynos: drop clock-frequency from CPU nodes in TM2 arm64: dts: exynos: drop pwm-names from MAX77843 haptic in TM2 arm64: dts: exynos: use 8-bit for SPI IR LED duty-cycle in TM2 arm64: dts: exynos: add dedicated SYSREG compatibles to Exynos5433 arm64: dts: fsd: Add MCAN device node arm64: dts: fsd: Update cache properties arm64: dts: exynos: Update cache properties Link: https://lore.kernel.org/r/20230122122605.30720-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 65edaea65d8aa9f6009696b2f9ae626589453683 Merge: bbabe541dbc8c d0931f1d5e9c1 Author: Arnd Bergmann Date: Tue Jan 24 18:06:42 2023 +0100 Merge tag 'dt64-cleanup-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into arm/dt Minor improvements in ARM64 DTS for v6.3 1. Drop 0x from unit address (microchip). 2. Align HDMI CEC and LED nodes with bindings (hisilicon). * tag 'dt64-cleanup-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt: arm64: dts: hisilicon: align LED node names with dtschema arm64: dts: microchip: drop 0x from unit address Link: https://lore.kernel.org/r/20230122121541.29312-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit bbabe541dbc8c1c0b51938eace5eafdef4197bef Merge: bd5a649bf3640 bbc9db2da8716 Author: Arnd Bergmann Date: Tue Jan 24 18:05:42 2023 +0100 Merge tag 'at91-dt-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/dt AT91 device tree updates for 6.3: It contains: - the addition of XISC (eXtended Image Sensor Controller) and CSI2DC (csi2 demux controller) available in SAMA7G5 * tag 'at91-dt-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: at91: sama7g5: add nodes for video capture Link: https://lore.kernel.org/r/20230119112903.43257-1-claudiu.beznea@microchip.com Signed-off-by: Arnd Bergmann commit bd5a649bf3640636b3a52c8ff00ac3f66106df45 Merge: b7bfaa761d760 2ef9e3ef3b8d9 Author: Arnd Bergmann Date: Tue Jan 24 18:03:20 2023 +0100 Merge tag 'renesas-dts-for-v6.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas DT updates for v6.3 - Enable watchdog and timer (OSTM) support for the RZ/Five SMARC EVK development board, - Add operating points for the Cortex-A55 CPU cores on the R-Car S4-8 SoC, - Add display support for the R-Car V4H SoC and the White-Hawk development board, - Add eMMC and SDHI support for the RZ/V2M SoC, - Miscellaneous fixes and improvements. * tag 'renesas-dts-for-v6.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: dts: renesas: condor-i: add HS400 support for eMMC arm64: boot: dts: r8a774[a/b/e]1-beacon: Consolidate sound clocks riscv: dts: renesas: rzfive-smarc-som: Enable OSTM nodes arm64: dts: renesas: ulcb-kf: Fix pca9548 i2c-mux node names arm64: dts: renesas: r9a09g011: Add eMMC and SDHI support arm64: dts: renesas: white-hawk-cpu: Add DP output support arm64: dts: renesas: r8a779g0: Add display related nodes arm64: dts: renesas: r8a779f0: Add CA55 operating points riscv: dts: renesas: rzfive-smarc-som: Enable WDT Link: https://lore.kernel.org/r/cover.1673702293.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 917601ebd6cd205d1393e9cca461b7f17bba2e81 Merge: d54dbdcfd4d27 3ad69c496d488 Author: Arnd Bergmann Date: Tue Jan 24 18:01:28 2023 +0100 Merge tag 'renesas-arm-defconfig-for-v6.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/defconfig Renesas ARM defconfig updates for v6.3 - Enable support for the Renesas RZ/G2L MIPI DSI, CSI-2, and Camera Receiving Unit drivers in the arm64 defconfig, - Refresh shmobile_defconfig for v6.1-rc5. * tag 'renesas-arm-defconfig-for-v6.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: defconfig: Enable RZ/G2L MIPI CSI-2 and CRU support ARM: shmobile: defconfig: Refresh for v6.1-rc5 arm64: defconfig: Enable Renesas RZ/G2L MIPI DSI driver Link: https://lore.kernel.org/r/cover.1673702289.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit d54dbdcfd4d276542aab5a8f77bb0fd111318038 Author: Mark Brown Date: Mon Jan 9 23:46:53 2023 +0000 ARM: multi_v5_defconfig: Enable I2C_GPIO A GPIO based I2C bus is used by at least some Atmel reference boards, including the AT91SAM9G20-EK which is in CI, enable the driver as a module to improve test coverage and help users of systems that happen to use it. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230109-arm-multi-v5-i2c-gpio-v1-1-78e191358548@kernel.org Signed-off-by: Arnd Bergmann commit 74ab23d5a7fc13f3ab1f3a333cb18ab300a997fc Author: Mark Brown Date: Fri Jan 6 23:14:12 2023 +0000 ARM: multi_v7_defconfig: Enable wm896x audio CODECs The wm896x series of audio CODECs is used on a number of Freescale reference designs, enable the drivers in multi_v7_defconfig to improve testing coverage of those systems and their derivatives. Signed-off-by: Mark Brown Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/20230106-arm-wm896x-v1-1-441c564a9cd1@kernel.org Signed-off-by: Arnd Bergmann commit b8f55f24bc82ed7064645cc7f6675430609314a5 Merge: 045e8d102f44a bd43a9844bc6f Author: Daniel Vetter Date: Tue Jan 24 17:36:29 2023 +0100 Merge tag 'drm-misc-next-2023-01-19' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for $kernel-version: UAPI Changes: Cross-subsystem Changes: Core Changes: * Cleanup unneeded include statements wrt , and * Remove unused helper DRM_DEBUG_KMS_RATELIMITED() * fbdev: Remove obsolete aperture field from struct fb_device, plus driver cleanups; Remove unused flag FBINFO_MISC_FIRMWARE * MIPI-DSI: Fix brightness, plus rsp. driver updates * scheduler: Deprecate drm_sched_resubmit_jobs() * ttm: Fix MIPS build; Remove ttm_bo_wait(); Documentation fixes Driver Changes: * Remove obsolete drivers for userspace modesetting i810, mga, r128, savage, sis, tdfx, via * bridge: Support CDNS DSI J721E, plus DT bindings; lt9611: Various fixes and improvements; sil902x: Various fixes; Fixes * nouveau: Removed support for legacy ioctls; Replace zero-size array; Cleanups * panel: Fixes * radeon: Use new DRM logging helpers Signed-off-by: Daniel Vetter From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/Y8kDk5YX7Yz3eRhM@linux-uq9g commit 9635adf8541ae9cbead19d769dce2c945fa88de6 Merge: 1ec23ed7126e6 045e8d102f44a Author: Tvrtko Ursulin Date: Tue Jan 24 16:23:03 2023 +0000 Merge drm/drm-next into drm-intel-gt-next Lets eradicate a silent conflict between drm-intel-next and drm-intel-gt-next which added a duplicate function (try_firmware_load). Signed-off-by: Tvrtko Ursulin commit 0eb9d19e2201068260e439a5c96dc85f9f3722a2 Author: Dave Thaler Date: Tue Jan 24 00:12:18 2023 +0000 bpf, docs: Fix modulo zero, division by zero, overflow, and underflow Fix modulo zero, division by zero, overflow, and underflow. Also clarify how a negative immediate value is used in unsigned division. Signed-off-by: Dave Thaler Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230124001218.827-1-dthaler1968@googlemail.com commit 045e8d102f44ad75dca0b0ec9eede15ea89da673 Merge: 0b45ac1170ea6 378e04f7cb24a Author: Daniel Vetter Date: Tue Jan 24 16:06:38 2023 +0100 Merge tag 'drm-intel-gt-next-2023-01-18' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Driver Changes: Fixes/improvements/new stuff: - Fix workarounds on Gen2-3 (Tvrtko Ursulin) - Fix HuC delayed load memory leaks (Daniele Ceraolo Spurio) - Fix a BUG caused by impendance mismatch in dma_fence_wait_timeout and GuC (Janusz Krzysztofik) - Add DG2 workarounds Wa_18018764978 and Wa_18019271663 (Matt Atwood) - Apply recommended L3 hashing mask tuning parameters (Gen12+) (Matt Roper) - Improve suspend / resume times with VT-d scanout workaround active (Andi Shyti, Chris Wilson) - Silence misleading "mailbox access failed" warning in snb_pcode_read (Ashutosh Dixit) - Fix null pointer dereference on HSW perf/OA (Umesh Nerlige Ramappa) - Avoid trampling the ring during buffer migration (and selftests) (Chris Wilson, Matthew Auld) - Fix DG2 visual corruption on small BAR systems by not forgetting to copy CCS aux state (Matthew Auld) - More fixing of DG2 visual corruption by not forgetting to copy CCS aux state of backup objects (Matthew Auld) - Fix TLB invalidation for Gen12.50 video and compute engines (Andrzej Hajda) - Limit Wa_22012654132 to just specific steppings (Matt Roper) - Fix userspace crashes due eviction not working under lock contention after the object locking conversion (Matthew Auld) - Avoid double free is user deploys a corrupt GuC firmware (John Harrison) - Fix 32-bit builds by using "%zu" to format size_t (Nirmoy Das) - Fix a possible BUG in TTM async unbind due not reserving enough fence slots (Nirmoy Das) - Fix potential use after free by not exposing the GEM context id to userspace too early (Rob Clark) - Show clamped PL1 limit to the user (hwmon) (Ashutosh Dixit) - Workaround unreliable reset on Jasperlake (Chris Wilson) - Cover rest of SVG unit MCR registers (Gustavo Sousa) - Avoid PXP log spam on platforms which do not support the feature (Alan Previn) - Re-disable RC6p on Sandy Bridge to avoid GPU hangs and visual glitches (Sasa Dragic) Future platform enablement: - Manage uncore->lock while waiting on MCR register (Matt Roper) - Enable Idle Messaging for GSC CS (Vinay Belgaumkar) - Only initialize GSC in tile 0 (José Roberto de Souza) - Media GT and Render GT share common GGTT (Aravind Iddamsetty) - Add dedicated MCR lock (Matt Roper) - Implement recommended caching policy (PVC) (Wayne Boyer) - Add hardware-level lock for steering (Matt Roper) - Check full IP version when applying hw steering semaphore (Matt Roper) - Enable GuC GGTT invalidation from the start (Daniele Ceraolo Spurio) - MTL GSC firmware support (Daniele Ceraolo Spurio, Jonathan Cavitt) - MTL OA support (Umesh Nerlige Ramappa) - MTL initial gt workarounds (Matt Roper) Driver refactors: - Hold forcewake and MCR lock over PPAT setup (Matt Roper) - Acquire fw before loop in intel_uncore_read64_2x32 (Umesh Nerlige Ramappa) - GuC filename cleanups and use submission API version number (John Harrison) - Promote pxp subsystem to top-level of i915 (Alan Previn) - Finish proofing the code agains object size overflows (Chris Wilson, Gwan-gyeong Mun) - Start adding module oriented dmesg output (John Harrison) Miscellaneous: - Correct kerneldoc for intel_gt_mcr_wait_for_reg() (Matt Roper) - Bump up sample period for busy stats selftest (Umesh Nerlige Ramappa) - Make GuC default_lists const data (Jani Nikula) - Fix table order verification to check all FW types (John Harrison) - Remove some limited use register access wrappers (Jani Nikula) - Remove struct_member macro (Andrzej Hajda) - Remove hardcoded value with a macro (Nirmoy Das) - Use helper func to find out map type (Nirmoy Das) - Fix a static analysis warning (John Harrison) - Consolidate VMA active tracking helpers (Andrzej Hajda) - Do not cover all future platforms in TLB invalidation (Tvrtko Ursulin) - Replace zero-length arrays with flexible-array members (Gustavo A. R. Silva) - Unwind hugepages to drop wakeref on error (Chris Wilson) - Remove a couple of superfluous i915_drm.h includes (Jani Nikula) Merges: - Merge drm/drm-next into drm-intel-gt-next (Rodrigo Vivi) danvet: Fix up merge conflict in intel_uc_fw.c, we ended up with 2 copies of try_firmware_load() somehow. Signed-off-by: Daniel Vetter From: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/Y8fW2Ny1B1hZ5ZmF@tursulin-desk commit 320e0a703737a16572be0e7ccb3d3f6a0e8e0c76 Author: Jon Hunter Date: Thu Jan 19 10:42:08 2023 +0000 arm64: tegra: Populate the XUDC node for Tegra234 Populate the Tegra XUSB device controller (XUDC) node for Tegra234. This is based upon a patch from Wayne Chang . Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit f19bb95dc53169785ed0821f499168e8e63406ea Author: Jon Hunter Date: Thu Jan 19 10:42:05 2023 +0000 arm64: tegra: Add dma-coherent property for Tegra194 XUDC DMA operations for XUSB device controller (XUDC) are coherent for Tegra194 and so add the 'dma-coherent' property for this device. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit b1d908e6c71ea7cf2d7952e97461f320a0c6277f Author: Neil Armstrong Date: Mon Jan 23 11:10:03 2023 +0100 dt-bindings: mmc: convert amlogic,meson-gx.txt to dt-schema Convert the Amlogic SD / eMMC controller for S905/GXBB family SoCs to dt-schema. Take in account the used variant with amlogic,meson-gx-mmc. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221117-b4-amlogic-bindings-convert-v3-6-e28dd31e3bed@linaro.org Signed-off-by: Ulf Hansson commit bb065c6fe6f8c26d540ad9441594370d5d0b7993 Author: Krzysztof Kozlowski Date: Fri Jan 20 09:57:22 2023 +0100 dt-bindings: mmc: correct pwrseq node names Node names should be generic and should not contain underscores. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20230120085722.171965-2-krzysztof.kozlowski@linaro.org Signed-off-by: Ulf Hansson commit 1e52a7e6794f3bd9195d851c308fddaec059453b Author: Krzysztof Kozlowski Date: Fri Jan 20 09:57:21 2023 +0100 dt-bindings: mmc: drop unneeded quotes Cleanup by removing unneeded quotes from refs and redundant blank lines. No functional impact except adjusting to preferred coding style. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Wolfram Sang # for Renesas controllers Reviewed-by: Heiko Stuebner Reviewed-by: Neil Armstrong Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230120085722.171965-1-krzysztof.kozlowski@linaro.org Signed-off-by: Ulf Hansson commit 21e18febba163b816e66f85f97b04732fdb9e3f9 Author: Luca Coelho Date: Fri Jan 13 13:39:05 2023 +0200 drm/i915: update src and dst scaler limits for display ver 12 and 13 The bspec has been updated and now display versions 12 and 13 support source width up to 5120 pixels, source height up to 8192 lines, destination width up to 8192 and destination height up to 8192. Update the code accordingly. BSpec: 50441 Reviewed-by: Ankit Nautiyal Signed-off-by: Luca Coelho Signed-off-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20230113113905.130405-1-luciano.coelho@intel.com commit 63510d9f2f6e6337960499a3d72d5a457b19c287 Merge: 3c006ad74d68b 471859f57d425 Author: Andreas Gruenbacher Date: Tue Jan 24 12:51:39 2023 +0100 Merge branch 'iomap-for-next' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git commit 61786170383093908e9f5f8fd8c5c3ff0c3bbe03 Author: Ard Biesheuvel Date: Wed Jan 11 11:22:36 2023 +0100 efi: arm64: enter with MMU and caches enabled Instead of cleaning the entire loaded kernel image to the PoC and disabling the MMU and caches before branching to the kernel's bare metal entry point, we can leave the MMU and caches enabled, and rely on EFI's cacheable 1:1 mapping of all of system RAM (which is mandated by the spec) to populate the initial page tables. This removes the need for managing coherency in software, which is tedious and error prone. Note that we still need to clean the executable region of the image to the PoU if this is required for I/D coherency, but only if we actually decided to move the image in memory, as otherwise, this will have been taken care of by the loader. This change affects both the builtin EFI stub as well as the zboot decompressor, which now carries the entire EFI stub along with the decompression code and the compressed image. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20230111102236.1430401-7-ardb@kernel.org Signed-off-by: Catalin Marinas commit 3dcf60bbfd284e5ebfa40c56172222425d10abf0 Author: Ard Biesheuvel Date: Wed Jan 11 11:22:35 2023 +0100 arm64: head: Clean the ID map and the HYP text to the PoC if needed If we enter with the MMU and caches enabled, the bootloader may not have performed any cache maintenance to the PoC. So clean the ID mapped page to the PoC, to ensure that instruction and data accesses with the MMU off see the correct data. For similar reasons, clean all the HYP text to the PoC as well when entering at EL2 with the MMU and caches enabled. Note that this means primary_entry() itself needs to be moved into the ID map as well, as we will return from init_kernel_el() with the MMU and caches off. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20230111102236.1430401-6-ardb@kernel.org Signed-off-by: Catalin Marinas commit 32b135a7fafebe7843abe5425159fa081ae56b7c Author: Ard Biesheuvel Date: Wed Jan 11 11:22:34 2023 +0100 arm64: head: avoid cache invalidation when entering with the MMU on If we enter with the MMU on, there is no need for explicit cache invalidation for stores to memory, as they will be coherent with the caches. Let's take advantage of this, and create the ID map with the MMU still enabled if that is how we entered, and avoid any cache invalidation calls in that case. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20230111102236.1430401-5-ardb@kernel.org Signed-off-by: Catalin Marinas commit 9d7c13e5dde31270eb48a34204a2e06b1a719546 Author: Ard Biesheuvel Date: Wed Jan 11 11:22:33 2023 +0100 arm64: head: record the MMU state at primary entry Prepare for being able to deal with primary entry with the MMU and caches enabled, by recording whether or not we entered with the MMU on in register x19 and in a global variable. (Note that setting this variable to '1' does not require cache invalidation, nor is it required for storing the bootargs in that case, so omit the cache maintenance). Since boot with the MMU and caches enabled is not permitted by the bare metal boot protocol, ensure that a diagnostic is emitted and a taint bit set if the MMU was found to be enabled on a non-EFI boot, and panic() once the console is likely to be up. We will make an exception for EFI boot later, which has strict requirements for the mapping of system memory, permitting us to relax the boot protocol and hand over from the EFI stub to the core kernel with MMU and caches left enabled. While at it, add 'pre_disable_mmu_workaround' macro invocations to init_kernel_el, as its manipulation of SCTLR_ELx may amount to disabling of the MMU after subsequent patches. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20230111102236.1430401-4-ardb@kernel.org Signed-off-by: Catalin Marinas commit af7249b317e4d0b3d5a0ebbb7ee7a0f336ca7bca Author: Ard Biesheuvel Date: Wed Jan 11 11:22:32 2023 +0100 arm64: kernel: move identity map out of .text mapping Reorganize the ID map slightly so that only code that is executed with the MMU off or via the 1:1 mapping remains. This allows us to move the identity map out of the .text segment, as it will no longer need executable permissions via the kernel mapping. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20230111102236.1430401-3-ardb@kernel.org Signed-off-by: Catalin Marinas commit 82e4958800c01daa7662362ee9543065bd14c852 Author: Ard Biesheuvel Date: Wed Jan 11 11:22:31 2023 +0100 arm64: head: Move all finalise_el2 calls to after __enable_mmu In the primary boot path, finalise_el2() is called much later than on the secondary boot or resume-from-suspend paths, and this does not appear to be intentional. Since we aim to do as little as possible before enabling the MMU and caches, align secondary and resume with primary boot, and defer the call to after the MMU is turned on. This also removes the need to clean finalise_el2() to the PoC once we enable support for booting with the MMU on. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20230111102236.1430401-2-ardb@kernel.org Signed-off-by: Catalin Marinas commit baaf553d3bc330697c68a00f96cf11f4edfeac7e Author: Mark Rutland Date: Mon Jan 23 13:46:03 2023 +0000 arm64: Implement HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS This patch enables support for DYNAMIC_FTRACE_WITH_CALL_OPS on arm64. This allows each ftrace callsite to provide an ftrace_ops to the common ftrace trampoline, allowing each callsite to invoke distinct tracer functions without the need to fall back to list processing or to allocate custom trampolines for each callsite. This significantly speeds up cases where multiple distinct trace functions are used and callsites are mostly traced by a single tracer. The main idea is to place a pointer to the ftrace_ops as a literal at a fixed offset from the function entry point, which can be recovered by the common ftrace trampoline. Using a 64-bit literal avoids branch range limitations, and permits the ops to be swapped atomically without special considerations that apply to code-patching. In future this will also allow for the implementation of DYNAMIC_FTRACE_WITH_DIRECT_CALLS without branch range limitations by using additional fields in struct ftrace_ops. As noted in the core patch adding support for DYNAMIC_FTRACE_WITH_CALL_OPS, this approach allows for directly invoking ftrace_ops::func even for ftrace_ops which are dynamically-allocated (or part of a module), without going via ftrace_ops_list_func. Currently, this approach is not compatible with CLANG_CFI, as the presence/absence of pre-function NOPs changes the offset of the pre-function type hash, and there's no existing mechanism to ensure a consistent offset for instrumented and uninstrumented functions. When CLANG_CFI is enabled, the existing scheme with a global ops->func pointer is used, and there should be no functional change. I am currently working with others to allow the two to work together in future (though this will liekly require updated compiler support). I've benchamrked this with the ftrace_ops sample module [1], which is not currently upstream, but available at: https://lore.kernel.org/lkml/20230103124912.2948963-1-mark.rutland@arm.com git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git ftrace-ops-sample-20230109 Using that module I measured the total time taken for 100,000 calls to a trivial instrumented function, with a number of tracers enabled with relevant filters (which would apply to the instrumented function) and a number of tracers enabled with irrelevant filters (which would not apply to the instrumented function). I tested on an M1 MacBook Pro, running under a HVF-accelerated QEMU VM (i.e. on real hardware). Before this patch: Number of tracers || Total time | Per-call average time (ns) Relevant | Irrelevant || (ns) | Total | Overhead =========+============++=============+==============+============ 0 | 0 || 94,583 | 0.95 | - 0 | 1 || 93,709 | 0.94 | - 0 | 2 || 93,666 | 0.94 | - 0 | 10 || 93,709 | 0.94 | - 0 | 100 || 93,792 | 0.94 | - ---------+------------++-------------+--------------+------------ 1 | 1 || 6,467,833 | 64.68 | 63.73 1 | 2 || 7,509,708 | 75.10 | 74.15 1 | 10 || 23,786,792 | 237.87 | 236.92 1 | 100 || 106,432,500 | 1,064.43 | 1063.38 ---------+------------++-------------+--------------+------------ 1 | 0 || 1,431,875 | 14.32 | 13.37 2 | 0 || 6,456,334 | 64.56 | 63.62 10 | 0 || 22,717,000 | 227.17 | 226.22 100 | 0 || 103,293,667 | 1032.94 | 1031.99 ---------+------------++-------------+--------------+-------------- Note: per-call overhead is estimated relative to the baseline case with 0 relevant tracers and 0 irrelevant tracers. After this patch Number of tracers || Total time | Per-call average time (ns) Relevant | Irrelevant || (ns) | Total | Overhead =========+============++=============+==============+============ 0 | 0 || 94,541 | 0.95 | - 0 | 1 || 93,666 | 0.94 | - 0 | 2 || 93,709 | 0.94 | - 0 | 10 || 93,667 | 0.94 | - 0 | 100 || 93,792 | 0.94 | - ---------+------------++-------------+--------------+------------ 1 | 1 || 281,000 | 2.81 | 1.86 1 | 2 || 281,042 | 2.81 | 1.87 1 | 10 || 280,958 | 2.81 | 1.86 1 | 100 || 281,250 | 2.81 | 1.87 ---------+------------++-------------+--------------+------------ 1 | 0 || 280,959 | 2.81 | 1.86 2 | 0 || 6,502,708 | 65.03 | 64.08 10 | 0 || 18,681,209 | 186.81 | 185.87 100 | 0 || 103,550,458 | 1,035.50 | 1034.56 ---------+------------++-------------+--------------+------------ Note: per-call overhead is estimated relative to the baseline case with 0 relevant tracers and 0 irrelevant tracers. As can be seen from the above: a) Whenever there is a single relevant tracer function associated with a tracee, the overhead of invoking the tracer is constant, and does not scale with the number of tracers which are *not* associated with that tracee. b) The overhead for a single relevant tracer has dropped to ~1/7 of the overhead prior to this series (from 13.37ns to 1.86ns). This is largely due to permitting calls to dynamically-allocated ftrace_ops without going through ftrace_ops_list_func. I've run the ftrace selftests from v6.2-rc3, which reports: | # of passed: 110 | # of failed: 0 | # of unresolved: 3 | # of untested: 0 | # of unsupported: 0 | # of xfailed: 1 | # of undefined(test bug): 0 ... where the unresolved entries were the tests for DIRECT functions (which are not supported), and the checkbashisms selftest (which is irrelevant here): | [8] Test ftrace direct functions against tracers [UNRESOLVED] | [9] Test ftrace direct functions against kprobes [UNRESOLVED] | [62] Meta-selftest: Checkbashisms [UNRESOLVED] ... with all other tests passing (or failing as expected). Signed-off-by: Mark Rutland Cc: Florent Revest Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Will Deacon Link: https://lore.kernel.org/r/20230123134603.1064407-9-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 90955d778ad7873964a271852b1f24d31e00248b Author: Mark Rutland Date: Mon Jan 23 13:46:02 2023 +0000 arm64: ftrace: Update stale comment In commit: 26299b3f6ba26bfc ("ftrace: arm64: move from REGS to ARGS") ... we folded ftrace_regs_entry into ftrace_caller, and ftrace_regs_entry no longer exists. Update the comment accordingly. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Florent Revest Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Will Deacon Link: https://lore.kernel.org/r/20230123134603.1064407-8-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit e4ecbe83fd1a5428d5458de04a3404f1b5444429 Author: Mark Rutland Date: Mon Jan 23 13:46:01 2023 +0000 arm64: patching: Add aarch64_insn_write_literal_u64() In subsequent patches we'll need to atomically write to a naturally-aligned 64-bit literal embedded within the kernel text. Add a helper for this. For consistency with other text patching code we use copy_to_kernel_nofault(), which is atomic for naturally-aligned accesses up to 64-bits. Signed-off-by: Mark Rutland Cc: Florent Revest Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Will Deacon Link: https://lore.kernel.org/r/20230123134603.1064407-7-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 2bbbb4015aa1af62f8002de86de019786ecf63a7 Author: Mark Rutland Date: Mon Jan 23 13:46:00 2023 +0000 arm64: insn: Add helpers for BTI In subsequent patches we'd like to check whether an instruction is a BTI. In preparation for this, add basic instruction helpers for BTI instructions. Per ARM DDI 0487H.a section C6.2.41, BTI is encoded in binary as follows, MSB to LSB: 1101 0101 000 0011 0010 0100 xx01 1111 Where the `xx` bits encode J/C/JC: 00 : (omitted) 01 : C 10 : J 11 : JC Signed-off-by: Mark Rutland Cc: Florent Revest Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Will Deacon Link: https://lore.kernel.org/r/20230123134603.1064407-6-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 47a15aa544279d34e14e17ca3b5855e39b946cec Author: Mark Rutland Date: Mon Jan 23 13:45:59 2023 +0000 arm64: Extend support for CONFIG_FUNCTION_ALIGNMENT On arm64 we don't align assembly function in the same way as C functions. This somewhat limits the utility of CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B for testing, and adds noise when testing that we're correctly aligning functions as will be necessary for ftrace in subsequent patches. Follow the example of x86, and align assembly functions in the same way as C functions. Selecting FUNCTION_ALIGNMENT_4B ensures CONFIG_FUCTION_ALIGNMENT will be a minimum of 4 bytes, matching the minimum alignment that __ALIGN and __ALIGN_STR provide prior to this patch. I've tested this by selecting CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B=y, building and booting a kernel, and looking for misaligned text symbols: Before, v6.2-rc3: # uname -rm 6.2.0-rc3 aarch64 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | wc -l 5009 Before, v6.2-rc3 + fixed __cold: # uname -rm 6.2.0-rc3-00001-g2a2bedf8bfa9 aarch64 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | wc -l 919 Before, v6.2-rc3 + fixed __cold + fixed ACPICA: # uname -rm 6.2.0-rc3-00002-g267bddc38572 aarch64 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | wc -l 323 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | grep acpi | wc -l 0 After: # uname -rm 6.2.0-rc3-00003-g71db61ee3ea1 aarch64 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | wc -l 112 Considering the remaining 112 unaligned text symbols: * 20 are non-function KVM NVHE assembly symbols, which are never instrumented by ftrace: # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | grep __kvm_nvhe | wc -l 20 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | grep __kvm_nvhe ffffbe6483f73784 t __kvm_nvhe___invalid ffffbe6483f73788 t __kvm_nvhe___do_hyp_init ffffbe6483f73ab0 t __kvm_nvhe_reset ffffbe6483f73b8c T __kvm_nvhe___hyp_idmap_text_end ffffbe6483f73b8c T __kvm_nvhe___hyp_text_start ffffbe6483f77864 t __kvm_nvhe___host_enter_restore_full ffffbe6483f77874 t __kvm_nvhe___host_enter_for_panic ffffbe6483f778a4 t __kvm_nvhe___host_enter_without_restoring ffffbe6483f81178 T __kvm_nvhe___guest_exit_panic ffffbe6483f811c8 T __kvm_nvhe___guest_exit ffffbe6483f81354 t __kvm_nvhe_abort_guest_exit_start ffffbe6483f81358 t __kvm_nvhe_abort_guest_exit_end ffffbe6483f81830 t __kvm_nvhe_wa_epilogue ffffbe6483f81844 t __kvm_nvhe_el1_trap ffffbe6483f81864 t __kvm_nvhe_el1_fiq ffffbe6483f81864 t __kvm_nvhe_el1_irq ffffbe6483f81884 t __kvm_nvhe_el1_error ffffbe6483f818a4 t __kvm_nvhe_el2_sync ffffbe6483f81920 t __kvm_nvhe_el2_error ffffbe6483f865c8 T __kvm_nvhe___start___kvm_ex_table * 53 are position-independent functions only used during early boot, which are built with '-Os', but are never instrumented by ftrace: # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | grep __pi | wc -l 53 We *could* drop '-Os' when building these for consistency, but that is not necessary to ensure that ftrace works correctly. * The remaining 39 are non-function symbols, and 3 runtime BPF functions, which are never instrumented by ftrace: # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | grep -v __kvm_nvhe | grep -v __pi | wc -l 39 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | grep -v __kvm_nvhe | grep -v __pi ffffbe6482e1009c T __irqentry_text_end ffffbe6482e10358 T __softirqentry_text_end ffffbe6482e1435c T __entry_text_end ffffbe6482e825f8 T __guest_exit_panic ffffbe6482e82648 T __guest_exit ffffbe6482e827d4 t abort_guest_exit_start ffffbe6482e827d8 t abort_guest_exit_end ffffbe6482e83030 t wa_epilogue ffffbe6482e83044 t el1_trap ffffbe6482e83064 t el1_fiq ffffbe6482e83064 t el1_irq ffffbe6482e83084 t el1_error ffffbe6482e830a4 t el2_sync ffffbe6482e83120 t el2_error ffffbe6482e93550 T sha256_block_neon ffffbe64830f3ae0 t e843419@01cc_00002a0c_3104 ffffbe648378bd90 t e843419@09b3_0000d7cb_bc4 ffffbe6483bdab20 t e843419@0c66_000116e2_34c8 ffffbe6483f62c94 T __noinstr_text_end ffffbe6483f70a18 T __sched_text_end ffffbe6483f70b2c T __cpuidle_text_end ffffbe6483f722d4 T __lock_text_end ffffbe6483f73b8c T __hyp_idmap_text_end ffffbe6483f73b8c T __hyp_text_start ffffbe6483f865c8 T __start___kvm_ex_table ffffbe6483f870d0 t init_el1 ffffbe6483f870f8 t init_el2 ffffbe6483f87324 t pen ffffbe6483f87b48 T __idmap_text_end ffffbe64848eb010 T __hibernate_exit_text_start ffffbe64848eb124 T __hibernate_exit_text_end ffffbe64848eb124 T __relocate_new_kernel_start ffffbe64848eb260 T __relocate_new_kernel_end ffffbe648498a8e8 T _einittext ffffbe648498a8e8 T __exittext_begin ffffbe6484999d84 T __exittext_end ffff8000080756b4 t bpf_prog_6deef7357e7b4530 [bpf] ffff80000808dd78 t bpf_prog_6deef7357e7b4530 [bpf] ffff80000809d684 t bpf_prog_6deef7357e7b4530 [bpf] Signed-off-by: Mark Rutland Cc: Florent Revest Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Will Deacon Link: https://lore.kernel.org/r/20230123134603.1064407-5-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 8f9e0a52810dd83406c768972d022c37e7a18f1f Author: Mark Rutland Date: Mon Jan 23 13:45:58 2023 +0000 ACPI: Don't build ACPICA with '-Os' The ACPICA code has been built with '-Os' since the beginning of git history, though there's no explanatory comment as to why. This is unfortunate as GCC drops the alignment specificed by '-falign-functions=N' when '-Os' is used, as reported in GCC bug 88345: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88345 This prevents CONFIG_FUNCTION_ALIGNMENT and CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B from having their expected effect on the ACPICA code. This is doubly unfortunate as in subsequent patches arm64 will depend upon CONFIG_FUNCTION_ALIGNMENT for its ftrace implementation. Drop the '-Os' flag when building the ACPICA code. With this removed, the code builds cleanly and works correctly in testing so far. I've tested this by selecting CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B=y, building and booting a kernel using ACPI, and looking for misaligned text symbols: * arm64: Before, v6.2-rc3: # uname -rm 6.2.0-rc3 aarch64 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | wc -l 5009 Before, v6.2-rc3 + fixed __cold: # uname -rm 6.2.0-rc3-00001-g2a2bedf8bfa9 aarch64 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | wc -l 919 After: # uname -rm 6.2.0-rc3-00002-g267bddc38572 aarch64 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | wc -l 323 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | grep acpi | wc -l 0 * x86_64: Before, v6.2-rc3: # uname -rm 6.2.0-rc3 x86_64 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | wc -l 11537 Before, v6.2-rc3 + fixed __cold: # uname -rm 6.2.0-rc3-00001-g2a2bedf8bfa9 x86_64 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | wc -l 2805 After: # uname -rm 6.2.0-rc3-00002-g267bddc38572 x86_64 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | wc -l 1357 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | grep acpi | wc -l 0 With the patch applied, the remaining unaligned text labels are a combination of static call trampolines and labels in assembly, which can be dealt with in subsequent patches. Signed-off-by: Mark Rutland Acked-by: Rafael J. Wysocki Cc: Florent Revest Cc: Len Brown Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Robert Moore Cc: Steven Rostedt Cc: Will Deacon Cc: linux-acpi@vger.kernel.org Link: https://lore.kernel.org/r/20230123134603.1064407-4-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit c27cd083cfb9d392f304657ed00fcde1136704e7 Author: Mark Rutland Date: Mon Jan 23 13:45:57 2023 +0000 Compiler attributes: GCC cold function alignment workarounds Contemporary versions of GCC (e.g. GCC 12.2.0) drop the alignment specified by '-falign-functions=N' for functions marked with the __cold__ attribute, and potentially for callees of __cold__ functions as these may be implicitly marked as __cold__ by the compiler. LLVM appears to respect '-falign-functions=N' in such cases. This has been reported to GCC in bug 88345: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88345 ... which also covers alignment being dropped when '-Os' is used, which will be addressed in a separate patch. Currently, use of '-falign-functions=N' is limited to CONFIG_FUNCTION_ALIGNMENT, which is largely used for performance and/or analysis reasons (e.g. with CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B), but isn't necessary for correct functionality. However, this dropped alignment isn't great for the performance and/or analysis cases. Subsequent patches will use CONFIG_FUNCTION_ALIGNMENT as part of arm64's ftrace implementation, which will require all instrumented functions to be aligned to at least 8-bytes. This patch works around the dropped alignment by avoiding the use of the __cold__ attribute when CONFIG_FUNCTION_ALIGNMENT is non-zero, and by specifically aligning abort(), which GCC implicitly marks as __cold__. As the __cold macro is now dependent upon config options (which is against the policy described at the top of compiler_attributes.h), it is moved into compiler_types.h. I've tested this by building and booting a kernel configured with defconfig + CONFIG_EXPERT=y + CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B=y, and looking for misaligned text symbols in /proc/kallsyms: * arm64: Before: # uname -rm 6.2.0-rc3 aarch64 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | wc -l 5009 After: # uname -rm 6.2.0-rc3-00001-g2a2bedf8bfa9 aarch64 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | wc -l 919 * x86_64: Before: # uname -rm 6.2.0-rc3 x86_64 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | wc -l 11537 After: # uname -rm 6.2.0-rc3-00001-g2a2bedf8bfa9 x86_64 # grep ' [Tt] ' /proc/kallsyms | grep -iv '[048c]0 [Tt] ' | wc -l 2805 There's clearly a substantial reduction in the number of misaligned symbols. From manual inspection, the remaining unaligned text labels are a combination of ACPICA functions (due to the use of '-Os'), static call trampolines, and non-function labels in assembly, which will be dealt with in subsequent patches. Signed-off-by: Mark Rutland Cc: Florent Revest Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Will Deacon Cc: Miguel Ojeda Cc: Nick Desaulniers Link: https://lore.kernel.org/r/20230123134603.1064407-3-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit cbad0fb2d8d97fa6dd8089c0cc729ced0abacad6 Author: Mark Rutland Date: Mon Jan 23 13:45:56 2023 +0000 ftrace: Add DYNAMIC_FTRACE_WITH_CALL_OPS Architectures without dynamic ftrace trampolines incur an overhead when multiple ftrace_ops are enabled with distinct filters. in these cases, each call site calls a common trampoline which uses ftrace_ops_list_func() to iterate over all enabled ftrace functions, and so incurs an overhead relative to the size of this list (including RCU protection overhead). Architectures with dynamic ftrace trampolines avoid this overhead for call sites which have a single associated ftrace_ops. In these cases, the dynamic trampoline is customized to branch directly to the relevant ftrace function, avoiding the list overhead. On some architectures it's impractical and/or undesirable to implement dynamic ftrace trampolines. For example, arm64 has limited branch ranges and cannot always directly branch from a call site to an arbitrary address (e.g. from a kernel text address to an arbitrary module address). Calls from modules to core kernel text can be indirected via PLTs (allocated at module load time) to address this, but the same is not possible from calls from core kernel text. Using an indirect branch from a call site to an arbitrary trampoline is possible, but requires several more instructions in the function prologue (or immediately before it), and/or comes with far more complex requirements for patching. Instead, this patch adds a new option, where an architecture can associate each call site with a pointer to an ftrace_ops, placed at a fixed offset from the call site. A shared trampoline can recover this pointer and call ftrace_ops::func() without needing to go via ftrace_ops_list_func(), avoiding the associated overhead. This avoids issues with branch range limitations, and avoids the need to allocate and manipulate dynamic trampolines, making it far simpler to implement and maintain, while having similar performance characteristics. Note that this allows for dynamic ftrace_ops to be invoked directly from an architecture's ftrace_caller trampoline, whereas existing code forces the use of ftrace_ops_get_list_func(), which is in part necessary to permit the ftrace_ops to be freed once unregistered *and* to avoid branch/address-generation range limitation on some architectures (e.g. where ops->func is a module address, and may be outside of the direct branch range for callsites within the main kernel image). The CALL_OPS approach avoids this problems and is safe as: * The existing synchronization in ftrace_shutdown() using ftrace_shutdown() using synchronize_rcu_tasks_rude() (and synchronize_rcu_tasks()) ensures that no tasks hold a stale reference to an ftrace_ops (e.g. in the middle of the ftrace_caller trampoline, or while invoking ftrace_ops::func), when that ftrace_ops is unregistered. Arguably this could also be relied upon for the existing scheme, permitting dynamic ftrace_ops to be invoked directly when ops->func is in range, but this will require additional logic to handle branch range limitations, and is not handled by this patch. * Each callsite's ftrace_ops pointer literal can hold any valid kernel address, and is updated atomically. As an architecture's ftrace_caller trampoline will atomically load the ops pointer then dereference ops->func, there is no risk of invoking ops->func with a mismatches ops pointer, and updates to the ops pointer do not require special care. A subsequent patch will implement architectures support for arm64. There should be no functional change as a result of this patch alone. Signed-off-by: Mark Rutland Reviewed-by: Steven Rostedt (Google) Cc: Florent Revest Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Will Deacon Link: https://lore.kernel.org/r/20230123134603.1064407-2-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 8a24401701aa67c3bf8daa56c54d7bd1d6e69c23 Merge: 5fba66d42746c eb9181a3ae602 Author: Will Deacon Date: Tue Jan 24 11:45:41 2023 +0000 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: Fix binding for SDX55 and SDX65 dt-bindings: arm-smmu: Document smmu-500 binding for SM6125 dt-bindings: arm-smmu: document the smmu on Qualcomm SA8775P dt-bindings: arm-smmu: disallow clocks when not used dt-bindings: iommu: qcom: Add Qualcomm MSM8953 compatible dt-bindings: arm-smmu: Add sm8150-smmu-500 to the list of Adreno smmus dt-bindings: arm-smmu: Allow 3 power domains on SM6375 MMU500 commit eb9181a3ae6021d7a12ed7f1d6a15804628cbe98 Author: Manivannan Sadhasivam Date: Mon Jan 23 18:49:29 2023 +0530 dt-bindings: arm-smmu: Fix binding for SDX55 and SDX65 Both SDX55 and SDX66 SoCs are using the Qualcomm version of the SMMU-500 IP. But the binding lists them under the non-qcom implementation which is not correct. So fix the binding by moving these two SoCs under "qcom,smmu-500" implementation. Fixes: 6c84bbd103d8 ("dt-bindings: arm-smmu: Add generic qcom,smmu-500 bindings") Signed-off-by: Manivannan Sadhasivam Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230123131931.263024-2-manivannan.sadhasivam@linaro.org Signed-off-by: Will Deacon commit 8c5ee9155f8ae133070b40ee4be03cafb35c188d Author: Daniel Lezcano Date: Wed Jan 18 23:26:10 2023 +0100 thermal/drivers/armada: Use the thermal_zone_get_crit_temp() The driver browses the trip point to find out the critical trip temperature. However the function thermal_zone_get_crit_temp() does already that, so the routine is pointless in the driver. Use thermal_zone_get_crit_temp() instead of inspecting all the trip points. In addition, the hysteresis value is set to zero. A critical trip point does not have a hysteresis. Signed-off-by: Daniel Lezcano Reviewed-by: Miquel Raynal Link: https://lore.kernel.org/r/20230118222610.186088-1-daniel.lezcano@linaro.org commit 5fba66d42746c9b8063de7ce4565d0173da657a2 Author: Bjorn Andersson Date: Thu Jan 12 20:11:04 2023 -0800 iommu/arm-smmu-qcom: Select identity domain for sc8280xp MDSS The Qualcomm display driver installs a translation domain once it has mapped a framebuffer. Use the identity domain for this device on SC8280XP as well, to avoid faults from EFI FB accessing the framebuffer while this is being set up. Signed-off-by: Bjorn Andersson Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230113041104.4189152-1-quic_bjorande@quicinc.com Signed-off-by: Will Deacon commit c2b83395e558ada255fead5b9c9c724d9d487cdb Author: Marijn Suijten Date: Mon Dec 12 13:10:53 2022 +0100 iommu/arm-smmu-qcom: Add SM8150 DPU compatible Add the SM8150 DPU compatible to clients compatible list, as it also needs the workarounds. Signed-off-by: Marijn Suijten Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221212121054.193059-1-konrad.dybcio@linaro.org Signed-off-by: Will Deacon commit 822765f44ec1996cf1137b49ff65001098af2714 Author: Martin Botka Date: Thu Dec 22 20:32:51 2022 +0100 dt-bindings: arm-smmu: Document smmu-500 binding for SM6125 Document smmu-500 compatibility with the SM6125 SoC. Signed-off-by: Martin Botka [Marijn: Move compatible to the new, generic, qcom,smmu-500 list] Signed-off-by: Marijn Suijten Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221222193254.126925-2-marijn.suijten@somainline.org Signed-off-by: Will Deacon commit 0802999c9b7c3549ce7627d3e6d704f3a127904b Author: Bartosz Golaszewski Date: Thu Jan 12 16:45:54 2023 +0100 dt-bindings: arm-smmu: document the smmu on Qualcomm SA8775P Document the qcom,smmu-500 SMMU on SA8775P platforms. Signed-off-by: Bartosz Golaszewski Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230112154554.442808-1-brgl@bgdev.pl Signed-off-by: Will Deacon commit d565d60d3da7f0f390c479c3bc6d5846c061760c Author: Krzysztof Kozlowski Date: Thu Dec 22 10:23:55 2022 +0100 dt-bindings: arm-smmu: disallow clocks when not used Disallow clocks for variants other than: 1. SMMUs with platform-specific compatibles which list explicit clocks and clock-names, 2. SMMUs using only generic compatibles, e.g. arm,mmu-500, which have a variable clocks on different implementations. This requires such variants with platform-specific compatible, to explicitly list the clocks or omit them, making the binding more constraint. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Marijn Suijten Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221222092355.74586-1-krzysztof.kozlowski@linaro.org Signed-off-by: Will Deacon commit 6dbffe465b7c4807c266d696f9a66fb582f8e6f4 Author: Luca Weiss Date: Sat Nov 5 15:20:17 2022 +0100 dt-bindings: iommu: qcom: Add Qualcomm MSM8953 compatible Document the compatible used for IOMMU on the msm8953 SoC. Acked-by: Rob Herring Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20221105142016.93406-1-luca@z3ntu.xyz Signed-off-by: Will Deacon commit 11321f7763d08aaf2057fe6e3055009770dd2b7a Author: Marijn Suijten Date: Tue Dec 13 01:26:25 2022 +0100 dt-bindings: arm-smmu: Add sm8150-smmu-500 to the list of Adreno smmus sm8150 has an smmu-500 specifically for Adreno, where the GPU is allowed to switch pagetables. Document the allowed 3-compatibles for this, similar to sc7280 and sm8250. Signed-off-by: Marijn Suijten Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221213002626.260267-1-konrad.dybcio@linaro.org Signed-off-by: Will Deacon commit 6bc6af375c7025663fbc36bcb7e91f3af653742b Author: Konrad Dybcio Date: Tue Nov 15 16:27:19 2022 +0100 dt-bindings: arm-smmu: Allow 3 power domains on SM6375 MMU500 The SMMU on SM6375 requires 3 power domains to be active. Add an appropriate description of that. Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Acked-by: Will Deacon Link: https://lore.kernel.org/r/20221115152727.9736-2-konrad.dybcio@linaro.org Signed-off-by: Will Deacon commit f15a87c006901e02727bf8ac75b0251cdf8e0ecc Merge: dc7c31e922787 72c70ceeaf593 Author: Paolo Bonzini Date: Tue Dec 27 07:56:16 2022 -0500 Merge branch 'kvm-lapic-fix-and-cleanup' into HEAD The first half or so patches fix semi-urgent, real-world relevant APICv and AVIC bugs. The second half fixes a variety of AVIC and optimized APIC map bugs where KVM doesn't play nice with various edge cases that are architecturally legal(ish), but are unlikely to occur in most real world scenarios Signed-off-by: Paolo Bonzini commit dc7c31e922787466957cadf2c0ad21c0f9a4091f Merge: edd731d732212 310bc39546a43 Author: Paolo Bonzini Date: Fri Jan 13 11:27:55 2023 -0500 Merge branch 'kvm-v6.2-rc4-fixes' into HEAD ARM: * Fix the PMCR_EL0 reset value after the PMU rework * Correctly handle S2 fault triggered by a S1 page table walk by not always classifying it as a write, as this breaks on R/O memslots * Document why we cannot exit with KVM_EXIT_MMIO when taking a write fault from a S1 PTW on a R/O memslot * Put the Apple M2 on the naughty list for not being able to correctly implement the vgic SEIS feature, just like the M1 before it * Reviewer updates: Alex is stepping down, replaced by Zenghui x86: * Fix various rare locking issues in Xen emulation and teach lockdep to detect them * Documentation improvements * Do not return host topology information from KVM_GET_SUPPORTED_CPUID commit edd731d73221277cb384efeb66da76dae0a68dfa Merge: fc471e831016c 9f1a4c004869d Author: Paolo Bonzini Date: Tue Jan 24 05:57:17 2023 -0500 Merge branch 'kvm-hw-enable-refactor' into HEAD The main theme of this series is to kill off kvm_arch_init(), kvm_arch_hardware_(un)setup(), and kvm_arch_check_processor_compat(), which all originated in x86 code from way back when, and needlessly complicate both common KVM code and architecture code. E.g. many architectures don't mark functions/data as __init/__ro_after_init purely because kvm_init() isn't marked __init to support x86's separate vendor modules. The idea/hope is that with those hooks gone (moved to arch code), it will be easier for x86 (and other architectures) to modify their module init sequences as needed without having to fight common KVM code. E.g. I'm hoping that ARM can build on this to simplify its hardware enabling logic, especially the pKVM side of things. There are bug fixes throughout this series. They are more scattered than I would usually prefer, but getting the sequencing correct was a gigantic pain for many of the x86 fixes due to needing to fix common code in order for the x86 fix to have any meaning. And while the bugs are often fatal, they aren't all that interesting for most users as they either require a malicious admin or broken hardware, i.e. aren't likely to be encountered by the vast majority of KVM users. So unless someone _really_ wants a particular fix isolated for backporting, I'm not planning on shuffling patches. Signed-off-by: Paolo Bonzini commit c6ecb0f849fee1ebe5e4bee354e9e16e508f0de9 Author: Doug Brown Date: Mon Jan 16 11:44:01 2023 -0800 dt-bindings: mmc: sdhci-pxa: add pxav1 Add a compatible for the pxav1 controller in the PXA168, along with optional pinctrl properties to use for an errata workaround. Signed-off-by: Doug Brown Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230116194401.20372-9-doug@schmorgal.com Signed-off-by: Ulf Hansson commit f35ca223882aa6faa25f39b9412066e33d8b6963 Author: Doug Brown Date: Mon Jan 16 11:44:00 2023 -0800 mmc: sdhci-pxav2: add optional pinctrl for SDIO IRQ workaround The PXA168 errata recommends that the CMD signal should be detached from the SD bus while performing the dummy CMD0 to restart the clock. Implement this using pinctrl states. Signed-off-by: Doug Brown Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20230116194401.20372-8-doug@schmorgal.com Signed-off-by: Ulf Hansson commit 24552ccb4f1e0a9bf961056057aa8bd4c0d8dfe8 Author: Doug Brown Date: Mon Jan 16 11:43:59 2023 -0800 mmc: sdhci-pxav2: add SDIO card IRQ workaround for PXA168 V1 controller The PXA168 has a documented silicon bug that causes SDIO card IRQs to be missed. Implement the first half of the suggested workaround, which involves resetting the data port logic and issuing a dummy CMD0 to restart the clock. Signed-off-by: Doug Brown Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20230116194401.20372-7-doug@schmorgal.com Signed-off-by: Ulf Hansson commit e41c48b4bcb3ceee43a101ba7d514483271fb2fb Author: Doug Brown Date: Mon Jan 16 11:43:58 2023 -0800 mmc: sdhci-pxav2: add optional core clock Add ability to have an optional core clock just like the pxav3 driver. The PXA168 needs this because its SDHC controllers have separate core and io clocks that both need to be enabled. This also correctly matches the documented devicetree bindings for this driver. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Doug Brown Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20230116194401.20372-6-doug@schmorgal.com Signed-off-by: Ulf Hansson commit c7c60bf62820abfbfc7d154ade06a6043be0b479 Author: Doug Brown Date: Mon Jan 16 11:43:57 2023 -0800 mmc: sdhci-pxav2: change clock name to match DT bindings The devicetree bindings for this driver specify that the two allowed clock names are io and core. Change this driver to look for io, but allow any name if it fails for backwards compatibility. Follow the same pattern used in sdhci-pxav3, but add support for EPROBE_DEFER. Get rid of an unnecessary pdev->dev while we're at it. Signed-off-by: Doug Brown Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20230116194401.20372-5-doug@schmorgal.com Signed-off-by: Ulf Hansson commit 7f7a201ad1fcd916526d10b21685690a35aa8d7a Author: Doug Brown Date: Mon Jan 16 11:43:56 2023 -0800 mmc: sdhci-pxav2: add register workaround for PXA168 silicon bug The PXA168 has a documented silicon bug that results in a data abort exception when accessing the SDHCI_HOST_VERSION register on SDH2 and SDH4 through a 16-bit read. Implement the workaround described in the errata, which performs a 32-bit read from a lower address instead. This is safe to use on all four SDH peripherals. Signed-off-by: Doug Brown Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20230116194401.20372-4-doug@schmorgal.com Signed-off-by: Ulf Hansson commit e764395080184544aa963b0dead24c01d1ca3b0e Author: Doug Brown Date: Mon Jan 16 11:43:55 2023 -0800 mmc: sdhci-pxav2: enable CONFIG_MMC_SDHCI_IO_ACCESSORS Enable CONFIG_MMC_SDHCI_IO_ACCESSORS for the pxav2 driver. The read_w callback is needed for a silicon bug workaround in the PXA168. Signed-off-by: Doug Brown Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20230116194401.20372-3-doug@schmorgal.com Signed-off-by: Ulf Hansson commit dfe9746aed2d1267f00b880ae232170d7d9e4202 Author: Doug Brown Date: Mon Jan 16 11:43:54 2023 -0800 mmc: sdhci-pxav2: add initial support for PXA168 V1 controller Add a new compatible string for the version 1 controller used in the PXA168, along with necessary quirks. Use a separate ops struct in preparation for a silicon bug workaround only necessary on V1. Signed-off-by: Doug Brown Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20230116194401.20372-2-doug@schmorgal.com Signed-off-by: Ulf Hansson commit 248da1fc8418c732e98726fe570d4db01385562d Author: Daniel Golle Date: Wed Jan 18 15:40:58 2023 +0000 thermal/drivers/mtk: Add support for MT7986 and MT7981 Add support for V3 generation thermal found in MT7986 and MT7981 SoCs. Brings code to assign values from efuse as well as new function to convert raw temperature to millidegree celsius, as found in MediaTek's SDK sources (but cleaned up and de-duplicated) [1]: https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/baf36c7eef477aae1f8f2653b6c29e2caf48475b Signed-off-by: Daniel Golle Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/2d341fc45266217249586eb4bd3be3ac4ca83a12.1674055882.git.daniel@makrotopia.org Signed-off-by: Daniel Lezcano commit 4f2ee0aa2e70622e01c06686a967a4dab6fb7f05 Author: Daniel Golle Date: Wed Jan 18 15:40:39 2023 +0000 thermal/drivers/mtk: Use function pointer for raw_to_mcelsius Instead of having if-else logic selecting either raw_to_mcelsius_v1 or raw_to_mcelsius_v2 in mtk_thermal_bank_temperature introduce a function pointer raw_to_mcelsius to struct mtk_thermal which is initialized in the probe function. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Daniel Golle Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/69c17529e8418da3eec703dde31e1b01e5b0f7e8.1674055882.git.daniel@makrotopia.org Signed-off-by: Daniel Lezcano commit d69e7041a39c24de8c935b82c1edae6490be5b4d Author: Yangtao Li Date: Mon Jan 23 18:23:19 2023 +0800 thermal/drivers/sun8i: Convert to use macro Use TEMP_CALIB_MASK macro instead of raw number. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20230123102319.37710-1-frank.li@vivo.com Signed-off-by: Daniel Lezcano commit a646ca099b1811f23a7c1eee58aaf38628ec5e83 Author: Suzuki K Poulose Date: Fri Jan 20 10:34:34 2023 +0000 coresight: perf: Output trace id only once With the dynamic traceid allocation scheme in, we output the AUX_OUTPUT_HWID packet every time event->start() is called. This could cause too many such records in the perf.data, while only one per CPU throughout the life time of the event is required. Make sure we only output it once. Before this patch: $ perf report -D | grep OUTPUT_HW_ID ... AUX_OUTPUT_HW_ID events: 55 (18.3%) After this patch: $ perf report -D | grep OUTPUT_HW_ID ... AUX_OUTPUT_HW_ID events: 5 ( 1.9%) Cc: Mike Leach Cc: James Clark Cc: Leo Yan Signed-off-by: Suzuki K Poulose Reviewed-by: James Clark Link: https://lore.kernel.org/r/20230120103434.864318-1-suzuki.poulose@arm.com commit 0c507af711df7e7b114fa6ec188e6d860cae29c1 Author: Suzuki K Poulose Date: Mon Jan 23 16:08:45 2023 +0000 coresight: Fix uninitialised variable use in coresight_disable Kernel test robot reports: drivers/hwtracing/coresight/coresight-core.c:1176:7: warning: variable 'hash' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized] case CORESIGHT_DEV_SUBTYPE_SOURCE_PROC: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hwtracing/coresight/coresight-core.c:1195:24: note: uninitialized use occurs here idr_remove(&path_idr, hash); ^~~~ Fix this by moving the usage of the hash variable to where it actually should have been. Cc: Mao Jinlong Link: https://lkml.kernel.org/r/202301211339.9mU0dccO-lkp@intel.com Reported-by: kernel test robot Reviewed-by: James Clark Signed-off-by: Suzuki K Poulose Link: https://lkml.kernel.org/r/20230123164700.1074064-1-suzuki.poulose@arm.com commit 75b976c46cbe13dc8accc1173ceee6faddb83112 Author: Markuss Broks Date: Tue Jan 24 00:23:28 2023 +0200 ARM: dts: exynos: Add Samsung Galaxy S5 (SM-G900H) board Samsung Galaxy S5 (SM-G900H) was sold alongside Samsung Galaxy S5 with Snapdragon SoC, however the Exynos version features a 3G capable Intel modem instead of Qualcomm version featuring LTE modem. This phone is based on Exynos5422. Currently, the touchscreen, USB, eMMC and the PMIC are enabled in the device-tree. Signed-off-by: Markuss Broks Link: https://lore.kernel.org/r/20230123222329.13994-3-markuss.broks@gmail.com Signed-off-by: Krzysztof Kozlowski commit 5f8d9a0c2ee2d2fe2d59135261a0835a0a688fa5 Author: Markuss Broks Date: Tue Jan 24 00:23:27 2023 +0200 dt-bindings: arm: samsung: Add compatible for Samsung Galaxy S5 (SM-G900H) Add the compatible for k3g in the Samsung Exynos5800 boards section. Signed-off-by: Markuss Broks Link: https://lore.kernel.org/r/20230123222329.13994-2-markuss.broks@gmail.com Signed-off-by: Krzysztof Kozlowski commit 51affef35bb39f186aef7eeeb4a7f9ceccd3e65e Author: Javier Martinez Canillas Date: Sat Jan 21 20:09:30 2023 +0100 drm/ssd130x: Silence a `dubious: x & !y` warning The sparse tool complains with the following warning: $ make M=drivers/gpu/drm/solomon/ C=2 CC [M] drivers/gpu/drm/solomon/ssd130x.o CHECK drivers/gpu/drm/solomon/ssd130x.c drivers/gpu/drm/solomon/ssd130x.c:363:21: warning: dubious: x & !y This seems to be a false positive in my opinion but still we can silence the tool while making the code easier to read. Let's also add a comment, to explain why the "com_seq" logical not is used rather than its value. Reported-by: Thomas Zimmermann Signed-off-by: Javier Martinez Canillas Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230121190930.2804224-1-javierm@redhat.com commit 998101f2a78cf506022f2094461105cb3d00e19f Author: Javier Martinez Canillas Date: Sat Jan 21 20:24:16 2023 +0100 fbdev: Remove unused struct fb_deferred_io .first_io field This optional callback was added in the commit 1f45f9dbb392 ("fb_defio: add first_io callback") but it was never used by a driver. Let's remove it since it's unlikely that will be used after a decade that was added. Signed-off-by: Javier Martinez Canillas Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230121192418.2814955-2-javierm@redhat.com commit c554520f2cbec9ccb5b7301f0602ac65c4d95d53 Merge: d961bee454f2b e4b48ed460d36 Author: Paolo Abeni Date: Tue Jan 24 11:02:03 2023 +0100 Merge branch 'netlink-protocol-specs' Jakub Kicinski says: ==================== Netlink protocol specs I think the Netlink proto specs are far along enough to merge. Filling in all attribute types and quirks will be an ongoing effort but we have enough to cover FOU so it's somewhat complete. I fully intend to continue polishing the code but at the same time I'd like to start helping others base their work on the specs (e.g. DPLL) and need to start working on some new families myself. That's the progress / motivation for merging. The RFC [1] has more of a high level blurb, plus I created a lot of documentation, I'm not going to repeat it here. There was also the talk at LPC [2]. [1] https://lore.kernel.org/all/20220811022304.583300-1-kuba@kernel.org/ [2] https://youtu.be/9QkXIQXkaQk?t=2562 v2: https://lore.kernel.org/all/20220930023418.1346263-1-kuba@kernel.org/ v3: https://lore.kernel.org/all/20230119003613.111778-1-kuba@kernel.org/1 v4: - spec improvements (patch 2) - Python cleanup (patch 3) - rename auto-gen files and use the right comment style ==================== Link: https://lore.kernel.org/r/20230120175041.342573-1-kuba@kernel.org Signed-off-by: Paolo Abeni commit e4b48ed460d369070ce1d491800acf50ab9701d2 Author: Jakub Kicinski Date: Fri Jan 20 09:50:41 2023 -0800 tools: ynl: add a completely generic client Add a CLI sample which can take in arbitrary request in JSON format, convert it to Netlink and do the inverse for output. It's meant as a development tool primarily and perhaps for selftests which need to tickle netlink in a special way. Acked-by: Stanislav Fomichev Signed-off-by: Jakub Kicinski Signed-off-by: Paolo Abeni commit 1d562c32e4392cc091c940918ee1ffd7bfcb9e96 Author: Jakub Kicinski Date: Fri Jan 20 09:50:40 2023 -0800 net: fou: use policy and operation tables generated from the spec Generate and plug in the spec-based tables. A little bit of renaming is needed in the FOU code. Acked-by: Stanislav Fomichev Signed-off-by: Jakub Kicinski Signed-off-by: Paolo Abeni commit 08d323234d10eab077cbf0093eeb5991478a261a Author: Jakub Kicinski Date: Fri Jan 20 09:50:39 2023 -0800 net: fou: rename the source for linking We'll need to link two objects together to form the fou module. This means the source can't be called fou, the build system expects fou.o to be the combined object. Acked-by: Stanislav Fomichev Signed-off-by: Jakub Kicinski Signed-off-by: Paolo Abeni commit 3a330496baa87f334159fdf2388e44f42f619ab5 Author: Jakub Kicinski Date: Fri Jan 20 09:50:38 2023 -0800 net: fou: regenerate the uAPI from the spec Regenerate the FOU uAPI header from the YAML spec. The flags now come before attributes which use them, and the comments for type disappear (coders should look at the spec instead). Acked-by: Stanislav Fomichev Signed-off-by: Jakub Kicinski Signed-off-by: Paolo Abeni commit 4eb77b4ecd3c5eaab83adf76e67e0a7ed2a24418 Author: Jakub Kicinski Date: Fri Jan 20 09:50:37 2023 -0800 netlink: add a proto specification for FOU FOU has a reasonably modern Genetlink family. Add a spec. Acked-by: Stanislav Fomichev Signed-off-by: Jakub Kicinski Signed-off-by: Paolo Abeni commit be5bea1cc0bf663aa0a45a2c0021dfcfb6cca976 Author: Jakub Kicinski Date: Fri Jan 20 09:50:36 2023 -0800 net: add basic C code generators for Netlink Code generators to turn Netlink specs into C code. I'm definitely not proud of it. The main generator is in Python, there's a bash script to regen all code-gen'ed files in tree after making spec changes. Acked-by: Stanislav Fomichev Signed-off-by: Jakub Kicinski Signed-off-by: Paolo Abeni commit e616c07ca51817ebdb1423807d52cac72d1c22fa Author: Jakub Kicinski Date: Fri Jan 20 09:50:35 2023 -0800 netlink: add schemas for YAML specs Add schemas for Netlink spec files. As described in the docs we have 4 "protocols" or compatibility levels, and each one comes with its own schema, but the more general / legacy schemas are superset of more modern ones: genetlink is the smallest followed by genetlink-c and genetlink-legacy. There is no schema for raw netlink, yet, I haven't found the time.. I don't know enough jsonschema to do inheritance or something but the repetition is not too bad. I hope. Acked-by: Stanislav Fomichev Signed-off-by: Jakub Kicinski Signed-off-by: Paolo Abeni commit 9d6a65079c98f55fa2249c50e517d133d137c251 Author: Jakub Kicinski Date: Fri Jan 20 09:50:34 2023 -0800 docs: add more netlink docs (incl. spec docs) Add documentation about the upcoming Netlink protocol specs. Reviewed-by: Nicolas Dichtel Reviewed-by: Bagas Sanjaya Acked-by: Stanislav Fomichev Signed-off-by: Jakub Kicinski Signed-off-by: Paolo Abeni commit 1ec23ed7126e6b8fab287598576e84e26e6482ef Author: Tvrtko Ursulin Date: Mon Jan 23 10:56:29 2023 -0800 drm/i915: Use uabi engines for the default engine map Default engine map is exactly about uabi engines so no excuse not to use the appropriate iterator to populate it. Signed-off-by: Tvrtko Ursulin Signed-off-by: Jonathan Cavitt Reviewed-by: Jonathan Cavitt [tursulin: Fixed up r-b tag spelling.] Link: https://patchwork.freedesktop.org/patch/msgid/20230123185629.1593320-1-jonathan.cavitt@intel.com commit 13fcfcb2a9a4787fe4e49841d728f6f2e9fa6911 Author: Jiasheng Jiang Date: Tue Dec 6 15:48:19 2022 +0800 drm/msm/mdp5: Add check for kzalloc As kzalloc may fail and return NULL pointer, it should be better to check the return value in order to avoid the NULL pointer dereference. Fixes: 1cff7440a86e ("drm/msm: Convert to using __drm_atomic_helper_crtc_reset() for reset.") Signed-off-by: Jiasheng Jiang Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/514154/ Link: https://lore.kernel.org/r/20221206074819.18134-1-jiasheng@iscas.ac.cn Signed-off-by: Dmitry Baryshkov commit d961bee454f2bfbd0a330c27217b4b19705417dc Merge: 5cf6c22b5b7b7 ca22da2fbd693 Author: Paolo Abeni Date: Tue Jan 24 10:30:56 2023 +0100 Merge branch 'net-sched-use-the-backlog-for-nested-mirred-ingress' Davide Caratti says: ==================== net/sched: use the backlog for nested mirred ingress TC mirred has a protection against excessive stack growth, but that protection doesn't really guarantee the absence of recursion, nor it guards against loops. Patch 1/2 rewords "recursion" to "nesting" to make this more clear. We can leverage on this existing mechanism to prevent TCP / SCTP from doing soft lock-up in some specific scenarios that uses mirred egress->ingress: patch 2 changes mirred so that the networking backlog is used for nested mirred ingress actions. ==================== Link: https://lore.kernel.org/r/cover.1674233458.git.dcaratti@redhat.com Signed-off-by: Paolo Abeni commit ca22da2fbd693b54dc8e3b7b54ccc9f7e9ba3640 Author: Davide Caratti Date: Fri Jan 20 18:01:40 2023 +0100 act_mirred: use the backlog for nested calls to mirred ingress William reports kernel soft-lockups on some OVS topologies when TC mirred egress->ingress action is hit by local TCP traffic [1]. The same can also be reproduced with SCTP (thanks Xin for verifying), when client and server reach themselves through mirred egress to ingress, and one of the two peers sends a "heartbeat" packet (from within a timer). Enqueueing to backlog proved to fix this soft lockup; however, as Cong noticed [2], we should preserve - when possible - the current mirred behavior that counts as "overlimits" any eventual packet drop subsequent to the mirred forwarding action [3]. A compromise solution might use the backlog only when tcf_mirred_act() has a nest level greater than one: change tcf_mirred_forward() accordingly. Also, add a kselftest that can reproduce the lockup and verifies TC mirred ability to account for further packet drops after TC mirred egress->ingress (when the nest level is 1). [1] https://lore.kernel.org/netdev/33dc43f587ec1388ba456b4915c75f02a8aae226.1663945716.git.dcaratti@redhat.com/ [2] https://lore.kernel.org/netdev/Y0w%2FWWY60gqrtGLp@pop-os.localdomain/ [3] such behavior is not guaranteed: for example, if RPS or skb RX timestamping is enabled on the mirred target device, the kernel can defer receiving the skb and return NET_RX_SUCCESS inside tcf_mirred_forward(). Reported-by: William Zhao CC: Xin Long Signed-off-by: Davide Caratti Reviewed-by: Marcelo Ricardo Leitner Acked-by: Jamal Hadi Salim Signed-off-by: Paolo Abeni commit 78dcdffe0418ac8f3f057f26fe71ccf4d8ed851f Author: Davide Caratti Date: Fri Jan 20 18:01:39 2023 +0100 net/sched: act_mirred: better wording on protection against excessive stack growth with commit e2ca070f89ec ("net: sched: protect against stack overflow in TC act_mirred"), act_mirred protected itself against excessive stack growth using per_cpu counter of nested calls to tcf_mirred_act(), and capping it to MIRRED_RECURSION_LIMIT. However, such protection does not detect recursion/loops in case the packet is enqueued to the backlog (for example, when the mirred target device has RPS or skb timestamping enabled). Change the wording from "recursion" to "nesting" to make it more clear to readers. CC: Jamal Hadi Salim Signed-off-by: Davide Caratti Reviewed-by: Marcelo Ricardo Leitner Acked-by: Jamal Hadi Salim Signed-off-by: Paolo Abeni commit 584d29912db27e56eaaccd225e283e1f429e4f83 Author: Geert Uytterhoeven Date: Thu Dec 8 10:56:58 2022 +0100 clk: renesas: r8a779g0: Add custom clock for PLL2 Currently the PLLs are modeled as fixed factor clocks, based on initial settings. However, enabling CPU boost clock rates requires increasing the PLL clock rates. Add a custom clock driver to model the PLL clocks on R-Car Gen4, and use it for PLL2 on R-Car V4H. This allows the Z clock (Cortex-A76 core clock) to request PLL rate changes, and enable boost mode for the High Performance mode. For now this is limited to integer multiplication modes. Note that the definition for CPG_PLLxCR0_NI uses the value for R-Car V4H. On R-Car S4-8, the integer and fractional multiplication fields are one bit larger resp. smaller, but R-Car S4-8 does not support High Performance mode. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/76a5952900a6e15604c640bc8a27762e0e936677.1670492384.git.geert+renesas@glider.be commit 5cf6c22b5b7b75caa804c6454932f2f48f7ddb1c Merge: d7bf56e0c591e 4ad8766cd3982 Author: Paolo Abeni Date: Tue Jan 24 10:08:53 2023 +0100 Merge branch 'fix-cpts-release-action-in-am65-cpts-driver' Siddharth Vadapalli says: ==================== Fix CPTS release action in am65-cpts driver Delete unreachable code in am65_cpsw_init_cpts() function, which was Reported-by: Leon Romanovsky at: https://lore.kernel.org/r/Y8aHwSnVK9+sAb24@unreal Remove the devm action associated with am65_cpts_release() and invoke the function directly on the cleanup and exit paths. v4: https://lore.kernel.org/r/20230120044201.357950-1-s-vadapalli@ti.com/ v3: https://lore.kernel.org/r/20230118095439.114222-1-s-vadapalli@ti.com/ v2: https://lore.kernel.org/r/20230116044517.310461-1-s-vadapalli@ti.com/ v1: https://lore.kernel.org/r/20230113104816.132815-1-s-vadapalli@ti.com/ ==================== Link: https://lore.kernel.org/r/20230120070731.383729-1-s-vadapalli@ti.com Signed-off-by: Paolo Abeni commit 4ad8766cd3982744e53f107f378d2c65b76ff9a8 Author: Siddharth Vadapalli Date: Fri Jan 20 12:37:31 2023 +0530 net: ethernet: ti: am65-cpsw/cpts: Fix CPTS release action The am65_cpts_release() function is registered as a devm_action in the am65_cpts_create() function in am65-cpts driver. When the am65-cpsw driver invokes am65_cpts_create(), am65_cpts_release() is added in the set of devm actions associated with the am65-cpsw driver's device. In the event of probe failure or probe deferral, the platform_drv_probe() function invokes dev_pm_domain_detach() which powers off the CPSW and the CPSW's CPTS hardware, both of which share the same power domain. Since the am65_cpts_disable() function invoked by the am65_cpts_release() function attempts to reset the CPTS hardware by writing to its registers, the CPTS hardware is assumed to be powered on at this point. However, the hardware is powered off before the devm actions are executed. Fix this by getting rid of the devm action for am65_cpts_release() and invoking it directly on the cleanup and exit paths. Fixes: f6bd59526ca5 ("net: ethernet: ti: introduce am654 common platform time sync driver") Signed-off-by: Siddharth Vadapalli Reviewed-by: Leon Romanovsky Reviewed-by: Tony Nguyen Reviewed-by: Roger Quadros Signed-off-by: Paolo Abeni commit 0a974b1fff7f8c685a0370a25d6e7150460f7b7d Author: Siddharth Vadapalli Date: Fri Jan 20 12:37:30 2023 +0530 net: ethernet: ti: am65-cpsw: Delete unreachable error handling code The am65_cpts_create() function returns -EOPNOTSUPP only when the config "CONFIG_TI_K3_AM65_CPTS" is disabled. Also, in the am65_cpsw_init_cpts() function, am65_cpts_create() can only be invoked if the config "CONFIG_TI_K3_AM65_CPTS" is enabled. Thus, the error handling code for the case in which the return value of am65_cpts_create() is -EOPNOTSUPP, is unreachable. Hence delete it. Reported-by: Leon Romanovsky Signed-off-by: Siddharth Vadapalli Reviewed-by: Leon Romanovsky Reviewed-by: Tony Nguyen Reviewed-by: Roger Quadros Signed-off-by: Paolo Abeni commit 93340e10b9c5fc86730d149636e0aa8b47bb5a34 Author: Jiasheng Jiang Date: Tue Dec 6 16:02:36 2022 +0800 drm/msm/dpu: Add check for pstates As kzalloc may fail and return NULL pointer, it should be better to check pstates in order to avoid the NULL pointer dereference. Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Jiasheng Jiang Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/514160/ Link: https://lore.kernel.org/r/20221206080236.43687-1-jiasheng@iscas.ac.cn Signed-off-by: Dmitry Baryshkov commit c96988b7d99327bb08bd9efd29a203b22cd88ace Author: Jiasheng Jiang Date: Tue Dec 6 16:05:17 2022 +0800 drm/msm/dpu: Add check for cstate As kzalloc may fail and return NULL pointer, it should be better to check cstate in order to avoid the NULL pointer dereference in __drm_atomic_helper_crtc_reset. Fixes: 1cff7440a86e ("drm/msm: Convert to using __drm_atomic_helper_crtc_reset() for reset.") Signed-off-by: Jiasheng Jiang Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/514163/ Link: https://lore.kernel.org/r/20221206080517.43786-1-jiasheng@iscas.ac.cn Signed-off-by: Dmitry Baryshkov commit 6c021d77e788aa046845e9877753a7a1148b24b3 Author: Dmitry Baryshkov Date: Mon Jan 23 10:08:18 2023 +0200 drm/msm/dpu: fix sm8450 CTL configuration Correct the CTL size on sm8450 platform. This fixes the incorrect merge of sm8350 support, which unfortunately also touched the SM8450 setup. Fixes: 0e91bcbb0016 ("drm/msm/dpu: Add SM8350 to hw catalog") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/519671/ Link: https://lore.kernel.org/r/20230123080818.3069266-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 1be13a5091bf71627aa1a3d35360b039510f42f3 Author: Heiner Kallweit Date: Mon Jan 23 22:24:40 2023 +0100 arm64: dts: amlogic: Fix non-compliant SD/SDIO node names mmc-controller.yaml defines "^mmc(@.*)?$" as node name pattern. In preparation of adding schema-based validation fix the node name in two affected files. Signed-off-by: Heiner Kallweit Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/55c53e8d-6b30-51bf-edf6-b5b67887bd0a@gmail.com Signed-off-by: Neil Armstrong commit 31c318051040a8d60d027ae64182f04155c15737 Author: Dmitry Baryshkov Date: Mon Jan 23 08:24:15 2023 +0200 drm/msm/dpu: add missing ubwc_swizzle setting to catalog Use the values from the vendor DTs to set ubwc_swizzle in the catalog. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/519662/ Link: https://lore.kernel.org/r/20230123062415.3027743-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit daa9a2ec3e079ff6bc9b1463dac3cf2c80648c95 Author: Dmitry Baryshkov Date: Sat Jan 21 15:54:57 2023 +0200 drm/msm/dpu: drop stale comment from struct dpu_mdp_cfg doc The field ubwc_static was removed from struct dpu_mdp_cfg some time ago. Drop the corresponding kerneldoc now. Fixes: 544d8b96150d ("drm/msm/dpu: update UBWC config for sm8150 and sm8250") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/519554/ Link: https://lore.kernel.org/r/20230121135457.2788199-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit d7fd8634f48d76aa799ed57beb7d87dab91bde80 Author: Dmitry Baryshkov Date: Wed Jan 18 04:01:52 2023 +0200 drm/msm: use strscpy instead of strncpy Using strncpy can result in non-NULL-terminated destination string. Use strscpy instead. This fixes following warning: drivers/gpu/drm/msm/msm_fence.c: In function ‘msm_fence_context_alloc’: drivers/gpu/drm/msm/msm_fence.c:25:9: warning: ‘strncpy’ specified bound 32 equals destination size [-Wstringop-truncation] 25 | strncpy(fctx->name, name, sizeof(fctx->name)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: f97decac5f4c ("drm/msm: Support multiple ringbuffers") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/518787/ Link: https://lore.kernel.org/r/20230118020152.1689213-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 255f056181ac69278dcd8778f0be32a21b2d2a6a Author: Dmitry Baryshkov Date: Mon Jan 16 12:30:55 2023 +0200 drm/msm/dpu: sc7180: add missing WB2 clock control Add missing DPU_CLK_CTRL_WB2 to sc7180_mdp clocks array. Fixes: 51e4d60e6ba5 ("drm/msm/dpu: add writeback support for sc7180") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Jessica Zhang # Trogdor (sc7180) Patchwork: https://patchwork.freedesktop.org/patch/518504/ Link: https://lore.kernel.org/r/20230116103055.780767-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 05c578d5162474dd589e79921aa0304f9571e9b2 Author: Dmitry Baryshkov Date: Wed Jan 18 05:24:32 2023 +0200 dt-binbings: display/msm: dsi-controller-main: add missing supplies Describe DSI supplies used on apq8064 (vdda-supply) and msm8994/96 (vcca-supply). Signed-off-by: Dmitry Baryshkov Acked-by: Rob Herring Patchwork: https://patchwork.freedesktop.org/patch/518810/ Link: https://lore.kernel.org/r/20230118032432.1716616-5-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 2fd5293df88d01c43853e892580ec1883038b98f Author: Dmitry Baryshkov Date: Wed Jan 18 05:24:31 2023 +0200 dt-bindings: display/msm: dsi-controller-main: allow using fewer lanes Some platforms might use less than full 4 lanes DSI interface. Allow using any amount of lanes starting from 1 up to 4. Signed-off-by: Dmitry Baryshkov Acked-by: Rob Herring Patchwork: https://patchwork.freedesktop.org/patch/518807/ Link: https://lore.kernel.org/r/20230118032432.1716616-4-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 2f8e5f8b2ea4bb1508cfc5b0647e0967a7ba0f3b Author: Dmitry Baryshkov Date: Wed Jan 18 05:24:30 2023 +0200 dt-bindings: display/msm: dsi-controller-main: account for apq8064 APQ8064 requires listing four clocks in the assigned-clocks / assigned-clock-parents properties. Account for that. Signed-off-by: Dmitry Baryshkov Acked-by: Rob Herring Patchwork: https://patchwork.freedesktop.org/patch/518808/ Link: https://lore.kernel.org/r/20230118032432.1716616-3-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 65e835945aabca198c8418484c096e61a1345a75 Author: Dmitry Baryshkov Date: Wed Jan 18 05:24:29 2023 +0200 dt-bindings: display/msm: dsi-controller-main: remove #address/#size-cells Stop mentioning #address-cells/#size-cells which are defined in display/dsi-controller.yaml. Use unevaluatedProperties instead of additionalProperties to allow skipping properties defined in other schema files. Signed-off-by: Dmitry Baryshkov Acked-by: Rob Herring Patchwork: https://patchwork.freedesktop.org/patch/518809/ Link: https://lore.kernel.org/r/20230118032432.1716616-2-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit d10bdc6ec6ac9393a48f1e4e874eeec7f48d046d Author: Bryan O'Donoghue Date: Wed Jan 18 17:16:21 2023 +0000 dt-bindings: msm: dsi-controller-main: Document clocks on a per compatible basis Each compatible has a different set of clocks which are associated with it. Add in the list of clocks for each compatible. Acked-by: Rob Herring Acked-by: Krzysztof Kozlowski Signed-off-by: Bryan O'Donoghue Patchwork: https://patchwork.freedesktop.org/patch/519080/ Link: https://lore.kernel.org/r/20230118171621.102694-3-bryan.odonoghue@linaro.org Signed-off-by: Dmitry Baryshkov commit 0c0f65c6dd449d6f381b02c702a599268ae1366d Author: Bryan O'Donoghue Date: Wed Jan 18 17:16:20 2023 +0000 dt-bindings: msm: dsi-controller-main: Add compatible strings for every current SoC Currently we do not differentiate between the various users of the qcom,mdss-dsi-ctrl. The driver is flexible enough to operate from one compatible string but, the hardware does have some significant differences in the number of clocks. To facilitate documenting the clocks add the following compatible strings - qcom,apq8064-dsi-ctrl - qcom,msm8916-dsi-ctrl - qcom,msm8953-dsi-ctrl - qcom,msm8974-dsi-ctrl - qcom,msm8996-dsi-ctrl - qcom,msm8998-dsi-ctrl - qcom,sc7180-dsi-ctrl - qcom,sc7280-dsi-ctrl - qcom,sdm660-dsi-ctrl - qcom,sdm845-dsi-ctrl - qcom,sm8150-dsi-ctrl - qcom,sm8250-dsi-ctrl - qcom,sm8350-dsi-ctrl - qcom,sm8450-dsi-ctrl - qcom,sm8550-dsi-ctrl - qcom,qcm2290-dsi-ctrl Deprecate qcom,dsi-ctrl-6g-qcm2290 in favour of the desired format while we do so. Several MDSS yaml files exist which document the dsi sub-node. For each existing SoC MDSS yaml, provide the right dsi compat string. Acked-by: Rob Herring Signed-off-by: Bryan O'Donoghue Patchwork: https://patchwork.freedesktop.org/patch/519078/ Link: https://lore.kernel.org/r/20230118171621.102694-2-bryan.odonoghue@linaro.org Signed-off-by: Dmitry Baryshkov commit d7bf56e0c591e189141430dc8bf4a1b4d0f117a2 Author: Rakesh Sankaranarayanan Date: Fri Jan 20 16:17:33 2023 +0530 net: phy: microchip: run phy initialization during each link update PHY initialization is supposed to run on every mode changes. "lan87xx_config_aneg()" verifies every mode change using "phy_modify_changed()" function. Earlier code had phy_modify_changed() followed by genphy_soft_reset. But soft_reset resets all the pre-configured register values to default state, and lost all the initialization done. With this reason gen_phy_reset was removed. But it need to go through init sequence each time the mode changed. Update lan87xx_config_aneg() to invoke phy_init once successful mode update is detected. PHY init sequence added in lan87xx_phy_init() have slave init commands executed every time. Update the init sequence to run slave init only if phydev is in slave mode. Test setup contains LAN9370 EVB connected to SAMA5D3 (Running DSA), and issue can be reproduced by connecting link to any of the available ports after SAMA5D3 boot-up. With this issue, port will fail to update link state. But once the SAMA5D3 is reset with LAN9370 link in connected state itself, on boot-up link state will be reported as UP. But Again after some time, if link is moved to DOWN state, it will not get reported. Signed-off-by: Rakesh Sankaranarayanan Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230120104733.724701-1-rakesh.sankaranarayanan@microchip.com Signed-off-by: Jakub Kicinski commit 90e05ef3d17a8fcab534bf67109ef98b309b0d0f Merge: 3176eb82681ec 71d7920fb2d1d Author: Jakub Kicinski Date: Mon Jan 23 22:12:36 2023 -0800 Merge branch 'net-dsa-microchip-add-support-for-credit-based-shaper' Arun Ramadoss says: ==================== net: dsa: microchip: add support for credit based shaper LAN937x switch family, KSZ9477, KSZ9567, KSZ9563 and KSZ8563 supports the credit based shaper. But there were few difference between LAN937x and KSZ switch like - number of queues for LAN937x is 8 and for others it is 4. - size of credit increment register for LAN937x is 24 and for other is 16-bit. This patch series add the credit based shaper with common implementation for LAN937x and KSZ swithes. ==================== Link: https://lore.kernel.org/r/20230120052135.32120-1-arun.ramadoss@microchip.com Signed-off-by: Jakub Kicinski commit 71d7920fb2d1d6cdaa6db58426783be02c9cb7bb Author: Arun Ramadoss Date: Fri Jan 20 10:51:35 2023 +0530 net: dsa: microchip: add support for credit based shaper KSZ9477, KSZ9567, KSZ9563, KSZ8563 and LAN937x supports Credit based shaper. To differentiate the chip supporting cbs, tc_cbs_supported flag is introduced in ksz_chip_data. And KSZ series has 16bit Credit increment registers whereas LAN937x has 24bit register. The value to be programmed in the credit increment is determined using the successive multiplication method to convert decimal fraction to hexadecimal fraction. For example: if idleslope is 10000 and sendslope is -90000, then bandwidth is 10000 - (-90000) = 100000. The 10% bandwidth of 100Mbps means 10/100 = 0.1(decimal). This value has to be converted to hexa. 1) 0.1 * 16 = 1.6 --> fraction 0.6 Carry = 1 (MSB) 2) 0.6 * 16 = 9.6 --> fraction 0.6 Carry = 9 3) 0.6 * 16 = 9.6 --> fraction 0.6 Carry = 9 4) 0.6 * 16 = 9.6 --> fraction 0.6 Carry = 9 5) 0.6 * 16 = 9.6 --> fraction 0.6 Carry = 9 6) 0.6 * 16 = 9.6 --> fraction 0.6 Carry = 9 (LSB) Now 0.1(decimal) becomes 0.199999(Hex). If it is LAN937x, 24 bit value will be programmed to Credit Inc register, 0x199999. For others 16 bit value will be prgrammed, 0x1999. Signed-off-by: Arun Ramadoss Signed-off-by: Jakub Kicinski commit e30f33a5f5c74f278feaa57517d851874dfc640f Author: Arun Ramadoss Date: Fri Jan 20 10:51:34 2023 +0530 net: dsa: microchip: enable port queues for tc mqprio LAN937x family of switches has 8 queues per port where the KSZ switches has 4 queues per port. By default, only one queue per port is enabled. The queues are configurable in 2, 4 or 8. This patch add 8 number of queues for LAN937x and 4 for other switches. In the tag_ksz.c file, prioirty of the packet is queried using the skb buffer and the corresponding value is updated in the tag. Signed-off-by: Arun Ramadoss Signed-off-by: Jakub Kicinski commit 3176eb82681ec9c8af31c6588ddedcc6cfb9e445 Author: Jesper Dangaard Brouer Date: Fri Jan 20 13:07:43 2023 +0100 net: avoid irqsave in skb_defer_free_flush The spin_lock irqsave/restore API variant in skb_defer_free_flush can be replaced with the faster spin_lock irq variant, which doesn't need to read and restore the CPU flags. Using the unconditional irq "disable/enable" API variant is safe, because the skb_defer_free_flush() function is only called during NAPI-RX processing in net_rx_action(), where it is known the IRQs are enabled. Expected gain is 14 cycles from avoiding reading and restoring CPU flags in a spin_lock_irqsave/restore operation, measured via a microbencmark kernel module[1] on CPU E5-1650 v4 @ 3.60GHz. Microbenchmark overhead of spin_lock+unlock: - spin_lock_unlock_irq cost: 34 cycles(tsc) 9.486 ns - spin_lock_unlock_irqsave cost: 48 cycles(tsc) 13.567 ns We don't expect to see a measurable packet performance gain, as skb_defer_free_flush() is called infrequently once per NIC device NAPI bulk cycle and conditionally only if SKBs have been deferred by other CPUs via skb_attempt_defer_free(). [1] https://github.com/netoptimizer/prototype-kernel/blob/master/kernel/lib/time_bench_sample.c Reviewed-by: Jacob Keller Signed-off-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/r/167421646327.1321776.7390743166998776914.stgit@firesoul Signed-off-by: Jakub Kicinski commit 695a376b59f72c249caad40da64d5cce239c5f48 Author: Jon Maxwell Date: Sat Jan 21 10:23:31 2023 +1100 ipv6: Document that max_size sysctl is deprecated v4: fix deprecated typo. Document that max_size is deprecated due to: commit af6d10345ca7 ("ipv6: remove max_size check inline with ipv4") Signed-off-by: Jon Maxwell Link: https://lore.kernel.org/r/20230120232331.1273881-1-jmaxwell37@gmail.com Signed-off-by: Jakub Kicinski commit f72ff8b81ebc6a0a25e41b7e6c1dc42e3aa33e7e Author: Jesper Dangaard Brouer Date: Fri Jan 20 11:34:44 2023 +0100 net: fix kfree_skb_list use of skb_mark_not_on_list A bug was introduced by commit eedade12f4cb ("net: kfree_skb_list use kmem_cache_free_bulk"). It unconditionally unlinked the SKB list via invoking skb_mark_not_on_list(). In this patch we choose to remove the skb_mark_not_on_list() call as it isn't necessary. It would be possible and correct to call skb_mark_not_on_list() only when __kfree_skb_reason() returns true, meaning the SKB is ready to be free'ed, as it calls/check skb_unref(). This fix is needed as kfree_skb_list() is also invoked on skb_shared_info frag_list (skb_drop_fraglist() calling kfree_skb_list()). A frag_list can have SKBs with elevated refcnt due to cloning via skb_clone_fraglist(), which takes a reference on all SKBs in the list. This implies the invariant that all SKBs in the list must have the same refcnt, when using kfree_skb_list(). Reported-by: syzbot+c8a2e66e37eee553c4fd@syzkaller.appspotmail.com Reported-and-tested-by: syzbot+c8a2e66e37eee553c4fd@syzkaller.appspotmail.com Fixes: eedade12f4cb ("net: kfree_skb_list use kmem_cache_free_bulk") Signed-off-by: Jesper Dangaard Brouer Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/167421088417.1125894.9761158218878962159.stgit@firesoul Signed-off-by: Jakub Kicinski commit 3bee9b573af515a8f15db70e7875ac96f87d57b5 Author: Dan Carpenter Date: Fri Jan 20 16:47:12 2023 +0300 net: microchip: sparx5: Fix uninitialized variable in vcap_path_exist() The "eport" variable needs to be initialized to NULL for this code to work. Fixes: 814e7693207f ("net: microchip: vcap api: Add a storage state to a VCAP rule") Signed-off-by: Dan Carpenter Reviewed-by: Steen Hegelund Link: https://lore.kernel.org/r/Y8qbYAb+YSXo1DgR@kili Signed-off-by: Jakub Kicinski commit 8a8b70b3f2cf1155b164ddf649b3c033085451e4 Author: Heiner Kallweit Date: Fri Jan 20 23:18:32 2023 +0100 net: mdio: warn once if addr parameter is invalid in mdiobus_get_phy() If mdiobus_get_phy() is called with an invalid addr parameter, then the caller has a bug. Print a call trace to help identifying the caller. Suggested-by: Paolo Abeni Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/daec3f08-6192-ba79-f74b-5beb436cab6c@gmail.com Signed-off-by: Jakub Kicinski commit 62be69397e53ab14f607698bb41343ce576713e8 Merge: 306f208259ff7 4ca69027691a0 Author: Jakub Kicinski Date: Mon Jan 23 21:27:30 2023 -0800 Merge tag 'wireless-next-2023-01-23' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Kalle Valo says: ==================== wireless-next patches for v6.3 First set of patches for v6.3. The most important change here is that the old Wireless Extension user space interface is not supported on Wi-Fi 7 devices at all. We also added a warning if anyone with modern drivers (ie. cfg80211 and mac80211 drivers) tries to use Wireless Extensions, everyone should switch to using nl80211 interface instead. Static WEP support is removed, there wasn't any driver using that anyway so there's no user impact. Otherwise it's smaller features and fixes as usual. Note: As mt76 had tricky conflicts due to the fixes in wireless tree, we decided to merge wireless into wireless-next to solve them easily. There should not be any merge problems anymore. Major changes: cfg80211 - remove never used static WEP support - warn if Wireless Extention interface is used with cfg80211/mac80211 drivers - stop supporting Wireless Extensions with Wi-Fi 7 devices - support minimal Wi-Fi 7 Extremely High Throughput (EHT) rate reporting rfkill - add GPIO DT support bitfield - add FIELD_PREP_CONST() mt76 - per-PHY LED support rtw89 - support new Bluetooth co-existance version rtl8xxxu - support RTL8188EU * tag 'wireless-next-2023-01-23' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (123 commits) wifi: wireless: deny wireless extensions on MLO-capable devices wifi: wireless: warn on most wireless extension usage wifi: mac80211: drop extra 'e' from ieeee80211... name wifi: cfg80211: Deduplicate certificate loading bitfield: add FIELD_PREP_CONST() wifi: mac80211: add kernel-doc for EHT structure mac80211: support minimal EHT rate reporting on RX wifi: mac80211: Add HE MU-MIMO related flags in ieee80211_bss_conf wifi: mac80211: Add VHT MU-MIMO related flags in ieee80211_bss_conf wifi: cfg80211: Use MLD address to indicate MLD STA disconnection wifi: cfg80211: Support 32 bytes KCK key in GTK rekey offload wifi: cfg80211: Fix extended KCK key length check in nl80211_set_rekey_data() wifi: cfg80211: remove support for static WEP wifi: rtl8xxxu: Dump the efuse only for untested devices wifi: rtl8xxxu: Print the ROM version too wifi: rtw88: Use non-atomic sta iterator in rtw_ra_mask_info_update() wifi: rtw88: Use rtw_iterate_vifs() for rtw_vif_watch_dog_iter() wifi: rtw88: Move register access from rtw_bf_assoc() outside the RCU wifi: rtl8xxxu: Use a longer retry limit of 48 wifi: rtl8xxxu: Report the RSSI to the firmware ... ==================== Link: https://lore.kernel.org/r/20230123103338.330CBC433EF@smtp.kernel.org Signed-off-by: Jakub Kicinski commit 306f208259ff7a89c022f1e5f5d2144b0ccb236c Author: Krzysztof Kozlowski Date: Fri Jan 20 15:43:29 2023 +0100 dt-bindings: net: asix,ax88796c: allow SPI peripheral properties The AX88796C device node on SPI bus can use SPI peripheral properties in certain configurations: exynos3250-artik5-eval.dtb: ethernet@0: 'controller-data' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230120144329.305655-1-krzysztof.kozlowski@linaro.org Signed-off-by: Jakub Kicinski commit 057fb03160a88925877548979ab4ab7f9223e118 Author: Eric Dumazet Date: Fri Jan 20 18:11:36 2023 +0000 selftests: net: tcp_mmap: populate pages in send path In commit 72653ae5303c ("selftests: net: tcp_mmap: Use huge pages in send path") I made a change to use hugepages for the buffer used by the client (tx path) Today, I understood that the cause for poor zerocopy performance was that after a mmap() for a 512KB memory zone, kernel uses a single zeropage, mapped 128 times. This was really the reason for poor tx path performance in zero copy mode, because this zero page refcount is under high pressure, especially when TCP ACK packets are processed on another cpu. We need either to force a COW on all the memory range, or use MAP_POPULATE so that a zero page is not abused. Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20230120181136.3764521-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 5adca38c0b97502e35e4df00d9edf4e85ba21dab Merge: 5a5ef64f28edd 13f87983fb914 Author: Martin K. Petersen Date: Mon Jan 23 21:38:10 2023 -0500 Merge patch series "Enable DMA clustering in the UFS driver" Bart Van Assche says: The third patch in this series enables DMA clustering in the UFS driver since UFS host controllers support DMA clustering. The first two patches fix bugs in the Exynos host controller driver. Link: https://lore.kernel.org/r/20230112234215.2630817-1-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 13f87983fb91454e4a534bb41b5b2b43afe97798 Author: Bart Van Assche Date: Thu Jan 12 15:42:15 2023 -0800 scsi: ufs: core: Enable DMA clustering All UFS host controllers support DMA clustering. Hence enable DMA clustering. Notes: - The max_segment_size parameter implements the 256 KiB limit for the PRDT. The dma_boundary parameter represents a boundary that must not be crossed by DMA scatter/gather lists. I'm not aware of any restrictions on DMA scatter/gather lists in the UFSHCI specification other than the 256 KiB limit for the PRDT and the 32-bit address restriction for controllers that only support 32-bits DMA. The latter restriction is already handled by ufshcd_set_dma_mask(). - Without patch "scsi: ufs: exynos: Fix the maximum segment size", this patch breaks support for the Exynos controller. The history of the dma_boundary parameter in the UFS driver is as follows: * The initial UFS driver did not set the dma_boundary parameter. * Commit 4dd4130a722f ("scsi: make sure all drivers set the use_clustering flag") set the .use_clustering flag. * Commit 4af14d113bcf ("scsi: remove the use_clustering flag") removed the use_clustering flag and set the dma_boundary parameter instead. Cc: Avri Altman Cc: Alim Akhtar Cc: Kiwoong Kim Signed-off-by: Bart Van Assche Acked-by: Adrian Hunter Reviewed-by: Alim Akhtar Signed-off-by: Martin K. Petersen commit 9a80bc5debf74b09f3a8bbc02cfba8d04e2048d0 Author: Bart Van Assche Date: Thu Jan 12 15:42:14 2023 -0800 scsi: ufs: exynos: Fix the maximum segment size Prepare for enabling DMA clustering and also for supporting PAGE_SIZE != 4096 by declaring explicitly that the maximum segment size is 4096 bytes for Exynos UFS host controllers. Add this code in exynos_ufs_hce_enable_notify() such that it happens after scsi_host_alloc() and before __scsi_init_queue() is called by the LUN scanning code. Cc: Alim Akhtar Cc: Kiwoong Kim Signed-off-by: Bart Van Assche Reviewed-by: Alim Akhtar Tested-by: Alim Akhtar Signed-off-by: Martin K. Petersen commit 86bd0c4a2a5dc4265884648cb92c681646509692 Author: Bart Van Assche Date: Thu Jan 12 15:42:13 2023 -0800 scsi: ufs: exynos: Fix DMA alignment for PAGE_SIZE != 4096 The Exynos UFS controller only supports scatter/gather list elements that are aligned on a 4 KiB boundary. Fix DMA alignment in case PAGE_SIZE != 4096. Rename UFSHCD_QUIRK_ALIGN_SG_WITH_PAGE_SIZE into UFSHCD_QUIRK_4KB_DMA_ALIGNMENT. Cc: Kiwoong Kim Fixes: 2b2bfc8aa519 ("scsi: ufs: Introduce a quirk to allow only page-aligned sg entries") Signed-off-by: Bart Van Assche Reviewed-by: Alim Akhtar Tested-by: Alim Akhtar Signed-off-by: Martin K. Petersen commit 5a5ef64f28edda2d62109e9dfc87a9212f06bf5b Author: Deepak R Varma Date: Thu Jan 12 11:56:46 2023 +0530 scsi: qla2xxx: Simplify if condition evaluation A logical evaluation of type (!A || A && B) can be simplified as (!A || B). Improvement by suggested by excluded_middle.cocci Coccinelel semantic patch. Link: https://lore.kernel.org/r/Y7+oJuah0MgEW0PQ@ubun2204.myguest.virtualbox.org Signed-off-by: Deepak R Varma Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 4fd62973739de61cf4c83b960db7d1824bd854a3 Author: Deepak R Varma Date: Mon Jan 9 02:08:24 2023 +0530 scsi: qla2xxx: Use a variable for repeated mem_size computation Use a variable to compute memory size to be allocated once instead of repeatedly computing it at different locations in the function. Issue identified using the array_size_dup Coccinelle semantic patch. Link: https://lore.kernel.org/r/Y7spwF8HTt0c0l7y@ubun2204.myguest.virtualbox.org Signed-off-by: Deepak R Varma Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 2aa0f83edb1c5a341f0aca209b0ecd74672fb3fa Author: Randy Dunlap Date: Mon Jan 16 23:01:51 2023 -0800 scsi: elx: libefc_sli: Use "/*" for non-kernel-doc comment Don't use "/**" to begin non-kernel-doc comments. Prevent a kernel-doc warning: drivers/scsi/elx/libefc_sli/sli4.c:13: warning: cannot understand function prototype: 'struct sli4_asic_entry_t sli4_asic_table[] = ' Signed-off-by: Randy Dunlap Cc: James Smart Cc: Ram Vegesna Cc: target-devel@vger.kernel.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Link: https://lore.kernel.org/r/20230117070151.29339-1-rdunlap@infradead.org Signed-off-by: Martin K. Petersen commit cf7066b97e27b2319af1ae2ef6889c4a1704312d Author: Joel Fernandes (Google) Date: Thu Jan 12 00:52:23 2023 +0000 rcu: Disable laziness if lazy-tracking says so During suspend, we see failures to suspend 1 in 300-500 suspends. Looking closer, it appears that asynchronous RCU callbacks are being queued as lazy even though synchronous callbacks are expedited. These delays appear to not be very welcome by the suspend/resume code as evidenced by these occasional suspend failures. This commit modifies call_rcu() to check if rcu_async_should_hurry(), which will return true if we are in suspend or in-kernel boot. [ paulmck: Alphabetize local variables. ] Ignoring the lazy hint makes the 3000 suspend/resume cycles pass reliably on a 12th gen 12-core Intel CPU, and there is some evidence that it also slightly speeds up boot performance. Fixes: 3cb278e73be5 ("rcu: Make call_rcu() lazy to save power") Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 41badc016c5b0c4a4be22292bf64ad9a3022a848 Author: Gustavo Sousa Date: Fri Jan 20 15:14:23 2023 -0300 drm/i915/gt: Convert PSS_MODE2 to multicast register That register became a multicast register as of Xe_HP and it is currently used only for DG2. Use a proper prefix since there could be usage of the same register for previous platforms in the future, which would require a different definition (i.e. using _MMIO). Note that, in its current state, the code does not cause functional problems, since the actual application of the workaround would implicitly use multicast mode. This fix is more toward consistency and being future-proof uses of this register outside of workarounds. v2: - Add paragraph noting that this change is for consistency and making the code future-proof. (Matt) Signed-off-by: Gustavo Sousa Cc: Matt Roper Cc: Matthew Atwood Fixes: 468a4e630c7d ("drm/i915/dg2: Introduce Wa_18018764978") Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20230120181423.90507-1-gustavo.sousa@intel.com commit 344f4030f6c50a9db2d03021884c4bf36191b53a Author: Samuel Holland Date: Thu Dec 29 15:53:19 2022 -0600 rtc: sun6i: Always export the internal oscillator On all variants of the hardware, the internal oscillator is one possible parent for the AR100 clock. It needs to be exported so we can model that relationship correctly in the devicetree. Fixes: c56afc1844d6 ("rtc: sun6i: Expose internal oscillator through device tree") Signed-off-by: Samuel Holland Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20221229215319.14145-1-samuel@sholland.org Signed-off-by: Alexandre Belloni commit c690048ed59b5f7df91899507f210ba6591c0d8f Author: Wadim Egorov Date: Wed Jan 11 17:34:04 2023 +0100 dt-bindings: rtc: Move rv3028 from trivial-rtc.yaml into own schema file Move RV3028 RTC bindings from trivial-rtc.yaml into microcrystal,rv3032.yaml. Signed-off-by: Wadim Egorov Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230111163404.3526248-2-w.egorov@phytec.de Signed-off-by: Alexandre Belloni commit 473a8ce756fdbd6e9fc0ffbf3ceb88394058763e Author: WANG Xuerui Date: Mon Jan 9 09:35:11 2023 +0800 dt-bindings: rtc: Add Loongson LS2X RTC support Document the binding for the LS2X RTC block found on the Loongson-2K SoC and the LS7A bridge, originally appearing on the Loongson-2H. Signed-off-by: WANG Xuerui Signed-off-by: Binbin Zhou Acked-by: Rob Herring Link: https://lore.kernel.org/r/0288efeb4209e4a49af07de6399045aaa00a970c.1673227292.git.zhoubinbin@loongson.cn Signed-off-by: Alexandre Belloni commit 8da765cca292a812988077ca8fbef8be151c2d0b Author: Krzysztof Kozlowski Date: Fri Jan 20 08:56:17 2023 +0100 dt-bindings: vendor-prefixes: document lineartechnology Document lineartechnology vendor prefix, already used in SPI dev. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230120075618.153664-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit 21fd06dc4a3440c8b7e7029b64952677843346b2 Author: Krzysztof Kozlowski Date: Thu Jan 19 14:10:33 2023 +0100 dt-bindings: drop type for operating-points-v2 The type for operating-points-v2 property is coming from dtschema (/schemas/opp/opp.yaml), so individual bindings can just use simple "true". Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230119131033.117324-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit 805e640e09b08f398a218f772f9bd7fe2ad1f647 Author: Rob Herring Date: Thu Jan 19 20:03:39 2023 -0600 dt-bindings: soc: socionext,uniphier-soc-glue: Make child node names fixed names The child nodes 'pinctrl', 'usb-hub', and 'clock-controller' in the socionext,uniphier-soc-glue binding are not patterns, but the full node name, so move them to 'properties'. As patterns, they were missing start and end anchors so any prefix or suffix was allowed. Fixes: 0611adff8b3a ("dt-bindings: soc: socionext: Add UniPhier SoC-glue logic") Reviewed-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/20230120020339.3223112-1-robh@kernel.org Signed-off-by: Rob Herring commit eae258edcb8705932c9e5c61a99f91d8235f688b Author: Doug Berger Date: Fri Jan 20 11:01:45 2023 -0800 rtc: brcmstb-waketimer: rename irq to wake_irq In preparation for adding a second interrupt to service RTC interrupts, the existing interrupt is renamed from the generic 'irq' to 'wake_irq' to more clearly convey its role. It is also converted to an unsigned int. Finally, the driver message that outputs the IRQ number when registered is removed since devm_rtc_register_device() already provides a report of registration and the interrupts can be found in /proc/interrupts. Signed-off-by: Doug Berger Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20230120190147.718976-5-opendmb@gmail.com Signed-off-by: Alexandre Belloni commit 516ae02c38ff3ae867f9b19fa050f78157e2bdae Author: Doug Berger Date: Fri Jan 20 11:01:44 2023 -0800 rtc: brcmstb-waketimer: compensate for lack of wktmr disable Since the WKTMR hardware block cannot be disabled it is necessary for the driver to accommodate for associated timing hazards. This commit targets the following possibilities: A possible race between clearing a wktmr event and the alarm expiring is made one-sided by setting the alarm to its maximum value before clearing the event. Programming alarm values close to the current time may not trigger events if the counter advances while the alarm is being programmed. After programming an alarm, a check is made to ensure that it is either in the future or an expiration event is pending. Signed-off-by: Doug Berger Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20230120190147.718976-4-opendmb@gmail.com Signed-off-by: Alexandre Belloni commit 2cd98b22c1443d1f2921a371baee658da184868e Author: Doug Berger Date: Fri Jan 20 11:01:43 2023 -0800 rtc: brcmstb-waketimer: non-functional code changes These changes are not intended to affect functionality, but simplify the source code. They are performed here to simplify review and reduce confusion with other changes in this set. Since set_alarm includes the alarm_irq_enable functionality call it directly from that function for simplicity (even though it does nothing at the moment). The order of the declarations is changed to prevent the need for a prototype. The function device_init_wakeup() is used to replace the functions device_set_wakeup_capable() and device_wakeup_enable() since it is equivalent. Signed-off-by: Doug Berger Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20230120190147.718976-3-opendmb@gmail.com Signed-off-by: Alexandre Belloni commit 90226f6b17a3edcb0bddaf2f16991861c99d6a15 Author: Doug Berger Date: Fri Jan 20 11:01:42 2023 -0800 rtc: brcmstb-waketimer: introduce WKTMR_ALARM_EVENT flag This commit defines bit 0 as the bit of interest within the BRCMSTB_WKTMR_EVENT register to make the implementation more readable. Signed-off-by: Doug Berger Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20230120190147.718976-2-opendmb@gmail.com Signed-off-by: Alexandre Belloni commit fd228eb0b482cf2e43847fab46d57ba7b06c6d48 Author: Tomi Valkeinen Date: Mon Jan 23 12:47:42 2023 +0200 drm: rcar-du: Stop accessing non-existent registers on gen4 The following registers do not exist on gen4, so we should not write them: DEF6Rm, DEF7Rm, DEF8Rm, ESCRn, OTARn. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 5fbc2f3b91d27e12b614947048764099570cbb55 Author: Tomi Valkeinen Date: Mon Jan 23 12:47:41 2023 +0200 drm: rcar-du: Fix setting a reserved bit in DPLLCR On H3 ES1.x two bits in DPLLCR are used to select the DU input dot clock source. These are bits 20 and 21 for DU2, and bits 22 and 23 for DU1. On non-ES1.x, only the higher bits are used (bits 21 and 23), and the lower bits are reserved and should be set to 0. The current code always sets the lower bits, even on non-ES1.x. For both DU1 and DU2, on all SoC versions, when writing zeroes to those bits the input clock is DCLKIN, and thus there's no difference between ES1.x and non-ES1.x. For DU1, writing 0b10 to the bits (or only writing the higher bit) results in using PLL0 as the input clock, so in this case there's also no difference between ES1.x and non-ES1.x. However, for DU2, writing 0b10 to the bits results in using PLL0 as the input clock on ES1.x, whereas on non-ES1.x it results in using PLL1. On ES1.x you need to write 0b11 to select PLL1. The current code always writes 0b11 to PLCS0 field to select PLL1 on all SoC versions, which works but causes an illegal (in the sense of not allowed by the documentation) write to a reserved bit field. To remove the illegal bit write on PLSC0 we need to handle the input dot clock selection differently for ES1.x and non-ES1.x. Add a new quirk, RCAR_DU_QUIRK_H3_ES1_PLL, for this. This way we can always set the bit 21 on PLSC0 when choosing the PLL as the source clock, and additionally set the bit 20 when on ES1.x. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 4f548bc48a2b4c4e54eecfddb6f7d24aa1b98768 Author: Tomi Valkeinen Date: Mon Jan 23 12:47:40 2023 +0200 drm: rcar-du: Add quirk for H3 ES1.x pclk workaround rcar_du_crtc.c does a soc_device_match() in rcar_du_crtc_set_display_timing() to find out if the SoC is H3 ES1.x, and if so, apply a workaround. We will need another H3 ES1.x check in the following patch, so rather than adding more soc_device_match() calls, let's add a rcar_du_device_info entry for the ES1, and a quirk flag, RCAR_DU_QUIRK_H3_ES1_PCLK_STABILITY, for the workaround. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit c0016f89c1d652e590349a4ccf2954407cb70150 Author: Koji Matsuoka Date: Mon Jan 23 12:47:39 2023 +0200 drm: rcar-du: lvds: Fix stop sequence According to hardware manual, LVDCR0 register must be cleared bit by bit when disabling LVDS. Signed-off-by: Koji Matsuoka Signed-off-by: LUU HOAI [tomi.valkeinen: simplified the code a bit] Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 723b197bbdf1e0adbab772b8e5e022c40db6a9fe Author: Alexander Aring Date: Thu Jan 12 17:18:49 2023 -0500 fs: dlm: remove unnecessary waker_up() calls The wake_up() is already handled inside of midcomms_node_reset() when switching the state to CLOSED state. So there is not need to call it after midcomms_node_reset() again. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit ef7ef015eb333c8954d7165d216ec0c774d7e4e4 Author: Alexander Aring Date: Thu Jan 12 17:18:48 2023 -0500 fs: dlm: move state change into else branch Currently we can switch at first into DLM_CLOSE_WAIT state and then do another state change if a condition is true. Instead of doing two state changes we handle the other state change inside an else branch of this condition. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 3186409711e64ed0a0fa767fad555a5e655022da Author: Alexander Aring Date: Thu Jan 12 17:18:47 2023 -0500 fs: dlm: remove newline in log_print There is an API difference between log_print() and other printk()s to put a newline or not. This one was introduced by mistake because log_print() adds a newline. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 11605353f27c23902b6fb993a57bd2f0baaff3b6 Author: Alexander Aring Date: Thu Jan 12 17:18:46 2023 -0500 fs: dlm: reduce the shutdown timeout to 5 secs When a shutdown is stuck, time out after 5 seconds instead of 3 minutes. After this timeout we try a forced shutdown. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 8786b095df02c1b881643146869a7d6f80411e6a Author: Heiner Kallweit Date: Wed Jan 18 22:55:12 2023 +0100 i2c: gpio: support write-only sda/scl w/o pull-up There are slave devices that understand I2C but have read-only SDA and SCL. Examples are FD650 7-segment LED controller and its derivatives. Typical board designs don't even have a pull-up for both pins. Handle the new attributes for write-only SDA and missing pull-up on SDA/SCL. For either pin the open-drain and has-no-pullup properties are mutually-exclusive, what is documented in the DT property documentation. We don't add an extra warning here because the open-drain properties are marked deprecated anyway. Signed-off-by: Heiner Kallweit [wsa: switched to device properties] Signed-off-by: Wolfram Sang commit 9dfee1487c271b7904e38dea5bed8f6e2d058dc3 Author: Heiner Kallweit Date: Wed Jan 18 22:54:03 2023 +0100 i2c: algo: bit: allow getsda to be NULL This is in preparation of supporting write-only SDA in i2c-gpio. Signed-off-by: Heiner Kallweit Signed-off-by: Wolfram Sang commit a00bb94c7bde3e470bbb517650293800cd20e271 Author: Heiner Kallweit Date: Wed Jan 18 22:51:58 2023 +0100 dt-bindings: i2c: gpio: Add properties for dealing with write-only SDA/SCL w/o pullup There are slave devices that understand I2C but have read-only SDA and SCL. Examples are FD650 7-segment LED controller and its derivatives. Typical board designs don't even have a pull-up for both pins. Therefore add properties for not using open-drain. For write-only SCL we have a property already, add one for write-only SDA. Signed-off-by: Heiner Kallweit Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang commit 317dd6ba6ccaa5e7c24039955c39df84072d5166 Author: Alexander Aring Date: Thu Jan 12 17:18:45 2023 -0500 fs: dlm: make dlm sequence id more robust When joining a new lockspace, use a random number to initialize a sequence number used in messages. This makes it easier to detect sequence number mismatches in message replies during tests that repeatedly join and leave a lockspace. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit f531ecf71a70d3dce5a36ebcd6b27078a1e86be8 Author: Luca Weiss Date: Fri Jan 20 14:13:44 2023 +0100 dt-bindings: i2c: qcom-cci: Document SM6350 compatible Document the compatible for the CCI block found on SM6350 SoC. Acked-by: Krzysztof Kozlowski Signed-off-by: Luca Weiss Signed-off-by: Wolfram Sang commit b8b750e0c99f39223115f2672ac4cfa96ecb9edd Author: Alexander Aring Date: Thu Jan 12 17:18:44 2023 -0500 fs: dlm: wait until all midcomms nodes detect version The current dlm version detection is very complex due to backwards compatablilty with earlier dlm protocol versions. It takes some time to detect if a peer node has a specific DLM version. If it's not detected, we just cut the socket connection. There could be cases where the local node has not detected the version yet, but the peer node has. In these cases, we are trying to shutdown the dlm connection with a FIN/ACK message exchange to be sure the other peer is ready to shutdown the connection on dlm application level. However this mechanism is only available on DLM protocol version 3.2 and we need to be sure the DLM version is detected before. To make it more robust we introduce a a "best effort" wait to wait for the version detection before shutdown the dlm connection. This need to be done before the kthread recoverd for recovery handling is stopped, because recovery handling will trigger enough messages to have a version detection going on. It is a corner case which was detected by modprobe dlm_locktroture module and rmmod dlm_locktorture module directly afterwards (in a looping behaviour). In practice probably nobody would leave a lockspace immediately after joining it. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 89835b064fe7421a60e40770c27d38024190a0c8 Author: Alexander Aring Date: Thu Jan 12 17:18:43 2023 -0500 fs: dlm: ignore unexpected non dlm opts msgs This patch ignores unexpected RCOM_NAMES/RCOM_STATUS messages. To be backwards compatible, those messages are not part of the new reliable DLM OPTS encapsulation header, and have their own retransmit handling using sequence number matching When we get unexpected non dlm opts messages, we should allow them and let RCOM message handling filter them out using sequence numbers. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 54fbe0c15d9a8072e2db7f6765f50c995834e2d7 Author: Alexander Aring Date: Thu Jan 12 17:18:42 2023 -0500 fs: dlm: bring back previous shutdown handling This patch mostly reverts commit 4f567acb0b86 ("fs: dlm: remove socket shutdown handling"). There can be situations where the dlm midcomms nodes hash and lowcomms connection hash are not equal, but we need to guarantee that the lowcomms are all closed on a last release of a dlm lockspace, when a shutdown is invoked. This patch guarantees that we always close all sockets managed by the lowcomms connection hash, and calls shutdown for the last message sent. This ensures we don't cut the socket, which could cause the peer to get a connection reset. In future we should try to merge the midcomms/lowcomms hashes into one hash and not handle both in separate hashes. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 00908b3388255fc1d3782b744d07f327712f401f Author: Alexander Aring Date: Thu Jan 12 17:10:37 2023 -0500 fs: dlm: send FIN ack back in right cases This patch moves to send a ack back for receiving a FIN message only when we are in valid states. In other cases and there might be a sender waiting for a ack we just let it timeout at the senders time and hopefully all other cleanups will remove the FIN message on their sending queue. As an example we should never send out an ACK being in LAST_ACK state or we cannot assume a working socket communication when we are in CLOSED state. Cc: stable@vger.kernel.org Fixes: 489d8e559c65 ("fs: dlm: add reliable connection if reconnect") Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit a58496361802070996f9bd76e941d109c4a85ebd Author: Alexander Aring Date: Thu Jan 12 17:10:36 2023 -0500 fs: dlm: move sending fin message into state change handling This patch moves the send fin handling, which should appear in a specific state change, into the state change handling while the per node state_lock is held. I experienced issues with other messages because we changed the state and a fin message was sent out in a different state. Cc: stable@vger.kernel.org Fixes: 489d8e559c65 ("fs: dlm: add reliable connection if reconnect") Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 15c63db8e86a72e0d5cfb9bf0cd1870e39a3e5fe Author: Alexander Aring Date: Thu Jan 12 17:10:35 2023 -0500 fs: dlm: don't set stop rx flag after node reset Similar to the stop tx flag, the rx flag should warn about a dlm message being received at DLM_FIN state change, when we are assuming no other dlm application messages. If we receive a FIN message and we are in the state DLM_FIN_WAIT2 we call midcomms_node_reset() which puts the midcomms node into DLM_CLOSED state. Afterwards we should not set the DLM_NODE_FLAG_STOP_RX flag any more. This patch changes the setting DLM_NODE_FLAG_STOP_RX in those state changes when we receive a FIN message and we assume there will be no other dlm application messages received until we hit DLM_CLOSED state. Cc: stable@vger.kernel.org Fixes: 489d8e559c65 ("fs: dlm: add reliable connection if reconnect") Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit ea403bb7b3151aed007220b9dd4acd1763c33dd4 Merge: 7525daeefc8c2 a4d325ae461c5 Author: Daniel Borkmann Date: Mon Jan 23 20:53:02 2023 +0100 Merge branch 'libbpf-extend-arguments-tracing' Andrii Nakryiko says: ==================== This patch set fixes and extends libbpf's bpf_tracing.h support for tracing arguments of kprobes/uprobes, and syscall as a special case. Depending on the architecture, anywhere between 3 and 8 arguments can be passed to a function in registers (so relevant to kprobes and uprobes), but before this patch set libbpf's macros in bpf_tracing.h only supported up to 5 arguments, which is limiting in practice. This patch set extends bpf_tracing.h to support up to 8 arguments, if architecture allows. This includes explicit PT_REGS_PARMx() macro family, as well as BPF_KPROBE() macro. Now, with tracing syscall arguments situation is sometimes quite different. For a lot of architectures syscall argument passing through registers differs from function call sequence at least a little. For i386 it differs *a lot*. This patch set addresses this issue across all currently supported architectures and hopefully fixes existing issues. syscall(2) manpage defines that either 6 or 7 arguments can be supported, depending on architecture, so libbpf defines 6 or 7 registers per architecture to be used to fetch syscall arguments. Also, BPF_UPROBE and BPF_URETPROBE are introduced as part of this patch set. They are aliases for BPF_KPROBE and BPF_KRETPROBE (as mechanics of argument fetching of kernel functions and user-space functions are identical), but it allows BPF users to have less confusing BPF-side code when working with uprobes. For both sets of changes selftests are extended to test these new register definitions to architecture-defined limits. Unfortunately I don't have ability to test it on all architectures, and BPF CI only tests 3 architecture (x86-64, arm64, and s390x), so it would be greatly appreciated if people with access to architectures other than above 3 helped review and test changes. ==================== Signed-off-by: Daniel Borkmann commit a4d325ae461c5d8e3c5e222082e0b5755b7b9b7f Author: Andrii Nakryiko Date: Fri Jan 20 12:09:14 2023 -0800 libbpf: Clean up now not needed __PT_PARM{1-6}_SYSCALL_REG defaults Each architecture supports at least 6 syscall argument registers, so now that specs for each architecture is defined in bpf_tracing.h, remove unnecessary macro overrides, which previously were required to keep existing BPF_KSYSCALL() uses compiling and working. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230120200914.3008030-26-andrii@kernel.org commit 92dc5cdfc1131befa061cab8ed772c7bf8bfb2db Author: Andrii Nakryiko Date: Fri Jan 20 12:09:13 2023 -0800 selftests/bpf: Add 6-argument syscall tracing test Turns out splice() is one of the syscalls that's using current maximum number of arguments (six). This is perfect for testing, so extend bpf_syscall_macro selftest to also trace splice() syscall, using BPF_KSYSCALL() macro. This makes sure all the syscall argument register definitions are correct. Suggested-by: Ilya Leoshkevich Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Tested-by: Alan Maguire # arm64 Tested-by: Ilya Leoshkevich # s390x Link: https://lore.kernel.org/bpf/20230120200914.3008030-25-andrii@kernel.org commit 12a299f0b5c746c244bd06fe6a2b3672e9036e83 Author: Andrii Nakryiko Date: Fri Jan 20 12:09:12 2023 -0800 libbpf: Define loongarch syscall regs spec in bpf_tracing.h Define explicit table of registers used for syscall argument passing. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230120200914.3008030-24-andrii@kernel.org commit 2cf802737fb9cbc258ec65b15c06bd226881ae88 Author: Andrii Nakryiko Date: Fri Jan 20 12:09:11 2023 -0800 libbpf: Define arc syscall regs spec in bpf_tracing.h Define explicit table of registers used for syscall argument passing. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230120200914.3008030-23-andrii@kernel.org commit a0426216a32004bbb1c96dbffaeca7ac261960cf Author: Andrii Nakryiko Date: Fri Jan 20 12:09:10 2023 -0800 libbpf: Define riscv syscall regs spec in bpf_tracing.h Define explicit table of registers used for syscall argument passing. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Tested-by: Pu Lehui # RISC-V Link: https://lore.kernel.org/bpf/20230120200914.3008030-22-andrii@kernel.org commit 377c15b1a2cd6e38db86be7a721c8311d8a73836 Author: Andrii Nakryiko Date: Fri Jan 20 12:09:09 2023 -0800 libbpf: Define sparc syscall regs spec in bpf_tracing.h Define explicit table of registers used for syscall argument passing. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230120200914.3008030-21-andrii@kernel.org commit c1cc01a2d1d1d94079fa87ba44c34bd7bdf9175d Author: Andrii Nakryiko Date: Fri Jan 20 12:09:08 2023 -0800 libbpf: Define powerpc syscall regs spec in bpf_tracing.h Define explicit table of registers used for syscall argument passing. Note that 7th arg is supported on 32-bit powerpc architecture, by not on powerpc64. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230120200914.3008030-20-andrii@kernel.org commit cfd0bbe91536095f5491e9ac71fb11304dd87dd2 Author: Andrii Nakryiko Date: Fri Jan 20 12:09:07 2023 -0800 libbpf: Define mips syscall regs spec in bpf_tracing.h Define explicit table of registers used for syscall argument passing. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230120200914.3008030-19-andrii@kernel.org commit 3488ea0584bb3888e2fcbe2d2ff738ff173d91ab Author: Andrii Nakryiko Date: Fri Jan 20 12:09:06 2023 -0800 libbpf: Define arm64 syscall regs spec in bpf_tracing.h Define explicit table of registers used for syscall argument passing. We need PT_REGS_PARM1_[CORE_]SYSCALL macros overrides, similarly to s390x, due to orig_x0 not being present in UAPI's pt_regs, so we need to utilize BPF CO-RE and custom pt_regs___arm64 definition. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Tested-by: Alan Maguire # arm64 Link: https://lore.kernel.org/bpf/20230120200914.3008030-18-andrii@kernel.org commit 3a95c42d65d5c8d836bc7f881b3ffd5229d1b73a Author: Andrii Nakryiko Date: Fri Jan 20 12:09:05 2023 -0800 libbpf: Define arm syscall regs spec in bpf_tracing.h Define explicit table of registers used for syscall argument passing. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230120200914.3008030-17-andrii@kernel.org commit e82b96a3a99f9a04566305490e88efef80a80247 Author: Andrii Nakryiko Date: Fri Jan 20 12:09:04 2023 -0800 libbpf: Define s390x syscall regs spec in bpf_tracing.h Define explicit table of registers used for syscall argument passing. Note that we need custom overrides for PT_REGS_PARM1_[CORE_]SYSCALL macros due to the need to use BPF CO-RE and custom local pt_regs definitions to fetch orig_gpr2, storing 1st argument. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Tested-by: Ilya Leoshkevich # s390x Acked-by: Ilya Leoshkevich Link: https://lore.kernel.org/bpf/20230120200914.3008030-16-andrii@kernel.org commit ff00f9cbd2ddee60cd1542e58631638a5996b05f Author: Andrii Nakryiko Date: Fri Jan 20 12:09:03 2023 -0800 libbpf: Define i386 syscall regs spec in bpf_tracing.h Define explicit table of registers used for syscall argument passing. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230120200914.3008030-15-andrii@kernel.org commit d21fbceedd90ccc11775ca583889d21d3b66d88d Author: Andrii Nakryiko Date: Fri Jan 20 12:09:02 2023 -0800 libbpf: Define x86-64 syscall regs spec in bpf_tracing.h Define explicit table of registers used for syscall argument passing. Remove now unnecessary overrides of PT_REGS_PARM5_[CORE_]SYSCALL macros. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230120200914.3008030-14-andrii@kernel.org commit 8ccabeef913311eb54599abc52a6bcfc3e7bf1d8 Author: Andrii Nakryiko Date: Fri Jan 20 12:09:01 2023 -0800 libbpf: Improve syscall tracing support in bpf_tracing.h Set up generic support in bpf_tracing.h for up to 7 syscall arguments tracing with BPF_KSYSCALL, which seems to be the limit according to syscall(2) manpage. Also change the way that syscall convention is specified to be more explicit. Subsequent patches will adjust and define proper per-architecture syscall conventions. __PT_PARM1_SYSCALL_REG through __PT_PARM6_SYSCALL_REG is added temporarily to keep everything working before each architecture has syscall reg tables defined. They will be removed afterwards. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Tested-by: Alan Maguire # arm64 Link: https://lore.kernel.org/bpf/20230120200914.3008030-13-andrii@kernel.org commit bc72742bebec8e0766af1e07e13169a873f9119c Author: Andrii Nakryiko Date: Fri Jan 20 12:09:00 2023 -0800 selftests/bpf: Validate arch-specific argument registers limits Update uprobe_autoattach selftest to validate architecture-specific argument passing through registers. Use new BPF_UPROBE and BPF_URETPROBE, and construct both BPF-side and user-space side in such a way that for different architectures we are fetching and checking different number of arguments, matching architecture-specific limit of how many registers are available for argument passing. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Tested-by: Alan Maguire # arm64 Tested-by: Ilya Leoshkevich # s390x Link: https://lore.kernel.org/bpf/20230120200914.3008030-12-andrii@kernel.org commit ac4afd6e6fa4d4f9a0ab6ca76f4953545e4da7e6 Author: Andrii Nakryiko Date: Fri Jan 20 12:08:59 2023 -0800 libbpf: Add BPF_UPROBE and BPF_URETPROBE macro aliases Add BPF_UPROBE and BPF_URETPROBE macros, aliased to BPF_KPROBE and BPF_KRETPROBE, respectively. This makes uprobe-based BPF program code much less confusing, especially to people new to tracing, at no cost in terms of maintainability. We'll use this macro in selftests in subsequent patch. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230120200914.3008030-11-andrii@kernel.org commit 55ff00d5393b6d6f6cb90530aac546f5aa52456d Author: Andrii Nakryiko Date: Fri Jan 20 12:08:58 2023 -0800 libbpf: Complete LoongArch (loongarch) spec in bpf_tracing.h Add PARM6 through PARM8 definitions. Add kernel docs link describing ABI for LoongArch. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230120200914.3008030-10-andrii@kernel.org commit 0ac086567916e189c7db71da7339e20b5747f8ac Author: Andrii Nakryiko Date: Fri Jan 20 12:08:57 2023 -0800 libbpf: Fix and complete ARC spec in bpf_tracing.h Add PARM6 through PARM8 definitions. Also fix frame pointer (FP) register definition. Also leave a link to where to find ABI spec. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230120200914.3008030-9-andrii@kernel.org commit b13ed8ca7fba3d3e61621be021fdccd5c44b2634 Author: Andrii Nakryiko Date: Fri Jan 20 12:08:56 2023 -0800 libbpf: Complete riscv arch spec in bpf_tracing.h Add PARM6 through PARM8 definitions for RISC V (riscv) arch. Leave the link for ABI doc for future reference. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Tested-by: Pu Lehui # RISC-V Link: https://lore.kernel.org/bpf/20230120200914.3008030-8-andrii@kernel.org commit 7f60f5d85e29441b297bf64f0236c70e624a9108 Author: Andrii Nakryiko Date: Fri Jan 20 12:08:55 2023 -0800 libbpf: Complete sparc spec in bpf_tracing.h Add PARM6 definition for sparc architecture. Leave a link to calling convention documentation. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230120200914.3008030-7-andrii@kernel.org commit 2eb2be30b8dac137d9a21c6125a68993b9dc8a00 Author: Andrii Nakryiko Date: Fri Jan 20 12:08:54 2023 -0800 libbpf: Complete powerpc spec in bpf_tracing.h Add definitions of PARM6 through PARM8 for powerpc architecture. Add also a link to a functiona call sequence documentation for future reference. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230120200914.3008030-6-andrii@kernel.org commit 1222445a5bf622b37a9bb16c7ad0148e2a21eb0d Author: Andrii Nakryiko Date: Fri Jan 20 12:08:53 2023 -0800 libbpf: Complete mips spec in bpf_tracing.h Add registers for PARM6 through PARM8. Add a link to an ABI. We don't distinguish between O32, N32, and N64, so document that we assume N64 right now. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230120200914.3008030-5-andrii@kernel.org commit 1dac40ac8742122a5f12b08f8073d03d6915f9ef Author: Andrii Nakryiko Date: Fri Jan 20 12:08:52 2023 -0800 libbpf: Fix arm and arm64 specs in bpf_tracing.h Remove invalid support for PARM5 on 32-bit arm, as per ABI. Add three more argument registers for arm64. Also leave links to ABI specs for future reference. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Tested-by: Alan Maguire # arm64 Link: https://lore.kernel.org/bpf/20230120200914.3008030-4-andrii@kernel.org commit 013290329a0707c9900f86a743dce70d6c345330 Author: Andrii Nakryiko Date: Fri Jan 20 12:08:51 2023 -0800 libbpf: Add 6th argument support for x86-64 in bpf_tracing.h Add r9 as register containing 6th argument on x86-64 architecture, as per its ABI. Add also a link to a page describing ABI for easier future reference. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230120200914.3008030-3-andrii@kernel.org commit 3c59623d82947c8bfcc2fbf34c5eab02493b3b28 Author: Andrii Nakryiko Date: Fri Jan 20 12:08:50 2023 -0800 libbpf: Add support for fetching up to 8 arguments in kprobes Add BPF_KPROBE() and PT_REGS_PARMx() support for up to 8 arguments, if target architecture supports this. Currently all architectures are limited to only 5 register-placed arguments, which is limiting even on x86-64. This patch adds generic macro machinery to support up to 8 arguments both when explicitly fetching it from pt_regs through PT_REGS_PARMx() macros, as well as more ergonomic access in BPF_KPROBE(). Also, for i386 architecture we now don't have to define fake PARM4 and PARM5 definitions, they will be generically substituted, just like for PARM6 through PARM8. Subsequent patches will fill out architecture-specific definitions, where appropriate. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Tested-by: Alan Maguire # arm64 Tested-by: Ilya Leoshkevich # s390x Link: https://lore.kernel.org/bpf/20230120200914.3008030-2-andrii@kernel.org commit d17c1a3d6a091afdc3b65116faa98d3363082f6a Author: Dinh Nguyen Date: Mon Jan 23 13:08:23 2023 -0600 arm64: dts: stratix10: add i2c pins for pinctrl Add the I2C pins definition to the Stratix10 devkit. This allows for the I2C driver to use pinctrl on the pins to allow for GPIO recovery. Signed-off-by: Dinh Nguyen --- v2: remove underscores in node names commit 21ab7031cbff8c6b6f608234e18ffe0473e98f9d Author: Dinh Nguyen Date: Mon Jan 23 12:12:38 2023 -0600 arm64: dts: add pinctrl-single property for Stratix10/Agilex The Stratix10/Agilex has a pin control IP that can make use of the pinctrl-single driver. Add the pinctrl-single dts property for the Stratix10/Agilex platforms. Signed-off-by: Dinh Nguyen --- v2: no changes commit 7525daeefc8c20902bac63f89603096c76808fe0 Author: David Vernet Date: Thu Jan 19 20:18:44 2023 -0600 selftests/bpf: Use __failure macro in task kfunc testsuite In commit 537c3f66eac1 ("selftests/bpf: add generic BPF program tester-loader"), a new mechanism was added to the BPF selftest framework to allow testsuites to use macros to define expected failing testcases. This allows any testsuite which tests verification failure to remove a good amount of boilerplate code. This patch updates the task_kfunc selftest suite to use these new macros. Signed-off-by: David Vernet Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20230120021844.3048244-1-void@manifault.com commit 2f802af21f09aeb75651b582079ef9b10b507b1a Author: Krzysztof Kozlowski Date: Mon Jan 23 16:15:21 2023 +0100 ARM: dts: socfpga: align UART node name with bindings Bindings expect UART/serial node names to be "serial". Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 164272113b685927126c938b4a9cbd2075eb15ee Author: Alexander Aring Date: Thu Jan 12 17:10:34 2023 -0500 fs: dlm: fix race setting stop tx flag This patch sets the stop tx flag before we commit the dlm message. This flag will report about unexpected transmissions after we send the DLM_FIN message out, which should be the last message sent. When we commit the dlm fin message, it could be that we already got an ack back and the CLOSED state change already happened. We should not set this flag when we are in CLOSED state. To avoid this race we simply set the tx flag before the state change can be in progress by moving it before dlm_midcomms_commit_mhandle(). Cc: stable@vger.kernel.org Fixes: 489d8e559c65 ("fs: dlm: add reliable connection if reconnect") Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 7354fa4ef697191effedc2ae9a8293427708bbf5 Author: Alexander Aring Date: Thu Jan 12 17:10:33 2023 -0500 fs: dlm: be sure to call dlm_send_queue_flush() If we release a midcomms node structure, there should be nothing left inside the dlm midcomms send queue. However, sometimes this is not true because I believe some DLM_FIN message was not acked... if we run into a shutdown timeout, then we should be sure there is no pending send dlm message inside this queue when releasing midcomms node structure. Cc: stable@vger.kernel.org Fixes: 489d8e559c65 ("fs: dlm: add reliable connection if reconnect") Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 724b6bab0d75f1dc01fdfbf7fe8d4217a5cb90ba Author: Alexander Aring Date: Thu Jan 12 17:10:32 2023 -0500 fs: dlm: fix use after free in midcomms commit While working on processing dlm message in softirq context I experienced the following KASAN use-after-free warning: [ 151.760477] ================================================================== [ 151.761803] BUG: KASAN: use-after-free in dlm_midcomms_commit_mhandle+0x19d/0x4b0 [ 151.763414] Read of size 4 at addr ffff88811a980c60 by task lock_torture/1347 [ 151.765284] CPU: 7 PID: 1347 Comm: lock_torture Not tainted 6.1.0-rc4+ #2828 [ 151.766778] Hardware name: Red Hat KVM/RHEL-AV, BIOS 1.16.0-3.module+el8.7.0+16134+e5908aa2 04/01/2014 [ 151.768726] Call Trace: [ 151.769277] [ 151.769748] dump_stack_lvl+0x5b/0x86 [ 151.770556] print_report+0x180/0x4c8 [ 151.771378] ? kasan_complete_mode_report_info+0x7c/0x1e0 [ 151.772241] ? dlm_midcomms_commit_mhandle+0x19d/0x4b0 [ 151.773069] kasan_report+0x93/0x1a0 [ 151.773668] ? dlm_midcomms_commit_mhandle+0x19d/0x4b0 [ 151.774514] __asan_load4+0x7e/0xa0 [ 151.775089] dlm_midcomms_commit_mhandle+0x19d/0x4b0 [ 151.775890] ? create_message.isra.29.constprop.64+0x57/0xc0 [ 151.776770] send_common+0x19f/0x1b0 [ 151.777342] ? remove_from_waiters+0x60/0x60 [ 151.778017] ? lock_downgrade+0x410/0x410 [ 151.778648] ? __this_cpu_preempt_check+0x13/0x20 [ 151.779421] ? rcu_lockdep_current_cpu_online+0x88/0xc0 [ 151.780292] _convert_lock+0x46/0x150 [ 151.780893] convert_lock+0x7b/0xc0 [ 151.781459] dlm_lock+0x3ac/0x580 [ 151.781993] ? 0xffffffffc0540000 [ 151.782522] ? torture_stop+0x120/0x120 [dlm_locktorture] [ 151.783379] ? dlm_scan_rsbs+0xa70/0xa70 [ 151.784003] ? preempt_count_sub+0xd6/0x130 [ 151.784661] ? is_module_address+0x47/0x70 [ 151.785309] ? torture_stop+0x120/0x120 [dlm_locktorture] [ 151.786166] ? 0xffffffffc0540000 [ 151.786693] ? lockdep_init_map_type+0xc3/0x360 [ 151.787414] ? 0xffffffffc0540000 [ 151.787947] torture_dlm_lock_sync.isra.3+0xe9/0x150 [dlm_locktorture] [ 151.789004] ? torture_stop+0x120/0x120 [dlm_locktorture] [ 151.789858] ? 0xffffffffc0540000 [ 151.790392] ? lock_torture_cleanup+0x20/0x20 [dlm_locktorture] [ 151.791347] ? delay_tsc+0x94/0xc0 [ 151.791898] torture_ex_iter+0xc3/0xea [dlm_locktorture] [ 151.792735] ? torture_start+0x30/0x30 [dlm_locktorture] [ 151.793606] lock_torture+0x177/0x270 [dlm_locktorture] [ 151.794448] ? torture_dlm_lock_sync.isra.3+0x150/0x150 [dlm_locktorture] [ 151.795539] ? lock_torture_stats+0x80/0x80 [dlm_locktorture] [ 151.796476] ? do_raw_spin_lock+0x11e/0x1e0 [ 151.797152] ? mark_held_locks+0x34/0xb0 [ 151.797784] ? _raw_spin_unlock_irqrestore+0x30/0x70 [ 151.798581] ? __kthread_parkme+0x79/0x110 [ 151.799246] ? trace_preempt_on+0x2a/0xf0 [ 151.799902] ? __kthread_parkme+0x79/0x110 [ 151.800579] ? preempt_count_sub+0xd6/0x130 [ 151.801271] ? __kasan_check_read+0x11/0x20 [ 151.801963] ? __kthread_parkme+0xec/0x110 [ 151.802630] ? lock_torture_stats+0x80/0x80 [dlm_locktorture] [ 151.803569] kthread+0x192/0x1d0 [ 151.804104] ? kthread_complete_and_exit+0x30/0x30 [ 151.804881] ret_from_fork+0x1f/0x30 [ 151.805480] [ 151.806111] Allocated by task 1347: [ 151.806681] kasan_save_stack+0x26/0x50 [ 151.807308] kasan_set_track+0x25/0x30 [ 151.807920] kasan_save_alloc_info+0x1e/0x30 [ 151.808609] __kasan_slab_alloc+0x63/0x80 [ 151.809263] kmem_cache_alloc+0x1ad/0x830 [ 151.809916] dlm_allocate_mhandle+0x17/0x20 [ 151.810590] dlm_midcomms_get_mhandle+0x96/0x260 [ 151.811344] _create_message+0x95/0x180 [ 151.811994] create_message.isra.29.constprop.64+0x57/0xc0 [ 151.812880] send_common+0x129/0x1b0 [ 151.813467] _convert_lock+0x46/0x150 [ 151.814074] convert_lock+0x7b/0xc0 [ 151.814648] dlm_lock+0x3ac/0x580 [ 151.815199] torture_dlm_lock_sync.isra.3+0xe9/0x150 [dlm_locktorture] [ 151.816258] torture_ex_iter+0xc3/0xea [dlm_locktorture] [ 151.817129] lock_torture+0x177/0x270 [dlm_locktorture] [ 151.817986] kthread+0x192/0x1d0 [ 151.818518] ret_from_fork+0x1f/0x30 [ 151.819369] Freed by task 1336: [ 151.819890] kasan_save_stack+0x26/0x50 [ 151.820514] kasan_set_track+0x25/0x30 [ 151.821128] kasan_save_free_info+0x2e/0x50 [ 151.821812] __kasan_slab_free+0x107/0x1a0 [ 151.822483] kmem_cache_free+0x204/0x5e0 [ 151.823152] dlm_free_mhandle+0x18/0x20 [ 151.823781] dlm_mhandle_release+0x2e/0x40 [ 151.824454] rcu_core+0x583/0x1330 [ 151.825047] rcu_core_si+0xe/0x20 [ 151.825594] __do_softirq+0xf4/0x5c2 [ 151.826450] Last potentially related work creation: [ 151.827238] kasan_save_stack+0x26/0x50 [ 151.827870] __kasan_record_aux_stack+0xa2/0xc0 [ 151.828609] kasan_record_aux_stack_noalloc+0xb/0x20 [ 151.829415] call_rcu+0x4c/0x760 [ 151.829954] dlm_mhandle_delete+0x97/0xb0 [ 151.830718] dlm_process_incoming_buffer+0x2fc/0xb30 [ 151.831524] process_dlm_messages+0x16e/0x470 [ 151.832245] process_one_work+0x505/0xa10 [ 151.832905] worker_thread+0x67/0x650 [ 151.833507] kthread+0x192/0x1d0 [ 151.834046] ret_from_fork+0x1f/0x30 [ 151.834900] The buggy address belongs to the object at ffff88811a980c30 which belongs to the cache dlm_mhandle of size 88 [ 151.836894] The buggy address is located 48 bytes inside of 88-byte region [ffff88811a980c30, ffff88811a980c88) [ 151.839007] The buggy address belongs to the physical page: [ 151.839904] page:0000000076cf5d62 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11a980 [ 151.841378] flags: 0x8000000000000200(slab|zone=2) [ 151.842141] raw: 8000000000000200 0000000000000000 dead000000000122 ffff8881089b43c0 [ 151.843401] raw: 0000000000000000 0000000000220022 00000001ffffffff 0000000000000000 [ 151.844640] page dumped because: kasan: bad access detected [ 151.845822] Memory state around the buggy address: [ 151.846602] ffff88811a980b00: fb fb fb fb fc fc fc fc fa fb fb fb fb fb fb fb [ 151.847761] ffff88811a980b80: fb fb fb fc fc fc fc fa fb fb fb fb fb fb fb fb [ 151.848921] >ffff88811a980c00: fb fb fc fc fc fc fa fb fb fb fb fb fb fb fb fb [ 151.850076] ^ [ 151.851085] ffff88811a980c80: fb fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb [ 151.852269] ffff88811a980d00: fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb fc [ 151.853428] ================================================================== [ 151.855618] Disabling lock debugging due to kernel taint It is accessing a mhandle in dlm_midcomms_commit_mhandle() and the mhandle was freed by a call_rcu() call in dlm_process_incoming_buffer(), dlm_mhandle_delete(). It looks like it was freed because an ack of this message was received. There is a short race between committing the dlm message to be transmitted and getting an ack back. If the ack is faster than returning from dlm_midcomms_commit_msg_3_2(), then we run into a use-after free because we still need to reference the mhandle when calling srcu_read_unlock(). To avoid that, we don't allow that mhandle to be freed between dlm_midcomms_commit_msg_3_2() and srcu_read_unlock() by using rcu read lock. We can do that because mhandle is protected by rcu handling. Cc: stable@vger.kernel.org Fixes: 489d8e559c65 ("fs: dlm: add reliable connection if reconnect") Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit aad633dc0cf90093998b1ae0ba9f19b5f1dab644 Author: Alexander Aring Date: Thu Jan 12 17:10:31 2023 -0500 fs: dlm: start midcomms before scand The scand kthread can send dlm messages out, especially dlm remove messages to free memory for unused rsb on other nodes. To send out dlm messages, midcomms must be initialized. This patch moves the midcomms start before scand is started. Cc: stable@vger.kernel.org Fixes: e7fd41792fc0 ("[DLM] The core of the DLM for GFS2/CLVM") Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 84798f2849942bb5e8817417adfdfa6241df2835 Author: Yi Liu Date: Fri Jan 20 04:20:40 2023 -0800 iommufd: Add three missing structures in ucmd_buffer struct iommu_ioas_copy, struct iommu_option and struct iommu_vfio_ioas are missed in ucmd_buffer. Although they are smaller than the size of ucmd_buffer, it is safer to list them in ucmd_buffer explicitly. Fixes: aad37e71d5c4 ("iommufd: IOCTLs for the io_pagetable") Fixes: d624d6652a65 ("iommufd: vfio container FD ioctl compatibility") Link: https://lore.kernel.org/r/20230120122040.280219-1-yi.l.liu@intel.com Signed-off-by: Yi Liu Signed-off-by: Jason Gunthorpe commit 9fabbdf338b701f2d763d9edbc3e82ce1e7fa1b4 Author: Nicolin Chen Date: Thu Jan 19 23:42:04 2023 -0800 selftests: iommu: Fix test_cmd_destroy_access() call in user_copy The test_cmd_destroy_access() should end with a semicolon, so add one. There is a test_ioctl_destroy(ioas_id) following already, so drop one. Fixes: 57f0988706fe ("iommufd: Add a selftest") Link: https://lore.kernel.org/r/20230120074204.1368-1-nicolinc@nvidia.com Signed-off-by: Nicolin Chen Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit 7658aeda334a624634b2ed0538feee374e24e1e3 Author: Yishai Hadas Date: Sun Jan 8 17:44:27 2023 +0200 vfio/platform: Use GFP_KERNEL_ACCOUNT for userspace persistent allocations Use GFP_KERNEL_ACCOUNT for userspace persistent allocations. The GFP_KERNEL_ACCOUNT option lets the memory allocator know that this is untrusted allocation triggered from userspace and should be a subject of kmem accounting, and as such it is controlled by the cgroup mechanism. Signed-off-by: Yishai Hadas Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20230108154427.32609-7-yishaih@nvidia.com Signed-off-by: Alex Williamson commit 4a6c971a06ffc1d51bd26c03051d52c2e5977878 Author: Yishai Hadas Date: Sun Jan 8 17:44:26 2023 +0200 vfio/fsl-mc: Use GFP_KERNEL_ACCOUNT for userspace persistent allocations Use GFP_KERNEL_ACCOUNT for userspace persistent allocations. The GFP_KERNEL_ACCOUNT option lets the memory allocator know that this is untrusted allocation triggered from userspace and should be a subject of kmem accounting, and as such it is controlled by the cgroup mechanism. Signed-off-by: Yishai Hadas Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20230108154427.32609-6-yishaih@nvidia.com Signed-off-by: Alex Williamson commit cb8285b89f2cf1db866f5c5aae5ce8db7aef41dd Author: Yishai Hadas Date: Sun Jan 8 17:44:25 2023 +0200 vfio/hisi: Use GFP_KERNEL_ACCOUNT for userspace persistent allocations Use GFP_KERNEL_ACCOUNT for userspace persistent allocations. The GFP_KERNEL_ACCOUNT option lets the memory allocator know that this is untrusted allocation triggered from userspace and should be a subject of kmem accounting, and as such it is controlled by the cgroup mechanism. Signed-off-by: Yishai Hadas Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20230108154427.32609-5-yishaih@nvidia.com Signed-off-by: Alex Williamson commit 0886196ca8810c5b1f5097b71c4bc0df40b10208 Author: Jason Gunthorpe Date: Sun Jan 8 17:44:24 2023 +0200 vfio: Use GFP_KERNEL_ACCOUNT for userspace persistent allocations Use GFP_KERNEL_ACCOUNT for userspace persistent allocations. The GFP_KERNEL_ACCOUNT option lets the memory allocator know that this is untrusted allocation triggered from userspace and should be a subject of kmem accounting, and as such it is controlled by the cgroup mechanism. The way to find the relevant allocations was for example to look at the close_device function and trace back all the kfrees to their allocations. Signed-off-by: Jason Gunthorpe Signed-off-by: Yishai Hadas Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20230108154427.32609-4-yishaih@nvidia.com Signed-off-by: Alex Williamson commit 83ff6095ecf8bafd095a921a2267227519f510f8 Author: Yishai Hadas Date: Sun Jan 8 17:44:23 2023 +0200 vfio/mlx5: Allow loading of larger images than 512 MB Allow loading of larger images than 512 MB by dropping the arbitrary hard-coded value that we have today and move to use the max device loading value which is for now 4GB. As part of that we move to use the GFP_KERNEL_ACCOUNT option upon allocating the persistent data of mlx5 and rely on the cgroup to provide the memory limit for the given user. The GFP_KERNEL_ACCOUNT option lets the memory allocator know that this is untrusted allocation triggered from userspace and should be a subject of kmem accounting, and as such it is controlled by the cgroup mechanism. Signed-off-by: Yishai Hadas Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20230108154427.32609-3-yishaih@nvidia.com Signed-off-by: Alex Williamson commit c9c4c070e0fe2551f82b20bbf14e4dbde88e573d Author: Yishai Hadas Date: Sun Jan 8 17:44:22 2023 +0200 vfio/mlx5: Fix UBSAN note Prevent calling roundup_pow_of_two() with value of 0 as it causes the below UBSAN note. Move this code and its few extra related lines to be called only when it's really applicable. UBSAN: shift-out-of-bounds in ./include/linux/log2.h:57:13 shift exponent 64 is too large for 64-bit type 'long unsigned int' CPU: 15 PID: 1639 Comm: live_migration Not tainted 6.1.0-rc4 #1116 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+0x45/0x59 ubsan_epilogue+0x5/0x36 __ubsan_handle_shift_out_of_bounds.cold+0x61/0xef ? lock_is_held_type+0x98/0x110 ? rcu_read_lock_sched_held+0x3f/0x70 mlx5vf_create_rc_qp.cold+0xe4/0xf2 [mlx5_vfio_pci] mlx5vf_start_page_tracker+0x769/0xcd0 [mlx5_vfio_pci] vfio_device_fops_unl_ioctl+0x63f/0x700 [vfio] __x64_sys_ioctl+0x433/0x9a0 do_syscall_64+0x3d/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd Fixes: 79c3cf279926 ("vfio/mlx5: Init QP based resources for dirty tracking") Signed-off-by: Yishai Hadas Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20230108154427.32609-2-yishaih@nvidia.com Signed-off-by: Alex Williamson commit 3232868133ea8e9a55a530d9c44c223e801d1bcd Author: Christoph Hellwig Date: Tue Jan 10 10:10:09 2023 +0100 vfio-mdev: remove an non-existing driver from vfio-mediated-device The nvidia mdev driver does not actually exist anywhere in the tree. Signed-off-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Reviewed-by: Tony Krowiak Link: https://lore.kernel.org/r/20230110091009.474427-5-hch@lst.de Signed-off-by: Alex Williamson commit 0030d7d6ce319c32551395ebc00c533f50a0b0fe Author: Christoph Hellwig Date: Tue Jan 10 10:10:08 2023 +0100 vfio-mdev: move the mtty usage documentation Move the documentation on how to use mtty to samples/vfio-mdev/README.rst as it is in no way related to the vfio API. This matches how the bpf and pktgen samples are documented. Signed-off-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20230110091009.474427-4-hch@lst.de Signed-off-by: Alex Williamson commit 8bf8c5ee1f3863d944c1d8c29335f0c790b4f851 Author: Christoph Hellwig Date: Tue Jan 10 10:10:07 2023 +0100 vfio-mdev: turn VFIO_MDEV into a selectable symbol VFIO_MDEV is just a library with helpers for the drivers. Stop making it a user choice and just select it by the drivers that use the helpers. Signed-off-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Reviewed-by: Tony Krowiak Link: https://lore.kernel.org/r/20230110091009.474427-3-hch@lst.de Signed-off-by: Alex Williamson commit 6b182403ee45ed579db544d074d2acf344025f71 Author: Christoph Hellwig Date: Tue Jan 10 10:10:06 2023 +0100 vfio-mdev: allow building the samples into the kernel There is nothing in the vfio-mdev sample drivers that requires building them as modules, so remove that restriction. Signed-off-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Reviewed-by: Tony Krowiak Link: https://lore.kernel.org/r/20230110091009.474427-2-hch@lst.de Signed-off-by: Alex Williamson commit 7141790b5dd47b229e550148789365a3b2192dd7 Author: Angus Chen Date: Sat Jan 7 11:47:20 2023 +0800 vfio: platform: No need to check res again In function vfio_platform_regions_init(),we did check res implied by using while loop, so no need to check whether res be null or not again. No functional change intended. Signed-off-by: Angus Chen Reviewed-by: Eric Auger Link: https://lore.kernel.org/r/20230107034721.2127-1-angus.chen@jaguarmicro.com Signed-off-by: Alex Williamson commit b7f1a141f3cf8bf4927346e5c7259bc218459fe4 Author: Cornelia Huck Date: Thu Jan 12 15:57:07 2023 +0100 MAINTAINERS: step down as vfio reviewer As my focus has shifted in recent months, my involvement with vfio has decreased to occasionally reviewing some simpler patches, which is probably less than you'd expect when you cc: someone for review. Given that I currently don't have spare time to invest in looking at vfio things, let's adjust the entry to match reality. Signed-off-by: Cornelia Huck Link: https://lore.kernel.org/r/20230112145707.27941-1-cohuck@redhat.com Signed-off-by: Alex Williamson commit fc3873095a09ce969543fa4a17fee271c8ca3566 Merge: b7bfaa761d760 b062007c63eb4 Author: Jason Gunthorpe Date: Mon Jan 23 14:24:04 2023 -0400 Merge branch 'isolated_msi' into iommufd.git for-next Jason Gunthorpe says: ==================== Harmonize these into a single irq_domain based check under msi_device_has_isolated_msi(). In real HW "isolated MSI" is implemented in a few different ways: - x86 uses "interrupt remapping" which is a block that sits between the device and APIC, that can "remap" the MSI MemWr. AMD uses per-RID tables to implement isolation while Intel stores the authorized RID in each IRTE entry. Part of the remapping is discarding, HW will not forward MSIs that don't positively match the tables. - ARM GICv3 ITS integrates the concept of an out-of-band "device ID" directly into the interrupt controller logic. The tables the GIC checks that determine how to deliver the interrupt through the ITS device table and interrupt translation tables allow limiting which interrupts device IDs can trigger. - S390 has unconditionally claimed it has isolated MSI through the iommu driver. This is a weaker version of the other arches in that it only works between "gisa" domains. See zpci_set_airq() and https://lore.kernel.org/r/31af8174-35e9-ebeb-b9ef-74c90d4bfd93@linux.ibm.com/ After this series the "isolated MSI" is tagged based only on the irq_domains that the interrupt travels through. For x86 enabling interrupt remapping causes IR irq_domains to be installed in the path, and they can carry the IRQ_DOMAIN_FLAG_ISOLATED_MSI. For ARM the GICv3 ITS itself already sets the flag when it is running in a isolated mode, and S390 simply sets it always through an arch hook since it doesn't use irq_domains at all. This removes the intrusion of IRQ subsystem information into the iommu drivers. Linux's iommu_domains abstraction has no bearing at all on the security of MSI. Even if HW linked to the IOMMU may implement the security on x86 implementations, Linux models that HW through the irq_domain, not the iommu_domain. ==================== * branch 'isolated_msi': iommu: Remove IOMMU_CAP_INTR_REMAP irq/s390: Add arch_is_isolated_msi() for s390 iommu/x86: Replace IOMMU_CAP_INTR_REMAP with IRQ_DOMAIN_FLAG_ISOLATED_MSI genirq/msi: Rename IRQ_DOMAIN_MSI_REMAP to IRQ_DOMAIN_ISOLATED_MSI genirq/irqdomain: Remove unused irq_domain_check_msi_remap() code iommufd: Convert to msi_device_has_isolated_msi() vfio/type1: Convert to iommu_group_has_isolated_msi() iommu: Add iommu_group_has_isolated_msi() genirq/msi: Add msi_device_has_isolated_msi() Link: https://lore.kernel.org/r/0-v3-3313bb5dd3a3+10f11-secure_msi_jgg@nvidia.com Signed-off-by: Jason Gunthorpe commit 3a7b283821650ed1437ab50a8e5f14381c4436db Author: Krzysztof Kozlowski Date: Mon Jan 23 16:16:15 2023 +0100 arm64: dts: broadcom: drop deprecated serial device_type The device_type property is deprecated by Devicetree specification and bindings do not allow it. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230123151616.369963-1-krzysztof.kozlowski@linaro.org Signed-off-by: Florian Fainelli commit 031eeba1102c02c3479c687278d6dbabe5e4c78b Author: Krzysztof Kozlowski Date: Mon Jan 23 16:16:16 2023 +0100 ARM: dts: broadcom: align UART node name with bindings Bindings expect UART/serial node names to be "serial". Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230123151616.369963-2-krzysztof.kozlowski@linaro.org Signed-off-by: Florian Fainelli commit 2529ca2114028182f3871b2a27143e61de99321e Author: Umang Jain Date: Sat Jan 21 01:41:03 2023 +0530 staging: vc04_services: interface: Drop include Makefile directive Drop the include directive. They can break the build, when one only wants to build a subdirectory. Replace with "../" for the includes, in the interface/ files instead. Suggested-by: Greg Kroah-Hartman Signed-off-by: Umang Jain Link: https://lore.kernel.org/r/20230120201104.606876-6-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 74d5eb7de9b07e24b5257c6e62e8589f2084f10e Author: Umang Jain Date: Sat Jan 21 01:41:02 2023 +0530 staging: vc04_services: vchiq-mmal: Drop include Makefile directive Drop the include directive. They can break the build, when one only wants to build a subdirectory. Replace with "../" for the includes, in the mmal-vchiq.c instead. Suggested-by: Greg Kroah-Hartman Signed-off-by: Umang Jain Link: https://lore.kernel.org/r/20230120201104.606876-5-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 5395fb3b39488219984587b99f65f6bda7935df6 Author: Umang Jain Date: Sat Jan 21 01:41:01 2023 +0530 staging: vc04_services: bcm2835-camera: Drop include Makefile directive Drop the include directive. They can break the build, when one only wants to build a subdirectory. Replace with "../" for the includes, in the bcm2835-camera files instead. Suggested-by: Greg Kroah-Hartman Signed-off-by: Umang Jain Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20230120201104.606876-4-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 29d49a76c5b2afa6cc1f1d7e48d6f9422055383f Author: Umang Jain Date: Sat Jan 21 01:41:00 2023 +0530 staging: vc04_services: bcm2835-audio: Drop include Makefile directive Drop the include directive. They can break the build, when one only wants to build a subdirectory. Replace with "../" for the includes, in the bcm2835.h instead. Suggested-by: Greg Kroah-Hartman Signed-off-by: Umang Jain Link: https://lore.kernel.org/r/20230120201104.606876-3-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 2beeddb3203daecf259b7bde2dfde81c53bd3675 Author: Umang Jain Date: Sat Jan 21 01:40:59 2023 +0530 staging: vc04_services: Drop __VCCOREVER__ remnants Commit 8ba5f91bab63 ("staging: vc04_services: remove __VCCOREVER__") was meant to remove all of __VCCOREVER__ definitions but missed to remove a few. Hence, drop them now. Signed-off-by: Umang Jain Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20230120201104.606876-2-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 3f954e227fdcd5004af1db3ea1e1800204c7f233 Author: Philipp Hortmann Date: Sat Jan 21 22:45:11 2023 +0100 staging: rtl8192e: Rename btxpower_trackin.., Slide_Beaco.. and Slide_B.. Rename variable btxpower_trackingInit to tx_pwr_tracking_init, Slide_Beacon_pwdb to slide_beacon_pwdb and Slide_Beacon_Total to slide_beacon_total to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/b722cd913d04d07ac1952da2add2a16cfeb2dc8c.1674336211.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit b441257594af2264ac2ce3dd7efb52c45cd73498 Author: Philipp Hortmann Date: Sat Jan 21 22:44:59 2023 +0100 staging: rtl8192e: Rename eeprom_CustomerID, SwChnlStage and SwChnlStep Rename variable eeprom_CustomerID to eeprom_customer_id, SwChnlStage to sw_chnl_stage and SwChnlStep to sw_chnl_step to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/0d2e7bbd3a2f80d4652d4131c82294e172a2de30.1674336211.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5440dade683e47c9b4478f2793c4df4bfe654732 Author: Philipp Hortmann Date: Sat Jan 21 22:44:53 2023 +0100 staging: rtl8192e: Remove unused variable bfirst_init bfirst_init is six times set but never evaluated. Remove dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/d4f4552e5dbaa036a762590bf47bd5faff15b598.1674336211.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0d9943b8b21c7927711e4108db65f9e38400e6f0 Author: Philipp Hortmann Date: Fri Jan 20 21:18:36 2023 +0100 staging: rtl8192e: Remove repeated set to zero of powerlevel and friend Variables powerlevel and powerlevelOFDM24G are initialized to zero and unchanged. No reason to set them to zero again. Remove dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/50f28816aa006821d3e3a8346e39ae68c4d53963.1674244819.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9fb469870f7d194488a9c76d8eb49500bbdaee86 Author: Philipp Hortmann Date: Fri Jan 20 21:18:26 2023 +0100 staging: rtl8192e: Remove u4RegValue which is always zero As the array antenna_tx_pwr_diff is always zero, u4RegValue is always set to zero. Replace u4RegValue to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/2aa104c0f7a5cede7eea289fe92390295592b0e9.1674244819.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 44eac9d81ff219e11d76fa7de07b2ad72ccd89de Author: Philipp Hortmann Date: Fri Jan 20 21:18:19 2023 +0100 staging: rtl8192e: Remove ant_pwr_diff which is always zero ant_pwr_diff is set to zero and then masked which will always result in zero. Remove ant_pwr_diff and use zero direct as it is just useless code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/a550004dcdeb9e0b716f69033a541457c1f12c86.1674244819.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 39902d6a7de8fb69bb06e97919ca1c8c43902e09 Author: Philipp Hortmann Date: Fri Jan 20 21:18:12 2023 +0100 staging: rtl8192e: Remove zeroed arrays tx_pwr_level_cck_a and friends The arrays tx_pwr_level_cck_a, tx_pwr_level_ofdm_24g_a, tx_pwr_level_cck_c and tx_pwr_level_ofdm_24g_c are initialized to zero and never changed. Delete the upper named arrays and set the variables directly to zero to avoid useless code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/b88e6bdd5569ac651692074060fba6f79c68c687.1674244819.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit e198f3a6d754ab0f49654000cd701c1e148454ef Author: Philipp Hortmann Date: Fri Jan 20 21:18:02 2023 +0100 staging: rtl8192e: Init tx_pwr_level_cck_a and friends directly The arrays EEPROMRfACCKChnl1TxPwLevel, EEPROMRfAOfdmChnlTxPwLevel, EEPROMRfCCCKChnl1TxPwLevel, EEPROMRfCOfdmChnlTxPwLevel are initialized to zero and never changed. Delete the arrays and set the variables directly to zero to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/9874e99fb9a803be2a89e81e2ecd01ba80398ea1.1674244819.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4f79170fe068740db6a601fb6e949aff8a13bed3 Author: Philipp Hortmann Date: Fri Jan 20 21:17:50 2023 +0100 staging: rtl8192e: Combine three loops to one to init tx_pwr_level_... The arrays EEPROMRfACCKChnl1TxPwLevel, EEPROMRfAOfdmChnlTxPwLevel, EEPROMRfCCCKChnl1TxPwLevel, EEPROMRfCOfdmChnlTxPwLevel are initialized to zero and never changed. The three loops contain the same code. Only the index of the upper named arrays go from 0 to 2. Therefore the three loops can be combined to one loop from 0 to 13 which removes useless code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/c268ccf158997c65756b7b092ae79cc2b69bd47f.1674244819.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit f63f856086559de65625e7a84fd6c8d4db1f0459 Author: Larry Finger Date: Fri Jan 20 13:11:19 2023 -0600 staging: r8188eu: Fix some endian problems Sparse lists the following warnings: CHECK drivers/staging/r8188eu/core/rtw_mlme.c drivers/staging/r8188eu/core/rtw_mlme.c:1197:49: warning: incorrect type in argument 2 (different base types) drivers/staging/r8188eu/core/rtw_mlme.c:1197:49: expected restricted __le16 [usertype] mstatus_rpt drivers/staging/r8188eu/core/rtw_mlme.c:1197:49: got unsigned short [assigned] [usertype] media_status_rpt drivers/staging/r8188eu/core/rtw_mlme.c:1275:57: warning: incorrect type in argument 2 (different base types) drivers/staging/r8188eu/core/rtw_mlme.c:1275:57: expected restricted __le16 [usertype] mstatus_rpt drivers/staging/r8188eu/core/rtw_mlme.c:1275:57: got unsigned short [assigned] [usertype] media_status CHECK drivers/staging/r8188eu/core/rtw_mlme_ext.c drivers/staging/r8188eu/core/rtw_mlme_ext.c:6842:58: warning: incorrect type in argument 2 (different base types) drivers/staging/r8188eu/core/rtw_mlme_ext.c:6842:58: expected restricted __le16 [usertype] mstatus_rpt drivers/staging/r8188eu/core/rtw_mlme_ext.c:6842:58: got unsigned short [assigned] [usertype] media_status The second argument of rtl8188e_set_FwMediaStatus_cmd() needs to be in CPU order, not little-endian; however, when it uses that value to call FillH2CCmd_88E() the parameter must be in little-endian order as that value will be sent to the firmware. Note that the conversion from LE to CPU order was le16_to_cpu() rather than the correct cpu_to_le16. The definition of FillH2CCmd_88E() is revised, and the proper conversion routine is used. Note that the original code performed one byte swap on the secong argument of FillH2CCmd_88E(), and got the correct answer even though the semantics were very wrong. Tested-by: Philipp Hortmann # Edimax N150 Reviewed-by: Dan Carpenter Reported-by: Gaurav Pathak Signed-off-by: Larry Finger Link: https://lore.kernel.org/r/20230120191119.13163-1-Larry.Finger@lwfinger.net Signed-off-by: Greg Kroah-Hartman commit 74d23931f4096efcdef1bc12cc828585e49e99ce Merge: 84150795a49ae 297a3f1241550 Author: Martin KaFai Lau Date: Mon Jan 23 09:38:12 2023 -0800 Merge branch 'xdp: hints via kfuncs' Stanislav Fomichev says: ==================== Please see the first patch in the series for the overall design and use-cases. See the following email from Toke for the per-packet metadata overhead: https://lore.kernel.org/bpf/20221206024554.3826186-1-sdf@google.com/T/#m49d48ea08d525ec88360c7d14c4d34fb0e45e798 Recent changes: - Keep new functions in en/xdp.c, do 'extern mlx5_xdp_metadata_ops' (Tariq) - Remove mxbuf pointer and use xsk_buff_to_mxbuf (Tariq) - Clarify xdp_buff vs 'XDP frame' (Jesper) - Explicitly mention that AF_XDP RX descriptor lacks metadata size (Jesper) - Drop libbpf_flags/xdp_flags from selftests and use ifindex instead of ifname (due to recent xsk.h refactoring) Prior art (to record pros/cons for different approaches): - Stable UAPI approach: https://lore.kernel.org/bpf/20220628194812.1453059-1-alexandr.lobakin@intel.com/ - Metadata+BTF_ID appoach: https://lore.kernel.org/bpf/166256538687.1434226.15760041133601409770.stgit@firesoul/ - v7: https://lore.kernel.org/bpf/20230112003230.3779451-1-sdf@google.com/ - v6: https://lore.kernel.org/bpf/20230104215949.529093-1-sdf@google.com/ - v5: https://lore.kernel.org/bpf/20221220222043.3348718-1-sdf@google.com/ - v4: https://lore.kernel.org/bpf/20221213023605.737383-1-sdf@google.com/ - v3: https://lore.kernel.org/bpf/20221206024554.3826186-1-sdf@google.com/ - v2: https://lore.kernel.org/bpf/20221121182552.2152891-1-sdf@google.com/ - v1: https://lore.kernel.org/bpf/20221115030210.3159213-1-sdf@google.com/ - kfuncs v2 RFC: https://lore.kernel.org/bpf/20221027200019.4106375-1-sdf@google.com/ - kfuncs v1 RFC: https://lore.kernel.org/bpf/20221104032532.1615099-1-sdf@google.com/ Cc: John Fastabend Cc: David Ahern Cc: Martin KaFai Lau Cc: Jakub Kicinski Cc: Willem de Bruijn Cc: Jesper Dangaard Brouer Cc: Anatoly Burakov Cc: Alexander Lobakin Cc: Magnus Karlsson Cc: Maryam Tahhan Cc: xdp-hints@xdp-project.net Cc: netdev@vger.kernel.org Stanislav Fomichev (13): bpf: Document XDP RX metadata bpf: Rename bpf_{prog,map}_is_dev_bound to is_offloaded bpf: Move offload initialization into late_initcall bpf: Reshuffle some parts of bpf/offload.c bpf: Introduce device-bound XDP programs selftests/bpf: Update expected test_offload.py messages bpf: XDP metadata RX kfuncs veth: Introduce veth_xdp_buff wrapper for xdp_buff veth: Support RX XDP metadata selftests/bpf: Verify xdp_metadata xdp->af_xdp path net/mlx4_en: Introduce wrapper for xdp_buff net/mlx4_en: Support RX XDP metadata selftests/bpf: Simple program to dump XDP RX metadata ==================== Signed-off-by: Martin KaFai Lau commit 297a3f1241550f6969f65a5efeee9162241daae5 Author: Stanislav Fomichev Date: Thu Jan 19 14:15:36 2023 -0800 selftests/bpf: Simple program to dump XDP RX metadata To be used for verification of driver implementations. Note that the skb path is gone from the series, but I'm still keeping the implementation for any possible future work. $ xdp_hw_metadata On the other machine: $ echo -n xdp | nc -u -q1 9091 # for AF_XDP $ echo -n skb | nc -u -q1 9092 # for skb Sample output: # xdp xsk_ring_cons__peek: 1 0x19f9090: rx_desc[0]->addr=100000000008000 addr=8100 comp_addr=8000 rx_timestamp_supported: 1 rx_timestamp: 1667850075063948829 0x19f9090: complete idx=8 addr=8000 # skb found skb hwtstamp = 1668314052.854274681 Decoding: # xdp rx_timestamp=1667850075.063948829 $ date -d @1667850075 Mon Nov 7 11:41:15 AM PST 2022 $ date Mon Nov 7 11:42:05 AM PST 2022 # skb $ date -d @1668314052 Sat Nov 12 08:34:12 PM PST 2022 $ date Sat Nov 12 08:37:06 PM PST 2022 Cc: John Fastabend Cc: David Ahern Cc: Martin KaFai Lau Cc: Jakub Kicinski Cc: Willem de Bruijn Cc: Jesper Dangaard Brouer Cc: Anatoly Burakov Cc: Alexander Lobakin Cc: Magnus Karlsson Cc: Maryam Tahhan Cc: xdp-hints@xdp-project.net Cc: netdev@vger.kernel.org Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20230119221536.3349901-18-sdf@google.com Signed-off-by: Martin KaFai Lau commit bc8d405b1ba92b9a71f9a94f3c08906e9d8c452c Author: Toke Høiland-Jørgensen Date: Thu Jan 19 14:15:35 2023 -0800 net/mlx5e: Support RX XDP metadata Support RX hash and timestamp metadata kfuncs. We need to pass in the cqe pointer to the mlx5e_skb_from* functions so it can be retrieved from the XDP ctx to do this. Cc: Tariq Toukan Cc: Saeed Mahameed Cc: John Fastabend Cc: David Ahern Cc: Martin KaFai Lau Cc: Jakub Kicinski Cc: Willem de Bruijn Cc: Jesper Dangaard Brouer Cc: Anatoly Burakov Cc: Alexander Lobakin Cc: Magnus Karlsson Cc: Maryam Tahhan Cc: xdp-hints@xdp-project.net Cc: netdev@vger.kernel.org Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Stanislav Fomichev Reviewed-by: Tariq Toukan Link: https://lore.kernel.org/r/20230119221536.3349901-17-sdf@google.com Signed-off-by: Martin KaFai Lau commit 384a13ca8a5d4deab94ef8f7652472db26b4e892 Author: Toke Høiland-Jørgensen Date: Thu Jan 19 14:15:34 2023 -0800 net/mlx5e: Introduce wrapper for xdp_buff Preparation for implementing HW metadata kfuncs. No functional change. Cc: Tariq Toukan Cc: Saeed Mahameed Cc: John Fastabend Cc: David Ahern Cc: Martin KaFai Lau Cc: Jakub Kicinski Cc: Willem de Bruijn Cc: Jesper Dangaard Brouer Cc: Anatoly Burakov Cc: Alexander Lobakin Cc: Magnus Karlsson Cc: Maryam Tahhan Cc: xdp-hints@xdp-project.net Cc: netdev@vger.kernel.org Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Stanislav Fomichev Reviewed-by: Tariq Toukan Link: https://lore.kernel.org/r/20230119221536.3349901-16-sdf@google.com Signed-off-by: Martin KaFai Lau commit 94ecc5ca4dbf1f01bae6e32f5cd88c0fc5dc3cc9 Author: Toke Høiland-Jørgensen Date: Thu Jan 19 14:15:33 2023 -0800 xsk: Add cb area to struct xdp_buff_xsk Add an area after the xdp_buff in struct xdp_buff_xsk that drivers can use to stash extra information to use in metadata kfuncs. The maximum size of 24 bytes means the full xdp_buff_xsk structure will take up exactly two cache lines (with the cb field spanning both). Also add a macro drivers can use to check their own wrapping structs against the available size. Cc: John Fastabend Cc: David Ahern Cc: Martin KaFai Lau Cc: Jakub Kicinski Cc: Willem de Bruijn Cc: Jesper Dangaard Brouer Cc: Anatoly Burakov Cc: Alexander Lobakin Cc: Magnus Karlsson Cc: Maryam Tahhan Cc: xdp-hints@xdp-project.net Cc: netdev@vger.kernel.org Suggested-by: Jakub Kicinski Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20230119221536.3349901-15-sdf@google.com Signed-off-by: Martin KaFai Lau commit ab46182d0dcb3a85fb31684246d626192c4a64da Author: Stanislav Fomichev Date: Thu Jan 19 14:15:32 2023 -0800 net/mlx4_en: Support RX XDP metadata RX timestamp and hash for now. Tested using the prog from the next patch. Also enabling xdp metadata support; don't see why it's disabled, there is enough headroom.. Cc: John Fastabend Cc: David Ahern Cc: Martin KaFai Lau Cc: Jakub Kicinski Cc: Willem de Bruijn Cc: Jesper Dangaard Brouer Cc: Anatoly Burakov Cc: Alexander Lobakin Cc: Magnus Karlsson Cc: Maryam Tahhan Cc: xdp-hints@xdp-project.net Cc: netdev@vger.kernel.org Reviewed-by: Tariq Toukan Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20230119221536.3349901-14-sdf@google.com Signed-off-by: Martin KaFai Lau commit 4444584dcb0d096bc0477249b8a6034ca5933c96 Author: Stanislav Fomichev Date: Thu Jan 19 14:15:31 2023 -0800 net/mlx4_en: Introduce wrapper for xdp_buff No functional changes. Boilerplate to allow stuffing more data after xdp_buff. Cc: John Fastabend Cc: David Ahern Cc: Martin KaFai Lau Cc: Jakub Kicinski Cc: Willem de Bruijn Cc: Jesper Dangaard Brouer Cc: Anatoly Burakov Cc: Alexander Lobakin Cc: Magnus Karlsson Cc: Maryam Tahhan Cc: xdp-hints@xdp-project.net Cc: netdev@vger.kernel.org Reviewed-by: Tariq Toukan Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20230119221536.3349901-13-sdf@google.com Signed-off-by: Martin KaFai Lau commit e2a46d54d7a100c79c9d645184db9ce594c8f5f6 Author: Stanislav Fomichev Date: Thu Jan 19 14:15:30 2023 -0800 selftests/bpf: Verify xdp_metadata xdp->af_xdp path - create new netns - create veth pair (veTX+veRX) - setup AF_XDP socket for both interfaces - attach bpf to veRX - send packet via veTX - verify the packet has expected metadata at veRX Cc: John Fastabend Cc: David Ahern Cc: Martin KaFai Lau Cc: Jakub Kicinski Cc: Willem de Bruijn Cc: Jesper Dangaard Brouer Cc: Anatoly Burakov Cc: Alexander Lobakin Cc: Magnus Karlsson Cc: Maryam Tahhan Cc: xdp-hints@xdp-project.net Cc: netdev@vger.kernel.org Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20230119221536.3349901-12-sdf@google.com Signed-off-by: Martin KaFai Lau commit a2c81dc59d41e92362ab7d41d0c15471ea50637d Merge: 6c54b7bc8a31c 976cb655c940b Author: Rafael J. Wysocki Date: Mon Jan 23 18:52:53 2023 +0100 Merge back thermal control material for 6.3. commit ed0400ad547c0b88d2f06ecf22a089eb2e84c9b7 Author: Ilpo Järvinen Date: Mon Jan 23 19:38:57 2023 +0200 serial: liteuart: Correct error rollback Goto to the correct rollback label instead of directly returning. Fixes: 5602cf99dcdc ("serial: liteuart: add IRQ support for the RX path") Reported-by: Stephen Rothwell Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Ilpo Järvinen Reviewed-by: Gabriel Somlo Link: https://lore.kernel.org/r/20230123173857.40695-3-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit a3cf6b946e7eddaab7a2c2f61caf9c1763dcbed7 Author: Ilpo Järvinen Date: Mon Jan 23 19:38:56 2023 +0200 serial: qcom_geni: Fix variable naming Commit 2aaa43c70778 ("tty: serial: qcom-geni-serial: add support for serial engine DMA") renamed rx_fifo member to rf_buf which caused a build failure when b8caf69a6946 ("tty: serial: qcom-geni-serial: fix slab-out-of-bounds on RX FIFO buffer") from tty-linus was merged into tty-next. Fix the member variable name. Fixes: 7a6aa989f2e8 ("Merge 6.2-rc5 into tty-next") Reported-by: Stephen Rothwell Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230123173857.40695-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 36b20f82b699a9d15536058608b31f6dfe9336b4 Author: Rafael J. Wysocki Date: Thu Jan 19 19:41:38 2023 +0100 MAINTAINERS: Add x86 ACPI paths to the ACPI entry In order for things like get_maintainer.pl to print linux-acpi as a list to receive copies of ACPI-related patches, add paths to ACPI files in the arch/x86/ directory to the ACPI entry in MAINTAINERS. While at it, make the list of ACPI files listed in the suspend-to-RAM entry more precise. Signed-off-by: Rafael J. Wysocki Acked-by: Thomas Gleixner commit 306531f0249f4e1c1aabaa0d70d24a1e9c71e38b Author: Stanislav Fomichev Date: Thu Jan 19 14:15:29 2023 -0800 veth: Support RX XDP metadata The goal is to enable end-to-end testing of the metadata for AF_XDP. Cc: John Fastabend Cc: David Ahern Cc: Martin KaFai Lau Cc: Jakub Kicinski Cc: Willem de Bruijn Cc: Jesper Dangaard Brouer Cc: Anatoly Burakov Cc: Alexander Lobakin Cc: Magnus Karlsson Cc: Maryam Tahhan Cc: xdp-hints@xdp-project.net Cc: netdev@vger.kernel.org Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20230119221536.3349901-11-sdf@google.com Signed-off-by: Martin KaFai Lau commit fefb695a745f10247fd68f5561e6e3d85e1d7b59 Author: Stanislav Fomichev Date: Thu Jan 19 14:15:28 2023 -0800 veth: Introduce veth_xdp_buff wrapper for xdp_buff No functional changes. Boilerplate to allow stuffing more data after xdp_buff. Cc: Martin KaFai Lau Cc: Jakub Kicinski Cc: Willem de Bruijn Cc: Jesper Dangaard Brouer Cc: Anatoly Burakov Cc: Alexander Lobakin Cc: Magnus Karlsson Cc: Maryam Tahhan Cc: xdp-hints@xdp-project.net Cc: netdev@vger.kernel.org Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20230119221536.3349901-10-sdf@google.com Signed-off-by: Martin KaFai Lau commit fd7c211d6875013f81acc09868effe199b5d2c0c Author: Toke Høiland-Jørgensen Date: Thu Jan 19 14:15:27 2023 -0800 bpf: Support consuming XDP HW metadata from fext programs Instead of rejecting the attaching of PROG_TYPE_EXT programs to XDP programs that consume HW metadata, implement support for propagating the offload information. The extension program doesn't need to set a flag or ifindex, these will just be propagated from the target by the verifier. We need to create a separate offload object for the extension program, though, since it can be reattached to a different program later (which means we can't just inherit the offload information from the target). An additional check is added on attach that the new target is compatible with the offload information in the extension prog. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20230119221536.3349901-9-sdf@google.com Signed-off-by: Martin KaFai Lau commit 3d76a4d3d4e591af3e789698affaad88a5a8e8ab Author: Stanislav Fomichev Date: Thu Jan 19 14:15:26 2023 -0800 bpf: XDP metadata RX kfuncs Define a new kfunc set (xdp_metadata_kfunc_ids) which implements all possible XDP metatada kfuncs. Not all devices have to implement them. If kfunc is not supported by the target device, the default implementation is called instead. The verifier, at load time, replaces a call to the generic kfunc with a call to the per-device one. Per-device kfunc pointers are stored in separate struct xdp_metadata_ops. Cc: John Fastabend Cc: David Ahern Cc: Martin KaFai Lau Cc: Jakub Kicinski Cc: Willem de Bruijn Cc: Jesper Dangaard Brouer Cc: Anatoly Burakov Cc: Alexander Lobakin Cc: Magnus Karlsson Cc: Maryam Tahhan Cc: xdp-hints@xdp-project.net Cc: netdev@vger.kernel.org Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20230119221536.3349901-8-sdf@google.com Signed-off-by: Martin KaFai Lau commit 40535704624e980a560fd68635d98c2984ded572 Author: Stanislav Fomichev Date: Thu Jan 19 14:15:25 2023 -0800 selftests/bpf: Update expected test_offload.py messages Generic check has a different error message, update the selftest. Cc: John Fastabend Cc: David Ahern Cc: Martin KaFai Lau Cc: Jakub Kicinski Cc: Willem de Bruijn Cc: Jesper Dangaard Brouer Cc: Anatoly Burakov Cc: Alexander Lobakin Cc: Magnus Karlsson Cc: Maryam Tahhan Cc: xdp-hints@xdp-project.net Cc: netdev@vger.kernel.org Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20230119221536.3349901-7-sdf@google.com Signed-off-by: Martin KaFai Lau commit 2b3486bc2d237ec345b3942b7be5deabf8c8fed1 Author: Stanislav Fomichev Date: Thu Jan 19 14:15:24 2023 -0800 bpf: Introduce device-bound XDP programs New flag BPF_F_XDP_DEV_BOUND_ONLY plus all the infra to have a way to associate a netdev with a BPF program at load time. netdevsim checks are dropped in favor of generic check in dev_xdp_attach. Cc: John Fastabend Cc: David Ahern Cc: Martin KaFai Lau Cc: Jakub Kicinski Cc: Willem de Bruijn Cc: Jesper Dangaard Brouer Cc: Anatoly Burakov Cc: Alexander Lobakin Cc: Magnus Karlsson Cc: Maryam Tahhan Cc: xdp-hints@xdp-project.net Cc: netdev@vger.kernel.org Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20230119221536.3349901-6-sdf@google.com Signed-off-by: Martin KaFai Lau commit 89bbc53a4dbbbdd65962d4bbaeba6c7775ea0bf7 Author: Stanislav Fomichev Date: Thu Jan 19 14:15:23 2023 -0800 bpf: Reshuffle some parts of bpf/offload.c To avoid adding forward declarations in the main patch, shuffle some code around. No functional changes. Cc: John Fastabend Cc: David Ahern Cc: Martin KaFai Lau Cc: Jakub Kicinski Cc: Willem de Bruijn Cc: Jesper Dangaard Brouer Cc: Anatoly Burakov Cc: Alexander Lobakin Cc: Magnus Karlsson Cc: Maryam Tahhan Cc: xdp-hints@xdp-project.net Cc: netdev@vger.kernel.org Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20230119221536.3349901-5-sdf@google.com Signed-off-by: Martin KaFai Lau commit f1fc43d03946d6a2f3dcb05e8c0b874bdf1333c5 Author: Stanislav Fomichev Date: Thu Jan 19 14:15:22 2023 -0800 bpf: Move offload initialization into late_initcall So we don't have to initialize it manually from several paths. Cc: John Fastabend Cc: David Ahern Cc: Martin KaFai Lau Cc: Jakub Kicinski Cc: Willem de Bruijn Cc: Jesper Dangaard Brouer Cc: Anatoly Burakov Cc: Alexander Lobakin Cc: Magnus Karlsson Cc: Maryam Tahhan Cc: xdp-hints@xdp-project.net Cc: netdev@vger.kernel.org Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20230119221536.3349901-4-sdf@google.com Signed-off-by: Martin KaFai Lau commit 9d03ebc71a027ca495c60f6e94d3cda81921791f Author: Stanislav Fomichev Date: Thu Jan 19 14:15:21 2023 -0800 bpf: Rename bpf_{prog,map}_is_dev_bound to is_offloaded BPF offloading infra will be reused to implement bound-but-not-offloaded bpf programs. Rename existing helpers for clarity. No functional changes. Cc: John Fastabend Cc: David Ahern Cc: Martin KaFai Lau Cc: Willem de Bruijn Cc: Jesper Dangaard Brouer Cc: Anatoly Burakov Cc: Alexander Lobakin Cc: Magnus Karlsson Cc: Maryam Tahhan Cc: xdp-hints@xdp-project.net Cc: netdev@vger.kernel.org Reviewed-by: Jakub Kicinski Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20230119221536.3349901-3-sdf@google.com Signed-off-by: Martin KaFai Lau commit a4aeb9d6565e4211ca55f601aeb0b3492d8131af Author: Stanislav Fomichev Date: Thu Jan 19 14:15:20 2023 -0800 bpf: Document XDP RX metadata Document all current use-cases and assumptions. Cc: John Fastabend Cc: David Ahern Cc: Martin KaFai Lau Cc: Jakub Kicinski Cc: Willem de Bruijn Cc: Jesper Dangaard Brouer Cc: Anatoly Burakov Cc: Alexander Lobakin Cc: Magnus Karlsson Cc: Maryam Tahhan Cc: xdp-hints@xdp-project.net Cc: netdev@vger.kernel.org Acked-by: David Vernet Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20230119221536.3349901-2-sdf@google.com Signed-off-by: Martin KaFai Lau commit b94a26d95cb2790ab62d4c27a6383eeb3d2ddab0 Merge: 025aea27732d3 ccbc6554ed66d Author: Mark Brown Date: Mon Jan 23 17:34:29 2023 +0000 spi: atmel: switch to use modern name Merge series from Yang Yingliang : After introducing devm_spi_alloc_host/spi_alloc_host(), the legacy named function devm_spi_alloc_master/spi_alloc_master() can be replaced. And also change other legacy name master/slave to modern name host/target or controller. commit 0a363fb23ee2f7beb08437ad7db86d195878d79f Author: Babu Moger Date: Fri Jan 13 09:20:39 2023 -0600 Documentation/x86: Update resctrl.rst for new features Update the documentation for the new features: 1. Slow Memory Bandwidth allocation (SMBA). With this feature, the QOS enforcement policies can be applied to the external slow memory connected to the host. QOS enforcement is accomplished by assigning a Class Of Service (COS) to a processor and specifying allocations or limits for that COS for each resource to be allocated. 2. Bandwidth Monitoring Event Configuration (BMEC). The bandwidth monitoring events mbm_total_bytes and mbm_local_bytes are set to count all the total and local reads/writes respectively. With the introduction of slow memory, the two counters are not enough to count all the different types of memory events. With the feature BMEC, the users have the option to configure mbm_total_bytes and mbm_local_bytes to count the specific type of events. Also add configuration instructions with examples. Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Link: https://lore.kernel.org/r/20230113152039.770054-14-babu.moger@amd.com commit 4fe61bff5a4100e92f81427dab06b7f3a025f6a2 Author: Babu Moger Date: Fri Jan 13 09:20:38 2023 -0600 x86/resctrl: Add interface to write mbm_local_bytes_config The event configuration for mbm_local_bytes can be changed by the user by writing to the configuration file /sys/fs/resctrl/info/L3_MON/mbm_local_bytes_config. The event configuration settings are domain specific and will affect all the CPUs in the domain. Following are the types of events supported: ==== =========================================================== Bits Description ==== =========================================================== 6 Dirty Victims from the QOS domain to all types of memory 5 Reads to slow memory in the non-local NUMA domain 4 Reads to slow memory in the local NUMA domain 3 Non-temporal writes to non-local NUMA domain 2 Non-temporal writes to local NUMA domain 1 Reads to memory in the non-local NUMA domain 0 Reads to memory in the local NUMA domain ==== =========================================================== For example, to change the mbm_local_bytes_config to count all the non-temporal writes on domain 0, the bits 2 and 3 needs to be set which is 1100b (in hex 0xc). Run the command: $echo 0=0xc > /sys/fs/resctrl/info/L3_MON/mbm_local_bytes_config To change the mbm_local_bytes to count only reads to local NUMA domain 1, the bit 0 needs to be set which 1b (in hex 0x1). Run the command: $echo 1=0x1 > /sys/fs/resctrl/info/L3_MON/mbm_local_bytes_config Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Link: https://lore.kernel.org/r/20230113152039.770054-13-babu.moger@amd.com commit 92bd5a1390335bb3cc76bdf1b4356edbc94d408d Author: Babu Moger Date: Fri Jan 13 09:20:37 2023 -0600 x86/resctrl: Add interface to write mbm_total_bytes_config The event configuration for mbm_total_bytes can be changed by the user by writing to the file /sys/fs/resctrl/info/L3_MON/mbm_total_bytes_config. The event configuration settings are domain specific and affect all the CPUs in the domain. Following are the types of events supported: ==== =========================================================== Bits Description ==== =========================================================== 6 Dirty Victims from the QOS domain to all types of memory 5 Reads to slow memory in the non-local NUMA domain 4 Reads to slow memory in the local NUMA domain 3 Non-temporal writes to non-local NUMA domain 2 Non-temporal writes to local NUMA domain 1 Reads to memory in the non-local NUMA domain 0 Reads to memory in the local NUMA domain ==== =========================================================== For example: To change the mbm_total_bytes to count only reads on domain 0, the bits 0, 1, 4 and 5 needs to be set, which is 110011b (in hex 0x33). Run the command: $echo 0=0x33 > /sys/fs/resctrl/info/L3_MON/mbm_total_bytes_config To change the mbm_total_bytes to count all the slow memory reads on domain 1, the bits 4 and 5 needs to be set which is 110000b (in hex 0x30). Run the command: $echo 1=0x30 > /sys/fs/resctrl/info/L3_MON/mbm_total_bytes_config Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Link: https://lore.kernel.org/r/20230113152039.770054-12-babu.moger@amd.com commit 73afb2d3ce2d7e0f9eee14e3f2b53d2bbfefd9c8 Author: Babu Moger Date: Fri Jan 13 09:20:36 2023 -0600 x86/resctrl: Add interface to read mbm_local_bytes_config The event configuration can be viewed by the user by reading the configuration file /sys/fs/resctrl/info/L3_MON/mbm_local_bytes_config. The event configuration settings are domain specific and will affect all the CPUs in the domain. Following are the types of events supported: ==== =========================================================== Bits Description ==== =========================================================== 6 Dirty Victims from the QOS domain to all types of memory 5 Reads to slow memory in the non-local NUMA domain 4 Reads to slow memory in the local NUMA domain 3 Non-temporal writes to non-local NUMA domain 2 Non-temporal writes to local NUMA domain 1 Reads to memory in the non-local NUMA domain 0 Reads to memory in the local NUMA domain ==== =========================================================== By default, the mbm_local_bytes_config is set to 0x15 to count all the local event types. For example: $cat /sys/fs/resctrl/info/L3_MON/mbm_local_bytes_config 0=0x15;1=0x15;2=0x15;3=0x15 In this case, the event mbm_local_bytes is configured with 0x15 on domains 0 to 3. Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Link: https://lore.kernel.org/r/20230113152039.770054-11-babu.moger@amd.com commit dc2a3e857981f859889933cf66ded117d74edff1 Author: Babu Moger Date: Fri Jan 13 09:20:35 2023 -0600 x86/resctrl: Add interface to read mbm_total_bytes_config The event configuration can be viewed by the user by reading the configuration file /sys/fs/resctrl/info/L3_MON/mbm_total_bytes_config. The event configuration settings are domain specific and will affect all the CPUs in the domain. Following are the types of events supported: ==== =========================================================== Bits Description ==== =========================================================== 6 Dirty Victims from the QOS domain to all types of memory 5 Reads to slow memory in the non-local NUMA domain 4 Reads to slow memory in the local NUMA domain 3 Non-temporal writes to non-local NUMA domain 2 Non-temporal writes to local NUMA domain 1 Reads to memory in the non-local NUMA domain 0 Reads to memory in the local NUMA domain ==== =========================================================== By default, the mbm_total_bytes_config is set to 0x7f to count all the event types. For example: $cat /sys/fs/resctrl/info/L3_MON/mbm_total_bytes_config 0=0x7f;1=0x7f;2=0x7f;3=0x7f In this case, the event mbm_total_bytes is configured with 0x7f on domains 0 to 3. Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Link: https://lore.kernel.org/r/20230113152039.770054-10-babu.moger@amd.com commit d507f83ced55eda848a3f397cf87b07ab11384b9 Author: Babu Moger Date: Fri Jan 13 09:20:34 2023 -0600 x86/resctrl: Support monitor configuration Add a new field in struct mon_evt to support Bandwidth Monitoring Event Configuration (BMEC) and also update the "mon_features" display. The resctrl file "mon_features" will display the supported events and files that can be used to configure those events if monitor configuration is supported. Before the change: $ cat /sys/fs/resctrl/info/L3_MON/mon_features llc_occupancy mbm_total_bytes mbm_local_bytes After the change when BMEC is supported: $ cat /sys/fs/resctrl/info/L3_MON/mon_features llc_occupancy mbm_total_bytes mbm_total_bytes_config mbm_local_bytes mbm_local_bytes_config Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Link: https://lore.kernel.org/r/20230113152039.770054-9-babu.moger@amd.com commit bd334c86b5d70e5d1c6169991802e62c828d6f38 Author: Babu Moger Date: Fri Jan 13 09:20:33 2023 -0600 x86/resctrl: Add __init attribute to rdt_get_mon_l3_config() In an upcoming change, rdt_get_mon_l3_config() needs to call rdt_cpu_has() to query the monitor related features. It cannot be called right now because rdt_cpu_has() has the __init attribute but rdt_get_mon_l3_config() doesn't. Add the __init attribute to rdt_get_mon_l3_config() that is only called by get_rdt_mon_resources() that already has the __init attribute. Also make rdt_cpu_has() available to by rdt_get_mon_l3_config() via the internal header file. Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Link: https://lore.kernel.org/r/20230113152039.770054-8-babu.moger@amd.com Signed-off-by: Borislav Petkov (AMD) commit 5b6fac3fa44bafee12e0c3d1c5cbae6d058e9c98 Author: Babu Moger Date: Fri Jan 13 09:20:32 2023 -0600 x86/resctrl: Detect and configure Slow Memory Bandwidth Allocation The QoS slow memory configuration details are available via CPUID_Fn80000020_EDX_x02. Detect the available details and initialize the rest to defaults. Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Link: https://lore.kernel.org/r/20230113152039.770054-7-babu.moger@amd.com commit a76f65c89f928b87c49d88b7fd60cb4d7203ffff Author: Babu Moger Date: Fri Jan 13 09:20:31 2023 -0600 x86/resctrl: Include new features in command line options Add the command line options to enable or disable the new resctrl features: smba: Slow Memory Bandwidth Allocation bmec: Bandwidth Monitor Event Configuration. Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Link: https://lore.kernel.org/r/20230113152039.770054-6-babu.moger@amd.com commit 78335aac6156eadad0025ab34469e2adcc60218b Author: Babu Moger Date: Fri Jan 13 09:20:30 2023 -0600 x86/cpufeatures: Add Bandwidth Monitoring Event Configuration feature flag Newer AMD processors support the new feature Bandwidth Monitoring Event Configuration (BMEC). The feature support is identified via CPUID Fn8000_0020_EBX_x0[3]: EVT_CFG - Bandwidth Monitoring Event Configuration (BMEC) The bandwidth monitoring events mbm_total_bytes and mbm_local_bytes are set to count all the total and local reads/writes, respectively. With the introduction of slow memory, the two counters are not enough to count all the different types of memory events. Therefore, BMEC provides the option to configure mbm_total_bytes and mbm_local_bytes to count the specific type of events. Each BMEC event has a configuration MSR which contains one field for each bandwidth type that can be used to configure the bandwidth event to track any combination of supported bandwidth types. The event will count requests from every bandwidth type bit that is set in the corresponding configuration register. Following are the types of events supported: ==== ======================================================== Bits Description ==== ======================================================== 6 Dirty Victims from the QOS domain to all types of memory 5 Reads to slow memory in the non-local NUMA domain 4 Reads to slow memory in the local NUMA domain 3 Non-temporal writes to non-local NUMA domain 2 Non-temporal writes to local NUMA domain 1 Reads to memory in the non-local NUMA domain 0 Reads to memory in the local NUMA domain ==== ======================================================== By default, the mbm_total_bytes configuration is set to 0x7F to count all the event types and the mbm_local_bytes configuration is set to 0x15 to count all the local memory events. Feature description is available in the specification, "AMD64 Technology Platform Quality of Service Extensions, Revision: 1.03 Publication" at https://bugzilla.kernel.org/attachment.cgi?id=301365 Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Link: https://lore.kernel.org/r/20230113152039.770054-5-babu.moger@amd.com commit a5b699665580725de8c0c01f2163a15af78b6866 Author: Babu Moger Date: Fri Jan 13 09:20:29 2023 -0600 x86/resctrl: Add a new resource type RDT_RESOURCE_SMBA Add a new resource type RDT_RESOURCE_SMBA to handle the QoS enforcement policies on the external slow memory. Mostly initialization of the essentials. Setting fflags to RFTYPE_RES_MB configures the SMBA resource to have the same resctrl files as the existing MBA resource. The SMBA resource has identical properties to the existing MBA resource. These properties will be enumerated in an upcoming change and exposed via resctrl because of this flag. Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Link: https://lore.kernel.org/r/20230113152039.770054-4-babu.moger@amd.com commit f334f723a63cfc25789b1cdf70a08ffbaea4bf2e Author: Babu Moger Date: Fri Jan 13 09:20:28 2023 -0600 x86/cpufeatures: Add Slow Memory Bandwidth Allocation feature flag Add the new AMD feature X86_FEATURE_SMBA. With it, the QOS enforcement policies can be applied to external slow memory connected to the host. QOS enforcement is accomplished by assigning a Class Of Service (COS) to a processor and specifying allocations or limits for that COS for each resource to be allocated. This feature is identified by the CPUID function 0x8000_0020_EBX_x0[2]: L3SBE - L3 external slow memory bandwidth enforcement. CXL.memory is the only supported "slow" memory device. With SMBA, the hardware enables bandwidth allocation on the slow memory devices. If there are multiple slow memory devices in the system, then the throttling logic groups all the slow sources together and applies the limit on them as a whole. The presence of the SMBA feature (with CXL.memory) is independent of whether slow memory device is actually present in the system. If there is no slow memory in the system, then setting a SMBA limit will have no impact on the performance of the system. Presence of CXL memory can be identified by the numactl command: $numactl -H available: 2 nodes (0-1) node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 node 0 size: 63678 MB node 0 free: 59542 MB node 1 cpus: node 1 size: 16122 MB node 1 free: 15627 MB node distances: node 0 1 0: 10 50 1: 50 10 CPU list for CXL memory will be empty. The cpu-cxl node distance is greater than cpu-to-cpu distances. Node 1 has the CXL memory in this case. CXL memory can also be identified using ACPI SRAT table and memory maps. Feature description is available in the specification, "AMD64 Technology Platform Quality of Service Extensions, Revision: 1.03 Publication # 56375 Revision: 1.03 Issue Date: February 2022" at https://bugzilla.kernel.org/attachment.cgi?id=301365 See also https://www.amd.com/en/support/tech-docs/amd64-technology-platform-quality-service-extensions Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Link: https://lore.kernel.org/r/20230113152039.770054-3-babu.moger@amd.com commit fc3b618c87833e4d258b66acfca3557c49c4fe97 Author: Babu Moger Date: Fri Jan 13 09:20:27 2023 -0600 x86/resctrl: Replace smp_call_function_many() with on_each_cpu_mask() on_each_cpu_mask() runs the function on each CPU specified by cpumask, which may include the local processor. Replace smp_call_function_many() with on_each_cpu_mask() to simplify the code. Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Link: https://lore.kernel.org/r/20230113152039.770054-2-babu.moger@amd.com commit 7df2524bd69e10f4c8f0c7346bcad57903329e85 Author: Tomi Valkeinen Date: Mon Jan 23 12:47:38 2023 +0200 drm: rcar-du: lvds: Add reset control Reset LVDS using the reset control as CPG reset/release is required in the hardware manual sequence. Based on a BSP patch from Koji Matsuoka . Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 0e3a3d553f0c5d832d016207a8a2e3f67195bbcc Author: Tomi Valkeinen Date: Mon Jan 23 12:47:37 2023 +0200 drm: rcar-du: lvds: Add runtime PM Add simple runtime PM suspend and resume functionality. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 686cd4fdf53c39fc85fc816fdfe839b34efdbbdf Author: Tomi Valkeinen Date: Mon Jan 23 12:47:36 2023 +0200 drm: rcar-du: dsi: Add 'select RESET_CONTROLLER' The RCAR DSI driver uses reset controller, so we should select it in the Kconfig. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 3ff52ed2e812ef8db61e2be72975b22b83cef6da Author: Markuss Broks Date: Sat Jan 21 22:18:43 2023 +0200 ARM: dts: exynos: Use Exynos5422 compatible for the DSI controller The driver adding support for Exynos5422/Exynos5800 DSI controller was merged in 2016, yet it wasn't actually used. Add a proper compatible for it. Signed-off-by: Markuss Broks Link: https://lore.kernel.org/r/20230121201844.46872-3-markuss.broks@gmail.com Signed-off-by: Krzysztof Kozlowski commit 5d5aa219a790d61cad2c38e1aa32058f16ad2f0b Author: Markuss Broks Date: Sat Jan 21 22:18:42 2023 +0200 ARM: dts: exynos: Use Exynos5420 compatible for the MIPI video phy For some reason, the driver adding support for Exynos5420 MIPI phy back in 2016 wasn't used on Exynos5420, which caused a kernel panic. Add the proper compatible for it. Signed-off-by: Markuss Broks Link: https://lore.kernel.org/r/20230121201844.46872-2-markuss.broks@gmail.com Signed-off-by: Krzysztof Kozlowski commit c27e7d263a9aa390760edd0a8f43789a4c855378 Author: Krzysztof Kozlowski Date: Fri Jan 20 16:54:04 2023 +0100 ARM: dts: exynos: correct HSI2C properties in Exynos5410 Odroid XU The HSI2C controller uses clock-frequency and does not have i2c-sda-delay. The properties were copy-pasted from the slower S3C-family I2C controller: exynos5410-odroidxu.dtb: i2c@12ca0000: Unevaluated properties are not allowed ('samsung,i2c-max-bus-freq', 'samsung,i2c-sda-delay' were unexpected) Link: https://lore.kernel.org/r/20230120155404.323386-12-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 18d5a7fddbd7d5e8bd09ff18432208a47ef9ff30 Author: Krzysztof Kozlowski Date: Fri Jan 20 16:54:03 2023 +0100 ARM: dts: exynos: correct HS200 property in Exynos5260 There is no supports-hs200-mode property for MMC nodes, so assume intention was mmc-hs200-1_8v: exynos5260-xyref5260.dtb: mmc@12140000: Unevaluated properties are not allowed ('supports-hs200-mode' was unexpected) Link: https://lore.kernel.org/r/20230120155404.323386-11-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 88e7764497d48836f0f6684bda379c1c469b163b Author: Krzysztof Kozlowski Date: Fri Jan 20 16:54:02 2023 +0100 ARM: dts: exynos: correct SATA clocks in Exynos5250 The DT schema expects clock name matching certain patterns: exynos5250-smdk5250.dtb: sata@122f0000: clock-names:1: 'oneOf' conditional failed, one must be fixed: 'sclk_sata' is not one of ['pclk', 'aclk', 'hclk', 'sata'] 'pmalive' was expected 'rxoob' was expected 'ref' was expected Link: https://lore.kernel.org/r/20230120155404.323386-10-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 177c86fa30fa2acce4a6d085b7b4d1d6624fea81 Author: Krzysztof Kozlowski Date: Fri Jan 20 16:54:01 2023 +0100 ARM: dts: exynos: align HSOTG/USB node names The DT schema expect HSOTG node names to be named "usb": exynos4210-smdkv310.dtb: hsotg@12480000: $nodename:0: 'hsotg@12480000' does not match '^usb(@.*)?' Link: https://lore.kernel.org/r/20230120155404.323386-9-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 502497a1fd1efcb3958c57ffb3fa498fcacf67fa Author: Krzysztof Kozlowski Date: Fri Jan 20 16:54:00 2023 +0100 ARM: dts: exynos: add backlight supply in P4 Note The LCD backlight should have a supply. Use same regulator as LCD, to silence warning: exynos4412-p4note-n8010.dtb: backlight: 'power-supply' is a required property Link: https://lore.kernel.org/r/20230120155404.323386-8-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit fca9acd1a9d9922e316fe906d6facfb493cd2c36 Author: Krzysztof Kozlowski Date: Fri Jan 20 16:53:59 2023 +0100 ARM: dts: exynos: add panel supply in Tiny4412 The simple panel should have a supply. Provide a stub, as the board DTS does not have a PMIC node, to silence warning: exynos4412-tiny4412.dtb: panel: 'power-supply' is a required property Link: https://lore.kernel.org/r/20230120155404.323386-7-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit e0962736d66a1504f160bd6e8f9dd4ca22249a2b Author: Krzysztof Kozlowski Date: Fri Jan 20 16:53:58 2023 +0100 ARM: dts: exynos: add ports in HDMI bridge in Exynos4412 Midas The SII9234 HDMI bridge expects ports property: exynos4412-i9305.dtb: hdmi-bridge@39: 'ports' is a required property exynos4412-i9305.dtb: hdmi-bridge@39: 'port' does not match any of the regexes: 'pinctrl-[0-9]+' Link: https://lore.kernel.org/r/20230120155404.323386-6-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Tested-by: Henrik Grimler commit 8681e3663411ee6b64dd0714b23f5c86f64f7533 Author: Thierry Reding Date: Fri Jan 20 18:31:02 2023 +0100 drm/simpledrm: Support the XB24/AB24 format Add XB24 and AB24 to the list of supported formats. The format helpers support conversion to these formats and they are documented in the simple-framebuffer device tree bindings. Reviewed-by: Thomas Zimmermann Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20230120173103.4002342-8-thierry.reding@gmail.com commit 05f0430f923851048f800bbf03ba10e5beca376c Author: Lukas Wunner Date: Mon Jan 16 12:14:30 2023 +0100 mmc: pwrseq_sd8787: Allow being built-in irrespective of dependencies pwrseq_sd8787 is forced to be built as a module if its dependencies are. That's unnecessary, it's perfectly fine for it to be built-in even though the wireless drivers that need it are modules. Relax the depends definition in Kconfig accordingly. Signed-off-by: Lukas Wunner Cc: Matt Ranostay Cc: Lubomir Rintel Cc: Claudiu Beznea Link: https://lore.kernel.org/r/8bb3d7c3a36985e030ba40e853c57578de8fb303.1673866725.git.lukas@wunner.de Signed-off-by: Ulf Hansson commit 671112068ab961f8188d923992740dedd9e84750 Author: Andreas Kemnade Date: Sun Jan 15 20:52:12 2023 +0100 dt-bindings: mmc: fsl-imx-esdhc: Add some compatible fallbacks Currently make dtbs_check shows lots of errors because imx*.dtsi does not use single compatibles but combinations of them. Add fallbacks for imx6sll/ull which are useful for U-Boot. This will significantly reduce noise on make dtbs_check. Signed-off-by: Andreas Kemnade Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230115195212.2530087-1-andreas@kemnade.info Signed-off-by: Ulf Hansson commit 883e5ac6ee82c55b2f69099399a4d26cc456c5af Author: Geert Uytterhoeven Date: Mon Jan 9 14:26:41 2023 +0100 dt-bindings: mmc: renesas,sdhi: Fix RZ/V2M clock description The SD Card/MMC interface on the Renesas RZ/V2M SoC uses 4 clocks, like on RZ/G2L SoCs. The current description specifies 3 clocks, like on R-Car Gen3, which will lead to "make dtbs_check" failures: arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dtb: mmc@85000000: clocks: [[3, 1, 18], [3, 1, 20], [3, 1, 19], [3, 1, 17]] is too long From schema: Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml Fixes: c8dbdf2a1044951b ("dt-bindings: mmc: renesas,sdhi: Document RZ/V2M support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Fabrizio Castro Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/054c9f4dbb0bb1525f780d1e85c724436465c20c.1673270716.git.geert+renesas@glider.be Signed-off-by: Ulf Hansson commit 95921151e04335e9e2ddf4f294405e64be4ea947 Author: Liming Sun Date: Wed Jan 11 13:14:58 2023 -0500 mmc: sdhci-of-dwcmshc: enable host V4 support for BlueField-3 SoC This commit enables SDHCI Host V4 support on Bluefield-3 SoC to be consistent with the default setting in firmware(UEFI). Reviewed-by: David Woods Signed-off-by: Liming Sun Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/990885f566c32ac8e6888ad6b434fb70d1a5d7af.1673460632.git.limings@nvidia.com Signed-off-by: Ulf Hansson commit 681b9596ed9eeabdc8be08f9b07c3b311ff138d1 Author: Adrian Hunter Date: Fri Jan 13 13:00:11 2023 +0200 mmc: sdhci: Remove SDHCI_QUIRK_MISSING_CAPS Now that it is no longer used, remove SDHCI_QUIRK_MISSING_CAPS. Note, from now on, __sdhci_read_caps() should be used to provide missing capability flags. Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20230113110011.129835-7-adrian.hunter@intel.com Signed-off-by: Ulf Hansson commit f3200164b47922f7a4cb8a8504046d0b3b8d143b Author: Adrian Hunter Date: Fri Jan 13 13:00:10 2023 +0200 mmc: sdhci-iproc: Replace SDHCI_QUIRK_MISSING_CAPS SDHCI_QUIRK_MISSING_CAPS is not needed because __sdhci_read_caps() can be called instead. In preparation to get rid of SDHCI_QUIRK_MISSING_CAPS, replace SDHCI_QUIRK_MISSING_CAPS with __sdhci_read_caps(). __sdhci_read_caps() is also called from sdhci_setup_host() via sdhci_read_caps(), however only the first call to __sdhci_read_caps() does anything because after that host->read_caps has been set to true. Note, __sdhci_read_caps() does more than just set host->caps, such as do a reset, so calling __sdhci_read_caps() earlier could have unforeseen side-effects. However the code flow has been reviewed with that in mind. Signed-off-by: Adrian Hunter Acked-by: Scott Branden Link: https://lore.kernel.org/r/20230113110011.129835-6-adrian.hunter@intel.com Signed-off-by: Ulf Hansson commit 4f1896ddf6ec0a393a84a5559cd99f1be55d3d71 Author: Adrian Hunter Date: Fri Jan 13 13:00:09 2023 +0200 mmc: sdhci-pxav3: Replace SDHCI_QUIRK_MISSING_CAPS SDHCI_QUIRK_MISSING_CAPS is not needed because sdhci_read_caps() can be called instead. In preparation to get rid of SDHCI_QUIRK_MISSING_CAPS, replace SDHCI_QUIRK_MISSING_CAPS with sdhci_read_caps(). __sdhci_read_caps() is also called from sdhci_setup_host() via sdhci_read_caps(), however only the first call to __sdhci_read_caps() does anything because after that host->read_caps has been set to true. Note, __sdhci_read_caps() does more than just set host->caps, such as do a reset, so calling __sdhci_read_caps() earlier could have unforeseen side-effects. However the code flow has been reviewed with that in mind. Signed-off-by: Adrian Hunter Reviewed-by: Jisheng Zhang Link: https://lore.kernel.org/r/20230113110011.129835-5-adrian.hunter@intel.com Signed-off-by: Ulf Hansson commit 924ea310a5a2b3091bca5753f351f908019d2c64 Author: Adrian Hunter Date: Fri Jan 13 13:00:08 2023 +0200 mmc: sdhci-sprd: Replace SDHCI_QUIRK_MISSING_CAPS SDHCI_QUIRK_MISSING_CAPS is not needed because sdhci_read_caps() can be called instead. In preparation to get rid of SDHCI_QUIRK_MISSING_CAPS, replace SDHCI_QUIRK_MISSING_CAPS with sdhci_read_caps(). __sdhci_read_caps() is also called from sdhci_setup_host() via sdhci_read_caps(), however only the first call to __sdhci_read_caps() does anything because after that host->read_caps has been set to true. Note, __sdhci_read_caps() does more than just set host->caps, such as do a reset, so calling __sdhci_read_caps() earlier could have unforeseen side-effects. However the code flow has been reviewed with that in mind. Signed-off-by: Adrian Hunter Acked-by: Chunyan Zhang Link: https://lore.kernel.org/r/20230113110011.129835-4-adrian.hunter@intel.com Signed-off-by: Ulf Hansson commit 759329ed7aa58da283fde300227b7a979744f0fd Author: Adrian Hunter Date: Fri Jan 13 13:00:07 2023 +0200 mmc: sdhci-brcmstb: Replace SDHCI_QUIRK_MISSING_CAPS SDHCI_QUIRK_MISSING_CAPS is not needed because sdhci_read_caps() can be called instead. In preparation to get rid of SDHCI_QUIRK_MISSING_CAPS, replace SDHCI_QUIRK_MISSING_CAPS with sdhci_read_caps(). __sdhci_read_caps() is also called from sdhci_setup_host() via sdhci_read_caps(), however only the first call to __sdhci_read_caps() does anything because after that host->read_caps has been set to true. Note, __sdhci_read_caps() does more than just set host->caps, such as do a reset, so calling __sdhci_read_caps() earlier could have unforeseen side-effects. However the code flow has been reviewed with that in mind. Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20230113110011.129835-3-adrian.hunter@intel.com Signed-off-by: Ulf Hansson commit 8e0ec111c67e90f9e51f189c8bb09f75194962ee Author: Adrian Hunter Date: Fri Jan 13 13:00:06 2023 +0200 mmc: sdhci-pci: Replace SDHCI_QUIRK_MISSING_CAPS for Ricoh controller SDHCI_QUIRK_MISSING_CAPS is not needed because __sdhci_read_caps() can be called instead. In preparation to get rid of SDHCI_QUIRK_MISSING_CAPS, replace SDHCI_QUIRK_MISSING_CAPS with __sdhci_read_caps() for Ricoh SDHCI controller. __sdhci_read_caps() is also called from sdhci_setup_host() via sdhci_read_caps(), however only the first call to __sdhci_read_caps() does anything because after that host->read_caps has been set to true. Note, __sdhci_read_caps() does more than just set host->caps, such as do a reset, so calling __sdhci_read_caps() earlier could have unforeseen side-effects. However the code flow has been reviewed with that in mind. Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20230113110011.129835-2-adrian.hunter@intel.com Signed-off-by: Ulf Hansson commit 930ba0cb7db2f67f80f950df914e35d00df86264 Author: Geert Uytterhoeven Date: Tue Jan 3 17:38:51 2023 +0100 mmc: sdio: Spelling s/compement/complement/ Fix a misspelling of "complement". Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/a650c8b930a30f5902f4fcfe23877314d098abde.1672763862.git.geert+renesas@glider.be Signed-off-by: Ulf Hansson commit b0197e47a5022c750ce03fed6978fa88ef39b631 Author: Tom Fitzhenry Date: Thu Dec 29 01:23:54 2022 +1100 mmc: pwrseq_simple: include deferred probe reasons This adds a reason to /sys/kernel/debug/devices_deferred, which makes it easier to debug deferred probes such as [0]. 0. https://lore.kernel.org/all/20221228140708.26431-1-tom@tom-fitzhenry.me.uk/ Signed-off-by: Tom Fitzhenry Link: https://lore.kernel.org/r/20221228142354.28454-1-tom@tom-fitzhenry.me.uk Signed-off-by: Ulf Hansson commit 90ca969f427200788f8b54d407cc04cf7e7c8626 Author: Peng Fan Date: Fri Dec 23 11:03:47 2022 +0800 dt-bindings: mmc: fsl-imx-esdhc: update binding for i.MX50 and i.MX7D i.MX50 eSDHC is compatible with i.MX53. i.MX7D uSDHC is compatible with i.MX6SL. So update for them. Signed-off-by: Peng Fan Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221223030347.17093-1-peng.fan@oss.nxp.com Signed-off-by: Ulf Hansson commit 52e4c32baed2a4c79e20a82dc22e307499759852 Author: Haibo Chen Date: Fri Dec 23 10:50:22 2022 +0800 mmc: sdhci-esdhc-imx: only enable DAT[0] and CMD line auto tuning for SDIO device USDHC IP has one limitation: the tuning circuit can't handle the async sdio device interrupt correctly. When sdio device use 4 data lines, async sdio interrupt will use the shared DAT[1], if enable auto tuning circuit to check these 4 data lines, include the DAT[1], this circuit will detect this interrupt, take this as data on DAT[1], and adjust the delay cell wrongly, finally will cause the DATA/CMD CRC error. So for SDIO device, only enable DAT[0] and CMD line for auto tuning. To distinguish the card type during card init, involve init_card(). Signed-off-by: Haibo Chen Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20221223025022.1893102-3-haibo.chen@nxp.com Signed-off-by: Ulf Hansson commit c8c49a5a0b2be2da993cee2a2d7fbb5994e47d7a Author: Haibo Chen Date: Fri Dec 23 10:50:21 2022 +0800 mmc: sdhci-esdhc-imx: simplify the auto tuning logic Clear auto tuning bit when reset tuning, and enable auto tuning only after tuning done successfully for both standard tuning and manual tuning. Signed-off-by: Haibo Chen Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20221223025022.1893102-2-haibo.chen@nxp.com Signed-off-by: Ulf Hansson commit 08e03039e0000a7ec7ba13dc18bddc6afd32cb27 Author: Fabrizio Castro Date: Tue Dec 13 23:01:28 2022 +0000 mmc: renesas_sdhi: Add RZ/V2M compatible string The SDHI/eMMC IPs found with the RZ/V2M (a.k.a. r9a09g011), are very similar to the ones found in R-Car Gen3, but they are not exactly the same, and as a result need an SoC specific compatible string for fine tuning driver support. Signed-off-by: Fabrizio Castro Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/20221213230129.549968-4-fabrizio.castro.jz@renesas.com Signed-off-by: Ulf Hansson commit c9dc89944b66abf9aa0ad57aa45e4edf030e2441 Author: Fabrizio Castro Date: Tue Dec 13 23:01:27 2022 +0000 dt-bindings: mmc: renesas,sdhi: Document RZ/V2M support Document support for the SD Card/MMC interface on the Renesas RZ/V2M (a.k.a. r9a09g011) SoC. Signed-off-by: Fabrizio Castro Acked-by: Rob Herring Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/20221213230129.549968-3-fabrizio.castro.jz@renesas.com Signed-off-by: Ulf Hansson commit 32e54254bab86529f6adcfd7fec6fae29a6ed4ff Author: Heiner Kallweit Date: Thu Jan 19 23:56:37 2023 +0100 net: mdio: mux-meson-g12a: use devm_clk_get_enabled to simplify the code Use devm_clk_get_enabled() to simplify the code. Signed-off-by: Heiner Kallweit Reviewed-by: Jerome Brunet Signed-off-by: David S. Miller commit e3e9fc7fa7ad221cc2e7b207d514cc84ed393251 Merge: dd2f003e4e85b 2241ab53cbb5c Author: Greg Kroah-Hartman Date: Mon Jan 23 15:38:08 2023 +0100 Merge 6.2-rc5 into usb-next We need the USB fixes in here and this resolves merge conflicts as reported in linux-next in the following files: drivers/usb/host/xhci.c drivers/usb/host/xhci.h drivers/usb/typec/ucsi/ucsi.c Reported-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman commit d408ec0b5d9acc2d2f276946adf167095eb59740 Author: Andy Shevchenko Date: Thu Jan 19 19:50:10 2023 +0200 net: mdiobus: Convert to use fwnode_device_is_compatible() Replace open coded fwnode_device_is_compatible() in the driver. Signed-off-by: Andy Shevchenko Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 54573f3ef96bfa346c62b6ce7835c6691c844fe6 Merge: 2636455b28cb4 2241ab53cbb5c Author: Greg Kroah-Hartman Date: Mon Jan 23 15:25:46 2023 +0100 Merge 6.2-rc5 into staging-next We need the staging fixes in here, and it resolves a merge conflict in: drivers/staging/vc04_services/include/linux/raspberrypi/vchiq.h Signed-off-by: Greg Kroah-Hartman commit 9abecb1d338c576bef90dd8c4f58485bc56b64ca Author: Thierry Reding Date: Fri Jan 20 18:31:01 2023 +0100 drm/format-helper: Support the AB24/XB24 formats Add a conversion helper for the AB24 and XB24 formats to use in drm_fb_blit(). Reviewed-by: Thomas Zimmermann Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20230120173103.4002342-7-thierry.reding@gmail.com commit 9a10c7e6519b3d4c2006b20b1675525b0da07e85 Author: Thierry Reding Date: Fri Jan 20 18:31:00 2023 +0100 drm/simpledrm: Add support for system memory framebuffers Simple framebuffers can be set up in system memory, which cannot be requested and/or I/O remapped using the I/O resource helpers. Add a separate code path that obtains system memory framebuffers from the reserved memory region referenced in the memory-region property. Reviewed-by: Thomas Zimmermann Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20230120173103.4002342-6-thierry.reding@gmail.com commit fa904b4cbc60afa042e59a07251f54aa208218ce Author: Thierry Reding Date: Fri Jan 20 18:30:59 2023 +0100 drm/simpledrm: Use struct iosys_map consistently The majority of the driver already uses struct iosys_map to encapsulate accesses to I/O remapped vs. system memory. Accesses via the screen base pointer still use __iomem annotations, which can lead to inconsistencies and conflicts with subsequent patches. Convert the screen base to a struct iosys_map as well for consistency and to avoid these issues. Reviewed-by: Thomas Zimmermann Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20230120173103.4002342-5-thierry.reding@gmail.com commit 1cd1b5c2f6ec91d2843bc1ff42bdacef97218ec6 Author: Thierry Reding Date: Fri Jan 20 18:30:58 2023 +0100 dt-bindings: reserved-memory: Support framebuffer reserved memory Document the "framebuffer" compatible string for reserved memory nodes to annotate reserved memory regions used for framebuffer carveouts. Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20230120173103.4002342-4-thierry.reding@gmail.com commit ed1055394134674110dc51c972a09bf37bd4672e Author: Thierry Reding Date: Fri Jan 20 18:30:57 2023 +0100 dt-bindings: display: simple-framebuffer: Document 32-bit BGR format This is a variant of the 32-bit RGB format where the red and blue components are swapped. Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20230120173103.4002342-3-thierry.reding@gmail.com commit 241d5852468688e428236f9f3589ed0a35fb20de Author: Thierry Reding Date: Fri Jan 20 18:30:56 2023 +0100 dt-bindings: display: simple-framebuffer: Support system memory framebuffers In order to support framebuffers residing in system memory, allow the memory-region property to override the framebuffer memory specification in the "reg" property. Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20230120173103.4002342-2-thierry.reding@gmail.com commit dc0b98a1758f0d2296349ca23ac88804b922e88d Author: David S. Miller Date: Mon Jan 23 13:57:39 2023 +0000 ethtool: Add and use ethnl_update_bool. Signed-off-by: David S. Miller commit 0b2a1a3938aad80fb19cb53cbbd4679eeb37e3a8 Author: Rafael J. Wysocki Date: Fri Jan 20 20:46:57 2023 +0100 driver core: class: Clear private pointer on registration failures Clear the class private pointer if __class_register() fails for it, so as to allow its users to verify that the class is usable by checking the value of that pointer. For consistency, clear that pointer before freeing the object pointed to by it in class_release(). Signed-off-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/4463268.LvFx2qVVIh@kreacher Signed-off-by: Greg Kroah-Hartman commit 025aea27732d3354b9bb797df8158a439f143bf4 Author: Krzysztof Kozlowski Date: Fri Jan 20 08:56:18 2023 +0100 dt-bindings: trivial-devices: document SPI dev compatibles Document existing SPI dev compatibles. Cc: Mark Brown Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230120075618.153664-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit ccbc6554ed66dc37778b8ed823bcaaabfb1731cf Author: Yang Yingliang Date: Tue Jan 10 21:18:05 2023 +0800 spi: atmel-quadspi: switch to use modern name Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20230110131805.2827248-4-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 747d4e2c5f0e0469ad6055849f99516ca4b03e82 Author: Yang Yingliang Date: Tue Jan 10 21:18:04 2023 +0800 spi: at91-usart: switch to use modern name Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20230110131805.2827248-3-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 398b6b310ec85eef9d98df5963d5ded18aa92ad8 Author: Yang Yingliang Date: Tue Jan 10 21:18:03 2023 +0800 spi: atmel: switch to use modern name Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20230110131805.2827248-2-yangyingliang@huawei.com Signed-off-by: Mark Brown commit f337703b229f6031a40199dfe050e04065cea0e8 Author: Cezary Rojewski Date: Mon Jan 23 13:21:44 2023 +0100 ASoC: Intel: avs: Simplify probe-component implementation There is no need for the probe-component to be part of the PCM component list as it does not make use of ASoC-topology and does not participate in creating any PCM streams. To achieve that, remove probe() and remove() functions. Fixes: ed914a2a45a4 ("ASoC: Intel: avs: Data probing soc-component") Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20230123122144.1356890-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 47bc8cf60e926d1fb0c5d990bf6f5e01e9b3352e Author: Srinivasa Rao Mandadapu Date: Thu Jan 12 13:00:17 2023 +0530 ASoC: qdsp6: audioreach: Add ADSP ready check Check for SPF readiness in prm driver probe to avoid race conditions during ADSP pil loading. This patch is to avoid, sending requests to ADSP before it's power domains are up and ready. Signed-off-by: Srinivasa Rao Mandadapu Tested-by: Ratna Deepthi Kudaravalli Link: https://lore.kernel.org/r/1673508617-27410-1-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown commit 42fc858cc7e3f9e7a5762b29f9daaf23a15e45ef Author: Chunxu Li Date: Tue Jan 10 17:26:23 2023 +0800 ASoC: mediatek: mt8186: add AFE_DAC_CON0 to volatile register list Mark AFE_DAC_CON0 as volatile since DSP firmware will access this register too. Signed-off-by: Chunxu Li Link: https://lore.kernel.org/r/20230110092623.13035-1-chunxu.li@mediatek.com Signed-off-by: Mark Brown commit 7a98143118799411cc09e3dfc0b2a6f12628f7db Merge: f3c6e128936e1 086cc0803550c Author: David S. Miller Date: Mon Jan 23 13:13:09 2023 +0000 Merge branch 'enetc-mac-merge-prep' Vladimir Oltean says: ==================== ENETC MAC Merge cleanup This is a preparatory patch set for MAC Merge layer support in enetc via ethtool. It does the following: - consolidates a software lockstep register write procedure for the pMAC - detects per-port frame preemption capability and only writes pMAC registers if a pMAC exists - stops enabling the pMAC by default Additionally, I noticed some build warnings in the driver which are new in this kernel version, so patch 1/6 fixes those. ==================== Signed-off-by: David S. Miller commit 086cc0803550c49c4a802707e40c1878f7c9a469 Author: Vladimir Oltean Date: Thu Jan 19 18:04:31 2023 +0200 net: enetc: stop auto-configuring the port pMAC The pMAC (ENETC_PFPMR_PMACE) is probably unconditionally enabled in the enetc driver to allow RX of preemptible packets and not see them as error frames. I don't know why TX preemption (ENETC_MMCSR_ME) is enabled though. With no way to say which traffic classes are preemptible (all are express by default), no preemptible frames would be transmitted anyway. Lastly, it may have been believed that the register write lock-step mode (now deleted) needed the pMAC to be enabled at all times. I don't know if that's true. However, I've checked that driver writes to PM1 registers do propagate through to the ENETC IP even when the pMAC is disabled. With such incomplete support for frame preemption, it's best to just remove whatever exists right now and come with something more coherent later. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 12717decb570ea457b2baa5ad36758c0c967c306 Author: Vladimir Oltean Date: Thu Jan 19 18:04:30 2023 +0200 net: enetc: implement software lockstep for port MAC registers Currently the enetc driver duplicates its writes to the PM0 registers also to PM1, but it doesn't do this consistently - for example we write to ENETC_PM0_MAXFRM but not to ENETC_PM1_MAXFRM. Create enetc_port_mac_wr() which writes both the PM0 and PM1 register with the same value (if frame preemption is supported on this port). Also create enetc_port_mac_rd() which reads from PM0 - the assumption being that PM1 contains just the same value. This will be necessary when we enable the MAC Merge layer properly, and the pMAC becomes operational. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 219355f1b093526fc980a202e4d48e8469c9a29c Author: Vladimir Oltean Date: Thu Jan 19 18:04:29 2023 +0200 net: enetc: stop configuring pMAC in lockstep with eMAC The MWLM bit (MAC write lock-step mode) allows register writes to the pMAC to be auto-performed whenever the corresponding eMAC register is written by the driver. This allows their configuration to remain in sync. The driver has set this bit since the initial commit, but it doesn't do anything, since the hardware feature doesn't work (and the bit has been removed from more recent versions of the documentation). The driver does attempt, more or less, to keep those MAC registers in sync by writing the same value once to e.g. ENETC_PM0_CMD_CFG (eMAC) and once to ENETC_PM1_CMD_CFG (pMAC). Because the lockstep feature doesn't work, that's what it will stick to. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 9c949e0b2f9ce2556287a82b5a95730e5cd370b5 Author: Vladimir Oltean Date: Thu Jan 19 18:04:28 2023 +0200 net: enetc: add definition for offset between eMAC and pMAC regs This is a preliminary patch which replaces the hardcoded 0x1000 present in other PM1 (port MAC 1, aka pMAC) register definitions, which is an offset to the PM0 (port MAC 0, aka eMAC) equivalent register. This definition will be used in more places by future code. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 94557a9a73b4fa01c77a1a7409e9376e55d7bb99 Author: Vladimir Oltean Date: Thu Jan 19 18:04:27 2023 +0200 net: enetc: detect frame preemption hardware capability Similar to other TSN features, query the Station Interface capability register to see whether preemption is supported on this port or not. On LS1028A, preemption is available on ports 0 and 2, but not on 1 and 3. This will allow us in the future to write the pMAC registers only on the ENETC ports where a pMAC actually exists. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit e3972399bb57f3c0172f69010bc7613b13f513a4 Author: Vladimir Oltean Date: Thu Jan 19 18:04:26 2023 +0200 net: enetc: build common object files into a separate module The build system is complaining about the following: enetc.o is added to multiple modules: fsl-enetc fsl-enetc-vf enetc_cbdr.o is added to multiple modules: fsl-enetc fsl-enetc-vf enetc_ethtool.o is added to multiple modules: fsl-enetc fsl-enetc-vf Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit f1942108461d31f44ecd0ea14bddfe3822a2629a Author: Athira Rajeev Date: Thu Jan 19 19:57:19 2023 +0530 perf test buildid: Fix shell string substitutions The perf test named “build id cache operations” skips with below error on some distros: <<>> 78: build id cache operations : test child forked, pid 111101 WARNING: wine not found. PE binaries will not be run. test binaries: /tmp/perf.ex.SHA1.PKz /tmp/perf.ex.MD5.Gt3 ./tests/shell/../pe-file.exe DEBUGINFOD_URLS= Adding 4abd406f041feb4f10ecde3fc30fd0639e1a91cb /tmp/perf.ex.SHA1.PKz: Ok build id: 4abd406f041feb4f10ecde3fc30fd0639e1a91cb ./tests/shell/buildid.sh: 69: ./tests/shell/buildid.sh: Bad substitution test child finished with -2 build id cache operations: Skip <<>> The test script "tests/shell/buildid.sh" uses some of the string substitution ways which are supported in bash, but not in "sh" or other shells. Above error on line number 69 that reports "Bad substitution" is: <<>> link=${build_id_dir}/.build-id/${id:0:2}/${id:2} <<>> Here the way of getting first two characters from id ie, ${id:0:2} and similarly expressions like ${id:2} is not recognised in "sh". So the line errors and instead of hitting failure, the test gets skipped as shown in logs. So the syntax issue causes test not to be executed in such cases. Similarly usage : "${@: -1}" [ to pick last argument passed to a function] in “test_record” doesn’t work in all distros. Fix this by using alternative way with shell substitution to pick required characters from the string. Also fix the usage of “${@: -1}” to work in all cases. Another usage in “test_record” is: <<>> ${perf} record --buildid-all -o ${data} $@ &> ${log} <<>> This causes the 'perf record' to start in background and Results in the data file not being created by the time "check" function is invoked. Below log shows 'perf record' result getting displayed after the call to "check" function. <<>> running: perf record /tmp/perf.ex.SHA1.EAU build id: 4abd406f041feb4f10ecde3fc30fd0639e1a91cb link: /tmp/perf.debug.mLT/.build-id/4a/bd406f041feb4f10ecde3fc30fd0639e1a91cb failed: link /tmp/perf.debug.mLT/.build-id/4a/bd406f041feb4f10ecde3fc30fd0639e1a91cb does not exist test child finished with -1 build id cache operations: FAILED! root@machine:~/athira/linux/tools/perf# Couldn't synthesize bpf events. [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.010 MB /tmp/perf.data.bFF ] <<>> Fix this by redirecting output instead of using “&” which starts the command in background. Reviewed-by: David Laight Signed-off-by: Athira Jajeev Tested-by: Disha Goel Acked-by: Ian Rogers Cc: Andi Kleen Cc: James Clark Cc: Jiri Olsa Cc: Kajol Jain Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Nageswara R Sastry Cc: Namhyung Kim Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230119142719.32628-1-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit fc5d836c6795a1e1991d2611a2338ffe06588b8a Author: Diederik de Haas Date: Sun Jan 22 13:20:32 2023 +0100 perf: Various spelling fixes Fix various spelling errors as reported by Debian's lintian tool. "amount of times" -> "number of times" ocurrence -> occurrence upto -> up to Signed-off-by: Diederik de Haas Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230122122034.48020-1-didi.debian@cknow.org Signed-off-by: Arnaldo Carvalho de Melo commit 7158005b4eb350900b3cce44b013e685869d0f08 Author: Naveen N. Rao Date: Mon Jan 23 14:02:24 2023 +0530 perf test: Switch basic bpf filtering test to use syscall tracepoint BPF filtering tests can sometime fail. Running the test in verbose mode shows the following: $ sudo perf test 42 42: BPF filter : 42.1: Basic BPF filtering : FAILED! 42.2: BPF pinning : Skip 42.3: BPF prologue generation : Skip $ perf --version perf version 4.18.0-425.3.1.el8.ppc64le $ sudo perf test -v 42 42: BPF filter : 42.1: Basic BPF filtering : --- start --- test child forked, pid 711060 ... bpf: config 'func=do_epoll_wait' is ok Looking at the vmlinux_path (8 entries long) Using /usr/lib/debug/lib/modules/4.18.0-425.3.1.el8.ppc64le/vmlinux for symbols Open Debuginfo file: /usr/lib/debug/.build-id/81/56f5a07f92ccb62c5600ba0e4aacfb5f3a7534.debug Try to find probe point from debuginfo. Matched function: do_epoll_wait [4ef8cb0] found inline addr: 0xc00000000061dbe4 Probe point found: __se_compat_sys_epoll_pwait+196 found inline addr: 0xc00000000061d9f4 Probe point found: __se_sys_epoll_pwait+196 found inline addr: 0xc00000000061d824 Probe point found: __se_sys_epoll_wait+36 Found 3 probe_trace_events. Opening /sys/kernel/tracing//kprobe_events write=1 ... BPF filter result incorrect, expected 56, got 56 samples test child finished with -1 ---- end ---- BPF filter subtest 1: FAILED! The statement above about the result being incorrect looks weird, and it is due to that particular perf build missing commit 3e11300cdfd5f1 ("perf test: Fix bpf test sample mismatch reporting"). In reality, due to commit 4b04e0decd2518 ("perf test: Fix basic bpf filtering test"), perf expects there to be 56*3 samples. However, the number of samples we receive is going to be dependent on where the probes are installed, which is dependent on where do_epoll_wait gets inlined. On s390x, it looks like probes at all the inlined locations are hit. But, that is not the case on ppc64le. Fix this by switching the test to instead use the syscall tracepoint. This ensures that we will only ever install a single event enabling us to reliably determine the sample count. Reported-by: Disha Goel Signed-off-by: Naveen N. Rao Cc: Kajol Jain Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20230123083224.276404-1-naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 91f67b9a6472a243e2c0630f637ddff0af08038e Merge: 5670ebf54bd26 2475bf0250dee Author: Arnaldo Carvalho de Melo Date: Mon Jan 23 09:56:00 2023 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core To pick fixes that went via perf/urgent. Signed-off-by: Arnaldo Carvalho de Melo commit f3c6e128936e11e62d0af3c52f756194d79cf2e2 Merge: 40e0b09081420 6505b68056558 Author: David S. Miller Date: Mon Jan 23 12:44:18 2023 +0000 Merge branch 'ethtool-mac-merge' Vladimir Oltean says: ==================== ethtool support for IEEE 802.3 MAC Merge layer Change log ---------- v3->v4: - add missing opening bracket in ocelot_port_mm_irq() - moved cfg.verify_time range checking so that it actually takes place for the updated rather than old value v3 at: https://patchwork.kernel.org/project/netdevbpf/cover/20230117085947.2176464-1-vladimir.oltean@nxp.com/ v2->v3: - made get_mm return int instead of void - deleted ETHTOOL_A_MM_SUPPORTED - renamed ETHTOOL_A_MM_ADD_FRAG_SIZE to ETHTOOL_A_MM_TX_MIN_FRAG_SIZE - introduced ETHTOOL_A_MM_RX_MIN_FRAG_SIZE - cleaned up documentation - rebased on top of PLCA changes - renamed ETHTOOL_STATS_SRC_* to ETHTOOL_MAC_STATS_SRC_* v2 at: https://patchwork.kernel.org/project/netdevbpf/cover/20230111161706.1465242-1-vladimir.oltean@nxp.com/ v1->v2: I've decided to focus just on the MAC Merge layer for now, which is why I am able to submit this patch set as non-RFC. v1 (RFC) at: https://patchwork.kernel.org/project/netdevbpf/cover/20220816222920.1952936-1-vladimir.oltean@nxp.com/ What is being introduced ------------------------ TL;DR: a MAC Merge layer as defined by IEEE 802.3-2018, clause 99 (interspersing of express traffic). This is controlled through ethtool netlink (ETHTOOL_MSG_MM_GET, ETHTOOL_MSG_MM_SET). The raw ethtool commands are posted here: https://patchwork.kernel.org/project/netdevbpf/cover/20230111153638.1454687-1-vladimir.oltean@nxp.com/ The MAC Merge layer has its own statistics counters (ethtool --include-statistics --show-mm swp0) as well as two member MACs, the statistics of which can be queried individually, through a new ethtool netlink attribute, corresponding to: $ ethtool -I --show-pause eno2 --src aggregate $ ethtool -S eno2 --groups eth-mac eth-phy eth-ctrl rmon -- --src pmac The core properties of the MAC Merge layer are described in great detail in patches 02/12 and 03/12. They can be viewed in "make htmldocs" format. Devices for which the API is supported -------------------------------------- I decided to start with the Ethernet switch on NXP LS1028A (Felix) because of the smaller patch set. I also have support for the ENETC controller pending. I would like to get confirmation that the UAPI being proposed here will not restrict any use cases known by other hardware vendors. Why is support for preemptible traffic classes not here? -------------------------------------------------------- There is legitimate concern whether the 802.1Q portion of the standard (which traffic classes go to the eMAC and which to the pMAC) should be modeled in Linux using tc or using another UAPI. I think that is stalling the entire series, but should be discussed separately instead. Removing FP adminStatus support makes me confident enough to submit this patch set without an RFC tag (meaning: I wouldn't mind if it was merged as is). What is submitted here is sufficient for an LLDP daemon to do its job. I've patched openlldp to advertise and configure frame preemption: https://github.com/vladimiroltean/openlldp/tree/frame-preemption-v3 In case someone wants to try it out, here are some commands I've used. # Configure the interfaces to receive and transmit LLDP Data Units lldptool -L -i eno0 adminStatus=rxtx lldptool -L -i swp0 adminStatus=rxtx # Enable the transmission of certain TLVs on switch's interface lldptool -T -i eno0 -V addEthCap enableTx=yes lldptool -T -i swp0 -V addEthCap enableTx=yes # Query LLDP statistics on switch's interface lldptool -S -i swp0 # Query the received neighbor TLVs lldptool -i swp0 -t -n -V addEthCap Additional Ethernet Capabilities TLV Preemption capability supported Preemption capability enabled Preemption capability active Additional fragment size: 60 octets So using this patch set, lldpad will be able to advertise and configure frame preemption, but still, no data packet will be sent as preemptible over the link, because there is no UAPI to control which traffic classes are sent as preemptible and which as express. Preemptable or preemptible? --------------------------- IEEE 802.3 uses "preemptable" throughout. IEEE 802.1Q uses "preemptible" throughout. Because the definition of "preemptible" falls under 802.1Q's jurisdiction and 802.3 just references it, I went with the 802.1Q naming even where supporting an 802.3 feature. Also, checkpatch agrees with this. ==================== Signed-off-by: David S. Miller commit 6505b68056558357dc979d11921ed45cfd68ed69 Author: Vladimir Oltean Date: Thu Jan 19 14:27:04 2023 +0200 net: mscc: ocelot: add MAC Merge layer support for VSC9959 Felix (VSC9959) has a DEV_GMII:MM_CONFIG block composed of 2 registers (ENABLE_CONFIG and VERIF_CONFIG). Because the MAC Merge statistics and pMAC statistics are already in the Ocelot switch lib even if just Felix supports them, I'm adding support for the whole MAC Merge layer in the common Ocelot library too. There is an interrupt (shared with the PTP interrupt) which signals changes to the MM verification state. This is done because the preemptible traffic classes should be committed to hardware only once the verification procedure has declared the link partner of being capable of receiving preemptible frames. We implement ethtool getters and setters for the MAC Merge layer state. The "TX enabled" and "verify status" are taken from the IRQ handler, using a mutex to ensure serialized access. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit ab3f97a9610a8d90dc9934517e82c3272d4e98a0 Author: Vladimir Oltean Date: Thu Jan 19 14:27:03 2023 +0200 net: mscc: ocelot: export ethtool MAC Merge stats for Felix VSC9959 The Felix VSC9959 switch supports frame preemption and has a MAC Merge layer. In addition to the structured stats that exist for the eMAC, export the counters associated with its pMAC (pause, RMON, MAC, PHY, control) plus the high-level MAC Merge layer stats. The unstructured ethtool counters, as well as the rtnl_link_stats64 were left to report only the eMAC counters. Because statistics processing is quite self-contained in ocelot_stats.c now, I've opted for introducing an ocelot->mm_supported bool, based on which the common switch lib does everything, rather than pushing the TSN-specific code in felix_vsc9959.c, as happens for other TSN stuff. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 497eea9f8ed5987ade08e23725fdb0f25cd2ffcd Author: Vladimir Oltean Date: Thu Jan 19 14:27:02 2023 +0200 net: mscc: ocelot: hide access to ocelot_stats_layout behind a helper Some hardware instances of the ocelot driver support the MAC Merge layer, which gives access to an extra preemptible MAC. This has implications upon the statistics. There will be a stats layout when MM isn't supported, and a different one when it is. The ocelot_stats_layout() helper will return the correct one. In preparation of that, refactor the existing code to use this helper. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 1a733bbddfad466e2561acc8d86b9e5df2985c95 Author: Vladimir Oltean Date: Thu Jan 19 14:27:01 2023 +0200 net: mscc: ocelot: allow ocelot_stat_layout elements with no name We will add support for pMAC counters and MAC merge layer counters, which are only reported via the structured stats, and the current ocelot_get_strings() stands in our way, because it expects that the statistics should be placed in the data array at the same index as found in the ocelot_stats_layout array. That is not true. Statistics which don't have a name should not be exported to the unstructured ethtool -S, so we need to have different indices into the ocelot_stats_layout array (i) and into the data array (data itself). Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 5f6c2d498ad97cf9f85b81c0fbb205abbcdfe3f8 Author: Vladimir Oltean Date: Thu Jan 19 14:27:00 2023 +0200 net: dsa: add plumbing for changing and getting MAC merge layer state The DSA core is in charge of the ethtool_ops of the net devices associated with switch ports, so in case a hardware driver supports the MAC merge layer, DSA must pass the callbacks through to the driver. Add support for precisely that. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit dd1c41645039d3820a7dde40e11f601c56240c40 Author: Vladimir Oltean Date: Thu Jan 19 14:26:59 2023 +0200 net: ethtool: add helpers for MM fragment size translation We deliberately make the Linux UAPI pass the minimum fragment size in octets, even though IEEE 802.3 defines it as discrete values, and addFragSize is just the multiplier. This is because there is nothing impossible in operating with an in-between value for the fragment size of non-final preempted fragments, and there may even appear hardware which supports the in-between sizes. For the hardware which just understands the addFragSize multiplier, create two helpers which translate back and forth the values passed in octets. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 449c5459641ad72a504884abb9fb9b19ee31397b Author: Vladimir Oltean Date: Thu Jan 19 14:26:58 2023 +0200 net: ethtool: add helpers for aggregate statistics When a pMAC exists but the driver is unable to atomically query the aggregate eMAC+pMAC statistics, the user should be given back at least the sum of eMAC and pMAC counters queried separately. This is a generic problem, so add helpers in ethtool to do this operation, if the driver doesn't have a better way to report aggregate stats. Do this in a way that does not require changes to these functions when new stats are added (basically treat the structures as an array of u64 values, except for the first element which is the stats source). In include/linux/ethtool.h, there is already a section where helper function prototypes should be placed. The trouble is, this section is too early, before the definitions of struct ethtool_eth_mac_stats et.al. Move that section at the end and append these new helpers to it. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit c319df10a4c854bb2e1085c01e7a9f1dadd810a2 Author: Vladimir Oltean Date: Thu Jan 19 14:26:57 2023 +0200 docs: ethtool: document ETHTOOL_A_STATS_SRC and ETHTOOL_A_PAUSE_STATS_SRC Two new netlink attributes were added to PAUSE_GET and STATS_GET and their replies. Document them. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 04692c9020b76939715d6f2b4ff84d832246e0fc Author: Vladimir Oltean Date: Thu Jan 19 14:26:56 2023 +0200 net: ethtool: netlink: retrieve stats from multiple sources (eMAC, pMAC) IEEE 802.3-2018 clause 99 defines a MAC Merge sublayer which contains an Express MAC and a Preemptible MAC. Both MACs are hidden to higher and lower layers and visible as a single MAC (packet classification to eMAC or pMAC on TX is done based on priority; classification on RX is done based on SFD). For devices which support a MAC Merge sublayer, it is desirable to retrieve individual packet counters from the eMAC and the pMAC, as well as aggregate statistics (their sum). Introduce a new ETHTOOL_A_STATS_SRC attribute which is part of the policy of ETHTOOL_MSG_STATS_GET and, and an ETHTOOL_A_PAUSE_STATS_SRC which is part of the policy of ETHTOOL_MSG_PAUSE_GET (accepted when ETHTOOL_FLAG_STATS is set in the common ethtool header). Both of these take values from enum ethtool_mac_stats_src, defaulting to "aggregate" in the absence of the attribute. Existing drivers do not need to pay attention to this enum which was added to all driver-facing structures, just the ones which report the MAC merge layer as supported. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 3700000479f000c1254a53182b4b2c5b184ff171 Author: Vladimir Oltean Date: Thu Jan 19 14:26:55 2023 +0200 docs: ethtool-netlink: document interface for MAC Merge layer Show details about the structures passed back and forth related to MAC Merge layer configuration, state and statistics. The rendered htmldocs will be much more verbose due to the kerneldoc references. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 2b30f8291a30305eeedcd787b4d0e352410f7268 Author: Vladimir Oltean Date: Thu Jan 19 14:26:54 2023 +0200 net: ethtool: add support for MAC Merge layer The MAC merge sublayer (IEEE 802.3-2018 clause 99) is one of 2 specifications (the other being Frame Preemption; IEEE 802.1Q-2018 clause 6.7.2), which work together to minimize latency caused by frame interference at TX. The overall goal of TSN is for normal traffic and traffic with a bounded deadline to be able to cohabitate on the same L2 network and not bother each other too much. The standards achieve this (partly) by introducing the concept of preemptible traffic, i.e. Ethernet frames that have a custom value for the Start-of-Frame-Delimiter (SFD), and these frames can be fragmented and reassembled at L2 on a link-local basis. The non-preemptible frames are called express traffic, they are transmitted using a normal SFD, and they can preempt preemptible frames, therefore having lower latency, which can matter at lower (100 Mbps) link speeds, or at high MTUs (jumbo frames around 9K). Preemption is not recursive, i.e. a P frame cannot preempt another P frame. Preemption also does not depend upon priority, or otherwise said, an E frame with prio 0 will still preempt a P frame with prio 7. In terms of implementation, the standards talk about the presence of an express MAC (eMAC) which handles express traffic, and a preemptible MAC (pMAC) which handles preemptible traffic, and these MACs are multiplexed on the same MII by a MAC merge layer. To support frame preemption, the definition of the SFD was generalized to SMD (Start-of-mPacket-Delimiter), where an mPacket is essentially an Ethernet frame fragment, or a complete frame. Stations unaware of an SMD value different from the standard SFD will treat P frames as error frames. To prevent that from happening, a negotiation process is defined. On RX, packets are dispatched to the eMAC or pMAC after being filtered by their SMD. On TX, the eMAC/pMAC classification decision is taken by the 802.1Q spec, based on packet priority (each of the 8 user priority values may have an admin-status of preemptible or express). The MAC Merge layer and the Frame Preemption parameters have some degree of independence in terms of how software stacks are supposed to deal with them. The activation of the MM layer is supposed to be controlled by an LLDP daemon (after it has been communicated that the link partner also supports it), after which a (hardware-based or not) verification handshake takes place, before actually enabling the feature. So the process is intended to be relatively plug-and-play. Whereas FP settings are supposed to be coordinated across a network using something approximating NETCONF. The support contained here is exclusively for the 802.3 (MAC Merge) portions and not for the 802.1Q (Frame Preemption) parts. This API is sufficient for an LLDP daemon to do its job. The FP adminStatus variable from 802.1Q is outside the scope of an LLDP daemon. I have taken a few creative licenses and augmented the Linux kernel UAPI compared to the standard managed objects recommended by IEEE 802.3. These are: - ETHTOOL_A_MM_PMAC_ENABLED: According to Figure 99-6: Receive Processing state diagram, a MAC Merge layer is always supposed to be able to receive P frames. However, this implies keeping the pMAC powered on, which will consume needless power in applications where FP will never be used. If LLDP is used, the reception of an Additional Ethernet Capabilities TLV from the link partner is sufficient indication that the pMAC should be enabled. So my proposal is that in Linux, we keep the pMAC turned off by default and that user space turns it on when needed. - ETHTOOL_A_MM_VERIFY_ENABLED: The IEEE managed object is called aMACMergeVerifyDisableTx. I opted for consistency (positive logic) in the boolean netlink attributes offered, so this is also positive here. Other than the meaning being reversed, they correspond to the same thing. - ETHTOOL_A_MM_MAX_VERIFY_TIME: I found it most reasonable for a LLDP daemon to maximize the verifyTime variable (delay between SMD-V transmissions), to maximize its chances that the LP replies. IEEE says that the verifyTime can range between 1 and 128 ms, but the NXP ENETC stupidly keeps this variable in a 7 bit register, so the maximum supported value is 127 ms. I could have chosen to hardcode this in the LLDP daemon to a lower value, but why not let the kernel expose its supported range directly. - ETHTOOL_A_MM_TX_MIN_FRAG_SIZE: the standard managed object is called aMACMergeAddFragSize, and expresses the "additional" fragment size (on top of ETH_ZLEN), whereas this expresses the absolute value of the fragment size. - ETHTOOL_A_MM_RX_MIN_FRAG_SIZE: there doesn't appear to exist a managed object mandated by the standard, but user space clearly needs to know what is the minimum supported fragment size of our local receiver, since LLDP must advertise a value no lower than that. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 705159622cb8d7896a0c052deebd91e616da9bbf Author: Bagas Sanjaya Date: Sat Jan 21 11:00:14 2023 +0700 Documentation: coresight: tpdm: Add dummy comment after sysfs list kernel test robot reported htmldocs warning: Documentation/trace/coresight/coresight-tpdm.rst:43: WARNING: Document may not end with a transition. Since there is no more documentation left for TPDM, fix the warning by adding dummy comment, thus creating the required text transition. Link: https://lore.kernel.org/linux-doc/202301210955.zYxDrLgv-lkp@intel.com/ Fixes: 758d638667d474 ("Documentation: trace: Add documentation for TPDM and TPDA") Reported-by: kernel test robot Signed-off-by: Bagas Sanjaya Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230121040015.28139-3-bagasdotme@gmail.com commit ba0f3ae66c65c256b564c94a14411e4082496360 Author: Bagas Sanjaya Date: Sat Jan 21 11:00:13 2023 +0700 Documentation: coresight: Extend title heading syntax in TPDM and TPDA documentation kernel test robot reported htmldocs warnings: Documentation/trace/coresight/coresight-tpda.rst:3: WARNING: Title overline too short. Documentation/trace/coresight/coresight-tpdm.rst:3: WARNING: Title overline too short. Extend title heading syntax (overline and underline) to match title text to fix these warnings. While at it, trim unneeded period in the title text. Link: https://lore.kernel.org/linux-doc/202301210955.zYxDrLgv-lkp@intel.com/ Fixes: 758d638667d474 ("Documentation: trace: Add documentation for TPDM and TPDA") Reported-by: kernel test robot Signed-off-by: Bagas Sanjaya Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230121040015.28139-2-bagasdotme@gmail.com commit beeb107c5b354f4eaea17a9bca6ca8762f60effc Author: Johan Hovold Date: Thu Jan 19 17:42:52 2023 +0100 efi: efivars: add efivars printk prefix Add an 'efivars: ' printk prefix to make the log entries stand out more, for example: efivars: Registered efivars operations While at it, change the sole remaining direct printk() call to pr_err(). Signed-off-by: Johan Hovold Signed-off-by: Ard Biesheuvel commit 40e0b09081420853542571c38875b48b60404ebb Author: Peilin Ye Date: Thu Jan 19 16:45:16 2023 -0800 net/sock: Introduce trace_sk_data_ready() As suggested by Cong, introduce a tracepoint for all ->sk_data_ready() callback implementations. For example: <...> iperf-609 [002] ..... 70.660425: sk_data_ready: family=2 protocol=6 func=sock_def_readable iperf-609 [002] ..... 70.660436: sk_data_ready: family=2 protocol=6 func=sock_def_readable <...> Suggested-by: Cong Wang Signed-off-by: Peilin Ye Signed-off-by: David S. Miller commit d1e34a8abfd6c5ac196f278ac2c5633e3e35ee22 Author: Thierry Reding Date: Tue Nov 22 11:21:18 2022 +0100 ARM: tegra: Sort nodes by unit-address, then alphabetically Nodes in device tree should be sorted by unit-address, followed by nodes without a unit-address, sorted alphabetically. Some exceptions are the top-level aliases, chosen, firmware, memory and reserved-memory nodes, which are expected to come first. These rules apply recursively with some exceptions, such as pinmux nodes or regulator nodes, which often follow more complicated ordering (often by "importance"). While at it, change the name of some of the nodes to follow standard naming conventions, which helps with the sorting order and reduces the amount of warnings from the DT validation tools. Signed-off-by: Thierry Reding commit bbaf6624f23d6e538401382be97ba3d4bcba963e Author: ye xingchen Date: Thu Nov 17 19:39:32 2022 +0800 memory: ti-emif-pm: Use device_get_match_data() to simplify the code Directly get the match data with device_get_match_data(). Signed-off-by: ye xingchen Link: https://lore.kernel.org/r/202211171939327684154@zte.com.cn Signed-off-by: Krzysztof Kozlowski commit 27e5f98c30d73cdb8c8baeaf7d0af19af5266d3a Author: Geert Uytterhoeven Date: Wed Nov 23 15:41:22 2022 +0100 memory: renesas-rpc-if: Remove Runtime PM wrappers Now the rpcif_{en,dis}able_rpm() wrappers just take a pointer to a device structure, there is no point in keeping them. Remove them, and update the callers to call Runtime PM directly. Signed-off-by: Geert Uytterhoeven Acked-by: Wolfram Sang Link: https://lore.kernel.org/r/d87aa5d7e4a39b18f7e2e0649fee0a45b45d371f.1669213027.git.geert+renesas@glider.be Signed-off-by: Krzysztof Kozlowski commit a198fcd1d53cbaf616d94822921c77910b94edb7 Author: Geert Uytterhoeven Date: Wed Nov 23 15:41:21 2022 +0100 memory: renesas-rpc-if: Pass device instead of rpcif to rpcif_*() Most rpcif_*() API functions do not need access to any other fields in the rpcif structure than the device pointer. Simplify dependencies by passing the device pointer instead. Signed-off-by: Geert Uytterhoeven Acked-by: Miquel Raynal Acked-by: Mark Brown Acked-by: Wolfram Sang Link: https://lore.kernel.org/r/0460fe82ba348cedec7a9a75a8eff762c50e817b.1669213027.git.geert+renesas@glider.be Signed-off-by: Krzysztof Kozlowski commit bb0b025d72d22b8617df920b61f5ae1e23d1b593 Author: Geert Uytterhoeven Date: Wed Nov 23 15:41:20 2022 +0100 memory: renesas-rpc-if: Improve Runtime PM handling Convert from the deprecated pm_runtime_get_sync() to the new pm_runtime_resume_and_get(), and add error checking. Signed-off-by: Geert Uytterhoeven Acked-by: Wolfram Sang Link: https://lore.kernel.org/r/6f2bd3b2b3d98c5bed541d969900b2ad04f93943.1669213027.git.geert+renesas@glider.be Signed-off-by: Krzysztof Kozlowski commit d5ab2e8c7dd2cdcc676d7383b6b1b31e2c4d805c Author: Geert Uytterhoeven Date: Wed Nov 23 15:41:19 2022 +0100 memory: renesas-rpc-if: Always use dev in rpcif_probe() rpcif_probe() already has a "dev" variable pointing to the right device structure, so there is no need to take a detour through the platform device. Signed-off-by: Geert Uytterhoeven Acked-by: Wolfram Sang Link: https://lore.kernel.org/r/298009c43ad119703f564c0f1864743914b4beeb.1669213027.git.geert+renesas@glider.be Signed-off-by: Krzysztof Kozlowski commit 8b3580df15f53045fda3ffae53f74575c96aa77e Author: Geert Uytterhoeven Date: Wed Nov 23 15:41:18 2022 +0100 memory: renesas-rpc-if: Move resource acquisition to .probe() While the acquired resources are tied to the lifetime of the RPC-IF core device (through the use of managed resource functions), the actual resource acquisition is triggered from the HyperBus and SPI child drivers. Due to this mismatch, unbinding and rebinding the child drivers manually fails with -EBUSY: # echo rpc-if-hyperflash > /sys/bus/platform/drivers/rpc-if-hyperflash/unbind # echo rpc-if-hyperflash > /sys/bus/platform/drivers/rpc-if-hyperflash/bind rpc-if ee200000.spi: can't request region for resource [mem 0xee200000-0xee2001ff] rpc-if-hyperflash: probe of rpc-if-hyperflash failed with error -16 The same is true for rpc-if-spi. Fix this by moving all resource acquisition to the core driver's probe routine. Fixes: ca7d8b980b67 ("memory: add Renesas RPC-IF driver") Signed-off-by: Geert Uytterhoeven Acked-by: Wolfram Sang Link: https://lore.kernel.org/r/c1012ef1de799e08a70817ab7313794e2d8d7bfb.1669213027.git.geert+renesas@glider.be Signed-off-by: Krzysztof Kozlowski commit 51de3fc9a84d8e99dd3f02536a623f9fb95d0c0a Author: Geert Uytterhoeven Date: Wed Nov 23 15:41:17 2022 +0100 memory: renesas-rpc-if: Split-off private data from struct rpcif The rpcif structure is used as a common data structure, shared by the RPC-IF core driver and by the HyperBus and SPI child drivers. This poses several problems: - Most structure members describe private core driver state, which should not be accessible by the child drivers, - The structure's lifetime is controlled by the child drivers, complicating use by the core driver. Fix this by moving the private core driver state to its own structure, managed by the RPC-IF core driver, and store it in the core driver's private data field. This requires absorbing the child's platform device, as that was stored in the driver's private data field before. Fixes: ca7d8b980b67 ("memory: add Renesas RPC-IF driver") Signed-off-by: Geert Uytterhoeven Acked-by: Wolfram Sang Link: https://lore.kernel.org/r/09fbb6fa67d5a8cd48a08808c9afa2f6a499aa42.1669213027.git.geert+renesas@glider.be Signed-off-by: Krzysztof Kozlowski commit ebed787a0becb9354f0a23620a5130cccd6c730c Author: Daniel Golle Date: Thu Jan 19 03:45:43 2023 +0000 mtd: spinand: macronix: use scratch buffer for DMA operation The mx35lf1ge4ab_get_eccsr() function uses an SPI DMA operation to read the eccsr, hence the buffer should not be on stack. Since commit 380583227c0c7f ("spi: spi-mem: Add extra sanity checks on the op param") the kernel emmits a warning and blocks such operations. Use the scratch buffer to get eccsr instead of trying to directly read into a stack-allocated variable. Signed-off-by: Daniel Golle Reviewed-by: Dhruva Gole Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/Y8i85zM0u4XdM46z@makrotopia.org commit 43651e60aa167974955b23f73a25eb79886ab6d0 Author: Miquel Raynal Date: Mon Jan 16 10:47:35 2023 +0100 mtd: rawnand: Fix nand_chip kdoc Describe the continuous read nand_chip fields to avoid the following htmldocs warning: include/linux/mtd/rawnand.h:1325: warning: Function parameter or member 'cont_read' not described in 'nand_chip' Reported-by: Stephen Rothwell Fixes: 003fe4b9545b ("mtd: rawnand: Support for sequential cache reads") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230116094735.11483-1-miquel.raynal@bootlin.com commit fa7bee867db1913560435a7486d17d95500a62dc Author: Demi Marie Obenour Date: Thu Jan 19 14:04:00 2023 -0500 efi: Warn if trying to reserve memory under Xen Doing so cannot work and should never happen. Signed-off-by: Demi Marie Obenour Tested-by: Marek Marczykowski-Górecki Signed-off-by: Ard Biesheuvel commit 01de145dc7fbb5e6aba98655c062908a74fa511c Author: Demi Marie Obenour Date: Thu Jan 19 14:03:59 2023 -0500 efi: Actually enable the ESRT under Xen The ESRT can be parsed if EFI_PARAVIRT is enabled, even if EFI_MEMMAP is not. Also allow the ESRT to be in reclaimable memory, as that is where future Xen versions will put it. Reported-by: Marek Marczykowski-Górecki Signed-off-by: Demi Marie Obenour Tested-by: Marek Marczykowski-Górecki Signed-off-by: Ard Biesheuvel commit c0fecaa44dc341d86e4ce96efcda9ea8b4c106af Author: Demi Marie Obenour Date: Thu Jan 19 14:03:58 2023 -0500 efi: Apply allowlist to EFI configuration tables when running under Xen As it turns out, Xen does not guarantee that EFI boot services data regions in memory are preserved, which means that EFI configuration tables pointing into such memory regions may be corrupted before the dom0 OS has had a chance to inspect them. This is causing problems for Qubes OS when it attempts to perform system firmware updates, which requires that the contents of the EFI System Resource Table are valid when the fwupd userspace program runs. However, other configuration tables such as the memory attributes table or the runtime properties table are equally affected, and so we need a comprehensive workaround that works for any table type. So when running under Xen, check the EFI memory descriptor covering the start of the table, and disregard the table if it does not reside in memory that is preserved by Xen. Co-developed-by: Ard Biesheuvel Signed-off-by: Ard Biesheuvel Signed-off-by: Demi Marie Obenour Tested-by: Marek Marczykowski-Górecki Signed-off-by: Ard Biesheuvel commit a1680415e0a7a1d4a7345637e4e96d89d32e0dd3 Author: Krzysztof Kozlowski Date: Fri Jan 20 14:01:08 2023 +0100 arm64: dts: exynos: drop unsupported UFS properties in ExynosAutov9 SADK There is no vcc-fixed-regulator property for UFS nodes: exynosautov9-sadk.dtb: ufs@17e00000: Unevaluated properties are not allowed ('vcc-fixed-regulator' was unexpected) Link: https://lore.kernel.org/r/20230120130108.278851-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit f370a3d0fd16cd260248c387cc085dcb8a6d32b2 Author: Krzysztof Kozlowski Date: Fri Jan 20 16:53:57 2023 +0100 ARM: dts: exynos: align pin node names in Exynos4412 The DT schema expect pin configuration nodes to have pin prefix or suffix: exynos4412-trats2.dtb: pinctrl@3860000: sleep-state: 'gpz-0', 'gpz-1', 'gpz-2', 'gpz-3', 'gpz-4', 'gpz-5', 'gpz-6' do not match any of the regexes: '^(pin-[a-z0-9-]+|[a-z0-9-]+-pin)$', 'pinctrl-[0-9]+' Link: https://lore.kernel.org/r/20230120155404.323386-5-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 78b93ffef4ad1800f884e4892c1bd79ca5512cba Author: Krzysztof Kozlowski Date: Fri Jan 20 16:53:56 2023 +0100 ARM: dts: exynos: correct cd-gpios property in Exynos4412 Itop Elite The property is cd-gpios: exynos4412-itop-elite.dtb: mmc@12530000: Unevaluated properties are not allowed ('cd-gpio' was unexpected) Link: https://lore.kernel.org/r/20230120155404.323386-4-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 49434cd203ed3af220145f2e5e5791339dac347a Author: Krzysztof Kozlowski Date: Fri Jan 20 16:53:55 2023 +0100 ARM: dts: exynos: drop unsupported desc-num in Exynos3250 There is no desc-num property for MMC nodes: exynos3250-monk.dtb: mmc@12510000: Unevaluated properties are not allowed ('desc-num' was unexpected) Link: https://lore.kernel.org/r/20230120155404.323386-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit d15d2a617499882971ddb773a583015bf36fa492 Author: Krzysztof Kozlowski Date: Fri Jan 20 16:53:54 2023 +0100 ARM: dts: exynos: correct wr-active property in Exynos3250 Rinato The property is wr-active: exynos3250-rinato.dtb: fimd@11c00000: i80-if-timings: 'wr-act' does not match any of the regexes: 'pinctrl-[0-9]+' Fixes: b59b3afb94d4 ("ARM: dts: add fimd device support for exynos3250-rinato") Link: https://lore.kernel.org/r/20230120155404.323386-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 4069be845bbff7b4761aa513c30d6400e5f63846 Author: Krzysztof Kozlowski Date: Fri Jan 20 08:11:51 2023 +0100 ARM: dts: exynos: drop incorrect power-supplies in P4 Note simple-battery does not have supplies, but it is referenced by charger instead: exynos4412-p4note-n8010.dtb: battery-cell: 'power-supplies' does not match any of the regexes: '^ocv-capacity-table-[0-9]+$', 'pinctrl-[0-9]+' Link: https://lore.kernel.org/r/20230120071151.116272-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit e1c7def07c5c1d1cd6d28aefa8f11e31032c90fe Author: Krzysztof Kozlowski Date: Fri Jan 20 07:47:24 2023 +0100 ARM: dts: exynos: align OPP table names with DT schema DT schema expects names of operating points tables to match certain pattern: exynos5422-odroidxu3-lite.dtb: opp-table0: $nodename:0: 'opp-table0' does not match '^opp-table(-[a-z0-9]+)?$' Link: https://lore.kernel.org/r/20230120064724.40621-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit b494d6283deb97d18b527bbfe88e5c7be7db05ed Author: Jani Nikula Date: Thu Jan 19 18:18:57 2023 +0200 drm/edid: remove redundant _drm_connector_update_edid_property() Realize that drm_edid_connector_update() and _drm_connector_update_edid_property() are now the same thing. Drop the latter. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/712cc299afe33d8f6279a15d5b0117aeeab88bb4.1674144945.git.jani.nikula@intel.com commit c533b5167c7e40e82dd724f2a0ffa691f7f386d2 Author: Jani Nikula Date: Thu Jan 19 18:18:56 2023 +0200 drm/edid: add separate drm_edid_connector_add_modes() The original goal with drm_edid_connector_update() was to have a single call for updating the connector and adding probed modes, in this order, but that turned out to be problematic. Drivers that need to update the connector in the .detect() callback would end up updating the probed modes as well. Turns out the callback may be called so many times that the probed mode list fills up without bounds, and this is amplified by add_alternate_cea_modes() duplicating the CEA modes on every call, actually running out of memory on some machines. Kudos to Imre Deak for explaining this to me. Go back to having separate drm_edid_connector_update() and drm_edid_connector_add_modes() calls. The former may be called from .detect(), .force(), or .get_modes(), but the latter only from .get_modes(). Unlike drm_add_edid_modes(), have drm_edid_connector_add_modes() update the probed modes from the EDID property instead of the passed in EDID. This is mainly to enforce two things: 1) drm_edid_connector_update() must be called before drm_edid_connector_add_modes(). Display info and quirks are needed for parsing the modes, and we don't want to call update_display_info() again to ensure the info is available, like drm_add_edid_modes() does. 2) The same EDID is used for both updating the connector and adding the probed modes. Fortunately, the change is easy, because no driver has actually adopted drm_edid_connector_update(). Not even i915, and that's mainly because of the problem described above. Cc: Imre Deak Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/e86fff1579f14ebf6334692526c8f6831cd02cac.1674144945.git.jani.nikula@intel.com commit e8b1f0d4b6ec09fe32a0f66b99a4951214d768ee Author: Jani Nikula Date: Thu Jan 19 18:18:55 2023 +0200 drm/edid: refactor _drm_edid_connector_update() and rename By moving update_display_info() out of _drm_edid_connector_update() we make the function purely about adding modes. Rename accordingly. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/e9880bbb2b5724d9aac88a90a31ba3ba9af9da3f.1674144945.git.jani.nikula@intel.com commit 919d320fb8c6a40669ef0eb64aa97326f192415d Author: Jani Nikula Date: Thu Jan 19 18:18:54 2023 +0200 drm/edid: split HDMI VSDB info and mode parsing Separate the parsing of display info and modes from the HDMI VSDB. This is prerequisite work for overall better separation of the two parsing steps. The info parsing is about figuring out whether the sink supports HDMI infoframes. Since they were added in HDMI 1.4, assume the sink supports HDMI infoframes if it has the HDMI_Video_present bit set (introduced in HDMI 1.4). For details, see commit f1781e9bb2dd ("drm/edid: Allow HDMI infoframe without VIC or S3D"). The logic is not exactly the same, but since it was somewhat heuristic to begin with, assume this is close enough. v2: - Simplify to only check HDMI_Video_present bit (Ville) - Drop cea_db_raw_size() helper (Ville) Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/238e15f7ab15a86f7fd1812271dcaec9bc6e1506.1674144945.git.jani.nikula@intel.com commit 48865413c9ddab68a774b506b1940af0f6b6089d Author: Liu Ying Date: Mon Jan 23 10:14:49 2023 +0800 drm/bridge: fsl-ldb: Add i.MX93 LDB support Same to i.MX8mp LDB, i.MX93 LDB is controlled by mediamix blk-ctrl through LDB_CTRL and LVDS_CTRL registers. i.MX93 LDB supports only one LVDS channel(channel 0) and it's LVDS_CTRL register bit1 is used as LVDS_EN instead of CH1_EN. Add i.MX93 LDB support in the existing i.MX8mp LDB bridge driver by adding i.MX93 LDB compatible string and device data(to reflect different register offsets and LVDS_CTRL register bit1 definition). Reviewed-by: Marek Vasut Signed-off-by: Liu Ying Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230123021449.969243-3-victor.liu@nxp.com commit 5e68a0ca59c0891d6b7da8ae7f6764565ff67c6d Author: Liu Ying Date: Mon Jan 23 10:14:48 2023 +0800 dt-bindings: display: bridge: ldb: Add i.MX93 LDB Same to i.MX8mp LDB, i.MX93 LDB is controlled by mediamix blk-ctrl through 'ldb' register and 'lvds' register. Also, the 'ldb' clock is required. i.MX93 LDB supports only one LVDS channel(channel 0, a.k.a, LVDS Channel-A in the device tree binding documentation), while i.MX8mp LDB supports at most two. Add i.MX93 LDB device tree binding in the existing i.MX8mp LDB device tree binding documentation. Acked-by: Krzysztof Kozlowski Signed-off-by: Liu Ying Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230123021449.969243-2-victor.liu@nxp.com commit 695863408b11710b9ff7f8bab5198fd0e8a9a02f Author: Laurent Pinchart Date: Thu Jun 16 01:14:09 2022 +0300 ARM: dts: renesas: Use new media bus type macros Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT sources. Signed-off-by: Laurent Pinchart Reviewed-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20220615221410.27459-6-laurent.pinchart@ideasonboard.com Signed-off-by: Geert Uytterhoeven commit 0c56f949f626e59ef7c5b18e2706fed2a6afc4a2 Author: Fabrizio Castro Date: Fri Jan 6 12:58:16 2023 +0000 soc: renesas: Add PWC support for RZ/V2M The Renesas RZ/V2M External Power Sequence Controller (PWC) IP is capable of: * external power supply on/off sequence generation * on/off signal generation for the LPDDR4 core power supply (LPVDD) * key input signals processing * general-purpose output pins Add the corresponding device driver. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230106125816.10600-3-fabrizio.castro.jz@renesas.com Signed-off-by: Geert Uytterhoeven commit 6e1456f9251966d8fbfde2ae4750ba540b588533 Author: Fabrizio Castro Date: Fri Jan 6 12:58:15 2023 +0000 dt-bindings: soc: renesas: Add RZ/V2M PWC The Renesas RZ/V2M External Power Sequence Controller (PWC) IP is capable of: * external power supply on/off sequence generation * on/off signal generation for the LPDDR4 core power supply (LPVDD) * key input signals processing * general-purpose output pins Add the corresponding dt-bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Rob Herring Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230106125816.10600-2-fabrizio.castro.jz@renesas.com Signed-off-by: Geert Uytterhoeven commit 1c052043c79af5f70e80e2acd4dd70904ae08666 Author: Geert Uytterhoeven Date: Wed Jan 11 09:23:34 2023 +0100 clk: renesas: cpg-mssr: Remove superfluous check in resume code When the code flow arrives at printing the error message in cpg_mssr_resume_noirq(), we know for sure that we are not running on an RZ/A Soc, as the code checked for that before. Fixes: ace342097768e35f ("clk: renesas: cpg-mssr: Fix STBCR suspend/resume handling") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/144a3e66d748c0c17f3524ac8fa6ece5bf5b6f1e.1673425314.git.geert+renesas@glider.be commit bea11f0aa17a42303cfe9dae780bfc36f1947605 Merge: 81c254a65ceb2 39859be8537ca Author: Takashi Iwai Date: Mon Jan 23 09:18:01 2023 +0100 Merge branch 'topic/firewire' into for-next Pull FireWire fixes Signed-off-by: Takashi Iwai commit 39859be8537ca372c48b76458f498064e075aaa3 Author: Takashi Sakamoto Date: Fri Jan 20 18:03:44 2023 +0900 firewire: cdev: use single object to dispatch event for request to IEC 61883-1 FCP region The core function always passes the data of request to the callback of listener in any case. Additionally, the listener can maintain the lifetime of data by reference count. In character device, no need to duplicate the payload of request anymore to copy it to user space. This commit extends the lifetime of data to obsolete duplication of payload for request in character device. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230120090344.296451-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit e699600232e0ca6237b996aa1a94a056cf776582 Author: Takashi Sakamoto Date: Fri Jan 20 18:03:43 2023 +0900 firewire: cdev: obsolete NULL check to detect IEC 61883-1 FCP region In the character device, the listener to address space should distinguish whether the request is to IEC 61883-1 FCP region or not. The user space application needs to access to the object of request in enough later by read(2), while the core function releases the object of request in the FCP case after completing the callback to handler. The handler guarantees the access safe by some way. It's done by duplication of the object after NULL check to the request, since core function passes NULL in the FCP case. It's inconvenient since the object of request includes some helpful information. It's better to add another way to check whether the request is to FCP region or not. Conveniently the file of transaction layer includes local implementation for the purpose. This commit moves it to module local file and use it instead of the NULL check, then the result of check is stored to per-client data for the inbound transaction so that the result can be referred by later to release the data. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230120090344.296451-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 13a55d6bb15fa6bf0dcaf997e0676f532f258f52 Author: Takashi Sakamoto Date: Fri Jan 20 18:03:42 2023 +0900 firewire: core: use kref structure to maintain lifetime of data for fw_request structure Developers have acknowledged that maintenance of lifetime for fw_transaction structure is effective when handling asynchronous transaction to IEC 61883-1 FCP region, since the core function allows multiples listeners to the region. Some of them needs to access to the payload of request in process context after the callback to listener, while the core function releases the object for the structure just after completing the callbacks to listeners. One of the listeners is character device. Current implementation of the character device duplicates the object for the payload of transaction, while it's a cost in kernel memory consumption. The lifetime management can reduce it. The typical way to maintain the lifetime is reference count. This commit uses kref structure as a first step for the purpose. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230120090344.296451-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit d4638642aa0a2b39d6f7666538c7df073f67aadb Author: Herve Codina Date: Thu Jan 5 16:22:54 2023 +0100 clk: renesas: r9a06g032: Handle h2mode setting based on USBF presence The CFG_USB[H2MODE] allows to switch the USB configuration. The configuration supported are: - One host and one device or - Two hosts Set CFG_USB[H2MODE] based on the USBF controller (USB device) availability. Signed-off-by: Herve Codina Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230105152257.310642-3-herve.codina@bootlin.com Signed-off-by: Geert Uytterhoeven commit c021d9fe410adadf35a835098073e4528f2db728 Author: Potin Lai Date: Mon Dec 26 13:45:35 2022 +0800 ARM: dts: aspeed: bletchley: Enable wdtrst1 Enable WDTRST1 external signal to send a reset pulse to peripherals while BMC reset. Signed-off-by: Potin Lai Reviewed-by: Patrick Williams Link: https://lore.kernel.org/r/20221226054535.2836110-3-potin.lai.pt@gmail.com Signed-off-by: Joel Stanley commit 107fb95f7ba14f38003218c7e340d8431c2e1d50 Author: Potin Lai Date: Mon Dec 26 13:45:34 2022 +0800 ARM: dts: aspeed: bletchley: Rename flash1 label In OpenBMC phosphor-software-manager uses "alt-bmc" for the secondary flash label. Rename flash1 label to "alt-bmc" to support the dual image feature in OpenBMC. Signed-off-by: Potin Lai Reviewed-by: Patrick Williams Link: https://lore.kernel.org/r/20221226054535.2836110-2-potin.lai.pt@gmail.com Signed-off-by: Joel Stanley commit 03d24e12749281f51545c9011fc953ac844df413 Author: Konstantin Aladyshev Date: Wed Jan 11 14:39:34 2023 +0300 ARM: dts: aspeed: ethanolx: Add BIOS flash chip Add a BIOS flash chip to the DTS to open a possibility to reflash the main CPU BIOS from the BMC. Signed-off-by: Konstantin Aladyshev Link: https://lore.kernel.org/r/20230111113934.1176-1-aladyshev22@gmail.com Signed-off-by: Joel Stanley commit 9664e1ba47fd27e2f21132ba6798c34adcaea288 Author: Konstantin Aladyshev Date: Wed Jan 11 14:52:27 2023 +0300 ARM: dts: aspeed: ethanolx: Enable CTS/RTS pins on UART1 BMC UART1 is connected to the P0 CPU UART1. As the connection has CTS and RTS signals, enable these functions on the BMC side. Signed-off-by: Konstantin Aladyshev Link: https://lore.kernel.org/r/20230111115227.1357-1-aladyshev22@gmail.com Signed-off-by: Joel Stanley commit 59e099e877d41b3a3ba79e6be425b73965f1aee9 Author: Konstantin Aladyshev Date: Wed Jan 11 13:01:04 2023 +0300 ARM: dts: aspeed: ethanolx: Add label for the master partition Add label "bmc" for the flash master partition. The master partition is required for the firmware update in the OpenBMC ecosystem. Signed-off-by: Konstantin Aladyshev Link: https://lore.kernel.org/r/20230111100105.707-1-aladyshev22@gmail.com Signed-off-by: Joel Stanley commit a7b322d164cffce24b69fa3e49a3ed9eebd01238 Author: Konstantin Aladyshev Date: Wed Jan 11 14:32:08 2023 +0300 ARM: dts: aspeed: ethanolx: Correct EEPROM device name BMC on the EthanolX board uses 24LC128 EEPROM chip for the configuration settings. The correct compatible string for this chip is "atmel,24c128". Signed-off-by: Konstantin Aladyshev Link: https://lore.kernel.org/r/20230111113208.964-1-aladyshev22@gmail.com Signed-off-by: Joel Stanley commit 2ee2a66ae5092281e3b3e6ddda91734dbb54e527 Author: Konstantin Aladyshev Date: Wed Jan 11 15:19:17 2023 +0300 ARM: dts: aspeed: ethanolx: Enable VUART Enable Virtual UART (VUART) module. This module provides virtual serial communication capabilities between host CPU and BMC and can be used for the Serial-Over-LAN (SoL) feature implementation. Signed-off-by: Konstantin Aladyshev Link: https://lore.kernel.org/r/20230111121917.1636-1-aladyshev22@gmail.com Signed-off-by: Joel Stanley commit c3769d87f3fc1773dfadbeb63f4e3b3110159587 Author: Delphine CC Chiu Date: Fri Nov 11 11:48:26 2022 +0800 ARM: dts: aspeed: greatlakes: Add Facebook greatlakes (AST2600) BMC Add linux device tree entry related to greatlakes specific devices connected to BMC SoC. Signed-off-by: Delphine CC Chiu Link: https://lore.kernel.org/r/20221111034828.2377-3-Delphine_CC_Chiu@Wiwynn.com Signed-off-by: Joel Stanley commit abe38831a5ff77336df008cbc831d7302bb51e14 Author: Delphine CC Chiu Date: Fri Nov 11 11:48:25 2022 +0800 dt-bindings: arm: aspeed: add Facebook Greatlakes board Document the new compatibles used on Facebook Greatlakes Signed-off-by: Delphine CC Chiu Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221111034828.2377-2-Delphine_CC_Chiu@Wiwynn.com Signed-off-by: Joel Stanley commit 43592c46375a056b411b065acf2d37fc1e3ab251 Author: Damien Le Moal Date: Wed Jan 4 17:20:55 2023 +0900 zonefs: Cache zone group directory inodes Since looking up any zone file inode requires looking up first the inode for the directory representing the zone group of the file, ensuring that the zone group inodes are always cached is desired. To do so, take an extra reference on the zone groups directory inodes on mount, thus avoiding the eviction of these inodes from the inode cache until the volume is unmounted. Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn commit d207794ababe5c3ad72e965c5e1023cfaf4ab1bb Author: Damien Le Moal Date: Wed Nov 30 11:01:09 2022 +0900 zonefs: Dynamically create file inodes when needed Allocating and initializing all inodes and dentries for all files results in a very large memory usage with high capacity zoned block devices. For instance, with a 26 TB SMR HDD with over 96000 zones, mounting the disk with zonefs results in about 130 MB of memory used, the vast majority of this space being used for vfs inodes and dentries. However, since a user will rarely access all zones at the same time, dynamically creating file inodes and dentries on demand, similarly to regular file systems, can significantly reduce memory usage. This patch modifies mount processing to not create the inodes and dentries for zone files. Instead, the directory inode operation zonefs_lookup() and directory file operation zonefs_readdir() are introduced to allocate and initialize inodes on-demand using the helper functions zonefs_get_dir_inode() and zonefs_get_zgroup_inode(). Implementation of these functions is simple, relying on the static nature of zonefs directories and files. Directory inodes are linked to the volume zone groups (struct zonefs_zone_group) they represent by using the directory inode i_private field. This simplifies the implementation of the lookup and readdir operations. Unreferenced zone file inodes can be evicted from the inode cache at any time. In such case, the only inode information that cannot be recreated from the zone information that is saved in the zone group data structures attached to the volume super block is the inode uid, gid and access rights. These values may have been changed by the user. To keep these attributes for the life time of the mount, as before, the inode mode, uid and gid are saved in the inode zone information and the saved values are used to initialize regular file inodes when an inode lookup happens. The zone information mode, uid and gid are initialized in zonefs_init_zgroup() using the default values. With these changes, the static minimal memory usage of a zonefs volume is mostly reduced to the array of zone information for each zone group. For the 26 TB SMR hard-disk mentioned above, the memory usage after mount becomes about 5.4 MB, a reduction by a factor of 24 from the initial 130 MB memory use. Co-developed-by: Jorgen Hansen Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn commit aa7f243f32e1d18036ee00d71d3ccfad70ae2121 Author: Damien Le Moal Date: Wed Nov 16 18:15:40 2022 +0900 zonefs: Separate zone information from inode information In preparation for adding dynamic inode allocation, separate an inode zone information from the zonefs inode structure. The new data structure zonefs_zone is introduced to store in memory information about a zone that must be kept throughout the lifetime of the device mount. Linking between a zone file inode and its zone information is done by setting the inode i_private field to point to a struct zonefs_zone. Using the i_private pointer avoids the need for adding a pointer in struct zonefs_inode_info. Beside the vfs inode, this structure is reduced to a mutex and a write open counter. One struct zonefs_zone is created per file inode on mount. These structures are organized in an array using the new struct zonefs_zone_group data structure to represent zone groups. The zonefs_zone arrays are indexed per file number (the index of a struct zonefs_zone in its array directly gives the file number/name for that zone file inode). Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn commit 34422914dc00b291d1c47dbdabe93b154c2f2b25 Author: Damien Le Moal Date: Thu Nov 24 19:43:30 2022 +0900 zonefs: Reduce struct zonefs_inode_info size Instead of using the i_ztype field in struct zonefs_inode_info to indicate the zone type of an inode, introduce the new inode flag ZONEFS_ZONE_CNV to be set in the i_flags field of struct zonefs_inode_info to identify conventional zones. If this flag is not set, the zone of an inode is considered to be a sequential zone. The helpers zonefs_zone_is_cnv(), zonefs_zone_is_seq(), zonefs_inode_is_cnv() and zonefs_inode_is_seq() are introduced to simplify testing the zone type of a struct zonefs_inode_info and of a struct inode. Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn commit 46a9c526eef7fb68a00321e2a9591ce5276ae92b Author: Damien Le Moal Date: Fri Nov 25 11:06:20 2022 +0900 zonefs: Simplify IO error handling Simplify zonefs_check_zone_condition() by moving the code that changes an inode access rights to the new function zonefs_inode_update_mode(). Furthermore, since on mount an inode wpoffset is always zero when zonefs_check_zone_condition() is called during an inode initialization, the "mount" boolean argument is not necessary for the readonly zone case. This argument is thus removed. zonefs_io_error_cb() is also modified to use the inode offline and zone state flags instead of checking the device zone condition. The multiple calls to zonefs_check_zone_condition() are reduced to the first call on entry, which allows removing the "warn" argument. zonefs_inode_update_mode() is also used to update an inode access rights as zonefs_io_error_cb() modifies the inode flags depending on the volume error handling mode (defined with a mount option). Since an inode mode change differs for read-only zones between mount time and IO error time, the flag ZONEFS_ZONE_INIT_MODE is used to differentiate both cases. Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn commit 4008e2a0b01aba982356fd15b128a47bf11bd9c7 Author: Damien Le Moal Date: Fri Nov 25 09:39:33 2022 +0900 zonefs: Reorganize code Move all code related to zone file operations from super.c to the new file.c file. Inode and zone management code remains in super.c. Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn commit 5670ebf54bd26482f57a094c53bdc562c106e0a9 Author: James Clark Date: Fri Jan 20 14:37:01 2023 +0000 perf cs-etm: Ensure that Coresight timestamps don't go backwards There are some edge cases around estimated timestamps that can result in them going backwards. One is that after a discontinuity, the last used timestamp is set to 0. The duration of the next range is then subtracted which could result in an earlier timestamp than the last instruction. Fix this by not resetting the last timestamp used on a discontinuity, and make sure that new estimated timestamps are clamped to be later than that. Another case is that estimated timestamps could compound over time to end up being more than the next real timestamp in the trace. Fix this by clamping the estimates in cs_etm_decoder__do_soft_timestamp() to be no later than it. cs_etm_decoder__do_soft_timestamp() also updated next_cs_timestamp, which meant that the next real timestamp was lost and not stored anywhere. Fix that by only updating cs_timestamp for estimates and keep next_cs_timestamp untouched. Finally, use next_cs_timestamp to signify if a timestamp has been received previously. Because cs_timestamp has the first range subtracted, it could technically go to 0 which would break the logic. Testing ======= It can be verified that timestamps don't go backwards when tracing on a single core with the following commands. Across multiple cores it's expected that timestamps are interleaved: $ perf record -e cs_etm/@tmc_etr0/k -C 4 taskset -c 4 sleep 1 $ perf script --itrace=i1ns --ns -Fcomm,tid,pid,time,cpu,event,ip,sym,addr,symoff,flags,callindent > itrace $ sed 's/://g' itrace | awk -F ' ' ' { print $4 } ' | awk '{ if ($1 < prev) { print "line:" NR " " $0 } {prev=$1}}' Reported-by: Tanmay Jagdale Signed-off-by: James Clark Acked-by: Suzuki Poulouse Tested-by: Tanmay Jagdale Cc: Alexander Shishkin Cc: Bharat Bhushan Cc: George Cherian Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Linu Cherian Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sunil Kovvuri Goutham Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230120143702.4035046-9-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit a7fe9a443b6064c68f86a2ee09bdfa7736660ef3 Author: German Gomez Date: Fri Jan 20 14:37:00 2023 +0000 perf cs_etm: Set the time field in the synthetic samples If virtual timestamps are detected, set sample time field accordingly, otherwise warn the user that the samples will not include accurate time data. | Test notes (FEAT_TRF platform) | | $ ./perf record -e cs_etm//u -a -- sleep 4 | $ ./perf script --fields +time | perf 422 [000] 163.375100: 1 branches:uH: 0 [unknown] ([unknown]) | perf 422 [000] 163.375100: 1 branches:uH: ffffb8009544 ioctl+0x14 (/lib/aarch64-linux-gnu/libc-2.27.so) | perf 422 [000] 163.375100: 1 branches:uH: aaaaab6bebf4 perf_evsel__run_ioctl+0x90 (/home/german/linux/tools/perf/perf) | [...] | perf 422 [000] 167.393100: 1 branches:uH: aaaaab6bda00 __xyarray__entry+0x74 (/home/german/linux/tools/perf/perf) | perf 422 [000] 167.393099: 1 branches:uH: aaaaab6bda0c __xyarray__entry+0x80 (/home/german/linux/tools/perf/perf) | perf 422 [000] 167.393099: 1 branches:uH: ffffb8009538 ioctl+0x8 (/lib/aarch64-linux-gnu/libc-2.27.so) | | The time from the first sample to the last sample is 4 seconds Now that times are converted to nanoseconds, also try to estimate the timestamps more accurately be dividing by some fixed value for instructions per ns. This prevents long ranges from being estimated too far in the past than would be realistic. Signed-off-by: German Gomez Acked-by: Suzuki Poulouse Tested-by: Tanmay Jagdale Cc: Alexander Shishkin Cc: Bharat Bhushan Cc: George Cherian Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Linu Cherian Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sunil Kovvuri Goutham Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230120143702.4035046-8-james.clark@arm.com Signed-off-by: James Clark Signed-off-by: Arnaldo Carvalho de Melo commit 2e2f7ceecc19fcac31bc194485e96a3b67b7d65e Author: German Gomez Date: Fri Jan 20 14:36:59 2023 +0000 perf cs_etm: Record ts_source in AUXTRACE_INFO for ETMv4 and ETE Read the value of ts_source exposed by the driver and store it in the ETMv4 and ETE header. If the interface doesn't exist (such as in older Kernels), defaults to a safe value of -1. Signed-off-by: German Gomez Acked-by: Suzuki Poulouse Tested-by: Tanmay Jagdale Cc: Alexander Shishkin Cc: Bharat Bhushan Cc: George Cherian Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Linu Cherian Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sunil Kovvuri Goutham Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230120143702.4035046-7-james.clark@arm.com Signed-off-by: James Clark Signed-off-by: Arnaldo Carvalho de Melo commit 326163c552c4fb67bb7503f8e8b5778327fc97bf Author: German Gomez Date: Fri Jan 20 14:36:58 2023 +0000 perf cs_etm: Keep separate symbols for ETMv4 and ETE parameters Previously, adding a new parameter at the end of ETMv4 meant adding it somewhere in the middle of ETE, which is not supported by the current header version. Reviewed-by: Mike Leach Signed-off-by: German Gomez Acked-by: Suzuki Poulouse Tested-by: Tanmay Jagdale Cc: Alexander Shishkin Cc: Bharat Bhushan Cc: George Cherian Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Linu Cherian Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sunil Kovvuri Goutham Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230120143702.4035046-6-james.clark@arm.com Signed-off-by: James Clark Signed-off-by: Arnaldo Carvalho de Melo commit c2b6a8969c82990626cfb9a1af0532b06cdb5716 Author: German Gomez Date: Fri Jan 20 14:36:57 2023 +0000 perf pmu: Add function to check if a pmu file exists Add a utility function perf_pmu__file_exists() to check if a given pmu file exists in the sysfs filesystem. Signed-off-by: German Gomez Acked-by: Suzuki Poulouse Tested-by: Tanmay Jagdale Cc: Alexander Shishkin Cc: Bharat Bhushan Cc: George Cherian Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Linu Cherian Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sunil Kovvuri Goutham Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230120143702.4035046-5-james.clark@arm.com Signed-off-by: James Clark Signed-off-by: Arnaldo Carvalho de Melo commit 5f2c8efa78ab4215c5d53899a6d87b9af429fea1 Author: James Clark Date: Fri Jan 20 14:36:56 2023 +0000 perf pmu: Remove remaining duplication of bus/event_source/devices/... Use the new perf_pmu__pathname_scnprintf() instead. No functional changes. Reviewed-by: Leo Yan Signed-off-by: James Clark Acked-by: Suzuki Poulouse Tested-by: Tanmay Jagdale Cc: Alexander Shishkin Cc: Bharat Bhushan Cc: George Cherian Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Linu Cherian Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sunil Kovvuri Goutham Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230120143702.4035046-4-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit d50a79cd0f391cbfdc3d9a6165e247d084f94dd3 Author: James Clark Date: Fri Jan 20 14:36:55 2023 +0000 perf pmu: Use perf_pmu__open_file() and perf_pmu__scan_file() Remove some code that duplicates existing methods. Copy strings where const strings are required. No functional changes. Committer notes: Add a stub for erf_pmu__scan_file() in tools/perf/util/python.c not to drag tools/perf/util/pmu.c into the python binding. This fixes 'perf test python' at this point in this patchset. Reviewed-by: Leo Yan Signed-off-by: James Clark Acked-by: Suzuki Poulouse Tested-by: Tanmay Jagdale Cc: Alexander Shishkin Cc: Bharat Bhushan Cc: George Cherian Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Linu Cherian Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sunil Kovvuri Goutham Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230120143702.4035046-3-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit f8ad6018ce3c065a706b187cdc4520975969660e Author: James Clark Date: Fri Jan 20 14:36:54 2023 +0000 perf pmu: Remove duplication around EVENT_SOURCE_DEVICE_PATH The pattern for accessing EVENT_SOURCE_DEVICE_PATH is duplicated in a few places, so add two utility functions to cover it. Also just use perf_pmu__scan_file() instead of pmu_type() which already does the same thing. No functional changes. Reviewed-by: Leo Yan Signed-off-by: James Clark Acked-by: Suzuki Poulouse Tested-by: Tanmay Jagdale Cc: Alexander Shishkin Cc: Bharat Bhushan Cc: George Cherian Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Linu Cherian Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sunil Kovvuri Goutham Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230120143702.4035046-2-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 4cbd5334ff1390444644e82b5aed1e3288798e50 Author: Ian Rogers Date: Thu Jan 19 12:10:36 2023 -0800 perf tools: Fix foolproof typo In the context of LBR stitching documentation. Signed-off-by: Ian Rogers Acked-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ali Saidi Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Link: https://lore.kernel.org/r/20230119201036.156441-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit df8aeaefea026a25f443b8982186127291c6f149 Author: Adrian Hunter Date: Fri Jan 20 14:34:56 2023 +0200 perf symbols: Check SHT_RELA and SHT_REL type earlier Make the code more readable by checking for SHT_RELA and SHT_REL type earlier. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20230120123456.12449-11-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 375a44818429a4df3fc18a0ac0ecfad9953f1ac8 Author: Adrian Hunter Date: Fri Jan 20 14:34:55 2023 +0200 perf symbols: Combine handling for SHT_RELA and SHT_REL SHT_REL and SHT_RELA are handled the same way. Simplify by combining the handling. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20230120123456.12449-10-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 45204677d427b7d0ed11930bd5be4a42893d1c93 Author: Adrian Hunter Date: Fri Jan 20 14:34:54 2023 +0200 perf symbols: Allow for .plt entries with no symbol Create a sensible name for .plt entries with no symbol. Example: Before: $ perf test --dso /usr/lib/x86_64-linux-gnu/libc.so.6 -vv Symbols 2>/tmp/cmp1.txt After: $ perf test --dso /usr/lib/x86_64-linux-gnu/libc.so.6 -vv Symbols 2>/tmp/cmp2.txt $ diff /tmp/cmp1.txt /tmp/cmp2.txt 4c4 < test child forked, pid 53043 --- > test child forked, pid 54372 23,62c23,62 < 280f0-28100 g @plt < 28100-28110 g @plt < 28110-28120 g @plt < 28120-28130 g @plt < 28130-28140 g @plt < 28140-28150 g @plt < 28150-28160 g @plt < 28160-28170 g @plt < 28170-28180 g @plt < 28180-28190 g @plt < 28190-281a0 g @plt < 281a0-281b0 g @plt < 281b0-281c0 g @plt < 281c0-281d0 g @plt < 281d0-281e0 g @plt < 281e0-281f0 g @plt < 281f0-28200 g @plt < 28200-28210 g @plt < 28210-28220 g @plt < 28220-28230 g @plt < 28230-28240 g @plt < 28240-28250 g @plt < 28250-28260 g @plt < 28260-28270 g @plt < 28270-28280 g @plt < 28280-28290 g @plt < 28290-282a0 g @plt < 282a0-282b0 g @plt < 282b0-282c0 g @plt < 282c0-282d0 g @plt < 282d0-282e0 g @plt < 282e0-282f0 g @plt < 282f0-28300 g @plt < 28300-28310 g @plt < 28310-28320 g @plt < 28320-28330 g @plt < 28330-28340 g @plt < 28340-28350 g @plt < 28350-28360 g @plt < 28360-28370 g @plt --- > 280f0-28100 g offset_0x280f0@plt > 28100-28110 g offset_0x28100@plt > 28110-28120 g offset_0x28110@plt > 28120-28130 g offset_0x28120@plt > 28130-28140 g offset_0x28130@plt > 28140-28150 g offset_0x28140@plt > 28150-28160 g offset_0x28150@plt > 28160-28170 g offset_0x28160@plt > 28170-28180 g offset_0x28170@plt > 28180-28190 g offset_0x28180@plt > 28190-281a0 g offset_0x28190@plt > 281a0-281b0 g offset_0x281a0@plt > 281b0-281c0 g offset_0x281b0@plt > 281c0-281d0 g offset_0x281c0@plt > 281d0-281e0 g offset_0x281d0@plt > 281e0-281f0 g offset_0x281e0@plt > 281f0-28200 g offset_0x281f0@plt > 28200-28210 g offset_0x28200@plt > 28210-28220 g offset_0x28210@plt > 28220-28230 g offset_0x28220@plt > 28230-28240 g offset_0x28230@plt > 28240-28250 g offset_0x28240@plt > 28250-28260 g offset_0x28250@plt > 28260-28270 g offset_0x28260@plt > 28270-28280 g offset_0x28270@plt > 28280-28290 g offset_0x28280@plt > 28290-282a0 g offset_0x28290@plt > 282a0-282b0 g offset_0x282a0@plt > 282b0-282c0 g offset_0x282b0@plt > 282c0-282d0 g offset_0x282c0@plt > 282d0-282e0 g offset_0x282d0@plt > 282e0-282f0 g offset_0x282e0@plt > 282f0-28300 g offset_0x282f0@plt > 28300-28310 g offset_0x28300@plt > 28310-28320 g offset_0x28310@plt > 28320-28330 g offset_0x28320@plt > 28330-28340 g offset_0x28330@plt > 28340-28350 g offset_0x28340@plt > 28350-28360 g offset_0x28350@plt > 28360-28370 g offset_0x28360@plt Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20230120123456.12449-9-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 698a0d1a1a6c095477b07b9fc2e8713ee642ed53 Author: Adrian Hunter Date: Fri Jan 20 14:34:53 2023 +0200 perf symbols: Add symbol for .plt header perf expands the _init symbol over .plt because there are no PLT symbols at that point, but then dso__synthesize_plt_symbols() creates them. Fix by truncating the previous symbol and inserting a symbol for .plt header. Example: Before: $ perf test --dso `which uname` -v Symbols 74: Symbols : --- start --- test child forked, pid 191028 Problems creating module maps, continuing anyway... Testing /usr/bin/uname Overlapping symbols: 2000-25f0 g _init 2040-2050 g free@plt test child finished with -1 ---- end ---- Symbols: FAILED! $ perf test --dso `which uname` -vv Symbols 2>/tmp/cmp1.txt After: $ perf test --dso `which uname` -v Symbols 74: Symbols : --- start --- test child forked, pid 194291 Testing /usr/bin/uname test child finished with 0 ---- end ---- Symbols: Ok $ perf test --dso `which uname` -vv Symbols 2>/tmp/cmp2.txt $ diff /tmp/cmp1.txt /tmp/cmp2.txt 4,5c4 < test child forked, pid 191031 < Problems creating module maps, continuing anyway... --- > test child forked, pid 194296 9c8,9 < 2000-25f0 g _init --- > 2000-2030 g _init > 2030-2040 g .plt 100,103c100 < Overlapping symbols: < 2000-25f0 g _init < 2040-2050 g free@plt < test child finished with -1 --- > test child finished with 0 105c102 < Symbols: FAILED! --- > Symbols: Ok $ Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Acked-by: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20230120123456.12449-8-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 5fec9b171cd80616e52e463ae5ae155483078004 Author: Adrian Hunter Date: Fri Jan 20 14:34:52 2023 +0200 perf symbols: Do not check ss->dynsym twice ss->dynsym is checked to be not NULL twice. Remove the first check because, in fact, there can be a plt with no dynsym, which is something that will be dealt with later. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20230120123456.12449-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 477d5e35b42b6ca6e1db229977c1ca33456babd7 Author: Adrian Hunter Date: Fri Jan 20 14:34:51 2023 +0200 perf symbols: Slightly simplify 'err' usage in dso__synthesize_plt_symbols() Return zero directly instead of needless 'goto out_elf_end' that does the same thing. That allows 'err' to be initialized to -1 instead of having to change its value later. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20230120123456.12449-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit a2db72c5dac4c9bc1e577a82602639619264409f Author: Adrian Hunter Date: Fri Jan 20 14:34:50 2023 +0200 perf symbols: Add dso__find_symbol_nocache() Symbols should not be cached when there are more symbols still to add. Add dso__find_symbol_nocache() to facilitate that. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20230120123456.12449-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit b08b20c3098832a4ffc22222ab742179b1f8514b Author: Adrian Hunter Date: Fri Jan 20 14:34:49 2023 +0200 perf symbols: Check plt_entry_size is not zero The code expects non-zero plt_entry_size. Check it and add a debug message to print if it is zero. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20230120123456.12449-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit c2d066c090c9fec5de99ae051e97e0f448cbc229 Author: Adrian Hunter Date: Fri Jan 20 14:34:48 2023 +0200 perf symbols: Factor out get_plt_sizes() Factor out get_plt_sizes() to make the code more readable and further changes to dso__synthesize_plt_symbols() easier to follow. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20230120123456.12449-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 1b69346e7a0bd18a9c3b00bdd6219d4d8ad73466 Author: Adrian Hunter Date: Fri Jan 20 14:34:47 2023 +0200 perf test: Add Symbols test Add a test to check function symbols do not overlap and are not zero length. The main motivation for the test is to make it easier to review changes to PLT symbol synthesis i.e. changes to dso__synthesize_plt_symbols(). By default the test uses the perf executable as a test DSO, but a specific DSO can be specified via a new perf test option "--dso". The test is useful in the following ways: - Any DSO can be tested, even ones that do not run on the current architecture. For example, using cross-compiled DSOs to see how well perf handles different architectures. - With verbose > 1 (e.g. -vv), all the symbols are printed, which makes it easier to see issues. - perf removes duplicate symbols and expands zero-length symbols to reach the next symbol, however that is done before adding synthesized symbols, so the test is checking those also. Example: $ perf test -v Symbols 74: Symbols : --- start --- test child forked, pid 154918 Testing /home/user/bin/perf Overlapping symbols: 7d000-7f3a0 g _init 7d030-7d040 g __printf_chk@plt test child finished with -1 ---- end ---- Symbols: FAILED! Note the test fails because perf expands the _init symbol over the PLT because there are no PLT symbols at that point, but then dso__synthesize_plt_symbols() creates them. Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Acked-by: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20230120123456.12449-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit afd6dbfdfd18b76ace2d910011ba7773eea577ce Merge: 33f868db99f16 82461ab89aa53 Author: Dmitry Baryshkov Date: Sun Jan 22 22:43:59 2023 +0200 Merge branch 'msm-next-lumag' into HEAD Merge display-related changes targeting Qualcomm DRM MSM driver. Notable changes: DPU, DSI, MDSS: - Support for SM8350, SM8450 SM8550 and SC8280XP platform Core: - Added bindings for SM8150 (driver support already present) DPU: - Partial support for DSC on SM8150 and SM8250 - Fixed color transformation matrix being lost on suspend/resume DP: - Support for DP on SDM845 and SC8280XP platforms - HPD fixes - Support for limiting DP link rate via DT property, this enables support for HBR3 rates. DSI: - Validate display modes according to the DSI OPP table - DSI PHY support for the SM6375 platform - Fixed byte intf clock selection for 14nm PHYs MDP5: - Schema conversion to YAML Misc fixes as usual Signed-off-by: Dmitry Baryshkov Signed-off-by: Dmitry Baryshkov commit 82461ab89aa534066897b5fbfd92bb6fc82e051b Merge: 798cc8f093e58 7efd4edc6efaf e17af1c9d861d 1ae654ded7c5a 759cc4914fb0e e96c08e91726c 6606a96ab1ce9 Author: Dmitry Baryshkov Date: Sun Jan 22 22:43:05 2023 +0200 Merge branches 'msm-next-lumag-core', 'msm-next-lumag-dpu', 'msm-next-lumag-dp', 'msm-next-lumag-dsi', 'msm-next-lumag-hdmi', 'msm-next-lumag-mdp5' and 'msm-next-lumag-mdp4' into msm-next-lumag DPU, DSI, MDSS: - Support for SM8350, SM8450 SM8550 and SC8280XP platform Core: - Added bindings for SM8150 (driver support already present) DPU: - Partial support for DSC on SM8150 and SM8250 - Fixed color transformation matrix being lost on suspend/resume DP: - Support for DP on SDM845 and SC8280XP platforms - HPD fixes - Support for limiting DP link rate via DT property, this enables support for HBR3 rates. DSI: - Validate display modes according to the DSI OPP table - DSI PHY support for the SM6375 platform - Fixed byte intf clock selection for 14nm PHYs MDP5: - Schema conversion to YAML Misc fixes as usual Signed-off-by: Dmitry Baryshkov commit 1ae654ded7c5a19dc13f57a4fe4434fef879b6f9 Author: Konrad Dybcio Date: Fri Jan 20 22:00:53 2023 +0100 drm/msm/dsi: Allow 2 CTRLs on v2.5.0 v2.5.0 support was originally added for SC7280, but this hw is also present on SM8350, which has one more DSI host. Bump up the dsi count and fill in the register of the secondary host to allow it to probe. This should not have any adverse effects on SC7280, as the secondary CTRL will only be touched if it's defined, anyway. Fixes: 65c391b31994 ("drm/msm/dsi: Add DSI support for SC7280") Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/519513/ Link: https://lore.kernel.org/r/20230120210101.2146852-1-konrad.dybcio@linaro.org Signed-off-by: Dmitry Baryshkov commit 1d5e01dfa3410bc94476e3050485852d6bba3fe0 Author: Dmitry Baryshkov Date: Wed Jan 18 15:00:27 2023 +0200 drm/msm/dsi: correct byte intf clock rate for 14nm DSI PHY According to the vendor kernel, byte intf clock rate should be a half of the byte clock only when DSI PHY version is above 2.0 (in other words, 10nm PHYs and later) and only if PHY is used in D-PHY mode. Currently MSM DSI code handles only the second part of the clause (C-PHY vs D-PHY), skipping DSI PHY version check, which causes issues on some of 14nm DSI PHY platforms (e.g. qcm2290). Move divisor selection to DSI PHY code, pass selected divisor through shared timings and set byte intf clock rate accordingly. Cc: Loic Poulain Signed-off-by: Dmitry Baryshkov Tested-by: Konrad Dybcio # SM6115P J606F Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/519006/ Link: https://lore.kernel.org/r/20230118130027.2345719-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit adf6a3ebba93245611cd766a6662b8000c7db325 Author: Bryan O'Donoghue Date: Mon Jan 16 22:52:17 2023 +0000 dt-bindings: msm: dsi-controller-main: Add vdd* descriptions back in When converting from .txt to .yaml we didn't include descriptions for the existing regulator supplies. - vdd - vdda - vddio Add those descriptions into the yaml now as they were prior to the conversion. In the .txt description we marked these regulators as required, however, that requirement appears to have been in error. Taking the example of sc7180-trogdor-wormdingler.dtsi. The avdd and avee come from GPIO controlled external regulators, not the SoC and in this case there's no need for vddio to power an I/O bus. Similarly the regulators for the LCD are controlled by the panel driver not by the dsi-ctrl driver. It would be possible to connect a different type of panel to the DSI bus here in which case we may or may not want to make use of vdd, vdda or vddio. This is also the case for older chipsets like apq8064, msm8916 etc the vdd* regulators in the dsi-ctrl block are helpers not dependencies. Add the description of vdd, vdda and vddio back in for the existing upstream dts where vdd, vdda or vddio are already declared but, don't declare those regulators required - they are not SoC requirements. Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings") Acked-by: Rob Herring Signed-off-by: Bryan O'Donoghue Patchwork: https://patchwork.freedesktop.org/patch/518643/ Link: https://lore.kernel.org/r/20230116225217.1056258-4-bryan.odonoghue@linaro.org Signed-off-by: Dmitry Baryshkov commit 66af52d2d48c6fdd52d7cfe0872227984622706f Author: Konrad Dybcio Date: Mon Jan 16 12:51:32 2023 +0100 dt-bindings: msm/dsi: Don't require vdds-supply on 7nm PHY On some SoCs (hello SM6375) vdds-supply is not wired to any smd-rpm or rpmh regulator, but instead powered by the VDD_MX/mx.lvl line, which is voted for in the DSI ctrl node. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/518513/ Link: https://lore.kernel.org/r/20230116115132.348961-1-konrad.dybcio@linaro.org Signed-off-by: Dmitry Baryshkov commit 630dfec54fd02789f5ce373c1e8637a1f922f3f6 Author: Konrad Dybcio Date: Mon Jan 16 12:40:59 2023 +0100 drm/msm/dsi: Add phy configuration for SM6375 SM6375 uses a boring standard 7nm PHY. Add a configuration entry for it. Signed-off-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/518511/ Link: https://lore.kernel.org/r/20230116114059.346327-2-konrad.dybcio@linaro.org Signed-off-by: Dmitry Baryshkov commit 454ec4a7da948fcbbd0118080d2e0025d0f5594d Author: Konrad Dybcio Date: Mon Jan 16 12:40:58 2023 +0100 dt-bindings: display/msm: Add SM6375 DSI PHY SM6375 has a single 7nm DSI PHY. Document it. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/518509/ Link: https://lore.kernel.org/r/20230116114059.346327-1-konrad.dybcio@linaro.org Signed-off-by: Dmitry Baryshkov commit 8328041b8c82c073c2c5c43afe57b2952fc9a872 Author: Abhinav Kumar Date: Wed Jan 11 16:16:00 2023 -0800 drm/msm/dsi: implement opp table based check for dsi_mgr_bridge_mode_valid() Currently there is no protection against a user trying to set an unsupported mode on DSI. Implement a check based on the opp table whether the byte clock for the mode can be supported by validating whether an opp table entry exists. For devices which have not added opp table support yet, skip this check otherwise it will break bootup on those devices. changes in v3: - make the comment shorter - handle all errors except ENODEV Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/15 Reported-by: Rob Clark Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/518008/ Link: https://lore.kernel.org/r/20230112001600.12791-2-quic_abhinavk@quicinc.com Signed-off-by: Dmitry Baryshkov commit 03f7b78242e5fac9fefea9a7bd5484510d5916bb Author: Abhinav Kumar Date: Wed Jan 11 16:15:59 2023 -0800 drm/msm/dsi: add a helper method to compute the dsi byte clk Re-arrange the dsi_calc_pclk method to two helpers, one to compute the DSI byte clk and the other to compute the pclk. This makes the separation of the two clean and also allows clients to compute and use the dsi byte clk separately. changes in v2: - move the assignments to definition lines Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/518005/ Link: https://lore.kernel.org/r/20230112001600.12791-1-quic_abhinavk@quicinc.com Signed-off-by: Dmitry Baryshkov commit d61980addc9c5237e3ce96d3a4858131e54f3fe4 Author: Jiasheng Jiang Date: Wed Jan 11 09:10:06 2023 +0800 drm/msm/dsi: Drop the redundant fail label Drop the redundant fail label and change the "goto fail" into "return ret" since they are the same. Reviewed-by: Doug Anderson Signed-off-by: Jiasheng Jiang Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/517816/ Link: https://lore.kernel.org/r/20230111011006.6238-1-jiasheng@iscas.ac.cn Signed-off-by: Dmitry Baryshkov commit 115906ca7b535afb1fe7b5406c566ccd3873f82b Author: Jiasheng Jiang Date: Tue Jan 10 10:16:51 2023 +0800 drm/msm/dsi: Add missing check for alloc_ordered_workqueue Add check for the return value of alloc_ordered_workqueue as it may return NULL pointer and cause NULL pointer dereference. Signed-off-by: Jiasheng Jiang Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/517646/ Link: https://lore.kernel.org/r/20230110021651.12770-1-jiasheng@iscas.ac.cn Signed-off-by: Dmitry Baryshkov commit 9d0118f0855ba0f5b083f5f398e073660066c30f Author: Neil Armstrong Date: Mon Jan 9 11:15:23 2023 +0100 drm/msm/dsi: add support for DSI 2.7.0 Add support for DSI 2.7.0 (block used on sm8550). Signed-off-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/517517/ Link: https://lore.kernel.org/r/20230103-topic-sm8550-upstream-mdss-dsi-v3-7-660c3bcb127f@linaro.org Signed-off-by: Dmitry Baryshkov commit 8b034e67711130083bd58ed2b1426f70a1a69bd3 Author: Neil Armstrong Date: Mon Jan 9 11:15:22 2023 +0100 drm/msm/dsi: add support for DSI-PHY on SM8550 SM8550 use a 4nm DSI PHYs, which share register definitions with 7nm DSI PHYs. Rather than duplicating the driver, handle 4nm variant inside the common 5+7nm driver. Signed-off-by: Neil Armstrong Patchwork: https://patchwork.freedesktop.org/patch/517515/ Link: https://lore.kernel.org/r/20230103-topic-sm8550-upstream-mdss-dsi-v3-6-660c3bcb127f@linaro.org Signed-off-by: Dmitry Baryshkov commit 93f0ca6fd61c835503421217ae7f67a9a7cffa1f Author: Neil Armstrong Date: Mon Jan 9 11:15:17 2023 +0100 dt-bindings: display/msm: document the SM8550 DSI PHY Document the SM8550 DSI PHY which is very close from the 7nm and 5nm DSI PHYs found in earlier platforms. Acked-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Patchwork: https://patchwork.freedesktop.org/patch/517509/ Link: https://lore.kernel.org/r/20230103-topic-sm8550-upstream-mdss-dsi-v3-1-660c3bcb127f@linaro.org Signed-off-by: Dmitry Baryshkov commit f47ec1bcb9d513fc0ba2eca15c56146acbc0c6dd Author: Adam Skladowski Date: Sat Dec 31 18:05:32 2022 +0100 dt-bindings: msm: dsi-phy-28nm: Document fam-b compatible Document omitted 28nm compatible which will be used on MSM8976 SoC. Signed-off-by: Adam Skladowski Acked-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/516427/ Link: https://lore.kernel.org/r/20221231170532.77000-1-a39.skl@gmail.com Signed-off-by: Dmitry Baryshkov commit c332881cb64a184d33d420ed80922d6b8b545b32 Author: Dmitry Baryshkov Date: Wed Dec 7 03:22:27 2022 +0200 drm/msm/dsi: add support for DSI 2.6.0 Add support for DSI 2.6.0 (block used on sm8450). Tested-by: Vinod Koul Reviewed-by: Vinod Koul Reviewed-by: Konrad Dybcio Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/514237/ Link: https://lore.kernel.org/r/20221207012231.112059-8-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 2f9ae4e395ed125b5d195acbe3f99bb64dfb7cb0 Author: Dmitry Baryshkov Date: Wed Dec 7 03:22:26 2022 +0200 drm/msm/dsi: add support for DSI-PHY on SM8350 and SM8450 SM8350 and SM8450 use 5nm DSI PHYs, which share register definitions with 7nm DSI PHYs. Rather than duplicating the driver, handle 5nm variants inside the common 5+7nm driver. Co-developed-by: Robert Foss Signed-off-by: Robert Foss Tested-by: Vinod Koul Reviewed-by: Vinod Koul Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/514230/ Link: https://lore.kernel.org/r/20221207012231.112059-7-dmitry.baryshkov@linaro.org [DB: changed compatibles per Krzysztof's request] Signed-off-by: Dmitry Baryshkov commit 7cb7636a1ac158c00f9da8f09e333c1ddd881eca Author: Tony Krowiak Date: Wed Jan 18 15:31:11 2023 -0500 s390/vfio_ap: increase max wait time for reset verification Increase the maximum time to wait for verification of a queue reset operation to 200ms. Signed-off-by: Tony Krowiak Reviewed-by: Jason J. Herne Reviewed-by: Harald Freudenberger Link: https://lore.kernel.org/r/20230118203111.529766-7-akrowiak@linux.ibm.com Signed-off-by: Christian Borntraeger Signed-off-by: Heiko Carstens commit 51d4d9877087685ac577a4a314f85e1b2046cae6 Author: Tony Krowiak Date: Wed Jan 18 15:31:10 2023 -0500 s390/vfio_ap: fix handling of error response codes Some response codes returned from the queue reset function are not being handled correctly; this patch fixes them: 1. Response code 3, AP queue deconfigured: Deconfiguring an AP adapter resets all of its queues, so this is handled by indicating the reset verification completed successfully. 2. For all response codes other than 0 (normal reset completion), 2 (queue reset in progress) and 3 (AP deconfigured), the -EIO error will be returned from the vfio_ap_mdev_reset_queue() function. In all cases, all fields of the status word other than the response code will be set to zero, so it makes no sense to check status bits. Signed-off-by: Tony Krowiak Reviewed-by: Jason J. Herne Reviewed-by: Harald Freudenberger Link: https://lore.kernel.org/r/20230118203111.529766-6-akrowiak@linux.ibm.com Signed-off-by: Christian Borntraeger Signed-off-by: Heiko Carstens commit 5a42b348adf9fbdd24166351046fc9fe317d1d0f Author: Tony Krowiak Date: Wed Jan 18 15:31:09 2023 -0500 s390/vfio_ap: verify ZAPQ completion after return of response code zero Verification that the asynchronous ZAPQ function has completed only needs to be done when the response code indicates the function was successfully initiated; so, let's call the apq_reset_check function immediately after the response code zero is returned from the ZAPQ. Signed-off-by: Tony Krowiak Reviewed-by: Jason J. Herne Reviewed-by: Harald Freudenberger Link: https://lore.kernel.org/r/20230118203111.529766-5-akrowiak@linux.ibm.com Signed-off-by: Christian Borntraeger Signed-off-by: Heiko Carstens commit 3ba41768105c70faa1e1677c173a9eedc31c5094 Author: Tony Krowiak Date: Wed Jan 18 15:31:08 2023 -0500 s390/vfio_ap: use TAPQ to verify reset in progress completes To eliminate the repeated calls to the PQAP(ZAPQ) function to verify that a reset in progress completed successfully and ensure that error response codes get appropriately logged, let's call the apq_reset_check() function when the ZAPQ response code indicates that a reset that is already in progress. Signed-off-by: Tony Krowiak Reviewed-by: Jason J. Herne Reviewed-by: Harald Freudenberger Link: https://lore.kernel.org/r/20230118203111.529766-4-akrowiak@linux.ibm.com Signed-off-by: Christian Borntraeger Signed-off-by: Heiko Carstens commit 0daf9878a7990058e74025493820bce0f67654c4 Author: Tony Krowiak Date: Wed Jan 18 15:31:07 2023 -0500 s390/vfio_ap: check TAPQ response code when waiting for queue reset The vfio_ap_mdev_reset_queue() function does not check the status response code returned form the PQAP(TAPQ) function when verifying the queue's status; consequently, there is no way of knowing whether verification failed because the wait time was exceeded, or because the PQAP(TAPQ) failed. This patch adds a function to check the status response code from the PQAP(TAPQ) instruction and logs an appropriate message if it fails. Signed-off-by: Tony Krowiak Reviewed-by: Jason J. Herne Reviewed-by: Harald Freudenberger Link: https://lore.kernel.org/r/20230118203111.529766-3-akrowiak@linux.ibm.com Signed-off-by: Christian Borntraeger Signed-off-by: Heiko Carstens commit 62414d901c3afde307f293a3c7f46baa2ec8edec Author: Tony Krowiak Date: Wed Jan 18 15:31:06 2023 -0500 s390/vfio-ap: verify reset complete in separate function The vfio_ap_mdev_reset_queue() function contains a loop to verify that the reset successfully completes within 40ms. This patch moves that loop into a separate function. Signed-off-by: Tony Krowiak Reviewed-by: Jason J. Herne Reviewed-by: Harald Freudenberger Link: https://lore.kernel.org/r/20230118203111.529766-2-akrowiak@linux.ibm.com Signed-off-by: Christian Borntraeger Signed-off-by: Heiko Carstens commit 1a280f48c0e403903cf0b4231c95b948e664f25a Author: Vasily Gorbik Date: Tue Jan 17 14:37:10 2023 +0100 s390/kprobes: replace kretprobe with rethook That's an adaptation of commit f3a112c0c40d ("x86,rethook,kprobes: Replace kretprobe with rethook on x86") to s390. Replaces the kretprobe code with rethook on s390. With this patch, kretprobe on s390 uses the rethook instead of kretprobe specific trampoline code. Tested-by: Ilya Leoshkevich Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit d924ecdb703765cdc75be5f28aaa1140b9106f84 Author: Thomas Richter Date: Fri Jan 13 12:29:55 2023 +0100 s390/cpum_sf: diagnostic sampling buffer setup to handle virtual addresses The CPU Measurement Sampling Facility (CPUM_SF) installs large buffers to save samples collected by hardware. These buffers are organized as Sample Data Buffer Tables (SDBT) and Sample Data Buffers (SDB). SDBs contain the samples which are extracted and saved in the perf ring buffer. The SDBTs are chained using real addresses and refer to SDBs using real addresses. The diagnostic sampling setup uses buffers provided by the process which invokes perf_event_open system call. The buffers are memory mapped. The buffers have been allocated by the kernel event subsystem. Add proper virtual to phyiscal address translation to the buffer chaining. The current constraint which requires virtual equals real address layout is removed. Signed-off-by: Thomas Richter Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 78157b4791a3e37659b33388fb639a2defc6e6e9 Author: Thomas Richter Date: Fri Jan 13 12:12:07 2023 +0100 s390/cpum_sf: rework macro AUX_SDB_NUM_xxx Macro AUX_SDB_NUM() has three parameters. The first one is not used. Remove the first parameter. Also convert the macros to inline functions. No functional change. Signed-off-by: Thomas Richter Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 1f8e50722fcc95ba65456706ff1b8e5ec72a65fd Author: Thomas Richter Date: Mon Jan 16 14:58:22 2023 +0100 s390/cpum_sf: sampling buffer setup to handle virtual addresses The CPU Measurement Sampling Facility (CPUM_SF) installs large buffers to save samples collected by hardware. These buffers are organized as Sample Data Buffer Tables (SDBT) and Sample Data Buffers (SDB). SDBs contain the samples which are extracted and saved in the perf ring buffer. The SDBTs are chained using real addresses and refer to SDBs using real addresses. Adds proper virtual to phyiscal address translation to the buffer chaining. The current constraint which requires virtual equals real address layout is removed. Signed-off-by: Thomas Richter Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 4012fc20e2c6b01c5cf53a7f9d7693da4c10de45 Author: Thomas Richter Date: Thu Jan 5 14:11:33 2023 +0100 s390/cpum_sf: remove debug statements from function setup_pmc_cpu Remove debug statements from function setup_pmc_cpu(). The debug statement displays a pointer value to a per cpu variable. This pointer value is printed nowhere else, so it has no use for cross reference. No functional change. Signed-off-by: Thomas Richter Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit a64e45c2ea62d9622bcebb586f359ea95f0a5152 Author: Thomas Richter Date: Thu Jan 12 15:09:21 2023 +0100 s390/cpum_sf: move functions from header file to source file Some inline helper functions are defined in a header file but used in only one source file. Move these functions to the source file. No functional change. Signed-off-by: Thomas Richter Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit b4af09140a04ab5a4a20b3e14738ee56ddd37eff Author: Jiapeng Chong Date: Tue Jan 17 14:02:23 2023 +0800 s390/vmem: 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. ./arch/s390/mm/vmem.c:680:10-11: WARNING opportunity for swap(). [hca@linux.ibm.com: get rid of all temp variables] Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3786 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20230117060223.58583-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Heiko Carstens commit ca34cda73fd4c8fd93c488addc2eeb20af9e923f Author: Vineeth Vijayan Date: Thu Nov 17 07:31:50 2022 +0100 s390/cio: evaluate devices with non-operational paths css_schedule_reprobe() function calls the evaluation for CSS_EVAL_UNREG which is specific to the idset of unregistered subchannels. This evaluation was introduced because, previously, if the underlying device become not-accessible, the subchannel was unregistered. But, in the recent changes in cio,with the commit '2297791c92d0 s390/cio: dont unregister subchannel from child-drivers', we no longer unregister the subchannels just because of a non-operational device. This allows to have subchannels without any operational device connected on it. So, a css_schedule_reprobe function on unregistered subchannel does not have any effect. Change this functionality to evaluate the subchannels which does not have a working path to the device. This could be due the erroneous device or due to the erraneous path. Evaluate based on the values of OPM and PAM&POM. Here we introduced a new idset function,to keep I/O subchannels in the idset when the last seen status indicates that the device has no working path. A device has no working path if all available paths have been tried without success.A failed I/O attempt on a path is indicated as a 0 bit value in the POM mask. By looking at the POM mask bit values of available paths (1 in PAM) that Linux is supposed to use (1 in vary mask OPM), we can identify a non-working device as a device where the bit-wise and of the PAM, POM and OPM mask return 0. css_schedule_reprobe() is being used by dasd-driver and chsc-cio component. dasd driver, when it detects a change in the pathgroup, invokes the re-evaluation of the subchannel. And chsc-cio component upon a CRW event, (resource accessibility event). In both the cases, it makes much better sense to re-evalute the subchannel with no-valid path. Signed-off-by: Vineeth Vijayan Reported-by: Eric Farman Reviewed-by: Peter Oberparleiter Tested-by: Eric Farman Signed-off-by: Heiko Carstens commit c313094491150bae23b02270e83c72bb97ef2ab2 Author: Christophe JAILLET Date: Sat Jan 14 16:08:22 2023 +0100 s390/ipl: use kstrtobool() instead of strtobool() strtobool() is the same as kstrtobool(). However, the latter is more used within the kernel. In order to remove strtobool() and slightly simplify kstrtox.h, switch to the other function name. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/58a3ed2e21903a93dfd742943b1e6936863ca037.1673708887.git.christophe.jaillet@wanadoo.fr Signed-off-by: Heiko Carstens commit 354f23ac2c8703d170354577738edad159a7d37b Author: Haibo Chen Date: Tue Jan 17 21:51:36 2023 +0800 dt-bindings: iio: adc: Add NXP IMX93 ADC The IMX93 SoC has a new ADC IP, so add binding documentation for NXP IMX93 ADC. Reviewed-by: Rob Herring Signed-off-by: Haibo Chen Link: https://lore.kernel.org/r/20230117135137.1735536-3-haibo.chen@nxp.com Signed-off-by: Jonathan Cameron commit 7d02296ac8b835ff3ffa355eab3c73d3cba921f8 Author: Haibo Chen Date: Tue Jan 17 21:51:35 2023 +0800 iio: adc: add imx93 adc support The ADC in i.mx93 is a total new ADC IP, add a driver to support this ADC. Currently, only support one shot normal conversion triggered by software. For other mode, will add in future. Signed-off-by: Haibo Chen Link: https://lore.kernel.org/r/20230117135137.1735536-2-haibo.chen@nxp.com Signed-off-by: Jonathan Cameron commit 837962ca237cf00100fb9c041a18ebc7a4df4e65 Author: Thomas Weißschuh Date: Wed Jan 18 05:05:35 2023 +0000 kheaders: use standard naming for the temporary directory If the kheaders archive generation is interrupted then this directory may be left on disk and not ignored by git. By using the standard naming schema for temporary files and directories the default .gitignore and "make clean" rules will apply. Suggested-by: Nicolas Schier Suggested-by: Masahiro Yamada Signed-off-by: Thomas Weißschuh Reviewed-by: Nicolas Schier Tested-by: Nicolas Schier Signed-off-by: Masahiro Yamada commit 9c73bcfaa4308c2f2c4871110deb1bc089931942 Author: Thomas Weißschuh Date: Wed Jan 18 05:05:34 2023 +0000 kbuild: also delete temporary directories Reuse the standard naming schema for temporary files also for temporary directories. Such a directory will be used by the kheaders generation. Signed-off-by: Thomas Weißschuh Reviewed-by: Nicolas Schier Tested-by: Nicolas Schier Signed-off-by: Masahiro Yamada commit 2f0e2a39bbab292a150dee658d9257c1d36f99e8 Author: Jani Nikula Date: Tue Jan 17 11:59:46 2023 +0200 docs/kbuild/makefiles: unify quoting Adding any rst quoting seems to be controversial, but at least try to unify the existing quoting a bit, without adding new ones. Signed-off-by: Jani Nikula Signed-off-by: Masahiro Yamada commit 9f1fe2bba382f43f8b91f5d6927541a6c6b4dda4 Author: Jani Nikula Date: Tue Jan 17 11:59:45 2023 +0200 docs/kbuild/makefiles: clean up indentation and whitespace Remove the leading whitespaces, and clean up indentation and whitespace in general. Although the diff looks massive, it's trivial with 'diff -w' or 'git show -w'. Signed-off-by: Jani Nikula Signed-off-by: Masahiro Yamada commit 1a4c1c9df72ec266f94631edc59f9f2a9dc5aa8c Author: Jani Nikula Date: Tue Jan 17 11:59:44 2023 +0200 docs/kbuild/makefiles: drop section numbering, use references Drop the manually updated section numbering. It's hard to maintain, and indeed hasn't been updated when sections 3.4 and 7.8 were dropped. Update all the section references to rst references. Signed-off-by: Jani Nikula Signed-off-by: Masahiro Yamada commit 5e8f0ba38a4d312de1da768e3e339402711cf70f Author: Jani Nikula Date: Tue Jan 17 11:59:43 2023 +0200 docs/kbuild/makefiles: throw out the local table of contents This is not something that should be manually updated. Signed-off-by: Jani Nikula Signed-off-by: Masahiro Yamada commit cec450256f3f0bb428e4a723f7f35607a1375d2c Author: Jani Nikula Date: Tue Jan 17 11:59:42 2023 +0200 docs/kbuild/makefiles: fix header underline The "Kbuild syntax for exported headers" section should not be under "Architecture Makefiles" in hierarchy. Bump the header underline from "-" to "=". Signed-off-by: Jani Nikula Signed-off-by: Masahiro Yamada commit a82dde4a35eea6d6cf4ef23da1567726aced979f Author: Jani Nikula Date: Tue Jan 17 11:59:41 2023 +0200 MAINTAINERS: fix kbuild repo branch The MAINTAINERS repository entry specifies "kconfig" as the branch, but the repository itself has "kbuild". Signed-off-by: Jani Nikula Signed-off-by: Masahiro Yamada commit 12fec3d60118237e4674a463c2c2923b8279ad67 Author: Masahiro Yamada Date: Mon Jan 9 22:40:40 2023 +0900 kbuild: replace $(dot-target).tmp in filechk with $(tmp-target) $(tmp-target) is a better fit for local use like this. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit c83b16cefd78f55071840e1159ead9fe62747769 Author: Masahiro Yamada Date: Sat Jan 7 18:45:45 2023 +0900 kbuild: rust: move rust/target.json to scripts/ scripts/ is a better place to generate files used treewide. With target.json moved to scripts/, you do not need to add target.json to no-clean-files or MRPROPER_FILES. 'make clean' does not visit scripts/, but 'make mrproper' does. Signed-off-by: Masahiro Yamada Reviewed-by: Miguel Ojeda Tested-by: Miguel Ojeda commit 93c656de8da8b53317bd88ecb7cce592310995d8 Author: Masahiro Yamada Date: Sat Jan 7 18:18:20 2023 +0900 fixdep: do not parse *.rlib, *.rmeta, *.so fixdep is designed only for parsing text files. read_file() appends a terminating null byte ('\0') and parse_config_file() calls strstr() to search for CONFIG options. rustc outputs *.rlib, *.rmeta, *.so to dep-info. fixdep needs them in the dependency, but there is no point in parsing such binary files. Signed-off-by: Masahiro Yamada Reviewed-by: Miguel Ojeda Tested-by: Miguel Ojeda commit faa91c472be8ffa3121c9db803d3e529d48e246a Author: Masahiro Yamada Date: Sat Jan 7 18:18:19 2023 +0900 fixdep: avoid parsing the same file over again The dep files (*.d files) emitted by C compilers usually contain the deduplicated list of included files. One exceptional case is when a header is included by the -include command line option, and also by #include directive. For example, the top Makefile adds the command line option, "-include $(srctree)/include/linux/kconfig.h". You do not need to include in every source file. In fact, include/linux/kconfig.h is listed twice in many .*.cmd files due to include/linux/xarray.h having "#include ". I did not fix that since it is a small redundancy. However, this is more annoying for rustc. rustc emits the dependency for each emission type. For example, cmd_rustc_library emits dep-info, obj, and metadata. So, the emitted *.d file contains the dependency for those 3 targets, which makes fixdep parse the same file 3 times. $ grep rust/alloc/raw_vec.rs rust/.alloc.o.cmd rust/alloc/raw_vec.rs \ rust/alloc/raw_vec.rs \ rust/alloc/raw_vec.rs \ To skip the second parsing, this commit adds a hash table for parsed files, just like we did for CONFIG options. Signed-off-by: Masahiro Yamada Acked-by: Miguel Ojeda Tested-by: Miguel Ojeda Reviewed-by: Vincenzo Palazzo commit 871d657385466d380133e457fc86672bedf14cd9 Author: Masahiro Yamada Date: Sat Jan 7 18:18:18 2023 +0900 fixdep: refactor hash table lookup Change the hash table code so it will be easier to add the second table. Signed-off-by: Masahiro Yamada Reviewed-by: Miguel Ojeda Tested-by: Miguel Ojeda commit 2185242faddd12a1ba1060be5caf584fe5aba93a Author: Masahiro Yamada Date: Sat Jan 7 18:18:17 2023 +0900 kbuild: remove sed commands after rustc rules rustc may put comments in dep-info, so sed is used to drop them before passing it to fixdep. Now that fixdep can remove comments, Makefiles do not need to run sed. Signed-off-by: Masahiro Yamada Reviewed-by: Miguel Ojeda Tested-by: Miguel Ojeda Reviewed-by: Vincenzo Palazzo commit bc6df812a1529ab0cbac7f17ac6c4f4aff2a8bbf Author: Masahiro Yamada Date: Sat Jan 7 18:18:16 2023 +0900 fixdep: parse Makefile more correctly to handle comments etc. fixdep parses dependency files (*.d) emitted by the compiler. *.d files are Makefiles describing the dependencies of the main source file. fixdep understands minimal Makefile syntax. It works well enough for GCC and Clang, but not for rustc. This commit improves the parser a little more for better processing comments, escape sequences, etc. My main motivation is to drop comments. rustc may output comments (e.g. env-dep). Currentyly, rustc build rules invoke sed to remove comments, but it is more efficient to do it in fixdep. Signed-off-by: Masahiro Yamada Acked-by: Miguel Ojeda Tested-by: Miguel Ojeda commit 295d8398c67e314d99bb070f38883f83fe94a97a Author: Masahiro Yamada Date: Sat Jan 7 18:18:15 2023 +0900 kbuild: specify output names separately for each emission type from rustc In Kbuild, two different rules must not write to the same file, but it happens when compiling rust source files. For example, set CONFIG_SAMPLE_RUST_MINIMAL=m and run the following: $ make -j$(nproc) samples/rust/rust_minimal.o samples/rust/rust_minimal.rsi \ samples/rust/rust_minimal.s samples/rust/rust_minimal.ll [snip] RUSTC [M] samples/rust/rust_minimal.o RUSTC [M] samples/rust/rust_minimal.rsi RUSTC [M] samples/rust/rust_minimal.s RUSTC [M] samples/rust/rust_minimal.ll mv: cannot stat 'samples/rust/rust_minimal.d': No such file or directory make[3]: *** [scripts/Makefile.build:334: samples/rust/rust_minimal.ll] Error 1 make[3]: *** Waiting for unfinished jobs.... mv: cannot stat 'samples/rust/rust_minimal.d': No such file or directory make[3]: *** [scripts/Makefile.build:309: samples/rust/rust_minimal.o] Error 1 mv: cannot stat 'samples/rust/rust_minimal.d': No such file or directory make[3]: *** [scripts/Makefile.build:326: samples/rust/rust_minimal.s] Error 1 make[2]: *** [scripts/Makefile.build:504: samples/rust] Error 2 make[1]: *** [scripts/Makefile.build:504: samples] Error 2 make: *** [Makefile:2008: .] Error 2 The reason for the error is that 4 threads running in parallel renames the same file, samples/rust/rust_minimal.d. This does not happen when compiling C or assembly files because -Wp,-MMD,$(depfile) explicitly specifies the dependency filepath. $(depfile) is a unique path for each target. Currently, rustc is only given --out-dir and --emit= So, all the rust build rules output the dep-info into the default .d, which causes the path conflict. Fortunately, the --emit option is able to specify the output path individually, with the form --emit==. Add --emit=dep-info=$(depfile) to the common part. Also, remove the redundant --out-dir because the output path is specified for each type. The code gets much cleaner because we do not need to rename *.d files. Signed-off-by: Masahiro Yamada Reviewed-by: Miguel Ojeda Tested-by: Miguel Ojeda Reviewed-by: Vincenzo Palazzo commit 16169a47d5c36046041527faafb5a3f5c86701c6 Author: Masahiro Yamada Date: Sat Jan 7 18:18:14 2023 +0900 kbuild: refactor host*_flags Remove _host*_flags. No functional change is intended. Signed-off-by: Masahiro Yamada Reviewed-by: Miguel Ojeda Tested-by: Miguel Ojeda commit ecd42fba5765bba5955e3e1f80265295c0f5c32d Author: Masahiro Yamada Date: Fri Dec 30 03:46:50 2022 +0900 kbuild: unify cmd_dt_S_dtb and cmd_dt_S_dtbo cmd_dt_S_dtb and cmd_dt_S_dtbo are almost the same; the only difference is the prefix of the begin/end symbols. (__dtb vs __dtbo) Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit ee2162bd4fe85a62dcd3b9133fd0c537ae2eb3c5 Author: Masahiro Yamada Date: Thu Dec 29 18:15:01 2022 +0900 kbuild: add more comments for KBUILD_NOCMDDEP=1 The cmd-check for KBUILD_NOCMDDEP=1 may not be clear until you see commit c4d5ee13984f ("kbuild: make KBUILD_NOCMDDEP=1 handle empty built-in.o"). When a phony target (i.e. FORCE) is the only prerequisite, Kbuild uses a tricky way to detect that the target does not exist. Add more comments. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 92215e7a801da7b89037a185c98f5ebb86a415b9 Author: Masahiro Yamada Date: Thu Dec 29 18:15:00 2022 +0900 kbuild: rename cmd_$@ to savedcmd_$@ in *.cmd files The cmd-check macro compares $(cmd_$@) and $(cmd_$1), but a pitfall is that you cannot use cmd_ as the variable name for the command. For example, the following code will not work in the top Makefile or ./Kbuild. quiet_cmd_foo = GEN $@ cmd_foo = touch $@ targets += foo foo: FORCE $(call if_changed,foo) In this case, both $@ and $1 are expanded to 'foo', so $(cmd_check) is always empty. We do not need to use the same prefix for cmd_$@ and cmd_$1. Rename the former to savedcmd_$@. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 91ecf7ff1b036f3fe1183809661119b1ee109b19 Author: Masahiro Yamada Date: Thu Dec 29 16:43:10 2022 +0900 kbuild: make W=1 warn files that are tracked but ignored by git The top .gitignore comments about how to detect files breaking .gitignore rules, but people rarely care about it. Add a new W=1 warning to detect files that are tracked but ignored by git. If git is not installed or the source tree is not tracked by git at all, this script does not print anything. Running it on v6.2-rc1 detected the following: $ make W=1 misc-check Documentation/devicetree/bindings/.yamllint: warning: ignored by one of the .gitignore files drivers/clk/.kunitconfig: warning: ignored by one of the .gitignore files drivers/gpu/drm/tests/.kunitconfig: warning: ignored by one of the .gitignore files drivers/hid/.kunitconfig: warning: ignored by one of the .gitignore files fs/ext4/.kunitconfig: warning: ignored by one of the .gitignore files fs/fat/.kunitconfig: warning: ignored by one of the .gitignore files kernel/kcsan/.kunitconfig: warning: ignored by one of the .gitignore files lib/kunit/.kunitconfig: warning: ignored by one of the .gitignore files mm/kfence/.kunitconfig: warning: ignored by one of the .gitignore files tools/testing/selftests/arm64/tags/.gitignore: warning: ignored by one of the .gitignore files tools/testing/selftests/arm64/tags/Makefile: warning: ignored by one of the .gitignore files tools/testing/selftests/arm64/tags/run_tags_test.sh: warning: ignored by one of the .gitignore files tools/testing/selftests/arm64/tags/tags_test.c: warning: ignored by one of the .gitignore files These are ignored by the '.*' or 'tags' in the top .gitignore, but there is no rule to negate it. You might be tempted to do 'git add -f' but I want to have the real issue fixed (by fixing a .gitignore, or by renaming files, etc.). Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor Reviewed-by: Nicolas Schier commit b8a9ddcafc1a7ed071a44c1e9937d68e7efc8f70 Author: Masahiro Yamada Date: Thu Dec 29 16:43:09 2022 +0900 .gitignore: update the command to check tracked files being ignored Recent git versions do not accept the noted command. $ git ls-files -i --exclude-standard fatal: ls-files -i must be used with either -o or -c The -c was implied before, but we need to make it explicit since git commit b338e9f66873 ("ls-files: error out on -i unless -o or -c are specified"). Also, replace --exclude-standard with --exclude-per-directory=.gitignore so that everyone will get consistent results. git-ls-files(1) says: --exclude-standard Add the standard Git exclusions: .git/info/exclude, .gitignore in each directory, and the user's global exclusion file. We cannot predict what is locally added to .git/info/exclude or the user's global exclusion file. We can only manage .gitignore files committed to the repository. Signed-off-by: Masahiro Yamada Reviewed-by: Miguel Ojeda commit 8f99eb857a96d474bfbb715ff9073b276b87ad2d Author: Masahiro Yamada Date: Thu Dec 29 16:06:33 2022 +0900 kbuild: clean up stale file removal More than one year has passed since the copied *.[cS] files were removed from arch/*/boot/compressed/. Signed-off-by: Masahiro Yamada commit 83d98d73b4fc2d485b4a2fd996f5a23e79ee3b52 Author: Masahiro Yamada Date: Fri Dec 23 01:25:35 2022 +0900 kbuild: drop V=0 support The top Makefile sets KBUILD_VERBOSE to 0 by default, it looks weird now because V=1 and V=2 can be OR'ed as V=12. The default should be empty. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 6ae4b9868a8f723cae2600722eea033fafadd399 Author: Masahiro Yamada Date: Fri Dec 23 01:25:34 2022 +0900 kbuild: allow to combine multiple V= levels Commit a6de553da01c ("kbuild: Allow to combine multiple W= levels") supported W=123 to enable all the extra warning groups. I think a similar idea is applicable to the V= option. V=1 echos the whole command V=2 prints the reason for rebuilding These are orthogonal, and can be enabled at the same time. This commit supports V=12 to enable both of them. Signed-off-by: Masahiro Yamada Tested-by: Nicolas Schier Reviewed-by: Nicolas Schier commit c0d3b83100c896e1b0909023df58a0ebdd428d61 Author: Masahiro Yamada Date: Fri Dec 23 01:25:33 2022 +0900 kbuild: do not print extra logs for V=2 Some scripts increase the verbose level when V=1, but others when not V=0. I think the former is correct because V=2 is not a log level but a switch to print the reason for rebuilding. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 8962b6b475bddc011c414f40ffd02f0ed4e02771 Author: Masahiro Yamada Date: Fri Dec 23 01:25:32 2022 +0900 kbuild: print short log in addition to the whole command with V=1 "make V=1" prints the whole command instead of the short log, but I think it is nicer to print both so that you can easily spot the build rule of your interest. This commit changes V=1 to print the short log (the line starts with '#'), followed by the full log. In parallel builds, the short/full logs from the same build rule may be interspersed. If you want to avoid it, please add -Otarget option. Kbuild will never set it by default because Make would buffer the logs and lose the escape sequences. (Modern compilers print warnings and errors in color, but only when they write to a terminal.) This is also a preparation for supporting V=12 because V=2 appends the reason for rebuilding to the short log. Signed-off-by: Masahiro Yamada Tested-by: Nicolas Schier Reviewed-by: Nicolas Schier commit fc5d57a9a4fe3e3662c4ec4e84772dcea64979ca Author: Masahiro Yamada Date: Fri Dec 23 01:25:31 2022 +0900 kbuild: refactor silent mode detection Factor out $(findstring s,...). Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers Reviewed-by: Nicolas Schier commit f89fd04323f755e7437a0113d986812c3fffe03d Merge: 00142bfd5a916 2241ab53cbb5c Author: Greg Kroah-Hartman Date: Sun Jan 22 12:56:55 2023 +0100 Merge 6.2-rc5 into driver-core-next We need the driver core fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 7a6aa989f2e844a22cfab5c8ff30e77d17dabb2f Merge: 05e2600cb0a4d 2241ab53cbb5c Author: Greg Kroah-Hartman Date: Sun Jan 22 12:55:13 2023 +0100 Merge 6.2-rc5 into tty-next We need the serial/tty changes into this branch as well. Signed-off-by: Greg Kroah-Hartman commit 6febdb2491626d4ae8c54dff51716b2695bcd12d Author: Christophe Branchereau Date: Sat Jan 21 17:24:19 2023 +0100 drm/panel: Add driver for the AUO A030JTN01 TFT LCD Add driver for the AUO A030JTN01 panel, which is a 320x480 3.0" 4:3 24-bit TFT LCD panel with non-square pixels and a delta-RGB 8-bit interface. Signed-off-by: Christophe Branchereau Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20230121162419.284523-3-cbranchereau@gmail.com commit 35b9dca5626207b0c3933d2fcd38f81bb02a17bf Author: Paul Cercueil Date: Sat Jan 21 17:24:18 2023 +0100 dt-bindings: display/panel: Add AUO A030JTN01 Add binding for the AUO A030JTN01 panel, which is a 320x480 3.0" 4:3 24-bit TFT LCD panel with non-square pixels and a delta-RGB 8-bit interface. Signed-off-by: Christophe Branchereau Signed-off-by: Paul Cercueil Reviewed-by: Krzysztof Kozlowski Link: https://patchwork.freedesktop.org/patch/msgid/20230121162419.284523-2-cbranchereau@gmail.com commit aca1d27ac38a61d7db4b56418386992cb96b63f0 Author: Demi Marie Obenour Date: Thu Jan 19 14:03:57 2023 -0500 efi: xen: Implement memory descriptor lookup based on hypercall Xen on x86 boots dom0 in EFI mode but without providing a memory map. This means that some consistency checks we would like to perform on configuration tables or other data structures in memory are not currently possible. Xen does, however, expose EFI memory descriptor info via a Xen hypercall, so let's wire that up instead. It turns out that the returned information is not identical to what Linux's efi_mem_desc_lookup would return: the address returned is the address passed to the hypercall, and the size returned is the number of bytes remaining in the configuration table. However, none of the callers of efi_mem_desc_lookup() currently care about this. In the future, Xen may gain a hypercall that returns the actual start address, which can be used instead. Co-developed-by: Ard Biesheuvel Signed-off-by: Ard Biesheuvel Signed-off-by: Demi Marie Obenour Tested-by: Marek Marczykowski-Górecki Signed-off-by: Ard Biesheuvel commit ab03e91e60ce457a90e6aa2c97ca2fa139b73f55 Author: Demi Marie Obenour Date: Thu Jan 19 14:03:56 2023 -0500 efi: memmap: Disregard bogus entries instead of returning them The ESRT code currently contains two consistency checks on the memory descriptor it obtains, but one of them is both incomplete and can only trigger on invalid descriptors. So let's drop these checks, and instead disregard descriptors entirely if the start address is misaligned, or if the number of pages reaches to or beyond the end of the address space. Note that the memory map as a whole could still be inconsistent: multiple entries might cover the same area, or the address could be outside of the addressable PA space, but validating that goes beyond the scope of these helpers. Also note that since the physical address space is never 64-bits wide, a descriptor that includes the last page of memory is not valid. This is fortunate, since it means that a valid physical address will never be an error pointer and that the length of a memory descriptor in bytes will fit in a 64-bit unsigned integer. Co-developed-by: Ard Biesheuvel Signed-off-by: Ard Biesheuvel Signed-off-by: Demi Marie Obenour Tested-by: Marek Marczykowski-Górecki Signed-off-by: Ard Biesheuvel commit 7120d6bfd6d0b26b49958f429701996f2d3e2c2a Author: Hans Verkuil Date: Tue Jan 10 13:45:33 2023 +0100 media: tm6000: remove deprecated driver The tm6000 driver does not use the vb2 framework for streaming video, instead it uses the old vb1 framework and nobody stepped in to convert this driver to vb2. The hardware is very old, so the decision was made to remove it altogether since we want to get rid of the old vb1 framework. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d2a8e92f0b41f26ab798a4296eacdf71959fc6a9 Author: Hans Verkuil Date: Tue Jan 10 13:13:41 2023 +0100 media: vpfe_capture: remove deprecated davinci drivers The vpfe_capture drivers do not use the vb2 framework for streaming video, instead they use the old vb1 framework and nobody stepped in to convert these drivers to vb2. The hardware is very old, so the decision was made to remove them altogether since we want to get rid of the old vb1 framework. Signed-off-by: Hans Verkuil Acked-by: Lad Prabhakar Signed-off-by: Mauro Carvalho Chehab commit 3673237b62a845e49c3e55e8fdbabb20178429a7 Author: Hans Verkuil Date: Tue Jan 10 10:49:14 2023 +0100 media: zr364xx: remove deprecated driver The zr364xx driver does not use the vb2 framework for streaming video, instead it uses the old vb1 framework and nobody stepped in to convert this driver to vb2. The hardware is very old, so the decision was made to remove it altogether since we want to get rid of the old vb1 framework. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit aa68bf90a6288aeed02937523328740c07d14043 Author: Hans Verkuil Date: Tue Jan 10 10:45:21 2023 +0100 media: stkwebcam: remove deprecated driver The stkwebcam driver does not use the vb2 framework for streaming video, instead it implements this in the driver. This is error prone, and nobody stepped in to convert this driver to that framework. The hardware is very old, so the decision was made to remove it altogether. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b136c90957784fdb631d123e6c3865d249717dc9 Author: Hans Verkuil Date: Tue Jan 10 10:39:53 2023 +0100 media: fsl-viu: remove deprecated driver The fsl-viu driver does not use the vb2 framework for streaming video, instead it uses the old vb1 framework and nobody stepped in to convert this driver to vb2. The hardware is very old, so the decision was made to remove it altogether since we want to get rid of the old vb1 framework. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9ea8a9c72a9b4d24e6045ee25f5e465dc22f9f55 Author: Hans Verkuil Date: Tue Jan 10 10:33:52 2023 +0100 media: cpia2: remove deprecated driver The cpia2 driver does not use the vb2 framework for streaming video, instead it implements this in the driver. This is error prone, and nobody stepped in to convert this driver to that framework. The hardware is very old, so the decision was made to remove it altogether. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ba47652ba65523ccadac3f8d50dc0e0d560477b2 Author: Hans Verkuil Date: Tue Jan 10 10:26:19 2023 +0100 media: meye: remove this deprecated driver The meye driver does not use the vb2 framework for streaming video, instead it implements this in the driver. This is error prone, and nobody stepped in to convert this driver to that framework. The hardware is very old, so the decision was made to remove it altogether. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 58388bd7006218f46dcbde2bf8f2d79cb7e4dc61 Author: Sakari Ailus Date: Thu Oct 6 13:28:53 2022 +0200 media: Documentation: Update documentation for streams Document how streams interacts with formats and selections. Update documentation in respect to what is allowed, in particular streams are only supported via full routes, source-only routes are not supported right now. The centerpiece of the API additions are streams. Albeit routes are configured via S_ROUTING IOCTL that also declares streams, it is streams that are accessed through other APIs. Thus refer to streams instead of routes in documentation. Signed-off-by: Sakari Ailus Reviewed-by: Tomi Valkeinen Signed-off-by: Mauro Carvalho Chehab commit 9037d1308b59b7c48c9e993f626417363cfb04c6 Author: Sakari Ailus Date: Thu Mar 28 21:05:54 2019 +0100 media: Add stream to frame descriptor The stream field identifies the stream this frame descriptor applies to in routing configuration across a multiplexed link. Signed-off-by: Sakari Ailus Reviewed-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Signed-off-by: Tomi Valkeinen Signed-off-by: Mauro Carvalho Chehab commit 9ae21ac445e911e3541985c20052fc05d60f6879 Author: Vaishnav Achath Date: Thu Jan 19 09:56:22 2023 +0530 arm64: dts: ti: k3-j7200: Fix wakeup pinmux range The WKUP_PADCONFIG register region in J7200 has multiple non-addressable regions, split the existing wkup_pmx region as follows to avoid the non-addressable regions and include all valid WKUP_PADCONFIG registers. Also update references to old nodes with new ones. wkup_pmx0 -> 13 pins (WKUP_PADCONFIG 0 - 12) wkup_pmx1 -> 2 pins (WKUP_PADCONFIG 14 - 15) wkup_pmx2 -> 59 pins (WKUP_PADCONFIG 26 - 84) wkup_pmx3 -> 8 pins (WKUP_PADCONFIG 93 - 100) J7200 Datasheet (Table 6-106, Section 6.4 Pin Multiplexing) : https://www.ti.com/lit/ds/symlink/dra821u.pdf Fixes: d361ed88455f ("arm64: dts: ti: Add support for J7200 SoC") Signed-off-by: Vaishnav Achath Reviewed-by: Jayesh Choudhary Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230119042622.22310-1-vaishnav.a@ti.com commit a266c180b398eab5030bdcf2d1bbdc62fb7fc9c1 Author: Sinthu Raja Date: Mon Jan 16 12:44:46 2023 +0530 arm64: dts: ti: k3-am68-sk: Add support for AM68 SK base board The SK architecture comprises of baseboard and a SOM board. The AM68 Starter Kit's baseboard contains most of the actual connectors, power supply etc. The System on Module (SoM) is plugged on to the base board. Therefore, add support for peripherals brought out in the base board. Schematics: https://www.ti.com/lit/zip/SPRR463 Signed-off-by: Sinthu Raja Tested-by: Vaishnav Achath Reviewed-by: Neha Malcom Francis Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230116071446.28867-4-sinthu.raja@ti.com commit 34a315ce0e1c03120dd2438875af1a897c039ea0 Author: Laurent Pinchart Date: Tue Jan 18 01:16:14 2022 +0100 media: v4l2-subdev: Add v4l2_subdev_s_stream_helper() function The v4l2_subdev_s_stream_helper() helper can be used by subdevs that implement the stream-aware .enable_streams() and .disable_streams() operations to implement .s_stream(). This is limited to subdevs that have a single source pad. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen Reviewed-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit 2b6277b76d42cbb781c558ea982e23cd770dd363 Author: Sinthu Raja Date: Mon Jan 16 12:44:45 2023 +0530 arm64: dts: ti: Add initial support for AM68 SK System on Module AM68 Starter Kit (SK) is a low cost, small form factor board designed for TI’s AM68 SoC. TI’s AM68 SoC comprises of dual core A72, high performance vision accelerators, hardware accelerators, latest C71x DSP, high bandwidth real-time IPs for capture and display. The SoC is power optimized to provide best in class performance for industrial applications. AM68 SK supports the following interfaces: * 16 GB LPDDR4 RAM * x1 Gigabit Ethernet interface * x1 USB 3.1 Type-C port * x2 USB 3.1 Type-A ports * x1 PCIe M.2 M Key * 512 Mbit OSPI flash * x2 CSI2 Camera interface (RPi and TI Camera connector) * 40-pin Raspberry Pi GPIO header SK's System on Module (SoM) contains the SoC and DDR. Therefore, add DT node for the SOC and DDR on the SoM. Schematics: https://www.ti.com/lit/zip/SPRR463 TRM: http://www.ti.com/lit/pdf/spruj28 Signed-off-by: Sinthu Raja Tested-by: Vaishnav Achath Reviewed-by: Neha Malcom Francis Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230116071446.28867-3-sinthu.raja@ti.com commit d0749adb30706f4e3af452698db96f671444341a Author: Laurent Pinchart Date: Mon Dec 13 15:11:56 2021 +0100 media: v4l2-subdev: Add subdev .(enable|disable)_streams() operations Add two new subdev pad operations, .enable_streams() and .disable_streams(), to allow control of individual streams per pad. This is a superset of what the video .s_stream() operation implements. To help with handling of backward compatibility, add two wrapper functions around those operations, and require their usage in drivers. Signed-off-by: Tomi Valkeinen Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit 73b1c4f5f53e531f75d4b65dec4784cf67e685f2 Author: Sinthu Raja Date: Mon Jan 16 12:44:44 2023 +0530 dt-bindings: arm: ti: Add binding for AM68 SK AM68 Starter Kit is a low cost, small form factor board designed for TI's AM68 SoC which is optimized to provide best in class performance for industrial applications and add binding for the same. Signed-off-by: Sinthu Raja Reviewed-by: Neha Malcom Francis Acked-by: Krzysztof Kozlowski Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230116071446.28867-2-sinthu.raja@ti.com commit c4a73f316d04594689dffcae8d800787e4fc9f75 Author: Laurent Pinchart Date: Tue Jan 18 00:51:23 2022 +0100 media: v4l2-subdev: Add v4l2_subdev_state_xlate_streams() helper Add a helper function to translate streams between two pads of a subdev, using the subdev's internal routing table. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen Signed-off-by: Mauro Carvalho Chehab commit 69c0fe7ae78b9ed696b5a5d8eaae7ca622c6f7ca Author: Laurent Pinchart Date: Tue Dec 21 11:23:58 2021 +0100 media: subdev: add v4l2_subdev_routing_validate() helper Add a v4l2_subdev_routing_validate() helper for verifying routing for common cases like only allowing non-overlapping 1-to-1 streams. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen Reviewed-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit 5b0d85b379747b09d8b4630fdb5c8a8d74122f0f Author: Tomi Valkeinen Date: Wed Aug 25 12:24:09 2021 +0200 media: subdev: add v4l2_subdev_set_routing_with_fmt() helper v4l2_subdev_set_routing_with_fmt() is the same as v4l2_subdev_set_routing(), but additionally initializes all the streams with the given format. Signed-off-by: Tomi Valkeinen Reviewed-by: Hans Verkuil Reviewed-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit 72c5fbcaa33d88b3e642da7c07741bf5364ce12c Author: Tomi Valkeinen Date: Tue Dec 21 11:23:13 2021 +0100 media: subdev: add streams to v4l2_subdev_get_fmt() helper function Add streams support to v4l2_subdev_get_fmt() helper function. Subdev drivers that do not need to do anything special in their get_fmt op can use this helper directly for v4l2_subdev_pad_ops.get_fmt. Signed-off-by: Tomi Valkeinen Signed-off-by: Mauro Carvalho Chehab commit d00f1a075ce13c7d71ca00083be110877874a403 Author: Tomi Valkeinen Date: Tue Dec 21 11:22:06 2021 +0100 media: subdev: add "opposite" stream helper funcs Add two helper functions to make dealing with streams easier: v4l2_subdev_routing_find_opposite_end - given a routing table and a pad + stream, return the pad + stream on the opposite side of the subdev. v4l2_subdev_state_get_opposite_stream_format - return a pointer to the format on the pad + stream on the opposite side from the given pad + stream. Signed-off-by: Tomi Valkeinen Reviewed-by: Hans Verkuil Reviewed-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit a6b995ed03ffeb36f06c4a46d8804c24d776de6f Author: Tomi Valkeinen Date: Thu Jul 15 15:40:37 2021 +0200 media: subdev: use streams in v4l2_subdev_link_validate() Update v4l2_subdev_link_validate() to use routing and streams for validation. Instead of just looking at the format on the pad on both ends of the link, the routing tables are used to collect all the streams going from the source to the sink over the link, and the streams' formats on both ends of the link are verified. Signed-off-by: Tomi Valkeinen Signed-off-by: Mauro Carvalho Chehab commit 2f91e10ee6fd4c0c4abba4d36c013a93560cf514 Author: Tomi Valkeinen Date: Tue Dec 21 11:20:53 2021 +0100 media: subdev: add stream based configuration Add support to manage configurations (format, crop, compose) per stream, instead of per pad. This is accomplished with data structures that hold an array of all subdev's stream configurations. The number of streams can vary at runtime based on routing. Every time the routing is changed, the stream configurations need to be re-initialized. Signed-off-by: Tomi Valkeinen Signed-off-by: Mauro Carvalho Chehab commit 70283e99a90b105173a05e8a8ebc78322b1127b5 Author: Tomi Valkeinen Date: Mon Aug 30 11:50:59 2021 +0200 media: Documentation: add multiplexed streams documentation Add documentation related to multiplexed streams. Signed-off-by: Tomi Valkeinen Signed-off-by: Mauro Carvalho Chehab commit 837f92f070f6b7e877143eb168025995688b9756 Author: Jacopo Mondi Date: Sun Oct 17 20:24:42 2021 +0200 media: subdev: Add for_each_active_route() macro Add a for_each_active_route() macro to replace the repeated pattern of iterating on the active routes of a routing table. Signed-off-by: Jacopo Mondi Signed-off-by: Tomi Valkeinen Signed-off-by: Mauro Carvalho Chehab commit 17bb9bf819c542b41d7dbddd9fe1ec82ac509604 Author: Tomi Valkeinen Date: Tue Dec 21 11:18:43 2021 +0100 media: subdev: add v4l2_subdev_set_routing helper() Add a helper function to set the subdev routing. The helper can be used from subdev driver's set_routing op to store the routing table. Signed-off-by: Tomi Valkeinen Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 33c0ddbe56905c98b43d7141f2fe67ae69afba3c Author: Tomi Valkeinen Date: Thu Jul 15 15:39:19 2021 +0200 media: subdev: add v4l2_subdev_has_pad_interdep() Add a v4l2_subdev_has_pad_interdep() helper function which can be used for media_entity_operations.has_pad_interdep op. It considers two pads interdependent if there is an active route between pad0 and pad1. Signed-off-by: Tomi Valkeinen Signed-off-by: Mauro Carvalho Chehab commit 8a54644571fed484d55b3807f25f64cba8a9ca77 Author: Tomi Valkeinen Date: Sun Jan 15 13:40:08 2023 +0100 media: subdev: Require code change to enable [GS]_ROUTING The Streams API is an experimental feature. To use the Streams API, the user needs to change a variable in v4l2-subdev.c and recompile the kernel. This commit should be reverted when the Streams API is deemed ready for production use. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit a418bb3f30d9ac570d51ff3f700851b78da2a8a9 Author: Laurent Pinchart Date: Fri Apr 23 09:15:54 2021 +0200 media: subdev: Add [GS]_ROUTING subdev ioctls and operations Add support for subdev internal routing. A route is defined as a single stream from a sink pad to a source pad. The userspace can configure the routing via two new ioctls, VIDIOC_SUBDEV_G_ROUTING and VIDIOC_SUBDEV_S_ROUTING, and subdevs can implement the functionality with v4l2_subdev_pad_ops.set_routing(). - Add sink and source streams for multiplexed links - Copy the argument back in case of an error. This is needed to let the caller know the number of routes. - Expand and refine documentation. - Make the 'routes' pointer a __u64 __user pointer so that a compat32 version of the ioctl is not required. - Add struct v4l2_subdev_krouting to be used for subdevice operations. - Fix typecasing warnings - Check sink & source pad types - Add 'which' field - Routing to subdev state - Dropped get_routing subdev op Signed-off-by: Laurent Pinchart Signed-off-by: Michal Simek Signed-off-by: Sakari Ailus Signed-off-by: Jacopo Mondi Signed-off-by: Tomi Valkeinen Signed-off-by: Mauro Carvalho Chehab commit ea73eda50813df0dadbbd6fe2b31ae9484da0cc0 Author: Jacopo Mondi Date: Thu Mar 28 21:05:56 2019 +0100 media: Documentation: Add GS_ROUTING documentation Add documentation for VIDIOC_SUBDEV_G/S_ROUTING ioctl and add description of multiplexed media pads and internal routing to the V4L2-subdev documentation section. Signed-off-by: Jacopo Mondi Signed-off-by: Tomi Valkeinen Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9a6b5bf4c1bba341eeb010f3ea8b5b48651f65f8 Author: Tomi Valkeinen Date: Mon Nov 22 16:18:23 2021 +0100 media: add V4L2_SUBDEV_CAP_STREAMS Add a subdev capability flag to expose to userspace if a subdev supports multiplexed streams. Signed-off-by: Tomi Valkeinen Signed-off-by: Mauro Carvalho Chehab commit d6cc9c7c1a34dab83c94179ae91ab0582f2f9774 Author: Tomi Valkeinen Date: Thu Jul 29 15:02:04 2021 +0200 media: add V4L2_SUBDEV_FL_STREAMS Add subdev flag V4L2_SUBDEV_FL_STREAMS. It is used to indicate that the subdev supports the new API with multiplexed streams (routing, stream configs). Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit c2a7f7a406117ba616774c89c3a3528a0320568f Author: Tomi Valkeinen Date: Mon Sep 26 07:51:45 2022 +0200 media: v4l2-subdev: Sort includes Sort the includes alphabetically. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit cea606d9e996a77eed57fc60709e0728341450e3 Author: Yang Yingliang Date: Wed Jan 4 10:39:21 2023 +0100 media: imx: imx7-media-csi: fix missing clk_disable_unprepare() in imx7_csi_init() Add missing clk_disable_unprepare(), if imx7_csi_dma_setup() fails in imx7_csi_init(). Fixes: ff43ca911978 ("media: imx: imx7-media-csi: Move CSI configuration before source start") Signed-off-by: Yang Yingliang Reviewed-by: Rui Miguel Silva Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit da8e05f84a11c3cc3b0ba0a3c62d20e358002d99 Author: Jiasheng Jiang Date: Wed Jan 4 09:55:37 2023 +0100 media: platform: ti: Add missing check for devm_regulator_get Add check for the return value of devm_regulator_get since it may return error pointer. Fixes: 448de7e7850b ("[media] omap3isp: OMAP3 ISP core") Signed-off-by: Jiasheng Jiang Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 0d828fd50c73d30da3c0d52a31c6f3ede2498020 Author: Xavier Roumegue Date: Tue Jan 3 11:55:34 2023 +0100 media: dw100: Add a missing unwind goto in dw100_probe() In case the IRQ allocation returns an error in dw100_probe(), the pm runtime is not disabled before to return. Add the missing unwind goto on the error handling path of the IRQ allocation request. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Xavier Roumegue Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit de655386845ade57f964dd31020cdd7a11925872 Author: Marek Vasut Date: Wed Nov 2 20:19:10 2022 +0100 media: dt-bindings: media: imx7-csi: Document i.MX8M power-domains property The power-domains property is mandatory on i.MX8M Quad and Mini. Document the property and mark it as required on the aforementioned variants of the IP, present in those SoCs. Signed-off-by: Marek Vasut Acked-by: Alexander Stein Acked-by: Krzysztof Kozlowski Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 25ba644e3bfc96bd3e86c6dadcf03ba825d6d0b4 Author: Miaoqian Lin Date: Sat Dec 17 15:31:13 2022 +0100 media: mc: entity: Fix doc for media_graph_walk_init There is no media_graph_walk_free(). media_graph_walk_cleanup() is used to release the resources. Signed-off-by: Miaoqian Lin Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 1ec061243edeb729ac249b278bb241a846cc8e64 Author: Laurent Pinchart Date: Fri Jan 14 01:26:26 2022 +0100 media: mc: Improve the media_entity_has_pad_interdep() documentation Document the function parameters, the requirements on the pad0 and pad1 arguments, the locking requirements and the return value. Also improve the documentation of the corresponding .has_pad_interdep() operation, stating clearly that the operation must be called through the media_entity_has_pad_interdep() function only. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Signed-off-by: Mauro Carvalho Chehab commit 7acd650a0484d92985a0d6d867d980c6dd019885 Author: Gaosheng Cui Date: Tue Nov 29 12:01:59 2022 +0100 media: ti: cal: fix possible memory leak in cal_ctx_create() The memory of ctx is allocated in cal_ctx_create(), but it will not be freed when cal_ctx_v4l2_init() fails, so add kfree() when cal_ctx_v4l2_init() fails to fix it. Fixes: d68a94e98a89 ("media: ti-vpe: cal: Split video device initialization and registration") Signed-off-by: Gaosheng Cui Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit defcedfb3e60320f54fac005ca3991d438e1f93b Author: Laurent Pinchart Date: Sun Jan 2 00:26:37 2022 +0100 media: i2c: max9286: Print power-up GMSL link configuration The power-up GMSL link configuration is controlled by the HIM and BWS pins, whose state is reflected in register 0x1c. Print the detected power-up config in a debug message to help debugging. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit 40f75457983f1d3fb01a89dfa8f1f3d5339decbc Author: Laurent Pinchart Date: Sat Jan 1 19:28:06 2022 +0100 media: i2c: max9286: Select HS as data enable signal GMSL can transport three synchronization signals: VSync, HSync and Data Enable. The MAX9286 can select either HS or DE as a line valid signal. Not all serializers (and transmission formats) support the DE signal. The MAX9271, used by the RDACM20 and RDACM21 cameras, doesn't document DE support. Nonetheless, the max9286 driver selects the DE signal as line valid in register 0x0c (by not setting the DESEL bit). It's not clear why this works. As HS is a more common line valid qualifier, set the DESEL bit by default. This is needed to support the onsemi MARS cameras. If a camera requires usage of the DE signal in the future, this will need to be made configurable. Signed-off-by: Laurent Pinchart Tested-by: Jacopo Mondi # On Eagle V3M with RDACM20 Reviewed-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit 3697f1089cd04fbc8c3c3058b20b5f1eb6bd776e Author: Laurent Pinchart Date: Sat Jan 1 19:28:05 2022 +0100 media: i2c: max9286: Configure bus width from device tree The GMSL serial data bus width is normally selected through the BWS pin. On some systems, the pin may not be wired to the correct value. Support overriding the bus width by software, using the value specified in the device tree. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit e332061bbe3ed2b38ebd8f148add894028311279 Author: Laurent Pinchart Date: Sat Jan 1 19:28:04 2022 +0100 media: i2c: max9286: Configure remote I2C speed from device tree Read the maxim,i2c-clock-frequency DT property that specifies the speed of the remote I2C bus, and configure the MAX9286 accordingly. The remote serializers must all have a matching configuration. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit cdcb186e364452cbe309db5a94ff5a510be234e2 Author: Laurent Pinchart Date: Sat Jan 1 19:28:03 2022 +0100 media: i2c: max9286: Define macros for all bits of register 0x15 Macros are easier to read than numerical values. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit f1403802d5117651f0b8fd1ec3ba2e0515ab17ad Author: Laurent Pinchart Date: Sat Jan 1 19:28:02 2022 +0100 media: i2c: max9286: Support 12-bit raw bayer formats Add support for 12-bit raw bayer formats to the driver, configuring the GMSL format accordingly. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit b904512bf693db4aaaa81b4db079eccb07600630 Author: Laurent Pinchart Date: Sat Jan 1 19:28:01 2022 +0100 media: i2c: max9286: Rename MAX9286_DATATYPE_RAW11 to RAW12 The MAX9286_DATATYPE_RAW11 value is used to configure the MAX9286 for 11-bit or 12-bit input data. While 11-bit data is supported on the GMSL side, CSI-2 doesn't have a RAW11 format. 11-bit data is transferred over CSI-2 as RAW12. Rename the macro accordingly to avoid confusion. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit cffc9fb1ed6c5cd0718b74d7759432e42f860087 Author: Laurent Pinchart Date: Sat Jan 1 19:28:00 2022 +0100 media: i2c: max9286: Support manual framesync operation The MAX9286 can generate a framesync signal to synchronize the cameras, using an internal timer. Support this mode of operation and configure it through the .s_frameinterval() operation. If the frame interval is not 0, framesync is switched to manual mode with the specified interval, otherwise automatic mode is used. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit 817660f44d6063168ba27931e56c5cd2d5ae86af Author: Thomas Nizan Date: Sat Jan 1 19:27:59 2022 +0100 media: i2c: max9286: Add support for port regulators Allow users to use one PoC regulator per port, instead of a global regulator. The properties '^port[0-3]-poc-supply$' in the DT node are used to indicate the regulators for individual ports. Signed-off-by: Thomas Nizan Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit e3435af91e7be03e514a5e0294094ff60f6248e4 Author: Laurent Pinchart Date: Mon Jan 10 22:24:46 2022 +0100 media: dt-bindings: media: i2c: max9286: Add property to select bus width The GMSL serial data bus width is normally selected by the BWS pin, but it can also be configured by software. Add a DT property that allows overriding the value of the BWS-selected bus width to support systems whose BWS pin doesn't result in the correct value. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit 622f6dae269341fe509c15d1bbcba2803e478dac Author: Laurent Pinchart Date: Sat Jan 1 19:27:57 2022 +0100 media: dt-bindings: media: i2c: max9286: Add property to select I2C speed The I2C speed on the remote side (the I2C master bus of the connected serializers) is configurable, and doesn't need to match the speed of the local bus (the slave bus of the MAX9286). All remote buses must use the same speed, and the MAX9286 needs to be programmed accordingly. Add a new DT property to select the speed to make it configurable. Signed-off-by: Laurent Pinchart Reviewed-by: Rob Herring Reviewed-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit 48dd004e7d736d2050022df778639703966b7484 Author: Laurent Pinchart Date: Sat Jan 1 19:27:56 2022 +0100 media: dt-bindings: media: i2c: max9286: Add support for per-port supplies Power supplies for the ports can be controlled per port depending on the hardware design. Support per-port supplies in the DT bindings, mutually exclusive with the global supply. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit 82adfe34694c98f1115a7b75cff6af9c4a35dba9 Merge: 0444ef665addb b839212988575 Author: Mauro Carvalho Chehab Date: Sun Jan 22 08:43:05 2023 +0100 Merge tag 'media-uvc-next-20230115' of git://git.kernel.org/pub/scm/linux/kernel/git/pinchartl/linux into media_stage uvcvideo fixes and improvements * tag 'media-uvc-next-20230115' of git://git.kernel.org/pub/scm/linux/kernel/git/pinchartl/linux: (27 commits) media: uvcvideo: Silence memcpy() run-time false positive warnings media: uvcvideo: Quirk for autosuspend in Logitech B910 and C910 media: uvcvideo: Fix race condition with usb_kill_urb media: uvcvideo: Use standard names for menus media: uvcvideo: Fix power line control for Lenovo Integrated Camera media: uvcvideo: Refactor power_line_frequency_controls_limited media: uvcvideo: Refactor uvc_ctrl_mappings_uvcXX media: uvcvideo: Implement mask for V4L2_CTRL_TYPE_MENU media: uvcvideo: Extend documentation of uvc_video_clock_decode() media: uvcvideo: Limit power line control for Acer EasyCamera media: uvcvideo: Refactor __uvc_ctrl_add_mapping media: uvcvideo: Fix handling on Bitmask controls media: uvcvideo: Do not return positive errors in uvc_query_ctrl() media: uvcvideo: Return -EACCES for Wrong state error media: uvcvideo: Improve error logging in uvc_query_ctrl() media: uvcvideo: Check for INACTIVE in uvc_ctrl_is_accessible() media: uvcvideo: Factor out usb_string() calls media: uvcvideo: Limit power line control for Acer EasyCamera media: uvcvideo: Recover stalled ElGato devices media: uvcvideo: Remove void casting for the status endpoint ... Signed-off-by: Mauro Carvalho Chehab commit 99ba2ad1db623df79456b8556b3f4900f394c8c2 Merge: 18e126e97c961 2241ab53cbb5c Author: Greg Kroah-Hartman Date: Sun Jan 22 08:37:23 2023 +0100 Merge 6.2-rc5 into char-misc-next We need the char/misc driver fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 0444ef665addb5d0e800be5cf2c5d7852cc60db6 Author: Uwe Kleine-König Date: Tue Dec 13 16:35:52 2022 +0100 media: rc/ir-rx51: 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 Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 6f7f03bda3d52d308a1dc890bc4b1ce01217665a Author: Jean Delvare Date: Mon Nov 21 17:09:11 2022 +0100 media: rc: Drop obsolete dependencies 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. As a minor optimization, this also lets us drop of_match_ptr(), as we now know what it will resolve to, we might as well save cpp some work. Signed-off-by: Jean Delvare Cc: Thierry Reding Cc: "Uwe Kleine-König" Acked-by: Uwe Kleine-König Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 80b08e486dffe145375140739d87714b2085f387 Author: Uwe Kleine-König Date: Fri Nov 18 23:42:21 2022 +0100 media: tuners/si2157: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 95d82b0af2ecb0894afe4d598560a5e7f3ef6c8a Author: Uwe Kleine-König Date: Fri Nov 18 23:42:04 2022 +0100 media: i2c/video-i2c: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Acked-by: Matt Ranostay Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bb09c94dbde59fa73987f3bdf8a8a2b36b5667b6 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:56 2022 +0100 media: i2c/tvp514x: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. [hverkuil: remove obsolete kerneldoc 'id' documentation] Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7db820b11fc45f200c67f80c7f8f8cb9bc46eee8 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:55 2022 +0100 media: i2c/tvaudio: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 76b6ae7da379f85eff0df4de7826a4e43a18f13c Author: Uwe Kleine-König Date: Fri Nov 18 23:41:48 2022 +0100 media: i2c/tda1997x: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 097ac2ff2b36cf9bb6e1ff69684b4e0b3c07c9e4 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:43 2022 +0100 media: i2c/saa7127: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 89cac3fabbc55fac7736762622cd9b95abee96dd Author: Uwe Kleine-König Date: Fri Nov 18 23:41:42 2022 +0100 media: i2c/saa7115: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0529bfa08d35094827b3657248593710ae0bbce6 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:34 2022 +0100 media: i2c/ov7670: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 78c57c16b533005f611585c62d9bf846349ff466 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:29 2022 +0100 media: i2c/mt9v032: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6ed661f176a8eca1e528263f7c8a8ddb9e4d632e Author: Uwe Kleine-König Date: Fri Nov 18 23:41:25 2022 +0100 media: i2c/mt9p031: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8a05478f6ad78dbff89e336efa07ec984961369f Author: Uwe Kleine-König Date: Fri Nov 18 23:41:23 2022 +0100 media: i2c/msp3400-driver: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 135e0f3d57be5f8337887273313e0441916d7f46 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:16 2022 +0100 media: i2c/ir-kbd-i2c: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4b215eeb1bab5615889ba1bd27a09a219048be99 Author: Uwe Kleine-König Date: Fri Nov 18 23:41:14 2022 +0100 media: i2c/cs53l32a: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 220ac14b8da5316754cad6bf0165158c8e4bff9d Author: Uwe Kleine-König Date: Fri Nov 18 23:41:06 2022 +0100 media: i2c/adv7604: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f2478d6ecd45ebd9aed8ce7a836f9deee54e290c Author: Uwe Kleine-König Date: Fri Nov 18 23:41:02 2022 +0100 media: i2c/adv7180: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 90440f8dd2287f135c8391919eb4979dac800a93 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:54 2022 +0100 media: dvb-frontends/tc90522: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Tested-by: Akihiro Tsukada Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2117359f0f1452a8663594a939e0b788d64d2097 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:43 2022 +0100 media: dvb-frontends/mn88443x: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 73f3cb66d9cf9c254c96f45ce9a22c630753edb3 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:42 2022 +0100 media: dvb-frontends/m88ds3103: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 505548dc7053bec97d349ec086e7d75f6aa35222 Author: Uwe Kleine-König Date: Fri Nov 18 23:40:38 2022 +0100 media: dvb-frontends/dvb-pll: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2315b5cea407a8dc543df2a29ea39debdb1130a2 Author: Hugo Villeneuve Date: Sun Jan 15 12:06:23 2023 -0500 dt-bindings: iio: adc: add Texas Instruments ADS7924 Add device tree bindings document for the Texas Instruments ADS7924 ADC. Signed-off-by: Hugo Villeneuve Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230115170623.3680647-3-hugo@hugovil.com Signed-off-by: Jonathan Cameron commit 4d82b2f98a25882481a53faca0ca5a2169f9b563 Author: Hugo Villeneuve Date: Sun Jan 15 12:06:22 2023 -0500 iio: adc: ti-ads7924: add Texas Instruments ADS7924 driver The Texas Instruments ADS7924 is a 4 channels, 12-bit analog to digital converter (ADC) with an I2C interface. Datasheet: https://www.ti.com/lit/gpn/ads7924 Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20230115170623.3680647-2-hugo@hugovil.com Signed-off-by: Jonathan Cameron commit d354a2ee3915ada7a10a2c6634c78e9aadfb3db9 Author: Philippe De Muyter Date: Mon Jan 16 14:07:14 2023 +0100 iio: imu: st_lsm6dsx: add 'mount_matrix' sysfs entry to gyro channel. Signed-off-by: Philippe De Muyter Acked-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/1673874434-30750-3-git-send-email-Philippe.DeMuyter@macq.eu Signed-off-by: Jonathan Cameron commit 677a33b51f7fbe39e9bff17d1e5718087dfa9ede Author: Philippe De Muyter Date: Mon Jan 16 14:07:13 2023 +0100 iio: imu: st_lsm6dsx: fix naming of 'struct iio_info' in st_lsm6dsx_shub.c. We need the name 'st_lsm6dsx_ext_info' for the actual 'iio_chan_spec_ext_info'. Rename the 'st_lsm6dsx_ext_info' in st_lsm6dsx_shub.c to 'st_lsm6dsx_shub_info'. For consistency, replace also 'ext' by 'shub' in 'st_lsm6dsx_ext_attributes' and 'st_lsm6dsx_ext_attribute_group'. Signed-off-by: Philippe De Muyter Acked-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/1673874434-30750-2-git-send-email-Philippe.DeMuyter@macq.eu Signed-off-by: Jonathan Cameron commit 7af0c2534f4c57b16e92dfca8c5f40fa90fbb3f3 Author: Akihiko Odaki Date: Thu Jan 12 11:38:52 2023 +0900 KVM: arm64: Normalize cache configuration Before this change, the cache configuration of the physical CPU was exposed to vcpus. This is problematic because the cache configuration a vcpu sees varies when it migrates between vcpus with different cache configurations. Fabricate cache configuration from the sanitized value, which holds the CTR_EL0 value the userspace sees regardless of which physical CPU it resides on. CLIDR_EL1 and CCSIDR_EL1 are now writable from the userspace so that the VMM can restore the values saved with the old kernel. Suggested-by: Marc Zyngier Signed-off-by: Akihiko Odaki Link: https://lore.kernel.org/r/20230112023852.42012-8-akihiko.odaki@daynix.com [ Oliver: Squash Marc's fix for CCSIDR_EL1.LineSize when set from userspace ] Signed-off-by: Oliver Upton commit 546676121cb9d1c77862042611533e721b86565e Author: Mårten Lindahl Date: Tue Jan 17 20:00:17 2023 +0100 iio: light: vcnl4000: Add interrupt support for vcnl4040 Add support to configure proximity sensor interrupts and threshold limits for vcnl4040. If an interrupt is detected an event will be pushed to the event interface. Signed-off-by: Mårten Lindahl Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230117190017.3789181-4-marten.lindahl@axis.com Signed-off-by: Jonathan Cameron commit bfb6cfeeb83f314dd4a09ad6c9a24678f66c3b3b Author: Mårten Lindahl Date: Tue Jan 17 20:00:16 2023 +0100 iio: light: vcnl4000: Make irq handling more generic This driver supports 4 chips, by which only one (vcnl4010) handles interrupts and has support for triggered buffer. The setup of these functions is hardcoded for vcnl4010 inside the generic vcnl4000_probe, and thus ignores the chip specific configuration structure where all other chip specific functions are specified. This complicates adding interrupt handler and triggered buffer support to chips which may have support for it. Add members for irq threads and iio_buffer_setup_ops to the generic vcnl4000_chip_spec struct, so that instead of checking a chip specific boolean irq support, we check for a chip specific triggered buffer handler, and/or a chip specific irq thread handler. Signed-off-by: Mårten Lindahl Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230117190017.3789181-3-marten.lindahl@axis.com Signed-off-by: Jonathan Cameron commit 3a52d32a7497fa21b2dcedf5051cca7b46a7921f Author: Mårten Lindahl Date: Tue Jan 17 20:00:15 2023 +0100 iio: light: vcnl4000: Prepare for more generic setup In order to allow the chip_spec array reference the function pointers for interrupts, the code for these functions need to be moved above the chip_spec array. This is a prestep to support a more generic setup of interrupts. Signed-off-by: Mårten Lindahl Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230117190017.3789181-2-marten.lindahl@axis.com Signed-off-by: Jonathan Cameron commit 0c4061c0d0e2c381ffe4d8b7c62ea69ad8132071 Author: Linus Lüssing Date: Tue Dec 27 20:34:06 2022 +0100 batman-adv: tvlv: prepare for tvlv enabled multicast packet type Prepare TVLV infrastructure for more packet types, in particular the upcoming batman-adv multicast packet type. For that swap the OGM vs. unicast-tvlv packet boolean indicator to an explicit unsigned integer packet type variable. And provide the skb to a call to batadv_tvlv_containers_process(), as later the multicast packet's TVLV handler will need to have access not only to the TVLV but the full skb for forwarding. Forwarding will be invoked from the multicast packet's TVLVs' contents later. Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit e7d6127b89a93f0711a653f06863c3a03d33265f Author: Linus Lüssing Date: Tue Dec 27 20:34:05 2022 +0100 batman-adv: mcast: remove now redundant single ucast forwarding The multicast code to send a multicast packet via multiple batman-adv unicast packets is not only capable of sending to multiple but also to a single node. Therefore we can safely remove the old, specialized, now redundant multicast-to-single-unicast code. The only functional change of this simplification is that the edge case of allowing a multicast packet with an unsnoopable destination address (224.0.0.0/24 or ff02::1) where only a single node has signaled interest in it via the batman-adv want-all-unsnoopables multicast flag is now transmitted via a batman-adv broadcast instead of a batman-adv unicast packet. Maintaining this edge case feature does not seem worth the extra lines of code and people should just not expect to be able to snoop and optimize such unsnoopable multicast addresses when bridges are involved. While at it also renaming a few items in the batadv_forw_mode enum to prepare for the new batman-adv multicast packet type. Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 8f6bc4583713d3ed1e75bb757f16e5f89ac7f366 Author: Sven Eckelmann Date: Sat Jan 21 18:57:27 2023 +0100 batman-adv: Fix mailing list address Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 3b5eea320db5d9d2499accfc1884b4f221cd4223 Author: Jonathan Cameron Date: Sun Jan 15 17:39:58 2023 +0000 dt-bindings: iio: dac: Maxim max5522 DAC Add binding Doc for this SPI DAC. The driver was perviously posted but was missing the DT binding document. https://lore.kernel.org/all/20221106165928.223318-1-angelo.dureghello@timesys.com/ Signed-off-by: Jonathan Cameron Reviewed-by: Angelo Dureghello Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230115173958.134201-1-jic23@kernel.org commit ba56b46d1c6d412ae8c079e67c01a1f7bbd5c079 Author: Angelo Dureghello Date: Sun Nov 6 17:59:28 2022 +0100 iio: dac: add support for max5522 Add initial support for DAC max5522. Tested writing DAC A and B with some values, from 0 to 1023, measured output voltages, driver works properly. Additions for max5523/24/25 will follow. Signed-off-by: Angelo Dureghello Link: https://lore.kernel.org/r/20221106165928.223318-1-angelo.dureghello@timesys.com Signed-off-by: Jonathan Cameron commit f2edf0c819a4823cd6c288801ce737e8d4fcde06 Author: Yulong Zhang Date: Tue Jan 17 10:51:47 2023 +0800 tools/iio/iio_utils:fix memory leak 1. fopen sysfs without fclose. 2. asprintf filename without free. 3. if asprintf return error,do not need to free the buffer. Signed-off-by: Yulong Zhang Link: https://lore.kernel.org/r/20230117025147.69890-1-yulong.zhang@metoak.net Signed-off-by: Jonathan Cameron commit 05f59aba3906ff4c0a70e302711d81043f15114d Author: Andy Shevchenko Date: Wed Jan 18 09:48:28 2023 +0200 iio: core: Sort headers Sort the headers in alphabetic order in order to ease the maintenance for this part. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230118074828.66155-2-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 122fb8736efce9a1bab0433ff330f3bf03d4a00e Author: Andy Shevchenko Date: Wed Jan 18 09:48:27 2023 +0200 iio: core: Replace iio_sysfs_match_string_with_gaps() by __sysfs_match_string() None of the current users is using gaps in the list of the items. No need to have a specific function for that, just replace it by library available __sysfs_match_string(). Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230118074828.66155-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit cd19fbfedca524947d0df9cab820c21237005de2 Author: Andy Shevchenko Date: Thu Jan 19 19:47:49 2023 +0200 iio: adc: xilinx-ams: Convert to use fwnode_device_is_compatible() Replace open coded fwnode_device_is_compatible() in the driver. Signed-off-by: Andy Shevchenko Reviewed-by: Michal Simek Link: https://lore.kernel.org/r/20230119174749.76769-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit a9a5cac225b0830d1879640e25231a37e537f0da Author: Ashok Raj Date: Sun Jan 15 19:57:27 2023 +0100 x86/microcode/intel: Print old and new revision during early boot Make early loading message match late loading message and print both old and new revisions. This is helpful to know what the BIOS loaded revision is before an early update. Cache the early BIOS revision before the microcode update and have print_ucode_info() print both the old and new revision in the same format as microcode_reload_late(). [ bp: Massage, remove useless comment. ] Signed-off-by: Ashok Raj Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/20230120161923.118882-6-ashok.raj@intel.com commit 174f1b909ab0984e5369a634971fb14a618ca797 Author: Ashok Raj Date: Mon Jan 9 07:35:53 2023 -0800 x86/microcode/intel: Pass the microcode revision to print_ucode_info() directly print_ucode_info() takes a struct ucode_cpu_info pointer as parameter. Its sole purpose is to print the microcode revision. The only available ucode_cpu_info always describes the currently loaded microcode revision. After a microcode update is successful, this is the new revision, or on failure it is the original revision. In preparation for future changes, replace the struct ucode_cpu_info pointer parameter with a plain integer which contains the revision number and adjust the call sites accordingly. No functional change. [ bp: - Fix + cleanup commit message. - Revert arbitrary, unrelated change. ] Signed-off-by: Ashok Raj Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/20230120161923.118882-5-ashok.raj@intel.com commit 6eab3abac7043226e5375e9ead0c7607ced6767b Author: Ashok Raj Date: Mon Jan 9 07:35:52 2023 -0800 x86/microcode: Adjust late loading result reporting message During late microcode loading, the "Reload completed" message is issued unconditionally, regardless of success or failure. Adjust the message to report the result of the update. [ bp: Massage. ] Fixes: 9bd681251b7c ("x86/microcode: Announce reload operation's completion") Suggested-by: Thomas Gleixner Signed-off-by: Ashok Raj Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Tony Luck Link: https://lore.kernel.org/lkml/874judpqqd.ffs@tglx/ commit c0dd9245aa9e25a697181f6085692272c9ec61bc Author: Ashok Raj Date: Mon Jan 9 07:35:51 2023 -0800 x86/microcode: Check CPU capabilities after late microcode update correctly The kernel caches each CPU's feature bits at boot in an x86_capability[] structure. However, the capabilities in the BSP's copy can be turned off as a result of certain command line parameters or configuration restrictions, for example the SGX bit. This can cause a mismatch when comparing the values before and after the microcode update. Another example is X86_FEATURE_SRBDS_CTRL which gets added only after microcode update: --- cpuid.before 2023-01-21 14:54:15.652000747 +0100 +++ cpuid.after 2023-01-21 14:54:26.632001024 +0100 @@ -10,7 +10,7 @@ CPU: 0x00000004 0x04: eax=0x00000000 ebx=0x00000000 ecx=0x00000000 edx=0x00000000 0x00000005 0x00: eax=0x00000040 ebx=0x00000040 ecx=0x00000003 edx=0x11142120 0x00000006 0x00: eax=0x000027f7 ebx=0x00000002 ecx=0x00000001 edx=0x00000000 - 0x00000007 0x00: eax=0x00000000 ebx=0x029c6fbf ecx=0x40000000 edx=0xbc002400 + 0x00000007 0x00: eax=0x00000000 ebx=0x029c6fbf ecx=0x40000000 edx=0xbc002e00 ^^^ and which proves for a gazillionth time that late loading is a bad bad idea. microcode_check() is called after an update to report any previously cached CPUID bits which might have changed due to the update. Therefore, store the cached CPU caps before the update and compare them with the CPU caps after the microcode update has succeeded. Thus, the comparison is done between the CPUID *hardware* bits before and after the upgrade instead of using the cached, possibly runtime modified values in BSP's boot_cpu_data copy. As a result, false warnings about CPUID bits changes are avoided. [ bp: - Massage. - Add SRBDS_CTRL example. - Add kernel-doc. - Incorporate forgotten review feedback from dhansen. ] Fixes: 1008c52c09dc ("x86/CPU: Add a microcode loader callback") Signed-off-by: Ashok Raj Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230109153555.4986-3-ashok.raj@intel.com commit 7efd4edc6efafa65039c1ce8b3af951aba495e3a Author: Jessica Zhang Date: Wed Jan 18 15:38:48 2023 -0800 drm/msm/dpu: Reapply CTM if modeset is needed Add a !drm_atomic_crtc_needs_modeset() check to _dpu_crtc_setup_cp_blocks() so that CTM is reapplied if the LM/DSPP blocks were reallocated during modeset or after a suspend/resume. Changes in V2: - Fixed commit message Changes in V3: - Added mention of suspend/resume case back to commit message Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/23 Signed-off-by: Jessica Zhang Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/519151/ Link: https://lore.kernel.org/r/20230118233848.611-1-quic_jesszhan@quicinc.com Signed-off-by: Dmitry Baryshkov commit 764b9481262fe2b0445bfe180fc814b0672a3a5c Author: Dmitry Baryshkov Date: Wed Jan 18 04:04:55 2023 +0200 drm/msm/dpu: use sm8350_regdma on SM8350 platform Correct sm8350_dpu_cfg.dma_cfg to point to sm8350_regdma rather than sm8250_regdma. Fixes: 0e91bcbb0016 ("drm/msm/dpu: Add SM8350 to hw catalog") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/518791/ Link: https://lore.kernel.org/r/20230118020455.1689929-2-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 83bb1f13669ad0cdeab1ed125faa43d5d040ac59 Author: Dmitry Baryshkov Date: Wed Jan 18 04:04:54 2023 +0200 drm/msm/dpu: point sc8280xp_dpu_cfg to sc8280xp_regdma SC8280XP configuration missed the reg_dma configuration. We do not use regdma for now, but let's put the correct pointer anyway. Fixes: 4a352c2fc15a ("drm/msm/dpu: Introduce SC8280XP") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/518790/ Link: https://lore.kernel.org/r/20230118020455.1689929-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 7a7d1f21c79a0f4eba2b9e27cd8d6b0c99462d92 Author: Dmitry Baryshkov Date: Wed Jan 18 05:17:16 2023 +0200 dt-bindings: display/msm: qcom, sc8280xp-mdss: add DP / eDP child nodes Describe DP and eDP devices as subdevices to the MDSS on SC8280XP platform. Fixes: 45af56bf2d74 ("dt-bindings: display/msm: Add binding for SC8280XP MDSS") Signed-off-by: Dmitry Baryshkov Acked-by: Rob Herring Patchwork: https://patchwork.freedesktop.org/patch/518799/ Link: https://lore.kernel.org/r/20230118031718.1714861-2-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 7617aba0687cbafece63b4938b506318f481bac8 Author: Dmitry Baryshkov Date: Wed Jan 18 05:17:15 2023 +0200 dt-bindings: display/msm: add qcom, sc8280xp-edp to list of eDP devices Add qcom,sc8280xp-edp to the list of eDP devices, unblocking `aux-bus' property and fobidding `#sound-dai-cells' property. Also since sc8280xp-edp, overriding sc8280xp-dp, will contain 5 reg resources, drop the reg contraint (as it will become equivalent to the top-level one, requiring min 4 and max 5 reg entries). Fixes: b6f8c4debc00 ("dt-bindings: msm/dp: Add SDM845 and SC8280XP compatibles") Signed-off-by: Dmitry Baryshkov Acked-by: Rob Herring Patchwork: https://patchwork.freedesktop.org/patch/518797/ Link: https://lore.kernel.org/r/20230118031718.1714861-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 4b27f469b155bdc3b62e0f1df04a4d963e039a69 Author: Dmitry Baryshkov Date: Wed Jan 18 04:05:49 2023 +0200 drm/msm/dpu: add missing dpu_encoder kerneldoc Describe missing dpu_encoder_phys_wb_is_master() argument and struct dpu_encoder_virt.wide_bus_en field. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/518794/ Link: https://lore.kernel.org/r/20230118020549.1690078-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 10a8895486c1d94d6ceb730cdc5039b6fc287169 Author: Dmitry Baryshkov Date: Sun Jan 15 16:00:22 2023 +0200 drm/msm/dpu: enable DPU_MDP_AUDIO_SELECT for sc8180x According to the discussion ([1]) on the mailing list, platforms before sm8250 (and derivatives) should program HDMI_DP_CORE_SELECT register to route audio to the DP ports. Enable DPU_MDP_AUDIO_SELECT on sc8180x to program correponding register. [1] https://lore.kernel.org/all/f86504ba-835a-6e30-6c30-8bb89b1359c4@quicinc.com/ Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/518461/ Link: https://lore.kernel.org/r/20230115140022.489881-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 4488f71f637376178037380c1b8ce45aa1bf5ad4 Author: Dmitry Baryshkov Date: Mon Jan 16 08:33:16 2023 +0200 drm/msm/dpu: simplify blend configuration Rewrite dpu_hw_ctl_setup_blendstage() to use static data configuration rather than using a switch-case. This simplifies adding support for new pipes. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Tested-by: Neil Armstrong # on SM8550 Patchwork: https://patchwork.freedesktop.org/patch/518485/ Link: https://lore.kernel.org/r/20230116063316.728496-3-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 2c36dc9197e30080315e63cbcac0281b8ed9ed77 Author: Dmitry Baryshkov Date: Mon Jan 16 08:33:15 2023 +0200 drm/msm/dpu: simplify ctl_setup_blendstage calculation Extract the common expression in the dpu_hw_ctl_setup_blendstage() function. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Tested-by: Neil Armstrong # on SM8550 Patchwork: https://patchwork.freedesktop.org/patch/518483/ Link: https://lore.kernel.org/r/20230116063316.728496-2-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit e92a4ae1981baecccdc1823e1f10dc8f566df0ad Author: Dmitry Baryshkov Date: Mon Jan 16 08:33:14 2023 +0200 drm/msm/dpu: fix blend setup for DMA4 and DMA5 layers SM8550 uses new register to map SSPP_DMA4 and SSPP_DMA5 units to blend stages. Add proper support for this register to allow using these two planes for image processing. Fixes: efcd0107727c ("drm/msm/dpu: add support for SM8550") Cc: Neil Armstrong Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Tested-by: Neil Armstrong # on SM8550 Patchwork: https://patchwork.freedesktop.org/patch/518481/ Link: https://lore.kernel.org/r/20230116063316.728496-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 03d7a1053cf72372be22b43faada5bca12ff183d Author: Michal Kubecek Date: Wed Jan 18 11:52:15 2023 +0100 objtool: Check that module init/exit function is an indirect call target Some out-of-tree modules still do not use module_init() / module_exit() macros and simply create functions with magic names init_module() and cleanup_module() instead. As a result, these functions are not recognized as indirect call targets by objtool and such module fails to load into an IBT enabled kernel. This old way is not even documented any more but it is cleaner to issue a warning than to let the module fail on load without obvious reason. Signed-off-by: Michal Kubecek Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20230118105215.B9DA960514@lion.mk-sys.cz commit a7b87d2a31dcff04ed81ef63355080bdaffa93c3 Merge: 24a7fffb2533b 49f5b769d5bd2 Author: Jakub Kicinski Date: Fri Jan 20 18:50:16 2023 -0800 Merge branch 'mlxsw-add-support-of-latency-tlv' Petr Machata says: ==================== mlxsw: Add support of latency TLV Amit Cohen writes: Ethernet Management Datagrams (EMADs) are Ethernet packets sent between the driver and device's firmware. They are used to pass various configurations to the device, but also to get events (e.g., port up) from it. After the Ethernet header, these packets are built in a TLV format. This is the structure of EMADs: * Ethernet header * Operation TLV * String TLV (optional) * Latency TLV (optional) * Reg TLV * End TLV The latency of each EMAD is measured by firmware. The driver can get the measurement via latency TLV which can be added to each EMAD. This TLV is optional, when EMAD is sent with this TLV, the EMAD's response will include the TLV and will contain the firmware measurement. Add support for Latency TLV and use it by default for all EMADs (see more information in commit messages). The latency measurements can be processed using BPF program for example, to create a histogram and average of the latency per register. In addition, it is possible to measure the end-to-end latency, so then the latency of the software overhead can be calculated. This information can be useful to improve the driver performance. See an example of output of BPF tool which presents these measurements: $ ./emadlatency -f -a Tracing EMADs... Hit Ctrl-C to end. Register write = RALUE (0x8013) E2E Measurements: average = 23 usecs, total = 32052693 usecs, count = 1337061 usecs : count distribution 0 -> 1 : 0 | | 2 -> 3 : 0 | | 4 -> 7 : 0 | | 8 -> 15 : 0 | | 16 -> 31 : 1290814 |*********************************| 32 -> 63 : 45339 |* | 64 -> 127 : 532 | | 128 -> 255 : 247 | | 256 -> 511 : 57 | | 512 -> 1023 : 26 | | 1024 -> 2047 : 33 | | 2048 -> 4095 : 0 | | 4096 -> 8191 : 10 | | 8192 -> 16383 : 1 | | 16384 -> 32767 : 1 | | 32768 -> 65535 : 1 | | Firmware Measurements: average = 10 usecs, total = 13884128 usecs, count = 1337061 usecs : count distribution 0 -> 1 : 0 | | 2 -> 3 : 0 | | 4 -> 7 : 0 | | 8 -> 15 : 1337035 |*********************************| 16 -> 31 : 17 | | 32 -> 63 : 7 | | 64 -> 127 : 0 | | 128 -> 255 : 2 | | Diff between measurements: 13 usecs Patch set overview: Patches #1-#3 add support for querying MGIR, to know if string TLV and latency TLV are supported Patches #4-#5 add some relevant fields to support latency TLV Patch #6 adds support of latency TLV ==================== Link: https://lore.kernel.org/r/cover.1674123673.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 49f5b769d5bd203596b0db4df72344f20f59e938 Author: Amit Cohen Date: Thu Jan 19 11:32:32 2023 +0100 mlxsw: Add support of latency TLV The latency of each EMAD can be measured by firmware. The driver can get the measurement via latency TLV which can be added to each EMAD. This TLV is optional, when EMAD is sent with this TLV, the EMAD's response will include the TLV and the field 'latency_time' will contain the firmware measurement. This information can be processed using BPF program for example, to create a histogram and average of the latency per register. In addition, it is possible to measure the end-to-end latency, and then reduce firmware measurement, which will result in the latency of the software overhead. This information can be useful to improve the driver performance. Add support for latency TLV by default for all EMADs. First we planned to enable latency TLV per demand, using devlink-param. After some tests, we know that the usage of latency TLV does not impact the end-to-end latency, so it is OK to enable it by default. Note that similar to string TLV, the latency TLV is not supported in all firmware versions. Enable the usage of this TLV only after verifying it is supported by the current firmware version by querying the Management General Information Register (MGIR). Signed-off-by: Danielle Ratson Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Tony Nguyen Signed-off-by: Jakub Kicinski commit 6ee0d3a9dc00b3cae3434fb60569a8ba0381a176 Author: Amit Cohen Date: Thu Jan 19 11:32:31 2023 +0100 mlxsw: core: Define latency TLV fields The next patch will add support for latency TLV as part of EMAD (Ethernet Management Datagrams) packets. As preparation, add the relevant fields. Signed-off-by: Danielle Ratson Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Tony Nguyen Signed-off-by: Jakub Kicinski commit 695f7306d9429e5580fc055fe5cfd08405e0c258 Author: Amit Cohen Date: Thu Jan 19 11:32:30 2023 +0100 mlxsw: emad: Add support for latency TLV The next patches will add support for latency TLV as part of EMAD (Ethernet Management Datagrams) packets. As preparation, add the relevant values. Signed-off-by: Danielle Ratson Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Tony Nguyen Signed-off-by: Jakub Kicinski commit 563bd3c490dc6cfc4c604446d81e92a67a986e0c Author: Amit Cohen Date: Thu Jan 19 11:32:29 2023 +0100 mlxsw: core: Do not worry about changing 'enable_string_tlv' while sending EMADs Till now, the field 'mlxsw_core->emad.enable_string_tlv' is set as part of mlxsw_sp_init(), this means that it can be changed during emad_reg_access(). To avoid such change, this field is read once in emad_reg_access() and the value is used all the way. The previous patch sets this value according to MGIR output, as part of mlxsw_emad_init(), so now it cannot be changed while sending EMADs. Do not save 'enable_string_tlv' and do not pass it to functions, just pass 'struct mlxsw_core' and use the value directly from it. Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Tony Nguyen Signed-off-by: Jakub Kicinski commit d84e2359e621db111de5904976bc8a721d0fb03b Author: Amit Cohen Date: Thu Jan 19 11:32:28 2023 +0100 mlxsw: Enable string TLV usage according to MGIR output String TLV is not supported by old firmware versions, therefore 'struct mlxsw_core' stores the field 'emad.enable_string_tlv', which is set to true only after firmware version check. Instead of assuming that firmware version check is enough to enable string TLV, a better solution is to query if this TLV is supported from MGIR register. Add such query and initialize 'emad.enable_string_tlv' accordingly. Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Tony Nguyen Signed-off-by: Jakub Kicinski commit 42b4f757ba9c4990dc3c26f0d54a3259ad761613 Author: Amit Cohen Date: Thu Jan 19 11:32:27 2023 +0100 mlxsw: reg: Add TLV related fields to MGIR register MGIR (Management General Information Register) allows software to query the hardware and firmware general information. As part of firmware information, the driver can query if string TLV and latency TLV are supported. These TLVs are part of EMAD's header and are used to provide information per EMAD packet to software. Currently, string TLV is already used by the driver, but it does not query if this TLV is supported from MGIR. The next patches will add support of latency TLV. Add the relevant fields to MGIR, so then the driver will query them to know if the TLVs are supported before using them. Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Tony Nguyen Signed-off-by: Jakub Kicinski commit 24a7fffb2533bb44d4ec84bb824732a9c4882f15 Author: Nikhil Gupta Date: Fri Jan 20 02:10:34 2023 +0530 ptp_qoriq: fix latency in ptp_qoriq_adjtime() operation 1588 driver loses about 1us in adjtime operation at PTP slave This is because adjtime operation uses a slow non-atomic tmr_cnt_read() followed by tmr_cnt_write() operation. In the above sequence, since the timer counter operation keeps incrementing, it leads to latency. The tmr_offset register (which is added to TMR_CNT_H/L register giving the current time) must be programmed with the delta nanoseconds. Signed-off-by: Nikhil Gupta Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean Link: https://lore.kernel.org/r/20230119204034.7969-1-nikhil.gupta@nxp.com Signed-off-by: Jakub Kicinski commit 5e64f59a3cc2c4cfba748b87f0761d865dec7924 Author: Yang Yingliang Date: Thu Jan 19 17:22:10 2023 +0800 net: microchip: vcap: use kmemdup() to allocate memory Use kmemdup() helper instead of open-coding to simplify the code when allocating newckf and newcaf. Generated by: scripts/coccinelle/api/memdup.cocci Signed-off-by: Yang Yingliang Reviewed-by: Jesse Brandeburg Reviewed-by: Steen Hegelund Link: https://lore.kernel.org/r/20230119092210.3607634-1-yangyingliang@huawei.com Signed-off-by: Jakub Kicinski commit bad5532ecf3300620c5a68d63eda3346e51488f8 Merge: bc170f96c00b0 99d5fe9c7f3d0 Author: Jakub Kicinski Date: Fri Jan 20 18:12:47 2023 -0800 Merge branch 'net-mdio-remove-support-for-building-c45-muxed-addresses' Michael Walle says: ==================== net: mdio: Remove support for building C45 muxed addresses I've picked this older series from Andrew up and rebased it onto the latest net-next. With all drivers which support c45 now being converted to a seperate c22 and c45 access op, we can now remove the old MII_ADDR_C45 flag. ==================== Link: https://lore.kernel.org/r/20230119130700.440601-1-michael@walle.cc Signed-off-by: Jakub Kicinski commit 99d5fe9c7f3d0b349676984beda4bad109bf10b8 Author: Andrew Lunn Date: Thu Jan 19 14:07:00 2023 +0100 net: mdio: Remove support for building C45 muxed addresses The old way of performing a C45 bus transfer created a special register value and passed it to the MDIO bus driver, in the hope it would see the MII_ADDR_C45 bit set, and perform a C45 transfer. Now that there is a clear separation of C22 and C45, this scheme is no longer used. Remove all the #defines and helpers, to prevent any code being added which tries to use it. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Reviewed-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski commit 660a5704603593393799b4cd116fac06d35471b2 Author: Andrew Lunn Date: Thu Jan 19 14:06:59 2023 +0100 net: Remove C45 check in C22 only MDIO bus drivers The MDIO core should not pass a C45 request via the C22 API call any more. So remove the tests from the drivers. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Reviewed-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski commit 45d564bf3625d230fb03bbf354a5065f90bc86fe Author: Michael Walle Date: Thu Jan 19 14:06:58 2023 +0100 net: ngbe: Drop mdiobus_c45_regad() With the new C45 MDIO access API, there is no encoding of the register number anymore and thus the masking isn't necessary anymore. Remove it. Signed-off-by: Michael Walle Reviewed-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski commit db1a63aed89cec0c9a0674a1a09b7614f4a3ffc2 Author: Andrew Lunn Date: Thu Jan 19 14:06:57 2023 +0100 net: phy: Remove fallback to old C45 method Now that all MDIO bus drivers which support C45 implement the c45 specific ops, remove the fallback to the old method. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Reviewed-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski commit bc170f96c00b00b8865c223ff3f650f689817fe0 Merge: b3c588cd553d6 02767440e1dda Author: Jakub Kicinski Date: Fri Jan 20 18:06:11 2023 -0800 Merge branch 'r8152-improve-the-code' Hayes Wang says: ==================== r8152: improve the code These are some minor improvements depending on commit ec51fbd1b8a2 ("r8152: add USB device driver for config selection"). ==================== Link: https://lore.kernel.org/r/20230119074043.10021-397-nic_swsd@realtek.com Signed-off-by: Jakub Kicinski commit 02767440e1dda9861a11ca1dbe0f19a760b1d5c2 Author: Hayes Wang Date: Thu Jan 19 15:40:43 2023 +0800 r8152: reduce the control transfer of rtl8152_get_version() Reduce the control transfer by moving calling rtl8152_get_version() in rtl8152_probe(). This could prevent from calling rtl8152_get_version() for unnecessary situations. For example, after setting config #2 for the device, there are two interfaces and rtl8152_probe() may be called twice. However, we don't need to call rtl8152_get_version() for this situation. Signed-off-by: Hayes Wang Signed-off-by: Jakub Kicinski commit 95a4c1d617b92cdc4522297741b56e8f6cd01a1e Author: Hayes Wang Date: Thu Jan 19 15:40:42 2023 +0800 r8152: remove rtl_vendor_mode function After commit ec51fbd1b8a2 ("r8152: add USB device driver for config selection"), the code about changing USB configuration in rtl_vendor_mode() wouldn't be run anymore. Therefore, the function could be removed. Signed-off-by: Hayes Wang Signed-off-by: Jakub Kicinski commit 84150795a49ae26cf8096517b543f4cd2ed5e87f Merge: 00b8f39f1d15c ae8e354c497af Author: Alexei Starovoitov Date: Fri Jan 20 17:55:04 2023 -0800 Merge branch 'Dynptr fixes' Kumar Kartikeya Dwivedi says: ==================== This is part 2 of https://lore.kernel.org/bpf/20221018135920.726360-1-memxor@gmail.com. Changelog: ---------- v4 -> v5 v5: https://lore.kernel.org/bpf/20230120070355.1983560-1-memxor@gmail.com * Add comments, tests from Joanne * Add Joanne's acks v3 -> v4 v3: https://lore.kernel.org/bpf/20230120034314.1921848-1-memxor@gmail.com * Adopt BPF ASM tests to more readable style (Alexei) v2 -> v3 v2: https://lore.kernel.org/bpf/20230119021442.1465269-1-memxor@gmail.com * Fix slice invalidation logic for unreferenced dynptrs (Joanne) * Add selftests for precise slice invalidation on destruction * Add Joanne's acks v1 -> v2 v1: https://lore.kernel.org/bpf/20230101083403.332783-1-memxor@gmail.com * Return error early in case of overwriting referenced dynptr slots (Andrii, Joanne) * Rename destroy_stack_slots_dynptr to destroy_if_dynptr_stack_slot (Joanne) * Invalidate dynptr slices associated with dynptr in destroy_if_dynptr_stack_slot (Joanne) * Combine both dynptr_get_spi and is_spi_bounds_valid (Joanne) * Compute spi once in process_dynptr_func and pass it as parameter instead of recomputing (Joanne) * Add comments expanding REG_LIVE_WRITTEN marking in unmark_stack_slots_dynptr (Joanne) * Add comments explaining why destroy_if_dynptr_stack_slot call needs to be done for both spi and spi - 1 (Joanne) * Port BPF assembly tests from test_verifier to test_progs framework (Andrii) * Address misc feedback, rebase to bpf-next Old v1 -> v1 Old v1: https://lore.kernel.org/bpf/20221018135920.726360-1-memxor@gmail.com * Allow overwriting dynptr stack slots from dynptr init helpers * Fix a bug in alignment check where reg->var_off.value was still not included * Address other minor nits Eduard Zingerman (1): selftests/bpf: convenience macro for use with 'asm volatile' blocks ==================== Signed-off-by: Alexei Starovoitov commit ae8e354c497af625eaecd3d86e04f9087762d42b Author: Kumar Kartikeya Dwivedi Date: Sat Jan 21 05:52:41 2023 +0530 selftests/bpf: Add dynptr helper tests First test that we allow overwriting dynptr slots and reinitializing them in unreferenced case, and disallow overwriting for referenced case. Include tests to ensure slices obtained from destroyed dynptrs are being invalidated on their destruction. The destruction needs to be scoped, as in slices of dynptr A should not be invalidated when dynptr B is destroyed. Next, test that MEM_UNINIT doesn't allow writing dynptr stack slots. Acked-by: Joanne Koong Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20230121002241.2113993-13-memxor@gmail.com Signed-off-by: Alexei Starovoitov commit 011edc8e49b8551dfb6cfcc8601d05e029cf5994 Author: Kumar Kartikeya Dwivedi Date: Sat Jan 21 05:52:40 2023 +0530 selftests/bpf: Add dynptr partial slot overwrite tests Try creating a dynptr, then overwriting second slot with first slot of another dynptr. Then, the first slot of first dynptr should also be invalidated, but without our fix that does not happen. As a consequence, the unfixed case allows passing first dynptr (as the kernel check only checks for slot_type and then first_slot == true). Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20230121002241.2113993-12-memxor@gmail.com Signed-off-by: Alexei Starovoitov commit ef4810135396735c1a6b1c343c3cc4fe4be96a43 Author: Kumar Kartikeya Dwivedi Date: Sat Jan 21 05:52:39 2023 +0530 selftests/bpf: Add dynptr var_off tests Ensure that variable offset is handled correctly, and verifier takes both fixed and variable part into account. Also ensures that only constant var_off is allowed. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20230121002241.2113993-11-memxor@gmail.com Signed-off-by: Alexei Starovoitov commit f4d24edf1b9249e43282ac2572d43d9ad10faf43 Author: Kumar Kartikeya Dwivedi Date: Sat Jan 21 05:52:38 2023 +0530 selftests/bpf: Add dynptr pruning tests Add verifier tests that verify the new pruning behavior for STACK_DYNPTR slots, and ensure that state equivalence takes into account changes to the old and current verifier state correctly. Also ensure that the stacksafe changes are actually enabling pruning in case states are equivalent from pruning PoV. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20230121002241.2113993-10-memxor@gmail.com Signed-off-by: Alexei Starovoitov commit 91b875a5e43b3a8dec4fbdca067c8860004b5f0e Author: Eduard Zingerman Date: Sat Jan 21 05:52:37 2023 +0530 selftests/bpf: convenience macro for use with 'asm volatile' blocks A set of macros useful for writing naked BPF functions using inline assembly. E.g. as follows: struct map_struct { ... } map SEC(".maps"); SEC(...) __naked int foo_test(void) { asm volatile( "r0 = 0;" "*(u64*)(r10 - 8) = r0;" "r1 = %[map] ll;" "r2 = r10;" "r2 += -8;" "call %[bpf_map_lookup_elem];" "r0 = 0;" "exit;" : : __imm(bpf_map_lookup_elem), __imm_addr(map) : __clobber_all); } Acked-by: Andrii Nakryiko Acked-by: Yonghong Song Signed-off-by: Eduard Zingerman [ Kartikeya: Add acks, include __clobber_common from Andrii ] Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20230121002241.2113993-9-memxor@gmail.com Signed-off-by: Alexei Starovoitov commit 1ee72bcbe48de6dcfa44d6eba0aec6e42d04cd4d Author: Kumar Kartikeya Dwivedi Date: Sat Jan 21 05:52:36 2023 +0530 bpf: Avoid recomputing spi in process_dynptr_func Currently, process_dynptr_func first calls dynptr_get_spi and then is_dynptr_reg_valid_init and is_dynptr_reg_valid_uninit have to call it again to obtain the spi value. Instead of doing this twice, reuse the already obtained value (which is by default 0, and is only set for PTR_TO_STACK, and only used in that case in aforementioned functions). The input value for these two functions will either be -ERANGE or >= 1, and can either be permitted or rejected based on the respective check. Suggested-by: Joanne Koong Acked-by: Joanne Koong Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20230121002241.2113993-8-memxor@gmail.com Signed-off-by: Alexei Starovoitov commit f5b625e5f8bbc6be8bb568a64d7906b091bc7cb0 Author: Kumar Kartikeya Dwivedi Date: Sat Jan 21 05:52:35 2023 +0530 bpf: Combine dynptr_get_spi and is_spi_bounds_valid Currently, a check on spi resides in dynptr_get_spi, while others checking its validity for being within the allocated stack slots happens in is_spi_bounds_valid. Almost always barring a couple of cases (where being beyond allocated stack slots is not an error as stack slots need to be populated), both are used together to make checks. Hence, subsume the is_spi_bounds_valid check in dynptr_get_spi, and return -ERANGE to specially distinguish the case where spi is valid but not within allocated slots in the stack state. The is_spi_bounds_valid function is still kept around as it is a generic helper that will be useful for other objects on stack similar to dynptr in the future. Suggested-by: Joanne Koong Acked-by: Joanne Koong Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20230121002241.2113993-7-memxor@gmail.com Signed-off-by: Alexei Starovoitov commit 379d4ba831cfa895d0cc61d88cd0e1402f35818c Author: Kumar Kartikeya Dwivedi Date: Sat Jan 21 05:52:34 2023 +0530 bpf: Allow reinitializing unreferenced dynptr stack slots Consider a program like below: void prog(void) { { struct bpf_dynptr ptr; bpf_dynptr_from_mem(...); } ... { struct bpf_dynptr ptr; bpf_dynptr_from_mem(...); } } Here, the C compiler based on lifetime rules in the C standard would be well within in its rights to share stack storage for dynptr 'ptr' as their lifetimes do not overlap in the two distinct scopes. Currently, such an example would be rejected by the verifier, but this is too strict. Instead, we should allow reinitializing over dynptr stack slots and forget information about the old dynptr object. The destroy_if_dynptr_stack_slot function already makes necessary checks to avoid overwriting referenced dynptr slots. This is done to present a better error message instead of forgetting dynptr information on stack and preserving reference state, leading to an inevitable but undecipherable error at the end about an unreleased reference which has to be associated back to its allocating call instruction to make any sense to the user. Acked-by: Joanne Koong Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20230121002241.2113993-6-memxor@gmail.com Signed-off-by: Alexei Starovoitov commit f8064ab90d6644bc8338d2d7ff6a0d6e7a1b2ef3 Author: Kumar Kartikeya Dwivedi Date: Sat Jan 21 05:52:33 2023 +0530 bpf: Invalidate slices on destruction of dynptrs on stack The previous commit implemented destroy_if_dynptr_stack_slot. It destroys the dynptr which given spi belongs to, but still doesn't invalidate the slices that belong to such a dynptr. While for the case of referenced dynptr, we don't allow their overwrite and return an error early, we still allow it and destroy the dynptr for unreferenced dynptr. To be able to enable precise and scoped invalidation of dynptr slices in this case, we must be able to associate the source dynptr of slices that have been obtained using bpf_dynptr_data. When doing destruction, only slices belonging to the dynptr being destructed should be invalidated, and nothing else. Currently, dynptr slices belonging to different dynptrs are indistinguishible. Hence, allocate a unique id to each dynptr (CONST_PTR_TO_DYNPTR and those on stack). This will be stored as part of reg->id. Whenever using bpf_dynptr_data, transfer this unique dynptr id to the returned PTR_TO_MEM_OR_NULL slice pointer, and store it in a new per-PTR_TO_MEM dynptr_id register state member. Finally, after establishing such a relationship between dynptrs and their slices, implement precise invalidation logic that only invalidates slices belong to the destroyed dynptr in destroy_if_dynptr_stack_slot. Acked-by: Joanne Koong Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20230121002241.2113993-5-memxor@gmail.com Signed-off-by: Alexei Starovoitov commit ef8fc7a07c0e161841779d6fe3f6acd5a05c547c Author: Kumar Kartikeya Dwivedi Date: Sat Jan 21 05:52:32 2023 +0530 bpf: Fix partial dynptr stack slot reads/writes Currently, while reads are disallowed for dynptr stack slots, writes are not. Reads don't work from both direct access and helpers, while writes do work in both cases, but have the effect of overwriting the slot_type. While this is fine, handling for a few edge cases is missing. Firstly, a user can overwrite the stack slots of dynptr partially. Consider the following layout: spi: [d][d][?] 2 1 0 First slot is at spi 2, second at spi 1. Now, do a write of 1 to 8 bytes for spi 1. This will essentially either write STACK_MISC for all slot_types or STACK_MISC and STACK_ZERO (in case of size < BPF_REG_SIZE partial write of zeroes). The end result is that slot is scrubbed. Now, the layout is: spi: [d][m][?] 2 1 0 Suppose if user initializes spi = 1 as dynptr. We get: spi: [d][d][d] 2 1 0 But this time, both spi 2 and spi 1 have first_slot = true. Now, when passing spi 2 to dynptr helper, it will consider it as initialized as it does not check whether second slot has first_slot == false. And spi 1 should already work as normal. This effectively replaced size + offset of first dynptr, hence allowing invalid OOB reads and writes. Make a few changes to protect against this: When writing to PTR_TO_STACK using BPF insns, when we touch spi of a STACK_DYNPTR type, mark both first and second slot (regardless of which slot we touch) as STACK_INVALID. Reads are already prevented. Second, prevent writing to stack memory from helpers if the range may contain any STACK_DYNPTR slots. Reads are already prevented. For helpers, we cannot allow it to destroy dynptrs from the writes as depending on arguments, helper may take uninit_mem and dynptr both at the same time. This would mean that helper may write to uninit_mem before it reads the dynptr, which would be bad. PTR_TO_MEM: [?????dd] Depending on the code inside the helper, it may end up overwriting the dynptr contents first and then read those as the dynptr argument. Verifier would only simulate destruction when it does byte by byte access simulation in check_helper_call for meta.access_size, and fail to catch this case, as it happens after argument checks. The same would need to be done for any other non-trivial objects created on the stack in the future, such as bpf_list_head on stack, or bpf_rb_root on stack. A common misunderstanding in the current code is that MEM_UNINIT means writes, but note that writes may also be performed even without MEM_UNINIT in case of helpers, in that case the code after handling meta && meta->raw_mode will complain when it sees STACK_DYNPTR. So that invalid read case also covers writes to potential STACK_DYNPTR slots. The only loophole was in case of meta->raw_mode which simulated writes through instructions which could overwrite them. A future series sequenced after this will focus on the clean up of helper access checks and bugs around that. Fixes: 97e03f521050 ("bpf: Add verifier support for dynptrs") Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20230121002241.2113993-4-memxor@gmail.com Signed-off-by: Alexei Starovoitov commit 79168a669d8125453c8a271115f1ffd4294e61f6 Author: Kumar Kartikeya Dwivedi Date: Sat Jan 21 05:52:31 2023 +0530 bpf: Fix missing var_off check for ARG_PTR_TO_DYNPTR Currently, the dynptr function is not checking the variable offset part of PTR_TO_STACK that it needs to check. The fixed offset is considered when computing the stack pointer index, but if the variable offset was not a constant (such that it could not be accumulated in reg->off), we will end up a discrepency where runtime pointer does not point to the actual stack slot we mark as STACK_DYNPTR. It is impossible to precisely track dynptr state when variable offset is not constant, hence, just like bpf_timer, kptr, bpf_spin_lock, etc. simply reject the case where reg->var_off is not constant. Then, consider both reg->off and reg->var_off.value when computing the stack pointer index. A new helper dynptr_get_spi is introduced to hide over these details since the dynptr needs to be located in multiple places outside the process_dynptr_func checks, hence once we know it's a PTR_TO_STACK, we need to enforce these checks in all places. Note that it is disallowed for unprivileged users to have a non-constant var_off, so this problem should only be possible to trigger from programs having CAP_PERFMON. However, its effects can vary. Without the fix, it is possible to replace the contents of the dynptr arbitrarily by making verifier mark different stack slots than actual location and then doing writes to the actual stack address of dynptr at runtime. Fixes: 97e03f521050 ("bpf: Add verifier support for dynptrs") Acked-by: Joanne Koong Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20230121002241.2113993-3-memxor@gmail.com Signed-off-by: Alexei Starovoitov commit d6fefa1105dacc8a742cdcf2f4bfb501c9e61349 Author: Kumar Kartikeya Dwivedi Date: Sat Jan 21 05:52:30 2023 +0530 bpf: Fix state pruning for STACK_DYNPTR stack slots The root of the problem is missing liveness marking for STACK_DYNPTR slots. This leads to all kinds of problems inside stacksafe. The verifier by default inside stacksafe ignores spilled_ptr in stack slots which do not have REG_LIVE_READ marks. Since this is being checked in the 'old' explored state, it must have already done clean_live_states for this old bpf_func_state. Hence, it won't be receiving any more liveness marks from to be explored insns (it has received REG_LIVE_DONE marking from liveness point of view). What this means is that verifier considers that it's safe to not compare the stack slot if was never read by children states. While liveness marks are usually propagated correctly following the parentage chain for spilled registers (SCALAR_VALUE and PTR_* types), the same is not the case for STACK_DYNPTR. clean_live_states hence simply rewrites these stack slots to the type STACK_INVALID since it sees no REG_LIVE_READ marks. The end result is that we will never see STACK_DYNPTR slots in explored state. Even if verifier was conservatively matching !REG_LIVE_READ slots, very next check continuing the stacksafe loop on seeing STACK_INVALID would again prevent further checks. Now as long as verifier stores an explored state which we can compare to when reaching a pruning point, we can abuse this bug to make verifier prune search for obviously unsafe paths using STACK_DYNPTR slots thinking they are never used hence safe. Doing this in unprivileged mode is a bit challenging. add_new_state is only set when seeing BPF_F_TEST_STATE_FREQ (which requires privileges) or when jmps_processed difference is >= 2 and insn_processed difference is >= 8. So coming up with the unprivileged case requires a little more work, but it is still totally possible. The test case being discussed below triggers the heuristic even in unprivileged mode. However, it no longer works since commit 8addbfc7b308 ("bpf: Gate dynptr API behind CAP_BPF"). Let's try to study the test step by step. Consider the following program (C style BPF ASM): 0 r0 = 0; 1 r6 = &ringbuf_map; 3 r1 = r6; 4 r2 = 8; 5 r3 = 0; 6 r4 = r10; 7 r4 -= -16; 8 call bpf_ringbuf_reserve_dynptr; 9 if r0 == 0 goto pc+1; 10 goto pc+1; 11 *(r10 - 16) = 0xeB9F; 12 r1 = r10; 13 r1 -= -16; 14 r2 = 0; 15 call bpf_ringbuf_discard_dynptr; 16 r0 = 0; 17 exit; We know that insn 12 will be a pruning point, hence if we force add_new_state for it, it will first verify the following path as safe in straight line exploration: 0 1 3 4 5 6 7 8 9 -> 10 -> (12) 13 14 15 16 17 Then, when we arrive at insn 12 from the following path: 0 1 3 4 5 6 7 8 9 -> 11 (12) We will find a state that has been verified as safe already at insn 12. Since register state is same at this point, regsafe will pass. Next, in stacksafe, for spi = 0 and spi = 1 (location of our dynptr) is skipped seeing !REG_LIVE_READ. The rest matches, so stacksafe returns true. Next, refsafe is also true as reference state is unchanged in both states. The states are considered equivalent and search is pruned. Hence, we are able to construct a dynptr with arbitrary contents and use the dynptr API to operate on this arbitrary pointer and arbitrary size + offset. To fix this, first define a mark_dynptr_read function that propagates liveness marks whenever a valid initialized dynptr is accessed by dynptr helpers. REG_LIVE_WRITTEN is marked whenever we initialize an uninitialized dynptr. This is done in mark_stack_slots_dynptr. It allows screening off mark_reg_read and not propagating marks upwards from that point. This ensures that we either set REG_LIVE_READ64 on both dynptr slots, or none, so clean_live_states either sets both slots to STACK_INVALID or none of them. This is the invariant the checks inside stacksafe rely on. Next, do a complete comparison of both stack slots whenever they have STACK_DYNPTR. Compare the dynptr type stored in the spilled_ptr, and also whether both form the same first_slot. Only then is the later path safe. Fixes: 97e03f521050 ("bpf: Add verifier support for dynptrs") Acked-by: Eduard Zingerman Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20230121002241.2113993-2-memxor@gmail.com Signed-off-by: Alexei Starovoitov commit 5bf72dbc0c6331fda104bbccf121b757ad42fcbb Author: Peter Robinson Date: Sun Jan 8 06:04:01 2023 +0000 drm: rcar-du: Depend on DRM_RCAR_DU for components on that SoC There's a few components in the rcar-du drm directory that don't make sense to be selectable if DRM_RCAR_DU isn't because they are part of the IP block so add a dependency. The drivers are still testable with COMPILE_TEST on non-Renesas platforms as DRM_RCAR_DU itself is selectable with COMPILE_TEST. Signed-off-by: Peter Robinson Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 3f3b9861fa6c435c1600ae465e116497374ebe28 Author: Tomi Valkeinen Date: Thu Dec 1 11:56:31 2022 +0200 drm: rcar-du: dsi: Add r8A779g0 support Add DSI support for r8a779g0. The main differences to r8a779a0 are in the PLL and PHTW setups. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Laurent Pinchart commit 03bbfe42281ce5818e0166d2612f5d65b2b8703a Author: Tomi Valkeinen Date: Thu Dec 1 11:56:30 2022 +0200 drm: rcar-du: Add r8a779g0 support Add support for DU on r8a779g0, which is identical to DU on r8a779a0. Signed-off-by: Tomi Valkeinen Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 8ffd3d5ec0bf911e56db90ad351e653119c31848 Author: Tomi Valkeinen Date: Thu Dec 1 11:56:26 2022 +0200 dt-bindings: display: bridge: renesas,dsi-csi2-tx: Add r8a779g0 Extend the Renesas DSI display bindings to support the r8a779g0 V4H. Signed-off-by: Tomi Valkeinen Reviewed-by: Kieran Bingham Acked-by: Krzysztof Kozlowski Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 9456578de6c45cbe129913e58fa8785963d01a87 Author: Tomi Valkeinen Date: Thu Dec 1 11:56:25 2022 +0200 dt-bindings: display: renesas,du: Provide bindings for r8a779g0 Extend the Renesas DU display bindings to support the r8a779g0 V4H. Signed-off-by: Tomi Valkeinen Reviewed-by: Kieran Bingham Acked-by: Krzysztof Kozlowski Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit f37991219716aefec979c8347e5f97204689737a Author: Tomi Valkeinen Date: Wed Dec 21 11:24:48 2022 +0200 drm: rcar-du: Add new formats (2-10-10-10 ARGB, Y210) Add new pixel formats: RGBX1010102, RGBA1010102, ARGB2101010, Y210 and Y212. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Acked-by: Hans Verkuil Signed-off-by: Laurent Pinchart commit f7a36a79ffe72ea895a79e609cd3bd398b1f89fa Author: Tomi Valkeinen Date: Wed Dec 21 11:24:47 2022 +0200 drm: rcar-du: Bump V3U to gen 4 V3U is actually gen 4 IP, like in V4H. Bump up V3U gen in the rcar_du_r8a779a0_info. Signed-off-by: Tomi Valkeinen Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Acked-by: Hans Verkuil Signed-off-by: Laurent Pinchart commit 5d515ee40cb57ea5331998f27df7946a69f14dc3 Author: Kan Liang Date: Thu Jan 12 12:01:05 2023 -0800 perf/x86/uncore: Don't WARN_ON_ONCE() for a broken discovery table The kernel warning message is triggered, when SPR MCC is used. [ 17.945331] ------------[ cut here ]------------ [ 17.946305] WARNING: CPU: 65 PID: 1 at arch/x86/events/intel/uncore_discovery.c:184 intel_uncore_has_discovery_tables+0x4c0/0x65c [ 17.946305] Modules linked in: [ 17.946305] CPU: 65 PID: 1 Comm: swapper/0 Not tainted 5.4.17-2136.313.1-X10-2c+ #4 It's caused by the broken discovery table of UPI. The discovery tables are from hardware. Except for dropping the broken information, there is nothing Linux can do. Using WARN_ON_ONCE() is overkilled. Use the pr_info() to replace WARN_ON_ONCE(), and specify what uncore unit is dropped and the reason. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Michael Petlan Link: https://lore.kernel.org/r/20230112200105.733466-6-kan.liang@linux.intel.com commit 65248a9a9ee1ea2e6aad8f35253ffd9096ab81b7 Author: Kan Liang Date: Thu Jan 12 12:01:04 2023 -0800 perf/x86/uncore: Add a quirk for UPI on SPR The discovery table of UPI on some SPR variants, e.g., MCC, is broken. The third UPI table may includes a wrong address which points to a non-exists device. The bug impacts both UPI and M3UPI uncore PMON. Use a pre-defined UPI and M3UPI table to replace the broken table. Different BIOS may populate a device into a different domain or a different BUS. The accurate location can only be retrieved at load time. Add spr_update_device_location() to update the location of the UPI and M3UPI in the pre-defined table. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Michael Petlan Link: https://lore.kernel.org/r/20230112200105.733466-5-kan.liang@linux.intel.com commit bd9514a4d5ec25b29728720ca8b3a9ac4e3137d7 Author: Kan Liang Date: Thu Jan 12 12:01:03 2023 -0800 perf/x86/uncore: Ignore broken units in discovery table Some units in a discovery table may be broken, e.g., UPI of SPR MCC. A generic method is required to ignore the broken units. Add uncore_units_ignore in the struct intel_uncore_init_fun, which indicates the type ID of broken units. It will be assigned by the platform-specific code later when the platform has a broken discovery table. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Michael Petlan Link: https://lore.kernel.org/r/20230112200105.733466-4-kan.liang@linux.intel.com commit 3af548f2361077cd53762c88d62343d4e8ea1efb Author: Kan Liang Date: Thu Jan 12 12:01:02 2023 -0800 perf/x86/uncore: Fix potential NULL pointer in uncore_get_alias_name The current code assumes that the discovery table provides valid box_ids for the normal units. It's not the case anymore since some units in the discovery table are broken on some SPR variants. Factor out uncore_get_box_id(). Check the existence of the type->box_ids before using it. If it's not available, use pmu_idx. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Michael Petlan Link: https://lore.kernel.org/r/20230112200105.733466-3-kan.liang@linux.intel.com commit dbf061b26221fa1a99e6489dd61f5b4ee97a24e8 Author: Kan Liang Date: Thu Jan 12 12:01:01 2023 -0800 perf/x86/uncore: Factor out uncore_device_to_die() The same code is used to retrieve the logical die ID with a given PCI device in both the discovery code and the code that supports a system with > 8 nodes. Factor out uncore_device_to_die() to replace the duplicate code. No functional change. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Michael Petlan Link: https://lore.kernel.org/r/20230112200105.733466-2-kan.liang@linux.intel.com commit 001c28e57187570e4b5aa4492c7a957fb6d65d7b Author: Nicholas Piggin Date: Fri Jan 20 11:18:20 2023 +1000 exit: Detect and fix irq disabled state in oops If a task oopses with irqs disabled, this can cause various cascading problems in the oops path such as sleep-from-invalid warnings, and potentially worse. Since commit 0258b5fd7c712 ("coredump: Limit coredumps to a single thread group"), the unconditional irq enable in coredump_task_exit() will "fix" the irq state to be enabled early in do_exit(), so currently this may not be triggerable, but that is coincidental and fragile. Detect and fix the irqs_disabled() condition in the oops path before calling do_exit(), similarly to the way in_atomic() is handled. Reported-by: Michael Ellerman Signed-off-by: Nicholas Piggin Signed-off-by: Peter Zijlstra (Intel) Acked-by: "Eric W. Biederman" Link: https://lore.kernel.org/lkml/20221004094401.708299-1-npiggin@gmail.com/ commit ea913d8865fe51b799f225c46e75e3f6337b5e11 Author: Conor Dooley Date: Wed Jan 11 12:41:06 2023 +0000 dt-bindings: riscv: microchip: document the Aldec TySoM The TySOM-M-MPFS250 is a compact SoC prototyping board featuring a Microchip PolarFire SoC MPFS250T-FCG1152. Document rev2 of this board. Link: https://www.aldec.com/en/products/emulation/tysom_boards/polarfire_microchip/tysom_m_mpfs250 Acked-by: Krzysztof Kozlowski Signed-off-by: Conor Dooley commit f6beee9118c30c10704e5a20752b2221bce26fc4 Author: Conor Dooley Date: Wed Jan 11 12:41:05 2023 +0000 dt-bindings: vendor-prefixes: Add entry for Aldec Per their website: Aldec, Inc. is an industry-leading Electronic Design Automation (EDA) company delivering innovative design creation, simulation and verification solutions to assist in the development of complex FPGA, ASIC, SoC and embedded system designs. Link: https://www.aldec.com/ Acked-by: Krzysztof Kozlowski Signed-off-by: Conor Dooley commit f3460326e38d6a084fb5b3348125a802567a3690 Merge: 6635e91648ce0 08b9a94e8654d Author: Conor Dooley Date: Fri Jan 20 21:57:00 2023 +0000 Merge patch series "JH7110 PMU Support" Walker Chen says: Add the PMU (Power Management Unit) controller driver for the StarFive JH7110 SoC. In order to meet low power requirements, PMU is designed for including multiple PM domains that can be used for power gating of selected IP blocks for power saving by reduced leakage current. Signed-off-by: Conor Dooley commit 08b9a94e8654d402bfd1f5496b077503d69aa2cf Author: Walker Chen Date: Thu Jan 19 17:44:47 2023 +0800 soc: starfive: Add StarFive JH71XX pmu driver Add pmu driver for the StarFive JH71XX SoC. As the power domains provider, the Power Management Unit (PMU) is designed for including multiple PM domains that can be used for power gating of selected IP blocks for power saving by reduced leakage current. It accepts software encourage command to switch the power mode of SoC. Signed-off-by: Walker Chen Reviewed-by: Conor Dooley Reviewed-by: Heiko Stuebner Signed-off-by: Conor Dooley commit 1fc7606d5083f79a20eb9cfd77c0dbd9299421c1 Author: Walker Chen Date: Thu Jan 19 17:44:46 2023 +0800 dt-bindings: power: Add starfive,jh7110-pmu Add bindings for the Power Management Unit on the StarFive JH7110 SoC. Signed-off-by: Walker Chen Reviewed-by: Krzysztof Kozlowski Reviewed-by: Heiko Stuebner Reviewed-by: Conor Dooley Signed-off-by: Conor Dooley commit 3af2ff0840be88c6c17f057ec285ab4dc2ff214f Author: Imre Deak Date: Mon Jan 2 20:33:24 2023 +0200 drm/i915: Enable a PIPEDMC whenever its corresponding pipe is enabled Make sure that PIPEDMCs are enabled whenever the corresponding pipe is enabled. This is required at least by the latest ADLP v2.18 firmware, which adds a new handler enabled by default and running whenever the pipe is enabled at the vertical referesh rate. Bspec: 50344, 67620 Signed-off-by: Imre Deak Reviewed-by: Rodrigo Vivi Tested-by: Gustavo Sousa Link: https://patchwork.freedesktop.org/patch/msgid/20230102183324.862279-1-imre.deak@intel.com commit ab31c74455c64e69342ddab21fd9426fcbfefde7 Author: Ashok Raj Date: Mon Jan 9 07:35:50 2023 -0800 x86/microcode: Add a parameter to microcode_check() to store CPU capabilities Add a parameter to store CPU capabilities before performing a microcode update so that CPU capabilities can be compared before and after update. [ bp: Massage. ] Signed-off-by: Ashok Raj Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230109153555.4986-2-ashok.raj@intel.com commit b3c588cd553d6996cc97f3dc0a7081b9a9b36b48 Merge: 7a590bd6b42ff 5deaa98587aca Author: Jakub Kicinski Date: Fri Jan 20 12:28:23 2023 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net drivers/net/ipa/ipa_interrupt.c drivers/net/ipa/ipa_interrupt.h 9ec9b2a30853 ("net: ipa: disable ipa interrupt during suspend") 8e461e1f092b ("net: ipa: introduce ipa_interrupt_enable()") d50ed3558719 ("net: ipa: enable IPA interrupt handlers separate from registration") https://lore.kernel.org/all/20230119114125.5182c7ab@canb.auug.org.au/ https://lore.kernel.org/all/79e46152-8043-a512-79d9-c3b905462774@tessares.net/ Signed-off-by: Jakub Kicinski commit daac835347a52d9d141be281e4657cc08a360e97 Author: Zenghui Yu Date: Sun Dec 18 17:29:42 2022 +0800 kselftest/arm64: Correct buffer size for SME ZA storage It looks like a copy-paste error to describe the ZA buffer size using (the number of P registers * the maximum size of a Z register). This doesn't have practical impact though as we're always allocating enough space even for the architectural maximum ZA storage, with SVL equals to 2048 bits. Switch to use ZA_SIG_REGS_SIZE(SVE_VQ_MAX). setup_za() will need to initialize two 64MB arraies with this change and can be optimized later (if someone complain). Signed-off-by: Zenghui Yu Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20221218092942.1940-2-yuzenghui@huawei.com Signed-off-by: Catalin Marinas commit 00598857e38f56963116a6d70f7d64a29959bce9 Author: Zenghui Yu Date: Sun Dec 18 17:29:41 2022 +0800 kselftest/arm64: Remove the local NUM_VL definition It was introduced in commit b77e995e3b96 ("kselftest/arm64: Add a test program to exercise the syscall ABI") but never actually used. Remove it. Signed-off-by: Zenghui Yu Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20221218092942.1940-1-yuzenghui@huawei.com Signed-off-by: Catalin Marinas commit 1a920c92cd0c09bb7f94d18029c6dd524035e190 Author: Christophe JAILLET Date: Tue Nov 1 22:14:12 2022 +0100 arm64: cpufeature: Use kstrtobool() instead of strtobool() strtobool() is the same as kstrtobool(). However, the latter is more used within the kernel. In order to remove strtobool() and slightly simplify kstrtox.h, switch to the other function name. While at it, include the corresponding header file () Signed-off-by: Christophe JAILLET Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/5a1b329cda34aec67615c0d2fd326eb0d6634bf7.1667336095.git.christophe.jaillet@wanadoo.fr Signed-off-by: Catalin Marinas commit 7a80e5b8c6fa7d0ae6624bd6aedc4a6a1cfc62fa Author: Giuseppe Scrivano Date: Fri Jan 20 10:43:46 2023 +0100 shmem: support idmapped mounts for tmpfs This patch enables idmapped mounts for tmpfs when CONFIG_SHMEM is defined. Since all dedicated helpers for this functionality exist, in this patch we just pass down the idmap argument from the VFS methods to the relevant helpers. Signed-off-by: Giuseppe Scrivano Tested-by: Christian Brauner (Microsoft) Reviewed-by: Christian Brauner (Microsoft) Reviewed-by: Seth Forshee (DigitalOcean) Signed-off-by: Christian Brauner (Microsoft) commit 5b8c304c94d79f44aea8ee273ce70ca380804156 Author: Rob Herring Date: Fri Jan 20 10:51:03 2023 -0600 dt-bindings: pinctrl: qcom,pmic-mpp: Rename "mpp" child node names to "-pins$" Just 'mpp' is a bit ambiguous for a pattern as it allows any prefix or suffix. Change the node name pattern to "-pins$" to align with other Qualcomm pinctrl bindings. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230120165103.1278852-1-robh@kernel.org Signed-off-by: Krzysztof Kozlowski commit 74528edfbc664f9d2c927c4e5a44f1285598ed0f Author: Artem Bityutskiy Date: Fri Jan 20 11:15:28 2023 +0200 intel_idle: add Emerald Rapids Xeon support Emerald Rapids (EMR) is the next Intel Xeon processor after Sapphire Rapids (SPR). EMR C-states are the same as SPR C-states, and we expect that EMR C-state characteristics (latency and target residency) will be the same as in SPR. Therefore, add EMR support by using SPR C-states table. Signed-off-by: Artem Bityutskiy Signed-off-by: Rafael J. Wysocki commit 8aaec1177521eed07240ec5ac2bc55b2a1c35b42 Author: joewu (吳仲振) Date: Fri Jan 20 09:17:02 2023 -0800 Input: cros_ec_keyb - add 3 buttons for monitor function Add 3 extra buttons: 'brightness up', 'brightness down' and 'screen lock' to support monitor manipulating function. Signed-off-by: Joe Wu Link: https://lore.kernel.org/r/e23628e2cb464d238eb1c33a9e1e516b@msi.com Signed-off-by: Dmitry Torokhov commit c7cd6f04c0dfb6d44337f92b4c32126d20339873 Author: Srinivas Pandruvada Date: Tue Jan 17 10:22:40 2023 -0800 powercap: idle_inject: Support 100% idle injection The users of the idle injection framework allow 100% idle injection. For example: thermal/cpuidle_cooling.c driver. When the ratio is set to 100%, the runtime_duration becomes zero. However, idle_inject_set_duration() in the idle injection framework silently ignores run_duration_us == 0 without any error (it is a void function). The caller will then assume that everything is fine and 100% idle is effective, but in reality the idle duration will not change. There are two options: - The caller may change their max state to 99% instead of 100% and document that 100% is not supported by the idle inject framework. - Add 100% idle support to the idle inject framework. Since there are other protections via RT throttling, this framework can allow 100% idle. The RT throttling will be activated at 95% idle by default. The caller disabling RT throttling and injecting 100% idle, should be aware that CPU can't be used at all. The idle inject timer is started for (run_duration_us + idle_duration_us) duration. Hence replace (run_duration_us && idle_duration_us) with (run_duration_us + idle_duration_us) in the function idle_inject_set_duration(). Also check for !(run_duration_us + idle_duration_us) to return -EINVAL in idle_inject_start(). Signed-off-by: Srinivas Pandruvada Acked-by: Daniel Lezcano [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit 763bd29fd3d1742153f6c6847ca3b3560e7ca957 Author: ye xingchen Date: Tue Jan 17 10:42:17 2023 +0800 thermal: int340x_thermal: Use sysfs_emit_at() instead of scnprintf() Follow the advice of the Documentation/filesystems/sysfs.rst that show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: ye xingchen [ rjw: Subject rewrite ] Signed-off-by: Rafael J. Wysocki commit 52e0452b413d885d5ab7e3ae85287d67f5a286b2 Author: Paul E. McKenney Date: Thu Jan 12 16:11:28 2023 -0800 PM: sleep: 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 Reviewed-by: John Ogness Signed-off-by: Rafael J. Wysocki commit 38a29e5834eba1e71bc4aab82b09ac065af62b80 Author: Paul E. McKenney Date: Thu Jan 12 16:11:15 2023 -0800 drivers/cpufreq: 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 Acked-by: Viresh Kumar Reviewed-by: John Ogness Signed-off-by: Rafael J. Wysocki commit 9a55ab6f02c98bfca1c9c9d73507c1744406d2ba Author: Keguang Zhang Date: Thu Jan 12 21:53:42 2023 +0800 cpufreq: loongson1: Delete obsolete driver The generic DT based cpufreq driver works for Loongson-1, so delete the old custom driver. Signed-off-by: Keguang Zhang Signed-off-by: Rafael J. Wysocki commit 7a590bd6b42ffa12b16956f37742cc04ec15545e Merge: c7ef8221ca7d8 b814cc90e5780 Author: Jakub Kicinski Date: Fri Jan 20 08:37:11 2023 -0800 Merge branch 'octeontx2-af-miscellaneous-changes-for-cpt' Srujana Challa says: ==================== octeontx2-af: Miscellaneous changes for CPT This patchset consists of miscellaneous changes for CPT. - Adds a new mailbox to reset the requested CPT LF. - Modify FLR sequence as per HW team suggested. - Adds support to recover CPT engines when they gets fault. - Updates CPT inbound inline IPsec configuration mailbox, as per new generation of the OcteonTX2 chips. - Adds a new mailbox to return CPT FLT Interrupt info. ==================== Link: https://lore.kernel.org/r/20230118120354.1017961-1-schalla@marvell.com Signed-off-by: Jakub Kicinski commit b814cc90e57801b643c1be18aac1a8080dc66b9a Author: Srujana Challa Date: Wed Jan 18 17:33:54 2023 +0530 octeontx2-af: add mbox to return CPT_AF_FLT_INT info CPT HW would trigger the CPT AF FLT interrupt when CPT engines hits some uncorrectable errors and AF is the one which receives the interrupt and recovers the engines. This patch adds a mailbox for CPT VFs to request for CPT faulted and recovered engines info. Signed-off-by: Srujana Challa Signed-off-by: Jakub Kicinski commit d1e1de102f181283cdefe5b683f2396ce606f185 Author: Srujana Challa Date: Wed Jan 18 17:33:53 2023 +0530 octeontx2-af: update cpt lf alloc mailbox The CN10K CPT coprocessor contains a context processor to accelerate updates to the IPsec security association contexts. The context processor contains a context cache. This patch updates CPT LF ALLOC mailbox to config ctx_ilen requested by VFs. CPT_LF_ALLOC:ctx_ilen is the size of initial context fetch. Signed-off-by: Srujana Challa Signed-off-by: Jakub Kicinski commit e2784acb61b32713d7ac2b27419e2234ede2a3fa Author: Nithin Dabilpuram Date: Wed Jan 18 17:33:52 2023 +0530 octeontx2-af: restore rxc conf after teardown sequence CN10K CPT coprocessor includes a component named RXC which is responsible for reassembly of inner IP packets. RXC has the feature to evict oldest entries based on age/threshold. The age/threshold is being set to minimum values to evict all entries at the time of teardown. This patch adds code to restore timeout and threshold config after teardown sequence is complete as it is global config. Signed-off-by: Nithin Dabilpuram Signed-off-by: Jakub Kicinski commit 41b166e5cdd9020846efc5b358f6c0405e43fad7 Author: Srujana Challa Date: Wed Jan 18 17:33:51 2023 +0530 octeontx2-af: optimize cpt pf identification Optimize CPT PF identification in mbox handling for faster mbox response by doing it at AF driver probe instead of every mbox message. Signed-off-by: Srujana Challa Signed-off-by: Jakub Kicinski commit 5c22fce6931d29fb61b1b3687b75314ca26796a7 Author: Srujana Challa Date: Wed Jan 18 17:33:50 2023 +0530 octeontx2-af: modify FLR sequence for CPT On OcteonTX2 platform CPT instruction enqueue is only possible via LMTST operations. The existing FLR sequence mentioned in HRM requires a dummy LMTST to CPT but LMTST can't be submitted from AF driver. So, HW team provided a new sequence to avoid dummy LMTST. This patch adds code for the same. Signed-off-by: Srujana Challa Signed-off-by: Jakub Kicinski commit b7e41527bbd7c8469e88b79fa5d18f27734f60cc Author: Srujana Challa Date: Wed Jan 18 17:33:49 2023 +0530 octeontx2-af: add mbox for CPT LF reset On OcteonTX2 SoC, the admin function (AF) is the only one with all priviliges to configure HW and alloc resources, PFs and it's VFs have to request AF via mailbox for all their needs. This patch adds a new mailbox for CPT VFs to request for CPT LF reset. Signed-off-by: Srujana Challa Signed-off-by: Jakub Kicinski commit e625dad8c103bdeb9dab36e8f1630d75ff4558f0 Author: Srujana Challa Date: Wed Jan 18 17:33:48 2023 +0530 octeontx2-af: recover CPT engine when it gets fault When CPT engine has uncorrectable errors, it will get halted and must be disabled and re-enabled. This patch adds code for the same. Signed-off-by: Srujana Challa Signed-off-by: Jakub Kicinski commit 716ff71ae234fd3ef1286aac8d8a19a0ed2d509d Author: Li RongQing Date: Fri Jan 6 12:03:42 2023 +0800 cpuidle-haltpoll: Replace default_idle() with arch_cpu_idle() When a KVM guest has MWAIT, mwait_idle() is used as the default idle function. However, the cpuidle-haltpoll driver calls default_idle() from default_enter_idle() directly and that one uses HLT instead of MWAIT, which may affect performance adversely, because MWAIT is preferred to HLT as explained by the changelog of commit aebef63cf7ff ("x86: Remove vendor checks from prefer_mwait_c1_over_halt"). Make default_enter_idle() call arch_cpu_idle(), which can use MWAIT, instead of default_idle() to address this issue. Suggested-by: Thomas Gleixner Suggested-by: Rafael J. Wysocki Signed-off-by: Li RongQing [ rjw: Changelog rewrite ] Signed-off-by: Rafael J. Wysocki commit 7adc6885259edd4ef5c9a7a62fd4270cf38fdbfb Author: Zhang Rui Date: Wed Jan 4 22:36:02 2023 +0800 powercap: intel_rapl: add support for Emerald Rapids Add Emerald Rapids to the list of supported processor models in the Intel RAPL power capping driver. Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit bdaad038cc3c620a769f2156e7c9aab8605411c2 Author: Zhang Rui Date: Wed Jan 4 22:36:01 2023 +0800 powercap: intel_rapl: add support for Meteor Lake Add Meteor Lake to the list of supported processor models in the Intel RAPL power capping driver. Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit 8d8fcc391f50e2d9686d42b85e9b1db89b1bbb35 Author: Manivannan Sadhasivam Date: Wed Jan 18 20:38:49 2023 +0530 EDAC/qcom: Add platform_device_id table for module autoloading Add a device ID table so that the driver loads automatically when the associated platform_device gets registered. Reported-by: Andrew Halaney Signed-off-by: Manivannan Sadhasivam Signed-off-by: Borislav Petkov (AMD) Tested-by: Steev Klimaszewski # Thinkpad X13s Tested-by: Andrew Halaney # sa8540p-ride Link: https://lore.kernel.org/r/20230118150904.26913-3-manivannan.sadhasivam@linaro.org commit 2768fbf10076b744596ddaf59879bc96748c6f8f Author: Tomi Valkeinen Date: Wed Dec 21 11:24:46 2022 +0200 media: renesas: vsp1: Add new formats (2-10-10-10 ARGB, Y210, Y212) Add new pixel formats: RGBX1010102, RGBA1010102, ARGB2101010, Y210 and Y212. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Acked-by: Mauro Carvalho Chehab Acked-by: Hans Verkuil Signed-off-by: Laurent Pinchart commit e0106bd776e178e5fe1522581d4104c396c7eeb9 Author: Tomi Valkeinen Date: Wed Dec 21 11:24:45 2022 +0200 media: renesas: vsp1: Add V4H SoC version Add VI6_IP_VERSION_SOC_V4H so that we can identify V4H SoC. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Acked-by: Mauro Carvalho Chehab Acked-by: Hans Verkuil Signed-off-by: Laurent Pinchart commit 110d2bd7a2a5a9c59cd7700646952f88f2335539 Author: Tomi Valkeinen Date: Wed Dec 21 11:24:44 2022 +0200 media: renesas: vsp1: Change V3U to be gen4 V3U is actually gen4, not gen3. The same IP is also used in the (not-yet-supported) V4H. Change VI6_IP_VERSION_MODEL_VSPD_V3U to VI6_IP_VERSION_MODEL_VSPD_GEN4, to represent the model correctly. V3U and V4H can still be differentiated, if needed, with the VI6_IP_VERSION_SOC_xxx. Also mark VI6_IP_VERSION_MODEL_VSPD_GEN4 as gen 4 in vsp1_device_info, and update the code to correctly match for gen 4. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Acked-by: Mauro Carvalho Chehab Acked-by: Hans Verkuil Signed-off-by: Laurent Pinchart commit 0dc1d7a79a8d13e316d3b168e9fc57e376099c7a Author: Tomi Valkeinen Date: Wed Dec 21 11:24:43 2022 +0200 media: Add Y210, Y212 and Y216 formats Add Y210, Y212 and Y216 formats. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Acked-by: Mauro Carvalho Chehab Acked-by: Hans Verkuil Signed-off-by: Laurent Pinchart commit 8d0e3fc61abdf56a403b316e03fa8f89a3108caa Author: Tomi Valkeinen Date: Wed Dec 21 11:24:42 2022 +0200 media: Add 2-10-10-10 RGB formats Add RGBX1010102, RGBA1010102 and ARGB2101010 formats. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Acked-by: Mauro Carvalho Chehab Acked-by: Hans Verkuil Signed-off-by: Laurent Pinchart commit fdbc5aeb6b7824e45a0a1775a1c8d999c9f7e65a Author: Rodrigo Vivi Date: Fri Jan 20 06:06:58 2023 -0500 drm/i915/debugfs: Get rid of single use macros. No good reason for these indirection cases. Cc: Jani Nikula Signed-off-by: Rodrigo Vivi Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20230120110658.1083757-1-rodrigo.vivi@intel.com commit 2e337a8d14bd4b04913d52ccf076be29d846acd7 Author: Jagan Teki Date: Mon Dec 12 20:27:45 2022 +0530 drm: exynos: dsi: Properly name HSA/HBP/HFP/HSE bits HSA/HBP/HFP/HSE mode bits in Processor Reference Manuals specify a naming conversion as 'disable mode bit' due to its bit definition, 0 = Enable and 1 = Disable. For HSE bit, the i.MX 8M Mini/Nano/Plus Applications Processor Reference Manual named this bit as 'HseDisableMode' but the bit definition is quite opposite like 0 = Disables transfer 1 = Enables transfer which clearly states that HSE is not a disable bit. HSE is named as per the manual even though it is not a disable bit however the driver logic for handling HSE is based on the MIPI_DSI_MODE_VIDEO_HSE flag itself. Cc: Nicolas Boichat Reviewed-by: Marek Vasut Signed-off-by: Jagan Teki Reviewed-by: Frieder Schrempf Signed-off-by: Marek Vasut Link: https://patchwork.freedesktop.org/patch/msgid/20221212145745.15387-2-jagan@amarulasolutions.com commit 996e1defca34485dd2bd70b173f069aab5f21a65 Author: Jagan Teki Date: Mon Dec 12 20:27:44 2022 +0530 drm: exynos: dsi: Fix MIPI_DSI*_NO_* mode flags HFP/HBP/HSA/EOT_PACKET modes in Exynos DSI host specifies 0 = Enable and 1 = Disable. The logic for checking these mode flags was correct before the MIPI_DSI*_NO_* mode flag conversion. This patch is trying to fix this MIPI_DSI*_NO_* mode flags handling Exynos DSI host and update the mode_flags in relevant panel drivers. Fixes: 0f3b68b66a6d ("drm/dsi: Add _NO_ to MIPI_DSI_* flags disabling features") Reviewed-by: Marek Vasut Reviewed-by: Nicolas Boichat Reported-by: Sébastien Szymanski Signed-off-by: Jagan Teki Reviewed-by: Frieder Schrempf Signed-off-by: Marek Vasut Link: https://patchwork.freedesktop.org/patch/msgid/20221212145745.15387-1-jagan@amarulasolutions.com commit bc69da5ff087c40d1fc4f30596f1ee1b71924577 Author: Mark Brown Date: Fri Jan 20 12:04:09 2023 +0000 kselftest/arm64: Verify simultaneous SSVE and ZA context generation Add a test that generates SSVE and ZA context in a single signal frame to ensure that nothing is going wrong in that case for any reason. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230117-arm64-test-ssve-za-v1-2-203c00150154@kernel.org Signed-off-by: Catalin Marinas commit f76cb73a2d7c6e80bed04098b7f100872fd9a475 Author: Mark Brown Date: Fri Jan 20 12:04:08 2023 +0000 kselftest/arm64: Verify that SSVE signal context has SVE_SIG_FLAG_SM set Streaming mode SVE signal context should have SVE_SIG_FLAG_SM set but we were not actually validating this. Add a check. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230117-arm64-test-ssve-za-v1-1-203c00150154@kernel.org Signed-off-by: Catalin Marinas commit 89d72c035f88c8338bf3ab604a07c7320dc9f800 Author: Mark Brown Date: Thu Jan 12 19:51:52 2023 +0000 kselftest/arm64: Remove spurious comment from MTE test Makefile There's a stray comment in the MTE test Makefile which documents something that's since been removed, delete it. Signed-off-by: Mark Brown Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/r/20230111-arm64-kselftest-clang-v1-6-89c69d377727@kernel.org Signed-off-by: Catalin Marinas commit 343d59119e776af3060000f7af70553fc531230e Author: Mark Brown Date: Thu Jan 12 19:51:51 2023 +0000 kselftest/arm64: Support build of MTE tests with clang The assembly portions of the MTE selftests need to be built with a toolchain supporting MTE. Since we support GCC versions that lack MTE support we have logic to suppress build of these tests when using such a toolchain but that logic is broken for LLVM=1 builds, it uses CC but CC is only set for LLVM builds in libs.mk which needs to be included after we have selected which test programs to build. Since all supported LLVM versions support MTE we can simply assume MTE support when LLVM is set. This is not a thing of beauty but it does the job. Signed-off-by: Mark Brown Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/r/20230111-arm64-kselftest-clang-v1-5-89c69d377727@kernel.org Signed-off-by: Catalin Marinas commit 6e4b4f0eca88e47def703f90a403fef5b96730d5 Author: Mark Brown Date: Thu Jan 12 19:51:50 2023 +0000 kselftest/arm64: Initialise current at build time in signal tests When building with clang the toolchain refuses to link the signals testcases since the assembly code has a reference to current which has no initialiser so is placed in the BSS: /tmp/signals-af2042.o: in function `fake_sigreturn': :51:(.text+0x40): relocation truncated to fit: R_AARCH64_LD_PREL_LO19 against symbol `current' defined in .bss section in /tmp/test_signals-ec1160.o Since the first statement in main() initialises current we may as well fix this by moving the initialisation to build time so the variable doesn't end up in the BSS. Signed-off-by: Mark Brown Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/r/20230111-arm64-kselftest-clang-v1-4-89c69d377727@kernel.org Signed-off-by: Catalin Marinas commit a884f7970e57aef78c6011561e29d238e46b3a9f Author: Mark Brown Date: Thu Jan 12 19:51:49 2023 +0000 kselftest/arm64: Don't pass headers to the compiler as source The signal Makefile rules pass all the dependencies for each executable, including headers, to the compiler which GCC is happy enough with but clang rejects: clang --target=aarch64-none-linux-gnu -fintegrated-as -Wall -O2 -g -I/home/broonie/git/linux/tools/testing/selftests/ -isystem /home/broonie/git/linux/usr/include -D_GNU_SOURCE -std=gnu99 -I. test_signals.c test_signals_utils.c testcases/testcases.c signals.S testcases/fake_sigreturn_bad_magic.c test_signals.h test_signals_utils.h testcases/testcases.h -o testcases/fake_sigreturn_bad_magic clang: error: cannot specify -o when generating multiple output files This happens because clang gets confused about what to do with the header files, failing to identify them as source. This is not amazing behaviour on clang's part and should ideally be fixed but even if that happens we'd still need a new clang release so let's instead rework the Makefile so we use variables for the lists of header and source files, allowing us to only pass the source files to the compiler and keep clang happy. As a bonus the resulting Makefile is a bit easier to read. Signed-off-by: Mark Brown Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/r/20230111-arm64-kselftest-clang-v1-3-89c69d377727@kernel.org Signed-off-by: Catalin Marinas commit cd57a6584fe596f4daf128007bff71b1c2ba16c8 Author: Mark Brown Date: Thu Jan 12 19:51:48 2023 +0000 kselftest/arm64: Remove redundant _start labels from FP tests There are a number of freestanding static executables used in floating point testing that have no runtime at all. These all define the main entry point as: .globl _start function _start _start: but clang's integrated assembler complains that: error: symbol '_start' is already defined due to having both a label and function directive. Remove the label to allow building with clang. No functional change. Signed-off-by: Mark Brown Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/r/20230111-arm64-kselftest-clang-v1-2-89c69d377727@kernel.org Signed-off-by: Catalin Marinas commit aa58ace3499a678768f5ce9a5973919bfccd8a4e Author: Mark Brown Date: Thu Jan 12 19:51:47 2023 +0000 kselftest/arm64: Fix .pushsection for strings in FP tests The .pushsection directive used to store the strings used with the .puts macro in the floating point helpers does not provide a section type but according to the gas documentation this should be mandatory and with the clang built in as it actually is. Provide one so that we can build these tests with LLVM=1. No functional change. Signed-off-by: Mark Brown Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/r/20230111-arm64-kselftest-clang-v1-1-89c69d377727@kernel.org Signed-off-by: Catalin Marinas commit 4f2c9bf16a4bc209a674e7b76d8e829b917c7f84 Author: Amit Daniel Kachhap Date: Wed Jan 11 11:07:06 2023 +0530 arm64: Add compat hwcap SSBS This hwcap was added for 32-bit native arm kernel by commit fea53546be57 ("ARM: 9274/1: Add hwcap for Speculative Store Bypassing Safe") and hence the corresponding changes added in 32-bit compat arm64 for similar user interfaces. Speculative Store Bypass Safe is a feature(FEAT_SSBS) present in AArch32/AArch64 state for Armv8 and can be identified by PFR2.SSBS identification register. This hwcap is already advertised in native arm64 kernel. Signed-off-by: Amit Daniel Kachhap Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20230111053706.13994-8-amit.kachhap@arm.com Signed-off-by: Catalin Marinas commit 2d602aa99abb84c34cc9602c8bd6852895314f74 Author: Amit Daniel Kachhap Date: Wed Jan 11 11:07:05 2023 +0530 arm64: Add compat hwcap SB This hwcap was added for 32-bit native arm kernel by commit 3bda6d884897 ("ARM: 9273/1: Add hwcap for Speculation Barrier(SB)") and hence the corresponding changes added in 32-bit compat arm64 kernel. Speculation Barrier is a feature(FEAT_SB) present in both AArch32 and AArch64 state. This hwcap is already advertised in native arm64 kernel. Signed-off-by: Amit Daniel Kachhap Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20230111053706.13994-7-amit.kachhap@arm.com Signed-off-by: Catalin Marinas commit 0864d1e42959b8b1e32efa3fb672fe81ba1dbc6c Author: Amit Daniel Kachhap Date: Wed Jan 11 11:07:04 2023 +0530 arm64: Add compat hwcap I8MM This hwcap was added earlier for 32-bit native arm kernel by commit 956ca3a4eb81 ("ARM: 9272/1: vfp: Add hwcap for FEAT_AA32I8MM") and hence the corresponding changes added in 32-bit compat arm64 kernel for similar user interfaces. Int8 matrix multiplication is a feature (FEAT_AA32I8MM) present in AArch32 state of Armv8 and is identified by ISAR6.I8MM register. Similar feature(FEAT_I8MM) exist for AArch64 state and is already advertised in arm64 kernel. Signed-off-by: Amit Daniel Kachhap Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20230111053706.13994-6-amit.kachhap@arm.com Signed-off-by: Catalin Marinas commit f64234fa45f47cd757e5eb7a83d54d83480c4fce Author: Amit Daniel Kachhap Date: Wed Jan 11 11:07:03 2023 +0530 arm64: Add compat hwcap ASIMDBF16 This hwcap was added earlier for 32-bit native arm kernel by commit 23b6d4ad6e7a ("ARM: 9271/1: vfp: Add hwcap for FEAT_AA32BF16") and hence the corresponding changes added in 32-bit compat arm64 kernel. Brain 16-bit floating-point storage format is a feature (FEAT_AA32BF16) present in AArch32 state for Armv8 and is represented by ISAR6.BF16 identification register. Similar feature (FEAT_BF16) exist for AArch64 state and is already advertised in native arm64 kernel. Signed-off-by: Amit Daniel Kachhap Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20230111053706.13994-5-amit.kachhap@arm.com Signed-off-by: Catalin Marinas commit 4a87be25b02b33948c293cae47a7f27d8b9bf20f Author: Amit Daniel Kachhap Date: Wed Jan 11 11:07:02 2023 +0530 arm64: Add compat hwcap ASIMDFHM This hwcap was added earlier for 32-bit native arm kernel by commit ce4835497c20 ("ARM: 9270/1: vfp: Add hwcap for FEAT_FHM") and hence the corresponding changes added in 32-bit compat arm64 kernel for similar user interfaces. Floating-point half-precision multiplication (FHM) is a feature present in AArch32/AArch64 state for Armv8. This hwcap is already advertised in native arm64 kernel. Signed-off-by: Amit Daniel Kachhap Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20230111053706.13994-4-amit.kachhap@arm.com Signed-off-by: Catalin Marinas commit 27addd402a73cb97b1529ea4e56be7eb82d3c478 Author: Amit Daniel Kachhap Date: Wed Jan 11 11:07:01 2023 +0530 arm64: Add compat hwcap ASIMDDP This hwcap was added earlier for 32-bit native arm kernel by commit 62ea0d873af3 ("ARM: 9269/1: vfp: Add hwcap for FEAT_DotProd") and hence the corresponding changes added in 32-bit compat arm64 kernel for similar user interfaces. Advanced Dot product is a feature (FEAT_DotProd) present in both AArch32/AArch64 state for Armv8 and is already advertised in native arm64 kernel. Signed-off-by: Amit Daniel Kachhap Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20230111053706.13994-3-amit.kachhap@arm.com Signed-off-by: Catalin Marinas commit 846b73a4a3d0bf289ee924f6101c4f842ecc5b81 Author: Amit Daniel Kachhap Date: Wed Jan 11 11:07:00 2023 +0530 arm64: Add compat hwcap FPHP and ASIMDHP These hwcaps were added earlier for 32-bit native arm kernel by commit c00a19c8b143 ("ARM: 9268/1: vfp: Add hwcap FPHP and ASIMDHP for FEAT_FP16") and hence the corresponding changes added in 32-bit compat arm64 kernel for similar userspace interfaces. Floating point half-precision (FPHP) and Advanced SIMD half-precision (ASIMDHP) represents the Armv8 FP16 feature extension and is already advertised in native arm64 kernel. Signed-off-by: Amit Daniel Kachhap Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20230111053706.13994-2-amit.kachhap@arm.com Signed-off-by: Catalin Marinas commit 59b37fe52f49955791a460752c37145f1afdcad1 Author: Ard Biesheuvel Date: Mon Jan 9 18:48:00 2023 +0100 arm64: Stash shadow stack pointer in the task struct on interrupt Instead of reloading the shadow call stack pointer from the ordinary stack, which may be vulnerable to the kind of gadget based attacks shadow call stacks were designed to prevent, let's store a task's shadow call stack pointer in the task struct when switching to the shadow IRQ stack. Given that currently, the task_struct::scs_sp field is only used to preserve the shadow call stack pointer while a task is scheduled out or running in user space, reusing this field to preserve and restore it while running off the IRQ stack must be safe, as those occurrences are guaranteed to never overlap. (The stack switching logic only switches stacks when running from the task stack, and so the value being saved here always corresponds to the task mode shadow stack) While at it, fold a mov/add/mov sequence into a single add. Signed-off-by: Ard Biesheuvel Reviewed-by: Kees Cook Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20230109174800.3286265-3-ardb@kernel.org Signed-off-by: Catalin Marinas commit 2198d07c509f1db4a1185d1f65aaada794c6ea59 Author: Ard Biesheuvel Date: Mon Jan 9 18:47:59 2023 +0100 arm64: Always load shadow stack pointer directly from the task struct All occurrences of the scs_load macro load the value of the shadow call stack pointer from the task which is current at that point. So instead of taking a task struct register argument in the scs_load macro to specify the task struct to load from, let's always reference the current task directly. This should make it much harder to exploit any instruction sequences reloading the shadow call stack pointer register from memory. Signed-off-by: Ard Biesheuvel Acked-by: Mark Rutland Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20230109174800.3286265-2-ardb@kernel.org Signed-off-by: Catalin Marinas commit 32a55bbdd74e2bb76a76979bc4f37e7e7ebe620d Author: Cristian Marussi Date: Fri Jan 20 12:23:26 2023 +0000 firmware: arm_scmi: Clarify raw per-channel ABI documentation Explain more in detail how the per-channel identifier is chosen. Suggested-by: Vincent Guittot Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20230120122326.1932614-1-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 12df2c182ccb850988d2680a422211a812fb5cb2 Author: Krzysztof Kozlowski Date: Fri Jan 20 14:30:10 2023 +0100 regulator: dt-bindings: fixed-regulator: allow gpios property 'gpios' is in general preferred even for single GPIO specifiers and there are DTS boards using it (exynos4412-p4note.dtsi), so allow both versions. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230120133010.299797-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit dd2f003e4e85b154754d5a83e0c3b1b517d1f802 Author: Greg Kroah-Hartman Date: Fri Jan 20 15:02:41 2023 +0100 Revert "arm64: tegra: Enable XUSB host function on Jetson AGX Orin" This reverts commit 1b17df99730ab63b49848e61ef19d8ee583684c5. It causes merge issues in linux-next and was asked to be dropped from this tree. Reported-by: Thierry Reding Cc: Wayne Chang Cc: Thierry Reding Cc: Jon Hunter Link: https://lore.kernel.org/r/Y8lEhwT3VWEn9w+R@orome Signed-off-by: Greg Kroah-Hartman commit 1b6599f741a4525ca761ecde46e5885ff1e6ba58 Author: Yang Yingliang Date: Tue Jan 3 20:57:26 2023 +0800 powercap: fix possible name leak in powercap_register_zone() In the error path after calling dev_set_name(), the device name is leaked. To fix this, calling dev_set_name() before device_register(), and call put_device() if it returns error. All the resources is released in powercap_release(), so it can return from powercap_register_zone() directly. Fixes: 75d2364ea0ca ("PowerCap: Add class driver") Signed-off-by: Yang Yingliang Signed-off-by: Rafael J. Wysocki commit 6b37dfcb39f6b7d2e5070181d878a4c373b24bb0 Author: Randy Dunlap Date: Mon Jan 2 19:28:40 2023 -0800 PM: hibernate: swap: don't use /** for non-kernel-doc comments kernel-doc complains about multiple occurrences of "/**" being used for something that is not a kernel-doc comment, so change all of these to just use "/*" comment style. The warning message for all of these is: FILE:LINE: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst kernel/power/swap.c:585: warning: ... Structure used for CRC32. kernel/power/swap.c:600: warning: ... * CRC32 update function that runs in its own thread. kernel/power/swap.c:627: warning: ... * Structure used for LZO data compression. kernel/power/swap.c:644: warning: ... * Compression function that runs in its own thread. kernel/power/swap.c:952: warning: ... * The following functions allow us to read data using a swap map kernel/power/swap.c:1111: warning: ... * Structure used for LZO data decompression. kernel/power/swap.c:1127: warning: ... * Decompression function that runs in its own thread. Also correct one spello/typo. Signed-off-by: Randy Dunlap Signed-off-by: Rafael J. Wysocki commit 00142bfd5a916a0b3899cc709bf8f5042cf3d084 Author: Thomas Weißschuh Date: Wed Dec 21 16:17:52 2022 +0000 kernels/ksysfs.c: export kernel address bits This can be used by userspace to determine the address size of the running kernel. It frees userspace from having to interpret this information from the UTS machine field. Userspace implementation: https://github.com/util-linux/util-linux/pull/1966 Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20221221-address-bits-v1-1-8446b13244ac@weissschuh.net Signed-off-by: Greg Kroah-Hartman commit 18e126e97c961f7a93823795c879d7c085fe5098 Author: Chen Zhongjin Date: Fri Nov 11 09:53:26 2022 +0800 firmware: dmi-sysfs: Fix null-ptr-deref in dmi_sysfs_register_handle KASAN reported a null-ptr-deref error: KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] CPU: 0 PID: 1373 Comm: modprobe Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) RIP: 0010:dmi_sysfs_entry_release ... Call Trace: kobject_put dmi_sysfs_register_handle (drivers/firmware/dmi-sysfs.c:540) dmi_sysfs dmi_decode_table (drivers/firmware/dmi_scan.c:133) dmi_walk (drivers/firmware/dmi_scan.c:1115) dmi_sysfs_init (drivers/firmware/dmi-sysfs.c:149) dmi_sysfs do_one_initcall (init/main.c:1296) ... Kernel panic - not syncing: Fatal exception Kernel Offset: 0x4000000 from 0xffffffff81000000 ---[ end Kernel panic - not syncing: Fatal exception ]--- It is because previous patch added kobject_put() to release the memory which will call dmi_sysfs_entry_release() and list_del(). However, list_add_tail(entry->list) is called after the error block, so the list_head is uninitialized and cannot be deleted. Move error handling to after list_add_tail to fix this. Fixes: 660ba678f999 ("firmware: dmi-sysfs: Fix memory leak in dmi_sysfs_register_handle") Signed-off-by: Chen Zhongjin Link: https://lore.kernel.org/r/20221111015326.251650-2-chenzhongjin@huawei.com Signed-off-by: Greg Kroah-Hartman commit c7ef8221ca7d8dfdf679a68b2fc3187f42a652b0 Author: Arkadiusz Kubalewski Date: Wed Jan 18 16:58:36 2023 -0800 ice: use GNSS subsystem instead of TTY Previously support for GNSS was implemented as a TTY driver, it allowed to access GNSS receiver on /dev/ttyGNSS_. Use generic GNSS subsystem API instead of implementing own TTY driver. The receiver is accessible on /dev/gnss. In case of multiple receivers in the OS, correct device can be found by enumerating either: - /sys/class/net//device/gnss/ - /sys/class/gnss/gnss/device/ Using GNSS subsystem is superior to implementing own TTY driver, as the GNSS subsystem was designed solely for this purpose. It also implements TTY driver but in a common and defined way. From user perspective, there is no difference in communicating with a device, except new path to the device shall be used. The device will provide same information to the userspace as the old one, and can be used in the same way, i.e.: old # gpsmon /dev/ttyGNSS_2100_0 new # gpsmon /dev/gnss0 There is no other impact on userspace tools. User expecting onboard GNSS receiver support is required to enable CONFIG_GNSS=y/m in kernel config. Reviewed-by: Alexander Lobakin Signed-off-by: Karol Kolacinski Signed-off-by: Michal Michalik Signed-off-by: Arkadiusz Kubalewski Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Acked-by: Greg Kroah-Hartman Signed-off-by: David S. Miller commit 498fe81011120df551192ad6058e785a61ab3216 Author: Andy Shevchenko Date: Thu Jan 19 21:11:01 2023 +0200 net: hns: 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 Reviewed-by: Tony Nguyen Signed-off-by: David S. Miller commit 1b94ad7ccc21c002ca324d4fe6c11078bb4d4c9a Author: Andy Shevchenko Date: Thu Jan 19 21:11:00 2023 +0200 ACPI: utils: Add acpi_evaluate_dsm_typed() and acpi_check_dsm() stubs When the ACPI part of a driver is optional the methods used in it are expected to be available even if CONFIG_ACPI=n. This is not the case for _DSM related methods. Add stubs for acpi_evaluate_dsm_typed() and acpi_check_dsm() methods. Reported-by: kernel test robot Signed-off-by: Andy Shevchenko Signed-off-by: David S. Miller commit e5da06b27ff5a148e42265c8e306670a9d913969 Author: Yang Yingliang Date: Tue Nov 15 11:16:38 2022 +0800 drivers: base: transport_class: fix resource leak when transport_add_device() fails The normal call sequence of using transport class is: Add path: transport_setup_device() transport_setup_classdev() // call sas_host_setup() here transport_add_device() // if fails, need call transport_destroy_device() transport_configure_device() Remove path: transport_remove_device() transport_remove_classdev // call sas_host_remove() here transport_destroy_device() If transport_add_device() fails, need call transport_destroy_device() to free memory, but in this case, ->remove() is not called, and the resources allocated in ->setup() are leaked. So fix these leaks by calling ->remove() in transport_add_class_device() if it returns error. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221115031638.3816551-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit a86367803838b369fe5486ac18771d14723c258c Author: Yang Yingliang Date: Thu Nov 10 18:23:07 2022 +0800 drivers: base: transport_class: fix possible memory leak Current some drivers(like iscsi) call transport_register_device() failed, they don't call transport_destroy_device() to release the memory allocated in transport_setup_device(), because they don't know what was done, it should be internal thing to release the resource in register function. So fix this leak by calling destroy function inside register function. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221110102307.3492557-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit a89c6bcdac22bec1bfbe6e64060b4cf5838d4f47 Author: Gabriel Krisman Bertazi Date: Mon Jan 9 12:19:55 2023 -0300 arm64: Avoid repeated AA64MMFR1_EL1 register read on pagefault path Accessing AA64MMFR1_EL1 is expensive in KVM guests, since it is emulated in the hypervisor. In fact, ARM documentation mentions some feature registers are not supposed to be accessed frequently by the OS, and therefore should be emulated for guests [1]. Commit 0388f9c74330 ("arm64: mm: Implement arch_wants_old_prefaulted_pte()") introduced a read of this register in the page fault path. But, even when the feature of setting faultaround pages with the old flag is disabled for a given cpu, we are still paying the cost of checking the register on every pagefault. This results in an explosion of vmexit events in KVM guests, which directly impacts the performance of virtualized workloads. For instance, running kernbench yields a 15% increase in system time solely due to the increased vmexit cycles. This patch avoids the extra cost by using the sanitized cached value. It should be safe to do so, since this register mustn't change for a given cpu. [1] https://developer.arm.com/-/media/Arm%20Developer%20Community/PDF/Learn%20the%20Architecture/Armv8-A%20virtualization.pdf?revision=a765a7df-1a00-434d-b241-357bfda2dd31 Signed-off-by: Gabriel Krisman Bertazi Acked-by: Will Deacon Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/20230109151955.8292-1-krisman@suse.de Signed-off-by: Catalin Marinas commit 0d150f967e8410e1e6712484543eec709356a65d Author: Hanjun Guo Date: Tue Nov 22 15:37:28 2022 +0800 driver core: location: Free struct acpi_pld_info *pld before return false struct acpi_pld_info *pld should be freed before the return of allocation failure, to prevent memory leak, add the ACPI_FREE() to fix it. Fixes: bc443c31def5 ("driver core: location: Check for allocations failure") Signed-off-by: Hanjun Guo Link: https://lore.kernel.org/r/1669102648-11517-1-git-send-email-guohanjun@huawei.com Signed-off-by: Greg Kroah-Hartman commit 6977b1a5d67097eaa4d02b0c126c04cc6e8917c0 Author: Zhengchao Shao Date: Wed Nov 23 09:20:42 2022 +0800 driver core: fix resource leak in device_add() When calling kobject_add() failed in device_add(), it will call cleanup_glue_dir() to free resource. But in kobject_add(), dev->kobj.parent has been set to NULL. This will cause resource leak. The process is as follows: device_add() get_device_parent() class_dir_create_and_add() kobject_add() //kobject_get() ... dev->kobj.parent = kobj; ... kobject_add() //failed, but set dev->kobj.parent = NULL ... glue_dir = get_glue_dir(dev) //glue_dir = NULL, and goto //"Error" label ... cleanup_glue_dir() //becaues glue_dir is NULL, not call //kobject_put() The preceding problem may cause insmod mac80211_hwsim.ko to failed. sysfs: cannot create duplicate filename '/devices/virtual/mac80211_hwsim' Call Trace: dump_stack_lvl+0x8e/0xd1 sysfs_warn_dup.cold+0x1c/0x29 sysfs_create_dir_ns+0x224/0x280 kobject_add_internal+0x2aa/0x880 kobject_add+0x135/0x1a0 get_device_parent+0x3d7/0x590 device_add+0x2aa/0x1cb0 device_create_groups_vargs+0x1eb/0x260 device_create+0xdc/0x110 mac80211_hwsim_new_radio+0x31e/0x4790 [mac80211_hwsim] init_mac80211_hwsim+0x48d/0x1000 [mac80211_hwsim] do_one_initcall+0x10f/0x630 do_init_module+0x19f/0x5e0 load_module+0x64b7/0x6eb0 __do_sys_finit_module+0x140/0x200 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 kobject_add_internal failed for mac80211_hwsim with -EEXIST, don't try to register things with the same name in the same directory. Fixes: cebf8fd16900 ("driver core: fix race between creating/querying glue dir and its cleanup") Signed-off-by: Zhengchao Shao Link: https://lore.kernel.org/r/20221123012042.335252-1-shaozhengchao@huawei.com Signed-off-by: Greg Kroah-Hartman commit 7c09f4281cb6ec0fc202f53924ed6c389c61bf0e Author: Gavin Shan Date: Fri Jan 20 13:57:26 2023 +0800 drivers/base/memory: Fix comments for phys_index_show() According to 'admin-guide/mm/memory-hotplug.rst', the memory block ID, instead of the section index, is shown by '/sys/devices/system/memory/ memoryX/phys_index'. Fix the comments to match with 'admin-guide/mm/memory-hotplug.rst'. Besides, use the existing helper memory_block_id() to convert the section index to the memory block index. No functional change intended. Signed-off-by: Gavin Shan Link: https://lore.kernel.org/r/20230120055727.355483-2-gshan@redhat.com Signed-off-by: Greg Kroah-Hartman commit f7d85515bd21902b218370a1a6301f76e4e636ff Author: Christophe JAILLET Date: Sat Jan 14 10:22:03 2023 +0100 test_firmware: Use kstrtobool() instead of strtobool() strtobool() is the same as kstrtobool(). However, the latter is more used within the kernel. In order to remove strtobool() and slightly simplify kstrtox.h, switch to the other function name. While at it, include the corresponding header file () Signed-off-by: Christophe JAILLET Acked-by: Luis Chamberlain Link: https://lore.kernel.org/r/34f04735d20e0138695dd4070651bd860a36b81c.1673688120.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 1ad5288f2bd37818fc90b77635611110c44df104 Author: Randy Dunlap Date: Mon Jan 2 13:15:54 2023 -0800 test_firmware: use kernel-doc struct notation Add "struct" to the kernel-doc notation to prevent a warning: lib/test_firmware.c:98: warning: cannot understand function prototype: 'struct test_config ' Signed-off-by: Randy Dunlap Cc: Luis Chamberlain Cc: Russ Weight Cc: Kees Cook Cc: Greg Kroah-Hartman Acked-by: Luis Chamberlain Link: https://lore.kernel.org/r/20230102211554.25629-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 53719876e064643a6e58b5e6067a149a0fd191ec Author: Yang Yingliang Date: Wed Jan 4 17:57:02 2023 +0800 iommu/exynos: Fix error handling in exynos_iommu_init() If platform_driver_register() fails, it don't need unregister and call kmem_cache_free() to free the memory allocated before calling register. Fixes: bbc4d205d93f ("iommu/exynos: Fix driver initialization sequence") Signed-off-by: Yang Yingliang Reviewed-by: Sam Protsenko Link: https://lore.kernel.org/r/20230104095702.2591122-1-yangyingliang@huawei.com Signed-off-by: Joerg Roedel commit 8ced928019353eaecbffee566d7ed6a9a9e60e78 Author: Mark Brown Date: Tue Dec 27 14:20:43 2022 +0000 kselftest/arm64: Add test case for TPIDR2 signal frame records Ensure that we get signal context for TPIDR2 if and only if SME is present on the system. Since TPIDR2 is owned by libc we merely validate that the value is whatever it was set to, this isn't ideal since it's likely to just be the default of 0 with current systems but it avoids future false positives. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-tpidr2-sig-v3-4-c77c6c8775f4@kernel.org Signed-off-by: Catalin Marinas commit bae393dabf353172784987c12c99a55cbe8075bc Author: Mark Brown Date: Tue Dec 27 14:20:42 2022 +0000 kselftest/arm64: Add TPIDR2 to the set of known signal context records When validating the set of signal context records check that any TPIDR2 record has the correct size, also suppressing warnings due to seeing an unknown record type. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-tpidr2-sig-v3-3-c77c6c8775f4@kernel.org Signed-off-by: Catalin Marinas commit 39e54499280f373d03ab7ffe681ca9d53a9089c9 Author: Mark Brown Date: Tue Dec 27 14:20:41 2022 +0000 arm64/signal: Include TPIDR2 in the signal context Add a new signal frame record for TPIDR2 using the same format as we already use for ESR with different magic, a header with the value from the register appended as the only data. If SME is supported then this record is always included. Signed-off-by: Mark Brown Reviewed-by: Szabolcs Nagy Link: https://lore.kernel.org/r/20221208-arm64-tpidr2-sig-v3-2-c77c6c8775f4@kernel.org Signed-off-by: Catalin Marinas commit 17d0c4a27b2ac90df99307af0b6b6a162805c4fc Author: Mark Brown Date: Tue Dec 27 14:20:40 2022 +0000 arm64/sme: Document ABI for TPIDR2 signal information In order to allow access to TPIDR2 from signal handlers we need to add it to the signal context, document that we are doing so. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-tpidr2-sig-v3-1-c77c6c8775f4@kernel.org Signed-off-by: Catalin Marinas commit 2e4a4e36285fa9739cb45a26206c958037d6b773 Merge: 95b2a03478465 198102c9103fc Author: Greg Kroah-Hartman Date: Fri Jan 20 13:40:04 2023 +0100 Merge tag 'archtopo-cacheinfo-updates-6.3' 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.3 The main change is to build the cache topology information for all the CPUs from the primary CPU. Currently the cacheinfo for secondary CPUs is created during the early boot on the respective CPU itself. Preemption and interrupts are disabled at this stage. On PREEMPT_RT kernels, allocating memory and even parsing the PPTT table for ACPI based systems triggers a: 'BUG: sleeping function called from invalid context' To prevent this bug, the cacheinfo is now allocated from the primary CPU when preemption and interrupts are enabled and before booting secondary CPUs. The cache levels/leaves are computed from DT/ACPI PPTT information only, without relying on any architecture specific mechanism if done so early. The other minor change included here is to handle shared caches at different levels when not all the CPUs on the system have the same cache hierarchy." * tag 'archtopo-cacheinfo-updates-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: cacheinfo: Fix shared_cpu_map to handle shared caches at different levels arch_topology: Build cacheinfo from primary CPU ACPI: PPTT: Update acpi_find_last_cache_level() to acpi_get_cache_info() ACPI: PPTT: Remove acpi_find_cache_levels() cacheinfo: Check 'cache-unified' property to count cache leaves cacheinfo: Return error code in init_of_cache_level() cacheinfo: Use RISC-V's init_cache_level() as generic OF implementation commit 3eb1b41fba97a1586e3ecca8c10547071f541567 Author: Mark Brown Date: Mon Jan 16 16:04:56 2023 +0000 kselftest/arm64: Add coverage of SME 2 and 2.1 hwcaps Add the hwcaps defined by SME 2 and 2.1 to the hwcaps test. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-sme2-v4-21-f2fa0aef982f@kernel.org Signed-off-by: Catalin Marinas commit 4e1aa1a18f1becb479c3627b73f1b7ebe2d46924 Author: Mark Brown Date: Mon Jan 16 16:04:55 2023 +0000 kselftest/arm64: Add coverage of the ZT ptrace regset Add coverage of the ZT ptrace interface. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-sme2-v4-20-f2fa0aef982f@kernel.org Signed-off-by: Catalin Marinas commit 49886aa9ab33b1825439015a6b2c91ed9b294ba3 Author: Mark Brown Date: Mon Jan 16 16:04:54 2023 +0000 kselftest/arm64: Add SME2 coverage to syscall-abi Verify that ZT0 is preserved over syscalls when it is present and PSTATE.ZA is set. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-sme2-v4-19-f2fa0aef982f@kernel.org Signed-off-by: Catalin Marinas commit 18f8729ab3d56ec0bfd980d6b3660a50af43b82a Author: Mark Brown Date: Mon Jan 16 16:04:53 2023 +0000 kselftest/arm64: Add test coverage for ZT register signal frames We should have a ZT register frame with an expected size when ZA is enabled and have no ZT frame when ZA is disabled. Since we don't load any data into ZT we expect the data to all be zeros since the architecture guarantees it will be set to 0 as ZA is enabled. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-sme2-v4-18-f2fa0aef982f@kernel.org Signed-off-by: Catalin Marinas commit afe6f182752625cadf4ff97613bd2f362383bcbf Author: Mark Brown Date: Mon Jan 16 16:04:52 2023 +0000 kselftest/arm64: Teach the generic signal context validation about ZT Add ZT to the set of signal contexts that the shared code understands and validates the form of. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-sme2-v4-17-f2fa0aef982f@kernel.org Signed-off-by: Catalin Marinas commit 63829373260898bdd2eb95a03e2e1c936998d6ca Author: Mark Brown Date: Mon Jan 16 16:04:51 2023 +0000 kselftest/arm64: Enumerate SME2 in the signal test utility code Support test cases for SME2 by adding it to the set of features that we enumerate so test cases can check for it. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-sme2-v4-16-f2fa0aef982f@kernel.org Signed-off-by: Catalin Marinas commit f63a9f15b2d4a8c9588a9260d49bc3890118fece Author: Mark Brown Date: Mon Jan 16 16:04:50 2023 +0000 kselftest/arm64: Cover ZT in the FP stress test Hook up the newly added zt-test program in the FPSIMD stress tests, start a copy per CPU when SME2 is supported. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-sme2-v4-15-f2fa0aef982f@kernel.org Signed-off-by: Catalin Marinas commit 1c07425e902cd3137961c3d45b4271bf8a9b8eb9 Author: Mark Brown Date: Mon Jan 16 16:04:49 2023 +0000 kselftest/arm64: Add a stress test program for ZT0 Following the pattern for the other register sets add a stress test program for ZT0 which continually loads and verifies patterns in the register in an effort to discover context switching problems. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-sme2-v4-14-f2fa0aef982f@kernel.org Signed-off-by: Catalin Marinas commit 7d5d8601e4577c918fdb5fa922c634a73557ac0f Author: Mark Brown Date: Mon Jan 16 16:04:48 2023 +0000 arm64/sme: Add hwcaps for SME 2 and 2.1 features In order to allow userspace to discover the presence of the new SME features add hwcaps for them. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-sme2-v4-13-f2fa0aef982f@kernel.org Signed-off-by: Catalin Marinas commit f90b529bcbe57c66da2b6a0d3c7c81e8567af63d Author: Mark Brown Date: Mon Jan 16 16:04:47 2023 +0000 arm64/sme: Implement ZT0 ptrace support Implement support for a new note type NT_ARM64_ZT providing access to ZT0 when implemented. Since ZT0 is a register with constant size this is much simpler than for other SME state. As ZT0 is only accessible when PSTATE.ZA is set writes to ZT0 cause PSTATE.ZA to be set, the main alternative would be to return -EBUSY in this case but this seemed more constructive. Practical users are also going to be working with ZA anyway and have some understanding of the state. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-sme2-v4-12-f2fa0aef982f@kernel.org Signed-off-by: Catalin Marinas commit ee072cf708048c0d718a88159ae7985dd96d316f Author: Mark Brown Date: Mon Jan 16 16:04:46 2023 +0000 arm64/sme: Implement signal handling for ZT Add a new signal context type for ZT which is present in the signal frame when ZA is enabled and ZT is supported by the system. In order to account for the possible addition of further ZT registers in the future we make the number of registers variable in the ABI, though currently the only possible number is 1. We could just use a bare list head for the context since the number of registers can be inferred from the size of the context but for usability and future extensibility we define a header with the number of registers and some reserved fields in it. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-sme2-v4-11-f2fa0aef982f@kernel.org Signed-off-by: Catalin Marinas commit 95fcec713259d440626526ed96ff5d3bac6179ea Author: Mark Brown Date: Mon Jan 16 16:04:45 2023 +0000 arm64/sme: Implement context switching for ZT0 When the system supports SME2 the ZT0 register must be context switched as part of the floating point state. This register is stored immediately after ZA in memory and is only accessible when PSTATE.ZA is set so we handle it in the same functions we use to save and restore ZA. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-sme2-v4-10-f2fa0aef982f@kernel.org Signed-off-by: Catalin Marinas commit d6138b4adc70729404efeb0133bc9f6e9ad78d03 Author: Mark Brown Date: Mon Jan 16 16:04:44 2023 +0000 arm64/sme: Provide storage for ZT0 When the system supports SME2 there is an additional register ZT0 which we must store when the task is using SME. Since ZT0 is accessible only when PSTATE.ZA is set just like ZA we allocate storage for it along with ZA, increasing the allocation size for the memory region where we store ZA and storing the data for ZT after that for ZA. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-sme2-v4-9-f2fa0aef982f@kernel.org Signed-off-by: Catalin Marinas commit d4913eee152d3ffaf9a1e70073bc15e773625685 Author: Mark Brown Date: Mon Jan 16 16:04:43 2023 +0000 arm64/sme: Add basic enumeration for SME2 Add basic feature detection for SME2, detecting that the feature is present and disabling traps for ZT0. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-sme2-v4-8-f2fa0aef982f@kernel.org Signed-off-by: Catalin Marinas commit f122576f35336820259a79847e408b9f807eba15 Author: Mark Brown Date: Mon Jan 16 16:04:42 2023 +0000 arm64/sme: Enable host kernel to access ZT0 The new register ZT0 introduced by SME2 comes with a new trap, disable it for the host kernel so that we can implement support for it. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-sme2-v4-7-f2fa0aef982f@kernel.org Signed-off-by: Catalin Marinas commit 2cdeecdb95134cc0abc76626a59c94073cda8a47 Author: Mark Brown Date: Mon Jan 16 16:04:41 2023 +0000 arm64/sme: Manually encode ZT0 load and store instructions In order to avoid unrealistic toolchain requirements we manually encode the instructions for loading and storing ZT0. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-sme2-v4-6-f2fa0aef982f@kernel.org Signed-off-by: Catalin Marinas commit 8ef55603b8eaf9362464b3197eb139baa4bd18b9 Author: Mark Brown Date: Mon Jan 16 16:04:40 2023 +0000 arm64/esr: Document ISS for ZT0 being disabled SME2 defines a new ISS code for use when trapping acesses to ZT0, add a definition for it. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-sme2-v4-5-f2fa0aef982f@kernel.org Signed-off-by: Catalin Marinas commit 4edc11744e8cfe9f6d38fe3f656e949c6918bdd2 Author: Mark Brown Date: Mon Jan 16 16:04:39 2023 +0000 arm64/sme: Document SME 2 and SME 2.1 ABI As well as a number of simple features which only add new instructions and require corresponding hwcaps SME2 introduces a new register ZT0 for which we must define ABI. Fortunately this is a fixed size 512 bits and therefore much more straightforward than the base SME state, the only wrinkle is that it is only accessible when ZA is accessible. While there is only a single register the architecture is written with a view to exensibility, including a number in the name, so follow this in the ABI. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-sme2-v4-4-f2fa0aef982f@kernel.org Signed-off-by: Catalin Marinas commit 0f3bbe0edf788f1d43400a68a84eb37c9f13dfa5 Author: Mark Brown Date: Mon Jan 16 16:04:38 2023 +0000 arm64/sysreg: Update system registers for SME 2 and 2.1 FEAT_SME2 and FEAT_SME2P1 introduce several new SME features which can be enumerated via ID_AA64SMFR0_EL1 and a new register ZT0 access to which is controlled via SMCR_ELn, add the relevant register description. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-sme2-v4-3-f2fa0aef982f@kernel.org Signed-off-by: Catalin Marinas commit 6dabf1fac6b48d256b1d78b81c9356a88df26d2f Author: Mark Brown Date: Mon Jan 16 16:04:37 2023 +0000 arm64: Document boot requirements for SME 2 SME 2 introduces the new ZT0 register, we require that access to this reigster is not trapped when we identify that the feature is supported. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-sme2-v4-2-f2fa0aef982f@kernel.org Signed-off-by: Catalin Marinas commit ce514000da4f4b5f850f3339f805471e5c5c1caf Author: Mark Brown Date: Mon Jan 16 16:04:36 2023 +0000 arm64/sme: Rename za_state to sme_state In preparation for adding support for storage for ZT0 to the thread_struct rename za_state to sme_state. Since ZT0 is accessible when PSTATE.ZA is set just like ZA itself we will extend the allocation done for ZA to cover it, avoiding the need to further expand task_struct for non-SME tasks. No functional changes. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-sme2-v4-1-f2fa0aef982f@kernel.org Signed-off-by: Catalin Marinas commit 96b45776995653a4971329c7f62ff6aa324027a2 Author: Maciej W. Rozycki Date: Sun Jan 8 21:56:56 2023 +0000 parport_pc: Limit the number of PCI BAR pairs to 2 Decrease the number of PCI BAR pair slots allocated for port subdrivers from 4 to 2 as none wants more than 2 at this time, reducing the memory footprint a little. No functional change. Signed-off-by: Maciej W. Rozycki Signed-off-by: Sudip Mukherjee Link: https://lore.kernel.org/r/20230108215656.6433-7-sudipm.mukherjee@gmail.com Signed-off-by: Greg Kroah-Hartman commit c087df8d1e7dc2e764d11234d84b5af46d500f16 Author: Maciej W. Rozycki Date: Sun Jan 8 21:56:55 2023 +0000 parport_pc: Set up mode and ECR masks for Oxford Semiconductor devices No Oxford Semiconductor PCI or PCIe parallel port device supports the Parallel Port FIFO mode. All support the PS/2 Parallel Port mode and the Enhanced Parallel Port mode via the ECR register. The original 5V PCI OX16PCI954 device does not support the Extended Capabilities Port mode, the Test mode or the Configuration mode, but all the other OxSemi devices do, including in particular the 3.3V PCI OXmPCI954 device and the universal voltage PCI OXuPCI954 device. All the unsupported modes are marked reserved in the relevant datasheets. Accordingly enable the `base_hi' BAR for the 954 devices to enable PS2 and EPP mode support via the ECR register, however mask the COMPAT mode and, until we have a way to determine what chip variant it is that we poke at, also the ECP mode, and mask the COMPAT mode only for all the remaining OxSemi devices, fixing errors like: parport0: FIFO is stuck FIFO write timed out and a non-functional port when the Parallel Port FIFO mode is selected. Complementing the fix apply an ECR mask for all these devices, which are documented to only permit writing to the mode field of the ECR register with a bit pattern of 00001 required to be written to bits 4:0 on mode field writes. No nFault or service interrupts are implemented, which will therefore never have to be enabled, though bit 2 does report the FIFO threshold status to be polled for in the ECP mode where supported. We have a documented case of writing 1 to bit 2 causing a lock-up with at least one OX12PCI840 device (from old drivers/parport/ChangeLog): 2001-10-10 Tim Waugh * parport_pc.c: Support for OX12PCI840 PCI card (reported by mk@daveg.com). Lock-ups diagnosed by Ronnie Arosa (and now we just don't trust its ECR). which commit adbd321a17cc ("parport_pc: add base_hi BAR for oxsemi_840") must have broken and by applying an ECR mask here we prevent the lock-up from triggering. This could have been the reason for requiring 00001 to be written to bits 4:0 of ECR. Update the inline comment accordingly; it has come from Linux 2.4.12 back in 2001 and predates the introduction of OXmPCI954 and OXuPCI954 devices that do support ECP. References: [1] "OX16PCI954 Integrated Quad UART and PCI interface", Oxford Semiconductor Ltd., Data Sheet Revision 1.3, Feb. 1999, Chapter 9 "Bidirectional Parallel Port", pp. 53-55 [2] "OX16PCI952 Data Sheet, Integrated High Performance Dual UARTs, Parallel Port and 5.0v PCI interface", Oxford Semiconductor Ltd., DS_B008A_00, Datasheet rev 1.1, June 2001, Chapter 8 "Bi-directional Parallel Port", pp. 52-56 [3] "OXmPCI954 DATA SHEET Integrated High Performance Quad UARTs, 8-bit Local Bus/Parallel Port. 3.3v PCI/miniPCI interface.", Oxford Semiconductor Ltd., DS-0019, June 2005, Chapter 10 "Bidirectional Parallel Port", pp. 86-90 [4] "OXmPCI952 Data Sheet, Integrated High Performance Dual UARTs, 8-bit Local Bus/Parallel Port. 3.3v PCI/miniPCI interface.", Oxford Semiconductor Ltd., DS-0020, June 2005, Chapter 8 "Bidirectional Parallel Port", pp. 73-77 [5] "OX12PCI840 Integrated Parallel Port and PCI interface", Oxford Semiconductor Ltd., DS-0021, Jun 2005, Chapter 5 "Bi-directional Parallel Port", pp. 18-21 [6] "OXPCIe952 PCI Express Bridge to Dual Serial & Parallel Port", Oxford Semiconductor, Inc., DS-0046, Mar 06 08, Chapter "Parallel Port Function", pp. 59-62 [7] "OXPCIe840 PCI Express Bridge to Parallel Port", Oxford Semiconductor, Inc., DS-0049, Mar 06 08, Chapter "Parallel Port Function", pp. 15-18 [8] "OXuPCI954 Data Sheet, Integrated High Performance Quad UARTs, 8-bit Local Bus/Parallel Port, 3.3 V and 5 V (Universal Voltage) PCI Interface.", Oxford Semiconductor, Inc., DS-0058, 26 Jan 2009, Chapter 8 "Bidirectional Parallel Port", pp. 62-65 [9] "OXuPCI952 Data Sheet, Integrated High Performance Dual UARTs, 8-bit Local Bus/Parallel Port, 3.3 V and 5.0 V Universal Voltage PCI Interface.", Oxford Semiconductor, Inc., DS-0059, Sep 2007, Chapter 8 "Bidirectional Parallel Port", pp. 61-64 Signed-off-by: Maciej W. Rozycki Signed-off-by: Sudip Mukherjee Link: https://lore.kernel.org/r/20230108215656.6433-6-sudipm.mukherjee@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5f88cf276e880df7b6e9abc301eef214aa74bf53 Author: Maciej W. Rozycki Date: Sun Jan 8 21:56:54 2023 +0000 parport_pc: Add an ECR mask field for PCI devices Add a bitmask field specifying writable ECR bits for PCI devices and apply it via `__parport_pc_probe_port'. Signed-off-by: Maciej W. Rozycki Signed-off-by: Sudip Mukherjee Link: https://lore.kernel.org/r/20230108215656.6433-5-sudipm.mukherjee@gmail.com Signed-off-by: Greg Kroah-Hartman commit 69e82463109f05979ff0e7fcf033caa6e7134abb Author: Maciej W. Rozycki Date: Sun Jan 8 21:56:53 2023 +0000 parport_pc: Add a mode mask field for PCI devices Add a mode mask field for PCI devices and use `__parport_pc_probe_port' in place of `parport_pc_probe_port' to apply it. Signed-off-by: Maciej W. Rozycki Signed-off-by: Sudip Mukherjee Link: https://lore.kernel.org/r/20230108215656.6433-4-sudipm.mukherjee@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6640727fc55b7f0b561e927bc9c5b9d4c459fd8e Author: Maciej W. Rozycki Date: Sun Jan 8 21:56:52 2023 +0000 parport_pc: Let chipset drivers mask ECR bits on writes Provide an `ecr_writable' parameter to `__parport_pc_probe_port' so that callers can specify a mask of bits to modify on ECR writes. To avoid the need for separate bit set and bit clear masks always set bit 0 whenever a non-zero mask has been set, as all the currently known cases where a mask is required, that is Oxford Semiconductor devices, do require this bit to be set. If further cases are discovered where the bit is required to be clear, we can update code accordingly, but chances are very low as the bit is supposed to be read-only[1]. Skip ECR probing, which can be problematic as the Oxford Semiconductor OX12PCI840 part has been reported to lock up on setting bit 2, whenever a non-zero mask has been requested by a port subdriver, assuming that the ECR must be there if the subdriver has requested a specific way to access it. References: [1] "Extended Capabilities Port Protocol and ISA Interface Standard", Microsoft Corporation, Revision: 1.14, July 14, 1993, Table 14 "Extended Control Register" Signed-off-by: Maciej W. Rozycki Signed-off-by: Sudip Mukherjee Link: https://lore.kernel.org/r/20230108215656.6433-3-sudipm.mukherjee@gmail.com Signed-off-by: Greg Kroah-Hartman commit f01dda1cb85e14a1d51c3cedad0feaaf71a93b4b Author: Maciej W. Rozycki Date: Sun Jan 8 21:56:51 2023 +0000 parport_pc: Let chipset drivers mask unsupported modes Rename `parport_pc_probe_port' to `__parport_pc_probe_port' and add a `mode_mask' parameter so that callers can specify a mask of unsupported modes to exclude even if mode probing seems to indicate otherwise. Add a `parport_pc_probe_port' wrapper with an implicit mask of 0 for the current callers to use. No functional change at this point, but the configuration of data write handlers is now no longer intertwined with determination and reporting of available modes. Signed-off-by: Maciej W. Rozycki Signed-off-by: Sudip Mukherjee Link: https://lore.kernel.org/r/20230108215656.6433-2-sudipm.mukherjee@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1c4b7d967e8a18c18ef8ef6354395d4f96a10f0e Author: Maciej W. Rozycki Date: Sun Jan 8 21:56:50 2023 +0000 parport_pc: Remove stale `parport_pc_ecp_read_block_pio' reference Complement commit 991214386dee ("parport: remove unused dead code from lowlevel drivers") and remove a stale piece of commented-out code that refers to a function removed with said commit. Signed-off-by: Maciej W. Rozycki Signed-off-by: Sudip Mukherjee Link: https://lore.kernel.org/r/20230108215656.6433-1-sudipm.mukherjee@gmail.com Signed-off-by: Greg Kroah-Hartman commit c45839309c3db95b0df01fd164db10aca615c979 Author: Liu Ying Date: Mon Dec 26 11:14:17 2022 +0800 drivers: bus: simple-pm-bus: Use clocks Simple Power-Managed bus controller may need functional clock(s) to be enabled before child devices connected to the bus can be accessed. Get the clock(s) as a bulk and enable/disable the clock(s) when the bus is being power managed. One example is that Freescale i.MX8qxp pixel link MSI bus controller needs MSI clock and AHB clock to be enabled before accessing child devices. Signed-off-by: Liu Ying Tested-by: Maxim Kochetkov Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20221226031417.1056745-1-victor.liu@nxp.com Signed-off-by: Greg Kroah-Hartman commit 7d12970f1746d47155f97113ac48b81fd8af8640 Author: Colin Ian King Date: Tue Nov 29 22:38:55 2022 +0000 firmware: dmi-sysfs: make pr_info messages rate limited Currently if a process repeat repeatedly reads the dmi sysfs raw event log /sys/firmware/dmi/entries/15-0/system_event_log/raw_event_log when GPNV support is missing or using an unknown access method the kernel log gets spammed with info messages. Make the messages rate limited to reduce the message spamming. Triggered when running sudo stress-ng --sysfs -t 5m. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221129223855.1005674-1-colin.i.king@gmail.com Signed-off-by: Greg Kroah-Hartman commit 11819ed2b70da94acc41fec34178a011c4d3d25d Author: Christophe JAILLET Date: Fri Nov 25 18:45:02 2022 +0100 misc: fastrpc: Fix an error handling path in fastrpc_rpmsg_probe() If of_platform_populate() fails, some resources need to be freed as already done in the other error handling paths. Fixes: 278d56f970ae ("misc: fastrpc: Reference count channel context") Fixes: 3abe3ab3cdab ("misc: fastrpc: add secure domain support") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/b909d2f3273b794ea0f1f78d14bc24affb08ea5f.1669398274.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 895ae5bee159d148bac21a82899292c408c1aab1 Author: Appana Durga Kedareswara rao Date: Fri Nov 25 11:11:13 2022 +0530 drivers: misc: Add Support for TMR Inject IP The Triple Modular Redundancy(TMR) provides functional fault injection by changing selected MicroBlaze instructions, which provides the possibility to verify that the TMR subsystem error detection and fault recovery logic is working properly. Usage: echo 1 > /sys/kernel/debug/xtmr_inject/inject_fault/inject_fault Signed-off-by: Appana Durga Kedareswara rao Link: https://lore.kernel.org/r/20221125054113.122833-5-appana.durga.kedareswara.rao@amd.com Signed-off-by: Greg Kroah-Hartman commit 859584726a842e459fbd5ee3bfb99e5250b4edc7 Author: Appana Durga Kedareswara rao Date: Fri Nov 25 11:11:12 2022 +0530 dt-bindings: misc: tmr-inject: Add device-tree binding for TMR Inject The Triple Modular Redundancy(TMR) Inject core provides functional fault injection by changing selected MicroBlaze instructions, which provides the possibility to verify that the TMR subsystem error detection and fault recovery logic is working properly. Signed-off-by: Appana Durga Kedareswara rao Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221125054113.122833-4-appana.durga.kedareswara.rao@amd.com Signed-off-by: Greg Kroah-Hartman commit f5ec7f54fdba7fef051c65e975612edf46d4934d Author: Appana Durga Kedareswara rao Date: Fri Nov 25 11:11:11 2022 +0530 drivers: misc: Add Support for TMR Manager Triple Modular Redundancy(TMR) subsystem contains three microblaze cores, subsystem is fault-tolerant and continues to operate nominally after encountering an error. Together with the capability to detect and recover from errors, the implementation ensures the reliability of the entire subsystem. TMR Manager is responsible for performing recovery of the subsystem detects the fault via a break signal it invokes microblaze software break handler which calls the tmr manager driver api to update the error count and status, added support for fault detection feature via sysfs interface. Usage: To know the break handler count(Error count): cat /sys/devices/platform/amba_pl/44a10000.tmr_manager/errcnt Signed-off-by: Appana Durga Kedareswara rao Link: https://lore.kernel.org/r/20221125054113.122833-3-appana.durga.kedareswara.rao@amd.com Signed-off-by: Greg Kroah-Hartman commit fc4d041e947b2b12fe0972781b4577a7d2647bfa Author: Appana Durga Kedareswara rao Date: Fri Nov 25 11:11:10 2022 +0530 dt-bindings: misc: tmr-manager: Add device-tree binding for TMR Manager Triple Modular Redundancy(TMR) subsystem contains three microblaze cores, subsystem is fault-tolerant and continues to operate nominally after encountering an error. Together with the capability to detect and recover from errors, the implementation ensures the reliability of the entire subsystem. TMR Manager is responsible for performing recovery of the subsystem detects the fault via a break signal it invokes microblaze software break handler which calls the tmr manager driver api to update the error count and status. Signed-off-by: Appana Durga Kedareswara rao Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221125054113.122833-2-appana.durga.kedareswara.rao@amd.com Signed-off-by: Greg Kroah-Hartman commit c7109c72ab92dd6934b9ff8d45cb7e86f7a7ba0d Author: Bo Liu Date: Tue Jan 17 20:29:44 2023 -0500 virtio_console: 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: Bo Liu Link: https://lore.kernel.org/r/20230118012944.2436-1-liubo03@inspur.com Signed-off-by: Greg Kroah-Hartman commit c6e29fe5e08ce177b8a1a77aa99c59da2f166044 Author: XU pengfei Date: Tue Jan 10 18:16:14 2023 +0800 ipack: ipoctal: remove unnecessary (void*) conversions arg is a void * type and does not require a cast. Signed-off-by: XU pengfei Link: https://lore.kernel.org/r/20230110101613.4519-1-xupengfei@nfschina.com Signed-off-by: Greg Kroah-Hartman commit 512ba04d8211dd1a54dd36adc3ecc527a28069c5 Author: Andy Shevchenko Date: Wed Dec 28 18:05:00 2022 +0200 misc/mei/hdcp: Use correct macros to initialize uuid_le GUID_INIT() is for internal guid_t type and shouldn't be used for the uuid_le. I.o.w. relying on the implementation details is layering violation. Use correct macros to initialize uuid_le. Fixes: 64e9bbdd9588 ("misc/mei/hdcp: Client driver for HDCP application") Signed-off-by: Andy Shevchenko Acked-by: Tomas Winkler Link: https://lore.kernel.org/r/20221228160500.21220-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 503b676dde2780330c90a10b37a844686601a784 Author: Andy Shevchenko Date: Wed Dec 28 18:05:58 2022 +0200 mei: pxp: Use correct macros to initialize uuid_le GUID_INIT() is for internal guid_t type and shouldn't be used for the uuid_le. I.o.w. relying on the implementation details is layering violation. Use correct macros to initialize uuid_le. Fixes: c2004ce99ed7 ("mei: pxp: export pavp client to me client bus") Signed-off-by: Andy Shevchenko Acked-by: Tomas Winkler Link: https://lore.kernel.org/r/20221228160558.21311-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit be4fddaeaf183a30f613834011de81b7d273a456 Author: Li kunyu Date: Fri Dec 16 13:59:10 2022 +0800 sgi-gru: grukservices: remove unnecessary (void*) conversions void * pointer cb, no cast type assignment required. Signed-off-by: Li kunyu Link: https://lore.kernel.org/r/20221216055910.3559-1-kunyu@nfschina.com Signed-off-by: Greg Kroah-Hartman commit f5b29c7a4df1dafd79ee7c0b1084b75afbe0ff60 Author: Miaoqian Lin Date: Thu Dec 15 13:08:04 2022 +0400 misc: enclosure: Fix doc for enclosure_find() We should use put_device() to release the reference. Fixes: ee959b00c335 ("SCSI: convert struct class_device to struct device") Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20221215090804.473022-1-linmq006@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4b8659e2c258e4fdac9ccdf06cc20c0677894ef9 Author: Alexander Usyskin Date: Mon Dec 12 23:49:33 2022 +0200 mei: bus-fixup:upon error print return values of send and receive For easier debugging, upon error, print also return values from __mei_cl_recv() and __mei_cl_send() functions. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20221212214933.275434-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit be5852457b7e85ad13b1bded9c97bed5ee1715a3 Author: Krzysztof Kozlowski Date: Fri Jan 20 08:56:51 2023 +0100 spi: spidev: order compatibles alphabetically Bring some order to reduce possibilities of conflicts. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230120075651.153763-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 3e50b639628332f7d79e1ce97e354d065ca3e0e2 Author: Colin Ian King Date: Wed Dec 7 09:52:02 2022 +0000 accessibility: speakup: Fix spelling mistake "thw" -> "the" There is a spelling mistake in the module parameter description for say_word_ctl and an extra space. Fix the spelling mistake and remove the extraneous space. Signed-off-by: Colin Ian King Reviewed-by: Samuel Thibault Link: https://lore.kernel.org/r/20221207095202.2282567-1-colin.i.king@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1a726cb47fd204109c767409fa9ca15a96328f14 Author: George Kennedy Date: Mon Nov 28 15:18:25 2022 -0500 VMCI: check context->notify_page after call to get_user_pages_fast() to avoid GPF The call to get_user_pages_fast() in vmci_host_setup_notify() can return NULL context->notify_page causing a GPF. To avoid GPF check if context->notify_page == NULL and return error if so. general protection fault, probably for non-canonical address 0xe0009d1000000060: 0000 [#1] PREEMPT SMP KASAN NOPTI KASAN: maybe wild-memory-access in range [0x0005088000000300- 0x0005088000000307] CPU: 2 PID: 26180 Comm: repro_34802241 Not tainted 6.1.0-rc4 #1 Hardware name: Red Hat KVM, BIOS 1.15.0-2.module+el8.6.0 04/01/2014 RIP: 0010:vmci_ctx_check_signal_notify+0x91/0xe0 Call Trace: vmci_host_unlocked_ioctl+0x362/0x1f40 __x64_sys_ioctl+0x1a1/0x230 do_syscall_64+0x3a/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd Fixes: a1d88436d53a ("VMCI: Fix two UVA mapping bugs") Reported-by: syzkaller Signed-off-by: George Kennedy Reviewed-by: Vishnu Dasa Link: https://lore.kernel.org/r/1669666705-24012-1-git-send-email-george.kennedy@oracle.com Signed-off-by: Greg Kroah-Hartman commit aafe9375b386010e28614f58499d199250a16874 Author: Arnd Bergmann Date: Wed Jan 18 17:10:48 2023 +0100 ASoC: ux500: remove stedma40 references ux500_pcm_request_chan() is never called because the dma channels are already set up from DT. Remove this, along with the ux500_msp_dma_params structure. Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230118161110.521504-4-arnd@kernel.org Signed-off-by: Mark Brown commit 1766ac5248063c25d1fe46e04bb936c46313ed89 Author: Arnd Bergmann Date: Wed Jan 18 17:10:47 2023 +0100 ASoC: ux500: remove platform_data support The platform data definition for ux500 sound devices was removed six years ago after the DT conversion was completed, see commit 4b483ed0be8b ("ARM: ux500: cut some platform data"). Remove some leftover bits in the ASoC driver and just assume that it always gets probed using DT. Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230118161110.521504-3-arnd@kernel.org Signed-off-by: Mark Brown commit d66a4c20ae55ac88136b4a3befd944c093ffa677 Author: Yang Yingliang Date: Tue Nov 29 10:36:02 2022 -0600 firmware: stratix10-svc: fix error handle while alloc/add device failed If add device "stratix10-rsu" failed in stratix10_svc_drv_probe(), the 'svc_fifo' and 'genpool' need be freed in the error path. If allocate or add device "intel-fcs" failed in stratix10_svc_drv_probe(), the device "stratix10-rsu" need be unregistered in the error path. Fixes: e6281c26674e ("firmware: stratix10-svc: Add support for FCS") Signed-off-by: Yang Yingliang Signed-off-by: Dinh Nguyen Link: https://lore.kernel.org/r/20221129163602.462369-2-dinguyen@kernel.org Signed-off-by: Greg Kroah-Hartman commit 9175ee1a99d57ec07d66ff572e1d5a724477ab37 Author: Yang Yingliang Date: Tue Nov 29 10:36:01 2022 -0600 firmware: stratix10-svc: add missing gen_pool_destroy() in stratix10_svc_drv_probe() In error path in stratix10_svc_drv_probe(), gen_pool_destroy() should be called to destroy the memory pool that created by svc_create_memory_pool(). Fixes: 7ca5ce896524 ("firmware: add Intel Stratix10 service layer driver") Signed-off-by: Yang Yingliang Signed-off-by: Dinh Nguyen Link: https://lore.kernel.org/r/20221129163602.462369-1-dinguyen@kernel.org Signed-off-by: Greg Kroah-Hartman commit ce4273d89c52167d6fe20572136c58117eae0657 Author: Xiongfeng Wang Date: Tue Nov 22 19:40:35 2022 +0800 applicom: Fix PCI device refcount leak in applicom_init() As comment of pci_get_class() says, it returns a pci_device with its refcount increased and decreased the refcount for the input parameter @from if it is not NULL. If we break the loop in applicom_init() with 'dev' not NULL, we need to call pci_dev_put() to decrease the refcount. Add the missing pci_dev_put() to avoid refcount leak. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Xiongfeng Wang Link: https://lore.kernel.org/r/20221122114035.24194-1-wangxiongfeng2@huawei.com Signed-off-by: Greg Kroah-Hartman commit 7860701d1e6e6e048960567d4767d93d693d6faa Author: Cristian Marussi Date: Wed Jan 18 12:14:26 2023 +0000 firmware: arm_scmi: Add per-channel raw injection support On a system configured with multiple transport channels, expose a few additional debugfs per-channel entries to allow a user to explicitly select which transport channel to use for the SCMI message injection. Signed-off-by: Cristian Marussi Tested-by: Florian Fainelli Tested-by: Vincent Guittot Link: https://lore.kernel.org/r/20230118121426.492864-18-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 9c54633e4e3d004c416ad680d6b0f73c2ac6f018 Author: Cristian Marussi Date: Wed Jan 18 12:14:25 2023 +0000 firmware: arm_scmi: Add the raw mode co-existence support When the raw support is enabled and configured in co-existence mode the normal SCMI drivers are allowed to register with the SCMI core and operate as usual alongside the raw operations. SCMI normal and raw messages will be kept segregated from each other, but only at the transaction level. Any further possible interference at the protocol layer will have instead to be handled by the user to attain reliable results while using the raw transactions. Signed-off-by: Cristian Marussi Tested-by: Florian Fainelli Tested-by: Vincent Guittot Link: https://lore.kernel.org/r/20230118121426.492864-17-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 7063887b538602710cdcc19fbcd78385cbab8791 Author: Cristian Marussi Date: Wed Jan 18 12:14:24 2023 +0000 firmware: arm_scmi: Call raw mode hooks from the core stack Add a few call sites where, if SCMI raw mode access had been enabled in Kconfig, the needed SCMI raw initialization and hooks are called. Signed-off-by: Cristian Marussi Tested-by: Florian Fainelli Tested-by: Vincent Guittot Link: https://lore.kernel.org/r/20230118121426.492864-16-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit ba80acb0dfca87e6a6257932414350da85dde48f Author: Cristian Marussi Date: Wed Jan 18 12:14:23 2023 +0000 firmware: arm_scmi: Reject SCMI drivers when configured in raw mode Reject SCMI driver registration when SCMI raw mode support is configured, so as to avoid interferences between the SCMI raw mode transactions and the normal SCMI stack operations. Signed-off-by: Cristian Marussi Tested-by: Florian Fainelli Tested-by: Vincent Guittot Link: https://lore.kernel.org/r/20230118121426.492864-15-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 74225707b3349d52e6b99a2e15185b5db8126637 Author: Cristian Marussi Date: Wed Jan 18 12:14:22 2023 +0000 firmware: arm_scmi: Add debugfs ABI documentation for raw mode Add description of the debugfs SCMI raw mode ABI. Signed-off-by: Cristian Marussi Tested-by: Florian Fainelli Tested-by: Vincent Guittot Link: https://lore.kernel.org/r/20230118121426.492864-14-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 3c3d818a9317a5f8ff7fb4547b2d6d5bcc39137d Author: Cristian Marussi Date: Wed Jan 18 12:14:21 2023 +0000 firmware: arm_scmi: Add core raw transmission support Add SCMI raw mode support which exposes a userspace interface to allow for bare SCMI command injection and snooping from userspace. Signed-off-by: Cristian Marussi Tested-by: Florian Fainelli Tested-by: Vincent Guittot Link: https://lore.kernel.org/r/20230118121426.492864-13-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 0f62ed0092ec468f48847897738dfafa8b941991 Author: Cristian Marussi Date: Wed Jan 18 12:14:20 2023 +0000 firmware: arm_scmi: Add debugfs ABI documentation for common entries Add description of the debugfs SCMI common ABI. Signed-off-by: Cristian Marussi Tested-by: Florian Fainelli Tested-by: Vincent Guittot Link: https://lore.kernel.org/r/20230118121426.492864-12-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit c3d4aed763ce4a39f8ed36c7b7cd9a6a35971329 Author: Cristian Marussi Date: Wed Jan 18 12:14:19 2023 +0000 firmware: arm_scmi: Populate a common SCMI debugfs root Create a common SCMI debugfs root directory and populate it with some common SCMI data for each discovered SCMI platform instance if SCMI debugfs is needed by any configured SCMI facility. Signed-off-by: Cristian Marussi Tested-by: Florian Fainelli Tested-by: Vincent Guittot Link: https://lore.kernel.org/r/20230118121426.492864-11-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit d60b59b9679539be7df0a37143c546b7ad385c09 Author: Cristian Marussi Date: Wed Jan 18 12:14:18 2023 +0000 debugfs: Export debugfs_create_str symbol Needed by SCMI Raw mode support when compiled as a loadable module. Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Signed-off-by: Cristian Marussi Tested-by: Florian Fainelli Tested-by: Vincent Guittot Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20230118121426.492864-10-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 8b2bd71119dd0f5ec0b8d857670863d342767d85 Author: Cristian Marussi Date: Wed Jan 18 12:14:17 2023 +0000 include: trace: Add platform and channel instance references Add the channel and platform instance indentifier to SCMI message dump traces in order to easily associate message flows to specific transport channels. Signed-off-by: Cristian Marussi Tested-by: Florian Fainelli Tested-by: Vincent Guittot Link: https://lore.kernel.org/r/20230118121426.492864-9-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 75c86dc72dc80604e5e50fabb3c0cadee8c6087a Author: Cristian Marussi Date: Wed Jan 18 12:14:16 2023 +0000 firmware: arm_scmi: Add internal platform/channel identifiers Add a couple of unique identifiers to channel and platform instance descriptors in order to emit more descriptive message dump traces. Signed-off-by: Cristian Marussi Tested-by: Florian Fainelli Tested-by: Vincent Guittot Link: https://lore.kernel.org/r/20230118121426.492864-8-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 936a2b91c2e8ac9570e080e654bf53f799cbc028 Author: Cristian Marussi Date: Wed Jan 18 12:14:15 2023 +0000 firmware: arm_scmi: Move errors defs and code to common.h Move SCMI error codes definitions and helper to the common.h header together with the delayed response timeout define. No functional change. Signed-off-by: Cristian Marussi Tested-by: Florian Fainelli Tested-by: Vincent Guittot Link: https://lore.kernel.org/r/20230118121426.492864-7-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 3095a3e25d8f7d2cfa783aff51b3126c4c728109 Author: Cristian Marussi Date: Wed Jan 18 12:14:14 2023 +0000 firmware: arm_scmi: Add xfer helpers to provide raw access Add a few SCMI helpers useful to implement SCMI raw access support. Signed-off-by: Cristian Marussi Tested-by: Florian Fainelli Tested-by: Vincent Guittot Link: https://lore.kernel.org/r/20230118121426.492864-6-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 37057bf2b509b6a2bff0ffe7a3d838a945c6a170 Author: Cristian Marussi Date: Wed Jan 18 12:14:13 2023 +0000 firmware: arm_scmi: Add flags field to xfer Add a 'flags' field to xfer and define a flagbit and related macro to easily identify xfers originated from the raw transmissions. Signed-off-by: Cristian Marussi Tested-by: Florian Fainelli Tested-by: Vincent Guittot Link: https://lore.kernel.org/r/20230118121426.492864-5-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 07cdfc44f1a40652cbf349d279dd916b13197624 Author: Cristian Marussi Date: Wed Jan 18 12:14:12 2023 +0000 firmware: arm_scmi: Refactor scmi_wait_for_message_response Refactor scmi_wait_for_message_response() to use a internal helper to carry out its main duties; while doing that make it accept directly an scmi_desc parameter to interact with the configured transport. No functional change. Signed-off-by: Cristian Marussi Tested-by: Florian Fainelli Tested-by: Vincent Guittot Link: https://lore.kernel.org/r/20230118121426.492864-4-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit f21c2b0ba8f3e70e1d5f11842ec1de66aaa35809 Author: Cristian Marussi Date: Wed Jan 18 12:14:11 2023 +0000 firmware: arm_scmi: Refactor polling helpers Refactor polling helpers to receive scmi_desc directly as a parameter and move all of them to common.h. No functional change. Signed-off-by: Cristian Marussi Tested-by: Florian Fainelli Tested-by: Vincent Guittot Link: https://lore.kernel.org/r/20230118121426.492864-3-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit b0e924a955cb9e9da759a7a2940f35679864222f Author: Cristian Marussi Date: Wed Jan 18 12:14:10 2023 +0000 firmware: arm_scmi: Refactor xfer in-flight registration routines Move the whole xfer in-flight registration process out of scmi_xfer_get and while at that, split the sequence number selection steps from the in-flight registration procedure itself. No functional change. Signed-off-by: Cristian Marussi Tested-by: Florian Fainelli Tested-by: Vincent Guittot Link: https://lore.kernel.org/r/20230118121426.492864-2-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 758d638667d474ff6b0a9052a8298f04c7ddf62f Author: Mao Jinlong Date: Tue Jan 17 06:57:07 2023 -0800 Documentation: trace: Add documentation for TPDM and TPDA Add documentation for the TPDM and TPDA under trace/coresight. Signed-off-by: Mao Jinlong Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230117145708.16739-9-quic_jinlmao@quicinc.com commit a8fbe1442c2bb234aaa81501f2b08e861790f639 Author: Mao Jinlong Date: Tue Jan 17 06:57:06 2023 -0800 dt-bindings: arm: Adds CoreSight TPDA hardware definitions Adds new coresight-tpda.yaml file describing the bindings required to define tpda in the device trees. Acked-by: Suzuki K Poulose Reviewed-by: Rob Herring Reviewed-by: Mike Leach Signed-off-by: Tao Zhang Signed-off-by: Mao Jinlong Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230117145708.16739-8-quic_jinlmao@quicinc.com commit 5b7916625c017ef1bbea4092835740f9161ab7c9 Author: Mao Jinlong Date: Tue Jan 17 06:57:05 2023 -0800 Coresight: Add TPDA link driver TPDA(Trace, Profiling and Diagnostics Aggregator) is to provide packetization, funneling and timestamping of TPDM data. Multiple monitors are connected to different input ports of TPDA.This change is to add tpda enable/disable/probe functions for coresight tpda driver. - - - - - - - - - - - - | TPDM 0| | TPDM 1 | | TPDM 2| - - - - - - - - - - - - | | | |_ _ _ _ _ _ | _ _ _ _ | | | | | | | ------------------ | TPDA | ------------------ Reviewed-by: Suzuki K Poulose Signed-off-by: Tao Zhang Signed-off-by: Mao Jinlong Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230120095301.30792-2-quic_jinlmao@quicinc.com commit 436cca9a2c0f05a3802a6a5a7c6849853590f919 Author: Mao Jinlong Date: Tue Jan 17 06:57:04 2023 -0800 coresight-tpdm: Add integration test support Integration test for tpdm can help to generate the data for verification of the topology during TPDM software bring up. Sample: echo 1 > /sys/bus/coresight/devices/tmc_etf0/enable_sink echo 1 > /sys/bus/coresight/devices/tpdm0/enable_source echo 1 > /sys/bus/coresight/devices/tpdm0/integration_test echo 2 > /sys/bus/coresight/devices/tpdm0/integration_test cat /dev/tmc_etf0 > /data/etf-tpdm0.bin Reviewed-by: Suzuki K Poulose Signed-off-by: Tao Zhang Signed-off-by: Mao Jinlong Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230117145708.16739-6-quic_jinlmao@quicinc.com commit 1f00465d7fc742543ebc096879bddc01ee4a5993 Author: Mao Jinlong Date: Tue Jan 17 06:57:03 2023 -0800 coresight-tpdm: Add DSB dataset support TPDM serves as data collection component for various dataset types. DSB(Discrete Single Bit) is one of the dataset types. DSB subunit can be enabled for data collection by writing 1 to the first bit of DSB_CR register. This change is to add enable/disable function for DSB dataset by writing DSB_CR register. Reviewed-by: Suzuki K Poulose Signed-off-by: Tao Zhang Signed-off-by: Mao Jinlong Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230117145708.16739-5-quic_jinlmao@quicinc.com commit 6c781a35133df1405302fe6c01c6754afdf61375 Author: Mao Jinlong Date: Tue Jan 17 06:57:02 2023 -0800 dt-bindings: arm: Add CoreSight TPDM hardware Add new coresight-tpdm.yaml file describing the bindings required to define tpdm in the device trees. Acked-by: Suzuki K Poulose Reviewed-by: Mike Leach Reviewed-by: Rob Herring Signed-off-by: Tao Zhang Signed-off-by: Mao Jinlong Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230117145708.16739-4-quic_jinlmao@quicinc.com commit b3c71626a9333b0b29f9921a39cef30b5961766f Author: Mao Jinlong Date: Tue Jan 17 06:57:01 2023 -0800 Coresight: Add coresight TPDM source driver Add driver to support Coresight device TPDM (Trace, Profiling and Diagnostics Monitor). TPDM is a monitor to collect data from different datasets. This change is to add probe/enable/disable functions for tpdm source. Signed-off-by: Tao Zhang Signed-off-by: Mao Jinlong Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230120095301.30792-1-quic_jinlmao@quicinc.com commit ba197fdea699adfd3bcb73a67ec0e74b59b9506d Merge: f5339209541f6 d52a6180c7466 Author: David S. Miller Date: Fri Jan 20 11:37:57 2023 +0000 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-01-19 (ice) This series contains updates to ice driver only. Tsotne and Anatolii implement new handling, and AdminQ command, for firmware LLDP, adding a pending notification to allow for proper cleanup between TC changes. Amritha extends support for drop action outside of switchdev. Siddaraju adjusts restriction for PTP HW clock adjustments. Ani removes an unneeded non-null check and improves reporting of some link modes to utilize more appropriate values. Jesse adds checks to ensure PF VSI type. Przemek combines duplicate checks of the same condition into one check. Tony makes various cleanups to code: removes comments for cppcheck suppressions, reduces scope of some variables, changes some return statements to reflect an explicit 0 return, matches naming for function declaration and definition, adds local variable for readability, and fixes indenting. Sergey separates DDP (Dynamic Device Personalization) code into its own file. ==================== Signed-off-by: David S. Miller commit 8d7eb8ed3f83f248e01a4f548d9c500a950a2c2d Author: Arnd Bergmann Date: Tue Jan 17 17:37:29 2023 +0100 drm/i915/selftest: fix intel_selftest_modify_policy argument types The definition of intel_selftest_modify_policy() does not match the declaration, as gcc-13 points out: drivers/gpu/drm/i915/selftests/intel_scheduler_helpers.c:29:5: error: conflicting types for 'intel_selftest_modify_policy' due to enum/integer mismatch; have 'int(struct intel_engine_cs *, struct intel_selftest_saved_policy *, u32)' {aka 'int(struct intel_engine_cs *, struct intel_selftest_saved_policy *, unsigned int)'} [-Werror=enum-int-mismatch] 29 | int intel_selftest_modify_policy(struct intel_engine_cs *engine, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/gpu/drm/i915/selftests/intel_scheduler_helpers.c:11: drivers/gpu/drm/i915/selftests/intel_scheduler_helpers.h:28:5: note: previous declaration of 'intel_selftest_modify_policy' with type 'int(struct intel_engine_cs *, struct intel_selftest_saved_policy *, enum selftest_scheduler_modify)' 28 | int intel_selftest_modify_policy(struct intel_engine_cs *engine, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ Change the type in the definition to match. Fixes: 617e87c05c72 ("drm/i915/selftest: Fix hangcheck self test for GuC submission") Signed-off-by: Arnd Bergmann Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20230117163743.1003219-1-arnd@kernel.org commit cd0ac51c5760d4eed4981be5de9cad0255976512 Author: Kai Ye Date: Sat Nov 19 07:48:17 2022 +0000 crypto: hisilicon/qm - define the device isolation strategy Define the device isolation strategy by the device driver. The user configures a hardware error threshold value by uacce interface. If the number of hardware errors exceeds the value of setting error threshold in one hour. The device will not be available in user space. The VF device use the PF device isolation strategy. All the hardware errors are processed by PF driver. Signed-off-by: Kai Ye Acked-by: Herbert Xu Link: https://lore.kernel.org/r/20221119074817.12063-4-yekai13@huawei.com Signed-off-by: Greg Kroah-Hartman commit f65ccb82f5987630f6f4439357a8cf4be8c3840f Author: Kai Ye Date: Sat Nov 19 07:48:16 2022 +0000 Documentation: add the device isolation feature sysfs nodes for uacce Update documentation describing sysfs node that could help to configure hardware error threshold for users in the user space. And describing sysfs node that could read the device isolated state. Signed-off-by: Kai Ye Link: https://lore.kernel.org/r/20221119074817.12063-3-yekai13@huawei.com Signed-off-by: Greg Kroah-Hartman commit e3e289fbc0b520cf469469e8cdba84a50424eb65 Author: Kai Ye Date: Sat Nov 19 07:48:15 2022 +0000 uacce: supports device isolation feature UACCE adds the hardware error isolation feature. To improve service reliability, some uacce devices that frequently encounter hardware errors are isolated. Therefore, this feature is added. Users can configure the hardware error threshold by 'isolate_strategy' sysfs node. The user space can get the device isolated state by 'isolate' sysfs node. If the number of device errors exceeds the configured error threshold, the device will be isolated. It means the uacce device is unavailable. Signed-off-by: Kai Ye Link: https://lore.kernel.org/r/20221119074817.12063-2-yekai13@huawei.com Signed-off-by: Greg Kroah-Hartman commit 40bf2fcd85e5997b419e49f72d0df694b8274586 Author: Paulo Miguel Almeida Date: Wed Dec 14 09:26:15 2022 +1300 scripts/tags.sh: choose which directories to exclude from being indexed It's common for drivers that share same physical components to also duplicate source code (or at least portions of it). A good example is both drivers/gpu/drm/amdgpu/* and drivers/gpu/drm/radeon/* have a header file called atombios.h. While their contents aren't the same, a lot of their structs have the exact same names which makes navigating through the code base a bit messy as cscope will show up 'references' across drivers which aren't exactly correct. Add IGNORE_DIRS variable, which specifies which directories to be ignored from indexing. Example: make ARCH=x86 IGNORE_DIRS="drivers/gpu/drm/radeon tools" cscope Signed-off-by: Paulo Miguel Almeida Reviewed-by: Nicolas Schier Reviewed-by: Vipin Sharma Link: https://lore.kernel.org/r/Y5jf59VCL/HAt60q@mail.google.com Signed-off-by: Greg Kroah-Hartman commit d717a3ab282f51ec45142f911f7ef8a55c057de5 Author: Yuan Can Date: Thu Nov 10 02:00:30 2022 +0000 eeprom: idt_89hpesx: Fix error handling in idt_init() A problem about idt_89hpesx create debugfs failed is triggered with the following log given: [ 4973.269647] debugfs: Directory 'idt_csr' with parent '/' already present! The reason is that idt_init() returns i2c_add_driver() directly without checking its return value, if i2c_add_driver() failed, it returns without destroy the newly created debugfs, resulting the debugfs of idt_csr can never be created later. idt_init() debugfs_create_dir() # create debugfs directory i2c_add_driver() driver_register() bus_add_driver() priv = kzalloc(...) # OOM happened # return without destroy debugfs directory Fix by removing debugfs when i2c_add_driver() returns error. Fixes: cfad6425382e ("eeprom: Add IDT 89HPESx EEPROM/CSR driver") Signed-off-by: Yuan Can Acked-by: Serge Semin Link: https://lore.kernel.org/r/20221110020030.47711-1-yuancan@huawei.com Signed-off-by: Greg Kroah-Hartman commit 0eb468b6e1c56b55c01bfc588f9a519ac15b4ff5 Author: Andy Shevchenko Date: Thu Jan 19 19:57:42 2023 +0200 eeprom: at25: Convert to use fwnode_device_is_compatible() Replace open coded fwnode_device_is_compatible() in the driver. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230119175742.77723-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 5f4416849f0e2909189263ab76a1dd533f597d72 Author: Krzysztof Kozlowski Date: Fri Jan 20 08:21:08 2023 +0100 ARM: dts: meson8: align OPP table names with DT schema DT schema expects names of operating points tables to match certain pattern: meson8-minix-neo-x8.dtb: gpu-opp-table: $nodename:0: 'gpu-opp-table' does not match '^opp-table(-[a-z0-9]+)?$' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230120072108.138598-1-krzysztof.kozlowski@linaro.org Signed-off-by: Neil Armstrong commit d6b7ec11062e116f44a504f73f16c97e1cc53bd0 Author: Taehee Yoo Date: Sun Jan 15 12:15:36 2023 +0000 crypto: x86/aria-avx512 - fix build failure with old binutils The minimum version of binutils for kernel build is currently 2.23 and it doesn't support GFNI. So, it fails to build the aria-avx512 if the old binutils is used. aria-avx512 requires GFNI, so it should not be allowed to build if the old binutils is used. The AS_AVX512 and AS_GFNI are added to the Kconfig to disable build aria-avx512 if the old binutils is used. Fixes: c970d42001f2 ("crypto: x86/aria - implement aria-avx512") Reported-by: Jan Beulich Signed-off-by: Taehee Yoo Signed-off-by: Herbert Xu commit 1eb468b3c7199cf7fe0c34ee37b95ae0e9bcc5fe Author: Taehee Yoo Date: Sun Jan 15 12:15:35 2023 +0000 crypto: x86/aria-avx2 - fix build failure with old binutils The minimum version of binutils for kernel build is currently 2.23 and it doesn't support GFNI. So, it fails to build the aria-avx2 if the old binutils is used. The code using GFNI is an optional part of aria-avx2. So, it disables GFNI part in it when the old binutils is used. Fixes: 37d8d3ae7a58 ("crypto: x86/aria - implement aria-avx2") Reported-by: Jan Beulich Signed-off-by: Taehee Yoo Signed-off-by: Herbert Xu commit e3cf2f8794b031ec0e640cb2dff95f45139ac4e9 Author: Taehee Yoo Date: Sun Jan 15 12:15:34 2023 +0000 crypto: x86/aria-avx - fix build failure with old binutils The minimum version of binutils for kernel build is currently 2.23 and it doesn't support GFNI. So, it fails to build the aria-avx if the old binutils is used. The code using GFNI is an optional part of aria-avx. So, it disables GFNI part in it when the old binutils is used. In order to check whether the using binutils is supporting GFNI or not, AS_GFNI is added. Fixes: ba3579e6e45c ("crypto: aria-avx - add AES-NI/AVX/x86_64/GFNI assembler implementation of aria cipher") Reported-by: Jan Beulich Signed-off-by: Taehee Yoo Signed-off-by: Herbert Xu commit 32e62025e5e52fbe4812ef044759de7010b15dbc Author: Herbert Xu Date: Fri Jan 13 18:27:51 2023 +0800 crypto: seqiv - Handle EBUSY correctly As it is seqiv only handles the special return value of EINPROGERSS, which means that in all other cases it will free data related to the request. However, as the caller of seqiv may specify MAY_BACKLOG, we also need to expect EBUSY and treat it in the same way. Otherwise backlogged requests will trigger a use-after-free. Fixes: 0a270321dbf9 ("[CRYPTO] seqiv: Add Sequence Number IV Generator") Signed-off-by: Herbert Xu commit b5a772adf45a32c68bef28e60621f12617161556 Author: Herbert Xu Date: Fri Jan 13 18:24:09 2023 +0800 crypto: essiv - Handle EBUSY correctly As it is essiv only handles the special return value of EINPROGERSS, which means that in all other cases it will free data related to the request. However, as the caller of essiv may specify MAY_BACKLOG, we also need to expect EBUSY and treat it in the same way. Otherwise backlogged requests will trigger a use-after-free. Fixes: be1eb7f78aa8 ("crypto: essiv - create wrapper template...") Signed-off-by: Herbert Xu Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit b0f4f74631979afaff6b5b7b8e54eb1cf2bd5cfa Author: Lukas Bulwahn Date: Fri Jan 13 08:47:15 2023 +0100 crypto: atmel-i2c - avoid defines prefixed with CONFIG Defines prefixed with "CONFIG" should be limited to proper Kconfig options, that are introduced in a Kconfig file. Here, a definition for the driver's configuration zone is named CONFIG_ZONE. Rename this local definition to CONFIGURATION_ZONE to avoid defines prefixed with "CONFIG". No functional change. Signed-off-by: Lukas Bulwahn Signed-off-by: Herbert Xu commit 692ed5d4b270d1b12aa7f00f25f4f1e914831cb3 Author: Meadhbh Fitzpatrick Date: Thu Jan 12 15:51:54 2023 +0100 crypto: qat - fix spelling mistakes from 'bufer' to 'buffer' Fix spelling mistakes from 'bufer' to 'buffer' in qat_common. Also fix indentation issue caused by the spelling change. Signed-off-by: Meadhbh Fitzpatrick Reviewed-by: Ilpo Järvinen Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 00bef64ac3c95ab0f73b5d352743bf2bd6f5fc99 Author: Lukas Bulwahn Date: Wed Jan 11 13:02:03 2023 +0100 crypto: hisilicon - remove redundant config PCI dependency for some CRYPTO_DEV_HISI configs While reviewing dependencies in some Kconfig files, I noticed the redundant dependency "depends on PCI && PCI_MSI". The config PCI_MSI has always, since its introduction, been dependent on the config PCI. So, it is sufficient to just depend on PCI_MSI, and know that the dependency on PCI is implicitly implied. Reduce the dependencies of configs CRYPTO_DEV_HISI_SEC2, CRYPTO_DEV_HISI_QM, CRYPTO_DEV_HISI_ZIP and CRYPTO_DEV_HISI_HPRE. No functional change and effective change of Kconfig dependendencies. Signed-off-by: Lukas Bulwahn Acked-by: Weili Qian Signed-off-by: Herbert Xu commit 319ad16d62d3da695faebd2d5def6be0d542f586 Author: Linus Walleij Date: Tue Jan 10 20:43:07 2023 +0100 crypto: stm32 - Use accelerated readsl/writesl When reading or writing crypto buffers the inner loops can be replaced with readsl and writesl which will on ARM result in a tight assembly loop, speeding up encryption/decryption a little bit. This optimization was in the Ux500 driver so let's carry it over to the STM32 driver. Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: Lionel Debieve Signed-off-by: Linus Walleij Signed-off-by: Herbert Xu commit f104b2169e6841b1629ff8cea15b751bc6f9a0e7 Author: Gustavo A. R. Silva Date: Mon Jan 9 19:39:17 2023 -0600 crypto: aspeed - Replace zero-length array with flexible-array member Zero-length arrays are deprecated[1] and we are moving towards adopting C99 flexible-array members instead. So, replace zero-length array declaration in struct aspeed_sham_ctx with flex-array member. 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 [2]. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays [1] Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [2] Link: https://github.com/KSPP/linux/issues/78 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Neal Liu Reviewed-by: Kees Cook Signed-off-by: Herbert Xu commit 299bf602b3f92f1456aef59c6413591fb02e762a Author: Koba Ko Date: Mon Jan 9 10:15:02 2023 +0800 crypto: ccp - Failure on re-initialization due to duplicate sysfs filename The following warning appears during the CCP module re-initialization: [ 140.965403] sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:07.1/0000:03:00.2/dma/dma0chan0' [ 140.975736] CPU: 0 PID: 388 Comm: kworker/0:2 Kdump: loaded Not tainted 6.2.0-0.rc2.18.eln124.x86_64 #1 [ 140.985185] Hardware name: HPE ProLiant DL325 Gen10/ProLiant DL325 Gen10, BIOS A41 07/17/2020 [ 140.993761] Workqueue: events work_for_cpu_fn [ 140.998151] Call Trace: [ 141.000613] [ 141.002726] dump_stack_lvl+0x33/0x46 [ 141.006415] sysfs_warn_dup.cold+0x17/0x23 [ 141.010542] sysfs_create_dir_ns+0xba/0xd0 [ 141.014670] kobject_add_internal+0xba/0x260 [ 141.018970] kobject_add+0x81/0xb0 [ 141.022395] device_add+0xdc/0x7e0 [ 141.025822] ? complete_all+0x20/0x90 [ 141.029510] __dma_async_device_channel_register+0xc9/0x130 [ 141.035119] dma_async_device_register+0x19e/0x3b0 [ 141.039943] ccp_dmaengine_register+0x334/0x3f0 [ccp] [ 141.045042] ccp5_init+0x662/0x6a0 [ccp] [ 141.049000] ? devm_kmalloc+0x40/0xd0 [ 141.052688] ccp_dev_init+0xbb/0xf0 [ccp] [ 141.056732] ? __pci_set_master+0x56/0xd0 [ 141.060768] sp_init+0x70/0x90 [ccp] [ 141.064377] sp_pci_probe+0x186/0x1b0 [ccp] [ 141.068596] local_pci_probe+0x41/0x80 [ 141.072374] work_for_cpu_fn+0x16/0x20 [ 141.076145] process_one_work+0x1c8/0x380 [ 141.080181] worker_thread+0x1ab/0x380 [ 141.083953] ? __pfx_worker_thread+0x10/0x10 [ 141.088250] kthread+0xda/0x100 [ 141.091413] ? __pfx_kthread+0x10/0x10 [ 141.095185] ret_from_fork+0x2c/0x50 [ 141.098788] [ 141.100996] kobject_add_internal failed for dma0chan0 with -EEXIST, don't try to register things with the same name in the same directory. [ 141.113703] ccp 0000:03:00.2: ccp initialization failed The /dma/dma0chan0 sysfs file is not removed since dma_chan object has been released in ccp_dma_release() before releasing dma device. A correct procedure would be: release dma channels first => unregister dma device => release ccp dma object. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216888 Fixes: 68dbe80f5b51 ("crypto: ccp - Release dma channels before dmaengine unrgister") Tested-by: Vladis Dronov Signed-off-by: Koba Ko Reviewed-by: Vladis Dronov Acked-by: Tom Lendacky Signed-off-by: Herbert Xu commit 2b0c954010873166fdf6a8468f25ff24dcc8aa05 Author: Ard Biesheuvel Date: Wed Dec 14 18:19:57 2022 +0100 crypto: aead - fix inaccurate documentation The AEAD documentation conflates associated data and authentication tags: the former (along with the ciphertext) is authenticated by the latter. Fix the doc accordingly. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 425359aef47972b2d14e15b6702d60d86779af65 Author: Ard Biesheuvel Date: Wed Dec 14 18:19:56 2022 +0100 crypto: tcrypt - include larger key sizes in RFC4106 benchmark RFC4106 wraps AES in GCM mode, and can be used with larger key sizes than 128/160 bits, just like AES itself. So add these to the tcrypt recipe so they will be benchmarked as well. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 9e3457112b9d410f0cad760f91728251fef7e3e3 Author: Ard Biesheuvel Date: Wed Dec 14 18:19:55 2022 +0100 crypto: arm64/gcm - add RFC4106 support Add support for RFC4106 ESP encapsulation to the accelerated GCM implementation. This results in a ~10% speedup for IPsec frames of typical size (~1420 bytes) on Cortex-A53. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 38943cbd25a24e7d14d68cfca07b9c98039fa683 Author: Arnd Bergmann Date: Fri Sep 30 13:46:44 2022 +0200 ata: remove palmld pata driver The PXA palmld machine was removed, so the pata driver is no longer used and can be removed. There is a chance that some of this code might be useful for turning some of the other PXA PCMCIA host drivers into PATA drivers, but it's clear that it would not work unmodified, and it seems unlikely that someone would do this work. Cc: Alessandro Zummo Cc: Marek Vasut Cc: linux-kernel@vger.kernel.org Cc: linux-ide@vger.kernel.org Acked-by: Damien Le Moal Reviewed-by: Sergey Shtylyov Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann commit a677fe979670e66d0860bfca3a39ad6fb12262ee Author: Arnd Bergmann Date: Fri Sep 30 13:31:19 2022 +0200 power: remove tosa_battery driver The PXA tosa machine is removed, so this driver is no longer in use. Cc: linux-pm@vger.kernel.org Acked-by: Sebastian Reichel Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann commit 347651485af1f9111438fc12f9dbe2a79cc3c95b Author: Arnd Bergmann Date: Fri Sep 30 13:30:40 2022 +0200 power: remove z2_battery driver The PXA z2 platform is gone, and this driver is now orphaned. Cc: linux-pm@vger.kernel.org Cc: Peter Edwards Acked-by: Sebastian Reichel Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann commit ce79f3a1ad5fceda6149d1511ae3d1e13f32c14f Author: Arnd Bergmann Date: Fri Sep 30 08:38:26 2022 +0200 ARM: pxa: prune unused device support pxa3xx is now DT-only, and the remaining pxa2xx board files only use a subset of the possible devices, so remove all definitions that are not referenced any more. Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann commit 8ca79aaad8becbda085e740c521a792f281c8a6d Author: Arnd Bergmann Date: Fri Sep 30 08:17:44 2022 +0200 ARM: pxa: remove unused pxa3xx-ulpi This was only used by the cm-x300 board, which is now gone. Cc: Alan Stern Cc: linux-usb@vger.kernel.org Acked-by: Robert Jarzmik Acked-by: Greg Kroah-Hartman Signed-off-by: Arnd Bergmann commit 0ddc052416a3a34700b8a16bad02d31369419553 Author: Arnd Bergmann Date: Thu Sep 22 15:20:02 2022 +0200 ARM: pxa: remove irda leftover irda support was removed a long time ago, so stop registering the devices from the pxa machine. Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann commit d711b8a2987a14577674f76f1b6c28d6d85db07a Author: Arnd Bergmann Date: Mon Jan 9 13:10:16 2023 +0100 ARM: pxa: remove pxa93x support There is currently no devicetree support for pxa930 or pxa935 SoCs, and no board files remain. As it seems unlikely that anyone is going to add DT support soon, let's drop the SoC specific code now. Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann commit d6df7df7ae5a0f781341134e7cb24e3396f8434a Author: Arnd Bergmann Date: Thu Sep 29 15:24:20 2022 +0200 ARM: pxa: remove unused board files The majority of all pxa board files has not been touched in a long time, and no users have spoken up in favor of keeping them around. This leaves only support for the platforms that were already converted to DT, as well as the gumstix and spitz/akita/borzoi machines that work in qemu and can still be converted to DT later. Cc: Ales Bardorfer Cc: Ales Snuparek Cc: Alex Osborne Cc: Alex Osborne Cc: Dirk Opfer Cc: Ian Molton Cc: Lennert Buytenhek Cc: Marek Vasut Cc: Michael Petchkovsky Cc: Nick Bane Cc: Paul Parsons Cc: Philipp Zabel Cc: Richard Purdie Cc: Sergey Lapin Cc: Tomas Cech Acked-by: Dmitry Baryshkov Acked-by: Robert Jarzmik Signed-off-by: Arnd Bergmann commit 05d227efbd8d3ce28c3a87b66b5794235be197f4 Author: Tom Lendacky Date: Tue Jan 17 04:40:38 2023 +0000 iommu/amd: Do not clear event/ppr log buffer when snp is enabled Current code clears event log and ppr log entry after processing it due to hardware errata ([1] erratum #732, #733). We do not have hardware issue on SNP enabled system. When SNP is enabled, the event logs, PPR log and completion wait buffer are read-only to the host (see SNP FW ABI spec [2]). Clearing those entry will result in a kernel #PF for an RMP violation. Hence do not clear event and ppr log entry after processing it. [1] http://developer.amd.com/wordpress/media/2012/10/48931_15h_Mod_10h-1Fh_Rev_Guide.pdf [2] https://www.amd.com/system/files/TechDocs/56860.pdf Signed-off-by: Tom Lendacky Signed-off-by: Vasant Hegde Reviewed-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20230117044038.5728-1-vasant.hegde@amd.com Signed-off-by: Joerg Roedel commit d8bcc870d99d7e523df31ab60f1228a8d9061191 Author: Hector Martin Date: Fri Jan 13 19:50:30 2023 +0900 iommu: dart: Add t8110 DART support Now that we have the driver properly parameterized, we can add support for T8110 DARTs. These DARTs drop the multiple TTBRs (which only make sense with legacy 4K page platforms) and instead add support for new features and more stream IDs. The register layout is different, but the pagetable format is the same as T6000. Reviewed-by: Sven Peter Signed-off-by: Hector Martin Link: https://lore.kernel.org/r/20230113105029.26654-8-marcan@marcan.st Signed-off-by: Joerg Roedel commit b76c68fcb44025c1b6ee329fa00738a4e9420d57 Author: Hector Martin Date: Fri Jan 13 19:50:29 2023 +0900 iommu: dart: Support different variants with different registers T8110 has a new register layout. To accommodate this, first move all the register offsets to the hw structure, and rename all the existing registers to DART_T8020_*. Reviewed-by: Sven Peter Signed-off-by: Hector Martin Link: https://lore.kernel.org/r/20230113105029.26654-7-marcan@marcan.st Signed-off-by: Joerg Roedel commit a772a02c18342bcc14bdc499ca400c2139b4ddde Author: Hector Martin Date: Fri Jan 13 19:50:28 2023 +0900 iommu: dart: Fix DART_PARAMS1/2 bit define names They didn't have the PARAMS reg index in them, but they should. Reviewed-by: Sven Peter Signed-off-by: Hector Martin Link: https://lore.kernel.org/r/20230113105029.26654-6-marcan@marcan.st Signed-off-by: Joerg Roedel commit 0b459bcdc5a8b8929ec0f568723c7c639f1673cf Author: Hector Martin Date: Fri Jan 13 19:50:27 2023 +0900 iommu: dart: Support a variable number of TTBRs per stream T8110 only has one TTBR per stream, so un-hardcode that. Reviewed-by: Sven Peter Signed-off-by: Hector Martin Link: https://lore.kernel.org/r/20230113105029.26654-5-marcan@marcan.st Signed-off-by: Joerg Roedel commit 510d4072df7fcf27dcd2dc1942d58b2cc02b03f2 Author: Hector Martin Date: Fri Jan 13 19:50:26 2023 +0900 iommu: dart: Support >64 stream IDs T8110 DARTs have up to 256 SIDs, so we need to switch to a bitmap to handle them properly. Reviewed-by: Sven Peter Signed-off-by: Hector Martin Link: https://lore.kernel.org/r/20230113105029.26654-4-marcan@marcan.st Signed-off-by: Joerg Roedel commit 3d68bbb81b1a64e279180eee1ed0e2c590b5029e Author: Hector Martin Date: Fri Jan 13 19:50:25 2023 +0900 iommu: dart: Add suspend/resume support We need to save/restore the TCR/TTBR registers, since they are lost on power gate. Reviewed-by: Sven Peter Signed-off-by: Hector Martin Link: https://lore.kernel.org/r/20230113105029.26654-3-marcan@marcan.st Signed-off-by: Joerg Roedel commit 659bf8e582fcf11d5f769e2a988722b33059b0d8 Author: Hector Martin Date: Fri Jan 13 19:50:24 2023 +0900 dt-bindings: iommu: dart: add t8110 compatible t600x SoCs use this DART style for the Thunderbolt ports, and t8112 SoCs use them everywhere. Add a compatible for it. No other binding changes necessary. Reviewed-by: Sven Peter Acked-by: Krzysztof Kozlowski Signed-off-by: Hector Martin Link: https://lore.kernel.org/r/20230113105029.26654-2-marcan@marcan.st Signed-off-by: Joerg Roedel commit f5339209541f6598b5093274c848654d620b4e02 Merge: 147c50ac3a4ea 246c77f666b43 Author: David S. Miller Date: Fri Jan 20 09:33:22 2023 +0000 Merge branch 'net-dcb-rewrite-table' Daniel Machon says: ==================== net: Introduce new DCB rewrite table There is currently no support for per-port egress mapping of priority to PCP and priority to DSCP. Some support for expressing egress mapping of PCP is supported through ip link, with the 'egress-qos-map', however this command only maps priority to PCP, and for vlan interfaces only. DCB APP already has support for per-port ingress mapping of PCP/DEI, DSCP and a bunch of other stuff. So why not take advantage of this fact, and add a new table that does the reverse. This patch series introduces the new DCB rewrite table. Whereas the DCB APP table deals with ingress mapping of PID (protocol identifier) to priority, the rewrite table deals with egress mapping of priority to PID. It is indeed possible to integrate rewrite in the existing APP table, by introducing new dedicated rewrite selectors, and altering existing functions to treat rewrite entries specially. However, I feel like this is not a good solution, and will pollute the APP namespace. APP is well-defined in IEEE, and some userspace relies of advertised entries - for this fact, separating APP and rewrite into to completely separate objects, seems to me the best solution. The new table shares much functionality with the APP table, and as such, much existing code is reused, or slightly modified, to work for both. ================================================================================ DCB rewrite table in a nutshell ================================================================================ The table is implemented as a simple linked list, and uses the same lock as the APP table. New functions for getting, setting and deleting entries have been added, and these are exported, so they can be used by the stack or drivers. Additionnaly, new dcbnl_setrewr and dcnl_delrewr hooks has been added, to support hardware offload of the entries. ================================================================================ Sparx5 per-port PCP rewrite support ================================================================================ Sparx5 supports PCP egress mapping through two eight-entry switch tables. One table maps QoS class 0-7 to PCP for DE0 (DP levels mapped to drop-eligibility 0) and the other for DE1. DCB does currently not have support for expressing DP/color, so instead, the tagged DEI bit will reflect the DP levels, for any rewrite entries> 7 ('de'). The driver will take apptrust (contributed earlier) into consideration, so that the mapping tables only be used, if PCP is trusted *and* the rewrite table has active mappings, otherwise classified PCP (same as frame PCP) will be used instead. ================================================================================ Sparx5 per-port DSCP rewrite support ================================================================================ Sparx5 support DSCP egress mapping through a single 32-entry table. This table maps classified QoS class and DP level to classified DSCP, and is consulted by the switch Analyzer Classifier at ingress. At egress, the frame DSCP can either be rewritten to classified DSCP to frame DSCP. The driver will take apptrust into consideration, so that the mapping tables only be used, if DSCP is trusted *and* the rewrite table has active mappings, otherwise frame DSCP will be used instead. ================================================================================ Patches ================================================================================ Patch #1 modifies dcb_app_add to work for both APP and rewrite Patch #2 adds dcbnl_app_table_setdel() for setting and deleting both APP and rewrite entries. Patch #3 adds the rewrite table and all required functions, offload hooks and bookkeeping for maintaining it. Patch #4 adds two new helper functions for getting a priority to PCP bitmask map, and a priority to DSCP bitmask map. Patch #5 adds support for PCP rewrite in the Sparx5 driver. Patch #6 adds support for DSCP rewrite in the Sparx5 driver. ================================================================================ v2 -> v3: in dcbnl_ieee_fill() use nla_nest_start() instead of the _noflag() version. Also, cancel the rewrite nest in case of an error (Petr Machata). v1 -> v2: In dcb_setrewr() change proto to u16 as it ought to be, and remove zero initialization of err. (Dan Carpenter). Change name of dcbnl_apprewr_setdel -> dcbnl_app_table_setdel and change the function signature to take a single function pointer. Update uses accordingly (Petr Machata). ==================== Signed-off-by: David S. Miller commit 246c77f666b434d4a08021cf24eb9260cf7f92a2 Author: Daniel Machon Date: Wed Jan 18 22:08:30 2023 +0100 net: microchip: sparx5: add support for DSCP rewrite Add support for DSCP rewrite in Sparx5 driver. On egress DSCP is rewritten from either classified DSCP, or frame DSCP. Classified DSCP is determined by the Analyzer Classifier on ingress, and is mapped from classified QoS class and DP level. Classification of DSCP is by default enabled for all ports. It is required that DSCP is trusted for the egress port *and* rewrite table is not empty, in order to rewrite DSCP based on classified DSCP, otherwise DSCP is always rewritten from frame DSCP. classified_dscp = qos_dscp_map[8 * dp_level + qos_class]; if (active_mappings && dscp_is_trusted) rewritten_dscp = classified_dscp else rewritten_dscp = frame_dscp To rewrite DSCP to 20 for any frames with priority 7: $ dcb apptrust set dev eth0 order dscp $ dcb rewr add dev eth0 7:20 <-- not in iproute2/dcb yet Signed-off-by: Daniel Machon Signed-off-by: David S. Miller commit 2234879f4ca127d5288046fe0469d9ac63988c0b Author: Daniel Machon Date: Wed Jan 18 22:08:29 2023 +0100 net: microchip: sparx5: add support for PCP rewrite Add support for rewrite of PCP and DEI, based on classified Quality of Service (QoS) class and Drop-Precedence (DP) level. The DCB rewrite table is queried for mappings between priority and PCP/DEI. The classified DP level is then encoded in the DEI bit, if a mapping for DEI exists. Sparx5 has four DP levels, where by default, 0 is mapped to DE0 and 1-3 are mapped to DE1. If a mapping exists where DEI=1, then all classified DP levels mapped to DE1 will set the DEI bit. The other way around for DEI=0. Effectively, this means that the tagged DEI bit will reflect the DP level for any mappings where DEI=1. Map priority=1 to PCP=1 and DEI=1: $ dcb rewr add dev eth0 pcp-prio 1:1de Map priority=7 to PCP=2 and DEI=0 $ dcb rewr add dev eth0 pcp-prio 7:2nd Also, sparx5_dcb_ieee_dscp_setdel() has been refactored, to work for both APP and rewrite entries. Signed-off-by: Daniel Machon Signed-off-by: David S. Miller commit 1df99338e6d4e96178b68b3e17bab33e9f1eb628 Author: Daniel Machon Date: Wed Jan 18 22:08:28 2023 +0100 net: dcb: add helper functions to retrieve PCP and DSCP rewrite maps Add two new helper functions to retrieve a mapping of priority to PCP and DSCP bitmasks, where each bitmap contains ones in positions that match a rewrite entry. dcb_ieee_getrewr_prio_dscp_mask_map() reuses the dcb_ieee_app_prio_map, as this struct is already used for a similar mapping in the app table. Signed-off-by: Daniel Machon Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 622f1b2fae2eea28a80b04f130e3bb54227699f8 Author: Daniel Machon Date: Wed Jan 18 22:08:27 2023 +0100 net: dcb: add new rewrite table Add new rewrite table and all the required functions, offload hooks and bookkeeping for maintaining it. The rewrite table reuses the app struct, and the entire set of app selectors. As such, some bookeeping code can be shared between the rewrite- and the APP table. New functions for getting, setting and deleting entries has been added. Apart from operating on the rewrite list, these functions do not emit a DCB_APP_EVENT when the list os modified. The new dcb_getrewr does a lookup based on selector and priority and returns the protocol, so that mappings from priority to protocol, for a given selector and ifindex is obtained. Also, a new nested attribute has been added, that encapsulates one or more app structs. This attribute is used to distinguish the two tables. The dcb_lock used for the APP table is reused for the rewrite table. Signed-off-by: Daniel Machon Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 30568334b657e77629293dd88a35d9c21b3258fb Author: Daniel Machon Date: Wed Jan 18 22:08:26 2023 +0100 net: dcb: add new common function for set/del of app/rewr entries In preparation for DCB rewrite. Add a new function for setting and deleting both app and rewrite entries. Moving this into a separate function reduces duplicate code, as both type of entries requires the same set of checks. The function will now iterate through a configurable nested attribute (app or rewrite attr), validate each attribute and call the appropriate set- or delete function. Note that this function always checks for nla_len(attr_itr) < sizeof(struct dcb_app), which was only done in dcbnl_ieee_set and not in dcbnl_ieee_del prior to this patch. This means, that any userspace tool that used to shove in data < sizeof(struct dcb_app) would now receive -ERANGE. Signed-off-by: Daniel Machon Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 34b7074d3fba0d3f3ca8c66b6105b7f575e77e98 Author: Daniel Machon Date: Wed Jan 18 22:08:25 2023 +0100 net: dcb: modify dcb_app_add to take list_head ptr as parameter In preparation to DCB rewrite. Modify dcb_app_add to take new struct list_head * as parameter, to make the used list configurable. This is done to allow reusing the function for adding rewrite entries to the rewrite table, which is introduced in a later patch. Signed-off-by: Daniel Machon Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 3cf77ad2603a43e051480da5874bce285ad417df Author: ye xingchen Date: Thu Jan 19 17:17:21 2023 +0800 i2c: au1550: 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: Wolfram Sang commit 83a7f470f1f23e613844f0a991e8d121fef919f6 Author: ye xingchen Date: Thu Jan 19 17:19:58 2023 +0800 i2c: mt65xx: 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: AngeloGioacchino Del Regno Signed-off-by: Wolfram Sang commit 9fc49c4ce0717be3963bc881d36f98abc252869e Author: ye xingchen Date: Thu Jan 19 17:18:47 2023 +0800 i2c: bcm2835: 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: Florian Fainelli Signed-off-by: Wolfram Sang commit 6b1e1925d8297621a23f1af5c80ab71fa28afe27 Author: ye xingchen Date: Thu Jan 19 17:15:31 2023 +0800 i2c: aspeed: 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: Andrew Jeffery Signed-off-by: Wolfram Sang commit 7b6e9dc7e42d869a32ba4f517a7d9eec4c6173d5 Author: Binbin Zhou Date: Tue Jan 10 21:03:53 2023 +0800 i2c: gpio: Add support on ACPI-based system Add support for the ACPI-based device registration, so that the driver can be also enabled through ACPI table. Signed-off-by: Binbin Zhou Reviewed-by: Andy Shevchenko Tested-by: Peibao Liu Signed-off-by: Wolfram Sang commit a4a1a78e3b5e511e6e5ca7407141911acdd0d3aa Author: Lars-Peter Clausen Date: Sat Jan 7 13:18:12 2023 -0800 i2c: cadence: Remove redundant expression in if clause In the mrecv() function the Cadence I2C driver has the following expression in an if clause. ((id->p_msg->flags & I2C_M_RECV_LEN) != I2C_M_RECV_LEN) && (id->recv_count <= CDNS_I2C_FIFO_DEPTH)) Earlier in the same function when I2C_M_RECV_LEN is set the recv_count is initialized to a value that is larger than CDNS_I2C_FIFO_DEPTH. This means if the first expression is false the second expression is also false. Checking the first expression is thus redundant and can be removed. This slightly simplifies the logic. Signed-off-by: Lars-Peter Clausen Reviewed-by: Michal Simek Signed-off-by: Wolfram Sang commit 2264997254ca1123967ed890c7924ca848c512a5 Author: Lars-Peter Clausen Date: Sat Jan 7 13:18:11 2023 -0800 i2c: cadence: Remove `irq` field from driver state struct The irq field of the driver state struct is only used in the probe function. There is no need to keep it around. Remove it from the state struct and use a on-stack variable instead. Signed-off-by: Lars-Peter Clausen Reviewed-by: Michal Simek Signed-off-by: Wolfram Sang commit 72f94ff21a264993c1c785f21ddc18d0cb1fccd2 Author: Lars-Peter Clausen Date: Sat Jan 7 13:18:10 2023 -0800 i2c: cadence: Remove unused CDNS_I2C_DATA_INTR_DEPTH define The CDNS_I2C_DATA_INTR_DEPTH is not used in the Cadence I2C driver. Remove it. Signed-off-by: Lars-Peter Clausen Reviewed-by: Michal Simek Signed-off-by: Wolfram Sang commit 147c50ac3a4ea4f5ddbcf064e1adcf3aa7e6aa11 Merge: cff9b79e9ad57 87523986570e3 Author: David S. Miller Date: Fri Jan 20 08:53:13 2023 +0000 Merge branch 'lan9303-phylink' Jerry Ray says: ==================== dsa: lan9303: Move to PHYLINK This patch series moves the lan9303 driver to use the phylink api away from phylib. Migrating to phylink means removing the .adjust_link api. The functionality from the adjust_link is moved to the phylink_mac_link_up api. The code being removed only affected the cpu port. The other ports on the LAN9303 do not need anything from the phylink_mac_link_up api. Patches: 0001 - Whitespace only change aligning the dsa_switch_ops members. No code changes. 0002 - Moves the Turbo bit initialization out of the adjust_link api and places it in a driver initialization execution path. It only needs to be initialized once, it is never changed, and it is not a per-port flag. 0003 - Adds exception handling logic in the extremely unlikely event that the read of the device fails. 0004 - Performance optimization that skips a slow register write if there is no need to perform it. 0005 - Change the way we identify the xMII port as phydev will be NULL when this logic is moved into phylink_mac_link_up. 0006 - Removes adjust_link and begins using the phylink dsa_switch_ops apis. 0007 - Adds XMII port flow control settings in the phylink_mac_link_up() api while cleaning up the ANEG / speed / duplex implementation. --- v6->v7: - Moved the initialization of the Turbo bit into lan9303_setup(). - Added a macro for determining is a port is an XMII port. - Added setting the XMII flow control in the phylink_mac_link_up() API. - removed unnecessary error handling and cleaned up the code flow in phylink_mac_link_up(). v5->v6: - Moved to using port number to identify xMII port for the LAN9303. v4->v5: - Created prep patches to better show how things migrate. - cleaned up comments. v3->v4: - Addressed whitespace issues as a separate patch. - Removed port_max_mtu api patch as it is unrelated to phylink migration. - Reworked the implementation to preserve the adjust_link functionality by including it in the phylink_mac_link_up api. v2->v3: Added back in disabling Turbo Mode on the CPU MII interface. Removed the unnecessary clearing of the phy supported interfaces. v1->v2: corrected the reported mtu size, removing ETH_HLEN and ETH_FCS_LEN ==================== Signed-off-by: David S. Miller commit 87523986570e3068b9a21632976ad7c1d04ce25f Author: Jerry Ray Date: Tue Jan 17 14:57:03 2023 -0600 dsa: lan9303: Add flow ctrl in link_up While the prior patch moved the adjust_link code into the phylink_mac_link_up api, this patch cleans it up and adds the setting the port's flow control based on the phylink_mac_link_up input parameters. Signed-off-by: Jerry Ray Signed-off-by: David S. Miller commit 332bc552a402c9a319a87f0ee114db4a03a3c887 Author: Jerry Ray Date: Tue Jan 17 14:57:02 2023 -0600 dsa: lan9303: Migrate to PHYLINK This patch replaces the adjust_link api with the phylink apis that provide equivalent functionality. The remaining functionality from the adjust_link is now covered in the phylink_mac_link_up api. Removes: .adjust_link Adds: .phylink_get_caps .phylink_mac_link_up Signed-off-by: Jerry Ray Signed-off-by: David S. Miller commit 56e23d91bcfda607f928105b5c403a4bed415743 Author: Jerry Ray Date: Tue Jan 17 14:57:01 2023 -0600 dsa: lan9303: Port 0 is xMII port In preparing to move the adjust_link logic into the phylink_mac_link_up api, change the macro used to check for the cpu port. In phylink_mac_link_up, the phydev pointer passed in for the CPU port is NULL, so we can't keep using phy_is_pseudo_fixed_link(phydev). Signed-off-by: Jerry Ray Signed-off-by: David S. Miller commit de375aa860fb848eaabc76dce0af2e982630b421 Author: Jerry Ray Date: Tue Jan 17 14:57:00 2023 -0600 dsa: lan9303: write reg only if necessary As the regmap_write() is over a slow bus that will sleep, we can speed up the boot-up time a bit by not bothering to clear a bit that is already clear. Signed-off-by: Jerry Ray Signed-off-by: David S. Miller commit 601f574a1b449446a98d65cc3871a8eb2cb18bcf Author: Jerry Ray Date: Tue Jan 17 14:56:59 2023 -0600 dsa: lan9303: Add exception logic for read failure While it is highly unlikely a read will ever fail, This code fragment is now in a function that allows us to return an error code. A read failure here will cause the lan9303_probe to fail. Signed-off-by: Jerry Ray Signed-off-by: David S. Miller commit 1bcb5df81e4b788d3a0ff5b04dc5299758b38ac5 Author: Jerry Ray Date: Tue Jan 17 14:56:58 2023 -0600 dsa: lan9303: move Turbo Mode bit init In preparing to remove the .adjust_link api, I am moving the one-time initialization of the device's Turbo Mode bit into a different execution path. This code clears (disables) the Turbo Mode bit which is never used by this driver. Turbo Mode is a non-standard mode that would allow the 100Mbps RMII interface to run at 200Mbps. Signed-off-by: Jerry Ray Signed-off-by: David S. Miller commit 9755126dc038ab60cd258b619c3d2592298e0095 Author: Jerry Ray Date: Tue Jan 17 14:56:57 2023 -0600 dsa: lan9303: align dsa_switch_ops members Whitespace preparatory patch, making the dsa_switch_ops table consistent. No code is added or removed. Signed-off-by: Jerry Ray Signed-off-by: David S. Miller commit 20cb3fce4d60deb5067380ff0e934b52c35749a6 Author: Hanna Hawa Date: Wed Dec 28 16:48:13 2022 +0000 i2c: Set i2c pinctrl recovery info from it's device pinctrl Currently the i2c subsystem rely on the controller device tree to initialize the pinctrl recovery information, part of the drivers does not set this field (rinfo->pinctrl), for example i2c DesignWare driver. The pins information is saved part of the device structure before probe and it's done on pinctrl_bind_pins(). Make the i2c init recovery to get the device pins if it's not initialized by the driver from the device pins. Signed-off-by: Hanna Hawa Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang commit 13e80244ca7e51d5eb7803f05e0579b11fc89048 Author: Hanna Hawa Date: Wed Dec 28 16:48:12 2022 +0000 pinctrl: Add an API to get the pinctrl pins if initialized Add an API to get the pinctrl pins if it was initialized before driver probed. This API will be used in I2C core to get the device pinctrl information for recovery state change. Signed-off-by: Hanna Hawa Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Wolfram Sang commit ce1fc502de429c9b4dd30775e354bb29453256bb Author: John Stultz Date: Fri Jan 20 06:09:56 2023 +0000 MAINTAINERS: Add Sumit Semwal and Yongqin Liu as reviwers for kirin DRM driver I no longer have access to the HiKey boards, so while I'm happy to review code, I wanted to add Sumit and Yongqin to the reviewers list so they would get CC'ed on future changes and would be able to have a chance to validate and provide Tested-by: tags Cc: Xinliang Liu Cc: Tian Tao Cc: Yongqin Liu Cc: Sumit Semwal Cc: kernel-team@android.com Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230120060956.1244187-1-jstultz@google.com commit 5f451bef7522e2253154651600e4b925c14e2116 Author: Fabien Parent Date: Thu Jan 19 18:08:52 2023 +0100 dt-bindings: i2c: i2c-mt65xx: add binding for MT8365 SoC Add binding documentation for the MT8365 I2C controllers. Signed-off-by: Fabien Parent Acked-by: Rob Herring Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat Reviewed-by: Matthias Brugger Signed-off-by: Wolfram Sang commit 72b9da733bab037f596e06513912ecaa2e3171b8 Author: Jani Nikula Date: Wed Jan 18 15:15:38 2023 +0200 drm/i915: move GT_FREQUENCY_MULTIPLIER and GEN9_FREQ_SCALER to intel_rps.h Declutter i915_drv.h. Signed-off-by: Jani Nikula Acked-by: Tvrtko Ursulin Acked-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20230118131538.3558599-7-jani.nikula@intel.com commit 0cfee2d7fd992d51cd68cc333dfebadc923abd92 Author: Jani Nikula Date: Wed Jan 18 15:15:37 2023 +0200 drm/i915: move I915_COLOR_UNEVICTABLE to i915_gem_gtt.h Declutter i915_drv.h. Signed-off-by: Jani Nikula Acked-by: Tvrtko Ursulin Acked-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20230118131538.3558599-6-jani.nikula@intel.com commit 0b31a427b9f28ba1ec099b236da1fea0c513b815 Author: Jani Nikula Date: Wed Jan 18 15:15:36 2023 +0200 drm/i915: move I915_GEM_GPU_DOMAINS to i915_gem.h Declutter i915_drv.h. Signed-off-by: Jani Nikula Acked-by: Tvrtko Ursulin Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20230118131538.3558599-5-jani.nikula@intel.com commit fff6172798cdc83ec1a17b4816b752172f86b51f Author: Jani Nikula Date: Wed Jan 18 15:15:35 2023 +0200 drm/i915: move a few HAS_ macros closer to their place There's not that much organization with where the various HAS_FEATURE() macros are placed, but at least try to group them closer together. Signed-off-by: Jani Nikula Acked-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20230118131538.3558599-4-jani.nikula@intel.com commit 0d885242f335a6332a173f1884b20f90e3f71f33 Author: Jani Nikula Date: Wed Jan 18 15:15:34 2023 +0200 drm/i915: drop a number of unnecessary forward declarations Remove leftovers from earlier cleanups. Signed-off-by: Jani Nikula Acked-by: Tvrtko Ursulin Acked-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20230118131538.3558599-3-jani.nikula@intel.com commit 6c13c8250c00a92067dba70d26c432eac7fcb357 Author: Jani Nikula Date: Wed Jan 18 15:15:33 2023 +0200 drm/i915: move I915_IDLE_ENGINES_TIMEOUT next to its only user Declutter i915_drv.h. If there's ever a need to use this in more than one place, we can figure out a better spot then. For now, this seems easiest. Signed-off-by: Jani Nikula Acked-by: Tvrtko Ursulin Acked-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20230118131538.3558599-2-jani.nikula@intel.com commit ff1e93e924f236ab7f5b445820bf4e81cf9845b7 Author: Jani Nikula Date: Wed Jan 18 15:15:32 2023 +0200 drm/i915: add i915_config.h and move relevant declarations there We already have i915_config.c. Add the i915_config.h counterpart, and declutter i915_drv.h in the process. Signed-off-by: Jani Nikula Reviewed-by: Tvrtko Ursulin Acked-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20230118131538.3558599-1-jani.nikula@intel.com commit 798cc8f093e580e12f0d7c3f5e3a19cbd79f99aa Author: Dmitry Baryshkov Date: Wed Jan 18 06:12:37 2023 +0200 dt-bindings: display/msm: rename mdp nodes to display-controller Follow the 'generic names' rule and rename mdp nodes to display-controller. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/518822/ Link: https://lore.kernel.org/r/20230118041243.1720520-6-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 1413ef55ceabb81e10848765161ae3d8457756d1 Author: Dmitry Baryshkov Date: Wed Jan 18 06:12:36 2023 +0200 dt-bindings: display/msm: rename mdss nodes to display-subsystem Follow the 'generic names' rule and rename mdss nodes to display-subsystem. Signed-off-by: Dmitry Baryshkov Reviewed-by: Rob Herring Patchwork: https://patchwork.freedesktop.org/patch/518821/ Link: https://lore.kernel.org/r/20230118041243.1720520-5-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 2d2d525cc4a0131deed91b729de2a0292f5871e0 Author: Dmitry Baryshkov Date: Wed Jan 18 06:12:35 2023 +0200 dt-bindings: display/msm: add core clock to the mdss bindings Add (optional) core clock to the mdss bindings to let the MDSS driver access hardware registers before MDP driver probes. Signed-off-by: Dmitry Baryshkov Reviewed-by: Rob Herring Patchwork: https://patchwork.freedesktop.org/patch/518816/ Link: https://lore.kernel.org/r/20230118041243.1720520-4-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 5c7199679aac3542f11a82298b307680ec653ea8 Author: Dmitry Baryshkov Date: Wed Jan 18 06:12:34 2023 +0200 dt-bindings: display/msm: add SoC-specific compats to qcom, mdp5.yaml Add platform-specific compatible entries to the qcom,mdp5.yaml to allow distinguishing between various platforms. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/518817/ Link: https://lore.kernel.org/r/20230118041243.1720520-3-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 385c8ac763b364444c1358f3dc31180e42b22ec7 Author: Dmitry Baryshkov Date: Wed Jan 18 06:12:33 2023 +0200 dt-bindings: display/msm: convert MDP5 schema to YAML format Convert the mdp5.txt into the yaml format. Changes to the existing (txt) schema: - MSM8996 has additional "iommu" clock, define it separately - Add new properties used on some of platforms: - interconnects, interconnect-names - iommus - power-domains - operating-points-v2, opp-table Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/518815/ Link: https://lore.kernel.org/r/20230118041243.1720520-2-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 5bf52f5e4d12b8109f348cab60cb7d51092c4270 Author: Arnd Bergmann Date: Wed Jan 18 10:02:12 2023 +0100 ARM: s3c: fix s3c64xx_set_timer_source prototype The prototype does not match the definition, as gcc-13 points out: arch/arm/mach-s3c/s3c64xx.c:169:13: error: conflicting types for 's3c64xx_set_timer_source' due to enum/integer mismatch; have 'void(unsigned int, unsigned int)' [-Werror=enum-int-mismatch] 169 | void __init s3c64xx_set_timer_source(unsigned int event, unsigned int source) | ^~~~~~~~~~~~~~~~~~~~~~~~ In file included from arch/arm/mach-s3c/s3c64xx.c:50: arch/arm/mach-s3c/s3c64xx.h:62:20: note: previous declaration of 's3c64xx_set_timer_source' with type 'void(enum s3c64xx_timer_mode, enum s3c64xx_timer_mode)' 62 | extern void __init s3c64xx_set_timer_source(enum s3c64xx_timer_mode event, | ^~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 4280506ac9bb ("ARM: SAMSUNG: Move all platforms to new clocksource driver") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230118090224.2162863-1-arnd@kernel.org Signed-off-by: Krzysztof Kozlowski commit 7f3d995c35da5d6300e019fa6434c0776ba0600a Author: Geert Uytterhoeven Date: Wed Jan 18 11:39:23 2023 +0100 dt-bindings: phy: ti,tcan104x-can: Document NXP TJR1443 The NXP TJR1443 High-speed CAN transceiver with Sleep mode is a pin-compatible alternative for the TI TCAN1043. Signed-off-by: Geert Uytterhoeven Acked-by: Marc Kleine-Budde Acked-by: Rob Herring Link: https://lore.kernel.org/r/6ee5e2ce00019bd3f77d6a702b38bab1a45f3bb0.1674037830.git.geert+renesas@glider.be Signed-off-by: Vinod Koul commit abb7c742397324f8676c5b622effdce911cd52e3 Author: Al Viro Date: Thu Jan 19 20:05:43 2023 -0500 sysv: fix handling of delete_entry and set_link failures similar to minixfs series - make sysv_set_link() report failures, lift dir_put_page() into the callers of sysv_set_link() and sysv_delete_entry(), make sysv_rename() handle failures in both. Signed-off-by: Al Viro commit 83005276d383387fec7e18c7a36daade579a23a7 Author: Fabio M. De Francesco Date: Thu Jan 19 16:32:32 2023 +0100 fs/sysv: Replace kmap() with kmap_local_page() kmap() is being deprecated in favor of kmap_local_page(). There are two main problems with kmap(): (1) It comes with an overhead as the mapping space is restricted and protected by a global lock for synchronization and (2) it also requires global TLB invalidation when the kmap’s pool wraps and it might block when the mapping space is fully utilized until a slot becomes available. With kmap_local_page() the mappings are per thread, CPU local, can take page faults, and can be called from any context (including interrupts). It is faster than kmap() in kernels with HIGHMEM enabled. Furthermore, the tasks can be preempted and, when they are scheduled to run again, the kernel virtual addresses are restored and still valid. Since kmap_local_page() would not break the strict rules of local mappings (i.e., the thread locality and the stack based nesting), this function can be easily and safely replace the deprecated API. Therefore, replace kmap() with kmap_local_page() in fs/sysv. kunmap_local() requires the mapping address, so return that address from dir_get_page() to be used in dir_put_page(). Suggested-by: Al Viro Suggested-by: Ira Weiny Signed-off-by: Fabio M. De Francesco Signed-off-by: Al Viro commit cff9b79e9ad579418df8e309e62b8196359f63a5 Merge: 1038bfb23649f efb4879f76236 Author: Jakub Kicinski Date: Thu Jan 19 19:47:18 2023 -0800 Merge tag 'mlx5-updates-2023-01-18' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2023-01-18 1) From Rahul, 1.1) extended range for PTP adjtime and adjphase 1.2) adjphase function to support hardware-only offset control 2) From Roi, code cleanup to the TC module. 3) From Maor, TC support for Geneve and GRE with VF tunnel offload 4) Cleanups and minor updates. * tag 'mlx5-updates-2023-01-18' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5e: Use read lock for eswitch get callbacks net/mlx5e: Remove redundant allocation of spec in create indirect fwd group net/mlx5e: Support Geneve and GRE with VF tunnel offload net/mlx5: E-Switch, Fix typo for egress net/mlx5e: Warn when destroying mod hdr hash table that is not empty net/mlx5e: TC, Use common function allocating flow mod hdr or encap mod hdr net/mlx5e: TC, Add tc prefix to attach/detach hdr functions net/mlx5e: TC, Pass flow attr to attach/detach mod hdr functions net/mlx5e: Add warning when log WQE size is smaller than log stride size net/mlx5e: Fail with messages when params are not valid for XSK net/mlx5: E-switch, Remove redundant comment about meta rules net/mlx5: Add hardware extended range support for PTP adjtime and adjphase net/mlx5: Add adjphase function to support hardware-only offset control net/mlx5: Suppress error logging on UCTX creation net/mlx5e: Suppress Send WQEBB room warning for PAGE_SIZE >= 16KB ==================== Link: https://lore.kernel.org/r/20230118183602.124323-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 1038bfb23649faf47fc0714dea42f472cdcf1784 Author: Piergiorgio Beruto Date: Wed Jan 18 16:47:31 2023 +0100 net: phy: fix use of uninit variable when setting PLCA config Coverity reported the following: *** CID 1530573: (UNINIT) drivers/net/phy/phy-c45.c:1036 in genphy_c45_plca_set_cfg() 1030 return ret; 1031 1032 val = ret; 1033 } 1034 1035 if (plca_cfg->node_cnt >= 0) vvv CID 1530573: (UNINIT) vvv Using uninitialized value "val". 1036 val = (val & ~MDIO_OATC14_PLCA_NCNT) | 1037 (plca_cfg->node_cnt << 8); 1038 1039 if (plca_cfg->node_id >= 0) 1040 val = (val & ~MDIO_OATC14_PLCA_ID) | 1041 (plca_cfg->node_id); drivers/net/phy/phy-c45.c:1076 in genphy_c45_plca_set_cfg() 1070 return ret; 1071 1072 val = ret; 1073 } 1074 1075 if (plca_cfg->burst_cnt >= 0) vvv CID 1530573: (UNINIT) vvv Using uninitialized value "val". 1076 val = (val & ~MDIO_OATC14_PLCA_MAXBC) | 1077 (plca_cfg->burst_cnt << 8); 1078 1079 if (plca_cfg->burst_tmr >= 0) 1080 val = (val & ~MDIO_OATC14_PLCA_BTMR) | 1081 (plca_cfg->burst_tmr); This is not actually creating a real problem because the path leading to 'val' being used uninitialized will eventually override the full content of that variable before actually using it for writing the register. However, the fix is simple and comes at basically no cost. Reported-by: coverity-bot Fixes: 493323416fed ("drivers/net/phy: add helpers to get/set PLCA configuration") Signed-off-by: Piergiorgio Beruto Reviewed-by: Jacob Keller Link: https://lore.kernel.org/r/f22f1864165a8dbac8b7a2277f341bc8e7a7b70d.1674056765.git.piergiorgio.beruto@gmail.com Signed-off-by: Jakub Kicinski commit 1c5cc012339d14510821497bafc5c179bc4a81b6 Merge: 854617f52ab42 63ba54a52c417 Author: Jakub Kicinski Date: Thu Jan 19 19:00:31 2023 -0800 Merge branch 'devlink-linecard-and-reporters-locking-cleanup' Jiri Pirko says: ==================== devlink: linecard and reporters locking cleanup This patchset does not change functionality. Patches 1-2 remove linecards lock and reference counting, converting them to be protected by devlink instance lock as the rest of the objects. Patches 3-4 fix the mlx5 auxiliary device devlink locking scheme whis is needed for proper reporters lock conversion done in the following patches. Patches 5-8 remove reporters locks and reference counting, converting them to be protected by devlink instance lock as the rest of the objects. Patches 9 and 10 convert linecards and reporters dumpit callbacks to recently introduced devlink_nl_instance_iter_dump() infra. Patch 11 removes no longer needed devlink_dump_for_each_instance_get() helper. The last patch adds assertion to devl_is_registered() as dependency on other locks is removed. ==================== Link: https://lore.kernel.org/r/20230118152115.1113149-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit 63ba54a52c417a0c632a5f85a2b912b8a2320358 Author: Jiri Pirko Date: Wed Jan 18 16:21:15 2023 +0100 devlink: add instance lock assertion in devl_is_registered() After region and linecard lock removals, this helper is always supposed to be called with instance lock held. So put the assertion here and remove the comment which is no longer accurate. Signed-off-by: Jiri Pirko Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit 543753d9e22e3943e2c31c4b5241afafb55dd52a Author: Jiri Pirko Date: Wed Jan 18 16:21:14 2023 +0100 devlink: remove devlink_dump_for_each_instance_get() helper devlink_dump_for_each_instance_get() is currently called from a single place in netlink.c. As there is no need to use this helper anywhere else in the future, remove it and call devlinks_xa_find_get() directly from while loop in devlink_nl_instance_iter_dump(). Also remove redundant idx clear on loop end as it is already done in devlink_nl_instance_iter_dump(). Signed-off-by: Jiri Pirko Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit 19be51a93d9986edcfecae010920ab1d5714479b Author: Jiri Pirko Date: Wed Jan 18 16:21:13 2023 +0100 devlink: convert reporters dump to devlink_nl_instance_iter_dump() Benefit from recently introduced instance iteration and convert reporters .dumpit generic netlink callback to use it. Signed-off-by: Jiri Pirko Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit 2557396808d916189ec5812f64e2b08bfb905807 Author: Jiri Pirko Date: Wed Jan 18 16:21:12 2023 +0100 devlink: convert linecards dump to devlink_nl_instance_iter_dump() Benefit from recently introduced instance iteration and convert linecards .dumpit generic netlink callback to use it. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit e994a75fb7f9dcdb53ff5c33859531141de30899 Author: Jiri Pirko Date: Wed Jan 18 16:21:11 2023 +0100 devlink: remove reporter reference counting As long as the reporter life time is protected by devlink instance lock, the reference counting is no longer needed. Remove it. Signed-off-by: Jiri Pirko Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit 9f167327efecc3977deff0c852760e3759b0c2a7 Author: Jiri Pirko Date: Wed Jan 18 16:21:10 2023 +0100 devlink: remove devl*_port_health_reporter_destroy() Remove port-specific health reporter destroy function as it is currently the same as the instance one so no longer needed. Inline __devlink_health_reporter_destroy() as it is no longer called from multiple places. Signed-off-by: Jiri Pirko Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit 1dea3b4e4c52f4bed64d1c527d548e82ccaea15a Author: Jiri Pirko Date: Wed Jan 18 16:21:09 2023 +0100 devlink: remove reporters_lock Similar to other devlink objects, rely on devlink instance lock and remove object specific reporters_lock. Signed-off-by: Jiri Pirko Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit dfdfd1305ddecb990566193f2ba8a11bccba4cde Author: Jiri Pirko Date: Wed Jan 18 16:21:08 2023 +0100 devlink: protect health reporter operation with instance lock Similar to other devlink objects, protect the reporters list by devlink instance lock. Alongside add unlocked versions of health reporter create/destroy functions and use them in drivers on call paths where the instance lock is held. Signed-off-by: Jiri Pirko Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit 65a20c2eb96d698206846b27f9ac5ab05a24d569 Author: Jiri Pirko Date: Wed Jan 18 16:21:07 2023 +0100 net/mlx5: Remove MLX5E_LOCKED_FLOW flag The MLX5E_LOCKED_FLOW flag is not checked anywhere now so remove it entirely. Signed-off-by: Jiri Pirko Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit ee75f1fc44dd73f0323118f31cf91f9b6db147fa Author: Jiri Pirko Date: Wed Jan 18 16:21:06 2023 +0100 net/mlx5e: Create separate devlink instance for ethernet auxiliary device The fact that devlink instance lock is held over mlx5 auxiliary devices probe and remove routines brought a need to conditionally take devlink instance lock there. The code is checking a MLX5E_LOCKED_FLOW flag in mlx5 priv struct. This is racy and may lead to access devlink objects without holding instance lock or deadlock. To avoid this, the only lock-wise sane solution is to make the devlink entities created by the auxiliary device independent on the original pci devlink instance. Create devlink instance for the auxiliary device and put the uplink port instance there alongside with the port health reporters. Signed-off-by: Jiri Pirko Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit 3a10173f48aa1bae64baf0fea228c6045996b117 Author: Jiri Pirko Date: Wed Jan 18 16:21:05 2023 +0100 devlink: remove linecard reference counting As long as the linecard life time is protected by devlink instance lock, the reference counting is no longer needed. Remove it. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit 5cc9049cb9021a46ad5711a946eb3ded47eed0de Author: Jiri Pirko Date: Wed Jan 18 16:21:04 2023 +0100 devlink: remove linecards lock Similar to other devlink objects, convert the linecards list to be protected by devlink instance lock. Alongside with that rename the create/destroy() functions to devl_* to indicate the devlink instance lock needs to be held while calling them. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit 854617f52ab4241896190abac7688eaaf6774451 Author: Siddharth Vadapalli Date: Wed Jan 18 16:51:36 2023 +0530 net: ethernet: ti: am65-cpsw: Handle -EPROBE_DEFER for Serdes PHY In the am65_cpsw_init_serdes_phy() function, the error handling for the call to the devm_of_phy_get() function misses the case where the return value of devm_of_phy_get() is ERR_PTR(-EPROBE_DEFER). Proceeding without handling this case will result in a crash when the "phy" pointer with this value is dereferenced by phy_init() in am65_cpsw_enable_phy(). Fix this by adding appropriate error handling code. Reported-by: Geert Uytterhoeven Fixes: dab2b265dd23 ("net: ethernet: ti: am65-cpsw: Add support for SERDES configuration") Suggested-by: Geert Uytterhoeven Signed-off-by: Siddharth Vadapalli Reviewed-by: Roger Quadros Link: https://lore.kernel.org/r/20230118112136.213061-1-s-vadapalli@ti.com Signed-off-by: Jakub Kicinski commit a76e88c2942575bc43ea88d0f05d245b26859130 Author: Dan Carpenter Date: Wed Jan 18 13:28:21 2023 +0300 net: dsa: microchip: ptp: Fix error code in ksz_hwtstamp_set() We want to return negative error codes here but the copy_to/from_user() functions return the number of bytes remaining to be copied. Fixes: c59e12a140fb ("net: dsa: microchip: ptp: Initial hardware time stamping support") Signed-off-by: Dan Carpenter Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/Y8fJxSvbl7UNVHh/@kili Signed-off-by: Jakub Kicinski commit 482acbd68ea391b7a4033c90a50b9cf680afbe93 Merge: 3ef4a8c8963b2 f8f24a524114b Author: Jakub Kicinski Date: Thu Jan 19 18:55:37 2023 -0800 Merge branch 'net-sfp-cleanup-i2c-dt-acpi-fwnode-includes' Russell King says: ==================== net: sfp: cleanup i2c / dt / acpi / fwnode / includes This series cleans up the DT/fwnode/ACPI code in the SFP cage driver: 1. Use the newly introduced i2c_get_adapter_by_fwnode(), which removes the need to know about ACPI handles to find the I2C device. 2. Use device_get_match_data() to get the match data, rather than having to look up the matching DT device_id to get at the data. 3. Rename gpio_of_names, as this is not DT specific. 4. Remove acpi.h include which is no longer necessary. 5. Remove ctype.h include which, as far as I can tell, was never necessary. ==================== Link: https://lore.kernel.org/r/Y8fH+Vqx6huYQFDU@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit f8f24a524114be2bcb4efbebcb37ab04c5b46c94 Author: Russell King (Oracle) Date: Wed Jan 18 10:21:18 2023 +0000 net: sfp: remove unused ctype.h include An include of linux/ctype.h was added in commit 1323061a018a ("net: phy: sfp: Add HWMON support for module sensors") but nothing was used from this header file. Remove this unnecessary include. Signed-off-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski commit 1154261ef0fb5df1ce819cb84e94e4fe0def3838 Author: Russell King (Oracle) Date: Wed Jan 18 10:21:13 2023 +0000 net: sfp: remove acpi.h include Nothing in the sfp code now references anything from the ACPI header, everything is done via fwnode APIs, so get rid of this header. Signed-off-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski commit f35cb547865ca32084b108d79c44ddb71117b42d Author: Russell King (Oracle) Date: Wed Jan 18 10:21:08 2023 +0000 net: sfp: rename gpio_of_names[] There's nothing DT specific about the gpio_of_names array, let's drop the _of infix. Signed-off-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski commit b71dda81123f4158d4c9d079123c5b460af7a526 Author: Russell King (Oracle) Date: Wed Jan 18 10:21:03 2023 +0000 net: sfp: use device_get_match_data() Rather than using of_match_node() to get the matching of_device_id to then retrieve the match data, use device_get_match_data() instead to avoid firmware specific functions, and free the driver from having firmware specific code. Signed-off-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski commit ff31a0c496b8eb6728fdfb8091df50653523aa19 Author: Russell King (Oracle) Date: Wed Jan 18 10:20:58 2023 +0000 net: sfp: use i2c_get_adapter_by_fwnode() Use the newly introduced i2c_get_adapter_by_fwnode() API, so that we can retrieve the I2C adapter in a firmware independent manner once we have the fwnode handle for the adapter. Reviewed-by: Mika Westerberg Signed-off-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski commit 00b8f39f1d15c7e16e3f5ca7538f522f3a89131f Merge: 92afc5329a5b2 6a5f2d6ee8d51 Author: Alexei Starovoitov Date: Thu Jan 19 17:07:15 2023 -0800 Merge branch 'kallsyms: Optimize the search for module symbols by livepatch and bpf' Jiri Olsa says: ==================== hi, sending new version of [1] patchset posted originally by Zhen Lei. It contains 2 changes that improove search performance for livepatch and bpf. v3 changes: - fixed off by 1 issue, simplified condition, added acks [Song] - added module attach as subtest [Andrii] v2 changes: - reworked the bpf change and meassured the performance - adding new selftest to benchmark kprobe multi module attachment - skipping patch 3 as requested by Zhen Lei - added Reviewed-by for patch 1 [Petr Mladek] thanks, jirka [1] https://lore.kernel.org/bpf/20221230112729.351-1-thunder.leizhen@huawei.com/ --- Jiri Olsa (2): selftests/bpf: Add serial_test_kprobe_multi_bench_attach_kernel/module tests bpf: Change modules resolving for kprobe multi link ==================== Signed-off-by: Alexei Starovoitov commit 6a5f2d6ee8d515d5912e33d63a7386d03854a655 Author: Jiri Olsa Date: Mon Jan 16 11:10:09 2023 +0100 bpf: Change modules resolving for kprobe multi link We currently use module_kallsyms_on_each_symbol that iterates all modules/symbols and we try to lookup each such address in user provided symbols/addresses to get list of used modules. This fix instead only iterates provided kprobe addresses and calls __module_address on each to get list of used modules. This turned out to be simpler and also bit faster. On my setup with workload (executed 10 times): # test_progs -t kprobe_multi_bench_attach/modules Current code: Performance counter stats for './test.sh' (5 runs): 76,081,161,596 cycles:k ( +- 0.47% ) 18.3867 +- 0.0992 seconds time elapsed ( +- 0.54% ) With the fix: Performance counter stats for './test.sh' (5 runs): 74,079,889,063 cycles:k ( +- 0.04% ) 17.8514 +- 0.0218 seconds time elapsed ( +- 0.12% ) Signed-off-by: Jiri Olsa Reviewed-by: Zhen Lei Reviewed-by: Petr Mladek Link: https://lore.kernel.org/r/20230116101009.23694-4-jolsa@kernel.org Signed-off-by: Alexei Starovoitov commit edac4b5b185ed3d2717b8267e28e0a1187c0bc08 Author: Jiri Olsa Date: Mon Jan 16 11:10:08 2023 +0100 selftests/bpf: Add serial_test_kprobe_multi_bench_attach_kernel/module tests Add bench test for module portion of the symbols as well. # ./test_progs -v -t kprobe_multi_bench_attach_module bpf_testmod.ko is already unloaded. Loading bpf_testmod.ko... Successfully loaded bpf_testmod.ko. test_kprobe_multi_bench_attach:PASS:get_syms 0 nsec test_kprobe_multi_bench_attach:PASS:kprobe_multi_empty__open_and_load 0 nsec test_kprobe_multi_bench_attach:PASS:bpf_program__attach_kprobe_multi_opts 0 nsec test_kprobe_multi_bench_attach: found 26620 functions test_kprobe_multi_bench_attach: attached in 0.182s test_kprobe_multi_bench_attach: detached in 0.082s #96 kprobe_multi_bench_attach_module:OK Summary: 1/0 PASSED, 0 SKIPPED, 0 FAILED Successfully unloaded bpf_testmod.ko. It's useful for testing kprobe multi link modules resolving. Acked-by: Song Liu Signed-off-by: Jiri Olsa Link: https://lore.kernel.org/r/20230116101009.23694-3-jolsa@kernel.org Signed-off-by: Alexei Starovoitov commit 07cc2c931e8e1083a31f4c51d2244fe264af63bf Author: Zhen Lei Date: Mon Jan 16 11:10:07 2023 +0100 livepatch: Improve the search performance of module_kallsyms_on_each_symbol() Currently we traverse all symbols of all modules to find the specified function for the specified module. But in reality, we just need to find the given module and then traverse all the symbols in it. Let's add a new parameter 'const char *modname' to function module_kallsyms_on_each_symbol(), then we can compare the module names directly in this function and call hook 'fn' after matching. If 'modname' is NULL, the symbols of all modules are still traversed for compatibility with other usage cases. Phase1: mod1-->mod2..(subsequent modules do not need to be compared) | Phase2: -->f1-->f2-->f3 Assuming that there are m modules, each module has n symbols on average, then the time complexity is reduced from O(m * n) to O(m) + O(n). Reviewed-by: Petr Mladek Acked-by: Song Liu Signed-off-by: Zhen Lei Signed-off-by: Jiri Olsa Acked-by: Miroslav Benes Reviewed-by: Luis Chamberlain Link: https://lore.kernel.org/r/20230116101009.23694-2-jolsa@kernel.org Signed-off-by: Alexei Starovoitov commit c26ddc49c9080975cc03cf3bd6917c3fb37d808b Author: Fabio M. De Francesco Date: Thu Jan 19 16:32:31 2023 +0100 fs/sysv: Use dir_put_page() in sysv_rename() Use the dir_put_page() helper in sysv_rename() instead of open-coding two kunmap() + put_page(). Cc: Al Viro Suggested-by: Ira Weiny Signed-off-by: Fabio M. De Francesco Signed-off-by: Al Viro commit 8dd6c7b2944ce349f06db763d7a2a90a0b83ba0d Author: Fabio M. De Francesco Date: Thu Jan 19 16:32:30 2023 +0100 fs/sysv: Change the signature of dir_get_page() Change the signature of dir_get_page() in order to prepare this function to the conversion to the use of kmap_local_page(). Change also those call sites which are required to adjust to the new signature. Cc: Ira Weiny Suggested-by: Al Viro Signed-off-by: Fabio M. De Francesco Signed-off-by: Al Viro commit 4bb1a1375ac33950385d17321c546aeb520ba152 Author: Fabio M. De Francesco Date: Thu Jan 19 16:32:29 2023 +0100 fs/sysv: Use the offset_in_page() helper Use the offset_in_page() helper because it is more suitable than doing explicit subtractions between pointers to directory entries and kernel virtual addresses of mapped pages. Cc: Ira Weiny Suggested-by: Al Viro Signed-off-by: Fabio M. De Francesco Signed-off-by: Al Viro commit 61a9b7129070e07c207d89fffbce577223507327 Merge: ae4d39f753080 f07b2b3f9d47f Author: Palmer Dabbelt Date: Thu Jan 19 16:39:53 2023 -0800 Merge patch series "Putting some basic order on isa extension lists" This cleans up the ISA string handling to more closely match a version of the ISA spec. This is visible in /proc/cpuinfo and the ordering changes may break something in userspace, but these orderings have changed before without issues so with any luck that's still the case. This also adds documentation so userspace has a better idea of what is intended when it comes to compatibility for /proc/cpuinfo, which should help everyone as this will likely keep changing. * b4-shazam-merge: Documentation: riscv: add a section about ISA string ordering in /proc/cpuinfo RISC-V: resort all extensions in consistent orders RISC-V: clarify ISA string ordering rules in cpu.c Link: https://lore.kernel.org/r/20221205144525.2148448-1-conor.dooley@microchip.com Signed-off-by: Palmer Dabbelt commit 4309093ecb841bbd27fcd23525dd41b9a6b437ea Author: Christoph Hellwig Date: Wed Jan 18 18:30:25 2023 +0100 sysv: 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 2cb6a44220b974a7832d1a09630b4cee870b023a Author: Al Viro Date: Thu Jan 19 19:29:26 2023 -0500 minix_rename(): minix_delete_entry() might fail Signed-off-by: Al Viro commit f556e776b14ae4f853147705603d263bfa20ecd1 Author: Christoph Hellwig Date: Wed Jan 18 18:30:24 2023 +0100 minix: 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 2d1a9d599b3ed9b9c58f64b8b71b5b9d770ceacf Author: Christoph Hellwig Date: Wed Jan 18 18:30:23 2023 +0100 minix: fix error handling in minix_set_link If minix_prepare_chunk fails, updating c/mtime and marking the dir inode dirty is wrong, as the inode hasn't been modified. Also propagate the error to the caller. Note that this moves the dir_put_page call later, but that matches other uses of this helper in the directory code. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit b61d15d5ff67c07907c194d4354ec0c35bc657d1 Author: Christoph Hellwig Date: Wed Jan 18 18:30:22 2023 +0100 minix: fix error handling in minix_delete_entry If minix_prepare_chunk fails, updating c/mtime and marking the dir inode dirty is wrong, as the inode hasn't been modified. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 35bb6a092cfcab895ea7e9c31a2cc6b80b25c134 Author: Christoph Hellwig Date: Wed Jan 18 18:30:21 2023 +0100 minix: move releasing pages into unlink and rename Instead of consuming the page reference and kmap in the low-level minix_delete_entry and minix_set_link helpers, do it in the callers where that code can be shared with the error cleanup path. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 344da544f177f919cf6919e5abcd388f27aa53db Author: Paul E. McKenney Date: Fri Dec 16 16:52:01 2022 -0800 x86/nmi: Print reasons why backtrace NMIs are ignored Instrument nmi_trigger_cpumask_backtrace() to dump out diagnostics based on evidence accumulated by exc_nmi(). These diagnostics are dumped for CPUs that ignored an NMI backtrace request for more than 10 seconds. [ paulmck: Apply Ingo Molnar feedback. ] 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: Ingo Molnar commit 1a3ea611fc105759cf1023e922d00cf44569b8bb Author: Paul E. McKenney Date: Fri Dec 16 15:57:51 2022 -0800 x86/nmi: Accumulate NMI-progress evidence in exc_nmi() CPUs ignoring NMIs is often a sign of those CPUs going bad, but there are quite a few other reasons why a CPU might ignore NMIs. Therefore, accumulate evidence within exc_nmi() as to what might be preventing a given CPU from responding to an NMI. [ paulmck: Apply Peter Zijlstra feedback. ] 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: Ingo Molnar commit eba773596be9c21a8e979d7e653f721d1d0341a9 Author: Kees Cook Date: Fri Dec 9 11:57:45 2022 -0800 LoadPin: Allow filesystem switch when not enforcing For LoadPin to be used at all in a classic distro environment, it needs to allow for switching filesystems (from the initramfs to the "real" root filesystem). To allow for this, if the "enforce" mode is not set at boot, reset the pinned filesystem tracking when the pinned filesystem gets unmounted instead of invalidating further loads. Once enforcement is set, it cannot be unset, and the pinning will stick. This means that distros can build with CONFIG_SECURITY_LOADPIN=y, but with CONFIG_SECURITY_LOADPIN_ENFORCE disabled, but after boot is running, the system can enable enforcement: $ sysctl -w kernel.loadpin.enforced=1 Cc: Paul Moore Cc: James Morris Cc: "Serge E. Hallyn" Cc: linux-security-module@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Serge Hallyn Link: https://lore.kernel.org/r/20221209195746.1366607-4-keescook@chromium.org commit 2cfaa84efc25e52f116507a2e69781a40c4dda41 Author: Kees Cook Date: Fri Dec 9 11:57:44 2022 -0800 LoadPin: Move pin reporting cleanly out of locking Refactor the pin reporting to be more cleanly outside the locking. It was already, but moving it around helps clear the path for the root to switch when not enforcing. Cc: Paul Moore Cc: James Morris Cc: "Serge E. Hallyn" Cc: linux-security-module@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Serge Hallyn Link: https://lore.kernel.org/r/20221209195746.1366607-3-keescook@chromium.org commit 60ba1028fc7b73e3cfbcfe7087a2e87e8b1fd208 Author: Kees Cook Date: Fri Dec 9 11:57:43 2022 -0800 LoadPin: Refactor sysctl initialization In preparation for shifting root mount when not enforcing, split sysctl logic out into a separate helper, and unconditionally register the sysctl, but only make it writable when the device is writable. Cc: Paul Moore Cc: James Morris Cc: "Serge E. Hallyn" Cc: linux-security-module@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Serge Hallyn Link: https://lore.kernel.org/r/20221209195746.1366607-2-keescook@chromium.org commit b76ded214633cf5067ff51642a360eb87242c411 Author: Kees Cook Date: Fri Dec 9 11:57:42 2022 -0800 LoadPin: Refactor read-only check into a helper In preparation for allowing mounts to shift when not enforced, move read-only checking into a separate helper. Cc: Paul Moore Cc: James Morris Cc: "Serge E. Hallyn" Cc: linux-security-module@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Serge Hallyn Link: https://lore.kernel.org/r/20221209195746.1366607-1-keescook@chromium.org commit b5fc3ca3954fd0382bb576a5a295c03a089ac7e3 Author: Kees Cook Date: Thu Jan 5 13:57:10 2023 -0800 ARM: ixp4xx: Replace 0-length arrays with flexible arrays Zero-length arrays are deprecated[1]. Replace npe_load_firmware's union of 0-length arrays with flexible arrays. Detected with GCC 13, using -fstrict-flex-arrays=3: drivers/soc/ixp4xx/ixp4xx-npe.c: In function 'npe_load_firmware': drivers/soc/ixp4xx/ixp4xx-npe.c:570:60: warning: array subscript i is outside array bounds of 'u32[0]' {aka 'unsigned int[]'} [-Warray-bounds=] 570 | image->data[i] = swab32(image->data[i]); include/uapi/linux/swab.h:115:54: note: in definition of macro '__swab32' 115 | #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x)) | ^ drivers/soc/ixp4xx/ixp4xx-npe.c:570:42: note: in expansion of macro 'swab32' 570 | image->data[i] = swab32(image->data[i]); | ^~~~~~ drivers/soc/ixp4xx/ixp4xx-npe.c:522:29: note: while referencing 'data' 522 | u32 data[0]; | ^~~~ [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays Cc: Krzysztof Halasa Cc: Linus Walleij Cc: Arnd Bergmann Cc: "Gustavo A. R. Silva" Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Kees Cook Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230105215706.never.027-kees@kernel.org commit b4a9b36e69e935104e52e561aa9a82d39b5efc36 Author: Alex Deucher Date: Wed Jan 18 16:07:10 2023 -0500 Documentation/gpu: update dGPU asic info table Update to the latest launched dGPUs. Link: https://www.amd.com/en/graphics/radeon-rx-graphics Link: https://www.amd.com/en/graphics/amd-radeon-rx-laptops Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit 603a521ec2796c221acfe0ea6a84338f589eb434 Author: ye xingchen Date: Wed Jan 18 15:39:00 2023 +0800 drm/amd/display: remove duplicate included header files resource.h is included more than once. Signed-off-by: ye xingchen Signed-off-by: Alex Deucher commit e3e84b0a03a303421704bd3f305ca91a5226dc7d Author: Marek Olšák Date: Sat Dec 24 17:44:26 2022 -0500 drm/amdgpu: return the PCIe gen and lanes from the INFO ioctl For computing PCIe bandwidth in userspace and troubleshooting PCIe bandwidth issues. Note that this intentionally fills holes and padding in drm_amdgpu_info_device. Mesa MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20790 Signed-off-by: Marek Olšák Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 26fd808b01e730fd45673619817a3feafb1230d7 Author: Pierre-Eric Pelloux-Prayer Date: Thu Jan 12 17:53:35 2023 +0100 drm/amdgpu: print bo inode number instead of ptr This allows to correlate the infos printed by /sys/kernel/debug/dri/n/amdgpu_gem_info to the ones found in /proc/.../fdinfo and /sys/kernel/debug/dma_buf/bufinfo. Signed-off-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 071f526a13e138a42e7bba4300e753def1024001 Author: Tao Zhou Date: Thu Jan 19 11:07:40 2023 +0800 drm/amdgpu: retire unused get_umc_v6_7_channel_index Fix the following compile warning: drivers/gpu/drm/amd/amdgpu/umc_v6_7.c:53:24: warning: unused function 'get_umc_v6_7_channel_index' [-Wunused-function] static inline uint32_t get_umc_v6_7_channel_index(struct amdgpu_device *adev, ^ 1 warning generated. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 2cfb737b4b54447e0d801e17b5d1d524cd2d3987 Author: YiPeng Chai Date: Tue Jan 17 16:06:49 2023 +0800 drm/amdgpu: Optimize sdma ras block initialization code for sdma v4_0 Optimize sdma ras block initialization code for sdma v4_0. Signed-off-by: YiPeng Chai Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 3ba3c2db2f59ca1258cbd064cbd6e4ef316205d9 Author: Arnd Bergmann Date: Wed Jan 18 17:06:27 2023 +0100 drm/amd/display: fix hdmi_encoded_link_bw definition Some of the data structures are hidden when CONFIG_DRM_AMD_DC_DCN is disabled, which leads to a link failure: drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c:234:21: error: 'union hdmi_encoded_link_bw' declared inside parameter list will not be visible outside of this definition or declaration [-Werror] 234 | const union hdmi_encoded_link_bw hdmi_encoded_link_bw) | ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c:234:42: error: parameter 2 ('hdmi_encoded_link_bw') has incomplete type 234 | const union hdmi_encoded_link_bw hdmi_encoded_link_bw) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c:232:17: error: function declaration isn't a prototype [-Werror=strict-prototypes] 232 | static uint32_t intersect_frl_link_bw_support( | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c: In function 'get_active_converter_info': drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c:1126:76: error: storage size of 'hdmi_encoded_link_bw' isn't known 1126 | union hdmi_encoded_link_bw hdmi_encoded_link_bw; | ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c:1130:101: error: 'struct ' has no member named 'MAX_ENCODED_LINK_BW_SUPPORT' 1130 | hdmi_color_caps.bits.MAX_ENCODED_LINK_BW_SUPPORT); There is probably no need to hide the data structure, and removing the #ifdef makes it build cleanly. Fixes: d5a43956b73b ("drm/amd/display: move dp capability related logic to link_dp_capability") Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit 5e3ec82c0243f77e31c3ce6ccbf722cb96db0cee Author: Arnd Bergmann Date: Wed Jan 18 10:29:56 2023 +0100 drm/amd/display: fix dp_retrieve_lttpr_cap() return value gcc-13 notices a mismatch between the return type of dp_retrieve_lttpr_cap() and the returned value: drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c: In function 'dp_retrieve_lttpr_cap': drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c:1465:24: error: implicit conversion from 'enum ' to 'enum dc_status' [-Werror=enum-conversion] 1465 | return false; | ^~~~~ Change the value to an actual dc_status code and remove the bogus initialization that was apparently meant to get returned here. Fixes: b473bd5fc333 ("drm/amd/display: refine wake up aux in retrieve link caps") Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit a57b24e170b1ffe97c4571b366c0cf1fe09e9a60 Author: YiPeng Chai Date: Tue Jan 17 15:44:25 2023 +0800 drm/amdgpu: Add sdma ras function on sdma v6_0_3 Add sdma ras function on sdma v6_0_3. Signed-off-by: YiPeng Chai Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 9aa15370819294beb7eb67c9dcbf654d79ff8790 Author: Alex Deucher Date: Wed Jan 18 09:21:22 2023 -0500 drm/amd/display: disable S/G display on DCN 3.1.4 Causes flickering or white screens in some configurations. Disable it for now until we can fix the issue. Cc: roman.li@amd.com Cc: yifan1.zhang@amd.com Acked-by: Christian König Reviewed-by: Roman Li Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher commit 3cc67fe1b3aa1ac4720e002f2aa2d08c9199a584 Author: Alex Deucher Date: Wed Jan 18 09:19:21 2023 -0500 drm/amd/display: disable S/G display on DCN 3.1.5 Causes flickering or white screens in some configurations. Disable it for now until we can fix the issue. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2354 Cc: roman.li@amd.com Cc: yifan1.zhang@amd.com Acked-by: Christian König Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher commit 96b810d8c67dea53f669b2229118ded90e809fd3 Author: Mario Limonciello Date: Wed Jan 18 16:47:11 2023 -0600 drm/amd: decrease message about missing PSP runtime database to debug Laptops with APUs from a variety of manufacturers and generations show a warning about a missing PSP runtime database. As it's not required for PSP to dump this database into framebuffer, decrease messages about it missing to debug. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit bd3149014dff8f90c3d700778274fb5729986a01 Author: Mario Limonciello Date: Wed Jan 18 16:47:09 2023 -0600 drm/amd/display: Decrease messaging about DP alt mode state to debug Currently plugging in a USB-C device that issues an HPD will emit a warning level message `DP Alt mode state on HPD: %d`. This is needlessly noisy for most people, decrease it to debug so that it can be turned on by dynamic debug as needed. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 6482ba5d4bc80e51b7a34a0322b71f562ad4db86 Author: Alex Deucher Date: Fri Jan 13 10:56:58 2023 -0500 drm/amdgpu/vcn4: fail to schedule IB for AV1 if VCN0 is harvested Only VCN0 supports AV1. Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit a6de636eb04f146d23644dbbb7173e142452a9b7 Author: Alex Deucher Date: Fri Jan 13 10:45:59 2023 -0500 drm/amdgpu/soc21: don't expose AV1 if VCN0 is harvested Only VCN0 supports AV1. Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 3c6f90f4aa17b414c087b7c1b30a9117a0495a8a Author: Alex Deucher Date: Fri Jan 13 10:55:41 2023 -0500 drm/amdgpu/vcn3: fail to schedule IB for AV1 if VCN0 is harvested Only VCN0 supports AV1. Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 384334120b66af4dc5831f9d4b662a9fb62de8dc Author: Alex Deucher Date: Fri Jan 13 10:40:42 2023 -0500 drm/amdgpu/nv: don't expose AV1 if VCN0 is harvested Only VCN0 supports AV1. Reviewed-by: Leo Liu Acked-by: Christian König Signed-off-by: Alex Deucher commit 350ae9ec3fdf3a8679e19fe0fb98cb1b61728284 Author: Mario Limonciello Date: Wed Jan 18 07:40:57 2023 -0600 Documentation/gpu: Add Raphael to apu-asic-info-table Raphael launched in 2022 but was missed to add to this table. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 7b785c47c971f705d7ddff16b2bc2d3af9f8c880 Author: Mario Limonciello Date: Wed Jan 18 07:34:09 2023 -0600 Documentation/gpu: Add Mendocino to apu-asic-info-table Mendocino launched in 2023 and uses the new naming scheme for APU processors. Link: https://community.amd.com/t5/corporate/announcing-new-model-numbers-for-2023-mobile-processors/ba-p/543985 Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit e0d06733c730dd372e002b45e961cd324fa16595 Author: Mario Limonciello Date: Wed Jan 18 07:31:13 2023 -0600 Documentation/gpu: Update lines for GREEN_SARDINE and YELLOW_CARP These products have launched, so add matching codenames. Also AMD has announced that both of these products have new refresh variants that launch in 2023 using the new naming scheme, so add that information. Link: https://community.amd.com/t5/corporate/announcing-new-model-numbers-for-2023-mobile-processors/ba-p/543985 Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 7bdcc67cf29f72852ba4e77fbbf4c57a99125f9c Author: Mario Limonciello Date: Wed Jan 18 07:27:02 2023 -0600 Documentation/gpu: Add MP0 version to apu-asic-info-table MP0 version is useful to know to figure out which firmware is intended for a platform. Add a column for all supported APUs. v2: squash in column fix (Mario) Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 3a06dec1506e870c66833fc53c586af765d279f3 Author: Gustavo Sousa Date: Wed Jan 18 12:52:49 2023 -0300 drm/i915/gt: Move LSC_CHICKEN_BIT* workarounds to correct function That register doesn't belong to a specific engine, so the proper placement for workarounds programming it should be general_render_compute_wa_init(). Signed-off-by: Gustavo Sousa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230118155249.41551-3-gustavo.sousa@intel.com commit 0c3064cf33fbfa8a25871d847e715f33b64f323e Author: Gustavo Sousa Date: Wed Jan 18 12:52:48 2023 -0300 drm/i915/doc: Document where to implement register workarounds Extend the existing documentation in gt/intel_workarounds.c to make it clear which functions register workarounds should be implemented in according to their types. Signed-off-by: Gustavo Sousa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230118155249.41551-2-gustavo.sousa@intel.com commit cecafc0a830f7ea89bc11c644e2841f603fcc4e6 Author: Yu Zhang Date: Thu Jan 5 21:01:27 2023 +0800 KVM: MMU: Make the definition of 'INVALID_GPA' common KVM already has a 'GPA_INVALID' defined as (~(gpa_t)0) in kvm_types.h, and it is used by ARM code. We do not need another definition of 'INVALID_GPA' for X86 specifically. Instead of using the common 'GPA_INVALID' for X86, replace it with 'INVALID_GPA', and change the users of 'GPA_INVALID' so that the diff can be smaller. Also because the name 'INVALID_GPA' tells the user we are using an invalid GPA, while the name 'GPA_INVALID' is emphasizing the GPA is an invalid one. No functional change intended. Signed-off-by: Yu Zhang Reviewed-by: Paul Durrant Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20230105130127.866171-1-yu.c.zhang@linux.intel.com Signed-off-by: Oliver Upton commit 17f0669cfff88519fc05e32f78e8f5064c72727d Author: Sohil Mehta Date: Wed Jan 11 19:32:11 2023 +0000 x86/vsyscall: Fix documentation to reflect the default mode The default vsyscall mode has been updated from emulate to xonly for a while. Update the kernel-parameters doc to reflect that. Fixes: 625b7b7f79c6 ("x86/vsyscall: Change the default vsyscall mode to xonly") Cc: Andy Lutomirski Signed-off-by: Sohil Mehta Reviewed-by: Tony Luck Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20230111193211.1987047-1-sohil.mehta@intel.com Signed-off-by: Jonathan Corbet commit cac02cbb91f31e28a503aaf2eff340b62f5bdd11 Author: Yanteng Si Date: Tue Jan 17 17:34:16 2023 +0800 docs/zh_CN: Add a glossary of Chinese translation terms As more and more documents are translated and some English words are translated into different Chinese, it seems that we need a glossary of Chinese translation terms. Signed-off-by: Yanteng Si Reviewed-by: Alex Shi Reviewed-by: Tang Yizhou Acked-by: Wu XiangCheng Link: https://lore.kernel.org/r/20230117093416.2262787-1-siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit aa81cb9d9723694bb18359adbef7964030758dba Author: Gustavo A. R. Silva Date: Mon Jan 9 19:40:38 2023 -0600 x86/fpu: Replace zero-length array in struct xregs_state 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] Signed-off-by: Gustavo A. R. Silva Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays [1] Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [2] Link: https://github.com/KSPP/linux/issues/78 Link: https://lore.kernel.org/r/Y7zCFpa2XNs/o9YQ@work commit b4f34f0b662fd7c1a1d185527c31570f68e3ce57 Author: Peter Foley Date: Mon Jan 16 17:58:10 2023 -0500 Documentation: Avoid duplicate Kconfig inclusion Documentation/Kconfig is already included from top-level, avoid including it again from lib/Kconfig.debug. Signed-off-by: Peter Foley Acked-by: Randy Dunlap Tested-by: Randy Dunlap Link: https://lore.kernel.org/r/20230114-doc-v2-1-853a8434ac95@pefoley.com Signed-off-by: Jonathan Corbet commit 0207a7dea8b3c9087560a9631b7c91197bf8c1bb Author: Stefan Wahren Date: Fri Jan 13 21:58:42 2023 +0100 ARM: bcm2835_defconfig: Switch to SimpleDRM fbdev is consider deprecated, so switch to DRM_SIMPLEDRM which works as a drop-in replacement for FB_SIMPLE. Suggested-by: Arnd Bergmann Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/20230113205842.17051-2-stefan.wahren@i2se.com Signed-off-by: Florian Fainelli commit afc8dd99840b7fb7190e769a893cda673bc3a907 Author: Stefan Wahren Date: Fri Jan 13 21:58:41 2023 +0100 ARM: bcm2835_defconfig: Enable the framebuffer Booting Linux on a Raspberry Pi based on bcm2835_defconfig there is no display activity. Enable CONFIG_FB which is nowadays required for CONFIG_FB_SIMPLE and CONFIG_FRAMEBUFFER_CONSOLE. Fixes: f611b1e7624c ("drm: Avoid circular dependencies for CONFIG_FB") Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/20230113205842.17051-1-stefan.wahren@i2se.com Signed-off-by: Florian Fainelli commit 4998897b1e96d624bf094e5785b27023e17ba570 Author: Rob Herring Date: Mon Jan 9 13:26:22 2023 -0600 perf: arm_spe: Support new SPEv1.2/v8.7 'not taken' event Arm SPEv1.2 (Armv8.7/v9.2) adds a new event, 'not taken', in bit 6 of the PMSEVFR_EL1 register. Update arm_spe_pmsevfr_res0() to support the additional event. Tested-by: James Clark Signed-off-by: Rob Herring Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/20220825-arm-spe-v8-7-v4-6-327f860daf28@kernel.org Signed-off-by: Will Deacon commit 05e4c88e2b5c9f77409577702d6d516682e1ce14 Author: Rob Herring Date: Mon Jan 9 13:26:21 2023 -0600 perf: arm_spe: Use new PMSIDR_EL1 register enums Now that the SPE register definitions include enums for some PMSIDR_EL1 fields, use them in the driver in place of magic values. Signed-off-by: Rob Herring Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/20220825-arm-spe-v8-7-v4-5-327f860daf28@kernel.org Signed-off-by: Will Deacon commit 2d347ac23362f6cfc5e04a4b998f51e1e7e909a8 Author: Rob Herring Date: Mon Jan 9 13:26:20 2023 -0600 perf: arm_spe: Drop BIT() and use FIELD_GET/PREP accessors Now that generated sysregs are in place, update the register field accesses. The use of BIT() is no longer needed with the new defines. Use FIELD_GET and FIELD_PREP instead of open coding masking and shifting. No functional change. Tested-by: James Clark Signed-off-by: Rob Herring Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/20220825-arm-spe-v8-7-v4-4-327f860daf28@kernel.org Signed-off-by: Will Deacon commit 956936041a56eaebc012cf62a00fafd86958ffd5 Author: Rob Herring Date: Mon Jan 9 13:26:19 2023 -0600 arm64/sysreg: Convert SPE registers to automatic generation Convert all the SPE register defines to automatic generation. No functional changes. New registers and fields for SPEv1.2 are added with the conversion. Some of the PMBSR MSS field defines are kept as the automatic generation has no way to create multiple names for the same register bits. The meaning of the MSS field depends on other bits. Tested-by: James Clark Signed-off-by: Rob Herring Reviewed-by: Mark Brown Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/20220825-arm-spe-v8-7-v4-3-327f860daf28@kernel.org Signed-off-by: Will Deacon commit c759ec850df89f7235b08e468abb3190b6998d4e Author: Rob Herring Date: Mon Jan 9 13:26:18 2023 -0600 arm64: Drop SYS_ from SPE register defines We currently have a non-standard SYS_ prefix in the constants generated for the SPE register bitfields. Drop this in preparation for automatic register definition generation. The SPE mask defines were unshifted, and the SPE register field enumerations were shifted. The autogenerated defines are the opposite, so make the necessary adjustments. No functional changes. Tested-by: James Clark Signed-off-by: Rob Herring Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/20220825-arm-spe-v8-7-v4-2-327f860daf28@kernel.org Signed-off-by: Will Deacon commit e080477a050cce0471d3a84347f350ad7514a18b Author: Rob Herring Date: Mon Jan 9 13:26:17 2023 -0600 perf: arm_spe: Use feature numbering for PMSEVFR_EL1 defines Similar to commit 121a8fc088f1 ("arm64/sysreg: Use feature numbering for PMU and SPE revisions") use feature numbering instead of architecture versions for the PMSEVFR_EL1 Res0 defines. Tested-by: James Clark Signed-off-by: Rob Herring Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/20220825-arm-spe-v8-7-v4-1-327f860daf28@kernel.org Signed-off-by: Will Deacon commit 093cf1f62fe8504d3cbd721c8753dbda931dd387 Author: Gowthami Thiagarajan Date: Fri Dec 9 11:07:15 2022 +0530 perf/marvell: Add ACPI support to TAD uncore driver Add support for ACPI based device registration so that the driver can be also enabled through ACPI table. While at that change the DT specific API's to device_* API's so that both DT based and ACPI based probing works. Signed-off-by: Gowthami Thiagarajan Link: https://lore.kernel.org/r/20221209053715.3930071-1-gthiagarajan@marvell.com Signed-off-by: Will Deacon commit e85930f06f0e938bfeb6e081526da86a784cb907 Author: Gowthami Thiagarajan Date: Fri Dec 9 11:06:07 2022 +0530 perf/marvell: Add ACPI support to DDR uncore driver Add support for ACPI based device registration so that the driver can be also enabled through ACPI table. Signed-off-by: Gowthami Thiagarajan Link: https://lore.kernel.org/r/20221209053607.3929964-1-gthiagarajan@marvell.com Signed-off-by: Will Deacon commit bb21ef19a3d8f586a99310116d40622fb5b79942 Author: Robin Murphy Date: Mon Dec 5 19:46:13 2022 +0000 perf/arm-cmn: Reset DTM_PMU_CONFIG at probe Although we treat the DTM counters as free-running such that we're not too concerned about the initial DTM state, it's possible for a previous user to have left DTM counters enabled and paired with DTC counters. Thus if the first events are scheduled using some, but not all, DTMs, the as-yet-unused ones could end up adding spurious increments to the event counts at the DTC. Make sure we sync our initial DTM_PMU_CONFIG state to all the DTMs at probe time to avoid that possibility. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/ba5f38b3dc733cd06bfb5e659b697e76d18c2183.1670269572.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit e126f6f42f89baee09e088ab6bc48f83ac3a0eae Author: Junhao He Date: Thu Jan 19 18:03:07 2023 +0800 drivers/perf: hisi: Extract initialization of "cpa_pmu->pmu" Use hisi_pmu_init() function to simplify initialization of "cpa_pmu->pmu". Signed-off-by: Junhao He Link: https://lore.kernel.org/r/20230119100307.3660-4-hejunhao3@huawei.com Signed-off-by: Will Deacon commit 053b5579dacfc5763dda0c073ee14147421d32d7 Author: Junhao He Date: Thu Jan 19 18:03:06 2023 +0800 drivers/perf: hisi: Simplify the parameters of hisi_pmu_init() Use "hisi_pmu" to simplify the parameter list for the hisi_pmu_init() function. Signed-off-by: Junhao He Link: https://lore.kernel.org/r/20230119100307.3660-3-hejunhao3@huawei.com Signed-off-by: Will Deacon commit 7f95da9d2dc4c20bb374c281ceb8fa40b6208f4b Author: Junhao He Date: Thu Jan 19 18:03:05 2023 +0800 drivers/perf: hisi: Advertise the PERF_PMU_CAP_NO_EXCLUDE capability Missed initialization the variable of pmu::capabilities when extract the initialization code of hisi_pmu->pmu into a function. HISI UNCORE PMU drivers counters that not support context exclusion. So we have to advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Signed-off-by: Junhao He Link: https://lore.kernel.org/r/20230119100307.3660-2-hejunhao3@huawei.com Signed-off-by: Will Deacon commit 474c162878ba3dbd620538d129f576f2bca7b9e1 Author: Hsin-Yi Wang Date: Wed Dec 28 19:32:04 2022 +0800 arm64: dts: mt8183: jacuzzi: Move panel under aux-bus Read edp panel edid through aux bus, which is a more preferred way. Also use a more generic compatible since each jacuzzi models use different panels. Signed-off-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20221228113204.1551180-1-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit 3655a63f9661b1fff313d8795200ff420282a87b Author: Shazad Hussain Date: Wed Jan 18 15:08:25 2023 +0100 interconnect: qcom: add a driver for sa8775p Introduce QTI SA8775P-specific interconnect driver. Signed-off-by: Shazad Hussain [Bartosz: made the driver ready for upstream] Co-developed-by: Bartosz Golaszewski Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230118140825.242544-1-brgl@bgdev.pl Signed-off-by: Georgi Djakov commit 2579af94c813d16bfabd81797f492fdfba25d088 Author: Bartosz Golaszewski Date: Wed Jan 18 15:08:24 2023 +0100 dt-bindings: interconnect: qcom: document the interconnects for sa8775p Add a DT binding document for the RPMh interconnects on Qualcomm sa8775p platforms. Signed-off-by: Bartosz Golaszewski Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230118140825.242544-2-brgl@bgdev.pl Signed-off-by: Georgi Djakov commit c2d94f72140a28d0f516b7c5e8274a9c185a04ff Author: AngeloGioacchino Del Regno Date: Wed Jan 11 15:07:24 2023 +0100 arm64: dts: mediatek: mt8173-elm: Move display to ps8640 auxiliary bus Move the display to an aux-bus subnode of the PS8640 eDP bridge. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230111140724.294533-1-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit c5fe37e8528ffb191baa7244ab33b8deaae6a4b7 Author: Biao Huang Date: Thu Jan 5 09:07:12 2023 +0800 arm64: dts: mt8195: Add Ethernet controller Add Ethernet controller node for mt8195. Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Andrew Lunn Signed-off-by: Biao Huang Link: https://lore.kernel.org/r/20230105010712.10116-3-biao.huang@mediatek.com Signed-off-by: Matthias Brugger commit 7e438e18874e396f4a30657087e932b5a524729c Author: Richard Acayan Date: Tue Jan 10 19:51:53 2023 -0500 interconnect: qcom: add sdm670 interconnects The interconnects for Snapdragon 670 can be controlled via RPMh. Add driver support for this. This driver was generated by the linux-interconnect-driver-generator and the virtual NoC's were merged with their parents. Link: https://git.sr.ht/~z3ntu/linux-interconnect-driver-generator Signed-off-by: Richard Acayan Link: https://lore.kernel.org/r/20230111005155.50452-3-mailingradian@gmail.com Signed-off-by: Georgi Djakov commit 81ccf4557105068eff754b5764c44c0f16c3ca66 Author: Richard Acayan Date: Tue Jan 10 19:51:52 2023 -0500 dt-bindings: interconnect: add sdm670 interconnects There are controllable interconnects on Snapdragon 670. Add the compatible strings to the documentation and interconnect ID definitions. The device tree header was generated by linux-interconnect-driver-generator and the copyright year was changed. Signed-off-by: Richard Acayan Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230111005155.50452-2-mailingradian@gmail.com Signed-off-by: Georgi Djakov commit 62a4545614630dc65b130b84d69ce64dbff95523 Author: Konrad Dybcio Date: Wed Jan 4 18:16:40 2023 +0100 dt-bindings: interconnect: OSM L3: Add SM6350 OSM L3 compatible SM6350, similarly to SDM845, uses OSM hardware for L3 scaling. Document it. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230104171643.1004054-1-konrad.dybcio@linaro.org Signed-off-by: Georgi Djakov commit 4ca69027691a0039279b64cfa0aa511d9c9fde59 Author: Johannes Berg Date: Wed Jan 18 10:51:53 2023 +0100 wifi: wireless: deny wireless extensions on MLO-capable devices These are WiFi 7 devices that will be introduced into the market in 2023, with new drivers. Wireless extensions haven't been in real development since 2006. Since wireless has evolved a lot, and continues to evolve significantly with Multi-Link Operation, there's really no good way to still support wireless extensions for devices that do MLO. Stop supporting wireless extensions for new devices. We don't consider this a regression since no such devices (apart from hwsim) exist yet. Signed-off-by: Johannes Berg Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230118105152.45f85078a1e0.Ib9eabc2ec5bf6b0244e4d973e93baaa3d8c91bd8@changeid commit dc09766c755c5b06d71fe5d2f4f3d431540eaae0 Author: Johannes Berg Date: Wed Jan 18 10:51:52 2023 +0100 wifi: wireless: warn on most wireless extension usage With WiFi 7 (802.11ax, MLO/EHT) around the corner, we're going to remove support for wireless extensions with new devices since MLO (multi-link operation) cannot be properly indicated using them. Add a warning to indicate which processes are still using wireless extensions, if being used with modern (i.e. cfg80211) drivers. Signed-off-by: Johannes Berg Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230118105152.a7158a929a6f.Ifcf30eeeb8fc7019e4dcf2782b04515254d165e1@changeid commit 089cd717e6ef03cf9cf7865777d67775de41339b Author: Chen-Yu Tsai Date: Thu Dec 29 18:12:02 2022 +0800 arm64: dts: mediatek: mt8192: Mark scp_adsp clock as broken The scp_adsp clock controller is under the SCP_ADSP power domain. This power domain is currently not supported nor defined. Mark the clock controller as broken for now, to avoid the system from trying to access it, and causing the CPU or bus to stall. Fixes: 5d2b897bc6f5 ("arm64: dts: mediatek: Add mt8192 clock controllers") Signed-off-by: Chen-Yu Tsai Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20221229101202.1655924-1-wenst@chromium.org Signed-off-by: Matthias Brugger commit 7d1ae5926d3216f823be56b79202711dd0b83cdb Author: Allen-KH Cheng Date: Tue Jan 17 11:26:40 2023 +0800 soc: mediatek: pm-domains: Add buck isolation setting in power domain In some chipsets, we need to disable EXT_BUCK_ISO before turning on the specific power pm-domains (mtcmos), such as ADSP in MT8192 and CAM_VCORE in MT8188. Add the MTK_SCPD_EXT_BUCK_ISO flag to control the buck isolation setting in the mediatek power domain driver. Signed-off-by: Allen-KH Cheng Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230117032640.13504-3-allen-kh.cheng@mediatek.com Signed-off-by: Matthias Brugger commit 1e28f6a35f7adec653dd04240ce971f9de598e16 Author: Allen-KH Cheng Date: Tue Jan 17 11:26:39 2023 +0800 soc: mediatek: pm-domains: Add buck isolation offset and mask to power domain data Add buck isolation offset and mask to power domain data. Signed-off-by: Allen-KH Cheng Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230117032640.13504-2-allen-kh.cheng@mediatek.com Signed-off-by: Matthias Brugger commit 16ceb986c942b389e828f32c516405ac1595a89c Author: Neil Armstrong Date: Mon Jan 9 13:11:06 2023 +0100 dt-bindings: interconnect: qcom-bwmon: document SM8550 compatibles Document the compatibles used to describe the Bandwidth Monitors present on the SM8550 platform. A BWMON v4 IP monitors the CPU bandwidth, and a v5 does the LLCC bandwidth monitoring. This is described by adding "llcc" and "cpu" into the compatible strings to differentiate the BWMON IPs. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221114-narmstrong-sm8550-upstream-bwmon-v3-1-7d63d2ae6bce@linaro.org Signed-off-by: Georgi Djakov commit 2fafc335141c114a19dd4226074d07ebfc992a44 Author: Krzysztof Kozlowski Date: Wed Jan 11 10:26:37 2023 +0100 dt-bindings: interconnect: split SM8450 to own schema SM8450 comes with interconnects having and missing IO address space, and variable number of clocks, so split it from common file for easier maintenance and to fix warnings like: sm8450-hdk.dtb: interconnect-0: 'reg' is a required property Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230111092637.17946-3-krzysztof.kozlowski@linaro.org Signed-off-by: Georgi Djakov commit 45e68388ba0ed25ae419acbfa80133f9038ab386 Author: Krzysztof Kozlowski Date: Wed Jan 11 10:26:36 2023 +0100 dt-bindings: interconnect: split SC8280XP to own schema SC8280XP comes with interconnects without IO address space, so split it from common file for easier maintenance and to fix warnings like: sc8280xp-lenovo-thinkpad-x13s.dtb: interconnect-mc-virt: 'reg' is a required property Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230111092637.17946-2-krzysztof.kozlowski@linaro.org Signed-off-by: Georgi Djakov commit f8a363c43bc7ff9ac6ee78222f978a66b9be903d Author: Krzysztof Kozlowski Date: Wed Jan 11 10:26:35 2023 +0100 dt-bindings: interconnect: split SC7280 to own schema SC7280 comes with interconnects having and missing IO address space, so split it from common file for easier maintenance and to fix warnings like: sc7280-herobrine-crd.dtb: interconnect: 'reg' is a required property Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230111092637.17946-1-krzysztof.kozlowski@linaro.org Signed-off-by: Georgi Djakov commit 297770ec5c935b31e7a3c0deccc3f8a2a7829451 Author: Fabien Parent Date: Mon Jan 2 17:06:07 2023 +0100 Input: mtk-pmic-keys: add MT6357 support Add PMIC Keys support on MT6357 SoC. Signed-off-by: Fabien Parent Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Mattijs Korpershoek Acked-by: Dmitry Torokhov Signed-off-by: Alexandre Mergnat Link: https://lore.kernel.org/r/20221005-mt6357-support-v8-6-560caaafee53@baylibre.com Signed-off-by: Matthias Brugger commit 22282276ea7907a4faa230c21faa021b94ff2164 Author: Alexandre Mergnat Date: Mon Jan 2 17:06:04 2023 +0100 dt-bindings: mfd: mediatek: Add bindings for MT6357 PMIC Currently, almost all MT63XX PMIC are documented mfd/mt6397.txt. Unfortunately, the PMICs haven't always similar HW sub-features. To have a better human readable schema, I chose to make one PMIC schema to match the exact HW capabilities instead of convert mt6397.txt to mediatek,mt63xx.yaml and put a bunch of properties behind "if contain ... then ..." - add interrupt property - change property refs to match with new yaml documentation Reviewed-by: Krzysztof Kozlowski Acked-by: Lee Jones Signed-off-by: Alexandre Mergnat Link: https://lore.kernel.org/r/20221005-mt6357-support-v8-3-560caaafee53@baylibre.com Signed-off-by: Matthias Brugger commit fc5a643fdd0b7406e73e7f18e14308eeaa89d2b7 Author: Alexandre Mergnat Date: Mon Jan 2 17:06:03 2023 +0100 dt-bindings: soc: mediatek: convert pwrap documentation - Convert soc/mediatek/pwrap.txt to soc/mediatek/mediatek,pwrap.yaml - Add syscon compatible const for mt8186 and mt8195 to match the DTS needs, which is missing from pwrap.txt. Reviewed-by: Rob Herring Signed-off-by: Alexandre Mergnat Link: https://lore.kernel.org/r/20221005-mt6357-support-v8-2-560caaafee53@baylibre.com Signed-off-by: Matthias Brugger commit f32397bfbddef1c0bd1687a8f5581017b315bd00 Author: Fabien Parent Date: Mon Jan 2 17:06:02 2023 +0100 dt-bindings: input: mtk-pmic-keys: add binding for MT6357 PMIC Add binding documentation for the PMIC keys on MT6357. Signed-off-by: Fabien Parent Acked-by: Rob Herring Acked-by: Dmitry Torokhov Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat Link: https://lore.kernel.org/r/20221005-mt6357-support-v8-1-560caaafee53@baylibre.com Signed-off-by: Matthias Brugger commit 2d812e9e1dfd00e70c990a87c29c37db90977a5f Author: Alexandre Mergnat Date: Mon Jan 2 17:06:06 2023 +0100 arm64: dts: mt8173: change node name - Change the node name from "mt6397" to "pmic" to be consistent with the generic names recommendation. Signed-off-by: Alexandre Mergnat Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221005-mt6357-support-v8-5-560caaafee53@baylibre.com Signed-off-by: Matthias Brugger commit 9551b699312838c1c11b25b141905c332702ea10 Author: Alexandre Mergnat Date: Mon Jan 2 17:06:05 2023 +0100 arm64: dts: mt6358: change node names - Change the node name from "mt6358" to "pmic", "mt6358rtc" to "rtc" and "mt6358keys" to "keys" to be consistent with the generic names recommendation. Signed-off-by: Alexandre Mergnat Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221005-mt6357-support-v8-4-560caaafee53@baylibre.com Signed-off-by: Matthias Brugger commit 1962ab6f6e0b39e4216206205bda14aff87705f3 Author: Ian Rogers Date: Sat Jan 14 13:52:51 2023 -0800 perf test workload thloop: Make count increments atomic The count variable is incremented by multiple threads, doing so without an atomic operation causes thread sanitizer warnings. Switch to using relaxed atomics. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230114215251.271678-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 90e75e8284061a0102b17ace7faa88605885c076 Author: Allen-KH Cheng Date: Wed Jan 18 17:18:27 2023 +0800 arm64: dts: mediatek: mt8186: Add DPI node Add DPI node for MT8186 SoC. Signed-off-by: Allen-KH Cheng Tested-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230118091829.755-8-allen-kh.cheng@mediatek.com Signed-off-by: Matthias Brugger commit 18942d29f98b9f54501616d48b69ffcd04230c01 Author: Allen-KH Cheng Date: Wed Jan 18 17:18:26 2023 +0800 arm64: dts: mediatek: mt8186: Add audio controller node Add audio controller node for MT8186 SoC. Signed-off-by: Allen-KH Cheng Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230118091829.755-7-allen-kh.cheng@mediatek.com Signed-off-by: Matthias Brugger commit 379cf0e639aecebeb1f1a0c8a78fe9ca926df311 Author: Allen-KH Cheng Date: Wed Jan 18 17:18:24 2023 +0800 arm64: dts: mediatek: mt8186: Add ADSP mailbox nodes Add ADSP mailbox node for MT8186 SoC. Signed-off-by: Allen-KH Cheng Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230118091829.755-5-allen-kh.cheng@mediatek.com Signed-off-by: Matthias Brugger commit 316769f75718f16e4e7d6a55d39053fe8a1d8b1c Author: Ian Rogers Date: Tue Jan 10 23:06:41 2023 -0800 perf debug: Increase libtraceevent logging when verbose libtraceevent has added more levels of debug printout and with changes like: https://lore.kernel.org/linux-trace-devel/20210507095022.1079364-3-tz.stoyanov@gmail.com previously generated output like "registering plugin" is no longer displayed. This change makes it so that if perf's verbose debug output is enabled then the debug and info libtraceevent messages can be displayed. This change was previously posted: https://lore.kernel.org/linux-perf-users/20210923001024.550263-4-irogers@google.com/ and reverted: https://lore.kernel.org/linux-perf-users/20220109153446.160593-1-acme@kernel.org/ The previous failure was due to -Itools/lib being on the include path and libtraceevent in tools/lib being version 1.1.0. This meant that when LIBTRACEEVENT_VERSION was 1.3.0 the #if succeeded, but the header file for libtraceevent (taken from tools/lib rather than the intended /usr/include) was for version 1.1.0 and function definitions were missing. Since the previous issue the -Itools/lib include path has been removed: https://lore.kernel.org/lkml/20221109184914.1357295-1-irogers@google.com/ As well as libtraceevent 1.1.0 has been removed from tools/lib: https://lore.kernel.org/lkml/20221130062935.2219247-1-irogers@google.com/ Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Jajeev Cc: Eelco Chaudron Cc: German Gomez Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Sean Christopherson Cc: Stephane Eranian Cc: Yang Jihong Link: https://lore.kernel.org/r/20230111070641.1728726-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 1634bad32074e00e0ec29e0aef53210ed20f0ec5 Author: Ian Rogers Date: Tue Jan 10 23:06:40 2023 -0800 perf trace: Reduce #ifdefs for TEP_FIELD_IS_RELATIVE Add a helper function that applies the mask to test, or returns false if libtraceevent is too old or not present. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Jajeev Cc: Eelco Chaudron Cc: German Gomez Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Sean Christopherson Cc: Stephane Eranian Cc: Yang Jihong Link: https://lore.kernel.org/r/20230111070641.1728726-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 1784eeaeb3de49a10dcae23e3882d879c5d342ba Author: Ian Rogers Date: Tue Jan 10 23:06:39 2023 -0800 perf tools: Remove HAVE_LIBTRACEEVENT_TEP_FIELD_IS_RELATIVE Switch HAVE_LIBTRACEEVENT_TEP_FIELD_IS_RELATIVE to be a version number test on libtraceevent being >= to version 1.5.0. This also corrects a greater-than test to be greater-than-or-equal. Fixes: b9a49f8cb02f0859 ("perf tools: Check if libtracevent has TEP_FIELD_IS_RELATIVE") Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Jajeev Cc: Eelco Chaudron Cc: German Gomez Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Sean Christopherson Cc: Stephane Eranian Cc: Yang Jihong Link: https://lore.kernel.org/lkml/20221205225940.3079667-3-irogers@google.com/ Signed-off-by: Arnaldo Carvalho de Melo commit 863cf33255faa5834d4d4f9e5df8fba0518b2060 Author: Ian Abbott Date: Tue Jan 3 15:11:27 2023 +0000 comedi: check data length for INSN_CONFIG_GET_PWM_OUTPUT Comedi INSN_CONFIG instructions have different expected instructtion data lengths depending on the type of configuration instruction specified by the first word of data. This is checked by `check_insn_config_length()`. There are a few configuration instructions whose data lengths are not currently checked, usually for rare configuration instructions that are implemented differently by different drivers. For unknown configuration instructions, the function logs a warning and accepts the specified data length. The `INSN_CONFIG_GET_PWM_OUTPUT` configuration instruction length is not currently checked, but all the places it is currently used expect a data length of 3. (These places are `ni_get_pwm_config()` in "ni_mio_common.c", and `pci1760_pwm_insn_config()` in "adv_pci1760.c".) Make this length official by checking it in `check_insn_config_length()`. Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20230103151127.19287-1-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 28ecbbae9ea459a0504e243668dae7c86eeedf9a Author: Randy Dunlap Date: Mon Jan 9 22:48:44 2023 -0800 comedi: use menuconfig for main Comedi menu Bring the Comedi menu in line with most other device drivers by using "menuconfig" instead of "config" for the top-level entry. This also fixes a menu presentation issue with xconfig. Fixes: ed9eccbe8970 ("Staging: add comedi core") Signed-off-by: Randy Dunlap Cc: Ian Abbott Cc: H Hartley Sweeten Cc: David Schleef Cc: Shawn Bohrer Cc: Frank Mori Hess Cc: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20230110064844.18533-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 0e656b807d9ee649eca8d075f3c1bb04c16a5bd4 Author: Randy Dunlap Date: Thu Jan 12 22:39:09 2023 -0800 misc: genwqe: move intervening macros away from kernel-doc Don't separate a function's kernel-doc comment and its definition with macros or data; move the macro and data ahead of the function and its comments to prevent a warning: drivers/misc/genwqe/card_utils.c:162: warning: expecting prototype for genwqe_init_crc32(). Prototype was for CRC32_POLYNOMIAL() instead Signed-off-by: Randy Dunlap Cc: Frank Haverkamp Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20230113063909.19694-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 9f19aab47ced012eddef1e2bc96007efc7713b61 Author: Ian Rogers Date: Thu Jan 5 00:26:09 2023 -0800 perf llvm: Fix inadvertent file creation The LLVM template is first echo-ed into command_out and then command_out executed. The echo surrounds the template with double quotes, however, the template itself may contain quotes. This is generally innocuous but in tools/perf/tests/bpf-script-test-prologue.c we see: ... SEC("func=null_lseek file->f_mode offset orig") ... where the first double quote ends the double quote of the echo, then the > redirects output into a file called f_mode. To avoid this inadvertent behavior substitute redirects and similar characters to be ASCII control codes, then substitute the output in the echo back again. Fixes: 5eab5a7ee032acaa ("perf llvm: Display eBPF compiling command in debug output") Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Andrii Nakryiko Cc: bpf@vger.kernel.org Cc: Ingo Molnar Cc: Jiri Olsa Cc: llvm@lists.linux.dev Cc: Mark Rutland Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Tom Rix Link: https://lore.kernel.org/r/20230105082609.344538-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 70fae37a09268455b8ab4f64647086b61da6f39c Author: Duoming Zhou Date: Wed Jan 18 22:10:00 2023 +0800 Revert "char: pcmcia: cm4000_cs: Replace mdelay with usleep_range in set_protocol" This reverts commit be826ada52f1fcabed5b5217c94609ebf5967211. The function monitor_card() is a timer handler that runs in an atomic context, but it calls usleep_range() that can sleep. As a result, the sleep-in-atomic-context bugs will happen. The process is shown below: (atomic context) monitor_card() set_protocol() usleep_range() //sleep The origin commit c1986ee9bea3 ("[PATCH] New Omnikey Cardman 4000 driver") works fine. Fixes: be826ada52f1 ("char: pcmcia: cm4000_cs: Replace mdelay with usleep_range in set_protocol") Signed-off-by: Duoming Zhou Link: https://lore.kernel.org/r/20230118141000.5580-1-duoming@zju.edu.cn Signed-off-by: Greg Kroah-Hartman commit af35dbad4a4af023536c17d9bc91a77171bc35df Author: Randy Dunlap Date: Fri Jan 13 19:46:46 2023 -0800 pcmcia: synclink_cs: remove kernel-doc notation Remove all kernel-doc "/**" markers; just use "/*" comments since these are not in kernel-doc format. This eliminates 11 kernel-doc warnings: drivers/char/pcmcia/synclink_cs.c:487: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * line discipline callback wrappers drivers/char/pcmcia/synclink_cs.c:3861: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * called by generic HDLC layer when protocol selected (PPP, frame relay, etc.) drivers/char/pcmcia/synclink_cs.c:3914: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * called by generic HDLC layer to send frame drivers/char/pcmcia/synclink_cs.c:3959: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * called by network layer when interface enabled drivers/char/pcmcia/synclink_cs.c:4022: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * called by network layer when interface is disabled drivers/char/pcmcia/synclink_cs.c:4053: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * called by network layer to process IOCTL call to network device drivers/char/pcmcia/synclink_cs.c:4156: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * called by network layer when transmit timeout is detected drivers/char/pcmcia/synclink_cs.c:4179: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * called by device driver when transmit completes drivers/char/pcmcia/synclink_cs.c:4191: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * called by device driver when frame received drivers/char/pcmcia/synclink_cs.c:4231: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * called by device driver when adding device instance drivers/char/pcmcia/synclink_cs.c:4279: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * called by device driver when removing device instance Signed-off-by: Randy Dunlap Cc: Dominik Brodowski Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20230114034646.1535-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit d52a6180c7466a3520ee42ae56315ee12a097e87 Author: Tony Nguyen Date: Thu Dec 29 11:05:20 2022 -0800 ice: Remove excess space smatch reports inconsistent indenting due to an extra space; remove it to resolve the issue. smatch warnings: drivers/net/ethernet/intel/ice/ice_lib.c:1673 ice_vsi_alloc_ring_stats() warn: inconsistent indenting Reported-by: kernel test robot Signed-off-by: Tony Nguyen commit 643ef23bd9ddf742579bc7334c45cf7bc349168a Author: Tony Nguyen Date: Thu Dec 15 13:36:51 2022 -0800 ice: Introduce local var for readability Based on previous feedback[1], introduce a local var to make things more readable. [1] https://lore.kernel.org/netdev/20220315203218.607f612b@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com/ Signed-off-by: Tony Nguyen Tested-by: Gurucharan G (A Contingent worker at Intel) commit 388740b3f63ddb01fa763b8525bec7c59004dd8a Author: Tony Nguyen Date: Thu Dec 15 13:36:37 2022 -0800 ice: Match parameter name for ice_cfg_phy_fc() The parameter name in the function declaration and definition do not match; adjust the naming for consistency and to avoid confusion. Signed-off-by: Tony Nguyen commit 91dbcb91d006a62dd60c16d5f1f11fd4f6175786 Author: Tony Nguyen Date: Thu Dec 15 13:36:25 2022 -0800 ice: Explicitly return 0 Previous checks, and goto, will catch all errors meaning these returns will only return 0; explicitly return 0 for these cases. Signed-off-by: Tony Nguyen Tested-by: Gurucharan G (A Contingent worker at Intel) commit bd557d97978ea3e22653117a39184b5db70c7093 Author: Tony Nguyen Date: Wed Nov 23 08:56:40 2022 -0800 ice: Reduce scope of variables There are some places where the scope of a variable can be reduced, so do that. Signed-off-by: Tony Nguyen Tested-by: Gurucharan G (A Contingent worker at Intel) commit 2ffd87d38d6b9dd8575e4b763ead7127c2695bcb Author: Sergey Temerkhanov Date: Tue Dec 20 16:01:14 2022 +0100 ice: Move support DDP code out of ice_flex_pipe.c Currently, ice_flex_pipe.c includes the DDP loading functions and has grown large. Although flexible processing support code is related to DDP loading, these parts are distinct. Move the DDP loading functionality from ice_flex_pipe.c to a separate file. Signed-off-by: Sergey Temerkhanov Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit df2a4c3f653088c20e7c998acbd959338631f1d8 Author: Tony Nguyen Date: Wed Nov 23 08:56:27 2022 -0800 ice: Remove cppcheck suppressions The use of suppressions for cppcheck in the kernel does not look to be standard as the ice driver is the only one doing it. Remove the comments/suppressions. Signed-off-by: Tony Nguyen commit 9d20797fcdab33a7090c8640893ec53708dca1fa Author: Przemek Kitszel Date: Wed Nov 23 16:55:44 2022 +0100 ice: combine cases in ice_ksettings_find_adv_link_speed() Combine if statements setting the same link speed together. Suggested-by: Tony Nguyen Signed-off-by: Przemek Kitszel Acked-by: Anirudh Venkataramanan Tested-by: Sunitha Mekala (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 2481e82077488723fda2492f0bfb80bcb7ead715 Author: Anirudh Venkataramanan Date: Wed Nov 23 16:55:43 2022 +0100 ice: Add support for 100G KR2/CR2/SR2 link reporting Commit 2736d94f351b ("ethtool: Added support for 50Gbps per lane link modes") in v5.1 added (among other things) support for 100G CR2/KR2/SR2 link modes. Advertise these link modes if the firmware reports the corresponding PHY types. Signed-off-by: Anirudh Venkataramanan Signed-off-by: Przemek Kitszel Tested-by: Sunitha Mekala (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 6a8d013e904ad9a66706fcc926ec9993bed7d190 Author: Jesse Brandeburg Date: Tue Dec 13 16:01:31 2022 -0800 ice: add missing checks for PF vsi type There were a few places we had missed checking the VSI type to make sure it was definitely a PF VSI, before calling setup functions intended only for the PF VSI. This doesn't fix any explicit bugs but cleans up the code in a few places and removes one explicit != vsi->type check that can be superseded by this code (it's a super set) Signed-off-by: Jesse Brandeburg Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit d5a6df44375c88999e94e9ba3bf5c129071fe4cf Author: Anirudh Venkataramanan Date: Wed Nov 16 13:20:32 2022 +0100 ice: remove redundant non-null check in ice_setup_pf_sw() Remove a redundant null check, as vsi could not be null at this point. Signed-off-by: Anirudh Venkataramanan Signed-off-by: Przemek Kitszel Reviewed-by: Leon Romanovsky Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 8aa4318c3a122b8670bc09af142de3872ca63b88 Author: Siddaraju DH Date: Tue Nov 15 15:11:35 2022 +0530 ice: restrict PTP HW clock freq adjustments to 100, 000, 000 PPB The PHY provides only 39b timestamp. With current timing implementation, we discard lower 7b, leaving 32b timestamp. The driver reconstructs the full 64b timestamp by correlating the 32b timestamp with cached_time for performance. The reconstruction algorithm does both forward & backward interpolation. The 32b timeval has overflow duration of 2^32 counts ~= 4.23 second. Due to interpolation in both direction, its now ~= 2.125 second IIRC, going with at least half a duration, the cached_time is updated with periodic thread of 1 second (worst-case) periodicity. But the 1 second periodicity is based on System-timer. With PPB adjustments, if the 1588 timers increments at say double the rate, (2s in-place of 1s), the Nyquist rate/half duration sampling/update of cached_time with 1 second periodic thread will lead to incorrect interpolations. Hence we should restrict the PPB adjustments to at least half duration of cached_time update which translates to 500,000,000 PPB. Since the periodicity of the cached-time system thread can vary, it is good to have some buffer time and considering practicality of PPB adjustments, limiting the max_adj to 100,000,000. Signed-off-by: Siddaraju DH Tested-by: Gurucharan G (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 390889a4b40ef8fbcaa3a04b71c36b8dba805507 Author: Amritha Nambiar Date: Tue Nov 8 14:08:12 2022 -0800 ice: Support drop action Currently the drop action is supported only in switchdev mode. Add support for offloading receive filters with action drop in ADQ/non-ADQ modes. This is in addition to other actions such as forwarding to a VSI (ADQ) or a queue (ADQ/non-ADQ). Also renamed 'ch_vsi' to 'dest_vsi' as it is valid for multiple actions such as forward to vsi/queue which may/may not create a channel vsi. Reviewed-by: Sridhar Samudrala Signed-off-by: Amritha Nambiar Tested-by: Bharathi Sreenivas Signed-off-by: Tony Nguyen commit 7d8d7754e6f70eed2ed6c48ce55a4a1168b08276 Author: Anatolii Gerasymenko Date: Wed Aug 24 14:07:28 2022 +0200 ice: Handle LLDP MIB Pending change If the number of Traffic Classes (TC) is decreased, the FW will no longer remove TC nodes, but will send a pending change notification. This will allow RDMA to destroy corresponding Control QP markers. After RDMA finishes outstanding operations, the ice driver will send an execute MIB Pending change admin queue command to FW to finish DCB configuration change. The FW will buffer all incoming Pending changes, so there can be only one active Pending change. RDMA driver guarantees to remove Control QP markers within 5000 ms. Hence, LLDP response timeout txTTL (default 30 sec) will be met. In the case of a Pending change, LLDP MIB Change Event (opcode 0x0A01) will contain the whole new MIB. But Get LLDP MIB (opcode 0x0A00) AQ call would still return an old MIB, as the Pending change hasn't been applied yet. Add ice_get_dcb_cfg_from_mib_change() function to retrieve DCBX config from LLDP MIB Change Event's buffer for Pending changes. Co-developed-by: Dave Ertman Signed-off-by: Dave Ertman Signed-off-by: Anatolii Gerasymenko Tested-by: Arpana Arland (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit a4f68f37e63f91ce7baa31ea3d64072f1b86aac7 Author: Tsotne Chakhvadze Date: Wed Aug 24 14:07:27 2022 +0200 ice: Add 'Execute Pending LLDP MIB' Admin Queue command In DCB Willing Mode (FW managed LLDP), when the link partner changes configuration which requires fewer TCs, the TCs that are no longer needed are suspended by EMP FW, removed, and never resumed. This occurs before a MIB change event is indicated to SW. The permanent suspension and removal of these TC nodes in the scheduler prevents RDMA from being able to destroy QPs associated with this TC, requiring a CORE reset to recover. A new DCBX configuration change flow is defined to allow SW driver and other SW components (RDMA) to properly adjust to the configuration changes before they are taking effect in HW. This flow includes a two-way handshake between EMP FW<->LAN SW<->RDMA SW. List of changes: - Add 'Execute Pending LLDP MIB' AQC. - Add 'Pending Event Enable' bit. - Add additional logic to ignore Pending Event Enable' request while 'LLDP MIB Chnage' event is disabled. - Add 'Execute Pending LLDP MIB' AQC sending function to FW, which is needed to take place MIB Event change. Signed-off-by: Tsotne Chakhvadze Co-developed-by: Karen Sornek Signed-off-by: Karen Sornek Co-developed-by: Dave Ertman Signed-off-by: Dave Ertman Co-developed-by: Anatolii Gerasymenko Signed-off-by: Anatolii Gerasymenko Tested-by: Arpana Arland (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit e610e81464e4e52645a0f5d259b8a9e3632db6ff Author: Garmin.Chang Date: Fri Dec 23 16:05:53 2022 +0800 soc: mediatek: pm-domains: Add support for mt8188 Add domain control data including bus protection data size change due to more protection steps in mt8188. Signed-off-by: Garmin.Chang Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221223080553.9397-3-Garmin.Chang@mediatek.com Signed-off-by: Matthias Brugger commit 1725dde87f1eb560497a3be85d3973a7deea7fa4 Author: Garmin.Chang Date: Fri Dec 23 16:05:52 2022 +0800 dt-bindings: power: Add MT8188 power domains Add power domains dt-bindings for MT8188. Signed-off-by: Garmin.Chang Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221223080553.9397-2-Garmin.Chang@mediatek.com Signed-off-by: Matthias Brugger commit 34d0938e3dad2c5f15098fcf2f400dceea6efceb Author: Randy Dunlap Date: Tue Jan 17 10:28:40 2023 -0800 most: tell what the MOST acronym means Tell kconfig users what "MOST" means so that they can have a bit of information about what it is. I.e., more than zero information. Signed-off-by: Randy Dunlap Cc: Christian Gromm Cc: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20230117182840.26890-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit fba3993e86cc44a4690f131bf16c57713a37ef1a Author: Randy Dunlap Date: Thu Jan 12 22:39:47 2023 -0800 most: fix kernel-doc warnings Fix various W=1 kernel-doc warnings in drivers/most/: drivers/most/most_usb.c:669: warning: Excess function parameter 'data' description in 'link_stat_timer_handler' drivers/most/most_usb.c:769: warning: cannot understand function prototype: 'const struct file_operations hdm_usb_fops = ' drivers/most/most_usb.c:776: warning: cannot understand function prototype: 'const struct usb_device_id usbid[] = ' drivers/most/most_cdev.c:301: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Initialization of struct file_operations drivers/most/most_cdev.c:414: warning: Function parameter or member 'args' not described in 'comp_probe' drivers/most/most_snd.c:56: warning: Function parameter or member 'pcm_hardware' not described in 'channel' drivers/most/most_snd.c:56: warning: Function parameter or member 'copy_fn' not described in 'channel' drivers/most/most_snd.c:404: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Initialization of struct snd_pcm_ops drivers/most/most_snd.c:514: warning: Function parameter or member 'device_name' not described in 'audio_probe_channel' drivers/most/most_snd.c:703: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Initialization of the struct most_component Signed-off-by: Randy Dunlap Cc: Christian Gromm Cc: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20230113063947.23174-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit ad228a3468d17257a112f0d50e06ff0851667210 Author: Randy Dunlap Date: Tue Jan 17 10:37:45 2023 -0800 android: fix W=1 kernel-doc warnings Clean up kernel-doc notation, use correct function and parameter names. drivers/android/binderfs.c:236: warning: expecting prototype for binderfs_ctl_ioctl(). Prototype was for binder_ctl_ioctl() instead drivers/android/binder.c:386: warning: expecting prototype for binder_node_unlock(). Prototype was for binder_node_inner_unlock() instead drivers/android/binder.c:1206: warning: expecting prototype for binder_dec_ref(). Prototype was for binder_dec_ref_olocked() instead drivers/andrond/binder.c:284: warning: Excess function parameter 'proc' description in 'binder_proc_unlock' drivers/andrond/binder.c:387: warning: expecting prototype for binder_node_unlock(). Prototype was for binder_node_inner_unlock() instead Signed-off-by: Randy Dunlap Cc: Greg Kroah-Hartman Cc: Arve Hjønnevåg Cc: Todd Kjos Cc: Martijn Coenen Cc: Joel Fernandes Cc: Christian Brauner Cc: Carlos Llamas Cc: Suren Baghdasaryan Acked-by: Carlos Llamas Link: https://lore.kernel.org/r/20230117183745.20842-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 0567461a7a6ecb12692e3bbb97e86ff9d39a2837 Author: Li Li Date: Wed Nov 23 12:16:54 2022 -0800 binder: return pending info for frozen async txns An async transaction to a frozen process will still be successfully put in the queue. But this pending async transaction won't be processed until the target process is unfrozen at an unspecified time in the future. Pass this important information back to the user space caller by returning BR_TRANSACTION_PENDING_FROZEN. Signed-off-by: Li Li Acked-by: Carlos Llamas Link: https://lore.kernel.org/r/20221123201654.589322-2-dualli@chromium.org Signed-off-by: Greg Kroah-Hartman commit 7feb35bc16203c06362c31b95d0d2f291c0212d5 Author: Jiazi.Li Date: Tue Nov 15 20:03:51 2022 +0800 binder: remove unneeded size check code In binder_ioctl function, the legitimacy check of cmd size has been done in switch-case code: switch (cmd) { case BINDER_WRITE_READ;//BINDER_WRITE_READ contains size info So unneeded do size check in binder_ioctl and binder_ioctl_write_read again. In the following version of Google GKI: Linux version 5.10.110-android12-9-00011-g2c814f559132-ab8969555 It seems that the compiler has made optimization and has not passed cmd parameters to binder_ioctl_write_read: : mov w8, #0x6201 // #25089 : movk w8, #0xc030, lsl #16 : cmp w20, w8 : b.ne 0xffffffda8aa97880 : mov x0, x23 //filp : mov x1, x27 //arg : mov x2, x22 //thread : bl 0xffffffda8aa9e6e4 : mov w26, w0 Signed-off-by: Jiazi.Li Acked-by: Carlos Llamas Link: https://lore.kernel.org/r/20221115120351.2769-1-jiazi.li@transsion.com Signed-off-by: Greg Kroah-Hartman commit 95b2a034784658c4512db846918475d4954901d6 Author: Zhen Lei Date: Sat Nov 26 19:16:34 2022 +0800 kernfs: remove an unused if statement in kernfs_path_from_node_locked() It makes no sense to call kernfs_path_from_node_locked() with NULL buf, and no one is doing that right now. Suggested-by: Tejun Heo Signed-off-by: Zhen Lei Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20221126111634.1994-1-thunder.leizhen@huawei.com Signed-off-by: Greg Kroah-Hartman commit 5c0016d7b343e453e38752ca58bc18394ece310a Author: Mao Jinlong Date: Tue Jan 17 06:57:00 2023 -0800 coresight: core: Use IDR for non-cpu bound sources' paths. Except stm, there could be other sources which are not associated with cpus. Use IDR to store and search these sources' paths. Reviewed-by: Suzuki K Poulose Reviewed-by: Mike Leach Signed-off-by: Mao Jinlong Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230117145708.16739-2-quic_jinlmao@quicinc.com commit 8dc08c82afbf00e3cbe8944f7e33fa133c01858f Merge: ae7c40bc2c8b8 ce0382384e88c Author: Mark Brown Date: Thu Jan 19 15:31:47 2023 +0000 ASoC: mediatek: Add support for MT8188 SoC Merge series from Trevor Wu : This series of patches adds support for Mediatek AFE of MT8188 SoC. Patches are based on broonie tree "for-next" branch. Changes since v4: - refine etdm dai driver based on reviewer's suggestions - refine dt-binding files based on reviewer's suggestions Changes since v3: - replace apll_ck with apll to sync with the relationship in CCF - add mtk-soundcard-driver.c to support codec parsing - drop mclk-always-on-rates support in mt8188-dai-etdm.c - refine dt-binding files based on reviewer's suggestions Changes since v2: - drop CLK_IGNORE_UNUSED flag - include bitfield.h to reslove the issue reported by kernel test robot - rename mt8188-afe-pcm.yaml to mt8188-afe.yaml - refine dt-binding files based on reviewer's suggestions Changes since v1: - remove bus protection functions in case of unmerged dependency problem - replace some bit operation macro with FIELD_PREP - simplify register control by regmap_set_bits and regmap_clear_bits - fix dt-binding errors - rename compatible string for recognition Trevor Wu (13): ASoC: mediatek: common: add SMC ops and SMC CMD ASoC: mediatek: mt8188: add common header ASoC: mediatek: mt8188: support audsys clock ASoC: mediatek: mt8188: support adda in platform driver ASoC: mediatek: mt8188: support etdm in platform driver ASoC: mediatek: mt8188: support pcmif in platform driver ASoC: mediatek: mt8188: support audio clock control ASoC: mediatek: mt8188: add platform driver ASoC: mediatek: mt8188: add control for timing select ASoC: dt-bindings: mediatek,mt8188-afe: add audio afe document ASoC: mediatek: common: add soundcard driver common code ASoC: mediatek: mt8188: add machine driver with mt6359 ASoC: dt-bindings: mediatek,mt8188-mt6359: add mt8188-mt6359 document .../bindings/sound/mediatek,mt8188-afe.yaml | 208 + .../sound/mediatek,mt8188-mt6359.yaml | 97 + sound/soc/mediatek/Kconfig | 23 + sound/soc/mediatek/Makefile | 1 + sound/soc/mediatek/common/Makefile | 2 +- sound/soc/mediatek/common/mtk-base-afe.h | 19 + .../mediatek/common/mtk-soundcard-driver.c | 79 + .../mediatek/common/mtk-soundcard-driver.h | 14 + sound/soc/mediatek/mt8188/Makefile | 15 + sound/soc/mediatek/mt8188/mt8188-afe-clk.c | 658 ++++ sound/soc/mediatek/mt8188/mt8188-afe-clk.h | 115 + sound/soc/mediatek/mt8188/mt8188-afe-common.h | 151 + sound/soc/mediatek/mt8188/mt8188-afe-pcm.c | 3359 +++++++++++++++++ sound/soc/mediatek/mt8188/mt8188-audsys-clk.c | 205 + sound/soc/mediatek/mt8188/mt8188-audsys-clk.h | 15 + .../soc/mediatek/mt8188/mt8188-audsys-clkid.h | 83 + sound/soc/mediatek/mt8188/mt8188-dai-adda.c | 632 ++++ sound/soc/mediatek/mt8188/mt8188-dai-etdm.c | 2588 +++++++++++++ sound/soc/mediatek/mt8188/mt8188-dai-pcm.c | 367 ++ sound/soc/mediatek/mt8188/mt8188-mt6359.c | 785 ++++ sound/soc/mediatek/mt8188/mt8188-reg.h | 3180 ++++++++++++++++ 21 files changed, 12595 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/sound/mediatek,mt8188-afe.yaml create mode 100644 Documentation/devicetree/bindings/sound/mediatek,mt8188-mt6359.yaml create mode 100644 sound/soc/mediatek/common/mtk-soundcard-driver.c create mode 100644 sound/soc/mediatek/common/mtk-soundcard-driver.h create mode 100644 sound/soc/mediatek/mt8188/Makefile create mode 100644 sound/soc/mediatek/mt8188/mt8188-afe-clk.c create mode 100644 sound/soc/mediatek/mt8188/mt8188-afe-clk.h create mode 100644 sound/soc/mediatek/mt8188/mt8188-afe-common.h create mode 100644 sound/soc/mediatek/mt8188/mt8188-afe-pcm.c create mode 100644 sound/soc/mediatek/mt8188/mt8188-audsys-clk.c create mode 100644 sound/soc/mediatek/mt8188/mt8188-audsys-clk.h create mode 100644 sound/soc/mediatek/mt8188/mt8188-audsys-clkid.h create mode 100644 sound/soc/mediatek/mt8188/mt8188-dai-adda.c create mode 100644 sound/soc/mediatek/mt8188/mt8188-dai-etdm.c create mode 100644 sound/soc/mediatek/mt8188/mt8188-dai-pcm.c create mode 100644 sound/soc/mediatek/mt8188/mt8188-mt6359.c create mode 100644 sound/soc/mediatek/mt8188/mt8188-reg.h -- 2.18.0 commit 05e2600cb0a4d73b0779cf29512819616252aeeb Author: Samuel Thibault Date: Thu Jan 19 16:19:17 2023 +0100 VT: Bump font size limitation to 64x128 pixels This moves 32x32 font size limitation checking down to drivers, so that fbcon can allow large fonts. We still keep a limitation to 64x128 pixels so as to have a simple bounded allocation for con_font_get and in the userland kbd tool. That glyph size will however be enough to have 128x36 characters on a "16/9 8K display". Signed-off-by: Samuel Thibault Link: https://lore.kernel.org/r/20230119151935.112415738@ens-lyon.org Signed-off-by: Greg Kroah-Hartman commit 24d69384bcd34b9dcaf5dab744bf7096e84d1abd Author: Samuel Thibault Date: Thu Jan 19 16:19:16 2023 +0100 VT: Add KD_FONT_OP_SET/GET_TALL operations The KD_FONT_OP_SET/GET operations hardcode vpitch to be 32 pixels, which only dates from the old VGA hardware which as asserting this. Drivers such as fbcon however do not have such limitation, so this introduces KD_FONT_OP_SET/GET_TALL operations, which userland can try to use to avoid this limitation, thus opening the patch to >32 pixels font height. Signed-off-by: Samuel Thibault Link: https://lore.kernel.org/r/20230119151935.013597162@ens-lyon.org Signed-off-by: Greg Kroah-Hartman commit ffc1e089725e3f8a15ddfdce283db42f7d0fa147 Author: Samuel Thibault Date: Thu Jan 19 16:19:15 2023 +0100 VT: Add height parameter to con_font_get/set consw operations The current con_font_get/set API currently hardcodes a 32-pixel-tall limitation, which only dates from the old VGA hardware which could not handle taller fonts than that. This change just adds a vpitch parameter to release this constraint. Drivers which do not support vpitch != 32 can just return EINVAL when it is not 32, font loading tools will revert to trying 32 and succeed. This change makes the fbcon driver consider vpitch appropriately, thus making it able to load large fonts. Signed-off-by: Samuel Thibault Link: https://lore.kernel.org/r/20230119151934.932642243@ens-lyon.org Signed-off-by: Greg Kroah-Hartman commit 3ef4a8c8963b29813170177899f84ffb93f1a8f1 Merge: c84f433ef5f85 da099a7fb13db Author: Paolo Abeni Date: Thu Jan 19 16:23:26 2023 +0100 Merge branch 'net-phy-remove-probe_capabilities' Michael Walle says: ==================== net: phy: Remove probe_capabilities With all the drivers which used .probe_capabilities converted to the new c45 MDIO access methods, we can now decide based upon these whether a bus driver supports c45 and we can get rid of the not widely used probe_capabilites. Unfortunately, due to a now broader support of c45 scans, this will trigger a bug on some boards with a (c22-only) Micrel PHY. These PHYs don't ignore c45 accesses correctly, thinking they are addressed themselves and distrupt the MDIO access. To avoid this, a blacklist for c45 scans is introduced. ==================== Link: https://lore.kernel.org/r/20230116-net-next-remove-probe-capabilities-v2-0-15513b05e1f4@walle.cc Signed-off-by: Paolo Abeni commit da099a7fb13db67678ecfa03f8ac5df8134c991b Author: Andrew Lunn Date: Wed Jan 18 11:01:40 2023 +0100 net: phy: Remove probe_capabilities Deciding if to probe of PHYs using C45 is now determine by if the bus provides the C45 read method. This makes probe_capabilities redundant so remove it. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Reviewed-by: Jesse Brandeburg Acked-by: Andrew Jeffery Signed-off-by: Paolo Abeni commit fbfe97597c777cca6a91804f3f6ce046acb98860 Author: Andrew Lunn Date: Wed Jan 18 11:01:39 2023 +0100 net: phy: Decide on C45 capabilities based on presence of method Some PHYs provide invalid IDs in C22 space. If C45 is supported on the bus an attempt can be made to get the IDs from the C45 space. Decide on this based on the presence of the C45 read method in the bus structure. This will allow the unreliable probe_capabilities to be removed. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Reviewed-by: Jesse Brandeburg Signed-off-by: Paolo Abeni commit 1a136ca2e089d91df8eec0a796a324171373ffd8 Author: Andrew Lunn Date: Wed Jan 18 11:01:38 2023 +0100 net: mdio: scan bus based on bus capabilities for C22 and C45 Now that all MDIO bus drivers which set probe_capabilities to MDIOBUS_C22_C45 have been converted to use the name API for C45 transactions, perform the scanning of the bus based on which methods the bus provides. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Reviewed-by: Jesse Brandeburg Signed-off-by: Paolo Abeni commit 3486593374858b41ae6ef7720cb28ff39ad822f3 Author: Andrew Lunn Date: Wed Jan 18 11:01:37 2023 +0100 net: mdio: Add workaround for Micrel PHYs which are not C45 compatible After scanning the bus for C22 devices, check if any Micrel PHYs have been found. They are known to do bad things if there are C45 transactions on the bus. Prevent the scanning of the bus using C45 if such a PHY has been detected. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Paolo Abeni commit d41e127757f37d0d47ccda4af2fe74c32533f798 Author: Andrew Lunn Date: Wed Jan 18 11:01:36 2023 +0100 net: mdio: Rework scanning of bus ready for quirks Some C22 PHYs do bad things when there are C45 transactions on the bus. In order to handle this, the bus needs to be scanned first for C22 at all addresses, and then C45 scanned for all addresses. The Marvell pxa168 driver scans a specific address on the bus to find its PHY. This is a C22 only device, so update it to use the c22 helper. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Reviewed-by: Jesse Brandeburg Signed-off-by: Paolo Abeni commit 81d874e7c84e16427cbe9f2bb03e0dc2684e44cf Author: Andrew Lunn Date: Wed Jan 18 11:01:35 2023 +0100 net: mdio: Move mdiobus_scan() within file No functional change, just place it earlier in preparation for some refactoring. While at it, correct the comment format and one typo. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Reviewed-by: Jesse Brandeburg Signed-off-by: Paolo Abeni commit e34a79d0b320ea8248e1ee3482eb5c388a27d303 Author: Matthew Gerlach Date: Sun Jan 15 07:14:47 2023 -0800 tty: serial: 8250: add DFL bus driver for Altera 16550. Add a Device Feature List (DFL) bus driver for the Altera 16550 implementation of UART. Signed-off-by: Matthew Gerlach Reviewed-by: Ilpo Järvinen Reviewed-by: Andy Shevchenko Reviewed-by: Marco Pagani Link: https://lore.kernel.org/r/20230115151447.1353428-5-matthew.gerlach@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 4747ab89b4a652f835494fcf8342aaa0efb9b0fd Author: Matthew Gerlach Date: Sun Jan 15 07:14:46 2023 -0800 fpga: dfl: add basic support for DFHv1 Version 1 of the Device Feature Header (DFH) definition adds functionality to the Device Feature List (DFL) bus. A DFHv1 header may have one or more parameter blocks that further describes the HW to SW. Add support to the DFL bus to parse the MSI-X parameter. The location of a feature's register set is explicitly described in DFHv1 and can be relative to the base of the DFHv1 or an absolute address. Parse the location and pass the information to DFL driver. Signed-off-by: Matthew Gerlach Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230115151447.1353428-4-matthew.gerlach@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 0926d8d52d42799806148ce6d57992849e57816c Author: Basheer Ahmed Muddebihal Date: Sun Jan 15 07:14:45 2023 -0800 fpga: dfl: Add DFHv1 Register Definitions This patch adds the definitions for DFHv1 header and related register bitfields. Signed-off-by: Basheer Ahmed Muddebihal Co-developed-by: Matthew Gerlach Signed-off-by: Matthew Gerlach Reviewed-by: Ilpo Järvinen Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230115151447.1353428-3-matthew.gerlach@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 46879f71061a4c47d4f798164a877602cee910d2 Author: Matthew Gerlach Date: Sun Jan 15 07:14:44 2023 -0800 Documentation: fpga: dfl: Add documentation for DFHv1 Add documentation describing the extensions provided by Version 1 of the Device Feature Header (DFHv1). Signed-off-by: Matthew Gerlach Reviewed-by: Ilpo Järvinen Reviewed-by: Tom Rix Link: https://lore.kernel.org/r/20230115151447.1353428-2-matthew.gerlach@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 2d762dab66fa2788cee5e7657610b073e45c41eb Author: Ilpo Järvinen Date: Tue Jan 17 11:03:58 2023 +0200 tty: moxa: Rename dtr/rts parameters/variables to active Use active consistently for naming parameters and variables. Reviewed-by: Jiri Slaby Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230117090358.4796-13-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 5701cb8bf50e1c723553344b3f731b308da8ea21 Author: Ilpo Järvinen Date: Tue Jan 17 11:03:57 2023 +0200 tty: Call ->dtr_rts() parameter active consistently Convert various parameter names for ->dtr_rts() and related functions from onoff, on, and raise to active. Reviewed-by: Jiri Slaby Acked-by: Ulf Hansson # For MMC Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230117090358.4796-12-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 87f22db4c251ff92d588c2cc710031a59d5e4ec0 Author: Ilpo Järvinen Date: Tue Jan 17 11:03:56 2023 +0200 tty: Return bool from tty_termios_hw_change() Change tty_termios_hw_change() to return bool. Reviewed-by: Jiri Slaby Reviewed-by: Johan Hovold Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230117090358.4796-11-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 968d64578ec92968e8c79d766eb966efd1f68d7e Author: Ilpo Järvinen Date: Tue Jan 17 11:03:55 2023 +0200 serial: Make uart_handle_cts_change() status param bool active Convert uart_handle_cts_change() to bool which is more appropriate than unsigned int. Rename status to active to better describe what the parameter means. While at it, make the comment about the active parameter easier to parse. Cleanup callsites from operations that are not necessary with bool. Reviewed-by: Jiri Slaby Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230117090358.4796-10-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 0388a152fc5544be82e736343496f99c4eef8d62 Author: Ilpo Järvinen Date: Tue Jan 17 11:03:54 2023 +0200 tty/serial: Make ->dcd_change()+uart_handle_dcd_change() status bool active Convert status parameter for ->dcd_change() and uart_handle_dcd_change() to bool which matches to how the parameter is used. Rename status to active to better describe what the parameter means. Acked-by: Rodolfo Giometti Reviewed-by: Jiri Slaby Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230117090358.4796-9-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 5d420399073770134d2b03e004b2c0201c7fa26f Author: Ilpo Järvinen Date: Tue Jan 17 11:03:53 2023 +0200 tty: Convert ->dtr_rts() to take bool argument Convert the raise/on parameter in ->dtr_rts() to bool through the callchain. The parameter is used like bool. In USB serial, there remains a few implicit bool -> larger type conversions because some devices use u8 in their control messages. In moxa_tiocmget(), dtr variable was reused for line status which requires int so use a separate variable for status. Reviewed-by: Jiri Slaby Acked-by: Ulf Hansson # For MMC Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230117090358.4796-8-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit b300fb26c59a749bf49559932fa8a85eb916b5a7 Author: Ilpo Järvinen Date: Tue Jan 17 11:03:52 2023 +0200 tty: Convert ->carrier_raised() and callchains to bool Return boolean from ->carrier_raised() instead of 0 and 1. Make the return type change also to tty_port_carrier_raised() that makes the ->carrier_raised() call (+ cd variable in moxa into which its return value is stored). Also cleans up a few unnecessary constructs related to this change: return xx ? 1 : 0; -> return xx; if (xx) return 1; return 0; -> return xx; Reviewed-by: Jiri Slaby Acked-by: Ulf Hansson # For MMC Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230117090358.4796-7-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit dcd794c6ed631b14b5dcfa5afb589ec4f7d0c411 Author: Ilpo Järvinen Date: Tue Jan 17 11:03:51 2023 +0200 serial: Convert uart_{,port_}startup() init_hw param to bool Convert init_hw parameter in uart_startup() and uart_port_startup() to bool as code treats them like bool. Reviewed-by: Jiri Slaby Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230117090358.4796-6-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit c2ac4bfa04d19ea23a48fe6045a3740a7e4c7b8b Author: Ilpo Järvinen Date: Tue Jan 17 11:03:50 2023 +0200 tty: moxa: Make local var storing tty_port_initialized() bool Return type of tty_port_initialized() is bool, use matching type for the local variable. Also reorder the local vars to reverse-xmas-tree while at it. Reviewed-by: Jiri Slaby Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230117090358.4796-5-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 9b5aa54986fc85f5e10045348a8a45894aeb18db Author: Ilpo Järvinen Date: Tue Jan 17 11:03:49 2023 +0200 tty: Cleanup tty_port_set_active() bool parameter Make callers pass true/false consistently for bool val. Reviewed-by: Jiri Slaby Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230117090358.4796-4-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 75b20a2ac425b94f06957fb9963e89123a51866c Author: Ilpo Järvinen Date: Tue Jan 17 11:03:48 2023 +0200 tty: Cleamup tty_port_set_suspended() bool parameter Make callers pass true/false consistently for bool val. Reviewed-by: Jiri Slaby Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230117090358.4796-3-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 515be7baeddb04d786e3a7f4072791087c25bb04 Author: Ilpo Järvinen Date: Tue Jan 17 11:03:47 2023 +0200 tty: Cleanup tty_port_set_initialized() bool parameter Make callers pass true/false consistently for bool val. Reviewed-by: Samuel Iglesias Gonsalvez Reviewed-by: Jiri Slaby Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230117090358.4796-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 3bec2f77f1029ac8549aa1f0223b46a987c49855 Author: Yuan Can Date: Fri Nov 25 09:38:32 2022 +0000 serial: pic32: Add checks for devm_clk_get() in pic32_uart_probe() As the devm_clk_get() may return ERR_PTR, its return value needs to be checked to avoid invalid poineter dereference. Signed-off-by: Yuan Can Link: https://lore.kernel.org/r/20221125093832.33386-1-yuancan@huawei.com Signed-off-by: Greg Kroah-Hartman commit c54d48543689f821f6a5ade7e7fa828ada6a1195 Author: Christoph Niedermaier Date: Fri Dec 2 11:41:27 2022 +0100 serial: stm32: Add support for rs485 RX_DURING_TX output GPIO If a RX_DURING_TX GPIO is defined by the DT property "rs485-rx-during-tx-gpios" this patch switches this GPIO accordingly to the RS485 flag RX_DURING_TX in user space. Controlled by this GPIO, now the hardware is responsible for connecting or disconnecting RX during TX. Signed-off-by: Christoph Niedermaier Link: https://lore.kernel.org/r/20221202104127.122761-4-cniedermaier@dh-electronics.com Signed-off-by: Greg Kroah-Hartman commit ca530cfa968c6fa197ee7df877a277954b87bad5 Author: Christoph Niedermaier Date: Fri Dec 2 11:41:26 2022 +0100 serial: imx: Add support for RS485 RX_DURING_TX output GPIO If a RX_DURING_TX GPIO is defined by the DT property "rs485-rx-during-tx-gpios" this patch switches this GPIO accordingly to the RS485 flag RX_DURING_TX in user space. In addition, the i.MX UART receiver is no longer turned on and off during sending, because now the hardware is responsible for connecting or disconnecting RX during TX controlled by this GPIO. Signed-off-by: Christoph Niedermaier Link: https://lore.kernel.org/r/20221202104127.122761-3-cniedermaier@dh-electronics.com Signed-off-by: Greg Kroah-Hartman commit 163f080eb717d237f02d9a8c179b07ed31fdd6ad Author: Christoph Niedermaier Date: Fri Dec 2 11:41:25 2022 +0100 serial: core: Add option to output RS485 RX_DURING_TX state via GPIO This patch provides a generic GPIO variable for outputting the state of RS485 RX_DURING_TX. The GPIO is defined by the devicetree property "rs485-rx-during-tx-gpios". To use it in a low level serial driver, the evaluation of this variable must be implemented there accordingly. Signed-off-by: Christoph Niedermaier Link: https://lore.kernel.org/r/20221202104127.122761-2-cniedermaier@dh-electronics.com Signed-off-by: Greg Kroah-Hartman commit 45c1d967a762ad8df7e1ccfa4a22dd77e2efa3b8 Author: Christoph Niedermaier Date: Fri Dec 2 11:41:24 2022 +0100 dt-bindings: serial: rs485: Add GPIO controlling RX enable during TX Add a binding for a generic definition of an output GPIO that sets the state of rs485-rx-during-tx. The idea is that the hardware already controls the option receiving during sending before it gets to the signal receiving hardware. The standard RS485 is a half-duplex bus that in most cases is driven by an UART controller. The advantage of using this GPIO is that it is independent of the capabilities of the UART core and the UART driver. On the hardware side the interface to the bus is controlled by a transceiver, that has a pin called RE (RX Enable) or similar, which connects the bus to the RX signal of the UART controller. The GPIO can switch between two states to control the RE pin via an electrical circuit: - Active: The RE pin is always active. The UART RX see everything on the bus and therefore also what happens with the TX signal on the bus. - Inactive: The RE pin is always active, but during sending on the bus the pin RE is inactive. So basically the receiving during sending is suppressed. A possible circuit diagram could look like this: ┌──────────────────┐ │ RS485 │ TX ───────────────┤D │ │ Transceiver │ RTS ────┬──────────┤DE │ │ │ │ │ ┌─────┐ │ │ └─┤& │ │ │ │ ├──┤!RE │ !rx_during_tx_gpio ──────┤ │ │ │ └─────┘ │ │ │ │ RX ───────────────┤R │ │ │ └──────────────────┘ Here the RTS pin of the UART core is used to control TX via the transceiver pin DE (Drive Enable). RE and rx_during_tx_gpio are active low. Signed-off-by: Christoph Niedermaier Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221202104127.122761-1-cniedermaier@dh-electronics.com Signed-off-by: Greg Kroah-Hartman commit 38f28cfe9d08e3a47ef008798b275fef8118fc20 Author: Yi Yang Date: Sat Nov 26 10:08:52 2022 +0800 serial: tegra: Add missing clk_disable_unprepare() in tegra_uart_hw_init() Add the missing clk_disable_unprepare() before return from tegra_uart_hw_init() in the error handling path. When request_irq() fails in tegra_uart_startup(), 'tup->uart_clk' has been enabled, fix it by adding clk_disable_unprepare(). Fixes: cc9ca4d95846 ("serial: tegra: Only print FIFO error message when an error occurs") Fixes: d781ec21bae6 ("serial: tegra: report clk rate errors") Signed-off-by: Yi Yang Link: https://lore.kernel.org/r/20221126020852.113378-1-yiyang13@huawei.com Signed-off-by: Greg Kroah-Hartman commit c8f71b49ee4d28930c4a6798d1969fa91dc4ef3e Author: Isaac True Date: Wed Nov 30 11:55:30 2022 +0100 serial: sc16is7xx: setup GPIO controller later in probe The GPIO controller component of the sc16is7xx driver is setup too early, which can result in a race condition where another device tries to utilise the GPIO lines before the sc16is7xx device has finished initialising. This issue manifests itself as an Oops when the GPIO lines are configured: Unable to handle kernel read from unreadable memory at virtual address ... pc : sc16is7xx_gpio_direction_output+0x68/0x108 [sc16is7xx] lr : sc16is7xx_gpio_direction_output+0x4c/0x108 [sc16is7xx] ... Call trace: sc16is7xx_gpio_direction_output+0x68/0x108 [sc16is7xx] gpiod_direction_output_raw_commit+0x64/0x318 gpiod_direction_output+0xb0/0x170 create_gpio_led+0xec/0x198 gpio_led_probe+0x16c/0x4f0 platform_drv_probe+0x5c/0xb0 really_probe+0xe8/0x448 driver_probe_device+0xe8/0x138 __device_attach_driver+0x94/0x118 bus_for_each_drv+0x8c/0xe0 __device_attach+0x100/0x1b8 device_initial_probe+0x28/0x38 bus_probe_device+0xa4/0xb0 deferred_probe_work_func+0x90/0xe0 process_one_work+0x1c4/0x480 worker_thread+0x54/0x430 kthread+0x138/0x150 ret_from_fork+0x10/0x1c This patch moves the setup of the GPIO controller functions to later in the probe function, ensuring the sc16is7xx device has already finished initialising by the time other devices try to make use of the GPIO lines. The error handling has also been reordered to reflect the new initialisation order. Co-developed-by: Wen-chien Jesse Sung Signed-off-by: Wen-chien Jesse Sung Signed-off-by: Isaac True Link: https://lore.kernel.org/r/20221130105529.698385-1-isaac.true@canonical.com Signed-off-by: Greg Kroah-Hartman commit 7aa34bb3ae9efa11ae3df2c90990715278d52971 Author: Krzysztof Kozlowski Date: Mon Jan 9 16:22:12 2023 +0100 serial: msm: add lock annotation to msm_set_baud_rate() msm_set_baud_rate() releases and re-acquires the port->lock, thus add lock annotation for Sparse static code checks. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230109152212.343476-1-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 03e30f06e5286bc91ba4785d33c1d3fa03e8a442 Author: Christophe JAILLET Date: Fri Dec 30 17:59:56 2022 +0100 serial: sccnxp: 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. This also avoids some other warnings/issues. (see [1]) [1]: https://lore.kernel.org/all/20221118233101.never.215-kees@kernel.org/ Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/735a807c2df835aa436dcbc76b374f983f89a9af.1672419577.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 6e054678ff5c10840ce801dfdb2d4898decb2b63 Author: Liang He Date: Mon Dec 5 16:54:37 2022 +0800 serial: ucc_uart: Add of_node_put() in ucc_uart_remove() In ucc_uart_probe(), we have added proper of_node_put() in the failure paths. However, we miss it before we free *qe_port* in the remove() function. Signed-off-by: Liang He Link: https://lore.kernel.org/r/20221205085437.1163682-1-windhl@126.com Signed-off-by: Greg Kroah-Hartman commit ebd05c0e12edc568243056711ce00f79e19eab68 Author: Neil Armstrong Date: Thu Jan 19 15:04:12 2023 +0100 drm/panel: vtdr6130: fix unused ret in visionox_vtdr6130_bl_update_status Fix the following warning: panel-visionox-vtdr6130.c:249:12: warning: 'ret' is used uninitialized [-Wuninitialized] Fixes: 9402cde9347e ("drm/panel: vtdr6130: Use 16-bit brightness function") Reported-by: Daniel Vetter Reported-by: kernel test robot Reviewed-by: Sam Ravnborg Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230119-topic-sm8550-vtdr6130-fixup-v1-1-82c4fb008138@linaro.org commit 2aaa43c7077833301c237684cd7bc9ae5e3dec95 Author: Bartosz Golaszewski Date: Thu Dec 29 16:50:30 2022 +0100 tty: serial: qcom-geni-serial: add support for serial engine DMA The qcom-geni-serial driver currently only works in SE FIFO mode. This limits the UART speed to around 180 kB/s. In order to achieve higher speeds we need to use SE DMA mode. Keep the console port working in FIFO mode but extend the code to use DMA for the high-speed port. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20221229155030.418800-15-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit 7de06d8455211d2d875bb174e361ccb6faa5ae3f Author: Bartosz Golaszewski Date: Thu Dec 29 16:50:29 2022 +0100 soc: qcom-geni-se: add more symbol definitions The following symbols will be used when adding support for SE DMA in the qcom geni serial driver. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20221229155030.418800-14-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit 40ec6d41c841e27a1e12ac7766a5361e3ff0cb5b Author: Bartosz Golaszewski Date: Thu Dec 29 16:50:28 2022 +0100 tty: serial: qcom-geni-serial: use of_device_id data Instead of checking the device compatible in probe(), assign the device-specific data to struct of_device_id. We'll use it later when providing SE DMA support. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20221229155030.418800-13-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit 0626afe57b1f02a961e18802ea445dc562bdf77b Author: Bartosz Golaszewski Date: Thu Dec 29 16:50:27 2022 +0100 tty: serial: qcom-geni-serial: drop the return value from handle_rx The return value of the handle_rx() callback is never checked. Drop it. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20221229155030.418800-12-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit bd7955840cbefd0efffd0e2e9c14b2e6f77eb94c Author: Bartosz Golaszewski Date: Thu Dec 29 16:50:26 2022 +0100 tty: serial: qcom-geni-serial: refactor qcom_geni_serial_send_chunk_fifo() Shuffle the code a bit, drop unneeded variables, make types of others more consistent and use uart_xmit_advance() instead of handling tail->xmit manually. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20221229155030.418800-11-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit d420fb491cbcd948e6aa6057616a128d7697ade0 Author: Bartosz Golaszewski Date: Thu Dec 29 16:50:25 2022 +0100 tty: serial: qcom-geni-serial: split out the FIFO tx code qcom_geni_serial_handle_tx() is pretty big, let's move the code that handles the actual writing of data to a separate function which makes sense in preparation for introducing a dma variant of handle_tx(). Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20221229155030.418800-10-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit 3931b8fdecbfc6ec901e7586e1770d73df636535 Author: Bartosz Golaszewski Date: Thu Dec 29 16:50:24 2022 +0100 tty: serial: qcom-geni-serial: remove unneeded tabs Remove redundant indentation in struct member assignment. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20221229155030.418800-9-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit fe6a00e8fcbecc8af36f8ba3b7bd5c8d28b10f05 Author: Bartosz Golaszewski Date: Thu Dec 29 16:50:23 2022 +0100 tty: serial: qcom-geni-serial: refactor qcom_geni_serial_isr() Simplify the conditions in qcom_geni_serial_isr() and fix indentation. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221229155030.418800-8-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit 2f853f83f4bae34887723c7b32db8277bd489ca2 Author: Bartosz Golaszewski Date: Thu Dec 29 16:50:22 2022 +0100 tty: serial: qcom-geni-serial: remove stray newlines Remove stray newlines around #ifdefs for consistency with the rest of the driver code. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20221229155030.418800-7-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit 00ce7c6e86b5d1f04c4feb9e010b0408c7be1002 Author: Bartosz Golaszewski Date: Thu Dec 29 16:50:21 2022 +0100 tty: serial: qcom-geni-serial: improve the to_dev_port() macro The member we want to resolve in struct qcom_geni_serial_port is called uport so we don't need an additional redundant parameter in this macro. While at it: turn the macro into a static inline function. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20221229155030.418800-6-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit 6cde11dbf4b65170eeefba48df730c93d75e01a3 Author: Bartosz Golaszewski Date: Thu Dec 29 16:50:20 2022 +0100 tty: serial: qcom-geni-serial: align #define values Keep the #define symbols aligned for better readability. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20221229155030.418800-5-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit 68c6bd92c86cbc4937834c79963b27c77ee3bf51 Author: Bartosz Golaszewski Date: Thu Dec 29 16:50:19 2022 +0100 tty: serial: qcom-geni-serial: remove unused symbols Drop all unused symbols from the driver. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20221229155030.418800-4-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit d0fabb0dc1a6237fc93250114916abc3fb286e98 Author: Bartosz Golaszewski Date: Thu Dec 29 16:50:18 2022 +0100 tty: serial: qcom-geni-serial: drop unneeded forward definitions If we shuffle the code a bit, we can drop all forward definitions of various static functions. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20221229155030.418800-3-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit d8aca2f96813d51df574a811eda9a2cbed00f261 Author: Bartosz Golaszewski Date: Thu Dec 29 16:50:17 2022 +0100 tty: serial: qcom-geni-serial: stop operations in progress at shutdown We don't stop transmissions in progress at shutdown. This is fine with FIFO SE mode but with DMA (support for which we'll introduce later) it causes trouble so fix it now. Fixes: e83766334f96 ("tty: serial: qcom_geni_serial: No need to stop tx/rx on UART shutdown") Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20221229155030.418800-2-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit bf8baa00668dbc4fcfca5ac49ae8a3059c795e4e Author: Jiri Slaby (SUSE) Date: Thu Jan 12 09:01:36 2023 +0100 tty: vt: cache row count in con_scroll() It's used on few places, so make the code easier to follow by caching the subtraction result. Signed-off-by: Jiri Slaby (SUSE) Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230112080136.4929-11-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 424c82af26b1b8ca6c0be06987a4e6d18c9a92dd Author: Jiri Slaby (SUSE) Date: Thu Jan 12 09:01:35 2023 +0100 tty: vt: saner names for more scroll variables Rename more variables (t, b, s, d) -> (top, bottom, src, dst) to make them more obvious. Signed-off-by: Jiri Slaby (SUSE) Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230112080136.4929-10-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 8aad24ad9d0498747e55aa89879a96cedb926be2 Author: Jiri Slaby (SUSE) Date: Thu Jan 12 09:01:34 2023 +0100 tty: vt: separate array juggling to juggle_array() The algorithm used for scrolling is the array juggling. It has complexity O(N) and space complexity O(1). I.e. quite fast w/o requirements for temporary storage. Move the algorithm to a separate function so it is obvious what it is. It is almost generic (except the array type), so if anyone else wants array rotation, feel free to make it generic and move it to include/. And rename all the variables from i, j, k, sz, d, and so on to something saner. Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20230112080136.4929-9-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 287696d5b4112bb7d78bdeda713cc44f93f30765 Author: Jiri Slaby (SUSE) Date: Thu Jan 12 09:01:33 2023 +0100 tty: vt: simplify some unicode conditions After previous patches, we can simply test vc->vc_uni_lines, so do so in many unicode functions. This makes the code more compact. And even use if (!) return; in vc_uniscr_scroll(), so that the whole code is indented on the left. Signed-off-by: Jiri Slaby (SUSE) Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230112080136.4929-8-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 441c938168afdb747801d22adc1f2f21b5e204d7 Author: Jiri Slaby (SUSE) Date: Thu Jan 12 09:01:32 2023 +0100 tty: vt: replace BUG_ON() by WARN_ON_ONCE() No need to panic in vc_uniscr_copy_line(), just warn. This should never happen though, as vc_uniscr_check() is supposed to be called before vc_uniscr_copy_line(). And the former checks vc->vc_uni_lines already. In any case, use _ONCE as vc_uniscr_copy_line() is called repeatedly for each line. So don't flood the logs, just in case. Signed-off-by: Jiri Slaby (SUSE) Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230112080136.4929-7-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit feb36abbedea2644bf31693aa287a33a3a9fbd7c Author: Jiri Slaby (SUSE) Date: Thu Jan 12 09:01:31 2023 +0100 tty: vt: remove struct uni_screen It contains only lines with pointers to characters (u32s). So use simple clear 'u32 **lines' all over the code. This avoids zero-length arrays. It also makes the allocation less error-prone (size of the struct wasn't taken into account at all). Signed-off-by: Jiri Slaby (SUSE) Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230112080136.4929-6-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 0c8414a68272d98889e21f8d130dc6e03689c289 Author: Jiri Slaby (SUSE) Date: Thu Jan 12 09:01:30 2023 +0100 tty: vt: remove char32_t typedef It boils down to uint32_t, so use u32 directly, instead. This makes the code more obvious. Signed-off-by: Jiri Slaby (SUSE) Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230112080136.4929-5-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4ba77bfbad9e85a629f1e126f86ed4f3b5f09f83 Author: Jiri Slaby (SUSE) Date: Thu Jan 12 09:01:29 2023 +0100 tty: vt: use sizeof(*variable) where possible Instead of sizeof(type), use sizeof(*variable) which is preferred. We are going to remove the unicode's char32_t typedef, so this makes the switch easier. Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20230112080136.4929-4-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 70caeac76d1c3274f3bd16093c5a5f61517ab2a2 Author: Jiri Slaby (SUSE) Date: Thu Jan 12 09:01:28 2023 +0100 tty: vt: remove reference to undefined NO_VC_UNI_SCREEN NO_VC_UNI_SCREEN is defined nowhere. Remove the last reference to it. Signed-off-by: Jiri Slaby (SUSE) Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230112080136.4929-3-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 3b140fbbbb18ffcfa3906229789aa417a5af35b3 Author: Jiri Slaby (SUSE) Date: Thu Jan 12 09:01:27 2023 +0100 tty: vt: drop get_vc_uniscr() Its definition depends on the NO_VC_UNI_SCREEN macro. But that is never defined, so remove all this completely. I.e. expand the macro to vc->vc_uni_screen everywhere. Signed-off-by: Jiri Slaby (SUSE) Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230112080136.4929-2-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 3831c2a454a1034944374391526515bd7debb1e4 Author: Jiri Slaby (SUSE) Date: Thu Jan 12 09:01:26 2023 +0100 tty: vt: remove vc_uniscr_debug_check() VC_UNI_SCREEN_DEBUG is always defined as 0, so this code is never executed. Drop it along with VC_UNI_SCREEN_DEBUG. Signed-off-by: Jiri Slaby (SUSE) Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230112080136.4929-1-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 885692ae3c17e6ef3962c826eea6bcfe871d8e5a Author: Nate Drude Date: Thu Dec 22 08:56:34 2022 -0600 tty: serial: fsl_lpuart: increase maximum uart_nr to eight Some SoCs like the i.MX93 have aliases for up to eight UARTs, see: https://github.com/torvalds/linux/blob/v6.1/arch/arm64/boot/dts/freescale/imx93.dtsi#L31-L38 Increase UART_NR from 6 to 8 to support lpuart7 and lpuart8 and avoid initialization failures like the following: [ 0.837146] fsl-lpuart 42690000.serial: serial6 out of range [ 0.842814] fsl-lpuart: probe of 42690000.serial failed with error -22 Signed-off-by: Nate Drude Reviewed-by: Sherry Sun Link: https://lore.kernel.org/r/20221222145634.2217793-1-nate.d@variscite.com Signed-off-by: Greg Kroah-Hartman commit 509597ebcac4d61fc012ea3ccd364581a8ca3926 Author: Sherry Sun Date: Wed Dec 14 11:11:37 2022 +0800 tty: serial: imx: disable the break condition when shutdown the uart port The comment in imx_uart_shutdown() says to disable the break condition, but it doesn't actually do that, here fix this by disabling UCR1_SNDBRK when closing the uart port like other uart drivers do. Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20221214031137.28815-4-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit 10929eac4144a656a966da69d8a5491395dc0a99 Author: Sherry Sun Date: Wed Dec 14 11:11:36 2022 +0800 tty: serial: fsl_lpuart: disable the break condition when shutdown the uart port Need to disable the break condition for lpuart driver when closing the uart port like other uart drivers do. Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20221214031137.28815-3-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit c4c81db5cf8bc53d6160c3abf26d382c841aa434 Author: Sherry Sun Date: Wed Dec 14 11:11:35 2022 +0800 tty: serial: fsl_lpuart: disable the CTS when send break signal LPUART IP has a bug that it treats the CTS as higher priority than the break signal, which cause the break signal sending through UARTCTRL_SBK may impacted by the CTS input if the HW flow control is enabled. Add this workaround patch to fix the IP bug, we can disable CTS before asserting SBK to avoid any interference from CTS, and re-enable it when break off. Such as for the bluetooth chip power save feature, host can let the BT chip get into sleep state by sending a UART break signal, and wake it up by turning off the UART break. If the BT chip enters the sleep mode successfully, it will pull up the CTS line, if the BT chip is woken up, it will pull down the CTS line. If without this workaround patch, the UART TX pin cannot send the break signal successfully as it affected by the BT CTS pin. After adding this patch, the BT power save feature can work well. Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20221214031137.28815-2-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit 4029dfc034febb54f6dd8ea83568accc943bc088 Author: Sherry Sun Date: Fri Nov 25 18:19:53 2022 +0800 tty: serial: fsl_lpuart: clear LPUART Status Register in lpuart32_shutdown() The LPUART Status Register needs to be cleared when closing the uart port to get a clean environment when reopening the uart. Fixes: 380c966c093e ("tty: serial: fsl_lpuart: add 32-bit register interface support") Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20221125101953.18753-4-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit 1d4bd0e4ae4ba95892bef919a8d4d3f08f122d7e Author: Sherry Sun Date: Fri Nov 25 18:19:52 2022 +0800 tty: serial: fsl_lpuart: disable Rx/Tx DMA in lpuart32_shutdown() UARTBAUD_RDMAE and UARTBAUD_TDMAE are enabled in lpuart32_startup(), but lpuart32_shutdown() not disable them, only free the dma ring buffer and release the dma channels, so here disable the Rx/Tx DMA first in lpuart32_shutdown(). Fixes: 42b68768e51b ("serial: fsl_lpuart: DMA support for 32-bit variant") Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20221125101953.18753-3-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit e1d91dda0bd1b96c10ea5d85fee94021c70dd55b Author: Sherry Sun Date: Fri Nov 25 18:19:51 2022 +0800 tty: serial: fsl_lpuart: only enable Idle Line Interrupt for non-dma case For the lpuart driver, the Idle Line Interrupt Enable now is only needed for the CPU mode, so enable the UARTCTRL_ILIE at the correct place, and clear it when shutdown. Also need to configure the suitable UARTCTRL_IDLECFG, now the value is 0x7, represent 128 idle characters will trigger the Idle Line Interrupt. Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20221125101953.18753-2-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit 7370a25f9315e732ab7538d6c7e85208176d8fa2 Author: Sven Schnelle Date: Fri Dec 9 12:27:37 2022 +0100 tty/vt: prevent registration of console with invalid number If a user specifies an invalid console like 'console=tty3000', the vt driver should prevent setting up a vt entry for that. Suggested-by: Jiri Slaby Signed-off-by: Sven Schnelle Link: https://lore.kernel.org/r/20221209112737.3222509-3-svens@linux.ibm.com Signed-off-by: Greg Kroah-Hartman commit db4df8e9d79e7d37732c1a1b560958e8dadfefa1 Author: Sven Schnelle Date: Fri Dec 9 12:27:36 2022 +0100 tty: fix out-of-bounds access in tty_driver_lookup_tty() When specifying an invalid console= device like console=tty3270, tty_driver_lookup_tty() returns the tty struct without checking whether index is a valid number. To reproduce: qemu-system-x86_64 -enable-kvm -nographic -serial mon:stdio \ -kernel ../linux-build-x86/arch/x86/boot/bzImage \ -append "console=ttyS0 console=tty3270" This crashes with: [ 0.770599] BUG: kernel NULL pointer dereference, address: 00000000000000ef [ 0.771265] #PF: supervisor read access in kernel mode [ 0.771773] #PF: error_code(0x0000) - not-present page [ 0.772609] Oops: 0000 [#1] PREEMPT SMP PTI [ 0.774878] RIP: 0010:tty_open+0x268/0x6f0 [ 0.784013] chrdev_open+0xbd/0x230 [ 0.784444] ? cdev_device_add+0x80/0x80 [ 0.784920] do_dentry_open+0x1e0/0x410 [ 0.785389] path_openat+0xca9/0x1050 [ 0.785813] do_filp_open+0xaa/0x150 [ 0.786240] file_open_name+0x133/0x1b0 [ 0.786746] filp_open+0x27/0x50 [ 0.787244] console_on_rootfs+0x14/0x4d [ 0.787800] kernel_init_freeable+0x1e4/0x20d [ 0.788383] ? rest_init+0xc0/0xc0 [ 0.788881] kernel_init+0x11/0x120 [ 0.789356] ret_from_fork+0x22/0x30 Signed-off-by: Sven Schnelle Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20221209112737.3222509-2-svens@linux.ibm.com Signed-off-by: Greg Kroah-Hartman commit 9676ab9b073f953a586593a64908952e6f4c83ea Author: Krzysztof Kozlowski Date: Thu Dec 1 14:30:36 2022 +0100 dt-bindings: serial: qcom,msm-uart: Convert to DT schema Convert the Qualcomm MSM SoC UART (non-DMA) bindings to DT schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221201133036.45288-1-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 8573b2ebcea3f16680ba294bad1478eecc5de601 Author: Ilpo Järvinen Date: Fri Nov 25 15:05:09 2022 +0200 serial: 8250_early: Convert literals to use defines Use existing defines for the serial register values in 8250_early. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221125130509.8482-7-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit afd216ca17b1fd24f6b73a1490752c22ab42598c Author: Ilpo Järvinen Date: Fri Nov 25 15:05:08 2022 +0200 serial: 8250: Define IIR 64 byte bit & cleanup related code 16750 indicates 64 bytes FIFO with a IIR bit. Add define for it and make related code more obvious. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221125130509.8482-6-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 3398cc4f2b1592148a2ebabc5a2df3e303d4e77c Author: Ilpo Järvinen Date: Fri Nov 25 15:05:07 2022 +0200 serial: 8250: Add IIR FIFOs enabled field properly Don't use magic literals & comments but define a real field instead for UART_IIR_FIFO_ENABLED and name also the values. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221125130509.8482-5-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 67a9aee7815d10e9227e32c3c7ea26726284eaef Author: Ilpo Järvinen Date: Fri Nov 25 15:05:06 2022 +0200 serial: 8250: Cleanup MCR literals Use proper names from MCR bits. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221125130509.8482-4-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit d9c1d3cbdeec94f077679b73ed5ce3a4fe4bf4b8 Author: Ilpo Järvinen Date: Fri Nov 25 15:05:05 2022 +0200 serial: 8250: Name MSR literals Add UART_MSR_STATUS_BITS for CD, RI, DSR & CTS. Use names for the literal. Don't make the define for combined flags part of UAPI. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221125130509.8482-3-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ef460db2a7c1df5eda2ea6011e7586e54e23b8c4 Author: Ilpo Järvinen Date: Fri Nov 25 15:05:04 2022 +0200 serial: 8250: Use defined IER bits Instead of literal 0x0f, add a define for enabling all IER bits the 8250 driver is interested in. Don't make the define for combined flags part of UAPI. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20221125130509.8482-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 98a59cd26e22e34ecae6af769cfc9f3b4ecd6c72 Author: Jean Delvare Date: Fri Nov 25 14:27:56 2022 +0100 serial: liteuart: 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: Karol Gugala Cc: Mateusz Holenko Cc: Gabriel Somlo Cc: Joel Stanley Cc: Greg Kroah-Hartman Acked-by: Gabriel Somlo Link: https://lore.kernel.org/r/20221125142756.3e51a28d@endymion.delvare Signed-off-by: Greg Kroah-Hartman commit f1c6c8b1b42dd72bd54adec003463650b84893d8 Author: Gabriel Somlo Date: Wed Nov 23 08:05:00 2022 -0500 serial: liteuart: move polling putchar() function The polling liteuart_putchar() function is only called from methods conditionally enabled by CONFIG_SERIAL_LITEUART_CONSOLE. Move its definition closer to the console code where it is dependent on the same config option. Signed-off-by: Gabriel Somlo Reviewed-by: Ilpo Järvinen Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20221123130500.1030189-15-gsomlo@gmail.com Signed-off-by: Greg Kroah-Hartman commit 01a305a36639a438e27503202a46f191b74bd168 Author: Gabriel Somlo Date: Wed Nov 23 08:04:59 2022 -0500 serial: liteuart: add IRQ support for the TX path Switch the TX path to IRQ-driven operation, while maintaining support for polling mode via the poll timer. Signed-off-by: Gabriel Somlo Reviewed-by: Ilpo Järvinen Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20221123130500.1030189-14-gsomlo@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5602cf99dcdcc0bf8f9a5979b7443fbe46686995 Author: Gabriel Somlo Date: Wed Nov 23 08:04:58 2022 -0500 serial: liteuart: add IRQ support for the RX path Add support for IRQ-driven RX. Support for the TX path will be added in a separate commit. Signed-off-by: Gabriel Somlo Reviewed-by: Ilpo Järvinen Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20221123130500.1030189-13-gsomlo@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7121d86effddc28dc21fec38d59923ea12d5a873 Author: Gabriel Somlo Date: Wed Nov 23 08:04:57 2022 -0500 serial: liteuart: move function definitions Move definitions for liteuart_[stop|start]_tx(), liteuart_stop_rx(), and liteuart_putchar() to a more convenient location in preparation for adding IRQ support. This patch contains no functional changes. Signed-off-by: Gabriel Somlo Reviewed-by: Ilpo Järvinen Reviewed-by: Geert Uytterhoeven Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20221123130500.1030189-12-gsomlo@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5dcceabe8e2a72845e3cf7c73ab2302bf5deb69a Author: Gabriel Somlo Date: Wed Nov 23 08:04:56 2022 -0500 serial: liteuart: separate rx loop from poll timer Convert the rx loop into its own dedicated function, and (for now) call it from the poll timer. This is in preparation for adding irq support to the receive path. Signed-off-by: Gabriel Somlo Reviewed-by: Ilpo Järvinen Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20221123130500.1030189-11-gsomlo@gmail.com Signed-off-by: Greg Kroah-Hartman commit a774aa4580d4339a37e4810f303b6a39ddc745ea Author: Gabriel Somlo Date: Wed Nov 23 08:04:55 2022 -0500 serial: liteuart: clean up rx loop variables The `status` variable will always be `1` when passed into the call to `uart_insert_char()`, so it can be eliminated altogether. Use `u8` as the type for `ch`, as it matches the return type of the `litex_read8()` call which produces its value. Signed-off-by: Gabriel Somlo Reviewed-by: Ilpo Järvinen Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20221123130500.1030189-10-gsomlo@gmail.com Signed-off-by: Greg Kroah-Hartman commit ca538cc7271dea86773712b84ed02b22aaed1a12 Author: Gabriel Somlo Date: Wed Nov 23 08:04:54 2022 -0500 serial: liteuart: simplify passing of uart_insert_char() flag Simply provide the hard-coded TTY_NORMAL flag to uart_insert_char() directly -- no need to dedicate a variable for that exclusive purpose. Signed-off-by: Gabriel Somlo Reviewed-by: Ilpo Järvinen Reviewed-by: Geert Uytterhoeven Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20221123130500.1030189-9-gsomlo@gmail.com Signed-off-by: Greg Kroah-Hartman commit 771268843caa3ecd3fa43b05a6d1d74700785ad8 Author: Gabriel Somlo Date: Wed Nov 23 08:04:53 2022 -0500 serial: liteuart: rx loop should only ack rx events While receiving characters, it is necessary to acknowledge each one by writing to the EV_PENDING register's EV_RX bit. Ensure we do not also gratuitously set the EV_TX bit in the process. Signed-off-by: Gabriel Somlo Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20221123130500.1030189-8-gsomlo@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2ee91d42bf5ac2f2f2862d06f7344ffe89d4a032 Author: Gabriel Somlo Date: Wed Nov 23 08:04:52 2022 -0500 serial: liteuart: move tty_flip_buffer_push() out of rx loop Calling tty_flip_buffer_push() for each individual received character is overkill. Move it out of the rx loop, and only call it once per set of characters received together. Signed-off-by: Gabriel Somlo Reviewed-by: Ilpo Järvinen Reviewed-by: Geert Uytterhoeven Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20221123130500.1030189-7-gsomlo@gmail.com Signed-off-by: Greg Kroah-Hartman commit b9f5a18a9d7c4c41325c72971abec19278c7c6e6 Author: Gabriel Somlo Date: Wed Nov 23 08:04:51 2022 -0500 serial: liteuart: minor style fix in liteuart_init() Signed-off-by: Gabriel Somlo Reviewed-by: Ilpo Järvinen Reviewed-by: Geert Uytterhoeven Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20221123130500.1030189-6-gsomlo@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7378beacbb3357b76f26938749b009e01e5ab00b Author: Gabriel Somlo Date: Wed Nov 23 08:04:50 2022 -0500 serial: liteuart: don't set unused port fields Remove regshift and iobase port fields, since they are unused by the driver. Signed-off-by: Gabriel Somlo Reviewed-by: Geert Uytterhoeven Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20221123130500.1030189-5-gsomlo@gmail.com Signed-off-by: Greg Kroah-Hartman commit 380596228d21f25027b5bb8770eef587f9f742f5 Author: Gabriel Somlo Date: Wed Nov 23 08:04:49 2022 -0500 serial: liteuart: remove unused uart_ops stubs Remove stub uart_ops methods that are not called unconditionally from serial_core. Signed-off-by: Gabriel Somlo Reviewed-by: Ilpo Järvinen Reviewed-by: Geert Uytterhoeven Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20221123130500.1030189-4-gsomlo@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5996b2e338eae69aa40c9692bfd896abebc75798 Author: Gabriel Somlo Date: Wed Nov 23 08:04:48 2022 -0500 serial: liteuart: use bit number macros Replace magic bit constants (e.g., 1, 2, 4) with BIT(x) expressions. Signed-off-by: Gabriel Somlo Reviewed-by: Geert Uytterhoeven Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20221123130500.1030189-3-gsomlo@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2696216becbe2db3eb8dba38008a5a222317167e Author: Gabriel Somlo Date: Wed Nov 23 08:04:47 2022 -0500 serial: liteuart: use KBUILD_MODNAME as driver name Replace hard-coded instances of "liteuart" with KBUILD_MODNAME. Signed-off-by: Gabriel Somlo Reviewed-by: Geert Uytterhoeven Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20221123130500.1030189-2-gsomlo@gmail.com Signed-off-by: Greg Kroah-Hartman commit 359fb3f870465cc3b9a77728d09e033a248b40b6 Author: Bin Meng Date: Fri Dec 9 23:04:37 2022 +0800 serial: Rename earlycon semihost driver Now that earlycon semihost driver works on RISC-V too, let's use a much more generic name for the driver. Signed-off-by: Bin Meng Tested-by: Sergey Matyukevich Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20221209150437.795918-4-bmeng@tinylab.org Signed-off-by: Greg Kroah-Hartman commit db5489f4be000cbb7e7ce9cc1a264c5d3d25b56f Author: Bin Meng Date: Fri Dec 9 23:04:36 2022 +0800 riscv: Implement semihost.h for earlycon semihost driver Per RISC-V semihosting spec [1], implement semihost.h for the existing Arm semihosting earlycon driver to work on RISC-V. Link: https://github.com/riscv/riscv-semihosting-spec/blob/main/riscv-semihosting-spec.adoc [1] Signed-off-by: Bin Meng Tested-by: Sergey Matyukevich Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20221209150437.795918-3-bmeng@tinylab.org Signed-off-by: Greg Kroah-Hartman commit 8890717526c8e13801f7e866329a2bfce3a62240 Author: Bin Meng Date: Fri Dec 9 23:04:35 2022 +0800 serial: earlycon-arm-semihost: Move smh_putc() variants in respective arch's semihost.h Move smh_putc() variants in respective arch/*/include/asm/semihost.h, in preparation to add RISC-V support. Signed-off-by: Bin Meng Tested-by: Sergey Matyukevich Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20221209150437.795918-2-bmeng@tinylab.org Signed-off-by: Greg Kroah-Hartman commit 82253ddaff582147cd3fd0e629c4e65d62b1d015 Author: Johannes Berg Date: Thu Jan 19 14:57:11 2023 +0100 wifi: mac80211: drop extra 'e' from ieeee80211... name Somehow an extra 'e' slipped in there without anyone noticing, drop that from ieeee80211_obss_color_collision_notify(). Signed-off-by: Johannes Berg commit 41000b03af9e15075061cdbeea461cfa5e12a8eb Author: Ricardo Ribalda Date: Thu Nov 24 13:39:08 2022 +0100 earlycon: Increase options size Now that the clock frequency is also part of the options, 16 bytes is too little. Without this patch dmesg does not show the whole options, Eg: earlycon: uart0 at MMIO32 0x00000000fedc9000 (options '115200n8,480000') instead of: '115200n8,48000000' Signed-off-by: Ricardo Ribalda Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20221123-serial-clk-v3-2-49c516980ae0@chromium.org Signed-off-by: Greg Kroah-Hartman commit 374b30f27f1ae5a88c7f2868ec4abff9fc14d679 Author: Ricardo Ribalda Date: Thu Nov 24 13:39:07 2022 +0100 earlycon: Let users set the clock frequency Some platforms, namely AMD Picasso, use non standard uart clocks (48M), witch makes it impossible to use with earlycon. Let the user select its own frequency. Signed-off-by: Ricardo Ribalda Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20221123-serial-clk-v3-1-49c516980ae0@chromium.org Signed-off-by: Greg Kroah-Hartman commit 3609ff6401c3660e859cda0dd944782ec8300e7e Author: Lukas Wunner Date: Sun Jan 8 18:08:08 2023 +0100 wifi: cfg80211: Deduplicate certificate loading load_keys_from_buffer() in net/wireless/reg.c duplicates x509_load_certificate_list() in crypto/asymmetric_keys/x509_loader.c for no apparent reason. Deduplicate it. No functional change intended. Signed-off-by: Lukas Wunner Acked-by: David Howells Link: https://lore.kernel.org/r/e7280be84acda02634bc7cb52c97656182b9c700.1673197326.git.lukas@wunner.de Signed-off-by: Johannes Berg commit e2192de59e457aef8d1f055a452131f0b3e5d097 Author: Johannes Berg Date: Wed Jan 18 14:26:53 2023 +0100 bitfield: add FIELD_PREP_CONST() Neither FIELD_PREP() nor *_encode_bits() can be used in constant contexts (such as initializers), but we don't want to define shift constants for all masks just for use in initializers, and having checks that the values fit is also useful. Therefore, add FIELD_PREP_CONST() which is a smaller version of FIELD_PREP() that can only take constant arguments and has less friendly (but not less strict) error checks, and expands to a constant value. Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20230118142652.53f20593504b.Iaeea0aee77a6493d70e573b4aa55c91c00e01e4b@changeid Signed-off-by: Johannes Berg commit 52af7863508e94f3e05e43a3f2f3943a71dcffab Author: Andy Shevchenko Date: Tue Jan 17 17:21:20 2023 +0200 device property: Make fwnode_graph_for_each_endpoint() consistent Make fwnode_graph_for_each_endpoint() consistent with the rest of for_each_*() definitions in the file, i.e. use the form of for (iter = func(NULL); iter; \ iter = func(iter)) as it's done in all the rest of the similar macro definitions. Signed-off-by: Andy Shevchenko Acked-by: Rafael J. Wysocki Acked-by: Sakari Ailus Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230117152120.42531-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 2636455b28cb477a1b74c570023ac505ff1a3890 Author: Philipp Hortmann Date: Wed Jan 18 21:00:17 2023 +0100 staging: rtl8192e: Remove unused variable DM_Type DM_Type is initialized and then never evaluated. Remove resulting dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/380fa2767d1f1cc32a5ad271057683d67ceb1b6f.1674071236.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit a749318330a4729210c1a67b27e4807aec85552d Author: Philipp Hortmann Date: Wed Jan 18 21:00:07 2023 +0100 staging: rtl8192e: Remove unused variable RF_C_TxPwDiff RF_C_TxPwDiff is set to a value and then never evaluated. Remove resulting dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/bcace15cc05057ab310f807f27619ef6ff391d91.1674071236.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5190cd2a203d125b2dfb7eaabdad496811e9d5fd Author: Philipp Hortmann Date: Wed Jan 18 20:59:37 2023 +0100 staging: rtl8192e: Remove unused variable H2CTxCmdSeq H2CTxCmdSeq is never used. Remove resulting dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/3e6da78dff15cb5e5e26450d8e3f23e2e10ce61f.1674071236.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit bc989fff450e8fbbc049b9858d56d572731283d2 Author: Philipp Hortmann Date: Wed Jan 18 20:59:52 2023 +0100 staging: rtl8192e: Remove unused variable PwrDomainProtect PwrDomainProtect is initialized and then never evaluated. Remove resulting dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/769f4d3337872d29d8fc5e31613aac52b6bae95b.1674071236.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1032f497c5a1f42e3add5939605dae9b0f16f06a Author: Philipp Hortmann Date: Wed Jan 18 20:59:21 2023 +0100 staging: rtl8192e: Remove unused variable framesyncC34 framesyncC34 is written and then never evaluated. Remove resulting dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/e641717f1b89dd9bba99a0f14fc2c24996cb6bd7.1674071236.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit f48cc55bf37d2dcf5a9061ff6d644e56b45b458c Author: Philipp Hortmann Date: Wed Jan 18 20:59:13 2023 +0100 staging: rtl8192e: Remove unused variable SifsTime SifsTime is written and then never evaluated. Remove resulting dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/40234d0b1ab1eff23c71d96e8b0f1f0085e2bbac.1674071236.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 779c9e938d824dcd6489bc1064a3a58d66d918bc Author: Philipp Hortmann Date: Wed Jan 18 20:59:03 2023 +0100 staging: rtl8192e: Rename PHYRegDef, CurrentChannelBW and CustomerID Rename variable PHYRegDef to phy_reg_def, CurrentChannelBW to current_chnl_bw and CustomerID to customer_id to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/d609d1edfaa500a9512c2e3c950efc2e2a266a70.1674071236.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0dd7c4d8c5fab44fd62cb02fa6c56537a5b74537 Author: Philipp Hortmann Date: Wed Jan 18 20:58:51 2023 +0100 staging: rtl8192e: Rename LastRxDescTSF, LoopbackMode and pFirmware Rename variable LastRxDescTSF to last_rx_desc_tsf, LoopbackMode to loopback_mode and pFirmware to fw_info to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/d6c77644d5602ad6e5b4889336a1a4700401321d.1674071236.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 448a586b71fe603a98cd9e335fbe115ea1137f0b Author: Philipp Hortmann Date: Wed Jan 18 20:58:41 2023 +0100 staging: rtl8192e: Rename LongRetryL.., ShortRetryL.. and ReceiveConfig Rename variable LongRetryLimit to long_retry_limit, ShortRetryLimit to short_retry_limit and ReceiveConfig to receive_config to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/6e3920f3353ebc6dd1d039f54688fa1966cc431b.1674071236.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 049e40ef203ebdf530cb37a3f5f7752d0c07b288 Author: Deepak R Varma Date: Wed Jan 18 10:05:44 2023 +0530 staging: wlan-ng: Remove unused code Following structs are defined but never used. Remove such dead code. hfa384x_pdr_pcb_partnum hfa384x_pdr_pcb_tracenum hfa384x_pdr_nic_serial hfa384x_pdr_mkk_measurements hfa384x_pdr_nic_ramsize hfa384x_pdr_refdac_measurements hfa384x_pdr_vgdac_measurements hfa384x_pdr_level_comp_measurements hfa384x_pdr_mac_address hfa384x_pdr_mkk_callname hfa384x_pdr_regdomain hfa384x_pdr_allowed_channel hfa384x_pdr_default_channel hfa384x_pdr_privacy_option hfa384x_pdr_temptype hfa384x_pdr_refdac_setup hfa384x_pdr_vgdac_setup hfa384x_pdr_level_comp_setup hfa384x_pdr_trimdac_setup hfa384x_pdr_ifr_setting hfa384x_pdr_rfr_setting hfa384x_pdr_hfa3861_baseline hfa384x_pdr_hfa3861_shadow hfa384x_pdr_hfa3861_ifrf hfa384x_pdr_hfa3861_chcalsp hfa384x_pdr_hfa3861_chcali hfa384x_pdr_hfa3861_nic_config hfa384x_pdr_hfo_delay hfa384x_pdr_hfa3861_manf_testsp hfa384x_pdr_hfa3861_manf_testi hfa384x_pdr_end_of_pda Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/Y8d3IOQ8fry2xmz4@ubun2204.myguest.virtualbox.org Signed-off-by: Greg Kroah-Hartman commit f6510a93cfd8c6c79b4dda0f2967cdc6df42eff4 Author: Yuan Can Date: Thu Jan 19 08:31:19 2023 +0000 staging: emxx_udc: Add checks for dma_alloc_coherent() As the dma_alloc_coherent may return NULL, the return value needs to be checked to avoid NULL poineter dereference. Signed-off-by: Yuan Can Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230119083119.16956-1-yuancan@huawei.com Signed-off-by: Greg Kroah-Hartman commit 93c473948c588978cd55d9a3adad8b3e8057aa21 Author: Jó Ágila Bitsch Date: Fri Jan 13 01:53:19 2023 +0100 usb: gadget: add WebUSB landing page support There is a custom (non-USB IF) extension to the USB standard: https://wicg.github.io/webusb/ This specification is published under the W3C Community Contributor Agreement, which in particular allows to implement the specification without any royalties. The specification allows USB gadgets to announce an URL to landing page and describes a Javascript interface for websites to interact with the USB gadget, if the user allows it. It is currently supported by Chromium-based browsers, such as Chrome, Edge and Opera on all major operating systems including Linux. This patch adds optional support for Linux-based USB gadgets wishing to expose such a landing page. During device enumeration, a host recognizes that the announced USB version is at least 2.01, which means, that there are BOS descriptors available. The device than announces WebUSB support using a platform device capability. This includes a vendor code under which the landing page URL can be retrieved using a vendor-specific request. Previously, the BOS descriptors would unconditionally include an LPM related descriptor, as BOS descriptors were only ever sent when the device was LPM capable. As this is no longer the case, this patch puts this descriptor behind a lpm_capable condition. Usage is modeled after os_desc descriptors: echo 1 > webusb/use echo "https://www.kernel.org" > webusb/landingPage lsusb will report the device with the following lines: Platform Device Capability: bLength 24 bDescriptorType 16 bDevCapabilityType 5 bReserved 0 PlatformCapabilityUUID {3408b638-09a9-47a0-8bfd-a0768815b665} WebUSB: bcdVersion 1.00 bVendorCode 0 iLandingPage 1 https://www.kernel.org Signed-off-by: Jó Ágila Bitsch Link: https://lore.kernel.org/r/Y8Crf8P2qAWuuk/F@jo-einhundert Signed-off-by: Greg Kroah-Hartman commit e02e6ca588b88cf0d5eeecb3dffbe6bf10e6fa53 Author: Anand Moon Date: Wed Jan 18 04:44:17 2023 +0000 arm64: defconfig: Enable USB onboard HUB driver Enable the USB onboard HUB driver, used on Amlogic boards. Signed-off-by: Anand Moon Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230118044418.875-10-linux.amoon@gmail.com Signed-off-by: Greg Kroah-Hartman commit 143307adcf55a3bb2ed53e012dfc56a07cf5193f Author: Anand Moon Date: Wed Jan 18 04:44:16 2023 +0000 usb: misc: onboard_usb_hub: add VIA LAB VL817 hub support VIA LAB VL817 is a 4-port USB 3.1 hub and USB 2.0 root hub that has a reset pin to toggle and a 5.0V core supply exported though an integrated LDO is available for powering it. Add the support for this hub, for controlling the reset pin and the core power supply. Add USB device id's for USB 2.0 and USB 3.0 root hub. Signed-off-by: Anand Moon Acked-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20230118044418.875-9-linux.amoon@gmail.com Signed-off-by: Greg Kroah-Hartman commit 71593b2020b37fd39ac91efae64d79962eb6c867 Author: Anand Moon Date: Wed Jan 18 04:44:15 2023 +0000 arm64: dts: amlogic: Used onboard usb hub reset on odroid c4 On Odroid c4 previously use gpio-hog to reset the usb hub, switch to used on-board usb hub reset to enable the usb hub and enable power to hub. USB hub is combination of USB 2.0 and USB 3.0 root hub so use peer-hub node to link then. Signed-off-by: Anand Moon Link: https://lore.kernel.org/r/20230118044418.875-8-linux.amoon@gmail.com Signed-off-by: Greg Kroah-Hartman commit 31360c28dfdd18d77496bcceee44c10ab86cf7a0 Author: Anand Moon Date: Wed Jan 18 04:44:14 2023 +0000 dt-bindings: usb: Add binding for Via lab VL817 hub controller The VIA Lab VL817 is a USB 3.1 Gen 1 hub and USB 2.0 hub controller that features 4 downstream ports and 1 otg, with an internal 5V regulator and has external reset pin. Add a device tree binding for its USB protocol part. The internal LDO is not covered by this and can just be modelled as a fixed regulator. Add combo of USB 2.0 and USB 3.0 root hub using peer-hub. Signed-off-by: Anand Moon Link: https://lore.kernel.org/r/20230118044418.875-7-linux.amoon@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5e86e1a5076b88807f8b5215d93e96274996dcb9 Author: Anand Moon Date: Wed Jan 18 04:44:13 2023 +0000 vendor-prefixes: Add VIA Labs, Inc. Add the vendor prefix for VIA Labs, Inc. (VLI) is a supplier of USB and USB Power Delivery controllers for multi-functional devices and platforms. Website: https://www.via-labs.com/ Acked-by: Krzysztof Kozlowski Signed-off-by: Anand Moon Link: https://lore.kernel.org/r/20230118044418.875-6-linux.amoon@gmail.com Signed-off-by: Greg Kroah-Hartman commit db7cab26c3d1382ec85d8cadf642f57250edea58 Author: Anand Moon Date: Wed Jan 18 04:44:12 2023 +0000 usb: misc: onboard_usb_hub: add Genesys Logic GL852G hub support Genesys Logic GL852G is a 4-port USB 2.0 STT hub that has a reset pin to toggle and a 5.0V core supply exported though an integrated LDO is available for powering it. Add the support for this hub, for controlling the reset pin and the core power supply. Signed-off-by: Anand Moon Acked-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20230118044418.875-5-linux.amoon@gmail.com Signed-off-by: Greg Kroah-Hartman commit f24859bbec8a5226211656cd293caed5ad3c7326 Author: Anand Moon Date: Wed Jan 18 04:44:11 2023 +0000 arm64: dts: amlogic: Used onboard usb hub reset on odroid c2 On Odroid c2 previously use gpio-hog to reset the usb hub, switch to used on-board usb hub reset to enable the usb hub and enable power to hub. Signed-off-by: Anand Moon Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230118044418.875-4-linux.amoon@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3325f3e4534c3b93b52bf23c02854eff67fdbdf8 Author: Anand Moon Date: Wed Jan 18 04:44:10 2023 +0000 ARM: dts: amlogic: Used onboard usb hub reset to enable usb hub On Odroid c1 previously use gpio-hog to reset the usb hub, switch to used on board usb hub reset to enable the usb hub and enable power to usb hub. Add usb hub regulator as per the schematic. Signed-off-by: Anand Moon Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230118044418.875-3-linux.amoon@gmail.com Signed-off-by: Greg Kroah-Hartman commit b72654148e34c181f532275d03ef6f37de288f24 Author: Anand Moon Date: Wed Jan 18 04:44:09 2023 +0000 dt-bindings: usb: Add device id for Genesys Logic hub controller Add usb hub device id for Genesys Logic, Inc. GL852G Hub USB 2.0 root hub. Signed-off-by: Anand Moon Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230118044418.875-2-linux.amoon@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5aba179c34291ef67206bce6fa0fe0873c8dfc4e Author: Chunfeng Yun Date: Thu Jan 19 11:33:22 2023 +0800 usb: mtu3: fix the failure of qmu stop This happens when do stress test of uvc stream on/off which will enable/disable endpoints. uvc has four tx requests, and may disable endpoint between queue tx requests as following: enable ep --> start qmu queue tx request0 queue tx request1 queue tx request2 --> resume qmu disable ep --> stop qmu may fail [1] queue tx request3 --> will resume qmu, may cause qmu can't work when enable ep next time [2] [1]: when the tx fifo has some data to transmit, and try to stop qmu (stop ep) meanwhile resume qmu (queue tx request), it may cause stop qmu timeout, then can be fixed by flushing fifo when stop qmu. [2]: it resumes qmu again, shall stop qmu again. Signed-off-by: Chunfeng Yun Reported-by: Min Guo Link: https://lore.kernel.org/r/20230119033322.21426-1-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 3e679bde529e892a59e89d3a0728cc153e8ecefe Author: Linus Walleij Date: Wed Jan 18 08:09:21 2023 +0100 usb: fotg210-udc: Implement VBUS session Implement VBUS session handling for FOTG210. This is mainly used by the UDC driver which needs to call down to the FOTG210 core and enable/disable VBUS, as this needs to be handled outside of the HCD and UDC drivers, by platform specific glue code. The Gemini has a special bit in a system register to turn VBUS on and off so we implement this in the FOTG210 core. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230103-gemini-fotg210-usb-v2-7-100388af9810@linaro.org Signed-off-by: Greg Kroah-Hartman commit 816f518df20531a01eb8ddd2e84adc9791e16539 Author: Linus Walleij Date: Wed Jan 18 08:09:20 2023 +0100 usb: fotg210-udc: Assign of_node and speed on start Follow the example set by other drivers to assign of_node and speed to the driver when binding, also print bound info akin to other UDC drivers. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230103-gemini-fotg210-usb-v2-6-100388af9810@linaro.org Signed-off-by: Greg Kroah-Hartman commit bb5fe85609c6e21e96fc5669ae200c68a1e05a9b Author: Linus Walleij Date: Wed Jan 18 08:09:19 2023 +0100 usb: fotg210: Check role register in core Read the role register and check that we are in host/peripheral mode and issue warnings if we're not in the right role when probing respective driver. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230103-gemini-fotg210-usb-v2-5-100388af9810@linaro.org Signed-off-by: Greg Kroah-Hartman commit faaca436699603355c5c9711942c6441eec38b0e Author: Linus Walleij Date: Wed Jan 18 08:09:18 2023 +0100 usb: fotg210: Move clock handling to core Grab the optional silicon block clock, prepare and enable it in the core before proceeding to prepare the host or peripheral driver. This saves duplicate code and also uses the simple devm_clk_get_optional_enabled() to do everything we really want to do. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230103-gemini-fotg210-usb-v2-4-100388af9810@linaro.org Signed-off-by: Greg Kroah-Hartman commit baef5330d35b477056c0304ce1283f0aed4d5d20 Author: Linus Walleij Date: Wed Jan 18 08:09:17 2023 +0100 usb: fotg210: Acquire memory resource in core The subdrivers are obtaining and mapping the memory resource separately. Create a common state container for the shared resources and start populating this by acquiring the IO memory resource and remap it and pass this to the subdrivers for host and peripheral. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230103-gemini-fotg210-usb-v2-3-100388af9810@linaro.org Signed-off-by: Greg Kroah-Hartman commit 170da81aab077c9e85fc2b786413ca07942774a0 Author: Linus Walleij Date: Wed Jan 18 08:09:16 2023 +0100 usb: fotg210: List different variants There are at least two variants of the FOTG: FOTG200 and FOTG210. Handle them in this driver and let's add more quirks as we go along. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230103-gemini-fotg210-usb-v2-2-100388af9810@linaro.org Signed-off-by: Greg Kroah-Hartman commit 8867258e706acb1b36f2ce648fa702ae5800aa70 Author: Linus Walleij Date: Wed Jan 18 08:09:15 2023 +0100 dt-bindings: usb: Correct and extend FOTG210 schema It turns out that this IP block exists in at least two incarnations: FOTG200 and FOTG210. The one in the Gemini is FOTG200, so add the variants and rectify the binding for Gemini. This affects things such as the placement of certain registers. It remains to be seen how similar this block is to the third USB block from Faraday, FUSB220. Signed-off-by: Linus Walleij Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230103-gemini-fotg210-usb-v2-1-100388af9810@linaro.org Signed-off-by: Greg Kroah-Hartman commit b993ea2b75fdb0d335487b1b1450c36410585584 Author: Harini Katakam Date: Thu Jan 5 10:03:51 2023 +0100 arm64: dts: zynqmp: Add xlnx prefix to GEM compatible string cdns,zynq/zynqmp/versal-gem was recently deprecated in Linux in favour of xlnx prefix. Add this new compatible string and remove the existing cdns,zynqmp-gem compatible string. Signed-off-by: Harini Katakam Reviewed-by: Laurent Pinchart Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/578a4fcbb4143888af954996a45f5e1110e0ee50.1672909426.git.michal.simek@amd.com commit 8932a99240f53aa5dc5f56da3345ebb266a79bca Author: Michal Simek Date: Thu Jan 5 09:41:22 2023 +0100 ARM: zynq: Use recommended dma-controller name instead of dmac Use standard name for dma controller. Issue is reported by dtbs_check as dmac@f8003000: $nodename:0: 'dmac@f8003000' does not match '^dma-controller(@.*)?$' Reviewed-by: Krzysztof Kozlowski Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/5637d7e3464fbc1b2b269a7df35e24edc2c8d4ac.1672908080.git.michal.simek@amd.com commit ba2a4db96f4adc1a6b54cf274bb7488bd3f95a10 Author: Harini Katakam Date: Thu Jan 5 10:05:36 2023 +0100 ARM: dts: zynq: Add xlnx prefix to GEM compatible string cdns,zynq/zynqmp/versal-gem was recently deprecated in Linux in favour of xlnx prefix. Add this new compatible string and remove the existing cdns,zynq-gem compatible string. Signed-off-by: Harini Katakam Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/7768d5d68fe38dd8e9300e9c6e09c228e79b2862.1672909533.git.michal.simek@amd.com commit 0ebb348417b0752dcf645a233989923b0759b6f9 Author: Michal Simek Date: Thu Jan 5 09:40:32 2023 +0100 ARM: zynq: Comment interrupt names IRQs for pl330 pl330 DT yaml description doesn't define interrupt-names property that's why comment it but keep it as comment. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/8e5a921c16efe09030fda036340186c11dd990bf.1672908030.git.michal.simek@amd.com commit 03953a697bdd0728b2f20309133b8664896ffd4a Author: Kan Liang Date: Wed Jan 18 09:56:32 2023 -0800 perf vendor events intel: Add Emerald Rapids The event list of the Emerald Rapids is the same as the Sapphire Rapids. Add the CPU model ID of Emerald Rapids into the mapfile.csv and point it to the event list of Sapphire Rapids. Signed-off-by: Kan Liang Acked-by: Ian Rogers Cc: Andi Kleen Cc: Artem Bityutskiy Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20230118175632.3165217-1-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit c84f433ef5f85f76b10f7d7c08a07080e6162ab5 Merge: 3c107f36db061 624864fbff927 Author: Paolo Abeni Date: Thu Jan 19 13:50:13 2023 +0100 Merge branch 'generic-implementation-of-phy-interface-and-fixed_phy-support-for-the-lan743x-device' Pavithra Sathyanarayanan says: ==================== generic implementation of phy interface and fixed_phy support for the LAN743x device This patch series includes the following changes: - Remove the unwanted interface settings in the LAN743x driver as it is preset in EEPROM configurations. - Handle generic implementation for the phy interfaces for different devices LAN7430/31 and pci11x1x. - Add new feature for fixed_phy support at 1Gbps full duplex for the LAN7431 device if a phy not found over MDIO. Includes support for communication between a MAC in a LAN7431 device and custom phys without an MDIO interface. ==================== Link: https://lore.kernel.org/r/20230117141614.4411-1-Pavithra.Sathyanarayanan@microchip.com Signed-off-by: Paolo Abeni commit 624864fbff9279aebcbc0c7c5119c205b98a2d99 Author: Pavithra Sathyanarayanan Date: Tue Jan 17 19:46:14 2023 +0530 net: lan743x: add fixed phy support for LAN7431 device Add fixed_phy support at 1Gbps full duplex for the lan7431 device if a phy not found over MDIO. Tested with a MAC to MAC connection from LAN7431 to a KSZ9893 switch. This avoids the Driver open error in LAN743x. TX delay and internal CLK125 generation is already enabled in EEPROM. Signed-off-by: Pavithra Sathyanarayanan Signed-off-by: Paolo Abeni commit e86c721090e38ebf09c591682ffd70185c8bffaf Author: Pavithra Sathyanarayanan Date: Tue Jan 17 19:46:13 2023 +0530 net: lan743x: add generic implementation for phy interface selection Add logic to read the Phy interface from MAC_CR register for LAN743x driver. Checks for the LAN7430/31 or pci11x1x devices and the adapter interface is updated accordingly. For LAN7431, adapter interface is set based on Bit 19 of MAC_CR register as MII or RGMII which removes the forced RGMII/GMII configurations in lan743x_phy_open(). Signed-off-by: Pavithra Sathyanarayanan Signed-off-by: Paolo Abeni commit 1c9bb44290090d438352ca3ec33c9068262d61f2 Author: Pavithra Sathyanarayanan Date: Tue Jan 17 19:46:12 2023 +0530 net: lan743x: remove unwanted interface select settings Remove the MII/RGMII Selection settings in driver as it is preset by the EEPROM and has the required configurations before the driver loads for LAN743x. Signed-off-by: Pavithra Sathyanarayanan Signed-off-by: Paolo Abeni commit 3524f89edaf0159330a3199a42fb97f1aa1d13d9 Author: qinyu Date: Mon Jan 16 09:21:43 2023 +0800 perf docs: Fix a typo in 'perf probe' man page: l20th -> 120th Fix a minor typo in 'perf probe' doc. Fixes: 631c9def804b2c92 ("perf probe: Support --line option to show probable source-code lines") Signed-off-by: qinyu Acked-by: Ian Rogers Cc: Feilong Lin Cc: Hewenliang Cc: Ingo Molnar Cc: Masami Hiramatsu Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230116012143.432435-1-qinyu32@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 485c5bc590899cb640d32e43a471bbc6e134cfc7 Author: Jing Zhang Date: Tue Jan 17 15:29:33 2023 +0800 perf vendor events arm64: Add instruction mix metrics for neoverse-n2-v2 Add instruction mix related metrics. Reviewed-by: John Garry Signed-off-by: Jing Zhang Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andrew Kilroy Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shuai Xue Cc: Will Deacon Cc: Xing Zhengjun Cc: Zhuo Song Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/1673940573-90503-10-git-send-email-renyu.zj@linux.alibaba.com Signed-off-by: Arnaldo Carvalho de Melo commit 4befa5cf8469790bd73f3795f2b02e3baf26022c Author: Jing Zhang Date: Tue Jan 17 15:29:32 2023 +0800 perf vendor events arm64: Add PE utilization metrics for neoverse-n2-v2 Add PE utilization related metrics. In cpu_utilization metric, if it is neoverse-n2 which slots are 5, the real stall_slot need to subtract the cpu_cycles according to the neoverse-n2 errata [0]. [0] https://documentation-service.arm.com/static/636a66a64e6cf12278ad89cb?token= Reviewed-by: John Garry Signed-off-by: Jing Zhang Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andrew Kilroy Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shuai Xue Cc: Will Deacon Cc: Xing Zhengjun Cc: Zhuo Song Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/1673940573-90503-9-git-send-email-renyu.zj@linux.alibaba.com Signed-off-by: Arnaldo Carvalho de Melo commit a1adade799bd9348a9bb290b3df2ca5068cd57bc Author: Jing Zhang Date: Tue Jan 17 15:29:31 2023 +0800 perf vendor events arm64: Add branch metrics for neoverse-n2-v2 Add branch related metrics. Reviewed-by: John Garry Signed-off-by: Jing Zhang Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andrew Kilroy Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shuai Xue Cc: Will Deacon Cc: Xing Zhengjun Cc: Zhuo Song Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/1673940573-90503-8-git-send-email-renyu.zj@linux.alibaba.com Signed-off-by: Arnaldo Carvalho de Melo commit 8556d367a7f9c44860422bca5fb677f07aca3960 Author: Jing Zhang Date: Tue Jan 17 15:29:30 2023 +0800 perf vendor events arm64: Add cache metrics for neoverse-n2-v2 Add cache related metrics. Reviewed-by: John Garry Signed-off-by: Jing Zhang Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andrew Kilroy Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shuai Xue Cc: Will Deacon Cc: Xing Zhengjun Cc: Zhuo Song Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/1673940573-90503-7-git-send-email-renyu.zj@linux.alibaba.com Signed-off-by: Arnaldo Carvalho de Melo commit 6a60dd2e876913be55e17e53ee57e1fe09448238 Author: Jing Zhang Date: Tue Jan 17 15:29:29 2023 +0800 perf vendor events arm64: Add TLB metrics for neoverse-n2-v2 Add TLB related metrics. Reviewed-by: John Garry Signed-off-by: Jing Zhang Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andrew Kilroy Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shuai Xue Cc: Will Deacon Cc: Xing Zhengjun Cc: Zhuo Song Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/1673940573-90503-6-git-send-email-renyu.zj@linux.alibaba.com Signed-off-by: Arnaldo Carvalho de Melo commit c1c685cee6a12005fdc05ffdd584e30840da5b0c Author: Jing Zhang Date: Tue Jan 17 15:29:28 2023 +0800 perf vendor events arm64: Add topdown L1 metrics for neoverse-n2-v2 Add general topdown L1 metrics for neoverse-n2-v2. Due to the wrong count of stall_slot and stall_slot_frontend on neoverse-n2, the real stall_slot and real stall_slot_frontend need to subtract cpu_cycles, so overwrite the "MetricExpr" for neoverse-n2 which slots are 5. Reference from ARM neoverse-n2 errata notice [0], D117. Since neoverse-n2/neoverse-v2 does not yet support topdown L2, metric groups such as Cache, TLB, Branch, InstructionsMix and PEutilization will be added to further analysis of performance bottlenecks in the following patches. Reference from ARM PMU guide [1][2]. [0] https://documentation-service.arm.com/static/636a66a64e6cf12278ad89cb?token= [1] https://documentation-service.arm.com/static/628f8fa3dfaf015c2b76eae8?token= [2] https://documentation-service.arm.com/static/62cfe21e31ea212bb6627393?token= Reviewed-by: John Garry Signed-off-by: Jing Zhang Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andrew Kilroy Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shuai Xue Cc: Will Deacon Cc: Xing Zhengjun Cc: Zhuo Song Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/1673940573-90503-5-git-send-email-renyu.zj@linux.alibaba.com Signed-off-by: Arnaldo Carvalho de Melo commit a9ff64e5a0421914c6b23e4505d9384b8c745b5a Author: Jing Zhang Date: Tue Jan 17 15:29:27 2023 +0800 perf vendor events arm64: Add common topdown L1 metrics The metrics of topdown L1 are from ARM sbsa7.0 platform design doc[0], D37-38, which are standard. So put them in the common file sbsa.json of arm64, so that other cores besides n2/v2 can also be reused. [0] https://documentation-service.arm.com/static/60250c7395978b529036da86?token= Reviewed-by: John Garry Signed-off-by: Jing Zhang Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andrew Kilroy Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shuai Xue Cc: Will Deacon Cc: Xing Zhengjun Cc: Zhuo Song Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/1673940573-90503-4-git-send-email-renyu.zj@linux.alibaba.com Signed-off-by: Arnaldo Carvalho de Melo commit 5b51e47a3f1d7619b424b4b89b5d19569a462b09 Author: Jing Zhang Date: Tue Jan 17 15:29:26 2023 +0800 perf jevent: Add general metrics support Add general metrics support, so that some general metrics applicable to multiple architectures can be defined in the public JSON file like general events, and then add general metrics through "arch_std_event" in JSON file of different architecture. Reviewed-by: John Garry Signed-off-by: Jing Zhang Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andrew Kilroy Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shuai Xue Cc: Will Deacon Cc: Xing Zhengjun Cc: Zhuo Song Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/1673940573-90503-3-git-send-email-renyu.zj@linux.alibaba.com Signed-off-by: Arnaldo Carvalho de Melo commit acef233b7ca749fda153a06bbd2d9feb2bb16857 Author: Jing Zhang Date: Tue Jan 17 15:29:25 2023 +0800 perf pmu: Add #slots literal support for arm64 The slots in each architecture may be different, so add #slots literal to obtain the slots of different architectures, and the #slots can be applied in the metric. Currently, The #slots just support for arm64, and other architectures will return NAN. On arm64, the value of slots is from the register PMMIR_EL1.SLOT, which I can read in /sys/bus/event_source/device/armv8_pmuv3_*/caps/slots. PMMIR_EL1.SLOT might read as zero if the PMU version is lower than ID_AA64DFR0_EL1_PMUVer_V3P4 or the STALL_SLOT event is not implemented. Reviewed-by: John Garry Signed-off-by: Jing Zhang Cc: Alexander Shishkin Cc: Andrew Kilroy Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shuai Xue Cc: Will Deacon Cc: Xing Zhengjun Cc: Zhuo Song Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/1673940573-90503-2-git-send-email-renyu.zj@linux.alibaba.com Signed-off-by: Arnaldo Carvalho de Melo commit b430d243673760ada58d3c8678ba9f11f72083cb Author: Ian Rogers Date: Tue Jan 17 23:24:09 2023 -0800 perf script flamegraph: Avoid d3-flame-graph package dependency Currently flame graph generation requires a d3-flame-graph template to be installed. Unfortunately this is hard to come by for things like Debian [1]. If the template isn't installed then ask if it should be downloaded from jsdelivr CDN. The downloaded HTML file is validated against an md5sum. If the download fails, generate a minimal flame graph with the javascript coming from links to jsdelivr CDN. v3. Adds a warning message and quits before download in live mode. v2. Change the warning to a prompt about downloading and add the --allow-download command line flag. Add an md5sum check for the downloaded HTML. [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=996839 Reviewed-by: Andreas Gerstmayr Signed-off-by: Ian Rogers Cc: 996839@bugs.debian.org Cc: Alexander Shishkin Cc: Brendan Gregg Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Martin Spier Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230118072409.147786-1-irogers@google.com # v3 discussion Link: https://lore.kernel.org/r/20230112220024.32709-1-irogers@google.com # v2 discussion Link: https://lore.kernel.org/r/CAP-5=fXi_9zdhTAoYApiFQoLURAvpEatFzU3uL23o3zs=z25ZQ@mail.gmail.com # v1 discussion Signed-off-by: Arnaldo Carvalho de Melo commit 3c107f36db061603bee7564fbd6388b1f1879fd3 Author: Hangbin Liu Date: Wed Jan 18 10:09:27 2023 +0800 selftests/net: mv bpf/nat6to4.c to net folder There are some issues with the bpf/nat6to4.c building. 1. It use TEST_CUSTOM_PROGS, which will add the nat6to4.o to kselftest-list file and run by common run_tests. 2. When building the test via `make -C tools/testing/selftests/ TARGETS="net"`, the nat6to4.o will be build in selftests/net/bpf/ folder. But in test udpgro_frglist.sh it refers to ../bpf/nat6to4.o. The correct path should be ./bpf/nat6to4.o. 3. If building the test via `make -C tools/testing/selftests/ TARGETS="net" install`. The nat6to4.o will be installed to kselftest_install/net/ folder. Then the udpgro_frglist.sh should refer to ./nat6to4.o. To fix the confusing test path, let's just move the nat6to4.c to net folder and build it as TEST_GEN_FILES. Fixes: edae34a3ed92 ("selftests net: add UDP GRO fraglist + bpf self-tests") Tested-by: Björn Töpel Signed-off-by: Hangbin Liu Link: https://lore.kernel.org/r/20230118020927.3971864-1-liuhangbin@gmail.com Signed-off-by: Paolo Abeni commit 43bde505d66a41c2ad706d603e97b2c8aa2fbe4a Author: Jani Nikula Date: Wed Jan 4 12:05:30 2023 +0200 drm/edid: move EDID BPC quirk application to update_display_info() The BPC quirks are closer to home in update_display_info(). Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/8997e0fa3b0fd03c920e72d1dff24c0d96ff4dd0.1672826282.git.jani.nikula@intel.com commit 45ea02d1ca3b18fa3479a561ea4f6d03737f2d30 Author: Jani Nikula Date: Wed Jan 4 12:05:29 2023 +0200 drm/edid: merge ELD handling to update_display_info() Simplify display info update by merging ELD handling as well as clearing of the data in update_display_info(). The connector->eld really should be moved under display_info altogether, but that's for another time. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/1f2e7424b998fbcdd9cea488e7d6d7cbb26c460f.1672826282.git.jani.nikula@intel.com commit 4959b693d72d61e4c98bb16bca00c36c9faf524a Author: Jani Nikula Date: Wed Jan 4 12:05:28 2023 +0200 drm/edid: stop passing quirks around Now that quirks are stored in display info, we can just look them up using the connector instead of having to pass them around. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/d55049dd9b2e48e63103f2dfa49bc9b25dd57f82.1672826282.git.jani.nikula@intel.com commit 783dedc535703ec6fa7c96754ac264b482821e2f Author: Jani Nikula Date: Wed Jan 4 12:05:27 2023 +0200 drm/edid: store quirks in display info Although the quirks are internal to EDID parsing, it'll be helpful to store them in display info to avoid having to pass them around. This will also help separate adding probed modes (which needs the quirks) from updating display info. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/819b908f64ad2d158245917f436f24d33a65b95d.1672826282.git.jani.nikula@intel.com commit 5fc1f76a85ce50b501b1d2ef04a29bc79910807d Author: Nir Levy Date: Wed Nov 23 15:17:20 2022 +0200 ARM: OMAP2+: Fix spelling typos in comment Fix spelling: adress -> address Signed-off-by: Nir Levy Message-Id: <20221123131720.79978-1-bhr166@gmail.com> Signed-off-by: Tony Lindgren commit fd30b085deebe73d78e4321f88a7f95ba1db86a9 Author: Mike Leach Date: Mon Jan 16 12:49:27 2023 +0000 coresight: trace-id: Add debug & test macros to Trace ID allocation Adds in a number of pr_debug macros to allow the debugging and test of the trace ID allocation system. Signed-off-by: Mike Leach Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230116124928.5440-15-mike.leach@linaro.org commit aa19bb4c35834dd574b36d482cc44c78816e6fcd Author: Mike Leach Date: Mon Jan 16 12:49:26 2023 +0000 coresight: events: PERF_RECORD_AUX_OUTPUT_HW_ID used for Trace ID Use the perf_report_aux_output_id() call to output the CoreSight trace ID and associated CPU as a PERF_RECORD_AUX_OUTPUT_HW_ID record in the perf.data file. Signed-off-by: Mike Leach Reviewed-by: Suzuki K Poulose Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230116124928.5440-14-mike.leach@linaro.org commit 7d30d480a6910b643aae8603a3905c9e22327e37 Author: Mike Leach Date: Mon Jan 16 12:49:24 2023 +0000 kernel: events: Export perf_report_aux_output_id() CoreSight trace being updated to use the perf_report_aux_output_id() in a similar way to intel-pt. This function in needs export visibility to allow it to be called from kernel loadable modules, which CoreSight may configured to be built as. Signed-off-by: Mike Leach Acked-by: Suzuki K Poulose Acked-by: Peter Zijlstra (Intel) Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230116124928.5440-12-mike.leach@linaro.org commit 206bb3858949b6509de75f7d3697303a073cbaa1 Author: Mike Leach Date: Mon Jan 16 12:49:21 2023 +0000 coresight: trace id: Remove legacy get trace ID function. Removes legacy coresight_get_trace_id() function now its use has been removed from the ETM code. Signed-off-by: Mike Leach Reviewed-by: Suzuki K Poulose Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230116124928.5440-9-mike.leach@linaro.org commit 42708bac18cf7f09c058058cd4564f879c53b900 Author: Mike Leach Date: Mon Jan 16 12:49:20 2023 +0000 coresight: etmX.X: stm: Remove trace_id() callback CoreSight sources provide a callback (.trace_id) in the standard source ops which returns the ID to the core code. This was used to check that sources all had a unique Trace ID. Uniqueness is now gauranteed by the Trace ID allocation system, and the check code has been removed from the core. This patch removes the unneeded and unused .trace_id source ops from the ops structure and implementations in etm3x, etm4x and stm. Signed-off-by: Mike Leach Reviewed-by: Suzuki K Poulose Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230116124928.5440-8-mike.leach@linaro.org commit 9edf291091f68f4767cb9d65fa825b64021277bd Author: Mike Leach Date: Mon Jan 16 12:49:19 2023 +0000 coresight: etm3x: Update ETM3 driver to use Trace ID API Use the TraceID API to allocate ETM trace IDs dynamically. As with the etm4x we allocate on enable / disable for perf, allocate on enable / reset for sysfs. Additionally we allocate on sysfs file read as both perf and sysfs can read the ID before enabling the hardware. Remove sysfs option to write trace ID - which is inconsistent with both the dynamic allocation method and the fixed allocation method previously used. Signed-off-by: Mike Leach Reviewed-by: Suzuki K Poulose Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230116124928.5440-7-mike.leach@linaro.org commit df4871204e5de97e47959f826e9cd2e76b41f969 Author: Mike Leach Date: Mon Jan 16 12:49:18 2023 +0000 coresight: etm4x: Update ETM4 driver to use Trace ID API The trace ID API is now used to allocate trace IDs for ETM4.x / ETE devices. For perf sessions, these will be allocated on enable, and released on disable. For sysfs sessions, these will be allocated on enable, but only released on reset. This allows the sysfs session to interrogate the Trace ID used after the session is over - maintaining functional consistency with the previous allocation scheme. The trace ID will also be allocated on read of the mgmt/trctraceid file. This ensures that if perf or sysfs read this before enabling trace, the value will be the one used for the trace session. Trace ID initialisation is removed from the _probe() function. Signed-off-by: Mike Leach Reviewed-by: Suzuki K Poulose Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230116124928.5440-6-mike.leach@linaro.org commit 8d1091c785e1599cccb3d14c54c79e4d7e325220 Author: Mike Leach Date: Mon Jan 16 12:49:17 2023 +0000 coresight: stm: Update STM driver to use Trace ID API Updates the STM driver to use the trace ID allocation API. This uses the _system_id calls to allocate an ID on device poll, and release on device remove. The sysfs access to the STMTRACEIDR register has been changed from RW to RO. Having this value as writable is not appropriate for the new Trace ID scheme - and had potential to cause errors in the previous scheme if values clashed with other sources. Signed-off-by: Mike Leach Reviewed-by: Suzuki K Poulose Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230116124928.5440-5-mike.leach@linaro.org commit 4ff1fdb4125c4e500dcbb8bf3826bb65f7a79429 Author: Mike Leach Date: Mon Jan 16 12:49:16 2023 +0000 coresight: perf: traceid: Add perf ID allocation and notifiers Adds in calls to allocate and release Trace ID for the CPUs in use by the perf session. Adds in notifier calls to the trace ID allocator that perf events are starting and stopping. This ensures that Trace IDs associated with CPUs remain the same throughout the perf session, and are only released when all perf sessions are complete. Signed-off-by: Mike Leach Reviewed-by: Suzuki K Poulose Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230116124928.5440-4-mike.leach@linaro.org commit bdeb62a386bed6df4f13c4592263158e004c64b4 Author: Mike Leach Date: Mon Jan 16 12:49:15 2023 +0000 coresight: Remove obsolete Trace ID unniqueness checks The checks for sources to have unique IDs has been removed - this is now guaranteed by the ID allocation mechanisms, and inappropriate where multiple ID maps are in use in larger systems Signed-off-by: Mike Leach Reviewed-by: Suzuki K Poulose Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230116124928.5440-3-mike.leach@linaro.org commit 338a588e9db3c5ea7a35bb332cb3bdb532fd1f08 Author: Mike Leach Date: Mon Jan 16 12:49:14 2023 +0000 coresight: trace-id: Add API to dynamically assign Trace ID values The existing mechanism to assign Trace ID values to sources is limited and does not scale for larger multicore / multi trace source systems. The API introduces functions that reserve IDs based on availabilty represented by a coresight_trace_id_map structure. This records the used and free IDs in a bitmap. CPU bound sources such as ETMs use the coresight_trace_id_get_cpu_id coresight_trace_id_put_cpu_id pair of functions. The API will record the ID associated with the CPU. This ensures that the same ID will be re-used while perf events are active on the CPU. The put_cpu_id function will pend release of the ID until all perf cs_etm sessions are complete. For backward compatibility the functions will attempt to use the same CPU IDs as the legacy system would have used if these are still available. Non-cpu sources, such as the STM can use coresight_trace_id_get_system_id / coresight_trace_id_put_system_id. Signed-off-by: Mike Leach [ Fix checkpatch warning in drivers/hwtracing/coresight/coresight-trace-id.c ] Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230116124928.5440-2-mike.leach@linaro.org commit 5dbbc9e00c29767b31192dc314b009d314856c4f Author: Geert Uytterhoeven Date: Wed Nov 9 14:37:57 2022 +0100 ARM: OMAP2+: Remove unneeded #include Commit 6f3ab009a178098e ("ARM: OMAP2+: Remove unused legacy code for device init") removed the last user of the pinctrl machine API. Signed-off-by: Geert Uytterhoeven Message-Id: <5dd5e235af9b3def7f4a431edc7bb8504b0681bf.1668001020.git.geert+renesas@glider.be> Signed-off-by: Tony Lindgren commit 4dc6a7170a005d8a911bf55187bfd580b96b49e2 Author: Geert Uytterhoeven Date: Wed Nov 9 14:36:55 2022 +0100 ARM: OMAP2+: Remove unneeded #include Commit 44c22a2d12a5c04d ("ARM: OMAP2+: pm33xx: Add support for rtc+ddr in self refresh mode") added the include, but no user. Signed-off-by: Geert Uytterhoeven Message-Id: <7f22fb21f76f4d23be2e31a5908bcfa295704ef4.1668000965.git.geert+renesas@glider.be> Signed-off-by: Tony Lindgren commit 852be13f3bd32c1eab808840cfac41b1fea25991 Author: Jacek Lawrynowicz Date: Tue Jan 17 10:27:23 2023 +0100 accel/ivpu: Add PM support - Implement cold and warm firmware boot flows - Add hang recovery support - Add runtime power management support Co-developed-by: Krystian Pradzynski Signed-off-by: Krystian Pradzynski Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20230117092723.60441-8-jacek.lawrynowicz@linux.intel.com commit cd7272215c44676dba236491941c6c406701cc5e Author: Jacek Lawrynowicz Date: Tue Jan 17 10:27:22 2023 +0100 accel/ivpu: Add command buffer submission logic Each of the user contexts has two command queues, one for compute engine and one for the copy engine. Command queues are allocated and registered in the device when the first job (command buffer) is submitted from the user space to the VPU device. The userspace provides a list of GEM buffer object handles to submit to the VPU, the driver resolves buffer handles, pins physical memory if needed, increments ref count for each buffer and stores pointers to buffer objects in the ivpu_job objects that track jobs submitted to the device. The VPU signals job completion with an asynchronous message that contains the job id passed to firmware when the job was submitted. Currently, the driver supports simple scheduling logic where jobs submitted from user space are immediately pushed to the VPU device command queues. In the future, it will be extended to use hardware base scheduling and/or drm_sched. Co-developed-by: Andrzej Kacprowski Signed-off-by: Andrzej Kacprowski Signed-off-by: Jacek Lawrynowicz Reviewed-by: Oded Gabbay Reviewed-by: Jeffrey Hugo Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20230117092723.60441-7-jacek.lawrynowicz@linux.intel.com commit 02d5b0aacd0590dbaf25f35834631e5bc11002e3 Author: Jacek Lawrynowicz Date: Tue Jan 17 10:27:21 2023 +0100 accel/ivpu: Implement firmware parsing and booting Read, parse and boot VPU firmware image. Co-developed-by: Andrzej Kacprowski Signed-off-by: Andrzej Kacprowski Co-developed-by: Krystian Pradzynski Signed-off-by: Krystian Pradzynski Signed-off-by: Jacek Lawrynowicz Reviewed-by: Oded Gabbay Reviewed-by: Jeffrey Hugo Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20230117092723.60441-6-jacek.lawrynowicz@linux.intel.com commit 5d7422cfb498bf25c4a9ea6b9d82253cb5236364 Author: Jacek Lawrynowicz Date: Tue Jan 17 10:27:20 2023 +0100 accel/ivpu: Add IPC driver and JSM messages The IPC driver is used to send and receive messages to/from firmware running on the VPU. The only supported IPC message format is Job Submission Model (JSM) defined in vpu_jsm_api.h header. Co-developed-by: Andrzej Kacprowski Signed-off-by: Andrzej Kacprowski Co-developed-by: Krystian Pradzynski Signed-off-by: Krystian Pradzynski Signed-off-by: Jacek Lawrynowicz Reviewed-by: Oded Gabbay Reviewed-by: Jeffrey Hugo Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20230117092723.60441-5-jacek.lawrynowicz@linux.intel.com commit 647371a6609ddf8700fe151af72e32daebb9baa7 Author: Jacek Lawrynowicz Date: Tue Jan 17 10:27:19 2023 +0100 accel/ivpu: Add GEM buffer object management Adds four types of GEM-based BOs for the VPU: - shmem - internal - prime All types are implemented as struct ivpu_bo, based on struct drm_gem_object. VPU address is allocated when buffer is created except for imported prime buffers that allocate it in BO_INFO IOCTL due to missing file_priv arg in gem_prime_import callback. Internal buffers are pinned on creation, the rest of buffers types can be pinned on demand (in SUBMIT IOCTL). Buffer VPU address, allocated pages and mappings are released when the buffer is destroyed. Eviction mechanism is planned for future versions. Add two new IOCTLs: BO_CREATE, BO_INFO Signed-off-by: Jacek Lawrynowicz Reviewed-by: Oded Gabbay Reviewed-by: Jeffrey Hugo Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20230117092723.60441-4-jacek.lawrynowicz@linux.intel.com commit 263b2ba5fc93c875129e0d2b4034d7d8a34b3d39 Author: Jacek Lawrynowicz Date: Tue Jan 17 10:27:18 2023 +0100 accel/ivpu: Add Intel VPU MMU support VPU Memory Management Unit is based on ARM MMU-600. It allows the creation of multiple virtual address spaces for the device and map noncontinuous host memory (there is no dedicated memory on the VPU). Address space is implemented as a struct ivpu_mmu_context, it has an ID, drm_mm allocator for VPU addresses and struct ivpu_mmu_pgtable that holds actual 3-level, 4KB page table. Context with ID 0 (global context) is created upon driver initialization and it's mainly used for mapping memory required to execute the firmware. Contexts with non-zero IDs are user contexts allocated each time the devices is open()-ed and they map command buffers and other workload-related memory. Workloads executing in a given contexts have access only to the memory mapped in this context. This patch is has two main files: - ivpu_mmu_context.c handles MMU page tables and memory mapping - ivpu_mmu.c implements a driver that programs the MMU device Co-developed-by: Karol Wachowski Signed-off-by: Karol Wachowski Co-developed-by: Krystian Pradzynski Signed-off-by: Krystian Pradzynski Signed-off-by: Jacek Lawrynowicz Reviewed-by: Oded Gabbay Reviewed-by: Jeffrey Hugo Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20230117092723.60441-3-jacek.lawrynowicz@linux.intel.com commit 35b137630f08d913fc2e33df33ccc2570dff3f7d Author: Jacek Lawrynowicz Date: Tue Jan 17 10:27:17 2023 +0100 accel/ivpu: Introduce a new DRM driver for Intel VPU VPU stands for Versatile Processing Unit and it's a CPU-integrated inference accelerator for Computer Vision and Deep Learning applications. The VPU device consist of following components: - Buttress - provides CPU to VPU integration, interrupt, frequency and power management. - Memory Management Unit (based on ARM MMU-600) - translates VPU to host DMA addresses, isolates user workloads. - RISC based microcontroller - executes firmware that provides job execution API for the kernel-mode driver - Neural Compute Subsystem (NCS) - does the actual work, provides Compute and Copy engines. - Network on Chip (NoC) - network fabric connecting all the components This driver supports VPU IP v2.7 integrated into Intel Meteor Lake client CPUs (14th generation). Module sources are at drivers/accel/ivpu and module name is "intel_vpu.ko". This patch includes only very besic functionality: - module, PCI device and IRQ initialization - register definitions and low level register manipulation functions - SET/GET_PARAM ioctls - power up without firmware Co-developed-by: Krystian Pradzynski Signed-off-by: Krystian Pradzynski Signed-off-by: Jacek Lawrynowicz Reviewed-by: Oded Gabbay Reviewed-by: Jeffrey Hugo Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20230117092723.60441-2-jacek.lawrynowicz@linux.intel.com commit 3f3047493b4dc68165505f22cce1af6cc4d36643 Author: Yicong Yang Date: Thu Jan 12 19:22:01 2023 +0800 MAINTAINERS: Update the entries for HiSilicon PTT device driver Add missing entries for the perf userspace part of this driver. Also add Jonathan as the maintainer for his expertise on this driver and PCIe stuffs. Signed-off-by: Yicong Yang Acked-by: Jonathan Cameron Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230112112201.16283-2-yangyicong@huawei.com commit b8d976c7d41a28c0fccf22c7113be9a29dc07e5c Author: Yicong Yang Date: Thu Jan 12 19:22:00 2023 +0800 hwtracing: hisi_ptt: Only add the supported devices to the filters list The PTT device can only support the devices on the same PCIe core, within BDF range [lower_bdf, upper_bdf]. It's not correct to assume the devices on the root bus are from the same PCIe core, there are cases that root ports from different PCIe core are sharing the same bus. So check when initializing the filters list. Fixes: ff0de066b463 ("hwtracing: hisi_ptt: Add trace function support for HiSilicon PCIe Tune and Trace device") Signed-off-by: Yicong Yang Reviewed-by: Jonathan Cameron Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230112112201.16283-1-yangyicong@huawei.com commit 075c7c04a81a326a5a28cc0ef8411ba1c5c34e90 Author: Yang Yingliang Date: Wed Jan 18 15:49:20 2023 +0800 coresight: ultrasoc-smb: fix return value check in smb_init_data_buffer() platform_get_resource() returns NULL pointer not PTR_ERR(), replace the IS_ERR() check with NULL pointer check. Signed-off-by: Yang Yingliang Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230118074920.1772141-1-yangyingliang@huawei.com commit 0414a100d6ab32721efa70ab55524540fdfe0ede Author: Yang Yingliang Date: Thu Jan 19 11:57:54 2023 +0200 ARM: OMAP1: call platform_device_put() in error case in omap1_dm_timer_init() If platform_device_add() is not called or failed, it should call platform_device_put() in error case. Fixes: 97933d6ced60 ("ARM: OMAP1: dmtimer: conversion to platform devices") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Message-Id: <20220701094602.2365099-1-yangyingliang@huawei.com> Signed-off-by: Tony Lindgren commit 6f84981772535e670e4e2df051a672af229b6694 Merge: cba83c1fc3861 0b45ac1170ea6 Author: Thomas Zimmermann Date: Thu Jan 19 10:56:12 2023 +0100 Merge drm/drm-next into drm-misc-next Backmerging into drm-misc-next to get DRM accelerator infrastructure, which is required by ipuv driver. Signed-off-by: Thomas Zimmermann commit 37b5be82803270626286215b5bc4427ed2a3aecb Author: Cristian Marussi Date: Thu Dec 22 18:50:49 2022 +0000 firmware: arm_scmi: Split bus and driver into distinct modules Make the SCMI bus on its own as a distinct module initialized at subsys_initcall level when builtin. Keep the SCMI driver core stack, together with any configured transport, in a different module initialized as module_init level. SCMI drivers initialization remain unchanged at module_init level. Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20221222185049.737625-10-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit ee5dcedaf72d797ca0cdd472bbf85c8bd5c0d8e6 Author: Cristian Marussi Date: Thu Dec 22 18:50:48 2022 +0000 firmware: arm_scmi: Introduce a new lifecycle for protocol devices Protocol devices are created or destroyed depending on the related device request/unrequest events emitted on the scmi_requested_devices_nh notification chain by the SCMI bus and served in the driver by the scmi_device_request_notifier. Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20221222185049.737625-9-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit d268da063b99cf1c4d8304a33c27bbed0763a474 Author: Jagan Teki Date: Wed Jan 18 13:34:54 2023 +0530 arm64: dts: rockchip: Update eMMC, SD aliases for Radxa SBC boards Radxa SBC boards like ROCK 3A/4 models do support eMMC and SDcard via external connector slots. Mark, the eMMC has mmc0 by considering the Rockchip boot order priority as both MMC devices are connected externally. Reported-by: FUKAUMI Naoki Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20230118080454.11643-2-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit c80992abd2877590059e9cb254213c16824e2106 Author: Jagan Teki Date: Wed Jan 18 13:34:53 2023 +0530 arm64: dts: rockchip: Update eMMC, SD aliases for Radxa SoM boards Radxa has produced Compute Modules like RK3399pro VMARC and CM3i with onboarding eMMC flash, so the eMMC is the primary MMC device. On the other hand, Rockchip boot orders start from eMMC from an MMC device perspective. Mark, the eMMC has mmc0 to satisfy the above two conditions. Reported-by: FUKAUMI Naoki Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20230118080454.11643-1-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit 2c3e674465e73e2f7eb52c39dc5c5e97e78e68ea Author: Cristian Marussi Date: Thu Dec 22 18:50:47 2022 +0000 firmware: arm_scmi: Refactor device create/destroy helpers Refactor SCMI device create/destroy helpers: it is now possible to ask for the creation of all the currently requested devices for a whole protocol, not only for the creation of a single well-defined device. While at that, re-instate uniqueness checks on the creation of SCMI SystemPower devices. Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20221222185049.737625-8-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 971fc0665f1361f23251e4d85fac4aed1b683505 Author: Cristian Marussi Date: Thu Dec 22 18:50:46 2022 +0000 firmware: arm_scmi: Move handle get/set helpers Move handle get/set helpers definitions into driver.c and invoke them through the bus notifier helper. Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20221222185049.737625-7-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit d3cd7c525fd2ecce3a6c963f314969a54783d211 Author: Cristian Marussi Date: Thu Dec 22 18:50:45 2022 +0000 firmware: arm_scmi: Refactor protocol device creation Move protocol device request helpers from driver.c compilation unit to bus.c, so reducing the cross interactions between driver.c and bus.c. Get rid of old protocol device creation process as a whole from driver.c and remove also stale SCMI system power unicity checks. While at that make such helpers call into scmi_requested_devices_nh notification chain. Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20221222185049.737625-6-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 53b8c25df7082edd78a3fc63e359abee0f28fa70 Author: Cristian Marussi Date: Thu Dec 22 18:50:44 2022 +0000 firmware: arm_scmi: Add common notifier helpers Add a pair of notifier chains and generic empty notifier callbacks. Currently they are still unused but they will be used to act properly on device request and creation events. Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20221222185049.737625-5-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 9115c20ac1ee9e92a3e751e352db818b7f95746a Author: Cristian Marussi Date: Thu Dec 22 18:50:43 2022 +0000 firmware: arm_scmi: Move protocol registration helpers Move protocol registration helpers and logic out of bus.c compilation unit into driver.c. No functional change. Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20221222185049.737625-4-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 05a2801d8b90c1b5159618d4bd3a3c65d60f3ff1 Author: Cristian Marussi Date: Thu Dec 22 18:50:42 2022 +0000 firmware: arm_scmi: Use dedicated devices to initialize channels Refactor channels initialization to use dedicated transport devices instead of using devices borrowed from the SCMI drivers. Initialize all channels, as described in the device tree, upfront during SCMI core stack probe phase and free all of them, including the underlying devices, when the SCMI core is removed. Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20221222185049.737625-3-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 7a75b7afd8ff7b891e60b2fc9622148e6d1e010a Author: Cristian Marussi Date: Thu Dec 22 18:50:41 2022 +0000 firmware: arm_scmi: Simplify chan_available transport operation SCMI transport operation .chan_available determines in a transport specific way if an SCMI channel is still available and to be configured. Such information is derived by analyzing bits of device node in a transport specific way, all it needs is a device node to operate up on, not necessarily a full blown device. Simplify the helper to receive in input a reference to a device_node instead of a device carrying a pointer to such device_node. Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20221222185049.737625-2-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit cba83c1fc38612c3d2c7b1bfed9d882e4848fb0d Author: Jani Nikula Date: Wed Jan 4 12:05:25 2023 +0200 drm/edid: add helper for HDMI VSDB audio latency field length Add a helper for skipping the HDMI VSDB audio latency fields. There's a functional change for HDMI VSDB blocks that do not respect the spec: "I_Latency_Fields_Present shall be zero if Latency_Fields_Present is zero". We assume this to hold when skipping the latency fields, and ignore non-zero I_Latency_Fields_Present if Latency_Fields_Present is zero. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/da4293203ef2ddeb0bf66a2bfdbc129ab609c543.1672826282.git.jani.nikula@intel.com commit 1ee3e217f98e4a14a792ed2d7b42417ad1194922 Author: Jani Nikula Date: Wed Jan 4 12:05:24 2023 +0200 drm/edid: fix and clarify HDMI VSDB audio latency parsing Add helpers for Latency_Fields_Present and I_Latency_Fields_Present bits, and fix the parsing: - Respect specification regarding "I_Latency_Fields_Present shall be zero if Latency_Fields_Present is zero". - Don't claim latency fields are present if the data block isn't big enough to hold them. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/80426772a2d2e17bebf6f58d99b7d0cf6260c2d6.1672826282.git.jani.nikula@intel.com commit c54e2e23c3fc3112c821b490e78ea22a7ecea288 Author: Jani Nikula Date: Wed Jan 4 12:05:23 2023 +0200 drm/edid: split CTA Y420VDB info and mode parsing Separate the parsing of display info and modes from the CTA Y420VDB. This is prerequisite work for overall better separation of the two parsing steps. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/3bc5fe6650a6ce4249803f7192096764ea724e05.1672826282.git.jani.nikula@intel.com commit 61e05fdc096bc27b32a93fa85f31ccf535d6a5a9 Author: Jani Nikula Date: Wed Jan 4 12:05:22 2023 +0200 drm/edid: refactor CTA Y420CMDB parsing Now that we have pre-parsed CTA VDB VICs stored in info->vics, leverage that to simplify CTA Y420CMDB parsing. Move updating the y420_cmdb_modes bitmap to the display info parsing stage, instead of updating it during add modes. This allows us to drop the intermediate y420_cmdb_map from display info, and replace it with a local variable. This is prerequisite work for overall better separation of the two parsing steps (updating display info and adding modes). Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/7a0e5e99a83f203b6a8981d263b89b2bb7d2fe15.1672826282.git.jani.nikula@intel.com commit 26c2ff77349927d6544db107f65757f447574dae Author: Jani Nikula Date: Wed Jan 4 12:05:21 2023 +0200 drm/edid: rename struct drm_display_info *display to *info Rename the local variable to info for consistency. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/d35a50c714e21869afcabfafd5c5e590936b791a.1672826282.git.jani.nikula@intel.com commit 4ed29f398b5aa55f12e8f8da7cdf7c22d82018b7 Author: Jani Nikula Date: Wed Jan 4 12:05:20 2023 +0200 drm/edid: use VIC in AVI infoframe if sink lists it in CTA VDB Apparently there are HDMI 1.4 compatible displays out there that support VICs from specs later than CTA-861-D, i.e. VIC > 64, although HDMI 1.4 references CTA-861-D only. We try to avoid using VICs from the later specs in the AVI infoframes to avoid upsetting sinks that conform to earlier specs. However, it seems reasonable to do this when the sink claims it supports the VIC. With the pre-parsed list of VICs handy, this is now trivial. References: https://gitlab.freedesktop.org/drm/intel/-/issues/6153 Cc: Ville Syrjälä Cc: William Tseng Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/775124fd07a5b7892e869becc3dd8dadb328ae5f.1672826282.git.jani.nikula@intel.com commit 6a40a75f71b997f2248664021f28af0dc7796d18 Author: Jani Nikula Date: Wed Jan 4 12:05:19 2023 +0200 drm/edid: Use the pre-parsed VICs Now that we have all the VICs in info->vics, use them to simplify access based on VIC index, i.e. on the order of VICs in the EDID, and avoid passing CTA VDB pointers around. This also fixes the highly unlikely scenarios of a) multiple HDMI VSDBs, and b) HDMI VSDB 3D modes using VIC indexes that span across multiple CTA VDBs, and the combination of the two. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/30f1a97193171e70ec1c26c4b685d8930799b9a6.1672826282.git.jani.nikula@intel.com commit c3292ab5fbd7045f019418b2ce1977891419ad28 Author: Jani Nikula Date: Wed Jan 4 12:05:18 2023 +0200 drm/edid: parse VICs from CTA VDB early A number of places need access to the VICs. Just parse them early for easy access. Gracefully handle multiple CTA VDBs. It's unlikely to have more than one, but the CTA-861 references "Video Data Block(s)", so err on the safe side. Start parsing them now, convert users in follow-up to have fewer moving parts in one go. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/7989b2b37837be68953c5d20afd3e93762bfd626.1672826282.git.jani.nikula@intel.com commit 72794d16bd535a984e6653a18f5862405b49b5f9 Author: Jani Nikula Date: Wed Jan 4 12:05:17 2023 +0200 drm/edid: fix parsing of 3D modes from HDMI VSDB Commit 537d9ed2f6c1 ("drm/edid: convert add_cea_modes() to use cea db iter") inadvertently moved the do_hdmi_vsdb_modes() call within the db iteration loop, always passing NULL as the CTA VDB to do_hdmi_vsdb_modes(), skipping a lot of stereo modes. Move the call back outside of the loop. This does mean only one CTA VDB and HDMI VSDB combination will be handled, but it's an unlikely scenario to have more than one of either block, and it was not accounted for before the regression either. Fixes: 537d9ed2f6c1 ("drm/edid: convert add_cea_modes() to use cea db iter") Cc: # v6.0+ Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/cf159b8816191ed595a3cb954acaf189c4528cc7.1672826282.git.jani.nikula@intel.com commit 1cbc1f0d324ba6c4d1b10ac6362b5e0b029f63d5 Author: Jani Nikula Date: Wed Jan 4 12:05:16 2023 +0200 drm/edid: fix AVI infoframe aspect ratio handling We try to avoid sending VICs defined in the later specs in AVI infoframes to sinks that conform to the earlier specs, to not upset them, and use 0 for the VIC instead. However, we do this detection and conversion to 0 too early, as we'll need the actual VIC to figure out the aspect ratio. In particular, for a mode with 64:27 aspect ratio, 0 for VIC fails the AVI infoframe generation altogether with -EINVAL. Separate the VIC lookup from the "filtering", and postpone the filtering, to use the proper VIC for aspect ratio handling, and the 0 VIC for the infoframe video code as needed. Reported-by: William Tseng Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6153 References: https://lore.kernel.org/r/20220920062316.43162-1-william.tseng@intel.com Cc: Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/c3e78cc6d01ed237f71ad0038826b08d83d75eef.1672826282.git.jani.nikula@intel.com commit 9dd320f0075fc765c6f35eb52f2a0cc73bf38a3f Author: Andreas Kemnade Date: Tue Jan 17 23:30:59 2023 +0100 ARM: dts: omap: gta04a5: cleanup i2c node names Use generic node names. Signed-off-by: Andreas Kemnade Message-Id: <20230117223059.2609390-1-andreas@kemnade.info> Signed-off-by: Tony Lindgren commit 9151b7670d1ad990d644832a092658016a0ef338 Author: Andreas Kemnade Date: Tue Jan 17 23:30:02 2023 +0100 ARM: dts: omap: gta04: add BNO055 IMU chip There is finally a driver upstreamed, so add the device. Signed-off-by: Andreas Kemnade Message-Id: <20230117223002.2609301-1-andreas@kemnade.info> Signed-off-by: Tony Lindgren commit 14a213dcb004fe28befcf36bb02e52a89242a821 Author: Sicelo A. Mhlongo Date: Thu Dec 29 19:13:48 2022 +0200 ARM: dts: n900: use iio driver for accelerometer The accelerometer in the N900 is supported by the iio-framework since commit 8a7449d68670a8f9 ("iio: accel: add support for LIS302DL variant). This commit switches to it and updates node properties to match the bindings of the new compatible. Acked-by: Krzysztof Kozlowski Signed-off-by: Sicelo A. Mhlongo Message-Id: <20221229171348.3543327-3-absicsz@gmail.com> Signed-off-by: Tony Lindgren commit ecbeccdc61700f9da38e25c6ed49212dfb529b05 Author: Sicelo A. Mhlongo Date: Thu Dec 29 19:13:47 2022 +0200 ARM: dts: n900: rename accelerometer node Use generic node naming for lis302dl accelerometer, and drop its label that is not used anywhere else. Acked-by: Krzysztof Kozlowski Signed-off-by: Sicelo A. Mhlongo Message-Id: <20221229171348.3543327-2-absicsz@gmail.com> Signed-off-by: Tony Lindgren commit 7c70306b7dbbee7009aa5cd2749e6fe9dd84781b Author: Mark Jackson Date: Wed Nov 30 14:05:47 2022 +0000 ARM: dts: am335x-nano: Enable USB host Add missing entry to enable the USB host. Signed-off-by: Mark Jackson Message-Id: <20221130140547.295859-6-mpfj@newflow.co.uk> Signed-off-by: Tony Lindgren commit d7a6aebb233794432ebfc46fc75222868f6d49b7 Author: Mark Jackson Date: Wed Nov 30 14:05:46 2022 +0000 ARM: dts: am335x-nano: Fix GPIO settings for MMC pins The MMC slot uses GPIO pins for Write Protext and Card Detect. Define these so everything works correctly. Signed-off-by: Mark Jackson Message-Id: <20221130140547.295859-5-mpfj@newflow.co.uk> Signed-off-by: Tony Lindgren commit 7094c9d8aa5d084754078de698832b4d20a91dc3 Author: Mark Jackson Date: Wed Nov 30 14:05:45 2022 +0000 ARM: dts: am335x-nano: Enable I2C temperature sensor The NanoBone platform supports a temperature sensor on the I2C bus. Signed-off-by: Mark Jackson Message-Id: <20221130140547.295859-4-mpfj@newflow.co.uk> Signed-off-by: Tony Lindgren commit af5ec6ab2e6c920a568ba09f961c3d429741c5c9 Author: Mark Jackson Date: Wed Nov 30 14:05:44 2022 +0000 ARM: dts: am335x-nano: Enable RS485 mode for UART3 & 4 UART3 & 4 are both RS485 ports. So we need to configure and enable this by default. Signed-off-by: Mark Jackson Message-Id: <20221130140547.295859-3-mpfj@newflow.co.uk> Signed-off-by: Tony Lindgren commit bd08103e93a441f6a0ae6149efe9099bba5beb56 Author: Mark Jackson Date: Wed Nov 30 14:05:43 2022 +0000 ARM: dts: am335x-nano: Fix GPIO settings for RTS/CTS pins on UART3 & 4 The NanoBone platform uses GPIO pins for RTS/CTS control. The DTS still uses the hardware RTS/CTS pins so this needs fixing. Signed-off-by: Mark Jackson Message-Id: <20221130140547.295859-2-mpfj@newflow.co.uk> Signed-off-by: Tony Lindgren commit 3707d84c13670bf09b4a9a4dc6733326d8344b31 Author: Christian Brauner Date: Fri Jan 13 12:49:33 2023 +0100 fs: move mnt_idmap Now that we converted everything to just rely on struct mnt_idmap move it all into a separate file. This ensure that no code can poke around in struct mnt_idmap without any dedicated helpers and makes it easier to extend it in the future. Filesystems will now not be able to conflate mount and filesystem idmappings as they are two distinct types and require distinct helpers that cannot be used interchangeably. We are now also able to extend struct mnt_idmap as we see fit. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit 4d7ca4090184c153f8ccb1a68ca5cf136dac108b Author: Christian Brauner Date: Fri Jan 13 12:49:32 2023 +0100 fs: port vfs{g,u}id helpers to mnt_idmap Convert to struct mnt_idmap. Last cycle we merged the necessary infrastructure in 256c8aed2b42 ("fs: introduce dedicated idmap type for mounts"). This is just the conversion to struct mnt_idmap. Currently we still pass around the plain namespace that was attached to a mount. This is in general pretty convenient but it makes it easy to conflate namespaces that are relevant on the filesystem with namespaces that are relevent on the mount level. Especially for non-vfs developers without detailed knowledge in this area this can be a potential source for bugs. Once the conversion to struct mnt_idmap is done all helpers down to the really low-level helpers will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two eliminating the possibility of any bugs. All of the vfs and all filesystems only operate on struct mnt_idmap. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit c14329d39f2daa8132e1bbe5cc531da387bcf44a Author: Christian Brauner Date: Fri Jan 13 12:49:31 2023 +0100 fs: port fs{g,u}id helpers to mnt_idmap Convert to struct mnt_idmap. Last cycle we merged the necessary infrastructure in 256c8aed2b42 ("fs: introduce dedicated idmap type for mounts"). This is just the conversion to struct mnt_idmap. Currently we still pass around the plain namespace that was attached to a mount. This is in general pretty convenient but it makes it easy to conflate namespaces that are relevant on the filesystem with namespaces that are relevent on the mount level. Especially for non-vfs developers without detailed knowledge in this area this can be a potential source for bugs. Once the conversion to struct mnt_idmap is done all helpers down to the really low-level helpers will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two eliminating the possibility of any bugs. All of the vfs and all filesystems only operate on struct mnt_idmap. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit e67fe63341b8117d7e0d9acf0f1222d5138b9266 Author: Christian Brauner Date: Fri Jan 13 12:49:30 2023 +0100 fs: port i_{g,u}id_into_vfs{g,u}id() to mnt_idmap Convert to struct mnt_idmap. Remove legacy file_mnt_user_ns() and mnt_user_ns(). Last cycle we merged the necessary infrastructure in 256c8aed2b42 ("fs: introduce dedicated idmap type for mounts"). This is just the conversion to struct mnt_idmap. Currently we still pass around the plain namespace that was attached to a mount. This is in general pretty convenient but it makes it easy to conflate namespaces that are relevant on the filesystem with namespaces that are relevent on the mount level. Especially for non-vfs developers without detailed knowledge in this area this can be a potential source for bugs. Once the conversion to struct mnt_idmap is done all helpers down to the really low-level helpers will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two eliminating the possibility of any bugs. All of the vfs and all filesystems only operate on struct mnt_idmap. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit 0dbe12f2e49c046444461b5f4be49df2cafb3a40 Author: Christian Brauner Date: Fri Jan 13 12:49:29 2023 +0100 fs: port i_{g,u}id_{needs_}update() to mnt_idmap Convert to struct mnt_idmap. Last cycle we merged the necessary infrastructure in 256c8aed2b42 ("fs: introduce dedicated idmap type for mounts"). This is just the conversion to struct mnt_idmap. Currently we still pass around the plain namespace that was attached to a mount. This is in general pretty convenient but it makes it easy to conflate namespaces that are relevant on the filesystem with namespaces that are relevent on the mount level. Especially for non-vfs developers without detailed knowledge in this area this can be a potential source for bugs. Once the conversion to struct mnt_idmap is done all helpers down to the really low-level helpers will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two eliminating the possibility of any bugs. All of the vfs and all filesystems only operate on struct mnt_idmap. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit f861646a65623bcff91d544acbc4413d62d97b79 Author: Christian Brauner Date: Fri Jan 13 12:49:28 2023 +0100 quota: port to mnt_idmap Convert to struct mnt_idmap. Last cycle we merged the necessary infrastructure in 256c8aed2b42 ("fs: introduce dedicated idmap type for mounts"). This is just the conversion to struct mnt_idmap. Currently we still pass around the plain namespace that was attached to a mount. This is in general pretty convenient but it makes it easy to conflate namespaces that are relevant on the filesystem with namespaces that are relevent on the mount level. Especially for non-vfs developers without detailed knowledge in this area this can be a potential source for bugs. Once the conversion to struct mnt_idmap is done all helpers down to the really low-level helpers will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two eliminating the possibility of any bugs. All of the vfs and all filesystems only operate on struct mnt_idmap. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit 9452e93e6dae862d7aeff2b11236d79bde6f9b66 Author: Christian Brauner Date: Fri Jan 13 12:49:27 2023 +0100 fs: port privilege checking helpers to mnt_idmap Convert to struct mnt_idmap. Last cycle we merged the necessary infrastructure in 256c8aed2b42 ("fs: introduce dedicated idmap type for mounts"). This is just the conversion to struct mnt_idmap. Currently we still pass around the plain namespace that was attached to a mount. This is in general pretty convenient but it makes it easy to conflate namespaces that are relevant on the filesystem with namespaces that are relevent on the mount level. Especially for non-vfs developers without detailed knowledge in this area this can be a potential source for bugs. Once the conversion to struct mnt_idmap is done all helpers down to the really low-level helpers will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two eliminating the possibility of any bugs. All of the vfs and all filesystems only operate on struct mnt_idmap. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit 01beba7957a26f9b7179127e8ad56bb5a0f56138 Author: Christian Brauner Date: Fri Jan 13 12:49:26 2023 +0100 fs: port inode_owner_or_capable() to mnt_idmap Convert to struct mnt_idmap. Last cycle we merged the necessary infrastructure in 256c8aed2b42 ("fs: introduce dedicated idmap type for mounts"). This is just the conversion to struct mnt_idmap. Currently we still pass around the plain namespace that was attached to a mount. This is in general pretty convenient but it makes it easy to conflate namespaces that are relevant on the filesystem with namespaces that are relevent on the mount level. Especially for non-vfs developers without detailed knowledge in this area this can be a potential source for bugs. Once the conversion to struct mnt_idmap is done all helpers down to the really low-level helpers will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two eliminating the possibility of any bugs. All of the vfs and all filesystems only operate on struct mnt_idmap. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit f2d40141d5d90b882e2c35b226f9244a63b82b6e Author: Christian Brauner Date: Fri Jan 13 12:49:25 2023 +0100 fs: port inode_init_owner() to mnt_idmap Convert to struct mnt_idmap. Last cycle we merged the necessary infrastructure in 256c8aed2b42 ("fs: introduce dedicated idmap type for mounts"). This is just the conversion to struct mnt_idmap. Currently we still pass around the plain namespace that was attached to a mount. This is in general pretty convenient but it makes it easy to conflate namespaces that are relevant on the filesystem with namespaces that are relevent on the mount level. Especially for non-vfs developers without detailed knowledge in this area this can be a potential source for bugs. Once the conversion to struct mnt_idmap is done all helpers down to the really low-level helpers will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two eliminating the possibility of any bugs. All of the vfs and all filesystems only operate on struct mnt_idmap. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit 700b7940526d31117fd20b7ed31156df134fbe7f Author: Christian Brauner Date: Fri Jan 13 12:49:24 2023 +0100 fs: port acl to mnt_idmap Convert to struct mnt_idmap. Last cycle we merged the necessary infrastructure in 256c8aed2b42 ("fs: introduce dedicated idmap type for mounts"). This is just the conversion to struct mnt_idmap. Currently we still pass around the plain namespace that was attached to a mount. This is in general pretty convenient but it makes it easy to conflate namespaces that are relevant on the filesystem with namespaces that are relevent on the mount level. Especially for non-vfs developers without detailed knowledge in this area this can be a potential source for bugs. Once the conversion to struct mnt_idmap is done all helpers down to the really low-level helpers will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two eliminating the possibility of any bugs. All of the vfs and all filesystems only operate on struct mnt_idmap. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit 39f60c1ccee72caa0104145b5dbf5d37cce1ea39 Author: Christian Brauner Date: Fri Jan 13 12:49:23 2023 +0100 fs: port xattr to mnt_idmap Convert to struct mnt_idmap. Last cycle we merged the necessary infrastructure in 256c8aed2b42 ("fs: introduce dedicated idmap type for mounts"). This is just the conversion to struct mnt_idmap. Currently we still pass around the plain namespace that was attached to a mount. This is in general pretty convenient but it makes it easy to conflate namespaces that are relevant on the filesystem with namespaces that are relevent on the mount level. Especially for non-vfs developers without detailed knowledge in this area this can be a potential source for bugs. Once the conversion to struct mnt_idmap is done all helpers down to the really low-level helpers will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two eliminating the possibility of any bugs. All of the vfs and all filesystems only operate on struct mnt_idmap. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit 4609e1f18e19c3b302e1eb4858334bca1532f780 Author: Christian Brauner Date: Fri Jan 13 12:49:22 2023 +0100 fs: port ->permission() to pass mnt_idmap Convert to struct mnt_idmap. Last cycle we merged the necessary infrastructure in 256c8aed2b42 ("fs: introduce dedicated idmap type for mounts"). This is just the conversion to struct mnt_idmap. Currently we still pass around the plain namespace that was attached to a mount. This is in general pretty convenient but it makes it easy to conflate namespaces that are relevant on the filesystem with namespaces that are relevent on the mount level. Especially for non-vfs developers without detailed knowledge in this area this can be a potential source for bugs. Once the conversion to struct mnt_idmap is done all helpers down to the really low-level helpers will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two eliminating the possibility of any bugs. All of the vfs and all filesystems only operate on struct mnt_idmap. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit 8782a9aea3ab4d697ad67d1f8ebca38a4e1c24ab Author: Christian Brauner Date: Fri Jan 13 12:49:21 2023 +0100 fs: port ->fileattr_set() to pass mnt_idmap Convert to struct mnt_idmap. Last cycle we merged the necessary infrastructure in 256c8aed2b42 ("fs: introduce dedicated idmap type for mounts"). This is just the conversion to struct mnt_idmap. Currently we still pass around the plain namespace that was attached to a mount. This is in general pretty convenient but it makes it easy to conflate namespaces that are relevant on the filesystem with namespaces that are relevent on the mount level. Especially for non-vfs developers without detailed knowledge in this area this can be a potential source for bugs. Once the conversion to struct mnt_idmap is done all helpers down to the really low-level helpers will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two eliminating the possibility of any bugs. All of the vfs and all filesystems only operate on struct mnt_idmap. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit 13e83a4923bea7c4f2f6714030cb7e56d20ef7e5 Author: Christian Brauner Date: Fri Jan 13 12:49:20 2023 +0100 fs: port ->set_acl() to pass mnt_idmap Convert to struct mnt_idmap. Last cycle we merged the necessary infrastructure in 256c8aed2b42 ("fs: introduce dedicated idmap type for mounts"). This is just the conversion to struct mnt_idmap. Currently we still pass around the plain namespace that was attached to a mount. This is in general pretty convenient but it makes it easy to conflate namespaces that are relevant on the filesystem with namespaces that are relevent on the mount level. Especially for non-vfs developers without detailed knowledge in this area this can be a potential source for bugs. Once the conversion to struct mnt_idmap is done all helpers down to the really low-level helpers will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two eliminating the possibility of any bugs. All of the vfs and all filesystems only operate on struct mnt_idmap. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit 77435322777d8a8a08264a39111bef94e32b871b Author: Christian Brauner Date: Fri Jan 13 12:49:19 2023 +0100 fs: port ->get_acl() to pass mnt_idmap Convert to struct mnt_idmap. Last cycle we merged the necessary infrastructure in 256c8aed2b42 ("fs: introduce dedicated idmap type for mounts"). This is just the conversion to struct mnt_idmap. Currently we still pass around the plain namespace that was attached to a mount. This is in general pretty convenient but it makes it easy to conflate namespaces that are relevant on the filesystem with namespaces that are relevent on the mount level. Especially for non-vfs developers without detailed knowledge in this area this can be a potential source for bugs. Once the conversion to struct mnt_idmap is done all helpers down to the really low-level helpers will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two eliminating the possibility of any bugs. All of the vfs and all filesystems only operate on struct mnt_idmap. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit 011e2b717b1b921d3706a9d48ff83a025563e826 Author: Christian Brauner Date: Fri Jan 13 12:49:18 2023 +0100 fs: port ->tmpfile() to pass mnt_idmap Convert to struct mnt_idmap. Last cycle we merged the necessary infrastructure in 256c8aed2b42 ("fs: introduce dedicated idmap type for mounts"). This is just the conversion to struct mnt_idmap. Currently we still pass around the plain namespace that was attached to a mount. This is in general pretty convenient but it makes it easy to conflate namespaces that are relevant on the filesystem with namespaces that are relevent on the mount level. Especially for non-vfs developers without detailed knowledge in this area this can be a potential source for bugs. Once the conversion to struct mnt_idmap is done all helpers down to the really low-level helpers will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two eliminating the possibility of any bugs. All of the vfs and all filesystems only operate on struct mnt_idmap. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit e18275ae55e07a2937e48134589c2f4c1d99a369 Author: Christian Brauner Date: Fri Jan 13 12:49:17 2023 +0100 fs: port ->rename() to pass mnt_idmap Convert to struct mnt_idmap. Last cycle we merged the necessary infrastructure in 256c8aed2b42 ("fs: introduce dedicated idmap type for mounts"). This is just the conversion to struct mnt_idmap. Currently we still pass around the plain namespace that was attached to a mount. This is in general pretty convenient but it makes it easy to conflate namespaces that are relevant on the filesystem with namespaces that are relevent on the mount level. Especially for non-vfs developers without detailed knowledge in this area this can be a potential source for bugs. Once the conversion to struct mnt_idmap is done all helpers down to the really low-level helpers will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two eliminating the possibility of any bugs. All of the vfs and all filesystems only operate on struct mnt_idmap. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit 5ebb29bee8d5fc173b774e0755be8cb335503ee3 Author: Christian Brauner Date: Fri Jan 13 12:49:16 2023 +0100 fs: port ->mknod() to pass mnt_idmap Convert to struct mnt_idmap. Last cycle we merged the necessary infrastructure in 256c8aed2b42 ("fs: introduce dedicated idmap type for mounts"). This is just the conversion to struct mnt_idmap. Currently we still pass around the plain namespace that was attached to a mount. This is in general pretty convenient but it makes it easy to conflate namespaces that are relevant on the filesystem with namespaces that are relevent on the mount level. Especially for non-vfs developers without detailed knowledge in this area this can be a potential source for bugs. Once the conversion to struct mnt_idmap is done all helpers down to the really low-level helpers will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two eliminating the possibility of any bugs. All of the vfs and all filesystems only operate on struct mnt_idmap. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit c54bd91e9eaba43f09aadc25b52ea869ff3b5587 Author: Christian Brauner Date: Fri Jan 13 12:49:15 2023 +0100 fs: port ->mkdir() to pass mnt_idmap Convert to struct mnt_idmap. Last cycle we merged the necessary infrastructure in 256c8aed2b42 ("fs: introduce dedicated idmap type for mounts"). This is just the conversion to struct mnt_idmap. Currently we still pass around the plain namespace that was attached to a mount. This is in general pretty convenient but it makes it easy to conflate namespaces that are relevant on the filesystem with namespaces that are relevent on the mount level. Especially for non-vfs developers without detailed knowledge in this area this can be a potential source for bugs. Once the conversion to struct mnt_idmap is done all helpers down to the really low-level helpers will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two eliminating the possibility of any bugs. All of the vfs and all filesystems only operate on struct mnt_idmap. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit 7a77db95511c39be4b2db2ceca152ef589adc2dc Author: Christian Brauner Date: Fri Jan 13 12:49:14 2023 +0100 fs: port ->symlink() to pass mnt_idmap Convert to struct mnt_idmap. Last cycle we merged the necessary infrastructure in 256c8aed2b42 ("fs: introduce dedicated idmap type for mounts"). This is just the conversion to struct mnt_idmap. Currently we still pass around the plain namespace that was attached to a mount. This is in general pretty convenient but it makes it easy to conflate namespaces that are relevant on the filesystem with namespaces that are relevent on the mount level. Especially for non-vfs developers without detailed knowledge in this area this can be a potential source for bugs. Once the conversion to struct mnt_idmap is done all helpers down to the really low-level helpers will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two eliminating the possibility of any bugs. All of the vfs and all filesystems only operate on struct mnt_idmap. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit 6c960e68aaed335a0040f16654f3c5e5bfcf9249 Author: Christian Brauner Date: Fri Jan 13 12:49:13 2023 +0100 fs: port ->create() to pass mnt_idmap Convert to struct mnt_idmap. Last cycle we merged the necessary infrastructure in 256c8aed2b42 ("fs: introduce dedicated idmap type for mounts"). This is just the conversion to struct mnt_idmap. Currently we still pass around the plain namespace that was attached to a mount. This is in general pretty convenient but it makes it easy to conflate namespaces that are relevant on the filesystem with namespaces that are relevent on the mount level. Especially for non-vfs developers without detailed knowledge in this area this can be a potential source for bugs. Once the conversion to struct mnt_idmap is done all helpers down to the really low-level helpers will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two eliminating the possibility of any bugs. All of the vfs and all filesystems only operate on struct mnt_idmap. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit b74d24f7a74ffd2d42ca883d84b7422b8d545901 Author: Christian Brauner Date: Fri Jan 13 12:49:12 2023 +0100 fs: port ->getattr() to pass mnt_idmap Convert to struct mnt_idmap. Last cycle we merged the necessary infrastructure in 256c8aed2b42 ("fs: introduce dedicated idmap type for mounts"). This is just the conversion to struct mnt_idmap. Currently we still pass around the plain namespace that was attached to a mount. This is in general pretty convenient but it makes it easy to conflate namespaces that are relevant on the filesystem with namespaces that are relevent on the mount level. Especially for non-vfs developers without detailed knowledge in this area this can be a potential source for bugs. Once the conversion to struct mnt_idmap is done all helpers down to the really low-level helpers will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two eliminating the possibility of any bugs. All of the vfs and all filesystems only operate on struct mnt_idmap. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit c1632a0f11209338fc300c66252bcc4686e609e8 Author: Christian Brauner Date: Fri Jan 13 12:49:11 2023 +0100 fs: port ->setattr() to pass mnt_idmap Convert to struct mnt_idmap. Last cycle we merged the necessary infrastructure in 256c8aed2b42 ("fs: introduce dedicated idmap type for mounts"). This is just the conversion to struct mnt_idmap. Currently we still pass around the plain namespace that was attached to a mount. This is in general pretty convenient but it makes it easy to conflate namespaces that are relevant on the filesystem with namespaces that are relevent on the mount level. Especially for non-vfs developers without detailed knowledge in this area this can be a potential source for bugs. Once the conversion to struct mnt_idmap is done all helpers down to the really low-level helpers will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two eliminating the possibility of any bugs. All of the vfs and all filesystems only operate on struct mnt_idmap. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit 0973bdfce750e63e9ae18f4897cfecf418718ddf Author: Geert Uytterhoeven Date: Fri Dec 2 17:49:16 2022 +0100 ARM: dts: ti: Fix pca954x i2c-mux node names "make dtbs_check": arch/arm/boot/dts/am3874-iceboard.dtb: pca9548@70: $nodename:0: 'pca9548@70' does not match '^(i2c-?)?mux' From schema: Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml arch/arm/boot/dts/am3874-iceboard.dtb: pca9548@70: Unevaluated properties are not allowed ('#address-cells', '#size-cells', 'i2c@0', 'i2c@1', 'i2c@2', 'i2c@3', 'i2c@4', 'i2c@5', 'i2c@6', 'i2c@7' were unexpected) From schema: Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml ... Fix this by renaming PCA954x nodes to "i2c-mux", to match the I2C bus multiplexer/switch DT bindings and the Generic Names Recommendation in the Devicetree Specification. Signed-off-by: Geert Uytterhoeven Message-Id: Signed-off-by: Tony Lindgren commit 065ff1dc8764dd6394bb6f6c42e6b1e4fac74911 Author: Arnd Bergmann Date: Tue Jan 17 17:52:51 2023 +0100 vc4: fix build failure in vc4_dsi_dev_probe() The bridge->of_node field is defined inside of an #ifdef, which results in a build failure when compile-testing the vc4_dsi driver without CONFIG_OF: drivers/gpu/drm/vc4/vc4_dsi.c: In function 'vc4_dsi_dev_probe': drivers/gpu/drm/vc4/vc4_dsi.c:1822:20: error: 'struct drm_bridge' has no member named 'of_node' 1822 | dsi->bridge.of_node = dev->of_node; Add another #ifdef in the place it is used in. Alternatively we could consider dropping the #ifdef in the struct definition and all other users. Fixes: 78df640394cd ("drm/vc4: dsi: Convert to using a bridge instead of encoder") Signed-off-by: Arnd Bergmann Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230117165258.1979922-1-arnd@kernel.org commit 04ee27671a6a699a8429adc7be9fa93ff228031e Author: Randy Dunlap Date: Mon Jan 16 23:02:24 2023 -0800 drm/connector: fix a kernel-doc bad line warning Building the kernel documentation causes this warning 7 times. Fix it by adding a " *" line instead of a blank line. drivers/gpu/drm/drm_connector.c:1849: warning: bad line: Fixes: 7d63cd8526f1 ("drm/connector: Add TV standard property") Signed-off-by: Randy Dunlap Cc: Maxime Ripard Cc: Maarten Lankhorst CC: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Reviewed-by: Simon Ser Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230117070224.30751-1-rdunlap@infradead.org commit c25feb24e40c13daa13c5d87a0feccfc842a3d15 Author: Randy Dunlap Date: Mon Jan 16 23:02:16 2023 -0800 drm/atomic-helper: fix kernel-doc problems Fix a kernel-doc warning and other kernel-doc formatting for drm_atomic_helper_connect_tv_check(). drivers/gpu/drm/drm_atomic_state_helper.c:560: warning: Cannot understand * @drm_atomic_helper_connector_tv_check: Validate an analog TV connector state on line 560 - I thought it was a doc line Fixes: 5a28cefda3a9 ("drm/atomic-helper: Add an analog TV atomic_check implementation") Signed-off-by: Randy Dunlap Cc: Maxime Ripard Cc: Maarten Lankhorst CC: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230117070216.30318-1-rdunlap@infradead.org commit 3cbd431c2b34d84605d358c8c57654193fd661fb Author: Christian Hewitt Date: Thu Jan 19 05:30:31 2023 +0000 arm64: dts: meson: remove CPU opps below 1GHz for G12A boards Amlogic G12A devices experience CPU stalls and random board wedges when the system idles and CPU cores clock down to lower opp points. Recent vendor kernels include a change to remove 100-250MHz and other distro sources also remove the 500/667MHz points. Unless all 100-667Mhz opps are removed or the CPU governor forced to performance stalls are still observed, so let's remove them to improve stability and uptime. Fixes: b190056fa9ee ("arm64: dts: meson-g12a: add cpus OPP table") Signed-off-by: Christian Hewitt Link: https://lore.kernel.org/r/20230119053031.21400-1-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit ffecc4feba12caeab86b58b2f470d10405de02d5 Author: Laurent Pinchart Date: Thu Jun 16 01:14:08 2022 +0300 ARM: dts: omap: Use new media bus type macros Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT sources. Signed-off-by: Laurent Pinchart Message-Id: <20220615221410.27459-5-laurent.pinchart@ideasonboard.com> Signed-off-by: Tony Lindgren commit 46f73c1c037eed8e5fd61cc39c77b0988148b50b Author: Martin Blumenstingl Date: Sun Jan 15 00:34:55 2023 +0100 ARM: dts: meson8b: Add more L2 (PL310) cache properties Add more L2 cache properties which are used by the 3.10 vendor kernel but have not made it upstream yet. Signed-off-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20230114233455.2005047-3-martin.blumenstingl@googlemail.com Signed-off-by: Neil Armstrong commit 12cdc236cf83eb55560f52dd378f05d5798452ba Author: Martin Blumenstingl Date: Sun Jan 15 00:34:54 2023 +0100 ARM: dts: meson8: Add more L2 (PL310) cache properties Add more L2 cache properties which are used by the 3.10 vendor kernel but have not made it upstream yet. Signed-off-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20230114233455.2005047-2-martin.blumenstingl@googlemail.com Signed-off-by: Neil Armstrong commit 41ade47c1273ca0e61c36f2cccad37473f0b2422 Author: Johannes Berg Date: Thu Jan 19 08:52:01 2023 +0100 wifi: mac80211: add kernel-doc for EHT structure Looks like this is required, even if all of the members are separately described. Add a line to avoid the warning. Fixes: f66c48af7a11 ("mac80211: support minimal EHT rate reporting on RX") Reported-by: Stephen Rothwell Signed-off-by: Johannes Berg commit bd43a9844bc6f78e00fdc91db47f6969d10c5ac5 Author: Alexander Stein Date: Thu Dec 8 07:55:38 2022 +0100 drm: bridge: ldb: Warn if LDB clock does not match requested link frequency The LDB clock needs to be exactly 7-times the pixel clock used by the display. Signed-off-by: Alexander Stein Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20221208065538.1753666-1-alexander.stein@ew.tq-group.com commit ae5a8dce3c86c1ea8e17910c3836b92a406f9ad8 Author: Biju Das Date: Tue Nov 22 19:54:13 2022 +0000 dt-bindings: display: bridge: renesas,rzg2l-mipi-dsi: Document RZ/V2L support Document RZ/V2L DSI bindings. RZ/V2L MIPI DSI is identical to one found on the RZ/G2L SoC. No driver changes are required as generic compatible string "renesas,rzg2l-mipi-dsi" will be used as a fallback. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Acked-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20221122195413.1882486-1-biju.das.jz@bp.renesas.com commit f8593120e321f8b21766db13c7333e9ae0740b65 Author: Alexander Stein Date: Tue Jan 17 11:59:03 2023 +0100 drm/bridge: sii902x: Use dev_err_probe This helps figuring out why the device probe is deferred. Signed-off-by: Alexander Stein Reviewed-by: Andrzej Hajda Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230117105903.2068235-1-alexander.stein@ew.tq-group.com commit 5688ca34698c734d5591add39e72380123132656 Author: Wadim Egorov Date: Wed Dec 28 15:57:04 2022 +0100 drm/bridge: sii902x: Allow reset line to be tied to a sleepy GPIO controller Switch to gpiod_set_value_cansleep() in sii902x_reset(). This is relevant if the reset line is tied to a I2C GPIO controller. Signed-off-by: Wadim Egorov Reviewed-by: Andrzej Hajda Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20221228145704.939801-1-w.egorov@phytec.de commit 9402cde9347eca050e14ea9e47270e84a6899162 Author: Richard Acayan Date: Mon Jan 16 17:49:09 2023 -0500 drm/panel: vtdr6130: Use 16-bit brightness function This panel communicates brightness in big endian. This is not a quirk of the panels themselves, but rather, a part of the MIPI standard. Use the new mipi_dsi_dcs_set_display_brightness_large() function that properly handles 16-bit brightness instead of bypassing the brightness functions entirely. Signed-off-by: Richard Acayan Reviewed-by: Neil Armstrong Tested-by: Neil Armstrong # on SM8550-MTP Reviewed-by: Sam Ravnborg Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230116224909.23884-4-mailingradian@gmail.com commit fd40749a4f62a03d0aebe6eb446ea84a9901795a Author: Richard Acayan Date: Mon Jan 16 17:49:08 2023 -0500 drm/panel: sofef00: Use 16-bit brightness function These panels communicate brightness in big endian. This is not a quirk of the panels themselves, but rather, a part of the MIPI standard. Use the new mipi_dsi_dcs_set_display_brightness_large() function that properly handles 16-bit brightness instead of doing special processing of the brightness values. Signed-off-by: Richard Acayan Tested-by: Caleb Connolly Reviewed-by: Neil Armstrong Reviewed-by: Sam Ravnborg Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230116224909.23884-3-mailingradian@gmail.com commit c9d27c6be518b4ef2966d9564654ef99292ea1b3 Author: Daniel Mentz Date: Mon Jan 16 17:49:07 2023 -0500 drm/mipi-dsi: Fix byte order of 16-bit DCS set/get brightness The MIPI DCS specification demands that brightness values are sent in big endian byte order. It also states that one parameter (i.e. one byte) shall be sent/received for 8 bit wide values, and two parameters shall be used for values that are between 9 and 16 bits wide. Add new functions to properly handle 16-bit brightness in big endian, since the two 8- and 16-bit cases are distinct from each other. [richard: use separate functions instead of switch/case] [richard: split into 16-bit component] Fixes: 1a9d759331b8 ("drm/dsi: Implement DCS set/get display brightness") Signed-off-by: Daniel Mentz Link: https://android.googlesource.com/kernel/msm/+/754affd62d0ee268c686c53169b1dbb7deac8550 [richard: fix 16-bit brightness_get] Signed-off-by: Richard Acayan Tested-by: Caleb Connolly Reviewed-by: Neil Armstrong Reviewed-by: Sam Ravnborg Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230116224909.23884-2-mailingradian@gmail.com commit 9ffb07a3e6b8a13e305cb07ba794cb71755b2dba Merge: 68e5b6aa2795f ff58fda090961 Author: Jakub Kicinski Date: Wed Jan 18 20:52:28 2023 -0800 Merge branch 'enetc-bd-ring-cleanup' Vladimir Oltean says: ==================== ENETC BD ring cleanup The highlights of this patch set are: - Installing a BPF program and changing PTP RX timestamping settings are currently implemented through a port reconfiguration procedure which triggers an AN restart on the PHY, and these procedures are not generally guaranteed to leave the port in a sane state. Patches 9/12 and 11/12 address that. - Attempting to put the port down (or trying to reconfigure it) has the driver oppose some resistance if it's bombarded with RX traffic (it won't go down). Patch 12/12 addresses that. The other 9 patches are just cleanup in the BD ring setup/teardown code, which gradually led to bringing the driver in a position where resolving those 2 issues was possible. ==================== Link: https://lore.kernel.org/r/20230117230234.2950873-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit ff58fda0909618389f40647cba28a354a609e052 Author: Vladimir Oltean Date: Wed Jan 18 01:02:34 2023 +0200 net: enetc: prioritize ability to go down over packet processing napi_synchronize() from enetc_stop() waits until the softirq has finished execution and no longer wants to be rescheduled. However under high traffic load, this will never happen, and the interface can never be closed. The problem is the fact that the NAPI poll routine is written to update the consumer index which makes the device want to put more buffers in the RX ring, which restarts the madness again. Browsing around, it seems that some drivers like i40e keep a bit (__I40E_VSI_DOWN) which they use as communication between the control path and the data path. But that isn't my first choice, because complications ensue - since the enetc hardirq may trigger while we are in a theoretical ENETC_DOWN state, it may happen that enetc_msix() masks it, but enetc_poll() never unmasks it. To prevent a stall in that case, one would need to schedule all NAPI instances when ENETC_DOWN gets cleared, to process what's pending. I find it more desirable for the control path - enetc_stop() - to just quiesce the RX ring and let the softirq finish what remains there, without any explicit communication, just by making hardware not provide any more packets. This seems possible with the Enable bit of the RX BD ring (RBaMR[EN]). I can't seem to find an exact definition of what this bit does, but when the RX ring is disabled, the port seems to no longer update the producer index, and not react to software updates of the consumer index. In fact, the RBaMR[EN] bit is already toggled by the driver, but too late for what we want: enetc_close() -> enetc_stop() -> napi_synchronize() -> enetc_clear_bdrs() -> enetc_clear_rxbdr() The enetc_clear_bdrs() function contains not only logic to disable the RX and TX rings, but also logic to wait for the TX ring stop being busy. We split enetc_clear_bdrs() into enetc_disable_bdrs() and enetc_wait_bdrs(). One needs to run before napi_synchronize() and the other after (NAPI also processes TX completions, so we maximize our chances of not waiting for the ENETC_TBSR_BUSY bit - unless a packet is stuck for some reason, ofc). We also split off enetc_enable_bdrs() from enetc_setup_bdrs(), and call this from the mirror position in enetc_start() compared to enetc_stop(), i.e. right before netif_tx_start_all_queues(). Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit c33bfaf91c4ca6c859b1184396c0be2c1a94e745 Author: Vladimir Oltean Date: Wed Jan 18 01:02:33 2023 +0200 net: enetc: set up XDP program under enetc_reconfigure() Offloading a BPF program to the RX path of the driver suffers from the same problems as the PTP reconfiguration - improper error checking can leave the driver in an invalid state, and the link on the PHY is lost. Reuse the enetc_reconfigure() procedure, but here, we need to run some code in the middle of the ring reconfiguration procedure - while the interface is still down. Introduce a callback which makes that possible. Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 766338c79b1045866870b795882c4d42c64c9c53 Author: Vladimir Oltean Date: Wed Jan 18 01:02:32 2023 +0200 net: enetc: rename "xdp" and "dev" in enetc_setup_bpf() Follow the convention from this driver, which is to name "struct net_device *" as "ndev", and the convention from other drivers, to name "struct netdev_bpf *" as "bpf". Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 5093406c784f83f7fc6cc1f1bd49c2b062275954 Author: Vladimir Oltean Date: Wed Jan 18 01:02:31 2023 +0200 net: enetc: implement ring reconfiguration procedure for PTP RX timestamping The crude enetc_stop() -> enetc_open() mechanism suffers from 2 problems: 1. improper error checking 2. it involves phylink_stop() -> phylink_start() which loses the link Right now, the driver is prepared to offer a better alternative: a ring reconfiguration procedure which takes the RX BD size (normal or extended) as argument. It allocates new resources (failing if that fails), stops the traffic, and assigns the new resources to the rings. Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 598ca0d0905608755c86b10c3836499b051571d9 Author: Vladimir Oltean Date: Wed Jan 18 01:02:30 2023 +0200 net: enetc: move phylink_start/stop out of enetc_start/stop We want to introduce a fast interface reconfiguration procedure, which involves temporarily stopping the rings. But we want enetc_start() and enetc_stop() to not restart PHY autoneg, because that can take a few seconds until it completes again. So we need part of enetc_start() and enetc_stop(), but not all of them. Move phylink_start() right next to phylink_of_phy_connect(), and phylink_stop() right next to phylink_disconnect_phy(), both still in ndo_open() and ndo_stop(). Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit f3ce29e169d0b88dcb4909265eff517587f21be1 Author: Vladimir Oltean Date: Wed Jan 18 01:02:29 2023 +0200 net: enetc: split ring resource allocation from assignment We have a few instances in the enetc driver where the ring resources (BD ring iomem, software BD ring, software TSO headers, basically everything except RX buffers) need to be reallocated. For example, when RX timestamping is enabled, the RX BD format changes to an extended one (twice as large). Currently, this is done using a simplistic enetc_close() -> enetc_open() procedure. But this is quite crude, since it also invokes phylink_stop() -> phylink_start(), the link is lost, and a few seconds need to pass for autoneg to complete again. In fact it's bad also due to the improper (yolo) error checking. In case we fail to allocate new resources, we've already freed the old ones, so the interface is more or less stuck. To avoid that, we need a system where reconfiguration is possible in a way in which resources are allocated upfront. This means that there will be a higher memory usage temporarily, but the assignment of resources to rings can be done when both the old and new resources are still available. Introduce a struct enetc_bdr_resource which holds the resources for a ring, be it RX or TX. This structure duplicates a lot of fields from struct enetc_bdr (and access to the same fields in the ring structure was left duplicated, to not change cache characteristics in the fast path). When enetc_alloc_tx_resources() runs, it returns an array of resource elements (one per TX ring), in addition to the existing priv->tx_res. To populate priv->tx_res with that array, one must call enetc_assign_tx_resources(), and this also frees the old resources. Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit d075db51e013a7a6bea189c7f6824f458b621626 Author: Vladimir Oltean Date: Wed Jan 18 01:02:28 2023 +0200 net: enetc: bring "bool extended" to top-level in enetc_open() Extended RX buffer descriptors are necessary if they carry RX timestamps, which will be true when PTP timestamping is enabled. Right now, the rx_ring->ext_en is set from the function that allocates ring resources (enetc_alloc_rx_resources() -> enetc_alloc_rxbdr()), and also used later, in enetc_setup_rxbdr(). It is also used in the enetc_rxbd() and enetc_rxbd_next() fast path helpers. We want to decouple resource allocation from BD ring setup, but both procedures depend on BD size (extended or not). Move the "extended" boolean to enetc_open() and pass it both to the RX allocation procedure as well as to the RX ring setup procedure. The latter will set rx_ring->ext_en from now on. Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit bbd6043f74e139a58052b34df3a4b87da7df00bb Author: Vladimir Oltean Date: Wed Jan 18 01:02:27 2023 +0200 net: enetc: drop redundant enetc_free_tx_frame() call from enetc_free_txbdr() The call path in enetc_close() is: enetc_close() -> enetc_free_rxtx_rings() -> enetc_free_tx_ring() -> enetc_free_tx_frame() -> enetc_free_tx_resources() -> enetc_free_txbdr() -> enetc_free_tx_frame() The enetc_free_tx_frame() function is written such that the second call exits without doing anything, but nonetheless, it is completely redundant. Delete it. This makes the TX teardown path more similar to the RX one, where rx_swbd freeing is done in enetc_free_rx_ring(), not in enetc_free_rxbdr(). Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 2c3387109d11690dd7dd91c9c8e497f918f988da Author: Vladimir Oltean Date: Wed Jan 18 01:02:26 2023 +0200 net: enetc: rx_swbd and tx_swbd are never NULL in enetc_free_rxtx_rings() The call path in enetc_close() is: enetc_close() -> enetc_free_rxtx_rings() -> enetc_free_rx_ring() -> tests whether rx_ring->rx_swbd is NULL -> enetc_free_tx_ring() -> tests whether tx_ring->tx_swbd is NULL -> enetc_free_rx_resources() -> enetc_free_rxbdr() -> sets rxr->rx_swbd to NULL -> enetc_free_tx_resources() -> enetc_free_txbdr() -> setx txr->tx_swbd to NULL From the above, it is clear that due to the function ordering, the checks for NULL are redundant, since the software buffer descriptor arrays have not yet been set to NULL. Drop these checks. Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 0d6cfd0f5e4d7a2f7254f62a16bec30cd92b6d5d Author: Vladimir Oltean Date: Wed Jan 18 01:02:25 2023 +0200 net: enetc: create enetc_dma_free_bdr() This is a refactoring change which introduces the opposite function of enetc_dma_alloc_bdr(). Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit fbf1cff98c9591bd60deb56e3ea5aa0efdc15843 Author: Vladimir Oltean Date: Wed Jan 18 01:02:24 2023 +0200 net: enetc: set up RX ring indices from enetc_setup_rxbdr() There is only one place which needs to set up indices in the RX ring. Be consistent with what was done in the TX path and do this in enetc_setup_rxbdr(). Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 1cbf19c575ddbec27eec99396329810b1a5f7976 Author: Vladimir Oltean Date: Wed Jan 18 01:02:23 2023 +0200 net: enetc: set next_to_clean/next_to_use just from enetc_setup_txbdr() enetc_alloc_txbdr() deals with allocating resources necessary for a TX ring to work (the array of software BDs and the array of TSO headers). The next_to_clean and next_to_use pointers are overwritten with proper values which are read from hardware here: enetc_open -> enetc_alloc_tx_resources -> enetc_alloc_txbdr -> set to zero -> enetc_setup_bdrs -> enetc_setup_txbdr -> read from hardware So their initialization with zeroes is pointless and confusing. Delete it. Consequently, since enetc_setup_txbdr() has no opposite cleanup function, also delete the resetting of these indices from enetc_free_tx_ring(). Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 9daaaaaacffc5df52e3af4b5a4588d57a75f2d6f Author: Dmitry Baryshkov Date: Fri Jan 13 14:05:43 2023 +0200 clk: qcom: cpu-8996: change setup sequence to follow vendor kernel Add missing register writes to CPU clocks setup procedure. This makes it follow the setup procedure used in msm-3.18 kernel. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113120544.59320-14-dmitry.baryshkov@linaro.org commit 682c6a452def79626441a3f5f3c0eb292d19793c Author: Dmitry Baryshkov Date: Fri Jan 13 14:05:42 2023 +0200 clk: qcom: cpu-8996: fix PLL clock ops Switch CPU PLLs to use clk_alpha_pll_hwfsm_ops, it seems to suit better. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113120544.59320-13-dmitry.baryshkov@linaro.org commit 495bc5a7c4a1277d90701cbc1c9c2fd0504db10c Author: Dmitry Baryshkov Date: Fri Jan 13 14:05:41 2023 +0200 clk: qcom: cpu-8996: fix ACD initialization The vendor kernel applies different order while programming SSSCTL and L2ACDCR registers on power and performance clusters. However it was demonstrated that doing this upstream results in the board reset. Make both clusters use the same sequence, which fixes the reset. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113120544.59320-12-dmitry.baryshkov@linaro.org commit 6fb03dd0b40aa83a3a04390ef539f1547b77ca1d Author: Dmitry Baryshkov Date: Fri Jan 13 14:05:40 2023 +0200 clk: qcom: cpu-8996: fix PLL configuration sequence Switch both power and performance clocks to the GPLL0/2 (sys_apcs_aux) before PLL configuration. Switch them to the ACD afterwards. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113120544.59320-11-dmitry.baryshkov@linaro.org commit fa0bc05f2f87eb84dba1977794048ee7b9ec6545 Author: Dmitry Baryshkov Date: Fri Jan 13 14:05:39 2023 +0200 clk: qcom: cpu-8996: move qcom_cpu_clk_msm8996_acd_init call Initialize ACD configuration from qcom_cpu_clk_msm8996_register_clks(), before registering all clocks. This way we can be sure that the clock is fully configured before letting CCF touch it. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113120544.59320-10-dmitry.baryshkov@linaro.org commit 61dc1a73684b9ff5c44f22d9cbc994a2e5db6d6f Author: Dmitry Baryshkov Date: Fri Jan 13 14:05:38 2023 +0200 clk: qcom: cpu-8996: setup PLLs before registering clocks Setup all PLLs before registering clocks in the common clock framework. This ensures that the clocks are not accessed before being setup in the known way and that the CCF is in sync with the actual HW programming. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113120544.59320-9-dmitry.baryshkov@linaro.org commit b3b274bc9d3d7307308aeaf75f70731765ac999a Author: Dmitry Baryshkov Date: Fri Jan 13 14:05:37 2023 +0200 clk: qcom: cpu-8996: simplify the cpu_clk_notifier_cb - Do not use the Alt PLL completely. Switch to smux when necessary to prevent overvolting - Restore the parent in case the rate change aborts for some reason - Do not duplicate resetting the parent in set_parent operation. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113120544.59320-8-dmitry.baryshkov@linaro.org commit 25959dd67ddea75595af2b2d2217191aba1e6d71 Author: Lang Yu Date: Wed Jan 11 09:32:15 2023 +0800 drm/amdgpu: allow multipipe policy on ASICs with one MEC Always enable multipipe policy on ASICs with GC VERSION > 9.0.0 instead of MEC number > 1. This will allow multipipe policy on ASICs with one MEC, e.g., gfx11 APUs. Signed-off-by: Lang Yu Reviewed-by: Aaron Liu Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher commit 99761aaa1ce8b53db1767b8c15a020ed2475b39b Author: Lang Yu Date: Wed Jan 11 09:52:11 2023 +0800 drm/amdgpu: correct MEC number for gfx11 APUs There is only one MEC on these APUs. Signed-off-by: Lang Yu Reviewed-by: Aaron Liu Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher commit 0feeb4fd4c93efde2ac265d192392639fb4e253a Author: Hamza Mahfooz Date: Tue Jan 17 15:12:49 2023 -0500 drm/amd/display: fix issues with driver unload Currently, we run into a number of WARN()s when attempting to unload the amdgpu driver (e.g. using "modprobe -r amdgpu"). These all stem from calling drm_encoder_cleanup() too early. So, to fix this we can stop calling drm_encoder_cleanup() from amdgpu_dm_fini() and instead have it be called from amdgpu_dm_encoder_destroy(). Also, we don't need to free in amdgpu_dm_encoder_destroy() since mst_encoders[] isn't explicitly allocated by the slab allocator. Fixes: f74367e492ba ("drm/amdgpu/display: create fake mst encoders ahead of time (v4)") Reviewed-by: Alex Deucher Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 09eb3ea3912644950eee3f8788796790ec0f022f Author: Guilherme G. Piccoli Date: Tue Jan 17 15:15:24 2023 -0300 drm/amdgpu/vcn: Remove redundant indirect SRAM HW model check The HW model validation that guards the indirect SRAM checking in the VCN code path is redundant - there's no model that's not included in the switch, making it useless in practice [0]. So, let's remove this switch statement for good. [0] lore.kernel.org/amd-gfx/MN0PR12MB61013D20B8A2263B22AE1BCFE2C19@MN0PR12MB6101.namprd12.prod.outlook.com Suggested-by: Alex Deucher Reviewed-by: Mario Limonciello Cc: James Zhu Cc: Lazar Lijo Cc: Leo Liu Cc: Sonny Jiang Signed-off-by: Guilherme G. Piccoli Signed-off-by: Alex Deucher commit 2ed9e22ed729d81f1f81b8e55957547828b01606 Author: Guilherme G. Piccoli Date: Tue Jan 17 15:15:23 2023 -0300 drm/amdgpu/vcn: Adjust firmware names indentation This is an incredibly trivial fix, just for the sake of "aesthetical" organization of the defines. Some were space based, most were tab based and there was a lack of "alignment", now it's all the same and aligned. Cc: James Zhu Cc: Lazar Lijo Cc: Leo Liu Cc: Mario Limonciello Cc: Sonny Jiang Reviewed-by: Alex Deucher Signed-off-by: Guilherme G. Piccoli Signed-off-by: Alex Deucher commit 57f72170a2b2a362c35bb9407fc844eac5afdec1 Author: Sibi Sankar Date: Tue Jan 17 14:28:35 2023 +0530 remoteproc: qcom_q6v5_mss: Use a carveout to authenticate modem headers Any access to the dynamically allocated metadata region by the application processor after assigning it to the remote Q6 will result in a XPU violation. Fix this by replacing the dynamically allocated memory region with a no-map carveout and unmap the modem metadata memory region before passing control to the remote Q6. Reported-and-tested-by: Amit Pundir Fixes: 6c5a9dc2481b ("remoteproc: qcom: Make secure world call for mem ownership switch") Signed-off-by: Sibi Sankar Reviewed-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117085840.32356-7-quic_sibis@quicinc.com commit a899d542b687c9b04ccbd9eefabc829ba5fef791 Author: Christoph Hellwig Date: Tue Jan 17 14:28:34 2023 +0530 Revert "remoteproc: qcom_q6v5_mss: map/unmap metadata region before/after use" This reverts commit fc156629b23a21181e473e60341e3a78af25a1d4. This commit manages to do three API violations at once: - dereference the return value of dma_alloc_attrs with the DMA_ATTR_NO_KERNEL_MAPPING mapping, which is clearly forbidden and will do the wrong thing on various dma mapping implementations. The fact that dma-direct uses a struct page as a cookie is an undocumented implementation detail - include dma-map-ops.h and use pgprot_dmacoherent despite a clear comment documenting that this is not acceptable - use of the VM_DMA_COHERENT for something that is not the dma-mapping code - use of VM_FLUSH_RESET_PERMS for vmap, while it is only supported for vmalloc Acked-by: Manivannan Sadhasivam Signed-off-by: Christoph Hellwig Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117085840.32356-6-quic_sibis@quicinc.com commit eb48137d783b4c845c7b081e32a73666326dcbb3 Author: Sibi Sankar Date: Tue Jan 17 14:28:33 2023 +0530 dt-bindings: remoteproc: qcom,sc7280-mss-pil: Update memory-region The dynamic memory region used for metadata authentication would still be a part of the kernel mapping and any access to this region by the application processor after assigning it to the remote Q6 will result in a XPU violation. This is fixed by using a no-map carveout instead. Update the bindings to reflect the addition of the new modem metadata carveout on SC7280 SoC. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117085840.32356-5-quic_sibis@quicinc.com commit 95864f27330674c970c84b81ae791182de150b0f Author: Sibi Sankar Date: Tue Jan 17 14:28:32 2023 +0530 dt-bindings: remoteproc: qcom,sc7180-mss-pil: Update memory-region The dynamic memory region used for metadata authentication would still be a part of the kernel mapping and any access to this region by the application processor after assigning it to the remote Q6 will result in a XPU violation. This is fixed by using a no-map carveout instead. Update the bindings to reflect the addition of the new modem metadata carveout on SC7180 SoC. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117085840.32356-4-quic_sibis@quicinc.com commit 9b3024247b2ddea6880fa77b638c870ddbdb6bba Author: Sibi Sankar Date: Tue Jan 17 14:28:31 2023 +0530 dt-bindings: remoteproc: qcom,msm8996-mss-pil: Update memory region The dynamic memory region used for metadata authentication would still be a part of the kernel mapping and any access to this region by the application processor after assigning it to the remote Q6 will result in a XPU violation. This is fixed by using a no-map carveout instead. Update the bindings to reflect the addition of the new modem metadata carveout on MSM8996 (and similar) SoCs. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117085840.32356-3-quic_sibis@quicinc.com commit bdea142295ffd76aaec2a90a36ba09ad19660686 Author: Sibi Sankar Date: Tue Jan 17 14:28:30 2023 +0530 dt-bindings: remoteproc: qcom,q6v5: Move MSM8996 to schema Convert MSM8996 and similar (MSM8998/SDM845) MSS PIL bindings to schema. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117085840.32356-2-quic_sibis@quicinc.com commit a63a420d050d47a6afb5e2198181dadd08e71f97 Author: Sibi Sankar Date: Tue Jan 17 14:28:40 2023 +0530 arm64: dts: qcom: sc7280: Add a carveout for modem metadata Add a new carveout for modem metadata on SC7280 SoCs. Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117085840.32356-12-quic_sibis@quicinc.com commit cb0eaae8e8bc79fef0dc37767bb2bfa7e824b18f Author: Sibi Sankar Date: Tue Jan 17 14:28:39 2023 +0530 arm64: dts: qcom: sc7180: Add a carveout for modem metadata Add a new carveout for modem metadata on SC7180 SoCs. Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117085840.32356-11-quic_sibis@quicinc.com commit 44c89ef3d1096f92712e11675329c3f1fca96c47 Author: Sibi Sankar Date: Tue Jan 17 14:28:38 2023 +0530 arm64: dts: qcom: sdm845: Add a carveout for modem metadata Add a new carveout for modem metadata on SDM845 SoCs. Tested-by: Amit Pundir Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117085840.32356-10-quic_sibis@quicinc.com commit 264f6a8dff9bfdc8e81c6fe6980833c0d56adfc4 Author: Sibi Sankar Date: Tue Jan 17 14:28:37 2023 +0530 arm64: dts: qcom: msm8998: Add a carveout for modem metadata Add a new carveout for modem metadata on MSM8998 SoCs. Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117085840.32356-9-quic_sibis@quicinc.com commit 3c118d1b0d2153e3b70447a6074d2d7cc74f6163 Author: Sibi Sankar Date: Tue Jan 17 14:28:36 2023 +0530 arm64: dts: qcom: msm8996: Add a carveout for modem metadata Add a new carveout for modem metadata on MSM8996 SoCs. Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117085840.32356-8-quic_sibis@quicinc.com commit 0e8b90c0256cf9c9589e2cee517dedc987a34355 Author: Robert Marko Date: Fri Jan 13 17:44:49 2023 +0100 arm64: dts: qcom: ipq8074: correct PCIe QMP PHY output clock names Current PCIe QMP PHY output name were changed in ("arm64: dts: qcom: Fix IPQ8074 PCIe PHY nodes") however it did not account for the fact that GCC driver is relying on the old names to match them as they are being used as the parent for the gcc_pcie0_pipe_clk and gcc_pcie1_pipe_clk. This broke parenting as GCC could not find the parent clock, so fix it by changing to the names that driver is expecting. Fixes: 942bcd33ed45 ("arm64: dts: qcom: Fix IPQ8074 PCIe PHY nodes") Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113164449.906002-9-robimarko@gmail.com commit 3e83a9c41ab0244a45a4a2800b9adb8de0d15f82 Author: Robert Marko Date: Fri Jan 13 17:44:48 2023 +0100 arm64: dts: qcom: ipq8074: fix Gen3 PCIe node IPQ8074 comes in 2 silicon versions: * v1 with 2x Gen2 PCIe ports and QMP PHY-s * v2 with 1x Gen3 and 1x Gen2 PCIe ports and QMP PHY-s v2 is the final and production version that is actually supported by the kernel, however it looks like PCIe related nodes were added for the v1 SoC. Finish the PCIe fixup by using the correct compatible, adding missing ATU register space, declaring max-link-speed, use correct ranges, add missing clocks and resets. Fixes: 33057e1672fe ("ARM: dts: ipq8074: Add pcie nodes") Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113164449.906002-8-robimarko@gmail.com commit b60590314828e3da670bed94129f4ebc02b87548 Author: Robert Marko Date: Fri Jan 13 17:44:44 2023 +0100 arm64: dts: qcom: ipq8074: set Gen2 PCIe pcie max-link-speed Add the generic 'max-link-speed' property to describe the Gen2 PCIe link generation limit. This allows the generic DWC code to configure the link speed correctly. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113164449.906002-4-robimarko@gmail.com commit 2055cb7dccea16bafa3adf9c5e3216949512c34a Author: Robert Marko Date: Fri Jan 13 17:44:43 2023 +0100 arm64: dts: qcom: ipq8074: correct Gen2 PCIe ranges Current ranges property set in Gen2 PCIe node is incorrect, replace it with the downstream 5.4 QCA kernel value. Fixes: 33057e1672fe ("ARM: dts: ipq8074: Add pcie nodes") Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113164449.906002-3-robimarko@gmail.com commit 7ba33591b45f9d547a317e42f1c2acd19c925eb6 Author: Robert Marko Date: Fri Jan 13 17:44:42 2023 +0100 arm64: dts: qcom: ipq8074: fix Gen3 PCIe QMP PHY IPQ8074 comes in 2 silicon versions: * v1 with 2x Gen2 PCIe ports and QMP PHY-s * v2 with 1x Gen3 and 1x Gen2 PCIe ports and QMP PHY-s v2 is the final and production version that is actually supported by the kernel, however it looks like PCIe related nodes were added for the v1 SoC. Now that we have Gen3 QMP PHY support, we can start fixing the PCIe support by fixing the Gen3 QMP PHY node first. Change the compatible to the Gen3 QMP PHY, correct the register space start and size, add the missing misc PCS register space. Fixes: 33057e1672fe ("ARM: dts: ipq8074: Add pcie nodes") Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113164449.906002-2-robimarko@gmail.com commit 100d9c94ccf15b02742c326cd04f422ab729153b Author: Robert Marko Date: Fri Jan 13 17:44:41 2023 +0100 arm64: dts: qcom: ipq8074: fix Gen2 PCIe QMP PHY Serdes register space sizes are incorrect, update them to match the actual sizes from downstream QCA 5.4 kernel. Fixes: 942bcd33ed45 ("arm64: dts: qcom: Fix IPQ8074 PCIe PHY nodes") Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113164449.906002-1-robimarko@gmail.com commit 6bf32599223634294cdc6efb359ffaab1d68073c Author: Guru Das Srinagesh Date: Fri Jan 13 21:41:14 2023 +0530 firmware: qcom: scm: Add wait-queue handling logic When the firmware (FW) supports multiple requests per VM, multiple requests from the same/different VM can reach the firmware at the same time. Since the firmware currently being used has limited resources, it guards them with a resource lock and puts requests on a wait-queue internally and signals to HLOS that it is doing so. It does this by returning a new return value in addition to success or error: SCM_WAITQ_SLEEP. A sleeping SCM call can be woken up by an interrupt that the FW raises. 1) SCM_WAITQ_SLEEP: When an SCM call receives this return value instead of success or error, FW has placed this call on a wait-queue and has signalled HLOS to put it to non-interruptible sleep. Along with this return value, FW also passes to HLOS `wq_ctx` - a unique number (UID) identifying the wait-queue that it has put the call on, internally. This is to help HLOS with its own bookkeeping to wake this sleeping call later. Additionally, FW also passes to HLOS `smc_call_ctx` - a UID identifying the SCM call thus being put to sleep. This is also for HLOS' bookkeeping to wake this call up later. These two additional values are passed via the a1 and a2 registers. N.B.: The "ctx" in the above UID names = "context". The handshake mechanism that HLOS uses to talk to FW about wait-queue operations involves two new SMC calls. 1) get_wq_ctx(): Arguments: None Returns: wq_ctx, flags, more_pending Get the wait-queue context, and wake up either one or all of the sleeping SCM calls associated with that wait-queue. Additionally, repeat this if there are more wait-queues that are ready to have their requests woken up (`more_pending`). 2) wq_resume(smc_call_ctx): Arguments: smc_call_ctx HLOS needs to issue this in response to receiving an IRQ, passing to FW the same smc_call_ctx that FW receives from HLOS via the get_wq_ctx() call. (The mechanism to wake a SMC call back up is described in detail below) VM_1 VM_2 Firmware │ │ │ │ │ │ │ │ │ │ │ │ │ REQUEST_1 │ │ ├────────────────────────┼─────────────────────────────────┤ │ │ │ │ │ ┌──┼──┐ │ │ │ │ │ │ │ REQUEST_2 │ │ │ │ ├──────────────────────────────┼──┤ │ │ │ │ │ │Resource │ │ │ │ │is busy │ │ {WQ_SLEEP} │ │ │ │ │◄─────────────────────────────┼──┤ │ │ │ wq_ctx, smc_call_ctx │ │ │ │ │ └──┼──┘ │ REQUEST_1 COMPLETE │ │ │◄───────────────────────┼─────────────────────────────────┤ │ │ │ │ │ IRQ │ │ │◄─-------------------------------│ │ │ │ │ │ get_wq_ctx() │ │ ├────────────────────────────────►│ │ │ │ │ │ │ │ │◄────────────────────────────────┤ │ │ wq_ctx, flags, and │ │ │ more_pending │ │ │ │ │ │ │ │ │ wq_resume(smc_call_ctx) │ │ ├────────────────────────────────►│ │ │ │ │ │ │ │ │ REQUEST_2 COMPLETE │ │ │◄────────────────────────────────┤ │ │ │ │ │ │ With the exception of get_wq_ctx(), the other SMC call wq_resume() can return WQ_SLEEP (these nested rounds of WQ_SLEEP are not shown in the above diagram for the sake of simplicity). Therefore, introduce a new do-while loop to handle multiple WQ_SLEEP return values for the same parent SCM call. Request Completion in the above diagram refers to either a success return value (zero) or error (and not SMC_WAITQ_SLEEP) Also add the interrupt handler that wakes up a sleeping SCM call. Signed-off-by: Guru Das Srinagesh Co-developed-by: Sibi Sankar Signed-off-by: Sibi Sankar Reviewed-by: Guru Das Srinagesh Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113161114.22607-3-quic_sibis@quicinc.com commit afb37e2577938bb854f20d428d8f29a01ea8bc93 Author: Guru Das Srinagesh Date: Fri Jan 13 21:41:13 2023 +0530 dt-bindings: firmware: qcom,scm: Add optional interrupt Add an interrupt specification to the bindings to support the wait-queue feature on SM8450 SoCs. Signed-off-by: Guru Das Srinagesh Signed-off-by: Sibi Sankar Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113161114.22607-2-quic_sibis@quicinc.com commit dfe5ac7023624617d402ca1c295552fbd271e20c Author: Konrad Dybcio Date: Fri Jan 13 16:22:32 2023 +0100 Revert "dt-bindings: power: rpmpd: Add SM4250 support" SM4250 and SM6115 use a shared device tree and the RPMPDs are identical. There's no need for a separate entry, so remove it. This reverts commit 45ac44ed10e58cf9b510e6552317ed7d2602346f. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113152232.2624545-2-konrad.dybcio@linaro.org commit a36489778ba8f7eb98c3e9fca2d300090bf1ffcd Author: Konrad Dybcio Date: Fri Jan 13 16:22:31 2023 +0100 Revert "soc: qcom: rpmpd: Add SM4250 support" SM4250 and SM6115 use a shared device tree and the RPMPDs are identical. There's no need for a separate entry, so remove it. This reverts commit 5b617b1b10c1c6a4365d8f956032e95c53b8e388. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113152232.2624545-1-konrad.dybcio@linaro.org commit 3e7a2e8bd9b7350e34b7b0ad3eaad8219b5f5cf6 Author: Krzysztof Kozlowski Date: Fri Jan 13 15:52:31 2023 +0100 arm64: dts: qcom: sdm845-db845c: drop label from I2C controllers Geni I2C Controller node does not allow a "label" property and Linux driver does not parse it: sdm845-db845c.dtb: i2c@a8c000: Unevaluated properties are not allowed ('label' was unexpected) Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113145231.79280-1-krzysztof.kozlowski@linaro.org commit ac0d84d4556cecf81ba0b1631d25d9a395235a5c Author: Dmitry Baryshkov Date: Fri Jan 13 14:05:44 2023 +0200 arm64: dts: qcom: msm8996: support using GPLL0 as kryocc input In some cases the driver might need using GPLL0 to drive CPU clocks. Bring it in through the sys_apcs_aux clock. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113120544.59320-15-dmitry.baryshkov@linaro.org commit 72537606f03c8007029211867a7fa63d2d41b8b8 Author: Dmitry Baryshkov Date: Fri Jan 13 14:05:36 2023 +0200 clk: qcom: cpu-8996: skip ACD init if the setup is valid Check whether L2 registers contain correct values and skip programming if they are valid. This follows the code present downstream. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113120544.59320-7-dmitry.baryshkov@linaro.org commit fe8a500534e74de08a2878205404f3c858629da8 Author: Dmitry Baryshkov Date: Fri Jan 13 14:05:35 2023 +0200 clk: qcom: cpu-8996: support using GPLL0 as SMUX input In some cases the driver might need using GPLL0 to drive CPU clocks. Bring it in through the sys_apcs_aux clock. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113120544.59320-6-dmitry.baryshkov@linaro.org commit be4e65d130bb68028530d0c53ffdbd523c23c931 Author: Dmitry Baryshkov Date: Fri Jan 13 14:05:34 2023 +0200 clk: qcom: cpu-8996: fix the init clock rate Current multiplier (60) results in CPU getting the rate which is unlisted in the CPU frequency tables (60 * 19.2 = 1152 MHz). This results in warnings from the cpufreq during startup. Change PLL programming (l = 54) to init CPU clocks to start with the frequency of 54 * 19.2 = 1036.8 MHz which is supported by both power and performance clusters from all speed bins. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113120544.59320-5-dmitry.baryshkov@linaro.org commit 4953610bf164f917563e54be2a1a0f256abb837e Author: Dmitry Baryshkov Date: Fri Jan 13 14:05:33 2023 +0200 clk: qcom: cpu-8996: correct PLL programming Change PLL programming to follow the downstream setup. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113120544.59320-4-dmitry.baryshkov@linaro.org commit d234c4bcad3978b1b5473a8ae6d4f013a1335a75 Author: Dmitry Baryshkov Date: Fri Jan 13 14:05:32 2023 +0200 clk: qcom: clk-alpha-pll: program PLL_TEST/PLL_TEST_U if required Program PLL_TEST and PLL_TEST_U registers if required by the pll configuration. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113120544.59320-3-dmitry.baryshkov@linaro.org commit 33d0f3945c5afaad96cfab3b911c019ec55525e4 Author: Dmitry Baryshkov Date: Fri Jan 13 14:05:31 2023 +0200 dt-bindings: clock: qcom,msm8996-apcc: add sys_apcs_aux clock The MSM8996 CPU clock controller can make use of the sys_apcs_aux clock. Add it to the bindings. Acked-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113120544.59320-2-dmitry.baryshkov@linaro.org commit 1c9efb0bc0406b088f3d4b4a433f49e3cd7addaf Author: Taniya Das Date: Thu Jan 12 12:44:46 2023 -0800 clk: qcom: Add QDU1000 and QRU1000 GCC support Add Global Clock Controller (GCC) support for QDU1000 and QRU1000 SoCs. Signed-off-by: Taniya Das Signed-off-by: Melody Olvera Reviewed-by: Dmitry Baryshkov [bjorn: Made gcc_pcie_0_pipe_clk_src use clk_regmap_phy_mux_ops] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230112204446.30236-3-quic_molvera@quicinc.com commit f0a670211186af38cc5595832a69c1dfc82a37e1 Merge: 2069c701fc815 8c8acefcee879 Author: Bjorn Andersson Date: Wed Jan 18 20:47:06 2023 -0600 Merge branch '20230112204446.30236-2-quic_molvera@quicinc.com' into HEAD commit 8c8acefcee87957cb3564c7180e667f0403121f1 Author: Melody Olvera Date: Thu Jan 12 12:44:45 2023 -0800 dt-bindings: clock: Add QDU1000 and QRU1000 GCC clocks Add device tree bindings for global clock controller on QDU1000 and QRU1000 SoCs. Signed-off-by: Melody Olvera Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230112204446.30236-2-quic_molvera@quicinc.com commit 0da2eff44e78ded247fe35d8a3f73508263d0948 Author: Manivannan Sadhasivam Date: Wed Jan 11 18:00:04 2023 +0530 arm64: dts: qcom: sm8450: Allow both GIC-ITS and internal MSI controller The devicetree should specify both MSI implementations and the OS/driver should choose the one based on the platform requirements. Currently, Linux DWC driver will choose GIC-ITS over the internal MSI controller. Fixes: a11bbf6adef4 ("arm64: dts: qcom: sm8450: Use GIC-ITS for PCIe0 and PCIe1") Suggested-by: Rob Herring Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230111123004.21048-2-manivannan.sadhasivam@linaro.org commit 34d50b12d67795454139a1cfc7ca3add8efa3612 Author: Rayyan Ansari Date: Wed Jan 18 18:13:43 2023 +0000 ARM: dts: qcom: msm8226: add RPMCC node Add a node for the RPM Clock Controller on MSM8226. Signed-off-by: Rayyan Ansari Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230118181343.438373-1-rayyan@ansari.sh commit 772e6bc4a0a9c426385115d720743bae7804d499 Author: Abel Vesa Date: Thu Jan 19 02:45:33 2023 +0200 arm64: dts: qcom: sm8550-mtp: Add USB PHYs and HC nodes Enable USB HC and PHYs nodes on SM8550 MTP board. Signed-off-by: Abel Vesa Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230119004533.1869870-3-abel.vesa@linaro.org commit 7f7e5c1b037fc38dfc4f9530fcdb6fa8bd9fd01c Author: Abel Vesa Date: Thu Jan 19 02:45:32 2023 +0200 arm64: dts: qcom: sm8550: Add USB PHYs and controller nodes Add USB host controller and PHY nodes. Signed-off-by: Abel Vesa Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230119004533.1869870-2-abel.vesa@linaro.org commit ca54a9a32da0f0ef7e5cbcd111b66f3c9d78b7d2 Author: Lucas De Marchi Date: Wed Jan 18 17:52:39 2023 -0800 drm/i915/mtl: Fix bcs default context Commit 0d0e7d1eea9e ("drm/i915/mtl: Define engine context layouts") added the engine context for Meteor Lake. In a second revision of the patch it was believed the xcs offsets were wrong due to a tagging issue in the spec. The first version was actually correct, as shown by the intel_lrc_live_selftests/live_lrc_layout test: i915: Running gt_lrc i915: Running intel_lrc_live_selftests/live_lrc_layout bcs0: LRI command mismatch at dword 1, expected 1108101d found 11081019 [drm:drm_helper_probe_single_connector_modes [drm_kms_helper]] [CONNECTOR:236:DP-1] disconnected bcs0: HW register image: [0000] 00000000 1108101d 00022244 ffff0008 00022034 00000088 00022030 00000088 ... bcs0: SW register image: [0000] 00000000 11081019 00022244 00090009 00022034 00000000 00022030 00000000 The difference in the 2 additional dwords (0x1d vs 0x19) are the offsets 0x120 / 0x124 that are indeed part of the context image. Bspec: 45585 Fixes: 0d0e7d1eea9e ("drm/i915/mtl: Define engine context layouts") Signed-off-by: Lucas De Marchi Signed-off-by: Radhakrishna Sripada Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20230111235531.3353815-2-radhakrishna.sripada@intel.com commit 9a3f21fe5cb9f5654ccad7ba712d868f7de66e39 Author: Björn Töpel Date: Mon Jan 9 12:42:51 2023 +0100 selftests: vm: enable cross-compilation Selftests vm builds break when doing cross-compilation. The Makefile MACHINE variable incorrectly picks upp the host machine architecture. If the CROSS_COMPILE variable is set, dig out the target host architecture from CROSS_COMPILE, instead of calling uname. Link: https://lkml.kernel.org/r/20230109114251.3349638-1-bjorn@kernel.org Signed-off-by: Björn Töpel Cc: Shuah Khan Signed-off-by: Andrew Morton commit d526643f155c431e8dfef643195f2d636d4e4bb5 Author: Alexander Pantyukhin Date: Sun Jan 8 15:50:23 2023 +0500 tools:cgroup:memcg_shrinker remove redundant import Remove redundant import of the sys module. Also use the sort function instead of sorted. It sorts the direct array without create the new one in memory. Link: https://lkml.kernel.org/r/20230108105023.4289-1-apantykhin@gmail.com Signed-off-by: Alexander Pantyukhin Cc: Roman Gushchin Signed-off-by: Andrew Morton commit b6f00c9190c8e694c9b2b38e7cc63964f7a99195 Author: Xu Panda Date: Mon Jan 9 19:46:55 2023 +0800 mm/damon/sysfs-schemes: 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. Link: https://lkml.kernel.org/r/202301091946553770006@zte.com.cn Signed-off-by: Xu Panda Signed-off-by: Yang Yang Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton commit e8dfc854eef20ac7663996f61837299887f380fc Author: Vishal Moola (Oracle) Date: Wed Dec 7 10:10:09 2022 -0800 ext4: convert mext_page_double_lock() to mext_folio_double_lock() Convert mext_page_double_lock() to use folios. This change saves 146 bytes of kernel text. It also removes 6 calls to compound_head() and 2 calls to folio_file_page(). Link: https://lkml.kernel.org/r/20221207181009.4016-1-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Reviewed-by: Matthew Wilcox (Oracle) Cc: Theodore Ts'o Signed-off-by: Andrew Morton commit f4d9139f1394cbe2de158ab8771fea4e587004d4 Author: David Hildenbrand Date: Mon Jan 9 18:12:55 2023 +0100 selftests/mm: define MADV_PAGEOUT to fix compilation issues If MADV_PAGEOUT is not defined (e.g., on AlmaLinux 8), compilation will fail. Let's fix that like khugepaged.c does by conditionally defining MADV_PAGEOUT. Link: https://lkml.kernel.org/r/20230109171255.488749-1-david@redhat.com Fixes: 69c66add5663 ("selftests/vm: anon_cow: test COW handling of anonymous memory") Signed-off-by: David Hildenbrand Reported-by: Mirsad Goran Todorovac Cc: Shuah Khan Signed-off-by: Andrew Morton commit c4876ff68716e5372224d17045b47610d667a0ee Author: Frank van der Linden Date: Mon Jan 9 17:43:32 2023 +0000 mm/debug: use valid physical memory for pmd/pud tests The page table debug tests need a physical address to validate low-level page table manipulation with. The memory at this address is not actually touched, it just encoded in the page table entries at various levels during the tests only. Since the memory is not used, the code just picks the physical address of the start_kernel symbol. This value is then truncated to get a properly aligned address that is to be used for various tests. Because of the truncation, the address might not actually exist, or might not describe a complete huge page. That's not a problem for most tests, but the arch-specific code may check for attribute validity and consistency. The x86 version of {pud,pmd}_set_huge actually validates the MTRRs for the PMD/PUD range. This may fail with an address derived from start_kernel, depending on where the kernel was loaded and what the physical memory layout of the system is. This then leads to false negatives for the {pud,pmd}_set_huge tests. Avoid this by finding a properly aligned memory range that exists and is usable. If such a range is not found, skip the tests that needed it. [fvdl@google.com: v3] Link: https://lkml.kernel.org/r/20230110181208.1633879-1-fvdl@google.com Link: https://lkml.kernel.org/r/20230109174332.329366-1-fvdl@google.com Fixes: 399145f9eb6c ("mm/debug: add tests validating architecture page table helpers") Signed-off-by: Frank van der Linden Reviewed-by: Anshuman Khandual Signed-off-by: Andrew Morton commit b0c0e744e8a471f1c710197faaab0b81c461f8c0 Author: SeongJae Park Date: Mon Jan 9 21:33:35 2023 +0000 mm/damon/paddr: remove damon_pa_access_chk_result struct 'damon_pa_access_chk_result' struct contains only one field. Use a variable instead. Link: https://lkml.kernel.org/r/20230109213335.62525-7-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton commit 397b0c3a584b4176b4956b519ea3f1402d61fc4e Author: SeongJae Park Date: Mon Jan 9 21:33:34 2023 +0000 mm/damon/paddr: remove folio_sz field from damon_pa_access_chk_result DAMON physical address space monitoring operations set gets and saves size of the folio for a given physical address inside rmap walks, but it can be directly caluclated outside of the walks. Remove the 'folio_sz' field from 'damon_pa_access_chk_result struct' and calculate the size directly from outside of the walks. Link: https://lkml.kernel.org/r/20230109213335.62525-6-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton commit af40e35a992ff5691166badd52a4fa2f940c2cea Author: SeongJae Park Date: Mon Jan 9 21:33:33 2023 +0000 mm/damon/paddr: rename 'damon_pa_access_chk_result->page_sz' to 'folio_sz' DAMON's physical address space monitoring operations set is using folio now. Rename 'damon_pa_access_chk_result->page_sz' to reflect the fact. Link: https://lkml.kernel.org/r/20230109213335.62525-5-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton commit 7477d7560cb2c756d6a8ab165d9ed52537df54e7 Author: SeongJae Park Date: Mon Jan 9 21:33:32 2023 +0000 mm/damon/vaddr: record appropriate folio size when the access is not found DAMON virtual address spaces monitoring operations set doesn't set folio size of the access checked address if access is not found. It could result in unnecessary and inefficient repeated check. Appropriately set the size regardless of access check result. Link: https://lkml.kernel.org/r/20230109213335.62525-4-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton commit 18fd73dbe5c39707b51552d622235e5c41e3d869 Author: SeongJae Park Date: Mon Jan 9 21:33:31 2023 +0000 mm/damon/vaddr: support folio of neither HPAGE_PMD_SIZE nor PAGE_SIZE DAMON virtual address space monitoring operations set treats folios having non-HPAGE_PMD_SIZE size as having PAGE_SIZE size. Use the exact size of the folio. Link: https://lkml.kernel.org/r/20230109213335.62525-3-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton commit fc8c7d2380ab7d6aa1ddef1f69169ef9a15596eb Author: SeongJae Park Date: Mon Jan 9 21:33:30 2023 +0000 mm/damon/vaddr: rename 'damon_young_walk_private->page_sz' to 'folio_sz' Patch series "mm/damon/{v,p}addr: misc fixups for folio usage". DAMON's monitoring operations set for the virtual and the physical address spaces use folio now, but some code is not reflecting the fact. Further cleanup the code for folio usage. This patch (of 6): DAMON's virtual address space monitoring operations set is using folio now. Rename 'damon_pa_access_chk_result->page_sz' to reflect the fact. Link: https://lkml.kernel.org/r/20230109213335.62525-1-sj@kernel.org Link: https://lkml.kernel.org/r/20230109213335.62525-2-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton commit 61d3d5108eb621d2a097c41f6cc83bf63b1b6c03 Author: Greg Kroah-Hartman Date: Fri Jan 6 14:59:00 2023 +0100 mm: remove PageMovable export The only in-kernel users that need PageMovable() to be exported are z3fold and zsmalloc and they are only using it for dubious debugging functionality. So remove those usages and the export so that no driver code accidentally thinks that they are allowed to use this symbol. Link: https://lkml.kernel.org/r/20230106135900.3763622-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman Reviewed-by: Sergey Senozhatsky Reviewed-by: Miaohe Lin Reviewed-by: David Hildenbrand Reviewed-by: Christoph Hellwig Acked-by: Minchan Kim Cc: Vitaly Wool Signed-off-by: Andrew Morton commit 02d65d6fb1aae151570c8bfd1bd77a8153d2e607 Author: Sidhartha Kumar Date: Fri Jan 6 15:52:51 2023 -0600 mm: introduce folio_is_pfmemalloc Add a folio equivalent for page_is_pfmemalloc. This removes two instances of page_is_pfmemalloc(folio_page(folio, 0)) so the folio can be used directly. Link: https://lkml.kernel.org/r/20230106215251.599222-1-sidhartha.kumar@oracle.com Suggested-by: Matthew Wilcox Signed-off-by: Sidhartha Kumar Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: SeongJae Park Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton commit 17e810229cb3068b692fa078bd9b3a6527e0866a Author: Yu Zhao Date: Fri Dec 30 14:52:52 2022 -0700 mm: support POSIX_FADV_NOREUSE This patch adds POSIX_FADV_NOREUSE to vma_has_recency() so that the LRU algorithm can ignore access to mapped files marked by this flag. The advantages of POSIX_FADV_NOREUSE are: 1. Unlike MADV_SEQUENTIAL and MADV_RANDOM, it does not alter the default readahead behavior. 2. Unlike MADV_SEQUENTIAL and MADV_RANDOM, it does not split VMAs and therefore does not take mmap_lock. 3. Unlike MADV_COLD, setting it has a negligible cost, regardless of how many pages it affects. Its limitations are: 1. Like POSIX_FADV_RANDOM and POSIX_FADV_SEQUENTIAL, it currently does not support range. IOW, its scope is the entire file. 2. It currently does not ignore access through file descriptors. Specifically, for the active/inactive LRU, given a file page shared by two users and one of them having set POSIX_FADV_NOREUSE on the file, this page will be activated upon the second user accessing it. This corner case can be covered by checking POSIX_FADV_NOREUSE before calling folio_mark_accessed() on the read path. But it is considered not worth the effort. There have been a few attempts to support POSIX_FADV_NOREUSE, e.g., [1]. This time the goal is to fill a niche: a few desktop applications, e.g., large file transferring and video encoding/decoding, want fast file streaming with mmap() rather than direct IO. Among those applications, an SVT-AV1 regression was reported when running with MGLRU [2]. The following test can reproduce that regression. kb=$(awk '/MemTotal/ { print $2 }' /proc/meminfo) kb=$((kb - 8*1024*1024)) modprobe brd rd_nr=1 rd_size=$kb dd if=/dev/zero of=/dev/ram0 bs=1M mkfs.ext4 /dev/ram0 mount /dev/ram0 /mnt/ swapoff -a fallocate -l 8G /mnt/swapfile mkswap /mnt/swapfile swapon /mnt/swapfile wget http://ultravideo.cs.tut.fi/video/Bosphorus_3840x2160_120fps_420_8bit_YUV_Y4M.7z 7z e -o/mnt/ Bosphorus_3840x2160_120fps_420_8bit_YUV_Y4M.7z SvtAv1EncApp --preset 12 -w 3840 -h 2160 \ -i /mnt/Bosphorus_3840x2160.y4m For MGLRU, the following change showed a [9-11]% increase in FPS, which makes it on par with the active/inactive LRU. patch Source/App/EncApp/EbAppMain.c < #include 35d35 < #include /* _O_BINARY */ 117a118 > posix_fadvise(config->mmap.fd, 0, 0, POSIX_FADV_NOREUSE); EOF [1] https://lore.kernel.org/r/1308923350-7932-1-git-send-email-andrea@betterlinux.com/ [2] https://openbenchmarking.org/result/2209259-PTS-MGLRU8GB57 Link: https://lkml.kernel.org/r/20221230215252.2628425-2-yuzhao@google.com Signed-off-by: Yu Zhao Cc: Alexander Viro Cc: Andrea Righi Cc: Johannes Weiner Cc: Michael Larabel Signed-off-by: Andrew Morton commit 8788f6781486769d9598dcaedc3fe0eb12fc3e59 Author: Yu Zhao Date: Fri Dec 30 14:52:51 2022 -0700 mm: add vma_has_recency() Add vma_has_recency() to indicate whether a VMA may exhibit temporal locality that the LRU algorithm relies on. This function returns false for VMAs marked by VM_SEQ_READ or VM_RAND_READ. While the former flag indicates linear access, i.e., a special case of spatial locality, both flags indicate a lack of temporal locality, i.e., the reuse of an area within a relatively small duration. "Recency" is chosen over "locality" to avoid confusion between temporal and spatial localities. Before this patch, the active/inactive LRU only ignored the accessed bit from VMAs marked by VM_SEQ_READ. After this patch, the active/inactive LRU and MGLRU share the same logic: they both ignore the accessed bit if vma_has_recency() returns false. For the active/inactive LRU, the following fio test showed a [6, 8]% increase in IOPS when randomly accessing mapped files under memory pressure. kb=$(awk '/MemTotal/ { print $2 }' /proc/meminfo) kb=$((kb - 8*1024*1024)) modprobe brd rd_nr=1 rd_size=$kb dd if=/dev/zero of=/dev/ram0 bs=1M mkfs.ext4 /dev/ram0 mount /dev/ram0 /mnt/ swapoff -a fio --name=test --directory=/mnt/ --ioengine=mmap --numjobs=8 \ --size=8G --rw=randrw --time_based --runtime=10m \ --group_reporting The discussion that led to this patch is here [1]. Additional test results are available in that thread. [1] https://lore.kernel.org/r/Y31s%2FK8T85jh05wH@google.com/ Link: https://lkml.kernel.org/r/20221230215252.2628425-1-yuzhao@google.com Signed-off-by: Yu Zhao Cc: Alexander Viro Cc: Andrea Righi Cc: Johannes Weiner Cc: Michael Larabel Signed-off-by: Andrew Morton commit 997931ce02b72f15c40e742ee035ce5643ba574f Author: David Hildenbrand Date: Mon Jan 2 17:08:56 2023 +0100 drivers/misc/open-dice: don't touch VM_MAYSHARE A MAP_SHARED mapping always has VM_MAYSHARE set, and writable (VM_MAYWRITE) MAP_SHARED mappings have VM_SHARED set as well. To identify a MAP_SHARED mapping, it's sufficient to look at VM_MAYSHARE. We cannot have VM_MAYSHARE|VM_WRITE mappings without having VM_SHARED set. Consequently, current code will never actually end up clearing VM_MAYSHARE and that code is confusing, because nobody is supposed to mess with VM_MAYWRITE. Let's clean it up and restructure the code. No functional change intended. Link: https://lkml.kernel.org/r/20230102160856.500584-4-david@redhat.com Signed-off-by: David Hildenbrand Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Jens Axboe Cc: Nicolas Pitre Cc: Pavel Begunkov Signed-off-by: Andrew Morton commit b6b7a8faf05c709cd9f63d3b7d9c66bd91bc3b0d Author: David Hildenbrand Date: Mon Jan 2 17:08:55 2023 +0100 mm/nommu: don't use VM_MAYSHARE for MAP_PRIVATE mappings Let's stop using VM_MAYSHARE for MAP_PRIVATE mappings and use VM_MAYOVERLAY instead. Rewrite determine_vm_flags() to make the whole logic easier to digest, and to cleanly separate MAP_PRIVATE vs. MAP_SHARED. No functional change intended. Link: https://lkml.kernel.org/r/20230102160856.500584-3-david@redhat.com Signed-off-by: David Hildenbrand Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Jens Axboe Cc: Nicolas Pitre Cc: Pavel Begunkov Signed-off-by: Andrew Morton commit fc4f4be9b5271e43eeb4c675d190fa9734de9ea3 Author: David Hildenbrand Date: Mon Jan 2 17:08:54 2023 +0100 mm/nommu: factor out check for NOMMU shared mappings into is_nommu_shared_mapping() Patch series "mm/nommu: don't use VM_MAYSHARE for MAP_PRIVATE mappings". Trying to reduce the confusion around VM_SHARED and VM_MAYSHARE first requires !CONFIG_MMU to stop using VM_MAYSHARE for MAP_PRIVATE mappings. CONFIG_MMU only sets VM_MAYSHARE for MAP_SHARED mappings. This paves the way for further VM_MAYSHARE and VM_SHARED cleanups: for example, renaming VM_MAYSHARED to VM_MAP_SHARED to make it cleaner what is actually means. Let's first get the weird case out of the way and not use VM_MAYSHARE in MAP_PRIVATE mappings, using a new VM_MAYOVERLAY flag instead. This patch (of 3): We want to stop using VM_MAYSHARE in private mappings to pave the way for clarifying the semantics of VM_MAYSHARE vs. VM_SHARED and reduce the confusion. While CONFIG_MMU uses VM_MAYSHARE to represent MAP_SHARED, !CONFIG_MMU also sets VM_MAYSHARE for selected R/O private file mappings that are an effective overlay of a file mapping. Let's factor out all relevant VM_MAYSHARE checks in !CONFIG_MMU code into is_nommu_shared_mapping() first. Note that whenever VM_SHARED is set, VM_MAYSHARE must be set as well (unless there is a serious BUG). So there is not need to test for VM_SHARED manually. No functional change intended. Link: https://lkml.kernel.org/r/20230102160856.500584-1-david@redhat.com Link: https://lkml.kernel.org/r/20230102160856.500584-2-david@redhat.com Signed-off-by: David Hildenbrand Cc: Arnd Bergmann Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: Jens Axboe Cc: Nicolas Pitre Cc: Pavel Begunkov Signed-off-by: Andrew Morton commit da0618c146ca0e1412173a8a229dd737a73b1a4f Author: Lorenzo Stoakes Date: Mon Jan 2 16:11:26 2023 +0000 selftest/vm: add mremap expand merge offset test Add a test to assert that we can mremap() and expand a mapping starting from an offset within an existing mapping. We unmap the last page in a 3 page mapping to ensure that the remap should always succeed, before remapping from the 2nd page. This is additionally a regression test for the issue solved in "mm, mremap: fix mremap() expanding vma with addr inside vma" and confirmed to fail prior to the change and pass after it. Finally, this patch updates the existing mremap expand merge test to check error conditions and reduce code duplication between the two tests. [lstoakes@gmail.com: increment num_expand_tests so test doesn't complain about unexpected tests being run] Link: https://lkml.kernel.org/r/8ff3ba3cadc0b6c1b2688ae5c851bf73aa062d57.1673701836.git.lstoakes@gmail.com Link: https://lkml.kernel.org/r/02b117a8ffd52acc01dc66c2fb39754f08d92c0e.1672675824.git.lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Acked-by: David Hildenbrand Cc: Jakub Matěna Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Shuah Khan Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit df32de1433412621b92daf1b3369ac053214031e Author: Sergey Senozhatsky Date: Tue Jan 3 12:01:19 2023 +0900 zram: correctly handle all next_arg() cases When supplied buffer does not have assignment sign next_arg() sets `val` pointer to NULL, so we cannot dereference it. Add a NULL pointer test to handle `param` case, in addition to `*val` test, which handles cases when param has no value assigned to it: `param=`. Link: https://lkml.kernel.org/r/20230103030119.1496358-1-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Cc: Minchan Kim Signed-off-by: Andrew Morton commit 4b89a37d54a0b5ed6b2e5a9afc44a15a22e563f5 Author: Jan Kara Date: Tue Jan 3 11:44:30 2023 +0100 fs: don't allocate blocks beyond EOF from __mpage_writepage When __mpage_writepage() is called for a page beyond EOF, it will go and allocate all blocks underlying the page. This is not only unnecessary but this way blocks can get leaked (e.g. if a page beyond EOF is marked dirty but in the end write fails and i_size is not extended). Link: https://lkml.kernel.org/r/20230103104430.27749-1-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox Cc: Al Viro Signed-off-by: Andrew Morton commit 6c364edc194e104566f4de72f7a2af5b8fc17110 Author: SeongJae Park Date: Tue Jan 3 18:07:54 2023 +0000 Docs/admin-guide/mm/numaperf: increase depth of subsections Each section of numaperf.rst has zero depth, and therefore be exposed to the index of admin-guide/mm. Especially 'See Also' section on the index makes the document weird. Hide the sections from the index by giving the document a title and increasing the depth of each section. [sj@kernel.org: change title to fix duplicate label warning] Link: https://lkml.kernel.org/r/20230106194927.152663-1-sj@kernel.org Link: https://lkml.kernel.org/r/20230103180754.129637-6-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit baa489fabd01596d5426d6e112b34ba5fb59ab82 Author: SeongJae Park Date: Tue Jan 3 18:07:53 2023 +0000 selftests/vm: rename selftests/vm to selftests/mm Rename selftets/vm to selftests/mm for being more consistent with the code, documentation, and tools directories, and won't be confused with virtual machines. [sj@kernel.org: convert missing vm->mm changes] Link: https://lkml.kernel.org/r/20230107230643.252273-1-sj@kernel.org Link: https://lkml.kernel.org/r/20230103180754.129637-5-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 799fb82aa132fa3a3886b7872997a5a84e820062 Author: SeongJae Park Date: Tue Jan 3 18:07:52 2023 +0000 tools/vm: rename tools/vm to tools/mm Rename tools/vm to tools/mm for being more consistent with the code and documentation directories, and won't be confused with virtual machines. Link: https://lkml.kernel.org/r/20230103180754.129637-4-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 060deca404ba7c2f499fcee793956c502c60e193 Author: SeongJae Park Date: Tue Jan 3 18:07:51 2023 +0000 MAINTAINERS/MEMORY MANAGEMENT: add tools/vm/ as managed files 'tools/vm/' directory should be a part of memory management subsystem, but MAINTAINERS file doesn't mark the directory so. Add one more 'F:' entry for the directory to 'MEMORY MANAGEMENT' section. Link: https://lkml.kernel.org/r/20230103180754.129637-3-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 183986209935b51d50de819eeae512a155be3568 Author: SeongJae Park Date: Tue Jan 3 18:07:50 2023 +0000 MAINTAINERS: add types to akpm/mm git trees entries Patch series "mm: trivial fixups". This patchset is for trivial fixups of mm stuff on MAINTAINERS, tools/ selftests, and docs. This patch (of 5): Each SCM tree entry of MAINTAINERS file should have both type and location, but akpm/mm git tree entries of 'MEMORY MANAGEMENT' and 'VMALLOC' sections of the file don't have the type. Add the type. Link: https://lkml.kernel.org/r/20230103180754.129637-2-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit e9adcfecf572fcfaa9f8525904cf49c709974f73 Author: Mike Kravetz Date: Tue Jan 3 16:27:32 2023 -0800 mm: remove zap_page_range and create zap_vma_pages zap_page_range was originally designed to unmap pages within an address range that could span multiple vmas. While working on [1], it was discovered that all callers of zap_page_range pass a range entirely within a single vma. In addition, the mmu notification call within zap_page range does not correctly handle ranges that span multiple vmas. When crossing a vma boundary, a new mmu_notifier_range_init/end call pair with the new vma should be made. Instead of fixing zap_page_range, do the following: - Create a new routine zap_vma_pages() that will remove all pages within the passed vma. Most users of zap_page_range pass the entire vma and can use this new routine. - For callers of zap_page_range not passing the entire vma, instead call zap_page_range_single(). - Remove zap_page_range. [1] https://lore.kernel.org/linux-mm/20221114235507.294320-2-mike.kravetz@oracle.com/ Link: https://lkml.kernel.org/r/20230104002732.232573-1-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Suggested-by: Peter Xu Acked-by: Michal Hocko Acked-by: Peter Xu Acked-by: Heiko Carstens [s390] Reviewed-by: Christoph Hellwig Cc: Christian Borntraeger Cc: Christian Brauner Cc: Dave Hansen Cc: David Hildenbrand Cc: Eric Dumazet Cc: Matthew Wilcox Cc: Michael Ellerman Cc: Nadav Amit Cc: Palmer Dabbelt Cc: Rik van Riel Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton commit bbc61844b4645d54c147a82654ac974bb7be85de Author: Feng Tang Date: Wed Jan 4 14:06:05 2023 +0800 mm/kasan: simplify and refine kasan_cache code struct 'kasan_cache' has a member 'is_kmalloc' indicating whether its host kmem_cache is a kmalloc cache. With newly introduced is_kmalloc_cache() helper, 'is_kmalloc' and its related function can be replaced and removed. Also 'kasan_cache' is only needed by KASAN generic mode, and not by SW/HW tag modes, so refine its protection macro accordingly, suggested by Andrey Konoval. Link: https://lkml.kernel.org/r/20230104060605.930910-2-feng.tang@intel.com Signed-off-by: Feng Tang Reviewed-by: Andrey Konovalov Acked-by: Vlastimil Babka Acked-by: David Rientjes Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Christoph Lameter Cc: Dmitry Vyukov Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Pekka Enberg Cc: Roman Gushchin Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit bb94429096d090f5e209624d08919a7962d6c4b7 Author: Feng Tang Date: Wed Jan 4 14:06:04 2023 +0800 mm/slab: add is_kmalloc_cache() helper function commit 6edf2576a6cc ("mm/slub: enable debugging memory wasting of kmalloc") introduces 'SLAB_KMALLOC' bit specifying whether a kmem_cache is a kmalloc cache for slab/slub (slob doesn't have dedicated kmalloc caches). Add a helper inline function for other components like kasan to simplify code. Link: https://lkml.kernel.org/r/20230104060605.930910-1-feng.tang@intel.com Signed-off-by: Feng Tang Acked-by: Vlastimil Babka Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: David Rientjes Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Christoph Lameter Cc: Dmitry Vyukov Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Pekka Enberg Cc: Roman Gushchin Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit dee2ad120571f38433211098cd6b95a59bdfc8c7 Author: David Hildenbrand Date: Wed Jan 4 15:49:05 2023 +0100 selftests/vm: cow: add COW tests for collapsing of PTE-mapped anon THP Currently, anonymous PTE-mapped THPs cannot be collapsed in-place: collapsing (e.g., via MADV_COLLAPSE) implies allocating a fresh THP and mapping that new THP via a PMD: as it's a fresh anon THP, it will get the exclusive flag set on the head page and everybody is happy. However, if the kernel would ever support in-place collapse of anonymous THPs (replacing a page table mapping each sub-page of a THP via PTEs with a single PMD mapping the complete THP), exclusivity information stored for each sub-page would have to be collapsed accordingly: (1) All PTEs map !exclusive anon sub-pages: the in-place collapsed THP must not not have the exclusive flag set on the head page mapped by the PMD. This is the easiest case to handle ("simply don't set any exclusive flags"). (2) All PTEs map exclusive anon sub-pages: when collapsing, we have to clear the exclusive flag from all tail pages and only leave the exclusive flag set for the head page. Otherwise, fork() after collapse would not clear the exclusive flags from the tail pages and we'd be in trouble once PTE-mapping the shared THP when writing to shared tail pages that still have the exclusive flag set. This would effectively revert what the PTE-mapping code does when propagating the exclusive flag to all sub-pages. (3) PTEs map a mixture of exclusive and !exclusive anon sub-pages (can happen e.g., due to MADV_DONTFORK before fork()). We must not collapse the THP in-place, otherwise bad things may happen: the exclusive flags of sub-pages would get ignored and the exclusive flag of the head page would get used instead. Now that we have MADV_COLLAPSE in place to trigger collapsing a THP, let's add some test cases that would bail out early, if we'd voluntarily/accidantially unlock in-place collapse for anon THPs and forget about taking proper care of exclusive flags. Running the test on a kernel with MADV_COLLAPSE support: # [INFO] Anonymous THP tests # [RUN] Basic COW after fork() when collapsing before fork() ok 169 No leak from parent into child # [RUN] Basic COW after fork() when collapsing after fork() (fully shared) ok 170 # SKIP MADV_COLLAPSE failed: Invalid argument # [RUN] Basic COW after fork() when collapsing after fork() (lower shared) ok 171 No leak from parent into child # [RUN] Basic COW after fork() when collapsing after fork() (upper shared) ok 172 No leak from parent into child For now, MADV_COLLAPSE always seems to fail if all PTEs map shared sub-pages. Link: https://lkml.kernel.org/r/20230104144905.460075-1-david@redhat.com Signed-off-by: David Hildenbrand Cc: Shuah Khan Cc: Hugh Dickins Cc: Peter Xu Cc: Vlastimil Babka Cc: Nadav Amit Cc: Zach O'Keefe Cc: Andrea Arcangeli Signed-off-by: Andrew Morton commit 1f8549fce525bc95df40ea3ddbfc6e8e719d188d Author: Fabio M. De Francesco Date: Thu Jan 5 13:13:05 2023 +0100 mm: fix spelling mistake in highmem.h Substitute "higmem" with "highmem" in highmem.h. Link: https://lkml.kernel.org/r/20230105121305.30714-1-fmdefrancesco@gmail.com Signed-off-by: Fabio M. De Francesco Suggested-by: "Matthew Wilcox (Oracle)" Reviewed-by: Ira Weiny Signed-off-by: Andrew Morton commit 9eefefd835e451d340f5e95bc14ffd68b9b99268 Author: Fabio M. De Francesco Date: Thu Jan 5 13:04:24 2023 +0100 mm: remove an ambiguous sentence from kmap_local_folio() kdocs In the kdocs of kmap_local_folio() there is a an ambiguous sentence which suggests to use this API "only when really necessary". On the contrary, since kmap() and kmap_atomic() are deprecated, both kmap_local_folio(), as well as kmap_local_page(), must be preferred to the previous ones. Therefore, remove the above-mentioned sentence exactly how it has previously been done for the kmap_local_page() kdocs in commit 72f1c55adf70 ("highmem: delete a sentence from kmap_local_page() kdocs"). Link: https://lkml.kernel.org/r/20230105120424.30055-1-fmdefrancesco@gmail.com Signed-off-by: Fabio M. De Francesco Reviewed-by: Ira Weiny Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 541e06b772c1aaffb3b6a245ccface36d7107af2 Author: Liam Howlett Date: Thu Jan 5 16:05:34 2023 +0000 maple_tree: remove GFP_ZERO from kmem_cache_alloc() and kmem_cache_alloc_bulk() Preallocations are common in the VMA code to avoid allocating under certain locking conditions. The preallocations must also cover the worst-case scenario. Removing the GFP_ZERO flag from the kmem_cache_alloc() (and bulk variant) calls will reduce the amount of time spent zeroing memory that may not be used. Only zero out the necessary area to keep track of the allocations in the maple state. Zero the entire node prior to using it in the tree. This required internal changes to node counting on allocation, so the test code is also updated. This restores some micro-benchmark performance: up to +9% in mmtests mmap1 by my testing +10% to +20% in mmap, mmapaddr, mmapmany tests reported by Red Hat Link: https://bugzilla.redhat.com/show_bug.cgi?id=2149636 Link: https://lkml.kernel.org/r/20230105160427.2988454-1-Liam.Howlett@oracle.com Signed-off-by: Liam Howlett Reported-by: Jirka Hladky Suggested-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit fc5744881eabcc73ed24a4229034f0fbdeb3f46f Author: Mike Rapoport (IBM) Date: Wed Jan 4 21:18:05 2023 +0200 mm/page_alloc: invert logic for early page initialisation checks Rename early_page_uninitialised() to early_page_initialised() and invert its logic to make the code more readable. Link: https://lkml.kernel.org/r/20230104191805.2535864-1-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Reviewed-by: David Hildenbrand Reviewed-by: Anshuman Khandual Acked-by: Mel Gorman Signed-off-by: Andrew Morton commit f78dfc7b77d5c3527d0f895bef693f711802de5a Author: Johannes Weiner Date: Wed Jan 4 14:29:44 2023 -0800 workingset: fix confusion around eviction vs refault container Refault decisions are made based on the lruvec where the page was evicted, as that determined its LRU order while it was alive. Stats and workingset aging must then occur on the lruvec of the new page, as that's the node and cgroup that experience the refault and that's the lruvec whose nonresident info ages out by a new resident page. Those lruvecs could be different when a page is shared between cgroups, or the refaulting page is allocated on a different node. There are currently two mix-ups: 1. When swap is available, the resident anon set must be considered when comparing the refault distance. The comparison is made against the right anon set, but the check for swap is not. When pages get evicted from a cgroup with swap, and refault in one without, this can incorrectly consider a hot refault as cold - and vice versa. Fix that by using the eviction cgroup for the swap check. 2. The stats and workingset age are updated against the wrong lruvec altogether: the right cgroup but the wrong NUMA node. When a page refaults on a different NUMA node, this will have confusing stats and distort the workingset age on a different lruvec - again possibly resulting in hot/cold misclassifications down the line. Fix the swap check and the refault pgdat to address both concerns. This was found during code review. It hasn't caused notable issues in production, suggesting that those refault-migrations are relatively rare in practice. Link: https://lkml.kernel.org/r/20230104222944.2380117-1-nphamcs@gmail.com Signed-off-by: Johannes Weiner Co-developed-by: Nhat Pham Signed-off-by: Nhat Pham Signed-off-by: Andrew Morton commit d1751118c88673fe5a948ad82277898e9e284c55 Author: Peter Xu Date: Wed Jan 4 17:52:07 2023 -0500 mm/uffd: detect pgtable allocation failures Before this patch, when there's any pgtable allocation issues happened during change_protection(), the error will be ignored from the syscall. For shmem, there will be an error dumped into the host dmesg. Two issues with that: (1) Doing a trace dump when allocation fails is not anything close to grace. (2) The user should be notified with any kind of such error, so the user can trap it and decide what to do next, either by retrying, or stop the process properly, or anything else. For userfault users, this will change the API of UFFDIO_WRITEPROTECT when pgtable allocation failure happened. It should not normally break anyone, though. If it breaks, then in good ways. One man-page update will be on the way to introduce the new -ENOMEM for UFFDIO_WRITEPROTECT. Not marking stable so we keep the old behavior on the 5.19-till-now kernels. [akpm@linux-foundation.org: coding-style cleanups] Link: https://lkml.kernel.org/r/20230104225207.1066932-4-peterx@redhat.com Signed-off-by: Peter Xu Reported-by: James Houghton Acked-by: James Houghton Cc: Andrea Arcangeli Cc: Axel Rasmussen Cc: David Hildenbrand Cc: Mike Kravetz Cc: Muchun Song Cc: Nadav Amit Signed-off-by: Andrew Morton commit a79390f5d6a78647fd70856bd42b22d994de0ba2 Author: Peter Xu Date: Wed Jan 4 17:52:06 2023 -0500 mm/mprotect: use long for page accountings and retval Switch to use type "long" for page accountings and retval across the whole procedure of change_protection(). The change should have shrinked the possible maximum page number to be half comparing to previous (ULONG_MAX / 2), but it shouldn't overflow on any system either because the maximum possible pages touched by change protection should be ULONG_MAX / PAGE_SIZE. Two reasons to switch from "unsigned long" to "long": 1. It suites better on count_vm_numa_events(), whose 2nd parameter takes a long type. 2. It paves way for returning negative (error) values in the future. Currently the only caller that consumes this retval is change_prot_numa(), where the unsigned long was converted to an int. Since at it, touching up the numa code to also take a long, so it'll avoid any possible overflow too during the int-size convertion. Link: https://lkml.kernel.org/r/20230104225207.1066932-3-peterx@redhat.com Signed-off-by: Peter Xu Acked-by: Mike Kravetz Acked-by: James Houghton Cc: Andrea Arcangeli Cc: Axel Rasmussen Cc: David Hildenbrand Cc: Muchun Song Cc: Nadav Amit Signed-off-by: Andrew Morton commit 6b7cea90c82e104c1151fec1f3ee216997fda652 Author: Kefeng Wang Date: Fri Dec 30 15:08:49 2022 +0800 mm/damon/vaddr: convert hugetlb related functions to use a folio Convert damon_hugetlb_mkold() and damon_young_hugetlb_entry() to use a folio. Link: https://lkml.kernel.org/r/20221230070849.63358-9-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: SeongJae Park Cc: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit 7824debb3d029e6a6252137fd10f3553cc8de22a Author: Kefeng Wang Date: Fri Dec 30 15:08:48 2022 +0800 mm/damon: remove unneeded damon_get_page() After all damon_get_page() callers are converted to damon_get_folio(), remove unneeded wrapper damon_get_page(). Link: https://lkml.kernel.org/r/20221230070849.63358-8-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: SeongJae Park Cc: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit dc1b78665b37ec50fc142a7f1a8fa4f626cd6a58 Author: Kefeng Wang Date: Fri Dec 30 15:08:47 2022 +0800 mm/damon/vaddr: convert damon_young_pmd_entry() to use a folio With damon_get_folio(), let's convert damon_young_pmd_entry() to use a folio. Link: https://lkml.kernel.org/r/20221230070849.63358-7-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: SeongJae Park Cc: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit 07bb1fbaa2bbd2a387bcc1171d8aee1a96178b45 Author: Kefeng Wang Date: Fri Dec 30 15:08:46 2022 +0800 mm/damon/paddr: convert damon_pa_*() to use a folio With damon_get_folio(), let's convert all the damon_pa_*() to use a folio. Link: https://lkml.kernel.org/r/20221230070849.63358-6-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: SeongJae Park Cc: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit 70e314c9ab4faf810fc088503a37fb3b126d09e2 Author: Kefeng Wang Date: Fri Dec 30 15:08:45 2022 +0800 mm/damon: convert damon_ptep/pmdp_mkold() to use a folio With damon_get_folio(), let's convert damon_ptep_mkold() and damon_pmdp_mkold() to use a folio. Link: https://lkml.kernel.org/r/20221230070849.63358-5-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: SeongJae Park Cc: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit 5e012bba019afa6aca74df19751783a47d16ebf7 Author: Kefeng Wang Date: Fri Dec 30 15:08:44 2022 +0800 mm/damon: introduce damon_get_folio() Introduce damon_get_folio(), and the temporary wrapper function damon_get_page(), which help us to convert damon related functions to use folios, and it will be dropped once the conversion is completed. Link: https://lkml.kernel.org/r/20221230070849.63358-4-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: SeongJae Park Cc: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit 5acc17fd35e62780a14e4198deb2a6d1d57aa372 Author: Kefeng Wang Date: Fri Dec 30 15:08:43 2022 +0800 mm: page_idle: convert page idle to use a folio Firstly, make page_idle_get_page() return a folio, also rename it to page_idle_get_folio(), then, use it to convert page_idle_bitmap_read() and page_idle_bitmap_write() functions. Link: https://lkml.kernel.org/r/20221230070849.63358-3-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: SeongJae Park Cc: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit becacb04fdd439d7d1f2a93739161706a2e3e947 Author: Matthew Wilcox Date: Fri Dec 30 15:08:42 2022 +0800 mm: memcg: add folio_memcg_check() Patch series "mm: convert page_idle/damon to use folios", v4. This patch (of 8): Convert page_memcg_check() into folio_memcg_check() and add a page_memcg_check() wrapper. The behaviour of page_memcg_check() is unchanged; tail pages always had a NULL ->memcg_data. Link: https://lkml.kernel.org/r/20221230070849.63358-1-wangkefeng.wang@huawei.com Link: https://lkml.kernel.org/r/20221230070849.63358-2-wangkefeng.wang@huawei.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Kefeng Wang Cc: David Hildenbrand Cc: SeongJae Park Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit 071acb3084c5e04db3ff09865e4030aefaa2ab92 Author: JeongHyeon Lee Date: Fri Dec 23 13:03:31 2022 +0900 zram: fix typos in comments - The double `range` is duplicated in comment, remove one. - change `syfs` to `sysfs` Link: https://lkml.kernel.org/r/20221223040331.4194-1-jhs2.lee@samsung.com Signed-off-by: JeongHyeon Lee Reviewed-by: Sergey Senozhatsky Signed-off-by: Andrew Morton commit 630e7c5ee3399be509447035428994e2d88f12c1 Author: Kefeng Wang Date: Thu Dec 29 20:25:03 2022 +0800 mm: huge_memory: convert split_huge_pages_all() to use a folio Straightforwardly convert split_huge_pages_all() to use a folio. Link: https://lkml.kernel.org/r/20221229122503.149083-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Mike Kravetz Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit c2ca7a59a4199059556b57cfdf98fcf46039ca6b Author: Christoph Hellwig Date: Thu Dec 29 06:10:31 2022 -1000 mm: remove generic_writepages Now that all external callers are gone, just fold it into do_writepages. Link: https://lkml.kernel.org/r/20221229161031.391878-7-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Cc: Joel Becker Cc: Joseph Qi Cc: Konstantin Komarov Cc: Mark Fasheh Cc: Matthew Wilcox Cc: Theodore Ts'o Signed-off-by: Andrew Morton commit 17c30ee6f2670804148f23b19b5de8308a02bd2c Author: Christoph Hellwig Date: Thu Dec 29 06:10:30 2022 -1000 ocfs2: use filemap_fdatawrite_wbc instead of generic_writepages filemap_fdatawrite_wbc is a fairly thing wrapper around do_writepages, and the big difference there is support for cgroup writeback, which is not supported by ocfs2, and the potential to use ->writepages instead of ->writepage, which ocfs2 does not currently implement but eventually should. Link: https://lkml.kernel.org/r/20221229161031.391878-6-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Cc: Joel Becker Cc: Joseph Qi Cc: Konstantin Komarov Cc: Mark Fasheh Cc: Matthew Wilcox Cc: Theodore Ts'o Signed-off-by: Andrew Morton commit cff61bbc717bfddd6e433fe142b8e70b21546a1d Author: Christoph Hellwig Date: Thu Dec 29 06:10:29 2022 -1000 jbd2,ocfs2: move jbd2_journal_submit_inode_data_buffers to ocfs2 jbd2_journal_submit_inode_data_buffers is only used by ocfs2, so move it there to prepare for removing generic_writepages. Link: https://lkml.kernel.org/r/20221229161031.391878-5-hch@lst.de Signed-off-by: Christoph Hellwig Cc: Jan Kara Cc: Joel Becker Cc: Joseph Qi Cc: Konstantin Komarov Cc: Mark Fasheh Cc: Matthew Wilcox Cc: Theodore Ts'o Signed-off-by: Andrew Morton commit 25a89826f270ddbf76dca7d64e4f8a8dccda3d1e Author: Christoph Hellwig Date: Thu Dec 29 06:10:28 2022 -1000 ntfs3: remove ->writepage ->writepage is a very inefficient method to write back data, and only used through write_cache_pages or a a fallback when no ->migrate_folio method is present. Set ->migrate_folio to the generic buffer_head based helper, and remove the ->writepage implementation. Link: https://lkml.kernel.org/r/20221229161031.391878-4-hch@lst.de Signed-off-by: Christoph Hellwig Cc: Jan Kara Cc: Joel Becker Cc: Joseph Qi Cc: Konstantin Komarov Cc: Mark Fasheh Cc: Matthew Wilcox Cc: Theodore Ts'o Signed-off-by: Andrew Morton commit d4428bad14dd1509d7a1176dba69a01d67c0b86d Author: Christoph Hellwig Date: Thu Dec 29 06:10:27 2022 -1000 ntfs3: stop using generic_writepages Open code the resident inode handling in ntfs_writepages by directly using write_cache_pages to prepare removing the ->writepage handler in ntfs3. Link: https://lkml.kernel.org/r/20221229161031.391878-3-hch@lst.de Signed-off-by: Christoph Hellwig Cc: Jan Kara Cc: Joel Becker Cc: Joseph Qi Cc: Konstantin Komarov Cc: Mark Fasheh Cc: Matthew Wilcox Cc: Theodore Ts'o Signed-off-by: Andrew Morton commit 5b68de67037168f826d6fe434d03b5876aec4cb6 Author: Christoph Hellwig Date: Thu Dec 29 06:10:26 2022 -1000 fs: remove an outdated comment on mpage_writepages Patch series "remove generic_writepages" This series removes generic_writepages by open coding the current functionality in the three remaining callers. Besides removing some code the main benefit is that one of the few remaining ->writepage callers from outside the core page cache code go away. This patch (of 6): mpage_writepages doesn't do any of the page locking itself, so remove and outdated comment on the locking pattern there. Link: https://lkml.kernel.org/r/20221229161031.391878-1-hch@lst.de Link: https://lkml.kernel.org/r/20221229161031.391878-2-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Cc: Joel Becker Cc: Joseph Qi Cc: Konstantin Komarov Cc: Mark Fasheh Cc: Matthew Wilcox Cc: Theodore Ts'o Signed-off-by: Andrew Morton commit 81e506bec9be1eceaf5a2c654e28ba5176ef48d8 Author: Yin Fengwei Date: Fri Dec 23 21:52:07 2022 +0800 mm/thp: check and bail out if page in deferred queue already Kernel build regression with LLVM was reported here: https://lore.kernel.org/all/Y1GCYXGtEVZbcv%2F5@dev-arch.thelio-3990X/ with commit f35b5d7d676e ("mm: align larger anonymous mappings on THP boundaries"). And the commit f35b5d7d676e was reverted. It turned out the regression is related with madvise(MADV_DONTNEED) was used by ld.lld. But with none PMD_SIZE aligned parameter len. trace-bpfcc captured: 531607 531732 ld.lld do_madvise.part.0 start: 0x7feca9000000, len: 0x7fb000, behavior: 0x4 531607 531793 ld.lld do_madvise.part.0 start: 0x7fec86a00000, len: 0x7fb000, behavior: 0x4 If the underneath physical page is THP, the madvise(MADV_DONTNEED) can trigger split_queue_lock contention raised significantly. perf showed following data: 14.85% 0.00% ld.lld [kernel.kallsyms] [k] entry_SYSCALL_64_after_hwframe 11.52% entry_SYSCALL_64_after_hwframe do_syscall_64 __x64_sys_madvise do_madvise.part.0 zap_page_range unmap_single_vma unmap_page_range page_remove_rmap deferred_split_huge_page __lock_text_start native_queued_spin_lock_slowpath If THP can't be removed from rmap as whole THP, partial THP will be removed from rmap by removing sub-pages from rmap. Even the THP head page is added to deferred queue already, the split_queue_lock will be acquired and check whether the THP head page is in the queue already. Thus, the contention of split_queue_lock is raised. Before acquire split_queue_lock, check and bail out early if the THP head page is in the queue already. The checking without holding split_queue_lock could race with deferred_split_scan, but it doesn't impact the correctness here. Test result of building kernel with ld.lld: commit 7b5a0b664ebe (parent commit of f35b5d7d676e): time -f "\t%E real,\t%U user,\t%S sys" make LD=ld.lld -skj96 allmodconfig all 6:07.99 real, 26367.77 user, 5063.35 sys commit f35b5d7d676e: time -f "\t%E real,\t%U user,\t%S sys" make LD=ld.lld -skj96 allmodconfig all 7:22.15 real, 26235.03 user, 12504.55 sys commit f35b5d7d676e with the fixing patch: time -f "\t%E real,\t%U user,\t%S sys" make LD=ld.lld -skj96 allmodconfig all 6:08.49 real, 26520.15 user, 5047.91 sys Link: https://lkml.kernel.org/r/20221223135207.2275317-1-fengwei.yin@intel.com Signed-off-by: Yin Fengwei Tested-by: Nathan Chancellor Acked-by: David Rientjes Reviewed-by: "Huang, Ying" Cc: Feng Tang Cc: Matthew Wilcox Cc: Rik van Riel Cc: Xing Zhengjun Cc: Yang Shi Cc: Signed-off-by: Andrew Morton commit 01b5022f0a8a2911bb8f2bc3f0c9b9b2c21c3316 Author: SeongJae Park Date: Wed Dec 28 17:59:42 2022 +0000 mm/page_reporting: replace rcu_access_pointer() with rcu_dereference_protected() Page reporting fetches pr_dev_info using rcu_access_pointer(), which is for safely fetching a pointer that will not be dereferenced but could concurrently updated. The code indeed does not dereference pr_dev_info after fetching it using rcu_access_pointer(), but it fetches the pointer while concurrent updates to the pointer is avoided by holding the update side lock, page_reporting_mutex. In the case, rcu_dereference_protected() should be used instead because it provides better readability and performance on some cases, as rcu_dereference_protected() avoids use of READ_ONCE(). Replace the rcu_access_pointer() calls with rcu_dereference_protected(). Link: https://lkml.kernel.org/r/20221228175942.149491-1-sj@kernel.org Fixes: 36e66c554b5c ("mm: introduce Reported pages") Signed-off-by: SeongJae Park Cc: Alexander Duyck Cc: Matthew Wilcox Cc: Miaohe Lin Signed-off-by: Andrew Morton commit 3783e1721b650588938d28e4a084a1c9748361c8 Author: Kele Huang Date: Sat Dec 24 01:02:33 2022 -0500 mm: fix comment of page table counter Commit af5b0f6a09e42 ("mm: consolidate page table accounting") consolidates page table accounting to a single counter in struct mm_struct {} as mm->pgtables_bytes. So the meanning of this counter should be the size of all page tables now. Link: https://lkml.kernel.org/r/20221224060233.417827-1-kele.huang@columbia.edu Signed-off-by: Kele Huang Cc: Arnd Bergmann Cc: Colin Cross Cc: David Hildenbrand Cc: Hugh Dickins Cc: Liam Howlett Cc: Matthew Wilcox (Oracle) Cc: Pasha Tatashin Cc: Peter Xu Cc: Vlastimil Babka Cc: Yu Zhao Signed-off-by: Andrew Morton commit 1ef488edd6c4d447784710974f049628c2890481 Author: David Hildenbrand Date: Fri Dec 23 16:56:16 2022 +0100 mm/mprotect: drop pgprot_t parameter from change_protection() Being able to provide a custom protection opens the door for inconsistencies and BUGs: for example, accidentally allowing for more permissions than desired by other mechanisms (e.g., softdirty tracking). vma->vm_page_prot should be the single source of truth. Only PROT_NUMA is special: there is no way we can erroneously allow for more permissions when removing all permissions. Special-case using the MM_CP_PROT_NUMA flag. [david@redhat.com: PAGE_NONE might not be defined without CONFIG_NUMA_BALANCING] Link: https://lkml.kernel.org/r/5084ff1c-ebb3-f918-6a60-bacabf550a88@redhat.com Link: https://lkml.kernel.org/r/20221223155616.297723-3-david@redhat.com Signed-off-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Nadav Amit Cc: Peter Xu Signed-off-by: Andrew Morton commit 931298e103c228c4ce6d13e7b5781aeaaff37ac7 Author: David Hildenbrand Date: Fri Dec 23 16:56:15 2022 +0100 mm/userfaultfd: rely on vma->vm_page_prot in uffd_wp_range() Patch series "mm: uffd-wp + change_protection() cleanups". Cleanup page protection handling in uffd-wp when calling change_protection() and improve unprotecting uffd=wp in private mappings, trying to set PTEs writable again if possible just like we do during mprotect() when upgrading write permissions. Make the change_protection() interface harder to get wrong :) I consider both pages primarily cleanups, although patch #1 fixes a corner case with uffd-wp and softdirty tracking for shmem. @Peter, please let me know if we should flag patch #1 as pure cleanup -- I have no idea how important softdirty tracking on shmem is. This patch (of 2): uffd_wp_range() currently calculates page protection manually using vm_get_page_prot(). This will ignore any other reason for active writenotify: one mechanism applicable to shmem is softdirty tracking. For example, the following sequence 1) Write to mapped shmem page 2) Clear softdirty 3) Register uffd-wp covering the mapped page 4) Unregister uffd-wp covering the mapped page 5) Write to page again will not set the modified page softdirty, because uffd_wp_range() will ignore that writenotify is required for softdirty tracking and simply map the page writable again using change_protection(). Similarly, instead of unregistering, protecting followed by un-protecting the page using uffd-wp would result in the same situation. Now that we enable writenotify whenever enabling uffd-wp on a VMA, vma->vm_page_prot will already properly reflect our requirements: the default is to write-protect all PTEs. However, for shared mappings we would now not remap the PTEs writable if possible when unprotecting, just like for private mappings (COW). To compensate, set MM_CP_TRY_CHANGE_WRITABLE just like mprotect() does to try mapping individual PTEs writable. For private mappings, this change implies that we will now always try setting PTEs writable when un-protecting, just like when upgrading write permissions using mprotect(), which is an improvement. For shared mappings, we will only set PTEs writable if can_change_pte_writable()/can_change_pmd_writable() indicates that it's ok. For ordinary shmem, this will be the case when PTEs are dirty, which should usually be the case -- otherwise we could special-case shmem in can_change_pte_writable()/can_change_pmd_writable() easily, because shmem itself doesn't require writenotify. Note that hugetlb does not yet implement MM_CP_TRY_CHANGE_WRITABLE, so we won't try setting PTEs writable when unprotecting or when unregistering uffd-wp. This can be added later on top by implementing MM_CP_TRY_CHANGE_WRITABLE. While commit ffd05793963a ("userfaultfd: wp: support write protection for userfault vma range") introduced that code, it should only be applicable to uffd-wp on shared mappings -- shmem (hugetlb does not support softdirty tracking). I don't think this corner cases justifies to cc stable. Let's just handle it correctly and prepare for change_protection() cleanups. [david@redhat.com: o need for additional harmless checks if we're wr-protecting either way] Link: https://lkml.kernel.org/r/71412742-a71f-9c74-865f-773ad83db7a5@redhat.com Link: https://lkml.kernel.org/r/20221223155616.297723-1-david@redhat.com Link: https://lkml.kernel.org/r/20221223155616.297723-2-david@redhat.com Fixes: b1f9e876862d ("mm/uffd: enable write protection for shmem & hugetlbfs") Signed-off-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Nadav Amit Cc: Peter Xu Signed-off-by: Andrew Morton commit a9af8e6bb3e5de8ea9d29c1d318bcfbc5667c939 Author: Xu Panda Date: Fri Dec 23 10:50:24 2022 +0800 selftests/vm: ksm_functional_tests: fix a typo in comment Fix a typo of "comaring" which should be "comparing". Link: https://lkml.kernel.org/r/202212231050245952617@zte.com.cn Signed-off-by: Xu Panda Signed-off-by: xu xin Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton commit f386e9314025ea99dae639ed2032560a92081430 Author: Yu Zhao Date: Wed Dec 21 21:19:06 2022 -0700 mm: multi-gen LRU: simplify arch_has_hw_pte_young() check Scanning page tables when hardware does not set the accessed bit has no real use cases. Link: https://lkml.kernel.org/r/20221222041905.2431096-9-yuzhao@google.com Signed-off-by: Yu Zhao Cc: Johannes Weiner Cc: Jonathan Corbet Cc: Michael Larabel Cc: Michal Hocko Cc: Mike Rapoport Cc: Roman Gushchin Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit e9d4e1ee788097484606c32122f146d802a9c5fb Author: Yu Zhao Date: Wed Dec 21 21:19:05 2022 -0700 mm: multi-gen LRU: clarify scan_control flags Among the flags in scan_control: 1. sc->may_swap, which indicates swap constraint due to memsw.max, is supported as usual. 2. sc->proactive, which indicates reclaim by memory.reclaim, may not opportunistically skip the aging path, since it is considered less latency sensitive. 3. !(sc->gfp_mask & __GFP_IO), which indicates IO constraint, lowers swappiness to prioritize file LRU, since clean file folios are more likely to exist. 4. sc->may_writepage and sc->may_unmap, which indicates opportunistic reclaim, are rejected, since unmapped clean folios are already prioritized. Scanning for more of them is likely futile and can cause high reclaim latency when there is a large number of memcgs. The rest are handled by the existing code. Link: https://lkml.kernel.org/r/20221222041905.2431096-8-yuzhao@google.com Signed-off-by: Yu Zhao Cc: Johannes Weiner Cc: Jonathan Corbet Cc: Michael Larabel Cc: Michal Hocko Cc: Mike Rapoport Cc: Roman Gushchin Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit e4dde56cd208674ce899b47589f263499e5b8cdc Author: Yu Zhao Date: Wed Dec 21 21:19:04 2022 -0700 mm: multi-gen LRU: per-node lru_gen_folio lists For each node, memcgs are divided into two generations: the old and the young. For each generation, memcgs are randomly sharded into multiple bins to improve scalability. For each bin, an RCU hlist_nulls is virtually divided into three segments: the head, the tail and the default. An onlining memcg is added to the tail of a random bin in the old generation. The eviction starts at the head of a random bin in the old generation. The per-node memcg generation counter, whose reminder (mod 2) indexes the old generation, is incremented when all its bins become empty. There are four operations: 1. MEMCG_LRU_HEAD, which moves an memcg to the head of a random bin in its current generation (old or young) and updates its "seg" to "head"; 2. MEMCG_LRU_TAIL, which moves an memcg to the tail of a random bin in its current generation (old or young) and updates its "seg" to "tail"; 3. MEMCG_LRU_OLD, which moves an memcg to the head of a random bin in the old generation, updates its "gen" to "old" and resets its "seg" to "default"; 4. MEMCG_LRU_YOUNG, which moves an memcg to the tail of a random bin in the young generation, updates its "gen" to "young" and resets its "seg" to "default". The events that trigger the above operations are: 1. Exceeding the soft limit, which triggers MEMCG_LRU_HEAD; 2. The first attempt to reclaim an memcg below low, which triggers MEMCG_LRU_TAIL; 3. The first attempt to reclaim an memcg below reclaimable size threshold, which triggers MEMCG_LRU_TAIL; 4. The second attempt to reclaim an memcg below reclaimable size threshold, which triggers MEMCG_LRU_YOUNG; 5. Attempting to reclaim an memcg below min, which triggers MEMCG_LRU_YOUNG; 6. Finishing the aging on the eviction path, which triggers MEMCG_LRU_YOUNG; 7. Offlining an memcg, which triggers MEMCG_LRU_OLD. Note that memcg LRU only applies to global reclaim, and the round-robin incrementing of their max_seq counters ensures the eventual fairness to all eligible memcgs. For memcg reclaim, it still relies on mem_cgroup_iter(). Link: https://lkml.kernel.org/r/20221222041905.2431096-7-yuzhao@google.com Signed-off-by: Yu Zhao Cc: Johannes Weiner Cc: Jonathan Corbet Cc: Michael Larabel Cc: Michal Hocko Cc: Mike Rapoport Cc: Roman Gushchin Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 77d4459a4a1a472b7309e475f962dda87d950abd Author: Yu Zhao Date: Wed Dec 21 21:19:03 2022 -0700 mm: multi-gen LRU: shuffle should_run_aging() Move should_run_aging() next to its only caller left. Link: https://lkml.kernel.org/r/20221222041905.2431096-6-yuzhao@google.com Signed-off-by: Yu Zhao Cc: Johannes Weiner Cc: Jonathan Corbet Cc: Michael Larabel Cc: Michal Hocko Cc: Mike Rapoport Cc: Roman Gushchin Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 7348cc91821b0cb24dfb00e578047f68299a50ab Author: Yu Zhao Date: Wed Dec 21 21:19:02 2022 -0700 mm: multi-gen LRU: remove aging fairness safeguard Recall that the aging produces the youngest generation: first it scans for accessed folios and updates their gen counters; then it increments lrugen->max_seq. The current aging fairness safeguard for kswapd uses two passes to ensure the fairness to multiple eligible memcgs. On the first pass, which is shared with the eviction, it checks whether all eligible memcgs are low on cold folios. If so, it requires a second pass, on which it ages all those memcgs at the same time. With memcg LRU, the aging, while ensuring eventual fairness, will run when necessary. Therefore the current aging fairness safeguard for kswapd will not be needed. Note that memcg LRU only applies to global reclaim. For memcg reclaim, the aging can be unfair to different memcgs, i.e., their lrugen->max_seq can be incremented at different paces. Link: https://lkml.kernel.org/r/20221222041905.2431096-5-yuzhao@google.com Signed-off-by: Yu Zhao Cc: Johannes Weiner Cc: Jonathan Corbet Cc: Michael Larabel Cc: Michal Hocko Cc: Mike Rapoport Cc: Roman Gushchin Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit a579086c99ed70cc4bfc104348dbe3dd8f2787e6 Author: Yu Zhao Date: Wed Dec 21 21:19:01 2022 -0700 mm: multi-gen LRU: remove eviction fairness safeguard Recall that the eviction consumes the oldest generation: first it bucket-sorts folios whose gen counters were updated by the aging and reclaims the rest; then it increments lrugen->min_seq. The current eviction fairness safeguard for global reclaim has a dilemma: when there are multiple eligible memcgs, should it continue or stop upon meeting the reclaim goal? If it continues, it overshoots and increases direct reclaim latency; if it stops, it loses fairness between memcgs it has taken memory away from and those it has yet to. With memcg LRU, the eviction, while ensuring eventual fairness, will stop upon meeting its goal. Therefore the current eviction fairness safeguard for global reclaim will not be needed. Note that memcg LRU only applies to global reclaim. For memcg reclaim, the eviction will continue, even if it is overshooting. This becomes unconditional due to code simplification. Link: https://lkml.kernel.org/r/20221222041905.2431096-4-yuzhao@google.com Signed-off-by: Yu Zhao Cc: Johannes Weiner Cc: Jonathan Corbet Cc: Michael Larabel Cc: Michal Hocko Cc: Mike Rapoport Cc: Roman Gushchin Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 6df1b2212950aae2b2188c6645ea18e2a9e3fdd5 Author: Yu Zhao Date: Wed Dec 21 21:19:00 2022 -0700 mm: multi-gen LRU: rename lrugen->lists[] to lrugen->folios[] lru_gen_folio will be chained into per-node lists by the coming lrugen->list. Link: https://lkml.kernel.org/r/20221222041905.2431096-3-yuzhao@google.com Signed-off-by: Yu Zhao Cc: Johannes Weiner Cc: Jonathan Corbet Cc: Michael Larabel Cc: Michal Hocko Cc: Mike Rapoport Cc: Roman Gushchin Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 391655fe08d1f942359a11148aa9aaf3f99d6d6f Author: Yu Zhao Date: Wed Dec 21 21:18:59 2022 -0700 mm: multi-gen LRU: rename lru_gen_struct to lru_gen_folio Patch series "mm: multi-gen LRU: memcg LRU", v3. Overview ======== An memcg LRU is a per-node LRU of memcgs. It is also an LRU of LRUs, since each node and memcg combination has an LRU of folios (see mem_cgroup_lruvec()). Its goal is to improve the scalability of global reclaim, which is critical to system-wide memory overcommit in data centers. Note that memcg reclaim is currently out of scope. Its memory bloat is a pointer to each lruvec and negligible to each pglist_data. In terms of traversing memcgs during global reclaim, it improves the best-case complexity from O(n) to O(1) and does not affect the worst-case complexity O(n). Therefore, on average, it has a sublinear complexity in contrast to the current linear complexity. The basic structure of an memcg LRU can be understood by an analogy to the active/inactive LRU (of folios): 1. It has the young and the old (generations), i.e., the counterparts to the active and the inactive; 2. The increment of max_seq triggers promotion, i.e., the counterpart to activation; 3. Other events trigger similar operations, e.g., offlining an memcg triggers demotion, i.e., the counterpart to deactivation. In terms of global reclaim, it has two distinct features: 1. Sharding, which allows each thread to start at a random memcg (in the old generation) and improves parallelism; 2. Eventual fairness, which allows direct reclaim to bail out at will and reduces latency without affecting fairness over some time. The commit message in patch 6 details the workflow: https://lore.kernel.org/r/20221222041905.2431096-7-yuzhao@google.com/ The following is a simple test to quickly verify its effectiveness. Test design: 1. Create multiple memcgs. 2. Each memcg contains a job (fio). 3. All jobs access the same amount of memory randomly. 4. The system does not experience global memory pressure. 5. Periodically write to the root memory.reclaim. Desired outcome: 1. All memcgs have similar pgsteal counts, i.e., stddev(pgsteal) over mean(pgsteal) is close to 0%. 2. The total pgsteal is close to the total requested through memory.reclaim, i.e., sum(pgsteal) over sum(requested) is close to 100%. Actual outcome [1]: MGLRU off MGLRU on stddev(pgsteal) / mean(pgsteal) 75% 20% sum(pgsteal) / sum(requested) 425% 95% #################################################################### MEMCGS=128 for ((memcg = 0; memcg < $MEMCGS; memcg++)); do mkdir /sys/fs/cgroup/memcg$memcg done start() { echo $BASHPID > /sys/fs/cgroup/memcg$memcg/cgroup.procs fio -name=memcg$memcg --numjobs=1 --ioengine=mmap \ --filename=/dev/zero --size=1920M --rw=randrw \ --rate=64m,64m --random_distribution=random \ --fadvise_hint=0 --time_based --runtime=10h \ --group_reporting --minimal } for ((memcg = 0; memcg < $MEMCGS; memcg++)); do start & done sleep 600 for ((i = 0; i < 600; i++)); do echo 256m >/sys/fs/cgroup/memory.reclaim sleep 6 done for ((memcg = 0; memcg < $MEMCGS; memcg++)); do grep "pgsteal " /sys/fs/cgroup/memcg$memcg/memory.stat done #################################################################### [1]: This was obtained from running the above script (touches less than 256GB memory) on an EPYC 7B13 with 512GB DRAM for over an hour. This patch (of 8): The new name lru_gen_folio will be more distinct from the coming lru_gen_memcg. Link: https://lkml.kernel.org/r/20221222041905.2431096-1-yuzhao@google.com Link: https://lkml.kernel.org/r/20221222041905.2431096-2-yuzhao@google.com Signed-off-by: Yu Zhao Cc: Johannes Weiner Cc: Jonathan Corbet Cc: Michael Larabel Cc: Michal Hocko Cc: Mike Rapoport Cc: Roman Gushchin Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 14687619e1122d71b2ed70e1afa6bc352e629e85 Author: Uladzislau Rezki (Sony) Date: Thu Dec 22 20:00:22 2022 +0100 mm: vmalloc: replace BUG_ON() by WARN_ON_ONCE() Currently a vm_unmap_ram() functions triggers a BUG() if an area is not found. Replace it by the WARN_ON_ONCE() error message and keep machine alive instead of stopping it. The worst case is a memory leaking. Link: https://lkml.kernel.org/r/20221222190022.134380-3-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Lorenzo Stoakes Reviewed-by: Christoph Hellwig Cc: Baoquan He Cc: Christoph Hellwig Cc: Christoph Hellwig Cc: Matthew Wilcox (Oracle) Cc: Nicholas Piggin Cc: Oleksiy Avramchenko Cc: Roman Gushchin Signed-off-by: Andrew Morton commit edd898181e2f6f0969c08e1dfe2b7cdf902b9b33 Author: Uladzislau Rezki (Sony) Date: Thu Dec 22 20:00:20 2022 +0100 mm: vmalloc: avoid calling __find_vmap_area() twice in __vunmap() Currently the __vunmap() path calls __find_vmap_area() twice. Once on entry to check that the area exists, then inside the remove_vm_area() function which also performs a new search for the VA. In order to improvie it from a performance point of view we split remove_vm_area() into two new parts: - find_unlink_vmap_area() that does a search and unlink from tree; - __remove_vm_area() that removes without searching. In this case there is no any functional change for remove_vm_area() whereas vm_remove_mappings(), where a second search happens, switches to the __remove_vm_area() variant where the already detached VA is passed as a parameter, so there is no need to find it again. Performance wise, i use test_vmalloc.sh with 32 threads doing alloc free on a 64-CPUs-x86_64-box: perf without this patch: - 31.41% 0.50% vmalloc_test/10 [kernel.vmlinux] [k] __vunmap - 30.92% __vunmap - 17.67% _raw_spin_lock native_queued_spin_lock_slowpath - 12.33% remove_vm_area - 11.79% free_vmap_area_noflush - 11.18% _raw_spin_lock native_queued_spin_lock_slowpath 0.76% free_unref_page perf with this patch: - 11.35% 0.13% vmalloc_test/14 [kernel.vmlinux] [k] __vunmap - 11.23% __vunmap - 8.28% find_unlink_vmap_area - 7.95% _raw_spin_lock 7.44% native_queued_spin_lock_slowpath - 1.93% free_vmap_area_noflush - 0.56% _raw_spin_lock 0.53% native_queued_spin_lock_slowpath 0.60% __vunmap_range_noflush __vunmap() consumes around ~20% less CPU cycles on this test. Also, switch from find_vmap_area() to find_unlink_vmap_area() to prevent a double access to the vmap_area_lock: one for finding area, second time is for unlinking from a tree. [urezki@gmail.com: switch to find_unlink_vmap_area() in vm_unmap_ram()] Link: https://lkml.kernel.org/r/20221222190022.134380-2-urezki@gmail.com Link: https://lkml.kernel.org/r/20221222190022.134380-1-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Reported-by: Roman Gushchin Reviewed-by: Lorenzo Stoakes Cc: Baoquan He Cc: Christoph Hellwig Cc: Matthew Wilcox (Oracle) Cc: Nicholas Piggin Cc: Oleksiy Avramchenko Cc: Christoph Hellwig Signed-off-by: Andrew Morton commit b5054174ac7c7d8fae15deee7ddc0e20fd604f30 Author: David Howells Date: Wed Dec 21 21:24:54 2022 +0000 mm: move FOLL_* defs to mm_types.h Move FOLL_* definitions to linux/mm_types.h to make them more accessible without having to drag in all of linux/mm.h and everything that drags in too[1]. Link: https://lkml.kernel.org/r/2161258.1671657894@warthog.procyon.org.uk Signed-off-by: David Howells Suggested-by: Matthew Wilcox Reviewed-by: John Hubbard Cc: Christoph Hellwig Cc: Al Viro Signed-off-by: Andrew Morton commit 0b7b8704ddcee372099a2bc6781db6ab273a85d5 Author: Hao Sun Date: Wed Dec 21 22:42:45 2022 +0800 mm: new primitive kvmemdup() Similar to kmemdup(), but support large amount of bytes with kvmalloc() and does *not* guarantee that the result will be physically contiguous. Use only in cases where kvmalloc() is needed and free it with kvfree(). Also adapt policy_unpack.c in case someone bisect into this. Link: https://lkml.kernel.org/r/20221221144245.27164-1-sunhao.th@gmail.com Signed-off-by: Hao Sun Suggested-by: Daniel Borkmann Cc: Nick Terrell Cc: John Johansen Cc: Paul Moore Cc: James Morris Cc: "Serge E. Hallyn" Signed-off-by: Andrew Morton commit 5a9e34747c9f731bbb6b7fd7521c4fec0d840593 Author: Vishal Moola (Oracle) Date: Wed Dec 21 10:08:48 2022 -0800 mm/swap: convert deactivate_page() to folio_deactivate() Deactivate_page() has already been converted to use folios, this change converts it to take in a folio argument instead of calling page_folio(). It also renames the function folio_deactivate() to be more consistent with other folio functions. [akpm@linux-foundation.org: fix left-over comments, per Yu Zhao] Link: https://lkml.kernel.org/r/20221221180848.20774-5-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton commit f70da5ee8fe15b21501613ccab27eb2f722a3394 Author: Vishal Moola (Oracle) Date: Wed Dec 21 10:08:47 2022 -0800 mm/damon: convert damon_pa_mark_accessed_or_deactivate() to use folios This change replaces 2 calls to compound_head() from put_page() and 1 call from mark_page_accessed() with one from page_folio(). This is in preparation for the conversion of deactivate_page() to folio_deactivate(). Link: https://lkml.kernel.org/r/20221221180848.20774-4-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Reviewed-by: SeongJae Park Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 07e8c82b5eff8ef34b74210eacb8d9c4a2886b82 Author: Vishal Moola (Oracle) Date: Wed Dec 21 10:08:46 2022 -0800 madvise: convert madvise_cold_or_pageout_pte_range() to use folios This change removes a number of calls to compound_head(), and saves 1729 bytes of kernel text. Link: https://lkml.kernel.org/r/20221221180848.20774-3-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Reviewed-by: Matthew Wilcox (Oracle) Cc: SeongJae Park Signed-off-by: Andrew Morton commit 318e9342fbbb6888d903d86e83865609901a1c65 Author: Vishal Moola (Oracle) Date: Wed Dec 21 10:08:45 2022 -0800 mm/memory: add vm_normal_folio() Patch series "Convert deactivate_page() to folio_deactivate()", v4. Deactivate_page() has already been converted to use folios. This patch series modifies the callers of deactivate_page() to use folios. It also introduces vm_normal_folio() to assist with folio conversions, and converts deactivate_page() to folio_deactivate() which takes in a folio. This patch (of 4): Introduce a wrapper function called vm_normal_folio(). This function calls vm_normal_page() and returns the folio of the page found, or null if no page is found. This function allows callers to get a folio from a pte, which will eventually allow them to completely replace their struct page variables with struct folio instead. Link: https://lkml.kernel.org/r/20221221180848.20774-1-vishal.moola@gmail.com Link: https://lkml.kernel.org/r/20221221180848.20774-2-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Reviewed-by: Matthew Wilcox (Oracle) Cc: SeongJae Park Signed-off-by: Andrew Morton commit e11cb683b2ebc6699bc0ca200442f1b80a51553f Author: Vernon Yang Date: Wed Dec 21 14:00:58 2022 +0800 maple_tree: refine mab_calc_split function Invert the conditional judgment of the mid_split, to focus the return statement in the last statement, which is easier to understand and for better readability. Link: https://lkml.kernel.org/r/20221221060058.609003-8-vernon2gm@gmail.com Signed-off-by: Vernon Yang Reviewed-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 46b345848261009477552d654cb2f65000c30e4d Author: Vernon Yang Date: Wed Dec 21 14:00:57 2022 +0800 maple_tree: refine ma_state init from mas_start() If mas->node is an MAS_START, there are three cases, and they all assign different values to mas->node and mas->offset. So there is no need to set them to a default value before updating. Update them directly to make them easier to understand and for better readability. Link: https://lkml.kernel.org/r/20221221060058.609003-7-vernon2gm@gmail.com Signed-off-by: Vernon Yang Reviewed-by: Liam R. Howlett Signed-off-by: Andrew Morton commit eabb305293835b191ffe60234587ae8bf5e4e9fd Author: Vernon Yang Date: Wed Dec 21 14:00:56 2022 +0800 maple_tree: remove the redundant code The macros CONFIG_DEBUG_MAPLE_TREE_VERBOSE no one uses, functions mas_dup_tree() and mas_dup_store() are not implemented, just function declaration, so drop it. Link: https://lkml.kernel.org/r/20221221060058.609003-6-vernon2gm@gmail.com Signed-off-by: Vernon Yang Reviewed-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 84fd3e1ee395649ac45b7317d44c10b33d0dca79 Author: Vernon Yang Date: Wed Dec 21 14:00:55 2022 +0800 maple_tree: use macro MA_ROOT_PARENT instead of number When you need to compare whether node->parent is parent of the root node, using macro MA_ROOT_PARENT is easier to understand and for better readability. Link: https://lkml.kernel.org/r/20221221060058.609003-5-vernon2gm@gmail.com Signed-off-by: Vernon Yang Reviewed-by: Liam R. Howlett Signed-off-by: Andrew Morton commit bd592703b81a95473f6a01fe731beccd0992236e Author: Vernon Yang Date: Wed Dec 21 14:00:54 2022 +0800 maple_tree: use mt_node_max() instead of direct operations mt_max[] Use mt_node_max() to get the maximum number of slots for a node, rather than direct operations mt_max[], makes it better portability. Link: https://lkml.kernel.org/r/20221221060058.609003-4-vernon2gm@gmail.com Signed-off-by: Vernon Yang Reviewed-by: Liam R. Howlett Signed-off-by: Andrew Morton commit d56c593c8e128c42dc81707c07cbd5af41862214 Author: Vernon Yang Date: Wed Dec 21 14:00:53 2022 +0800 maple_tree: remove extra return statement For functions with a return type of void, it is unnecessary to add a reurn statement at the end of the function, so drop it. Link: https://lkml.kernel.org/r/20221221060058.609003-3-vernon2gm@gmail.com Signed-off-by: Vernon Yang Reviewed-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 831978e37e93bd3e36612917a4b193278950daff Author: Vernon Yang Date: Wed Dec 21 14:00:52 2022 +0800 maple_tree: remove extra space and blank line Patch series "Clean up and refinement for maple tree", v2. This patchset cleans up and refines some maple tree code. A few small changes make the code easier to understand and for better readability. This patch (of 7): These extra space and blank lines are unnecessary, so drop them. Link: https://lkml.kernel.org/r/20221221060058.609003-1-vernon2gm@gmail.com Link: https://lkml.kernel.org/r/20221221060058.609003-2-vernon2gm@gmail.com Signed-off-by: Vernon Yang Reviewed-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 80b1d8fdfad1f3084450afa6e2efcdcce867d4af Author: Lorenzo Stoakes Date: Mon Dec 19 12:36:59 2022 +0000 mm: vmalloc: correct use of __GFP_NOWARN mask in __vmalloc_area_node() This function sets __GFP_NOWARN in the gfp_mask rendering the warn_alloc() invocations no-ops. Remove this and instead rely on this flag being set only for the vm_area_alloc_pages() function, ensuring it is cleared for each of the warn_alloc() calls. Link: https://lkml.kernel.org/r/20221219123659.90614-1-lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Reviewed-by: Uladzislau Rezki (Sony) Cc: Baoquan He Cc: Christoph Hellwig Cc: Matthew Wilcox (Oracle) Cc: Nicholas Piggin Signed-off-by: Andrew Morton commit ef1faf0e370a8e33fe625088ddc5fde02cf8c4c4 Author: Jianlin Lv Date: Mon Dec 19 16:49:17 2022 +0000 tools/vm/page_owner_sort: free memory before exit Although when a process terminates, the kernel will removes memory associated with that process, It's neither good style nor proper design to leave it to kernel. This patch free allocated memory before process exit. Link: https://lkml.kernel.org/r/20221219164917.14132-1-iecedge@gmail.com Signed-off-by: Jianlin Lv Signed-off-by: Andrew Morton commit 44383cef54c0ce1201f884d83cc2b367bc5aa4f7 Author: Andrey Konovalov Date: Mon Dec 19 19:09:18 2022 +0100 kasan: allow sampling page_alloc allocations for HW_TAGS As Hardware Tag-Based KASAN is intended to be used in production, its performance impact is crucial. As page_alloc allocations tend to be big, tagging and checking all such allocations can introduce a significant slowdown. Add two new boot parameters that allow to alleviate that slowdown: - kasan.page_alloc.sample, which makes Hardware Tag-Based KASAN tag only every Nth page_alloc allocation with the order configured by the second added parameter (default: tag every such allocation). - kasan.page_alloc.sample.order, which makes sampling enabled by the first parameter only affect page_alloc allocations with the order equal or greater than the specified value (default: 3, see below). The exact performance improvement caused by using the new parameters depends on their values and the applied workload. The chosen default value for kasan.page_alloc.sample.order is 3, which matches both PAGE_ALLOC_COSTLY_ORDER and SKB_FRAG_PAGE_ORDER. This is done for two reasons: 1. PAGE_ALLOC_COSTLY_ORDER is "the order at which allocations are deemed costly to service", which corresponds to the idea that only large and thus costly allocations are supposed to sampled. 2. One of the workloads targeted by this patch is a benchmark that sends a large amount of data over a local loopback connection. Most multi-page data allocations in the networking subsystem have the order of SKB_FRAG_PAGE_ORDER (or PAGE_ALLOC_COSTLY_ORDER). When running a local loopback test on a testing MTE-enabled device in sync mode, enabling Hardware Tag-Based KASAN introduces a ~50% slowdown. Applying this patch and setting kasan.page_alloc.sampling to a value higher than 1 allows to lower the slowdown. The performance improvement saturates around the sampling interval value of 10 with the default sampling page order of 3. This lowers the slowdown to ~20%. The slowdown in real scenarios involving the network will likely be better. Enabling page_alloc sampling has a downside: KASAN misses bad accesses to a page_alloc allocation that has not been tagged. This lowers the value of KASAN as a security mitigation. However, based on measuring the number of page_alloc allocations of different orders during boot in a test build, sampling with the default kasan.page_alloc.sample.order value affects only ~7% of allocations. The rest ~93% of allocations are still checked deterministically. Link: https://lkml.kernel.org/r/129da0614123bb85ed4dd61ae30842b2dd7c903f.1671471846.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Jann Horn Cc: Mark Brand Cc: Peter Collingbourne Signed-off-by: Andrew Morton commit cbc2bd98db85504074c1b94175e5e136e457dc0b Author: Kairui Song Date: Tue Dec 20 02:58:40 2022 +0800 swap: avoid holding swap reference in swap_cache_get_folio All its callers either already hold a reference to, or lock the swap device while calling this function. There is only one exception in shmem_swapin_folio, just make this caller also hold a reference of the swap device, so this helper can be simplified and saves a few cycles. This also provides finer control of error handling in shmem_swapin_folio, on race (with swap off), it can just try again. For invalid swap entry, it can fail with a proper error code. Link: https://lkml.kernel.org/r/20221219185840.25441-5-ryncsn@gmail.com Signed-off-by: Kairui Song Cc: David Hildenbrand Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Signed-off-by: Andrew Morton commit 16ba391e9c6bc26e6f0c950f2117f57b8e542d71 Author: Kairui Song Date: Tue Dec 20 02:58:39 2022 +0800 swap: fold swap_ra_clamp_pfn into swap_ra_info This makes the code cleaner. This helper is made of only two line of self explanational code and not reused anywhere else. And this actually make the compiled object smaller by a bit. bloat-o-meter results on x86_64 of mm/swap_state.o: add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-35 (-35) Function old new delta swap_ra_info.constprop 512 477 -35 Total: Before=8388, After=8353, chg -0.42% Link: https://lkml.kernel.org/r/20221219185840.25441-4-ryncsn@gmail.com Signed-off-by: Kairui Song Reviewed-by: "Huang, Ying" Cc: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Signed-off-by: Andrew Morton commit 18ad72f5b7186336646182b17e0654bf907b39e6 Author: Kairui Song Date: Tue Dec 20 02:58:38 2022 +0800 swap: avoid a redundant pte map if ra window is 1 Avoid a redundant pte map/unmap when swap readahead window is 1. Link: https://lkml.kernel.org/r/20221219185840.25441-3-ryncsn@gmail.com Signed-off-by: Kairui Song Reviewed-by: "Huang, Ying" Cc: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Signed-off-by: Andrew Morton commit 3f79b187ad2f677047a1f1104bfb8a81b58b67d5 Author: Kairui Song Date: Tue Dec 20 02:58:37 2022 +0800 swapfile: get rid of volatile and avoid redundant read Patch series "Clean up and fixes for swap", v2. This series cleans up some code paths, saves a few cycles and reduces the object size by a bit. It also fixes some rare race issue with statistics. This patch (of 4): Convert a volatile variable to more readable READ_ONCE. And this actually avoids the code from reading the variable twice redundantly when it races. Link: https://lkml.kernel.org/r/20221219185840.25441-1-ryncsn@gmail.com Link: https://lkml.kernel.org/r/20221219185840.25441-2-ryncsn@gmail.com Signed-off-by: Kairui Song Reviewed-by: "Huang, Ying" Cc: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Miaohe Lin Signed-off-by: Andrew Morton commit 497b099d9a166f819e667f4bf258e7a00ea2e78a Author: SeongJae Park Date: Mon Dec 5 23:08:30 2022 +0000 Docs/ABI/damon: document scheme filters files Document newly added DAMON sysfs interface files for DAMOS filtering on the DAMON ABI document. Link: https://lkml.kernel.org/r/20221205230830.144349-12-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 9b7f9322a5300505fffba492b45621c897c0e0df Author: SeongJae Park Date: Mon Dec 5 23:08:29 2022 +0000 Docs/admin-guide/mm/damon/usage: document DAMOS filters of sysfs Document about the newly added files for DAMOS filters on the DAMON usage document. Link: https://lkml.kernel.org/r/20221205230830.144349-11-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 553b014244298d9f807286d6a71d722bc1f50f84 Author: SeongJae Park Date: Mon Dec 5 23:08:28 2022 +0000 selftests/damon/sysfs: test filters directory Add simple test cases for scheme filters of DAMON sysfs interface. The test cases check if the files are populated as expected, receives some valid inputs, and refuses some invalid inputs. Link: https://lkml.kernel.org/r/20221205230830.144349-10-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 29cbb9a13f05b20f0777c60db9603730b487a4e0 Author: SeongJae Park Date: Mon Dec 5 23:08:27 2022 +0000 mm/damon/sysfs-schemes: implement scheme filters Implement scheme filters functionality of DAMON sysfs interface by making the code reads the values of files under the filter directories and pass that to DAMON using DAMON kernel API. [sj@kernel.org: fix leaking a filter for wrong cgroup path] Link: https://lkml.kernel.org/r/20221219171807.55708-2-sj@kernel.org [sj@kernel.org: return an error for filter memcg path id lookup failure] Link: https://lkml.kernel.org/r/20221219171807.55708-3-sj@kernel.org Link: https://lkml.kernel.org/r/20221205230830.144349-9-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 472e2b70eda6a1bccb62f391808924a59c49e22f Author: SeongJae Park Date: Mon Dec 5 23:08:26 2022 +0000 mm/damon/sysfs-schemes: connect filter directory and filters directory Implement 'nr_filters' file under 'filters' directory, which will be used to populate specific number of 'filter' directory under the directory, similar to other 'nr_*' files in DAMON sysfs interface. Link: https://lkml.kernel.org/r/20221205230830.144349-8-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 7ee161f18b5da5170b5d6a51aace49d312099128 Author: SeongJae Park Date: Mon Dec 5 23:08:25 2022 +0000 mm/damon/sysfs-schemes: implement filter directory Implement DAMOS filter directory which will be located under the filters directory. The directory provides three files, namely type, matching, and memcg_path. 'type' and 'matching' will be directly connected to the fields of 'struct damos_filter' having same name. 'memcg_path' will receive the path of the memory cgroup of the interest and later converted to memcg id when it's committed. Link: https://lkml.kernel.org/r/20221205230830.144349-7-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit ac35264b9e8807f019f36e7dbc640b66fd43a865 Author: SeongJae Park Date: Mon Dec 5 23:08:24 2022 +0000 mm/damon/sysfs-schemes: implement filters directory DAMOS filters are currently supported by only DAMON kernel API. To expose the feature to user space, implement a DAMON sysfs directory named 'filters' under each scheme directory. Please note that this is implementing only the directory. Following commits will implement more files and directories, and finally connect the DAMOS filters feature. Link: https://lkml.kernel.org/r/20221205230830.144349-6-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit d56fe24237c3dec29b7de20ce93a4a53306d180b Author: SeongJae Park Date: Mon Dec 5 23:08:23 2022 +0000 Docs/admin-guide/damon/reclaim: document 'skip_anon' parameter Document the newly added 'skip_anon' parameter of DAMON_RECLAIM, which can be used to avoid anonymous pages reclamation. Link: https://lkml.kernel.org/r/20221205230830.144349-5-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 66d9faec0745f8db4bd9ef59a287627fc5ea691f Author: SeongJae Park Date: Mon Dec 5 23:08:22 2022 +0000 mm/damon/reclaim: add a parameter called skip_anon for avoiding anonymous pages reclamation In some cases, for example if users have confidence at anonymous pages management or the swap device is too slow, users would want to avoid DAMON_RECLAIM swapping the anonymous pages out. For such case, add yet another DAMON_RECLAIM parameter, namely 'skip_anon'. When it is set as 'Y', DAMON_RECLAIM will avoid reclaiming anonymous pages using a DAMOS filter. Link: https://lkml.kernel.org/r/20221205230830.144349-4-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 18250e78f9c759010d7e0008af6e9c37aeddb1e4 Author: SeongJae Park Date: Mon Dec 5 23:08:21 2022 +0000 mm/damon/paddr: support DAMOS filters Implement support of the DAMOS filters in the physical address space monitoring operations set, for all DAMOS actions that it supports including 'pageout', 'lru_prio', and 'lru_deprio'. Link: https://lkml.kernel.org/r/20221205230830.144349-3-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 98def236f63c66629fb6b2d4b69cecffc5b46539 Author: SeongJae Park Date: Mon Dec 5 23:08:20 2022 +0000 mm/damon/core: implement damos filter Patch series "implement DAMOS filtering for anon pages and/or specific memory cgroups" DAMOS let users do system operations in a data access pattern oriented way. The data access pattern, which is extracted by DAMON, is somewhat accurate more than what user space could know in many cases. However, in some situation, users could know something more than the kernel about the pattern or some special requirements for some types of memory or processes. For example, some users would have slow swap devices and knows latency-ciritical processes and therefore want to use DAMON-based proactive reclamation (DAMON_RECLAIM) for only non-anonymous pages of non-latency-critical processes. For such restriction, users could exclude the memory regions from the initial monitoring regions and use non-dynamic monitoring regions update monitoring operations set including fvaddr and paddr. They could also adjust the DAMOS target access pattern. For dynamically changing memory layout and access pattern, those would be not enough. To help the case, add an interface, namely DAMOS filters, which can be used to avoid the DAMOS actions be applied to specific types of memory, to DAMON kernel API (damon.h). At the moment, it supports filtering anonymous pages and/or specific memory cgroups in or out for each DAMOS scheme. This patchset adds the support for all DAMOS actions that 'paddr' monitoring operations set supports ('pageout', 'lru_prio', and 'lru_deprio'), and the functionality is exposed via DAMON kernel API (damon.h) the DAMON sysfs interface (/sys/kernel/mm/damon/admins/), and DAMON_RECLAIM module parameters. Patches Sequence ---------------- First patch implements DAMOS filter interface to DAMON kernel API. Second patch makes the physical address space monitoring operations set to support the filters from all supporting DAMOS actions. Third patch adds anonymous pages filter support to DAMON_RECLAIM, and the fourth patch documents the DAMON_RECLAIM's new feature. Fifth to seventh patches implement DAMON sysfs files for support of the filters, and eighth patch connects the file to use DAMOS filters feature. Ninth patch adds simple self test cases for DAMOS filters of the sysfs interface. Finally, following two patches (tenth and eleventh) document the new features and interfaces. This patch (of 11): DAMOS lets users do system operation in a data access pattern oriented way. The data access pattern, which is extracted by DAMON, is somewhat accurate more than what user space could know in many cases. However, in some situation, users could know something more than the kernel about the pattern or some special requirements for some types of memory or processes. For example, some users would have slow swap devices and knows latency-ciritical processes and therefore want to use DAMON-based proactive reclamation (DAMON_RECLAIM) for only non-anonymous pages of non-latency-critical processes. For such restriction, users could exclude the memory regions from the initial monitoring regions and use non-dynamic monitoring regions update monitoring operations set including fvaddr and paddr. They could also adjust the DAMOS target access pattern. For dynamically changing memory layout and access pattern, those would be not enough. To help the case, add an interface, namely DAMOS filters, which can be used to avoid the DAMOS actions be applied to specific types of memory, to DAMON kernel API (damon.h). At the moment, it supports filtering anonymous pages and/or specific memory cgroups in or out for each DAMOS scheme. Note that this commit adds only the interface to the DAMON kernel API. The impelmentation should be made in the monitoring operations sets, and following commits will add that. Link: https://lkml.kernel.org/r/20221205230830.144349-1-sj@kernel.org Link: https://lkml.kernel.org/r/20221205230830.144349-2-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit da34a8484d162585e22ed8c1e4114aa2f60e3567 Author: Johannes Weiner Date: Wed Dec 7 14:00:39 2022 +0100 mm: memcontrol: deprecate charge moving Charge moving mode in cgroup1 allows memory to follow tasks as they migrate between cgroups. This is, and always has been, a questionable thing to do - for several reasons. First, it's expensive. Pages need to be identified, locked and isolated from various MM operations, and reassigned, one by one. Second, it's unreliable. Once pages are charged to a cgroup, there isn't always a clear owner task anymore. Cache isn't moved at all, for example. Mapped memory is moved - but if trylocking or isolating a page fails, it's arbitrarily left behind. Frequent moving between domains may leave a task's memory scattered all over the place. Third, it isn't really needed. Launcher tasks can kick off workload tasks directly in their target cgroup. Using dedicated per-workload groups allows fine-grained policy adjustments - no need to move tasks and their physical pages between control domains. The feature was never forward-ported to cgroup2, and it hasn't been missed. Despite it being a niche usecase, the maintenance overhead of supporting it is enormous. Because pages are moved while they are live and subject to various MM operations, the synchronization rules are complicated. There are lock_page_memcg() in MM and FS code, which non-cgroup people don't understand. In some cases we've been able to shift code and cgroup API calls around such that we can rely on native locking as much as possible. But that's fragile, and sometimes we need to hold MM locks for longer than we otherwise would (pte lock e.g.). Mark the feature deprecated. Hopefully we can remove it soon. And backport into -stable kernels so that people who develop against earlier kernels are warned about this deprecation as early as possible. [akpm@linux-foundation.org: fix memory.rst underlining] Link: https://lkml.kernel.org/r/Y5COd+qXwk/S+n8N@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Shakeel Butt Acked-by: Hugh Dickins Acked-by: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Signed-off-by: Andrew Morton commit c7c3dec1c9db9746912af2bbb5d6a2dd9f152d20 Author: Johannes Weiner Date: Tue Dec 6 18:13:40 2022 +0100 mm: rmap: remove lock_page_memcg() The previous patch made sure charge moving only touches pages for which page_mapped() is stable. lock_page_memcg() is no longer needed. Link: https://lkml.kernel.org/r/20221206171340.139790-3-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Hugh Dickins Acked-by: Shakeel Butt Acked-by: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Signed-off-by: Andrew Morton commit 4e0cf05f60590c4119c2eeacf136d1b832978370 Author: Johannes Weiner Date: Tue Dec 6 18:13:39 2022 +0100 mm: memcontrol: skip moving non-present pages that are mapped elsewhere Patch series "mm: push down lock_page_memcg()", v2. This patch (of 3): During charge moving, the pte lock and the page lock cover nearly all cases of stabilizing page_mapped(). The only exception is when we're looking at a non-present pte and find a page in the page cache or in the swapcache: if the page is mapped elsewhere, it can become unmapped outside of our control. For this reason, rmap needs lock_page_memcg(). We don't like cgroup-specific locks in generic MM code - especially in performance-critical MM code - and for a legacy feature that's unlikely to have many users left - if any. So remove the exception. Arguably that's better semantics anyway: the page is shared, and another process seems to be the more active user. Once we stop moving such pages, rmap doesn't need lock_page_memcg() anymore. The next patch will remove it. Link: https://lkml.kernel.org/r/20221206171340.139790-1-hannes@cmpxchg.org Link: https://lkml.kernel.org/r/20221206171340.139790-2-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Suggested-by: Hugh Dickins Acked-by: Hugh Dickins Acked-by: Shakeel Butt Acked-by: Michal Hocko Cc: Roman Gushchin Cc: Muchun Song Signed-off-by: Andrew Morton commit c5094ec79cbe487983e3a96548a7eb1c1c82c727 Author: Mike Kravetz Date: Fri Dec 16 14:45:07 2022 -0800 hugetlb: initialize variable to avoid compiler warning With the gcc 'maybe-uninitialized' warning enabled, gcc will produce: mm/hugetlb.c:6896:20: warning: `chg' may be used uninitialized This is a false positive, but may be difficult for the compiler to determine. maybe-uninitialized is disabled by default, but this gets flagged as a 0-DAY build regression. Initialize the variable to silence the warning. Link: https://lkml.kernel.org/r/20221216224507.106789-1-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Signed-off-by: Andrew Morton commit 6a6fe9ebd571a4092b7d5c1f11e4e1e15d296fa5 Author: Kefeng Wang Date: Fri Dec 9 10:06:18 2022 +0800 mm: swap: convert mark_page_lazyfree() to folio_mark_lazyfree() mark_page_lazyfree() and the callers are converted to use folio, this rename and make it to take in a folio argument instead of calling page_folio(). Link: https://lkml.kernel.org/r/20221209020618.190306-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Vishal Moola (Oracle) Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit fc986a38b670d9b8f6af0596e973976018314a59 Author: Kefeng Wang Date: Wed Dec 7 10:34:30 2022 +0800 mm: huge_memory: convert madvise_free_huge_pmd to use a folio Using folios instead of pages removes several calls to compound_head(), Link: https://lkml.kernel.org/r/20221207023431.151008-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Vishal Moola (Oracle) Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit cb6c33d4dc09a8fddda1867708956c27615775f4 Author: Wenchao Hao Date: Thu Dec 8 22:21:30 2022 +0800 cma: tracing: print alloc result in trace_cma_alloc_finish The result of the allocation attempt is not printed in trace_cma_alloc_finish, but it's important to do it so we can set filters to catch specific errors on allocation or to trigger some operations on specific errors. We have printed the result in log, but the log is conditional and could not be filtered by tracing events. It introduces little overhead to print this result. The result of allocation is named `errorno' in the trace. Link: https://lkml.kernel.org/r/20221208142130.1501195-1-haowenchao@huawei.com Signed-off-by: Wenchao Hao Cc: Masami Hiramatsu (Google) Cc: Steven Rostedt (Google) Signed-off-by: Andrew Morton commit 6b1ead5985bf73b7dd4453f5cd3b8690a9c52cd5 Author: Qinglin Pan Date: Mon Dec 12 13:56:57 2022 +0800 lib/test_vmalloc.c: add parameter use_huge for fix_size_alloc_test Add a parameter `use_huge' for fix_size_alloc_test(), which can be used to test allocation vie vmalloc_huge for both functionality and performance. Link: https://lkml.kernel.org/r/20221212055657.698420-1-panqinglin2020@iscas.ac.cn Signed-off-by: Qinglin Pan Cc: "Uladzislau Rezki (Sony)" Signed-off-by: Andrew Morton commit e976936cfc66376fc740a3a476365273384ce1ce Author: Michal Hocko Date: Fri Dec 16 14:45:37 2022 -0500 mm/mempolicy: do not duplicate policy if it is not applicable for set_mempolicy_home_node set_mempolicy_home_node tries to duplicate a memory policy before checking it whether it is applicable for the operation. There is no real reason for doing that and it might actually be a pointless memory allocation and deallocation exercise for MPOL_INTERLEAVE. Not a big problem but we can do better. Simply check the policy before acting on it. Link: https://lkml.kernel.org/r/20221216194537.238047-2-mathieu.desnoyers@efficios.com Signed-off-by: Michal Hocko Reviewed-by: Mathieu Desnoyers Signed-off-by: Mathieu Desnoyers Cc: Aneesh Kumar K.V Cc: Dave Hansen Cc: Feng Tang Cc: Michal Hocko Cc: Andrea Arcangeli Cc: Mel Gorman Cc: Mike Kravetz Cc: Randy Dunlap Cc: Vlastimil Babka Cc: Andi Kleen Cc: Dan Williams Cc: Huang Ying Signed-off-by: Andrew Morton commit a5fd8390d2b2db15fd043b8bd571b536101222c2 Author: Matthew Wilcox (Oracle) Date: Thu Dec 15 21:44:02 2022 +0000 mpage: use b_folio in do_mpage_readpage() Remove this conversion of a folio back to a page. Link: https://lkml.kernel.org/r/20221215214402.3522366-13-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Jan Kara Signed-off-by: Andrew Morton commit ac55e78d9e44a5374f5726b94e55f5a7b5d51fb9 Author: Matthew Wilcox (Oracle) Date: Thu Dec 15 21:44:01 2022 +0000 reiserfs: replace obvious uses of b_page with b_folio These places just use b_page to get to the buffer's address_space or call page_folio() on b_page to get a folio. Link: https://lkml.kernel.org/r/20221215214402.3522366-12-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Jan Kara Signed-off-by: Andrew Morton commit 6ad4cd7f36000ae145373b68ac61f15a1793b054 Author: Matthew Wilcox (Oracle) Date: Thu Dec 15 21:44:00 2022 +0000 nilfs2: replace obvious uses of b_page with b_folio These places just use b_page to get to the buffer's address_space or the index of the page the buffer is in. Link: https://lkml.kernel.org/r/20221215214402.3522366-11-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Jan Kara Signed-off-by: Andrew Morton commit 0d22fe2f039e971c2d7cc97d19ce48d8bdae253c Author: Matthew Wilcox (Oracle) Date: Thu Dec 15 21:43:59 2022 +0000 jbd2: replace obvious uses of b_page with b_folio These places just use b_page to get to the buffer's address_space or have already been converted to folio. Link: https://lkml.kernel.org/r/20221215214402.3522366-10-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Jan Kara Signed-off-by: Andrew Morton commit 11551cf15ecc17c4db4456538fd73d284ffcf20b Author: Matthew Wilcox (Oracle) Date: Thu Dec 15 21:43:58 2022 +0000 gfs2: replace obvious uses of b_page with b_folio These places just use b_page to get to the buffer's address_space. Link: https://lkml.kernel.org/r/20221215214402.3522366-9-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Jan Kara Signed-off-by: Andrew Morton commit cf1d3417e634b2b2dd162a7e193af9a9d700431b Author: Matthew Wilcox (Oracle) Date: Thu Dec 15 21:43:57 2022 +0000 buffer: use b_folio in mark_buffer_dirty() Removes about four calls to compound_head(). Two of them are inline which removes 132 bytes from the kernel text. Link: https://lkml.kernel.org/r/20221215214402.3522366-8-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Jan Kara Signed-off-by: Andrew Morton commit c10d91194d5d630a0befc7bc116aba3cfda8a226 Author: Matthew Wilcox (Oracle) Date: Thu Dec 15 21:43:56 2022 +0000 page_io: remove buffer_head include page_io never uses buffer_heads to do I/O. Link: https://lkml.kernel.org/r/20221215214402.3522366-7-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Jan Kara Signed-off-by: Andrew Morton commit 743ed81ec11147b42085a73a2e408964674291a9 Author: Matthew Wilcox (Oracle) Date: Thu Dec 15 21:43:55 2022 +0000 buffer: use b_folio in end_buffer_async_write() Save 76 bytes from avoiding the call to compound_head() in SetPageError(). Also avoid the call to compound_head() in end_page_writeback(). Link: https://lkml.kernel.org/r/20221215214402.3522366-6-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Jan Kara Signed-off-by: Andrew Morton commit 2e2dba15d107491e972041acb2d0b7bd73b92bc0 Author: Matthew Wilcox (Oracle) Date: Thu Dec 15 21:43:54 2022 +0000 buffer: use b_folio in end_buffer_async_read() Removes a call to compound_head() in SetPageError(), saving 76 bytes of text. Link: https://lkml.kernel.org/r/20221215214402.3522366-5-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Jan Kara Signed-off-by: Andrew Morton commit 03c5f331234c5798965fa654783dbed1c792c7f4 Author: Matthew Wilcox (Oracle) Date: Thu Dec 15 21:43:53 2022 +0000 buffer: use b_folio in touch_buffer() Removes a call to compound_head() in this path. Link: https://lkml.kernel.org/r/20221215214402.3522366-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Jan Kara Signed-off-by: Andrew Morton commit abc8a8a2c7dc7b557619befa8fb29be60ed481bc Author: Matthew Wilcox (Oracle) Date: Thu Dec 15 21:43:52 2022 +0000 buffer: replace obvious uses of b_page with b_folio These cases just check if it's NULL, or use b_page to get to the page's address space. They are assumptions that b_page never points to a tail page. Link: https://lkml.kernel.org/r/20221215214402.3522366-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Jan Kara Signed-off-by: Andrew Morton commit d685c668b0695dff927c85e27ef27d4f404f16a3 Author: Matthew Wilcox (Oracle) Date: Thu Dec 15 21:43:51 2022 +0000 buffer: add b_folio as an alias of b_page Patch series "Start converting buffer_heads to use folios". I was hoping that filesystems would convert from buffer_heads to iomap, but that's not happening particularly quickly. So the buffer_head infrastructure needs to be converted from being page-based to being folio-based. This patch (of 12): Buffer heads point to the allocation (ie the folio), not the page. This is currently the same thing for all filesystems that use buffer heads, so this is a safe transitional step. Link: https://lkml.kernel.org/r/20221215214402.3522366-1-willy@infradead.org Link: https://lkml.kernel.org/r/20221215214402.3522366-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Jan Kara Signed-off-by: Andrew Morton commit 9c67a20704e763f9cb8cd262c3e45de7bd2816bc Author: Peter Xu Date: Fri Dec 16 10:52:29 2022 -0500 mm/hugetlb: introduce hugetlb_walk() huge_pte_offset() is the main walker function for hugetlb pgtables. The name is not really representing what it does, though. Instead of renaming it, introduce a wrapper function called hugetlb_walk() which will use huge_pte_offset() inside. Assert on the locks when walking the pgtable. Note, the vma lock assertion will be a no-op for private mappings. Document the last special case in the page_vma_mapped_walk() path where we don't need any more lock to call hugetlb_walk(). Taking vma lock there is not needed because either: (1) potential callers of hugetlb pvmw holds i_mmap_rwsem already (from one rmap_walk()), or (2) the caller will not walk a hugetlb vma at all so the hugetlb code path not reachable (e.g. in ksm or uprobe paths). It's slightly implicit for future page_vma_mapped_walk() callers on that lock requirement. But anyway, when one day this rule breaks, one will get a straightforward warning in hugetlb_walk() with lockdep, then there'll be a way out. [akpm@linux-foundation.org: coding-style cleanups] Link: https://lkml.kernel.org/r/20221216155229.2043750-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Mike Kravetz Reviewed-by: John Hubbard Reviewed-by: David Hildenbrand Cc: Andrea Arcangeli Cc: James Houghton Cc: Jann Horn Cc: Miaohe Lin Cc: Muchun Song Cc: Nadav Amit Cc: Rik van Riel Signed-off-by: Andrew Morton commit dd361e5033cf36c51acab996ea17748b81cedb38 Author: Peter Xu Date: Fri Dec 16 10:52:26 2022 -0500 mm/hugetlb: make walk_hugetlb_range() safe to pmd unshare Since walk_hugetlb_range() walks the pgtable, it needs the vma lock to make sure the pgtable page will not be freed concurrently. Link: https://lkml.kernel.org/r/20221216155226.2043738-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Mike Kravetz Reviewed-by: John Hubbard Cc: Andrea Arcangeli Cc: David Hildenbrand Cc: James Houghton Cc: Jann Horn Cc: Miaohe Lin Cc: Muchun Song Cc: Nadav Amit Cc: Rik van Riel Signed-off-by: Andrew Morton commit eefc7fa53608920203a1402ecf7255ecfa8bb030 Author: Peter Xu Date: Fri Dec 16 10:52:23 2022 -0500 mm/hugetlb: make follow_hugetlb_page() safe to pmd unshare Since follow_hugetlb_page() walks the pgtable, it needs the vma lock to make sure the pgtable page will not be freed concurrently. Link: https://lkml.kernel.org/r/20221216155223.2043727-1-peterx@redhat.com Signed-off-by: Peter Xu Acked-by: David Hildenbrand Reviewed-by: Mike Kravetz Reviewed-by: John Hubbard Cc: Andrea Arcangeli Cc: James Houghton Cc: Jann Horn Cc: Miaohe Lin Cc: Muchun Song Cc: Nadav Amit Cc: Rik van Riel Signed-off-by: Andrew Morton commit 7d049f3a03ea705522210d70b9d3e223ef86d663 Author: Peter Xu Date: Fri Dec 16 10:52:19 2022 -0500 mm/hugetlb: make hugetlb_follow_page_mask() safe to pmd unshare Since hugetlb_follow_page_mask() walks the pgtable, it needs the vma lock to make sure the pgtable page will not be freed concurrently. Link: https://lkml.kernel.org/r/20221216155219.2043714-1-peterx@redhat.com Signed-off-by: Peter Xu Acked-by: David Hildenbrand Reviewed-by: Mike Kravetz Reviewed-by: John Hubbard Cc: Andrea Arcangeli Cc: James Houghton Cc: Jann Horn Cc: Miaohe Lin Cc: Muchun Song Cc: Nadav Amit Cc: Rik van Riel Signed-off-by: Andrew Morton commit b8da2e466000b232a6b67072bbef375061142daa Author: Peter Xu Date: Fri Dec 16 10:52:17 2022 -0500 mm/hugetlb: make userfaultfd_huge_must_wait() safe to pmd unshare We can take the hugetlb walker lock, here taking vma lock directly. Link: https://lkml.kernel.org/r/20221216155217.2043700-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: David Hildenbrand Reviewed-by: Mike Kravetz Reviewed-by: John Hubbard Cc: Andrea Arcangeli Cc: James Houghton Cc: Jann Horn Cc: Miaohe Lin Cc: Muchun Song Cc: Nadav Amit Cc: Rik van Riel Signed-off-by: Andrew Morton commit fcd48540d188876c917a377d81cd24c100332a62 Author: Peter Xu Date: Fri Dec 16 10:50:55 2022 -0500 mm/hugetlb: move swap entry handling into vma lock when faulted In hugetlb_fault(), there used to have a special path to handle swap entry at the entrance using huge_pte_offset(). That's unsafe because huge_pte_offset() for a pmd sharable range can access freed pgtables if without any lock to protect the pgtable from being freed after pmd unshare. Here the simplest solution to make it safe is to move the swap handling to be after the vma lock being held. We may need to take the fault mutex on either migration or hwpoison entries now (also the vma lock, but that's really needed), however neither of them is hot path. Note that the vma lock cannot be released in hugetlb_fault() when the migration entry is detected, because in migration_entry_wait_huge() the pgtable page will be used again (by taking the pgtable lock), so that also need to be protected by the vma lock. Modify migration_entry_wait_huge() so that it must be called with vma read lock held, and properly release the lock in __migration_entry_wait_huge(). Link: https://lkml.kernel.org/r/20221216155100.2043537-5-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Mike Kravetz Reviewed-by: John Hubbard Cc: Andrea Arcangeli Cc: David Hildenbrand Cc: James Houghton Cc: Jann Horn Cc: Miaohe Lin Cc: Muchun Song Cc: Nadav Amit Cc: Rik van Riel Signed-off-by: Andrew Morton commit fe7d4c6d5a42f5bdc63fdfdca2cad32c8a779e23 Author: Peter Xu Date: Fri Dec 16 10:50:54 2022 -0500 mm/hugetlb: document huge_pte_offset usage huge_pte_offset() is potentially a pgtable walker, looking up pte_t* for a hugetlb address. Normally, it's always safe to walk a generic pgtable as long as we're with the mmap lock held for either read or write, because that guarantees the pgtable pages will always be valid during the process. But it's not true for hugetlbfs, especially shared: hugetlbfs can have its pgtable freed by pmd unsharing, it means that even with mmap lock held for current mm, the PMD pgtable page can still go away from under us if pmd unsharing is possible during the walk. So we have two ways to make it safe even for a shared mapping: (1) If we're with the hugetlb vma lock held for either read/write, it's okay because pmd unshare cannot happen at all. (2) If we're with the i_mmap_rwsem lock held for either read/write, it's okay because even if pmd unshare can happen, the pgtable page cannot be freed from under us. Document it. Link: https://lkml.kernel.org/r/20221216155100.2043537-4-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: John Hubbard Reviewed-by: David Hildenbrand Cc: Andrea Arcangeli Cc: James Houghton Cc: Jann Horn Cc: Miaohe Lin Cc: Mike Kravetz Cc: Muchun Song Cc: Nadav Amit Cc: Rik van Riel Signed-off-by: Andrew Morton commit bb373dce2c7b473023f9e69f041a22d81171b71a Author: Peter Xu Date: Fri Dec 16 10:50:53 2022 -0500 mm/hugetlb: don't wait for migration entry during follow page That's what the code does with !hugetlb pages, so we should logically do the same for hugetlb, so migration entry will also be treated as no page. This is probably also the last piece in follow_page code that may sleep, the last one should be removed in cf994dd8af27 ("mm/gup: remove FOLL_MIGRATION", 2022-11-16). Link: https://lkml.kernel.org/r/20221216155100.2043537-3-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Mike Kravetz Reviewed-by: David Hildenbrand Reviewed-by: John Hubbard Cc: Andrea Arcangeli Cc: James Houghton Cc: Jann Horn Cc: Miaohe Lin Cc: Muchun Song Cc: Nadav Amit Cc: Rik van Riel Signed-off-by: Andrew Morton commit 243b1f2d3b09b6c813c2e4a179cdf5bfc878eb54 Author: Peter Xu Date: Fri Dec 16 10:50:52 2022 -0500 mm/hugetlb: let vma_offset_start() to return start Patch series "mm/hugetlb: Make huge_pte_offset() thread-safe for pmd unshare", v4. Problem ======= huge_pte_offset() is a major helper used by hugetlb code paths to walk a hugetlb pgtable. It's used mostly everywhere since that's needed even before taking the pgtable lock. huge_pte_offset() is always called with mmap lock held with either read or write. It was assumed to be safe but it's actually not. One race condition can easily trigger by: (1) firstly trigger pmd share on a memory range, (2) do huge_pte_offset() on the range, then at the meantime, (3) another thread unshare the pmd range, and the pgtable page is prone to lost if the other shared process wants to free it completely (by either munmap or exit mm). The recent work from Mike on vma lock can resolve most of this already. It's achieved by forbidden pmd unsharing during the lock being taken, so no further risk of the pgtable page being freed. It means if we can take the vma lock around all huge_pte_offset() callers it'll be safe. There're already a bunch of them that we did as per the latest mm-unstable, but also quite a few others that we didn't for various reasons especially on huge_pte_offset() usage. One more thing to mention is that besides the vma lock, i_mmap_rwsem can also be used to protect the pgtable page (along with its pgtable lock) from being freed from under us. IOW, huge_pte_offset() callers need to either hold the vma lock or i_mmap_rwsem to safely walk the pgtables. A reproducer of such problem, based on hugetlb GUP (NOTE: since the race is very hard to trigger, one needs to apply another kernel delay patch too, see below): ======8<======= #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #define MSIZE (1UL << 30) /* 1GB */ #define PSIZE (2UL << 20) /* 2MB */ #define HOLD_SEC (1) int pipefd[2]; void *buf; void *do_map(int fd) { unsigned char *tmpbuf, *p; int ret; ret = posix_memalign((void **)&tmpbuf, MSIZE, MSIZE); if (ret) { perror("posix_memalign() failed"); return NULL; } tmpbuf = mmap(tmpbuf, MSIZE, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED, fd, 0); if (tmpbuf == MAP_FAILED) { perror("mmap() failed"); return NULL; } printf("mmap() -> %p\n", tmpbuf); for (p = tmpbuf; p < tmpbuf + MSIZE; p += PSIZE) { *p = 1; } return tmpbuf; } void do_unmap(void *buf) { munmap(buf, MSIZE); } void proc2(int fd) { unsigned char c; buf = do_map(fd); if (!buf) return; read(pipefd[0], &c, 1); /* * This frees the shared pgtable page, causing use-after-free in * proc1_thread1 when soft walking hugetlb pgtable. */ do_unmap(buf); printf("Proc2 quitting\n"); } void *proc1_thread1(void *data) { /* * Trigger follow-page on 1st 2m page. Kernel hack patch needed to * withhold this procedure for easier reproduce. */ madvise(buf, PSIZE, MADV_POPULATE_WRITE); printf("Proc1-thread1 quitting\n"); return NULL; } void *proc1_thread2(void *data) { unsigned char c; /* Wait a while until proc1_thread1() start to wait */ sleep(0.5); /* Trigger pmd unshare */ madvise(buf, PSIZE, MADV_DONTNEED); /* Kick off proc2 to release the pgtable */ write(pipefd[1], &c, 1); printf("Proc1-thread2 quitting\n"); return NULL; } void proc1(int fd) { pthread_t tid1, tid2; int ret; buf = do_map(fd); if (!buf) return; ret = pthread_create(&tid1, NULL, proc1_thread1, NULL); assert(ret == 0); ret = pthread_create(&tid2, NULL, proc1_thread2, NULL); assert(ret == 0); /* Kick the child to share the PUD entry */ pthread_join(tid1, NULL); pthread_join(tid2, NULL); do_unmap(buf); } int main(void) { int fd, ret; fd = memfd_create("test-huge", MFD_HUGETLB | MFD_HUGE_2MB); if (fd < 0) { perror("open failed"); return -1; } ret = ftruncate(fd, MSIZE); if (ret) { perror("ftruncate() failed"); return -1; } ret = pipe(pipefd); if (ret) { perror("pipe() failed"); return -1; } if (fork()) { proc1(fd); } else { proc2(fd); } close(pipefd[0]); close(pipefd[1]); close(fd); return 0; } ======8<======= The kernel patch needed to present such a race so it'll trigger 100%: ======8<======= : diff --git a/mm/hugetlb.c b/mm/hugetlb.c : index 9d97c9a2a15d..f8d99dad5004 100644 : --- a/mm/hugetlb.c : +++ b/mm/hugetlb.c : @@ -38,6 +38,7 @@ : #include : #include : #include : +#include : : #include : #include : @@ -6290,6 +6291,7 @@ long follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma, : bool unshare = false; : int absent; : struct page *page; : + unsigned long c = 0; : : /* : * If we have a pending SIGKILL, don't keep faulting pages and : @@ -6309,6 +6311,13 @@ long follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma, : */ : pte = huge_pte_offset(mm, vaddr & huge_page_mask(h), : huge_page_size(h)); : + : + pr_info("%s: withhold 1 sec...\n", __func__); : + for (c = 0; c < 100; c++) { : + udelay(10000); : + } : + pr_info("%s: withhold 1 sec...done\n", __func__); : + : if (pte) : ptl = huge_pte_lock(h, mm, pte); : absent = !pte || huge_pte_none(huge_ptep_get(pte)); : ======8<======= It'll trigger use-after-free of the pgtable spinlock: ======8<======= [ 16.959907] follow_hugetlb_page: withhold 1 sec... [ 17.960315] follow_hugetlb_page: withhold 1 sec...done [ 17.960550] ------------[ cut here ]------------ [ 17.960742] DEBUG_LOCKS_WARN_ON(1) [ 17.960756] WARNING: CPU: 3 PID: 542 at kernel/locking/lockdep.c:231 __lock_acquire+0x955/0x1fa0 [ 17.961264] Modules linked in: [ 17.961394] CPU: 3 PID: 542 Comm: hugetlb-pmd-sha Not tainted 6.1.0-rc4-peterx+ #46 [ 17.961704] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 [ 17.962266] RIP: 0010:__lock_acquire+0x955/0x1fa0 [ 17.962516] Code: c0 0f 84 5f fe ff ff 44 8b 1d 0f 9a 29 02 45 85 db 0f 85 4f fe ff ff 48 c7 c6 75 50 83 82 48 c7 c7 1b 4b 7d 82 e8 d3 22 d8 00 <0f> 0b 31 c0 4c 8b 54 24 08 4c 8b 04 24 e9 [ 17.963494] RSP: 0018:ffffc90000e4fba8 EFLAGS: 00010096 [ 17.963704] RAX: 0000000000000016 RBX: fffffffffd3925a8 RCX: 0000000000000000 [ 17.963989] RDX: 0000000000000002 RSI: ffffffff82863ccf RDI: 00000000ffffffff [ 17.964276] RBP: 0000000000000000 R08: 0000000000000000 R09: ffffc90000e4fa58 [ 17.964557] R10: 0000000000000003 R11: ffffffff83162688 R12: 0000000000000000 [ 17.964839] R13: 0000000000000001 R14: ffff888105eac748 R15: 0000000000000001 [ 17.965123] FS: 00007f17c0a00640(0000) GS:ffff888277cc0000(0000) knlGS:0000000000000000 [ 17.965443] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 17.965672] CR2: 00007f17c09ffef8 CR3: 000000010c87a005 CR4: 0000000000770ee0 [ 17.965956] PKRU: 55555554 [ 17.966068] Call Trace: [ 17.966172] [ 17.966268] ? tick_nohz_tick_stopped+0x12/0x30 [ 17.966455] lock_acquire+0xbf/0x2b0 [ 17.966603] ? follow_hugetlb_page.cold+0x75/0x5c4 [ 17.966799] ? _printk+0x48/0x4e [ 17.966934] _raw_spin_lock+0x2f/0x40 [ 17.967087] ? follow_hugetlb_page.cold+0x75/0x5c4 [ 17.967285] follow_hugetlb_page.cold+0x75/0x5c4 [ 17.967473] __get_user_pages+0xbb/0x620 [ 17.967635] faultin_vma_page_range+0x9a/0x100 [ 17.967817] madvise_vma_behavior+0x3c0/0xbd0 [ 17.967998] ? mas_prev+0x11/0x290 [ 17.968141] ? find_vma_prev+0x5e/0xa0 [ 17.968304] ? madvise_vma_anon_name+0x70/0x70 [ 17.968486] madvise_walk_vmas+0xa9/0x120 [ 17.968650] do_madvise.part.0+0xfa/0x270 [ 17.968813] __x64_sys_madvise+0x5a/0x70 [ 17.968974] do_syscall_64+0x37/0x90 [ 17.969123] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 17.969329] RIP: 0033:0x7f1840f0efdb [ 17.969477] Code: c3 66 0f 1f 44 00 00 48 8b 15 39 6e 0e 00 f7 d8 64 89 02 b8 ff ff ff ff eb bc 0f 1f 44 00 00 f3 0f 1e fa b8 1c 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 0d 68 [ 17.970205] RSP: 002b:00007f17c09ffe38 EFLAGS: 00000202 ORIG_RAX: 000000000000001c [ 17.970504] RAX: ffffffffffffffda RBX: 00007f17c0a00640 RCX: 00007f1840f0efdb [ 17.970786] RDX: 0000000000000017 RSI: 0000000000200000 RDI: 00007f1800000000 [ 17.971068] RBP: 00007f17c09ffe50 R08: 0000000000000000 R09: 00007ffd3954164f [ 17.971353] R10: 00007f1840e10348 R11: 0000000000000202 R12: ffffffffffffff80 [ 17.971709] R13: 0000000000000000 R14: 00007ffd39541550 R15: 00007f17c0200000 [ 17.972083] [ 17.972199] irq event stamp: 2353 [ 17.972372] hardirqs last enabled at (2353): [] __up_console_sem+0x5e/0x70 [ 17.972869] hardirqs last disabled at (2352): [] __up_console_sem+0x43/0x70 [ 17.973365] softirqs last enabled at (2330): [] __irq_exit_rcu+0xed/0x160 [ 17.973857] softirqs last disabled at (2323): [] __irq_exit_rcu+0xed/0x160 [ 17.974341] ---[ end trace 0000000000000000 ]--- [ 17.974614] BUG: kernel NULL pointer dereference, address: 00000000000000b8 [ 17.975012] #PF: supervisor read access in kernel mode [ 17.975314] #PF: error_code(0x0000) - not-present page [ 17.975615] PGD 103f7b067 P4D 103f7b067 PUD 106cd7067 PMD 0 [ 17.975943] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 17.976197] CPU: 3 PID: 542 Comm: hugetlb-pmd-sha Tainted: G W 6.1.0-rc4-peterx+ #46 [ 17.976712] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 [ 17.977370] RIP: 0010:__lock_acquire+0x190/0x1fa0 [ 17.977655] Code: 98 00 00 00 41 89 46 24 81 e2 ff 1f 00 00 48 0f a3 15 e4 ba dd 02 0f 83 ff 05 00 00 48 8d 04 52 48 c1 e0 06 48 05 c0 d2 f4 83 <44> 0f b6 a0 b8 00 00 00 41 0f b7 46 20 6f [ 17.979170] RSP: 0018:ffffc90000e4fba8 EFLAGS: 00010046 [ 17.979787] RAX: 0000000000000000 RBX: fffffffffd3925a8 RCX: 0000000000000000 [ 17.980838] RDX: 0000000000000002 RSI: ffffffff82863ccf RDI: 00000000ffffffff [ 17.982048] RBP: 0000000000000000 R08: ffff888105eac720 R09: ffffc90000e4fa58 [ 17.982892] R10: ffff888105eab900 R11: ffffffff83162688 R12: 0000000000000000 [ 17.983771] R13: 0000000000000001 R14: ffff888105eac748 R15: 0000000000000001 [ 17.984815] FS: 00007f17c0a00640(0000) GS:ffff888277cc0000(0000) knlGS:0000000000000000 [ 17.985924] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 17.986265] CR2: 00000000000000b8 CR3: 000000010c87a005 CR4: 0000000000770ee0 [ 17.986674] PKRU: 55555554 [ 17.986832] Call Trace: [ 17.987012] [ 17.987266] ? tick_nohz_tick_stopped+0x12/0x30 [ 17.987770] lock_acquire+0xbf/0x2b0 [ 17.988118] ? follow_hugetlb_page.cold+0x75/0x5c4 [ 17.988575] ? _printk+0x48/0x4e [ 17.988889] _raw_spin_lock+0x2f/0x40 [ 17.989243] ? follow_hugetlb_page.cold+0x75/0x5c4 [ 17.989687] follow_hugetlb_page.cold+0x75/0x5c4 [ 17.990119] __get_user_pages+0xbb/0x620 [ 17.990500] faultin_vma_page_range+0x9a/0x100 [ 17.990928] madvise_vma_behavior+0x3c0/0xbd0 [ 17.991354] ? mas_prev+0x11/0x290 [ 17.991678] ? find_vma_prev+0x5e/0xa0 [ 17.992024] ? madvise_vma_anon_name+0x70/0x70 [ 17.992421] madvise_walk_vmas+0xa9/0x120 [ 17.992793] do_madvise.part.0+0xfa/0x270 [ 17.993166] __x64_sys_madvise+0x5a/0x70 [ 17.993539] do_syscall_64+0x37/0x90 [ 17.993879] entry_SYSCALL_64_after_hwframe+0x63/0xcd ======8<======= Resolution ========== This patchset protects all the huge_pte_offset() callers to also take the vma lock properly. Patch Layout ============ Patch 1-2: cleanup, or dependency of the follow up patches Patch 3: before fixing, document huge_pte_offset() on lock required Patch 4-8: each patch resolves one possible race condition Patch 9: introduce hugetlb_walk() to replace huge_pte_offset() Tests ===== The series is verified with the above reproducer so the race cannot trigger anymore. It also passes all hugetlb kselftests. This patch (of 9): Even though vma_offset_start() is named like that, it's not returning "the start address of the range" but rather the offset we should use to offset the vma->vm_start address. Make it return the real value of the start vaddr, and it also helps for all the callers because whenever the retval is used, it'll be ultimately added into the vma->vm_start anyway, so it's better. Link: https://lkml.kernel.org/r/20221216155100.2043537-1-peterx@redhat.com Link: https://lkml.kernel.org/r/20221216155100.2043537-2-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Mike Kravetz Reviewed-by: David Hildenbrand Reviewed-by: John Hubbard Cc: Andrea Arcangeli Cc: James Houghton Cc: Jann Horn Cc: Miaohe Lin Cc: Muchun Song Cc: Nadav Amit Cc: Rik van Riel Signed-off-by: Andrew Morton commit 379c2e60e82ff71510a949033bf8431f39f66c75 Author: Mike Kravetz Date: Mon Dec 12 15:50:42 2022 -0800 hugetlb: update vma flag check for hugetlb vma lock The check for whether a hugetlb vma lock exists partially depends on the vma's flags. Currently, it checks for either VM_MAYSHARE or VM_SHARED. The reason both flags are used is because VM_MAYSHARE was previously cleared in hugetlb vmas as they are tore down. This is no longer the case, and only the VM_MAYSHARE check is required. Link: https://lkml.kernel.org/r/20221212235042.178355-2-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Reviewed-by: Miaohe Lin Cc: "Aneesh Kumar K.V" Cc: David Hildenbrand Cc: James Houghton Cc: Mina Almasry Cc: Muchun Song Cc: Naoya Horiguchi Cc: Peter Xu Signed-off-by: Andrew Morton commit 11f75a01448f1b7a739e75dbd8f17b844fcfc510 Author: Jeff Xu Date: Thu Dec 15 00:12:05 2022 +0000 selftests/memfd: add tests for MFD_NOEXEC_SEAL MFD_EXEC Tests to verify MFD_NOEXEC, MFD_EXEC and vm.memfd_noexec sysctl. Link: https://lkml.kernel.org/r/20221215001205.51969-6-jeffxu@google.com Signed-off-by: Jeff Xu Co-developed-by: Daniel Verkamp Signed-off-by: Daniel Verkamp Reviewed-by: Kees Cook Cc: David Herrmann Cc: Dmitry Torokhov Cc: Hugh Dickins Cc: Jann Horn Cc: Jorge Lucangeli Obes Cc: kernel test robot Cc: Shuah Khan Signed-off-by: Andrew Morton commit c4f75bc8bd6b3d62665e1f5400c419540edb5601 Author: Jeff Xu Date: Thu Dec 15 00:12:04 2022 +0000 mm/memfd: add write seals when apply SEAL_EXEC to executable memfd In order to avoid WX mappings, add F_SEAL_WRITE when apply F_SEAL_EXEC to an executable memfd, so W^X from start. This implys application need to fill the content of the memfd first, after F_SEAL_EXEC is applied, application can no longer modify the content of the memfd. Typically, application seals the memfd right after writing to it. For example: 1. memfd_create(MFD_EXEC). 2. write() code to the memfd. 3. fcntl(F_ADD_SEALS, F_SEAL_EXEC) to convert the memfd to W^X. 4. call exec() on the memfd. Link: https://lkml.kernel.org/r/20221215001205.51969-5-jeffxu@google.com Signed-off-by: Jeff Xu Reviewed-by: Kees Cook Cc: Daniel Verkamp Cc: David Herrmann Cc: Dmitry Torokhov Cc: Hugh Dickins Cc: Jann Horn Cc: Jorge Lucangeli Obes Cc: kernel test robot Cc: Shuah Khan Signed-off-by: Andrew Morton commit 105ff5339f498af74e60d7662c8f1c4d21f1342d Author: Jeff Xu Date: Thu Dec 15 00:12:03 2022 +0000 mm/memfd: add MFD_NOEXEC_SEAL and MFD_EXEC The new MFD_NOEXEC_SEAL and MFD_EXEC flags allows application to set executable bit at creation time (memfd_create). When MFD_NOEXEC_SEAL is set, memfd is created without executable bit (mode:0666), and sealed with F_SEAL_EXEC, so it can't be chmod to be executable (mode: 0777) after creation. when MFD_EXEC flag is set, memfd is created with executable bit (mode:0777), this is the same as the old behavior of memfd_create. The new pid namespaced sysctl vm.memfd_noexec has 3 values: 0: memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL acts like MFD_EXEC was set. 1: memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL acts like MFD_NOEXEC_SEAL was set. 2: memfd_create() without MFD_NOEXEC_SEAL will be rejected. The sysctl allows finer control of memfd_create for old-software that doesn't set the executable bit, for example, a container with vm.memfd_noexec=1 means the old-software will create non-executable memfd by default. Also, the value of memfd_noexec is passed to child namespace at creation time. For example, if the init namespace has vm.memfd_noexec=2, all its children namespaces will be created with 2. [akpm@linux-foundation.org: add stub functions to fix build] [akpm@linux-foundation.org: remove unneeded register_pid_ns_ctl_table_vm() stub, per Jeff] [akpm@linux-foundation.org: s/pr_warn_ratelimited/pr_warn_once/, per review] [akpm@linux-foundation.org: fix CONFIG_SYSCTL=n warning] Link: https://lkml.kernel.org/r/20221215001205.51969-4-jeffxu@google.com Signed-off-by: Jeff Xu Co-developed-by: Daniel Verkamp Signed-off-by: Daniel Verkamp Reported-by: kernel test robot Reviewed-by: Kees Cook Cc: David Herrmann Cc: Dmitry Torokhov Cc: Hugh Dickins Cc: Jann Horn Cc: Jorge Lucangeli Obes Cc: Shuah Khan Signed-off-by: Andrew Morton commit 32d118ad50a5afecb74358bcefc5cb6ea6ccfc2b Author: Daniel Verkamp Date: Thu Dec 15 00:12:02 2022 +0000 selftests/memfd: add tests for F_SEAL_EXEC Basic tests to ensure that user/group/other execute bits cannot be changed after applying F_SEAL_EXEC to a memfd. Link: https://lkml.kernel.org/r/20221215001205.51969-3-jeffxu@google.com Signed-off-by: Daniel Verkamp Co-developed-by: Jeff Xu Signed-off-by: Jeff Xu Reviewed-by: Kees Cook Cc: David Herrmann Cc: Dmitry Torokhov Cc: Hugh Dickins Cc: Jann Horn Cc: Jorge Lucangeli Obes Cc: kernel test robot Cc: Shuah Khan Signed-off-by: Andrew Morton commit 6fd7353829cafc4067aad9eea0dc95da67e7df16 Author: Daniel Verkamp Date: Thu Dec 15 00:12:01 2022 +0000 mm/memfd: add F_SEAL_EXEC Patch series "mm/memfd: introduce MFD_NOEXEC_SEAL and MFD_EXEC", v8. Since Linux introduced the memfd feature, memfd have always had their execute bit set, and the memfd_create() syscall doesn't allow setting it differently. However, in a secure by default system, such as ChromeOS, (where all executables should come from the rootfs, which is protected by Verified boot), this executable nature of memfd opens a door for NoExec bypass and enables “confused deputy attack”. E.g, in VRP bug [1]: cros_vm process created a memfd to share the content with an external process, however the memfd is overwritten and used for executing arbitrary code and root escalation. [2] lists more VRP in this kind. On the other hand, executable memfd has its legit use, runc uses memfd’s seal and executable feature to copy the contents of the binary then execute them, for such system, we need a solution to differentiate runc's use of executable memfds and an attacker's [3]. To address those above, this set of patches add following: 1> Let memfd_create() set X bit at creation time. 2> Let memfd to be sealed for modifying X bit. 3> A new pid namespace sysctl: vm.memfd_noexec to control the behavior of X bit.For example, if a container has vm.memfd_noexec=2, then memfd_create() without MFD_NOEXEC_SEAL will be rejected. 4> A new security hook in memfd_create(). This make it possible to a new LSM, which rejects or allows executable memfd based on its security policy. This patch (of 5): The new F_SEAL_EXEC flag will prevent modification of the exec bits: written as traditional octal mask, 0111, or as named flags, S_IXUSR | S_IXGRP | S_IXOTH. Any chmod(2) or similar call that attempts to modify any of these bits after the seal is applied will fail with errno EPERM. This will preserve the execute bits as they are at the time of sealing, so the memfd will become either permanently executable or permanently un-executable. Link: https://lkml.kernel.org/r/20221215001205.51969-1-jeffxu@google.com Link: https://lkml.kernel.org/r/20221215001205.51969-2-jeffxu@google.com Signed-off-by: Daniel Verkamp Co-developed-by: Jeff Xu Signed-off-by: Jeff Xu Reviewed-by: Kees Cook Cc: Dmitry Torokhov Cc: Hugh Dickins Cc: Jann Horn Cc: Jorge Lucangeli Obes Cc: Shuah Khan Cc: David Herrmann Cc: kernel test robot Signed-off-by: Andrew Morton commit f1eb1bacfba9019823b2fce42383f010cd561fa6 Author: Peter Xu Date: Wed Dec 14 15:15:33 2022 -0500 mm/uffd: always wr-protect pte in pte|pmd_mkuffd_wp() This patch is a cleanup to always wr-protect pte/pmd in mkuffd_wp paths. The reasons I still think this patch is worthwhile, are: (1) It is a cleanup already; diffstat tells. (2) It just feels natural after I thought about this, if the pte is uffd protected, let's remove the write bit no matter what it was. (2) Since x86 is the only arch that supports uffd-wp, it also redefines pte|pmd_mkuffd_wp() in that it should always contain removals of write bits. It means any future arch that want to implement uffd-wp should naturally follow this rule too. It's good to make it a default, even if with vm_page_prot changes on VM_UFFD_WP. (3) It covers more than vm_page_prot. So no chance of any potential future "accident" (like pte_mkdirty() sparc64 or loongarch, even though it just got its pte_mkdirty fixed <1 month ago). It'll be fairly clear when reading the code too that we don't worry anything before a pte_mkuffd_wp() on uncertainty of the write bit. We may call pte_wrprotect() one more time in some paths (e.g. thp split), but that should be fully local bitop instruction so the overhead should be negligible. Although this patch should logically also fix all the known issues on uffd-wp too recently on page migration (not for numa hint recovery - that may need another explcit pte_wrprotect), but this is not the plan for that fix. So no fixes, and stable doesn't need this. Link: https://lkml.kernel.org/r/20221214201533.1774616-1-peterx@redhat.com Signed-off-by: Peter Xu Acked-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Ives van Hoorne Cc: Mike Kravetz Cc: Nadav Amit Signed-off-by: Andrew Morton commit 04a42e72d77a93a166b79c34b7bc862f55a53967 Author: Sidhartha Kumar Date: Wed Dec 14 22:17:57 2022 -0800 mm: move folio_set_compound_order() to mm/internal.h folio_set_compound_order() is moved to an mm-internal location so external folio users cannot misuse this function. Change the name of the function to folio_set_order() and use WARN_ON_ONCE() rather than BUG_ON. Also, handle the case if a non-large folio is passed and add clarifying comments to the function. Link: https://lore.kernel.org/lkml/20221207223731.32784-1-sidhartha.kumar@oracle.com/T/ Link: https://lkml.kernel.org/r/20221215061757.223440-1-sidhartha.kumar@oracle.com Fixes: 9fd330582b2f ("mm: add folio dtor and order setter functions") Signed-off-by: Sidhartha Kumar Suggested-by: Mike Kravetz Suggested-by: Muchun Song Suggested-by: Matthew Wilcox Suggested-by: John Hubbard Reviewed-by: John Hubbard Reviewed-by: Muchun Song Signed-off-by: Andrew Morton commit 1301f9313484f9eeb09904988b2aabd398492797 Merge: 0e18a6b49be20 7e3ce3f8d2d23 Author: Andrew Morton Date: Wed Jan 18 17:03:20 2023 -0800 Pull mm-hotfixes-stable dependencies into mm-stable. Merge branch 'mm-hotfixes-stable' into mm-stable commit 077010cef0aec280ac6eccc217395cbe8543d5a8 Merge: 18e6340365eab 5dc4c995db9eb Author: Andrew Morton Date: Wed Jan 18 16:52:33 2023 -0800 Sync with v6.2-rc4 Merge branch 'master' into mm-nonmm-stable commit 0e18a6b49be20ff8565838a8922387ce13f5f3a9 Merge: 12b98f333f6b4 5dc4c995db9eb Author: Andrew Morton Date: Wed Jan 18 16:51:53 2023 -0800 Sync with v6.2-rc4 Merge branch 'master' into mm-stable commit b894f2cf915479f9b25266da394942db9736161d Author: Dmitry Baryshkov Date: Wed Jan 11 08:04:02 2023 +0200 ARM: dts: qcom: apq8084: add clocks and clock-names to gcc device Add clocks and clock-names nodes to the gcc device to bind clocks using the DT links. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230111060402.1168726-13-dmitry.baryshkov@linaro.org commit 2069c701fc815343ddeb0331eec85046bdc34a4c Author: Dmitry Baryshkov Date: Wed Jan 11 08:04:01 2023 +0200 clk: qcom: mmcc-apq8084: use parent_hws/_data instead of parent_names Convert the clock driver to specify parent data rather than parent names, to actually bind using 'clock-names' specified in the DTS rather than global clock names. Use parent_hws where possible to refer parent clocks directly, skipping the lookup. Note, the system names for xo clocks were changed from "xo" to "xo_board" to follow the example of other platforms. This switches the clocks to use DT-provided "xo_board" clock instead of manually registered "xo" clock and allows us to drop qcom_cc_register_board_clk() call from the driver at some point. In the same way change the looked up system "sleep_clk_src" clock to "sleep_clk", which is registered from DT. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230111060402.1168726-12-dmitry.baryshkov@linaro.org commit 7b347f4b677b6d84687e67d82b6b17c6f55ea2b4 Author: Dmitry Baryshkov Date: Wed Jan 11 08:04:00 2023 +0200 clk: qcom: mmcc-apq8084: remove spdm clocks SPDM is used for debug/profiling and does not have any other functionality. These clocks can safely be removed. Suggested-by: Stephen Boyd Suggested-by: Georgi Djakov Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230111060402.1168726-11-dmitry.baryshkov@linaro.org commit 41d01f526b24141fb5b460e64f68b654da7afa71 Author: Dmitry Baryshkov Date: Wed Jan 11 08:03:59 2023 +0200 clk: qcom: mmcc-apq8084: move clock parent tables down Move clock parent tables down, after the PLL declrataions, so that we can use pll hw clock fields in the next commit. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230111060402.1168726-10-dmitry.baryshkov@linaro.org commit 891feb0bd0bf028f2fd1319dd1ebbbcc76eb5dfd Author: Dmitry Baryshkov Date: Wed Jan 11 08:03:58 2023 +0200 clk: qcom: mmcc-apq8084: use ARRAY_SIZE instead of specifying num_parents Use ARRAY_SIZE() instead of manually specifying num_parents. This makes adding/removing entries to/from parent_data easy and errorproof. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230111060402.1168726-9-dmitry.baryshkov@linaro.org commit cc0269b7604ef193cc5b230b86713baf1ce13a26 Author: Dmitry Baryshkov Date: Wed Jan 11 08:03:57 2023 +0200 clk: qcom: gcc-apq8084: add GCC_MMSS_GPLL0_CLK_SRC Add the GCC_MMSS_GPLL0_CLK_SRC, the branch clock gating gpll0 clock for the multimedia subsystem. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230111060402.1168726-8-dmitry.baryshkov@linaro.org commit 7179ab686d7853c4768cd45070e8f4068942d8c6 Author: Dmitry Baryshkov Date: Wed Jan 11 08:03:56 2023 +0200 clk: qcom: gcc-apq8084: use parent_hws/_data instead of parent_names Convert the clock driver to specify parent data rather than parent names, to actually bind using 'clock-names' specified in the DTS rather than global clock names. Use parent_hws where possible to refer parent clocks directly, skipping the lookup. Note, the system names for xo clocks were changed from "xo" to "xo_board" to follow the example of other platforms. This switches the clocks to use DT-provided "xo_board" clock instead of manually registered "xo" clock and allows us to drop qcom_cc_register_board_clk() call from the driver at some point. In the same way change the looked up system "sleep_clk_src" clock to "sleep_clk", which is registered from DT. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230111060402.1168726-7-dmitry.baryshkov@linaro.org commit a8121eeb4bde2dacbfa0bd59cb818ade96cd4a39 Author: Dmitry Baryshkov Date: Wed Jan 11 08:03:55 2023 +0200 clk: qcom: gcc-apq8084: 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. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230111060402.1168726-6-dmitry.baryshkov@linaro.org commit 21c348768f44ca3f28ccd06f06bf3e16660384c5 Author: Dmitry Baryshkov Date: Wed Jan 11 08:03:54 2023 +0200 clk: qcom: gcc-apq8084: use ARRAY_SIZE instead of specifying num_parents Use ARRAY_SIZE() instead of manually specifying num_parents. This makes adding/removing entries to/from parent_data easy and errorproof. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230111060402.1168726-5-dmitry.baryshkov@linaro.org commit 605f073812ecf40706de9c31ca3adaacb3829917 Author: Dmitry Baryshkov Date: Wed Jan 11 08:03:53 2023 +0200 dt-bindings: clock: qcom,mmcc: define clocks/clock-names for APQ8084 Define clock/clock-names properties of the MMCC device node to be used on APQ8084 platform. Acked-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230111060402.1168726-4-dmitry.baryshkov@linaro.org commit 93a63522dea6d288f2d44b7c75926343205cfec3 Author: Dmitry Baryshkov Date: Wed Jan 11 08:03:52 2023 +0200 dt-bindings: clock: qcom,gcc-apq8084: add GCC_MMSS_GPLL0_CLK_SRC Add GCC_MMSS_GPLL0_CLK_SRC, the branch clock gating gpll0 clock for the multimedia subsystem. Acked-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230111060402.1168726-3-dmitry.baryshkov@linaro.org commit 0df0a8f2d2e2ebf107db88377493ff5f0da9d528 Author: Dmitry Baryshkov Date: Wed Jan 11 08:03:51 2023 +0200 dt-bindings: clock: qcom,gcc-apq8084: define clocks/clock-names Define clock/clock-names properties of the GCC device node to be used on APQ8084 platform. Note: the driver uses a single pcie_pipe clock, however most probably there are two pipe clocks, one from each of PCIe QMP PHYs. Acked-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230111060402.1168726-2-dmitry.baryshkov@linaro.org commit 1a87f7e5fa10b23633da03aed6b7c7e716457304 Author: Bartosz Golaszewski Date: Mon Jan 9 18:44:56 2023 +0100 arm64: defconfig: enable the clock driver for Qualcomm SA8775P platforms Enable the GCC clock driver on SA8775P platforms. It needs to be built-in for console to work. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109174511.1740856-4-brgl@bgdev.pl commit e5988fd6004bb3ea5a9669933c1a9beaf7637990 Author: Krzysztof Kozlowski Date: Mon Jan 9 12:22:21 2023 +0100 arm64: dts: qcom: sm8250: drop unused properties from tx-macro Neither qcom,sm8250-lpass-tx-macro bindings nor the driver use "clock-frequency" and address/size cells properties. sm8250-mtp.dtb: txmacro@3220000: Unevaluated properties are not allowed ('clock-frequency', '#address-cells', '#size-cells' were unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109112221.102473-4-krzysztof.kozlowski@linaro.org commit a496f7decf4f86bcb34c78041d8db9690cc93aae Author: Krzysztof Kozlowski Date: Mon Jan 9 12:22:20 2023 +0100 arm64: dts: qcom: sm8250: drop unused clock-frequency from wsa-macro Neither qcom,sm8250-lpass-wsa-macro bindings nor the driver use "clock-frequency" property. sm8250-hdk.dtb: codec@3240000: Unevaluated properties are not allowed ('clock-frequency' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109112221.102473-3-krzysztof.kozlowski@linaro.org commit 8a220a62ebe2ade6ee371aa4fcbdb344b32264ad Author: Krzysztof Kozlowski Date: Mon Jan 9 12:22:19 2023 +0100 arm64: dts: qcom: align OPP table node name with DT schema Bindings expect OPP tables to start with "opp-table". Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109112221.102473-2-krzysztof.kozlowski@linaro.org commit 295bc7195810fea0303bfa6c4a754a12b185791b Author: Krzysztof Kozlowski Date: Mon Jan 9 12:22:18 2023 +0100 ARM: dts: qcom: align OPP table node name with DT schema Bindings expect OPP tables to start with "opp-table". Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109112221.102473-1-krzysztof.kozlowski@linaro.org commit 858b0d4b04ead05cdfec094a1e4b18865f28cedc Author: Dmitry Baryshkov Date: Mon Jan 9 07:14:02 2023 +0200 ARM: dts: qcom: rename mdp nodes to display-controller Follow the schema change and rename mdp nodes to generic name 'display-controller'. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109051402.317577-7-dmitry.baryshkov@linaro.org commit 19230930286005d7c733a5cb0ed8ebce9cad4423 Author: Dmitry Baryshkov Date: Mon Jan 9 07:14:00 2023 +0200 ARM: dts: qcom-msm8974: rename mdss node to display-subsystem Follow the schema change and rename mdss node to generic name 'display-subsystem'. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109051402.317577-5-dmitry.baryshkov@linaro.org commit 0aab1b9b75f01f72848526a3ba162f557dc159c5 Author: Dmitry Baryshkov Date: Mon Jan 9 07:14:01 2023 +0200 arm64: dts: qcom: rename mdp nodes to display-controller Follow the schema change and rename mdp nodes to generic name 'display-controller'. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109051402.317577-6-dmitry.baryshkov@linaro.org commit ecf0f5ff152bd8638c2a6868e459c8c4e605ca0c Author: Dmitry Baryshkov Date: Mon Jan 9 07:13:59 2023 +0200 arm64: dts: qcom: rename mdss nodes to display-subsystem Follow the schema change and rename mdss nodes to generic name 'display-subsystem'. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109051402.317577-4-dmitry.baryshkov@linaro.org commit 11691dab82e135c9a13cda49234ff3e76bba48d3 Author: Dmitry Baryshkov Date: Mon Jan 9 07:01:51 2023 +0200 ARM: dts: qcom-msm8974: add SoC specific compat string to mdp5 node Add SoC-specific compat string to the MDP5 device node to ease distinguishing between various platforms. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109050152.316606-4-dmitry.baryshkov@linaro.org commit d46fbd457913c4701c314c4cfabd9488844df8f0 Author: Dmitry Baryshkov Date: Mon Jan 9 07:01:52 2023 +0200 arm64: dts: qcom: add SoC specific compat strings to mdp5 nodes Add SoC-specific compat string to the MDP5 device nodes to ease distinguishing between various platforms. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109050152.316606-5-dmitry.baryshkov@linaro.org commit 877cff3568c0f54511d77918ae16b2d6e9a0dfce Author: Robert Marko Date: Sun Jan 8 14:04:40 2023 +0100 arm64: dts: qcom: ipq8074: correct USB3 QMP PHY-s clock output names It seems that clock-output-names for the USB3 QMP PHY-s where set without actually checking what is the GCC clock driver expecting, so clock core could never actually find the parents for usb0_pipe_clk_src and usb1_pipe_clk_src clocks in the GCC driver. So, correct the names to be what the driver expects so that parenting works. Before: gcc_usb0_pipe_clk_src 0 0 0 125000000 0 0 50000 Y gcc_usb1_pipe_clk_src 0 0 0 125000000 0 0 50000 Y After: usb3phy_0_cc_pipe_clk 1 1 0 125000000 0 0 50000 Y usb0_pipe_clk_src 1 1 0 125000000 0 0 50000 Y gcc_usb0_pipe_clk 1 1 0 125000000 0 0 50000 Y usb3phy_1_cc_pipe_clk 1 1 0 125000000 0 0 50000 Y usb1_pipe_clk_src 1 1 0 125000000 0 0 50000 Y gcc_usb1_pipe_clk 1 1 0 125000000 0 0 50000 Y Fixes: 5e09bc51d07b ("arm64: dts: ipq8074: enable USB support") Signed-off-by: Robert Marko Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230108130440.670181-2-robimarko@gmail.com commit 5f082ac76f44ee6e7e3b924e4c863687802d3f78 Author: Robert Marko Date: Sun Jan 8 14:04:39 2023 +0100 clk: qcom: ipq8074: populate fw_name for usb3phy-s Having only .name populated in parent_data for clocks which are only globally searchable currently will not work as the clk core won't copy that name if there is no .fw_name present as well. So, populate .fw_name for usb3phy clocks in parent_data as they were missed by me in ("clk: qcom: ipq8074: populate fw_name for all parents"). Fixes: ae55ad32e273 ("clk: qcom: ipq8074: convert to parent data") Signed-off-by: Robert Marko Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230108130440.670181-1-robimarko@gmail.com commit 41adc65ca5a4a3a651def2ae84ccbef7eed7cb24 Author: Siddharth Manthan Date: Sat Jan 7 19:19:11 2023 +0500 arm64: dts: qcom: Add device tree for Samsung Galaxy Tab A 8.0 (2015) Galaxy Tab A 8.0 is a tablet, very similar to Tab A 9.7 with major differences being the display and touchscreen. Add it's devicetree reusing a common dtsi from gt510. Signed-off-by: Siddharth Manthan [Squashed multiple commits] Reviewed-by: Konrad Dybcio Signed-off-by: Nikita Travkin Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230107141911.47229-4-nikita@trvn.ru commit 7cc406151a99ec1643ed8bf3c52fa5fbdf74238f Author: Jasper Korten Date: Sat Jan 7 19:19:10 2023 +0500 arm64: dts: qcom: Add device tree for Samsung Galaxy Tab A 9.7 (2015) The Galaxy Tab A 9.7 (2015) is a Snapdragon 410 based tablet. This commit introduces basic support for the tablet including the following features: - SDHCI (internal and external storage) - USB Device Mode - UART - Regulators - WCNSS (WiFi/BT) - GPIO keys - Fuel gauge - Touchscreen - Accelerometer Part of the DT is split out into a common dtsi since the tablet shares majority of the design with another variant having a different screen size. Signed-off-by: Jasper Korten Co-developed-by: Siddharth Manthan Signed-off-by: Siddharth Manthan Co-developed-by: Nikita Travkin Signed-off-by: Nikita Travkin Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230107141911.47229-3-nikita@trvn.ru commit d3f5468472d3bdf2bd6e66aaca42e66ec00668b1 Author: Nikita Travkin Date: Sat Jan 7 19:19:09 2023 +0500 dt-bindings: qcom: Document samsung,gt58 and gt510 gt58 and gt510 are Samsung Galaxy Tab A 8.0/9.7 (2015) tablets. Document their compatibles. Acked-by: Krzysztof Kozlowski Signed-off-by: Nikita Travkin Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230107141911.47229-2-nikita@trvn.ru commit fa5573edd01e6dcf5aa2b2298be2a35d04917148 Author: Brian Masney Date: Tue Jan 3 13:22:29 2023 -0500 arm64: dts: qcom: sc8280xp: add rng device tree node Add the necessary device tree node for qcom,prng-ee so we can use the hardware random number generator. This functionality was tested on a SA8540p automotive development board using kcapi-rng from libkcapi. Signed-off-by: Brian Masney Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103182229.37169-11-bmasney@redhat.com commit 1db9c1d1273904b13cef0e76690395a416e41dd4 Author: Brian Masney Date: Tue Jan 3 13:22:28 2023 -0500 arm64: dts: qcom: sc8280xp: add aliases for i2c4 and i2c21 Add aliases for i2c4 and i2c21 to the crd and x13s DTS files so that what's exposed to userspace doesn't change in the future if additional i2c buses are enabled on these platforms. Signed-off-by: Brian Masney Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103182229.37169-10-bmasney@redhat.com commit e073899ec3e14d3a9fe7ac62469c1768f4bb7fe0 Author: Brian Masney Date: Tue Jan 3 13:22:27 2023 -0500 arm64: dts: qcom: sa8540p-ride: add i2c nodes Add the necessary nodes in order to get i2c0, i2c1, i2c12, i2c15, and i2c18 functioning on the automotive board and exposed to userspace. This work was derived from various patches that Qualcomm delivered to Red Hat in a downstream kernel. This change was validated by using i2c-tools 4.3.3 on CentOS Stream 9: [root@localhost ~]# i2cdetect -l i2c-0 i2c Geni-I2C I2C adapter i2c-1 i2c Geni-I2C I2C adapter i2c-12 i2c Geni-I2C I2C adapter i2c-15 i2c Geni-I2C I2C adapter i2c-18 i2c Geni-I2C I2C adapter [root@localhost ~]# i2cdetect -a -y 15 Warning: Can't use SMBus Quick Write command, will skip some addresses 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: 10: 20: 30: -- -- -- -- -- -- -- -- 40: 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: 70: Signed-off-by: Brian Masney Reviewed-by: Konrad Dybcio Tested-by: Shazad Hussain Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103182229.37169-9-bmasney@redhat.com commit 3d256a90b3bf596d2fe318bba15339aa902d406e Author: Brian Masney Date: Tue Jan 3 13:22:26 2023 -0500 arm64: dts: qcom: sc8280xp: add missing spi nodes Add the missing nodes for the spi buses that's present on this SoC. This work was derived from various patches that Qualcomm delivered to Red Hat in a downstream kernel. Signed-off-by: Brian Masney Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103182229.37169-8-bmasney@redhat.com commit 645aaf0a3826ba18a6f31993e721189666525cfc Author: Brian Masney Date: Tue Jan 3 13:22:25 2023 -0500 arm64: dts: qcom: sc8280xp: add missing i2c nodes Add the missing nodes for the i2c buses that's present on this SoC. This work was derived from various patches that Qualcomm delivered to Red Hat in a downstream kernel. Signed-off-by: Brian Masney Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103182229.37169-7-bmasney@redhat.com commit 31e62e862a1ed8711fc973675c74848595422180 Author: Brian Masney Date: Tue Jan 3 13:22:24 2023 -0500 arm64: dts: qcom: sc8280xp: rename qup0_i2c4 to i2c4 In preparation for adding the missing SPI and I2C nodes to sc8280xp.dtsi, it was decided to rename all of the existing qupX_ uart, spi, and i2c nodes to drop the qupX_ prefix. Let's go ahead and rename qup0_i2c4 to i2c4. Note that some nodes are moved in the file by this patch to preserve the expected sort order in the file. Additionally, the properties within the pinctrl state node are sorted to match the expected order that's typically done in other DTs. Signed-off-by: Brian Masney Link: https://lore.kernel.org/lkml/20221212182314.1902632-1-bmasney@redhat.com/ Reviewed-by: Konrad Dybcio Reviewed-by: Johan Hovold Tested-by: Steev Klimaszewski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103182229.37169-6-bmasney@redhat.com commit 6e1569ddfa64be0a6d6bd16aa85568a6175384a2 Author: Brian Masney Date: Tue Jan 3 13:22:23 2023 -0500 arm64: dts: qcom: sc8280xp: rename qup2_i2c5 to i2c21 In preparation for adding the missing SPI and I2C nodes to sc8280xp.dtsi, it was decided to rename all of the existing qupX_ uart, spi, and i2c nodes to drop the qupX_ prefix. Let's go ahead and rename qup2_i2c5 to i2c21. Under the old name, this was the 5th index under qup2, which starts at index 16. Note that some nodes are moved in the file by this patch to preserve the expected sort order in the file. Additionally, the properties within the pinctrl state node are sorted to match the expected order that's typically done in other DTs. Signed-off-by: Brian Masney Link: https://lore.kernel.org/lkml/20221212182314.1902632-1-bmasney@redhat.com/ Reviewed-by: Konrad Dybcio Reviewed-by: Johan Hovold Tested-by: Steev Klimaszewski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103182229.37169-5-bmasney@redhat.com commit 71bc1b42844fc0f596da28441c45ab67c5664fb2 Author: Brian Masney Date: Tue Jan 3 13:22:22 2023 -0500 arm64: dts: qcom: sc8280xp: rename qup2_uart17 to uart17 In preparation for adding the missing SPI and I2C nodes to sc8280xp.dtsi, it was decided to rename all of the existing qupX_ uart, spi, and i2c nodes to drop the qupX_ prefix. Let's go ahead and rename qup2_uart17 to uart17. Note that some nodes are moved in the file by this patch to preserve the expected sort order in the file. Signed-off-by: Brian Masney Link: https://lore.kernel.org/lkml/20221212182314.1902632-1-bmasney@redhat.com/ Reviewed-by: Konrad Dybcio Reviewed-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103182229.37169-4-bmasney@redhat.com commit 1d09705a6456ade74734f408e09a033c1542d426 Author: Konrad Dybcio Date: Mon Jan 2 10:46:42 2023 +0100 arm64: dts: qcom: sm6115: Pad addresses to 8 hex digits Some addresses were 7-hex-digits long, or less. Fix that. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102094642.74254-18-konrad.dybcio@linaro.org commit 690e8993ccac24e9b15d550a6db9ce7e3fc5a51b Author: Konrad Dybcio Date: Mon Jan 2 10:46:41 2023 +0100 arm64: dts: qcom: msm8994-kitakami: Pad addresses to 8 hex digits Some addresses were 7-hex-digits long, or less. Fix that. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102094642.74254-17-konrad.dybcio@linaro.org commit a58cde4d66e18a1b1f270488a03b471bdbb956c1 Author: Konrad Dybcio Date: Mon Jan 2 10:46:40 2023 +0100 arm64: dts: qcom: sm8450: Pad addresses to 8 hex digits Some addresses were 7-hex-digits long, or less. Fix that. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102094642.74254-16-konrad.dybcio@linaro.org commit 426900a959b361b97890a66166c1183d58731a58 Author: Konrad Dybcio Date: Mon Jan 2 10:46:39 2023 +0100 arm64: dts: qcom: msm8994-octagon: Pad addresses to 8 hex digits Some addresses were 7-hex-digits long, or less. Fix that. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102094642.74254-15-konrad.dybcio@linaro.org commit 94ca994d7e932cd36b7e19ff4bdd3aec8f04330e Author: Konrad Dybcio Date: Mon Jan 2 10:46:38 2023 +0100 arm64: dts: qcom: sc7280: Pad addresses to 8 hex digits Some addresses were 7-hex-digits long, or less. Fix that. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102094642.74254-14-konrad.dybcio@linaro.org commit 26c471991dc852cf2df9bf857f93734390ae3c34 Author: Konrad Dybcio Date: Mon Jan 2 10:46:37 2023 +0100 arm64: dts: qcom: sc7180: Pad addresses to 8 hex digits Some addresses were 7-hex-digits long, or less. Fix that. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102094642.74254-13-konrad.dybcio@linaro.org commit f3c08ae6fea78fc1bd9b633e494b3d60cc1844db Author: Konrad Dybcio Date: Mon Jan 2 10:46:36 2023 +0100 arm64: dts: qcom: sm8350: Pad addresses to 8 hex digits Some addresses were 7-hex-digits long, or less. Fix that. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102094642.74254-12-konrad.dybcio@linaro.org commit 81f43efce4e1fdd2c65143dd05bd69fae563c3f0 Author: Konrad Dybcio Date: Mon Jan 2 10:46:35 2023 +0100 arm64: dts: qcom: sm8250: Pad addresses to 8 hex digits Some addresses were 7-hex-digits long, or less. Fix that. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102094642.74254-11-konrad.dybcio@linaro.org commit 524ac48fcccd9e99b4d106049445186e9cb604b6 Author: Konrad Dybcio Date: Mon Jan 2 10:46:34 2023 +0100 arm64: dts: qcom: sdm845: Pad addresses to 8 hex digits Some addresses were 7-hex-digits long, or less. Fix that. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102094642.74254-10-konrad.dybcio@linaro.org commit f48dbb34e4e0fd9bcd22c82e4610e0b426a3f1f3 Author: Konrad Dybcio Date: Mon Jan 2 10:46:33 2023 +0100 arm64: dts: qcom: sm6350: Pad addresses to 8 hex digits Some addresses were 7-hex-digits long, or less. Fix that. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102094642.74254-9-konrad.dybcio@linaro.org commit f69732296a7426afcb5153cf4475a10bc8f15516 Author: Konrad Dybcio Date: Mon Jan 2 10:46:32 2023 +0100 arm64: dts: qcom: sm8150: Pad addresses to 8 hex digits Some addresses were 7-hex-digits long, or less. Fix that. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102094642.74254-8-konrad.dybcio@linaro.org commit 8d5bf0b2dca784f0c1003d754556276ec2d54c75 Author: Konrad Dybcio Date: Mon Jan 2 10:46:31 2023 +0100 arm64: dts: qcom: sc8280xp: Pad addresses to 8 hex digits Some addresses were 7-hex-digits long, or less. Fix that. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102094642.74254-7-konrad.dybcio@linaro.org commit 7356ae3e10abd1d71f06ff0b8a8e72aa7c955c57 Author: Konrad Dybcio Date: Mon Jan 2 10:46:30 2023 +0100 arm64: dts: qcom: ipq6018: Use lowercase hex One value escaped my previous lowercase hexification. Take care of it. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102094642.74254-6-konrad.dybcio@linaro.org commit 6db9ed9a128cbae1423d043f3debd8bfa77783fd Author: Konrad Dybcio Date: Mon Jan 2 10:46:29 2023 +0100 arm64: dts: qcom: ipq6018: Add/remove some newlines Some lines were broken very aggresively, presumably to fit under 80 chars and some places could have used a newline, particularly between subsequent nodes. Address all that and remove redundant comments near PCIe ranges while at it so as not to exceed 100 chars needlessly. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102094642.74254-5-konrad.dybcio@linaro.org commit 2c6e322a41c5e1ca45be50b9d5fbcda62dc23a0d Author: Konrad Dybcio Date: Mon Jan 2 10:46:28 2023 +0100 arm64: dts: qcom: ipq6018: Sort nodes properly Order nodes by unit address if one exists and alphabetically otherwise. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102094642.74254-4-konrad.dybcio@linaro.org commit c2596b717e9d96ae57c45481acfbafe9d3d54e56 Author: Konrad Dybcio Date: Mon Jan 2 10:46:27 2023 +0100 arm64: dts: qcom: ipq6018: Fix up indentation The dwc3 subnode was indented using spaces for some reason and other properties were not exactly properly indented. Fix it. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102094642.74254-3-konrad.dybcio@linaro.org commit 647380e41520c7dbd651ebf0d9fd7dfa4928f42d Author: Konrad Dybcio Date: Mon Jan 2 10:46:26 2023 +0100 arm64: dts: qcom: ipq6018: Pad addresses to 8 hex digits Some addresses were 7-hex-digits long, or less. Fix that. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102094642.74254-2-konrad.dybcio@linaro.org commit 1eeef306b5d80494cdb149f058013c3ab43984b4 Author: Abel Vesa Date: Thu Jan 19 01:05:26 2023 +0200 arm64: dts: qcom: sm8550-mtp: Add PCIe PHYs and controllers nodes Enable PCIe controllers and PHYs nodes on SM8550 MTP board. Co-developed-by: Neil Armstrong Signed-off-by: Neil Armstrong Signed-off-by: Abel Vesa Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230118230526.1499328-3-abel.vesa@linaro.org commit 7d1158c984d37e79ab8bb55ab152a0b35566cb89 Author: Abel Vesa Date: Thu Jan 19 01:05:25 2023 +0200 arm64: dts: qcom: sm8550: Add PCIe PHYs and controllers nodes Add PCIe controllers and PHY nodes. Signed-off-by: Abel Vesa Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230118230526.1499328-2-abel.vesa@linaro.org commit 6c409f633f2373adf6815365876a206d7919fca2 Author: Neil Armstrong Date: Wed Jan 18 17:25:13 2023 +0100 arm64: dts: qcom: sm8550-mtp: enable adsp, cdsp & mdss Add the aDSP, cDSP and MPSS firmware and "Devicetree" firmware paths for the SM8550 MTP platform. Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221115-topic-sm8550-upstream-dts-remoteproc-v3-3-815a1753de34@linaro.org commit d0c061e366ed55ba81ee11a7b648d4c87ebc8517 Author: Neil Armstrong Date: Wed Jan 18 17:25:12 2023 +0100 arm64: dts: qcom: sm8550: add adsp, cdsp & mdss nodes This adds support for the aDSP, cDSP and MPSS Subsystems found in the SM8550 SoC. The aDSP, cDSP and MPSS needs: - smp2p nodes to get event back from the subsystems - remoteproc nodes with glink-edge subnodes providing all needed resources to start and run the subsystems In addition, the MPSS Subsystem needs a rmtfs_mem dedicated memory zone. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221115-topic-sm8550-upstream-dts-remoteproc-v3-2-815a1753de34@linaro.org commit 2e3790de9b18f1e4761e44332ee50f4147282152 Author: Abel Vesa Date: Wed Jan 18 17:25:11 2023 +0100 arm64: dts: qcom: sm8550: Add interconnect path to SCM node Add the interconnect path to SCM dts node. Signed-off-by: Abel Vesa Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221115-topic-sm8550-upstream-dts-remoteproc-v3-1-815a1753de34@linaro.org commit a74c41f6dd83e37e14b07bc6dca795110a6a16d7 Author: Neil Armstrong Date: Wed Jan 18 15:24:58 2023 +0100 arm64: dts: qcom: sm8550-mtp: add DSI panel Add nodes for the Visionox VTDR6130 found on the SM8550-MTP device. TLMM states are also added for the Panel reset GPIO and Tearing Effect signal for when the panel is running in DSI Command mode. Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230104-topic-sm8550-upstream-dts-display-v4-3-1729cfc0e5db@linaro.org commit 69e6a5e29b3b02ddc5e24228b3c874f266d57b4f Author: Neil Armstrong Date: Wed Jan 18 15:24:57 2023 +0100 arm64: dts: qcom: sm8550-mtp: enable display hardware Enable MDSS/DPU/DSI0 on SM8550-MTP device. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230104-topic-sm8550-upstream-dts-display-v4-2-1729cfc0e5db@linaro.org commit d7da51db5b81a04f3d6f36293010ded8bef9e297 Author: Neil Armstrong Date: Wed Jan 18 15:24:56 2023 +0100 arm64: dts: qcom: sm8550: add display hardware devices Add devices tree nodes describing display hardware on SM8550: - Display Clock Controller - MDSS - MDP - two DSI controllers and DSI PHYs This does not provide support for DP controllers present on the SM8550. Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230104-topic-sm8550-upstream-dts-display-v4-1-1729cfc0e5db@linaro.org commit 85e182b48a33a44f3e0cfe6e7ee9da15baa0afce Author: Johan Hovold Date: Mon Jan 16 17:42:36 2023 +0100 scsi: ufs: qcom: dt-bindings: Allow 'dma-coherent' property UFS controllers may be cache coherent and must be marked as such in the devicetree to avoid data corruption. This is specifically needed on recent Qualcomm platforms like SC8280XP. Reviewed-by: Rob Herring Reviewed-by: Bjorn Andersson Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230116164236.18958-1-johan+linaro@kernel.org Signed-off-by: Martin K. Petersen commit 54c51253b3d5544943fc3ec072cd0194915bac30 Author: Tom Rix Date: Fri Jan 13 20:37:24 2023 -0500 scsi: qla2xxx: Make qla_trim_buf() and __qla_adjust_buf() static Smatch reports: drivers/scsi/qla2xxx/qla_mid.c:1189:6: warning: symbol 'qla_trim_buf' was not declared. Should it be static? drivers/scsi/qla2xxx/qla_mid.c:1221:6: warning: symbol '__qla_adjust_buf' was not declared. Should it be static? These functions are only used in qla_mid.c, so they should be static. Fixes: 1f8f9c34127e ("scsi: qla2xxx: edif: Reduce memory usage during low I/O") Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230114013724.3943580-1-trix@redhat.com Signed-off-by: Martin K. Petersen commit a3e2e248fd77a00931320875910ef73e071ac7dd Author: Fabio M. De Francesco Date: Tue Jan 3 19:25:56 2023 +0100 scsi: ipr: Replace kmap() with kmap_local_page() The use of kmap() is deprecated in favor of kmap_local_page(). There are two main problems with kmap(): (1) It comes with an overhead as the mapping space is restricted and protected by a global lock for synchronization and (2) it also requires global TLB invalidation when the kmap’s pool wraps and it might block when the mapping space is fully utilized until a slot becomes available. With kmap_local_page() the mappings are per thread, CPU local, can take page faults, and can be called from any context (including interrupts). It is faster than kmap() in kernels with HIGHMEM enabled. Furthermore, the tasks can be preempted and, when they are scheduled to run again, the kernel virtual addresses are restored and still valid. Therefore, replace kmap() with kmap_local_page() in ipr_copy_ucode_buffer() and, instead of open-coding local mappings + memcpy() + local un-mappings, use the better suited memcpy_to_page() helper. Suggested-by: Ira Weiny Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20230103182556.29080-1-fmdefrancesco@gmail.com Signed-off-by: Martin K. Petersen commit 7edd053b3327a3d4e3378c9f932cf959d3249c7f Author: Fabio M. De Francesco Date: Tue Jan 3 18:31:31 2023 +0100 scsi: ips: Replace kmap_atomic() with kmap_local_page() kmap_atomic() is deprecated in favor of kmap_local_page(). Therefore, replace kmap_atomic() with kmap_local_page() in ips_is_passthru(). In the meantime remove an unnecessary comment, align code, and remove spaces. kmap_atomic() is implemented like a kmap_local_page() which also disables page-faults and preemption (the latter only for !PREEMPT_RT kernels). The code within the mapping/unmapping in ips_is_passthru() is already in atomic context because of a call to local_irq_save() and kmap_local_page() can be called in atomic context too (including interrupts). Therefore, a mere replacement of the old API with the new one is all it is required (i.e., there is no need to explicitly add any calls to pagefault_disable() and/or preempt_disable()). Suggested-by: Ira Weiny Signed-off-by: Fabio M. De Francesco Reviewed-by: Ira Weiny Link: https://lore.kernel.org/r/20230103173131.21259-1-fmdefrancesco@gmail.com Signed-off-by: Martin K. Petersen commit 1eeedfad9a14898dd1522a6c77d8b33ac2e4b780 Author: Paul Menzel Date: Tue Jan 3 16:04:37 2023 +0100 scsi: mpt3sas: Demote log level for trace buffer allocation to info Linux logs the error below: $ dmesg --level=err | grep mpt [ 7.647675] mpt3sas_cm0: Trace buffer memory 2048 KB allocated This state does not denote an error condition (and also no warning), so demote the level from error to info. Cc: it+linux-scsi@molgen.mpg.de Signed-off-by: Paul Menzel Link: https://lore.kernel.org/r/20230103150438.45922-1-pmenzel@molgen.mpg.de Signed-off-by: Martin K. Petersen commit 411f657db2c2245d293a95685d8a907f0e1193e5 Merge: 66129812050b1 553f9bd45554a Author: Bjorn Andersson Date: Wed Jan 18 17:35:55 2023 -0600 Merge branch '20230103-topic-sm8550-upstream-dispcc-v3-1-8a03d348c572@linaro.org' into HEAD Merge the DT binding in order to get the dispcc include file. commit 109366b1b0a471fe1b2944ebafce0c6cee012c40 Merge: 08c51ceb12f7c 553f9bd45554a Author: Bjorn Andersson Date: Wed Jan 18 17:35:01 2023 -0600 Merge branch '20230103-topic-sm8550-upstream-dispcc-v3-1-8a03d348c572@linaro.org' into clk-for-6.3 commit 553f9bd45554aa477ae6114dc092a2f85285c46b Author: Neil Armstrong Date: Mon Jan 9 16:47:21 2023 +0100 dt-bindings: clock: document SM8550 DISPCC clock controller Document device tree bindings for display clock controller for Qualcomm SM8550 SoC. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103-topic-sm8550-upstream-dispcc-v3-1-8a03d348c572@linaro.org commit d794a23113b1a198e3d05f144aeba5b6ac87fe99 Author: Arnd Bergmann Date: Tue Jan 17 18:00:15 2023 +0100 scsi: qla2xxx: Fix printk() format string Printing a size_t value that is the result of the sizeof() operator requires using the %z format string modifier to avoid a warning on 32-bit architectures: drivers/scsi/qla2xxx/qla_mid.c: In function 'qla_create_buf_pool': drivers/scsi/qla2xxx/qla_mid.c:1094:51: error: format '%ld' expects argument of type 'long int', but argument 5 has type 'unsigned int' [-Werror=format=] 1094 | "Failed to allocate buf_map(%ld).\n", sz * sizeof(unsigned long)); | ~~^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | long int unsigned int | %d Fixes: 82d8dfd2a238 ("scsi: qla2xxx: edif: Fix performance dip due to lock contention") Signed-off-by: Arnd Bergmann Reviewed-by: Bart Van Assche Reviewed-by: Himanshu Madhani > Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/r/20230117170029.2387516-1-arnd@kernel.org Signed-off-by: Martin K. Petersen commit 66129812050b17567c3447c34f797c32a575be30 Author: Pavankumar Kondeti Date: Tue Jan 17 15:05:33 2023 +0530 arm64: dts: qcom: sm8550: fix xo clock source in cpufreq-hw node Currently, available frequencies for all CPUs are appearing as 2x of the actual frequencies. Use xo clock source as bi_tcxo in the cpufreq-hw node to fix this. Signed-off-by: Pavankumar Kondeti Tested-by: Abel Vesa Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117093533.3710000-1-quic_pkondeti@quicinc.com commit 83a54e61b2bdfd81865bee12033b1d9d5af0016f Author: Markuss Broks Date: Fri Jan 6 14:31:49 2023 +0000 arm64: dts: qcom: msm8916-samsung-j5-common: Add MUIC support The MUIC installed is a part of SM5703 MFD, and it seems to work the same as the SM5502 MUIC unit. Signed-off-by: Markuss Broks [Apply for msm8916-samsung-j5x] Signed-off-by: Lin, Meng-Bo Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230106143051.547302-1-linmengbo0689@protonmail.com commit 027523b77c0cecf4e4afbb7c587aaa10fd33b510 Author: Lin, Meng-Bo Date: Fri Jan 6 14:31:28 2023 +0000 arm64: dts: qcom: msm8916-samsung-j5-common: Add Hall sensor Samsung Galaxy J5 2015 and 2016 have a Hall sensor on GPIO pin 52. Add GPIO Hall sensor for them. Signed-off-by: Lin, Meng-Bo Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230106143037.547248-1-linmengbo0689@protonmail.com commit 4414bdf9c56513f6f706bc936cb9e35126ac8773 Author: Lin, Meng-Bo Date: Fri Jan 6 14:31:19 2023 +0000 arm64: dts: qcom: msm8916-samsung-j5-common: Add new device trees After moving msm8916-samsung-j5.dts to msm8916-samsung-j5-common.dtsi, Add new J5 2016 device tree. [Add j5x device tree] Co-developed-by: Josef W Menad Signed-off-by: Josef W Menad [Use &pm8916_usbin as USB extcon and add chassis-type for j5x] Co-developed-by: Stephan Gerhold Signed-off-by: Stephan Gerhold [Use common init device tree] Signed-off-by: Lin, Meng-Bo Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230106143024.547194-1-linmengbo0689@protonmail.com commit 66e9ba516be3c165b1adf86ed2bd7e2ec4a3b578 Author: Lin, Meng-Bo Date: Fri Jan 6 14:31:11 2023 +0000 arm64: dts: qcom: msm8916-samsung-j5-common: Add initial common device tree The smartphones below are using the MSM8916 SoC, which are released in 2015-2016: Samsung Galaxy J5 2015 (SM-J500*) Samsung Galaxy J5 2016 (SM-J510*) Move msm8916-samsung-j5.dts to msm8916-samsung-j5-common.dtsi, and add a common device tree for with initial support for: - GPIO keys - SDHCI (internal and external storage) - USB Device Mode - UART (on USB connector via the SM5703 MUIC) - WCNSS (WiFi/BT) - Regulators The two devices (all other variants of J5 released in 2015 and J5X released in 2016) are very similar, with some differences in display and GPIO pins. The common parts are shared in msm8916-samsung-j5-common.dtsi to reduce duplication. This patch rewrites J5 2015 devices, later patches will add support for other models. Signed-off-by: Lin, Meng-Bo Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230106143010.547140-1-linmengbo0689@protonmail.com commit 60bf8740870e0377f29b44593c0bfbab379b4909 Author: Luca Weiss Date: Wed Jan 4 13:37:59 2023 -0600 arm64: dts: qcom: sm7225-fairphone-fp4: enable IPA IPA is used for mobile data. Enable it. Signed-off-by: Luca Weiss Signed-off-by: Alex Elder Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230104193759.3286014-3-elder@linaro.org commit aed7154a30239f0275b13d622e1edd9d4d356308 Author: Luca Weiss Date: Wed Jan 4 13:37:58 2023 -0600 arm64: dts: qcom: sm6350: add IPA node IPA is used for mobile data. Add a node describing it. Signed-off-by: Luca Weiss Signed-off-by: Alex Elder Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230104193759.3286014-2-elder@linaro.org commit bba952275b81971d329189a879a5611bc8eb0dd1 Author: Konrad Dybcio Date: Wed Jan 4 18:16:42 2023 +0100 arm64: dts: qcom: sm6350: Set up DDR & L3 scaling Add the CPU OPP tables including core frequency and L3 bus frequency. The L3 throughput values were chosen by studying the frequencies available in HW LUT and picking the highest one that's less than the CPU frequency. DDR clock rates come from the vendor kernel. Available values from the HW LUT: 300000000 556800000 652800000 806400000 844800000 940800000 1132800000 1209600000 1286400000 1401600000 1459200000 Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230104171643.1004054-3-konrad.dybcio@linaro.org commit e17a806571bb01bb951faeec645944850241eae3 Author: Konrad Dybcio Date: Wed Jan 4 18:16:41 2023 +0100 arm64: dts: qcom: sm6350: Add OSM L3 node Enable the OSM block responsible for scaling the L3 cache. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230104171643.1004054-2-konrad.dybcio@linaro.org commit 306ccdf0786a33956a56e9a36d266d5db7040457 Author: Dmitry Baryshkov Date: Sun Jan 1 21:40:32 2023 +0200 arm64: dts: qcom: qcs404: specify per-sensor calibration cells Specify pre-parsed per-sensor calibration nvmem cells in the tsens device node rather than parsing the whole data blob in the driver. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230101194034.831222-19-dmitry.baryshkov@linaro.org commit 4d403f7a9090fb603ffaa89548d5bc6757478f41 Author: Dmitry Baryshkov Date: Sun Jan 1 21:40:31 2023 +0200 arm64: dts: qcom: msm8976: specify per-sensor calibration cells Specify pre-parsed per-sensor calibration nvmem cells in the tsens device node rather than parsing the whole data blob in the driver. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230101194034.831222-18-dmitry.baryshkov@linaro.org commit 24aafd041fb26b4d715969f3a2ff55e9fd27ff1b Author: Dmitry Baryshkov Date: Sun Jan 1 21:40:30 2023 +0200 arm64: dts: qcom: msm8916: specify per-sensor calibration cells Specify pre-parsed per-sensor calibration nvmem cells in the tsens device node rather than parsing the whole data blob in the driver. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230101194034.831222-17-dmitry.baryshkov@linaro.org commit 0b3aa9aa629c10928e86f6c9666a5e0b14655b2a Author: Dmitry Baryshkov Date: Sun Jan 1 21:40:29 2023 +0200 arm64: dts: qcom: msm8956: use SoC-specific compat for tsens The slope values used during tsens calibration differ between msm8976 and msm8956 SoCs. Use SoC-specific compat value for the msm8956 SoC. Fixes: 0484d3ce0902 ("arm64: dts: qcom: Add DTS for MSM8976 and MSM8956 SoCs") Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230101194034.831222-16-dmitry.baryshkov@linaro.org commit a9a9e85731e73328e66392115f823be3ca5e9a51 Author: Alex Elder Date: Fri Dec 30 18:27:16 2022 -0600 arm64: dts: qcom: use qcom,gsi-loader for IPA Depending on the platform, either the modem or the AP must load GSI firmware for IPA before it can be used. To date, this has been indicated by the presence or absence of a "modem-init" property. That mechanism has been deprecated. Instead, we indicate how GSI firmware should be loaded by the value of the "qcom,gsi-loader" property. Update all arm64 platforms that use IPA to use the "qcom,gsi-loader" property to specify how the GSI firmware is loaded. Update the affected nodes so the status property is last. Signed-off-by: Alex Elder Reviewed-by: Konrad Dybcio [bjorn: Moved sc7280 change herobrine-lte-sku] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221231002716.2367375-3-elder@linaro.org commit fd5df558c31e2212b5bdd7a71afcc48f3e2c62dd Author: Alim Akhtar Date: Sat Jan 14 13:32:47 2023 +0530 scsi: MAINTAINERS: Add entry for Exynos UFS driver Add maintainer entry for Exynos UFS driver. Signed-off-by: Alim Akhtar Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20230114080247.601312-1-alim.akhtar@samsung.com Signed-off-by: Martin K. Petersen commit 3730bea883cd8f74fd9b2b31d51665c74cf73362 Author: Alim Akhtar Date: Sat Jan 14 07:50:10 2023 +0530 scsi: ufs: ufs: Remove duplicate entry PA_GRANULARITY is duplicated, delete one of the entries. Signed-off-by: Alim Akhtar Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20230114022010.27088-1-alim.akhtar@samsung.com Signed-off-by: Martin K. Petersen commit a9a3629592ab7442a2e9d40281420b51c453ea9b Author: Kees Cook Date: Thu Jan 5 21:32:00 2023 -0800 scsi: megaraid_sas: Add flexible array member for SGLs struct MPI2_RAID_SCSI_IO_REQUEST ends with a single SGL, but expects to copy multiple. Add a flexible array member so the compiler can reason about the size of the memcpy(). This will avoid the run-time false positive warning: memcpy: detected field-spanning write (size 128) of single field "&r1_cmd->io_request->SGL" at drivers/scsi/megaraid/megaraid_sas_fusion.c:3326 (size 16) This change results in no binary output differences. Reported-by: Holger Kiehl Link: https://lore.kernel.org/all/88de8faa-56c4-693d-2d3-67152ee72057@diagnostix.dwd.de/ Cc: Kashyap Desai Cc: Sumit Saxena Cc: Shivasharan S Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: megaraidlinux.pdl@broadcom.com Cc: linux-scsi@vger.kernel.org Link: https://lore.kernel.org/r/20230106053153.never.999-kees@kernel.org Signed-off-by: Kees Cook Tested-by: Holger Kiehl Signed-off-by: Martin K. Petersen commit 293b993b3cad3026d062616b188f8b59fdd9d41c Author: Lin, Meng-Bo Date: Fri Jan 6 14:30:49 2023 +0000 dt-bindings: qcom: Document bindings for msm8916-samsung-j5x Document the new samsung-j5x device tree bindings used in its device tree. Signed-off-by: Lin, Meng-Bo Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230106142956.547081-1-linmengbo0689@protonmail.com commit 0c0d806908bd1a230fe3d6faef898e84a616c17c Merge: 7084eadf62ca1 946a10511f658 Author: Martin K. Petersen Date: Wed Jan 18 18:15:20 2023 -0500 Merge patch series "scsi: Add struct for args to execution functions" Mike Christie says: The following patches were made over Martin's scsi-staging/next branch. They add a struct that contains optinal arguments to the scsi_execute* functions. This will be needed for the patches that allow the SCSI passthrough users to control retries because I'm adding a new optional argument. I separated the 2 sets to make it easier to review and post. Link: https://lore.kernel.org/r/20221229190154.7467-1-michael.christie@oracle.com Signed-off-by: Martin K. Petersen commit 40017cebb111eed65bddfa993df7b0636be98de8 Author: Stephan Gerhold Date: Wed Jan 4 12:53:48 2023 +0100 soc: qcom: socinfo: Add a bunch of older SoCs Add the new SoCs added in qcom,ids.h to the soc_id array so they show up correctly in the socinfo sysfs. Signed-off-by: Stephan Gerhold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230104115348.25046-5-stephan@gerhold.net commit 56abffc793befb19f30ec9d4bec24343529377f1 Author: Stephan Gerhold Date: Wed Jan 4 12:53:47 2023 +0100 dt-bindings: arm: qcom,ids: Add a bunch of older SoCs Sync the SoC IDs in qcom,ids.h with relevant entries from Qualcomm's LK bootloader [1] that is used for almost all older Qualcomm SoCs. Several of these are already supported, e.g.: - MSM8960 -> APQ8060, MSM8260, ... - MSM8976 -> APQ8076 - MSM8956 -> APQ8056 Others are currently being worked on, e.g.: - MSM8909(W) -> APQ8009(W), MSM8905, MSM8209, ... - MSM8939 -> MSM8239, ... And even all remaining ones added are close enough to what is already supported so that future support is realistic (if someone steps up to do the work). Add all of them at once to avoid having to add them one by one in the future. This will also benefit other projects making use of the same dt-bindings, e.g. bootloaders where adding support for all these SoCs is a bit easier than on Linux. [1]: https://git.codelinaro.org/clo/la/kernel/lk/-/blob/9d563e4a1d38c5a662bf94215ffc828db57c9e19/platform/msm_shared/smem.h#L286 Signed-off-by: Stephan Gerhold Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230104115348.25046-4-stephan@gerhold.net commit 8b949c0e2ce59c376818bc3f80db4b94b06981b7 Author: Stephan Gerhold Date: Wed Jan 4 12:53:46 2023 +0100 dt-bindings: arm: qcom,ids: Add QRD board ID QRD (Qualcomm Reference Design) = 0xb = 11 is used on many devices that were originally derived from some reference design provided by Qualcomm. Examples of existing devices in Linux would be: - msm8916-longcheer-l8150/l8910, msm8916-wingtech-wt88047 - msm8953-xiaomi-daisy/tissot/vince - msm8998-fxtec-pro1 - sm4250-oneplus-billie2 Add it to qcom,ids.h so the qcom,board-id properties can be rewritten more clearly using the macros in a future patch set, i.e. qcom,board-id = instead of qcom,board-id = <0x1000b 0x00> Signed-off-by: Stephan Gerhold Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230104115348.25046-3-stephan@gerhold.net commit 017a7c11a8a29e266aa40c6d1bf2ba83f880f719 Author: Stephan Gerhold Date: Wed Jan 4 12:53:45 2023 +0100 soc: qcom: socinfo: Fix soc_id order The soc_id array is mostly ordered by the numeric "msm-id" defined in qcom,ids.h but some recent entries were added at the wrong place. While it does not make a functional difference it does make it harder to regenerate the entire array after adding a bunch of new IDs. Fixes: de320c07da3d ("soc: qcom: socinfo: Add MSM8956/76 SoC IDs to the soc_id table") Fixes: 147f6534b8ff ("soc: qcom: socinfo: Add SM8550 ID") Signed-off-by: Stephan Gerhold Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230104115348.25046-2-stephan@gerhold.net commit cbf91f46a72a0a1f8d2517c166101c4c85a0b940 Author: Alex Elder Date: Fri Dec 30 18:27:15 2022 -0600 ARM: dts: qcom: use qcom,gsi-loader for IPA Depending on the platform, either the modem or the AP must load GSI firmware for IPA before it can be used. To date, this has been indicated by the presence or absence of a "modem-init" property. That mechanism has been deprecated. Instead, we indicate how GSI firmware should be loaded by the value of the "qcom,gsi-loader" property. Update all ARM platforms that use IPA to use the "qcom,gsi-loader" property to specify how the GSI firmware is loaded. Update the affected nodes so the status property is last. Signed-off-by: Alex Elder Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221231002716.2367375-2-elder@linaro.org commit 1283b2e61a7a2064e71f50f3f0821d6e56ced920 Author: Dmitry Baryshkov Date: Sun Jan 1 21:40:34 2023 +0200 ARM: dts: qcom-apq8084: specify per-sensor calibration cells Specify pre-parsed per-sensor calibration nvmem cells in the tsens device node rather than parsing the whole data blob in the driver. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230101194034.831222-21-dmitry.baryshkov@linaro.org commit e108a3858e7dc7192f34b0b9fe2afc90d452407b Author: Dmitry Baryshkov Date: Sun Jan 1 21:40:33 2023 +0200 ARM: dts: qcom-msm8974: specify per-sensor calibration cells Specify pre-parsed per-sensor calibration nvmem cells in the tsens device node rather than parsing the whole data blob in the driver. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230101194034.831222-20-dmitry.baryshkov@linaro.org commit 946a10511f6588c20bbd312be15d64cc3c3fc796 Author: Mike Christie Date: Thu Dec 29 13:01:54 2022 -0600 scsi: core: Remove scsi_execute_req()/scsi_execute() functions scsi_execute() and scsi_execute_req() are no longer used so remove them. Signed-off-by: Mike Christie Reviewed-by: John Garry Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 1035c9893f15e801456dddd547ea52ae8f6a1e1f Author: Mike Christie Date: Thu Dec 29 13:01:53 2022 -0600 scsi: cxlflash: Convert to scsi_execute_cmd() scsi_execute() is going to be removed. Convert cxlflash to use scsi_execute_cmd(). [mkp: roll in fix for issue reported by sfr] Signed-off-by: Mike Christie Reviewed-by: John Garry Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit bf37b5bc72204a69636c26bb8cd90cfc70ca8056 Author: Krzysztof Kozlowski Date: Fri Dec 30 14:56:45 2022 +0100 arm64: dts: qcom: sc7280-idp: add amp pin config function Bindings expect each pin config to come with a "function" property: sc7280-crd-r3.dtb: pinctrl@f100000: amp-en-state: 'oneOf' conditional failed, one must be fixed: 'function' is a required property 'bias-pull-down', 'drive-strength', 'pins' do not match any of the regexes: '-pins$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221230135645.56401-9-krzysztof.kozlowski@linaro.org commit de385ae2aa629a7d3298faa3f3fe9d19bf0b4f6a Author: Krzysztof Kozlowski Date: Fri Dec 30 14:56:44 2022 +0100 arm64: dts: qcom: msm8916-samsung-a2015: correct motor pinctrl node name Correct typo in motor pinctrl node name: msm8916-samsung-a5u-eur.dtb: pinctrl@1000000: 'motor-en-default-stae' does not match any of the regexes: '-state$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221230135645.56401-8-krzysztof.kozlowski@linaro.org commit 4dee5aa44b924036511a744ceb3abb1ceeb96bb6 Author: Petr Vorel Date: Mon Dec 26 19:54:39 2022 +0100 arm64: dts: qcom: msm8992-bullhead: Disable dfps_data_mem It's disabled on downstream [1] thus not shown on downstream dmesg. Removing it fixes warnings on v6.1: [ 0.000000] OF: reserved mem: OVERLAP DETECTED! [ 0.000000] dfps_data_mem@3400000 (0x0000000003400000--0x0000000003401000) overlaps with memory@3400000 (0x0000000003400000--0x0000000004600000) [1] https://android.googlesource.com/kernel/msm.git/+/android-7.0.0_r0.17/arch/arm64/boot/dts/lge/msm8992-bullhead.dtsi#137 Fixes: 976d321f32dc ("arm64: dts: qcom: msm8992: Make the DT an overlay on top of 8994") Signed-off-by: Petr Vorel Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221226185440.440968-3-pevik@seznam.cz commit 26a91359aea4d89e7d3646d806eed0f3755b74bd Author: Petr Vorel Date: Mon Dec 26 19:54:38 2022 +0100 arm64: dts: qcom: msm8992-bullhead: Fix cont_splash_mem size Original google firmware reports 12 MiB: [ 0.000000] cma: Found cont_splash_mem@0, memory base 0x0000000003400000, size 12 MiB, limit 0xffffffffffffffff which is actually 12*1024*1024 = 0xc00000. This matches the aosp source [1]: &cont_splash_mem { reg = <0 0x03400000 0 0xc00000>; }; Fixes: 3cb6a271f4b0 ("arm64: dts: qcom: msm8992-bullhead: Fix cont_splash_mem mapping") Fixes: 976d321f32dc ("arm64: dts: qcom: msm8992: Make the DT an overlay on top of 8994") [1] https://android.googlesource.com/kernel/msm.git/+/android-7.0.0_r0.17/arch/arm64/boot/dts/lge/msm8992-bullhead.dtsi#141 Signed-off-by: Petr Vorel Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221226185440.440968-2-pevik@seznam.cz commit bfe9c29969723289951d9afb97b30be4e812c355 Merge: d3e2262cd0d11 0154252a3b87f Author: Bjorn Andersson Date: Wed Jan 18 17:00:08 2023 -0600 Merge tag 'qcom-dts-fixes-for-6.2' into dts-for-6.3 Qualcomm ARM32 DTS fix for 6.2 This fixes a regression on Inforce 6540, as the sdhci nodes no longer overrides the platform's mmc nodes. commit 62ebb045f029b252d0f7d16ae61a735bd9e88636 Merge: c525e181fda7f 6049aae523925 Author: Bjorn Andersson Date: Wed Jan 18 16:59:54 2023 -0600 Merge tag 'qcom-driver-fixes-for-6.2' into drivers-for-6.3 Qualcomm driver fixes for v6.2 Updated error handling in the async packer router driver made an optional property required, fix this. Also improve error handling in the probe function of the CPR driver. commit 1ccad21aa996a88348c8019b17cf723504b41c7f Merge: 4f287e31ff5f4 69876bc6fd4de Author: Bjorn Andersson Date: Wed Jan 18 16:59:11 2023 -0600 Merge tag 'qcom-arm64-fixes-for-6.2' into arm64-for-6.3 Qualcomm ARM64 DTS fixes for 6.2 The cluster idle issue was resolved on SM8250, so the change disabling the cluster state is being reverted. Issues where identified with the QMP PHY binding, that would prevent enablement of Displayport and it was decided not to support the old binding for the recently introduced SC8280XP, which broke USB. This adjusts the USB PHY nodes to the new binding. The reset signal for the first QMP PHY is corrected as well. The reserved memory map is updated on Xiaomi Mi 4C and Huawei Nexus 6P, to avoid instabilities caused by use of protected memory regions. The compatible for the MSM8992 TCSR mutex is corrected as well. Lastly SDHCI interconnects on SM8350 are corrected to match the providers #interconnect-cells. commit 4f287e31ff5f464526651ee3cb3fd3e96b2e5746 Author: Robert Foss Date: Tue Jan 17 12:57:11 2023 +0100 arm64: dts: qcom: sm8350: Use 2 interconnect cells Use two interconnect cells in order to optionally support a path tag. Signed-off-by: Robert Foss Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117115712.1054613-1-rfoss@kernel.org commit 638b7ada91f93d61cb65774dcb6ff2b7dcae3627 Author: Robert Foss Date: Tue Jan 17 12:25:37 2023 +0100 arm64: dts: qcom: sm8350: Add &tlmm gpio-line-names Add GPIO line names as described by the sm8350-hdk schematic. Signed-off-by: Robert Foss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117112537.1016250-1-rfoss@kernel.org commit 08c51ceb12f7ce2252513a38ad8a8ed26103a4e2 Author: Shazad Hussain Date: Tue Jan 17 19:04:29 2023 +0100 clk: qcom: add the GCC driver for sa8775p Add support for the Global Clock Controller found in the QTI SA8775P platforms. Signed-off-by: Shazad Hussain [Bartosz: made the driver ready for upstream] Co-developed-by: Bartosz Golaszewski Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio [bjorn: Moved to core_initcall(), per request of Konrad] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117180429.305266-3-brgl@bgdev.pl commit 0fff9fa043f972b83935016b0e81d44d9a2229bd Author: Bartosz Golaszewski Date: Tue Jan 17 19:04:28 2023 +0100 dt-bindings: clock: Add Qualcomm SA8775P GCC Add DT bindings for the GCC clock on SA8775P platforms. Add relevant DT include definitions as well. Signed-off-by: Bartosz Golaszewski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117180429.305266-2-brgl@bgdev.pl commit 5f84c7c35d49e6d92b720db19d421951f1ff8599 Author: Bjorn Andersson Date: Tue Jan 17 10:46:30 2023 -0800 arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s While booting the CRD, a series of CMA allocation errors can be seen in the kernel log: cma: cma_alloc: reserved: alloc failed, req-size: 128 pages, ret: -12 Growing the CMA region and querying /proc/meminfo indicates that a newly booted system (currently) uses 64MB CMA. Define a memory region sufficiently large for the current use cases, to avoid forcing users to add this themselves, through command line parameters etc. While fixing the CRD define the same region for the X13s. Tested-by: Andrew Halaney # sc8280xp-lenovo-thinkpad-x13s Reviewed-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117184630.2775905-1-quic_bjorande@quicinc.com commit fc1780dba41d294f1572d7a701df10eb6bc77385 Author: Judy Hsiao Date: Wed Jan 18 01:18:53 2023 +0000 arm64: dts: qcom: sc7280: add DP audio to herobrine rt5682 1-mic dtsi 1. Add DisplayPort sound node and lpass_cpu node. 2. Adjust the dai-link order to make the order to be consistent with sc7280-herobrine-audio-rt5682-3mic.dtsi. Signed-off-by: Judy Hsiao Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230118011853.1614566-1-judyhsiao@chromium.org commit a0cacf7f9a55581cfe6a6511fd7f8e490655a27e Author: Neil Armstrong Date: Wed Jan 18 09:50:31 2023 +0100 arm64: defconfig: enable Visionox VTDR6130 DSI Panel driver Build the Visionox VTDR6130 DSI Panel driver as module Signed-off-by: Neil Armstrong Acked-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230110-topic-sm8550-disp-defconfig-v3-2-11b558f7ff5d@linaro.org commit 406b4c06cb61bb2d19aa2e5a9267044f17a539a0 Author: Neil Armstrong Date: Wed Jan 18 09:50:30 2023 +0100 arm64: defconfig: enable SM8550 DISPCC clock driver Build the Qualcomm SM8550 Display Clock Controller driver as a module Acked-by: Konrad Dybcio Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230110-topic-sm8550-disp-defconfig-v3-1-11b558f7ff5d@linaro.org commit 74d6ed033d47200d18204e3935b201f385476271 Author: Johan Hovold Date: Tue Jan 3 11:31:41 2023 +0100 arm64: dts: qcom: sm8250: clean up wcd938x codec node Clean up the wcd938x codec node somewhat by adding newline separators, reordering properties and renaming it 'audio-codec'. Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103103141.15807-7-johan+linaro@kernel.org commit 306380dc93c5a305a009f7d210da0995e3babceb Author: Johan Hovold Date: Tue Jan 3 11:31:40 2023 +0100 arm64: dts: qcom: sm8450-hdk: move wcd938x codec node The wcd938x codec is not a memory-mapped device and does not belong under the soc node. Move the node to the root node to avoid DT validation failures. While at it, clean up the node somewhat by reordering properties and renaming it 'audio-codec'. Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103103141.15807-6-johan+linaro@kernel.org commit fdc6a0b272c5f91bfb4dcd8c0d7757d8dc0abef4 Author: Johan Hovold Date: Tue Jan 3 11:31:39 2023 +0100 arm64: dts: qcom: sc8280xp-x13s: move wcd938x codec node The wcd938x codec is not a memory-mapped device and does not belong under the soc node. Move the node to the root node to avoid DT validation failures. While at it, clean up the node somewhat by adding newline separators, reordering properties and renaming it 'audio-codec'. Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103103141.15807-5-johan+linaro@kernel.org commit acf906140790837d235567c93207fde6ac8e1e64 Author: Johan Hovold Date: Tue Jan 3 11:31:37 2023 +0100 arm64: dts: qcom: sc8280xp-x13s: move vamacro node Move the vamacro node to restore the alphabetical sort order. While at it, add some newline separators to improve readability. Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103103141.15807-3-johan+linaro@kernel.org commit 6ded5ed60984104a1a3560e02422941c25da686c Author: Johan Hovold Date: Tue Jan 3 11:31:36 2023 +0100 arm64: dts: qcom: sc8280xp: disable sound nodes The sound nodes in the SoC dtsi should be disabled by default. Note that the lpass-tlmm and macro blocks depend on having the board dts enable the adsp and specifying an appropriate firmware to enable the q6prm clock controller. Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103103141.15807-2-johan+linaro@kernel.org commit 92afc5329a5b23d876b215b783d200352d5aaea6 Author: Tiezhu Yang Date: Wed Jan 18 15:56:44 2023 +0800 selftests/bpf: Fix build errors if CONFIG_NF_CONNTRACK=m If CONFIG_NF_CONNTRACK=m, there are no definitions of NF_NAT_MANIP_SRC and NF_NAT_MANIP_DST in vmlinux.h, build test_bpf_nf.c failed. $ make -C tools/testing/selftests/bpf/ CLNG-BPF [test_maps] test_bpf_nf.bpf.o progs/test_bpf_nf.c:160:42: error: use of undeclared identifier 'NF_NAT_MANIP_SRC' bpf_ct_set_nat_info(ct, &saddr, sport, NF_NAT_MANIP_SRC); ^ progs/test_bpf_nf.c:163:42: error: use of undeclared identifier 'NF_NAT_MANIP_DST' bpf_ct_set_nat_info(ct, &daddr, dport, NF_NAT_MANIP_DST); ^ 2 errors generated. Copy the definitions in include/net/netfilter/nf_nat.h to test_bpf_nf.c, in order to avoid redefinitions if CONFIG_NF_CONNTRACK=y, rename them with ___local suffix. This is similar with commit 1058b6a78db2 ("selftests/bpf: Do not fail build if CONFIG_NF_CONNTRACK=m/n"). Fixes: b06b45e82b59 ("selftests/bpf: add tests for bpf_ct_set_nat_info kfunc") Signed-off-by: Tiezhu Yang Acked-by: Jiri Olsa Tested-by: Jiri Olsa Acked-by: Yonghong Song Link: https://lore.kernel.org/r/1674028604-7113-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Martin KaFai Lau commit f8887fdcf2a7da2d05de95a81ec35571f2323c2e Author: ye xingchen Date: Wed Jan 18 16:44:43 2023 +0800 thermal/drivers/spear: 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/202301181644433003839@zte.com.cn Signed-off-by: Daniel Lezcano commit 821e43097966a190a0714b15cd8fdc1d202e5c21 Author: ye xingchen Date: Wed Jan 18 16:42:41 2023 +0800 thermal/drivers/kirkwood: 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/202301181642412733780@zte.com.cn Signed-off-by: Daniel Lezcano commit c818c6d15d3693428fa7223f21d423e39dbc33b1 Author: ye xingchen Date: Wed Jan 18 16:41:19 2023 +0800 thermal/drivers/thermal_mmio: 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/202301181641194943741@zte.com.cn Signed-off-by: Daniel Lezcano commit 2484b632ac994b4b83b2fb817f9a3b8d4a9e0beb Author: ye xingchen Date: Wed Jan 18 16:39:30 2023 +0800 thermal/drivers/rockchip: 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/202301181639300333679@zte.com.cn Signed-off-by: Daniel Lezcano commit f7f6d3713282a272bd2b0fd2ad85ca320f6822b4 Author: ye xingchen Date: Wed Jan 18 16:37:47 2023 +0800 thermal/drivers/mtk_thermal: 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/202301181637472073620@zte.com.cn Signed-off-by: Daniel Lezcano commit 9b22743b93d50a346f437fa96dfec399f35d4965 Author: ye xingchen Date: Wed Jan 18 16:34:37 2023 +0800 thermal/drivers/armada: 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/202301181634379503534@zte.com.cn Signed-off-by: Daniel Lezcano commit b5d6ec4d3a7e59be371e48ae7f60a66a22e51ea5 Author: ye xingchen Date: Wed Jan 18 16:33:05 2023 +0800 thermal/drivers/dove: 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/202301181633059433484@zte.com.cn Signed-off-by: Daniel Lezcano commit 142887ec975b0791d92242f5a8e18e5dc5f15800 Author: ye xingchen Date: Wed Jan 18 16:36:22 2023 +0800 thermal/drivers/bcm2835: 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 Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/202301181636223863583@zte.com.cn Signed-off-by: Daniel Lezcano commit 780e220dc6b537de577e583aeae74983c7381af5 Author: ye xingchen Date: Wed Jan 18 16:31:36 2023 +0800 thermal/drivers/brcmstb_thermal: 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 Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/202301181631362083446@zte.com.cn Signed-off-by: Daniel Lezcano commit 0c2d572828a68e8416619e0832d4d55317cb3c57 Author: Benjamin Tissoires Date: Fri Jan 13 10:09:35 2023 +0100 HID: bpf: reorder BPF registration Given that our initial BPF program is not using any kfuncs anymore, we can reorder the initialization to first try to load it and then register the kfuncs. This has the advantage of not exporting kfuncs when HID-BPF is not working. Signed-off-by: Benjamin Tissoires Acked-by: Alexei Starovoitov Signed-off-by: Jiri Kosina commit bb2c0aeac145c4e5b74620fd8c0f7862777b8677 Author: Benjamin Tissoires Date: Fri Jan 13 10:09:34 2023 +0100 HID: bpf: clean up entrypoint We don't need to watch for calls on bpf_prog_put_deferred(), so remove that from the entrypoints.bpf.c file. Signed-off-by: Benjamin Tissoires Acked-by: Alexei Starovoitov Signed-off-by: Jiri Kosina commit 6e021d64e4897759e19ce431ee6a366338c00be8 Author: Benjamin Tissoires Date: Fri Jan 13 10:09:33 2023 +0100 selftests: hid: enforce new attach API Now that the new API for hid_bpf_attach_prog() is in place, ensure we get an fd when calling this function. And remove the fallback code. Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 4b9a3f49f02bf682eedfde23ef56a8df82c1e5d2 Author: Benjamin Tissoires Date: Fri Jan 13 10:09:32 2023 +0100 HID: bpf: rework how programs are attached and stored in the kernel Previously, HID-BPF was relying on a bpf tracing program to be notified when a program was released from userspace. This is error prone, as LLVM sometimes inline the function and sometimes not. So instead of messing up with the bpf prog ref count, we can use the bpf_link concept which actually matches exactly what we want: - a bpf_link represents the fact that a given program is attached to a given HID device - as long as the bpf_link has fd opened (either by the userspace program still being around or by pinning the bpf object in the bpffs), the program stays attached to the HID device - once every user has closed the fd, we get called by hid_bpf_link_release() that we no longer have any users, and we can disconnect the program to the device in 2 passes: first atomically clear the bit saying that the link is active, and then calling release_work in a scheduled work item. This solves entirely the problems of BPF tracing not showing up and is definitely cleaner. Signed-off-by: Benjamin Tissoires Acked-by: Alexei Starovoitov Signed-off-by: Jiri Kosina commit 2574917a2b48f87bd45f1c3e6d80c976f4fe3c3d Author: Benjamin Tissoires Date: Fri Jan 13 10:09:31 2023 +0100 selftests: hid: prepare tests for HID_BPF API change We plan on changing the return value of hid_bpf_attach_prog(). Instead of returning an error code, it will return an fd to a bpf_link. This bpf_link is responsible for the binding between the bpf program and the hid device. Add a fallback mechanism to not break bisections by pinning the program when we run this test against the non changed kernel. Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit d9db1bb55f1032020328ede7a88b2490574646d3 Author: Benjamin Tissoires Date: Fri Jan 13 10:09:30 2023 +0100 selftests: hid: ensure the program is correctly pinned Turns out that if bpffs was not mounted, the test was silently passing. So ensure it passes by checking the mount command result. Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit cea6c4d969bb104d2847e1f4ed708ae0126d6f42 Author: Benjamin Tissoires Date: Fri Jan 13 10:09:29 2023 +0100 selftests: hid: attach/detach 2 bpf programs, not just one Add a second BPF program to attach to the device, as the development of this feature showed that we also need to ensure we can detach multiple programs to a device (hid_bpf_link->hid_table_index was actually not set initially, and this lead to any BPF program not being released except for the first one). Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 633ba3be76426056a047b2a355082d94afa9230d Author: Benjamin Tissoires Date: Fri Jan 13 10:09:28 2023 +0100 selftests: hid: allow to compile hid_bpf with LLVM clang doesn't like to compile a source to the final binary directly: clang-14: error: cannot specify -o when generating multiple output files So split the final rule in 2, and ensure we compile all dependencies before. Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 507806e9fdf09774d390c5f22893ba4d87ce40d5 Author: Benjamin Tissoires Date: Fri Jan 13 10:09:27 2023 +0100 selftests: hid: add vmtest.sh Similar-ish in many points from the script in selftests/bpf, with a few differences: - relies on boot2container instead of a plain qemu image (meaning that we can take any container in a registry as a base) - runs in the hid selftest dir, and such uses the test program from there - the working directory to store the config is in tools/selftests/hid/results Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 262a6cd00c9f332db2edd125443759afec67563a Author: Matt Roper Date: Tue Jan 17 12:26:27 2023 -0800 drm/i915: Move/adjust register definitions related to Wa_22011450934 The implementation of Wa_22011450934 introduced three new register definitions in i915_reg.h that didn't get moved to the GT/engine register headers when all the other registers moved; let's move them to the appropriate headers and tidy up their definitions now for consistency: - STATE_ACK_DEBUG is moved to the engine register header and converted to a parameterized definition; the workaround only needs the RCS instance to be programmed, but there are instances on other engines that could be used by other workarounds in the future. - The two CULLBIT registers move to the GT register header. Since they belong to MMIO ranges that became MCR starting with Xe_HP, their definitions should be defined as MCR_REG() and use an Xe_HP prefix to keep the register semantics clear. Note that the MCR definition is just for consistency and to prevent accidental misuse if other workarounds related to these registers show up in the future. There's no functional change to today's driver since the workaround that references these registers only accesses them via MI_LRR engine instructions. Engine-initiated register accesses do not utilize the same steering controls as CPU-initiated accesses; they use a different steering control register (0x20CC) which is initialized to a non-terminated DSS target by pre-OS firmware and never changed thereafter (i915 does not touch it and userspace does not have permission to change that register). Signed-off-by: Matt Roper Reviewed-by: Gustavo Sousa Link: https://patchwork.freedesktop.org/patch/msgid/20230117202627.4134579-1-matthew.d.roper@intel.com commit fd858402c6d0a80e0b543886b9f7865c6d76d5d6 Author: Yang Yingliang Date: Tue Jan 3 10:49:07 2023 +0800 PCI: endpoint: pci-epf-vntb: Add epf_ntb_mw_bar_clear() num_mws kernel-doc 8e4bfbe644a6 ("PCI: endpoint: pci-epf-vntb: fix error handle in epf_ntb_mw_bar_init()") added a "num_mws" parameter to epf_ntb_mw_bar_clear() but failed to add kernel-doc for num_mws. Add kernel-doc for num_mws on epf_ntb_mw_bar_clear(). Fixes: 8e4bfbe644a6 ("PCI: endpoint: pci-epf-vntb: fix error handle in epf_ntb_mw_bar_init()") Link: https://lore.kernel.org/r/20230103024907.293853-1-yangyingliang@huawei.com Signed-off-by: Yang Yingliang Signed-off-by: Bjorn Helgaas commit 7952e71653d986f73c5517e50920866d580d2394 Author: Krzysztof Kozlowski Date: Fri Jan 6 09:12:01 2023 +0100 dt-bindings: PCI: qcom: Add oneOf to compatible match Prepare for extending compatible list by adding oneOf keyword. No functional changes. Link: https://lore.kernel.org/r/20230106081203.14118-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring commit a30e65792c473f0b758fcfe881264184423bdb52 Author: Deming Wang Date: Tue Jan 17 20:20:57 2023 -0500 thermal: intel: menlow: Update function descriptions Update function parameter descriptions for sensor_get_auxtrip() and sensor_set_auxtrip(). [ rjw: New changelog, subject edits ] Signed-off-by: Deming Wang Signed-off-by: Rafael J. Wysocki commit aa222f9311e120f40737ca3eb60771d40df017a1 Author: Rob Herring Date: Mon Dec 19 13:12:08 2022 -0600 dt-bindings: PCI: Convert Rockchip RK3399 PCIe to DT schema Convert the Rockchip RK3399 PCIe Host/Endpoint controller to DT schema format. Like most dual mode PCI controllers, we need to split the schema into common, host and endpoint schemas. Link: https://lore.kernel.org/r/20221219191209.1975834-1-robh@kernel.org Signed-off-by: Rob Herring commit f2ac14b5f197e4a2dec51e5ceaa56682ff1592bc Author: Armin Wolf Date: Sat Jan 14 09:50:50 2023 +0100 ACPI: battery: Fix missing NUL-termination with large strings When encountering a string bigger than the destination buffer (32 bytes), the string is not properly NUL-terminated, causing buffer overreads later. This for example happens on the Inspiron 3505, where the battery model name is larger than 32 bytes, which leads to sysfs showing the model name together with the serial number string (which is NUL-terminated and thus prevents worse). Fix this by using strscpy() which ensures that the result is always NUL-terminated. Fixes: 106449e870b3 ("ACPI: Battery: Allow extract string from integer") Signed-off-by: Armin Wolf Signed-off-by: Rafael J. Wysocki commit def70790be528439de137a238885125de953ab4d Author: Lars-Peter Clausen Date: Sat Jan 14 15:35:00 2023 -0800 dt-bindings: clock: versaclock5: Document 5P49V60 compatible string The 5P49V60 clock generator is part of the same family of devices that is described by the versaclock5 binding documentation. Add the compatible string of the 5P49V60 to the binding documentation. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20230114233500.3294789-3-lars@metafoo.de Acked-by: Krzysztof Kozlowski Reviewed-by: Luca Ceresoli Signed-off-by: Stephen Boyd commit 4411da3209298b4ababc7d12940339c664e8db4a Author: Lars-Peter Clausen Date: Sat Jan 14 15:34:59 2023 -0800 clk: vc5: Add support for 5P49V60 The 5P49V60 is very similar to the existing supported clock chips of the versaclock5 driver and uses the same register map layout. But its maximum VCO frequency is 2.7 GHz instead of 3 GHz for the other supported devices. Add a vco_max field to the chip info field to allow to specify a per device variant maximum VCO frequency. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20230114233500.3294789-2-lars@metafoo.de Reviewed-by: Luca Ceresoli Signed-off-by: Stephen Boyd commit 3ed741db04f58e8df0d46cec7ecfc4bfd075f047 Author: Lars-Peter Clausen Date: Sat Jan 14 15:34:58 2023 -0800 clk: vc5: Use `clamp()` to restrict PLL range The VCO frequency needs to be within a certain range and the driver enforces this. Make use of the clamp macro to implement this instead of open-coding it. This makes the code a bit shorter and also semanticly stronger. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20230114233500.3294789-1-lars@metafoo.de Reviewed-by: Luca Ceresoli Signed-off-by: Stephen Boyd commit 471859f57d42537626a56312cfb50cd6acee09ae Author: Andreas Gruenbacher Date: Sun Jan 15 08:50:44 2023 -0800 iomap: Rename page_ops to folio_ops The operations in struct page_ops all operate on folios, so rename struct page_ops to struct folio_ops. Signed-off-by: Andreas Gruenbacher Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig [djwong: port around not removing iomap_valid] Signed-off-by: Darrick J. Wong commit c82abc2394642490da736b1ba78671bbcef81150 Author: Andreas Gruenbacher Date: Sun Jan 15 08:50:25 2023 -0800 iomap: Rename page_prepare handler to get_folio The ->page_prepare() handler in struct iomap_page_ops is now somewhat misnamed, so rename it to ->get_folio(). Signed-off-by: Andreas Gruenbacher Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong commit 07c22b56685dd75ae9c2d41a4cd9f4bbfe93a53a Author: Andreas Gruenbacher Date: Sun Jan 15 08:50:02 2023 -0800 iomap: Add __iomap_get_folio helper Add an __iomap_get_folio() helper as the counterpart of the existing __iomap_put_folio() helper. Use the new helper in iomap_write_begin(). Not a functional change. Signed-off-by: Andreas Gruenbacher Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 9060bc4d3aca6106bbe72891efba391d9d6b86e7 Author: Andreas Gruenbacher Date: Sun Jan 15 08:49:12 2023 -0800 iomap/gfs2: Get page in page_prepare handler Change the iomap ->page_prepare() handler to get and return a locked folio instead of doing that in iomap_write_begin(). This allows to recover from out-of-memory situations in ->page_prepare(), which eliminates the corresponding error handling code in iomap_write_begin(). The ->put_folio() handler now also isn't called with NULL as the folio value anymore. Filesystems are expected to use the iomap_get_folio() helper for getting locked folios in their ->page_prepare() handlers. Signed-off-by: Andreas Gruenbacher Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong commit 98321b5139f92a736a426404fb6e23bfb8feb9cc Author: Andreas Gruenbacher Date: Sun Jan 15 08:49:04 2023 -0800 iomap: Add iomap_get_folio helper Add an iomap_get_folio() helper that gets a folio reference based on an iomap iterator and an offset into the address space. Use it in iomap_write_begin(). Signed-off-by: Andreas Gruenbacher Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong commit 40405dddd98a9a95585482af46b8e269f5ebe5df Author: Andreas Gruenbacher Date: Sun Jan 15 08:45:51 2023 -0800 iomap: Rename page_done handler to put_folio The ->page_done() handler in struct iomap_page_ops is now somewhat misnamed in that it mainly deals with unlocking and putting a folio, so rename it to ->put_folio(). Signed-off-by: Andreas Gruenbacher Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong commit 80baab88bb93eeaa133b426d24dfc0775a8cf824 Author: Andreas Gruenbacher Date: Sun Jan 15 08:45:51 2023 -0800 iomap/gfs2: Unlock and put folio in page_done handler When an iomap defines a ->page_done() handler in its page_ops, delegate unlocking the folio and putting the folio reference to that handler. This allows to fix a race between journaled data writes and folio writeback in gfs2: before this change, gfs2_iomap_page_done() was called after unlocking the folio, so writeback could start writing back the folio's buffers before they could be marked for writing to the journal. Also, try_to_free_buffers() could free the buffers before gfs2_iomap_page_done() was done adding the buffers to the current current transaction. With this change, gfs2_iomap_page_done() adds the buffers to the current transaction while the folio is still locked, so the problems described above can no longer occur. The only current user of ->page_done() is gfs2, so other filesystems are not affected. To catch out any out-of-tree users, switch from a page to a folio in ->page_done(). Signed-off-by: Andreas Gruenbacher Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong commit 7a70a5085ed028b4fd132447cbaea9b73113bca9 Author: Andreas Gruenbacher Date: Sun Jan 15 08:45:50 2023 -0800 iomap: Add __iomap_put_folio helper Add an __iomap_put_folio() helper to encapsulate unlocking the folio, calling ->page_done(), and putting the folio. Use the new helper in iomap_write_begin() and iomap_write_end(). This effectively doesn't change the way the code works, but prepares for successive improvements. Signed-off-by: Andreas Gruenbacher Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong commit ce45dff1370ea9934d8460eed02507d0c5803b0e Merge: 1b929c02afd37 fbfd614aeaa28 Author: Stephen Boyd Date: Wed Jan 18 10:39:59 2023 -0800 Merge tag 'renesas-clk-for-v6.3-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 PWM, Compare-Match Timer (TIM), USB, SDHI, and eMMC clocks and resets on RZ/V2M - Add display clocks on R-Car V4H - Add Camera Receiving Unit (CRU) clocks and resets on RZ/G2L - Miscellaneous fixes and improvements * tag 'renesas-clk-for-v6.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: cpg-mssr: Fix use after free if cpg_mssr_common_init() failed clk: renesas: r9a07g044: Add clock and reset entries for CRU clk: renesas: r9a09g011: Add SDHI/eMMC clock and reset entries clk: renesas: r9a09g011: Add USB clock and reset entries clk: renesas: r9a09g011: Add TIM clock and reset entries clk: renesas: r8a779g0: Add display related clocks clk: renesas: rcar-gen4: Restore PLL enum sort order clk: renesas: r8a779g0: Fix OSC predividers clk: renesas: r9a09g011: Add PWM clock and reset entries commit b8dc57947379ca02500540bf942ecb42a30bfe92 Author: Randy Dunlap Date: Mon Jan 2 12:45:25 2023 -0800 ima: fix ima_delete_rules() kernel-doc warning Use correct kernel-doc syntax in the function description to prevent a kernel-doc warning: security/integrity/ima/ima_policy.c:1964: warning: expecting prototype for ima_delete_rules() called to cleanup invalid in(). Prototype was for ima_delete_rules() instead Signed-off-by: Randy Dunlap Reviewed-by: Paul Moore Signed-off-by: Mimi Zohar commit efb4879f76236f248bbe5b9e2bf408d9470d59f3 Author: Leon Romanovsky Date: Sun Oct 23 19:52:16 2022 +0300 net/mlx5e: Use read lock for eswitch get callbacks In commit 367dfa121205 ("net/mlx5: Remove devl_unlock from mlx5_eswtich_mode_callback_enter") all functions were converted to use write lock without relation to their actual purpose. Change the devlink eswitch getters to use read and not write locks. Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit 42cd20044e85bca865bc2a639756d1b8e1a858c1 Author: Maor Dickman Date: Sun Jan 1 09:06:57 2023 +0200 net/mlx5e: Remove redundant allocation of spec in create indirect fwd group mlx5_add_flow_rules supports creating rules without any matches by passing NULL pointer instead of spec, if NULL is passed it will use a static empty spec. This make allocation of spec in mlx5_create_indir_fwd_group unnecessary. Remove the redundant allocation. Signed-off-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 521933cdc4aad133b410d8f64b03f60345021138 Author: Maor Dickman Date: Tue Dec 20 11:21:22 2022 +0200 net/mlx5e: Support Geneve and GRE with VF tunnel offload Today VF tunnel offload (tunnel endpoint is on VF) is implemented by indirect table which use rules that match on VXLAN VNI to recirculated to root table, this limit the support for only VXLAN tunnels. This patch change indirect table to use one single match all rule to recirculated to root table which is added when any tunnel decap rule is added with tunnel endpoint is VF. This allow support of Geneve and GRE with this configuration. Signed-off-by: Maor Dickman Reviewed-by: Paul Blakey Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 55b458481d6803ddeb86c55a6857aead11ad1e20 Author: Roi Dayan Date: Mon Jan 16 14:49:37 2023 +0200 net/mlx5: E-Switch, Fix typo for egress Fix engress to egress. Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 2a1f4fed392b2b45e98acf9353a5a3827fb9dde3 Author: Roi Dayan Date: Thu Sep 22 11:03:30 2022 +0300 net/mlx5e: Warn when destroying mod hdr hash table that is not empty To avoid memory leaks add a warn when destroying mod hdr hash table but the hash table is not empty. Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit ef78b8d5d6f1c311253691f772e2a4d2c96ddde2 Author: Roi Dayan Date: Wed Sep 21 09:16:13 2022 +0300 net/mlx5e: TC, Use common function allocating flow mod hdr or encap mod hdr Use mlx5e_tc_attach_mod_hdr() when allocating encap mod hdr and remove mlx5e_tc_add_flow_mod_hdr() which is not being used now. Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit c43182e6db32c867cffcf332894c93de419f0ed2 Author: Roi Dayan Date: Tue Sep 20 17:22:21 2022 +0300 net/mlx5e: TC, Add tc prefix to attach/detach hdr functions Currently there are confusing names for attach/detach functions. mlx5e_attach_mod_hdr() vs mlx5e_mod_hdr_attach() mlx5e_detach_mod_hdr() vs mlx5e_mod_hdr_detach() Add tc prefix to the functions that are in en_tc.c to separate from the functions in mod_hdr.c which has the mod_hdr prefix. Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit 82b564802661536443084debdb8ff7c3a4e72b6d Author: Roi Dayan Date: Tue Sep 20 17:20:01 2022 +0300 net/mlx5e: TC, Pass flow attr to attach/detach mod hdr functions In preparation to remove duplicate functions handling mod hdr allocation and the fact that modify hdr should be per flow attr and not flow pass flow attr to the attach and detach mod hdr funcs. Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit b80ae281277fa2216a49ec994019c178a13f2e35 Author: Adham Faris Date: Sun Jan 15 10:21:11 2023 +0200 net/mlx5e: Add warning when log WQE size is smaller than log stride size Add warning macro in the function mlx5e_mpwqe_get_log_num_strides() when log WQE size is smaller than log stride size. Theoretically this should not happen. Signed-off-by: Adham Faris Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 130b12079f3732babe2772314ab129bca0d8492f Author: Adham Faris Date: Sun Jan 8 09:45:36 2023 +0200 net/mlx5e: Fail with messages when params are not valid for XSK Current XSK prerequisites validation implementation (setup.c/mlx5e_validate_xsk_param()) fails silently when xsk prerequisites are not fulfilled. Add error messages to the kernel log to help the user understand what went wrong when params are not valid for XSK. Signed-off-by: Adham Faris Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 1158b7d1c6403cedd0eba1374da2ce312b9974fe Author: Roi Dayan Date: Thu Nov 17 11:36:39 2022 +0200 net/mlx5: E-switch, Remove redundant comment about meta rules Meta rules are created/destroyed per vport and not in eswitch init/destroy. Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit d3c8a33a5cadafb94355fb087fe87522b295189e Author: Rahul Rameshbabu Date: Tue Oct 11 17:28:10 2022 -0700 net/mlx5: Add hardware extended range support for PTP adjtime and adjphase Capable hardware can use an extended range for offsetting the clock. An extended range of [-200000,200000] is used instead of [-32768,32767] for the delta/phase parameter of the adjtime/adjphase ptp_clock_info callbacks. Signed-off-by: Rahul Rameshbabu Reviewed-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 8e11a68e2e8abf6510508b75b49ec5953ca262b6 Author: Rahul Rameshbabu Date: Tue Oct 11 17:28:10 2022 -0700 net/mlx5: Add adjphase function to support hardware-only offset control The adjtime function supports using hardware to set the clock offset when the delta was supported by the hardware. When the delta is not supported by the hardware, the driver handles adjusting the clock. The newly-introduced adjphase function is similar to the adjtime function, except it guarantees that a provided clock offset will be used directly by the hardware to adjust the PTP clock. When the range is not acceptable by the hardware, an error is returned. Signed-off-by: Rahul Rameshbabu Reviewed-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit d0f332dc96894d4652a1d10e9de35ded267901a7 Author: Yishai Hadas Date: Thu Dec 15 13:04:40 2022 +0200 net/mlx5: Suppress error logging on UCTX creation Suppress error logging that can be triggered by userspace upon DEVX UCTX creation. The reason that it's not suppressed today with the uid check to suppress DEVX is that MLX5_CMD_OP_CREATE_UCTX command still doesn't have a uid as it comes to create it.. Signed-off-by: Yishai Hadas Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed commit 022dbea0ea8ea433823a3d12719e29dcef2fb637 Author: Rahul Rameshbabu Date: Mon Nov 28 12:03:41 2022 -0800 net/mlx5e: Suppress Send WQEBB room warning for PAGE_SIZE >= 16KB Send WQEBB size is 64 bytes and the max number of WQEBBs for an SQ is 255. For 16KB pages and greater, there is always sufficient spaces for all WQEBBs of an SQ. Cast mlx5e_get_max_sq_wqebbs(mdev) to u16. Prevents -Wtautological-constant-out-of-range-compare warnings from occurring when PAGE_SIZE >= 16KB. Signed-off-by: Rahul Rameshbabu Reported-by: kernel test robot Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 62622dab0a285033e971641b781bc917d5939ce6 Author: Matt Bobrowski Date: Wed Jan 4 03:41:56 2023 +0000 ima: return IMA digest value only when IMA_COLLECTED flag is set The IMA_COLLECTED flag indicates whether the IMA subsystem has successfully collected a measurement for a given file object. Ensure that we return the respective digest value stored within the iint entry only when this flag has been set. Failing to check for the presence of this flag exposes consumers of this IMA API to receive potentially undesired IMA digest values when an erroneous condition has been experienced in some of the lower level IMA API code. Signed-off-by: Matt Bobrowski Signed-off-by: Mimi Zohar commit 6dc387d52eb67f45d68caa263704fa4e39ef8e76 Author: Matt Bobrowski Date: Wed Jan 4 03:41:44 2023 +0000 ima: fix error handling logic when file measurement failed Restore the error handling logic so that when file measurement fails, the respective iint entry is not left with the digest data being populated with zeroes. Fixes: 54f03916fb89 ("ima: permit fsverity's file digests in the IMA measurement list") Cc: stable@vger.kernel.org # 5.19 Signed-off-by: Matt Bobrowski Signed-off-by: Mimi Zohar commit f014eda5d5923a1d85f29dc7467cd90e9775cbfd Author: Bjorn Andersson Date: Mon Jan 9 14:37:45 2023 -0800 rpmsg: glink: Include types in qcom_glink_native.h Ensure that the used data types are available in qcom_glink_native.h, to silence LSP warnings. Signed-off-by: Bjorn Andersson Reviewed-by: Chris Lew Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109223745.1706152-1-quic_bjorande@quicinc.com commit 91238d52fb0730564eec520541ec7bc4e120ae52 Author: Krzysztof Kozlowski Date: Wed Jan 18 10:42:24 2023 +0100 arm64: dts: qcom: sc8280xp: drop unused properties from tx-macro tx-macro does not have children and does not allow address/size cells: sc8280xp-crd.dtb: txmacro@3220000: Unevaluated properties are not allowed ('#address-cells', '#size-cells' were unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230118094224.51704-3-krzysztof.kozlowski@linaro.org commit c75286fe8968cb0cc4f0cc83caa2b2b38f6f6d4f Author: Krzysztof Kozlowski Date: Wed Jan 18 10:42:23 2023 +0100 arm64: dts: qcom: sc8280xp: drop bogus clock-controller property There is no "clock-controller" property: sa8295p-adp.dtb: service@2: clock-controller: 'clock-controller' does not match any of the regexes: 'pinctrl-[0-9]+' From schema: Documentation/devicetree/bindings/sound/qcom,q6prm.yaml Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230118094224.51704-2-krzysztof.kozlowski@linaro.org commit 30186f8573af259ff9928512c3256bf7f66e48e6 Author: Krzysztof Kozlowski Date: Wed Jan 18 10:42:22 2023 +0100 arm64: dts: qcom: sm8250: drop unused clock-frequency from rx-macro Neither qcom,sm8250-lpass-rx-macro bindings nor the driver use "clock-frequency" property. sm8250-mtp.dtb: rxmacro@3200000: Unevaluated properties are not allowed ('clock-frequency' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230118094224.51704-1-krzysztof.kozlowski@linaro.org commit 7eddedc975638f9bf427e7964c74276450a3021d Author: Neil Armstrong Date: Wed Jan 18 17:22:43 2023 +0100 remoteproc: qcom_q6v5_pas: add sm8550 adsp, cdsp & mpss compatible & data This adds the compatible & data for the aDSP, cDSP and MPSS found in the SM8550 SoC. This platform requires the "Devicetree" firmware to be loaded along the main firmware. The MPSS DSM memory to be assigned to the MPSS subsystem is the third memory-region entry as defined in the bindings. Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221114-narmstrong-sm8550-upstream-remoteproc-v4-5-54154c08c0b7@linaro.org commit c63c0a7cab91b930a6ee78c28b481b84bfa98b7f Author: Neil Armstrong Date: Wed Jan 18 17:22:42 2023 +0100 remoteproc: qcom_q6v5_pas: add support for assigning memory to firmware Starting with SM8550, the DSM memory must now be shared to the firmware by the APPS process instead of being defined in the carveout memory reserved for MPSS. In order to handle that, add a region_assign_idx in adsp_data to specify with index of memory-region must be assigned to the MPSS via the qcom_scm_assign_mem() call at probe time. Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221114-narmstrong-sm8550-upstream-remoteproc-v4-4-54154c08c0b7@linaro.org commit 29814986b82e820ae9d3eb7474cdcf66605bd114 Author: Neil Armstrong Date: Wed Jan 18 17:22:41 2023 +0100 remoteproc: qcom_q6v5_pas: add support for dtb co-firmware loading Starting from the SM8550 SoC, starting the aDSP, cDSP and MPSS will require loading a separate "Devicetree" firmware. In order to satisfy the load & authentication order required by the SM8550 SoC, the following is implemented: - "Devicetree" firmware request & load in dedicated memory - Q6V5 prepare - Power Domain & Clocks enable - "Devicetree" firmware authentication - Main firmware load in dedicated memory - Main firmware authentication - Q6V5 startup - "Devicetree" firmware metadata release - Main metadata release When booting older platforms, the "Devicetree" steps would be bypassed and the load & authentication order would still be valid. Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221114-narmstrong-sm8550-upstream-remoteproc-v4-3-54154c08c0b7@linaro.org commit 084258d607128a7486311daf5e67ca414ee07cc9 Author: Neil Armstrong Date: Wed Jan 18 17:22:40 2023 +0100 dt-bindings: remoteproc: qcom: adsp: document sm8550 adsp, cdsp & mpss compatible This documents the compatible for the component used to boot the aDSP, cDSP and MPSS on the SM8550 SoC. The SM8550 boot process on SM8550 now requires a secondary "Devicetree" firmware to be passed along the main Firmware, and the cDSP a new power domain named "NSP". A third memory domain for the DSM memory zone is also needed for the MPSS PAS bindings. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221114-narmstrong-sm8550-upstream-remoteproc-v4-2-54154c08c0b7@linaro.org commit cee616c6884616aea3be72a9debafd0614332682 Author: Neil Armstrong Date: Wed Jan 18 17:22:39 2023 +0100 dt-bindings: remoteproc: qcom: adsp: move memory-region and firmware-name out of pas-common Move memory-region and firmware-name definitions out of qcom,pas-common.yaml since they will be redefined differently for SM8550 PAS bindings documentation. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221114-narmstrong-sm8550-upstream-remoteproc-v4-1-54154c08c0b7@linaro.org commit eb2b4ecf7299ee39ee9cecc4d3f2633aeb10cefb Author: Clément Léger Date: Tue Jan 17 15:49:29 2023 +0100 of/irq: add missing of_node_put() for interrupt parent node After calling of_irq_parse_one(), the node provided in the of_phandle_args has a refcount increment by one. Add missing of_node_put in of_irq_get() to decrement the refcount once used. Signed-off-by: Clément Léger Link: https://lore.kernel.org/r/20230117144929.423089-1-clement.leger@bootlin.com Signed-off-by: Rob Herring commit fb1ff01307ee3133ae609ad11ebd87379ce5bd9b Author: Thierry Reding Date: Fri Jan 13 16:08:04 2023 +0100 dt-bindings: phy: tegra-xusb: Convert to json-schema Convert the Tegra XUSB pad controller bindings from free-form text format to json-schema. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20230113150804.1272555-1-thierry.reding@gmail.com Signed-off-by: Vinod Koul commit 0dcaef53eb9a1cbafd1ae54187b8fed152c3a41c Author: Dmitry Baryshkov Date: Fri Jan 13 23:21:38 2023 +0200 phy: qcom-qmp-usb: fix the regs layout table for sdx65 uniphy PHY The sdx64 uniphy gen3x1 PHY references the qmp_v4_usb3phy_regs_layout while the PHY itself uses v5 regs. While there are only minor differences between v4 and v5 regs and none of them concerns registers mentions in regs_layout, switch the PHY to use qmp_v5_usb3phy_regs_layout, to remove possible confusion. Fixes: 14d98d3bf70e ("phy: qcom-qmp-usb: fix regs layout arrays") Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230113212138.421583-2-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit c08436c1569e54f712013f3b2fbc3ef3f739a7b1 Author: Dmitry Baryshkov Date: Fri Jan 13 23:21:37 2023 +0200 phy: qcom-qmp-pcie: fix the regs layout table for sm8450 gen3x1 PHY The sm8450 gen3x1 PHY references the pciephy_v4_regs_layout while the PHY itself uses v5 regs. While there are only minor differences between v4 and v5 regs and none of them concerns registers mentions in regs_layout, switch the PHY to use pciephy_v5_regs_layout to remove possible confusion. Fixes: bbe207a1aba1 ("phy: qcom-qmp-pcie: rename regs layout arrays") Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230113212138.421583-1-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit aa14cff16b9d09166c6e1261231a2a1c561adea1 Author: Dmitry Baryshkov Date: Fri Jan 13 23:21:02 2023 +0200 phy: qcom-qmp-combo: rework regs layout arrays Use symbolic names for the values inside reg layout arrays. New register names are added following the PCS register layout that is used by the particular PHY. Note: ipq8074 tables appear to use a mixture of v2 and v3 registers. This might need additional fixes. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230113212102.421491-2-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit 34d562babf7fcc34f731c8a7b118aa95f19091c3 Author: Dmitry Baryshkov Date: Fri Jan 13 23:21:01 2023 +0200 phy: qcom-qmp-combo: remove QPHY_PCS_LFPS_RXTERM_IRQ_STATUS reg The QPHY_PCS_LFPS_RXTERM_IRQ_STATUS register is not used, remove it from register layout. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230113212102.421491-1-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit 6900fdf496fd05d7285748f5e66a041ecfd3e945 Author: Dmitry Baryshkov Date: Fri Jan 13 21:55:15 2023 +0200 phy: qualcomm: qmp-ufs: rename qmp_ufs_offsets_v5 to qmp_ufs_offsets All currently known QMP UFS PHYs have the same offsets for register sub-regions. Instead of using qmp_ufs_offsets_v5 for older generations of PHYs, rename the offsets struct instance to remove _v5 suffix. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230113195515.407866-1-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit 494de1dd8353de2cefeb692947c52b5ebc14a4d1 Author: Sinthu Raja Date: Fri Jan 13 20:36:15 2023 +0530 phy: ti: j721e-wiz: Add support to enable LN23 Type-C swap The WIZ acts as a wrapper for SerDes and has Lanes 0 and 2 reserved for USB for type-C lane swap if Lane 1 and Lane 3 are linked to the USB PHY that is integrated into the SerDes IP. The WIZ control register has to be configured to support this lane swap feature. The support for swapping lanes 2 and 3 is missing and therefore add support to configure the control register to swap between lanes 2 and 3 if PHY type is USB. Signed-off-by: Sinthu Raja Reviewed-by: Roger Quadros Link: https://lore.kernel.org/r/20230113150615.19375-3-sinthu.raja@ti.com Signed-off-by: Vinod Koul commit 9a8a54b9a95554554de3f8269b34d3b78fa3c9be Author: Sinthu Raja Date: Fri Jan 13 20:36:14 2023 +0530 phy: ti: j721e-wiz: Manage TypeC lane swap if typec-dir-gpios not specified It's possible that the Type-C plug orientation on the DIR line will be implemented through hardware design. In that situation, there won't be an external GPIO line available, but the driver still needs to address this since the DT won't use the typec-dir-gpios property. Add code to handle LN10 Type-C swap if typec-dir-gpios property is not specified in DT. Signed-off-by: Sinthu Raja Reviewed-by: Roger Quadros Link: https://lore.kernel.org/r/20230113150615.19375-2-sinthu.raja@ti.com Signed-off-by: Vinod Koul commit ddc10938e08cd7aac63d8385f7305f7889df5179 Author: Bjorn Helgaas Date: Fri Dec 16 10:21:26 2022 -0600 PCI: switchtec: Return -EFAULT for copy_to_user() errors switchtec_dev_read() didn't handle copy_to_user() errors correctly: it assigned "rc = -EFAULT", but actually returned either "size", -ENXIO, or -EBADMSG instead. Update the failure cases to unlock mrpc_mutex and return -EFAULT directly. Link: https://lore.kernel.org/r/20221216162126.207863-3-helgaas@kernel.org Fixes: 080b47def5e5 ("MicroSemi Switchtec management interface driver") Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe commit 4e353ff40a830c9c5a9feee13d1cacbc3f803e8f Author: Bjorn Helgaas Date: Fri Dec 16 10:21:25 2022 -0600 PCI: switchtec: Simplify switchtec_dma_mrpc_isr() The "ret" variable in switchtec_dma_mrpc_isr() is superfluous. Remove it and just return the value. No functional change intended. Link: https://lore.kernel.org/r/20221216162126.207863-2-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe commit ea0b5aa5f184cf8293c93163f0fb00505190d431 Author: Alexey V. Vissarionov Date: Sun Dec 18 06:33:47 2022 +0300 PCI/IOV: Enlarge virtfn sysfs name buffer The sysfs link name "virtfn%u" constructed by pci_iov_sysfs_link() requires 17 bytes to contain the longest possible string. Increase VIRTFN_ID_LEN to accommodate that. Found by Linux Verification Center (linuxtesting.org) with SVACE. [bhelgaas: commit log, comment at #define] Fixes: dd7cc44d0bce ("PCI: add SR-IOV API for Physical Function driver") Link: https://lore.kernel.org/r/20221218033347.23743-1-gremlin@altlinux.org Signed-off-by: Alexey V. Vissarionov Signed-off-by: Bjorn Helgaas commit abf08576afe31506b812c8c1be9714f78613f300 Author: Christian Brauner Date: Fri Jan 13 12:49:10 2023 +0100 fs: port vfs_*() helpers to struct mnt_idmap Convert to struct mnt_idmap. Last cycle we merged the necessary infrastructure in 256c8aed2b42 ("fs: introduce dedicated idmap type for mounts"). This is just the conversion to struct mnt_idmap. Currently we still pass around the plain namespace that was attached to a mount. This is in general pretty convenient but it makes it easy to conflate namespaces that are relevant on the filesystem with namespaces that are relevent on the mount level. Especially for non-vfs developers without detailed knowledge in this area this can be a potential source for bugs. Once the conversion to struct mnt_idmap is done all helpers down to the really low-level helpers will take a struct mnt_idmap argument instead of two namespace arguments. This way it becomes impossible to conflate the two eliminating the possibility of any bugs. All of the vfs and all filesystems only operate on struct mnt_idmap. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit 64b4cdf22f3b002af4a7cb9651036b6248390286 Author: Christian Brauner Date: Fri Jan 13 12:49:09 2023 +0100 f2fs: project ids aren't idmapped Project ids are only settable filesystem wide in the initial namespace. They don't take the mount's idmapping into account. Note, that after we converted everything over to struct mnt_idmap mistakes such as the one here aren't possible anymore as struct mnt_idmap cannot be passed to functions that operate on k{g,u}ids. Acked-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit 81c254a65ceb2770bc3cd87bd172a29d8ae92dc4 Author: Dan Carpenter Date: Tue Jan 17 17:17:29 2023 +0300 ALSA: fireface: fix locking bug in ff400_copy_msg_to_user() The ff400_copy_msg_to_user() function drops the spin lock to call copy_to_user(). However, if the copy_to_user() fails, then it must take the lock again before returning. Failure to take the lock leads to a double unlock in the caller, hwdep_read(). Fixes: acdebd8b4c0c ("ALSA: fireface: implement message parser for Fireface 400") Signed-off-by: Dan Carpenter Acked-by: Takashi Sakamoto Link: https://lore.kernel.org/r/Y8at+W/7OGvEBY8O@kili Signed-off-by: Takashi Iwai commit 4b23603a251d24022f2fa48ee67610eb245a4115 Author: Tudor Ambarus Date: Thu Nov 10 17:25:28 2022 +0200 dmaengine: drivers: Use devm_platform_ioremap_resource() platform_get_resource() and devm_ioremap_resource() are wrapped up in the devm_platform_ioremap_resource() helper. Use the helper and get rid of the local variable for struct resource *. We now have a function call less. Signed-off-by: Tudor Ambarus Acked-by: Jernej Skrabec Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20221110152528.7821-1-tudor.ambarus@microchip.com Signed-off-by: Vinod Koul commit 531d4dfcfd164f575d7b12c784b63c762da1fbf4 Author: Claudiu Beznea Date: Thu Nov 17 15:15:47 2022 +0200 dmaengine: at_xdmac: remove empty line Remove empty line. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221117131547.293044-4-claudiu.beznea@microchip.com Signed-off-by: Vinod Koul commit 650b0e990cbd7e214251a173460f79f3681e8233 Author: Claudiu Beznea Date: Thu Nov 17 15:15:45 2022 +0200 dmaengine: at_xdmac: add runtime pm support Add runtime PM support which involves disabling/enabling controller's clocks on runtime PM suspend/resume ops. The runtime suspend/resume is done based on the work submitted to the controller: runtime resume is happening on at_xdmac_start_xfer() and runtime suspend on at_xdmac_tasklet(). Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221117131547.293044-2-claudiu.beznea@microchip.com Signed-off-by: Vinod Koul commit 610b573e5169336e99092dbf7071fdf08222c3f1 Author: Claudiu Beznea Date: Thu Nov 17 15:15:46 2022 +0200 dmaengine: at_xdmac: align properly function members Align properly function members. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221117131547.293044-3-claudiu.beznea@microchip.com Signed-off-by: Vinod Koul commit 24d97468f4f325e2c0ac052907c59e6956e96dee Author: Deepak R Varma Date: Sat Jan 14 19:33:53 2023 +0530 drm/i915/display: Convert i9xx_pipe_crc_auto_source to void Convert function i9xx_pipe_crc_auto_source() to return void instead of int since the current implementation always returns 0 to the caller. Issue identified using returnvar Coccinelle semantic patch. $ make coccicheck COCCI=scripts/coccinelle/misc/returnvar.cocci \ M=drivers/gpu/drm/i915/ Signed-off-by: Deepak R Varma Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Y8K2SS/zNiPAmLsS@ubun2204.myguest.virtualbox.org commit f66c48af7a110c0d694c4ac4a1257affb272a2ea Author: Johannes Berg Date: Mon Jan 9 13:07:21 2023 +0200 mac80211: support minimal EHT rate reporting on RX Add minimal support for RX EHT rate reporting, not yet adding (modifying) any radiotap headers, just statistics for cfg80211. Signed-off-by: Johannes Berg commit b1b3297df7db7065476666ddbca5a61d081347ef Author: Muna Sinada Date: Wed Oct 5 14:54:46 2022 -0700 wifi: mac80211: Add HE MU-MIMO related flags in ieee80211_bss_conf Adding flags for SU Beamformer, SU Beamformee, MU Beamformer and Full Bandwidth UL MU-MIMO for HE. This is utilized to pass MU-MIMO configurations from user space to driver in AP mode. Signed-off-by: Muna Sinada Link: https://lore.kernel.org/r/1665006886-23874-2-git-send-email-quic_msinada@quicinc.com [fixed indentation, removed redundant !!] Signed-off-by: Johannes Berg commit 42470fa093248807f668825ff14de9bc623c0d53 Author: Muna Sinada Date: Wed Oct 5 14:54:45 2022 -0700 wifi: mac80211: Add VHT MU-MIMO related flags in ieee80211_bss_conf Adding flags for SU Beamformer, SU Beamformee, MU Beamformer and MU Beamformee for VHT. This is utilized to pass MU-MIMO configurations from user space to driver in AP mode. Signed-off-by: Muna Sinada Link: https://lore.kernel.org/r/1665006886-23874-1-git-send-email-quic_msinada@quicinc.com [fixed indentation, removed redundant !!] Signed-off-by: Johannes Berg commit bfc551679cd63ca3a4b3e7f338aa2bb06ce43e25 Author: Veerendranath Jakkam Date: Tue Dec 6 13:32:26 2022 +0530 wifi: cfg80211: Use MLD address to indicate MLD STA disconnection We use station's MLD address to report disconnection of MLD station. Update the documentation in multiple places to indicate this. Signed-off-by: Veerendranath Jakkam Link: https://lore.kernel.org/r/20221206080226.1702646-4-quic_vjakkam@quicinc.com [update commit message] Signed-off-by: Johannes Berg commit 648fba791cb0f5ef6166449d056f82e6639fe268 Author: Shivani Baranwal Date: Tue Dec 6 20:07:15 2022 +0530 wifi: cfg80211: Support 32 bytes KCK key in GTK rekey offload Currently, maximum KCK key length supported for GTK rekey offload is 24 bytes but with some newer AKMs the KCK key length can be 32 bytes. e.g., 00-0F-AC:24 AKM suite with SAE finite cyclic group 21. Add support to allow 32 bytes KCK keys in GTK rekey offload. Signed-off-by: Shivani Baranwal Signed-off-by: Veerendranath Jakkam Link: https://lore.kernel.org/r/20221206143715.1802987-3-quic_vjakkam@quicinc.com Signed-off-by: Johannes Berg commit df4969ca135b9b3b2c38c07514aaa775112ac835 Author: Shivani Baranwal Date: Tue Dec 6 20:07:14 2022 +0530 wifi: cfg80211: Fix extended KCK key length check in nl80211_set_rekey_data() The extended KCK key length check wrongly using the KEK key attribute for validation. Due to this GTK rekey offload is failing when the KCK key length is 24 bytes even though the driver advertising WIPHY_FLAG_SUPPORTS_EXT_KEK_KCK flag. Use correct attribute to fix the same. Fixes: 093a48d2aa4b ("cfg80211: support bigger kek/kck key length") Signed-off-by: Shivani Baranwal Signed-off-by: Veerendranath Jakkam Link: https://lore.kernel.org/r/20221206143715.1802987-2-quic_vjakkam@quicinc.com Signed-off-by: Johannes Berg commit 585b6e1304dcc46e65dc1aaca5973b33abd0c48d Author: Johannes Berg Date: Mon Jan 16 15:24:11 2023 +0100 wifi: cfg80211: remove support for static WEP This reverts commit b8676221f00d ("cfg80211: Add support for static WEP in the driver") since no driver ever ended up using it. Signed-off-by: Johannes Berg commit ae7c40bc2c8b889cdb357a4e501bd70ed3155ada Merge: 309d401452b96 a9737808b3e4e Author: Mark Brown Date: Wed Jan 18 15:45:21 2023 +0000 Add support to compress API to ipc_msg_data / Merge series from Daniel Baluta : This patch series adds compress API support to ipc_msg_data / set_stream_data_offset callbacks. Changes since v1: - fixed reviewed-by list (+Peter, -Pierre). Since github had some glitches I added the reviews received manually in the commits. - Github PR link: https://github.com/thesofproject/linux/pull/4133 Daniel Baluta (4): ASoC: SOF: Prepare ipc_msg_data to be used with compress API ASoC: SOF: Prepare set_stream_data_offset for compress API ASoC: SOF: Add support for compress API for stream data/offset ASoC: SOF: compress: Set compress data offset sound/soc/sof/amd/acp-ipc.c | 8 ++-- sound/soc/sof/amd/acp.h | 5 ++- sound/soc/sof/compress.c | 9 +++++ sound/soc/sof/intel/hda-ipc.c | 8 ++-- sound/soc/sof/intel/hda.h | 4 +- sound/soc/sof/ipc3-pcm.c | 3 +- sound/soc/sof/ipc3.c | 4 +- sound/soc/sof/mediatek/mt8186/mt8186.c | 2 +- sound/soc/sof/mediatek/mt8195/mt8195.c | 2 +- sound/soc/sof/ops.h | 8 ++-- sound/soc/sof/sof-priv.h | 11 ++++-- sound/soc/sof/stream-ipc.c | 53 +++++++++++++++++++------- 12 files changed, 81 insertions(+), 36 deletions(-) -- 2.25.1 commit 309d401452b96f23abe2572d290c51c548d9f728 Merge: 24b401f3e0b1d c1619ea22d950 Author: Mark Brown Date: Wed Jan 18 15:33:51 2023 +0000 ASoC: Merge up 6.2 fixes To resolve a conflict and support further development. commit bf7660dab30dfb43fcdd3c73b1f526e53f78b76c Author: Arnd Bergmann Date: Tue Jan 17 18:20:55 2023 +0100 HID: stop drivers from selecting CONFIG_HID There is a mix of drivers using either 'depends on HID' or 'select HID', which causes both circular dependencies and missed dependencies for a 'select': WARNING: unment direct dependencies for HID Depends on [m]: HID_SUPPORT [=y] && INPUT [=m] Selected by [y]: - AMD_SFH_HID [=y] && HID_SUPPORT [=y] && (X86_64 || COMPILE_TEST [=y]) && PCI [=y] Selected by [m]: - I2C_HID_CORE [=m] && HID_SUPPORT [=y] WARNING: unmet direct dependencies detected for INPUT_FF_MEMLESS Depends on [m]: INPUT [=m] Selected by [y]: - DRAGONRISE_FF [=y] && HID_SUPPORT [=y] && HID [=y] && HID_DRAGONRISE [=y] - HID_MICROSOFT [=y] && HID_SUPPORT [=y] && HID [=y] - GREENASIA_FF [=y] && HID_SUPPORT [=y] && HID [=y] && HID_GREENASIA [=y] Selected by [m]: - INPUT_ARIZONA_HAPTICS [=m] && INPUT [=m] && INPUT_MISC [=y] && MFD_ARIZONA [=y] && SND_SOC [=m] - INPUT_PM8XXX_VIBRATOR [=m] && INPUT [=m] && INPUT_MISC [=y] && (MFD_PM8XXX [=m] || MFD_SPMI_PMIC [=n]) - INPUT_MAX8997_HAPTIC [=m] && INPUT [=m] && INPUT_MISC [=y] && PWM [=y] && MFD_MAX8997 [=y] - INPUT_GPIO_VIBRA [=m] && INPUT [=m] && INPUT_MISC [=y] && (GPIOLIB [=y] || COMPILE_TEST [=y]) - INPUT_REGULATOR_HAPTIC [=m] && INPUT [=m] && INPUT_MISC [=y] && REGULATOR [=y] - INPUT_TWL6040_VIBRA [=m] && INPUT [=m] && INPUT_MISC [=y] && TWL6040_CORE [=y] - INPUT_PWM_VIBRA [=m] && INPUT [=m] && INPUT_MISC [=y] && PWM [=y] - INPUT_DRV260X_HAPTICS [=m] && INPUT_MISC [=y] && INPUT [=m] && I2C [=y] && (GPIOLIB [=y] || COMPILE_TEST [=y]) - INPUT_DRV2665_HAPTICS [=m] && INPUT_MISC [=y] && INPUT [=m] && I2C [=y] - INPUT_DRV2667_HAPTICS [=m] && INPUT_MISC [=y] && INPUT [=m] && I2C [=y] - INPUT_SC27XX_VIBRA [=m] && INPUT [=m] && INPUT_MISC [=y] && (MFD_SC27XX_PMIC [=y] || COMPILE_TEST [=y]) - HID_MAYFLASH [=m] && HID_SUPPORT [=y] && HID [=y] Avoid this by changing all HID client drivers to use 'depends on HID'. For I2C_HID, this requires a larger rework of the Kconfig description, but it hopefully becomes easier to understand without the complex I2C_HID_CORE definition. Fixes: 25621bcc8976 ("HID: Kconfig: split HID support and hid-core compilation") Signed-off-by: Arnd Bergmann Acked-by: Randy Dunlap Reviewed-by: Greg Kroah-Hartman Signed-off-by: Jiri Kosina commit b575b5a1e625b589ba1b1eb36c05fcca588cbc85 Author: Ard Biesheuvel Date: Mon Jan 16 12:01:48 2023 +0100 ARM: 9286/1: crypto: Implement fused AES-CTR/GHASH version of GCM On 32-bit ARM, AES in GCM mode takes full advantage of the ARMv8 Crypto Extensions when available, resulting in a performance of 6-7 cycles per byte for typical IPsec frames on cores such as Cortex-A53, using the generic GCM template encapsulating the accelerated AES-CTR and GHASH implementations. At such high rates, any time spent copying data or doing other poorly optimized work in the generic layer hurts disproportionately, and we can get a significant performance improvement by combining the optimized AES-CTR and GHASH implementations into a single GCM driver. On Cortex-A53, this results in a performance improvement of around 75%, and AES-256-GCM-128 with RFC4106 encapsulation runs in 4 cycles per byte. Note that this code takes advantage of the fact that kernel mode NEON is now supported in softirq context as well, and therefore does not provide a non-NEON fallback path at all. (AEADs are only callable in process or softirq context) Acked-by: Herbert Xu Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King (Oracle) commit 01f714ee022ecb2667ca8ba909138b1af4cfff2c Author: Lukas Bulwahn Date: Wed Jan 18 08:46:59 2023 +0100 counter: fix dependency references for config MICROCHIP_TCB_CAPTURE Commit dfeef15e73ca ("counter: microchip-tcp-capture: Add appropriate arch deps for TCP driver") intends to add appropriate dependencies for the config MICROCHIP_TCB_CAPTURE. It however prefixes the intended configs with CONFIG, but in Kconfig files in contrast to source files, the configs are referenced to without prefixing them with CONFIG. Fix the dependency references due to this minor misconception. Fixes: dfeef15e73ca ("counter: microchip-tcp-capture: Add appropriate arch deps for TCP driver") Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20230118074659.5909-1-lukas.bulwahn@gmail.com/ Signed-off-by: William Breathitt Gray commit 13acb368bf02c4ab2c3bd7c35629b421b0ceed18 Author: Christian König Date: Mon May 9 13:26:49 2022 +0200 drm/ttm/vmwgfx: move ttm_bo_wait into VMWGFX Not used anymore by other drivers or TTM itself. Signed-off-by: Christian König Reviewed-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20221125102137.1801-9-christian.koenig@amd.com commit 41d351f29528371775e09a8a95933a32455dffa1 Author: Christian König Date: Mon May 9 10:45:40 2022 +0200 drm/nouveau: stop using ttm_bo_wait TTM is just wrapping core DMA functionality here, remove the mid-layer. No functional change. Signed-off-by: Christian König Acked-by: Karol Herbst Link: https://patchwork.freedesktop.org/patch/msgid/20221125102137.1801-5-christian.koenig@amd.com commit 2bbba115c3c9a647bcb3201b014fcc3728fe75c8 Author: Randy Dunlap Date: Sat Jan 14 10:57:36 2023 -0800 regulator: tps65219: use IS_ERR() to detect an error pointer Fix pointer comparison to integer warning from gcc & sparse: GCC: ../drivers/regulator/tps65219-regulator.c:370:26: warning: ordered comparison of pointer with integer zero [-Wextra] 370 | if (rdev < 0) { | ^ sparse warning: drivers/regulator/tps65219-regulator.c:370:26: sparse: error: incompatible types for operation (<): drivers/regulator/tps65219-regulator.c:370:26: sparse: struct regulator_dev *[assigned] rdev drivers/regulator/tps65219-regulator.c:370:26: sparse: int Fixes: c12ac5fc3e0a ("regulator: drivers: Add TI TPS65219 PMIC regulators support") Signed-off-by: Randy Dunlap Cc: Jerome Neanne Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Cc: Liam Girdwood Cc: Mark Brown Link: https://lore.kernel.org/r/20230114185736.2076-1-rdunlap@infradead.org Signed-off-by: Mark Brown commit 68e5b6aa2795fd05c6ff58616cb16f2f216e4123 Author: Magnus Karlsson Date: Tue Jan 17 10:43:05 2023 +0100 xdp: document xdp_do_flush() before napi_complete_done() Document in the XDP_REDIRECT manual section that drivers must call xdp_do_flush() before napi_complete_done(). The two reasons behind this can be found following the links below. Signed-off-by: Magnus Karlsson Link: https://lore.kernel.org/r/20221220185903.1105011-1-sbohrer@cloudflare.com Link: https://lore.kernel.org/all/20210624160609.292325-1-toke@redhat.com/ Acked-by: Toke Høiland-Jørgensen Signed-off-by: David S. Miller commit bed91ac0810634e0ae58e575d8a1fb7893b4ac72 Merge: 0d4cda805a183 595655e081746 Author: David S. Miller Date: Wed Jan 18 14:31:43 2023 +0000 Merge branch 'sparx5-vcap-improve-locking' Steen Hegelund says: ==================== sparx5: Improve locking in the VCAP API This improves the VCAP cache and the VCAP rule list protection against access from different sources. The VCAP Admin lock protects the list of rules for the VCAP instance as well as the cache used for encoding and decoding rules. This series provides dedicated functions for accessing rule statistics, decoding rule content, verifying if a rule exists and getting a rule with the lock held, as well as ensuring the use of the lock when the list of rules or the cache is accessed. ==================== Signed-off-by: David S. Miller commit 595655e081746f6fca8263154fd6fb5f2b22da24 Author: Steen Hegelund Date: Tue Jan 17 09:55:44 2023 +0100 net: microchip: sparx5: Add lock initialization to the KUNIT tests Ensure that the KUNIT tests lock instance is initialized before the test is executed. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit 1972b6d927ac326fd3a01240c330401f47526558 Author: Steen Hegelund Date: Tue Jan 17 09:55:43 2023 +0100 net: microchip: sparx5: Improve VCAP admin locking in the VCAP API This improves the VCAP cache and the VCAP rule list protection against access from different sources. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit 9579e2c271b4f2e6d24f61ff17abda2e9ce8cc85 Author: Steen Hegelund Date: Tue Jan 17 09:55:42 2023 +0100 net: microchip: sparx5: Add VCAP admin locking in debugFS This ensures that the admin lock is taken before the debugFS functions starts iterating the VCAP rules. It also adds a separate function to decode a rule, which expects the lock to have been taken before it is called. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit 975d86acaec78306a88b4575a2c6357b97c2c4db Author: Steen Hegelund Date: Tue Jan 17 09:55:41 2023 +0100 net: microchip: sparx5: Add support to check for existing VCAP rule id Add a new function that just checks if the VCAP rule id is already used by an existing rule. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit 27d293cceee50223c2f79978c098e9d1358b4ba6 Author: Steen Hegelund Date: Tue Jan 17 09:55:40 2023 +0100 net: microchip: sparx5: Add support for rule count by cookie This adds support for TC clients to get the packet count for a TC filter identified by its cookie. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit 0d4cda805a183bbe523f2407edb5c14ade50b841 Author: Hayes Wang Date: Tue Jan 17 11:03:44 2023 +0800 r8152: avoid to change cfg for all devices The rtl8152_cfgselector_probe() should set the USB configuration to the vendor mode only for the devices which the driver (r8152) supports. Otherwise, no driver would be used for such devices. Fixes: ec51fbd1b8a2 ("r8152: add USB device driver for config selection") Signed-off-by: Hayes Wang Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 5e83f359d9805b3561f160afafddfa7572155d1c Author: Dmitry Baryshkov Date: Wed Jan 18 10:16:58 2023 +0200 drm/bridge: lt9611: properly program the dual host mode If the bridge is connected using both DSI ports, the driver should use both of them all the time. Correct programming sequence to always use dual-port mode if both dsi0 and dsi1 are connected. Reviewed-by: Neil Armstrong Signed-off-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-14-dmitry.baryshkov@linaro.org commit 4914cbc4fbadf0a3bcad9b0b09b3d8005a3dcd9e Author: Dmitry Baryshkov Date: Wed Jan 18 10:16:57 2023 +0200 drm/bridge: lt9611: stop filtering modes via the table The lt9611 bridge can support different modes, it makes no sense to list them in the table. Drop the table and check the number of interfaces using the fixed value. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-13-dmitry.baryshkov@linaro.org commit 84cf74d99f88bc476678254310baffddfba68bb6 Author: Dmitry Baryshkov Date: Wed Jan 18 10:16:56 2023 +0200 drm/bridge: lt9611: rework infoframes handling Rework handling infoframes: - Write full HDMI AVI infoframe instead of just fixing the VIC value - Also send the HDMI Vendor Specific infoframe, as recommended by the HDMI spec. Reviewed-by: Neil Armstrong Signed-off-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-12-dmitry.baryshkov@linaro.org commit 6b089d5e35d6daf3d348a3fbd8974d4ed896a231 Author: Dmitry Baryshkov Date: Wed Jan 18 10:16:55 2023 +0200 drm/bridge: lt9611: simplify video timings programming Inline calculated values to simplify the calculation in lt9611_mipi_video_setup(). Reviewed-by: Neil Armstrong Signed-off-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-11-dmitry.baryshkov@linaro.org commit 0c7474694849b44cfdf4e22b41e8f3eb85d78709 Author: Dmitry Baryshkov Date: Wed Jan 18 10:16:54 2023 +0200 drm/bridge: lt9611: fix sync polarity for DVI output Attaching DVI sink to the lt9611 requires different setup. Fix the register write to make the DVI displays sync onto the correct sync pulse. Reviewed-by: Neil Armstrong Signed-off-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-10-dmitry.baryshkov@linaro.org commit 0c3997b0fec74a828ef258851e2fb260e3e7620c Author: Dmitry Baryshkov Date: Wed Jan 18 10:16:53 2023 +0200 drm/bridge: lt9611: attach to the next bridge The bindings require that there is a next bridge after the lt9611. If nothing else it can be the hdmi-connector (as used on the RB3 platform, see sdm845-db845c.dts). Bring in the next bridge into the drm bridges chain and attach to it. Since lt9611 is not anymore the last bridge in the chain, this also allows us to drop all the !DRM_BRIDGE_ATTACH_NO_CONNECTOR functionality. Reviewed-by: Neil Armstrong Signed-off-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-9-dmitry.baryshkov@linaro.org commit fad97f2811933085adb3dc3b13b2e1cf985295b1 Author: Dmitry Baryshkov Date: Wed Jan 18 10:16:52 2023 +0200 drm/bridge: lt9611: rework the mode_set function The mode_set callback is deprectated for drm_bridges in favour of using atomic_enable callback. Move corresponding code into the function lt9611_bridge_atomic_enable() and turn lt9611_bridge_pre_enable() into the proper atomic_pre_enable callback. Reviewed-by: Neil Armstrong Signed-off-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-8-dmitry.baryshkov@linaro.org commit b0a7f8736789935f62d6df32d441cdf05a5c05d2 Author: Dmitry Baryshkov Date: Wed Jan 18 10:16:51 2023 +0200 drm/bridge: lt9611: pass a pointer to the of node Pass a pointer to the OF node while registering lt9611 MIPI device. Fixes: 23278bf54afe ("drm/bridge: Introduce LT9611 DSI to HDMI bridge") Reviewed-by: Neil Armstrong Signed-off-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-7-dmitry.baryshkov@linaro.org commit 2576eb26494eb0509dd9ceb0cd27771a7a5e3674 Author: Dmitry Baryshkov Date: Wed Jan 18 10:16:50 2023 +0200 drm/bridge: lt9611: fix clock calculation Instead of having several fixed values for the pcr register, calculate it before programming. This allows the bridge to support most of the display modes. Fixes: 23278bf54afe ("drm/bridge: Introduce LT9611 DSI to HDMI bridge") Reviewed-by: Neil Armstrong Signed-off-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-6-dmitry.baryshkov@linaro.org commit ad188aa47edaa033a270e1a3efae43836ff47569 Author: Dmitry Baryshkov Date: Wed Jan 18 10:16:49 2023 +0200 drm/bridge: lt9611: fix programming of video modes Program the upper part of the hfront_porch into the proper register. Fixes: 23278bf54afe ("drm/bridge: Introduce LT9611 DSI to HDMI bridge") Reviewed-by: Neil Armstrong Signed-off-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-5-dmitry.baryshkov@linaro.org commit 0b157efa384ea417304b1da284ee2f603c607fc3 Author: Dmitry Baryshkov Date: Wed Jan 18 10:16:48 2023 +0200 drm/bridge: lt9611: fix polarity programming Fix programming of hsync and vsync polarities Fixes: 23278bf54afe ("drm/bridge: Introduce LT9611 DSI to HDMI bridge") Reviewed-by: Neil Armstrong Signed-off-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-4-dmitry.baryshkov@linaro.org commit a7790f6bd38f3642b60ae3504a2c749135b89451 Author: Dmitry Baryshkov Date: Wed Jan 18 10:16:47 2023 +0200 drm/bridge: lt9611: fix HPD reenablement The driver will reset the bridge in the atomic_pre_enable(). However this will also drop the HPD interrupt state. Instead of resetting the bridge, properly wake it up. This fixes the HPD interrupt delivery after the disable/enable cycle. Fixes: 23278bf54afe ("drm/bridge: Introduce LT9611 DSI to HDMI bridge") Reviewed-by: Neil Armstrong Signed-off-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-3-dmitry.baryshkov@linaro.org commit ae2d329f104b75a0a78dcaded29fe6283289cdf9 Author: Dmitry Baryshkov Date: Wed Jan 18 10:16:46 2023 +0200 drm/bridge: lt9611: fix sleep mode setup On atomic_post_disable the bridge goes to the low power state. However the code disables too much of the chip, so the HPD event is not being detected and delivered to the host. Reduce the power saving in order to get the HPD event. Fixes: 23278bf54afe ("drm/bridge: Introduce LT9611 DSI to HDMI bridge") Reviewed-by: Neil Armstrong Signed-off-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-2-dmitry.baryshkov@linaro.org commit 8e7610e686d0943d0c340e0dc4425c44f6470074 Author: Robert Hancock Date: Mon Jan 16 16:08:34 2023 -0600 net: macb: simplify TX timestamp handling This driver was capturing the TX timestamp values from the TX ring during the TX completion path, but deferring the actual packet TX timestamp updating to a workqueue. There does not seem to be much of a reason for this with the current state of the driver. Simplify this to just do the TX timestamping as part of the TX completion path, to avoid the need for the extra timestamp buffer and workqueue. Signed-off-by: Robert Hancock Reviewed-by: Jacob Keller Reviewed-by: Claudiu Beznea Signed-off-by: David S. Miller commit e51c94dd9c7af3d84b19d1753ee118f999c6c8dd Author: Dmitry Baryshkov Date: Mon Jan 9 02:29:32 2023 +0200 dt-bindings: interconnect: qcom: drop IPA_CORE related defines These interconnects are modeled as clks, not interconnects, therefore remove corresponding defines from the binding as they're unused. Acked-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230109002935.244320-10-dmitry.baryshkov@linaro.org Signed-off-by: Georgi Djakov commit 2f0f1d98e708db2a39ce1d4756b5d4512274c215 Author: Dmitry Baryshkov Date: Mon Jan 9 02:29:31 2023 +0200 dt-bindings: interconnect: qcom: Remove ipa-virt compatibles These interconnects are going to be modeled as clockks, not interconnects. There are no other interconnects left on the virtual SoC-ipa-virt NoCs, therefore remove the compatibles from the binding as they're unused. Acked-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230109002935.244320-9-dmitry.baryshkov@linaro.org Signed-off-by: Georgi Djakov commit b136d257ee0b7ad129812898dd7735d186551a10 Author: Dmitry Baryshkov Date: Mon Jan 9 02:29:30 2023 +0200 interconnect: qcom: sc8280xp: Drop IP0 interconnects Similar to the sdx55 and sc7180, let's drop the MASTER_IPA_CORE and SLAVE_IPA_CORE interconnects for this platform. There are no actual users of this interconnect. The IP0 resource will be handled by clk-rpmh driver. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230109002935.244320-8-dmitry.baryshkov@linaro.org Signed-off-by: Georgi Djakov commit c4801e244132d41f8225266afe69f31e136ea012 Author: Dmitry Baryshkov Date: Mon Jan 9 02:29:29 2023 +0200 interconnect: qcom: sc8180x: Drop IP0 interconnects Similar to the sdx55 and sc7180, let's drop the MASTER_IPA_CORE and SLAVE_IPA_CORE interconnects for this platofm. There are no actual users of this intercoonect. The IP0 resource will be handled by clk-rpmh driver. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230109002935.244320-7-dmitry.baryshkov@linaro.org Signed-off-by: Georgi Djakov commit 10d13cb5959a93638aef39df6d91d5c4e1ffd199 Author: Dmitry Baryshkov Date: Mon Jan 9 02:29:28 2023 +0200 interconnect: qcom: sm8250: Drop IP0 interconnects Similar to the sdx55 and sc7180, let's drop the MASTER_IPA_CORE and SLAVE_IPA_CORE interconnects for this platform. There are no actual users of this interconnect. The IP0 resource will be handled by clk-rpmh driver. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230109002935.244320-6-dmitry.baryshkov@linaro.org Signed-off-by: Georgi Djakov commit a532439199369b86cf7323f84d1946b7d0634c53 Author: Dmitry Baryshkov Date: Mon Jan 9 02:29:27 2023 +0200 interconnect: qcom: sm8150: Drop IP0 interconnects Similar to the sdx55 and sc7180, let's drop the MASTER_IPA_CORE and SLAVE_IPA_CORE interconnects for this platform. There are no actual users of this interconnect. The IP0 resource will be handled by clk-rpmh driver. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230109002935.244320-5-dmitry.baryshkov@linaro.org Signed-off-by: Georgi Djakov commit 88387e21d224923eaa0074e3eef699a30f437e62 Author: Dmitry Baryshkov Date: Mon Jan 9 02:29:26 2023 +0200 interconnect: move ignore_list out of of_count_icc_providers() Move the const ignore_list definition out of the of_count_icc_providers() function. This prevents the following stack frame size warnings if the list is expanded: drivers/interconnect/core.c:1082:12: warning: stack frame size (1216) exceeds limit (1024) in 'of_count_icc_providers' [-Wframe-larger-than] Reported-by: kernel test robot Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230109002935.244320-4-dmitry.baryshkov@linaro.org Signed-off-by: Georgi Djakov commit 1c0c93d04efbbb7b141eef4ecc2fa8d0ba7815de Author: Dmitry Baryshkov Date: Mon Jan 9 02:29:25 2023 +0200 interconnect: qcom: sc7180: drop IP0 remnants Drop two defines leftover from the commit 2f3724930eb4 ("interconnect: qcom: sc7180: Drop IP0 interconnects"), which dropped handling of the IP0 resource in favour of handling it in the clk-rpmh driver. Fixes: 2f3724930eb4 ("interconnect: qcom: sc7180: Drop IP0 interconnects") Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230109002935.244320-3-dmitry.baryshkov@linaro.org Signed-off-by: Georgi Djakov commit 7d6d7bfd4cb901120c9ffb0703b23faa9bb169fb Author: Dmitry Baryshkov Date: Mon Jan 9 02:29:24 2023 +0200 interconnect: qcom: sdx55: drop IP0 remnants Drop two defines leftover from the commit 2fb251c26560 ("interconnect: qcom: sdx55: Drop IP0 interconnects"), which dropped handling of the IP0 resource in favour of handling it in the clk-rpmh driver. Fixes: 2fb251c26560 ("interconnect: qcom: sdx55: Drop IP0 interconnects") Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20230109002935.244320-2-dmitry.baryshkov@linaro.org Signed-off-by: Georgi Djakov commit eb1d929f1551f226f59e38465c542df9071166d6 Author: Parav Pandit Date: Mon Jan 16 22:27:08 2023 +0200 virtio_net: Reuse buffer free function virtnet_rq_free_unused_buf() helper function to free the buffer already exists. Avoid code duplication by reusing existing function. Reviewed-by: Alexander Duyck Reviewed-by: Xuan Zhuo Signed-off-by: Parav Pandit Acked-by: Michael S. Tsirkin Acked-by: Jason Wang Signed-off-by: David S. Miller commit 24b401f3e0b1ddd269969e68e947ab0a6f89b017 Merge: e7e2b92e609f8 bc36d761cad7f Author: Mark Brown Date: Wed Jan 18 13:41:51 2023 +0000 ASoC: samsung: fsd: audio support for FSD SoC Merge series from Padmanabhan Rajanbabu : This patch series enables audio support on FSD SoC. Changes in v4: 1. Rebased and addressed review comments provided for v3. Changes in v3: 1. Addressed all the review comments provided for v2 patch. 2. Fixed compilation warnings reported by kernel test robot. Changes in v2: 1. New compatible added in Exynos I2S driver for FSD platform. 2. Added Fixup support for Exynos I2S CPU DAI. 3. Migration of manual PSR, OPCLK configuration to Exynos CPU DAI driver as fixup. 4. Migrated from dedicated sound card to simple audio card. 5. Support added for tlv320aic3x-i2c codec on FSD platform. Changes in v1: 1. Add TDM support on samsung I2S interface. 2. Allow sound card to directly configure I2S prescaler divider instead of calculating it from frame clock. 3. The sound card support for FSD SoC which utilizes samsung I2S interface as CPU DAI. Padmanabhan Rajanbabu (5): ASoC: dt-bindings: Add FSD I2S controller bindings ASoC: samsung: i2s: add support for FSD I2S arm64: dts: fsd: Add I2S DAI node for Tesla FSD arm64: dts: fsd: Add codec node for Tesla FSD arm64: dts: fsd: Add sound card node for Tesla FSD .../bindings/sound/samsung-i2s.yaml | 8 +++ arch/arm64/boot/dts/tesla/fsd-evb.dts | 53 +++++++++++++++++++ arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi | 14 +++++ arch/arm64/boot/dts/tesla/fsd.dtsi | 34 ++++++++++++ sound/soc/samsung/i2s-regs.h | 1 + sound/soc/samsung/i2s.c | 53 +++++++++++++++++++ 6 files changed, 163 insertions(+) -- 2.17.1 commit 4218b0e2122f8bf996e695be20b66b9484c3283d Merge: 387f5f7dc64af f80a612dd77c4 Author: David S. Miller Date: Wed Jan 18 13:19:48 2023 +0000 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next Florian Westphal says: ==================== Netfilter updates for net-next following patch set includes netfilter updates for your *net-next* tree. 1. Replace pr_debug use with nf_log infra for debugging in sctp conntrack. 2. Remove pr_debug calls, they are either useless or we have better options in place. 3. Avoid repeated load of ct->status in some spots. Some bit-flags cannot change during the lifeetime of a connection, so no need to re-fetch those. 4. Avoid uneeded nesting of rcu_read_lock during tuple lookup. 5. Remove the CLUSTERIP target. Marked as obsolete for years, and we still have WARN splats wrt. races of the out-of-band /proc interface installed by this target. 6. Add static key to nf_tables to avoid the retpoline mitigation if/else if cascade provided the cpu doesn't need the retpoline thunk. 7. add nf_tables objref calls to the retpoline mitigation workaround. 8. Split parts of nft_ct.c that do not need symbols exported by the conntrack modules and place them in nf_tables directly. This allows to avoid indirect call for 'ct status' checks. 9. Add 'destroy' commands to nf_tables. They are identical to the existing 'delete' commands, but do not indicate an error if the referenced object (set, chain, rule...) did not exist, from Fernando. ==================== Signed-off-by: David S. Miller commit 387f5f7dc64af7e088e57010fddf81579af38bd5 Merge: 75943bc9701bd f0f6460f91305 Author: David S. Miller Date: Wed Jan 18 13:17:06 2023 +0000 Merge branch 'tsnep-xdp-support' Gerhard Engleder says: ==================== tsnep: XDP support Implement XDP support for tsnep driver. I tried to follow existing drivers like igb/igc as far as possible. Some prework was already done in previous patch series, so in this series only actual XDP stuff is included. Thanks for the NetDev 0x14 slides "Add XDP support on a NIC driver". Some commits contain changes not related to XDP but found during review of XDP support patches. v5: - fix spelling of 'subtract' in commit message (Alexander Duyck) - call txq_trans_cond_update() only if TX is complete (Alexander Duyck) - remove const from static functions (Alexander Duyck) - replace TX spin_lock with __netif_tx_lock (Alexander Duyck) - use xdp_return_frame_rx_napi() instead of xdp_return_frame_bulk() (Alexander Duyck) - eliminate __TSNEP_DOWN (Alexander Duyck) - introduce single function for xdp_rxq and napi init (Alexander Duyck) - use TX queue of pair instead of expensive processor id modulo for XDP_TX (Alexander Duyck) - eliminate processor id modulo in tsnep_netdev_xdp_xmit (Alexander Duyck) - use bitmap for TX type and add fragment type (Alexander Duyck) - always use XDP_PACKET_HEADROOM and DMA_BIDIRECTIONAL v4: - remove process context from spin_lock_bh commit message (Alexander Lobakin) - move tsnep_adapter::state to prevent 4 byte hole (Alexander Lobakin) - braces for bitops in combination logical ops (Alexander Lobakin) - make various pointers const (Alexander Lobakin) - '!i' instead of 'i == 0' (Alexander Lobakin) - removed redundant braces (Alexander Lobakin) - squash variables into same line if same type (Alexander Lobakin) - use fact that ::skb and ::xdpf use same slot for simplification (Alexander Lobakin) - use u32 for smp_processor_id() (Alexander Lobakin) - don't add $(tsnep-y) to $(tsnep-objs) (Alexander Lobakin) - use rev xmas tree in tsnep_netdev_open() (Alexander Lobakin) - do not move tsnep_queue::napi (Alexander Lobakin) - call xdp_init_buff() only once (Alexander Lobakin) - get nq and tx only once for XDP TX (Alexander Lobakin) - move XDP BPF program setup to end of patch series (Alexander Lobakin) - check for XDP state change and prevent redundant down-ups (Alexander Lobakin) - access tsnep_adapter::xdp_prog only with READ_ONCE in RX path (Alexander Lobakin) - forward NAPI budget to napi_consume_skb() (Alexander Lobakin) - fix errno leftover in tsnep_xdp_xmit_back() (Dan Carpenter) - eliminate tsnep_xdp_is_enabled() by setting RX offset during init v3: - use spin_lock_bh for TX (Paolo Abeni) - add comment for XDP TX descriptor available check (Maciej Fijalkowski) - return value bool for tsnep_xdp_xmit_frame_ring() (Saeed Mahameed) - do not print DMA mapping error (Saeed Mahameed) - use reverse xmas tree variable declaration (Saeed Mahameed) - move struct xdp_rxq_info to end of struct tsnep_rx (Maciej Fijalkowski) - check __TSNEP_DOWN flag on close to prevent double free (Saeed Mahameed) - describe TSNEP_RX_INLINE_METADATA_SIZE in comment (Maciej Fijalkowski) - substract TSNEP_RX_INLINE_METADATA_SIZE after DMA sync (Maciej Fijalkowski) - use enum tsnep_tx_type for tsnep_xdp_tx_map (Saeed Mahameed) - use nxmit as loop iterator in tsnep_netdev_xdp_xmit (Saeed Mahameed) - stop netdev in tsnep_netdev_close() which is called during BPF prog setup v2: - move tsnep_xdp_xmit_back() to commit where it is used (Paolo Abeni) - remove inline from tsnep_rx_offset() (Paolo Abeni) - remove inline from tsnep_rx_offset_xdp() (Paolo Abeni) - simplify tsnep_xdp_run_prog() call by moving xdp_status update to it (Paolo Abeni) ==================== Signed-off-by: David S. Miller commit f0f6460f91305fc907b6a4ba9846e1586be0a0a2 Author: Gerhard Engleder Date: Mon Jan 16 21:24:58 2023 +0100 tsnep: Support XDP BPF program setup Implement setup of BPF programs for XDP RX path with command XDP_SETUP_PROG of ndo_bpf(). This is the final step for XDP RX path support. There is no need to reinit the RX queues as they are always prepared for XDP. Additionally remove $(tsnep-y) from $(tsnep-objs) because it is added automatically. Test results with A53 1.2GHz: XDP_DROP (samples/bpf/xdp1) proto 17: 883878 pkt/s XDP_TX (samples/bpf/xdp2) proto 17: 255693 pkt/s XDP_REDIRECT (samples/bpf/xdpsock) sock0@eth2:0 rxdrop xdp-drv pps pkts 1.00 rx 855,582 5,404,523 tx 0 0 XDP_REDIRECT (samples/bpf/xdp_redirect) eth2->eth1 613,267 rx/s 0 err,drop/s 613,272 xmit/s Signed-off-by: Gerhard Engleder Signed-off-by: David S. Miller commit 65b28c810035be7cc753515c8f5227198302eab4 Author: Gerhard Engleder Date: Mon Jan 16 21:24:57 2023 +0100 tsnep: Add XDP RX support If BPF program is set up, then run BPF program for every received frame and execute the selected action. Signed-off-by: Gerhard Engleder Signed-off-by: David S. Miller commit e77832abd90a4448b1a2041025f9c538fe17903b Author: Gerhard Engleder Date: Mon Jan 16 21:24:56 2023 +0100 tsnep: Add RX queue info for XDP support Register xdp_rxq_info with page_pool memory model. This is needed for XDP buffer handling. Additionally fix error path by removing call of tsnep_phy_close() after failed tsnep_phy_open(). Signed-off-by: Gerhard Engleder Signed-off-by: David S. Miller commit cc3e254f9443cdb5f41c5e59f7275fe2943fb160 Author: Gerhard Engleder Date: Mon Jan 16 21:24:55 2023 +0100 tsnep: Prepare RX buffer for XDP support Always reserve XDP_PACKET_HEADROOM in front of RX buffer. Similar DMA direction is always set to DMA_BIDIRECTIONAL. This eliminates the need for RX queue reconfiguration during BPF program setup. The RX queue is always prepared for XDP. No negative impact of DMA_BIDIRECTIONAL was measured. Signed-off-by: Gerhard Engleder Signed-off-by: David S. Miller commit 59d562aa1983ab0d4c3d2a03edccb3b9829bb595 Author: Gerhard Engleder Date: Mon Jan 16 21:24:54 2023 +0100 tsnep: Subtract TSNEP_RX_INLINE_METADATA_SIZE once Subtract size of metadata in front of received data only once. This simplifies the RX code. Signed-off-by: Gerhard Engleder Reviewed-by: Alexander Duyck Signed-off-by: David S. Miller commit d24bc0bcbbfff74c00d92d0630ef99e8d91ef37a Author: Gerhard Engleder Date: Mon Jan 16 21:24:53 2023 +0100 tsnep: Add XDP TX support Implement ndo_xdp_xmit() for XDP TX support. Support for fragmented XDP frames is included. Also some braces and logic cleanups are done in normal TX path to keep both TX paths in sync. Signed-off-by: Gerhard Engleder Signed-off-by: David S. Miller commit 95337b9384769fbc645a0eda9a34c0f9b044b0df Author: Gerhard Engleder Date: Mon Jan 16 21:24:52 2023 +0100 tsnep: Do not print DMA mapping error Printing in data path shall be avoided. DMA mapping error is already counted in stats so printing is not necessary. Signed-off-by: Gerhard Engleder Reviewed-by: Alexander Duyck Signed-off-by: David S. Miller commit 0625dff38b1791005c2a3dbb85ec6ea58b567555 Author: Gerhard Engleder Date: Mon Jan 16 21:24:51 2023 +0100 tsnep: Forward NAPI budget to napi_consume_skb() NAPI budget must be forwarded to napi_consume_skb(). It is used to detect non-NAPI context. Signed-off-by: Gerhard Engleder Reviewed-by: Alexander Duyck Signed-off-by: David S. Miller commit 25faa6a4c5ca973ca414e7a7ea919cddf3242b58 Author: Gerhard Engleder Date: Mon Jan 16 21:24:50 2023 +0100 tsnep: Replace TX spin_lock with __netif_tx_lock TX spin_lock can be eliminated, because the normal TX path is already protected with __netif_tx_lock and this lock can be used for access to queue outside of normal TX path too. Signed-off-by: Gerhard Engleder Signed-off-by: David S. Miller commit 75943bc9701bdd438aa0513c4fcb51923e020289 Author: Sergei Antonov Date: Mon Jan 16 21:27:16 2023 +0300 net: ftmac100: handle netdev flags IFF_PROMISC and IFF_ALLMULTI When netdev->flags has IFF_PROMISC or IFF_ALLMULTI, set the corresponding bits in the MAC Control Register (MACCR). This change is based on code from the ftgmac100 driver, see ftgmac100_start_hw() in ftgmac100.c Signed-off-by: Sergei Antonov Signed-off-by: David S. Miller commit 9259f6b573cf17c00f50c4b626983a5347b1abe9 Author: Tanmay Bhushan <007047221b@gmail.com> Date: Mon Jan 16 15:55:00 2023 +0100 ipv6: Remove extra counter pull before gc Per cpu entries are no longer used in consideration for doing gc or not. Remove the extra per cpu entries pull to directly check for time and perform gc. Signed-off-by: Tanmay Bhushan <007047221b@gmail.com> Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 0852208fd5b76c957dabcf0d3db3b6fa9a68c66e Merge: a8f6bbfc9397f eb9233ce67511 Author: David S. Miller Date: Wed Jan 18 12:56:38 2023 +0000 Merge branch 'am65-cpts-PPS' Siddharth Vadapalli says: ==================== Add PPS support to am65-cpts driver The CPTS hardware doesn't support PPS signal generation. Using the GenFx (periodic signal generator) function, it is possible to model a PPS signal followed by routing it via the time sync router to the CPTS_HWy_TS_PUSH (hardware time stamp) input, in order to generate timestamps at 1 second intervals. This series adds driver support for enabling PPS signal generation. Additionally, the documentation for the am65-cpts driver is updated with the bindings for the "ti,pps" property, which is used to inform the pair [CPTS_HWy_TS_PUSH, GenFx] to the cpts driver. Changes from v1: 1. Drop device-tree patches. 2. Address Roger's comments on the: "net: ethernet: ti: am65-cpts: add pps support" patch. 3. Collect Reviewed-by tag from Rob Herring. v1: https://lore.kernel.org/r/20230111114429.1297557-1-s-vadapalli@ti.com/ ==================== Signed-off-by: David S. Miller commit eb9233ce6751149ad491f96d36ceb2cc1b8c5398 Author: Grygorii Strashko Date: Mon Jan 16 14:25:34 2023 +0530 net: ethernet: ti: am65-cpts: adjust pps following ptp changes When CPTS clock is sync/adjusted by running linuxptp (ptp4l) it will cause PPS jitter as Genf running PPS is not adjusted. The same PPM adjustment has to be applied to GenF as to PHC clock to correct PPS length and keep them in sync. Testing: Master: ptp4l -P -2 -H -i eth0 -l 6 -m -q -p /dev/ptp1 -f ptp.cfg & testptp -d /dev/ptp1 -P 1 ppstest /dev/pps0 Slave: linuxptp/ptp4l -P -2 -H -i eth0 -l 6 -m -q -p /dev/ptp1 -f ptp1.cfg -s & testptp -d /dev/ptp1 -P 1 ppstest /dev/pps0 Master log: source 0 - assert 620.000000689, sequence: 530 source 0 - assert 621.000000689, sequence: 531 source 0 - assert 622.000000689, sequence: 532 source 0 - assert 623.000000689, sequence: 533 source 0 - assert 624.000000689, sequence: 534 source 0 - assert 625.000000689, sequence: 535 source 0 - assert 626.000000689, sequence: 536 source 0 - assert 627.000000689, sequence: 537 source 0 - assert 628.000000689, sequence: 538 source 0 - assert 629.000000689, sequence: 539 source 0 - assert 630.000000689, sequence: 540 source 0 - assert 631.000000689, sequence: 541 source 0 - assert 632.000000689, sequence: 542 source 0 - assert 633.000000689, sequence: 543 source 0 - assert 634.000000689, sequence: 544 source 0 - assert 635.000000689, sequence: 545 Slave log: source 0 - assert 620.000000706, sequence: 252 source 0 - assert 621.000000709, sequence: 253 source 0 - assert 622.000000707, sequence: 254 source 0 - assert 623.000000707, sequence: 255 source 0 - assert 624.000000706, sequence: 256 source 0 - assert 625.000000705, sequence: 257 source 0 - assert 626.000000709, sequence: 258 source 0 - assert 627.000000709, sequence: 259 source 0 - assert 628.000000707, sequence: 260 source 0 - assert 629.000000706, sequence: 261 source 0 - assert 630.000000710, sequence: 262 source 0 - assert 631.000000708, sequence: 263 source 0 - assert 632.000000705, sequence: 264 source 0 - assert 633.000000710, sequence: 265 source 0 - assert 634.000000708, sequence: 266 source 0 - assert 635.000000707, sequence: 267 Signed-off-by: Grygorii Strashko Signed-off-by: Siddharth Vadapalli Reviewed-by: Roger Quadros Signed-off-by: David S. Miller commit b6d7871234270071a32e3d1f8667a54e4fc2627d Author: Grygorii Strashko Date: Mon Jan 16 14:25:33 2023 +0530 net: ethernet: ti: am65-cpts: add pps support CPTS doesn't have HW support for PPS ("pulse per second”) signal generation, but it can be modeled by using Time Sync Router and routing GenFx (periodic signal generator) output to CPTS_HWy_TS_PUSH (hardware time stamp) input, and configuring GenFx to generate 1sec pulses. +------------------------+ | CPTS | | | +--->CPTS_HW4_PUSH GENFx+---+ | | | | | +------------------------+ | | | +--------------------------------+ Add corresponding support to am65-cpts driver. The DT property "ti,pps" has to be used to enable PPS support and configure pair [CPTS_HWy_TS_PUSH, GenFx]. Once enabled, PPS can be tested using ppstest tool: # ./ppstest /dev/pps0 Signed-off-by: Grygorii Strashko Signed-off-by: Siddharth Vadapalli Reviewed-by: Roger Quadros Signed-off-by: David S. Miller commit 2b76af68d8e5ecc936e70eb9c09d5591b0809fef Author: Grygorii Strashko Date: Mon Jan 16 14:25:32 2023 +0530 dt-binding: net: ti: am65x-cpts: add 'ti,pps' property Add the ti,pps property used to indicate the pair of HWx_TS_PUSH input and the TS_GENFy output. Signed-off-by: Grygorii Strashko Signed-off-by: Siddharth Vadapalli Reviewed-by: Rob Herring Signed-off-by: David S. Miller commit a8f6bbfc9397fe48021b8e70256d13baaeffc854 Merge: c4791b3196bf4 c897dc7f3a8d0 Author: David S. Miller Date: Wed Jan 18 12:47:40 2023 +0000 Merge branch 'stmmac-imx93' Clark Wang says: ==================== stmmac: Add eqos and fec support for imx93 This patchset add imx93 support for dwmac-imx glue driver. There are some changes of GPR implement. And add fec and eqos nodes for imx93 dts. ==================== Signed-off-by: David S. Miller commit c897dc7f3a8d0ea5355f86d15a7da69c9d4d8309 Author: Clark Wang Date: Fri Jan 13 11:33:47 2023 +0800 arm64: dts: imx93-11x11-evk: enable fec function Enable FEC function for imx93-11x11-evk board. Signed-off-by: Clark Wang Reviewed-by: Peng Fan Signed-off-by: David S. Miller commit 1b110dd678d9a1a5a97f7691bfa29432a42928b8 Author: Clark Wang Date: Fri Jan 13 11:33:46 2023 +0800 arm64: dts: imx93-11x11-evk: enable eqos Enable EQoS function for imx93-11x11-evk board. Signed-off-by: Clark Wang Reviewed-by: Peng Fan Signed-off-by: David S. Miller commit eaaf471085402df4d2f0afe355322820d114e85d Author: Clark Wang Date: Fri Jan 13 11:33:45 2023 +0800 arm64: dts: imx93: add FEC support Add FEC node for imx93 platform. Signed-off-by: Clark Wang Reviewed-by: Peng Fan Signed-off-by: David S. Miller commit 1f4263ea6a4b3a3457e9b21bec00976b00a1136e Author: Clark Wang Date: Fri Jan 13 11:33:44 2023 +0800 arm64: dts: imx93: add eqos support Add EQoS node for imx93 platform. Signed-off-by: Clark Wang Reviewed-by: Peng Fan Signed-off-by: David S. Miller commit f743e7664dcac641a740b42f5b9f5b024846e195 Author: Clark Wang Date: Fri Jan 13 11:33:43 2023 +0800 dt-bindings: net: fec: add mx93 description Add mx93 compatible string for fec driver. Signed-off-by: Clark Wang Acked-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit b2274ffe90be36af6aedf28ad36da6d45ac68a69 Author: Clark Wang Date: Fri Jan 13 11:33:42 2023 +0800 dt-bindings: add mx93 description Add mx93 compatible string for eqos driver. Signed-off-by: Clark Wang Acked-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit e5bf35ca4547e50e7ee2bc0d2a86bd1ccb53eead Author: Clark Wang Date: Fri Jan 13 11:33:41 2023 +0800 net: stmmac: add imx93 platform support Add imx93 platform support for dwmac-imx driver. Signed-off-by: Clark Wang Reviewed-by: Peng Fan Signed-off-by: David S. Miller commit faab12342f5a4579f066a9e9dcfa97d3e60cf36f Author: ye xingchen Date: Tue Dec 6 17:14:50 2022 +0800 dmaengine: ppc4xx: Convert to use sysfs_emit()/sysfs_emit_at() APIs Follow the advice of the Documentation/filesystems/sysfs.rst and show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: ye xingchen Link: https://lore.kernel.org/r/202212061714501297954@zte.com.cn Signed-off-by: Vinod Koul commit f80a612dd77c4585171e44a06b490466bdeec1ae Author: Fernando Fernandez Mancera Date: Mon Jan 2 15:42:34 2023 +0100 netfilter: nf_tables: add support to destroy operation Introduce NFT_MSG_DESTROY* message type. The destroy operation performs a delete operation but ignoring the ENOENT errors. This is useful for the transaction semantics, where failing to delete an object which does not exist results in aborting the transaction. This new command allows the transaction to proceed in case the object does not exist. Signed-off-by: Fernando Fernandez Mancera Signed-off-by: Pablo Neira Ayuso Signed-off-by: Florian Westphal commit e7e2b92e609f82cd164209509f852de941e1285b Author: Faiz Abbas Date: Tue Jan 17 11:48:08 2023 +0530 ASoC: dt-bindings: simple-card: Document simple-audio-card,plat The simple card driver already has support for a simple-audio-card,plat property but its not reflected in the documentation. Add documentation for this plat property. Signed-off-by: Faiz Abbas Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230117061808.18422-1-faiz.abbas@arm.com Signed-off-by: Mark Brown commit 3dfaa68fa89afd7a926cc3c5f0388b52f489609b Author: Samuel Holland Date: Sun Jan 1 13:36:04 2023 -0600 dmaengine: sun6i: Set the maximum segment size The sun6i DMA engine supports segment sizes up to 2^25-1 bytes. This is explicitly stated in newer SoC documentation (H6, D1), and it is implied in older documentation by the 25-bit width of the "bytes left in the current segment" register field. Exposing the real segment size limit (instead of the 64k default) reduces the number of SG list segments needed for a transaction. Reviewed-by: Jernej Skrabec Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20230101193605.50285-1-samuel@sholland.org Signed-off-by: Vinod Koul commit d9e7891476057b24a1acbf10a491e5b9a1c4ae77 Author: Florian Westphal Date: Tue Jan 3 13:47:17 2023 +0100 netfilter: nf_tables: avoid retpoline overhead for some ct expression calls nft_ct expression cannot be made builtin to nf_tables without also forcing the conntrack itself to be builtin. However, this can be avoided by splitting retrieval of a few selector keys that only need to access the nf_conn structure, i.e. no function calls to nf_conntrack code. Many rulesets start with something like "ct status established,related accept" With this change, this no longer requires an indirect call, which gives about 1.8% more throughput with a simple conntrack-enabled forwarding test (retpoline thunk used). Signed-off-by: Florian Westphal commit 2032e907d8d498fcabfe24b43550c50947817c6d Author: Florian Westphal Date: Tue Jan 3 13:47:16 2023 +0100 netfilter: nf_tables: avoid retpoline overhead for objref calls objref expression is builtin, so avoid calls to it for RETOLINE=y builds. Signed-off-by: Florian Westphal commit d8d76062785548167cbc01eb5aaae2ae0665b5da Author: Florian Westphal Date: Tue Jan 3 13:47:15 2023 +0100 netfilter: nf_tables: add static key to skip retpoline workarounds If CONFIG_RETPOLINE is enabled nf_tables avoids indirect calls for builtin expressions. On newer cpus indirect calls do not go through the retpoline thunk anymore, even for RETPOLINE=y builds. Just like with the new tc retpoline wrappers: Add a static key to skip the if / else if cascade if the cpu does not require retpolines. Suggested-by: Eric Dumazet Signed-off-by: Florian Westphal commit 9db5d918e2c07fa09fab18bc7addf3408da0c76f Author: Florian Westphal Date: Thu Jan 5 20:22:02 2023 +0100 netfilter: ip_tables: remove clusterip target Marked as 'to be removed soon' since kernel 4.1 (2015). Functionality was superseded by the 'cluster' match, added in kernel 2.6.30 (2009). clusterip_tg_check still has races that can give proc_dir_entry 'ipt_CLUSTERIP/10.1.1.2' already registered followed by a WARN splat. Remove it instead of trying to fix this up again. clusterip uapi header is left as-is for now. Signed-off-by: Florian Westphal commit 2a2fa2efc65fb4d96bdcde819473943fb90ec28b Author: Florian Westphal Date: Fri Dec 16 02:46:28 2022 +0100 netfilter: conntrack: move rcu read lock to nf_conntrack_find_get Move rcu_read_lock/unlock to nf_conntrack_find_get(), this avoids nested rcu_read_lock call from resolve_normal_ct(). Signed-off-by: Florian Westphal commit 4883ec512c1715fc827557f0e2bfce76c6530757 Author: Florian Westphal Date: Mon Jan 2 12:46:12 2023 +0100 netfilter: conntrack: avoid reload of ct->status Compiler can't merge the two test_bit() calls, so load ct->status once and use non-atomic accesses. This is fine because IPS_EXPECTED or NAT_CLASH are either set at ct creation time or not at all, but compiler can't know that. Signed-off-by: Florian Westphal commit 50bfbb8957abebc2359220d7c1e4663994461b36 Author: Florian Westphal Date: Mon Jan 2 12:46:11 2023 +0100 netfilter: conntrack: remove pr_debug calls Those are all useless or dubious. getorigdst() is called via setsockopt, so return value/errno will already indicate an appropriate error. For other pr_debug calls there are better replacements, such as slab/slub debugging or 'conntrack -E' (ctnetlink events). Signed-off-by: Florian Westphal commit f71cb8f45d092a1805e9ad474b6c6a17219cede5 Author: Florian Westphal Date: Mon Jan 2 12:46:10 2023 +0100 netfilter: conntrack: sctp: use nf log infrastructure for invalid packets The conntrack logging facilities include useful info such as in/out interface names and packet headers. Use those in more places instead of pr_debug calls. Furthermore, several pr_debug calls can be removed, they are useless on production machines due to the sheer volume of log messages. Signed-off-by: Florian Westphal commit 84c13763f2a22acc31472dccde8b6130b8f2e9c2 Author: Randy Dunlap Date: Mon Jan 16 23:01:39 2023 -0800 regulator: mcp16502: add enum MCP16502_REG_HPM description Add description for MCP16502_REG_HPM to prevent a kernel-doc warning: drivers/regulator/mcp16502.c:90: warning: Enum value 'MCP16502_REG_HPM' not described in enum 'mcp16502_reg' Signed-off-by: Randy Dunlap Reviewed-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230117070139.28905-1-rdunlap@infradead.org Signed-off-by: Mark Brown commit 5efbe6aa7a0ec9cec7f87da0d995563aad3d2593 Author: Christian König Date: Wed Oct 26 17:09:34 2022 +0200 drm/scheduler: deprecate drm_sched_resubmit_jobs This interface is not working as it should. Signed-off-by: Christian König Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20221109095010.141189-5-christian.koenig@amd.com commit cb3076e932e8e7b212fe18b0591689beeb0d6324 Author: Christian König Date: Wed Oct 26 10:33:49 2022 +0200 drm/scheduler: cleanup define Remove some not implemented function define Signed-off-by: Christian König Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20221109095010.141189-4-christian.koenig@amd.com commit 19235e47279894b033a3ec5cf2732de634862b3a Author: Peter Zijlstra Date: Tue Jan 17 11:26:29 2023 +0100 cpuidle, arm64: Fix the ARM64 cpuidle logic The recent cpuidle changes started triggering RCU splats on Juno development boards: | ============================= | WARNING: suspicious RCU usage | ----------------------------- | include/trace/events/ipi.h:19 suspicious rcu_dereference_check() usage! Fix cpuidle on ARM64: - ... by introducing a new 'is_rcu' flag to the cpuidle helpers & make ARM64 use it, as ARM64 wants to keep RCU active longer and wants to do the ct_cpuidle_enter()/exit() dance itself. - Also update the PSCI driver accordingly. - This also removes the last known RCU_NONIDLE() user as a bonus. Reported-by: Mark Rutland Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar Tested-by: Sudeep Holla Tested-by: Mark Rutland Reviewed-by: Mark Rutland Link: https://lore.kernel.org/r/Y8Z31UbzG3LJgAXE@hirez.programming.kicks-ass.net -- commit 188a569658584e93930ab60334c5a1079c0330d8 Author: Ingo Molnar Date: Wed Jan 18 12:14:01 2023 +0100 genirq/affinity: Only build SMP-only helper functions on SMP kernels allnoconfig grew these new build warnings in lib/group_cpus.c: lib/group_cpus.c:247:12: warning: ‘__group_cpus_evenly’ defined but not used [-Wunused-function] lib/group_cpus.c:75:13: warning: ‘build_node_to_cpumask’ defined but not used [-Wunused-function] lib/group_cpus.c:66:13: warning: ‘free_node_to_cpumask’ defined but not used [-Wunused-function] lib/group_cpus.c:43:23: warning: ‘alloc_node_to_cpumask’ defined but not used [-Wunused-function] Widen the #ifdef CONFIG_SMP block to not expose unused helpers on non-SMP builds. Also annotate the preprocessor branches for better readability. Fixes: f7b3ea8cf72f ("genirq/affinity: Move group_cpus_evenly() into lib/") Cc: Ming Lei Cc: Thomas Gleixner Link: https://lore.kernel.org/r/20221227022905.352674-6-ming.lei@redhat.com Signed-off-by: Ingo Molnar commit 3b8645e9ec7eb42e7df7a367d6787a3af53f37a9 Author: Arnd Bergmann Date: Tue Jan 17 17:46:35 2023 +0100 cpuidle: mvebu: Fix duplicate flags assignment The added '.flags' value is sometimes ignored here because it gets overwritten by another initialization: drivers/cpuidle/cpuidle-mvebu-v7.c:24:33: error: initialized field overwritten [-Werror=override-init] 24 | #define MVEBU_V7_FLAG_DEEP_IDLE 0x10000 | ^~~~~~~ drivers/cpuidle/cpuidle-mvebu-v7.c:69:43: note: in expansion of macro 'MVEBU_V7_FLAG_DEEP_IDLE' ... Merge the two fields into one. Fixes: 4ce40e9dbe83 ("cpuidle, armada: Push RCU-idle into driver") Signed-off-by: Arnd Bergmann Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20230117164642.1672784-1-arnd@kernel.org commit 59047d942bedc4ce88a2121a9f9e656b9532dd30 Author: Guangju Wang[baidu] Date: Wed Jan 18 10:35:54 2023 +0800 x86/microcode: Use the DEVICE_ATTR_RO() macro Use DEVICE_ATTR_RO() helper instead of open-coded DEVICE_ATTR(), which makes the code a bit shorter and easier to read. No change in functionality. Signed-off-by: Guangju Wang[baidu] Signed-off-by: Ingo Molnar Acked-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230118023554.1898-1-wgj900@163.com commit 0eed28220598cd990d094b7b9f8c832c425080c0 Author: Namhyung Kim Date: Tue Jan 17 22:05:59 2023 -0800 perf/core: Call perf_prepare_sample() before running BPF As BPF can access sample data, it needs to populate the data. Also remove the logic to get the callchain specifically as it's covered by the perf_prepare_sample() now. Signed-off-by: Namhyung Kim Signed-off-by: Ingo Molnar Tested-by: Jiri Olsa Acked-by: Jiri Olsa Acked-by: Song Liu Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20230118060559.615653-9-namhyung@kernel.org commit f6e707156e1d5d150f288823987bee1ba0104c4c Author: Namhyung Kim Date: Tue Jan 17 22:05:58 2023 -0800 perf/core: Introduce perf_prepare_header() Factor out perf_prepare_header() so that it can call perf_prepare_sample() without a header if not needed. Also it checks the filtered_sample_type to avoid duplicate work when perf_prepare_sample() is called twice (or more). Suggested-by: Peter Zijlstr Signed-off-by: Namhyung Kim Signed-off-by: Ingo Molnar Tested-by: Jiri Olsa Acked-by: Jiri Olsa Acked-by: Song Liu Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20230118060559.615653-8-namhyung@kernel.org commit a7c8d0daa87581cab8435c83cc6ecbfbcb8b60cf Author: Namhyung Kim Date: Tue Jan 17 22:05:57 2023 -0800 perf/core: Do not pass header for sample ID init The only thing it does for header in __perf_event_header__init_id() is to update the header size with event->id_header_size. We can do this outside and get rid of the argument for the later change. Signed-off-by: Namhyung Kim Signed-off-by: Ingo Molnar Tested-by: Jiri Olsa Acked-by: Jiri Olsa Acked-by: Song Liu Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20230118060559.615653-7-namhyung@kernel.org commit bb447c27a4674628ea50341cfa4b31618f2010af Author: Namhyung Kim Date: Tue Jan 17 22:05:56 2023 -0800 perf/core: Set data->sample_flags in perf_prepare_sample() The perf_prepare_sample() function sets the perf_sample_data according to the attr->sample_type before copying it to the ring buffer. But BPF also wants to access the sample data so it needs to prepare the sample even before the regular path. That means perf_prepare_sample() can be called more than once. Set the data->sample_flags consistently so that it can indicate which fields are set already and skip them if sets. Also update the filtered_sample_type to have the dependent flags to reduce the number of branches. Suggested-by: Peter Zijlstra Signed-off-by: Namhyung Kim Signed-off-by: Ingo Molnar Tested-by: Jiri Olsa Acked-by: Jiri Olsa Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20230118060559.615653-6-namhyung@kernel.org commit eb55b455ef9c7123bdfa7e8a7f1ebeaa8034eb83 Author: Namhyung Kim Date: Tue Jan 17 22:05:55 2023 -0800 perf/core: Add perf_sample_save_brstack() helper When we saves the branch stack to the perf sample data, we needs to update the sample flags and the dynamic size. To make sure this is done consistently, add the perf_sample_save_brstack() helper and convert all call sites. Suggested-by: Peter Zijlstra Signed-off-by: Namhyung Kim Signed-off-by: Ingo Molnar Tested-by: Jiri Olsa Acked-by: Jiri Olsa Acked-by: Athira Rajeev Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20230118060559.615653-5-namhyung@kernel.org commit 0a9081cf0a11770f6b0affd377db8caa3ec4c793 Author: Namhyung Kim Date: Tue Jan 17 22:05:54 2023 -0800 perf/core: Add perf_sample_save_raw_data() helper When we save the raw_data to the perf sample data, we need to update the sample flags and the dynamic size. To make sure this is done consistently, add the perf_sample_save_raw_data() helper and convert all call sites. Suggested-by: Peter Zijlstra Signed-off-by: Namhyung Kim Signed-off-by: Ingo Molnar Tested-by: Jiri Olsa Acked-by: Jiri Olsa Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20230118060559.615653-4-namhyung@kernel.org commit 31046500c1864b8ab25d1b9846ad10aa3f7b1821 Author: Namhyung Kim Date: Tue Jan 17 22:05:53 2023 -0800 perf/core: Add perf_sample_save_callchain() helper When we save the callchain to the perf sample data, we need to update the sample flags and the dynamic size. To ensure this is done consistently, add the perf_sample_save_callchain() helper and convert all call sites. Suggested-by: Peter Zijlstra Signed-off-by: Namhyung Kim Signed-off-by: Ingo Molnar Tested-by: Jiri Olsa Acked-by: Jiri Olsa Acked-by: Song Liu Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20230118060559.615653-3-namhyung@kernel.org commit 4cf7a136115e96241f9f1089d2b53c47accf3823 Author: Namhyung Kim Date: Tue Jan 17 22:05:52 2023 -0800 perf/core: Save the dynamic parts of sample data size The perf sample data can be divided into parts. The event->header_size and event->id_header_size keep the static part of the sample data which is determined by the sample_type flags. But other parts like CALLCHAIN and BRANCH_STACK are changing dynamically so it needs to see the actual data. In preparation of handling repeated calls for perf_prepare_sample(), it can save the dynamic size to the perf sample data to avoid the duplicate work. Signed-off-by: Namhyung Kim Signed-off-by: Ingo Molnar Tested-by: Jiri Olsa Acked-by: Jiri Olsa Acked-by: Song Liu Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20230118060559.615653-2-namhyung@kernel.org commit 65adf3a57c0c2e79c5c2b72a4bdcabcab9e99ec1 Merge: 9fcad995c6c52 5dc4c995db9eb Author: Ingo Molnar Date: Wed Jan 18 11:56:01 2023 +0100 Merge tag 'v6.2-rc4' into perf/core, to pick up fixes Move from the -rc1 base to the fresher -rc4 kernel that has various fixes included, before applying a larger patchset. Signed-off-by: Ingo Molnar commit e2855f8e913dac4fc699a54b793cd4753c30b4d3 Author: Jani Nikula Date: Tue Jan 17 16:39:46 2023 +0200 drm/i915: move chv_dpll_md and bxt_phy_grc to display sub-struct under state Move the display related members to the struct drm_i915_private display sub-struct. Put them under "state", as they are related to storing values that aren't readable from the hardware, to appease the state checker. Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230117143946.2426043-3-jani.nikula@intel.com commit a3f839762ceb72699f5c6c313bf90c374b860a7c Author: Jani Nikula Date: Tue Jan 17 16:39:45 2023 +0200 drm/i915: move pch_ssc_use to display sub-struct under dpll Move the display related member to the struct drm_i915_private display sub-struct. Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230117143946.2426043-2-jani.nikula@intel.com commit 3a7e2d58f8002a71d9f2f803e2fd6ba05a07b404 Author: Jani Nikula Date: Tue Jan 17 16:39:44 2023 +0200 drm/i915: move snps_phy_failed_calibration to display sub-struct under snps Move the display related member to the struct drm_i915_private display sub-struct. Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230117143946.2426043-1-jani.nikula@intel.com commit 198102c9103fc78d8478495971947af77edb05c1 Author: Yong-Xuan Wang Date: Tue Jan 17 10:51:33 2023 +0000 cacheinfo: Fix shared_cpu_map to handle shared caches at different levels The cacheinfo sets up the shared_cpu_map by checking whether the caches with the same index are shared between CPUs. However, this will trigger slab-out-of-bounds access if the CPUs do not have the same cache hierarchy. Another problem is the mismatched shared_cpu_map when the shared cache does not have the same index between CPUs. CPU0 I D L3 index 0 1 2 x ^ ^ ^ ^ index 0 1 2 3 CPU1 I D L2 L3 This patch checks each cache is shared with all caches on other CPUs. Reviewed-by: Pierre Gondois Signed-off-by: Yong-Xuan Wang Link: https://lore.kernel.org/r/20230117105133.4445-2-yongxuan.wang@sifive.com Signed-off-by: Sudeep Holla commit 5944ce092b97caed5d86d961e963b883b5c44ee2 Author: Pierre Gondois Date: Wed Jan 4 19:30:29 2023 +0100 arch_topology: Build cacheinfo from primary CPU commit 3fcbf1c77d08 ("arch_topology: Fix cache attributes detection in the CPU hotplug path") adds a call to detect_cache_attributes() to populate the cacheinfo before updating the siblings mask. detect_cache_attributes() allocates memory and can take the PPTT mutex (on ACPI platforms). On PREEMPT_RT kernels, on secondary CPUs, this triggers a: 'BUG: sleeping function called from invalid context' [1] as the code is executed with preemption and interrupts disabled. The primary CPU was previously storing the cache information using the now removed (struct cpu_topology).llc_id: commit 5b8dc787ce4a ("arch_topology: Drop LLC identifier stash from the CPU topology") allocate_cache_info() tries to build the cacheinfo from the primary CPU prior secondary CPUs boot, if the DT/ACPI description contains cache information. If allocate_cache_info() fails, then fallback to the current state for the cacheinfo allocation. [1] will be triggered in such case. When unplugging a CPU, the cacheinfo memory cannot be freed. If it was, then the memory would be allocated early by the re-plugged CPU and would trigger [1]. Note that populate_cache_leaves() might be called multiple times due to populate_leaves being moved up. This is required since detect_cache_attributes() might be called with per_cpu_cacheinfo(cpu) being allocated but not populated. [1]: | BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:46 | in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 0, name: swapper/111 | preempt_count: 1, expected: 0 | RCU nest depth: 1, expected: 1 | 3 locks held by swapper/111/0: | #0: (&pcp->lock){+.+.}-{3:3}, at: get_page_from_freelist+0x218/0x12c8 | #1: (rcu_read_lock){....}-{1:3}, at: rt_spin_trylock+0x48/0xf0 | #2: (&zone->lock){+.+.}-{3:3}, at: rmqueue_bulk+0x64/0xa80 | irq event stamp: 0 | hardirqs last enabled at (0): 0x0 | hardirqs last disabled at (0): copy_process+0x5dc/0x1ab8 | softirqs last enabled at (0): copy_process+0x5dc/0x1ab8 | softirqs last disabled at (0): 0x0 | Preemption disabled at: | migrate_enable+0x30/0x130 | CPU: 111 PID: 0 Comm: swapper/111 Tainted: G W 6.0.0-rc4-rt6-[...] | Call trace: | __kmalloc+0xbc/0x1e8 | detect_cache_attributes+0x2d4/0x5f0 | update_siblings_masks+0x30/0x368 | store_cpu_topology+0x78/0xb8 | secondary_start_kernel+0xd0/0x198 | __secondary_switched+0xb0/0xb4 Signed-off-by: Pierre Gondois Reviewed-by: Sudeep Holla Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20230104183033.755668-7-pierre.gondois@arm.com Signed-off-by: Sudeep Holla commit bd500361a937c03a3da57178287ce543c8f3681b Author: Pierre Gondois Date: Wed Jan 4 19:30:28 2023 +0100 ACPI: PPTT: Update acpi_find_last_cache_level() to acpi_get_cache_info() acpi_find_last_cache_level() allows to find the last level of cache for a given CPU. The function is only called on arm64 ACPI based platforms to check for cache information that would be missing in the CLIDR_EL1 register. To allow populating (struct cpu_cacheinfo).num_leaves by only parsing a PPTT, update acpi_find_last_cache_level() to get the 'split_levels', i.e. the number of cache levels being split in data/instruction caches. It is assumed that there will not be data/instruction caches above a unified cache. If a split level consist of one data cache and no instruction cache (or opposite), then the missing cache will still be populated by default with minimal cache information, and maximal cpumask (all non-existing caches have the same fw_token). Suggested-by: Jeremy Linton Signed-off-by: Pierre Gondois Reviewed-by: Jeremy Linton Acked-by: Rafael J. Wysocki Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20230104183033.755668-6-pierre.gondois@arm.com Signed-off-by: Sudeep Holla commit fa4d566a605bc4cf32d69f16ef8cf9696635f75a Author: Pierre Gondois Date: Wed Jan 4 19:30:27 2023 +0100 ACPI: PPTT: Remove acpi_find_cache_levels() acpi_find_cache_levels() is used at a single place and is short enough to be merged into the calling function. The removal allows an easier renaming of the calling function in the next patch. Also reorder the local variables in the 'reversed Christmas tree' order. Signed-off-by: Pierre Gondois Reviewed-by: Jeremy Linton Acked-by: Rafael J. Wysocki Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20230104183033.755668-5-pierre.gondois@arm.com Signed-off-by: Sudeep Holla commit de0df442ee49cb1f6ee58f3fec5dcb5e5eb70aab Author: Pierre Gondois Date: Wed Jan 4 19:30:26 2023 +0100 cacheinfo: Check 'cache-unified' property to count cache leaves The DeviceTree Specification v0.3 specifies that the cache node '[d-|i-|]cache-size' property is required. The 'cache-unified' property is specifies whether the cache level is separate or unified. If the cache-size property is missing, no cache leaves is accounted. This can lead to a 'BUG: KASAN: slab-out-of-bounds' [1] bug. Check 'cache-unified' property and always account for at least one cache leaf when parsing the device tree. [1] https://lore.kernel.org/all/0f19cb3f-d6cf-4032-66d2-dedc9d09a0e3@linaro.org/ Reported-by: Krzysztof Kozlowski Signed-off-by: Pierre Gondois Tested-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230104183033.755668-4-pierre.gondois@arm.com Signed-off-by: Sudeep Holla commit 378e04f7cb24aad124a8e55e7a36b689fb63ac17 Author: Jani Nikula Date: Tue Jan 17 14:38:56 2023 +0200 drm/i915: remove a couple of superfluous i915_drm.h includes Remove a couple of unnecessary includes. Signed-off-by: Jani Nikula Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20230117123856.2271720-1-jani.nikula@intel.com commit e54051782e5d78a22d38ea361bd4013fa33b1060 Author: Jani Nikula Date: Mon Jan 16 19:34:22 2023 +0200 drm/i915: drop cast from DEFINE_RES_MEM() usage Since commit 52c4d11f1dce ("resource: Convert DEFINE_RES_NAMED() to be compound literal") it's no longer necessary to cast DEFINE_RES_MEM() to struct resource. This also fixes sparse warnings "cast from non-scalar" and "cast to non-scalar". Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230116173422.1858527-2-jani.nikula@intel.com commit 1eca0778f4b35d63cb224a460bcebd5eb13f5da9 Author: Jani Nikula Date: Mon Jan 16 19:34:21 2023 +0200 drm/i915: add struct i915_dsm to wrap dsm members together Wrap the stolen memory related struct drm_i915_private members (dsm, dsm_reserved, and stolen_usable_size) together in a a new struct i915_dsm. Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230116173422.1858527-1-jani.nikula@intel.com commit 14ec40a88210151296fff3e981c1a7196ad9bf55 Author: Chris Wilson Date: Tue Jan 17 13:32:34 2023 +0100 drm/i915/selftests: Unwind hugepages to drop wakeref on error Make sure that upon error after we have acquired the wakeref we do release it again. v2: add another missing "goto out_wf"(Andi). Fixes: 027c38b4121e ("drm/i915/selftests: Grab the runtime pm in shrink_thp") Cc: Andi Shyti Reviewed-by: Matthew Auld Reviewed-by: Andrzej Hajda Signed-off-by: Chris Wilson Signed-off-by: Nirmoy Das Reviewed-by: Andi Shyti Reviewed-by: Nirmoy Das Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20230117123234.26487-1-nirmoy.das@intel.com commit d551afc25878924991a4c65299dfa83df1cb9ef8 Author: Petr Mladek Date: Tue Jan 17 17:10:31 2023 +0100 printk: Use scnprintf() to print the message about the dropped messages on a console Use scnprintf() for printing the message about dropped messages on a console. It returns the really written length of the message. It prevents potential buffer overflow when the returned length is later used to copy the buffer content. Note that the previous code was safe because the scratch buffer was big enough and the message always fit in. But scnprintf() makes it more safe, definitely. Reported-by: coverity-bot Addresses-Coverity-ID: 1530570 ("Memory - corruptions") Fixes: c4fcc617e148 ("printk: introduce console_prepend_dropped() for dropped messages") Link: https://lore.kernel.org/r/202301131544.D9E804CCD@keescook Reviewed-by: John Ogness Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20230117161031.15499-1-pmladek@suse.com commit 6f7dbbd5a9d7954971ff42098658a134470ff6c2 Author: Roderick Colenbrander Date: Thu Jan 5 17:59:10 2023 -0800 HID: playstation: correct DualSense gyro bias handling. The bias for the gyroscope is not used correctly. The sensor bias needs to be used in calculation of the 'sensivity' instead of being an offset. In practice this has little input on the values as the bias values tends to be small (+/- 20). Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina commit 12b18bc2b4318e76d9fecb674e377c2c388d3dd4 Author: Roderick Colenbrander Date: Thu Jan 5 17:59:09 2023 -0800 HID: playstation: correct DualShock4 gyro bias handling. The bias for the gyroscope is not used correctly. The sensor bias needs to be used in calculation of the 'sensivity' instead of being an offset. In practice this has little input on the values as the bias values tends to be small (+/- 20). Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina commit 5e25a8cdbe93c50f743e2ff0907996c697347864 Author: Roderick Colenbrander Date: Thu Jan 5 17:59:06 2023 -0800 HID: playstation: fix DualShock4 unreachable calibration code. Reported-by: Abaci Robot Reported-by: Jiapeng Chong Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina commit a2f416bf062a38bb76cccd526d2d286b8e4db4d9 Author: Allen Ballway Date: Tue Jan 10 20:25:50 2023 +0000 HID: multitouch: Add quirks for flipped axes Certain touchscreen devices, such as the ELAN9034, are oriented incorrectly and report touches on opposite points on the X and Y axes. For example, a 100x200 screen touched at (10,20) would report (90, 180) and vice versa. This is fixed by adding device quirks to transform the touch points into the correct spaces, from X -> MAX(X) - X, and Y -> MAX(Y) - Y. Signed-off-by: Allen Ballway Signed-off-by: Jiri Kosina commit 596f674dc9a7b5456f6b01de3211e0b820786dc8 Author: Herbert Xu Date: Wed Jan 18 17:07:19 2023 +0800 crypto: p10-aes-gcm - Revert implementation Revert the changes that added p10-aes-gcm: 0781bbd7eaca ("crypto: p10-aes-gcm - A perl script to process PowerPC assembler source") 41a6437ab415 ("crypto: p10-aes-gcm - Supporting functions for ghash") 3b47eccaaff4 ("crypto: p10-aes-gcm - Supporting functions for AES") ca68a96c37eb ("crypto: p10-aes-gcm - An accelerated AES/GCM stitched implementation") cc40379b6e19 ("crypto: p10-aes-gcm - Glue code for AES/GCM stitched implementation") 3c657e8689ab ("crypto: p10-aes-gcm - Update Kconfig and Makefile") These changes fail to build in many configurations and are not ready for prime time. Signed-off-by: Herbert Xu commit 1af13bc6d0470e6c425c52944739fdc74f46ed02 Author: Jani Nikula Date: Mon Jan 16 14:56:16 2023 +0200 drm/i915/vblank: add and use intel_de_read64_2x32() to read vblank counter Add intel_de_read64_2x32() wrapper for the uncore version of the same, and use it to read the high and low frame registers. Avoid duplicating code for existing helpers. The slight functional difference is checking that the entire high register remains the same across two reads, instead of just the part we're interested in. This should be of no consequence. (Unless those bits function as a PRNG.) Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/33853549adff82045b95af527e14cfdff5712470.1673873708.git.jani.nikula@intel.com commit 75018f47acd49ace947a2e99cb5c2114f0f68ebd Author: Jani Nikula Date: Mon Jan 16 14:56:15 2023 +0200 drm/i915/vblank: use intel_de_read() Use the intel_de_* functions for display registers. Cc: Ville Syrjälä Reviewed-by: Arun R Murthy Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/ecfac5ebddcb46be1ddf2e34e52648fbf9fa4ca6.1673873708.git.jani.nikula@intel.com commit 4122abfed2193e752485282370abf5c419f05cad Author: Andy Shevchenko Date: Mon Jan 16 17:46:21 2023 +0200 HID: i2c-hid: acpi: Unify ACPI ID tables format Unify ACPI ID tables format by: - surrounding HID by spaces - dropping unnecessary driver_data assignment to 0 - dropping comma at the terminator entry Signed-off-by: Andy Shevchenko Signed-off-by: Jiri Kosina commit 572eaeb7fae8883612b9f410dafb0f9f5a563dc2 Author: Andy Shevchenko Date: Mon Jan 16 17:46:20 2023 +0200 HID: i2c-hid: acpi: Drop unneded NULL check of adev The driver is enumerated on ACPI platforms, so adev is valid. Since there is no valid I²C ID table provided, there is no possibility to bind a device to this driver via user space. Hence, drop unneeded NULL check of adev. Signed-off-by: Andy Shevchenko Signed-off-by: Jiri Kosina commit e8adda5187ac4552c3a3e313c0ab883722367e82 Author: Jani Nikula Date: Mon Jan 16 14:56:14 2023 +0200 drm/i915/display: use common function for checking scanline is moving cpt_verify_modeset() is roughly the same as intel_wait_for_pipe_scanline_moving(). Assume it's close enough. Cc: Ville Syrjälä Reviewed-by: Arun R Murthy Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/bf26763caaad25f3dfcf6f8e468421f93fb99646.1673873708.git.jani.nikula@intel.com commit 61a0e794ed58435cc683488b98e0efad2f05bf66 Author: Jani Nikula Date: Mon Jan 16 14:56:13 2023 +0200 drm/i915/display: move more scanline functions to intel_vblank.[ch] Reduce clutter in intel_display.c by moving the scanline moving/stopped wait functions to intel_vblank.[ch]. Cc: Ville Syrjälä Reviewed-by: Arun R Murthy Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/3613b8c22e5022ebf61ab942e6bc81b717e8f520.1673873708.git.jani.nikula@intel.com commit 62fe4515cf202700a346bb0c3436ae538a888707 Author: Jani Nikula Date: Mon Jan 16 14:56:12 2023 +0200 drm/i915/irq: split out vblank/scanline code to intel_vblank.[ch] The vblank/scanline code is fairly isolated in i915_irq.c. Split it out to new intel_vblank.[ch]. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/3e3e9016f5135dccae5110c291ba048567622e7a.1673873708.git.jani.nikula@intel.com commit 30e94ff769c36a90c8ef298b6d726054f1338379 Author: Nirmoy Das Date: Tue Jan 17 19:04:17 2023 +0100 drm_print: Remove deprecated DRM_DEBUG_KMS_RATELIMITED() There are no current users of DRM_DEBUG_KMS_RATELIMITED() so remove it. Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: Sam Ravnborg Signed-off-by: Nirmoy Das Reviewed-by: Sam Ravnborg Reviewed-by: Alex Deucher Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20230117180417.21066-2-nirmoy.das@intel.com Signed-off-by: Christian König commit 6c572637631ea49be3ec88f6eee7fb4a0e4c9733 Author: Nirmoy Das Date: Tue Jan 17 19:04:16 2023 +0100 drm/radeon: Do not use deprecated drm log API Replace deprecated DRM_DEBUG_KMS_RATELIMITED() and DRM_ERROR() with proper APIs. v2: replace pr_err with dev_err(Alex). Cc: Alex Deucher Cc: Christian König Signed-off-by: Nirmoy Das Reviewed-by: Alex Deucher Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20230117180417.21066-1-nirmoy.das@intel.com Signed-off-by: Christian König commit e04955db6a7c3fc4a1e6978649b61a6f5f8028e3 Author: Ronald Tschalär Date: Wed Jan 11 10:07:36 2023 +0000 HID: Recognize sensors with application collections According to HUTRR39 logical sensor devices may be nested inside physical collections or may be specified in multiple top-level application collections (see page 59, strategies 1 and 2). However, the current code was only recognizing those with physical collections. This issue turned up in the T2 MacBook Pros which define the ALS in a top-level application collection. Signed-off-by: Ronald Tschalär Signed-off-by: Aditya Garg Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit 4f1f391869eecb11d57e9e07ddec143ff3dc08ee Author: Roderick Colenbrander Date: Fri Jan 6 13:14:25 2023 -0800 HID: sony: remove DualShock4 support. Now that hid-playstation provides DualShock4 support, remove DualShock4 support from hid-sony as it is redundant. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina commit f5379a01d6617c887db4ba81732250725ac0bec5 Author: José Expósito Date: Mon Dec 26 13:57:36 2022 +0100 HID: uclogic: Use KUNIT_EXPECT_MEMEQ Commit b8a926bea8b1 ("kunit: Introduce KUNIT_EXPECT_MEMEQ and KUNIT_EXPECT_MEMNEQ macros") introduced a new macro to compare blocks of memory and, if the test fails, print the result in a human friendly format. For example, this is the output of a test failure: Expected res == params->expected, but res == 01 02 aa 00 00 00 03 bb 00 <00> 00 04 05 params->expected == 01 02 aa 00 00 00 03 bb 00 <01> 00 04 05 Use this new macro to replace KUNIT_EXPECT_EQ + memcmp. Signed-off-by: José Expósito Reviewed-by: Maíra Canal Signed-off-by: Jiri Kosina commit 9266a88156d1fbb8e50d6eeff7bac44ad4eaecc2 Author: José Expósito Date: Mon Dec 26 13:54:54 2022 +0100 HID: uclogic: Add support for XP-PEN Deco Pro MW The XP-PEN Deco Pro MW is a UGEE v2 device with a frame with 8 buttons, a bitmap dial and a mouse. Its pen has 2 buttons, supports tilt and pressure. It can be connected using a USB cable or, to use it in wireless mode, using a USB Bluetooth dongle. When it is connected in wireless mode the device battery is used to power it. All the pieces to support it are already in place. Add its ID and quirks in order to support the device. Link: https://github.com/DIGImend/digimend-kernel-drivers/issues/622 Tested-by: Andreas Grosse Signed-off-by: José Expósito Signed-off-by: Jiri Kosina commit 7744ca571af55b794595cff2da9d51a26904998f Author: José Expósito Date: Mon Dec 26 13:54:53 2022 +0100 HID: uclogic: Add support for XP-PEN Deco Pro SW The XP-PEN Deco Pro SW is a UGEE v2 device with a frame with 8 buttons, a bitmap dial and a mouse; however, the UCLOGIC_MOUSE_FRAME_QUIRK is required because it reports an incorrect frame type. Its pen has 2 buttons, supports tilt and pressure. It can be connected using a USB cable or, to use it in wireless mode, using a USB Bluetooth dongle. When it is connected in wireless mode the device battery is used to power it. All the pieces to support it are already in place. Add its ID and quirks in order to support the device. Signed-off-by: José Expósito Signed-off-by: Jiri Kosina commit a251d6576d2a29fc0806ef4775719e3b6e672d91 Author: José Expósito Date: Mon Dec 26 13:54:52 2022 +0100 HID: uclogic: Handle wireless device reconnection UGEEv2 tablets with battery can be connected using a USB cable or a USB Bluetooth dongle. When the Bluetooth dongle is used, the connection to that tablet can be lost because the tablet is out of the range of the receiver or because it was switched off using the switch placed in the back of the tablet's frame. After losing connection, the tablet is able to reconnect automatically and its firmware sends a special packet indicating that the device was reconnected. In response to this packet, the tablet needs to receive the same array of magic data it expects on probe to enable its interfaces. This patch implements a generic mechanism to hook raw events and schedule a work to perform any custom action. Tested-by: Mia Kanashi Tested-by: Andreas Grosse Signed-off-by: José Expósito Signed-off-by: Jiri Kosina commit bd85c131b2e3edf2cf1a498652e8c3a066a338e7 Author: José Expósito Date: Mon Dec 26 13:54:51 2022 +0100 HID: uclogic: Refactor UGEEv2 probe magic data A fututure patch will need to use the array of magic data that the UGEEv2 devices expect on probe and the endpoint number. Move them to a common place. Refactor, no functional changes. Tested-by: Mia Kanashi Tested-by: Andreas Grosse Signed-off-by: José Expósito Signed-off-by: Jiri Kosina commit f60c377f52de37f8705c5fc6d57737fdaf309ff9 Author: José Expósito Date: Mon Dec 26 13:54:50 2022 +0100 HID: uclogic: Add battery quirk Some UGEE v2 tablets have a wireless version with an internal battery and their firmware is able to report their battery level. However, there was not found a field on their descriptor indicating whether the tablet has battery or not, making it mandatory to classify such devices through the UCLOGIC_BATTERY_QUIRK quirk. Tested-by: Mia Kanashi Tested-by: Andreas Grosse Signed-off-by: José Expósito Signed-off-by: Jiri Kosina commit 14b71e6ad8ca59dd734c7fa9676f3d60bddee2a9 Author: José Expósito Date: Mon Dec 26 13:54:49 2022 +0100 HID: uclogic: Add frame type quirk The report descriptor used to get information about UGEE v2 devices is incorrect in the XP-PEN Deco Pro SW. It indicates that the device frame is of type UCLOGIC_PARAMS_FRAME_BUTTONS but the device has a frame of type UCLOGIC_PARAMS_FRAME_MOUSE. Here is the original report descriptor: 0x0e 0x03 0xc8 0xb3 0x34 0x65 0x08 0x00 0xff 0x1f 0xd8 0x13 0x00 0x00 ^ This byte should be 2 Add a quirk to be able to fix the reported frame type. Tested-by: Mia Kanashi Tested-by: Andreas Grosse Signed-off-by: José Expósito Signed-off-by: Jiri Kosina commit f639e0b68036034c6ee9c01480cd2a13189dd306 Author: Thomas Weißschuh Date: Fri Dec 23 02:53:35 2022 +0000 HID: i2c-hid: use uniform debugging APIs Only two locations in i2c-hid are using the standard dev_dbg() APIs. The rest are all using the custom i2c_hid_dbg(), which in turn uses dev_dbg(). Signed-off-by: Thomas Weißschuh Signed-off-by: Jiri Kosina commit 34ba3657a503184e8d9b64afac7f2d83ddae52fb Author: Thomas Weißschuh Date: Fri Dec 23 02:53:34 2022 +0000 HID: i2c-hid: switch to standard debugging APIs Instead of implementing a custom form of dynamic debugging we can use the standard debugging APIs. If the kernel is built with CONFIG_DYNAMIC_DEBUG this will be more discoverable and featureful. Also the previous module parameter "debug" is read-only so it can't actually be enabled. Signed-off-by: Thomas Weißschuh Signed-off-by: Jiri Kosina commit 21fe352fa0cfec1786fd8415c919c524fd8657ad Author: Thomas Zimmermann Date: Mon Jan 16 14:12:35 2023 +0100 drm/crtc-helper: Remove most include statements from drm_crtc_helper.h Remove most include statements from crm_crtc_helper.h and forward- declare the contained types in drm_crtc_helper.h. Only keep for the definition of 'bool'. Suggested-by: Sam Ravnborg Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Jani Nikula Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-23-tzimmermann@suse.de commit ad2a3bef134d42e8032eb4b56c137ae36ac64067 Author: Thomas Zimmermann Date: Mon Jan 16 14:12:34 2023 +0100 drm/vboxvideo: Remove unnecessary include statements for drm_crtc_helper.h Several source files include drm_crtc_helper.h without needing it or only to get its transitive include statements; leading to unnecessary compile-time dependencies. Directly include required headers and drop drm_crtc_helper.h where possible. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Jani Nikula Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-22-tzimmermann@suse.de commit a47171f08300f69f26d5815c9d8932075c8f41f2 Author: Thomas Zimmermann Date: Mon Jan 16 14:12:33 2023 +0100 drm/udl: Remove unnecessary include statements for drm_crtc_helper.h Several source files include drm_crtc_helper.h without needing it or only to get its transitive include statements; leading to unnecessary compile-time dependencies. Directly include required headers and drop drm_crtc_helper.h where possible. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Jani Nikula Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-21-tzimmermann@suse.de commit a391a98989610ac0d59acb33200f666dc5dda1b4 Author: Thomas Zimmermann Date: Mon Jan 16 14:12:32 2023 +0100 drm/tidss: Remove unnecessary include statements for drm_crtc_helper.h Several source files include drm_crtc_helper.h without needing it or only to get its transitive include statements; leading to unnecessary compile-time dependencies. Directly include required headers and drop drm_crtc_helper.h where possible. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Jani Nikula Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-20-tzimmermann@suse.de commit 7fe3ead722a0d9823c2393a535b787bb268bb94a Author: Thomas Zimmermann Date: Mon Jan 16 14:12:31 2023 +0100 drm/sun4i: Remove unnecessary include statements for drm_crtc_helper.h Several source files include drm_crtc_helper.h without needing it or only to get its transitive include statements; leading to unnecessary compile-time dependencies. Directly include required headers and drop drm_crtc_helper.h where possible. v2: * keep includes sorted (Sam) Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Jani Nikula Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-19-tzimmermann@suse.de commit e825f56c4ed166fc7be8a70531ea6edda8a665fc Author: Thomas Zimmermann Date: Mon Jan 16 14:12:30 2023 +0100 drm/sprd: Remove unnecessary include statements for drm_crtc_helper.h Several source files include drm_crtc_helper.h without needing it or only to get its transitive include statements; leading to unnecessary compile-time dependencies. Drop drm_crtc_helper.h where possible. v2: * update commit message (Sam) Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Jani Nikula Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-18-tzimmermann@suse.de commit 62e4400613c9797fa8cf9167d2b61f4a3a3eb599 Author: Thomas Zimmermann Date: Mon Jan 16 14:12:29 2023 +0100 drm/shmobile: Remove unnecessary include statements for drm_crtc_helper.h Several source files include drm_crtc_helper.h without needing it or only to get its transitive include statements; leading to unnecessary compile-time dependencies. Directly include required headers and drop drm_crtc_helper.h where possible. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Jani Nikula Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-17-tzimmermann@suse.de commit 7c23598d0283ce7a266292c33f5160867bcc6a6a Author: Thomas Zimmermann Date: Mon Jan 16 14:12:28 2023 +0100 drm/rockchip: Remove unnecessary include statements for drm_crtc_helper.h Several source files include drm_crtc_helper.h without needing it or only to get its transitive include statements; leading to unnecessary compile-time dependencies. Drop drm_crtc_helper.h where possible. v2: * update commit message (Sam) Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Jani Nikula Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-16-tzimmermann@suse.de commit f7d17cd4e16a51d9a9247f0ecd46a8a6895a8877 Author: Thomas Zimmermann Date: Mon Jan 16 14:12:27 2023 +0100 drm/radeon: Remove unnecessary include statements for drm_crtc_helper.h Several source files include drm_crtc_helper.h without needing it or only to get its transitive include statements; leading to unnecessary compile-time dependencies. Directly include required headers and drop drm_crtc_helper.h where possible. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Jani Nikula Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-15-tzimmermann@suse.de commit 874ee2d67fc90c920b0e80b48d24b0896608702e Author: Thomas Zimmermann Date: Mon Jan 16 14:12:26 2023 +0100 drm/nouveau: Remove unnecessary include statements for drm_crtc_helper.h Several source files include drm_crtc_helper.h without needing it or only to get its transitive include statements; leading to unnecessary compile-time dependencies. Directly include required headers and drop drm_crtc_helper.h where possible. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Jani Nikula Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-14-tzimmermann@suse.de commit 6ab5001ebf782160c07414504f4b4716e72d6b29 Author: Thomas Zimmermann Date: Mon Jan 16 14:12:25 2023 +0100 drm/logicvc: Remove unnecessary include statements for drm_crtc_helper.h Several source files include drm_crtc_helper.h without needing it or only to get its transitive include statements; leading to unnecessary compile-time dependencies. Drop drm_crtc_helper.h where possible. v2: * update commit message (Sam) Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Jani Nikula Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-13-tzimmermann@suse.de commit bc50cf64e9c7cd048a4b14d111b6a7f94783d6f8 Author: Thomas Zimmermann Date: Mon Jan 16 14:12:24 2023 +0100 drm/kmb: Remove unnecessary include statements for drm_crtc_helper.h Several source files include drm_crtc_helper.h without needing it or only to get its transitive include statements; leading to unnecessary compile-time dependencies. Drop drm_crtc_helper.h where possible. v2: * update commit message (Sam) Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Jani Nikula Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-12-tzimmermann@suse.de commit 4adc51a1c5e0f696accebbcca18135ebe04502c8 Author: Thomas Zimmermann Date: Mon Jan 16 14:12:23 2023 +0100 drm/ingenic: Remove unnecessary include statements for drm_crtc_helper.h Several source files include drm_crtc_helper.h without needing it or only to get its transitive include statements; leading to unnecessary compile-time dependencies. Drop drm_crtc_helper.h where possible. v2: * update commit message (Sam) Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Jani Nikula Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-11-tzimmermann@suse.de commit b3eed8039853e130c9256550ddbb17e9e318057d Author: Thomas Zimmermann Date: Mon Jan 16 14:12:22 2023 +0100 drm/i2c/ch7006: Remove unnecessary include statements for drm_crtc_helper.h Several source files include drm_crtc_helper.h without needing it or only to get its transitive include statements; leading to unnecessary compile-time dependencies. Move drm_crtc_helper.h to where it is needed. v2: * update commit message (Sam) Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Jani Nikula Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-10-tzimmermann@suse.de commit 3599dfa1149ab6e2aab5cac2e2c36fc36ef2c3d6 Author: Thomas Zimmermann Date: Mon Jan 16 14:12:21 2023 +0100 drm/gma500: Remove unnecessary include statements for drm_crtc_helper.h Several source files include drm_crtc_helper.h without needing it or only to get its transitive include statements; leading to unnecessary compile-time dependencies. Directly include required headers and drop drm_crtc_helper.h where possible. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Jani Nikula Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-9-tzimmermann@suse.de commit 50ebd513b6d2457e46117905ed73e8871f79a3f4 Author: Thomas Zimmermann Date: Mon Jan 16 14:12:20 2023 +0100 drm/bridge: Remove unnecessary include statements for drm_crtc_helper.h Several source files include drm_crtc_helper.h without needing it or only to get its transitive include statements; leading to unnecessary compile-time dependencies. Drop drm_crtc_helper.h where possible. v2: * update commit message (Sam) Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Jani Nikula Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-8-tzimmermann@suse.de commit d36bc60a2d9fdf775b63e66f1fb2e5c24630d8e4 Author: Thomas Zimmermann Date: Mon Jan 16 14:12:19 2023 +0100 drm/ast: Remove unnecessary include statements for drm_crtc_helper.h Several source files include drm_crtc_helper.h without needing it or only to get its transitive include statements; leading to unnecessary compile-time dependencies. Drop drm_crtc_helper.h where possible. v2: * update commit message (Sam) Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Jani Nikula Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-7-tzimmermann@suse.de commit 3d8853dddf34326b45ef6ba0af84f631c6e55f2d Author: Thomas Zimmermann Date: Mon Jan 16 14:12:18 2023 +0100 drm/aspeed: Remove unnecessary include statements for drm_crtc_helper.h Several source files include drm_crtc_helper.h without needing it or only to get its transitive include statements; leading to unnecessary compile-time dependencies. Drop drm_crtc_helper.h where possible. v2: * update commit message (Sam) Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Jani Nikula Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-6-tzimmermann@suse.de commit e3b63718827880731e83208f90e80240da0303e0 Author: Thomas Zimmermann Date: Mon Jan 16 14:12:17 2023 +0100 drm/arm/komeda: Remove unnecessary include statements for drm_crtc_helper.h Several source files include drm_crtc_helper.h without needing it or only to get its transitive include statements; leading to unnecessary compile-time dependencies. Drop drm_crtc_helper.h where possible. v2: * update commit message (Sam) Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Jani Nikula Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-5-tzimmermann@suse.de commit 973ad6273c7651bbc75a09d737f7291a84cb6691 Author: Thomas Zimmermann Date: Mon Jan 16 14:12:16 2023 +0100 drm/amdgpu: Remove unnecessary include statements for drm_crtc_helper.h Several source files include drm_crtc_helper.h without needing it or only to get its transitive include statements; leading to unnecessary compile-time dependencies. Directly include required headers and drop drm_crtc_helper.h where possible. v2: * keep includes sorted in amdgpu_device.c (Sam) Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Jani Nikula Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-4-tzimmermann@suse.de commit cde3d37b19dfddc2dd1bb238a5eaaae09a07b5c5 Author: Thomas Zimmermann Date: Mon Jan 16 14:12:15 2023 +0100 drm: Remove unnecessary include statements for drm_crtc_helper.h Several DRM core and helper source files include drm_crtc_helper.h without needing it or only to get its transitive include statements; leading to unnecessary compile-time dependencies. Directly include required headers and drop drm_crtc_helper.h where possible. The header file, drm_fixed.h, includes for lower_32_bits(). v2: * include drm_crtc_helper.h in drm_crtc_helper.c (Sam) Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Jani Nikula Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-3-tzimmermann@suse.de commit 5618f1bee2bfba8296208c6f39d8eed8509f8837 Author: Andy Shevchenko Date: Tue Jan 3 16:53:39 2023 +0200 thermal/drivers/qcom-spmi-adc-tm5: Use asm intead of asm-generic There is no point to specify asm-generic for the unaligned.h. Drop the 'generic' suffix. Signed-off-by: Andy Shevchenko Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230103145339.40501-1-andriy.shevchenko@linux.intel.com Signed-off-by: Daniel Lezcano commit ed9f918174cb35ba51d2fc86a613305dd8bc4cfe Author: Greg Kroah-Hartman Date: Wed Jan 11 10:23:31 2023 +0100 driver core: bus: move bus notifier logic into bus.c The logic to touch the bus notifier was open-coded in numberous places in the driver core. Clean that up by creating a local bus_notify() function and have everyone call this function instead, making the reading of the caller code simpler and easier to maintain over time. Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230111092331.3946745-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 504450d05c545a839b22542c72ddc388740462ac Author: Greg Kroah-Hartman Date: Wed Jan 11 10:23:30 2023 +0100 driver core: bus.h: document bus notifiers better The bus notifier values are not documented all that well, so clean this up and make a real enumerated type for them and document them much better. When doing this, remove the hex values and just rely on the enumerated type instead as that is all that is needed. Reviewed-by: Randy Dunlap Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230111092331.3946745-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 801fc159e30d3588b0fece351e1e8bdf375590d6 Author: Dinesh Karthikeyan Date: Fri Dec 23 10:36:46 2022 +0530 wifi: ath12k: Add support to read EEPROM caldata In current implementation, there is a overhead of maintaining caldata in the filesystem manually. To eliminate this overhead, for pci based chipsets, if calibration data is present in EEPROM, indicate firmware to download and read caldata from EEPROM. If the caldata is present in EEPROM, host is notified in the target capability. Upon this, the download request for the type ATH12K_QMI_FILE_TYPE_EEPROM is sent to firmware. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Dinesh Karthikeyan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221223050646.27785-4-quic_dinek@quicinc.com commit 42982259e9b7f090cefee28393989fa76a9aa57d Author: Dinesh Karthikeyan Date: Fri Dec 23 10:36:45 2022 +0530 wifi: ath12k: Add new qmi_bdf_type to handle caldata With current implementation, the calibration data download request, is sent twice incorrectly because the request for ELF_TYPE and REGDB_TYPE are handled in a common api ath12k_qmi_load_bdf_qmi. Add new type as ATH12K_QMI_BDF_TYPE_CALIBRATION to send calibration data download request as a separate case. With this the firmware is indicated to read caldata from EEPROM. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Dinesh Karthikeyan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221223050646.27785-3-quic_dinek@quicinc.com commit 27d7e348efb37f0465a59f9f6ef01f70a5f969e7 Author: Dinesh Karthikeyan Date: Fri Dec 23 10:36:44 2022 +0530 wifi: ath12k: Fix incorrect qmi_file_type enum values Enum value for caldata in QMI_WLANFW_BDF_DOWNLOAD_REQ_V01 is set as 1 which is reserved for BDF_TYPE_ELF. The expected qmi_file_type value for caldata is 2. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Dinesh Karthikeyan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221223050646.27785-2-quic_dinek@quicinc.com commit 2ee25c257d1714a9aeb0aae0dba0785e4aa19b8b Author: Thiraviyam Mariyappan Date: Tue Jan 17 14:03:19 2023 +0200 wifi: ath12k: dp_mon: Fix uninitialized warning related to the pktlog Uninitialized warning in the code changes related to pktlog, which is not completely supported in ath12k driver yet. Hence, remove the changes to avoid the warning. Warning: drivers/net/wireless/ath/ath12k/dp_mon.c:2138:18: warning: variable 'rx_buf_sz' is uninitialized when used here [-Wuninitialized] Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0-03171-QCAHKSWPL_SILICONZ-1 Reported-by: kernel test robot Signed-off-by: Thiraviyam Mariyappan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221221105529.19345-5-quic_tmariyap@quicinc.com commit 80166c42434c8deaa812443c5de73c69a7bed929 Author: Thiraviyam Mariyappan Date: Tue Jan 17 14:03:19 2023 +0200 wifi: ath12k: dp_mon: Fix out of bounds clang warning Fix below out-of-bounds access warning while processing ppdu end user stats. The size of info array is 6 but storing 7 values, Fix this with increasing info array size to 7. Warning: drivers/net/wireless/ath/ath12k/dp_mon.c:623:3: warning: array index 6 is past the end of the array (that has type 'u32[6]' (aka 'unsigned int[6]')) [-Warray-bounds] Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0-03171-QCAHKSWPL_SILICONZ-1 Reported-by: kernel test robot Signed-off-by: Thiraviyam Mariyappan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221221105529.19345-4-quic_tmariyap@quicinc.com commit b57f03200853817c06567fa8f0d02de0f2755d6a Author: Thiraviyam Mariyappan Date: Tue Jan 17 14:03:18 2023 +0200 wifi: ath12k: hal_rx: Use memset_startat() for clearing queue descriptors In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memset(), avoid intentionally writing across neighboring fields. Use memset_startat() so memset() doesn't get confused about writing beyond the destination member that is intended to be the starting point of zeroing through the end of the struct and fixes the below clang warning. Warning: include/linux/fortify-string.h:314:4: warning: call to '__write_overflow_field' declared with 'warning' attribute: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Wattribute-warning] Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0-03171-QCAHKSWPL_SILICONZ-1 Reported-by: kernel test robot Signed-off-by: Thiraviyam Mariyappan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221221105529.19345-3-quic_tmariyap@quicinc.com commit d1335f0dc18fed0ecbe59862d4706b4a9ddfc050 Author: Thiraviyam Mariyappan Date: Tue Jan 17 14:03:18 2023 +0200 wifi: ath12k: Fix uninitilized variable clang warnings Fix uninitilized variable warnings spotted during clang compilation. Warnings: drivers/net/wireless/ath/ath12k/mac.c:1076:8: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] drivers/net/wireless/ath/ath12k/dbring.c:272:7: warning: variable 'ring' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized] drivers/net/wireless/ath/ath12k/dp_rx.c:2690:34: warning: variable 'i' is uninitialized when used here [-Wuninitialized] Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0-03171-QCAHKSWPL_SILICONZ-1 Reported-by: kernel test robot Signed-off-by: Thiraviyam Mariyappan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221221105529.19345-2-quic_tmariyap@quicinc.com commit cfec785c7662edb48164609d158691c9ec637f27 Author: Kalle Valo Date: Tue Jan 17 14:03:18 2023 +0200 wifi: ath12k: wmi: delete PSOC_HOST_MAX_NUM_SS Both PSOC_HOST_MAX_NUM_SS and WMI_MAX_NUM_SS are set to 8. The host assumes that the values are the same but there's no check for that, so things will break if either of the values change. It's simpler and safer to have just one define so delete PSOC_HOST_MAX_NUM_SS and use WMI_MAX_NUM_SS everywhere. No functional changes. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221220120655.19389-4-kvalo@kernel.org commit f8209eef730efbb91afd0b8825ab246c76158868 Author: Kalle Valo Date: Tue Jan 17 14:03:18 2023 +0200 wifi: ath12k: hal: convert offset macros to functions After previous patch checkpatch was giving warnings: drivers/net/wireless/ath/ath12k/hal.h:158: Macro argument reuse 'ab' - possible side-effects? drivers/net/wireless/ath/ath12k/hal.h:160: Macro argument reuse 'ab' - possible side-effects? drivers/net/wireless/ath/ath12k/hal.h:162: Macro argument reuse 'ab' - possible side-effects? drivers/net/wireless/ath/ath12k/hal.h:164: Macro argument reuse 'ab' - possible side-effects? drivers/net/wireless/ath/ath12k/hal.h:173: Macro argument reuse 'ab' - possible side-effects? drivers/net/wireless/ath/ath12k/hal.h:175: Macro argument reuse 'ab' - possible side-effects? drivers/net/wireless/ath/ath12k/hal.h:177: Macro argument reuse 'ab' - possible side-effects? drivers/net/wireless/ath/ath12k/hal.h:179: Macro argument reuse 'ab' - possible side-effects? To fix those convert the macros into functions. As it was difficult to use struct ath12k_base within hal.h, core.h was already including hal.h so including back core.h would not work, move the functions also to hal.c. No functional changes. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221220120655.19389-3-kvalo@kernel.org commit 1a8dc2eb5b4e803d4cac74b6603260e6bcbf0c57 Author: Kalle Valo Date: Tue Jan 17 14:03:17 2023 +0200 wifi: ath12k: hal: add ab parameter to macros using it It's considered evil if a macro is using a variable but not having the variable as a parameter. So add the ab parameter to macros using that. No functional changes. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221220120655.19389-2-kvalo@kernel.org commit ed3f83b3459a67a3ab9d806490ac304b567b1c2d Author: Miaoqian Lin Date: Mon Jan 2 12:11:42 2023 +0400 wifi: ath11k: Fix memory leak in ath11k_peer_rx_frag_setup crypto_alloc_shash() allocates resources, which should be released by crypto_free_shash(). When ath11k_peer_find() fails, there has memory leak. Add missing crypto_free_shash() to fix this. Fixes: 243874c64c81 ("ath11k: handle RX fragments") Signed-off-by: Miaoqian Lin Reviewed-by: Leon Romanovsky Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230102081142.3937570-1-linmq006@gmail.com commit 53a998c4d7284debd77734d01e1466e59a1d03b2 Author: Raj Kumar Bhagat Date: Fri Jan 13 12:02:09 2023 +0530 wifi: ath11k: fix ce memory mapping for ahb devices Currently ath11k_ahb module is not loaded successfully and the wifi interface is not created. Kernel trace is seen while loading the ath11k_ahb module. The issue is seen in all ath11k AHB devices except in IPQ5018. This happens because in ath11k_ahb_probe(), ab->mem_ce is initialized with the value of ab->mem. However, at this instant ab->mem is not yet set. Later, during write to a particular memory via ath11k_ahb_write32() this ab->mem_ce is used with particular offset. Since ab->mem_ce is not set properly this possibly leads to memory conflict to handle kernel paging request and the below trace is seen. [ 93.035047] Unable to handle kernel paging request at virtual address ffff800100a00000 [ 93.035083] Mem abort info: [ 93.041869] ESR = 0x0000000096000045 [ 93.044561] EC = 0x25: DABT (current EL), IL = 32 bits [ 93.048377] SET = 0, FnV = 0 [ 93.053840] EA = 0, S1PTW = 0 [ 93.056704] FSC = 0x05: level 1 translation fault [ 93.059745] Data abort info: [ 93.064603] ISV = 0, ISS = 0x00000045 [ 93.067729] CM = 0, WnR = 1 [ 93.071287] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000042219000 [ 93.074409] [ffff800100a00000] pgd=100000007ffff003, p4d=100000007ffff003, pud=0000000000000000 [ 93.081195] Internal error: Oops: 0000000096000045 [#1] PREEMPT SMP [ 93.089598] Modules linked in: ath11k_ahb ath11k_pci ath11k qmi_helpers [ 93.095851] CPU: 2 PID: 66 Comm: kworker/u8:3 Not tainted 6.1.0-rc8-wt-ath-658126-g58e4b9df840c-dirty #2 [ 93.102454] Hardware name: Qualcomm Technologies, Inc. IPQ8074/AP-HK14 (DT) [ 93.112171] Workqueue: ath11k_qmi_driver_event ath11k_qmi_driver_event_work [ath11k] [ 93.118856] pstate: 40000005 (nZcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 93.126838] pc : ath11k_ahb_write32+0xc/0x18 [ath11k_ahb] [ 93.133520] lr : ath11k_hal_srng_setup+0x860/0x8f0 [ath11k] [ 93.139075] sp : ffff80000aaebb70 [ 93.144452] x29: ffff80000aaebb70 x28: 0000000000000020 x27: ffff80000aaebc50 [ 93.147934] x26: ffff000004923750 x25: ffff000004921200 x24: ffff000004928000 [ 93.155051] x23: 0000000000000020 x22: ffff000004930000 x21: ffff000004923200 [ 93.162170] x20: ffff000004920000 x19: 00000000eea00000 x18: ffff0000049200f0 [ 93.169288] x17: 0000000000000000 x16: 0000000000000000 x15: 000000000000025e [ 93.176405] x14: ffff000003c414f0 x13: 0000000000000000 x12: 0000000000000008 [ 93.183524] x11: ffff000003c41488 x10: 0000000000000040 x9 : 0000000000000000 [ 93.190641] x8 : ffff80000a9dd100 x7 : 0000000000000000 x6 : 000000000000003f [ 93.197759] x5 : ffff800100a00400 x4 : ffff8000031f4018 x3 : 0000000000000004 [ 93.204877] x2 : 0000000047b62000 x1 : ffff800100a00000 x0 : ffff800012000000 [ 93.211996] Call trace: [ 93.219104] ath11k_ahb_write32+0xc/0x18 [ath11k_ahb] [ 93.221366] ath11k_ce_init_ring+0x184/0x278 [ath11k] [ 93.226576] ath11k_ce_init_pipes+0x4c/0x1a0 [ath11k] [ 93.231610] ath11k_core_qmi_firmware_ready+0x3c/0x568 [ath11k] [ 93.236646] ath11k_qmi_driver_event_work+0x168/0x4f8 [ath11k] [ 93.242376] process_one_work+0x144/0x350 [ 93.248275] worker_thread+0x120/0x430 [ 93.252352] kthread+0xf4/0x110 [ 93.255997] ret_from_fork+0x10/0x20 [ 93.259043] Code: d503201f f94e1c00 8b214001 d50332bf (b9000022) [ 93.262863] ---[ end trace 0000000000000000 ]--- However, for the device IPQ5018 ath11k_hw_params .ce_remap is defined. This parameter is used to recalculate ab->mem_ce and hence, this issue is not seen in IPQ5018. Hence, fix this by initializing ab->mem_ce after ab->mem is set. ab->mem is set inside the ath11k_ahb_setup_resources() therefore initialize ab->mem_ce after ath11k_ahb_setup_resources(). Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Fixes: b42b3678c91f ("wifi: ath11k: remap ce register space for IPQ5018") Signed-off-by: Raj Kumar Bhagat Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230113063209.7256-1-quic_rajkbhag@quicinc.com commit f07b2b3f9d47fea308af3ae05613b6b4801e68a3 Author: Conor Dooley Date: Mon Dec 5 14:45:26 2022 +0000 Documentation: riscv: add a section about ISA string ordering in /proc/cpuinfo The RISC-V specs are permissive in what they allow as the ISA string, but how we output this to userspace in /proc/cpuinfo is quasi uABI. Formalise this as part of the uABI, by documenting the list of rules we use at this point in time. Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20221205144525.2148448-4-conor.dooley@microchip.com Signed-off-by: Palmer Dabbelt commit 80c200b34ee8a0a3378d2073bd8eaae09651c60e Author: Conor Dooley Date: Mon Dec 5 14:45:25 2022 +0000 RISC-V: resort all extensions in consistent orders Ordering between each and every list of extensions is wildly inconsistent. Per discussion on the lists pick the following policy: - The array defining order in /proc/cpuinfo follows a narrow interpretation of the ISA specifications, described in a comment immediately presiding it. - All other lists of extensions are sorted alphabetically. This will hopefully allow for easier review & future additions, and reduce conflicts between patchsets as the number of extensions grows. Link: https://lore.kernel.org/all/20221129144742.2935581-2-conor.dooley@microchip.com/ Suggested-by: Andrew Jones Reviewed-by: Andrew Jones Reviewed-by: Heiko Stuebner Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20221205144525.2148448-3-conor.dooley@microchip.com Signed-off-by: Palmer Dabbelt commit 99e2266f2460e5778560f81982b6301dd2a16502 Author: Conor Dooley Date: Mon Dec 5 14:45:24 2022 +0000 RISC-V: clarify ISA string ordering rules in cpu.c While the current list of rules may have been accurate when created it now lacks some clarity in the face of isa-manual updates. Instead of trying to continuously align this rule-set with the one in the specifications, change the role of this comment. This particular comment is important, as the array it "decorates" defines the order in which the ISA string appears to userspace in /proc/cpuinfo. Re-jig and strengthen the wording to provide contributors with a set order in which to add entries & note why this particular struct needs more attention than others. While in the area, add some whitespace and tweak some wording for readability's sake. Suggested-by: Andrew Jones Reviewed-by: Andrew Jones Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20221205144525.2148448-2-conor.dooley@microchip.com Signed-off-by: Palmer Dabbelt commit 6efdda8bec2900ce5166ee4ff4b1844b47b529cd Author: Joel Fernandes (Google) Date: Thu Jan 12 00:52:22 2023 +0000 rcu: Track laziness during boot and suspend Boot and suspend/resume should not be slowed down in kernels built with CONFIG_RCU_LAZY=y. In particular, suspend can sometimes fail in such kernels. This commit therefore adds rcu_async_hurry(), rcu_async_relax(), and rcu_async_should_hurry() functions that track whether or not either a boot or a suspend/resume operation is in progress. This will enable a later commit to refrain from laziness during those times. Export rcu_async_should_hurry(), rcu_async_hurry(), and rcu_async_relax() for later use by rcutorture. [ paulmck: Apply feedback from Steve Rostedt. ] Fixes: 3cb278e73be5 ("rcu: Make call_rcu() lazy to save power") Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit ae4d39f753080aff01830a607c22e5abc6012f41 Merge: b07de94d4501c 6fb4c593982a0 Author: Palmer Dabbelt Date: Tue Jan 17 19:22:27 2023 -0800 Merge patch "RISC-V: fix incorrect type of ARCH_CANAAN_K210_DTB_SOURCE" This fixes an issue with the K210 Kconfig cleanups, I'm just merging it from that to avoid crossing the streams. * b4-shazam-merge: RISC-V: fix incorrect type of ARCH_CANAAN_K210_DTB_SOURCE Link: https://lore.kernel.org/r/20230111104848.2088516-1-conor.dooley@microchip.com Signed-off-by: Palmer Dabbelt commit 6fb4c593982a01c8a356d1ba3b54dc1852ba1404 Author: Conor Dooley Date: Wed Jan 11 10:48:49 2023 +0000 RISC-V: fix incorrect type of ARCH_CANAAN_K210_DTB_SOURCE When adding the ARCH_ symbol for the builtin K210 dtb, I erroneously used the bool type for something that is quite obviously a string. Unfortunately, there is no such thing as "def_string", but in this case we can use "default" to propagate the value of SOC_CANAAN_K210_DTB_SOURCE to ARCH_CANAAN_K210_DTB_SOURCE. ARCH_CANAAN_K210_DTB_SOURCE is not user selectable, so using olddefconfig etc will update ARCH_CANAAN_K210_DTB_SOURCE to reflect any changes made to SOC_CANAAN_K210_DTB_SOURCE. Fixes: fc43211939bb ("RISC-V: kconfig.socs: convert usage of SOC_CANAAN to ARCH_CANAAN") Reported-by: Geert Uytterhoeven Signed-off-by: Conor Dooley Tested-by: Geert Uytterhoeven Link: https://lore.kernel.org/all/20230111104848.2088516-1-conor.dooley@microchip.com/ Signed-off-by: Palmer Dabbelt commit c4791b3196bf46367bcf6cc56a09b32e037c4f49 Merge: 860edff562e7e 95331514d95fa Author: Jakub Kicinski Date: Tue Jan 17 19:34:10 2023 -0800 Merge branch 'net-mdio-continue-separating-c22-and-c45' Michael Walle says: ==================== net: mdio: Continue separating C22 and C45 I've picked this older series from Andrew up and rebased it onto the latest net-next. This is the third (and hopefully last) patch set in the series which separates the C22 and C45 MDIO bus transactions at the API level to the MDIO bus drivers. The first patch is a newer version of the former "net: dsa: Separate C22 and C45 MDIO bus transaction methods", which only contains the mt7530 changes. Although posted as v1, because this is a new series, there is a changelog included in the patch comment section. The last patch is a new one, which isn't from Andrew's tree. ==================== Link: https://lore.kernel.org/r/20230116-net-next-c45-seperation-part-3-v1-0-0c53afa56aad@walle.cc Signed-off-by: Jakub Kicinski commit 95331514d95fae22a13df955275038d531cf85a0 Author: Michael Walle Date: Tue Jan 17 00:52:27 2023 +0100 net: ethernet: renesas: rswitch: C45 only transactions The rswitch MDIO bus driver only supports C45 transfers. Update the function names to make this clear, pass the mmd as a parameter, and register the accessors to the _c45 ops of the bus driver structure. Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit c708e135037087ffe90a9e0b1b01cd78a7f2aa4b Author: Andrew Lunn Date: Tue Jan 17 00:52:26 2023 +0100 net: dsa: sja1105: Separate C22 and C45 transactions for T1 MDIO bus The T1 MDIO bus driver can perform both C22 and C45 transfers. Create separate functions for each and register the C45 versions using the new API calls where appropriate. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit ae271547bba63095237386beed84a7701f4f7f14 Author: Andrew Lunn Date: Tue Jan 17 00:52:25 2023 +0100 net: dsa: sja1105: C45 only transactions for PCS The sja1105 MDIO bus driver only supports C45 transfers. Update the function names to make this clear, pass the mmd as a parameter, and register the accessors to the _c45 ops of the bus driver structure. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit 47e61593f367060c83f07a6b46aa7a4f77ffb4dd Author: Andrew Lunn Date: Tue Jan 17 00:52:24 2023 +0100 amd-xgbe: Replace MII_ADDR_C45 with XGBE_ADDR_C45 The xgbe driver reuses MII_ADDR_C45 for its own purpose. The values derived with it are never passed to phylib or a linux MDIO bus driver. In order that MII_ADDR_C45 can be removed, add an XGBE specific Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit 070f6186a2f1d05474c7ee134fccc042aca8d103 Author: Andrew Lunn Date: Tue Jan 17 00:52:23 2023 +0100 amd-xgbe: Separate C22 and C45 transactions The xgbe MDIO bus driver can perform both C22 and C45 transfers, when using its MDIO bus hardware. The SFP I2C mdio bus driver only supports C22. Create separate functions for each and register the C45 versions using the new API calls where appropriate. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit 41799a77f4bbf32ee10fea877ce999f80800b152 Author: Andrew Lunn Date: Tue Jan 17 00:52:22 2023 +0100 net: hns: Separate C22 and C45 transactions The hns MDIO bus driver can perform both C22 and C45 transfers. Create separate functions for each and register the C45 versions using the new API calls where appropriate. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit ab2960f0fdfe7db4daaff1d7b34e860cb46a5755 Author: Andrew Lunn Date: Tue Jan 17 00:52:21 2023 +0100 ixgbe: Use C45 mdiobus accessors When performing a C45 bus transaction, make use of the c45 variants of the bus read/write helpers. The ability to pass a special register value is being removed to clean up the mdio bus driver API. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit 308c8ffd5a7d6c05ac57029a1cf875560e70c67d Author: Andrew Lunn Date: Tue Jan 17 00:52:20 2023 +0100 ixgbe: Separate C22 and C45 transactions The ixgbe MDIO bus driver can perform both C22 and C45 transfers. Create separate functions for each and register the C45 versions using the new API calls where appropriate. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit a4d65b1de2a2034358027d272c878f46076929bb Author: Andrew Lunn Date: Tue Jan 17 00:52:19 2023 +0100 net: macb: Separate C22 and C45 transactions The macb MDIO bus driver can perform both C22 and C45 transfers. Create separate functions for each and register the C45 versions using the new API calls where appropriate. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit 064a6a887f95bd6fce17b4d06d6ed2ff7eaa2744 Author: Andrew Lunn Date: Tue Jan 17 00:52:18 2023 +0100 net: nixge: Separate C22 and C45 transactions The nixge MDIO bus driver can perform both C22 and C45 transfers. Create separate functions for each and register the C45 versions using the new API calls where appropriate. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit e078c8b5eab7557dbf773fff6a8bba2ef4fca365 Author: Andrew Lunn Date: Tue Jan 17 00:52:17 2023 +0100 net: sxgbe: Separate C22 and C45 transactions The sxgdb MDIO bus driver can perform both C22 and C45 transfers. Create separate functions for each and register the C45 versions using the new API calls where appropriate. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit defa2e541894974097c5d767bd38afc1257faca7 Author: Andrew Lunn Date: Tue Jan 17 00:52:16 2023 +0100 net: dsa: mt7530: Separate C22 and C45 MDIO bus transactions mt7530 does support C45, but its uses a mix of registering its MDIO bus and providing its private MDIO bus to the DSA core, too. This makes the change a bit more complex. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit 860edff562e7e6d8af0ba89ca7b41506e56be430 Author: Mengyuan Lou Date: Mon Jan 16 18:38:39 2023 +0800 net: wangxun: clean up the code Convert various mult-bit fields to be defined using GENMASK/FIELD_PREP. Simplify the code with the ternary operator. Signed-off-by: Mengyuan Lou Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230116103839.84087-1-mengyuanlou@net-swift.com Signed-off-by: Jakub Kicinski commit f3a1e0c896e81f766d8677c8c07c1875ad14272b Merge: 87a26f2bd6686 373c612d72461 Author: Jakub Kicinski Date: Tue Jan 17 19:16:28 2023 -0800 Merge tag 'i2c-fwnode-api-2023017' of https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Wolfram Sang says: ==================== Immutable branch adding fwnode API to the I2C core I2C changes requested by Russell King. This allows him to rework SFP code further. * tag 'i2c-fwnode-api-2023017' of https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: add fwnode APIs ==================== Link: https://lore.kernel.org/r/Y8ZhI4g0wsvpjokd@ninjato/ Signed-off-by: Jakub Kicinski commit 87a26f2bd66866cdecdb3bca41e0885abbe3ee36 Merge: 0c68c8e5ec682 7b3c4c370c093 Author: Jakub Kicinski Date: Tue Jan 17 19:09:42 2023 -0800 Merge tag 'regmap-mdio-c45-rework' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Mark Brown says: ==================== regmap: Rework regmap_mdio_c45_{read|write} for new C45 API. This reworks the regmap MDIO handling of C45 addresses in preparation for some forthcoming updates to the networking code. * tag 'regmap-mdio-c45-rework' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: Rework regmap_mdio_c45_{read|write} for new C45 API. ==================== Link: https://lore.kernel.org/r/Y8VjkgcWHjR9TzNw@sirena.org.uk Signed-off-by: Jakub Kicinski commit 6514bac4a321daaf2fdf3a116a644c77e4908f20 Author: Tzung-Bi Shih Date: Tue Jan 17 16:02:54 2023 +0800 platform/chrome: cros_ec_proto: remove big stub objects from stack sizeof(struct device) = 680 sizeof(struct cros_ec_dev) = 720 They tend to exceed the stack frame size limit in some specific environment which results in the following compilation error: >> drivers/platform/chrome/cros_ec_proto_test.c:2530:13: error: stack frame size (2128) exceeds limit (2048) in 'cros_ec_proto_test_get_sensor_count_legacy' Remove the big stub objects from stack. This is: $ sed -i 's/struct cros_ec_dev /static struct cros_ec_dev /' \ drivers/platform/chrome/cros_ec_proto_test.c Reported-by: kernel test robot Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230117080254.2725536-1-tzungbi@kernel.org commit 8bb233b27fb7c11deefbe2318e75490b22cf3d1a Author: Tzung-Bi Shih Date: Mon Jan 9 16:15:54 2023 +0800 platform/chrome: cros_ec_uart: fix negative type promoted to high serdev_device_write_buf() returns negative numbers on errors. When the return value compares to unsigned integer `len`, it promotes to quite large positive number. Fix it. Fixes: 04a8bdd135cc ("platform/chrome: cros_ec_uart: Add transport layer") Reported-by: Dan Carpenter Signed-off-by: Tzung-Bi Shih Reviewed-by: Dan Carpenter Reviewed-by: Benson Leung Link: https://lore.kernel.org/r/20230109081554.3792547-1-tzungbi@kernel.org commit e17af1c9d861dc177e5b56009bd4f71ace688d97 Author: Bjorn Andersson Date: Tue Jan 17 09:29:51 2023 -0800 drm/msm/dp: Remove INIT_SETUP delay During initalization of the DisplayPort controller an EV_HPD_INIT_SETUP event is generated, but with a delay of 100 units. This delay existed to circumvent bug in the QMP combo PHY driver, where if the DP part was powered up before USB, the common properties would not be properly initialized - and USB wouldn't work. This issue was resolved in the recent refactoring of the QMP driver, so it's now possible to remove this delay. While there is still a timing dependency in the current implementation, test indicates that it's now possible to boot with an external display on USB Type-C and have the display power up, without disconnecting and reconnecting the cable. Signed-off-by: Bjorn Andersson Reviewed-by: Kuogee Hsieh Patchwork: https://patchwork.freedesktop.org/patch/518729/ Link: https://lore.kernel.org/r/20230117172951.2748456-1-quic_bjorande@quicinc.com Signed-off-by: Dmitry Baryshkov commit 00feff8f12747cb12684513d7fd97bb9352b721a Author: Dmitry Baryshkov Date: Mon Jan 16 05:44:35 2023 +0200 drm/msm/dpu: enable sourcesplit for sc7180/sc7280 According to the vendor dts files, both sc7180 and sc7280 support the source split mode (using two LMs for a single output). Change these two platforms to use MIXER_SDM845_MASK, which includes DPU_MIXER_SOURCESPLIT. Rename MIXER_SC7180_MASK to MIXER_QCM2290_MASK, since this platform doesn't seem to support source split mode. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/518479/ Link: https://lore.kernel.org/r/20230116034435.569512-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit f377ea2c3c3a8a979c1961e7449715a58d4eb3ae Author: Dmitry Baryshkov Date: Thu Jan 12 07:36:59 2023 +0200 drm/msm/dpu: merge two CRTC debugfs dirs For each CRTC we are creating two different debugfs directories one using crtc index (created automatically for the CRC files) and another one using CRTC name/object ID (for state and status files). This can be confusing, so move our custom files to crtc->debugfs_entry, effetively merging two debugfs dirs. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/518065/ Link: https://lore.kernel.org/r/20230112053659.1361298-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit abc40122d9a69f56c04efb5a7485795f5ac799d1 Author: Marijn Suijten Date: Tue Jan 10 00:15:55 2023 +0100 drm/msm/dpu: Disallow unallocated resources to be returned In the event that the topology requests resources that have not been created by the system (because they are typically not represented in dpu_mdss_cfg ^1), the resource(s) in global_state (in this case DSC blocks, until their allocation/assignment is being sanity-checked in "drm/msm/dpu: Reject topologies for which no DSC blocks are available") remain NULL but will still be returned out of dpu_rm_get_assigned_resources, where the caller expects to get an array containing num_blks valid pointers (but instead gets these NULLs). To prevent this from happening, where null-pointer dereferences typically result in a hard-to-debug platform lockup, num_blks shouldn't increase past NULL blocks and will print an error and break instead. After all, max_blks represents the static size of the maximum number of blocks whereas the actual amount varies per platform. ^1: which can happen after a git rebase ended up moving additions to _dpu_cfg to a different struct which has the same patch context. Fixes: bb00a452d6f7 ("drm/msm/dpu: Refactor resource manager") Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/517636/ Link: https://lore.kernel.org/r/20230109231556.344977-1-marijn.suijten@somainline.org Signed-off-by: Dmitry Baryshkov commit 59f0182a291c7e5fd6dd7803c26af8d01989fc91 Author: Dmitry Baryshkov Date: Mon Jan 2 17:47:47 2023 +0200 drm/msm/dpu: remove dpu_encoder_virt_ops Struct dpu_encoder_virt_ops is used to provide several callbacks to the phys_enc backends. However these ops are static and are not supposed to change in the foreseeble future. Drop the indirection and call corresponding functions directly. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/516518/ Link: https://lore.kernel.org/r/20230102154748.951328-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 643b7d0869cc7f1f7a5ac7ca6bd25d88f54e31d0 Author: Jiasheng Jiang Date: Mon Jan 9 10:20:38 2023 +0800 drm/msm: Add missing check and destroy for alloc_ordered_workqueue Add check for the return value of alloc_ordered_workqueue as it may return NULL pointer. Moreover, use the destroy_workqueue in the later fails in order to avoid memory leak. Signed-off-by: Jiasheng Jiang Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/517419/ Link: https://lore.kernel.org/r/20230109022038.2163-1-jiasheng@iscas.ac.cn Signed-off-by: Dmitry Baryshkov commit 759cc4914fb0e3f35d6f32c5df045c7df23094ac Author: Dmitry Baryshkov Date: Mon Jan 9 06:54:53 2023 +0200 dt-bindings: display/msm: qcom, mdss: fix HDMI PHY node names On Qualcomm devices HDMI PHY node names were changed from hdmi-phy to phy. Follow this change. Signed-off-by: Dmitry Baryshkov Acked-by: Rob Herring Patchwork: https://patchwork.freedesktop.org/patch/517446/ Link: https://lore.kernel.org/r/20230109045453.316089-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit a00121d31f75b574eb7d5a6add5035bcbe35969f Author: Konrad Dybcio Date: Mon Dec 12 10:33:12 2022 +0100 dt-bindings: display/msm: Add SM8150 MDSS & DPU Add bindings for the display hardware on SM8150. Signed-off-by: Konrad Dybcio Reviewed-by: Rob Herring Patchwork: https://patchwork.freedesktop.org/patch/514681/ Link: https://lore.kernel.org/r/20221212093315.11390-1-konrad.dybcio@linaro.org Signed-off-by: Dmitry Baryshkov commit d839f0811a31322c087a859c2b181e2383daa7be Author: Jiasheng Jiang Date: Mon Dec 12 17:11:17 2022 +0800 drm/msm/gem: Add check for kmalloc Add the check for the return value of kmalloc in order to avoid NULL pointer dereference in copy_from_user. Fixes: 20224d715a88 ("drm/msm/submit: Move copy_from_user ahead of locking bos") Signed-off-by: Jiasheng Jiang Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/514678/ Link: https://lore.kernel.org/r/20221212091117.43511-1-jiasheng@iscas.ac.cn Signed-off-by: Dmitry Baryshkov commit c0f264e4edb60db410462d513e29d2de3ef7de56 Author: Jiri Olsa Date: Tue Jan 17 23:37:05 2023 +0100 bpf/selftests: Add verifier tests for loading sleepable programs Adding verifier tests for loading all types od allowed sleepable programs plus reject for tp_btf type. Acked-by: Song Liu Signed-off-by: Jiri Olsa Link: https://lore.kernel.org/r/20230117223705.440975-2-jolsa@kernel.org Signed-off-by: Alexei Starovoitov commit 700e6f853eb3977cd1cf172b717baa9daa328ea4 Author: Jiri Olsa Date: Tue Jan 17 23:37:04 2023 +0100 bpf: Do not allow to load sleepable BPF_TRACE_RAW_TP program Currently we allow to load any tracing program as sleepable, but BPF_TRACE_RAW_TP can't sleep. Making the check explicit for tracing programs attach types, so sleepable BPF_TRACE_RAW_TP will fail to load. Updating the verifier error to mention iter programs as well. Acked-by: Song Liu Acked-by: Yonghong Song Signed-off-by: Jiri Olsa Link: https://lore.kernel.org/r/20230117223705.440975-1-jolsa@kernel.org Signed-off-by: Alexei Starovoitov commit 67804e48b4945e109b54b4bf5a75f5cad3e2dca0 Author: John Harrison Date: Wed Jan 11 12:04:29 2023 -0800 drm/i915/gt: Start adding module oriented dmesg output When trying to analyse bug reports from CI, customers, etc. it can be difficult to work out exactly what is happening on which GT in a multi-GT system. So add GT oriented debug/error message wrappers. If used instead of the drm_ equivalents, you get the same output but with a GT# prefix on it. v2: Go back to using lower case names (combined review feedback). Convert intel_gt.c as a first step. v3: Add gt_err_ratelimited() as well, undo one conversation that might not have a GT pointer in some scenarios (review feedback from Michal W). Split definitions into separate header (review feedback from Jani). Convert all intel_gt*.c files. v4: Re-order some macro definitions (Andi S), update (c) date (Tvrtko) Signed-off-by: John Harrison Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20230111200429.2139084-2-John.C.Harrison@Intel.com commit 0c8a6e9ea232c221976a0670256bd861408d9917 Author: Sasa Dragic Date: Mon Dec 19 18:29:27 2022 +0100 drm/i915: re-disable RC6p on Sandy Bridge RC6p on Sandy Bridge got re-enabled over time, causing visual glitches and GPU hangs. Disabled originally in commit 1c8ecf80fdee ("drm/i915: do not enable RC6p on Sandy Bridge"). Signed-off-by: Sasa Dragic Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221219172927.9603-2-sasa.dragic@gmail.com Fixes: fb6db0f5bf1d ("drm/i915: Remove unsafe i915.enable_rc6") Fixes: 13c5a577b342 ("drm/i915/gt: Select the deepest available parking mode for rc6") Cc: stable@vger.kernel.org Reviewed-by: Rodrigo Vivi commit 8844c3df001bc1d8397fddea341308da63855d53 Author: Pierre Gondois Date: Wed Jan 4 19:30:25 2023 +0100 cacheinfo: Return error code in init_of_cache_level() Make init_of_cache_level() return an error code when the cache information parsing fails to help detecting missing information. init_of_cache_level() is only called for riscv. Returning an error code instead of 0 will prevent detect_cache_attributes() to allocate memory if an incomplete DT is parsed. Signed-off-by: Pierre Gondois Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20230104183033.755668-3-pierre.gondois@arm.com Signed-off-by: Sudeep Holla commit c3719bd9eeb2edf84bd263d662e36ca0ba262a23 Author: Pierre Gondois Date: Wed Jan 4 19:30:24 2023 +0100 cacheinfo: Use RISC-V's init_cache_level() as generic OF implementation RISC-V's implementation of init_of_cache_level() is following the Devicetree Specification v0.3 regarding caches, cf.: - s3.7.3 'Internal (L1) Cache Properties' - s3.8 'Multi-level and Shared Cache Nodes' Allow reusing the implementation by moving it. Also make 'levels', 'leaves' and 'level' unsigned int. Signed-off-by: Pierre Gondois Reviewed-by: Conor Dooley Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20230104183033.755668-2-pierre.gondois@arm.com Signed-off-by: Sudeep Holla commit cf22ef78f22ce4df4757472c5dbd33c430c5b659 Author: Leo Liu Date: Mon Jan 16 09:55:57 2023 -0500 drm/amdgpu: Use the sched from entity for amdgpu_cs trace The problem is that base sched hasn't been assigned yet at this moment, causing something like "ring=0" all the time from trace. mpv:cs0-3473 [002] ..... 129.047431: amdgpu_cs: ring=0, dw=48, fences=0 mpv:cs0-3473 [002] ..... 129.089125: amdgpu_cs: ring=0, dw=48, fences=0 mpv:cs0-3473 [002] ..... 129.130987: amdgpu_cs: ring=0, dw=48, fences=0 mpv:cs0-3473 [002] ..... 129.172478: amdgpu_cs: ring=0, dw=48, fences=0 Fixes: 4624459c84d7 ("drm/amdgpu: add gang submit frontend v6") Signed-off-by: Leo Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 442d61af795c1441614064d8e6f2309223a8b342 Author: Stanley.Yang Date: Mon Jan 16 15:42:36 2023 +0800 drm/amdgpu: correct query xgmi3x16 pcs error status There is xgmi3x16 pcs error status for aldebaran, driver should check xgmi3x16 pcs error status field instead of gopx16 pcs error status field. Signed-off-by: Stanley.Yang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 828fc79dcfa16340340382d888c03c7ea6a8c33e Author: Stanley.Yang Date: Thu Jan 12 14:27:26 2023 +0800 drm/amdgpu: support check xgmi/walf error mask bit for aldebaran The pcs error count should be determined by PCS ERROR status and PCS ERROR MASK registers, only PCS ERROR status register can not refect error counts accurately. Changed from V1: remove clean noncorrectable mask registers optimize query pcs error status Changed from V2: remove check mask_value bits correct set value corresponding bit Signed-off-by: Stanley.Yang Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 1427a720273976a81d13d9d9fa60d53ce881cbd7 Author: Christian König Date: Thu Jan 12 14:46:00 2023 +0100 drm/amdgpu: fix amdgpu_job_free_resources v2 It can be that neither fence were initialized when we run out of UVD streams for example. v2: fix typo breaking compile Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2324 Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4da9932efe84c0cce852c91346d659ed36adacb1 Author: YiPeng Chai Date: Wed Jan 11 10:40:14 2023 +0800 drm/amdgpu: Optimize gfx ras block initialization code for gfx v9_0 Use gfx ras common initialization interface to initialize gfx ras block. V2: Update function call due to amdgpu_gfx_ras_sw_init interface changes. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 53a17b6b75eb87a0792e1ef7f5c45e8909585451 Author: Thomas Zimmermann Date: Mon Jan 16 14:12:14 2023 +0100 drm/amdgpu: Fix coding style Align a closing brace and remove trailing whitespaces. No functional changes. Signed-off-by: Thomas Zimmermann Signed-off-by: Alex Deucher commit 1def6539028ce6ff7f222730b6bd748391be555c Author: Joshua Ashton Date: Tue Jan 10 22:50:42 2023 +0000 drm/amd/display: Fix COLOR_SPACE_YCBCR2020_TYPE matrix The YCC conversion matrix for RGB -> COLOR_SPACE_YCBCR2020_TYPE is missing the values for the fourth column of the matrix. The fourth column of the matrix is essentially just a value that is added given that the color is 3 components in size. These values are needed to bias the chroma from the [-1, 1] -> [0, 1] range. This fixes color being very green when using Gamescope HDR on HDMI output which prefers YCC 4:4:4. Fixes: 40df2f809e8f ("drm/amd/display: color space ycbcr709 support") Reviewed-by: Melissa Wen Signed-off-by: Joshua Ashton Signed-off-by: Alex Deucher commit 766f179238639bb0fa8b4fd35c25b352e475363a Author: Joshua Ashton Date: Tue Jan 10 20:12:21 2023 +0000 drm/amd/display: Calculate output_color_space after pixel encoding adjustment Code in get_output_color_space depends on knowing the pixel encoding to determine whether to pick between eg. COLOR_SPACE_SRGB or COLOR_SPACE_YCBCR709 for transparent RGB -> YCbCr 4:4:4 in the driver. v2: Fixed patch being accidentally based on a personal feature branch, oops! Fixes: ea117312ea9f ("drm/amd/display: Reduce HDMI pixel encoding if max clock is exceeded") Reviewed-by: Melissa Wen Signed-off-by: Joshua Ashton Signed-off-by: Alex Deucher commit df86a0c20648298bb4517ba34c677e0499e7db4f Author: Deepak R Varma Date: Sun Jan 15 14:56:14 2023 +0530 drm/amd/display: use swap() helper macro in bios_parser Use swap() helper macro instead of open coded swap instructions. The change also facilitates code cleanup and realignment for improved readability. Issue identified using swap.cocci Coccinelle semantic patch script. Signed-off-by: Deepak R Varma Signed-off-by: Alex Deucher commit e5975d7816a7a7e2273a3fab755a17acde1e7769 Author: Deepak R Varma Date: Sun Jan 15 12:47:37 2023 +0530 drm/amd/pm/powerplay/smumgr/ci: use bitwise or for bitmasks addition For bit mask addition, it is recommended to use or operator "|" instead of numerical addition as the former is quicker and cleaner. Change suggested by orplus.cocci Coccinelle semantic patch. Reviewed-by: Evan Quan Signed-off-by: Deepak R Varma Signed-off-by: Alex Deucher commit d3d3b8945128e8522e5ece44524e88e870b22f79 Author: Deepak R Varma Date: Sun Jan 15 12:47:11 2023 +0530 drm/amd/pm/powerplay/hwmgr: use bitwise or for bitmasks addition For bit mask addition, it is recommended to use or operator "|" instead of numerical addition as the former is quicker and cleaner. Change suggested by orplus.cocci Coccinelle semantic patch. Reviewed-by: Evan Quan Signed-off-by: Deepak R Varma Signed-off-by: Alex Deucher commit 4e1855026685a12331cfca3b5002a8133dc82a45 Author: Deepak R Varma Date: Sun Jan 15 12:46:43 2023 +0530 drm/amd/pm/powerplay/smumgr: use bitwise or for addition For bit mask addition, it is recommended to use or operator "|" instead of numerical addition as the former is quicker and cleaner. Change suggested by orplus.cocci Coccinelle semantic patch. Reviewed-by: Evan Quan Signed-off-by: Deepak R Varma Signed-off-by: Alex Deucher commit 29f5be8dcc73c19de9a27ff21f044c4d7942abe6 Author: Alex Deucher Date: Thu Jan 12 11:18:52 2023 -0500 drm/amdgpu/pm: update hwmon power documentation Power reporting is socket power. On APUs this includes the CPU. Update the documentation to clarify this. Reviewed-by: Aaron Liu Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 24294e7b15c003a42b38b677ad3b9c11a9d87061 Author: Philip Yang Date: Thu Jan 12 14:08:36 2023 -0500 drm/amdkfd: Support process XNACK mode dynamic change Update queue qpd is done for the first queue creation of the process, if the device support XNACK mode per process, update qpd setup sh_mem_config based on the process XNACK mode, to support the process destroy all queues, change XNACK mode, and then create queues. Add helper macro KFD_SUPPORT_XNACK_PER_PROCESS to remove duplicate code and add new ASICs support in future. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit ced6950276d21c6b68541dc627cae1488144f5a1 Author: Mario Limonciello Date: Sun Jan 15 13:05:31 2023 -0600 drm/amd: Evaluate early init for all IP blocks even if one fails If early init fails for a single IP block, then no further IP blocks are evaluated. This means that if a user was missing more than one firmware binary they would have to keep adding binaries and re-probing until they discovered the ones missing. To make this easier, run early init for each IP block and report a single failure if not all passed. Reviewed-by: Aaron Liu Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit bda88a26f578520e081d532b5773a1a9c2c421eb Author: Mario Limonciello Date: Sun Jan 15 13:01:56 2023 -0600 drm/amd: Remove needless break for legacy IP discovery MP0 9.0.0 There is already a "default" case in the switch block, so there is no need to have a break after the switch block. Reviewed-by: Aaron Liu Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 4d3d5e6c078fe9234a814dfd643d6298542abb1b Author: Christian König Date: Fri Jan 13 17:32:45 2023 +0100 drm/amdgpu: fix cleaning up reserved VMID on release We need to reset this or otherwise run into list corruption later on. Fixes: e44a0fe630c5 ("drm/amdgpu: rework reserved VMID handling") Signed-off-by: Christian König Reviewed-by: Alex Deucher Tested-by: Candice Li Signed-off-by: Alex Deucher commit 8f453c51cfae92fded6e232985f6943c51b7829c Author: YiPeng Chai Date: Fri Jan 6 20:16:53 2023 +0800 drm/amdgpu: Adjust ras support check condition for special asic [Why]: Amdgpu ras uses amdgpu_ras_is_supported to check whether the ras block supports the ras function. amdgpu_ras_is_supported uses .ras_enabled to determine whether the ras function of the block is enabled. But for special asic with mem ecc enabled but sram ecc not enabled, some ras blocks support poison mode but their ras function is not enabled on .ras_enabled, these ras blocks will run abnormally. [How]: If the ras block is not supported on .ras_enabled but the asic supports poison mode and the ras block has ras configuration, it can be considered that the ras block supports ras function. Signed-off-by: YiPeng Chai Reviewed-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 8c305a3fdf9b10e3ad773d843306eae2f7b76473 Author: YiPeng Chai Date: Fri Jan 6 20:54:05 2023 +0800 drm/amdgpu: Remove unnecessary ras block support check [Why]: For special asic with mem ecc enabled but sram ecc not enabled, some ras blocks can register their ras configuration to ras list, but these ras blocks are not enabled on .ras_enabled, so it can not get ras block object using amdgpu_ras_get_ras_block. [How]: Remove ras block support check. Even if the ras block checked is not in the ras list, it will return a null pointer and will have no effect. Signed-off-by: YiPeng Chai Reviewed-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit ac7b25d92c6f967217c92a401734bf041187996f Author: YiPeng Chai Date: Wed Jan 4 13:13:21 2023 +0800 drm/amdgpu: Perform gpu reset after gfx finishes processing ras poison consumption on gfx_v11_0_3 Perform gpu reset after gfx finishes processing ras poison consumption on gfx_v11_0_3. V2: Move gfx poison consumption handler from hw_ops to ip function level. V3: Adjust the calling position of amdgpu_gfx_poison_consumation_handler. V4: Since gfx v11_0_3 does not have .hw_ops instance, the .hw_ops null pointer check in amdgpu_ras_interrupt_poison_consumption_handler needs to be adjusted. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 790bef488b4ac4ceb52f5cda2a67c0d9bbb56d8c Author: YiPeng Chai Date: Thu Jan 12 10:43:47 2023 +0800 drm/amdgpu: Add gfx cp ecc error irq handling on gfx v11_0_3 V2: Optimize gfx_v11_0_set_cp_ecc_error_state function. V3: Define macro constant for me pipe instance address interval. V5: Register and handle gfx cp ecc error irq on gfx v11_0_3. V6: Remove invalid intermediate function call. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit ae6f2db4d59e9f8c90cb3c2d2a954832898d0f2b Author: YiPeng Chai Date: Thu Jan 5 14:53:59 2023 +0800 drm/amdgpu: Add gfx ras poison consumption irq handling on gfx v11_0_3 Add gfx ras poison consumption irq handling on gfx v11_0_3. V2: Move ras poison consumption irq handling code of gfx v11_0_3 to gfx_v11_0_3.c. V5: Create dedicated irq handler for RLC_GC_FED_INTERRUPT. V6: Remove invalid function call. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 79d949a2d688b09b1ff840a2366a8cfe1b7a2651 Author: YiPeng Chai Date: Thu Jan 5 14:52:51 2023 +0800 amd/amdgpu: Add RLC_RLCS_FED_STATUS_* to gc v11_0_3 ip headers V2: Add RLC_RLCS_FED_STATUS_0 and RLC_RLCS_FED_STATUS_1 register offset and shift masks. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 89e4c448817835700de108edcb11f26a88414986 Author: YiPeng Chai Date: Wed Nov 2 14:07:35 2022 +0800 drm/amdgpu: Add gfx ras function on gfx v11_0_3 Add gfx ras function on gfx v11_0_3. V2: 1. Add separate source files for gfx v11_0_3. 2. Create a common function to initialize gfx ras block. V3: 1. Rename amdgpu_gfx_ras_block_init to amdgpu_gfx_ras_sw_init. 2. Adjust the calling position of amdgpu_gfx_ras_sw_init. 3. Remove gfx_v11_0_3_ras_ops. V4: Revert changes in amdgpu_ras_interrupt_poison_consumption_handler. V5: 1. Remove invalid include file in gfx_v11_0_3.c. 2. Reduce the number of parameters of amdgpu_gfx_ras_sw_init. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 0604897bc6a8afd04494be6f50e87ee61d12509c Author: Mario Limonciello Date: Fri Jan 13 21:01:48 2023 -0600 drm/amd: Fix renoir/green sardine MP0 IP version detection The existing codebase never had a case for detecting MP0 version on Renoir and instead relied upon hardcoded chip name. This was missed as part of the changes to migrate all IP blocks to build filenames from `amdgpu_ucode.c`. Consequently, Renoir tries to fetch a binary with 11_0_3 in the filename and since it's supposed to have "renoir" in the filename fails to probe. The fbdev still works though so the series worked. Add a case for Renoir into the legacy table to ensure the right ASD and TA firmware load again. Reported-by: Ekene Akuneme Reported-by: Nicholas Choi Cc: Alex Hung Fixes: 994a97447e38 ("drm/amd: Parse both v1 and v2 TA microcode headers using same function") Fixes: 54a3e032340e ("drm/amd: Add a legacy mapping to "amdgpu_ucode_ip_version_decode"") Signed-off-by: Mario Limonciello Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 016cbbd2ba555a417a1374f78fe36e60827dfdb9 Author: Christophe JAILLET Date: Sat Jan 14 14:26:15 2023 +0100 KVM: arm64: vgic-v3: Use kstrtobool() instead of strtobool() strtobool() is the same as kstrtobool(). However, the latter is more used within the kernel. In order to remove strtobool() and slightly simplify kstrtox.h, switch to the other function name. While at it, include the corresponding header file () Signed-off-by: Christophe JAILLET Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/f546e636c6d2bbcc0d8c4191ab98ce892fce4584.1673702763.git.christophe.jaillet@wanadoo.fr Signed-off-by: Oliver Upton commit 7e38085d9c59b6d07c1986ea43d046d457dcf646 Author: Conor Dooley Date: Fri Jan 13 20:54:35 2023 +0000 dt-bindings: riscv: add SBI PMU event mappings The SBI PMU extension requires a firmware to be aware of the event to counter/mhpmevent mappings supported by the hardware. OpenSBI may use DeviceTree to describe the PMU mappings. This binding is currently described in markdown in OpenSBI (since v1.0 in Dec 2021) & used by QEMU since v7.2.0. Import the binding for use while validating dtb dumps from QEMU and upcoming hardware (eg JH7110 SoC) that will make use of the event mapping. Link: https://github.com/riscv-software-src/opensbi/blob/master/docs/pmu_support.md Link: https://github.com/riscv-non-isa/riscv-sbi-doc/blob/master/riscv-sbi.adoc # Performance Monitoring Unit Extension Co-developed-by: Atish Patra Signed-off-by: Atish Patra Reviewed-by: Andrew Jones Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20230113205435.122712-1-conor@kernel.org Signed-off-by: Rob Herring commit fe7ce2983ba56ff482b5f275e72fb9af447fa2c8 Author: Krzysztof Kozlowski Date: Fri Jan 13 15:49:50 2023 +0100 dt-bindindgs: i2c: qcom,i2c-geni: document operating-points-v2 Just like other Geni serial interfaces (qcom,geni-spi and qcom,geni-uart), the Geni I2C Controller comes with OPP table: sdm845-sony-xperia-tama-apollo.dtb: i2c@894000: Unevaluated properties are not allowed ('operating-points-v2' was unexpected) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230113144950.78246-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit 37483c2623650aad72619718a641b260ecfddb8b Author: Krzysztof Kozlowski Date: Sat Dec 24 16:41:52 2022 +0100 dt-bindings: clock: qcom,videocc: correct clocks per variant Different SoCs come with a bit different clock inputs: sm8250-mtp.dtb: clock-controller@abf0000: clock-names:0: 'bi_tcxo' was expected sm8250-mtp.dtb: clock-controller@abf0000: clock-names: ['iface', 'bi_tcxo', 'bi_tcxo_ao'] is too long Signed-off-by: Krzysztof Kozlowski Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20221224154152.43272-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit 323b8d0ddb92b189ed7561e8095a9aa43968d519 Author: Etienne Carriere Date: Mon Sep 5 16:55:55 2022 +0200 dt-binding: gpio: publish binding IDs under dual license Changes gpio.h DT binding header file to be published under GPLv2 or BSD-2-Clause license terms. This change allows this GPIO generic bindings header file to be used in software components as bootloaders and OSes that are not published under GPLv2 terms. All contributors to gpio.h file in copy. Cc: Stephen Warren Cc: Linus Walleij Cc: Laxman Dewangan Cc: Andrew Jeffery Cc: Thomas Petazzoni Cc: Nuno Sá Signed-off-by: Etienne Carriere Acked-by: Nuno Sá Acked-by: Andrew Jeffery Reviewed-by: Linus Walleij Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220905145555.674800-1-etienne.carriere@linaro.org Signed-off-by: Rob Herring commit 73b1a771f021fbf658b73babb18b5a97e6f8489a Author: Aric Cyr Date: Tue Jan 3 10:23:28 2023 -0500 drm/amd/display: 3.2.218 This version brings along following fixes: - Revert patches that caused regressions associated with audio and an old change that checks the DCN version. - Refactor DDC and HDP. - Move DPIA and DPCD logic to new files. - Updates to DMUB. - Optimization and bug fixes for SUBVP/DRR. - Drop legacy code. Tested-by: Daniel Wheeler Reviewed-by: Rodrigo Siqueira Signed-off-by: Aric Cyr Signed-off-by: Alex Deucher commit fb9bda6d26f21c417f9e5da768775ed8a855d56f Author: hersen wu Date: Fri Dec 23 10:01:12 2022 -0500 drm/amd/display: hdcp not enabled on connector 0 [Why] incorrect skip when drm_connector.index = 0 within event_property_validate and update [How] handle hdcp validate and update for connector 0 Tested-by: Daniel Wheeler Reviewed-by: Bhawanpreet Lakha Acked-by: Rodrigo Siqueira Signed-off-by: hersen wu Signed-off-by: Alex Deucher commit aa9fdd5d5add50305d2022fa072fe6f189283415 Author: hersen wu Date: Mon Nov 14 14:29:56 2022 -0500 drm/amd/display: phase2 enable mst hdcp multiple displays [why] For MST topology with 1 physical link and multiple connectors (>=2), e.g. daisy cahined MST + SST, or 1-to-multi MST hub, if userspace set to enable the HDCP simultaneously on all connected outputs, the commit tail iteratively call the hdcp_update_display() for each display (connector). However, the hdcp workqueue data structure for each link has only one DM connector and encryption status members, which means the work queue of property_validate/update() would only be triggered for the last connector within this physical link, and therefore the HDCP property value of other connectors would stay on DESIRED instead of switching to ENABLED, which is NOT as expected. [how] Use array of AMDGPU_DM_MAX_DISPLAY_INDEX for both aconnector and encryption status in hdcp workqueue data structure for each physical link. For property validate/update work queue, we iterates over the array and do similar operation/check for each connected display. Tested-by: Daniel Wheeler Signed-off-by: hersen wu Signed-off-by: Alex Deucher commit e36193123f3f5e4ac837f32daa78125d8e9d749b Author: Dillon Varone Date: Wed Dec 21 20:28:56 2022 -0500 drm/amd/display: Account for MPO planes in dcn32 mall alloc calculations [WHY?] Cannot only consider the MALL required from top pipes because of the MPO case. [HOW?] Only count a pipe if it fits the following criteria: 1) does not have a top pipe (is the topmost pipe for that plane) 2) it does have a top pipe, but that pipe is associated with a different plane Tested-by: Daniel Wheeler Reviewed-by: Nevenko Stupar Acked-by: Rodrigo Siqueira Signed-off-by: Dillon Varone Signed-off-by: Alex Deucher commit 2ebd1036209c2e7b61e6bc6e5bee4b67c1684ac6 Author: Alvin Lee Date: Wed Dec 14 10:12:55 2022 -0500 drm/amd/display: Allow subvp on vactive pipes that are 2560x1440@60 Enable subvp on specifically 1440p@60hz displays even though it can switch in vactive. Tested-by: Daniel Wheeler Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher commit 58330ef165c7c470be1cce6457fdf20df0faa960 Author: Alvin Lee Date: Wed Dec 14 15:43:55 2022 -0500 drm/amd/display: Request min clocks after disabling pipes on init [Description] - Request min clocks after disabling pipes on init - This optimizes for power savings during init sequence - Also handles the case where we boot up with no display connected Tested-by: Daniel Wheeler Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher commit 9190d4a263264eabf715f5fc1827da45e3fdc247 Author: Brandon Syu Date: Thu Dec 22 16:43:37 2022 +0800 drm/amd/display: fix mapping to non-allocated address [Why] There is an issue mapping non-allocated location of memory. It would allocate gpio registers from an array out of bounds. [How] Patch correct numbers of bounds for using. Tested-by: Daniel Wheeler Reviewed-by: Martin Leung Acked-by: Rodrigo Siqueira Signed-off-by: Brandon Syu Signed-off-by: Alex Deucher commit d03de4179540e9cee6e3f664e1b65178f07bb612 Author: Bryan O'Donoghue Date: Tue Jan 17 02:48:42 2023 +0000 clk: qcom: smd-rpm: msm8936: Add PMIC gated RPM_SMD_XO_* The XO crystal input is buffered through the PMIC and controlled by RPM. Create the relevant clock gate representation in the RPM clock definitions. Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117024846.1367794-5-bryan.odonoghue@linaro.org commit e0886e1fa53d0c705ff14df14769ddcc6e0a20ca Author: Tony Tascioglu Date: Mon Dec 12 10:20:33 2022 -0500 drm/amd/display: Skip backlight control delay on external powered links [Why] When an eDP panel is powered externally from a different GPU, we can avoid waiting for hardware sequencing delays when switching the backlight on/off as the display backlight is no longer powered by the original source. [How] This commit extends the 'link_powered_externally' variable to allow bypassing hardware delays for additional backlight commands and force the backlight on/off when a link is powered by another GPU. Tested-by: Daniel Wheeler Reviewed-by: Felipe Clark Acked-by: Rodrigo Siqueira Signed-off-by: Tony Tascioglu Signed-off-by: Alex Deucher commit c525e181fda7f18b694dffb0f22686a4cb407cee Author: Bryan O'Donoghue Date: Tue Jan 17 02:48:40 2023 +0000 dt-bindings: soc: qcom: smd-rpm: Exclude MSM8936 from glink-channels MSM8936/MSM8939 should like MSM8916 not require glink-channels. Reviewed-by: Krzysztof Kozlowski Acked-by: Krzysztof Kozlowski Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117024846.1367794-3-bryan.odonoghue@linaro.org commit 40774ad1c460ada855068f67da549f78ecb136e8 Author: Charlene Liu Date: Tue Dec 20 19:46:45 2022 -0500 drm/amd/display: contional remove disable dig_fifo when blank keep dig_fifo enable for test pattern generation. Tested-by: Daniel Wheeler Reviewed-by: Chris Park Acked-by: Rodrigo Siqueira Signed-off-by: Charlene Liu Signed-off-by: Alex Deucher commit d3e2262cd0d1105bb3a71012693876d01e8de203 Author: Bryan O'Donoghue Date: Tue Jan 17 02:48:39 2023 +0000 dt-bindings: arm: qcom: Document MSM8939 SoC binding Document the MSM8939 and supported boards in upstream Sony "Tulip" M4 Aqua and Square APQ8039 T2. MSM8939 is one of the older SoCs so we need to expand the list of qcom,board-ids to allow for the bootloader DTS board-id matching dependency. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117024846.1367794-2-bryan.odonoghue@linaro.org commit fc41c734115e9569902d71dfab61bd3f41b68bb8 Author: Dillon Varone Date: Tue Dec 20 15:45:48 2022 -0500 drm/amd/display: Remove DISPCLK dentist programming for dcn32 [WHY?] For dcn32, SMU handles DISPCLK dentist programming. [HOW?] Only use calls to SMU to set DISPCLK. Tested-by: Daniel Wheeler Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Dillon Varone Signed-off-by: Alex Deucher commit b5c397c83780db327301c69f1e824386ad7a43a0 Author: Saaem Rizvi Date: Thu Dec 15 10:38:16 2022 -0500 drm/amd/display: Add extra mblk for DCC [Why] DCC meta was found to be detached from usable pixel data. Due to this DCC meta and the end of the fetched part of the frame will be on not be on the same mblk. Furthermore if the meta is not aligned to the mblk size, then we require an extra mblk in MALL to account for this. [How] Always add an additional mblk when DCC is enabled for detachment and misalignment. Tested-by: Daniel Wheeler Reviewed-by: Dillon Varone Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Saaem Rizvi Signed-off-by: Alex Deucher commit 689008e11fcbc0762f4c2eff97db8f4518451474 Author: Dillon Varone Date: Tue Dec 20 14:18:01 2022 -0500 drm/amd/display: set active bit for desktop with VSDBv3 When using freesync on desktop, need to set freesync active bit for AMD VSDBv3 infopacket. Tested-by: Daniel Wheeler Reviewed-by: Martin Leung Acked-by: Rodrigo Siqueira Signed-off-by: Dillon Varone Signed-off-by: Alex Deucher commit 2eb82aaa587c4bb0377985fb1c620e1bb55252a7 Author: Rodrigo Siqueira Date: Tue Jan 3 16:13:14 2023 -0500 drm/amd/display: Remove unused code Remove some code that is never used from freesync file. Tested-by: Daniel Wheeler Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 3351ce5d8cad587b37a2289ce96153e3873110fb Author: Tony Tascioglu Date: Fri Nov 25 17:31:44 2022 -0500 drm/amd/display: Optimize link power-down when link powered externally [Why] When an eDP panel is powered externally by a different GPU, we don't need to wait for hardware sequencing delays when powering down a link, as the display is not dependent on the GPU being powered down. [How] This commit adds a variable 'link_powered_externally' to indicate when a link is being powered by another GPU. Tested-by: Daniel Wheeler Reviewed-by: Felipe Clark Acked-by: Rodrigo Siqueira Signed-off-by: Tony Tascioglu Signed-off-by: Alex Deucher commit 762e8febab9db16fb7b3bc7f07fe27f6f544325a Author: Aurabindo Pillai Date: Thu Dec 15 17:07:55 2022 -0500 drm/amd/display: fix an error check condition for synced pipes Checking for disabled master pipe on a timing synchronized pipe is incorrect in the case of ODM combine. This case is acceptable as long as the disabled master pipe is part of the ODM tree. Skip printing error message if this condition holds true. Tested-by: Daniel Wheeler Reviewed-by: Dillon Varone Acked-by: Rodrigo Siqueira Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit c326e851eed4e3ab1cc18deffb6505ce34560ba5 Author: Yunlong Jia Date: Tue Jan 17 08:56:25 2023 +0000 arm64: dts: qcom: sc7180: set ath10k output power calibration string Add the string to load RF output power table for pazquel360 project. Signed-off-by: Yunlong Jia Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117085212.1.If242b1cd61b2e87e312dd9cf81e20301bae2a5a4@changeid commit 21f6be48f813fa3d7f4557d1c190ba9d51e90f80 Author: Aurabindo Pillai Date: Thu Dec 15 17:02:14 2022 -0500 Revert "drm/amd/display: Demote Error Level When ODM Transition Supported" This reverts commit e81b6a4427f3ca37859f5b9fdb6a66683bb84e2e. Reverting to put in a better solution which does not involve checking DCN version. Tested-by: Daniel Wheeler Reviewed-by: Dillon Varone Acked-by: Rodrigo Siqueira Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit d5a43956b73bd7835ea8a6ab1516ccdb853c2d34 Author: Wenjing Liu Date: Thu Dec 15 17:28:28 2022 -0500 drm/amd/display: move dp capability related logic to link_dp_capability Tested-by: Daniel Wheeler Reviewed-by: Wesley Chalmers Acked-by: Rodrigo Siqueira Signed-off-by: Wenjing Liu Signed-off-by: Alex Deucher commit 94dfeaa46925bb6b4d43645bbb6234e846dec257 Author: Wenjing Liu Date: Thu Dec 15 14:24:56 2022 -0500 drm/amd/display: move dp phy related logic to link_dp_phy Tested-by: Daniel Wheeler Reviewed-by: Wesley Chalmers Acked-by: Rodrigo Siqueira Signed-off-by: Wenjing Liu Signed-off-by: Alex Deucher commit 630168a97314a8f6da9c09d73f5e78c3c1fe3eee Author: Wenjing Liu Date: Wed Dec 14 14:26:46 2022 -0500 drm/amd/display: move dp link training logic to link_dp_training [why] Extract dp link training logic out to their own files. link_dp_training - high level training sequence and helper functions. link_dp_training_8b_10b - dp1.x training link_dp_training_auxless - aux-less training link_dp_traininig_dpia - dpia training link_dp_training_fixed_vs_pe_retimer - fixed vs pe retimer training link_dp_training_128b_132b - dp2.1 training Tested-by: Daniel Wheeler Reviewed-by: Wesley Chalmers Acked-by: Rodrigo Siqueira Signed-off-by: Wenjing Liu Signed-off-by: Alex Deucher commit 899dd5b8359da7a16168a14fab362f970d6e6793 Author: Saaem Rizvi Date: Thu Dec 15 16:38:08 2022 -0500 drm/amd/display: Remove SubVp support if src/dst rect does not equal stream timing Current implementation of SubVP does not support cases where stream timing matched neither the destination rect nor the source rect. Will need to further debug to see how we can support these cases. Tested-by: Daniel Wheeler Reviewed-by: Alvin Lee Acked-by: Rodrigo Siqueira Signed-off-by: Saaem Rizvi Signed-off-by: Alex Deucher commit 27fc64764e291bff1a73d212f22f47ec06b78530 Author: Bhawanpreet Lakha Date: Tue Oct 11 10:08:14 2022 -0400 drm/amd/display: Change i2c speed for hdcp [why] HDCP 1.4 failed on SL8800 SW w/a test driver use. [how] slower down the HW i2c speed when used by HW i2c. Tested-by: Daniel Wheeler Reviewed-by: Aurabindo Pillai Reviewed-by: Rodrigo Siqueira Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 3c0775678fa42cc67007025bf93830affbfa3c85 Author: Dillon Varone Date: Thu Dec 8 16:31:20 2022 -0500 drm/amd/display: cleanup function args in dml Remove array size on array passed to CalculateDETSwathFillLatencyHiding. Tested-by: Daniel Wheeler Reviewed-by: Alvin Lee Acked-by: Rodrigo Siqueira Signed-off-by: Dillon Varone Signed-off-by: Alex Deucher commit 238debcaebe44704887d403157a4d0bd6181fdd9 Author: Dillon Varone Date: Thu Dec 8 16:16:46 2022 -0500 drm/amd/display: Use DML for MALL SS and Subvp allocation calculations MALL SS and Subvp use the same calculations for determining the size of the required allocation for a given surface, which is already done in DML. Add an interface to extract this information from VBA variables and use in their respective helper functions. Also refactor existing code to remove stale workarounds. Tested-by: Daniel Wheeler Reviewed-by: Alvin Lee Acked-by: Rodrigo Siqueira Signed-off-by: Dillon Varone Signed-off-by: Alex Deucher commit a21005e4d2026ea6541f438e8d086a33b55c74df Author: Dillon Varone Date: Thu Dec 8 13:55:13 2022 -0500 drm/amd/display: Account for Subvp Phantoms in DML MALL surface calculations DML does not explicitly consider support for space in MALL required for subvp phantom pipes. This adds a check to make sure portion of phantom surface can fit in MALL. Tested-by: Daniel Wheeler Reviewed-by: Alvin Lee Acked-by: Rodrigo Siqueira Signed-off-by: Dillon Varone Signed-off-by: Alex Deucher commit 95c454ca923bf6752180398eb4e4b86ea7be3641 Author: Dillon Varone Date: Thu Dec 8 13:46:47 2022 -0500 drm/amd/display: Account for DCC Meta pitch in DML MALL surface calculations DML incorrectly uses surface width for determining DCC meta size in MALL allocation calculations. Meta pitch should be used instead. Tested-by: Daniel Wheeler Reviewed-by: Alvin Lee Acked-by: Rodrigo Siqueira Signed-off-by: Dillon Varone Signed-off-by: Alex Deucher commit 59b7e458edde16d03b2c131e76121f261509dcc2 Author: Dillon Varone Date: Fri Dec 9 17:59:21 2022 -0500 drm/amd/display: Optimize subvp and drr validation Two issues existed: 1) Configs that support DRR, but have it disabled will fail subvp+vblank validation incorrectly. Use subvp+vblank path for this case. 2) Configs that support DRR and have it enabled can use higher voltage level than required if they also support subvp+vblank. Use lowest supported voltage level for this case. Tested-by: Daniel Wheeler Reviewed-by: Alvin Lee Acked-by: Rodrigo Siqueira Signed-off-by: Dillon Varone Signed-off-by: Alex Deucher commit 1aa3f2b02fcd3817a0b1caa0a4654e40433a33be Author: Randy Dunlap Date: Thu Jan 12 22:39:37 2023 -0800 misc: pci_endpoint_test: Drop initial kernel-doc marker This beginning comment is not kernel-doc, so change the "/**" to a normal "/*" comment to prevent a kernel-doc warning: drivers/misc/pci_endpoint_test.c:3: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Link: https://lore.kernel.org/r/20230113063937.20912-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Signed-off-by: Bjorn Helgaas Cc: Lorenzo Pieralisi Cc: Krzysztof Wilczyński Cc: Manivannan Sadhasivam Cc: Kishon Vijay Abraham I Cc: linux-pci@vger.kernel.org Cc: Arnd Bergmann Cc: Greg Kroah-Hartman commit 19d88e1df06c9c27b4a2ec59b36865892c624ef7 Author: Dan Carpenter Date: Fri Jan 13 13:07:42 2023 +0300 drm/amdgpu: Add a missing tab This tab was deleted accidentally and triggers a Smatch warning: drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c:1006 gfx_v8_0_init_microcode() warn: inconsistent indenting Add it back. Fixes: 0aaafb7359d2 ("drm/amd: Use `amdgpu_ucode_*` helpers for GFX8") Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher commit 4193769b6dfd7ddc5ec5e2ccae6458f4ba65797f Author: Michael Straube Date: Sun Jan 15 22:07:34 2023 +0100 staging: r8188eu: convert PHY_BBConfig8188E() to common error logic Convert the function PHY_BBConfig8188E() away from returning _FAIL or _SUCCESS which uses inverted error logic. Use the common error logic instead. Return 0 for success and negative values for failure. Signed-off-by: Michael Straube Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230115210734.18610-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit c58bc596a85cd3806ee5e10483e5f0981bb64e43 Author: Michael Straube Date: Sun Jan 15 22:07:33 2023 +0100 staging: r8188eu: convert phy_BB8188E_Config_ParaFile() to common error logic Convert the fubction phy_BB8188E_Config_ParaFile() away from returning _FAIL or _SUCCESS which uses inverted error logic. Use the common error logic instead. Return 0 for success and negative values for failure. Signed-off-by: Michael Straube Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230115210734.18610-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8ece288b16f72508a664c3fe234b7e4208d06660 Author: Michael Straube Date: Sun Jan 15 22:07:32 2023 +0100 staging: r8188eu: convert phy_RF6052_Config_ParaFile() to common error logic Convert the function phy_RF6052_Config_ParaFile() away from returning _FAIL or _SUCCESS which uses inverted error logic. Use the common error logic instead. Return 0 for success and negative values for failure. Signed-off-by: Michael Straube Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230115210734.18610-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6eacd2420a710b93ca45a001d5b7d7dc481e3078 Author: Michael Straube Date: Sun Jan 15 22:07:31 2023 +0100 staging: r8188eu: convert PHY_MACConfig8188E() to common error logic Convert the function PHY_MACConfig8188E() away from returning _FAIL or _SUCCESS which uses inverted error logic. Use the common error logic instead. Return 0 for success and negative values for failure. Signed-off-by: Michael Straube Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230115210734.18610-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0d4560530d0ec4094fa7c5ebbf123a8e15fdd554 Author: Martin Kaiser Date: Wed Jan 11 20:56:37 2023 +0100 staging: r8188eu: pass struct adapter to usb_read The usb_read function takes a struct intf_hdl only to extract the struct adapter from it. We can pass struct adapter directly. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-18-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 3f7d87d4ecd7b75482b381ab035e72757f899f6b Author: Martin Kaiser Date: Wed Jan 11 20:56:36 2023 +0100 staging: r8188eu: remove usb buffer macros Remove two unused macros that allocate and free usb buffers. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-17-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 944a7a7ab86aecf8f59be045f716dcdf3a273b1e Author: Martin Kaiser Date: Wed Jan 11 20:56:35 2023 +0100 staging: r8188eu: remove struct io_req struct io_req is not needed in the r8188eu driver. Remove it. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-16-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 9196c6c186f4fc669b72cf76858565e19a9e404a Author: Martin Kaiser Date: Wed Jan 11 20:56:34 2023 +0100 staging: r8188eu: remove IO defines Remove a couple of IO related defines which are not used in the r8188eu driver. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-15-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit e9d28e5d3ca389b44a5964c4f1c201b2ef8fdee3 Author: Martin Kaiser Date: Wed Jan 11 20:56:33 2023 +0100 staging: r8188eu: remove readmem and writemem prototypes Remove the prototypes for the unused _rtw_read_mem and _rtw_write_mem functions. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-14-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit b51ea4652119da5c363c390064b52fd8e1313323 Author: Martin Kaiser Date: Wed Jan 11 20:56:32 2023 +0100 staging: r8188eu: remove interface handler prototypes Remove prototypes for interface handler functions. They are not used by the r8188eu driver. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-13-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 144d2abcd1acce3c8d852d3b79d342fa3163281a Author: Martin Kaiser Date: Wed Jan 11 20:56:31 2023 +0100 staging: r8188eu: remove struct reg_protocol_wt Remove struct reg_protocol_wt. It's not used in the r8188eu driver. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-12-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 0fff48ebe392d73e5e11a825e85a8a677446233e Author: Martin Kaiser Date: Wed Jan 11 20:56:30 2023 +0100 staging: r8188eu: remove struct reg_protocol_rd Remove struct reg_protocol_rd. It's not used in the r8188eu driver. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-11-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 80235597699f53690bc8c1a9fa02be86d557fbe6 Author: Martin Kaiser Date: Wed Jan 11 20:56:29 2023 +0100 staging: r8188eu: remove dev_power_down function prototype The dev_power_down function is not present in the r8188eu driver. Remove its prototype. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 7c1d57a4cb9b94e505045eaa50e876a7b61e9860 Author: Martin Kaiser Date: Wed Jan 11 20:56:28 2023 +0100 staging: r8188eu: remove rtw_write_scsi function prototype The rtw_write_scsi function is not present in the r8188eu driver. Remove its prototype. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 6a7c91d459058f28ab9ca8b87d18244d459aa103 Author: Martin Kaiser Date: Wed Jan 11 20:56:27 2023 +0100 staging: r8188eu: remove attrib function prototypes Remove the prototypes for attrib read and write functions which are not present in the r8188eu driver. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit e9d8bca4dfa3f015fe5614da0e5806d4c82c5973 Author: Martin Kaiser Date: Wed Jan 11 20:56:26 2023 +0100 staging: r8188eu: remove struct io_queue struct io_queue is not used in the r8188eu driver. Remove it. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 8009bbba023c4c4e5ed39a726c75d0e8b87be521 Author: Martin Kaiser Date: Wed Jan 11 20:56:25 2023 +0100 staging: r8188eu: remove async write function prototypes Remove some prototypes for async write functions which are not present in the r8188eu driver. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit caf94fd29f34d59f66b7b97bf717e8dace00805b Author: Martin Kaiser Date: Wed Jan 11 20:56:24 2023 +0100 staging: r8188eu: remove async read function prototypes Remove some prototypes for async read functions which are not present in the r8188eu driver. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 6d09e47364336c7b08eebabc6f70aaf29a70fa5f Author: Martin Kaiser Date: Wed Jan 11 20:56:23 2023 +0100 staging: r8188eu: remove ioreq function prototypes Remove some prototypes for ioreq functions which are not present in the r8188eu driver. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit b0f6b1142a6efa55806256f0ec7925f074370c15 Author: Martin Kaiser Date: Wed Jan 11 20:56:22 2023 +0100 staging: r8188eu: remove io function prototypes Remove some prototypes for io functions which are not present in the r8188eu driver. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 99438dab153ab619473e61d004aa52568a8bdb12 Author: Martin Kaiser Date: Wed Jan 11 20:56:21 2023 +0100 staging: r8188eu: remove struct io_priv struct io_priv has only one member (and a pointer to the enclosing struct adapter). We can remove struct io_priv and move its member directly into struct adapter. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 664f99fd544ff4de42172ff826081a8d2e2eff34 Author: Martin Kaiser Date: Wed Jan 11 11:02:01 2023 +0100 staging: r8188eu: remove NULL check for usb_kill_urb usb_kill_urb handles a NULL parameter. There's no need for NULL checks before we call usb_kill_urb. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230111100201.251905-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit f4f52873a1a8b40dcfbae5fd8c35e74cc6f46ae9 Author: Martin Kaiser Date: Tue Jan 10 21:56:26 2023 +0100 staging: r8188eu: always process urb status Remove the if clause in usb_write_port_complete and process the urb status regardless of bSurpriseRemoved, bDriverStopped and bWritePortCancel. The only possible results of urb status processing are updates to bSurpriseRemoved and bDriverStopped. All of the three status variable are set to true only if the whole USB processing has to be stopped (when the driver is unloaded or when the system goes to sleep). It's no problem if one of the "stop everything" variables is already set and the urb status processing sets another one. This patch removes the last goto in usb_write_port_complete. It's also part of the ongoing effort to limit the use of the "stop everything" variables. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230110205626.183516-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 8db002ed48ae8d1821592f1c34d88a39294839b1 Author: Martin Kaiser Date: Tue Jan 10 21:56:25 2023 +0100 staging: r8188eu: remove unused function parameter The regs parameter of the usb_write_port_complete function is not used. We can remove it. We can also remove the macro to hide the regs parameter when usb_write_port_complete is used as callback function for an urb transfer. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230110205626.183516-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 7b42205e9d873babd9a29337db66045884677c9f Author: Martin Kaiser Date: Tue Jan 10 21:56:24 2023 +0100 staging: r8188eu: reformat usb_write_port_complete This trivial patch reformats the usb_write_port_complete function. Hopefully, this makes the code a bit easier to read. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230110205626.183516-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 47bdd807aee4c7e60ecf4e6bf5d324e0c5c57604 Author: Martin Kaiser Date: Tue Jan 10 21:56:23 2023 +0100 staging: r8188eu: refactor status handling in usb_write_port_complete Refactor the satus handling in usb_write_port_complete. Make it clearer what happens for each status and avoid all the goto statements. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230110205626.183516-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 001c773caf95a4e1c72a13d3f00b00f3638277ca Author: Martin Kaiser Date: Mon Jan 9 22:28:52 2023 +0100 staging: r8188eu: xmit_priv's vcs_setting is not used vcs_setting in struct xmit_priv is not used any more. We can remove it. Signed-off-by: Martin Kaiser Acked-by: Pavel Skripkin Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230109212852.75612-13-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit eb67bf265162d62f22efe3a90021fc43a3c8b13f Author: Martin Kaiser Date: Mon Jan 9 22:28:51 2023 +0100 staging: r8188eu: xmit_priv's vcs is not used The vcs component in struct xmit_priv is set but not used. We can remove vcs and the rtw_update_protection function, whose only job is to set vcs. Signed-off-by: Martin Kaiser Acked-by: Pavel Skripkin Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230109212852.75612-12-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 393669c761ebae0642917534fbc554a9891654fb Author: Martin Kaiser Date: Mon Jan 9 22:28:50 2023 +0100 staging: r8188eu: xmit_priv's vcs_type is not used The vcs_type component of struct xmit_priv is not used. Remove it. Signed-off-by: Martin Kaiser Acked-by: Pavel Skripkin Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230109212852.75612-11-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 851ae3c20867924b8a3e733e19eda006104a41ce Author: Martin Kaiser Date: Mon Jan 9 22:28:49 2023 +0100 staging: r8188eu: remove unused QSLT defines Remove unused defines for Queue Select Value in TxDesc. Signed-off-by: Martin Kaiser Acked-by: Pavel Skripkin Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230109212852.75612-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit fe86c3a10ccb81824ccc39c4e3cc88cdebd65c88 Author: Martin Kaiser Date: Mon Jan 9 22:28:48 2023 +0100 staging: r8188eu: txirp_cnt is write-only txirp_cnt in struct xmit_priv is initialised but never read. Remove it. Signed-off-by: Martin Kaiser Acked-by: Pavel Skripkin Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230109212852.75612-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 069e3f9441683996a802d49d6f29cf600c17116d Author: Martin Kaiser Date: Mon Jan 9 22:28:47 2023 +0100 staging: r8188eu: remove unused hal_xmit_handler define hal_xmit_handler is not used by the r8188eu driver. Remove it. Signed-off-by: Martin Kaiser Acked-by: Pavel Skripkin Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230109212852.75612-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit f2355ab5652198ab9c156bfebb6a95986bd099bf Author: Martin Kaiser Date: Mon Jan 9 22:28:46 2023 +0100 staging: r8188eu: dir_dev is unused dir_dev in struct adapter is not used by the r8188eu driver. It can be removed. Signed-off-by: Martin Kaiser Acked-by: Pavel Skripkin Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230109212852.75612-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 1511463d33b5f3022c5875a25156d666bf8920fe Author: Martin Kaiser Date: Mon Jan 9 22:28:45 2023 +0100 staging: r8188eu: replace switch with if The switch statement in usb_write_port_complete has only one single case. Replace it with an if statement. Signed-off-by: Martin Kaiser Acked-by: Pavel Skripkin Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230109212852.75612-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit e7b970cc375baf524744da2f0f59c85d8a4e88a1 Author: Martin Kaiser Date: Mon Jan 9 22:28:44 2023 +0100 staging: r8188eu: voq_cnt is write-only voq_cnt in struct xmit_priv is initialised, incremented and decremented but never read. Remove voq_cnt and resulting dead code. Signed-off-by: Martin Kaiser Acked-by: Pavel Skripkin Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230109212852.75612-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 763f3eff5ed3764f79fbefa4626468f8f1d617a1 Author: Martin Kaiser Date: Mon Jan 9 22:28:43 2023 +0100 staging: r8188eu: viq_cnt is write-only viq_cnt in struct xmit_priv is initialised, incremented and decremented but never read. Remove viq_cnt and resulting dead code. Signed-off-by: Martin Kaiser Acked-by: Pavel Skripkin Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230109212852.75612-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit b79601a0aa541862f2015f2727e12ed9ac82bbcb Author: Martin Kaiser Date: Mon Jan 9 22:28:42 2023 +0100 staging: r8188eu: bkq_cnt is write-only bkq_cnt in struct xmit_priv is initialised, incremented and decremented but never read. Remove bkq_cnt and resulting dead code. Signed-off-by: Martin Kaiser Acked-by: Pavel Skripkin Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230109212852.75612-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 2b9c7fbc1c0ff3318734e973d1a47d93ac596637 Author: Martin Kaiser Date: Mon Jan 9 22:28:41 2023 +0100 staging: r8188eu: beq_cnt is write-only beq_cnt in struct xmit_priv is initialised, incremented and decremented but never read. Remove beq_cnt and resulting dead code. Signed-off-by: Martin Kaiser Acked-by: Pavel Skripkin Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230109212852.75612-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 1d0d77f4ec011d0a05d5a2a1189f3d4d89e2b402 Author: Michael Straube Date: Sun Jan 8 13:38:04 2023 +0100 staging: r8188eu: convert rtw_writeN() to common error logic Convert the function rtw_writeN() away from returning _FAIL or _SUCCESS which uses inverted error logic. Use the common error logic instead. Return 0 for success and negative values for failure. Signed-off-by: Michael Straube Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20230108123804.3754-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5877852e9f959483202cb2a7d55e7f5f13b76208 Author: Martin Kaiser Date: Fri Dec 30 19:06:45 2022 +0100 staging: r8188eu: rtw_init_hwxmits is not needed The _rtw_init_xmit_priv function calls rtw_alloc_hwxmits to allocate memory for pxmitpriv->hwxmits (this is an array of struct hw_xmit). This allocation uses kzalloc, the allocated memory is initialised with 0. After the allocation, _rtw_init_xmit_priv calls rtw_init_hwxmits to set an element of each hw_xmit to 0. This is not necessary, we can remove the rtw_init_hwxmits call and the now unused function rtw_init_hwxmits. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-20-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 1b757dfdab91ea15d26ab89f01be4eb9ab9067a7 Author: Martin Kaiser Date: Fri Dec 30 19:06:44 2022 +0100 staging: r8188eu: phwxmit parameter is unused Remove the unused function parameter phwxmit from function dequeue_one_xmitframe. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-19-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 51cbbb0efe30d0313df66d98b264474a56caea66 Author: Martin Kaiser Date: Fri Dec 30 19:06:43 2022 +0100 staging: r8188eu: remove unnecessary rtw_free_xmitframe call There's no need to call rtw_free_xmitframe before we dequeue the first frame. pxmitframe is always NULL at this point, rtw_free_xmitframe will do nothing in this case. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-18-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 26cf6c2c22f0cc10eec468a1ef4f13644fdd480e Author: Martin Kaiser Date: Fri Dec 30 19:06:42 2022 +0100 staging: r8188eu: tx_retevt semaphore is not used Remove tx_retevt from struct xmit_priv. This semaphore is initialised but not used. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-17-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 38a9b8372e835f5bbe3b0c2253baee4b8a75e313 Author: Martin Kaiser Date: Fri Dec 30 19:06:41 2022 +0100 staging: r8188eu: terminate_xmitthread_sema is not used Remove terminate_xmitthread_sema from struct xmit_priv. This semaphore is initialised but not used. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-16-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit fcef1518e673460142a9950715c1a1a080f6ad59 Author: Martin Kaiser Date: Fri Dec 30 19:06:40 2022 +0100 staging: r8188eu: bm_pending is not used The bm_pending queue in struct xmit_priv is initialised but not used. It can be removed. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-15-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 61d6aec28c1c54ea973e35d88eac2fa7f872d2f8 Author: Martin Kaiser Date: Fri Dec 30 19:06:39 2022 +0100 staging: r8188eu: remove unused dma_transfer_addr The dma_transfer_addr component in struct xmit_buf is initialised but not used. Remove it. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-14-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 3de5122ccfe1e77ded4c37f171f20ad0ba63a0bb Author: Martin Kaiser Date: Fri Dec 30 19:06:38 2022 +0100 staging: r8188eu: remove unused bpending array The bpending array in struct xmit_buf is unused. Remove it. (struct xmit_buf is not part of the interface between the kernel driver and the device's firmware. It's safe to remove components from this struct.) Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-13-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 3d1edfe65d3565aede6724b088cfe34f02f4002a Author: Martin Kaiser Date: Fri Dec 30 19:06:37 2022 +0100 staging: r8188eu: clean up qos_option setting The qos_option variable in function rtw_make_wlanhdr should be a boolean as it's set to true or false. We can directly set it to pqospriv->qos_option instead of using a default value and if statements. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-12-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit a6b25e291f22c8290203b3426b66c49099688b75 Author: Martin Kaiser Date: Fri Dec 30 19:06:36 2022 +0100 staging: r8188eu: simplify rtw_make_wlanhdr's error handling Simplify the error handling in rtw_make_wlanhdr. Exit immediately instead of jumping to the end of the function. We don't have to do any clean-up. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-11-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit e263d79eb1a49ac217793cd77817e61ad7843fd8 Author: Martin Kaiser Date: Fri Dec 30 19:06:35 2022 +0100 staging: r8188eu: simplify frame type check Reorder the code in rtw_make_wlanhdr to make the function simpler. There's a large if statement to check that we process only data frames. Revert the condition and exit for non-data frames. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 6dd8420d4be40057b4ad015709a05b01f4fb2335 Author: Martin Kaiser Date: Fri Dec 30 19:06:34 2022 +0100 staging: r8188eu: remove duplicate psta check We do not need the psta check in the while loop of rtw_xmitframe_coalesce. psta is already checked near the start of the function and is not modified afterwards. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit a8dce6b4adc9fe457219415a2fa0eda90134ab23 Author: Martin Kaiser Date: Fri Dec 30 19:06:33 2022 +0100 staging: r8188eu: remove rtl8188eu_init_xmit_priv rtl8188eu_init_xmit_priv's only jobs is to initialise the xmit tasklet. Remove rtl8188eu_init_xmit_priv and initialise the xmit tasklet in _rtw_init_xmit_priv. Yet again, this makes the code a tiny bit smaller. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 9431a9370f722b5c4597bca591ba39c86d670e75 Author: Martin Kaiser Date: Fri Dec 30 19:06:32 2022 +0100 staging: r8188eu: simplify rtl8188eu_xmit_tasklet Simplify the rtl8188eu_xmit_tasklet function. Remove an unnecessary temporary variable and reformat the code. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 4126f99b9ee1ff31a7f31e96244aa1d60c46d243 Author: Martin Kaiser Date: Fri Dec 30 19:06:31 2022 +0100 staging: r8188eu: remove unused parameter All callers of rtl8188eu_xmitframe_complete set the pxmitbuf parameter to NULL, in which case rtl8188eu_xmitframe_complete allocates another xmit_buf internally. Remove the pxmitbuf parameter and resulting dead code. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit c22afb2e5d4f79783e6463af86fccc4aa2cce071 Author: Martin Kaiser Date: Fri Dec 30 19:06:30 2022 +0100 staging: r8188eu: return immediately if we're not meant to encrypt In function xmitframe_swencrypt, we can return immediately if our packet needs no encryption. This is simpler than wrapping all the code into a large if statement. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 00df407396ddf0d027bb3380fe07ed67e3624b81 Author: Martin Kaiser Date: Fri Dec 30 19:06:29 2022 +0100 staging: r8188eu: cmd_seq is write-only The cmd_seq component of struct cmd_priv is set and incremented but never read. It can be removed. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 55074f02b4ef4db8d0467afc9eb78a53ef838a36 Author: Martin Kaiser Date: Fri Dec 30 19:06:28 2022 +0100 staging: r8188eu: remove some unused CAM defines Remove some CAM-related defines which are not used in the r8188eu driver. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 75f697b36116606d134f90cc601aa1220b2a93e4 Author: Martin Kaiser Date: Fri Dec 30 19:06:27 2022 +0100 staging: r8188eu: make xmitframe_swencrypt a void function xmitframe_swencrypt always returns _SUCCESS and the caller does not check the return value. We can remove the return value and make xmitframe_swencrypt a void function. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 6803d6cdf2d43948ff08a0d51fcd866bae2f0912 Author: Martin Kaiser Date: Fri Dec 30 18:53:26 2022 +0100 staging: r8188eu: remove intermediate token variable Remove the token variable in on_action_public and use frame_body[2] as function parameter. This saves another few lines of code. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221230175326.90617-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 0a663eafa18fd5a7d6e3d728587f31234eec2649 Author: Martin Kaiser Date: Fri Dec 30 18:53:25 2022 +0100 staging: r8188eu: remove intermediate pframe pointer The pframe pointer in on_action_public is used only in the definition of frame_body, which points to the payload of an incoming action frame. We can use mgmt to locate the action payload and remove the pframe pointer. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221230175326.90617-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 0c9adc24eaebf075ef8eb8ae2dcf9f7208930466 Author: Martin Kaiser Date: Fri Dec 30 18:53:24 2022 +0100 staging: r8188eu: merge on_action_public_default into its only caller Merge on_action_public_default into on_action_public, which is the only caller. Yet again, this makes the code a tiny bit smaller. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221230175326.90617-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 51413ad540cf7648bca9bb7daef08d4e65d893b1 Author: Martin Kaiser Date: Fri Dec 30 18:53:23 2022 +0100 staging: r8188eu: merge on_action_public_vendor into its caller Apart from declaring variables, on_action_public_vendor is only an if statement. Merge this function into its only caller. This makes the code a tiny bit smaller. Signed-off-by: Martin Kaiser Tested-by: Philipp Hortmann # Edimax N150 Link: https://lore.kernel.org/r/20221230175326.90617-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 78dde77b227f66ad95c15f001b2dc3d7e2aa0635 Author: Xu Panda Date: Mon Dec 26 19:05:47 2022 +0800 staging: r8188eu: 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 Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/202212261905476729002@zte.com.cn Signed-off-by: Greg Kroah-Hartman commit 799468fb50e799552ad18e3774c80a56975157b7 Author: Kang Minchul Date: Sat Dec 17 07:39:42 2022 +0900 staging: r8188eu: Prefer kcalloc over kzalloc Fixed following checkpatch.pl warning: * WARNING: Prefer kcalloc over kzalloc with multiply Instead of specifying (number of bytes) * (size) as arugment in kzalloc, prefer kcalloc. Signed-off-by: Kang Minchul Tested-by: Philipp Hortmann # Edimax N150 Reviewed-by: Martin Kaiser Link: https://lore.kernel.org/r/20221216223942.334221-1-tegongkang@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1cd8fbfafdfa345e01f9ff434e6a63a3cbb37210 Author: Philipp Hortmann Date: Sun Jan 15 21:21:14 2023 +0100 staging: rtl8192e: Rename EEPROMTxPower.., AutoloadF.. and SilentReset.. Rename variable SilentResetRxSlotIndex to silent_reset_rx_slot_index, IC_Cut to ic_cut and Rf_Mode to rf_mode to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/60c1fb2861143c8736f061cf85e737b78c210a09.1673812850.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 69c382a5e06d4a78bca67e62e8b30859358c9a22 Author: Philipp Hortmann Date: Sun Jan 15 21:21:07 2023 +0100 staging: rtl8192e: Rename EEPROMTxPower.., AutoloadF.. and SilentReset.. Rename variable EEPROMTxPowerLevelCCK to eeprom_tx_pwr_level_cck, AutoloadFailFlag to autoload_fail_flag and SilentResetRxStuckEvent to silent_reset_rx_stuck_event to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/328bdd5fd16ba000d2083473e16e89ce2e2521ee.1673812850.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0f9d51975f2bdfdbd352f1678876074d6a6f5ff2 Author: Philipp Hortmann Date: Sun Jan 15 21:20:58 2023 +0100 staging: rtl8192e: Rename EEPROMTherma.., EEPROMAntPw.. and EEPROMTxPow.. Rename variable EEPROMThermalMeter to eeprom_thermal_meter, EEPROMAntPwDiff to eeprom_ant_pwr_diff and EEPROMTxPowerLevelOFDM24G to eeprom_tx_pwr_level_ofdm24g to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/f708533cc24af1e08f34b681b9e8e8c01dc7b8f5.1673812850.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit ca17bcc74084b301e7ae120473b09d7a152f32c7 Author: Philipp Hortmann Date: Sun Jan 15 21:20:48 2023 +0100 staging: rtl8192e: Rename CrystalCap, EEPROMLegacyHTT.. and EEPROMCrys.. Rename variable CrystalCap to crystal_cap, EEPROMLegacyHTTxPowerDiff to eeprom_legacy_ht_tx_pwr_diff and EEPROMCrystalCap to eeprom_crystal_cap to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/16337153218e9d1e25f90ca17774d1246086f1a7.1673812849.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit cc7c9cb65992f0b7728f07932c8dedd22f208ab6 Author: Philipp Hortmann Date: Sun Jan 15 21:20:40 2023 +0100 staging: rtl8192e: Rename SetBWModeIn.., SwChnlInPro.. and ThermalMet.. Rename variable SetBWModeInProgress to set_bw_mode_in_progress, SwChnlInProgress to sw_chnl_in_progress and ThermalMeter to thermal_meter to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/fc8bffbef60dba7aeb3bdfeab031c4e02e551c82.1673812849.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 18651492d516607c6d60eaae106c04635120928e Author: Philipp Hortmann Date: Sun Jan 15 21:20:32 2023 +0100 staging: rtl8192e: Rename bResetInPro.., framesyncMo.. and nCur40MhzPri.. Rename variable bResetInProgress to reset_in_progress, framesyncMonitor to frame_sync_monitor and nCur40MhzPrimeSC to n_cur_40mhz_prime_sc to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/dc9a6353e2342f524d8cbf0de6a6340990dc913b.1673812849.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit d7e065b3e2dfc6febb2ce544c02ef3885703d1cb Author: Philipp Hortmann Date: Sun Jan 15 21:20:18 2023 +0100 staging: rtl8192e: Rename rateCountDi.., ContinueDif.. and TxCounter Rename variable rateCountDiffRecord to rate_count_diff_rec, ContinueDiffCount to continue_diff_count and TxCounter to tx_counter to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/c1e168e60a987ae64b64490c04ad79fd0f2f7583.1673812849.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit a9b97927cc4ef95daf0717f736c4ac997585bd60 Author: Philipp Hortmann Date: Sun Jan 15 21:20:10 2023 +0100 staging: rtl8192e: Rename Record_CCK_2.., Record_CCK_4.. and DefaultIn.. Rename variable Record_CCK_20Mindex to rec_cck_20m_idx, Record_CCK_40Mindex to rec_cck_40m_idx and DefaultInitialGain to def_initial_gain to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/2963e704afae2382bb7fded0453adbc4a8d48db3.1673812849.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit a6ee5b0af1e8376dfcef265b96db933424cc7cc3 Author: Philipp Hortmann Date: Sun Jan 15 21:19:56 2023 +0100 staging: rtl8192e: Rename bLastDTPFlag_Low, OFDM_index and CCK_index Rename variable bLastDTPFlag_Low to last_dtp_flag_low, OFDM_index to ofdm_index and CCK_index to cck_index to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/1058b8be954b634f5c2cd9d4a46c33dbbe9459c5.1673812849.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5a64c4d6268e3145dd92614e9c28bb83f9641cb5 Author: Philipp Hortmann Date: Sun Jan 15 21:19:31 2023 +0100 staging: rtl8192e: Rename bDynamicTxHig.., bDynamicTxL.. and bLastDTPF.. Rename variable bDynamicTxHighPower to dynamic_tx_high_pwr, bDynamicTxLowPower to dynamic_tx_low_pwr and bLastDTPFlag_High to last_dtp_flag_high to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/585a76cf4d2c805eada805c18c18ef207b9a4ea4.1673812849.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit c34e856b7f1af9911fd609b535a7cfb282a23534 Author: Philipp Hortmann Date: Mon Jan 9 20:09:11 2023 +0100 staging: rtl8192e: Rename SetRFPowerSta.., RfReg0Value and bTXPowerDa.. Rename variable SetRFPowerStateInProgress to set_rf_pwr_state_in_progress, RfReg0Value to rf_reg_0value and bTXPowerDataReadFromEEPORM to tx_pwr_data_read_from_eeprom to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/01ff54a2c135ba6e3d06255102679d496fd2aef1.1673290428.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit b2779cbaee95577c1206d9d2ca8df3a882cb04ce Author: Philipp Hortmann Date: Mon Jan 9 20:09:05 2023 +0100 staging: rtl8192e: Rename MCSTxPowerL.., LegacyHTTxPowe.. and AntennaTx.. Rename variable MCSTxPowerLevelOriginalOffset to mcs_tx_pwr_level_org_offset, LegacyHTTxPowerDiff to legacy_ht_tx_pwr_diff and AntennaTxPwDiff to antenna_tx_pwr_diff to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/271b3a9e1c23593e9ead925eb8415a584058fb56.1673290428.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit b1465f9bcc2a44d54c199c60b946c4595576019c Author: Philipp Hortmann Date: Mon Jan 9 20:08:58 2023 +0100 staging: rtl8192e: Rename TxPowerLevelOFDM24G... Rename variable TxPowerLevelOFDM24G to tx_pwr_level_ofdm_24g, TxPowerLevelOFDM24G_A to tx_pwr_level_ofdm_24g_a and TxPowerLevelOFDM24G_C to tx_pwr_level_ofdm_24g_c to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/6bb354bd6f6387a26378de3b154d975b826a1a88.1673290428.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit e941c9cefd326f43b94d64cf07b8f10c4d335c6e Author: Philipp Hortmann Date: Mon Jan 9 20:08:51 2023 +0100 staging: rtl8192e: Rename TxPowerLevelCCK... Rename variable TxPowerLevelCCK to tx_pwr_level_cck, TxPowerLevelCCK_A to tx_pwr_level_cck_a and TxPowerLevelCCK_C to tx_pwr_level_cck_c to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/c18af327debcf85f3498be9c7a1492d501748669.1673290428.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6def63e4b4ffe0912a2705398e89c0255c2ee77f Author: Philipp Hortmann Date: Mon Jan 9 20:08:41 2023 +0100 staging: rtl8192e: Rename CCKPresentAtt... Rename variable CCKPresentAttentuation_20Mdefault to cck_present_attn_20m_def, CCKPresentAttentuation_40Mdefault to cck_present_attn_40m_def and CCKPresentAttentuation_difference to cck_present_attn_diff to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/1254f23aefd25075ef3e16719eed79b461f41e4c.1673290428.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 48ca41d38892550ce66ff7a64cf6754d5974b242 Author: Philipp Hortmann Date: Mon Jan 9 20:08:32 2023 +0100 staging: rtl8192e: Rename TSSI_13dBm, Pwr_Track and NumTotalRFPath Rename variable TSSI_13dBm to tssi_13dBm, Pwr_Track to pwr_track and NumTotalRFPath to num_total_rf_path to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/d3bb45535b7babd1cb8df437ca238eb0ce93c9fe.1673290428.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6492c4b924c1e7b9c0b4fa414ef7c9639324cc5f Author: Philipp Hortmann Date: Mon Jan 9 20:08:24 2023 +0100 staging: rtl8192e: Rename ChannelPlan, eeprom_ChannelPlan and CckPwEnl Rename variable ChannelPlan to chnl_plan, eeprom_ChannelPlan to eeprom_chnl_plan and CckPwEnl to cck_pwr_enl to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/aee78a6adf41a2096898e0c0c5ef45e9f7e1659b.1673290428.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6aad66cdb09138557da6324fc628763f41ddf1c3 Author: Anup Sharma Date: Thu Dec 29 16:29:05 2022 +0530 staging: rtl8723bs: hal: Fix codespell-reported spelling mistakes They are appear to be spelling mistakes, Initially identified in a codespell report and never been addressed so far. drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:656: regsiters ==> registers drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:1696: beacause ==> because drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:2092: Checl ==> Check drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:2513: checksume ==> checksum drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:2726: sequense ==> sequence drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:2780: vlaue ==> value drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3409: equall ==> equal, equally Signed-off-by: Anup Sharma Link: https://lore.kernel.org/r/Y61y+flJp9/jEicc@local Signed-off-by: Greg Kroah-Hartman commit 77ca694b2cc5c64318650da68f9d09a12907a836 Author: Anup Sharma Date: Thu Dec 29 21:14:38 2022 +0530 Staging: rtl8192u: ieee80211: Fix indentation errors by removing extra spaces Remove extra spaces before statements to fix following indentation warnings reported by checkpatch.pl. WARNING: Statements should start on a tabstop + struct delayed_work start_ibss_wq; Signed-off-by: Anup Sharma Link: https://lore.kernel.org/r/Y6215u/jtmcgO6TY@local Signed-off-by: Greg Kroah-Hartman commit 7097dc4e5b71cafd653cc2c1ed660f6e8f565480 Author: Xu Panda Date: Mon Dec 26 19:03:24 2022 +0800 staging: ks7010: 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 Reviewed-by: Dan Carpenter Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/202212261903245548969@zte.com.cn Signed-off-by: Greg Kroah-Hartman commit 471213a3776e18caf70aee694358511274e33e9a Author: Umang Jain Date: Fri Dec 23 17:54:04 2022 +0530 staging: vc04_services: vchiq: Drop custom return values from TODO The custom return values (enum vchiq_status) has been dropped. Remove the TODO entry for the same. Signed-off-by: Umang Jain Tested-by: Stefan Wahren Link: https://lore.kernel.org/r/20221223122404.170585-8-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 5eec030686c874af73a47cf1366e2867301d4bc5 Author: Umang Jain Date: Fri Dec 23 17:54:03 2022 +0530 staging: vc04_services: Drop enum vchiq_status remnants Drop all references to enum vchiq_status as they are no longer in use. Signed-off-by: Umang Jain Tested-by: Stefan Wahren Link: https://lore.kernel.org/r/20221223122404.170585-7-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 030691e1357b99110382b4780f8f5d5715565dde Author: Umang Jain Date: Fri Dec 23 17:54:02 2022 +0530 staging: vc04_services: vchiq_arm: Drop VCHIQ_RETRY usage on disconnect Drop the usage of VCHIQ_RETRY when the vchiq has connection status VCHIQ_CONNSTATE_DISCONNECTED. Disconnected status will not be valid to carry on a retry, hence replace the VCHIQ_RETRY with -ENOTCONN. This patch removes the usage of vCHIQ_RETRY completely and act as intermediatory to address the TODO item: * Get rid of custom function return values for vc04_services/interface. Signed-off-by: Umang Jain Tested-by: Stefan Wahren Link: https://lore.kernel.org/r/20221223122404.170585-6-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 82a9eb4a3561e1d6d408754f5516af7a59019df2 Author: Umang Jain Date: Fri Dec 23 17:54:01 2022 +0530 staging: vc04_services: Drop VCHIQ_RETRY usage Drop the usage of VCHIQ_RETRY vchiq_status enum type in most of the places and replace it with -EAGAIN. The exception to this replacement is vchiq_send_remote_use() and vchiq_send_remote_use_active() which will be addressed in the subsequent commit. This patch acts as intermediatory to address the TODO item: * Get rid of custom function return values for vc04_services/interface. Signed-off-by: Umang Jain Tested-by: Stefan Wahren Link: https://lore.kernel.org/r/20221223122404.170585-5-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit ab73dc85328195c10a55b8f0fbc5b0e2749c628a Author: Umang Jain Date: Fri Dec 23 17:54:00 2022 +0530 staging: vc04_services: Drop VCHIQ_ERROR usage Drop the usage of VCHIQ_ERROR vchiq_status enum type. Replace it with -EINVAL to report the error in most cases, -ENOMEM for out-of-memory errors and -EHOSTDOWN for service shutdown. This patch acts as intermediatory to address the TODO item: * Get rid of custom function return values for vc04_services/interface. Signed-off-by: Umang Jain Tested-by: Stefan Wahren Link: https://lore.kernel.org/r/20221223122404.170585-4-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 3414994ba840425b313853a47d581dd5c6c2d300 Author: Umang Jain Date: Fri Dec 23 17:53:59 2022 +0530 staging: vc04_services: Drop VCHIQ_SUCCESS usage Drop the usage of VCHIQ_SUCCESS vchiq_status enum type. Replace it with 0 to report the success status. This patch acts as intermediatory to address the TODO item: * Get rid of custom function return values for vc04_services/interface. Signed-off-by: Umang Jain Tested-by: Stefan Wahren Link: https://lore.kernel.org/r/20221223122404.170585-3-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 3ba317227aa416a4e50103026aabf3c68e9b30a4 Author: Umang Jain Date: Fri Dec 23 17:53:58 2022 +0530 staging: vc04_services: Replace vchiq_status return type to int Modify the functions' signature using enum vchiq_status to return int. Currently, this patch only touches the function signatures and in subsequent patches each vchiq_status enumerated value will be replaced by a integer value. This patch acts as an initial point to address the TODO item: * Get rid of custom function return values for vc04_services/interface. Signed-off-by: Umang Jain Tested-by: Stefan Wahren Link: https://lore.kernel.org/r/20221223122404.170585-2-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit c478aa127eaf9ba67c0da877a67269039f7e94b6 Author: Phil Elwell Date: Thu Dec 22 15:15:53 2022 +0100 staging: vchiq_core: Add comments to remote event parts struct remote_event and the related functions remote_event_*() provides a higher function between ARM core and VPU. It's very helpful for a reviewer to have explaining comments about these parts. Signed-off-by: Phil Elwell Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/20221222141553.138563-1-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 499631d5ae7dd0aacc9601b71a3b80d2b27d9120 Author: Arnd Bergmann Date: Tue Jan 17 17:54:50 2023 +0100 drm: panel: visionox: add backlight dependency The newly added driver uses the backlight subsystem but is missing the corresponding Kconfig dependency: arm-linux-gnueabi-ld: drivers/gpu/drm/panel/panel-visionox-vtdr6130.o: in function `visionox_vtdr6130_probe': panel-visionox-vtdr6130.c:(.text+0xdee): undefined reference to `devm_backlight_device_register' Fixes: 65dc9360f741 ("drm: panel: Add Himax HX8394 panel controller driver") Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20230117165522.2104380-1-arnd@kernel.org commit 72b74b646bdd61a4954b3225337d5f735a41761d Author: Brent Pappas Date: Tue Jan 17 10:28:57 2023 -0500 staging: greybus: gpio: Replace macro irq_data_to_gpio_chip with function Replace the macro irq_data_to_gpio_chip with a static inline function to comply with Linux coding style standards. Signed-off-by: Brent Pappas Link: https://lore.kernel.org/r/20230117152857.22141-1-bpappas@pappasbrent.com Signed-off-by: Greg Kroah-Hartman commit 9ac9e59f15fdf45a531d4093dc2470c41031bb47 Author: Abhirup Deb Date: Sun Jan 15 13:57:56 2023 +0530 staging: vme_user: Replace the "<<" 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/Y8O5DN9ehby8K487@li-27defe4c-32e1-11b2-a85c-e202e9981075.ibm.com Signed-off-by: Greg Kroah-Hartman commit 3f04bd835cdc2e5de1cd8fdaa96c6757cc8b6d7a Author: Deepak R Varma Date: Wed Jan 4 20:48:38 2023 +0530 staging: greybus: Replace zero-length array by DECLARE_FLEX_ARRAY() helper The code currently uses C90 standard extension based zero length array struct which is now deprecated and the new C99 standard extension of flexible array declarations are to be used instead. Also, the macro DECLARE_FLEX_ARRAY() allows to use single flexible array member in a structure. Refer to these links [1], [2], and [3] for details. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://lore.kernel.org/lkml/YxKY6O2hmdwNh8r8@work [3] https://lore.kernel.org/lkml/20210827163015.3141722-2-keescook@chromium.org/ Issue identified using Coccinelle flexible_array.cocci semantic patch. Signed-off-by: Deepak R Varma Reviewed-by: Alex Elder Link: https://lore.kernel.org/r/Y7WYzkIOqaHOxDDS@qemulion Signed-off-by: Greg Kroah-Hartman commit e185623a495e85faa8fe899a2d6bf17dc5bbc12b Author: Matt Jan Date: Fri Dec 9 10:17:56 2022 +0800 staging: vme_user: replace 'unsigned' with 'unsigned int' Update the bare use of "unsigned" to the preferred "unsigned int". Signed-off-by: Matt Jan Link: https://lore.kernel.org/r/20221209021756.5597-3-zoo868e@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3b529e145ea4c2aa59b6bada0aa10b13d2dbc1fa Author: Matt Jan Date: Fri Dec 9 10:17:55 2022 +0800 staging: vme_user: remove unnecessary spaces Remove unnecessary spaces before function pointer arguments in vme_bridge.h. This is done with command ':%s/) (/)('. Signed-off-by: Matt Jan Link: https://lore.kernel.org/r/20221209021756.5597-2-zoo868e@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6b486d7f6a18d158d800c3e6e52ba391bebfafdd Author: Matt Jan Date: Fri Dec 9 10:17:54 2022 +0800 staging: vme_user: add the spaces around the "*" Add a space around the "*" at vme_bridge.h to clear up a checkpatch check. Signed-off-by: Matt Jan Link: https://lore.kernel.org/r/20221209021756.5597-1-zoo868e@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5a77b84df79e639fbe1045b53267413fbf2c5a93 Author: Denis Arefev Date: Fri Nov 18 14:15:23 2022 +0300 staging: rts5208: Added value check Added value check. Return value of a function 'ms_set_rw_reg_addr' called at ms.c:1770 is not checked, but it is usually checked for this function Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Denis Arefev Link: https://lore.kernel.org/r/20221118111523.123463-1-arefev@swemel.ru Signed-off-by: Greg Kroah-Hartman commit 9dd4541b1693e9aa124a167b40e294aa6906433f Author: Soha Jin Date: Fri Nov 11 17:45:42 2022 +0800 platform: remove useless if-branch in __platform_get_irq_byname() When CONFIG_OF_IRQ is not enabled, there will be a stub method that always returns 0 when getting IRQ. Thus, the if-branch can be removed safely. Signed-off-by: Soha Jin Link: https://lore.kernel.org/r/20221111094542.270540-1-soha@lohu.info Signed-off-by: Greg Kroah-Hartman commit 706a91be38837451977491aa7465e98edf6d35d8 Merge: ebc872d645e58 41e1992665a27 Author: Heiko Carstens Date: Tue Jan 17 19:12:39 2023 +0100 Merge branch 'fixes' into features Signed-off-by: Heiko Carstens commit d16ee771fbece55e4a1fd5e032eeebee1efacc1d Author: Uwe Kleine-König Date: Mon Dec 12 22:20:37 2022 +0100 serial: arc_uart: 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: Ilpo Järvinen Link: https://lore.kernel.org/r/20221212212037.3773636-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 16227e4bc67c647d370231803b375364ee2d9e4f Author: Uwe Kleine-König Date: Mon Dec 12 23:13:15 2022 +0100 staging: greybus: codecs: 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: Alex Elder Reviewed-by: Johan Hovold Link: https://lore.kernel.org/r/20221212221315.3778788-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 64f797423379a333e3ba5373ee01353d7029727e Author: Umang Jain Date: Tue Dec 20 14:21:16 2022 +0530 platform: Document platform_add_devices() return value platform_add_devices() returns 0 on success and negative errno on failure. Document it. Signed-off-by: Umang Jain Link: https://lore.kernel.org/r/20221220085116.19837-1-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 3dbdd92014a410778de8406e9e3253e353f51c2b Author: Andy Shevchenko Date: Wed Dec 28 11:49:22 2022 +0200 software node: Remove unused APIs There are no more users of software_node_register_nodes() and software_node_unregister_nodes(). Remove them. Signed-off-by: Andy Shevchenko Acked-by: Greg Kroah-Hartman Acked-by: Sakari Ailus Tested-by: Daniel Scally Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221228094922.84119-5-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit d903bca1897e27e6bebb3522d44697c478cc0c4b Author: Andy Shevchenko Date: Wed Dec 28 11:49:21 2022 +0200 software node: Switch property entry test to a new API Switch property entry test to use software_node_register_node_group() API. The current one is going to be removed soon. Signed-off-by: Andy Shevchenko Acked-by: Greg Kroah-Hartman Acked-by: Sakari Ailus Tested-by: Daniel Scally Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221228094922.84119-4-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 24e5149217ddaab7c7809ad8a9363d54a61b77db Author: Andy Shevchenko Date: Wed Dec 28 11:49:20 2022 +0200 media: ipu3-cio2: Convert to use software_node_register_node_group() The currently used software_node_register_nodes() is going to be removed. Prepare driver by switching to a new API. Signed-off-by: Andy Shevchenko Acked-by: Sakari Ailus Tested-by: Daniel Scally Acked-by: Heikki Krogerus Reviewed-by: Daniel Scally Link: https://lore.kernel.org/r/20221228094922.84119-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 1c856b4b114331d13ee01e92d3fa638797759748 Author: Andy Shevchenko Date: Wed Dec 28 11:49:19 2022 +0200 media: ipu3-cio2: Don't dereference fwnode handle Use acpi_fwnode_handle() instead of dereferencing an fwnode handle directly, which is a better coding practice. Signed-off-by: Andy Shevchenko Acked-by: Sakari Ailus Tested-by: Daniel Scally Acked-by: Heikki Krogerus Reviewed-by: Daniel Scally Link: https://lore.kernel.org/r/20221228094922.84119-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 5c5a7680e67ba6fbbb5f4d79fa41485450c1985c Author: Uwe Kleine-König Date: Fri Dec 9 16:09:14 2022 +0100 platform: Provide a remove callback that returns no value struct platform_driver::remove returning an integer made driver authors expect that returning an error code was proper error handling. However the driver core ignores the error and continues to remove the device because there is nothing the core could do anyhow and reentering the remove callback again is only calling for trouble. So this is an source for errors typically yielding resource leaks in the error path. As there are too many platform drivers to neatly convert them all to return void in a single go, do it in several steps after this patch: a) Convert all drivers to implement .remove_new() returning void instead of .remove() returning int; b) Change struct platform_driver::remove() to return void and so make it identical to .remove_new(); c) Change all drivers back to .remove() now with the better prototype; d) drop struct platform_driver::remove_new(). While this touches all drivers eventually twice, steps a) and c) can be done one driver after another and so reduces coordination efforts immensely and simplifies review. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20221209150914.3557650-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 6a6dcae8f486c3f3298d0767d34505121c7b0b81 Author: Ming Lei Date: Tue Dec 27 10:29:05 2022 +0800 blk-mq: Build default queue map via group_cpus_evenly() The default queue mapping builder of blk_mq_map_queues doesn't take NUMA topo into account, so the built mapping is pretty bad, since CPUs belonging to different NUMA node are assigned to same queue. It is observed that IOPS drops by ~30% when running two jobs on same hctx of null_blk from two CPUs belonging to two NUMA nodes compared with from same NUMA node. Address the issue by reusing group_cpus_evenly() for building queue mapping since group_cpus_evenly() does group cpus according to CPU/NUMA locality. Also performance data becomes more stable with this given correct queue mapping is applied wrt. numa locality viewpoint, for example, on one two nodes arm64 machine with 160 cpus, node 0(cpu 0~79), node 1(cpu 80~159): 1) modprobe null_blk nr_devices=1 submit_queues=2 2) run 'fio(t/io_uring -p 0 -n 4 -r 20 /dev/nullb0)', and observe that IOPS becomes much stable on multiple tests: - unpatched: IOPS is 2.5M ~ 4.5M - patched: IOPS is 4.3M ~ 5.0M Lots of drivers may benefit from the change, such as nvme pci poll, nvme tcp, ... Signed-off-by: Ming Lei Signed-off-by: Thomas Gleixner Reviewed-by: Christoph Hellwig Reviewed-by: John Garry Reviewed-by: Jens Axboe Link: https://lore.kernel.org/r/20221227022905.352674-7-ming.lei@redhat.com commit f7b3ea8cf72f3d6060fe08e461805181e7450a13 Author: Ming Lei Date: Tue Dec 27 10:29:04 2022 +0800 genirq/affinity: Move group_cpus_evenly() into lib/ group_cpus_evenly() has become a generic function which can be used for other subsystems than the interrupt subsystem, so move it into lib/. Signed-off-by: Ming Lei Signed-off-by: Thomas Gleixner Reviewed-by: Christoph Hellwig Reviewed-by: Jens Axboe Link: https://lore.kernel.org/r/20221227022905.352674-6-ming.lei@redhat.com commit 523f1ea76aad9025f9bd5258d77f4406fa9dbe5d Author: Ming Lei Date: Tue Dec 27 10:29:03 2022 +0800 genirq/affinity: Rename irq_build_affinity_masks as group_cpus_evenly Map irq vector into group, which allows to abstract the algorithm for a generic use case outside of the interrupt core. Rename irq_build_affinity_masks as group_cpus_evenly, so the API can be reused for blk-mq to make default queue mapping even though irq vectors aren't involved. No functional change, just rename vector as group. Signed-off-by: Ming Lei Signed-off-by: Thomas Gleixner Reviewed-by: Christoph Hellwig Reviewed-by: Jens Axboe Link: https://lore.kernel.org/r/20221227022905.352674-5-ming.lei@redhat.com commit e7bdd7f0cbd1c001bb9b4d3313edc5ee094bc3f8 Author: Ming Lei Date: Tue Dec 27 10:29:02 2022 +0800 genirq/affinity: Don't pass irq_affinity_desc array to irq_build_affinity_masks Prepare for abstracting irq_build_affinity_masks() into a public function for assigning all CPUs evenly into several groups. Don't pass irq_affinity_desc array to irq_build_affinity_masks, instead return a cpumask array by storing each assigned group into one element of the array. This allows to provide a generic interface for grouping all CPUs evenly from a NUMA and CPU locality viewpoint, and the cost is one extra allocation in irq_build_affinity_masks(), which should be fine since it is done via GFP_KERNEL and irq_build_affinity_masks() is a slow path anyway. Signed-off-by: Ming Lei Signed-off-by: Thomas Gleixner Reviewed-by: Christoph Hellwig Reviewed-by: John Garry Reviewed-by: Jens Axboe Link: https://lore.kernel.org/r/20221227022905.352674-4-ming.lei@redhat.com commit 1f962d91a15af54301c63febb8ac2ba07aa3654f Author: Ming Lei Date: Tue Dec 27 10:29:01 2022 +0800 genirq/affinity: Pass affinity managed mask array to irq_build_affinity_masks Pass affinity managed mask array to irq_build_affinity_masks() so that the index of the first affinity managed vector is always zero. This allows to simplify the implementation a bit. Signed-off-by: Ming Lei Signed-off-by: Thomas Gleixner Reviewed-by: Christoph Hellwig Reviewed-by: John Garry Reviewed-by: Jens Axboe Link: https://lore.kernel.org/r/20221227022905.352674-3-ming.lei@redhat.com commit cdf07f0ea48a3b52f924714d477366ac510ee870 Author: Ming Lei Date: Tue Dec 27 10:29:00 2022 +0800 genirq/affinity: Remove the 'firstvec' parameter from irq_build_affinity_masks The 'firstvec' parameter is always same with the parameter of 'startvec', so use 'startvec' directly inside irq_build_affinity_masks(). Signed-off-by: Ming Lei Signed-off-by: Thomas Gleixner Reviewed-by: Christoph Hellwig Reviewed-by: John Garry Reviewed-by: Jens Axboe Link: https://lore.kernel.org/r/20221227022905.352674-2-ming.lei@redhat.com commit bbcb07d299b5c1b5d996bb571a290a153c19e7e6 Author: Bhupesh Sharma Date: Mon Jan 16 22:10:32 2023 +0530 arm64: dts: qcom: sm6115: Add debug related nodes Add dtsi nodes related to coresight debug units such as cti, etm, etr, funnel(s), replicator(s), etc. for Qualcomm sm6115 SoC. Reviewed-by: Konrad Dybcio Signed-off-by: Bhupesh Sharma Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230116164032.551223-1-bhupesh.sharma@linaro.org commit d96d8f9192be33454ff3fa95a380c836b3008610 Author: Robert Foss Date: Tue Jan 17 13:02:23 2023 +0100 arm64: dts: qcom: sm8350-hdk: Enable lt9611uxc dsi-hdmi bridge The sm8350-hdk ships with the LT9611 UXC DSI/HDMI bridge chip. In order to toggle the board to enable the HDMI output, switch #7 & #8 on the rightmost multi-switch package have to be toggled to On. Signed-off-by: Robert Foss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117120223.1055225-4-rfoss@kernel.org commit ea9df63f0f23bffc1b8840104d683015f5fa82d4 Author: Robert Foss Date: Tue Jan 17 13:02:22 2023 +0100 arm64: dts: qcom: sm8350-hdk: Enable display & dsi nodes Enable the display subsystem and the dsi0 output for the sm8350-hdk board. Signed-off-by: Robert Foss Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117120223.1055225-3-rfoss@kernel.org commit d4a4410583edc065f8f311bdb642cf8f23c8e97e Author: Robert Foss Date: Tue Jan 17 13:02:21 2023 +0100 arm64: dts: qcom: sm8350: Add display system nodes Add mdss, mdss_mdp, dsi0, dsi0_phy nodes. With these nodes the display subsystem is configured to support one DSI output. Signed-off-by: Robert Foss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117120223.1055225-2-rfoss@kernel.org commit 6fa1a0f8cbfc3f4197434f63425853ac3bc16f68 Author: Abel Vesa Date: Mon Jan 16 16:10:00 2023 +0200 arm64: dts: qcom: sm8550-mtp: Add UFS host controller and PHY node Enable UFS host controller and PHY node on SM8550 MTP board. Signed-off-by: Abel Vesa Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230116141000.1831351-2-abel.vesa@linaro.org commit 35cf1aaab169e0fd9c0ba5e0c0a5436ecb8081f0 Author: Abel Vesa Date: Mon Jan 16 16:09:59 2023 +0200 arm64: dts: qcom: sm8550: Add UFS host controller and phy nodes Add UFS host controller and PHY nodes. Signed-off-by: Abel Vesa Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230116141000.1831351-1-abel.vesa@linaro.org commit 2f20f276dd4f2796eba88a06a0fb90b5a9bbbd4b Author: Konrad Dybcio Date: Mon Jan 16 15:14:51 2023 +0100 arm64: dts: qcom: sdm630-nile: Reserve simplefb memory Reserve the bit of memory that simplefb uses to ensure it can always probe. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230116141451.470158-2-konrad.dybcio@linaro.org commit 305db81657b47cbf041a45aa4c0845ed600e3157 Author: Konrad Dybcio Date: Mon Jan 16 15:14:50 2023 +0100 arm64: dts: qcom: sdm630-nile: Don't use underscores in node names Rename the reserved-memory subnodes such that they don't use undescores. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230116141451.470158-1-konrad.dybcio@linaro.org commit 19aeacf505a08ae8fc1e087f9d85b7caf29b09b4 Author: Arnd Bergmann Date: Tue Jan 17 18:02:09 2023 +0100 clk: qcom: rpmh: remove duplicate IPA clock reference One of the ones that were recently added was already there: drivers/clk/qcom/clk-rpmh.c:578:35: error: initialized field overwritten [-Werror=override-init] 578 | [RPMH_IPA_CLK] = &clk_rpmh_ipa.hw, Fixes: aa055bf158cd ("clk: qcom: rpmh: define IPA clocks where required") Signed-off-by: Arnd Bergmann Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117170217.2462320-1-arnd@kernel.org commit 3ee0fe7fa39b14d1cea455b7041f2df933bd97d2 Author: Alexey V. Vissarionov Date: Tue Jan 17 14:15:23 2023 +0300 ALSA: hda/ca0132: minor fix for allocation size Although the "dma_chan" pointer occupies more or equal space compared to "*dma_chan", the allocation size should use the size of variable itself. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 01ef7dbffb41 ("ALSA: hda - Update CA0132 codec to load DSP firmware binary") Signed-off-by: Alexey V. Vissarionov Link: https://lore.kernel.org/r/20230117111522.GA15213@altlinux.org Signed-off-by: Takashi Iwai commit 82b0417e4bfc5af8c1710996913374f09f4a2a03 Author: Pawel Laszczak Date: Thu Dec 22 04:09:34 2022 -0500 usb: cdnsp: : add scatter gather support for ISOC endpoint Patch implements scatter gather support for isochronous endpoint. This fix is forced by 'commit e81e7f9a0eb9 ("usb: gadget: uvc: add scatter gather support")'. After this fix CDNSP driver stop working with UVC class. Signed-off-by: Pawel Laszczak Reviewed-by: Peter Chen Link: https://lore.kernel.org/r/20221222090934.145140-1-pawell@cadence.com Signed-off-by: Greg Kroah-Hartman commit c1177979af9c616661a126a80dd486ad0543b836 Author: Martin Rodriguez Reboredo Date: Wed Jan 11 12:20:50 2023 -0300 btf, scripts: Exclude Rust CUs with pahole Version 1.24 of pahole has the capability to exclude compilation units (CUs) of specific languages [1] [2]. Rust, as of writing, is not currently supported by pahole and if it's used with a build that has BTF debugging enabled it results in malformed kernel and module binaries [3]. So it's better for pahole to exclude Rust CUs until support for it arrives. Co-developed-by: Eric Curtin Signed-off-by: Eric Curtin Signed-off-by: Martin Rodriguez Reboredo Signed-off-by: Daniel Borkmann Tested-by: Eric Curtin Reviewed-by: Neal Gompa Acked-by: Miguel Ojeda Acked-by: Arnaldo Carvalho de Melo Link: https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=49358dfe2aaae4e90b072332c3e324019826783f [1] Link: https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=8ee363790b7437283c53090a85a9fec2f0b0fbc4 [2] Link: https://github.com/Rust-for-Linux/linux/issues/735 [3] Link: https://lore.kernel.org/bpf/20230111152050.559334-1-yakoyoku@gmail.com commit 02b332a06397ef213790f9561c9c022ce1af1a97 Author: Badhri Jagan Sridharan Date: Sat Jan 14 01:32:46 2023 -0800 usb: typec: maxim_contaminant: Implement check_contaminant callback Maxim TCPC has additional ADCs and low current(1ua) current source to measure the impedance of CC and SBU pins. When tcpm invokes the check_contaminant callback, Maxim TCPC measures the impedance of the CC & SBU pins and when the impedance measured is less than 1MOhm, it is assumed that USB-C port is contaminated. CC comparators are also checked to differentiate between presence of sink and contaminant. Once USB-C is deemed to be contaminated, MAXIM TCPC has additional hardware to disable normal DRP toggling cycle and enable 1ua on CC pins once every 2.4secs/4.8secs. Maxim TCPC interrupts AP once the impedance on the CC pin is above the 1MOhm threshold. The Maxim tcpc driver then signals TCPM_PORT_CLEAN to restart toggling. Renaming tcpci_maxim.c to tcpci_maxim_core.c and moving reg read/write helper functions to the tcpci_maxim.h header file. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230114093246.1933321-3-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit abc028a270f47f86060ef479395d1bb8c2ab6e7e Author: Badhri Jagan Sridharan Date: Sat Jan 14 01:32:45 2023 -0800 usb: typec: tcpci: Add callback for evaluating contaminant presence This change adds callback to evaluate presence of contaminant in the TCPCI layer. Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20230114093246.1933321-2-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 599f008c257d913674b2b2f2fa9e273c1058ec2e Author: Badhri Jagan Sridharan Date: Sat Jan 14 01:32:44 2023 -0800 usb: typec: tcpm: Add callbacks to mitigate wakeups due to contaminant On some of the TCPC implementations, when the Type-C port is exposed to contaminants, such as water, TCPC stops toggling while reporting OPEN either by the time TCPM reads CC pin status or during CC debounce window. This causes TCPM to be stuck in TOGGLING state. If TCPM is made to restart toggling, the behavior recurs causing redundant CPU wakeups till the USB-C port is free of contaminant. [206199.287817] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected] [206199.640337] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected] [206199.985789] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected] (or) [ 7853.867577] Start toggling [ 7853.889921] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected] [ 7855.698765] CC1: 0 -> 0, CC2: 0 -> 5 [state TOGGLING, polarity 0, connected] [ 7855.698790] state change TOGGLING -> SNK_ATTACH_WAIT [rev3 NONE_AMS] [ 7855.698826] pending state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED @ 170 ms [rev3 NONE_AMS] [ 7855.703559] CC1: 0 -> 0, CC2: 5 -> 5 [state SNK_ATTACH_WAIT, polarity 0, connected] [ 7855.856555] CC1: 0 -> 0, CC2: 5 -> 0 [state SNK_ATTACH_WAIT, polarity 0, disconnected] [ 7855.856581] state change SNK_ATTACH_WAIT -> SNK_ATTACH_WAIT [rev3 NONE_AMS] [ 7855.856613] pending state change SNK_ATTACH_WAIT -> SNK_UNATTACHED @ 170 ms [rev3 NONE_AMS] [ 7856.027744] state change SNK_ATTACH_WAIT -> SNK_UNATTACHED [delayed 170 ms] [ 7856.181949] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected] [ 7856.187896] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected] [ 7857.645630] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected] [ 7857.647291] CC1: 0 -> 0, CC2: 0 -> 5 [state TOGGLING, polarity 0, connected] [ 7857.647298] state change TOGGLING -> SNK_ATTACH_WAIT [rev3 NONE_AMS] [ 7857.647310] pending state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED @ 170 ms [rev3 NONE_AMS] [ 7857.808106] CC1: 0 -> 0, CC2: 5 -> 0 [state SNK_ATTACH_WAIT, polarity 0, disconnected] [ 7857.808123] state change SNK_ATTACH_WAIT -> SNK_ATTACH_WAIT [rev3 NONE_AMS] [ 7857.808150] pending state change SNK_ATTACH_WAIT -> SNK_UNATTACHED @ 170 ms [rev3 NONE_AMS] [ 7857.978727] state change SNK_ATTACH_WAIT -> SNK_UNATTACHED [delayed 170 ms] To mitigate redundant TCPM wakeups, TCPCs which do have the needed hardware can implement the check_contaminant callback which is invoked by TCPM to evaluate for presence of contaminant. Lower level TCPC driver can restart toggling through TCPM_PORT_CLEAN event when the driver detects that USB-C port is free of contaminant. check_contaminant callback also passes the disconnect_while_debounce flag which when true denotes that the CC pins transitioned to OPEN state during the CC debounce window. Signed-off-by: Badhri Jagan Sridharan Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230114093246.1933321-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 6681e43f5095a64bc3e37822f64d91d284a062dc Author: Prashant Malani Date: Thu Jan 12 22:16:08 2023 +0000 usb: typec: Make bus switch code retimer-aware Since ports can have retimers associated with them, update the Type-C alternate mode bus code to also set retimer state when the switch state is updated. While we are here, make the typec_retimer_dev_type declaration in the retimer.h file as extern, so that the header file can be successfully included in the bus code without redeclaration compilation errors. Signed-off-by: Prashant Malani Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230112221609.540754-4-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman commit 2c8cb236ed44d071ef2ed1fbb948eea404551788 Author: Prashant Malani Date: Thu Jan 12 22:16:07 2023 +0000 usb: typec: Add wrapper for bus switch set code Add a wrapper that calls the set() function for various switches associated with a port altmode. Right now, it just wraps the existing typec_mux_set() command, but it can be expanded to include other switches in future patches. No functional changes introduced by this patch. Signed-off-by: Prashant Malani Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230112221609.540754-3-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman commit 2476de8288cc552cbe98edf3f4d4cc2846cf4b8c Author: Prashant Malani Date: Thu Jan 12 22:16:06 2023 +0000 usb: typec: Add retimer handle to port altmode Just like it does with muxes, the Type-C bus code can update the state of connected retimers (especially when altmode-related transitions occur). Add a retimer handle to the port altmode struct to enable this. Signed-off-by: Prashant Malani Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230112221609.540754-2-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman commit a30951d31b250bf3479c00e93646b6cc6fb42a56 Author: Petlozu Pravareshwar Date: Fri Nov 11 18:18:13 2022 +0800 xhci: tegra: USB2 pad power controls Program USB2 pad PD controls during port connect/disconnect, port suspend/resume, and test mode, to reduce power consumption on disconnect or suspend. Signed-off-by: Petlozu Pravareshwar Co-developed-by: Jim Lin Signed-off-by: Jim Lin Acked-by: Thierry Reding Reviewed-by: Jon Hunter Tested-by: Jon Hunter Acked-by: Mathias Nyman Link: https://lore.kernel.org/r/20221111101813.32482-4-jilin@nvidia.com Signed-off-by: Greg Kroah-Hartman commit 2cbe475fe733a70eda30049ee8edf06f296c9402 Author: Jim Lin Date: Fri Nov 11 18:18:12 2022 +0800 xhci: hub: export symbol on xhci_hub_control XHCI host drivers may override the default xhci_hub_control() with their own device specific function. To allow these host drivers to call the xhci_hub_control() function from within their own hub_control() callback and be built as a module, export the symbol for xhci_hub_control. Signed-off-by: Jim Lin Reviewed-by: Jon Hunter Tested-by: Jon Hunter Acked-by: Thierry Reding Acked-by: Mathias Nyman Link: https://lore.kernel.org/r/20221111101813.32482-3-jilin@nvidia.com Signed-off-by: Greg Kroah-Hartman commit 592338dde85411b1da74fa6b463e2a047c2545ab Author: Jim Lin Date: Fri Nov 11 18:18:11 2022 +0800 xhci: Add hub_control to xhci_driver_overrides Add a hub_control() callback to the xhci_driver_overrides structure to allow host drivers to override the default hub_control function. This is required for Tegra which requires device specific actions for power management to be executed during USB state transitions. Signed-off-by: Jim Lin Reviewed-by: Jon Hunter Tested-by: Jon Hunter Acked-by: Thierry Reding Acked-by: Mathias Nyman Link: https://lore.kernel.org/r/20221111101813.32482-2-jilin@nvidia.com Signed-off-by: Greg Kroah-Hartman commit ee0e40efc4d1bd87c795233c8ceadf4228479c06 Author: Sing-Han Chen Date: Wed Jan 11 11:04:50 2023 +0000 usb: host: xhci-tegra: Add Tegra234 XHCI support This change adds Tegra234 XUSB host mode controller support. In Tegra234, some of the registers have moved to bar2 space. The new soc variable has_bar2 indicates the chip with bar2 area. This patch adds new reg helper to let the driver reuse the same code for those chips with bar2 support. Signed-off-by: Sing-Han Chen Co-developed-by: Wayne Chang Signed-off-by: Wayne Chang Signed-off-by: Jon Hunter Link: https://lore.kernel.org/r/20230111110450.24617-7-jonathanh@nvidia.com Signed-off-by: Greg Kroah-Hartman commit d8163a32ca95c6e23cd449868ad12008569ac17a Author: Sing-Han Chen Date: Wed Jan 11 11:04:49 2023 +0000 phy: tegra: xusb: Add Tegra234 support Add support for the XUSB pad controller found on Tegra234 SoCs. It is mostly similar to the same IP found on Tegra194, because most of the Tegra234 XUSB PADCTL registers definition and programming sequence are the same as Tegra194, Tegra234 XUSB PADCTL can share the same driver with Tegra186 and Tegra194 XUSB PADCTL. Introduce a new feature, USB2 HW tracking, for Tegra234. The feature is to enable HW periodical PAD tracking which measure and capture the electric parameters of USB2.0 PAD. Signed-off-by: Sing-Han Chen Co-developed-by: Wayne Chang Signed-off-by: Wayne Chang Signed-off-by: Jon Hunter Link: https://lore.kernel.org/r/20230111110450.24617-6-jonathanh@nvidia.com Signed-off-by: Greg Kroah-Hartman commit 71d9e899584e11bbd7eaf9934a619c69a15060d8 Author: Wayne Chang Date: Wed Jan 11 11:04:48 2023 +0000 phy: tegra: xusb: Disable trk clk when not in use Pad tracking is a one-time calibration for Tegra186 and Tegra194. Clk should be disabled after calibration. Disable clk after calibration. While at it add 100us delay for HW recording the calibration value. Signed-off-by: Wayne Chang Signed-off-by: Jon Hunter Link: https://lore.kernel.org/r/20230111110450.24617-5-jonathanh@nvidia.com Signed-off-by: Greg Kroah-Hartman commit 1b17df99730ab63b49848e61ef19d8ee583684c5 Author: Wayne Chang Date: Wed Jan 11 11:04:47 2023 +0000 arm64: tegra: Enable XUSB host function on Jetson AGX Orin This commit enables XUSB host and pad controller on Jetson AGX Orin. Signed-off-by: Wayne Chang Signed-off-by: Thierry Reding Signed-off-by: Jon Hunter Link: https://lore.kernel.org/r/20230111110450.24617-4-jonathanh@nvidia.com Signed-off-by: Greg Kroah-Hartman commit 2648f68bd0ac9ec0e1e17d1e4420570b35e8f175 Author: Wayne Chang Date: Wed Jan 11 11:04:45 2023 +0000 dt-bindings: usb: Add NVIDIA Tegra234 XUSB host controller binding Add device-tree binding documentation for the XUSB host controller present on Tegra234 SoC. This controller supports the USB 3.1 specification. Signed-off-by: Wayne Chang Signed-off-by: Thierry Reding Signed-off-by: Jon Hunter Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230111110450.24617-2-jonathanh@nvidia.com Signed-off-by: Greg Kroah-Hartman commit 4a0192c01e036b542d0f53ca2673a50b38f57d74 Author: Daniel Scally Date: Tue Dec 13 08:37:31 2022 +0000 usb: gadget: usb: Remove "default" from color matching attributes Color matching attributes in the configfs for UVC are named with the phrase "default". The implication of that is that they will only be used _with_ the default color matching descriptor, and that will shortly no longer be the case. Remove the "default" from the color matching descriptor attribute variables. Signed-off-by: Daniel Scally Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Link: https://lore.kernel.org/r/20221213083736.2284536-2-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 263b628ff9e5ccf5d4b8290f2b3c35e76bcb8961 Author: Lucas Stach Date: Tue Jan 10 19:08:04 2023 +0100 dt-bindings: usb: dwc3-imx8mp: add power domain property The USB controllers in the i.MX8MP are located inside the HSIO power domain. Add the power-domains property to the DT binding to be able to describe the hardware properly. Signed-off-by: Lucas Stach Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230110180804.594462-1-l.stach@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 481735d64794181916424a36b332bcd54bfb280b Author: Jun Nie Date: Thu Jan 5 15:50:58 2023 +0800 usb: typec: tipd: Support wakeup Enable wakeup when pluging or unpluging USB cable. It is up to other components to hold system in active mode, such as display, so that user can receive the notification. Signed-off-by: Jun Nie Reviewed-by: Heikki Krogerus Reviewed-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20230105075058.924680-2-jun.nie@linaro.org Signed-off-by: Greg Kroah-Hartman commit 26fe745063e2d7d091020022b96a145f3a82dff8 Author: Jun Nie Date: Thu Jan 5 15:50:57 2023 +0800 dt-bindings: usb: tps6598x: Add wakeup property Add wakeup property description. People can enable it with adding the property. Signed-off-by: Jun Nie Reviewed-by: Bryan O'Donoghue Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230105075058.924680-1-jun.nie@linaro.org Signed-off-by: Greg Kroah-Hartman commit 30374434edab20e25776f8ecb4bc9d1e54309487 Author: Greg Kroah-Hartman Date: Fri Jan 6 16:28:28 2023 +0100 USB: fix memory leak with using debugfs_lookup() When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Cc: Alan Stern Cc: Jilin Yuan Link: https://lore.kernel.org/r/20230106152828.3790902-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit a6d7b7b095c4197c78de71a7876e74b6b4ef8af8 Author: Herve Codina Date: Thu Jan 5 16:22:57 2023 +0100 MAINTAINERS: add the Renesas RZ/N1 USBF controller entry After contributing the driver, add myself as the maintainer for Renesas RZ/N1 USBF controller. Signed-off-by: Herve Codina Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230105152257.310642-6-herve.codina@bootlin.com Signed-off-by: Greg Kroah-Hartman commit e12069043418532184c554f89a9002d3bc543782 Author: Herve Codina Date: Thu Jan 5 16:22:56 2023 +0100 ARM: dts: r9a06g032: Add the USBF controller node Add the USBF controller available in the r9a06g032 SoC. Signed-off-by: Herve Codina Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230105152257.310642-5-herve.codina@bootlin.com Signed-off-by: Greg Kroah-Hartman commit 3e6e14ffdea41ca91d4c9afd88a1f736cf50a1f3 Author: Herve Codina Date: Thu Jan 5 16:22:55 2023 +0100 usb: gadget: udc: add Renesas RZ/N1 USBF controller support Add support for the Renesas USBF controller. This controller is an USB2.0 UDC controller available in the Renesas r9a06g032 SoC (RZ/N1 family). Signed-off-by: Herve Codina Link: https://lore.kernel.org/r/20230105152257.310642-4-herve.codina@bootlin.com Signed-off-by: Greg Kroah-Hartman commit e9fee814b054e4f6f2faf3d9c1944869fe41c9dd Author: Herve Codina Date: Thu Jan 5 16:22:54 2023 +0100 soc: renesas: r9a06g032-sysctrl: Handle h2mode setting based on USBF presence The CFG_USB[H2MODE] allows to switch the USB configuration. The configuration supported are: - One host and one device or - Two hosts Set CFG_USB[H2MODE] based on the USBF controller (USB device) availability. Signed-off-by: Herve Codina Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230105152257.310642-3-herve.codina@bootlin.com Signed-off-by: Greg Kroah-Hartman commit a90498e5600eba40f534c4cba6f030d349e78c70 Author: Herve Codina Date: Thu Jan 5 16:22:53 2023 +0100 dt-bindings: usb: add the Renesas RZ/N1 USBF controller The Renesas RZ/N1 USBF controller is an USB2.0 device controller (UDC) available in the Renesas r9a06g032 SoC (RZ/N1 family). Signed-off-by: Herve Codina Reviewed-by: Rob Herring Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230105152257.310642-2-herve.codina@bootlin.com Signed-off-by: Greg Kroah-Hartman commit 8b9c6ab156b5a80d64e5a1d9c248cfcd61794dfc Author: Andy Shevchenko Date: Mon Jan 2 22:29:33 2023 +0200 usb: typec: intel_pmc_mux: Deduplicate ACPI matching in probe There is no need to call acpi_dev_present() followed by acpi_dev_get_first_match_dev() as they both do the same with only difference in the returning value. Instead, call the latter and check its result. Signed-off-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230102202933.15968-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit c3194949ae8fcbe2b7e38670e7c6a5cfd2605edc Author: Andy Shevchenko Date: Mon Jan 2 22:29:32 2023 +0200 usb: typec: intel_pmc_mux: Don't leak the ACPI device reference count When acpi_dev_get_memory_resources() fails, the reference count is left bumped. Drop it as it's done in the other error paths. Fixes: 43d596e32276 ("usb: typec: intel_pmc_mux: Check the port status before connect") Signed-off-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230102202933.15968-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ccb0beb43a57ee8dbc35a3314c4bf1db922c054f Author: Xu Yang Date: Wed Dec 14 10:23:34 2022 +0800 usb: typec: tcpci: Request IRQ with IRQF_SHARED Under resource constraints, this interrupt may use other interrupt line or this interrupt line may be shared with other devices as long as they meet the sharing requirements. Besides, This irq flag will not cause other side effect if tcpci driver is the only user. Signed-off-by: Xu Yang Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221214022334.2520677-1-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman commit 2c03f7f1ad81da297e569d68d8b1219bbafcdfd1 Author: Peng Fan Date: Fri Dec 23 11:10:12 2022 +0800 dt-bindings: usb: usbmisc-imx: add i.MX8MM usbmisc Add fsl,imx8mm-usbmisc compatible for i.MX8MM Signed-off-by: Peng Fan Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221223031012.92932-2-peng.fan@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 1c796d93b58903d2ba09441c23ba6df263b6df28 Author: Peng Fan Date: Fri Dec 23 11:10:11 2022 +0800 dt-bindings: usb: ci-hdrc-usb2: add i.MX8MM compatible Add fsl,imx8mm-usb compatible for i.MX8MM Signed-off-by: Peng Fan Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221223031012.92932-1-peng.fan@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 28e1ff70a08d331703f115534bd4278e11451439 Author: Ricardo Ribalda Date: Wed Dec 21 20:34:51 2022 +0100 USB: Improve usb_fill_* documentation Document the transfer buffer requirement. That is, the buffer must be DMAble - otherwise data corruption might occur. Acked-by: Randy Dunlap Reviewed-by: Laurent Pinchart Signed-off-by: Ricardo Ribalda Acked-by: Alan Stern Link: https://lore.kernel.org/r/20221220-usb-dmadoc-v4-0-74a045bf14f4@chromium.org Signed-off-by: Greg Kroah-Hartman commit 2582d629c9e01687aee905ac0bce33615a8a004a Author: Wayne Chang Date: Fri Dec 16 12:20:26 2022 +0800 usb: gadget: xudc: Refactor update data role work The notification call chain should be registered after the device gets ready. Otherwise, we might get errors when setting data roles in an incomplete system. This patch refactors update data role work and register the notifier call chain after the system gets ready. Signed-off-by: Wayne Chang Signed-off-by: Haotien Hsu Link: https://lore.kernel.org/r/20221216042026.98517-1-haotienh@nvidia.com Signed-off-by: Greg Kroah-Hartman commit 569d23e9bf58464887c55aa0d2bdb0ead97f8592 Author: Biju Das Date: Fri Dec 9 17:18:36 2022 +0000 usb: typec: hd3ss3220: Add polling support Some platforms(for eg: RZ/V2M EVK) does not have interrupt pin connected to HD3SS3220. Add polling support for role detection. Signed-off-by: Biju Das Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221209171836.71610-3-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit bf58a687db232e738105244e34a85d21f5e2598d Author: Biju Das Date: Fri Dec 9 17:18:35 2022 +0000 dt-bindings: usb: ti,hd3ss3220: Update interrupt property as optional On some platforms(for eg: RZ/V2M EVK), interrupt is not populated. Update the binding to make interrupt property as optional. Signed-off-by: Biju Das Acked-by: Rob Herring Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20221209171836.71610-2-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 6b9748f86816f4e25e40d5fdbf7089f73a2051f7 Author: Rahul T R Date: Tue Jan 3 15:49:51 2023 +0530 drm/bridge: cdns-dsi: Add support for J721E wrapper Add support for wrapper settings for DSI bridge on j721e. Also enable DPI0 --------------- ----------------------- | -------| |------- | | DSS | DPI2 |----->| DPI0 | DSI Wrapper | | -------| |------- | --------------- ----------------------- As shown above DPI2 output of DSS is connected to DPI0 input of DSI Wrapper, DSI wrapper gives control wheather to enable/disable DPI0 input. In j721e above is the only configuration supported Signed-off-by: Rahul T R Reviewed-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Reviewed-by: Andrzej Hajda Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20230103101951.10963-6-r-ravikumar@ti.com commit 6184e01f9901809b20e674173a6219d6eafcea6a Author: Rahul T R Date: Tue Jan 3 15:49:50 2023 +0530 drm/bridge: cdns-dsi: Create a header file Create a header file for cdns dsi and move structure definations to prepare for adding j721e wrapper support Signed-off-by: Rahul T R Reviewed-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Reviewed-by: Andrzej Hajda Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20230103101951.10963-5-r-ravikumar@ti.com commit 87a439e0558aaddeacf49e16729a56da2e3f2c27 Author: Rahul T R Date: Tue Jan 3 15:49:49 2023 +0530 drm/bridge: cdns-dsi: Move to drm/bridge/cadence Move the cadence dsi bridge under drm/bridge/cadence directory, to prepare for adding j721e wrapper support Signed-off-by: Rahul T R Reviewed-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Reviewed-by: Andrzej Hajda Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20230103101951.10963-4-r-ravikumar@ti.com commit 6f209ca07a49b831f715a3b8d22651d72ff3edc0 Author: Rahul T R Date: Tue Jan 3 15:49:48 2023 +0530 dt-bindings: display: bridge: cdns,dsi: Add compatible for dsi on j721e Add compatible to support dsi bridge on j721e Signed-off-by: Rahul T R Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart Reviewed-by: Andrzej Hajda Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20230103101951.10963-3-r-ravikumar@ti.com commit 59b2deae2d884fb1c144f5a06b7c5ef745d437bc Author: Rahul T R Date: Tue Jan 3 15:49:47 2023 +0530 dt-bindings: display: bridge: Convert cdns,dsi.txt to yaml Convert cdns,dsi.txt binding to yaml format Signed-off-by: Rahul T R Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart Reviewed-by: Andrzej Hajda Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20230103101951.10963-2-r-ravikumar@ti.com commit 5f994ce5fd3bc65deab14d59ee314a8e1e96221e Author: Tomi Valkeinen Date: Fri Sep 16 11:22:06 2022 +0300 drm/omap: Fix kernel docs Fix doc related warnings seen with W=1: the function names have changed but the docs have not been changed accordingly. Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20220916082206.167427-2-tomi.valkeinen@ideasonboard.com Reviewed-by: Laurent Pinchart commit 88f8ac47bddc1674b2840c733f1120a548037199 Author: Bagas Sanjaya Date: Mon Jan 16 16:55:38 2023 +0200 pinctrl: Proofreading and updating the documentation (part 2) Do the following: - update the "Definitions" style in two sections - don't use "I" for technical documentation - inline the remaining (variables, function names, file paths) Signed-off-by: Bagas Sanjaya Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij commit af6f64c68b9d961add00270f37ac291f151a029b Author: Andy Shevchenko Date: Mon Dec 12 15:52:54 2022 +0200 pinctrl: Proofreading and updating the documentation accordingly Proofreading and updating the documentation accordingly, i.e. fixed: - ambiguity of foo_set_mux() implementation and explanations - semantics in some of the examples, e.g. _probe() --> _init() - references to the callbacks to make them start with dot - references to the legacy API by replacing them with newer one - indentation in some of the examples - double words or phrases updated: - unsigned --> unsigned int in some of the examples - use struct pingroup and PINCTRL_PINGROUP() in some of the examples - use struct pinfunction and PINCTRL_PINFUNCTION() in some of the examples and enabled: - syntax highlighting for the examples in the programming languages - chapter references Yet to clarify: - "gpioN" menton for the default function when requesting GPIO Co-developed-by: Bagas Sanjaya Signed-off-by: Bagas Sanjaya Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij commit 2cf9e278efeff8f8bbb9580e2d6760e19795e310 Author: Johan Hovold Date: Tue Jan 17 13:43:10 2023 +0100 efi: efivars: make efivar_supports_writes() return bool For consistency with the new efivar_is_available() function, change the return type of efivar_supports_writes() to bool. Signed-off-by: Johan Hovold Signed-off-by: Ard Biesheuvel commit ade7fd908d710d0ab865c273df782c75528636ef Author: Johan Hovold Date: Tue Jan 17 13:43:09 2023 +0100 efi: efivars: drop kobject from efivars_register() Since commit 0f5b2c69a4cb ("efi: vars: Remove deprecated 'efivars' sysfs interface") and the removal of the sysfs interface there are no users of the efivars kobject. Drop the kobject argument from efivars_register() and add a new efivar_is_available() helper in favour of the old efivars_kobject(). Note that the new helper uses the prefix 'efivar' (i.e. without an 's') for consistency with efivar_supports_writes() and the rest of the interface (except the registration functions). For the benefit of drivers with optional EFI support, also provide a dummy implementation of efivar_is_available(). Signed-off-by: Johan Hovold Signed-off-by: Ard Biesheuvel commit 2f33df889e998c6e5eb35bfef56cf2c72d053c9a Author: Laurent Pinchart Date: Thu Jun 16 01:14:10 2022 +0300 ARM: dts: stm32: Use new media bus type macros Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT sources. Signed-off-by: Laurent Pinchart Signed-off-by: Alexandre Torgue commit a12154058f756871b74b8d1e62aa6fd16d762a97 Author: Amelie Delaunay Date: Mon Jan 16 12:57:27 2023 +0100 ARM: dts: stm32: Fix User button on stm32mp135f-dk This patch fixes the following dtbs_check warning on stm32mp135f-dk: arch/arm/boot/dts/stm32mp135f-dk.dtb: gpio-keys: 'user-pa13' does not match any of the regexes: '^(button|event|key|switch|(button|event|key|switch)-[a-z0-9-]+|[a-z0-9-]+-(button|event|key|switch))$', 'pinctrl-[0-9]+' From schema: Documentation/devicetree/bindings/input/gpio-keys.yaml It renames user-pa13 node into button-user so that it matches gpio-keys bindings. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue commit a9060c1326bc886029aa34786deb2a75797000a8 Author: Olivier Moysan Date: Tue Jan 10 10:17:12 2023 +0100 ARM: dts: stm32: add timers support on stm32mp135f-dk Configure timers support on stm32mp135f-dk. The timers TIM3, TIM4, TIM8 & TIM14 which can be used on expansion GPIO connector are disabled by default. Signed-off-by: Olivier Moysan Signed-off-by: Alexandre Torgue commit a3183748371dbb7ce0b208203465ccfbe9e0d398 Author: Olivier Moysan Date: Tue Jan 10 10:17:11 2023 +0100 ARM: dts: stm32: add timer pins muxing for stm32mp135f-dk Add timer pins muxing for stm32mp135f-dk board. Signed-off-by: Olivier Moysan Signed-off-by: Alexandre Torgue commit bf9d876bea2e004da38982b0848c7e566edc4e54 Author: Olivier Moysan Date: Tue Jan 10 10:17:10 2023 +0100 ARM: dts: stm32: add timers support on stm32mp131 Add timers support to STM32MP13x SoC family. Signed-off-by: Olivier Moysan Signed-off-by: Alexandre Torgue commit 0a5afd3ee0d00070646f1018b039448e4d91454d Author: Olivier Moysan Date: Fri Nov 18 15:20:06 2022 +0100 ARM: dts: stm32: add dfsdm node on stm32mp131 Add DFSDM peripheral support for the STM32MP13 SoC family. Signed-off-by: Olivier Moysan Signed-off-by: Alexandre Torgue commit c5e05d08ef90eb3f479e94b7a8d467723dd490a2 Author: Olivier Moysan Date: Fri Nov 18 15:20:05 2022 +0100 ARM: dts: stm32: add spdifrx node on stm32mp131 Add S/PDIFRX peripheral support for the STM32MP13 SoC family. Signed-off-by: Olivier Moysan Signed-off-by: Alexandre Torgue commit 619746a27bd08cd34198c26c395cb22ce5d456c3 Author: Olivier Moysan Date: Fri Nov 18 15:20:04 2022 +0100 ARM: dts: stm32: add sai nodes on stm32mp131 Add SAI1 and SAI2 peripherals support for the STM32MP13 SoC family. Signed-off-by: Olivier Moysan Change-Id: I79af484702fa4108c106e6013f82d33638e92e6d Signed-off-by: Alexandre Torgue commit ae8cf3b487270d4b57b60454658d5cb6ed33ba47 Author: Olivier Moysan Date: Fri Nov 18 15:20:03 2022 +0100 ARM: dts: stm32: add i2s nodes on stm32mp131 Add I2S1, I2S2, I2S3 and I2S4 peripherals support for the STM32MP13 SoC family. Signed-off-by: Olivier Moysan Signed-off-by: Alexandre Torgue commit dee3cb759d3de4225bf0eb1b469f006277743a3b Author: Bernhard Rosenkränzer Date: Mon Dec 5 14:51:58 2022 +0100 ARM: dts: stm32: Remove the pins-are-numbered property Remove the pins-are-numbered property from STM32 DeviceTrees Signed-off-by: Bernhard Rosenkränzer Reviewed-by: Matthias Brugger Signed-off-by: Alexandre Torgue commit 6118d577343c025b8cf470ab6b558756ea3b1e27 Author: Jon Hunter Date: Mon Jan 16 12:06:26 2023 +0000 arm64: tegra: Populate Jetson AGX Orin EEPROMs Populate the module and system EEPROMs on the Jetson AGX Orin platform. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit 260e8d42b1d0c3083c60edbab501404180b8d2e2 Author: Jon Hunter Date: Mon Jan 16 12:06:25 2023 +0000 arm64: tegra: Populate address/size cells for Tegra234 I2C Populate the address and size cells properties for the I2C devices on Tegra234. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit 6e505dd6804fc57411cbb878372f8cd03c806bd7 Author: Wayne Chang Date: Wed Jan 11 11:04:47 2023 +0000 arm64: tegra: Enable XUSB host function on Jetson AGX Orin This commit enables XUSB host and pad controller on Jetson AGX Orin. Signed-off-by: Wayne Chang Signed-off-by: Thierry Reding Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit f2b17b39bfffeeb8550587b98bc9adafa970cb58 Author: Olivier Moysan Date: Mon Dec 5 13:16:02 2022 +0100 ARM: dts: stm32: rename sound card on stm32mp15xx-dkx Rename the sound card for STM32MP15x DK boards to manage SoC diversity management. This typically allows to discriminate the sound cards for STM32MP15 and STM32MP13 SoCs. Signed-off-by: Olivier Moysan Signed-off-by: Alexandre Torgue commit 003b7c6b24f4181050958e72eda174a568171bae Author: Olivier Moysan Date: Mon Dec 5 13:16:01 2022 +0100 ARM: dts: stm32: remove sai kernel clock on stm32mp15xx-dkx Remove clocks property in the SAI2A subblock node as this property is already defined in the SoC DT. Keep only this property when the master clock is added in the node. Signed-off-by: Olivier Moysan Signed-off-by: Alexandre Torgue commit 96ec2939620c48a503d9c89865c0c230d6f955e4 Author: Dawei Li Date: Thu Jan 5 22:51:23 2023 +0800 Drivers: hv: Make remove callback of hyperv driver void returned Since commit fc7a6209d571 ("bus: Make remove callback return void") forces bus_type::remove be void-returned, it doesn't make much sense for any bus based driver implementing remove callbalk to return non-void to its caller. As such, change the remove function for Hyper-V VMBus based drivers to return void. Signed-off-by: Dawei Li Link: https://lore.kernel.org/r/TYCP286MB2323A93C55526E4DF239D3ACCAFA9@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM Signed-off-by: Wei Liu commit a9737808b3e4e2313cc2aab2e807836a06576277 Author: Daniel Baluta Date: Tue Jan 17 14:25:33 2023 +0200 ASoC: SOF: compress: Set compress data offset Because now snd_sof_set_stream_data_offset has compress support we use it to set posn_offset for compress stream. Reviewed-by: Paul Olaru Reviewed-by: Iuliana Prodan Reviewed-by: Ranjani Sridharan Reviewed-by: Peter Ujfalusi Signed-off-by: Daniel Baluta Link: https://lore.kernel.org/r/20230117122533.201708-5-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown commit 090349a9feba3ceee3997d31d68ffe54e5b57acb Author: Daniel Baluta Date: Tue Jan 17 14:25:32 2023 +0200 ASoC: SOF: Add support for compress API for stream data/offset snd_sof_pcm_stream keeps information about both PCM (snd_pcm_substream) and Compress (snd_compr_stream) streams. When PCM substream pointer is NULL this means we are dealing with a compress stream. Reviewed-by: Paul Olaru Reviewed-by: Iuliana Prodan Reviewed-by: Ranjani Sridharan Reviewed-by: Peter Ujfalusi Signed-off-by: Daniel Baluta Link: https://lore.kernel.org/r/20230117122533.201708-4-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown commit 249f186d6b0211fc59d83db128030f2b298063a1 Author: Daniel Baluta Date: Tue Jan 17 14:25:31 2023 +0200 ASoC: SOF: Prepare set_stream_data_offset for compress API Make second parameter of set_stream_data_offset generic in order to be used for both PCM and compress streams. Current patch doesn't introduce any functional change, just prepare the code for compress support. Reviewed-by: Paul Olaru Reviewed-by: Iuliana Prodan Reviewed-by: Ranjani Sridharan Reviewed-by: Peter Ujfalusi Signed-off-by: Daniel Baluta Link: https://lore.kernel.org/r/20230117122533.201708-3-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown commit 1b905942d6cd182b7ef14e9f095178376d3847e6 Author: Daniel Baluta Date: Tue Jan 17 14:25:30 2023 +0200 ASoC: SOF: Prepare ipc_msg_data to be used with compress API Make second parameter of ipc_msg_data generic in order to be able to support compressed streams. This patch doesn't hold any functional change. With this case we can use ipc_msg_data, to retrieve information from DSP for both PCM/Compress API. Reviewed-by: Paul Olaru Reviewed-by: Iuliana Prodan Reviewed-by: Ranjani Sridharan Reviewed-by: Peter Ujfalusi Signed-off-by: Daniel Baluta Link: https://lore.kernel.org/r/20230117122533.201708-2-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown commit 8536290f0011c582df08657825cf2fee65aac9ed Author: Jinank Jain Date: Mon Jan 2 07:12:54 2023 +0000 Drivers: hv: Enable vmbus driver for nested root partition Currently VMBus driver is not initialized for root partition but we need to enable the VMBus driver for nested root partition. This is required, so that L2 root can use the VMBus devices. Signed-off-by: Jinank Jain Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/c3cdd2cf2bffeba388688640eb61bc182e4c041d.1672639707.git.jinankjain@linux.microsoft.com Signed-off-by: Wei Liu commit f0d2f5c2c000c03aa6b6a29954042174b59a0d1c Author: Jinank Jain Date: Mon Jan 2 07:12:53 2023 +0000 x86/hyperv: Add an interface to do nested hypercalls According to TLFS, in order to communicate to L0 hypervisor there needs to be an additional bit set in the control register. This communication is required to perform privileged instructions which can only be performed by L0 hypervisor. An example of that could be setting up the VMBus infrastructure. Signed-off-by: Jinank Jain Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/24f9d46d5259a688113e6e5e69e21002647f4949.1672639707.git.jinankjain@linux.microsoft.com Signed-off-by: Wei Liu commit 7fec185a56f45b98d9547982370c2ab33f0f72b5 Author: Jinank Jain Date: Mon Jan 2 07:12:52 2023 +0000 Drivers: hv: Setup synic registers in case of nested root partition Child partitions are free to allocate SynIC message and event page but in case of root partition it must use the pages allocated by Microsoft Hypervisor (MSHV). Base address for these pages can be found using synthetic MSRs exposed by MSHV. There is a slight difference in those MSRs for nested vs non-nested root partition. Signed-off-by: Jinank Jain Reviewed-by: Nuno Das Neves Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/cb951fb1ad6814996fc54f4a255c5841a20a151f.1672639707.git.jinankjain@linux.microsoft.com Signed-off-by: Wei Liu commit bc36d761cad7f3fec22cd97ddaa80f0120610181 Author: Padmanabhan Rajanbabu Date: Mon Jan 16 16:08:20 2023 +0530 ASoC: samsung: i2s: add support for FSD I2S Add support for enabling I2S controller on FSD platform. FSD I2S controller is based on Exynos7 I2S controller, supporting 2CH playback/capture in I2S mode and 7.1CH playback/capture in TDM mode. Signed-off-by: Padmanabhan Rajanbabu Link: https://lore.kernel.org/r/20230116103823.90757-3-p.rajanbabu@samsung.com Signed-off-by: Mark Brown commit 93d79d410c0b33ff7b31015b9c2459bb5cabf030 Author: Padmanabhan Rajanbabu Date: Mon Jan 16 16:08:19 2023 +0530 ASoC: dt-bindings: Add FSD I2S controller bindings Add bindings for FSD CPU DAI driver which supports stereo channel audio playback and capture on FSD platform. Signed-off-by: Padmanabhan Rajanbabu Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230116103823.90757-2-p.rajanbabu@samsung.com Signed-off-by: Mark Brown commit af9f44d3515119c7e8c8f30e5556e6a477f2f34e Author: Jouni Högander Date: Thu Jan 5 08:56:37 2023 +0200 drm/i915/psr: Implement Wa_14015648006 Add 4th pipe and extend TGL Wa_16013835468 to support ADLP, MTL and DG2 and all TGL steppings. BSpec: 54369, 55378, 66624 v3: - commit message modified v2: - apply for PSR1 as well - remove stepping information from comments Cc: Matt Roper Cc: José Roberto de Souza Cc: Stanislav Lisovskiy Signed-off-by: Mika Kahola Signed-off-by: Jouni Högander Reviewed-by: Matt Roper Signed-off-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20230105065637.2063311-1-jouni.hogander@intel.com commit d3e83448107b10bdd178c558aaed6411ce41e9d3 Author: Christian König Date: Tue Jan 17 13:30:08 2023 +0100 drm/ttm: fix some minor kerneldoc issues Pointed out by the kernel test robot while merging ttm_bo_api.h and ttm_bo_driver.h. Signed-off-by: Christian König Reported-by: kernel test robot Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20230117123345.387078-1-christian.koenig@amd.com commit 79ed18d9ece474c15a2578e1cc5bfb4fce7a8eb7 Author: Thierry Reding Date: Tue Nov 22 11:25:05 2022 +0100 arm64: tegra: Sort nodes by unit-address, then alphabetically Nodes in device tree should be sorted by unit-address, followed by nodes without a unit-address, sorted alphabetically. Some exceptions are the top-level aliases, chosen, firmware, memory and reserved-memory nodes, which are expected to come first. These rules apply recursively with some exceptions, such as pinmux nodes or regulator nodes, which often follow more complicated ordering (often by "importance"). While at it, change the name of some of the nodes to follow standard naming conventions, which helps with the sorting order and reduces the amount of warnings from the DT validation tools. Signed-off-by: Thierry Reding commit 2838cfddbc1c4e12dacf8219efb481ab11c114a4 Author: Thierry Reding Date: Thu Nov 17 09:38:34 2022 +0100 arm64: tegra: Bump #address-cells and #size-cells The #address-cells and #size-cells properties for the top-level bus were set to 1 because that was enough to represent the register ranges of all the IP blocks on that bus. However, most of these devices can do DMA to a larger address space, so translation of DMA addresses needs to happen in a 64-bit address space. Partially this was already done by the memory controller increasing that address space by setting #address-cells and #size-cells to 2, but a full DMA address translation would still cause truncation when traversing to the top-level bus. Fix this by setting #address-cells = <2> and #size-cells = <2> on the top-level bus and adjusting all "reg" and "ranges" properties of its children. While at it, also move the PCI and GPU nodes back under the top-level bus where they belong. The were put outside of it to work around this same problem. Signed-off-by: Thierry Reding commit c71e18973be1c0ce65dcb45bfd0e1e755bab6d26 Author: Thierry Reding Date: Tue Nov 22 10:23:29 2022 +0100 arm64: tegra: Sort includes Signed-off-by: Thierry Reding commit 29bcc1eaca315326d1cc883fbe9b451d1f9e3fa5 Author: Thierry Reding Date: Fri Nov 18 07:35:31 2022 +0100 arm64: tegra: Fix duplicate regulator on Jetson TX1 When the top-level regulators were renamed, the 1.2V camera regulator accidentally ended up with the same DT node name as the 1.8V camera regulator. Fixes: 097e01c61015 ("arm64: tegra: Rename top-level regulators") Signed-off-by: Thierry Reding commit 979ac5ef58d12aa71a364ddcc69b21cef3166439 Author: Thierry Reding Date: Thu Apr 14 14:04:09 2022 +0200 arm64: tegra: Fix typo in gpio-ranges property The gpio-ranges property name was missing a terminating "s", causing it to not be parsed and fail DT validation as well. Signed-off-by: Thierry Reding commit 52d22534690446d1f4b45436b570f77df3e855ba Author: Thomas Weißschuh Date: Thu Dec 22 05:10:51 2022 +0000 HID: Make lowlevel driver structs const Nothing is nor should be modifying these structs so mark them as const. Signed-off-by: Thomas Weißschuh Reviewed-by: David Rheinsberg Reviewed-by: Hans de Goede Signed-off-by: Jiri Kosina commit ebb45d6bee4e65329cf1ff322ad1ca3013b3346d Author: Thomas Weißschuh Date: Thu Dec 22 05:10:50 2022 +0000 HID: Unexport struct i2c_hid_ll_driver As there are no external users this implementation detail does not need to be exported. Signed-off-by: Thomas Weißschuh Reviewed-by: David Rheinsberg Reviewed-by: Hans de Goede Signed-off-by: Jiri Kosina commit 9e3c2efcae8e5bb220b3ebfde5e27d40b96314c2 Author: Thomas Weißschuh Date: Thu Dec 22 05:10:49 2022 +0000 HID: Unexport struct hidp_hid_driver As there are no external users this implementation detail does not need to be exported. Signed-off-by: Thomas Weißschuh Reviewed-by: David Rheinsberg Reviewed-by: Hans de Goede Signed-off-by: Jiri Kosina commit 8482aa2399e55b994e480a902ba86057f52887f4 Author: Thomas Weißschuh Date: Thu Dec 22 05:10:48 2022 +0000 HID: Unexport struct uhid_hid_driver As there are no external users this implementation detail does not need to be exported. Signed-off-by: Thomas Weißschuh Reviewed-by: David Rheinsberg Reviewed-by: Hans de Goede Signed-off-by: Jiri Kosina commit 6dbe965a922f60471c4363f45c9e5d398310b811 Author: Thomas Weißschuh Date: Thu Dec 22 05:10:47 2022 +0000 HID: Unexport struct usb_hid_driver As no external users remain this implementation detail does not need to be exported anymore. Signed-off-by: Thomas Weißschuh Reviewed-by: David Rheinsberg Reviewed-by: Hans de Goede Signed-off-by: Jiri Kosina commit 1d9ca84ce034960707b62ce7d5ca75d04f8db91a Author: Thomas Weißschuh Date: Thu Dec 22 05:10:46 2022 +0000 HID: Remove unused function hid_is_using_ll_driver() As the last user was removed we can delete this function. Signed-off-by: Thomas Weißschuh Reviewed-by: David Rheinsberg Reviewed-by: Hans de Goede Signed-off-by: Jiri Kosina commit 8c3e24065e3d37ee4787e6c72aa0ab6460db7598 Author: Thomas Weißschuh Date: Thu Dec 22 05:10:45 2022 +0000 HID: usbhid: Make hid_is_usb() non-inline By making hid_is_usb() a non-inline function the lowlevel usbhid driver does not have to be exported anymore. Also mark the argument as const as it is not modified. Signed-off-by: Thomas Weißschuh Reviewed-by: David Rheinsberg Reviewed-by: Hans de Goede Signed-off-by: Jiri Kosina commit 2bafbef6ff4eebec93267b060cc6f83f25505b1b Author: Thomas Weißschuh Date: Thu Dec 22 05:10:44 2022 +0000 HID: letsketch: Use hid_is_usb() Don't open code existing functionality. Signed-off-by: Thomas Weißschuh Reviewed-by: David Rheinsberg Reviewed-by: Hans de Goede Signed-off-by: Jiri Kosina commit 0c68c8e5ec68262b6aee7cdbc32d95f4f1599fc8 Author: Andrew Lunn Date: Sun Jan 15 17:42:03 2023 +0100 net: mdio: cavium: Remove unneeded simicolons The recent refactoring to split C22 and C45 introduced two unneeded semiconons which the kernel test bot reported. Remove them. Reported-by: kernel test robot Fixes: 93641ecbaa1f ("net: mdio: cavium: Separate C22 and C45 transactions") Signed-off-by: Andrew Lunn Reviewed-by: Michael Walle Link: https://lore.kernel.org/r/20230115164203.510615-1-andrew@lunn.ch Signed-off-by: Paolo Abeni commit 179340dd4b39932a16f7db59998942494046b5a1 Author: Jiapeng Chong Date: Tue Jan 10 15:30:58 2023 +0200 wifi: ath10k: Remove the unused function ath10k_ce_shadow_src_ring_write_index_set() The function ath10k_ce_shadow_src_ring_write_index_set is defined in the ce.c file, but not called elsewhere, so remove this unused function. drivers/net/wireless/ath/ath10k/ce.c:212:1: warning: unused function 'ath10k_ce_shadow_dest_ring_write_index_set'. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3519 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221219132041.91418-1-jiapeng.chong@linux.alibaba.com commit e5e94d10c85653609a2893c8d0ef24a27471b68f Author: Wen Gong Date: Tue Jan 10 15:30:58 2023 +0200 wifi: ath11k: add channel 177 into 5 GHz channel list Add support for the 5 GHz channel 177 with center frequency 5885 MHz and operating class 125 per IEEE Std 802.11ax-2021, Table E-4. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3 Signed-off-by: Wen Gong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221220101912.30816-1-quic_wgong@quicinc.com commit a27c6a5853eb9d4f293b99be73a6891fe88263c7 Author: Sowmiya Sree Elavalagan Date: Tue Jan 10 15:30:57 2023 +0200 wifi: ath11k: Add support to configure FTM responder role Fine Timing Measurement(FTM) support is used to measure round trip time between two nodes. Enable FTM responder feature using hw_params on supported device. Since FTM functionality is offloaded to firmware, adding the interface allows user space to enable or disable FTM responder. Also add support for advertising the same in extended capabilities. QCA6390, WCN6855 and WCN6750 do not support this feature. 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 Signed-off-by: Sowmiya Sree Elavalagan Signed-off-by: Raj Kumar Bhagat Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221220044435.10506-1-quic_rajkbhag@quicinc.com commit 8a2f35b9830692f7a616f2f627f943bc748af13a Author: Minsuk Kang Date: Wed Jan 4 21:41:30 2023 +0900 wifi: ath9k: Fix potential stack-out-of-bounds write in ath9k_wmi_rsp_callback() Fix a stack-out-of-bounds write that occurs in a WMI response callback function that is called after a timeout occurs in ath9k_wmi_cmd(). The callback writes to wmi->cmd_rsp_buf, a stack-allocated buffer that could no longer be valid when a timeout occurs. Set wmi->last_seq_id to 0 when a timeout occurred. Found by a modified version of syzkaller. BUG: KASAN: stack-out-of-bounds in ath9k_wmi_ctrl_rx Write of size 4 Call Trace: memcpy ath9k_wmi_ctrl_rx ath9k_htc_rx_msg ath9k_hif_usb_reg_in_cb __usb_hcd_giveback_urb usb_hcd_giveback_urb dummy_timer call_timer_fn run_timer_softirq __do_softirq irq_exit_rcu sysvec_apic_timer_interrupt Fixes: fb9987d0f748 ("ath9k_htc: Support for AR9271 chipset.") Signed-off-by: Minsuk Kang Acked-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230104124130.10996-1-linuxlovemin@yonsei.ac.kr commit 0af54343a76263a12dbae7fafb64eb47c4a6ad38 Author: Fedor Pchelkin Date: Wed Jan 4 15:36:15 2023 +0300 wifi: ath9k: hif_usb: clean up skbs if ath9k_hif_usb_rx_stream() fails Syzkaller detected a memory leak of skbs in ath9k_hif_usb_rx_stream(). While processing skbs in ath9k_hif_usb_rx_stream(), the already allocated skbs in skb_pool are not freed if ath9k_hif_usb_rx_stream() fails. If we have an incorrect pkt_len or pkt_tag, the input skb is considered invalid and dropped. All the associated packets already in skb_pool should be dropped and freed. Added a comment describing this issue. The patch also makes remain_skb NULL after being processed so that it cannot be referenced after potential free. The initialization of hif_dev fields which are associated with remain_skb (rx_remain_len, rx_transfer_len and rx_pad_len) is moved after a new remain_skb is allocated. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Fixes: 6ce708f54cc8 ("ath9k: Fix out-of-bound memcpy in ath9k_hif_usb_rx_stream") Fixes: 44b23b488d44 ("ath9k: hif_usb: Reduce indent 1 column") Reported-by: syzbot+e9632e3eb038d93d6bc6@syzkaller.appspotmail.com Signed-off-by: Fedor Pchelkin Signed-off-by: Alexey Khoroshilov Acked-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230104123615.51511-1-pchelkin@ispras.ru commit 9b25e3985477ac3f02eca5fc1e0cc6850a3f7e69 Author: Fedor Pchelkin Date: Wed Jan 4 15:35:46 2023 +0300 wifi: ath9k: htc_hst: free skb in ath9k_htc_rx_msg() if there is no callback function It is stated that ath9k_htc_rx_msg() either frees the provided skb or passes its management to another callback function. However, the skb is not freed in case there is no another callback function, and Syzkaller was able to cause a memory leak. Also minor comment fix. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Fixes: fb9987d0f748 ("ath9k_htc: Support for AR9271 chipset.") Reported-by: syzbot+e008dccab31bd3647609@syzkaller.appspotmail.com Reported-by: syzbot+6692c72009680f7c4eb2@syzkaller.appspotmail.com Signed-off-by: Fedor Pchelkin Signed-off-by: Alexey Khoroshilov Acked-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230104123546.51427-1-pchelkin@ispras.ru commit 28a35ac2f5f8719a6451932d7ab6b6b3d264a3aa Author: Rafael J. Wysocki Date: Tue Jan 10 18:58:05 2023 +0100 ACPI: PNP: Introduce list of known non-PNP devices In some cases, PNP device IDs from acpi_pnp_device_ids[] are returned by _CID for devices for which matching platform drivers are present in the kernel and should be bound to them. However, the IDs coming from _CID cause the PNP scan handler to attach to those devices which prevents platform device objects from being created for them. Address this by introducing a list of known non-PNP device IDs into acpi_pnp.c such that if a device ID is there in that list, it cannot be attached to by the PNP scan handler and add the platform runtime update and telemetry device IDs to that list to start with. Reported-by: Chen Yu Signed-off-by: Rafael J. Wysocki Tested-by: Zhang Yang commit d0e99511834b6828c960e978d9a8cb6e5731250d Merge: de7d0ff301fcc 80f8a66dede0a Author: Kalle Valo Date: Tue Jan 17 13:36:25 2023 +0200 Merge wireless into wireless-next Due to the two cherry picked commits from wireless to wireless-next we have several conflicts in mt76. To avoid any bugs with conflicts merge wireless into wireless-next. 96f134dc1964 wifi: mt76: handle possible mt76_rx_token_consume failures fe13dad8992b wifi: mt76: dma: do not increment queue head if mt76_dma_add_buf fails commit 56a14f01a54568e049e22c46ffc654602bbd01d1 Author: Padmanabhan Rajanbabu Date: Mon Jan 16 16:08:23 2023 +0530 arm64: dts: fsd: Add sound card node for Tesla FSD Add device tree node support for sound card on Tesla FSD platform Signed-off-by: Padmanabhan Rajanbabu Link: https://lore.kernel.org/r/20230116103823.90757-6-p.rajanbabu@samsung.com Signed-off-by: Krzysztof Kozlowski commit be8599d07a6a184a790054b9b229c0b37e418014 Author: Padmanabhan Rajanbabu Date: Mon Jan 16 16:08:22 2023 +0530 arm64: dts: fsd: Add codec node for Tesla FSD Add device tree node support for codec on Tesla FSD platform. Signed-off-by: Padmanabhan Rajanbabu Link: https://lore.kernel.org/r/20230116103823.90757-5-p.rajanbabu@samsung.com Signed-off-by: Krzysztof Kozlowski commit 7f62af80dc62b82bc18f72c674e4c81c5ecbfe37 Author: Padmanabhan Rajanbabu Date: Mon Jan 16 16:08:21 2023 +0530 arm64: dts: fsd: Add I2S DAI node for Tesla FSD Add device tree node for I2S0 and I2S1 CPU DAI instances for Tesla FSD platform. FSD SoC has 2 I2S instances driving stereo channel I2S audio playback and capture with external DMA support. Signed-off-by: Padmanabhan Rajanbabu Link: https://lore.kernel.org/r/20230116103823.90757-4-p.rajanbabu@samsung.com Signed-off-by: Krzysztof Kozlowski commit 21cbd90a6fab7123905386985e3e4a80236b8714 Author: Pietro Borrello Date: Sat Jan 14 13:11:41 2023 +0000 inet: fix fast path in __inet_hash_connect() __inet_hash_connect() has a fast path taken if sk_head(&tb->owners) is equal to the sk parameter. sk_head() returns the hlist_entry() with respect to the sk_node field. However entries in the tb->owners list are inserted with respect to the sk_bind_node field with sk_add_bind_node(). Thus the check would never pass and the fast path never execute. This fast path has never been executed or tested as this bug seems to be present since commit 1da177e4c3f4 ("Linux-2.6.12-rc2"), thus remove it to reduce code complexity. Signed-off-by: Pietro Borrello Reviewed-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20230112-inet_hash_connect_bind_head-v3-1-b591fd212b93@diag.uniroma1.it Signed-off-by: Paolo Abeni commit 7875c0189c0d19cb96f2002cb8da6ba447ccc700 Merge: 05cb8b39ca59e 08a764a7c51b0 Author: Paolo Abeni Date: Tue Jan 17 11:36:47 2023 +0100 Merge branch 'net-ethernet-mtk_wed-introduce-reset-support' Lorenzo Bianconi says: ==================== net: ethernet: mtk_wed: introduce reset support Introduce proper reset integration between ethernet and wlan drivers in order to schedule wlan driver reset when ethernet/wed driver is resetting. Introduce mtk_hw_reset_monitor work in order to detect possible DMA hangs. ==================== Link: https://lore.kernel.org/r/cover.1673715298.git.lorenzo@kernel.org Signed-off-by: Paolo Abeni commit 08a764a7c51b01ccf8594a36b8d24b2d643bc5ed Author: Lorenzo Bianconi Date: Sat Jan 14 18:01:32 2023 +0100 net: ethernet: mtk_wed: add reset/reset_complete callbacks Introduce reset and reset_complete wlan callback to schedule WLAN driver reset when ethernet/wed driver is resetting. Tested-by: Daniel Golle Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: Paolo Abeni commit 93b2591ad0d0c1dee6974ecb4efb016c543894ae Author: Lorenzo Bianconi Date: Sat Jan 14 18:01:31 2023 +0100 net: ethernet: mtk_eth_soc: add dma checks to mtk_hw_reset_check Introduce mtk_hw_check_dma_hang routine to monitor possible dma hangs. Reviewed-by: Leon Romanovsky Tested-by: Daniel Golle Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: Paolo Abeni commit 06127504c282e3e668581b5a1f410980c0c6c064 Author: Lorenzo Bianconi Date: Sat Jan 14 18:01:30 2023 +0100 net: ethernet: mtk_eth_soc: align reset procedure to vendor sdk Avoid to power-down the ethernet chip during hw reset and align reset procedure to vendor sdk. Reviewed-by: Leon Romanovsky Tested-by: Daniel Golle Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: Paolo Abeni commit a9724b9c477f63b834bc303b2fc0b1abdd3815de Author: Lorenzo Bianconi Date: Sat Jan 14 18:01:29 2023 +0100 net: ethernet: mtk_eth_soc: introduce mtk_hw_warm_reset support Introduce mtk_hw_warm_reset utility routine. This is a preliminary patch to align reset procedure to vendor sdk and avoid to power down the chip during hw reset. Reviewed-by: Leon Romanovsky Tested-by: Daniel Golle Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: Paolo Abeni commit bccd19bce0b6cfcd8bb664718da2341cddf19532 Author: Lorenzo Bianconi Date: Sat Jan 14 18:01:28 2023 +0100 net: ethernet: mtk_eth_soc: introduce mtk_hw_reset utility routine This is a preliminary patch to add Wireless Ethernet Dispatcher reset support. Reviewed-by: Leon Romanovsky Tested-by: Daniel Golle Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: Paolo Abeni commit cddf70d0bce71c2ad69b7bef7a9f20d8104cbfd8 Author: Bartosz Golaszewski Date: Thu Dec 29 17:00:44 2022 +0100 i2c: dev: fix notifier return values We have a set of return values that notifier callbacks can return. They should not return 0, error codes or anything other than those predefined values. Make the i2c character device's callback return NOTIFY_DONE or NOTIFY_OK depending on the situation. Signed-off-by: Bartosz Golaszewski Signed-off-by: Wolfram Sang commit 6ce3563520be90a155706bafc186fc264a13850e Author: Mika Westerberg Date: Wed Mar 23 16:45:39 2022 +0200 thunderbolt: Add support for DisplayPort bandwidth allocation mode The USB4 spec defines an optional feature that allows the connection manager to negotiate with the graphics through DPCD registers changes in the bandwidth allocation dynamically. This is referred as "bandwidth allocation mode" in the spec. The connection manager uses DP IN adapters registers to communicate with the graphics, and also gets notifications from these adapters when the graphics wants to change the bandwidth allocation. Both the connection manager and the graphics driver needs to support this. We check if the DP IN adapter supports this and if it does enable it before establishing a DP tunnel. Then we react on DP_BW notifications coming from the DP IN adapter and update the bandwidth allocation accordingly (within the maximum common capabilities the DP IN/OUT support). Signed-off-by: Mika Westerberg commit 630f211be7c0a8cf693fef2b6d77d0ac357041e0 Author: Mika Westerberg Date: Fri Apr 29 17:14:57 2022 +0300 thunderbolt: Include the additional DP IN double word in debugfs dump When DisplayPort bandwidth allocation mode is supported by the DP IN adapter it has an extra double word in the adapter config space. Include this in the debugfs register dump. Signed-off-by: Mika Westerberg commit e327380133d96a7a71baca65a809bf65609a1a69 Author: Mika Westerberg Date: Wed Mar 23 16:18:28 2022 +0200 thunderbolt: Add functions to support DisplayPort bandwidth allocation mode USB4 spec defines an additional feature that DP IN adapters can implement (alongside with the graphics DPCD register set) to support more dynamic bandwidth management for DisplayPort tunnels. For the connection manager the communication happens through the DP IN adapter using a set of registers in the adapter config space allocated for this. Add functions that export this functionality for the rest of the driver. Signed-off-by: Mika Westerberg commit fe1a1cf7c97028570127ac8d222c2b451ba04278 Author: Mika Westerberg Date: Sun Jun 19 18:02:48 2022 +0300 thunderbolt: Increase timeout of DP OUT adapter handshake Sometimes the current timeout is not enough so increase it to 1500 ms and while there make the loop use ktime instead. Signed-off-by: Mika Westerberg commit e70a8f36987da50b9f443173f8800795f70266da Author: Mika Westerberg Date: Wed Mar 23 16:13:32 2022 +0200 thunderbolt: Take CL states into account when waiting for link to come up If CL states are enabled for the link it may be in these states too when reading the lane adapter state but it will enter CL0 as soon as there is traffic in the high-speed lanes. Upon discovery we want to make sure that is accounted as the link being up, otherwise we end up tearing down the topology with no good reason. Signed-off-by: Mika Westerberg commit 2426fdf77afb4d78316585531a4069905a5accc7 Author: Mika Westerberg Date: Thu May 5 13:59:21 2022 +0300 thunderbolt: Improve debug logging in tb_available_bandwidth() This makes it easier to see what is going on when bandwidth is being allocated for tunneling. Signed-off-by: Mika Westerberg commit b0ef48fc95cc2ce042fd5ad85d193e8a57502094 Author: Mika Westerberg Date: Thu Jun 2 12:50:20 2022 +0300 thunderbolt: Log DP adapter type This makes it easier to see from the debug logs what type of DisplayPort adapter is in use or available. No functional changes. Signed-off-by: Mika Westerberg commit 49f2b350f330cf600cf0563fa3e55ba1c1799440 Author: Mika Westerberg Date: Thu May 5 13:58:04 2022 +0300 thunderbolt: Use decimal port number in control and tunnel logs too Use decimal number instead of hex in port numbers as we have been doing with other logging functions too. This makes the output more consistent. Signed-off-by: Mika Westerberg commit 1cea99593c9e6991766765b8825e62da37da9ec2 Author: Viorel Suman Date: Tue Jan 17 11:19:56 2023 +0200 thermal/drivers/imx_sc_thermal: Add iMX8QM sensors Add iMX8QM sensors. As stated in 31fd4b9db13b ("thermal/drivers/imx_sc: Rely on the platform data to get the resource id"): The thermal OF code returns -ENODEV if the thermal zone registration with a specific id fails because the description is not available in the DT for such a sensor id. In this case we continue with the other ids without bailing out with an error. Signed-off-by: Viorel Suman Reviewed-by: Dong Aisheng Link: https://lore.kernel.org/r/20230117091956.61729-2-viorel.suman@oss.nxp.com Signed-off-by: Daniel Lezcano commit 4b26b7c9cdefdcb478047c30901d2379ef9e50fc Author: Viorel Suman Date: Tue Jan 17 11:19:55 2023 +0200 thermal/drivers/imx_sc_thermal: Fix the loop condition The minimal resource ID is 0: IMX_SC_R_AP_0=0, so fix the loop condition. Aside of this - constify the array. Fixes: 31fd4b9db13b ("thermal/drivers/imx_sc: Rely on the platform data to get the resource id") Signed-off-by: Viorel Suman Reviewed-by: Dong Aisheng Link: https://lore.kernel.org/r/20230117091956.61729-1-viorel.suman@oss.nxp.com Signed-off-by: Daniel Lezcano commit 05cb8b39ca59e7bc4e0810a66f59266d76e4671a Merge: 501543b4fff0f eedade12f4cb7 Author: Paolo Abeni Date: Tue Jan 17 10:27:31 2023 +0100 Merge branch 'net-use-kmem_cache_free_bulk-in-kfree_skb_list' Jesper Dangaard Brouer says: ==================== net: use kmem_cache_free_bulk in kfree_skb_list The kfree_skb_list function walks SKB (via skb->next) and frees them individually to the SLUB/SLAB allocator (kmem_cache). It is more efficient to bulk free them via the kmem_cache_free_bulk API. Netstack NAPI fastpath already uses kmem_cache bulk alloc and free APIs for SKBs. The kfree_skb_list call got an interesting optimization in commit 520ac30f4551 ("net_sched: drop packets after root qdisc lock is released") that can create a list of SKBs "to_free" e.g. when qdisc enqueue fails or deliberately chooses to drop . It isn't a normal data fastpath, but the situation will likely occur when system/qdisc are under heavy workloads, thus it makes sense to use a faster API for freeing the SKBs. E.g. the (often distro default) qdisc fq_codel will drop batches of packets from fattest elephant flow, default capped at 64 packets (but adjustable via tc argument drop_batch). Performance measurements done in [1]: [1] https://github.com/xdp-project/xdp-project/blob/master/areas/mem/kfree_skb_list01.org ==================== Link: https://lore.kernel.org/r/167361788585.531803.686364041841425360.stgit@firesoul Signed-off-by: Paolo Abeni commit eedade12f4cb7284555c4c0314485e9575c70ab7 Author: Jesper Dangaard Brouer Date: Fri Jan 13 14:52:04 2023 +0100 net: kfree_skb_list use kmem_cache_free_bulk The kfree_skb_list function walks SKB (via skb->next) and frees them individually to the SLUB/SLAB allocator (kmem_cache). It is more efficient to bulk free them via the kmem_cache_free_bulk API. This patches create a stack local array with SKBs to bulk free while walking the list. Bulk array size is limited to 16 SKBs to trade off stack usage and efficiency. The SLUB kmem_cache "skbuff_head_cache" uses objsize 256 bytes usually in an order-1 page 8192 bytes that is 32 objects per slab (can vary on archs and due to SLUB sharing). Thus, for SLUB the optimal bulk free case is 32 objects belonging to same slab, but runtime this isn't likely to occur. The expected gain from using kmem_cache bulk alloc and free API have been assessed via a microbencmark kernel module[1]. The module 'slab_bulk_test01' results at bulk 16 element: kmem-in-loop Per elem: 109 cycles(tsc) 30.532 ns (step:16) kmem-bulk Per elem: 64 cycles(tsc) 17.905 ns (step:16) More detailed description of benchmarks avail in [2]. [1] https://github.com/netoptimizer/prototype-kernel/tree/master/kernel/mm [2] https://github.com/xdp-project/xdp-project/blob/master/areas/mem/kfree_skb_list01.org V2: rename function to kfree_skb_add_bulk. Reviewed-by: Saeed Mahameed Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Paolo Abeni commit a4650da2a2d6150a8ff1ea36fde9f6a26cf5fda3 Author: Jesper Dangaard Brouer Date: Fri Jan 13 14:51:59 2023 +0100 net: fix call location in kfree_skb_list_reason The SKB drop reason uses __builtin_return_address(0) to give the call "location" to trace_kfree_skb() tracepoint skb:kfree_skb. To keep this stable for compilers kfree_skb_reason() is annotated with __fix_address (noinline __noclone) as fixed in commit c205cc7534a9 ("net: skb: prevent the split of kfree_skb_reason() by gcc"). The function kfree_skb_list_reason() invoke kfree_skb_reason(), which cause the __builtin_return_address(0) "location" to report the unexpected address of kfree_skb_list_reason. Example output from 'perf script': kpktgend_0 1337 [000] 81.002597: skb:kfree_skb: skbaddr=0xffff888144824700 protocol=2048 location=kfree_skb_list_reason+0x1e reason: QDISC_DROP Patch creates an __always_inline __kfree_skb_reason() helper call that is called from both kfree_skb_list() and kfree_skb_list_reason(). Suggestions for solutions that shares code better are welcome. As preparation for next patch move __kfree_skb() invocation out of this helper function. Reviewed-by: Saeed Mahameed Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Paolo Abeni commit 501543b4fff0ff70bde28a829eb8835081ccef2f Author: Dan Carpenter Date: Fri Jan 13 10:35:43 2023 +0300 devlink: remove some unnecessary code This code checks if (attrs[DEVLINK_ATTR_TRAP_POLICER_ID]) twice. Once at the start of the function and then a couple lines later. Delete the second check since that one must be true. Because the second condition is always true, it means the: policer_item = group_item->policer_item; assignment is immediately over-written. Delete that as well. Signed-off-by: Dan Carpenter Reviewed-by: Jiri Pirko Acked-by: Jakub Kicinski Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/Y8EJz8oxpMhfiPUb@kili Signed-off-by: Paolo Abeni commit ad4ce0789033529673aa69ef1568ac37f38f9f27 Author: Jayesh Choudhary Date: Tue Jan 17 10:48:55 2023 +0530 dmaengine: ti: k3-udma: remove non-fatal probe deferral log Drop the non-fatal probe deferral log for getting MSI domain. This makes the kernel log clean and we do not get recurring logs stating: "Failed to get MSI domain". Signed-off-by: Jayesh Choudhary Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230117051855.29644-1-j-choudhary@ti.com Signed-off-by: Vinod Koul commit 681eb1674697c7e730cd523f2a5c637b7796df0c Merge: 597688792c4d9 373c612d72461 Author: Wolfram Sang Date: Tue Jan 17 09:50:02 2023 +0100 Merge branch 'i2c/fwnode-api' into i2c/for-mergewindow commit 0349b8779cc949ad9e6aced32672ee48cf79b497 Author: Hangbin Liu Date: Fri Jan 13 11:43:53 2023 +0800 sched: add new attr TCA_EXT_WARN_MSG to report tc extact message We will report extack message if there is an error via netlink_ack(). But if the rule is not to be exclusively executed by the hardware, extack is not passed along and offloading failures don't get logged. In commit 81c7288b170a ("sched: cls: enable verbose logging") Marcelo made cls could log verbose info for offloading failures, which helps improving Open vSwitch debuggability when using flower offloading. It would also be helpful if userspace monitor tools, like "tc monitor", could log this kind of message, as it doesn't require vswitchd log level adjusment. Let's add a new tc attributes to report the extack message so the monitor program could receive the failures. e.g. # tc monitor added chain dev enp3s0f1np1 parent ffff: chain 0 added filter dev enp3s0f1np1 ingress protocol all pref 49152 flower chain 0 handle 0x1 ct_state +trk+new not_in_hw action order 1: gact action drop random type none pass val 0 index 1 ref 1 bind 1 Warning: mlx5_core: matching on ct_state +new isn't supported. In this patch I only report the extack message on add/del operations. It doesn't look like we need to report the extack message on get/dump operations. Note this message not only reporte to multicast groups, it could also be reported unicast, which may affect the current usersapce tool's behaivor. Suggested-by: Marcelo Ricardo Leitner Signed-off-by: Hangbin Liu Acked-by: Jakub Kicinski Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20230113034353.2766735-1-liuhangbin@gmail.com Signed-off-by: Paolo Abeni commit 373c612d72461ddaea223592df31e62c934aae61 Author: Russell King (Oracle) Date: Wed Jan 11 10:54:21 2023 +0000 i2c: add fwnode APIs Add fwnode APIs for finding and getting I2C adapters, which will be used by the SFP code. These are passed the fwnode corresponding to the adapter, and return the I2C adapter. It is the responsibility of the caller to find the appropriate fwnode. We keep the DT and ACPI interfaces, but where appropriate, recode them to use the fwnode interfaces internally. Reviewed-by: Mika Westerberg Signed-off-by: Russell King (Oracle) Signed-off-by: Wolfram Sang commit 59437c79cab5ab33103a2bf09cc6ca157a8ce17d Author: Thomas Zimmermann Date: Mon Jan 16 13:10:23 2023 +0100 drm/ttm: Include to fix MIPS build On MIPS, vmap() and vunmap() are undeclared in ttm_bo_util.c. An error message is shown below. CC drivers/gpu/drm/ttm/ttm_bo_util.o ../drivers/gpu/drm/ttm/ttm_bo_util.c: In function 'ttm_bo_kmap_ttm': ../drivers/gpu/drm/ttm/ttm_bo_util.c:364:32: error: implicit declaration of function 'vmap'; did you mean 'kmap'? [-Werror=implicit-function-declaration] 364 | map->virtual = vmap(ttm->pages + start_page, num_pages, | ^~~~ | kmap ../drivers/gpu/drm/ttm/ttm_bo_util.c:364:30: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 364 | map->virtual = vmap(ttm->pages + start_page, num_pages, | ^ ../drivers/gpu/drm/ttm/ttm_bo_util.c: In function 'ttm_bo_kunmap': ../drivers/gpu/drm/ttm/ttm_bo_util.c:429:17: error: implicit declaration of function 'vunmap'; did you mean 'kunmap'? [-Werror=implicit-function-declaration] 429 | vunmap(map->virtual); | ^~~~~~ | kunmap ../drivers/gpu/drm/ttm/ttm_bo_util.c: In function 'ttm_bo_vmap': ../drivers/gpu/drm/ttm/ttm_bo_util.c:509:23: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 509 | vaddr = vmap(ttm->pages, ttm->num_pages, 0, prot); | ^ Fix this by including . Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20230116121023.14245-1-tzimmermann@suse.de commit 2a397a23a565db8db8d30a24b81d349658125c5a Author: Manivannan Sadhasivam Date: Sat Jan 14 12:40:09 2023 +0530 phy: qcom-qmp-ufs: Add HS G4 mode support to SC8280XP SoC UFS PHY in SC8280XP SoC is capable of operating at HS G4 mode and the init sequence is compatible with SM8350. Hence, add the tbls_hs_g4 instance reusing the G4 init sequence of SM8350. Reviewed-by: Dmitry Baryshkov Tested-by: Andrew Halaney # Qdrive3/sa8540p-ride Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20230114071009.88102-13-manivannan.sadhasivam@linaro.org Signed-off-by: Vinod Koul commit 8d0fb02ce5c95ecbb0994d78669bcbb2b90fa408 Author: Manivannan Sadhasivam Date: Sat Jan 14 12:40:08 2023 +0530 phy: qcom-qmp-ufs: Add HS G4 mode support to SM8450 SoC UFS PHY in SM8450 SoC is capable of operating at HS G4 mode and the init sequence is compatible with SM8350. Hence, add the tbls_hs_g4 instance reusing the G4 init sequence of SM8350. Reviewed-by: Dmitry Baryshkov Tested-by: Andrew Halaney # Qdrive3/sa8540p-ride Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20230114071009.88102-12-manivannan.sadhasivam@linaro.org Signed-off-by: Vinod Koul commit 90c64cc05fd6d9d516174c6e5f0e02cc5ada9101 Author: Manivannan Sadhasivam Date: Sat Jan 14 12:40:07 2023 +0530 phy: qcom-qmp-ufs: Add HS G4 mode support to SM8350 SoC UFS PHY in SM8350 SoC is capable of operating at HS G4 mode. Hence, add the required register settings using the tables_hs_g4 struct instance. Reviewed-by: Dmitry Baryshkov Tested-by: Andrew Halaney # Qdrive3/sa8540p-ride Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20230114071009.88102-11-manivannan.sadhasivam@linaro.org Signed-off-by: Vinod Koul commit 0d46b98d3a65c4de979073728cdf4c2ad896b767 Author: Manivannan Sadhasivam Date: Sat Jan 14 12:40:06 2023 +0530 phy: qcom-qmp-ufs: Avoid setting HS G3 specific registers SM8350 default init sequence sets some PCS registers to HS G3, thereby disabling HS G4 mode. This has the effect on MPHY capability negotiation between the host and the device during link startup and causes the PA_MAXHSGEAR to G3 irrespective of device max gear. Due to that, the agreed gear speed determined by the UFS core will become G3 only and the platform won't run at G4. So, let's remove setting these registers for SM8350 as like other G4 compatible platforms. One downside of this is that, when the board design uses non-G4 compatible device, then MPHY will continue to run in the default mode (G4) even if UFSHCD runs in G3. But this is the case for other platforms as well. Tested-by: Andrew Halaney # Qdrive3/sa8540p-ride Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20230114071009.88102-10-manivannan.sadhasivam@linaro.org Signed-off-by: Vinod Koul commit 692b65516080302c2782bb7bae12e086f137313d Author: Manivannan Sadhasivam Date: Sat Jan 14 12:40:05 2023 +0530 phy: qcom-qmp-ufs: Add HS G4 mode support to SM8250 SoC UFS PHY in SM8250 SoC is capable of operating at HS G4 mode. Hence, add the required register settings using the tables_hs_g4 struct instance. This also requires a separate qmp_phy_cfg for SM8250 instead of reusing SM8150. Reviewed-by: Dmitry Baryshkov Tested-by: Andrew Halaney # Qdrive3/sa8540p-ride Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20230114071009.88102-9-manivannan.sadhasivam@linaro.org Signed-off-by: Vinod Koul commit f89dcb24e2ec7edc80f2f56dfa8b3fd22f311561 Author: Manivannan Sadhasivam Date: Sat Jan 14 12:40:04 2023 +0530 phy: qcom-qmp-ufs: Add HS G4 mode support to SM8150 SoC UFS PHY in SM8150 SoC is capable of operating at HS G4 mode. Hence, add the required register settings using the tables_hs_g4 struct instance. Reviewed-by: Dmitry Baryshkov Tested-by: Andrew Halaney # Qdrive3/sa8540p-ride Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20230114071009.88102-8-manivannan.sadhasivam@linaro.org Signed-off-by: Vinod Koul commit 0cf7620e8e39a5b6c8707e3eb18f7d38c042dba7 Author: Manivannan Sadhasivam Date: Sat Jan 14 12:40:03 2023 +0530 phy: qcom-qmp-ufs: Move HS Rate B register setting to tbls_hs_b Since now there is support for configuring the HS Rate B mode properly, let's move the register setting to tbls_hs_b struct for all SoCs. This allows the PHY to be configured in Rate A initially and then in Rate B if requested by the UFS driver. Reviewed-by: Dmitry Baryshkov Tested-by: Andrew Halaney # Qdrive3/sa8540p-ride Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20230114071009.88102-7-manivannan.sadhasivam@linaro.org Signed-off-by: Vinod Koul commit baf8d17e2cd1e73ca7c0a97224b3b6c934b879d4 Author: Manivannan Sadhasivam Date: Sat Jan 14 12:40:02 2023 +0530 phy: qcom-qmp-ufs: Add support for configuring PHY in HS G4 mode Add separate tables_hs_g4 instance to allow the PHY driver to configure the PHY in HS G4 mode. The individual SoC configs need to supply the Rx, Tx and PCS register setting in tables_hs_g4 and the UFS driver can request the Hs G4 mode by calling phy_set_mode_ext() with submode set to UFS_HS_G4. Reviewed-by: Dmitry Baryshkov Tested-by: Andrew Halaney # Qdrive3/sa8540p-ride Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20230114071009.88102-6-manivannan.sadhasivam@linaro.org Signed-off-by: Vinod Koul commit 69d2f980b68d9c3a50220ac1619210a8701f9474 Author: Manivannan Sadhasivam Date: Sat Jan 14 12:40:01 2023 +0530 phy: qcom-qmp-ufs: Add support for configuring PHY in HS Series B mode Add separate tables_hs_b instance to allow the PHY driver to configure the PHY in HS Series B mode. The individual SoC configs need to supply the serdes register setting in tables_hs_b and the UFS driver can request the Series B mode by calling phy_set_mode() with mode set to PHY_MODE_UFS_HS_B. Reviewed-by: Dmitry Baryshkov Tested-by: Andrew Halaney # Qdrive3/sa8540p-ride Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20230114071009.88102-5-manivannan.sadhasivam@linaro.org Signed-off-by: Vinod Koul commit c9a7b0ddb54d6b10cf91e624e491350f656c1ce3 Author: Manivannan Sadhasivam Date: Sat Jan 14 12:40:00 2023 +0530 phy: qcom-qmp-ufs: Move register settings to qmp_phy_cfg_tbls struct As done for Qcom PCIe PHY driver, let's move the register settings to the common qmp_phy_cfg_tbls struct. This helps in adding any additional PHY settings needed for functionalities like HS-G4 in the future by adding one more instance of the qmp_phy_cfg_tbls. Reviewed-by: Dmitry Baryshkov Tested-by: Andrew Halaney # Qdrive3/sa8540p-ride Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20230114071009.88102-4-manivannan.sadhasivam@linaro.org Signed-off-by: Vinod Koul commit fcfcae3b7525c001eb8e1f40013313107846975c Author: Manivannan Sadhasivam Date: Sat Jan 14 12:39:59 2023 +0530 phy: qcom-qmp-ufs: Rename MSM8996 PHY definitions Only MSM8996 is using "_ufs_" naming convention for PHY definitions instead of "_ufsphy_" as like other SoCs. So to maintain the uniformity, let's rename all of the definitions to use "_ufsphy_". Reviewed-by: Dmitry Baryshkov Tested-by: Andrew Halaney # Qdrive3/sa8540p-ride Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20230114071009.88102-3-manivannan.sadhasivam@linaro.org Signed-off-by: Vinod Koul commit 342ab21d203375ad9bee499c41a8cf7794890df6 Author: Manivannan Sadhasivam Date: Sat Jan 14 12:39:58 2023 +0530 phy: qcom-qmp-ufs: Remove _tbl suffix from qmp_phy_init_tbl definitions Following the other QMP PHY drivers like PCIe, let's remove the "_tbl" suffix from the qmp_phy_init_tbl definitions. This helps in maintaining the uniformity across all of the QMP PHY drivers. Reviewed-by: Dmitry Baryshkov Tested-by: Andrew Halaney # Qdrive3/sa8540p-ride Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20230114071009.88102-2-manivannan.sadhasivam@linaro.org Signed-off-by: Vinod Koul commit 9d523ba46944bf2db4960c908fd2889665d0aa88 Author: Johan Hovold Date: Sun Jan 15 18:44:50 2023 +0100 arm64: defconfig: enable Qualcomm PCIe modem drivers Enable the MHI PCI controller driver and the MHI NET and WWAN drivers for Qualcomm based PCIe modems such as the ones found on the SC8280XP Compute Reference Design (CRD) and Lenovo Thinkpad X13s. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230115174450.11041-1-johan+linaro@kernel.org commit 26c5aa54f5973a3b1181939811f231faa638332a Author: Kuogee Hsieh Date: Tue Dec 27 09:44:59 2022 -0800 arm64: dts: qcom: add data-lanes and link-freuencies into dp_out endpoint Move data-lanes property from mdss_dp node to dp_out endpoint. Also add link-frequencies property into dp_out endpoint as well. The last frequency specified at link-frequencies will be the max link rate supported by DP. Signed-off-by: Kuogee Hsieh Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1672163103-31254-2-git-send-email-quic_khsieh@quicinc.com commit eef26fb45b6a8d8f68bbfce67db0dfc5fad2946f Author: Krzysztof Kozlowski Date: Tue Dec 27 17:31:58 2022 +0100 arm64: dts: qcom: sc7180-trogdor: align DAI children names with DT schema Bindings expect DAI children to be named "dai-link": sc7180-trogdor-coachz-r1.dtb: lpass@62d87000: Unevaluated properties are not allowed ('hdmi@5', 'mi2s@0', 'mi2s@1' were unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221227163158.102737-2-krzysztof.kozlowski@linaro.org commit 2aa8c53eb8d711b694545b4eec7f248d50116b8c Author: Krzysztof Kozlowski Date: Tue Dec 27 17:31:57 2022 +0100 arm64: dts: qcom: sm8350: drop unused dispcc power-domain-names Display clock controller bindings do not allow power-domain-names: sm8350-hdk.dtb: clock-controller@af00000: 'power-domain-names' does not match any of the regexes: 'pinctrl-[0-9]+' From schema: Documentation/devicetree/bindings/clock/qcom,dispcc-sm8x50.yaml Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221227163158.102737-1-krzysztof.kozlowski@linaro.org commit 7d8ccfaca31e69e60a3abd696abbfcbc00005ee1 Author: Dmitry Baryshkov Date: Tue Dec 27 02:15:47 2022 +0200 ARM: dts: qcom: msm8974: add xo clock to rpm clock controller Populate the rpm clock controller node with clocks and clock-names properties. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221227001547.2830656-1-dmitry.baryshkov@linaro.org commit f6f10b4ae5e5c986f521cc2282721f3c1b158df4 Author: Krzysztof Kozlowski Date: Sat Dec 24 22:44:04 2022 +0100 dt-bindings: clock: qcom,camcc-sm8250: extend clocks and power domains Add clocks and properties (power-domains, required-opps) already used in SM8250 DTS: sm8250-hdk.dtb: clock-controller@ad00000: clocks: [[46, 10], [44, 0], [44, 1], [45]] is too long sm8250-hdk.dtb: clock-controller@ad00000: clock-names:0: 'bi_tcxo' was expected sm8250-hdk.dtb: clock-controller@ad00000: 'power-domains', 'required-opps' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221224214404.18280-1-krzysztof.kozlowski@linaro.org commit 06839dfc87984ae73d2204a8efa4c7e7b6e12d97 Author: Krzysztof Kozlowski Date: Sat Dec 24 16:41:52 2022 +0100 dt-bindings: clock: qcom,videocc: correct clocks per variant Different SoCs come with a bit different clock inputs: sm8250-mtp.dtb: clock-controller@abf0000: clock-names:0: 'bi_tcxo' was expected sm8250-mtp.dtb: clock-controller@abf0000: clock-names: ['iface', 'bi_tcxo', 'bi_tcxo_ao'] is too long Signed-off-by: Krzysztof Kozlowski Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221224154152.43272-1-krzysztof.kozlowski@linaro.org commit 86543bc6eec499f7fd12e1628a29838aa90c288a Author: Dmitry Baryshkov Date: Wed Nov 23 12:44:43 2022 +0200 arm64: dts: qcom: use UFS symbol clocks provided by PHY Remove manually created symbol clocks and replace them with clocks provided by PHY. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221123104443.3415267-5-dmitry.baryshkov@linaro.org commit 186b27135a9edb5bfbdebd5fb525e3fb7eff962e Author: Dmitry Baryshkov Date: Sat Nov 19 01:32:42 2022 +0200 arm64: dts: qcom: sm8350-hdk: enable PCIe devices Enable PCIe0 and PCIe1 hosts found on SM8350 HDK board. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221118233242.2904088-9-dmitry.baryshkov@linaro.org commit 6daee40678a0868a994b2ce923694c52299dbd65 Author: Dmitry Baryshkov Date: Sat Nov 19 01:32:41 2022 +0200 arm64: dts: qcom: sm8350: add PCIe devices Add PCIe0 and PCIe1 (and corresponding PHY) devices found on SM8350 platform. The PCIe0 is a 1-lane Gen3 host, PCIe1 is a 2-lane Gen3 host. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221118233242.2904088-8-dmitry.baryshkov@linaro.org commit 29e31415e14e16e25d428205c7230400dea1d7cf Author: Bjorn Andersson Date: Thu Jan 12 20:10:38 2023 -0800 clk: qcom: Remove need for clk_ignore_unused on sc8280xp With the transition of disabling unused clocks at sync_state, rather than late_initcall() it's now possible to drop clk_ignore_unused and unused clock disabled once client drivers have probed. Do this on SC8280XP. Signed-off-by: Bjorn Andersson Reviewed-by: Abel Vesa Reviewed-by: Manivannan Sadhasivam Tested-by: Andrew Halaney # sc8280xp-lenovo-thinkpad-x13s Acked-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230113041038.4188995-1-quic_bjorande@quicinc.com commit dec1df547d812a5ced4de29e7eadcfa0484bec1e Author: Finn Behrens Date: Wed Dec 14 10:34:51 2022 +0100 rust: prelude: prevent doc inline of external imports This shows exactly where the items are from, previously the items from macros, alloc and core were shown as a declaration from the kernel crate, this shows the correct path. Link: https://github.com/rust-lang/rust/issues/106713 Signed-off-by: Finn Behrens Reviewed-by: Vincenzo Palazzo [Reworded to add Link, fixed two typos and comment style] Signed-off-by: Miguel Ojeda commit 0748424aba89811b85e6e0f958b8ccd47f5af47e Author: Wedson Almeida Filho Date: Wed Dec 28 06:03:46 2022 +0000 rust: sync: add support for dispatching on Arc and ArcBorrow. Trait objects (`dyn T`) require trait `T` to be "object safe". One of the requirements for "object safety" is that the receiver have one of the allowed types. This commit adds `Arc` and `ArcBorrow<'_, T>` to the list of allowed types. Signed-off-by: Wedson Almeida Filho Reviewed-by: Alice Ryhl Reviewed-by: Gary Guo Reviewed-by: Vincenzo Palazzo Acked-by: Boqun Feng Signed-off-by: Miguel Ojeda commit 70e42ebbf6416e8005d8e08ae521b7d5cc5a8b3a Author: Wedson Almeida Filho Date: Wed Dec 28 06:03:45 2022 +0000 rust: sync: introduce `UniqueArc` Since `Arc` does not allow mutating `T` directly (i.e., without inner mutability), it is currently not possible to do some initialisation of `T` post construction but before being shared. `UniqueArc` addresses this problem essentially being an `Arc` that has a refcount of 1 and is therefore writable. Once initialisation is completed, it can be transitioned (without failure paths) into an `Arc`. Suggested-by: Gary Guo Signed-off-by: Wedson Almeida Filho Reviewed-by: Alice Ryhl Reviewed-by: Gary Guo Reviewed-by: Vincenzo Palazzo Acked-by: Boqun Feng Signed-off-by: Miguel Ojeda commit 92a655ae00a2f15fdd80eb96cd23526c0d8f0bfd Author: Wedson Almeida Filho Date: Wed Dec 28 06:03:44 2022 +0000 rust: sync: allow type of `self` to be `ArcBorrow` This allows associated functions whose `self` argument has `ArcBorrow` as their type. This, in turn, allows callers to use the dot syntax to make calls. Signed-off-by: Wedson Almeida Filho Reviewed-by: Alice Ryhl Reviewed-by: Gary Guo Reviewed-by: Vincenzo Palazzo Acked-by: Boqun Feng Signed-off-by: Miguel Ojeda commit 17f671602cc6a15e65869c387492c5753c6f3cd5 Author: Wedson Almeida Filho Date: Wed Dec 28 06:03:43 2022 +0000 rust: sync: introduce `ArcBorrow` This allows us to create references to a ref-counted allocation without double-indirection and that still allow us to increment the refcount to a new `Arc`. Signed-off-by: Wedson Almeida Filho Reviewed-by: Alice Ryhl Acked-by: Boqun Feng Reviewed-by: Gary Guo Reviewed-by: Vincenzo Palazzo Signed-off-by: Miguel Ojeda commit f75cb6fce4c91847d3b7cf2c5fc7c8eb4bc2d8f0 Author: Wedson Almeida Filho Date: Wed Dec 28 06:03:42 2022 +0000 rust: sync: allow coercion from `Arc` to `Arc` The coercion is only allowed if `U` is a compatible dynamically-sized type (DST). For example, if we have some type `X` that implements trait `Y`, then this allows `Arc` to be coerced into `Arc`. Suggested-by: Gary Guo Signed-off-by: Wedson Almeida Filho Reviewed-by: Alice Ryhl Reviewed-by: Gary Guo Reviewed-by: Vincenzo Palazzo Acked-by: Boqun Feng Signed-off-by: Miguel Ojeda commit 53528772fb5a174c8606cdf0047ac4899ce05be7 Author: Wedson Almeida Filho Date: Wed Dec 28 06:03:41 2022 +0000 rust: sync: allow type of `self` to be `Arc` or variants This allows associated functions whose `self` argument has `Arc` or variants as their type. This, in turn, allows callers to use the dot syntax to make calls. Signed-off-by: Wedson Almeida Filho Reviewed-by: Alice Ryhl Reviewed-by: Gary Guo Reviewed-by: Vincenzo Palazzo Acked-by: Boqun Feng Signed-off-by: Miguel Ojeda commit 9dc04365500340e6d60a996333d562af747337b1 Author: Wedson Almeida Filho Date: Wed Dec 28 06:03:40 2022 +0000 rust: sync: add `Arc` for ref-counted allocations This is a basic implementation of `Arc` backed by C's `refcount_t`. It allows Rust code to idiomatically allocate memory that is ref-counted. Cc: Will Deacon Cc: Peter Zijlstra Cc: Boqun Feng Cc: Mark Rutland Signed-off-by: Wedson Almeida Filho Reviewed-by: Alice Ryhl Reviewed-by: Gary Guo Reviewed-by: Vincenzo Palazzo Acked-by: Boqun Feng Signed-off-by: Miguel Ojeda commit cb7d9defdafba4c1d463a09c9b09876066f81ee4 Author: Gary Guo Date: Mon Dec 5 21:50:00 2022 +0000 rust: compiler_builtins: make stubs non-global Currently we define a number of stubs for compiler-builtin intrinsics that compiled libcore generates. The defined stubs are weak so they will not conflict with genuine implementation of these intrinsics, but their effect is global and will cause non-libcore code that accidently generate these intrinsics calls compile and bug on runtime. Instead of defining a stub that can affect all code, this patch uses objcopy's `--redefine-sym` flag to redirect these calls (from libcore only) to a prefixed version (e.g. redirect `__multi3` to `__rust_multi3`), so we can define panciking stubs that are only visible to libcore. This patch was previously discussed on GitHub [1]. This approach was also independently proposed by Nick Desaulniers in [2]. Link: https://github.com/Rust-for-Linux/linux/pull/779 [1] Link: https://lore.kernel.org/lkml/CAKwvOdkc0Qhwu=gfe1+H23TnAa6jnO6A3ZCO687dH6mSrATmDA@mail.gmail.com/ Suggested-by: Nick Desaulniers Acked-by: Nick Desaulniers Signed-off-by: Gary Guo Reviewed-by: Wei Liu Signed-off-by: Miguel Ojeda commit 8909a80e3f684fb274a171489c16e8f10c482e83 Author: Miguel Ojeda Date: Tue Dec 6 02:05:19 2022 +0100 rust: alloc: remove the `borrow` module (`ToOwned`, `Cow`) The `Cow` type [1] requires that its generic parameter type implements the `ToOwned` trait [2], which provides a method to create owned data from borrowed data, usually by cloning. However, it is infallible, and thus in most cases it is not useful for the kernel. [3] Therefore, introduce `cfg(no_borrow)` to remove the `borrow` module (which contains `ToOwned` and `Cow`) from `alloc`. Link: https://doc.rust-lang.org/alloc/borrow/enum.Cow.html [1] Link: https://doc.rust-lang.org/alloc/borrow/trait.ToOwned.html [2] Link: https://lore.kernel.org/rust-for-linux/20221204103153.117675b1@GaryWorkstation/ [3] Cc: Gary Guo Cc: Wedson Almeida Filho Cc: Josh Triplett Signed-off-by: Miguel Ojeda Reviewed-by: Wei Liu Reviewed-by: Finn Behrens commit 0b45ac1170ea6416bc1d36798414c04870cd356d Merge: c37ea39c1fa88 f71c9b7bc35ff Author: Dave Airlie Date: Tue Jan 17 05:23:07 2023 +1000 Merge tag 'drm-intel-next-2023-01-12' of git://anongit.freedesktop.org/drm/drm-intel into drm-next drm/i915 feature pull #1 for v6.3: Features and functionality: - Meteorlake display enabling (Animesh, Luca, Stan, Jouni, Anusha) - DP MST DSC support (Stan) - Gamma/degamma readout support for the state checker (Ville) - Enable SDP split support for DP 2.0 (Vinod) - Add probe blocking support to i915.force_probe parameter (Rodrigo) - Enable Xe HP 4tile support (Jonathan) Refactoring and cleanups: - Color refactoring, especially related to DSB usage (Ville) - DSB refactoring (Ville) - DVO refactoring (Ville) - Backlight register and logging cleanups (Jani) - Avoid display direct calls to uncore (Maarten, Jani) - Add new "soc" sub-directory (Jani) - Refactor DSC platform support checks (Swati) Fixes: - Interlace modes are no longer supported starting at display version 12 (Ankit) - Use polling read for aux control (Arun) - DMC firmware no longer requires specific versions (Gustavo) - Fix PSR flickering and freeze issues (Jouni) - Fix ICL+ DSI GPIO handling (Jani) - Ratelimit errors in display engine irqs (Lucas) - Fix DP MST DSC bpp and timeslot calculations (Stan) - Fix CDCLK squash and crawl sequences (Ville, Anusha) - Fix bigjoiner checks for fused pipes (Ville) - Fix ADP+ degamma LUT size (Ville) - Fix DVO ch7xxx and sil164 suspend/resume (Ville) - Fix memory leak in VBT parsing (Xia Fukun) - Fix VBT packet port selection for dual link DSI (Mikko Kovanen) - Fix SDP infoframe product string for discrete graphics (Clint) - Fix VLV/CHV HDMI/DP audio enable (Ville) - Fix VRR delays and calculations (Ville) - No longer disable transcoder for PHY test pattern change (Khaled) - Fix dual PPS handling (Ville) - Fix timeout and wait for DDI BUF CTL active after enabling (Ankit) Merges: - Backmerge drm-next to sync up with v6.2-rc1 (Jani) Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87tu0wez34.fsf@intel.com commit 33f868db99f16af4ed3aa67f79cb8ede630b8574 Author: Rob Clark Date: Tue Jan 10 15:14:44 2023 -0800 drm/msm/gpu: Add default devfreq thresholds Setup more appropriate devfreq tuning thresholds. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/517788/ Link: https://lore.kernel.org/r/20230110231447.1939101-4-robdclark@gmail.com Reviewed-by: Chia-I Wu commit 86ce04f39b3013b99e85412a615b4cdd616c85cd Merge: 87b08a8c97180 1f4d4ad677c44 Author: David S. Miller Date: Mon Jan 16 18:42:55 2023 +0000 Merge branch 'dt-bindings-ocelot-switches' Colin Foster says ==================== dt-binding preparation for ocelot switches Ocelot switches have the abilitiy to be used internally via memory-mapped IO or externally via SPI or PCIe. This brings up issues for documentation, where the same chip might be accessed internally in a switchdev manner, or externally in a DSA configuration. This patch set is perparation to bring DSA functionality to the VSC7512, utilizing as much as possible with an almost identical VSC7514 chip. This patch set changed quite a bit from v2, so I'll omit the background of how those sets came to be. Rob offered a lot of very useful guidance. My thanks. At the end of the day, with this patch set, there should be a framework to document Ocelot switches (and any switch) in scenarios where they can be controlled internally (ethernet-switch) or externally (dsa-switch). --- v6 -> v7 * Add Reviewed / Acked on patch 1 * Clean up descriptions on Ethernet / DSA switch port bindings v5 -> v6 * Rebase so it applies to net-next cleanly. * No other changes - during the last submission round I said I'd submit v6 with a change to move $dsa-port.yaml to outside the allOf list. In retrospect that wasn't the right thing to do, because later in the patch series the $dsa-port.yaml is removed outright. So I believe the submission in v5 to keep "type: object" was correct. v4 -> v5 * Sync DSA maintainers with MAINTAINERS file (new patch 1) * Undo move of port description of mediatek,mt7530.yaml (patch 4) * Move removal of "^(ethernet-)?switch(@.*)?$" in dsa.yaml from patch 4 to patch 8 * Add more consistent capitalization in title lines and better Ethernet switch port description. (patch 8) v3 -> v4 * Renamed "base" to "ethernet-ports" to avoid confusion with the concept of a base class. * Squash ("dt-bindings: net: dsa: mediatek,mt7530: fix port description location") patch into ("dt-bindings: net: dsa: utilize base definitions for standard dsa switches") * Corrections to fix confusion about additonalProperties vs unevaluatedProperties. See specific patches for details. v2 -> v3 * Restructured everything to use a "base" iref for devices that don't have additional properties, and simply a "ref" for devices that do. * New patches to fix up brcm,sf2, qca8k, and mt7530 * Fix unevaluatedProperties errors from previous sets (see specific patches for more detail) * Removed redundant "Device Tree Binding" from titles, where applicable. v1 -> v2 * Two MFD patches were brought into the MFD tree, so are dropped * Add first patch 1/6 to allow DSA devices to add ports and port properties * Test qca8k against new dt-bindings and fix warnings. (patch 2/6) * Add tags (patch 3/6) * Fix vsc7514 refs and properties ==================== Signed-off-by: David S. Miller commit 1f4d4ad677c448a41c32c9eaa4f3e910ea47d320 Author: Colin Foster Date: Thu Jan 12 07:56:13 2023 -1000 dt-bindings: net: mscc,vsc7514-switch: utilize generic ethernet-switch.yaml Several bindings for ethernet switches are available for non-dsa switches by way of ethernet-switch.yaml. Remove these duplicate entries and utilize the common bindings for the VSC7514. Signed-off-by: Colin Foster Suggested-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Rob Herring Signed-off-by: David S. Miller commit 68e3e3be66bcabdb0cb35d1ab786ab2050081d25 Author: Colin Foster Date: Thu Jan 12 07:56:12 2023 -1000 dt-bindings: net: add generic ethernet-switch-port binding The dsa-port.yaml binding had several references that can be common to all ethernet ports, not just dsa-specific ones. Break out the generic bindings to ethernet-switch-port.yaml they can be used by non-dsa drivers. Signed-off-by: Colin Foster Suggested-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Rob Herring Signed-off-by: David S. Miller commit 7f5bccc8b6f836636cdbd3b1db37e7759e1ed5dc Author: Colin Foster Date: Thu Jan 12 07:56:11 2023 -1000 dt-bindings: net: add generic ethernet-switch The dsa.yaml bindings had references that can apply to non-dsa switches. To prevent duplication of this information, keep the dsa-specific information inside dsa.yaml and move the remaining generic information to the newly created ethernet-switch.yaml. Signed-off-by: Colin Foster Suggested-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Rob Herring Signed-off-by: David S. Miller commit 000bd2af9dcef26513f66f1eab5096b5d102acb6 Author: Colin Foster Date: Thu Jan 12 07:56:10 2023 -1000 dt-bindings: net: dsa: mediatek,mt7530: remove unnecessary dsa-port reference dsa.yaml contains a reference to dsa-port.yaml, so a duplicate reference to the binding isn't necessary. Remove this unnecessary reference. Signed-off-by: Colin Foster Suggested-by: Vladimir Oltean Reviewed-by: Arınç ÜNAL Reviewed-by: Florian Fainelli Reviewed-by: Rob Herring Signed-off-by: David S. Miller commit 956826446e3aa450a4c87dd6c89452179ebed853 Author: Colin Foster Date: Thu Jan 12 07:56:09 2023 -1000 dt-bindings: net: dsa: qca8k: utilize shared dsa.yaml The dsa.yaml binding contains duplicated bindings for address and size cells, as well as the reference to dsa-port.yaml. Instead of duplicating this information, remove the reference to dsa-port.yaml and include the full reference to dsa.yaml. Signed-off-by: Colin Foster Suggested-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Rob Herring Signed-off-by: David S. Miller commit 16401cdb08f089291718f0cf0eb8127dfb02a973 Author: Colin Foster Date: Thu Jan 12 07:56:08 2023 -1000 dt-bindings: net: dsa: allow additional ethernet-port properties Explicitly allow additional properties for both the ethernet-port and ethernet-ports properties. This specifically will allow the qca8k.yaml binding to use shared properties. Signed-off-by: Colin Foster Reviewed-by: Florian Fainelli Reviewed-by: Rob Herring Signed-off-by: David S. Miller commit 3cec368a8beca1e7cfe4069e8234ecfe7f969d8d Author: Colin Foster Date: Thu Jan 12 07:56:07 2023 -1000 dt-bindings: net: dsa: utilize base definitions for standard dsa switches DSA switches can fall into one of two categories: switches where all ports follow standard '(ethernet-)?port' properties, and switches that have additional properties for the ports. The scenario where DSA ports are all standardized can be handled by switches with a reference to the new 'dsa.yaml#/$defs/ethernet-ports'. The scenario where DSA ports require additional properties can reference '$dsa.yaml#' directly. This will allow switches to reference these standard definitions of the DSA switch, but add additional properties under the port nodes. Suggested-by: Rob Herring Signed-off-by: Colin Foster Reviewed-by: Linus Walleij Reviewed-by: Florian Fainelli Reviewed-by: Rob Herring Acked-by: Alvin Šipraga # realtek Acked-by: Arınç ÜNAL Signed-off-by: David S. Miller commit 54890925f2a44e2888f61f8d1deca89f909f521a Author: Colin Foster Date: Thu Jan 12 07:56:06 2023 -1000 dt-bindings: net: dsa: qca8k: remove address-cells and size-cells from switch node The children of the switch node don't have a unit address, and therefore should not need the #address-cells or #size-cells entries. Fix the example schemas accordingly. Suggested-by: Vladimir Oltean Signed-off-by: Colin Foster Reviewed-by: Florian Fainelli Reviewed-by: Rob Herring Signed-off-by: David S. Miller commit afdc0aab49721807106d4c9003c27f443b650ecc Author: Colin Foster Date: Thu Jan 12 07:56:05 2023 -1000 dt-bindings: net: dsa: sf2: fix brcm,use-bcm-hdr documentation The property use-bcm-hdr was documented as an entry under the ports node for the bcm_sf2 DSA switch. This property is actually evaluated for each port. Correct the documentation to match the actual behavior and properly reference dsa-port.yaml for additional properties of the node. Suggested-by: Rob Herring Signed-off-by: Colin Foster Acked-by: Florian Fainelli Reviewed-by: Rob Herring Signed-off-by: David S. Miller commit 4015dfce2fe7fc1472c3ebb9dabe8101537ea729 Author: Colin Foster Date: Thu Jan 12 07:56:04 2023 -1000 dt-bindings: dsa: sync with maintainers The MAINTAINERS file has Andrew Lunn, Florian Fainelli, and Vladimir Oltean listed as the maintainers for generic dsa bindings. Update dsa.yaml and dsa-port.yaml accordingly. Signed-off-by: Colin Foster Reviewed-by: Vladimir Oltean Acked-by: Rob Herring Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit fadcc3ab1302d4e5baa32c272b658221f0066696 Author: Rob Clark Date: Tue Jan 10 15:14:43 2023 -0800 drm/msm/gpu: Bypass PM QoS constraint for idle clamp Change idle freq clamping back to the direct method, bypassing PM QoS requests. The problem with using PM QoS requests is they call (indirectly) the governors ->get_target_freq() which goes thru a get_dev_status() cycle. The problem comes when the GPU becomes active again and we remove the idle-clamp request, we go through another get_dev_status() cycle for the period that the GPU has been idle, which triggers the governor to lower the target freq excessively. This partially reverts commit 7c0ffcd40b16 ("drm/msm/gpu: Respect PM QoS constraints"), but preserves the use of boost QoS request, so that it will continue to play nicely with other QoS requests such as a cooling device. This also mostly undoes commit 78f815c1cf8f ("drm/msm: return the average load over the polling period") Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/517785/ Link: https://lore.kernel.org/r/20230110231447.1939101-3-robdclark@gmail.com Reviewed-by: Chia-I Wu commit 6563f60f14cbb3dcbdc4e1d8469fc0fbaaa80544 Author: Rob Clark Date: Tue Jan 10 15:14:42 2023 -0800 drm/msm/gpu: Add devfreq tuning debugfs Make the handful of tuning knobs available visible via debugfs. v2: select DEVFREQ_GOV_SIMPLE_ONDEMAND because for some reason struct devfreq_simple_ondemand_data depends on this Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/517784/ Link: https://lore.kernel.org/r/20230110231447.1939101-2-robdclark@gmail.com Reviewed-by: Chia-I Wu commit 3cba4a2cdff3afe0b057fa4ab200598d3b41d09a Author: Akhil P Oommen Date: Wed Dec 21 20:39:59 2022 +0530 drm/msm/a6xx: Update ROQ size in coredump Since RoQ size differs between generations, calculate dynamically the RoQ size while capturing coredump. Signed-off-by: Akhil P Oommen Patchwork: https://patchwork.freedesktop.org/patch/515610/ Link: https://lore.kernel.org/r/20221221203925.v2.4.I07f22966395eb045f6b312710f53890d5d7e69d4@changeid Signed-off-by: Rob Clark commit 1e05bba5e2b8afd8cbe7553b52a42e2aabbe4632 Author: Akhil P Oommen Date: Wed Dec 21 20:39:58 2022 +0530 drm/msm/a6xx: Update a6xx gpu coredump Update gpu coredump for a660/a650 family of gpus with the extra information available. Signed-off-by: Akhil P Oommen Patchwork: https://patchwork.freedesktop.org/patch/515608/ Link: https://lore.kernel.org/r/20221221203925.v2.3.Ifbfce6d693b202dac92006345bb825e7c5aee9c6@changeid Signed-off-by: Rob Clark commit 8636500300a01740d92b345c680b036b94555b1b Author: Akhil P Oommen Date: Wed Dec 21 20:39:57 2022 +0530 drm/msm: Fix failure paths in msm_drm_init() Ensure that we do drm_dev_put() when there is an early return in msm_drm_init(). Signed-off-by: Akhil P Oommen Patchwork: https://patchwork.freedesktop.org/patch/515606/ Link: https://lore.kernel.org/r/20221221203925.v2.2.I49dfc3654040be61702e491f1aa63d3a5f308852@changeid Signed-off-by: Rob Clark commit dbeedbcb268d055d8895aceca427f897e12c2b50 Author: Akhil P Oommen Date: Wed Dec 21 20:39:56 2022 +0530 drm/msm/adreno: Fix null ptr access in adreno_gpu_cleanup() Fix the below kernel panic due to null pointer access: [ 18.504431] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000048 [ 18.513464] Mem abort info: [ 18.516346] ESR = 0x0000000096000005 [ 18.520204] EC = 0x25: DABT (current EL), IL = 32 bits [ 18.525706] SET = 0, FnV = 0 [ 18.528878] EA = 0, S1PTW = 0 [ 18.532117] FSC = 0x05: level 1 translation fault [ 18.537138] Data abort info: [ 18.540110] ISV = 0, ISS = 0x00000005 [ 18.544060] CM = 0, WnR = 0 [ 18.547109] user pgtable: 4k pages, 39-bit VAs, pgdp=0000000112826000 [ 18.553738] [0000000000000048] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000 [ 18.562690] Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP **Snip** [ 18.696758] Call trace: [ 18.699278] adreno_gpu_cleanup+0x30/0x88 [ 18.703396] a6xx_destroy+0xc0/0x130 [ 18.707066] a6xx_gpu_init+0x308/0x424 [ 18.710921] adreno_bind+0x178/0x288 [ 18.714590] component_bind_all+0xe0/0x214 [ 18.718797] msm_drm_bind+0x1d4/0x614 [ 18.722566] try_to_bring_up_aggregate_device+0x16c/0x1b8 [ 18.728105] __component_add+0xa0/0x158 [ 18.732048] component_add+0x20/0x2c [ 18.735719] adreno_probe+0x40/0xc0 [ 18.739300] platform_probe+0xb4/0xd4 [ 18.743068] really_probe+0xfc/0x284 [ 18.746738] __driver_probe_device+0xc0/0xec [ 18.751129] driver_probe_device+0x48/0x110 [ 18.755421] __device_attach_driver+0xa8/0xd0 [ 18.759900] bus_for_each_drv+0x90/0xdc [ 18.763843] __device_attach+0xfc/0x174 [ 18.767786] device_initial_probe+0x20/0x2c [ 18.772090] bus_probe_device+0x40/0xa0 [ 18.776032] deferred_probe_work_func+0x94/0xd0 [ 18.780686] process_one_work+0x190/0x3d0 [ 18.784805] worker_thread+0x280/0x3d4 [ 18.788659] kthread+0x104/0x1c0 [ 18.791981] ret_from_fork+0x10/0x20 [ 18.795654] Code: f9400408 aa0003f3 aa1f03f4 91142015 (f9402516) [ 18.801913] ---[ end trace 0000000000000000 ]--- [ 18.809039] Kernel panic - not syncing: Oops: Fatal exception Fixes: 17e822f7591f ("drm/msm: fix unbalanced pm_runtime_enable in adreno_gpu_{init, cleanup}") Signed-off-by: Akhil P Oommen Patchwork: https://patchwork.freedesktop.org/patch/515605/ Link: https://lore.kernel.org/r/20221221203925.v2.1.Ib978de92c4bd000b515486aad72e96c2481f84d0@changeid Signed-off-by: Rob Clark commit 302295070d3cc74e31b645c9798b158c3a2fd1bb Author: Dmitry Baryshkov Date: Sun Jan 1 17:57:53 2023 +0200 drm/msm/a2xx: support loading legacy (iMX) firmware Support loading A200 firmware generated from the iMX firmware header files. The firmware lacks protection support, however it allows GPU to function properly while using the firmware files with clear license which allows redistribution. Cc: Jonathan Marek Signed-off-by: Dmitry Baryshkov Reviewed-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/516443/ Link: https://lore.kernel.org/r/20230101155753.779176-1-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit b1bf64f8b92a084e5c188446e62ea5ccaa9f005d Author: Rob Clark Date: Tue Dec 6 11:21:23 2022 -0800 drm/msm: Add MSM_SUBMIT_BO_NO_IMPLICIT In cases where implicit sync is used, it is still useful (for things like sub-allocation, etc) to allow userspace to opt-out of implicit sync on per-BO basis. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/514216/ Link: https://lore.kernel.org/r/20221206192123.661448-1-robdclark@gmail.com commit 54d47689c6e3892ddb24004e07bfcb3f23aa0222 Author: Kees Cook Date: Tue Jan 3 15:48:36 2023 -0800 drm/nouveau/fb/ga102: Replace zero-length array of trailing structs with flex-array Zero-length arrays are deprecated[1] and are being replaced with flexible array members in support of the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy(), correctly instrument array indexing with UBSAN_BOUNDS, and to globally enable -fstrict-flex-arrays=3. Replace zero-length array with flexible-array member. This results in no differences in binary output. [1] https://github.com/KSPP/linux/issues/78 Cc: Ben Skeggs Cc: Karol Herbst Cc: Lyude Paul Cc: David Airlie Cc: Daniel Vetter Cc: Gourav Samaiya 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/20230103234835.never.378-kees@kernel.org commit de7d0ff301fccc75281d7d8eb98c4a47faacf32d Author: Bitterblue Smith Date: Tue Jan 10 17:42:39 2023 +0200 wifi: rtl8xxxu: Dump the efuse only for untested devices It appears this was the intention all along, but commit 3307d84024d2 ("rtl8xxxu: Add initial code to parse rtl8192eu efuse") initialised rtl8xxxu_debug with RTL8XXXU_DEBUG_EFUSE for no apparent reason, which made it dump the efuse for all devices, even the tested ones. Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/d53fcf97-d6d2-3c75-14d5-97b58a5f3a6c@gmail.com commit aa1a49268951753837923eeb869269b08b8025d2 Author: Bitterblue Smith Date: Tue Jan 10 17:41:42 2023 +0200 wifi: rtl8xxxu: Print the ROM version too Make rtl8xxxu_print_chipinfo() print the ROM version. This is relevant at least for the RTL8723AU and possibly relevant for the RTL8710BU. Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/add46396-95af-1164-2033-7d4eb4d0b554@gmail.com commit 2931978cd74f4a643deeea5b211523001d95aa44 Author: Martin Blumenstingl Date: Sun Jan 8 22:13:24 2023 +0100 wifi: rtw88: Use non-atomic sta iterator in rtw_ra_mask_info_update() USB and (upcoming) SDIO support may sleep in the read/write handlers. Use non-atomic rtw_iterate_stas() in rtw_ra_mask_info_update() because the iterator function rtw_ra_mask_info_update_iter() needs to read and write registers from within rtw_update_sta_info(). Using the non-atomic iterator ensures that we can sleep during USB and SDIO register reads and writes. This fixes "scheduling while atomic" or "Voluntary context switch within RCU read-side critical section!" warnings as seen by SDIO card users (but it also affects USB cards). Fixes: 78d5bf925f30 ("wifi: rtw88: iterate over vif/sta list non-atomically") Suggested-by: Ping-Ke Shih Reviewed-by: Ping-Ke Shih Tested-by: Sascha Hauer Signed-off-by: Martin Blumenstingl Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230108211324.442823-4-martin.blumenstingl@googlemail.com commit 313f6dc7c5ed723d0c5691553eff4c0090f16bb8 Author: Martin Blumenstingl Date: Sun Jan 8 22:13:23 2023 +0100 wifi: rtw88: Use rtw_iterate_vifs() for rtw_vif_watch_dog_iter() USB and (upcoming) SDIO support may sleep in the read/write handlers. Make rtw_watch_dog_work() use rtw_iterate_vifs() to prevent "scheduling while atomic" or "Voluntary context switch within RCU read-side critical section!" warnings when accessing the registers using an SDIO card (which is where this issue has been spotted in the real world but it also affects USB cards). Fixes: 78d5bf925f30 ("wifi: rtw88: iterate over vif/sta list non-atomically") Suggested-by: Ping-Ke Shih Reviewed-by: Ping-Ke Shih Tested-by: Sascha Hauer Signed-off-by: Martin Blumenstingl Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230108211324.442823-3-martin.blumenstingl@googlemail.com commit 8a1e2fd8e2da5c8b8c438e20ebffef6881cc9ab8 Author: Martin Blumenstingl Date: Sun Jan 8 22:13:22 2023 +0100 wifi: rtw88: Move register access from rtw_bf_assoc() outside the RCU USB and (upcoming) SDIO support may sleep in the read/write handlers. Shrink the RCU critical section so it only cover the call to ieee80211_find_sta() and finding the ic_vht_cap/vht_cap based on the found station. This moves the chip's BFEE configuration outside the rcu_read_lock section and thus prevent "scheduling while atomic" or "Voluntary context switch within RCU read-side critical section!" warnings when accessing the registers using an SDIO card (which is where this issue has been spotted in the real world - but it also affects USB cards). Reviewed-by: Ping-Ke Shih Tested-by: Sascha Hauer Signed-off-by: Martin Blumenstingl Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230108211324.442823-2-martin.blumenstingl@googlemail.com commit 2a86aa9a1892d60ef2e3f310f5b42b8b05546d65 Author: Bitterblue Smith Date: Sun Jan 8 17:08:16 2023 +0200 wifi: rtl8xxxu: Use a longer retry limit of 48 The Realtek rate control algorithm goes back and forth a lot between the highest and the lowest rate it's allowed to use. This is due to a lot of frames being dropped because the retry limits set by IEEE80211_CONF_CHANGE_RETRY_LIMITS are too low. (Experimentally, they are 4 for long frames and 7 for short frames.) The vendor drivers hardcode the value 48 for both retry limits (for station mode), which makes dropped frames very rare and thus the rate control is more stable. Because most Realtek chips handle the rate control in the firmware, which can't be modified, ignore the limits set by IEEE80211_CONF_CHANGE_RETRY_LIMITS and use the value 48 (set during chip initialisation), same as the vendor drivers. Cc: stable@vger.kernel.org Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/477d745b-6bac-111d-403c-487fc19aa30d@gmail.com commit 3922dc9fbdb8b090c5a973a6f2bd0e4cca81f821 Author: Bitterblue Smith Date: Sun Jan 8 17:06:43 2023 +0200 wifi: rtl8xxxu: Report the RSSI to the firmware Or in the case of RTL8188EU, report the RSSI to the rate control code. The rate control code for RTL8188EU is less likely to switch to a lower rate when the RSSI is high. The firmware-based rate control in the other chips probably works the same way. This affects all the chips, but it was only tested with RTL8188EU, RTL8188FU, and RTL8192EU. Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/2aab4f3f-e914-4fe1-f29a-deac91774d05@gmail.com commit ebe8dee7aea6be7a775de718ee8fa93f77e3e4af Author: Jiapeng Chong Date: Fri Jan 6 10:27:31 2023 +0800 wifi: rt2x00: Remove useless else if The assignment of the else and else if branches is the same, so the else if here is redundant, so we remove it. ./drivers/net/wireless/ralink/rt2x00/rt2800lib.c:8927:9-11: WARNING: possible condition with no effect (if == else). Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3631 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230106022731.111243-1-jiapeng.chong@linux.alibaba.com commit 803f3176c5df3b5582c27ea690f204abb60b19b9 Author: Jisoo Jang Date: Thu Dec 29 18:29:06 2022 +0900 wifi: mt7601u: fix an integer underflow Fix an integer underflow that leads to a null pointer dereference in 'mt7601u_rx_skb_from_seg()'. The variable 'dma_len' in the URB packet could be manipulated, which could trigger an integer underflow of 'seg_len' in 'mt7601u_rx_process_seg()'. This underflow subsequently causes the 'bad_frame' checks in 'mt7601u_rx_skb_from_seg()' to be bypassed, eventually leading to a dereference of the pointer 'p', which is a null pointer. Ensure that 'dma_len' is greater than 'min_seg_len'. Found by a modified version of syzkaller. KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] CPU: 0 PID: 12 Comm: ksoftirqd/0 Tainted: G W O 5.14.0+ #139 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 RIP: 0010:skb_add_rx_frag+0x143/0x370 Code: e2 07 83 c2 03 38 ca 7c 08 84 c9 0f 85 86 01 00 00 4c 8d 7d 08 44 89 68 08 48 b8 00 00 00 00 00 fc ff df 4c 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 cd 01 00 00 48 8b 45 08 a8 01 0f 85 3d 01 00 00 RSP: 0018:ffffc900000cfc90 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: ffff888115520dc0 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffff8881118430c0 RDI: ffff8881118430f8 RBP: 0000000000000000 R08: 0000000000000e09 R09: 0000000000000010 R10: ffff888111843017 R11: ffffed1022308602 R12: 0000000000000000 R13: 0000000000000e09 R14: 0000000000000010 R15: 0000000000000008 FS: 0000000000000000(0000) GS:ffff88811a800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000004035af40 CR3: 00000001157f2000 CR4: 0000000000750ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: mt7601u_rx_tasklet+0xc73/0x1270 ? mt7601u_submit_rx_buf.isra.0+0x510/0x510 ? tasklet_action_common.isra.0+0x79/0x2f0 tasklet_action_common.isra.0+0x206/0x2f0 __do_softirq+0x1b5/0x880 ? tasklet_unlock+0x30/0x30 run_ksoftirqd+0x26/0x50 smpboot_thread_fn+0x34f/0x7d0 ? smpboot_register_percpu_thread+0x370/0x370 kthread+0x3a1/0x480 ? set_kthread_struct+0x120/0x120 ret_from_fork+0x1f/0x30 Modules linked in: 88XXau(O) 88x2bu(O) ---[ end trace 57f34f93b4da0f9b ]--- RIP: 0010:skb_add_rx_frag+0x143/0x370 Code: e2 07 83 c2 03 38 ca 7c 08 84 c9 0f 85 86 01 00 00 4c 8d 7d 08 44 89 68 08 48 b8 00 00 00 00 00 fc ff df 4c 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 cd 01 00 00 48 8b 45 08 a8 01 0f 85 3d 01 00 00 RSP: 0018:ffffc900000cfc90 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: ffff888115520dc0 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffff8881118430c0 RDI: ffff8881118430f8 RBP: 0000000000000000 R08: 0000000000000e09 R09: 0000000000000010 R10: ffff888111843017 R11: ffffed1022308602 R12: 0000000000000000 R13: 0000000000000e09 R14: 0000000000000010 R15: 0000000000000008 FS: 0000000000000000(0000) GS:ffff88811a800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000004035af40 CR3: 00000001157f2000 CR4: 0000000000750ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Signed-off-by: Jisoo Jang Acked-by: Jakub Kicinski Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221229092906.2328282-1-jisoo.jang@yonsei.ac.kr commit 1e346cbb096a5351a637ec1992beffbf330547f0 Author: Alexey Kodanev Date: Tue Dec 27 16:33:06 2022 +0300 wifi: orinoco: check return value of hermes_write_wordrec() There is currently no return check for writing an authentication type (HERMES_AUTH_SHARED_KEY or HERMES_AUTH_OPEN). It looks like it was accidentally skipped. This patch adds a return check similar to the other checks in __orinoco_hw_setup_enc() for hermes_write_wordrec(). Detected using the static analysis tool - Svace. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Alexey Kodanev Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221227133306.201356-1-aleksei.kodanev@bell-sw.com commit cb689109d9d7e5668f23aafed49a02c55f0aaa6d Author: Konstantin Ryabitsev Date: Fri Dec 23 13:20:23 2022 -0500 wifi: rtlwifi: rtl8723ae: fix obvious spelling error tyep->type This appears to be an obvious spelling error, initially identified in a codespell report and never addressed. Reported-by: Jens Schleusener Link: https://bugzilla.kernel.org/show_bug.cgi?id=205891 Signed-off-by: Konstantin Ryabitsev Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221222-rtl8723ae-typo-fix-v2-1-71b6b67df3f5@mricon.com commit b39f662ce1648db0b9de32e6a849b098480793cb Author: Bitterblue Smith Date: Thu Dec 22 13:48:04 2022 +0200 wifi: rtl8xxxu: Fix memory leaks with RTL8723BU, RTL8192EU The wifi + bluetooth combo chip RTL8723BU can leak memory (especially?) when it's connected to a bluetooth audio device. The busy bluetooth traffic generates lots of C2H (card to host) messages, which are not freed correctly. To fix this, move the dev_kfree_skb() call in rtl8xxxu_c2hcmd_callback() inside the loop where skb_dequeue() is called. The RTL8192EU leaks memory because the C2H messages are added to the queue and left there forever. (This was fine in the past because it probably wasn't sending any C2H messages until commit e542e66b7c2e ("wifi: rtl8xxxu: gen2: Turn on the rate control"). Since that commit it sends a C2H message when the TX rate changes.) To fix this, delete the check for rf_paths > 1 and the goto. Let the function process the C2H messages from RTL8192EU like the ones from the other chips. Theoretically the RTL8188FU could also leak like RTL8723BU, but it most likely doesn't send C2H messages frequently enough. This change was tested with RTL8723BU by Erhard F. I tested it with RTL8188FU and RTL8192EU. Reported-by: Erhard F. Tested-by: Erhard F. Link: https://bugzilla.kernel.org/show_bug.cgi?id=215197 Fixes: e542e66b7c2e ("rtl8xxxu: add bluetooth co-existence support for single antenna") Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/03b099c1-c671-d252-36f4-57b70d721f9d@gmail.com commit 6eea5a80d2ae9bc1df5664bcf7851306df96e9dc Author: ye xingchen Date: Mon Jan 16 15:45:23 2023 +0800 pinctrl: nomadik: remove duplicate included header files linux/seq_file.h is included more than once. Signed-off-by: ye xingchen Link: https://lore.kernel.org/r/202301161545238948580@zte.com.cn Signed-off-by: Linus Walleij commit 083b0230e040c5857f8c0a76119e5997e449a35c Author: Andy Shevchenko Date: Fri Jan 13 16:36:40 2023 +0200 pinctrl: digicolor: Use proper headers and drop OF dependency The driver doesn't depend on the OF to be complied. Hence the proper header to use is mod_devicetable.h. Replace of*.h with the above mentioned and drop redundant dependency. Signed-off-by: Andy Shevchenko Acked-by: Baruch Siach Link: https://lore.kernel.org/r/20230113143640.24302-2-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit aeb3c200db418207ae9aa426bd128527cb688b66 Author: Andy Shevchenko Date: Fri Jan 13 16:36:39 2023 +0200 pinctrl: digicolor: Remove duplicate assignment of of_gpio_n_cells The of_gpio_n_cells default is 2 when ->of_xlate() callback is not defined. No need to assign it explicitly in the driver. Signed-off-by: Andy Shevchenko Acked-by: Baruch Siach Link: https://lore.kernel.org/r/20230113143640.24302-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit ef4290e6bd99149d21c99bb4905c61f8c94a05ca Author: Andy Shevchenko Date: Thu Jan 12 20:51:22 2023 +0200 pinctrl: sunplus: sppctl: Remove duplicate assignment of of_gpio_n_cells The of_gpio_n_cells default is 2 when ->of_xlate() callback is not defined. No need to assign it explicitly in the driver. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230112185122.45216-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit a3fc976a2d68cb74ae4234314002e4e398e4c337 Author: Andy Shevchenko Date: Thu Jan 12 20:49:23 2023 +0200 pinctrl: qcom: lpass-lpi: Remove duplicate assignment of of_gpio_n_cells The of_gpio_n_cells default is 2 when ->of_xlate() callback is not defined. No need to assign it explicitly in the driver. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230112184923.80442-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 0da58037aefcdc024a2bdad7d94cdf28f044a816 Author: Andy Shevchenko Date: Thu Jan 12 20:43:40 2023 +0200 pinctrl: mediatek: Remove duplicate assignment of of_gpio_n_cells The of_gpio_n_cells default is 2 when ->of_xlate() callback is not defined. No need to assign it explicitly in the driver. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230112184340.79606-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 03a13546c74d8b3df9baceef1a747d9585ac77a7 Author: Andy Shevchenko Date: Thu Jan 12 15:48:49 2023 +0200 pinctrl: samsung: Do not mention legacy API in the code Replace mentioning of legacy API by the latest one. Signed-off-by: Andy Shevchenko Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230112134849.59534-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 844bca60927f3aae6baafafb1edd218b624254a1 Author: Arınç ÜNAL Date: Sat Dec 31 19:08:49 2022 +0300 dt-bindings: pinctrl: rt3883: add proper function muxing binding Not every function can be muxed to a group. Add proper binding which documents which function can be muxed to a group or set of groups. Signed-off-by: Arınç ÜNAL Acked-by: Krzysztof Kozlowski Acked-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20221231160849.40544-7-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit d648fd64e10d9d1609146d0c4e47b0f5988e2a2b Author: Arınç ÜNAL Date: Sat Dec 31 19:08:48 2022 +0300 dt-bindings: pinctrl: rt305x: add proper function muxing binding Not every function can be muxed to a group. Add proper binding which documents which function can be muxed to a group or set of groups. Signed-off-by: Arınç ÜNAL Reviewed-by: Krzysztof Kozlowski Acked-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20221231160849.40544-6-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit b4ac84395820eaa0b99ec56816e53c9386ca8b38 Author: Arınç ÜNAL Date: Sat Dec 31 19:08:47 2022 +0300 dt-bindings: pinctrl: rt2880: add proper function muxing binding Not every function can be muxed to a group. Add proper binding which documents which function can be muxed to a group or set of groups. Signed-off-by: Arınç ÜNAL Acked-by: Krzysztof Kozlowski Acked-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20221231160849.40544-5-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit 0c9a567651c3b5d433429da2c7d8e8406ddf1076 Author: Arınç ÜNAL Date: Sat Dec 31 19:08:46 2022 +0300 dt-bindings: pinctrl: mt7621: add proper function muxing binding Not every function can be muxed to a group. Add proper binding which documents which function can be muxed to a group or set of groups. Signed-off-by: Arınç ÜNAL Acked-by: Krzysztof Kozlowski Acked-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20221231160849.40544-4-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit 4e5410668af5475681793df2bb8c7d8dc6f9c327 Author: Arınç ÜNAL Date: Sat Dec 31 19:08:45 2022 +0300 dt-bindings: pinctrl: mt7620: add proper function muxing binding Not every function can be muxed to a group. Add proper binding which documents which function can be muxed to a group or set of groups. Signed-off-by: Arınç ÜNAL Acked-by: Krzysztof Kozlowski Acked-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20221231160849.40544-3-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit 525792d1d22d2178ee8fad49eaa4b54e0dac76be Author: Arınç ÜNAL Date: Sat Dec 31 19:08:44 2022 +0300 pinctrl: ralink: rename variables which point out the pin group These variables define a list of functions which can be muxed to the pin group which the name of the pin group was originally intended to be pointed out on the name of the said variables. Therefore, rename "func" to "grp" across all subdrivers where this applies. Fixes: 18653d4bd8ab ("pinctrl: ralink: rename variable names for functions on MT7620 and MT7621") Signed-off-by: Arınç ÜNAL Acked-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20221231160849.40544-2-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit 87b08a8c971800f80314f69b92fc772636129740 Merge: ce870af395584 18a15c769d4a1 Author: David S. Miller Date: Mon Jan 16 13:45:17 2023 +0000 Merge branch 'net-microchip-vcap-rules' Steen Hegelund says: ==================== net: microchip: Add support for two classes of VCAP rules This adds support for two classes of VCAP rules: - Permanent rules (added e.g. for PTP support) - TC user rules (added by the TC userspace tool) For this to work the VCAP Loopups must be enabled from boot, so that the "internal" clients like PTP can add rules that are always active. When the TC tool add a flower filter the VCAP rule corresponding to this filter will be disabled (kept in memory) until a TC matchall filter creates a link from chain 0 to the chain (lookup) where the flower filter was added. When the flower filter is enabled it will be written to the appropriate VCAP lookup and become active in HW. Likewise the flower filter will be disabled if there is no link from chain 0 to the chain of the filter (lookup), and when that happens the corresponding VCAP rule will be read from the VCAP instance and stored in memory until it is deleted or enabled again. Version History: ================ v4 Removed a leftover 'Fixes' tag from v2. No functional changes. v3 Removed the change that allowed rules to always be added in the LAN996x even though the lookups are not enabled (Horatiu Vultur). This was sent separately to net instead. Removed the 'Fixes' tags due to the patch sent to net by Horatiu Vultur. Added a check for validity of the chain source when enabling a lookup. v2 Adding a missing goto exit in vcap_add_rule (Dan Carpenter). Added missing checks for error returns in vcap_enable_rule. v1 Initial version ==================== Signed-off-by: David S. Miller commit 18a15c769d4a1e8a4ffedafe2aa3a5e288e15415 Author: Steen Hegelund Date: Sat Jan 14 14:42:42 2023 +0100 net: microchip: vcap api: Enable/Disable rules via chains in VCAP HW This supports that individual rules are enabled and disabled via chain information. This is done by keeping disabled rules in the VCAP list (cached) until they are enabled, and only at this time are the rules written to the VCAP HW. Signed-off-by: Horatiu Vultur Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit 814e7693207f1bd936d600f9b5467f133e3d6e40 Author: Steen Hegelund Date: Sat Jan 14 14:42:41 2023 +0100 net: microchip: vcap api: Add a storage state to a VCAP rule This allows a VCAP rule to be in one of 3 states: - permanently stored in the VCAP HW (for rules that must always be present) - enabled (stored in HW) when the corresponding lookup has been enabled - disabled (stored in SW) when the lookup is disabled This way important VCAP rules can be added even before the user enables the VCAP lookups using a TC matchall filter. Signed-off-by: Horatiu Vultur Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit 784c3067d094dde6b7090ead51f2c9b56620409b Author: Steen Hegelund Date: Sat Jan 14 14:42:40 2023 +0100 net: microchip: vcap api: Check chains when adding a tc flower filter This changes the way the chain information verified when adding a new tc flower filter. When adding a flower filter it is now checked that the filter contains a goto action to one of the IS2 VCAP lookups, except for the last lookup which may omit this goto action. It is also checked if you attempt to add multiple matchall filters to enable the same VCAP lookup. This will be rejected. Signed-off-by: Horatiu Vultur Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit cfd9e7b74a1e67fd690fe22749e20f299dcdf2fb Author: Steen Hegelund Date: Sat Jan 14 14:42:39 2023 +0100 net: microchip: vcap api: Use src and dst chain id to chain VCAP lookups This adds both the source and destination chain id to the information kept for enabled port lookups. This allows enabling and disabling a chain of lookups by walking the chain information for a port. This changes the way that VCAP lookups are enabled from userspace: instead of one matchall rule that enables all the 4 Sparx5 IS2 lookups, you need a matchall rule per lookup. In practice that is done by adding one matchall rule in chain 0 to goto IS2 Lookup 0, and then for each lookup you add a rule per lookup (low priority) that does a goto to the next lookup chain. Examples: If you want IS2 Lookup 0 to be enabled you add the same matchall filter as before: tc filter add dev eth12 ingress chain 0 prio 1000 handle 1000 matchall \ skip_sw action goto chain 8000000 If you also want to enable lookup 1 to 3 in IS2 and chain them you need to add the following matchall filters: tc filter add dev eth12 ingress chain 8000000 prio 1000 handle 1000 \ matchall skip_sw action goto chain 8100000 tc filter add dev eth12 ingress chain 8100000 prio 1000 handle 1000 \ matchall skip_sw action goto chain 8200000 tc filter add dev eth12 ingress chain 8200000 prio 1000 handle 1000 \ matchall skip_sw action goto chain 8300000 Signed-off-by: Horatiu Vultur Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit 33e3a273fd4f01d8ccd9c8faba8db7f4c5be8fe0 Author: Steen Hegelund Date: Sat Jan 14 14:42:38 2023 +0100 net: microchip: vcap api: Convert multi-word keys/actions when encoding The conversion to the platform specific multi-word format is moved from the key/action add functions to the encoding key/action. This allows rules that are disabled (not in VCAP HW) to use the same format for keys/actions as rules that have just been read from VCAP HW. Signed-off-by: Horatiu Vultur Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit 01ef75a257fa82cd0f8577fb9cda847415d2f748 Author: Steen Hegelund Date: Sat Jan 14 14:42:37 2023 +0100 net: microchip: vcap api: Always enable VCAP lookups This changes the VCAP lookups state to always be enabled so that it is possible to add "internal" VCAP rules that must be available even though the user has not yet enabled the VCAP chains via a TC matchall filter. The API callback to enable and disable VCAP lookups is therefore removed. Signed-off-by: Horatiu Vultur Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit 95fa74148daa7e78b5b9ac6d218667cb6173e8b3 Author: Steen Hegelund Date: Sat Jan 14 14:42:36 2023 +0100 net: microchip: sparx5: Reset VCAP counter for new rules When a rule counter is external to the VCAP such as the Sparx5 IS2 counters are, then this counter must be reset when a new rule is created. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit 6573f71ae72fa66160377b2bebd9946897e8bcc9 Author: Steen Hegelund Date: Sat Jan 14 14:42:35 2023 +0100 net: microchip: vcap api: Erase VCAP cache before encoding rule For consistency the VCAP cache area is erased just before the new rule is being encoded. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit ce870af39558448dcfabef7114b9aa389f3f895a Author: Heiner Kallweit Date: Fri Jan 13 23:46:19 2023 +0100 r8169: reset bus if NIC isn't accessible after tx timeout ASPM issues may result in the NIC not being accessible any longer. In this case disabling ASPM may not work. Therefore detect this case by checking whether register reads return ~0, and try to make the NIC accessible again by resetting the secondary bus. v2: - add exception handling for the case that pci_reset_bus() fails Suggested-by: Alexander Duyck Signed-off-by: Heiner Kallweit Reviewed-by: Alexander Duyck Signed-off-by: David S. Miller commit a3edb20146f000dfd5aba1f17e2dc0f363ff9446 Author: Zong-Zhe Yang Date: Fri Jan 13 17:06:32 2023 +0800 wifi: rtw89: 8852b: fill the missing configuration about queue empty checking The configurations, wde_qempty_acq_num and wde_qempty_mgq_sel, are used when MAC checks if TX queues are empty. Fill the corresponding setting for 8852B. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230113090632.60957-5-pkshih@realtek.com commit 7f495de6ae7d31f098970fb45a038c9f69b1bf75 Author: Zong-Zhe Yang Date: Fri Jan 13 17:06:31 2023 +0800 wifi: rtw89: fix assignation of TX BD RAM table TX BD's RAM table describes how HW allocates usable buffer section for each TX channel at fetch time. The total RAM size for TX BD is chip-dependent. For 8852BE, it has only half size (32) for TX channels of single band. Original table arrange total size (64) for dual band. It will overflow on 8852BE circuit and cause section conflicts between different TX channels. So, we do the changes below. * add another table for single band chip and export both kind of tables * point to the expected one in rtw89_pci_info by chip Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230113090632.60957-4-pkshih@realtek.com commit 3aa83062c3ec64dd757554a00653cc2d42179f12 Author: Chih-Kang Chang Date: Fri Jan 13 17:06:30 2023 +0800 wifi: rtw89: 8852c: rfk: correct ADC clock settings Some hardware modules don't have good RF characteristic as regular. It could get ADC abnormal in low temperature, and it causes bad RX performance and affects calibration result of DPK. Signed-off-by: Chih-Kang Chang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230113090632.60957-3-pkshih@realtek.com commit 15423743ae840977fe269ff907e37e20fe1c14df Author: Eric Huang Date: Fri Jan 13 17:06:29 2023 +0800 wifi: rtw89: correct register definitions of digital CFO and spur elimination This change fixes the precision of CFO and TX EVM, and it could imporve performance in some cases. Also, use the correctted definition for 8852A. Signed-off-by: Eric Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230113090632.60957-2-pkshih@realtek.com commit 877287f971b145a3699ea8466333d48aff6204e5 Author: Kuan-Chung Chen Date: Fri Jan 6 20:15:17 2023 +0800 wifi: rtw89: set the correct mac_id for management frames The mac_id of management frames should follow rtwvif->mac_id or rtwsta->mac_id. Add this patch to set the correct mac_id and prevent unexpected behavior. Signed-off-by: Kuan-Chung Chen Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230106121517.19841-2-pkshih@realtek.com commit 95dafeabe477d9692154e85140eda5124895ea4f Author: Kuan-Chung Chen Date: Fri Jan 6 20:15:16 2023 +0800 wifi: rtw89: fix null vif pointer when get management frame date rate When transmitting a packet that gets from ieee80211_nullfunc_get(), the vif in tx_info->control was no assigned, which will cause dereferencing a null pointer. Signed-off-by: Kuan-Chung Chen Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230106121517.19841-1-pkshih@realtek.com commit fbc2caf19914371973f14b6ac7ef525c49e4b1f1 Author: Ching-Te Ku Date: Fri Jan 6 20:08:44 2023 +0800 wifi: rtw89: coex: Change Wi-Fi role info related logic to version separate The Wi-Fi role info structure will need to H2C to firmware, firmware need these information to do some multi-role operation. v1 add DBCC and NOA information in the structure. And driver side also need to put/get values at the corresponding version of structure. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230106120844.17441-8-pkshih@realtek.com commit 447a3267cbed55963bcd146ddebc72429b630dbf Author: Ching-Te Ku Date: Fri Jan 6 20:08:43 2023 +0800 wifi: rtw89: coex: Change RTL8852B use v1 TDMA policy RTL8852B support the new features like TDMA instant (Change TDMA mechanism immediately), Co-RX feature (Wi-Fi/Bluetooth can RX in the same time) and so on. The v1 TDMA policy will enable those newer mechanism. It will have a better coexistence performance. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230106120844.17441-7-pkshih@realtek.com commit ae4e1adbb1be65cadde793239a39fa947a3ff828 Author: Ching-Te Ku Date: Fri Jan 6 20:08:42 2023 +0800 wifi: rtw89: coex: Packet traffic arbitration hardware owner monitor Because the difference of the hardware design, RTL8852C can not get the PTA owner by the same method with RTL8852B, RTL8852A. Modify the get owner API and related logic. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230106120844.17441-6-pkshih@realtek.com commit 2ce43be348502703cf173fc31ea45bfe5ff43f90 Author: Ching-Te Ku Date: Fri Jan 6 20:08:41 2023 +0800 wifi: rtw89: coex: refactor debug log of slot list Slot list is to list the WiFi/Bluetooth PTA hardware priority setting. Move the list parser to its function, not to append together with TDMA parser. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230106120844.17441-5-pkshih@realtek.com commit 9627c981ac82209c66c1b6c0e15c6cceb8656f01 Author: Kurt Kanzenbach Date: Fri Jan 13 16:12:58 2023 +0100 net: dsa: mv88e6xxx: Enable PTP receive for mv88e6390 The switch receives management traffic such as STP and LLDP. However, PTP messages are not received, only transmitted. Ideally, the switch would trap all PTP messages to the management CPU. This particular switch has a PTP block which identifies PTP messages and traps them to a dedicated port. There is a register to program this destination. This is not used at the moment. Therefore, program it to the same port as the MGMT traffic is trapped to. This allows to receive PTP messages as soon as timestamping is enabled. In addition, the datasheet mentions that this register is not valid e.g., for 6190 variants. So, add a new PTP operation which is added for the 6390 and 6290 devices. Tested simply like this on Marvell 88E6390, revision 1: |/ # ptp4l -2 -i lan4 --tx_timestamp_timeout=40 -m |[...] |ptp4l[147.450]: master offset 56 s2 freq +1262 path delay 413 |ptp4l[148.450]: master offset 22 s2 freq +1244 path delay 434 |ptp4l[149.450]: master offset 5 s2 freq +1234 path delay 446 |ptp4l[150.451]: master offset 3 s2 freq +1233 path delay 451 |ptp4l[151.451]: master offset 1 s2 freq +1232 path delay 451 |ptp4l[152.451]: master offset -3 s2 freq +1229 path delay 451 |ptp4l[153.451]: master offset 9 s2 freq +1240 path delay 451 Link: https://lore.kernel.org/r/CAFSKS=PJBpvtRJxrR4sG1hyxpnUnQpiHg4SrUNzAhkWnyt9ivg@mail.gmail.com Signed-off-by: Kurt Kanzenbach Reviewed-by: Andrew Lunn Tested-by: Vladimir Oltean Signed-off-by: David S. Miller commit 2626ccefe615a1faa8fb6bfb07708089b103e428 Author: Ching-Te Ku Date: Fri Jan 6 20:08:40 2023 +0800 wifi: rtw89: coex: Change firmware steps report to version separate The report records the slots/events and their time cost about the code call flow at firmware, ver 3 assign a reserved variable to recognize the report is enabled or not. And add corresponding function to parsing the report. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230106120844.17441-4-pkshih@realtek.com commit 3d929f075d3bb6187ad73375f6aee7bcf0b51851 Author: Ching-Te Ku Date: Fri Jan 6 20:08:39 2023 +0800 wifi: rtw89: coex: Change Wi-Fi Null data report to version separate Coexistence need to send Null data to stop AP keeps TX packet to DUT before DUT coexistence switch to Bluetooth time slot, or it will be an interference to DUT BT and because DUT will not RX packet from AP the packet retry may harmful to WL TP. Compare to v1 version, the newer firmware report will also report Null TX data counter. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230106120844.17441-3-pkshih@realtek.com commit 72f8b0461b4aa1b90248c36f3d2ea4a58074672e Author: Ching-Te Ku Date: Fri Jan 6 20:08:38 2023 +0800 wifi: rtw89: coex: Add version code for Wi-Fi firmware coexistence control The newer Wi-Fi firmware are all changed to "Not to send H2C to mention firmware how many call flow step should firmware trace". The structure had removed the member, and define the steps number at newer version firmware. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230106120844.17441-2-pkshih@realtek.com commit ed9e6166eb0984b718facb7ca59296098cc3aa64 Author: Jiasheng Jiang Date: Wed Jan 4 22:29:01 2023 +0800 wifi: rtw89: Add missing check for alloc_workqueue Add check for the return value of alloc_workqueue since it may return NULL pointer. Moreover, add destroy_workqueue when rtw89_load_firmware fails. Fixes: e3ec7017f6a2 ("rtw89: add Realtek 802.11ax driver") Signed-off-by: Jiasheng Jiang Acked-by: Ping-Ke Shih Reviewed-by: Leon Romanovsky Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230104142901.1611-1-jiasheng@iscas.ac.cn commit 4a0e218cc9c42d1903ade8b5a371dcf48cf918c5 Author: Zong-Zhe Yang Date: Tue Jan 3 22:10:54 2023 +0800 wifi: rtw89: fix potential leak in rtw89_append_probe_req_ie() Do `kfree_skb(new)` before `goto out` to prevent potential leak. Fixes: 895907779752 ("rtw89: 8852a: add ieee80211_ops::hw_scan") Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230103141054.17372-1-pkshih@realtek.com commit 3f625adc61a0f015c2ce982bc49a84e163094a0c Author: Ching-Te Ku Date: Tue Jan 3 22:02:38 2023 +0800 wifi: rtw89: coex: Update WiFi role info H2C report Change style to feature version separate. And because there are different WiFi roles number in the firmware, it will make structure length longer or shorter, so update the length calculator to cover the difference. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230103140238.15601-8-pkshih@realtek.com commit 891b6a3f9407965436136319ad81f03bbf97310d Author: Ching-Te Ku Date: Tue Jan 3 22:02:37 2023 +0800 wifi: rtw89: coex: only read Bluetooth counter of report version 1 for RTL8852A Only when firmware control report version is 1, need to get the counter by reading the register. The other version will monitor the counter at firmware. And upstream branch only RTL8852A has this old version. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230103140238.15601-7-pkshih@realtek.com commit 0c06fd47335ab9bbcbca250267eb22227e98ffa4 Author: Ching-Te Ku Date: Tue Jan 3 22:02:36 2023 +0800 wifi: rtw89: coex: Add v5 firmware control report Comparing v5 control report to v4 version, v5 reduce some of variable's size to reduce firmware code size. And change the grant signal report format. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230103140238.15601-6-pkshih@realtek.com commit b02e3f5c344d62da86afbc6444638a9beb375f2e Author: Ching-Te Ku Date: Tue Jan 3 22:02:35 2023 +0800 wifi: rtw89: coex: Change firmware control report to version separate The rtw89 driver may support more than 1 version of Wi-Fi firmware for certain chips. In order to support all the firmware, change to select logic by firmware feature version code. Type control version 4 will monitor Bluetooth PTA hardware counters at firmware and C2H to driver, but version 1 will not do this. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230103140238.15601-5-pkshih@realtek.com commit 202c3b5c276f3f7525d9baabea7e8896d300ceff Author: Ching-Te Ku Date: Tue Jan 3 22:02:34 2023 +0800 wifi: rtw89: coex: Add v4 version firmware cycle report To support v4 version firmware cycle report, apply the related structure and functions. v4 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. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230103140238.15601-4-pkshih@realtek.com commit fab895b31982f8093afe807cb0a69805aaa97850 Author: Ching-Te Ku Date: Tue Jan 3 22:02:33 2023 +0800 wifi: rtw89: coex: Rename BTC firmware cycle report by feature version Because there are new report format in the upcoming patches, to make the logic more readable, rename the related structure by their version number. And to support the several version at the same time, add union definition to include all the versions. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230103140238.15601-3-pkshih@realtek.com commit f643d08642b82eeb9b9654399dd04657050f7c6f Author: Ching-Te Ku Date: Tue Jan 3 22:02:32 2023 +0800 wifi: rtw89: coex: Remove le32 to CPU translator at firmware cycle report There are at least 2 version of cycle report format. If the code keep translating the report to local variable, the numbers of variable in check btc report function will out of maximum variable numbers. And most of these variable are using only one time, it is not necessary to store at memory. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230103140238.15601-2-pkshih@realtek.com commit e20c9f656654f74c9234e6cd3231aed72f53d246 Author: Masanari Iida Date: Fri Dec 23 19:20:58 2022 +0900 wifi: rtw89: Fix a typo in debug message This patch fixes a spelling typo in debug message. Signed-off-by: Masanari Iida Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221223102058.162179-1-standby24x7@gmail.com commit 880932e657ffc677c1b053a947afa87ffed1b29d Author: Pierre Gondois Date: Mon Nov 7 16:57:16 2022 +0100 arm64: dts: Update cache properties for ti The DeviceTree Specification v0.3 specifies that the cache node 'compatible' and 'cache-level' properties are 'required'. Cf. s3.8 Multi-level and Shared Cache Nodes The 'cache-unified' property should be present if one of the properties for unified cache is present ('cache-size', ...). Update the Device Trees accordingly. Signed-off-by: Pierre Gondois Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20221107155825.1644604-24-pierre.gondois@arm.com commit c48ac0efe6d71050f635b40116ba714961ad9d4c Author: Wadim Egorov Date: Wed Jan 4 17:29:27 2023 +0100 arm64: dts: ti: Add support for phyBOARD-Electra-AM642 Add basic support for phyCORE-AM64x SoM & phyBOARD-Electra-AM642 CB. The phyCORE-AM64x [1] is a SoM (System on Module) featuring TI's AM64x SoC. It can be used in combination with different carrier boards. This module can come with different sizes and models for DDR, eMMC, SPI NOR Flash and various SoCs from the AM64x family. A development Kit, called phyBOARD-Electra [2] is used as a carrier board reference design around the AM64x SoM. Supported features: * Debug UART * Heartbeat LED * GPIO buttons & LEDs * SPI NOR flash * eMMC * CAN * Ethernet * Micro SD card * I2C EEPROM * I2C RTC * I2C LED Dimmer * USB For more details, see: [1] Product page SoM: https://www.phytec.com/product/phycore-am64x [2] Product page CB: https://www.phytec.com/product/phyboard-am64x Signed-off-by: Wadim Egorov Reviewed-by: Ravi Gunasekaran Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230104162927.1215033-2-w.egorov@phytec.de commit 86fc17d8495e7c221283267519561ea04a44f7b4 Author: Wadim Egorov Date: Wed Jan 4 17:29:26 2023 +0100 dt-bindings: arm: ti: Add bindings for PHYTEC AM64x based hardware Add devicetree bindings for AM64x based phyCORE-AM64 SoM and phyBOARD-Electra RDK. Signed-off-by: Wadim Egorov Acked-by: Krzysztof Kozlowski Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230104162927.1215033-1-w.egorov@phytec.de commit 71dc9ec9ac7d3eee785cdc986c3daeb821381e20 Author: Bobby Eshleman Date: Fri Jan 13 22:21:37 2023 +0000 virtio/vsock: replace virtio_vsock_pkt with sk_buff This commit changes virtio/vsock to use sk_buff instead of virtio_vsock_pkt. Beyond better conforming to other net code, using sk_buff allows vsock to use sk_buff-dependent features in the future (such as sockmap) and improves throughput. This patch introduces the following performance changes: Tool: Uperf Env: Phys Host + L1 Guest Payload: 64k Threads: 16 Test Runs: 10 Type: SOCK_STREAM Before: commit b7bfaa761d760 ("Linux 6.2-rc3") Before ------ g2h: 16.77Gb/s h2g: 10.56Gb/s After ----- g2h: 21.04Gb/s h2g: 10.76Gb/s Signed-off-by: Bobby Eshleman Reviewed-by: Stefano Garzarella Signed-off-by: David S. Miller commit 42057a6ba99f42bd41a60e1f3ed111296e8bf099 Author: Vignesh Raghavendra Date: Tue Jan 3 09:51:10 2023 +0530 arm64: dts: ti: k3-am62a7-sk: Enable USB1 node Enable USB1 host port on AM62A7 SK. Co-developed-by: Bryan Brattlof Signed-off-by: Bryan Brattlof Acked-by: Dhruva Gole Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230103042110.1092122-5-vigneshr@ti.com commit a9da45c013f232e72a1899ad2bf3760a187c2ab8 Author: Vignesh Raghavendra Date: Tue Jan 3 09:51:09 2023 +0530 arm64: dts: ti: k3-am62a7-sk: Enable ethernet port AM62A7 SK has a DP83867 PHY on the board connected to first port of CPSW, enable the same. Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230103042110.1092122-4-vigneshr@ti.com commit 3dad70def7ff086152a383a60dd6ca4ea8a9b10d Author: Vignesh Raghavendra Date: Tue Jan 3 09:51:08 2023 +0530 arm64: dts: ti: k3-am62a-main: Add more peripheral nodes Add DT nodes for main domain SPI, PWM, DMA, CPSW (ethernet), mailbox, spinlock, USB and CAN. Co-developed-by: Bryan Brattlof Signed-off-by: Bryan Brattlof Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230103042110.1092122-3-vigneshr@ti.com commit eaee246b5e7b212069af40d6eb419158fac1325d Author: Vignesh Raghavendra Date: Tue Jan 3 09:51:07 2023 +0530 arm64: dts: ti: k3-am62a-mcu: Add MCU domain peripherals Introduce DT nodes for MCU domain SPIs and GPIO modules. Co-developed-by: Bryan Brattlof Signed-off-by: Bryan Brattlof Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230103042110.1092122-2-vigneshr@ti.com commit e20a06aca5c9d2d68354c340f96999d8dcb7128d Author: Apurva Nandan Date: Thu Jan 12 19:57:25 2023 +0530 arm64: dts: ti: Add support for J784S4 EVM board J784S4 EVM board is designed for TI J784S4 SoC. It supports the following interfaces: * 32 GB DDR4 RAM * x2 Gigabit Ethernet interfaces capable of working in Switch and MAC mode * x1 Input Audio Jack, x1 Output Audio Jack * x1 USB2.0 Hub with two Type A host and x1 USB 3.1 Type-C Port * x2 4L PCIe connector * x1 UHS-1 capable micro-SD card slot * 512 Mbit OSPI flash, 1 Gbit Octal NAND flash, 512 Mbit QSPI flash, UFS flash. * x6 UART through UART-USB bridge * XDS110 for onboard JTAG debug using USB * Temperature sensors, user push buttons and LEDs * 40-pin User Expansion Connector * x2 ENET Expansion Connector, x1 GESI expander, x2 Display connector * x1 15-pin CSI header * x6 MCAN instances Add basic support for J784S4-EVM. Schematics: https://www.ti.com/lit/zip/sprr458 Signed-off-by: Hari Nagalla Signed-off-by: Nishanth Menon Signed-off-by: Apurva Nandan Tested-by: Manorit Chawdhry Reviewed-by: Vaishnav Achath Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230112142725.77785-5-a-nandan@ti.com commit 4664ebd8346adaa7530555a29b47392104b5ba6c Author: Apurva Nandan Date: Thu Jan 12 19:57:24 2023 +0530 arm64: dts: ti: Add initial support for J784S4 SoC The J784S4 SoC belongs to the K3 Multicore SoC architecture platform, providing advanced system integration in automotive, ADAS and industrial applications requiring AI at the network edge. This SoC extends the K3 Jacinto 7 family of SoCs with focus on raising performance and integration while providing interfaces, memory architecture and compute performance for multi-sensor, high concurrency applications. Some highlights of this SoC are: * Up to 8 Cortex-A72s, four clusters of lockstep capable dual Cortex-R5F MCUs, 4 C7x floating point vector DSPs with Matrix Multiply Accelerator (MMA) for deep learning and CNN. * 3D GPU: Automotive grade IMG BXS-4-64 * Vision Processing Accelerator (VPAC) with image signal processor and Depth and Motion Processing Accelerator (DMPAC) * Three CSI2.0 4L RX plus two CSI2.0 4L TX, two DSI Tx, one eDP/DP and one DPI interface. * Integrated gigabit ethernet switch, up to 8 ports (TDA4VH), two ports support 10Gb USXGMII; Two 4 lane PCIe-GEN3 controllers, USB3.0 Dual-role device subsystems, Up to 20 MCANs, among other peripherals. See J784S4 Technical Reference Manual (SPRUJ52 - JUNE 2022) for further details: http://www.ti.com/lit/zip/spruj52 Signed-off-by: Hari Nagalla Signed-off-by: Nishanth Menon Signed-off-by: Apurva Nandan Reviewed-by: Vaishnav Achath Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230112142725.77785-4-a-nandan@ti.com commit 5ef2702ab48e3e4732cba73f69e11784c53f8f2b Merge: b27401a30ee46 6f8179c192345 Author: David S. Miller Date: Mon Jan 16 13:21:11 2023 +0000 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2023-01-13 (ixgbe) This series contains updates to ixgbe driver only. Jesse resolves warning for RCU pointer by no longer restoring old pointer. Sebastian adds waiting for updating of link info on devices utilizing crosstalk fix to avoid false link state. ==================== Signed-off-by: David S. Miller commit 7b3c4c370c09313e22b555e79167e73d233611d1 Author: Andrew Lunn Date: Mon Jan 16 12:15:09 2023 +0100 regmap: Rework regmap_mdio_c45_{read|write} for new C45 API. The MDIO subsystem is getting rid of MII_ADDR_C45 and thus also encoding associated encoding of the C45 device address and register address into one value. regmap-mdio also uses this encoding for the C45 bus. Move to the new C45 helpers for MDIO access and provide regmap-mdio helper macros. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20230116111509.4086236-1-michael@walle.cc Signed-off-by: Mark Brown commit 660145d708be52f946a82e5b633c020f58f996de Author: Jisoo Jang Date: Fri Dec 30 16:51:39 2022 +0900 wifi: brcmfmac: ensure CLM version is null-terminated to prevent stack-out-of-bounds Fix a stack-out-of-bounds read in brcmfmac that occurs when 'buf' that is not null-terminated is passed as an argument of strreplace() in brcmf_c_preinit_dcmds(). This buffer is filled with a CLM version string by memcpy() in brcmf_fil_iovar_data_get(). Ensure buf is null-terminated. Found by a modified version of syzkaller. [ 33.004414][ T1896] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available [ 33.013486][ T1896] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43236/3 wl0: Nov 30 2011 17:33:42 version 5.90.188.22 [ 33.021554][ T1896] ================================================================== [ 33.022379][ T1896] BUG: KASAN: stack-out-of-bounds in strreplace+0xf2/0x110 [ 33.023122][ T1896] Read of size 1 at addr ffffc90001d6efc8 by task kworker/0:2/1896 [ 33.023852][ T1896] [ 33.024096][ T1896] CPU: 0 PID: 1896 Comm: kworker/0:2 Tainted: G O 5.14.0+ #132 [ 33.024927][ T1896] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 [ 33.026065][ T1896] Workqueue: usb_hub_wq hub_event [ 33.026581][ T1896] Call Trace: [ 33.026896][ T1896] dump_stack_lvl+0x57/0x7d [ 33.027372][ T1896] print_address_description.constprop.0.cold+0xf/0x334 [ 33.028037][ T1896] ? strreplace+0xf2/0x110 [ 33.028403][ T1896] ? strreplace+0xf2/0x110 [ 33.028807][ T1896] kasan_report.cold+0x83/0xdf [ 33.029283][ T1896] ? strreplace+0xf2/0x110 [ 33.029666][ T1896] strreplace+0xf2/0x110 [ 33.029966][ T1896] brcmf_c_preinit_dcmds+0xab1/0xc40 [ 33.030351][ T1896] ? brcmf_c_set_joinpref_default+0x100/0x100 [ 33.030787][ T1896] ? rcu_read_lock_sched_held+0xa1/0xd0 [ 33.031223][ T1896] ? rcu_read_lock_bh_held+0xb0/0xb0 [ 33.031661][ T1896] ? lock_acquire+0x19d/0x4e0 [ 33.032091][ T1896] ? find_held_lock+0x2d/0x110 [ 33.032605][ T1896] ? brcmf_usb_deq+0x1a7/0x260 [ 33.033087][ T1896] ? brcmf_usb_rx_fill_all+0x5a/0xf0 [ 33.033582][ T1896] brcmf_attach+0x246/0xd40 [ 33.034022][ T1896] ? wiphy_new_nm+0x1476/0x1d50 [ 33.034383][ T1896] ? kmemdup+0x30/0x40 [ 33.034722][ T1896] brcmf_usb_probe+0x12de/0x1690 [ 33.035223][ T1896] ? brcmf_usbdev_qinit.constprop.0+0x470/0x470 [ 33.035833][ T1896] usb_probe_interface+0x25f/0x710 [ 33.036315][ T1896] really_probe+0x1be/0xa90 [ 33.036656][ T1896] __driver_probe_device+0x2ab/0x460 [ 33.037026][ T1896] ? usb_match_id.part.0+0x88/0xc0 [ 33.037383][ T1896] driver_probe_device+0x49/0x120 [ 33.037790][ T1896] __device_attach_driver+0x18a/0x250 [ 33.038300][ T1896] ? driver_allows_async_probing+0x120/0x120 [ 33.038986][ T1896] bus_for_each_drv+0x123/0x1a0 [ 33.039906][ T1896] ? bus_rescan_devices+0x20/0x20 [ 33.041412][ T1896] ? lockdep_hardirqs_on_prepare+0x273/0x3e0 [ 33.041861][ T1896] ? trace_hardirqs_on+0x1c/0x120 [ 33.042330][ T1896] __device_attach+0x207/0x330 [ 33.042664][ T1896] ? device_bind_driver+0xb0/0xb0 [ 33.043026][ T1896] ? kobject_uevent_env+0x230/0x12c0 [ 33.043515][ T1896] bus_probe_device+0x1a2/0x260 [ 33.043914][ T1896] device_add+0xa61/0x1ce0 [ 33.044227][ T1896] ? __mutex_unlock_slowpath+0xe7/0x660 [ 33.044891][ T1896] ? __fw_devlink_link_to_suppliers+0x550/0x550 [ 33.045531][ T1896] usb_set_configuration+0x984/0x1770 [ 33.046051][ T1896] ? kernfs_create_link+0x175/0x230 [ 33.046548][ T1896] usb_generic_driver_probe+0x69/0x90 [ 33.046931][ T1896] usb_probe_device+0x9c/0x220 [ 33.047434][ T1896] really_probe+0x1be/0xa90 [ 33.047760][ T1896] __driver_probe_device+0x2ab/0x460 [ 33.048134][ T1896] driver_probe_device+0x49/0x120 [ 33.048516][ T1896] __device_attach_driver+0x18a/0x250 [ 33.048910][ T1896] ? driver_allows_async_probing+0x120/0x120 [ 33.049437][ T1896] bus_for_each_drv+0x123/0x1a0 [ 33.049814][ T1896] ? bus_rescan_devices+0x20/0x20 [ 33.050164][ T1896] ? lockdep_hardirqs_on_prepare+0x273/0x3e0 [ 33.050579][ T1896] ? trace_hardirqs_on+0x1c/0x120 [ 33.050936][ T1896] __device_attach+0x207/0x330 [ 33.051399][ T1896] ? device_bind_driver+0xb0/0xb0 [ 33.051888][ T1896] ? kobject_uevent_env+0x230/0x12c0 [ 33.052314][ T1896] bus_probe_device+0x1a2/0x260 [ 33.052688][ T1896] device_add+0xa61/0x1ce0 [ 33.053121][ T1896] ? __fw_devlink_link_to_suppliers+0x550/0x550 [ 33.053568][ T1896] usb_new_device.cold+0x463/0xf66 [ 33.053953][ T1896] ? hub_disconnect+0x400/0x400 [ 33.054313][ T1896] ? rwlock_bug.part.0+0x90/0x90 [ 33.054661][ T1896] ? lockdep_hardirqs_on_prepare+0x273/0x3e0 [ 33.055094][ T1896] hub_event+0x10d5/0x3330 [ 33.055530][ T1896] ? hub_port_debounce+0x280/0x280 [ 33.055934][ T1896] ? __lock_acquire+0x1671/0x5790 [ 33.056387][ T1896] ? wq_calc_node_cpumask+0x170/0x2a0 [ 33.056924][ T1896] ? lock_release+0x640/0x640 [ 33.057383][ T1896] ? rcu_read_lock_sched_held+0xa1/0xd0 [ 33.057916][ T1896] ? rcu_read_lock_bh_held+0xb0/0xb0 [ 33.058402][ T1896] ? lockdep_hardirqs_on_prepare+0x273/0x3e0 [ 33.059019][ T1896] process_one_work+0x873/0x13e0 [ 33.059488][ T1896] ? lock_release+0x640/0x640 [ 33.059932][ T1896] ? pwq_dec_nr_in_flight+0x320/0x320 [ 33.060446][ T1896] ? rwlock_bug.part.0+0x90/0x90 [ 33.060898][ T1896] worker_thread+0x8b/0xd10 [ 33.061348][ T1896] ? __kthread_parkme+0xd9/0x1d0 [ 33.061810][ T1896] ? process_one_work+0x13e0/0x13e0 [ 33.062288][ T1896] kthread+0x379/0x450 [ 33.062660][ T1896] ? _raw_spin_unlock_irq+0x24/0x30 [ 33.063148][ T1896] ? set_kthread_struct+0x100/0x100 [ 33.063606][ T1896] ret_from_fork+0x1f/0x30 [ 33.064070][ T1896] [ 33.064313][ T1896] [ 33.064545][ T1896] addr ffffc90001d6efc8 is located in stack of task kworker/0:2/1896 at offset 512 in frame: [ 33.065478][ T1896] brcmf_c_preinit_dcmds+0x0/0xc40 [ 33.065973][ T1896] [ 33.066191][ T1896] this frame has 4 objects: [ 33.066614][ T1896] [48, 56) 'ptr' [ 33.066618][ T1896] [80, 148) 'revinfo' [ 33.066957][ T1896] [192, 210) 'eventmask' [ 33.067338][ T1896] [256, 512) 'buf' [ 33.067742][ T1896] [ 33.068304][ T1896] Memory state around the buggy address: [ 33.068838][ T1896] ffffc90001d6ee80: f2 00 00 02 f2 f2 f2 f2 f2 00 00 00 00 00 00 00 [ 33.069545][ T1896] ffffc90001d6ef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 33.070626][ T1896] >ffffc90001d6ef80: 00 00 00 00 00 00 00 00 00 f3 f3 f3 f3 f3 f3 f3 [ 33.072052][ T1896] ^ [ 33.073043][ T1896] ffffc90001d6f000: f3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 33.074230][ T1896] ffffc90001d6f080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 33.074914][ T1896] ================================================================== [ 33.075713][ T1896] Disabling lock debugging due to kernel taint Reviewed-by: Arend van Spriel Signed-off-by: Jisoo Jang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221230075139.56591-1-jisoo.jang@yonsei.ac.kr commit 01338bb82fed40a6a234c2b36a92367c8671adf0 Author: Marek Vasut Date: Sun Oct 16 02:35:56 2022 +0200 drm/bridge: tc358767: Set default CLRSIPO count The current CLRSIPO count is still marginal and does not work with high DSI clock rates in burst mode. Increase it further to allow the DSI link to work at up to 1Gbps lane speed. This returns the counts to defaults as provided by datasheet. Fixes: ea6490b02240b ("drm/bridge: tc358767: increase CLRSIPO count") Signed-off-by: Marek Vasut Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20221016003556.406441-1-marex@denx.de commit 542c893caa7bc2e5263fe0a4e17d228f9b3d0acd Author: Uwe Kleine-König Date: Fri Nov 18 23:44:05 2022 +0100 pinctrl: sx150x: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20221118224540.619276-512-uwe@kleine-koenig.org Signed-off-by: Linus Walleij commit df715f26cb7b43e3fabb4518aa65931180de8a71 Author: Daniel Lezcano Date: Mon Jan 16 11:19:54 2023 +0100 thermal/drivers/qcom: Remove duplicate set next trip point interrupt code The tsens driver reprogram the next trip points in the irq handler. This function then call thermal_zone_device_update(). However, thermal_zone_device_update() calls thermal_zone_set_trips() and from there it calls the backend 'set_trips' ops. This one in turn reprogram the next trip points (low/high). Consequently, the code setting the next trip points interrupt in the interrupt handle is not needed and could be removed. Reviewed-by: Bjorn Andersson Acked-by: Amit Kucheria Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230116101955.3961427-1-daniel.lezcano@linaro.org commit b27401a30ee466c4476b035487be0580767ba1fb Author: Kirill Tkhai Date: Sat Jan 14 12:35:02 2023 +0300 unix: Improve locking scheme in unix_show_fdinfo() After switching to TCP_ESTABLISHED or TCP_LISTEN sk_state, alive SOCK_STREAM and SOCK_SEQPACKET sockets can't change it anymore (since commit 3ff8bff704f4 "unix: Fix race in SOCK_SEQPACKET's unix_dgram_sendmsg()"). Thus, we do not need to take lock here. Signed-off-by: Kirill Tkhai Reviewed-by: Kuniyuki Iwashima Signed-off-by: David S. Miller commit 7a5fa171a2869e99fe38f61c60274e7b4bf3a5e0 Author: Christoph Hellwig Date: Mon Jan 16 09:52:05 2023 +0100 ext2: propagate errors from ext2_prepare_chunk Propagate errors from ext2_prepare_chunk to the callers and handle them there. While touching the prototype also turn update_times into a bool from the current int used as bool. [JK: fixed up error recovery path in ext2_rename()] Signed-off-by: Christoph Hellwig Signed-off-by: Jan Kara Message-Id: <20230116085205.2342975-1-hch@lst.de> commit 738455858a2d21b769f673892546cf8300c9fd78 Author: Krzysztof Kozlowski Date: Mon Jan 2 12:41:48 2023 +0100 ASoC: codecs: wsa881x: Use proper shutdown GPIO polarity The shutdown GPIO is active low (SD_N), but this depends on actual board layout. Linux drivers should only care about logical state, where high (1) means shutdown and low (0) means do not shutdown. Invert the GPIO to match logical value while preserving backwards DTB compatibility. It is not possible to detect whether ACTIVE_HIGH flag in DTB is because it is an old DTB (using incorrect flag) or it is a new DTB with a correct hardware pin polarity description. Therefore the solution prioritizes backwards compatibility while relying on relevant DTS being upstreamed. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230102114152.297305-4-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 31a90367443b21f76b972c00aad3430447c999d6 Author: Krzysztof Kozlowski Date: Mon Jan 2 12:41:47 2023 +0100 ASoC: codecs: wsa881x: 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/20230102114152.297305-3-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit c617c9e7024d152426acf9f1aaf01070b6852f13 Author: Krzysztof Kozlowski Date: Mon Jan 2 12:41:46 2023 +0100 ASoC: codecs: wsa881x: 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/20230102114152.297305-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit d5ce5d3895a33fa8e0dce89c2404facbdef55dcb Author: Krzysztof Kozlowski Date: Mon Jan 2 12:41:45 2023 +0100 ASoC: codecs: wsa883x: 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/20230102114152.297305-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit aea11bcddcafc7f548c4fa574cb6019e7690008d Author: Alexander Stein Date: Wed Jan 11 17:11:44 2023 +0100 ASoC: fsl_sai: Use dev_err_probe This helps figuring out why the device probe is deferred, e.g. missing FSL_EDMA driver. Signed-off-by: Alexander Stein Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20230111161144.3275546-1-alexander.stein@ew.tq-group.com Signed-off-by: Mark Brown commit a23924b7dd7b748fff8e305e1daf590fed2af21b Author: Shengjiu Wang Date: Mon Jan 16 15:07:54 2023 +0800 ASoC: fsl_sai: initialize is_dsp_mode flag Initialize is_dsp_mode flag in the beginning of function fsl_sai_set_dai_fmt_tr(). When the DAIFMT is DAIFMT_DSP_B the first time, is_dsp_mode is true, then the second time DAIFMT is DAIFMT_I2S, is_dsp_mode still true, which is a wrong state. So need to initialize is_dsp_mode flag every time. Fixes: a3f7dcc9cc03 ("ASoC: fsl-sai: Add SND_SOC_DAIFMT_DSP_A/B support.") Signed-off-by: Shengjiu Wang Reviewed-by: Iuliana Prodan Link: https://lore.kernel.org/r/1673852874-32200-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit ce0382384e88c75d2506d4e49929ab8c22527dc7 Author: Trevor Wu Date: Mon Jan 16 11:41:31 2023 +0800 ASoC: dt-bindings: mediatek,mt8188-mt6359: add mt8188-mt6359 document Add document for mt8188 board with mt6359. Signed-off-by: Trevor Wu Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230116034131.23943-14-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit 96035d46d4b45274208327826608b873ec6d7f06 Author: Trevor Wu Date: Mon Jan 16 11:41:30 2023 +0800 ASoC: mediatek: mt8188: add machine driver with mt6359 Add support for mt8188 board with mt6359. Signed-off-by: Trevor Wu Reported-by: kernel test robot Link: https://lore.kernel.org/r/20230116034131.23943-13-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit 4302187d955f166c03b4fa7c993b89ffbabfca4e Author: Trevor Wu Date: Mon Jan 16 11:41:29 2023 +0800 ASoC: mediatek: common: add soundcard driver common code Add common code to support of_node of codec parsing, so codec phandle can be assigned by sound-dai in dts. Signed-off-by: Trevor Wu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230116034131.23943-12-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit 692d25b67e1089a7683978d1860e511f2ca86e7b Author: Trevor Wu Date: Mon Jan 16 11:41:28 2023 +0800 ASoC: dt-bindings: mediatek,mt8188-afe: add audio afe document Add mt8188 audio afe document. Signed-off-by: Trevor Wu Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230116034131.23943-11-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit da387d3223aea9505fcd740105b7494df5bb44ad Author: Trevor Wu Date: Mon Jan 16 11:41:27 2023 +0800 ASoC: mediatek: mt8188: add control for timing select Add mixer control for irq and memif timing selection. Signed-off-by: Trevor Wu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230116034131.23943-10-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit bf106bf09376608e4992f9806c21842a4223f18b Author: Trevor Wu Date: Mon Jan 16 11:41:26 2023 +0800 ASoC: mediatek: mt8188: add platform driver Add mt8188 platform driver. Signed-off-by: Trevor Wu Reported-by: kernel test robot Link: https://lore.kernel.org/r/20230116034131.23943-9-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit f6b026479b1392b4b2aa51ed1edbfa99f6d49b59 Author: Trevor Wu Date: Mon Jan 16 11:41:25 2023 +0800 ASoC: mediatek: mt8188: support audio clock control Add audio clock wrapper and audio tuner control. Signed-off-by: Trevor Wu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230116034131.23943-8-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit 5d43bdd71200e1b08b7c4b7f3d3c86fdd23c4a3d Author: Trevor Wu Date: Mon Jan 16 11:41:24 2023 +0800 ASoC: mediatek: mt8188: support pcmif in platform driver Add mt8188 pcmif dai driver support Signed-off-by: Trevor Wu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230116034131.23943-7-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit 2babb47774891bc8e68ae229d42ee7df90db9fd9 Author: Trevor Wu Date: Mon Jan 16 11:41:23 2023 +0800 ASoC: mediatek: mt8188: support etdm in platform driver Add mt8188 etdm dai driver support. Signed-off-by: Trevor Wu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230116034131.23943-6-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit 5d1c8e881ae0e6e931396952534d422facbebdbe Author: Trevor Wu Date: Mon Jan 16 11:41:22 2023 +0800 ASoC: mediatek: mt8188: support adda in platform driver Add mt8188 adda dai driver support. Signed-off-by: Trevor Wu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230116034131.23943-5-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit fdd4e1a28d69648c35bea020c0df3735ddc74889 Author: Trevor Wu Date: Mon Jan 16 11:41:21 2023 +0800 ASoC: mediatek: mt8188: support audsys clock Add mt8188 audio cg clock control. Audio clock gates are registered to CCF for reference count and clock parent management. Signed-off-by: Trevor Wu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230116034131.23943-4-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit f90f0dd809e6600cf20ab74f07237241925f5cf8 Author: Trevor Wu Date: Mon Jan 16 11:41:20 2023 +0800 ASoC: mediatek: mt8188: add common header Add header files for register definition and structure. Signed-off-by: Trevor Wu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230116034131.23943-3-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit 7d40cc8eedbad7cce77226c5d01d891a40373eeb Author: Trevor Wu Date: Mon Jan 16 11:41:19 2023 +0800 ASoC: mediatek: common: add SMC ops and SMC CMD SMC call is required to communicate with ATF for some secure operations, so we add SMC ops IDs and SMC CMD ID to common header. Signed-off-by: Trevor Wu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230116034131.23943-2-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit 40ea3ee2ced1a6eb3d6b22ecda40f5f6179fd990 Merge: 5129bd8e8840b fab89bafa95b6 Author: David S. Miller Date: Mon Jan 16 11:15:49 2023 +0000 Merge branch 'virtio-net-xdp-multi-buffer' Heng Qi says: ==================== virtio-net: support multi buffer xdp Changes since PATCH v4: - Make netdev_warn() in [PATCH 2/10] independent from [PATCH 3/10]. Changes since PATCH v3: - Separate fix patch [2/10] for MTU calculation of single buffer xdp. Note that this patch needs to be backported to the stable branch. Changes since PATCH v2: - Even if single buffer xdp has a hole mechanism, there will be no problem (limiting mtu and turning off GUEST GSO), so there is no need to backport "[PATCH 1/9]"; - Modify calculation of MTU for single buffer xdp in virtnet_xdp_set(); - Make truesize in mergeable mode return to literal meaning; - Add some comments for legibility; Changes since RFC: - Using headroom instead of vi->xdp_enabled to avoid re-reading in add_recvbuf_mergeable(); - Disable GRO_HW and keep linearization for single buffer xdp; - Renamed to virtnet_build_xdp_buff_mrg(); - pr_debug() to netdev_dbg(); - Adjusted the order of the patch series. Currently, virtio net only supports xdp for single-buffer packets or linearized multi-buffer packets. This patchset supports xdp for multi-buffer packets, then larger MTU can be used if xdp sets the xdp.frags. This does not affect single buffer handling. In order to build multi-buffer xdp neatly, we integrated the code into virtnet_build_xdp_buff_mrg() for xdp. The first buffer is used for prepared xdp buff, and the rest of the buffers are added to its skb_shared_info structure. This structure can also be conveniently converted during XDP_PASS to get the corresponding skb. Since virtio net uses comp pages, and bpf_xdp_frags_increase_tail() is based on the assumption of the page pool, (rxq->frag_size - skb_frag_size(frag) - skb_frag_off(frag)) is negative in most cases. So we didn't set xdp_rxq->frag_size in virtnet_open() to disable the tail increase. ==================== Signed-off-by: David S. Miller commit fab89bafa95b6f333b0e2dca0ae07a0b3600e954 Author: Heng Qi Date: Sat Jan 14 16:22:29 2023 +0800 virtio-net: support multi-buffer xdp Driver can pass the skb to stack by build_skb_from_xdp_buff(). Driver forwards multi-buffer packets using the send queue when XDP_TX and XDP_REDIRECT, and clears the reference of multi pages when XDP_DROP. Signed-off-by: Heng Qi Reviewed-by: Xuan Zhuo Acked-by: Jason Wang Signed-off-by: David S. Miller commit 18117a842ab029df139f776bf31eebff6d0e0730 Author: Heng Qi Date: Sat Jan 14 16:22:28 2023 +0800 virtio-net: remove xdp related info from page_to_skb() For the clear construction of xdp_buff, we remove the xdp processing interleaved with page_to_skb(). Now, the logic of xdp and building skb from xdp are separate and independent. Signed-off-by: Heng Qi Reviewed-by: Xuan Zhuo Acked-by: Jason Wang Signed-off-by: David S. Miller commit b26aa481b4b710051dd663c89ed31f705a7a67eb Author: Heng Qi Date: Sat Jan 14 16:22:27 2023 +0800 virtio-net: build skb from multi-buffer xdp This converts the xdp_buff directly to a skb, including multi-buffer and single buffer xdp. We'll isolate the construction of skb based on xdp from page_to_skb(). Signed-off-by: Heng Qi Reviewed-by: Xuan Zhuo Acked-by: Jason Wang Signed-off-by: David S. Miller commit 97717e8dbda1dede65c4df12891332502df632f3 Author: Heng Qi Date: Sat Jan 14 16:22:26 2023 +0800 virtio-net: transmit the multi-buffer xdp This serves as the basis for XDP_TX and XDP_REDIRECT to send a multi-buffer xdp_frame. Signed-off-by: Heng Qi Reviewed-by: Xuan Zhuo Acked-by: Jason Wang Signed-off-by: David S. Miller commit 22174f79a44baf5e46faafff1d7b21363431b93a Author: Heng Qi Date: Sat Jan 14 16:22:25 2023 +0800 virtio-net: construct multi-buffer xdp in mergeable Build multi-buffer xdp using virtnet_build_xdp_buff_mrg(). For the prefilled buffer before xdp is set, we will probably use vq reset in the future. At the same time, virtio net currently uses comp pages, and bpf_xdp_frags_increase_tail() needs to calculate the tailroom of the last frag, which will involve the offset of the corresponding page and cause a negative value, so we disable tail increase by not setting xdp_rxq->frag_size. Signed-off-by: Heng Qi Reviewed-by: Xuan Zhuo Acked-by: Jason Wang Signed-off-by: David S. Miller commit ef75cb51f13941cf7633227ade43c4d86ecbc336 Author: Heng Qi Date: Sat Jan 14 16:22:24 2023 +0800 virtio-net: build xdp_buff with multi buffers Support xdp for multi buffer packets in mergeable mode. Putting the first buffer as the linear part for xdp_buff, and the rest of the buffers as non-linear fragments to struct skb_shared_info in the tailroom belonging to xdp_buff. Let 'truesize' return to its literal meaning, that is, when xdp is set, it includes the length of headroom and tailroom. Signed-off-by: Heng Qi Reviewed-by: Xuan Zhuo Acked-by: Jason Wang Signed-off-by: David S. Miller commit 50bd14bc98fa0c86ea1e688d93ef1ffe8f1572a0 Author: Heng Qi Date: Sat Jan 14 16:22:23 2023 +0800 virtio-net: update bytes calculation for xdp_frame Update relative record value for xdp_frame as basis for multi-buffer xdp transmission. Signed-off-by: Heng Qi Reviewed-by: Xuan Zhuo Acked-by: Jason Wang Signed-off-by: David S. Miller commit 8d9bc36de5fc7b64bbce7b479dbe0ffdcb31b3b5 Author: Heng Qi Date: Sat Jan 14 16:22:22 2023 +0800 virtio-net: set up xdp for multi buffer packets When the xdp program sets xdp.frags, which means it can process multi-buffer packets over larger MTU, so we continue to support xdp. Signed-off-by: Heng Qi Reviewed-by: Xuan Zhuo Acked-by: Jason Wang Signed-off-by: David S. Miller commit e814b958ad8857d6f7354d3a189776eb604d86dd Author: Heng Qi Date: Sat Jan 14 16:22:21 2023 +0800 virtio-net: fix calculation of MTU for single-buffer xdp When single-buffer xdp is loaded, the size of the buffer filled each time is 'sz = (PAGE_SIZE - headroom - tailroom)', which is the maximum packet length that the driver allows the device to pass in. Otherwise, the packet with a length greater than sz will come in, so num_buf will be greater than or equal to 2, and xdp_linearize_page() will be performed and the packet will be dropped because the total length is greater than PAGE_SIZE. So the maximum value of MTU for single-buffer xdp is 'max_sz = sz - ETH_HLEN'. Signed-off-by: Heng Qi Reviewed-by: Xuan Zhuo Acked-by: Jason Wang Signed-off-by: David S. Miller commit 484beac2ffc1d1dde5fde601deb28f3a82ac250e Author: Heng Qi Date: Sat Jan 14 16:22:20 2023 +0800 virtio-net: disable the hole mechanism for xdp XDP core assumes that the frame_size of xdp_buff and the length of the frag are PAGE_SIZE. The hole may cause the processing of xdp to fail, so we disable the hole mechanism when xdp is set. Signed-off-by: Heng Qi Reviewed-by: Xuan Zhuo Acked-by: Jason Wang Signed-off-by: David S. Miller commit 3a908971f7cbee59c2cc07f6fc6fc02a32652a90 Author: Dmitry Baryshkov Date: Sun Jan 1 21:40:28 2023 +0200 thermal/drivers/tsens: Drop single-cell code for msm8976/msm8956 There is no dtsi file for msm8976 in the kernel sources. Drop the compatibility with unofficial dtsi and remove support for handling the single-cell calibration data on msm8976. Cc: AngeloGioacchino Del Regno Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230101194034.831222-15-dmitry.baryshkov@linaro.org Signed-off-by: Daniel Lezcano commit dfadb4599ab0206935d5f14975b5e8112492b29c Author: Dmitry Baryshkov Date: Sun Jan 1 21:40:27 2023 +0200 thermal/drivers/tsens: Drop single-cell code for msm8939 There is no dtsi file for msm8939 in the kernel sources. Drop the compatibility with unofficial dtsi and remove support for handling the single-cell calibration data on msm8939. Cc: Shawn Guo Cc: Bryan O'Donoghue Reviewed-by: Bryan O'Donoghue Reviewed-by: Konrad Dybcio Acked-by: Shawn Guo Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230101194034.831222-14-dmitry.baryshkov@linaro.org Signed-off-by: Daniel Lezcano commit 51d78b8b1beba247e1e4314420d98acb0732c4b7 Author: Dmitry Baryshkov Date: Sun Jan 1 21:40:26 2023 +0200 thermal/drivers/tsens: Drop single-cell code for mdm9607 There is no dtsi file for mdm9607 in the kernel sources. Drop the compatibility with unofficial dtsi and remove support for handling the single-cell calibration data on mdm9607. Cc: Konrad Dybcio Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230101194034.831222-13-dmitry.baryshkov@linaro.org Signed-off-by: Daniel Lezcano commit 913d32e2786c183f5b38e7f1ffb67e9120afbf83 Author: Dmitry Baryshkov Date: Sun Jan 1 21:40:25 2023 +0200 thermal/drivers/tsens: Rework legacy calibration data parsers Rework existing calibration parsing code to use simple data structure describing data layout. This allows us to drop all the mask & shift values, replacing them with data tables. The code for msm8974 is not reworked, as it has separate calibration and backup data. Reported-by: kernel test robot Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230101194034.831222-12-dmitry.baryshkov@linaro.org Signed-off-by: Daniel Lezcano commit 439f2409a242549b614decfccbbacecad85d2c79 Author: Dmitry Baryshkov Date: Sun Jan 1 21:40:24 2023 +0200 thermal/drivers/tsens: Support using nvmem cells for msm8974 calibration MSM8974 has two sets of calibration data: main one and backup. Add support for parsing both sets of calibration data from nvmem cells. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230101194034.831222-11-dmitry.baryshkov@linaro.org Signed-off-by: Daniel Lezcano commit 498d245749ce35b21121cf5297547fca64bc52db Author: Dmitry Baryshkov Date: Sun Jan 1 21:40:23 2023 +0200 thermal/drivers/tsens: Support using nvmem cells for calibration data Add a unified function using nvmem cells for parsing the calibration data rather than parsing the calibration blob manually. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230101194034.831222-10-dmitry.baryshkov@linaro.org Signed-off-by: Daniel Lezcano commit 903238a33c116edf5f64f7a3fd246e6169cccfa6 Author: Dmitry Baryshkov Date: Sun Jan 1 21:40:22 2023 +0200 thermal/drivers/tsens: limit num_sensors to 9 for msm8939 On msm8939 last (hwid=10) sensor was added in the hw revision 3.0. Calibration data for it was placed outside of the main calibration data blob, so it is not accessible by the current blob-parsing code. Moreover data for the sensor's p2 is not contiguous in the fuses. This makes it hard to use nvmem_cell API to parse calibration data in a generic way. Since the sensor doesn't seem to be actually used by the existing hardware, disable the sensor for now. Fixes: 332bc8ebab2c ("thermal: qcom: tsens-v0_1: Add support for MSM8939") Cc: Bryan O'Donoghue Cc: Shawn Guo Acked-by: Shawn Guo Signed-off-by: Dmitry Baryshkov Reviewed-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20230101194034.831222-9-dmitry.baryshkov@linaro.org Signed-off-by: Daniel Lezcano commit 5aec3b035e0cbf3f042c2a03d654e5ad6748feb7 Author: Dmitry Baryshkov Date: Sun Jan 1 21:40:21 2023 +0200 thermal/drivers/tsens: fix slope values for msm8939 According to the vendor kernels (msm-3.10, 3.14 and 3.18), msm8939 uses non-standard slope values for calibrating the sensors. Fill them accordingly. Fixes: 332bc8ebab2c ("thermal: qcom: tsens-v0_1: Add support for MSM8939") Cc: Bryan O'Donoghue Cc: Shawn Guo Reviewed-by: Konrad Dybcio Acked-by: Shawn Guo Signed-off-by: Dmitry Baryshkov Reviewed-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20230101194034.831222-8-dmitry.baryshkov@linaro.org Signed-off-by: Daniel Lezcano commit a7d3006be5ca7b04e4b84b5ceaae55a700e511bd Author: Dmitry Baryshkov Date: Sun Jan 1 21:40:20 2023 +0200 thermal/drivers/tsens: Sort out msm8976 vs msm8956 data Tsens driver mentions that msm8976 data should be used for both msm8976 and msm8956 SoCs. This is not quite correct, as according to the vendor kernels, msm8976 should use standard slope values (3200), while msm8956 really uses the slope values found in the driver. Add separate compatibility string for msm8956, move slope value overrides to the corresponding init function and use the standard compute_intercept_slope() function for both platforms. Fixes: 0e580290170d ("thermal: qcom: tsens-v1: Add support for MSM8956 and MSM8976") Cc: AngeloGioacchino Del Regno Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230101194034.831222-7-dmitry.baryshkov@linaro.org Signed-off-by: Daniel Lezcano commit 3bf0ea99e2e32b0335106b86d84404cc85bcd113 Author: Dmitry Baryshkov Date: Sun Jan 1 21:40:19 2023 +0200 thermal/drivers/tsens: Drop msm8976-specific defines Drop msm8976-specific defines, which duplicate generic ones. Fixes: 0e580290170d ("thermal: qcom: tsens-v1: Add support for MSM8956 and MSM8976") Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230101194034.831222-6-dmitry.baryshkov@linaro.org Signed-off-by: Daniel Lezcano commit ca7b70b19e84ab58a91c603a0843ec1c3ad6d2db Author: Dmitry Baryshkov Date: Sun Jan 1 21:40:18 2023 +0200 thermal/drivers/tsens: Drop unnecessary hw_ids The tsens driver defaults to using hw_id equal to the index of the sensor. Thus it is superfluous to declare such hw_id arrays. Drop such arrays from mdm9607 and msm8976 data. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230101194034.831222-5-dmitry.baryshkov@linaro.org Signed-off-by: Daniel Lezcano commit acd31b9f225bc28ee1e21619ee8a0b8921b85767 Author: Dmitry Baryshkov Date: Sun Jan 1 21:40:17 2023 +0200 dt-bindings: thermal: tsens: add per-sensor cells for msm8974 The msm8974 platform uses two sets of calibration data, add a special case to handle both of them. Acked-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230101194034.831222-4-dmitry.baryshkov@linaro.org Signed-off-by: Daniel Lezcano commit 4f4292bf12f2dd12b4c69e4d3479fc561b1577bb Author: Dmitry Baryshkov Date: Sun Jan 1 21:40:16 2023 +0200 dt-bindings: thermal: tsens: support per-sensor calibration cells Allow specifying the exact calibration mode and calibration data as nvmem cells, rather than specifying just a single calibration data blob. Note, unlike the vendor kernel the calibration data uses hw_ids rather than software sensor indices (to match actual tsens usage in thermal zones). Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230101194034.831222-3-dmitry.baryshkov@linaro.org Signed-off-by: Daniel Lezcano commit 8c1421456073aa00af651704a8f4cf0b2f50dc4a Author: Dmitry Baryshkov Date: Sun Jan 1 21:40:15 2023 +0200 dt-bindings: thermal: tsens: add msm8956 compat When adding support for msm8976 it was thought that msm8956 would reuse the same compat. However checking the vendor kernel revealed that these two platforms use different slope values for calculating the calibration data. Add new compatible for the tsens on msm8956 SoC. Acked-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230101194034.831222-2-dmitry.baryshkov@linaro.org Signed-off-by: Daniel Lezcano commit 4b39ffa625d202c71d8ac25c763ef3831abc59e4 Author: Krzysztof Kozlowski Date: Fri Jan 13 10:01:07 2023 +0100 dt-bindings: thermal: qcom-spmi-adc-tm5: add qcom,adc-tm7 The qcom,adc-tm7 compatible is already used in PMK8350 so add it to the Qualcomm PMIC Thermal Monitoring ADC. Based on downstream sources, the new compatible for TM7 differs from older TM5 by allowing configuring per sensor decimation, time measurement and number of sample averaging - unlike one configuration per entire device. This was not reflected in the bindings, therefore comment the new compatible as incomplete as it might change and its ABI is no stable. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230113090107.18498-1-krzysztof.kozlowski@linaro.org Signed-off-by: Daniel Lezcano commit 5bc494a8ce397efba41277463cd38d3866a78090 Author: Randy Dunlap Date: Thu Jan 12 22:45:07 2023 -0800 thermal/drivers/uniphier: Use regular comment syntax Use "/*" comment for the file's initial comment since it is not in kernel-doc format. This prevents a kernel-doc warning: drivers/thermal/uniphier_thermal.c:26: warning: expecting prototype for uniphier_thermal.c(). Prototype was for PVTCTLEN() instead Signed-off-by: Randy Dunlap Cc: "Rafael J. Wysocki" Cc: Daniel Lezcano Cc: Amit Kucheria Cc: Zhang Rui Cc: Kunihiko Hayashi Cc: Masami Hiramatsu Cc: linux-pm@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230113064507.17224-1-rdunlap@infradead.org Signed-off-by: Daniel Lezcano commit 6d5dad7b98cf0fa7f79fd5a565df6e6a51daf12b Author: Randy Dunlap Date: Thu Jan 12 22:45:00 2023 -0800 thermal/drivers/rockchip: Fix kernel-doc warnings Don't use "/**" to begin non-kernel-doc comments. Convert one function description to kernel-doc format. Prevents these kernel-doc warnings: drivers/thermal/rockchip_thermal.c:64: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * The max sensors is two in rockchip SoCs. drivers/thermal/rockchip_thermal.c:179: warning: expecting prototype for TSADC Sensor Register description(). Prototype was for TSADCV2_USER_CON() instead drivers/thermal/rockchip_thermal.c:1342: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Reset TSADC Controller, reset all tsadc registers. Signed-off-by: Randy Dunlap Cc: "Rafael J. Wysocki" Cc: Daniel Lezcano Cc: Amit Kucheria Cc: Zhang Rui Cc: Heiko Stuebner Cc: linux-pm@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Link: https://lore.kernel.org/r/20230113064500.16103-1-rdunlap@infradead.org Signed-off-by: Daniel Lezcano commit 3291651c0ac6bfc7b7333e5bee70470d5f192d5c Author: Randy Dunlap Date: Thu Jan 12 22:44:49 2023 -0800 thermal/drivers/mtk_thermal: Fix kernel-doc function name Use the correct function name in a kernel-doc comment to prevent a warning: drivers/thermal/mtk_thermal.c:562: warning: expecting prototype for raw_to_mcelsius(). Prototype was for raw_to_mcelsius_v1() instead Signed-off-by: Randy Dunlap Cc: "Rafael J. Wysocki" Cc: Daniel Lezcano Cc: Amit Kucheria Cc: Zhang Rui Cc: Matthias Brugger Cc: linux-pm@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Link: https://lore.kernel.org/r/20230113064449.15061-1-rdunlap@infradead.org Signed-off-by: Daniel Lezcano commit 2d4103ae31aa6d5570fd1178ddc68867ab4ab5bd Author: Qi Liu Date: Sat Jan 14 18:13:02 2023 +0800 Documentation: Add document for UltraSoc SMB driver Bring in documentation for UltraSoc SMB driver. It simply describes the device, sysfs interface and the firmware bindings. Signed-off-by: Qi Liu Signed-off-by: Junhao He Reviewed-by: Jonathan Cameron Reviewed-by: Bagas Sanjaya Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230114101302.62320-3-hejunhao3@huawei.com commit 06f5c2926aaa0fba7f99678da6ef77cbbbda1441 Author: Qi Liu Date: Sat Jan 14 18:13:01 2023 +0800 drivers/coresight: Add UltraSoc System Memory Buffer driver Add driver for UltraSoc SMB(System Memory Buffer) device. SMB provides a way to buffer messages from ETM, and store these "CPU instructions trace" in system memory. The SMB device is identifier as ACPI HID "HISI03A1". Device system memory address resources are allocated using the _CRS method and buffer modes is the circular buffer mode. SMB is developed by UltraSoc technology, which is acquired by Siemens, and we still use "UltraSoc" to name driver. Signed-off-by: Qi Liu Signed-off-by: Junhao He Tested-by: JunHao He Reviewed-by: Jonathan Cameron Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230114101302.62320-2-hejunhao3@huawei.com commit 096ebfb74b19f2d4bdcbc33ae02e857ff4b3e0a0 Author: Jagan Teki Date: Thu Jan 12 16:29:02 2023 +0530 arm64: dts: rockchip: Add Radxa Compute Module 3 IO board Radxa Compute Module 3(CM3) IO board is an application board from Radxa and is compatible with Raspberry Pi CM4 IO form factor. Specification: - 1x HDMI, - 2x MIPI DSI - 2x MIPI CSI2 - 1x eDP - 1x PCIe card - 2x SATA - 2x USB 2.0 Host - 1x USB 3.0 - 1x USB 2.0 OTG - Phone jack - microSD slot - 40-pin GPIO expansion header - 12V DC Radxa CM3 needs to mount on top of this IO board in order to create complete Radxa CM3 IO board platform. Add support for Radxa CM3 IO Board. Co-developed-by: FUKAUMI Naoki Signed-off-by: FUKAUMI Naoki Co-developed-by: Manoj Sai Signed-off-by: Manoj Sai Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20230112105902.192852-3-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit 7469ab529bcad50490f6ff651c3e4f03bfa88fe0 Author: Jagan Teki Date: Thu Jan 12 16:29:01 2023 +0530 arm64: dts: rockchip: Add rk3566 based Radxa Compute Module 3 Radxa Compute Module 3(CM3) is one of the modules from a series System On Module based on the Radxa ROCK 3 series and is compatible with Raspberry Pi CM4 pinout and form factor. Specification: - Rockchip RK3566 - up to 8GB LPDDR4 - up to 128GB high performance eMMC - Optional wireless LAN, 2.4GHz and 5.0GHz IEEE 802.11b/g/n/ac wireless, BT 5.0, BLE with onboard and external antenna. - Gigabit Ethernet PHY Radxa CM3 needs to mount on top of this IO board in order to create complete Radxa CM3 IO board platform. Since Radxa CM3 is compatible with Raspberry Pi CM4 pinout so it is possible to mount Radxa CM3 on top of the Rasberry Pi CM4 IO board. Add support for Radxa CM3. Co-developed-by: FUKAUMI Naoki Signed-off-by: FUKAUMI Naoki Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20230112105902.192852-2-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit 24a28d3eb07d53cc9804978b3bb1ee6e870a682f Author: Jagan Teki Date: Thu Jan 12 16:29:00 2023 +0530 dt-bindings: arm: rockchip: Add Radxa Compute Module 3 Radxa Compute Module 3(CM3) is one of the modules from a series System On Module based on the Radxa ROCK 3 series and is compatible with Raspberry Pi CM4 in pinout and form factor. Specification: - Rockchip RK3566 - up to 8GB LPDDR4 - up to 128GB high performance eMMC - Optional wireless LAN, 2.4GHz and 5.0GHz IEEE 802.11b/g/n/ac wireless, BT 5.0, BLE with onboard and external antenna. - Gigabit Ethernet PHY Add dt-bindings for Radxa CM3. Signed-off-by: Jagan Teki Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230112105902.192852-1-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit cda0c2ea65a0ffbe75caae9acbf78b2bb825a6bd Author: Lucas Tanure Date: Fri Jan 13 13:02:20 2023 +0000 arm64: dts: rockchip: Fix RX delay for ethernet phy on rk3588s-rock5a Add network PHY rx delay and change type to rgmii, so that it is applied. This fixes packet loss when more than a few packets are exchanged. Fixes: d1824cf95799 ("arm64: dts: rockchip: Add rock-5a board") Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20230113130220.662194-1-lucas.tanure@collabora.com Signed-off-by: Heiko Stuebner commit 5129bd8e8840b88638ebd38d2d616c9dd2592b87 Author: Srujana Challa Date: Wed Jan 11 17:53:41 2023 +0530 octeontx2-af: update CPT inbound inline IPsec config mailbox Updates CPT inbound inline IPsec configure mailbox to take CPT credit, opcode, credit_th and bpid from VF. This patch also adds a mailbox to read inbound IPsec configuration. Signed-off-by: Srujana Challa Signed-off-by: David S. Miller commit 479043b778337fe1245ef82609203e83354d3733 Author: James Clark Date: Tue Jan 10 11:07:36 2023 +0000 coresight: cti: Remove atomic type from enable_req_count enable_req_count is only ever accessed inside the spinlock, so to avoid confusion that there are concurrent accesses and simplify the code, change it to an int. One access outside of the spinlock is in enable_show() which appears to allow partially written data to be displayed between enable_req_count, powered and enabled so move this one inside the spin lock too. Signed-off-by: James Clark Reviewed-by: Mike Leach Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230110110736.2709917-4-james.clark@arm.com commit eff674a9b86a6ffdd10c3af3863545acf7f1ce4f Author: Mao Jinlong Date: Tue Jan 10 11:07:35 2023 +0000 coresight: cti: Add PM runtime call in enable_store In commit 6746eae4bbad ("coresight: cti: Fix hang in cti_disable_hw()") PM runtime calls are removed from cti_enable_hw/cti_disable_hw. When enabling CTI by writing enable sysfs node, clock for accessing CTI register won't be enabled. Device will crash due to register access issue. Add PM runtime call in enable_store to fix this issue. Fixes: 6746eae4bbad ("coresight: cti: Fix hang in cti_disable_hw()") Signed-off-by: Mao Jinlong [Change to only call pm_runtime_put if a disable happened] Tested-by: Jinlong Mao Signed-off-by: James Clark Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230110110736.2709917-3-james.clark@arm.com commit 3244fb6dbbf1ffc114cdf382cc167bdd8c18088a Author: James Clark Date: Tue Jan 10 11:07:34 2023 +0000 coresight: cti: Prevent negative values of enable count Writing 0 to the enable control repeatedly results in a negative value for enable_req_count. After this, writing 1 to the enable control appears to not work until the count returns to positive. Change it so that it's impossible for enable_req_count to be < 0. Return an error to indicate that the disable request was invalid. Fixes: 835d722ba10a ("coresight: cti: Initial CoreSight CTI Driver") Tested-by: Jinlong Mao Signed-off-by: James Clark Reviewed-by: Mike Leach Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230110110736.2709917-2-james.clark@arm.com commit 589d928248b72f8377d45904a14bcf686aa8bbeb Author: Junhao He Date: Sat Jan 14 17:16:32 2023 +0800 coresight: etm4x: Fix accesses to TRCSEQRSTEVR and TRCSEQSTR The TRCSEQRSTEVR and TRCSEQSTR registers are not implemented if the TRCIDR5.NUMSEQSTATE == 0. Skip accessing the registers in such cases. Fixes: 2e1cdfe184b5 ("coresight-etm4x: Adding CoreSight ETM4x driver") Signed-off-by: Junhao He Reviewed-by: Mike Leach Reviewed-by: Anshuman Khandual Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230114091632.60095-1-hejunhao3@huawei.com commit c435669a41dd4ee063572e17b48c14806ad31f72 Author: Richard Zhu Date: Mon Jan 16 13:41:24 2023 +0800 PCI: imx6: Add i.MX8MP PCIe EP support Add the i.MX8MP PCIe EP support. Link: https://lore.kernel.org/r/1673847684-31893-15-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Lorenzo Pieralisi commit fb3217e2cfc6a577481b6accc3e17032f242e0ac Author: Richard Zhu Date: Mon Jan 16 13:41:23 2023 +0800 PCI: imx6: Add i.MX8MM PCIe EP support Add i.MX8MM PCIe EP support. Link: https://lore.kernel.org/r/1673847684-31893-14-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Lorenzo Pieralisi commit 530ba41250b69db4b5beb9fc03bd7183881c5e7f Author: Richard Zhu Date: Mon Jan 16 13:41:22 2023 +0800 PCI: imx6: Add i.MX8MQ PCIe EP support Add i.MX8MQ PCIe EP support. Link: https://lore.kernel.org/r/1673847684-31893-13-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Lorenzo Pieralisi commit 75c2f26da03f93e988cd7678722ea893a8c63796 Author: Richard Zhu Date: Mon Jan 16 13:41:21 2023 +0800 PCI: imx6: Add i.MX PCIe EP mode support i.MX PCIe is one dual mode PCIe controller. Add i.MX PCIe EP mode support here, and split the PCIe modes to the Root Complex mode and Endpoint mode. Link: https://lore.kernel.org/r/1673847684-31893-12-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Lorenzo Pieralisi commit 01ea5ede419733fdc39e75875f0861d16a829fe6 Author: Richard Zhu Date: Mon Jan 16 13:41:20 2023 +0800 misc: pci_endpoint_test: Add i.MX8 PCIe EP device support Set the DEVICE_ID of i.MX8 PCIe and add i.MX8 PCIE EP device support in pci_endpoint_test driver. Link: https://lore.kernel.org/r/1673847684-31893-11-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Lorenzo Pieralisi commit 2dd6dc57d2da459983ded133767d0389194f15b8 Author: Richard Zhu Date: Mon Jan 16 13:41:13 2023 +0800 dt-bindings: imx6q-pcie: Add i.MX8MP PCIe EP mode compatible string Add i.MX8MP PCIe endpoint mode compatible string. Link: https://lore.kernel.org/r/1673847684-31893-4-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Lorenzo Pieralisi Acked-by: Rob Herring commit dea44b629ae186410d822e2bf576143bebd932f1 Author: Richard Zhu Date: Mon Jan 16 13:41:12 2023 +0800 dt-bindings: imx6q-pcie: Add i.MX8MQ PCIe EP mode compatible string Add i.MX8MQ PCIe endpoint mode compatible string. Link: https://lore.kernel.org/r/1673847684-31893-3-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Lorenzo Pieralisi Acked-by: Rob Herring commit 1af5ea1dc2df627ac11361ee9795cf4f240f66f1 Author: Richard Zhu Date: Mon Jan 16 13:41:11 2023 +0800 dt-bindings: imx6q-pcie: Add i.MX8MM PCIe EP mode compatible string Add i.MX8MM PCIe endpoint mode compatible string. Link: https://lore.kernel.org/r/1673847684-31893-2-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Lorenzo Pieralisi Acked-by: Rob Herring commit cfc10489828a855d671a368d231842f174fe6d26 Author: Jani Nikula Date: Wed Jan 4 17:32:58 2023 +0200 drm/i915/display: drop redundant display/ from #includes Drop the redundant sub-directory from #includes under display/. Group and sort the results. v2: Rebase Reviewed-by: Arun R Murthy Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230104153258.453431-1-jani.nikula@intel.com commit eede0a75b96c7cfc3a61a4b01dd3674e8742039f Author: Arnd Bergmann Date: Thu Oct 6 17:33:20 2022 +0200 parport: remove ax88796 driver The s3c24xx bast platform was removed, so this driver has no users any more and can be removed as well. Acked-by: Sudip Mukherjee Signed-off-by: Arnd Bergmann commit 503278c12701831e4be18a3e5b95cd087d6f7542 Author: Arnd Bergmann Date: Fri Sep 30 13:50:51 2022 +0200 ASoC: samsung: remove unused drivers The s3c24xx SoC platform was completely removed, as were most of the s3c64xx based board files, leaving only the DT based machines as well as the MACH_WLF_CRAGG_6410 machine. All other board specific ASoC driver can can now be recycled. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann commit 2e3ee090cdb5d70185a45cd29a7997b123e24902 Author: Arnd Bergmann Date: Fri Sep 30 16:19:56 2022 +0200 soc: s3c: remove pm-debug hack CONFIG_SAMSUNG_PM_DEBUG was only used on s3c24xx because of the DEBUG_S3C24XX_UART dependency. Since s3c24xx is now gone, and nobody ever noticed this option being missing from s3c64xx, it can be safely removed as well. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann commit c9dcd56feb820d50d1bbd52c135caa4e628e4762 Author: Arnd Bergmann Date: Fri Sep 30 13:22:04 2022 +0200 spi: remove s3c24xx driver The s3c24xx platform was removed,s o there are no remaining users for its spi driver. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann commit 20ab62c4799669a9952daa121ce84b4a09097a32 Author: Arnd Bergmann Date: Fri Sep 30 15:40:19 2022 +0200 pinctrl: remove s3c24xx driver The s3c24xx platform was removed, so this driver has no remaining users. Acked-by: Linus Walleij Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann commit acac9a8ddb55f43561aba8ba460448aa6781b8a7 Author: Arnd Bergmann Date: Fri Sep 30 15:25:16 2022 +0200 input: remove s3c24xx touchscreen driver The s3c24xx SoC support and its adc driver was removed, so this driver has no remaining users. Acked-by: Dmitry Torokhov Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann commit f48fd50b03d2482dbcc2e672bdcf147984b5d955 Author: Arnd Bergmann Date: Fri Sep 30 15:19:55 2022 +0200 fbdev: remove s3c2410 framebuffer The s3c24xx platform was removed, so the framebuffer driver is no longer needed. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann commit 014e79d7eccea9fe77da891fa04cde75db0af9c9 Author: Arnd Bergmann Date: Fri Sep 30 13:41:15 2022 +0200 cpufreq: remove s3c24xx drivers All s3c24xx platforms were removed, so these five drivers are all obsolete now. Reviewed-by: Krzysztof Kozlowski Acked-by: Viresh Kumar Signed-off-by: Arnd Bergmann commit a7ddf74b784b57ec7c93b780ec8236dc6aa4db02 Author: Arnd Bergmann Date: Fri Oct 21 22:27:47 2022 +0200 dmaengine: remove s3c24xx driver The s3c24xx platform was removed and this driver is no longer needed. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann commit 1fa774f706a9cfa68bc7dea9e369be3af86fac93 Author: Arnd Bergmann Date: Fri Sep 30 13:20:47 2022 +0200 usb: gadget: remove s3c24xx drivers The s3c24xx platform is gone, so both the udc and hsudc drivers can be removed as well. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann commit 7d1ec119e3c1ec060370f5dc58490b51368c554c Author: Arnd Bergmann Date: Fri Sep 30 13:18:46 2022 +0200 leds: remove s3c24xx driver The s3c24xx platform is gone, so the led driver can be removed as well. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann commit fa0d876fa1b815637b0acf476f3b3054c3528133 Author: Arnd Bergmann Date: Thu Jan 5 10:52:08 2023 +0100 clk: samsung: remove s3c24xx specific pll bits With the s3c24xx clk driver gone, the portions of the pll driver for it can also be removed. Suggested-by: Chanwoo Choi Link: https://lore.kernel.org/linux-arm-kernel/0e0eff12-d8ea-72e9-d135-4259dda9a750@gmail.com/ Acked-by: Chanwoo Choi Signed-off-by: Arnd Bergmann commit 594b3caeaf7938ce49a920b8fc835a67216ada28 Author: Arnd Bergmann Date: Fri Sep 30 13:11:14 2022 +0200 clk: remove s3c24xx driver The s3c24xx platform is gone, so the clk driver can be removed as well. Acked-by: Stephen Boyd Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann commit 0b14558977a777780bb18c2e86609cb53fe3d05a Author: Arnd Bergmann Date: Fri Sep 30 13:08:58 2022 +0200 mmc: remove s3cmci driver The s3c24xx platform is gone, so this driver can be removed as well. Reviewed-by: Krzysztof Kozlowski Acked-by: Ulf Hansson Signed-off-by: Arnd Bergmann commit d06dd30beb25b273d477a10ea204f595144c1174 Author: Arnd Bergmann Date: Fri Sep 30 13:01:02 2022 +0200 pata: remove samsung_cf driver This device was only used by the smdk6410 board file that is now gone, so the driver can be removed as well. Reviewed-by: Sergey Shtylyov Acked-by: Damien Le Moal Signed-off-by: Arnd Bergmann commit 4e9f616c002607874dedcef0750e8f473ac00a47 Author: Arnd Bergmann Date: Thu Sep 29 16:33:26 2022 +0200 hwmon: remove s3c driver The s3c adc driver was removed along with the s3c24xx platform, so the hwmon driver is orphaned and can be removed. Acked-by: Guenter Roeck Signed-off-by: Arnd Bergmann commit a0f831756b26f87e983dbdc291398dc097ff73b9 Author: Arnd Bergmann Date: Thu Sep 29 16:30:52 2022 +0200 power: remove s3c adc battery driver The s3c-adc driver is removed along with the s3c24xx platform, so the battery driver is no longer needed either. Reviewed-by: Krzysztof Kozlowski Acked-by: Sebastian Reichel Signed-off-by: Arnd Bergmann commit 6bac4f78ea3d6daff0bb0b45eddeca441a999db6 Author: Arnd Bergmann Date: Thu Sep 29 17:52:58 2022 +0200 ARM: s3c: remove s3c6400 support No board file and no dts file references the s3c6400 now, it's only s3c6410, so remove the final bits as well. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann commit 0d297df03890c385195fcf827432eb44f5b5918d Author: Arnd Bergmann Date: Thu Sep 29 16:18:41 2022 +0200 ARM: s3c: simplify platform code Following down the now unused symbols and header files, some additional content can be dropped that is used by neither the s3c64xx DT support nor the crag6410 board. Acked-by: Mark Brown Signed-off-by: Arnd Bergmann commit cc146410f9a4abae417b476ea1631089c0ddd171 Author: Arnd Bergmann Date: Thu Sep 29 17:30:48 2022 +0200 ARM: s3c: remove adc.c This driver could not be enabled on s3c64xx for a long time because of the ARCH_MULTIPLATFORM dependency, so remove it. Acked-by: Mark Brown Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann commit 743c8fbb90ca4c02bdf4087fa9f1885ddd85041b Author: Arnd Bergmann Date: Thu Sep 29 15:39:28 2022 +0200 ARM: s3c: remove most s3c64xx board support All traditional board files except for MACH_WLF_CRAGG_6410 were marked as unused, so remove them now. Cc: Kwangwoo Lee Cc: Peter Korsgaard Cc: Darius Augulis Cc: Maurus Cuelenaere Cc: Ben Dooks Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann commit 1ea35b355722675b3b654475a37898742731d016 Author: Arnd Bergmann Date: Thu Sep 29 15:43:53 2022 +0200 ARM: s3c: remove s3c24xx specific hacks A number of device drivers reference CONFIG_ARM_S3C24XX_CPUFREQ or similar symbols that are no longer available with the platform gone, though the drivers themselves are still used on newer platforms, so remove these hacks. Acked-by: Greg Kroah-Hartman Acked-by: Linus Walleij Acked-by: Jonathan Cameron Acked-by: Daniel Lezcano Acked-by: Miquel Raynal Acked-by: Ulf Hansson Acked-by: Stephen Boyd Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann commit 61b7f8920b176e3cb86c3b5e7c866261720a7917 Author: Arnd Bergmann Date: Thu Sep 29 15:33:15 2022 +0200 ARM: s3c: remove all s3c24xx support The platform was deprecated in commit 6a5e69c7ddea ("ARM: s3c: mark as deprecated and schedule removal") and can be removed. This includes all files that are exclusively for s3c24xx and not shared with s3c64xx, as well as the glue logic in Kconfig and the maintainer file entries. Cc: Arnaud Patard Cc: Ben Dooks Cc: Christer Weinigel Cc: Guillaume GOURAT Cc: Heiko Stuebner Cc: Simtec Linux Team Cc: openmoko-kernel@lists.openmoko.org Acked-by: Heiko Stuebner Acked-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann commit 1027b4df8354c55a5ed538e391d4cf9c509b74a7 Author: Arnd Bergmann Date: Fri Sep 30 12:02:12 2022 +0200 ARM: mmp: remove old PM support Assuming that we don't actually want the old-style pm-mmp2.c and pm-pxa910.c implementation, all these files can go away as well. Signed-off-by: Arnd Bergmann commit 77acc85ce797a4a19a46c9677dec5a9910c6e4e7 Author: Arnd Bergmann Date: Wed Sep 21 16:06:46 2022 +0200 ARM: mmp: remove device definitions Since all board support is now gone, a lot of code in the platform is no longer called and can be removed as well. The remaining parts are: * The interrupt numbers for pxa910 are still needed for the power management support. * The 'mfp' device is still statically initialized from platform code, though this could be moved into the pinctrl code * The CPU identification code is used for the cpu_is_mmp*() macros. Signed-off-by: Arnd Bergmann commit 028908f2ca6fc046a9932fb2d2f0409f4684ea41 Author: Arnd Bergmann Date: Fri Sep 30 09:25:25 2022 +0200 ARM: mmp: remove custom sram code The MMP_SRAM code is no longer used by the tdma driver because the Kconfig symbol is not selected, so remove it along with its former callsite. Acked-By: Vinod Koul Signed-off-by: Arnd Bergmann commit 06f11dfb5b75acafdb86b50ac5c90b49716d9362 Author: Arnd Bergmann Date: Thu Sep 29 15:39:20 2022 +0200 ARM: mmp: remove all board files The old-style board files were marked as 'unused' a while ago and can now be removed for good, leaving only devicetree based boot support. Signed-off-by: Arnd Bergmann commit 90ca4d9015eca4e9fd5a18e4572d419682e8f396 Author: Arnd Bergmann Date: Fri Sep 16 16:18:51 2022 +0200 ARM: mmp: select specific CPU implementation The behavior of the MMP platform code depends on whether the CPU_PXA168/CPU_PXA910/CPU_MMP2 symbols are enabled or not. I believe the intention here was that these can be left disabled for a pure DT-only build, but it's not clear if that actually works. At the minimum, the cpu_is_pxa168() and cpu_is_pxa910() checks behave differently, which causes changes in the power management code. For the moment, make the behavior depend on whether CONFIG_ATAGS is set or not, to make it easier to bisect the removal of the old code later. Signed-off-by: Arnd Bergmann commit 349619f064f9f75cfb6b698e7268cf5971ffe145 Author: Arnd Bergmann Date: Fri Sep 30 13:44:37 2022 +0200 cpufreq: remove sa1100 driver The sa11xx platform has two cpufreq drivers, one for the older StrongARM1100 SoC, and a second one for StrongARM1110. After the removal of most SA1100 based machines, this driver is unused, and only the sa1110-cpufreq driver remains. Acked-by: Viresh Kumar Signed-off-by: Arnd Bergmann commit 1ff45e6da54fc66ab2f9b4d3b202b29d1a706e01 Author: Arnd Bergmann Date: Thu Sep 22 15:16:38 2022 +0200 ARM: sa1100: remove irda references IRDA support is long gone, so there is no need to declare the platform device data. See-also: d64c2a76123f ("staging: irda: remove the irda network stack and drivers") Signed-off-by: Arnd Bergmann fixup sa1100 irda Signed-off-by: Arnd Bergmann commit c37ea39c1fa880da0d7fd2c719e5c96be19f0fc5 Merge: 1f1c24dee225f 6e41acd2e5353 Author: Dave Airlie Date: Mon Jan 16 15:33:22 2023 +1000 Merge tag 'drm-misc-next-2023-01-12' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v6.3: UAPI Changes: * fourcc: Document Open Source user waiver Cross-subsystem Changes: * firmware: fix color-format selection for system framebuffers Core Changes: * format-helper: Add conversion from XRGB8888 to various sysfb formats; Make XRGB8888 the only driver-emulated legacy format * fb-helper: Avoid blank consoles from selecting an incorrect color format * probe-helper: Enable/disable HPD on connectors plus driver updates * Use drm_dbg_ helpers in several places * docs: Document defaults for CRTC backgrounds; Document use of drm_minor Driver Changes: * arm/hdlcd: Use new debugfs helpers * gud: Use new debugfs helpers * panel: Support Visionox VTDR6130 AMOLED DSI; Support Himax HX8394; Convert many drivers to common generic DSI write-sequence helper * v3d: Do not opencode drm_gem_object_lookup() * vc4: Various HVS an CRTC fixes * vkms: Fix SEGFAULT from incorrect GEM-buffer mapping * Convert various drivers to i2c probe_new() Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/Y8ADeSzZDj+tpibF@linux-uq9g commit 1f1c24dee225fc82472627986997ba6aef309fc2 Merge: 45be20480656d 0c2dece8fb541 Author: Dave Airlie Date: Mon Jan 16 15:04:12 2023 +1000 Merge tag 'amd-drm-next-6.3-2023-01-13' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.3-2023-01-13: amdgpu: - Fix possible segfault in failure case - Rework FW requests to happen in early_init for all IPs so that we don't lose the sbios console if FW is missing - PSR fixes - Misc cleanups - Unload fix - SMU13 fixes amdkfd: - Fix for cleared VRAM BOs - Fix cleanup if GPUVM creation fails - Memory accounting fix - Use resource_size rather than open codeing it - GC11 mGPU fix radeon: - Fix memory leak on shutdown Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230113225911.7776-1-alexander.deucher@amd.com commit 45be20480656df021c6dbf50c1bdeef6df33c842 Merge: 03a0a10408957 f6e856e72ce51 Author: Dave Airlie Date: Mon Jan 16 14:00:12 2023 +1000 Merge tag 'amd-drm-next-6.3-2023-01-06' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.3-2023-01-06: amdgpu: - secure display support for multiple displays - DML optimizations - DCN 3.2 updates - PSR updates - DP 2.1 updates - SR-IOV RAS updates - VCN RAS support - SMU 13.x updates - Switch 1 element arrays to flexible arrays - Add RAS support for DF 4.3 - Stack size improvements - S0ix rework - Soft reset fix - Allow 0 as a vram limit on APUs - Display fixes - Misc code cleanups - Documentation fixes - Handle profiling modes for SMU13.x amdkfd: - Error handling fixes - PASID fixes radeon: - Switch 1 element arrays to flexible arrays drm: - Add DP adaptive sync DPCD definitions UAPI: - Add new INFO queries for peak and min sclk/mclk for profile modes on newer chips Proposed mesa patch: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/278 Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230106222037.7870-1-alexander.deucher@amd.com commit b839212988575c701aab4d3d9ca15e44c87e383c Author: Kees Cook Date: Thu Jan 5 22:17:04 2023 -0800 media: uvcvideo: Silence memcpy() run-time false positive warnings The memcpy() in uvc_video_decode_meta() intentionally copies across the length and flags members and into the trailing buf flexible array. Split the copy so that the compiler can better reason about (the lack of) buffer overflows here. Avoid the run-time false positive warning: memcpy: detected field-spanning write (size 12) of single field "&meta->length" at drivers/media/usb/uvc/uvc_video.c:1355 (size 1) Additionally fix a typo in the documentation for struct uvc_meta_buf. Reported-by: ionut_n2001@yahoo.com Link: https://bugzilla.kernel.org/show_bug.cgi?id=216810 Signed-off-by: Kees Cook Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 136effa754b57632f99574fc4a3433e0cfc031d9 Author: Ricardo Ribalda Date: Wed Jan 4 11:45:23 2023 +0100 media: uvcvideo: Quirk for autosuspend in Logitech B910 and C910 Logitech B910 and C910 firmware are unable to recover from a USB autosuspend. When it resumes, the device is in a state where it only produces invalid frames. Eg: $ echo 0xFFFF > /sys/module/uvcvideo/parameters/trace # enable verbose log $ yavta -c1 -n1 --file='frame#.jpg' --format MJPEG --size=1920x1080 /dev/video1 [350438.435219] uvcvideo: uvc_v4l2_open [350438.529794] uvcvideo: Resuming interface 2 [350438.529801] uvcvideo: Resuming interface 3 [350438.529991] uvcvideo: Trying format 0x47504a4d (MJPG): 1920x1080. [350438.529996] uvcvideo: Using default frame interval 33333.3 us (30.0 fps). [350438.551496] uvcvideo: uvc_v4l2_mmap [350438.555890] uvcvideo: Device requested 3060 B/frame bandwidth. [350438.555896] uvcvideo: Selecting alternate setting 11 (3060 B/frame bandwidth). [350438.556362] uvcvideo: Allocated 5 URB buffers of 32x3060 bytes each. [350439.316468] uvcvideo: Marking buffer as bad (error bit set). [350439.316475] uvcvideo: Frame complete (EOF found). [350439.316477] uvcvideo: EOF in empty payload. [350439.316484] uvcvideo: frame 1 stats: 149/261/417 packets, 1/149/417 pts (early initial), 416/417 scr, last pts/stc/sof 2976325734/2978107243/249 [350439.384510] uvcvideo: Marking buffer as bad (error bit set). [350439.384516] uvcvideo: Frame complete (EOF found). [350439.384518] uvcvideo: EOF in empty payload. [350439.384525] uvcvideo: frame 2 stats: 265/379/533 packets, 1/265/533 pts (early initial), 532/533 scr, last pts/stc/sof 2979524454/2981305193/316 [350439.448472] uvcvideo: Marking buffer as bad (error bit set). [350439.448478] uvcvideo: Frame complete (EOF found). [350439.448480] uvcvideo: EOF in empty payload. [350439.448487] uvcvideo: frame 3 stats: 265/377/533 packets, 1/265/533 pts (early initial), 532/533 scr, last pts/stc/sof 2982723174/2984503144/382 ...(loop)... The devices can leave this invalid state if the alternate setting of the streaming interface is toggled. This patch adds a quirk for this device so it can be autosuspended properly. lsusb -v: Bus 001 Device 049: ID 046d:0821 Logitech, Inc. HD Webcam C910 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x046d Logitech, Inc. idProduct 0x0821 HD Webcam C910 bcdDevice 0.10 iManufacturer 0 iProduct 0 iSerial 1 390022B0 bNumConfigurations 1 Signed-off-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 619d9b710cf06f7a00a17120ca92333684ac45a8 Author: Ricardo Ribalda Date: Thu Jan 5 15:31:29 2023 +0100 media: uvcvideo: Fix race condition with usb_kill_urb usb_kill_urb warranties that all the handlers are finished when it returns, but does not protect against threads that might be handling asynchronously the urb. For UVC, the function uvc_ctrl_status_event_async() takes care of control changes asynchronously. If the code is executed in the following order: CPU 0 CPU 1 ===== ===== uvc_status_complete() uvc_status_stop() uvc_ctrl_status_event_work() uvc_status_start() -> FAIL Then uvc_status_start will keep failing and this error will be shown: <4>[ 5.540139] URB 0000000000000000 submitted while active drivers/usb/core/urb.c:378 usb_submit_urb+0x4c3/0x528 Let's improve the current situation, by not re-submiting the urb if we are stopping the status event. Also process the queued work (if any) during stop. CPU 0 CPU 1 ===== ===== uvc_status_complete() uvc_status_stop() uvc_status_start() uvc_ctrl_status_event_work() -> FAIL Hopefully, with the usb layer protection this should be enough to cover all the cases. Cc: stable@vger.kernel.org Fixes: e5225c820c05 ("media: uvcvideo: Send a control event when a Control Change interrupt arrives") Reviewed-by: Yunke Cao Signed-off-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 716c330433e3ad6074d057092b98c09a989e17d8 Author: Ricardo Ribalda Date: Thu Jan 5 14:52:58 2023 +0100 media: uvcvideo: Use standard names for menus Instead of duplicating the menu info, use the one from the core. Also, do not use extra memory for 1:1 mappings. Suggested-by: Laurent Pinchart Signed-off-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit a7c28150af42798263a30bedbe46f201b46fb486 Author: Ricardo Ribalda Date: Thu Jan 5 14:52:57 2023 +0100 media: uvcvideo: Fix power line control for Lenovo Integrated Camera The device does not implement the power line frequenyc control correctly. It is a UVC 1.5 device, but implements the control as a UVC 1.1 device. Add the corresponding control mapping override. Bus 003 Device 002: ID 30c9:0093 Lenovo Integrated Camera Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.01 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x30c9 idProduct 0x0093 bcdDevice 0.07 iManufacturer 3 Lenovo iProduct 1 Integrated Camera iSerial 2 8SSC21J75356V1SR2830069 bNumConfigurations 1 Signed-off-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 3aa8628eb78a63d0bf93e159846e9c92bccc8f69 Author: Ricardo Ribalda Date: Thu Jan 5 14:52:56 2023 +0100 media: uvcvideo: Refactor power_line_frequency_controls_limited Move the control mapping to uvc_ctrl.c. This way we do not have references to UVC controls or V4L2 controls in uvc_driver.c. This also fixes a bug introduced in commit 382075604a68 ("media: uvcvideo: Limit power line control for Quanta UVC Webcam"). The offending commit caused the power line control menu entries to have incorrect indices compared to the V4L2_CID_POWER_LINE_FREQUENCY_* enumeration. Now that the limited mapping reuses the correct menu_info array, the indices correctly map to the V4L2 control specification. Fixes: 382075604a68 ("media: uvcvideo: Limit power line control for Quanta UVC Webcam") Signed-off-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 96a160b068e09b4ed5a32e2179e5219fc3545eca Author: Ricardo Ribalda Date: Thu Jan 5 14:52:55 2023 +0100 media: uvcvideo: Refactor uvc_ctrl_mappings_uvcXX Convert the array of structs into an array of pointers, that way the mappings can be reused. Signed-off-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 40140eda661ea4be219ef194a4f43b7b5e3bbd27 Author: Ricardo Ribalda Date: Thu Jan 5 14:52:54 2023 +0100 media: uvcvideo: Implement mask for V4L2_CTRL_TYPE_MENU Replace the count with a mask field that lets us choose not only the max value, but also the minimum value and what values are valid in between. Suggested-by: Laurent Pinchart Signed-off-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 70fcaf92a39e6cb7542de0fc0ad4562f42f7f54a Author: Ricardo Ribalda Date: Wed Jan 4 11:45:19 2023 +0100 media: uvcvideo: Extend documentation of uvc_video_clock_decode() Make an explicit reference to UVC 1.5, explaining how the algorithm supports the different behaviour of UVC 1.1 and 1.5. Reviewed-by: Laurent Pinchart Tested-by: HungNien Chen Signed-off-by: Ricardo Ribalda Signed-off-by: Laurent Pinchart commit 5dd0eab84ae9a4b292baf1ad02e1a273c475cd04 Author: Ricardo Ribalda Date: Tue Jan 3 12:01:21 2023 +0100 media: uvcvideo: Limit power line control for Acer EasyCamera The device does not implement the power line control correctly. Add a corresponding control mapping override. Bus 003 Device 002: ID 5986:1180 Acer, Inc EasyCamera Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x5986 Acer, Inc idProduct 0x1180 bcdDevice 56.04 iManufacturer 3 Bison iProduct 1 EasyCamera iSerial 2 bNumConfigurations 1 Reviewed-by: Sergey Senozhatsky Reviewed-by: Laurent Pinchart Signed-off-by: Ricardo Ribalda Signed-off-by: Laurent Pinchart commit 252d50da337ba97019574b1e830879d5dd5121d2 Author: Ricardo Ribalda Date: Tue Jan 3 15:36:25 2023 +0100 media: uvcvideo: Refactor __uvc_ctrl_add_mapping Simplify the exit code with a common error tag freeing all the memory. Suggested-by: Laurent Pinchart Signed-off-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 7faf8ae4277156da32eada72c07f5edeb82cd9e4 Author: Ricardo Ribalda Date: Tue Jan 3 15:36:23 2023 +0100 media: uvcvideo: Fix handling on Bitmask controls Minimum and step values for V4L2_CTRL_TYPE_BITMASK controls should be 0. There is no need to query the camera firmware about this and maybe get invalid results. Also value should be masked to the max value advertised by the hardware. Finally, handle UVC 1.5 mask controls that use MAX instead of RES to describe the valid bits. Fixes v4l2-compliane: Control ioctls (Input 0): fail: v4l2-test-controls.cpp(97): minimum must be 0 for a bitmask control test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: FAIL Signed-off-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit a763b9fb58be869e252a7d33acb0a6390b01c801 Author: Ricardo Ribalda Date: Tue Jan 3 15:36:22 2023 +0100 media: uvcvideo: Do not return positive errors in uvc_query_ctrl() If the returned size of the query does not match the expected size or it is zero, return -EPIPE instead of 0 or a positive value. This will avoid confusing the caller (and ultimately userspace) that doesn't expect a positive or zero value. Reviewed-by: Laurent Pinchart Suggested-by: Laurent Pinchart Signed-off-by: Ricardo Ribalda Signed-off-by: Laurent Pinchart commit 44cdba4130ecdb59ff94c617b6cd8dc22b4f3c97 Author: Ricardo Ribalda Date: Tue Jan 3 15:36:21 2023 +0100 media: uvcvideo: Return -EACCES for Wrong state error Error 2 is defined by UVC as: Wrong State: The device is in a state that disallows the specific request. The device will remain in this state until a specific action from the host or the user is completed. This is documented as happening when attempting to set the value of a manual control when the device is in auto mode. While V4L2 allows this, the closest error code defined by VIDIOC_S_CTRL is EACCES: EACCES: Attempt to set a read-only control or to get a write-only control. Or if there is an attempt to set an inactive control and the driver is not capable of caching the new value until the control is active again. Replace EILSEQ with EACCES. Reviewed-by: Laurent Pinchart Suggested-by: Hans Verkuil Signed-off-by: Ricardo Ribalda Signed-off-by: Laurent Pinchart commit 67a655be5748426a9bda7845fc264ccf71a76ea3 Author: Hans Verkuil Date: Tue Jan 3 15:36:20 2023 +0100 media: uvcvideo: Improve error logging in uvc_query_ctrl() Standard use of the driver may result in error messages on the kernel log. This can hide other more important messages, and alert unnecessarily the user. Let's keep dev_err() for the important occasions. If __uvc_query_ctrl() failed with a non -EPIPE error, then report that with dev_err. If an error code is obtained, then report that with dev_dbg. Reviewed-by: Ricardo Ribalda Signed-off-by: Hans Verkuil Signed-off-by: Laurent Pinchart commit 9f582f0418ed1c18f92c9e4628075d6ec9a7d9fb Author: Hans Verkuil Date: Tue Jan 3 15:36:19 2023 +0100 media: uvcvideo: Check for INACTIVE in uvc_ctrl_is_accessible() Check for inactive controls in uvc_ctrl_is_accessible(). Use the new value for the master_id controls if present, otherwise use the existing value to determine if it is OK to set the control. Doing this here avoids attempting to set an inactive control, which will return an error from the USB device, which returns an invalid errorcode. This fixes: warn: v4l2-test-controls.cpp(483): s_ctrl returned EIO   warn: v4l2-test-controls.cpp(483): s_ctrl returned EIO test VIDIOC_G/S_CTRL: OK   warn: v4l2-test-controls.cpp(739): s_ext_ctrls returned EIO   warn: v4l2-test-controls.cpp(739): s_ext_ctrls returned EIO   warn: v4l2-test-controls.cpp(816): s_ext_ctrls returned EIO test VIDIOC_G/S/TRY_EXT_CTRLS: OK Tested with: v4l2-ctl -c auto_exposure=1 OK v4l2-ctl -c exposure_time_absolute=251 OK v4l2-ctl -c auto_exposure=3 OK v4l2-ctl -c exposure_time_absolute=251 VIDIOC_S_EXT_CTRLS: failed: Input/output error exposure_time_absolute: Input/output error ERROR v4l2-ctl -c auto_exposure=3,exposure_time_absolute=251,auto_exposure=1 v4l2-ctl -C auto_exposure,exposure_time_absolute   auto_exposure: 1 exposure_time_absolute: 251 Reviewed-by: Laurent Pinchart Reviewed-by: Ricardo Ribalda Signed-off-by: Hans Verkuil Signed-off-by: Laurent Pinchart commit 5f0e659d2a2ac6172d495915f2775fa592c7ab17 Author: Laurent Pinchart Date: Tue Oct 25 21:42:21 2022 +0300 media: uvcvideo: Factor out usb_string() calls When parsing UVC descriptors to instantiate entities, the driver calls usb_string() to retrieve the entity name from the device, and falls back to a default name if the string can't be retrieved. This code pattern occurs multiple times. Factor it out to a separate helper function. Signed-off-by: Laurent Pinchart Reviewed-by: Guenter Roeck commit 81e78a6fc320693c269990fb1af37b8c2c382cf2 Author: Ricardo Ribalda Date: Fri Dec 2 17:45:06 2022 +0100 media: uvcvideo: Limit power line control for Acer EasyCamera The device does not implement the power line control correctly. Add a corresponding control mapping override. Bus 003 Device 002: ID 5986:1180 Acer, Inc EasyCamera Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x5986 Acer, Inc idProduct 0x1180 bcdDevice 56.04 iManufacturer 3 Bison iProduct 1 EasyCamera iSerial 2 bNumConfigurations 1 Signed-off-by: Ricardo Ribalda Reviewed-by: Sergey Senozhatsky Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 16045708a3ff0266b1b8cca6198ea50eb80fff6a Author: Ricardo Ribalda Date: Tue Dec 6 00:15:04 2022 +0100 media: uvcvideo: Recover stalled ElGato devices Elgato Cam Link 4k can be in a stalled state if the resolution of the external source has changed while the firmware initializes. Once in this state, the device is useless until it receives a USB reset. It has even been observed that the stalled state will continue even after unplugging the device. lsusb -v Bus 002 Device 002: ID 0fd9:0066 Elgato Systems GmbH Cam Link 4K Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 3.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 9 idVendor 0x0fd9 Elgato Systems GmbH idProduct 0x0066 bcdDevice 0.00 iManufacturer 1 Elgato iProduct 2 Cam Link 4K iSerial 4 0005AC52FE000 bNumConfigurations 1 Reviewed-by: Sergey Senozhatsky Reviewed-by: Laurent Pinchart Signed-off-by: Ricardo Ribalda Signed-off-by: Laurent Pinchart commit adfd3910c27fbc0959ae5f1dafaec563f7d0bdd2 Author: Ricardo Ribalda Date: Tue Dec 20 23:56:44 2022 +0100 media: uvcvideo: Remove void casting for the status endpoint Make the code more resilient, by replacing the castings with proper structure definitions and using offsetof() instead of open coding the location of the data. Suggested-by: Sergey Senozhatsky Signed-off-by: Ricardo Ribalda Reviewed-by: Andrzej Pietrasiewicz Reviewed-by: Laurent Pinchart Reviewed-by: Sergey Senozhatsky Signed-off-by: Laurent Pinchart commit 0ce75d5ecd9edaa027c0c2a7df0edcdf59ea7738 Author: Pedro Guilherme Siqueira Moreira Date: Tue Oct 25 02:04:50 2022 -0300 media: uvcvideo: Fix usage of symbolic permissions to octal Change symbolic permissions to octal equivalents as recommended by scripts/checkpatch.pl on drivers/media/usb/uvc/uvc_driver.c. Signed-off-by: Pedro Guilherme Siqueira Moreira Reviewed-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 7b78a8464d5701796a4e146b3973422350e56977 Author: Pedro Guilherme Siqueira Moreira Date: Tue Oct 25 02:04:49 2022 -0300 media: uvcvideo: Fix assignment inside if condition Fixes 'do not use assignment in if condition' errors issued by scripts/checkpatch.pl on drivers/media/usb/uvc/uvc_driver.c Signed-off-by: Pedro Guilherme Siqueira Moreira Reviewed-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 2a8c1952ed4bc85f64174def8c00c71c264dc3a2 Author: Pedro Guilherme Siqueira Moreira Date: Tue Oct 25 02:04:48 2022 -0300 media: uvcvideo: Fix missing newline after declarations Fixes 'Missing a blank line after declarations' warning issued by scripts/checkpatch.pl on drivers/media/usb/uvc/uvc_driver.c Signed-off-by: Pedro Guilherme Siqueira Moreira Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 4867bb590ae445bcfaa711a86b603c97e94574b3 Author: Guenter Roeck Date: Tue Oct 25 16:41:01 2022 +0200 media: uvcvideo: Handle errors from calls to usb_string On a Webcam from Quanta, we see the following error. usb 3-5: New USB device found, idVendor=0408, idProduct=30d2, bcdDevice= 0.03 usb 3-5: New USB device strings: Mfr=3, Product=1, SerialNumber=2 usb 3-5: Product: USB2.0 HD UVC WebCam usb 3-5: Manufacturer: Quanta usb 3-5: SerialNumber: 0x0001 ... uvcvideo: Found UVC 1.10 device USB2.0 HD UVC WebCam (0408:30d2) uvcvideo: Failed to initialize entity for entity 5 uvcvideo: Failed to register entities (-22). The Webcam reports an entity of type UVC_VC_EXTENSION_UNIT. It reports a string index of '7' associated with that entity. The attempt to read that string from the camera fails with error -32 (-EPIPE). usb_string() returns that error, but it is ignored. As result, the entity name is empty. This later causes v4l2_device_register_subdev() to return -EINVAL, and no entities are registered as result. While this appears to be a firmware problem with the camera, the kernel should still handle the situation gracefully. To do that, check the return value from usb_string(). If it reports an error, assign the entity's default name. Signed-off-by: Guenter Roeck Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 3bc22dc66a4f386393119118169ed0b78c389898 Author: Ricardo Ribalda Date: Tue Sep 20 16:09:50 2022 +0200 media: uvcvideo: Only create input devs if hw supports it Examine the stream headers to figure out if the device has a button and can be used as an input. Signed-off-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 41ddb251c68ac75c101d3a50a68c4629c9055e4c Author: Ricardo Ribalda Date: Tue Sep 20 16:04:55 2022 +0200 media: uvcvideo: Handle cameras with invalid descriptors If the source entity does not contain any pads, do not create a link. Reported-by: syzbot Signed-off-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 50459f103edfe47c9a599d766a850ef6014936c5 Author: Laurent Pinchart Date: Tue Nov 15 18:44:29 2016 +0200 media: uvcvideo: Remove format descriptions The V4L2 core overwrites format descriptions in v4l_fill_fmtdesc(), there's no need to manually set the descriptions in the driver. This prepares for removal of the format descriptions from the uvc_fmts table. Unlike V4L2, UVC makes a distinction between the SD-DV, SDL-DV and HD-DV formats. It also indicates whether the DV format uses 50Hz or 60Hz. This information is parsed by the driver to construct a format name string that is printed in a debug message, but serves no other purpose as V4L2 has a single V4L2_PIX_FMT_DV pixel format that covers all those cases. As the information is available in the UVC descriptors, and thus accessible to users with lsusb if they really care, don't log it in a debug message and drop the format name string to simplify the code. Signed-off-by: Laurent Pinchart Reviewed-by: Ricardo Ribalda Reviewed-by: Michael Grzeschik commit dfff86f8eb6a23b1ba3f0c88d52bd85a443bb4f0 Merge: 81bbbb6974817 e04946f54cd99 Author: Alexei Starovoitov Date: Sun Jan 15 13:32:46 2023 -0800 Merge branch 'samples/bpf: modernize BPF functionality test programs' "Daniel T. Lee" says: ==================== Currently, there are many programs under samples/bpf to test the various functionality of BPF that have been developed for a long time. However, the kernel (BPF) has changed a lot compared to the 2016 when some of these test programs were first introduced. Therefore, some of these programs use the deprecated function of BPF, and some programs no longer work normally due to changes in the API. To list some of the kernel changes that this patch set is focusing on, - legacy BPF map declaration syntax support had been dropped [1] - bpf_trace_printk() always append newline at the end [2] - deprecated styled BPF section header (bpf_load style) [3] - urandom_read tracepoint is removed (used for testing overhead) [4] - ping sends packet with SOCK_DGRAM instead of SOCK_RAW [5]* - use "vmlinux.h" instead of including individual headers In addition to this, this patchset tries to modernize the existing testing scripts a bit. And for network-related testing programs, a separate header file was created and applied. (To use the Endianness conversion function from xdp_sample and bunch of constants) [1]: https://github.com/libbpf/libbpf/issues/282 [2]: commit ac5a72ea5c89 ("bpf: Use dedicated bpf_trace_printk event instead of trace_printk()") [3]: commit ceb5dea56543 ("samples: bpf: Remove bpf_load loader completely") [4]: commit 14c174633f34 ("random: remove unused tracepoints") [5]: https://lwn.net/Articles/422330/ *: This is quite old, but I'm not sure why the code was initially developed to filter only SOCK_RAW. ==================== Signed-off-by: Alexei Starovoitov commit e04946f54cd99fa1bd92e22f4540720d76d88058 Author: Daniel T. Lee Date: Sun Jan 15 16:16:13 2023 +0900 samples/bpf: change _kern suffix to .bpf with BPF test programs This commit changes the _kern suffix to .bpf with the BPF test programs. With this modification, test programs will inherit the benefit of the new CLANG-BPF compile target. Signed-off-by: Daniel T. Lee Link: https://lore.kernel.org/r/20230115071613.125791-11-danieltimlee@gmail.com Signed-off-by: Alexei Starovoitov commit e8acf8f47a5d58a00fbfa0f3592bbaaff557cec3 Author: Daniel T. Lee Date: Sun Jan 15 16:16:12 2023 +0900 samples/bpf: use vmlinux.h instead of implicit headers in BPF test program This commit applies vmlinux.h to BPF functionality testing program. Macros that were not defined despite migration to "vmlinux.h" were defined separately in individual files. Signed-off-by: Daniel T. Lee Link: https://lore.kernel.org/r/20230115071613.125791-10-danieltimlee@gmail.com Signed-off-by: Alexei Starovoitov commit c2f4f5593e6ae8014b277b46f5f9a8227f11d69c Author: Daniel T. Lee Date: Sun Jan 15 16:16:11 2023 +0900 samples/bpf: replace BPF programs header with net_shared.h This commit applies "net_shared.h" to BPF programs to remove existing network related header dependencies. Also, this commit removes unnecessary headers before applying "vmlinux.h" to the BPF programs. Mostly, endianness conversion function has been applied to the source. In addition, several macros have been defined to fulfill the INET, TC-related constants. Signed-off-by: Daniel T. Lee Link: https://lore.kernel.org/r/20230115071613.125791-9-danieltimlee@gmail.com Signed-off-by: Alexei Starovoitov commit e69fe8459552f112d7327dff87953d40202c61f1 Author: Daniel T. Lee Date: Sun Jan 15 16:16:10 2023 +0900 samples/bpf: split common macros to net_shared.h Currently, many programs under sample/bpf often include individual macros by directly including the header under "linux/" rather than using the "vmlinux.h" header. However, there are some problems with migrating to "vmlinux.h" because there is no definition for utility functions such as endianness conversion (ntohs/htons). Fortunately, the xdp_sample program already has a function that can be replaced to solve this problem. Therefore, this commit attempts to separate these functions into a file called net_shared.h to make them universally available. Additionally, this file includes network-related macros that are not defined in "vmlinux.h". (inspired by 'selftests' bpf_tracing_net.h) Signed-off-by: Daniel T. Lee Link: https://lore.kernel.org/r/20230115071613.125791-8-danieltimlee@gmail.com Signed-off-by: Alexei Starovoitov commit a1f93c8fb0a836b6c891e51729f6cb98a1da47ba Author: Daniel T. Lee Date: Sun Jan 15 16:16:09 2023 +0900 samples/bpf: replace legacy map with the BTF-defined map With libbpf 1.0 release, support for legacy BPF map declaration syntax had been dropped. If you run a program using legacy BPF in the latest libbpf, the following error will be output. libbpf: map 'lwt_len_hist_map' (legacy): legacy map definitions are deprecated, use BTF-defined maps instead libbpf: Use of BPF_ANNOTATE_KV_PAIR is deprecated, use BTF-defined maps in .maps section instead This commit replaces legacy map with the BTF-defined map. Signed-off-by: Daniel T. Lee Link: https://lore.kernel.org/r/20230115071613.125791-7-danieltimlee@gmail.com Signed-off-by: Alexei Starovoitov commit 58e975d014e1e31bd1586be7d2be6d61bd3e3ada Author: Daniel T. Lee Date: Sun Jan 15 16:16:08 2023 +0900 samples/bpf: replace broken overhead microbenchmark with fib_table_lookup The test_overhead bpf program is designed to compare performance between tracepoint and kprobe. Initially it used task_rename and urandom_read tracepoint. However, commit 14c174633f34 ("random: remove unused tracepoints") removed urandom_read tracepoint, and for this reason the test_overhead got broken. This commit introduces new microbenchmark using fib_table_lookup. This microbenchmark sends UDP packets to localhost in order to invoke fib_table_lookup. In a nutshell: fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); addr.sin_addr.s_addr = inet_addr(DUMMY_IP); addr.sin_port = htons(DUMMY_PORT); for() { sendto(fd, buf, strlen(buf), 0, (struct sockaddr *)&addr, sizeof(addr)); } on 4 cpus in parallel: lookup per sec base (no tracepoints, no kprobes) 381k with kprobe at fib_table_lookup() 325k with tracepoint at fib:fib_table_lookup 330k with raw_tracepoint at fib:fib_table_lookup 365k Fixes: 14c174633f34 ("random: remove unused tracepoints") Signed-off-by: Daniel T. Lee Link: https://lore.kernel.org/r/20230115071613.125791-6-danieltimlee@gmail.com Signed-off-by: Alexei Starovoitov commit 31b12a4159fae818ac1043539ec9656da57b2e2c Author: Daniel T. Lee Date: Sun Jan 15 16:16:07 2023 +0900 samples/bpf: fix broken cgroup socket testing Currently, executing test_cgrp2_sock2 fails due to wrong section header. This 'cgroup/sock1' style section is previously used at 'samples/bpf_load' (deprecated) BPF loader. Because this style isn't supported in libbpf, this commit fixes this problem by correcting the section header. $ sudo ./test_cgrp2_sock2.sh libbpf: prog 'bpf_prog1': missing BPF prog type, check ELF section name 'cgroup/sock1' libbpf: prog 'bpf_prog1': failed to load: -22 libbpf: failed to load object './sock_flags_kern.o' ERROR: loading BPF object file failed In addition, this BPF program filters ping packets by comparing whether the socket type uses SOCK_RAW. However, after the ICMP socket[1] was developed, ping sends ICMP packets using SOCK_DGRAM. Therefore, in this commit, the packet filtering is changed to use SOCK_DGRAM instead of SOCK_RAW. $ strace --trace socket ping -6 -c1 -w1 ::1 socket(AF_INET6, SOCK_DGRAM, IPPROTO_ICMPV6) = 3 [1]: https://lwn.net/Articles/422330/ Signed-off-by: Daniel T. Lee Link: https://lore.kernel.org/r/20230115071613.125791-5-danieltimlee@gmail.com Signed-off-by: Alexei Starovoitov commit dac808c90749c7dddd91f01f1f4252d2518d5ea0 Author: Daniel T. Lee Date: Sun Jan 15 16:16:06 2023 +0900 samples/bpf: fix broken lightweight tunnel testing The test_lwt_bpf is a script that tests the functionality of BPF through the output of the ftrace with bpf_trace_printk. Currently, this program is not operating normally for several reasons. First of all, this test script can't parse the ftrace results properly. GNU sed tries to be as greedy as possible when attempting pattern matching. Due to this, cutting metadata (such as timestamp) from the log entry of ftrace doesn't work properly, and also desired log isn't extracted properly. To make sed stripping clearer, 'nocontext-info' option with the ftrace has been used to remove metadata from the log. Also, instead of using unclear pattern matching, this commit specifies an explicit parse pattern. Also, unlike before when this test was introduced, the way bpf_trace_printk behaves has changed[1]. The previous bpf_trace_printk had to always have '\n' in order to print newline, but now that the bpf_trace_printk call includes newline by default, so '\n' is no longer needed. Lastly with the lwt ENCAP_BPF out, the context information with the sk_buff protocol is preserved. Therefore, this commit changes the previous test result from 'protocol 0' to 'protocol 8', which means ETH_P_IP. [1]: commit ac5a72ea5c89 ("bpf: Use dedicated bpf_trace_printk event instead of trace_printk()") Signed-off-by: Daniel T. Lee Link: https://lore.kernel.org/r/20230115071613.125791-4-danieltimlee@gmail.com Signed-off-by: Alexei Starovoitov commit f20f064e84eb9c9229a7044e30f9b99720a8c2ea Author: Daniel T. Lee Date: Sun Jan 15 16:16:05 2023 +0900 samples/bpf: refactor BPF functionality testing scripts Currently, some test scripts are experiencing minor errors related to executing tests. $ sudo ./test_cgrp2_sock.sh ./test_cgrp2_sock.sh: 22: test_cgrp2_sock: not found This problem occurs because the path to the execution target is not properly specified. Therefore, this commit solves this problem by specifying a relative path to its executables. This commit also makes a concise refactoring of hard-coded BPF program names. Signed-off-by: Daniel T. Lee Link: https://lore.kernel.org/r/20230115071613.125791-3-danieltimlee@gmail.com Signed-off-by: Alexei Starovoitov commit d982a2e306954c9269a5e53561b38259e26f08bc Author: Daniel T. Lee Date: Sun Jan 15 16:16:04 2023 +0900 samples/bpf: ensure ipv6 is enabled before running tests Currently, a few of BPF tests use ipv6 functionality. The problem here is that if ipv6 is disabled, these tests will fail, and even if the test fails, it will not tell you why it failed. $ sudo ./test_cgrp2_sock2.sh RTNETLINK answers: Permission denied In order to fix this, this commit ensures ipv6 is enabled prior to running tests. Signed-off-by: Daniel T. Lee Link: https://lore.kernel.org/r/20230115071613.125791-2-danieltimlee@gmail.com Signed-off-by: Alexei Starovoitov commit 81bbbb697481700ef8f31619f9d1e96cca894b5a Merge: 1c48391bc6739 7105f76fb56f5 Author: Martin KaFai Lau Date: Sun Jan 15 12:56:17 2023 -0800 Merge branch 'bpf: Add ipip6 and ip6ip decap support for bpf_skb_adjust_room()' Ziyang Xuan says: ==================== Add ipip6 and ip6ip decap support for bpf_skb_adjust_room(). Main use case is for using cls_bpf on ingress hook to decapsulate IPv4 over IPv6 and IPv6 over IPv4 tunnel packets. And add ipip6 and ip6ip decap testcases to verify that bpf_skb_adjust_room() correctly decapsulate ipip6 and ip6ip tunnel packets. $./test_tc_tunnel.sh ipip encap 192.168.1.1 to 192.168.1.2, type ipip, mac none len 100 test basic connectivity 0 test bpf encap without decap (expect failure) Ncat: TIMEOUT. 1 test bpf encap with tunnel device decap 0 test bpf encap with bpf decap 0 OK ipip6 encap 192.168.1.1 to 192.168.1.2, type ipip6, mac none len 100 test basic connectivity 0 test bpf encap without decap (expect failure) Ncat: TIMEOUT. 1 test bpf encap with tunnel device decap 0 test bpf encap with bpf decap 0 OK ip6ip6 encap fd::1 to fd::2, type ip6tnl, mac none len 100 test basic connectivity 0 test bpf encap without decap (expect failure) Ncat: TIMEOUT. 1 test bpf encap with tunnel device decap 0 test bpf encap with bpf decap 0 OK sit encap fd::1 to fd::2, type sit, mac none len 100 test basic connectivity 0 test bpf encap without decap (expect failure) Ncat: TIMEOUT. 1 test bpf encap with tunnel device decap 0 test bpf encap with bpf decap 0 OK ... OK. All tests passed v3: - Fix compilation failure of selftests/bpf. - Combine two new branches in bpf_skb_adjust_room(). - Simplify description for new flags BPF_F_ADJ_ROOM_DECAP_L3_IP*. v2: - Use decap flags to indicate the new IP header. Do not rely on skb->encapsulation. ==================== Signed-off-by: Martin KaFai Lau commit 7105f76fb56f5ed66a59bc048bc71e9f100e1d39 Author: Ziyang Xuan Date: Fri Jan 13 17:25:10 2023 +0800 selftests/bpf: add ipip6 and ip6ip decap to test_tc_tunnel Add ipip6 and ip6ip decap testcases. Verify that bpf_skb_adjust_room() correctly decapsulate ipip6 and ip6ip tunnel packets. Signed-off-by: Ziyang Xuan Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/dfd2d8cfdf9111bd129170d4345296f53bee6a67.1673574419.git.william.xuanziyang@huawei.com Signed-off-by: Martin KaFai Lau commit d219df60a70ed0739aa5dd34b477763311fc5a7b Author: Ziyang Xuan Date: Fri Jan 13 17:24:51 2023 +0800 bpf: Add ipip6 and ip6ip decap support for bpf_skb_adjust_room() Add ipip6 and ip6ip decap support for bpf_skb_adjust_room(). Main use case is for using cls_bpf on ingress hook to decapsulate IPv4 over IPv6 and IPv6 over IPv4 tunnel packets. Add two new flags BPF_F_ADJ_ROOM_DECAP_L3_IPV{4,6} to indicate the new IP header version after decapsulating the outer IP header. Suggested-by: Willem de Bruijn Signed-off-by: Ziyang Xuan Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/b268ec7f0ff9431f4f43b1b40ab856ebb28cb4e1.1673574419.git.william.xuanziyang@huawei.com Signed-off-by: Martin KaFai Lau commit a0c01bc565332cff9183bd8a17b4db94732d645d Author: Apurva Nandan Date: Thu Jan 12 19:57:23 2023 +0530 dt-bindings: pinctrl: k3: Introduce pinmux definitions for J784s4 Add pinctrl macros for J784s4 SoC. These macro definitions are similar to that of J721s2, but adding new definitions to avoid any naming confusions in the soc dts files. checkpatch insists the following error exists: ERROR: Macros with complex values should be enclosed in parentheses However, we do not need parentheses enclosing the values for this macro as we do intend it to generate two separate values as has been done for other similar platforms. Signed-off-by: Hari Nagalla Signed-off-by: Apurva Nandan Acked-by: Rob Herring Acked-by: Linus Walleij Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230112142725.77785-3-a-nandan@ti.com commit 5e0a1e0d265cb11fca3464bbe9511740c46f759f Author: Apurva Nandan Date: Thu Jan 12 19:57:22 2023 +0530 dt-bindings: arm: ti: Add bindings for J784s4 SoC Add binding for J784S4 SoC Signed-off-by: Apurva Nandan Acked-by: Rob Herring Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230112142725.77785-2-a-nandan@ti.com commit 2d94dfc438853dca9b390a3f32fe5331c336fd28 Author: Aswath Govindraju Date: Thu Jan 12 17:28:46 2023 +0100 arm64: dts: ti: k3-am625-sk: Add support for USB AM62 SoC has two instances of USB and they are brought on to the board in the following way, -> USB0 instance - This is brought out to a USB TypeC connector on board through TPS6598 PD controller. The PD controller should decide the role based on CC pin in the connector. Unfortunately the irq line for the TPS isn't hooked up which is a mode not yet support by the driver (some patches were submitted earlier this year[0]). So for now the PD controller is left out and peripheral mode chosen. -> USB1 instance - This is brought out to a USB TypeA connector on board. Therefore, add the required device tree support for the above in the board dts file. 0: https://lore.kernel.org/lkml/f714ee55-ef47-317d-81b9-57020dda064b@ti.com/T/ Signed-off-by: Aswath Govindraju Signed-off-by: Sjoerd Simons Tested-by: Martyn Welch Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230112162847.973869-4-sjoerd@collabora.com commit 2240f96cf3cd0f74f5c349fb212c4176627f69b0 Author: Aswath Govindraju Date: Thu Jan 12 17:28:45 2023 +0100 arm64: dts: ti: k3-am62-main: Add support for USB AM62 SoC has two instances of USB on it. Therefore, add support for the same. Signed-off-by: Aswath Govindraju Signed-off-by: Sjoerd Simons Tested-by: Martyn Welch Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230112162847.973869-3-sjoerd@collabora.com commit bd2912f400934d71ecb040f625685b886ccdcc20 Author: Nitin Yadav Date: Thu Jan 12 17:28:44 2023 +0100 arm64: dts: ti: k3-am62-main: Update OTAP and ITAP delay select UHS Class U1 sd-card are not getting detected due to incorrect OTAP/ITAP delay select values in linux. Update OTAP and ITAP delay select values for various speed modes. For sdhci0, update OTAP delay values for ddr52 & HS200 and add ITAP delay for legacy & mmc-hs. For sdhci1 & sdhci2, update OTAP & ITAP delay select recommended as in RIOT for various speed modes. Signed-off-by: Nitin Yadav [cherry-pick from vendor BSP] Signed-off-by: Sjoerd Simons Tested-by: Martyn Welch Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230112162847.973869-2-sjoerd@collabora.com commit 6be5d8e5d1804eb4cec29cd8a85dc9cb18683b5d Author: Dhruva Gole Date: Tue Jan 3 11:18:40 2023 +0530 arm64: dts: ti: k3-am62-main: Fix clocks for McSPI Fixes the clock Device ID's in the DT according to the tisci docs clock identifiers for AM62x Fixes: c37c58fdeb8a ("arm64: dts: ti: k3-am62: Add more peripheral nodes") Reviewed-by: Bryan Brattlof Signed-off-by: Dhruva Gole Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230103054840.1133711-1-d-gole@ti.com commit aa3555c5fd3d2f5114ae7d28f7897072b5e6e60a Author: Anand Moon Date: Wed Jan 11 17:24:34 2023 +0000 ARM: dts: rockchip: Enable Ethernet on rv1126 Neu2-IO Rockchip RV1126 has GMAC 10/100/1000M ethernet controller. Enable ethernet node on Neu2-IO board. Co-Developed-by: Jagan Teki Signed-off-by: Jagan Teki Signed-off-by: Anand Moon Link: https://lore.kernel.org/r/20230111172437.5295-4-anand@edgeble.ai Signed-off-by: Heiko Stuebner commit 594a76a4465a96bc11f8ecf4504907afb064ce41 Author: Anand Moon Date: Wed Jan 11 17:24:33 2023 +0000 ARM: dts: rockchip: Add Ethernet GMAC node for RV1126 Rockchip RV1126 has GMAC 10/100/1000M ethernet controller Co-Developed-by: Jagan Teki Signed-off-by: Anand Moon Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20230111172437.5295-3-anand@edgeble.ai Signed-off-by: Heiko Stuebner commit bdcb1f4e19cbbe9ee8197078d25a2d4c27216ab1 Author: Anand Moon Date: Wed Jan 11 17:24:32 2023 +0000 ARM: dts: rockchip: Add ethernet rgmiim1 pin-control for rv1126 Add ethernet pin-control for rv1126 SoC. Co-Developed-by: Jagan Teki Signed-off-by: Jagan Teki Signed-off-by: Anand Moon Link: https://lore.kernel.org/r/20230111172437.5295-2-anand@edgeble.ai Signed-off-by: Heiko Stuebner commit ed73a505480d5413675a5a5a79466d5c661f88c2 Author: Gustavo A. R. Silva Date: Mon Jan 9 19:40:22 2023 -0600 RDMA/erdma: Replace zero-length arrays with flexible-array members Zero-length arrays are deprecated[1] and we are moving towards adopting C99 flexible-array members instead. So, replace zero-length arrays, in a couple of structures, with flex-array members. 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 [2]. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays [1] Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [2] Link: https://github.com/KSPP/linux/issues/78 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/Y7zCBqwC1LtabRJ9@work Reviewed-by: Kees Cook Acked-by: Cheng Xu Signed-off-by: Leon Romanovsky commit 5e487164afbcd917225fb701e8956f388f43b601 Author: Krzysztof Kozlowski Date: Fri Jan 13 11:40:50 2023 +0100 MAINTAINERS: arm64: tesla: correct pattern for directory The path is actually not a pattern but a directory, so correct it to be effective. Acked-by: Alim Akhtar Link: https://lore.kernel.org/r/20230113104050.30856-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 8067fd8b26bf5d5f9917e934d878e4f3794d082e Author: Patrisious Haddad Date: Wed Jan 4 11:43:36 2023 +0200 RDMA/mlx5: Print error syndrome in case of fatal QP errors Print syndromes in case of fatal QP events. This is helpful for upper level debugging, as there maybe no CQEs. Signed-off-by: Patrisious Haddad Signed-off-by: Mark Zhang Link: https://lore.kernel.org/r/edc794f622a33e4ee12d7f5d218d1a59aa7c6af5.1672821186.git.leonro@nvidia.com Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky commit 312b8f79eb05479628ee71357749815b2eeeeea8 Author: Mark Zhang Date: Wed Jan 4 11:43:34 2023 +0200 RDMA/mlx: Calling qp event handler in workqueue context Move the call of qp event handler from atomic to workqueue context, so that the handler is able to block. This is needed by following patches. Signed-off-by: Mark Zhang Reviewed-by: Patrisious Haddad Link: https://lore.kernel.org/r/0cd17b8331e445f03942f4bb28d447f24ac5669d.1672821186.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky commit 1ca49d26afc2609542be4a57e336191b525ca698 Merge: ccdbefcf661e5 9b2e3723728ef Author: Leon Romanovsky Date: Sun Jan 15 12:22:36 2023 +0200 Merge branch 'mlx5-next' into HEAD Bring HW bits for mlx5 QP events series. Link: https://lore.kernel.org/all/cover.1672821186.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky commit 9b2e3723728efe03433be5c13b31da451d88ee3d Author: Patrisious Haddad Date: Wed Jan 4 11:43:35 2023 +0200 net/mlx5: Introduce CQE error syndrome Introduces CQE error syndrome bits which are inside qp_context_extension and are used to report the reason the QP was moved to error state. Useful for cases in which a CQE isn't generated, such as remote write rkey violation. Signed-off-by: Patrisious Haddad Link: https://lore.kernel.org/r/f8359315f8130f6d2abe4b94409ac7802f54bce3.1672821186.git.leonro@nvidia.com Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky commit ccdbefcf661e537a3126719f4f11484cd85404d7 Author: Kees Cook Date: Thu Jan 5 14:32:32 2023 -0800 RDMA/cxgb4: Replace 0-length arrays with flexible arrays Zero-length arrays are deprecated[1]. Replace all remaining 0-length arrays with flexible arrays. Detected with GCC 13, using -fstrict-flex-arrays=3: In function 'build_rdma_write', inlined from 'c4iw_post_send' at ../drivers/infiniband/hw/cxgb4/qp.c:1173:10: ../drivers/infiniband/hw/cxgb4/qp.c:597:38: warning: array subscript 0 is outside array bounds of 'struct fw_ri_immd[0]' [-Warray-bounds=] 597 | wqe->write.u.immd_src[0].r2 = 0; | ~~~~~~~~~~~~~~~~~~~~~^~~ ../drivers/infiniband/hw/cxgb4/t4fw_ri_api.h: In function 'c4iw_post_send': ../drivers/infiniband/hw/cxgb4/t4fw_ri_api.h:567:35: note: while referencing 'immd_src' 567 | struct fw_ri_immd immd_src[0]; | ^~~~~~~~ Additionally drop the unused C99_NOT_SUPPORTED ifndef lines. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays Cc: Potnuri Bharat Teja Cc: Jason Gunthorpe Cc: Leon Romanovsky Cc: "Gustavo A. R. Silva" Cc: linux-rdma@vger.kernel.org Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20230105223225.never.252-kees@kernel.org Reviewed-by: Gustavo A. R. Silva Signed-off-by: Leon Romanovsky commit 79ba1e607d68178db7d3fe4f6a4aa38f06805e7b Author: Vincent Guittot Date: Fri Jan 13 14:36:13 2023 +0100 sched/fair: Limit sched slice duration In presence of a lot of small weight tasks like sched_idle tasks, normal or high weight tasks can see their ideal runtime (sched_slice) to increase to hundreds ms whereas it normally stays below sysctl_sched_latency. 2 normal tasks running on a CPU will have a max sched_slice of 12ms (half of the sched_period). This means that they will make progress every sysctl_sched_latency period. If we now add 1000 idle tasks on the CPU, the sched_period becomes 3006 ms and the ideal runtime of the normal tasks becomes 609 ms. It will even become 1500ms if the idle tasks belongs to an idle cgroup. This means that the scheduler will look for picking another waiting task after 609ms running time (1500ms respectively). The idle tasks change significantly the way the 2 normal tasks interleave their running time slot whereas they should have a small impact. Such long sched_slice can delay significantly the release of resources as the tasks can wait hundreds of ms before the next running slot just because of idle tasks queued on the rq. Cap the ideal_runtime to sysctl_sched_latency to make sure that tasks will regularly make progress and will not be significantly impacted by idle/background tasks queued on the rq. Signed-off-by: Vincent Guittot Signed-off-by: Ingo Molnar Tested-by: Dietmar Eggemann Link: https://lore.kernel.org/r/20230113133613.257342-1-vincent.guittot@linaro.org commit ef6dfc4b238a435ab552207ec09e4a82b6426d31 Author: Christophe JAILLET Date: Sat Jan 14 18:33:09 2023 +0100 x86/signal: Fix the value returned by strict_sas_size() Functions used with __setup() return 1 when the argument has been successfully parsed. Reverse the returned value so that 1 is returned when kstrtobool() is successful (i.e. returns 0). My understanding of these __setup() functions is that returning 1 or 0 does not change much anyway - so this is more of a cleanup than a functional fix. I spot it and found it spurious while looking at something else. Even if the output is not perfect, you'll get the idea with: $ git grep -B2 -A10 retu.*kstrtobool | grep __setup -B10 Fixes: 3aac3ebea08f ("x86/signal: Implement sigaltstack size validation") Signed-off-by: Christophe JAILLET Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/73882d43ebe420c9d8fb82d0560021722b243000.1673717552.git.christophe.jaillet@wanadoo.fr commit c44e031bcff1fa3483374fba7b053825f57dac8e Author: Andy Shevchenko Date: Fri Jan 13 16:19:17 2023 +0200 iio: chemical: scd30_core: Switch to use dev_err_probe() Switch to use dev_err_probe() to simplify the error paths and unify message template. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230113141917.23725-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit ebda75fbfa95ea825557325962f1ed6724d557d0 Author: Andy Shevchenko Date: Fri Jan 13 16:11:17 2023 +0200 iio: chemical: scd30_core: use sysfs_emit() to instead of scnprintf() Follow the advice of the Documentation/filesystems/sysfs.rst and show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230113141117.23353-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 298bfe27d1127a8e41fbf668d3e4ce04fa7b1ecc Merge: e2a9575025fe9 e1cc8ce46200b Author: Jakub Kicinski Date: Fri Jan 13 21:59:11 2023 -0800 Merge branch 'mlxbf_gige-add-bluefield-3-support' David Thompson says: ==================== mlxbf_gige: add BlueField-3 support This patch series adds driver logic to the "mlxbf_gige" Ethernet driver in order to support the third generation BlueField SoC (BF3). The existing "mlxbf_gige" driver is extended with BF3-specific logic and run-time decisions are made by the driver depending on the SoC generation (BF2 vs. BF3). The BF3 SoC is similar to BF2 SoC with regards to transmit and receive packet processing: * Driver rings usage; consumer & producer indices * Single queue for receive and transmit * DMA operation The differences between BF3 and BF2 SoC are: * In addition to supporting 1Gbps interface speed, the BF3 SoC adds support for 10Mbps and 100Mbps interface speeds * BF3 requires SerDes config logic to support its SGMII interface * BF3 adds support for "ethtool -s" for interface speed config * BF3 utilizes different MDIO logic for accessing the board-level PHY device Testing - Successful build of kernel for ARM64, ARM32, X86_64 - Tested ARM64 build on FastModels, Palladium, SoC ==================== Link: https://lore.kernel.org/r/20230112202609.21331-1-davthompson@nvidia.com Signed-off-by: Jakub Kicinski commit e1cc8ce46200b3f3026e546053458c6f8046ef27 Author: David Thompson Date: Thu Jan 12 15:26:09 2023 -0500 mlxbf_gige: fix white space in mlxbf_gige_eth_ioctl This patch fixes the white space issue raised by checkpatch: CHECK: Alignment should match open parenthesis +static int mlxbf_gige_eth_ioctl(struct net_device *netdev, + struct ifreq *ifr, int cmd) Signed-off-by: David Thompson Signed-off-by: Asmaa Mnebhi Signed-off-by: Jakub Kicinski commit cedd97737a1f302b3d0493d7054a35e0c5997b99 Author: David Thompson Date: Thu Jan 12 15:26:08 2023 -0500 mlxbf_gige: add "set_link_ksettings" ethtool callback This patch extends the "ethtool_ops" data structure to include the "set_link_ksettings" callback. This change enables configuration of the various interface speeds that the BlueField-3 supports (10Mbps, 100Mbps, and 1Gbps). Signed-off-by: David Thompson Signed-off-by: Asmaa Mnebhi Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit 20d03d4d9437771a9b6d38d4a6027a70d78d9865 Author: David Thompson Date: Thu Jan 12 15:26:07 2023 -0500 mlxbf_gige: support 10M/100M/1G speeds on BlueField-3 The BlueField-3 OOB interface supports 10Mbps, 100Mbps, and 1Gbps speeds. The external PHY is responsible for autonegotiating the speed with the link partner. Once the autonegotiation is done, the BlueField PLU needs to be configured accordingly. This patch does two things: 1) Initialize the advertised control flow/duplex/speed in the probe based on the BlueField SoC generation (2 or 3) 2) Adjust the PLU speed config in the PHY interrupt handler Signed-off-by: David Thompson Signed-off-by: Asmaa Mnebhi Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit 2321d69f92aa7e6aa2cc98e7a8e005566943922f Author: David Thompson Date: Thu Jan 12 15:26:06 2023 -0500 mlxbf_gige: add MDIO support for BlueField-3 This patch adds initial MDIO support for the BlueField-3 SoC. Separate header files for the BlueField-2 and the BlueField-3 SoCs have been created. These header files hold the SoC-specific MDIO macros since the register offsets and bit fields have changed. Also, in BlueField-3 there is a separate register for writing and reading the MDIO data. Finally, instead of having "if" statements everywhere to differentiate between SoC-specific logic, a mlxbf_gige_mdio_gw_t struct was created for this purpose. Signed-off-by: David Thompson Signed-off-by: Asmaa Mnebhi Signed-off-by: Jakub Kicinski commit e2a9575025fe986a6146569a32093d7f8993ebde Author: Russell King (Oracle) Date: Thu Jan 12 14:37:06 2023 +0000 net: pcs: pcs-lynx: use phylink_get_link_timer_ns() helper Use the phylink_get_link_timer_ns() helper to get the period for the link timer. Signed-off-by: Russell King (Oracle) Link: https://lore.kernel.org/r/E1pFyhW-0067jq-Fh@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 28dbf774bc879c1841d58cb711aaea6198955b95 Author: Piergiorgio Beruto Date: Fri Jan 13 14:26:35 2023 +0100 plca.c: fix obvious mistake in checking retval Revert a wrong fix that was done during the review process. The intention was to substitute "if(ret < 0)" with "if(ret)". Unfortunately, the intended fix did not meet the code. Besides, after additional review, it was decided that "if(ret < 0)" was actually the right thing to do. Fixes: 8580e16c28f3 ("net/ethtool: add netlink interface for the PLCA RS") Signed-off-by: Piergiorgio Beruto Reviewed-by: Andrew Lunn Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/f2277af8951a51cfee2fb905af8d7a812b7beaf4.1673616357.git.piergiorgio.beruto@gmail.com Signed-off-by: Jakub Kicinski commit da1b0b5c1bebf4e8f9291f9dcd95b49e70ef28cf Merge: 9b7fe8046d742 80e87442e69ba Author: Jakub Kicinski Date: Fri Jan 13 21:40:56 2023 -0800 Merge branch 'net-mdio-continue-separating-c22-and-c45' Michael Walle says: ==================== net: mdio: Continue separating C22 and C45 I've picked this older series from Andrew up and rebased it onto the latest net-next. This is the second patch set in the series which separates the C22 and C45 MDIO bus transactions at the API level to the MDIO bus drivers. ==================== Link: https://lore.kernel.org/r/20230112-net-next-c45-seperation-part-2-v1-0-5eeaae931526@walle.cc Signed-off-by: Jakub Kicinski commit 80e87442e69ba8589160c5d472c2d973d0731c86 Author: Andrew Lunn Date: Thu Jan 12 16:15:16 2023 +0100 enetc: Separate C22 and C45 transactions The enetc MDIO bus driver can perform both C22 and C45 transfers. Create separate functions for each and register the C45 versions using the new API calls where appropriate. This driver is shared with the Felix DSA switch, so update that at the same time. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit 3c7826d0b1066bbb316a89f1d8c72652fa8cb53f Author: Andrew Lunn Date: Thu Jan 12 16:15:15 2023 +0100 net: stmmac: Separate C22 and C45 transactions for xgmac The stmmac MDIO bus driver in variant gmac4 can perform both C22 and C45 transfers. Create separate functions for each and register the C45 versions using the new API calls where appropriate. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit 5b0a447efff5a7d99abed41d77903172304fd8d4 Author: Andrew Lunn Date: Thu Jan 12 16:15:14 2023 +0100 net: stmmac: Separate C22 and C45 transactions for xgmac2 The stmicro stmmac xgmac2 MDIO bus driver can perform both C22 and C45 transfers. Create separate functions for each and register the C45 versions using the new API calls where appropriate. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit 3d90c03cb41605943dc0ba5383f771d35bc304aa Author: Andrew Lunn Date: Thu Jan 12 16:15:13 2023 +0100 net: lan743x: Separate C22 and C45 transactions The microchip lan743x MDIO bus driver can perform both C22 and C45 transfers in some variants. Create separate functions for each and register the C45 versions using the new API calls where appropriate. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit 900888374e73652b79f8c9b2138a5c893023d669 Author: Andrew Lunn Date: Thu Jan 12 16:15:12 2023 +0100 net: ethernet: mtk_eth_soc: Separate C22 and C45 transactions The mediatek bus driver can perform both C22 and C45 transfers. Create separate functions for each and register the C45 versions using the new API calls. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit c58e39942adfe2af10e71dc8356069260bc3a64e Author: Andrew Lunn Date: Thu Jan 12 16:15:11 2023 +0100 net: mdio: ipq4019: Separate C22 and C45 transactions The ipq4019 driver can perform both C22 and C45 transfers. Create separate functions for each and register the C45 versions using the new driver API calls. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit c3c497eb8b24655b5be01ad4e09d1998dcba4d22 Author: Andrew Lunn Date: Thu Jan 12 16:15:10 2023 +0100 net: mdio: aspeed: Separate C22 and C45 transactions The aspeed MDIO bus driver can perform both C22 and C45 transfers. Modify the existing C45 functions to take the devad as a parameter, and remove the wrappers so there are individual C22 and C45 functions. Add the C45 functions to the new API calls. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit d544a25930a7319be749682bcc8eb1b60f87239e Author: Andrew Lunn Date: Thu Jan 12 16:15:09 2023 +0100 net: mdio: mux-bcm-iproc: Separate C22 and C45 transactions The MDIO mux broadcom iproc can perform both C22 and C45 transfers. Create separate functions for each and register the C45 versions using the new API calls. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit 87e3bee0f247f40dd908ba9fa6c960379b4829e8 Author: Andrew Lunn Date: Thu Jan 12 16:15:08 2023 +0100 net: mdio: i2c: Separate C22 and C45 transactions The MDIO over I2C bus driver can perform both C22 and C45 transfers. Create separate functions for each and register the C45 versions using the new API calls. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit 93641ecbaa1f2602c455842ad0b0fe066f5f1344 Author: Andrew Lunn Date: Thu Jan 12 16:15:07 2023 +0100 net: mdio: cavium: Separate C22 and C45 transactions The cavium IP can perform both C22 and C45 transfers. Create separate functions for each and register the C45 versions in both the octeon and thunder bus driver. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit 9b7fe8046d7429ba776f962ad3b4b7ba2d6859c8 Author: Bin Chen Date: Thu Jan 12 13:11:02 2023 +0100 nfp: add DCB IEEE support Add basic DCB IEEE support. This includes support for ETS, max-rate, and DSCP to user priority mapping. DCB may be configured using iproute2's dcb command. Example usage: dcb ets set dev $dev tc-tsa 0:ets 1:ets 2:ets 3:ets 4:ets 5:ets \ 6:ets 7:ets tc-bw 0:0 1:80 2:0 3:0 4:0 5:0 6:20 7:0 dcb maxrate set dev $dev tc-maxrate 1:1000bit And DCB configuration can be shown using: dcb ets show dev $dev dcb maxrate show dev $dev Signed-off-by: Bin Chen Signed-off-by: Simon Horman Link: https://lore.kernel.org/r/20230112121102.469739-1-simon.horman@corigine.com Signed-off-by: Jakub Kicinski commit bf20ce9f3040e29f806d2b290f7bddbdee9f32ad Author: Lorenzo Bianconi Date: Thu Jan 12 10:21:29 2023 +0100 net: ethernet: mtk_wed: get rid of queue lock for tx queue Similar to MTK Wireless Ethernet Dispatcher (WED) MCU rx queue, we do not need to protect WED MCU tx queue with a spin lock since the tx queue is accessed in the two following routines: - mtk_wed_wo_queue_tx_skb(): it is run at initialization and during mt7915 normal operation. Moreover MCU messages are serialized through MCU mutex. - mtk_wed_wo_queue_tx_clean(): it runs just at mt7915 driver module unload when no more messages are sent to the MCU. Remove tx queue spinlock. Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/7bd0337b2a13ab1a63673b7c03fd35206b3b284e.1673515140.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski commit af6d10345ca76670c1b7c37799f0d5576ccef277 Author: Jon Maxwell Date: Thu Jan 12 12:25:32 2023 +1100 ipv6: remove max_size check inline with ipv4 In ip6_dst_gc() replace: if (entries > gc_thresh) With: if (entries > ops->gc_thresh) Sending Ipv6 packets in a loop via a raw socket triggers an issue where a route is cloned by ip6_rt_cache_alloc() for each packet sent. This quickly consumes the Ipv6 max_size threshold which defaults to 4096 resulting in these warnings: [1] 99.187805] dst_alloc: 7728 callbacks suppressed [2] Route cache is full: consider increasing sysctl net.ipv6.route.max_size. . . [300] Route cache is full: consider increasing sysctl net.ipv6.route.max_size. When this happens the packet is dropped and sendto() gets a network is unreachable error: remaining pkt 200557 errno 101 remaining pkt 196462 errno 101 . . remaining pkt 126821 errno 101 Implement David Aherns suggestion to remove max_size check seeing that Ipv6 has a GC to manage memory usage. Ipv4 already does not check max_size. Here are some memory comparisons for Ipv4 vs Ipv6 with the patch: Test by running 5 instances of a program that sends UDP packets to a raw socket 5000000 times. Compare Ipv4 and Ipv6 performance with a similar program. Ipv4: Before test: MemFree: 29427108 kB Slab: 237612 kB ip6_dst_cache 1912 2528 256 32 2 : tunables 0 0 0 xfrm_dst_cache 0 0 320 25 2 : tunables 0 0 0 ip_dst_cache 2881 3990 192 42 2 : tunables 0 0 0 During test: MemFree: 29417608 kB Slab: 247712 kB ip6_dst_cache 1912 2528 256 32 2 : tunables 0 0 0 xfrm_dst_cache 0 0 320 25 2 : tunables 0 0 0 ip_dst_cache 44394 44394 192 42 2 : tunables 0 0 0 After test: MemFree: 29422308 kB Slab: 238104 kB ip6_dst_cache 1912 2528 256 32 2 : tunables 0 0 0 xfrm_dst_cache 0 0 320 25 2 : tunables 0 0 0 ip_dst_cache 3048 4116 192 42 2 : tunables 0 0 0 Ipv6 with patch: Errno 101 errors are not observed anymore with the patch. Before test: MemFree: 29422308 kB Slab: 238104 kB ip6_dst_cache 1912 2528 256 32 2 : tunables 0 0 0 xfrm_dst_cache 0 0 320 25 2 : tunables 0 0 0 ip_dst_cache 3048 4116 192 42 2 : tunables 0 0 0 During Test: MemFree: 29431516 kB Slab: 240940 kB ip6_dst_cache 11980 12064 256 32 2 : tunables 0 0 0 xfrm_dst_cache 0 0 320 25 2 : tunables 0 0 0 ip_dst_cache 3048 4116 192 42 2 : tunables 0 0 0 After Test: MemFree: 29441816 kB Slab: 238132 kB ip6_dst_cache 1902 2432 256 32 2 : tunables 0 0 0 xfrm_dst_cache 0 0 320 25 2 : tunables 0 0 0 ip_dst_cache 3048 4116 192 42 2 : tunables 0 0 0 Tested-by: Andrea Mayer Signed-off-by: Jon Maxwell Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20230112012532.311021-1-jmaxwell37@gmail.com Signed-off-by: Jakub Kicinski commit c1917514107982794fd448ee2596878f396ee6a8 Author: Keith Busch Date: Wed Jan 11 10:42:45 2023 -0800 caif: don't assume iov_iter type The details of the iov_iter types are appropriately abstracted, so there's no need to check for specific type fields. Just let the abstractions handle it. This is preparing for io_uring/net's io_send to utilize the more efficient ITER_UBUF. Signed-off-by: Keith Busch Reviewed-by: Jens Axboe Link: https://lore.kernel.org/r/20230111184245.3784393-1-kbusch@meta.com Signed-off-by: Jakub Kicinski commit e471d83e1fa0154615f2fc60c945339414a59dd7 Author: Anand Moon Date: Wed Jan 11 17:24:31 2023 +0000 dt-bindings: net: rockchip-dwmac: fix rv1126 compatible warning Fix compatible string for RV1126 gmac, and constrain it to be compatible with Synopsys dwmac 4.20a. fix below warning $ make CHECK_DTBS=y rv1126-edgeble-neu2-io.dtb arch/arm/boot/dts/rv1126-edgeble-neu2-io.dtb: ethernet@ffc40000: compatible: 'oneOf' conditional failed, one must be fixed: ['rockchip,rv1126-gmac', 'snps,dwmac-4.20a'] is too long 'rockchip,rv1126-gmac' is not one of ['rockchip,rk3568-gmac', 'rockchip,rk3588-gmac'] Fixes: b36fe2f43662 ("dt-bindings: net: rockchip-dwmac: add rv1126 compatible") Reviewed-by: Jagan Teki Acked-by: Rob Herring Signed-off-by: Anand Moon Link: https://lore.kernel.org/r/20230111172437.5295-1-anand@edgeble.ai Signed-off-by: Jakub Kicinski commit e335795f27d0ab5260e4681f14be8f8c915ac1a7 Author: Mike Christie Date: Thu Dec 29 13:01:52 2022 -0600 scsi: target: target_core_pscsi: Convert to scsi_execute_cmd() scsi_execute_req() is going to be removed. Convert pscsi to scsi_execute_cmd(). Signed-off-by: Mike Christie Reviewed-by: John Garry Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 5314ce761fbf3bef2b5aae5e5562e782a5026e7c Author: Mike Christie Date: Thu Dec 29 13:01:51 2022 -0600 scsi: virtio_scsi: Convert to scsi_execute_cmd() scsi_execute_req() is going to be removed. Convert virtio_scsi to scsi_execute_cmd(). Signed-off-by: Mike Christie Reviewed-by: John Garry Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 49d33b6245d91a2ca20755cd4edf86dd0e49649e Author: Mike Christie Date: Thu Dec 29 13:01:50 2022 -0600 scsi: sr: Convert to scsi_execute_cmd() scsi_execute*() is going to be removed. Convert sr to scsi_execute_cmd(). Signed-off-by: Mike Christie Reviewed-by: John Garry Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit ae4145a5f25e56b0248b38f913c5cc370cde723a Author: Mike Christie Date: Thu Dec 29 13:01:49 2022 -0600 scsi: ses: Convert to scsi_execute_cmd() scsi_execute_req() is going to be removed. Convert ses to scsi_execute_cmd(). Signed-off-by: Mike Christie Reviewed-by: John Garry Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 6ff236e847aa7817a985122ccef7e0f422eb8564 Author: Mike Christie Date: Thu Dec 29 13:01:48 2022 -0600 scsi: zbc: Convert to scsi_execute_cmd() scsi_execute_req() is going to be removed. Conver zbc to scsi_execute_cmd(). Signed-off-by: Mike Christie Reviewed-by: John Garry Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit af16cd63d9d3b790ecfce3c053595a98f181e025 Author: Mike Christie Date: Thu Dec 29 13:01:47 2022 -0600 scsi: sd: Convert to scsi_execute_cmd() scsi_execute*() is going to be removed. Convert sd_mod to use scsi_execute_cmd(). Signed-off-by: Mike Christie Reviewed-by: John Garry Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit c9ee828aad6919b7eee7ef2059489c7221edf68a Author: Mike Christie Date: Thu Dec 29 13:01:46 2022 -0600 scsi: spi: Convert to scsi_execute_cmd() scsi_execute() is going to be removed. Convert to the SPI class to scsi_execute_cmd(). Signed-off-by: Mike Christie Reviewed-by: John Garry Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 7dfe0b5e7ca67c659475883712c1d0449f900f9c Author: Mike Christie Date: Thu Dec 29 13:01:45 2022 -0600 scsi: core: Convert to scsi_execute_cmd() scsi_execute_req() is going to be removed. Convert SCSI midlayer to scsi_execute_cmd(). Signed-off-by: Mike Christie Reviewed-by: John Garry Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 31fc28c6b13eedb6da2c60414088c007432436d1 Author: Mike Christie Date: Thu Dec 29 13:01:44 2022 -0600 scsi: scsi_dh: Convert to scsi_execute_cmd() scsi_execute() is going to be removed. Convert the scsi_dh users to scsi_execute_cmd(). Signed-off-by: Mike Christie Reviewed-by: John Garry Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit ed226f0889a3c79d059564ba3fc1dcf5825f655c Author: Mike Christie Date: Thu Dec 29 13:01:43 2022 -0600 scsi: ch: Convert to scsi_execute_cmd() scsi_execute_req() is going to be removed. Convert ch to scsi_execute_cmd(). Signed-off-by: Mike Christie Reviewed-by: John Garry Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 08e95a2ba4bbbb968e7ee0cc946e7d2c51742e92 Author: Mike Christie Date: Thu Dec 29 13:01:42 2022 -0600 scsi: hwmon: drivetemp: Convert to scsi_execute_cmd() scsi_execute_req() is going to be removed. Convert drivetemp to scsi_execute_cmd(). Signed-off-by: Mike Christie Reviewed-by: John Garry Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 5fa7b072677513e934242eab85772c0bfc84859b Author: Mike Christie Date: Thu Dec 29 13:01:41 2022 -0600 scsi: ata: libata-scsi: Convert to scsi_execute_cmd() scsi_execute_req() is going to be removed. Convert libata to scsi_execute_cmd(). Signed-off-by: Mike Christie Reviewed-by: John Garry Reviewed-by: Bart Van Assche Acked-by: Damien Le Moal Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit d0949565811f0896c1c7e781ab2ad99d34273fdf Author: Mike Christie Date: Thu Dec 29 13:01:40 2022 -0600 scsi: core: Add struct for args to execution functions Move the SCSI execution functions to use a struct for passing in optional args. This commit adds the new struct, temporarily converts scsi_execute() and scsi_execute_req() ands a new helper, scsi_execute_cmd(), which takes the scsi_exec_args struct. There should be no change in behavior. We no longer allow users to pass in any request->rq_flags value, but they were only passing in RQF_PM which we do support by allowing users to pass in the BLK_MQ_REQ flags used by blk_mq_alloc_request(). Subsequent commits will convert scsi_execute() and scsi_execute_req() users to the new helpers then remove scsi_execute() and scsi_execute_req(). Signed-off-by: Mike Christie Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: John Garry Signed-off-by: Martin K. Petersen commit 7084eadf62ca17540040a1116ac0a155c31b066a Merge: 15e70f0de2810 519b6274a7775 Author: Martin K. Petersen Date: Fri Jan 13 21:15:07 2023 -0500 Merge patch series "Add support for UFS Event Specific Interrupt" Can Guo says: This patch series is to enable Event Specific Interrupt (ESI) which can used in MCQ mode. Link: https://lore.kernel.org/r/1671073583-10065-1-git-send-email-quic_cang@quicinc.com Signed-off-by: Martin K. Petersen commit 15e70f0de2810793d932d686392a3393c81083a7 Merge: 64b6deadc938b eacb139b77ff7 Author: Martin K. Petersen Date: Fri Jan 13 21:13:43 2023 -0500 Merge patch series "Add Multi Circular Queue Support" Asutosh Das says: This patch series is an implementation of UFS Multi-Circular Queue. Please consider this series for next merge window. This implementation has been verified on a Qualcomm & MediaTek platform. UFS Multi-Circular Queue (MCQ) has been added in UFSHCI v4.0 to improve storage performance. The implementation uses the shared tagging mechanism so that tags are shared among the hardware queues. The number of hardware queues is configurable. This series doesn't include the ESI implementation for completion handling. Link: https://lore.kernel.org/r/cover.1673557949.git.quic_asutoshd@quicinc.com Signed-off-by: Martin K. Petersen commit 519b6274a7775f5fe00a086f189efb8f063467d1 Author: Can Guo Date: Wed Dec 14 19:06:22 2022 -0800 scsi: ufs: qcom: Add MCQ ESI config vendor specific ops Add MCQ ESI config vendor specific ops. Co-developed-by: Asutosh Das Signed-off-by: Asutosh Das Signed-off-by: Can Guo Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit e02288e0265fe316a16d48ec6dd7b7fd54d66e3e Author: Can Guo Date: Wed Dec 14 19:06:21 2022 -0800 scsi: ufs: core: mcq: Add Event Specific Interrupt enable and config functions Add and export two functions to enable ESI and config ESI base addresses. The calls to these exported functions will be added by the next patch in this series. Signed-off-by: Can Guo Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit edb0db05607ce05a5e0df00518b58a811e9f548e Author: Can Guo Date: Wed Dec 14 19:06:20 2022 -0800 scsi: ufs: core: Add Event Specific Interrupt configuration vendor specific ops As Event Specific Interrupt message format is not defined in UFSHCI JEDEC specs, and the ESI handling highly depends on how the format is designed, hence add a vendor specific ops such that SoC vendors can configure their own ESI handlers. If ESI vops is not provided or returning error, go with the legacy (central) interrupt way. Signed-off-by: Can Guo Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit eacb139b77ff75b973cb99573b33a7adb1f4ca38 Author: Asutosh Das Date: Fri Jan 13 12:48:52 2023 -0800 scsi: ufs: core: mcq: Enable multi-circular queue Enable MCQ in the Host Controller. Signed-off-by: Asutosh Das Reviewed-by: Bart Van Assche Reviewed-by: Manivannan Sadhasivam Reviewed-by: Stanley Chu Signed-off-by: Martin K. Petersen commit ed975065c31c2a0372e13c19e8140b69814a98ba Author: Asutosh Das Date: Fri Jan 13 12:48:51 2023 -0800 scsi: ufs: core: mcq: Add completion support in poll Complete CQE requests in poll. Assumption is that several poll completion may happen in different CPUs for the same completion queue. Hence a spin lock protection is added. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das Reviewed-by: Bart Van Assche Reviewed-by: Manivannan Sadhasivam Reviewed-by: Stanley Chu Signed-off-by: Martin K. Petersen commit f87b2c41822aad09aadac31b8ba22c0c0e639eee Author: Asutosh Das Date: Fri Jan 13 12:48:50 2023 -0800 scsi: ufs: mcq: Add completion support of a CQE Add support for completing requests from Completion Queue. Some host controllers support vendor specific registers that provide a bitmap of all CQs which have at least one completed CQE. Add this support. The MCQ specification doesn't provide the Task Tag or its equivalent in the Completion Queue Entry. So use an indirect method to find the Task Tag from the Completion Queue Entry. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das Reviewed-by: Bart Van Assche Reviewed-by: Manivannan Sadhasivam Reviewed-by: Stanley Chu Signed-off-by: Martin K. Petersen commit c30d8d010b5efd1d526ae94c9fbbfc0f74cec9fe Author: Asutosh Das Date: Fri Jan 13 12:48:49 2023 -0800 scsi: ufs: core: Prepare for completion in MCQ Modify completion path APIs and add completion queue entry. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das Reviewed-by: Bart Van Assche Reviewed-by: Manivannan Sadhasivam Reviewed-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 854f84e7feebc0c5a63e4c1f29ddf201fd2a57bc Author: Asutosh Das Date: Fri Jan 13 12:48:48 2023 -0800 scsi: ufs: core: mcq: Find hardware queue to queue request Add support to find the hardware queue on which the request would be queued. Since the very first queue is to serve device commands, an offset of 1 is added to the index of the hardware queue. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das Reviewed-by: Bart Van Assche Reviewed-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen commit 22a2d563de1425ea294e9abfa104dbf20c83a28a Author: Asutosh Das Date: Fri Jan 13 12:48:47 2023 -0800 scsi: ufs: core: Prepare ufshcd_send_command() for MCQ Add support to send commands using multiple submission queues in MCQ mode. Modify the functions that use ufshcd_send_command(). Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das Reviewed-by: Bart Van Assche Reviewed-by: Manivannan Sadhasivam Reviewed-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 0d33728fc0e77adeea95de6e53cf26a4f741e594 Author: Asutosh Das Date: Fri Jan 13 12:48:46 2023 -0800 scsi: ufs: core: mcq: Use shared tags for MCQ mode Enable shared tags for MCQ. For UFS, this should not have a huge performance impact. It however simplifies the MCQ implementation and reuses most of the existing code in the issue and completion path. Also add multiple queue mapping to map_queue(). Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das Reviewed-by: Bart Van Assche Reviewed-by: Manivannan Sadhasivam Reviewed-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 2468da61ea095162067ed408824298ba9c3661c8 Author: Asutosh Das Date: Fri Jan 13 12:48:45 2023 -0800 scsi: ufs: core: mcq: Configure operation and runtime interface Runtime and operation registers are defined per Submission and Completion queue. The location of these registers is not defined in the spec; meaning the offsets and stride may vary for different HC vendors. Establish the stride, base address, and doorbell address offsets from vendor host driver and program it. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das Reviewed-by: Manivannan Sadhasivam Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 4682abfae2eb3a1c138130cfd6d71411d81aaa00 Author: Asutosh Das Date: Fri Jan 13 12:48:44 2023 -0800 scsi: ufs: core: mcq: Allocate memory for MCQ mode To read the bqueuedepth, the device descriptor is fetched in Single Doorbell Mode. This allocated memory may not be enough for MCQ mode because the number of tags supported in MCQ mode may be larger than in SDB mode. Hence, release the memory allocated in SDB mode and allocate memory for MCQ mode operation. Define the UFS hardware queue and Completion Queue Entry. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das Reviewed-by: Manivannan Sadhasivam Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 7224c806876e46cfaf46b1c90da8d5c2e1f2108f Author: Asutosh Das Date: Fri Jan 13 12:48:43 2023 -0800 scsi: ufs: core: mcq: Calculate queue depth The UFS device defines the supported queuedepth by bqueuedepth which has a max value of 256. The HC defines MAC (Max Active Commands) that defines the max number of commands that in flight to the UFS device. Calculate and configure the nutrs based on both these values. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das Reviewed-by: Manivannan Sadhasivam Reviewed-by: Bart Van Assche Reviewed-by: Stanley Chu Signed-off-by: Martin K. Petersen commit c263b4ef737e622e2a908c58ca4bb68a89376387 Author: Asutosh Das Date: Fri Jan 13 12:48:42 2023 -0800 scsi: ufs: core: mcq: Configure resource regions Define the MCQ resources and add support to ioremap the resource regions. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das Reviewed-by: Manivannan Sadhasivam Reviewed-by: Bart Van Assche Reviewed-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 57b1c0ef89ac9d9e7475df7843aeb7672ebcd197 Author: Asutosh Das Date: Fri Jan 13 12:48:41 2023 -0800 scsi: ufs: core: mcq: Add support to allocate multiple queues Multi-circular queue (MCQ) has been added in UFSHC v4.0 standard in addition to the Single Doorbell mode. The MCQ mode supports multiple submission and completion queues. Add support to allocate and configure the queues. Add module parameters support to configure the queues. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das Reviewed-by: Bart Van Assche Reviewed-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen commit 0cab4023ec7b49b18145f74ab8389678d6d58878 Author: Asutosh Das Date: Fri Jan 13 12:48:40 2023 -0800 scsi: ufs: core: Defer adding host to SCSI if MCQ is supported If MCQ support is present, enabling it after MCQ support has been configured would require reallocating tags and memory. It would also free up the already allocated memory in Single Doorbell Mode. So defer invoking scsi_add_host() until MCQ is configured. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das Reviewed-by: Bart Van Assche Reviewed-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen commit 305a357d3595d39be7c001f72e135bc94cbd85da Author: Asutosh Das Date: Fri Jan 13 12:48:39 2023 -0800 scsi: ufs: core: Introduce multi-circular queue capability Add support to check for MCQ capability in the UFSHC. Add a module parameter to disable MCQ if needed. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das Reviewed-by: Bart Van Assche Reviewed-by: Manivannan Sadhasivam Reviewed-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 6e1d850acff9477ae4c18a73c19ef52841ac2010 Author: Asutosh Das Date: Fri Jan 13 12:48:38 2023 -0800 scsi: ufs: core: Probe for EXT_IID support Task Tag is limited to 8 bits and this restricts the number of active I/Os to 255. In multi-circular queue mode, this may not be enough. The specification provides EXT_IID which can be used to increase the number of I/Os if the UFS device and UFSHC support it. This patch adds support to probe for EXT_IID support in UFS device and UFSHC. Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das Reviewed-by: Bart Van Assche Reviewed-by: Avri Altman Reviewed-by: Manivannan Sadhasivam Reviewed-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 64b6deadc938b37717aa1338715cb7ef5e7d444c Author: Kees Cook Date: Thu Jan 5 15:30:46 2023 -0800 scsi: uapi: Replace 0-length array with flexible array Zero-length arrays are deprecated[1]. Replace struct fc_bsg_host_vendor_reply's "vendor_rsp" 0-length array with a flexible array. Detected with GCC 13, using -fstrict-flex-arrays=3: drivers/scsi/qla2xxx/qla_isr.c: In function 'qla25xx_process_bidir_status_iocb.isra': drivers/scsi/qla2xxx/qla_isr.c:3117:54: warning: array subscript 0 is outside array bounds of '__u32[0]' {aka 'unsigned int[]'} [-Warray-bounds=] 3117 | bsg_reply->reply_data.vendor_reply.vendor_rsp[0] = rval; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ In file included from drivers/scsi/qla2xxx/qla_def.h:34, from drivers/scsi/qla2xxx/qla_isr.c:6: include/uapi/scsi/scsi_bsg_fc.h:219:15: note: while referencing 'vendor_rsp' 219 | __u32 vendor_rsp[0]; | ^~~~~~~~~~ [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays Cc: Martin K. Petersen Cc: Dan Williams Cc: "Gustavo A. R. Silva" Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20230105233042.never.913-kees@kernel.org Signed-off-by: Martin K. Petersen commit 0fb0624b15d21622c214617fda5c05a203b04564 Author: Randy Dunlap Date: Sat Jan 7 18:12:28 2023 -0800 seccomp: fix kernel-doc function name warning Move the ACTION_ONLY() macro so that it is not between the kernel-doc notation and the function definition for seccomp_run_filters(), eliminating a kernel-doc warning: kernel/seccomp.c:400: warning: expecting prototype for seccomp_run_filters(). Prototype was for ACTION_ONLY() instead Signed-off-by: Randy Dunlap Cc: Kees Cook Cc: Andy Lutomirski Cc: Will Drewry Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20230108021228.15975-1-rdunlap@infradead.org commit 38d431229bfbe175b41274faa856e5b0a1ebe70d Author: Damien Le Moal Date: Mon Oct 24 16:03:48 2022 +0900 ata: libata: exclude FUA support for known buggy drives Thread [1] reported back in 2012 problems with enabling FUA for 3 different drives. Add these drives to ata_device_blacklist[] to mark them with the ATA_HORKAGE_NO_FUA flag. To be conservative and avoid problems on old systems, the model number for the three new entries are defined as to widely match all drives in the same product line. [1]: https://lore.kernel.org/lkml/CA+6av4=uxu_q5U_46HtpUt=FSgbh3pZuAEY54J5_xK=MKWq-YQ@mail.gmail.com/ Suggested-by: Maciej S. Szmigiero Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Maciej S. Szmigiero Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Niklas Cassel commit bc9af49094065ca182b4606ce770bcd6178729b6 Author: Damien Le Moal Date: Thu Oct 27 14:08:01 2022 +0900 ata: libata: Fix FUA handling in ata_build_rw_tf() If a user issues a write command with the FUA bit set for a device with NCQ support disabled (that is, the device queue depth was set to 1), the LBA 48 command WRITE DMA FUA EXT must be used. However, ata_build_rw_tf() ignores this and first tests if LBA 28 can be used based on the write command sector and number of blocks. That is, for small FUA writes at low LBAs, ata_rwcmd_protocol() will cause the write to fail. Fix this by preventing the use of LBA 28 for any FUA write request. Given that the WRITE MULTI FUA EXT command is marked as obsolete in the ATA specification since ACS-3 (published in 2013), remove the ATA_CMD_WRITE_MULTI_FUA_EXT command from the ata_rw_cmds array. Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Niklas Cassel Reviewed-by: Hannes Reinecke commit 4d2e4980a5289ae31a1cff40d258b68573182a37 Author: Damien Le Moal Date: Fri Oct 14 18:05:38 2022 +0900 ata: libata: cleanup fua support detection Move the detection of a device FUA support from ata_scsiop_mode_sense()/ata_dev_supports_fua() to device scan time in ata_dev_configure(). The function ata_dev_config_fua() is introduced to detect if a device supports FUA and this support is indicated using the new device flag ATA_DFLAG_FUA. In order to blacklist known buggy devices, the horkage flag ATA_HORKAGE_NO_FUA is introduced. Similarly to other horkage flags, the libata.force= arguments "fua" and "nofua" are also introduced to allow a user to control this horkage flag through the "force" libata module parameter. The ATA_DFLAG_FUA device flag is set only and only if all the following conditions are met: * libata.fua module parameter is set to 1 * The device supports the WRITE DMA FUA EXT command, * The device is not marked with the ATA_HORKAGE_NO_FUA flag, either from the blacklist or set by the user with libata.force=nofua * The device supports NCQ (while this is not mandated by the standards, this restriction is introduced to avoid problems with older non-NCQ devices). Enabling or diabling libata FUA support for all devices can now also be done using the "force=[no]fua" module parameter when libata.fua is set to 1. Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Niklas Cassel commit 77839debd1772204a60b9072ef6ae83ade1fb573 Author: Damien Le Moal Date: Thu Oct 27 14:21:12 2022 +0900 ata: libata: Rename and cleanup ata_rwcmd_protocol() Rename ata_rwcmd_protocol() to ata_set_rwcmd_protocol() to better reflect the fact that this function sets a task file command and protocol. The arguments order is also reversed and the function return type changed to a bool to indicate if the command and protocol were set correctly (instead of returning a completely arbitrary "-1" value. Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Niklas Cassel commit fa5bde139ee43ab91087c01e690c61aec957c339 Author: Damien Le Moal Date: Thu Oct 27 13:07:55 2022 +0900 ata: libata: Introduce ata_ncq_supported() Introduce the inline helper function ata_ncq_supported() to test if a device supports NCQ commands. The function ata_ncq_enabled() is also rewritten using this new helper function. Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Niklas Cassel commit b4a6bb3a67aa0c37b2b6cd47efc326eb455de674 Author: Christoph Hellwig Date: Wed Nov 2 00:09:03 2022 -0700 block: add a sanity check for non-write flush/fua bios Check that the PREFUSH and FUA flags are only set on write bios, given that the flush state machine expects that. [Damien] The check is also extended to REQ_OP_ZONE_APPEND operations as these are data write operations used by btrfs and zonefs and may also have the REQ_FUA bit set. Reported-by: Damien Le Moal Signed-off-by: Christoph Hellwig Signed-off-by: Damien Le Moal Reviewed-by: Jens Axboe Reviewed-by: Niklas Cassel Reviewed-by: Hannes Reinecke commit 1c48391bc6739f5e3306919d4b887b92c35d5490 Author: Roberto Valenzuela Date: Fri Jan 13 13:02:57 2023 -0500 selftests/bpf: Fix missing space error Add the missing space after 'dest' variable assignment. This change will resolve the following checkpatch.pl script error: ERROR: spaces required around that '+=' (ctx:VxW) Signed-off-by: Roberto Valenzuela Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230113180257.39769-1-valenzuelarober@gmail.com commit 2fa074536590a82ee6c670d5f119f3dfb4ca6015 Author: Menglong Dong Date: Fri Jan 13 17:34:27 2023 +0800 libbpf: Replace '.' with '_' in legacy kprobe event name '.' is not allowed in the event name of kprobe. Therefore, we will get a EINVAL if the kernel function name has a '.' in legacy kprobe attach case, such as 'icmp_reply.constprop.0'. In order to adapt this case, we need to replace the '.' with other char in gen_kprobe_legacy_event_name(). And I use '_' for this propose. Signed-off-by: Menglong Dong Signed-off-by: Andrii Nakryiko Reviewed-by: Alan Maguire Link: https://lore.kernel.org/bpf/20230113093427.1666466-1-imagedong@tencent.com commit 8133844a8f2434be9576850c6978179d7cca5c81 Author: Rafael J. Wysocki Date: Thu Jan 12 21:51:24 2023 +0100 PCI/ACPI: Account for _S0W of the target bridge in acpi_pci_bridge_d3() It is questionable to allow a PCI bridge to go into D3 if it has _S0W returning D2 or a shallower power state, so modify acpi_pci_bridge_d3(() to always take the return value of _S0W for the target bridge into account. That is, make it return 'false' if _S0W returns D2 or a shallower power state for the target bridge regardless of its ancestor Root Port properties. Of course, this also causes 'false' to be returned if the Root Port itself is the target and its _S0W returns D2 or a shallower power state. However, still allow bridges without _S0W that are power-manageable via ACPI to enter D3 to retain the current code behavior in that case. This fixes problems where a hotplug notification is missed because a bridge is in D3. That means hot-added devices such as USB4 docks (and the devices they contain) and Thunderbolt 3 devices may not work. Link: https://lore.kernel.org/linux-pci/20221031223356.32570-1-mario.limonciello@amd.com/ Link: https://lore.kernel.org/r/12155458.O9o76ZdvQC@kreacher Reported-by: Mario Limonciello Signed-off-by: Rafael J. Wysocki Signed-off-by: Bjorn Helgaas commit bb649412d39f18eb2a8b7956209a068a08f4bc1e Author: Joerg Roedel Date: Fri Jan 13 20:15:28 2023 +0100 iommu/fsl_pamu: Fix compile error after adding set_platform_dma_ops The struct initializer for set_platform_dma_ops uses a semicolon as separator where a comma is required. Fix the compile error by using the correct separator. Fixes: c1fe9119ee70 ("iommu: Add set_platform_dma_ops callbacks") Signed-off-by: Joerg Roedel Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20230113191528.23638-1-joro@8bytes.org commit 41909ba6d82483791db47add5e2baac0458550d2 Author: Jai Luthra Date: Fri Dec 30 07:24:53 2022 -0600 remoteproc: k3-c7x: Add support for C7xv DSP on AM62A SoC Add support to the K3 DSP remoteproc driver to configure the C7xv subsystem core on AM62A SoCs. The C7xv susbsytem is based on C71 DSP with anlytics engine for deep learning purposes. The remoteproc handling for device management is similar to the C66/C71 DSPs on K3 J7 family SoCs, even though there are additional hardware accelerators and IP updates to C7xv subsystem. Signed-off-by: Jai Luthra Signed-off-by: Hari Nagalla Link: https://lore.kernel.org/r/20221230132453.32022-3-hnagalla@ti.com Signed-off-by: Mathieu Poirier commit 44d9083394305965006f64bfdaa94d3c9002564e Author: Hari Nagalla Date: Fri Dec 30 07:24:52 2022 -0600 dt-bindings: remoteproc: k3-dsp: Update bindings for AM62A SoCs The TI AM62A SoCs have a C7xv DSP and Analytics engine for deep learning purposes. The DSP part is similar to the C71x DSP found on K3 J7 SoCs, but additional hardware accelerators and IP are added to the subsystem for deep learning. Compatible info is updated to match AM62A SoCs. Signed-off-by: Hari Nagalla Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221230132453.32022-2-hnagalla@ti.com Signed-off-by: Mathieu Poirier commit 366617a69e60610912836570546f118006ebc7cb Author: Jeff Xu Date: Fri Jan 13 05:32:29 2023 +0000 selftests/landlock: Skip overlayfs tests when not supported overlayfs may be disabled in the kernel configuration, causing related tests to fail. Check that overlayfs is supported at runtime, so we can skip layout2_overlay.* accordingly. Signed-off-by: Jeff Xu Reviewed-by: Guenter Roeck Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230113053229.1281774-2-jeffxu@google.com [mic: Reword comments and constify variables] Signed-off-by: Mickaël Salaün commit dfeef15e73ca22455c1dd51c0ebc477145081630 Author: Peter Robinson Date: Sun Jan 8 07:47:50 2023 +0000 counter: microchip-tcp-capture: Add appropriate arch deps for TCP driver Add the CONFIG_SOC_AT91SAM9 and CONFIG_SOC_SAM_V7 deps for the Microchip SoCs that support this IP block/driver plus compile time testing. Signed-off-by: Peter Robinson Link: https://lore.kernel.org/r/20230108074750.443705-4-pbrobinson@gmail.com/ Signed-off-by: William Breathitt Gray commit 3760b49af5bc773a1679cd2e9dbef3c2532726af Author: Peter Robinson Date: Sun Jan 8 07:47:49 2023 +0000 counter: ftm-quaddec: Depend on the Layerscape SoC At the moment only the Freescale LS1021A is the only HW that supports this IP block so add an appropriate dependency and compile test. Signed-off-by: Peter Robinson Link: https://lore.kernel.org/r/20230108074750.443705-3-pbrobinson@gmail.com/ Signed-off-by: William Breathitt Gray commit 92a3337081e55eee0491b2a0255a45e7f583fff6 Author: Peter Robinson Date: Sun Jan 8 07:47:48 2023 +0000 counter: intel-qep: Depend on X86 Limit the Intel counter driver to X86, it doesn't make sense to build it for all arches if the counter subsystem is enabled. Signed-off-by: Peter Robinson Link: https://lore.kernel.org/r/20230108074750.443705-2-pbrobinson@gmail.com/ Signed-off-by: William Breathitt Gray commit 9c5e51f2b01edc5b3057044d15eb0f57be2cd449 Author: Peter Robinson Date: Sun Jan 8 07:47:47 2023 +0000 counter: Sort the Kconfig entries alphabetically Sort the Kconfig menu alphabetically to make it easier to read as the list grows larger. Signed-off-by: Peter Robinson Link: https://lore.kernel.org/r/20230108074750.443705-1-pbrobinson@gmail.com/ Signed-off-by: William Breathitt Gray commit dbc2309cac2a550a94357c31b3dacd69647a3f46 Author: Charlene Liu Date: Tue Dec 13 19:15:01 2022 -0500 drm/amd/display: add hubbub_init related Required by display init, also update get_dig_mode Tested-by: Daniel Wheeler Reviewed-by: Hansen Dsouza Reviewed-by: Duncan Ma Acked-by: Rodrigo Siqueira Signed-off-by: Charlene Liu Signed-off-by: Alex Deucher commit 8af54c61ccec875473e0636934ee578fa23fceb1 Author: Mustapha Ghaddar Date: Mon Dec 12 14:30:52 2022 -0500 drm/amd/display: Update dmub header to match DMUB [WHY] Last PR missed name of a struct to match in DMUB [HOW] Update the logic in dmub_cmh.h header Tested-by: Daniel Wheeler Reviewed-by: Meenakshikumar Somasundaram Acked-by: Rodrigo Siqueira Signed-off-by: Mustapha Ghaddar Signed-off-by: Alex Deucher commit 60b73429745e94957cbebe407b072d1c972ea537 Author: Yifan Zha Date: Wed Jan 11 14:59:39 2023 +0800 drm/amdgpu: Skip specific mmhub and sdma registers accessing under sriov [Why] SDMA0_CNTL and MMHUB system aperture related registers are blocked by L1 Policy. Therefore, they cannot be accessed by VF and loged in violation. [How] For MMHUB registers, they will be programmed by PF. So VF will skip to program them in mmhubv3_0. For SDMA0_CNTL which is a PF_only register, VF don't need to program it in sdma_v6_0. Signed-off-by: Yifan Zha Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 51097df1b2d041b74653b37475becb80adcd37ea Author: Candice Li Date: Mon Jan 9 21:55:22 2023 +0800 drm/amd/pm: Support RAS fatal error mode1 reset on smu v13_0_0 and v13_0_10 Support RAS fatal error mode1 reset on smu v13_0_0 and v13_0_10. Signed-off-by: Candice Li Reviewed-by: Evan Quan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 29c472b28ba2426839af1185b5692bf70a014a6a Author: jie1zhan Date: Fri Jan 13 10:39:13 2023 +0800 drm/amdgpu: Correct the power calcultion for Renior/Cezanne. From smu firmware,the value of power is transferred in units of watts. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2321 Fixes: 137aac26a2ed ("drm/amdgpu/smu12: fix power reporting on renoir") Acked-by: Alex Deucher Signed-off-by: Jesse Zhang Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher commit 2b89da46a77d2929c1b00af5eb6a07f3d95a931c Author: Mario Limonciello Date: Thu Jan 12 16:37:01 2023 -0600 drm/amd: fix some dead code in `gfx_v9_0_init_cp_compute_microcode` Some dead code was introduced as part of utilizing the `amdgpu_ucode_*` helpers. Adjust the control flow to make sure that firmware is released in the appropriate error flows. Reported-by: coverity-bot Addresses-Coverity-ID: 1530548 ("Control flow issues") Fixes: ec787deb2ddf ("drm/amd: Use `amdgpu_ucode_*` helpers for GFX9") Signed-off-by: Mario Limonciello Reviewed-by: Kees Cook Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d144b40a4833db01712f887ff31388a37ec51926 Author: Wenjing Liu Date: Tue Dec 13 18:13:18 2022 -0500 drm/amd/display: move dc_link_dpia logic to link_dp_dpia Tested-by: Daniel Wheeler Reviewed-by: George Shen Acked-by: Rodrigo Siqueira Signed-off-by: Wenjing Liu Signed-off-by: Alex Deucher commit a28d0bac0956c12c17c166cfd9c3655c006426a8 Author: Wenjing Liu Date: Tue Dec 13 17:26:13 2022 -0500 drm/amd/display: move dpcd logic from dc_link_dpcd to link_dpcd [why] Moving dpcd logic from dc_link_dpcd to link_dpcd as part of link file restructure Tested-by: Daniel Wheeler Reviewed-by: George Shen Acked-by: Rodrigo Siqueira Signed-off-by: Wenjing Liu Signed-off-by: Alex Deucher commit a98cdd8c485600a2cfc15508a38c13c49b551fb1 Author: Wenjing Liu Date: Mon Dec 12 13:52:57 2022 -0500 drm/amd/display: refactor ddc logic from dc_link_ddc to link_ddc [why] 1. Move dd_link_ddc functions to link_ddc. 2. Move link ddc functions declaration exposed in dc to link.h 3. Move link ddc functions declaration exposed in dm to dc_link.h 4. Remove i2caux_interface.h file Tested-by: Daniel Wheeler Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Wenjing Liu Signed-off-by: Alex Deucher commit 4370f72e3845a1741c6db8ba149c483f57352fd5 Author: Wenjing Liu Date: Sat Dec 10 11:40:18 2022 -0500 drm/amd/display: refactor hpd logic from dc_link to link_hpd [why] Factor out hpd handling logic from generic dc link file. Tested-by: Daniel Wheeler Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Wenjing Liu Signed-off-by: Alex Deucher commit 689932a8dd7df9e1361871f01a9e676fe3496322 Author: Dillon Varone Date: Mon Dec 12 13:23:00 2022 -0500 drm/amd/display: Implement FIFO enable sequence on DCN32 [WHY?] FIFO enable sequence is incomplete as it is currently implemented in FW, and requires reset to prevent the FIFO to be enabled in an invalid state. This cannot be done until DIG FE is connected to the BE. [HOW?] Add FIFO enable sequence in driver for dcn32 with reset after DIG FE is connected to BE. Tested-by: Daniel Wheeler Reviewed-by: Alvin Lee Acked-by: Rodrigo Siqueira Signed-off-by: Dillon Varone Signed-off-by: Alex Deucher commit 5ca3dc2b9800ddc5f627e1b8fa41c6ff68067a91 Author: Cruise Hung Date: Tue Dec 13 09:39:49 2022 +0800 drm/amd/display: Fix DPIA link encoder assignment issue [Why] The DPIA link encoder (DIG) was not released when a Display XDR 6K monitor was disconnected. That's because the DPIA link encoder logic checked the BW when it removed the link encoder for it. And the timing BW was less than DP link BW. So, it failed to release the link encoder. And that caused the DIG was occupied and can't be used. The reason it checked the BW is it wants to identify whether this link was using DIG or HPO. It skips if it's not DIG. [How] Not to check the BW when it removes the link encoder because it's already in the assignment table, it must be the DIG. Tested-by: Daniel Wheeler Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Cruise Hung Signed-off-by: Alex Deucher commit 01506614ceb2de9a0924bf004ff5f5ee94f50139 Author: Dmytro Laktyushkin Date: Mon Dec 12 17:42:59 2022 -0500 drm/amd/display: fix multi edp panel instancing A previous fix attempted to correct mismatch between DM display targets and dc panel instancing by only counting connected panels. This behaviour breaks a feature, thus this is an alternative solution that allows mapping display targets to dc links during mod_power_create. Tested-by: Daniel Wheeler Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Dmytro Laktyushkin Signed-off-by: Alex Deucher commit 59b4c07892d8cc0292ddf1a808cad55398c95143 Author: Martin Leung Date: Mon Dec 12 10:56:39 2022 -0500 Revert "drm/amd/display: Speed up DML fast_validate path" This reverts commit 1b5d0e7e15430aecbf2bb0ac634a44aec971895c. It caused corruption in some media players. Tested-by: Daniel Wheeler Reviewed-by: Aric Cyr Reviewed-by: Nevenko Stupar Acked-by: Rodrigo Siqueira Signed-off-by: Martin Leung Signed-off-by: Alex Deucher commit 857aa2beda3789a36de8b0c1beb6104f3e377ab2 Author: Mustapha Ghaddar Date: Wed Dec 7 14:01:36 2022 -0500 drm/amd/display: Update BW alloc after new DMUB logic [WHY] After introducing new DPIA NOTIFICATION we will need to update the exiting BW allocation logic [HOW] Updated the BW alloc source and header files Tested-by: Daniel Wheeler Reviewed-by: Meenakshikumar Somasundaram Acked-by: Rodrigo Siqueira Signed-off-by: Mustapha Ghaddar Signed-off-by: Alex Deucher commit 6b8701be1f66064ca72733c5f6e13748cdbf8397 Author: Konstantin Meskhidze Date: Wed Nov 30 10:50:46 2022 +0800 drm: amd: display: Fix memory leakage This commit fixes memory leakage in dc_construct_ctx() function. Signed-off-by: Konstantin Meskhidze Signed-off-by: Alex Deucher commit 2ab21bb96e97f06861f65534e23f9b48020858fc Author: Deepak R Varma Date: Thu Jan 12 19:21:30 2023 +0530 drm/amd/display: Conversion to bool not necessary A logical evaluation already results in bool. There is no need for using a ternary operator based evaluation and bool conversion of the outcome. Issue identified using boolconv.cocci Coccinelle semantic patch. This was also reported by the Kernel Test Robot. Hence Fixes: 473683a03495 ("drm/amd/display: Create a file dedicated for CRTC") Reported-by: kernel test robot Signed-off-by: Deepak R Varma Signed-off-by: Alex Deucher commit 35a45d630359bf9bcbeb612073c7869afb944436 Author: Jiapeng Chong Date: Thu Jan 12 11:20:49 2023 +0800 drm/amd/display: Remove useless else if The assignment of the else and if branches is the same, so the if else here is redundant, so we remove it. ./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:1951:2-4: WARNING: possible condition with no effect (if == else). Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3719 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit 3e5019ee67760cd61b2a5fd605e1289c2f92d983 Author: Mario Limonciello Date: Wed Jan 11 15:52:31 2023 -0600 drm/amd: Avoid ASSERT for some message failures On DCN314 when resuming from s0i3 an ASSERT is shown indicating that `VBIOSSMC_MSG_SetHardMinDcfclkByFreq` returned `VBIOSSMC_Result_Failed`. This isn't a driver bug; it's a BIOS/configuration bug. To make this easier to triage, add an explicit warning when this issue happens. This matches the behavior utilized for failures with `VBIOSSMC_MSG_TransferTableDram2Smu` configuration. Signed-off-by: Mario Limonciello Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 3c6d1aeb43425bebb52bc569950a03c15604c2d7 Author: hongao Date: Tue Nov 22 19:20:34 2022 +0800 drm/amd/display: Fix set scaling doesn's work [Why] Setting scaling does not correctly update CRTC state. As a result dc stream state's src (composition area) && dest (addressable area) was not calculated as expected. This causes set scaling doesn's work. [How] Correctly update CRTC state when setting scaling property. Reviewed-by: Harry Wentland Tested-by: Rodrigo Siqueira Signed-off-by: hongao Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 450316dc4f41e857c928dfbcc495c3810d4b1928 Author: Richard Fitzgerald Date: Tue Dec 13 15:54:48 2022 +0000 PM: runtime: Document that force_suspend() is incompatible with SMART_SUSPEND pm_runtime_force_suspend() cannot be used with DPM_FLAG_SMART_SUSPEND, so note this in the kerneldoc. If DPM_FLAG_SMART_SUSPEND is set and the PM core cannot skip system resume it will call pm_runtime_active() on the driver. This can lead to an inconsistent state where: pm_runtime_force_suspend() called ->runtime_suspend but device_resume_noirq() called pm_runtime_set_active() This leaves the driver actually suspended but marked as active. Signed-off-by: Richard Fitzgerald Signed-off-by: Rafael J. Wysocki commit 4edc13ae891ab368a3026cde1dbf263331bc6e77 Author: Li RongQing Date: Fri Dec 9 17:25:23 2022 +0800 cpuidle-haltpoll: select haltpoll governor The haltpoll cpuidle driver should select the haltpoll governor, so as to ensure that they work together. Signed-off-by: Li RongQing [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit c3d749609472ba0b217b42ab66f80459847e2bcb Author: Hamza Mahfooz Date: Wed Jan 11 12:25:14 2023 -0500 drm/amd/display: fix possible buffer overflow relating to secure display It is possible that adev->dm.dc->caps.max_links is greater than AMDGPU_MAX_CRTCS. So, to not potentially access unallocated memory use adev->mode_info.num_crtc to do the bounds check instead of adev->dm.dc->caps.max_links. Fixes: 1b11ff764aef ("drm/amd/display: Implement multiple secure display") Fixes: b8ff7e08bab9 ("drm/amd/display: Fix when disabling secure_display") Reviewed-by: Alan Liu Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 3e52e5b077f6c3e26801d87335aac35411744108 Author: Mickaël Salaün Date: Fri Dec 9 20:38:13 2022 +0100 landlock: Explain file descriptor access rights Starting with LANDLOCK_ACCESS_FS_TRUNCATE, it is worth explaining why we choose to restrict access checks at open time. This new "File descriptor access rights" section is complementary to the existing "Inode access rights" section. Add a new guiding principle related to this section. Reviewed-by: Günther Noack Link: https://lore.kernel.org/r/20221209193813.972012-1-mic@digikod.net [mic: Include the latest Günther's suggestion, and fix spelling] Signed-off-by: Mickaël Salaün commit 584d334b139325aa7468fc2eb045864f260298d1 Author: Joerg Roedel Date: Fri Jan 13 19:56:40 2023 +0100 iommu/ipmmu-vmsa: Remove ipmmu_utlb_disable() The function is unused after commit 1b932ceddd19 ("iommu: Remove detach_dev callbacks") and so compilation fails with drivers/iommu/ipmmu-vmsa.c:305:13: error: ‘ipmmu_utlb_disable’ defined but not used [-Werror=unused-function] 305 | static void ipmmu_utlb_disable(struct ipmmu_vmsa_domain *domain, | ^~~~~~~~~~~~~~~~~~ Remove the function to fix the compile error. Fixes: 1b932ceddd19 ("iommu: Remove detach_dev callbacks") Signed-off-by: Joerg Roedel Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20230113185640.8050-1-joro@8bytes.org commit c52f523756608e52ab916fc62b537b90a027d3de Author: Deepak R Varma Date: Wed Jan 11 21:21:59 2023 +0530 drm/i915/fbc: Avoid full proxy f_ops for FBC debug attributes Using DEFINE_SIMPLE_ATTRIBUTE macro with the debugfs_create_file() function adds the overhead of introducing a proxy file operation functions to wrap the original read/write inside file removal protection functions. This adds significant overhead in terms of introducing and managing the proxy factory file operations structure and function wrapping at runtime. As a replacement, a combination of DEFINE_DEBUGFS_ATTRIBUTE macro paired with debugfs_create_file_unsafe() is suggested to be used instead. The DEFINE_DEBUGFS_ATTRIBUTE utilises debugfs_file_get() and debugfs_file_put() wrappers to protect the original read and write function calls for the debug attributes. There is no need for any runtime proxy file operations to be managed by the debugfs core. Following coccicheck make command helped identify this change: make coccicheck M=drivers/gpu/drm/i915/ MODE=patch COCCI=./scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci Signed-off-by: Deepak R Varma Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/5d26e924ec8dea21925c77fa79a2bf2a34cef705.1673451705.git.drv@mailo.com commit 40a7463c7fe75a886ad7fc5f61371add49b34957 Author: Deepak R Varma Date: Wed Jan 11 21:21:20 2023 +0530 drm/i915/display: Avoid full proxy f_ops for DRRS debug attributes Using DEFINE_SIMPLE_ATTRIBUTE macro with the debugfs_create_file() function adds the overhead of introducing a proxy file operation functions to wrap the original read/write inside file removal protection functions. This adds significant overhead in terms of introducing and managing the proxy factory file operations structure and function wrapping at runtime. As a replacement, a combination of DEFINE_DEBUGFS_ATTRIBUTE macro paired with debugfs_create_file_unsafe() is suggested to be used instead. The DEFINE_DEBUGFS_ATTRIBUTE utilises debugfs_file_get() and debugfs_file_put() wrappers to protect the original read and write function calls for the debug attributes. There is no need for any runtime proxy file operations to be managed by the debugfs core. Following coccicheck make command helped identify this change: make coccicheck M=drivers/gpu/drm/i915/ MODE=patch COCCI=./scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci Signed-off-by: Deepak R Varma Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/9e08dd1b5fabf3e4f54dda27dd1d6ea1dbe6c542.1673451705.git.drv@mailo.com commit 43108bb2f34715b40535178ffceba88e5c7d0a0f Author: Neil Armstrong Date: Mon Jan 9 13:53:32 2023 +0100 dt-bindings: phy: convert meson-gxl-usb2-phy.txt to dt-schema Convert the Amlogic Meson GXL USB2 PHY 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-v2-8-36ad050bb625@linaro.org Signed-off-by: Vinod Koul commit 9b9e29af984cbf9840df87ef2c0b51667581cefc Author: Lux Aliaga Date: Sun Jan 8 16:53:33 2023 -0300 phy: qcom-qmp: Add SM6125 UFS PHY support The SM6125 UFS PHY is compatible with the one from SM6115. Add a compatible for it and modify the config from SM6115 to make them compatible with the SC8280XP binding Signed-off-by: Lux Aliaga Reviewed-by: Martin Botka Link: https://lore.kernel.org/r/20230108195336.388349-4-they@mint.lgbt Signed-off-by: Vinod Koul commit 9083b009b7e226dd32a1c9568d9867000f6dd559 Author: Lux Aliaga Date: Sun Jan 8 16:53:32 2023 -0300 dt-bindings: phy: Add QMP UFS PHY compatible for SM6125 Document the QMP UFS PHY compatible for SM6125. Signed-off-by: Lux Aliaga Reviewed-by: Martin Botka Acked-by: Dhruva Gole Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230108195336.388349-3-they@mint.lgbt Signed-off-by: Vinod Koul commit e43ddd0ec2b8d1f01a9b63a8760ae7b74ad7b0c9 Author: Krzysztof Kozlowski Date: Sun Dec 25 12:59:44 2022 +0100 dt-bindings: phy: qcom,sc7180-qmp-usb3-dp-phy: correct clocks per variants Different variants of Qualcomm USB3 DP PHY take different clocks (according to upstream DTS and Linux driver): sc7280-herobrine-crd.dtb: phy-wrapper@88e9000: clocks: [[43, 151], [39, 0], [43, 153]] is too short sc7280-herobrine-crd.dtb: phy-wrapper@88e9000: clock-names:1: 'cfg_ahb' was expected ... sm8250-hdk.dtb: phy@88e9000: clocks: [[46, 185], [44, 0], [46, 187]] is too short sm8250-hdk.dtb: phy@88e9000: clock-names:1: 'cfg_ahb' was expected Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221225115944.55425-2-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit 9fd4dcd9793d9c2ad423bf117ac0da8a8d7c3351 Author: Krzysztof Kozlowski Date: Sun Dec 25 12:59:43 2022 +0100 dt-bindings: phy: qcom,sc7180-qmp-usb3-dp-phy: correct SC7280 compatibles USB3 DP PHY on SC7280 is used with SM8250 fallback: sc7280-herobrine-evoker.dtb: phy-wrapper@88e9000: compatible: ['qcom,sc7280-qmp-usb3-dp-phy', 'qcom,sm8250-qmp-usb3-dp-phy'] is too long Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221225115944.55425-1-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit b1e96b50da7b921be4bc6684682b856cebfe8ad0 Author: Krzysztof Kozlowski Date: Sat Dec 24 16:42:26 2022 +0100 dt-bindings: phy: qcom,qusb2: do not define properties in "if" block It is more readable to define properties in top-level "properties:" and restrict them (if needed) per compatible in the "if" block. Defining properties in "if" block does not work correctly with additionalProperties:false: sc7180-trogdor-pazquel-lte-ti.dtb: phy@88e3000: 'qcom,bias-ctrl-value', 'qcom,charge-ctrl-value', 'qcom,hsdisc-trim-value', 'qcom,imp-res-offset-value', 'qcom,preemphasis-level', 'qcom,preemphasis-width' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221224154226.43417-1-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit 9160fb7c39a1e7456e309dbe360b5abbafd4b295 Author: Krzysztof Kozlowski Date: Fri Dec 23 17:18:32 2022 +0100 dt-bindings: phy: qcom,usb-snps-femto-v2: use fallback compatibles Document SoC-specific compatibles with generic fallback (e.g. qcom,usb-snps-hs-7nm-phy) already used in DTSI. Add SoC-specific compatibles for PHY on SDX55 and SDX65. This disallows usage of the qcom,usb-snps-hs-5nm-phy and qcom,usb-snps-hs-7nm-phy generic compatibles alone. Do not touch remaining two compatibles - qcom,usb-snps-femto-v2-phy and qcom,sc8180x-usb-hs-phy - because there are no upstream users, so not sure what was the intention for them. This fixes warnings like: sa8295p-adp.dtb: phy@88e5000: compatible: 'oneOf' conditional failed, one must be fixed: ['qcom,sc8280xp-usb-hs-phy', 'qcom,usb-snps-hs-5nm-phy'] is too long 'qcom,sc8280xp-usb-hs-phy' is not one of ['qcom,sm8150-usb-hs-phy', 'qcom,sm8250-usb-hs-phy', 'qcom,sm8350-usb-hs-phy', 'qcom,sm8450-usb-hs-phy'] 'qcom,usb-snps-hs-7nm-phy' was expected Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221223161835.112079-1-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit 50133cd3e8dd1494a4f0ed37eb91288e93b9ab06 Author: Yoshihiro Shimoda Date: Mon Dec 26 15:53:16 2022 +0900 phy: renesas: r8a779f0-eth-serdes: Remove retry code in .init() Remove retry code in r8a779f0_eth_serdes_init() because r8a779f0_eth_serdes_chan_setting() was fixed so that no timeout happened in the initializing procedure. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20221226065316.3895480-3-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Vinod Koul commit d2aa66a9926530d7cd85e7863a55c5d25506c492 Author: Yoshihiro Shimoda Date: Mon Dec 26 15:53:15 2022 +0900 phy: renesas: r8a779f0-eth-serdes: Add .power_on() into phy_ops Add r8a779f0_eth_serdes_power_on() to initialize the hardware for each channel from the step 9 or later on the datasheet. In other words, the procedure from the step 1 to 8 is for all channel and it is needed once only. So, the .init() in any channel instance is called, this driver initializes the hardware from step 1 to 8. And then, .power_on() is called, this driver initializes the hardware from step 9 or later. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20221226065316.3895480-2-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Vinod Koul commit 4214f371d546589edc49dc079d5e4044cfa90f28 Author: Krzysztof Kozlowski Date: Thu Dec 22 16:58:05 2022 +0100 dt-bindings: phy: qcom,usb-hsic-phy: convert to DT schema Convert Qualcomm USB HSIC PHY bindings to DT schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221222155805.139284-1-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit c63a2e52d5e08f01140d7b76c08a78e15e801f03 Author: Valentin Schneider Date: Fri Jan 13 17:40:40 2023 +0000 workqueue: Fold rebind_worker() within rebind_workers() !CONFIG_SMP builds complain about rebind_worker() being unused. Its only user, rebind_workers() is indeed only defined for CONFIG_SMP, so just fold the two lines back up there. Link: http://lore.kernel.org/r/20230113143102.2e94d74f@canb.auug.org.au Reported-by: Stephen Rothwell Signed-off-by: Valentin Schneider Signed-off-by: Tejun Heo commit 3cde1ef6f84aba34e3cbc8fd57644781ded617e3 Author: Haotien Hsu Date: Fri Dec 16 12:21:46 2022 +0800 phy: tegra: xusb: Support USB role default mode Support role-switch-default-mode property when usb-role-switch is enabled. Signed-off-by: Haotien Hsu Link: https://lore.kernel.org/r/20221216042146.99307-1-haotienh@nvidia.com Signed-off-by: Vinod Koul commit 724dbe3c2f8a1564e76d73985b02bcefff1cea83 Author: Bhupesh Sharma Date: Tue Dec 13 17:58:43 2022 +0530 phy: qcom-qmp-usb: Add Qualcomm SM6115 / SM4250 USB3 PHY support Enable SM6115 / SM4250 USB3 PHY support by adding the qmp_phy_cfg data. Since this PHY is the same as the one used on QCM2290, reuse the QCM2290 qmp_phy_cfg data already available. Signed-off-by: Bhupesh Sharma Link: https://lore.kernel.org/r/20221213122843.454845-4-bhupesh.sharma@linaro.org Signed-off-by: Vinod Koul commit a9c5f22f66b43b64ef1cb7f7549ad13167fd438a Author: Bhupesh Sharma Date: Tue Dec 13 17:58:42 2022 +0530 phy: qcom-qmp-usb: Fix QSERDES_V3_RX_UCDR_PI_CONTROLS init val As per the Qualcomm QMP v3 PHY programming guide document, QSERDES_V3_RX_UCDR_PI_CONTROLS configuration should be set to an initial configuration value of 0x80. Fix the same. Signed-off-by: Bhupesh Sharma Link: https://lore.kernel.org/r/20221213122843.454845-3-bhupesh.sharma@linaro.org Signed-off-by: Vinod Koul commit e95f49cb06408edbf729492b5a4a63fe15ec6d4c Author: Bhupesh Sharma Date: Tue Dec 13 17:58:41 2022 +0530 dt-bindings: phy: qcom,qmp-usb: Add SM6115 / SM4250 USB3 PHY Add dt-bindings for USB3 PHY found on Qualcomm SM6115 / SM4250 SoC. Signed-off-by: Bhupesh Sharma Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221213122843.454845-2-bhupesh.sharma@linaro.org Signed-off-by: Vinod Koul commit 6f8179c192345b91fb643a6ce4d9396ba6ddd77e Author: Sebastian Czapla Date: Mon Dec 12 10:59:38 2022 +0100 ixgbe: Filter out spurious link up indication Add delayed link state recheck to filter false link up indication caused by transceiver with no fiber cable attached. Signed-off-by: Sebastian Czapla Tested-by: Sunitha Mekala (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 3fe1d0a48d21944e4ba98e2cbdae4b0753bbc25b Author: Jesse Brandeburg Date: Tue Nov 22 15:48:25 2022 -0800 ixgbe: XDP: fix checker warning from rcu pointer The ixgbe driver uses an older style failure mode when initializing the XDP program and the queues. It causes some warnings when running C=2 checking builds (and it's the last one in the ethernet/intel tree). $ make W=1 C=2 M=`pwd`/drivers/net/ethernet/intel modules .../ixgbe_main.c:10301:25: error: incompatible types in comparison expression (different address spaces): .../ixgbe_main.c:10301:25: struct bpf_prog [noderef] __rcu * .../ixgbe_main.c:10301:25: struct bpf_prog * Fix the problem by removing the line that tried to re-xchg "the old_prog pointer" if there was an error, to make this driver act like the other drivers which return the error code without "pointer restoration." Also, update the "copy the pointer" logic to use WRITE_ONCE as many/all the other drivers do, which required making a change in two separate functions that write the xdp_prog variable in the ring. The code here was modeled after the code in i40e/i40e_xdp_setup(). NOTE: Compile-tested only. CC: Maciej Fijalkowski CC: Magnus Karlsson Signed-off-by: Jesse Brandeburg Acked-by: Maciej Fijalkowski Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen commit c5d808691c2cf61c7b85003027ee35267dd74d7b Merge: f66804bf7665f 5827b31d858e3 Author: Mark Brown Date: Fri Jan 13 15:56:45 2023 +0000 spi: SPI core CS delay fixes and additions Merge series from Hector Martin : Commits f6c911f3308c ("spi: dt-bindings: Introduce spi-cs-setup-ns property") and 33a2fde5f77b ("spi: Introduce spi-cs-setup-ns property") introduced a new property to represent the CS setup delay in the device tree, but they have some issues: - The property is only parsed as a 16-bit integer number of nanoseconds, which limits the maximum value to ~65us. This is not a reasonable upper limit, as some devices might need a lot more. - The property name is inconsistent with other delay properties, which use a "*-delay-ns" naming scheme. - Only the setup delay is introduced, but not the related hold and inactive delay times. This series fixes the issues and adds support for the two missing properties. Please pull in the first 3 patches as fixes for 6.2, to avoid introducing a problematic DT API in this release. The last two patches can wait until 6.3, though are probably harmless to throw in as fixes too, since they're trivial. commit 8bc7f397c2d97d333b50d75c060d62e5e5379a02 Merge: c264d5f3ce719 a33ae832bf3f2 Author: Jonathan Corbet Date: Fri Jan 13 09:45:28 2023 -0700 Merge branch 'docs-fixes' into docs-mw Bring the 6.2 fixes into the development branch as well to avoid build problems. commit c264d5f3ce7195712a0e5185baec877116c65b66 Author: Carlos Bilbao Date: Tue Jan 3 10:56:08 2023 -0600 docs/sp_SP: Add process kernel-enforcement-statement.rst translation Translate the following document into Spanish: - process/kernel-enforcement-statement.rst Signed-off-by: Carlos Bilbao Link: https://lore.kernel.org/r/20230103165608.134190-1-carlos.bilbao@amd.com Signed-off-by: Jonathan Corbet commit a2cfa6a24c61bf2178048397f6512ebb15e1ebfe Author: Randy Dunlap Date: Thu Jan 12 22:40:04 2023 -0800 mtd: rawnand: vf610_nfc: use regular comments for functions These comments are not quite in kernel-doc format and they don't need to be, so just use "/*" comment markers for them. This prevents these kernel-doc warnings: drivers/mtd/nand/raw/vf610_nfc.c:210: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Read accessor for internal SRAM buffer drivers/mtd/nand/raw/vf610_nfc.c:245: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Write accessor for internal SRAM buffer Signed-off-by: Randy Dunlap Cc: Stefan Agner 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/20230113064004.24391-1-rdunlap@infradead.org commit 003fe4b9545b83cca4f7a7633695d1f69a0b0011 Author: JaimeLiao Date: Thu Jan 12 10:36:37 2023 +0100 mtd: rawnand: Support for sequential cache reads Add support for sequential cache reads for controllers using the generic core helpers for their fast read/write helpers. Sequential reads may reduce the overhead when accessing physically continuous data by loading in cache the next page while the previous page gets sent out on the NAND bus. The ONFI specification provides the following additional commands to handle sequential cached reads: * 0x31 - READ CACHE SEQUENTIAL: Requires the NAND chip to load the next page into cache while keeping the current cache available for host reads. * 0x3F - READ CACHE END: Tells the NAND chip this is the end of the sequential cache read, the current cache shall remain accessible for the host but no more internal cache loading operation is required. On the bus, a multi page read operation is currently handled like this: 00 -- ADDR1 -- 30 -- WAIT_RDY (tR+tRR) -- DATA1_IN 00 -- ADDR2 -- 30 -- WAIT_RDY (tR+tRR) -- DATA2_IN 00 -- ADDR3 -- 30 -- WAIT_RDY (tR+tRR) -- DATA3_IN Sequential cached reads may instead be achieved with: 00 -- ADDR1 -- 30 -- WAIT_RDY (tR) -- \ 31 -- WAIT_RDY (tRCBSY+tRR) -- DATA1_IN \ 31 -- WAIT_RDY (tRCBSY+tRR) -- DATA2_IN \ 3F -- WAIT_RDY (tRCBSY+tRR) -- DATA3_IN Below are the read speed test results with regular reads and sequential cached reads, on NXP i.MX6 VAR-SOM-SOLO in mapping mode with a NAND chip characterized with the following timings: * tR: 20 µs * tRCBSY: 5 µs * tRR: 20 ns and the following geometry: * device size: 2 MiB * eraseblock size: 128 kiB * page size: 2 kiB ============= Normal read @ 33MHz ================= mtd_speedtest: eraseblock read speed is 15633 KiB/s mtd_speedtest: page read speed is 15515 KiB/s mtd_speedtest: 2 page read speed is 15398 KiB/s =================================================== ========= Sequential cache read @ 33MHz =========== mtd_speedtest: eraseblock read speed is 18285 KiB/s mtd_speedtest: page read speed is 15875 KiB/s mtd_speedtest: 2 page read speed is 16253 KiB/s =================================================== We observe an overall speed improvement of about 5% when reading 2 pages, up to 15% when reading an entire block. This is due to the ~14us gain on each additional page read (tR - (tRCBSY + tRR)). Co-developed-by: Miquel Raynal Signed-off-by: Miquel Raynal Signed-off-by: JaimeLiao Tested-by: Liao Jaime Link: https://lore.kernel.org/linux-mtd/20230112093637.987838-4-miquel.raynal@bootlin.com commit b1f9ffbfda07acee9bdbc77416facf606647b523 Author: Miquel Raynal Date: Thu Jan 12 10:36:36 2023 +0100 mtd: rawnand: Prepare the late addition of supported operation checks Add an empty envelope just to show how to add additional checks for new operations. This is going to be used for sequential cached reads, which require the page size to be known (and the discovery to be over), hence the "late" designation. Signed-off-by: Miquel Raynal Tested-by: Liao Jaime Link: https://lore.kernel.org/linux-mtd/20230112093637.987838-3-miquel.raynal@bootlin.com commit 9f820fc0651c32f8dde26b8e3ad93e1b9fdb62c4 Author: Miquel Raynal Date: Thu Jan 12 10:36:35 2023 +0100 mtd: rawnand: Check the data only read pattern only once Instead of checking if a pattern is supported each time we need it, let's create a bitfield that only the core would be allowed to fill at startup time. The core and the individual drivers may then use it in order to check what operation they should use. This bitfield is supposed to grow over time. Signed-off-by: Miquel Raynal Tested-by: Liao Jaime Link: https://lore.kernel.org/linux-mtd/20230112093637.987838-2-miquel.raynal@bootlin.com commit 8763a30bc15b36c3bd90d6da7272d972b995f318 Author: Kees Cook Date: Fri Jan 6 12:06:04 2023 -0800 docs: deprecated.rst: Add note about DECLARE_FLEX_ARRAY() usage There wasn't any mention of when/where DECLARE_FLEX_ARRAY() should be used, so add the rationale and an example to the deprecation docs. Suggested-by: Vincent Mailhol Cc: "Gustavo A. R. Silva" Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20230106200600.never.735-kees@kernel.org [jc: minor wording tweaks] Signed-off-by: Jonathan Corbet commit 5a37deab42ad1630b39bf9bca13aa55e94310b01 Author: Federico Vaga Date: Mon Jan 2 19:37:16 2023 +0100 doc:it_IT: add translation for botching-up-ioctl.rst This patch adds the translation for the botching up ioctl document. Signed-off-by: Federico Vaga Link: https://lore.kernel.org/r/20230102183716.9698-1-federico.vaga@vaga.pv.it Signed-off-by: Jonathan Corbet commit 15b0f76d266010598a9907383b75598c1c0ad7ca Author: Fabio Fantoni Date: Sun Jan 1 16:55:48 2023 +0100 doc:it_IT: fix of 2 typos Fix of 2 typos spotted reading documentation in italian Signed-off-by: Fabio Fantoni Acked-by: Federico Vaga Link: https://lore.kernel.org/r/20230101155548.12350-1-fantonifabio@tiscali.it Signed-off-by: Jonathan Corbet commit 1d2ed9234c85ab4c0f4429134592957abf18c5b5 Author: Conor Dooley Date: Sat Dec 31 15:23:21 2022 +0000 Documentation: process: Document suitability of Proton Mail for kernel development Proton Mail automatically picks up PGP keys for those with kernel.org accounts (and other domains!) which provide WKD for their users & uses them to encrypt emails, including patches. Document the behaviour & Proton Mail's unsuitability for kernel development. Reviewed-by: Konstantin Ryabitsev Reviewed-by: Mark Brown Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20221231152320.1340874-1-conor@kernel.org Signed-off-by: Jonathan Corbet commit 3760fe201c18945c1692d200b94658092a991bac Author: Federico Vaga Date: Sat Dec 31 14:08:49 2022 +0100 doc:it_IT: align Italian documentation Translation for the following patches commit da4288b95baa ("scripts/check-local-export: avoid 'wait $!' for process substitution") commit 5372de4e4545 ("docs/doc-guide: Put meta title for kernel-doc HTML page") commit 4d627ef12b40 ("docs/doc-guide: Mention make variable SPHINXDIRS") commit 7c43214dddfd ("docs/doc-guide: Add footnote on Inkscape for better images in PDF documents") commit 615041d42a1a ("docs: kernel-docs: shorten the lengthy doc title") commit cbf4adfd4d19 ("Documentation: process: Update email client instructions for Thunderbird") commit e72b3b9810dd ("maintainer-pgp-guide: minor wording tweaks") commit ea522496afa1 ("Documentation: process: replace outdated LTS table w/ link") commit 93431e0607e5 ("Replace HTTP links with HTTPS ones: documentation") commit e648174b53f1 ("Documentation: Fix spelling mistake in hacking.rst") commit 602684adb42a ("docs: Update version number from 5.x to 6.x in README.rst") commit 489876063fb1 ("docs: add a man-pages link to the front page") commit 0c7b4366f1ab ("docs: Rewrite the front page") Signed-off-by: Federico Vaga Link: https://lore.kernel.org/r/20221231130849.4675-1-federico.vaga@vaga.pv.it Signed-off-by: Jonathan Corbet commit 54b0ea95f2da23d0e9be339f0b5e6f3a4c77ecb9 Author: Federico Vaga Date: Fri Dec 30 18:24:56 2022 +0100 doc:it_IT: fix typo in email-client `usato` becomes `usando` Signed-off-by: Federico Vaga Link: https://lore.kernel.org/r/20221230172456.58745-1-federico.vaga@vaga.pv.it Signed-off-by: Jonathan Corbet commit 533797974d101075c9fc92381c1f73ccdb23b924 Author: Federico Vaga Date: Fri Dec 30 18:23:28 2022 +0100 doc: fix typo in botching up ioctls The type contained a typo `uintprt` -> `uintptr` Signed-off-by: Federico Vaga Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20221230172328.58612-1-federico.vaga@vaga.pv.it Signed-off-by: Jonathan Corbet commit 080920e52148b4fbbf9360d5345fdcd7846e4841 Author: Vasant Hegde Date: Wed Jan 11 12:15:03 2023 +0000 iommu/amd: Fix error handling for pdev_pri_ats_enable() Current code throws kernel warning if it fails to enable pasid/pri [1]. Do not call pci_disable_[pasid/pri] if pci_enable_[pasid/pri] failed. [1] https://lore.kernel.org/linux-iommu/15d0f9ff-2a56-b3e9-5b45-e6b23300ae3b@leemhuis.info/ Reported-by: Matt Fagnani Signed-off-by: Vasant Hegde Reviewed-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20230111121503.5931-1-vasant.hegde@amd.com Signed-off-by: Joerg Roedel commit ba9bee7f59fd0687837222bc7b79dd9a5d127d0b Author: Vasant Hegde Date: Thu Jan 5 09:17:28 2023 +0000 iommu/amd: Do not allocate io_pgtable_ops for passthrough domain In passthrough mode we do not use IOMMU page table. Hence we don't need to allocate io_pgtable_ops. Signed-off-by: Vasant Hegde Reviewed-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20230105091728.42469-1-vasant.hegde@amd.com Signed-off-by: Joerg Roedel commit d286a58bc8f4d5cf3246481b4e38e4c0c65550ac Author: Robin Murphy Date: Thu Jan 12 19:59:47 2023 +0000 iommu: Tidy up io-pgtable dependencies Some io-pgtable implementations, and thus their users too, carry a slightly odd dependency to get around the GENERIC_ATOMIC64 version of cmpxchg64() often failing to compile. Since this is a functional dependency, it's a bit misleading and untidy to tie it explicitly to COMPILE_TEST while assuming that it's also implied by the other platform/architecture options. Make things clearer by separating these functional dependencies into distinct statements from those controlling visibility, and since they do look a bit non-obvious to the uninitiated, also commenting them for good measure. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/51d8c78e2ecc6696ac5907526580209ea6da167f.1673553587.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel commit 72c70ceeaf59330b1d63380add768bdbdeb24b7c Author: Sean Christopherson Date: Fri Jan 6 01:13:06 2023 +0000 KVM: x86: Add helpers to recalc physical vs. logical optimized APIC maps Move the guts of kvm_recalculate_apic_map()'s main loop to two separate helpers to handle recalculating the physical and logical pieces of the optimized map. Having 100+ lines of code in the for-loop makes it hard to understand what is being calculated where. No functional change intended. Suggested-by: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20230106011306.85230-34-seanjc@google.com> Signed-off-by: Paolo Bonzini commit d471bd853d38117c90ec02ecc51b3ca731674745 Author: Greg Edwards Date: Fri Jan 6 01:13:05 2023 +0000 KVM: x86: Allow APICv APIC ID inhibit to be cleared Legacy kernels prior to commit 4399c03c6780 ("x86/apic: Remove verify_local_APIC()") write the APIC ID of the boot CPU twice to verify a functioning local APIC. This results in APIC acceleration inhibited on these kernels for reason APICV_INHIBIT_REASON_APIC_ID_MODIFIED. Allow the APICV_INHIBIT_REASON_APIC_ID_MODIFIED inhibit reason to be cleared if/when all APICs in xAPIC mode set their APIC ID back to the expected vcpu_id value. Fold the functionality previously in kvm_lapic_xapic_id_updated() into kvm_recalculate_apic_map(), as this allows examining all APICs in one pass. Fixes: 3743c2f02517 ("KVM: x86: inhibit APICv/AVIC on changes to APIC ID or APIC base") Signed-off-by: Greg Edwards Link: https://lore.kernel.org/r/20221117183247.94314-1-gedwards@ddn.com Signed-off-by: Sean Christopherson Message-Id: <20230106011306.85230-33-seanjc@google.com> Signed-off-by: Paolo Bonzini commit b3f257a846960d06bdaa893dbee100189fbf2234 Author: Sean Christopherson Date: Fri Jan 6 01:13:04 2023 +0000 KVM: x86: Track required APICv inhibits with variable, not callback Track the per-vendor required APICv inhibits with a variable instead of calling into vendor code every time KVM wants to query the set of required inhibits. The required inhibits are a property of the vendor's virtualization architecture, i.e. are 100% static. Using a variable allows the compiler to inline the check, e.g. generate a single-uop TEST+Jcc, and thus eliminates any desire to avoid checking inhibits for performance reasons. No functional change intended. Reviewed-by: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20230106011306.85230-32-seanjc@google.com> Signed-off-by: Paolo Bonzini commit e2ed3e64a2bd2493469bec0ad205b594a98341a6 Author: Sean Christopherson Date: Fri Jan 6 01:13:03 2023 +0000 Revert "KVM: SVM: Do not throw warning when calling avic_vcpu_load on a running vcpu" Turns out that some warnings exist for good reasons. Restore the warning in avic_vcpu_load() that guards against calling avic_vcpu_load() on a running vCPU now that KVM avoids doing so when switching between x2APIC and xAPIC. The entire point of the WARN is to highlight that KVM should not be reloading an AVIC. Opportunistically convert the WARN_ON() to WARN_ON_ONCE() to avoid spamming the kernel if it does fire. This reverts commit c0caeee65af3944b7b8abbf566e7cc1fae15c775. Reviewed-by: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20230106011306.85230-31-seanjc@google.com> Signed-off-by: Paolo Bonzini commit a790e338c7c4971f83e680e59a91d1b91263c8f7 Author: Sean Christopherson Date: Fri Jan 6 01:13:02 2023 +0000 KVM: SVM: Ignore writes to Remote Read Data on AVIC write traps Drop writes to APIC_RRR, a.k.a. Remote Read Data Register, on AVIC unaccelerated write traps. The register is read-only and isn't emulated by KVM. Sending the register through kvm_apic_write_nodecode() will result in screaming when x2APIC is enabled due to the unexpected failure to retrieve the MSR (KVM expects that only "legal" accesses will trap). Fixes: 4d1d7942e36a ("KVM: SVM: Introduce logic to (de)activate x2AVIC mode") Signed-off-by: Sean Christopherson Reviewed-by: Maxim Levitsky Message-Id: <20230106011306.85230-30-seanjc@google.com> Signed-off-by: Paolo Bonzini commit bbfc7aa62a4a9baff264f1fd91175b6249843984 Author: Sean Christopherson Date: Fri Jan 6 01:13:01 2023 +0000 KVM: SVM: Handle multiple logical targets in AVIC kick fastpath Iterate over all target logical IDs in the AVIC kick fastpath instead of bailing if there is more than one target. Now that KVM inhibits AVIC if vCPUs aren't mapped 1:1 with logical IDs, each bit in the destination is guaranteed to match to at most one vCPU, i.e. iterating over the bitmap is guaranteed to kick each valid target exactly once. Reviewed-by: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20230106011306.85230-29-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 1808c950955dbbf8a0f83c96e720ec700863137e Author: Sean Christopherson Date: Fri Jan 6 01:13:00 2023 +0000 KVM: SVM: Require logical ID to be power-of-2 for AVIC entry Do not modify AVIC's logical ID table if the logical ID portion of the LDR is not a power-of-2, i.e. if the LDR has multiple bits set. Taking only the first bit means that KVM will fail to match MDAs that intersect with "higher" bits in the "ID" The "ID" acts as a bitmap, but is referred to as an ID because there's an implicit, unenforced "requirement" that software only set one bit. This edge case is arguably out-of-spec behavior, but KVM cleanly handles it in all other cases, e.g. the optimized logical map (and AVIC!) is also disabled in this scenario. Refactor the code to consolidate the checks, and so that the code looks more like avic_kick_target_vcpus_fast(). Fixes: 18f40c53e10f ("svm: Add VMEXIT handlers for AVIC") Cc: Suravee Suthikulpanit Cc: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20230106011306.85230-28-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 4f160b7bd481650b15c46808515c67281492ff1a Author: Sean Christopherson Date: Fri Jan 6 01:12:59 2023 +0000 KVM: SVM: Update svm->ldr_reg cache even if LDR is "bad" Update SVM's cache of the LDR even if the new value is "bad". Leaving stale information in the cache can result in KVM missing updates and/or invalidating the wrong entry, e.g. if avic_invalidate_logical_id_entry() is triggered after a different vCPU has "claimed" the old LDR. Fixes: 18f40c53e10f ("svm: Add VMEXIT handlers for AVIC") Reviewed-by: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20230106011306.85230-27-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 1ba59a44546797432d4c2fd2854281e3f4514d2d Author: Sean Christopherson Date: Fri Jan 6 01:12:58 2023 +0000 KVM: SVM: Always update local APIC on writes to logical dest register Update the vCPU's local (virtual) APIC on LDR writes even if the write "fails". The APIC needs to recalc the optimized logical map even if the LDR is invalid or zero, e.g. if the guest clears its LDR, the optimized map will be left as is and the vCPU will receive interrupts using its old LDR. Fixes: 18f40c53e10f ("svm: Add VMEXIT handlers for AVIC") Reviewed-by: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20230106011306.85230-26-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 9a364857ab4f8d59d417eca88a39ddf9b308237b Author: Sean Christopherson Date: Fri Jan 6 01:12:57 2023 +0000 KVM: SVM: Inhibit AVIC if vCPUs are aliased in logical mode Inhibit SVM's AVIC if multiple vCPUs are aliased to the same logical ID. Architecturally, all CPUs whose logical ID matches the MDA are supposed to receive the interrupt; overwriting existing entries in AVIC's logical=>physical map can result in missed IPIs. Fixes: 18f40c53e10f ("svm: Add VMEXIT handlers for AVIC") Reviewed-by: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20230106011306.85230-25-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 5063c41bebac8d18a83ac7b5d54782d73a9ab5f7 Author: Sean Christopherson Date: Fri Jan 6 01:12:56 2023 +0000 KVM: x86: Inhibit APICv/AVIC if the optimized physical map is disabled Inhibit APICv/AVIC if the optimized physical map is disabled so that KVM KVM provides consistent APIC behavior if xAPIC IDs are aliased due to vcpu_id being truncated and the x2APIC hotplug hack isn't enabled. If the hotplug hack is disabled, events that are emulated by KVM will follow architectural behavior (all matching vCPUs receive events, even if the "match" is due to truncation), whereas APICv and AVIC will deliver events only to the first matching vCPU, i.e. the vCPU that matches without truncation. Note, the "extra" inhibit is needed because KVM deliberately ignores mismatches due to truncation when applying the APIC_ID_MODIFIED inhibit so that large VMs (>255 vCPUs) can run with APICv/AVIC. Reviewed-by: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20230106011306.85230-24-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 5b84b0291702ea84db2c9e55696cdcdd95f9cf1a Author: Sean Christopherson Date: Fri Jan 6 01:12:55 2023 +0000 KVM: x86: Honor architectural behavior for aliased 8-bit APIC IDs Apply KVM's hotplug hack if and only if userspace has enabled 32-bit IDs for x2APIC. If 32-bit IDs are not enabled, disable the optimized map to honor x86 architectural behavior if multiple vCPUs shared a physical APIC ID. As called out in the changelog that added the hack, all CPUs whose (possibly truncated) APIC ID matches the target are supposed to receive the IPI. KVM intentionally differs from real hardware, because real hardware (Knights Landing) does just "x2apic_id & 0xff" to decide whether to accept the interrupt in xAPIC mode and it can deliver one interrupt to more than one physical destination, e.g. 0x123 to 0x123 and 0x23. Applying the hack even when x2APIC is not fully enabled means KVM doesn't correctly handle scenarios where the guest has aliased xAPIC IDs across multiple vCPUs, as only the vCPU with the lowest vCPU ID will receive any interrupts. It's extremely unlikely any real world guest aliases APIC IDs, or even modifies APIC IDs, but KVM's behavior is arbitrary, e.g. the lowest vCPU ID "wins" regardless of which vCPU is "aliasing" and which vCPU is "normal". Furthermore, the hack is _not_ guaranteed to work! The hack works if and only if the optimized APIC map is successfully allocated. If the map allocation fails (unlikely), KVM will fall back to its unoptimized behavior, which _does_ honor the architectural behavior. Pivot on 32-bit x2APIC IDs being enabled as that is required to take advantage of the hotplug hack (see kvm_apic_state_fixup()), i.e. won't break existing setups unless they are way, way off in the weeds. And an entry in KVM's errata to document the hack. Alternatively, KVM could provide an actual x2APIC quirk and document the hack that way, but there's unlikely to ever be a use case for disabling the quirk. Go the errata route to avoid having to validate a quirk no one cares about. Fixes: 5bd5db385b3e ("KVM: x86: allow hotplug of VCPU with APIC ID over 0xff") Reviewed-by: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20230106011306.85230-23-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 2970052481b9f93e1849f5d4a1065e9fafc8d662 Author: Sean Christopherson Date: Fri Jan 6 01:12:54 2023 +0000 KVM: x86: Disable APIC logical map if vCPUs are aliased in logical mode Disable the optimized APIC logical map if multiple vCPUs are aliased to the same logical ID. Architecturally, all CPUs whose logical ID matches the MDA are supposed to receive the interrupt; overwriting existing map entries can result in missed IPIs. Fixes: 1e08ec4a130e ("KVM: optimize apic interrupt delivery") Signed-off-by: Sean Christopherson Reviewed-by: Maxim Levitsky Message-Id: <20230106011306.85230-22-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 2bf934aadcac310810cc4fa120d1b576cae7e9da Author: Sean Christopherson Date: Fri Jan 6 01:12:53 2023 +0000 KVM: x86: Disable APIC logical map if logical ID covers multiple MDAs Disable the optimized APIC logical map if a logical ID covers multiple MDAs, i.e. if a vCPU has multiple bits set in its ID. In logical mode, events match if "ID & MDA != 0", i.e. creating an entry for only the first bit can cause interrupts to be missed. Note, creating an entry for every bit is also wrong as KVM would generate IPIs for every matching bit. It would be possible to teach KVM to play nice with this edge case, but it is very much an edge case and probably not used in any real world OS, i.e. it's not worth optimizing. Fixes: 1e08ec4a130e ("KVM: optimize apic interrupt delivery") Signed-off-by: Sean Christopherson Reviewed-by: Maxim Levitsky Message-Id: <20230106011306.85230-21-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 76e527509d37a15ff1714ddd003384f5f25fd3fc Author: Sean Christopherson Date: Fri Jan 6 01:12:52 2023 +0000 KVM: x86: Skip redundant x2APIC logical mode optimized cluster setup Skip the optimized cluster[] setup for x2APIC logical mode, as KVM reuses the optimized map's phys_map[] and doesn't actually need to insert the target apic into the cluster[]. The LDR is derived from the x2APIC ID, and both are read-only in KVM, thus the vCPU's cluster[ldr] is guaranteed to be the same entry as the vCPU's phys_map[x2apic_id] entry. Skipping the unnecessary setup will allow a future fix for aliased xAPIC logical IDs to simply require that cluster[ldr] is non-NULL, i.e. won't have to special case x2APIC. Alternatively, the future check could allow "cluster[ldr] == apic", but that ends up being terribly confusing because cluster[ldr] is only set at the very end, i.e. it's only possible due to x2APIC's shenanigans. Another alternative would be to send x2APIC down a separate path _after_ the calculation and then assert that all of the above, but the resulting code is rather messy, and it's arguably unnecessary since asserting that the actual LDR matches the expected LDR means that simply testing that interrupts are delivered correctly provides the same guarantees. Reported-by: Suravee Suthikulpanit Reviewed-by: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20230106011306.85230-20-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 35366901017ca20ccf72365d2922361459cb3121 Author: Sean Christopherson Date: Fri Jan 6 01:12:51 2023 +0000 KVM: x86: Explicitly track all possibilities for APIC map's logical modes Track all possibilities for the optimized APIC map's logical modes instead of overloading the pseudo-bitmap and treating any "unknown" value as "invalid". As documented by the now-stale comment above the mode values, the values did have meaning when the optimized map was originally added. That dependent logical was removed by commit e45115b62f9a ("KVM: x86: use physical LAPIC array for logical x2APIC"), but the obfuscated behavior and its comment were left behind. Opportunistically rename "mode" to "logical_mode", partly to make it clear that the "disabled" case applies only to the logical map, but also to prove that there is no lurking code that expects "mode" to be a bitmap. Functionally, this is a glorified nop. Signed-off-by: Sean Christopherson Reviewed-by: Maxim Levitsky Message-Id: <20230106011306.85230-19-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 6ea567ca003ab05adef28459bde1495a250dd7b7 Author: Sean Christopherson Date: Fri Jan 6 01:12:50 2023 +0000 KVM: x86: Explicitly skip optimized logical map setup if vCPU's LDR==0 Explicitly skip the optimized map setup if the vCPU's LDR is '0', i.e. if the vCPU will never respond to logical mode interrupts. KVM already skips setup in this case, but relies on kvm_apic_map_get_logical_dest() to generate mask==0. KVM still needs the mask=0 check as a non-zero LDR can yield mask==0 depending on the mode, but explicitly handling the LDR will make it simpler to clean up the logical mode tracking in the future. No functional change intended. Reviewed-by: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20230106011306.85230-18-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 1d22a597b3e9fd4d0a7e921ce4d32321bcad8576 Author: Sean Christopherson Date: Fri Jan 6 01:12:49 2023 +0000 KVM: SVM: Add helper to perform final AVIC "kick" of single vCPU Add a helper to perform the final kick, two instances of the ICR decoding is one too many. No functional change intended. Signed-off-by: Sean Christopherson Reviewed-by: Maxim Levitsky Message-Id: <20230106011306.85230-17-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 8578e4512d873b0aa9805e9772162578d54bb6a1 Author: Sean Christopherson Date: Fri Jan 6 01:12:48 2023 +0000 KVM: SVM: Document that vCPU ID == APIC ID in AVIC kick fastpatch Document that AVIC is inhibited if any vCPU's APIC ID diverges from its vCPU ID, i.e. that there's no need to check for a destination match in the AVIC kick fast path. Opportunistically tweak comments to remove "guest bug", as that suggests KVM is punting on error handling, which is not the case. Targeting a non-existent vCPU or no vCPUs _may_ be a guest software bug, but whether or not it's a guest bug is irrelevant. Such behavior is architecturally legal and thus needs to faithfully emulated by KVM (and it is). Signed-off-by: Sean Christopherson Reviewed-by: Maxim Levitsky Message-Id: <20230106011306.85230-16-seanjc@google.com> Signed-off-by: Paolo Bonzini commit f9829c9076616afa4f4811f2fc2992a734593d59 Author: Sean Christopherson Date: Fri Jan 6 01:12:47 2023 +0000 Revert "KVM: SVM: Use target APIC ID to complete x2AVIC IRQs when possible" Due to a likely mismerge of patches, KVM ended up with a superfluous commit to "enable" AVIC's fast path for x2AVIC mode. Even worse, the superfluous commit has several bugs and creates a nasty local shadow variable. Rather than fix the bugs piece-by-piece[*] to achieve the same end result, revert the patch wholesale. Opportunistically add a comment documenting the x2AVIC dependencies. This reverts commit 8c9e639da435874fb845c4d296ce55664071ea7a. [*] https://lore.kernel.org/all/YxEP7ZBRIuFWhnYJ@google.com Fixes: 8c9e639da435 ("KVM: SVM: Use target APIC ID to complete x2AVIC IRQs when possible") Suggested-by: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20230106011306.85230-15-seanjc@google.com> Signed-off-by: Paolo Bonzini commit da3fb46d226a8c1b61d309f3b99056c18b8d93e2 Author: Suravee Suthikulpanit Date: Fri Jan 6 01:12:46 2023 +0000 KVM: SVM: Fix x2APIC Logical ID calculation for avic_kick_target_vcpus_fast For X2APIC ID in cluster mode, the logical ID is bit [15:0]. Fixes: 603ccef42ce9 ("KVM: x86: SVM: fix avic_kick_target_vcpus_fast") Cc: Maxim Levitsky Signed-off-by: Suravee Suthikulpanit Reviewed-by: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20230106011306.85230-14-seanjc@google.com> Signed-off-by: Paolo Bonzini commit a879a88e05f36153987ad9836e85009eb4114346 Author: Sean Christopherson Date: Fri Jan 6 01:12:45 2023 +0000 KVM: SVM: Compute dest based on sender's x2APIC status for AVIC kick Compute the destination from ICRH using the sender's x2APIC status, not each (potential) target's x2APIC status. Fixes: c514d3a348ac ("KVM: SVM: Update avic_kick_target_vcpus to support 32-bit APIC ID") Cc: Li RongQing Signed-off-by: Sean Christopherson Reviewed-by: Li RongQing Reviewed-by: Maxim Levitsky Message-Id: <20230106011306.85230-13-seanjc@google.com> Signed-off-by: Paolo Bonzini commit f628a34a9d5228d963e3c2f15e6ee92856a0a66b Author: Sean Christopherson Date: Fri Jan 6 01:12:44 2023 +0000 KVM: SVM: Replace "avic_mode" enum with "x2avic_enabled" boolean Replace the "avic_mode" enum with a single bool to track whether or not x2AVIC is enabled. KVM already has "apicv_enabled" that tracks if any flavor of AVIC is enabled, i.e. AVIC_MODE_NONE and AVIC_MODE_X1 are redundant and unnecessary noise. No functional change intended. Signed-off-by: Sean Christopherson Reviewed-by: Maxim Levitsky Message-Id: <20230106011306.85230-12-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 2008fab3453019fd89fa06029be95d30e1a8e66c Author: Sean Christopherson Date: Fri Jan 6 01:12:43 2023 +0000 KVM: x86: Inhibit APIC memslot if x2APIC and AVIC are enabled Free the APIC access page memslot if any vCPU enables x2APIC and SVM's AVIC is enabled to prevent accesses to the virtual APIC on vCPUs with x2APIC enabled. On AMD, if its "hybrid" mode is enabled (AVIC is enabled when x2APIC is enabled even without x2AVIC support), keeping the APIC access page memslot results in the guest being able to access the virtual APIC page as x2APIC is fully emulated by KVM. I.e. hardware isn't aware that the guest is operating in x2APIC mode. Exempt nested SVM's update of APICv state from the new logic as x2APIC can't be toggled on VM-Exit. In practice, invoking the x2APIC logic should be harmless precisely because it should be a glorified nop, but play it safe to avoid latent bugs, e.g. with dropping the vCPU's SRCU lock. Intel doesn't suffer from the same issue as APICv has fully independent VMCS controls for xAPIC vs. x2APIC virtualization. Technically, KVM should provide bus error semantics and not memory semantics for the APIC page when x2APIC is enabled, but KVM already provides memory semantics in other scenarios, e.g. if APICv/AVIC is enabled and the APIC is hardware disabled (via APIC_BASE MSR). Note, checking apic_access_memslot_enabled without taking locks relies it being set during vCPU creation (before kvm_vcpu_reset()). vCPUs can race to set the inhibit and delete the memslot, i.e. can get false positives, but can't get false negatives as apic_access_memslot_enabled can't be toggled "on" once any vCPU reaches KVM_RUN. Opportunistically drop the "can" while updating avic_activate_vmcb()'s comment, i.e. to state that KVM _does_ support the hybrid mode. Move the "Note:" down a line to conform to preferred kernel/KVM multi-line comment style. Opportunistically update the apicv_update_lock comment, as it isn't actually used to protect apic_access_memslot_enabled (which is protected by slots_lock). Fixes: 0e311d33bfbe ("KVM: SVM: Introduce hybrid-AVIC mode") Signed-off-by: Sean Christopherson Reviewed-by: Maxim Levitsky Message-Id: <20230106011306.85230-11-seanjc@google.com> Signed-off-by: Paolo Bonzini commit c482f2cebe2d169c43c75ca769bdeba16fce6036 Author: Sean Christopherson Date: Fri Jan 6 01:12:42 2023 +0000 KVM: x86: Move APIC access page helper to common x86 code Move the APIC access page allocation helper function to common x86 code, the allocation routine is virtually identical between APICv (VMX) and AVIC (SVM). Keep APICv's gfn_to_page() + put_page() sequence, which verifies that a backing page can be allocated, i.e. that the system isn't under heavy memory pressure. Forcing the backing page to be populated isn't strictly necessary, but skipping the effective prefetch only delays the inevitable. Reviewed-by: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20230106011306.85230-10-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 1459f5c6b8b8dfbc16adf4844421d46459c9ab1f Author: Sean Christopherson Date: Fri Jan 6 01:12:41 2023 +0000 KVM: x86: Handle APICv updates for APIC "mode" changes via request Use KVM_REQ_UPDATE_APICV to react to APIC "mode" changes, i.e. to handle the APIC being hardware enabled/disabled and/or x2APIC being toggled. There is no need to immediately update APICv state, the only requirement is that APICv be updating prior to the next VM-Enter. Making a request will allow piggybacking KVM_REQ_UPDATE_APICV to "inhibit" the APICv memslot when x2APIC is enabled. Doing that directly from kvm_lapic_set_base() isn't feasible as KVM's SRCU must not be held when modifying memslots (to avoid deadlock), and may or may not be held when kvm_lapic_set_base() is called, i.e. KVM can't do the right thing without tracking that is rightly buried behind CONFIG_PROVE_RCU=y. Suggested-by: Maxim Levitsky Reviewed-by: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20230106011306.85230-9-seanjc@google.com> Signed-off-by: Paolo Bonzini commit e0bead97e7590da888148feb9e9133bc278c534b Author: Sean Christopherson Date: Fri Jan 6 01:12:40 2023 +0000 KVM: SVM: Don't put/load AVIC when setting virtual APIC mode Move the VMCB updates from avic_refresh_apicv_exec_ctrl() into avic_set_virtual_apic_mode() and invert the dependency being said functions to avoid calling avic_vcpu_{load,put}() and avic_set_pi_irte_mode() when "only" setting the virtual APIC mode. avic_set_virtual_apic_mode() is invoked from common x86 with preemption enabled, which makes avic_vcpu_{load,put}() unhappy. Luckily, calling those and updating IRTE stuff is unnecessary as the only reason avic_set_virtual_apic_mode() is called is to handle transitions between xAPIC and x2APIC that don't also toggle APICv activation. And if activation doesn't change, there's no need to fiddle with the physical APIC ID table or update IRTE. The "full" refresh is guaranteed to be called if activation changes in this case as the only call to the "set" path is: kvm_vcpu_update_apicv(vcpu); static_call_cond(kvm_x86_set_virtual_apic_mode)(vcpu); and kvm_vcpu_update_apicv() invokes the refresh if activation changes: if (apic->apicv_active == activate) goto out; apic->apicv_active = activate; kvm_apic_update_apicv(vcpu); static_call(kvm_x86_refresh_apicv_exec_ctrl)(vcpu); Rename the helper to reflect that it is also called during "refresh". WARNING: CPU: 183 PID: 49186 at arch/x86/kvm/svm/avic.c:1081 avic_vcpu_put+0xde/0xf0 [kvm_amd] CPU: 183 PID: 49186 Comm: stable Tainted: G O 6.0.0-smp--fcddbca45f0a-sink #34 Hardware name: Google, Inc. Arcadia_IT_80/Arcadia_IT_80, BIOS 10.48.0 01/27/2022 RIP: 0010:avic_vcpu_put+0xde/0xf0 [kvm_amd] avic_refresh_apicv_exec_ctrl+0x142/0x1c0 [kvm_amd] avic_set_virtual_apic_mode+0x5a/0x70 [kvm_amd] kvm_lapic_set_base+0x149/0x1a0 [kvm] kvm_set_apic_base+0x8f/0xd0 [kvm] kvm_set_msr_common+0xa3a/0xdc0 [kvm] svm_set_msr+0x364/0x6b0 [kvm_amd] __kvm_set_msr+0xb8/0x1c0 [kvm] kvm_emulate_wrmsr+0x58/0x1d0 [kvm] msr_interception+0x1c/0x30 [kvm_amd] svm_invoke_exit_handler+0x31/0x100 [kvm_amd] svm_handle_exit+0xfc/0x160 [kvm_amd] vcpu_enter_guest+0x21bb/0x23e0 [kvm] vcpu_run+0x92/0x450 [kvm] kvm_arch_vcpu_ioctl_run+0x43e/0x6e0 [kvm] kvm_vcpu_ioctl+0x559/0x620 [kvm] Fixes: 05c4fe8c1bd9 ("KVM: SVM: Refresh AVIC configuration when changing APIC mode") Cc: stable@vger.kernel.org Cc: Suravee Suthikulpanit Reviewed-by: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20230106011306.85230-8-seanjc@google.com> Signed-off-by: Paolo Bonzini commit f651a008954803d7bb2d85b7042d0fd46133d782 Author: Sean Christopherson Date: Fri Jan 6 01:12:39 2023 +0000 KVM: x86: Don't inhibit APICv/AVIC if xAPIC ID mismatch is due to 32-bit ID Truncate the vcpu_id, a.k.a. x2APIC ID, to an 8-bit value when comparing it against the xAPIC ID to avoid false positives (sort of) on systems with >255 CPUs, i.e. with IDs that don't fit into a u8. The intent of APIC_ID_MODIFIED is to inhibit APICv/AVIC when the xAPIC is changed from it's original value, The mismatch isn't technically a false positive, as architecturally the xAPIC IDs do end up being aliased in this scenario, and neither APICv nor AVIC correctly handles IPI virtualization when there is aliasing. However, KVM already deliberately does not honor the aliasing behavior that results when an x2APIC ID gets truncated to an xAPIC ID. I.e. the resulting APICv/AVIC behavior is aligned with KVM's existing behavior when KVM's x2APIC hotplug hack is effectively enabled. If/when KVM provides a way to disable the hotplug hack, APICv/AVIC can piggyback whatever logic disables the optimized APIC map (which is what provides the hotplug hack), i.e. so that KVM's optimized map and APIC virtualization yield the same behavior. For now, fix the immediate problem of APIC virtualization being disabled for large VMs, which is a much more pressing issue than ensuring KVM honors architectural behavior for APIC ID aliasing. Fixes: 3743c2f02517 ("KVM: x86: inhibit APICv/AVIC on changes to APIC ID or APIC base") Reported-by: Suravee Suthikulpanit Cc: stable@vger.kernel.org Reviewed-by: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20230106011306.85230-7-seanjc@google.com> Signed-off-by: Paolo Bonzini commit a58a66afc464d6d2ec294cd3102f36f3652e7ce4 Author: Sean Christopherson Date: Fri Jan 6 01:12:38 2023 +0000 KVM: x86: Don't inhibit APICv/AVIC on xAPIC ID "change" if APIC is disabled Don't inhibit APICv/AVIC due to an xAPIC ID mismatch if the APIC is hardware disabled. The ID cannot be consumed while the APIC is disabled, and the ID is guaranteed to be set back to the vcpu_id when the APIC is hardware enabled (architectural behavior correctly emulated by KVM). Fixes: 3743c2f02517 ("KVM: x86: inhibit APICv/AVIC on changes to APIC ID or APIC base") Cc: stable@vger.kernel.org Reviewed-by: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20230106011306.85230-6-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 5aede752a839904059c2b5d68be0dc4501c6c15f Author: Sean Christopherson Date: Fri Jan 6 01:12:37 2023 +0000 KVM: SVM: Process ICR on AVIC IPI delivery failure due to invalid target Emulate ICR writes on AVIC IPI failures due to invalid targets using the same logic as failures due to invalid types. AVIC acceleration fails if _any_ of the targets are invalid, and crucially VM-Exits before sending IPIs to targets that _are_ valid. In logical mode, the destination is a bitmap, i.e. a single IPI can target multiple logical IDs. Doing nothing causes KVM to drop IPIs if at least one target is valid and at least one target is invalid. Fixes: 18f40c53e10f ("svm: Add VMEXIT handlers for AVIC") Cc: stable@vger.kernel.org Reviewed-by: Paolo Bonzini Reviewed-by: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20230106011306.85230-5-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 0ccf3e7cb95a2db8ddb2a44812037ffba8166dc9 Author: Sean Christopherson Date: Fri Jan 6 01:12:36 2023 +0000 KVM: SVM: Flush the "current" TLB when activating AVIC Flush the TLB when activating AVIC as the CPU can insert into the TLB while AVIC is "locally" disabled. KVM doesn't treat "APIC hardware disabled" as VM-wide AVIC inhibition, and so when a vCPU has its APIC hardware disabled, AVIC is not guaranteed to be inhibited. As a result, KVM may create a valid NPT mapping for the APIC base, which the CPU can cache as a non-AVIC translation. Note, Intel handles this in vmx_set_virtual_apic_mode(). Reviewed-by: Paolo Bonzini Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Reviewed-by: Maxim Levitsky Message-Id: <20230106011306.85230-4-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 97a71c444a147ae41c7d0ab5b3d855d7f762f3ed Author: Sean Christopherson Date: Fri Jan 6 01:12:35 2023 +0000 KVM: x86: Purge "highest ISR" cache when updating APICv state Purge the "highest ISR" cache when updating APICv state on a vCPU. The cache must not be used when APICv is active as hardware may emulate EOIs (and other operations) without exiting to KVM. This fixes a bug where KVM will effectively block IRQs in perpetuity due to the "highest ISR" never getting reset if APICv is activated on a vCPU while an IRQ is in-service. Hardware emulates the EOI and KVM never gets a chance to update its cache. Fixes: b26a695a1d78 ("kvm: lapic: Introduce APICv update helper function") Cc: stable@vger.kernel.org Cc: Suravee Suthikulpanit Cc: Maxim Levitsky Reviewed-by: Paolo Bonzini Reviewed-by: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20230106011306.85230-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 0a19807b464fb10aa79b9dd7f494bc317438fada Author: Sean Christopherson Date: Fri Jan 6 01:12:34 2023 +0000 KVM: x86: Blindly get current x2APIC reg value on "nodecode write" traps When emulating a x2APIC write in response to an APICv/AVIC trap, get the the written value from the vAPIC page without checking that reads are allowed for the target register. AVIC can generate trap-like VM-Exits on writes to EOI, and so KVM needs to get the written value from the backing page without running afoul of EOI's write-only behavior. Alternatively, EOI could be special cased to always write '0', e.g. so that the sanity check could be preserved, but x2APIC on AMD is actually supposed to disallow non-zero writes (not emulated by KVM), and the sanity check was a byproduct of how the KVM code was written, i.e. wasn't added to guard against anything in particular. Fixes: 70c8327c11c6 ("KVM: x86: Bug the VM if an accelerated x2APIC trap occurs on a "bad" reg") Fixes: 1bd9dfec9fd4 ("KVM: x86: Do not block APIC write for non ICR registers") Reported-by: Alejandro Jimenez Cc: stable@vger.kernel.org Reviewed-by: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20230106011306.85230-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 878625e1c7a10dfbb1fdaaaae2c4d2a58fbce627 Author: Holger Hoffstätte Date: Fri Jan 13 16:40:23 2023 +0100 bpftool: Always disable stack protection for BPF objects When the clang toolchain has stack protection enabled in order to be consistent with gcc - which just happens to be the case on Gentoo - the bpftool build fails: [...] clang \ -I. \ -I/tmp/portage/dev-util/bpftool-6.0.12/work/linux-6.0/tools/include/uapi/ \ -I/tmp/portage/dev-util/bpftool-6.0.12/work/linux-6.0/tools/bpf/bpftool/bootstrap/libbpf/include \ -g -O2 -Wall -target bpf -c skeleton/pid_iter.bpf.c -o pid_iter.bpf.o clang \ -I. \ -I/tmp/portage/dev-util/bpftool-6.0.12/work/linux-6.0/tools/include/uapi/ \ -I/tmp/portage/dev-util/bpftool-6.0.12/work/linux-6.0/tools/bpf/bpftool/bootstrap/libbpf/include \ -g -O2 -Wall -target bpf -c skeleton/profiler.bpf.c -o profiler.bpf.o skeleton/profiler.bpf.c:40:14: error: A call to built-in function '__stack_chk_fail' is not supported. int BPF_PROG(fentry_XXX) ^ skeleton/profiler.bpf.c:94:14: error: A call to built-in function '__stack_chk_fail' is not supported. int BPF_PROG(fexit_XXX) ^ 2 errors generated. [...] Since stack-protector makes no sense for the BPF bits just unconditionally disable it. Bug: https://bugs.gentoo.org/890638 Signed-off-by: Holger Hoffstätte Signed-off-by: Daniel Borkmann Acked-by: Quentin Monnet Link: https://lore.kernel.org/bpf/74cd9d2e-6052-312a-241e-2b514a75c92c@applied-asynchrony.com commit 8f9930fa016134ea07db4775ec596b16c3d03f05 Author: Lu Baolu Date: Tue Jan 10 10:54:08 2023 +0800 iommu: Remove detach_dev callback The detach_dev callback of domain ops is not called in the IOMMU core. Remove this callback to avoid dead code. The trace event for detaching domain from device is removed accordingly. Reviewed-by: Jason Gunthorpe Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20230110025408.667767-6-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit dd8a25c557e109f868430bd2e3e8f394cb40eaa7 Author: Jason Gunthorpe Date: Tue Jan 10 10:54:07 2023 +0800 iommu: Remove deferred attach check from __iommu_detach_device() At the current moment, __iommu_detach_device() is only called via call chains that are after the device driver is attached - eg via explicit attach APIs called by the device driver. Commit bd421264ed30 ("iommu: Fix deferred domain attachment") has removed deferred domain attachment check from __iommu_attach_device() path, so it should just unconditionally work in the __iommu_detach_device() path. It actually looks like a bug that we were blocking detach on these paths since the attach was unconditional and the caller is going to free the (probably) UNAMANGED domain once this returns. The only place we should be testing for deferred attach is during the initial point the dma device is linked to the group, and then again during the dma api calls. Signed-off-by: Jason Gunthorpe Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20230110025408.667767-5-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit c1fe9119ee707459421d8f7387e803b0ea78c21b Author: Lu Baolu Date: Tue Jan 10 10:54:06 2023 +0800 iommu: Add set_platform_dma_ops callbacks For those IOMMU drivers that don't provide default domain support, add an implementation of set_platform_dma_ops callback so that the IOMMU core could return the DMA control to platform DMA ops. At the same time, with the set_platform_dma_ops implemented, there is no need for detach_dev. Remove it to avoid dead code. Reviewed-by: Jason Gunthorpe Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20230110025408.667767-4-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 6caeb33fa986151f745fc62190bc28a593b8a0d2 Author: Lu Baolu Date: Tue Jan 10 10:54:05 2023 +0800 iommu: Add set_platform_dma_ops iommu ops When VFIO finishes assigning a device to user space and calls iommu_group_release_dma_owner() to return the device to kernel, the IOMMU core will attach the default domain to the device. Unfortunately, some IOMMU drivers don't support default domain, hence in the end, the core calls .detach_dev instead. This adds set_platform_dma_ops iommu ops to make it clear that what it does is returning control back to the platform DMA ops. Suggested-by: Jason Gunthorpe Reviewed-by: Jason Gunthorpe Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20230110025408.667767-3-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 1b932ceddd19de1cdf2a86f1fca77c37dad758cc Author: Lu Baolu Date: Tue Jan 10 10:54:04 2023 +0800 iommu: Remove detach_dev callbacks The iommu core calls the driver's detach_dev domain op callback only when a device is finished assigning to user space and iommu_group_release_dma_owner() is called to return the device to the kernel, where iommu core wants to set the default domain to the device but the driver didn't provide one. In other words, if any iommu driver provides default domain support, the .detach_dev callback will never be called. This removes the detach_dev callbacks in those IOMMU drivers that support default domain. Reviewed-by: Jason Gunthorpe Reviewed-by: Sven Peter # apple-dart Acked-by: Chunyan Zhang # sprd Reviewed-by: Vasant Hegde # amd Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20230110025408.667767-2-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 497f134a912af5594a519eb1d226a13f54cb9fa5 Merge: 8f28299f5cdcc 4a1b1b65e410d Author: Mark Brown Date: Fri Jan 13 15:25:27 2023 +0000 Fixes for avs driver Merge series from Amadeusz Sławiński : First patch fixes problems reported when performing shutdown. Second one is for a problem reported by LKP. Last one fixes problem reported by checkpatch. commit d0cc74dafba5de159e680533409f87fe7ec46ba9 Author: Ville Syrjälä Date: Fri Dec 16 02:38:08 2022 +0200 drm/i915/dsb: Add mode DSB opcodes Add all the know DSB instruction opcodes. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221216003810.13338-12-ville.syrjala@linux.intel.com Reviewed-by: Animesh Manna commit f021dfd232317dd149d3aea09f5d7b7853d00caf Author: Ville Syrjälä Date: Fri Dec 16 02:38:07 2022 +0200 drm/i915/dsb: Allow the caller to pass in the DSB buffer size The caller should more or less know how many DSB commands it wants to emit into the command buffer, so allow it to specify the size of the command buffer rather than having the low level DSB code guess it. Technically we can emit as many as 134+1033 (for adl+ degamma + 10bit gamma) register writes but thanks to the DSB indexed register write command we get significant space savings so the current size estimate of 8KiB (~1024 DSB commands) is sufficient for now. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221216003810.13338-11-ville.syrjala@linux.intel.com Reviewed-by: Animesh Manna commit e485a3e6a2d22580ea70c27fc66474f5a28165fc Author: Ville Syrjälä Date: Fri Dec 16 02:38:06 2022 +0200 drm/i915/dsb: Introduce intel_dsb_align_tail() Move the DSB tail cacheline alignment to a helper. No need to pollute the caller with mundane details like this. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221216003810.13338-10-ville.syrjala@linux.intel.com Reviewed-by: Animesh Manna commit 2f65fb5466b498982b2f820f3c06dd28b84110aa Author: Ville Syrjälä Date: Fri Dec 16 02:38:05 2022 +0200 drm/i915/dsb: Handle the indexed vs. not inside the DSB code The DSB indexed register write insturction is purely an internal DSB implementation detail, no reason why the caller should have to know about it. So let's just have the caller emit blind register writes let the DSB code convert things to an indexed write if/when multiple writes occur to the same register offset in a row. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221216003810.13338-9-ville.syrjala@linux.intel.com Reviewed-by: Animesh Manna commit 08b462fd841205a807e4bc0ba58aed7e90ec8bad Author: Ville Syrjälä Date: Fri Dec 16 02:38:04 2022 +0200 drm/i915/dsb: Improve the indexed reg write checks Currently intel_dsb_indexed_reg_write() just assumes the previous instructions is also an indexed register write, and thus only checks the register offset. Make the check more robust by actually checking the instruction opcode as well. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221216003810.13338-8-ville.syrjala@linux.intel.com Reviewed-by: Animesh Manna commit 35118c4c8f564c7aec20eaf8675f5e1cda177a35 Author: Ville Syrjälä Date: Fri Dec 16 02:38:03 2022 +0200 drm/i915/dsb: Extract intel_dsb_emit() Extract a small helper to emit a DSB intstruction. Should become useful if/when we need to start emitting other instructions besides register writes. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221216003810.13338-7-ville.syrjala@linux.intel.com Reviewed-by: Animesh Manna commit aab8fbc92ff4cd5b3cb2445402603c7401b60758 Author: Ville Syrjälä Date: Fri Dec 16 02:38:02 2022 +0200 drm/i915/dsb: Extract assert_dsb_has_room() Pull the DSB command buffer size checks into a small helper so we don't have repeat the same thing multiple times. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221216003810.13338-6-ville.syrjala@linux.intel.com Reviewed-by: Animesh Manna commit 488dd0758366213ab85701d7e687458cfa598c49 Author: Ville Syrjälä Date: Fri Dec 16 02:38:01 2022 +0200 drm/i915/dsb: Fix DSB command buffer size checks free_pos is in dwords, DSB_BUF_SIZE in bytes. Directly comparing the two is nonsense. Fix it up, and make sure we also account for the 8byte alignment requirement for each instruction, and also assume that each instruction normally eats two dwords. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221216003810.13338-5-ville.syrjala@linux.intel.com Reviewed-by: Animesh Manna commit 3229319e446cafe51e8d3060bdf39203b95a5c98 Author: Ville Syrjälä Date: Fri Dec 16 02:38:00 2022 +0200 drm/i915/dsb: Align DSB register writes to 8 bytes Every DSB instruction has to be 8byte aligned. Make sure that is the case for the non-indexed register writes as well. The way this could end up unaligned is we emitted an odd number of indexed register writes beforehand. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221216003810.13338-4-ville.syrjala@linux.intel.com Reviewed-by: Animesh Manna commit f9e2ada6fed6f0067b1d7380f960bc02dcc8acd2 Author: Ville Syrjälä Date: Fri Dec 16 02:37:59 2022 +0200 drm/i915/dsb: Inline DSB_CTRL writes into intel_dsb_commit() No point in having these wrappers for a simple DSB_CTRL write. Inline them into intel_dsb_commit(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221216003810.13338-3-ville.syrjala@linux.intel.com Reviewed-by: Animesh Manna commit e13f2615f7e9eb56bc8723a296d67e18509330ed Author: Ville Syrjälä Date: Fri Dec 16 02:37:58 2022 +0200 drm/i915/dsb: Stop with the RMW We don't want to keep random bits set in DSB_CTRL. Stop the harmful RMW. Also flip the reverse & around to appease my ocd. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221216003810.13338-2-ville.syrjala@linux.intel.com Reviewed-by: Animesh Manna commit 716592fdb5e255a1b9dcb444822c9c1f9a1e248c Author: Martin Blumenstingl Date: Sun Dec 25 22:26:32 2022 +0100 clk: meson: clk-cpu-dyndiv: switch from .round_rate to .determine_rate clk_ops.round_rate will be removed at some point. It's replacement is .determine_rate. Switch clk-cpu-dyndiv over to use .determine_rate. Signed-off-by: Martin Blumenstingl Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20221225212632.2760126-5-martin.blumenstingl@googlemail.com Signed-off-by: Jerome Brunet commit 9ac323943f7a4c5e5b7c5d4bd6c8225f62b94c43 Author: Martin Blumenstingl Date: Sun Dec 25 22:26:31 2022 +0100 clk: meson: sclk-div: switch from .round_rate to .determine_rate clk_ops.round_rate will be removed at some point. It's replacement is .determine_rate. Switch sclk-div over to use .determine_rate. Signed-off-by: Martin Blumenstingl Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20221225212632.2760126-4-martin.blumenstingl@googlemail.com Signed-off-by: Jerome Brunet commit 581f772566efea8a3fe6a166fe0b88febdba1b26 Author: Martin Blumenstingl Date: Sun Dec 25 22:26:30 2022 +0100 clk: meson: dualdiv: switch from .round_rate to .determine_rate clk_ops.round_rate will be removed at some point. It's replacement is .determine_rate. Switch clk-dualdiv over to use .determine_rate. Signed-off-by: Martin Blumenstingl Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20221225212632.2760126-3-martin.blumenstingl@googlemail.com Signed-off-by: Jerome Brunet commit 1fd62f262ee7921a5600d77a1b92614542cca686 Author: Martin Blumenstingl Date: Sun Dec 25 22:26:29 2022 +0100 clk: meson: mpll: Switch from .round_rate to .determine_rate clk_ops.round_rate will be removed at some point. It's replacement is .determine_rate. Switch clk-mpll over to use .determine_rate. Signed-off-by: Martin Blumenstingl Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20221225212632.2760126-2-martin.blumenstingl@googlemail.com Signed-off-by: Jerome Brunet commit d55dcb7384b1234d3caf70c2f8199c4184502ff9 Author: Juergen Gross Date: Fri Jan 13 14:01:26 2023 +0100 x86/cpu: Remove misleading comment The comment of the "#endif" after setup_disable_pku() is wrong. As the related #ifdef is only a few lines above, just remove the comment. Signed-off-by: Juergen Gross Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230113130126.1966-1-jgross@suse.com commit ebc872d645e581a4774c36bc394f6246275e1547 Author: Vineeth Vijayan Date: Mon Jan 2 20:02:53 2023 +0100 docs/ABI: use linux-s390 list as the main contact Remove Cornelia's email address from the file as suggested by her. List linux-s390 mailing-list address as the primary contact instead. Link: https://lore.kernel.org/linux-s390/8735d0oiq6.fsf@redhat.com/ Signed-off-by: Vineeth Vijayan Reviewed-by: Cornelia Huck Signed-off-by: Heiko Carstens commit 08866d34c7099e981918d34aab5d6a437436628f Author: Christophe JAILLET Date: Sun Jul 31 18:09:14 2022 +0200 s390/vfio-ap: fix an error handling path in vfio_ap_mdev_probe_queue() The commit in Fixes: has switch the order of a sysfs_create_group() and a kzalloc(). It correctly removed the now useless kfree() but forgot to add a sysfs_remove_group() in case of (unlikely) memory allocation failure. Add it now. Fixes: 260f3ea14138 ("s390/vfio-ap: move probe and remove callbacks to vfio_ap_ops.c") Signed-off-by: Christophe JAILLET Signed-off-by: Alexander Gordeev Link: https://lore.kernel.org/r/d0c0a35eec4fa87cb7f3910d8ac4dc0f7dc9008a.1659283738.git.christophe.jaillet@wanadoo.fr Signed-off-by: Heiko Carstens commit 760c6ce64b7355bf583928200db9a553c0751a11 Author: Heiko Carstens Date: Sun Jan 8 19:08:55 2023 +0100 s390: move __amode31_base declaration to proper header file Move __amode31_base declaration to proper header file to get rid of arch/s390/boot/startup.c:24:15: warning: symbol '__amode31_base' was not declared. Should it be static? Signed-off-by: Heiko Carstens commit 2154e0b3282d0029ea7790a8414d61d5dc7d72ff Author: Alexander Gordeev Date: Mon Dec 19 21:08:27 2022 +0100 s390/mm: allocate Absolute Lowcore Area in decompressor Move Absolute Lowcore Area allocation to the decompressor. As result, get_abs_lowcore() and put_abs_lowcore() access brackets become really straight and do not require complex execution context analysis and LAP and interrupts tackling. Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit 8e9205d2a58989aff46000ef47021633146ca493 Author: Alexander Gordeev Date: Sun Dec 11 08:18:57 2022 +0100 s390/mm: allocate Real Memory Copy Area in decompressor Move Real Memory Copy Area allocation to the decompressor. As result, memcpy_real() and memcpy_real_iter() movers become usable since the very moment the kernel starts. Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit e0e0a87b4b85ac3bbf76327fc030e6134b657068 Author: Alexander Gordeev Date: Thu Dec 15 10:33:52 2022 +0100 s390/boot: allow setup of different virtual address types Currently the decompressor sets up only identity mapping. Allow adding more address range types as a prerequisite for allocation of kernel fixed mappings. Signed-off-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit 07493a9ca79f8a39cfddd0a20b4e6eded4de8f3d Author: Alexander Gordeev Date: Fri Dec 16 19:49:23 2022 +0100 s390/kasan: remove identity mapping support The identity mapping is created in the decompressor, there is no need to have the same functionality in the kasan setup code. Thus, remove it. Remove the 4KB pages check for first 1MB since there is no need to take care of the lowcore pages. Acked-by: Heiko Carstens Signed-off-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit 12cf6473d23885fe06aa7e7ca58e990fa4f0737c Author: Alexander Gordeev Date: Fri Dec 2 19:23:11 2022 +0100 s390/maccess: remove dead DAT-off code As the kernel is executed in DAT-on mode only, remove unnecessary DAT bit check together with the dead code. Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit bb1520d581a3a46e2d6e12bb74604ace33404de5 Author: Alexander Gordeev Date: Tue Dec 13 11:35:11 2022 +0100 s390/mm: start kernel with DAT enabled The setup of the kernel virtual address space is spread throughout the sources, boot stages and config options like this: 1. The available physical memory regions are queried and stored as mem_detect information for later use in the decompressor. 2. Based on the physical memory availability the virtual memory layout is established in the decompressor; 3. If CONFIG_KASAN is disabled the kernel paging setup code populates kernel pgtables and turns DAT mode on. It uses the information stored at step [1]. 4. If CONFIG_KASAN is enabled the kernel early boot kasan setup populates kernel pgtables and turns DAT mode on. It uses the information stored at step [1]. The kasan setup creates early_pg_dir directory and directly overwrites swapper_pg_dir entries to make shadow memory pages available. Move the kernel virtual memory setup to the decompressor and start the kernel with DAT turned on right from the very first istruction. That completely eliminates the boot phase when the kernel runs in DAT-off mode, simplies the overall design and consolidates pgtables setup. The identity mapping is created in the decompressor, while kasan shadow mappings are still created by the early boot kernel code. Share with decompressor the existing kasan memory allocator. It decreases the size of a newly requested memory block from pgalloc_pos and ensures that kernel image is not overwritten. pgalloc_low and pgalloc_pos pointers are made preserved boot variables for that. Use the bootdata infrastructure to setup swapper_pg_dir and invalid_pg_dir directories used by the kernel later. The interim early_pg_dir directory established by the kasan initialization code gets eliminated as result. As the kernel runs in DAT-on mode only the PSW_KERNEL_BITS define gets PSW_MASK_DAT bit by default. Additionally, the setup_lowcore_dat_off() and setup_lowcore_dat_on() routines get merged, since there is no DAT-off mode stage anymore. The memory mappings are created with RW+X protection that allows the early boot code setting up all necessary data and services for the kernel being booted. Just before the paging is enabled the memory protection is changed to RO+X for text, RO+NX for read-only data and RW+NX for kernel data and the identity mapping. Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit bd50b7436217b4123911c2bca1efd74718654f06 Author: Alexander Gordeev Date: Sun Dec 4 21:15:41 2022 +0100 s390/boot: detect and enable memory facilities Detect and enable memory facilities which is a prerequisite for pgtables setup in the decompressor. Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit b265854060525ca2cef74e40a49494bbb52700e6 Author: Alexander Gordeev Date: Fri Dec 2 19:07:07 2022 +0100 s390/pgtable: add REGION3_KERNEL_EXEC protection Similar to existing PAGE_KERNEL_EXEC and SEGMENT_KERNEL_EXEC memory protection add REGION3_KERNEL_EXEC attribute that could be set on PUD pgtable entries. Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit bf2b4af2ed23b9548ea7f24613fd905f56ec7910 Author: Alexander Gordeev Date: Fri Dec 16 19:07:38 2022 +0100 s390/kasan: use set_pXe_bit() for pgtable entries setup Convert setup of pgtable entries to use set_pXe_bit() helpers as the preferred way in MM code. Locally introduce pgprot_clear_bit() helper, which is strictly speaking a generic function. However, it is only x86 pgprot_clear_protnone_bits() helper, which does a similar thing, so do not make it public. Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit e148071b9f7711cb68c6d89c5b2033ee5a8add93 Author: Alexander Gordeev Date: Sat Dec 10 09:49:04 2022 +0100 s390/kasan: cleanup setup of untracked memory pgtables Avoid duplicate IS_ENABLED(CONFIG_KASAN_VMALLOC) condition check. Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit 8772555ad0e43c31cb5e29f33b23c7c11ecd5a9d Author: Alexander Gordeev Date: Fri Dec 9 22:09:44 2022 +0100 s390/kasan: cleanup setup of zero pgtable Fix variables initialization coding style and setup zero pgtable same way region and segment pgtables are set up. Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit aae2f753d2a96fb062c3cb710ccbd4cb3d5b9452 Author: Alexander Gordeev Date: Tue Dec 13 11:31:39 2022 +0100 s390/kasan: sort out physical vs virtual memory confusion The kasan early boot memory allocators operate on pgalloc_pos and segment_pos physical address pointers, but fail to convert it to the corresponding virtual pointers. Currently it is not a problem, since virtual and physical addresses on s390 are the same. Nevertheless, should they ever differ, this would cause an invalid pointer access. Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit 639886b71ddef085a0e7bb1f225b8ae3eda5c06f Author: Alexander Gordeev Date: Thu Dec 15 08:00:34 2022 +0100 s390/early: fix sclp_early_sccb variable lifetime Commit ada1da31ce34 ("s390/sclp: sort out physical vs virtual pointers usage") fixed the notion of virtual address for sclp_early_sccb pointer. However, it did not take into account that kasan_early_init() can also output messages and sclp_early_sccb should be adjusted by the time kasan_early_init() is called. Currently it is not a problem, since virtual and physical addresses on s390 are the same. Nevertheless, should they ever differ, this would cause an invalid pointer access. Fixes: ada1da31ce34 ("s390/sclp: sort out physical vs virtual pointers usage") Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit 9c3205b2b062420c26b33924b910880889acf832 Author: Alexander Gordeev Date: Thu May 5 16:54:54 2022 +0200 s390/boot: cleanup decompressor header files Move declarations to appropriate header files. Instead of cryptic casting directly assign struct vmlinux_info type to _vmlinux_info linker script variable - wich it actually is. Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit 8e01fb15b8157a825d309ea2598b494dd81a7b42 Author: Frank Wunderlich Date: Fri Jan 6 16:28:45 2023 +0100 arm64: dts: mt7986: add Bananapi R3 Add support for Bananapi R3 SBC. - SD/eMMC support (switching first 4 bits of data-bus with sw6/D) - SPI-NAND/NOR support (switched CS by sw5/C) - all rj45 ports and both SFP working (eth1/lan4) - all USB-Ports + SIM-Slot tested - i2c and all uarts tested - wifi tested (with eeprom calibration data) The device can boot from all 4 storage options. Both, SPI and MMC, can be switched using hardware switches on the board, see https://wiki.banana-pi.org/Banana_Pi_BPI-R3#Jumper_setting Signed-off-by: Frank Wunderlich Link: https://lore.kernel.org/r/20230106152845.88717-6-linux@fw-web.de Signed-off-by: Matthias Brugger commit 918aed7abd2d554f33e51fffefa8172b93a36f56 Author: Sam Shih Date: Fri Jan 6 16:28:44 2023 +0100 arm64: dts: mt7986: add pcie related device nodes This patch adds PCIe support for MT7986. Signed-off-by: Jieyy Yang Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230106152845.88717-5-linux@fw-web.de Signed-off-by: Matthias Brugger commit 513b49d19b34cf7bec4bc0e6284df2aa9007e88d Author: Sam Shih Date: Fri Jan 6 16:28:43 2023 +0100 arm64: dts: mt7986: add mmc related device nodes This patch adds mmc support for MT7986. Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich Link: https://lore.kernel.org/r/20230106152845.88717-4-linux@fw-web.de Signed-off-by: Matthias Brugger commit e21cbfc3d93177069260552b4706ba8def759030 Author: Sam Shih Date: Fri Jan 6 16:28:42 2023 +0100 arm64: dts: mt7986: add usb related device nodes This patch adds USB support for MT7986. Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich Reviewed-by: Chunfeng Yun Link: https://lore.kernel.org/r/20230106152845.88717-3-linux@fw-web.de Signed-off-by: Matthias Brugger commit a508a267dda6e67d2eccbc12088a7fecc127ba90 Author: Randy Dunlap Date: Thu Jan 12 22:44:21 2023 -0800 regulator: fixed-helper: use the correct function name in comment Use the correct function name and modify the function short description. This prevents a kernel-doc warning: drivers/regulator/fixed-helper.c:32: warning: expecting prototype for regulator_register_fixed_name(). Prototype was for regulator_register_always_on() instead Signed-off-by: Randy Dunlap Cc: Liam Girdwood Cc: Mark Brown Link: https://lore.kernel.org/r/20230113064421.11986-1-rdunlap@infradead.org Signed-off-by: Mark Brown commit 80332ec8c0994dc457026b20619dee0f9990706f Author: Randy Dunlap Date: Thu Jan 12 22:44:12 2023 -0800 regulator: act8945a: fix non-kernel-doc comments Don't use kernel-doc "/**" markers for comments that are not in kernel-doc format. This prevents these warnings: drivers/regulator/act8945a-regulator.c:19: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * ACT8945A Global Register Map. drivers/regulator/act8945a-regulator.c:50: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Field Definitions. drivers/regulator/act8945a-regulator.c:56: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * ACT8945A Voltage Number Signed-off-by: Randy Dunlap Cc: Liam Girdwood Cc: Mark Brown Link: https://lore.kernel.org/r/20230113064412.11038-1-rdunlap@infradead.org Signed-off-by: Mark Brown commit 8f28299f5cdcc6e7b6ed664364d1c76821896d07 Author: Cezary Rojewski Date: Fri Jan 13 20:14:09 2023 +0100 ASoC: Intel: avs: Use asoc_substream_to_rtd() to obtain rtd Utilize the helper function instead of casting from ->private_data or snd_pcm_substream_chip() directly. Signed-off-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230113191410.1454566-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit e12ad468c22065a2826b2fc4c11d2113a7975301 Author: Ingo Molnar Date: Fri Jan 13 13:43:20 2023 +0100 x86/gsseg: Add the new header to Module build needs to be able to pick up the C prototype: WARNING: modpost: EXPORT symbol "asm_load_gs_index" [vmlinux] version generation failed, symbol will not be versioned. Is "asm_load_gs_index" prototyped in ? Fixes: ae53fa187030 ("x86/gsseg: Move load_gs_index() to its own new header file") Reported-by: Stephen Rothwell Signed-off-by: Ingo Molnar Cc: linux-kernel@vger.kernel.org commit 5827b31d858e399e0ba9fbd33da7a39b31769e11 Author: Janne Grunau Date: Fri Jan 13 19:23:10 2023 +0900 spi: Parse hold/inactive CS delay values from the DT Now that we support parsing the setup time from the Device Tree, we can also easily support the remaining hold and inactive time delay values. Signed-off-by: Janne Grunau Signed-off-by: Hector Martin Link: https://lore.kernel.org/r/20230113102309.18308-4-marcan@marcan.st Signed-off-by: Mark Brown commit 34f89f238c545d4fd0166e37c201d96c10443953 Author: Janne Grunau Date: Fri Jan 13 19:23:09 2023 +0900 spi: dt-bindings: Add hold/inactive CS delay peripheral properties These two properties complete the bindings for the Linux spi_device cs model, which includes cs_setup, cs_hold and cs_inactive delay values. Signed-off-by: Janne Grunau Reviewed-by: Rob Herring Signed-off-by: Hector Martin Link: https://lore.kernel.org/r/20230113102309.18308-3-marcan@marcan.st Signed-off-by: Mark Brown commit 4a1b1b65e410df82add3c5bc5be7bfb0c62f7f73 Author: Amadeusz Sławiński Date: Fri Jan 13 20:03:10 2023 +0100 ASoC: Intel: avs: Use min_t instead of min with cast Checkpatch script recommends using min_t instead of min with the cast. Fixes: 69b23b3937a1 ("ASoC: Intel: avs: Event tracing") Signed-off-by: Amadeusz Sławiński Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20230113190310.1451693-4-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 19cfd69cd32c9d022512c081be879bca89e82ce0 Author: Amadeusz Sławiński Date: Fri Jan 13 20:03:09 2023 +0100 ASoC: Intel: avs: Correctly access topology fields Fixes following warning: sound/soc/intel/avs/topology.c:1636:20: sparse: sparse: restricted __le32 degrades to integer Reported-by: kernel test robot Signed-off-by: Amadeusz Sławiński Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20230113190310.1451693-3-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit da7faee2a15893596ae2da3fd2f719055070f74f Author: Thomas Zimmermann Date: Wed Jan 11 14:02:06 2023 +0100 drm/radeon: Do not include Including is not required, so remove the include statements. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230111130206.29974-11-tzimmermann@suse.de commit 98e3f08f6198e7d1383f562b6d08daacf60369d2 Author: Thomas Zimmermann Date: Wed Jan 11 14:02:05 2023 +0100 drm/radeon: Remove trailing whitespaces Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230111130206.29974-10-tzimmermann@suse.de commit e61b2610e08f991390f70a590c25fd809288e2a3 Author: Thomas Zimmermann Date: Wed Jan 11 14:02:04 2023 +0100 drm/nouveau: Do not include Including is not required, so remove the include statement. No functional changes. Signed-off-by: Thomas Zimmermann Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230111130206.29974-9-tzimmermann@suse.de commit 5b0b51fc78ab3a688fed9844ca6b74b7d55154e8 Author: Thomas Zimmermann Date: Wed Jan 11 14:02:03 2023 +0100 drm/amdgpu: Do not include Including is not required, so remove the include statements. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230111130206.29974-8-tzimmermann@suse.de commit 7e9a14adf34d127eac15649121184b295c699fc3 Author: Thomas Zimmermann Date: Wed Jan 11 14:02:02 2023 +0100 drm: Define enum mode_set_atomic in drm_modeset_helper_tables.h Define enum mode_set_atomic next to the only interface that uses the type. This will allow for removing several include statements for drm_fb_helper.h. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Ville Syrjälä Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230111130206.29974-7-tzimmermann@suse.de commit 489fbf3eab8f7207cae115b214ec395158c1a5d5 Author: Thomas Zimmermann Date: Wed Jan 11 14:02:01 2023 +0100 drm/panel: Do not include Remove unnecessary include statements for . No functional changes. Include where the driver got the header file via . Signed-off-by: Thomas Zimmermann Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230111130206.29974-6-tzimmermann@suse.de commit 77910a625fa117af3581ecba05c26892d60a10e5 Author: Thomas Zimmermann Date: Wed Jan 11 14:02:00 2023 +0100 drm/amdgpu: Do not include Remove unnecessary include statements for . No functional changes. Signed-off-by: Thomas Zimmermann Acked-by: Christian König Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230111130206.29974-5-tzimmermann@suse.de commit 56cf400f8ebb8dbbd2a29fbdf5f4ac4a924a726a Author: Thomas Zimmermann Date: Wed Jan 11 14:01:59 2023 +0100 drm: Don't include in drm_crtc_helper.h Including in drm_crtc_helper.h is not required. Remove the include statement and avoid rebuilding DRM whenever the fbdev header changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Ville Syrjälä Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230111130206.29974-4-tzimmermann@suse.de commit fb28b3f0ecb2393307e5618adb331be5e0f44006 Author: Thomas Zimmermann Date: Wed Jan 11 14:01:58 2023 +0100 drm: Include where needed Include in source files that need it. Some of DRM's source code gets OF header via drm_crtc_helper.h and , which can leed to unnecessary recompilation. In drm_modes.c, add a comment on the reason for still including . The header file is required to get KHZ2PICOS(). The macro is part of the UAPI headers, so it cannot be moved to a less prominent location. v2: * include in komeda_drv.c (kernel test robot) Signed-off-by: Thomas Zimmermann Acked-by: Liviu Dudau # komeda Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230111130206.29974-3-tzimmermann@suse.de commit a6276e92a037fc2dc888189a97e2b47887160016 Author: Thomas Zimmermann Date: Wed Jan 11 14:01:57 2023 +0100 drm: Include where needed Include in source files that need it. Some of DRM's source code gets the backlight header via drm_crtc_helper.h and , which can leed to unnecessary recompilation. If possible, do not include drm_crtc_helper.h any longer. Signed-off-by: Thomas Zimmermann Acked-by: Christian König # amd Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230111130206.29974-2-tzimmermann@suse.de commit 5b6373de4351debd9fa87f1c46442b2c28d8b18e Author: Thomas Zimmermann Date: Mon Dec 19 17:05:16 2022 +0100 drm/fbdev: Remove aperture handling and FBINFO_MISC_FIRMWARE There are no users left of struct fb_info.apertures and the flag FBINFO_MISC_FIRMWARE. Remove both and the aperture-ownership code in the fbdev core. All code for aperture ownership is now located in the fbdev drivers. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221219160516.23436-19-tzimmermann@suse.de commit 2cb14c86137d64fff2ed9862cf0a3af92b8a103f Author: Thomas Zimmermann Date: Mon Dec 19 17:05:15 2022 +0100 fbdev/vga16fb: Do not use struct fb_info.apertures Acquire ownership of the firmware scanout buffer by calling Linux' aperture helpers. Remove the use of struct fb_info.apertures and do not set FBINFO_MISC_FIRMWARE; both of which previously configured buffer ownership. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221219160516.23436-18-tzimmermann@suse.de commit 678573b8eee2fdee7ffaa46043ec3d8bab25d05d Author: Thomas Zimmermann Date: Mon Dec 19 17:05:14 2022 +0100 fbdev/vesafb: Do not use struct fb_info.apertures Acquire ownership of the firmware scanout buffer by calling Linux' aperture helpers. Remove the use of struct fb_info.apertures and do not set FBINFO_MISC_FIRMWARE; both of which previously configured buffer ownership. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221219160516.23436-17-tzimmermann@suse.de commit 4ef614be655737fee81dfad2b346c7c5fcb7024f Author: Thomas Zimmermann Date: Mon Dec 19 17:05:13 2022 +0100 fbdev/vesafb: Remove trailing whitespaces Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221219160516.23436-16-tzimmermann@suse.de commit d9702b2a217116eef4ad51611259676f7bc79a0f Author: Thomas Zimmermann Date: Mon Dec 19 17:05:12 2022 +0100 fbdev/simplefb: Do not use struct fb_info.apertures Acquire ownership of the firmware scanout buffer by calling Linux' aperture helpers. Remove the use of struct fb_info.apertures and do not set FBINFO_MISC_FIRMWARE; both of which previously configured buffer ownership. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221219160516.23436-15-tzimmermann@suse.de commit ef3c9fa9931ae6cb184caa00dcc7cd311de5c565 Author: Thomas Zimmermann Date: Mon Dec 19 17:05:11 2022 +0100 fbdev/offb: Do not use struct fb_info.apertures Acquire ownership of the firmware scanout buffer by calling Linux' aperture helpers. Remove the use of struct fb_info.apertures and do not set FBINFO_MISC_FIRMWARE; both of which previously configured buffer ownership. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221219160516.23436-14-tzimmermann@suse.de commit 0159426734fd4a5360d6e0ccf7cd57bb265fa35c Author: Thomas Zimmermann Date: Mon Dec 19 17:05:10 2022 +0100 fbdev/offb: Allocate struct offb_par with framebuffer_alloc() Move the palette array into struct offb_par and allocate both via framebuffer_alloc(), as intended by fbdev. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221219160516.23436-13-tzimmermann@suse.de commit 7191ec8015f363b7b673df6fb847156e7ee02cf4 Author: Thomas Zimmermann Date: Mon Dec 19 17:05:09 2022 +0100 fbdev/efifb: Do not use struct fb_info.apertures Acquire ownership of the firmware scanout buffer by calling Linux' aperture helpers. Remove the use of struct fb_info.apertures and do not set FBINFO_MISC_FIRMWARE; both of which previously configured buffer ownership. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221219160516.23436-12-tzimmermann@suse.de commit 82dcb90b651bcbb2c2849d1bd386f3ae88b4a463 Author: Thomas Zimmermann Date: Mon Dec 19 17:05:08 2022 +0100 fbdev/efifb: Add struct efifb_par for driver data The efifb_par structure holds the palette for efifb. It will also be useful for storing the device's aperture range. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221219160516.23436-11-tzimmermann@suse.de commit e12fa3544469b761ba72b070190d272e2a644e54 Author: Thomas Zimmermann Date: Mon Dec 19 17:05:07 2022 +0100 vfio-mdev/mdpy-fb: Do not set struct fb_info.apertures Generic fbdev drivers use the apertures field in struct fb_info to control ownership of the framebuffer memory and graphics device. Do not set the values in mdpy-fb. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221219160516.23436-10-tzimmermann@suse.de commit 81d2393485f0990cf6566b0c9e0697c199f68ae5 Author: Thomas Zimmermann Date: Mon Dec 19 17:05:06 2022 +0100 fbdev/hyperv-fb: Do not set struct fb_info.apertures Generic fbdev drivers use the apertures field in struct fb_info to control ownership of the framebuffer memory and graphics device. Do not set the values in hyperv-fb. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Reviewed-by: Michael Kelley Link: https://patchwork.freedesktop.org/patch/msgid/20221219160516.23436-9-tzimmermann@suse.de commit 7a73465e4c483ebcbccab2a41d46d048815ec337 Author: Thomas Zimmermann Date: Mon Dec 19 17:05:05 2022 +0100 fbdev/clps711x-fb: Do not set struct fb_info.apertures Generic fbdev drivers use the apertures field in struct fb_info to control ownership of the framebuffer memory and graphics device. Do not set the values in clps711x-fb. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221219160516.23436-8-tzimmermann@suse.de commit 8c8743db337a3bfe0f3e8e470fdfea6b9dac70d1 Author: Thomas Zimmermann Date: Mon Dec 19 17:05:04 2022 +0100 drm/fb-helper: Do not allocate unused apertures structure The apertures field in struct fb_info is not used by DRM drivers. Do not allocate it. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221219160516.23436-7-tzimmermann@suse.de commit 7bfb7fc48924d8a06d27f18bd1c218e052e4773d Author: Thomas Zimmermann Date: Mon Dec 19 17:05:03 2022 +0100 drm/radeon: Do not set struct fb_info.apertures Generic fbdev drivers use the apertures field in struct fb_info to control ownership of the framebuffer memory and graphics device. Do not set the values in radeon. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221219160516.23436-6-tzimmermann@suse.de commit 672279e4bab23cb03c27eece303149568bf21330 Author: Thomas Zimmermann Date: Mon Dec 19 17:05:02 2022 +0100 drm/i915: Do not set struct fb_info.apertures Generic fbdev drivers use the apertures field in struct fb_info to control ownership of the framebuffer memory and graphics device. Do not set the values in i915. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221219160516.23436-5-tzimmermann@suse.de commit f917ccfbc1f79aba361357649c91ce02034baa18 Author: Thomas Zimmermann Date: Mon Dec 19 17:05:01 2022 +0100 drm/gma500: Do not set struct fb_info.apertures Generic fbdev drivers use the apertures field in struct fb_info to control ownership of the framebuffer memory and graphics device. Do not set the values in gma500. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221219160516.23436-4-tzimmermann@suse.de commit 12d5796d55f9fd9e4b621003127c99e176665064 Author: Thomas Zimmermann Date: Mon Dec 19 17:05:00 2022 +0100 Revert "fbcon: don't lose the console font across generic->chip driver switch" This reverts commit ae1287865f5361fa138d4d3b1b6277908b54eac9. Always free the console font when deinitializing the framebuffer console. Subsequent framebuffer consoles will then use the default font. Rely on userspace to load any user-configured font for these consoles. Commit ae1287865f53 ("fbcon: don't lose the console font across generic->chip driver switch") was introduced to work around losing the font during graphics-device handover. [1][2] It kept a dangling pointer with the font data between loading the two consoles, which is fairly adventurous hack. It also never covered cases when the other consoles, such as VGA text mode, where involved. The problem has meanwhile been solved in userspace. Systemd comes with a udev rule that re-installs the configured font when a console comes up. [3] So the kernel workaround can be removed. This also removes one of the two special cases triggered by setting FBINFO_MISC_FIRMWARE in an fbdev driver. Tested during device handover from efifb and simpledrm to radeon. Udev reloads the configured console font for the new driver's terminal. Signed-off-by: Thomas Zimmermann Link: https://bugzilla.redhat.com/show_bug.cgi?id=892340 # 1 Link: https://bugzilla.redhat.com/show_bug.cgi?id=1074624 # 2 Link: https://cgit.freedesktop.org/systemd/systemd/tree/src/vconsole/90-vconsole.rules.in?h=v222 # 3 Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221219160516.23436-3-tzimmermann@suse.de commit 06cfbd38f607f25bcee9bbfe900c506bf4bd4264 Author: Thomas Zimmermann Date: Mon Dec 19 17:04:59 2022 +0100 fbcon: Remove trailing whitespaces Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221219160516.23436-2-tzimmermann@suse.de commit 81ce2ebd194cf32027854ce1c703b7fd129c86b8 Author: lvqian Date: Wed Jan 11 17:27:44 2023 +0800 mm/slab.c: cleanup is_debug_pagealloc_cache() Remove the if statement to increase code readability. Also make the function inline, per David. Signed-off-by: lvqian Acked-by: David Rientjes Signed-off-by: Vlastimil Babka commit c034c6a45c977fdf33de5974d7def75bda9dcadc Author: SeongJae Park Date: Tue Jan 10 00:51:24 2023 +0000 mm/sl{a,u}b: fix wrong usages of folio_page() for getting head pages The standard idiom for getting head page of a given folio is '&folio->page', but some are wrongly using 'folio_page(folio, 0)' for the purpose. Fix those to use the idiom. Suggested-by: Matthew Wilcox Signed-off-by: SeongJae Park Reviewed-by: David Hildenbrand Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 0e26e1de0032779e43929174339429c16307a299 Author: Peter Zijlstra Date: Thu Jan 12 20:44:05 2023 +0100 context_tracking: Fix noinstr vs KASAN Low level noinstr context-tracking code is calling out to instrumented code on KASAN: vmlinux.o: warning: objtool: __ct_user_enter+0x72: call to __kasan_check_write() leaves .noinstr.text section vmlinux.o: warning: objtool: __ct_user_exit+0x47: call to __kasan_check_write() leaves .noinstr.text section Use even lower level atomic methods to avoid the instrumentation. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230112195542.458034262@infradead.org commit 0e985e9d22864e29d5d2b3d909ad15134d7f6d46 Author: Peter Zijlstra Date: Thu Jan 12 20:44:04 2023 +0100 cpuidle: Add comments about noinstr/__cpuidle usage Add a few words on noinstr / __cpuidle usage. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230112195542.397238052@infradead.org commit 26388a7c353f7b1d3fd8a6df6452fa9773193155 Author: Peter Zijlstra Date: Thu Jan 12 20:44:03 2023 +0100 cpuidle,arch: Mark all regular cpuidle_state:: Enter methods __cpuidle For all cpuidle drivers that do not use CPUIDLE_FLAG_RCU_IDLE (iow, the simple ones) make sure all the functions are marked __cpuidle. ( due to lack of noinstr validation on these platforms it is entirely possible this isn't complete ) Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230112195542.335211484@infradead.org commit 69e26b4f43ed396868c6e7645f9eb06c3a0d2fee Author: Peter Zijlstra Date: Thu Jan 12 20:44:02 2023 +0100 cpuidle, arch: Mark all ct_cpuidle_enter() callers __cpuidle For all cpuidle drivers that use CPUIDLE_FLAG_RCU_IDLE, ensure that all functions that call ct_cpuidle_enter() are marked __cpuidle. ( due to lack of noinstr validation on these platforms it is entirely possible this isn't complete ) Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230112195542.274096325@infradead.org commit 17cc2b5525856d7374f09b28ba1faf1fa61b2352 Author: Peter Zijlstra Date: Thu Jan 12 20:44:01 2023 +0100 cpuidle: Ensure ct_cpuidle_enter() is always called from noinstr/__cpuidle Tracing (kprobes included) and other compiler instrumentation relies on a normal kernel runtime. Therefore all functions that disable RCU should be noinstr, as should all functions that are called while RCU is disabled. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230112195542.212914195@infradead.org commit 1c38b0615f84f622cd6c821aa40be60fc7f7a096 Author: Peter Zijlstra Date: Thu Jan 12 20:44:00 2023 +0100 arm64, riscv, perf: Remove RCU_NONIDLE() usage The PM notifiers should no longer be ran with RCU disabled (per the previous patches), as such this hack is no longer required either. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195542.151174682@infradead.org commit f176d4ccb30747231831f66779697afa6d738b3c Author: Peter Zijlstra Date: Thu Jan 12 20:43:59 2023 +0100 sched/core: Always inline __this_cpu_preempt_check() Quite a few unnecessary instrumentation calls are generated via the no-op __this_cpu_preempt_check() call, if it gets uninlined by the compiler: vmlinux.o: warning: objtool: in_entry_stack+0x9: call to __this_cpu_preempt_check() leaves .noinstr.text section vmlinux.o: warning: objtool: default_do_nmi+0x10: call to __this_cpu_preempt_check() leaves .noinstr.text section vmlinux.o: warning: objtool: fpu_idle_fpregs+0x41: call to __this_cpu_preempt_check() leaves .noinstr.text section vmlinux.o: warning: objtool: kvm_read_and_reset_apf_flags+0x1: call to __this_cpu_preempt_check() leaves .noinstr.text section vmlinux.o: warning: objtool: lockdep_hardirqs_on+0xb0: call to __this_cpu_preempt_check() leaves .noinstr.text section vmlinux.o: warning: objtool: lockdep_hardirqs_off+0xae: call to __this_cpu_preempt_check() leaves .noinstr.text section vmlinux.o: warning: objtool: irqentry_nmi_enter+0x69: call to __this_cpu_preempt_check() leaves .noinstr.text section vmlinux.o: warning: objtool: irqentry_nmi_exit+0x32: call to __this_cpu_preempt_check() leaves .noinstr.text section vmlinux.o: warning: objtool: acpi_processor_ffh_cstate_enter+0x9: call to __this_cpu_preempt_check() leaves .noinstr.text section vmlinux.o: warning: objtool: acpi_idle_enter+0x43: call to __this_cpu_preempt_check() leaves .noinstr.text section vmlinux.o: warning: objtool: acpi_idle_enter_s2idle+0x45: call to __this_cpu_preempt_check() leaves .noinstr.text section Mark it __always_inline. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195542.089981974@infradead.org commit 69d4c0d3218692ffa56b0e1b9c76c50c699d7044 Author: Peter Zijlstra Date: Thu Jan 12 20:43:58 2023 +0100 entry, kasan, x86: Disallow overriding mem*() functions KASAN cannot just hijack the mem*() functions, it needs to emit __asan_mem*() variants if it wants instrumentation (other sanitizers already do this). vmlinux.o: warning: objtool: sync_regs+0x24: call to memcpy() leaves .noinstr.text section vmlinux.o: warning: objtool: vc_switch_off_ist+0xbe: call to memcpy() leaves .noinstr.text section vmlinux.o: warning: objtool: fixup_bad_iret+0x36: call to memset() leaves .noinstr.text section vmlinux.o: warning: objtool: __sev_get_ghcb+0xa0: call to memcpy() leaves .noinstr.text section vmlinux.o: warning: objtool: __sev_put_ghcb+0x35: call to memcpy() leaves .noinstr.text section Remove the weak aliases to ensure nobody hijacks these functions and add them to the noinstr section. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195542.028523143@infradead.org commit 365bd03ff63fb7433a49c453472cf54830b677bf Author: Peter Zijlstra Date: Thu Jan 12 20:43:57 2023 +0100 intel_idle: Add force_irq_on module param For testing purposes. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195541.967699392@infradead.org commit f18b0d7ee815abb33eb1cc540fdde64fbb922d1a Author: Peter Zijlstra Date: Thu Jan 12 20:43:56 2023 +0100 ubsan: Fix objtool UACCESS warns clang-14 allyesconfig gives: vmlinux.o: warning: objtool: emulator_cmpxchg_emulated+0x705: call to __ubsan_handle_load_invalid_value() with UACCESS enabled vmlinux.o: warning: objtool: paging64_update_accessed_dirty_bits+0x39e: call to __ubsan_handle_load_invalid_value() with UACCESS enabled vmlinux.o: warning: objtool: paging32_update_accessed_dirty_bits+0x390: call to __ubsan_handle_load_invalid_value() with UACCESS enabled vmlinux.o: warning: objtool: ept_update_accessed_dirty_bits+0x43f: call to __ubsan_handle_load_invalid_value() with UACCESS enabled Add the required eflags save/restore and whitelist the thing. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195541.906007455@infradead.org commit ca502fc6d9d90c8384eb3e97e964177521d9df48 Author: Peter Zijlstra Date: Thu Jan 12 20:43:55 2023 +0100 cpuidle, clk: Remove trace_.*_rcuidle() OMAP was the one and only user. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Reviewed-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20230112195541.844982902@infradead.org commit db8f50861da6b1129b744da3998587a5cceeffeb Author: Peter Zijlstra Date: Thu Jan 12 20:43:54 2023 +0100 cpuidle, ARM: OMAP2+: powerdomain: Remove trace_.*_rcuidle() OMAP was the one and only user. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Reviewed-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195541.782536366@infradead.org commit 259c95afac6f2758760f158537e1d28358b4639c Author: Peter Zijlstra Date: Thu Jan 12 20:43:53 2023 +0100 arm, OMAP2: Use WFI for omap2_pm_idle() arch_cpu_idle() is a very simple idle interface and exposes only a single idle state and is expected to not require RCU and not do any tracing/instrumentation. As such, omap2_pm_idle() is not a valid implementation. Replace it with a simple (shallow) omap2_do_wfi() call. Omap2 doesn't have a cpuidle driver; but adding one would be the recourse to (re)gain the other idle states. Suggested-by: Tony Lindgren Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195541.721697850@infradead.org commit a282e5ef2954e0bc2740c0c8c278f777933cc4fb Author: Tony Lindgren Date: Thu Jan 12 20:43:52 2023 +0100 cpuidle, OMAP4: Push RCU-idle into omap4_enter_lowpower() OMAP4 uses full SoC suspend modes as idle states, as such it needs the whole power-domain and clock-domain code from the idle path. All that code is not suitable to run with RCU disabled, as such push RCU-idle deeper still. Signed-off-by: Tony Lindgren Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lkml.kernel.org/r/Yqcv6crSNKuSWoTu@atomide.com Link: https://lore.kernel.org/r/20230112195541.660272394@infradead.org commit 8c0956aa76f97003e2ac96e86b00a2a4e82abf8e Author: Peter Zijlstra Date: Thu Jan 12 20:43:51 2023 +0100 cpuidle, OMAP3: Push RCU-idle into omap_sram_idle() OMAP3 uses full SoC suspend modes as idle states, as such it needs the whole power-domain and clock-domain code from the idle path. All that code is not suitable to run with RCU disabled, as such push RCU-idle deeper still. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Reviewed-by: Tony Lindgren Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195541.599561742@infradead.org commit 40dbea961a3d92a7dec92a72c18ee03d33ccc52a Author: Peter Zijlstra Date: Thu Jan 12 20:43:50 2023 +0100 cpuidle, OMAP3: Use WFI for omap3_pm_idle() arch_cpu_idle() is a very simple idle interface and exposes only a single idle state and is expected to not require RCU and not do any tracing/instrumentation. As such, omap_sram_idle() is not a valid implementation. Replace it with the simple (shallow) omap3_do_wfi() call. Leaving the more complicated idle states for the cpuidle driver. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Tony Lindgren Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195541.538053457@infradead.org commit 9aedeaed6fc6fe8452b9b8225e95cc2b8631ff91 Author: Peter Zijlstra Date: Thu Jan 12 20:43:49 2023 +0100 tracing, hardirq: No moar _rcuidle() tracing Robot reported that trace_hardirqs_{on,off}() tickle the forbidden _rcuidle() tracepoint through local_irq_{en,dis}able(). For 'sane' configs, these calls will only happen with RCU enabled and as such can use the regular tracepoint. This also means it's possible to trace them from NMI context again. Reported-by: kernel test robot Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230112195541.477416709@infradead.org commit 408b961146be4c1a776ce285c3c289afab15298a Author: Peter Zijlstra Date: Thu Jan 12 20:43:48 2023 +0100 tracing: WARN on rcuidle ARCH_WANTS_NO_INSTR (a superset of CONFIG_GENERIC_ENTRY) disallows any and all tracing when RCU isn't enabled. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195541.416110581@infradead.org commit dc7305606d480f34d9ed960fcaceac81d0f38436 Author: Peter Zijlstra Date: Thu Jan 12 20:43:47 2023 +0100 tracing: Remove trace_hardirqs_{on,off}_caller() Per commit 56e62a737028 ("s390: convert to generic entry") the last and only callers of trace_hardirqs_{on,off}_caller() went away, clean up. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230112195541.355283994@infradead.org commit 6a123d6ae6ea930b9bb3c595ceac2b2f93039f67 Author: Peter Zijlstra Date: Thu Jan 12 20:43:46 2023 +0100 cpuidle, ACPI: Make noinstr clean objtool found cases where ACPI methods called out into instrumentation code: vmlinux.o: warning: objtool: io_idle+0xc: call to __inb.isra.0() leaves .noinstr.text section vmlinux.o: warning: objtool: acpi_idle_enter+0xfe: call to num_online_cpus() leaves .noinstr.text section vmlinux.o: warning: objtool: acpi_idle_enter+0x115: call to acpi_idle_fallback_to_c1.isra.0() leaves .noinstr.text section Fix this by: marking the IO in/out, acpi_idle_fallback_to_c1() and num_online_cpus() methods as __always_inline. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195541.294846301@infradead.org commit 10fdb38cee36b8dc4775e6fe4ad85e78bafdbd65 Author: Peter Zijlstra Date: Thu Jan 12 20:43:45 2023 +0100 cpuidle, nospec: Make mds_idle_clear_cpu_buffers() noinstr clean objtool found that the mds_idle_clear_cpu_buffers() method got uninlined by the compiler where it called out into instrumentation: vmlinux.o: warning: objtool: mwait_idle+0x47: call to mds_idle_clear_cpu_buffers() leaves .noinstr.text section vmlinux.o: warning: objtool: acpi_processor_ffh_cstate_enter+0xa2: call to mds_idle_clear_cpu_buffers() leaves .noinstr.text section vmlinux.o: warning: objtool: intel_idle+0x91: call to mds_idle_clear_cpu_buffers() leaves .noinstr.text section vmlinux.o: warning: objtool: intel_idle_s2idle+0x8c: call to mds_idle_clear_cpu_buffers() leaves .noinstr.text section vmlinux.o: warning: objtool: intel_idle_irq+0xaa: call to mds_idle_clear_cpu_buffers() leaves .noinstr.text section Solve this by marking mds_idle_clear_cpu_buffers() as __always_inline. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195541.233779815@infradead.org commit 10a099405fdf96c3205ae775abf19fcd301b31b4 Author: Peter Zijlstra Date: Thu Jan 12 20:43:44 2023 +0100 cpuidle, xenpv: Make more PARAVIRT_XXL noinstr clean objtool found a few cases where this code called out into instrumented code: vmlinux.o: warning: objtool: acpi_idle_enter_s2idle+0xde: call to wbinvd() leaves .noinstr.text section vmlinux.o: warning: objtool: default_idle+0x4: call to arch_safe_halt() leaves .noinstr.text section vmlinux.o: warning: objtool: xen_safe_halt+0xa: call to HYPERVISOR_sched_op.constprop.0() leaves .noinstr.text section Solve this by: - marking arch_safe_halt(), wbinvd(), native_wbinvd() and HYPERVISOR_sched_op() as __always_inline(). - Explicitly uninlining xen_safe_halt() and pv_native_wbinvd() [they were already uninlined by the compiler on use as function pointers] and annotating them as 'noinstr'. - Annotating pv_native_safe_halt() as 'noinstr'. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Reviewed-by: Srivatsa S. Bhat (VMware) Reviewed-by: Juergen Gross Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195541.171918174@infradead.org commit c3982c1a36f70bd4521a9852246ea50105912084 Author: Peter Zijlstra Date: Thu Jan 12 20:43:43 2023 +0100 cpuidle, tdx: Make TDX code noinstr clean objtool found a few cases where this code called out into instrumented code: vmlinux.o: warning: objtool: __halt+0x2c: call to hcall_func.constprop.0() leaves .noinstr.text section vmlinux.o: warning: objtool: __halt+0x3f: call to __tdx_hypercall() leaves .noinstr.text section vmlinux.o: warning: objtool: __tdx_hypercall+0x66: call to __tdx_hypercall_failed() leaves .noinstr.text section Fix it by: - moving TDX tdcall assembly methods into .noinstr.text (they are already noistr-clean) - marking __tdx_hypercall_failed() as 'noinstr' - annotating hcall_func() as __always_inline Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195541.111485720@infradead.org commit 2ec8efe64e6dfcaa50906ae4b0b5a0a7e1a54d50 Author: Peter Zijlstra Date: Thu Jan 12 20:43:42 2023 +0100 cpuidle, mwait: Make the mwait code noinstr clean objtool found a few cases where this code called out into instrumented code: vmlinux.o: warning: objtool: intel_idle_s2idle+0x6e: call to __monitor.constprop.0() leaves .noinstr.text section vmlinux.o: warning: objtool: intel_idle_irq+0x8c: call to __monitor.constprop.0() leaves .noinstr.text section vmlinux.o: warning: objtool: intel_idle+0x73: call to __monitor.constprop.0() leaves .noinstr.text section vmlinux.o: warning: objtool: mwait_idle+0x88: call to clflush() leaves .noinstr.text section Fix it by marking the affected methods as __always_inline. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195541.050542952@infradead.org commit e4df1511e1f4bcaa0d590aa7bbffe8bbbd6dfb49 Author: Peter Zijlstra Date: Thu Jan 12 20:43:41 2023 +0100 cpuidle, sched: Remove instrumentation from TIF_{POLLING_NRFLAG,NEED_RESCHED} objtool pointed out that various idle-TIF management methods have instrumentation: vmlinux.o: warning: objtool: mwait_idle+0x5: call to current_set_polling_and_test() leaves .noinstr.text section vmlinux.o: warning: objtool: acpi_processor_ffh_cstate_enter+0xc5: call to current_set_polling_and_test() leaves .noinstr.text section vmlinux.o: warning: objtool: cpu_idle_poll.isra.0+0x73: call to test_ti_thread_flag() leaves .noinstr.text section vmlinux.o: warning: objtool: intel_idle+0xbc: call to current_set_polling_and_test() leaves .noinstr.text section vmlinux.o: warning: objtool: intel_idle_irq+0xea: call to current_set_polling_and_test() leaves .noinstr.text section vmlinux.o: warning: objtool: intel_idle_s2idle+0xb4: call to current_set_polling_and_test() leaves .noinstr.text section vmlinux.o: warning: objtool: intel_idle+0xa6: call to current_clr_polling() leaves .noinstr.text section vmlinux.o: warning: objtool: intel_idle_irq+0xbf: call to current_clr_polling() leaves .noinstr.text section vmlinux.o: warning: objtool: intel_idle_s2idle+0xa1: call to current_clr_polling() leaves .noinstr.text section vmlinux.o: warning: objtool: mwait_idle+0xe: call to __current_set_polling() leaves .noinstr.text section vmlinux.o: warning: objtool: acpi_processor_ffh_cstate_enter+0xc5: call to __current_set_polling() leaves .noinstr.text section vmlinux.o: warning: objtool: cpu_idle_poll.isra.0+0x73: call to test_ti_thread_flag() leaves .noinstr.text section vmlinux.o: warning: objtool: intel_idle+0xbc: call to __current_set_polling() leaves .noinstr.text section vmlinux.o: warning: objtool: intel_idle_irq+0xea: call to __current_set_polling() leaves .noinstr.text section vmlinux.o: warning: objtool: intel_idle_s2idle+0xb4: call to __current_set_polling() leaves .noinstr.text section vmlinux.o: warning: objtool: cpu_idle_poll.isra.0+0x73: call to test_ti_thread_flag() leaves .noinstr.text section vmlinux.o: warning: objtool: intel_idle_s2idle+0x73: call to test_ti_thread_flag.constprop.0() leaves .noinstr.text section vmlinux.o: warning: objtool: intel_idle_irq+0x91: call to test_ti_thread_flag.constprop.0() leaves .noinstr.text section vmlinux.o: warning: objtool: intel_idle+0x78: call to test_ti_thread_flag.constprop.0() leaves .noinstr.text section vmlinux.o: warning: objtool: acpi_safe_halt+0xf: call to test_ti_thread_flag.constprop.0() leaves .noinstr.text section Remove the instrumentation, because these methods are used in low-level cpuidle code moving between states, that should not be instrumented. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195540.988741683@infradead.org commit e3ee5e66f78e9950b9ada276700abd95e9b144d7 Author: Peter Zijlstra Date: Thu Jan 12 20:43:40 2023 +0100 time/tick-broadcast: Remove RCU_NONIDLE() usage No callers left that have already disabled RCU. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Mark Rutland Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195540.927904612@infradead.org commit 880970b56b732b158385991b232592144256f330 Author: Peter Zijlstra Date: Thu Jan 12 20:43:39 2023 +0100 printk: Remove trace_.*_rcuidle() usage The problem, per commit fc98c3c8c9dc ("printk: use rcuidle console tracepoint"), was printk usage from the cpuidle path where RCU was already disabled. Per the patches earlier in this series, this is no longer the case. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Reviewed-by: Sergey Senozhatsky Acked-by: Petr Mladek Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195540.865735001@infradead.org commit 4a3182e6d62c95f8572630c22aafee2306cfea58 Author: Peter Zijlstra Date: Thu Jan 12 20:43:38 2023 +0100 arm64, smp: Remove trace_.*_rcuidle() usage Ever since commit d3afc7f12987 ("arm64: Allow IPIs to be handled as normal interrupts") this function is called in regular IRQ context. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Mark Rutland Acked-by: Marc Zyngier Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195540.804410487@infradead.org commit 08a56e07cd3cb91dc700ba0a879d17e4879dd617 Author: Peter Zijlstra Date: Thu Jan 12 20:43:37 2023 +0100 arm, smp: Remove trace_.*_rcuidle() usage None of these functions should ever be ran with RCU disabled anymore. Specifically, do_handle_IPI() is only called from handle_IPI() which explicitly does irq_enter()/irq_exit() which ensures RCU is watching. The problem with smp_cross_call() was, per commit description: 7c64cc0531fa ("arm: Use _rcuidle for smp_cross_call() tracepoints") ... that cpuidle_enter_state_coupled() already had RCU disabled, but that's long been fixed by commit: 1098582a0f6c ("sched,idle,rcu: Push rcu_idle deeper into the idle path") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Reviewed-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195540.743432118@infradead.org commit e80a48bade619ec5a92230b3d4ae84bfc2746822 Author: Peter Zijlstra Date: Thu Jan 12 20:43:36 2023 +0100 x86/tdx: Remove TDX_HCALL_ISSUE_STI Now that arch_cpu_idle() is expected to return with IRQs disabled, avoid the useless STI/CLI dance. Per the specs this is supposed to work, but nobody has yet relied up this behaviour so broken implementations are possible. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195540.682137572@infradead.org commit 89b3098703bd2aa3237ef10a704e6a5838e6ea69 Author: Peter Zijlstra Date: Thu Jan 12 20:43:35 2023 +0100 arch/idle: Change arch_cpu_idle() behavior: always exit with IRQs disabled Current arch_cpu_idle() is called with IRQs disabled, but will return with IRQs enabled. However, the very first thing the generic code does after calling arch_cpu_idle() is raw_local_irq_disable(). This means that architectures that can idle with IRQs disabled end up doing a pointless 'enable-disable' dance. Therefore, push this IRQ disabling into the idle function, meaning that those architectures can avoid the pointless IRQ state flipping. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Reviewed-by: Gautham R. Shenoy Acked-by: Mark Rutland [arm64] Acked-by: Rafael J. Wysocki Acked-by: Guo Ren Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195540.618076436@infradead.org commit 9b461a6faae7b220c32466261965778b10189e54 Author: Peter Zijlstra Date: Thu Jan 12 20:43:34 2023 +0100 cpuidle, intel_idle: Fix CPUIDLE_FLAG_IBRS objtool to the rescue: vmlinux.o: warning: objtool: intel_idle_ibrs+0x17: call to spec_ctrl_current() leaves .noinstr.text section vmlinux.o: warning: objtool: intel_idle_ibrs+0x27: call to wrmsrl.constprop.0() leaves .noinstr.text section Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195540.556912863@infradead.org commit 821ad23d0eaff73ef599ece39ecc77482df20a8c Author: Peter Zijlstra Date: Thu Jan 12 20:43:33 2023 +0100 cpuidle, intel_idle: Fix CPUIDLE_FLAG_INIT_XSTATE Fix instrumentation bugs objtool found: vmlinux.o: warning: objtool: intel_idle_s2idle+0xd5: call to fpu_idle_fpregs() leaves .noinstr.text section vmlinux.o: warning: objtool: intel_idle_xstate+0x11: call to fpu_idle_fpregs() leaves .noinstr.text section vmlinux.o: warning: objtool: fpu_idle_fpregs+0x9: call to xfeatures_in_use() leaves .noinstr.text section Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195540.494977795@infradead.org commit 6d9c7f51b1d9179bf7c3542267c656a934e8af23 Author: Peter Zijlstra Date: Thu Jan 12 20:43:32 2023 +0100 cpuidle, intel_idle: Fix CPUIDLE_FLAG_IRQ_ENABLE *again* So objtool found this bug: vmlinux.o: warning: objtool: intel_idle_irq+0x10c: call to trace_hardirqs_off() leaves .noinstr.text section As per commit 32d4fd5751ea ("cpuidle,intel_idle: Fix CPUIDLE_FLAG_IRQ_ENABLE"): "must not have tracing in idle functions" Clearly people can't read and tinker along until splat dissapears. This straight up reverts commit d295ad34f236 ("intel_idle: Fix false positive RCU splats due to incorrect hardirqs state"). It doesn't re-introduce the problem because preceding patches fixed it properly. Fixes: d295ad34f236 ("intel_idle: Fix false positive RCU splats due to incorrect hardirqs state") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195540.434302128@infradead.org commit 2b5a0e425e6e319b1978db1e9564f6af4228a567 Author: Peter Zijlstra Date: Thu Jan 12 20:43:31 2023 +0100 objtool/idle: Validate __cpuidle code as noinstr Idle code is very like entry code in that RCU isn't available. As such, add a little validation. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Geert Uytterhoeven Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195540.373461409@infradead.org commit 00717eb8c9557b5fcdd338db6faef532f6991d63 Author: Peter Zijlstra Date: Thu Jan 12 20:43:30 2023 +0100 cpuidle: Annotate poll_idle() The __cpuidle functions will become a noinstr class, as such they need explicit annotations. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Reviewed-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195540.312601331@infradead.org commit 8ce78470bf2dd1d08107736e813fa62e09aa4647 Author: Peter Zijlstra Date: Thu Jan 12 20:43:29 2023 +0100 acpi_idle: Remove tracing All the idle routines are called with RCU disabled, as such there must not be any tracing inside. While there; clean-up the io-port idle thing. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195540.251666856@infradead.org commit 924aed1646bf2859726f7e5dd9265ba14358fbb8 Author: Peter Zijlstra Date: Thu Jan 12 20:43:28 2023 +0100 cpuidle, cpu_pm: Remove RCU fiddling from cpu_pm_{enter,exit}() All callers should still have RCU enabled. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Reviewed-by: Ulf Hansson Acked-by: Mark Rutland Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195540.190860672@infradead.org commit a01353cf1896ea5b8a7bbc5e2b2d38feed8b7aaa Author: Peter Zijlstra Date: Thu Jan 12 20:43:27 2023 +0100 cpuidle: Fix ct_idle_*() usage The whole disable-RCU, enable-IRQS dance is very intricate since changing IRQ state is traced, which depends on RCU. Add two helpers for the cpuidle case that mirror the entry code: ct_cpuidle_enter() ct_cpuidle_exit() And fix all the cases where the enter/exit dance was buggy. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195540.130014793@infradead.org commit 0c5ffc3d7b15978c6b184938cd6b8af06e436424 Author: Peter Zijlstra Date: Thu Jan 12 20:43:26 2023 +0100 cpuidle, dt: Push RCU-idle into driver Doing RCU-idle outside the driver, only to then temporarily enable it again before going idle is suboptimal. Notably: this converts all dt_init_idle_driver() and __CPU_PM_CPU_IDLE_ENTER() users for they are inextrably intertwined. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195540.068981667@infradead.org commit 12a18bb74f7500693bdfb6af2f99c05d2d43f9c6 Author: Krzysztof Kozlowski Date: Fri Dec 30 14:56:43 2022 +0100 dt-bindings: pinctrl: qcom: allow nine interrupts on SM6350 Almost all Qualcomm SoC Top Level Mode Multiplexers come with only summary interrupt. SM6350 is different because downstream and upstream DTS have nine of the interrupts. Allow such variation. Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221230135645.56401-7-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit c3d42418dca53d6c498a48c408f7a45289593650 Author: Peter Zijlstra Date: Thu Jan 12 20:43:25 2023 +0100 cpuidle, OMAP4: Push RCU-idle into driver Doing RCU-idle outside the driver, only to then temporarily enable it again, some *four* times, before going idle is suboptimal. Notably three times explicitly using RCU_NONIDLE() and once implicitly through cpu_pm_*(). Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Reviewed-by: Frederic Weisbecker Reviewed-by: Tony Lindgren Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230112195540.007918454@infradead.org commit 45277153d46500ce7f4a1637412f0db7c208300a Author: Krzysztof Kozlowski Date: Fri Dec 30 14:56:42 2022 +0100 dt-bindings: pinctrl: qcom,sm8350-tlmm: correct pins pattern SM8350 TLMM pin controller has GPIOs 0-202. Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221230135645.56401-6-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 72283404c2bc82bd7f7196a58f0e14b948e77173 Author: Krzysztof Kozlowski Date: Fri Dec 30 14:56:41 2022 +0100 dt-bindings: pinctrl: qcom,sm6350-tlmm: correct pins pattern SM6350 TLMM pin controller has GPIOs 0-155. Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221230135645.56401-5-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 86a8754b08de4d9d5bd1f31b56283efb8763b8c7 Author: Krzysztof Kozlowski Date: Fri Dec 30 14:56:40 2022 +0100 dt-bindings: pinctrl: qcom,sm8350-tlmm: add gpio-line-names Allow gpio-line-names property (quite commonly used) and constrain gpio-reserved-ranges: sm8350-sony-xperia-sagami-pdx215.dtb: pinctrl@f100000: 'gpio-line-names' does not match any of the regexes: '-state$', 'pinctrl-[0-9]+' Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221230135645.56401-4-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit d3431ec2f7cc0bb77f367d27d68fc79650ece864 Author: Krzysztof Kozlowski Date: Fri Dec 30 14:56:39 2022 +0100 dt-bindings: pinctrl: qcom,sm6350-tlmm: add gpio-line-names Allow gpio-line-names property (quite commonly used) and constrain gpio-reserved-ranges. Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221230135645.56401-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 4ce40e9dbe83153f60d7e4ccd24a1eb4f8264f6a Author: Peter Zijlstra Date: Thu Jan 12 20:43:24 2023 +0100 cpuidle, armada: Push RCU-idle into driver Doing RCU-idle outside the driver, only to then temporarily enable it again before going idle is suboptimal. Notably the cpu_pm_*() calls implicitly re-enable RCU for a bit. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Reviewed-by: Frederic Weisbecker Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230112195539.946630819@infradead.org commit a880fafbbac7e229752fb59bed56f55944dbe0e9 Author: Krzysztof Kozlowski Date: Fri Dec 30 14:56:38 2022 +0100 dt-bindings: pinctrl: qcom,sc8280xp-lpass-lpi: add input-enable and bias-bus-hold Allow bias-bus-hold and input-enable properties (already used in SC8280XP LPASS LPI nodes): sa8540p-ride.dtb: pinctrl@33c0000: tx-swr-default-state: 'oneOf' conditional failed, one must be fixed: 'pins' is a required property 'function' is a required property 'clk-pins', 'data-pins' do not match any of the regexes: 'pinctrl-[0-9]+' 'bias-bus-hold' does not match any of the regexes: 'pinctrl-[0-9]+' Link: https://lore.kernel.org/r/20221230135645.56401-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 4d1be9e745382b41492b0cb9000829863db7133a Author: Peter Zijlstra Date: Thu Jan 12 20:43:23 2023 +0100 cpuidle, OMAP3: Push RCU-idle into driver Doing RCU-idle outside the driver, only to then teporarily enable it again before going idle is suboptimal. Notably the cpu_pm_*() calls implicitly re-enable RCU for a bit. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Reviewed-by: Frederic Weisbecker Reviewed-by: Tony Lindgren Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230112195539.883561913@infradead.org commit 3c90b1ba8cc49b3c485e4477b9977e52a16509d3 Author: Krzysztof Kozlowski Date: Fri Dec 30 14:56:37 2022 +0100 dt-bindings: pinctrl: qcom,sc8280xp-lpass-lpi: correct pins pattern SC8280XP LPASS LPI pin controller has GPIO 0-18: sa8540p-ride.dtb: pinctrl@33c0000: tx-swr-default-state: 'oneOf' conditional failed, one must be fixed: 'pins' is a required property 'function' is a required property 'clk-pins', 'data-pins' do not match any of the regexes: 'pinctrl-[0-9]+' 'bias-bus-hold' does not match any of the regexes: 'pinctrl-[0-9]+' 'gpio2' does not match '^gpio([0-1]|1[0-8])$' Fixes: 958bb025f5b3 ("dt-bindings: pinctrl: qcom: Add sc8280xp lpass lpi pinctrl bindings") Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221230135645.56401-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit b3f46658ce40a3467cda82f920dd9d5325ab0eaf Author: Peter Zijlstra Date: Thu Jan 12 20:43:22 2023 +0100 cpuidle, ARM/imx6: Push RCU-idle into driver Doing RCU-idle outside the driver, only to then temporarily enable it again, at least twice, before going idle is suboptimal. Notably both cpu_pm_enter() and cpu_cluster_pm_enter() implicity re-enable RCU. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Reviewed-by: Frederic Weisbecker Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230112195539.821714572@infradead.org commit d0931f1d5e9c1655cfa8128edd14e813b4044801 Author: Krzysztof Kozlowski Date: Fri Nov 25 15:41:39 2022 +0100 arm64: dts: hisilicon: align LED node names with dtschema The node names should be generic and DT schema expects certain pattern: hisilicon/hi3660-hikey960.dtb: leds: wlan_active_led: Unevaluated properties are not allowed ('linux,default-trigger' was unexpected) Link: https://lore.kernel.org/r/20221125144140.477225-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 3a48b303d44a19d335910f825f9a8473c5ff35e0 Author: Krzysztof Kozlowski Date: Fri Nov 25 15:41:30 2022 +0100 ARM: dts: at91: align LED node names with dtschema The node names should be generic and DT schema expects certain pattern: at91-sama5d2_ptc_ek.dtb: leds: 'blue', 'green', 'red' do not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' Link: https://lore.kernel.org/r/20221125144131.477089-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 30a39ce8fb67d29d475f2bd8442039ac0d09a43c Author: Krzysztof Kozlowski Date: Fri Nov 25 15:41:25 2022 +0100 ARM: dts: dove: align LED node names with dtschema The node names should be generic and DT schema expects certain pattern: dove-cubox.dtb: leds: 'power' does not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' Link: https://lore.kernel.org/r/20221125144125.477032-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit e2bb8c4f8ceff39620093596426ed1143326362e Author: Krzysztof Kozlowski Date: Fri Nov 25 15:41:23 2022 +0100 ARM: dts: keystone: align LED node names with dtschema The node names should be generic and DT schema expects certain pattern: keystone-k2hk-evm.dtb: leds: 'debug1_1', 'debug1_2', 'debug2', 'debug3' do not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' Link: https://lore.kernel.org/r/20221125144123.477005-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 0cf125ef4e408573fe18e6b47a7e3080af2c04a4 Author: Krzysztof Kozlowski Date: Sun Dec 4 19:33:53 2022 +0100 ARM: dts: stih410: align HDMI CEC node names with dtschema The bindings expect "cec" for HDMI CEC node. Reviewed-by: Patrice Chotard Link: https://lore.kernel.org/r/20221204183353.140002-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 189d80108620722ef43d11307db18ef29df49916 Author: Krzysztof Kozlowski Date: Sat Dec 10 12:33:49 2022 +0100 ARM: dts: socfpga: drop 0x from unit address By coding style, unit address should not start with 0x. Link: https://lore.kernel.org/r/20221210113349.63971-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit e76d8a16d12fc3fbcf212dd1a38974b99d751613 Author: Krzysztof Kozlowski Date: Sat Dec 10 12:33:43 2022 +0100 arm64: dts: microchip: drop 0x from unit address By coding style, unit address should not start with 0x. Link: https://lore.kernel.org/r/20221210113343.63864-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 6e6eda44b939c0931533d6681d9f2ed41b44cde9 Author: Yunhui Cui Date: Wed Jan 11 14:59:30 2023 +0800 sock: add tracepoint for send recv length Add 2 tracepoints to monitor the tcp/udp traffic of per process and per cgroup. Regarding monitoring the tcp/udp traffic of each process, there are two existing solutions, the first one is https://www.atoptool.nl/netatop.php. The second is via kprobe/kretprobe. Netatop solution is implemented by registering the hook function at the hook point provided by the netfilter framework. These hook functions may be in the soft interrupt context and cannot directly obtain the pid. Some data structures are added to bind packets and processes. For example, struct taskinfobucket, struct taskinfo ... Every time the process sends and receives packets it needs multiple hashmaps,resulting in low performance and it has the problem fo inaccurate tcp/udp traffic statistics(for example: multiple threads share sockets). We can obtain the information with kretprobe, but as we know, kprobe gets the result by trappig in an exception, which loses performance compared to tracepoint. We compared the performance of tracepoints with the above two methods, and the results are as follows: ab -n 1000000 -c 1000 -r http://127.0.0.1/index.html without trace: Time per request: 39.660 [ms] (mean) Time per request: 0.040 [ms] (mean, across all concurrent requests) netatop: Time per request: 50.717 [ms] (mean) Time per request: 0.051 [ms] (mean, across all concurrent requests) kr: Time per request: 43.168 [ms] (mean) Time per request: 0.043 [ms] (mean, across all concurrent requests) tracepoint: Time per request: 41.004 [ms] (mean) Time per request: 0.041 [ms] (mean, across all concurrent requests It can be seen that tracepoint has better performance. Signed-off-by: Yunhui Cui Signed-off-by: Xiongchun Duan Reviewed-by: Steven Rostedt (Google) Signed-off-by: David S. Miller commit 8e8b6c63ccdc02b5f52e782a6956195969c79d41 Merge: 9a06cce6e3118 db8a563a9d902 Author: David S. Miller Date: Fri Jan 13 10:23:52 2023 +0000 Merge branch 'rmnet-tx-pkt-aggregation' Daniele Palmas says: ==================== net: add tx packets aggregation to ethtool and rmnet Hello maintainers and all, this patchset implements tx qmap packets aggregation in rmnet and generic ethtool support for that. Some low-cat Thread-x based modems are not capable of properly reaching the maximum allowed throughput both in tx and rx during a bidirectional test if tx packets aggregation is not enabled. I verified this problem with rmnet + qmi_wwan by using a MDM9207 Cat. 4 based modem (50Mbps/150Mbps max throughput). What is actually happening is pictured at https://drive.google.com/file/d/1gSbozrtd9h0X63i6vdkNpN68d-9sg8f9/view Testing with iperf TCP, when rx and tx flows are tested singularly there's no issue in tx and minor issues in rx (not able to reach max throughput). When there are concurrent tx and rx flows, tx throughput has an huge drop. rx a minor one, but still present. The same scenario with tx aggregation enabled is pictured at https://drive.google.com/file/d/1jcVIKNZD7K3lHtwKE5W02mpaloudYYih/view showing a regular graph. This issue does not happen with high-cat modems (e.g. SDX20), or at least it does not happen at the throughputs I'm able to test currently: maybe the same could happen when moving close to the maximum rates supported by those modems. Anyway, having the tx aggregation enabled should not hurt. The first attempt to solve this issue was in qmi_wwan qmap implementation, see the discussion at https://lore.kernel.org/netdev/20221019132503.6783-1-dnlplm@gmail.com/ However, it turned out that rmnet was a better candidate for the implementation. Moreover, Greg and Jakub suggested also to use ethtool for the configuration: not sure if I got their advice right, but this patchset add also generic ethtool support for tx aggregation. The patches have been tested mainly against an MDM9207 based modem through USB and SDX55 through PCI (MHI). v2 should address the comments highlighted in the review: the implementation is still in rmnet, due to Subash's request of keeping tx aggregation there. v3 fixes ethtool-netlink.rst content out of table bounds and a W=1 build warning for patch 2. v4 solves a race related to egress_agg_params. ==================== Signed-off-by: David S. Miller commit db8a563a9d9024adee53c8547fea40f8743b16c3 Author: Daniele Palmas Date: Wed Jan 11 14:05:20 2023 +0100 net: qualcomm: rmnet: add ethtool support for configuring tx aggregation Add support for ETHTOOL_COALESCE_TX_AGGR for configuring the tx aggregation settings. Signed-off-by: Daniele Palmas Signed-off-by: David S. Miller commit 64b5d1f8f2d1b3f039cfb0dd8035892015543e58 Author: Daniele Palmas Date: Wed Jan 11 14:05:19 2023 +0100 net: qualcomm: rmnet: add tx packets aggregation Add tx packets aggregation. Bidirectional TCP throughput tests through iperf with low-cat Thread-x based modems revelead performance issues both in tx and rx. The Windows driver does not show this issue: inspecting USB packets revealed that the only notable change is the driver enabling tx packets aggregation. Tx packets aggregation is by default disabled and can be enabled by increasing the value of ETHTOOL_A_COALESCE_TX_MAX_AGGR_FRAMES. The maximum aggregated size is by default set to a reasonably low value in order to support the majority of modems. This implementation is based on patches available in Code Aurora repositories (msm kernel) whose main authors are Subash Abhinov Kasiviswanathan Sean Tranchetti Signed-off-by: Daniele Palmas Reviewed-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller commit 31de2842399ae68c4b2887ffeaedebb7934f343e Author: Daniele Palmas Date: Wed Jan 11 14:05:18 2023 +0100 ethtool: add tx aggregation parameters Add the following ethtool tx aggregation parameters: ETHTOOL_A_COALESCE_TX_AGGR_MAX_BYTES Maximum size in bytes of a tx aggregated block of frames. ETHTOOL_A_COALESCE_TX_AGGR_MAX_FRAMES Maximum number of frames that can be aggregated into a block. ETHTOOL_A_COALESCE_TX_AGGR_TIME_USECS Time in usecs after the first packet arrival in an aggregated block for the block to be sent. Signed-off-by: Daniele Palmas Signed-off-by: David S. Miller commit e038f7b8028a1d1bc8ac82351c71ea538f19a879 Author: Peter Zijlstra Date: Thu Jan 12 20:43:21 2023 +0100 cpuidle, psci: Push RCU-idle into driver Doing RCU-idle outside the driver, only to then temporarily enable it again, at least twice, before going idle is suboptimal. Notably once implicitly through the cpu_pm_*() calls and once explicitly doing ct_irq_*_irqon(). Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Kajetan Puchalski Tested-by: Tony Lindgren Tested-by: Ulf Hansson Reviewed-by: Frederic Weisbecker Reviewed-by: Guo Ren Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230112195539.760296658@infradead.org commit 5fca0d9f5d76664786ca6c09076341def165a677 Author: Peter Zijlstra Date: Thu Jan 12 20:43:20 2023 +0100 cpuidle, tegra: Push RCU-idle into driver Doing RCU-idle outside the driver, only to then temporarily enable it again, at least twice, before going idle is suboptimal. Notably once implicitly through the cpu_pm_*() calls and once explicitly doing RCU_NONIDLE(). Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Reviewed-by: Frederic Weisbecker Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230112195539.699546331@infradead.org commit 8e9ab9e8da1eae61fdff35690d998eaf8cd527dc Author: Peter Zijlstra Date: Thu Jan 12 20:43:19 2023 +0100 cpuidle, riscv: Push RCU-idle into driver Doing RCU-idle outside the driver, only to then temporarily enable it again, at least twice, before going idle is suboptimal. That is, once implicitly through the cpu_pm_*() calls and once explicitly doing ct_irq_*_irqon(). Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Reviewed-by: Anup Patel Reviewed-by: Frederic Weisbecker Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230112195539.637185846@infradead.org commit bb7b11258561e47abbacebf76e3ce4092953dfdf Author: Peter Zijlstra Date: Thu Jan 12 20:43:18 2023 +0100 cpuidle: Move IRQ state validation Make cpuidle_enter_state() consistent with the s2idle variant and verify ->enter() always returns with interrupts disabled. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195539.576412812@infradead.org commit 5e26aa93391195a64871db5d96d7163f0062ca4f Author: Peter Zijlstra Date: Thu Jan 12 20:43:17 2023 +0100 cpuidle/poll: Ensure IRQs stay disabled after cpuidle_state::enter() calls Make cpuidle_state::enter() methods IRQ state invariant on exit. Additionally make sure to use raw_local_irq_*() methods since this cpuidle callback will be called with RCU already disabled. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Reviewed-by: Rafael J. Wysocki Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195539.515253662@infradead.org commit aaa3896b969bdf946e0fd6aa6199da17b5da8d5c Author: Peter Zijlstra Date: Thu Jan 12 20:43:16 2023 +0100 x86/idle: Replace 'x86_idle' function pointer with a static_call Typical boot time setup; no need to suffer an indirect call for that. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Reviewed-by: Frederic Weisbecker Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230112195539.453613251@infradead.org commit 1f7c232ee080f01ded1236685a357f8926e8c7d5 Author: Peter Zijlstra Date: Thu Jan 12 20:43:15 2023 +0100 x86/perf/amd: Remove tracing from perf_lopwr_cb() The perf_lopwr_cb() function is called from the idle routines; there is no RCU there, we must not enter tracing. Use __always_inline, noidle annotations and existing no-trace methods. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195539.392862891@infradead.org commit 92cbbadf73f45c5d8bb26ed8668ff59671ff21e6 Author: H. Peter Anvin (Intel) Date: Wed Jan 11 23:20:32 2023 -0800 x86/gsseg: Use the LKGS instruction if available for load_gs_index() The LKGS instruction atomically loads a segment descriptor into the %gs descriptor registers, *except* that %gs.base is unchanged, and the base is instead loaded into MSR_IA32_KERNEL_GS_BASE, which is exactly what we want this function to do. Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Xin Li Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20230112072032.35626-6-xin3.li@intel.com Cc: Andy Lutomirski Cc: Dave Hansen Cc: Linus Torvalds commit 9eef05e606387b597a86d071f3d72e8ee3e68df7 Author: Krzysztof Kozlowski Date: Mon Nov 21 09:12:21 2022 +0100 dt-bindings: pinctrl: qcom,sdm845-pinctrl: add GPIO hogs Allow GPIO hogs in pin controller node. qcom/sdm845-cheza.dtsi already uses it. Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221121081221.30745-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit acdebd8b4c0c90ec3debe3def0460f07d27504bb Author: Takashi Sakamoto Date: Thu Jan 12 21:09:54 2023 +0900 ALSA: fireface: implement message parser for Fireface 400 This commit implements message parser for Fireface 400 to pass data of knob control to user space. The parser has FIFO which can store maximum 32 events without no overrun detection since it doesn't matter to lose the event. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230112120954.500692-7-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit c31909fa06930e9d5821219ac6a9980a6b8cf2b8 Author: Takashi Sakamoto Date: Thu Jan 12 21:09:53 2023 +0900 ALSA: fireface: add local framework to message parser This commit adds local framework to message parser. This is preparation for future work to pass event of knob control for Fireface 400 to user space. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230112120954.500692-6-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit ab811cfffa949946ebcfd6e280d4dc37c7f0f602 Author: Takashi Sakamoto Date: Thu Jan 12 21:09:52 2023 +0900 ALSA: fireface: update UAPI for data of knob control This commit adds a new event of knob control specific to RME Fireface 400. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230112120954.500692-5-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit aed713bfaec489e6f29c05ece1367336368aee8d Author: Takashi Sakamoto Date: Thu Jan 12 21:09:51 2023 +0900 ALSA: fireface: add helper function to parse MIDI messages transmitted by Fireface 400 This is minor code refactoring to add helper function to parse MIDI message bytes in quadlet message. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230112120954.500692-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 4bdcb8d28f3af8ea54906d0135f4a93b3dfcb4d5 Author: Takashi Sakamoto Date: Thu Jan 12 21:09:50 2023 +0900 ALSA: fireface: pick up time stamp for request subaction of asynchronous transaction The time stamp of isochronous cycle at which asynchronous transaction is sent is perhaps useful somehow. A commit b2405aa948b9 ("firewire: add kernel API to access packet structure in request structure for AR context") adds kernel API to retrieve the time stamp in inner structure of request subaction. This commit changes local framework to handle message delivered by the asynchronous transaction so that time stamp is picked up by the kernel API. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230112120954.500692-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 50c597c77ccc2e4c5870979ff1fe250e1671db2b Author: Takashi Sakamoto Date: Thu Jan 12 21:09:49 2023 +0900 ALSA: fireface: rename callback functions It's cleared that Fireface 400 transmits quadlet message for two purposes at least; received MIDI messages and notification of knob control operation. Nevertheless current implementation uses callback function name just for MIDI messages. This commit renames the callback functions. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230112120954.500692-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit d912a35a6749f4fe3558a5ddfeb87097c697f524 Author: Cai Huoqing Date: Sat Dec 3 18:23:01 2022 +0800 MAINTAINERS: Remove some obsolete drivers info(tdfx, mga, i810, savage, r128, sis) Commit 399516ab0fee ("MAINTAINERS: Add a bunch of legacy (UMS) DRM drivers") marked these drivers obsolete 7 years ago. And the mesa UMD of this drm driver already in deprecated list in the link: https://docs.mesa3d.org/systems.html 3dfx Glide-->driver/gpu/drm/tdfx Matrox-->driver/gpu/drm/mga Intel i810-->driver/gpu/drm/i810 S3 Savage-->drivers/gpu/drm/savage ATI Rage 128->drivers/gpu/drm/r128 Silicon Integrated Systems->drivers/gpu/drm/sis It's time to remove these drivers. Signed-off-by: Cai Huoqing Acked-by: Daniel Vetter Acked-by: Dave Airlie Acked-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20221203102502.3185-11-cai.huoqing@linux.dev commit a276afc19eecd369b430b0ffc425bdf15bf8f932 Author: Cai Huoqing Date: Sat Dec 3 18:23:00 2022 +0800 drm: Remove some obsolete drm pciids(tdfx, mga, i810, savage, r128, sis, via) Commit 399516ab0fee ("MAINTAINERS: Add a bunch of legacy (UMS) DRM drivers") marked these drivers obsolete 7 years ago. And the mesa UMD of this drm driver already in deprecated list in the link: https://docs.mesa3d.org/systems.html 3dfx Glide-->driver/gpu/drm/tdfx Matrox-->driver/gpu/drm/mga Intel i810-->driver/gpu/drm/i810 S3 Savage-->drivers/gpu/drm/savage ATI Rage 128->drivers/gpu/drm/r128 Silicon Integrated Systems->drivers/gpu/drm/sis VIA Unichrome->drivers/gpu/drm/via It's time to remove these drivers. Signed-off-by: Cai Huoqing Acked-by: Daniel Vetter Acked-by: Dave Airlie Acked-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20221203102502.3185-10-cai.huoqing@linux.dev commit 44989ea3582cb3500368f4915db15070b06cd12b Author: Cai Huoqing Date: Sat Dec 3 18:22:59 2022 +0800 drm: Add comments to Kconfig Add comments to avoid removing DRM_LEGACY config menu, because DRM_LEGACY menu could list other legacy drivers. Signed-off-by: Cai Huoqing Acked-by: Daniel Vetter Acked-by: Dave Airlie Acked-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20221203102502.3185-9-cai.huoqing@linux.dev commit 8391e000065d4fac88548e071fc43c3e07cb7047 Author: Cai Huoqing Date: Sat Dec 3 18:22:58 2022 +0800 drm: Remove the obsolete driver-via Commit 399516ab0fee ("MAINTAINERS: Add a bunch of legacy (UMS) DRM drivers") marked via driver obsolete 7 years ago. And the mesa UMD of this drm driver already in deprecated list in the link: https://docs.mesa3d.org/systems.html VIA Unichrome->drivers/gpu/drm/via It's time to remove this driver. Signed-off-by: Cai Huoqing Acked-by: Daniel Vetter Acked-by: Dave Airlie Acked-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20221203102502.3185-8-cai.huoqing@linux.dev commit cfc8860eacec5da2ee2880c502b10daf196c6cbb Author: Cai Huoqing Date: Sat Dec 3 18:22:57 2022 +0800 drm: Remove the obsolete driver-tdfx Commit 399516ab0fee ("MAINTAINERS: Add a bunch of legacy (UMS) DRM drivers") marked tdfx driver obsolete 7 years ago. And the mesa UMD of this drm driver already in deprecated list in the link: https://docs.mesa3d.org/systems.html 3dfx Glide-->driver/gpu/drm/tdfx It's time to remove this driver. Signed-off-by: Cai Huoqing Acked-by: Daniel Vetter Acked-by: Dave Airlie Acked-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20221203102502.3185-7-cai.huoqing@linux.dev commit 20efabc2e80be1df79510b8be9ca004d3ce9be11 Author: Cai Huoqing Date: Sat Dec 3 18:22:56 2022 +0800 drm: Remove the obsolete driver-sis Commit 399516ab0fee ("MAINTAINERS: Add a bunch of legacy (UMS) DRM drivers") marked sis driver obsolete 7 years ago. And the mesa UMD of this drm driver already in deprecated list in the link: https://docs.mesa3d.org/systems.html Silicon Integrated Systems->drivers/gpu/drm/sis It's time to remove this driver. Signed-off-by: Cai Huoqing Acked-by: Daniel Vetter Acked-by: Dave Airlie Acked-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20221203102502.3185-6-cai.huoqing@linux.dev commit 7872bc2cb13e4dd83d193d50a835e179f449ab07 Author: Cai Huoqing Date: Sat Dec 3 18:22:55 2022 +0800 drm: Remove the obsolete driver-savage Commit 399516ab0fee ("MAINTAINERS: Add a bunch of legacy (UMS) DRM drivers") marked savage driver obsolete 7 years ago. And the mesa UMD of this drm driver already in deprecated list in the link: https://docs.mesa3d.org/systems.html S3 Savage-->drivers/gpu/drm/savage It's time to remove this driver. Signed-off-by: Cai Huoqing Acked-by: Daniel Vetter Acked-by: Dave Airlie Acked-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20221203102502.3185-5-cai.huoqing@linux.dev commit 28483b8666bfe7d0ec34cfc492d77e64f97f6de1 Author: Cai Huoqing Date: Sat Dec 3 18:22:54 2022 +0800 drm: Remove the obsolete driver-r128 Commit 399516ab0fee ("MAINTAINERS: Add a bunch of legacy (UMS) DRM drivers") marked r128 driver obsolete 7 years ago. And the mesa UMD of this drm driver already in deprecated list in the link: https://docs.mesa3d.org/systems.html ATI Rage 128->drivers/gpu/drm/r128 It's time to remove this driver. Signed-off-by: Cai Huoqing Acked-by: Daniel Vetter Acked-by: Dave Airlie Acked-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20221203102502.3185-4-cai.huoqing@linux.dev commit 96ed7db55bef1db201aaaef2761416c4e64e1245 Author: Cai Huoqing Date: Sat Dec 3 18:22:53 2022 +0800 drm: Remove the obsolete driver-mga Commit 399516ab0fee ("MAINTAINERS: Add a bunch of legacy (UMS) DRM drivers") marked mga driver obsolete 7 years ago. And the mesa UMD of this drm driver already in deprecated list in the link: https://docs.mesa3d.org/systems.html Matrox-->driver/gpu/drm/mga It's time to remove this driver. Signed-off-by: Cai Huoqing Acked-by: Daniel Vetter Acked-by: Dave Airlie Acked-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20221203102502.3185-3-cai.huoqing@linux.dev commit 9a06cce6e3118036e73efa8cef0005a1a94f9fe0 Merge: 72863e08c3935 168a5940c7452 Author: David S. Miller Date: Fri Jan 13 08:40:41 2023 +0000 Merge branch 'dsa-microchip-ptp' Arun Ramadoss says: ==================== net: dsa: microchip: add PTP support for KSZ9563/KSZ8563 and LAN937x KSZ9563/KSZ8563 and LAN937x switch are capable for supporting IEEE 1588 PTP protocol. LAN937x has the same PTP register set similar to KSZ9563, hence the implementation has been made common for the KSZ switches. KSZ9563 does not support two step timestamping but LAN937x supports both. Tested the 1step & 2step p2p timestamping in LAN937x and p2p1step timestamping in KSZ9563. This patch series is based on the Christian Eggers PTP support for KSZ9563. Applied the Christian patch and updated as per the latest refactoring of KSZ series code. The features added on top are PTP packet Interrupt implementation based on nested handler, LAN937x two step timestamping and programmable per_out pins. Link: https://www.spinics.net/lists/netdev/msg705531.html Patch v7 -> v8 - set skb->ip_summed = CHECKSUM_NONE after updating the checksum Patch v6 -> v7 - Corrected the misplaced spaces and tabs - Added mutex lock in do_aux_work - Replaced 0/1 with false/true for ts_en - SKB_TX_INPROGRESS flag is set before dsa_enqueue_skb - Removed the fallthrough keyword - pdelay_resp header correction is performed based on KSZ_SKB_CB(skb)->update_correction instead of clone Patch v5 -> v6 - Rebased to latest net-next and renamed from RFC to patch net-next. Patch v4 -> v5 - Replaced irq_domain_add_simple with irq_doamin_add_linear - Used the helper diff_by_scaled_ppm() for adjfine. Patch v3 -> v4 - removed IRQF_TRIGGER_FALLING from the request_threaded_irq of ptp msg - addressed review comments on patch 10 periodic output - added sign off in patch 6 & 9 - reverted to set PTP_1STEP bit for lan937x which is missed during v3 regression Patch v2-> v3 - used port_rxtstamp for reconstructing the absolute timestamp instead of tagger function pointer. - Reverted to setting of 802.1As bit. Patch v1 -> v2 - GPIO perout enable bit is different for LAN937x and KSZ9x. Added new patch for configuring LAN937x programmable pins. - PTP enabled in hardware based on both tx and rx timestamping of all the user ports. - Replaced setting of 802.1AS bit with P2P bit in PTP_MSG_CONF1 register. RFC v2 -> Patch v1 - Changed the patch author based on past patch submission - Changed the commit message prefix as net: dsa: microchip: ptp Individual patch changes are listed in correspondig commits. RFC v1 -> v2 - Added the p2p1step timestamping and conditional execution of 2 step for LAN937x only. - Added the periodic output support ==================== Signed-off-by: David S. Miller commit 168a5940c7452f169b4656011ddcd8225a0d3bc5 Author: Arun Ramadoss Date: Tue Jan 10 14:19:30 2023 +0530 net: dsa: microchip: ptp: lan937x: Enable periodic output in LED pins There is difference in implementation of per_out pins between KSZ9563 and LAN937x. In KSZ9563, Timestamping control register (0x052C) bit 6, if 1 - timestamp input and 0 - trigger output. But it is opposite for LAN937x 1 - trigger output and 0 - timestamp input. As per per_out gpio pins, KSZ9563 has four Led pins and two dedicated gpio pins. But in LAN937x dedicated gpio pins are removed instead there are up to 10 LED pins out of which LED_0 and LED_1 can be mapped to PTP tou 0, 1 or 2. This patch sets the bit 6 in 0x052C register and configure the LED override and source register for LAN937x series of switches alone. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller commit d6261f0b80ba1f694e1303a507dfa046ee77b1e2 Author: Arun Ramadoss Date: Tue Jan 10 14:19:29 2023 +0530 net: dsa: microchip: ptp: lan937x: add 2 step timestamping LAN937x series of switches support 2 step timestamping mechanism. There are timestamp correction calculation performed in ksz_rcv_timestamp and ksz_xmit_timestamp which are applicable only for p2p1step. To check whether the 2 step is enabled or not in tag_ksz.c introduced the helper function in taggger_data to query it from ksz_ptp.c. Based on whether 2 step is enabled or not, timestamp calculation are performed. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller commit 343d3bd87a2835e61790ffb5d3638a070f12292b Author: Arun Ramadoss Date: Tue Jan 10 14:19:28 2023 +0530 net: dsa: microchip: ptp: add support for perout programmable pins There are two programmable pins available for Trigger output unit to generate periodic pulses. This patch add verify_pin for the available 2 pins and configure it with respect to GPIO index for the TOU unit. Tested using testptp ./testptp -i 0 -L 0,2 ./testptp -i 0 -d /dev/ptp0 -p 1000000000 ./testptp -i 1 -L 1,2 ./testptp -i 1 -d /dev/ptp0 -p 100000000 Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller commit 1f12ae5b67608f63596642774129abfafa95e9d8 Author: Christian Eggers Date: Tue Jan 10 14:19:27 2023 +0530 net: dsa: microchip: ptp: add periodic output signal LAN937x and KSZ PTP supported switches has Three Trigger output unit. This TOU can used to generate the periodic signal for PTP. TOU has the cycle width register of 32 bit in size and period width register of 24 bit, each value is of 8ns so the pulse width can be maximum 125ms. Tested using ./testptp -d /dev/ptp0 -p 1000000000 -w 100000000 for generating the 10ms pulse width Signed-off-by: Christian Eggers Co-developed-by: Arun Ramadoss Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller commit a32190b154bde4a3bf2fddb9367aec49be09b15d Author: Christian Eggers Date: Tue Jan 10 14:19:26 2023 +0530 net: dsa: microchip: ptp: move pdelay_rsp correction field to tail tag For PDelay_Resp messages we will likely have a negative value in the correction field. The switch hardware cannot correctly update such values (produces an off by one error in the UDP checksum), so it must be moved to the time stamp field in the tail tag. Format of the correction field is 48 bit ns + 16 bit fractional ns. After updating the correction field, clone is no longer required hence it is freed. Signed-off-by: Christian Eggers Co-developed-by: Arun Ramadoss Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller commit ab32f56a4100f879c5064b45c7657bb4be175ac3 Author: Christian Eggers Date: Tue Jan 10 14:19:25 2023 +0530 net: dsa: microchip: ptp: add packet transmission timestamping This patch adds the routines for transmission of ptp packets. When the ptp pdelay_req packet to be transmitted, it uses the deferred xmit worker to schedule the packets. During irq_setup, interrupt for Sync, Pdelay_req and Pdelay_rsp are enabled. So interrupt is triggered for all three packets. But for p2p1step, we require only time stamp of Pdelay_req packet. Hence to avoid posting of the completion from ISR routine for Sync and Pdelay_resp packets, ts_en flag is introduced. This controls which packets need to processed for timestamp. After the packet is transmitted, ISR is triggered. The time at which packet transmitted is recorded to separate register. This value is reconstructed to absolute time and posted to the user application through socket error queue. Signed-off-by: Christian Eggers Co-developed-by: Arun Ramadoss Signed-off-by: Arun Ramadoss Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 90188fff655d8efad79acdf60c3012ffcbbef716 Author: Christian Eggers Date: Tue Jan 10 14:19:24 2023 +0530 net: dsa: microchip: ptp: add packet reception timestamping Rx Timestamping is done through 4 additional bytes in tail tag. Whenever the ptp packet is received, the 4 byte hardware time stamped value is added before 1 byte tail tag. Also, bit 7 in tail tag indicates it as PTP frame. This 4 byte value is extracted from the tail tag and reconstructed to absolute time and assigned to skb hwtstamp. If the packet received in PDelay_Resp, then partial ingress timestamp is subtracted from the correction field. Since user space tools expects to be done in hardware. Signed-off-by: Christian Eggers Co-developed-by: Arun Ramadoss Signed-off-by: Arun Ramadoss Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 2955762b372b791a8f4cd862cf0b5fef9c456449 Author: Christian Eggers Date: Tue Jan 10 14:19:23 2023 +0530 net: ptp: add helper for one-step P2P clocks For P2P delay measurement, the ingress time stamp of the PDelay_Req is required for the correction field of the PDelay_Resp. The application echoes back the correction field of the PDelay_Req when sending the PDelay_Resp. Some hardware (like the ZHAW InES PTP time stamping IP core) subtracts the ingress timestamp autonomously from the correction field, so that the hardware only needs to add the egress timestamp on tx. Other hardware (like the Microchip KSZ9563) reports the ingress time stamp via an interrupt and requires that the software provides this time stamp via tail-tag on tx. In order to avoid introducing a further application interface for this, the driver can simply emulate the behavior of the InES device and subtract the ingress time stamp in software from the correction field. On egress, the correction field can either be kept as it is (and the time stamp field in the tail-tag is set to zero) or move the value from the correction field back to the tail-tag. Changing the correction field requires updating the UDP checksum (if UDP is used as transport). Signed-off-by: Christian Eggers Co-developed-by: Arun Ramadoss Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller commit cc13ab18b201ab630f03511060ba289b70052959 Author: Arun Ramadoss Date: Tue Jan 10 14:19:22 2023 +0530 net: dsa: microchip: ptp: enable interrupt for timestamping PTP Interrupt mask and status register differ from the global and port interrupt mechanism by two methods. One is that for global/port interrupt enabling we have to clear the bit but for ptp interrupt we have to set the bit. And other is bit12:0 is reserved in ptp interrupt registers. This forced to not use the generic implementation of global/port interrupt method routine. This patch implement the ptp interrupt mechanism to read the timestamp register for sync, pdelay_req and pdelay_resp. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller commit bb01ad30570b09eb83438093cd7d29f04410b12e Author: Christian Eggers Date: Tue Jan 10 14:19:21 2023 +0530 net: dsa: microchip: ptp: manipulating absolute time using ptp hw clock This patch is used for reconstructing the absolute time from the 32bit hardware time stamping value. The do_aux ioctl is used for reading the ptp hardware clock and store it to global variable. The timestamped value in tail tag during rx and register during tx are 32 bit value (2 bit seconds and 30 bit nanoseconds). The time taken to read entire ptp clock will be time consuming. In order to speed up, the software clock is maintained. This clock time will be added to 32 bit timestamp to get the absolute time stamp. Signed-off-by: Christian Eggers Co-developed-by: Arun Ramadoss Signed-off-by: Arun Ramadoss Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit c2977c61f32e0d54319d158a04cad5fd82c2afcf Author: Arun Ramadoss Date: Tue Jan 10 14:19:20 2023 +0530 net: dsa: microchip: ptp: add 4 bytes in tail tag when ptp enabled When the PTP is enabled in hardware bit 6 of PTP_MSG_CONF1 register, the transmit frame needs additional 4 bytes before the tail tag. It is needed for all the transmission packets irrespective of PTP packets or not. The 4-byte timestamp field is 0 for frames other than Pdelay_Resp. For the one-step Pdelay_Resp, the switch needs the receive timestamp of the Pdelay_Req message so that it can put the turnaround time in the correction field. Since PTP has to be enabled for both Transmission and reception timestamping, driver needs to track of the tx and rx setting of the all the user ports in the switch. Two flags hw_tx_en and hw_rx_en are added in ksz_port to track the timestampping setting of each port. When any one of ports has tx or rx timestampping enabled, bit 6 of PTP_MSG_CONF1 is set and it is indicated to tag_ksz.c through tagger bytes. This flag adds 4 additional bytes to the tail tag. When tx and rx timestamping of all the ports are disabled, then 4 bytes are not added. Tested using hwstamp -i Signed-off-by: Arun Ramadoss Reviewed-by: Vladimir Oltean # mostly api Signed-off-by: David S. Miller commit c59e12a140fbfbef0fae72be71b47cdb05f25713 Author: Christian Eggers Date: Tue Jan 10 14:19:19 2023 +0530 net: dsa: microchip: ptp: Initial hardware time stamping support This patch adds the routine for get_ts_info, hwstamp_get, set. This enables the PTP support towards userspace applications such as linuxptp. Signed-off-by: Christian Eggers Co-developed-by: Arun Ramadoss Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller commit eac1ea20261e1fac8ffbfb3b7da2d5e6b7c159e3 Author: Christian Eggers Date: Tue Jan 10 14:19:18 2023 +0530 net: dsa: microchip: ptp: add the posix clock support This patch implement routines (adjfine, adjtime, gettime and settime) for manipulating the chip's PTP clock. It registers the ptp caps to posix clock register. Signed-off-by: Christian Eggers Co-developed-by: Arun Ramadoss Signed-off-by: Arun Ramadoss Reviewed-by: Vladimir Oltean # mostly api Reviewed-by: Florian Fainelli Reviewed-by: Jacob Keller Signed-off-by: David S. Miller commit cab18866feade5ffa0cadc5e632528b2050e8e28 Author: Cai Huoqing Date: Sat Dec 3 18:22:52 2022 +0800 drm: Remove the obsolete driver-i810 Commit 399516ab0fee ("MAINTAINERS: Add a bunch of legacy (UMS) DRM drivers") marked i810 driver obsolete 7 years ago. And the mesa UMD of this drm driver already in deprecated list in the link: https://docs.mesa3d.org/systems.html Intel i810-->driver/gpu/drm/i810 It's time to remove this driver. Signed-off-by: Cai Huoqing Acked-by: Daniel Vetter Acked-by: Dave Airlie Acked-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20221203102502.3185-2-cai.huoqing@linux.dev commit f81c1d4a6d3f6b9f31cb8feec13a4357b68a95d6 Author: Samuel Holland Date: Sat Dec 31 16:01:44 2022 -0600 crypto: sun8i-ce - Add TRNG clock to the D1 variant At least the D1 variant requires a separate clock for the TRNG. Without this clock enabled, reading from /dev/hwrng reports: sun8i-ce 3040000.crypto: DMA timeout for TRNG (tm=96) on flow 3 Experimentation shows that the necessary clock is the SoC's internal RC oscillator. This makes sense, as noise from the oscillator can be used as a source of entropy. Signed-off-by: Samuel Holland Reviewed-by: Jernej Skrabec Acked-by: Corentin Labbe Signed-off-by: Herbert Xu commit 197286f86012250191bfe616dc4e9b8e34380c35 Author: Samuel Holland Date: Sat Dec 31 16:01:43 2022 -0600 dt-bindings: crypto: sun8i-ce: Add compatible for D1 D1 has a crypto engine similar to the one in other Allwinner SoCs. Like H6, it has a separate MBUS clock gate. It also requires the internal RC oscillator to be enabled for the TRNG to return data, presumably because noise from the oscillator is used as an entropy source. This is likely the case for earlier variants as well, but it really only matters for H616 and newer SoCs, as H6 provides no way to disable the internal oscillator. Signed-off-by: Samuel Holland Reviewed-by: Krzysztof Kozlowski Acked-by: Corentin Labbe Signed-off-by: Herbert Xu commit cf8698df3a7d7f46975b9d8bf79d310e17afbf4f Author: Thomas Zimmermann Date: Thu Jan 12 14:38:58 2023 +0100 drm/nouveau: Remove support for legacy contexts/buffers Remove nouveau's support for legacy contexts and buffers. It was required by libdrm earlier than 2.4.33, released in March 2012. A previous attempt in 2013 to remove the functionality [1] had to be reverted [2] as there were still users left. Libdrm 2.4.33 is now almost 11 years old and it is time for userspace to move on. With the nouveau code gone, we can also remove the driver-feature bit DRIVER_KMS_LEGACY_CONTEXT. Signed-off-by: Thomas Zimmermann Reviewed-by: Karol Herbst Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7c510133d93dd6f15ca040733ba7b2891ed61fd1 # 1 Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c21eb21cb50d58e7cbdcb8b9e7ff68b85cfa5095 # 2 Link: https://patchwork.freedesktop.org/patch/msgid/20230112133858.17087-1-tzimmermann@suse.de commit f189c869ad92787ddd753558bcbae89d75825bb6 Author: Martin Blumenstingl Date: Wed Jan 11 22:13:50 2023 +0100 arm64: dts: meson-gx: Fix the SCPI DVFS node name and unit address Node names should be generic and use hyphens instead of underscores to not cause warnings. Also nodes without a reg property should not have a unit-address. Change the scpi_dvfs node to use clock-controller as node name without a unit address (since it does not have a reg property). Fixes: 70db166a2baa ("ARM64: dts: meson-gxbb: Add SCPI with cpufreq & sensors Nodes") Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230111211350.1461860-7-martin.blumenstingl@googlemail.com Signed-off-by: Neil Armstrong commit e7303651bbc76c848007f1cfac1fbeaa65f600d1 Author: Martin Blumenstingl Date: Wed Jan 11 22:13:49 2023 +0100 arm64: dts: meson-g12a: Fix internal Ethernet PHY unit name Documentation/devicetree/bindings/net/ethernet-phy.yaml defines that the node name for Ethernet PHYs should match the following pattern: ^ethernet-phy(@[a-f0-9]+)?$ Replace the underscore with a hyphen to adhere to this binding. Fixes: 280c17df8fbf ("arm64: dts: meson: g12a: add mdio multiplexer") Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230111211350.1461860-6-martin.blumenstingl@googlemail.com Signed-off-by: Neil Armstrong commit 8ed5310356bfa47cc6bb4221ae6b21258c52e3d1 Author: Martin Blumenstingl Date: Wed Jan 11 22:13:48 2023 +0100 arm64: dts: meson-gx: Fix Ethernet MAC address unit name Unit names should use hyphens instead of underscores to not cause warnings. Fixes: bfe59f92d306 ("ARM64: dts: amlogic: gxbb: Enable NVMEM") Suggested-by: Vyacheslav Bocharov Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230111211350.1461860-5-martin.blumenstingl@googlemail.com Signed-off-by: Neil Armstrong commit 2f66eeb06e3e8b1cac9e9093be3baadbac2709eb Author: Martin Blumenstingl Date: Wed Jan 11 22:13:47 2023 +0100 arm64: dts: meson-axg: jethub-j1xx: Fix MAC address node names Node names should use hyphens instead of underscores to not cause warnings. Fixes: 59ec069d5055 ("arm64: dts: meson-axg: add support for JetHub D1p (j110)") Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230111211350.1461860-4-martin.blumenstingl@googlemail.com Signed-off-by: Neil Armstrong commit cb199de1d3aecb02556d8a6e26393015effa0a9f Author: Martin Blumenstingl Date: Wed Jan 11 22:13:46 2023 +0100 arm64: dts: meson-gxl: jethub-j80: Fix Bluetooth MAC node name Node names should use hyphens instead of underscores to not cause warnings. Fixes: abfaae24ecf3 ("arm64: dts: meson-gxl: add support for JetHub H1") Suggested-by: Vyacheslav Bocharov Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230111211350.1461860-3-martin.blumenstingl@googlemail.com Signed-off-by: Neil Armstrong commit f95acdb2b4af21caae2c76a48e565158181386ca Author: Martin Blumenstingl Date: Wed Jan 11 22:13:45 2023 +0100 arm64: dts: meson-gxl: jethub-j80: Fix WiFi MAC address node Unit addresses should be written using lower-case hex characters. Use wifi_mac@c to fix a yaml schema validation error once the eFuse dt-bindings have been converted to a yaml schema: efuse: Unevaluated properties are not allowed ('wifi_mac@C' was unexpected) Also node names should use hyphens instead of underscores as the latter can also cause warnings. Fixes: abfaae24ecf3 ("arm64: dts: meson-gxl: add support for JetHub H1") Acked-by: Vyacheslav Bocharov Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230111211350.1461860-2-martin.blumenstingl@googlemail.com Signed-off-by: Neil Armstrong commit 72863e08c3935bff9577d9ff56d034d68d3adf9b Merge: 5bee990f490a6 723e8a48c9935 Author: Jakub Kicinski Date: Thu Jan 12 21:43:37 2023 -0800 Merge branch 'add-support-to-offload-macsec-using-netlink-update' Emeel Hakim says: ==================== Add support to offload macsec using netlink update This series adds support for offloading macsec as part of the netlink update routine, command example: $ ip link set link eth2 macsec0 type macsec offload mac The above is done using the IFLA_MACSEC_OFFLOAD attribute hence the second patch of dumping this attribute as part of the macsec dump. ==================== Link: https://lore.kernel.org/r/20230111150210.8246-1-ehakim@nvidia.com Signed-off-by: Jakub Kicinski commit 723e8a48c9935b0d7a2826a12d03324daf6f900b Author: Emeel Hakim Date: Wed Jan 11 17:02:10 2023 +0200 macsec: dump IFLA_MACSEC_OFFLOAD attribute as part of macsec dump Support dumping offload netlink attribute in macsec's device attributes dump. Change macsec_get_size to consider the offload attribute in the calculations of the required room for dumping the device netlink attributes. Signed-off-by: Emeel Hakim Reviewed-by: Sabrina Dubroca Signed-off-by: Jakub Kicinski commit 15f1735520f929ea7ed7ef7902abe2ffe66486a6 Author: Emeel Hakim Date: Wed Jan 11 17:02:09 2023 +0200 macsec: add support for IFLA_MACSEC_OFFLOAD in macsec_changelink Add support for changing Macsec offload selection through the netlink layer by implementing the relevant changes in macsec_changelink. Since the handling in macsec_changelink is similar to macsec_upd_offload, update macsec_upd_offload to use a common helper function to avoid duplication. Example for setting offload for a macsec device: ip link set macsec0 type macsec offload mac Signed-off-by: Emeel Hakim Reviewed-by: Sabrina Dubroca Signed-off-by: Jakub Kicinski commit 5bee990f490a6c1bea5bba431e2ffe387e6b1b3f Author: Lukas Bulwahn Date: Wed Jan 11 13:58:55 2023 +0100 net: remove redundant config PCI dependency for some network driver configs While reviewing dependencies in some Kconfig files, I noticed the redundant dependency "depends on PCI && PCI_MSI". The config PCI_MSI has always, since its introduction, been dependent on the config PCI. So, it is sufficient to just depend on PCI_MSI, and know that the dependency on PCI is implicitly implied. Reduce the dependencies of some network driver configs. No functional change and effective change of Kconfig dependendencies. Signed-off-by: Lukas Bulwahn Acked-by: Simon Horman Acked-by: Dimitris Michailidis Link: https://lore.kernel.org/r/20230111125855.19020-1-lukas.bulwahn@gmail.com Signed-off-by: Jakub Kicinski commit a1cf597b99a7276c2103327b5633ef1d7a0f3a93 Author: Mengyuan Lou Date: Wed Jan 11 19:17:18 2023 +0800 net: ngbe: Add ngbe mdio bus driver. Add mdio bus register for ngbe. The internal phy and external phy need to be handled separately. Add phy changed event detection. Signed-off-by: Mengyuan Lou Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230111111718.40745-1-mengyuanlou@net-swift.com Signed-off-by: Jakub Kicinski commit 296403f9ec4af0bb3468a9b1535aadfeb1a3b37d Merge: dec5efcffad4f f758652703803 Author: Jakub Kicinski Date: Thu Jan 12 21:19:33 2023 -0800 Merge branch 'net-thunderbolt-add-tracepoints' Mika Westerberg says: ==================== net: thunderbolt: Add tracepoints This series adds tracepoints and additional logging to the Thunderbolt/USB4 networking driver. These are useful when debugging possible issues. Before that we move the driver into its own directory under drivers/net so that we can add additional files without trashing the network drivers main directory, and update the MAINTAINERS accordingly. v1: https://lore.kernel.org/netdev/20230104081731.45928-1-mika.westerberg@linux.intel.com/ ==================== Link: https://lore.kernel.org/r/20230111062633.1385-1-mika.westerberg@linux.intel.com Signed-off-by: Jakub Kicinski commit f758652703803a1701d470de88158d5b8c70c9a4 Author: Mika Westerberg Date: Wed Jan 11 08:26:33 2023 +0200 net: thunderbolt: Add tracepoints These are useful when debugging various performance issues. Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat Signed-off-by: Jakub Kicinski commit 7b3502c1598ae9dbac4f91af702e4e0d30337705 Author: Mika Westerberg Date: Wed Jan 11 08:26:32 2023 +0200 net: thunderbolt: Add debugging when sending/receiving control packets These can be useful when debugging possible issues around USB4NET control packet exchange. Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat Signed-off-by: Jakub Kicinski commit 0d0950a968009fd6e5c2a3763b2c6e81b3805b05 Author: Mika Westerberg Date: Wed Jan 11 08:26:31 2023 +0200 net: thunderbolt: Move into own directory We will be adding tracepoints to the driver so instead of littering the main network driver directory, move the driver into its own directory. While there, rename the module to thunderbolt_net (with underscore) to match with the thunderbolt_dma_test convention. Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat Signed-off-by: Jakub Kicinski commit dec5efcffad4f28f5d1fe5dc45b64dffa6abbf04 Author: Thomas Gleixner Date: Tue Jan 10 17:07:38 2023 +0100 u64_stat: Remove the obsolete fetch_irq() variants. There are no more users of the obsolete interface u64_stats_fetch_begin_irq() and u64_stats_fetch_retry_irq(). Remove the obsolete API. [bigeasy: Split out the bits from a larger patch]. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Link: https://lore.kernel.org/r/20230110160738.974085-1-bigeasy@linutronix.de Signed-off-by: Jakub Kicinski commit 55ef6c811b8481b65e54217010a62c4074e19302 Author: Neal Liu Date: Wed Jan 4 09:34:36 2023 +0800 dt-bindings: bus: add documentation for Aspeed AHBC Add device tree binding documentation for the Aspeed Advanced High-Performance Bus (AHB) Controller. Signed-off-by: Neal Liu Reviewed-by: Rob Herring Signed-off-by: Herbert Xu commit ce43b4b20e2b4aa209956c5773ac97d1beea62c4 Author: Neal Liu Date: Wed Jan 4 09:34:35 2023 +0800 dt-bindings: crypto: add documentation for Aspeed ACRY Add device tree binding documentation for the Aspeed ECDSA/RSA ACRY Engines Controller. Signed-off-by: Neal Liu Reviewed-by: Rob Herring Signed-off-by: Herbert Xu commit 62462a525b49e5b3096895b28a217fd3ec0b3caa Author: Neal Liu Date: Wed Jan 4 09:34:34 2023 +0800 ARM: dts: aspeed: Add ACRY/AHBC device controller node Add acry & ahbc node to device tree for AST2600. Signed-off-by: Neal Liu Signed-off-by: Herbert Xu commit 2f1cf4e50c956f882c9fc209c7cded832b67b8a3 Author: Neal Liu Date: Wed Jan 4 09:34:33 2023 +0800 crypto: aspeed - Add ACRY RSA driver ACRY Engine is designed to accelerate the throughput of ECDSA/RSA signature and verification. This patch aims to add ACRY RSA engine driver for hardware acceleration. Signed-off-by: Neal Liu Signed-off-by: Herbert Xu commit d07bd950b91efb4d6a960347c603f8424a1125d1 Author: Ard Biesheuvel Date: Mon Jan 2 11:18:46 2023 +0100 crypto: skcipher - Use scatterwalk (un)map interface for dst and src buffers The skcipher walk API implementation avoids scatterwalk_map() for mapping the source and destination buffers, and invokes kmap_atomic() directly if the buffer in question is not in low memory (which can only happen on 32-bit architectures). This avoids some overhead on 64-bit architectures, and most notably, permits the skcipher code to run with preemption enabled. Now that scatterwalk_map() has been updated to use kmap_local(), none of this is needed, so we can simply use scatterwalk_map/unmap instead. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 0781bbd7eaca70611bc2314001f82e1903aeff48 Author: Danny Tsen Date: Sun Dec 4 19:34:58 2022 -0500 crypto: p10-aes-gcm - A perl script to process PowerPC assembler source Signed-off-by: Danny Tsen Signed-off-by: Herbert Xu commit 41a6437ab415e5daa7dfcd4b1b91dd934306d4e9 Author: Danny Tsen Date: Sun Dec 4 19:34:57 2022 -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 p10-aes-gcm-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 3b47eccaaff4e4bb9e0c3684428c852422bd9bac Author: Danny Tsen Date: Sun Dec 4 19:34:56 2022 -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 ca68a96c37eb93791373c5debb0991df0410da9a Author: Danny Tsen Date: Sun Dec 4 19:34:55 2022 -0500 crypto: p10-aes-gcm - An accelerated AES/GCM stitched implementation Improve overall performance of AES/GCM encrypt and decrypt operations for Power10+ CPU. Signed-off-by: Danny Tsen Signed-off-by: Herbert Xu commit cc40379b6e19d85bd389f979dc185b5bb478a385 Author: Danny Tsen Date: Sun Dec 4 19:34:54 2022 -0500 crypto: p10-aes-gcm - Glue code for AES/GCM stitched implementation Signed-off-by: Danny Tsen Signed-off-by: Herbert Xu commit 3c657e8689ab50dd201abfe16c86653fda74bf25 Author: Danny Tsen Date: Sun Dec 4 19:34:53 2022 -0500 crypto: p10-aes-gcm - Update Kconfig and Makefile Defined CRYPTO_P10_AES_GCM in Kconfig to support AES/GCM stitched implementation for Power10+ CPU. Added a new module driver p10-aes-gcm-crypto. Signed-off-by: Danny Tsen Signed-off-by: Herbert Xu commit a99da46ac01a12e582684771b486c9292326d7a4 Merge: 55b98837e37da d9fc1511728c1 Author: Jakub Kicinski Date: Thu Jan 12 18:56:47 2023 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net drivers/net/usb/r8152.c be53771c87f4 ("r8152: add vendor/device ID pair for Microsoft Devkit") ec51fbd1b8a2 ("r8152: add USB device driver for config selection") https://lore.kernel.org/all/20230113113339.658c4723@canb.auug.org.au/ Signed-off-by: Jakub Kicinski commit b762787bf767e8bd09c525a178e2259a47f71342 Author: Alan Previn Date: Wed Dec 21 09:49:01 2022 -0800 drm/i915/pxp: Use drm_dbg if arb session failed due to fw version If PXP arb-session is being attempted on older hardware SKUs or on hardware with older, unsupported, firmware versions, then don't report the failure with a drm_error. Instead, look specifically for the API-version error reply and drm_dbg that reply. In this case, the user-space will eventually get a -ENODEV for the protected context creation which is the correct behavior and we don't create unnecessary drm_error's in our dmesg (for what is unsupported platforms). Changes from prio revs: v2 : - remove unnecessary newline. (Jani) v1 : - print incorrect version from input packet, not output. Signed-off-by: Alan Previn Reviewed-by: Vinay Belgaumkar Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221221174901.2703954-1-alan.previn.teres.alexis@intel.com commit 8ffbaa98ccf82383c9092cf3afa4d8512e52e612 Author: Krzysztof Kozlowski Date: Wed Dec 28 13:43:31 2022 +0100 dt-bindings: ufs: qcom,ufs: document required-opps UFS device node on SC8280XP uses required-opps: sc8280xp-crd.dtb: ufs@1d84000: Unevaluated properties are not allowed ('required-opps' was unexpected) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221228124331.258416-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit 961a325becd9a142ae5c8b258e5c2f221f8bfac8 Author: Chen-Yu Tsai Date: Wed Jan 11 15:41:46 2023 +0800 platform/chrome: cros_ec: Use per-device lockdep key Lockdep reports a bogus possible deadlock on MT8192 Chromebooks due to the following lock sequences: 1. lock(i2c_register_adapter) [1]; lock(&ec_dev->lock) 2. lock(&ec_dev->lock); lock(prepare_lock); The actual dependency chains are much longer. The shortened version looks somewhat like: 1. cros-ec-rpmsg on mtk-scp ec_dev->lock -> prepare_lock 2. In rt5682_i2c_probe() on native I2C bus: prepare_lock -> regmap->lock -> (possibly) i2c_adapter->bus_lock 3. In rt5682_i2c_probe() on native I2C bus: regmap->lock -> i2c_adapter->bus_lock 4. In sbs_probe() on i2c-cros-ec-tunnel I2C bus attached on cros-ec: i2c_adapter->bus_lock -> ec_dev->lock While lockdep is correct that the shared lockdep classes have a circular dependency, it is bogus because a) 2+3 happen on a native I2C bus b) 4 happens on the actual EC on ChromeOS devices c) 1 happens on the SCP coprocessor on MediaTek Chromebooks that just happens to expose a cros-ec interface, but does not have an i2c-cros-ec-tunnel I2C bus In short, the "dependencies" are actually on different devices. Setup a per-device lockdep key for cros_ec devices so lockdep can tell the two instances apart. This helps with getting rid of the bogus lockdep warning. For ChromeOS devices that only have one cros-ec instance this doesn't change anything. Also add a missing mutex_destroy, just to make the teardown complete. [1] This is likely the per I2C bus lock with shared lockdep class Signed-off-by: Chen-Yu Tsai Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20230111074146.2624496-1-wenst@chromium.org commit 5fa1dd818fb4b30cd2de42696de547e243d946d6 Author: Tzung-Bi Shih Date: Wed Jan 11 13:57:28 2023 +0800 platform/chrome: fix kernel-doc warnings for cros_ec_command Fix the following kernel-doc warnings: $ ./scripts/kernel-doc -none \ include/linux/platform_data/cros_ec_commands.h include/linux/platform_data/cros_ec_commands.h:1092: warning: expecting prototype for struct ec_response_get_cmd_version. Prototype was for struct ec_response_get_cmd_versions instead include/linux/platform_data/cros_ec_commands.h:5485: warning: This comment starts with '/**', but isn't a kernel-doc comment. include/linux/platform_data/cros_ec_commands.h:5496: warning: This comment starts with '/**', but isn't a kernel-doc comment. Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230111055728.708990-5-tzungbi@kernel.org commit 212c9b9c395f72fd83c10cf2692b9562c2110d0f Author: Tzung-Bi Shih Date: Wed Jan 11 13:57:27 2023 +0800 platform/chrome: fix kernel-doc warning for last_resume_result Fix the following kernel-doc warning: $ ./scripts/kernel-doc -none include/linux/platform_data/cros_ec_proto.h include/linux/platform_data/cros_ec_proto.h:187: warning: Function parameter or member 'last_resume_result' not described in 'cros_ec_device' Cc: Evan Green Fixes: 8c3166e17cf1 ("mfd / platform: cros_ec_debugfs: Expose resume result via debugfs") Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230111055728.708990-4-tzungbi@kernel.org commit 20eb556dac27427f951ca13e117d32bd1c041b79 Author: Tzung-Bi Shih Date: Wed Jan 11 13:57:26 2023 +0800 platform/chrome: fix kernel-doc warning for suspend_timeout_ms Fix the following kernel-doc warning: $ ./scripts/kernel-doc -none include/linux/platform_data/cros_ec_proto.h include/linux/platform_data/cros_ec_proto.h:187: warning: Function parameter or member 'suspend_timeout_ms' not described in 'cros_ec_device' Cc: Evan Green Fixes: e8bf17d58a4d ("platform/chrome: cros_ec: Expose suspend_timeout_ms in debugfs") Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230111055728.708990-3-tzungbi@kernel.org commit 16d73129f1fd8e91eb565482245233809647c649 Author: Tzung-Bi Shih Date: Wed Jan 11 13:57:25 2023 +0800 platform/chrome: fix kernel-doc warnings for panic notifier Fix the following kernel-doc warnings: $ ./scripts/kernel-doc -none drivers/platform/chrome/* drivers/platform/chrome/cros_ec_debugfs.c:54: warning: Function parameter or member 'notifier_panic' not described in 'cros_ec_debugfs' $ ./scripts/kernel-doc -none include/linux/platform_data/cros_ec_proto.h include/linux/platform_data/cros_ec_proto.h:187: warning: Function parameter or member 'panic_notifier' not described in 'cros_ec_device' Cc: Rob Barnes Fixes: d90fa2c64d59 ("platform/chrome: cros_ec: Poll EC log on EC panic") Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230111055728.708990-2-tzungbi@kernel.org commit fd2b165ce2ccdaad7d5972987acac259cff66ccb Author: Marc Zyngier Date: Thu Jan 12 15:48:40 2023 +0000 KVM: arm64: vgic-v3: Limit IPI-ing when accessing GICR_{C,S}ACTIVER0 When a vcpu is accessing *its own* redistributor's SGIs/PPIs, there is no point in doing a stop-the-world operation. Instead, we can just let the access occur as we do with GICv2. This is a very minor optimisation for a non-nesting guest, but a potentially major one for a nesting L1 hypervisor which is likely to access the emulated registers pretty often (on each vcpu switch, at the very least). Reported-by: Ganapatrao Kulkarni Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230112154840.1808595-1-maz@kernel.org Signed-off-by: Oliver Upton commit 59d78a2ec0e9cfba5935f3a0d3f14a771461cded Author: Nianyao Tang Date: Tue Dec 20 18:50:24 2022 +0800 KVM: arm64: Synchronize SMEN on vcpu schedule out If we have VHE and need to reenable SME for host in kvm_arch_vcpu_put_fp, CPACR.SMEN is modified from 0 to 1. Trap control for reading SVCR is modified from enable to disable. Synchronization is needed before reading SVCR later in fpsimd_save, or it may cause sync exception which can not be handled by host. Cc: Marc Zyngier Cc: James Morse Cc: Alexandru Elisei Cc: Suzuki K Poulose Cc: Oliver Upton Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Nianyao Tang Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20221220105024.13484-1-dongbo4@huawei.com Signed-off-by: Oliver Upton commit 13aad0c00bb1c44b49b7480f129bb95b40e7f71a Author: Marc Zyngier Date: Tue Jan 3 09:50:22 2023 +0000 irqchip/apple-aic: Register vgic maintenance interrupt with KVM In order to deliver vgic maintenance interrupts that Nested Virt requires, hook it into the FIQ space, even if it is delivered as an IRQ (we don't distinguish between the two anyway). Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230103095022.3230946-4-maz@kernel.org Signed-off-by: Oliver Upton commit 43c5c868bddcec744396f4e334d3ebfe22dedeaf Author: Marc Zyngier Date: Tue Jan 3 09:50:21 2023 +0000 KVM: arm64: vgic: Allow registration of a non-maskable maintenance interrupt Our Apple M1/M2 friends do have a per-CPU maintenance interrupt, but no mask to make use of it in the standard Linux framework. Given that KVM directly drives the *source* of the interrupt and leaves the GIC interrupt always enabled, there is no harm in tolerating such a setup. It will become useful once we enable NV on M2 HW. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230103095022.3230946-3-maz@kernel.org Signed-off-by: Oliver Upton commit 7a5e9c8f0b2d18fa5e7f2b8e4ef68464fa3bc83e Author: Marc Zyngier Date: Thu Jan 12 15:48:03 2023 +0000 KVM: arm64: Kill CPACR_EL1_TTA definition Since the One True Way is to use the new generated definition, kill the KVM-specific definition of CPACR_EL1_TTA, and move over to CPACR_ELx_TTA, hopefully for the same result. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230112154803.1808559-1-maz@kernel.org Signed-off-by: Oliver Upton commit 1dfc3e905089a0bcada268fb5691a605655e0319 Author: Oliver Upton Date: Fri Dec 2 18:51:56 2022 +0000 KVM: arm64: Condition HW AF updates on config option As it currently stands, KVM makes use of FEAT_HAFDBS unconditionally. Use of the feature in the rest of the kernel is guarded by an associated Kconfig option. Align KVM with the rest of the kernel and only enable VTCR_HA when ARM64_HW_AFDBM is enabled. This can be helpful for testing changes to the stage-2 access fault path on Armv8.1+ implementations. Link: https://lore.kernel.org/r/20221202185156.696189-7-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit fc61f554e6947edd21cd84fb814f8418349a3569 Author: Oliver Upton Date: Fri Dec 2 18:51:55 2022 +0000 KVM: arm64: Handle access faults behind the read lock As the underlying software walkers are able to traverse and update stage-2 in parallel there is no need to serialize access faults. Only take the read lock when handling an access fault. Link: https://lore.kernel.org/r/20221202185156.696189-6-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit 7d29a2407df612b0903cee94fc3469d7335b442c Author: Oliver Upton Date: Fri Dec 2 18:51:54 2022 +0000 KVM: arm64: Don't serialize if the access flag isn't set Of course, if the PTE wasn't changed then there are absolutely no serialization requirements. Skip the DSB for an unsuccessful update to the access flag. Link: https://lore.kernel.org/r/20221202185156.696189-5-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit 76259cca479501579b0c524826c25fcc8bb90e97 Author: Oliver Upton Date: Fri Dec 2 18:51:53 2022 +0000 KVM: arm64: Return EAGAIN for invalid PTE in attr walker Return EAGAIN for invalid PTEs in the attr walker, signaling to the caller that any serialization and/or invalidation can be elided. Link: https://lore.kernel.org/r/20221202185156.696189-4-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit ddcadb297ce5cc1cec0b0882d8b750e5e06fc9f4 Author: Oliver Upton Date: Fri Dec 2 18:51:52 2022 +0000 KVM: arm64: Ignore EAGAIN for walks outside of a fault The page table walkers are invoked outside fault handling paths, such as write protecting a range of memory. EAGAIN is generally used by the walkers to retry execution due to races on a particular PTE, like taking an access fault on a PTE being invalidated from another thread. This early return behavior is undesirable for walkers that operate outside a fault handler. Suppress EAGAIN and continue the walk if operating outside a fault handler. Link: https://lore.kernel.org/r/20221202185156.696189-3-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit 9a7ad19ac804df56d3a150bcbe8f467a63821625 Author: Oliver Upton Date: Fri Dec 2 18:51:51 2022 +0000 KVM: arm64: Use KVM's pte type/helpers in handle_access_fault() Consistently use KVM's own pte types and helpers in handle_access_fault(). No functional change intended. Link: https://lore.kernel.org/r/20221202185156.696189-2-oliver.upton@linux.dev Signed-off-by: Oliver Upton commit bf48040cd9b0c4d93c635ce222014a594e4e93f2 Author: Akihiko Odaki Date: Thu Jan 12 11:38:51 2023 +0900 KVM: arm64: Mask FEAT_CCIDX The CCSIDR access handler masks the associativity bits according to the bit layout for processors without FEAT_CCIDX. KVM also assumes CCSIDR is 32-bit where it will be 64-bit if FEAT_CCIDX is enabled. Mask FEAT_CCIDX so that these assumptions hold. Suggested-by: Marc Zyngier Signed-off-by: Akihiko Odaki Link: https://lore.kernel.org/r/20230112023852.42012-7-akihiko.odaki@daynix.com Signed-off-by: Oliver Upton commit 8cc6dedaff424d8a9bb6687a7b5763a5eeee125b Author: Akihiko Odaki Date: Thu Jan 12 11:38:50 2023 +0900 KVM: arm64: Always set HCR_TID2 Always set HCR_TID2 to trap CTR_EL0, CCSIDR2_EL1, CLIDR_EL1, and CSSELR_EL1. This saves a few lines of code and allows to employ their access trap handlers for more purposes anticipated by the old condition for setting HCR_TID2. Suggested-by: Marc Zyngier Signed-off-by: Akihiko Odaki Reviewed-by: Reiji Watanabe Link: https://lore.kernel.org/r/20230112023852.42012-6-akihiko.odaki@daynix.com Signed-off-by: Oliver Upton commit 805e6ec1c5e0ba4919a569535d63d2113dc17fed Author: Akihiko Odaki Date: Thu Jan 12 11:38:49 2023 +0900 arm64/cache: Move CLIDR macro definitions The macros are useful for KVM which needs to manage how CLIDR is exposed to vcpu so move them to include/asm/cache.h, which KVM can refer to. Signed-off-by: Akihiko Odaki Link: https://lore.kernel.org/r/20230112023852.42012-5-akihiko.odaki@daynix.com Signed-off-by: Oliver Upton commit 8f407d6a15f338458a01926dbe5e0bed14ca4267 Author: Akihiko Odaki Date: Thu Jan 12 11:38:48 2023 +0900 arm64/sysreg: Add CCSIDR2_EL1 CCSIDR2_EL1 is available if FEAT_CCIDX is implemented as per DDI0487I.a. Signed-off-by: Akihiko Odaki Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20230112023852.42012-4-akihiko.odaki@daynix.com Signed-off-by: Oliver Upton commit d1a0eb124c447902839e72b6bad58e0d5464002e Author: Akihiko Odaki Date: Thu Jan 12 11:38:47 2023 +0900 arm64/sysreg: Convert CCSIDR_EL1 to automatic generation Convert CCSIDR_EL1 to automatic generation as per DDI0487I.a. Signed-off-by: Akihiko Odaki Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20230112023852.42012-3-akihiko.odaki@daynix.com Signed-off-by: Oliver Upton commit e2c0b51f1c9dacc68292ce9ebffbfd4204d1ca58 Author: Marc Zyngier Date: Thu Jan 12 11:38:46 2023 +0900 arm64: Allow the definition of UNKNOWN system register fields The CCSIDR_EL1 register contains an UNKNOWN field (which replaces fields that were actually defined in previous revisions of the architecture). Define an 'Unkn' field type modeled after the Res0/Res1 types to allow such description. This allows the generation of #define CCSIDR_EL1_UNKN (UL(0) | GENMASK_ULL(31, 28)) which may have its use one day. Hopefully the architecture doesn't add too many of those in the future. Signed-off-by: Marc Zyngier Signed-off-by: Akihiko Odaki Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20230112023852.42012-2-akihiko.odaki@daynix.com Signed-off-by: Oliver Upton commit 9da5daa0c122fe1617168d9b96e9f5d412ae4d93 Author: Marijn Suijten Date: Thu Dec 22 00:19:43 2022 +0100 drm/msm/dpu: Add DSC configuration for SM8150 and SM8250 These DSC blocks on CTL V1 need to set its corresponding PINGPONG block index in a hardware register to configure where to send pixel output to, via the newly-added DPU_DSC_OUTPUT_CTRL feature flag. Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/515689/ Link: https://lore.kernel.org/r/20221221231943.1961117-9-marijn.suijten@somainline.org Signed-off-by: Dmitry Baryshkov commit 7aa6f1a12ff4439a5d7e8b877d57d78c2a86d3ee Author: Marijn Suijten Date: Thu Dec 22 00:19:42 2022 +0100 drm/msm/dpu: Implement DSC binding to PP block for CTL V1 All V1 CTL blocks (active CTLs) explicitly bind the pixel output from a DSC block to a PINGPONG block by setting the PINGPONG index in a DSC hardware register. Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/515698/ Link: https://lore.kernel.org/r/20221221231943.1961117-8-marijn.suijten@somainline.org Signed-off-by: Dmitry Baryshkov commit 4ba5a4ad568e3b2396dca307894062b7e9442e61 Author: Marijn Suijten Date: Thu Dec 22 00:19:41 2022 +0100 drm/msm/dpu: Remove num_enc from topology struct in favour of num_dsc Downstream calls this num_enc yet the DSC patches introduced a new num_dsc struct member, leaving num_enc effectively unused. Fixes: 7e9cc175b159 ("drm/msm/disp/dpu1: Add support for DSC in topology") Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/515688/ Link: https://lore.kernel.org/r/20221221231943.1961117-7-marijn.suijten@somainline.org Signed-off-by: Dmitry Baryshkov commit 7d9510efec33157f9994df735e035e1b18e2562b Author: Marijn Suijten Date: Thu Dec 22 00:19:40 2022 +0100 drm/msm/dpu: Reject topologies for which no DSC blocks are available Resource allocation of DSC blocks should behave more like LMs and CTLs where NULL resources (based on initial hw_blk creation via definitions in the catalog) are skipped ^1. The current hardcoded mapping of DSC blocks however means that resource allocation shouldn't succeed at all when the DSC block on the corresponding index doesn't exist, rather than searching for the next free block. This hardcoded mapping should be loosened separately as DPU 5.0.0 introduced a crossbar where DSC blocks can be "somewhat" freely bound to any PP and CTL (in proper pairs). ^1: which, on hardware that supports DSC, can happen after a git rebase ended up moving additions to _dpu_cfg to a different struct which has the same patch context. Fixes: f2803ee91a41 ("drm/msm/disp/dpu1: Add DSC support in RM") Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/515684/ Link: https://lore.kernel.org/r/20221221231943.1961117-6-marijn.suijten@somainline.org Signed-off-by: Dmitry Baryshkov commit 82e72fd22a8f9eff4e75c08be68319008ea90a29 Author: Marijn Suijten Date: Thu Dec 22 00:19:38 2022 +0100 drm/msm/dsi: Flip greater-than check for slice_count and slice_per_intf According to downstream /and the comment copied from it/ this comparison should be the other way around. In other words, when the panel driver requests to use more slices per packet than what could be sent over this interface, it is bumped down to only use a single slice per packet (and strangely not the number of slices that could fit on the interface). Fixes: 08802f515c3c ("drm/msm/dsi: Add support for DSC configuration") Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/515686/ Link: https://lore.kernel.org/r/20221221231943.1961117-4-marijn.suijten@somainline.org Signed-off-by: Dmitry Baryshkov commit bc6b6ff8135c4b96787eda88f3baf653939a75ce Author: Marijn Suijten Date: Thu Dec 22 00:19:37 2022 +0100 drm/msm/dsi: Use DSC slice(s) packet size to compute word count According to downstream the value to use for WORD_COUNT is bytes_per_pkt, which denotes the number of bytes in a packet based on how many slices have been configured by the panel driver times the width of a slice times the number of bytes per pixel. The DSC panels seen thus far use one byte per pixel, only one slice per packet, and a slice width of half the panel width leading to the desired bytes_per_pkt+1 value to be equal to hdisplay/2+1. This however isn't the case anymore for panels that configure two slices per packet, where the value should now be hdisplay+1. Note that the aforementioned panel (on a Sony Xperia XZ3, sdm845) with slice_count=1 has also been tested to successfully accept slice_count=2, which would have shown corrupted output previously. Fixes: 08802f515c3c ("drm/msm/dsi: Add support for DSC configuration") Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/515694/ Link: https://lore.kernel.org/r/20221221231943.1961117-3-marijn.suijten@somainline.org Signed-off-by: Dmitry Baryshkov commit cda3774c242e156cdcc279bd36b404af89f744c6 Author: Marijn Suijten Date: Thu Dec 22 00:19:36 2022 +0100 drm/msm/dpu: Wire up DSC mask for active CTL configuration Active CTLs have to configure what DSC block(s) have to be enabled, and what DSC block(s) have to be flushed; this value was initialized to zero resulting in the necessary register writes to never happen (or would write zero otherwise). This seems to have gotten lost in the DSC v4->v5 series while refactoring how the combination with merge_3d was handled. Fixes: 58dca9810749 ("drm/msm/disp/dpu1: Add support for DSC in encoder") Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/515693/ Link: https://lore.kernel.org/r/20221221231943.1961117-2-marijn.suijten@somainline.org Signed-off-by: Dmitry Baryshkov commit a2f33995c19db64398ab6440e8c38fe9d4df6e3c Author: Neil Armstrong Date: Mon Jan 9 11:15:21 2023 +0100 drm/msm: mdss: add support for SM8550 Add support for the MDSS block on SM8550 platform. Signed-off-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/517516/ Link: https://lore.kernel.org/r/20230103-topic-sm8550-upstream-mdss-dsi-v3-5-660c3bcb127f@linaro.org Signed-off-by: Dmitry Baryshkov commit efcd0107727c4f04aa9cd7fb5c50c83a1e747218 Author: Neil Armstrong Date: Mon Jan 9 11:15:20 2023 +0100 drm/msm/dpu: add support for SM8550 Add definitions for the display hardware used on Qualcomm SM8550 platform. Reviewed-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Patchwork: https://patchwork.freedesktop.org/patch/517512/ Link: https://lore.kernel.org/r/20230103-topic-sm8550-upstream-mdss-dsi-v3-4-660c3bcb127f@linaro.org Signed-off-by: Dmitry Baryshkov commit f272925ed473890f91499e241bd3ad0a2f3bd2e1 Author: Bjorn Andersson Date: Wed Dec 7 14:00:03 2022 -0800 drm/msm: Introduce SC8280XP MDSS Add compatible for the SC8280XP Mobile Display Subsystem and initialization for version 8.0.0. Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov Reviewed-by: Kuogee Hsieh Patchwork: https://patchwork.freedesktop.org/patch/514402/ Link: https://lore.kernel.org/r/20221207220012.16529-4-quic_bjorande@quicinc.com Signed-off-by: Dmitry Baryshkov commit 4a352c2fc15aec1e8ab5e515097d1ba2fd623858 Author: Bjorn Andersson Date: Wed Dec 7 14:00:02 2022 -0800 drm/msm/dpu: Introduce SC8280XP The Qualcomm SC8280XP platform contains DPU version 8.0.0, has 9 interfaces, 2 DSI controllers and 4 DisplayPort controllers. Extend the necessary definitions and describe the DPU in the SC8280XP. Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov Reviewed-by: Kuogee Hsieh Patchwork: https://patchwork.freedesktop.org/patch/514398/ Link: https://lore.kernel.org/r/20221207220012.16529-3-quic_bjorande@quicinc.com Signed-off-by: Dmitry Baryshkov commit 45af56bf2d7475b56f62cdf85ff8cdafe463650c Author: Bjorn Andersson Date: Wed Dec 7 14:00:01 2022 -0800 dt-bindings: display/msm: Add binding for SC8280XP MDSS Add binding for the display subsystem and display processing unit in the Qualcomm SC8280XP platform. Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Reviewed-by: Rob Herring Patchwork: https://patchwork.freedesktop.org/patch/514396/ Link: https://lore.kernel.org/r/20221207220012.16529-2-quic_bjorande@quicinc.com Signed-off-by: Dmitry Baryshkov commit 1e9b35fbb8c8a34677c1acd1b13e24a2560889ae Author: Robert Foss Date: Fri Dec 30 16:35:48 2022 +0100 drm/msm: Add support for SM8350 Add compatibles string, "qcom,sm8350-mdss", for the multimedia display subsystem unit used on Qualcomm SM8350 platform. Signed-off-by: Robert Foss Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/516345/ Link: https://lore.kernel.org/r/20221230153554.105856-6-robert.foss@linaro.org Signed-off-by: Dmitry Baryshkov commit 5dfc1b2e61601f8e15075b45656d6b962ecb3e99 Author: Dmitry Baryshkov Date: Mon Jan 9 23:43:09 2023 +0200 drm/msm/dpu: disable DSC blocks for SM8350 SM8350 has newer version of DSC blocks, which are not supported by the driver yet. Remove them for now until these blocks are supported by the driver. Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/517629/ Link: https://lore.kernel.org/r/20230109214309.586130-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 7eb75dbd62eb61695cffa31f0aa6311c25681906 Author: Robert Foss Date: Fri Dec 30 16:35:47 2022 +0100 drm/msm/dpu: Add support for SM8350 Add compatibles string, "qcom,sm8350-dpu", for the display processing unit used on Qualcomm SM8350 platform. Signed-off-by: Robert Foss Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/516342/ Link: https://lore.kernel.org/r/20221230153554.105856-5-robert.foss@linaro.org Signed-off-by: Dmitry Baryshkov commit 0e91bcbb0016150124a99bd97d34b97615750f10 Author: Robert Foss Date: Fri Dec 30 16:35:46 2022 +0100 drm/msm/dpu: Add SM8350 to hw catalog Add compatibility for SM8350 display subsystem, including required entries in DPU hw catalog. Signed-off-by: Robert Foss Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/516340/ Link: https://lore.kernel.org/r/20221230153554.105856-4-robert.foss@linaro.org Signed-off-by: Dmitry Baryshkov commit 430e11f42bff4518577bfbb0263cd10908d61e1e Author: Robert Foss Date: Fri Dec 30 16:35:45 2022 +0100 dt-bindings: display: msm: Add qcom, sm8350-mdss binding Mobile Display Subsystem (MDSS) encapsulates sub-blocks like DPU display controller, DSI etc. Add YAML schema for MDSS device tree bindings Signed-off-by: Robert Foss Reviewed-by: Rob Herring Patchwork: https://patchwork.freedesktop.org/patch/516338/ Link: https://lore.kernel.org/r/20221230153554.105856-3-robert.foss@linaro.org Signed-off-by: Dmitry Baryshkov commit 62d1449d7afb93822d929afc8fa5d309b3ff9cba Author: Robert Foss Date: Fri Dec 30 16:35:44 2022 +0100 dt-bindings: display: msm: Add qcom, sm8350-dpu binding Mobile Display Subsystem (MDSS) encapsulates sub-blocks like DPU display controller, DSI etc. Add YAML schema for DPU device tree bindings Signed-off-by: Robert Foss Reviewed-by: Rob Herring Patchwork: https://patchwork.freedesktop.org/patch/516337/ Link: https://lore.kernel.org/r/20221230153554.105856-2-robert.foss@linaro.org Signed-off-by: Dmitry Baryshkov commit 80056d9ac47ab63abf7f0e8f77e8d66b5e483442 Author: Dmitry Baryshkov Date: Wed Dec 7 03:22:31 2022 +0200 drm/msm: mdss add support for SM8450 Add support for the MDSS block on SM8450 platform. Tested-by: Vinod Koul Reviewed-by: Vinod Koul Reviewed-by: Konrad Dybcio Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/514247/ Link: https://lore.kernel.org/r/20221207012231.112059-12-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 100d7ef6995d1f86727cc9dd53fec45bb6c0af21 Author: Dmitry Baryshkov Date: Wed Dec 7 03:22:30 2022 +0200 drm/msm/dpu: add support for SM8450 Add definitions for the display hardware used on Qualcomm SM8450 platform. Tested-by: Vinod Koul Reviewed-by: Vinod Koul Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/514235/ Link: https://lore.kernel.org/r/20221207012231.112059-11-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 43e3293fc614c742e5e59f8045984959afdb345e Author: Dmitry Baryshkov Date: Wed Dec 7 03:22:29 2022 +0200 drm/msm/dpu: add support for MDP_TOP blackhole On sm8450 a register block was removed from MDP TOP. Accessing it during snapshotting results in NoC errors / immediate reboot. Skip accessing these registers during snapshot. Tested-by: Vinod Koul Reviewed-by: Vinod Koul Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/514239/ Link: https://lore.kernel.org/r/20221207012231.112059-10-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit dbe2422b20b9bc33067804e65b7ce24b06706dec Author: Dmitry Baryshkov Date: Wed Dec 7 03:22:28 2022 +0200 drm/msm/dpu: merge all MDP TOP registers to dpu_hwio.h There is a separate header containing some of MDP TOP register definitions, dpu_hwio.h. Move missing register definitions from dpu_hw_top.c to the mentioned header. Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/514242/ Link: https://lore.kernel.org/r/20221207012231.112059-9-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 0eda3c6cb1c5d6f8ccb8e28159f5226269fba5ac Author: Dmitry Baryshkov Date: Wed Dec 7 03:22:24 2022 +0200 dt-bindings: display/msm: add support for the display on SM8450 Add DPU and MDSS schemas to describe MDSS and DPU blocks on the Qualcomm SM8450 platform. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/514234/ Link: https://lore.kernel.org/r/20221207012231.112059-5-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 73162e5dd4f45a134b72143ce679ffebff58fcdf Author: Dmitry Baryshkov Date: Wed Dec 7 03:22:21 2022 +0200 dt-bindings: display/msm: *dpu.yaml: split required properties clauses Require only properties declared in given schema, which makes the code a bit more readable and easy to follow. Suggested-by: Krzysztof Kozlowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/514229/ Link: https://lore.kernel.org/r/20221207012231.112059-2-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 477bdf8b2fd1b016b064386642ba6b306567c864 Author: Krzysztof Kozlowski Date: Sun Dec 25 12:59:24 2022 +0100 dt-bindings: display: msm: drop redundant part of title The Devicetree bindings document does not have to say in the title that contains "DT properties", but instead just describe the hardware. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Patchwork: https://patchwork.freedesktop.org/patch/516033/ Link: https://lore.kernel.org/r/20221225115925.55337-1-krzysztof.kozlowski@linaro.org Signed-off-by: Dmitry Baryshkov commit ccfe1fef9409ca80ffad6ce822a6d15eaee67c91 Author: Zqiang Date: Wed Dec 21 11:15:43 2022 -0800 rcu: Remove redundant call to rcu_boost_kthread_setaffinity() The rcu_boost_kthread_setaffinity() function is invoked at rcutree_online_cpu() and rcutree_offline_cpu() time, early in the online timeline and late in the offline timeline, respectively. It is also invoked from rcutree_dead_cpu(), however, in the absence of userspace manipulations (for which userspace must take responsibility), this call is redundant with that from rcutree_offline_cpu(). This redundancy can be demonstrated by printing out the relevant cpumasks This commit therefore removes the call to rcu_boost_kthread_setaffinity() from rcutree_dead_cpu(). Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney Reviewed-by: Frederic Weisbecker commit 4c1b743237ede55946b900dd181824ef54cafc43 Author: Peng Fan Date: Fri Dec 23 11:05:40 2022 +0800 dt-bindings: clock: imx8m-clock: correct i.MX8MQ node name i.MX8MQ CCM is at address 0x30380000, so correct it. Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20221223030540.62018-1-peng.fan@oss.nxp.com Reviewed-by: Marco Felsch Acked-by: Rob Herring Signed-off-by: Stephen Boyd commit 5eab9265759e2fb042aa452931c3d06ab7ab8dae Author: Arnd Bergmann Date: Thu Jan 5 14:46:09 2023 +0100 ASoC: PXA: make SND_PXA2XX_SOC_AC97 user-selectable When building a PXA kernel without legacy board file support, the AC97 code is not built, so none of the AC97 drivers can be used. Add a Kconfig prompt to let users turn it on, and have it enabled by default. Cc: Robert Jarzmik Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-devel@alsa-project.org Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230105134622.254560-15-arnd@kernel.org Signed-off-by: Mark Brown commit bba5065963f8ade14f3caa5b0f5b4a53d3054dfd Author: Vidya Sagar Date: Thu Jan 12 12:51:11 2023 +0530 PCI/AER: Configure ECRC only if AER is native As the ECRC configuration bits are part of AER registers, configure ECRC only if AER is natively owned by the kernel. Link: https://lore.kernel.org/r/20230112072111.20063-1-vidyas@nvidia.com Signed-off-by: Vidya Sagar Signed-off-by: Bjorn Helgaas commit 0fe76b198d482b41771a8d17b45fb726d13083cf Author: Drew Davenport Date: Mon Dec 26 22:53:24 2022 -0700 drm/i915/display: Check source height is > 0 The error message suggests that the height of the src rect must be at least 1. Reject source with height of 0. Cc: stable@vger.kernel.org Signed-off-by: Drew Davenport Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221226225246.1.I15dff7bb5a0e485c862eae61a69096caf12ef29f@changeid commit 8b3c08aa648e6669c0bcd34a727f819b844fd684 Author: Frank Wunderlich Date: Fri Jan 6 16:28:41 2023 +0100 dt-bindings: phy: mediatek,tphy: add support for mt7986 Add compatible string for mt7986. Signed-off-by: Frank Wunderlich Acked-by: Krzysztof Kozlowski Reviewed-by: Chunfeng Yun Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20230106152845.88717-2-linux@fw-web.de Signed-off-by: Vinod Koul commit 8dd256bae653311db57fd117833ac952c2885b60 Author: Andre Przywara Date: Mon Jan 9 01:22:23 2023 +0000 phy: sun4i-usb: Replace types with explicit quirk flags So far we were assigning some crude "type" (SoC name, really) to each Allwinner USB PHY model, then guarding certain quirks based on this. This does not only look weird, but gets more or more cumbersome to maintain. Remove the bogus type names altogether, instead introduce flags for each quirk, and explicitly check for them. This improves readability, and simplifies future extensions. Signed-off-by: Andre Przywara Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20230109012223.4079299-4-andre.przywara@arm.com Signed-off-by: Vinod Koul commit 50bd67abe5bacc8fd160461bb3eb2c164c4698c0 Author: Icenowy Zheng Date: Mon Jan 9 01:22:22 2023 +0000 phy: sun4i-usb: add support for the USB PHY on F1C100s SoC The F1C100s SoC has one USB OTG port connected to a MUSB controller. Add support for its USB PHY. Signed-off-by: Icenowy Zheng Acked-by: Jernej Skrabec Signed-off-by: Andre Przywara Link: https://lore.kernel.org/r/20230109012223.4079299-3-andre.przywara@arm.com Signed-off-by: Vinod Koul commit d0aa1608434c25d5803e01018747cc75d1c1ddc1 Author: Icenowy Zheng Date: Mon Jan 9 01:22:21 2023 +0000 dt-bindings: phy: add binding document for Allwinner F1C100s USB PHY Allwinner F1C100s has the most simple USB PHY among all Allwinner SoCs, because it has only one OTG USB controller, no host-only OHCI/EHCI controllers. Add a binding document for it. Following the current situation of one YAML file per SoC, this one is based on allwinner,sun8i-v3s-usb-phy.yaml, but with OHCI/EHCI-related bits removed. (The same driver in Linux, phy-sun4i-usb, covers all these binding files now.) Signed-off-by: Icenowy Zheng Reviewed-by: Rob Herring Reviewed-by: Andre Przywara Reviewed-by: Samuel Holland Signed-off-by: Andre Przywara Link: https://lore.kernel.org/r/20230109012223.4079299-2-andre.przywara@arm.com Signed-off-by: Vinod Koul commit 73b7d7f2dcf4f729028deec3f5e434af19270fda Author: Samuel Holland Date: Thu Dec 8 02:41:27 2022 -0600 soc: sunxi: sram: Only iterate over SRAM children Now that a regulators child is accepted by the controller binding, the debugfs show routine must be explicitly limited to mmio-sram children. Acked-by: Jernej Skrabec Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20221208084127.17443-5-samuel@sholland.org Signed-off-by: Jernej Skrabec commit 5c7f94f8bad88a448250e19486ee99a55de21fa9 Author: Sing-Han Chen Date: Wed Jan 11 11:04:49 2023 +0000 phy: tegra: xusb: Add Tegra234 support Add support for the XUSB pad controller found on Tegra234 SoCs. It is mostly similar to the same IP found on Tegra194, because most of the Tegra234 XUSB PADCTL registers definition and programming sequence are the same as Tegra194, Tegra234 XUSB PADCTL can share the same driver with Tegra186 and Tegra194 XUSB PADCTL. Introduce a new feature, USB2 HW tracking, for Tegra234. The feature is to enable HW periodical PAD tracking which measure and capture the electric parameters of USB2.0 PAD. Signed-off-by: Sing-Han Chen Co-developed-by: Wayne Chang Signed-off-by: Wayne Chang Signed-off-by: Jon Hunter Link: https://lore.kernel.org/r/20230111110450.24617-6-jonathanh@nvidia.com Signed-off-by: Vinod Koul commit e5f9124404d0c11fd19d1431901bcf76c535e241 Author: Wayne Chang Date: Wed Jan 11 11:04:48 2023 +0000 phy: tegra: xusb: Disable trk clk when not in use Pad tracking is a one-time calibration for Tegra186 and Tegra194. Clk should be disabled after calibration. Disable clk after calibration. While at it add 100us delay for HW recording the calibration value. Signed-off-by: Wayne Chang Signed-off-by: Jon Hunter Link: https://lore.kernel.org/r/20230111110450.24617-5-jonathanh@nvidia.com Signed-off-by: Vinod Koul commit eb5793fbea50e7c89fce0bb56ce9948fa67f125b Author: Dmitry Baryshkov Date: Thu Nov 10 22:22:48 2022 +0300 phy: qcom-qmp: move type-specific headers to particular driver Remove QMP PHY type-specific headers inclusion from the common header and move them to the specific PHY drivers to cleanup the namespaces used by different drivers. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221110192248.873973-14-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit 14d98d3bf70e2a67249c7930e892b16346806558 Author: Dmitry Baryshkov Date: Thu Nov 10 22:22:47 2022 +0300 phy: qcom-qmp-usb: fix regs layout arrays Drop qcm2290_usb3phy_regs_layout, it is a duplicate of qmp_v3_usb3phy_regs_layout. Introduce qmp_v5_usb3phy_regs_layout to be used for sm8350 and sc8280xp. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221110192248.873973-13-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit 83cb72b4e343b35f1b86d2f64bd8a764b492ece6 Author: Dmitry Baryshkov Date: Thu Nov 10 22:22:46 2022 +0300 phy: qcom-qmp-usb: rework regs layout arrays Use symbolic names for the values inside reg layout arrays. New register names are added following the PCS register layout that is used by the particular PHY. Note: ipq8074 tables appear to use a mixture of v2 and v3 registers. This might need additional fixes. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221110192248.873973-12-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit 5c45d28845e2a7a812b15f1f56e9a3f92a0f8125 Author: Dmitry Baryshkov Date: Thu Nov 10 22:22:45 2022 +0300 phy: qcom-qmp-usb: remove QPHY_PCS_MISC_TYPEC_CTRL reg The QPHY_PCS_MISC_TYPEC_CTRL register is not used, remove it from register layout. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221110192248.873973-11-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit e3c3f7cf1533b87ff0f96927fe469eb5eee94897 Author: Dmitry Baryshkov Date: Thu Nov 10 22:22:44 2022 +0300 phy: qcom-qmp-usb: remove QPHY_PCS_LFPS_RXTERM_IRQ_STATUS reg The QPHY_PCS_LFPS_RXTERM_IRQ_STATUS register is not used, remove it from register layout. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221110192248.873973-10-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit 5db2264006dd43fb212ad542520389ce5cb465d1 Author: Dmitry Baryshkov Date: Thu Nov 10 22:22:43 2022 +0300 phy: qcom-qmp-ufs: rename regs layout arrays Rename regs layouts to follow the QMP PHY version. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221110192248.873973-9-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit 3b4bf465dd34d57cec2b1757d1e2b2395fe08f6a Author: Dmitry Baryshkov Date: Thu Nov 10 22:22:42 2022 +0300 phy: qcom-qmp-ufs: rework regs layout arrays Use symbolic names for the values inside reg layout arrays. New register names are added following the PCS register layout that is used by the particular PHY. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221110192248.873973-8-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit cbd06cdedf779b8bb0d2fd8f468a21b8e85db9c2 Author: Dmitry Baryshkov Date: Thu Nov 10 22:22:41 2022 +0300 phy: qcom-qmp-ufs: split UFS-specific v2 PCS registers to a separate header Follow other QMP headers, split and rename UFS-specific PCS registers to ease comparing regs differences. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221110192248.873973-7-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit 61f21e0efa4b9770e5af0b0830c0548a3f5ad8ba Author: Dmitry Baryshkov Date: Thu Nov 10 22:22:40 2022 +0300 phy: qcom-qmp-pcie-msm8996: rework regs layout arrays Use symbolic names for the values inside reg layout arrays. New register names are added following the PCS register layout that is used by the particular PHY. Note: ipq8074 tables appear to use a mixture of v2 and v3 registers. This might need additional fixes. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221110192248.873973-6-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit bbe207a1aba191eb240244193c2aa0a2b1ef271d Author: Dmitry Baryshkov Date: Thu Nov 10 22:22:39 2022 +0300 phy: qcom-qmp-pcie: rename regs layout arrays Rename regs layouts to follow the QMP PHY version. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221110192248.873973-5-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit 027d16b51576c2d8d4270c9594d93b49c8e20350 Author: Dmitry Baryshkov Date: Thu Nov 10 22:22:38 2022 +0300 phy: qcom-qmp-pcie: rework regs layout arrays Use symbolic names for the values inside reg layout arrays. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221110192248.873973-4-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit d94b1d076d4134b33ce64de4d3342e6227faac61 Author: Dmitry Baryshkov Date: Thu Nov 10 22:22:37 2022 +0300 phy: qcom-qmp: remove duplicate v5_5nm register definitions Remove duplicate defines from phy-qcom-qmp-qserdes-txrx-v5_5nm.h Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221110192248.873973-3-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit a85dcc98cbe6a7ba3ba88e0003541464e125036b Author: Dmitry Baryshkov Date: Thu Nov 10 22:22:36 2022 +0300 phy: qcom-qmp: fix typo in QSERDES_COM_CMN_RSVD5 value Fix typo in QSERDES_COM_CMN_RSVD5 register definition. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221110192248.873973-2-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit 7bd7044fcdc0de48bbae66c090605efab6b764dd Author: Dmitry Baryshkov Date: Wed Nov 23 12:44:41 2022 +0200 phy: qcom-qmp-ufs: provide symbol clocks Register three UFS symbol clocks (ufs_rx_symbol_0_clk_src, ufs_rx_symbol_1_clk_src ufs_tx_symbol_0_clk_src). Register OF clock provider to let other devices link these clocks through the DT. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221123104443.3415267-3-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit 521d431fcace6122ceb12f0985a9632b0049372b Author: Dmitry Baryshkov Date: Wed Nov 23 12:44:40 2022 +0200 dt-bindings: phy: qcom,*-qmp-ufs-phy: add clock-cells property Add #clock-cells property to the QMP UFS PHYs to describe them as clock providers. The QMP PHY provides rx and tx symbol clocks for the GCC. Acked-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221123104443.3415267-2-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit 101097d69ec1db556c002d7cbe68ae2fe1dc3ded Author: Dmitry Baryshkov Date: Thu Dec 29 13:59:32 2022 +0200 phy: qualcomm: pcie2: register as clock provider Register pcie2 PHY as a clock provider to enable using it in the DT-based clock lookup. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221229115932.3312318-3-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit a98f5cc9c0e01186244498a084bf24ae764f86f2 Author: Dmitry Baryshkov Date: Thu Dec 29 13:59:31 2022 +0200 dt-bindings: phy: qcom,pcie2-phy: convert to YAML format Convert the bindings for the Qualcomm PCIe2 PHY into the YAML format from the text description. Signed-off-by: Dmitry Baryshkov Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221229115932.3312318-2-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit 1c3b614548b50227c5950258831b130d832703b5 Author: Mark Brown Date: Tue Jan 10 20:49:59 2023 +0000 kselftest/arm64: Run BTI selftests on systems without BTI The BTI selftests are built both with and without BTI support, validating both the generation of BTI signals as expected for binaries without BTI support. Both versions of the binary currently skip all their tests when the system does not support BTI, however this is excessive since we do have a defined ABI for how the programs should function in this case (especially for the non-BTI binary). Update the test program to run all the tests unconditionally, adding a runtime adjustment of the expected results on systems that don't support BTI where we currently handle the build time case. The tests all use HINT space instructions, BTI itself is a HINT as is are the PAC instructions that function as landing pads, so nothing in the tests depends on support for BTI in the kernel or hardware. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230110-arm64-bti-selftest-skip-v1-2-143ecdc84567@kernel.org Signed-off-by: Catalin Marinas commit 30792e7c18b659599d9b67922d60d76eee1a0e5d Author: Mark Brown Date: Tue Jan 10 20:49:58 2023 +0000 kselftest/arm64: Fix test numbering when skipping tests Currently when skipping tests in the BTI testsuite we assign the same number to every test since we forget to increment the current test number as we skip, causing warnings about not running the expected test count and potentially otherwise confusing result parsers. Fix this by adding an appropriate increment. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230110-arm64-bti-selftest-skip-v1-1-143ecdc84567@kernel.org Signed-off-by: Catalin Marinas commit c70052739d16bea404833fbf305db3ef5d4f875b Author: Dmitry Baryshkov Date: Sat Nov 19 01:32:40 2022 +0200 phy: qcom-qmp-pcie: add support for sm8350 platform Add support for a single-lane and two-lane PCIe PHYs found on Qualcomm SM8350 platform. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221118233242.2904088-7-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit c99649c3359e9abe26f9a8903618d42059ba319d Author: Dmitry Baryshkov Date: Sat Nov 19 01:32:39 2022 +0200 phy: qcom-qmp-pcie: rename the sm8450 gen3 PHY config tables SM8350 PHY config tables are mostly the same as SM8450 gen3 PHY config tables. Rename generic tables to remove x1 suffix. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221118233242.2904088-6-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit d8de49e9be37116d9f9b10721254ca73fff2e94e Author: Dmitry Baryshkov Date: Sat Nov 19 01:32:38 2022 +0200 phy: qcom-qmp-pcie: split sm8450 gen3 PHY config tables SM8350 PHY config tables are mostly the same as SM8450 gen3 PHY config tables. Split these tables to be used by SM8350 config. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221118233242.2904088-5-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit 43a6a29b7eda5b4b5efecf43b30e75dc8faa7af4 Author: Dmitry Baryshkov Date: Sat Nov 19 01:32:36 2022 +0200 dt-bindings: phy: qcom,qmp-pcie: add sm8350 bindings Add bindings for the PCIe QMP PHYs found on SM8350. Reviewed-by: Rob Herring Reviewed-by: Johan Hovold Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221118233242.2904088-3-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit b2482807fbd48a299512d161e38262fd7d973aa0 Author: Mark Brown Date: Tue Jan 10 19:34:36 2023 +0000 arm64/sme: Optimise SME exit on syscall entry Our ABI says that we exit streaming mode on syscall entry. Currently we check if we are in streaming mode before doing this but since we have a SMSTOP SM instruction which will clear SVCR.SM in a single atomic operation we can save ourselves the read of the system register and check of the flag and just unconditionally do the SMSTOP SM. If we are not in streaming mode it results in a noop change to SVCR, if we are in streaming mode we will exit as desired. No functional change. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230110-arm64-sme-syscall-smstop-v1-1-ac94235fd810@kernel.org Signed-off-by: Catalin Marinas commit 5a4c2a314083b07751c3151baf5e6ed7cc3aba36 Author: Kefeng Wang Date: Wed Jan 4 21:00:00 2023 +0800 arm64: make ARCH_FORCE_MAX_ORDER selectable The other architectures with ARCH_FORCE_MAX_ORDER are selectable, but not for ARM64, this is to make it selectable on ARM64, which is useful for user that need to allocate more than 4MB of physically contiguous memory with 4K pagesize, also bigger on 16K pagesize too, the max value of MAX_ORDER is calculated bellow, see include/linux/mmzone.h, MAX_ORDER - 1 + PAGE_SHIFT <= SECTION_SIZE_BITS so max value of MAX_ORDER = SECTION_SIZE_BITS + 1 - PAGE_SHIFT | SECTION_SIZE_BITS | PAGE_SHIFT | max MAX_ORDER | default MAX_ORDER | ----+-------------------+--------------+-----------------+--------------------+ 4K | 27 | 12 | 16 | 11 | 16K | 27 | 14 | 14 | 12 | 64K | 29 | 16 | 14 | 14 | ----+-------------------+--------------+-----------------+--------------------+ Signed-off-by: Kefeng Wang Link: https://lore.kernel.org/r/20230104130000.69806-1-wangkefeng.wang@huawei.com [catalin.marinas@arm.com: add the calculations as comment to arch/arm64/Kconfig] Signed-off-by: Catalin Marinas commit 1abf363d085cf6133ef44900334ddd0f61dc3276 Author: Mark Brown Date: Tue Dec 27 17:05:05 2022 +0000 KVM: arm64: Use symbolic definition for ISR_EL1.A Now that we are generating ISR_EL1 we have acquired a constant for ISR_EL1.A, use it rather than the magic number we had been using in the KVM entry code. Suggested-by: Marc Zyngier Acked-by: Marc Zyngier Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-isr-el1-v2-3-89f7073a1ca9@kernel.org Signed-off-by: Catalin Marinas commit df5f1775aab2ab819caac73f1ccbb65929848e4e Author: Mark Brown Date: Tue Dec 27 17:05:04 2022 +0000 arm64/sysreg: Add definition of ISR_EL1 Add a definition of ISR_EL1 as per DDI0487I.a. This register was not previously defined in sysreg.h, no functional changes. Acked-by: Marc Zyngier Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-isr-el1-v2-2-89f7073a1ca9@kernel.org Signed-off-by: Catalin Marinas commit 541826afb2c7426ada6a414c3611352c86f95ad5 Author: Mark Brown Date: Tue Dec 27 17:05:03 2022 +0000 arm64/sysreg: Add definition for ICC_NMIAR1_EL1 FEAT_NMI adds a new interrupt status register for NMIs, ICC_NMIAR1_EL1. Add the definition for this register as per IHI0069H. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-isr-el1-v2-1-89f7073a1ca9@kernel.org Signed-off-by: Catalin Marinas commit 2ef9e3ef3b8d9a59455a79f02ce9aff8544bd02d Author: Wolfram Sang Date: Wed Jan 11 10:49:44 2023 +0100 arm64: dts: renesas: condor-i: add HS400 support for eMMC HS400 support for R-Car V3H ES2.0 has been fixed, so enable it on this board. Signed-off-by: LUU HOAI Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230111094944.5996-1-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit 567d37b9549e4128f247ed8e7b4dfca9a872afad Author: Adam Ford Date: Wed Jan 4 08:12:45 2023 -0600 arm64: boot: dts: r8a774[a/b/e]1-beacon: Consolidate sound clocks Each kit-level file represents a SOM + baseboard for a specific SoC type and uses specific clocks unique to each SoC. With the exception of one clock, the rest of the clock info was duplicated. There is a generic clock called CPG_AUDIO_CLK_I defined in each of the SoC DTSI files which points to this unique clock. By using that, the clock information for the rcar_sound can be consolidated into the baseboard file and have it reference this generic clock thus removing the duplication from the three variants. Signed-off-by: Adam Ford Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230104141245.8407-4-aford173@gmail.com Signed-off-by: Geert Uytterhoeven commit c68b12a902067aa6c88aa02c29673a96ef086e5d Author: Lad Prabhakar Date: Mon Jan 2 22:22:33 2023 +0000 riscv: dts: renesas: rzfive-smarc-som: Enable OSTM nodes Enable OSTM{1,2} nodes on RZ/Five SMARC SoM. Note, OSTM{1,2} nodes are enabled in the RZ/G2UL SMARC SoM DTSI [0] hence deleting the disabled nodes from RZ/Five SMARC SoM DTSI enables it here too as we include [0] in RZ/Five SMARC SoM DTSI. [0] arch/arm64/boot/dts/renesas/rzg2ul-smarc-som.dtsi Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230102222233.274021-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit e02b93124855cd34b78e61ae44846c8cb5fddfc3 Author: Valentin Schneider Date: Thu Jan 12 16:14:31 2023 +0000 workqueue: Unbind kworkers before sending them to exit() It has been reported that isolated CPUs can suffer from interference due to per-CPU kworkers waking up just to die. A surge of workqueue activity during initial setup of a latency-sensitive application (refresh_vm_stats() being one of the culprits) can cause extra per-CPU kworkers to be spawned. Then, said latency-sensitive task can be running merrily on an isolated CPU only to be interrupted sometime later by a kworker marked for death (cf. IDLE_WORKER_TIMEOUT, 5 minutes after last kworker activity). Prevent this by affining kworkers to the wq_unbound_cpumask (which doesn't contain isolated CPUs, cf. HK_TYPE_WQ) before waking them up after marking them with WORKER_DIE. Changing the affinity does require a sleepable context, leverage the newly introduced pool->idle_cull_work to get that. Remove dying workers from pool->workers and keep track of them in a separate list. This intentionally prevents for_each_loop_worker() from iterating over workers that are marked for death. Rename destroy_worker() to set_working_dying() to better reflect its effects and relationship with wake_dying_workers(). Signed-off-by: Valentin Schneider Signed-off-by: Tejun Heo commit 9ab03be42b8f9136dcc01a90ecc9ac71bc6149ef Author: Valentin Schneider Date: Thu Jan 12 16:14:30 2023 +0000 workqueue: Don't hold any lock while rcuwait'ing for !POOL_MANAGER_ACTIVE put_unbound_pool() currently passes wq_manager_inactive() as exit condition to rcuwait_wait_event(), which grabs pool->lock to check for pool->flags & POOL_MANAGER_ACTIVE A later patch will require destroy_worker() to be invoked with wq_pool_attach_mutex held, which needs to be acquired before pool->lock. A mutex cannot be acquired within rcuwait_wait_event(), as it could clobber the task state set by rcuwait_wait_event() Instead, restructure the waiting logic to acquire any necessary lock outside of rcuwait_wait_event(). Since further work cannot be inserted into unbound pwqs that have reached ->refcnt==0, this is bound to make forward progress as eventually the worklist will be drained and need_more_worker(pool) will remain false, preventing any worker from stealing the manager position from us. Suggested-by: Tejun Heo Signed-off-by: Valentin Schneider Signed-off-by: Tejun Heo commit 3f959aa3b33829acfcd460c6c656d54dfebe8d1e Author: Valentin Schneider Date: Thu Jan 12 16:14:29 2023 +0000 workqueue: Convert the idle_timer to a timer + work_struct A later patch will require a sleepable context in the idle worker timeout function. Converting worker_pool.idle_timer to a delayed_work gives us just that, however this would imply turning all idle_timer expiries into scheduler events (waking up a worker to handle the dwork). Instead, implement a "custom dwork" where the timer callback does some extra checks before queuing the associated work. No change in functionality intended. Signed-off-by: Valentin Schneider Reviewed-by: Lai Jiangshan Signed-off-by: Tejun Heo commit 793777bc193b658f01924fd09b388eead26d741f Author: Valentin Schneider Date: Thu Jan 12 16:14:28 2023 +0000 workqueue: Factorize unbind/rebind_workers() logic Later patches will reuse this code, move it into reusable functions. Signed-off-by: Valentin Schneider Reviewed-by: Lai Jiangshan Signed-off-by: Tejun Heo commit 99c621ef243bda726fb8d982a274ded96570b410 Author: Lai Jiangshan Date: Thu Jan 12 16:14:27 2023 +0000 workqueue: Protects wq_unbound_cpumask with wq_pool_attach_mutex When unbind_workers() reads wq_unbound_cpumask to set the affinity of freshly-unbound kworkers, it only holds wq_pool_attach_mutex. This isn't sufficient as wq_unbound_cpumask is only protected by wq_pool_mutex. Make wq_unbound_cpumask protected with wq_pool_attach_mutex and also remove the need of temporary saved_cpumask. Fixes: 10a5a651e3af ("workqueue: Restrict kworker in the offline CPU pool running on housekeeping CPUs") Reported-by: Valentin Schneider Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo commit 67f49869106f78882a8a09b736d4884be85aba18 Author: Mark Brown Date: Tue Dec 27 13:07:45 2022 +0000 kselftest/arm64: Skip non-power of 2 SVE vector lengths in fp-stress As documented in issue C215 in the known issues list for DDI0487I.a [1] Arm will be making a retroactive change to SVE to remove the possibility of selecting non power of two vector lengths. This has no impact on existing physical implementations but most virtual implementations have implemented the full range of permissible vector lengths. Given how demanding fp-stress is for these implementations update to only attempt to enumerate the power of two vector lengths, reducing the load created on existing virtual implementations and only exercising the functionality that will be seen in physical implementations. [1] https://developer.arm.com/documentation/102105/ia-00/ Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221220-arm64-fp-stress-pow2-v1-1-d0ce756b57af@kernel.org Signed-off-by: Catalin Marinas commit 10f326fbb4584f3b9fbf1102c1a71a9ecac0e97f Author: Mark Brown Date: Tue Dec 27 13:06:38 2022 +0000 kselftest/arm64: Only enumerate power of two VLs in syscall-abi As documented in issue C215 in the known issues list for DDI0487I.a [1] Arm will be making a retroactive change to SVE to remove the possibility of selecting non power of two vector lengths. This has no impact on existing physical implementations but most virtual implementations have implemented the full range of permissible vector lengths. Since virtual implementations are noticeably slow in general and the larger vector lengths amplify the issue there's a useful improvement in runtime from only covering the vector lengths that will exist in practical systems, adjust our enumeration accordingly. We have other tests that aim to cover the enumeration interfaces. For symmetry we apply the same change to the eumeration for SME vector lengths, though the power of two restriction was already present for SME so there is no impact on the set of vector lengths tested. [1] https://developer.arm.com/documentation/102105/ia-00/ Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221223-arm64-syscall-abi-sme-only-v1-4-4fabfbd62087@kernel.org Signed-off-by: Catalin Marinas commit 024e4a155874dcd3c3473fb26ff4f491c746b4d3 Author: Mark Brown Date: Tue Dec 27 13:06:37 2022 +0000 kselftest/arm64: Verify SME only ABI in syscall-abi Currently syscall-abi only covers SME in the case where the system supports SVE however it is architecturally valid to support SME without SVE. Update the program to cover this case, this requires adjustments in the code to check for SVCR.SM being set when deciding if we're handling the FPSIMD or SVE registers and the addition of new test cases for the SME only case. Note that in the SME only case we should not save the SVE registers after a syscall since even if we were in streaming mode and therefore set them the syscall should have exited streaming mode, we check that we have done so by looking at SVCR. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221223-arm64-syscall-abi-sme-only-v1-3-4fabfbd62087@kernel.org Signed-off-by: Catalin Marinas commit fae491e52cc2b48097bd93fceb687ccbacd263c4 Author: Mark Brown Date: Tue Dec 27 13:06:36 2022 +0000 kselftest/arm64: Only enumerate VLs once in syscall-abi Currently syscall-abi not only enumerates the SVE VLs twice while working out how many tests are planned, it also repeats the enumeration process while doing the actual tests. Record the VLs when we enumerate and use that list when we are performing the tests, removing some duplicated logic. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221223-arm64-syscall-abi-sme-only-v1-2-4fabfbd62087@kernel.org Signed-off-by: Catalin Marinas commit 97ec597b26df774a257e3f8e97353fd1b4471615 Author: Mark Brown Date: Tue Dec 27 13:06:35 2022 +0000 kselftest/arm64: Fix syscall-abi for systems without 128 bit SME SME does not mandate any specific VL so we may not have 128 bit SME but the algorithm used for enumerating VLs assumes that we will. Add the required check to ensure that the algorithm terminates. Fixes: 43e3f85523e4 ("kselftest/arm64: Add SME support to syscall ABI test") Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221223-arm64-syscall-abi-sme-only-v1-1-4fabfbd62087@kernel.org Signed-off-by: Catalin Marinas commit 291d759ab09ba725cf3325d3d3850fb2786626fa Author: Geert Uytterhoeven Date: Fri Dec 2 17:49:24 2022 +0100 arm64: dts: renesas: ulcb-kf: Fix pca9548 i2c-mux node names "make dtbs_check": arch/arm64/boot/dts/renesas/r8a77951-ulcb-kf.dtb: i2c-switch@71: $nodename:0: 'i2c-switch@71' does not match '^(i2c-?)?mux' From schema: Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml arch/arm64/boot/dts/renesas/r8a77951-ulcb-kf.dtb: i2c-switch@71: Unevaluated properties are not allowed ('#address-cells', '#size-cells', 'i2c@4', 'i2c@7' were unexpected) From schema: Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml ... Fix this by renaming all PCA9548 nodes to "i2c-mux", to match the I2C bus multiplexer/switch DT bindings and the Generic Names Recommendation in the Devicetree Specification. While at it, rename the labels too, for uniformity. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/3c32f500b99e598f458336dc4c05ffa60656324e.1669999298.git.geert+renesas@glider.be commit fbfd614aeaa2853c2c575299dfe2458db8eff67e Author: Alexey Khoroshilov Date: Fri Dec 23 17:40:17 2022 +0300 clk: renesas: cpg-mssr: Fix use after free if cpg_mssr_common_init() failed If cpg_mssr_common_init() fails after assigning priv to global variable cpg_mssr_priv, it deallocates priv, but cpg_mssr_priv keeps dangling pointer that potentially can be used later. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 1f7db7bbf031 ("clk: renesas: cpg-mssr: Add early clock support") Signed-off-by: Alexey Khoroshilov Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/1671806417-32623-1-git-send-email-khoroshilov@ispras.ru Signed-off-by: Geert Uytterhoeven commit a278d0c92be9d90307114b05c3edb1e7354d8412 Author: Lad Prabhakar Date: Wed Dec 21 21:27:03 2022 +0000 clk: renesas: r9a07g044: Add clock and reset entries for CRU Add CRU clock and reset entries to CPG driver. CRU_SYSCLK and CRU_VCLK clocks need to be turned ON/OFF in particular sequence for the CRU block hence add these clocks to r9a07g044_no_pm_mod_clks[] array and pass it as part of CPG data for both RZ/G2L and RZ/V2L SoCs. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20221221212703.348278-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit fcd3d2c082b2a19da2326b2b38ba5a05536dcd32 Author: Mark Brown Date: Tue Dec 27 13:04:35 2022 +0000 arm64/sme: Don't use streaming mode to probe the maximum SME VL During development the architecture added the RDSVL instruction which means we do not need to enter streaming mode to enumerate the SME VLs, use it when we probe the maximum supported VL. Other users were already updated. No functional change. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221223-arm64-sme-probe-max-v1-1-cbde68f67ad0@kernel.org Signed-off-by: Catalin Marinas commit c3cdd54c6138871b04dc2306fbfe30ece947ac48 Author: Mark Brown Date: Tue Dec 27 13:01:08 2022 +0000 arm64/ptrace: Use system_supports_tpidr2() to check for TPIDR2 support We have a separate system_supports_tpidr2() to check for TPIDR2 support but were using system_supports_sme() in tls_set(). While these are currently identical let's use the specific check instead so we don't have any surprises in future. Reported-by: Will Deacon Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-arm64-tpidr2-ptrace-feat-v2-1-3760c895a574@kernel.org Signed-off-by: Catalin Marinas commit e978eaca4beefb789874864c0ed99603531c5425 Author: Mark Brown Date: Tue Dec 27 13:00:39 2022 +0000 arm64/cpufeature: Remove 4 bit assumption in ARM64_FEATURE_MASK() The ARM64_FEATURE_MASK(), used extensively by KVM, assumes that all ID register fields are 4 bits wide but this is not the case any more, for example there are several 1 bit fields in ID_AA64SMFR0_EL1. Fortunately we now have generated constants for all the ID mask registers which can be used instead. Rather than create churn from updating existing users update the macro to reference the generated constants and replace the comment with a note advising against adding new users. There are also users of ARM64_FEATURE_FIELD_BITS in the pKVM code which will need to be fixed separately, since no relevant feature is planned to be exposed to protected guests in the immediate future there is no immediate issue with them assuming fields are 4 bits wide. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221222-arm64-arm64-feature-mask-v1-1-c34c1e177f90@kernel.org Signed-off-by: Catalin Marinas commit 8c6e105558628b63292ae770198f11a1d5535660 Author: Mark Brown Date: Tue Dec 27 12:55:55 2022 +0000 arm64/sysreg: Fix errors in 32 bit enumeration values The recently converted 32 bit ID registers have errors in MVFR0_EL1.FPSP, MVFR0_EL1.SIMDReg and MVFR1_EL1.SIMDHP where enumeration values which should be 0b0010 are specified as 0b0001. Correct these. Fixes: e79c94a2a487 ("arm64/sysreg: Convert MVFR0_EL1 to automatic generation") Fixes: c9b718eda706 ("arm64/sysreg: Convert MVFR1_EL1 to automatic generation") Reviewed-by: Mark Rutland Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221207-arm64-sysreg-helpers-v3-2-0d71a7b174a8@kernel.org Signed-off-by: Catalin Marinas commit 50daf5b7c4ec4efcaf49a4128930f872bec7dbc0 Author: Mark Brown Date: Tue Dec 27 12:55:54 2022 +0000 arm64/cpufeature: Fix field sign for DIT hwcap detection Since it was added our hwcap for DIT has specified that DIT is a signed field but this appears to be incorrect, the two values for the enumeration are: 0b0000 NI 0b0001 IMP which look like a normal unsigned enumeration and the in-kernel DIT usage added by 01ab991fc0ee ("arm64: Enable data independent timing (DIT) in the kernel") detects the feature with an unsigned enum. Fix the hwcap to specify the field as unsigned. Fixes: 7206dc93a58f ("arm64: Expose Arm v8.4 features") Reviewed-by: Mark Rutland Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221207-arm64-sysreg-helpers-v3-1-0d71a7b174a8@kernel.org Signed-off-by: Catalin Marinas commit bb45bb9705372d9335ccd7e3fc5436770ec6d846 Author: Bjorn Andersson Date: Thu Jan 12 05:50:55 2023 -0800 arm64: dts: qcom: sc8280xp: Use MMCX for all DP controllers While MDSS_GDSC is a subdomain of MMCX, Linux does not respect this relationship and sometimes invokes sync_state on the rpmhpd (MMCX) before the DisplayPort controller has had a chance to probe. The result when this happens is that the power is lost to the multimedia subsystem between the probe of msm_drv and the DisplayPort controller - which results in an irrecoverable state. While this is an implementation problem, this aligns the power domain setting of the one DP instance with that of all the others. Fixes: 57d6ef683a15 ("arm64: dts: qcom: sc8280xp: Define some of the display blocks") Signed-off-by: Bjorn Andersson Reviewed-by: Johan Hovold Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230112135055.3836555-1-quic_bjorande@quicinc.com commit e15a815884925177f252a0adfe3b93dece6a75a8 Author: Johan Hovold Date: Thu Jan 12 08:45:03 2023 +0100 arm64: dts: qcom: sc8280xp-crd: allow vreg_l3b to be disabled The vreg_l3b supply is used by the eDP, UFS and USB1 PHYs which are now described by the devicetree so that the regulator no longer needs to be marked always-on. Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230112074503.12185-1-johan+linaro@kernel.org commit 1f731bbf71e374d93d477831518402ebcfddb75b Author: Mukesh Ojha Date: Thu Jan 12 14:24:57 2023 +0530 arm64: dts: qcom: sm8450: Add TCSR halt register space Add TCSR register space and refer it from scm node, so that it can be used by SCM driver. Signed-off-by: Mukesh Ojha Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1673513697-30173-2-git-send-email-quic_mojha@quicinc.com commit fe07640280cd29ac2997a617a1fb5487feef9387 Author: Bjorn Andersson Date: Thu Jan 12 05:51:17 2023 -0800 arm64: dts: qcom: sc8280xp: Vote for CX in USB controllers Running GCC_USB30_*_MASTER_CLK at 200MHz requires CX at nominal level, not doing so results in occasional lockups. This was previously hidden by the fact that the display stack incorrectly voted for CX (instead of MMCX). Fixes: 152d1faf1e2f ("arm64: dts: qcom: add SC8280XP platform") Signed-off-by: Bjorn Andersson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230112135117.3836655-1-quic_bjorande@quicinc.com commit c4bdf94f97c86bdee8bacc87f8f85dc67866c928 Author: Jinank Jain Date: Mon Jan 2 07:12:51 2023 +0000 x86/hyperv: Add support for detecting nested hypervisor Detect if Linux is running as a nested hypervisor in the root partition for Microsoft Hypervisor, using flags provided by MSHV. Expose a new variable hv_nested that is used later for decisions specific to the nested use case. Signed-off-by: Jinank Jain Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/8e3e7112806e81d2292a66a56fe547162754ecea.1672639707.git.jinankjain@linux.microsoft.com Signed-off-by: Wei Liu commit 23e5285980b7225b7f1ee23c7cbaa15f334c5ddd Merge: b6e98cf4ed3ba d386a10c9cd88 Author: Mark Brown Date: Thu Jan 12 15:01:13 2023 +0000 Add tdm support in acp machine driver Merge series from Venkata Prasad Potturu : This patch set is to add new cpu dai, refactor dai format implementation and clock enable/disable and add tdm support in acp machine driver. commit cdc3116f191ad4250f992d750b2d6f72fb98afde Author: Masahiro Yamada Date: Tue Jan 10 09:01:29 2023 +0100 ARM: 9285/1: remove meaningless arch/arm/mach-rda/Makefile You do not need to put Makefile if there is nothing to compile. Signed-off-by: Masahiro Yamada Signed-off-by: Russell King (Oracle) commit ae53fa18703000f507107df43efd1168a0365361 Author: H. Peter Anvin (Intel) Date: Wed Jan 11 23:20:31 2023 -0800 x86/gsseg: Move load_gs_index() to its own new header file GS is a special segment on x86_64, move load_gs_index() to its own new header file to simplify header inclusion. No change in functionality. Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Xin Li Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230112072032.35626-5-xin3.li@intel.com commit df729fb05ae2db52f7de150439392a88ee9d9b4f Author: H. Peter Anvin (Intel) Date: Wed Jan 11 23:20:30 2023 -0800 x86/gsseg: Make asm_load_gs_index() take an u16 Let GCC know that only the low 16 bits of load_gs_index() argument actually matter. It might allow it to create slightly better code. However, do not propagate this into the prototypes of functions that end up being paravirtualized, to avoid unnecessary changes. Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Xin Li Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230112072032.35626-4-xin3.li@intel.com commit 5a91f12660fe7249e37b11372bf599e02b6a319c Author: H. Peter Anvin (Intel) Date: Wed Jan 11 23:20:29 2023 -0800 x86/opcode: Add the LKGS instruction to x86-opcode-map Add the instruction opcode used by LKGS to x86-opcode-map. Opcode number is per public FRED draft spec v3.0. Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Xin Li Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230112072032.35626-3-xin3.li@intel.com commit 660569472dd7ac64571375b6727c3f2c1d70ba40 Author: H. Peter Anvin (Intel) Date: Wed Jan 11 23:20:28 2023 -0800 x86/cpufeature: Add the CPU feature bit for LKGS Add the CPU feature bit for LKGS (Load "Kernel" GS). LKGS instruction is introduced with Intel FRED (flexible return and event delivery) specification. Search for the latest FRED spec in most search engines with this search pattern: site:intel.com FRED (flexible return and event delivery) specification LKGS behaves like the MOV to GS instruction except that it loads the base address into the IA32_KERNEL_GS_BASE MSR instead of the GS segment’s descriptor cache, which is exactly what Linux kernel does to load a user level GS base. Thus, with LKGS, there is no need to SWAPGS away from the kernel GS base. [ mingo: Minor tweaks to the description. ] Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Xin Li Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230112072032.35626-2-xin3.li@intel.com commit 55b98837e37da723c8b73ec0b48fe68c682b57d7 Merge: d4f12a8271fb7 8abbffd27cedd Author: Paolo Abeni Date: Thu Jan 12 12:53:56 2023 +0100 Merge branch 'vsock-update-tools-and-error-handling' Arseniy Krasnov says: ==================== vsock: update tools and error handling Patchset consists of two parts: 1) Kernel patch One patch from Bobby Eshleman. I took single patch from Bobby: https://lore.kernel.org/lkml/d81818b868216c774613dd03641fcfe63cc55a45 .1660362668.git.bobby.eshleman@bytedance.com/ and use only part for af_vsock.c, as VMCI and Hyper-V parts were rejected. I used it, because for SOCK_SEQPACKET big messages handling was broken - ENOMEM was returned instead of EMSGSIZE. And anyway, current logic which always replaces any error code returned by transport to ENOMEM looks strange for me also(for example in EMSGSIZE case it was changed to ENOMEM). 2) Tool patches Since there is work on several significant updates for vsock(virtio/ vsock especially): skbuff, DGRAM, zerocopy rx/tx, so I think that this patchset will be useful. This patchset updates vsock tests and tools a little bit. First of all it updates test suite: two new tests are added. One test is reworked message bound test. Now it is more complex. Instead of sending 1 byte messages with one MSG_EOR bit, it sends messages of random length(one half of messages are smaller than page size, second half are bigger) with random number of MSG_EOR bits set. Receiver also don't know total number of messages. Message bounds control is maintained by hash sum of messages length calculation. Second test is for SOCK_SEQPACKET - it tries to send message with length more than allowed. I think both tests will be useful for DGRAM support also. Third thing that this patchset adds is small utility to test vsock performance for both rx and tx. I think this util could be useful as 'iperf'/'uperf', because: 1) It is small comparing to 'iperf' or 'uperf', so it very easy to add new mode or feature to it(especially vsock specific). 2) It allows to set SO_RCVLOWAT and SO_VM_SOCKETS_BUFFER_SIZE option. Whole throughtput depends on both parameters. 3) It is located in the kernel source tree, so it could be updated by the same patchset which changes related kernel functionality in vsock. I used this util very often to check performance of my rx zerocopy support(this tool has rx zerocopy support, but not in this patchset). Here is comparison of outputs from three utils: 'iperf', 'uperf' and 'vsock_perf'. In all three cases sender was at guest side. rx and tx buffers were always 64Kb(because by default 'uperf' uses 8K). iperf: [ ID] Interval Transfer Bitrate [ 5] 0.00-10.00 sec 12.8 GBytes 11.0 Gbits/sec sender [ 5] 0.00-10.00 sec 12.8 GBytes 11.0 Gbits/sec receiver uperf: Total 16.27GB / 11.36(s) = 12.30Gb/s 23455op/s vsock_perf: tx performance: 12.301529 Gbits/s rx performance: 12.288011 Gbits/s Results are almost same in all three cases. Patchset was rebased and tested on skbuff v9 patch from Bobby Eshleman: https://lore.kernel.org/netdev/20230107002937.899605-1-bobby.eshleman@bytedance.com/ ==================== Link: https://lore.kernel.org/r/67cd2d0a-1c58-baac-7b39-b8d4ea44f719@sberdevices.ru Signed-off-by: Paolo Abeni commit 8abbffd27cedd0f89f69e5ee2ff6841ea01511eb Author: Arseniy Krasnov Date: Tue Jan 10 10:18:32 2023 +0000 test/vsock: vsock_perf utility This adds utility to check vsock rx/tx performance. Usage as sender: ./vsock_perf --sender --port --bytes Usage as receiver: ./vsock_perf --port --rcvlowat Signed-off-by: Arseniy Krasnov Reviewed-by: Stefano Garzarella Signed-off-by: Paolo Abeni commit 685a21c314a8aec3549f25cb3f9d872e92245210 Author: Arseniy Krasnov Date: Tue Jan 10 10:17:02 2023 +0000 test/vsock: add big message test This adds test for sending message, bigger than peer's buffer size. For SOCK_SEQPACKET socket it must fail, as this type of socket has message size limit. Signed-off-by: Arseniy Krasnov Reviewed-by: Stefano Garzarella Signed-off-by: Paolo Abeni commit 5c338112e48ab1937f99e4a8990a82c999fda126 Author: Arseniy Krasnov Date: Tue Jan 10 10:15:15 2023 +0000 test/vsock: rework message bounds test This updates message bound test making it more complex. Instead of sending 1 bytes messages with one MSG_EOR bit, it sends messages of random length(one half of messages are smaller than page size, second half are bigger) with random number of MSG_EOR bits set. Receiver also don't know total number of messages. Signed-off-by: Arseniy Krasnov Reviewed-by: Stefano Garzarella Signed-off-by: Paolo Abeni commit c43170b7e1571efc11c443fb8889842073b77fe5 Author: Bobby Eshleman Date: Tue Jan 10 10:13:23 2023 +0000 vsock: return errors other than -ENOMEM to socket This removes behaviour, where error code returned from any transport was always switched to ENOMEM. For example when user tries to send too big message via SEQPACKET socket, transport layers return EMSGSIZE, but this error code was always replaced with ENOMEM and returned to user. Signed-off-by: Bobby Eshleman Signed-off-by: Arseniy Krasnov Reviewed-by: Stefano Garzarella Signed-off-by: Paolo Abeni commit af13842cad44eb1feb9da23c7ce5547ecf007694 Author: Takashi Sakamoto Date: Tue Jan 10 22:49:33 2023 +0900 ALSA: firewire-lib: compute extra delay for runtime of PCM substream All drivers in ALSA firewire stack have never reported extra delay for the runtime of PCM substream. There is some reason, but the main reason is that the meaning of extra delay differs depending on driver design, especially for the packet-oriented driver. Here I define the extra delay for the case of IEC 61883-1/6. It is the number of PCM frames transferred or should be transferred between the current isochronous cycle and the isochronous cycle to which the latest isochronous packet arrived (in IR context) or is scheduled (in IT context). A commit baa914cd81f5 ("firewire: add kernel API to access CYCLE_TIME register") allow unit drivers to read CYCLE_TIME of 1394 OHCI controller. It allows the drivers to compute the current isochronous cycle. Additionally, a commit f0117128879b ("ALSA: firewire-lib: keep history to process isochronous packet") enables to save the history processing packets. It allows the driver to estimate the total number of data blocks in packets arriving shortly, or calculate the total number of data blocks in scheduled packets. Now it is ready. This commit implements the computation of the extra delay. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230110134933.322794-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 7fc693e474725544e5ee1cabde34d95e544eb708 Author: Takashi Sakamoto Date: Tue Jan 10 22:49:32 2023 +0900 ALSA: firewire-lib: obsolete return value from context payload processing layer This commit obsoletes return value from the context payload processing layer since the multiplier between the data block count and PCM frame count was moved to the packet streaming processing layer. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230110134933.322794-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit a36183f69c2c24e6e4b1f8f79adc7137ee7444d9 Author: Takashi Sakamoto Date: Tue Jan 10 22:49:31 2023 +0900 ALSA: firewire-lib: move parameter for pcm frame multiplier from context payload processing layer The current implementation delegates the task to calculate the number of processed PCM frames into the context payload processing layer. It looks good as long as frame calculation is done for a single purpose. Nevertheless, another purpose, the computation of extra delay for the runtime of PCM substream, requires frame calculation, too. This commit refactors the current implementation so that the packet stream processing layer is responsible for the calculation of PCM frame, too. The member is moved to stream structure for multiplier between data block count and PCM frame count. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230110134933.322794-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 6e41acd2e5353c5362e0d5c2f5ba495c54ff555e Author: Maíra Canal Date: Wed Jan 11 10:13:05 2023 -0300 drm/vkms: reintroduce prepare_fb and cleanup_fb functions With commit 359c6649cd9a ("drm/gem: Implement shadow-plane {begin, end}_fb_access with vmap"), the behavior of the shadow-plane helpers changed and the vunmap is now performed at the end of the current pageflip, instead of the end of the following pageflip. By performing the vunmap at the end of the current pageflip, invalid memory is accessed by the vkms during the plane composition, as the data is being unmapped before being used, as reported by the following warning: [ 275.866047] BUG: unable to handle page fault for address: ffffb382814e8002 [ 275.866055] #PF: supervisor read access in kernel mode [ 275.866058] #PF: error_code(0x0000) - not-present page [ 275.866061] PGD 1000067 P4D 1000067 PUD 110a067 PMD 46e3067 PTE 0 [ 275.866066] Oops: 0000 [#1] PREEMPT SMP PTI [ 275.866070] CPU: 2 PID: 49 Comm: kworker/u8:2 Not tainted 6.1.0-rc6-00018-gb357e7ac1b73-dirty #54 [ 275.866074] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.1-2.fc37 04/01/2014 [ 275.866076] Workqueue: vkms_composer vkms_composer_worker [vkms] [ 275.866084] RIP: 0010:XRGB8888_to_argb_u16+0x5c/0xa0 [vkms] [ 275.866092] Code: bf 56 0a 0f af 56 70 48 8b 76 28 01 ca 49 83 f8 02 41 b9 01 00 00 00 4d 0f 43 c8 48 01 f2 48 83 c2 02 31 f6 66 c7 04 f0 ff ff <0f> b6 0c b2 89 cf c1 e7 08 09 cf 66 89 7c f0 02 0f b6 4c b2 ff 89 [ 275.866095] RSP: 0018:ffffb382801b7db0 EFLAGS: 00010246 [ 275.866098] RAX: ffff896336ace000 RBX: ffff896310e293c0 RCX: 0000000000000000 [ 275.866101] RDX: ffffb382814e8002 RSI: 0000000000000000 RDI: ffffb382801b7de8 [ 275.866103] RBP: 0000000000001400 R08: 0000000000000280 R09: 0000000000000280 [ 275.866105] R10: 0000000000000010 R11: ffffffffc011d990 R12: ffff896302a1ece0 [ 275.866107] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000080008001 [ 275.866109] FS: 0000000000000000(0000) GS:ffff89637dd00000(0000) knlGS:0000000000000000 [ 275.866112] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 275.866114] CR2: ffffb382814e8002 CR3: 0000000003bb4000 CR4: 00000000000006e0 [ 275.866120] Call Trace: [ 275.866123] [ 275.866124] compose_active_planes+0x1c4/0x380 [vkms] [ 275.866132] vkms_composer_worker+0x9f/0x130 [vkms] [ 275.866139] process_one_work+0x1c0/0x370 [ 275.866160] worker_thread+0x221/0x410 [ 275.866164] ? worker_clr_flags+0x50/0x50 [ 275.866167] kthread+0xe1/0x100 [ 275.866172] ? kthread_blkcg+0x30/0x30 [ 275.866176] ret_from_fork+0x22/0x30 [ 275.866181] [ 275.866182] Modules linked in: vkms [ 275.866186] CR2: ffffb382814e8002 [ 275.866191] ---[ end trace 0000000000000000 ]--- Therefore, introduce again prepare_fb and cleanup_fb functions to the vkms, which were previously removed on commit b43e2ec03b0d ("drm/vkms: Let shadow-plane helpers prepare the plane's FB"). Fixes: 359c6649cd9a ("drm/gem: Implement shadow-plane {begin, end}_fb_access with vmap") Acked-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Signed-off-by: Maíra Canal Signed-off-by: Melissa Wen Link: https://patchwork.freedesktop.org/patch/msgid/20230111131304.106039-1-mcanal@igalia.com commit 0125acda7d76b943ca55811df40ed6ec0ecf670f Author: Breno Leitao Date: Mon Nov 28 07:31:48 2022 -0800 x86/bugs: Reset speculation control settings on init Currently, x86_spec_ctrl_base is read at boot time and speculative bits are set if Kconfig items are enabled. For example, IBRS is enabled if CONFIG_CPU_IBRS_ENTRY is configured, etc. These MSR bits are not cleared if the mitigations are disabled. This is a problem when kexec-ing a kernel that has the mitigation disabled from a kernel that has the mitigation enabled. In this case, the MSR bits are not cleared during the new kernel boot. As a result, this might have some performance degradation that is hard to pinpoint. This problem does not happen if the machine is (hard) rebooted because the bit will be cleared by default. [ bp: Massage. ] Suggested-by: Pawan Gupta Signed-off-by: Breno Leitao Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20221128153148.1129350-1-leitao@debian.org commit 28c8e088427ad30b4260953f3b6f908972b77c2d Author: Mathieu Desnoyers Date: Wed Jan 4 14:20:54 2023 -0500 rseq: Increase AT_VECTOR_SIZE_BASE to match rseq auxvec entries Two new auxiliary vector entries are introduced for rseq without matching increment of the AT_VECTOR_SIZE_BASE, which causes failures with CONFIG_HARDENED_USERCOPY=y. Fixes: 317c8194e6ae ("rseq: Introduce feature size and alignment ELF auxiliary vector entries") Reported-by: Nathan Chancellor Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Tested-by: Nathan Chancellor Link: https://lore.kernel.org/r/20230104192054.34046-1-mathieu.desnoyers@efficios.com commit c91b0bf3e590a2dd0f2af4bb048abc0542eabf2e Author: Mathieu Desnoyers Date: Wed Jan 4 11:35:42 2023 -0500 selftests/rseq: Revert "selftests/rseq: Add mm_numa_cid to test script" The mm_numa_cid related rseq patches from the series were not picked up into the tip tree, so enabling the mm_numa_cid test needs to be reverted. This reverts commit b344b8f2d88dbf095caf97ac57fd3645843fa70f. Reported-by: kernel test robot Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/oe-lkp/202301040903.2dd1e25b-oliver.sang@intel.com commit d64c732dfc9edcd57feb693c23162117737e426b Author: Philipp Zabel Date: Mon Jan 2 18:29:34 2023 +0100 net: rfkill: gpio: add DT support Allow probing rfkill-gpio via device tree. This hooks up the already existing support that was started in commit 262c91ee5e52 ("net: rfkill: gpio: prepare for DT and ACPI support") via the "rfkill-gpio" compatible, with the "name" and "type" properties renamed to "label" and "radio-type", respectively, in the device tree case. Signed-off-by: Philipp Zabel Link: https://lore.kernel.org/r/20230102-rfkill-gpio-dt-v2-2-d1b83758c16d@pengutronix.de Signed-off-by: Johannes Berg commit 50071fdf0882a0449328c967f282ad7444d194bb Author: Philipp Zabel Date: Mon Jan 2 18:29:33 2023 +0100 dt-bindings: net: Add rfkill-gpio binding Add a device tree binding document for GPIO controlled rfkill switches. The label and radio-type properties correspond to the name and type properties used for ACPI, respectively. The shutdown-gpios property is the same as defined for ACPI. Signed-off-by: Philipp Zabel Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230102-rfkill-gpio-dt-v2-1-d1b83758c16d@pengutronix.de Signed-off-by: Johannes Berg commit 71a659bffeb9b70787b1e697c6110665af86ed2d Author: Nick Hainke Date: Thu Dec 22 10:29:57 2022 +0100 wifi: mac80211: fix double space in comment Remove a space in "the frames". Signed-off-by: Nick Hainke Link: https://lore.kernel.org/r/20221222092957.870790-1-vincent@systemli.org Signed-off-by: Johannes Berg commit 952f6c9daf509f7919887c26753884fa530f8622 Author: Martin Blumenstingl Date: Mon Dec 26 20:16:09 2022 +0100 wifi: mac80211: Drop stations iterator where the iterator function may sleep This reverts commit acb99b9b2a08f ("mac80211: Add stations iterator where the iterator function may sleep"). A different approach was found for the rtw88 driver where most of the problematic locks were converted to a driver-local mutex. Drop ieee80211_iterate_stations() because there are no users of that function. Signed-off-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20221226191609.2934234-1-martin.blumenstingl@googlemail.com Signed-off-by: Johannes Berg commit 9a9e1be12c6d49e15429311714c4b1cc4ddcfe55 Author: Arnd Bergmann Date: Thu Sep 29 15:26:06 2022 +0200 ARM: sa1100: remove unused board files The Cerf, H3100, Badge4, Hackkit, LART, NanoEngine, PLEB, Shannon and Simpad machines were all marked as unused as there are no known users left. Remove all of these, along with references to them in defconfig files and drivers. Four machines remain now: Assabet, Collie (Zaurus SL5500), iPAQ H3600 and Jornada 720, each of which had one person still using them, with Collie also being supported in Qemu. Cc: Peter Chubb Cc: Stefan Eletzhofer Acked-by: Greg Kroah-Hartman Acked-by: Viresh Kumar Acked-by: Lee Jones Acked-by: Linus Walleij Signed-off-by: Arnd Bergmann commit 8faf91c48ca20c714e0dd8cc5f510e3819852912 Author: Arnd Bergmann Date: Fri Sep 16 11:58:07 2022 +0200 ARM: sa1100: un-deprecate jornada720 Stefan is still trying to get this machine working again, so it won't be removed in this round. Cc: Stefan Lehner Signed-off-by: Arnd Bergmann commit eeee6973935357c96715deb3829058dbea8803f0 Author: Arnd Bergmann Date: Thu Oct 6 17:15:30 2022 +0200 media: davinci: remove vpbe support The davinci dm3xx/dm644x platforms are gone now, and the remaining da8xx platforms do not use the vpbe driver, so the driver can be removed as well. Acked-by: Lad Prabhakar Signed-off-by: Arnd Bergmann commit 582603a957343430cc519539d5dcaa0a0bb1327a Author: Arnd Bergmann Date: Thu Oct 6 17:08:22 2022 +0200 staging: media: remove davinci vpfe_capture driver This driver was for the davinci dm644x and dm3xx platforms that are now removed from the kernel, so there are no more users. Acked-by: Hans Verkuil Acked-by: Lad Prabhakar Acked-by: Greg Kroah-Hartman Signed-off-by: Arnd Bergmann commit fa8dede4d0a0c6c36e361703af5726ef674e83f3 Author: Arnd Bergmann Date: Fri Sep 30 15:39:51 2022 +0200 irqchip: remove davinci aintc driver The aintc driver was used on Davinci DM3xx and DM64xx SoCs, all of which got dropped from Linux, so this driver is orphaned as well. Acked-by: Bartosz Golaszewski Acked-by: Marc Zyngier Signed-off-by: Arnd Bergmann commit efe81e9a92733253bb44b7b70e41e04131d09ef6 Author: Arnd Bergmann Date: Fri Sep 30 14:46:46 2022 +0200 ASoC: remove unused davinci support The dm644x and dm3xx SoCs have been removed, as have the da850_evm/da830_evm machines, the remaining machines all use the DT based probing and do not use the vcif driver. Acked-by: Mark Brown Signed-off-by: Arnd Bergmann commit 3c9cb34939fbca1f7fd451b0afa4108e282ee411 Author: Arnd Bergmann Date: Fri Sep 30 15:24:42 2022 +0200 input: remove davinci keyboard driver The dm365evm board was removed, and no other users of this device exist. Reviewed-by: Mattijs Korpershoek Acked-by: Bartosz Golaszewski Signed-off-by: Arnd Bergmann commit f47f51f4665c8ae5501bb7b8f6a53119834fbf32 Author: Arnd Bergmann Date: Fri Sep 30 13:45:12 2022 +0200 clk: remove davinci dm3xx drivers The davinci dm3xx machines are all removed, so the clk driver is no longer needed. The da8xx platforms are now using DT exclusively, so those drivers remain untouched. Reviewed-by: David Lechner Acked-by: Linus Walleij Acked-by: Bartosz Golaszewski Acked-by: Stephen Boyd Signed-off-by: Arnd Bergmann commit dec85a95167a98a4e237df11e234eed8ee718e78 Author: Arnd Bergmann Date: Tue Sep 20 00:16:17 2022 +0200 ARM: davinci: clean up platform support With the board file support gone, and the platform using DT only, a lot of the remaining code is no longer referenced and can be removed. Technically, the DT file only references DA850, but since that is very similar to DA830, I'm leaving the latter. Acked-by: Bartosz Golaszewski Signed-off-by: Arnd Bergmann commit c3848db316d51dcc0fb10554151b1e7e8ff8c3e2 Author: Arnd Bergmann Date: Thu Sep 29 16:14:18 2022 +0200 ARM: davinci: drop DAVINCI_DMxxx references Support for all the dm3xx/dm64xx SoCs is no longer available, so drop all other references to those. Acked-by: Stephen Boyd Signed-off-by: Arnd Bergmann commit 2af4fcc0d3574482c73c34274eea63bac5518d48 Author: Arnd Bergmann Date: Thu Sep 29 15:38:29 2022 +0200 ARM: davinci: remove unused board support All Kconfig entries marked as "depends on UNUSED_BOARD_FILES" and their direct dependencies are removed here as planned. Acked-by: Bartosz Golaszewski Signed-off-by: Arnd Bergmann commit bcace9c4c927029237350132112a602a98cb714b Author: Arnd Bergmann Date: Fri Sep 30 15:41:25 2022 +0200 spi: remove omap 100K driver The OMAP7xx/OMAP8xx support was removed since all of its boards have no remaining users. Remove its spi driver as well. Cc: Aaro Koskinen Cc: Janusz Krzysztofik Cc: linux-omap@vger.kernel.org Cc: Cory Maccarrone Cc: Fabrice Crohas Acked-by: Mark Brown Acked-by: Tony Lindgren Signed-off-by: Arnd Bergmann commit 4a8fda693bc990e5cdd77485cf1aa481a97ee8f8 Author: Arnd Bergmann Date: Fri Sep 30 15:18:02 2022 +0200 fbdev: omapfb: remove unused board support A number of omap1 based board files got removed, so the corresponding framebuffer drivers are no longer used. The remaining ones are for ams_delta, osk and palmTE, which are still part of the mainline kernel. Cc: Aaro Koskinen Cc: Janusz Krzysztofik Cc: linux-omap@vger.kernel.org Cc: Marek Vasut Cc: Angelo Arrifano Cc: Imre Deak Acked-by: Tony Lindgren Signed-off-by: Arnd Bergmann commit ab5043ef75034dfe1d205a23ffd912949f9d9d6c Author: Arnd Bergmann Date: Wed Nov 23 22:25:03 2022 +0100 usb: phy: remove phy-isp1301-omap driver With the H2 and H3 board support removed from the driver, there are actually no other users, so the entire driver can go away. Link: https://lore.kernel.org/linux-arm-kernel/20221019173437.GB41568@darkstar.musicnaut.iki.fi/ Suggested-by: Aaro Koskinen Signed-off-by: Arnd Bergmann commit 76873bb5b89792c9dd6873c1b5567d3787d59b68 Author: Arnd Bergmann Date: Wed Jan 4 13:56:57 2023 +0100 ARM: omap1: remove unused omapxxxx.h headers The only bit that is still in use is the OMAP_IH2_*_* macros, so move them into the existing hardware.h file. Signed-off-by: Arnd Bergmann commit 9a99b142f7ef23bc3cb4cb82bf7f5abc173b11ca Author: Arnd Bergmann Date: Wed Jan 4 13:55:37 2023 +0100 ARM: omap1: merge omap1_map_io functions The OMAP15xx/OMAP16xx variants are exactly the same, so merge them into one. Signed-off-by: Arnd Bergmann commit 8825acd7cc8a13af7ae6c2c5e5025af38df6c2e4 Author: Arnd Bergmann Date: Thu Sep 29 16:19:44 2022 +0200 ARM: omap1: remove dead code After the removal of the unused board files, I went through the omap1 code to look for code that no longer has any callers and remove that. In particular, support for the omap7xx/omap8xx family is now completely unused, so I'm only leaving omap15xx/omap16xx/omap59xx. Cc: Aaro Koskinen Cc: Janusz Krzysztofik Cc: linux-omap@vger.kernel.org Reviewed-by: Greg Kroah-Hartman Acked-by: Tony Lindgren Acked-by: Kevin Hilman Signed-off-by: Arnd Bergmann commit 21a3e6eed42367faed4a54332bba1545c67d0fc1 Author: Arnd Bergmann Date: Wed Nov 23 22:21:20 2022 +0100 ARM: omap1: remove osk-mistral add-on board support As Aaro Koskinen points out, nobody should have this one any more, and I noticed the code is rather ugly, so let's removed it but keep the rest of the OSK support that is still used. Link: https://lore.kernel.org/linux-arm-kernel/20221020193511.GB3019@t60.musicnaut.iki.fi/ Signed-off-by: Arnd Bergmann commit 0d7bb85e941327064c1f33128af563fac6cb9be3 Author: Arnd Bergmann Date: Thu Sep 29 15:38:56 2022 +0200 ARM: omap1: remove unused board files All board support that was marked as 'unused' earlier can now be removed, leaving the five machines that that still had someone using them in 2022, or that are supported in qemu. Cc: Aaro Koskinen Cc: Janusz Krzysztofik Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Signed-off-by: Arnd Bergmann commit f71c9b7bc35ff7c1fb68d114903876eec658439b Author: Ankit Nautiyal Date: Thu Jan 5 18:11:25 2023 +0530 drm/i915/display: Prune Interlace modes for Display >=12 Defeature Display Interlace support. Support for interlace modes is removed from Gen 12 onwards. Pruning the interlace modes for HDMI for Display >=12. Bspec: 50490 v2: Add check for both DP and HDMI. (Ville) Get rid of redundant check for interlace mode in modevalid. (Ville) v3: Simplify the condition to avoid interlace modes. (Jani) Signed-off-by: Ankit Nautiyal Reviewed-by: Jani Nikula Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20230105124125.1129653-1-ankit.k.nautiyal@intel.com commit 9d04eb20bc71a383b4d4e383b0b7fac8d38a2e34 Author: Ankit Nautiyal Date: Mon Oct 17 20:00:37 2022 +0530 drm/i915/display: Drop check for doublescan mode in modevalid Since the DP/HDMI connector do not set connector->doublescan_allowed, the doublescan modes will get automatically filtered during drm_helper_probe_single_connector_modes(). Therefore check for double scan modes is not required and is dropped from modevalid functions for both DP and HDMI. Signed-off-by: Ankit Nautiyal Reviewed-by: Jani Nikula Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20221017143038.1748319-2-ankit.k.nautiyal@intel.com commit d4f12a8271fb724b68af6fe8ef54f0f2e63da74d Author: Lorenzo Bianconi Date: Tue Jan 10 10:31:26 2023 +0100 net: ethernet: mtk_wed: get rid of queue lock for rx queue Queue spinlock is currently held in mtk_wed_wo_queue_rx_clean and mtk_wed_wo_queue_refill routines for MTK Wireless Ethernet Dispatcher MCU rx queue. mtk_wed_wo_queue_refill() is running during initialization and in rx tasklet while mtk_wed_wo_queue_rx_clean() is running in mtk_wed_wo_hw_deinit() during hw de-init phase after rx tasklet has been disabled. Since mtk_wed_wo_queue_rx_clean and mtk_wed_wo_queue_refill routines can't run concurrently get rid of spinlock for mcu rx queue. Reviewed-by: Alexander Duyck Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/36ec3b729542ea60898471d890796f745479ba32.1673342990.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski commit 201e0a7c7f36ccb70b532e04ea2f48031f219e74 Author: Kees Cook Date: Wed Jan 4 17:11:50 2023 -0800 scsi: mvumi: Replace 1-element arrays with flexible array members One-element arrays (and multi-element arrays being treated as dynamically sized) are deprecated[1] and are being replaced with flexible array members in support of the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy(), correctly instrument array indexing with UBSAN_BOUNDS, and to globally enable -fstrict-flex-arrays=3. Replace one-element arrays with flexible-array member in struct mvumi_msg_frame, struct mvumi_rsp_frame, and struct mvumi_hs_header, adjusting the explicit sizing calculations at the same time. This results in no functional differences in binary output. An explicit add is now folded into the size calculation: │ mov 0x1070(%r14),%eax │ - add $0x4,%eax │ - movabs $0xfffffffdc,%rbx │ + movabs $0xfffffffe0,%rbx │ add %rax,%rbx [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: "Gustavo A. R. Silva" Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20230105011143.never.569-kees@kernel.org Signed-off-by: Martin K. Petersen commit 45b379f20bc0fecccad63c25bfe28d75d6bc5b0d Author: Kees Cook Date: Wed Jan 4 16:48:01 2023 -0800 scsi: 3w-sas: Replace 1-element arrays with flexible array members One-element arrays (and multi-element arrays being treated as dynamically sized) are deprecated[1] and are being replaced with flexible array members in support of the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy(), correctly instrument array indexing with UBSAN_BOUNDS, and to globally enable -fstrict-flex-arrays=3. Replace one-element arrays with flexible-array member in TW_Ioctl_Buf_Apache and TW_Param_Apache, adjusting the explicit sizing calculations at the same time. This results in no differences in binary output. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays Cc: Adam Radford Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: "Gustavo A. R. Silva" Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20230105004757.never.017-kees@kernel.org Signed-off-by: Martin K. Petersen commit dae0bb3e1ab8a67771213f5526deb238b15a736b Merge: e63d2ea838527 191b5a38771d9 Author: Martin K. Petersen Date: Thu Jan 12 00:04:30 2023 -0500 Merge patch series "lpfc: Update lpfc to revision 14.2.0.10" Justin Tee says: Update lpfc to revision 14.2.0.10 This patch set contains fixes for bugs, kernel test robot, and introduces new attention type event handling. Link: https://lore.kernel.org/r/20230109233317.54737-1-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit 191b5a38771d9e92eae62ad76f70628952c757ef Author: Justin Tee Date: Mon Jan 9 15:33:17 2023 -0800 scsi: lpfc: Copyright updates for 14.2.0.10 patches Update copyrights to 2023 for files modified in the 14.2.0.10 patch set. Signed-off-by: Justin Tee Signed-off-by: Martin K. Petersen commit 41cf6bbe3d998f580e6f23dd2d07823399b0a5dc Author: Justin Tee Date: Mon Jan 9 15:33:16 2023 -0800 scsi: lpfc: Update lpfc version to 14.2.0.10 Update lpfc version to 14.2.0.10 Signed-off-by: Justin Tee Signed-off-by: Martin K. Petersen commit 96fb8c34e5c12361d1966768bf9aadc935600c62 Author: Justin Tee Date: Mon Jan 9 15:33:15 2023 -0800 scsi: lpfc: Introduce new attention types for lpfc_sli4_async_fc_evt() handler Define new FC Link ACQE with new attention types 0x8 (Link Activation Failure) and 0x9 (Link Reset Protocol Event). Both attention types are meant to be informational-only type ACQEs with no action required. 0x8 is reported for diagnostic purposes, while 0x9 is posted during a normal link up transition when activating BB Credit Recovery feature. As such, modify lpfc_sli4_async_fc_evt() logic to log the attention types according to its severity and early return when informational-only attention types are encountered. Signed-off-by: Justin Tee Signed-off-by: Martin K. Petersen commit f1d2337d3e58955ecbbf392ba09fabb3e72db945 Author: Justin Tee Date: Mon Jan 9 15:33:14 2023 -0800 scsi: lpfc: Reinitialize internal VMID data structures after FLOGI completion After enabling VMID, an issue LIP test was erasing fabric switch VMID information. Introduce a lpfc_reinit_vmid() routine, which reinitializes all VMID data structures upon FLOGI completion in fabric topology. Signed-off-by: Justin Tee Signed-off-by: Martin K. Petersen commit 21681b81b9ae548c5dae7ae00d931197a27f480c Author: Justin Tee Date: Mon Jan 9 15:33:13 2023 -0800 scsi: lpfc: Fix use-after-free KFENCE violation during sysfs firmware write During the sysfs firmware write process, a use-after-free read warning is logged from the lpfc_wr_object() routine: BUG: KFENCE: use-after-free read in lpfc_wr_object+0x235/0x310 [lpfc] Use-after-free read at 0x0000000000cf164d (in kfence-#111): lpfc_wr_object+0x235/0x310 [lpfc] lpfc_write_firmware.cold+0x206/0x30d [lpfc] lpfc_sli4_request_firmware_update+0xa6/0x100 [lpfc] lpfc_request_firmware_upgrade_store+0x66/0xb0 [lpfc] kernfs_fop_write_iter+0x121/0x1b0 new_sync_write+0x11c/0x1b0 vfs_write+0x1ef/0x280 ksys_write+0x5f/0xe0 do_syscall_64+0x59/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd The driver accessed wr_object pointer data, which was initialized into mailbox payload memory, after the mailbox object was released back to the mailbox pool. Fix by moving the mailbox free calls to the end of the routine ensuring that we don't reference internal mailbox memory after release. Signed-off-by: Justin Tee Signed-off-by: Martin K. Petersen commit c051f1a424a15b73c493090a9f1c0273398b1637 Author: Justin Tee Date: Mon Jan 9 15:33:12 2023 -0800 scsi: lpfc: Exit PRLI completion handling early if ndlp not in PRLI_ISSUE state In a large SAN testing configuration, frequent target port toggle tests are occasionally resulting in missing lun path rediscoveries. An outstanding PRLI can be inflight when a target RSCN dissappearance occurs, causing the driver to retry PRLIs using invalid rpi contexts. Fix by verifying that an ndlp's state was not restarted from PRLI_ISSUE due to an intermediate RSCN. If not in a valid state, early exit PRLI completion handling. The last follow up RSCN indicating target reappearance retriggers PLOGI/PRLI with a valid rpi context and is expected to succeed in LUN path rediscovery. Signed-off-by: Justin Tee Signed-off-by: Martin K. Petersen commit ecdf4ddf4eb7a9135abdb358e98a8e6c1e8effe6 Author: Justin Tee Date: Mon Jan 9 15:33:11 2023 -0800 scsi: lpfc: Remove duplicate ndlp kref decrement in lpfc_cleanup_rpis() With faulty cables in PT2PT topology, an unintentional ndlp double kref decrement can occur. If a FLOGI request is outstanding before the link goes down, the missing FLOGI_ACC causes an F_Port ndlp to remain in the UNUSED state. During link down, lpfc_cleanup_rpis() is called and decrements an ndlp kref. Additionally, when the driver later decides to abort the FLOGI, the FLOGI completion handler decrements the ndlp kref a second time. Remove duplicate clean up logic in lpfc_cleanup_rpis() because the updated FLOGI completion handler already handles the ndlp kref decrement. Signed-off-by: Justin Tee Signed-off-by: Martin K. Petersen commit f81395570e6c08ec1ef11eda433856c1a6805077 Author: Justin Tee Date: Mon Jan 9 15:33:10 2023 -0800 scsi: lpfc: Remove redundant clean up code in disable_vport() The disable_vport() path calls the discovery state machine on all ndlps, puts them into NPR state, and then calls lpfc_cleanup_rpis() with the remove flag set. This unintentionally decrements an ndlp's kref twice and can result in premature release of an ndlp because lpfc_dev_loss_tmo_handler() triggers clean up of the ndlp again later. Remove redundant code in disable_vport() that sets all the ndlps to NPR, and change the call to lpfc_cleanup_rpis() to not remove the ndlps. lpfc_dev_loss_tmo_handler() will handle final removal of the ndlps. Signed-off-by: Justin Tee Signed-off-by: Martin K. Petersen commit b5c894cf430e779826612cf2acb508d78bf210ce Author: Justin Tee Date: Mon Jan 9 15:33:09 2023 -0800 scsi: lpfc: Set max DMA segment size to HBA supported SGE length During I/O, the following warning message occasionally appears: DMA-API: lpfc 0000:04:00.0: mapping sg segment longer than device claims to support [len=131072] [max=65536] The HBA is capable of supporting 131,072 bytes, so notify DMA layer via the dma_set_max_seg_size() API during hba initialization. Signed-off-by: Justin Tee Signed-off-by: Martin K. Petersen commit 7ab07683aa4ccf324dc369808ceb0b138d590f07 Author: Justin Tee Date: Mon Jan 9 15:33:08 2023 -0800 scsi: lpfc: Resolve miscellaneous variable set but not used compiler warnings The local variables called curr_data are incremented, but not actually used for anything so they are removed. The return value of lpfc_sli4_poll_eq is not used anywhere and is not called outside of lpfc_sli.c. Thus, its declaration is removed from lpfc_crtn.h Also, lpfc_sli4_poll_eq's path argument is not used in the routine so it is removed along with corresponding macros. Signed-off-by: Justin Tee Signed-off-by: Martin K. Petersen commit 1f7b5f94f8d0c97f9b6d10e5ba47e15459ff74ff Author: Justin Tee Date: Mon Jan 9 15:33:07 2023 -0800 scsi: lpfc: Replace outdated strncpy() with strscpy() The kernel test robot pointed out non-NULL terminated string possibilities when using strncpy() in lpfc_xcvr_data_show() routine. Although we manually set the NULL character after strncpy(), strncpy() usage is outdated. Replace all strncpy() usages with the preferred strscpy() API. Reported-by: kernel test robot Signed-off-by: Justin Tee Signed-off-by: Martin K. Petersen commit 6058304a66baae4470188337700392d6404079b3 Author: Justin Tee Date: Mon Jan 9 15:33:06 2023 -0800 scsi: lpfc: Fix space indentation in lpfc_xcvr_data_show() The kernel test robot detected inconsistent indentations for an if statement block in the lpfc_xcvr_data_show() routine. This patch reduces the extraneous tabs used for the if statement block in question. Reported-by: kernel test robot Signed-off-by: Justin Tee Signed-off-by: Martin K. Petersen commit 93e71edfd90ca7e07a3645167f1e8e4504d4e8ee Author: Jakub Kicinski Date: Tue Jan 10 20:29:08 2023 -0800 devlink: keep the instance mutex alive until references are gone The reference needs to keep the instance memory around, but also the instance lock must remain valid. Users will take the lock, check registration status and release the lock. mutex_destroy() etc. belong in the same place as the freeing of the memory. Unfortunately lockdep_unregister_key() sleeps so we need to switch the an rcu_work. Note that the problem is a bit hard to repro, because devlink_pernet_pre_exit() iterates over registered instances. AFAIU the instances must get devlink_free()d concurrently with the namespace getting deleted for the problem to occur. Reported-by: syzbot+d94d214ea473e218fc89@syzkaller.appspotmail.com Reported-by: syzbot+9f0dd863b87113935acf@syzkaller.appspotmail.com Fixes: 9053637e0da7 ("devlink: remove the registration guarantee of references") Reviewed-by: Jiri Pirko Reviewed-by: Jacob Keller Link: https://lore.kernel.org/r/20230111042908.988199-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit e63d2ea8385276c4617da261cd556be7ffc9817a Merge: 8fe66badf036d f7d1ba350fb3b Author: Martin K. Petersen Date: Wed Jan 11 23:49:21 2023 -0500 Merge patch series "qla2xxx driver enhancements" Nilesh Javali says: Please apply the qla2xxx driver enhancements to the SCSI tree at your earliest convenience. Link: https://lore.kernel.org/r/20221222043933.2825-1-njavali@marvell.com Signed-off-by: Martin K. Petersen commit f7d1ba350fb3bca7b158d6cb9963acc1cf00d729 Author: Nilesh Javali Date: Wed Dec 21 20:39:33 2022 -0800 scsi: qla2xxx: Update version to 10.02.08.200-k Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 1d201c81d4cc6840735bbcc99e6031503e5cf3b8 Author: Shreyas Deodhar Date: Wed Dec 21 20:39:32 2022 -0800 scsi: qla2xxx: Select qpair depending on which CPU post_cmd() gets called In current I/O path, Tx and Rx may not be processed on same CPU. This may lead to thrashing and optimum performance may not be achieved. Pick qpair such that Tx and Rx are processed on same CPU. Signed-off-by: Shreyas Deodhar Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 2f5fab1b6c3a8efc93ba52c28539c45a8d0142ad Author: Quinn Tran Date: Wed Dec 21 20:39:31 2022 -0800 scsi: qla2xxx: edif: Fix clang warning clang warning: drivers/scsi/qla2xxx/qla_edif_bsg.h:93:12: warning: field remote_pid within 'struct app_pinfo_req' is less aligned than 'port_id_t' and is usually due to 'struct app_pinfo_req' being packed, which can lead to unaligned accesses [-Wunaligned-access] port_id_t remote_pid; ^ 2 warnings generated. Remove u32 field in remote_pid to silence warning. Reported-by: kernel test robot Fixes: 7ebb336e45ef ("scsi: qla2xxx: edif: Add start + stop bsgs") Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 1f8f9c34127e9fae20c29a2b57f56fd47dbb43e4 Author: Quinn Tran Date: Wed Dec 21 20:39:30 2022 -0800 scsi: qla2xxx: edif: Reduce memory usage during low I/O For edif, each I/O requires a secondary buffer to carry the FCP cmnd. During high traffic time, these buffers are cached in the qpair. As traffic dies down, these buffers will be trimmed as needed. If traffic is reduced to none over 2 consecutive intervals, then these buffers will be further trimmed. Free FCP cmnd buffers to reduce memory usage during slow I/O time. Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 129a7c40294fd4ab9e9bccf76e8002818f492d8a Author: Quinn Tran Date: Wed Dec 21 20:39:29 2022 -0800 scsi: qla2xxx: edif: Fix stall session after app start For N2N, qla2x00_wait_for_sess_deletion call flushes a session which accidentally clear the scan_flag and thus prevents re-login to occur and causes session to stall. Use session delete to avoid the accidental clearing of scan_flag. Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 82d8dfd2a238261e06759ee792417dc99b93d60d Author: Quinn Tran Date: Wed Dec 21 20:39:28 2022 -0800 scsi: qla2xxx: edif: Fix performance dip due to lock contention User experienced performance dip on measuring IOPS while EDIF enabled. During I/O time, driver uses dma_pool_zalloc() call to allocate a chunk of memory. This call contains a lock behind the scene which contribute to lock contention. Save the allocated memory for reuse and avoid the lock. Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 430eef03a763e5e76a371ba6d02779ae4a64b6ea Author: Quinn Tran Date: Wed Dec 21 20:39:27 2022 -0800 scsi: qla2xxx: Relocate/rename vp map There is no functional change in this patch. VP map resource is renamed and relocated so it is not viewed as just a target mode resource. Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 87f6dafd50fb6d7214c32596a11b983138b09123 Author: Quinn Tran Date: Wed Dec 21 20:39:26 2022 -0800 scsi: qla2xxx: Remove dead code (GNN ID) Remove stale/unused code (GNN ID). Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit b9d87b60aaeb08ded3a8cfd4538085e6e2bc814f Author: Quinn Tran Date: Wed Dec 21 20:39:25 2022 -0800 scsi: qla2xxx: Remove dead code (GPNID) Remove stale unused code for GPNID. Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit efd1bd12a04d7fffcb31662298e5e3e814bff49c Author: Quinn Tran Date: Wed Dec 21 20:39:24 2022 -0800 scsi: qla2xxx: Remove dead code Removing drport field and FCPORT_UPDATE_NEEDED signals. Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 8fe66badf036d7505f9f4a03420d39b3ad819965 Author: Dan Carpenter Date: Thu Jan 5 13:53:35 2023 +0300 scsi: libsas: Fix an error code in sas_ata_add_dev() This code accidentally returns success instead of -ENOMEM. Fixes: 7cc7646b4b24 ("scsi: libsas: Factor out sas_ata_add_dev()") Link: https://lore.kernel.org/r/Y7asLxzVwQ56G+ya@kili Signed-off-by: Dan Carpenter Reviewed-by: Jason Yan Signed-off-by: Martin K. Petersen commit 80c0576ef179311f624bc450fede30a89afe9792 Author: Heiner Kallweit Date: Tue Jan 10 23:03:18 2023 +0100 r8169: disable ASPM in case of tx timeout There are still single reports of systems where ASPM incompatibilities cause tx timeouts. It's not clear whom to blame, so let's disable ASPM in case of a tx timeout. v2: - add one-time warning for informing the user Signed-off-by: Heiner Kallweit Reviewed-by: Alexander Duyck Link: https://lore.kernel.org/r/92369a92-dc32-4529-0509-11459ba0e391@gmail.com Signed-off-by: Jakub Kicinski commit 58edf8b928a8107bcdaba3389a51179b69ed2ff1 Merge: 679062c65b2c7 e2cb6e8db69e9 Author: Martin K. Petersen Date: Wed Jan 11 22:19:44 2023 -0500 Merge patch series "Several compilation warnings fixes for UFS Advanced RPMB" Bean Huo says: These patches are to fix several compilation warnings introduced by my commit: 6ff265fc5ef6 ("scsi: ufs: core: bsg: Add advanced RPMB support in ufs_bsg"), please consider this patch series for the next your merge window. Apologies for this!! Link: https://lore.kernel.org/r/20230108224057.354438-1-beanhuo@iokpp.de Signed-off-by: Martin K. Petersen commit e2cb6e8db69e96c1514c2992e2d4fd6c8c1b8820 Author: Bean Huo Date: Sun Jan 8 23:40:57 2023 +0100 scsi: ufs: core: bsg: Fix cast to restricted __be16 warning Fix the following sparse endianness warning: "sparse warnings: drivers/ufs/core/ufs_bsg.c:91:25: sparse: sparse: cast to restricted __be16." For consistency with endianness annotations of other UFS data structures, change __u16/32 to __be16/32 in UFS ARPMB data structures. Fixes: 6ff265fc5ef6 ("scsi: ufs: core: bsg: Add advanced RPMB support in ufs_bsg") Reported-by: kernel test robot Signed-off-by: Bean Huo Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit f3e57da528127febae7eb03d9c87408d572b0fd8 Author: Bean Huo Date: Sun Jan 8 23:40:56 2023 +0100 scsi: core: Fix invisible definition compilation warning In 'include/ufs/ufshcd.h' file, 'enum dma_data_direction' will be used, which is defined in linux/dma-direction.h, however, this header file is not included in ufshcd.h, thus causing the following compilation warning: "warning: ‘enum dma_data_direction’ declared inside parameter list will not be visible outside of this definition or declaration" Fix this warning by including 'linux/dma-direction.h'. Fixes: 6ff265fc5ef6 ("scsi: ufs: core: bsg: Add advanced RPMB support in ufs_bsg") Reported-by: Xiaosen He Reported-by: Bart Van Assche Signed-off-by: Bean Huo Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 5e87c51f186ef70b17201f97db11044e3e7ffa46 Author: Bean Huo Date: Sun Jan 8 23:40:55 2023 +0100 scsi: ufs: core: bsg: Fix sometimes-uninitialized warnings Compilation complains that two possible variables are used without initialization: drivers/ufs/core/ufs_bsg.c:112:6: warning: variable 'sg_cnt' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] drivers/ufs/core/ufs_bsg.c:112:6: warning: variable 'sg_list' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] Fix both warnings by adding initialization with sg_cnt = 0, sg_list = NULL. Fixes: 6ff265fc5ef6 ("scsi: ufs: core: bsg: Add advanced RPMB support in ufs_bsg") Signed-off-by: Bean Huo Reported-by: kernel test robot Reported-by: Xiaosen He Reviewed-by: Alim Akhtar Reviewed-by: Nick Desaulniers Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 679062c65b2c7824b5bf6cef9d286ef101466122 Author: Deepak R Varma Date: Fri Dec 9 01:41:43 2022 +0530 scsi: pm8001: Use sysfs_emit() in show function callbacks According to Documentation/filesystems/sysfs.rst, the show() callback function of kobject attributes should use sysfs_emit() instead of the sprintf() family of functions. Issue identified using the coccinelle device_attr_show.cocci script. Link: https://lore.kernel.org/r/Y5JE/xI2NNbnox/A@qemulion Signed-off-by: Deepak R Varma Acked-by: Jack Wang Signed-off-by: Martin K. Petersen commit d058bea181887e2e05416c6bc1adc6e1d2798f3b Merge: 3d2f12b4f0bdb f590c2554c776 Author: Martin K. Petersen Date: Wed Jan 11 21:51:10 2023 -0500 Merge patch series "Misc. qla2xxx driver bug fixes" Nilesh Javali says: Please apply the miscellaneous qla2xxx driver bug fixes to the SCSI tree at your earliest convenience. Link: https://lore.kernel.org/r/20221219110748.7039-1-njavali@marvell.com Signed-off-by: Martin K. Petersen commit 3d2f12b4f0bdb87d81568154cab193785727e4b0 Merge: b8c328727c0d5 39beef59128f6 Author: Martin K. Petersen Date: Wed Jan 11 21:50:04 2023 -0500 Merge patch series "ufs: qcom: Add HS-G4 support" Manivannan Sadhasivam says: This series adds HS-G4 support to the Qcom UFS driver and PHY driver. The newer Qcom platforms support configuring the UFS controller and PHY in dual gears (i.e., controller/PHY can be configured to run in two gear speeds). This is accomplished by adding two different PHY init sequences to the PHY driver and the UFS driver requesting the one that's required based on the platform configuration. Initially the ufs-qcom driver will use the default gear G2 for enumerating the UFS device. Afer enumeration, the max gear supported by both the controller and device would be found out and that will be used thereafter. But for using the max gear after enumeration, the ufs-qcom driver requires the UFS device to be reinitialized. For this purpose, a separate quirk has been introduced in the UFS core along with a callback and those will be used by the ufs-qcom driver. This series has been tested on following platforms: * Qcom RB5 development platform powered by SM8250 SoC * SM8450 based dev board * Qdrive3/sa8540p-ride board based on SC8280XP (derivative) Link: https://lore.kernel.org/r/20221222141001.54849-1-manivannan.sadhasivam@linaro.org Signed-off-by: Martin K. Petersen commit 39beef59128f6cf6a5d49e4c0dfd69dabe50b0c5 Author: Manivannan Sadhasivam Date: Thu Dec 22 19:40:01 2022 +0530 scsi: MAINTAINERS: Add myself as the maintainer for Qcom UFS drivers Qcom UFS drivers are left unmaintained till now. I'd like to step up to maintain the drivers and the binding. Acked-by: Bjorn Andersson Signed-off-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen commit 2c407fe97015a063855fa518bd790f024f818277 Author: Manivannan Sadhasivam Date: Thu Dec 22 19:40:00 2022 +0530 scsi: ufs: ufs-qcom: Add support for finding max gear on new platforms Starting from Qcom UFS version 4.0, vendor specific REG_UFS_PARAM0 register can be used to determine the maximum gear supported by the controller. Suggested-by: Can Guo Reviewed-by: Andrew Halaney Tested-by: Andrew Halaney # Qdrive3/sa8540p-ride Signed-off-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen commit baf5ddac90dc1983bc376b7ca6fe1afde702ff29 Author: Manivannan Sadhasivam Date: Thu Dec 22 19:39:59 2022 +0530 scsi: ufs: ufs-qcom: Add support for reinitializing the UFS device Starting from Qualcomm UFS version 4, the UFS device needs to be reinitialized after switching to maximum gear by the UFS core. Hence, add support for it by enabling the UFSHCD_QUIRK_REINIT_AFTER_MAX_GEAR_SWITCH quirk, implementing reinit_notify() callback and using the agreed gear speed for setting the PHY mode. Suggested-by: Can Guo Tested-by: Andrew Halaney # Qdrive3/sa8540p-ride Signed-off-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen commit c270986527f9fccb140826cbf3eff2cb1fccf463 Author: Manivannan Sadhasivam Date: Thu Dec 22 19:39:58 2022 +0530 scsi: ufs: ufs-qcom: Factor out the logic finding the HS Gear In the preparation of adding support for new gears, move the logic that finds the gear for each platform to a new function. This helps with code readability and also allows the logic to be used in other places of the driver in future. While at it, make it clear that this driver only supports symmetric gear setting (hs_tx_gear == hs_rx_gear). Reviewed-by: Andrew Halaney Tested-by: Andrew Halaney # Qdrive3/sa8540p-ride Signed-off-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen commit 96a7141da33207672d7a354c885d65af4f0f9b6c Author: Manivannan Sadhasivam Date: Thu Dec 22 19:39:57 2022 +0530 scsi: ufs: core: Add support for reinitializing the UFS device Some platforms like Qcom, requires the UFS device to be reinitialized after switching to maximum gear speed. So add support for that in UFS core by introducing a new quirk (UFSHCD_CAP_REINIT_AFTER_MAX_GEAR_SWITCH) and doing the reinitialization, if the quirk is enabled by the controller driver. Suggested-by: Can Guo Tested-by: Andrew Halaney # Qdrive3/sa8540p-ride Signed-off-by: Manivannan Sadhasivam Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit c2c38c573a2e6184f9acd10e98305d3cb5f1c62b Author: Manivannan Sadhasivam Date: Thu Dec 22 19:39:56 2022 +0530 scsi: ufs: core: Add reinit_notify() callback reinit_notify() callback can be used by the UFS controller drivers to perform changes required for UFSHCD reinit that can happen during max gear switch. Tested-by: Andrew Halaney # Qdrive3/sa8540p-ride Signed-off-by: Manivannan Sadhasivam Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 7959587f3284bf163e4f1baff3c6fa71fc6a55b1 Author: Manivannan Sadhasivam Date: Thu Dec 22 19:39:55 2022 +0530 scsi: ufs: ufs-qcom: Fix the Qcom register name for offset 0xD0 On newer UFS revisions, the register at offset 0xD0 is called, REG_UFS_PARAM0. Since the existing register, RETRY_TIMER_REG is not used anywhere, it is safe to use the new name. Reviewed-by: Andrew Halaney Reviewed-by: Asutosh Das Tested-by: Andrew Halaney # Qdrive3/sa8540p-ride Signed-off-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen commit 132b027205ef94a1d933d0f08a4109b1e321bda2 Author: Manivannan Sadhasivam Date: Thu Dec 22 19:39:54 2022 +0530 scsi: ufs: ufs-qcom: Use dev_err_probe() for printing probe error Make use of dev_err_probe() for printing the probe error. Reviewed-by: Andrew Halaney Reviewed-by: Asutosh Das Tested-by: Andrew Halaney # Qdrive3/sa8540p-ride Signed-off-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen commit 18fe2ab79bcf00c17d00460ca3f8c179d0aa87a4 Author: Manivannan Sadhasivam Date: Thu Dec 22 19:39:53 2022 +0530 scsi: ufs: ufs-qcom: Use bitfields where appropriate Use bitfield macros where appropriate to simplify the driver. Reviewed-by: Dmitry Baryshkov Reviewed-by: Asutosh Das Tested-by: Andrew Halaney # Qdrive3/sa8540p-ride Signed-off-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen commit a98c2183e81d746d8d4d4443359a7c2876a14e3f Author: Manivannan Sadhasivam Date: Thu Dec 22 19:39:52 2022 +0530 scsi: ufs: ufs-qcom: Remove unnecessary WARN_ON() In the reset assert and deassert callbacks, the supplied "id" is not used at all and only the HBA reset is performed all the time. So there is no reason to use a WARN_ON() on the "id". Reviewed-by: Andrew Halaney Reviewed-by: Asutosh Das Tested-by: Andrew Halaney # Qdrive3/sa8540p-ride Signed-off-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen commit 031312dbc6950a6a661f2f9ecfbc21fbc2e0e3e3 Author: Manivannan Sadhasivam Date: Thu Dec 22 19:39:51 2022 +0530 scsi: ufs: ufs-qcom: Remove unnecessary goto statements A goto statement in an error path is useful if the function needs to do cleanup other than returning the error code. But in this driver, goto statements are used for just returning the error code in many places. This really makes it hard to read the code. Get rid of those goto statements and just return the error code directly. Reviewed-by: Dmitry Baryshkov Reviewed-by: Asutosh Das Tested-by: Andrew Halaney # Qdrive3/sa8540p-ride Signed-off-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen commit b8c328727c0d53b33f52d0e0d1dfe0051910e183 Merge: 2d95c6deb64df df7320bac37e8 Author: Martin K. Petersen Date: Wed Jan 11 21:31:10 2023 -0500 Merge patch series "Add support for Unisoc UFS host controller" Zhe Wang says: Add support for Unisoc UFS host controller. Link: https://lore.kernel.org/r/20221209124121.20306-1-zhe.wang1@unisoc.com Signed-off-by: Martin K. Petersen commit f590c2554c7764a91e83f29347a1e27c4d9f1335 Author: Nilesh Javali Date: Mon Dec 19 03:07:48 2022 -0800 scsi: qla2xxx: Update version to 10.02.08.100-k Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 1e27648c848235046cfd83e656c1c0d360861f25 Author: Nilesh Javali Date: Mon Dec 19 03:07:47 2022 -0800 scsi: qla2xxx: Fix IOCB resource check warning Make qla_get_iocbs_resource() static to fix the warning: >> drivers/scsi/qla2xxx/qla_iocb.c:3820:5: warning: no previous prototype for >> 'qla_get_iocbs_resource' [-Wmissing-prototypes] 3820 | int qla_get_iocbs_resource(struct srb *sp) | ^~~~~~~~~~~~~~~~~~~~~~ Reported-by: kernel test robot Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit d676a9e3d9efb7e93df460bcf4c445496c16314f Author: Saurav Kashyap Date: Mon Dec 19 03:07:46 2022 -0800 scsi: qla2xxx: Remove increment of interface err cnt Residual underrun is not an interface error, hence no need to increment that count. Fixes: dbf1f53cfd23 ("scsi: qla2xxx: Implementation to get and manage host, target stats and initiator port") Cc: stable@vger.kernel.org Signed-off-by: Saurav Kashyap Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 3fbc74feb642deb688cc97f76d40b7287ddd4cb1 Author: Quinn Tran Date: Mon Dec 19 03:07:45 2022 -0800 scsi: qla2xxx: Fix erroneous link down If after an adapter reset the appearance of link is not recovered, the devices are not rediscovered. This is result of a race condition between adapter reset (abort_isp) and the topology scan. During adapter reset, the ABORT_ISP_ACTIVE flag is set. Topology scan usually occurred after adapter reset. In this case, the topology scan came earlier than usual where it ran into problem due to ABORT_ISP_ACTIVE flag was still set. kernel: qla2xxx [0000:13:00.0]-1005:1: Cmd 0x6a aborted with timeout since ISP Abort is pending kernel: qla2xxx [0000:13:00.0]-28a0:1: MBX_GET_PORT_NAME failed, No FL Port. kernel: qla2xxx [0000:13:00.0]-286b:1: qla2x00_configure_loop: exiting normally. local port wwpn 51402ec0123d9a80 id 012300) kernel: qla2xxx [0000:13:00.0]-8017:1: ADAPTER RESET SUCCEEDED nexus=1:0:15. Allow adapter reset to complete before any scan can start. Cc: stable@vger.kernel.org Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 7e8a936a2d0f98dd6e5d05d4838affabe606cabc Author: Quinn Tran Date: Mon Dec 19 03:07:44 2022 -0800 scsi: qla2xxx: Remove unintended flag clearing FCF_ASYNC_SENT flag is used in session management. This flag is cleared in task management path by accident. Remove unintended flag clearing. Fixes: 388a49959ee4 ("scsi: qla2xxx: Fix panic from use after free in qla2x00_async_tm_cmd") Cc: stable@vger.kernel.org Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 40f5b1b9a4af2917f97bd98f277baebad8cde323 Author: Quinn Tran Date: Mon Dec 19 03:07:43 2022 -0800 scsi: qla2xxx: Fix stalled login If a login failed due to low FW resources, the session can stall and will not be connected. Reset session state to allow relogin logic to redrive the connection. Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 5f63a163ed2f12c34dd4ae9b2757962ec7bb86e5 Author: Quinn Tran Date: Mon Dec 19 03:07:42 2022 -0800 scsi: qla2xxx: Fix exchange oversubscription for management commands Add resource checking for management (non-I/O) commands. Fixes: 89c72f4245a8 ("scsi: qla2xxx: Add IOCB resource tracking") Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 41e5afe51f75f2858f5563145348f6c26d307b8f Author: Quinn Tran Date: Mon Dec 19 03:07:41 2022 -0800 scsi: qla2xxx: Fix exchange oversubscription In large environment, it is possible to experience command timeout and escalation of path recovery. Currently the driver does not track the number of exchanges/commands sent to FW. If there is a delay for commands at the head of the queue, then this will create back pressure for commands at the back of the queue. Check for exchange availability before command submission. Fixes: 89c72f4245a8 ("scsi: qla2xxx: Add IOCB resource tracking") Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit c75e6aef5039830cce5d4cf764dd204522f89e6b Author: Arun Easi Date: Mon Dec 19 03:07:40 2022 -0800 scsi: qla2xxx: Fix DMA-API call trace on NVMe LS requests The following message and call trace was seen with debug kernels: DMA-API: qla2xxx 0000:41:00.0: device driver failed to check map error [device address=0x00000002a3ff38d8] [size=1024 bytes] [mapped as single] WARNING: CPU: 0 PID: 2930 at kernel/dma/debug.c:1017 check_unmap+0xf42/0x1990 Call Trace: debug_dma_unmap_page+0xc9/0x100 qla_nvme_ls_unmap+0x141/0x210 [qla2xxx] Remove DMA mapping from the driver altogether, as it is already done by FC layer. This prevents the warning. Fixes: c85ab7d9e27a ("scsi: qla2xxx: Fix missed DMA unmap for NVMe ls requests") Cc: stable@vger.kernel.org Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit b1ae65c082f74536ec292b15766f2846f0238373 Author: Quinn Tran Date: Mon Dec 19 03:07:39 2022 -0800 scsi: qla2xxx: Fix link failure in NPIV environment User experienced symptoms of adapter failure in NPIV environment. NPIV hosts were allowed to trigger chip reset back to back due to NPIV link state being slow to come online. Fix link failure in NPIV environment by removing NPIV host from directly being able to perform chip reset. kernel: qla2xxx [0000:04:00.1]-6009:261: Loop down - aborting ISP. kernel: qla2xxx [0000:04:00.1]-6009:262: Loop down - aborting ISP. kernel: qla2xxx [0000:04:00.1]-6009:281: Loop down - aborting ISP. kernel: qla2xxx [0000:04:00.1]-6009:285: Loop down - aborting ISP Fixes: 0d6e61bc6a4f ("[SCSI] qla2xxx: Correct various NPIV issues.") Cc: stable@vger.kernel.org Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 0c227dc22ca18856055983f27594feb2e0149965 Author: Shreyas Deodhar Date: Mon Dec 19 03:07:38 2022 -0800 scsi: qla2xxx: Check if port is online before sending ELS CT Ping and ELS cmds fail for NVMe targets. Check if port is online before sending ELS instead of sending login. Cc: stable@vger.kernel.org Signed-off-by: Shreyas Deodhar Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit df7320bac37e837f43883a51ce879c07c4429180 Author: Zhe Wang Date: Fri Dec 9 20:41:21 2022 +0800 scsi: ufs: ufs-unisoc: Add support for Unisoc UFS host controller Add driver code for Unisoc UFS host controller, along with UFS initialization. Signed-off-by: Zhe Wang Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit aa67971b2736e1eb0e09bb71212f4ccd536b0a63 Author: Zhe Wang Date: Fri Dec 9 20:41:20 2022 +0800 scsi: ufs: dt-bindings: Add document for Unisoc UFS host controller Add Unisoc ums9620 UFS host controller devicetree document. Signed-off-by: Zhe Wang Reviewed-by: Krzysztof Kozlowski Signed-off-by: Martin K. Petersen commit db473df2890672b62bd599c43197fe8780fb3963 Merge: 5fbea42387eba 7d8319a7cc668 Author: Alexei Starovoitov Date: Wed Jan 11 18:16:53 2023 -0800 Merge branch 'selftests/xsk: speed-ups, fixes, and new XDP programs' Magnus Karlsson says: ==================== This is a patch set of various performance improvements, fixes, and the introduction of more than one XDP program to the xsk selftests framework so we can test more things in the future such as upcoming multi-buffer and metadata support for AF_XDP. The new programs just reuse the framework that all the other eBPF selftests use. The new feature is used to implement one new test that does XDP_DROP on every other packet. More tests using this will be added in future commits. Contents: * The run-time of the test suite is cut by 10x when executing the tests on a real NIC, by only attaching the XDP program once per mode tested, instead of once per test program. * Over 700 lines of code have been removed. The xsk.c control file was moved straight over from libbpf when the xsk support was deprecated there. As it is now not used as library code that has to work with all kinds of versions of Linux, a lot of code could be dropped or simplified. * Add a new command line option "-d" that can be used when a test fails and you want to debug it with gdb or some other debugger. The option creates the two veth netdevs and prints them to the screen without deleting them afterwards. This way these veth netdevs can be used when running xskxceiver in a debugger. * Implemented the possibility to load external XDP programs so we can have more than the default one. This feature is used to implement a test where every other packet is dropped. Good exercise for the recycling mechanism of the xsk buffer pool used in zero-copy mode. * Various clean-ups and small fixes in patches 1 to 5. None of these fixes has any impact on the correct execution of the tests when they pass, though they can be irritating when a test fails. IMHO, they do not need to go to bpf as they will not fix anything there. The first version of patches 1, 2, and 4 where previously sent to bpf, but has now been included here. v2 -> v3: * Fixed compilation error for llvm [David] * Made the function xsk_is_in_drv_mode(ifobj) more generic by changing it to xsk_is_in_mode(ifobj, xdp_mode) [Maciej] * Added Maciej's acks to all the patches v1 -> v2: * Fixed spelling error in commit message of patch #6 [Björn] * Added explanation on why it is safe to use C11 atomics in patch #7 [Daniel] * Put all XDP programs in the same file so that adding more XDP programs to xskxceiver.c becomes more scalable in patches #11 and #12 [Maciej] * Removed more dead code in patch #8 [Maciej] * Removed stale %s specifier in error print, patch #9 [Maciej] * Changed name of XDP_CONSUMES_SOME_PACKETS to XDP_DROP_HALF to hopefully make it clearer [Maciej] * ifobj_rx and ifobj_tx name changes in patch #13 [Maciej] * Simplified XDP attachment code in patch #15 [Maciej] Patches: 1-5: Small fixes and clean-ups 6: New convenient debug option when using a debugger such as gdb 7-8: Removal of unnecessary code 9: Add the ability to load external XDP programs 10-11: Removal of more unnecessary code 12: Implement a new test where every other packet is XDP_DROP:ed 13: Unify the thread dispatching code 14-15: Simplify the way tests are written when using custom packet_streams or custom XDP programs Thanks: Magnus ==================== Signed-off-by: Alexei Starovoitov commit 7d8319a7cc668607aa054ea2da0bb730538a510b Author: Magnus Karlsson Date: Wed Jan 11 10:35:26 2023 +0100 selftests/xsk: automatically switch XDP programs Implement automatic switching of XDP programs and execution modes if needed by a test. This makes it much simpler to write a test as it only has to say what XDP program it needs if it is not the default one. This also makes it possible to remove the initial explicit attachment of the XDP program as well as the explicit mode switch in the code. These are now handled by the same code that just checks if a switch is necessary, so no special cases are needed. The default XDP program for all tests is one that sends all packets to the AF_XDP socket. If you need another one, please use the new function test_spec_set_xdp_prog() to specify what XDP programs and maps to use for this test. Signed-off-by: Magnus Karlsson Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20230111093526.11682-16-magnus.karlsson@gmail.com Signed-off-by: Alexei Starovoitov commit e67b2554f301b3e12322230ebb81ac7b7892f1a4 Author: Magnus Karlsson Date: Wed Jan 11 10:35:25 2023 +0100 selftests/xsk: automatically restore packet stream Automatically restore the default packet stream if needed at the end of each test. This so that test writers do not forget to do this. Signed-off-by: Magnus Karlsson Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20230111093526.11682-15-magnus.karlsson@gmail.com Signed-off-by: Alexei Starovoitov commit 7f881984073a717cf09f82882b7b8062da6773d7 Author: Magnus Karlsson Date: Wed Jan 11 10:35:24 2023 +0100 selftests/xsk: merge dual and single thread dispatchers Make the thread dispatching code common by unifying the dual and single thread dispatcher code. This so we do not have to add code in two places in upcoming commits. Signed-off-by: Magnus Karlsson Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20230111093526.11682-14-magnus.karlsson@gmail.com Signed-off-by: Alexei Starovoitov commit 80bea9acabb7690042f8efe25f208ffc67032aac Author: Magnus Karlsson Date: Wed Jan 11 10:35:23 2023 +0100 selftests/xsk: add test when some packets are XDP_DROPed Add a new test where some of the packets are not passed to the AF_XDP socket and instead get a XDP_DROP verdict. This is important as it tests the recycling mechanism of the buffer pool. If a packet is not sent to the AF_XDP socket, the buffer the packet resides in is instead recycled so it can be used again without the round-trip to user space. The test introduces a new XDP program that drops every other packet. Signed-off-by: Magnus Karlsson Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20230111093526.11682-13-magnus.karlsson@gmail.com Signed-off-by: Alexei Starovoitov commit f0a249df1b071d6f7177cc615d688a3a5d48423a Author: Magnus Karlsson Date: Wed Jan 11 10:35:22 2023 +0100 selftests/xsk: get rid of built-in XDP program Get rid of the built-in XDP program that was part of the old libbpf code in xsk.c and replace it with an eBPF program build using the framework by all the other bpf selftests. This will form the base for adding more programs in later commits. Signed-off-by: Magnus Karlsson Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20230111093526.11682-12-magnus.karlsson@gmail.com Signed-off-by: Alexei Starovoitov commit 6b3c0821caa49538c49262b041bae59bad523c7c Author: Magnus Karlsson Date: Wed Jan 11 10:35:21 2023 +0100 selftests/xsk: remove unnecessary code in control path Remove unnecessary code in the control path. This is located in the file xsk.c that was moved from libbpf when the xsk support there was deprecated. Some of the code there is not needed anymore as the selftests are only guaranteed to run on the kernel it is shipped with. Therefore, all the code that has to deal with compatibility of older kernels can be dropped and also any other function that is not of any use for the tests. Signed-off-by: Magnus Karlsson Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20230111093526.11682-11-magnus.karlsson@gmail.com Signed-off-by: Alexei Starovoitov commit aa61d81f397c65b9951b0da2538657154564564f Author: Magnus Karlsson Date: Wed Jan 11 10:35:20 2023 +0100 selftests/xsk: load and attach XDP program only once per mode Load and attach the XDP program only once per XDP mode that is being executed. Today, the XDP program is loaded and attached for every test, then unloaded, which takes a long time on real NICs, since they have to reconfigure their HW, in contrast to veth. The test suite now completes in 21 seconds, instead of 207 seconds previously on my machine. This is a speed-up of around 10x. This is accomplished by moving the XDP loading from the worker threads to the main thread and replacing the XDP loading interfaces of xsk.c that was taken from the xsk support in libbpf, with something more explicit that is more useful for these tests. Instead, the relevant file descriptors and ifindexes are just passed down to the new functions. Signed-off-by: Magnus Karlsson Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20230111093526.11682-10-magnus.karlsson@gmail.com Signed-off-by: Alexei Starovoitov commit 64aef77d750ede548699d81c959936289d7d7819 Author: Magnus Karlsson Date: Wed Jan 11 10:35:19 2023 +0100 selftests/xsk: remove namespaces Remove the namespaces used as they fill no function. This will simplify the code for speeding up the tests in the following commits. Signed-off-by: Magnus Karlsson Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20230111093526.11682-9-magnus.karlsson@gmail.com Signed-off-by: Alexei Starovoitov commit efe620e5ba03330a71a85b40e68ee1b497c789ed Author: Magnus Karlsson Date: Wed Jan 11 10:35:18 2023 +0100 selftests/xsk: replace asm acquire/release implementations Replace our own homegrown assembly store/release and load/acquire implementations with the HW agnositic atomic APIs C11 offers. This to make the code more portable, easier to read, and reduce the maintenance burden. The original code used load-acquire and store-release barriers hand-coded in assembly. Since C11, these kind of operations are offered as built-ins in gcc and llvm. The load-acquire operation prevents hoisting of non-atomic memory operations to before this operation and it corresponds to the __ATOMIC_ACQUIRE operation in the built-in atomics. The store-release operation prevents hoisting of non-atomic memory operations to after this operation and it corresponds to the __ATOMIC_RELEASE operation in the built-in atomics. Signed-off-by: Magnus Karlsson Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20230111093526.11682-8-magnus.karlsson@gmail.com Signed-off-by: Alexei Starovoitov commit 703bfd37101310ad5a6be09d5ff38c0e949ee8db Author: Magnus Karlsson Date: Wed Jan 11 10:35:17 2023 +0100 selftests/xsk: add debug option for creating netdevs Add a new option to the test_xsk.sh script that only creates the two veth netdevs and the extra namespace, then exits without running any tests. The failed test can then be executed in the debugger without having to create the netdevs and namespace manually. For ease-of-use, the veth netdevs to use are printed so they can be copied into the debugger. Here is an example how to use it: > sudo ./test_xsk.sh -d veth10 veth11 > gdb xskxceiver In gdb: run -i veth10 -i veth11 And now the test cases can be debugged with gdb. If you want to debug the test suite on a real NIC in loopback mode, there is no need to use this feature as you already know the netdev of your NIC. Signed-off-by: Magnus Karlsson Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20230111093526.11682-7-magnus.karlsson@gmail.com Signed-off-by: Alexei Starovoitov commit a4ca62277b6aeda31dfd686740462982b6a480b9 Author: Magnus Karlsson Date: Wed Jan 11 10:35:16 2023 +0100 selftests/xsk: remove unused variable outstanding_tx Remove the unused variable outstanding_tx. Signed-off-by: Magnus Karlsson Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20230111093526.11682-6-magnus.karlsson@gmail.com Signed-off-by: Alexei Starovoitov commit 085dcccfb7d3dc52ed708fc588587f319541bc83 Author: Magnus Karlsson Date: Wed Jan 11 10:35:15 2023 +0100 selftests/xsk: print correct error codes when exiting Print the correct error codes when exiting the test suite due to some terminal error. Some of these had a switched sign and some of them printed zero instead of errno. Fixes: facb7cb2e909 ("selftests/bpf: Xsk selftests - SKB POLL, NOPOLL") Signed-off-by: Magnus Karlsson Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20230111093526.11682-5-magnus.karlsson@gmail.com Signed-off-by: Alexei Starovoitov commit 1e04f23bccf967e00609ab3b210961db7a1886e4 Author: Magnus Karlsson Date: Wed Jan 11 10:35:14 2023 +0100 selftests/xsk: submit correct number of frames in populate_fill_ring Submit the correct number of frames in the function xsk_populate_fill_ring(). For the tests that set the flag use_addr_for_fill, uninitialized buffers were sent to the fill ring following the correct ones. This has no impact on the tests, since they only use the ones that were initialized. But for correctness, this should be fixed. Signed-off-by: Magnus Karlsson Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20230111093526.11682-4-magnus.karlsson@gmail.com Signed-off-by: Alexei Starovoitov commit 5adaf52776a4178434c0670a8e05e529a2b4aafa Author: Magnus Karlsson Date: Wed Jan 11 10:35:13 2023 +0100 selftests/xsk: do not close unused file descriptors Do not close descriptors that have never been used. File descriptor fields that are not in use are erroneously marked with the number 0, which is a valid fd. Mark unused fds with -1 instead and do not close these when deleting the socket. Signed-off-by: Magnus Karlsson Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20230111093526.11682-3-magnus.karlsson@gmail.com Signed-off-by: Alexei Starovoitov commit 2d0b2ae2871ae6d42a9f0a4280e0fb5bff8d38b8 Author: Magnus Karlsson Date: Wed Jan 11 10:35:12 2023 +0100 selftests/xsk: print correct payload for packet dump Print the correct payload when the packet dump option is selected. The network to host conversion was forgotten and the payload was erronously declared to be an int instead of an unsigned int. Fixes: facb7cb2e909 ("selftests/bpf: Xsk selftests - SKB POLL, NOPOLL") Signed-off-by: Magnus Karlsson Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20230111093526.11682-2-magnus.karlsson@gmail.com Signed-off-by: Alexei Starovoitov commit 5fbea42387eba1c7517fcad79099df706def7054 Author: Michal Suchanek Date: Mon Jan 9 12:34:42 2023 +0100 bpf_doc: Fix build error with older python versions The ability to subscript match result as an array is only available since python 3.6. Existing code in bpf_doc uses the older group() interface but commit 8a76145a2ec2 adds code using the new interface. Use the old interface consistently to avoid build error on older distributions like the below: + make -j48 -s -C /dev/shm/kbuild/linux.33946/current ARCH=powerpc HOSTCC=gcc CROSS_COMPILE=powerpc64-suse-linux- clean TypeError: '_sre.SRE_Match' object is not subscriptable Fixes: 8a76145a2ec2 ("bpf: explicitly define BPF_FUNC_xxx integer values") Signed-off-by: Michal Suchanek Signed-off-by: Andrii Nakryiko Acked-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20230109113442.20946-1-msuchanek@suse.de commit 99845faae7099cd704ebf67514c1157c26960a26 Author: Daniel Vetter Date: Mon Jan 9 17:46:04 2023 +0100 drm: document better that drivers shouldn't use drm_minor directly The documentation for struct drm_minor already states this, but that's not always that easy to find. Also due to historical reasons we still have the minor-centric interfaces (like drm_debugfs_create_files), but since this is now getting fixed we can put a few more pointers in place as to how this should be done ideally. Note that debugfs isn't there yet for all cases (debugfs files on kms objects like crtc/connector aren't supported, neither debugfs files with full fops), so the debugfs side of this is still rather aspirational and more for new users than converting everything existing. todo.rst covers the additional work needed already. Motivated by some discussion with Rodrigo on irc about how drm/xe should lay out its sysfs interfaces. v2: Make the debugfs situation clearer in the commit message, but don't elaborate more in the actual kerneldoc to avoid distracting from the main message around sysfs (Jani) Also fix some typos. Acked-by: Rodrigo Vivi Reviewed-by: Melissa Wen Reviewed-by: Maíra Canal Acked-by: Maxime Ripard Acked-by: Jani Nikula Cc: Rodrigo Vivi Cc: Wambui Karuga Cc: Maíra Canal Cc: Maxime Ripard Cc: Melissa Wen Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20230109164604.3860862-1-daniel.vetter@ffwll.ch commit 18e6340365eab44339a0aadab76c3d26a2406a72 Merge: 1d4beeb4edc79 b7bfaa761d760 Author: Andrew Morton Date: Wed Jan 11 14:01:55 2023 -0800 Merge branch 'master' into mm-nonmm-stable commit 12b98f333f6b4b582cc37d287db5bbdaf5e154e7 Merge: a7383cfbda1d4 b7bfaa761d760 Author: Andrew Morton Date: Wed Jan 11 14:01:38 2023 -0800 Merge branch 'master' into mm-stable commit 0c2dece8fb541ab07b68c3312a1065fa9c927a81 Author: Philip Yang Date: Mon Jan 9 18:08:17 2023 -0500 drm/amdkfd: Page aligned memory reserve size Use page aligned size to reserve memory usage because page aligned TTM BO size is used to unreserve memory usage, otherwise no page aligned size causes memory usage accounting unbalanced. Change vram_used definition type to int64_t to be able to trigger WARN_ONCE(adev && adev->kfd.vram_used < 0, "..."), to help debug the accounting issue with warning and backtrace. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 23b02b0e4678d9d30931eecd5e5dbb06db7f957f Author: Philip Yang Date: Tue Dec 20 14:55:03 2022 -0500 drm/amdkfd: Cleanup vm process info if init vm failed If acquire_vm failed when initializing KFD vm, set vm->process_info to NULL and free process info, otherwise, the future acquire_vm will always fail as vm->process_info is not NULL. Pass avm as parameter to remove the duplicate code. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 1d4beeb4edc79b32cfedd07dab9cf59b6df2ee71 Author: Pengfei Xu Date: Wed Jan 11 16:15:31 2023 +0800 selftests/filesystems: grant executable permission to run_fat_tests.sh When use tools/testing/selftests/kselftest_install.sh to make the kselftest-list.txt under tools/testing/selftests/kselftest_install. Then use tools/testing/selftests/kselftest_install/run_kselftest.sh to run all the kselftests in kselftest-list.txt, it will be blocked by case "filesystems/fat: run_fat_tests.sh" with "Warning: file run_fat_tests.sh is not executable", so grant executable permission to run_fat_tests.sh to fix this issue. Link: https://lkml.kernel.org/r/dfdbba6df8a1ab34bb1e81cd8bd7ca3f9ed5c369.1673424747.git.pengfei.xu@intel.com Fixes: dd7c9be330d8 ("selftests/filesystems: add a vfat RENAME_EXCHANGE test") Signed-off-by: Pengfei Xu Reviewed-by: Javier Martinez Canillas Cc: Shuah Khan Signed-off-by: Andrew Morton commit 39ecb653f671bbccd4a3c40f7f803f2874252f81 Author: Lukas Bulwahn Date: Mon Nov 7 12:08:17 2022 +0100 nsfs: repair kernel-doc for ns_match() Commit 1e2328e76254 ("fs/nsfs.c: Added ns_match") adds the ns_match() function with a kernel-doc comment, but the ns parameter was referred to with ns_common. Hence, ./scripts/kernel-doc -none fs/nsfs.c warns about it. Adjust the kernel-doc comment for ns_match() for make W=1 happiness. Signed-off-by: Lukas Bulwahn Signed-off-by: Al Viro commit beb9797ee8b0c19598ffccdfae24afa6e0066f6a Author: Al Viro Date: Mon Jan 9 01:02:41 2023 -0500 alpha/boot/misc: trim unused declarations gzip_mark() and gzip_release() are gone; there used to be two forward declarations of each and the patch removing those suckers had left one of each behind... Signed-off-by: Al Viro commit 1878787797cbb019eeefe6f905514dcd557302b6 Author: Al Viro Date: Mon Jan 9 00:14:02 2023 -0500 alpha/boot/tools/objstrip: fix the check for ELF header Just memcmp() with ELFMAG - that's the normal way to do it in userland code, which that thing is. Besides, that has the benefit of actually building - str_has_prefix() is *NOT* present in . Fixes: 5f14596e55de "alpha: Replace strncmp with str_has_prefix" Signed-off-by: Al Viro commit e07f68d5e4f4d7570b065b5bdf4729268c9985ba Author: Al Viro Date: Mon Jan 9 00:28:15 2023 -0500 alpha/boot: fix the breakage from -isystem series... Signed-off-by: Al Viro commit 977a3009547dad4a5bc95d91be4a58c9f7eedac0 Author: Al Viro Date: Fri Jan 6 19:25:59 2023 -0500 alpha: fix FEN fault handling Type 3 instruction fault (FPU insn with FPU disabled) is handled by quietly enabling FPU and returning. Which is fine, except that we need to do that both for fault in userland and in the kernel; the latter *can* legitimately happen - all it takes is this: .global _start _start: call_pal 0xae lda $0, 0 ldq $0, 0($0) - call_pal CLRFEN to clear "FPU enabled" flag and arrange for a signal delivery (SIGSEGV in this case). Fixed by moving the handling of type 3 into the common part of do_entIF(), before we check for kernel vs. user mode. Incidentally, the check for kernel mode is unidiomatic; the normal way to do that is !user_mode(regs). The difference is that the open-coded variant treats any of bits 63..3 of regs->ps being set as "it's user mode" while the normal approach is to check just the bit 3. PS is a 4-bit register and regs->ps always will have bits 63..4 clear, so the open-coded variant here is actually equivalent to !user_mode(regs). Harder to follow, though... Cc: stable@vger.kernel.org Reviewed-by: Richard Henderson Signed-off-by: Al Viro commit 6af6827fb0c412581f89d5c0c865892ddf984fab Author: Dmitry Baryshkov Date: Mon Jan 9 02:29:35 2023 +0200 arm64: dts: qcom: sm8250: drop the virtual ipa-virt device Drop the virtual ipa-virt device. The interconnects it provided are going to be represented as <&rpmhcc RPMH_IPA_CLK> clock. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109002935.244320-13-dmitry.baryshkov@linaro.org commit 88efcc060edbb277bf80768de8c2f63651d74b90 Author: Dmitry Baryshkov Date: Mon Jan 9 02:29:34 2023 +0200 arm64: dts: qcom: sm8150: drop the virtual ipa-virt device Drop the virtual ipa-virt device. The interconnects it provided are going to be represented as <&rpmhcc RPMH_IPA_CLK> clock. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109002935.244320-12-dmitry.baryshkov@linaro.org commit aa055bf158cd89aa18d4496a6ab4a83485207eef Author: Dmitry Baryshkov Date: Mon Jan 9 02:29:33 2023 +0200 clk: qcom: rpmh: define IPA clocks where required Follow the example of sc7180 and sdx55 and implement IP0 resource as clocks rather than interconnects. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109002935.244320-11-dmitry.baryshkov@linaro.org commit 1cb925c0863efcd8ed12ac3ac4a902386e6779f7 Author: Thomas Weißschuh Date: Wed Jan 11 16:46:30 2023 +0000 nsfs: add compat ioctl handler As all parameters and return values of the ioctls have the same representation on both 32bit and 64bit we can reuse the normal ioctl handler for the compat handler via compat_ptr_ioctl(). All nsfs ioctls return a plain "int" filedescriptor which is a signed 4-byte integer type on both 32bit and 64bit. The only parameter taken is by NS_GET_OWNER_UID and is a pointer to a "uid_t" which is a 4-byte unsigned integer type on both 32bit and 64bit. Fixes: 6786741dbf99 ("nsfs: add ioctl to get an owning user namespace for ns file descriptor") Reported-by: Karel Zak Link: https://github.com/util-linux/util-linux/pull/1924#issuecomment-1344133656 Signed-off-by: Thomas Weißschuh Signed-off-by: Al Viro commit 4a29a1262a47acd8e81a3824492a5aa8f8c5fc95 Author: Al Viro Date: Wed Dec 14 12:57:27 2022 -0500 minix: make minix_new_inode() return error as ERR_PTR(-E...) adjust the callers Signed-off-by: Al Viro commit b062007c63eb4452f1122384e86d402531fb1d52 Author: Jason Gunthorpe Date: Mon Nov 28 20:34:32 2022 -0400 iommu: Remove IOMMU_CAP_INTR_REMAP No iommu driver implements this any more, get rid of it. Link: https://lore.kernel.org/r/9-v3-3313bb5dd3a3+10f11-secure_msi_jgg@nvidia.com Tested-by: Matthew Rosato Reviewed-by: Kevin Tian Reviewed-by: Lu Baolu Signed-off-by: Jason Gunthorpe commit bf210f793937a634bae6eda6a6d699c00b2b53d9 Author: Jason Gunthorpe Date: Mon Nov 28 20:31:57 2022 -0400 irq/s390: Add arch_is_isolated_msi() for s390 s390 doesn't use irq_domains, so it has no place to set IRQ_DOMAIN_FLAG_ISOLATED_MSI. Instead of continuing to abuse the iommu subsystem to convey this information add a simple define which s390 can make statically true. The define will cause msi_device_has_isolated() to return true. Remove IOMMU_CAP_INTR_REMAP from the s390 iommu driver. Link: https://lore.kernel.org/r/8-v3-3313bb5dd3a3+10f11-secure_msi_jgg@nvidia.com Reviewed-by: Matthew Rosato Tested-by: Matthew Rosato Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit f188bdb5f1df5b35374482ea0568de85f1f468ea Author: Jason Gunthorpe Date: Mon Nov 28 20:18:14 2022 -0400 iommu/x86: Replace IOMMU_CAP_INTR_REMAP with IRQ_DOMAIN_FLAG_ISOLATED_MSI On x86 platforms when the HW can support interrupt remapping the iommu driver creates an irq_domain for the IR hardware and creates a child MSI irq_domain. When the global irq_remapping_enabled is set, the IR MSI domain is assigned to the PCI devices (by intel_irq_remap_add_device(), or amd_iommu_set_pci_msi_domain()) making those devices have the isolated MSI property. Due to how interrupt domains work, setting IRQ_DOMAIN_FLAG_ISOLATED_MSI on the parent IR domain will cause all struct devices attached to it to return true from msi_device_has_isolated_msi(). This replaces the IOMMU_CAP_INTR_REMAP flag as all places using IOMMU_CAP_INTR_REMAP also call msi_device_has_isolated_msi() Set the flag and delete the cap. Link: https://lore.kernel.org/r/7-v3-3313bb5dd3a3+10f11-secure_msi_jgg@nvidia.com Tested-by: Matthew Rosato Reviewed-by: Kevin Tian Reviewed-by: Lu Baolu Acked-by: Thomas Gleixner Signed-off-by: Jason Gunthorpe commit dcb83f6ec1bf08a44b3f19719b56e8dc18058ff5 Author: Jason Gunthorpe Date: Mon Nov 28 20:12:43 2022 -0400 genirq/msi: Rename IRQ_DOMAIN_MSI_REMAP to IRQ_DOMAIN_ISOLATED_MSI What x86 calls "interrupt remapping" is one way to achieve isolated MSI, make it clear this is talking about isolated MSI, no matter how it is achieved. This matches the new driver facing API name of msi_device_has_isolated_msi() No functional change. Link: https://lore.kernel.org/r/6-v3-3313bb5dd3a3+10f11-secure_msi_jgg@nvidia.com Tested-by: Matthew Rosato Reviewed-by: Kevin Tian Reviewed-by: Thomas Gleixner Signed-off-by: Jason Gunthorpe commit a5e72a6bac14181249ffd04f35f6a7c9bf47fbb9 Author: Jason Gunthorpe Date: Thu Dec 8 10:51:02 2022 -0400 genirq/irqdomain: Remove unused irq_domain_check_msi_remap() code After converting the users of irq_domain_check_msi_remap() it and the helpers are no longer needed. The new version does not require all the #ifdef helpers and inlines because CONFIG_GENERIC_MSI_IRQ always requires CONFIG_IRQ_DOMAIN and IRQ_DOMAIN_HIERARCHY. Link: https://lore.kernel.org/r/5-v3-3313bb5dd3a3+10f11-secure_msi_jgg@nvidia.com Tested-by: Matthew Rosato Reviewed-by: Kevin Tian Reviewed-by: Thomas Gleixner Signed-off-by: Jason Gunthorpe commit 25fc417f79381760382c34be699273554c8c5cc0 Author: Jason Gunthorpe Date: Thu Dec 8 10:50:30 2022 -0400 iommufd: Convert to msi_device_has_isolated_msi() Trivially use the new API. Link: https://lore.kernel.org/r/4-v3-3313bb5dd3a3+10f11-secure_msi_jgg@nvidia.com Tested-by: Matthew Rosato Reviewed-by: Kevin Tian Reviewed-by: Lu Baolu Signed-off-by: Jason Gunthorpe commit 6b1a7a00427cb54a99237c5f27f1a2875c9960b0 Author: Jason Gunthorpe Date: Thu Dec 8 11:10:55 2022 -0400 vfio/type1: Convert to iommu_group_has_isolated_msi() Trivially use the new API. Link: https://lore.kernel.org/r/3-v3-3313bb5dd3a3+10f11-secure_msi_jgg@nvidia.com Tested-by: Matthew Rosato Reviewed-by: Kevin Tian Reviewed-by: Lu Baolu Signed-off-by: Jason Gunthorpe commit efc30a8f15a7981737297f9e9c62fb814d74e268 Author: Jason Gunthorpe Date: Fri Dec 9 13:23:08 2022 -0400 iommu: Add iommu_group_has_isolated_msi() Compute the isolated_msi over all the devices in the IOMMU group because iommufd and vfio both need to know that the entire group is isolated before granting access to it. Link: https://lore.kernel.org/r/2-v3-3313bb5dd3a3+10f11-secure_msi_jgg@nvidia.com Tested-by: Matthew Rosato Reviewed-by: Kevin Tian Reviewed-by: Lu Baolu Signed-off-by: Jason Gunthorpe commit 17cde5e601b165174e8a433b550f84f362731164 Author: Jason Gunthorpe Date: Mon Nov 28 17:06:42 2022 -0400 genirq/msi: Add msi_device_has_isolated_msi() This will replace irq_domain_check_msi_remap() in following patches. The new API makes it more clear what "msi_remap" actually means from a functional perspective instead of identifying an implementation specific HW feature. Isolated MSI means that HW modeled by an irq_domain on the path from the initiating device to the CPU will validate that the MSI message specifies an interrupt number that the device is authorized to trigger. This must block devices from triggering interrupts they are not authorized to trigger. Currently authorization means the MSI vector is one assigned to the device. This is interesting for securing VFIO use cases where a rouge MSI (eg created by abusing a normal PCI MemWr DMA) must not allow the VFIO userspace to impact outside its security domain, eg userspace triggering interrupts on kernel drivers, a VM triggering interrupts on the hypervisor, or a VM triggering interrupts on another VM. As this is actually modeled as a per-irq_domain property, not a global platform property, correct the interface to accept the device parameter and scan through only the part of the irq_domains hierarchy originating from the source device. Locate the new code in msi.c as it naturally only works with CONFIG_GENERIC_MSI_IRQ, which also requires CONFIG_IRQ_DOMAIN and IRQ_DOMAIN_HIERARCHY. Link: https://lore.kernel.org/r/1-v3-3313bb5dd3a3+10f11-secure_msi_jgg@nvidia.com Tested-by: Matthew Rosato Reviewed-by: Kevin Tian Reviewed-by: Thomas Gleixner Signed-off-by: Jason Gunthorpe commit 7592ba4d3e9bf1cce40323f59e48f4ca03b105e9 Author: Luca Weiss Date: Fri Jan 6 16:39:42 2023 +0100 arm64: dts: qcom: pm7250b: Add BAT_ID vadc channel Add a node describing the ADC5_BAT_ID_100K_PU channel with the properties taken from downstream kernel. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230106-pm7250b-bat_id-v1-2-82ca8f2db741@fairphone.com commit 22cb284808cb83c94a227893925e4d9cc4384fec Author: Paul E. McKenney Date: Wed Jan 4 16:37:55 2023 -0800 drivers/clk: 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: Michael Turquette Cc: Stephen Boyd Cc: Link: https://lore.kernel.org/r/20230105003813.1770367-9-paulmck@kernel.org Signed-off-by: Stephen Boyd commit 389d2c9926b3a81791e23a25fc1b85928139d40b Author: Stephan Gerhold Date: Sat Jan 7 12:09:58 2023 +0100 arm64: dts: qcom: msm8916: Add DMA for all I2C controllers i2c-qup allows using DMA to speed up larger transfers. In msm8916.dtsi the DMA channels are already assigned to the SPI controllers but missing for I2C. Add them there as well. This also fixes confusing errors in dmesg for each I2C controller: i2c_qup 78b6000.i2c: tx channel not available Signed-off-by: Stephan Gerhold Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230107110958.5762-3-stephan@gerhold.net commit 0154d3594af3c198532ac7b4ab70f50fb5207a15 Author: Stephan Gerhold Date: Sat Jan 7 12:09:57 2023 +0100 arm64: dts: qcom: msm8916: Enable blsp_dma by default Adding the "dmas" to the I2C controllers prevents probing them if blsp_dma is disabled (infinite probe deferral). Avoid this by enabling blsp_dma by default - it's an integral part of the SoC that is almost always used (even if just for UART). Signed-off-by: Stephan Gerhold Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230107110958.5762-2-stephan@gerhold.net commit bfc7486991c2b1b514cee90854af0f90c56b6bf2 Author: Konrad Dybcio Date: Sat Jan 7 13:04:34 2023 +0100 clk: qcom: camcc-sm6350: Make camcc_sm6350_hws static There's no reason for it not to be static, and some compilers don't like not it being that way. Make it so. Reported-by: kernel test robot Fixes: 80f5451d9a7c ("clk: qcom: Add camera clock controller driver for SM6350") Signed-off-by: Konrad Dybcio Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230107120434.1902666-1-konrad.dybcio@linaro.org commit 599a259a4b3b6c0d4c4b51d9e58408ac6de779f0 Author: Lin, Meng-Bo Date: Sat Jan 7 13:33:20 2023 +0000 arm64: dts: qcom: msm8916-gplus-fl8005a: Add flash LED FL8005A uses Qualcomm GPIO flash LEDs which is compatible with SGM3140 Flash LED driver. Add it to the device tree. Signed-off-by: Lin, Meng-Bo Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230107133235.139947-1-linmengbo0689@protonmail.com commit 143b4b845f58380a334cc0b9242567e602233743 Author: Lin, Meng-Bo Date: Sat Jan 7 13:33:05 2023 +0000 arm64: dts: qcom: msm8916-gplus-fl8005a: Add touchscreen FL8005A uses a Focaltech FT5402 touchscreen that is connected to blsp_i2c5. Add it to the device tree. Signed-off-by: Lin, Meng-Bo Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230107133223.139893-1-linmengbo0689@protonmail.com commit 662a90c4e72579967cb682fb6b4c6f061cc00ab9 Author: Lin, Meng-Bo Date: Sat Jan 7 13:32:56 2023 +0000 arm64: dts: qcom: msm8916-gplus-fl8005a: Add initial device tree GPLUS FL8005A is a tablet using the MSM8916 SoC released in 2015. Add a device tree for with initial support for: - GPIO keys - GPIO LEDs - pm8916-vibrator - SDHCI (internal and external storage) - USB Device Mode - UART - WCNSS (WiFi/BT) - Regulators Signed-off-by: Lin, Meng-Bo Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230107133210.139839-1-linmengbo0689@protonmail.com commit cb12cc2d46ccf45345bbf29bcb35bee54a54bc86 Author: Lin, Meng-Bo Date: Sat Jan 7 13:32:39 2023 +0000 dt-bindings: qcom: Document msm8916-gplus-fl8005a Document the new gplus,fl8005a device tree bindings used in its device tree. Signed-off-by: Lin, Meng-Bo Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230107133158.139785-1-linmengbo0689@protonmail.com commit d7a2d86837b9de8d378f040cfc9184905d82bd78 Author: Lin, Meng-Bo Date: Sat Jan 7 13:32:34 2023 +0000 dt-bindings: vendor-prefixes: Add GPLUS Add vendor prefix for GPLUS. https://www.gplus.com.tw Signed-off-by: Lin, Meng-Bo Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230107133145.139731-1-linmengbo0689@protonmail.com commit 2e3015c2d190760ff59e41336a0a27d6caaacf3b Author: Dmitry Baryshkov Date: Wed Jan 11 22:16:34 2023 +0300 arm64: dts: qcom: msm8996: mark apcs as clock provider Now as we added the APCS clock controller support, mark apcs device as clock provider by adding #clock-cells property. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230111191634.2509616-1-dmitry.baryshkov@linaro.org commit 41ddfbda83f23a7b007cf307409a17e3ece177c6 Author: Bjorn Andersson Date: Tue Jan 10 19:59:06 2023 -0800 arm64: defconfig: Enable SC8280XP Display Clock Controller The Display Clock Controller provides clocks and power-domains for the display subsystem, enable this to enable display on the SC8280XP. Now that power-domains can probe defer past late_initcall() this should be possible to leave as module. Acked-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230111035906.2975494-5-quic_bjorande@quicinc.com commit 62d8b7f90084b697fff4be7d62b128a6c3b2a60c Author: Abel Vesa Date: Wed Jan 11 10:02:54 2023 +0200 arm64: defconfig: Enable GCC, TCSRCC, pinctrl and interconnect for SM8550 Add the SM8550 GCC, TCSRCC, interconnect and pinctrl drivers as built-in. All of these are necessary for the Qualcomm SM8550 platform to boot to shell. Signed-off-by: Abel Vesa Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230111080254.1181325-1-abel.vesa@linaro.org commit 7a2b15cfa8dbbd54beb4e2ce7b2f42eb0ad00425 Author: Yangtao Li Date: Thu Dec 22 03:19:32 2022 +0800 f2fs: support accounting iostat count and avg_bytes Previously, we supported to account iostat io_bytes, in this patch, it adds to account iostat count and avg_bytes: time: 1671648667 io_bytes count avg_bytes [WRITE] app buffered data: 31 2 15 Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 45c98f5a58f36c35ecf5a149cbf69cf5fd022120 Author: Yangtao Li Date: Mon Dec 12 21:36:44 2022 +0800 f2fs: convert discard_wake and gc_wake to bool type discard_wake and gc_wake have only two values, 0 or 1. So there is no need to use int type to store them. BTW, move discard_wake to the end of the discard_cmd_control structure. Before: - sizeof(struct discard_cmd_control): 8392 After move: - sizeof(struct discard_cmd_control): 8384 Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f08142bc3a60f5af632ba48dc2fef8797043086d Author: Yangtao Li Date: Sat Dec 17 13:24:48 2022 +0800 f2fs: convert to use MIN_DISCARD_GRANULARITY macro Commit 1cd2e6d54435 ("f2fs: define MIN_DISCARD_GRANULARITY macro") introduce it, let's convert to use MIN_DISCARD_GRANULARITY macro. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c40e15a9a59f79e79d9500f1fd019321ec35b959 Author: Yangtao Li Date: Wed Dec 21 02:39:04 2022 +0800 f2fs: merge f2fs_show_injection_info() into time_to_inject() There is no need to additionally use f2fs_show_injection_info() to output information. Concatenate time_to_inject() and __time_to_inject() via a macro. In the new __time_to_inject() function, pass in the caller function name and parent function. In this way, we no longer need the f2fs_show_injection_info() function, and let's remove it. Suggested-by: Chao Yu Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 1cd7565449de6e838ff5a3fa75fbd2ce58c6d955 Author: Yangtao Li Date: Wed Dec 21 03:12:12 2022 +0800 f2fs: add a f2fs_ prefix to punch_hole() and expand_inode_data() For example, f2fs_collapse_range(), f2fs_collapse_range(), f2fs_insert_range(), the functions used in f2fs_fallocate() are all prefixed with f2fs_, so let's keep the name consistent. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 390d0b99212e42c6f9116562a8442888f6a0141d Author: Yangtao Li Date: Thu Dec 22 03:26:34 2022 +0800 f2fs: remove unnecessary blank lines Just cleanup. Signed-off-by: Yangtao Li Signed-off-by: Jaegeuk Kim commit a1357a91ec9ee72cf7683ac17b5f26dd5b4e6e5f Author: Yangtao Li Date: Thu Dec 29 21:18:28 2022 +0800 f2fs: mark f2fs_init_compress_mempool w/ __init f2fs_init_compress_mempool() only initializes the memory pool during the f2fs module init phase. Let's mark it as __init like any other function. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b5a711acab305e04278c136c841ba37c589c16a1 Author: Yangtao Li Date: Tue Nov 29 20:29:28 2022 +0800 f2fs: judge whether discard_unit is section only when have CONFIG_BLK_DEV_ZONED The current logic, regardless of whether CONFIG_BLK_DEV_ZONED is enabled or not, will judge whether discard_unit is SECTION, when f2fs_sb_has_blkzoned. In fact, when CONFIG_BLK_DEV_ZONED is not enabled, this judgment is a path that will never be accessed. At this time, -EINVAL will be returned in the parse_options function, accompanied by the message "Zoned block device support is not enabled". Let's wrap this discard_unit judgment with CONFIG_BLK_DEV_ZONED. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit ebaaec351e4fef86afe38002b6a8c15178fd3610 Author: Zhang Qilong Date: Tue Sep 6 22:53:47 2022 +0800 f2fs: start freeing cluster pages from the unused number We can start freeing cluster page(s) from which compression is not used. It will get better performance. Signed-off-by: Zhang Qilong Signed-off-by: Jaegeuk Kim commit 5fec7cb2e3e1d469312b2870e5545a5468a10f6b Author: Matti Lehtimäki Date: Wed Jan 11 20:35:01 2023 +0200 ARM: dts: qcom: apq8026-samsung-matisse-wifi: Add display backlight Uses ti,lp8556 backlight with clk-pwm. Signed-off-by: Matti Lehtimäki Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230111183502.706151-1-matti.lehtimaki@gmail.com commit aab961de74f10968ea67f42c0ca7c5cd866df3ec Author: Johan Hovold Date: Wed Jan 11 17:03:35 2023 +0100 arm64: dts: qcom: sa8540p-pmics: rename pmic labels The SA8540P PMICs are named PMM8540. Rename the devicetree source labels to reflect this. Reviewed-by: Brian Masney Reviewed-by: Konrad Dybcio Reviewed-by: Eric Chanudet Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230111160335.7175-3-johan+linaro@kernel.org commit 32c028fccb120603368c4f2aaac44376b4a1a21e Author: Johan Hovold Date: Wed Jan 11 17:03:34 2023 +0100 arm64: dts: qcom: sa8540p-pmics: add missing interrupt include Add the missing interrupt-controller include which is needed by the RTC node. Reviewed-by: Brian Masney Reviewed-by: Eric Chanudet Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230111160335.7175-2-johan+linaro@kernel.org commit 275dd5dc67f2a4d7a81c22869ff594701519dc9b Author: Yangtao Li Date: Fri Dec 16 10:45:06 2022 +0800 MAINTAINERS: Add f2fs's patchwork >From now on, f2fs also has its own patchwork link, thanks to Jaegeuk for starting this tool! Let's update it to f2fs entry. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f48c70b111b4faaf57dc65055df86f95487ccb88 Author: Johan Hovold Date: Wed Jan 11 14:31:28 2023 +0100 arm64: dts: qcom: sc8280xp-x13s: enable eDP display Enable the eDP display on MDSS0 DP3, including backlight control. Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230111133128.31813-1-johan+linaro@kernel.org commit 5715698507ee09ebe92791e3ff9224e256f14231 Author: Bjorn Andersson Date: Tue Jan 10 19:59:05 2023 -0800 arm64: dts: qcom: sa8295-adp: Enable DP instances The SA8295P ADP has, among other interfaces, six MiniDP connectors which are connected to MDSS0 DP2 and DP3, and MDSS1 DP0 through DP3. Enable Display Clock controllers, MDSS instanced, MDPs, DP controllers, DP PHYs and link them all together. Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230111035906.2975494-4-quic_bjorande@quicinc.com commit 4a883a8d80b5f528b11f50cb0864c9662778f415 Author: Bjorn Andersson Date: Tue Jan 10 19:59:04 2023 -0800 arm64: dts: qcom: sc8280xp-crd: Enable EDP The SC8280XP CRD has a EDP display on MDSS0 DP3, enable relevant nodes and link it together with the backlight control. Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Reviewed-by: Johan Hovold Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230111035906.2975494-3-quic_bjorande@quicinc.com commit 57d6ef683a1554568adafd975b5ea40778b4d672 Author: Bjorn Andersson Date: Tue Jan 10 19:59:03 2023 -0800 arm64: dts: qcom: sc8280xp: Define some of the display blocks Define the display clock controllers, the MDSS instances, the DP phys and connect these together. Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230111035906.2975494-2-quic_bjorande@quicinc.com commit 0e2213fe0ab4c04da0e2354e84ec3b90e59939a4 Author: Johan Hovold Date: Tue Dec 13 15:08:43 2022 +0100 irqchip: Use irq_domain_alloc_irqs() Use the irq_domain_alloc_irqs() wrapper instead of the full __irq_domain_alloc_irqs() interface, which was only intended for some legacy (x86) use cases. Signed-off-by: Johan Hovold Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20221213140844.15470-2-johan+linaro@kernel.org commit 379af13b31fa8a36ad4abd59a5c511f25c5d4d42 Author: Alexander Sverdlin Date: Mon Dec 12 17:37:15 2022 +0100 docs: locking: Discourage from calling disable_irq() in atomic Correct the example in the documentation so that disable_irq() is not being called in atomic context. disable_irq() calls sleeping synchronize_irq(), it's not allowed to call them in atomic context. Signed-off-by: Alexander Sverdlin Signed-off-by: Thomas Gleixner Reviewed-by: Manfred Spraul Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/lkml/87k02wbs2n.ffs@tglx/ Link: https://lore.kernel.org/r/20221212163715.830315-1-alexander.sverdlin@siemens.com commit 17549b0f184d870f2cfa4e5cfa79f4c4905ed757 Author: Manfred Spraul Date: Fri Dec 16 16:04:41 2022 +0100 genirq: Add might_sleep() to disable_irq() With the introduction of threaded interrupt handlers, it is virtually never safe to call disable_irq() from non-premptible context. Thus: Update the documentation, add an explicit might_sleep() to catch any offenders. This is more obvious and straight forward than the implicit might_sleep() check deeper down in the disable_irq() call chain. Fixes: 3aa551c9b4c4 ("genirq: add threaded interrupt handler support") Signed-off-by: Manfred Spraul Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20221216150441.200533-3-manfred@colorfullife.com commit 9f76d59173d9d146e96c66886b671c1915a5c5e5 Author: Jann Horn Date: Thu Jan 5 14:44:03 2023 +0100 timers: Prevent union confusion from unexpected restart_syscall() The nanosleep syscalls use the restart_block mechanism, with a quirk: The `type` and `rmtp`/`compat_rmtp` fields are set up unconditionally on syscall entry, while the rest of the restart_block is only set up in the unlikely case that the syscall is actually interrupted by a signal (or pseudo-signal) that doesn't have a signal handler. If the restart_block was set up by a previous syscall (futex(..., FUTEX_WAIT, ...) or poll()) and hasn't been invalidated somehow since then, this will clobber some of the union fields used by futex_wait_restart() and do_restart_poll(). If userspace afterwards wrongly calls the restart_syscall syscall, futex_wait_restart()/do_restart_poll() will read struct fields that have been clobbered. This doesn't actually lead to anything particularly interesting because none of the union fields contain trusted kernel data, and futex(..., FUTEX_WAIT, ...) and poll() aren't syscalls where it makes much sense to apply seccomp filters to their arguments. So the current consequences are just of the "if userspace does bad stuff, it can damage itself, and that's not a problem" flavor. But still, it seems like a hazard for future developers, so invalidate the restart_block when partly setting it up in the nanosleep syscalls. Signed-off-by: Jann Horn Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20230105134403.754986-1-jannh@google.com commit d386a10c9cd887b53ff9da06d27a60da61b007c9 Author: Venkata Prasad Potturu Date: Mon Jan 9 18:51:04 2023 +0530 ASoC: amd: acp: Enable i2s tdm support for skyrim platforms Enable i2s tdm support for skyrim platform using dmi quirks. Signed-off-by: Venkata Prasad Potturu Link: https://lore.kernel.org/r/20230109132104.1259479-6-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown commit 200553008e9f5b613aa9ea75a68210861bff511f Author: Venkata Prasad Potturu Date: Mon Jan 9 18:51:03 2023 +0530 ASoC: amd: acp: Add i2s tdm support in machine driver Add i2s tdm support for amd platforms. Signed-off-by: Venkata Prasad Potturu Link: https://lore.kernel.org/r/20230109132104.1259479-5-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown commit ca9d237994db63dca68f2b04e257a4738847deee Author: Venkata Prasad Potturu Date: Mon Jan 9 18:51:02 2023 +0530 ASoC: amd: acp: Refactor i2s clocks programming sequence Refactor i2s clock values based on hw_params and use srate and bclk_ratio variables in clock enable API instead hard-code values. Signed-off-by: Venkata Prasad Potturu Link: https://lore.kernel.org/r/20230109132104.1259479-4-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown commit af830fc44a2d273b163e76b17f51b128ce694481 Author: Venkata Prasad Potturu Date: Mon Jan 9 18:51:01 2023 +0530 ASoC: amd: acp: Refactor dai format implementation Refactor dai format implementation in dai_link specific snd_soc_ops. Signed-off-by: Venkata Prasad Potturu Link: https://lore.kernel.org/r/20230109132104.1259479-3-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown commit 099b923fc15d8faa91c5fc1b46cbc483d034f5dc Author: Venkata Prasad Potturu Date: Mon Jan 9 18:51:00 2023 +0530 ASoC: amd: acp: Add new cpu dai's in machine driver when using same cpu dai for 2 different dai links below error is reported. error: can't find BE for DAI ACPHS_VIRTUAL1.OUT To avoid this error add new cpu dai. Signed-off-by: Venkata Prasad Potturu Link: https://lore.kernel.org/r/20230109132104.1259479-2-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown commit 62cd6679958d760e9a565ec5049ab2b839720992 Merge: 60d86034b14ee 82fc0f87cd2c7 Author: Jakub Kicinski Date: Wed Jan 11 10:14:16 2023 -0800 Merge branch 'dt-bindings-first-batch-of-dt-schema-conversions-for-amlogic-meson-bindings' Neil Armstrong says: ==================== dt-bindings: first batch of dt-schema conversions for Amlogic Meson bindings Batch conversion of the following bindings: [...] - mdio-mux-meson-g12a.txt ==================== Link: https://lore.kernel.org/r/20221117-b4-amlogic-bindings-convert-v2-0-36ad050bb625@linaro.org Signed-off-by: Jakub Kicinski commit 82fc0f87cd2c7732172ca987025d254c5920b495 Author: Neil Armstrong Date: Mon Jan 9 13:53:35 2023 +0100 dt-bindings: net: convert mdio-mux-meson-g12a.txt to dt-schema Convert MDIO bus multiplexer/glue of Amlogic G12a SoC family bindings to dt-schema. Reviewed-by: Martin Blumenstingl Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Signed-off-by: Jakub Kicinski commit 1a4cf05847571b1f306633148a4d8660ab6e96f7 Author: Javier Martinez Canillas Date: Sat Jan 7 20:18:22 2023 +0100 drm/panel-xinpeng-xpp055c272: Drop custom DSI write macro There is a macro for this already in the header, use that instead and delete the custom DSI write macro defined in the driver. Signed-off-by: Javier Martinez Canillas Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20230107191822.3787147-14-javierm@redhat.com commit 7b00536a206e9d31740e3a6c11c6b731b1d49182 Author: Javier Martinez Canillas Date: Sat Jan 7 20:18:21 2023 +0100 drm/panel-sony-tulip-truly-nt35521: Drop custom DSI write macro There is a macro for this already in the header, use that instead and delete the custom DSI write macro defined in the driver. Signed-off-by: Javier Martinez Canillas Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20230107191822.3787147-13-javierm@redhat.com commit 2ba1f9b713bc370093cf8cfc6745914da9e770ae Author: Javier Martinez Canillas Date: Sat Jan 7 20:18:20 2023 +0100 drm/panel-mantix-mlaf057we51: Drop custom DSI write macro There is a macro for this already in the header, use that instead and delete the custom DSI write macro defined in the driver. Signed-off-by: Javier Martinez Canillas Reviewed-by: Sam Ravnborg Reviewed-by: Guido Günther Link: https://patchwork.freedesktop.org/patch/msgid/20230107191822.3787147-12-javierm@redhat.com commit 56c46827fc2b8afc150513a95351c0a0377da421 Author: Javier Martinez Canillas Date: Sat Jan 7 20:18:19 2023 +0100 drm/panel-sharp-ls060t1sx01: Drop custom DSI write macro There is a macro for this already in the header, use that instead and delete the custom DSI write macro defined in the driver. Signed-off-by: Javier Martinez Canillas Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20230107191822.3787147-11-javierm@redhat.com commit 5040d554be82242c64c147f354fe1a6976e66149 Author: Javier Martinez Canillas Date: Sat Jan 7 20:18:18 2023 +0100 drm/panel-samsung-sofef00: Drop custom DSI write macro There is a macro for this already in the header, use that instead and delete the custom DSI write macro defined in the driver. Signed-off-by: Javier Martinez Canillas Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20230107191822.3787147-10-javierm@redhat.com commit 956c5ff20b505262d47409ba87786d19fff934c5 Author: Javier Martinez Canillas Date: Sat Jan 7 20:18:17 2023 +0100 drm/panel-samsung-s6e88a0-ams452ef01: Drop custom DSI write macro There is a macro for this already in the header, use that instead and delete the custom DSI write macro defined in the driver. Signed-off-by: Javier Martinez Canillas Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20230107191822.3787147-9-javierm@redhat.com commit 1b633553f8ef729e9edb7c0a6291228a70c119a8 Author: Javier Martinez Canillas Date: Sat Jan 7 20:18:16 2023 +0100 drm/panel-jdi-fhd-r63452: Drop custom DSI write macros There are macros for these already in the header, use that instead and delete the custom DSI write macros defined in the driver. Signed-off-by: Javier Martinez Canillas Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20230107191822.3787147-8-javierm@redhat.com commit b541a6d5694e7190035389c35c5c08f777445bff Author: Javier Martinez Canillas Date: Sat Jan 7 20:18:15 2023 +0100 drm/panel-novatek-nt35950: Drop custom DSI write macro There is a macro for this already in the header, use that instead and delete the custom DSI write macro defined in the driver. Signed-off-by: Javier Martinez Canillas Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20230107191822.3787147-7-javierm@redhat.com commit 0676f2401dcc9a50b1ea1894e91f76e0cd8fa7de Author: Javier Martinez Canillas Date: Sat Jan 7 20:18:14 2023 +0100 drm/panel-boe-bf060y8m-aj0: Drop custom DSI write macro There is a macro for this already in the header, use that instead and delete the custom DSI write macro defined in the driver. Signed-off-by: Javier Martinez Canillas Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20230107191822.3787147-6-javierm@redhat.com commit 187b4bd4580b07d2fd088f415c44230d3dbb11fe Author: Javier Martinez Canillas Date: Sat Jan 7 20:18:13 2023 +0100 drm/panel-elida-kd35t133: Drop custom DSI write macro There is a macro for this already in the header, use that instead and delete the custom DSI write macro defined in the driver. Signed-off-by: Javier Martinez Canillas Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20230107191822.3787147-5-javierm@redhat.com commit 6497ca7069b388e9d2f16640e864dca4d628005a Author: Javier Martinez Canillas Date: Sat Jan 7 20:18:12 2023 +0100 drm/panel-leadtek-ltk050h3146w: Drop custom DSI write macro There is a macro for this already in the header, use that instead and delete the custom DSI write macro defined in the driver. Signed-off-by: Javier Martinez Canillas Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20230107191822.3787147-4-javierm@redhat.com commit 8f821edcb3aa4274a6647ee2c67468b76c9ef6ec Author: Javier Martinez Canillas Date: Sat Jan 7 20:18:11 2023 +0100 drm/panel-sitronix-st7703: Drop custom DSI write macros There are macros for these already in the header, use that instead and delete the custom DSI write macros defined in the driver. Signed-off-by: Javier Martinez Canillas Reviewed-by: Sam Ravnborg Reviewed-by: Guido Günther Link: https://patchwork.freedesktop.org/patch/msgid/20230107191822.3787147-3-javierm@redhat.com commit 65815d1fdc7d506ab86b6310725b928b4e2c6286 Author: Javier Martinez Canillas Date: Sat Jan 7 20:18:10 2023 +0100 drm/panel-asus-z00t-tm5p5-n35596: Drop custom DSI write macros There are macros for these already in the header, use that instead and delete the custom DSI write macros defined in the driver. Signed-off-by: Javier Martinez Canillas Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20230107191822.3787147-2-javierm@redhat.com commit d46aa786fa53cbc92593089374e49c94fd9063ae Author: Keith Busch Date: Thu Jan 5 11:07:34 2023 -0800 block: use iter_ubuf for single range This is more efficient than iter_iov. Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig [axboe: fold in iovec assumption fix] Signed-off-by: Jens Axboe commit c79f81631142ee2dc4c743732427f23d18cd2dec Author: Ard Biesheuvel Date: Thu Dec 22 18:52:23 2022 +0100 ARM: 9283/1: permit non-nested kernel mode NEON in softirq context We currently only permit kernel mode NEON in process context, to avoid the need to preserve/restore the NEON register file when taking an exception while running in the kernel. Like we did on arm64, we can relax this restriction substantially, by permitting kernel mode NEON from softirq context, while ensuring that softirq processing is disabled when the NEON is being used in task context. This guarantees that only NEON context belonging to user space needs to be preserved and restored, which is already taken care of. This is especially relevant for network encryption, where incoming frames are typically handled in softirq context, and deferring software decryption to a kernel thread or falling back to C code are both undesirable from a performance PoV. Tested-by: Martin Willi Reviewed-by: Linus Walleij Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King (Oracle) commit 62b95a7b44d1a30b3a967f5107ce2b4341531426 Author: Ard Biesheuvel Date: Thu Dec 22 18:49:51 2022 +0100 ARM: 9282/1: vfp: Manipulate task VFP state with softirqs disabled In a subsequent patch, we will relax the kernel mode NEON policy, and permit kernel mode NEON to be used not only from task context, as is permitted today, but also from softirq context. Given that softirqs may trigger over the back of any IRQ unless they are explicitly disabled, we need to address the resulting races in the VFP state handling, by disabling softirq processing in two distinct but related cases: - kernel mode NEON will leave the FPU disabled after it completes, so any kernel code sequence that enables the FPU and subsequently accesses its registers needs to disable softirqs until it completes; - kernel_neon_begin() will preserve the userland VFP state in memory, and if it interrupts the ordinary VFP state preserve sequence, the latter will resume execution with the VFP registers corrupted, and happily continue saving them to memory. Given that disabling softirqs also disables preemption, we can replace the existing preempt_disable/enable occurrences in the VFP state handling asm code with new macros that dis/enable softirqs instead. In the VFP state handling C code, add local_bh_disable/enable() calls in those places where the VFP state is preserved. One thing to keep in mind is that, once we allow NEON use in softirq context, the result of any such interruption is that the FPEXC_EN bit in the FPEXC register will be cleared, and vfp_current_hw_state[cpu] will be NULL. This means that any sequence that [conditionally] clears FPEXC_EN and/or sets vfp_current_hw_state[cpu] to NULL does not need to run with softirqs disabled, as the result will be the same. Furthermore, the handling of THREAD_NOTIFY_SWITCH is guaranteed to run with IRQs disabled, and so it does not need protection from softirq interruptions either. Tested-by: Martin Willi Reviewed-by: Linus Walleij Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King (Oracle) commit 368ccecd4e4a0ed8180ad76764fd6e6d516e151c Author: Sebastian Reichel Date: Thu Dec 15 15:19:14 2022 +0100 ARM: 9281/1: improve Cortex A8/A9 errata help text Document that !ARCH_MULTIPLATFORM is necessary because accessing the the errata workaround registers may not work in non-secure mode and mention that these erratas should be applied by the bootloader instead. Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Arnd Bergmann Signed-off-by: Sebastian Reichel Signed-off-by: Russell King (Oracle) commit f66804bf7665f9d2db04791496ba2c7f4173941c Author: Geert Uytterhoeven Date: Wed Jan 11 09:19:53 2023 +0100 dt-bindings: trivial-devices: Remove trailing whitespace Remove trailing whitespace that hurts my eyes. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/7c1b2700f3727e94600f5f7e10beef16f8dc64ed.1673425053.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit b6e98cf4ed3baff0c2f7a1c1babf96fde8e129f3 Author: Jai Luthra Date: Fri Dec 30 18:56:44 2022 +0530 ASoC: tlv320aic3x: Add optional clock and port properties Describe optional properties for clocks and ports that were missing in the original txt binding, to fix warnings like: aic33@18: 'assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' do not match any of the regexes: 'pinctrl-[0-9]+' arch/arm/boot/dts/omap2420-n810.dtb tlv320aic3106@1b: 'port' does not match any of the regexes: 'pinctrl-[0-9]+' arch/arm/boot/dts/am335x-sl50.dtb codec@18: 'clocks' does not match any of the regexes: 'pinctrl-[0-9]+' arch/arm/boot/dts/imx6dl-gw5903.dtb arch/arm/boot/dts/imx6q-gw5903.dtb Some uses of "port" still lead to warnings because they pass clocks in the endpoint, but that is discouraged: https://lore.kernel.org/all/20210205152644.GA3083322@robh.at.kernel.org/ Signed-off-by: Jai Luthra Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221230132644.6398-1-j-luthra@ti.com Signed-off-by: Mark Brown commit 7bbb89b420d9e290cb34864832de8fcdf2c140dc Author: Greg Kroah-Hartman Date: Wed Jan 11 10:33:27 2023 +0100 driver core: change to_subsys_private() to use container_of_const() The macro to_subsys_private() needs to switch to using container_of_const() as it turned out to being incorrectly casting a const pointer to a non-const one. Make this change and fix up the one offending user to be correctly handling a const pointer properly. Cc: "Rafael J. Wysocki" Reviewed-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20230111093327.3955063-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 3bb2a01caa813d3a1845d378bbe4169ef280d394 Author: Wang Hai Date: Tue Dec 20 09:21:43 2022 +0800 kobject: Fix slab-out-of-bounds in fill_kobj_path() In kobject_get_path(), if kobj->name is changed between calls get_kobj_path_length() and fill_kobj_path() and the length becomes longer, then fill_kobj_path() will have an out-of-bounds bug. The actual current problem occurs when the ixgbe probe. In ixgbe_mii_bus_init(), if the length of netdev->dev.kobj.name length becomes longer, out-of-bounds will occur. cpu0 cpu1 ixgbe_probe register_netdev(netdev) netdev_register_kobject device_add kobject_uevent // Sending ADD events systemd-udevd // rename netdev dev_change_name device_rename kobject_rename ixgbe_mii_bus_init | mdiobus_register | __mdiobus_register | device_register | device_add | kobject_uevent | kobject_get_path | len = get_kobj_path_length // old name | path = kzalloc(len, gfp_mask); | kobj->name = name; /* name length becomes * longer */ fill_kobj_path /* kobj path length is * longer than path, * resulting in out of * bounds when filling path */ This is the kasan report: ================================================================== BUG: KASAN: slab-out-of-bounds in fill_kobj_path+0x50/0xc0 Write of size 7 at addr ff1100090573d1fd by task kworker/28:1/673 Workqueue: events work_for_cpu_fn Call Trace: dump_stack_lvl+0x34/0x48 print_address_description.constprop.0+0x86/0x1e7 print_report+0x36/0x4f kasan_report+0xad/0x130 kasan_check_range+0x35/0x1c0 memcpy+0x39/0x60 fill_kobj_path+0x50/0xc0 kobject_get_path+0x5a/0xc0 kobject_uevent_env+0x140/0x460 device_add+0x5c7/0x910 __mdiobus_register+0x14e/0x490 ixgbe_probe.cold+0x441/0x574 [ixgbe] local_pci_probe+0x78/0xc0 work_for_cpu_fn+0x26/0x40 process_one_work+0x3b6/0x6a0 worker_thread+0x368/0x520 kthread+0x165/0x1a0 ret_from_fork+0x1f/0x30 This reproducer triggers that bug: while: do rmmod ixgbe sleep 0.5 modprobe ixgbe sleep 0.5 When calling fill_kobj_path() to fill path, if the name length of kobj becomes longer, return failure and retry. This fixes the problem. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Wang Hai Link: https://lore.kernel.org/r/20221220012143.52141-1-wanghai38@huawei.com Signed-off-by: Greg Kroah-Hartman commit 504fa212d7030fb1c042290dc2eb92b21515573a Author: Javier Martinez Canillas Date: Wed Dec 28 00:21:52 2022 +0100 driver core: Make driver_deferred_probe_timeout a static variable It is not used outside of its compilation unit, so there's no need to export this variable. Signed-off-by: Javier Martinez Canillas Reviewed-by: Andrew Halaney Acked-by: John Stultz Link: https://lore.kernel.org/r/20221227232152.3094584-1-javierm@redhat.com Signed-off-by: Greg Kroah-Hartman commit f6837f34a34973ef6600c08195ed300e24e97317 Author: Yang Yingliang Date: Mon Dec 5 11:49:04 2022 +0800 driver core: fix potential null-ptr-deref in device_add() I got the following null-ptr-deref report while doing fault injection test: BUG: kernel NULL pointer dereference, address: 0000000000000058 CPU: 2 PID: 278 Comm: 37-i2c-ds2482 Tainted: G B W N 6.1.0-rc3+ RIP: 0010:klist_put+0x2d/0xd0 Call Trace: klist_remove+0xf1/0x1c0 device_release_driver_internal+0x196/0x210 bus_remove_device+0x1bd/0x240 device_add+0xd3d/0x1100 w1_add_master_device+0x476/0x490 [wire] ds2482_probe+0x303/0x3e0 [ds2482] This is how it happened: w1_alloc_dev() // The dev->driver is set to w1_master_driver. memcpy(&dev->dev, device, sizeof(struct device)); device_add() bus_add_device() dpm_sysfs_add() // It fails, calls bus_remove_device. // error path bus_remove_device() // The dev->driver is not null, but driver is not bound. __device_release_driver() klist_remove(&dev->p->knode_driver) <-- It causes null-ptr-deref. // normal path bus_probe_device() // It's not called yet. device_bind_driver() If dev->driver is set, in the error path after calling bus_add_device() in device_add(), bus_remove_device() is called, then the device will be detached from driver. But device_bind_driver() is not called yet, so it causes null-ptr-deref while access the 'knode_driver'. To fix this, set dev->driver to null in the error path before calling bus_remove_device(). Fixes: 57eee3d23e88 ("Driver core: Call device_pm_add() after bus_add_device() in device_add()") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221205034904.2077765-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit b0975c47c2178e35038b12ad63f17c64bb522684 Author: John Ogness Date: Mon Jan 9 11:14:00 2023 +0106 printk: adjust string limit macros The various internal size limit macros have names and/or values that do not fit well to their current usage. Rename the macros so that their purpose is clear and, if needed, provide a more appropriate value. In general, the new macros and values will lead to less memory usage. The new macros are... PRINTK_MESSAGE_MAX: This is the maximum size for a formatted message on a console, devkmsg, or syslog. It does not matter which format the message has (normal or extended). It replaces the use of CONSOLE_EXT_LOG_MAX for console and devkmsg. It replaces the use of CONSOLE_LOG_MAX for syslog. Historically, normal messages have been allowed to print up to 1kB, whereas extended messages have been allowed to print up to 8kB. However, the difference in lengths of these message types is not significant and in multi-line records, normal messages are probably larger. Also, because 1kB is only slightly above the allowed record size, multi-line normal messages could be easily truncated during formatting. This new macro should be significantly larger than the allowed record size to allow sufficient space for extended or multi-line prefix text. A value of 2kB should be plenty of space. For normal messages this represents a doubling of the historically allowed amount. For extended messages it reduces the excessive 8kB size, thus reducing memory usage needed for message formatting. PRINTK_PREFIX_MAX: This is the maximum size allowed for a record prefix (used by console and syslog). It replaces PREFIX_MAX. The value is left unchanged. PRINTKRB_RECORD_MAX: This is the maximum size allowed to be reserved for a record in the ringbuffer. It is used by all readers and writers with the printk ringbuffer. It replaces LOG_LINE_MAX. Previously this was set to "1kB - PREFIX_MAX", which makes some sense if 1kB is the limit for normal message output and prefixes are enabled. However, with the allowance of larger output and the existence of multi-line records, the value is rather bizarre. Round the value up to 1kB. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20230109100800.1085541-9-john.ogness@linutronix.de commit ea308da1198f8ca9de6e4ff7f22120e27d4e6338 Author: John Ogness Date: Mon Jan 9 11:13:59 2023 +0106 printk: use printk_buffers for devkmsg Replace the buffers in struct devkmsg_user with a struct printk_buffers. This reduces the number of buffers to keep track of. As a side-effect, @text_buf was 8kB large, even though it only needed to be the max size of a ringbuffer record. By switching to struct printk_buffers, ~7kB less memory is allocated when opening /dev/kmsg. And since struct printk_buffers will be used now, reduce duplicate code by calling printk_get_next_message() to handle the record reading and formatting. Note that since /dev/kmsg never suppresses records based on loglevel, printk_get_next_message() is extended with an extra bool argument to specify if suppression is allowed. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20230109100800.1085541-8-john.ogness@linutronix.de commit c4fcc617e148791fc45fd33b124301cb596bcbf6 Author: John Ogness Date: Mon Jan 9 11:13:58 2023 +0106 printk: introduce console_prepend_dropped() for dropped messages Currently "dropped messages" are separately printed immediately before printing the printk message. Since normal consoles are now using an output buffer that is much larger than previously, the "dropped message" could be prepended to the printk message and then output everything in a single write() call. Introduce a helper function console_prepend_dropped() to prepend an existing message with a "dropped message". This simplifies the code by allowing all message formatting to be handled together and then only requires a single write() call to output the full message. And since this helper does not require any locking, it can be used in the future for other console printing contexts as well. Note that console_prepend_dropped() is defined as a NOP for !CONFIG_PRINTK. Although the function will never be called for !CONFIG_PRINTK, compiling the function can lead to warnings of "always true" conditionals due to the size macro values used in !CONFIG_PRINTK. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20230109100800.1085541-7-john.ogness@linutronix.de commit 2830eec14afd18c7af333b5222f47a1244adea11 Author: John Ogness Date: Mon Jan 9 11:13:57 2023 +0106 printk: introduce printk_get_next_message() and printk_message Code for performing the console output is intermixed with code that is formatting the output for that console. Introduce a new helper function printk_get_next_message() to handle the reading and formatting of the printk text. The helper does not require any locking so that in the future it can be used for other printing contexts as well. This also introduces a new struct printk_message to wrap the struct printk_buffers, adding metadata about its contents. This allows users of printk_get_next_message() to receive all relevant information about the message that was read and formatted. Why is struct printk_message a wrapper struct? It is intentional that a wrapper struct is introduced instead of adding the metadata directly to struct printk_buffers. The upcoming atomic consoles support multiple printing contexts per CPU. This means that while a CPU is formatting a message, it can be interrupted and the interrupting context may also format a (possibly different) message. Since the printk buffers are rather large, there will only be one struct printk_buffers per CPU and it must be shared by the possible contexts of that CPU. If the metadata was part of struct printk_buffers, interrupting contexts would clobber the metadata being prepared by the interrupted context. This could be handled by robustifying the message formatting functions to cope with metadata unexpectedly changing. However, this would require significant amounts of extra data copying, also adding significant complexity to the code. Instead, the metadata can live on the stack of the formatting context and the message formatting functions do not need to be concerned about the metadata changing underneath them. Note that the message formatting functions can handle unexpected text buffer changes. So it is perfectly OK if a shared text buffer is clobbered by an interrupting context. The atomic console implementation will recognize the interruption and avoid printing the (probably garbage) text buffer. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20230109100800.1085541-6-john.ogness@linutronix.de commit daaab5b5bba36a5aef790230b610556b9bbd9cfc Author: John Ogness Date: Mon Jan 9 11:13:56 2023 +0106 printk: introduce struct printk_buffers Introduce a new struct printk_buffers to contain all the buffers needed to read and format a printk message for output. Putting the buffers inside a struct reduces the number of buffer pointers that need to be tracked. Also, it allows usage of the sizeof() macro for the buffer sizes, rather than expecting certain sized buffers being passed in. Note that since the output buffer for normal consoles is now CONSOLE_EXT_LOG_MAX instead of CONSOLE_LOG_MAX, multi-line messages that may have been previously truncated will now be printed in full. This should be considered a feature and not a bug since the CONSOLE_LOG_MAX restriction was about limiting static buffer usage rather than limiting printed text. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20230109100800.1085541-5-john.ogness@linutronix.de commit 02b2396d7d0cf806e80c887b4c799d482d6977ed Author: Thomas Gleixner Date: Mon Jan 9 11:13:55 2023 +0106 console: Document struct console Add kerneldoc comments to struct console. Signed-off-by: Thomas Gleixner Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20230109100800.1085541-4-john.ogness@linutronix.de commit 717a5651b10940ec827fe07acfb956d906250b2b Author: Thomas Gleixner Date: Mon Jan 9 11:13:54 2023 +0106 console: Use BIT() macros for @flags values Rather than manually calculating powers of 2, use the BIT() macros. Also take this opportunatity to cleanup and restructure the value comments into proper kerneldoc comments. Signed-off-by: Thomas Gleixner Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20230109100800.1085541-3-john.ogness@linutronix.de commit 2364b406824f1f42026d87c1e26d4dd1ca0f65af Author: John Ogness Date: Mon Jan 9 11:13:53 2023 +0106 printk: move size limit macros into internal.h The size limit macros are located further down in printk.c and behind ifdef conditionals. This complicates their usage for upcoming changes. Move the macros into internal.h so that they are still invisible outside of printk, but easily accessible for printk. Also, the maximum size of formatted extended messages does not need to be known by any code outside of printk, so move it to internal.h as well. And like CONSOLE_LOG_MAX, for !CONFIG_PRINTK set CONSOLE_EXT_LOG_MAX to 0 to reduce the static memory footprint. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20230109100800.1085541-2-john.ogness@linutronix.de commit c65454a947263dfdf482076388aaed60af84ca2f Author: Jeff Layton Date: Fri Nov 25 08:48:37 2022 -0500 fs: remove locks_inode locks_inode was turned into a wrapper around file_inode in de2a4a501e71 (Partially revert "locks: fix file locking on overlayfs"). Finish replacing locks_inode invocations everywhere with file_inode. Acked-by: Miklos Szeredi Acked-by: Al Viro Reviewed-by: David Howells Signed-off-by: Jeff Layton commit 5970e15dbcfeb0ed3a0bf1954f35bbe60a048754 Author: Jeff Layton Date: Sun Nov 20 09:15:34 2022 -0500 filelock: move file locking definitions to separate header file The file locking definitions have lived in fs.h since the dawn of time, but they are only used by a small subset of the source files that include it. Move the file locking definitions to a new header file, and add the appropriate #include directives to the source files that need them. By doing this we trim down fs.h a bit and limit the amount of rebuilding that has to be done when we make changes to the file locking APIs. Reviewed-by: Xiubo Li Reviewed-by: Christian Brauner (Microsoft) Reviewed-by: Christoph Hellwig Reviewed-by: David Howells Reviewed-by: Russell King (Oracle) Acked-by: Chuck Lever Acked-by: Joseph Qi Acked-by: Steve French Acked-by: Al Viro Acked-by: Darrick J. Wong Signed-off-by: Jeff Layton commit 50c66d7b049ddec095644a005bfe0b28e22c4b02 Author: Yuntao Wang Date: Wed Jun 1 20:29:14 2022 +0800 x86/setup: Move duplicate boot_cpu_data definition out of the ifdeffery Both the if and else blocks define an exact same boot_cpu_data variable, move the duplicate variable definition out of the if/else block. In addition, do some other minor cleanups. [ bp: Massage. ] Signed-off-by: Yuntao Wang Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20220601122914.820890-1-ytcoode@gmail.com commit b7d1f15b5c274999dfe8dda60a9a516eebfbc3d0 Author: Wang Yong Date: Sun Dec 11 10:38:49 2022 +0000 x86/boot/e820: Fix typo in e820.c comment change "itsmain" to "its main". Fixes: 544a0f47e780 ("x86/boot/e820: Rename e820_table_saved to e820_table_firmware and improve the description") Signed-off-by: Wang Yong Signed-off-by: Ingo Molnar Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20221211103849.173870-1-yongw.kernel@gmail.com commit 31a47014902d7fe1da9028336b6f189648ec28ac Author: Chris Morgan Date: Mon Nov 28 17:15:28 2022 -0600 arm64: dts: rockchip: add Hynitron cst340 for Anbernic 353 series Add support for the Hynitron cst340 touchscreen driver to the Anbernic RG353P and RG353V devices. Note the RG353VS device does not have a touchscreen. https://lore.kernel.org/linux-input/Y1y9e9sgE%2FDck9fB@google.com/ Changes since V1: - Removed 'status = "okay";', as it was never disabled. Signed-off-by: Chris Morgan Link: https://lore.kernel.org/r/20221128231528.23360-1-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner commit 3eb403e4014e2db8b00acb147c0bf0abb2df15e2 Author: Andy Yan Date: Thu Dec 29 19:51:11 2022 +0800 arm64: dts: rockchip: Enable wifi module AP6398s for rk3566 box demo There is a AP6398s wifi/bt module on this board. Fix the sdmmc1 dt node to make wifi work. Signed-off-by: Andy Yan Link: https://lore.kernel.org/r/20221229115111.3899793-1-andyshrk@163.com Signed-off-by: Heiko Stuebner commit 954f5510b5a516a9d8634da22b0dce333758202d Author: Jagan Teki Date: Tue Jan 10 19:16:56 2023 +0530 dt-bindings: arm: rockchip: Add Edgeble Neural Compute Module 6 Neural Compute Module 6(Neu6) is a 96boards SoM-CB compute module based on Rockchip RK3588 from Edgeble AI. Edgeble Neural Compute Module 6(Neu6) IO board is an industrial form factor evaluation board from Edgeble AI. Neu6 needs to mount on top of this IO board in order to create complete Edgeble Neural Compute Module 6(Neu6) IO platform. This patch add dt-bindings for Edgeble Neu6 Model A SoM based IO board. Signed-off-by: Jagan Teki Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230110134658.820691-1-jagan@edgeble.ai Signed-off-by: Heiko Stuebner commit a5079a534554f67b9189359dc9cc0042a427cd7e Author: Jagan Teki Date: Tue Jan 10 19:16:58 2023 +0530 arm64: dts: rockchip: rk3588: Add Edgeble Neu6 Model A IO Neural Compute Module 6(Neu6) IO board is an industrial form factor ready-to-use IO board from Edgeble AI. IO board offers plenty of peripherals and connectivity options and this patch enables basic eMMC and UART which is enough to successfully boot Linux. Neu6 needs to mount on top of this IO board in order to create a complete Edgeble Neural Compute Module 6(Neu6) IO platform. Add support for Edgeble Neu6 Model A IO Board. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20230110134658.820691-3-jagan@edgeble.ai Signed-off-by: Heiko Stuebner commit 3d9a2f7e7c5e55f59748b10cb1d0b5c145cf4a39 Author: Jagan Teki Date: Tue Jan 10 19:16:57 2023 +0530 arm64: dts: rockchip: rk3588: Add Edgeble Neu6 Model A SoM Neural Compute Module 6(Neu2) is a 96boards SoM-CB compute module based on Rockchip RK3588 from Edgeble AI. General features: - Rockchip RK3588 - up to 32GB LPDDR4x - up to 128GB eMMC - 2x MIPI CSI2 FPC On module WiFi6/BT5 is available in the following Neu6 variants. Neu6 needs to mount on top of associated Edgeble IO boards for creating complete platform solutions. Enable eMMC for now to boot Linux successfully. Add support for Edgeble Neu6 Model A SoM. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20230110134658.820691-2-jagan@edgeble.ai Signed-off-by: Heiko Stuebner commit 906e822c0cac24f1b20d1377eb1203963f7af97e Author: Jonas Karlman Date: Tue Jan 10 22:55:59 2023 +0000 arm64: dts: rockchip: fix hdmi cec on rock-3a HDMI CEC is configured to select HDMITX_CEC_M0 function of GPIO0_C7 by default in rk356x.dtsi. On Radxa ROCK 3 Model A it is routed to HDMITX_CEC_M1 according to board schematic [1]. Fix HDMI CEC by overriding pinctrl in hdmi node to select HDMITX_CEC_M1. [1] https://dl.radxa.com/rock3/docs/hw/3a/ROCK-3A-V1.3-SCH.pdf Signed-off-by: Jonas Karlman Link: https://lore.kernel.org/r/20230110225547.1563119-3-jonas@kwiboo.se [added pinctrl-names duplicate] Signed-off-by: Heiko Stuebner commit 64b69474edf3b885c19a89bb165f978ba1b4be00 Author: Jonas Karlman Date: Tue Jan 10 22:55:50 2023 +0000 arm64: dts: rockchip: assign rate to clk_rtc_32k on rk356x clk_rtc_32k and its child clock clk_hdmi_cec detauls to a rate of 24 MHz and not to 32 kHz on RK356x. Fix this by assigning clk_rtc_32k a rate of 32768, also assign the parent to clk_rtc32k_frac. Signed-off-by: Jonas Karlman Link: https://lore.kernel.org/r/20230110225547.1563119-2-jonas@kwiboo.se Signed-off-by: Heiko Stuebner commit 6fb13f888f2a6155fe4c19d14721e8909eda9b52 Author: Christopher Obbard Date: Tue Jan 10 19:53:52 2023 +0000 arm64: dts: rockchip: Update sdhci alias for rock-5b In the previous version, the sdhci alias was set to mmc1: an artifact leftover from the port from vendor kernel. Update the alias to mmc0 to match the device's boot order. Fixes: 6fb2d1549786 ("arm64: dts: rockchip: Add rock-5b board") Signed-off-by: Christopher Obbard Link: https://lore.kernel.org/r/20230110195352.272360-4-chris.obbard@collabora.com Signed-off-by: Heiko Stuebner commit 304c8a759953fb4a6cd399cf78f87501d7fd8bbc Author: Christopher Obbard Date: Tue Jan 10 19:53:51 2023 +0000 arm64: dts: rockchip: Remove empty line from rock-5a There is a line which is empty. Remove it. Fixes: a4a8f1afb360 ("arm64: dts: rockchip: Add rock-5a board") Signed-off-by: Christopher Obbard Link: https://lore.kernel.org/r/20230110195352.272360-3-chris.obbard@collabora.com Signed-off-by: Heiko Stuebner commit 991f136c9f8de181b25cef056ab5fe7f49413919 Author: Christopher Obbard Date: Tue Jan 10 19:53:50 2023 +0000 arm64: dts: rockchip: Update sdhci alias for rock-5a In the previous version, the sdhci alias was set to mmc1: an artifact leftover from the port from vendor kernel. Update the alias to mmc0 to match the device's boot order. Fixes: a4a8f1afb360 ("arm64: dts: rockchip: Add rock-5a board") Signed-off-by: Christopher Obbard Link: https://lore.kernel.org/r/20230110195352.272360-2-chris.obbard@collabora.com Signed-off-by: Heiko Stuebner commit cd9f5c3d3096e26fa128ae747f66383002001398 Author: Ingo Molnar Date: Wed Jan 11 10:25:34 2023 +0100 sched/cputime: Fix IA64 build error of missing arch_vtime_task_switch() prototype The following commit: c89970202a11 ("cputime: remove cputime_to_nsecs fallback") Removed an inclusion from , but this broke the IA64 build: arch/ia64/kernel/time.c:110:6: warning: no previous prototype for 'arch_vtime_task_switch' [-Wmissing-prototypes] Add in the missing header to fix it. Fixes: c89970202a11 ("cputime: remove cputime_to_nsecs fallback") Reported-by: kernel test robot Signed-off-by: Ingo Molnar Cc: linux-kernel@vger.kernel.org Cc: Nicholas Piggin Cc: Peter Zijlstra (Intel) Cc: Alexander Gordeev Signed-off-by: Ingo Molnar commit f7a79bdc4e672092f111efc917668706c93b535f Author: Gustavo A. R. Silva Date: Tue Jan 10 10:44:53 2023 -0600 drm/i915/guc: Replace zero-length arrays with flexible-array members Zero-length arrays are deprecated[1] and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length arrays in a couple of structures (three, actually) with flex-array members. 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 [2]. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays [1] Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [2] Link: https://github.com/KSPP/linux/issues/78 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/Y72WBTUmh9r1lvKN@work commit 3e95263dfb52d5e5b60fbdda51094c788c446f07 Author: Tvrtko Ursulin Date: Tue Jan 10 11:35:33 2023 +0000 drm/i915: Do not cover all future platforms in TLB invalidation Revert to the original explicit approach and document the reasoning behind it. v2: * DG2 needs to be covered too. (Matt) v3: * Full version check for Gen12 to avoid catching all future platforms. (Matt) v4: * Be totally explicit on the Gen12 branch. (Andrzej) Signed-off-by: Tvrtko Ursulin Cc: Matt Roper Cc: Balasubramani Vivekanandan Cc: Andrzej Hajda Reviewed-by: Andrzej Hajda # v1 Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20230110113533.744436-1-tvrtko.ursulin@linux.intel.com commit 60d86034b14eed902b3f2bea97d0c237cf2f9499 Merge: 76c3a449782b3 96c31b5b2caec Author: David S. Miller Date: Wed Jan 11 08:38:01 2023 +0000 Merge tag 'mlx5-updates-2023-01-10' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux mlx5-updates-2023-01-10 1) From Gal: Add debugfs entries for netdev nic driver - ktls, flow steering and hairpin info - useful for debug and performance analysis - e.g hairpin queue attributes, dump ktls tx pool size, etc 2) From Maher: Update shared buffer configuration on PFC commands 2.1) For every change of buffer's headroom, recalculate the size of shared buffer to be equal to "total_buffer_size" - "new_headroom_size". The new shared buffer size will be split in ratio of 3:1 between lossy and lossless pools, respectively. 2.2) For each port buffer change, count the number of lossless buffers. If there is only one lossless buffer, then set its lossless pool usage threshold to be infinite. Otherwise, if there is more than one lossless buffer, set a usage threshold for each lossless buffer. While at it, add more verbosity to debug prints when handling user commands, to assist in future debug. 3) From Tariq: Throttle high rate FW commands 4) From Shay: Properly initialize management PF 5) Various cleanup patches commit 76c3a449782b34929102628d07c07a3bc5f63ab4 Merge: a6f536063b691 b53e7e8d85574 Author: David S. Miller Date: Wed Jan 11 08:35:03 2023 +0000 Merge branch 'NCN26000-PLCA-RS-support' Piergiorgio Beruto says: ==================== net: add PLCA RS support and onsemi NCN26000 This patchset adds support for getting/setting the Physical Layer Collision Avoidace (PLCA) Reconciliation Sublayer (RS) configuration and status on Ethernet PHYs that supports it. PLCA is a feature that provides improved media-access performance in terms of throughput, latency and fairness for multi-drop (P2MP) half-duplex PHYs. PLCA is defined in Clause 148 of the IEEE802.3 specifications as amended by 802.3cg-2019. Currently, PLCA is supported by the 10BASE-T1S single-pair Ethernet PHY defined in the same standard and related amendments. The OPEN Alliance SIG TC14 defines additional specifications for the 10BASE-T1S PHY, including a standard register map for PHYs that embeds the PLCA RS (see PLCA management registers at https://www.opensig.org/about/specifications/). The changes proposed herein add the appropriate ethtool netlink interface for configuring the PLCA RS on PHYs that supports it. A separate patchset further modifies the ethtool userspace program to show and modify the configuration/status of the PLCA RS. Additionally, this patchset adds support for the onsemi NCN26000 Industrial Ethernet 10BASE-T1S PHY that uses the newly added PLCA infrastructure. ==================== Signed-off-by: David S. Miller commit b53e7e8d85574b8e2c4be00d5331e215037d80a0 Author: Piergiorgio Beruto Date: Mon Jan 9 18:00:38 2023 +0100 drivers/net/phy: add driver for the onsemi NCN26000 10BASE-T1S PHY This patch adds support for the onsemi NCN26000 10BASE-T1S industrial Ethernet PHY. The driver supports Point-to-Multipoint operation without auto-negotiation and with link control handling. The PHY also features PLCA for improving performance in P2MP mode. Signed-off-by: Piergiorgio Beruto Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 493323416fed6b1ec6128a65c00e5f01d38b7e17 Author: Piergiorgio Beruto Date: Mon Jan 9 18:00:23 2023 +0100 drivers/net/phy: add helpers to get/set PLCA configuration This patch adds support in phylib to read/write PLCA configuration for Ethernet PHYs that support the OPEN Alliance "10BASE-T1S PLCA Management Registers" specifications. These can be found at https://www.opensig.org/about/specifications/ Signed-off-by: Piergiorgio Beruto Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit a23a1e57a6770a8fad1c6362dfe73bd9f27e430c Author: Piergiorgio Beruto Date: Mon Jan 9 18:00:10 2023 +0100 drivers/net/phy: add connection between ethtool and phylib for PLCA This patch adds the required connection between netlink ethtool and phylib to resolve PLCA get/set config and get status messages. Signed-off-by: Piergiorgio Beruto Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 16178c8ef53dc9734302c4c07633696454579ee3 Author: Piergiorgio Beruto Date: Mon Jan 9 17:59:58 2023 +0100 drivers/net/phy: add the link modes for the 10BASE-T1S Ethernet PHY This patch adds the link modes for the IEEE 802.3cg Clause 147 10BASE-T1S Ethernet PHY. According to the specifications, the 10BASE-T1S supports Point-To-Point Full-Duplex, Point-To-Point Half-Duplex and/or Point-To-Multipoint (AKA Multi-Drop) Half-Duplex operations. Signed-off-by: Piergiorgio Beruto Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 8580e16c28f3f1a1bee87de115157161577334b4 Author: Piergiorgio Beruto Date: Mon Jan 9 17:59:39 2023 +0100 net/ethtool: add netlink interface for the PLCA RS Add support for configuring the PLCA Reconciliation Sublayer on multi-drop PHYs that support IEEE802.3cg-2019 Clause 148 (e.g., 10BASE-T1S). This patch adds the appropriate netlink interface to ethtool. Signed-off-by: Piergiorgio Beruto Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 96c31b5b2caecae2eebb1ed0fba5dc082b2fb740 Author: YueHaibing Date: Thu Nov 10 21:43:19 2022 +0800 net/mlx5e: Use kzalloc() in mlx5e_accel_fs_tcp_create() 'accel_tcp' is allocted by kvzalloc() now, which is a small chunk. Use kzalloc() directly instead of kvzalloc(). Signed-off-by: YueHaibing Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 4238654ce166bb6534379ecc08a2cd5d69055f48 Author: zhang songyi Date: Mon Dec 5 14:24:01 2022 +0800 net/mlx5: remove redundant ret variable Return value from mlx5dr_send_postsend_action() directly instead of taking this in another redundant variable. Signed-off-by: zhang songyi Reviewed-by: Roi Dayan Reviewed-by: Jiri Pirko Signed-off-by: Saeed Mahameed commit 7bd1099c7edee257589c9230568a0cd9e2b463e7 Author: Kees Cook Date: Thu Jan 5 14:36:43 2023 -0800 net/mlx5e: Replace 0-length array with flexible array Zero-length arrays are deprecated[1]. Replace struct mlx5e_rx_wqe_cyc's "data" 0-length array with a flexible array. Detected with GCC 13, using -fstrict-flex-arrays=3: drivers/net/ethernet/mellanox/mlx5/core/en_main.c: In function 'mlx5e_alloc_rq': drivers/net/ethernet/mellanox/mlx5/core/en_main.c:827:42: warning: array subscript f is outside array bounds of 'struct mlx5_wqe_data_seg[0]' [-Warray-bounds=] 827 | wqe->data[f].byte_count = 0; | ~~~~~~~~~^~~ In file included from drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.h:11, from drivers/net/ethernet/mellanox/mlx5/core/eswitch.h:48, from drivers/net/ethernet/mellanox/mlx5/core/en_main.c:42: drivers/net/ethernet/mellanox/mlx5/core/en.h:250:39: note: while referencing 'data' 250 | struct mlx5_wqe_data_seg data[0]; | ^~~~ [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays Cc: Saeed Mahameed Cc: Leon Romanovsky Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: "Gustavo A. R. Silva" Cc: netdev@vger.kernel.org Cc: linux-rdma@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Reviewed-by: Jiri Pirko Signed-off-by: Saeed Mahameed commit 7193b436b56e740800fa5efe2ea0214f01f55bd0 Author: Gustavo A. R. Silva Date: Mon Jan 9 19:39:58 2023 -0600 net/mlx5e: Replace zero-length array with flexible-array member Zero-length arrays are deprecated[1] and we are moving towards adopting C99 flexible-array members instead. So, replace zero-length array declaration in struct mlx5e_flow_meter_aso_obj with flex-array member. 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 [2]. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays [1] Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [2] Link: https://github.com/KSPP/linux/issues/78 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Saeed Mahameed commit 63fbae0a74c3e1df7c20c81e04353ced050d9887 Author: Tariq Toukan Date: Tue Aug 2 14:47:30 2022 +0300 net/mlx5: Prevent high-rate FW commands from populating all slots Certain connection-based device-offload protocols (like TLS) use per-connection HW objects to track the state, maintain the context, and perform the offload properly. Some of these objects are created, modified, and destroyed via FW commands. Under high connection rate, this type of FW commands might continuously populate all slots of the FW command interface and throttle it, while starving other critical control FW commands. Limit these throttle commands to using only up to a portion (half) of the FW command interface slots. FW commands maximal rate is not hit, and the same high rate is still reached when applying this limitation. Signed-off-by: Tariq Toukan Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 7cb5eb937231663d11f7817e366f6f86a142d6d3 Author: Tariq Toukan Date: Thu Jan 5 09:45:24 2023 +0200 net/mlx5: Introduce and use opcode getter in command interface Introduce an opcode getter in the FW command interface, and use it. Initialize the entry's opcode field early in cmd_alloc_ent() and use it when possible. Signed-off-by: Tariq Toukan Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit fe998a3c77b9f989a30a2a01fb00d3729a6d53a4 Author: Shay Drory Date: Wed Jun 29 11:38:21 2022 +0300 net/mlx5: Enable management PF initialization Enable initialization of DPU Management PF, which is a new loopback PF designed for communication with BMC. For now Management PF doesn't support nor require most upper layer protocols so avoid them. Signed-off-by: Shay Drory Reviewed-by: Eran Ben Elisha Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 0e414518d6d881075f0c944b365078b8049fcc2f Author: Gal Pressman Date: Wed Nov 16 14:18:27 2022 +0200 net/mlx5e: Add hairpin debugfs files 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. For debug purposes, introduce debugfs files which: * Expose the number of active hairpins * Dump the hairpin table * Allow control over the number and size of the hairpin queues instead of the hard-coded values. This allows us to get visibility of the feature in order to improve it for next generation hardware. Add debugfs files: fs/tc/hairpin_num_active fs/tc/hairpin_num_queues fs/tc/hairpin_queue_size fs/tc/hairpin_table_dump Note that the new values will only take effect on the next queues creation, it does not affect existing queues. Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 3a3da78dd258cc164ab41ec09cf2feacca423fb4 Author: Gal Pressman Date: Sun Nov 27 14:08:09 2022 +0200 net/mlx5e: Add flow steering debugfs directory Add a debugfs directory for flow steering related information. The directory is currently empty, and will hold the 'tc' subdirectory in a downstream patch. Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 1a8034720f38671c2b6a1142ecb129266a494566 Author: Gal Pressman Date: Wed Nov 23 11:06:20 2022 +0200 net/mlx5e: Add hairpin params structure In preparation for downstream work to expose hairpin queues parameters, introduce a hairpin parameters struct as part of the tc structure. Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 0fedee1ae9efccd424882f929c3905f0790e12ec Author: Tariq Toukan Date: Tue May 3 11:47:54 2022 +0300 net/mlx5e: kTLS, Add debugfs Add TLS debugfs to improve observability by exposing the size of the tls TX pool. To observe the size of the TX pool: $ cat /sys/kernel/debug/mlx5//nic/tls/tx/pool_size Signed-off-by: Tariq Toukan Co-developed-by: Gal Pressman Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed commit 288eca60cc31471670dcd351cc42c03a38e11983 Author: Gal Pressman Date: Wed Aug 3 11:37:33 2022 +0300 net/mlx5e: Add Ethernet driver debugfs Similar to the mlx5_core debugfs, lay the groundwork for mlx5e debugfs files under /sys/kernel/debug/mlx5//nic/.. Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit a440030d8946bfe3fd44b6da685e33ffe0ecd1ff Author: Maher Sanalla Date: Mon Nov 28 19:03:07 2022 +0200 net/mlx5e: Update shared buffer along with device buffer changes Currently, the user can modify device's receive buffer size, modify the mapping between QoS priority groups to buffers and change the buffer state to become lossy/lossless via pfc command. However, the shared receive buffer pool alignments, as a result of such commands, is performed only when the shared buffer is in FW ownership. When a user changes the mapping of priority groups or buffer size, the shared buffer is moved to SW ownership. Therefore, for devices that support shared buffer, handle the shared buffer alignments in accordance to user's desired configurations. Meaning, the following will be performed: 1. For every change of buffer's headroom, recalculate the size of shared buffer to be equal to "total_buffer_size" - "new_headroom_size". The new shared buffer size will be split in ratio of 3:1 between lossy and lossless pools, respectively. 2. For each port buffer change, count the number of lossless buffers. If there is only one lossless buffer, then set its lossless pool usage threshold to be infinite. Otherwise, if there is more than one lossless buffer, set a usage threshold for each lossless buffer. While at it, add more verbosity to debug prints when handling user commands, to assist in future debug. Signed-off-by: Maher Sanalla Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 11f0996d5c6023f4889882c8d088ec76a050d704 Author: Maher Sanalla Date: Mon Nov 28 18:23:40 2022 +0200 net/mlx5e: Add API to query/modify SBPR and SBCM registers To allow users to configure shared receive buffer parameters through dcbnl callbacks, expose an API to query and modify SBPR and SBCM registers, which will be used in the upcoming patch. Signed-off-by: Maher Sanalla Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 8d231dbc3b10155727bcfa9e543d397ad357f14f Author: Maher Sanalla Date: Mon Nov 28 18:00:17 2022 +0200 net/mlx5: Expose shared buffer registers bits and structs Add the shared receive buffer management and configuration registers: 1. SBPR - Shared Buffer Pools Register 2. SBCM - Shared Buffer Class Management Register Signed-off-by: Maher Sanalla Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 4df6e8fbe6e43d79990df73eb156961bbdb3aeed Author: Bjorn Andersson Date: Tue Jan 10 23:04:59 2023 -0600 Revert "dt-bindings: arm: qcom: Add SM6115(P) and Lenovo Tab P11" This reverts commit 92ad27fb925943d62deaaa659931ce85ddec99c8, as this was applied to the wrong branch and causes merge conflicts. commit dc031a547e21e02c879f017a7e2635c9eb309844 Author: Konrad Dybcio Date: Thu Dec 8 21:14:00 2022 +0100 dt-bindings: arm: qcom: Add SM6115(P) and Lenovo Tab P11 Document SM6115P, an APQ version of SM6115. Document Lenovo Tab P11 (J606F) as a SM6115P device. Add SM6115 to the msm-id list of shame. Signed-off-by: Konrad Dybcio Reviewed-by: Bhupesh Sharma Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221208201401.530555-4-konrad.dybcio@linaro.org commit 1de4e112b97c77efb5cbee39db8541e33dd2b0d5 Author: Dmitry Baryshkov Date: Mon Jan 9 06:24:06 2023 +0200 arm64: dts: qcom: msm8996-oneplus-common: drop vdda-supply from DSI PHY 14nm DSI PHY has the only supply, vcca. Drop the extra vdda-supply. Fixes: 5a134c940cd3 ("arm64: dts: qcom: msm8996: add support for oneplus3(t)") Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109042406.312047-1-dmitry.baryshkov@linaro.org commit 538b0ba217bb9734e0d5f0c240b2833d3e83bdfa Merge: 5b8db5b4f756b 45ca30eb9dfe6 Author: Bjorn Andersson Date: Tue Jan 10 22:55:42 2023 -0600 Merge branch '20230109130523.298971-3-konrad.dybcio@linaro.org' into drivers-for-6.3 commit 45ca30eb9dfe622b00ce352cf28ee141d243254b Author: Konrad Dybcio Date: Mon Jan 9 14:05:23 2023 +0100 dt-bindings: firmware: qcom: scm: Separate VMIDs from header to bindings The SCM VMIDs represent predefined mappings that come from the irreplaceable and non-omittable firmware that comes with every Qualcomm SoC (unless you steal engineering samples from the factory) and help clarify otherwise totally magic numbers which we are required to pass to the secure world for some parts of the SoC to work at all (with modem being the prime example). On top of that, with changes to the rmtfs binding, secure VMIDs will become useful to have in device trees for readability. Separate them out and add to include/dt-bindings. Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109130523.298971-3-konrad.dybcio@linaro.org commit e656cd0bcf3d2ba2eceac82b44714bf355428ec4 Author: Loic Poulain Date: Mon Jan 9 14:05:22 2023 +0100 soc: qcom: rmtfs: Optionally map RMTFS to more VMs Some SoCs require that RMTFS is also mapped to the NAV VM. Trying to power on the modem without that results in the whole platform crashing and forces a hard reboot within about 2 seconds. Add support for mapping the region to additional VMs, such as NAV to open a path towards enabling modem on such platforms. Signed-off-by: Loic Poulain [Konrad: reword, make conditional and flexible, add a define for NAV VMID] Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109130523.298971-2-konrad.dybcio@linaro.org commit da0d37e42f93f7bd6351e7ef67a52ea9a272c761 Author: Konrad Dybcio Date: Mon Jan 9 14:05:21 2023 +0100 dt-bindings: reserved-memory: rmtfs: Make qcom,vmid an array Some SoCs mandate that the RMTFS is also assigned to the NAV VM, while others really don't want that. Since it has to be conditional, turn qcom,vmid into an u32 array so that we can handle the NAV case, as well as other similar ones if they pop up in the future. Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109130523.298971-1-konrad.dybcio@linaro.org commit 4ce03bb80faed41e04b7d6f089275d262f4cfc79 Author: Marijn Suijten Date: Tue Jan 10 00:41:32 2023 +0100 arm64: dts: qcom: sdm845-tama: Add volume up and camera GPIO keys Tama has four GPIO-wired keys: two for camera focus and shutter / snapshot, and two more for volume up and down. As per the comment these used to not work because the necessary pin bias was missing, which is now set via pinctrl on pm8998_gpios. The missing bias has also been added to the existing volume down button, which receives a node name and label cleanup at the same time to be more consistent with other DTS and the newly added buttons. Its deprecated gpio-key,wakeup property has also been replaced with wakeup-source. Note that volume up is also available through the usual PON RESIN node, but unlike other platforms only triggers when the power button is held down at the same time making it unsuitable to serve as KEY_VOLUMEUP. Fixes: 30a7f99befc6 ("arm64: dts: qcom: Add support for SONY Xperia XZ2 / XZ2C / XZ3 (Tama platform)") Reviewed-by: Konrad Dybcio Signed-off-by: Marijn Suijten Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109234133.365644-1-marijn.suijten@somainline.org commit 19e509d5ea229244b9205f8671bb75b13738a1f9 Author: Dmitry Baryshkov Date: Tue Jan 10 06:21:26 2023 +0200 arm64: dts: qcom: sdm845: make DP node follow the schema Drop the #clock-cells (probably a leftover from the times before the DP PHY split) Fixes: eaac4e55a6f4 ("arm64: dts: qcom: sdm845: add displayport node") Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230110042126.702147-1-dmitry.baryshkov@linaro.org commit 83fe4b9efb03d8b1f9a724c965f0f76574a840cd Author: Konrad Dybcio Date: Tue Jan 10 15:36:42 2023 +0100 arm64: dts: qcom: msm8998: Use RPM XO Feed GCC and SDHC_2 with the RPM XO instead of the fixed-clock one. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230110143642.986799-1-konrad.dybcio@linaro.org commit ff384ab56f164ef14bcc5f2bd79e995b4dea4bf3 Author: Manivannan Sadhasivam Date: Mon Jan 2 16:28:21 2023 +0530 arm64: dts: qcom: sm8450: Use GIC-ITS for PCIe0 and PCIe1 Both PCIe0 and PCIe1 controllers are capable of signalling the MSIs received from endpoint devices to the CPU using GIC-ITS MSI controller. Add support for it. Currently, BDF (0:0.0) and BDF (1:0.0) are enabled and with the msi-map-mask of 0xff00, all the 32 devices under these two busses can share the same Device ID. The GIC-ITS MSI implementation provides an advantage over internal MSI implementation using Locality-specific Peripheral Interrupts (LPI) that would allow MSIs to be targeted for each CPU core. It should be noted that the MSIs for BDF (1:0.0) only works with Device ID of 0x5980 and 0x5a00. Hence, the IDs are swapped. Signed-off-by: Manivannan Sadhasivam Tested-by: Konrad Dybcio # Xperia 1 IV (WCN6855) Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102105821.28243-4-manivannan.sadhasivam@linaro.org commit 66b14154e278807811d67de9fb0d5cc76638d07b Author: Krzysztof Kozlowski Date: Fri Dec 30 15:01:33 2022 +0100 arm64: dts: qcom: add missing space before { Add missingh whitespace between node name/label and opening {. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221230140133.57885-2-krzysztof.kozlowski@linaro.org commit 720229b8e42c36606d414a093601885a8adf180a Author: Krzysztof Kozlowski Date: Fri Dec 30 15:01:32 2022 +0100 ARM: dts: qcom: add missing space before { Add missing whitespace between node name/label and opening {. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221230140133.57885-1-krzysztof.kozlowski@linaro.org commit d8b4ee9379e4b6df44bbaf6020461514b401b8f6 Author: Konrad Dybcio Date: Fri Dec 30 14:50:42 2022 +0100 arm64: dts: qcom: sm8250: Pad addresses to 8 hex digits Some addresses were 7-hex-digits long. Fix that. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221230135044.287874-1-konrad.dybcio@linaro.org commit e09327d7be354e2fbc9232b1906b993ead872431 Author: Dmitry Baryshkov Date: Wed Dec 28 22:37:25 2022 +0200 clk: qcom: gcc-msm8974: switch from sleep_clk_src to sleep_clk gcc-msm8974 uses the registered sleep_clk_src clock, which is just a 1:1 fixed factor clock register on top of the board's sleep_clk. Switch the driver to use the board sleep_clk directly. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221228203725.3131237-1-dmitry.baryshkov@linaro.org commit ef6868a2d69d18273ebda3b3bc304242532aa76c Author: Dmitry Baryshkov Date: Wed Dec 28 20:52:37 2022 +0200 arm64: dts: qcom: msm8998: get rid of test clock The test clock apparently it's not used by anyone upstream. Remove it. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221228185237.3111988-17-dmitry.baryshkov@linaro.org commit a615df45bda9c4a3fffb415b9223c4fabbd74ee6 Author: Dmitry Baryshkov Date: Wed Dec 28 20:52:36 2022 +0200 clk: qcom: mmcc-msm8998: get rid of test clock The test clock apparently it's not used by anyone upstream. Remove it. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221228185237.3111988-16-dmitry.baryshkov@linaro.org commit 523611f1c11539c52d9e2b241dca32b56135cf25 Author: Dmitry Baryshkov Date: Wed Dec 28 20:52:33 2022 +0200 clk: qcom: gcc-sdx55: get rid of test clock The test clock apparently it's not used by anyone upstream. Remove it. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221228185237.3111988-13-dmitry.baryshkov@linaro.org commit e21f2a9487bfeae8a22ca4894824b03dadf95150 Author: Dmitry Baryshkov Date: Wed Dec 28 20:52:32 2022 +0200 clk: qcom: gcc-sdx55: use ARRAY_SIZE instead of specifying num_parents Use ARRAY_SIZE() instead of manually specifying num_parents. This makes adding/removing entries to/from parent_data/names/hws easy and errorproof. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221228185237.3111988-12-dmitry.baryshkov@linaro.org commit bfa78833faa6d5870f276bbbe51d489fa8edbf4a Author: Dmitry Baryshkov Date: Wed Dec 28 20:52:31 2022 +0200 clk: qcom: gcc-sc7180: get rid of test clock The test clock apparently it's not used by anyone upstream. Remove it. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221228185237.3111988-11-dmitry.baryshkov@linaro.org commit 32bde50fc2d105ce69a889d844b054ef9c193565 Author: Dmitry Baryshkov Date: Wed Dec 28 20:52:30 2022 +0200 clk: qcom: gcc-msm8998: get rid of test clock The test clock apparently it's not used by anyone upstream. Remove it. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221228185237.3111988-10-dmitry.baryshkov@linaro.org commit 62db82f9c8004f1226f5cec8a5441fb89eb984fa Author: Dmitry Baryshkov Date: Wed Dec 28 20:52:29 2022 +0200 clk: qcom: dispcc-qcm2290: get rid of test clock The test clock apparently it's not used by anyone upstream. Remove it. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221228185237.3111988-9-dmitry.baryshkov@linaro.org commit 477c404428ed3680f0dc1153746cb891381337c1 Author: Dmitry Baryshkov Date: Wed Dec 28 20:52:28 2022 +0200 dt-bindings: clock: qcom: gcc-sm8450: drop test clock The test clock apparently it's not used by anyone upstream. Remove it. Signed-off-by: Dmitry Baryshkov Reviewed-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221228185237.3111988-8-dmitry.baryshkov@linaro.org commit ca0844a2b9cfdda560c58a0df2d861a86792d658 Author: Dmitry Baryshkov Date: Wed Dec 28 20:52:27 2022 +0200 dt-bindings: clock: qcom: gcc-sm8350: drop test clock The test clock apparently it's not used by anyone upstream. Remove it. Signed-off-by: Dmitry Baryshkov Reviewed-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221228185237.3111988-7-dmitry.baryshkov@linaro.org commit 9fffb2baae1d600c1bcd9aa7936953cf108dd62f Author: Dmitry Baryshkov Date: Wed Dec 28 20:52:26 2022 +0200 dt-bindings: clock: qcom,mmcc-msm8998: drop core_bi_pll_test_se The test clock apparently it's not used by anyone upstream. Remove it. Signed-off-by: Dmitry Baryshkov Reviewed-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221228185237.3111988-6-dmitry.baryshkov@linaro.org commit 3727ce670b298003375c9a00d388ef02cd08ba08 Author: Dmitry Baryshkov Date: Wed Dec 28 20:52:24 2022 +0200 dt-bindings: clock: qcom,gcc-sdx65: drop core_bi_pll_test_se The test clock apparently it's not used by anyone upstream. Remove it. Signed-off-by: Dmitry Baryshkov Reviewed-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221228185237.3111988-4-dmitry.baryshkov@linaro.org commit 5fe4abe32e328be785768b916fb50a42c85a1947 Author: Dmitry Baryshkov Date: Wed Dec 28 20:52:23 2022 +0200 dt-bindings: clock: qcom,gcc-sdx55: drop core_bi_pll_test_se The test clock apparently it's not used by anyone upstream. Remove it. Signed-off-by: Dmitry Baryshkov Reviewed-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221228185237.3111988-3-dmitry.baryshkov@linaro.org commit fc8b0a52f0dd1749f6b30d2e1b98e27d9ca6a1b4 Author: Dmitry Baryshkov Date: Wed Dec 28 20:52:22 2022 +0200 dt-bindings: clock: qcom,gcc-msm8998: drop core_bi_pll_test_se The test clock apparently it's not used by anyone upstream. Remove it. Signed-off-by: Dmitry Baryshkov Reviewed-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221228185237.3111988-2-dmitry.baryshkov@linaro.org commit e35b4b9e8353df22c2f3dfa01631af79d0f44d59 Author: Krzysztof Kozlowski Date: Wed Dec 28 15:09:17 2022 +0100 clk: gcc-sm8350: drop PLL test clock There is no user of core_bi_pll_test_se test clock so drop it. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221228140917.118861-3-krzysztof.kozlowski@linaro.org commit 412df0f95a528dcafd7b21a711ca5deffca68db9 Author: Krzysztof Kozlowski Date: Wed Dec 28 15:09:16 2022 +0100 clk: gcc-sm8150: drop PLL test clock There is no user of core_bi_pll_test_se test clock so drop it. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221228140917.118861-2-krzysztof.kozlowski@linaro.org commit 3db8732c55c0109ea3a9ff9cadc10871eaba058c Author: Krzysztof Kozlowski Date: Wed Dec 28 15:09:15 2022 +0100 dt-bindings: clock: qcom,gcc-sm8350: drop core_bi_pll_test_se input Drop unused core_bi_pll_test_se clock input to the clock controller. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221228140917.118861-1-krzysztof.kozlowski@linaro.org commit 5eafe69af43d77cb117f27201076ee50f48363f1 Author: Krzysztof Kozlowski Date: Fri Dec 23 14:21:21 2022 +0100 arm64: dts: qcom: sm8450: correct Soundwire wakeup interrupt name The bindings expect second Soundwire interrupt to be "wakeup" (Linux driver takes by index): sm8450-hdk.dtb: soundwire-controller@33b0000: interrupt-names:1: 'wakeup' was expected Fixes: 14341e76dbc7 ("arm64: dts: qcom: sm8450: add Soundwire and LPASS") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221223132121.81130-1-krzysztof.kozlowski@linaro.org commit 3c4af3ab1f68ddceb548094d680bc71806a09aee Author: Krzysztof Kozlowski Date: Fri Dec 23 12:18:35 2022 +0100 dt-bindings: clock: qcom,spmi-clkdiv: convert to DT schema Convert Qualcomm SPMI PMIC clock divider bindings to DT schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221223111835.37610-1-krzysztof.kozlowski@linaro.org commit ceb01bb895716c18c3dc711af978c19e327444e5 Author: Eric Chanudet Date: Mon Dec 19 14:10:01 2022 -0500 arm64: dts: qcom: pm8941-rtc add alarm register A few descriptions including a qcom,pm8941-rtc describe two reg-names for the "rtc" and "alarm" register banks, but only one offset. For consistency with reg-names, add the "alarm" register offset. No functional change is expected from this. Signed-off-by: Eric Chanudet Reviewed-by: Konrad Dybcio Tested-by: Andrew Halaney # sa8540p-ride Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221219191000.2570545-5-echanude@redhat.com commit e1deaa8437c4b6ce5a28e98e66d89de99378e72d Author: Eric Chanudet Date: Mon Dec 19 14:10:00 2022 -0500 arm64: dts: qcom: sa8295p-adp: use sa8540p-pmics Include the dtsi to use a single pmic descriptions. Both sa8295p-adp and sa8540p-adp have the same spmi pmic apparently. Signed-off-by: Eric Chanudet Reviewed-by: Konrad Dybcio Tested-by: Andrew Halaney # sa8540p-ride Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221219191000.2570545-4-echanude@redhat.com commit 650fed7806b7298a274a5f9f604d9ae3e0000687 Author: Eric Chanudet Date: Mon Dec 19 14:09:59 2022 -0500 arm64: dts: qcom: sa8450p-pmics: add rtc node Add the rtc block on the first pmic to enable the rtc for sa8540p-ride. Signed-off-by: Eric Chanudet Reviewed-by: Konrad Dybcio Tested-by: Andrew Halaney # sa8540p-ride Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221219191000.2570545-3-echanude@redhat.com commit 2e1cec6e1b5b525ce1022da0ff6cd2b47532da9a Author: Eric Chanudet Date: Mon Dec 19 14:09:58 2022 -0500 arm64: dts: qcom: rename pm8450a dtsi to sa8540p-pmics pm8450a.dtsi was introduced for the descriptions of pmics used on sa8540p based boards. Rename the dtsi to make this relationship explicit. Signed-off-by: Eric Chanudet Reviewed-by: Konrad Dybcio Tested-by: Andrew Halaney # sa8540p-ride Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221219191000.2570545-2-echanude@redhat.com commit 8503babc3d2abe5170ac987696d5ec5e90ba53a4 Author: Konrad Dybcio Date: Mon Dec 19 17:26:18 2022 +0100 arm64: dts: qcom: sm8350: Drop standalone smem node SM8350 is one of the last SoCs whose DTSI escaped the smem node conversion. Use the newer memory-node binding instead of a memory *and* smem node. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221219162618.873117-1-konrad.dybcio@linaro.org commit 7438bb31ba570c9f43eae6f79f9e70bb4e22170c Author: Dmitry Baryshkov Date: Sat Dec 17 02:33:49 2022 +0200 arm64: dts: qcom: sm8450-hdk: add missing PMIC includes Add includes for PMICs used on the SM8450-HDK. This makes GPIO blocks and thermal sensors available to the user of the platform. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221217003349.546852-6-dmitry.baryshkov@linaro.org commit 30464456a1eaddfa4363edf5e2334ed91acd265c Author: Vinod Koul Date: Sat Dec 17 02:33:48 2022 +0200 arm64: dts: qcom: sm8450-hdk: add pmic files SM8450 HDK features bunch of PMICs, add the PMICs which we have already upstream files Signed-off-by: Vinod Koul Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221217003349.546852-5-dmitry.baryshkov@linaro.org commit 69d46573ca29d1f9f6036bb551062c1db9c647f4 Author: Dmitry Baryshkov Date: Sat Dec 17 02:33:47 2022 +0200 arm64: dts: qcom: sm8450-qrd: add missing PMIC includes Add includes for PMICs used on the SM8450-HDK. This makes GPIO blocks and thermal sensors available to the user of the platform. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221217003349.546852-4-dmitry.baryshkov@linaro.org commit b070c7493bb1dafeb1dd22e3b666300aa42f956b Author: Vinod Koul Date: Sat Dec 17 02:33:46 2022 +0200 arm64: dts: qcom: sm8450-qrd: add pmic files SM8450 QRD features bunch of PMICs, add the PMICs which we have already upstream files Signed-off-by: Vinod Koul Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221217003349.546852-3-dmitry.baryshkov@linaro.org commit 5b8db5b4f756bcb3a3f9b6577f32fc0d3867496f Author: Melody Olvera Date: Fri Dec 16 15:13:12 2022 -0800 dt-bindings: firmware: scm: Add QDU1000/QRU1000 compatible Add compatible for scm driver for QDU1000 and QRU1000 platforms. These drivers only require the compatible field, so update the bindings accordingly for these platforms. Signed-off-by: Melody Olvera Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221216231312.22574-1-quic_molvera@quicinc.com commit a251655f1b6a88551f134daea4cdefbd35e225c3 Author: Brian Masney Date: Wed Dec 14 12:46:07 2022 -0500 arm64: defconfig: enable crypto userspace API Enable CONFIG_CRYPTO_USER so that libkcapi can be used. This was tested using kcapi-rng on a Qualcomm SA8540p automotive development board. Signed-off-by: Brian Masney Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221214174607.2948497-1-bmasney@redhat.com commit 47c6315ea64de35aaa738e8d647a4359ede202e8 Author: Krzysztof Kozlowski Date: Wed Dec 14 16:06:05 2022 +0100 dt-bindings: arm: qcom: add board-id/msm-id for MSM8956, SDM636 and SM4250 Allow qcom,board-id and qcom,msm-id leagcy properties on these older platforms: MSM8956, SDM636 and SM4250. Also mention more OnePlus devices using modified qcom,board-id field. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Reviewed-by: Marijn Suijten Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221214150605.173346-1-krzysztof.kozlowski@linaro.org commit 1364acc3f6260c51c6dd201c9b8e2fc58a6ca80d Author: Krzysztof Kozlowski Date: Wed Dec 14 12:04:48 2022 +0100 arm64: dts: qcom: replace underscores in node names Underscores should not be used in node names (dtc with W=2 warns about them), so replace them with hyphens. In few places adjust the name to match other nodes (e.g. xxx-regulator). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221214110448.86268-1-krzysztof.kozlowski@linaro.org commit f6df873315f921581e430f731c430d1d6d234234 Author: Owen Yang Date: Wed Dec 14 11:47:49 2022 +0800 arm64: dts: qcom: sc7280: Add DT for sc7280-herobrine-zombie with NVMe Add DT for sc7280-herobrine-zombie with NVMe Signed-off-by: Owen Yang Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221214114706.2.I1a0c709f8ec86cc5b38f0fe9f9b26694b1eb69d6@changeid commit 3219c9b28e7b97abdbed7abc514c259479618b63 Author: Owen Yang Date: Wed Dec 14 11:47:48 2022 +0800 dt-bindings: arm: qcom: Add zombie with NVMe Add entries in the device tree binding for sc7280-zombie with NVMe. Signed-off-by: Owen Yang Reviewed-by: Douglas Anderson Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221214114706.1.Ie4ca64ad56748de5aacd36237d42c80dd003c1a9@changeid commit 71b7c2df3109ee62e875b16fcb5654e626bf7cc7 Author: Konrad Dybcio Date: Tue Dec 13 19:33:04 2022 +0100 arm64: dts: qcom: sm8450: Add fallback CCI compatible Add a fallback CCI compatible, as required by bindings. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221213183305.544644-5-konrad.dybcio@linaro.org commit dd45008b74e4ca28bbacf0d249dac821624a88b0 Author: Konrad Dybcio Date: Tue Dec 13 19:33:03 2022 +0100 arm64: dts: qcom: sm8250: Add fallback CCI compatible Add a fallback CCI compatible, as required by bindings. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221213183305.544644-4-konrad.dybcio@linaro.org commit 84c611c5bca41f584a990a041daf31bf73ba9b99 Author: Konrad Dybcio Date: Tue Dec 13 19:33:02 2022 +0100 arm64: dts: qcom: sdm845: Add fallback CCI compatible Add a fallback CCI compatible, as required by bindings. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221213183305.544644-3-konrad.dybcio@linaro.org commit 6d88aafa6fdded2a76f60060ea50f7b8e98a2705 Author: Konrad Dybcio Date: Tue Dec 13 19:33:01 2022 +0100 arm64: dts: qcom: msm8916: Add fallback CCI compatible Add a fallback CCI compatible, as required by bindings. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221213183305.544644-2-konrad.dybcio@linaro.org commit 7ca5618520c6c8fd1419e2b057681d4f1d7b6578 Author: Konrad Dybcio Date: Tue Dec 13 14:25:17 2022 +0100 arm64: dts: qcom: sm8450-nagara: Disable empty i2c bus As much as it hurts me, there is no FM radio chips on these devices. It seems to be present on Japanese models, but these are not available globally and differ in a few more ways anyway (such as a super high-tech NFC chip). Since it's the only subdevice of its I2C host bus, disable said bus to save some power. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221213132517.203609-3-konrad.dybcio@linaro.org commit 71b4fb83a958881666f52d6275cd264ec909c7bc Author: Konrad Dybcio Date: Tue Dec 13 14:25:16 2022 +0100 arm64: dts: qcom: sm8350-sagami: Disable empty i2c bus As much as it hurts me, there is no FM radio chips on these devices. It seems to be present on Japanese models, but these are not available globally and differ in a few more ways anyway (such as a super high-tech NFC chip). Since it's the only subdevice of its I2C host bus, disable said bus to save some power. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221213132517.203609-2-konrad.dybcio@linaro.org commit 2a87b555553e357460da6f3cbc95bd6eadc852c0 Author: Konrad Dybcio Date: Tue Dec 13 14:25:15 2022 +0100 arm64: dts: qcom: sm8250-edo: Remove misleading comments As much as it hurts me, there is no FM radio chips on these devices. It seems to be present on Japanese models, but these are not available globally and differ in a few more ways anyway (such as a super high-tech NFC chip). Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221213132517.203609-1-konrad.dybcio@linaro.org commit 76ee8cd53016d0e157c20aa3dfaf2b86c0481111 Author: Srinivasa Rao Mandadapu Date: Tue Dec 13 17:26:06 2022 +0530 arm64: dts: qcom: sc7180: Set performance state for audio Set a performance state for audio clks so that the minimally correct corner voltage is picked when audio is active. Signed-off-by: Srinivasa Rao Mandadapu Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1670932566-22923-1-git-send-email-quic_srivasam@quicinc.com commit bb99820dd284a9bae63d713431d84b1832d222a1 Author: Krzysztof Kozlowski Date: Tue Dec 13 11:19:20 2022 +0100 arm64: dts: qcom: rename AOSS QMP nodes The Always On Subsystem (AOSS) QMP is not a power domain controller since commit 135780456218 ("arm64: dts: qcom: sc7180: Use QMP property to control load state") and few others. In fact, it was never a power domain controller but rather control of power state of remote processors. This power state control is now handled differently, thus the AOSS QMP nodes do not have power-domain-cells: sc7280-idp.dtb: power-controller@c300000: '#power-domain-cells' is a required property From schema: Documentation/devicetree/bindings/power/power-domain.yaml AOSS QMP is an interface to the actuall AOSS subsystem responsible for some of power management functions, thus let's call the nodes as "power-management". Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221213101921.47924-4-krzysztof.kozlowski@linaro.org commit 76d9e8b4d54ae2cb91a68f0cb82624887de767a7 Author: Krzysztof Kozlowski Date: Tue Dec 13 11:19:19 2022 +0100 arm64: dts: qcom: sc8280xp: correct SPMI bus address cells The SPMI bus uses two address cells and zero size cells (second reg entry - SPMI_USID - is not the size): spmi@c440000: #address-cells:0:0: 2 was expected Fixes: 152d1faf1e2f ("arm64: dts: qcom: add SC8280XP platform") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Reviewed-by: Stephen Boyd Reviewed-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221213101921.47924-3-krzysztof.kozlowski@linaro.org commit 8da3786a91e56fe0c4aeb2c2209744474af6e517 Author: Krzysztof Kozlowski Date: Tue Dec 13 11:19:18 2022 +0100 arm64: dts: qcom: sc7280: correct SPMI bus address cells The SPMI bus uses two address cells and zero size cells (second reg entry - SPMI_USID - is not the size): spmi@c440000: #address-cells:0:0: 2 was expected Fixes: 14abf8dfe364 ("arm64: dts: qcom: sc7280: Add SPMI PMIC arbiter device for SC7280") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221213101921.47924-2-krzysztof.kozlowski@linaro.org commit 1f75745537222172f84783d369bbd1fb2d4b6414 Author: Krzysztof Kozlowski Date: Tue Dec 13 11:19:17 2022 +0100 arm64: dts: qcom: sc7180: correct SPMI bus address cells The SPMI bus uses two address cells and zero size cells (second reg entry - SPMI_USID - is not the size): spmi@c440000: #address-cells:0:0: 2 was expected Fixes: 0f9dc5f09fbd ("arm64: dts: qcom: sc7180: Add SPMI PMIC arbiter device") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221213101921.47924-1-krzysztof.kozlowski@linaro.org commit 2eb4cdcd5aba2db83f2111de1242721eeb659f71 Author: Shazad Hussain Date: Tue Dec 13 15:29:21 2022 +0530 arm64: dts: qcom: sa8540p-ride: enable pcie2a node Add the pcie2a, pcie2a_phy, and respective tlmm nodes that are needed to get pcie 2a controller enabled on Qdrive3. This patch enables 4GB 64bit memory space for PCIE_2A to have BAR allocations of 64bit pref mem needed on this Qdrive3 platform with dual SoCs for root port and switch NT-EP. Hence this ranges property is overridden in sa8540p-ride.dts only. Moved tlmm node at the end as it tends to become rahter long. Link: https://lore.kernel.org/lkml/Y49k1k8ayI9%2FrK+R@hovoldconsulting.com/ Signed-off-by: Shazad Hussain Reviewed-by: Brian Masney Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221213095922.11649-1-quic_shazhuss@quicinc.com commit af657876c67062a07650cacf5f0b2c754d9f14d6 Author: Krzysztof Kozlowski Date: Mon Dec 12 17:35:32 2022 +0100 ARM: dts: qcom: msm8960: add qcom,kpss-wdt-mdm9615 Add specific compatible to timer/watchdog device node. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221212163532.142533-12-krzysztof.kozlowski@linaro.org commit f630f8205c37579092b37cf216428a43a73e35b8 Author: Krzysztof Kozlowski Date: Mon Dec 12 17:35:31 2022 +0100 ARM: dts: qcom: msm8960: drop second clock frequency from timer Keep only one clock frequency for timer, because: 1. DT schema does not allow multiple frequencies in such property, 2. The Linux timer driver reads only first frequency. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221212163532.142533-11-krzysztof.kozlowski@linaro.org commit 501d1437d57604659a02378d712a8fc347f8ed84 Author: Krzysztof Kozlowski Date: Mon Dec 12 17:35:30 2022 +0100 ARM: dts: qcom: mdm9615: drop second clock frequency from timer Keep only one clock frequency for timer, because: 1. DT schema does not allow multiple frequencies in such property, 2. The Linux timer driver reads only first frequency. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221212163532.142533-10-krzysztof.kozlowski@linaro.org commit aa482e69cd3b3513d952eab71858534315b535bf Author: Krzysztof Kozlowski Date: Mon Dec 12 17:35:29 2022 +0100 ARM: dts: qcom: ipq8064: drop second clock frequency from timer Keep only one clock frequency for timer, because: 1. DT schema does not allow multiple frequencies in such property, 2. The Linux timer driver reads only first frequency. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221212163532.142533-9-krzysztof.kozlowski@linaro.org commit 462671ab0472175b52a45b91abf140df3ecf7326 Author: Krzysztof Kozlowski Date: Mon Dec 12 17:35:28 2022 +0100 ARM: dts: qcom: apq8064: drop second clock frequency from timer Keep only one clock frequency for timer, because: 1. DT schema does not allow multiple frequencies in such property, 2. The Linux timer driver reads only first frequency. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221212163532.142533-8-krzysztof.kozlowski@linaro.org commit 25da76a92f88b57331946e98f659b2626d512ea2 Author: Krzysztof Kozlowski Date: Mon Dec 12 17:35:27 2022 +0100 ARM: dts: qcom: reverse compatibles to match bindings The most specific compatible should be upfront. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221212163532.142533-7-krzysztof.kozlowski@linaro.org commit 3bd21131d884b58c0c14926a710241c521352346 Author: Krzysztof Kozlowski Date: Mon Dec 12 11:02:28 2022 +0100 arm64: dts: qcom: sdm845: order top-level nodes alphabetically Order top-level nodes like memory, reserved-memory, opp-table-cpu alphabetically for easier code maintenance. No functional change (same dtx_diff, except phandle changes). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221212100232.138519-2-krzysztof.kozlowski@linaro.org commit 41d31fa487fe684ef130d002956b7915584cbabb Author: Krzysztof Kozlowski Date: Mon Dec 12 11:02:27 2022 +0100 arm64: dts: qcom: sc7180: order top-level nodes alphabetically Order top-level nodes like memory, reserved-memory, opp-table-cpu alphabetically for easier code maintenance. No functional change (same dtx_diff). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221212100232.138519-1-krzysztof.kozlowski@linaro.org commit a622c1dc84d920f231df539b3013c58a15fa2a19 Author: Dmitry Baryshkov Date: Sat Dec 10 22:10:13 2022 +0300 clk: qcom: clk-spmi-pmic-div: convert to use parent_data The clk-spmi-pmic-div driver gets the parent name from the first (and the only) clock parent. So, use parent data, index 0 to setup the clock. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221210191013.453040-1-dmitry.baryshkov@linaro.org commit 3e727c3e6379ae21116aa0cb340c069761db53d7 Author: Dmitry Baryshkov Date: Sat Dec 10 22:45:00 2022 +0300 arm64: defconfig: build SDM_LPASSCC_845 as a module Enable the low-power clock controller driver used on Qualcomm SDM845 platform (Thundercomm RB3 board). Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221210194500.464556-3-dmitry.baryshkov@linaro.org commit a084ea59f92eb4d0f297ccea84e152f07105c1f3 Author: Dmitry Baryshkov Date: Sat Dec 10 22:44:59 2022 +0300 arm64: defconfig: enable camera on Thundercomm RB5 platform Enable VIDEO_IMX412 and SM_CAMCC_825 to enable camera on Thundercomm RB5 platform. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221210194500.464556-2-dmitry.baryshkov@linaro.org commit fcf1316fd7bfda5cf7f60e4ed2eaf166857335c4 Author: Dmitry Baryshkov Date: Sat Dec 10 22:44:58 2022 +0300 arm64: defconfig: build PINCTRL_SM8250_LPASS_LPI as module Enable the driver used to drive sound-related pins on Qualcomm SM8250 platform (Thundercomm RB5 board). Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221210194500.464556-1-dmitry.baryshkov@linaro.org commit 7069b91ac2cd682a681ed2f0125bccd76b777d86 Author: Dmitry Baryshkov Date: Sat Dec 10 22:07:11 2022 +0300 clk: qcom: gcc-sm6375: use parent_hws for gcc_disp_gpll0_div_clk_src Change gpll0 to use parent_hws instead of parent_names for gcc_disp_gpll0_div_clk_src clock. Signed-off-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221210190712.451247-2-dmitry.baryshkov@linaro.org commit 4c261dfd5e39ab7512f8df8fc459663bab55488c Author: Dmitry Baryshkov Date: Sat Dec 10 22:07:10 2022 +0300 clk: qcom: dispcc-sm6115: use parent_hws for disp_cc_mdss_rot_clk Rework disp_cc_mdss_rot_clk to use parent_hws instead of parent_names. Signed-off-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221210190712.451247-1-dmitry.baryshkov@linaro.org commit 9293c3e85a200d3a453ca208548d5dfc9d1af70a Author: Rob Herring Date: Wed Dec 7 15:13:27 2022 -0600 arm64: dts: qcom: sc7280: Fix CPU nodes compatible string 'arm,kryo' is not documented and is not an Arm Ltd thing either as that is Qualcomm branding. The correct compatible is 'qcom,kryo'. Signed-off-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221207211327.2848665-1-robh@kernel.org commit c5b8840c895a5b0291ef84e3f13d92c3414033e7 Author: Krzysztof Kozlowski Date: Tue Nov 22 10:23:45 2022 +0100 dt-bindings: firmware: qcom,scm: narrow clocks and interconnects SCM has clock inputs and interconnects only on some of the SoCs, so disallow them inb other cases, which makes the binding stricter. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221122092345.44369-2-krzysztof.kozlowski@linaro.org commit 8f3945a9adce3934943b365bcd5ae2932737f028 Author: Krzysztof Kozlowski Date: Tue Nov 22 10:23:44 2022 +0100 dt-bindings: firmware: qcom,scm: document MSM8226 clocks Document the clocks (core, bus and iface) used on MSM8226 SCM. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221122092345.44369-1-krzysztof.kozlowski@linaro.org commit 0d89bfbcd6d4c2691f5d70b8f2938aeb7774e7f6 Author: Konrad Dybcio Date: Thu Dec 29 11:32:12 2022 +0100 arm64: dts: qcom: sm8450-nagara: Configure SLG51000 PMIC Nagara devices use the Dialog SLG51000 PMIC for powering some camera sensors. Add the required nodes to support it. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221229103212.984324-7-konrad.dybcio@linaro.org commit e9090691e48d2ceabec70448ac893637fbf0e27e Author: Konrad Dybcio Date: Thu Dec 29 11:32:11 2022 +0100 arm64: dts: qcom: sm8450-nagara: Enable PMIC RESIN+PON Enable the power and volume up buttons, connected to PON and RESIN respectively. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221229103212.984324-6-konrad.dybcio@linaro.org commit 40430a7c485b5463247b28691ad6a4fc5e280235 Author: Konrad Dybcio Date: Thu Dec 29 11:32:10 2022 +0100 arm64: dts: qcom: sm8450-nagara: Set up camera regulators Set up gpio-controlled fixed regulators for camera on PDX223 and fix up the existing ones in common and PDX224 trees. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221229103212.984324-5-konrad.dybcio@linaro.org commit 7b2557697890a947e178d4dc20848b479e384123 Author: Konrad Dybcio Date: Thu Dec 29 11:32:09 2022 +0100 arm64: dts: qcom: sm8450-nagara: Add GPIO keys With PMIC GPIOs now available, set up required pin settings and add gpio-keys. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221229103212.984324-4-konrad.dybcio@linaro.org commit 4c5ab70d11ba591e28d4b07e50847084141c2374 Author: Konrad Dybcio Date: Thu Dec 29 11:32:08 2022 +0100 arm64: dts: qcom: sm8450-nagara: Add GPIO line names for PMIC GPIOs 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 PDX223&224 DTSIs to better document the hardware. Diff between 223 and 224: pm8350b < "CAM_PWR_LD_EN", > "NC", pm8350c < "RGBC_IR_PWR_EN", > "NC", Which is due to different camera power wiring on 223 and lack of a ToF sensor on 224. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221229103212.984324-3-konrad.dybcio@linaro.org commit 25deb75e99bc57a7860cef2688b032d0e2f979dc Author: Konrad Dybcio Date: Thu Dec 29 11:32:07 2022 +0100 arm64: dts: qcom: sm8450-nagara: Include PMIC DTSIs Now that SPMI is finally in place, include the DTSIs of PMICs present on Nagara. Signed-off-by: Konrad Dybcio Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221229103212.984324-2-konrad.dybcio@linaro.org commit f891f86e47c3208986b0985ca1fbc94647ba2ad0 Author: Vinod Koul Date: Thu Dec 29 11:32:06 2022 +0100 arm64: dts: qcom: sm8450: add spmi node Add the spmi bus as found in the SM8450 SoC Signed-off-by: Vinod Koul Reviewed-by: Konrad Dybcio [Konrad: 0x0 -> 0, move #cells down, make reg-names a vertical list] Signed-off-by: Konrad Dybcio [bjorn: Adjusted unit address] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221229103212.984324-1-konrad.dybcio@linaro.org commit 68714ad80829dc34b7db71819bd8b908ecdd7222 Author: Dmitry Baryshkov Date: Tue Jan 3 16:55:15 2023 +0200 clk: qcom: videocc-sm8250: switch to devm_pm_runtime_enable Switch to using the devm_pm_runtime_enable() instead of hand-coding corresponding action to call pm_runtime_disable(). Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103145515.1164020-22-dmitry.baryshkov@linaro.org commit f9048217a48cd86c1dd32e0e9b5ad204896b1343 Author: Dmitry Baryshkov Date: Tue Jan 3 16:55:14 2023 +0200 clk: qcom: lpasscc-sc7280: switch to devm_pm_runtime_enable Switch to using the devm_pm_runtime_enable() instead of hand-coding corresponding action to call pm_runtime_disable(). Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103145515.1164020-21-dmitry.baryshkov@linaro.org commit b69069c3ff68ff39aa182a901db89b0fdcfefa02 Author: Dmitry Baryshkov Date: Tue Jan 3 16:55:13 2023 +0200 clk: qcom: dispcc-sm8450: switch to devm_pm_runtime_enable Switch to using the devm_pm_runtime_enable() instead of hand-coding corresponding action to call pm_runtime_disable(). Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103145515.1164020-20-dmitry.baryshkov@linaro.org commit 009d43686ec6cfd6ceb7ef6a940132232268aa8e Author: Dmitry Baryshkov Date: Tue Jan 3 16:55:12 2023 +0200 clk: qcom: dispcc-sm8250: switch to devm_pm_runtime_enable Switch to using the devm_pm_runtime_enable() instead of hand-coding corresponding action to call pm_runtime_disable(). Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103145515.1164020-19-dmitry.baryshkov@linaro.org commit 7e5c218f33a4e10f982e08556ab1a9aacc4d008e Author: Dmitry Baryshkov Date: Tue Jan 3 16:55:11 2023 +0200 clk: qcom: lpasscc-sc7180: switch to parent_hws Change several entries of parent_data to use parent_hws instead, which results in slightly more ovbious code. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103145515.1164020-18-dmitry.baryshkov@linaro.org commit 77e1e697cf380ab970613d517fa1df79ec5d5e54 Author: Dmitry Baryshkov Date: Tue Jan 3 16:55:10 2023 +0200 clk: qcom: gpucc-sc7180: switch to parent_hws Change several entries of parent_data to use parent_hws instead, which results in slightly more ovbious code. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103145515.1164020-17-dmitry.baryshkov@linaro.org commit d45fb976f46600554e2db02ce5d16d1dff84d106 Author: Bjorn Andersson Date: Mon Jan 9 20:20:04 2023 -0800 soc: qcom: ramp_controller: Make things static The five msm8976_cfg_* objects ought to be static, as reported by LKP and sparse, fix this. drivers/soc/qcom/ramp_controller.c:235:27: sparse: sparse: symbol 'msm8976_cfg_dfs_sid' was not declared. Should it be static? drivers/soc/qcom/ramp_controller.c:246:27: sparse: sparse: symbol 'msm8976_cfg_link_sid' was not declared. Should it be static? drivers/soc/qcom/ramp_controller.c:250:27: sparse: sparse: symbol 'msm8976_cfg_lmh_sid' was not declared. Should it be static? drivers/soc/qcom/ramp_controller.c:256:27: sparse: sparse: symbol 'msm8976_cfg_ramp_en' was not declared. Should it be static? drivers/soc/qcom/ramp_controller.c:262:27: sparse: sparse: symbol 'msm8976_cfg_ramp_dis' was not declared. Should it be static? Fixes: a723c95fa137 ("soc: qcom: Add Qualcomm Ramp Controller driver") Reported-by: kernel test robot Signed-off-by: Bjorn Andersson Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230110042004.2378444-1-quic_bjorande@quicinc.com commit 2ae3c610e7d21bc4a27da2b71f7007f2c4efce01 Author: Tom Rix Date: Tue Jan 10 14:36:11 2023 -0500 platform/chrome: cros_ec_lpc: initialize the buf variable Clang static analysis reports this problem drivers/platform/chrome/cros_ec_lpc.c:379:13: warning: The left operand of '!=' is a garbage value [core.UndefinedBinaryOperatorResult] if (buf[0] != 'E' || buf[1] != 'C') { ~~~~~~ ^ The check depends on the side effect of the read. When the read fails or is short, a buf containing garbage could be mistaken as correct. Signed-off-by: Tom Rix Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20230110193611.3573777-1-trix@redhat.com commit 9e69b1b27b13eb4eb85405900e290c0d539454bf Author: Marek Szyprowski Date: Tue Jan 10 23:10:33 2023 +0100 platform/chrome: cros_ec: Fix panic notifier registration Initialize panic notifier to avoid the following lockdep warning: INFO: trying to register non-static key. The code is fine but needs lockdep annotation, or maybe you didn't initialize this object before use? turning off the locking correctness validator. [...] Hardware name: Samsung Exynos (Flattened Device Tree) Workqueue: events_unbound async_run_entry_fn unwind_backtrace from show_stack [...] blocking_notifier_chain_register from cros_ec_debugfs_probe cros_ec_debugfs_probe from platform_probe Fixes: d90fa2c64d59 ("platform/chrome: cros_ec: Poll EC log on EC panic") Signed-off-by: Marek Szyprowski [tzungbi: trimmed the stack trace in commit message.] Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20230110221033.7441-1-m.szyprowski@samsung.com commit f27c942e3e3e80475cc463b5fc373f280d85b926 Author: Fabio M. De Francesco Date: Mon Jan 9 19:28:43 2023 +0100 fs/cramfs: Convert kmap() to kmap_local_data() The use of kmap() is being deprecated in favor of kmap_local_page(). There are two main problems with kmap(): (1) It comes with an overhead as the mapping space is restricted and protected by a global lock for synchronization and (2) it also requires global TLB invalidation when the kmap’s pool wraps and it might block when the mapping space is fully utilized until a slot becomes available. With kmap_local_page() the mappings are per thread, CPU local, can take page faults, and can be called from any context (including interrupts). It is faster than kmap() in kernels with HIGHMEM enabled. Furthermore, the tasks can be preempted and, when they are scheduled to run again, the kernel virtual addresses are restored and still valid. Since its use in fs/cramfs is safe everywhere, it should be preferred. Therefore, replace kmap() with kmap_local_page() in fs/cramfs. Instead of open-coding kmap_local_page() + memcpy(), use memcpy_from_page(). Cc: Alexander Viro Cc: "Venkataramanan, Anirudh" Suggested-by: Ira Weiny Reviewed-by: Nicolas Pitre Reviewed-by: Christian Brauner (Microsoft) Reviewed-by: Ira Weiny Signed-off-by: Fabio M. De Francesco Signed-off-by: Al Viro commit a6f536063b69102adf3588fbc0bb4f08d6c8cb82 Author: Dai Shixin Date: Mon Jan 9 19:35:26 2023 +0800 qed: fix a typo in comment Fix a typo of "permision" which should be "permission". Signed-off-by: Dai Shixin Signed-off-by: Yang Yang Link: https://lore.kernel.org/r/202301091935262709751@zte.com.cn Signed-off-by: Jakub Kicinski commit 6920b08661e3ad829206078b5c9879b24aea8dfc Author: Ludovic L'Hours Date: Sun Jan 8 19:20:18 2023 +0100 libbpf: Fix map creation flags sanitization As BPF_F_MMAPABLE flag is now conditionnaly set (by map_is_mmapable), it should not be toggled but disabled if not supported by kernel. Fixes: 4fcac46c7e10 ("libbpf: only add BPF_F_MMAPABLE flag for data maps with global vars") Signed-off-by: Ludovic L'Hours Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20230108182018.24433-1-ludovic.lhours@gmail.com Signed-off-by: Martin KaFai Lau commit 75514e4c661962cbbad869a1b5855dbce0f1aba2 Author: Chethan Suresh Date: Mon Jan 9 08:07:42 2023 +0530 bpftool: fix output for skipping kernel config check When bpftool feature does not find kernel config files under default path or wrong format, do not output CONFIG_XYZ is not set. Skip kernel config check and continue. Signed-off-by: Chethan Suresh Signed-off-by: Kenta Tada Acked-by: Quentin Monnet Link: https://lore.kernel.org/r/20230109023742.29657-1-chethan.suresh@sony.com Signed-off-by: Martin KaFai Lau commit b08134eb254db56e9ce8170d9b82f0d7a616b6f8 Author: Jeff LaBundy Date: Tue Jan 3 11:59:35 2023 -0600 Input: iqs269a - do not poll during ATI After initial start-up, the driver triggers ATI (calibration) with the newly loaded register configuration in place. Next, the driver polls a register field to ensure ATI completed in a timely fashion and that the device is ready to sense. However, communicating with the device over I2C while ATI is under- way may induce noise in the device and cause ATI to fail. As such, the vendor recommends not to poll the device during ATI. To solve this problem, let the device naturally signal to the host that ATI is complete by way of an interrupt. A completion prevents the device from successfully probing until this happens. As an added benefit, initial switch states are now reported in the interrupt handler at the same time ATI status is checked. As such, duplicate code that reports initial switch states has been removed from iqs269_input_init(). The former logic that scaled ATI timeout and filter settling delay is not carried forward with the new implementation, as it produces overly conservative delays at the lower clock rate. Rather, a single timeout that covers both clock rates is used. The filter settling delay does not happen to be necessary and has been removed as well. Fixes: 04e49867fad1 ("Input: add support for Azoteq IQS269A") Signed-off-by: Jeff LaBundy Reviewed-by: Mattijs Korpershoek Link: https://lore.kernel.org/r/Y7RtB2T7AF9rYMjK@nixie71 Signed-off-by: Dmitry Torokhov commit 18ab69c8ca5678324efbeed874b707ce7b2feae1 Author: Jeff LaBundy Date: Tue Jan 3 11:59:21 2023 -0600 Input: iqs269a - do not poll during suspend or resume Polling the device while it transitions from automatic to manual power mode switching may keep the device from actually finishing the transition. The process appears to time out depending on the polling rate and the device's core clock frequency. This is ultimately unnecessary in the first place; instead it is sufficient to write the desired mode during initialization, then disable automatic switching at suspend. This eliminates the need to ensure the device is prepared for a manual change and removes the 'suspend_mode' variable. Similarly, polling the device while it transitions from one mode to another under manual control may time out as well. This added step does not appear to be necessary either, so drop it. Fixes: 04e49867fad1 ("Input: add support for Azoteq IQS269A") Signed-off-by: Jeff LaBundy Reviewed-by: Mattijs Korpershoek Link: https://lore.kernel.org/r/Y7Rs+eEXlRw4Vq57@nixie71 Signed-off-by: Dmitry Torokhov commit 3689abfc4e369a643d758a02fb9ad0b2403d6d6d Author: Jeff LaBundy Date: Tue Jan 3 11:59:12 2023 -0600 Input: iqs269a - configure device with a single block write Unless it is being done as part of servicing a soft reset interrupt, configuring channels on-the-fly (as is the case when writing to the ati_trigger attribute) may cause GPIO3 (which reflects the state of touch for a selected channel) to be inadvertently asserted. To solve this problem, follow the vendor's recommendation and write all channel configuration as well as the REDO_ATI register field as part of a single block write. This ensures the device has been told to re-calibrate itself following an I2C stop condition, after which sensing resumes and GPIO3 may be asserted. Fixes: 04e49867fad1 ("Input: add support for Azoteq IQS269A") Signed-off-by: Jeff LaBundy Reviewed-by: Mattijs Korpershoek Link: https://lore.kernel.org/r/Y7Rs8GyV7g0nF5Yy@nixie71 Signed-off-by: Dmitry Torokhov commit e023cc4abde3c01b895660b0e5a8488deb36b8c1 Author: Jeff LaBundy Date: Tue Jan 3 11:58:59 2023 -0600 Input: iqs269a - increase interrupt handler return delay The time the device takes to deassert its RDY output following an I2C stop condition scales with the core clock frequency. To prevent level-triggered interrupts from being reasserted after the interrupt handler returns, increase the time before returning to account for the worst-case delay (~140 us) plus margin. Fixes: 04e49867fad1 ("Input: add support for Azoteq IQS269A") Signed-off-by: Jeff LaBundy Reviewed-by: Mattijs Korpershoek Link: https://lore.kernel.org/r/Y7Rs484ypy4dab5G@nixie71 Signed-off-by: Dmitry Torokhov commit 59bc9cb3b80abaa42643abede0d5db8477901d9c Author: Jeff LaBundy Date: Tue Jan 3 11:58:31 2023 -0600 Input: iqs269a - drop unused device node references Each call to device/fwnode_get_named_child_node() must be matched with a call to fwnode_handle_put() once the corresponding node is no longer in use. This ensures a reference count remains balanced in the case of dynamic device tree support. Currently, the driver does not call fwnode_handle_put() on nested event nodes. This patch solves this problem by adding the missing instances of fwnode_handle_put(). As part of this change, the logic which parses each channel's key code is gently refactored in order to reduce the number of places from which fwnode_handle_put() is called. Fixes: 04e49867fad1 ("Input: add support for Azoteq IQS269A") Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/Y7Rsx68k/gvDVXAt@nixie71 Signed-off-by: Dmitry Torokhov commit e22391454e3e8ab1aa7f25ef352c2f85f4d54568 Author: Abel Vesa Date: Sat Dec 31 16:27:21 2022 +0200 drm/panel-edp: add IVO M133NW4J panel entry Add an eDP panel entry for IVO M133NW4J. Due to lack of documentation, use the delay_200_500_p2e100 timings like some other IVO entries for now. Signed-off-by: Abel Vesa Reviewed-by: Johan Hovold Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20221231142721.338643-2-abel.vesa@linaro.org commit 9cce08cadc6ce8670280d0a042cf0b6d2987d9f9 Author: Abel Vesa Date: Sat Dec 31 16:27:20 2022 +0200 drm/panel-edp: fix name for IVO product id 854b The actual name is R133NW4K-R0. Fixes: 0f9fa5f58c78 ("drm/panel-edp: add IVO M133NW4J-R3 panel entry") Signed-off-by: Abel Vesa Reviewed-by: Johan Hovold Tested-by: Steev Klimaszewski Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20221231142721.338643-1-abel.vesa@linaro.org commit 9cb61e50bf6bf54db712bba6cf20badca4383f96 Author: Connor O'Brien Date: Sat Jan 7 02:53:31 2023 +0000 bpf: btf: limit logging of ignored BTF mismatches Enabling CONFIG_MODULE_ALLOW_BTF_MISMATCH is an indication that BTF mismatches are expected and module loading should proceed anyway. Logging with pr_warn() on every one of these "benign" mismatches creates unnecessary noise when many such modules are loaded. Instead, handle this case with a single log warning that BTF info may be unavailable. Mismatches also result in calls to __btf_verifier_log() via __btf_verifier_log_type() or btf_verifier_log_member(), adding several additional lines of logging per mismatched module. Add checks to these paths to skip logging for module BTF mismatches in the "allow mismatch" case. All existing logging behavior is preserved in the default CONFIG_MODULE_ALLOW_BTF_MISMATCH=n case. Signed-off-by: Connor O'Brien Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20230107025331.3240536-1-connoro@google.com Signed-off-by: Martin KaFai Lau commit ef1757ef58467310a285e57e6dbf6cf8314e5080 Merge: 96b7a9d11a92c 743a19e38d02f Author: Jakub Kicinski Date: Tue Jan 10 15:53:37 2023 -0800 Merge branch 'net-mdio-start-separating-c22-and-c45' Michael Walle says: ==================== net: mdio: Start separating C22 and C45 This patch set starts the separation of C22 and C45 MDIO bus transactions at the API level to the MDIO Bus drivers. C45 read and write ops are added to the MDIO bus driver structure, and the MDIO core will try to use these ops if requested to perform a C45 transfer. If not available a fallback to the older API is made, to allow backwards compatibility until all drivers are converted. A few drivers are then converted to this new API. The core DSA patch was dropped for now as there is still an ongoing discussion. It will be picked up in a later series again. v2: https://lore.kernel.org/r/20221227-v6-2-rc1-c45-seperation-v2-0-ddb37710e5a7@walle.cc v1: https://lore.kernel.org/r/20220508153049.427227-1-andrew@lunn.ch ==================== Link: https://lore.kernel.org/r/20221227-v6-2-rc1-c45-seperation-v3-0-ade1deb438da@walle.cc Signed-off-by: Jakub Kicinski commit 743a19e38d02fb6036dbf621edcf1cbb38e2f9e0 Author: Andrew Lunn Date: Mon Jan 9 16:30:51 2023 +0100 net: dsa: mv88e6xxx: Separate C22 and C45 transactions The global2 SMI MDIO bus driver can perform both C22 and C45 transfers. Create separate functions for each and register the C45 versions using the new API calls where appropriate. Update the SERDES code to make use of these new accessors. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 1d914d51f03cbbbda3c34c675e49392ce60c1c33 Author: Andrew Lunn Date: Mon Jan 9 16:30:50 2023 +0100 net: mdio: add mdiobus_c45_read/write_nested helpers Some DSA devices pass through PHY access to the MDIO bus the switch is on. Add C45 versions of the current C22 helpers for nested accesses to MDIO busses, so that C22 and C45 can be separated in these DSA drivers. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit 8d03ad1ab0b052f1f992a52fb80a31b7540b61f6 Author: Andrew Lunn Date: Mon Jan 9 16:30:49 2023 +0100 net: fec: Separate C22 and C45 transactions The fec MDIO bus driver can perform both C22 and C45 transfers. Create separate functions for each and register the C45 versions using the new API calls where appropriate. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Reviewed-by: Wei Fang Signed-off-by: Jakub Kicinski commit c0fc8e6dcee40cf442ee0d6f7305b957fb902ea1 Author: Andrew Lunn Date: Mon Jan 9 16:30:48 2023 +0100 net: mdio: xgmac_mdio: Separate C22 and C45 transactions The xgmac MDIO bus driver can perform both C22 and C45 transfers. Create separate functions for each and register the C45 versions using the new API calls where appropriate. While at it, remove the misleading comment. According to Vladimir Oltean: - miimcom is a register accessed by fsl_pq_mdio.c, not by xgmac_mdio.c - "device dev" doesn't really refer to anything (maybe "dev_addr"). - I don't understand what is meant by the comment "All PHY configuration has to be done through the TSEC1 MIIM regs". Or rather said, I think I understand, but it is irrelevant to the driver for 2 reasons: * TSEC devices use the fsl_pq_mdio.c driver, not this one * It doesn't matter to this driver whose TSEC registers are used for MDIO access. The driver just works with the registers it's given, which is a concern for the device tree. - barring the above, the rest just describes the MDIO bus API, which is superfluous Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Tested-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit b3c84ae5ff99d8a05aac8bc04b487598198d89e2 Author: Andrew Lunn Date: Mon Jan 9 16:30:47 2023 +0100 net: mdio: mvmdio: Convert XSMI bus to new API The marvell MDIO driver supports two different hardware blocks. The XSMI block is C45 only. Convert this block to the new API, and only populate the c45 calls in the bus structure. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit 002dd3de097c778a74ae9e47e598bea6ad055af0 Author: Andrew Lunn Date: Mon Jan 9 16:30:46 2023 +0100 net: mdio: mdio-bitbang: Separate C22 and C45 transactions The bitbbanging bus driver can perform both C22 and C45 transfers. Create separate functions for each and register the C45 versions using the new driver API calls. The SH Ethernet driver places wrappers around these functions. In order to not break boards which might be using C45, add similar wrappers for C45 operations. Reviewed-by: Geert Uytterhoeven Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit ce30fa56cbf09ab6b28170ced689c3cfd329e979 Author: Andrew Lunn Date: Mon Jan 9 16:30:45 2023 +0100 net: mdio: Move mdiobus_c45_addr() next to users Now that mdiobus_c45_addr() is only used within the MDIO code during fallback, move the function next to its only users. This function should not be used any more in drivers, the c45 helpers should be used in its place, so hiding it away will prevent any new users from being added. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit b063b1924fd9bf0bc157cf644764dc2151d04ccc Author: Andrew Lunn Date: Mon Jan 9 16:30:44 2023 +0100 net: mdio: C22 is now optional, EOPNOTSUPP if not provided When performing a C22 operation, check that the bus driver actually provides the methods, and return -EOPNOTSUPP if not. C45 only busses do exist, and in future their C22 methods will be NULL. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit 555d64c6d8e551a149ce29024b9318d3523f2842 Author: Andrew Lunn Date: Mon Jan 9 16:30:43 2023 +0100 net: mdio: mdiobus_register: update validation test Now that C45 uses its own read/write methods, the validation performed when a bus is registers needs updating. All combinations of C22 and C45 are supported, but both read and write methods must be provided, read only busses are not supported etc. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit 3a65e5f91780ecfc98ca0cf374843be533ade591 Author: Andrew Lunn Date: Mon Jan 9 16:30:42 2023 +0100 net: pcs: pcs-xpcs: Use C45 MDIO API Convert the PCS-XPCS driver to make use of the C45 MDIO bus API for modify_change(). Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 4e4aafcddbbfcdd6eed5780e190fcbfac8b4685a Author: Andrew Lunn Date: Mon Jan 9 16:30:41 2023 +0100 net: mdio: Add dedicated C45 API to MDIO bus drivers Currently C22 and C45 transactions are mixed over a combined API calls which make use of a special bit in the reg address to indicate if a C45 transaction should be performed. This makes it impossible to know if the bus driver actually supports C45. Additionally, many C22 only drivers don't return -EOPNOTSUPP when asked to perform a C45 transaction, they mistaking perform a C22 transaction. This is the first step to cleanly separate C22 from C45. To maintain backwards compatibility until all drivers which are capable of performing C45 are converted to this new API, the helper functions will fall back to the older API if the new API is not supported. Eventually this fallback will be removed. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle Signed-off-by: Jakub Kicinski commit 7f7880495770329d095d402c2865bfa7089192f8 Author: Pu Lehui Date: Thu Jan 5 11:50:26 2023 +0800 bpf, x86: Simplify the parsing logic of structure parameters Extra_nregs of structure parameters and nr_args can be added directly at the beginning, and using a flip flag to identifiy structure parameters. Meantime, renaming some variables to make them more sense. Signed-off-by: Pu Lehui Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20230105035026.3091988-1-pulehui@huaweicloud.com Signed-off-by: Martin KaFai Lau commit 7f347e3f821743a02c249abe50e467a333fabcfe Author: Eric Huang Date: Thu Jan 5 14:01:18 2023 -0500 drm/amdkfd: Fix NULL pointer error for GC 11.0.1 on mGPU The point bo->kfd_bo is NULL for queue's write pointer BO when creating queue on mGPU. To avoid using the pointer fixes the error. Signed-off-by: Eric Huang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 447395e18ae084b1ac96d4efeca43a711cf5a36b Author: Deepak R Varma Date: Wed Dec 28 00:09:51 2022 +0530 drm/amd/display: No need for Null pointer check before kfree kfree() & vfree() internally performs NULL check on the pointer handed to it and take no action if it indeed is NULL. Hence there is no need for a pre-check of the memory pointer before handing it to kfree()/vfree(). Issue reported by ifnullfree.cocci Coccinelle semantic patch script. Reviewed-by: Rodrigo Siqueira Signed-off-by: Deepak R Varma Signed-off-by: Alex Deucher commit 45bf79719f1f7f3fbd5dcaf1440afc9b3033c778 Author: Guchun Chen Date: Tue Jan 10 11:33:44 2023 +0800 drm/amd/pm/smu13: BACO is supported when it's in BACO state This leverages the logic in smu11. No need to talk to SMU to check BACO enablement as it's in BACO state already. Signed-off-by: Guchun Chen Reviewed-by: Kenneth Feng Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 8ce1d255147a2ccfa41884e36ec0b95bdb0d523a Author: Eric Huang Date: Mon Jan 9 14:16:42 2023 -0500 drm/amdkfd: Add sync after creating vram bo There will be data corruption on vram allocated by svm if the initialization is not complete and application is writting on the memory. Adding sync to wait for the initialization completion is to resolve this issue. Signed-off-by: Eric Huang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 9d086e0ddaeb08876f4df3a1485166bfd7483252 Author: Deepak R Varma Date: Fri Dec 23 02:45:00 2022 +0530 drm/amdkfd: Use resource_size() helper function Use the resource_size() function instead of a open coded computation resource size. It makes the code more readable. Issue identified using resource_size.cocci coccinelle semantic patch. Signed-off-by: Deepak R Varma Signed-off-by: Felix Kuehling Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 53ab112a95086d10dc353ea4f979abb01644bbb6 Merge: 88603b6dc4194 be5f95c8779e1 Author: Michael Ellerman Date: Wed Jan 11 09:52:42 2023 +1100 Merge branch 'fixes' into next Merge our fixes branch to bring in the linker script fixes for older toolchains. commit 129d868ede1ea835ac97f0a9f2cf3f4ed00d8ea7 Author: Kees Cook Date: Thu Jan 5 11:26:47 2023 -0800 bpf: Replace 0-length arrays with flexible arrays Zero-length arrays are deprecated [1]. Replace struct bpf_array's union of 0-length arrays with flexible arrays. Detected with GCC 13, by using -fstrict-flex-arrays=3: arch/x86/net/bpf_jit_comp.c: In function 'bpf_tail_call_direct_fixup': arch/x86/net/bpf_jit_comp.c:606:37: warning: array subscript is outside array bounds of 'void *[0]' [-Warray-bounds=] 606 | target = array->ptrs[poke->tail_call.key]; | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/filter.h:9, from arch/x86/net/bpf_jit_comp.c:9: include/linux/bpf.h:1527:23: note: while referencing 'ptrs' 1527 | void *ptrs[0] __aligned(8); | ^~~~ [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays Signed-off-by: Kees Cook Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20230105192646.never.154-kees@kernel.org commit 32a47817d07557ffca9992964c514fd79bda6fba Author: Randy Dunlap Date: Sat Jan 7 18:12:17 2023 -0800 cgroup/cpuset: fix a few kernel-doc warnings & coding style Fix kernel-doc notation warnings: kernel/cgroup/cpuset.c:1309: warning: Excess function parameter 'cpuset' description in 'update_parent_subparts_cpumask' kernel/cgroup/cpuset.c:3909: warning: expecting prototype for cpuset_mem_spread_node(). Prototype was for cpuset_spread_node() instead Also drop a blank line before EXPORT_SYMBOL_GPL() to be consistent with kernel coding style. Signed-off-by: Randy Dunlap Cc: Waiman Long Cc: Zefan Li Cc: Tejun Heo Cc: Johannes Weiner Cc: cgroups@vger.kernel.org Signed-off-by: Tejun Heo commit a1d3281450ab24108631a8b0f7cd9f27de717e0e Author: Christopher Obbard Date: Mon Jan 9 16:58:01 2023 +0100 arm64: dts: rockchip: Add rock-5b board Add board file for the RK3588 Rock 5B board. This is a basic implementation which just brings up the eMMC and UART which is enough to successfully boot Linux. The ethernet controller is connected via PCIe so support will come in a follow-up patch. Signed-off-by: Christopher Obbard Reviewed-by: Michael Riesch Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20230109155801.51642-8-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner commit d1824cf9579924737da64b3eba5ad3129ad67f28 Author: Sebastian Reichel Date: Mon Jan 9 16:58:00 2023 +0100 arm64: dts: rockchip: Add rock-5a board Add board file for the RK3588s Rock 5A board. While the hardware offers plenty of peripherals and connectivity this basic implementation just handles things required to access eMMC, UART and Ethernet (i.e. enough to successfully boot Linux). Reviewed-by: Michael Riesch Tested-by: Benjamin Gaignard Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20230109155801.51642-7-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner commit e904ca928a3f6d73df062da63a91e346e084a63a Author: Kever Yang Date: Mon Jan 9 16:57:59 2023 +0100 arm64: dts: rockchip: Add rk3588-evb1 board Add board file for the RK3588 evaluation board. While the hardware offers plenty of peripherals and connectivity this basic implementation just handles things required to successfully boot Linux from eMMC, connect via UART or Ethernet. Signed-off-by: Kever Yang [rebase, update commit message, use EVB1 for SoC bringup] Reviewed-by: Michael Riesch Signed-off-by: Sebastian Reichel Reviewed-by: Jagan Teki Link: https://lore.kernel.org/r/20230109155801.51642-6-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner commit 999f0ec365f608c6c86e6af54de90574e360a876 Author: Sebastian Reichel Date: Mon Jan 9 16:57:58 2023 +0100 dt-bindings: arm: rockchip: add initial rk3588 boards Add DT binding documentation for the Rockchip RK3588 EVB1, Radxa Rock 5 Model A and B. Co-Developed-by: Christopher Obbard Signed-off-by: Christopher Obbard Acked-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel Reviewed-by: Jagan Teki Link: https://lore.kernel.org/r/20230109155801.51642-5-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner commit c9211fa2602b87849086dd061da78b5e2dee1f3c Author: Kever Yang Date: Mon Jan 9 16:57:57 2023 +0100 arm64: dts: rockchip: Add base DT for rk3588 SoC This initial version supports CPU, dma, interrupts, timers, UART and SDHCI (everything necessary to boot Linux on this system on chip) as well as Ethernet, I2C, PWM and SPI. The DT is split into rk3588 and rk3588s, which is a reduced version (i.e. with less peripherals) of the former. Co-Developed-by: Yifeng Zhao Signed-off-by: Yifeng Zhao Co-Developed-by: Elaine Zhang Signed-off-by: Elaine Zhang Co-Developed-by: Sugar Zhang Signed-off-by: Sugar Zhang Signed-off-by: Kever Yang [rebase, squash and reword commit message] Signed-off-by: Sebastian Reichel Acked-by: Jagan Teki Tested-by: Jagan Teki # edgeble-neu6a Link: https://lore.kernel.org/r/20230109155801.51642-4-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner commit d85f8a5c798d593366d0e0acdb6a547591a7aaff Author: Jianqun Xu Date: Mon Jan 9 16:57:56 2023 +0100 arm64: dts: rockchip: Add rk3588 pinctrl data This adds the pin controller data for rk3588 and rk3588s. Co-Developed-by: Shengfei Xu Signed-off-by: Shengfei Xu Co-Developed-by: Damon Ding Signed-off-by: Damon Ding Co-Developed-by: Steven Liu Signed-off-by: Steven Liu Co-Developed-by: Jon Lin Signed-off-by: Jon Lin Co-Developed-by: Finley Xiao Signed-off-by: Finley Xiao Signed-off-by: Jianqun Xu [port from vendor tree merging all fixes] Reviewed-by: Linus Walleij Signed-off-by: Sebastian Reichel Acked-by: Jagan Teki Tested-by: Jagan Teki # edgeble-neu6a Link: https://lore.kernel.org/r/20230109155801.51642-3-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner commit 306f74d278480e21ebbab01f88c68cd6c96eed41 Author: Sebastian Reichel Date: Mon Jan 9 16:57:55 2023 +0100 dt-bindings: soc: rockchip: add initial rk3588 syscon compatibles Add IOC and PHP GRF syscon compatibles for RK3588. Acked-by: Rob Herring Signed-off-by: Sebastian Reichel Reviewed-by: Jagan Teki Link: https://lore.kernel.org/r/20230109155801.51642-2-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner commit 87ecb88223e2f8f3e6dbfb72c29ff6eb60abcc74 Author: Manoj Sai Date: Thu Nov 24 12:57:14 2022 +0530 arm64: dts: rockchip: increase spi-max-frequency of nor flash for roc-rk3399-pc Increase the spi-max-frequency of nor flash from 10Mhz to 30Mhz,this improves the flash raw write speed by 0.9 MB/s to 1.6MB/s and the time taken to write is get reduced from 36 seconds to 20 seconds. Signed-off-by: Manoj Sai Link: https://lore.kernel.org/r/20221124072714.450223-1-abbaraju.manojsai@amarulasolutions.com Signed-off-by: Heiko Stuebner commit dd48a03066deb5425fd73aacb073a1d00f72643e Author: Chris Morgan Date: Thu Dec 1 14:36:55 2022 -0600 arm64: dts: rockchip: Update leds for Odroid Go Advance Update the blue LED to be controlled via pwm to enable control of LED brightness. Add red LED as a GPIO controlled LED. The documentation stated "label" was depreciated so function and color was used instead. The LED names (led-2 and led-3) are given because that is what they are numbered on the board itself; LED 1 is wired directly into an always on regulator and is not controllable. LED 2 is labelled "alive" on the board and documentation recommends we set the function as status over other miscellaneous functions. LED 3 is labelled "chg" on the board. Signed-off-by: Chris Morgan Link: https://lore.kernel.org/r/20221201203655.1245-5-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner commit 1b5aaeda74418938f07025211835cac81f603a5c Author: Chris Morgan Date: Thu Dec 1 14:36:54 2022 -0600 arm64: dts: rockchip: update px30 thermal zones for GPU Without the trips, the following errors are received in the dmesg log and the rockchip-thermal driver fails to load the gpu sensor: "thermal_sys: Failed to find 'trips' node" "rockchip-thermal ff280000.tsadc: failed to register sensor 1: -22" Trip values are assumed, unfortunately, as the same values as the CPU. The datasheet and TRM didn't appear to have any information regarding thermals for the GPU. Stress tested successfully on my Odroid Go Advance. Signed-off-by: Chris Morgan Link: https://lore.kernel.org/r/20221201203655.1245-4-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner commit b8e3a0ff7674273b83c382b278bec49db7460e67 Author: Chris Morgan Date: Thu Dec 1 14:36:53 2022 -0600 arm64: dts: rockchip: don't set cpll rate for Odroid Go The Odroid Go Advance devicetree tries to set the rate for the cpll clock to 17MHz, which is not a supported rate. This fails, and triggers the error of "clk: couldn't set cpll clk rate to 17000000 (-22), current rate: 17000000" in the dmesg log. Remove the incorrect rate. Signed-off-by: Chris Morgan Link: https://lore.kernel.org/r/20221201203655.1245-3-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner commit 0d4343988194a8336f2df8d2df766074a733b2c8 Author: Chris Morgan Date: Thu Dec 1 14:36:52 2022 -0600 arm64: dts: rockchip: Change audio card name for Odroid Go Change the audio card name for the Odroid Go Advance series to rk817_int. This matches the audio card name of the Anbernic RG353V. This is done to provide a consistent card name so that a single ALSA UCM file can be used for all (identical) implementations of this codec and configuration combo. The rk817_int configuration is for when the internal speaker amplifier of the rk817 is used. The other Anbernic devices have the name as rk817_ext for when an external speaker amplifier is used. Signed-off-by: Chris Morgan Link: https://lore.kernel.org/r/20221201203655.1245-2-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner commit 51712e1d014aaaa4c6e1e7e84932d58b5c0f59ed Author: Chukun Pan Date: Sat Dec 3 15:41:49 2022 +0800 arm64: dts: rockchip: rk3328: Add Orange Pi R1 Plus Orange Pi R1 Plus is a Rockchip RK3328 based SBC by Xunlong. This device is similar to the NanoPi R2S, and has a 16MB SPI NOR (mx25l12805d). The reset button is changed to directly reset the power supply, another detail is that both network ports have independent MAC addresses. Signed-off-by: Chukun Pan Link: https://lore.kernel.org/r/20221203074149.11543-3-amadeus@jmu.edu.cn Signed-off-by: Heiko Stuebner commit 229e312019dd1fd82d4e1cbffef226288cde4357 Author: Chukun Pan Date: Sat Dec 3 15:41:48 2022 +0800 dt-bindings: arm: rockchip: Add Orange Pi R1 Plus Add devicetree binding documentation for the Orange Pi R1 Plus. Signed-off-by: Chukun Pan Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221203074149.11543-2-amadeus@jmu.edu.cn Signed-off-by: Heiko Stuebner commit 6e97ac440b345b42d0025fcaee4d30d381fe438c Author: Alex Riabchenko Date: Wed Dec 14 16:54:33 2022 +0100 arm64: dts: rockchip: Add IR receiver to BPI-R2Pro Add the infrared receiver and its associated pinctrl entry. Based on Aurelien Jarno's patchset: https://lore.kernel.org/lkml/20220930051246.391614-14-aurelien@aurel32.net/ Signed-off-by: Alex Riabchenko Signed-off-by: Frank Wunderlich Link: https://lore.kernel.org/r/20221214155433.112257-1-linux@fw-web.de Signed-off-by: Heiko Stuebner commit cdf46cdbabfce6f1fa2843be7c396bc8bcff97e8 Author: Andy Yan Date: Sun Jan 8 19:08:17 2023 +0800 arm64: dts: rockchip: Add dts for EmbedFire rk3568 LubanCat 2 LubanCat 2 is a rk3568 based SBC from EmbedFire. Specification: - Rockchip rk3568 - LPDDR4/4X 1/2/4/8 GB - TF scard slot - eMMC 8/32/64/128 GB - Gigabit ethernet x 2 - HDMI out - USB 2.0 Host x 1 - USB 2.0 Type-C OTG x 1 - USB 3.0 Host x 1 - Mini PCIE interface for WIFI/BT module - M.2 key for 2280 NVME - 40 pin header Signed-off-by: Andy Yan Link: https://lore.kernel.org/r/20230108110817.2214859-1-andyshrk@163.com Signed-off-by: Heiko Stuebner commit 7b1aa1613edc57dc505aaa91df4bf321e87d209c Author: Andy Yan Date: Sun Jan 8 19:07:42 2023 +0800 dt-bindings: arm: rockchip: Add EmbedFire LubanCat 2 Add EmbedFire LubanCat 2 Signed-off-by: Andy Yan Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230108110742.2214800-1-andyshrk@163.com Signed-off-by: Heiko Stuebner commit a8e35c4bebe440ff2d5ea7e5eaece6c4de168700 Author: Furkan Kardame Date: Mon Jan 9 23:32:33 2023 +0300 arm64: dts: rockchip: add audio nodes to rk3566-roc-pc This patch adds simple audio card nodes Enabled i2s0_8ch as it is needed for hdmi audio Added i2s1_8ch as it is needed for 3.5mm audio jack and limit it to a single-channel, as i2s1m0_sdo{1,2,3} and i2s1m0_sdi{1,2,3} are used by pcie. Signed-off-by: Furkan Kardame Link: https://lore.kernel.org/r/20230109203232.45192-1-f.kardame@manjaro.org [dropped the duplicate i2s@fe410000 node] Signed-off-by: Heiko Stuebner commit af0e26beaa693cc0cb0472b80a33a5831103d22f Author: James Hilliard Date: Mon Jan 9 18:45:04 2023 -0700 bpftool: Add missing quotes to libbpf bootstrap submake vars When passing compiler variables like CC=$(HOSTCC) to a submake we must ensure the variable is quoted in order to handle cases where $(HOSTCC) may be multiple binaries. For example when using ccache $HOSTCC may be: "/usr/bin/ccache /usr/bin/gcc" If we pass CC without quotes like CC=$(HOSTCC) only the first "/usr/bin/ccache" part will be assigned to the CC variable which will cause an error due to dropping the "/usr/bin/gcc" part of the variable in the submake invocation. This fixes errors such as: /usr/bin/ccache: invalid option -- 'd' Signed-off-by: James Hilliard Signed-off-by: Daniel Borkmann Acked-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20230110014504.3120711-1-james.hilliard1@gmail.com commit 50f6f34e605b58079bd99d23c5da85347b673ef4 Author: Arnd Bergmann Date: Thu Sep 29 15:39:13 2022 +0200 ARM: footbridge: remove CATS Nobody seems to have a CATS machine any more, so remove it now, leaving only NetWinder and EBSA285. Cc: Russell King Acked-by: Linus Walleij Signed-off-by: Arnd Bergmann commit 046cd3c6987c6671b3ac5405771e79f6b763ff4d Author: Arnd Bergmann Date: Fri Sep 30 15:24:13 2022 +0200 gpio: remove iop driver The iop32x platform was removed, and its gpio driver is now orphaned. Cc: Lennert Buytenhek Acked-by: Linus Walleij Acked-by: Bartosz Golaszewski Signed-off-by: Arnd Bergmann commit b91a69d162aae0f097432c8166956eccf71783d3 Author: Arnd Bergmann Date: Thu Sep 29 15:31:18 2022 +0200 ARM: iop32x: remove the platform This was marked as unused in 5.19 and can now be removed Cc: Lennert Buytenhek Cc: Martin Michlmayr Acked-by: Dan Williams Acked-by: Wolfram Sang # for I2C Signed-off-by: Arnd Bergmann commit fd68572b57f2be17e18905d28e5b7165741ad48a Author: Arnd Bergmann Date: Thu Sep 22 15:28:21 2022 +0200 ARM: orion5x: remove dsa_chip_data references This is no longer used anywhere, which means we can kill off one link to gpio numbers. Cc: Andrew Lunn Signed-off-by: Arnd Bergmann commit c09846fc1ff4ced5c55840fb7f171ebc6e5478e4 Author: Arnd Bergmann Date: Thu Sep 29 15:36:58 2022 +0200 ARM: orion: remove unused board files As planned earlier, all board support that was marked unused can be removed now after nobody explicitly asked for these to be kept. In particular, all of the reference designs get removed now, as these are not commonly used productively any more. Also, the machines that were not supported by Debian or the Debian_on_Buffalo group because of limitations with RAM size are gone. Cc: Lennert Buytenhek Cc: Nicolas Pitre Cc: Imre Kaloz Signed-off-by: Arnd Bergmann commit e2fe85aa6a6387c4babe4c191e50b7af8ee37faf Author: Arnd Bergmann Date: Fri Sep 16 11:58:07 2022 +0200 ARM: mv78xx0: un-deprecate Terastation WXL This board is still being worked on by the Debian-on-Buffalo project, so let's leave it in the tree for now. Link: https://github.com/1000001101000/Debian_on_Buffalo Cc: Andrew Lunn Cc: Sebastian Hesselbarth Cc: Gregory Clement Signed-off-by: Arnd Bergmann commit 2b45e1fa9398f6dc8a242f59118d5e28fa00351f Author: Arnd Bergmann Date: Fri Sep 30 14:45:21 2022 +0200 ASoC: remove unused ep93xx files A couple of ep93xx board files were unused and got removed, so the corresponding ASoC support can also be removed. Cc: Mika Westerberg Cc: Ryan Mallon Acked-by: Mark Brown Signed-off-by: Arnd Bergmann commit ca2259c352519721a659239e187c1d3a375a8f96 Author: Arnd Bergmann Date: Thu Sep 29 15:37:53 2022 +0200 ARM: ep93xx: remove old board files These five board files were marked as unused a while ago, and nobody wanted to keep them around for longer, so remove them now. We still have the edb93xx, visision_ep9307 and ts72xx files, which can hopefully be converted to device tree in the future. Cc: Lennert Buytenhek Cc: Hubert Feurstein Acked-by: Alexander Sverdlin Signed-off-by: Arnd Bergmann commit 4ede65e1c1533977a60a4d57126dca18ed0a9124 Author: Arnd Bergmann Date: Fri Sep 30 13:09:59 2022 +0200 mmc: remove cns3xxx driver The cns3xxx platform is gone, so this driver is now orphaned. Cc: Krzysztof Halasa Acked-by: Ulf Hansson Signed-off-by: Arnd Bergmann commit e73307b9ebc4ecb02df60be441a541c37dbdce7a Author: Arnd Bergmann Date: Thu Sep 29 15:29:56 2022 +0200 ARM: cns3xxx: remove entire platform cns3xxx was marked as unused a while ago, and gets removed entirely now. Acked-by: Krzysztof Hałasa Signed-off-by: Arnd Bergmann commit 2b843f82a1821de3e7d5bd0d54d936f5671cd1fd Author: Arnd Bergmann Date: Thu Sep 29 15:12:35 2022 +0200 ARM: at91: remove stale MAINTAINER file entries Going through the entries of recently removed machine types, I found these two that were removed a long time ago. Acked-by: Nicolas Ferre Cc: Alexandre Belloni Cc: Claudiu Beznea Signed-off-by: Arnd Bergmann commit 66cf99b55e587aa4c20d5e572142dcbf80b2684d Author: Haiyue Wang Date: Sun Jan 8 23:12:57 2023 +0800 bpf: Remove the unnecessary insn buffer comparison The variable 'insn' is initialized to 'insn_buf' without being changed, only some helper macros are defined, so the insn buffer comparison is unnecessary. Just remove it. This missed removal back in 2377b81de527 ("bpf: split shared bpf_tcp_sock and bpf_sock_ops implementation"). Signed-off-by: Haiyue Wang Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20230108151258.96570-1-haiyue.wang@intel.com commit 353b18dca2c0abf7db85e59c6bdc459543317b43 Author: Dmitry Baryshkov Date: Tue Jan 3 16:55:09 2023 +0200 clk: qcom: gpucc-msm8998: switch to parent_hws Switch gfx3d_clk_src parents to use parent_hws instead of parent_data, to clarify that these clocks are internal. Signed-off-by: Dmitry Baryshkov [bjorn: Updated commit message] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103145515.1164020-16-dmitry.baryshkov@linaro.org commit 18aa0dc22d2b09eda19312aed82fe02f80d616e2 Author: Dmitry Baryshkov Date: Tue Jan 3 16:55:08 2023 +0200 clk: qcom: gcc-sm8550: switch to parent_hws Change several entries of parent_data to use parent_hws instead, which results in slightly more ovbious code. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103145515.1164020-15-dmitry.baryshkov@linaro.org commit 1b299e87b1c731a77ec397da15cefc5acbeb1f15 Author: Dmitry Baryshkov Date: Tue Jan 3 16:55:07 2023 +0200 clk: qcom: gcc-sm8450: switch to parent_hws Change several entries of parent_data to use parent_hws instead, which results in slightly more ovbious code. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103145515.1164020-14-dmitry.baryshkov@linaro.org commit 6df8ecd018ae6012ee8f402c342ad5bb23106487 Author: Dmitry Baryshkov Date: Tue Jan 3 16:55:06 2023 +0200 clk: qcom: gcc-sm8250: switch to parent_hws Change several entries of parent_data to use parent_hws instead, which results in slightly more ovbious code. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103145515.1164020-13-dmitry.baryshkov@linaro.org commit 5d0e6922b8a300de941bd552d95365ec2892f7ad Author: Dmitry Baryshkov Date: Tue Jan 3 16:55:05 2023 +0200 clk: qcom: gcc-sm6375: switch to parent_hws Change several entries of parent_data to use parent_hws instead, which results in slightly more ovbious code. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103145515.1164020-12-dmitry.baryshkov@linaro.org commit 76ffb1921084ae64ccfe107bef5e5d4b351ebc55 Author: Dmitry Baryshkov Date: Tue Jan 3 16:55:04 2023 +0200 clk: qcom: gcc-sdx65: switch to parent_hws Change several entries of parent_data to use parent_hws instead, which results in slightly more ovbious code. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103145515.1164020-11-dmitry.baryshkov@linaro.org commit a28c07fc915bebc0f79ab9957f7a7a4077cef22a Author: Dmitry Baryshkov Date: Tue Jan 3 16:55:03 2023 +0200 clk: qcom: gcc-sc7280: switch to parent_hws Change several entries of parent_data to use parent_hws instead, which results in slightly more ovbious code. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103145515.1164020-10-dmitry.baryshkov@linaro.org commit bbedddafa069773fdb085155117c873343959b50 Author: Dmitry Baryshkov Date: Tue Jan 3 16:55:02 2023 +0200 clk: qcom: gcc-sc7180: switch to parent_hws Change several entries of parent_data to use parent_hws instead, which results in slightly more ovbious code. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103145515.1164020-9-dmitry.baryshkov@linaro.org commit fec6a7b5454baa41b5879b2763e952efc57c6ba6 Author: Dmitry Baryshkov Date: Tue Jan 3 16:55:01 2023 +0200 clk: qcom: gcc-msm8976: switch to parent_hws Change several entries of parent_data to use parent_hws instead, which results in slightly more ovbious code. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103145515.1164020-8-dmitry.baryshkov@linaro.org commit 3f1c24b9674a1cd30fdd3d66f9244a08c8f0f728 Author: Dmitry Baryshkov Date: Tue Jan 3 16:55:00 2023 +0200 clk: qcom: gcc-msm8939: switch to parent_hws Change several entries of parent_data to use parent_hws instead, which results in slightly more ovbious code. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103145515.1164020-7-dmitry.baryshkov@linaro.org commit a2a796c1d6859b32c686388d762612b03d9a2bdb Author: Dmitry Baryshkov Date: Tue Jan 3 16:54:59 2023 +0200 clk: qcom: camcc-sm8450: switch to parent_hws Change several entries of parent_data to use parent_hws instead, which results in slightly more ovbious code. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103145515.1164020-6-dmitry.baryshkov@linaro.org commit 17f0b48f8de68776f1ba7498695f26262016cb44 Author: Dmitry Baryshkov Date: Tue Jan 3 16:54:58 2023 +0200 clk: qcom: camcc-sc7280: switch to parent_hws Change several entries of parent_data to use parent_hws instead, which results in slightly more ovbious code. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103145515.1164020-5-dmitry.baryshkov@linaro.org commit 0e042233bd56e8731fc9455cca391fce9e7468ec Author: Dmitry Baryshkov Date: Tue Jan 3 16:54:57 2023 +0200 clk: qcom: dispcc-sm6375: switch to parent_hws Change several entries of parent_data to use parent_hws instead, which results in slightly more ovbious code. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103145515.1164020-4-dmitry.baryshkov@linaro.org commit a9e46af1718a206b79f8801ad258e773cec81c49 Author: Dmitry Baryshkov Date: Tue Jan 3 16:54:56 2023 +0200 clk: qcom: dispcc-sc7180: switch to parent_hws Change several entries of parent_data to use parent_hws instead, which results in slightly more ovbious code. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103145515.1164020-3-dmitry.baryshkov@linaro.org commit 5c0df30cb3e431b9bcc10b457bb9fda388842035 Author: Dmitry Baryshkov Date: Tue Jan 3 16:54:55 2023 +0200 clk: qcom: dispcc-sm8450: switch to parent_hws Change several entries of parent_data to use parent_hws instead, which results in slightly more ovbious code. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103145515.1164020-2-dmitry.baryshkov@linaro.org commit f840834a8b60ffd305f03a53007605ba4dfbbc4b Author: Animesh Manna Date: Fri Dec 23 15:05:09 2022 +0200 drm/i915/mtl: update scaler source and destination limits for MTL The max source and destination limits for scalers in MTL have changed. Use the new values accordingly. Signed-off-by: José Roberto de Souza Signed-off-by: Animesh Manna Signed-off-by: Luca Coelho Reviewed-by: Stanislav Lisovskiy Signed-off-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20221223130509.43245-3-luciano.coelho@intel.com commit 8d4312e2b228ba7a5ac79154458098274ec61e9b Author: Luca Coelho Date: Fri Dec 23 15:05:08 2022 +0200 drm/i915/mtl: limit second scaler vertical scaling in ver >= 14 In newer hardware versions (i.e. display version >= 14), the second scaler doesn't support vertical scaling. The current implementation of the scaling limits is simplified and only occurs when the planes are created, so we don't know which scaler is being used. In order to handle separate scaling limits for horizontal and vertical scaling, and different limits per scaler, split the checks in two phases. We first do a simple check during plane creation and use the best-case scenario (because we don't know the scaler that may be used at a later point) and then do a more specific check when the scalers are actually being set up. Signed-off-by: Luca Coelho Reviewed-by: Stanislav Lisovskiy Signed-off-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20221223130509.43245-2-luciano.coelho@intel.com commit a46674396189d045993c7e4aed2c61b166b6585e Author: Dario Binacchi Date: Tue Dec 6 18:09:13 2022 +0100 ARM: BCM63xx: remove useless goto statement Between the 'goto out' statement and the 'out' label there are no other statements, so it is useless to check the return value of the bcm63xx_pmb_power_on_cpu() function. Then, let's remove the statements that are unnecessarily executed. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20221206170913.3316205-1-dario.binacchi@amarulasolutions.com Signed-off-by: Florian Fainelli commit 94214f145bdf91bd5a60657c71ca6df6ec0fd0b6 Author: Uwe Kleine-König Date: Mon Dec 12 23:25:47 2022 +0100 soc: bcm: bcm2835-power: 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 Link: https://lore.kernel.org/r/20221212222549.3779846-2-u.kleine-koenig@pengutronix.de Signed-off-by: Florian Fainelli commit b76e1186a6953d39daa4f8de304929e2bbc70aa1 Author: Krzysztof Kozlowski Date: Thu Dec 22 10:24:56 2022 +0100 arm64: dts: broadcom: align SMMU node names with DT schema DT schema expects certain pattern for IOMMU/SMMU nodes: northstar2/ns2-svk.dtb: mmu@64000000: $nodename:0: 'mmu@64000000' does not match '^iommu@[0-9a-f]*' Signed-off-by: Krzysztof Kozlowski Acked-by: Ray Jui Link: https://lore.kernel.org/r/20221222092456.79203-1-krzysztof.kozlowski@linaro.org Signed-off-by: Florian Fainelli commit a290296ab8326e04a9fefd698ca9367dc72c0a87 Author: Ammar Faizi Date: Tue Jan 10 08:24:34 2023 +0100 selftests/nolibc: Add `getpagesize(2)` selftest Test the getpagesize() function. Make sure it returns the correct value. Signed-off-by: Ammar Faizi Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 7efd762e97c87f07b0a93e428e5ce3436715f538 Author: Ammar Faizi Date: Tue Jan 10 08:24:33 2023 +0100 nolibc/sys: Implement `getpagesize(2)` function This function returns the page size used by the running kernel. The page size value is taken from the auxiliary vector at 'AT_PAGESZ' key. 'getpagesize(2)' is assumed as a syscall becuase the manpage placement of this function is in entry 2 ('man 2 getpagesize') despite there is no real 'getpagesize(2)' syscall in the Linux syscall table. Define this function in 'sys.h'. Signed-off-by: Ammar Faizi Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit c61a078015f325fe38a7371ab0b12d4444f5fba4 Author: Ammar Faizi Date: Tue Jan 10 08:24:32 2023 +0100 nolibc/stdlib: Implement `getauxval(3)` function Previous commits save the address of the auxiliary vector into a global variable @_auxv. This commit creates a new function 'getauxval()' as a helper function to get the auxv value based on the given key. The behavior of this function is identic with the function documented in 'man 3 getauxval'. This function is also needed to implement 'getpagesize()' function that we will wire up in the next patches. Signed-off-by: Ammar Faizi Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 241c4b4e02f25ceab21df8a28e1ac689a477c30c Author: Sven Schnelle Date: Tue Jan 10 08:24:31 2023 +0100 tools/nolibc: add auxiliary vector retrieval for s390 In the _start block we now iterate over envp to find the auxiliary vector after the NULL. The pointer is saved into an _auxv variable that is marked as weak so that it's accessible from multiple units. Signed-off-by: Sven Schnelle Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit d01869cf1ee4ad6e02e853062eeced883b3b4504 Author: Willy Tarreau Date: Tue Jan 10 08:24:30 2023 +0100 tools/nolibc: add auxiliary vector retrieval for mips In the _start block we now iterate over envp to find the auxiliary vector after the NULL. The pointer is saved into an _auxv variable that is marked as weak so that it's accessible from multiple units. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 041fa97cb332e59311aa861fac3be178abad6a9b Author: Willy Tarreau Date: Tue Jan 10 08:24:29 2023 +0100 tools/nolibc: add auxiliary vector retrieval for riscv In the _start block we now iterate over envp to find the auxiliary vector after the NULL. The pointer is saved into an _auxv variable that is marked as weak so that it's accessible from multiple units. It was tested on riscv64 only. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 59ea1876242163da431026921070282b2d651197 Author: Willy Tarreau Date: Tue Jan 10 08:24:28 2023 +0100 tools/nolibc: add auxiliary vector retrieval for arm In the _start block we now iterate over envp to find the auxiliary vector after the NULL. The pointer is saved into an _auxv variable that is marked as weak so that it's accessible from multiple units. Signed-off-by: Willy Tarreau It was tested in arm, thumb1 and thumb2 modes. Signed-off-by: Paul E. McKenney commit 2a39a53245d2b5eae83c10a67581e8dc6b629b85 Author: Willy Tarreau Date: Tue Jan 10 08:24:27 2023 +0100 tools/nolibc: add auxiliary vector retrieval for arm64 In the _start block we now iterate over envp to find the auxiliary vector after the NULL. The pointer is saved into an _auxv variable that is marked as weak so that it's accessible from multiple units. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 1cce162ab4a565c8a88ffac1d9f78c80e160d6a1 Author: Willy Tarreau Date: Tue Jan 10 08:24:26 2023 +0100 tools/nolibc: add auxiliary vector retrieval for x86_64 In the _start block we now iterate over envp to find the auxiliary vector after the NULL. The pointer is saved into an _auxv variable that is marked as weak so that it's accessible from multiple units. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 2ab4aa487b93d9d994b4a20382848a4041f00d78 Author: Willy Tarreau Date: Tue Jan 10 08:24:25 2023 +0100 tools/nolibc: add auxiliary vector retrieval for i386 In the _start block we now iterate over envp to find the auxiliary vector after the NULL. The pointer is saved into an _auxv variable that is marked as weak so that it's accessible from multiple units. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 9e5bdc613d06fdc6fed73267767c09a0dc0c6aac Author: Sven Schnelle Date: Tue Jan 10 08:24:24 2023 +0100 tools/nolibc: export environ as a weak symbol on s390 The environ is retrieved from the _start code and is easy to store at this moment. Let's declare the variable weak and store the value into it. By not being static it will be visible to all units. By being weak, if some programs already declared it, they will continue to be able to use it. This was tested on s390 both with environ inherited from _start and extracted from envp. Signed-off-by: Sven Schnelle Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 758f33379569d817558a4310c47b42834b8e4e57 Author: Willy Tarreau Date: Tue Jan 10 08:24:23 2023 +0100 tools/nolibc: export environ as a weak symbol on riscv The environ is retrieved from the _start code and is easy to store at this moment. Let's declare the variable weak and store the value into it. By not being static it will be visible to all units. By being weak, if some programs already declared it, they will continue to be able to use it. This was tested on riscv64 both with environ inherited from _start and extracted from envp. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 8f7fafebd1da984c427d53b614e48ebecb456824 Author: Willy Tarreau Date: Tue Jan 10 08:24:22 2023 +0100 tools/nolibc: export environ as a weak symbol on mips The environ is retrieved from the _start code and is easy to store at this moment. Let's declare the variable weak and store the value into it. By not being static it will be visible to all units. By being weak, if some programs already declared it, they will continue to be able to use it. This was tested with mips24kc (BE) both with environ inherited from _start and extracted from envp. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit a6f29a2c41f3d283e78e00dc8974e6efacaccf37 Author: Willy Tarreau Date: Tue Jan 10 08:24:21 2023 +0100 tools/nolibc: export environ as a weak symbol on arm The environ is retrieved from the _start code and is easy to store at this moment. Let's declare the variable weak and store the value into it. By not being static it will be visible to all units. By being weak, if some programs already declared it, they will continue to be able to use it. This was tested in arm and thumb1 and thumb2 modes, and for each mode, both with environ inherited from _start and extracted from envp. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 9b8688c6eaddcdf0db600953d57beaeafaae1155 Author: Willy Tarreau Date: Tue Jan 10 08:24:20 2023 +0100 tools/nolibc: export environ as a weak symbol on arm64 The environ is retrieved from the _start code and is easy to store at this moment. Let's declare the variable weak and store the value into it. By not being static it will be visible to all units. By being weak, if some programs already declared it, they will continue to be able to use it. This was tested both with environ inherited from _start and extracted from envp. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 52e423f5b93e6d30fd5d311f068094b768caffb5 Author: Willy Tarreau Date: Tue Jan 10 08:24:19 2023 +0100 tools/nolibc: export environ as a weak symbol on i386 The environ is retrieved from the _start code and is easy to store at this moment. Let's declare the variable weak and store the value into it. By not being static it will be visible to all units. By being weak, if some programs already declared it, they will continue to be able to use it. This was tested both with environ inherited from _start and extracted from envp. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 89dc50921c87e2b4a4612188c5a90abebc02b60d Author: Willy Tarreau Date: Tue Jan 10 08:24:18 2023 +0100 tools/nolibc: export environ as a weak symbol on x86_64 The environ is retrieved from the _start code and is easy to store at this moment. Let's declare the variable weak and store the value into it. By not being static it will be visible to all units. By being weak, if some programs already declared it, they will continue to be able to use it. This was tested both with environ inherited from _start and extracted from envp. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 1caa1154c3e9ad071a07c02431a700ff5df94392 Author: Willy Tarreau Date: Tue Jan 10 08:24:17 2023 +0100 tools/nolibc: make errno a weak symbol instead of a static one Till now errno was declared static so that it could be eliminated if unused. While the goal is commendable for tiny executables as it allows to eliminate any data and bss segments when not used, this comes with some limitations, one of which being that the errno symbol seen in different units are not the same. Even though this has never been a real issue given the nature of the programs involved till now, it happens that referencing the same symbol from multiple units can also be achieved using weak symbols, with a difference being that only one of them will be used for all of them. Compared to weak symbols, static basically have no benefit for regular programs since there are always at least a few variables in most of these, so the bss segment cannot be eliminated. E.g: $ size nolibc-test-static-errno text data bss dec hex filename 11531 0 48 11579 2d3b nolibc-test-static-errno Furthermore, the weak symbol doesn't use bss storage at all, resulting in a slightly section: $ size nolibc-test-weak-errno text data bss dec hex filename 11531 0 40 11571 2d33 nolibc-test-weak-errno This patch thus converts errno from static to weak. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit d5b48f958b36e38ee1a9bebb522bdd86114c34ae Author: Willy Tarreau Date: Tue Jan 10 08:24:16 2023 +0100 tools/nolibc: remove local definitions of O_* flags for open/fcntl The historic nolibc code did not include asm/fcntl.h and had to define the various O_RDWR etc macros in each arch-specific file (since such values differ between certain archs). This was found at least once to induce bugs due to wrong definitions. Let's get rid of all of them and include asm/nolibc.h from sys.h instead. This was verified to work properly on all supported architectures. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 5a51b6de5968885347e559d0dac8307a38005806 Author: Willy Tarreau Date: Tue Jan 10 08:24:15 2023 +0100 tools/nolibc: support thumb mode with frame pointers on ARM In Thumb mode, register r7 is normally used to store the frame pointer. By default when optimizing at -Os there's no frame pointer so this works fine. But if no optimization is set, then build errors occur, indicating that r7 cannot not be used. It's difficult to cheat because it's the compiler that is complaining, not the assembler, so it's not even possible to report that the register was clobbered. The solution consists in saving and restoring r7 around the syscall, but this slightly inflates the code. The syscall number is passed via r6 which is never used by syscalls. The current patch adds a few macroes which do that only in Thumb mode, and which continue to directly assign the syscall number to register r7 in ARM mode. Now this always builds and works for all modes (tested on Arm, Thumbv1, Thumbv2 modes, at -Os, -O0, -O0 -fomit-frame-pointer). The code is very slightly inflated in thumb-mode without frame-pointers compared to previously (e.g. 7928 vs 7864 bytes for nolibc-test) but at least it's always operational. And it's possible to disable this mechanism by setting NOLIBC_OMIT_FRAME_POINTER. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 20470dfd656ef71145d78102b540f73a11748182 Author: Willy Tarreau Date: Tue Jan 10 08:24:14 2023 +0100 tools/nolibc: enable support for thumb1 mode for ARM Passing -mthumb to the kernel.org arm toolchain failed to build because it defaults to armv5 hence thumb1, which has a fairly limited instruction set compared to thumb2 enabled with armv7 that is much more complete. It's not very difficult to adjust the instructions to also build on thumb1, it only adds a total of 3 instructions, so it's worth doing it at least to ease use by casual testers. It was verified that the adjusted code now builds and works fine for armv5, thumb1, armv7 and thumb2, as long as frame pointers are not used. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 7f8548589661d5edbde4c343e4971117585da2f5 Author: Willy Tarreau Date: Tue Jan 10 08:24:13 2023 +0100 tools/nolibc: make compiler and assembler agree on the section around _start The out-of-block asm() statement carrying _start does not allow the compiler to know what section the assembly code is being emitted to, and there's no easy way to push/pop the current section and restore it. It sometimes causes issues depending on the include files ordering and compiler optimizations. For example if a variable is declared immediately before the asm() block and another one after, the compiler assumes that the current section is still .bss and doesn't re-emit it, making the second variable appear inside the .text section instead. Forcing .bss at the end of the _start block doesn't work either because at certain optimizations the compiler may reorder blocks and will make some real code appear just after this block. A significant number of solutions were attempted, but many of them were still sensitive to section reordering. In the end, the best way to make sure the compiler and assembler agree on the current section is to place this code inside a function. Here the function is directly called _start and configured not to emit a frame-pointer, hence to have no prologue. If some future architectures would still emit some prologue, another working approach consists in naming the function differently and placing the _start label inside the asm statement. But the current solution is simpler. It was tested with nolibc-test at -O,-O0,-O2,-O3,-Os for arm,arm64,i386, mips,riscv,s390 and x86_64. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 441529bed41cd6f368fe337ebbb4920e3519da24 Author: Prashant Malani Date: Wed Jan 4 06:08:45 2023 +0000 platform/chrome: cros_typec_switch: Check for retimer flag Not all ports have retimers. Only register a retimer switch if the "retimer-switch" property is present for that port's mux device. Signed-off-by: Prashant Malani Reviewed-by: Benson Leung Link: https://lore.kernel.org/r/20230104060846.112216-2-pmalani@chromium.org commit ef9c00dbd383d2b68207cc996caa05c25c7894f5 Author: Prashant Malani Date: Wed Jan 4 06:08:44 2023 +0000 platform/chrome: cros_typec_switch: Use fwnode* prop check Using device_property_present() multiple times on an ACPI device leads to kernel panics on Chromebook systems. This happens when there is > 1 boolean property in an ACPI device which is created dynamically by the BIOS as part of SSDT[1] on Chromebook systems Since fwnode_* can handle simple device tree properties equally well, switch to using the fwnode_property_present() function version. This will avoid panics and make the usage consistent when we introduce a check for the 2nd property in a subsequent patch. [1] https://wiki.osdev.org/SSDT Signed-off-by: Prashant Malani Reviewed-by: Benson Leung Link: https://lore.kernel.org/r/20230104060846.112216-1-pmalani@chromium.org commit 9ce0f7c4bc64d820b02a1c53f7e8dba9539f942b Author: Kajetan Puchalski Date: Thu Jan 5 14:51:59 2023 +0000 cpuidle: teo: Introduce util-awareness Modern interactive systems, such as recent Android phones, tend to have power efficient shallow idle states. Selecting deeper idle states on a device while a latency-sensitive workload is running can adversely impact performance due to increased latency. Additionally, if the CPU wakes up from a deeper sleep before its target residency as is often the case, it results in a waste of energy on top of that. At the moment, none of the available idle governors take any scheduling information into account. They also tend to overestimate the idle duration quite often, which causes them to select excessively deep idle states, thus leading to increased wakeup latency and lower performance with no power saving. For 'menu' while web browsing on Android for instance, those types of wakeups ('too deep') account for over 24% of all wakeups. At the same time, on some platforms idle state 0 can be power efficient enough to warrant wanting to prefer it over idle state 1. This is because the power usage of the two states can be so close that sufficient amounts of too deep state 1 sleeps can completely offset the state 1 power saving to the point where it would've been more power efficient to just use state 0 instead. This is, of course, for systems where state 0 is not a polling state, such as arm-based devices. Sleeps that happened in state 0 while they could have used state 1 ('too shallow') only save less power than they otherwise could have. Too deep sleeps, on the other hand, harm performance and nullify the potential power saving from using state 1 in the first place. While taking this into account, it is clear that on balance it is preferable for an idle governor to have more too shallow sleeps instead of more too deep sleeps on those kinds of platforms. This patch specifically tunes TEO to prefer shallower idle states in order to reduce wakeup latency and achieve better performance. To this end, before selecting the next idle state it uses the avg_util signal of a CPU's runqueue in order to determine to what extent the CPU is being utilized. This util value is then compared to a threshold defined as a percentage of the CPU's capacity (capacity >> 6 ie. ~1.5% in the current implementation). If the util is above the threshold, the index of the idle state selected by TEO metrics will be reduced by 1, thus selecting a shallower state. If the util is below the threshold, the governor defaults to the TEO metrics mechanism to try to select the deepest available idle state based on the closest timer event and its own correctness. The main goal of this is to reduce latency and increase performance for some workloads. Under some workloads it will result in an increase in power usage (Geekbench 5) while for other workloads it will also result in a decrease in power usage compared to TEO (PCMark Web, Jankbench, Speedometer). It can provide drastically decreased latency and performance benefits in certain types of workloads that are sensitive to latency. Example test results: 1. GB5 (better score, latency & more power usage) | metric | menu | teo | teo-util-aware | | ------------------------------------- | -------------- | ----------------- | ----------------- | | gmean score | 2826.5 (0.0%) | 2764.8 (-2.18%) | 2865 (1.36%) | | gmean power usage [mW] | 2551.4 (0.0%) | 2606.8 (2.17%) | 2722.3 (6.7%) | | gmean too deep % | 14.99% | 9.65% | 4.02% | | gmean too shallow % | 2.5% | 5.96% | 14.59% | | gmean task wakeup latency (asynctask) | 78.16μs (0.0%) | 61.60μs (-21.19%) | 54.45μs (-30.34%) | 2. Jankbench (better score, latency & less power usage) | metric | menu | teo | teo-util-aware | | ------------------------------------- | -------------- | ----------------- | ----------------- | | gmean frame duration | 13.9 (0.0%) | 14.7 (6.0%) | 12.6 (-9.0%) | | gmean jank percentage | 1.5 (0.0%) | 2.1 (36.99%) | 1.3 (-17.37%) | | gmean power usage [mW] | 144.6 (0.0%) | 136.9 (-5.27%) | 121.3 (-16.08%) | | gmean too deep % | 26.00% | 11.00% | 2.54% | | gmean too shallow % | 4.74% | 11.89% | 21.93% | | gmean wakeup latency (RenderThread) | 139.5μs (0.0%) | 116.5μs (-16.49%) | 91.11μs (-34.7%) | | gmean wakeup latency (surfaceflinger) | 124.0μs (0.0%) | 151.9μs (22.47%) | 87.65μs (-29.33%) | Signed-off-by: Kajetan Puchalski [ rjw: Comment edits and white space adjustments ] Signed-off-by: Rafael J. Wysocki commit 27f850880192c19a26d89dab19e2bddcf276032f Author: Kajetan Puchalski Date: Thu Jan 5 14:51:58 2023 +0000 cpuidle: teo: Optionally skip polling states in teo_find_shallower_state() Add a no_poll flag to teo_find_shallower_state() that will let the function optionally not consider polling states. This allows the caller to guard against the function inadvertently resulting in TEO putting the CPU in a polling state when that behaviour is undesirable. Signed-off-by: Kajetan Puchalski Signed-off-by: Rafael J. Wysocki commit 5d1ab51463d6c609e65861625512f912eb1d7cb2 Author: Krzysztof Kozlowski Date: Sun Dec 4 20:05:43 2022 +0100 ARM: dts: exynos: drop unused pinctrl-names from Galaxy Tab pinctrl-names without pinctrl-0 are simply unused: exynos5420-klimt-wifi.dtb: gpio-keys: 'pinctrl-0' is a dependency of 'pinctrl-names' Link: https://lore.kernel.org/r/20221204190543.143986-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 91d89306579b7a2963e39e4711b893634ace23d6 Author: Krzysztof Kozlowski Date: Sun Dec 4 20:05:42 2022 +0100 arm64: dts: exynos: drop unsupported I2C properties in Espresso The Samsung HSI2C (High Speed I2C) bindings do not allow samsung,i2c-sda-delay (present in older S3C24xx I2C bindings): exynos7-espresso.dtb: i2c@13660000: Unevaluated properties are not allowed ('samsung,i2c-sda-delay', 'samsung,i2c-max-bus-freq' were unexpected) Link: https://lore.kernel.org/r/20221204190543.143986-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit c14f161c1feda6f654978025fb64efd7280c3223 Author: Krzysztof Kozlowski Date: Mon Jan 9 09:39:48 2023 +0100 dt-bindings: soc: samsung: exynos-sysreg: correct indentation for deprecated "deprecated" keyword was indentend wrong - entire list of compatibles starting with generic Exynos SoC compatible is deprecated. Reported-by: Rob Herring Fixes: 0a2af7bdeeb4 ("dt-bindings: soc: samsung: exynos-sysreg: add dedicated SYSREG compatibles to Exynos850") Link: https://lore.kernel.org/r/20230109083948.77462-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit e7fcfe67f9f410736b758969477b17ea285e8e6c Author: Yang Li Date: Fri Jan 6 08:59:51 2023 +0800 thermal: intel: Fix unsigned comparison with less than zero The return value from the call to intel_tcc_get_tjmax() is int, which can be a negative error code. However, the return value is being assigned to an u32 variable 'tj_max', so making 'tj_max' an int. Eliminate the following warning: ./drivers/thermal/intel/intel_soc_dts_iosf.c:394:5-11: WARNING: Unsigned expression compared with zero: tj_max < 0 Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3637 Reported-by: Abaci Robot Signed-off-by: Yang Li Acked-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit 40794dfd20e08118fc1a4fd6d3d885fc65cdda43 Author: YiPeng Chai Date: Fri Jan 6 14:04:15 2023 +0800 drm/amdgpu: Fixed bug on error when unloading amdgpu Fixed bug on error when unloading amdgpu. The error message is as follows: [ 377.706202] kernel BUG at drivers/gpu/drm/drm_buddy.c:278! [ 377.706215] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI [ 377.706222] CPU: 4 PID: 8610 Comm: modprobe Tainted: G IOE 6.0.0-thomas #1 [ 377.706231] Hardware name: ASUS System Product Name/PRIME Z390-A, BIOS 2004 11/02/2021 [ 377.706238] RIP: 0010:drm_buddy_free_block+0x26/0x30 [drm_buddy] [ 377.706264] Code: 00 00 00 90 0f 1f 44 00 00 48 8b 0e 89 c8 25 00 0c 00 00 3d 00 04 00 00 75 10 48 8b 47 18 48 d3 e0 48 01 47 28 e9 fa fe ff ff <0f> 0b 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 41 54 55 48 89 f5 53 [ 377.706282] RSP: 0018:ffffad2dc4683cb8 EFLAGS: 00010287 [ 377.706289] RAX: 0000000000000000 RBX: ffff8b1743bd5138 RCX: 0000000000000000 [ 377.706297] RDX: ffff8b1743bd5160 RSI: ffff8b1743bd5c78 RDI: ffff8b16d1b25f70 [ 377.706304] RBP: ffff8b1743bd59e0 R08: 0000000000000001 R09: 0000000000000001 [ 377.706311] R10: ffff8b16c8572400 R11: ffffad2dc4683cf0 R12: ffff8b16d1b25f70 [ 377.706318] R13: ffff8b16d1b25fd0 R14: ffff8b1743bd59c0 R15: ffff8b16d1b25f70 [ 377.706325] FS: 00007fec56c72c40(0000) GS:ffff8b1836500000(0000) knlGS:0000000000000000 [ 377.706334] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 377.706340] CR2: 00007f9b88c1ba50 CR3: 0000000110450004 CR4: 00000000003706e0 [ 377.706347] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 377.706354] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 377.706361] Call Trace: [ 377.706365] [ 377.706369] drm_buddy_free_list+0x2a/0x60 [drm_buddy] [ 377.706376] amdgpu_vram_mgr_fini+0xea/0x180 [amdgpu] [ 377.706572] amdgpu_ttm_fini+0x12e/0x1a0 [amdgpu] [ 377.706650] amdgpu_bo_fini+0x22/0x90 [amdgpu] [ 377.706727] gmc_v11_0_sw_fini+0x26/0x30 [amdgpu] [ 377.706821] amdgpu_device_fini_sw+0xa1/0x3c0 [amdgpu] [ 377.706897] amdgpu_driver_release_kms+0x12/0x30 [amdgpu] [ 377.706975] drm_dev_release+0x20/0x40 [drm] [ 377.707006] release_nodes+0x35/0xb0 [ 377.707014] devres_release_all+0x8b/0xc0 [ 377.707020] device_unbind_cleanup+0xe/0x70 [ 377.707027] device_release_driver_internal+0xee/0x160 [ 377.707033] driver_detach+0x44/0x90 [ 377.707039] bus_remove_driver+0x55/0xe0 [ 377.707045] pci_unregister_driver+0x3b/0x90 [ 377.707052] amdgpu_exit+0x11/0x6c [amdgpu] [ 377.707194] __x64_sys_delete_module+0x142/0x2b0 [ 377.707201] ? fpregs_assert_state_consistent+0x22/0x50 [ 377.707208] ? exit_to_user_mode_prepare+0x3e/0x190 [ 377.707215] do_syscall_64+0x38/0x90 [ 377.707221] entry_SYSCALL_64_after_hwframe+0x63/0xcd Signed-off-by: YiPeng Chai Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 030001288fd3570c8fff92a430f42d9b20505697 Author: Mario Limonciello Date: Wed Jan 4 09:13:34 2023 -0600 drm/amd: make amdgpu_ucode_validate static No consumers outside of amdgpu_ucode.c use amdgpu_ucode_validate anymore, so make the function static. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 79da290ef6366fbb070904f262f95df837e4cfa6 Author: Mario Limonciello Date: Wed Jan 4 08:40:28 2023 -0600 drm/amd: Use `amdgpu_ucode_release` helper for si The `amdgpu_ucode_release` helper is replacing all calls to release_firmware. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 778af6661c8be4dff73f04da0c029ae338900a56 Author: Mario Limonciello Date: Wed Jan 4 08:39:06 2023 -0600 drm/amd: Use `amdgpu_ucode_release` helper for powerplay The `amdgpu_ucode_release` helper is replacing all calls to release_firmware. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 46fa9075dc440309e08cc5291db7a047b677f495 Author: Mario Limonciello Date: Wed Jan 4 08:38:42 2023 -0600 drm/amd: Use `amdgpu_ucode_*` helpers for DMCU The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Reviewed-by: Harry Wentland Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit b31d306378d9ba88555d359406a18e13e3ddc641 Author: Mario Limonciello Date: Wed Jan 4 08:38:23 2023 -0600 drm/amd: Use `amdgpu_ucode_*` helpers for GPU info bin The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit e5a7d047f41bf78965dd3b794efe52d6a595d42b Author: Mario Limonciello Date: Wed Jan 4 08:37:32 2023 -0600 drm/amd: Use `amdgpu_ucode_*` helpers for CGS The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 52215e2a5d4ae9b6dd61c352d8284f18257dfb8e Author: Mario Limonciello Date: Wed Jan 4 08:37:20 2023 -0600 drm/amd: Use `amdgpu_ucode_*` helpers for VCE The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit b406477c614f08473eb4c95c22e90331a931d1be Author: Mario Limonciello Date: Wed Jan 4 08:37:05 2023 -0600 drm/amd: Use `amdgpu_ucode_*` helpers for UVD The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit cb9bdfad2274a58bd01d188727aed20b4baf5f44 Author: Mario Limonciello Date: Wed Jan 4 08:36:47 2023 -0600 drm/amd: Use `amdgpu_ucode_*` helpers for SDMA on CIK The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit d7f50961aa5c6a6b242793da79baf41667b8b1eb Author: Mario Limonciello Date: Wed Jan 4 08:36:19 2023 -0600 drm/amd: Use `amdgpu_ucode_*` helpers for SDMA3.0 The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 10024cd73d4c3f87a06f4ad4c6bd72642bbc7c18 Author: Mario Limonciello Date: Wed Jan 4 08:36:06 2023 -0600 drm/amd: Use `amdgpu_ucode_*` helpers for SDMA2.4 The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 4b1c8b64299e0fee1a20362f2bba8eccf4630440 Author: Mario Limonciello Date: Wed Jan 4 08:35:58 2023 -0600 drm/amd: Use `amdgpu_ucode_*` helpers for GMC8 The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit ee138d86ef2c3bd76043a2b1f63fe2dbdea59d91 Author: Mario Limonciello Date: Wed Jan 4 08:35:46 2023 -0600 drm/amd: Use `amdgpu_ucode_*` helpers for GMC7 The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 2d70575b38d7cb768d4e65bf5d72f18f26671ac1 Author: Mario Limonciello Date: Wed Jan 4 08:35:30 2023 -0600 drm/amd: Use `amdgpu_ucode_*` helpers for GMC6 The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 0aaafb7359d25a5c9038bda4ea3a759839f8b2bb Author: Mario Limonciello Date: Wed Jan 4 08:35:19 2023 -0600 drm/amd: Use `amdgpu_ucode_*` helpers for GFX8 The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 469f199e472e5df76be75ee76fdc174ca856ee76 Author: Mario Limonciello Date: Wed Jan 4 08:35:09 2023 -0600 drm/amd: Use `amdgpu_ucode_*` helpers for GFX7 The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 39d3649b1647d5af1e6870dc533fdcf615c2a0a3 Author: Mario Limonciello Date: Wed Jan 4 08:34:28 2023 -0600 drm/amd: Use `amdgpu_ucode_*` helpers for GFX6 The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 62a27480b78ad0f7e80c844a3a93974051579983 Author: Mario Limonciello Date: Tue Jan 3 15:58:52 2023 -0600 drm/amd: Optimize SRIOV switch/case for PSP microcode load Now that IP version decoding is used, a number of case statements can be combined. Reviewed-by: Alex Deucher Reviewed-by: Christian König Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 32806038aa7634635eb46f941979b6f6fda5a462 Author: Mario Limonciello Date: Tue Jan 3 15:43:27 2023 -0600 drm/amd: Load SMU microcode during early_init This will ensure that the microcode is available before the firmware framebuffer has been destroyed. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 315d1716d64e61bd5c8ad13a725ada6c8a4574b9 Author: Mario Limonciello Date: Tue Jan 3 15:40:19 2023 -0600 drm/amd: Use `amdgpu_ucode_*` helpers for SMU The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 515266373746ec5faee2ca797804276abb8880d1 Author: Mario Limonciello Date: Tue Jan 3 23:49:43 2023 -0600 drm/amd: Use `amdgpu_ucode_release` helper for DMUB The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Reviewed-by: Harry Wentland Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit a7ab345149b8622b1eb9ca4f69529d64cc7d1353 Author: Mario Limonciello Date: Tue Jan 3 15:04:23 2023 -0600 drm/amd/display: Load DMUB microcode during early_init If DMUB is required for an ASIC, ensure that the microcode is available and validates during early_init. Any failures will cause the driver to fail to probe before the firmware framebuffer has been removed. Reviewed-by: Alex Deucher Reviewed-by: Harry Wentland Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 07dbfc6b102e25087ec345ef2c2eae21c9856f17 Author: Mario Limonciello Date: Tue Jan 3 14:45:18 2023 -0600 drm/amd: Use `amdgpu_ucode_*` helpers for PSP The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unloading. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 2d39c7ae37a5033c7eeff690b29a404b2cbffffb Author: Mario Limonciello Date: Tue Jan 3 14:41:33 2023 -0600 drm/amd: Load PSP microcode during early_init Simplifies the code so that all PSP versions will get the firmware name from `amdgpu_ucode_ip_version_decode` and then use this filename to load microcode as part of the early_init process. Any failures will cause the driver to fail to probe before the firmware framebuffer has been removed. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 93fec4f8c158584065134b4d45e875499bf517c8 Author: Mario Limonciello Date: Tue Jan 3 16:03:41 2023 -0600 drm/amd: Avoid BUG() for case of SRIOV missing IP version No need to crash the kernel. AMDGPU will now fail to probe. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 994a97447e38182f530f246117a882c074d02af7 Author: Mario Limonciello Date: Tue Jan 3 14:33:37 2023 -0600 drm/amd: Parse both v1 and v2 TA microcode headers using same function Several IP versions duplicate code and can't use the common helpers. Move this code into a single function so that the helpers can be used. v2: squash in fix from Mario to remove duplicate ta parsing Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit ca843a4c79486e99a19b859ef0b9887854afe146 Author: Daniil Tatianin Date: Sat Jan 7 02:53:08 2023 +0300 ACPICA: nsrepair: handle cases without a return value correctly Previously acpi_ns_simple_repair() would crash if expected_btypes contained any combination of ACPI_RTYPE_NONE with a different type, e.g | ACPI_RTYPE_INTEGER because of slightly incorrect logic in the !return_object branch, which wouldn't return AE_AML_NO_RETURN_VALUE for such cases. Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Link: https://github.com/acpica/acpica/pull/811 Fixes: 61db45ca2163 ("ACPICA: Restore code that repairs NULL package elements in return values.") Signed-off-by: Daniil Tatianin Signed-off-by: Rafael J. Wysocki commit 433477c3bf0b7f00334f4157de2a21aa4d8e46a1 Author: Neil Armstrong Date: Wed Nov 16 11:48:35 2022 +0100 arm64: dts: qcom: sm8550: add QCrypto nodes Add the QCE and Crypto BAM DMA nodes. Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221115-topic-sm8550-upstream-dts-qce-v1-0-fe750dfa90f6@linaro.org commit 377972ac743f54506e675c695a287e1821a47e70 Author: Neil Armstrong Date: Wed Nov 16 11:45:50 2022 +0100 arm64: dts: qcom: sm8550: add I2C Master Hub nodes Add the I2C Master Hub wrapper and I2C serial engines nodes. Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221115-topic-sm8550-upstream-dts-gpi-qup-v1-0-86a60cf3e57d@linaro.org commit 71342fb91eae160fa58c1f51c6d368d088b04cf6 Author: Abel Vesa Date: Fri Jan 6 22:10:47 2023 +0200 arm64: dts: qcom: Add base SM8550 MTP dts Add dts file for Qualcomm MTP platform which uses SM8550 SoC. Co-developed-by: Neil Armstrong Signed-off-by: Neil Armstrong Signed-off-by: Abel Vesa Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230106201047.337409-11-abel.vesa@linaro.org commit 4e7b112617a904b7d5c9db710f546c45f14408c2 Author: Neil Armstrong Date: Fri Jan 6 22:10:46 2023 +0200 arm64: dts: qcom: Add PMR735d pmic dtsi Add nodes for PMR735d in separate dtsi file. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230106201047.337409-10-abel.vesa@linaro.org commit e9c0a4e48489c50e71e8cf956eb08b5e5421da12 Author: Neil Armstrong Date: Fri Jan 6 22:10:45 2023 +0200 arm64: dts: qcom: Add PMK8550 pmic dtsi Add nodes for PMK8550 in separate dtsi file. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230106201047.337409-9-abel.vesa@linaro.org commit d6056ec543daab9482682c9440cf2dfd5b3d0469 Author: Neil Armstrong Date: Fri Jan 6 22:10:44 2023 +0200 arm64: dts: qcom: Add PM8550vs pmic dtsi Add nodes for PM8550vs in separate dtsi file. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230106201047.337409-8-abel.vesa@linaro.org commit 8ba6d5d8f11eda942bd060581ff478b95207aab2 Author: Neil Armstrong Date: Fri Jan 6 22:10:43 2023 +0200 arm64: dts: qcom: Add PM8550ve pmic dtsi Add nodes for PM8550ve in separate dtsi file. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230106201047.337409-7-abel.vesa@linaro.org commit 9543f989c244686e9c578812480b0dc622aab258 Author: Neil Armstrong Date: Fri Jan 6 22:10:42 2023 +0200 arm64: dts: qcom: Add PM8550b pmic dtsi Add nodes for PM8550b in separate dtsi file. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230106201047.337409-6-abel.vesa@linaro.org commit 2e9686d1948af21450b3e0da80fb3ad59937aaca Author: Neil Armstrong Date: Fri Jan 6 22:10:41 2023 +0200 arm64: dts: qcom: Add PM8550 pmic dtsi Add nodes for PM8550 in separate dtsi file. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230106201047.337409-5-abel.vesa@linaro.org commit 89565d8f546832b0c097660cb740d51752391f3b Author: Neil Armstrong Date: Fri Jan 6 22:10:40 2023 +0200 arm64: dts: qcom: Add pm8010 pmic dtsi Add nodes for pm8010 in separate dtsi file. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230106201047.337409-4-abel.vesa@linaro.org commit ffc50b2d382879b237f2667f5f02ac48e42ffd32 Author: Abel Vesa Date: Fri Jan 6 22:10:39 2023 +0200 arm64: dts: qcom: Add base SM8550 dtsi Add base dtsi for SM8550 SoC and includes base description of CPUs, GCC, RPMHCC, UART, interrupt controller, TLMM, reserved memory, RPMh PD, TCSRCC, ITS, IPCC, AOSS QMP, LLCC, cpufreq, interconnect, thermal sensor, cpu cooling maps and SMMU nodes which helps boot to shell with console on boards with this SoC. Co-developed-by: Neil Armstrong Signed-off-by: Neil Armstrong Signed-off-by: Abel Vesa Reviewed-by: Konrad Dybcio Reviewed-by: Sai Prakash Ranjan Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230106201047.337409-3-abel.vesa@linaro.org commit 19d281082225585502858fb31a2dce498cff27a2 Merge: ee7ccd5fe8a36 d220193c50496 Author: Bjorn Andersson Date: Tue Jan 10 12:25:33 2023 -0600 Merge branch '20230104093450.3150578-2-abel.vesa@linaro.org' into arm64-for-6.3 Merge the TCSR clock binding, to gain the Devicetree include file. commit 6d29607197c188d5f10b51569443eea20550ab6c Merge: 90114ca114760 d220193c50496 Author: Bjorn Andersson Date: Tue Jan 10 12:25:03 2023 -0600 Merge branch '20230104093450.3150578-2-abel.vesa@linaro.org' into clk-for-6.3 commit d220193c50496adc2812a7c21e05874f47cbc9f9 Author: Abel Vesa Date: Wed Jan 4 11:34:47 2023 +0200 dt-bindings: clock: Add SM8550 TCSR CC clocks Add bindings documentation for clock TCSR driver on SM8550. Signed-off-by: Abel Vesa Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230104093450.3150578-2-abel.vesa@linaro.org commit ee7ccd5fe8a36c97cb0fabcb2019ba8059133ce6 Merge: b7f4f6971d62f e6f0d6a30f734 Author: Bjorn Andersson Date: Tue Jan 10 12:21:20 2023 -0600 Merge branch 'icc-sm8550-immutable' of https://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into arm64-for-6.3 Merge the immutable SM8550 interconnect branch, to gain the include file from the binding. commit e2869bd7af608c343988429ceb1c2fe99644a01f Author: Kishon Vijay Abraham I Date: Thu Jan 5 04:10:59 2023 +0000 x86/acpi/boot: Do not register processors that cannot be onlined for x2APIC Section 5.2.12.12 Processor Local x2APIC Structure in the ACPI v6.5 spec mandates that both "enabled" and "online capable" Local APIC Flags should be used to determine if the processor is usable or not. However, Linux doesn't use the "online capable" flag for x2APIC to determine if the processor is usable. As a result, cpu_possible_mask has incorrect value and results in more memory getting allocated for per_cpu variables than it is going to be used. Make sure Linux parses both "enabled" and "online capable" flags for x2APIC to correctly determine if the processor is usable. Fixes: aa06e20f1be6 ("x86/ACPI: Don't add CPUs that are not online capable") Reported-by: Leo Duran Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Borislav Petkov (AMD) Reviewed-by: Zhang Rui Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230105041059.39366-1-kvijayab@amd.com commit bf1e263b2582b6077e63891278691fe8c15b7b4b Author: Abel Vesa Date: Fri Jan 6 22:10:38 2023 +0200 dt-bindings: arm: qcom: Document SM8550 SoC and boards Document the SM8550 SoC binding and the MTP board. Signed-off-by: Abel Vesa Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230106201047.337409-2-abel.vesa@linaro.org commit 90114ca114760315507b218ee1a3b23609d9d2b8 Author: Neil Armstrong Date: Mon Jan 9 16:47:23 2023 +0100 clk: qcom: add SM8550 DISPCC driver Add support for the display clock controller found in SM8550 based devices. This clock controller feeds the Multimedia Display SubSystem (MDSS). This driver is based on the SM8450 support. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103-topic-sm8550-upstream-dispcc-v3-3-8a03d348c572@linaro.org commit 494162c739775426c8a9ab9cd2056386e9bf6b4c Author: Neil Armstrong Date: Mon Jan 9 16:47:22 2023 +0100 clk: qcom: clk-alpha-pll: define alias of LUCID OLE reset ops to EVO reset ops Add an alias of LUCID OLE reset ops to EVO reset ops similar to other aliases. Signed-off-by: Neil Armstrong Acked-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103-topic-sm8550-upstream-dispcc-v3-2-8a03d348c572@linaro.org commit 0960ec915a7531e3a760cf97d523ce2fa90b1412 Author: Neil Armstrong Date: Mon Jan 9 16:47:21 2023 +0100 dt-bindings: clock: document SM8550 DISPCC clock controller Document device tree bindings for display clock controller for Qualcomm SM8550 SoC. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230103-topic-sm8550-upstream-dispcc-v3-1-8a03d348c572@linaro.org commit b7f4f6971d62f0019c27142ee6b703d8cab96e38 Author: Dmitry Baryshkov Date: Tue Jan 10 07:54:33 2023 +0200 arm64: dts: qcom: sm8450: Add compat qcom,sm8450-dsi-ctrl Add silicon specific compatible qcom,sm8450-dsi-ctrl to the mdss-dsi-ctrl block. This allows us to differentiate the specific bindings for sm8450 against the yaml documentation. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230110055433.734188-3-dmitry.baryshkov@linaro.org commit b0b8b34a8d6b4c50dac086ca18964fae5e6954d4 Author: Dmitry Baryshkov Date: Tue Jan 10 07:54:32 2023 +0200 arm64: dts: qcom: sm8150: Add compat qcom,sm8150-dsi-ctrl Add silicon specific compatible qcom,sm8150-dsi-ctrl to the mdss-dsi-ctrl block. This allows us to differentiate the specific bindings for sm8150 against the yaml documentation. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230110055433.734188-2-dmitry.baryshkov@linaro.org commit 24f3abaa8c740301d0f13d5aa365ffda6fa959c9 Author: Dmitry Baryshkov Date: Tue Jan 10 07:54:31 2023 +0200 ARM: dts: qcom: msm8974: Add compat qcom,msm8974-dsi-ctrl to dsi1 Extend the secon DSI interface with the SoC-specific compat entry, following the change for the first DSI interface. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230110055433.734188-1-dmitry.baryshkov@linaro.org commit 1ec82317a1daac78c04b0c15af89018ccf9fa2b7 Author: Dean Luick Date: Mon Jan 9 14:04:34 2023 -0500 IB/hfi1: Use dma_mmap_coherent for matching buffers For memory allocated with dma_alloc_coherent(), use dma_mmap_coherent() to mmap it into user space. Signed-off-by: Dean Luick Signed-off-by: Dennis Dalessandro Link: https://lore.kernel.org/r/167329107460.1472990.9090255834533222032.stgit@awfm-02.cornelisnetworks.com Signed-off-by: Leon Romanovsky commit 892ede5a77f337831609fb9c248ac60948061894 Author: Dean Luick Date: Mon Jan 9 14:04:29 2023 -0500 IB/hfi1: Update RMT size calculation Fix possible RMT overflow: Use the correct netdev size. Don't allow adjusted user contexts to go negative. Fix QOS calculation: Send kernel context count as an argument since dd->n_krcv_queues is not yet set up in earliest call. Do not include the control context in the QOS calculation. Use the same sized variable to find the max of krcvq[] entries. Update the RMT count explanation to make more sense. Signed-off-by: Dean Luick Signed-off-by: Dennis Dalessandro Link: https://lore.kernel.org/r/167329106946.1472990.18385495251650939054.stgit@awfm-02.cornelisnetworks.com Signed-off-by: Leon Romanovsky commit d578dd8045a749587c92b281b99de61531b74245 Merge: 99c0f7d35c4b2 8b6af3b58cafc Author: Bjorn Andersson Date: Tue Jan 10 11:08:13 2023 -0600 Merge tag '1672656511-1931-1-git-send-email-quic_akhilpo@quicinc.com' into clk-for-6.3 v6.2-rc1 + 1672656511-1931-1-git-send-email-quic_akhilpo@quicinc.com commit 8b6af3b58cafc2cbdf6269f655b2d3731eb93c2f Author: Akhil P Oommen Date: Mon Jan 2 16:18:28 2023 +0530 clk: qcom: gdsc: Support 'synced_poweroff' genpd flag Add support for the newly added 'synced_poweroff' genpd flag. This allows some clients (like adreno gpu driver) to request gdsc driver to ensure a votable gdsc (like gpucc cx gdsc) has collapsed at hardware. Signed-off-by: Akhil P Oommen Reviewed-by: Ulf Hansson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102161757.v5.2.Ic128c1df50b7fc9a6b919932a3b41a799b5ed5e8@changeid commit a9236a0aa7d7f52a974cc7eaa971fae92aa477c5 Author: Ulf Hansson Date: Mon Jan 2 16:18:27 2023 +0530 PM: domains: Allow a genpd consumer to require a synced power off Some genpd providers doesn't ensure that it has turned off at hardware. This is fine until the consumer really requires during some special scenarios that the power domain collapse at hardware before it is turned ON again. An example is the reset sequence of Adreno GPU which requires that the 'gpucc cx gdsc' power domain should move to OFF state in hardware at least once before turning in ON again to clear the internal state. Signed-off-by: Ulf Hansson Signed-off-by: Akhil P Oommen Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102161757.v5.1.I3e6b1f078ad0f1ca9358c573daa7b70ec132cdbe@changeid commit 99c0f7d35c4b204dd95ba50e155f32c99695b445 Author: Abel Vesa Date: Tue Dec 27 22:45:28 2022 +0200 clk: qcom: sdm845: Use generic clk_sync_state_disable_unused callback By adding the newly added clk_sync_state_disable_unused as sync_state callback to all sdm845 clock providers, we make sure that no clock belonging to these providers gets disabled on clk_disable_unused, but rather they are disabled on sync_state, when it is safe, since all the consumers build as modules have had their chance of enabling their own clocks. Signed-off-by: Abel Vesa Reviewed-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221227204528.1899863-2-abel.vesa@linaro.org commit 26b36df7516692292312063ca6fd19e73c06d4e7 Author: Abel Vesa Date: Tue Dec 27 22:45:27 2022 +0200 clk: Add generic sync_state callback for disabling unused clocks There are unused clocks that need to remain untouched by clk_disable_unused, and most likely could be disabled later on sync_state. So provide a generic sync_state callback for the clock providers that register such clocks. Then, use the same mechanism as clk_disable_unused from that generic callback, but pass the device to make sure only the clocks belonging to the current clock provider get disabled, if unused. Also, during the default clk_disable_unused, if the driver that registered the clock has the generic clk_sync_state_disable_unused callback set for sync_state, skip disabling its clocks. Signed-off-by: Abel Vesa Reviewed-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221227204528.1899863-1-abel.vesa@linaro.org commit 10903b0a0f4d4964b352fa3df12d3d2ef5fb7a3b Author: Gustavo Sousa Date: Thu Jan 5 10:37:01 2023 -0300 drm/i915/gt: Cover rest of SVG unit MCR registers CHICKEN_RASTER_{1,2} got overlooked with the move done in commit a9e69428b1b4 ("drm/i915: Define MCR registers explicitly"). Registers from the SVG unit became multicast as of Xe_HP graphics. BSpec: 66534 Fixes: a9e69428b1b4 ("drm/i915: Define MCR registers explicitly") Signed-off-by: Gustavo Sousa Cc: Matt Roper Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20230105133701.19556-1-gustavo.sousa@intel.com commit 0bdb2bbe76fab43f356d3ba8734c41c2ad82a88e Merge: 1a77d59e7e391 6fa8c0732bff8 Author: Mark Brown Date: Tue Jan 10 16:42:44 2023 +0000 Add support of MediaTek mt8188 to SOF Merge series from Tinghan Shen : Add support of MediaTek mt8188 SoC DSP to SOF. The sof driver patches in this series are taken from thesofproject/linux/tree/topic/sof-dev-rebase. commit 91e910adc59a6954e475dd2d6a4534ac56dd8eed Author: Bartosz Golaszewski Date: Mon Jan 9 18:45:07 2023 +0100 soc: qcom: rmphpd: add power domains for sa8775p Add power domain description for sa8775p and a new compatible to match it. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109174511.1740856-15-brgl@bgdev.pl commit b4f0370d3ce276397f5c48af99d0b77548825eb1 Author: Bartosz Golaszewski Date: Mon Jan 9 18:45:06 2023 +0100 dt-bindings: power: qcom,rpmpd: document sa8775p Add a compatible for sa8775p platforms and relevant defines to the include file. Signed-off-by: Bartosz Golaszewski Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109174511.1740856-14-brgl@bgdev.pl commit ce273e690d84b63ba73db2b63badeba4e74f3980 Author: Bartosz Golaszewski Date: Mon Jan 9 18:44:58 2023 +0100 clk: qcom: rpmh: add clocks for sa8775p Extend the driver with a description of clocks for sa8775p platforms. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109174511.1740856-6-brgl@bgdev.pl commit 9d4d6d5e2ffc7f62cedc091640d640b77713457c Author: Bartosz Golaszewski Date: Mon Jan 9 18:44:57 2023 +0100 dt-bindings: clock: qcom-rpmhcc: document the clock for sa8775p Add a new compatible for SA8775P platforms. Signed-off-by: Bartosz Golaszewski Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230109174511.1740856-5-brgl@bgdev.pl commit 75bba4f4faf4f14112377ff6d1b996a7ec4c0fa1 Author: Johan Jonker Date: Fri Dec 16 00:17:44 2022 +0100 ARM: dts: rockchip: add brcmf node to rk3066a-mk808 The MK808 board has a wifi chip called RK901. Add a somewhat brcmf compatible node to the rk3066a-mk808.dts file. That's what's available as driver in the mainline kernel in relation to this Rockchip wifi product that is able to load the firmware. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/b3c7f1d7-47fd-90e4-badb-e8ceb8901e27@gmail.com Signed-off-by: Heiko Stuebner commit 4a88d9ebc27e144ad9e1cad6a7832cb65f332673 Author: Johan Jonker Date: Sat Dec 17 13:05:32 2022 +0100 ARM: dts: rockchip: add space between label and nodename nfc pinctrl on rk3128 Add space between label and nodename nfc pinctrl node. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/67675d28-87c5-0df1-4b93-2f1233918a1e@gmail.com Signed-off-by: Heiko Stuebner commit 3b36713d69d99318592d261eaca9b7460313c8c2 Author: Yang Yingliang Date: Wed Jan 4 16:02:35 2023 +0800 clk: qcom: krait-cc: fix wrong pointer passed to IS_ERR() It should be 'mux' passed to IS_ERR/PTR_ERR(). Fixes: 56a655e1c41a ("clk: qcom: krait-cc: convert to parent_data API") Signed-off-by: Yang Yingliang Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230104080235.1748953-1-yangyingliang@huawei.com commit 0cbc0b1c5838b02c67a768392bb34732f0d384b0 Author: Krzysztof Kozlowski Date: Thu Dec 22 16:13:19 2022 +0100 arm64: dts: qcom: sdm845: do not customize SPI0 pin drive/bias Each board should define pin drive/bias for used busses. All boards using SPI0 (db845c and cheza) already do it, so drop the bias/drive strength from SoC DTSI. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Douglas Anderson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221222151319.122398-4-krzysztof.kozlowski@linaro.org commit d05e342882e4fb2ccd8e4b6af00b0b82e22ad325 Author: Krzysztof Kozlowski Date: Thu Dec 22 16:13:18 2022 +0100 arm64: dts: qcom: sdm845: align TLMM pin configuration with DT schema DT schema expects TLMM pin configuration nodes to be named with '-state' suffix and their optional children with '-pins' suffix. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221222151319.122398-3-krzysztof.kozlowski@linaro.org commit e5011447376e1b050847ccb2ef7933176ce4de41 Author: Krzysztof Kozlowski Date: Thu Dec 22 16:13:17 2022 +0100 arm64: dts: qcom: sdm845-xiaomi-beryllium: fix audio codec interrupt pin name The pin config entry should have a string, not number, for the GPIO used as WCD9340 audio codec interrupt. Fixes: dd6459a0890a ("arm64: dts: qcom: split beryllium dts into common dtsi and tianma dts") Reported-by: Doug Anderson Signed-off-by: Krzysztof Kozlowski Reviewed-by: Douglas Anderson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221222151319.122398-2-krzysztof.kozlowski@linaro.org commit 740862bb5f59b93efb390a417995f88a64bdc323 Author: Krzysztof Kozlowski Date: Thu Dec 22 16:13:16 2022 +0100 arm64: dts: qcom: sdm845-db845c: fix audio codec interrupt pin name The pin config entry should have a string, not number, for the GPIO used as WCD9340 audio codec interrupt. Fixes: 89a32a4e769c ("arm64: dts: qcom: db845c: add analog audio support") Reported-by: Doug Anderson Signed-off-by: Krzysztof Kozlowski Reviewed-by: Douglas Anderson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221222151319.122398-1-krzysztof.kozlowski@linaro.org commit 8a0721dae68fdb4534e220fc9faae7a0ef2f3785 Author: Quentin Schulz Date: Mon Dec 5 14:40:37 2022 +0100 arm64: dts: qcom: msm8998-fxtec: fix touchscreen reset GPIO polarity The reset line is active low for the Goodix touchscreen controller so let's fix the polarity in the Device Tree node. Signed-off-by: Quentin Schulz Tested-by: Hans de Goede Reviewed-by: Hans de Goede Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221103-upstream-goodix-reset-v3-8-0975809eb183@theobroma-systems.com commit 7bd224b6625abdc55483205821eea99e3a8c913c Author: Siddh Raman Pant Date: Mon Jan 9 18:30:35 2023 +0530 drm/drm_lease: Remove usage of deprecated DRM_DEBUG_LEASE drm_print.h says DRM_DEBUG_LEASE is deprecated in favor of drm_dbg_lease(). Signed-off-by: Siddh Raman Pant Reviewed-by: Simon Ser Signed-off-by: Simon Ser Link: https://patchwork.freedesktop.org/patch/msgid/71a443d705c62a217a3352b221b7a96c53bb1031.1673269059.git.code@siddh.me commit fc2602b553c85aa151a4776cf874cfb64675909f Author: Siddh Raman Pant Date: Mon Jan 9 18:30:34 2023 +0530 drm/drm_blend: Remove usage of deprecated DRM_DEBUG_ATOMIC drm_print.h says DRM_DEBUG_ATOMIC is deprecated in favor of drm_dbg_atomic(). Signed-off-by: Siddh Raman Pant Reviewed-by: Simon Ser Signed-off-by: Simon Ser Link: https://patchwork.freedesktop.org/patch/msgid/1a5b5aa012689572baf561eea0dd0b5934645af5.1673269059.git.code@siddh.me commit 4665280990fa9dc7075610784400a791d6ff22b2 Author: Siddh Raman Pant Date: Mon Jan 9 18:30:33 2023 +0530 drm: Remove usage of deprecated DRM_DEBUG_PRIME drm_print.h says DRM_DEBUG_PRIME is deprecated in favor of drm_dbg_prime(). Signed-off-by: Siddh Raman Pant Reviewed-by: Simon Ser Signed-off-by: Simon Ser Link: https://patchwork.freedesktop.org/patch/msgid/cd663b1bc42189e55898cddecdb3b73c591b341a.1673269059.git.code@siddh.me commit c7cb175bb1ef092bf7247c7416673420fb90fb3e Author: Uwe Kleine-König Date: Fri Dec 30 14:00:25 2022 +0100 drm/imx/dcss: Don't call dev_set_drvdata(..., NULL); The driver core takes care about removing driver data, so this can be dropped from the driver. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurentiu Palcu Signed-off-by: Laurentiu Palcu Link: https://patchwork.freedesktop.org/patch/msgid/20221230130025.240776-2-u.kleine-koenig@pengutronix.de commit 7efb10383181377e0588bb0068422e3630540acd Author: Uwe Kleine-König Date: Fri Dec 30 14:00:24 2022 +0100 drm/imx/dcss: Drop if blocks with always false condition dcss_drv_platform_remove() is only called for a device after dcss_drv_platform_probe() returned 0. In that case dev_set_drvdata() was called with a non-NULL value and so dev_get_drvdata() won't return NULL. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurentiu Palcu Signed-off-by: Laurentiu Palcu Link: https://patchwork.freedesktop.org/patch/msgid/20221230130025.240776-1-u.kleine-koenig@pengutronix.de commit fcdc53aceed413dce3ef1d0166a8e9348d5a9c94 Author: Miles Chen Date: Tue Jan 10 11:12:42 2023 +0800 firmware: meson_sm: stop using 0 as NULL pointer Use NULL for NULL pointer to fix the following sparse warning: drivers/firmware/meson/meson_sm.c:85:24: sparse: warning: Using plain integer as NULL pointer Signed-off-by: Miles Chen Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230110031242.4917-1-miles.chen@mediatek.com Signed-off-by: Neil Armstrong commit bc5998b92b9ee8818cc0f7fe02604751389a154e Author: Neil Armstrong Date: Mon Jan 9 13:53:30 2023 +0100 dt-bindings: power: amlogic,meson-gx-pwrc: mark bindings as deprecated The amlogic,meson-gx-pwrc-vpu compatible isn't used anymore since [1] was merged in v5.8-rc1 and amlogic,meson-g12a-pwrc-vpu either since [2] was merged in v5.3-rc1. [1] commit 5273d6cacc06 ("arm64: dts: meson-gx: Switch to the meson-ee-pwrc bindings") [2] commit f4f1c8d9ace7 ("arm64: dts: meson-g12: add Everything-Else power domain controller") Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221117-b4-amlogic-bindings-convert-v2-6-36ad050bb625@linaro.org Signed-off-by: Neil Armstrong commit 658a8ef679435959f550a45f7312afaebb9e20a8 Author: Neil Armstrong Date: Mon Jan 9 13:53:25 2023 +0100 dt-bindings: firmware: convert meson_sm.txt to dt-schema Convert the Amlogic Secure Monitor bindings to dt-schema. Take in account usage the used variant with amlogic,meson-gx-sm. Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221117-b4-amlogic-bindings-convert-v2-1-36ad050bb625@linaro.org Signed-off-by: Neil Armstrong commit 2a5b4ccf0de17e47e9ad13ee0fda9436d5de0a35 Author: Andy Shevchenko Date: Fri Dec 9 00:12:17 2022 +0200 efi/earlycon: Speed up scrolling by disregarding empty space Currently the scroll copies the full screen which is slow on high resolution displays. At the same time, most of the screen is an empty space which has no need to be copied over and over. Optimize the scrolling algorithm by caching the x coordinates of the last printed lines and scroll in accordance with the maximum x in that cache. On my Microsoft Surface Book (the first version) this produces a significant speedup of the console 90 seconds vs. 168 seconds with the kernel command line having ignore_loglevel earlycon=efifb keep_bootcon Signed-off-by: Andy Shevchenko Signed-off-by: Ard Biesheuvel commit b7a1cd243839cc1459fbc83a7a62e3b57f29f497 Author: Andy Shevchenko Date: Fri Dec 9 00:12:16 2022 +0200 efi/earlycon: Replace open coded strnchrnul() strnchrnul() can be called in the early stages. Replace open coded variant in the EFI early console driver. Signed-off-by: Andy Shevchenko Signed-off-by: Ard Biesheuvel commit e7b481697188f2c715b951b4aa771a8ffebf3243 Author: Heiko Carstens Date: Sun Jan 8 19:13:49 2023 +0100 s390/archrandom: add missing header include Add missing header include to get rid of arch/s390/crypto/arch_random.c:15:1: warning: symbol 's390_arch_random_available' was not declared. Should it be static? arch/s390/crypto/arch_random.c:17:12: warning: symbol 's390_arch_random_counter' was not declared. Should it be static? Signed-off-by: Heiko Carstens commit 9cab4f7d98eee90b762ffbc87055c9499d51a635 Author: Heiko Carstens Date: Tue Jan 10 13:49:23 2023 +0100 s390/con3270: move condev definition Fix this for allmodconfig: drivers/s390/char/con3270.c:43:24: error: 'condev' defined but not used [-Werror=unused-variable] static struct tty3270 *condev; ^~~~~~ Reported-by: Stephen Rothwell Fixes: c17fe081ac1f ("s390/3270: unify con3270 + tty3270") Signed-off-by: Heiko Carstens commit 1a77d59e7e3917e311e91ff2908ef23c3250bec0 Author: Mark Brown Date: Fri Jan 6 23:13:37 2023 +0000 ASoC: fsl-asoc-card: Log error code when we fail to register The chances are that any error we see here will be EPROBE_DEFER but let's actually tell the user so they know. Acked-by: Shengjiu Wang Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230106-asoc-fsl-err-log-v1-1-49d845c99434@kernel.org Signed-off-by: Mark Brown commit 6fa8c0732bff8e0ab794736837b25dc7ac38cd54 Author: Tinghan Shen Date: Tue Jan 10 16:43:12 2023 +0800 ASoC: SOF: mediatek: Provide debugfs_add_region_item ops for core Set the generic iomem callback for debugfs_add_region_item to support sof-logger. Signed-off-by: Tinghan Shen Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230110084312.12953-4-tinghan.shen@mediatek.com Signed-off-by: Mark Brown commit 6b43538f0698695fba9aa0c0b29a80c555cf1b63 Author: Tinghan Shen Date: Tue Jan 10 16:43:11 2023 +0800 ASoC: SOF: mediatek: Support mt8188 platform Add support of SOF on MediaTek MT8188 SoC. MT8188 ADSP integrates with a single core Cadence HiFi-5 DSP. The IPC communication between AP and DSP is based on shared DRAM and mailbox interrupt. The change in the mt8186.h is compatible on both mt8186 and mt8188. The register controls booting the DSP core with the default address or the user specified address. Both mt8186 and mt8188 should boot with the user specified boot in the driver. The usage of the register is the same on both SoC, but the control bit is different on mt8186 and mt8188, which is bit 1 on mt8186 and bit 0 on mt8188. Configure the redundant bit has noside effect on both SoCs. Signed-off-by: Tinghan Shen Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230110084312.12953-3-tinghan.shen@mediatek.com Signed-off-by: Mark Brown commit e15ec6892832d586069ce575c222366b94ad6a5e Author: Tinghan Shen Date: Tue Jan 10 16:43:10 2023 +0800 dt-bindings: dsp: mediatek: Add mt8188 dsp compatible Add support of the single-core HiFi5 audio DSP on MediaTek MT8188 SoC for pre- and post- audio processing. Signed-off-by: Tinghan Shen Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230110084312.12953-2-tinghan.shen@mediatek.com Signed-off-by: Mark Brown commit 323d91d4684d238f6bc3693fed93caf795378fe0 Author: Kalle Valo Date: Thu Dec 22 19:15:59 2022 +0200 wifi: ath11k: debugfs: fix to work with multiple PCI devices ath11k fails to load if there are multiple ath11k PCI devices with same name: ath11k_pci 0000:01:00.0: Hardware name qcn9074 hw1.0 debugfs: Directory 'ath11k' with parent '/' already present! ath11k_pci 0000:01:00.0: failed to create ath11k debugfs ath11k_pci 0000:01:00.0: failed to create soc core: -17 ath11k_pci 0000:01:00.0: failed to init core: -17 ath11k_pci: probe of 0000:01:00.0 failed with error -17 Fix this by creating a directory for each ath11k device using schema -, for example "pci-0000:06:00.0". This directory created under the top-level ath11k directory, for example /sys/kernel/debug/ath11k. The reference to the toplevel ath11k directory is not stored anymore within ath11k, instead it's retrieved using debugfs_lookup(). If the directory does not exist it will be created. After the last directory from the ath11k directory is removed, for example when doing rmmod ath11k, the empty ath11k directory is left in place, it's a minor cosmetic issue anyway. Here's an example hierarchy with one WCN6855: ath11k `-- pci-0000:06:00.0 |-- mac0 | |-- dfs_block_radar_events | |-- dfs_simulate_radar | |-- ext_rx_stats | |-- ext_tx_stats | |-- fw_dbglog_config | |-- fw_stats | | |-- beacon_stats | | |-- pdev_stats | | `-- vdev_stats | |-- htt_stats | |-- htt_stats_reset | |-- htt_stats_type | `-- pktlog_filter |-- simulate_fw_crash `-- soc_dp_stats I didn't have a test setup where I could connect multiple ath11k devices to the same the host, so I have only tested this with one device. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.9 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-01208-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01208-QCAHKSWPL_SILICONZ-1 Tested-by: Robert Marko Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221220121231.20120-1-kvalo@kernel.org commit 8d94da58de534634c835f22a43070f56caa2fcb6 Author: Wenhao Cui Date: Fri Dec 23 11:16:30 2022 +0800 arm64: dts: rockchip: Add EmbedFire LubanCat 1 The LubanCat 1 is a RK3566 based SBC, developed by Dongguan EmbedFire Electronic Technology Co., Ltd. It has the following characteristics: - MicroSD card slot, onboard eMMC flash memory - 1GbE Realtek RTL8211F Ethernet Transceiver - 1 USB Type-C port (power and USB2.0 OTG) - 1 USB 3.0 Host port - 3 USB 2.0 Host ports - 1 HDMI - 1 infrared receiver - 1 MIPI DSI - 1 MIPI CSI - 1 x 4-section headphone jack - Mini PCIe socket (USB or PCIe) - 1 SIM Card slot - 1 SYS LED and 1 PWR LED - 40-pin GPIO expansion header Signed-off-by: Wenhao Cui Signed-off-by: Yuteng Zhong Link: https://lore.kernel.org/r/Y6UdjhBD/Xa7ALya@VM-66-53-centos Signed-off-by: Heiko Stuebner commit 1e83f6bfaf84d9e0bcb221304bb47e74c0e80924 Author: Wenhao Cui Date: Fri Dec 23 11:17:18 2022 +0800 dt-bindings: arm: rockchip: Add EmbedFire LubanCat 1 Add devicetree binding documentation for the EmbedFire LubanCat 1. Signed-off-by: Wenhao Cui Signed-off-by: Yuteng Zhong Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/Y6UdvrhLjS0/8Oic@VM-66-53-centos Signed-off-by: Heiko Stuebner commit 43ba22818788f5a8fff5b1feaa329fa4991a3225 Author: Wenhao Cui Date: Fri Dec 23 11:18:12 2022 +0800 dt-bindings: vendor-prefixes: Document EmbedFire EmbedFire is a manufacturer of embed computers and education platform for embed devices from Dongguan. Add vendor prefix for it. Signed-off-by: Wenhao Cui Signed-off-by: Yuteng Zhong Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/Y6Ud9MhRjCVAYMCj@VM-66-53-centos Signed-off-by: Heiko Stuebner commit 5855366f7d21af8a24d92270c11350982de1d671 Author: Maíra Canal Date: Thu Jan 5 16:30:39 2023 -0300 drm/debugfs: add descriptions to struct parameters The structs drm_debugfs_info and drm_debugfs_entry don't have descriptions for their parameters, which is causing the following warnings: include/drm/drm_debugfs.h:93: warning: Function parameter or member 'name' not described in 'drm_debugfs_info' include/drm/drm_debugfs.h:93: warning: Function parameter or member 'show' not described in 'drm_debugfs_info' include/drm/drm_debugfs.h:93: warning: Function parameter or member 'driver_features' not described in 'drm_debugfs_info' include/drm/drm_debugfs.h:93: warning: Function parameter or member 'data' not described in 'drm_debugfs_info' include/drm/drm_debugfs.h:105: warning: Function parameter or member 'dev' not described in 'drm_debugfs_entry' include/drm/drm_debugfs.h:105: warning: Function parameter or member 'file' not described in 'drm_debugfs_entry' include/drm/drm_debugfs.h:105: warning: Function parameter or member 'list' not described in 'drm_debugfs_entry' Therefore, fix the warnings by adding descriptions to all struct parameters. Reported-by: Stephen Rothwell Signed-off-by: Maíra Canal Reviewed-by: Daniel Vetter Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20230105193039.287677-2-mcanal@igalia.com commit c9ba134e05ab222e43bb03e1dbc101ca4c206666 Author: Maíra Canal Date: Thu Jan 5 16:30:38 2023 -0300 drm/debugfs: use octal permissions instead of symbolic permissions Currently, debugfs functions are using symbolic macros as permission bits, but checkpatch reinforces permission bits in the octal form, as they are more readable and easier to understand [1]. Moreover, using the symbolic macro S_IFREG is redundant. Therefore, use octal permission bits in all debugfs functions. [1] https://docs.kernel.org/dev-tools/checkpatch.html#permissions Suggested-by: Jani Nikula Signed-off-by: Maíra Canal Reviewed-by: Daniel Vetter Reviewed-by: Jani Nikula Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20230105193039.287677-1-mcanal@igalia.com commit b0a8a59a1c44c07807afe50c6bd21a33c9ec98b7 Author: Greg Kroah-Hartman Date: Mon Jan 9 18:58:10 2023 +0100 driver core: move struct subsys_dev_iter to a local file struct subsys_dev_iter is not used by any code outside of drivers/base/bus.c so move it into that file and out of the global bus.h file. Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230109175810.2965448-6-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit af6d0743599e594cb2cec3f1a6d2600a57d1d375 Author: Greg Kroah-Hartman Date: Mon Jan 9 18:58:09 2023 +0100 driver core: make subsys_dev_iter_exit() static The function subsys_dev_iter_exit() is not used outside of drivers/base/bus.c so make it static to that file and remove the global export. Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230109175810.2965448-5-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 38cdadefa2feecc9e7aa5f67bc4aea5b9a8ca59f Author: Greg Kroah-Hartman Date: Mon Jan 9 18:58:08 2023 +0100 driver core: make subsys_dev_iter_next() static The function subsys_dev_iter_next() is only used in drivers/base/bus.c so make it static to that file and remove the global export. Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230109175810.2965448-4-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 2e45fc5502af9826617a96fe63aee055002cac97 Author: Greg Kroah-Hartman Date: Mon Jan 9 18:58:07 2023 +0100 driver core: make subsys_dev_iter_init() static No one outside of drivers/base/bus.c calls this function so make it static and remove the exported symbol. Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230109175810.2965448-3-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit a9efdd2519edd7df84afd075b65ca6428dcb0039 Author: Greg Kroah-Hartman Date: Mon Jan 9 18:58:06 2023 +0100 driver core: remove subsys_find_device_by_id() This function has not been called by any code in the kernel tree in many many years so remove it as it is unused. Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230109175810.2965448-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 8afbb4273977f055db219a22daaafe64be10fb95 Author: Greg Kroah-Hartman Date: Mon Jan 9 18:58:05 2023 +0100 driver core: make bus_get_device_klist() static No one calls this function outside of drivers/base/bus.c so make it static so it does not need to be exported anymore. Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230109175810.2965448-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 96b7a9d11a92cc0b09fd645657462a9d9558ef5f Merge: a3ae16030a032 97a89ed101bbb Author: Paolo Abeni Date: Tue Jan 10 13:38:40 2023 +0100 Merge branch 'net-phy-mxl-gpy-broken-interrupt-fixes' Michael Walle says: ==================== net: phy: mxl-gpy: broken interrupt fixes The GPY215 has a broken interrupt pin. This patch series tries to workaround that and because in general that is not possible, disables the interrupts by default and falls back to polling mode. There is an opt-in via the devicetree. ==================== Link: https://lore.kernel.org/r/20230109123013.3094144-1-michael@walle.cc Signed-off-by: Paolo Abeni commit 97a89ed101bbb790e80b562f9cb95f0cfd05f430 Author: Michael Walle Date: Mon Jan 9 13:30:13 2023 +0100 net: phy: mxl-gpy: disable interrupts on GPY215 by default The interrupts on the GPY215B and GPY215C are broken and the only viable fix is to disable them altogether. There is still the possibilty to opt-in via the device tree. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Signed-off-by: Paolo Abeni commit 7d885863e716757553197687f304da1f538f61e1 Author: Michael Walle Date: Mon Jan 9 13:30:12 2023 +0100 net: phy: allow a phy to opt-out of interrupt handling Until now, it is not possible for a PHY driver to disable interrupts during runtime. If a driver offers the .config_intr() as well as the .handle_interrupt() ops, it is eligible for interrupt handling. Introduce a new flag for the dev_flags property of struct phy_device, which can be set by PHY driver to skip interrupt setup and fall back to polling mode. At the moment, this is used for the MaxLinear PHY which has broken interrupt handling and there is a need to disable interrupts in some cases. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Signed-off-by: Paolo Abeni commit 90c47eb169ac5538c3376a1577cfe858c4efcf27 Author: Michael Walle Date: Mon Jan 9 13:30:11 2023 +0100 dt-bindings: net: phy: add MaxLinear GPY2xx bindings Add the device tree bindings for the MaxLinear GPY2xx PHYs, which essentially adds just one flag: maxlinear,use-broken-interrupts. One might argue, that if interrupts are broken, just don't use the interrupt property in the first place. But it needs to be more nuanced. First, this interrupt line is also used to wake up systems by WoL, which has nothing to do with the (broken) PHY interrupt handling. Second and more importantly, there are devicetrees which have this property set. Thus, within the driver we have to switch off interrupt handling by default as a workaround. But OTOH, a systems designer who knows the hardware and knows there are no shared interrupts for example, can use this new property as a hint to the driver that it can enable the interrupt nonetheless. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Signed-off-by: Paolo Abeni commit dd1a98a375a64f050afaf55c2a80c7a78e957496 Author: Michael Walle Date: Mon Jan 9 13:30:10 2023 +0100 dt-bindings: vendor-prefixes: add MaxLinear MaxLinear is a manufacturer of integrated circuits. https://www.maxlinear.com Signed-off-by: Michael Walle Acked-by: Krzysztof Kozlowski Signed-off-by: Paolo Abeni commit 05375d5cb2f18fb977d5a12607b2505d18d8e2ae Author: Javier Martinez Canillas Date: Tue Jan 3 00:07:33 2023 +0100 MAINTAINERS: Add entry for Himax HX8394 panel controller driver Add myself as maintainer for the driver and devicetree bindings schema. Signed-off-by: Javier Martinez Canillas Acked-by: Sam Ravnborg Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20230102230733.3506624-4-javierm@redhat.com commit 65dc9360f7411a2dedcfa56b00d178dbf6ee1f84 Author: Kamil Trzciński Date: Tue Jan 3 00:07:32 2023 +0100 drm: panel: Add Himax HX8394 panel controller driver The driver is for panels based on the Himax HX8394 controller, such as the HannStar HSD060BHW4 720x1440 TFT LCD panel that uses a MIPI-DSI interface. Signed-off-by: Kamil Trzciński Co-developed-by: Ondrej Jirman Signed-off-by: Ondrej Jirman Co-developed-by: Javier Martinez Canillas Signed-off-by: Javier Martinez Canillas Reviewed-by: Sam Ravnborg Tested-by: Tom Fitzhenry Tested-by: Peter Robinson Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20230102230733.3506624-3-javierm@redhat.com commit 3b0c2b2b5205cb45582683f3b5c360a7c318cdbe Author: Javier Martinez Canillas Date: Tue Jan 3 00:07:31 2023 +0100 dt-bindings: display: Add Himax HX8394 panel controller Add device tree bindings for panels based on the Himax HX8394 controller, such as the HannStar HSD060BHW4 720x1440 TFT LCD panel that is connected through a MIPI-DSI video interface. Signed-off-by: Javier Martinez Canillas Reviewed-by: Krzysztof Kozlowski Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20230102230733.3506624-2-javierm@redhat.com commit 3db9d590557da3aa2c952f2fecd3e9b703dad790 Author: Chris Wilson Date: Mon Dec 12 17:13:38 2022 +0100 drm/i915/gt: Reset twice After applying an engine reset, on some platforms like Jasperlake, we occasionally detect that the engine state is not cleared until shortly after the resume. As we try to resume the engine with volatile internal state, the first request fails with a spurious CS event (it looks like it reports a lite-restore to the hung context, instead of the expected idle->active context switch). Signed-off-by: Chris Wilson Cc: stable@vger.kernel.org Cc: Mika Kuoppala Signed-off-by: Andi Shyti Reviewed-by: Gwan-gyeong Mun Link: https://patchwork.freedesktop.org/patch/msgid/20221212161338.1007659-1-andi.shyti@linux.intel.com commit 091b20ceb0fc5c98fe8b22c5b4685e316464fa9a Author: Simon Ser Date: Mon Nov 28 13:39:05 2022 +0000 doc: add dma-buf IOCTL code to table The code 'b' is used for dma-buf IOCTLs. Signed-off-by: Simon Ser Cc: Linus Torvalds Cc: Daniel Vetter Cc: Christian König Cc: Sumit Semwal Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20221128133853.355645-1-contact@emersion.fr commit bb5525a50601f8be7d0ffb04740e1714506e60c4 Author: Ashok Raj Date: Mon Nov 28 09:24:51 2022 -0800 x86/cpu: Remove redundant extern x86_read_arch_cap_msr() The prototype for the x86_read_arch_cap_msr() function has moved to arch/x86/include/asm/cpu.h - kill the redundant definition in arch/x86/kernel/cpu.h and include the header. Signed-off-by: Ashok Raj Signed-off-by: Ingo Molnar Reviewed-by: Daniel Sneddon Link: https://lore.kernel.org/r/20221128172451.792595-1-ashok.raj@intel.com commit 9fcad995c6c52cc9791f7ee9f1386a5684055f9c Author: Chuang Wang Date: Tue Nov 29 16:39:51 2022 +0800 x86/kprobes: Use switch-case for 0xFF opcodes in prepare_emulation For the `FF /digit` opcodes in prepare_emulation, use switch-case instead of hand-written code to make the logic easier to understand. Signed-off-by: Chuang Wang Signed-off-by: Ingo Molnar Acked-by: Masami Hiramatsu (Google) Link: https://lore.kernel.org/r/20221129084022.718355-1-nashuiliang@gmail.com commit 9873039caac1574ce10702255722151a530ad01b Author: Uwe Kleine-König Date: Mon Dec 19 09:40:23 2022 +0100 drm/vc4: dsi: Drop unused i2c include The driver doesn't make use of any symbol provided by . So drop the include. Signed-off-by: Uwe Kleine-König Reviewed-by: Javier Martinez Canillas Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221219084023.1402282-1-u.kleine-koenig@pengutronix.de commit a3ae16030a0320229df10cedfeff1f80df26ee76 Merge: 07445f3c7ca1c 830763b967203 Author: Paolo Abeni Date: Tue Jan 10 11:58:41 2023 +0100 Merge branch 'mv88e6xxx-add-mab-offload-support' Hans J. Schultz says: ==================== mv88e6xxx: Add MAB offload support This patch-set adds MAB [1] offload support in mv88e6xxx. Patch #1: Correct default return value for mv88e6xxx_port_bridge_flags. Patch #2: Shorten the locked section in mv88e6xxx_g1_atu_prob_irq_thread_fn(). Patch #3: The MAB implementation for mv88e6xxx. [1] https://git.kernel.org/netdev/net-next/c/4bf24ad09bc0 ==================== Link: https://lore.kernel.org/r/20230108094849.1789162-1-netdev@kapio-technology.com Signed-off-by: Paolo Abeni commit 830763b9672036178288f3a09e963646f1d3cafa Author: Hans J. Schultz Date: Sun Jan 8 10:48:49 2023 +0100 net: dsa: mv88e6xxx: mac-auth/MAB implementation This implementation for the Marvell mv88e6xxx chip series is based on handling ATU miss violations occurring when packets ingress on a port that is locked with learning on. This will trigger a SWITCHDEV_FDB_ADD_TO_BRIDGE event, which will result in the bridge module adding a locked FDB entry. This bridge FDB entry will not age out as it has the extern_learn flag set. Userspace daemons can listen to these events and either accept or deny access for the host, by either replacing the locked FDB entry with a simple entry or leave the locked entry. If the host MAC address is already present on another port, a ATU member violation will occur, but to no real effect, and the packet will be dropped in hardware. Statistics on these violations can be shown with the command and example output of interest: ethtool -S ethX NIC statistics: ... atu_member_violation: 5 atu_miss_violation: 23 ... Where ethX is the interface of the MAB enabled port. Furthermore, as added vlan interfaces where the vid is not added to the VTU will cause ATU miss violations reporting the FID as MV88E6XXX_FID_STANDALONE, we need to check and skip the miss violations handling in this case. Signed-off-by: Hans J. Schultz Reviewed-by: Vladimir Oltean Signed-off-by: Paolo Abeni commit 0c34aff523c7498bc0c420ea985b1bb8ce463839 Author: Hans J. Schultz Date: Sun Jan 8 10:48:48 2023 +0100 net: dsa: mv88e6xxx: shorten the locked section in mv88e6xxx_g1_atu_prob_irq_thread_fn() As only the hardware access functions up til and including mv88e6xxx_g1_atu_mac_read() called under the interrupt handler need to take the chip lock, we release the chip lock after this call. The follow up code that handles the violations can run without the chip lock held. In further patches, the violation handler function will even be incompatible with having the chip lock held. This due to an AB/BA ordering inversion with rtnl_lock(). Signed-off-by: Hans J. Schultz Reviewed-by: Vladimir Oltean Signed-off-by: Paolo Abeni commit e06a9af067b3a6eeb1e116360f6f8bcef96a90c3 Author: Hans J. Schultz Date: Sun Jan 8 10:48:47 2023 +0100 net: dsa: mv88e6xxx: change default return of mv88e6xxx_port_bridge_flags The default return value -EOPNOTSUPP of mv88e6xxx_port_bridge_flags() came from the return value of the DSA method port_egress_floods() in commit 4f85901f0063 ("net: dsa: mv88e6xxx: add support for bridge flags"), but the DSA API was changed in commit a8b659e7ff75 ("net: dsa: act as passthrough for bridge port flags"), resulting in the return value -EOPNOTSUPP not being valid anymore, and sections for new flags will not need to set the return value to zero on success, as with the new mab flag added in a following patch. Signed-off-by: Hans J. Schultz Reviewed-by: Vladimir Oltean Signed-off-by: Paolo Abeni commit ef90f0a1913e8b60101c374010847615172a77d1 Author: Dean Luick Date: Mon Jan 9 14:04:24 2023 -0500 IB/hfi1: Split IB counter allocation Split the IB device and port counter allocation. Remove the need for a lock. Clean up pointer usage. Signed-off-by: Dean Luick Signed-off-by: Dennis Dalessandro Link: https://lore.kernel.org/r/167329106431.1472990.12587703493884915680.stgit@awfm-02.cornelisnetworks.com Signed-off-by: Leon Romanovsky commit 845127ed8717e0340c022ef1fd646ed4694d9c7b Author: Dean Luick Date: Mon Jan 9 14:04:19 2023 -0500 IB/hfi1: Improve TID validity checking Correct and improve validity checking of user supplied TIDs. A tidctrl value of 0 is invalid. Verify that the final index is in range, not an intermediate value. Signed-off-by: Dean Luick Signed-off-by: Dennis Dalessandro Link: https://lore.kernel.org/r/167329105916.1472990.9915542468337924727.stgit@awfm-02.cornelisnetworks.com Signed-off-by: Leon Romanovsky commit d8f4ab01c6d0d59f7010b27c3b4ffca512324457 Author: Dean Luick Date: Mon Jan 9 14:04:14 2023 -0500 IB/hfi1: Consolidate the creation of user TIDs The function rcventry2tidinfo() only creates part of a TID and all calls to it are only used to make a user TID. Consolidate all usage into a single routine. Signed-off-by: Dean Luick Signed-off-by: Dennis Dalessandro Link: https://lore.kernel.org/r/167329105402.1472990.9685946655723333660.stgit@awfm-02.cornelisnetworks.com Signed-off-by: Leon Romanovsky commit a479433a6b7a2b0f21da3071d6a9afb66bfd5887 Author: Dean Luick Date: Mon Jan 9 14:04:08 2023 -0500 IB/hfi1: Assign npages earlier Improve code clarity and enable earlier use of tidbuf->npages by moving its assignment to structure creation time. Signed-off-by: Dean Luick Signed-off-by: Dennis Dalessandro Link: https://lore.kernel.org/r/167329104884.1472990.4639750192433251493.stgit@awfm-02.cornelisnetworks.com Signed-off-by: Leon Romanovsky commit 3c49eef389782288d6f531031bb592a43c7fde9e Author: Dean Luick Date: Mon Jan 9 14:04:03 2023 -0500 IB/hfi1: Remove redundant pageidx variable In hfi1_user_exp_rcv_setup(), variable pageidx mirrors variable tididx. Remove pageidx and its use as an argument to program_rcvarray(). Signed-off-by: Dean Luick Signed-off-by: Dennis Dalessandro Link: https://lore.kernel.org/r/167329104365.1472990.14264918308557487946.stgit@awfm-02.cornelisnetworks.com Signed-off-by: Leon Romanovsky commit 8a01ec97dc066009dd89e43bfcf55644f2dd6d19 Author: Tony Luck Date: Mon Jan 9 07:29:36 2023 -0800 x86/mce: Mask out non-address bits from machine check bank Systems that support various memory encryption schemes (MKTME, TDX, SEV) use high order physical address bits to indicate which key should be used for a specific memory location. When a memory error is reported, some systems may report those key bits in the IA32_MCi_ADDR machine check MSR. The Intel SDM has a footnote for the contents of the address register that says: "Useful bits in this field depend on the address methodology in use when the register state is saved." AMD Processor Programming Reference has a more explicit description of the MCA_ADDR register: "For physical addresses, the most significant bit is given by Core::X86::Cpuid::LongModeInfo[PhysAddrSize]." Add a new #define MCI_ADDR_PHYSADDR for the mask of valid physical address bits within the machine check bank address register. Use this mask for recoverable machine check handling and in the EDAC driver to ignore any key bits that may be present. [ Tony: Based on independent fixes proposed by Fan Du and Isaku Yamahata ] Reported-by: Isaku Yamahata Reported-by: Fan Du Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Yazen Ghannam Link: https://lore.kernel.org/r/20230109152936.397862-1-tony.luck@intel.com commit 2723c25704d643f28533f2e8ac81b2892db42ee9 Author: Uwe Kleine-König Date: Mon Dec 19 09:53:07 2022 +0100 MAINTAINERS: drm/hisilicon: Drop Chen Feng The listed address doesn't work any more: puck.chen@hisilicon.com host mx5.hisilicon.com [124.71.93.234] SMTP error from remote mail server after RCPT TO:: 551 5.1.1 : Recipient address rejected: Failed recipient validation check.: host 127.0.0.1[127.0.0.1] said: 554 5.7.1 recipient verify from ldap failed (in reply to RCPT TO command) Signed-off-by: Uwe Kleine-König Reviewed-by: Javier Martinez Canillas Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221219085307.1403247-1-u.kleine-koenig@pengutronix.de commit 07445f3c7ca1cfe490353be52bda91d9e6745ef4 Author: Raju Rangoju Date: Mon Jan 9 15:48:19 2023 +0530 amd-xgbe: Add support for 10 Mbps speed Add the necessary changes to support 10 Mbps speed for BaseT and SFP port modes. This is supported in MAC ver >= 30H. Signed-off-by: Raju Rangoju Link: https://lore.kernel.org/r/20230109101819.747572-1-Raju.Rangoju@amd.com Signed-off-by: Paolo Abeni commit 000458b5966fab07568cd6cf5d044314f448e34c Author: Uwe Kleine-König Date: Mon Dec 19 09:36:27 2022 +0100 drm: Only select I2C_ALGOBIT for drivers that actually need it While working on a drm driver that doesn't need the i2c algobit stuff I noticed that DRM selects this code even though only 8 drivers actually use it. While also only some drivers use i2c, keep the select for I2C for the next cleanup patch. Still prepare this already by also selecting I2C for the individual drivers. Signed-off-by: Uwe Kleine-König Reviewed-by: Javier Martinez Canillas Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221219083627.1401627-1-u.kleine-koenig@pengutronix.de commit 0e4dcffd331fa7d2a6ae628b51a7f418dfa90367 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:17 2022 +0100 drm/panel: raspberrypi-touchscreen: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Javier Martinez Canillas Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221118224540.619276-44-uwe@kleine-koenig.org commit 446757576a646eba6fae085396bdfbd74245ff28 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:16 2022 +0100 drm/panel: olimex-lcd-olinuxino: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Javier Martinez Canillas Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221118224540.619276-43-uwe@kleine-koenig.org commit 307259952625798fbea89b04aebbc5106ff18c68 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:15 2022 +0100 drm/i2c/tda998x: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Javier Martinez Canillas Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221118224540.619276-42-uwe@kleine-koenig.org commit 1cff174aa161775501d44b3b2ccd11a692836642 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:14 2022 +0100 drm/i2c/tda9950: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Javier Martinez Canillas Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221118224540.619276-41-uwe@kleine-koenig.org commit 29ef7605e2fd44038a70df0f46b7821464081b22 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:13 2022 +0100 drm/i2c/sil164: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Javier Martinez Canillas Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221118224540.619276-40-uwe@kleine-koenig.org commit e36a3e44c08b2a03380746e8d5a852cbb8aa0b9d Author: Uwe Kleine-König Date: Fri Nov 18 23:36:12 2022 +0100 drm/i2c/ch7006: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Javier Martinez Canillas Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221118224540.619276-39-uwe@kleine-koenig.org commit 6d6defd42185d8ab07e6d0cada5fb3a986f23406 Author: Uwe Kleine-König Date: Tue Jan 10 10:38:20 2023 +0100 drm/mxsfb: improve clk handling for axi clk Ignoring errors from devm_clk_get() is wrong. To handle not all platforms having an axi clk use devm_clk_get_optional() instead and do proper error handling. Also the clk API handles NULL as a dummy clk (which is also returned by devm_clk_get_optional() if there is no clk) so there is no need to check for NULL before calling clk_prepare_enable() or its counter part. Signed-off-by: Uwe Kleine-König Reviewed-by: Javier Martinez Canillas Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20200720153254.18071-1-u.kleine-koenig@pengutronix.de commit ccae0447af0e471426beea789a52b2b6605663e0 Author: Mark Zhang Date: Wed Jan 4 10:03:41 2023 +0200 RDMA/cma: Refactor the inbound/outbound path records process flow Refactors based on comments [1] of the multiple path records support patchset: - Return failure if not able to set inbound/outbound PRs; - Simplify the flow when receiving the PRs from netlink channel: When a good PR response is received, unpack it and call the path_query callback directly. This saves two memory allocations; - Define RDMA_PRIMARY_PATH_MAX_REC_NUM in a proper place. [1] https://lore.kernel.org/linux-rdma/Yyxp9E9pJtUids2o@nvidia.com/ Signed-off-by: Mark Zhang Reviewed-by: Bart Van Assche #srp Link: https://lore.kernel.org/r/7610025d57342b8b6da0f19516c9612f9c3fdc37.1672819376.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky commit 36aa3eee39b2bce5596d3a1178d3c381c1cf3b57 Author: Fabrizio Castro Date: Tue Dec 13 23:01:29 2022 +0000 arm64: dts: renesas: r9a09g011: Add eMMC and SDHI support The RZ/V2M comes with 2 SDHI interfaces and 1 eMMC interface. Add the relevant nodes to the SoC specific device tree. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20221213230129.549968-5-fabrizio.castro.jz@renesas.com Signed-off-by: Geert Uytterhoeven commit df9645b93a1ac30dd99678597e8bed835216a0d4 Author: Tomi Valkeinen Date: Thu Dec 1 11:56:29 2022 +0200 arm64: dts: renesas: white-hawk-cpu: Add DP output support Add DT nodes needed for the mini DP connector. The DP is driven by sn65dsi86, which in turn gets the pixel data from the SoC via DSI. Signed-off-by: Tomi Valkeinen Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20221201095631.89448-6-tomi.valkeinen+renesas@ideasonboard.com Signed-off-by: Geert Uytterhoeven commit 95d60f13d3abc2916b36d9429dc127f55c9cd8d3 Author: Tomi Valkeinen Date: Thu Dec 1 11:56:28 2022 +0200 arm64: dts: renesas: r8a779g0: Add display related nodes Add DT nodes for components needed to get the DSI output working: - FCPv - VSPd - DU - DSI Signed-off-by: Tomi Valkeinen Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20221201095631.89448-5-tomi.valkeinen+renesas@ideasonboard.com Signed-off-by: Geert Uytterhoeven commit ef10e647d9322fb7c5fdfa8c6e1b0a0cf5d4a45b Author: Geert Uytterhoeven Date: Wed Nov 30 15:16:13 2022 +0100 arm64: dts: renesas: r8a779f0: Add CA55 operating points Add operating points for running the Cortex-A55 CPU cores on R-Car S4-8 at various speeds, up to the maximum supported frequency (1200 MHz). R-Car S4-8 has 8 Cortex-A55 cores, grouped in 4 clusters. CA55 Sub-System 0 (first 2 clusters / CPU cores 0-3) is clocked by Z0φ. CA55 Sub-System 1 (last 2 clusters / CPU cores 4-7) is clocked by Z1φ. As the two sets of clusters are driven by separate clocks, this requires specifying two separate tables (using the same operating performance point values), with "opp-shared" to indicate that the CPU cores in each set share state. Based on a patch in the BSP by Tho Vu. Signed-off-by: Geert Uytterhoeven Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/ae78351d702a53702a1d5fa26675fe982b99cdf5.1669817508.git.geert+renesas@glider.be commit 3ad69c496d488cd1b6c3a20b2f7945b45a0f7f18 Author: Geert Uytterhoeven Date: Tue Jan 3 13:04:14 2023 +0100 arm64: defconfig: Enable RZ/G2L MIPI CSI-2 and CRU support Increase build and test coverage by enabling support for the Renesas RZ/G2L MIPI CSI-2 Receiver and the RZ/G2L Camera Receiving Unit, as used on the RZ/G2L SMARC EVK development board. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/32098bf6a5e78a4bcc6398ccb5db0b01f1afc9b9.1672747428.git.geert+renesas@glider.be commit db1d7b6efc6e16c398e8843379022562ba9afe05 Author: Geert Uytterhoeven Date: Tue Jan 3 12:13:54 2023 +0100 ARM: shmobile: defconfig: Refresh for v6.1-rc5 Refresh the defconfig for Renesas ARM systems: - Disable CONFIG_DRM_RCAR_USE_MIPI_DSI (defaults to yes since commit a830a15678593948 ("drm: rcar-du: Fix Kconfig dependency between RCAR_DU and RCAR_MIPI_DSI"), but only used on R-Car V3U). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/4f7757bd700edff487df387ca40ffb1524d688a4.1672744302.git.geert+renesas@glider.be commit fef4e61b0b765b6d22badcd5b6575b159e7d510a Author: Takashi Sakamoto Date: Tue Jan 10 06:32:31 2023 +0900 ALSA: firewire-lib: extend tracepoints event including CYCLE_TIME of 1394 OHCI A commit baa914cd81f5 ("firewire: add kernel API to access CYCLE_TIME register") allow unit drivers to read CYCLE_TIME of 1394 OHCI controller. The value expresses monotonic time with 42.195 Mhz resolution and wrapping around every 128 seconds. The controller uses the time to govern isochronous cycle. This commit extends tracepoints event including the value so that event parser can compute gap between current isochronous cycle and the latest isochronous cycle in which packet is processed (in IR context) or scheduled (in IT context). It loses backward compatibility to former format of the tracepoints event. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230109213231.138223-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 67d0a30128c9f644595dfe67ac0fb941a716a6c9 Author: Marek Szyprowski Date: Mon Jan 9 23:00:33 2023 +0100 drm/meson: dw-hdmi: Fix devm_regulator_*get_enable*() conversion devm_regulator_get_enable_optional() function returns 0 on success, so use it for the check if function succeeded instead of the -ENODEV value. Fixes: 429e87063661 ("drm/meson: dw-hdmi: Use devm_regulator_*get_enable*()") Signed-off-by: Marek Szyprowski Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong [narmstrong: s/succeeded/succeeded/ in commit message] Link: https://patchwork.freedesktop.org/patch/msgid/20230109220033.31202-1-m.szyprowski@samsung.com commit 8d037973d48c026224ab285e6a06985ccac6f7bf Author: Patrisious Haddad Date: Wed Jan 4 10:01:38 2023 +0200 RDMA/core: Refactor rdma_bind_addr Refactor rdma_bind_addr function so that it doesn't require that the cma destination address be changed before calling it. So now it will update the destination address internally only when it is really needed and after passing all the required checks. Which in turn results in a cleaner and more sensible call and error handling flows for the functions that call it directly or indirectly. Signed-off-by: Patrisious Haddad Reported-by: Wei Chen Reviewed-by: Mark Zhang Link: https://lore.kernel.org/r/3d0e9a2fd62bc10ba02fed1c7c48a48638952320.1672819273.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky commit 697550668be5c1edbd0a7347ecbe6769dc54ccc9 Author: Krzysztof Kozlowski Date: Thu Dec 22 17:14:20 2022 +0100 dt-bindings: pinctrl: qcom,sm8450-lpass-lpi: add input-enable and bias-bus-hold Allow bias-bus-hold and input-enable properties (already used in SM8450): sm8450-qrd.dtb: pinctrl@3440000: dmic02-default-state: 'oneOf' conditional failed, one must be fixed: 'pins' is a required property 'function' is a required property 'clk-pins', 'data-pins' do not match any of the regexes: 'pinctrl-[0-9]+' 'input-enable' does not match any of the regexes: 'pinctrl-[0-9]+' Compact the properties which are just set to true for readability. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221222161420.172824-1-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit 3ecc01c5e0682dee4819eac3d67a4c07f113fda4 Author: Krzysztof Kozlowski Date: Fri Dec 23 14:22:26 2022 +0100 dt-bindings: pinctrl: qcom,sm8450-tlmm: correct gpio-line-names size The SM8450 has GPIOs from 0 to 209, so 210 in total: sm8450-sony-xperia-nagara-pdx223.dtb: pinctrl@f100000: gpio-line-names: ['NC', 'NC', 'NC', 'NC', 'WLC_I2C_SDA', 'WLC_I2C_SCL', ... 'APPS_I2C_0_SDA', 'APPS_I2C_0_SCL', 'CCI_I2C3_SDA', 'CCI_I2C3_SCL'] is too long Fixes: 9779ed30f92c ("dt-bindings: pinctrl: qcom,sm8450-pinctrl: add gpio-line-names") Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221223132226.81340-1-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit 091e81b867796130a08be162ff8d9332492de26e Author: Andy Shevchenko Date: Mon Jan 9 15:27:19 2023 +0200 pinctrl: pinmux: Drop duplicate error message in pinmux_select() pinctrl_get_group_selector() prints an error message when group is not found in the list. No need to repeat this in the caller. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230109132719.86009-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 8bb5811129f9e40fb5f3aef6807b3920881140b6 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:04 2022 +0100 pinctrl: mcp23s08: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20221118224540.619276-511-uwe@kleine-koenig.org Signed-off-by: Linus Walleij commit 814ee08d9ea9f234fedbca29f9d96990f3fc06b3 Author: Luca Weiss Date: Fri Jan 6 13:44:02 2023 +0200 pinctrl: qcom: msm8226: Add General Purpose clocks Add support for the general purpose clocks that are found on MSM8226. Signed-off-by: Luca Weiss Co-developed-by: Matti Lehtimäki Signed-off-by: Matti Lehtimäki Link: https://lore.kernel.org/r/20230106114403.275865-3-matti.lehtimaki@gmail.com Signed-off-by: Linus Walleij commit ef6c2d856632b0fd10e60c93950d4d89e99a0ada Author: Matti Lehtimäki Date: Fri Jan 6 13:44:01 2023 +0200 dt-bindings: pinctrl: msm8226: Add General Purpose clocks Document the general purpose clock functions that are found on MSM8226. Signed-off-by: Matti Lehtimäki Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230106114403.275865-2-matti.lehtimaki@gmail.com Signed-off-by: Linus Walleij commit f4720b845b15456719d88bb8408d82cb5ea6132b Author: Peng Fan Date: Wed Jan 4 10:14:30 2023 +0800 dt-bindings: pinctrl: imx8m: Integrate duplicated i.MX 8M schemas The i.MX8MM/N/P/Q IOMUXC schemas are basically the same, it does not to have four schemas for almost the same binding. Signed-off-by: Peng Fan Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230104021430.3503497-1-peng.fan@oss.nxp.com Signed-off-by: Linus Walleij commit 407da561244b9d51e6a794d6305ba38ec2c9d907 Merge: 144ff5e03d745 b7bfaa761d760 Author: Dmitry Torokhov Date: Mon Jan 9 20:28:19 2023 -0800 Merge tag 'v6.2-rc3' into next Merge with mainline to bring in timer_shutdown_sync() API. commit 144ff5e03d745a299a9aabe2a597da843cf1c430 Author: Jonathan Cameron Date: Mon Jan 2 18:18:42 2023 +0000 Input: ipaq-micro-ts - use DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() This driver never used the older SIMPLE_DEV_PM_OPS() but instead just set two of the callbacks directly. Skip that deprecated macro and go straight to the new form that avoids the need for guarding or marking callbacks __maybe_unused. -- It is possible there is some subtle reason why only two of the callbacks normally set by SIMPLE_DEV_PM_OPS() are set. As such, this one needs some closer reading than many of the others. Signed-off-by: Jonathan Cameron Cc: Linus Walleij Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-70-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 61df952bfd1ac1a67f030a472faa1eb78fa428fc Author: Jonathan Cameron Date: Mon Jan 2 18:18:41 2023 +0000 Input: zinitix - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Linus Walleij Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-69-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit dc69e98a55207267be3b5cb8ec12db3aa41aef63 Author: Jonathan Cameron Date: Mon Jan 2 18:18:40 2023 +0000 Input: zforce_ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-68-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit fea26099aee23c3dace5fe1a47ec3de919782485 Author: Jonathan Cameron Date: Mon Jan 2 18:18:39 2023 +0000 Input: wm97xx - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-67-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit fa8d5a6e7145262004fc1f7746c5a4edc6c11334 Author: Jonathan Cameron Date: Mon Jan 2 18:18:38 2023 +0000 Input: wdt87xx_i2c - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-66-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 5ca74320a748545677071bcb89e92cded7f317ad Author: Jonathan Cameron Date: Mon Jan 2 18:18:37 2023 +0000 Input: wacom_i2c - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Alistair Francis Reviewed-by: Alistair Francis Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-65-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 2cfa7c9c55d8c8cc076c457b0ca169f90d140d95 Author: Jonathan Cameron Date: Mon Jan 2 18:18:36 2023 +0000 Input: ucb1400_ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-64-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit f84016434752607190e3208ccbc01f738296456c Author: Jonathan Cameron Date: Mon Jan 2 18:18:35 2023 +0000 Input: ti_am335x_tsc - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Dario Binacchi Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-63-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit ea476f51bebb1f1d2ff03bdcd1a54280a58b3366 Author: Jonathan Cameron Date: Mon Jan 2 18:18:34 2023 +0000 Input: surface3_spi - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Stephen Just Cc: Benjamin Tissoires Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-62-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 7c8d436dc9a0e216535931c23e0df96acf27b52b Author: Jonathan Cameron Date: Mon Jan 2 18:18:33 2023 +0000 Input: st1232 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: John Keeping Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-61-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 5a88638218e4fbed794405929500590e52b9e5c5 Author: Jonathan Cameron Date: Mon Jan 2 18:18:32 2023 +0000 Input: silead - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Hans de Goede Reviewed-by: Hans de Goede Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-60-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 9fca27cffb9ffe988e76720213b49a9018b95020 Author: Jonathan Cameron Date: Mon Jan 2 18:18:31 2023 +0000 Input: raydium_i2c_ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-59-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit add8bbd27acd4b246446fbb31ed7284c48d36200 Author: Jonathan Cameron Date: Mon Jan 2 18:18:30 2023 +0000 Input: pixcir_i2c_ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Fabio Estevam Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-58-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit a43be2dde97e047ddf0ec365bef212c7d4f1c86e Author: Jonathan Cameron Date: Mon Jan 2 18:18:29 2023 +0000 Input: msg2638 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Vincent Knecht Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-57-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 9b61c454131b3529d9f843a7bcc34b0f4cf6ca40 Author: Jonathan Cameron Date: Mon Jan 2 18:18:28 2023 +0000 Input: mms114 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-56-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 3a841b3ee8a77dc8a0a25d3bd43b493d2f895b15 Author: Jonathan Cameron Date: Mon Jan 2 18:18:27 2023 +0000 input: migor_ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-55-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit e6a80bce242585cbf11fe18f2dbd4b1876273ba8 Author: Jonathan Cameron Date: Mon Jan 2 18:18:26 2023 +0000 Input: melfas_mip4 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Sangwon Jee Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-54-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 70f36d0cda2b68bab1f51b54991cf3182355bd4d Author: Jonathan Cameron Date: Mon Jan 2 18:18:25 2023 +0000 Input: mcs5000_ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-53-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 5662a37d06bf1ef8bda7cf8be80876ea0d7f4739 Author: Jonathan Cameron Date: Mon Jan 2 18:18:24 2023 +0000 Input: iqs5xx - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Jeff LaBundy Reviewed-by: Jeff LaBundy Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-52-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit a068aa5760acba85c203dcf2d3547a3076eb7041 Author: Jonathan Cameron Date: Mon Jan 2 18:18:23 2023 +0000 Input: imx6ul_tsc - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Haibo Chen Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-51-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit a9b113302ca684e4335f9c7ae5a3b78b08030760 Author: Jonathan Cameron Date: Mon Jan 2 18:18:22 2023 +0000 Input: imagis - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Markuss Broks Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-50-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 4024f8481ac294bba64071d44684d3400a395e4e Author: Jonathan Cameron Date: Mon Jan 2 18:18:21 2023 +0000 Input: ilitek_ts_i2c - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Joe Hung Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-49-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 311fd6b03c607c3dfcc84739fddef0fa3de35cd3 Author: Jonathan Cameron Date: Mon Jan 2 18:18:20 2023 +0000 Input: hideep - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Anthony Kim Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-48-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 05ebb78bf8d695a42593f638df9b07a960f38cc6 Author: Jonathan Cameron Date: Mon Jan 2 18:18:19 2023 +0000 Input: goodix - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Hans de Goede Cc: Bastien Nocera Reviewed-by: Hans de Goede Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-47-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit df0f673485d226d812b51470b5673582e756aaca Author: Jonathan Cameron Date: Mon Jan 2 18:18:18 2023 +0000 Input: elants_i2c - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Douglas Anderson Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-46-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 717ba04a88a00699bf864acce2edbef9bd1e4443 Author: Jonathan Cameron Date: Mon Jan 2 18:18:17 2023 +0000 input: ektf2127 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Jonathan Neuschäfer Cc: Hans de Goede Reviewed-by: Hans de Goede Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-45-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit d67c047e1d9988b0605c44bf279f06e15343c3f9 Author: Jonathan Cameron Date: Mon Jan 2 18:18:16 2023 +0000 Input: egalax_ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-44-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 993d854c8a065800c2f9e2fbaafb40918ebb44d7 Author: Jonathan Cameron Date: Mon Jan 2 18:18:15 2023 +0000 Input: eeti_ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Daniel Mack Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-43-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 6e6ebfc54e54bea6c5a28ce08b5460309ff96a3c Author: Jonathan Cameron Date: Mon Jan 2 18:18:14 2023 +0000 Input: edt-ft5x06 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Michael Trimarchi Cc: Dario Binacchi Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-42-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit c5aa5183414141b4ec5292b07b460eefed7c6e76 Author: Jonathan Cameron Date: Mon Jan 2 18:18:13 2023 +0000 Input: cy8ctmg110_ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Linus Walleij Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-41-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 0299859083cf097cfdfd82c5dd0ff64fc6390159 Author: Jonathan Cameron Date: Mon Jan 2 18:18:12 2023 +0000 Input: cy8ctma140 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Linus Walleij Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-40-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 99e93cc9677d36efec5aec999114551419705c37 Author: Jonathan Cameron Date: Mon Jan 2 18:18:11 2023 +0000 Input: chipone_icn8505 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Hans de Goede Reviewed-by: Hans de Goede Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-39-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit eb36403d2f32191671dc4f00cabb2cf89f64e292 Author: Jonathan Cameron Date: Mon Jan 2 18:18:10 2023 +0000 Input: chipone_in8318 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the #ifdef guards. Signed-off-by: Jonathan Cameron Cc: Hans de Goede Reviewed-by: Hans de Goede Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-38-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit a259afe95f2ef0264b2fd78238acb418d9aaea02 Author: Jonathan Cameron Date: Mon Jan 2 18:18:09 2023 +0000 Input: bu21029 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Zhu Yi Cc: Mark Jonas Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-37-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit bed5cf8f007d2b9503aa8d5a6928c5059a2a4d2e Author: Jonathan Cameron Date: Mon Jan 2 18:18:08 2023 +0000 Input: bu21013_ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Linus Walleij Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-36-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 48877f8e7a0694c8668a840f4d4fd6aafd088109 Author: Jonathan Cameron Date: Mon Jan 2 18:18:07 2023 +0000 Input: auo-pixcir-ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Heiko Stuebner Reviewed-by: Heiko Stuebner Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-35-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 3de717d137a8d4050d9b8f75e2ee61468f24e396 Author: Jonathan Cameron Date: Mon Jan 2 18:18:06 2023 +0000 Input: atmel_mxt_ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Claudiu Beznea Reviewed-by: Claudiu Beznea Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-34-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit eb6abb8962b30b36b4bcb47faaa1325937300389 Author: Jonathan Cameron Date: Mon Jan 2 18:18:05 2023 +0000 Input: ar1021 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-33-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit f8909d9a8b4569f871034ab3f2bc4261135c5b86 Author: Jonathan Cameron Date: Mon Jan 2 18:18:04 2023 +0000 Input: ads7846 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-32-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 458d7343fe0f37362521cace6b561f36eb3fc97c Author: Jonathan Cameron Date: Mon Jan 2 18:18:03 2023 +0000 Input: ad7877 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Michael Hennerich Acked-by: Michael Hennerich Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-31-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 9c19131f6b4e84fd4eaa1777e965e509f62f9b72 Author: Jonathan Cameron Date: Mon Jan 2 18:18:02 2023 +0000 Input: ambakmi - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-30-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 18b8fe43d5c3e76361884b57a3b1c2acf6922c4b Author: Jonathan Cameron Date: Mon Jan 2 18:18:01 2023 +0000 Input: synaptics_i2c - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-29-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 0ca5bc9556dc8a432bbfc0b297359d796dacc551 Author: Jonathan Cameron Date: Mon Jan 2 18:18:00 2023 +0000 Input: navpoint - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-28-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit b39f288a8416d427741def93dd4edcfe4911e7d0 Author: Jonathan Cameron Date: Mon Jan 2 18:17:59 2023 +0000 Input: elan_i2c_core - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Raul E Rangel Cc: Hans de Goede Reviewed-by: Hans de Goede Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-27-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit c7d8ba3854a94c67a3fdab3d707873c9c89726bc Author: Jonathan Cameron Date: Mon Jan 2 18:17:58 2023 +0000 Input: twl6030-vibra - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Tony Lindgren Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-26-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 60bca2ae7ed9801797362d94ff8c5e6662234696 Author: Jonathan Cameron Date: Mon Jan 2 18:17:57 2023 +0000 Input: twl4030-vibra - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Tony Lindgren Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-25-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 5057e0aa48d8711dcdd9cf47b02cc253adce5a80 Author: Jonathan Cameron Date: Mon Jan 2 18:17:56 2023 +0000 Input: stpmic1_onekey - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Pascal Paillet Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-24-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 4268a06bf41be7e4ab28f7f3ae8badcd2d202aff Author: Jonathan Cameron Date: Mon Jan 2 18:17:55 2023 +0000 Input: rotary-encoder - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-23-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 1a3e6c1ee47d007f603aa6bad19b581cbeed29da Author: Jonathan Cameron Date: Mon Jan 2 18:17:54 2023 +0000 Input: regulator-haptic - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-22-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit e4b4592f2e2924b613aea9f0b92f012b3c82106d Author: Jonathan Cameron Date: Mon Jan 2 18:17:53 2023 +0000 Input: pwm-vibra - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-21-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 349fe1e44dacc28aef48f764634e457df597c8a9 Author: Jonathan Cameron Date: Mon Jan 2 18:17:52 2023 +0000 Input: pwm-beeper - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Lars-Peter Clausen Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-20-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit a410677f4042a7f84644173a893780daee34ff3f Author: Jonathan Cameron Date: Mon Jan 2 18:17:51 2023 +0000 Input: pmic8xxx-pwrkey - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Stephen Boyd Reviewed-by: Stephen Boyd Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-19-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 37aee5951f55561bd30b4cc937419a5288f93103 Author: Jonathan Cameron Date: Mon Jan 2 18:17:50 2023 +0000 Input: pm8xxx-vibrator - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Damien Riegel Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-18-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 209cf27d48705a5920f1555972f6749ebeeef7b7 Author: Jonathan Cameron Date: Mon Jan 2 18:17:49 2023 +0000 Input: pm8941-pwrkey - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Stephen Boyd Reviewed-by: Stephen Boyd Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-17-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 22db998afdddcbf65eb5385f05a2fec7c2959a1e Author: Jonathan Cameron Date: Mon Jan 2 18:17:48 2023 +0000 Input: pcfg8574_keypad - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the #ifdef guards. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-16-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 77c52d40cf1e7627d0b428045d4254562cc18df1 Author: Jonathan Cameron Date: Mon Jan 2 18:17:47 2023 +0000 Input: palmas-pwrbutton - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Geert Uytterhoeven Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-15-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit a66640c66ed183b252729ac1fb6fe4308b68bb09 Author: Jonathan Cameron Date: Mon Jan 2 18:17:46 2023 +0000 Input: max8997_haptic - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-14-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 1bf948444616ec1c658988459494b0b60bafe11c Author: Jonathan Cameron Date: Mon Jan 2 18:17:45 2023 +0000 Input: max8925_onkey - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-13-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 1e3023999222adb622b1df67f474eff9c51db4a4 Author: Jonathan Cameron Date: Mon Jan 2 18:17:44 2023 +0000 Input: max77693-haptic - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Krzysztof Kozlowski Reviewed-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-12-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 0ac787e0693118141fd7830465a449432bb51394 Author: Jonathan Cameron Date: Mon Jan 2 18:17:43 2023 +0000 Input: kxtj9 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-11-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 238e5de40c3632b0a426fe69911d708b58820521 Author: Jonathan Cameron Date: Mon Jan 2 18:17:42 2023 +0000 Input: iqs626a - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Reviewed-by: Jeff LaBundy Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-10-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 29eac950768a48651e2389f7d3f2ad597f6e58d1 Author: Jonathan Cameron Date: Mon Jan 2 18:17:41 2023 +0000 Input: iqs269a - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Jeff LaBundy Reviewed-by: Jeff LaBundy Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-9-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 74305aff79ed4a67b5d86b4332efc0157826afb4 Author: Jonathan Cameron Date: Mon Jan 2 18:17:40 2023 +0000 Input: gpio-vibra - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Luca Weiss Reviewed-by: Luca Weiss Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-8-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 5ad71cbda4e79415e4a16141c59c4b8760f2b76e Author: Jonathan Cameron Date: Mon Jan 2 18:17:39 2023 +0000 Input: e3x0-button - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Moritz Fischer Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-7-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 0e076fce3a42f6d30aad221337f1f392e60038f9 Author: Jonathan Cameron Date: Mon Jan 2 18:17:38 2023 +0000 Input: drv2667 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-6-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit c7cd0194c73ea0d9500489f09da0225de1c2479a Author: Jonathan Cameron Date: Mon Jan 2 18:17:37 2023 +0000 Input: drv2665 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-5-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit c7cf2b4db52b5368898f4c75b5c0379de42652f8 Author: Jonathan Cameron Date: Mon Jan 2 18:17:36 2023 +0000 Input: drv260x - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-4-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit afe9bc86cc8385d5777d2d1ac04d405ddc22a6ba Author: Jonathan Cameron Date: Mon Jan 2 18:17:35 2023 +0000 Input: da7280 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Roy Im Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-3-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit 72924c1c9720987fa73dd91262d98b21258de0f9 Author: Jonathan Cameron Date: Mon Jan 2 18:17:34 2023 +0000 Input: 88pm860x - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230102181842.718010-2-jic23@kernel.org Signed-off-by: Dmitry Torokhov commit db85d14dc5c566879a01c4928b2f6f4d5cf0f939 Author: Eric Biggers Date: Fri Dec 23 12:36:38 2022 -0800 ext4: allow verity with fs block size < PAGE_SIZE Now that the needed changes have been made to fs/buffer.c, ext4 is ready to support the verity feature when the filesystem block size is less than the page size. So remove the mount-time check that prevented this. Signed-off-by: Eric Biggers Tested-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20221223203638.41293-12-ebiggers@kernel.org commit 4fa512ce70515ac0d59e30a4b7ae0888b117d8a2 Author: Eric Biggers Date: Fri Dec 23 12:36:37 2022 -0800 fs/buffer.c: support fsverity in block_read_full_folio() After each filesystem block (as represented by a buffer_head) has been read from disk by block_read_full_folio(), verify it if needed. The verification is done on the fsverity_read_workqueue. Also allow reads of verity metadata past i_size, as required by ext4. This is needed to support fsverity on ext4 filesystems where the filesystem block size is less than the page size. The new code is compiled away when CONFIG_FS_VERITY=n. Signed-off-by: Eric Biggers Tested-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20221223203638.41293-11-ebiggers@kernel.org commit feb0576a361aacaf12c49e66d32e293a0f3a2e64 Author: Eric Biggers Date: Fri Dec 23 12:36:36 2022 -0800 f2fs: simplify f2fs_readpage_limit() Now that the implementation of FS_IOC_ENABLE_VERITY has changed to not involve reading back Merkle tree blocks that were previously written, there is no need for f2fs_readpage_limit() to allow for this case. Signed-off-by: Eric Biggers Tested-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20221223203638.41293-10-ebiggers@kernel.org commit 5e122148a3d573a66f47f826168a3c23a321ac9d Author: Eric Biggers Date: Fri Dec 23 12:36:35 2022 -0800 ext4: simplify ext4_readpage_limit() Now that the implementation of FS_IOC_ENABLE_VERITY has changed to not involve reading back Merkle tree blocks that were previously written, there is no need for ext4_readpage_limit() to allow for this case. Signed-off-by: Eric Biggers Tested-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20221223203638.41293-9-ebiggers@kernel.org commit 56124d6c87fd749477425110d2564166621a89c4 Author: Eric Biggers Date: Fri Dec 23 12:36:34 2022 -0800 fsverity: support enabling with tree block size < PAGE_SIZE Make FS_IOC_ENABLE_VERITY support values of fsverity_enable_arg::block_size other than PAGE_SIZE. To make this possible, rework build_merkle_tree(), which was reading data and hash pages from the file and assuming that they were the same thing as "blocks". For reading the data blocks, just replace the direct pagecache access with __kernel_read(), to naturally read one block at a time. (A disadvantage of the above is that we lose the two optimizations of hashing the pagecache pages in-place and forcing the maximum readahead. That shouldn't be very important, though.) The hash block reads are a bit more difficult to handle, as the only way to do them is through fsverity_operations::read_merkle_tree_page(). Instead, let's switch to the single-pass tree construction algorithm that fsverity-utils uses. This eliminates the need to read back any hash blocks while the tree is being built, at the small cost of an extra block-sized memory buffer per Merkle tree level. This is probably what I should have done originally. Taken together, the above two changes result in page-size independent code that is also a bit simpler than what we had before. Signed-off-by: Eric Biggers Reviewed-by: Andrey Albershteyn Tested-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20221223203638.41293-8-ebiggers@kernel.org commit 5306892a50bf4cd4cc945bad286c7c950078d65e Author: Eric Biggers Date: Fri Dec 23 12:36:33 2022 -0800 fsverity: support verification with tree block size < PAGE_SIZE Add support for verifying data from verity files whose Merkle tree block size is less than the page size. The main use case for this is to allow a single Merkle tree block size to be used across all systems, so that only one set of fsverity file digests and signatures is needed. To do this, eliminate various assumptions that the Merkle tree block size and the page size are the same: - Make fsverity_verify_page() a wrapper around a new function fsverity_verify_blocks() which verifies one or more blocks in a page. - When a Merkle tree block is needed, get the corresponding page and only verify and use the needed portion. (The Merkle tree continues to be read and cached in page-sized chunks; that doesn't need to change.) - When the Merkle tree block size and page size differ, use a bitmap fsverity_info::hash_block_verified to keep track of which Merkle tree blocks have been verified, as PageChecked cannot be used directly. Signed-off-by: Eric Biggers Reviewed-by: Andrey Albershteyn Tested-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20221223203638.41293-7-ebiggers@kernel.org commit f45555bf23cfc6bf0f0239de321221b1b81817ab Author: Eric Biggers Date: Fri Dec 23 12:36:32 2022 -0800 fsverity: replace fsverity_hash_page() with fsverity_hash_block() In preparation for allowing the Merkle tree block size to differ from PAGE_SIZE, replace fsverity_hash_page() with fsverity_hash_block(). The new function is similar to the old one, but it operates on the block at the given offset in the page instead of on the full page. (For now, all callers still pass a full page.) Signed-off-by: Eric Biggers Reviewed-by: Andrey Albershteyn Tested-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20221223203638.41293-6-ebiggers@kernel.org commit 55eed69cc8fd88272860b3409ac83e191330d370 Author: Eric Biggers Date: Fri Dec 23 12:36:31 2022 -0800 fsverity: use EFBIG for file too large to enable verity Currently, there is an implementation limit where files can't have more than 8 Merkle tree levels. With SHA-256 and 4K blocks, this limit is never reached, since a file would need to be larger than 2**64 bytes to need 9 levels. However, with SHA-512, 9 levels are needed for files larger than about 1.15 EB, which is possible on btrfs. Therefore, this limit technically became reachable when btrfs added fsverity support. Meanwhile, support for merkle_tree_block_size < PAGE_SIZE will introduce another implementation limit on file size, resulting from the use of an in-memory bitmap to track which Merkle tree blocks have been verified. In any case, currently FS_IOC_ENABLE_VERITY fails with EINVAL when the file is too large. This is undocumented, and also ambiguous since EINVAL can mean other things too. Let's change the error code to EFBIG, which is much clearer, and document it. Signed-off-by: Eric Biggers Reviewed-by: Andrey Albershteyn Tested-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20221223203638.41293-5-ebiggers@kernel.org commit 579a12f78d889339488175cd9f353dba2bb8d047 Author: Eric Biggers Date: Fri Dec 23 12:36:30 2022 -0800 fsverity: store log2(digest_size) precomputed Add log_digestsize to struct merkle_tree_params so that it can be used in verify.c. Also save memory by using u8 for all the log_* fields. Signed-off-by: Eric Biggers Reviewed-by: Andrey Albershteyn Tested-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20221223203638.41293-4-ebiggers@kernel.org commit 9098f36b739db9a77d24b7c302dcb9d3fe987308 Author: Eric Biggers Date: Fri Dec 23 12:36:29 2022 -0800 fsverity: simplify Merkle tree readahead size calculation First, calculate max_ra_pages more efficiently by using the bio size. Second, calculate the number of readahead pages from the hash page index, instead of calculating it ahead of time using the data page index. This ends up being a bit simpler, especially since level 0 is last in the tree, so we can just limit the readahead to the tree size. Signed-off-by: Eric Biggers Reviewed-by: Andrey Albershteyn Tested-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20221223203638.41293-3-ebiggers@kernel.org commit 284d5db5f99efa9e3549eb3cba39379d48879db1 Author: Eric Biggers Date: Fri Dec 23 12:36:28 2022 -0800 fsverity: use unsigned long for level_start fs/verity/ isn't consistent with whether Merkle tree block indices are 'unsigned long' or 'u64'. There's no real point to using u64 for them, though, since (a) a Merkle tree with over ULONG_MAX blocks would only be needed for a file larger than MAX_LFS_FILESIZE, and (b) for reads, the status of all Merkle tree blocks has to be tracked in memory. Therefore, let's make things a bit more efficient on 32-bit systems by using 'unsigned long[]' for merkle_tree_params::level_start, instead of 'u64[]'. Also, to be extra safe, explicitly check that there aren't more than ULONG_MAX Merkle tree blocks. Signed-off-by: Eric Biggers Reviewed-by: Andrey Albershteyn Tested-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20221223203638.41293-2-ebiggers@kernel.org commit cbdbb58b6c796e48ad6346e07bf3ae65cf4dc69b Author: Jamie Gloudon Date: Tue Jan 3 15:06:53 2023 -0800 e1000e: Enable Link Partner Advertised Support This enables link partner advertised support to show link modes and pause frame use. Signed-off-by: Jamie Gloudon Tested-by: Naama Meir Signed-off-by: Tony Nguyen Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230103230653.1102544-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 721c46bfc5dc5161b55e1f44948015f5beda8f3e Merge: 88603b6dc4194 6aeb51c1035c1 Author: Arnd Bergmann Date: Mon Jan 9 23:32:59 2023 +0100 Merge branch 'omap/omap2-cleanup' of https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc into arm/soc While going through the removal of board files on some other platforms, I noticed a bit of outdated code on omap2+ that was left behind after the platform became DT only. This is a separate branch, to avoid conflicts with other omap2 changes. * 'omap/omap2-cleanup' of https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: ARM: omap2: make functions static ARM: omap2: remove unused omap2_pm_init ARM: omap2: remove unused declarations ARM: omap2: remove unused functions ARM: omap2: smartreflex: remove on_init control ARM: omap2: remove APLL control ARM: omap2: simplify clock2xxx header ARM: omap2: remove unused omap_hwmod_reset.c ARM: omap2: remove unused headers ARM: omap2: remove unused USB code ARM: remove CONFIG_UNUSED_BOARD_FILES commit 4cd0ca1fe9a79d81a001ff14f14035531773fe43 Author: Uwe Kleine-König Date: Fri Nov 18 23:44:54 2022 +0100 rtc: ds1307: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20221118224540.619276-561-uwe@kleine-koenig.org Signed-off-by: Alexandre Belloni commit 4773fadedca918faec443daaca5e4ea1c0ced144 Author: Liwei Song Date: Fri Jan 6 17:47:29 2023 +0800 drm/radeon: free iio for atombios when driver shutdown Fix below kmemleak when unload radeon driver: unreferenced object 0xffff9f8608ede200 (size 512): comm "systemd-udevd", pid 326, jiffies 4294682822 (age 716.338s) hex dump (first 32 bytes): 00 00 00 00 c4 aa ec aa 14 ab 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<0000000062fadebe>] kmem_cache_alloc_trace+0x2f1/0x500 [<00000000b6883cea>] atom_parse+0x117/0x230 [radeon] [<00000000158c23fd>] radeon_atombios_init+0xab/0x170 [radeon] [<00000000683f672e>] si_init+0x57/0x750 [radeon] [<00000000566cc31f>] radeon_device_init+0x559/0x9c0 [radeon] [<0000000046efabb3>] radeon_driver_load_kms+0xc1/0x1a0 [radeon] [<00000000b5155064>] drm_dev_register+0xdd/0x1d0 [<0000000045fec835>] radeon_pci_probe+0xbd/0x100 [radeon] [<00000000e69ecca3>] pci_device_probe+0xe1/0x160 [<0000000019484b76>] really_probe.part.0+0xc1/0x2c0 [<000000003f2649da>] __driver_probe_device+0x96/0x130 [<00000000231c5bb1>] driver_probe_device+0x24/0xf0 [<0000000000a42377>] __driver_attach+0x77/0x190 [<00000000d7574da6>] bus_for_each_dev+0x7f/0xd0 [<00000000633166d2>] driver_attach+0x1e/0x30 [<00000000313b05b8>] bus_add_driver+0x12c/0x1e0 iio was allocated in atom_index_iio() called by atom_parse(), but it doesn't got released when the dirver is shutdown. Fix this kmemleak by free it in radeon_atombios_fini(). Signed-off-by: Liwei Song Signed-off-by: Alex Deucher commit b8743f5dcc9f3fb52f81f35994aca7827e9a5212 Author: Yang Li Date: Fri Jan 6 09:32:32 2023 +0800 drm/amdgpu: clean up some inconsistent indentings drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c:65 amdgpu_gem_fault() warn: inconsistent indenting Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3639 Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Alex Deucher commit e045aec89d1b6cd677ec3e253d87f85d44b17559 Author: Mario Limonciello Date: Wed Dec 28 01:35:20 2022 -0600 drm/amd: Load GFX11 microcode during early_init If GFX11 microcode is required but not available during early init, the firmware framebuffer will have already been released and the screen will freeze. Move the request for GFX11 microcode into the early_init phase so that if it's not available, driver init will fail. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit c88135c089e4d126ad1b2d9494a32d3d9160df4e Author: Mario Limonciello Date: Tue Jan 3 14:30:53 2023 -0600 drm/amd: Use `amdgpu_ucode_*` helpers for GFX11 The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper will provide symmetery on unload. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 9931b67690cf37ff539e4e7cafa9539179ee519f Author: Mario Limonciello Date: Wed Dec 28 01:34:35 2022 -0600 drm/amd: Load GFX10 microcode during early_init Simplifies the code so that GFX10 will get the firmware name from `amdgpu_ucode_ip_version_decode` and then use this filename to load microcode as part of the early_init process. Any failures will cause the driver to fail to probe before the firmware framebuffer has been removed. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 3da9b71563cbb7281875adab1d7c4132679da987 Author: Mario Limonciello Date: Tue Jan 3 14:22:55 2023 -0600 drm/amd: Use `amdgpu_ucode_*` helpers for GFX10 The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry on unload. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 1c21885ec1ef3eee32e269f97a5aa389e61cfb2c Author: Mario Limonciello Date: Wed Dec 28 01:33:35 2022 -0600 drm/amd: Load GFX9 microcode during early_init If GFX9 microcode is required but not available during early init, the firmware framebuffer will have already been released and the screen will freeze. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit ec787deb2ddffc6cd6afe0e2fbbbd490ddc383ed Author: Mario Limonciello Date: Tue Jan 3 14:18:39 2023 -0600 drm/amd: Use `amdgpu_ucode_*` helpers for GFX9 The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper will provide symmetry on unload. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit e78105c8c432368682fc13f18e164e89ad705910 Author: Mario Limonciello Date: Tue Jan 3 12:20:56 2023 -0600 drm/amd: Remove superfluous assignment for `adev->mes.adev` `amdgpu_mes_init` already sets `adev->mes.adev`, so there is no need to also set it in the IP specific versions. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 11e0b0067ec0707e8e598a5f9a547ab618ae7982 Author: Mario Limonciello Date: Tue Jan 3 14:12:37 2023 -0600 drm/amd: Use `amdgpu_ucode_*` helpers for MES The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper provides symmetry for releasing firmware. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit cc42e76e7de5190a7da5dac9d7b2bbb458e050bf Author: Mario Limonciello Date: Wed Dec 28 01:28:40 2022 -0600 drm/amd: Load MES microcode during early_init Add an early_init phase to MES for fetching and validating microcode from the filesystem. If MES microcode is required but not available during early init, the firmware framebuffer will have already been released and the screen will freeze. Move the request for MES microcode into the early_init phase so that if it's not available, early_init will fail. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 0b8f42ab229ade9703877abfdf70be159d1e9849 Author: Yang Li Date: Fri Jan 6 08:24:53 2023 +0800 drm/amd/display: Remove unneeded semicolon ./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:7431:3-4: Unneeded semicolon ./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:7485:4-5: Unneeded semicolon ./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:7489:3-4: Unneeded semicolon Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3635 Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Alex Deucher commit b95cb0d852014ded7d718953322f0ac6084dd661 Author: Yi Yang Date: Fri Dec 16 18:23:18 2022 +0800 drm/amd/display: Remove redundant assignment to variable dc Smatch report warning as follows: Line 53679: drivers/gpu/drm/amd/display/dc/core/dc_stream.c:402 dc_stream_set_cursor_position() warn: variable dereferenced before check 'stream' The value of 'dc' has been assigned after check whether 'stream' is NULL. Fix it by remove redundant assignment. Reviewed-by: Harry Wentland Signed-off-by: Yi Yang Signed-off-by: Alex Deucher commit 13b90cf900ab69dd5cab3cc5035bc7614037e64e Author: Hamza Mahfooz Date: Thu Jan 5 10:54:12 2023 -0500 drm/amd/display: fix PSR-SU/DSC interoperability support Currently, there are issues with enabling PSR-SU + DSC. This stems from the fact that DSC imposes a slice height on transmitted video data and we are not conforming to that slice height in PSR-SU regions. So, pass slice_height into su_y_granularity to feed the DSC slice height into PSR-SU code. Acked-by: Harry Wentland Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 69939009bde70c87a4fa0d7e03e9d169ab853d88 Author: Mario Limonciello Date: Wed Dec 28 01:26:12 2022 -0600 drm/amd: Load VCN microcode during early_init Simplifies the code so that all VCN versions will get the firmware name from `amdgpu_ucode_ip_version_decode` and then use this filename to load microcode as part of the early_init process. Reviewed-by: Lijo Lazar Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 33efaf829d7bfd4c12c3869f114e03a0043e7f38 Author: Mario Limonciello Date: Tue Jan 3 14:09:03 2023 -0600 drm/amd: Use `amdgpu_ucode_*` helpers for VCN The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. The `amdgpu_ucode_release` helper is for symmetry. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 6675402a47cc9464d57ace33fb10c59f126334b8 Author: Mario Limonciello Date: Tue Jan 3 13:07:19 2023 -0600 drm/amd: Make SDMA firmware load failures less noisy. When firmware is missing we get failures at every step. ``` [ 3.855086] amdgpu 0000:04:00.0: Direct firmware load for amdgpu/green_sardine_sdma.bin failed with error -2 [ 3.855087] [drm:amdgpu_sdma_init_microcode [amdgpu]] *ERROR* SDMA: Failed to init firmware "amdgpu/green_sardine_sdma.bin" [ 3.855398] [drm:sdma_v4_0_early_init [amdgpu]] *ERROR* Failed to load sdma firmware! ``` Realistically we don't need all of these, a user can tell from the first one that request_firmware emitted what happened. Drop the others. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 1336b4e72c4c402ca31436e4fff6c085da26057a Author: Mario Limonciello Date: Wed Dec 28 01:24:19 2022 -0600 drm/amd: Convert SDMA to use `amdgpu_ucode_ip_version_decode` Simplifies the code so that all SDMA versions will get the firmware name from `amdgpu_ucode_ip_version_decode`. v2: squash in fix from Srinivasan Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit e43229824d5bdd8dc0c2ea5b16f79b01ed2cd843 Author: Mario Limonciello Date: Tue Jan 3 13:20:52 2023 -0600 drm/amd: Use `amdgpu_ucode_request` helper for SDMA The `amdgpu_ucode_request` helper will ensure that the return code for missing firmware is -ENODEV so that early_init can fail. Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 2210af50ae7f4104269dfde7bafbbfbacdbe1a2b Author: Mario Limonciello Date: Tue Jan 3 13:18:19 2023 -0600 drm/amd: Add a new helper for loading/validating microcode All microcode runs a basic validation after it's been loaded. Each IP block as part of init will run both. Introduce a wrapper for request_firmware and amdgpu_ucode_validate. This wrapper will also remap any error codes from request_firmware to -ENODEV. This is so that early_init will fail if firmware couldn't be loaded instead of the IP block being disabled. Reviewed-by: Lijo Lazar Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 755f32a39e19b5ade9353dc9beaca72853ac4862 Author: Mario Limonciello Date: Wed Dec 28 01:21:18 2022 -0600 drm/amd: Convert SMUv13 microcode to use `amdgpu_ucode_ip_version_decode` The special case for the one dGPU has been moved into `amdgpu_ucode_ip_version_decode`, so simplify this code. Signed-off-by: Mario Limonciello Acked-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 6b54496238cc81792f697e7b21c452cdcdbb4ac5 Author: Mario Limonciello Date: Wed Dec 28 01:20:25 2022 -0600 drm/amd: Convert SMUv11 microcode to use `amdgpu_ucode_ip_version_decode` Remove the special casing from SMU v11 code. No intended functional changes. Signed-off-by: Mario Limonciello Acked-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 54a3e032340ef90ebe7611845b7d732ea3af56ca Author: Mario Limonciello Date: Wed Dec 28 01:19:05 2022 -0600 drm/amd: Add a legacy mapping to "amdgpu_ucode_ip_version_decode" This will allow other parts of the driver that currently special case firmware file names to before IP version style naming to just have a single call to `amdgpu_ucode_ip_version_decode`. Signed-off-by: Mario Limonciello Acked-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit b7cdb41e7d25ceb4f8c1de7343517b29b58e357b Author: Mario Limonciello Date: Tue Dec 27 15:49:17 2022 -0600 drm/amd: Delay removal of the firmware framebuffer Removing the firmware framebuffer from the driver means that even if the driver doesn't support the IP blocks in a GPU it will no longer be functional after the driver fails to initialize. This change will ensure that unsupported IP blocks at least cause the driver to work with the EFI framebuffer. Cc: stable@vger.kernel.org Suggested-by: Alex Deucher Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 08e60fac1d8c81f211464a30d53832a05e64ed16 Author: Luben Tuikov Date: Wed Jan 4 17:09:02 2023 -0500 drm/amdgpu: Fix potential NULL dereference Fix potential NULL dereference, in the case when "man", the resource manager might be NULL, when/if we print debug information. Cc: Alex Deucher Cc: Christian König Cc: AMD Graphics Cc: Dan Carpenter Cc: kernel test robot Fixes: 7554886daa31ea ("drm/amdgpu: Fix size validation for non-exclusive domains (v4)") Signed-off-by: Luben Tuikov Reviewed-by: Christian König Signed-off-by: Alex Deucher commit d26407788cc0cf641d760363038ddc22efcf0a33 Author: Dmitry Baryshkov Date: Mon Jan 9 06:54:58 2023 +0200 dt-bindings: display/msm: qcom, sdm845-mdss: document the DP device Document the DP controller added to the sdm845 display subsystem. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/517447/ Link: https://lore.kernel.org/r/20230109045458.316114-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 9bf1e33f9ca82698ae0381c38d167e37ca7832c6 Author: Dmitry Baryshkov Date: Mon Jan 9 07:44:07 2023 +0200 dt-bindings: display/msm: gpu: add rbcpr clock Describe the RBCPR clock used on msm8996 (A530), MSM8998 (A540) and SDM630/660 (A508/A512). Signed-off-by: Dmitry Baryshkov Acked-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/517470/ Link: https://lore.kernel.org/r/20230109054407.330839-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit c79bb6b92defdcb834ceeeed9c1cf591beb1b71a Author: Dmitry Baryshkov Date: Sat Jun 18 02:33:25 2022 +0300 drm/msm: clean event_thread->worker in case of an error If worker creation fails, nullify the event_thread->worker, so that msm_drm_uninit() doesn't try accessing invalid memory location. While we are at it, remove duplicate assignment to the ret variable. Fixes: 1041dee2178f ("drm/msm: use kthread_create_worker instead of kthread_run") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/490106/ Link: https://lore.kernel.org/r/20220617233328.1143665-2-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 7ad6586652fa736f6d07d8170ac723b8628481ce Author: Krzysztof Kozlowski Date: Sun Dec 25 12:59:25 2022 +0100 dt-bindings: display: msm: drop unneeded list for single compatible With only one compatible, there is no need to define it as list (items). Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Patchwork: https://patchwork.freedesktop.org/patch/516031/ Link: https://lore.kernel.org/r/20221225115925.55337-2-krzysztof.kozlowski@linaro.org Signed-off-by: Dmitry Baryshkov commit 9ffbefc1553c451922ac4cfdd772290b3cd0931b Author: Konrad Dybcio Date: Thu Dec 29 11:05:08 2022 +0100 dt-bindings: display/msm: Add SM8150 MDSS & DPU Add bindings for the display hardware on SM8150. Reviewed-by: Rob Herring Signed-off-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/516195/ Link: https://lore.kernel.org/r/20221229100511.979972-1-konrad.dybcio@linaro.org Signed-off-by: Dmitry Baryshkov commit e96150a6dc146779fc67a9a016339d861b5ec05a Author: Dmitry Baryshkov Date: Wed Dec 7 03:22:22 2022 +0200 dt-bindings: display/msm: *mdss.yaml: split required properties clauses Require only properties declared in given schema, which makes the code a bit more readable and easy to follow. Suggested-by: Krzysztof Kozlowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/514231/ Link: https://lore.kernel.org/r/20221207012231.112059-3-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 40a9b13a09ef2ec207fec1b328ed796d08e20e54 Author: Prashant Malani Date: Wed Dec 28 00:45:13 2022 +0000 platform/chrome: cros_typec_vdm: Add VDM send support Add support to send generic VDM messages from the alt mode driver to the partner (via the ChromeOS EC). The function introduced here is intended to be called by the alt mode driver (via the Type-C bus logic). Cc: Heikki Krogerus Signed-off-by: Prashant Malani Reviewed-by: Benson Leung Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221228004648.793339-11-pmalani@chromium.org commit 50ed638bbc47ba68ccc90d81118fe030cf39b6b5 Author: Prashant Malani Date: Wed Dec 28 00:45:12 2022 +0000 platform/chrome: cros_typec_vdm: Add VDM reply support Handle response VDMs which are sent by the partner (replying to VDMs sent by the host system itself). These get forwarded to the altmode driver. Cc: Heikki Krogerus Signed-off-by: Prashant Malani Reviewed-by: Benson Leung Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221228004648.793339-10-pmalani@chromium.org commit 493e699b9934d9cd6a46ecc7782540014b369267 Author: Prashant Malani Date: Wed Dec 28 00:45:11 2022 +0000 platform/chrome: cros_ec_typec: Add initial VDM support Add ops to support USB PD VDM (Vendor Defined Message) from the port driver. This enables the port driver to interface with alternate mode drivers and communicate with connected peripherals. The initial support just contains an implementation of the Enter Mode command. Cc: Heikki Krogerus Signed-off-by: Prashant Malani [pmalani: Fixed trivial conflict in Makefile] Reviewed-by: Benson Leung Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221228004648.793339-9-pmalani@chromium.org commit e5eea6a3319fcd0d6c71c8ff359e0d8c5b1bd5cd Author: Prashant Malani Date: Wed Dec 28 00:45:10 2022 +0000 platform/chrome: cros_ec_typec: Alter module name with hyphens Change the Type-C module name from cros_ec_typec to cros-ec-typec. This allows us to include more files in the same module (rather than relying on the file name cros_ec_typec to also be the module name). Signed-off-by: Prashant Malani [pmalani: Fixed trivial conflict in Makefile] Reviewed-by: Benson Leung Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221228004648.793339-8-pmalani@chromium.org commit 69058096515359fbe15b63ea8b111fe0bb21cecb Author: Prashant Malani Date: Wed Dec 28 00:45:09 2022 +0000 platform/chrome: cros_ec_typec: Move structs to header Move ChromeOS Type-C structs into their own header, so they can be referenced by other files which can be added to the same module. No functional changes introduced by this patch. Signed-off-by: Prashant Malani Reviewed-by: Benson Leung Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221228004648.793339-7-pmalani@chromium.org commit 8d2b28df6c3dc1581d856f52d9f78059ef2a568f Author: Prashant Malani Date: Wed Dec 28 00:45:08 2022 +0000 platform/chrome: cros_ec_typec: Update port DP VDO The port advertising DP support is a Type-C receptacle. Fix the port's DisplayPort VDO to reflect this. Fixes: 1903adae0464 ("platform/chrome: cros_ec_typec: Add bit offset for DP VDO") Signed-off-by: Prashant Malani Reviewed-by: Benson Leung Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221228004648.793339-6-pmalani@chromium.org commit c856e3ff98bba1950259d5f52b45760e80ace412 Author: Prashant Malani Date: Wed Dec 28 00:45:07 2022 +0000 platform/chrome: cros_ec_typec: Set port alt mode drvdata Save the ChromeOS-specific Type-C port info in the port altmodes' driver data. This makes communication with the ChromeOS EC (Embedded Controller) easier when alt mode drivers need to send messages to peripherals. Cc: Heikki Krogerus Signed-off-by: Prashant Malani Reviewed-by: Benson Leung Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221228004648.793339-5-pmalani@chromium.org commit 4dc9355cef4f507f12289c56b7ea5df911758278 Author: Prashant Malani Date: Wed Dec 28 00:45:06 2022 +0000 platform/chrome: cros_ec_typec: Stash port driver info Stash port number and a pointer to the driver-specific struct in the local typec port struct. These can be useful to the port driver to figure out how to communicate with the Chrome EC when an altmode-driver related callback is invoked from the Type-C class code. Signed-off-by: Prashant Malani Reviewed-by: Benson Leung Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221228004648.793339-4-pmalani@chromium.org commit 0e0dba884c4318c433756118794a7dff8947e6ce Author: Prashant Malani Date: Wed Dec 28 00:45:05 2022 +0000 platform_chrome: cros_ec: Add Type-C VDM defines Add the EC header changes need to support USB Type-C VDM (Vendor Defined Messages) communication between the system and USB PD-enabled peripherals. The headers are already present in the EC code base, from which they've been ported [1]. [1] https://source.chromium.org/chromium/chromiumos/platform/ec/+/main:include/ec_commands.h Signed-off-by: Prashant Malani Reviewed-by: Benson Leung Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221228004648.793339-3-pmalani@chromium.org commit 0ac7200e3317bdde7b96112f24b9253208c0258b Author: Prashant Malani Date: Wed Dec 28 00:45:04 2022 +0000 Revert "mfd: cros_ec: Add SCP Core-1 as a new CrOS EC MCU" This reverts commit 66ee379d743c69c726b61d078119a34d5be96a35. The feature flag introduced by Commit 66ee379d743c ("mfd: cros_ec: Add SCP Core-1 as a new CrOS EC MCU") was not first added in the source EC code base[1]. This can lead to the possible misinterpration of an EC's supported feature set, as well as causes issues with all future feature flag updates. [1] https://source.chromium.org/chromium/chromiumos/platform/ec/+/main:include/ec_commands.h Signed-off-by: Prashant Malani Acked-by: Lee Jones Reviewed-by: Benson Leung Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221228004648.793339-2-pmalani@chromium.org commit 84ec7c20363f46a4031695eceb0374c1c4d6b9ec Author: Paul E. McKenney Date: Tue Dec 6 09:38:39 2022 -0800 rcu: Allow up to five minutes expedited RCU CPU stall-warning timeouts The maximum value of RCU CPU stall-warning timeouts has historically been five minutes (300 seconds). However, the recently introduced expedited RCU CPU stall-warning timeout is instead limited to 21 seconds. This causes problems for CI/fuzzing services such as syzkaller by obscuring the issue in question with expedited RCU CPU stall-warning timeout splats. This commit therefore sets the RCU_EXP_CPU_STALL_TIMEOUT Kconfig options upper bound to 300000 milliseconds, which is 300 seconds (AKA 5 minutes). [ paulmck: Apply feedback from Hillf Danton. ] [ paulmck: Apply feedback from Geert Uytterhoeven. ] Reported-by: Dave Chinner Reported-by: Dmitry Vyukov Tested-by: Dmitry Vyukov Signed-off-by: Paul E. McKenney commit 976cb655c940bd76c76c7925cc2740357e2f6803 Merge: b878d3ba9bb41 3a151494dc04c Author: Rafael J. Wysocki Date: Mon Jan 9 20:51:39 2023 +0100 Merge tag 'generic-trip-point' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux Pull thermal control updates for 6.3 from Daniel Lezcano: "- Rework a large bunch of drivers to use the generic thermal trip structure and the opportunity to do more cleanups by removing unused functions in the OF code (Daniel Lezcano). - Fix some locking issues related to the generic thermal trip rework (Johan Hovold). - Fix a crash when requesting the critical temperature on tegra, this fix is related to the generic trip point (Jon Hunter). - Use strscpy() to instead of strncpy() (Xu Panda)." * tag 'generic-trip-point' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (37 commits) thermal/drivers/armada: Use strscpy() to instead of strncpy() thermal/drivers/qcom: Fix lock inversion thermal/drivers/tegra: Fix set_trip_temp() deadlock thermal/drivers/qcom: Fix set_trip_temp() deadlock thermal/drivers/mellanox: Use generic thermal_zone_get_trip() function wifi: iwlwifi: Use generic thermal_zone_get_trip() function thermal/drivers/tegra: Fix crash when getting critical temp thermal/drivers/exynos: Fix NULL pointer dereference when getting the critical temp thermal/drivers/intel: Use generic thermal_zone_get_trip() function thermal/intel/int340x: Replace parameter to simplify thermal/drivers/cxgb4: Use generic thermal_zone_get_trip() function thermal/drivers/acerhdf: Use generic thermal_zone_get_trip() function thermal/drivers/ti: Remove unused macros ti_thermal_get_trip_value() / ti_thermal_trip_is_valid() thermal/drivers/da9062: Use generic thermal_zone_get_trip() function thermal/drivers/broadcom: Use generic thermal_zone_get_trip() function thermal/drivers/rcar: Use generic thermal_zone_get_trip() function thermal/drivers/imx: Use generic thermal_zone_get_trip() function thermal/drivers/st: Use generic trip points thermal/of: Remove of_thermal_get_crit_temp() thermal/of: Remove of_thermal_set_trip_hyst() ... commit 2349183d32d83a7635baa804934813bcad13fd62 Author: Neil Armstrong Date: Mon Jan 9 09:49:30 2023 +0100 drm/panel: add visionox vtdr6130 DSI panel driver Add support for the 1080x2400 Visionox VTDR6130 AMOLED DSI panel found on the Qualcomm SM8550 MTP board. By default the the panel is configured to work with DSI compressed streams, but can work in uncompressed video mode since 1080x2400 in RGB888 fits in the 4 DSI lanes bandwidth. While display compression is preferred for performance and power reasons, let's start with the uncompressed video mode support and add the DSC support later on. Reviewed-by: Sam Ravnborg Signed-off-by: Neil Armstrong [narmstrong: moved drm/display/ include file before drm/drm_] Link: https://patchwork.freedesktop.org/patch/msgid/20230103-topic-sm8550-upstream-vtdr6130-panel-v2-2-dd6200f47a76@linaro.org commit ef85db911134d103a7f713eae6689dbb15c3f96a Author: Neil Armstrong Date: Mon Jan 9 09:49:29 2023 +0100 dt-bindings: display: panel: document the Visionox VTDR6130 AMOLED DSI Panel Document the 1080x2400 Visionox VTDR6130 AMOLED DSI Panel bindings. Reviewed-by: Sam Ravnborg Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong [narmstrong: drop last, redundant "bindings" in subject] Link: https://patchwork.freedesktop.org/patch/msgid/20230103-topic-sm8550-upstream-vtdr6130-panel-v2-1-dd6200f47a76@linaro.org commit af20f01e4d1d8fdb0ef14dcb95bd76fa8006dfdd Author: Emanuele Ghidoli Date: Wed Jan 4 20:53:50 2023 +0100 ASoC: dt-bindings: nau8822: add nuvoton,spk-btl property to dtschema Add nuvoton,spk-btl to configure the two loudspeaker outputs as Bridge Tied Load Cc: David Lin Signed-off-by: Emanuele Ghidoli Signed-off-by: Francesco Dolcini Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230104195350.149300-1-francesco@dolcini.it Signed-off-by: Mark Brown commit 28ef4c3753a4e57a347b2bf5f598645de966c137 Author: Sven Schnelle Date: Mon Jan 9 09:09:10 2023 +0100 rcutorture: build initrd for rcutorture with nolibc This reduces the size of init from ~600KB to ~1KB. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 16d4b2bd799da6338bd4fe8db2a93c5fa70b50f3 Author: Sven Schnelle Date: Mon Jan 9 09:09:09 2023 +0100 rcutorture: add support for s390 Add the required values to identify_qemu() and identify_bootimage(). Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 0043e6f21dbeb039f3e204c40471071a9c43f928 Author: Sven Schnelle Date: Mon Jan 9 09:09:08 2023 +0100 selftests/nolibc: add s390 support Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 18a5a09d90a75f40d5dcd3bd2ff9052845f36c37 Author: Sven Schnelle Date: Mon Jan 9 09:09:07 2023 +0100 nolibc: add support for s390 Use arch-x86_64 as a template. Not really different, but we have our own mmap syscall which takes a structure instead of discrete arguments. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 5353fff29e42d0efc844dcaf764336d20a7f6b44 Author: Alexander Lobakin Date: Mon Jan 9 18:04:03 2023 +0100 scripts/head-object-list: Remove x86 from the list Now that x86 boot code is not hardcoded to the particular linking order, remove x86 files from the list and let them be placed inside the vmlinux according only to the linker script and linker preferences. Signed-off-by: Alexander Lobakin Signed-off-by: Ingo Molnar Tested-by: Jiri Slaby Link: https://lore.kernel.org/r/20230109170403.4117105-3-alexandr.lobakin@intel.com commit 7734a0f31e99c433df3063bbb7e8ee5a16a2cb82 Author: Alexander Lobakin Date: Mon Jan 9 18:04:02 2023 +0100 x86/boot: Robustify calling startup_{32,64}() from the decompressor code After commit ce697ccee1a8 ("kbuild: remove head-y syntax"), I started digging whether x86 is ready for removing this old cruft. Removing its objects from the list makes the kernel unbootable. This applies only to bzImage, vmlinux still works correctly. The reason is that with no strict object order determined by the linker arguments, not the linker script, startup_64 can be placed not right at the beginning of the kernel. Here's vmlinux.map's beginning before removing: ffffffff81000000 vmlinux.o:(.head.text) ffffffff81000000 startup_64 ffffffff81000070 secondary_startup_64 ffffffff81000075 secondary_startup_64_no_verify ffffffff81000160 verify_cpu and after: ffffffff81000000 vmlinux.o:(.head.text) ffffffff81000000 pvh_start_xen ffffffff81000080 startup_64 ffffffff810000f0 secondary_startup_64 ffffffff810000f5 secondary_startup_64_no_verify Not a problem itself, but the self-extractor code has the address of that function hardcoded the beginning, not looking onto the ELF header, which always contains the address of startup_{32,64}(). So, instead of doing an "act of blind faith", just take the address from the ELF header and extract a relative offset to the entry point. The decompressor function already returns a pointer to the beginning of the kernel to the Asm code, which then jumps to it, so add that offset to the return value. This doesn't change anything for now, but allows to resign from the "head object list" for x86 and makes sure valid Kbuild or any other improvements won't break anything here in general. Signed-off-by: Alexander Lobakin Signed-off-by: Ingo Molnar Tested-by: Jiri Slaby Cc: "H. Peter Anvin" Cc: Linus Torvalds Link: https://lore.kernel.org/r/20230109170403.4117105-2-alexandr.lobakin@intel.com commit 6c45b2d68526d24a51118c45e3598390ae3a1595 Merge: 8c187e2212347 968b42069fe5d Author: Mark Brown Date: Mon Jan 9 16:29:02 2023 +0000 ASoC: nau8822: add speaker Bridge Tied Output Merge series from Francesco Dolcini : Add support for BTL (Bridge Tied Load) configuration to NAU8822 audio codec, since this requires adding a new property to the binding convert it from txt to yaml first. commit 8c187e2212347752097843fdda814da092436f90 Merge: 9951dc8a3c5d5 1760df5b7ee6a Author: Mark Brown Date: Mon Jan 9 16:28:56 2023 +0000 Add support for XCVR on i.MX93 platform Merge series from Chancel Liu : This patchset supports XCVR on i.MX93 platform. changes in v2: - remove unnecessary code which causes kernel test robot reporting error Chancel Liu (3): ASoC: dt-bindings: fsl,xcvr: Add compatible string for i.MX93 platform ASoC: fsl_xcvr: Add support for i.MX93 platform ASoC: fsl_xcvr: Add constraints of period size while using eDMA .../devicetree/bindings/sound/fsl,xcvr.yaml | 1 + sound/soc/fsl/fsl_xcvr.c | 155 ++++++++++++------ sound/soc/fsl/fsl_xcvr.h | 7 + 3 files changed, 115 insertions(+), 48 deletions(-) -- 2.25.1 commit a7596e62dac7318456c1aa9af5bfccf0f8e6ad7e Author: Yongqiang Niu Date: Fri Nov 18 14:30:18 2022 +0800 mtk-mmsys: Change mtk-mmsys & mtk-mutex to modules Change mtk-mmsys & mtk-mutex to modules for gki Signed-off-by: Yongqiang Niu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221118063018.13520-1-yongqiang.niu@mediatek.com Signed-off-by: Matthias Brugger commit 0d08c56d97a614f56d74f490d693faf8038db125 Author: Tinghan Shen Date: Wed Oct 12 15:54:34 2022 +0800 soc: mediatek: mtk-pm-domains: Allow mt8186 ADSP default power on In the use case of configuring the access permissions of the ADSP core, the mt8186 SoC ADSP power will be switched on in the bootloader because the permission control registers are located in the ADSP subsys. Signed-off-by: Tinghan Shen Fixes: 88590cbc1703 ("soc: mediatek: pm-domains: Add support for mt8186") Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221012075434.30009-1-tinghan.shen@mediatek.com Signed-off-by: Matthias Brugger commit 64bc37bf398651b712fb68921b3f674f98a9f802 Author: Nathan Lu Date: Tue Dec 6 10:00:45 2022 +0800 soc: mediatek: add mtk-mutex support for mt8188 vdosys0 add mtk-mutex support for mt8188 vdosys0. Signed-off-by: amy zhang Signed-off-by: Nathan Lu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221206020046.11333-6-nathan.lu@mediatek.com Signed-off-by: Matthias Brugger commit 3b1a57c4f999629fb1d5e7a488bdda536146fb31 Author: Nathan Lu Date: Tue Dec 6 10:00:44 2022 +0800 soc: mediatek: add mtk-mmsys support for mt8188 vdosys0 1. add mt8188 mmsys 2. add mt8188 vdosys0 routing table settings Signed-off-by: amy zhang Signed-off-by: Nathan Lu Link: https://lore.kernel.org/r/20221206020046.11333-5-nathan.lu@mediatek.com Signed-off-by: Matthias Brugger commit 5d98c6351d4690288c55c2fcb23a470e0675b4e5 Author: Nathan Lu Date: Tue Dec 6 10:00:43 2022 +0800 dt-bindings: mediatek: modify VDOSYS0 mutex device tree Documentations for MT8188 modify VDOSYS0 mutex device tree Documentations for MT8188. Signed-off-by: Nathan Lu Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221206020046.11333-4-nathan.lu@mediatek.com Signed-off-by: Matthias Brugger commit 2433c716707a22635a4c3905b1966f022f7adb8e Author: Nathan Lu Date: Tue Dec 6 10:00:42 2022 +0800 dt-bindings: mediatek: modify VDOSYS0 mmsys device tree Documentations for MT8188 modify VDOSYS0 mmsys device tree Documentations for MT8188. Signed-off-by: Nathan Lu Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221206020046.11333-3-nathan.lu@mediatek.com Signed-off-by: Matthias Brugger commit 169fa2ad8daa1cec78a8f9f2df1b57bc125509a6 Author: Uwe Kleine-König Date: Mon Dec 12 23:25:48 2022 +0100 soc: mediatek: mutex: 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: AngeloGioacchino Del Regno Signed-off-by: Matthias Brugger commit f104d74bbf4859a628c2234d6f86a53949b9b1b8 Author: Bernhard Rosenkränzer Date: Tue Nov 29 03:34:00 2022 +0100 ARM: dts: mediatek: Remove pins-are-numbered property Remove the unnecessary pins-are-numbered property from Mediatek ARM DeviceTrees Signed-off-by: Bernhard Rosenkränzer Reviewed-by: AngeloGioacchino Del Regno Acked-by: Kevin Hilman Link: https://lore.kernel.org/r/20221129023401.278780-7-bero@baylibre.com Signed-off-by: Matthias Brugger commit c84037195bdc8c8ff0bafbfec75053e3c65e179b Author: AngeloGioacchino Del Regno Date: Thu Sep 29 14:29:00 2022 +0200 arm: dts: mt7629: Remove extra interrupt from timer node There's only one system timer event interrupt. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220929122901.614315-2-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 558741f8fc3a014b4a7e53845edacf9274ae9093 Author: Allen-KH Cheng Date: Wed Dec 21 18:48:56 2022 +0800 arm64: dts: mediatek: mt8186: Add crypto support for eMMC controller For crypto support, add a crypto clock of the inline crypto engine and expand the register size in the eMMC controller. Signed-off-by: Allen-KH Cheng Link: https://lore.kernel.org/r/20221221104856.28770-1-allen-kh.cheng@mediatek.com Signed-off-by: Matthias Brugger commit 6d886dd46ff579bc97b0ef5eed023cdd8bbcdd3b Author: AngeloGioacchino Del Regno Date: Thu Sep 22 11:49:08 2022 +0200 arm64: dts: mediatek: cherry: Add sound card configuration Configure the sound card on all MT8195 Cherry Tomato devices to enable audio support. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220922094908.41623-5-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 4b4e050842f5f05b3d47466f800743afd7feb2f9 Author: AngeloGioacchino Del Regno Date: Thu Sep 22 11:49:07 2022 +0200 arm64: dts: mediatek: cherry: Add external codecs and speaker amplifier The entire Cherry family has two digital microphones, for which we use the generic dmic-codec, linked to the MT6359 PMIC. Moreover, it uses a Realtek RT1019p amplifier for the speakers and has either a Realtek RT5682i or RT5682s audio codec on I2C2: specifically, RT5682i is found on Tomato's rev 1 and rev 2 boards, while RT5682s is found in rev3 and rev4 boards. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220922094908.41623-4-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit b26de6b6da1db51cb73fff67288ff0c9e745db01 Author: AngeloGioacchino Del Regno Date: Thu Sep 22 11:49:06 2022 +0200 arm64: dts: mediatek: cherry: Enable the Audio DSP for SOF This platform is able to use the Audio DSP embedded into the MT8195 SoC: in preparation for adding audio support for Cherry, add the ADSP related memory nodes and enable it. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220922094908.41623-3-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 84af435959da4550b415c6ad4cf213e970979457 Author: AngeloGioacchino Del Regno Date: Thu Sep 22 11:49:05 2022 +0200 arm64: dts: mediatek: cherry: Add Audio Front End (AFE) support In preparation for adding audio support, enable the AFE HW with the appropriate eTDM configuration and memory region. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20220922094908.41623-2-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 3da58d2813a33058ab314eb97f440296ce6b0876 Author: Krzysztof Kozlowski Date: Fri Nov 25 15:41:38 2022 +0100 arm64: dts: mediatek: align LED node names with dtschema The node names should be generic and DT schema expects certain pattern: mediatek/mt8183-kukui-jacuzzi-fennel-sku1.dtb: pwmleds: 'keyboard-backlight' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221125144138.477198-1-krzysztof.kozlowski@linaro.org Signed-off-by: Matthias Brugger commit 77c060e35d896affca6ac986455bb95b75a4a8d0 Author: Nícolas F. R. A. Prado Date: Wed Nov 2 15:06:11 2022 -0400 arm64: dts: mediatek: asurada: Add aliases for i2c and mmc Add aliases for the i2c and mmc nodes on the Asurada platform DT to ensure that we get stable ids for those devices on userspace. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20221102190611.283546-6-nfraprado@collabora.com Signed-off-by: Matthias Brugger commit ad5cc915c300d4ea733da80ae714fdad3787af54 Author: Nícolas F. R. A. Prado Date: Wed Nov 2 15:06:10 2022 -0400 arm64: dts: mediatek: asurada: Enable audio support Enable audio support for the Asurada platform. This consists of the machine sound card, the rt1015p codec for the speakers, the rt5682 codec for the headset, and the dmic codec for the internal microphone. Newer revisions of spherion and hayato use the rt5682s codec for the headset instead, so the codecs and card compatible are added through separate dtsi files to prepare for that. HDMI audio support is left out for now since the DisplayPort chip required isn't enabled yet. Tested-by: Chen-Yu Tsai Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221102190611.283546-5-nfraprado@collabora.com Signed-off-by: Matthias Brugger commit 7b3da2180ba4f86fc1d2b27ebe36482ddb27a57d Author: Nícolas F. R. A. Prado Date: Wed Nov 2 15:06:09 2022 -0400 arm64: dts: mediatek: asurada: Enable internal display The asurada platform has an ANX7625 bridge connecting the DSI's output to the internal eDP panel. Add and enable these devices in order to get a usable internal display. Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20221102190611.283546-4-nfraprado@collabora.com Signed-off-by: Matthias Brugger commit ea65d256e14d27c1da6dbd1393fc3ba17c29f929 Author: Nícolas F. R. A. Prado Date: Wed Nov 2 15:06:08 2022 -0400 arm64: dts: mediatek: asurada: Add display backlight Add the display backlight for the Asurada platform. It relies on the display PWM controller, so also enable and configure this component. Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20221102190611.283546-3-nfraprado@collabora.com Signed-off-by: Matthias Brugger commit f9f00b1f6b9bd72b8b3987338d0b4de6358e3daa Author: Nícolas F. R. A. Prado Date: Wed Nov 2 15:06:07 2022 -0400 arm64: dts: mediatek: asurada: Add display regulators Add the regulators present on the Asurada platform that are used to power the internal and external displays. Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20221102190611.283546-2-nfraprado@collabora.com Signed-off-by: Matthias Brugger commit c5f30727ce68da227cfba95450a358cbd75e814c Author: AngeloGioacchino Del Regno Date: Tue Dec 6 12:23:30 2022 +0100 arm64: dts: mt6795: Add complete CPU caches information This SoC's AP subsystem has 8x Cortex-A53 CPUs, specifically, four CPUs per cluster, with two CPU clusters. Each CPU has: - A 32KB I-cache, 2-way set associative; - A 32KB D-cache, 4-way set associative. Each cluster has a unified 1MB L2 cache, 16-way set associative. With that in mind, add the appropriate properties needed to specify the caches information for this SoC, which will now be correctly exported to sysfs. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221206112330.78431-6-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 34a39d4764849cec7272ffe1ccbba66edae8ea38 Author: AngeloGioacchino Del Regno Date: Tue Dec 6 12:23:29 2022 +0100 arm64: dts: mt8183: Add complete CPU caches information This SoC features two clusters composed of: - 4x Cortex A53: 32KB I-cache, 2-way set associative, 32KB D-cache, 4-way set associative, unified 1MB L2 cache, 16-way set associative; - 4x Cortex A73: 64KB I-cache and 64KB D-cache, 4-way set associative, unified 1MB L2 cache, 16-way set associative; With that in mind, add the appropriate properties needed to specify the caches information for this SoC, which will now be correctly exported to sysfs. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221206112330.78431-5-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 70282f31f7e6b112014a1bf001affeb326e19e58 Author: AngeloGioacchino Del Regno Date: Tue Dec 6 12:23:28 2022 +0100 arm64: dts: mt8186: Add complete CPU caches information This SoC features two clusters composed of: - 6x Cortex A55: 32KB I-cache and 32KB D-cache, 4-way set associative, per-cpu 128KB L2 cache, 4-way set associative; - 2x Cortex A76: 64KB I-cache and 64KB D-cache, 4-way set associative, per-cpu 256KB L2 cache, 8-way set associative; Moreover, the two clusters are sharing a DSU L3 cache with size 1MB, 16-way set associative. With that in mind, add the appropriate properties needed to specify the caches information for this SoC, which will now be correctly exported to sysfs. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221206112330.78431-4-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 29288bab8c46d18a3a29772229dacda5822e081b Author: AngeloGioacchino Del Regno Date: Tue Dec 6 12:23:27 2022 +0100 arm64: dts: mt8192: Add complete CPU caches information This SoC features two clusters composed of: - 4x Cortex A55: 32KB I-cache and 32KB D-cache, 4-way set associative, per-cpu 128KB L2 cache, 4-way set associative; - 4x Cortex A76: 64KB I-cache and 64KB D-cache, 4-way set associative, per-cpu 256KB L2 cache, 8-way set associative; Moreover, the two clusters are sharing a DSU L3 cache with size 2MB, 16-way set associative. With that in mind, add the appropriate properties needed to specify the caches information for this SoC, which will now be correctly exported to sysfs. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221206112330.78431-3-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit b68188a70ee9e532f637f6107657c90be055cf69 Author: AngeloGioacchino Del Regno Date: Tue Dec 6 12:23:26 2022 +0100 arm64: dts: mt8195: Add complete CPU caches information This SoC features two clusters composed of: - 4x Cortex A55: 32KB I-cache and 32KB D-cache, 4-way set associative, per-cpu 128KB L2 cache, 4-way set associative; - 4x Cortex A78: 64KB I-cache and 64KB D-cache, 4-way set associative, per-cpu 256KB L2 cache, 8-way set associative; Moreover, the two clusters are sharing a DSU L3 cache with size 2MB, 16-way set associative. With that in mind, add the appropriate properties needed to specify the caches information for this SoC, which will now be correctly exported to sysfs. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221206112330.78431-2-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit a89897e5f345d9cacda4edfdc2952063237fd68d Author: Bernhard Rosenkränzer Date: Tue Nov 29 03:33:59 2022 +0100 arm64: dts: mediatek: Remove pins-are-numbered property Remove the unnecessary pins-are-numbered property from arm64 Mediatek DeviceTrees Signed-off-by: Bernhard Rosenkränzer Reviewed-by: AngeloGioacchino Del Regno Acked-by: Kevin Hilman Link: https://lore.kernel.org/r/20221129023401.278780-6-bero@baylibre.com Signed-off-by: Matthias Brugger commit b391efba57ff085233d5ead5e01817bf4b71d999 Author: Chen-Yu Tsai Date: Thu Dec 1 16:42:29 2022 +0800 arm64: dts: mediatek: mt8186: Fix systimer 13 MHz clock description The systimer block derives its 13 MHz clock by dividing the main 26 MHz oscillator clock by 2 internally. The 13 MHz clock is not a separate oscillator. Fix this by making the 13 MHz clock a divide-by-2 fixed factor clock, taking its input from the main 26 MHz oscillator. Fixes: 2e78620b1350 ("arm64: dts: Add MediaTek MT8186 dts and evaluation board and Makefile") Signed-off-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221201084229.3464449-5-wenst@chromium.org Signed-off-by: Matthias Brugger commit 0f1c806b65d136a5fe0b88adad5ff1cb451fc401 Author: Chen-Yu Tsai Date: Thu Dec 1 16:42:28 2022 +0800 arm64: dts: mediatek: mt8195: Fix systimer 13 MHz clock description The systimer block derives its 13 MHz clock by dividing the main 26 MHz oscillator clock by 2 internally, not through the TOPCKGEN clock controller. On the MT8195 this divider is set either by power-on-reset or by the bootloader. The bootloader may then make the divider unconfigurable to, but can be read out by, the operating system. Making the systimer block take the 26 MHz clock directly requires changing the implementations. As an ABI compatible fix, change the input clock of the systimer block a fixed factor divide-by-2 clock that takes the 26 MHz oscillator as its input. Fixes: 37f2582883be ("arm64: dts: Add mediatek SoC mt8195 and evaluation board") Signed-off-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221201084229.3464449-4-wenst@chromium.org Signed-off-by: Matthias Brugger commit f19f68e56b0c6631984a9f5023035d4bd09612bb Author: Chen-Yu Tsai Date: Thu Dec 1 16:42:27 2022 +0800 arm64: dts: mediatek: mt8192: Fix systimer 13 MHz clock description The systimer block derives its 13 MHz clock by dividing the main 26 MHz oscillator clock by 2 internally, not through the TOPCKGEN clock controller. On the MT8192 this divider is fixed to /2 and is not configurable. Making the systimer block take the 26 MHz clock directly requires changing the implementations. As an ABI compatible fix, change the input clock of the systimer block a fixed factor divide-by-2 clock that takes the 26 MHz oscillator as its input. Fixes: 48489980e27e ("arm64: dts: Add Mediatek SoC MT8192 and evaluation board dts and Makefile") Signed-off-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221201084229.3464449-3-wenst@chromium.org Signed-off-by: Matthias Brugger commit ce8a06b5bac75ccce99c0cf91b96b767d64f28a7 Author: Chen-Yu Tsai Date: Thu Dec 1 16:42:26 2022 +0800 arm64: dts: mediatek: mt8183: Fix systimer 13 MHz clock description The systimer block derives its 13 MHz clock by dividing the main 26 MHz oscillator clock by 2 internally, not through the TOPCKGEN clock controller. On the MT8183 this divider is set either by power-on-reset or by the bootloader. The bootloader may then make the divider unconfigurable to, but can be read out by, the operating system. Making the systimer block take the 26 MHz clock directly requires changing the implementations. As an ABI compatible fix, change the input clock of the systimer block a fixed factor divide-by-2 clock that takes the 26 MHz oscillator as its input. Fixes: 5bc8e2875ffb ("arm64: dts: mt8183: add systimer0 device node") Signed-off-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221201084229.3464449-2-wenst@chromium.org Signed-off-by: Matthias Brugger commit a9f6721a3c92764582ed12296292fda4a7f2dd25 Author: AngeloGioacchino Del Regno Date: Wed Dec 14 14:11:17 2022 +0100 arm64: dts: mediatek: mt8195: Add power domain to U3PHY1 T-PHY Assign power domain to the U3PHY1 T-PHY in otder to keep this PHY alive after unused PD shutdown and to be able to completely cut and restore power to it, for example, to save some power during system suspend/sleep. Fixes: 2b515194bf0c ("arm64: dts: mt8195: Add power domains controller") Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221214131117.108008-2-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 1bd1d10d1c0cbb82ae42c5255821202e045e4c2b Author: AngeloGioacchino Del Regno Date: Wed Dec 14 14:11:16 2022 +0100 arm64: dts: mediatek: mt8195: Use P1 clocks for PCIe1 controller Despite there being some flexibility regarding the P0/P1 connections, especially for TL and PERI, we must use P1 clocks on pcie1 otherwise we'll be dealing with unclocked access. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221214131117.108008-1-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 4f5fc078ac6fbca1c25c9dfdbe2f98e45e80d23d Author: Bernhard Rosenkränzer Date: Wed Dec 14 00:43:40 2022 +0100 dt-bindings: arm64: dts: mediatek: Add mt8365-evk board Add bindings for the Mediatek mt8365-evk board. Signed-off-by: Bernhard Rosenkränzer Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221213234346.2868828-2-bero@baylibre.com Signed-off-by: Matthias Brugger commit 82492c4ef8f65f93cd4a35c4b52518935acbb2fa Author: Hsin-Yi Wang Date: Fri May 27 12:53:54 2022 +0800 arm64: dts: mt8183: kukui: Split out keyboard node and describe detachables Kukui devices krane, kodana, and kakadu use detachable keyboards, which only have switches to be registered. Change the keyboard node's compatible of those boards to the newly introduced "google,cros-ec-keyb-switches", which won't include matrix properties. Signed-off-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20220527045353.2483042-1-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit bd2b1b4a63c7407c70e7e608919424a63ecd71e2 Author: Allen-KH Cheng Date: Wed Nov 23 21:55:30 2022 +0800 arm64: dts: mt8186: Add dsi node Add dsi node for mt8186 SoC. Signed-off-by: Allen-KH Cheng Link: https://lore.kernel.org/r/20221123135531.23221-5-allen-kh.cheng@mediatek.com Signed-off-by: Matthias Brugger commit d4a651625a37519328b0af1a70e8d7c154f22e05 Author: Allen-KH Cheng Date: Wed Nov 23 21:55:29 2022 +0800 arm64: dts: mt8186: Add IOMMU and SMI nodes Add iommu and smi nodes for mt8186 SoC. Signed-off-by: Allen-KH Cheng Link: https://lore.kernel.org/r/20221123135531.23221-4-allen-kh.cheng@mediatek.com Signed-off-by: Matthias Brugger commit d9e43c1e7a38d63ce68b17b11b6cb504d0c87a7a Author: Allen-KH Cheng Date: Wed Nov 23 21:55:28 2022 +0800 arm64: dts: mt8186: Add power domains controller Add power domains controller for mt8186 SoC. Signed-off-by: Allen-KH Cheng Link: https://lore.kernel.org/r/20221123135531.23221-3-allen-kh.cheng@mediatek.com Signed-off-by: Matthias Brugger commit 545c365185a47672b1d5cc13c84057a1e874993c Author: Charles Keepax Date: Fri Nov 25 14:20:28 2022 +0000 soundwire: stream: Move remaining register accesses over to no_pm There is no need to play with the runtime reference everytime a register is accessed. All the remaining "pm" style register accesses trace back to 4 functions: sdw_prepare_stream sdw_deprepare_stream sdw_enable_stream sdw_disable_stream Any sensible implementation will need to hold a runtime reference across all those functions, it makes no sense to be allowing the device/bus to suspend whilst streams are being prepared/enabled. And certainly in the case of the all existing users, they all call these functions from hw_params/prepare/trigger/hw_free callbacks in ALSA, which will have already runtime resumed all the audio devices associated during the open callback. Reviewed-by: Pierre-Louis Bossart Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20221125142028.1118618-5-ckeepax@opensource.cirrus.com Signed-off-by: Vinod Koul commit b275bf45ba1da1681d75f6434637442f53bf3fa5 Author: Charles Keepax Date: Fri Nov 25 14:20:27 2022 +0000 soundwire: debugfs: Switch to sdw_read_no_pm It is rather inefficient to be constantly playing with the runtime PM reference for each individual register, switch to holding a PM runtime reference across the whole register output. Reviewed-by: Pierre-Louis Bossart Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20221125142028.1118618-4-ckeepax@opensource.cirrus.com Signed-off-by: Vinod Koul commit 6726b47a2a60e3f2ef15ee7c4c6d9caa27770576 Author: Charles Keepax Date: Fri Nov 25 14:20:26 2022 +0000 soundwire: Provide build stubs for common functions Provide stub functions when CONFIG_SOUNDWIRE is not set for functions that are quite likely to be used from common code on devices supporting multiple control buses. Reviewed-by: Pierre-Louis Bossart Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20221125142028.1118618-3-ckeepax@opensource.cirrus.com Signed-off-by: Vinod Koul commit 62dc9f3f2fd07a2d4f4c97d76403f387363cb637 Author: Simon Trimmer Date: Fri Nov 25 14:20:25 2022 +0000 soundwire: bus: export sdw_nwrite_no_pm and sdw_nread_no_pm functions The commit 167790abb90f ("soundwire: export sdw_write/read_no_pm functions") exposed the single byte no_pm versions of the IO functions that can be used without touching PM, export the multi byte no_pm versions for the same reason. Reviewed-by: Pierre-Louis Bossart Signed-off-by: Simon Trimmer Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20221125142028.1118618-2-ckeepax@opensource.cirrus.com Signed-off-by: Vinod Koul commit 5b0eae55191639f70ff0eff74f26f69ffe3573cb Author: Gaosheng Cui Date: Sun Sep 11 17:34:42 2022 +0800 soundwire: cadence: remove unused sdw_cdns_master_ops declaration sdw_cdns_master_ops has been removed since commit c91605f48938 ("soundwire: Remove cdns_master_ops"), so remove it. Signed-off-by: Gaosheng Cui Link: https://lore.kernel.org/r/20220911093442.3221637-1-cuigaosheng1@huawei.com Signed-off-by: Vinod Koul commit ffa1726589a7cc4bd96a7f19f43cecdb7342478f Author: Pierre-Louis Bossart Date: Fri Nov 18 10:58:07 2022 +0800 soundwire: enable optional clock registers for SoundWire 1.2 devices The bus supports the mandatory clock registers for SDCA devices, these registers can also be optionally supported by SoundWire 1.2 devices that don't follow the SDCA class specification. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/20221118025807.534863-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit be505ba8fe90068868bc084cad2079a38486b2d5 Author: Pierre-Louis Bossart Date: Fri Nov 18 10:58:06 2022 +0800 ASoC/soundwire: remove is_sdca boolean property The Device_ID registers already tell us if a device supports the SDCA specification or not, in hindsight we never needed a property when the information is reported by both hardware and ACPI. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Reviewed-by: Charles Keepax Acked-by: Mark Brown Link: https://lore.kernel.org/r/20221118025807.534863-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 0603a47bd3a8f439d7844b841eee1819353063e0 Author: Richard Fitzgerald Date: Fri Dec 2 16:18:12 2022 +0000 soundwire: cadence: Drain the RX FIFO after an IO timeout If wait_for_completion_timeout() times-out in _cdns_xfer_msg() it is possible that something could have been written to the RX FIFO. In this case, we should drain the RX FIFO so that anything in it doesn't carry over and mess up the next transfer. Obviously, if we got to this state something went wrong, and we don't really know the state of everything. The cleanup in this situation cannot be bullet-proof but we should attempt to avoid breaking future transaction, if only to reduce the amount of error noise when debugging the failure from a kernel log. Note that this patch only implements the draining for blocking (non-deferred) transfers. The deferred API doesn't have any proper handling of error conditions and would need some re-design before implementing cleanup. That is a task for a separate patch... Signed-off-by: Richard Fitzgerald Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221202161812.4186897-4-rf@opensource.cirrus.com Signed-off-by: Vinod Koul commit 827c32d0df4bbe0d1c47d79f6a5eabfe9ac75216 Author: Richard Fitzgerald Date: Fri Dec 2 16:18:11 2022 +0000 soundwire: cadence: Remove wasted space in response_buf The response_buf was declared much larger (128 entries) than the number of responses that could ever be written into it. The Cadence IP is configurable up to a maximum of 32 entries, and the datasheet says that RX_FIFO_AVAIL can be 2 larger than this. So allow up to 34 responses. Also add checking in cdns_read_response() to prevent overflowing reponse_buf if RX_FIFO_AVAIL contains an unexpectedly large number. Signed-off-by: Richard Fitzgerald Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221202161812.4186897-3-rf@opensource.cirrus.com Signed-off-by: Vinod Koul commit 7cbfee2e2e40d2be54196362a845a3ea0a3f877d Author: Richard Fitzgerald Date: Fri Dec 2 16:18:10 2022 +0000 soundwire: cadence: Don't overflow the command FIFOs The command FIFOs in the Cadence IP can be configured during design up to 32 entries, and the code in cadence_master.c was assuming the full 32-entry FIFO. But all current Intel implementations use an 8-entry FIFO. Up to now the longest message used was 6 entries so this wasn't causing any problem. But future Cirrus Logic codecs have downloadable firmware or tuning blobs. It is more efficient for the codec driver to issue long transfers that can take advantage of any queuing in the Soundwire controller and avoid the overhead of repeatedly writing the page registers. Signed-off-by: Richard Fitzgerald Reviewed-by: Pierre-Louis Bossart Fixes: 2f52a5177caa ("soundwire: cdns: Add cadence library") Link: https://lore.kernel.org/r/20221202161812.4186897-2-rf@opensource.cirrus.com Signed-off-by: Vinod Koul commit f0117128879be643947411e4794550ce015d7c94 Author: Takashi Sakamoto Date: Mon Jan 9 11:17:38 2023 +0900 ALSA: firewire-lib: keep history to process isochronous packet The history to process isochronous packets is useful when computing gap between current isochronous cycle and the latest isochronous cycle in which packet is processed (in IR context) and scheduled (in IT context). This commit stores the most recent packet descriptors to keep the history. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230109021738.75543-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 0cac60c776a6bd15fbadc1c6c5c079b9a0c39634 Author: Takashi Sakamoto Date: Mon Jan 9 11:17:37 2023 +0900 ALSA: firewire-lib: use circular linked list for context payload processing layer The list of packet descriptor is passed to context payload processing layer so that each driver can copy PCM frames, MIDI messages, and device specific data between packet payload buffer and intermediate buffer for user space application. The list of packet descriptor was replaced by circular linked list in a previous commit. This commit uses circular linked in context payload processing layer as well. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230109021738.75543-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit cec371ff1ab18ddd23ac483e7689d0819c09bf7b Author: Takashi Sakamoto Date: Mon Jan 9 11:17:36 2023 +0900 ALSA: firewire-lib: use circular linked list to enumerate packet descriptors Current implementation uses list of packet descriptor as template to schedule isochronous packet. The packet descriptors are operated by position and size, while circular linked list is convenient to enumerate the packet descriptors. This commit utilizes circular linked list for the purpose. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230109021738.75543-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 5c2f4c9cfc79028079f0691899a93843827a00b7 Author: Pierre-Louis Bossart Date: Thu Dec 15 16:54:36 2022 +0800 soundwire: intel: remove DAI startup/shutdown The only thing these DAI startup/shutdown callbacks do is play with pm_runtime reference counts. This is not wrong, but it's not necessary at all. At the ASoC core level, only the component matters for pm_runtime. The ASoC core already calls pm_runtime_get_sync() in snd_soc_pcm_component_pm_runtime_get(), before the DAI startup callback is invoked. None of the SoundWire codec drivers rely on pm_runtime helpers in their DAI startup/shutdown either. This adds to the evidence that only the component, or more precisely the device specified when registering a component, should deal with pm_runtime transitions. Beyond the code cleanup, this move prepares for the addition of link power management in the auxiliary device startup/resume/suspend callbacks. The DAI callbacks can by-design assume that the device is already pm_runtime active. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20221215085436.2001568-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 6aeb51c1035c1c9dd666897892d5cb168933ce7b Author: Arnd Bergmann Date: Wed Sep 28 17:09:42 2022 +0200 ARM: omap2: make functions static A number of functions are only called from the file they are defined in, so remove the extern declarations and make them local to those files. Acked-by: Tony Lindgren Signed-off-by: Arnd Bergmann commit d2200da9e6dec280b0ed02e76d5e9e71573eea1e Author: Arnd Bergmann Date: Wed Sep 28 16:26:13 2022 +0200 ARM: omap2: remove unused omap2_pm_init The omap2420_init_late() and omap2430_init_late() functions are never called. Removing them also shows that the entire arch/arm/mach-omap2/pm24xx.c file is unused and can be removed. Acked-by: Tony Lindgren Signed-off-by: Arnd Bergmann commit a1080f6165d7ae9a32efde5b2fcd11d9076eb7f0 Author: Arnd Bergmann Date: Wed Sep 28 15:27:30 2022 +0200 ARM: omap2: remove unused declarations These functions were removed at some point in the past, but the extraneous declarations were left behind. Acked-by: Tony Lindgren Signed-off-by: Arnd Bergmann commit 8e2644fff884bc126eeb2f9b989d7728162c3836 Author: Arnd Bergmann Date: Wed Sep 28 15:24:31 2022 +0200 ARM: omap2: remove unused functions These are a number of individual functions that were either never used, or that had their last user removed in a prior cleanup. Acked-by: Tony Lindgren Signed-off-by: Arnd Bergmann commit 00a5d41ee1b05a8f0c75e1f7e26d363f4c68420e Author: Arnd Bergmann Date: Wed Sep 28 14:19:08 2022 +0200 ARM: omap2: smartreflex: remove on_init control Nothing calls omap_enable_smartreflex_on_init() any more, so it does not need to be tracked either. Acked-by: Tony Lindgren Signed-off-by: Arnd Bergmann commit e1d3cd9451c106b292f1741bff1c6bbc6424e407 Author: Arnd Bergmann Date: Wed Sep 28 14:14:23 2022 +0200 ARM: omap2: remove APLL control These functions have no callers and can just be removed. Acked-by: Tony Lindgren Signed-off-by: Arnd Bergmann commit cbcf78330fece15e9500d77e5df5af0e4da9a253 Author: Arnd Bergmann Date: Wed Sep 28 14:12:14 2022 +0200 ARM: omap2: simplify clock2xxx header Only one of the functions in clock2xxx.h is used in a file other than the one it is declared in, so remove the extra declarations, and make the symbols static. Acked-by: Tony Lindgren Signed-off-by: Arnd Bergmann commit f2286d2b9761fae50b323594d2828781964c625b Author: Arnd Bergmann Date: Wed Sep 28 13:35:56 2022 +0200 ARM: omap2: remove unused omap_hwmod_reset.c Since commit 90aa4ed5a43f ("ARM: OMAP2+: Drop legacy platform data for dra7 rtcss"), this is not used any more and can be removed. Acked-by: Tony Lindgren Signed-off-by: Arnd Bergmann commit 3af8e972d64e4a641097ca2f8085e2ed3de79c78 Author: Arnd Bergmann Date: Wed Sep 28 13:34:44 2022 +0200 ARM: omap2: remove unused headers The serial.h and clock3xxx.h headers have no contents that anything else uses, so these can be removed after the other files stop including them. Acked-by: Tony Lindgren Signed-off-by: Arnd Bergmann commit 83f73168a82ff7acf25caa15a0a034d7752f775c Author: Arnd Bergmann Date: Wed Sep 28 09:01:32 2022 +0200 ARM: omap2: remove unused USB code Some musb related code is no longer in use after commit 4d62dbda8561 ("ARM: OMAP3: Remove legacy support for am3517-evm") and can be removed. Acked-by: Tony Lindgren Signed-off-by: Arnd Bergmann commit c476a78f19ef12f10230e6162c290c17e9c74933 Author: Arnd Bergmann Date: Thu Sep 29 15:39:48 2022 +0200 ARM: remove CONFIG_UNUSED_BOARD_FILES All unused board files are removed, so the Kconfig symbol is no longer needed. Signed-off-by: Arnd Bergmann commit 597688792c4d9939e1900f5840ca18804e9d4290 Author: Yang Yingliang Date: Wed Dec 28 17:34:02 2022 +0800 i2c: qcom-geni: change i2c_master_hub to static i2c_master_hub is only used in i2c-qcom-geni.c now, change it to static. Fixes: cacd9643eca7 ("i2c: qcom-geni: add support for I2C Master Hub variant") Signed-off-by: Yang Yingliang Reviewed-by: Bjorn Andersson Signed-off-by: Wolfram Sang commit fde0e25b71a90e798ce9a58525d5630c90f5aa27 Author: Neil Armstrong Date: Mon Jan 9 11:47:42 2023 +0100 dt-bindings: regulators: convert non-smd RPM Regulators bindings to dt-schema Convert the non-SMD Regulators bindings to dt-schema, the old text based bindings will be deleted later since the RPM bindings are not yet converted. Signed-off-by: Neil Armstrong Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221005-mdm9615-pinctrl-yaml-v6-1-6c913908bb85@linaro.org Signed-off-by: Mark Brown commit 1d91855304c2046115ee10be2c93161d93d5d40d Author: Luoyouming Date: Sat Dec 24 18:22:01 2022 +0800 RDMA/hns: Support cqe inline in user space Enable the CQEIE field and configure the CQEIS field of QPC. And add compatibility handling. Link: https://lore.kernel.org/r/20221224102201.3114536-4-xuhaoyue1@hisilicon.com Signed-off-by: Luoyouming Signed-off-by: Haoyue Xu Signed-off-by: Jason Gunthorpe commit 2bb185c68bf4c147f43d932e8a34fa150d148940 Author: Luoyouming Date: Sat Dec 24 18:22:00 2022 +0800 RDMA/hns: Add compatibility handling for only support userspace rq inline The rq inline makes some changes as follows, Firstly, it is only used in user space. Secondly, it should notify hardware in QP RTR status. Thirdly, Add compatibility processing between different user space and kernel space. Link: https://lore.kernel.org/r/20221224102201.3114536-3-xuhaoyue1@hisilicon.com Signed-off-by: Luoyouming Signed-off-by: Haoyue Xu Signed-off-by: Jason Gunthorpe commit 968606e252e3f4c06f1ac63f8f6527c8374c5eb6 Author: Luoyouming Date: Sat Dec 24 18:21:59 2022 +0800 RDMA/hns: Remove rq inline in kernel The roce driver kernel space will no longer provide support for the rq inline feature. This patch deletes the code related to the rq inline feature in the kernel space. Link: https://lore.kernel.org/r/20221224102201.3114536-2-xuhaoyue1@hisilicon.com Signed-off-by: Luoyouming Signed-off-by: Haoyue Xu Signed-off-by: Jason Gunthorpe commit 71c541ebe82b26720b3e3f02ff22ed1eccea3484 Author: Mateusz Kwiatkowski Date: Wed Dec 7 12:53:26 2022 +0100 drm/vc4: vec: Support progressive modes The VEC is able to output progressive analog modes, but the driver has never set the proper bit to do so. Signed-off-by: Mateusz Kwiatkowski Link: https://lore.kernel.org/r/20221207-rpi-hvs-crtc-misc-v1-15-1f8e0770798b@cerno.tech Signed-off-by: Maxime Ripard commit 771d6539f27bd55f43d8a95d53a7eeaaffa2681c Author: Dave Stevenson Date: Wed Dec 7 12:53:25 2022 +0100 drm/vc4: hdmi: Correct interlaced timings again The back porch timings were correct, only the sync offset was wrong. Correct timing is now reported for 1080i and 576i, but the h offset is incorrect for 480i for non-obvious reasons. Fixes: fb10dc451c0f ("drm/vc4: hdmi: Correct HDMI timing registers for interlaced modes") Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20221207-rpi-hvs-crtc-misc-v1-14-1f8e0770798b@cerno.tech Signed-off-by: Maxime Ripard commit 273c417658c83026741ded0c34cec9caab41e97f Author: Mateusz Kwiatkowski Date: Wed Dec 7 12:53:24 2022 +0100 drm/vc4: crtc: Fix timings for VEC modes This commit fixes vertical timings of the VEC (composite output) modes to accurately represent the 525-line ("NTSC") and 625-line ("PAL") ITU-R standards. Previous timings were actually defined as 502 and 601 lines, resulting in non-standard 62.69 Hz and 52 Hz signals being generated, respectively. Changes to vc4_crtc.c have also been made, to make the PixelValve vertical timings accurately correspond to the DRM modeline in interlaced modes. The resulting VERTA/VERTB register values have been verified against the reference values set by the Raspberry Pi firmware. Signed-off-by: Mateusz Kwiatkowski Link: https://lore.kernel.org/r/20221207-rpi-hvs-crtc-misc-v1-13-1f8e0770798b@cerno.tech Signed-off-by: Maxime Ripard commit 6c37c9c65d2c792ddee3e33e595a498592bf9735 Author: Dave Stevenson Date: Wed Dec 7 12:53:23 2022 +0100 drm/vc4: Add comments for which HVS_PIXEL_ORDER_xxx defines apply The HVS_PIXEL_ORDER_xxx defines apply to specific HVS_PIXEL_FORMAT_xxx modes, so add comments to make this obvious. Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20221207-rpi-hvs-crtc-misc-v1-12-1f8e0770798b@cerno.tech Signed-off-by: Maxime Ripard commit 977374cf481d3bea916b2775e6ecc682b9689550 Author: Dave Stevenson Date: Wed Dec 7 12:53:22 2022 +0100 drm/vc4: plane: Add 3:3:2 and 4:4:4:4 RGB/RGBX/RGBA formats The hardware supports the 332 8bpp and 4:4:4:4 16bpp formats, but the table of supported formats didn't include them. Add them in. In theory they are supported for T-format as well as linear, but without a way to test them just add them as linear for now. Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20221207-rpi-hvs-crtc-misc-v1-11-1f8e0770798b@cerno.tech Signed-off-by: Maxime Ripard commit d5e606e594eef125c4cb12676a8817c4eb7cd431 Author: Dave Stevenson Date: Wed Dec 7 12:53:21 2022 +0100 drm/vc4: plane: Omit pixel_order from the hvs_format for hvs5 only formats pixel_order is used for the earlier versions of the HVS, so is redundant on the 10:10:10:2 and 10bit YUV formats that are only supported on HVS5. Remove the assignment from the table to avoid confusion. Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20221207-rpi-hvs-crtc-misc-v1-10-1f8e0770798b@cerno.tech Signed-off-by: Maxime Ripard commit 02c98b16ae07f3a661146678c649ac31021e64ca Author: Dave Stevenson Date: Wed Dec 7 12:53:20 2022 +0100 drm/vc4: plane: Allow using 0 as a pixel order value vc4_plane_mode_set for HVS5 was using pixel_order unless pixel_order_hvs5 was non-zero, except 0 is a valid value for the pixel_order. Specify pixel_order_hvs5 for all formats and remove the conditional. Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20221207-rpi-hvs-crtc-misc-v1-9-1f8e0770798b@cerno.tech Signed-off-by: Maxime Ripard commit 92c17d16476c71329a2978f80f23ce1009c69c55 Author: Maxime Ripard Date: Wed Dec 7 12:53:19 2022 +0100 drm/vc4: hvs: Ignore atomic_flush if we're disabled atomic_flush will be called for each CRTC even if they aren't enabled. The whole code we have there will thus run without a properly affected channel, which can then result in all sorts of weird behaviour. Reviewed-by: Dave Stevenson Link: https://lore.kernel.org/r/20221207-rpi-hvs-crtc-misc-v1-8-1f8e0770798b@cerno.tech Signed-off-by: Maxime Ripard commit f92534ea5cb1e5485218c0ed7cc5d588e28e668e Author: Dave Stevenson Date: Wed Dec 7 12:53:18 2022 +0100 drm/vc4: hvs: Add DRM 210101010 RGB formats HVS5 supports the 210101010 RGB[A|X] formats, but they were missing from the DRM to HVS mapping list, so weren't available. Add them in. Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20221207-rpi-hvs-crtc-misc-v1-7-1f8e0770798b@cerno.tech Signed-off-by: Maxime Ripard commit 902973dc1a049c0d7bf0c222b8f2b3876f01b4a2 Author: Dave Stevenson Date: Wed Dec 7 12:53:17 2022 +0100 drm/vc4: hvs: Fix colour order for xRGB1555 on HVS5 Same as the xRGB8888 formats, HVS5 has managed to swap the colour channels for the xRGB1555 formats as well. Add the relevant config for pixel_order_hvs5. Fixes: c54619b0bfb3 ("drm/vc4: Add support for the BCM2711 HVS5") Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20221207-rpi-hvs-crtc-misc-v1-6-1f8e0770798b@cerno.tech Signed-off-by: Maxime Ripard commit 868bc9994c0c6b229989623c7614f15853bf16b5 Author: Dave Stevenson Date: Wed Dec 7 12:53:16 2022 +0100 drm/vc4: hvs: Support zpos on all planes Adds the zpos property to all planes, and creates the dlist by placing the fragments in the correct order based on zpos. Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20221207-rpi-hvs-crtc-misc-v1-5-1f8e0770798b@cerno.tech Signed-off-by: Maxime Ripard commit 87551ec650bb87d35f1b29bba6a2430896e08da0 Author: Dave Stevenson Date: Wed Dec 7 12:53:15 2022 +0100 drm/vc4: hvs: Correct interrupt masking bit assignment for HVS5 HVS5 has moved the interrupt enable bits around within the DISPCTRL register, therefore the configuration has to be updated to account for this. Fixes: c54619b0bfb3 ("drm/vc4: Add support for the BCM2711 HVS5") Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20221207-rpi-hvs-crtc-misc-v1-4-1f8e0770798b@cerno.tech Signed-off-by: Maxime Ripard commit 982ee94486863a41c6af9f2ab3f6681f72bc5c48 Author: Dave Stevenson Date: Wed Dec 7 12:53:14 2022 +0100 drm/vc4: hvs: SCALER_DISPBKGND_AUTOHS is only valid on HVS4 The bit used for SCALER_DISPBKGND_AUTOHS in SCALER_DISPBKGNDX has been repurposed on HVS5 to configure whether a display can win back-to-back arbitration wins for the COB. This is not desirable, therefore only select this bit on HVS4, and explicitly clear it on HVS5. Fixes: c54619b0bfb3 ("drm/vc4: Add support for the BCM2711 HVS5") Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20221207-rpi-hvs-crtc-misc-v1-3-1f8e0770798b@cerno.tech Signed-off-by: Maxime Ripard commit df993fced230daa8452892406f3180c93ebf7e7b Author: Dave Stevenson Date: Wed Dec 7 12:53:13 2022 +0100 drm/vc4: hvs: Set AXI panic modes The HVS can change AXI request mode based on how full the COB FIFOs are. Until now the vc4 driver has been relying on the firmware to have set these to sensible values. With HVS channel 2 now being used for live video, change the panic mode for all channels to be explicitly set by the driver, and the same for all channels. Fixes: c54619b0bfb3 ("drm/vc4: Add support for the BCM2711 HVS5") Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20221207-rpi-hvs-crtc-misc-v1-2-1f8e0770798b@cerno.tech Signed-off-by: Maxime Ripard commit 1284365e3e8cc33849f90cae20bca36fd7544e24 Author: Dave Stevenson Date: Wed Dec 7 12:53:12 2022 +0100 drm/vc4: hvs: Configure the HVS COB allocations The HVS Composite Output Buffer (COB) is the memory used to generate the output pixel data. Until now the vc4 driver has been relying on the firmware to have set these to sensible values. In testing triple screen support it has been noted that only 1 line was being assigned to HVS channel 2. Whilst that is fine for the transposer (TXP), and indeed needed as only some pixels have an alpha channel, it is insufficient to run a live display. Split the COB more evenly between the 3 HVS channels. Fixes: c54619b0bfb3 ("drm/vc4: Add support for the BCM2711 HVS5") Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20221207-rpi-hvs-crtc-misc-v1-1-1f8e0770798b@cerno.tech Signed-off-by: Maxime Ripard commit e8c39b3eba42311b4e6ba5a41676acabefe9b858 Author: Neil Armstrong Date: Fri Nov 18 09:24:40 2022 +0100 pinctrl: qcom: spmi-gpio: add support for pm8550 & pmr735d gpio control Add support for the pm8550, pm8550b, pm8550ve, pm8550vs, pmk8550 & pmr735d gpio controllers providing GPIO control over SPMI. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20221114-narmstrong-sm8550-upstream-spmi-v2-3-b839bf2d558a@linaro.org Signed-off-by: Linus Walleij commit b754f00dd90dd86cda39ca3d733cd00bbbbf2fe9 Author: Neil Armstrong Date: Fri Nov 18 09:24:39 2022 +0100 dt-bindings: pinctrl: qcom,pmic-gpio: document pm8550, pm8550b, pm8550ve, pm8550vs, pmk8550 & pmr735d Document compatible, pin count & pin names for pm8550, pm8550b, pm8550ve, pm8550vs, pmk8550 & pmr735d SPMI GPIO controllers. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221114-narmstrong-sm8550-upstream-spmi-v2-2-b839bf2d558a@linaro.org Signed-off-by: Linus Walleij commit c818ae563bf99457f02e8170aabd6b174f629f65 Author: Miaoqian Lin Date: Mon Jan 2 15:28:45 2023 +0400 pinctrl: rockchip: Fix refcount leak in rockchip_pinctrl_parse_groups of_find_node_by_phandle() returns a node pointer with refcount incremented, We should use of_node_put() on it when not needed anymore. Add missing of_node_put() to avoid refcount leak. Fixes: d3e5116119bd ("pinctrl: add pinctrl driver for Rockchip SoCs") Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20230102112845.3982407-1-linmq006@gmail.com Signed-off-by: Linus Walleij commit dcef18c8ac40aa85bb339f64c1dd31dd458b06fb Author: Miaoqian Lin Date: Mon Jan 2 12:24:56 2023 +0400 pinctrl: stm32: Fix refcount leak in stm32_pctrl_get_irq_domain of_irq_find_parent() returns a node pointer with refcount incremented, We should use of_node_put() on it when not needed anymore. Add missing of_node_put() to avoid refcount leak. Fixes: d86f4d71e42a ("pinctrl: stm32: check irq controller availability at probe") Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20230102082503.3944927-1-linmq006@gmail.com Signed-off-by: Linus Walleij commit a6fd6f94d36122d8962ba8a24194299a6bb1ecc1 Author: Stanislav Lisovskiy Date: Mon Jan 9 16:02:10 2023 +0200 drm/i915: Fix timeslots argument for DP DSC SST case We now accept timeslots param exactly how the variable sounds: amount of timeslots, but not ratio timeslots/64. So for SST case(when we have all timeslots for use), it should be 64, but not 1. This caused some issues in the tests. v2: Fixed comments References: https://gitlab.freedesktop.org/drm/intel/-/issues/6860 Fixes: 52f14682ac4d ("drm/i915: Bpp/timeslot calculation fixes for DP MST DSC") Reviewed-by: Manasi Navare Signed-off-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20230109140210.25822-1-stanislav.lisovskiy@intel.com commit a7cc0e2685082a0d79baec02df184dfa83cbfac3 Author: Adam Skladowski Date: Sat Dec 31 17:42:50 2022 +0100 pinctrl: qcom: pinctrl-msm8976: Correct function names for wcss pins Adjust names of function for wcss pins, also fix third gpio in bt group. Fixes: bcd11493f0ab ("pinctrl: qcom: Add a pinctrl driver for MSM8976 and 8956") Signed-off-by: Adam Skladowski Reviewed-by: Marijn Suijten Link: https://lore.kernel.org/r/20221231164250.74550-1-a39.skl@gmail.com Signed-off-by: Linus Walleij commit a43e3115fbea2f9ba040a183aab300e0abf9cb67 Author: Xu Panda Date: Thu Jan 5 20:24:34 2023 +0800 s390/zcrypt: 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 Link: https://lore.kernel.org/r/202301052024349365834@zte.com.cn Signed-off-by: Heiko Carstens commit beb060ed20d5d5a54754cf78c38731a6a5cb0f18 Author: Eric Farman Date: Fri Feb 19 20:41:49 2021 +0100 vfio/ccw: remove old IDA format restrictions By this point, all the pieces are in place to properly support a 2K Format-2 IDAL, and to convert a guest Format-1 IDAL to the 2K Format-2 variety. Let's remove the fence that prohibits them, and allow a guest to submit them if desired. Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Signed-off-by: Heiko Carstens commit b5a73e8eb225e3103a030c518375b4b2d0c66ccd Author: Eric Farman Date: Thu Aug 11 19:20:54 2022 +0200 vfio/ccw: don't group contiguous pages on 2K IDAWs The vfio_pin_pages() interface allows contiguous pages to be pinned as a single request, which is great for the 4K pages that are normally processed. Old IDA formats operate on 2K chunks, which makes this logic more difficult. Since these formats are rare, let's just invoke the page pinning one-at-a-time, instead of trying to group them. We can rework this code at a later date if needed. Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Signed-off-by: Heiko Carstens commit 1b676fe3d9d3f262bc26bb18dc1b1ac66c83c2a0 Author: Eric Farman Date: Mon Oct 31 19:48:29 2022 +0100 vfio/ccw: handle a guest Format-1 IDAL There are two scenarios that need to be addressed here. First, an ORB that does NOT have the Format-2 IDAL bit set could have both a direct-addressed CCW and an indirect-data-address CCW chained together. This means that the IDA CCW will contain a Format-1 IDAL, and can be easily converted to a 2K Format-2 IDAL. But it also means that the direct-addressed CCW needs to be converted to the same 2K Format-2 IDAL for consistency with the ORB settings. Secondly, a Format-1 IDAL is comprised of 31-bit addresses. Thus, we need to cast this IDAL to a pointer of ints while populating the list of addresses that are sent to vfio. Since the result of both of these is the use of the 2K IDAL variants, and the output of vfio-ccw is always a Format-2 IDAL (in order to use 64-bit addresses), make sure that the correct control bit gets set in the ORB when these scenarios occur. Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Signed-off-by: Heiko Carstens commit 61f3a16b9d5cd9361a317ee7870083c1bc171188 Author: Eric Farman Date: Fri Oct 21 20:53:51 2022 +0200 vfio/ccw: allocate/populate the guest idal Today, we allocate memory for a list of IDAWs, and if the CCW being processed contains an IDAL we read that data from the guest into that space. We then copy each IDAW into the pa_iova array, or fabricate that pa_iova array with a list of addresses based on a direct-addressed CCW. Combine the reading of the guest IDAL with the creation of a pseudo-IDAL for direct-addressed CCWs, so that both CCW types have a "guest" IDAL that can be populated straight into the pa_iova array. Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Signed-off-by: Heiko Carstens commit 6a6dc14ac84733cf5864a7cf9f5b3e43f6a79be8 Author: Eric Farman Date: Wed Dec 2 19:37:24 2020 +0100 vfio/ccw: calculate number of IDAWs regardless of format The idal_nr_words() routine works well for 4K IDAWs, but lost its ability to handle the old 2K formats with the removal of 31-bit builds in commit 5a79859ae0f3 ("s390: remove 31 bit support"). Since there's nothing preventing a guest from generating this IDAW format, let's re-introduce the math for them and use both when calculating the number of IDAWs based on the bits specified in the ORB. Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Signed-off-by: Heiko Carstens commit 667e5dbabf2bb790640525cff7d563cf88eb3e61 Author: Eric Farman Date: Thu Oct 20 19:00:14 2022 +0200 vfio/ccw: read only one Format-1 IDAW The intention is to read the first IDAW to determine the starting location of an I/O operation, knowing that the second and any/all subsequent IDAWs will be aligned per architecture. But, this read receives 64-bits of data, which is the size of a Format-2 IDAW. In the event that Format-1 IDAWs are presented, adjust the size of the read to 32-bits. The data will end up occupying the upper word of the target iova variable, so shift it down to the lower word for use as an address. (By definition, this IDAW format uses a 31-bit address, so the "sign" bit will always be off and there is no concern about sign extension.) Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Signed-off-by: Heiko Carstens commit b21f9cb1124e9fee33dd3c07108aabde060b6ef8 Author: Eric Farman Date: Mon Oct 31 19:12:54 2022 +0100 vfio/ccw: refactor the idaw counter The rules of an IDAW are fairly simple: Each one can move no more than a defined amount of data, must not cross the boundary defined by that length, and must be aligned to that length as well. The first IDAW in a list is special, in that it does not need to adhere to that alignment, but the other rules still apply. Thus, by reading the first IDAW in a list, the number of IDAWs that will comprise a data transfer of a particular size can be calculated. Let's factor out the reading of that first IDAW with the logic that calculates the length of the list, to simplify the rest of the routine that handles the individual IDAWs. Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Signed-off-by: Heiko Carstens commit 61783394f4eb3a8a0944005ea2761c011788a9c3 Author: Eric Farman Date: Fri Oct 21 17:02:48 2022 +0200 vfio/ccw: populate page_array struct inline There are two possible ways the list of addresses that get passed to vfio are calculated. One is from a guest IDAL, which would be an array of (probably) non-contiguous addresses. The other is built from contiguous pages that follow the starting address provided by ccw->cda. page_array_alloc() attempts to simplify things by pre-populating this array from the starting address, but that's not needed for a CCW with an IDAL anyway so doesn't need to be in the allocator. Move it to the caller in the non-IDAL case, since it will be overwritten when reading the guest IDAL. Remove the initialization of the pa_page output pointers, since it won't be explicitly needed for either case. Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Signed-off-by: Heiko Carstens commit 62a97a56a64c97c3865e55d702babc22f3b2ea6a Author: Eric Farman Date: Fri Oct 21 16:59:13 2022 +0200 vfio/ccw: pass page count to page_array struct The allocation of our page_array struct calculates the number of 4K pages that would be needed to hold a certain number of bytes. But, since the number of pages that will be pinned is also calculated by the length of the IDAL, this logic is unnecessary. Let's pass that information in directly, and avoid the math within the allocator. Also, let's make this two allocations instead of one, to make it apparent what's happening within here. Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Signed-off-by: Heiko Carstens commit 4b946d65b8aa0071dbbc54b35b8502fa99c1ee22 Author: Eric Farman Date: Thu Oct 22 16:54:32 2020 +0200 vfio/ccw: remove unnecessary malloc alignment Everything about this allocation is harder than necessary, since the memory allocation is already aligned to our needs. Break them apart for readability, instead of doing the funky arithmetic. Of the structures that are involved, only ch_ccw needs the GFP_DMA flag, so the others can be allocated without it. Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Signed-off-by: Heiko Carstens commit a4c6040472ba638f2719f371fad92c83365f7332 Author: Eric Farman Date: Fri Oct 21 15:32:30 2022 +0200 vfio/ccw: simplify CCW chain fetch routines The act of processing a fetched CCW has two components: 1) Process a Transfer-in-channel (TIC) CCW 2) Process any other CCW The former needs to look at whether the TIC jumps backwards into the current channel program or forwards into a new segment, while the latter just processes the CCW data address itself. Rather than passing the chain segment and index within it to the handlers for the above, and requiring each to calculate the elements it needs, simply pass the needed pointers directly. For the TIC, that means the CCW being processed and the location of the entire channel program which holds all segments. For the other CCWs, the page_array pointer is also needed to perform the page pinning, etc. While at it, rename ccwchain_fetch_direct to _ccw, to indicate what it is. The name "_direct" is historical, when it used to process a direct-addressed CCW, but IDAs are processed here too. Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Signed-off-by: Heiko Carstens commit c5e8083f9580bd7b32ca3967e3d2f99b38cfdaa6 Author: Eric Farman Date: Thu Jul 7 17:30:26 2022 +0200 vfio/ccw: replace copy_from_iova with vfio_dma_rw It was suggested [1] that we replace the old copy_from_iova() routine (which pins a page, does a memcpy, and unpins the page) with the newer vfio_dma_rw() interface. This has a modest improvement in the overall time spent through the fsm_io_request() path, and simplifies some of the code to boot. [1] https://lore.kernel.org/r/20220706170553.GK693670@nvidia.com/ Suggested-by: Jason Gunthorpe Signed-off-by: Eric Farman Reviewed-by: Jason Gunthorpe Reviewed-by: Matthew Rosato Signed-off-by: Heiko Carstens commit 254cb663c2ace586191f9b0676277b89450a76e7 Author: Eric Farman Date: Wed Dec 2 19:19:30 2020 +0100 vfio/ccw: move where IDA flag is set in ORB The output of vfio_ccw is always a Format-2 IDAL, but the code that explicitly sets this is buried in cp_init(). In fact the input is often already a Format-2 IDAL, and would be rejected (via the check in ccwchain_calc_length()) if it weren't, so explicitly setting it doesn't do much. Setting it way down here only makes it impossible to make decisions in support of other IDAL formats. Let's move that to where the rest of the ORB is set up, so that the CCW processing in cp_prefetch() is performed according to the contents of the unmodified guest ORB. Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Signed-off-by: Heiko Carstens commit 155a4321c117e29d174893127ae84cd84cacf0f3 Author: Eric Farman Date: Thu Apr 18 20:26:15 2019 +0200 vfio/ccw: allow non-zero storage keys Currently, vfio-ccw copies the ORB from the io_region to the channel_program struct being built. It then adjusts various pieces of that ORB to the values needed to be used by the SSCH issued by vfio-ccw in the host. This includes setting the subchannel key to the default, presumably because Linux doesn't do anything with non-zero storage keys itself. But it seems wrong to convert every I/O to the default key if the guest itself requested a non-zero subchannel (access) key. Any channel program that sets a non-zero key would expect the same key returned in the SCSW of the IRB, not zero, so best to allow that to occur unimpeded. Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Signed-off-by: Heiko Carstens commit 9fbed59fcd16e60dde2528038cc343abd65c0948 Author: Eric Farman Date: Thu Nov 10 03:30:23 2022 +0100 vfio/ccw: simplify the cp_get_orb interface There's no need to send in both the address of the subchannel struct, and an element within it, to populate the ORB. Pass the whole pointer and let cp_get_orb() take the pieces that are needed. Suggested-by: Matthew Rosato Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Signed-off-by: Heiko Carstens commit 8a54e238ef1eb6edd50335ee8626f6962c3dfb4f Author: Eric Farman Date: Mon Jul 25 22:21:14 2022 +0200 vfio/ccw: cleanup some of the mdev commentary There is no longer an mdev struct accessible via a channel program struct, but there are some artifacts remaining that mention it. Clean them up. Signed-off-by: Eric Farman Reviewed-by: Matthew Rosato Signed-off-by: Heiko Carstens commit ba5c2e2ae4806b4e5810153d9d9581593b65773b Author: Sven Schnelle Date: Thu Dec 8 20:58:26 2022 +0100 s390/con3270: add special output handling when oops_in_progress is set Normally a user can scroll back with PF7/PF8 if printed messages are outside of the visible screen area. This doesn't work when the kernel crashes, because the scrollback handling is done by the kernel, which is no longer alive after the kernel crash. Add code to always print all dirty lines in the screen buffer, so the user can scroll back with the terminal scrollback keys (Page Up/Down). Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 422a78ea359a8b637556f106ffaf7612e20ed122 Author: Sven Schnelle Date: Thu Dec 8 09:24:06 2022 +0100 s390/con3270: set SBA and RA addresses when converting lines Now that lines are converted during output, the RA and SBA no longer need to get updated as an additional step. Instead set them when converting the line. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit da4e272e831c6b1ab5169e5f7a51b21b7e364c22 Author: Sven Schnelle Date: Thu Dec 8 08:41:17 2022 +0100 s390/con3270: simplify update flags Make TTY3270_UPDATE_ALL the sum of all TTY3270_* flags, so we don't need any special handling for it. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 9975fde09e50b9ac9bab49cafac4ebc32cf4044c Author: Sven Schnelle Date: Wed Dec 7 22:18:38 2022 +0100 s390/con3270: return from notifier when activate view fails When activating the view fails (in this case because the 3270 is disconnected) return from the notifer callback. Otherwise the system will deadlock. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit fe5e23dd983cc3e676f2f9355796e2505d889ce4 Author: Sven Schnelle Date: Mon Dec 5 15:20:46 2022 +0100 s390/diag: use __packed __aligned Use __packed __aligned instead of __attribute__((packed, aligned(X))); to match the rest of the file. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 61f37f63f930a0d759fc3a98bb3a2330a34c6220 Author: Sven Schnelle Date: Mon Dec 5 13:20:46 2022 +0100 s390/fs3270: split header files In order to use the fs3270 one would need at least the ioctl definitions in uapi. Add two new include files in uapi, which contain: fs3270: ioctl number declarations + returned struct for TUBGETMOD. raw3270: all the orders, attributes and similar stuff used with 3270 terminals. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit a554dbd740bd45247a7b9617760f1c7e1b26ebfc Author: Sven Schnelle Date: Mon Dec 5 12:32:02 2022 +0100 s390/fs3270: fix screen reset on activate fs3270 uses EWRITEA to clear the screen when a user opens /dev/3270/tub. However it misses the attribute byte after the EWRITEA, so (at least) x3270 complains about 'Record too short, missing write flags'. Add the missing flag byte to fix this. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit ec40213bfbe41a73f8b9b96643c66edb0cbeb064 Author: Sven Schnelle Date: Mon Dec 5 10:38:39 2022 +0100 s390/fs3270: fix function prototypes fix function prototypes split over two lines like: static void foobar(void) Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 84a8b601eac5316dcd01fb9cdd9b28261225c663 Author: Sven Schnelle Date: Mon Dec 5 10:31:56 2022 +0100 s390/fs3270: use *ptr instead of struct in kzalloc Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit aa08b6a46b6060cab0de44f1b1db58fcc867b60f Author: Sven Schnelle Date: Mon Dec 5 10:30:48 2022 +0100 s390/fs3270: remove duplicate assignment remove a duplicate assignment reported by checkpatch. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 945775155e21097cacb60ed182f7eb348bb8ef24 Author: Sven Schnelle Date: Mon Dec 5 10:29:05 2022 +0100 s390/fs3270: add missing braces to if/else Fix a few missing braces and wrong placement of braces reported by checkpatch. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit a82603b0d6ee393046e4d53f8708e02e12cf8a82 Author: Sven Schnelle Date: Mon Dec 5 10:27:20 2022 +0100 s390/fs3270: fix whitespace errors Fix a few whitespace errors reported by checkpatch, namely superfluous whitespace, missing spaces and empty lines. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 31bc23241b54b23fb880db6f5e16a443ab44e5d0 Author: Sven Schnelle Date: Mon Dec 5 10:01:38 2022 +0100 s390/raw3270: fix nullpointer check Fix the following checkpatch warning: CHECK: Comparison to NULL could be written "!rp" + if (rp == NULL) Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 420105f4506be36c5b1fcb1f0b5e8fe03f962238 Author: Sven Schnelle Date: Mon Dec 5 09:46:24 2022 +0100 s390/raw3270: split up raw3270_activate_view() move the core processing to __raw3270_activate_view() to reduce the required if/else blocks and indentiion levels. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 7aeeeb926c355a9a5bc7a96bae7d5ada44f1d2e9 Author: Sven Schnelle Date: Mon Dec 5 09:09:33 2022 +0100 s390/raw3270: remove BUG_ON in raw3270_request_reset() WARN_ON_ONCE if list is not empty, and return an error code instead. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 82df96d849147c72013639134de21296b4b19d83 Author: Sven Schnelle Date: Mon Dec 5 09:02:16 2022 +0100 s390/raw3270: use DEVICE_ATTR_RO() for sysfs attributes Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit fd2a41d07b2f8be0f490f8f78280e574eb9bda5a Author: Sven Schnelle Date: Mon Dec 5 08:57:01 2022 +0100 s390/raw3270: add comment to spinlock member Add a small comment to the lock member of struct raw3270_view to make checkpatch happy. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 0d85d8edaf302f070da0ba838fdefe8afa3ef681 Author: Sven Schnelle Date: Mon Dec 5 08:52:29 2022 +0100 s390/raw3270: fix raw3270 declarations checkpatch complains about missing argument names in function declarations. Fix it. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit ff61744c97ffd7e91967114f366779d600653684 Author: Sven Schnelle Date: Mon Dec 5 08:40:00 2022 +0100 s390/raw3270: fix indentation/whitespace errors Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 754f66b59cc31226601279245356795b7a62e2e3 Author: Sven Schnelle Date: Mon Dec 5 07:56:16 2022 +0100 s390/raw3270: move EXPORT_SYMBOL() next to functions Fixes a few checkpatch warning about EXPORT_SYMBOL being at the end of the file instead of being next to the functions. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 7ef213879a1ea1183b059c15b23c1a20957f4934 Author: Sven Schnelle Date: Sun Dec 4 21:05:37 2022 +0100 s390/con3270: fix minor checkpatch issues Fix remaining checkpatch issues, like misplaced brackets, whitespace and similar things. No functional change. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 9e1d1d8e76625d3689505d56ad2e8af49b37944b Author: Sven Schnelle Date: Sun Dec 4 20:58:45 2022 +0100 s390/con3270: use msecs_to_jiffies() Use msecs_to_jiffies() instead of HZ/10. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit f8674930891b5d8d8c62246a8d22f096f4b02632 Author: Sven Schnelle Date: Sun Dec 4 20:55:27 2022 +0100 s390/con3270: fix multiple assignments in one line fix the following and similar checkpatch warnings: CHECK: multiple assignments should be avoided + tp->cx = tp->saved_cx = 0; Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 303bac9df781b42b7c210db269b5b6801f2b9bf0 Author: Sven Schnelle Date: Sun Dec 4 20:52:11 2022 +0100 s390/con3270: fix camelcase in enum members fix the following and similar checkpatch warnings: CHECK: Avoid CamelCase: + enum { ESnormal, ESesc, ESsquare, ESparen, ESgetpars }; Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 525c919d5e1bbe9f5163bc64c04948cf85e88407 Author: Sven Schnelle Date: Tue Nov 29 12:28:36 2022 +0100 s390/con3270: add key help to status area To let the user know about function key bindings, print them next to the Running/History field at the lower right of the screen. Also print the scrollback position. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 0573fff2054ea25c463339f38fa6979e85668215 Author: Sven Schnelle Date: Tue Nov 29 11:19:09 2022 +0100 s390/con3270: reduce highlight width to 3 bits With the previous change this reduces the size of struct tty3270_attribute from four to two bytes. As we have this struct allocated for each character cell, this saves quite some memory. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 18fc2e93b602d8def2b8d10492238aa40180d292 Author: Sven Schnelle Date: Tue Nov 29 10:31:19 2022 +0100 s390/con3270: reduce f_color and b_color attribute size to 4 bit As we're only supportign 8 colors, we don't need 8 bits. Reduce the size to 4 bits to save memory. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 76485078702ae680c9683500ad9caafea05678b1 Author: Sven Schnelle Date: Mon Nov 28 11:34:52 2022 +0100 s390/con3270: rewrite command line recalling Command line recalling is the last user of the 3270 custom malloc() like allocator. Remove this dependency by using a statically allocated buffer for the saved command lines, and also remove the allocator. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 164eb669348045894b50eaecc5936ec07b4307f0 Author: Sven Schnelle Date: Mon Nov 28 07:31:49 2022 +0100 s390/tty3270: use normal char buffer for prompt/input Preparation patch to allow removing the custom 3270 memory allocator. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 9c138af9b777f466226787cf24a34ff94d4f80e2 Author: Sven Schnelle Date: Thu Nov 24 22:53:44 2022 +0100 s390/tty3270: convert lines during output The length of the screen line is variable with the 3270 protocol. For each attribute (foreground, background color, highlighting etc) we need 3 bytes: the set attribute order, the attribute number, and the value of the attribute. This means that depending on screen content, we might end up 3*3 bytes addtional data for a single character. Allocating the maximum possible amount of memory is quite a lot, and we cannot easily extend the lines by allocating memory because we might get called from atomic context. Failing to extend the memory would also be bad as that would mean that we could miss kernel messages in oom conditions. Therefore move the conversion to a 3270 datastream to tty3270_update(), and use only single line buffer. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit ec1b0a33a3828801233683dd4fbd07fe8a0e7909 Author: Sven Schnelle Date: Sat Nov 26 19:34:56 2022 +0100 s390/con3270: generate status line during output Updating the status line is almost the same as generating it when redrawing the screen. However, the code is much easier to read when doing so. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit ae6572445b168ead43c0bfcb1fb2712968f43d1e Author: Sven Schnelle Date: Sun Nov 27 20:43:53 2022 +0100 s390/tty3270: add 3270 datastream helpers There are lots of places adding attributes or orders to the datastream. Add a few helpers to make that code shorter and easier to read. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 6e49017ce41473daf1bef818c5dcc4a1e4a41252 Author: Sven Schnelle Date: Sat Nov 26 23:39:16 2022 +0100 s390/tty3270: move ASCII->EBCDIC conversion to convert_line() Instead of always converting the character set, only convert them when the line is really displayed. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 2b62ba58b362be224b0bfe4dd216374cd3ebcaac Author: Sven Schnelle Date: Sat Nov 26 23:24:43 2022 +0100 s390/con3270: move tty3270_convert_line() To make the upcoming patches easier to read, move tty3270_convert_line() before changing code. No functional change. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit f77f936afe1ea9342725bff0bd0f7aaa54699794 Author: Sven Schnelle Date: Sat Nov 26 20:18:21 2022 +0100 s390/raw3270: make raw3270_buffer_address() accept x/y coordinates All callers of raw3270_buffer_address() are calculating the offset from some x/y coordinates. Move that calculation inside of the function, so user can pass the x/y values directly. Note that negative values are relative to the end-of-line or end-of-screen. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit b2057c870231edce4105c9825f8e5e1f20aebabc Author: Sven Schnelle Date: Thu Nov 24 21:22:29 2022 +0100 s390/tty3270: allocate screen with scrollback No functional change (except more memory consumption), in preparation for the line buffer rework. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 9eb99b941ba78a0aad996a3c129ee2a19507d87e Author: Sven Schnelle Date: Thu Nov 24 20:32:20 2022 +0100 s390/con3270: add helper to get number of tty rows There a quite a few places using 'tp->view.rows - 2'. Add a helper function for this. This will also be used when a function key help line will be added. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 1fefd62fee50d4455ef5ebf65e22b282d773ed7d Author: Sven Schnelle Date: Mon Nov 28 19:55:57 2022 +0100 s390/tty3270: split up tty3270_convert_line() To make the code easier to read, split up tty3270_convertline() into several subfunctions: - tty3270_resize_line() to realloc the line if it doesn't have enough space left - tty3270_required_length() to calculate how much space we need - tty3270_add_attributes() to add the color and highlight attributes - tty3270_add_reset_attributes() to reset the attributes at the end of the line Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit cbb36313bdb696cfe0874406327b24b403c9e8e0 Author: Sven Schnelle Date: Mon Nov 28 19:53:04 2022 +0100 s390/tty3270: resize terminal when the clear key is pressed There's no easy way to figure out whether the user has re-connected to the z/VM session. When the user re-connected with a different geometry to z/VM, the screen layout is broken. Allow the user to force a resizing by pressing the Clear Key. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 91621ba7d7b7274cd44e5ee4942a39a6aae977a0 Author: Sven Schnelle Date: Mon Nov 28 19:50:10 2022 +0100 s390/tty3270: move resize work to raw3270 This change was initially made to reduce code duplication when the con3270 and tty3270 shared the same resize code. It still makes sense to move the resize workqueue to raw3270 in case we add some other view later. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit f08e31558a98383f185dcff0a8d77f1963150156 Author: Sven Schnelle Date: Mon Nov 28 19:42:28 2022 +0100 s390/raw3270: add raw3270_start_request() helper There are a few places (and there would be more with the following commits) like this: raw3270_request_reset(cp->kreset); raw3270_request_set_cmd(cp->kreset, TC_WRITE); raw3270_request_add_data(cp->kreset, &kreset_data, 1); raw3270_start(&cp->view, cp->kreset); i.e reset a request, setting the command, adding payload, and starting the request. Add a helper raw3270_start_request() which takes a command and the payload as argument and calls the approppriate functions. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit e22de7d7910ab9490b191da5fac0592214b340d5 Author: Sven Schnelle Date: Mon Nov 28 19:40:44 2022 +0100 s390/tty3270: add AID defines Use AID_* instead of hex numbers to make the code a bit easier to read. also convert the if/else blocks to a switch statement in tty3270_read_tasklet(). Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 970cf9a97a27d3f9a72a17aa6aedb47758478c33 Author: Sven Schnelle Date: Thu Nov 17 17:52:40 2022 +0100 s390/tty3270: ignore NUL characters With 'TERM=vt220' zsh is sending several NUL characters with the prompt to the tty. Both xterm and the linux drm console seem to ignore them. Ignore them in tty3270 as well. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit e4b57b93935d103aae10abea361af77ef906f368 Author: Sven Schnelle Date: Thu Nov 17 17:30:40 2022 +0100 s390/tty3270: add support for VT100 graphics escape Add support for ESC(B and ESC(0 to switch between character charset and graphics charset. Used in vt100 and later terminal generations. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 94dbb0a76ce21878867210d1cf0b21725023b452 Author: Sven Schnelle Date: Mon Nov 28 22:22:01 2022 +0100 s390/tty3270: add support for graphic escape Add support for ASCII S0/S1 to switch between character charset and graphic charset. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 4043ea22535d00325b469c75cf4840612c09345b Author: Sven Schnelle Date: Thu Nov 17 22:22:15 2022 +0100 s390/tty3270: add support for background color 3270 terminals support 8 background colors. Add the code to utilize them. Unfortunately the line erase code need to be adjusted: Without background colors, it was sufficient to just set the line length to zero. With background colors, we need to put spaces with the correct background color. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit c2e9375ecd67a0d4ff07e21e447a5bd4bec4da48 Author: Sven Schnelle Date: Tue Nov 29 08:02:01 2022 +0100 s390/tty3270: add struct tty3270_attribute In preparation of background color and graphic escape support add a structure for attributes can be copied at once. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 562baff57754240236eb5103ed6062d5fca67268 Author: Sven Schnelle Date: Tue Nov 29 11:49:23 2022 +0100 s390/raw3270: use __packed instead of __attribute__((packed)) Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 65b77ccb1e292d3d2407bbe225995d7c4c39e721 Author: Sven Schnelle Date: Sun Nov 27 09:26:24 2022 +0100 s390/tty3270: use switch/case in tty3270_erase_display() This makes the code easier to read. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 815f3eeea9748213eb565395b2df5953969b18b1 Author: Sven Schnelle Date: Tue Nov 29 12:11:05 2022 +0100 s390/tty3270: use switch/case in tty3270_erase_line() This makes the code easier to read. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 13d4999ab2fbb97f31ef66501cea82d16c9f3a94 Author: Sven Schnelle Date: Mon Nov 28 22:38:49 2022 +0100 s390/raw3270: fix formatting issues fix function prototypes split over two lines like: static void foobar(void) and fix superfluous spaces in declarations like foo * bar Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit e6d98bb823af51ad8b89ee705111dbb1ed8a4aff Author: Sven Schnelle Date: Mon Nov 28 22:32:35 2022 +0100 s390/con3270: fix formatting issues fix function prototypes split over two lines like: static void foobar(void) and fix superfluous spaces in declarations like foo * bar Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit fbaee7464fbb61a4cb484d9c41f14517738c80c7 Author: Sven Schnelle Date: Thu Nov 17 22:02:01 2022 +0100 s390/tty3270: add support for diag 8c The current code uses diag210 to infer the 3270 geometry from the model number when running on z/VM. This doesn't work well as almost all 3270 software clients report as 3279-2 with a custom resolution. tty3270 assumes it has a 80x24 terminal connected because of the -2 suffix. Use diag 8c to fetch the realy geometry from z/VM. Note that this doesn't allow dynamic resizing, i.e. reconnecting to a z/VM session with a different geometry. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 9603cb334a7dc30fb544a3579bcbf23ae5b04f8f Author: Sven Schnelle Date: Mon Nov 28 19:35:40 2022 +0100 s390/tty3270: rename to con3270 Rename the driver file to con3270 to be in sync with con3215.c. This removes CONFIG_TN3270_TTY, it is now always build if CONFIG_TN3270 is enabled. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit c17fe081ac1f397feaed6c8a279ebb3f647f359a Author: Sven Schnelle Date: Mon Nov 28 19:22:28 2022 +0100 s390/3270: unify con3270 + tty3270 There were two flavours of 3270 drivers: con3270, which provides a console driver, and tty3270 providing a tty driver. A user could switch with PF3 between the two views. While this sounds nice, it's a bit annoying: If the user enters a command which triggers a kernel message, he always has to switch back and forth to see the message. Unify both views to have kernel messages and tty in one screen, like it is on almost all other platforms. This also has the nice side effect of removing a lot of duplicate code. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit a21e962e129db40ae08af9fc80ea7babf3632d77 Author: Sven Schnelle Date: Mon Nov 28 19:24:15 2022 +0100 s390/tty3270: add tty3270_create_view() Will be used later for the console driver. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Tested-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit df386f15b2fbe51863d0f076d5939d5cbdb36f0d Author: Nicholas Piggin Date: Thu Oct 6 20:56:35 2022 +1000 s390: remove the last remnants of cputime_t cputime_t was a core kernel type, removed by commits ed5c8c854f2b..b672592f0221. As explained in commit b672592f0221 ("sched/cputime: Remove generic asm headers"), the final cleanup is for the arch to provide cputime_to_nsec[s](). Commit e53051e757d6 ("s390/cputime: provide archicture specific cputime_to_nsecs") did that, but just didn't remove the then-unused cputime_to_usecs() and associated remnants. Signed-off-by: Nicholas Piggin Reviewed-by: Sven Schnelle Signed-off-by: Alexander Gordeev Link: https://lore.kernel.org/r/20221006105635.115775-1-npiggin@gmail.com Signed-off-by: Heiko Carstens commit 91d5364dc673fa9cf3a5b7b30cf33c70803eb3a4 Author: Thomas Richter Date: Fri Dec 23 11:03:32 2022 +0100 s390/cpumf: support user space events for counting CPU Measurement counting facility events PROBLEM_STATE_CPU_CYCLES(32) and PROBLEM_STATE_INSTRUCTIONS(33) are valid events. However the device driver returns error -EOPNOTSUPP when these event are to be installed. Fix this and allow installation of events PROBLEM_STATE_CPU_CYCLES, PROBLEM_STATE_CPU_CYCLES:u, PROBLEM_STATE_INSTRUCTIONS and PROBLEM_STATE_INSTRUCTIONS:u. Kernel space counting only is still not supported by s390. Signed-off-by: Thomas Richter Acked-by: Sumanth Korikkar Signed-off-by: Heiko Carstens commit 4f16749f89596c4eb65c0801c86e4a74ad6c62a9 Author: Andrzej Hajda Date: Tue Dec 13 13:19:51 2022 +0100 drm/i915/selftest: use igt_vma_move_to_active_unlocked if possible Helper replaces common sequence of calls. Signed-off-by: Andrzej Hajda Reviewed-by: Tvrtko Ursulin Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20221213121951.1515023-2-andrzej.hajda@intel.com commit f350c74fed66a41a6d5a8f4305e735f9c8b266ca Author: Andrzej Hajda Date: Tue Dec 13 13:19:50 2022 +0100 drm/i915: use proper helper in igt_vma_move_to_active_unlocked There is no need to use _i915_vma_move_to_active. No functional changes. Signed-off-by: Andrzej Hajda Reviewed-by: Tvrtko Ursulin Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20221213121951.1515023-1-andrzej.hajda@intel.com commit fcd26bf51c0e74af764f2a52bd1baddd4bf3b6cb Author: Abel Vesa Date: Fri Dec 30 22:36:37 2022 +0200 pinctrl: qcom: Add SM8550 pinctrl driver Add pinctrl driver for TLMM block found in SM8550 SoC. Co-developed-by: Neil Armstrong Signed-off-by: Neil Armstrong Signed-off-by: Abel Vesa Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20221230203637.2539900-3-abel.vesa@linaro.org Reviewed-by: Bjorn Andersson Signed-off-by: Linus Walleij commit 15dfa161cc2c11ecc5a461a4896983cbe21a0b45 Author: Abel Vesa Date: Fri Dec 30 22:36:36 2022 +0200 dt-bindings: pinctrl: qcom: Add SM8550 pinctrl Add device tree binding Documentation details for Qualcomm SM8550 TLMM device Signed-off-by: Abel Vesa Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221230203637.2539900-2-abel.vesa@linaro.org Signed-off-by: Linus Walleij commit 6cea468b680e1254c7e8f95b70f4c3798985f05a Author: Rob Herring Date: Sun Jan 8 18:46:56 2023 -0600 regulator: dt-bindings: Convert Fairchild FAN53555 to DT schema Convert the Fairchild FAN53555 and compatible variants binding to DT schema format. Add the undocumented 'vsel-gpios' property used to control the VSEL pin. The example was missing 'reg', so add it. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230109004656.451231-1-robh@kernel.org Signed-off-by: Mark Brown commit 9951dc8a3c5d532572e3e30fdcb7b23d9cab8af7 Author: Krzysztof Kozlowski Date: Sun Dec 25 12:59:07 2022 +0100 ASoC: dt-bindings: qcom,lpass-tx-macro: correct clocks on SC7280 On SC7280 ADSP bypassed platform, there are only three clocks for TX macro. This is already reflected in "clock-names" but not in "clocks" property: sc7280-herobrine-zombie-lte.dtb: codec@3220000: clocks: [[219, 8], [219, 7], [220]] is too short Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221225115907.55250-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 522d8654387791a61977c6f4a9d83bb32c58177c Author: Krzysztof Kozlowski Date: Sun Dec 25 12:59:06 2022 +0100 ASoC: dt-bindings: qcom,lpass-wsa-macro: correct clocks on SM8250 SM8250 DTS uses additional "va" clock in WSA macro device node: sm8250-sony-xperia-edo-pdx203.dtb: codec@3240000: clock-names: ['mclk', 'npl', 'macro', 'dcodec', 'va', 'fsgen'] is too long Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221225115907.55250-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 523ba3b70fc572f69673d8bd88af00df0e716529 Author: Ajye Huang Date: Sun Jan 8 19:43:51 2023 +0800 ASoC: nau8315: remove dependency on GPIOLIB commit dcc2c012c7691 ("ASoC: Fix gpiolib dependencies") removed a series of unnecessary dependencies on GPIOLIB when the gpio was optional. A similar simplification seems valid for nau8315, so remove the dependency as well. This will avoid the following warning WARNING: unmet direct dependencies detected for SND_SOC_NAU8315 Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && GPIOLIB [=n] Selected by [y]: - SND_SOC_INTEL_SOF_NAU8825_MACH [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_INTEL_MACH [=y] && (SND_SOC_SOF_HDA_LINK [=y] || SND_SOC_SOF_BAYTRAIL [=n]) && I2C [=y] && ACPI [=y] && SND_HDA_CODEC_HDMI [=y] && SND_SOC_SOF_HDA_AUDIO_CODEC [=y] && (MFD_INTEL_LPSS [=n] || COMPILE_TEST [=y]) Reported-by: kernel test robot Signed-off-by: Ajye Huang Link: https://lore.kernel.org/r/20230108114351.539786-1-ajye_huang@compal.corp-partner.google.com Signed-off-by: Mark Brown commit cbf74baf02219978bfa9c2959eac6bf1d98c32cd Author: Krzysztof Kozlowski Date: Mon Jan 9 09:33:01 2023 +0100 ASoC: dt-bindings: simple-card: correct DAI subnodes pattern The simple-audio-card,dai-link node does not allow address/size-cells thus children (cpu, codec) should come without unit addresses. For cases with multiple nodes of same type, require a dash before index (e.g. cpu-x) and add trailing $ to the pattern to disallow other characters. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230109083301.76282-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 05d450b06d6a299bd5a7f209c81db681c3cdbcd9 Author: Ajye Huang Date: Sun Jan 8 01:59:33 2023 +0800 ASoC: mediatek: mt8186-rt5682: primary_codec_init() warn: missing error code? 'ret' The function primary_codec_init() should return 0 if dmic_sel is null. Here is the warning message reported by 0-DAY CI Kernel Test Service. smatch warnings: primary_codec_init() warn: missing error code? 'ret' ... 2022-11-02 141 if (!priv->dmic_sel) { 2022-11-02 142 dev_info(card->dev, "dmic_sel is null\n"); 2022-11-02 @143 return ret; return -EIVNAL;? return 0;? 2022-11-02 144 } Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Ajye Huang Link: https://lore.kernel.org/r/20230107175933.12973-1-ajye_huang@compal.corp-partner.google.com Signed-off-by: Mark Brown commit de1cae22898cf10aacc735a21d799b5bbce4496c Author: Nathan Chancellor Date: Thu Jan 5 17:43:39 2023 -0700 ASoC: amd: ps: Fix uninitialized ret in create_acp64_platform_devs() Clang warns: sound/soc/amd/ps/pci-ps.c:218:2: error: variable 'ret' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized] default: ^~~~~~~ sound/soc/amd/ps/pci-ps.c:239:9: note: uninitialized use occurs here return ret; ^~~ sound/soc/amd/ps/pci-ps.c:190:9: note: initialize the variable 'ret' to silence this warning int ret; ^ = 0 1 error generated. ret is used uninitialized if 'goto de_init' is taken. As this is not an error nor should the ACP be deinitialized, just directly return 0 in this case statement, which resolves the warning. Fixes: 1d325cdaf7a2 ("ASoC: amd: ps: refactor platform device creation logic") Link: https://github.com/ClangBuiltLinux/linux/issues/1779 Suggested-by: Vijendar Mukunda Signed-off-by: Nathan Chancellor Reviewed-by: Syed Saba Kareem Link: https://lore.kernel.org/r/20230105-wsometimes-uninitialized-pci-ps-c-v2-1-c50321676325@kernel.org Signed-off-by: Mark Brown commit ffb2bbdf79d7e712782fd5f44fc250f3e07b3b92 Author: Krzysztof Kozlowski Date: Tue Dec 27 17:31:35 2022 +0100 ASoC: dt-bindings: qcom,lpass-cpu: Correct and constrain clocks, interrupts, reg The binding allowed multiple variations and number of reg/interrupts/clocks properties for SC7180 and SC7280. Maybe this was done for different use-cases of LPASS CPU audio node, but DTS is supposed to be a complete picture of the hardware. The upstreamed SC7180 and SC7280 DTSes contain the widest set of these reg/interrupts/clocks, sometimes being even sum of these different variations. Correct and narrow the reg, interrupts and clocks to match existing DTS: sc7280-herobrine-evoker-lte.dtb: audio@3987000: clock-names: 'oneOf' conditional failed, one must be fixed: ['aon_cc_audio_hm_h', 'audio_cc_ext_mclk0', 'core_cc_sysnoc_mport_core', 'core_cc_ext_if0_ibit', 'core_cc_ext_if1_ibit', 'audio_cc_codec_mem', 'audio_cc_codec_mem0', 'audio_cc_codec_mem1', 'audio_cc_codec_mem2', 'aon_cc_va_mem0'] is too long 'core_cc_sysnoc_mport_core' was expected 'audio_cc_codec_mem' was expected 'audio_cc_codec_mem0' was expected 'audio_cc_codec_mem1' was expected 'audio_cc_codec_mem2' was expected 'aon_cc_va_mem0' was expected Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221227163135.102559-3-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 5f9cd0f7c1499174b099a1bda67693df268e711e Author: Krzysztof Kozlowski Date: Tue Dec 27 17:31:34 2022 +0100 ASoC: dt-bindings: qcom,lpass-cpu: Fix DAI children pattern DAI children (as subnodes) can come with two-digit unit addresses: sc7280-herobrine-crd.dtb: audio@3987000: Unevaluated properties are not allowed ('dai-link@19', 'dai-link@25' were unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221227163135.102559-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit a1df78540da20b9ce30a5b24b395d2b4a0f4319e Author: Krzysztof Kozlowski Date: Tue Dec 27 17:31:33 2022 +0100 ASoC: dt-bindings: qcom,lpass-cpu: Document required-opps SC7280 LPASS CPU device node comes with required-opps: sc7280-herobrine-crd.dtb: audio@3987000: Unevaluated properties are not allowed ('required-opps' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221227163135.102559-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 1760df5b7ee6a0bfc8ad47f4db490c36c5546be8 Author: Chancel Liu Date: Wed Jan 4 10:39:53 2023 +0800 ASoC: fsl_xcvr: Add constraints of period size while using eDMA eDMA on i.MX93 platform requires the period size to be multiple of maxburst. Signed-off-by: Chancel Liu Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20230104023953.2973362-4-chancel.liu@nxp.com Signed-off-by: Mark Brown commit e240b9329a300af7b7c1eba2ce0abbf19e6c540b Author: Chancel Liu Date: Wed Jan 4 10:39:52 2023 +0800 ASoC: fsl_xcvr: Add support for i.MX93 platform Add compatible string and specific soc data to support XCVR on i.MX93 platform. XCVR IP on i.MX93 is cut to SPDIF only by removing external PHY. Signed-off-by: Chancel Liu Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20230104023953.2973362-3-chancel.liu@nxp.com Signed-off-by: Mark Brown commit 0a22003c637b71a1dbd8bb521c09736b52349256 Author: Chancel Liu Date: Wed Jan 4 10:39:51 2023 +0800 ASoC: dt-bindings: fsl,xcvr: Add compatible string for i.MX93 platform Add compatible string "fsl,imx93-xcvr" for i.MX93 platform. Acked-by: Krzysztof Kozlowski Signed-off-by: Chancel Liu Link: https://lore.kernel.org/r/20230104023953.2973362-2-chancel.liu@nxp.com Signed-off-by: Mark Brown commit 968b42069fe5dab362b623c6b8a1565709a12f5b Author: Emanuele Ghidoli Date: Wed Jan 4 15:04:12 2023 +0100 ASoC: nau8822: add speaker Bridge Tied Output configuration Allow configuring the two loudspeaker outputs as a single Bridge Tied Load output getting higher output power. Signed-off-by: Emanuele Ghidoli Signed-off-by: Francesco Dolcini Link: https://lore.kernel.org/r/20230104140412.35575-4-francesco@dolcini.it Signed-off-by: Mark Brown commit 76fa6279eff931b43482f0bef5d65cdcf325de87 Author: Emanuele Ghidoli Date: Wed Jan 4 15:04:10 2023 +0100 ASoC: dt-bindings: nau8822: convert to the dtschema Convert nau8822 devicetree binding to dtschema. Change file name to match dtschema naming. Cc: David Lin Signed-off-by: Emanuele Ghidoli Signed-off-by: Francesco Dolcini Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230104140412.35575-2-francesco@dolcini.it Signed-off-by: Mark Brown commit 80519d8ccc6b65bfbc8571ea16992141d71510e9 Author: Claudiu Beznea Date: Thu Dec 8 13:45:15 2022 +0200 clk: at91: do not compile dt-compat.c for sama7g5 and sam9x60 There is no need to have dt-compat.c compiled for SAMA7G5 and SAM9X60 as there is no in kernel device tree that could use it. Thus avoid compiling dt-compat.c for them. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221208114515.35179-4-claudiu.beznea@microchip.com commit 68b3b6f1773d2d1f8f58da7149e739213a3ed038 Author: Claudiu Beznea Date: Thu Dec 8 13:45:13 2022 +0200 clk: at91: mark ddr clocks as critical Mark DDR clocks as critical for AT91 devices. These clocks are enabled by bootloader when initializing DDR and needs to stay enabled. Up to this patch the DDR clocks were requested from drivers/memory/atmel-sdramc.c which does only clock request and enable. There is no need to have a separate driver just for this, thus the atmel-sdramc.c will be deleted in a subsequent patch. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221208114515.35179-2-claudiu.beznea@microchip.com commit f2e1fa99550dd7a882229e2c2cd9ecab4ce773d0 Author: Hanna Hawa Date: Mon Dec 19 17:23:45 2022 +0000 i2c: designware: fix i2c_dw_clk_rate() return size to be u32 Make i2c_dw_clk_rate() to return u32 instead of unsigned long, as the function return the value of get_clk_rate_khz() which returns u32. Fixes: b33af11de236 ("i2c: designware: Do not require clock when SSCN and FFCN are provided") Signed-off-by: Hanna Hawa Reviewed-by: Andy Shevchenko Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang commit bbc9db2da8716759f367ad5754036b58f5371044 Author: Eugen Hristev Date: Tue May 3 12:51:25 2022 +0300 ARM: dts: at91: sama7g5: add nodes for video capture Add node for the XISC (eXtended Image Sensor Controller) and CSI2DC (csi2 demux controller). These nodes represent the top level of the video capture hardware pipeline and are directly connected in hardware. Signed-off-by: Eugen Hristev Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20220503095127.48710-4-eugen.hristev@microchip.com commit d4ac37916e42dc1a46e54bb7d49d5e39d7fa60d5 Author: Mihai Sain Date: Mon Dec 5 09:01:08 2022 +0200 ARM: at91: add support in soc driver for new SAMA7G54 SiPs Add detection of new SAMA7G54 System-In-Package (SIP) by the SoC driver: SAMA7G54D1G, SAMA7G54D2G, SAMA7G54D4G. Signed-off-by: Mihai Sain Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221205070108.42624-1-mihai.sain@microchip.com commit 816e7fae8da1e53937983be62e420cde290ed5d8 Author: Konrad Dybcio Date: Tue Dec 13 19:33:05 2022 +0100 i2c: qcom-cci: Deprecate duplicated compatibles Many compatibles have been introduced, pointing to the same config data. Leave a note reminding future developers to not do that again. Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang commit bbdbad3b33c13c3fba7d9fdc4f2a1c78168ca6bd Author: Konrad Dybcio Date: Tue Dec 13 19:33:00 2022 +0100 dt-bindings: i2c: qcom,i2c-cci: Fall back to common compatibles Almost every compatible string in the CCI driver is a duplicate. Adjust the bindings to include a common (first-soc-implementing-vX) compatible to remove the need to keep adding superfluous compatible strings. Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang commit 7bdb1767bf011c7f6065ac483ad2f00e434c3979 Author: Namhyung Kim Date: Thu Dec 29 12:40:59 2022 -0800 perf/core: Change the layout of perf_sample_data The layout of perf_sample_data is designed to minimize cache-line access. The perf_sample_data_init() used to initialize a couple of fields unconditionally so they were placed together at the head. But it's changed now to set the fields according to the actual sample_type flags. The main user (the perf tools) sets the IP, TID, TIME, PERIOD always. Also group relevant fields like addr, phys_addr and data_page_size. Suggested-by: Peter Zijlstra Signed-off-by: Namhyung Kim Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20221229204101.1099430-1-namhyung@kernel.org commit b0bd3336d87f3403094fbadc7803c1d5bf3df4f7 Author: Kan Liang Date: Wed Jan 4 12:13:47 2023 -0800 perf/x86/msr: Add Meteor Lake support Meteor Lake is Intel's successor to Raptor lake. PPERF and SMI_COUNT MSRs are also supported. Signed-off-by: Kan Liang Signed-off-by: Ingo Molnar Reviewed-by: Andi Kleen Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20230104201349.1451191-7-kan.liang@linux.intel.com commit eaef048c281bf7eaecdfde96d9b305b8644c9f66 Author: Kan Liang Date: Wed Jan 4 12:13:46 2023 -0800 perf/x86/cstate: Add Meteor Lake support Meteor Lake is Intel's successor to Raptor lake. From the perspective of Intel cstate residency counters, there is nothing changed compared with Raptor lake. Share adl_cstates with Raptor lake. Update the comments for Meteor Lake. Signed-off-by: Kan Liang Signed-off-by: Ingo Molnar Reviewed-by: Andi Kleen Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20230104201349.1451191-6-kan.liang@linux.intel.com commit eb467aaac21e133a3d01c48c0a6bf43756b06e78 Author: Kan Liang Date: Wed Jan 4 12:13:45 2023 -0800 perf/x86/intel: Support Architectural PerfMon Extension leaf The new CPUID leaf 0x23 reports the "true view" of PMU resources. The sub-leaf 1 reports the available general-purpose counters and fixed counters. Update the number of counters and fixed counters when the sub-leaf is detected. Signed-off-by: Kan Liang Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20230104201349.1451191-5-kan.liang@linux.intel.com commit a018d2e3d4b1abc4a3cb64415c5d204fc5d2eafd Author: Kan Liang Date: Wed Jan 4 12:13:44 2023 -0800 x86/cpufeatures: Add Architectural PerfMon Extension bit CPUID.(EAX=07H, ECX=1):EAX[8] indicates whether the Architectural PerfMon Extension leaf (CPUID leaf 23) is supported. The "X86_FEATURE_..., word 12" is already mirrored from CPUID "0x00000007:1 (EAX)". Add X86_FEATURE_ARCH_PERFMON_EXT under the "word 12" section. The new Architectural PerfMon Extension leaf (CPUID leaf 23) will be supported in the perf_events subsystem later. The feature will not appear in /proc/cpuinfo. Signed-off-by: Kan Liang Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20230104201349.1451191-4-kan.liang@linux.intel.com commit c87a31093c707eb0b8c48aab89922c1d0bf4bd90 Author: Kan Liang Date: Wed Jan 4 12:13:43 2023 -0800 perf/x86: Support Retire Latency Retire Latency reports the number of elapsed core clocks between the retirement of the instruction indicated by the Instruction Pointer field of the PEBS record and the retirement of the prior instruction. It's enumerated by the IA32_PERF_CAPABILITIES.PEBS_TIMING_INFO[17]. Add flag PMU_FL_RETIRE_LATENCY to indicate the availability of the feature. The Retire Latency is not supported by the fixed counter 0 on p-core of MTL. Signed-off-by: Kan Liang Signed-off-by: Ingo Molnar Reviewed-by: Andi Kleen Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20230104201349.1451191-3-kan.liang@linux.intel.com commit 38aaf921e92dc5cf87e4a6c5a4b24dd99155cace Author: Kan Liang Date: Wed Jan 4 12:13:42 2023 -0800 perf/x86: Add Meteor Lake support From PMU's perspective, Meteor Lake is similar to Alder Lake. Both are hybrid platforms, with e-core and p-core. The key differences include: - The e-core supports 2 PDIST GP counters (GP0 & GP1) - New MSRs for the Module Snoop Response Events on the e-core. - New Data Source fields are introduced for the e-core. - There are 8 GP counters for the e-core. - The load latency AUX event is not required for the p-core anymore. - Retire Latency (Support in a separate patch) for both cores. Since most of the code in the intel_pmu_init() should be the same as Alder Lake, to avoid code duplication, share the path with Alder Lake. Add new specific functions of extra_regs, and get_event_constraints to support the OCR events, Module Snoop Response Events and 2 PDIST GP counters on e-core. Add new MTL specific mem_attrs which drops the load latency AUX event. The Data Source field is extended to 4:0, which can contains max 32 sources. The Retire Latency is implemented with a separate patch. Signed-off-by: Kan Liang Signed-off-by: Ingo Molnar Reviewed-by: Andi Kleen Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20230104201349.1451191-2-kan.liang@linux.intel.com commit b6c00fb9949fbd073e651a77aa75faca978cf2a6 Author: Kan Liang Date: Wed Jan 4 12:13:41 2023 -0800 perf: Add PMU_FORMAT_ATTR_SHOW The macro PMU_FORMAT_ATTR facilitates the definition of both the "show" function and "format_attr". But it only works for a non-hybrid platform. For a hybrid platform, the name "format_attr_hybrid_" is used. The definition of the "show" function can be shared between a non-hybrid platform and a hybrid platform. Add a new macro PMU_FORMAT_ATTR_SHOW. No functional change. The PMU_FORMAT_ATTR_SHOW will be used in the following patch. Signed-off-by: Kan Liang Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20230104201349.1451191-1-kan.liang@linux.intel.com commit 3bd2706c910fd328e4ab96ae0aabdcd7c4a90fbf Author: Sai Krishna Potthuri Date: Wed Jan 4 14:15:12 2023 +0530 EDAC/zynqmp: Add EDAC support for Xilinx ZynqMP OCM Add EDAC support for Xilinx ZynqMP OCM Controller, so this driver reports CE and UE errors upon interrupt generation. Also add debugfs files for error injection. On Xilinx ZynqMP platform, both OCM Controller driver(zynqmp_edac) and DDR Memory Controller driver(synopsys_edac) co-exist which means both can be loaded at a time. This scenario is tested on Xilinx ZynqMP platform. Fix following issue reported by the robot: "MAINTAINERS references a file that doesn't exist: Documentation/devicetree/bindings/edac/xlnx,zynqmp-ocmc.yaml" [ bp: - Massage commit message - s/EDAC_ZYNQMP_OCM/EDAC_ZYNQMP/ - Touchups ] Reported-by: kernel test robot Co-developed-by: Shubhrajyoti Datta Signed-off-by: Shubhrajyoti Datta Signed-off-by: Sai Krishna Potthuri Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230104084512.1855243-3-sai.krishna.potthuri@amd.com commit c67ea7d22eeb133363e8227342cf14cbf6eaa9a0 Author: Shubhrajyoti Datta Date: Wed Jan 4 14:15:11 2023 +0530 dt-bindings: edac: Add bindings for Xilinx ZynqMP OCM Add bindings for Xilinx ZynqMP OCM controller. Signed-off-by: Shubhrajyoti Datta Co-developed-by: Sai Krishna Potthuri Signed-off-by: Sai Krishna Potthuri Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230104084512.1855243-2-sai.krishna.potthuri@amd.com commit c7b5e7f002d153d4fe7bd50597cfc8aa0dca8180 Author: Marek Vasut Date: Thu Jan 5 15:01:35 2023 +0100 dt-bindings: arm: Move i.MX8MM Cloos PHG Board to TQM entry The i.MX8MM Cloos PHG Board is based on TQ-Systems GmbH i.MX8MM TQMa8MQML SOM, which results in compatible string in the form: "vendor,custom-board", "tqm,som", "fsl,soc" Move the binding entry so this triplet can be matched on. Acked-by: Krzysztof Kozlowski Reviewed-by: Fabio Estevam Signed-off-by: Marek Vasut Acked-by: Alexander Stein Signed-off-by: Shawn Guo commit a071fc9d55087ecfe7de1ca87553a8f0b6ce95aa Author: Marek Vasut Date: Thu Jan 5 15:01:34 2023 +0100 dt-bindings: arm: Split i.MX8M Plus DHCOM based boards The i.MX8M Plus DHCOM based boards have compatible string in the form: "vendor,custom-board", "dh,som", "fsl,soc" or "dh,carrier-board", "dh,som", "fsl,soc" Split the binding entry so this triplet can be matched on. Acked-by: Krzysztof Kozlowski Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit 7342b6f90ec6b6719257701365235689b8740080 Author: Marek Vasut Date: Thu Jan 5 15:01:33 2023 +0100 dt-bindings: arm: Split i.MX8M Mini NITROGEN SoM based boards The NITROGEN SoM based boards have compatible string in the form: "vendor,custom-board", "boundary,som", "fsl,soc" Split the binding entry so this triplet can be matched on. Acked-by: Krzysztof Kozlowski Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit d0a6eb38801d8d9bfd31aff65ef4d5ae14b3dee4 Author: Marek Vasut Date: Thu Jan 5 15:01:32 2023 +0100 dt-bindings: arm: Move MX8Menlo board to i.MX8M Mini Toradex Verdin SoM entry The MX8Menlo board is based on i.MX8M Mini Toradex Verdin SoM which results in compatible string in the form: "vendor,custom-board", "toradex,som-nonwifi", "toradex,som", "fsl,soc" Move the binding entry so this quadruplet can be matched on. Acked-by: Krzysztof Kozlowski Acked-by: Rob Herring Reviewed-by: Francesco Dolcini Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit 1fb40763a58c1f8130c0131c624060c6bbb929b8 Author: Colin Ian King Date: Thu Jan 5 13:49:25 2023 +0000 udf: remove redundant variable netype The variable netype is assigned a value that is never read, the assignment is redundant the variable can be removed. Message-Id: <20230105134925.45599-1-colin.i.king@gmail.com> Signed-off-by: Colin Ian King Signed-off-by: Jan Kara commit 85a37983ec69cc9fcd188bc37c4de15ee326355a Author: Jan Kara Date: Tue Jan 3 10:03:35 2023 +0100 udf: Detect system inodes linked into directory hierarchy When UDF filesystem is corrupted, hidden system inodes can be linked into directory hierarchy which is an avenue for further serious corruption of the filesystem and kernel confusion as noticed by syzbot fuzzed images. Refuse to access system inodes linked into directory hierarchy and vice versa. CC: stable@vger.kernel.org Reported-by: syzbot+38695a20b8addcbc1084@syzkaller.appspotmail.com Signed-off-by: Jan Kara commit fc8033a34a3ca7d23353e645e6dde5d364ac5f12 Author: Jan Kara Date: Tue Jan 3 09:56:56 2023 +0100 udf: Preserve link count of system files System files in UDF filesystem have link count 0. To not confuse VFS we fudge the link count to be 1 when reading such inodes however we forget to restore the link count of 0 when writing such inodes. Fix that. CC: stable@vger.kernel.org Signed-off-by: Jan Kara commit 256fe4162f8b5a1625b8603ca5f7ff79725bfb47 Author: Jan Kara Date: Mon Jan 2 20:14:47 2023 +0100 udf: Do not update file length for failed writes to inline files When write to inline file fails (or happens only partly), we still updated length of inline data as if the whole write succeeded. Fix the update of length of inline data to happen only if the write succeeds. Reported-by: syzbot+0937935b993956ba28ab@syzkaller.appspotmail.com CC: stable@vger.kernel.org Signed-off-by: Jan Kara commit 02113feaf62c190b4216ea0a1a2b8d9ccdbcdf6f Author: Colin Ian King Date: Fri Dec 30 23:14:52 2022 +0000 udf: Fix spelling mistake "lenght" -> "length" There is a spelling mistake in a udf_err message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Jan Kara Message-Id: <20221230231452.5821-1-colin.i.king@gmail.com> commit 96b87cbdeb50e47c25eae1e8b209857e6acf34ea Author: Fabio M. De Francesco Date: Sat Dec 31 18:42:05 2022 +0100 fs/ext2: Replace kmap_atomic() with kmap_local_page() kmap_atomic() is deprecated in favor of kmap_local_page(). Therefore, replace kmap_atomic() with kmap_local_page(). kmap_atomic() is implemented like a kmap_local_page() which also disables page-faults and preemption (the latter only for !PREEMPT_RT kernels). However, the code within the mapping and un-mapping in ext2_make_empty() does not depend on the above-mentioned side effects. Therefore, a mere replacement of the old API with the new one is all it is required (i.e., there is no need to explicitly add any calls to pagefault_disable() and/or preempt_disable()). Suggested-by: Ira Weiny Reviewed-by: Ira Weiny Signed-off-by: Fabio M. De Francesco Signed-off-by: Jan Kara Message-Id: <20221231174205.8492-1-fmdefrancesco@gmail.com> commit b316c443b4e85f67e34807e11ca90049d6f6a098 Author: Jan Kara Date: Wed Dec 21 17:53:28 2022 +0100 udf: Keep i_lenExtents consistent with the total length of extents When rounding the last extent to blocksize in inode_getblk() we forgot to update also i_lenExtents to match the new extent length. This inconsistency can later confuse some assertion checks. Signed-off-by: Jan Kara commit e57191a8d40086537d505241a8ee49d8b62ce1d6 Author: Jan Kara Date: Wed Dec 21 12:18:23 2022 +0100 udf: Move setting of i_lenExtents into udf_do_extend_file() When expanding file for a write into a hole, we were not updating total length of inode's extents properly. Move the update of i_lenExtents into udf_do_extend_file() so that both expanding of file by truncate and expanding of file by writing beyond EOF properly update the length of extents. As a bonus, we also correctly update the length of extents when only part of extents can be written. Signed-off-by: Jan Kara commit 0aba4860b0d0216a1a300484ff536171894d49d8 Author: Jan Kara Date: Tue Dec 20 12:38:45 2022 +0100 udf: Allocate name buffer in directory iterator on heap Currently we allocate name buffer in directory iterators (struct udf_fileident_iter) on stack. These structures are relatively large (some 360 bytes on 64-bit architectures). For udf_rename() which needs to keep three of these structures in parallel the stack usage becomes rather heavy - 1536 bytes in total. Allocate the name buffer in the iterator from heap to avoid excessive stack usage. Link: https://lore.kernel.org/all/202212200558.lK9x1KW0-lkp@intel.com Reported-by: kernel test robot Signed-off-by: Jan Kara commit 19fd80de0a8b5170ef34704c8984cca920dffa59 Author: Jan Kara Date: Mon Dec 19 20:10:35 2022 +0100 udf: Handle error when adding extent to a file When adding extent to a file fails, so far we've silently squelshed the error. Make sure to propagate it up properly. Signed-off-by: Jan Kara commit 2b10074d91e053d867148d66ba99552f576b3dd1 Author: Jan Kara Date: Mon Dec 19 19:54:12 2022 +0100 udf: Handle error when adding extent to symlink When adding extent describing symlink data fails, make sure to handle the error properly, propagate it up and free the already allocated block. Signed-off-by: Jan Kara commit 33e9a53cd9f099b138578f8e1a3d60775ff8cbba Author: Jan Kara Date: Mon Dec 19 19:50:14 2022 +0100 udf: Handle error when expanding directory When there is an error when adding extent to the directory to expand it, make sure to propagate the error up properly. This is not expected to happen currently but let's make the code more futureproof. Signed-off-by: Jan Kara commit 53cafe1d6d8ef9f93318e5bfccc0d24f27d41ced Author: Jan Kara Date: Fri Dec 16 12:37:51 2022 +0100 udf: Do not bother merging very long extents When merging very long extents we try to push as much length as possible to the first extent. However this is unnecessarily complicated and not really worth the trouble. Furthermore there was a bug in the logic resulting in corrupting extents in the file as syzbot reproducer shows. So just don't bother with the merging of extents that are too long together. CC: stable@vger.kernel.org Reported-by: syzbot+60f291a24acecb3c2bd5@syzkaller.appspotmail.com Signed-off-by: Jan Kara commit 70bfb3a8d661d4fdc742afc061b88a7f3fc9f500 Author: Jan Kara Date: Thu Dec 15 14:24:03 2022 +0100 udf: Truncate added extents on failed expansion When a file expansion failed because we didn't have enough space for indirect extents make sure we truncate extents created so far so that we don't leave extents beyond EOF. CC: stable@vger.kernel.org Signed-off-by: Jan Kara commit 1e0290d61a870ed61a6510863029939bbf6b0006 Author: Jan Kara Date: Thu Oct 6 16:44:53 2022 +0200 udf: Remove old directory iteration code Remove old directory iteration code that is now unused. Signed-off-by: Jan Kara commit e9109a92d2a95889498bed3719cd2318892171a2 Author: Jan Kara Date: Thu Oct 6 16:41:23 2022 +0200 udf: Convert udf_rename() to new directory iteration code Convert udf_rename() to use new directory iteration code. Reported-by: syzbot+0eaad3590d65102b9391@syzkaller.appspotmail.com Reported-by: syzbot+b7fc73213bc2361ab650@syzkaller.appspotmail.com Signed-off-by: Jan Kara commit dbfb102d16fb780c84f41adbaeb7eac907c415dc Author: Jan Kara Date: Thu Oct 6 14:59:11 2022 +0200 udf: Convert udf_link() to new directory iteration code Convert udf_link() to use new directory iteration code for adding entry into the directory. Signed-off-by: Jan Kara commit 00bce6f792caccefa73daeaf9bde82d24d50037f Author: Jan Kara Date: Thu Oct 6 14:22:33 2022 +0200 udf: Convert udf_mkdir() to new directory iteration code Convert udf_mkdir() to new directory iteration code. Signed-off-by: Jan Kara commit ef91f9998bece00cf7f82ad26177f910a7124b25 Author: Jan Kara Date: Thu Oct 6 14:08:59 2022 +0200 udf: Convert udf_add_nondir() to new directory iteration Convert udf_add_nondir() to new directory iteration code. Signed-off-by: Jan Kara commit f2844803404d9729f893e279ddea12678710e7fb Author: Jan Kara Date: Thu Oct 6 13:25:16 2022 +0200 udf: Implement adding of dir entries using new iteration code Implement function udf_fiiter_add_entry() adding new directory entries using new directory iteration code. Signed-off-by: Jan Kara commit 6ec01a8020b54e278fecd1efe8603f8eb38fed84 Author: Jan Kara Date: Wed Oct 5 19:36:49 2022 +0200 udf: Convert udf_unlink() to new directory iteration code Convert udf_unlink() to new directory iteration code. Signed-off-by: Jan Kara commit d11ffa8d3ec11fdb665f12f95d58d74673051a93 Author: Jan Kara Date: Wed Oct 5 19:33:23 2022 +0200 udf: Convert udf_rmdir() to new directory iteration code Convert udf_rmdir() to use new directory iteration code. Signed-off-by: Jan Kara commit 4cca7e3df7bea8661a0c2a70c0d250e9aa5cedb4 Author: Jan Kara Date: Wed Oct 5 19:26:59 2022 +0200 udf: Provide function to mark entry as deleted using new directory iteration code Provide function udf_fiiter_delete_entry() to mark directory entry as deleted using new directory iteration code. Signed-off-by: Jan Kara commit afb525f466f9fdc140b975221cb43fbb5c59314e Author: Jan Kara Date: Wed Oct 5 19:10:02 2022 +0200 udf: Convert empty_dir() to new directory iteration code Convert empty_dir() to new directory iteration code. Signed-off-by: Jan Kara commit 9b06fbef4202363d74bba5459ddd231db6d3b1af Author: Jan Kara Date: Wed Oct 5 18:48:45 2022 +0200 udf: Convert udf_get_parent() to new directory iteration code Convert udf_get_parent() to use udf_fiiter_find_entry(). Signed-off-by: Jan Kara commit 200918b34d158cdaee531db7e0c80b92c57e66f1 Author: Jan Kara Date: Wed Oct 5 18:36:21 2022 +0200 udf: Convert udf_lookup() to use new directory iteration code Convert udf_lookup() to use udf_fiiter_find_entry() for looking up directory entries. Signed-off-by: Jan Kara commit 1c80afa04db39c98aebea9aabfafa37a208cdfee Author: Jan Kara Date: Wed Oct 5 18:28:33 2022 +0200 udf: Implement searching for directory entry using new iteration code Implement searching for directory entry - udf_fiiter_find_entry() - using new directory iteration code. Reported-by: syzbot+69c9fdccc6dd08961d34@syzkaller.appspotmail.com Signed-off-by: Jan Kara commit a27b2923de7efaa1da1e243fb80ff0fa432e4be0 Author: Jan Kara Date: Wed Oct 5 18:10:37 2022 +0200 udf: Move udf_expand_dir_adinicb() to its callsite There is just one caller of udf_expand_dir_adinicb(). Move the function to its caller into namei.c as it is more about directory handling than anything else anyway. Signed-off-by: Jan Kara commit 57bda9fb169d689bff4108265a897d324b5fb8c3 Author: Jan Kara Date: Wed Oct 5 17:59:12 2022 +0200 udf: Convert udf_expand_dir_adinicb() to new directory iteration Convert udf_expand_dir_adinicb() to new directory iteration code. Signed-off-by: Jan Kara commit 7cd7a36ab44d3e8c1dee7185ef407b9831a8220b Author: Jan Kara Date: Tue Oct 4 15:00:15 2022 +0200 udf: Convert udf_readdir() to new directory iteration Convert udf_readdir() to new directory iteration functions. Signed-off-by: Jan Kara commit d16076d9b684b7c8d3ccbe9c33d5ea9fe8fcca09 Author: Jan Kara Date: Mon Oct 3 23:33:22 2022 +0200 udf: New directory iteration code Add new support code for iterating directory entries. The code is also more carefully verifying validity of on-disk directory entries to avoid crashes on malicious media. Signed-off-by: Jan Kara commit 3d2d7e61553dbcc8ba45201d8ae4f383742c8202 Author: Jan Kara Date: Thu Sep 29 16:34:45 2022 +0200 udf: Define EFSCORRUPTED error code Similarly to other filesystems define EFSCORRUPTED error code for reporting internal filesystem corruption. Signed-off-by: Jan Kara commit fabdb1824c9d9cb3b8cc1f81d0e9bbb1a77327ed Author: Peng Fan Date: Wed Jan 4 18:57:54 2023 +0800 arm64: defconfig: select i.MX ICC and DEVFREQ i.MX ICC and DEVFREQ driver is required for i.MX8MP normal boot, because the BLK CTRL power domain driver requires QoS configuraton. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 991679f7f71eb8f5d53f8356e2c41af5bae7034f Author: Peng Fan Date: Wed Jan 4 08:25:45 2023 +0800 arm64: dts: imx8mp: use syscon for iomuxc-gpr It is preferred to use syscon per bindind doc Signed-off-by: Peng Fan Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit 240b8dd94bbdedeecb759d336cfa23726f6ae899 Author: Peng Fan Date: Wed Jan 4 08:25:44 2023 +0800 arm64: dts: imx8mn: update iomuxc-gpr node name It is better use syscon for IOMUXC GPR, since it contains various bits for system control Signed-off-by: Peng Fan Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit e43f400ddc2b4bc0a615fd5c33a2d75c38782448 Author: Peng Fan Date: Wed Jan 4 08:25:43 2023 +0800 arm64: dts: imx8mm: correct iomuxc-gpr compatible The IOMUX Controller General purpose register group are unique almost per SoC, i.MX8MM is not compatible with i.MX6Q. So correct it. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 6e918ad97eef75199ec9829c146163c8180bc646 Author: Peng Fan Date: Wed Jan 4 08:25:42 2023 +0800 arm64: dts: imx8mq: correct iomuxc-gpr compatible The IOMUX Controller General purpose register group are unique almost per SoC, i.MX8MQ is not compatible with i.MX6Q. So correct it. Also update name with syscon. Signed-off-by: Peng Fan Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit 2aecb8ee6e05e381f2b6197abd0fe0387741f9e6 Author: Peng Fan Date: Wed Jan 4 08:25:41 2023 +0800 dt-bindings: soc: imx: add IOMUXC GPR support Add binding doc for i.MX IOMUX Controller General Purpose Registers Signed-off-by: Peng Fan Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit 12c1604ae1a39bef87ac099f106594b4cb433b75 Author: Jakub Kicinski Date: Fri Jan 6 18:29:04 2023 -0800 net: skb: remove old comments about frag_size for build_skb() Since commit ce098da1497c ("skbuff: Introduce slab_build_skb()") drivers trying to build skb around slab-backed buffers should go via slab_build_skb() rather than passing frag_size = 0 to the main build_skb(). Remove the copy'n'pasted comments about 0 meaning slab. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 580c545fc91f2a6d4917eefa3dd8712de87690fe Author: Alexander Stein Date: Mon Jan 9 16:07:11 2023 +0800 arm64: dts: tqma8m*: Fix temperature sensor compatible Use the correct compatible 'nxp,se97b' as it is an SE97BTP chip. While at it, fix the node name according to device tree spec recommendations. The EEPROM is a separate node anyway. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 0bbca347f53451af7a2906343c92bce65d037ca4 Author: Alexander Stein Date: Tue Jan 3 08:43:18 2023 +0100 ARM: dts: tqma6ul + mba6ulx: Fix temperature sensor compatible Use the correct compatible 'nxp,se97b' as it is an SE97BTP chip. While at it, fix the node name according to device tree spec recommendations. The EEPROM is a separate node anyway. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 0b8576d8440aa275ae2758a60982b177e8c54ec1 Author: Dmitry Baryshkov Date: Mon Jan 2 02:44:25 2023 +0200 ARM: dts: imx: Add support for SK-iMX53 board Add support for the StartKit sk-imx53 board, a simple development board with the iMX536A SoC. Tested and works: - UARTs - SPI - I2C - GPU - USB - uSD - NAND - Ethernet Not tested: - Display - VPU - capture Not yet working: - Sound Signed-off-by: Dmitry Baryshkov Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit e2d780aa362f0515547479371c7aef334ecebd75 Author: Dmitry Baryshkov Date: Mon Jan 2 02:44:24 2023 +0200 dt-bindings: arm: fsl: Add the Starterkit SK-iMX53 board Add an entry for the Starterkit SK-iMX53 development board. Signed-off-by: Dmitry Baryshkov Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 50e2a2f4f2fd5f06f614fad315bb11826e571f31 Author: Dmitry Baryshkov Date: Mon Jan 2 02:44:23 2023 +0200 dt-bindings: vendor-prefixes: add Startkit Starterkit is small vendor of development boards and SoM based on Atmel, i.MX and Allwinner SoCs. http://starterkit.ru/html/index.php Signed-off-by: Dmitry Baryshkov Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 0fd43d0cd030ea850796d4a4767452dbcf3bae17 Merge: 762405e3ce45e 69649ef840532 Author: David S. Miller Date: Mon Jan 9 07:39:53 2023 +0000 Merge branch 'r8152-NCM-firmwares' Bjørn Mork says: ==================== r8152: allow firmwares with NCM support Some device and firmware combinations with NCM support will end up using the cdc_ncm driver by default. This is sub- optimal for the same reasons we've previously accepted the blacklist hack in cdc_ether. The recent support for subclassing the generic USB device driver allows us to create a very slim driver with the same functionality. This patch set uses that to implement a device specific configuration default which is independent of any USB interface drivers. This means that it works equally whether the device initially ends up in NCM or ECM mode, without depending on any code in the respective class drivers. ==================== Signed-off-by: David S. Miller commit 69649ef8405320f81497f4757faac8234f61b167 Author: Bjørn Mork Date: Fri Jan 6 17:07:39 2023 +0100 cdc_ether: no need to blacklist any r8152 devices The r8152 driver does not need this anymore. Dropping blacklist entries adds optional support for these devices in ECM mode. The 8153 devices are handled by the r8153_ecm driver when in ECM mode, and must still be blacklisted here. Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller commit ec51fbd1b8a2bca2948dede99c14ec63dc57ff6b Author: Bjørn Mork Date: Fri Jan 6 17:07:38 2023 +0100 r8152: add USB device driver for config selection Subclassing the generic USB device driver to override the default configuration selection regardless of matching interface drivers. The r815x family devices expose a vendor specific function which the r8152 interface driver wants to handle. This is the preferred device mode. Additionally one or more USB class functions are usually supported for hosts lacking a vendor specific driver. The choice is USB configuration based, with one alternate function per configuration. Example device with both NCM and ECM alternate cfgs: T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 4 Spd=5000 MxCh= 0 D: Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs= 3 P: Vendor=0bda ProdID=8156 Rev=31.00 S: Manufacturer=Realtek S: Product=USB 10/100/1G/2.5G LAN S: SerialNumber=001000001 C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=256mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=00 Driver=r8152 E: Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=83(I) Atr=03(Int.) MxPS= 2 Ivl=128ms C: #Ifs= 2 Cfg#= 2 Atr=a0 MxPwr=256mA I: If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver= E: Ad=83(I) Atr=03(Int.) MxPS= 16 Ivl=128ms I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver= I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver= E: Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms C: #Ifs= 2 Cfg#= 3 Atr=a0 MxPwr=256mA I: If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver= E: Ad=83(I) Atr=03(Int.) MxPS= 16 Ivl=128ms I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver= I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver= E: Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms A problem with this is that Linux will prefer class functions over vendor specific functions. Using the above example, Linux defaults to cfg #2, running the device in a sub-optimal NCM mode. Previously we've attempted to work around the problem by blacklisting the devices in the ECM class driver "cdc_ether", and matching on the ECM class function in the vendor specific interface driver. The latter has been used to switch back to the vendor specific configuration when the driver is probed for a class function. This workaround has several issues; - class driver blacklists is additional maintanence cruft in an unrelated driver - class driver blacklists prevents users from optionally running the devices in class mode - each device needs double match entries in the vendor driver - the initial probing as a class function slows down device discovery Now these issues have become even worse with the introduction of firmware supporting both NCM and ECM, where NCM ends up as the default mode in Linux. To use the same workaround, we now have to blacklist the devices in to two different class drivers and add yet another match entry to the vendor specific driver. This patch implements an alternative workaround strategy - independent of the interface drivers. It avoids adding a blacklist to the cdc_ncm driver and will let us remove the existing blacklist from the cdc_ether driver. As an additional bonus, removing the blacklists allow users to select one of the other device modes if wanted. Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller commit 762405e3ce45ed42b711f6d7677d0f797231571c Merge: fb59bf28cd638 e04a30f788091 Author: David S. Miller Date: Mon Jan 9 07:30:50 2023 +0000 Merge branch 'mptcp-next' Mat Martineau says: ==================== mptcp: Protocol in-use tracking and code cleanup Here's a collection of commits from the MPTCP tree: Patches 1-4 and 6 contain miscellaneous code cleanup for more consistent use of helper functions, existing local variables, and better naming. Patches 5, 7, and 9 add sock_prot_inuse tracking for MPTCP and an associated self test. Patch 8 modifies the mptcp_connect self test tool to exit on SIGUSR1 when in "slow mode". ==================== Signed-off-by: David S. Miller commit e04a30f788091076ff874ede84d33817d50d5937 Author: Menglong Dong Date: Fri Jan 6 10:57:25 2023 -0800 selftest: mptcp: add test for mptcp socket in use Add the function chk_msk_inuse() to diag.sh, which is used to check the statistics of mptcp socket in use. As mptcp socket in listen state will be closed randomly after 'accept', we need to get the count of listening mptcp socket through 'ss' command. All tests pass. Acked-by: Paolo Abeni Signed-off-by: Menglong Dong Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 4a753ca5013d465694d6639fbe1378831a399bda Author: Menglong Dong Date: Fri Jan 6 10:57:24 2023 -0800 selftest: mptcp: exit from copyfd_io_poll() when receive SIGUSR1 For now, mptcp_connect won't exit after receiving the 'SIGUSR1' signal if '-r' is set. Fix this by skipping poll and sleep in copyfd_io_poll() if 'quit' is set. Acked-by: Paolo Abeni Signed-off-by: Menglong Dong Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit c558246ee73e6f623ca503fb1fda626f313393a6 Author: Menglong Dong Date: Fri Jan 6 10:57:23 2023 -0800 mptcp: add statistics for mptcp socket in use Do the statistics of mptcp socket in use with sock_prot_inuse_add(). Therefore, we can get the count of used mptcp socket from /proc/net/protocols: & cat /proc/net/protocols protocol size sockets memory press maxhdr slab module cl co di ac io in de sh ss gs se re sp bi br ha uh gp em MPTCPv6 2048 0 0 no 0 yes kernel y n y y y y y y y y y y n n n y y y n MPTCP 1896 1 0 no 0 yes kernel y n y y y y y y y y y y n n n y y y n Acked-by: Paolo Abeni Signed-off-by: Menglong Dong Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 294de9090938a7959e2757573509abd9ea7bd254 Author: Menglong Dong Date: Fri Jan 6 10:57:22 2023 -0800 mptcp: rename 'sk' to 'ssk' in mptcp_token_new_connect() 'ssk' should be more appropriate to be the name of the first argument in mptcp_token_new_connect(). Acked-by: Paolo Abeni Signed-off-by: Menglong Dong Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit ade4d754620f6d605705bf337aedef115158697e Author: Menglong Dong Date: Fri Jan 6 10:57:21 2023 -0800 mptcp: init sk->sk_prot in build_msk() The 'sk_prot' field in token KUNIT self-tests will be dereferenced in mptcp_token_new_connect(). Therefore, init it with tcp_prot. Acked-by: Paolo Abeni Signed-off-by: Menglong Dong Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit cfdcfeed6449d702825d249cb85346ecf56236fc Author: Menglong Dong Date: Fri Jan 6 10:57:20 2023 -0800 mptcp: introduce 'sk' to replace 'sock->sk' in mptcp_listen() 'sock->sk' is used frequently in mptcp_listen(). Therefore, we can introduce the 'sk' and replace 'sock->sk' with it. Acked-by: Paolo Abeni Signed-off-by: Menglong Dong Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 3c976f4c99237bcdab918ad18e7bee3b77e6d316 Author: Geliang Tang Date: Fri Jan 6 10:57:19 2023 -0800 mptcp: use local variable ssk in write_options The local variable 'ssk' has been defined at the beginning of the function mptcp_write_options(), use it instead of getting 'ssk' again. Reviewed-by: Mat Martineau Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit a963853fd465e6ede985e71a320bc8a0ae7f878f Author: Geliang Tang Date: Fri Jan 6 10:57:18 2023 -0800 mptcp: use net instead of sock_net Use the local variable 'net' instead of sock_net() in the functions where the variable 'struct net *net' has been defined. Reviewed-by: Mat Martineau Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 109cdeb8dfa3ab18afc7509a5044e48bd9fc89f7 Author: Geliang Tang Date: Fri Jan 6 10:57:17 2023 -0800 mptcp: use msk_owned_by_me helper The helper msk_owned_by_me() is defined in protocol.h, so use it instead of sock_owned_by_me(). Reviewed-by: Mat Martineau Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit fb59bf28cd638a0b8671bf90b6692fea4898d207 Author: Leesoo Ahn Date: Fri Jan 6 19:49:49 2023 +0900 usbnet: optimize usbnet_bh() to reduce CPU load The current source pushes skb into dev-done queue by calling skb_dequeue_tail() and then pop it by skb_dequeue() to branch to rx_cleanup state for freeing urb/skb in usbnet_bh(). It takes extra CPU load, 2.21% (skb_queue_tail) as follows, - 11.58% 0.26% swapper [k] usbnet_bh - 11.32% usbnet_bh - 6.43% skb_dequeue 6.34% _raw_spin_unlock_irqrestore - 2.21% skb_queue_tail 2.19% _raw_spin_unlock_irqrestore - 1.68% consume_skb - 0.97% kfree_skbmem 0.80% kmem_cache_free 0.53% skb_release_data To reduce the extra CPU load use return values to call helper function usb_free_skb() to free the resources instead of calling skb_queue_tail() and skb_dequeue() for push and pop respectively. - 7.87% 0.25% swapper [k] usbnet_bh - 7.62% usbnet_bh - 4.81% skb_dequeue 4.74% _raw_spin_unlock_irqrestore - 1.75% consume_skb - 0.98% kfree_skbmem 0.78% kmem_cache_free 0.58% skb_release_data 0.53% smsc95xx_rx_fixup Signed-off-by: Leesoo Ahn Signed-off-by: David S. Miller commit 9cb8bae3d17b517abba74c13dd0327653b9142a4 Merge: f23395b4049c8 3f88d7d1be42a Author: David S. Miller Date: Mon Jan 9 07:21:42 2023 +0000 Merge branch 'phy-micrel-warnings' Divya Koppera says: ==================== Fixed warnings Fixed warnings related to PTR_ERR and initialization. ==================== Signed-off-by: David S. Miller commit 3f88d7d1be42a84a4ae292f085c3886597a04137 Author: Divya Koppera Date: Fri Jan 6 13:59:05 2023 +0530 net: phy: micrel: Fix warn: passing zero to PTR_ERR Handle the NULL pointer case Fixes New smatch warnings: drivers/net/phy/micrel.c:2613 lan8814_ptp_probe_once() warn: passing zero to 'PTR_ERR' vim +/PTR_ERR +2613 drivers/net/phy/micrel.c Reported-by: kernel test robot Reported-by: Dan Carpenter Reviewed-by: Alexander Duyck Signed-off-by: Divya Koppera Signed-off-by: David S. Miller commit d50ede4f53e19b63f785768ce62f9a5019c3a021 Author: Divya Koppera Date: Fri Jan 6 13:59:04 2023 +0530 net: phy: micrel: Fixed error related to uninitialized symbol ret Initialized return variable Fixes Old smatch warnings: drivers/net/phy/micrel.c:1750 ksz886x_cable_test_get_status() error: uninitialized symbol 'ret'. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Divya Koppera Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit c2fb9a214da1efc3f8968daa795a1bbbf50cbfc8 Merge: 5220cb493bf41 b7bfaa761d760 Author: Greg Kroah-Hartman Date: Mon Jan 9 07:47:32 2023 +0100 Merge 6.2-rc3 into usb-next We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit e96c08e91726cda188d030fa8d442091a5a6c3ab Author: Dmitry Baryshkov Date: Sat Jun 18 02:33:27 2022 +0300 drm/msm/mdp5: convert to drm_crtc_handle_vblank() Stop using deprecated drm_handle_vblank(), use drm_crtc_handle_vblank() instead. Reviewed-by: Abhinav Kumar Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/490108/ Link: https://lore.kernel.org/r/20220617233328.1143665-4-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 6606a96ab1ce9bfddce105845b18c9584c9f69e8 Author: Dmitry Baryshkov Date: Sat Jun 18 02:33:26 2022 +0300 drm/msm/mdp4: convert to drm_crtc_handle_vblank() Stop using deprecated drm_handle_vblank(), use drm_crtc_handle_vblank() instead. Reviewed-by: Abhinav Kumar Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/490110/ Link: https://lore.kernel.org/r/20220617233328.1143665-3-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 4397a17c1dc53f436285f372432dd1aea44e7953 Author: Keith Busch Date: Thu Jan 5 11:07:33 2023 -0800 iov_iter: move iter_ubuf check inside restore WARN io_uring is using iter_ubuf types for single vector requests. We expect state restore may happen for this type now, and it is already handled correctly, so suppress the warning. Signed-off-by: Keith Busch Signed-off-by: Jens Axboe Reviewed-by: Christoph Hellwig commit 1e23db450cff5f0410480137041181d1514bda2a Author: Jens Axboe Date: Thu Jan 5 11:07:32 2023 -0800 io_uring: use iter_ubuf for single range imports This is more efficient than iter_iov. Signed-off-by: Jens Axboe [merge to 6.2, minor fixes] Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig commit 4b61152e107a95bc0a73d84072dbd75cb97689e3 Author: Jens Axboe Date: Thu Jan 5 11:07:31 2023 -0800 io_uring: switch network send/recv to ITER_UBUF This is more efficient than iter_iov. Signed-off-by: Jens Axboe [merged to 6.2] Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig commit 2ad9bd8332ac1bc072cc7d785e7cb09d6ad36f4c Author: Jens Axboe Date: Thu Jan 5 11:07:30 2023 -0800 iov: add import_ubuf() Like import_single_range(), but for ITER_UBUF. Signed-off-by: Jens Axboe Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig commit 0e7f270591a42f6c674d2410ac30e086ea0bf54d Author: Kuogee Hsieh Date: Tue Dec 27 09:45:03 2022 -0800 drm/msm/dp: add support of max dp link rate By default, HBR2 (5.4G) is the max link rate be supported. This patch uses the actual limit specified by DT and removes the artificial limitation to 5.4 Gbps. Supporting HBR3 is a consequence of that. Changes in v2: -- add max link rate from dtsi Changes in v3: -- parser max_data_lanes and max_dp_link_rate from dp_out endpoint Changes in v4: -- delete unnecessary pr_err Changes in v5: -- split parser function into different patch Changes in v9: -- revised commit test Changes in v13: -- repalced "properity" with "property" Signed-off-by: Kuogee Hsieh Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/516097/ Link: https://lore.kernel.org/r/1672163103-31254-6-git-send-email-quic_khsieh@quicinc.com Signed-off-by: Dmitry Baryshkov commit 381518a1677c49742a85f51e8f0e89f4b9b7d297 Author: Kuogee Hsieh Date: Tue Dec 27 09:45:02 2022 -0800 drm/msm/dp: Add capability to parser and retrieve max DP link supported rate from link-frequencies property of dp_out endpoint Changes in v6: -- second patch after split parser patch into two patches Changes in v7: -- without checking cnt against DP_MAX_NUM_DP_LANES to retrieve link rate Changes in v9: -- separate parser link-frequencies out of data-lanes Changes in v10: -- add dp_parser_link_frequencies() Changes in v11: -- return 0 if(!endpoint) Changes in v12: -- replace khz with kbytes at dp_parser.h Changes in v14: -- replace "parser" with "parse" at commit subject -- use do_div() for 64 bits division Signed-off-by: Kuogee Hsieh Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/516100/ Link: https://lore.kernel.org/r/1672163103-31254-5-git-send-email-quic_khsieh@quicinc.com Signed-off-by: Dmitry Baryshkov commit d25cfeeec06482f2487d612f36890b57ef1aad3c Author: Kuogee Hsieh Date: Tue Dec 27 09:45:01 2022 -0800 drm/msm/dp: parse data-lanes as property of dp_out endpoint Add capability to parser data-lanes as property of dp_out endpoint. Also retain the original capability to parser data-lanes as property of mdss_dp node to handle legacy case. Changes in v6: -- first patch after split parser patch into two Changes in v7: -- check "data-lanes" from endpoint first Changes in v14: -- replace "parser" with "parse" at commit subject -- add matching brackets at dp_parser_misc() Changes in v15: -- concise dp_parser_misc() Signed-off-by: Kuogee Hsieh Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/516096/ Link: https://lore.kernel.org/r/1672163103-31254-4-git-send-email-quic_khsieh@quicinc.com Signed-off-by: Dmitry Baryshkov commit 123f125550741ca69fda8a3a1baa2230fc596616 Author: Kuogee Hsieh Date: Tue Dec 27 09:45:00 2022 -0800 dt-bindings: msm/dp: add data-lanes and link-frequencies property To increase the flexibility of supporting different DP main link configuration at different platform, add both data-lanes and link-frequencies property into endpoint so that different platform can specify its own main link combination of both data lanes and max supported link rate. Changes in v7: -- split yaml out of dtsi patch -- link-frequencies from link rate to symbol rate -- deprecation of old data-lanes property Changes in v8: -- correct Bjorn mail address to kernel.org Changes in v10: -- add menu item to data-lanes and link-frequecnis Changes in v11: -- add endpoint property at port@1 Changes in v12: -- use enum for item at data-lanes and link-frequencies Changes in v13: -- revised changes at port@0 -- use correct ref schemas for both port@0 and port@1 -- mark both port@0 and port@1 are required -- add line between data-lanes and link-frequencies properties Changes in v14: -- add "unevaluatedProperties: false: to endpoint at port@1 -- remove unnecessary quote to $ref -- re store "$ref: /schemas/graph.yaml#/properties/port" to port@0 Changes in v15: -- re store desciption of port@0 Signed-off-by: Kuogee Hsieh Reviewed-by: Rob Herring Patchwork: https://patchwork.freedesktop.org/patch/516094/ Link: https://lore.kernel.org/r/1672163103-31254-3-git-send-email-quic_khsieh@quicinc.com Signed-off-by: Dmitry Baryshkov commit 542b37efc20e64854df87819eeed2c45c5c83e29 Author: Bjorn Andersson Date: Wed Dec 7 14:00:09 2022 -0800 drm/msm/dp: Implement hpd_notify() The DisplayPort controller's hot-plug mechanism is based on pinmuxing a physical signal on a GPIO pin into the controller. This is not always possible, either because there aren't dedicated GPIOs available or because the hot-plug signal is a virtual notification, in cases such as USB Type-C. For these cases, by implementing the hpd_notify() callback for the DisplayPort controller's drm_bridge, a downstream drm_bridge (next_bridge) can be used to track and signal the connection status changes. This makes it possible to use downstream drm_bridges such as display-connector or any virtual mechanism, as long as they are implemented as a drm_bridge. Signed-off-by: Bjorn Andersson [bjorn: Drop connector->fwnode assignment and dev from struct msm_dp] Signed-off-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov Reviewed-by: Kuogee Hsieh Patchwork: https://patchwork.freedesktop.org/patch/514410/ Link: https://lore.kernel.org/r/20221207220012.16529-10-quic_bjorande@quicinc.com Signed-off-by: Dmitry Baryshkov commit cd198caddea72880693b965ac3c30eb1d4982541 Author: Bjorn Andersson Date: Wed Dec 7 14:00:08 2022 -0800 drm/msm/dp: Rely on hpd_enable/disable callbacks The DisplayPort controller's internal HPD interrupt handling is used for cases where the HPD signal is connected to a GPIO which is pinmuxed into the DisplayPort controller. In other configurations the HPD notification might be delivered by the DRM framework from an associated bridge. This difference is not appropriately represented by the "is_edp" boolean, but is properly represented by the frameworks invocation of the hpd_enable() and hpd_disable() callbacks. Switch the current condition to rely on these callbacks instead. This ensures appropriate handling of the three cases; no bridge connected, a bridge without DRM_BRIDGE_OP_HPD and a bridge with DRM_BRIDGE_OP_HPD. Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov Reviewed-by: Kuogee Hsieh Patchwork: https://patchwork.freedesktop.org/patch/514414/ Link: https://lore.kernel.org/r/20221207220012.16529-9-quic_bjorande@quicinc.com Signed-off-by: Dmitry Baryshkov commit fa33f2aa96742854d3b4e313532f67889c064cc7 Author: Bjorn Andersson Date: Wed Dec 7 14:00:07 2022 -0800 drm/msm/dp: Add SDM845 DisplayPort instance The Qualcomm SDM845 platform has a single DisplayPort controller, with the same design as SC7180, so add support for this by reusing the SC7180 definition. Signed-off-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Reviewed-by: Kuogee Hsieh Patchwork: https://patchwork.freedesktop.org/patch/514395/ Link: https://lore.kernel.org/r/20221207220012.16529-8-quic_bjorande@quicinc.com Signed-off-by: Dmitry Baryshkov commit 5bd69fd16198851928886d6e0045c009c98462d7 Author: Bjorn Andersson Date: Wed Dec 7 14:00:06 2022 -0800 drm/msm/dp: Add DP and EDP compatibles for SC8280XP The SC8280XP platform has four DisplayPort controllers, per MDSS instance, all with widebus support. The first two are defined to be DisplayPort only, while the latter pair (of each instance) can be either DisplayPort or Embedded DisplayPort. The two sets are tied to the possible compatibels. Signed-off-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Reviewed-by: Kuogee Hsieh Patchwork: https://patchwork.freedesktop.org/patch/514394/ Link: https://lore.kernel.org/r/20221207220012.16529-7-quic_bjorande@quicinc.com Signed-off-by: Dmitry Baryshkov commit 3db50cb6db7771f4dfa14fb5ef76841627fd9e58 Author: Rob Herring Date: Fri Dec 9 11:16:57 2022 -0600 dt-bindings: i2c: Convert Synquacer I2C to DT schema Convert the Socionext Synquacer I2C binding to DT schema format. Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221209171658.3352119-1-robh@kernel.org Signed-off-by: Rob Herring commit 5314187a603b4e1a1b26e4c2d1677914e22d9d22 Author: Rob Herring Date: Fri Dec 9 11:16:36 2022 -0600 dt-bindings: interrupt-controller: Convert Synquacer EXIU to DT schema Convert the Socionext Synquacer EXIU interrupt controller to DT schema format. Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221209171636.3351602-1-robh@kernel.org Signed-off-by: Rob Herring commit 1a1bd3f450000828ba7845c54ea95b43badad50f Author: Dmitry Baryshkov Date: Wed Dec 7 03:22:25 2022 +0200 drm/msm/dsi/phy: rework register setting for 7nm PHY In preparation to adding the sm8350 and sm8450 PHYs support, rearrange register values calculations in dsi_7nm_phy_enable(). This change bears no functional changes itself, it is merely a preparation for the next patch. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/514232/ Link: https://lore.kernel.org/r/20221207012231.112059-6-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 44a9f577a087ee38a5291c1e5442613297a51a26 Author: Dmitry Baryshkov Date: Wed Dec 7 03:22:23 2022 +0200 dt-bindings: display/msm: add sm8350 and sm8450 DSI PHYs SM8350 and SM8450 platforms use the same driver and same bindings as the existing 7nm DSI PHYs. Add corresponding compatibility strings. Acked-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/514228/ Link: https://lore.kernel.org/r/20221207012231.112059-4-dmitry.baryshkov@linaro.org [DB: changed compatibles per Krzysztof's request] Signed-off-by: Dmitry Baryshkov commit afe4cb96153a0d8003e4e4ebd91b5c543e10df84 Author: Jiasheng Jiang Date: Fri Jan 6 10:30:11 2023 +0800 drm/msm/hdmi: Add missing check for alloc_ordered_workqueue Add check for the return value of alloc_ordered_workqueue as it may return NULL pointer and cause NULL pointer dereference in `hdmi_hdcp.c` and `hdmi_hpd.c`. Fixes: c6a57a50ad56 ("drm/msm/hdmi: add hdmi hdcp support (V3)") Signed-off-by: Jiasheng Jiang Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/517211/ Link: https://lore.kernel.org/r/20230106023011.3985-1-jiasheng@iscas.ac.cn Signed-off-by: Dmitry Baryshkov commit 5d417b40114687cc74fed03d6dca952eb84be878 Author: Bjorn Andersson Date: Wed Dec 7 14:00:05 2022 -0800 drm/msm/dp: Stop using DP id as index in desc In the SC8280XP platform there are two identical MDSS instances, each with the same set of DisplayPort instances, at different addresses. By not relying on the index to define the instance id it's possible to describe them both in the same table and hence have a single compatible. While at it, flatten the cfg/desc structure so that the match data is just an array of descs. Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Reviewed-by: Kuogee Hsieh Patchwork: https://patchwork.freedesktop.org/patch/514397/ Link: https://lore.kernel.org/r/20221207220012.16529-6-quic_bjorande@quicinc.com Signed-off-by: Dmitry Baryshkov commit b6f8c4debc0035a1a9096cf016bbd04c31dd78b0 Author: Bjorn Andersson Date: Wed Dec 7 14:00:04 2022 -0800 dt-bindings: msm/dp: Add SDM845 and SC8280XP compatibles Add compatibles for the DisplayPort and Embedded DisplayPort blocks in Qualcomm SDM845 and SC8280XP platforms. Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Acked-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/514408/ Link: https://lore.kernel.org/r/20221207220012.16529-5-quic_bjorande@quicinc.com Signed-off-by: Dmitry Baryshkov commit e6f2ffeaf58b23614cc818587aa3a4fc7c108a55 Author: Fabien Poussin Date: Sat Dec 31 17:14:29 2022 -0600 clk: sunxi-ng: d1: Add CAN bus gates and resets The D1 CCU contains gates and resets for two CAN buses. While the CAN bus controllers are only documented for the T113 SoC, the CCU is the same across all SoC variants. Signed-off-by: Fabien Poussin Reviewed-by: Andre Przywara Signed-off-by: Samuel Holland Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20221231231429.18357-7-samuel@sholland.org Signed-off-by: Jernej Skrabec commit 925b61ba2dafa9c13c9afa9b83a45d499cd73f2f Author: Samuel Holland Date: Sat Dec 31 17:14:28 2022 -0600 dt-bindings: clock: Add D1 CAN bus gates and resets The D1 CCU contains gates and resets for two CAN buses. While the CAN bus controllers are only documented for the T113 SoC, the CCU is the same across all SoC variants. Reviewed-by: Andre Przywara Signed-off-by: Samuel Holland Acked-by: Philipp Zabel Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221231231429.18357-6-samuel@sholland.org Signed-off-by: Jernej Skrabec commit 6ec1c73f1be7bfdcf4d95ed3ae199d139f199e87 Author: András Szemző Date: Sat Dec 31 17:14:27 2022 -0600 clk: sunxi-ng: d1: Mark cpux clock as critical Some SoCs in the D1 family feature ARM CPUs instead of a RISC-V CPU. In that case, the CPUs are driven from the 'cpux' clock, so it needs to be marked as critical, since there is no consumer when DVFS is disabled. This matches the drivers for other SoCs, and the "riscv" clock in this driver. Signed-off-by: András Szemző Acked-by: Jernej Skrabec Reviewed-by: Andre Przywara Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20221231231429.18357-5-samuel@sholland.org Signed-off-by: Jernej Skrabec commit f1404c72b693b9f04cc991481155628620b248b5 Author: Samuel Holland Date: Sat Dec 31 17:14:26 2022 -0600 clk: sunxi-ng: d1: Allow building for R528/T113 Allwinner released some 32-bit ARM (sun8i) SoCs which use the same CCU as D1. Allow them to reuse the driver. Acked-by: Jernej Skrabec Reviewed-by: Andre Przywara Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20221231231429.18357-4-samuel@sholland.org Signed-off-by: Jernej Skrabec commit 0ff347db4c97cc16b4e428dc1db550ba3628f1e2 Author: Samuel Holland Date: Sat Dec 31 17:14:25 2022 -0600 clk: sunxi-ng: Move SoC driver conditions to dependencies Do not duplicate the same expression on the `default` line, so the two lines do not need to be kept in sync. Drivers stay disabled under COMPILE_TEST because of the `default ARCH_SUNXI` applied to SUNXI_CCU. Three drivers had no conditions. - SUN6I_RTC_CCU and SUN8I_DE2_CCU are used on current hardware regardless of CPU architecture. - SUN8I_R_CCU is only used on pre-H6 SoCs, which means no RISCV SoCs. Acked-by: Jernej Skrabec Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20221231231429.18357-3-samuel@sholland.org Signed-off-by: Jernej Skrabec commit a26dc096f683ca27ac5e68703bfd3098b4212abd Author: Samuel Holland Date: Sat Dec 31 17:14:24 2022 -0600 clk: sunxi-ng: Remove duplicate ARCH_SUNXI dependencies SUNXI_CCU already depends on ARCH_SUNXI, so adding the dependency to individual SoC drivers is redundant. Drivers stay disabled under COMPILE_TEST because of the `default ARCH_SUNXI` applied to SUNXI_CCU. Acked-by: Jernej Skrabec Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20221231231429.18357-2-samuel@sholland.org Signed-off-by: Jernej Skrabec commit 657f477a89acb25ba34414ac84a51a32c5013d7b Author: Samuel Holland Date: Sat Dec 31 11:30:55 2022 -0600 clk: sunxi-ng: Avoid computing the rate twice The ccu_*_find_best() functions already compute a best_rate at the same time as the other factors. Return this value so the caller does not need to duplicate the computation. Signed-off-by: Samuel Holland Reviewed-by: Jernej Skrabec Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/20221231173055.42384-1-samuel@sholland.org Signed-off-by: Jernej Skrabec commit 5ee541ae712e74c842a324e946ef91cb19140cab Author: Samuel Holland Date: Wed Dec 28 22:22:30 2022 -0600 clk: sunxi-ng: h3/h5: Model H3 CLK_DRAM as a fixed clock The DRAM controller clock is only allowed to change frequency while the DRAM chips are in self-refresh. To support this, changes to the CLK_DRAM mux and divider have no effect until acknowledged by the memory dynamic frequency scaling (MDFS) hardware inside the DRAM controller. (There is a SDRCLK_UPD bit in DRAM_CFG_REG which should serve a similar purpose, but this bit actually does nothing.) However, the MDFS hardware in H3 appears to be broken. Triggering a frequency change using the procedure from similar SoCs (A64/H5) hangs the hardware. Additionally, the vendor BSP specifically avoids using the MDFS hardware on H3, instead performing all DRAM PHY parameter updates and resets in software. Thus, it is effectively impossible to change the CLK_DRAM mux/divider, so those features should not be modeled. Add CLK_SET_RATE_PARENT so frequency changes apply to PLL_DDR instead. Signed-off-by: Samuel Holland Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20221229042230.24532-1-samuel@sholland.org Signed-off-by: Jernej Skrabec commit 5dc6470273063418b5409154336a447e6d8fa880 Author: Randy Dunlap Date: Tue Nov 22 10:48:44 2022 -0800 clk: sunxi-ng: fix ccu_mmc_timing.c kernel-doc issues Use '-' to separate the function name and its description. Use '%' on constants in kernel-doc notation. Use the kernel-doc Return: format for function return values. Fixes this warning: ccu_mmc_timing.c:21: warning: No description found for return value of 'sunxi_ccu_set_mmc_timing_mode' Signed-off-by: Randy Dunlap Cc: Yang Li Cc: Chen-Yu Tsai Cc: Jernej Skrabec Cc: Samuel Holland Cc: linux-arm-kernel@lists.infradead.org Cc: linux-sunxi@lists.linux.dev Cc: Michael Turquette Cc: Stephen Boyd Cc: linux-clk@vger.kernel.org Acked-by: Jernej Skrabec Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20221122184844.6794-1-rdunlap@infradead.org Signed-off-by: Jernej Skrabec commit d45e5744ab3972c09995574d15ecfc42de53d651 Author: Marijn Suijten Date: Mon Nov 21 23:24:55 2022 +0100 drm/msm/dpu: Print interrupt index in addition to the mask The mask only describes the `irq_idx % 32` part, making it generally impossible to deduce what interrupt is being enabled/disabled. Since `debug/core_irq` in debugfs (and other prints) also include the full `DPU_IRQ_IDX()` value, print the same full value here for easier correlation instead of only adding the `irq_idx / 32` part. Furthermore, make the dbgstr messages more consistent. Signed-off-by: Marijn Suijten Reviewed-by: Martin Botka Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/512460/ Link: https://lore.kernel.org/r/20221121222456.437815-1-marijn.suijten@somainline.org Signed-off-by: Dmitry Baryshkov commit 21e9a838f505178e109ccb3bf19d7808eb0326f4 Author: Hui Tang Date: Sat Nov 19 13:55:18 2022 +0800 drm/msm/dpu: check for null return of devm_kzalloc() in dpu_writeback_init() Because of the possilble failure of devm_kzalloc(), dpu_wb_conn might be NULL and will cause null pointer dereference later. Therefore, it might be better to check it and directly return -ENOMEM. Fixes: 77b001acdcfe ("drm/msm/dpu: add the writeback connector layer") Signed-off-by: Hui Tang Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/512277/ Link: https://lore.kernel.org/r/20221119055518.179937-1-tanghui20@huawei.com [DB: fixed typo in commit message] Signed-off-by: Dmitry Baryshkov commit a685d27f220118bb770e2c1a9a50dcc100309e63 Author: Konrad Dybcio Date: Mon Nov 7 11:37:36 2022 +0100 drm/msm/dpu1: Remove INTF4 IRQ from SDM845 IRQ mask SDM845 only has INTF0-3 and has no business caring about the INTF4 irq. Suggested-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/510463/ Link: https://lore.kernel.org/r/20221107103739.8993-1-konrad.dybcio@linaro.org Signed-off-by: Dmitry Baryshkov commit c38d8cff9cdc8101a2df7a55a86d45f279728873 Author: Takashi Sakamoto Date: Sat Jan 7 11:32:14 2023 +0900 ALSA: firewire-lib: code refactoring for cache position in sequence replay When sequence replay is enabled for media clock recovery, current implementation refers to cache of sequence descriptors in tx packets, then fulfil sequence descriptors for rx packets. The initialization for rx packets is done before starting packet streaming, while it can be postponed till the cache has enough entries for the replay. This commit refactors for the purpose as well as minor code change for renaming of structure member. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230107023214.29132-5-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit cccddec49c58785ea6a5752ab749ca2d99488851 Author: Takashi Sakamoto Date: Sat Jan 7 11:32:13 2023 +0900 ALSA: firewire-lib: code refactoring for cache position in tx packets When sequence replay is enabled for media clock recovery, current implementation caches sequence descriptors from packet descriptors in tx packets. Helper function for the purpose do not necessarily have good readability. This commit refactors relevant functions by renaming structure members, function name, and function local variables. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230107023214.29132-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit f2bdee856f20e21416130c392a3ec527079a1226 Author: Takashi Sakamoto Date: Sat Jan 7 11:32:12 2023 +0900 ALSA: firewire-lib: code refactoring for pool position in rx packets When scheduling transmission of rx packets, current implementation fulfils packet descriptors after pooling sequence descriptors. It is for packet queueing. Besides the implementations do not necessarily have good readability. This commit refactors them by adding function local variables and function arguments. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230107023214.29132-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 119c446a484a646a5762ff11ecff53c337f0e236 Author: Takashi Sakamoto Date: Sat Jan 7 11:32:11 2023 +0900 ALSA: firewire-lib: code refactoring for helper functions to pool sequence in rx packets When scheduling transmission of rx packets, current implementation pools sequence descriptors at first for media clock. Two methods are used for the purpose depending on four cases, while the implementations do not necessarily have good readability. This commit refactors them by adding function pointers and functions arguments. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20230107023214.29132-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit bfcae956d9b50ea0e221cefc171604c569017d7e Author: Olivier Moysan Date: Thu Jan 5 13:53:30 2023 +0100 iio: adc: stm32-dfsdm: add id registers support Add support of identification registers to STM32 DFSDM to allow hardware capabilities discovery and configuration check. The number of filters and channels, are read from registers, when they are available. Signed-off-by: Olivier Moysan Link: https://lore.kernel.org/r/20230105125331.328275-1-olivier.moysan@foss.st.com Signed-off-by: Jonathan Cameron commit 14e5b7ab196e6f18f76191cae4a4f6b41c0bfadd Author: Luca Weiss Date: Fri Jan 6 16:39:41 2023 +0100 iio: adc: qcom-spmi-adc5: define ADC5_BAT_ID_100K_PU channel Define the ADC channel used for battery identification purposes so it can be used in drivers. Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20230106-pm7250b-bat_id-v1-1-82ca8f2db741@fairphone.com Signed-off-by: Jonathan Cameron commit 721a2a7edcdd10f55ef7d3cf74fc276b0d4177e8 Author: Stephan Gerhold Date: Fri Jan 6 11:22:39 2023 +0100 iio: magnetometer: st_magn: Add LSM303C The magnetometer part of ST LSM303C is similar (perhaps even identical) to the already supported standalone LIS3MDL magnetometer, so just add the new st,lsm303c-magn compatible for the existing definitions. Signed-off-by: Stephan Gerhold Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230106102239.9647-4-stephan@gerhold.net Signed-off-by: Jonathan Cameron commit 23fd6f0bd6cbf010216a078a99dcbaa30c8bb5ae Author: Stephan Gerhold Date: Fri Jan 6 11:22:38 2023 +0100 iio: accel: st_accel: Add LSM303C The accelerometer part of ST LSM303C is similar (perhaps even identical) to the already supported standalone LIS2HH12 accelerometer, so just add the new st,lsm303c-accel compatible for the existing definitions. Signed-off-by: Stephan Gerhold Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230106102239.9647-3-stephan@gerhold.net Signed-off-by: Jonathan Cameron commit 4aaf3e40272d9699d84b04f09aa6c2166b7e4aba Author: Stephan Gerhold Date: Fri Jan 6 11:22:37 2023 +0100 dt-bindings: iio: st-sensors: Add LSM303C accelerometer+magnetometer The ST LSM303C [1] is a accelerometer and magnetometer combo sensor compatible with the existing ST sensor bindings. Accelerometer and magnetometer are exposed through separate I2C/SPI devices, so document separate compatibles with -accel and -magn suffix. [1]: https://www.st.com/resource/en/datasheet/lsm303c.pdf Signed-off-by: Stephan Gerhold Acked-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230106102239.9647-2-stephan@gerhold.net Signed-off-by: Jonathan Cameron commit eae3e6f1c86f4499325cdaa3df4b90cd1f32464c Author: Alexander Vorwerk Date: Thu Jan 5 03:53:51 2023 +0100 drivers: iio: cdc: Drop redundant if check Reported-by: kernel test robot Signed-off-by: Alexander Vorwerk Link: https://lore.kernel.org/r/20230105025351.12099-1-zabe@avorwerk.net Signed-off-by: Jonathan Cameron commit 591a6bc7f40d3ea6492527f595f1588e127d0b54 Author: Andy Shevchenko Date: Tue Jan 3 16:49:03 2023 +0200 iio: adc: max11410: Use asm intead of asm-generic There is no point to specify asm-generic for the unaligned.h. Drop the 'generic' suffix and move the inclusion to be after the non-IIO linux/* ones. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230103144903.39905-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 4b570fe0d4c9f326fb87b1c58abebb8f0376eaa9 Author: Andy Shevchenko Date: Mon Jan 2 19:34:50 2023 +0200 iio: adc: ti-adc128s052: Sort headers Sort the headers in alphabetic order in order to ease the maintenance for this part. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230102173450.29882-4-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit c87d5e94fca8e2fc681a808608bddfb01878f791 Author: Andy Shevchenko Date: Mon Jan 2 19:34:49 2023 +0200 iio: adc: ti-adc128s052: Drop anti-pattern of ACPI_PTR() use ACPI_PTR() is more harmful than helpful. For example, in this case if CONFIG_ACPI=n, the ID table left unused and code is obfuscated by ifdeffery. Drop anti-pattern of ACPI_PTR() use. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230102173450.29882-3-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit d5f0da0c6972199a39d692309d9e0e09c57a3844 Author: Andy Shevchenko Date: Mon Jan 2 19:34:48 2023 +0200 iio: adc: ti-adc128s052: Switch to use spi_get_device_match_data() The spi_get_device_match_data() helps to get driver data from the firmware node or SPI ID table. Use it instead of open coding. While at it, switch ID tables to provide an acrual pointers to the configuration data. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230102173450.29882-2-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit b7b81d1c65bffb759c68d04b5e5450cf4e301f62 Author: Jonathan Cameron Date: Sat Dec 31 14:41:28 2022 +0000 iio: adc: ep93xx: Enable wider build testing with COMPILE_TEST It is useful to be able to build this driver without needing to build support for ARCH_EP93XX. Also add an explicit dependency on HAS_IOMEM so we have devm_platform_ioremap_resource() etc available. Signed-off-by: Jonathan Cameron Cc: Alexander Sverdlin Cc: Hartley Sweeten Acked-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20221231144128.489810-1-jic23@kernel.org commit 4e1da8fe031303599e78f88e0dad9f44272e4f99 Author: Uros Bizjak Date: Wed Dec 21 20:35:40 2022 +0100 posix_acl: Use try_cmpxchg in get_acl Use try_cmpxchg instead of cmpxchg (*ptr, old, new) == old in get_acl. x86 CMPXCHG instruction returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg). No functional change intended. Signed-off-by: Uros Bizjak Cc: Christian Brauner Cc: Alexander Viro Signed-off-by: Christian Brauner (Microsoft) commit 568494db680991d6a09b5ab92dcddb7dfd3cbe25 Author: Arnd Bergmann Date: Thu Jan 5 14:46:15 2023 +0100 mtd: remove tmio_nand driver With the TMIO MFD drivers gone, the NAND support is also obsolete and can be removed. Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org Signed-off-by: Arnd Bergmann Signed-off-by: Miquel Raynal commit 718004a5972c83cbcc4b649ec34ff314de373650 Author: Uwe Kleine-König Date: Mon Jan 2 13:40:51 2023 +0100 mtd: rawnand: pasemi: Don't use static data to track per-device state Up to now the pasemi nand driver only supported a single device instance. However the check for that was racy because two parallel calls of pasemi_nand_probe() could pass the check if (pasemi_nand_mtd) return -ENODEV; before any of them assigns a non-NULL value to it. So rework the driver to make use of per-device driver data. As an intended side effect the driver can bind more than one device and also gets rid of the check if (!pasemi_nand_mtd) return 0; in the remove callback that could only ever trigger after the above race happened. Signed-off-by: Uwe Kleine-König Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230102124051.1508424-1-u.kleine-koenig@pengutronix.de commit a9015ce593204f487bcb3069c5908155ccc59f30 Author: Javier Martinez Canillas Date: Mon Jan 2 21:25:42 2023 +0100 drm/mipi-dsi: Add a mipi_dsi_dcs_write_seq() macro Many panel drivers define dsi_dcs_write_seq() and dsi_generic_write_seq() macros to send DCS commands and generic write packets respectively, with the payload specified as a list of parameters instead of using arrays. There's already a macro for the former, introduced by commit 2a9e9daf75231 ("drm/mipi-dsi: Introduce mipi_dsi_dcs_write_seq macro") so drivers can be changed to use that. But there isn't one yet for the latter, let's add it. Signed-off-by: Javier Martinez Canillas Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20230102202542.3494677-2-javierm@redhat.com commit 51d3c0e7dc3cf1dd91c34b0f9bdadda310c7ed5b Author: Javier Martinez Canillas Date: Mon Jan 2 21:25:41 2023 +0100 drm/mipi-dsi: Fix mipi_dsi_dcs_write_seq() macro definition format Change made using a `clang-format -i include/drm/drm_mipi_dsi.h` command. Suggested-by: Sam Ravnborg Signed-off-by: Javier Martinez Canillas Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20230102202542.3494677-1-javierm@redhat.com commit 8e791f7eba4c7711f56616ae163ee3cbc00b1bf4 Author: Masami Hiramatsu (Google) Date: Wed Nov 30 22:33:09 2022 +0900 x86/kprobes: Drop removed INT3 handling code Drop removed INT3 handling code from kprobe_int3_handler() because this case (get_kprobe() doesn't return corresponding kprobe AND the INT3 is removed) must not happen with the kprobe managed INT3, but can happen with the non-kprobe INT3, which should be handled by other callbacks. For the kprobe managed INT3, it is already safe. The commit 5c02ece81848d ("x86/kprobes: Fix ordering while text-patching") introduced text_poke_sync() to the arch_disarm_kprobe() right after removing INT3. Since this text_poke_sync() uses IPI to call sync_core() on all online cpus, that ensures that all running INT3 exception handlers have done. And, the unregister_kprobe() will remove the kprobe from the hash table after arch_disarm_kprobe(). Thus, when the kprobe managed INT3 hits, kprobe_int3_handler() should be able to find corresponding kprobe always by get_kprobe(). If it can not find any kprobe, this means that is NOT a kprobe managed INT3. Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Ingo Molnar Reviewed-by: Steven Rostedt (Google) Link: https://lore.kernel.org/r/166981518895.1131462.4693062055762912734.stgit@devnote3 commit 7ddf0050a21fdcc025c3cb1055fe3db60df1cd97 Author: Xu Panda Date: Sat Dec 3 14:19:32 2022 +0800 x86/mce/dev-mcelog: 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: Ingo Molnar Reviewed-by: Tony Luck Link: https://lore.kernel.org/r/202212031419324523731@zte.com.cn commit 3da73f102309fe29150e5c35acd20dd82063ff67 Author: Miaoqian Lin Date: Mon Dec 5 12:06:42 2022 +0400 objtool: Fix memory leak in create_static_call_sections() strdup() allocates memory for key_name. We need to release the memory in the following error paths. Add free() to avoid memory leak. Fixes: 1e7e47883830 ("x86/static_call: Add inline static call implementation for x86-64") Signed-off-by: Miaoqian Lin Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20221205080642.558583-1-linmq006@gmail.com Cc: Josh Poimboeuf Cc: Peter Zijlstra commit d74f87f37672e71457bfcc14eca5eeb1d61b6438 Author: Michal Clapinski Date: Wed Dec 7 17:43:38 2022 +0100 selftests/membarrier: Test MEMBARRIER_CMD_GET_REGISTRATIONS Keep track of previously issued registrations and compare the result with MEMBARRIER_CMD_GET_REGISTRATIONS return value. Signed-off-by: Michal Clapinski Signed-off-by: Ingo Molnar Acked-by: Mathieu Desnoyers Acked-by: Paul E. McKenney Link: https://lore.kernel.org/r/20221207164338.1535591-3-mclapinski@google.com commit 544a4f2ecd45f9d6ed78d207583f39130ad40349 Author: Michal Clapinski Date: Wed Dec 7 17:43:37 2022 +0100 sched/membarrier: Introduce MEMBARRIER_CMD_GET_REGISTRATIONS Provide a method to query previously issued registrations. Signed-off-by: Michal Clapinski Signed-off-by: Ingo Molnar Acked-by: Mathieu Desnoyers Acked-by: Paul E. McKenney Link: https://lore.kernel.org/r/20221207164338.1535591-2-mclapinski@google.com commit 948fb4c4e9cb2ad15b87e6e7cf0dd3b4ec17b8a4 Author: Lukasz Luba Date: Thu Dec 8 16:02:56 2022 +0000 cpufreq, sched/util: Optimize operations with single CPU capacity lookup The max CPU capacity is the same for all CPUs sharing frequency domain. There is a way to avoid heavy operations in a loop for each CPU by leveraging this knowledge. Thus, simplify the looping code in the sugov_next_freq_shared() and drop heavy multiplications. Instead, use simple max() to get the highest utilization from these CPUs. This is useful for platforms with many (4 or 6) little CPUs. We avoid heavy 2*PD_CPU_NUM multiplications in that loop, which is called billions of times, since it's not limited by the schedutil time delta filter in sugov_should_update_freq(). When there was no need to change frequency the code bailed out, not updating the sg_policy::last_freq_update_time. Then every visit after delta_ns time longer than the sg_policy::freq_update_delay_ns goes through and triggers the next frequency calculation code. Although, if the next frequency, as outcome of that, would be the same as current frequency, we won't update the sg_policy::last_freq_update_time and the story will be repeated (in a very short period, sometimes a few microseconds). The max CPU capacity must be fetched every time we are called, due to difficulties during the policy setup, where we are not able to get the normalized CPU capacity at the right time. The fetched CPU capacity value is than used in sugov_iowait_apply() to calculate the right boost. This required a few changes in the local functions and arguments. The capacity value should hopefully be fetched once when needed and then passed over CPU registers to those functions. Signed-off-by: Lukasz Luba Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20221208160256.859-2-lukasz.luba@arm.com Cc: Peter Zijlstra Cc: Patrick Bellasi Cc: Vincent Guittot Cc: Rafael J. Wysocki Cc: Viresh Kumar commit 160fb0d83f206b3429fc495864a022110f9e4978 Author: Chengming Zhou Date: Fri Dec 23 18:32:57 2022 +0800 sched/core: Reorganize ttwu_do_wakeup() and ttwu_do_activate() ttwu_do_activate() is used for a complete wakeup, in which we will activate_task() and use ttwu_do_wakeup() to mark the task runnable and perform wakeup-preemption, also call class->task_woken() callback and update the rq->idle_stamp. Since ttwu_runnable() is not a complete wakeup, don't need all those done in ttwu_do_wakeup(), so we can move those to ttwu_do_activate() to simplify ttwu_do_wakeup(), making it only mark the task runnable to be reused in ttwu_runnable() and try_to_wake_up(). This patch should not have any functional changes. Suggested-by: Peter Zijlstra Signed-off-by: Chengming Zhou Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20221223103257.4962-2-zhouchengming@bytedance.com commit efe09385864f3441c71711f91e621992f9423c01 Author: Chengming Zhou Date: Fri Dec 23 18:32:56 2022 +0800 sched/core: Micro-optimize ttwu_runnable() ttwu_runnable() is used as a fast wakeup path when the wakee task is running on CPU or runnable on RQ, in both cases we can just set its state to TASK_RUNNING to prevent a sleep. If the wakee task is on_cpu running, we don't need to update_rq_clock() or check_preempt_curr(). But if the wakee task is on_rq && !on_cpu (e.g. an IRQ hit before the task got to schedule() and the task been preempted), we should check_preempt_curr() to see if it can preempt the current running. This also removes the class->task_woken() callback from ttwu_runnable(), which wasn't required per the RT/DL implementations: any required push operation would have been queued during class->set_next_task() when p got preempted. ttwu_runnable() also loses the update to rq->idle_stamp, as by definition the rq cannot be idle in this scenario. Suggested-by: Valentin Schneider Suggested-by: Peter Zijlstra Signed-off-by: Chengming Zhou Signed-off-by: Ingo Molnar Reviewed-by: Valentin Schneider Reviewed-by: Steven Rostedt (Google) Link: https://lore.kernel.org/r/20221223103257.4962-1-zhouchengming@bytedance.com commit f23395b4049c826bc1a294eea69459cb774598b4 Merge: 7abd92a5b98f3 803df55d32eaf Author: Jakub Kicinski Date: Fri Jan 6 19:38:01 2023 -0800 Merge branch 'net-wangxun-adjust-code-structure' Jiawen Wu says: ==================== net: wangxun: Adjust code structure Remove useless structs 'txgbe_hw' and 'ngbe_hw' make the codes clear. And move the same codes which sets MAC address between txgbe and ngbe to libwx. Further more, rename struct 'wx_hw' to 'wx' and move total adapter members to wx. ==================== Link: https://lore.kernel.org/r/20230106033853.2806007-1-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski commit 803df55d32eafbccdc3bc5977ce6049b61cdd997 Author: Mengyuan Lou Date: Fri Jan 6 11:38:53 2023 +0800 net: ngbe: Remove structure ngbe_adapter Move the total private structure to libwx. Signed-off-by: Mengyuan Lou Signed-off-by: Jakub Kicinski commit 270a71e64012b77a9c6009f10a0fb90caeafca07 Author: Jiawen Wu Date: Fri Jan 6 11:38:52 2023 +0800 net: txgbe: Remove structure txgbe_adapter Move the total private structure to libwx. Signed-off-by: Jiawen Wu Signed-off-by: Jakub Kicinski commit 9607a3e62645c25e61b69f605d3d0ffd8ddcdf41 Author: Jiawen Wu Date: Fri Jan 6 11:38:51 2023 +0800 net: wangxun: Rename private structure in libwx In order to move the total members in struct adapter to struct wx_hw to keep the code clean, it's a bad name of 'wx_hw' only for hardware. Rename 'wx_hw' to 'wx', and rename the pointers at use. Signed-off-by: Jiawen Wu Signed-off-by: Jakub Kicinski commit 79625f45ca73ef37c18a6e4b5b6ce7daa1e92683 Author: Jiawen Wu Date: Fri Jan 6 11:38:50 2023 +0800 net: wangxun: Move MAC address handling to libwx For setting MAC address, both txgbe and ngbe drivers have the same handling flow with different parameters. Move the same codes to libwx. Signed-off-by: Jiawen Wu Signed-off-by: Jakub Kicinski commit 92710fe60515aa35065d308cecc3acfc59d8f0e9 Author: Jiawen Wu Date: Fri Jan 6 11:38:49 2023 +0800 net: ngbe: Move defines into unified file Remove ngbe.h, move defines into ngbe_type.h file. Signed-off-by: Jiawen Wu Signed-off-by: Jakub Kicinski commit 524f6b29fb865de0ae47a70fd211e45bde6a164a Author: Jiawen Wu Date: Fri Jan 6 11:38:48 2023 +0800 net: txgbe: Move defines into unified file Remove txgbe.h, move defines into txgbe_type.h file. Signed-off-by: Jiawen Wu Signed-off-by: Jakub Kicinski commit 8f727eeca3973270de5f559939de3e0d8b2b4347 Author: Jiawen Wu Date: Fri Jan 6 11:38:47 2023 +0800 net: ngbe: Remove structure ngbe_hw Remove useless structure ngbe_hw to make the codes clear. Signed-off-by: Jiawen Wu Signed-off-by: Jakub Kicinski commit ce2b4ad5d1b5a9d2c288ec4bcb4b010747ca9126 Author: Jiawen Wu Date: Fri Jan 6 11:38:46 2023 +0800 net: txgbe: Remove structure txgbe_hw Remove useless structure txgbe_hw to make the codes clear. Signed-off-by: Jiawen Wu Signed-off-by: Jakub Kicinski commit 7abd92a5b98f33a972bd3cadf9948ce59d1c01b8 Author: Horatiu Vultur Date: Wed Jan 4 20:42:18 2023 +0100 net: phy: micrel: Change handler interrupt for lan8814 The lan8814 represents a package of 4 PHYs. All of them are sharing the same interrupt line. So when a link was going down/up or a frame was timestamped, then the interrupt handler of all the PHYs was called. Which is all fine and expected but the problem is the way the handler interrupt works. Basically if one of the PHYs timestamp a frame, then all the other 3 PHYs were polling the status of the interrupt until that PHY actually cleared the interrupt by reading the timestamp. The reason of polling was in case another PHY was also timestamping a frame at the same time, it could miss this interrupt. But this is not the right approach, because it is the interrupt controller who needs to call the interrupt handlers again if the interrupt line is still active. Therefore change this such when the interrupt handler is called check only if the interrupt is for itself, otherwise just exit. In this way save CPU usage. Signed-off-by: Horatiu Vultur Link: https://lore.kernel.org/r/20230104194218.3785229-1-horatiu.vultur@microchip.com Signed-off-by: Jakub Kicinski commit b466a25c930f2b7f1ed21c9eeaa553017ae78d1c Author: Kees Cook Date: Thu Jan 5 20:28:48 2023 -0800 ethtool: Replace 0-length array with flexible array Zero-length arrays are deprecated[1]. Replace struct ethtool_rxnfc's "rule_locs" 0-length array with a flexible array. Detected with GCC 13, using -fstrict-flex-arrays=3: net/ethtool/common.c: In function 'ethtool_get_max_rxnfc_channel': net/ethtool/common.c:558:55: warning: array subscript i is outside array bounds of '__u32[0]' {aka 'unsigned int[]'} [-Warray-bounds=] 558 | .fs.location = info->rule_locs[i], | ~~~~~~~~~~~~~~~^~~ In file included from include/linux/ethtool.h:19, from include/uapi/linux/ethtool_netlink.h:12, from include/linux/ethtool_netlink.h:6, from net/ethtool/common.c:3: include/uapi/linux/ethtool.h:1186:41: note: while referencing 'rule_locs' 1186 | __u32 rule_locs[0]; | ^~~~~~~~~ [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays Cc: Andrew Lunn Cc: kernel test robot Cc: Oleksij Rempel Cc: Sean Anderson Cc: Alexandru Tachici Cc: Amit Cohen Signed-off-by: Kees Cook Reviewed-by: Vincent Mailhol Reviewed-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20230106042844.give.885-kees@kernel.org Signed-off-by: Jakub Kicinski commit e8d283b6cf0e83d5fcb5345e037956eb3e9b2483 Author: Kees Cook Date: Thu Jan 5 14:15:37 2023 -0800 net: ipv6: rpl_iptunnel: Replace 0-length arrays with flexible arrays Zero-length arrays are deprecated[1]. Replace struct ipv6_rpl_sr_hdr's "segments" union of 0-length arrays with flexible arrays. Detected with GCC 13, using -fstrict-flex-arrays=3: In function 'rpl_validate_srh', inlined from 'rpl_build_state' at ../net/ipv6/rpl_iptunnel.c:96:7: ../net/ipv6/rpl_iptunnel.c:60:28: warning: array subscript is outside array bounds of 'struct in6_addr[0]' [-Warray-bounds=] 60 | if (ipv6_addr_type(&srh->rpl_segaddr[srh->segments_left - 1]) & | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../include/net/rpl.h:12, from ../net/ipv6/rpl_iptunnel.c:13: ../include/uapi/linux/rpl.h: In function 'rpl_build_state': ../include/uapi/linux/rpl.h:40:33: note: while referencing 'addr' 40 | struct in6_addr addr[0]; | ^~~~ [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays Cc: Hideaki YOSHIFUJI Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20230105221533.never.711-kees@kernel.org Signed-off-by: Jakub Kicinski commit 0b5dfa35da03277287d6c5fcd2b56a77f1c61f62 Author: Kees Cook Date: Thu Jan 5 14:21:16 2023 -0800 ipv6: ioam: Replace 0-length array with flexible array Zero-length arrays are deprecated[1]. Replace struct ioam6_trace_hdr's "data" 0-length array with a flexible array. Detected with GCC 13, using -fstrict-flex-arrays=3: net/ipv6/ioam6_iptunnel.c: In function 'ioam6_build_state': net/ipv6/ioam6_iptunnel.c:194:37: warning: array subscript is outside array bounds of '__u8[0]' {aka 'unsigned char[]'} [-Warray-bounds=] 194 | tuninfo->traceh.data[trace->remlen * 4] = IPV6_TLV_PADN; | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ In file included from include/linux/ioam6.h:11, from net/ipv6/ioam6_iptunnel.c:13: include/uapi/linux/ioam6.h:130:17: note: while referencing 'data' 130 | __u8 data[0]; | ^~~~ [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Reviewed-by: Justin Iurman Tested-by: Justin Iurman Link: https://lore.kernel.org/r/20230105222115.never.661-kees@kernel.org Signed-off-by: Jakub Kicinski commit c76feb0d5dfdb90b70fa820bb3181142bb01e980 Author: Paul E. McKenney Date: Fri Jan 6 16:10:24 2023 -0800 workqueue: Make show_pwq() use run-length encoding The show_pwq() function dumps out a pool_workqueue structure's activity, including the pending work-queue handlers: Showing busy workqueues and worker pools: workqueue events: flags=0x0 pwq 0: cpus=0 node=0 flags=0x1 nice=0 active=10/256 refcnt=11 in-flight: 7:test_work_func, 64:test_work_func, 249:test_work_func pending: test_work_func, test_work_func, test_work_func1, test_work_func1, test_work_func1, test_work_func1, test_work_func1 When large systems are facing certain types of hang conditions, it is not unusual for this "pending" list to contain runs of hundreds of identical function names. This "wall of text" is difficult to read, and worse yet, it can be interleaved with other output such as stack traces. Therefore, make show_pwq() use run-length encoding so that the above printout instead looks like this: Showing busy workqueues and worker pools: workqueue events: flags=0x0 pwq 0: cpus=0 node=0 flags=0x1 nice=0 active=10/256 refcnt=11 in-flight: 7:test_work_func, 64:test_work_func, 249:test_work_func pending: 2*test_work_func, 5*test_work_func1 When no comma would be printed, including the WORK_STRUCT_LINKED case, a new run is started unconditionally. This output is more readable, places less stress on the hardware, firmware, and software on the console-log path, and reduces interference with other output. Signed-off-by: Paul E. McKenney Cc: Tejun Heo Cc: Lai Jiangshan Cc: Dave Jones Cc: Rik van Riel Signed-off-by: Tejun Heo commit 13763fb955a0043bd9b6fb1e237f4fd8fe8b3c75 Author: Bagas Sanjaya Date: Fri Dec 30 20:50:31 2022 +0700 soc: qcom: dcc: rewrite description of dcc sysfs files The description of dcc sysfs files is somewhat confusing and not effective. Rewrite it to be clear. While at it, also use literal code block for config sysfs examples and remove redundant examples that are obvious. Signed-off-by: Bagas Sanjaya Acked-by: Souradeep Chowdhury Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221230135030.17002-3-bagasdotme@gmail.com commit dc2f5a499de420001813562ddbc9d51ece295978 Author: Bagas Sanjaya Date: Fri Dec 30 20:50:30 2022 +0700 soc: qcom: dcc: Fix examples list on /sys/kernel/debug/dcc/.../[list-number]/config documentation kernel test robot reported htmldocs warnings: Documentation/ABI/testing/debugfs-driver-dcc:34: WARNING: Unexpected indentation. Documentation/ABI/testing/debugfs-driver-dcc:34: WARNING: Block quote ends without a blank line; unexpected unindent. Fix these by fixing numbered list syntax on description of /sys/kernel/debug/dcc/.../[list-number]/config, including adding blank line separators as appropriate. Link: https://lore.kernel.org/linux-doc/202212300426.eMLsZsvA-lkp@intel.com/ Fixes: 4cbe60cf5ad622 ("soc: qcom: dcc: Add driver support for Data Capture and Compare unit(DCC)") Reported-by: kernel test robot Signed-off-by: Bagas Sanjaya Acked-by: Souradeep Chowdhury Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221230135030.17002-2-bagasdotme@gmail.com commit 185a453bf1b5688f8c77f2646b0b6f3b1cbdddca Author: Yuwei Guan Date: Tue Dec 13 17:34:19 2022 +0800 f2fs: deliver the accumulated 'issued' to __issue_discard_cmd_orderly() Any of the following scenarios will send more than the number of max_requests at a time, which will not meet the design of the max_requests limit. - Set max_ordered_discard larger than discard_granularity from userspace. - It is a small size device, discard_granularity can be tuned to 1 in f2fs_tuning_parameters(). We need to deliver the accumulated @issued to __issue_discard_cmd_orderly() to meet the max_requests limit. BTW, convert the parameter type of @issued in __submit_discard_cmd(). Signed-off-by: Yuwei Guan Cc: Bagas Sanjaya Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 8358014d6be8f3cb507d247d6a623e5961f848d0 Author: Chao Yu Date: Thu Dec 15 14:05:06 2022 +0800 f2fs: avoid to check PG_error flag After below changes: commit 14db0b3c7b83 ("fscrypt: stop using PG_error to track error status") commit 98dc08bae678 ("fsverity: stop using PG_error to track error status") There is no place in f2fs we will set PG_error flag in page, let's remove other PG_error usage in f2fs, as a step towards freeing the PG_error flag for other uses. Cc: Eric Biggers Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit cec32b00faa940f4ed91a939d3beb71410334039 Author: Chao Yu Date: Thu Dec 15 23:03:30 2022 +0800 f2fs: add missing doc for fault injection sysfs We supported configuring fault injection parameter via sysfs w/ below commits, however, we forgot to add doc entry, fix it. commit 087968974fcd ("f2fs: add fault injection to sysfs") /sys/fs/f2fs/fault_injection/fault_* commit 1ecc0c5c50ce ("f2fs: support configuring fault injection per superblock") /sys/fs/f2fs//fault_* Cc: Sheng Yong Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5eaac835f27f2de6b73412d7c24e755733b49de0 Author: Chao Yu Date: Fri Dec 16 23:50:00 2022 +0800 f2fs: fix to avoid potential deadlock There is a potential deadlock reported by syzbot as below: F2FS-fs (loop2): invalid crc value F2FS-fs (loop2): Found nat_bits in checkpoint F2FS-fs (loop2): Mounted with checkpoint version = 48b305e4 ====================================================== WARNING: possible circular locking dependency detected 6.1.0-rc8-syzkaller-33330-ga5541c0811a0 #0 Not tainted ------------------------------------------------------ syz-executor.2/32123 is trying to acquire lock: ffff0000c0e1a608 (&mm->mmap_lock){++++}-{3:3}, at: __might_fault+0x54/0xb4 mm/memory.c:5644 but task is already holding lock: ffff0001317c6088 (&sbi->sb_lock){++++}-{3:3}, at: f2fs_down_write fs/f2fs/f2fs.h:2205 [inline] ffff0001317c6088 (&sbi->sb_lock){++++}-{3:3}, at: f2fs_ioc_get_encryption_pwsalt fs/f2fs/file.c:2334 [inline] ffff0001317c6088 (&sbi->sb_lock){++++}-{3:3}, at: __f2fs_ioctl+0x1370/0x3318 fs/f2fs/file.c:4151 which lock already depends on the new lock. Chain exists of: &mm->mmap_lock --> &nm_i->nat_tree_lock --> &sbi->sb_lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sbi->sb_lock); lock(&nm_i->nat_tree_lock); lock(&sbi->sb_lock); lock(&mm->mmap_lock); Let's try to avoid above deadlock condition by moving __might_fault() out of sbi->sb_lock coverage. Fixes: 95fa90c9e5a7 ("f2fs: support recording errors into superblock") Link: https://lore.kernel.org/linux-f2fs-devel/000000000000cd5fe305ef617fe2@google.com/T/#u Reported-by: syzbot+4793f6096d174c90b4f7@syzkaller.appspotmail.com Signed-off-by: Chao Yu Reviewed-by: Eric Biggers Signed-off-by: Jaegeuk Kim commit fdb7ccc3f9cb316c399b072c7a75a106678eb421 Author: Yangtao Li Date: Sat Nov 19 03:18:39 2022 +0800 f2fs: introduce IS_F2FS_IPU_* macro IS_F2FS_IPU_* macro can be used to identify whether f2fs ipu related policies are enabled. BTW, convert to use BIT() instead of open code. Signed-off-by: Yangtao Li Signed-off-by: Jaegeuk Kim commit fdbf69a7f5be2896af3a9a6213fb0ab8e194b190 Author: Christoph Hellwig Date: Mon Nov 28 10:15:23 2022 +0100 f2fs: refactor the hole reporting and allocation logic in f2fs_map_blocks Add a is_hole local variable to figure out if the block number might need allocation, and untangle to logic to report the hole or fill it with a block allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 817c968b79d02588370e3d1dc5e5961cfd57d2b1 Author: Christoph Hellwig Date: Mon Nov 28 10:15:22 2022 +0100 f2fs: factor out a f2fs_map_no_dnode Factor out a helper to return a hole when no dnode was found. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0094e98bd1477a6b7d97c25b47b19a7317c35279 Author: Christoph Hellwig Date: Mon Nov 28 10:15:21 2022 +0100 f2fs: factor a f2fs_map_blocks_cached helper Add a helper to deal with everything needed to return a f2fs_map_blocks structure based on a lookup in the extent cache. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit cd8fc5226bef3a1fda13a0e61794a039ca46744a Author: Christoph Hellwig Date: Mon Nov 28 10:15:20 2022 +0100 f2fs: remove the create argument to f2fs_map_blocks The create argument is always identicaly to map->m_may_create, so use that consistently. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit ffdeab71d5cf0bcd45467b3badb3a1ef8f19a565 Author: Christoph Hellwig Date: Mon Nov 28 10:15:19 2022 +0100 f2fs: remove f2fs_get_block Fold f2fs_get_block into the two remaining callers to simplify the call chain a bit. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a9e292f2aeb737b263b1c14281be239405e1bb19 Author: Yangtao Li Date: Tue Dec 13 23:08:37 2022 +0800 docs: f2fs: fix html doc error There is a problem with the html converted from the previous commit 6047de5482c3 ("f2fs: add barrier mount option") code submission. Probably something like this: barrier If this option is set, cache_flush commands are allowed to be Let's fix it. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 3cf684f2f8e0229714fb6d051508b42d3320e78f Author: Christoph Hellwig Date: Mon Nov 28 10:15:18 2022 +0100 f2fs: simplify __allocate_data_block Just use a simple if block for the conditional call to inc_valid_block_count. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 44b0dfebbd829c64c242c0c6ee10f8a88ecfa8b3 Author: Christoph Hellwig Date: Mon Nov 28 10:15:17 2022 +0100 f2fs: reflow prepare_write_begin Reflow prepare_write_begin so that it reads more straight forward, and so that there is one place that does an extent cache lookup instead of three, two of which are hidden in f2fs_get_block calls. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 2f51ade9524c609fcc4b05f230ecda356cd10b85 Author: Christoph Hellwig Date: Mon Nov 28 10:15:16 2022 +0100 f2fs: f2fs_do_map_lock Split f2fs_do_map_lock into a lock and unlock helper to make the code using it easier to read. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit cf342d3beda000b4c60990755ca7800de5038785 Author: Christoph Hellwig Date: Mon Nov 28 10:15:15 2022 +0100 f2fs: add a f2fs_get_block_locked helper This allows to keep the f2fs_do_map_lock based locking scheme private to data.c. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 04a91ab016847440c8c937dda628079070f38c7a Author: Christoph Hellwig Date: Mon Nov 28 10:15:14 2022 +0100 f2fs: add a f2fs_lookup_extent_cache_block helper All but three callers of f2fs_lookup_extent_cache just want the block address. Add a small helper to simplify them. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit bc29835a9d4860df93a663d659e07dfdd8b4f629 Author: Christoph Hellwig Date: Mon Nov 28 10:15:12 2022 +0100 f2fs: split __submit_bio Split __submit_bio into one function each for reads and writes, and a helper for aligning writes. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit da8c7fecc9c7ba91b6d5ff5726189f269686a40c Author: Christoph Hellwig Date: Mon Nov 28 10:15:11 2022 +0100 f2fs: rename F2FS_MAP_UNWRITTEN to F2FS_MAP_DELALLOC NEW_ADDR blocks are purely in-memory preallocated blocks, and thus equivalent to what the core FS code calls delayed allocations, and not unwritten extents which do have on-disk blocks allocated from which reads always return zeroes until they are converted to written status. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 62a134bd8941198eee8b23584e35be6a9ab835d1 Author: Christoph Hellwig Date: Mon Nov 28 10:15:10 2022 +0100 f2fs: decouple F2FS_MAP_ from buffer head flags m_flags is never interchanged with the buffer_heads b_flags directly, so use separate codepoints from that. Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 8d3c1fa3fa5eacfd14f5b018eddb6c1a91c57783 Author: Christoph Hellwig Date: Mon Nov 28 10:15:09 2022 +0100 f2fs: don't rely on F2FS_MAP_* in f2fs_iomap_begin When testing with a mixed zoned / convention device combination, there are regular but not 100% reproducible failures in xfstests generic/113 where the __is_valid_data_blkaddr assert hits due to finding a hole. This seems to be because f2fs_map_blocks can set this flag on a hole when it was found in the extent cache. Rework f2fs_iomap_begin to just check the special block numbers directly. This has the added benefits of the WARN_ON showing which invalid block address we found, and being properly error out on delalloc blocks that are confusingly called unwritten but not actually suitable for direct I/O. Fixes: 1517c1a7a445 ("f2fs: implement iomap operations") Signed-off-by: Christoph Hellwig Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 41bb543f5598fb44e0e8dbd723f5821be83b466b Author: Matt Roper Date: Thu Jan 5 15:44:08 2023 -0800 drm/i915/mtl: Add initial gt workarounds This patch introduces initial gt workarounds for the MTL platform. v2: drop redundant/stale comments specifying wa platforms affected (Lucas). v3: drop additional redundant stale comments (MattR) Bspec: 66622 Signed-off-by: Matt Roper Signed-off-by: Matt Atwood Reviewed-by: Rodrigo Vivi Signed-off-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20230105234408.277750-1-matthew.s.atwood@intel.com commit 2e3ab8a6994f265bbd4dbd00448b84548f18464c Author: Maíra Canal Date: Mon Dec 26 12:50:23 2022 -0300 drm/arm/hdlcd: use new debugfs device-centered functions Replace the use of drm_debugfs_create_files() with the new drm_debugfs_add_files() function, which center the debugfs files management on the drm_device instead of drm_minor. Moreover, remove the debugfs_init hook and add the debugfs files directly on hdlcd_drm_bind(), before drm_dev_register(). Signed-off-by: Maíra Canal Acked-by: Liviu Dudau Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20221226155029.244355-4-mcanal@igalia.com commit c702545e19ebb6113d607f2a30ba2ee6cf881a3a Author: Maíra Canal Date: Mon Dec 26 12:50:22 2022 -0300 drm/gud: use new debugfs device-centered functions Replace the use of drm_debugfs_create_files() with the new drm_debugfs_add_file() function, which center the debugfs files management on the drm_device instead of drm_minor. Moreover, remove the debugfs_init hook and add the debugfs files directly on gud_probe(), before drm_dev_register(). Signed-off-by: Maíra Canal Acked-by: Noralf Trønnes Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20221226155029.244355-3-mcanal@igalia.com commit d4b2c7484a8edd79c90b9f8acc8a03e5e3235b89 Author: Yang Li Date: Fri Jan 6 09:17:10 2023 +0800 soc: qcom: dcc: Fix unsigned comparison with less than zero The return value from the call to kstrtouint_from_user() is int. However, the return value is being assigned to an unsigned int variable 'ret', so making 'ret' an int. Eliminate the following warning: ./drivers/soc/qcom/dcc.c:815:5-8: WARNING: Unsigned expression compared with zero: ret < 0 Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3638 Fixes: 4cbe60cf5ad6 ("soc: qcom: dcc: Add driver support for Data Capture and Compare unit(DCC)") Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230106011710.2827-1-yang.lee@linux.alibaba.com commit 33ae3d0955943ac5bacfcb6911cf7cb74822bf8c Author: Dawei Li Date: Fri Jan 6 23:28:03 2023 +0800 soc: qcom: apr: make remove callback of apr driver void returned Since commit fc7a6209d571 ("bus: Make remove callback return void") forces bus_type::remove be void-returned, it doesn't make much sense for any bus based driver implementing remove callbalk to return non-void to its caller. As such, change the remove function for apr bus based drivers to return void. Signed-off-by: Dawei Li Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/TYCP286MB23232B7968D34DB8323B0F16CAFB9@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM commit 50028988403ab8e031093655af9c6919ecba3aa6 Author: Bartosz Golaszewski Date: Fri Jan 6 11:07:19 2023 +0100 spi: spidev: remove debug messages that access spidev->spi without locking The two debug messages in spidev_open() dereference spidev->spi without taking the lock and without checking if it's not null. This can lead to a crash. Drop the messages as they're not needed - the user-space will get informed about ENOMEM with the syscall return value. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20230106100719.196243-2-brgl@bgdev.pl Signed-off-by: Mark Brown commit 1f4d2dd45b6ef9c047f620d2812326a7813d2354 Author: Bartosz Golaszewski Date: Fri Jan 6 11:07:18 2023 +0100 spi: spidev: fix a race condition when accessing spidev->spi There's a spinlock in place that is taken in file_operations callbacks whenever we check if spidev->spi is still alive (not null). It's also taken when spidev->spi is set to NULL in remove(). This however doesn't protect the code against driver unbind event while one of the syscalls is still in progress. To that end we need a lock taken continuously as long as we may still access spidev->spi. As both the file ops and the remove callback are never called from interrupt context, we can replace the spinlock with a mutex. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20230106100719.196243-1-brgl@bgdev.pl Signed-off-by: Mark Brown commit 6878639ee632b9f873a6ede788b06a4aa509f20c Author: Bhupesh Sharma Date: Sat Dec 31 18:18:52 2022 +0530 arm64: defconfig: Enable Qualcomm EUD Now that the EUD (Embedded USB Debugger) block is supported on several Qualcomm SoCs upstream, enable the same as a module in the arm64 defconfig as a module. Signed-off-by: Bhupesh Sharma Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221231124852.3283597-1-bhupesh.sharma@linaro.org commit f7038476a12ce6c463f9e777d426a657c6debfd8 Merge: 392af84bddcc9 e0fe6a31cac84 Author: Mark Brown Date: Fri Jan 6 17:26:02 2023 +0000 SPI core CS delay fixes and additions Merge series from Hector Martin : This brings the name of the cs-setup-ns parameter which was added during the merge window into line with other delay properties. commit e9a7b78b20889d2325bef4a1eb39c1088858ab81 Author: Abel Vesa Date: Wed Jan 4 11:34:50 2023 +0200 clk: qcom: Add TCSR clock driver for SM8550 The TCSR clock controller found on SM8550 provides refclks for PCIE, USB and UFS. Add clock driver for it. This patch is based on initial code downstream. Signed-off-by: Abel Vesa Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230104093450.3150578-5-abel.vesa@linaro.org commit 478a573be730dd704ab6acee43f40d91fe8c808a Author: Abel Vesa Date: Wed Jan 4 11:34:49 2023 +0200 clk: qcom: rpmh: Add support for SM8550 rpmh clocks Adds the RPMH clocks present in SM8550 SoC. Signed-off-by: Abel Vesa Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230104093450.3150578-4-abel.vesa@linaro.org commit ffcdd6907e9a1fdccd9350147d0f59cafb87e768 Author: Abel Vesa Date: Wed Jan 4 11:34:48 2023 +0200 dt-bindings: clock: Add RPMHCC for SM8550 Add bindings and update documentation for clock rpmh driver on SM8550. Signed-off-by: Abel Vesa Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230104093450.3150578-3-abel.vesa@linaro.org commit d8aa375bd70681b76c6bd5fe93bab6011e16a0fb Author: Abel Vesa Date: Wed Jan 4 11:34:47 2023 +0200 dt-bindings: clock: Add SM8550 TCSR CC clocks Add bindings documentation for clock TCSR driver on SM8550. Signed-off-by: Abel Vesa Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230104093450.3150578-2-abel.vesa@linaro.org commit 819cfea7d69d5561f89c4957ff94afc6cad76356 Merge: e8bb8f19e73a1 e0fe6a31cac84 Author: Mark Brown Date: Fri Jan 6 16:31:35 2023 +0000 spi: SPI core CS delay property rename From: Hector Martin Date: Wed, 04 Jan 2023 18:36:26 +0900 Message-Id: <20230104093631.15611-1-marcan@marcan.st> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Merge changes from Hector Martin : This brings the name of the cs-setup-ns parameter which was added during the merge window into line with other delay properties. commit 133f30d3a8e1dd89d3c29324263d7065da1d39d0 Author: Tero Kristo Date: Fri Jan 6 17:40:46 2023 +0530 remoteproc: pru: Configure firmware based on client setup Client device node property firmware-name is now used to configure firmware for the PRU instances. The default firmware is also restored once releasing the PRU resource. Signed-off-by: Suman Anna Signed-off-by: Tero Kristo Signed-off-by: Grzegorz Jaszczyk Signed-off-by: MD Danish Anwar Reviewed-by: Roger Quadros Link: https://lore.kernel.org/r/20230106121046.886863-7-danishanwar@ti.com Signed-off-by: Mathieu Poirier commit 102853400321baea2527917e6e89be33508c3e18 Author: Roger Quadros Date: Fri Jan 6 17:40:45 2023 +0530 remoteproc: pru: Add pru_rproc_set_ctable() function Some firmwares expect the OS drivers to configure the CTABLE entries publishing dynamically allocated memory regions. For example, the PRU Ethernet firmwares use the C28 and C30 entries for retrieving the Shared RAM and System SRAM (OCMC) areas allocated by the PRU Ethernet client driver. Provide a way for users to do that through a new API, pru_rproc_set_ctable(). The API returns 0 on success and a negative value on error. NOTE: The programmable CTABLE entries are typically re-programmed by the PRU firmwares when dealing with a certain block of memory during block processing. This API provides an interface to the PRU client drivers to publish a dynamically allocated memory block with the PRU firmware using a CTABLE entry instead of a negotiated address in shared memory. Additional synchronization may be needed between the PRU client drivers and firmwares if different addresses needs to be published at run-time reusing the same CTABLE entry. CTABLE for stands for "constant table". Each CTable entry just holds the upper address bits so PRU can reference to external memory with larger address bits. For use case please see prueth_sw_emac_config() in "drivers/net/ethernet/ti/prueth_switch.c" /* Set in constant table C28 of PRUn to ICSS Shared memory */ pru_rproc_set_ctable(prueth->pru0, PRU_C28, sharedramaddr); pru_rproc_set_ctable(prueth->pru1, PRU_C28, sharedramaddr); /* Set in constant table C30 of PRUn to OCMC memory */ pru_rproc_set_ctable(prueth->pru0, PRU_C30, ocmcaddr); pru_rproc_set_ctable(prueth->pru1, PRU_C30, ocmcaddr); Signed-off-by: Andrew F. Davis Signed-off-by: Suman Anna Signed-off-by: Roger Quadros Signed-off-by: Grzegorz Jaszczyk Signed-off-by: MD Danish Anwar Link: https://lore.kernel.org/r/20230106121046.886863-6-danishanwar@ti.com Signed-off-by: Mathieu Poirier commit 2da812ffcd11c31ef897615798a8a66041a5b73b Author: Suman Anna Date: Fri Jan 6 17:40:44 2023 +0530 remoteproc: pru: Make sysfs entries read-only for PRU client driven boots The PRU remoteproc driver is not configured for 'auto-boot' by default, and allows to be booted either by in-kernel PRU client drivers or by userspace using the generic remoteproc sysfs interfaces. The sysfs interfaces should not be permitted to change the remoteproc firmwares or states when a PRU is being managed by an in-kernel client driver. Use the newly introduced remoteproc generic 'sysfs_read_only' flag to provide these restrictions by setting and clearing it appropriately during the PRU acquire and release steps. Signed-off-by: Suman Anna Signed-off-by: Grzegorz Jaszczyk Signed-off-by: MD Danish Anwar Reviewed-by: Roger Quadros Link: https://lore.kernel.org/r/20230106121046.886863-5-danishanwar@ti.com Signed-off-by: Mathieu Poirier commit 919e8942548aa878d374b1b51aa68fdf751f18b8 Author: MD Danish Anwar Date: Fri Jan 6 17:40:43 2023 +0530 remoteproc: pru: Add APIs to get and put the PRU cores Add two new APIs, pru_rproc_get() and pru_rproc_put(), to the PRU driver to allow client drivers to acquire and release the remoteproc device associated with a PRU core. The PRU cores are treated as resources with only one client owning it at a time. The pru_rproc_get() function returns the rproc handle corresponding to a PRU core identified by the device tree "ti,prus" property under the client node. The pru_rproc_put() is the complementary function to pru_rproc_get(). Signed-off-by: Suman Anna Signed-off-by: Tero Kristo Signed-off-by: Grzegorz Jaszczyk Signed-off-by: MD Danish Anwar Reviewed-by: Roger Quadros Link: https://lore.kernel.org/r/20230106121046.886863-4-danishanwar@ti.com Signed-off-by: Mathieu Poirier commit 9b9ad70f28675c45ef93cfb6e4af9403cb7bd34c Author: MD Danish Anwar Date: Fri Jan 6 17:40:42 2023 +0530 remoteproc: pru: Add enum for PRU Core Identifiers. Introducing enum pruss_pru_id for PRU Core Identifiers. PRUSS_PRU0 indicates PRU Core 0. PRUSS_PRU1 indicates PRU Core 1. PRUSS_NUM_PRUS indicates the total number of PRU Cores. Signed-off-by: MD Danish Anwar Reviewed-by: Roger Quadros Link: https://lore.kernel.org/r/20230106121046.886863-3-danishanwar@ti.com Signed-off-by: Mathieu Poirier commit d6e21ef31e7fa43554f9c7666b7b4c54651c256f Author: Suman Anna Date: Fri Jan 6 17:40:41 2023 +0530 dt-bindings: remoteproc: Add PRU consumer bindings Add DT schema binding for PRU consumers. The binding includes all the common properties that can be used by different PRU consumer or application nodes and supported by the PRU remoteproc driver. These are used to configure the PRU hardware for specific user applications. The application nodes themselves should define their own bindings. Signed-off-by: Tero Kristo Signed-off-by: Suman Anna Signed-off-by: Grzegorz Jaszczyk Signed-off-by: MD Danish Anwar Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230106121046.886863-2-danishanwar@ti.com Signed-off-by: Mathieu Poirier commit 6d0c4b11e743b84eb57898783e9adecb9083b269 Author: Rong Tao Date: Thu Jan 5 22:36:33 2023 +0800 libbpf: Poison strlcpy() Since commit 9fc205b413b3("libbpf: Add sane strncpy alternative and use it internally") introduce libbpf_strlcpy(), thus add strlcpy() to a poison list to prevent accidental use of it. Signed-off-by: Rong Tao Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/tencent_5695A257C4D16B4413036BA1DAACDECB0B07@qq.com commit 5220cb493bf418cc4ce5f3ba961dbd0207441731 Author: Andy Shevchenko Date: Wed Nov 30 15:48:38 2022 +0200 xhci: Convert to use list_count_nodes() The list API provides the list_count_nodes() to help with counting existing nodes in the list. Utilise it. Acked-by: Mathias Nyman Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221130134838.23805-4-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 66eccb5274c0b1cdca3bbd1b3627c52e94575808 Author: Andy Shevchenko Date: Wed Nov 30 15:48:37 2022 +0200 usb: gadget: udc: bcm63xx: Convert to use list_count_nodes() The list API provides the list_count_nodes() to help with counting existing nodes in the list. Utilise it. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221130134838.23805-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 94c6bcec9f6c4843a9a8d07dddc042ca7a93777c Author: Andy Shevchenko Date: Wed Nov 30 15:48:36 2022 +0200 usb: gadget: hid: Convert to use list_count_nodes() The list API provides the list_count_nodes() to help with counting existing nodes in the list. Utilise it. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221130134838.23805-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 4d70c74659d9746502b23d055dba03d1d28ec388 Author: Andy Shevchenko Date: Wed Nov 30 15:48:35 2022 +0200 i915: Move list_count() to list.h as list_count_nodes() for broader use Some of the existing users, and definitely will be new ones, want to count existing nodes in the list. Provide a generic API for that by moving code from i915 to list.h. Reviewed-by: Lucas De Marchi Acked-by: Jani Nikula Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221130134838.23805-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit b04e1747fbcc6bf4a93a95b5c2505bf2a6467ee8 Author: Saranya Gopal Date: Mon Jan 2 11:51:08 2023 +0530 usb: typec: ucsi: Register USB Power Delivery Capabilities UCSI allows the USB PD capabilities to be read with the GET_PDO command. This will register those capabilities and make them visible to user space. Reviewed-by: Heikki Krogerus Co-developed-by: Rajaram Regupathy Signed-off-by: Rajaram Regupathy Signed-off-by: Saranya Gopal Link: https://lore.kernel.org/r/20230102062108.838423-1-saranya.gopal@intel.com Signed-off-by: Greg Kroah-Hartman commit 9aa1afc8f62263ed064dc5d94fa7a7ee6054e2ed Author: Uwe Kleine-König Date: Mon Dec 12 22:27:17 2022 +0100 usb: chipidea: imx: 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 Link: https://lore.kernel.org/r/20221212212717.3774606-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 0376aa62320cab35d8532629fdf9cd3b8cb66c8d Author: Wang Yufen Date: Sat Nov 26 22:35:32 2022 +0800 usb: musb: fix error return code in da8xx_musb_init() Fix to return a negative error code -ENODEV instead of 0 as before commit 09721ba6daa1 ("usb: musb: da8xx: Call earlier clk_prepare_enable()") did. Signed-off-by: Wang Yufen Link: https://lore.kernel.org/r/1669473332-14165-1-git-send-email-wangyufen@huawei.com Signed-off-by: Greg Kroah-Hartman commit b566d38857fcb6777f25b674b90a831eec0817a2 Author: John Keeping Date: Thu Nov 24 17:04:28 2022 +0000 usb: gadget: f_fs: use io_data->status consistently Commit fb1f16d74e26 ("usb: gadget: f_fs: change ep->status safe in ffs_epfile_io()") added a new ffs_io_data::status field to fix lifetime issues in synchronous requests. While there are no similar lifetime issues for asynchronous requests (the separate ep member in ffs_io_data avoids them) using the status field means the USB request can be freed earlier and that there is more consistency between the synchronous and asynchronous I/O paths. Cc: Linyu Yuan Signed-off-by: John Keeping Reviewed-by: Linyu Yuan Link: https://lore.kernel.org/r/20221124170430.3998755-1-john@metanate.com Signed-off-by: Greg Kroah-Hartman commit a8d3392e0e5cfeb03f0cea1f2bc3f5f183c1deb4 Author: Gaosheng Cui Date: Wed Nov 23 09:41:21 2022 +0800 usb: gadget: fusb300_udc: free irq on the error path in fusb300_probe() When request_irq(ires1->start) failed in w5300_hw_probe(), irq ires->start has not been freed, and on the clean_up3 error path, we also need to free ires1->start irq, fix it. In addition, We should add free_irq in fusb300_remove(), and give the lables a proper name so that they can be understood easily, so add free_irq in fusb300_remove(), and update clean_up3 to err_alloc_request. Fixes: 0fe6f1d1f612 ("usb: udc: add Faraday fusb300 driver") Signed-off-by: Gaosheng Cui Link: https://lore.kernel.org/r/20221123014121.1989721-1-cuigaosheng1@huawei.com Signed-off-by: Greg Kroah-Hartman commit 001b0c780eac328bc48b70b8437f202a4ed785e4 Author: Badhri Jagan Sridharan Date: Sun Dec 11 11:37:55 2022 -0800 usb: typec: altmodes/displayport: Add hpd sysfs attribute Exporsing HotPlugDetect(HPD) helps userspace to infer HPD state as defined by VESA DisplayPort Alt Mode on USB Type-C Standard. This allows userspace to notify users for self help, for instance, to hint user that the display port cable is probably detached (or) the display port sink (viz., monitors ect.,) is un-powered. Also helps to debug issues reported from field. This change adds an additional attribute "hpd" to the existing "displayport" attributes. VESA DisplayPort Alt Mode on USB Type-C Standard defines how HotPlugDetect(HPD) shall be supported on the USB-C connector when operating in DisplayPort Alt Mode. This is a read only node which reflects the current state of HPD. Valid values: - 1 when HPD’s logical state is high (HPD_High) - 0 when HPD’s logical state is low (HPD_Low) Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20221211193755.1392128-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit f1f73651a0849c26b735e7cc1543fa650162b51c Author: Jiri Kosina Date: Fri Jan 6 15:49:55 2023 +0100 HID: hid-sensor-custom: Fix big on-stack allocation in hid_sensor_custom_get_known() struct hid_sensor_custom_properties is currently 384 bytes big, which consumes too much stack space for no good reason. Make it dynamically allocated. Fixes: 98c062e824519 ("HID: hid-sensor-custom: Allow more custom iio sensors") Reported-by: kernel test robot Signed-off-by: Jiri Kosina commit d3533a8af48479a1af1a8fa7fcb0e5161398c94e Author: Thomas Zimmermann Date: Fri Jan 6 12:23:24 2023 +0100 drm/fb-helper: Replace bpp/depth parameter by color mode Replace the combination of bpp and depth with a single color-mode argument. Handle special cases in simpledrm and ofdrm. Hard-code XRGB8888 as fallback format for cases where no given format works. The color-mode argument accepts the same values as the kernel's video parameter. These are mostly bpp values between 1 and 32. The exceptions are 15, which has a color depth of 15 and a bpp value of 16; and 32, which has a color depth of 24 and a bpp value of 32. v4: * add back lost test for bpp_specified (Maira) * add Fixes tag (Daniel) v3: * fix ofdrm build (Maxime) v2: * minimize changes (Daniel) * use drm_driver_legacy_fb_format() (Daniel) Signed-off-by: Thomas Zimmermann Tested-by: Maíra Canal # vc4 and vkms Acked-by: Daniel Vetter Fixes: 37c90d589dc0 ("drm/fb-helper: Fix single-probe color-format selection") Cc: Thomas Zimmermann Cc: Javier Martinez Canillas Cc: Maarten Lankhorst Cc: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230106112324.22055-1-tzimmermann@suse.de commit 3a151494dc04c76add577ae66e8a04f900638aaf Author: Xu Panda Date: Wed Dec 28 09:45:49 2022 +0800 thermal/drivers/armada: 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 Link: https://lore.kernel.org/r/202212280945491860150@zte.com.cn Signed-off-by: Daniel Lezcano commit 59edcd91d852f88ef7d208029503f9b5310d0603 Author: Johan Hovold Date: Wed Dec 14 14:16:17 2022 +0100 thermal/drivers/qcom: Fix lock inversion The thermal-zone-device lock is held by core when setting trip points and the driver takes its chip lock in the corresponding callback. Fetching the thermal trip points using thermal_zone_get_trip() also involves taking the thermal-zone-device lock, which means that the chip lock can not be held when doing so. Drop the chip lock temporarily during probe to avoid the lock inversion that was detected by lockdep: ====================================================== WARNING: possible circular locking dependency detected 6.1.0-next-20221213 #122 Not tainted ------------------------------------------------------ systemd-udevd/264 is trying to acquire lock: ffff741e444a0920 (&chip->lock){+.+.}-{3:3}, at: qpnp_tm_get_temp+0xb4/0x1b0 [qcom_spmi_temp_alarm] but task is already holding lock: ffff741e44341618 (&tz->lock){+.+.}-{3:3}, at: thermal_zone_device_update+0x2c/0x70 which lock already depends on the new lock. Fixes: 78c3e2429be8 ("thermal/drivers/qcom: Use generic thermal_zone_get_trip() function") Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221214131617.2447-5-johan+linaro@kernel.org Signed-off-by: Daniel Lezcano commit b0b5d063d66e85c24c32bf169fe4879bf08ea580 Author: Johan Hovold Date: Wed Dec 14 14:16:16 2022 +0100 thermal/drivers/tegra: Fix set_trip_temp() deadlock The set_trip_temp() callback is used when changing the trip temperature through sysfs. As it is called with the thermal-zone-device lock held it must not use thermal_zone_get_trip() directly or it will deadlock. Fixes: 56d7b397cc29 ("thermal/drivers/tegra: Use generic thermal_zone_get_trip() function") Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221214131617.2447-4-johan+linaro@kernel.org Signed-off-by: Daniel Lezcano commit e6ec64f85237b48c071158617cfc954a30285fc7 Author: Johan Hovold Date: Wed Dec 14 14:16:14 2022 +0100 thermal/drivers/qcom: Fix set_trip_temp() deadlock The set_trip_temp() callback is used when changing the trip temperature through sysfs. As it is called with the thermal-zone-device lock held it must not use thermal_zone_get_trip() directly or it will deadlock. Fixes: 78c3e2429be8 ("thermal/drivers/qcom: Use generic thermal_zone_get_trip() function") Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20221214131617.2447-2-johan+linaro@kernel.org Signed-off-by: Daniel Lezcano commit 44a29a4dab73411671e0b84817a5f07e291b1501 Author: Daniel Lezcano Date: Fri Oct 14 09:32:51 2022 +0200 thermal/drivers/mellanox: Use generic thermal_zone_get_trip() function The thermal framework gives the possibility to register the trip points with the thermal zone. When that is done, no get_trip_* ops are needed and they can be removed. Convert ops content logic into generic trip points and register them with the thermal zone. Signed-off-by: Daniel Lezcano Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20221014073253.3719911-2-daniel.lezcano@linaro.org commit 3d2f20ad46f83b333025f5e8e4afc34be8f13c4c Author: Daniel Lezcano Date: Fri Oct 14 09:32:50 2022 +0200 wifi: iwlwifi: Use generic thermal_zone_get_trip() function The thermal framework gives the possibility to register the trip points with the thermal zone. When that is done, no get_trip_* ops are needed and they can be removed. The get_trip_temp, get_trip_hyst and get_trip_type are handled by the get_trip_point(). The set_trip_temp() generic function does some checks which are no longer needed in the set_trip_point() ops. Convert ops content logic into generic trip points and register them with the thermal zone. Signed-off-by: Daniel Lezcano Acked-by: Kalle Valo Acked-by: Gregory Greenman Link: https://lore.kernel.org/r/20221014073253.3719911-1-daniel.lezcano@linaro.org commit 5f28ecc1e909b2c3ab6ba4e9ba57c0f8dc66c30f Author: Jon Hunter Date: Mon Oct 10 16:03:11 2022 +0100 thermal/drivers/tegra: Fix crash when getting critical temp Commit 13bea86623be ("thermal/of: Remove of_thermal_get_crit_temp()") removed the function of_thermal_get_crit_temp() and this is causing a NULL pointer deference crash when attempting to call the 'get_crit_temp' function pointer because this function pointer is no longer initialised. Fix this by replacing the call to the 'get_crit_temp' function pointer with a call to the function thermal_zone_get_crit_temp() instead. Fixes: 13bea86623be ("thermal/of: Remove of_thermal_get_crit_temp()") Signed-off-by: Jon Hunter Link: https://lore.kernel.org/r/20221010150311.40384-1-jonathanh@nvidia.com Signed-off-by: Daniel Lezcano commit a1c306375b0638f37996bbda1e3a75c6f108a097 Author: Daniel Lezcano Date: Mon Oct 3 15:29:43 2022 +0200 thermal/drivers/exynos: Fix NULL pointer dereference when getting the critical temp The driver is assuming the get_critical temperature exists as it is inherited by the thermal of ops. But this one has been removed in favor of the generic one. Use the generic thermal_zone_get_crit_temp() function instead Fixes: 13bea86623be ("thermal/of: Remove of_thermal_get_crit_temp(") Reported-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski Signed-off-by: Daniel Lezcano commit d3ecaf17b58607c240392e810a743fbb9e1e8262 Author: Daniel Lezcano Date: Mon Oct 3 11:26:02 2022 +0200 thermal/drivers/intel: Use generic thermal_zone_get_trip() function The thermal framework gives the possibility to register the trip points with the thermal zone. When that is done, no get_trip_* ops are needed and they can be removed. Convert ops content logic into generic trip points and register them with the thermal zone. Signed-off-by: Daniel Lezcano Reviewed-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20221003092602.1323944-30-daniel.lezcano@linaro.org commit 0d2d586a86e85f10bd8fe47c219024b14de280b8 Author: Daniel Lezcano Date: Mon Oct 3 11:26:01 2022 +0200 thermal/intel/int340x: Replace parameter to simplify In the process of replacing the get_trip_* ops by the generic trip points, the current code has an 'override' property to add another indirection to a different ops. Rework this approach to prevent this indirection and make the code ready for the generic trip points conversion. Actually the get_temp() is different regarding the platform, so it is pointless to add a new set of ops but just create dynamically the ops at init time. Signed-off-by: Daniel Lezcano Reviewed-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20221003092602.1323944-29-daniel.lezcano@linaro.org commit 9ddcb8098d1a517b03c9d49aeb278919e81ddda9 Author: Daniel Lezcano Date: Mon Oct 3 11:26:00 2022 +0200 thermal/drivers/cxgb4: Use generic thermal_zone_get_trip() function The thermal framework gives the possibility to register the trip points with the thermal zone. When that is done, no get_trip_* ops are needed and they can be removed. Convert ops content logic into generic trip points and register them with the thermal zone. Signed-off-by: Daniel Lezcano Acked-by: Jakub Kicinski Link: https://lore.kernel.org/r/20221003092602.1323944-28-daniel.lezcano@linaro.org commit a1ebf2cd506baaf3e5ff04f79912dc4509f41fa9 Author: Daniel Lezcano Date: Mon Oct 3 11:25:59 2022 +0200 thermal/drivers/acerhdf: Use generic thermal_zone_get_trip() function The thermal framework gives the possibility to register the trip points with the thermal zone. When that is done, no get_trip_* ops are needed and they can be removed. Convert ops content logic into generic trip points and register them with the thermal zone. Signed-off-by: Daniel Lezcano Acked-by: Hans de Goede Acked-by: Peter Kästle Link: https://lore.kernel.org/r/20221003092602.1323944-27-daniel.lezcano@linaro.org commit 69cf4eaa681654605778262c0624274a454264a6 Author: Daniel Lezcano Date: Mon Oct 3 11:25:58 2022 +0200 thermal/drivers/ti: Remove unused macros ti_thermal_get_trip_value() / ti_thermal_trip_is_valid() The macros: ti_thermal_get_trip_value() ti_thermal_trip_is_valid() are unused. Remove them. Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20221003092602.1323944-26-daniel.lezcano@linaro.org commit 060b39d934f219386478f892879231bf262f02ca Author: Daniel Lezcano Date: Mon Oct 3 11:25:57 2022 +0200 thermal/drivers/da9062: Use generic thermal_zone_get_trip() function The thermal framework gives the possibility to register the trip points with the thermal zone. When that is done, no get_trip_* ops are needed and they can be removed. Convert ops content logic into generic trip points and register them with the thermal zone. Signed-off-by: Daniel Lezcano Reviewed-by: Adam Ward Link: https://lore.kernel.org/r/20221003092602.1323944-25-daniel.lezcano@linaro.org commit 52945c1c65fbc437a94eb0006561e7ff640cd8a8 Author: Daniel Lezcano Date: Mon Oct 3 11:25:56 2022 +0200 thermal/drivers/broadcom: Use generic thermal_zone_get_trip() function The thermal framework gives the possibility to register the trip points with the thermal zone. When that is done, no get_trip_* ops are needed and they can be removed. Convert ops content logic into generic trip points and register them with the thermal zone. Signed-off-by: Daniel Lezcano Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20221003092602.1323944-24-daniel.lezcano@linaro.org commit 0b6a3e459e1e615cb2d8c2e33b63e9589ec17850 Author: Daniel Lezcano Date: Mon Oct 3 11:25:55 2022 +0200 thermal/drivers/rcar: Use generic thermal_zone_get_trip() function The thermal framework gives the possibility to register the trip points with the thermal zone. When that is done, no get_trip_* ops are needed and they can be removed. Convert ops content logic into generic trip points and register them with the thermal zone. Signed-off-by: Daniel Lezcano Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20221003092602.1323944-23-daniel.lezcano@linaro.org commit 30233a229fdbca747896e279f88df8e66ef44a4e Author: Daniel Lezcano Date: Mon Oct 3 11:25:54 2022 +0200 thermal/drivers/imx: Use generic thermal_zone_get_trip() function The thermal framework gives the possibility to register the trip points with the thermal zone. When that is done, no get_trip_* ops are needed and they can be removed. Convert ops content logic into generic trip points and register them with the thermal zone. Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20221003092602.1323944-22-daniel.lezcano@linaro.org commit 28fd2cd9b38ba82578d21e71acd93010a77c9942 Author: Daniel Lezcano Date: Mon Oct 3 11:25:53 2022 +0200 thermal/drivers/st: Use generic trip points The thermal framework gives the possibility to register the trip points with the thermal zone. When that is done, no get_trip_* ops are needed and they can be removed. Convert to the generic trip points Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20221003092602.1323944-21-daniel.lezcano@linaro.org commit aacfbf15e0ac2ba1e1b848fc439a9c7c7fd90934 Author: Daniel Lezcano Date: Mon Oct 3 11:25:52 2022 +0200 thermal/of: Remove of_thermal_get_crit_temp() The generic version of of_thermal_get_crit_temp() can be used. Let's remove this ops which is pointless. Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20221003092602.1323944-20-daniel.lezcano@linaro.org commit 810245133eaec213517bad835e394cbf4fb2d6cd Author: Daniel Lezcano Date: Mon Oct 3 11:25:51 2022 +0200 thermal/of: Remove of_thermal_set_trip_hyst() The thermal core is providing the generic thermal_zone_set_trip() function which does exactly what the OF ops function is doing. It is pointless to define our own version, just remove the ops and the thermal_zone_set_trip() will take care of it. Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20221003092602.1323944-19-daniel.lezcano@linaro.org commit f9061f4e15c5e1f322f7765a7b054bafd4d0bc59 Author: Daniel Lezcano Date: Mon Oct 3 11:25:50 2022 +0200 thermal/of: Remove of_thermal_is_trip_valid() There is no benefit with the of_thermal_is_trip_valid() function as it does the check the thermal_zone_get_trip() is already doing for the sake of getting the trip point. As all the calls have been replaced by thermal_zone_get_trip(), there is no more users of of_thermal_is_trip_valid(). Remove the function. Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20221003092602.1323944-18-daniel.lezcano@linaro.org commit 2480b02a36cec8a71dba8fc3e4caeaed03669e62 Author: Daniel Lezcano Date: Mon Oct 3 11:25:49 2022 +0200 thermal/of: Remove of_thermal_get_ntrips() The thermal OF code uses the generic trip points to initialize the thermal zone. Consequently thermal_zone_get_num_trips() can be used and the of_thermal_get_ntrips() is no longer needed. Remove it. Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20221003092602.1323944-17-daniel.lezcano@linaro.org commit d5299c1b829f4754e2fa0c62ac6b02545efe4329 Author: Daniel Lezcano Date: Mon Oct 3 11:25:48 2022 +0200 thermal/drivers/rcar_gen3: Use the generic function to get the number of trips The thermal core framework allows to get the number of thermal trips, use it instead of visiting the thermal core structure internals. Signed-off-by: Daniel Lezcano Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20221003092602.1323944-16-daniel.lezcano@linaro.org commit eb2bb3be1384d91b65c7ca956f6fe7bfd5391ee2 Author: Daniel Lezcano Date: Mon Oct 3 11:25:47 2022 +0200 thermal/drivers/armada: Use generic thermal_zone_get_trip() function The thermal framework gives the possibility to register the trip points with the thermal zone. When that is done, no get_trip_* ops are needed and they can be removed. Convert ops content logic into generic trip points and register them with the thermal zone. Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20221003092602.1323944-15-daniel.lezcano@linaro.org commit 1fa86b0a36927ed13a1505c9ee7b80c66718c733 Author: Daniel Lezcano Date: Mon Oct 3 11:25:46 2022 +0200 thermal/drivers/qcom: Use generic thermal_zone_get_trip() function The thermal framework gives the possibility to register the trip points with the thermal zone. When that is done, no get_trip_* ops are needed and they can be removed. Convert ops content logic into generic trip points and register them with the thermal zone. Signed-off-by: Daniel Lezcano Acked-by: Amit Kucheria Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221003092602.1323944-14-daniel.lezcano@linaro.org commit 68a306cc839718d1875b46ebf73c25c8fa7f704a Author: Daniel Lezcano Date: Mon Oct 3 11:25:45 2022 +0200 thermal/drivers/hisi: Use generic thermal_zone_get_trip() function The thermal framework gives the possibility to register the trip points with the thermal zone. When that is done, no get_trip_* ops are needed and they can be removed. Convert ops content logic into generic trip points and register them with the thermal zone. Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20221003092602.1323944-13-daniel.lezcano@linaro.org commit c7ed8cab4079ec2e762393720aba1d3075935056 Author: Daniel Lezcano Date: Mon Oct 3 11:25:44 2022 +0200 thermal/drivers/uniphier: Use generic thermal_zone_get_trip() function The thermal framework gives the possibility to register the trip points with the thermal zone. When that is done, no get_trip_* ops are needed and they can be removed. Convert ops content logic into generic trip points and register them with the thermal zone. Signed-off-by: Daniel Lezcano Reviewed-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/20221003092602.1323944-12-daniel.lezcano@linaro.org commit 735a968d2fea8b6516d01efce2295d4f878bbbaf Author: Daniel Lezcano Date: Mon Oct 3 11:25:43 2022 +0200 thermal/drivers/tegra: Use generic thermal_zone_get_trip() function Replace a single call to thermal_zone_get_trip() to get a trip point instead of calling the different ops->get_trip* Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20221003092602.1323944-11-daniel.lezcano@linaro.org commit 03ef4855a825f9ba7195454f6498e0f056be995a Author: Daniel Lezcano Date: Mon Oct 3 11:25:42 2022 +0200 thermal/drivers/exynos: Replace of_thermal_is_trip_valid() by thermal_zone_get_trip() The thermal_zone_get_trip() does the same check as of_thermal_is_trip_valid(). Replace the call to of_thermal_is_trip_valid() by thermal_zone_get_trip(). Signed-off-by: Daniel Lezcano Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221003092602.1323944-10-daniel.lezcano@linaro.org commit a3b3dd381a0806cf19dab07a16f066e64d70a32d Author: Daniel Lezcano Date: Mon Oct 3 11:25:41 2022 +0200 thermal/drivers/exynos: of_thermal_get_ntrips() The thermal core framework allows to get the number of thermal trips, use it instead of visiting the thermal core structure internals. Signed-off-by: Daniel Lezcano Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221003092602.1323944-9-daniel.lezcano@linaro.org commit ca38255e92112c4204dbd551934505baf25849f4 Author: Daniel Lezcano Date: Mon Oct 3 11:25:40 2022 +0200 thermal/drivers/exynos: Use generic thermal_zone_get_trip() function The thermal framework gives the possibility to register the trip points with the thermal zone. When that is done, no get_trip_* ops are needed and they can be removed. Convert ops content logic into generic trip points and register them with the thermal zone. Signed-off-by: Daniel Lezcano Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221003092602.1323944-8-daniel.lezcano@linaro.org commit 5c4855d7653372f1e311b69642e8f0cc79d63f38 Author: Daniel Lezcano Date: Mon Oct 3 11:25:39 2022 +0200 thermal/of: Remove unused functions Remove the dead code: of_thermal_get_trip_points() Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20221003092602.1323944-7-daniel.lezcano@linaro.org commit 453a55a97b5bc3e4418d6b9b2f07c7899d56d1ae Author: Daniel Lezcano Date: Mon Oct 3 11:25:38 2022 +0200 thermal/of: Use generic thermal_zone_get_trip() function The thermal framework gives the possibility to register the trip points with the thermal zone. When that is done, no get_trip_* ops are needed and they can be removed. The thermal OF code uses the thermal_zone_device_register_with_trips() function. It builds the trips array and pass it to the register function. That means the get_trip_* ops are duplicated with what does already the core code. Remove them. Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20221003092602.1323944-6-daniel.lezcano@linaro.org commit 7f725a23f2b7bb338a3d41ce7bf96d6c99bdb0b7 Author: Daniel Lezcano Date: Mon Oct 3 11:25:37 2022 +0200 thermal/core/governors: Use thermal_zone_get_trip() instead of ops functions The governors are using the ops->get_trip_* functions, Replace these calls with thermal_zone_get_trip(). Signed-off-by: Daniel Lezcano Reviewed-by: Zhang Rui Reviewed-by: Lukasz Luba # IPA Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20221003092602.1323944-5-daniel.lezcano@linaro.org commit 2e38a2a981b24a9e86e687d32708a3d02707c8f6 Author: Daniel Lezcano Date: Mon Oct 3 11:25:36 2022 +0200 thermal/core: Add a generic thermal_zone_set_trip() function The thermal zone ops defines a set_trip callback where we can invoke the backend driver to set an interrupt for the next trip point temperature being crossed the way up or down, or setting the low level with the hysteresis. The ops is only called from the thermal sysfs code where the userspace has the ability to modify a trip point characteristic. With the effort of encapsulating the thermal framework core code, let's create a thermal_zone_set_trip() which is the writable side of the thermal_zone_get_trip() and put there all the ops encapsulation. Signed-off-by: Daniel Lezcano Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20221003092602.1323944-4-daniel.lezcano@linaro.org commit 0614755dbfc0ec3af59a2e09785acb009706259d Author: Daniel Lezcano Date: Mon Oct 3 11:25:35 2022 +0200 thermal/sysfs: Always expose hysteresis attributes Instead of avoiding to expose the hysteresis attributes of a thermal zone when its get_trip_hyst() operation is not defined, which is confusing, expose them always and use the default thermal_zone_get_trip() function returning 0 hysteresis when that operation is not present. The hysteresis of 0 is perfectly valid, so this change should not introduce any backwards compatibility issues. Signed-off-by: Daniel Lezcano Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20221003092602.1323944-3-daniel.lezcano@linaro.org commit 7c3d5c20dc169e55064f7f38c1c56cfbc39ee5b2 Author: Daniel Lezcano Date: Mon Oct 3 11:25:34 2022 +0200 thermal/core: Add a generic thermal_zone_get_trip() function The thermal_zone_device_ops structure defines a set of ops family, get_trip_temp(), get_trip_hyst(), get_trip_type(). Each of them is returning a property of a trip point. The result is the code is calling the ops everywhere to get a trip point which is supposed to be defined in the backend driver. It is a non-sense as a thermal trip can be generic and used by the backend driver to declare its trip points. Part of the thermal framework has been changed and all the OF thermal drivers are using the same definition for the trip point and use a thermal zone registration variant to pass those trip points which are part of the thermal zone device structure. Consequently, we can use a generic function to get the trip points when they are stored in the thermal zone device structure. This approach can be generalized to all the drivers and we can get rid of the ops->get_trip_*. That will result to a much more simpler code and make possible to rework how the thermal trip are handled in the thermal core framework as discussed previously. This change adds a function thermal_zone_get_trip() where we get the thermal trip point structure which contains all the properties (type, temp, hyst) instead of doing multiple calls to ops->get_trip_*. That opens the door for trip point extension with more attributes. For instance, replacing the trip points disabled bitmask with a 'disabled' field in the structure. Here we replace all the calls to ops->get_trip_* in the thermal core code with a call to the thermal_zone_get_trip() function. The thermal zone ops defines a callback to retrieve the critical temperature. As the trip handling is being reworked, all the trip points will be the same whatever the driver and consequently finding the critical trip temperature will be just a loop to search for a critical trip point type. Provide such a generic function, so we encapsulate the ops get_crit_temp() which can be removed when all the backend drivers are using the generic trip points handling. While at it, add the thermal_zone_get_num_trips() to encapsulate the code more and reduce the grip with the thermal framework internals. Signed-off-by: Daniel Lezcano Acked-by: Rafael J. Wysocki Reviewed-by: Zhang Rui Link: https://lore.kernel.org/r/20221003092602.1323944-2-daniel.lezcano@linaro.org commit 7e095a4ca32a7169d7c9cce16318b532c85bb39b Author: Nirmoy Das Date: Thu Jan 5 21:38:43 2023 +0100 drm/i915: Update docs in intel_wakeref.h Fix docs for __intel_wakeref_put() and intel_wakeref_get() to reflect current behaviour. Signed-off-by: Nirmoy Das Reviewed-by: Ashutosh Dixit Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230105203843.30663-1-nirmoy.das@intel.com commit 6bd4755c7c499dbcef46eaaeafa1a319da583b29 Merge: 6b754d7bd007c 82a3aef2e6af2 Author: David S. Miller Date: Fri Jan 6 12:56:20 2023 +0000 Merge branch 'devlink-unregister' Jakub Kicinski says: ==================== devlink: remove the wait-for-references on unregister Move the registration and unregistration of the devlink instances under their instance locks. Don't perform the netdev-style wait for all references when unregistering the instance. Instead the devlink instance refcount will only ensure that the memory of the instance is not freed. All places which acquire access to devlink instances via a reference must check that the instance is still registered under the instance lock. This fixes the problem of the netdev code accessing devlink instances before they are registered. RFC: https://lore.kernel.org/all/20221217011953.152487-1-kuba@kernel.org/ - rewrite the cover letter - rewrite the commit message for patch 1 - un-export and rename devl_is_alive - squash the netdevsim patches ==================== Signed-off-by: David S. Miller commit 82a3aef2e6af2fdd04d542c83b7a35990d94afc9 Author: Jakub Kicinski Date: Thu Jan 5 22:34:02 2023 -0800 netdevsim: move devlink registration under the instance lock To prevent races with netdev code accessing free devlink instances move the registration under the devlink instance lock. Core now waits for the instance to be registered before accessing it. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 5c5ea1d09fd8aec8319d629df47a581bd19f8f91 Author: Jakub Kicinski Date: Thu Jan 5 22:34:01 2023 -0800 netdevsim: rename a label err_dl_unregister should unregister the devlink instance. Looks like renaming it was missed in one of the reshufflings. Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 1d18bb1a4ddde676de948c13bca04b23cebd028b Author: Jakub Kicinski Date: Thu Jan 5 22:34:00 2023 -0800 devlink: allow registering parameters after the instance It's most natural to register the instance first and then its subobjects. Now that we can use the instance lock to protect the atomicity of all init - it should also be safe. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 6ef8f7da92750c3c25755fac39b561fff2d47378 Author: Jakub Kicinski Date: Thu Jan 5 22:33:59 2023 -0800 devlink: don't require setting features before registration Requiring devlink_set_features() to be run before devlink is registered is overzealous. devlink_set_features() itself is a leftover from old workarounds which were trying to prevent initiating reload before probe was complete. Signed-off-by: Jakub Kicinski Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 9053637e0da783efdb37bbfea6a27b856c0228d7 Author: Jakub Kicinski Date: Thu Jan 5 22:33:58 2023 -0800 devlink: remove the registration guarantee of references The objective of exposing the devlink instance locks to drivers was to let them use these locks to prevent user space from accessing the device before it's fully initialized. This is difficult because devlink_unregister() waits for all references to be released, meaning that devlink_unregister() can't itself be called under the instance lock. To avoid this issue devlink_register() was moved after subobject registration a while ago. Unfortunately the netdev paths get a hold of the devlink instances _before_ they are registered. Ideally netdev should wait for devlink init to finish (synchronizing on the instance lock). This can't work because we don't know if the instance will _ever_ be registered (in case of failures it may not). The other option of returning an error until devlink_register() is called is unappealing (user space would get a notification netdev exist but would have to wait arbitrary amount of time before accessing some of its attributes). Weaken the guarantees of the devlink references. Holding a reference will now only guarantee that the memory of the object is around. Another way of looking at it is that the reference now protects the object not its "registered" status. Use devlink instance lock to synchronize unregistration. This implies that releasing of the "main" reference of the devlink instance moves from devlink_unregister() to devlink_free(). Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit ed539ba614a079ea696b92beef1eafec66f831a4 Author: Jakub Kicinski Date: Thu Jan 5 22:33:57 2023 -0800 devlink: always check if the devlink instance is registered Always check under the instance lock whether the devlink instance is still / already registered. This is a no-op for the most part, as the unregistration path currently waits for all references. On the init path, however, we may temporarily open up a race with netdev code, if netdevs are registered before the devlink instance. This is temporary, the next change fixes it, and this commit has been split out for the ease of review. Note that in case of iterating over sub-objects which have their own lock (regions and line cards) we assume an implicit dependency between those objects existing and devlink unregistration. Signed-off-by: Jakub Kicinski Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 870c7ad4a52be2acff92d0355ca118654c7efece Author: Jakub Kicinski Date: Thu Jan 5 22:33:56 2023 -0800 devlink: protect devlink->dev by the instance lock devlink->dev is assumed to be always valid as long as any outstanding reference to the devlink instance exists. In prep for weakening of the references take the instance lock. Signed-off-by: Jakub Kicinski Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 7a54a5195b2a877a972ec21a5ca415c1fc2aec61 Author: Jakub Kicinski Date: Thu Jan 5 22:33:55 2023 -0800 devlink: update the code in netns move to latest helpers devlink_pernet_pre_exit() is the only obvious place which takes the instance lock without using the devl_ helpers. Update the code and move the error print after releasing the reference (having unlock and put together feels slightly idiomatic). Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit d772781964415c63759572b917e21c4f7ec08d9f Author: Jakub Kicinski Date: Thu Jan 5 22:33:54 2023 -0800 devlink: bump the instance index directly when iterating xa_find_after() is designed to handle multi-index entries correctly. If a xarray has two entries one which spans indexes 0-3 and one at index 4 xa_find_after(0) will return the entry at index 4. Having to juggle the two callbacks, however, is unnecessary in case of the devlink xarray, as there is 1:1 relationship with indexes. Always use xa_find() and increment the index manually. Signed-off-by: Jakub Kicinski Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 6b754d7bd007c5f68fbb2d9abd5c00d253b033d0 Author: Mahesh Bandewar Date: Wed Jan 4 18:28:42 2023 -0800 sysctl: expose all net/core sysctls inside netns All were not visible to the non-priv users inside netns. However, with 4ecb90090c84 ("sysctl: allow override of /proc/sys/net with CAP_NET_ADMIN"), these vars are protected from getting modified. A proc with capable(CAP_NET_ADMIN) can change the values so not having them visible inside netns is just causing nuisance to process that check certain values (e.g. net.core.somaxconn) and see different behavior in root-netns vs. other-netns Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Soheil Hassas Yeganeh Signed-off-by: Mahesh Bandewar Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit d2c3c8c3d3833c45c09be671da48f9d46b79e347 Author: Ashutosh Dixit Date: Thu Dec 15 11:17:27 2022 -0800 drm/i915/hwmon: Display clamped PL1 limit HW allows arbitrary PL1 limits to be set but silently clamps these values to "typical but not guaranteed" min/max values in pkg_power_sku register. Follow the same pattern for sysfs, allow arbitrary PL1 limits to be set but display clamped values when read, so that users see PL1 limits HW is likely using. Otherwise users think HW is using arbitrarily high/low PL1 limits they might have set. The previous write/read I1 power1_crit limit also follows the same clamping pattern. v2: Explain "why" in commit message and include bug link (Jani Nikula) Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/7704 Signed-off-by: Ashutosh Dixit Reviewed-by: Anshuman Gupta Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20221215191727.2468770-1-ashutosh.dixit@intel.com commit bed4b455cf5374e68879be56971c1da563bcd90c Author: Rob Clark Date: Tue Jan 3 15:49:46 2023 -0800 drm/i915: Fix potential context UAFs gem_context_register() makes the context visible to userspace, and which point a separate thread can trigger the I915_GEM_CONTEXT_DESTROY ioctl. So we need to ensure that nothing uses the ctx ptr after this. And we need to ensure that adding the ctx to the xarray is the *last* thing that gem_context_register() does with the ctx pointer. Signed-off-by: Rob Clark Fixes: eb4dedae920a ("drm/i915/gem: Delay tracking the GEM context until it is registered") Fixes: a4c1cdd34e2c ("drm/i915/gem: Delay context creation (v3)") Fixes: 49bd54b390c2 ("drm/i915: Track all user contexts per client") Cc: # v5.10+ Reviewed-by: Tvrtko Ursulin Reviewed-by: Andi Shyti [tursulin: Stable and fixes tags add/tidy.] Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20230103234948.1218393-1-robdclark@gmail.com commit c970d42001f2dffd587cc38458fea4130796be43 Author: Taehee Yoo Date: Sun Jan 1 09:12:52 2023 +0000 crypto: x86/aria - implement aria-avx512 aria-avx512 implementation uses AVX512 and GFNI. It supports 64way parallel processing. So, byteslicing code is changed to support 64way parallel. And it exports some aria-avx2 functions such as encrypt() and decrypt(). AVX and AVX2 have 16 registers. They should use memory to store/load state because of lack of registers. But AVX512 supports 32 registers. So, it doesn't require store/load in the s-box layer. It means that it can reduce overhead of store/load in the s-box layer. Also code become much simpler. Benchmark with modprobe tcrypt mode=610 num_mb=8192, i3-12100: ARIA-AVX512(128bit and 256bit) testing speed of multibuffer ecb(aria) (ecb-aria-avx512) encryption tcrypt: 1 operation in 1504 cycles (1024 bytes) tcrypt: 1 operation in 4595 cycles (4096 bytes) tcrypt: 1 operation in 1763 cycles (1024 bytes) tcrypt: 1 operation in 5540 cycles (4096 bytes) testing speed of multibuffer ecb(aria) (ecb-aria-avx512) decryption tcrypt: 1 operation in 1502 cycles (1024 bytes) tcrypt: 1 operation in 4615 cycles (4096 bytes) tcrypt: 1 operation in 1759 cycles (1024 bytes) tcrypt: 1 operation in 5554 cycles (4096 bytes) ARIA-AVX2 with GFNI(128bit and 256bit) testing speed of multibuffer ecb(aria) (ecb-aria-avx2) encryption tcrypt: 1 operation in 2003 cycles (1024 bytes) tcrypt: 1 operation in 5867 cycles (4096 bytes) tcrypt: 1 operation in 2358 cycles (1024 bytes) tcrypt: 1 operation in 7295 cycles (4096 bytes) testing speed of multibuffer ecb(aria) (ecb-aria-avx2) decryption tcrypt: 1 operation in 2004 cycles (1024 bytes) tcrypt: 1 operation in 5956 cycles (4096 bytes) tcrypt: 1 operation in 2409 cycles (1024 bytes) tcrypt: 1 operation in 7564 cycles (4096 bytes) Signed-off-by: Taehee Yoo Signed-off-by: Herbert Xu commit 37d8d3ae7a58cb16fa3f4f1992d2ee36bc621438 Author: Taehee Yoo Date: Sun Jan 1 09:12:51 2023 +0000 crypto: x86/aria - implement aria-avx2 aria-avx2 implementation uses AVX2, AES-NI, and GFNI. It supports 32way parallel processing. So, byteslicing code is changed to support 32way parallel. And it exports some aria-avx functions such as encrypt() and decrypt(). There are two main logics, s-box layer and diffusion layer. These codes are the same as aria-avx implementation. But some instruction are exchanged because they don't support 256bit registers. Also, AES-NI doesn't support 256bit register. So, aesenclast and aesdeclast are used twice like below: vextracti128 $1, ymm0, xmm6; vaesenclast xmm7, xmm0, xmm0; vaesenclast xmm7, xmm6, xmm6; vinserti128 $1, xmm6, ymm0, ymm0; Benchmark with modprobe tcrypt mode=610 num_mb=8192, i3-12100: ARIA-AVX2 with GFNI(128bit and 256bit) testing speed of multibuffer ecb(aria) (ecb-aria-avx2) encryption tcrypt: 1 operation in 2003 cycles (1024 bytes) tcrypt: 1 operation in 5867 cycles (4096 bytes) tcrypt: 1 operation in 2358 cycles (1024 bytes) tcrypt: 1 operation in 7295 cycles (4096 bytes) testing speed of multibuffer ecb(aria) (ecb-aria-avx2) decryption tcrypt: 1 operation in 2004 cycles (1024 bytes) tcrypt: 1 operation in 5956 cycles (4096 bytes) tcrypt: 1 operation in 2409 cycles (1024 bytes) tcrypt: 1 operation in 7564 cycles (4096 bytes) ARIA-AVX with GFNI(128bit and 256bit) testing speed of multibuffer ecb(aria) (ecb-aria-avx) encryption tcrypt: 1 operation in 2761 cycles (1024 bytes) tcrypt: 1 operation in 9390 cycles (4096 bytes) tcrypt: 1 operation in 3401 cycles (1024 bytes) tcrypt: 1 operation in 11876 cycles (4096 bytes) testing speed of multibuffer ecb(aria) (ecb-aria-avx) decryption tcrypt: 1 operation in 2735 cycles (1024 bytes) tcrypt: 1 operation in 9424 cycles (4096 bytes) tcrypt: 1 operation in 3369 cycles (1024 bytes) tcrypt: 1 operation in 11954 cycles (4096 bytes) Signed-off-by: Taehee Yoo Signed-off-by: Herbert Xu commit 35344cf30f2b080f75b4097eebcd7567e54bce22 Author: Taehee Yoo Date: Sun Jan 1 09:12:50 2023 +0000 crypto: x86/aria - do not use magic number offsets of aria_ctx aria-avx assembly code accesses members of aria_ctx with magic number offset. If the shape of struct aria_ctx is changed carelessly, aria-avx will not work. So, we need to ensure accessing members of aria_ctx with correct offset values, not with magic numbers. It adds ARIA_CTX_enc_key, ARIA_CTX_dec_key, and ARIA_CTX_rounds in the asm-offsets.c So, correct offset definitions will be generated. aria-avx assembly code can access members of aria_ctx safely with these definitions. Signed-off-by: Taehee Yoo Signed-off-by: Herbert Xu commit 8e7d7ce2e3947013a7b12452db42cb73021e13a0 Author: Taehee Yoo Date: Sun Jan 1 09:12:49 2023 +0000 crypto: x86/aria - add keystream array into request ctx avx accelerated aria module used local keystream array. But, keystream array size is too big. So, it puts the keystream array into request ctx. Signed-off-by: Taehee Yoo Signed-off-by: Herbert Xu commit 91dfd98216d817ec5f1c55890bacb7b4fe9b068a Author: David Rientjes Date: Fri Dec 30 14:18:46 2022 -0800 crypto: ccp - Avoid page allocation failure warning for SEV_GET_ID2 For SEV_GET_ID2, the user provided length does not have a specified limitation because the length of the ID may change in the future. The kernel memory allocation, however, is implicitly limited to 4MB on x86 by the page allocator, otherwise the kzalloc() will fail. When this happens, it is best not to spam the kernel log with the warning. Simply fail the allocation and return ENOMEM to the user. Fixes: d6112ea0cb34 ("crypto: ccp - introduce SEV_GET_ID2 command") Reported-by: Andy Nguyen Reported-by: Peter Gonda Suggested-by: Herbert Xu Signed-off-by: David Rientjes Acked-by: Tom Lendacky Signed-off-by: Herbert Xu commit 8e613cec25196b51601dfac50c5bf229acd72bc6 Author: Herbert Xu Date: Fri Dec 30 15:31:33 2022 +0800 crypto: talitos - Remove GFP_DMA and add DMA alignment padding GFP_DMA does not guarantee that the returned memory is aligned for DMA. It should be removed where it is superfluous. However, kmalloc may start returning DMA-unaligned memory in future so fix this by adding the alignment by hand. Signed-off-by: Herbert Xu commit 199354d7fb6eaa2cc5bb650af0bca624baffee35 Author: Herbert Xu Date: Fri Dec 30 13:21:38 2022 +0800 crypto: caam - Remove GFP_DMA and add DMA alignment padding GFP_DMA does not guarantee that the returned memory is aligned for DMA. It should be removed where it is superfluous. However, kmalloc may start returning DMA-unaligned memory in future so fix this by adding the alignment by hand. Signed-off-by: Herbert Xu commit c27b2d2012e1826674255b9e45b61c172a267e1c Author: Nicolai Stange Date: Thu Dec 29 22:17:10 2022 +0100 crypto: testmgr - allow ecdsa-nist-p256 and -p384 in FIPS mode The kernel provides implementations of the NIST ECDSA signature verification primitives. For key sizes of 256 and 384 bits respectively they are approved and can be enabled in FIPS mode. Do so. Signed-off-by: Nicolai Stange Signed-off-by: Vladis Dronov Signed-off-by: Herbert Xu commit 2912eb9b17ac29facd799ffe05fdb7cf10017e82 Author: Nicolai Stange Date: Thu Dec 29 22:17:09 2022 +0100 crypto: testmgr - disallow plain ghash in FIPS mode ghash may be used only as part of the gcm(aes) construction in FIPS mode. Since commit d6097b8d5d55 ("crypto: api - allow algs only in specific constructions in FIPS mode") there's support for using spawns which by itself are marked as non-approved from approved template instantiations. So simply mark plain ghash as non-approved in testmgr to block any attempts of direct instantiations in FIPS mode. Signed-off-by: Nicolai Stange Signed-off-by: Vladis Dronov Signed-off-by: Herbert Xu commit 1ce94a8c2c3721be1d9bc85fd38fc8c520aa37d6 Author: Nicolai Stange Date: Thu Dec 29 22:17:08 2022 +0100 crypto: testmgr - disallow plain cbcmac(aes) in FIPS mode cbcmac(aes) may be used only as part of the ccm(aes) construction in FIPS mode. Since commit d6097b8d5d55 ("crypto: api - allow algs only in specific constructions in FIPS mode") there's support for using spawns which by itself are marked as non-approved from approved template instantiations. So simply mark plain cbcmac(aes) as non-approved in testmgr to block any attempts of direct instantiations in FIPS mode. Signed-off-by: Nicolai Stange Signed-off-by: Vladis Dronov Signed-off-by: Herbert Xu commit b6f5278003c4b250f19499a6561d6437b2c94c8e Author: Vladis Dronov Date: Thu Dec 29 22:17:07 2022 +0100 crypto: s390/aes - drop redundant xts key check xts_fallback_setkey() in xts_aes_set_key() will now enforce key size rule in FIPS mode when setting up the fallback algorithm keys, which makes the check in xts_aes_set_key() redundant or unreachable. So just drop this check. xts_fallback_setkey() now makes a key size check in xts_verify_key(): xts_fallback_setkey() crypto_skcipher_setkey() [ skcipher_setkey_unaligned() ] cipher->setkey() { .setkey = xts_setkey } xts_setkey() xts_verify_key() Signed-off-by: Vladis Dronov Signed-off-by: Herbert Xu commit 0ee433676e4f499cb65f3d375a60a0ac54af4c47 Author: Vladis Dronov Date: Thu Dec 29 22:17:06 2022 +0100 crypto: xts - drop xts_check_key() xts_check_key() is obsoleted by xts_verify_key(). Over time XTS crypto drivers adopted the newer xts_verify_key() variant, but xts_check_key() is still used by a number of drivers. Switch drivers to use the newer xts_verify_key() and make a couple of cleanups. This allows us to drop xts_check_key() completely and avoid redundancy. Signed-off-by: Vladis Dronov Reviewed-by: Eric Biggers Reviewed-by: Nicolai Stange Signed-off-by: Herbert Xu commit 1c4428b295884316eaff16be9c1d85f7c2361696 Author: Nicolai Stange Date: Thu Dec 29 22:17:05 2022 +0100 crypto: xts - restrict key lengths to approved values in FIPS mode According to FIPS 140-3 IG C.I., only (total) key lengths of either 256 bits or 512 bits are allowed with xts(aes). Make xts_verify_key() to reject anything else in FIPS mode. As xts(aes) is the only approved xts() template instantiation in FIPS mode, the new restriction implemented in xts_verify_key() effectively only applies to this particular construction. Signed-off-by: Nicolai Stange Signed-off-by: Vladis Dronov Signed-off-by: Herbert Xu commit 39a76cf1f5cecec2256ab2d20cf714573c5d994c Author: Herbert Xu Date: Thu Dec 29 16:58:21 2022 +0800 crypto: sun8i-ss - Remove GFP_DMA and add DMA alignment padding GFP_DMA does not guarantee that the returned memory is aligned for DMA. In fact for sun8i-ss it is superfluous and can be removed. However, kmalloc may start returning DMA-unaligned memory in future so fix this by adding the alignment by hand. Signed-off-by: Herbert Xu Tested-by: Corentin Labbe Acked-by: Corentin Labbe Signed-off-by: Herbert Xu commit 4f289826fee03571c2784272dd530aae1fd77566 Author: Herbert Xu Date: Wed Dec 28 19:03:32 2022 +0800 crypto: caam - Avoid GCC memset bug warning Certain versions of gcc don't like the memcpy with a NULL dst (which only happens with a zero length). This only happens when debugging is enabled so add an if clause to work around these warnings. A similar warning used to be generated by sparse but that was fixed years ago. Link: https://lore.kernel.org/lkml/202210290446.qBayTfzl-lkp@intel.com Reported-by: kernel test robot Reported-by: Kees Cook Reported-by: Uwe Kleine-König Tested-by: Uwe Kleine-König Signed-off-by: Herbert Xu commit 7361d1bc307b926cbca214ab67b641123c2d6357 Author: Herbert Xu Date: Tue Dec 27 15:27:39 2022 +0100 lib/mpi: Fix buffer overrun when SG is too long The helper mpi_read_raw_from_sgl sets the number of entries in the SG list according to nbytes. However, if the last entry in the SG list contains more data than nbytes, then it may overrun the buffer because it only allocates enough memory for nbytes. Fixes: 2d4d1eea540b ("lib/mpi: Add mpi sgl helpers") Reported-by: Roberto Sassu Signed-off-by: Herbert Xu Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu commit c4b40f80585c9349c401c2547ee11ecb451abb01 Author: Sven Eckelmann Date: Sat Dec 17 12:40:08 2022 +0100 batman-adv: Drop prandom.h includes The commit 8032bf1233a7 ("treewide: use get_random_u32_below() instead of deprecated function") replaced the prandom.h function prandom_u32_max with the random.h function get_random_u32_below. There is no need to still include prandom.h. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 55307f51f48e192560252b70c8b0fb504b84bc3c Author: Simon Wunderlich Date: Sat Dec 17 12:13:24 2022 +0100 batman-adv: Start new development cycle This version will contain all the (major or even only minor) changes for Linux 6.3. The version number isn't a semantic version number with major and minor information. It is just encoding the year of the expected publishing as Linux -rc1 and the number of published versions this year (starting at 0). Signed-off-by: Simon Wunderlich commit 3d759e9e24c38758abc19a4f5e1872a6460d5745 Merge: 0da6855378b9e 5ce76d78b9965 Author: Jakub Kicinski Date: Thu Jan 5 22:09:10 2023 -0800 Merge branch 'devlink-code-split-and-structured-instance-walk' Jakub Kicinski says: ==================== devlink: code split and structured instance walk Split devlink.c into a handful of files, trying to keep the "core" code away from all the command-specific implementations. The core code has been quite scattered until now. Going forward we can consider using a source file per-subobject, I think that it's quite beneficial to newcomers (based on relative ease with which folks contribute to ethtool vs devlink). But this series doesn't split everything out, yet - partially due to backporting concerns, but mostly due to lack of time. Bulk of the netlink command handling is left in a leftover.c file. Introduce a context structure for dumps, and use it to store the devlink instance ID of the last dumped devlink instance. This means we don't have to restart the walk from 0 each time. Finally - introduce a "structured walk". A centralized dump handler in devlink/netlink.c which walks the devlink instances, deals with refcounting/locking, simplifying the per-object implementations quite a bit. Inspired by the ethtool code. v1: https://lore.kernel.org/all/20230104041636.226398-1-kuba@kernel.org/ RFC: https://lore.kernel.org/all/20221215020155.1619839-1-kuba@kernel.org/ ==================== Link: https://lore.kernel.org/r/20230105040531.353563-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 5ce76d78b99650c0b22f466060d8b75df9123511 Author: Jakub Kicinski Date: Wed Jan 4 20:05:31 2023 -0800 devlink: convert remaining dumps to the by-instance scheme Soon we'll have to check if a devlink instance is alive after locking it. Convert to the by-instance dumping scheme to make refactoring easier. Most of the subobject code no longer has to worry about any devlink locking / lifetime rules (the only ones that still do are the two subject types which stubbornly use their own locking). Both dump and do callbacks are given a devlink instance which is already locked and good-to-access (do from the .pre_doit handler, dump from the new dump indirection). Note that we'll now check presence of an op (e.g. for sb_pool_get) under the devlink instance lock, that will soon be necessary anyway, because we don't hold refs on the driver modules so the memory in which ops live may be gone for a dead instance, after upcoming locking changes. Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit 07f3af66089e20fe439b219d3c9d3e68d964193f Author: Jakub Kicinski Date: Wed Jan 4 20:05:30 2023 -0800 devlink: add by-instance dump infra Most dumpit implementations walk the devlink instances. This requires careful lock taking and reference dropping. Factor the loop out and provide just a callback to handle a single instance dump. Convert one user as an example, other users converted in the next change. Slightly inspired by ethtool netlink code. Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit e4d5015bc11bcc5123ec8805d8c7f1e28a77a8a9 Author: Jakub Kicinski Date: Wed Jan 4 20:05:29 2023 -0800 devlink: uniformly take the devlink instance lock in the dump loop Move the lock taking out of devlink_nl_cmd_region_get_devlink_dumpit(). This way all dumps will take the instance lock in the main iteration loop directly, making refactoring and reading the code easier. Reviewed-by: Jiri Pirko Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit c9666bac537e0f98ce15ea57c5fb25fc0a9a29b1 Author: Jakub Kicinski Date: Wed Jan 4 20:05:28 2023 -0800 devlink: restart dump based on devlink instance ids (function) Use xarray id for cases of sub-objects which are iterated in a function. Reviewed-by: Jiri Pirko Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit a8f947073f4ae489e8b9f3c19a17341cb260f660 Author: Jakub Kicinski Date: Wed Jan 4 20:05:27 2023 -0800 devlink: restart dump based on devlink instance ids (nested) Use xarray id for cases of simple sub-object iteration. We'll now use the state->instance for the devlink instances and state->idx for subobject index. Moving the definition of idx into the inner loop makes sense, so while at it also move other sub-object local variables into the loop. Reviewed-by: Jiri Pirko Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit 731d69a6bd13b7c0cdbd3607edfa681269d54828 Author: Jakub Kicinski Date: Wed Jan 4 20:05:26 2023 -0800 devlink: restart dump based on devlink instance ids (simple) xarray gives each devlink instance an id and allows us to restart walk based on that id quite neatly. This is nice both from the perspective of code brevity and from the stability of the dump (devlink instances disappearing from before the resumption point will not cause inconsistent dumps). This patch takes care of simple cases where state->idx counts devlink instances only. Reviewed-by: Jacob Keller Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit a0e13dfdc391dfb2a9b165e2475fb1796c9be98d Author: Jakub Kicinski Date: Wed Jan 4 20:05:25 2023 -0800 devlink: health: combine loops in dump Walk devlink instances only once. Dump the instance reporters and port reporters before moving to the next instance. User space should not depend on ordering of messages. This will make improving stability of the walk easier. Reviewed-by: Jiri Pirko Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit 8861c0933c78e3631fe752feadc0d2a6e5eab1e1 Author: Jakub Kicinski Date: Wed Jan 4 20:05:24 2023 -0800 devlink: drop the filter argument from devlinks_xa_find_get Looks like devlinks_xa_find_get() was intended to get the mark from the @filter argument. It doesn't actually use @filter, passing DEVLINK_REGISTERED to xa_find_fn() directly. Walking marks other than registered is unlikely so drop @filter argument completely. Reviewed-by: Jiri Pirko Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit 20615659b514c8f94e9fef590e873b5ca673a49d Author: Jakub Kicinski Date: Wed Jan 4 20:05:23 2023 -0800 devlink: remove start variables from dumps The start variables made the code clearer when we had to access cb->args[0] directly, as the name args doesn't explain much. Now that we use a structure to hold state this seems no longer needed. Reviewed-by: Jacob Keller Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 3015f8224961dbc701c7e0b9e74823289efbec0a Author: Jakub Kicinski Date: Wed Jan 4 20:05:22 2023 -0800 devlink: use an explicit structure for dump context Create a dump context structure instead of using cb->args as an unsigned long array. This is a pure conversion which is intended to be as much of a noop as possible. Subsequent changes will use this to simplify the code. The two non-trivial parts are: - devlink_nl_cmd_health_reporter_dump_get_dumpit() checks args[0] to see if devlink_fmsg_dumpit() has already been called (whether this is the first msg), but doesn't use the exact value, so we can drop the local variable there already - devlink_nl_cmd_region_read_dumpit() uses args[0] for address but we'll use args[1] now, shouldn't matter Reviewed-by: Jacob Keller Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 2c7bc10d0f7b0f66d9042ed88bb3ecd588352a00 Author: Jakub Kicinski Date: Wed Jan 4 20:05:21 2023 -0800 netlink: add macro for checking dump ctx size We encourage casting struct netlink_callback::ctx to a local struct (in a comment above the field). Provide a convenience macro for checking if the local struct fits into the ctx. Reviewed-by: Jacob Keller Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 623cd13b165486afaa2df706d49209392f3764ca Author: Jakub Kicinski Date: Wed Jan 4 20:05:20 2023 -0800 devlink: split out netlink code Move out the netlink glue into a separate file. Leave the ops in the old file because we'd have to export a ton of functions. Going forward we should switch to split ops which will let us to put the new ops in the netlink.c file. Pure code move, no functional changes. Reviewed-by: Jacob Keller Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 687125b5799cd5120437fa455cfccbe8537916ff Author: Jakub Kicinski Date: Wed Jan 4 20:05:19 2023 -0800 devlink: split out core code Move core code into a separate file. It's spread around the main file which makes refactoring and figuring out how devlink works harder. Move the xarray, all the most core devlink instance code out like locking, ref counting, alloc, register, etc. Leave port stuff in leftover.c, if we want to move port code it'd probably be to its own file. Reviewed-by: Jacob Keller Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit e50ef40f9a9a35d8526d38e6b5a165178fa1857f Author: Jakub Kicinski Date: Wed Jan 4 20:05:18 2023 -0800 devlink: rename devlink_netdevice_event -> devlink_port_netdevice_event To make the upcoming change a pure(er?) code move rename devlink_netdevice_event -> devlink_port_netdevice_event. This makes it clear that it only touches ports and doesn't belong cleanly in the core. Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit f05bd8ebeb69c803efd6d8a76d96b7fcd7011094 Author: Jakub Kicinski Date: Wed Jan 4 20:05:17 2023 -0800 devlink: move code to a dedicated directory The devlink code is hard to navigate with 13kLoC in one file. I really like the way Michal split the ethtool into per-command files and core. It'd probably be too much to split it all up, but we can at least separate the core parts out of the per-cmd implementations and put it in a directory so that new commands can be separate files. Move the code, subsequent commit will do a partial split. Reviewed-by: Jacob Keller Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 0da6855378b9e89c025d3eb43125712498b71e0e Merge: afd50da912865 bfb798545d47d Author: Jakub Kicinski Date: Thu Jan 5 22:03:15 2023 -0800 Merge branch 'net-ipa-simplify-ipa-interrupt-handling' Alex Elder says: ==================== net: ipa: simplify IPA interrupt handling One of the IPA's two IRQs fires when data on a suspended channel is available (to request that the channel--or system--be resumed to recieve the pending data). This interrupt also handles a few conditions signaled by the embedded microcontroller. For this "IPA interrupt", the current code requires a handler to be dynamically registered for each interrupt condition. Any condition that has no registered handler is quietly ignored. This design is derived from the downstream IPA driver implementation. There isn't any need for this complexity. Even in the downstream code, only four of the available 30 or so IPA interrupt conditions are ever handled. So these handlers can pretty easily just be called directly in the main IRQ handler function. This series simplifies the interrupt handling code by having the small number of IPA interrupt handlers be called directly, rather than having them be registered dynamically. Version 2 just adds a missing forward-reference, as suggested by Caleb. ==================== Link: https://lore.kernel.org/r/20230104175233.2862874-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit bfb798545d47d3517474a0a6e5ce4e6ff9ed4d95 Author: Alex Elder Date: Wed Jan 4 11:52:33 2023 -0600 net: ipa: don't maintain IPA interrupt handler array We can call the two IPA interrupt handler functions directly; there's no need to maintain the array of handler function pointers any more. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 8d8d3f1a3ef949a52434520794ef44c5789b8872 Author: Alex Elder Date: Wed Jan 4 11:52:32 2023 -0600 net: ipa: kill ipa_interrupt_add() The dynamic assignment of IPA interrupt handlers isn't needed; we only handle three IPA interrupt types, and their handler functions are now assigned directly. We can get rid of ipa_interrupt_add() and ipa_interrupt_remove() now, because they serve no purpose. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 482ae3a993e479254533cc6f37ab606e9a7baf86 Author: Alex Elder Date: Wed Jan 4 11:52:31 2023 -0600 net: ipa: register IPA interrupt handlers directly Declare the microcontroller IPA interrupt handler publicly, and assign it directly in ipa_interrupt_config(). Make the SUSPEND IPA interrupt handler public, and rename it ipa_power_suspend_handler(). Assign it directly in ipa_interrupt_config() as well. This makes it unnecessary to do this in ipa_interrupt_add(). Make similar changes for removing IPA interrupt handlers. The next two patches will finish the cleanup, removing the add/remove functions and the handler array entirely. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit d50ed35587193e8e3b201769c785dc4bc61852b0 Author: Alex Elder Date: Wed Jan 4 11:52:30 2023 -0600 net: ipa: enable IPA interrupt handlers separate from registration Expose ipa_interrupt_enable() and have functions that register IPA interrupt handlers enable them directly, rather than having the registration process do that. Do the same for disabling IPA interrupt handlers. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 8e461e1f092b22d9ae1b7764bf7c85d1992c56e3 Author: Alex Elder Date: Wed Jan 4 11:52:29 2023 -0600 net: ipa: introduce ipa_interrupt_enable() Create new function ipa_interrupt_enable() to encapsulate enabling one of the IPA interrupt types. Introduce ipa_interrupt_disable() to reverse that operation. Add a helper function to factor out the common register update used by both. Use these in ipa_interrupt_add() and ipa_interrupt_remove(). Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit e5709b7c1ede61e6fc7fe70391b1cbe44323861a Author: Alex Elder Date: Wed Jan 4 11:52:28 2023 -0600 net: ipa: introduce a common microcontroller interrupt handler The prototype for an IPA interrupt handler supplies the IPA interrupt ID, so it's possible to use a single function to handle any type of microcontroller interrupt. Introduce ipa_uc_interrupt_handler(), which calls the event or the response handler depending on the IRQ ID provided. Register the new function as the handler for both microcontroller IPA interrupt types. The called functions don't use their "irq_id" arguments, so remove them. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit afd50da912865732c28afebd3ff075558694a55c Merge: 4aea86b4033f9 c7030d14c78e6 Author: Jakub Kicinski Date: Thu Jan 5 21:38:33 2023 -0800 Merge branch 'enetc-unlock-xdp_redirect-for-xdp-non-linear-buffers' Lorenzo Bianconi says: ==================== enetc: unlock XDP_REDIRECT for XDP non-linear buffers Unlock XDP_REDIRECT for S/G XDP buffer and rely on XDP stack to properly take care of the frames. Rely on XDP_FLAGS_HAS_FRAGS flag to check if it really necessary to access non-linear part of the xdp_buff/xdp_frame. ==================== Link: https://lore.kernel.org/r/cover.1672840490.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski commit c7030d14c78e634b94616a08f4961d767f645834 Author: Lorenzo Bianconi Date: Wed Jan 4 14:57:12 2023 +0100 net: ethernet: enetc: do not always access skb_shared_info in the XDP path Move XDP skb_shared_info structure initialization in from enetc_map_rx_buff_to_xdp() to enetc_add_rx_buff_to_xdp() and do not always access skb_shared_info in the xdp_buff/xdp_frame since it is located in a different cacheline with respect to hard_start and data xdp pointers. Rely on XDP_FLAGS_HAS_FRAGS flag to check if it really necessary to access non-linear part of the xdp_buff/xdp_frame. Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean Signed-off-by: Lorenzo Bianconi Reviewed-by: Leon Romanovsky Signed-off-by: Jakub Kicinski commit 59cc773a352c0c7c7aa96fbd645fe36ffc193e55 Author: Lorenzo Bianconi Date: Wed Jan 4 14:57:11 2023 +0100 net: ethernet: enetc: get rid of xdp_redirect_sg counter Remove xdp_redirect_sg counter and the related ethtool entry since it is no longer used. Tested-by: Vladimir Oltean Signed-off-by: Lorenzo Bianconi Reviewed-by: Leon Romanovsky Signed-off-by: Jakub Kicinski commit 8feb020f92a559f5a73a55c7337a3e51f19a2dc9 Author: Lorenzo Bianconi Date: Wed Jan 4 14:57:10 2023 +0100 net: ethernet: enetc: unlock XDP_REDIRECT for XDP non-linear buffers Even if full XDP_REDIRECT is not supported yet for non-linear XDP buffers since we allow redirecting just into CPUMAPs, unlock XDP_REDIRECT for S/G XDP buffer and rely on XDP stack to properly take care of the frames. Tested-by: Vladimir Oltean Signed-off-by: Lorenzo Bianconi Reviewed-by: Leon Romanovsky Signed-off-by: Jakub Kicinski commit 957445d730badbea1b3b2ef038e60d2ca38abd0a Author: Rob Barnes Date: Wed Jan 4 01:15:24 2023 +0000 platform/chrome: cros_ec: Shutdown on EC Panic When an EC panic is reported, attempt an orderly shutdown. Force a shutdown after a brief timeout if the orderly shutdown fails for any reason. Using the common hw_protection_shutdown utility function since an EC panic has the potential to cause hw damage. This is all best effort. EC should also force a hard reset after a short timeout. Signed-off-by: Rob Barnes Reviewed-by: Prashant Malani Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20230104011524.369764-3-robbarnes@google.com commit d90fa2c64d59f5f151beeef5dbc599784b3391ca Author: Rob Barnes Date: Wed Jan 4 01:15:23 2023 +0000 platform/chrome: cros_ec: Poll EC log on EC panic Add handler for CrOS EC panic events. When a panic is reported, immediately poll for EC log. This should result in the log leading to the EC panic being preserved. ACPI_NOTIFY_CROS_EC_PANIC is defined in coreboot at https://review.coreboot.org/plugins/gitiles/coreboot/+/refs/heads/master/src/ec/google/chromeec/acpi/ec.asl Signed-off-by: Rob Barnes Reviewed-by: Prashant Malani Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20230104011524.369764-2-robbarnes@google.com commit a98bf9df1c332a2c447083e1a2ca9578cd9f0721 Author: Xu Panda Date: Fri Dec 23 10:39:12 2022 +0800 of: base: 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 Link: https://lore.kernel.org/r/202212231039128402297@zte.com.cn Signed-off-by: Rob Herring commit bd4edba2653aeef0119b7a945f07e58711343bf9 Author: Hans de Goede Date: Wed Dec 14 22:24:47 2022 +0100 x86/rtc: Simplify PNP ids check compare_pnp_id() already iterates over the single linked pnp_ids list starting with the id past to it. So there is no need for add_rtc_cmos() to call compare_pnp_id() for each id on the list. No change in functionality intended. Signed-off-by: Hans de Goede Signed-off-by: Ingo Molnar Acked-by: Rafael J. Wysocki Cc: linux-kernel@vger.kernel.org commit 6be9a8f18fb2ea88d37a69f076f7011fc012ae1a Author: Brian Gerst Date: Mon Dec 19 14:39:04 2022 -0500 x86/signal/compat: Move sigaction_compat_abi() to signal_64.c Also remove the now-empty signal_compat.c. Signed-off-by: Brian Gerst Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20221219193904.190220-3-brgerst@gmail.com Cc: Al Viro commit f6e2a56c2bad10dd4381d5ab021332ef70d81990 Author: Brian Gerst Date: Mon Dec 19 14:39:03 2022 -0500 x86/signal: Move siginfo field tests Move the tests to the appropriate signal_$(BITS).c file. Convert them to use static_assert(), removing the need for a dummy function. Signed-off-by: Brian Gerst Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20221219193904.190220-2-brgerst@gmail.com Cc: Al Viro commit b942a520d9e43bc31f0808d2f2267a1ddba75518 Author: Gustavo A. R. Silva Date: Mon Sep 26 16:43:15 2022 -0500 bcache: 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/213 Link: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva commit 4aea86b4033f92f01547e6d4388d4451ae9b0980 Merge: 0471005efac9a 50011c32f4212 Author: Jakub Kicinski Date: Thu Jan 5 15:34:11 2023 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net No conflicts. Signed-off-by: Jakub Kicinski commit 8c149eb011be23679b3320d3939f4e3c8271969c Author: Dan Williams Date: Tue Dec 13 08:44:24 2022 -0800 tools/testing/cxl: Prevent cxl_test from confusing production modules The cxl_test machinery builds modified versions of the modules in drivers/cxl/ and intercepts some of their calls to allow cxl_test to inject mock CXL topologies for test. However, if cxl_test attempts the same with production modules, fireworks ensue as Luis discovered [1]. Prevent that scenario by arranging for cxl_test to check for a "watermark" symbol in each of the modules it expects to be modified before the test can run. This turns undefined runtime behavior or crashes into a safer failure to load the cxl_test module. Link: http://lore.kernel.org/r/20221209062919.1096779-1-mcgrof@kernel.org [1] Reported-by: Luis Chamberlain Signed-off-by: Dan Williams commit e520d52d7cabf6817b2c56d2681e9618bc5540ae Author: Davidlohr Bueso Date: Thu Dec 15 10:38:36 2022 -0800 cxl/region: Only warn about cpu_cache_invalidate_memregion() once No need for more than once per module load. Signed-off-by: Davidlohr Bueso Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/20221215183836.24136-1-dave@stgolabs.net Signed-off-by: Dan Williams commit 06919d226d01132c03d851966d4df3870fa1b55a Author: Gustavo A. R. Silva Date: Sat Sep 3 00:17:18 2022 +0100 mm/memremap: Replace zero-length array 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 array declaration in struct dev_pagemap with the new DECLARE_FLEX_ARRAY() helper macro. This helper allows for a flexible-array member in a union. Also, this addresses multiple warnings reported when building with Clang-15 and -Wzero-length-array. Link: https://github.com/KSPP/linux/issues/193 Link: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva commit 37e2b57078d412547f1c14bb83eff86ab9d92d3d Author: Gustavo A. R. Silva Date: Sat Sep 3 00:08:51 2022 +0100 exportfs: Replace zero-length array 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 array declaration in struct fid with the new DECLARE_FLEX_ARRAY() helper macro. This helper allows for a flexible-array member in a union. Link: https://github.com/KSPP/linux/issues/21 Link: https://github.com/KSPP/linux/issues/193 Link: https://github.com/KSPP/linux/issues/197 Link: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva commit aa7f4a21f6e5b0fa256b4de0924fea506ad801ef Author: Paul E. McKenney Date: Wed Jan 4 16:38:05 2023 -0800 fs/dlm: 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: David Teigland commit 8113aa91360a013ebe00763bb0823b5a41b11c4d Author: Yang Yingliang Date: Tue Jan 3 19:37:49 2023 +0800 fs: dlm: fix return value check in dlm_memory_init() It should check 'cb_cache', after calling kmem_cache_create("dlm_cb"). Fixes: 61bed0baa4db ("fs: dlm: use a non-static queue for callbacks") Signed-off-by: Yang Yingliang Signed-off-by: David Teigland commit 589c3357370a596ef7c99c00baca8ac799fce531 Author: Ira Weiny Date: Sun Dec 11 23:06:19 2022 -0800 PCI/CXL: Export native CXL error reporting control CXL _OSC Error Reporting Control is used by the OS to determine if Firmware has control of various CXL error reporting capabilities including the event logs. Expose the result of negotiating CXL Error Reporting Control in struct pci_host_bridge for consumption by the CXL drivers. Cc: Bjorn Helgaas Cc: Lukas Wunner Cc: linux-pci@vger.kernel.org Cc: linux-acpi@vger.kernel.org Signed-off-by: Ira Weiny Acked-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron Reviewed-by: Dan Williams Link: https://lore.kernel.org/r/20221212070627.1372402-2-ira.weiny@intel.com Signed-off-by: Dan Williams commit dd029269947a32047b8ce1f8513b0b3b13f0df32 Author: Paul E. McKenney Date: Tue Dec 13 16:42:15 2022 -0800 clocksource: Improve "skew is too large" messages When clocksource_watchdog() detects excessive clocksource skew compared to the watchdog clocksource, it marks the clocksource under test as unstable and prints several lines worth of message. But that message is unclear to anyone unfamiliar with the code: clocksource: timekeeping watchdog on CPU2: Marking clocksource 'wdtest-ktime' as unstable because the skew is too large: clocksource: 'kvm-clock' wd_nsec: 400744390 wd_now: 612625c2c wd_last: 5fa7f7c66 mask: ffffffffffffffff clocksource: 'wdtest-ktime' cs_nsec: 600744034 cs_now: 173081397a292d4f cs_last: 17308139565a8ced mask: ffffffffffffffff clocksource: 'kvm-clock' (not 'wdtest-ktime') is current clocksource. Therefore, add the following line near the end of that message: Clocksource 'wdtest-ktime' skewed 199999644 ns (199 ms) over watchdog 'kvm-clock' interval of 400744390 ns (400 ms) This new line clearly indicates the amount of skew between the two clocksources, along with the duration of the time interval over which the skew occurred, both in nanoseconds and milliseconds. Signed-off-by: Paul E. McKenney Cc: John Stultz Cc: Thomas Gleixner Cc: Stephen Boyd Cc: Feng Tang commit 3ab955de929a53245c89deb7ff9992b6eebbe4e8 Author: Zhen Lei Date: Sat Nov 19 17:25:08 2022 +0800 rcu: Align the output of RCU CPU stall warning messages Time stamps are added to the output in kernels built with CONFIG_PRINTK_TIME=y, which causes misaligned output. Therefore, replace pr_cont() with pr_err(), which fixes alignment and gets rid of a couple of despised pr_cont() calls. Before: [ 37.567343] rcu: INFO: rcu_preempt self-detected stall on CPU [ 37.567839] rcu: 0-....: (1500 ticks this GP) idle=*** [ 37.568270] (t=1501 jiffies g=4717 q=28 ncpus=4) [ 37.568668] CPU: 0 PID: 313 Comm: test0 Not tainted 6.1.0-rc4 #8 After: [ 36.762074] rcu: INFO: rcu_preempt self-detected stall on CPU [ 36.762543] rcu: 0-....: (1499 ticks this GP) idle=*** [ 36.763003] rcu: (t=1500 jiffies g=5097 q=27 ncpus=4) [ 36.763522] CPU: 0 PID: 313 Comm: test0 Not tainted 6.1.0-rc4 #9 Signed-off-by: Zhen Lei Reviewed-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit be42f00b73a0f50710d16eb7cb4efda0cce062dd Author: Zhen Lei Date: Sat Nov 19 17:25:06 2022 +0800 rcu: Add RCU stall diagnosis information Because RCU CPU stall warnings are driven from the scheduling-clock interrupt handler, a workload consisting of a very large number of short-duration hardware interrupts can result in misleading stall-warning messages. On systems supporting only a single level of interrupts, that is, where interrupts handlers cannot be interrupted, this can produce misleading diagnostics. The stack traces will show the innocent-bystander interrupted task, not the interrupts that are at the very least exacerbating the stall. This situation can be improved by displaying the number of interrupts and the CPU time that they have consumed. Diagnosing other types of stalls can be eased by also providing the count of softirqs and the CPU time that they consumed as well as the number of context switches and the task-level CPU time consumed. Consider the following output given this change: rcu: INFO: rcu_preempt self-detected stall on CPU rcu: 0-....: (1250 ticks this GP) rcu: hardirqs softirqs csw/system rcu: number: 624 45 0 rcu: cputime: 69 1 2425 ==> 2500(ms) This output shows that the number of hard and soft interrupts is small, there are no context switches, and the system takes up a lot of time. This indicates that the current task is looping with preemption disabled. The impact on system performance is negligible because snapshot is recorded only once for all continuous RCU stalls. This added debugging information is suppressed by default and can be enabled by building the kernel with CONFIG_RCU_CPU_STALL_CPUTIME=y or by booting with rcupdate.rcu_cpu_stall_cputime=1. Signed-off-by: Zhen Lei Reviewed-by: Mukesh Ojha Reviewed-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit 7c182722a0a9447e31f9645de4f311e5bc59b480 Author: Zhen Lei Date: Sat Nov 19 17:25:05 2022 +0800 sched: Add helper nr_context_switches_cpu() Add a function nr_context_switches_cpu() that returns number of context switches since boot on the specified CPU. This information will be used to diagnose RCU CPU stalls. Signed-off-by: Zhen Lei Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Juri Lelli Cc: Vincent Guittot Cc: Dietmar Eggemann Cc: Steven Rostedt Cc: Ben Segall Cc: Mel Gorman Cc: Daniel Bristot de Oliveira Cc: Valentin Schneider Reviewed-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit 3ca0a6ea8f6de0f21a9331ff3596a9c073fbdab0 Author: Zhen Lei Date: Sat Nov 19 17:25:04 2022 +0800 sched: Add helper kstat_cpu_softirqs_sum() Add a kstat_cpu_softirqs_sum() function that is similar to kstat_cpu_irqs_sum(), but which counts software interrupts since boot on the specified CPU. Signed-off-by: Zhen Lei Cc: Josh Don Cc: Tejun Heo Cc: Peter Zijlstra Reviewed-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit d52d3a2bf408ff86f3a79560b5cce80efb340239 Author: Joel Fernandes (Google) Date: Sun Jan 1 06:15:55 2023 +0000 torture: Fix hang during kthread shutdown phase During rcutorture shutdown, the rcu_torture_cleanup() function calls torture_cleanup_begin(), which sets the fullstop global variable to FULLSTOP_RMMOD. This causes the rcutorture threads for readers and fakewriters to exit all of their "while" loops and start shutting down. They then call torture_kthread_stopping(), which in turn waits for kthread_stop() to be called. However, rcu_torture_cleanup() has not yet called kthread_stop() on those threads, and before it gets a chance to do so, multiple instances of torture_kthread_stopping() invoke schedule_timeout_interruptible(1) in a tight loop. Tracing confirms that TIMER_SOFTIRQ can then continuously execute timer callbacks. If that TIMER_SOFTIRQ preempts the task executing rcu_torture_cleanup(), that task might never invoke kthread_stop(). This commit improves this situation by increasing the timeout passed to schedule_timeout_interruptible() from one jiffy to 1/20th of a second. This change prevents TIMER_SOFTIRQ from monopolizing its CPU, thus allowing rcu_torture_cleanup() to carry out the needed kthread_stop() invocations. Testing has shown 100 runs of TREE07 passing reliably, as oppose to the tens-of-percent failure rates seen beforehand. Cc: Paul McKenney Cc: Frederic Weisbecker Cc: Zhouyi Zhou Cc: # 6.0.x Signed-off-by: Joel Fernandes (Google) Tested-by: Zhouyi Zhou Reviewed-by: Davidlohr Bueso Signed-off-by: Paul E. McKenney commit 273661595c21f390d2522af06c7b552f907fe12a Author: Paul E. McKenney Date: Fri Dec 16 09:47:28 2022 -0800 rcutorture: Drop sparse lock-acquisition annotations The sparse __acquires() and __releases() annotations provide very little value. The argument is ignored, so sparse cannot tell the differences between acquiring one lock and releasing another on the one hand and acquiring and releasing a given lock on the other. In addition, lockdep annotations provide much more precision, for but one example, actually knowing which lock is held. This commit therefore removes the __acquires() and __releases() annotations from rcutorture. Reported-by: Tejun Heo Signed-off-by: Paul E. McKenney commit c24501b240741907ddfce52ffc186792db5ad3a5 Author: Joel Fernandes (Google) Date: Tue Dec 13 20:48:39 2022 +0000 locktorture: Make the rt_boost factor a tunable The rt boosting in locktorture has a factor variable s currently large enough that boosting only happens once every minute or so. Add a tunable to reduce the factor so that boosting happens more often, to test paths and arrive at failure modes earlier. With this change, I can set the factor to like 50 and have the boosting happens every 10 seconds or so. Tested with boot parameters: locktorture.torture_type=mutex_lock locktorture.onoff_interval=1 locktorture.nwriters_stress=8 locktorture.stutter=0 locktorture.rt_boost=1 locktorture.rt_boost_factor=50 locktorture.nlocks=3 Signed-off-by: Joel Fernandes (Google) Reviewed-by: Davidlohr Bueso Signed-off-by: Paul E. McKenney commit e01f3a1a589e314cf27bd2cb27d9c2c58e105a27 Author: Joel Fernandes (Google) Date: Tue Dec 13 20:48:38 2022 +0000 locktorture: Allow non-rtmutex lock types to be boosted Currently RT boosting is only done for rtmutex_lock, however with proxy execution, we also have the mutex_lock participating in priorities. To exercise the testing better, add RT boosting to other lock testing types as well, using a new knob (rt_boost). Tested with boot parameters: locktorture.torture_type=mutex_lock locktorture.onoff_interval=1 locktorture.nwriters_stress=8 locktorture.stutter=0 locktorture.rt_boost=1 locktorture.rt_boost_factor=1 locktorture.nlocks=3 Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit a6889becb05394255c80b62103677e3b095726a9 Author: Paul E. McKenney Date: Tue Nov 8 08:18:06 2022 -0800 refscale: Add tests using SLAB_TYPESAFE_BY_RCU This commit adds three read-side-only tests of three use cases featuring SLAB_TYPESAFE_BY_RCU: One using per-object reference counting, one using per-object locking, and one using per-object sequence locking. [ paulmck: Apply feedback from kernel test robot. ] Signed-off-by: Paul E. McKenney commit 439a1bcac648fe9b59210cde8991fb2acf37bdab Author: Kees Cook Date: Mon Sep 19 15:53:13 2022 -0700 fortify: Use __builtin_dynamic_object_size() when available Since the commits starting with c37495d6254c ("slab: add __alloc_size attributes for better bounds checking"), the compilers have runtime allocation size hints available in some places. This was immediately available to CONFIG_UBSAN_BOUNDS, but CONFIG_FORTIFY_SOURCE needed updating to explicitly make use of the hints via the associated __builtin_dynamic_object_size() helper. Detect and use the builtin when it is available, increasing the accuracy of the mitigation. When runtime sizes are not available, __builtin_dynamic_object_size() falls back to __builtin_object_size(), leaving the existing bounds checking unchanged. Additionally update the VMALLOC_LINEAR_OVERFLOW LKDTM test to make the hint invisible, otherwise the architectural defense is not exercised (the buffer overflow is detected in the memset() rather than when it crosses the edge of the allocation). Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Nick Desaulniers Cc: Nathan Chancellor Cc: Tom Rix Cc: linux-hardening@vger.kernel.org Cc: llvm@lists.linux.dev Reviewed-by: Miguel Ojeda # include/linux/compiler_attributes.h Signed-off-by: Kees Cook commit b2ba00c2a51793d916b662cb049b8f01c55d9e82 Author: Stephen Rothwell Date: Thu Jan 5 12:05:50 2023 -0800 rxrpc: replace zero-lenth array with DECLARE_FLEX_ARRAY() helper 0-length arrays are deprecated, and cause problems with bounds checking. Replace with a flexible array: In file included from include/linux/string.h:253, 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/cpufeature.h:5, from arch/x86/include/asm/thread_info.h:53, from include/linux/thread_info.h:60, from arch/x86/include/asm/preempt.h:9, from include/linux/preempt.h:78, from include/linux/percpu.h:6, from include/linux/prandom.h:13, from include/linux/random.h:153, from include/linux/net.h:18, from net/rxrpc/output.c:10: In function 'fortify_memcpy_chk', inlined from 'rxrpc_fill_out_ack' at net/rxrpc/output.c:158:2: include/linux/fortify-string.h:520:25: error: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning] 520 | __write_overflow_field(p_size_field, size); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Link: https://lore.kernel.org/linux-next/20230105132535.0d65378f@canb.auug.org.au/ Cc: 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 Signed-off-by: Stephen Rothwell Signed-off-by: Kees Cook commit 5e013dc17e2ab2d59e85a4322e37398ca80671d6 Author: Zhen Lei Date: Thu Nov 24 14:22:03 2022 +0800 doc: Fix htmldocs build warnings of stallwarn.rst Documentation/RCU/stallwarn.rst: 401: WARNING: Literal block expected; none found. 428: WARNING: Literal block expected; none found. 445: WARNING: Literal block expected; none found. 459: WARNING: Literal block expected; none found. 468: WARNING: Literal block expected; none found. The literal block needs to be indented, so this commit adds two spaces to each line. In addition, ':', which is used as a boundary in the literal block, is replaced by '|'. Link: https://lore.kernel.org/linux-next/20221123163255.48653674@canb.auug.org.au/ Fixes: 3d2788ba4573 ("doc: Document CONFIG_RCU_CPU_STALL_CPUTIME=y stall information") Reported-by: Stephen Rothwell Signed-off-by: Zhen Lei Tested-by: Akira Yokosawa Signed-off-by: Paul E. McKenney commit eff864590bd57caeb8544b3f57bd3ab202efe1c2 Author: Akira Yokosawa Date: Wed Nov 23 18:29:00 2022 +0900 docs/RCU/rcubarrier: Right-adjust line numbers in code snippets Line numbers in code snippets in rcubarrier.rst have beed left adjusted since commit 4af498306ffd ("doc: Convert to rcubarrier.txt to ReST"). This might have been because right adjusting them had confused Sphinx. The rules around a literal block in reST are: - Need a blank line above it. - A line with the same indent level as the line above it is regarded as the end of it. Those line numbers can be right adjusted by keeping indents at two- digit numbers. While at it, add some spaces between the column of line numbers and the code area for better readability. Signed-off-by: Akira Yokosawa Signed-off-by: Paul E. McKenney commit a75f7b487c2b0c1dde149b82b494f97fd068d014 Author: Akira Yokosawa Date: Wed Nov 23 18:23:09 2022 +0900 docs/RCU/rcubarrier: Adjust 'Answer' parts of QQs as definition-lists The "Answer" parts of QQs divert from proper format of definition-lists as described at [1] and are not rendered as such. Adjust them. Link: [1] https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#definition-lists Signed-off-by: Akira Yokosawa Signed-off-by: Paul E. McKenney commit 7a21ddf01af9da0a2d24d6ece0e2ffd60374a945 Author: Zhen Lei Date: Sat Nov 19 17:25:07 2022 +0800 doc: Document CONFIG_RCU_CPU_STALL_CPUTIME=y stall information This commit documents the additional RCU CPU stall warning output produced by kernels built with CONFIG_RCU_CPU_STALL_CPUTIME=y or booted with rcupdate.rcu_cpu_stall_cputime=1. [ paulmck: Apply wordsmithing. ] Signed-off-by: Zhen Lei Reviewed-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit 148750d736c44eecf10836ef7af397388e6194c3 Author: Paul E. McKenney Date: Fri Nov 4 18:00:52 2022 -0700 doc: Update whatisRCU.rst This commit updates whatisRCU.rst with wordsmithing and updates provokes by the passage of time. Signed-off-by: Paul E. McKenney commit 3f58c55e239262447a758d41f0495b526ce10977 Author: Paul E. McKenney Date: Fri Nov 4 16:55:03 2022 -0700 doc: Update rcu.rst URL to RCU publications Also add the more recent thicket of Google Documents. Signed-off-by: Paul E. McKenney commit c8f2310e210ceedab86f1f696d27f7b5dd87959a Author: Paul E. McKenney Date: Fri Nov 4 16:45:55 2022 -0700 doc: Update UP.rst This commit updates UP.rst to reflect changes over the past few years, including the advent of userspace RCU libraries for constrained systems. Signed-off-by: Paul E. McKenney commit 0c208a7930228a12a78cc2c11f6f09274872ec83 Author: Paul E. McKenney Date: Fri Nov 4 15:34:03 2022 -0700 doc: Update torture.rst This commit updates torture.rst with wordsmithing and the addition of a few more scripts. Signed-off-by: Paul E. McKenney commit 3abf176d64ac37d086271662dd47b8dfc9987152 Author: Paul E. McKenney Date: Fri Nov 4 14:39:32 2022 -0700 doc: Update stallwarn.rst This commit updates stallwarn.rst to reflect RCU additions and changes over the past few years. Signed-off-by: Paul E. McKenney commit 647dd4cd7c2137194811d8585a7500dab3d328c0 Author: Paul E. McKenney Date: Fri Nov 4 14:16:48 2022 -0700 doc: Update rcu.rst This commit provides a couple of updates based on the inexorable passage of time. Signed-off-by: Paul E. McKenney commit da82af04352b13a4880c97c4e00e8b12b1c67e6e Author: Paul E. McKenney Date: Fri Nov 4 14:03:15 2022 -0700 doc: Update and wordsmith rculist_nulls.rst Do some wordsmithing and breaking up of RCU readers. Signed-off-by: Paul E. McKenney commit 157821fb3e9aaa07cf408686b08d117bf27b7de1 Author: Rodrigo Vivi Date: Tue Jan 3 14:47:01 2023 -0500 drm/i915: Expand force_probe to block probe of devices as well. There are new cases where we want to block i915 probe, such as when experimenting or developing the new Xe driver. But also, with the new hybrid cards, users or developers might want to use i915 only on integrated and fully block the probe of the i915 for the discrete. Or vice versa. There are even older development and validation reasons, like when you use some distro where the modprobe.blacklist is not present. But in any case, let's introduce a more granular control, but without introducing yet another parameter, but using the existent force_probe one. Just by adding a ! in the begin of the id in the force_probe, like in this case where we would block the probe for Alder Lake: $ insmod i915.ko force_probe='!46a6' v2: Take care of '*' and '!*' cases as pointed out by Gustavo and Jani. Cc: Jani Nikula Cc: Gustavo Sousa Signed-off-by: Rodrigo Vivi Reviewed-by: Jani Nikula Acked-by: Gustavo Sousa Link: https://patchwork.freedesktop.org/patch/msgid/20230103194701.1492984-1-rodrigo.vivi@intel.com commit 980660cae7994ab03b31b2a32940c70e8421fc99 Author: Bagas Sanjaya Date: Thu Jan 5 20:16:34 2023 +0700 docs: cgroup-v1: use numbered lists for user interface setup Setup instructions for memory resource controller UI uses a mix of section headings and normal paragraphs, whereas numbered lists are better fit for this purpose. While at it, also slightly reword the instructions and add reference to "Why are cgroups needed?" in the main cgroups documentation. Signed-off-by: Bagas Sanjaya Signed-off-by: Tejun Heo commit da3ad2e14f6314a0246ae3c88afef59c8b49a3e5 Author: Bagas Sanjaya Date: Thu Jan 5 20:16:33 2023 +0700 docs: cgroup-v1: add internal cross-references The documentation contains references to other sections in the doc (internal). Add cross-references for them so that these can be accessed without having to manually search for them. Signed-off-by: Bagas Sanjaya Signed-off-by: Tejun Heo commit 5fa16afc4b5ab0f030fe9732bac431557112b0c6 Author: Bagas Sanjaya Date: Thu Jan 5 20:16:32 2023 +0700 docs: cgroup-v1: make swap extension subsections subsections Subsections text of swap extension section is marked up as bold text, whereas making them proper subsection is more appropriate. Signed-off-by: Bagas Sanjaya Signed-off-by: Tejun Heo commit b9d2a17b3290e251748c6a9f6d2b0a440401096c Author: Bagas Sanjaya Date: Thu Jan 5 20:16:31 2023 +0700 docs: cgroup-v1: use bullet lists for list of stat file tables The stat file section contains three tables, where the leading texts for them are subsection heading. Organize them in the bullet list, while demoting headings into normal text. Signed-off-by: Bagas Sanjaya Signed-off-by: Tejun Heo commit f7423bb771d4acaad4e40addf9e09f5722f48b04 Author: Bagas Sanjaya Date: Thu Jan 5 20:16:30 2023 +0700 docs: cgroup-v1: move hierarchy of accounting caption The caption for hierarchy of accounting figure is in the code block, which is quite odd. Move the caption into :caption: option of code-block:: directive instead. Signed-off-by: Bagas Sanjaya Signed-off-by: Tejun Heo commit 71da431c30795716a1ca26158f608781b3eba33d Author: Bagas Sanjaya Date: Thu Jan 5 20:16:29 2023 +0700 docs: cgroup-v1: fix footnotes The documentation contains external references, which some of them are marked as footnotes. Fix the syntax for them to be properly rendered as such. Non-footnote references aren't affected since the text for these is aligned the same to the footnotes. Signed-off-by: Bagas Sanjaya Signed-off-by: Tejun Heo commit eb08489448fbc70eda1ba6cfdddd59de00ddf941 Author: Bagas Sanjaya Date: Thu Jan 5 20:16:28 2023 +0700 docs: cgroup-v1: use code block for locking order schema The locking order schema is a figure (like diagram), which should have been formatted with literal code block for consistency with other figures. Signed-off-by: Bagas Sanjaya Signed-off-by: Tejun Heo commit 4ddb1a2aa1a3c4317b94417f1bace0e4f06f51b9 Author: Bagas Sanjaya Date: Thu Jan 5 20:16:27 2023 +0700 docs: cgroup-v1: wrap remaining admonitions in admonition blocks Wrap two other admonitions in appropriate blocks in order for readers to pay more attention to block contents: * hint:: for editor's note * warning:: for move charges deprecation Signed-off-by: Bagas Sanjaya Signed-off-by: Tejun Heo commit 56eb276701cb67aa6c52e0713e66b46b4d94b38f Author: Bagas Sanjaya Date: Thu Jan 5 20:16:26 2023 +0700 docs: cgroup-v1: replace custom note constructs with appropriate admonition blocks Admonition constructs on the documentation use definition lists, which isn't fit for the purpose. Replace them with appropriate blocks: * Use caution:: for outdated document notice * hint:: for memo * note:: for other constructs * warning:: for memory reclaim Signed-off-by: Bagas Sanjaya Signed-off-by: Tejun Heo commit f6e856e72ce51df1e0fe67aecb5f256fbd4190a6 Author: Aaron Liu Date: Wed Jan 4 09:18:06 2023 +0800 drm/amdgpu: update ta_secureDisplay_if.h to v27.00.00.08 1. Rename securedisplay_cmd to ta_securedisplay_cmd. 2. Rename ta_securedisplay_max_phy to ta_securedisplay_phy_ID. 3. update securedisplay_cmd to ta_securedisplay_cmd Signed-off-by: Aaron Liu Signed-off-by: Shane Xiao Reviewed-by: Alan Liu Signed-off-by: Alex Deucher commit 3693c1aea9b70db33f156e0dfa037a001754ba97 Author: Evan Quan Date: Wed Jan 4 10:45:01 2023 +0800 drm/amd/pm: add the missing mapping for PPT feature on SMU13.0.0 and 13.0.7 Then we are able to set a new ppt limit via the hwmon interface(power1_cap). Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c595637f8a7c6bdef2ec16f6ee0f6cd727603223 Author: Evan Quan Date: Fri Dec 16 17:12:53 2022 +0800 drm/amd/pm: correct the reference clock for fan speed(rpm) calculation Correct the reference clock as 25Mhz for SMU13 fan speed calculation. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 94a86ba265ad4d39f5a832a8acae8c7e93b0d9c0 Author: Praful Swarnakar Date: Fri Dec 16 16:05:18 2022 +0530 drm/amd/display: Remove redundant logs from DSC code [Why & How] Remove redundant log in DSC that just add additional blank prints Signed-off-by: Praful Swarnakar Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit ce17308ffd173ea0c478723d429364e16acec5c8 Author: Wen Yang Date: Sun Dec 25 23:10:58 2022 +0800 drm/amd/display: fix array-bounds errors in dc_stream_remove_writeback() The following errors occurred when using gcc 7.5.0-3ubuntu1~18.04: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c: In function ‘dc_stream_remove_writeback’: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:543:55: warning: array subscript is above array bounds [-Warray-bounds]      stream->writeback_info[j] = stream->writeback_info[i];                                  ~~~~~~~~~~~~~~~~~~~~~~^~~ Add a check to make sure that num_wb_info won't overflowing the writeback_info buffer. Fixes: 6fbefb84a98e ("drm/amd/display: Add DC core changes for DCN2") Signed-off-by: Wen Yang Cc: Aurabindo Pillai Cc: Hamza Mahfooz Cc: Guenter Roeck Cc: Alex Deucher Cc: Harry Wentland  Cc: Leo Li  Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit f8e12e770e8049917f82387033b3cf44bc43b915 Author: Alexey Kodanev Date: Tue Dec 27 20:04:15 2022 +0300 drm/amd/display: drop unnecessary NULL checks in debugfs pipe_ctx pointer cannot be NULL when getting the address of an element of the pipe_ctx array. Moreover, the MAX_PIPES is defined as 6, so pipe_ctx is not NULL after the loop either. Detected using the static analysis tool - Svace. Signed-off-by: Alexey Kodanev Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 4a1c9a444b5e0f276f43f77e1723088bbedb1687 Author: Hawking Zhang Date: Tue Jan 3 23:41:10 2023 +0800 drm/amdgpu: allow query error counters for specific IP block amdgpu_ras_block_late_init will be invoked in IP specific ras_late_init call as a common helper for all the IP blocks. However, when amdgpu_ras_block_late_init call amdgpu_ras_query_error_count to query ras error counters, amdgpu_ras_query_error_count queries all the IP blocks that support ras query interface. This results to wrong error counters cached in software copies when there are ras errors detected at time zero or warm reset procedure. i.e., in sdma_ras_late_init phase, it counts on sdma/mmhub errors, while, in mmhub_ras_late_init phase, it still counts on sdma/mmhub errors. The change updates amdgpu_ras_query_error_count interface to allow query specific ip error counter. It introduces a new input parameter: query_info. if query_info is NULL, it means query all the IP blocks, otherwise, only query the ip block specified by query_info. Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 90f56611fc5b54d55e94ded1d494d6090649bdb6 Author: xurui Date: Fri Dec 23 17:28:58 2022 +0800 drm/amdgpu: Retry DDC probing on DVI on failure if we got an HPD interrupt HPD signals on DVI ports can be fired off before the pins required for DDC probing actually make contact, due to the pins for HPD making contact first. This results in a HPD signal being asserted but DDC probing failing, resulting in hotplugging occasionally failing. Rescheduling the hotplug work for a second when we run into an HPD signal with a failing DDC probe usually gives enough time for the rest of the connector's pins to make contact, and fixes this issue. Signed-off-by: xurui Signed-off-by: Alex Deucher commit f200521899d22ec37ddb927f6a5755d8eacbc9e5 Author: Alex Deucher Date: Tue Dec 27 11:26:11 2022 -0500 drm/amdkfd: simplify cases A number of the gfx8 cases were the same. Clean them up. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit aaab5af4b226dce54cb8675dac1ffa359ec90872 Author: Andy Shevchenko Date: Tue Jan 3 16:50:23 2023 +0200 platform/chrome: cros_ec_proto: Use asm instead of asm-generic There is no point to specify asm-generic for the unaligned.h. Drop the 'generic' suffix. Signed-off-by: Andy Shevchenko Reviewed-by: Guenter Roeck [tzungbi: s/intead/instead/ in commit title.] Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20230103145023.40055-1-andriy.shevchenko@linux.intel.com commit 01f95d42b8f4e88f20d68791b0a85dbb9e3d1ac9 Author: Robert Zieba Date: Thu Dec 29 17:47:38 2022 +0800 platform/chrome: cros_ec_uart: fix race condition serdev_device_set_client_ops() is called before `ec_dev` is fully initialized. This can result in cros_ec_uart_rx_bytes() being called while `ec_dev` is still not initialized, resulting in a kernel panic. Call serdev_device_set_client_ops() after `ec_dev` is initialized. Fixes: 04a8bdd135cc ("platform/chrome: cros_ec_uart: Add transport layer") Signed-off-by: Robert Zieba [tzungbi: modified commit message and fixed context conflict.] Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221229094738.2304044-1-tzungbi@kernel.org commit f9bce00f78ed9ff9c38130388c13a2b2b72b857e Author: Bhanu Prakash Maiya Date: Tue Dec 27 12:32:24 2022 -0700 platform/chrome: cros_ec_uart: Add DT enumeration support Existing firmware uses the "PRP0001" _HID and an associated compatible string to enumerate the cros_ec_uart. Add DT enumeration support for already shipped firmware. Signed-off-by: Bhanu Prakash Maiya Co-developed-by: Mark Hasemeyer Signed-off-by: Mark Hasemeyer Reviewed-by: Prashant Malani Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20221227123212.v13.3.Ie23c217d69ff25d7354db942613f143bbc8ef891@changeid commit 163ea2048dc8cff2146036e61137107d229e972b Merge: 179918b0b76e2 1f51339f7dd0e Author: Georgi Djakov Date: Thu Jan 5 16:17:08 2023 +0200 Merge branch 'icc-qdu1000' into icc-next Add dt bindings and driver support for the Qualcomm QDU1000 and QRU1000 SoCs. The Qualcomm Technologies, Inc. Distributed Unit 1000 and Radio Unit 1000 are new SoCs meant for enabling Open RAN solutions. See more at https://www.qualcomm.com/content/dam/qcomm-martech/dm-assets/documents/qualcomm_5g_ran_platforms_product_brief.pdf Link: https://lore.kernel.org/r/20221216230914.21771-1-quic_molvera@quicinc.com Signed-off-by: Georgi Djakov commit 1f51339f7dd0e723eaec4dc4b4bfb4f64cdcaa2d Author: Melody Olvera Date: Fri Dec 16 15:09:14 2022 -0800 interconnect: qcom: Add QDU1000/QRU1000 interconnect driver Add interconnect provider driver for Qualcomm QDU1000 and QRU1000 platforms. Signed-off-by: Melody Olvera Link: https://lore.kernel.org/r/20221216230914.21771-3-quic_molvera@quicinc.com Signed-off-by: Georgi Djakov commit 991f1372d028ddc135c732f97bf909d72ca8b0b0 Author: Melody Olvera Date: Fri Dec 16 15:09:13 2022 -0800 dt-bindings: interconnect: Add QDU1000/QRU1000 devices Add separate schema for QDU1000 and QRU1000 interconnect devices to document the different NoCs on these platforms. Signed-off-by: Melody Olvera Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221216230914.21771-2-quic_molvera@quicinc.com Signed-off-by: Georgi Djakov commit 4c00ac500d0edd1a6730c4e8293834a694c1b304 Author: Dmitry Baryshkov Date: Wed Nov 2 21:07:05 2022 +0300 drm/bridge_connector: drop drm_bridge_connector_en/disable_hpd() Now as all drivers stopped calling drm_bridge_connector_enable_hpd() and drm_bridge_connector_disable_hpd() it is safe to remove them complelely. Rename our internal helpers to remove the underscore prefix. Signed-off-by: Dmitry Baryshkov Reviewed-by: Tomi Valkeinen Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20221102180705.459294-8-dmitry.baryshkov@linaro.org commit c4f5538fa65dd093b71859c4792afd4e13fae5f1 Author: Dmitry Baryshkov Date: Wed Nov 2 21:07:04 2022 +0300 drm/omap: stop using drm_bridge_connector_en/disable_hpd() The functionality of drm_bridge_connector_enable_hpd() and drm_bridge_connector_disable_hpd() is provided automatically by the drm_kms_poll helpers. Stop calling these functions manually. Signed-off-by: Dmitry Baryshkov Reviewed-by: Tomi Valkeinen Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20221102180705.459294-7-dmitry.baryshkov@linaro.org commit 9e954403bc9cc024cf052e9429c0e6db86ffe0f7 Author: Dmitry Baryshkov Date: Wed Nov 2 21:07:03 2022 +0300 drm/msm/hdmi: stop using drm_bridge_connector_en/disable_hpd() The functionality of drm_bridge_connector_enable_hpd() and drm_bridge_connector_disable_hpd() is provided automatically by the drm_kms_poll helpers. Stop calling these functions manually. Signed-off-by: Dmitry Baryshkov Reviewed-by: Tomi Valkeinen Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20221102180705.459294-6-dmitry.baryshkov@linaro.org commit 60c376e4549b6844af94cf319960ef48080230a8 Author: Dmitry Baryshkov Date: Wed Nov 2 21:07:02 2022 +0300 drm/imx/dcss: stop using drm_bridge_connector_en/disable_hpd() The functionality of drm_bridge_connector_enable_hpd() and drm_bridge_connector_disable_hpd() is provided automatically by the drm_kms_poll helpers. Stop calling these functions manually. Signed-off-by: Dmitry Baryshkov Reviewed-by: Tomi Valkeinen [narmstrong: removed now unused kms var in dcss_dev_suspend|resume()] Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20221102180705.459294-5-dmitry.baryshkov@linaro.org commit 179918b0b76e2ec999182f3ecd14d0a03b34a92a Merge: 1b929c02afd37 e6f0d6a30f734 Author: Georgi Djakov Date: Thu Dec 29 19:19:08 2022 +0200 Merge branch 'icc-sm8550-immutable' into icc-next This adds interconnect support for SM8550. Link: https://lore.kernel.org/r/20221202232054.2666830-1-abel.vesa@linaro.org Signed-off-by: Georgi Djakov commit 92d755d8f13b6791c72d4e980c09f054d8175c94 Author: Dmitry Baryshkov Date: Wed Nov 2 21:07:01 2022 +0300 drm/bridge_connector: rely on drm_kms_helper_poll_* for HPD enablement Use drm_connector's helpers enable_hpd and disable_hpd to enable and disable HPD automatically by the means of drm_kms_helper_poll_* functions. As the drm_bridge_connector_enable_hpd() and drm_bridge_connector_disable_hpd() functions are now unused, replace them with stubs to ease driver migration. Enabling the HPD from drm_bridge_connector_init() can happen too early, before the driver is prepared to handle HPD events. As the drm_bridge_connector_enable_hpd() is empty anyway, drop this call anyway. Signed-off-by: Dmitry Baryshkov Reviewed-by: Tomi Valkeinen Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20221102180705.459294-4-dmitry.baryshkov@linaro.org commit c8268795c9a9cc7be50f78d4502fad83a2a4f8df Author: Dmitry Baryshkov Date: Wed Nov 2 21:07:00 2022 +0300 drm/probe-helper: enable and disable HPD on connectors Introduce two drm_connector_helper_funcs: enable_hpd() and disable_hpd(). They are called by drm_kms_helper_poll_enable() and drm_kms_helper_poll_disable() (and thus drm_kms_helper_poll_init() and drm_kms_helper_poll_fini()) respectively. This allows DRM drivers to rely on drm_kms_helper_poll for enabling and disabling HPD detection rather than doing that manually. Signed-off-by: Dmitry Baryshkov Reviewed-by: Tomi Valkeinen Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20221102180705.459294-3-dmitry.baryshkov@linaro.org commit 78b991ccfa64a438e2d8c2997d22d55621ab277d Author: Dmitry Baryshkov Date: Wed Nov 2 21:06:59 2022 +0300 drm/poll-helper: merge drm_kms_helper_poll_disable() and _fini() Merge drm_kms_helper_poll_disable() and drm_kms_helper_poll_fini() code into a common helper function. Signed-off-by: Dmitry Baryshkov Reviewed-by: Tomi Valkeinen Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20221102180705.459294-2-dmitry.baryshkov@linaro.org commit b357e7ac1b7349befaeded273b775c7af23a538b Author: Daniel Vetter Date: Wed Nov 23 20:24:37 2022 +0100 drm/fourcc: Document open source user waiver It's a bit a FAQ, and we really can't claim to be the authoritative source for allocating these numbers used in many standard extensions if we tell closed source or vendor stacks in general to go away. Iirc this was already clarified in some vulkan discussions, but I can't find that anywhere anymore. At least not in a public link. Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: Alex Deucher Cc: Daniel Stone Cc: Bas Nieuwenhuizen Cc: Jason Ekstrand Cc: Neil Trevett Acked-by: Daniel Stone Acked-by: Maxime Ripard Acked-by: David Airlie Acked-by: Marek Olšák Acked-by: Bas Nieuwenhuizen Acked-by: Jason Ekstrand Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20221123192437.1065826-1-daniel.vetter@ffwll.ch commit 5d1dd961e74334a2178264193ea813d44ce5e725 Author: Borislav Petkov (AMD) Date: Thu Dec 22 12:42:24 2022 +0100 x86/alternatives: Add alt_instr.flags Add a struct alt_instr.flags field which will contain different flags controlling alternatives patching behavior. The initial idea was to be able to specify it as a separate macro parameter but that would mean touching all possible invocations of the alternatives macros and thus a lot of churn. What is more, as PeterZ suggested, being able to say ALT_NOT(feature) is very readable and explains exactly what is meant. So make the feature field a u32 where the patching flags are the upper u16 part of the dword quantity while the lower u16 word is the feature. The highest feature number currently is 0x26a (i.e., word 19) so there is plenty of space. If that becomes insufficient, the field can be extended to u64 which will then make struct alt_instr of the nice size of 16 bytes (14 bytes currently). There should be no functional changes resulting from this. Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Ingo Molnar Link: https://lore.kernel.org/r/Y6RCoJEtxxZWwotd@zn.tnic commit b118458936785bd104e95f09abd52525c0a84616 Author: Pierre-Louis Bossart Date: Wed Jan 4 08:57:08 2023 -0600 ASoC: amd: ps: use static function Sparse warning: error: symbol 'acp63_fill_platform_dev_info' was not declared. Should it be static? Also reduce line lines below 100 characters. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230104145708.25051-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 948f317fac06f8c0e2dea8c37f5ae5ee10514034 Author: Vijendar Mukunda Date: Wed Jan 4 11:24:31 2023 +0530 ASoC: amd: ps: remove unused variable Remove unused acp63_audio_mode variable. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20230104055435.321327-3-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 45aa83cb93885d406c178498623b01cf128ca233 Author: Vijendar Mukunda Date: Wed Jan 4 11:24:30 2023 +0530 ASoC: amd: ps: use acp_lock to protect common registers in pdm driver Retrieve acp_lock mutex as platform data and use it for protecting ACP common registers access in acp pdm driver. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20230104055435.321327-2-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit f763fb2fc93065d33f17fe9c5adeac8dec7713dc Author: Vijendar Mukunda Date: Wed Jan 4 11:24:29 2023 +0530 ASoC: amd: ps: add mutex lock for accessing common registers Add mutex lock for accessing ACP common registers across different modules. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20230104055435.321327-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 892dbe0ecf658fd23e0a7255fca26a216cf54f96 Author: Andy Shevchenko Date: Mon Jan 2 22:30:37 2023 +0200 ASoC: Intel: sof-wm8804: Replace open coded acpi_dev_put() Instead of calling put_device(&adev->dev) where adev is a pointer to an ACPI device, use specific call, i.e. acpi_dev_put(). Also move it out of the conditional to make it more visible in case some other code will be added which may use that pointer. We need to keep a reference as long as we use the pointer. Signed-off-by: Andy Shevchenko Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230102203037.16120-5-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 6736dd4e5b58f27983ab3dba5fa96ed97768beaf Author: Andy Shevchenko Date: Mon Jan 2 22:30:36 2023 +0200 ASoC: Intel: cht_bsw_rt5672: Replace open coded acpi_dev_put() Instead of calling put_device(&adev->dev) where adev is a pointer to an ACPI device, use specific call, i.e. acpi_dev_put(). Also move it out of the conditional to make it more visible in case some other code will be added which may use that pointer. We need to keep a reference as long as we use the pointer. Signed-off-by: Andy Shevchenko Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230102203037.16120-4-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 5360a1c0f251b8000e9b2ea7b9f9e40c2e8f1c83 Author: Andy Shevchenko Date: Mon Jan 2 22:30:35 2023 +0200 ASoC: Intel: cht_bsw_rt5645: Replace open coded acpi_dev_put() Instead of calling put_device(&adev->dev) where adev is a pointer to an ACPI device, use specific call, i.e. acpi_dev_put(). Also move it out of the conditional to make it more visible in case some other code will be added which may use that pointer. We need to keep a reference as long as we use the pointer. Signed-off-by: Andy Shevchenko Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230102203037.16120-3-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 4afda6de02285758c9b892a2e79658966d3cfbb0 Author: Andy Shevchenko Date: Mon Jan 2 22:30:34 2023 +0200 ASoC: Intel: bytcht_da7213: Replace open coded acpi_dev_put() Instead of calling put_device(&adev->dev) where adev is a pointer to an ACPI device, use specific call, i.e. acpi_dev_put(). Also move it out of the conditional to make it more visible in case some other code will be added which may use that pointer. We need to keep a reference as long as we use the pointer. Signed-off-by: Andy Shevchenko Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230102203037.16120-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 7baff1a9debc5f4ff0d6bc1496358e251f66e396 Author: Andy Shevchenko Date: Mon Jan 2 22:30:33 2023 +0200 ASoC: Intel: bytcht_cx2072x: Replace open coded acpi_dev_put() Instead of calling put_device(&adev->dev) where adev is a pointer to an ACPI device, use specific call, i.e. acpi_dev_put(). Also move it out of the conditional to make it more visible in case some other code will be added which may use that pointer. We need to keep a reference as long as we use the pointer. Signed-off-by: Andy Shevchenko Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230102203037.16120-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 0471005efac9ac70bffd50532f8de07a28eac5aa Merge: d75858ef108c3 dab2b265dd23e Author: Paolo Abeni Date: Thu Jan 5 12:12:21 2023 +0100 Merge branch 'add-support-for-qsgmii-mode-for-j721e-cpsw9g-to-am65-cpsw-driver' Siddharth Vadapalli says: ==================== Add support for QSGMII mode for J721e CPSW9G to am65-cpsw driver Add compatible to am65-cpsw driver for J721e CPSW9G, which contains 8 external ports and 1 internal host port. Add support to power on and power off the SERDES PHY which is used by the CPSW MAC. ========= Changelog ========= v5: https://lore.kernel.org/r/20221109042203.375042-1-s-vadapalli@ti.com/ v4: https://lore.kernel.org/r/20221108080606.124596-1-s-vadapalli@ti.com/ v3: https://lore.kernel.org/r/20221026090957.180592-1-s-vadapalli@ti.com/ v2: https://lore.kernel.org/r/20221018085810.151327-1-s-vadapalli@ti.com/ v1: https://lore.kernel.org/r/20220914095053.189851-1-s-vadapalli@ti.com/ ==================== Link: https://lore.kernel.org/r/20230104103432.1126403-1-s-vadapalli@ti.com Signed-off-by: Paolo Abeni commit dab2b265dd23ef8fa7c49aeefb580918eb4ae207 Author: Siddharth Vadapalli Date: Wed Jan 4 16:04:32 2023 +0530 net: ethernet: ti: am65-cpsw: Add support for SERDES configuration Use PHY framework APIs to initialize the SERDES PHY connected to CPSW MAC. Define the functions am65_cpsw_disable_phy(), am65_cpsw_enable_phy(), am65_cpsw_disable_serdes_phy() and am65_cpsw_enable_serdes_phy(). Add new member "serdes_phy" to struct "am65_cpsw_slave_data" to store the SERDES PHY for each port, if it exists. Use it later while disabling the SERDES PHY for each port. Power on and initialize the SerDes PHY in am65_cpsw_nuss_init_slave_ports() by invoking am65_cpsw_enable_serdes_phy(). Power off the SerDes PHY in am65_cpsw_nuss_remove() by invoking am65_cpsw_disable_serdes_phy(). Signed-off-by: Siddharth Vadapalli Signed-off-by: Paolo Abeni commit 944131fa65d773fe59da7f68294afc6d23adb074 Author: Siddharth Vadapalli Date: Wed Jan 4 16:04:31 2023 +0530 net: ethernet: ti: am65-cpsw: Enable QSGMII mode for J721e CPSW9G CPSW9G in J721e supports additional modes like QSGMII. Add new compatible for J721e in am65-cpsw driver. Signed-off-by: Siddharth Vadapalli Signed-off-by: Paolo Abeni commit c85b53e32c8ecfe6292db702ba28e8a00ca90011 Author: Siddharth Vadapalli Date: Wed Jan 4 16:04:30 2023 +0530 dt-bindings: net: ti: k3-am654-cpsw-nuss: Add J721e CPSW9G support Update bindings for TI K3 J721e SoC which contains 9 ports (8 external ports) CPSW9G module and add compatible for it. Changes made: - Add new compatible ti,j721e-cpswxg-nuss for CPSW9G. - Extend pattern properties for new compatible. - Change maximum number of CPSW ports to 8 for new compatible. Signed-off-by: Siddharth Vadapalli Reviewed-by: Rob Herring Signed-off-by: Paolo Abeni commit acbee592f1a0913e908b141570034b3fb2991db9 Author: Qais Yousef Date: Fri Dec 16 23:57:16 2022 +0000 sched/documentation: Document the util clamp feature Add a document explaining the util clamp feature: what it is and how to use it. The new document hopefully covers everything one needs to know about uclamp. Signed-off-by: Qais Yousef Signed-off-by: Qais Yousef (Google) Signed-off-by: Ingo Molnar Reviewed-by: Lukasz Luba Link: https://lore.kernel.org/r/20221216235716.201923-1-qyousef@layalina.io Cc: Jonathan Corbet commit ef90cf2281a013d359d24d51732af990badf6e03 Author: Bing Huang Date: Thu Jan 5 09:49:43 2023 +0800 sched/topology: Add __init for sched_init_domains() sched_init_domains() is only used in initialization Signed-off-by: Bing Huang Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230105014943.9857-1-huangbing775@126.com commit 4f0755c2faf7388616109717facc5bbde6850e60 Author: Nirmoy Das Date: Fri Dec 23 10:20:11 2022 +0100 drm/i915: Reserve enough fence slot for i915_vma_unbind_async A nested dma_resv_reserve_fences(1) will not reserve slot from the 2nd call onwards and folowing dma_resv_add_fence() might hit the "BUG_ON(fobj->num_fences >= fobj->max_fences)" check. I915 hit above nested dma_resv case in ttm_bo_handle_move_mem() with async unbind: dma_resv_reserve_fences() from --> ttm_bo_handle_move_mem() dma_resv_reserve_fences() from --> i915_vma_unbind_async() dma_resv_add_fence() from --> i915_vma_unbind_async() dma_resv_add_fence() from -->ttm_bo_move_accel_cleanup() Resolve this by adding an extra fence in i915_vma_unbind_async(). Suggested-by: Thomas Hellström Fixes: 2f6b90da9192 ("drm/i915: Use vma resources for async unbinding") Cc: # v5.18+ Signed-off-by: Nirmoy Das Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20221223092011.11657-1-nirmoy.das@intel.com commit 4282494a20cdcaf38d553f2c2ff6f252084f979c Author: Guo Ren Date: Wed Jan 4 21:19:52 2023 -0500 locking/qspinlock: Micro-optimize pending state waiting for unlock When we're pending, we only care about lock value. The xchg_tail wouldn't affect the pending state. That means the hardware thread could stay in a sleep state and leaves the rest execution units' resources of pipeline to other hardware threads. This situation is the SMT scenarios in the same core. Not an entering low-power state situation. Of course, the granularity between cores is "cacheline", but the granularity between SMT hw threads of the same core could be "byte" which internal LSU handles. For example, when a hw-thread yields the resources of the core to other hw-threads, this patch could help the hw-thread stay in the sleep state and prevent it from being woken up by other hw-threads xchg_tail. Signed-off-by: Guo Ren Signed-off-by: Guo Ren Signed-off-by: Ingo Molnar Acked-by: Waiman Long Link: https://lore.kernel.org/r/20230105021952.3090070-1-guoren@kernel.org Cc: Peter Zijlstra commit a4b2e6063cfeaab1160501acfb27e8618a7c693f Author: Marek Vasut Date: Thu Dec 15 16:20:23 2022 +0100 firmware: xilinx: Clear IOCTL_SET_SD_TAPDELAY using PM_MMIO_WRITE In case the tap delay required by Arasan SDHCI is set to 0, the current embeddedsw firmware unconditionally writes IOU_SLCR SD_ITAPDLY to 0x100 (SD0_ITAPDLYENA=1, SD0_ITAPDLYSEL=0). Previous behavior was to keep the IOU_SLCR SD_ITAPDLY set to 0x0. There is some sort of difference in the behavior between SD0_ITAPDLYENA=1/0 with the same SD0_ITAPDLYSEL=0, even though the behavior should be identical -- zero delay added to rxclk_in line. The former breaks HS200 training in low temperature conditions. Write IOU_SLCR SD_ITAPDLY register to 0 using PM_MMIO_WRITE which seem to allow unrestricted WRITE access (and PM_MMIO_READ which allows read access) to the entire address space. This way, it is possible to work around the defect in IOCTL_SET_SD_TAPDELAY design which does not permit clearing SDx_ITAPDLYENA bit. Note that the embeddedsw firmware does not permit clearing the SD_ITAPDLY SD0_ITAPDLYENA bit, this bit can only ever be set by the firmware and it is often impossible to update the possibly broken firmware. Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20221215152023.8387-1-marex@denx.de Signed-off-by: Michal Simek commit fcc2f972f948d8bd5f8f149617d821b0ae3ad5fd Author: Michal Simek Date: Thu Dec 8 13:32:11 2022 +0100 firmware: xilinx: Remove kernel-doc marking in the code Trivial fix. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/f4c61cd5e45fab345c366a15766101408fbc3bcd.1670502727.git.michal.simek@amd.com commit 9eedb910a3be0005b88c696a8552c0d4c9937cd4 Author: Qiheng Lin Date: Tue Nov 29 22:05:44 2022 +0800 ARM: zynq: Fix refcount leak in zynq_early_slcr_init of_find_compatible_node() returns a node pointer with refcount incremented, we should use of_node_put() on error path. Add missing of_node_put() to avoid refcount leak. Fixes: 3329659df030 ("ARM: zynq: Simplify SLCR initialization") Signed-off-by: Qiheng Lin Link: https://lore.kernel.org/r/20221129140544.41293-1-linqiheng@huawei.com Signed-off-by: Michal Simek commit 185ffb481405bbfd5eadb47ab22395f6fe704331 Author: Michal Simek Date: Fri Dec 9 14:58:07 2022 +0100 arm64: dts: zynqmp: Remove clock-names from GEM in zynqmp-clk-ccf.dtsi Remove clock-names from GEM nodes from clk-ccf because they should be only present in zynqmp.dtsi. And as is visible both clock-names defined didn't really match. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/24ce27f91a55ed04ca7ee2ff7db0c674702ef722.1670594284.git.michal.simek@amd.com commit 53ba1b2bdaf7f481fdd878e9c18cd0e54081fac9 Author: Piyush Mehta Date: Fri Dec 9 14:54:47 2022 +0100 arm64: dts: zynqmp: Add mode-pin GPIO controller DT node Add mode-pin GPIO controller DT node in zynqmp.dtsi and wire it to usb0 controller. All Xilinx evaluation boards are using modepin gpio for ULPI reset that's why wire it directly in zynqmp instead of c&p the same line to every board specific file. Signed-off-by: Piyush Mehta Signed-off-by: Michal Simek Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/69924a8e2c01e5a1d25d098adc53224ddb841f46.1670594085.git.michal.simek@amd.com commit 32405e532d358a2f9d4befae928b9883c8597616 Author: Michael Grzeschik Date: Sun Oct 23 23:56:49 2022 +0200 arm64: zynqmp: Enable hs termination flag for USB dwc3 controller Since we need to support legacy phys with the dwc3 controller, we enable this quirk on the zynqmp platforms. Signed-off-by: Michael Grzeschik Link: https://lore.kernel.org/r/20221023215649.221726-1-m.grzeschik@pengutronix.de Signed-off-by: Michal Simek commit d6e25926d1fcb9a7776b833026d0d473e1cc7ce0 Author: Andrew Davis Date: Mon Oct 24 12:34:33 2022 -0500 arm64: dts: xilinx: Rename DTB overlay source files from .dts to .dtso DTB Overlays (.dtbo) can now be built from source files with the extension (.dtso). This makes it clear what is the content of the files and differentiates them from base DTB source files. Convert the DTB overlay source files in the arm64/xilinx directory. Signed-off-by: Andrew Davis Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20221024173434.32518-7-afd@ti.com Signed-off-by: Michal Simek commit 56f2b1ff7b5ca474e57d030fa350991708a69117 Author: Michal Simek Date: Wed Nov 30 17:30:02 2022 +0100 arm64: xilinx: Fix opp-table-cpu OPP table name now should start with "opp-table" and OPP entries shouldn't contain commas and @ signs in accordance to the new schema requirement. The same change was done by commit c6d4a8977598 ("ARM: tegra: Rename CPU and EMC OPP table device-tree nodes"), commit ffbe853a3f5a ("ARM: dts: sunxi: Fix OPPs node name") or commit b7072cc5704d ("arm64: dts: qcom: qcs404: Rename CPU and CPR OPP tables"). Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/3297772b58953e4afd91f7a4bd845713e36e1e27.1652713489.git.michal.simek@amd.com commit 43811f31cbf19bdd671214518f0551d0296feada Author: Krzysztof Kozlowski Date: Fri Nov 25 15:41:36 2022 +0100 arm64: dts: xilinx: align LED node names with dtschema The node names should be generic and DT schema expects certain pattern: xilinx/zynqmp-zcu100-revC.dtb: leds: 'vbus-det' does not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221125144136.477171-1-krzysztof.kozlowski@linaro.org Signed-off-by: Michal Simek commit 1bea534991b9b35c41848a397666ada436456beb Author: Gaosheng Cui Date: Tue Nov 29 09:01:46 2022 +0800 driver: soc: xilinx: fix memory leak in xlnx_add_cb_for_notify_event() The kfree() should be called when memory fails to be allocated for cb_data in xlnx_add_cb_for_notify_event(), otherwise there will be a memory leak, so add kfree() to fix it. Fixes: 05e5ba40ea7a ("driver: soc: xilinx: Add support of multiple callbacks for same event in event management driver") Signed-off-by: Gaosheng Cui Acked-by: Michal Simek Link: https://lore.kernel.org/r/20221129010146.1026685-1-cuigaosheng1@huawei.com Signed-off-by: Michal Simek commit 2902c0c72d2f0fa6bd945c4f7c586fb59cba56ea Author: Steffen Trumtrar Date: Thu Aug 11 11:20:36 2022 +0200 ARM: dts: zynq: add QSPI controller node The driver and binding for the Zynq QSPI is already present in the kernel. The node is not added to the zynq-7000.dtsi, however. Signed-off-by: Steffen Trumtrar Link: https://lore.kernel.org/r/20220811092036.3689983-1-s.trumtrar@pengutronix.de Signed-off-by: Michal Simek commit 8dd4e8c49efc5a7a3879e117e4aa58082734506e Author: Maxime Ripard Date: Mon Jan 2 13:01:23 2023 +0100 drm/bridge: panel: Prevent ERR_PTR Dereference Commit 5ea6b1702781 ("drm/panel: Add prepare_prev_first flag to drm_panel") introduced an access to the bridge pointer in the devm_drm_panel_bridge_add_typed() function. However, due to the unusual ERR_PTR check when getting that pointer, the pointer access is done even though the pointer might be an error pointer. Rework the function for a more traditional design that will return immediately if it gets an ERR_PTR so that we never access the pointer in that case. Fixes: 5ea6b1702781 ("drm/panel: Add prepare_prev_first flag to drm_panel") Reported-by: kernel test robot Reported-by: Dan Carpenter Reviewed-by: Laurent Pinchart Reviewed-by: Andrzej Hajda Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230102120123.19062-1-maxime@cerno.tech Link: https://patchwork.freedesktop.org/patch/msgid/20230102120123.19062-1-maxime@cerno.tech commit cea7be909414d941a4616e6794f4a5282eb6e652 Author: Paul E. McKenney Date: Wed Jan 4 16:38:02 2023 -0800 drivers/opp: 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: Viresh Kumar Cc: Nishanth Menon Cc: Stephen Boyd Cc: Signed-off-by: Viresh Kumar commit d75858ef108c3b41f0f3215fe37505bb63e3795d Merge: 1f47510ed50a5 acd3b7768048f Author: Jakub Kicinski Date: Wed Jan 4 20:21:25 2023 -0800 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== bpf-next 2023-01-04 We've added 45 non-merge commits during the last 21 day(s) which contain a total of 50 files changed, 1454 insertions(+), 375 deletions(-). The main changes are: 1) Fixes, improvements and refactoring of parts of BPF verifier's state equivalence checks, from Andrii Nakryiko. 2) Fix a few corner cases in libbpf's BTF-to-C converter in particular around padding handling and enums, also from Andrii Nakryiko. 3) Add BPF_F_NO_TUNNEL_KEY extension to bpf_skb_set_tunnel_key to better support decap on GRE tunnel devices not operating in collect metadata, from Christian Ehrig. 4) Improve x86 JIT's codegen for PROBE_MEM runtime error checks, from Dave Marchevsky. 5) Remove the need for trace_printk_lock for bpf_trace_printk and bpf_trace_vprintk helpers, from Jiri Olsa. 6) Add proper documentation for BPF_MAP_TYPE_SOCK{MAP,HASH} maps, from Maryam Tahhan. 7) Improvements in libbpf's btf_parse_elf error handling, from Changbin Du. 8) Bigger batch of improvements to BPF tracing code samples, from Daniel T. Lee. 9) Add LoongArch support to libbpf's bpf_tracing helper header, from Hengqi Chen. 10) Fix a libbpf compiler warning in perf_event_open_probe on arm32, from Khem Raj. 11) Optimize bpf_local_storage_elem by removing 56 bytes of padding, from Martin KaFai Lau. 12) Use pkg-config to locate libelf for resolve_btfids build, from Shen Jiamin. 13) Various libbpf improvements around API documentation and errno handling, from Xin Liu. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (45 commits) libbpf: Return -ENODATA for missing btf section libbpf: Add LoongArch support to bpf_tracing.h libbpf: Restore errno after pr_warn. libbpf: Added the description of some API functions libbpf: Fix invalid return address register in s390 samples/bpf: Use BPF_KSYSCALL macro in syscall tracing programs samples/bpf: Fix tracex2 by using BPF_KSYSCALL macro samples/bpf: Change _kern suffix to .bpf with syscall tracing program samples/bpf: Use vmlinux.h instead of implicit headers in syscall tracing program samples/bpf: Use kyscall instead of kprobe in syscall tracing program bpf: rename list_head -> graph_root in field info types libbpf: fix errno is overwritten after being closed. bpf: fix regs_exact() logic in regsafe() to remap IDs correctly bpf: perform byte-by-byte comparison only when necessary in regsafe() bpf: reject non-exact register type matches in regsafe() bpf: generalize MAYBE_NULL vs non-MAYBE_NULL rule bpf: reorganize struct bpf_reg_state fields bpf: teach refsafe() to take into account ID remapping bpf: Remove unused field initialization in bpf's ctl_table selftests/bpf: Add jit probe_mem corner case tests to s390x denylist ... ==================== Link: https://lore.kernel.org/r/20230105000926.31350-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 4a20bc3e207488064e08fc5d7220d6acf95c80dd Author: Dan Williams Date: Thu Dec 8 09:02:00 2022 -0800 cxl/pci: Move tracepoint definitions to drivers/cxl/core/ CXL is using tracepoints for reporting RAS capability register payloads for AER events, and has plans to use tracepoints for the output payload of Get Poison List and Get Event Records commands. For organization purposes it would be nice to keep those all under a single + local CXL trace system. This also organization also potentially helps in the future when CXL drivers expand beyond generic memory expanders, however that would also entail a move away from the expander-specific cxl_dev_state context, save that for later. Note that the powerpc-specific drivers/misc/cxl/ also defines a 'cxl' trace system, however, it is unlikely that a single platform will ever load both drivers simultaneously. Cc: Steven Rostedt Tested-by: Alison Schofield Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/167051869176.436579.9728373544811641087.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit ac8723e888805345e11785846304373277aec532 Author: AngeloGioacchino Del Regno Date: Wed Jan 4 12:53:41 2023 +0100 remoteproc/mtk_scp: Remove timeout variable from scp_ipi_send() That variable was used twice, but now it's just used once to store msecs_to_jiffies(wait), fed to wait_event_timeout(): we might as well remove it for the sake of cleaning up. This brings no functional changes. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230104115341.320951-3-angelogioacchino.delregno@collabora.com Signed-off-by: Mathieu Poirier commit fad151d52ba4075f19573a91ada0c636eb96a349 Author: AngeloGioacchino Del Regno Date: Wed Jan 4 12:53:40 2023 +0100 remoteproc/mtk_scp: Use readl_poll_timeout_atomic() for polling Convert the usage of an open-coded custom tight poll while loop with the provided readl_poll_timeout_atomic() macro. This cleanup brings no functional change. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230104115341.320951-2-angelogioacchino.delregno@collabora.com Signed-off-by: Mathieu Poirier commit 33e3f0a3358b8f9bb54b2661b9c1d37a75664c79 Author: Richard Clark Date: Tue Dec 13 12:39:36 2022 +0800 workqueue: Add a new flag to spot the potential UAF error Currently if the user queues a new work item unintentionally into a wq after the destroy_workqueue(wq), the work still can be queued and scheduled without any noticeable kernel message before the end of a RCU grace period. As a debug-aid facility, this commit adds a new flag __WQ_DESTROYING to spot that issue by triggering a kernel WARN message. Signed-off-by: Richard Clark Reviewed-by: Lai Jiangshan Signed-off-by: Tejun Heo commit 21786e5cb375a1e58a9175fee423e1d7f892d965 Author: Daniel Vacek Date: Tue Dec 20 16:14:15 2022 +0100 cgroup/cpuset: no need to explicitly init a global static variable cpuset_rwsem is a static variable defined with DEFINE_STATIC_PERCPU_RWSEM(). It's initialized at build time and so there's no need for explicit runtime init leaking one percpu int. Signed-off-by: Daniel Vacek Reviewed-by: Aaron Tomlin Acked-by: Mukesh Ojha Signed-off-by: Tejun Heo commit e46ceea3148163166ef9b7bcac578e72dd30c064 Author: Chen-Yu Tsai Date: Wed Jan 4 16:31:10 2023 +0800 remoteproc/mtk_scp: Move clk ops outside send_lock Clocks are properly reference counted and do not need to be inside the lock range. Right now this triggers a false-positive lockdep warning on MT8192 based Chromebooks, through a combination of mtk-scp that has a cros-ec-rpmsg sub-device, the (actual) cros-ec I2C adapter registration, I2C client (not on cros-ec) probe doing i2c transfers and enabling clocks. This is a false positive because the cros-ec-rpmsg under mtk-scp does not have an I2C adapter, and also each I2C adapter and cros-ec instance have their own mutex. Move the clk operations outside of the send_lock range. Fixes: 63c13d61eafe ("remoteproc/mediatek: add SCP support for mt8183") Signed-off-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230104083110.736377-1-wenst@chromium.org [Fixed "Fixes:" tag line] Signed-off-by: Mathieu Poirier commit 6779b5db90c5b925293f7ccc5ed5336c5b24ed50 Author: Chao Yu Date: Wed Dec 21 20:13:45 2022 +0800 f2fs: fix to call clear_page_private_reference in .{release,invalid}_folio b763f3bedc2d ("f2fs: restructure f2fs page.private layout") missed to call clear_page_private_reference() in .{release,invalid}_folio, fix it, though it's not a big deal since folio_detach_private() was called to clear all privae info and reference count in the page. BTW, remove page_private_reference() definition as it never be used. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b3107b3854c93ea380ac373c0032fcf15f31178a Author: Chao Yu Date: Tue Dec 20 19:56:02 2022 +0800 f2fs: remove unused PAGE_PRIVATE_ATOMIC_WRITE Commit 3db1de0e582c ("f2fs: change the current atomic write way") has removed all users of PAGE_PRIVATE_ATOMIC_WRITE, remove its definition and related functions. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f35474ec0059c318f9d1aff1d492a5494beb6293 Author: Chao Yu Date: Wed Dec 21 20:14:45 2022 +0800 f2fs: fix to support .migrate_folio for compressed inode Add missed .migrate_folio for compressed inode, in order to support migration of compressed inode's page. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 39bee2e6acc2522d88feb324b18178b34cb7b75a Author: Sergey Shtylyov Date: Tue Dec 20 20:17:32 2022 +0300 f2fs: file: drop useless initializer in expand_inode_data() In expand_inode_data(), the 'new_size' local variable is initialized to the result of i_size_read(), however this value isn't ever used, so we can drop this initializer... Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Signed-off-by: Sergey Shtylyov Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b33d59fb37ddcb6ee65d4fa23cc3d58793d13c5b Author: Heiko Carstens Date: Wed Jan 4 16:55:53 2023 +0100 s390/uaccess: avoid __ashlti3() call __cmpxchg_user_key() uses 128 bit types which, depending on compiler and config options, may lead to an __ashlti3() library call. Get rid of that by simply casting the 128 bit values to 32 bit values. Reported-by: kernel test robot Suggested-by: Janis Schoetterl-Glausch Fixes: 51098f0eb22e ("s390/cmpxchg: make loop condition for 1,2 byte cases precise") Link: https://lore.kernel.org/all/4b96b112d5415d08a81d30657feec2c8c3000f7c.camel@linux.ibm.com/ Signed-off-by: Heiko Carstens commit 51342cc021400841b461cc579f76db24cdb482fc Author: Sean Paul Date: Tue Jan 3 15:27:38 2023 +0000 drm/docs: Explicitly document default CRTC background behavior Add a paragraph explaining that the default behavior for areas which are not covered by planes or where planes are blending with the CRTC background, is black. This is alluded to in the "pixel blend mode" property docs, but not called out explicitly. Reviewed-by: Simon Ser Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20230103152738.1213785-1-sean@poorly.run commit 03a0a1040895711e12c15ab28d4d1812928e171d Merge: f422fa7cd8583 2591939e881cf Author: Daniel Vetter Date: Wed Jan 4 14:59:24 2023 +0100 Merge tag 'drm-misc-next-2023-01-03' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v6.3: UAPI Changes: * connector: Support analog-TV mode property * media: Add MEDIA_BUS_FMT_RGB565_1X24_CPADHI, MEDIA_BUS_FMT_RGB666_1X18 and MEDIA_BUS_FMT_RGB666_1X24_CPADHI Cross-subsystem Changes: * dma-buf: Documentation fixes * i2c: Introduce i2c_client_get_device_id() helper Core Changes: * Improve support for analog TV output * bridge: Remove unused drm_bridge_chain functions * debugfs: Add per-device helpers and convert various DRM drivers * dp-mst: Various fixes * fbdev emulation: Always pick 32 bpp as default * KUnit: Add tests for managed helpers; Various cleanups * panel-orientation: Add quirks for Lenovo Yoga Tab 3 X90F and DynaBook K50 * TTM: Open-code ttm_bo_wait() and remove the helper Driver Changes: * Fix preferred depth and bpp values throughout DRM drivers * Remove #CONFIG_PM guards throughout DRM drivers * ast: Various fixes * bridge: Implement i2c's probe_new in various drivers; Fixes; ite-it6505: Locking fixes, Cache EDID data; ite-it66121: Support IT6610 chip, Cleanups; lontium-tl9611: Fix HDMI on DragonBoard 845c; parade-ps8640: Use atomic bridge functions * gud: Convert to DRM shadow-plane helpers; Perform flushing synchronously during atomic update * ili9486: Support 16-bit pixel data * imx: Split off IPUv3 driver; Various fixes * mipi-dbi: Convert to DRM shadow-plane helpers plus rsp driver changes;i Support separate I/O-voltage supply * mxsfb: Depend on ARCH_MXS or ARCH_MXC * omapdrm: Various fixes * panel: Use ktime_get_boottime() to measure power-down delay in various drivers; Fix auto-suspend delay in various drivers; orisetech-ota5601a: Add support * sprd: Cleanups * sun4i: Convert to new TV-mode property * tidss: Various fixes * v3d: Various fixes * vc4: Convert to new TV-mode property; Support Kunit tests; Cleanups; dpi: Support RGB565 and RGB666 formats; dsi: Convert DSI driver to bridge * virtio: Improve tracing * vkms: Support small cursors in IGT tests; Various fixes Signed-off-by: Daniel Vetter From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/Y7QIwlfElAYWxRcR@linux-uq9g commit 5a9b0c7418448ed3766f61ba0a71d08f259c3181 Author: Arun R Murthy Date: Wed Dec 21 09:02:09 2022 +0530 drm/i915/dp: change aux_ctl reg read to polling read The busy timeout logic checks for the AUX BUSY, then waits for the timeout period and then after timeout reads the register for BUSY or Success. Instead replace interrupt with polling so as to read the AUX CTL register often before the timeout period. Looks like there might be some issue with interrupt-on-read. Hence changing the logic to polling read. v2: replace interrupt with polling read v3: use usleep_rang instead of msleep, updated commit msg v4: use intel_wait_for_regiter internal function v5: use __intel_de_wait_for_register with 500us slow and 10ms fast timeout v6: check return value of __intel_de_wait_for_register v7: using default 2us for intel_de_wait_for_register Signed-off-by: Arun R Murthy Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20221221033209.1284435-1-arun.r.murthy@intel.com commit 1f47510ed50a511e7085a61d1a52fbe21f097a7c Merge: c183e6c3ec342 1d1b4c63ba739 Author: David S. Miller Date: Wed Jan 4 08:57:24 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-01-03 (igc) Muhammad Husaini Zulkifli says: Improvements to the Time-Sensitive Networking (TSN) Qbv Scheduling capabilities were included in this patch series for I226 SKU. An overview of each patch series is given below: Patch 1: To enable basetime scheduling in the future, remove the existing restriction for i226 stepping while maintain the restriction for i225. Patch 2: Remove the restriction which require a controller reset when setting the basetime register for new i226 steps and enable the second GCL configuration. Patch 3: Remove the power reset adapter during disabling the tsn config. --- Patches remaining from initial PR: https://lore.kernel.org/netdev/20221205212414.3197525-1-anthony.l.nguyen@intel.com/ after sending net patches: https://lore.kernel.org/netdev/20221215230758.3595578-1-anthony.l.nguyen@intel.com/ Note: patch 3 is an additional patch from the initial PR. ==================== Signed-off-by: David S. Miller commit 953ff25fc9fb831a675259ce1e738c94fb6202b6 Author: Andy Shevchenko Date: Mon Jan 2 21:24:04 2023 +0200 thunderbolt: Refactor tb_acpi_add_link() Convert while loop into do-while with only a single call to acpi_get_first_physical_node(). No functional change intended. Signed-off-by: Andy Shevchenko Signed-off-by: Mika Westerberg commit bd99ede8ef2dc03e29a181b755ba4f78da2644e6 Author: Zhu Yanjun Date: Wed Jan 4 01:43:33 2023 -0500 RDMA/irdma: Remove extra ret variable in favor of existing err In the function irdma_reg_user_mr, err and ret exist. Actually, one variable err is enough. Signed-off-by: Zhu Yanjun Link: https://lore.kernel.org/r/20230104064333.660344-1-yanjun.zhu@intel.com Signed-off-by: Leon Romanovsky commit 9ba7d3b3b826ef47c1b7b8dbc2d57da868168128 Author: Jonas Oberhauser Date: Fri Dec 2 13:51:00 2022 +0100 tools: memory-model: Make plain accesses carry dependencies As reported by Viktor, plain accesses in LKMM are weaker than accesses to registers: the latter carry dependencies but the former do not. This is exemplified in the following snippet: int r = READ_ONCE(*x); WRITE_ONCE(*y, r); Here a data dependency links the READ_ONCE() to the WRITE_ONCE(), preserving their order, because the model treats r as a register. If r is turned into a memory location accessed by plain accesses, however, the link is broken and the order between READ_ONCE() and WRITE_ONCE() is no longer preserved. This is too conservative, since any optimizations on plain accesses that might break dependencies are also possible on registers; it also contradicts the intuitive notion of "dependency" as the data stored by the WRITE_ONCE() does depend on the data read by the READ_ONCE(), independently of whether r is a register or a memory location. This is resolved by redefining all dependencies to include dependencies carried by memory accesses; a dependency is said to be carried by memory accesses (in the model: carry-dep) from one load to another load if the initial load is followed by an arbitrarily long sequence alternating between stores and loads of the same thread, where the data of each store depends on the previous load, and is read by the next load. Any dependency linking the final load in the sequence to another access also links the initial load in the sequence to that access. More deep details can be found in this LKML discussion: https://lore.kernel.org/lkml/d86295788ad14a02874ab030ddb8a6f8@huawei.com/ Reported-by: Viktor Vafeiadis Signed-off-by: Jonas Oberhauser Reviewed-by: Alan Stern Signed-off-by: Paul E. McKenney commit aae0c8a50d6d312d87188cf4dc8bde8c253978d7 Author: Kushagra Verma Date: Tue Nov 29 18:50:59 2022 +0530 Documentation: Fixed a typo in atomic_t.txt Fixed a typo in the word 'architecture'. Signed-off-by: Kushagra Verma Signed-off-by: Paul E. McKenney commit ebd50e2947de9d2675b800a6a29748d0ed7d7fd4 Author: Alan Stern Date: Wed Nov 16 15:48:01 2022 -0500 tools: memory-model: Add rmw-sequences to the LKMM Viktor (as relayed by Jonas) has pointed out a weakness in the Linux Kernel Memory Model. Namely, the memory ordering properties of atomic operations are not monotonic: An atomic op with full-barrier semantics does not always provide ordering as strong as one with release-barrier semantics. The following litmus test illustrates the problem: -------------------------------------------------- C atomics-not-monotonic {} P0(int *x, atomic_t *y) { WRITE_ONCE(*x, 1); smp_wmb(); atomic_set(y, 1); } P1(atomic_t *y) { int r1; r1 = atomic_inc_return(y); } P2(int *x, atomic_t *y) { int r2; int r3; r2 = atomic_read(y); smp_rmb(); r3 = READ_ONCE(*x); } exists (2:r2=2 /\ 2:r3=0) -------------------------------------------------- The litmus test is allowed as shown with atomic_inc_return(), which has full-barrier semantics. But if the operation is changed to atomic_inc_return_release(), which only has release-barrier semantics, the litmus test is forbidden. Clearly this violates monotonicity. The reason is because the LKMM treats full-barrier atomic ops as if they were written: mb(); load(); store(); mb(); (where the load() and store() are the two parts of an atomic RMW op), whereas it treats release-barrier atomic ops as if they were written: load(); release_barrier(); store(); The difference is that here the release barrier orders the load part of the atomic op before the store part with A-cumulativity, whereas the mb()'s above do not. This means that release-barrier atomics can effectively extend the cumul-fence relation but full-barrier atomics cannot. To resolve this problem we introduce the rmw-sequence relation, representing an arbitrarily long sequence of atomic RMW operations in which each operation reads from the previous one, and explicitly allow it to extend cumul-fence. This modification of the memory model is sound; it holds for PPC because of B-cumulativity, it holds for TSO and ARM64 because of other-multicopy atomicity, and we can assume that atomic ops on all other architectures will be implemented so as to make it hold for them. For similar reasons we also allow rmw-sequence to extend the w-post-bounded relation, which is analogous to cumul-fence in some ways. Reported-by: Viktor Vafeiadis Signed-off-by: Alan Stern Reviewed-by: Jonas Oberhauser Signed-off-by: Paul E. McKenney commit 289e1c89217d42a18230ab45e75fd79c993671f3 Author: Parav Pandit Date: Thu Oct 27 23:10:00 2022 +0300 locking/memory-barriers.txt: Improve documentation for writel() example The cited commit describes that when using writel(), explicit wmb() is not needed. wmb() is an expensive barrier. writel() uses the needed platform specific barrier instead of wmb(). writeX() section of "KERNEL I/O BARRIER EFFECTS" already describes ordering of I/O accessors with MMIO writes. Hence add the comment for pseudo code of writel() and remove confusing text around writel() and wmb(). commit 5846581e3563 ("locking/memory-barriers.txt: Fix broken DMA vs. MMIO ordering example") Co-developed-by: Will Deacon Signed-off-by: Will Deacon Signed-off-by: Parav Pandit Signed-off-by: Paul E. McKenney commit f092eb34b33043152bfb8a4ca01db9a06728261d Author: Paul E. McKenney Date: Tue Dec 13 13:57:28 2022 -0800 clocksource: Improve read-back-delay message When cs_watchdog_read() is unable to get a qualifying clocksource read within the limit set by max_cswd_read_retries, it prints a message and marks the clocksource under test as unstable. But that message is unclear to anyone unfamiliar with the code: clocksource: timekeeping watchdog on CPU13: wd-tsc-wd read-back delay 1000614ns, attempt 3, marking unstable Therefore, add some context so that the message appears as follows: clocksource: timekeeping watchdog on CPU13: wd-tsc-wd excessive read-back delay of 1000614ns vs. limit of 125000ns, wd-wd read-back delay only 27ns, attempt 3, marking tsc unstable Signed-off-by: Paul E. McKenney Cc: John Stultz Cc: Thomas Gleixner Cc: Stephen Boyd Cc: Feng Tang commit c37e85c135cead4256dc8860073c468d8925c3df Author: Paul E. McKenney Date: Tue Dec 6 19:36:10 2022 -0800 clocksource: Loosen clocksource watchdog constraints Currently, MAX_SKEW_USEC is set to 100 microseconds, which has worked reasonably well. However, NTP is willing to tolerate 500 microseconds of skew per second, and a clocksource that is good enough for NTP should be good enough for the clocksource watchdog. The watchdog's skew is controlled by MAX_SKEW_USEC and the CLOCKSOURCE_WATCHDOG_MAX_SKEW_US Kconfig option. However, these values are doubled before being associated with a clocksource's ->uncertainty_margin, and the ->uncertainty_margin values of the pair of clocksource's being compared are summed before checking against the skew. Therefore, set both MAX_SKEW_USEC and the default for the CLOCKSOURCE_WATCHDOG_MAX_SKEW_US Kconfig option to 125 microseconds of skew per second, resulting in 500 microseconds of skew per second in the clocksource watchdog's skew comparison. Suggested-by Rik van Riel Signed-off-by: Paul E. McKenney commit beaa1ffe551c330d8ea23de158432ecaad6c0410 Author: Yunying Sun Date: Wed Nov 16 16:22:21 2022 +0800 clocksource: Print clocksource name when clocksource is tested unstable Some "TSC fall back to HPET" messages appear on systems having more than 2 NUMA nodes: clocksource: timekeeping watchdog on CPU168: hpet read-back delay of 4296200ns, attempt 4, marking unstable The "hpet" here is misleading the clocksource watchdog is really doing repeated reads of "hpet" in order to check for unrelated delays. Therefore, print the name of the clocksource under test, prefixed by "wd-" and suffixed by "-wd", for example, "wd-tsc-wd". Signed-off-by: Yunying Sun Signed-off-by: Paul E. McKenney commit 002c487119f2c740bad0a3acbd356d4a57d237c3 Author: Damien Le Moal Date: Thu Dec 29 18:00:03 2022 +0100 ata: libata-scsi: improve ata_scsiop_maint_in() Allow translation of REPORT_SUPPORTED_OPERATION_CODES commands using the command format 0x3, that is, checking support for commands that are identified using an opcode and a service action. Signed-off-by: Damien Le Moal Signed-off-by: Niklas Cassel commit 7574a8377c7afc5e5ccbb62d9602d25c033a0f1b Author: Niklas Cassel Date: Thu Dec 29 18:00:02 2022 +0100 ata: libata-scsi: do not overwrite SCSI ML and status bytes For SCSI ML byte: In the case where a command is completed via libata EH: irq -> ata_qc_complete() -> ata_qc_schedule_eh() irq done ... -> ata_do_eh() -> ata_eh_link_autopsy() -> ata_eh_finish() -> ata_eh_qc_complete() -> __ata_eh_qc_complete() -> __ata_qc_complete() -> qc->complete_fn() (ata_scsi_qc_complete()) -> ata_qc_done() -> qc->scsidone() (empty stub) ... -> scsi_eh_finish_cmd() -> scsi_eh_flush_done_q() -> scsi_finish_command() ata_eh_link_autopsy() will call ata_eh_analyze_tf(), which calls scsi_check_sense(), which sets the SCSI ML byte. Since ata_scsi_qc_complete() is called after scsi_check_sense() when a command is completed via libata EH, we cannot simply overwrite the SCSI ML byte that was set earlier in the call chain. For SCSI status byte: When a SCSI command is prepared using scsi_prepare_cmd(), it sets cmd->result to 0. (SAM_STAT_GOOD is defined as 0x0). Likewise, when a command is requeued from SCSI EH, scsi_queue_insert() is called, which sets cmd->result to 0. A SCSI command thus always has a GOOD status by default when being sent to libata. If libata fetches sense data from the device, it will call ata_scsi_set_sense(), which will set the status byte to SAM_STAT_CHECK_CONDITION, if the caller deems that the status should be a check condition. ata_scsi_qc_complete() should therefore never overwrite the existing status byte, because if it is != GOOD, it was set by libata itself, for a reason. For the host byte: When libata abort commands, because of a NCQ error, it will schedule SCSI EH for all QCs using blk_abort_request(), which will all end up in scsi_timeout(), which will call scsi_abort_command(). scsi_timeout() sets DID_TIME_OUT regardless if a command was aborted or timed out. If we don't clear the DID_TIME_OUT byte for the QC that caused the NCQ error, that QC will be reported as a timed out command, instead of being reported as a NCQ error. For a command that actually timed out, DID_TIME_OUT would be fine to keep, but libata has its own way of detecting that a command timed out (see ata_scsi_cmd_error_handler()), and sets AC_ERR_TIMEOUT if that is the case. libata will retry timed out commands. We could clear DID_TIME_OUT only for the QC that caused the NCQ error, but since libata has its own way of detecting timeouts, simply clear it always. Note that the existing ata_scsi_qc_complete() code does: cmd->result = SAM_STAT_CHECK_CONDITION or cmd->result = SAM_STAT_GOOD. This WILL clear the host byte. So us clearing the host byte unconditionally is in line with the existing libata behavior. Signed-off-by: Niklas Cassel Signed-off-by: Damien Le Moal commit 87aab3c4cd59aef42fe280fece2be8b8156b99e0 Author: Niklas Cassel Date: Thu Dec 29 18:00:01 2022 +0100 ata: libata: move NCQ related ATA_DFLAGs ata_dev_configure() starts off by clearing all flags in ATA_DFLAG_CFG_MASK: dev->flags &= ~ATA_DFLAG_CFG_MASK; ata_dev_configure() then calls ata_dev_config_lba() which calls ata_dev_config_ncq(). ata_dev_config_ncq() will set the correct ATA_DFLAGs depending on what is actually supported. Since these flags are set by ata_dev_configure(), they should be in ATA_DFLAG_CFG_MASK and not in ATA_DFLAG_INIT_MASK. ATA_DFLAG_NCQ_PRIO_ENABLED is set via sysfs, is should therefore not be in ATA_DFLAG_CFG_MASK. It also cannot be in ATA_DFLAG_INIT_MASK, because ata_eh_schedule_probe() calls ata_dev_init(), which will clear all flags in ATA_DFLAG_INIT_MASK. This means that ATA_DFLAG_NCQ_PRIO_ENABLED (the value the user sets via sysfs) would get silently cleared if ata_eh_schedule_probe() is called. While that should only happen in certain circumstances, it still doesn't seem right that it can get silently cleared. (ata_dev_config_ncq_prio() will still clear the ATA_DFLAG_NCQ_PRIO_ENABLED flag if ATA_DFLAG_NCQ_PRIO is suddenly no longer supported after a revalidation.) Because of this, move ATA_DFLAG_NCQ_PRIO_ENABLED to be outside of both ATA_DFLAG_CFG_MASK and ATA_DFLAG_INIT_MASK. Signed-off-by: Niklas Cassel Signed-off-by: Damien Le Moal commit 7affcded810b7fa9b2e935fff5faa12af2b67033 Author: Niklas Cassel Date: Thu Dec 29 18:00:00 2022 +0100 ata: libata: respect successfully completed commands during errors In AHCI specification 1.3.1: "5.5.3 Processing Completed Commands" "For each port that has an interrupt pending: 1. Software determines the cause of the interrupt by reading the PxIS register. It is possible for multiple bits to be set. 2. Software clears appropriate bits in the PxIS register corresponding to the cause of the interrupt. 3. Software clears the interrupt bit in IS.IPS corresponding to the port. 4. If executing non-queued commands, software reads the PxCI register, and compares the current value to the list of commands previously issued by software that are still outstanding. If executing native queued commands, software reads the PxSACT register and compares the current value to the list of commands previously issued by software. Software completes with success any outstanding command whose corresponding bit has been cleared in the respective register. PxCI and PxSACT are volatile registers; software should only use their values to determine commands that have completed, not to determine which commands have previously been issued. 5. If there were errors, noted in the PxIS register, software performs error recovery actions (see section 6.2.2)." The documentation for the PxSACT shadow register in AHCI: "The device clears bits in this field by sending a Set Device Bits FIS to the host. The HBA clears bits in this field that are set to ‘1’ in the SActive field of the Set Device Bits FIS. The HBA only clears bits that correspond to native queued commands that have completed successfully." Additionally, in SATA specification 3.5a: "11.15 FPDMA QUEUED command protocol" "DFPDMAQ11: ERROR Halt command processing and transmit Set Device Bits FIS to host with the ERR bit in Status field set to one, Interrupt bit set to one, ATA error code set to one in the ERROR field, bits in ACT field cleared to zero for any outstanding queued commands, and bits set to one for any successfully completed queued commands that completion notification not yet delivered." I.e. even when the HBA triggers an error interrupt, the HBA will still clear successfully completed commands in PxSACT. Commands that did not complete successfully will still have its bit set in PxSACT. (Which means the command that caused the NCQ error and queued commands that had not yet finished at the time when the NCQ error occurred.) Additionally, for a HBA that does not have the libata flag AHCI_HFLAG_MULTI_MSI set, all ap->locks will point to host->lock, which means that IRQs will be disabled for one port while another port's IRQ handler is running. The HBA will still receive FISes from the device, even if IRQs on the HBA itself are disabled. What can thus e.g. receive a FIS that completes several commands successfully, followed by a FIS that does (or does not) complete additional commands with the error bit set, to indicate that at least one command was aborted. Therefore, modify ahci_handle_port_interrupt() using the new helper ahci_qc_complete() to complete the commands that have already been signaled as successfully through a regular completion SDB FIS, as not doing so would simply cause successfully completed commands to be retried for no good reason. Co-developed-by: Damien Le Moal Signed-off-by: Damien Le Moal Signed-off-by: Niklas Cassel commit 93c4aa449b88196c7d56a556cb6a2aad21ad8a7a Author: Niklas Cassel Date: Thu Dec 29 17:59:59 2022 +0100 ata: libata: read the shared status for successful NCQ commands once Currently, the status is being read for each QC, inside ata_qc_complete(), which means that QCs being completed by ata_qc_complete_multiple() (i.e. multiple QCs completed during a single interrupt), can have different status and error bits set. This is because the FIS Receive Area will get updated as soon as the HBA receives a new FIS from the device in the NCQ case. Here is an example of the problem: ata14.00: ata_qc_complete_multiple: done_mask: 0x180000 qc tag: 19 cmd: 0x61 flags: 0x11b err_mask: 0x0 tf->status: 0x40 qc tag: 20 cmd: 0x61 flags: 0x11b err_mask: 0x0 tf->status: 0x43 A print in ata_qc_complete_multiple(), shows that done_mask is: 0x180000 which means that tag 19 and 20 were completed. Another print in ata_qc_complete(), after the call to fill_result_tf(), shows that tag 19 and 20 have different status values, even though they were completed in the same ata_qc_complete_multiple() call. If PMP is not enabled, simply read the status and error once, before calling ata_qc_complete() for each QC. Without PMP, we know that all QCs must share the same status and error values. If PMP is enabled, we also read the status before calling ata_qc_complete(), however, we still read the status for each QC, since the QCs can belong to different PMP links (which means that the QCs does not necessarily share the same status and error values). Do all this by introducing the new port operation .qc_ncq_fill_rtf. If set, this operation is called in ata_qc_complete_multiple() to set the result tf for all completed QCs signaled by the last SDB FIS received. QCs that have their result tf filled are marked with the new flag ATA_QCFLAG_RTF_FILLED so that any later execution of the qc_fill_rtf port operation does nothing (e.g. when called from ata_qc_complete()). Co-developed-by: Damien Le Moal Signed-off-by: Damien Le Moal Signed-off-by: Niklas Cassel commit 931139af5718fb41565fff2420daf995c016ec80 Author: Damien Le Moal Date: Thu Dec 29 17:59:58 2022 +0100 ata: libata: simplify qc_fill_rtf port operation interface The boolean return value of the qc_fill_rtf operation is used nowhere. Simplify this operation interface by making it a void function. All drivers defining this operation are also updated. Signed-off-by: Damien Le Moal Signed-off-by: Niklas Cassel Reviewed-by: John Garry commit 876293121f24fc1a7df85450d0997f54540c8979 Author: Niklas Cassel Date: Thu Dec 29 17:59:57 2022 +0100 ata: scsi: rename flag ATA_QCFLAG_FAILED to ATA_QCFLAG_EH The name ATA_QCFLAG_FAILED is misleading since it does not mean that a QC completed in error, or that it didn't complete at all. It means that libata decided to schedule EH for the QC, so the QC is now owned by the libata error handler (EH). The normal execution path is responsible for not accessing a QC owned by EH. libata core enforces the rule by returning NULL from ata_qc_from_tag() for QCs owned by EH. It is quite easy to mistake that a QC marked with ATA_QCFLAG_FAILED was an error. However, a QC that was actually an error is instead indicated by having qc->err_mask set. E.g. when we have a NCQ error, we abort all QCs, which currently will mark all QCs as ATA_QCFLAG_FAILED. However, it will only be a single QC that is an error (i.e. has qc->err_mask set). Rename ATA_QCFLAG_FAILED to ATA_QCFLAG_EH to more clearly highlight that this flag simply means that a QC is now owned by EH. This new name will not mislead to think that the QC was an error (which is instead indicated by having qc->err_mask set). This also makes it more obvious that the EH code skips all QCs that do not have ATA_QCFLAG_EH set (rather than ATA_QCFLAG_FAILED), since the EH code should simply only care about QCs that are owned by EH itself. Signed-off-by: Niklas Cassel Reviewed-by: John Garry Signed-off-by: Damien Le Moal commit b83ad9eec316eaa7b448fba49c7b4ad72a73d4c9 Author: Wenchao Hao Date: Thu Dec 15 23:37:49 2022 +0800 ata: libata-eh: Cleanup ata_scsi_cmd_error_handler() If ap->ops->error_handler is NULL just return. This patch also fixes some comment style issue. Signed-off-by: Wenchao Hao Reviewed-by: Niklas Cassel Signed-off-by: Damien Le Moal commit 5a6cd56ad79a490d40ead5df0dfc8502e8081db0 Author: Paul E. McKenney Date: Wed Dec 14 20:53:00 2022 -0800 rcu: Permit string-valued Kconfig options in kvm.sh This commit upgrades the kvm.sh script's --kconfig parameter to accept string-valued Kconfig options with double-quoted string values. Signed-off-by: Paul E. McKenney commit ac71c3dd11e809cb732ae34efa6d9fc29d4664e1 Author: Paul E. McKenney Date: Wed Dec 14 16:37:27 2022 -0800 torture: Permit double-quoted-string Kconfig options Currently, the presence of any quoted-string Kconfig option in the scenario files or the CFcommon file (aside from the special-cased CONFIG_INITRAMFS_SOURCE option) will result in an "improperly set" diagnostic. This commit updates configcheck.sh to strip double quotes in order to permit string-valued Kconfig options to be handled correctly. Signed-off-by: Paul E. McKenney commit eeb4dd9e530de52fdf43283c50f371f0771725c9 Author: Tiezhu Yang Date: Wed Nov 23 09:03:28 2022 +0800 selftests: rcutorture: Use "grep -E" instead of "egrep" The latest version of grep is deprecating the egrep command, so that its output contains warnings as follows: egrep: warning: egrep is obsolescent; using grep -E Fix this using "grep -E" instead. sed -i "s/egrep/grep -E/g" `grep egrep -rwl tools/testing/selftests/rcutorture` 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 Signed-off-by: Paul E. McKenney commit 3e4c07b9f8217b016753985856238ac7684bc11f Author: Paul E. McKenney Date: Sun Nov 20 19:56:27 2022 -0800 torture: make kvm-find-errors.sh check for compressed vmlinux files Under some conditions, a given run's vmlinux file will be compressed, so that it is named vmlinux.xz rather than vmlinux. in such cases, kvm-find-errors.sh will complain about the nonexistence of vmlinux. This commit therefore causes kvm-find-errors.sh to check for vmlinux.xz as well as for vmlinux. Signed-off-by: Paul E. McKenney commit 3c6496c86e484be94cd8d69e604566dfeaa726a2 Author: Paul E. McKenney Date: Sun Nov 6 20:58:15 2022 -0800 refscale: Provide for initialization failure Current tests all have init() functions that are guaranteed to succeed. But upcoming tests will need to allocate memory, thus possibly failing. This commit therefore handles init() function failure. Signed-off-by: Paul E. McKenney commit 95f93e97ed0f56f54f74293a0a82e05599d5078d Author: Paul E. McKenney Date: Sun Nov 6 18:16:14 2022 -0800 torture: Seed torture_random_state on CPU The DEFINE_TORTURE_RANDOM_PERCPU() macro defines per-CPU random-number generators for torture testing, but the seeds for each CPU's instance will be identical if they are first used at the same time. This commit therefore adds the CPU number to the mix when reseeding. Signed-off-by: Paul E. McKenney commit a4fcfbee8f6274f9b3f9a71dd5b03e6772ce33f3 Author: Zqiang Date: Sat Dec 3 10:25:03 2022 +0800 rcu-tasks: Handle queue-shrink/callback-enqueue race condition The rcu_tasks_need_gpcb() determines whether or not: (1) There are callbacks needing another grace period, (2) There are callbacks ready to be invoked, and (3) It would be a good time to shrink back down to a single-CPU callback list. This third case is interesting because some other CPU might be adding new callbacks, which might suddenly make this a very bad time to be shrinking. This is currently handled by requiring call_rcu_tasks_generic() to enqueue callbacks under the protection of rcu_read_lock() and requiring rcu_tasks_need_gpcb() to wait for an RCU grace period to elapse before finalizing the transition. This works well in practice. Unfortunately, the current code assumes that a grace period whose end is detected by the poll_state_synchronize_rcu() in the second "if" condition actually ended before the earlier code counted the callbacks queued on CPUs other than CPU 0 (local variable "ncbsnz"). Given the current code, it is possible that a long-delayed call_rcu_tasks_generic() invocation will queue a callback on a non-zero CPU after these CPUs have had their callbacks counted and zero has been stored to ncbsnz. Such a callback would trigger the WARN_ON_ONCE() in the second "if" statement. To see this, consider the following sequence of events: o CPU 0 invokes rcu_tasks_one_gp(), and counts fewer than rcu_task_collapse_lim callbacks. It sees at least one callback queued on some other CPU, thus setting ncbsnz to a non-zero value. o CPU 1 invokes call_rcu_tasks_generic() and loads 42 from ->percpu_enqueue_lim. It therefore decides to enqueue its callback onto CPU 1's callback list, but is delayed. o CPU 0 sees the rcu_task_cb_adjust is non-zero and that the number of callbacks does not exceed rcu_task_collapse_lim. It therefore checks percpu_enqueue_lim, and sees that its value is greater than the value one. CPU 0 therefore starts the shift back to a single callback list. It sets ->percpu_enqueue_lim to 1, but CPU 1 has already read the old value of 42. It also gets a grace-period state value from get_state_synchronize_rcu(). o CPU 0 sees that ncbsnz is non-zero in its second "if" statement, so it declines to finalize the shrink operation. o CPU 0 again invokes rcu_tasks_one_gp(), and counts fewer than rcu_task_collapse_lim callbacks. It also sees that there are no callback queued on any other CPU, and thus sets ncbsnz to zero. o CPU 1 resumes execution and enqueues its callback onto its own list. This invalidates the value of ncbsnz. o CPU 0 sees the rcu_task_cb_adjust is non-zero and that the number of callbacks does not exceed rcu_task_collapse_lim. It therefore checks percpu_enqueue_lim, but sees that its value is already unity. It therefore does not get a new grace-period state value. o CPU 0 sees that rcu_task_cb_adjust is non-zero, ncbsnz is zero, and that poll_state_synchronize_rcu() says that the grace period has completed. it therefore finalizes the shrink operation, setting ->percpu_dequeue_lim to the value one. o CPU 0 does a debug check, scanning the other CPUs' callback lists. It sees that CPU 1's list has a callback, so it (rightly) triggers the WARN_ON_ONCE(). After all, the new value of ->percpu_dequeue_lim says to not bother looking at CPU 1's callback list, which means that this callback will never be invoked. This can result in hangs and maybe even OOMs. Based on long experience with rcutorture, this is an extremely low-probability race condition, but it really can happen, especially in preemptible kernels or within guest OSes. This commit therefore checks for completion of the grace period before counting callbacks. With this change, in the above failure scenario CPU 0 would know not to prematurely end the shrink operation because the grace period would not have completed before the count operation started. [ paulmck: Adjust grace-period end rather than adding RCU reader. ] [ paulmck: Avoid spurious WARN_ON_ONCE() with ->percpu_dequeue_lim check. ] Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney commit ea5c8987fef20a8cca07e428aa28bc64649c5104 Author: Zqiang Date: Thu Dec 1 07:45:33 2022 +0800 rcu-tasks: Make rude RCU-Tasks work well with CPU hotplug The synchronize_rcu_tasks_rude() function invokes rcu_tasks_rude_wait_gp() to wait one rude RCU-tasks grace period. The rcu_tasks_rude_wait_gp() function in turn checks if there is only a single online CPU. If so, it will immediately return, because a call to synchronize_rcu_tasks_rude() is by definition a grace period on a single-CPU system. (We could have blocked!) Unfortunately, this check uses num_online_cpus() without synchronization, which can result in too-short grace periods. To see this, consider the following scenario: CPU0 CPU1 (going offline) migration/1 task: cpu_stopper_thread -> take_cpu_down -> _cpu_disable (dec __num_online_cpus) ->cpuhp_invoke_callback preempt_disable access old_data0 task1 del old_data0 ..... synchronize_rcu_tasks_rude() task1 schedule out .... task2 schedule in rcu_tasks_rude_wait_gp() ->__num_online_cpus == 1 ->return .... task1 schedule in ->free old_data0 preempt_enable When CPU1 decrements __num_online_cpus, its value becomes 1. However, CPU1 has not finished going offline, and will take one last trip through the scheduler and the idle loop before it actually stops executing instructions. Because synchronize_rcu_tasks_rude() is mostly used for tracing, and because both the scheduler and the idle loop can be traced, this means that CPU0's prematurely ended grace period might disrupt the tracing on CPU1. Given that this disruption might include CPU1 executing instructions in memory that was just now freed (and maybe reallocated), this is a matter of some concern. This commit therefore removes that problematic single-CPU check from the rcu_tasks_rude_wait_gp() function. This dispenses with the single-CPU optimization, but there is no evidence indicating that this optimization is important. In addition, synchronize_rcu_tasks_generic() contains a similar optimization (albeit only for early boot), which also splats. (As in exactly why are you invoking synchronize_rcu_tasks_rude() so early in boot, anyway???) It is OK for the synchronize_rcu_tasks_rude() function's check to be unsynchronized because the only times that this check can evaluate to true is when there is only a single CPU running with preemption disabled. While in the area, this commit also fixes a minor bug in which a call to synchronize_rcu_tasks_rude() would instead be attributed to synchronize_rcu_tasks(). [ paulmck: Add "synchronize_" prefix and "()" suffix. ] Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney commit 28319d6dc5e2ffefa452c2377dd0f71621b5bff0 Author: Frederic Weisbecker Date: Fri Nov 25 14:55:00 2022 +0100 rcu-tasks: Fix synchronize_rcu_tasks() VS zap_pid_ns_processes() RCU Tasks and PID-namespace unshare can interact in do_exit() in a complicated circular dependency: 1) TASK A calls unshare(CLONE_NEWPID), this creates a new PID namespace that every subsequent child of TASK A will belong to. But TASK A doesn't itself belong to that new PID namespace. 2) TASK A forks() and creates TASK B. TASK A stays attached to its PID namespace (let's say PID_NS1) and TASK B is the first task belonging to the new PID namespace created by unshare() (let's call it PID_NS2). 3) Since TASK B is the first task attached to PID_NS2, it becomes the PID_NS2 child reaper. 4) TASK A forks() again and creates TASK C which get attached to PID_NS2. Note how TASK C has TASK A as a parent (belonging to PID_NS1) but has TASK B (belonging to PID_NS2) as a pid_namespace child_reaper. 5) TASK B exits and since it is the child reaper for PID_NS2, it has to kill all other tasks attached to PID_NS2, and wait for all of them to die before getting reaped itself (zap_pid_ns_process()). 6) TASK A calls synchronize_rcu_tasks() which leads to synchronize_srcu(&tasks_rcu_exit_srcu). 7) TASK B is waiting for TASK C to get reaped. But TASK B is under a tasks_rcu_exit_srcu SRCU critical section (exit_notify() is between exit_tasks_rcu_start() and exit_tasks_rcu_finish()), blocking TASK A. 8) TASK C exits and since TASK A is its parent, it waits for it to reap TASK C, but it can't because TASK A waits for TASK B that waits for TASK C. Pid_namespace semantics can hardly be changed at this point. But the coverage of tasks_rcu_exit_srcu can be reduced instead. The current task is assumed not to be concurrently reapable at this stage of exit_notify() and therefore tasks_rcu_exit_srcu can be temporarily relaxed without breaking its constraints, providing a way out of the deadlock scenario. [ paulmck: Fix build failure by adding additional declaration. ] Fixes: 3f95aa81d265 ("rcu: Make TASKS_RCU handle tasks that are almost done exiting") Reported-by: Pengfei Xu Suggested-by: Boqun Feng Suggested-by: Neeraj Upadhyay Suggested-by: Paul E. McKenney Cc: Oleg Nesterov Cc: Lai Jiangshan Cc: Eric W . Biederman Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit 44757092958bdd749775022f915b7ac974384c2a Author: Frederic Weisbecker Date: Fri Nov 25 14:54:59 2022 +0100 rcu-tasks: Remove preemption disablement around srcu_read_[un]lock() calls Ever since the following commit: 5a41344a3d83 ("srcu: Simplify __srcu_read_unlock() via this_cpu_dec()") SRCU doesn't rely anymore on preemption to be disabled in order to modify the per-CPU counter. And even then it used to be done from the API itself. Therefore and after checking further, it appears to be safe to remove the preemption disablement around __srcu_read_[un]lock() in exit_tasks_rcu_start() and exit_tasks_rcu_finish() Suggested-by: Boqun Feng Suggested-by: Paul E. McKenney Suggested-by: Neeraj Upadhyay Cc: Lai Jiangshan Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit e4e1e8089c5fd948da12cb9f4adc93821036945f Author: Frederic Weisbecker Date: Fri Nov 25 14:54:58 2022 +0100 rcu-tasks: Improve comments explaining tasks_rcu_exit_srcu purpose Make sure we don't need to look again into the depths of git blame in order not to miss a subtle part about how rcu-tasks is dealing with exiting tasks. Suggested-by: Boqun Feng Suggested-by: Neeraj Upadhyay Suggested-by: Paul E. McKenney Cc: Oleg Nesterov Cc: Lai Jiangshan Cc: Eric W. Biederman Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit 9420fb934cf15bee1cb6999676fa2dbd2560efc2 Author: Zqiang Date: Mon Nov 21 23:01:50 2022 +0800 rcu-tasks: Use accurate runstart time for RCU Tasks boot-time testing Currently, test_rcu_tasks_callback() reads from the jiffies counter only once when this function is invoked. This introduces inaccuracies because of the latencies induced by the synchronize_rcu_tasks*() invocations. This commit therefore re-reads the jiffies counter at the beginning of each test, thus avoiding penalizing later tests for the latencies induced by earlier tests. Therefore, this commit at the start of each RCU Tasks test, re-fetch the jiffies time as the runstart time. Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney commit 47904aed898a08f028572b9b5a5cc101ddfb2d82 Author: Zhen Lei Date: Sat Nov 19 17:25:03 2022 +0800 genirq: Fix the return type of kstat_cpu_irqs_sum() The type of member ->irqs_sum is unsigned long, but kstat_cpu_irqs_sum() returns int, which can result in truncation. Therefore, change the kstat_cpu_irqs_sum() function's return value to unsigned long to avoid truncation. Fixes: f2c66cd8eedd ("/proc/stat: scalability of irq num per cpu") Reported-by: Elliott, Robert (Servers) Signed-off-by: Zhen Lei Cc: Tejun Heo Cc: "Peter Zijlstra (Intel)" Cc: Josh Don Cc: Andrew Morton Reviewed-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit dafc4d1603c27671adc2b41eb7e7827f8cc18961 Author: Paul E. McKenney Date: Wed Dec 21 08:32:51 2022 -0800 srcu: Update comment after the index flip Because there is not guaranteed to be a full memory barrier between the ->srcu_unlock_count increment of an srcu_read_unlock() and the ->srcu_lock_count increment of the next srcu_read_lock(), this next srcu_read_lock() is not guaranteed to see the effect of the index flip just prior to this comment. However, this next srcu_read_lock() will execute a full memory barrier, so the srcu_read_lock() after that is guaranteed to see that index flip. This guarantee is illustrated by the following diagram of events and the litmus test following that. ------------------------------------------------------------------------ READER UPDATER ------------- ---------- // idx is initially 0. srcu_flip() { smp_mb(); // RSCS srcu_read_unlock() { smp_mb(); idx++; // P smp_mb(); // QQ } srcu_readers_unlock_idx(0) { ,--counted------------ count all unlock[0]; // Q | unlock[0]++; // X } smp_mb(); srcu_read_lock() { READ(idx) = 0; ,---- count all lock[0]; // contributes imbalance of 1. lock[0]++; ----counted | smp_mb(); // PP } | } | | // RSCS not going to effect above scan | srcu_read_unlock() { | smp_mb(); | unlock[0]++; | } | / / srcu_read_lock() { | READ(idx); // Y -----cannot be counted because of P (has to sample idx as 1) lock[1]++; ... } ------------------------------------------------------------------------ This makes it similar to the store buffer pattern. Using X, Y, P and Q annotated above, we get: ------------------------------------------------------------------------ READER UPDATER X (write) P (write) smp_mb(); //PP smp_mb(); //QQ Y (read) Q (read) ------------------------------------------------------------------------ ASCII art courtesy of Joel Fernandes. Reported-by: Joel Fernandes Reported-by: Boqun Feng Reported-by: Frederic Weisbecker Reported-by: Neeraj Upadhyay Signed-off-by: Paul E. McKenney commit 0cd4b50b12d96d668b0627c149b19b5784ad4898 Author: Paul E. McKenney Date: Wed Dec 14 10:50:30 2022 -0800 srcu: Yet more detail for srcu_readers_active_idx_check() comments The comment in srcu_readers_active_idx_check() following the smp_mb() is out of date, hailing from a simpler time when preemption was disabled across the bulk of __srcu_read_lock(). The fact that preemption was disabled meant that the number of tasks that had fetched the old index but not yet incremented counters was limited by the number of CPUs. In our more complex modern times, the number of CPUs is no longer a limit. This commit therefore updates this comment, additionally giving more memory-ordering detail. [ paulmck: Apply Nt->Nc feedback from Joel Fernandes. ] Reported-by: Boqun Feng Reported-by: Frederic Weisbecker Reported-by: "Joel Fernandes (Google)" Reported-by: Neeraj Upadhyay Reported-by: Uladzislau Rezki Signed-off-by: Paul E. McKenney commit 1bafbfb3e1a18af7f404977ed0d218dc4f176f8e Author: Pingfan Liu Date: Wed Nov 23 21:56:37 2022 +0800 srcu: Remove needless rcu_seq_done() check while holding read lock The srcu_gp_start_if_needed() function now read-holds the srcu_struct whose grace period is being started, which means that the corresponding SRCU grace period cannot end. This in turn means that the SRCU grace-period sequence number returned by rcu_seq_snap() cannot expire during this time. And that means that the calls to rcu_seq_done() in srcu_funnel_exp_start() and srcu_funnel_gp_start() can never return true. This commit therefore removes these rcu_seq_done() checks, but adds checks in kernels built with CONFIG_PROVE_RCU=y that splats if rcu_seq_done() does somehow return true. [ paulmck: Rearrange checks to handle kernels built with lockdep. ] Signed-off-by: Pingfan Liu Cc: Lai Jiangshan Cc: Frederic Weisbecker Cc: Josh Triplett Cc: Steven Rostedt Cc: Mathieu Desnoyers To: rcu@vger.kernel.org Signed-off-by: Paul E. McKenney commit efa3c40cfac0777071e30383d209534e09ee454b Author: Paul E. McKenney Date: Fri Nov 25 08:42:02 2022 -0800 rcu: Add test code for semaphore-like SRCU readers This commit adds trivial test code for srcu_down_read() and srcu_up_read(). Signed-off-by: Paul E. McKenney commit 0b1182bde303dc476ea9712c2c816be2e4f0cf81 Author: Paul E. McKenney Date: Wed Nov 23 15:49:55 2022 -0800 rcu: Add srcu_down_read() and srcu_up_read() A pair of matching srcu_read_lock() and srcu_read_unlock() invocations must take place within the same context, for example, within the same task. Otherwise, lockdep complains, as is the right thing to do for most use cases. However, there are use cases involving asynchronous I/O where the SRCU reader needs to begin on one task and end on another. This commit therefore supplies the semaphore-like srcu_down_read() and srcu_up_read(), which act like srcu_read_lock() and srcu_read_unlock(), but permitting srcu_up_read() to be invoked in a different context than was the matching srcu_down_read(). Neither srcu_down_read() nor srcu_up_read() may be invoked from an NMI handler. Reported-by: Jan Kara Signed-off-by: Paul E. McKenney Tested-by: Amir Goldstein commit 50be0c0439fc1d8bda733ff26f6526e49970857a Author: Pingfan Liu Date: Wed Nov 16 09:52:44 2022 +0800 srcu: Fix the comparision in srcu_invl_snp_seq() A grace-period sequence number contains two fields: counter and state. SRCU_SNP_INIT_SEQ provides a guaranteed invalid value for grace-period sequence numbers in newly allocated srcu_node structures' ->srcu_have_cbs[] and ->srcu_gp_seq_needed_exp fields. The point of the comparison in srcu_invl_snp_seq() is not to detect invalid grace-period sequence numbers in general, but rather to detect a newly allocated srcu_node structure whose ->srcu_have_cbs[] and ->srcu_gp_seq_needed_exp fields need to be brought into line with the srcu_struct structure's ->srcu_gp_seq field. This commit therefore causes srcu_invl_snp_seq() to compare both fields of the specified grace-period sequence number. Signed-off-by: Pingfan Liu Cc: Lai Jiangshan Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: Reviewed-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit aa5210f524edcebf909e6576b515bc3e2d82af0d Author: Pingfan Liu Date: Wed Nov 16 09:52:43 2022 +0800 srcu: Fix a misspelling in comment s/srcu_gq_seq/srcu_gp_seq/ Signed-off-by: Pingfan Liu Cc: Lai Jiangshan Cc: Josh Triplett Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: Reviewed-by: Mukesh Ojha Reviewed-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit 7f24626d6dd844bfc6d1f492d214d29c86d02550 Author: Pingfan Liu Date: Mon Oct 31 09:52:37 2022 +0800 srcu: Delegate work to the boot cpu if using SRCU_SIZE_SMALL Commit 994f706872e6 ("srcu: Make Tree SRCU able to operate without snp_node array") assumes that cpu 0 is always online. However, there really are situations when some other CPU is the boot CPU, for example, when booting a kdump kernel with the maxcpus=1 boot parameter. On PowerPC, the kdump kernel can hang as follows: ... [ 1.740036] systemd[1]: Hostname set to [ 243.686240] INFO: task systemd:1 blocked for more than 122 seconds. [ 243.686264] Not tainted 6.1.0-rc1 #1 [ 243.686272] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 243.686281] task:systemd state:D stack:0 pid:1 ppid:0 flags:0x00042000 [ 243.686296] Call Trace: [ 243.686301] [c000000016657640] [c000000016657670] 0xc000000016657670 (unreliable) [ 243.686317] [c000000016657830] [c00000001001dec0] __switch_to+0x130/0x220 [ 243.686333] [c000000016657890] [c000000010f607b8] __schedule+0x1f8/0x580 [ 243.686347] [c000000016657940] [c000000010f60bb4] schedule+0x74/0x140 [ 243.686361] [c0000000166579b0] [c000000010f699b8] schedule_timeout+0x168/0x1c0 [ 243.686374] [c000000016657a80] [c000000010f61de8] __wait_for_common+0x148/0x360 [ 243.686387] [c000000016657b20] [c000000010176bb0] __flush_work.isra.0+0x1c0/0x3d0 [ 243.686401] [c000000016657bb0] [c0000000105f2768] fsnotify_wait_marks_destroyed+0x28/0x40 [ 243.686415] [c000000016657bd0] [c0000000105f21b8] fsnotify_destroy_group+0x68/0x160 [ 243.686428] [c000000016657c40] [c0000000105f6500] inotify_release+0x30/0xa0 [ 243.686440] [c000000016657cb0] [c0000000105751a8] __fput+0xc8/0x350 [ 243.686452] [c000000016657d00] [c00000001017d524] task_work_run+0xe4/0x170 [ 243.686464] [c000000016657d50] [c000000010020e94] do_notify_resume+0x134/0x140 [ 243.686478] [c000000016657d80] [c00000001002eb18] interrupt_exit_user_prepare_main+0x198/0x270 [ 243.686493] [c000000016657de0] [c00000001002ec60] syscall_exit_prepare+0x70/0x180 [ 243.686505] [c000000016657e10] [c00000001000bf7c] system_call_vectored_common+0xfc/0x280 [ 243.686520] --- interrupt: 3000 at 0x7fffa47d5ba4 [ 243.686528] NIP: 00007fffa47d5ba4 LR: 0000000000000000 CTR: 0000000000000000 [ 243.686538] REGS: c000000016657e80 TRAP: 3000 Not tainted (6.1.0-rc1) [ 243.686548] MSR: 800000000000d033 CR: 42044440 XER: 00000000 [ 243.686572] IRQMASK: 0 [ 243.686572] GPR00: 0000000000000006 00007ffffa606710 00007fffa48e7200 0000000000000000 [ 243.686572] GPR04: 0000000000000002 000000000000000a 0000000000000000 0000000000000001 [ 243.686572] GPR08: 000001000c172dd0 0000000000000000 0000000000000000 0000000000000000 [ 243.686572] GPR12: 0000000000000000 00007fffa4ff4bc0 0000000000000000 0000000000000000 [ 243.686572] GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [ 243.686572] GPR20: 0000000132dfdc50 000000000000000e 0000000000189375 0000000000000000 [ 243.686572] GPR24: 00007ffffa606ae0 0000000000000005 000001000c185490 000001000c172570 [ 243.686572] GPR28: 000001000c172990 000001000c184850 000001000c172e00 00007fffa4fedd98 [ 243.686683] NIP [00007fffa47d5ba4] 0x7fffa47d5ba4 [ 243.686691] LR [0000000000000000] 0x0 [ 243.686698] --- interrupt: 3000 [ 243.686708] INFO: task kworker/u16:1:24 blocked for more than 122 seconds. [ 243.686717] Not tainted 6.1.0-rc1 #1 [ 243.686724] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 243.686733] task:kworker/u16:1 state:D stack:0 pid:24 ppid:2 flags:0x00000800 [ 243.686747] Workqueue: events_unbound fsnotify_mark_destroy_workfn [ 243.686758] Call Trace: [ 243.686762] [c0000000166736e0] [c00000004fd91000] 0xc00000004fd91000 (unreliable) [ 243.686775] [c0000000166738d0] [c00000001001dec0] __switch_to+0x130/0x220 [ 243.686788] [c000000016673930] [c000000010f607b8] __schedule+0x1f8/0x580 [ 243.686801] [c0000000166739e0] [c000000010f60bb4] schedule+0x74/0x140 [ 243.686814] [c000000016673a50] [c000000010f699b8] schedule_timeout+0x168/0x1c0 [ 243.686827] [c000000016673b20] [c000000010f61de8] __wait_for_common+0x148/0x360 [ 243.686840] [c000000016673bc0] [c000000010210840] __synchronize_srcu.part.0+0xa0/0xe0 [ 243.686855] [c000000016673c30] [c0000000105f2c64] fsnotify_mark_destroy_workfn+0xc4/0x1a0 [ 243.686868] [c000000016673ca0] [c000000010174ea8] process_one_work+0x2a8/0x570 [ 243.686882] [c000000016673d40] [c000000010175208] worker_thread+0x98/0x5e0 [ 243.686895] [c000000016673dc0] [c0000000101828d4] kthread+0x124/0x130 [ 243.686908] [c000000016673e10] [c00000001000cd40] ret_from_kernel_thread+0x5c/0x64 [ 366.566274] INFO: task systemd:1 blocked for more than 245 seconds. [ 366.566298] Not tainted 6.1.0-rc1 #1 [ 366.566305] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 366.566314] task:systemd state:D stack:0 pid:1 ppid:0 flags:0x00042000 [ 366.566329] Call Trace: ... The above splat occurs because PowerPC really does use maxcpus=1 instead of nr_cpus=1 in the kernel command line. Consequently, the (quite possibly non-zero) kdump CPU is the only online CPU in the kdump kernel. SRCU unconditionally queues a sdp->work on cpu 0, for which no worker thread has been created, so sdp->work will be never executed and __synchronize_srcu() will never be completed. This commit therefore replaces CPU ID 0 with get_boot_cpu_id() in key places in Tree SRCU. Since the CPU indicated by get_boot_cpu_id() is guaranteed to be online, this avoids the above splat. Signed-off-by: Pingfan Liu Cc: "Paul E. McKenney" Cc: Lai Jiangshan Cc: Josh Triplett Cc: Steven Rostedt Cc: Mathieu Desnoyers To: rcu@vger.kernel.org Signed-off-by: Paul E. McKenney commit 66ea1029f9b839fbcc10d97ddc93a05c72b3acc1 Author: Zqiang Date: Thu Nov 10 15:30:13 2022 +0800 srcu: Release early_srcu resources when no longer in use Kernels built with the CONFIG_TREE_SRCU Kconfig option set and then booted with rcupdate.rcu_self_test=1 and srcutree.convert_to_big=1 will test Tree SRCU during early boot. The early_srcu structure's srcu_node array will be allocated when init_srcu_struct_fields() is invoked, but after the test completes this early_srcu structure will not be used. This commit therefore invokes cleanup_srcu_struct() to free that srcu_node structure. Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney commit 2ca836b1da1777c75b7363a7ca2973e8ab11fc21 Author: Uladzislau Rezki (Sony) Date: Wed Dec 14 13:06:30 2022 +0100 rcu/kvfree: Split ready for reclaim objects from a batch This patch splits the lists of objects so as to avoid sending any through RCU that have already been queued for more than one grace period. These long-term-resident objects are immediately freed. The remaining short-term-resident objects are queued for later freeing using queue_rcu_work(). This change avoids delaying workqueue handlers with synchronize_rcu() invocations. Yes, workqueue handlers are designed to handle blocking, but avoiding blocking when unnecessary improves performance during low-memory situations. Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit 4c33464ae85e59cba3f8048a34d571edf229823a Author: Uladzislau Rezki (Sony) Date: Wed Dec 14 13:06:29 2022 +0100 rcu/kvfree: Carefully reset number of objects in krcp The schedule_delayed_monitor_work() function relies on the count of objects queued into any given kfree_rcu_cpu structure. This count is used to determine how quickly to schedule passing these objects to RCU. There are three pipes where pointers can be placed. When any pipe is offloaded, the kfree_rcu_cpu structure's ->count counter is set to zero, which is wrong because the other pipes might still be non-empty. This commit therefore maintains per-pipe counters, and introduces a krc_count() helper to access the aggregate value of those counters. Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit 9627456101ec9bb502daae7276e5141f66a9ddd1 Author: Uladzislau Rezki (Sony) Date: Fri Dec 2 14:18:37 2022 +0100 rcu/kvfree: Use READ_ONCE() when access to krcp->head The need_offload_krc() function is now lock-free, which gives the compiler freedom to load old values from plain C-language loads from the kfree_rcu_cpu struture's ->head pointer. This commit therefore applied READ_ONCE() to these loads. Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit cc37d52076a91d8391bbd16249a5790a35292b85 Author: Uladzislau Rezki (Sony) Date: Tue Nov 29 16:58:22 2022 +0100 rcu/kvfree: Use a polled API to speedup a reclaim process Currently all objects placed into a batch wait for a full grace period to elapse after that batch is ready to send to RCU. However, this can unnecessarily delay freeing of the first objects that were added to the batch. After all, several RCU grace periods might have elapsed since those objects were added, and if so, there is no point in further deferring their freeing. This commit therefore adds per-page grace-period snapshots which are obtained from get_state_synchronize_rcu(). When the batch is ready to be passed to call_rcu(), each page's snapshot is checked by passing it to poll_state_synchronize_rcu(). If a given page's RCU grace period has already elapsed, its objects are freed immediately by kvfree_rcu_bulk(). Otherwise, these objects are freed after a call to synchronize_rcu(). This approach requires that the pages be traversed in reverse order, that is, the oldest ones first. Test example: kvm.sh --memory 10G --torture rcuscale --allcpus --duration 1 \ --kconfig CONFIG_NR_CPUS=64 \ --kconfig CONFIG_RCU_NOCB_CPU=y \ --kconfig CONFIG_RCU_NOCB_CPU_DEFAULT_ALL=y \ --kconfig CONFIG_RCU_LAZY=n \ --bootargs "rcuscale.kfree_rcu_test=1 rcuscale.kfree_nthreads=16 \ rcuscale.holdoff=20 rcuscale.kfree_loops=10000 \ torture.disable_onoff_at_boot" --trust-make Before this commit: Total time taken by all kfree'ers: 8535693700 ns, loops: 10000, batches: 1188, memory footprint: 2248MB Total time taken by all kfree'ers: 8466933582 ns, loops: 10000, batches: 1157, memory footprint: 2820MB Total time taken by all kfree'ers: 5375602446 ns, loops: 10000, batches: 1130, memory footprint: 6502MB Total time taken by all kfree'ers: 7523283832 ns, loops: 10000, batches: 1006, memory footprint: 3343MB Total time taken by all kfree'ers: 6459171956 ns, loops: 10000, batches: 1150, memory footprint: 6549MB After this commit: Total time taken by all kfree'ers: 8560060176 ns, loops: 10000, batches: 1787, memory footprint: 61MB Total time taken by all kfree'ers: 8573885501 ns, loops: 10000, batches: 1777, memory footprint: 93MB Total time taken by all kfree'ers: 8320000202 ns, loops: 10000, batches: 1727, memory footprint: 66MB Total time taken by all kfree'ers: 8552718794 ns, loops: 10000, batches: 1790, memory footprint: 75MB Total time taken by all kfree'ers: 8601368792 ns, loops: 10000, batches: 1724, memory footprint: 62MB The reduction in memory footprint is well in excess of an order of magnitude. Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit 8fc5494ad5face62747a3937db66b00db1e5d80b Author: Uladzislau Rezki (Sony) Date: Tue Nov 29 16:58:21 2022 +0100 rcu/kvfree: Move need_offload_krc() out of krcp->lock The need_offload_krc() function currently holds the krcp->lock in order to safely check krcp->head. This commit removes the need for this lock in that function by updating the krcp->head pointer using WRITE_ONCE() macro so that readers can carry out lockless loads of that pointer. Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit 8c15a9e8086508962b2b69456ed22dc517d91b15 Author: Uladzislau Rezki (Sony) Date: Tue Nov 29 16:58:20 2022 +0100 rcu/kvfree: Move bulk/list reclaim to separate functions The kvfree_rcu() code maintains lists of pages of pointers, but also a singly linked list, with the latter being used when memory allocation fails. Traversal of these two types of lists is currently open coded. This commit simplifies the code by providing kvfree_rcu_bulk() and kvfree_rcu_list() functions, respectively, to traverse these two types of lists. This patch does not introduce any functional change. Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit 27538e18b62fa38d38c593e8c9e050a31b6c8cea Author: Uladzislau Rezki (Sony) Date: Tue Nov 29 16:58:19 2022 +0100 rcu/kvfree: Switch to a generic linked list API This commit improves the readability and maintainability of the kvfree_rcu() code by switching from an open-coded linked list to the standard Linux-kernel circular doubly linked list. This patch does not introduce any functional change. Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit 04a522b7da3dbc083f8ae0aa1a6184b959a8f81c Author: Uladzislau Rezki (Sony) Date: Tue Oct 25 16:46:12 2022 +0200 rcu: Refactor kvfree_call_rcu() and high-level helpers Currently a kvfree_call_rcu() takes an offset within a structure as a second parameter, so a helper such as a kvfree_rcu_arg_2() has to convert rcu_head and a freed ptr to an offset in order to pass it. That leads to an extra conversion on macro entry. Instead of converting, refactor the code in way that a pointer that has to be freed is passed directly to the kvfree_call_rcu(). This patch does not make any functional change and is transparent to all kvfree_rcu() users. Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit 92987fe8bdd1cbec61919a394bb11316c5d860f4 Author: Paul E. McKenney Date: Mon Dec 19 18:02:20 2022 -0800 rcu: Allow expedited RCU CPU stall warnings to dump task stacks This commit introduces the rcupdate.rcu_exp_stall_task_details kernel boot parameter, which cause expedited RCU CPU stall warnings to dump the stacks of any tasks blocking the current expedited grace period. Reported-by: David Howells Signed-off-by: Paul E. McKenney commit 748bf47a89d722c7e77f8700705e2189be14e99e Author: Paul E. McKenney Date: Mon Dec 19 17:02:20 2022 -0800 rcu: Test synchronous RCU grace periods at the end of rcu_init() This commit tests synchronize_rcu() and synchronize_rcu_expedited() at the end of rcu_init(), in addition to the test already at the beginning of that function. These tests are run only in kernels built with CONFIG_PROVE_RCU=y. Signed-off-by: Paul E. McKenney commit 3d1adf7ada352b80e037509d26cdca156f75e830 Author: Zqiang Date: Thu Dec 15 11:57:55 2022 +0800 rcu: Make rcu_blocking_is_gp() stop early-boot might_sleep() Currently, rcu_blocking_is_gp() invokes might_sleep() even during early boot when interrupts are disabled and before the scheduler is scheduling. This is at best an accident waiting to happen. Therefore, this commit moves that might_sleep() under an rcu_scheduler_active check in order to ensure that might_sleep() is not invoked unless sleeping might actually happen. Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney commit 2d7f00b2f01301d6e41fd4a28030dab0442265be Author: Paul E. McKenney Date: Fri Dec 16 15:55:48 2022 -0800 rcu: Suppress smp_processor_id() complaint in synchronize_rcu_expedited_wait() The normal grace period's RCU CPU stall warnings are invoked from the scheduling-clock interrupt handler, and can thus invoke smp_processor_id() with impunity, which allows them to directly invoke dump_cpu_task(). In contrast, the expedited grace period's RCU CPU stall warnings are invoked from process context, which causes the dump_cpu_task() function's calls to smp_processor_id() to complain bitterly in debug kernels. This commit therefore causes synchronize_rcu_expedited_wait() to disable preemption around its call to dump_cpu_task(). Signed-off-by: Paul E. McKenney commit 0cae5ded535c3a80aed94f119bbd4ee3ae284a65 Author: Paul E. McKenney Date: Wed Dec 14 11:41:44 2022 -0800 rcu: Make RCU_LOCKDEP_WARN() avoid early lockdep checks Currently, RCU_LOCKDEP_WARN() checks the condition before checking to see if lockdep is still enabled. This is necessary to avoid the false-positive splats fixed by commit 3066820034b5dd ("rcu: Reject RCU_LOCKDEP_WARN() false positives"). However, the current state can result in false-positive splats during early boot before lockdep is fully initialized. This commit therefore checks debug_lockdep_rcu_enabled() both before and after checking the condition, thus avoiding both sets of false-positive error reports. Reported-by: Steven Rostedt Reported-by: Masami Hiramatsu (Google) Reported-by: Mathieu Desnoyers Signed-off-by: Paul E. McKenney Reviewed-by: Mathieu Desnoyers Cc: Boqun Feng Cc: Matthew Wilcox Cc: Thomas Gleixner commit 95ff24ee7b809ff8d253cd5edf196f137ae08c44 Author: Paul E. McKenney Date: Fri Nov 25 08:43:10 2022 -0800 rcu: Upgrade header comment for poll_state_synchronize_rcu() This commit emphasizes the possibility of concurrent calls to synchronize_rcu() and synchronize_rcu_expedited() causing one or the other of the two grace periods being lost from the viewpoint of poll_state_synchronize_rcu(). If you cannot afford to lose grace periods this way, you should instead use the _full() variants of the polled RCU API, for example, poll_state_synchronize_rcu_full(). Signed-off-by: Paul E. McKenney commit 253cbbff621407a6265ce7a6a03c3766f8846f02 Author: Paul E. McKenney Date: Mon Nov 14 09:40:19 2022 -0800 rcu: Throttle callback invocation based on number of ready callbacks Currently, rcu_do_batch() sizes its batches based on the total number of callbacks in the callback list. This can result in some strange choices, for example, if there was 12,800 callbacks in the list, but only 200 were ready to invoke, RCU would invoke 100 at a time (12,800 shifted down by seven bits). A more measured approach would use the number that were actually ready to invoke, an approach that has become feasible only recently given the per-segment ->seglen counts in ->cblist. This commit therefore bases the batch limit on the number of callbacks ready to invoke instead of on the total number of callbacks. Signed-off-by: Paul E. McKenney commit 5a04848d005e051b8c063206b1a03363aca8ade4 Author: Paul E. McKenney Date: Sun Nov 6 16:33:38 2022 -0800 rcu: Consolidate initialization and CPU-hotplug code This commit consolidates the initialization and CPU-hotplug code at the end of kernel/rcu/tree.c. This is strictly a code-motion commit. No functionality has changed. Signed-off-by: Paul E. McKenney commit c004d231cac709f09987f2a6dd733013039d27c3 Author: Zhao Mengmeng Date: Wed Oct 19 08:36:50 2022 -0400 rcu: Use hlist_nulls_next_rcu() in hlist_nulls_add_tail_rcu() In commit 8dbd76e79a16 ("tcp/dccp: fix possible race __inet_lookup_established()"), function hlist_nulls_add_tail_rcu() was added back, but the local variable *last* is of type hlist_nulls_node, so use hlist_nulls_next_rcu() instead of hlist_next_rcu(). Signed-off-by: Zhao Mengmeng Signed-off-by: Paul E. McKenney commit b33994ef2239348e144911f944aa0038bf2c214c Author: Paul E. McKenney Date: Fri Nov 4 13:06:54 2022 -0700 doc: Update rcu_dereference.rst This commit updates rcu_dereference.rst to reflect RCU additions and changes over the past few years Signed-off-by: Paul E. McKenney commit 42d689ec0016c24f2890f94ca0724cd467b3cb44 Author: Paul E. McKenney Date: Fri Nov 4 11:44:45 2022 -0700 doc: Update rcubarrier.rst This commit updates rcubarrier.txt to reflect RCU additions and changes over the past few years. [ paulmck: Apply Stephen Rothwell feedback. ] Signed-off-by: Paul E. McKenney commit 8750dfe6fda4aca9cc02b3f652d14b14b49bccfb Author: Paul E. McKenney Date: Fri Nov 4 11:00:14 2022 -0700 doc: Update NMI-RCU.rst This commit updates NMI-RCU.rst to highlight the ancient heritage of the example code and to discourage wanton compiler "optimizations". Signed-off-by: Paul E. McKenney commit 438500113f375c0b3185cc7ce62baa5f8088a5b2 Author: Paul E. McKenney Date: Fri Nov 4 10:53:25 2022 -0700 doc: Further updates to RCU's lockdep.rst This commit wordsmiths RCU's lockdep.rst. Signed-off-by: Paul E. McKenney commit acd3b7768048fe338248cdf43ccfbf8c084a6bc1 Author: Changbin Du Date: Sat Dec 31 23:14:36 2022 +0800 libbpf: Return -ENODATA for missing btf section As discussed before, return -ENODATA (No data available) would be more meaningful than ENOENT (No such file or directory). Suggested-by: Leo Yan Signed-off-by: Changbin Du Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221231151436.6541-1-changbin.du@gmail.com commit db4107e92a817502ad19fdd30250f87dcb6f6331 Author: Randy Dunlap Date: Wed Dec 28 17:00:51 2022 -0800 drm/amd/display: fix dc/core/dc.c kernel-doc Fix all kernel-doc warnings in dc/core/dc.c: dc.c:385: warning: missing initial short description on line: * dc_stream_adjust_vmin_vmax: dc.c:392: warning: contents before sections dc.c:399: warning: No description found for return value of 'dc_stream_adjust_vmin_vmax' dc.c:434: warning: Excess function parameter 'adjust' description in 'dc_stream_get_last_used_drr_vtotal' dc.c:434: warning: No description found for return value of 'dc_stream_get_last_used_drr_vtotal' dc.c:574: warning: No description found for return value of 'dc_stream_configure_crc' dc.c:1746: warning: No description found for return value of 'dc_commit_state_no_check' dc.c:4991: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * dc_extended_blank_supported 0 Decide whether extended blank is supported dc.c:4991: warning: missing initial short description on line: * dc_extended_blank_supported 0 Decide whether extended blank is supported dc.c:4723: warning: Function parameter or member 'dc' not described in 'dc_enable_dmub_outbox' dc.c:4926: warning: Function parameter or member 'dc' not described in 'dc_process_dmub_dpia_hpd_int_enable' dc.c:4926: warning: Function parameter or member 'hpd_int_enable' not described in 'dc_process_dmub_dpia_hpd_int_enable' 12 warnings Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Rodrigo Siqueira Cc: Alex Deucher Cc: Hamza Mahfooz Cc: Harry Wentland Cc: Leo Li Cc: Christian König Cc: "Pan, Xinhui" Cc: amd-gfx@lists.freedesktop.org Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 4243c84aa082d8fba70c45f48eb2bb5c19799060 Author: Michel Dänzer Date: Wed Dec 21 16:24:13 2022 +0100 Revert "drm/amd/display: Enable Freesync Video Mode by default" This reverts commit de05abe6b9d0fe08f65d744f7f75a4cba4df27ad. The bug referenced below was bisected to this commit. There has been no activity toward fixing it in 3 months, so let's revert for now. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2162 Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher commit 13b9eb15179de69e3c6f7ed714b0499b0abf4394 Author: Jiapeng Chong Date: Mon Dec 19 22:21:50 2022 +0800 drm/amd/display: Remove the unused function dmub_outbox_irq_info_funcs The function dmub_outbox_irq_info_funcs is defined in the irq_service_dcn201.c file, but not called elsewhere, so remove this unused function. drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn201/irq_service_dcn201.c:139:43: warning: unused variable 'dmub_outbox_irq_info_funcs'. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3520 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit 2e68ad8f985769db1f68fde34be939f03426cd97 Author: Bhawanpreet Lakha Date: Tue Dec 13 14:18:35 2022 -0500 drm/amd/display: Fix dsc mismatch of acquire and validation of dsc engine [Why] We skip dsc_validation on pipes that are underlays, but in the acquire_dsc code we don't have this check. In certain conditions (when underlay pipe index is lower) we will assign the dsc resource to the underlay pipe and skip the base pipe. Now during dsc_validation we will skip the underlay pipe (this has the dsc resource) but try to validate the base pipe(this doesn't have a dsc resource) due to this mismatch we hit a NULLPTR [How] In the acquire_dsc add a check for underlay pipe so we don't acquire a dsc resource for this pipe. This will match the acquire/validation conditions. Reviewed-by: Wenjing Liu Reviewed-by: Hersen Wu Acked-by: Praful Swarnakar Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit c26cd999180dcb6d0a5705884485d66cd4bb4afd Author: Stanley.Yang Date: Wed Dec 21 18:17:33 2022 +0800 drm/amdgpu: remove enable ras cmd call trace [Why] [ 41.285804] RIP: 0010:amdgpu_ras_feature_enable+0x15c/0x310 [amdgpu] [ 41.285945] Code: 48 89 c1 48 c7 c2 b9 f2 88 c1 48 c7 c0 c0 f2 88 c1 49 8b 3c 24 48 0f 44 d0 48 c7 c6 98 33 80 c1 e8 5f 52 75 d9 e9 fa fe ff ff <0f> 0b e9 66 ff ff ff 48 8b 3d 86 8c 0f da ba 00 04 00 00 be c0 0d [ 41.285946] RSP: 0018:ffffbccdc72efc90 EFLAGS: 00010246 [ 41.285948] RAX: 0000000000000004 RBX: ffff931897406980 RCX: 0000000000000002 [ 41.285949] RDX: 0000000000000dc0 RSI: 0000000000000002 RDI: ffff931500042b00 [ 41.285950] RBP: ffffbccdc72efcc0 R08: 0000000000000002 R09: ffff931885b87000 [ 41.285951] R10: 0000000000ffff10 R11: 0000000000000001 R12: ffff931893e20000 [ 41.285952] R13: 0000000000000001 R14: ffff931885b87000 R15: 0000000000000000 [ 41.285953] FS: 0000000000000000(0000) GS:ffff931c6f200000(0000) knlGS:0000000000000000 [ 41.285954] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 41.285955] CR2: 000055dd6f532008 CR3: 000000061b010006 CR4: 00000000003706e0 [ 41.285956] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 41.285957] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 41.285958] Call Trace: [ 41.285959] [ 41.285963] ? gfx_v11_0_early_init+0x250/0x250 [amdgpu] [ 41.286117] gfx_v11_0_late_init+0x8c/0xb0 [amdgpu] [ 41.286271] amdgpu_device_ip_late_init+0x8d/0x3c0 [amdgpu] [ 41.286401] amdgpu_device_init.cold+0x1677/0x1fda [amdgpu] [ 41.286616] ? pci_bus_read_config_word+0x4a/0x70 [ 41.286621] ? do_pci_enable_device+0xdb/0x110 [ 41.286625] amdgpu_driver_load_kms+0x1a/0x160 [amdgpu] [ 41.286762] amdgpu_pci_probe+0x18d/0x3a0 [amdgpu] [ 41.286898] local_pci_probe+0x4b/0x90 [ 41.286901] work_for_cpu_fn+0x1a/0x30 [ 41.286903] process_one_work+0x22b/0x3d0 [ 41.286905] worker_thread+0x223/0x420 [ 41.286907] ? process_one_work+0x3d0/0x3d0 [ 41.286908] kthread+0x12a/0x150 [ 41.286911] ? set_kthread_struct+0x50/0x50 [ 41.286913] ret_from_fork+0x22/0x30 [How] For specific asic, only mem ecc is enabled, sram ecc is not enabled, but it still need to send ras enable cmd to gfx block to support poison mode, so add check posion mode. Signed-off-by: Stanley.Yang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 6ecc01a9ceccad37cc0e7127fab08812dd93801b Author: Stanley.Yang Date: Wed Dec 21 18:04:01 2022 +0800 drm/amdgpu: correct umc poison mode set value For GFX 11.0.3, Due to security policy, there is no way to check UcFatalEn field of UMCCH0_0_GeccCtrl to identify UMC poison mode. This is workaround force set umc poison mode as 1 for GFX 11.0.3 Signed-off-by: Stanley.Yang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 78911b22e7dfab26659137004571ac4e377cef43 Author: Aric Cyr Date: Sun Dec 11 17:41:05 2022 -0500 drm/amd/display: 3.2.217 Acked-by: Aurabindo Pillai Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9ed90489a479bba7f27fee9b4102ee2a4a2138e8 Author: Aric Cyr Date: Sat Dec 3 21:58:37 2022 -0500 drm/amd/display: Reorder dc_state fields to optimize clearing the struct [why & how] By moving bw_ctx field to the end of the dc_state the state can be cleared more efficiently without resulting in large DML memcpy operations, resulting in better mode enumeration performance on some platforms. Acked-by: Aurabindo Pillai Signed-off-by: Aric Cyr Reviewed-by: Nevenko Stupar Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b0fcf88b3f10bf684d636e78113e678dc3b3f053 Author: Leo Chen Date: Fri Dec 9 19:08:54 2022 -0500 drm/amd/display: Adding braces to prepare for future changes to behavior of if block [Why & How] For certain features, there will be more implementations needed in the if-block. Braces are added as part of the preparation. Acked-by: Aurabindo Pillai Signed-off-by: Leo Chen Reviewed-by: Charlene Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6ffa679916474b26c9b6c81003b42f2e1f0feda1 Author: Aurabindo Pillai Date: Wed Dec 7 10:09:53 2022 -0500 drm/amd/display: set ignore msa parameter only if freesync is enabled [Why&How] ignore_msa_timing_param is used by SubVP logic to determine if SubVP + DRR is possible. Linux does not support freesync on multi display config, which results in incorrect assumption of VRR support if we set this parameter when VRR is supported, but not enabled. Signed-off-by: Aurabindo Pillai Reviewed-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0e8cf83a2b47d9ced42839b847b4c3f1c205238e Author: Wenjing Liu Date: Wed Dec 7 18:51:15 2022 -0500 drm/amd/display: allow hpo and dio encoder switching during dp retrain test [why] During DP2.1 LL CTS if test equipment requests to change between DP2.1 and DP1.4 link rates, we need to swap between HPO and DIO encoders by remapping encoder resource. [how] Add a function dc resource to update encoder resources and toggle dpms state for all enabled stream associated witht the link under test. Acked-by: Aurabindo Pillai Signed-off-by: Wenjing Liu Reviewed-by: Jun Lei Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a10a22b0cadb5812f8b7b9bbbb26f402ca8cc463 Author: Wenjing Liu Date: Tue Dec 6 12:06:40 2022 -0500 drm/amd/display: update pixel rate div in enable stream [why] Pixel rate div depends on the type of encoder that we are enabling stream with. If we swap between HPO and DIO encoder at the time we call enable stream for the new encoder, we must reprogram pixel rate div based on the new encoder type. Acked-by: Aurabindo Pillai Signed-off-by: Wenjing Liu Reviewed-by: Jun Lei Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7462475e3a06fbb0b36243b391296f9f411e9041 Author: Wenjing Liu Date: Mon Dec 5 18:05:46 2022 -0500 drm/amd/display: move dccg programming from link hwss hpo dp to hwss [why] dccg clock programming shouldn't be part of link hwss programming sequence. The scope of link hwss is limited to encoder and phy programming. Acked-by: Aurabindo Pillai Signed-off-by: Wenjing Liu Reviewed-by: Jun Lei Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 324de40a56550e22b0a5ec40442ee13d5a0e7688 Author: Dmytro Laktyushkin Date: Tue Dec 6 10:06:14 2022 -0500 drm/amd/display: fix dc_get_edp_link_panel_inst to only consider links with panels This function is meant to be used on multi-edp systems and only makes sense if only links with connected panels are considered. Acked-by: Aurabindo Pillai Signed-off-by: Dmytro Laktyushkin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2d90a1c054831338d57b39aec4d273cf3e867590 Author: Nicholas Kazlauskas Date: Tue Dec 6 16:10:22 2022 -0500 drm/amd/display: Defer DIG FIFO disable after VID stream enable [Why] On some monitors we see a brief flash of corruption during the monitor disable sequence caused by FIFO being disabled in the middle of an active DP stream. [How] Wait until DP vid stream is disabled before turning off the FIFO. The FIFO reset on DP unblank should take care of clearing any FIFO error, if any. Acked-by: Aurabindo Pillai Signed-off-by: Nicholas Kazlauskas Reviewed-by: Syed Hassan Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a1cbe6916f44a5002a8123e5804063196ad9cf71 Author: Swapnil Patel Date: Mon Dec 5 16:39:31 2022 -0500 drm/amd/display: patch cases with unknown plane state to prevent warning [Why] DCN301 resource function is missing function pointer to handle cases with unknown plane state. This causes assertion when global state is validated while using swizzle parameter as “DC_UNKNOWN” [How] Add function pointer to handle and patch cases when plane state is unknown. Acked-by: Aurabindo Pillai Signed-off-by: Swapnil Patel Reviewed-by: Sung joon Kim Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a5b50a0cbf6fa201a6480832986b3ca4817e0568 Author: Alvin Lee Date: Wed Dec 7 20:19:49 2022 -0500 drm/amd/display: Turn on phantom OTG before disabling phantom pipe [Description] - Proper phantom pipe disable sequence was missing in commit_planes_for_stream - If disabling phantom pipe, turn on phantom OTG first, and turn off the phantom OTG after the plane is disabled - Also update sequence for enabling / disabling phantom streams (apply_ctx_to_hw). When enabling phantom pipes, enable before doing front end programming for phantom pipes. If disabling phantom pipes, disable after front end programming (i.e. after phantom plane disable) - TODO: Still need to properly handle transition case when a phantom pipe is transitioned directly into a real pipe (need to fully disable the phantom pipe first) Acked-by: Aurabindo Pillai Signed-off-by: Alvin Lee Reviewed-by: Jun Lei Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit cbd8f20b4833f90ee5721e7f1f3a65cd93c622d8 Author: Alan Liu Date: Fri Dec 2 19:10:34 2022 +0800 drm/amd/display: Improvements in secure display [Why] - Need error message when failing to allocating secure_display_ctx. - Need to check if secure display context in psp is initialized or not before using it. [How] - Add error message when memory allocation fail. - Add check before accessing psp secure display context. Acked-by: Aurabindo Pillai Signed-off-by: Alan Liu Reviewed-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 878a3c004c0e49bb2d4e552899aaa98f9fad309e Author: Samson Tam Date: Mon Dec 5 11:08:40 2022 -0500 drm/amd/display: Uninitialized variables causing 4k60 UCLK to stay at DPM1 and not DPM0 [Why] SwathSizePerSurfaceY[] and SwathSizePerSurfaceC[] values are uninitialized because we are using += instead of = operator. [How] Assign values in loop with = operator. Acked-by: Aurabindo Pillai Signed-off-by: Samson Tam Reviewed-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e8fd3eeb5e8711af39b00642da06474e52f4780c Author: hersen wu Date: Tue Nov 15 14:20:56 2022 -0500 drm/amd/display: phase3 mst hdcp for multiple displays [Why] multiple display hdcp are enabled within event_property_validate, event_property_update by looping all displays on mst hub. when one of display on mst hub in unplugged or disabled, hdcp are disabled for all displays on mst hub within hdcp_reset_display by looping all displays of mst link. for displays still active, their encryption status are off. kernel driver will not run hdcp authentication again. therefore, hdcp are not enabled automatically. [How] within is_content_protection_different, check drm_crtc_state changes of all displays on mst hub, if need, triger hdcp_update_display to re-run hdcp authentication. Acked-by: Aurabindo Pillai Signed-off-by: hersen wu Reviewed-by: Bhawanpreet Lakha Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0b04ea391c1d4121f4cf9f644197edaf11b6c4da Author: Christian König Date: Tue Feb 1 16:50:49 2022 +0100 drm/amdgpu: allow zero as vram limit This allows testing the driver without any VRAM. Signed-off-by: Christian König Acked-by: Luben Tuikov Acked-by: Felix Kuehling Signed-off-by: Alex Deucher commit da2f992091e2576f93453f3e2dec365538b3ccab Author: Christian König Date: Fri Feb 4 16:17:47 2022 +0100 drm/amdgpu: cleanup visible vram size handling Centralize the limit handling and validation in one place instead of spreading that around in different hw generations. Signed-off-by: Christian König Acked-by: Luben Tuikov Acked-by: Felix Kuehling Signed-off-by: Alex Deucher commit 7ccfd79fdd6c1a3b44badc994d9581fc9e634562 Author: Christian König Date: Fri Jan 21 16:59:36 2022 +0100 drm/amdgpu: rename vram_scratch into mem_scratch Rename vram_scratch into mem_scratch and allow allocating it into GTT as well. The only problem with that is that we won't have a default page for the system aperture any more. Signed-off-by: Christian König Signed-off-by: Luben Tuikov Acked-by: Felix Kuehling Signed-off-by: Alex Deucher commit 58ab2c08d708ca8309768545b75741636c53a336 Author: Christian König Date: Fri Jan 14 16:49:44 2022 +0100 drm/amdgpu: use VRAM|GTT for a bunch of kernel allocations Technically all of those can use GTT as well, no need to force things into VRAM. Signed-off-by: Christian König Signed-off-by: Luben Tuikov Acked-by: Felix Kuehling Signed-off-by: Alex Deucher commit 9c705b96d25c968b5fb40edc66cc94dd08e19925 Author: Saleemkhan Jamadar Date: Tue Dec 20 13:21:44 2022 +0530 drm/amdgpu: enable VCN DPG for GC IP v11.0.4 Enable VCN Dynamic Power Gating control for GC IP v11.0.4. Signed-off-by: Saleemkhan Jamadar Reviewed-by: Veerabadhran Gopalakrishnan Signed-off-by: Alex Deucher commit 360cd08196cabcf150b7550db427f9a7e3bf7d39 Author: Likun Gao Date: Wed Dec 21 13:46:33 2022 +0800 drm/amdgpu: adjust the sequence to check soft reset 1.Drop soft reset check when do should recover gpu check. (As it will skip gpu reset operation if some ip is hang but not support soft reset) 2.Check soft reset status before do soft reset when pre asic reset. a. If check soft reset return true, it means: some ip is hang and it also support soft reset, will try soft reset first. b. If check soft reset return false, it means: I. All the ip are not hang, will skip gpu reset. II. Some ip is hang but not support soft reset, will skip soft reset and retry with full reset later. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 1f9d1ff1c3c1d02a9fdd00ea607219812f505081 Author: Mukul Joshi Date: Tue Dec 20 17:11:24 2022 -0500 drm/amdkfd: Fix kernel warning during topology setup This patch fixes the following kernel warning seen during driver load by correctly initializing the p2plink attr before creating the sysfs file: [ +0.002865] ------------[ cut here ]------------ [ +0.002327] kobject: '(null)' (0000000056260cfb): is not initialized, yet kobject_put() is being called. [ +0.004780] WARNING: CPU: 32 PID: 1006 at lib/kobject.c:718 kobject_put+0xaa/0x1c0 [ +0.001361] Call Trace: [ +0.001234] [ +0.001067] kfd_remove_sysfs_node_entry+0x24a/0x2d0 [amdgpu] [ +0.003147] kfd_topology_update_sysfs+0x3d/0x750 [amdgpu] [ +0.002890] kfd_topology_add_device+0xbd7/0xc70 [amdgpu] [ +0.002844] ? lock_release+0x13c/0x2e0 [ +0.001936] ? smu_cmn_send_smc_msg_with_param+0x1e8/0x2d0 [amdgpu] [ +0.003313] ? amdgpu_dpm_get_mclk+0x54/0x60 [amdgpu] [ +0.002703] kgd2kfd_device_init.cold+0x39f/0x4ed [amdgpu] [ +0.002930] amdgpu_amdkfd_device_init+0x13d/0x1f0 [amdgpu] [ +0.002944] amdgpu_device_init.cold+0x1464/0x17b4 [amdgpu] [ +0.002970] ? pci_bus_read_config_word+0x43/0x80 [ +0.002380] amdgpu_driver_load_kms+0x15/0x100 [amdgpu] [ +0.002744] amdgpu_pci_probe+0x147/0x370 [amdgpu] [ +0.002522] local_pci_probe+0x40/0x80 [ +0.001896] work_for_cpu_fn+0x10/0x20 [ +0.001892] process_one_work+0x26e/0x5a0 [ +0.002029] worker_thread+0x1fd/0x3e0 [ +0.001890] ? process_one_work+0x5a0/0x5a0 [ +0.002115] kthread+0xea/0x110 [ +0.001618] ? kthread_complete_and_exit+0x20/0x20 [ +0.002422] ret_from_fork+0x1f/0x30 [ +0.001808] [ +0.001103] irq event stamp: 59837 [ +0.001718] hardirqs last enabled at (59849): [] __up_console_sem+0x52/0x60 [ +0.004414] hardirqs last disabled at (59860): [] __up_console_sem+0x37/0x60 [ +0.004414] softirqs last enabled at (59654): [] irq_exit_rcu+0xd7/0x130 [ +0.004205] softirqs last disabled at (59649): [] irq_exit_rcu+0xd7/0x130 [ +0.004203] ---[ end trace 0000000000000000 ]--- Fixes: 0f28cca87e9a ("drm/amdkfd: Extend KFD device topology to surface peer-to-peer links") Signed-off-by: Mukul Joshi Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 2fbb848b65cde5b876cce52ebcb34de4aaa5a94a Author: Zev Weiss Date: Mon Jan 2 13:28:57 2023 -0800 hwmon: (nct6775) Fix incorrect parenthesization in nct6775_write_fan_div() Commit 4ef2774511dc ("hwmon: (nct6775) Convert register access to regmap API") fumbled the shifting & masking of the fan_div values such that odd-numbered fan divisors would always be set to zero. Fix it so that we actually OR in the bits we meant to. Signed-off-by: Zev Weiss Fixes: 4ef2774511dc ("hwmon: (nct6775) Convert register access to regmap API") Cc: stable@kernel.org # v5.19+ Link: https://lore.kernel.org/r/20230102212857.5670-1-zev@bewilderbeest.net Signed-off-by: Guenter Roeck commit ca8fd8c16a8b77dfcf7f6ce52d2c863220693a78 Author: Armin Wolf Date: Sat Dec 24 05:18:53 2022 +0100 hwmon: (ftsteutates) Fix scaling of measurements A user complained that the ftsteutates driver was displaying bogus values since its introduction. This happens because the sensor measurements need to be scaled in order to produce meaningful results: - the fan speed needs to be multiplied by 60 since its in RPS - the temperature is in degrees celsius and needs an offset of 64 - the voltage is in 1/256 of 3.3V The offical datasheet says the voltage needs to be divided by 256, but this is likely an off-by-one-error, since even the BIOS devides by 255 (otherwise 3.3V could not be measured). The voltage channels additionally need a board-specific multiplier, however this can be done by the driver since its board-specific. The reason the missing scaling of measurements is the way Fujitsu used this driver when it was still out-of-tree. Back then, all scaling was done in userspace by libsensors, even the generic one. Tested on a Fujitsu DS3401-B1. Fixes: 08426eda58e0 ("hwmon: Add driver for FTS BMC chip "Teutates"") Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20221224041855.83981-2-W_Armin@gmx.de Signed-off-by: Guenter Roeck commit a53be8dae86fe5d3567db245177e814e58210632 Author: Maíra Canal Date: Tue Dec 27 17:00:11 2022 -0300 drm/v3d: replace open-coded implementation of drm_gem_object_lookup As v3d_submit_tfu_ioctl() performs the same steps as drm_gem_object_lookup(), replace the open-code implementation in v3d with its DRM core equivalent. Signed-off-by: Maíra Canal Reviewed-by: Melissa Wen Signed-off-by: Melissa Wen Link: https://patchwork.freedesktop.org/patch/msgid/20221227200010.191351-1-mcanal@igalia.com commit 57588c71177f0bfc08509c2c3a9bfe32850c0786 Author: Miquel Raynal Date: Tue Jan 3 17:56:44 2023 +0100 mac802154: Handle passive scanning Implement the core hooks in order to provide the softMAC layer support for passive scans. Scans are requested by the user and can be aborted. Changing channels manually is prohibited during scans. The implementation uses a workqueue triggered at a certain interval depending on the symbol duration for the current channel and the duration order provided. More advanced drivers with internal scheduling capabilities might require additional care but there is none mainline yet. Received beacons during a passive scan are processed in a work queue and their result forwarded to the upper layer. Active scanning is not supported yet. Co-developed-by: David Girault Signed-off-by: David Girault Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20230103165644.432209-7-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt commit dd18096256c89612e3eb858de748c29d10e8f3e7 Author: Miquel Raynal Date: Tue Jan 3 17:56:43 2023 +0100 mac802154: Add MLME Tx locked helpers These have the exact same behavior as before, except they expect the rtnl to be already taken (and will complain otherwise). This allows performing MLME transmissions from different contexts. Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20230103165644.432209-6-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt commit 5755cd4d9432779027771e43e51d81a2994ed795 Author: Miquel Raynal Date: Tue Jan 3 17:56:42 2023 +0100 mac802154: Prepare forcing specific symbol duration The scan logic will bypass the whole ->set_channel() logic from the top by calling the driver hook to just switch between channels when required. We can no longer rely on the "current" page/channel settings to set the right symbol duration. Let's add these as new parameters to allow providing the page/channel couple that we want. There is no functional change. Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20230103165644.432209-5-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt commit d2aaf2a01792ccf214f933d0b1ca2d41788c7b16 Author: Miquel Raynal Date: Tue Jan 3 17:56:41 2023 +0100 ieee802154: Introduce a helper to validate a channel This helper for now only checks if the page member and channel member are valid (in the specification range) and supported (by checking the device capabilities). Soon two new parameters will be introduced and having this helper will let us only modify its content rather than modifying the logic everywhere else in the subsystem. There is not functional change. Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20230103165644.432209-4-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt commit 44def58f5835bbfaf81902c88460fd86a551f4b7 Author: Miquel Raynal Date: Tue Jan 3 17:56:40 2023 +0100 ieee802154: Define a beacon frame header This definition will be used when adding support for scanning and defines the content of a beacon frame header as in the 802.15.4 specification. Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20230103165644.432209-3-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt commit ed3557c947e1d4164d370cc2d69dd7eb92706f0a Author: Miquel Raynal Date: Tue Jan 3 17:56:39 2023 +0100 ieee802154: Add support for user scanning requests The ieee802154 layer should be able to scan a set of channels in order to look for beacons advertizing PANs. Supporting this involves adding two user commands: triggering scans and aborting scans. The user should also be notified when a new beacon is received and also upon scan termination. A scan request structure is created to list the requirements and to be accessed asynchronously when changing channels or receiving beacons. Mac layers may now implement the ->trigger_scan() and ->abort_scan() hooks. Co-developed-by: David Girault Signed-off-by: David Girault Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20230103165644.432209-2-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt commit 65c24d7b0f9142c6acc9bd6dabeba22767077681 Author: Anuradha Weeraman Date: Tue Jan 3 17:17:24 2023 +0530 x86/lib: Fix compiler and kernel-doc warnings Fix the following W=1 warnings: arch/x86/lib/cmdline.c: - Include to fix missing-prototypes warnings. - Update comment for __cmdline_find_option_bool to fix a kernel-doc warning. Signed-off-by: Anuradha Weeraman Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230103114725.108431-1-anuradha@debian.org commit 1d1b4c63ba739c6ca695cb2ea13fefa9dfbff60d Author: Muhammad Husaini Zulkifli Date: Thu Dec 15 00:29:09 2022 +0800 igc: Remove reset adapter task for i226 during disable tsn config I225 have limitation when programming the BaseTime register which required a power cycle of the controller. This limitation already lifted in I226. This patch removes the restriction so that when user configure/remove any TSN mode, it would not go into power cycle reset adapter. How to test: Schedule any gate control list configuration or delete it. Example: 1) BASE_TIME=$(date +%s%N) tc qdisc replace dev $interface_name parent root handle 100 taprio \ num_tc 4 \ map 3 1 0 2 3 3 3 3 3 3 3 3 3 3 3 3 \ queues 1@0 1@1 1@2 1@3 \ base-time $BASE_TIME \ sched-entry S 0F 1000000 \ flags 0x2 2) tc qdisc del dev $intername_name root Signed-off-by: Muhammad Husaini Zulkifli Tested-by: Naama Meir Signed-off-by: Tony Nguyen commit 5ac1231ac14d1b8a1098048e51cad45f11b85c0a Author: Tan Tee Min Date: Thu Dec 15 00:29:08 2022 +0800 igc: enable Qbv configuration for 2nd GCL Make reset task only executes for i225 and Qbv disabling to allow i226 configure for 2nd GCL without resetting the adapter. In i226, Tx won't hang if there is a GCL is already running, so in this case we don't need to set FutScdDis bit. Signed-off-by: Tan Tee Min Signed-off-by: Muhammad Husaini Zulkifli Tested-by: Naama Meir Signed-off-by: Tony Nguyen commit b8897dc54e3bc9d25281bbb42a7d730782ff4588 Author: Muhammad Husaini Zulkifli Date: Thu Dec 15 00:29:07 2022 +0800 igc: remove I226 Qbv BaseTime restriction Remove the Qbv BaseTime restriction for I226 so that the BaseTime can be scheduled to the future time. A new register bit of Tx Qav Control (Bit-7: FutScdDis) was introduced to allow I226 scheduling future time as Qbv BaseTime and not having the Tx hang timeout issue. Besides, according to datasheet section 7.5.2.9.3.3, FutScdDis bit has to be configured first before the cycle time and base time. Indeed the FutScdDis bit is only active on re-configuration, thus we have to set the BASET_L to zero and then only set it to the desired value. Please also note that the Qbv configuration flow is moved around based on the Qbv programming guideline that is documented in the latest datasheet. Co-developed-by: Tan Tee Min Signed-off-by: Tan Tee Min Signed-off-by: Muhammad Husaini Zulkifli Tested-by: Naama Meir Signed-off-by: Tony Nguyen commit 723dad977acd1bd37f87e88d430958a833491ff1 Author: Tvrtko Ursulin Date: Fri Dec 23 11:23:02 2022 +0000 drm: Replace DRM_DEBUG with drm_dbg_core in file and ioctl handling Replace the deprecated macro with the per-device one. Signed-off-by: Tvrtko Ursulin Acked-by: Christian König Reviewed-by: Simon Ser Signed-off-by: Simon Ser Link: https://patchwork.freedesktop.org/patch/msgid/20221223112302.320097-1-tvrtko.ursulin@linux.intel.com commit 03178b4f7e2c59ead102e5ab5acb82ce1eaefe46 Author: Brent Lu Date: Tue Jan 3 15:37:04 2023 +0800 ASoC: Intel: sof_ssp_amp: remove unused variable The variable becomes useless since we moved the snd_soc_jack structure from a static array to sof_hdmi_pcm structure. Signed-off-by: Brent Lu Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230103073704.722027-1-brent.lu@intel.com Signed-off-by: Mark Brown commit fad376fce0af58deebc5075b8539dc05bf639af3 Author: Liu Shixin via Jfs-discussion Date: Thu Nov 3 11:01:59 2022 +0800 fs/jfs: fix shift exponent db_agl2size negative As a shift exponent, db_agl2size can not be less than 0. Add the missing check to fix the shift-out-of-bounds bug reported by syzkaller: UBSAN: shift-out-of-bounds in fs/jfs/jfs_dmap.c:2227:15 shift exponent -744642816 is negative Reported-by: syzbot+0be96567042453c0c820@syzkaller.appspotmail.com Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Liu Shixin Signed-off-by: Dave Kleikamp commit acb041b3f951afe67b782a5fd5441d3668765bdd Author: Gustavo Sousa Date: Fri Dec 30 15:24:22 2022 -0300 drm/i915/dmc: Do not require specific versions Currently, i915 interacts with the Hardware and not with any DMC ABI/API, so the API is fixed within the platform, hence no need to get this so-tied version requirement. v2: - Use link to firmware guide from kernel documentation for "References:" instead of mailing list thread. (Rodrigo) - Provide a more elaborate justification in the commit message. (Rodrigo) References: https://www.kernel.org/doc/html/v6.1/driver-api/firmware/firmware-usage-guidelines.html Signed-off-by: Gustavo Sousa Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20221230182422.29680-2-gustavo.sousa@intel.com commit 00883922ab404c0fc921709d8c2cec86f49c32f2 Author: Hengqi Chen Date: Sat Dec 31 18:07:57 2022 +0800 libbpf: Add LoongArch support to bpf_tracing.h Add PT_REGS macros for LoongArch ([0]). [0]: https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html Signed-off-by: Hengqi Chen Signed-off-by: Daniel Borkmann Acked-by: Huacai Chen Link: https://lore.kernel.org/bpf/20221231100757.3177034-1-hengqi.chen@gmail.com commit 392af84bddcc96f1546a1ca4ffa71bccce95b897 Author: Vincent Whitchurch Date: Tue Jan 3 16:22:10 2023 +0100 spi: spi-loopback-test: Allow skipping delays A 100 ms delay is inserted between tests by default in order to "detect the individual tests when using a logic analyzer". However, such delays are unnecessary when using this module for automated regression testing, so allow them to be disabled with a module parameter. Signed-off-by: Vincent Whitchurch Link: https://lore.kernel.org/r/20230103152211.3034779-1-vincent.whitchurch@axis.com Signed-off-by: Mark Brown commit cb0713e620bbe26f7220ca53be8a106969a3a618 Merge: dfce16722b9cb 87384599a56f2 Author: Mark Brown Date: Tue Jan 3 15:11:24 2023 +0000 spi: switch to use modern name Merge series from Yang Yingliang : After introducing devm_spi_alloc_host/spi_alloc_host(), the legacy named function devm_spi_alloc_master/spi_alloc_master() can be replaced. And also change other legacy name master/slave to modern name host/target or controller. commit 87384599a56f22bbfe6d91e23ef2c767541f2ad9 Author: Yang Yingliang Date: Fri Dec 30 17:28:06 2022 +0800 spi: ar934x: switch to use modern name Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221230092806.1687340-4-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 90ce7e7aaa418ff6c59d1c30267ff086994669b4 Author: Yang Yingliang Date: Fri Dec 30 17:28:05 2022 +0800 spi: a3700: switch to use modern name Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221230092806.1687340-3-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 5aede90a1f6d37c73395957a83b64a6a1cff6de4 Author: Yang Yingliang Date: Fri Dec 30 17:28:04 2022 +0800 spi: ath79: switch to use modern name Change legacy name master/slave to modern name host/target or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221230092806.1687340-2-yangyingliang@huawei.com Signed-off-by: Mark Brown commit dfce16722b9cb842a6f23500ee80b3d07b47bdd4 Author: Vincent Whitchurch Date: Mon Jan 2 17:08:51 2023 +0100 spi: pl022: Only use DT-specified DMA channels When a platform is booted with devicetree and does not provide a platform data structure, the driver creates one internally. enable_dma should not be set in this structure when creating it; the probe function will set it later if DMA channels are specified via the devicetree. Setting enable_dma = 1 when creating this internal platform data can lead to pl022_dma_probe() finding bogus DMA channels (since there is no channel filter specified) when no DMA channels are specified in the devicetree. Signed-off-by: Vincent Whitchurch Acked-by: Dhruva Gole Link: https://lore.kernel.org/r/20230102160852.3090202-1-vincent.whitchurch@axis.com Signed-off-by: Mark Brown commit fe91e41a6170c9fd73fa0bf9a1a3f3cc6ee5c1d2 Author: Thomas Zimmermann Date: Mon Jan 2 12:29:27 2023 +0100 drm/format-helper: Remove unnecessary conversion helpers Drivers only emulate XRGB8888 framebuffers. Remove all conversion helpers that do not use XRGB8888 as their source format. Also remove some special cases for alpha formats in the blit helper. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230102112927.26565-14-tzimmermann@suse.de commit 29fca6d56d76363368d012e18b5631340cfcd69c Author: Thomas Zimmermann Date: Mon Jan 2 12:29:26 2023 +0100 drm/format-helper: Simplify drm_fb_build_fourcc_list() The DRM helper drm_fb_build_fourcc_list() creates a list of color formats for primary planes of the generic drivers. Simplify the helper: - It used to mix and filter native and emulated formats as provided by the driver. Now the only emulated format is XRGB8888, which is required as fallback by legacy software. Drop support for emulating any other formats. - Also convert alpha formats to their non-alpha counterparts. Generic drivers don't support primary planes with alpha formats and some DTs incorrectly advertise alpha channels for non-alpha hardware. So only export non-alpha formats for primary planes. With the simplified helper, scrap format lists of the affected generic drivers. All they need is the firmware buffer's native format, from which the helper creates the list of color formats. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230102112927.26565-13-tzimmermann@suse.de commit 37c90d589dc06c1ae19b5eb4ed79e7a70ccc21bf Author: Thomas Zimmermann Date: Mon Jan 2 12:29:25 2023 +0100 drm/fb-helper: Fix single-probe color-format selection Fix the color-format selection of the single-probe helper. Go through all user-specified values and test each for compatibility with the driver. If none is supported, use the driver-provided default. This guarantees that the console is always available in any color format at least. Until now, the format selection of the single-probe helper tried to either use a user-specified format or a 32-bit default format. If the user-specified format was not supported by the driver, the selection failed and the display remained blank. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230102112927.26565-12-tzimmermann@suse.de commit cff84bac99220029ca2e3fd974281cd760ca35c0 Author: Thomas Zimmermann Date: Mon Jan 2 12:29:24 2023 +0100 drm/fh-helper: Split fbdev single-probe helper Split the single-probe helper's implementation into multiple functions and get locking and overallocation out of the way of the surface setup. Simplifies later changes to the setup code. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230102112927.26565-11-tzimmermann@suse.de commit 10cd592e639edcea50d781a07edcf3470d1f222e Author: Thomas Zimmermann Date: Mon Jan 2 12:29:23 2023 +0100 drm/format-helper: Add conversion from XRGB8888 to 15-bit RGB555 formats Add conversion from XRGB8888 to XRGB1555, ARGB1555 and RGBA5551, which are the formats currently supported by the simplefb infrastructure. The new helpers allow the output of XRGB8888 framebuffers to firmware scanout buffers in one of the 15-bit formats. v3: * use __le* for destination buffers (Jose, kernel test robot) v2: * test 15-bit results with local endianness (Jose) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Reviewed-by: José Expósito Link: https://patchwork.freedesktop.org/patch/msgid/20230102112927.26565-10-tzimmermann@suse.de commit 56119bfb39142090fb84ac08a3f14dd48410e961 Author: Thomas Zimmermann Date: Mon Jan 2 12:29:22 2023 +0100 drm/format-helper: Add conversion from XRGB8888 to ARGB2101010 Add dedicated helper to convert from XRGB8888 to ARGB2101010. Sets all alpha bits to make pixels fully opaque. v2: * set correct format in struct drm_framebuffer (Javier) * use cpubuf_to_le32() * type fixes Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Reviewed-by: José Expósito Link: https://patchwork.freedesktop.org/patch/msgid/20230102112927.26565-9-tzimmermann@suse.de commit 175073d694cd9db4c4ca97c978a447acc6b5cb33 Author: Thomas Zimmermann Date: Mon Jan 2 12:29:21 2023 +0100 drm/format-helper: Add conversion from XRGB8888 to ARGB8888 Add dedicated helper to convert from XRGB8888 to ARGB8888. Sets all alpha bits to make pixels fully opaque. v3: * use __le32 for destination buffer (Jose, kernel test robot) v2: * use cpubuf_to_le32() * type fixes Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Reviewed-by: José Expósito Link: https://patchwork.freedesktop.org/patch/msgid/20230102112927.26565-8-tzimmermann@suse.de commit f238ac30afde0da3dcc047ba6f735837a238f2b1 Author: Thomas Zimmermann Date: Mon Jan 2 12:29:20 2023 +0100 drm/format-helper: Flip src/dst-format branches in blit helper Upcoming changes to the format conversion will mostly blit from XRGB8888 to some other format. So put the source format in blit's outer branches to make the code more readable. For cases where a format only changes its endianness, such as XRGB565, introduce dedicated branches that handle this for all formats. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230102112927.26565-7-tzimmermann@suse.de commit 4db88a9026c22059a10e74789f2fcc6a424ab4cc Author: Thomas Zimmermann Date: Mon Jan 2 12:29:19 2023 +0100 drm/format-helper: Type fixes in format-helper tests Change the source-buffer type of le32buf_to_cpu() to __le32* to reflect endianness. Result buffers are converted to local endianness, so instantiate them from regular u8 or u32 types. Signed-off-by: Thomas Zimmermann Reviewed-by: Maíra Canal Reviewed-by: José Expósito Link: https://patchwork.freedesktop.org/patch/msgid/20230102112927.26565-6-tzimmermann@suse.de commit f21d62c9ce3db2c74875a15bec6afbae93ee43cc Author: Thomas Zimmermann Date: Mon Jan 2 12:29:18 2023 +0100 drm/format-helper: Store RGB565 in little-endian order Fix to-RGB565 conversion helpers to store the result in little- endian byte order. Update test cases as well. Signed-off-by: Thomas Zimmermann Reviewed-by: Maíra Canal Reviewed-by: José Expósito Link: https://patchwork.freedesktop.org/patch/msgid/20230102112927.26565-5-tzimmermann@suse.de commit 58f5d9830da0d4f257cc39244ba982cf90e3199c Author: Thomas Zimmermann Date: Mon Jan 2 12:29:17 2023 +0100 drm/format-helper: Fix test-input format conversion Convert test input for format helpers from host byte order to little-endian order. The current code does it the other way around, but there's no effective difference to the result. Signed-off-by: Thomas Zimmermann Reviewed-by: Maíra Canal Reviewed-by: José Expósito Link: https://patchwork.freedesktop.org/patch/msgid/20230102112927.26565-4-tzimmermann@suse.de commit a5b1a681dcac2eb75129e5e1bc2530dbd6febc44 Author: Thomas Zimmermann Date: Mon Jan 2 12:29:16 2023 +0100 drm/format-helper: Comment on RGB888 byte order RGB888 is different than the other formats as most of its pixels are unaligned and therefore helper functions do not use endianness conversion helpers. Comment on this in the source code. Signed-off-by: Thomas Zimmermann Reviewed-by: Maíra Canal Reviewed-by: José Expósito Link: https://patchwork.freedesktop.org/patch/msgid/20230102112927.26565-3-tzimmermann@suse.de commit f35cd3fa77293c2cd03e94b6a6151e1a7d9309cf Author: Thomas Zimmermann Date: Mon Jan 2 12:29:15 2023 +0100 firmware/sysfb: Fix EFI/VESA format selection Select color format for EFI/VESA firmware scanout buffer from the number of bits per pixel and the position of the individual color components. Fixes the selected format for the buffer in several odd cases. For example, XRGB1555 has been reported as ARGB1555 because of the different use of depth and transparency in VESA and Linux. Bits-per-pixel is always the pixel's raw number of bits; including alpha and filler bits. It is preferred over color depth, which has a different meaning among various components and standards. Also do not compare reserved bits and transparency bits to each other. These values have different meanings, as reserved bits include filler bits while transparency does not. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230102112927.26565-2-tzimmermann@suse.de commit 6ed879b08f210bd1d312eaada653e6a82894060a Author: Jonathan Cavitt Date: Wed Dec 21 07:35:14 2022 -0800 drm/i915: Enable XE_HP 4Tile support Add .has_4tile tag to XE_HP_FEATURES set. Remove duplicate entry from DG2_FEATURES. Signed-off-by: Jonathan Cavitt Cc: Bommu Krishnaiah Cc: Roper Matthew D Cc: Kempczynski Zbigniew Cc: Telukuntla Sreedhar Acked-by: Matt Roper Reviewed-by: Juha-Pekka Heikkila Signed-off-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20221221153514.3874262-1-jonathan.cavitt@intel.com commit 4651b9438b69ffa771c6e94020920a026ba86e98 Author: Anuradha Weeraman Date: Tue Jan 3 09:16:34 2023 +0530 x86/lib: Include to fix a missing prototypes warning at build time Signed-off-by: Anuradha Weeraman Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230103034637.74679-1-anuradha@debian.org commit f2e4cca2f670c8e52fbb551a295f2afc9aa2bd72 Author: John Ogness Date: Thu Dec 29 14:49:39 2022 +0106 docs: gdbmacros: print newest record @head_id points to the newest record, but the printing loop exits when it increments to this value (before printing). Exit the printing loop after the newest record has been printed. The python-based function in scripts/gdb/linux/dmesg.py already does this correctly. Fixes: e60768311af8 ("scripts/gdb: update for lockless printk ringbuffer") Cc: stable@vger.kernel.org Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20221229134339.197627-1-john.ogness@linutronix.de commit f422fa7cd85832d7d1505d7fae7ae519185354cc Merge: 88603b6dc4194 6fb6c979ca628 Author: Daniel Vetter Date: Tue Jan 3 09:48:03 2023 +0100 Merge tag 'drm-misc-next-2022-11-24' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 6.2: Cross-subsystem Changes: - fbdev: Make fb_modesetting_disabled() static - udmabuf: Add vmap and vunmap methods to udmabuf_ops Core Changes: - doc: make drm-uapi igt-tests more readable - fb-helper: Revert of the damage worker removal - fourcc: Add missing big-endian XRGB1555 and RGB565 formats - gem-shmem: Fix for resource leakage in __drm_gem_shmem_create() - scheduler: Fix lockup in drm_sched_entity_kill() Signed-off-by: Daniel Vetter From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20221124074615.ahflw5q5ktfdsr7k@houat commit cc328c9e05e98feb64a9f81f29e51df4cb986921 Author: Nirmoy Das Date: Fri Dec 30 19:35:00 2022 +0100 drm/i915: Use "%zu" to format size_t Switch to %zu for printing size_t which will fix compilation warning for 32-bit build. Reported-by: kernel test robot Signed-off-by: Nirmoy Das Reviewed-by: Gwan-gyeong Mun Reviewed-by: Andi Shyti Signed-off-by: Gwan-gyeong Mun Link: https://patchwork.freedesktop.org/patch/msgid/20221230183500.20553-1-nirmoy.das@intel.com commit f060ba1882ec83cbb3c3809104bfa1d5868ea130 Author: Uwe Kleine-König Date: Mon Dec 12 22:41:12 2022 +0100 ata: octeon: 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: Niklas Cassel Signed-off-by: Damien Le Moal commit 6a5eb779478ee43e88c05dd7ae0477ab13517363 Author: Wang Yong Date: Wed Dec 28 10:01:41 2022 +0000 Documentation: x86: fix typo in x86_64/mm.rst change "64Gb" to "64GB". Signed-off-by: Wang Yong Link: https://lore.kernel.org/r/20221228100141.382325-1-yongw.kernel@gmail.com Signed-off-by: Jonathan Corbet commit 041d4329130d8efe3214c2412dc9a3e5f9f7804b Author: Konstantin Ryabitsev Date: Tue Dec 20 14:44:17 2022 -0500 docs: maintainer-pgp-guide: update for latest gnupg defaults It is finally becoming increasingly rare to find a distribution that still ships with gnupg-1.x, so remove the last vestiges of "gpg" vs "gpg2" from documentation. Similarly, starting with GnuPG 2.2 and above, the default --gen-key operation creates ed25519/cv25519 keypairs, so update all example command outputs to use that combination instead of rsa2048. Lastly, add a few wording tweaks and remove links that lead to stale information (e.g. hardware tokens overview from 2017). Signed-off-by: Konstantin Ryabitsev Link: https://lore.kernel.org/r/20221220-docs-pgp-guide-v1-1-9b0c0bf974fb@linuxfoundation.org Signed-off-by: Jonathan Corbet commit 71240f94f17db5e5d7efa997b858301ed14d3dce Author: Donglin Peng Date: Thu Dec 8 18:51:19 2022 -0800 docs: ftrace: fix a issue with duplicated subtitle number The subtitle "5.3 Clearing filters" and "5.3 Subsystem filters" has the same index number, let's fix it. Fixes: 95b696088c1c ("tracing/filters: add filter Documentation") Signed-off-by: Donglin Peng Acked-by: Steven Rostedt (Google) Link: https://lore.kernel.org/r/20221209025119.1371570-1-dolinux.peng@gmail.com Signed-off-by: Jonathan Corbet commit 8b0a211d3181b71c78e3e696d0caa7f0edb4ed02 Author: Yang Yang Date: Fri Dec 9 14:21:53 2022 +0800 docs: proc.rst: add softnet_stat to /proc/net table /proc/net/softnet_stat exists for a long time, but proc.rst miss it. Softnet_stat shows some statistics of struct softnet_data of online CPUs. Struct softnet_data manages incoming and output packets on per-CPU queues. Note that fastroute and cpu_collision in softnet_stat are obsolete and their value is always 0. Signed-off-by: Yang Yang Reviewed-by: xu xin Reviewed-by: Zhang Yunkai Link: https://lore.kernel.org/r/202212091421536982085@zte.com.cn Signed-off-by: Jonathan Corbet commit 078bdea856bf533f3163eeb0870e22a717f4eaa7 Author: Wang Yong Date: Thu Dec 8 08:33:53 2022 +0000 docs/zh_CN: fix a typo in howto Fix a typo in Chinese translation of howto.rst Fixes: 40d93e496180 ("docs/zh_CN: update howto.rst to latest version") Signed-off-by: Wang Yong Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/20221208083353.160152-1-yongw.kernel@gmail.com Signed-off-by: Jonathan Corbet commit e7951a3e0647f588e83627ab18110fda988a766e Author: Chen Xiao Date: Thu Dec 8 14:04:03 2022 +0800 docs: mm/page_owner: fix spelling mistakes Fix several spelling mistakes in page_owner documentation. Signed-off-by: Chen Xiao Reviewed-by: Randy Dunlap Link: https://lore.kernel.org/r/1670479443-8484-1-git-send-email-abigwc@gmail.com Signed-off-by: Jonathan Corbet commit 69163dd9eaebef22975ecf20852d4aab875eb20d Author: Carlos Bilbao Date: Sat Dec 3 18:01:10 2022 -0600 docs/sp_SP: Add process code-of-conduct.rst translation Translate the following document into Spanish: - process/code-of-conduct.rst Signed-off-by: Carlos Bilbao Link: https://lore.kernel.org/r/20221204000109.17224-1-bilbao@vt.edu Signed-off-by: Jonathan Corbet commit 42551b8d3e1ba9a7cd38cd322ac3a772aaf7725e Author: Randy Dunlap Date: Sat Dec 3 17:30:50 2022 -0800 Documentation: admin: move OOO entries in kernel-parameters.txt Fix the most blatant out-of-order entries in kernel-parameters.txt. No changes other than modifying the order of the entries. Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20221204013050.11496-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 7df047be43639764e5369c2875a8da3945cc0770 Author: Yanteng Si Date: Sat Dec 10 11:27:05 2022 +0800 docs/zh_CN: Update the translation of energy-model to 6.1-rc8 Update to commit c5d39fae8992 ("Documentation: EM: Switch to micro-Watts scale") commit f48a0c475c2a ("Documentation: EM: Describe new registration method using DT") commit 75a3a99a5a98 ("PM: EM: Change the order of arguments in the .active_power() callback") commit 015f569c4649 ("Documentation: EM: Add artificial EM registration description") Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/06df12357d64d602a4dfb10a025a7520daeb3ba0.1670642548.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 03474d581df3bece27221cf69a52726f627f75a4 Author: Yanteng Si Date: Sat Dec 10 11:27:04 2022 +0800 docs/zh_CN: Update the translation of msi-howto to 6.1-rc8 Update to commit 88614075a952 ("Documentation: PCI: Add reference to PCI/MSI device driver APIs") Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/a47eb583fc396cd936a27749c318557284855936.1670642548.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 0f3d70cb01da00811f6b2791ed11da1cb2811100 Author: Yanteng Si Date: Sat Dec 10 11:27:03 2022 +0800 docs/zh_CN: Update the translation of ksm to 6.1-rc8 Update to commit 21b7bdb504ae ("ksm: add profit monitoring documentation") commit 94bfe85bde18 ("mm/vmstat: add events for ksm cow") Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/4d11b3d7b7223c16b38ef913a6a6de108a0886d3.1670642548.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 7cb52d4b3724940883f42d1ceacaefc78db42437 Author: Yanteng Si Date: Sat Dec 10 11:27:02 2022 +0800 docs/zh_CN: Update the translation of usage to 6.1-rc8 Update to commit 1da89ea0b006 ("Docs/admin-guide/mm/damon/usage: document schemes//tried_regions sysfs directory") commit 465d0eb0dc31 ("Docs/admin-guide/mm/damon/usage: fix the example code snip") commit f1f3afd59d78 ("Docs/admin-guide/mm/damon/usage: note DAMON debugfs interface deprecation plan") commit 9056a2229495 ("Docs/admin-guide/mm/damon/usage: describe the rules of sysfs region directories") commit c3774845541e ("Docs/admin-guide/mm/damon/usage: fix wrong usage example of init_regions file") Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/8c96013940845a9c59b5b607c0a98b5d4cd53636.1670642548.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 9a833802a04d53cb41644758efca73449166039c Author: Yanteng Si Date: Sat Dec 10 11:26:36 2022 +0800 docs/zh_CN: Update the translation of start to 6.1-rc8 Update to commit 04cc7e4bf7c4 ("Docs/admin-guide/mm/damon/start: mention the dependency as sysfs instead of debugfs") Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/166422a66dd1985f8da9fa9f2ef7bfd57439923f.1670642548.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit ffdd9bd7a278e37aa80de9ccc0b511d7387c2be7 Author: Yanteng Si Date: Sat Dec 10 11:26:35 2022 +0800 docs/zh_CN: Update the translation of reclaim to 6.1-rc8 Update to commit 205498012513 ("Docs/admin-guide/damon/reclaim: remove a paragraph that been obsolete due to online tuning support") Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/6f85da692baee63696e2680d5dd57c158bfbe0a6.1670642548.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit e07e9f22259ede8258c00cf3358a44eefa1ad7ff Author: Yanteng Si Date: Sat Dec 10 11:26:34 2022 +0800 docs/zh_CN: Update the translation of testing-overview to 6.1-rc8 Update to commit a32d5c0fc12b ("Documentation: dev-tools: Enhance static analysis section with discussion") Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/f3ae5e63502fed7e904f5a801168d2324c71f014.1670642548.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 1003f3420663f7959327650d0185546574a34728 Author: Yanteng Si Date: Sat Dec 10 11:24:51 2022 +0800 docs/zh_CN: Update the translation of kasan to 6.1-rc8 Update to commit cd36d84d2571 ("kasan: allow sampling page_alloc allocations for HW_TAGS") Commit 80b92bfe3bb7 ("kasan: dynamically allocate stack ring entries") Commit 7ebfce331251 ("kasan: support kasan.stacktrace for SW_TAGS") Commit ca89f2a2e66d ("kasan: move boot parameters section in documentation") Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/824d1cea864dac3ef78c0911c2c5a238f36c55ad.1670642548.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit c363059c52ced4e3d00d2b0c1dcadcb9f2cbc352 Author: Yanteng Si Date: Sat Dec 10 11:24:50 2022 +0800 docs/zh_CN: Update the translation of page_owner to 6.1-rc8 Update to commit 0719fdba5483 ("Documentation/mm/page_owner.rst: delete frequently changing experimental data"). Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/f7a7b03a09a184c080f804d9bb89d0cc55750900.1670642548.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit e0068090095c66d1a6ce87a6b3b797e55570cbc5 Author: Yanteng Si Date: Sat Dec 10 11:24:49 2022 +0800 docs/zh_CN: Update the translation of highmem to 6.1-rc8 Update to commit a9e9c93966af ("Documentation/mm: add details about kmap_local_page() and preemption"). Commit 84b86f6054c4 ("Documentation/mm: rrefer kmap_local_page() and avoid kmap()"). Commit 6b3afe2eeec2 ("Documentation/mm: avoid invalid use of addresses from kmap_local_page()"). Commit 516ea046ec55 ("Documentation/mm: don't kmap*() pages which can't come from HIGHMEM"). Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/50db59505546b035a03f4ae48d3c18e6116f9e3c.1670642548.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 169005eae2af63143e914ab39b227f342d5e93df Author: Yanteng Si Date: Sat Dec 10 11:24:48 2022 +0800 docs/zh_CN: Update the translation of mm-api to 6.1-rc8 Update to commit def76fd549c5 ("mm/page_alloc: remove obsolete gfpflags_normal_context()"). Commit 7343f2b0db49 ("headers/deps: mm: align MANITAINERS and Docs with new gfp.h structure") Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/66edf54c706aaf416b5a59c0169a989a7c803e1f.1670642548.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit cf306a26cb3a7c506cc66764a1ff3c18c8ccbecf Author: Yanteng Si Date: Sat Dec 10 11:24:47 2022 +0800 docs/zh_CN: Update the translation of kernel-api to 6.1-rc8 Update to commit d28a1de5d112 ("math64: favor kernel-doc from header files"). Commit 03699f271de1 ("string: Rewrite and add more kern-doc for the str*() functions"). Commit 31970608a6d3 ("overflow: Fix kern-doc markup for functions") Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/46930487845717a6a718dbb6493864dee125ea1b.1670642548.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 6ab587e8e8b434ffc2decdd6db17dff0ef2b13ab Author: Yanteng Si Date: Sat Dec 10 11:24:46 2022 +0800 docs/zh_CN: Update the translation of delay-accounting to 6.1-rc8 Update to commit f347c9d2697f ("filemap: make the accounting of thrashing more consistent"). Commit 662ce1dc9caf ("delayacct: track delays from write-protect copy"). Signed-off-by: Yanteng Si Link: https://lore.kernel.org/r/798990521e991697f9f2b75f4dc4a485d31c1311.1670642548.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 4e9498b835ab31b83fc32fae4f77426f668010ac Author: Hans de Goede Date: Mon Nov 28 10:28:54 2022 +0100 power: supply: bq25890: Support boards with more then one charger IC Some devices, such as the Lenovo Yoga Tab 3 Pro (YT3-X90F) have multiple batteries with a separate bq25890 charger for each battery. This requires the bq25890_charger code to use a unique name per registered power_supply class device, rather then hardcoding "bq25890-charger" as power_supply class device name. Add a "-%d" prefix to the name, allocated through idr in the same way as several other power_supply drivers are already doing this. Note this also updates: drivers/platform/x86/x86-android-tablets.c which refers to the charger by power_supply-class-device-name for the purpose of setting the "supplied-from" property on the fuel-gauge to this name. Reviewed-by: Marek Vasut Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel commit dee0df8496c1d13afd1bb447d284e1a76eb8e83e Author: Hans de Goede Date: Mon Nov 28 10:28:53 2022 +0100 power: supply: bq25890: Always take HiZ mode into account for ADC rate The code to check if F_CONV_RATE has been set, or if a manual ADC conversion needs to be triggered, as well as the code to set the initial F_CONV_RATE value at probe both where not taking HiZ mode into account. Add checks for this. Reviewed-by: Marek Vasut Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel commit 4413f9e9138fe4c50db80596635a1f7f1e8bfa6a Author: Hans de Goede Date: Mon Nov 28 10:28:52 2022 +0100 power: supply: bq25890: Fix setting of F_CONV_RATE rate when disabling HiZ mode The recent "power: supply: bq25890: Add HiZ mode support" change leaves F_CONV_RATE rate unset when disabling HiZ mode (setting POWER_SUPPLY_PROP_ONLINE to 1) while a charger is connected. Separate the resetting HiZ mode (when necessary because of a charger (re)plug event) into its own "if {}" block which runs first. And fix the setting of F_CONV_RATE rate by adding helper variables for the old and new F_CONV_RATE state which check both the online and hiz bits and then compare the helper variables to see if a F_CONV_RATE update is necessary. Reviewed-by: Marek Vasut Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel commit c688e0c436cb5292285a193134346fcdaaa3a56d Author: Marek Vasut Date: Mon Nov 28 10:28:51 2022 +0100 power: supply: bq25890: Add HiZ mode support The bq25890 is capable of disconnecting itself from the external supply, in which case the system is supplied only from the battery. This can be useful e.g. to test the pure battery operation, or draw no power from USB port. Implement support for this mode, which can be toggled by writing 0 or non-zero to sysfs 'online' attribute, to select either offline or online mode. The IRQ handler has to be triggered to update chip state, as switching to and from HiZ mode does not generate an interrupt automatically. The IRQ handler reinstates the HiZ mode in case a cable is replugged by the user, the chip itself clears the HiZ mode bit when cable is plugged in by the user and the chip detects PG bad-to-good transition. Signed-off-by: Marek Vasut [hdegoede@redhat.com: Replace "&" with "&&" in a boolean check] Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel commit d1b25092b3dce96a69fc31b462e61291848fda9f Author: Marek Vasut Date: Mon Nov 28 10:28:50 2022 +0100 power: supply: bq25890: Factor out chip state update Pull the chip state and ADC conversion update functionality out into separate function, so it can be reused elsewhere in the driver. This is a preparatory patch, no functional change. Reviewed-by: Hans de Goede Signed-off-by: Marek Vasut Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel commit 5dd482688ad34a92c8b0907a64f7f022310f982d Author: Deepak R Varma Date: Thu Dec 22 22:48:29 2022 +0530 power: supply: da9150: Remove redundant error logging A call to platform_get_irq_byname() 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 and the device pointer variable dev unnecessary. Remove those as well. Issue identified using platform_get_irq.cocci coccinelle semantic patch. Signed-off-by: Deepak R Varma Signed-off-by: Sebastian Reichel commit 32d0c06801172e258a66ffb5dfad7d5d2b9557a9 Author: Padmanabhan Rajanbabu Date: Mon Jan 2 15:02:47 2023 +0530 arm64: dts: fsd: fix PUD values as per FSD HW UM PUD values used for UFS, SPI and UART are not reflecting the default values recommended by FSD HW UM. Therefore, changing the same to comply with HW UM recommendation. Signed-off-by: Padmanabhan Rajanbabu Link: https://lore.kernel.org/r/20230102093247.59649-1-p.rajanbabu@samsung.com Signed-off-by: Krzysztof Kozlowski commit bbd0b031509b880b4e9a880bb27ca2a30ad081ab Author: Mathieu Desnoyers Date: Mon Jan 2 10:12:16 2023 -0500 sched/rseq: Fix concurrency ID handling of usermodehelper kthreads sched_mm_cid_after_execve() does not expect NULL t->mm, but it may happen if a usermodehelper kthread fails when attempting to execute a binary. sched_mm_cid_fork() can be issued from a usermodehelper kthread, which has t->flags PF_KTHREAD set. Fixes: af7f588d8f73 ("sched: Introduce per-memory-map concurrency ID") Reported-by: kernel test robot Reported-by: Borislav Petkov Signed-off-by: Mathieu Desnoyers Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/oe-lkp/202212301353.5c959d72-yujie.liu@intel.com commit 2591939e881cf728b6ac45971eeec2f58051c101 Author: Rob Clark Date: Tue Nov 29 16:08:41 2022 -0800 drm/virtio: Spiff out cmd queue/response traces Add a sequence # for more easily matching up cmd/resp, and the # of free slots in the virtqueue to more easily see starvation issues. v2: Fix handling of string fields as well Signed-off-by: Rob Clark Reviewed-by: Dmitry Osipenko Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20221130000841.318037-1-robdclark@gmail.com commit 777ad8835e43155101b6b8f09ea433ffbd1fc028 Author: Mark Brown Date: Tue Dec 27 17:06:52 2022 +0000 kselftest/alsa: pcm - Add more coverage by default Add more coverage to our standard test cases: - 8kHz mono and stereo to verify that the most common mono format is clocked correctly. - 44.1kHz stereo to verify that this different clock base is generated accurately. - 48kHz 6 channel to verify that 6 channel is clocked correctly. - 96kHz stereo since that is a common audiophile rate. Reviewed-by: Jaroslav Kysela Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-alsa-pcm-test-hacks-v4-7-5a152e65b1e1@kernel.org Signed-off-by: Takashi Iwai commit b8680e2128742d4b678a68f86122b3c570d3dfda Author: Mark Brown Date: Tue Dec 27 17:06:51 2022 +0000 kselftest/alsa: pcm - Provide descriptions for the default tests Help people understand what the standard tests are trying to cover by providing descriptions which both serve as comments in the file and log messages in the program's output. Reviewed-by: Jaroslav Kysela Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-alsa-pcm-test-hacks-v4-6-5a152e65b1e1@kernel.org Signed-off-by: Takashi Iwai commit 8acb452467f5a9671756937e55baa1776344e80e Author: Mark Brown Date: Tue Dec 27 17:06:50 2022 +0000 kselftest/alsa: pcm - Support optional description for tests In order to help with the comprehensibility of tests it is useful for us to document what the test is attempting to cover. We could just do this through comments in the configuration files but in order to aid people looking at the output of the program in logs let's provide support for an optional 'description' directive which we log prior to running each of the tests. Reviewed-by: Jaroslav Kysela Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-alsa-pcm-test-hacks-v4-5-5a152e65b1e1@kernel.org Signed-off-by: Takashi Iwai commit 34fb956cbdba8e726d72da9796a8a1b65337d9db Author: Mark Brown Date: Tue Dec 27 17:06:49 2022 +0000 kselftest/alsa: pcm - skip tests when we fail to set params Since we don't know what the capabilities of an unknown card is any of our standard tests may fail due to not being supported by the system. Set a flag once we've configured the stream, just before we start data, to say that the system accepted our stream configuration. Since there shouldn't be a use case for tests that are specified for the individual system failing for those tests we also add a new test which fails if we are unable to configure the settings specified in the system specific configuration file. Reviewed-by: Jaroslav Kysela Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-alsa-pcm-test-hacks-v4-4-5a152e65b1e1@kernel.org Signed-off-by: Takashi Iwai commit 7769f1abecf501902cf96e871739da7f97424a43 Author: Mark Brown Date: Tue Dec 27 17:06:48 2022 +0000 kselftest/alsa: pcm - Always run the default set of tests Rather than allowing the system specific tests to replace the default set of tests instead run them in addition to the standard set of tests. In order to avoid name collisions in the reported tests we add an additional test class element to the reported tests. Doing this means we always get a consistent baseline of coverage no matter what card we run on but retain the ability to specify specific coverage for a given system. Reviewed-by: Jaroslav Kysela Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-alsa-pcm-test-hacks-v4-3-5a152e65b1e1@kernel.org Signed-off-by: Takashi Iwai commit 348d09fcd1b6ba455141882daf1d50ff33cd0bf8 Author: Jaroslav Kysela Date: Tue Dec 27 17:06:47 2022 +0000 kselftest/alsa: pcm - move more configuration to configuration files Obtain all test parameters from the configuration files. The defaults are defined in the pcm-test.conf file. The test count and parameters may be variable per specific hardware. Also, handle alt_formats field now (with the fixes in the format loop). It replaces the original "automatic" logic which is not so universal. The code may be further extended to skip various tests based on the configuration hints, if the exact PCM hardware parameters are not available for the given hardware. Signed-off-by: Jaroslav Kysela Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-alsa-pcm-test-hacks-v4-2-5a152e65b1e1@kernel.org Signed-off-by: Takashi Iwai commit c48cafc241bff09d7ea682982ff96d532e64e2ed Author: Mark Brown Date: Tue Dec 27 17:06:46 2022 +0000 kselftest/alsa: pcm - Drop recent coverage improvement changes In preparation to adopting a better, more comprehensive approach to adding the coverage that was just added using some changes from Jaroslav which were sent at the same time the recently added improvements were being applied drop what was applied. This reverts: 7d721baea138 "kselftest/alsa: Add more coverage of sample rates and channel counts" ee12040dd53a "kselftest/alsa: Provide more meaningful names for tests" ae95efd9754c "kselftest/alsa: Don't any configuration in the sample config" 8370d9b00c92 Revert "kselftest/alsa: Report failures to set the requested channels as skips" f944f8b539ea "kselftest/alsa: Report failures to set the requested sample rate as skips" 22eeb8f531c1 "kselftest/alsa: Refactor pcm-test to list the tests to run in a struct" Reviewed-by: Jaroslav Kysela Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20221208-alsa-pcm-test-hacks-v4-1-5a152e65b1e1@kernel.org Signed-off-by: Takashi Iwai commit fce310a2d2321874423b11f6cab4ad3fce5ef639 Author: Krzysztof Kozlowski Date: Mon Jan 2 09:54:52 2023 +0100 arm64: dts: qcom: sm8450: align PSCI domain names with DT schema Bindings expect power domains to follow generic naming pattern: sm8450-qrd.dtb: psci: 'cpu-cluster0', 'cpu0', 'cpu1', 'cpu2', 'cpu3', 'cpu4', 'cpu5', 'cpu6', 'cpu7' do not match any of the regexes: '^power-domain-', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102085452.10753-6-krzysztof.kozlowski@linaro.org commit a9371962c3b26ba4012dc05ab0fbb964eb142a66 Author: Krzysztof Kozlowski Date: Mon Jan 2 09:54:51 2023 +0100 arm64: dts: qcom: sm8350: align PSCI domain names with DT schema Bindings expect power domains to follow generic naming pattern: sm8350-hdk.dtb: psci: 'cpu-cluster0', 'cpu0', 'cpu1', 'cpu2', 'cpu3', 'cpu4', 'cpu5', 'cpu6', 'cpu7' do not match any of the regexes: '^power-domain-', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102085452.10753-5-krzysztof.kozlowski@linaro.org commit 56d590022b6c6baea11e3a9f6106fddafaba8a58 Author: Krzysztof Kozlowski Date: Mon Jan 2 09:54:50 2023 +0100 arm64: dts: qcom: sm8250: align PSCI domain names with DT schema Bindings expect power domains to follow generic naming pattern: sm8250-hdk.dtb: psci: 'cpu-cluster0', 'cpu0', 'cpu1', 'cpu2', 'cpu3', 'cpu4', 'cpu5', 'cpu6', 'cpu7' do not match any of the regexes: '^power-domain-', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102085452.10753-4-krzysztof.kozlowski@linaro.org commit 5ca45690551a304c7bc8996962315f2e8b2909d8 Author: Krzysztof Kozlowski Date: Mon Jan 2 09:54:49 2023 +0100 arm64: dts: qcom: sm8150: align PSCI domain names with DT schema Bindings expect power domains to follow generic naming pattern: sm8150-hdk.dtb: psci: 'cpu-cluster0', 'cpu0', 'cpu1', 'cpu2', 'cpu3', 'cpu4', 'cpu5', 'cpu6', 'cpu7' do not match any of the regexes: '^power-domain-', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102085452.10753-3-krzysztof.kozlowski@linaro.org commit 0c8bfc7f3be4d99fc314676210c77838aa282cd6 Author: Krzysztof Kozlowski Date: Mon Jan 2 09:54:48 2023 +0100 arm64: dts: qcom: sm6375: align PSCI domain names with DT schema Bindings expect power domains to follow generic naming pattern: sm6375-sony-xperia-murray-pdx225.dtb: psci: 'cpu-cluster0', 'cpu0', 'cpu1', 'cpu2', 'cpu3', 'cpu4', 'cpu5', 'cpu6', 'cpu7' do not match any of the regexes: '^power-domain-', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102085452.10753-2-krzysztof.kozlowski@linaro.org commit ac392971357375bbbba905c6c12cd1ac6962da2d Author: Krzysztof Kozlowski Date: Mon Jan 2 09:54:47 2023 +0100 arm64: dts: qcom: sc8280xp: align PSCI domain names with DT schema Bindings expect power domains to follow generic naming pattern: sc8280xp-crd.dtb: psci: 'cpu-cluster0', 'cpu0', 'cpu1', 'cpu2', 'cpu3', 'cpu4', 'cpu5', 'cpu6', 'cpu7' do not match any of the regexes: '^power-domain-', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102085452.10753-1-krzysztof.kozlowski@linaro.org commit cae04c4425e374ed10dc8a8c1f3bd369934945d7 Author: Krzysztof Kozlowski Date: Mon Jan 2 09:59:09 2023 +0100 dt-bindings: clock: qcom,gcc-sc8280xp: document power domain GCC clock controller is supplied by CX power domain: sc8280xp-crd.dtb: clock-controller@100000: Unevaluated properties are not allowed ('power-domains' was unexpected) Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102085909.24620-1-krzysztof.kozlowski@linaro.org commit b9ae6ddeded793c80747e4f80211379d001a263a Author: Krzysztof Kozlowski Date: Mon Jan 2 13:37:34 2023 +0100 arm64: dts: qcom: sm8450: disable by default Soundwire and VA-macro Soundwire is a bus and VA-macro requires a supply, thus both are expected to be explicitly enabled and populated by board DTS. The HDK8450 already enables Soundwire devices, except swr4 which as a result of this commit will stay disabled. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230102123734.478433-1-krzysztof.kozlowski@linaro.org commit a30144c02c84614ed160ab70e38fcf7b024a1bb0 Author: Arnd Bergmann Date: Thu Dec 15 17:47:30 2022 +0100 mtd: dataflash: remove duplicate SPI ID table Building with -Werror=override-init reveals that two patches added the same device ID table to this driver: drivers/mtd/devices/mtd_dataflash.c:946:27: error: initialized field overwritten [-Werror=override-init] 946 | .id_table = dataflash_spi_ids, | ^~~~~~~~~~~~~~~~~ drivers/mtd/devices/mtd_dataflash.c:946:27: note: (near initialization for 'dataflash_driver.id_table') Remove one of the copies. Fixes: 27a030e87292 ("mtd: dataflash: Add device-tree SPI IDs") Fixes: ac4f83482afb ("mtd: dataflash: Add SPI ID table") Signed-off-by: Arnd Bergmann Acked-by: Uwe Kleine-König Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221215164736.1315815-1-arnd@kernel.org commit 34569d869532b54d6e360d224a0254dcdd6a1785 Author: Samuel Holland Date: Thu Dec 29 12:15:24 2022 -0600 mtd: rawnand: sunxi: Fix the size of the last OOB region The previous code assigned to the wrong structure member. Fixes: c66811e6d350 ("mtd: nand: sunxi: switch to mtd_ooblayout_ops") Signed-off-by: Samuel Holland Acked-By: Dhruva Gole Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221229181526.53766-6-samuel@sholland.org commit 85e8177e581964a727410c781410f626e1cb4c25 Author: Samuel Holland Date: Thu Dec 29 12:15:22 2022 -0600 mtd: rawnand: sunxi: Remove an unnecessary check Each chip is required to have a unique CS number ("reg" property) in the range 0-7, so there is no need to separately count the number of chips. Signed-off-by: Samuel Holland Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221229181526.53766-4-samuel@sholland.org commit 59186a402ab07d205428ee9f62ff0e95ecb06b63 Author: Samuel Holland Date: Thu Dec 29 12:15:21 2022 -0600 mtd: rawnand: sunxi: Remove an unnecessary check sunxi_nand->nsels cannot be zero, so the second check implies the first. Signed-off-by: Samuel Holland Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221229181526.53766-3-samuel@sholland.org commit 6d7fea226b238b95d69faba49b8faf73d6e8c469 Author: Samuel Holland Date: Thu Dec 29 12:15:20 2022 -0600 mtd: rawnand: sunxi: Clean up chips after failed init If a chip fails to initialize, we need to clean up any chips that were already initialized/registered. Fixes: 1fef62c1423b ("mtd: nand: add sunxi NAND flash controller support") Signed-off-by: Samuel Holland Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221229181526.53766-2-samuel@sholland.org commit 68c18dae68881054ed5426c00f0ed351b1db9bc0 Author: Aviram Dali Date: Fri Dec 16 18:27:15 2022 +0200 mtd: rawnand: marvell: add missing layouts A missing layouts were added to the driver to support NAND flashes with ECC layouts of 12 or 16 with page sized of 2048, 4096 or 8192. Usually theses are rare layouts, but in Marvell AC5 driver, the ECC level is set according to the spare area, so we may use these layouts more frequently. Signed-off-by: Aviram Dali Signed-off-by: Vadym Kochan Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20221216162715.3230766-1-vadym.kochan@plvision.eu commit 0974687a19c316388e877d9a4f482feb9d070585 Author: Dave Stevenson Date: Thu Dec 22 18:52:13 2022 +0000 drm/bridge: panel: Set pre_enable_prev_first from drmm_panel_bridge_add Commit 5ea6b1702781 ("drm/panel: Add prepare_prev_first flag to drm_panel") added code to copy prepare_prev_first from drm_panel to pre_enable_prev_first in drm_bridge when called through devm_panel_bridge_add, but missed drmm_panel_bridge_add. Add the same code to drmm_panel_bridge_add. Fixes: 5ea6b1702781 ("drm/panel: Add prepare_prev_first flag to drm_panel") Signed-off-by: Dave Stevenson Reviewed-by: Jagan Teki Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20221222185213.3773336-1-dave.stevenson@raspberrypi.com commit 479d4f0be4237ba33bc9432787aeb62c90e30f95 Author: Maíra Canal Date: Thu Dec 29 16:46:38 2022 -0300 drm/vc4: drop all currently held locks if deadlock happens If vc4_hdmi_reset_link() returns -EDEADLK, it means that a deadlock happened in the locking context. This situation should be addressed by dropping all currently held locks and block until the contended lock becomes available. Currently, vc4 is not dealing with the deadlock properly, producing the following output when PROVE_LOCKING is enabled: [ 825.612809] ------------[ cut here ]------------ [ 825.612852] WARNING: CPU: 1 PID: 116 at drivers/gpu/drm/drm_modeset_lock.c:276 drm_modeset_drop_locks+0x60/0x68 [drm] [ 825.613458] Modules linked in: 8021q mrp garp stp llc raspberrypi_cpufreq brcmfmac brcmutil crct10dif_ce hci_uart cfg80211 btqca btbcm bluetooth vc4 raspberrypi_hwmon snd_soc_hdmi_codec cec clk_raspberrypi ecdh_generic drm_display_helper ecc rfkill drm_dma_helper drm_kms_helper pwm_bcm2835 bcm2835_thermal bcm2835_rng rng_core i2c_bcm2835 drm fuse ip_tables x_tables ipv6 [ 825.613735] CPU: 1 PID: 116 Comm: kworker/1:2 Tainted: G W 6.1.0-rc6-01399-g941aae326315 #3 [ 825.613759] Hardware name: Raspberry Pi 3 Model B Rev 1.2 (DT) [ 825.613777] Workqueue: events output_poll_execute [drm_kms_helper] [ 825.614038] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 825.614063] pc : drm_modeset_drop_locks+0x60/0x68 [drm] [ 825.614603] lr : drm_helper_probe_detect+0x120/0x1b4 [drm_kms_helper] [ 825.614829] sp : ffff800008313bf0 [ 825.614844] x29: ffff800008313bf0 x28: ffffcd7778b8b000 x27: 0000000000000000 [ 825.614883] x26: 0000000000000001 x25: 0000000000000001 x24: ffff677cc35c2758 [ 825.614920] x23: ffffcd7707d01430 x22: ffffcd7707c3edc7 x21: 0000000000000001 [ 825.614958] x20: 0000000000000000 x19: ffff800008313c10 x18: 000000000000b6d3 [ 825.614995] x17: ffffcd777835e214 x16: ffffcd7777cef870 x15: fffff81000000000 [ 825.615033] x14: 0000000000000000 x13: 0000000000000099 x12: 0000000000000002 [ 825.615070] x11: 72917988020af800 x10: 72917988020af800 x9 : 72917988020af800 [ 825.615108] x8 : ffff677cc665e0a8 x7 : d00a8c180000110c x6 : ffffcd77774c0054 [ 825.615145] x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000 [ 825.615181] x2 : ffff677cc55e1880 x1 : ffffcd7777cef8ec x0 : ffff800008313c10 [ 825.615219] Call trace: [ 825.615232] drm_modeset_drop_locks+0x60/0x68 [drm] [ 825.615773] drm_helper_probe_detect+0x120/0x1b4 [drm_kms_helper] [ 825.616003] output_poll_execute+0xe4/0x224 [drm_kms_helper] [ 825.616233] process_one_work+0x2b4/0x618 [ 825.616264] worker_thread+0x24c/0x464 [ 825.616288] kthread+0xec/0x110 [ 825.616310] ret_from_fork+0x10/0x20 [ 825.616335] irq event stamp: 7634 [ 825.616349] hardirqs last enabled at (7633): [] _raw_spin_unlock_irq+0x3c/0x78 [ 825.616384] hardirqs last disabled at (7634): [] __schedule+0x134/0x9f0 [ 825.616411] softirqs last enabled at (7630): [] local_bh_enable+0x4/0x30 [ipv6] [ 825.617019] softirqs last disabled at (7618): [] local_bh_disable+0x4/0x30 [ipv6] [ 825.617586] ---[ end trace 0000000000000000 ]--- Therefore, deal with the deadlock as suggested by [1], using the function drm_modeset_backoff(). [1] https://docs.kernel.org/gpu/drm-kms.html?highlight=kms#kms-locking Fixes: 6bed2ea3cb38 ("drm/vc4: hdmi: Reset link on hotplug") Reported-by: Stefan Wahren Signed-off-by: Maíra Canal Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20221229194638.178712-1-mcanal@igalia.com commit 18b542e544d3bd00e55d7135ee673b34dbfdb9b9 Author: Tomeu Vizoso Date: Fri Dec 2 12:52:16 2022 +0100 arm64: dts: Add DT node for the VIPNano-QI on the A311D This "NPU" is very similar to the Vivante GPUs and Etnaviv works well with it with just a few small changes. v2: Add reference to RESET_NNA (Neil) v3: Fix indentation (Neil) Signed-off-by: Tomeu Vizoso Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20221202115223.39051-5-tomeu.vizoso@collabora.com [narmstrong: squash patch 8, disable NPU by default and do not enable NPU on vim3 yet] Signed-off-by: Neil Armstrong commit 52b94e479ee83d3ae2c9039dbeae674c690408e9 Merge: ac7f40c28bce2 340ea839b4306 Author: Neil Armstrong Date: Mon Jan 2 11:34:38 2023 +0100 Merge branch 'v6.3/bindings' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into v6.3/arm64-dt Signed-off-by: Neil Armstrong commit 9a217b7e895313a4d42f7a6c48b6237a595945f4 Author: Tomeu Vizoso Date: Fri Dec 2 12:52:15 2022 +0100 soc: amlogic: meson-pwrc: Add NNA power domain for A311D Based on power initialization sequence in downstream driver. Signed-off-by: Tomeu Vizoso Reviewed-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20221202115223.39051-4-tomeu.vizoso@collabora.com Signed-off-by: Neil Armstrong commit b95f1be74baeb847e15e4703cc8148d75ca58500 Merge: 1b929c02afd37 340ea839b4306 Author: Neil Armstrong Date: Mon Jan 2 11:32:43 2023 +0100 Merge branch 'v6.3/bindings' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into HEAD Signed-off-by: Neil Armstrong commit 340ea839b4306335bd627fe0dd6789df803aef58 Author: Tomeu Vizoso Date: Fri Dec 2 12:52:14 2022 +0100 dt-bindings: power: Add G12A NNA power domain Add define for the NNA power domain for the NPU in the G12A. Signed-off-by: Tomeu Vizoso Acked-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20221202115223.39051-3-tomeu.vizoso@collabora.com Signed-off-by: Neil Armstrong commit a439267609f9d57b15991c55550956d7cc5404d8 Author: Tomeu Vizoso Date: Fri Dec 2 12:52:13 2022 +0100 dt-bindings: reset: meson-g12a: Add missing NNA reset Doesn't appear in the TRM I have, but it is used by the downstream galcore driver. Signed-off-by: Tomeu Vizoso Acked-by: Neil Armstrong Acked-by: Philipp Zabel Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20221202115223.39051-2-tomeu.vizoso@collabora.com Signed-off-by: Neil Armstrong commit 77772e607522daa61f3af74df018559db75c43d6 Author: Carlo Caione Date: Mon Dec 19 10:02:38 2022 +0100 drm/tiny: ili9486: Do not assume 8-bit only SPI controllers The pixel data for the ILI9486 is always 16-bits wide and it must be sent over the SPI bus. When the controller is only able to deal with 8-bit transfers, this 16-bits data needs to be swapped before the sending to account for the big endian bus, this is on the contrary not needed when the SPI controller already supports 16-bits transfers. The decision about swapping the pixel data or not is taken in the MIPI DBI code by probing the controller capabilities: if the controller only suppors 8-bit transfers the data is swapped, otherwise it is not. This swapping/non-swapping is relying on the assumption that when the controller does support 16-bit transactions then the data is sent unswapped in 16-bits-per-word over SPI. The problem with the ILI9486 driver is that it is forcing 8-bit transactions also for controllers supporting 16-bits, violating the assumption and corrupting the pixel data. Align the driver to what is done in the MIPI DBI code by adjusting the transfer size to the maximum allowed by the SPI controller. Reviewed-by: Neil Armstrong Signed-off-by: Carlo Caione Reviewed-by: Kamlesh Gurudasani Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20221116-s905x_spi_ili9486-v4-2-f86b4463b9e4@baylibre.com commit e9c7cfe7b71d26ee4a9f17192632f3d0ff246001 Author: Carlo Caione Date: Mon Dec 19 10:02:37 2022 +0100 drm/tiny: ili9486: Enable driver module autoloading SPI devices use the spi_device_id for module autoloading even on systems using device tree. Add the spi_device_id entry to enable autoloading for the 3.5inch RPi Display (rpi-lcd-35 and piscreen). Reviewed-by: Neil Armstrong Signed-off-by: Carlo Caione Reviewed-by: Kamlesh Gurudasani Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20221116-s905x_spi_ili9486-v4-1-f86b4463b9e4@baylibre.com commit ac7f40c28bce2fd1a771e634531ca4b0dd9576f7 Author: Krzysztof Kozlowski Date: Fri Nov 25 15:41:41 2022 +0100 arm64: dts: amlogic: align LED node names with dtschema The node names should be generic and DT schema expects certain pattern: amlogic/meson-sm1-bananapi-m5.dtb: leds: 'blue' does not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20221125144141.477253-1-krzysztof.kozlowski@linaro.org Signed-off-by: Neil Armstrong commit efccf602b37fc1064214e6b5fdfa9e77879a9bca Author: Krzysztof Kozlowski Date: Fri Nov 25 15:41:20 2022 +0100 ARM: dts: meson: align LED node names with dtschema The node names should be generic and DT schema expects certain pattern: meson8-minix-neo-x8.dtb: gpio-leds: 'blue' does not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20221125144120.476933-1-krzysztof.kozlowski@linaro.org Signed-off-by: Neil Armstrong commit 0d8eae7b124e2ddaee00f186fe922450faad0ed7 Merge: be3ad78dfed2a 1b929c02afd37 Author: Jani Nikula Date: Mon Jan 2 11:31:03 2023 +0200 Merge drm/drm-next into drm-intel-next Sync up with v6.2-rc1. Signed-off-by: Jani Nikula commit 35e3c36d438e05fcd4f846c76cf22cbda9b63abb Author: Gou Hao Date: Sun Dec 18 20:31:27 2022 +0800 mm/slab: remove unused slab_early_init 'slab_early_init' was introduced by 'commit e0a42726794f ("[PATCH] mm/slab.c: fix early init assumption")', this flag was used to prevent off-slab caches being created so early during bootup. The only user of 'slab_early_init' was removed in 'commit 3217fd9bdf00 ("mm/slab: make criteria for off slab determination robust and simple")'. Signed-off-by: Gou Hao Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: David Rientjes Signed-off-by: Vlastimil Babka commit a441f3b90a340e5c94df36c33fb7000193ee0aa7 Author: ye xingchen Date: Tue Dec 6 11:16:08 2022 +0800 power: supply: use sysfs_emit() instead of sprintf() for sysfs show() As documented in Documentation/filesystems/sysfs.rst the sysfs show() function should use sysfs_emit() or sysfs_emit_at() to format the userspace return value. This replaces all sysfs related instances of sprintf() with sysfs_emit() in the power-supply subsystem. Signed-off-by: ye xingchen [Drop sysfs_emit changes done for code not related to sysfs show and reword commit message] Signed-off-by: Sebastian Reichel commit 35aa06286c0927a8444d851d6a1f2603e3dc9229 Author: ye xingchen Date: Tue Dec 6 11:14:08 2022 +0800 power: supply: use sysfs_emit() instead of scnprintf() for sysfs show() As documented in Documentation/filesystems/sysfs.rst the sysfs show() function should use sysfs_emit() or sysfs_emit_at() to format the userspace return value. This replaces all instances of scnprintf() with sysfs_emit() in the power-supply subsystem. Signed-off-by: ye xingchen [reword commit message] Signed-off-by: Sebastian Reichel commit 86f66569baca98478b7ff2f49c8ee54cf3b108cd Author: Eric Biggers Date: Wed Dec 14 22:04:20 2022 -0800 fsverity: remove debug messages and CONFIG_FS_VERITY_DEBUG I've gotten very little use out of these debug messages, and I'm not aware of anyone else having used them. Indeed, sprinkling pr_debug around is not really a best practice these days, especially for filesystem code. Tracepoints are used instead. Let's just remove these and start from a clean slate. This change does not affect info, warning, and error messages. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20221215060420.60692-1-ebiggers@kernel.org commit 72ea15f0ddd29b9facdab836a2f5d3e28df9b202 Author: Eric Biggers Date: Wed Dec 14 14:43:04 2022 -0800 fsverity: pass pos and size to ->write_merkle_tree_block fsverity_operations::write_merkle_tree_block is passed the index of the block to write and the log base 2 of the block size. However, all implementations of it use these parameters only to calculate the position and the size of the block, in bytes. Therefore, make ->write_merkle_tree_block take 'pos' and 'size' parameters instead of 'index' and 'log_blocksize'. Suggested-by: Dave Chinner Signed-off-by: Eric Biggers Acked-by: Dave Chinner Link: https://lore.kernel.org/r/20221214224304.145712-5-ebiggers@kernel.org commit 9642946c6c851ba954689f184b3370e3594b6b1a Author: Eric Biggers Date: Wed Dec 14 14:43:03 2022 -0800 fsverity: optimize fsverity_cleanup_inode() on non-verity files Make fsverity_cleanup_inode() an inline function that checks for non-NULL ->i_verity_info, then (if needed) calls __fsverity_cleanup_inode() to do the real work. This reduces the overhead on non-verity files. Signed-off-by: Eric Biggers Acked-by: Dave Chinner Link: https://lore.kernel.org/r/20221214224304.145712-4-ebiggers@kernel.org commit 01d90c07a592b532c7a673dfd8baa6d6e496273d Author: Eric Biggers Date: Wed Dec 14 14:43:02 2022 -0800 fsverity: optimize fsverity_prepare_setattr() on non-verity files Make fsverity_prepare_setattr() an inline function that does the IS_VERITY() check, then (if needed) calls __fsverity_prepare_setattr() to do the real work. This reduces the overhead on non-verity files. Signed-off-by: Eric Biggers Acked-by: Dave Chinner Link: https://lore.kernel.org/r/20221214224304.145712-3-ebiggers@kernel.org commit a6528a960b78715d4c3d2c9cda85714b15a0faa4 Author: Eric Biggers Date: Wed Dec 14 14:43:01 2022 -0800 fsverity: optimize fsverity_file_open() on non-verity files Make fsverity_file_open() an inline function that does the IS_VERITY() check, then (if needed) calls __fsverity_file_open() to do the real work. This reduces the overhead on non-verity files. Signed-off-by: Eric Biggers Acked-by: Dave Chinner Link: https://lore.kernel.org/r/20221214224304.145712-2-ebiggers@kernel.org commit 3c047887243c72e7835a17e90361ed19e8354bf5 Author: Deepak R Varma Date: Thu Dec 22 23:27:03 2022 +0530 soc: imx: imx93-src: No need to set device_driver owner There is no need to exclusively set the .owner member of the struct device_driver when defining the platform_driver struct. The Linux core takes care of setting the .owner member as part of the call to module_platform_driver() helper function. Issue identified using the platform_no_drv_owner.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma Signed-off-by: Shawn Guo commit 083dab5e69f3dc9a3c85b2d690ff91cfed57e926 Author: Deepak R Varma Date: Thu Dec 22 23:23:16 2022 +0530 soc: imx: imx93-pd: No need to set device_driver owner There is no need to exclusively set the .owner member of the struct device_driver when defining the platform_driver struct. The Linux core takes care of setting the .owner member as part of the call to module_platform_driver() helper function. Issue identified using the platform_no_drv_owner.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma Signed-off-by: Shawn Guo commit 06a9a229b1592abeb10728c8564492f0729f4b83 Author: Lucas Stach Date: Tue Dec 20 18:53:53 2022 +0100 soc: imx: imx8m-blk-ctrl: set LCDIF panic read hurry level When the LCDIF block signals a panic condition due to the display FIFO falling below the threshold, the priority at the NoC level is boosted to the value set in the LCDIF_ARCACHE_CTRL register of i.MX8MP mediamix blk-ctrl. Same as all other blk-ctrl registers this register is reset when the domain is powered down. Initialize the panic hurry levels for both LCIF interfaces to the maximium priority (same as downstream TF-A and proven to work with the other priorities set in the interconnect driver) when coming back from power down. Signed-off-by: Lucas Stach Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit e9b751ca254458afc379138160aa4a498bae6063 Author: Marek Vasut Date: Tue Dec 20 15:56:38 2022 +0100 arm64: dts: imx8mp: Add Hantro G1, G2 DT nodes Add DT nodes for the Hantro VPU found in i.MX8MP SoC. Reviewed-by: Laurent Pinchart Signed-off-by: Marek Vasut Tested-by: Adam Ford Signed-off-by: Shawn Guo commit 9424e7f0640551f1b13bc71616c163881cc2d5e5 Author: Adam Ford Date: Sun Dec 18 11:05:44 2022 -0600 arm64: dts: imx8mp: Enable spba-bus on AIPS3 There is an SPBA bus on AIPS3 which includes ecspi1-3, UART1-3, and Flexcan1-2 according to the TRM. Signed-off-by: Adam Ford Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit 3d6e48e87b32e9d46d5983e45315a2231e3b667b Author: Marek Vasut Date: Sat Dec 17 02:08:55 2022 +0100 arm64: dts: imx8mn: Drop dma-apb interrupt-names Drop "interrupt-names" property, since it is broken. The drivers/dma/mxs-dma.c in Linux kernel does not use it, the property contains duplicate array entries in existing DTs, and even malformed entries (gmpi, should have been gpmi). Get rid of that optional property altogether. Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit ed445e486e6fee4a29203a9f02be4ddf9762d22a Author: Marek Vasut Date: Sat Dec 17 02:08:54 2022 +0100 arm64: dts: imx8mm: Drop dma-apb interrupt-names Drop "interrupt-names" property, since it is broken. The drivers/dma/mxs-dma.c in Linux kernel does not use it, the property contains duplicate array entries in existing DTs, and even malformed entries (gmpi, should have been gpmi). Get rid of that optional property altogether. Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit 9928f0a9e7c0cee3360ca1442b4001d34ad67556 Author: Marek Vasut Date: Sat Dec 17 02:08:53 2022 +0100 ARM: dts: imx7s: Drop dma-apb interrupt-names Drop "interrupt-names" property, since it is broken. The drivers/dma/mxs-dma.c in Linux kernel does not use it, the property contains duplicate array entries in existing DTs, and even malformed entries (gmpi, should have been gpmi). Get rid of that optional property altogether. Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit f97f635395ae760ba9825e649a47ed7db23ff232 Author: Marek Vasut Date: Sat Dec 17 02:08:52 2022 +0100 ARM: dts: imx6ul: Drop dma-apb interrupt-names Drop "interrupt-names" property, since it is broken. The drivers/dma/mxs-dma.c in Linux kernel does not use it, the property contains duplicate array entries in existing DTs, and even malformed entries (gmpi, should have been gpmi). Get rid of that optional property altogether. Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit 16d194d200cd46c756a8fdc1f212940bc7781990 Author: Marek Vasut Date: Sat Dec 17 02:08:51 2022 +0100 ARM: dts: imx6sx: Drop dma-apb interrupt-names Drop "interrupt-names" property, since it is broken. The drivers/dma/mxs-dma.c in Linux kernel does not use it, the property contains duplicate array entries in existing DTs, and even malformed entries (gmpi, should have been gpmi). Get rid of that optional property altogether. Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit 5dd1cf3a772421f688383b00dfaa927275aef682 Author: Marek Vasut Date: Sat Dec 17 02:08:50 2022 +0100 ARM: dts: imx6qdl: Drop dma-apb interrupt-names Drop "interrupt-names" property, since it is broken. The drivers/dma/mxs-dma.c in Linux kernel does not use it, the property contains duplicate array entries in existing DTs, and even malformed entries (gmpi, should have been gpmi). Get rid of that optional property altogether. Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit b0bb79339aa02933be07aaec150031776402f5f9 Author: Marek Vasut Date: Sat Dec 17 02:08:49 2022 +0100 ARM: dts: mxs: Drop dma-apb interrupt-names Drop "interrupt-names" property, since it is broken. The drivers/dma/mxs-dma.c in Linux kernel does not use it, the property contains duplicate array entries in existing DTs, and even malformed entries (gmpi, should have been gpmi). Get rid of that optional property altogether. Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit 2314515e9c14341b520e60c5dce4a70e528b7ef5 Author: Marek Vasut Date: Fri Dec 16 22:01:50 2022 +0100 arm64: dts: imx8mm: Update i.MX8M Mini Toradex Verdin based Menlo board compatible string Update the board compatible string such that it matches the YAML DT schema for validation, add the "toradex,verdin-imx8mm-nonwifi" entry. Signed-off-by: Marek Vasut Reviewed-by: Francesco Dolcini Signed-off-by: Shawn Guo commit 07a42c1480ef460fbd2f5b810802be6ce261a85b Author: Lucas Stach Date: Fri Dec 16 21:08:21 2022 +0100 arm64: dts: imx8mp: add clock-cells to hsio-blk-ctrl The HSIO blk-ctrl exposes the high performance PLL as a simple clock. Signed-off-by: Lucas Stach Tested-by: Marcel Ziswiler Tested-by: Lukas F. Hartmann Signed-off-by: Shawn Guo commit 2cbee26e5d592da942a995ddee78ea3eb97ad2fa Author: Lucas Stach Date: Fri Dec 16 21:08:20 2022 +0100 soc: imx: imx8mp-blk-ctrl: expose high performance PLL clock Expose the high performance PLL as a regular Linux clock, so the PCIe PHY can use it when there is no external refclock provided. Signed-off-by: Lucas Stach Tested-by: Marcel Ziswiler Tested-by: Lukas F. Hartmann Signed-off-by: Shawn Guo commit f4b3948e5a90f49b33e89b019d3c641ab9a6fc59 Author: Lucas Stach Date: Fri Dec 16 21:08:19 2022 +0100 soc: imx: imx8mp-blk-ctrl: add instance specific probe function Allow the specific blk-ctrl instance to define a function, which will be called during probe to provide device specific extensions. Signed-off-by: Lucas Stach Tested-by: Marcel Ziswiler Tested-by: Lukas F. Hartmann Signed-off-by: Shawn Guo commit 9d3975f27e12c89327fbac84c3d8552ecdb72a35 Author: Lucas Stach Date: Fri Dec 16 21:08:18 2022 +0100 soc: imx: add Kconfig symbols for blk-ctrl drivers Currently the dependencies of the blk-ctrl drivers are not fully described in Kconfig, which can trip over the compile tests on platforms where those drivers are not usually enabled. Add a non user-selectable symbol to be describe those dependencies. Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo commit ba70e1733238b3d4b53a5f030db629d3331110ec Author: Lucas Stach Date: Fri Dec 16 21:08:17 2022 +0100 dt-bindings: soc: imx8mp-hsio-blk-ctrl: add clock cells The HSIO blk-ctrl has a internal PLL, which can be used as a reference clock for the PCIe PHY. Add clock-cells to the binding to allow the driver to expose this PLL. Signed-off-by: Lucas Stach Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit fae3bcc34a993dc204611c2f7211213e920e2fdc Author: Lucas Stach Date: Fri Dec 16 20:59:32 2022 +0100 arm64: dts: imx8mp: move PCIe controller clock config to SoC dtsi The only difference in PCIe clock configuration between boards is how the PCIe reference clock is generated. The refclock configuration is fully contained in the PCIe PHY node, so the PCIe controller clocks can be set up in the SoC dtsi, as there is no reason for any board to use a different configuration. Signed-off-by: Lucas Stach Reviewed-by: Richard Zhu Signed-off-by: Shawn Guo commit 0deefb5bd1382aae0aed7c8b266d5088a5308a26 Author: Wei Fang Date: Fri Dec 16 09:14:34 2022 +0800 arm64: dts: imx8dxl-evk: Disable hibernation mode of AR8031 for EQOS The hibernation mode of AR8031 PHY defaults to be enabled after hardware reset. When the cable is unplugged, the PHY will enter hibernation mode after about 10 senconds and the PHY clocks will be stopped to save power. However, due to the design of EQOS, the mac needs the RX_CLK of PHY for software reset to complete. Otherwise the software reset of EQOS will be failed and do not work correctly. The only way is to disable hibernation mode of AR8031 PHY for EQOS, the "qca,disable-hibernation-mode" property is used for this purpose and has already been submitted to the upstream, for more details please refer to the below link: https://lore.kernel.org/netdev/20220818030054.1010660-2-wei.fang@nxp.com/ This issue is easy to reproduce, just unplug the cable and "ifconfig eth0 down", after about 10 senconds, then "ifconfig eth0 up", you will see failure log on the serial port. The log is shown as following: root@imx8dxlevk:~# [34.941970] imx-dwmac 5b050000.ethernet eth0: Link is Down root@imx8dxlevk:~# ifconfig eth0 down [35.437814] imx-dwmac 5b050000.ethernet eth0: FPE workqueue stop [35.507913] imx-dwmac 5b050000.ethernet eth0: PHY [stmmac-1:00] driver [Qualcomm Atheros AR8031/AR8033] (irq=POLL) [35.518613] imx-dwmac 5b050000.ethernet eth0: configuring for phy/rgmii-id link mode root@imx8dxlevk:~# ifconfig eth0 up [71.143044] imx-dwmac 5b050000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0 [71.215855] imx-dwmac 5b050000.ethernet eth0: PHY [stmmac-1:00] driver [Qualcomm Atheros AR8031/AR8033] (irq=POLL) [72.230417] imx-dwmac 5b050000.ethernet: Failed to reset the dma [72.236512] imx-dwmac 5b050000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed [72.245258] imx-dwmac 5b050000.ethernet eth0: __stmmac_open: Hw setup failed SIOCSIFFLAGS: Connection timed out After applying this patch, the software reset of EQOS will be successful. And the log is shown as below. root@imx8dxlevk:~# ifconfig eth0 up [96.114344] imx-dwmac 5b050000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0 [96.171466] imx-dwmac 5b050000.ethernet eth0: PHY [stmmac-1:00] driver [Qualcomm Atheros AR8031/AR8033] (irq=POLL) [96.188883] imx-dwmac 5b050000.ethernet eth0: No Safety Features support found [96.196221] imx-dwmac 5b050000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported [96.204846] imx-dwmac 5b050000.ethernet eth0: registered PTP clock [96.225558] imx-dwmac 5b050000.ethernet eth0: FPE workqueue start [96.236858] imx-dwmac 5b050000.ethernet eth0: configuring for phy/rgmii-id link mode [96.249358] 8021q: adding VLAN 0 to HW filter on device eth0 Signed-off-by: Wei Fang Reviewed-by: Clark Wang Signed-off-by: Shawn Guo commit 4ac665df17696ab8f2453dd1cedc195774277ed7 Author: Nikolaus Voss Date: Wed Nov 2 15:27:19 2022 +0100 ARM: dts: imx6qdl: use MAC-address from nvmem IMX6QDL has fuse locations specified for storing the MAC for the built-in ethernet (Table 5-8 in Reference Manual). Define the fuse location in ocotp and refer to them in fec-ethernet. If the cells are not flashed, the driver behavior is unchanged, i.e. other MAC sources will be probed and a random MAC will be used as a last resort. Signed-off-by: Nikolaus Voss Signed-off-by: Shawn Guo commit e7e99f19b7f7a1b1b3bccec6208f329ba7beffd4 Author: Marek Vasut Date: Fri Dec 16 00:58:27 2022 +0100 arm64: dts: imx8mn: Add LDO5 regulator-name to Variscite VAR-SOM-MX8MN The PMIC on this Variscite SOM and its MX8MM variant lists regulator-name for all LDOs except this LDO5, add the regulator-name property to avoid this omission. Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit fd44be72cc0039729d615e6d47a5a5e47e4b5398 Author: Marek Vasut Date: Fri Dec 16 00:58:26 2022 +0100 arm64: dts: imx8mn: Drop deprecated regulator-compatible from Variscite VAR-SOM-MX8MN The "regulator-compatible" property is deprecated and unused, as the match happens on the node name in Linux of_regulator_match() in case the property is not present. Drop the deprecated property from DT. Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit 9a53e97832c89f054e049407cb6b0f9c351e8923 Author: Marek Vasut Date: Fri Dec 16 00:58:25 2022 +0100 arm64: dts: imx8mm: Drop deprecated regulator-compatible from Variscite VAR-SOM-MX8MM The "regulator-compatible" property is deprecated and unused, as the match happens on the node name in Linux of_regulator_match() in case the property is not present. Drop the deprecated property from DT. Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit db9dd598b472181fa310a7ab1e2e2c98f8147e10 Author: Marek Vasut Date: Fri Dec 16 00:57:09 2022 +0100 arm64: dts: imx8mp: Drop deprecated regulator-compatible from i.MX8M Plus DHCOM The "regulator-compatible" property is deprecated and unused, as the match happens on the node name in Linux of_regulator_match() in case the property is not present. Drop the deprecated property from DT. Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit acc985b8c585ef6580fdef5bbb6d5ad350fd2c7a Author: Vladimir Oltean Date: Thu Dec 15 15:56:36 2022 +0200 arm64: dts: ls1088a: declare cache-coherent page table walk feature for IOMMU The SMMUv2 driver for MMU-500 reads the ARM_SMMU_GR0_ID0 register at probe time and tries to determine based on the CTTW (Coherent Translation Table Walk) bit whether this feature is supported. Unfortunately, it looks like the SMMU integration in the NXP LS1088A has wrongly tied the cfg_cttw signal to 0, even though the SoC documentation specifies that "The SMMU supports cache coherency for page table walks and DVM transactions for page table cache maintenance operations." Device tree provides the option of overriding the ID register via the dma-coherent property since commit bae2c2d421cd ("iommu/arm-smmu: Sort out coherency"), and that's what we do here. Telling struct io_pgtable_cfg that the SMMU page table walks are coherent with the CPU caches brings performance benefits, because it avoids certain operations such as __arm_lpae_sync_pte() for PTE updates. Link: https://lore.kernel.org/linux-iommu/3f3112e4-65ff-105d-8cd7-60495ec9054a@arm.com/ Suggested-by: Robin Murphy Signed-off-by: Vladimir Oltean Signed-off-by: Shawn Guo commit 8720913f8402e55a0b4da4bfc528c320925760d7 Author: Vladimir Oltean Date: Thu Dec 15 15:56:35 2022 +0200 arm64: dts: ls1028a: declare cache-coherent page table walk feature for IOMMU The SMMUv2 driver for MMU-500 reads the ARM_SMMU_GR0_ID0 register at probe time and tries to determine based on the CTTW (Coherent Translation Table Walk) bit whether this feature is supported. Unfortunately, it looks like the SMMU integration in the NXP LS1028A has wrongly tied the cfg_cttw signal to 0, even though the SoC documentation specifies that "The SMMU supports cache coherency for page table walks and DVM transactions for page table cache maintenance operations." Device tree provides the option of overriding the ID register via the dma-coherent property since commit bae2c2d421cd ("iommu/arm-smmu: Sort out coherency"), and that's what we do here. Telling struct io_pgtable_cfg that the SMMU page table walks are coherent with the CPU caches brings performance benefits, because it avoids certain operations such as __arm_lpae_sync_pte() for PTE updates. Link: https://lore.kernel.org/linux-iommu/3f3112e4-65ff-105d-8cd7-60495ec9054a@arm.com/ Suggested-by: Robin Murphy Signed-off-by: Vladimir Oltean Signed-off-by: Shawn Guo commit a5c75aa3a1538fdb5a8c6e56db20da2d1ab69d62 Author: Giulio Benetti Date: Wed Dec 14 17:38:17 2022 +0100 ARM: dts: imxrt1050: increase mmc max-frequency property According to i.MXRT1050 Datasheet usdhc supports up to 200Mhz clock so let's increase max-frequency property to 200Mhz. Signed-off-by: Giulio Benetti Acked-by: Jesse Taube Signed-off-by: Shawn Guo commit c86d350aae68e0e3c81d49454953a844c194deff Author: Daniel Scally Date: Tue Dec 13 15:20:24 2022 +0000 arm64: dts: Add device tree for the Debix Model A Board Add a device tree file describing the Debix Model A board from Polyhex Technology Co. Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart Tested-by: Kieran Bingham Signed-off-by: Daniel Scally Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit 2da3647e2363d4eaaf9bd57da5c3bdc7b6d44f4a Author: Daniel Scally Date: Tue Dec 13 15:20:23 2022 +0000 dt-bindings: arm: fsl: Enumerate Debix Model A Board Add entries to the list of imx8mp boards denoting the Debix Model A board from Polyhex Technology Co, along with a more generic entry that can be used where both the Model A and Model B are supported. Acked-by: Krzysztof Kozlowski Reviewed-by: Kieran Bingham Tested-by: Laurent Pinchart Signed-off-by: Daniel Scally Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit fdcf9d910a5fdbb468017d1b418a1f2d51901e79 Author: Daniel Scally Date: Tue Dec 13 15:20:22 2022 +0000 dt-bindings: vendor-prefixes: Add Polyhex Technology Co. Add an entry for Polyhex Technology Co. to vendor-prefixes.yaml Acked-by: Krzysztof Kozlowski Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Tested-by: Laurent Pinchart Signed-off-by: Daniel Scally Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit 3f9a20e6fd5bf9c2fc7cd7be03aebfbf0a86334a Author: Krzysztof Kozlowski Date: Sat Dec 10 12:33:45 2022 +0100 arm64: dts: imx8dxl: drop 0x from unit address By coding style, unit address should not start with 0x. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 105b9bb84f4936a5998fcd403a4439e65a84436b Author: Marek Vasut Date: Fri Dec 2 17:23:52 2022 +0100 arm64: dts: imx8m: Add TMU phandle to calibration data in OCOTP The TMU TASR, TCALIVn, TRIM registers must be explicitly programmed with calibration values in OCOTP. Add the OCOTP calibration values phandle so the TMU driver can perform this programming. The MX8MM/MX8MN TMUv1 uses only one OCOTP cell, while MX8MP TMUv2 uses 4. Reviewed-by: Peng Fan Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit 5b81a87ddd56ebdcdc7bf5430bc33872168c36f4 Author: Marek Vasut Date: Fri Dec 2 17:23:51 2022 +0100 arm64: dts: imx8m: Document the fuse address calculation The mapping from OCOTP reg DT property to Fusemap Descriptions Table in the datasheet is often unclear. Add a comment to make it easier to find out how it works. No functional change. Reviewed-by: Peng Fan Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit ee0d68f219be8618f53d3f8808952e20525e3f30 Author: Marek Vasut Date: Fri Dec 2 17:23:50 2022 +0100 arm64: dts: imx8m: Align SoC unique ID node unit address Align the SoC unique ID DT node unit address with its reg property. Reviewed-by: Peng Fan Fixes: cbff23797fa1 ("arm64: dts: imx8m: add NVMEM provider and consumer to read soc unique ID") Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit 32a75cb57794c592f19d466ce10af6a35c1b5428 Author: Martin Kepplinger Date: Wed Nov 30 12:31:24 2022 +0100 arm64: dts: imx8mq-librem5: use multicolor leds description for RGB led As Documentation/leds/well-known-leds.txt says, "Phones usually have multi-color status LED." Fix that for the Librem 5 mobile phone board. Signed-off-by: Martin Kepplinger Signed-off-by: Shawn Guo commit ac9e22f446e4a01caebf6470e35b75191ae9f9b1 Author: Frieder Schrempf Date: Wed Nov 30 12:13:49 2022 +0100 arm64: dts: imx8mm-kontron: Add RTC aliases Add aliases for the RTCs on the board and on the SoC. This ensures that the primary RTC is always the one on the board that has a buffered supply and maximum accuracy. Signed-off-by: Frieder Schrempf Signed-off-by: Shawn Guo commit 1eea795b57a5be30037b212a08873a8057edc813 Author: Stefan Eichenberger Date: Tue Nov 29 15:09:35 2022 +0100 arm64: dts: imx8mm-verdin: enable hpd on hdmi-connector Add hot plug detect gpio to the HDMI connector. Signed-off-by: Stefan Eichenberger Signed-off-by: Francesco Dolcini Signed-off-by: Shawn Guo commit c585dde3c76569341681e265e28cbb75c64fd140 Author: Krzysztof Kozlowski Date: Fri Nov 25 15:42:23 2022 +0100 ARM: dts: vf610: align LED node names with dtschema The node names should be generic and DT schema expects certain pattern. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 4b0d1f2738899dbcc7a026d826373530019aa31b Author: Krzysztof Kozlowski Date: Fri Nov 25 15:42:22 2022 +0100 ARM: dts: imx: align LED node names with dtschema The node names should be generic and DT schema expects certain pattern: imx50-kobo-aura.dtb: gpio-leds: 'on' does not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' imx6dl-yapp4-draco.dtb: led-controller@30: 'chan@0', 'chan@1', 'chan@2' do not match any of the regexes: '^led@[0-8]$', '^multi-led@[0-8]$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit ad21452627dfcac3bf75e83d79194890f6b4982e Author: Krzysztof Kozlowski Date: Fri Nov 25 15:42:21 2022 +0100 arm64: dts: imx: align LED node names with dtschema The node names should be generic and DT schema expects certain pattern: freescale/imx8mm-emcon-avari.dtb: leds: 'green', 'red' do not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 4763009eb10de0c17929322c2e54c6632dfc0280 Author: Philippe Schenker Date: Tue Nov 22 16:54:38 2022 +0100 arm64: dts: verdin-imx8mm: Disable usb over-current Disable usb over-current of the chipidea driver on all Carrier-Boards used by Toradex. Do this as we don't want to use this functionality on our Carrier Boards and to leave it open to someone who includes our module-level device-trees. Remove the now obsolete disable-over-current flag from module-level device-tree imx8mm-verdin.dtsi and leave it as already mentioned to the people actually implementing the carrier-board to implement this. This will prevent the warning "No over current polarity defined" from being printed on boot. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit 91ccc78165c262cdb36dfb5cc4b68d989f8f7f94 Author: Philippe Schenker Date: Tue Nov 22 16:54:37 2022 +0100 ARM: dts: colibri-imx7: Disable usb over-current Disable usb over-current of the chipidea driver on all Carrier-Boards used by Toradex. Do this as we don't want to use this functionality on our Carrier Boards and to leave it open to someone who includes our module-level device-trees. This will prevent the warning "No over current polarity defined" from being printed on boot. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit 1abf12f84d873f474a2d560e747cde16959b42d6 Author: Philippe Schenker Date: Tue Nov 22 16:54:36 2022 +0100 ARM: dts: colibri-imx6ull: Disable usb over-current Disable usb over-current of the chipidea driver on all Carrier-Boards used by Toradex. Do this as we don't want to use this functionality on our Carrier Boards and to leave it open to someone who includes our module-level device-trees. This will prevent the warning "No over current polarity defined" from being printed on boot. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit 500cd5b741781906a5d62073bf59c3ab2f2ff3b9 Author: Philippe Schenker Date: Tue Nov 22 16:54:35 2022 +0100 ARM: dts: colibri-imx6: Disable usb over-current Disable usb over-current of the chipidea driver on all Carrier-Boards used by Toradex. Do this as we don't want to use this functionality on our Carrier Boards and to leave it open to someone who includes our module-level device-trees. Remove the now obsolete disable-over-current flag from module-level device-tree imx6qdl-colibri.dtsi and leave it as already mentioned to the people actually implementing the carrier-board to implement this. This will prevent the warning "No over current polarity defined" from being printed on boot. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit 242daa52594e5f0605338cab1718fa609e36ab13 Author: Philippe Schenker Date: Tue Nov 22 16:54:34 2022 +0100 ARM: dts: apalis-imx6: Disable usb over-current Disable usb over-current of the chipidea driver on all Carrier-Boards used by Toradex. Do this as we don't want to use this functionality on our Carrier Boards and to leave it open to someone who includes our module-level device-trees. Remove the now obsolete disable-over-current flag from module-level device-tree imx6qdl-apalis.dtsi and leave it as already mentioned to the people actually implementing the carrier-board to implement this. This will prevent the warning "No over current polarity defined" from being printed on boot. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit b579e901752ab553b7d12b1032d5b8aa929d1380 Author: Haibo Chen Date: Tue Nov 22 19:32:32 2022 +0800 arm64: dts: imx93: add flexcan nodes Add flexcan1 and flexcan2 nodes. Signed-off-by: Haibo Chen Signed-off-by: Shawn Guo commit cd556e1e950cea8e4fba88facf24288099925e7b Author: Minghao Chi Date: Tue Nov 22 09:40:52 2022 +0800 bus: imx-weim: 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 Signed-off-by: ye xingchen Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit 63e1654d82f3462ff322d71504f3192f2c8636a0 Author: Fabio Estevam Date: Fri Nov 18 10:20:16 2022 -0300 ARM: dts: imx51: Fix sram.yaml warnings Add ranges, #address-cells and #size-cells properties to the sram node to fix the following warnings when checking sram.yaml: make dtbs_check DT_SCHEMA_FILES=sram.yaml ... arch/arm/boot/dts/imx51-apf51.dtb: sram@1ffe0000: '#address-cells' is a required property From schema: Documentation/devicetree/bindings/sram/sram.yaml arch/arm/boot/dts/imx51-apf51.dtb: sram@1ffe0000: '#size-cells' is a required property From schema: Documentation/devicetree/bindings/sram/sram.yaml arch/arm/boot/dts/imx51-apf51.dtb: sram@1ffe0000: 'ranges' is a required property From schema: Documentation/devicetree/bindings/sram/sram.yaml Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 2ffa24e42317f080e86ea92dc81d26b99fcca611 Author: Fabio Estevam Date: Fri Nov 18 10:20:15 2022 -0300 ARM: dts: imx53: Fix sram.yaml warnings Add ranges, #address-cells and #size-cells properties to the sram node to fix the following warnings when checking sram.yaml: make dtbs_check DT_SCHEMA_FILES=sram.yaml ... DTC_CHK arch/arm/boot/dts/imx53-qsb.dtb arch/arm/boot/dts/imx53-qsb.dtb: sram@f8000000: '#address-cells' is a required property From schema: Documentation/devicetree/bindings/sram/sram.yaml /home/fabio/linux-next/arch/arm/boot/dts/imx53-qsb.dtb: sram@f8000000: '#size-cells' is a required property From schema: Documentation/devicetree/bindings/sram/sram.yaml /home/fabio/linux-next/arch/arm/boot/dts/imx53-qsb.dtb: sram@f8000000: 'ranges' is a required property From schema: Documentation/devicetree/bindings/sram/sram.yaml Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 7e45f80955748c16aa2d78498394ab92a4a90896 Merge: a9763aa0bda18 1b929c02afd37 Author: Andrew Morton Date: Fri Dec 30 15:38:16 2022 -0800 Merge branch 'master' into mm-nonmm-stable commit a7383cfbda1d4eddf1d1be554d6b21bda8fa456e Merge: 71f6861cbf453 1b929c02afd37 Author: Andrew Morton Date: Fri Dec 30 15:38:06 2022 -0800 Merge branch 'master' into mm-stable commit 2d95c6deb64dfb1496bd202aaffdbdb4b420a196 Merge: 4a5bd1a928a22 16ed9d312b421 Author: Martin K. Petersen Date: Fri Dec 30 21:48:47 2022 +0000 Merge patch series "scsi: ufs: core: Always read the descriptors with max length" Arthur Simchaev says: Read any descriptor with a maximum size of QUERY_DESC_MAX_SIZE. According to the spec the device returns the actual size. Thus can improve code readability and save CPU cycles. While at it, clean up few leftovers around the descriptor size parameter. Link: https://lore.kernel.org/r/1670763911-8695-1-git-send-email-Arthur.Simchaev@wdc.com Signed-off-by: Martin K. Petersen commit 16ed9d312b42180242476d159dd2fab05129029a Author: Arthur Simchaev Date: Sun Dec 11 15:05:11 2022 +0200 scsi: ufs: core: Remove ufshcd_map_desc_id_to_length() There shouldn't be any restriction of the descriptor size (not the descriptor id for that matter) up to QUERY_DESC_MAX_SIZE. According to the spec, the caller can use any descriptor size, and it is up to the device to return the actual size. Therefore there shouldn't be any sizes hardcoded in the kernel, nor any need to cache it, hence the ufshcd_map_desc_id_to_length() function is redundant. Always read the descriptors with QUERY_DESC_MAX_SIZE size. Reviewed-by: Bart Van Assche Reviewed-by: Bean Huo Suggested-by: Bean Huo Signed-off-by: Arthur Simchaev Signed-off-by: Martin K. Petersen commit 01a0d515b7d93f6f5259c0333e48ac0ed8f0aa92 Author: Arthur Simchaev Date: Sun Dec 11 15:05:10 2022 +0200 scsi: ufs: core: Remove len parameter from ufshcd_set_active_icc_lvl() len argument is not used anymore in ufshcd_set_active_icc_lvl() function. Signed-off-by: Arthur Simchaev Reviewed-by: Bart Van Assche Reviewed-by: Bean Huo Signed-off-by: Martin K. Petersen commit f2a89b071b26b79abbe892ce88c4d674d1f21f63 Author: Arthur Simchaev Date: Sun Dec 11 15:05:09 2022 +0200 scsi: ufs: core: Remove redundant desc_size variable from hba Always read the descriptor with QUERY_DESC_MAX_SIZE. According to the spec, the device returns the actual size. Signed-off-by: Arthur Simchaev Reviewed-by: Bean Huo Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 358ae02f47783c1d2a8033e50563ea1a9d176c15 Author: Arthur Simchaev Date: Sun Dec 11 15:05:08 2022 +0200 scsi: ufs: core: Remove redundant wb check We used to use the extended-feature field in the device descriptor as an indication that the device supported UFS 2.2 or later. Remove that as this check is specifically done few lines above. Signed-off-by: Arthur Simchaev Reviewed-by: Bart Van Assche Reviewed-by: Bean Huo Reviewed-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 4a5bd1a928a22c20f77821d0bd9c80849827e292 Merge: 9a3a5a8556e51 ada1e653a5eae Author: Martin K. Petersen Date: Fri Dec 30 21:21:53 2022 +0000 Merge patch series "Prepare for upstreaming Pixel 6 and 7 UFS support" Bart Van Assche says: The patches in this series are a first step towards integrating support in the upstream kernel for the UFS controller in the Pixel 6 and 7. [mkp: resolve conflict with RPMB series] Link: https://lore.kernel.org/r/20221208234358.252031-1-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit ada1e653a5eae7361d95781ed812caa0c8e07dbb Author: Eric Biggers Date: Thu Dec 8 15:43:58 2022 -0800 scsi: ufs: core: Allow UFS host drivers to override the sg entry size Modify the UFSHCD core to allow 'struct ufshcd_sg_entry' to be variable-length. The default is the standard length, but variants can override ufs_hba::sg_entry_size with a larger value if there are vendor-specific fields following the standard ones. This is needed to support inline encryption with ufs-exynos (FMP). Cc: Eric Biggers Reviewed-by: Avri Altman Signed-off-by: Eric Biggers [ bvanassche: edited commit message and introduced CONFIG_SCSI_UFS_VARIABLE_SG_ENTRY_SIZE ] Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit b434ecfb73ee84fbc5996d0784a4436e75b8d0fe Author: Bart Van Assche Date: Thu Dec 8 15:43:57 2022 -0800 scsi: ufs: core: Pass the clock scaling timeout as an argument Prepare for adding an additional ufshcd_clock_scaling_prepare() call with a different timeout. Reviewed-by: Avri Altman Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 2000bc309703b34ab776c7c00dfb5865721eb257 Author: Bart Van Assche Date: Thu Dec 8 15:43:56 2022 -0800 scsi: ufs: core: Reduce the clock scaling latency Wait at most 20 ms before rechecking the doorbells instead of waiting for a potentially long time between doorbell checks. Reviewed-by: Avri Altman Reviewed-by: Stanley Chu Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 9a3a5a8556e51c2fafdcbc9996865fc55d3d6775 Merge: c1635fbfefc32 1026f7d366785 Author: Martin K. Petersen Date: Fri Dec 30 21:10:42 2022 +0000 Merge patch series "scsi: ufs: ufs-qcom: Debug clean ups" Andrew Halaney says: This patch series attempts to clean up some debug code paths in the ufs-qcom driver. Link: https://lore.kernel.org/r/20221201230810.1019834-1-ahalaney@redhat.com Signed-off-by: Martin K. Petersen commit 1026f7d366785d0a1edae731a3d06e9924c3e71d Author: Andrew Halaney Date: Thu Dec 1 17:08:10 2022 -0600 scsi: ufs: ufs-qcom: Use dev_err() where possible dev_err() statements are better to use than pr_err(), so switch to those. In a similar vein, the check on the dev_req_params pointer here is not needed, the two places this function is called never pass in a NULL pointer, so instead of using dev_err() there just remove it. Signed-off-by: Andrew Halaney Reviewed-by: Manivannan Sadhasivam Reviewed-by: Asutosh Das Signed-off-by: Martin K. Petersen commit e4ce23fba366e5b0629b13d9c42e68fab7fda002 Author: Andrew Halaney Date: Thu Dec 1 17:08:09 2022 -0600 scsi: ufs: ufs-qcom: Remove usage of dbg_print_en This bitmask is unconditionally set in the current driver, so all conditionals using it can be considered bit rot. Let's take the current default conditional path everywhere and remove dbg_print_en from the driver. Signed-off-by: Andrew Halaney Reviewed-by: Manivannan Sadhasivam Reviewed-by: Asutosh Das Signed-off-by: Martin K. Petersen commit 50a427a00c85995009a134d443949e5128a84191 Author: Andrew Halaney Date: Thu Dec 1 17:08:08 2022 -0600 scsi: ufs: ufs-qcom: Clean up dbg_register_dump The current implementation has abstractions that don't give any benefits. The print_fn callback (and its only callback implementation, ufs_qcom_dump_regs_wrapper()) was only used by ufs_qcom_print_hw_debug_reg_all() and just multiplies len by 4 before calling ufshcd_dump_regs(). ufs_qcom_print_hw_debug_reg_all() is only called by ufs_qcom_dump_dbg_regs(). There's no real gain in those abstractions, so let's just do the work directly in ufs_qcom_dump_dbg_regs() (the dbg_register_dump callback). Signed-off-by: Andrew Halaney Reviewed-by: Manivannan Sadhasivam Reviewed-by: Asutosh Das Signed-off-by: Martin K. Petersen commit 921a880827498e501921bf034012a97e554550d2 Author: Andrew Halaney Date: Thu Dec 1 17:08:07 2022 -0600 scsi: ufs: ufs-qcom: Drop unnecessary NULL checks This code path is only called through one function, and the HBA struct is already accessed in ufshcd_vops_dbg_register_dump() prior to calling so there is no way for it to be NULL. Likewise, the print_fn callback is always supplied within this driver and is always provided. Signed-off-by: Andrew Halaney Reviewed-by: Manivannan Sadhasivam Reviewed-by: Asutosh Das Signed-off-by: Martin K. Petersen commit c1635fbfefc32b22e9927203c23d28ddf5df0728 Merge: 1e49a5387f43e 6ff265fc5ef66 Author: Martin K. Petersen Date: Fri Dec 30 21:01:16 2022 +0000 Merge patch series "UFS Advanced RPMB" Bean Huo says: This series of changes is to add support for UFS advanced RPMB in ufs_bsg. The advanced RPMB application of user space is ufs_utils, the reference code is at: https://github.com/beanhuo/ufs-utils-Micron/blob/ufs_arpmb/ufs_arpmb.c. Changes to ufs_utils will be pushed to: https://github.com/westerndigitalcorporation/ufs-utils Link: https://lore.kernel.org/r/20221201140437.549272-1-beanhuo@iokpp.de Signed-off-by: Martin K. Petersen commit 6ff265fc5ef660499e0edc4641647e99eed3f519 Author: Bean Huo Date: Thu Dec 1 15:04:37 2022 +0100 scsi: ufs: core: bsg: Add advanced RPMB support in ufs_bsg Add advanced RPMB support in ufs_bsg: 1. According to the UFS specification, only one RPMB operation can be performed at any time. We can ensure this by using reserved slot and its dev_cmd sync operation protection mechanism. 2. For Advanced RPMB, RPMB metadata is packaged in an EHS (Extra Header Segment) of a command UPIU, and the corresponding reply EHS (from the device) should also be returned to the user space. bsg_job->request and bsg_job->reply allow us to pass and return EHS from/back to userspace. Compared to normal/legacy RPMB, the advantages of advanced RPMB are: 1. The data length in the Advanced RPMB data read/write command can be larger than 4KB. For the legacy RPMB, the data length in a single RPMB data transfer is 256 bytes. 2. All of the advanced RPMB operations will be a single command. For legacy RPMB, take the read write-counter value as an example, you need two commands (first SECURITY PROTOCOL OUT, then second SECURITY PROTOCOL IN). Signed-off-by: Bean Huo Reviewed-by: Avri Altman Signed-off-by: Martin K. Petersen commit a4b1c9b9b38c92da099aba234c96e818f8d2e4dd Author: Bean Huo Date: Thu Dec 1 15:04:36 2022 +0100 scsi: ufs: core: Pass EHS length into ufshcd_prepare_req_desc_hdr() We need to fill in the total EHS length in UTP Transfer Request Descriptor. Add this functionality to ufshcd_prepare_req_desc_hdr(). Signed-off-by: Bean Huo Reviewed-by: Avri Altman Signed-off-by: Martin K. Petersen commit f6b9d0fe5c0573ddd0cbf3071a2003897325c86c Author: Bean Huo Date: Thu Dec 1 15:04:35 2022 +0100 scsi: ufs: core: Advanced RPMB detection Check UFS Advanced RPMB LU enablement during ufshcd_lu_init(). Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 7a4df79d0bfd6d7b4af0badf6254af5e4157094b Author: Bean Huo Date: Thu Dec 1 15:04:34 2022 +0100 scsi: ufs: core: Split ufshcd_map_sg() Take out the "map scatter-gather list to prdt" part of the code in ufshcd_map_sg() and split it into a new function ufshcd_sgl_to_prdt(). Signed-off-by: Bean Huo Reviewed-by: Avri Altman Signed-off-by: Martin K. Petersen commit 765ab00dac2c37070d8a4209e017ae81e1d8e9bb Author: Bean Huo Date: Thu Dec 1 15:04:33 2022 +0100 scsi: ufs: bsg: Clean up ufs_bsg_request() Move sg_copy_from_buffer() below its associated case statement. Signed-off-by: Bean Huo Reviewed-by: Avri Altman Signed-off-by: Martin K. Petersen commit 64d4864714c2cd2af35b48ab5b28a28ee863219a Author: Bean Huo Date: Thu Dec 1 15:04:32 2022 +0100 scsi: ufs: bsg: Remove unnecessary length checkup Remove checks on job->request_len and job->reply_len because msgcode checks in a subseqent commit will rule out malicious requests. Signed-off-by: Bean Huo Acked-by: Avri Altman Signed-off-by: Martin K. Petersen commit 3f5145a6152388ca612461ca96db4f995fa816d2 Author: Bean Huo Date: Thu Dec 1 15:04:31 2022 +0100 scsi: ufs: bsg: Let result in struct ufs_bsg_reply be signed int According to the comments in struct ufs_bsg_reply and its usage, the result should be signed int, not __u32. Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 58374a3970a04ef3bf2df3a3d3d2345be998068f Author: Zhang Rui Date: Mon Dec 19 23:46:20 2022 +0800 thermal/x86_pkg_temp_thermal: Add support for handling dynamic tjmax Tjmax value retrieved from MSR_IA32_TEMPERATURE_TARGET can be changed at runtime when the Intel SST-PP (Intel Speed Select Technology - Performance Profile) level is changed. Enhance the code to use updated tjmax when programming the thermal interrupt thresholds. Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit 983eb370cb871bd843a8a7da01da6c4b38871309 Author: Zhang Rui Date: Mon Dec 19 23:46:19 2022 +0800 thermal/x86_pkg_temp_thermal: Use Intel TCC library Cleanup the code by using Intel TCC library for TCC (Thermal Control Circuitry) MSR access. Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit 4e3ecc2898fe0b42177cd7bb4d38088b4829ef45 Author: Zhang Rui Date: Mon Dec 19 23:46:18 2022 +0800 thermal/intel/intel_tcc_cooling: Use Intel TCC library Cleanup the code by using Intel TCC library for TCC (Thermal Control Circuitry) MSR access. Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit 955fb8719efbb8e914dc03f192e9a0bded3bae77 Author: Zhang Rui Date: Mon Dec 19 23:46:17 2022 +0800 thermal/intel/intel_soc_dts_iosf: Use Intel TCC library Cleanup the code by using Intel TCC library for TCC (Thermal Control Circuitry) MSR access. Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit d91a4714e54e4ad4d6fe795339aae329f53b2217 Author: Zhang Rui Date: Mon Dec 19 23:46:16 2022 +0800 thermal/int340x/processor_thermal: Use Intel TCC library Cleanup the code by using Intel TCC library for TCC (Thermal Control Circuitry) MSR access. Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit a3c1f066e1c514ac819f5dae288cc8a59c384158 Author: Zhang Rui Date: Mon Dec 19 23:46:15 2022 +0800 thermal/intel: Introduce Intel TCC library There are several different drivers that accesses the Intel TCC (thermal control circuitry) MSRs, and each of them has its own implementation for the same functionalities, e.g. getting the current temperature, getting the tj_max, and getting/setting the tj_max offset. Introduce a library to unify the code for Intel CPU TCC MSR access. At the same time, ensure the temperature is got based on the updated tjmax value because tjmax can be changed at runtime for cases like the Intel SST-PP (Intel Speed Select Technology - Performance Profile) level change. Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit 446c85af665cf6d911c4821ac9507c8ba0cc7e75 Author: Ammar Faizi Date: Fri Dec 23 21:24:18 2022 +0700 ACPI: Silence missing prototype warnings Compiling with clang-16: drivers/acpi/acpi_lpit.c:142:6: error: no previous prototype \ for function 'acpi_init_lpit' [-Werror,-Wmissing-prototypes] drivers/acpi/ioapic.c:212:6: error: no previous prototype \ for function 'pci_ioapic_remove' [-Werror,-Wmissing-prototypes] drivers/acpi/ioapic.c:229:5: error: no previous prototype \ for function 'acpi_ioapic_remove' [-Werror,-Wmissing-prototypes] Include "internal.h" to silence them. Signed-off-by: Ammar Faizi Signed-off-by: Rafael J. Wysocki commit e8a0e30b742f76ebd0f3b196973df4bf65d8fbbb Author: Rafael J. Wysocki Date: Wed Dec 28 22:26:04 2022 +0100 cpufreq: intel_pstate: Drop ACPI _PSS states table patching After making acpi_processor_get_platform_limit() use the "no limit" value for its frequency QoS request when _PPC returns 0, it is not necessary to replace the frequency corresponding to the first _PSS return package entry with the maximum turbo frequency of the given CPU in intel_pstate_init_acpi_perf_limits() any more, so drop the code doing that along with the comment explaining it. Signed-off-by: Rafael J. Wysocki commit 99387b016022c29234c4ebf9abd34358c6e56532 Author: Rafael J. Wysocki Date: Wed Dec 28 22:24:10 2022 +0100 ACPI: processor: perflib: Avoid updating frequency QoS unnecessarily Modify acpi_processor_get_platform_limit() to avoid updating its frequency QoS request when the _PPC return value has not changed by comparing that value to the previous _PPC return value stored in the performance_platform_limit field of the struct acpi_processor corresponding to the given CPU. While at it, do the _PPC return value check against the state count earlier, to avoid setting performance_platform_limit to an invalid value, and make acpi_processor_ppc_init() use FREQ_QOS_MAX_DEFAULT_VALUE as the "no limit" frequency QoS for consistency. Signed-off-by: Rafael J. Wysocki commit c02d5feb6e2f60affc6ba8606d8d614c071e2ba6 Author: Rafael J. Wysocki Date: Wed Dec 28 22:21:49 2022 +0100 ACPI: processor: perflib: Use the "no limit" frequency QoS When _PPC returns 0, it means that the CPU frequency is not limited by the platform firmware, so make acpi_processor_get_platform_limit() update the frequency QoS request used by it to "no limit" in that case. This addresses a problem with limiting CPU frequency artificially on some systems after CPU offline/online to the frequency that corresponds to the first entry in the _PSS return package. Reported-by: Pratyush Yadav Signed-off-by: Rafael J. Wysocki Reviewed-by: Pratyush Yadav Tested-by: Pratyush Yadav commit 80cbddf59009933274989cb39d52eb8f0a43839f Author: Alexander Sverdlin Date: Fri Dec 23 17:26:36 2022 +0100 iio: adc: ep93xx: Add OF support Prepare for EP93xx conversion to DT. Signed-off-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20221223162636.6488-2-alexander.sverdlin@gmail.com Signed-off-by: Jonathan Cameron commit 08025a3bd9e0b975c1c2b59e31aa7c18d27786b7 Author: Alexander Sverdlin Date: Fri Dec 23 17:26:35 2022 +0100 dt-bindings: iio: adc: ep93xx: Add cirrus,ep9301-adc description Add device tree bindings for Cirrus Logic EP9301/EP9302 internal SoCs' ADC block. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20221223162636.6488-1-alexander.sverdlin@gmail.com Signed-off-by: Jonathan Cameron commit fbf757e55afbd8b4d36f4808a6ae9107afeb79f3 Author: Zhou jie Date: Fri Dec 23 17:02:15 2022 +0800 ACPI: processor: idle: Drop unnecessary (void *) conversion The (void *) type pointer does not need to be cast, so don't do that in lapic_timer_check_state(). Signed-off-by: Zhou jie [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 91fdb91ccca2b48572a1ccf1d382fd599e3e1237 Author: Sakari Ailus Date: Tue Dec 20 17:01:26 2022 +0200 ACPICA: Constify pathname argument for acpi_get_handle() acpi_get_handle() uses the pathname argument to find a handle related to that pathname but it does not need to modify it. Make it const, in order to be able to pass const pathname to it. Link: https://github.com/acpica/acpica/pull/773 Signed-off-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki commit e1d9148582ab2c3dada5c5cf8ca7531ca269fee5 Author: Mario Limonciello Date: Thu Dec 15 09:51:20 2022 -0600 ACPICA: Drop port I/O validation for some regions Microsoft introduced support in Windows XP for blocking port I/O to various regions. For Windows compatibility ACPICA has adopted the same protections and will disallow writes to those (presumably) the same regions. On some systems the AML included with the firmware will issue 4 byte long writes to 0x80. These writes aren't making it over because of this blockage. The first 4 byte write attempt is rejected, and then subsequently 1 byte at a time each offset is tried. The first at 0x80 works, but then the next 3 bytes are rejected. This manifests in bizarre failures for devices that expected the AML to write all 4 bytes. Trying the same AML on Windows 10 or 11 doesn't hit this failure and all 4 bytes are written. Either some of these regions were wrong or some point after Windows XP some of these regions blocks have been lifted. In the last 15 years there doesn't seem to be any reports popping up of this error in the Windows event viewer anymore. There is no documentation at Microsoft's developer site indicating that Windows ACPI interpreter blocks these regions. Between the lack of documentation and the fact that the writes actually do work in Windows 10 and 11, it's quite likely Windows doesn't actually enforce this anymore. So to help the issue, only enforce Windows XP specific entries if the latest _OSI supported is Windows XP. Continue to enforce the ALWAYS_ILLEGAL entries. Link: https://github.com/acpica/acpica/pull/817 Fixes: 7f0719039085 ("ACPICA: New: I/O port protection") Signed-off-by: Mario Limonciello Signed-off-by: Rafael J. Wysocki commit 73d15a7c13bfe1292db85ed3de8dfa711291819d Author: Hans de Goede Date: Tue Dec 13 13:34:54 2022 +0100 ACPI: PMIC: Add pmic_i2c_address to BYT Crystal Cove support Add a pmic_i2c_address entry to intel_pmic_bytcrc.c, so that intel_soc_pmic_exec_mipi_pmic_seq_element() can be used on devices with a Bay Trail Crystal Cove PMIC OpRegion driver. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 6ad90f71129219f9b87ce181189817bcbcde34b8 Author: Stuart Hayes Date: Thu Dec 8 17:25:36 2022 -0600 ACPI: tables: Add support for NBFT Add support for the NVMe Boot Firmware Table (NBFT) to facilitate booting from NVM Express namespaces which are accessed via NVMe over Fabrics (NVMe-oF). Signed-off-by: Stuart Hayes Reviewed-by: John Meneghini Signed-off-by: Rafael J. Wysocki commit 471a444fff21dfbc665704eb3bbab072409a7bcb Author: Rayyan Ansari Date: Wed Dec 28 23:04:19 2022 +0000 dt-bindings: iio/adc: qcom,spmi-iadc: document PM8226 compatible Document the compatible for the IADC used on PM8226. Signed-off-by: Rayyan Ansari Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221228230421.56250-5-rayyan@ansari.sh Signed-off-by: Jonathan Cameron commit 1e49a5387f43e74c5408187d74038ef942a3eb34 Merge: 1b929c02afd37 5d39b77c33b19 Author: Martin K. Petersen Date: Fri Dec 30 16:59:30 2022 +0000 Merge patch series "scsi: libsas: Some coding style fixes and cleanups" Jason Yan says: A few coding style fixes and cleanups. There should be no functional changes in this series besides the debug log prints. Link: https://lore.kernel.org/r/20221214133808.1649122-1-yanaijie@huawei.com Signed-off-by: Martin K. Petersen commit 5d39b77c33b19089351f74a524fbb828c7d8ba81 Author: Jason Yan Date: Wed Dec 14 21:38:08 2022 +0800 scsi: libsas: Factor out sas_ex_add_dev() Factor out sas_ex_add_dev() to be consistent with sas_ata_add_dev() and unify the error handling. Cc: John Garry Signed-off-by: Jason Yan Reviewed-by: John Garry Signed-off-by: Martin K. Petersen commit 7cc7646b4b24430437e0cff104fadeafd470a7ce Author: Jason Yan Date: Wed Dec 14 21:38:07 2022 +0800 scsi: libsas: Factor out sas_ata_add_dev() Factor out sas_ata_add_dev() and put it in sas_ata.c since it is a SATA related interface. Also follow the standard coding style to define an inline empty function when CONFIG_SCSI_SAS_ATA is not enabled. Cc: John Garry Signed-off-by: Jason Yan Reviewed-by: John Garry Signed-off-by: Martin K. Petersen commit 8d2c9d25b725a699479d388da7e116d1d2bc0ea1 Author: Jason Yan Date: Wed Dec 14 21:38:06 2022 +0800 scsi: libsas: Remove useless dev_list delete in sas_ex_discover_end_dev() The domain device 'child' is allocated in sas_ex_discover_end_dev() and used to be added to the dev_list in this function. After the following two fixes the device is added to the disco_list instead. As a result, the list_del() and locking left behind is now redundant. Fixes: 87c8331fcf72 ("[SCSI] libsas: prevent domain rediscovery competing with ata error handling") Fixes: 92625f9bff38 ("[SCSI] libsas: restore scan order") Cc: John Garry Signed-off-by: Jason Yan Reviewed-by: John Garry Signed-off-by: Martin K. Petersen commit ffebb38efee3e6bbcccd0b7babf0ede8890794cd Author: Jason Yan Date: Wed Dec 14 21:38:05 2022 +0800 scsi: libsas: Change the coding style of sas_discover_sata() The coding style where calling this interface is inconsistent with other interfaces for SATA devices. The standard style for other SATA interfaces is like: #ifdefine CONFIG_SCSI_SAS_ATA void sas_ata_task_abort(struct sas_task *task); #else static inline void sas_ata_task_abort(struct sas_task *task) { } #endif And the callers does not have to do things like "#ifdefine CONFIG_SCSI_SAS_ATA" and may call the interface directly. So follow the standard style here. Cc: John Garry Signed-off-by: Jason Yan Reviewed-by: Jack Wang Reviewed-by: John Garry Signed-off-by: Martin K. Petersen commit 6c90466e2803d93ed47a980fbf184d35e012d895 Author: Jason Yan Date: Wed Dec 14 21:38:04 2022 +0800 scsi: libsas: Move sas_get_ata_command_set() up to save the declaration There is a sas_get_ata_command_set() declaration above sas_get_ata_info() to make it compile. However, this function is defined in the same file. Move it up to save the forward declaration. Also remove the variable 'fis' which is not needed in this function. Cc: John Garry Signed-off-by: Jason Yan Reviewed-by: John Garry Reviewed-by: Jack Wang Signed-off-by: Martin K. Petersen commit e20d5a22bd241c5084184bcf69dfb6eddc35417f Author: Herbert Xu Date: Wed Dec 21 14:58:08 2022 +0800 crypto: lib/blake2s - Split up test function to halve stack usage Reduce the stack usage further by splitting up the test function. Also squash blocks and unaligned_blocks into one array. Reported-by: kernel test robot Signed-off-by: Herbert Xu commit 49bc6a7786b7d03eab6912a88d09a7991a32174e Author: Lukas Bulwahn Date: Tue Dec 20 09:05:36 2022 +0100 crypto: ux500 - update debug config after ux500 cryp driver removal Commit 453de3eb08c4 ("crypto: ux500/cryp - delete driver") removes the config CRYPTO_DEV_UX500_CRYP, but leaves an obsolete reference in the dependencies of config CRYPTO_DEV_UX500_DEBUG. Remove that obsolete reference, and adjust the description while at it. Fixes: 453de3eb08c4 ("crypto: ux500/cryp - delete driver") Signed-off-by: Lukas Bulwahn Acked-by: Linus Walleij Signed-off-by: Herbert Xu commit 8031d1f678c2b06733c8f9028b413194b47c33ab Author: Arnd Bergmann Date: Thu Dec 15 17:29:38 2022 +0100 crypto: wp512 - disable kmsan checks in wp512_process_buffer() The memory sanitizer causes excessive register spills in this function: crypto/wp512.c:782:13: error: stack frame size (2104) exceeds limit (2048) in 'wp512_process_buffer' [-Werror,-Wframe-larger-than] Assume that this one is safe, and mark it as needing no checks to get the stack usage back down to the normal level. Signed-off-by: Arnd Bergmann Signed-off-by: Herbert Xu commit aa9695157f65c55e5c85a1c194859d3c03e68018 Author: Ard Biesheuvel Date: Tue Dec 13 17:13:10 2022 +0100 crypto: scatterwalk - use kmap_local() not kmap_atomic() kmap_atomic() is used to create short-lived mappings of pages that may not be accessible via the kernel direct map. This is only needed on 32-bit architectures that implement CONFIG_HIGHMEM, but it can be used on 64-bit other architectures too, where the returned mapping is simply the kernel direct address of the page. However, kmap_atomic() does not support migration on CONFIG_HIGHMEM configurations, due to the use of per-CPU kmap slots, and so it disables preemption on all architectures, not just the 32-bit ones. This implies that all scatterwalk based crypto routines essentially execute with preemption disabled all the time, which is less than ideal. So let's switch scatterwalk_map/_unmap and the shash/ahash routines to kmap_local() instead, which serves a similar purpose, but without the resulting impact on preemption on architectures that have no need for CONFIG_HIGHMEM. Cc: Eric Biggers Cc: Herbert Xu Cc: "Elliott, Robert (Servers)" Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit b517b0fbfec836391427649b207735afb698fcf3 Author: Herbert Xu Date: Tue Dec 13 18:43:30 2022 +0800 crypto: arm/sha1 - Fix clang function cast warnings Instead of casting the function which upsets clang for some reason, change the assembly function siganture instead. Reported-by: kernel test robot Signed-off-by: Herbert Xu Reviewed-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 4838c5195af75373104d1e2895810c1f95c00ec4 Author: Sergiu Moga Date: Wed Dec 7 15:59:55 2022 +0200 crypto: atmel - Add capability case for the 0x600 SHA and AES IP versions In order for the driver to be made aware of the capabilities of the SHA and AES IP versions 0x600 , such as those present on the SAM9X60 SoC's, add a corresponding switch case to the capability method of the respective drivers. Without this, besides the capabilities not being correctly set, the self tests may hang since the driver is endlessly waiting for a completion to be set by a never occurring DMA interrupt handler. Signed-off-by: Sergiu Moga Acked-by: Nicolas Ferre Signed-off-by: Herbert Xu commit 093ee97e24f8555fbe678a20401de91fcd305ce4 Merge: 97b7ed0727843 3af577f9826fd Author: Conor Dooley Date: Fri Dec 30 11:51:14 2022 +0000 Merge tag 'soc2arch-immutable' into riscv-dt-for-next SOC_FOO to ARCH_FOO conversion for RISC-V RISC-V is an outlier in using SOC_FOO rather than ARCH_FOO for vendors/micro-archs. SOC_FOO may make more sense (I personally prefer it), but the rest of the "world" uses ARCH_FOO. That'd be fine, with with an increasing number of existing SoC vendors moving to RISC-V, unifying our symbol names with the expectations of the rest of the world makes sense. Folks did not seem keen on changing the world (and they can't really be blamed for that) so convert RISC-V over to match. Add some ARCH_FOO stubs alongside the existing SOC_FOO ones, which will be removed once all users of SOC_FOO have been converted*, and convert the DT bits of RISC-V kbuild over to the new symbols. * It may be best to wait until after the next LTS to remove the SOC_FOO ones, for the sake of external users. Signed-off-by: Conor Dooley commit 750426d63368c98404c917500b3687d7aed1a484 Author: Eric Biggers Date: Mon Dec 19 21:40:42 2022 -0800 crypto: x86/ghash - add comment and fix broken link Add a comment that explains what ghash_setkey() is doing, as it's hard to understand otherwise. Also fix a broken hyperlink. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit f1740751f793d1ee5f0bd0639f68f49c4ccb94a9 Author: Eric Biggers Date: Mon Dec 19 21:40:41 2022 -0800 crypto: x86/ghash - use le128 instead of u128 The u128 struct type is going away, so make ghash-clmulni-intel use le128 instead. Note that the field names a and b swapped, as they were backwards with u128. (a is meant to be high-order and b low-order.) Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 116db2704c193fff6d73ea6c2219625f0c9bdfc8 Author: Eric Biggers Date: Mon Dec 19 21:40:40 2022 -0800 crypto: x86/ghash - fix unaligned access in ghash_setkey() The key can be unaligned, so use the unaligned memory access helpers. Fixes: 8ceee72808d1 ("crypto: ghash-clmulni-intel - use C implementation for setkey()") Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit fd3cdd932e5f79eb08ed7b8e41be34ab0ad9e74e Author: Chris Wilson Date: Wed Dec 28 21:22:52 2022 +0200 drm/i915: Remove truncation warning for large objects Having addressed the issues surrounding incorrect types for local variables and potential integer truncation in using the scatterlist API, we have closed all the loop holes we had previously identified with dangerously large object creation. As such, we can eliminate the warning put in place to remind us to complete the review. Cc: Tvrtko Ursulin Cc: Brian Welty Cc: Matthew Auld Cc: Thomas Hellström Testcase: igt@gem_create@create-massive Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4991 Signed-off-by: Chris Wilson Signed-off-by: Gwan-gyeong Mun Reviewed-by: Nirmoy Das Reviewed-by: Mauro Carvalho Chehab Reviewed-by: Andrzej Hajda Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20221228192252.917299-7-gwan-gyeong.mun@intel.com commit 18f968cb92fb3fa758d9eb29056426fa5588b230 Author: Gwan-gyeong Mun Date: Wed Dec 28 21:22:51 2022 +0200 drm/i915: Use error code as -E2BIG when the size of gem ttm object is too large The ttm_bo_init_reserved() functions returns -ENOSPC if the size is too big to add vma. The direct function that returns -ENOSPC is drm_mm_insert_node_in_range(). To handle the same error as other code returning -E2BIG when the size is too large, it converts return value to -E2BIG. Cc: Chris Wilson Cc: Matthew Auld Cc: Thomas Hellström Signed-off-by: Gwan-gyeong Mun Reviewed-by: Nirmoy Das Reviewed-by: Mauro Carvalho Chehab Reviewed-by: Andrzej Hajda Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20221228192252.917299-6-gwan-gyeong.mun@intel.com commit 662c04e2b8c6fe8eb2f2b88c62e25c8241d0f793 Author: Gwan-gyeong Mun Date: Wed Dec 28 21:22:50 2022 +0200 drm/i915: Check if the size is too big while creating shmem file The __shmem_file_setup() function returns -EINVAL if size is greater than MAX_LFS_FILESIZE. To handle the same error as other code that returns -E2BIG when the size is too large, it add a code that returns -E2BIG when the size is larger than the size that can be handled. v4: If BITS_PER_LONG is 32, size > MAX_LFS_FILESIZE is always false, so it checks only when BITS_PER_LONG is 64. Cc: Chris Wilson Cc: Matthew Auld Cc: Thomas Hellström Signed-off-by: Gwan-gyeong Mun Reviewed-by: Nirmoy Das Reviewed-by: Mauro Carvalho Chehab Reported-by: kernel test robot Reviewed-by: Andrzej Hajda Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20221228192252.917299-5-gwan-gyeong.mun@intel.com commit 6949aa0eadafec9f4e83920a798330025c049ce5 Author: Gwan-gyeong Mun Date: Wed Dec 28 21:22:49 2022 +0200 drm/i915: Check for integer truncation on the configuration of ttm place There is an impedance mismatch between the first/last valid page frame number of ttm place in unsigned and our memory/page accounting in unsigned long. As the object size is under the control of userspace, we have to be prudent and catch the conversion errors. To catch the implicit truncation as we switch from unsigned long to unsigned, we use overflows_type check and report E2BIG or overflow_type prior to the operation. v3: Not to change execution inside a macro. (Mauro) Add safe_conversion_gem_bug_on() macro and remove temporal SAFE_CONVERSION() macro. v4: Fix unhandled GEM_BUG_ON() macro call from safe_conversion_gem_bug_on() v6: Fix to follow general use case for GEM_BUG_ON(). (Jani) v7: Fix to use WARN_ON() macro where GEM_BUG_ON() macro was used. (Jani) v8: Replace safe_conversion() with check_assign() (Kees) v14: Split one macro of assignment with checking of overflow to two steps, first overflow check, and second assignment. Cc: Chris Wilson Cc: Matthew Auld Cc: Thomas Hellström Cc: Jani Nikula Signed-off-by: Gwan-gyeong Mun Reviewed-by: Nirmoy Das (v2) Reviewed-by: Mauro Carvalho Chehab (v3) Reported-by: kernel test robot Reviewed-by: Andrzej Hajda (v5) Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20221228192252.917299-4-gwan-gyeong.mun@intel.com commit c3bfba9a222550406082c92bbabc9c8b1355d8b8 Author: Chris Wilson Date: Wed Dec 28 21:22:48 2022 +0200 drm/i915: Check for integer truncation on scatterlist creation There is an impedance mismatch between the scatterlist API using unsigned int and our memory/page accounting in unsigned long. That is we may try to create a scatterlist for a large object that overflows returning a small table into which we try to fit very many pages. As the object size is under the control of userspace, we have to be prudent and catch the conversion errors. To catch the implicit truncation we check before calling scattterlist creation Apis. we use overflows_type check and report E2BIG if the overflows may raise. When caller does not return errno, use WARN_ON to report a problem. This is already used in our create ioctls to indicate if the uABI request is simply too large for the backing store. Failing that type check, we have a second check at sg_alloc_table time to make sure the values we are passing into the scatterlist API are not truncated. v2: Move added i915_utils's macro into drm_util header (Jani N) v5: Fix macros to be enclosed in parentheses for complex values Fix too long line warning v8: Replace safe_conversion() with check_assign() (Kees) v14: Remove shadowing macros of scatterlist creation api and fix to explicitly overflow check where the scatterlist creation APIs are called. (Jani) v15: Add missing returning of error code when the WARN_ON() has been detected. (Jani) Cc: Tvrtko Ursulin Cc: Brian Welty Cc: Matthew Auld Cc: Thomas Hellström Signed-off-by: Chris Wilson Co-developed-by: Gwan-gyeong Mun Signed-off-by: Gwan-gyeong Mun Reviewed-by: Nirmoy Das Reviewed-by: Mauro Carvalho Chehab Reviewed-by: Andrzej Hajda Acked-by: Jani Nikula Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20221228192252.917299-3-gwan-gyeong.mun@intel.com commit f47e6306afd3b625414922361e6b8c1cd6e28c8d Author: Chris Wilson Date: Wed Dec 28 21:22:47 2022 +0200 drm/i915/gem: Typecheck page lookups We need to check that we avoid integer overflows when looking up a page, and so fix all the instances where we have mistakenly used a plain integer instead of a more suitable long. Be pedantic and add integer typechecking to the lookup so that we can be sure that we are safe. And it also uses pgoff_t as our page lookups must remain compatible with the page cache, pgoff_t is currently exactly unsigned long. v2: Move added i915_utils's macro into drm_util header (Jani N) v3: Make not use the same macro name on a function. (Mauro) For kernel-doc, macros and functions are handled in the same namespace, the same macro name on a function prevents ever adding documentation for it. v4: Add kernel-doc markups to the kAPI functions and macros (Mauoro) v5: Fix an alignment to match open parenthesis v6: Rebase v10: Use assert_typable instead of exactly_pgoff_t() macro. (Kees) v11: Change the use of assert_typable to assert_same_typable (G.G) v12: Change to use static_assert(__castable_to_type(n ,T)) style since the assert_same_typable() macro has been dropped. (G.G) v13: Change the use of __castable_to_type() to castable_to_type() Remove an unnecessary header include line. (G.G) v16: Fix "ERROR:SPACING" Checkpatch report (G.G) Cc: Tvrtko Ursulin Cc: Matthew Auld Cc: Thomas Hellström Cc: Kees Cook Signed-off-by: Chris Wilson Co-developed-by: Gwan-gyeong Mun Signed-off-by: Gwan-gyeong Mun Reviewed-by: Nirmoy Das (v2) Reviewed-by: Mauro Carvalho Chehab (v3) Reviewed-by: Andrzej Hajda (v5) Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20221228192252.917299-2-gwan-gyeong.mun@intel.com commit b501d4dc83aa3940189b68045cadc8b3eac73988 Merge: 4071d98b296a5 1b929c02afd37 Author: Rodrigo Vivi Date: Fri Dec 30 04:09:09 2022 -0500 Merge drm/drm-next into drm-intel-gt-next Sync after v6.2-rc1 landed in drm-next. We need to get some dependencies in place before we can merge the fixes series from Gwan-gyeong and Chris. References: https://lore.kernel.org/all/Y6x5JCDnh2rvh4lA@intel.com/ Signed-off-by: Rodrigo Vivi commit afa349bbb5d75e072e641234f1cb5d2264bd6ed0 Author: Andy Shevchenko Date: Mon Dec 19 14:42:40 2022 +0200 pinctrl: intel: Get rid of unused members in struct intel_function The driver has been converted to a generic data type and macro for the pin function definition, hence get rid of not used members in the struct intel_function. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 3b954b31e027ae2a46cae8482de87679bedd22b8 Author: Andy Shevchenko Date: Mon Dec 19 14:42:39 2022 +0200 pinctrl: moorefield: Convert to use new memeber in struct intel_function Convert driver to use generic data type and hence a new member in the struct intel_function. No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit de82e6f018664eff594aef11e7377af3898c0d95 Author: Andy Shevchenko Date: Mon Dec 19 14:42:38 2022 +0200 pinctrl: merrifield: Convert to use new memeber in struct intel_function Convert driver to use generic data type and hence a new member in the struct intel_function. No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit b19d82e1f7f446507cbe575039029809a63b0adb Author: Andy Shevchenko Date: Mon Dec 19 14:42:37 2022 +0200 pinctrl: lynxpoint: Convert to use new memeber in struct intel_function Convert driver to use generic data type and hence a new member in the struct intel_function. No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 3899707add6ac3e5cb0d91973ac81aa451915d95 Author: Andy Shevchenko Date: Mon Dec 19 14:42:36 2022 +0200 pinctrl: cherryview: Convert to use new memeber in struct intel_function Convert driver to use generic data type and hence a new member in the struct intel_function. No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 988ac1a4689a3fcd8f72595773550d7f862a68b5 Author: Andy Shevchenko Date: Mon Dec 19 14:42:35 2022 +0200 pinctrl: baytrail: Convert to use new memeber in struct intel_function Convert driver to use generic data type and hence a new member in the struct intel_function. No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 999b85bfd765f273208cd7348b2977d3c5ae0753 Author: Andy Shevchenko Date: Mon Dec 19 14:42:34 2022 +0200 pinctrl: intel: Make use of struct pinfunction and PINCTRL_PINFUNCTION() Since pin control provides a generic data type and a macro for the pin function definition, use them in the Intel driver. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 443a0a0f0cf4f432c7af6654b7f2f920d411d379 Author: Andy Shevchenko Date: Mon Dec 19 14:42:33 2022 +0200 pinctrl: Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro There are many pin control drivers define their own data type for pin function representation which is the same or embed the same data as newly introduced one. Provide the data type and convenient macro for all pin control drivers. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Acked-by: Mika Westerberg commit 4a3ec00957fdf182be705d46e77acacc430f7d65 Author: Jialu Xu Date: Mon Dec 19 14:36:41 2022 +0800 csky: delay: Add function alignment Specify 8 bytes alignment for the function __delay or we get bad delay like udelay(10) will be 25us in fact. Signed-off-by: Jialu Xu Signed-off-by: Guo Ren commit bb5747cfbc4b7fe29621ca6cd4a695d2723bf2e8 Author: Alexei Starovoitov Date: Thu Dec 29 19:12:17 2022 -0800 libbpf: Restore errno after pr_warn. pr_warn calls into user-provided callback, which can clobber errno, so `errno = saved_errno` should happen after pr_warn. Fixes: 07453245620c ("libbpf: fix errno is overwritten after being closed.") Signed-off-by: Alexei Starovoitov commit 678a1c036199011e65b203367900f002a28da004 Author: Xin Liu Date: Sat Dec 24 19:20:58 2022 +0800 libbpf: Added the description of some API functions Currently, many API functions are not described in the document. Add add API description of the following four API functions: - libbpf_set_print; - bpf_object__open; - bpf_object__load; - bpf_object__close. Signed-off-by: Xin Liu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221224112058.12038-1-liuxin350@huawei.com commit ac807e6839c0cef749da0e5a528c6ed3fb249236 Merge: 30465003ad776 7244eb669397f Author: Andrii Nakryiko Date: Thu Dec 29 14:22:34 2022 -0800 Merge branch 'samples/bpf: enhance syscall tracing program' "Daniel T. Lee" says: ==================== Syscall tracing using kprobe is quite unstable. Since it uses the exact name of the kernel function, the program might broke due to the rename of a function. The problem can also be caused by a changes in the arguments of the function to which the kprobe connects. This commit enhances syscall tracing program with the following instruments. In this patchset, ksyscall is used instead of kprobe. By using ksyscall, libbpf will detect the appropriate kernel function name. (e.g. sys_write -> __s390_sys_write). This eliminates the need to worry about which wrapper function to attach in order to parse arguments. Also ksyscall provides more fine method with attaching system call, the coarse SYSCALL helper at trace_common.h can be removed. Next, BPF_SYSCALL is used to reduce the inconvenience of parsing arguments. Since the nature of SYSCALL_WRAPPER function wraps the argument once, additional process of argument extraction is required to properly parse the argument. The BPF_SYSCALL macro will reduces the hassle of parsing arguments from pt_regs. Lastly, vmlinux.h is applied to syscall tracing program. This change allows the bpf program to refer to the internal structure as a single "vmlinux.h" instead of including each header referenced by the bpf program. Additionally, this patchset changes the suffix of _kern to .bpf to make use of the new compile rule (CLANG-BPF) which is more simple and neat. By just changing the _kern suffix to .bpf will inherit the benefit of the new CLANG-BPF compile target. Also, this commit adds dummy gnu/stub.h to the samples/bpf directory. This will fix the compiling problem with 'clang -target bpf'. To fix the build error with the s390x, this patchset also includes the fix of libbpf invalid return address register mapping in s390. --- Changes in V2: - add gnu/stub.h hack to fix compile error with 'clang -target bpf' Changes in V3: - fix libbpf invalid return address register mapping in s390 ==================== Signed-off-by: Andrii Nakryiko commit 7244eb669397f309c3d014264823cdc9cb3f8e6b Author: Daniel T. Lee Date: Sat Dec 24 16:15:27 2022 +0900 libbpf: Fix invalid return address register in s390 There is currently an invalid register mapping in the s390 return address register. As the manual[1] states, the return address can be found at r14. In bpf_tracing.h, the s390 registers were named gprs(general purpose registers). This commit fixes the problem by correcting the mistyped mapping. [1]: https://uclibc.org/docs/psABI-s390x.pdf#page=14 Fixes: 3cc31d794097 ("libbpf: Normalize PT_REGS_xxx() macro definitions") Signed-off-by: Daniel T. Lee Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221224071527.2292-7-danieltimlee@gmail.com commit c5ffb26375ad309c858453f17e777b716723d527 Author: Daniel T. Lee Date: Sat Dec 24 16:15:26 2022 +0900 samples/bpf: Use BPF_KSYSCALL macro in syscall tracing programs This commit enhances the syscall tracing programs by using the BPF_SYSCALL macro to reduce the inconvenience of parsing arguments from pt_regs. By simplifying argument extraction, bpf program will become clear to understand. Signed-off-by: Daniel T. Lee Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221224071527.2292-6-danieltimlee@gmail.com commit 2e5c4dd7f81545a98e9f06317347e760749c020b Author: Daniel T. Lee Date: Sat Dec 24 16:15:25 2022 +0900 samples/bpf: Fix tracex2 by using BPF_KSYSCALL macro Currently, there is a problem with tracex2, as it doesn't print the histogram properly and the results are misleading. (all results report as 0) The problem is caused by a change in arguments of the function to which the kprobe connects. This tracex2 bpf program uses kprobe (attached to __x64_sys_write) to figure out the size of the write system call. In order to achieve this, the third argument 'count' must be intact. The following is a prototype of the sys_write variant. (checked with pfunct) ~/git/linux$ pfunct -P fs/read_write.o | grep sys_write ssize_t ksys_write(unsigned int fd, const char * buf, size_t count); long int __x64_sys_write(const struct pt_regs * regs); ... cross compile with s390x ... long int __s390_sys_write(struct pt_regs * regs); Since the nature of SYSCALL_WRAPPER function wraps the argument once, additional process of argument extraction is required to properly parse the argument. #define BPF_KSYSCALL(name, args...) ... snip ... struct pt_regs *regs = LINUX_HAS_SYSCALL_WRAPPER \ ? (struct pt_regs *)PT_REGS_PARM1(ctx) \ : ctx; \ In order to fix this problem, the BPF_SYSCALL macro has been used. This reduces the hassle of parsing arguments from pt_regs. Since the macro uses the CORE version of argument extraction, additional portability comes too. Signed-off-by: Daniel T. Lee Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221224071527.2292-5-danieltimlee@gmail.com commit d4fffba4d04b8d605ff07f1ed987399f6af0ad5b Author: Daniel T. Lee Date: Sat Dec 24 16:15:24 2022 +0900 samples/bpf: Change _kern suffix to .bpf with syscall tracing program Currently old compile rule (CLANG-bpf) doesn't contains VMLINUX_H define flag which is essential for the bpf program that includes "vmlinux.h". Also old compile rule doesn't directly specify the compile target as bpf, instead it uses bunch of extra options with clang followed by long chain of commands. (e.g. clang | opt | llvm-dis | llc) In Makefile, there is already new compile rule which is more simple and neat. And it also has -D__VMLINUX_H__ option. By just changing the _kern suffix to .bpf will inherit the benefit of the new CLANG-BPF compile target. Also, this commit adds dummy gnu/stub.h to the samples/bpf directory. As commit 1c2dd16add7e ("selftests/bpf: get rid of -D__x86_64__") noted, compiling with 'clang -target bpf' will raise an error with stubs.h unless workaround (-D__x86_64) is used. This commit solves this problem by adding dummy stub.h to make /usr/include/features.h to follow the expected path as the same way selftests/bpf dealt with. Signed-off-by: Daniel T. Lee Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221224071527.2292-4-danieltimlee@gmail.com commit 8a4dd0bcbdfd5bdaa5d1a5b390f44a45b60e8aa9 Author: Daniel T. Lee Date: Sat Dec 24 16:15:23 2022 +0900 samples/bpf: Use vmlinux.h instead of implicit headers in syscall tracing program This commit applies vmlinux.h to syscall tracing program. This change allows the bpf program to refer to the internal structure as a single "vmlinux.h" instead of including each header referenced by the bpf program. Signed-off-by: Daniel T. Lee Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221224071527.2292-3-danieltimlee@gmail.com commit 1d0c5f6f3d1387ec9c3a379fb232c078f5838d55 Author: Daniel T. Lee Date: Sat Dec 24 16:15:22 2022 +0900 samples/bpf: Use kyscall instead of kprobe in syscall tracing program Syscall tracing using kprobe is quite unstable. Since it uses the exact name of the kernel function, the program might broke due to the rename of a function. The problem can also be caused by a changes in the arguments of the function to which the kprobe connects. In this commit, ksyscall is used instead of kprobe. By using ksyscall, libbpf will detect the appropriate kernel function name. (e.g. sys_write -> __s390_sys_write). This eliminates the need to worry about which wrapper function to attach in order to parse arguments. In addition, ksyscall provides more fine method with attaching system call, the coarse SYSCALL helper at trace_common.h can be removed. Signed-off-by: Daniel T. Lee Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221224071527.2292-2-danieltimlee@gmail.com commit 12cf36c7125e5313249230e6235b4bfb2c4f765f Author: Christophe Branchereau Date: Mon Dec 19 20:52:33 2022 +0100 dt-bindings: display/panel: Add the Focaltech gpt3 Add bindings for the Forcaltech gpt3, which is a 640x480 3.0" 4:3 IPS LCD Panel found in the YLM/Anbernic RG300X handheld. Signed-off-by: Christophe Branchereau Reviewed-by: Krzysztof Kozlowski Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20221219195233.375637-3-cbranchereau@gmail.com commit cd6d41281e957ff70a1cbd049847006957860e72 Author: Christophe Branchereau Date: Mon Dec 19 20:52:32 2022 +0100 drm/panel: add the orisetech ota5601a Add the orisetech ota5601a ic driver For now it only supports the focaltech gpt3 3" 640x480 ips panel found in the ylm rg300x handheld. Signed-off-by: Christophe Branchereau Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20221219195233.375637-2-cbranchereau@gmail.com commit 9f1a4c004869d3c8061f286fec4d8096dd099b84 Author: Sean Christopherson Date: Wed Nov 30 23:09:34 2022 +0000 KVM: Clean up error labels in kvm_init() Convert the last two "out" lables to "err" labels now that the dust has settled, i.e. now that there are no more planned changes to the order of things in kvm_init(). Use "err" instead of "out" as it's easier to describe what failed than it is to describe what needs to be unwound, e.g. if allocating a per-CPU kick mask fails, KVM needs to free any masks that were allocated, and of course needs to unwind previous operations. Reported-by: Chao Gao Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-51-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 441f7bfa99fe2b8a7e504aa72047e20579e88a5d Author: Sean Christopherson Date: Wed Nov 30 23:09:33 2022 +0000 KVM: Opt out of generic hardware enabling on s390 and PPC Allow architectures to opt out of the generic hardware enabling logic, and opt out on both s390 and PPC, which don't need to manually enable virtualization as it's always on (when available). In addition to letting s390 and PPC drop a bit of dead code, this will hopefully also allow ARM to clean up its related code, e.g. ARM has its own per-CPU flag to track which CPUs have enable hardware due to the need to keep hardware enabled indefinitely when pKVM is enabled. Signed-off-by: Sean Christopherson Acked-by: Anup Patel Message-Id: <20221130230934.1014142-50-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 35774a9f94db08df78e1c08d2b097666deec4e76 Author: Sean Christopherson Date: Wed Nov 30 23:09:32 2022 +0000 KVM: Register syscore (suspend/resume) ops early in kvm_init() Register the suspend/resume notifier hooks at the same time KVM registers its reboot notifier so that all the code in kvm_init() that deals with enabling/disabling hardware is bundled together. Opportunstically move KVM's implementations to reside near the reboot notifier code for the same reason. Bunching the code together will allow architectures to opt out of KVM's generic hardware enable/disable logic with minimal #ifdeffery. Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-49-seanjc@google.com> Signed-off-by: Paolo Bonzini commit e6fb7d6eb4217badb018169ec2871da8e92f6555 Author: Isaku Yamahata Date: Wed Nov 30 23:09:31 2022 +0000 KVM: Make hardware_enable_failed a local variable in the "enable all" path Rework detecting hardware enabling errors to use a local variable in the "enable all" path to track whether or not enabling was successful across all CPUs. Using a global variable complicates paths that enable hardware only on the current CPU, e.g. kvm_resume() and kvm_online_cpu(). Opportunistically add a WARN if hardware enabling fails during kvm_resume(), KVM is all kinds of hosed if CPU0 fails to enable hardware. The WARN is largely futile in the current code, as KVM BUG()s on spurious faults on VMX instructions, e.g. attempting to run a vCPU on CPU if hardware enabling fails will explode. ------------[ cut here ]------------ kernel BUG at arch/x86/kvm/x86.c:508! invalid opcode: 0000 [#1] SMP CPU: 3 PID: 1009 Comm: CPU 4/KVM Not tainted 6.1.0-rc1+ #11 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:kvm_spurious_fault+0xa/0x10 Call Trace: vmx_vcpu_load_vmcs+0x192/0x230 [kvm_intel] vmx_vcpu_load+0x16/0x60 [kvm_intel] kvm_arch_vcpu_load+0x32/0x1f0 vcpu_load+0x2f/0x40 kvm_arch_vcpu_ioctl_run+0x19/0x9d0 kvm_vcpu_ioctl+0x271/0x660 __x64_sys_ioctl+0x80/0xb0 do_syscall_64+0x2b/0x50 entry_SYSCALL_64_after_hwframe+0x46/0xb0 But, the WARN may provide a breadcrumb to understand what went awry, and someday KVM may fix one or both of those bugs, e.g. by finding a way to eat spurious faults no matter the context (easier said than done due to side effects of certain operations, e.g. Intel's VMCLEAR). Signed-off-by: Isaku Yamahata [sean: rebase, WARN on failure in kvm_resume()] Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-48-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 37d258818562bbb5baf487489848640abceafbd9 Author: Sean Christopherson Date: Wed Nov 30 23:09:30 2022 +0000 KVM: Use a per-CPU variable to track which CPUs have enabled virtualization Use a per-CPU variable instead of a shared bitmap to track which CPUs have successfully enabled virtualization hardware. Using a per-CPU bool avoids the need for an additional allocation, and arguably yields easier to read code. Using a bitmap would be advantageous if KVM used it to avoid generating IPIs to CPUs that failed to enable hardware, but that's an extreme edge case and not worth optimizing, and the low level helpers would still want to keep their individual checks as attempting to enable virtualization hardware when it's already enabled can be problematic, e.g. Intel's VMXON will fault. Opportunistically change the order in hardware_enable_nolock() to set the flag if and only if hardware enabling is successful, instead of speculatively setting the flag and then clearing it on failure. Add a comment explaining that the check in hardware_disable_nolock() isn't simply paranoia. Waaay back when, commit 1b6c016818a5 ("KVM: Keep track of which cpus have virtualization enabled"), added the logic as a guards against CPU hotplug racing with hardware enable/disable. Now that KVM has eliminated the race by taking cpu_hotplug_lock for read (via cpus_read_lock()) when enabling or disabling hardware, at first glance it appears that the check is now superfluous, i.e. it's tempting to remove the per-CPU flag entirely... Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-47-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 667a83bf6a30b5660d02712dce9fb07e99abde38 Author: Isaku Yamahata Date: Wed Nov 30 23:09:29 2022 +0000 KVM: Remove on_each_cpu(hardware_disable_nolock) in kvm_exit() Drop the superfluous invocation of hardware_disable_nolock() during kvm_exit(), as it's nothing more than a glorified nop. KVM automatically disables hardware on all CPUs when the last VM is destroyed, and kvm_exit() cannot be called until the last VM goes away as the calling module is pinned by an elevated refcount of the fops associated with /dev/kvm. This holds true even on x86, where the caller of kvm_exit() is not kvm.ko, but is instead a dependent module, kvm_amd.ko or kvm_intel.ko, as kvm_chardev_ops.owner is set to the module that calls kvm_init(), not hardcoded to the base kvm.ko module. Signed-off-by: Isaku Yamahata [sean: rework changelog] Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-46-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 0bf50497f03b3d892c470c7d1a10a3e9c3c95821 Author: Isaku Yamahata Date: Wed Nov 30 23:09:28 2022 +0000 KVM: Drop kvm_count_lock and instead protect kvm_usage_count with kvm_lock Drop kvm_count_lock and instead protect kvm_usage_count with kvm_lock now that KVM hooks CPU hotplug during the ONLINE phase, which can sleep. Previously, KVM hooked the STARTING phase, which is not allowed to sleep and thus could not take kvm_lock (a mutex). This effectively allows the task that's initiating hardware enabling/disabling to preempted and/or migrated. Note, the Documentation/virt/kvm/locking.rst statement that kvm_count_lock is "raw" because hardware enabling/disabling needs to be atomic with respect to migration is wrong on multiple fronts. First, while regular spinlocks can be preempted, the task holding the lock cannot be migrated. Second, preventing migration is not required. on_each_cpu() disables preemption, which ensures that cpus_hardware_enabled correctly reflects hardware state. The task may be preempted/migrated between bumping kvm_usage_count and invoking on_each_cpu(), but that's perfectly ok as kvm_usage_count is still protected, e.g. other tasks that call hardware_enable_all() will be blocked until the preempted/migrated owner exits its critical section. KVM does have lockless accesses to kvm_usage_count in the suspend/resume flows, but those are safe because all tasks must be frozen prior to suspending CPUs, and a task cannot be frozen while it holds one or more locks (userspace tasks are frozen via a fake signal). Preemption doesn't need to be explicitly disabled in the hotplug path. The hotplug thread is pinned to the CPU that's being hotplugged, and KVM only cares about having a stable CPU, i.e. to ensure hardware is enabled on the correct CPU. Lockep, i.e. check_preemption_disabled(), plays nice with this state too, as is_percpu_thread() is true for the hotplug thread. Signed-off-by: Isaku Yamahata Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-45-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 2c106f29004d2a6dbdc375cd9c0c8f981f475f47 Author: Sean Christopherson Date: Wed Nov 30 23:09:27 2022 +0000 KVM: Ensure CPU is stable during low level hardware enable/disable Use the non-raw smp_processor_id() in the low hardware enable/disable helpers as KVM absolutely relies on the CPU being stable, e.g. KVM would end up with incorrect state if the task were migrated between accessing cpus_hardware_enabled and actually enabling/disabling hardware. Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-44-seanjc@google.com> Signed-off-by: Paolo Bonzini commit e4aa7f88af1a123863530af4a238ce64ec8fad5a Author: Chao Gao Date: Wed Nov 30 23:09:26 2022 +0000 KVM: Disable CPU hotplug during hardware enabling/disabling Disable CPU hotplug when enabling/disabling hardware to prevent the corner case where if the following sequence occurs: 1. A hotplugged CPU marks itself online in cpu_online_mask 2. The hotplugged CPU enables interrupt before invoking KVM's ONLINE callback 3 hardware_{en,dis}able_all() is invoked on another CPU the hotplugged CPU will be included in on_each_cpu() and thus get sent through hardware_{en,dis}able_nolock() before kvm_online_cpu() is called. start_secondary { ... set_cpu_online(smp_processor_id(), true); <- 1 ... local_irq_enable(); <- 2 ... cpu_startup_entry(CPUHP_AP_ONLINE_IDLE); <- 3 } KVM currently fudges around this race by keeping track of which CPUs have done hardware enabling (see commit 1b6c016818a5 "KVM: Keep track of which cpus have virtualization enabled"), but that's an inefficient, convoluted, and hacky solution. Signed-off-by: Chao Gao [sean: split to separate patch, write changelog] Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-43-seanjc@google.com> Signed-off-by: Paolo Bonzini commit aaf12a7b4323eb7d94677bcefc286ff6b772ed1c Author: Chao Gao Date: Wed Nov 30 23:09:25 2022 +0000 KVM: Rename and move CPUHP_AP_KVM_STARTING to ONLINE section The CPU STARTING section doesn't allow callbacks to fail. Move KVM's hotplug callback to ONLINE section so that it can abort onlining a CPU in certain cases to avoid potentially breaking VMs running on existing CPUs. For example, when KVM fails to enable hardware virtualization on the hotplugged CPU. Place KVM's hotplug state before CPUHP_AP_SCHED_WAIT_EMPTY as it ensures when offlining a CPU, all user tasks and non-pinned kernel tasks have left the CPU, i.e. there cannot be a vCPU task around. So, it is safe for KVM's CPU offline callback to disable hardware virtualization at that point. Likewise, KVM's online callback can enable hardware virtualization before any vCPU task gets a chance to run on hotplugged CPUs. Drop kvm_x86_check_processor_compatibility()'s WARN that IRQs are disabled, as the ONLINE section runs with IRQs disabled. The WARN wasn't intended to be a requirement, e.g. disabling preemption is sufficient, the IRQ thing was purely an aggressive sanity check since the helper was only ever invoked via SMP function call. Rename KVM's CPU hotplug callbacks accordingly. Suggested-by: Thomas Gleixner Signed-off-by: Chao Gao Signed-off-by: Isaku Yamahata Reviewed-by: Yuan Yao [sean: drop WARN that IRQs are disabled] Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-42-seanjc@google.com> Signed-off-by: Paolo Bonzini commit c82a5c5c53c5b732a9610736841a117373e43adb Author: Chao Gao Date: Wed Nov 30 23:09:24 2022 +0000 KVM: x86: Do compatibility checks when onlining CPU Do compatibility checks when enabling hardware to effectively add compatibility checks when onlining a CPU. Abort enabling, i.e. the online process, if the (hotplugged) CPU is incompatible with the known good setup. At init time, KVM does compatibility checks to ensure that all online CPUs support hardware virtualization and a common set of features. But KVM uses hotplugged CPUs without such compatibility checks. On Intel CPUs, this leads to #GP if the hotplugged CPU doesn't support VMX, or VM-Entry failure if the hotplugged CPU doesn't support all features enabled by KVM. Note, this is little more than a NOP on SVM, as SVM already checks for full SVM support during hardware enabling. Opportunistically add a pr_err() if setup_vmcs_config() fails, and tweak all error messages to output which CPU failed. Signed-off-by: Chao Gao Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Acked-by: Kai Huang Message-Id: <20221130230934.1014142-41-seanjc@google.com> Signed-off-by: Paolo Bonzini commit d83420c2d74e660f207a708f6574e952652a4698 Author: Sean Christopherson Date: Wed Nov 30 23:09:23 2022 +0000 KVM: x86: Move CPU compat checks hook to kvm_x86_ops (from kvm_x86_init_ops) Move the .check_processor_compatibility() callback from kvm_x86_init_ops to kvm_x86_ops to allow a future patch to do compatibility checks during CPU hotplug. Do kvm_ops_update() before compat checks so that static_call() can be used during compat checks. Signed-off-by: Sean Christopherson Reviewed-by: Kai Huang Message-Id: <20221130230934.1014142-40-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 325fc9579c2e415e8ae3d1ab56a5157751157869 Author: Sean Christopherson Date: Wed Nov 30 23:09:22 2022 +0000 KVM: SVM: Check for SVM support in CPU compatibility checks Check that SVM is supported and enabled in the processor compatibility checks. SVM already checks for support during hardware enabling, i.e. this doesn't really add new functionality. The net effect is that KVM will refuse to load if a CPU doesn't have SVM fully enabled, as opposed to failing KVM_CREATE_VM. Opportunistically move svm_check_processor_compat() up in svm.c so that it can be invoked during hardware enabling in a future patch. Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-39-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 8504ef2139e2164aced4335c23ef3f919db55281 Author: Sean Christopherson Date: Wed Nov 30 23:09:21 2022 +0000 KVM: VMX: Shuffle support checks and hardware enabling code around Reorder code in vmx.c so that the VMX support check helpers reside above the hardware enabling helpers, which will allow KVM to perform support checks during hardware enabling (in a future patch). No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-38-seanjc@google.com> Signed-off-by: Paolo Bonzini commit d41931324975741e570b8deb7ea58feeabf39343 Author: Sean Christopherson Date: Wed Nov 30 23:09:20 2022 +0000 KVM: x86: Do VMX/SVM support checks directly in vendor code Do basic VMX/SVM support checks directly in vendor code instead of implementing them via kvm_x86_ops hooks. Beyond the superficial benefit of providing common messages, which isn't even clearly a net positive since vendor code can provide more precise/detailed messages, there's zero advantage to bouncing through common x86 code. Consolidating the checks will also simplify performing the checks across all CPUs (in a future patch). Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-37-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 462689b37f082d06c2cf32a6e4e142182825dd70 Author: Sean Christopherson Date: Wed Nov 30 23:09:19 2022 +0000 KVM: VMX: Use current CPU's info to perform "disabled by BIOS?" checks Use this_cpu_has() instead of boot_cpu_has() to perform the effective "disabled by BIOS?" checks for VMX. This will allow consolidating code between vmx_disabled_by_bios() and vmx_check_processor_compat(). Checking the boot CPU isn't a strict requirement as any divergence in VMX enabling between the boot CPU and other CPUs will result in KVM refusing to load thanks to the aforementioned vmx_check_processor_compat(). Furthermore, using the boot CPU was an unintentional change introduced by commit a4d0b2fdbcf7 ("KVM: VMX: Use VMX feature flag to query BIOS enabling"). Prior to using the feature flags, KVM checked the raw MSR value from the current CPU. Reported-by: Kai Huang Signed-off-by: Sean Christopherson Reviewed-by: Kai Huang Message-Id: <20221130230934.1014142-36-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 8d20bd6381670382669d9bb39b5fd566a84cdbef Author: Sean Christopherson Date: Wed Nov 30 23:09:18 2022 +0000 KVM: x86: Unify pr_fmt to use module name for all KVM modules Define pr_fmt using KBUILD_MODNAME for all KVM x86 code so that printks use consistent formatting across common x86, Intel, and AMD code. In addition to providing consistent print formatting, using KBUILD_MODNAME, e.g. kvm_amd and kvm_intel, allows referencing SVM and VMX (and SEV and SGX and ...) as technologies without generating weird messages, and without causing naming conflicts with other kernel code, e.g. "SEV: ", "tdx: ", "sgx: " etc.. are all used by the kernel for non-KVM subsystems. Opportunistically move away from printk() for prints that need to be modified anyways, e.g. to drop a manual "kvm: " prefix. Opportunistically convert a few SGX WARNs that are similarly modified to WARN_ONCE; in the very unlikely event that the WARNs fire, odds are good that they would fire repeatedly and spam the kernel log without providing unique information in each print. Note, defining pr_fmt yields undesirable results for code that uses KVM's printk wrappers, e.g. vcpu_unimpl(). But, that's a pre-existing problem as SVM/kvm_amd already defines a pr_fmt, and thankfully use of KVM's wrappers is relatively limited in KVM x86 code. Signed-off-by: Sean Christopherson Reviewed-by: Paul Durrant Message-Id: <20221130230934.1014142-35-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 08a9d59c6ad95ea05369944f34eb59ff639cbbab Author: Sean Christopherson Date: Wed Nov 30 23:09:17 2022 +0000 KVM: x86: Use KBUILD_MODNAME to specify vendor module name Use KBUILD_MODNAME to specify the vendor module name instead of manually writing out the name to make it a bit more obvious that the name isn't completely arbitrary. A future patch will also use KBUILD_MODNAME to define pr_fmt, at which point using KBUILD_MODNAME for kvm_x86_ops.name further reinforces the intended usage of kvm_x86_ops.name. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-34-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 81a1cf9f89a6b71e71bfd7d43837ce9235e70b38 Author: Sean Christopherson Date: Wed Nov 30 23:09:16 2022 +0000 KVM: Drop kvm_arch_check_processor_compat() hook Drop kvm_arch_check_processor_compat() and its support code now that all architecture implementations are nops. Signed-off-by: Sean Christopherson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Eric Farman # s390 Acked-by: Anup Patel Reviewed-by: Kai Huang Message-Id: <20221130230934.1014142-33-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 3045c483eeeed56d2e709334cd590c1cfb748610 Author: Sean Christopherson Date: Wed Nov 30 23:09:15 2022 +0000 KVM: x86: Do CPU compatibility checks in x86 code Move the CPU compatibility checks to pure x86 code, i.e. drop x86's use of the common kvm_x86_check_cpu_compat() arch hook. x86 is the only architecture that "needs" to do per-CPU compatibility checks, moving the logic to x86 will allow dropping the common code, and will also give x86 more control over when/how the compatibility checks are performed, e.g. TDX will need to enable hardware (do VMXON) in order to perform compatibility checks. Signed-off-by: Sean Christopherson Reviewed-by: Isaku Yamahata Reviewed-by: Kai Huang Message-Id: <20221130230934.1014142-32-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 58ca1930310a0f45f6250d23e6ea8a09af1a133b Author: Sean Christopherson Date: Wed Nov 30 23:09:14 2022 +0000 KVM: VMX: Make VMCS configuration/capabilities structs read-only after init Tag vmcs_config and vmx_capability structs as __init, the canonical configuration is generated during hardware_setup() and must never be modified after that point. Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-31-seanjc@google.com> Signed-off-by: Paolo Bonzini commit a578a0a9e3526483ad1904fac019d95e7089fb34 Author: Sean Christopherson Date: Wed Nov 30 23:09:13 2022 +0000 KVM: Drop kvm_arch_{init,exit}() hooks Drop kvm_arch_init() and kvm_arch_exit() now that all implementations are nops. No functional change intended. Signed-off-by: Sean Christopherson Reviewed-by: Eric Farman # s390 Reviewed-by: Philippe Mathieu-Daudé Acked-by: Anup Patel Message-Id: <20221130230934.1014142-30-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 6c30cd2ef43d15f9799d8a77dca2f075e9d717e6 Author: Sean Christopherson Date: Wed Nov 30 23:09:12 2022 +0000 KVM: s390: Mark __kvm_s390_init() and its descendants as __init Tag __kvm_s390_init() and its unique helpers as __init. These functions are only ever called during module_init(), but could not be tagged accordingly while they were invoked from the common kvm_arch_init(), which is not __init because of x86. Signed-off-by: Sean Christopherson Reviewed-by: Eric Farman Message-Id: <20221130230934.1014142-29-seanjc@google.com> Signed-off-by: Paolo Bonzini commit b8449265915ddf834b15a8c7ace2fe7f361eac93 Author: Sean Christopherson Date: Wed Nov 30 23:09:11 2022 +0000 KVM: s390: Do s390 specific init without bouncing through kvm_init() Move the guts of kvm_arch_init() into a new helper, __kvm_s390_init(), and invoke the new helper directly from kvm_s390_init() instead of bouncing through kvm_init(). Invoking kvm_arch_init() is the very first action performed by kvm_init(), i.e. this is a glorified nop. Moving setup to __kvm_s390_init() will allow tagging more functions as __init, and emptying kvm_arch_init() will allow dropping the hook entirely once all architecture implementations are nops. No functional change intended. Signed-off-by: Sean Christopherson Reviewed-by: Eric Farman Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20221130230934.1014142-28-seanjc@google.com> Signed-off-by: Paolo Bonzini commit ae19b15d917887a450787de6f5c8f26a16d3fba9 Author: Sean Christopherson Date: Wed Nov 30 23:09:10 2022 +0000 KVM: PPC: Move processor compatibility check to module init Move KVM PPC's compatibility checks to their respective module_init() hooks, there's no need to wait until KVM's common compat check, nor is there a need to perform the check on every CPU (provided by common KVM's hook), as the compatibility checks operate on global data. arch/powerpc/include/asm/cputable.h: extern struct cpu_spec *cur_cpu_spec; arch/powerpc/kvm/book3s.c: return 0 arch/powerpc/kvm/e500.c: strcmp(cur_cpu_spec->cpu_name, "e500v2") arch/powerpc/kvm/e500mc.c: strcmp(cur_cpu_spec->cpu_name, "e500mc") strcmp(cur_cpu_spec->cpu_name, "e5500") strcmp(cur_cpu_spec->cpu_name, "e6500") Cc: Fabiano Rosas Cc: Michael Ellerman Signed-off-by: Sean Christopherson Acked-by: Michael Ellerman (powerpc) Message-Id: <20221130230934.1014142-27-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 45b66dc139e3cfb972cd7aeaf04a7cbf9e98651f Author: Sean Christopherson Date: Wed Nov 30 23:09:09 2022 +0000 KVM: RISC-V: Tag init functions and data with __init, __ro_after_init Now that KVM setup is handled directly in riscv_kvm_init(), tag functions and data that are used/set only during init with __init/__ro_after_init. Signed-off-by: Sean Christopherson Acked-by: Anup Patel Message-Id: <20221130230934.1014142-26-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 20deee32f553c5229ae3ca38ad0d3c1a43578c65 Author: Sean Christopherson Date: Wed Nov 30 23:09:08 2022 +0000 KVM: RISC-V: Do arch init directly in riscv_kvm_init() Fold the guts of kvm_arch_init() into riscv_kvm_init() instead of bouncing through kvm_init()=>kvm_arch_init(). Functionally, this is a glorified nop as invoking kvm_arch_init() is the very first action performed by kvm_init(). Moving setup to riscv_kvm_init(), which is tagged __init, will allow tagging more functions and data with __init and __ro_after_init. And emptying kvm_arch_init() will allow dropping the hook entirely once all architecture implementations are nops. No functional change intended. Signed-off-by: Sean Christopherson Reviewed-by: Philippe Mathieu-Daudé Acked-by: Anup Patel Message-Id: <20221130230934.1014142-25-seanjc@google.com> Signed-off-by: Paolo Bonzini commit eed9fcdf57616b2f3029542142b3139a820c9316 Author: Sean Christopherson Date: Wed Nov 30 23:09:07 2022 +0000 KVM: MIPS: Register die notifier prior to kvm_init() Call kvm_init() only after _all_ setup is complete, as kvm_init() exposes /dev/kvm to userspace and thus allows userspace to create VMs (and call other ioctls). Signed-off-by: Sean Christopherson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20221130230934.1014142-24-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 3fb8e89aa2a0e08ffebb24d6e5cd5bfe88ab4ac2 Author: Sean Christopherson Date: Wed Nov 30 23:09:06 2022 +0000 KVM: MIPS: Setup VZ emulation? directly from kvm_mips_init() Invoke kvm_mips_emulation_init() directly from kvm_mips_init() instead of bouncing through kvm_init()=>kvm_arch_init(). Functionally, this is a glorified nop as invoking kvm_arch_init() is the very first action performed by kvm_init(). Emptying kvm_arch_init() will allow dropping the hook entirely once all architecture implementations are nops. No functional change intended. Signed-off-by: Sean Christopherson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20221130230934.1014142-23-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 1cfc1c7bf56caf92977878bd7efd57b86f621c6c Author: Sean Christopherson Date: Wed Nov 30 23:09:05 2022 +0000 KVM: MIPS: Hardcode callbacks to hardware virtualization extensions Now that KVM no longer supports trap-and-emulate (see commit 45c7e8af4a5e "MIPS: Remove KVM_TE support"), hardcode the MIPS callbacks to the virtualization callbacks. Harcoding the callbacks eliminates the technically-unnecessary check on non-NULL kvm_mips_callbacks in kvm_arch_init(). MIPS has never supported multiple in-tree modules, i.e. barring an out-of-tree module, where copying and renaming kvm.ko counts as "out-of-tree", KVM could never encounter a non-NULL set of callbacks during module init. The callback check is also subtly broken, as it is not thread safe, i.e. if there were multiple modules, loading both concurrently would create a race between checking and setting kvm_mips_callbacks. Given that out-of-tree shenanigans are not the kernel's responsibility, hardcode the callbacks to simplify the code. Signed-off-by: Sean Christopherson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20221130230934.1014142-22-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 53bf620a2cdfbc09fa9323f03d2dc8f210704177 Author: Sean Christopherson Date: Wed Nov 30 23:09:04 2022 +0000 KVM: arm64: Mark kvm_arm_init() and its unique descendants as __init Tag kvm_arm_init() and its unique helper as __init, and tag data that is only ever modified under the kvm_arm_init() umbrella as read-only after init. Opportunistically name the boolean param in kvm_timer_hyp_init()'s prototype to match its definition. Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-21-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 1dc0f02d53382a016e57fcd24a42f8f62bd02fd4 Author: Sean Christopherson Date: Wed Nov 30 23:09:03 2022 +0000 KVM: arm64: Do arm/arch initialization without bouncing through kvm_init() Do arm/arch specific initialization directly in arm's module_init(), now called kvm_arm_init(), instead of bouncing through kvm_init() to reach kvm_arch_init(). Invoking kvm_arch_init() is the very first action performed by kvm_init(), so from a initialization perspective this is a glorified nop. Avoiding kvm_arch_init() also fixes a mostly benign bug as kvm_arch_exit() doesn't properly unwind if a later stage of kvm_init() fails. While the soon-to-be-deleted comment about compiling as a module being unsupported is correct, kvm_arch_exit() can still be called by kvm_init() if any step after the call to kvm_arch_init() succeeds. Add a FIXME to call out that pKVM initialization isn't unwound if kvm_init() fails, which is a pre-existing problem inherited from kvm_arch_exit(). Making kvm_arch_init() a nop will also allow dropping kvm_arch_init() and kvm_arch_exit() entirely once all other architectures follow suit. Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-20-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 78b3bf485d5cb5b9a11ff6e1d4b76cbf2f2360ef Author: Sean Christopherson Date: Wed Nov 30 23:09:02 2022 +0000 KVM: arm64: Unregister perf callbacks if hypervisor finalization fails Undo everything done by init_subsystems() if a later initialization step fails, i.e. unregister perf callbacks in addition to unregistering the power management notifier. Fixes: bfa79a805454 ("KVM: arm64: Elevate hypervisor mappings creation at EL2") Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-19-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 6baaeda878445dc7b9e86f614ac39bf137c385af Author: Sean Christopherson Date: Wed Nov 30 23:09:01 2022 +0000 KVM: arm64: Free hypervisor allocations if vector slot init fails Teardown hypervisor mode if vector slot setup fails in order to avoid leaking any allocations done by init_hyp_mode(). Fixes: b881cdce77b4 ("KVM: arm64: Allocate hyp vectors statically") Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-18-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 466d27e48d7cd2542710309817cff1e91cd2e10a Author: Marc Zyngier Date: Wed Nov 30 23:09:00 2022 +0000 KVM: arm64: Simplify the CPUHP logic For a number of historical reasons, the KVM/arm64 hotplug setup is pretty complicated, and we have two extra CPUHP notifiers for vGIC and timers. It looks pretty pointless, and gets in the way of further changes. So let's just expose some helpers that can be called from the core CPUHP callback, and get rid of everything else. This gives us the opportunity to drop a useless notifier entry, as well as tidy-up the timer enable/disable, which was a bit odd. Signed-off-by: Marc Zyngier Signed-off-by: Isaku Yamahata Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-17-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 3af4a9e61e71117d5df2df3e1605fa062e04b869 Author: Sean Christopherson Date: Wed Nov 30 23:08:59 2022 +0000 KVM: x86: Serialize vendor module initialization (hardware setup) Acquire a new mutex, vendor_module_lock, in kvm_x86_vendor_init() while doing hardware setup to ensure that concurrent calls are fully serialized. KVM rejects attempts to load vendor modules if a different module has already been loaded, but doesn't handle the case where multiple vendor modules are loaded at the same time, and module_init() doesn't run under the global module_mutex. Note, in practice, this is likely a benign bug as no platform exists that supports both SVM and VMX, i.e. barring a weird VM setup, one of the vendor modules is guaranteed to fail a support check before modifying common KVM state. Alternatively, KVM could perform an atomic CMPXCHG on .hardware_enable, but that comes with its own ugliness as it would require setting .hardware_enable before success is guaranteed, e.g. attempting to load the "wrong" could result in spurious failure to load the "right" module. Introduce a new mutex as using kvm_lock is extremely deadlock prone due to kvm_lock being taken under cpus_write_lock(), and in the future, under under cpus_read_lock(). Any operation that takes cpus_read_lock() while holding kvm_lock would potentially deadlock, e.g. kvm_timer_init() takes cpus_read_lock() to register a callback. In theory, KVM could avoid such problematic paths, i.e. do less setup under kvm_lock, but avoiding all calls to cpus_read_lock() is subtly difficult and thus fragile. E.g. updating static calls also acquires cpus_read_lock(). Inverting the lock ordering, i.e. always taking kvm_lock outside cpus_read_lock(), is not a viable option as kvm_lock is taken in various callbacks that may be invoked under cpus_read_lock(), e.g. x86's kvmclock_cpufreq_notifier(). The lockdep splat below is dependent on future patches to take cpus_read_lock() in hardware_enable_all(), but as above, deadlock is already is already possible. ====================================================== WARNING: possible circular locking dependency detected 6.0.0-smp--7ec93244f194-init2 #27 Tainted: G O ------------------------------------------------------ stable/251833 is trying to acquire lock: ffffffffc097ea28 (kvm_lock){+.+.}-{3:3}, at: hardware_enable_all+0x1f/0xc0 [kvm] but task is already holding lock: ffffffffa2456828 (cpu_hotplug_lock){++++}-{0:0}, at: hardware_enable_all+0xf/0xc0 [kvm] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (cpu_hotplug_lock){++++}-{0:0}: cpus_read_lock+0x2a/0xa0 __cpuhp_setup_state+0x2b/0x60 __kvm_x86_vendor_init+0x16a/0x1870 [kvm] kvm_x86_vendor_init+0x23/0x40 [kvm] 0xffffffffc0a4d02b do_one_initcall+0x110/0x200 do_init_module+0x4f/0x250 load_module+0x1730/0x18f0 __se_sys_finit_module+0xca/0x100 __x64_sys_finit_module+0x1d/0x20 do_syscall_64+0x3d/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> #0 (kvm_lock){+.+.}-{3:3}: __lock_acquire+0x16f4/0x30d0 lock_acquire+0xb2/0x190 __mutex_lock+0x98/0x6f0 mutex_lock_nested+0x1b/0x20 hardware_enable_all+0x1f/0xc0 [kvm] kvm_dev_ioctl+0x45e/0x930 [kvm] __se_sys_ioctl+0x77/0xc0 __x64_sys_ioctl+0x1d/0x20 do_syscall_64+0x3d/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(cpu_hotplug_lock); lock(kvm_lock); lock(cpu_hotplug_lock); lock(kvm_lock); *** DEADLOCK *** 1 lock held by stable/251833: #0: ffffffffa2456828 (cpu_hotplug_lock){++++}-{0:0}, at: hardware_enable_all+0xf/0xc0 [kvm] Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-16-seanjc@google.com> Signed-off-by: Paolo Bonzini commit e32b120071ea114efc0b4ddd439547750b85f618 Author: Sean Christopherson Date: Wed Nov 30 23:08:58 2022 +0000 KVM: VMX: Do _all_ initialization before exposing /dev/kvm to userspace Call kvm_init() only after _all_ setup is complete, as kvm_init() exposes /dev/kvm to userspace and thus allows userspace to create VMs (and call other ioctls). E.g. KVM will encounter a NULL pointer when attempting to add a vCPU to the per-CPU loaded_vmcss_on_cpu list if userspace is able to create a VM before vmx_init() configures said list. BUG: kernel NULL pointer dereference, address: 0000000000000008 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 0 P4D 0 Oops: 0002 [#1] SMP CPU: 6 PID: 1143 Comm: stable Not tainted 6.0.0-rc7+ #988 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:vmx_vcpu_load_vmcs+0x68/0x230 [kvm_intel] vmx_vcpu_load+0x16/0x60 [kvm_intel] kvm_arch_vcpu_load+0x32/0x1f0 [kvm] vcpu_load+0x2f/0x40 [kvm] kvm_arch_vcpu_create+0x231/0x310 [kvm] kvm_vm_ioctl+0x79f/0xe10 [kvm] ? handle_mm_fault+0xb1/0x220 __x64_sys_ioctl+0x80/0xb0 do_syscall_64+0x2b/0x50 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7f5a6b05743b Modules linked in: vhost_net vhost vhost_iotlb tap kvm_intel(+) kvm irqbypass Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-15-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 4f8396b96a9fc672964842fe7adbe8ddca8a3adf Author: Sean Christopherson Date: Wed Nov 30 23:08:57 2022 +0000 KVM: x86: Move guts of kvm_arch_init() to standalone helper Move the guts of kvm_arch_init() to a new helper, kvm_x86_vendor_init(), so that VMX can do _all_ arch and vendor initialization before calling kvm_init(). Calling kvm_init() must be the _very_ last step during init, as kvm_init() exposes /dev/kvm to userspace, i.e. allows creating VMs. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-14-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 451d39e8006111c4449830e01ec460024bf58817 Author: Sean Christopherson Date: Wed Nov 30 23:08:56 2022 +0000 KVM: VMX: Move Hyper-V eVMCS initialization to helper Move Hyper-V's eVMCS initialization to a dedicated helper to clean up vmx_init(), and add a comment to call out that the Hyper-V init code doesn't need to be unwound if vmx_init() ultimately fails. No functional change intended. Signed-off-by: Sean Christopherson Reviewed-by: Vitaly Kuznetsov Message-Id: <20221130230934.1014142-13-seanjc@google.com> Signed-off-by: Paolo Bonzini commit da66de44b01e9b7fa09731057593850394bf32e4 Author: Sean Christopherson Date: Wed Nov 30 23:08:55 2022 +0000 KVM: VMX: Don't bother disabling eVMCS static key on module exit Don't disable the eVMCS static key on module exit, kvm_intel.ko owns the key so there can't possibly be users after the kvm_intel.ko is unloaded, at least not without much bigger issues. Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-12-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 2916b70fc342719f570640de07251b7f91feebdb Author: Sean Christopherson Date: Wed Nov 30 23:08:54 2022 +0000 KVM: VMX: Reset eVMCS controls in VP assist page during hardware disabling Reset the eVMCS controls in the per-CPU VP assist page during hardware disabling instead of waiting until kvm-intel's module exit. The controls are activated if and only if KVM creates a VM, i.e. don't need to be reset if hardware is never enabled. Doing the reset during hardware disabling will naturally fix a potential NULL pointer deref bug once KVM disables CPU hotplug while enabling and disabling hardware (which is necessary to fix a variety of bugs). If the kernel is running as the root partition, the VP assist page is unmapped during CPU hot unplug, and so KVM's clearing of the eVMCS controls needs to occur with CPU hot(un)plug disabled, otherwise KVM could attempt to write to a CPU's VP assist page after it's unmapped. Reported-by: Vitaly Kuznetsov Signed-off-by: Sean Christopherson Reviewed-by: Vitaly Kuznetsov Message-Id: <20221130230934.1014142-11-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 63a1bd8ad1ac9e4e8bfcd5914c8899606e04898d Author: Sean Christopherson Date: Wed Nov 30 23:08:53 2022 +0000 KVM: Drop arch hardware (un)setup hooks Drop kvm_arch_hardware_setup() and kvm_arch_hardware_unsetup() now that all implementations are nops. No functional change intended. Signed-off-by: Sean Christopherson Reviewed-by: Eric Farman # s390 Acked-by: Anup Patel Message-Id: <20221130230934.1014142-10-seanjc@google.com> Signed-off-by: Paolo Bonzini commit b7483387e374977396152298bfbddee1ca0a062e Author: Sean Christopherson Date: Wed Nov 30 23:08:52 2022 +0000 KVM: x86: Move hardware setup/unsetup to init/exit Now that kvm_arch_hardware_setup() is called immediately after kvm_arch_init(), fold the guts of kvm_arch_hardware_(un)setup() into kvm_arch_{init,exit}() as a step towards dropping one of the hooks. To avoid having to unwind various setup, e.g registration of several notifiers, slot in the vendor hardware setup before the registration of said notifiers and callbacks. Introducing a functional change while moving code is less than ideal, but the alternative is adding a pile of unwinding code, which is much more error prone, e.g. several attempts to move the setup code verbatim all introduced bugs. Add a comment to document that kvm_ops_update() is effectively the point of no return, e.g. it sets the kvm_x86_ops.hardware_enable canary and so needs to be unwound. Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-9-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 1935542a04cc12cb360885a0ff5583d5e259c32f Author: Sean Christopherson Date: Wed Nov 30 23:08:51 2022 +0000 KVM: x86: Do timer initialization after XCR0 configuration Move kvm_arch_init()'s call to kvm_timer_init() down a few lines below the XCR0 configuration code. A future patch will move hardware setup into kvm_arch_init() and slot in vendor hardware setup before the call to kvm_timer_init() so that timer initialization (among other stuff) doesn't need to be unwound if vendor setup fails. XCR0 setup on the other hand needs to happen before vendor hardware setup. Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-8-seanjc@google.com> Signed-off-by: Paolo Bonzini commit e43f576225cfbf6f27f5aa82de7f338cb7272352 Author: Sean Christopherson Date: Wed Nov 30 23:08:50 2022 +0000 KVM: s390: Move hardware setup/unsetup to init/exit Now that kvm_arch_hardware_setup() is called immediately after kvm_arch_init(), fold the guts of kvm_arch_hardware_(un)setup() into kvm_arch_{init,exit}() as a step towards dropping one of the hooks. No functional change intended. Signed-off-by: Sean Christopherson Reviewed-by: Eric Farman Message-Id: <20221130230934.1014142-7-seanjc@google.com> Signed-off-by: Paolo Bonzini commit b801ef42149fe5cba21bb6fe80c6d8e4c031f990 Author: Sean Christopherson Date: Wed Nov 30 23:08:49 2022 +0000 KVM: s390: Unwind kvm_arch_init() piece-by-piece() if a step fails In preparation for folding kvm_arch_hardware_setup() into kvm_arch_init(), unwind initialization one step at a time instead of simply calling kvm_arch_exit(). Using kvm_arch_exit() regardless of which initialization step failed relies on all affected state playing nice with being undone even if said state wasn't first setup. That holds true for state that is currently configured by kvm_arch_init(), but not for state that's handled by kvm_arch_hardware_setup(), e.g. calling gmap_unregister_pte_notifier() without first registering a notifier would result in list corruption due to attempting to delete an entry that was never added to the list. Signed-off-by: Sean Christopherson Reviewed-by: Eric Farman Message-Id: <20221130230934.1014142-6-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 73b8dc04132c1f8d4f9250a39f1fc9878ba2ee13 Author: Sean Christopherson Date: Wed Nov 30 23:08:48 2022 +0000 KVM: Teardown VFIO ops earlier in kvm_exit() Move the call to kvm_vfio_ops_exit() further up kvm_exit() to try and bring some amount of symmetry to the setup order in kvm_init(), and more importantly so that the arch hooks are invoked dead last by kvm_exit(). This will allow arch code to move away from the arch hooks without any change in ordering between arch code and common code in kvm_exit(). That kvm_vfio_ops_exit() is called last appears to be 100% arbitrary. It was bolted on after the fact by commit 571ee1b68598 ("kvm: vfio: fix unregister kvm_device_ops of vfio"). The nullified kvm_device_ops_table is also local to kvm_main.c and is used only when there are active VMs, so unless arch code is doing something truly bizarre, nullifying the table earlier in kvm_exit() is little more than a nop. Signed-off-by: Sean Christopherson Reviewed-by: Cornelia Huck Reviewed-by: Eric Farman Message-Id: <20221130230934.1014142-5-seanjc@google.com> Signed-off-by: Paolo Bonzini commit c9650228efbad65c1b9681198f3502de08a42944 Author: Sean Christopherson Date: Wed Nov 30 23:08:47 2022 +0000 KVM: Allocate cpus_hardware_enabled after arch hardware setup Allocate cpus_hardware_enabled after arch hardware setup so that arch "init" and "hardware setup" are called back-to-back and thus can be combined in a future patch. cpus_hardware_enabled is never used before kvm_create_vm(), i.e. doesn't have a dependency with hardware setup and only needs to be allocated before /dev/kvm is exposed to userspace. Free the object before the arch hooks are invoked to maintain symmetry, and so that arch code can move away from the hooks without having to worry about ordering changes. Signed-off-by: Sean Christopherson Reviewed-by: Yuan Yao Message-Id: <20221130230934.1014142-4-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 5910ccf03de4fd6d321cf30cab7a06f1436a2053 Author: Sean Christopherson Date: Wed Nov 30 23:08:46 2022 +0000 KVM: Initialize IRQ FD after arch hardware setup Move initialization of KVM's IRQ FD workqueue below arch hardware setup as a step towards consolidating arch "init" and "hardware setup", and eventually towards dropping the hooks entirely. There is no dependency on the workqueue being created before hardware setup, the workqueue is used only when destroying VMs, i.e. only needs to be created before /dev/kvm is exposed to userspace. Move the destruction of the workqueue before the arch hooks to maintain symmetry, and so that arch code can move away from the hooks without having to worry about ordering changes. Reword the comment about kvm_irqfd_init() needing to come after kvm_arch_init() to call out that kvm_arch_init() must come before common KVM does _anything_, as x86 very subtly relies on that behavior to deal with multiple calls to kvm_init(), e.g. if userspace attempts to load kvm_amd.ko and kvm_intel.ko. Tag the code with a FIXME, as x86's subtle requirement is gross, and invoking an arch callback as the very first action in a helper that is called only from arch code is silly. Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 2b01281273738bf2d6551da48d65db2df3f28998 Author: Sean Christopherson Date: Wed Nov 30 23:08:45 2022 +0000 KVM: Register /dev/kvm as the _very_ last thing during initialization Register /dev/kvm, i.e. expose KVM to userspace, only after all other setup has completed. Once /dev/kvm is exposed, userspace can start invoking KVM ioctls, creating VMs, etc... If userspace creates a VM before KVM is done with its configuration, bad things may happen, e.g. KVM will fail to properly migrate vCPU state if a VM is created before KVM has registered preemption notifiers. Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20221130230934.1014142-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit fc471e831016c1741f3e8042997969ace0b5a013 Merge: 1b929c02afd37 bd827bd775375 Author: Paolo Bonzini Date: Thu Dec 29 15:35:48 2022 -0500 Merge branch 'kvm-late-6.1' into HEAD x86: * Change tdp_mmu to a read-only parameter * Separate TDP and shadow MMU page fault paths * Enable Hyper-V invariant TSC control selftests: * Use TAP interface for kvm_binary_stats_test and tsc_msrs_test Signed-off-by: Paolo Bonzini commit bd827bd775375fdef13da4c8d3f237555938aa6d Author: Vitaly Kuznetsov Date: Thu Oct 13 11:58:49 2022 +0200 KVM: selftests: Test Hyper-V invariant TSC control Add a test for the newly introduced Hyper-V invariant TSC control feature: - HV_X64_MSR_TSC_INVARIANT_CONTROL is not available without HV_ACCESS_TSC_INVARIANT CPUID bit set and available with it. - BIT(0) of HV_X64_MSR_TSC_INVARIANT_CONTROL controls the filtering of architectural invariant TSC (CPUID.80000007H:EDX[8]) bit. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Message-Id: <20221013095849.705943-8-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 91a0b5478aab482d7133b8f069eb7d4590efcb7e Author: Vitaly Kuznetsov Date: Thu Oct 13 11:58:48 2022 +0200 KVM: selftests: Test that values written to Hyper-V MSRs are preserved Enhance 'hyperv_features' selftest by adding a check that KVM preserves values written to PV MSRs. Two MSRs are, however, 'special': - HV_X64_MSR_EOI as it is a 'write-only' MSR, - HV_X64_MSR_RESET as it always reads as '0'. The later doesn't require any special handling right now because the test never writes anything besides '0' to the MSR, leave a TODO node about the fact. Suggested-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Message-Id: <20221013095849.705943-7-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 2f10428ace91d07a8c7bd6f127d66eaa9e3a1a9f Author: Vitaly Kuznetsov Date: Thu Oct 13 11:58:47 2022 +0200 KVM: selftests: Convert hyperv_features test to using KVM_X86_CPU_FEATURE() hyperv_features test needs to set certain CPUID bits in Hyper-V feature leaves but instead of open coding this, common KVM_X86_CPU_FEATURE() infrastructure can be used. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Message-Id: <20221013095849.705943-6-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 67b16f180541d5d1869a07afb844a244f9b6db0f Author: Vitaly Kuznetsov Date: Thu Oct 13 11:58:46 2022 +0200 KVM: selftests: Rename 'msr->available' to 'msr->fault_exepected' in hyperv_features test It may not be clear what 'msr->available' means. The test actually checks that accessing the particular MSR doesn't cause #GP, rename the variable accordingly. While on it, use 'true'/'false' instead of '1'/'0' for 'write'/ 'fault_expected' as these are boolean. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Message-Id: <20221013095849.705943-5-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 2be1bd3a70c81835b8969216ceedbd017fea732d Author: Vitaly Kuznetsov Date: Thu Oct 13 11:58:45 2022 +0200 KVM: x86: Hyper-V invariant TSC control Normally, genuine Hyper-V doesn't expose architectural invariant TSC (CPUID.80000007H:EDX[8]) to its guests by default. A special PV MSR (HV_X64_MSR_TSC_INVARIANT_CONTROL, 0x40000118) and corresponding CPUID feature bit (CPUID.0x40000003.EAX[15]) were introduced. When bit 0 of the PV MSR is set, invariant TSC bit starts to show up in CPUID. When the feature is exposed to Hyper-V guests, reenlightenment becomes unneeded. Add the feature to KVM. Keep CPUID output intact when the feature wasn't exposed to L1 and implement the required logic for hiding invariant TSC when the feature was exposed and invariant TSC control MSR wasn't written to. Copy genuine Hyper-V behavior and forbid to disable the feature once it was enabled. For the reference, for linux guests, support for the feature was added in commit dce7cd62754b ("x86/hyperv: Allow guests to enable InvariantTSC"). Signed-off-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Message-Id: <20221013095849.705943-4-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 0fcf86f05af208e4e6c62cf1a7e7e28bc6c9d9f9 Author: Vitaly Kuznetsov Date: Thu Oct 13 11:58:44 2022 +0200 KVM: x86: Add a KVM-only leaf for CPUID_8000_0007_EDX CPUID_8000_0007_EDX may come handy when X86_FEATURE_CONSTANT_TSC needs to be checked. No functional change intended. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Message-Id: <20221013095849.705943-3-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit b961aa757f940bebc608a412f66951e52a39a298 Author: Vitaly Kuznetsov Date: Thu Oct 13 11:58:43 2022 +0200 x86/hyperv: Add HV_EXPOSE_INVARIANT_TSC define Avoid open coding BIT(0) of HV_X64_MSR_TSC_INVARIANT_CONTROL by adding a dedicated define. While there's only one user at this moment, the upcoming KVM implementation of Hyper-V Invariant TSC feature will need to use it as well. Reviewed-by: Michael Kelley Signed-off-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Message-Id: <20221013095849.705943-2-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit dfe0ecc6f5d32da13783d203403bd3ecacbd3179 Author: Sean Christopherson Date: Wed Oct 12 18:16:58 2022 +0000 KVM: x86/mmu: Pivot on "TDP MMU enabled" when handling direct page faults When handling direct page faults, pivot on the TDP MMU being globally enabled instead of checking if the target MMU is a TDP MMU. Now that the TDP MMU is all-or-nothing, if the TDP MMU is enabled, KVM will reach direct_page_fault() if and only if the MMU is a TDP MMU. When TDP is enabled (obviously required for the TDP MMU), only non-nested TDP page faults reach direct_page_fault(), i.e. nonpaging MMUs are impossible, as NPT requires paging to be enabled and EPT faults use ept_page_fault(). Signed-off-by: Sean Christopherson Message-Id: <20221012181702.3663607-8-seanjc@google.com> [Use tdp_mmu_enabled variable. - Paolo] Signed-off-by: Paolo Bonzini commit 78fdd2f09fb1dfe152fe4a151c484786f1ed6984 Author: Sean Christopherson Date: Wed Oct 12 18:16:59 2022 +0000 KVM: x86/mmu: Pivot on "TDP MMU enabled" to check if active MMU is TDP MMU Simplify and optimize the logic for detecting if the current/active MMU is a TDP MMU. If the TDP MMU is globally enabled, then the active MMU is a TDP MMU if it is direct. When TDP is enabled, so called nonpaging MMUs are never used as the only form of shadow paging KVM uses is for nested TDP, and the active MMU can't be direct in that case. Rename the helper and take the vCPU instead of an arbitrary MMU, as nonpaging MMUs can show up in the walk_mmu if L1 is using nested TDP and L2 has paging disabled. Taking the vCPU has the added bonus of cleaning up the callers, all of which check the current MMU but wrap code that consumes the vCPU. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20221012181702.3663607-9-seanjc@google.com> [Use tdp_mmu_enabled variable. - Paolo] Signed-off-by: Paolo Bonzini commit de0322f575be9e7fb598d14d58f5a7c7d8394e2b Author: Sean Christopherson Date: Wed Oct 12 18:17:00 2022 +0000 KVM: x86/mmu: Replace open coded usage of tdp_mmu_page with is_tdp_mmu_page() Use is_tdp_mmu_page() instead of querying sp->tdp_mmu_page directly so that all users benefit if KVM ever finds a way to optimize the logic. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20221012181702.3663607-10-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 6c882ef4fc7bd99b67ad152e75428b669281c521 Author: David Matlack Date: Wed Sep 21 10:35:46 2022 -0700 KVM: x86/mmu: Rename __direct_map() to direct_map() Rename __direct_map() to direct_map() since the leading underscores are unnecessary. This also makes the page fault handler names more consistent: kvm_tdp_mmu_page_fault() calls kvm_tdp_mmu_map() and direct_page_fault() calls direct_map(). Opportunistically make some trivial cleanups to comments that had to be modified anyway since they mentioned __direct_map(). Specifically, use "()" when referring to functions, and include kvm_tdp_mmu_map() among the various callers of disallowed_hugepage_adjust(). No functional change intended. Signed-off-by: David Matlack Reviewed-by: Isaku Yamahata Signed-off-by: Paolo Bonzini Message-Id: <20220921173546.2674386-11-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit 9f33697ac7ff6945cc06cffb37423176680e2ddf Author: David Matlack Date: Wed Sep 21 10:35:45 2022 -0700 KVM: x86/mmu: Stop needlessly making MMU pages available for TDP MMU faults Stop calling make_mmu_pages_available() when handling TDP MMU faults. The TDP MMU does not participate in the "available MMU pages" tracking and limiting so calling this function is unnecessary work when handling TDP MMU faults. Signed-off-by: David Matlack Reviewed-by: Isaku Yamahata Signed-off-by: Paolo Bonzini Message-Id: <20220921173546.2674386-10-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit 9aa8ab43b38146029de807a8ff2696f51e15b226 Author: David Matlack Date: Wed Sep 21 10:35:44 2022 -0700 KVM: x86/mmu: Split out TDP MMU page fault handling Split out the page fault handling for the TDP MMU to a separate function. This creates some duplicate code, but makes the TDP MMU fault handler simpler to read by eliminating branches and will enable future cleanups by allowing the TDP MMU and non-TDP MMU fault paths to diverge. Only compile in the TDP MMU fault handler for 64-bit builds since kvm_tdp_mmu_map() does not exist in 32-bit builds. No functional change intended. Signed-off-by: David Matlack Reviewed-by: Isaku Yamahata Signed-off-by: Paolo Bonzini Message-Id: <20220921173546.2674386-9-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit e5e6f8d254a285e97b02180fdc75d02ffdf9f0ed Author: David Matlack Date: Wed Sep 21 10:35:43 2022 -0700 KVM: x86/mmu: Initialize fault.{gfn,slot} earlier for direct MMUs Move the initialization of fault.{gfn,slot} earlier in the page fault handling code for fully direct MMUs. This will enable a future commit to split out TDP MMU page fault handling without needing to duplicate the initialization of these 2 fields. Opportunistically take advantage of the fact that fault.gfn is initialized in kvm_tdp_page_fault() rather than recomputing it from fault->addr. No functional change intended. Signed-off-by: David Matlack Reviewed-by: Isaku Yamahata Signed-off-by: Paolo Bonzini Message-Id: <20220921173546.2674386-8-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit 354c908c068ec0a21850aef5dbf6b8331434a2e9 Author: David Matlack Date: Wed Sep 21 10:35:42 2022 -0700 KVM: x86/mmu: Handle no-slot faults in kvm_faultin_pfn() Handle faults on GFNs that do not have a backing memslot in kvm_faultin_pfn() and drop handle_abnormal_pfn(). This eliminates duplicate code in the various page fault handlers. Opportunistically tweak the comment about handling gfn > host.MAXPHYADDR to reflect that the effect of returning RET_PF_EMULATE at that point is to avoid creating an MMIO SPTE for such GFNs. No functional change intended. Signed-off-by: David Matlack Signed-off-by: Paolo Bonzini Message-Id: <20220921173546.2674386-7-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit cd08d178ff45d6564e782a3d005922ed439bd77f Author: David Matlack Date: Wed Sep 21 10:35:41 2022 -0700 KVM: x86/mmu: Avoid memslot lookup during KVM_PFN_ERR_HWPOISON handling Pass the kvm_page_fault struct down to kvm_handle_error_pfn() to avoid a memslot lookup when handling KVM_PFN_ERR_HWPOISON. Opportunistically move the gfn_to_hva_memslot() call and @current down into kvm_send_hwpoison_signal() to cut down on line lengths. No functional change intended. Signed-off-by: David Matlack Reviewed-by: Isaku Yamahata Signed-off-by: Paolo Bonzini Message-Id: <20220921173546.2674386-6-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit 56c3a4e4a2d5ef36ac12156e9d4d793e2841135c Author: David Matlack Date: Wed Sep 21 10:35:40 2022 -0700 KVM: x86/mmu: Handle error PFNs in kvm_faultin_pfn() Handle error PFNs in kvm_faultin_pfn() rather than relying on the caller to invoke handle_abnormal_pfn() after kvm_faultin_pfn(). Opportunistically rename kvm_handle_bad_page() to kvm_handle_error_pfn() to make it more consistent with is_error_pfn(). This commit moves KVM closer to being able to drop handle_abnormal_pfn(), which will reduce the amount of duplicate code in the various page fault handlers. No functional change intended. Signed-off-by: David Matlack Signed-off-by: Paolo Bonzini Message-Id: <20220921173546.2674386-5-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit ba6e3fe255439fd401a8d5487ad7c030db14afa8 Author: David Matlack Date: Wed Sep 21 10:35:39 2022 -0700 KVM: x86/mmu: Grab mmu_invalidate_seq in kvm_faultin_pfn() Grab mmu_invalidate_seq in kvm_faultin_pfn() and stash it in struct kvm_page_fault. The eliminates duplicate code and reduces the amount of parameters needed for is_page_fault_stale(). Preemptively split out __kvm_faultin_pfn() to a separate function for use in subsequent commits. No functional change intended. Signed-off-by: David Matlack Reviewed-by: Isaku Yamahata Signed-off-by: Paolo Bonzini Message-Id: <20220921173546.2674386-4-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit 09732d2b4dc5ba9de504711a3ae5aa1199127e6f Author: David Matlack Date: Wed Sep 21 10:35:38 2022 -0700 KVM: x86/mmu: Move TDP MMU VM init/uninit behind tdp_mmu_enabled Move kvm_mmu_{init,uninit}_tdp_mmu() behind tdp_mmu_enabled. This makes these functions consistent with the rest of the calls into the TDP MMU from mmu.c, and which is now possible since tdp_mmu_enabled is only modified when the x86 vendor module is loaded. i.e. It will never change during the lifetime of a VM. This change also enabled removing the stub definitions for 32-bit KVM, as the compiler will just optimize the calls out like it does for all the other TDP MMU functions. No functional change intended. Signed-off-by: David Matlack Reviewed-by: Isaku Yamahata Signed-off-by: Paolo Bonzini Message-Id: <20220921173546.2674386-3-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit 1f98f2bd8ec4df365381ba654db37a39ce20ccdf Author: David Matlack Date: Wed Sep 21 10:35:37 2022 -0700 KVM: x86/mmu: Change tdp_mmu to a read-only parameter Change tdp_mmu to a read-only parameter and drop the per-vm tdp_mmu_enabled. For 32-bit KVM, make tdp_mmu_enabled a macro that is always false so that the compiler can continue omitting cals to the TDP MMU. The TDP MMU was introduced in 5.10 and has been enabled by default since 5.15. At this point there are no known functionality gaps between the TDP MMU and the shadow MMU, and the TDP MMU uses less memory and scales better with the number of vCPUs. In other words, there is no good reason to disable the TDP MMU on a live system. Purposely do not drop tdp_mmu=N support (i.e. do not force 64-bit KVM to always use the TDP MMU) since tdp_mmu=N is still used to get test coverage of KVM's shadow MMU TDP support, which is used in 32-bit KVM. Signed-off-by: David Matlack Reviewed-by: Kai Huang Signed-off-by: Paolo Bonzini Message-Id: <20220921173546.2674386-2-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit 79edd55049527596187ee493d5f949fd1eda7067 Author: Thomas Huth Date: Tue Oct 4 11:31:31 2022 +0200 KVM: selftests: x86: Use TAP interface in the tsc_msrs_test Let's add some output here so that the user has some feedback about what is being run. Signed-off-by: Thomas Huth Message-Id: <20221004093131.40392-4-thuth@redhat.com> Signed-off-by: Paolo Bonzini commit 8125b6cda9b17f5a0163cca3904c430f4f03591b Author: Thomas Huth Date: Tue Oct 4 11:31:29 2022 +0200 KVM: selftests: Use TAP interface in the kvm_binary_stats_test The kvm_binary_stats_test test currently does not have any output (unless one of the TEST_ASSERT statement fails), so it's hard to say for a user how far it did proceed already. Thus let's make this a little bit more user-friendly and include some TAP output via the kselftest.h interface. Signed-off-by: Thomas Huth Reviewed-by: Andrew Jones Message-Id: <20221004093131.40392-2-thuth@redhat.com> Signed-off-by: Paolo Bonzini commit c4a488685b84ad94f099aa6be066bf1488e4b73c Author: Lai Jiangshan Date: Mon Dec 12 17:01:06 2022 +0800 kvm: x86/mmu: Warn on linking when sp->unsync_children Since the commit 65855ed8b034 ("KVM: X86: Synchronize the shadow pagetable before link it"), no sp would be linked with sp->unsync_children = 1. So make it WARN if it is the case. Signed-off-by: Lai Jiangshan Message-Id: <20221212090106.378206-1-jiangshanlai@gmail.com> Signed-off-by: Paolo Bonzini commit 80edc49f6a7544fa0fac122e177ffb63af60651e Author: Vitaly Kuznetsov Date: Fri Nov 4 15:47:08 2022 +0100 KVM: VMX: Resurrect vmcs_conf sanitization for KVM-on-Hyper-V Commit 9bcb90650e31 ("KVM: VMX: Get rid of eVMCS specific VMX controls sanitization") dropped 'vmcs_conf' sanitization for KVM-on-Hyper-V because there's no known Hyper-V version which would expose a feature unsupported in eVMCS in VMX feature MSRs. This works well for all currently existing Hyper-V version, however, future Hyper-V versions may add features which are supported by KVM and are currently missing in eVMCSv1 definition (e.g. APIC virtualization, PML,...). When this happens, existing KVMs will get broken. With the inverted 'unsupported by eVMCSv1' checks, we can resurrect vmcs_conf sanitization and make KVM future proof. Signed-off-by: Vitaly Kuznetsov Message-Id: <20221104144708.435865-5-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit c128d3fd389b583ce6b28dbaa0e924de5671b961 Author: Vitaly Kuznetsov Date: Fri Nov 4 15:47:07 2022 +0100 KVM: nVMX: Prepare to sanitize tertiary execution controls with eVMCS In preparation to restoring vmcs_conf sanitization for KVM-on-Hyper-V, (and for completeness) add tertiary VM-execution controls to 'evmcs_supported_ctrls'. No functional change intended as KVM doesn't yet expose MSR_IA32_VMX_PROCBASED_CTLS3 to its guests. Signed-off-by: Vitaly Kuznetsov Message-Id: <20221104144708.435865-4-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 96d6955d215e6234bb820fd23756b2a9b77aef0f Author: Vitaly Kuznetsov Date: Fri Nov 4 15:47:06 2022 +0100 KVM: nVMX: Invert 'unsupported by eVMCSv1' check When a new feature gets implemented in KVM, EVMCS1_UNSUPPORTED_* defines need to be adjusted to avoid the situation when the feature is exposed to the guest but there's no corresponding eVMCS field[s] for it. This is not obvious and fragile. Invert 'unsupported by eVMCSv1' check and make it 'supported by eVMCSv1' instead, this way it's much harder to make a mistake. New features will get added to EVMCS1_SUPPORTED_* defines when the corresponding fields are added to eVMCS definition. No functional change intended. EVMCS1_SUPPORTED_* defines are composed by taking KVM_{REQUIRED,OPTIONAL}_VMX_ defines and filtering out what was previously known as EVMCS1_UNSUPPORTED_*. From all the controls, SECONDARY_EXEC_TSC_SCALING requires special handling as it's actually present in eVMCSv1 definition but is not currently supported for Hyper-V-on-KVM, just for KVM-on-Hyper-V. As evmcs_supported_ctrls will be used for both scenarios, just add it there instead of EVMCS1_SUPPORTED_2NDEXEC. Signed-off-by: Vitaly Kuznetsov Message-Id: <20221104144708.435865-3-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit a2ad080b4dfd6bf97738bc79f8a6eca5790c9ae5 Author: Vitaly Kuznetsov Date: Fri Nov 4 15:47:05 2022 +0100 KVM: nVMX: Sanitize primary processor-based VM-execution controls with eVMCS too The only unsupported primary processor-based VM-execution control at the moment is CPU_BASED_ACTIVATE_TERTIARY_CONTROLS and KVM doesn't expose it in nested VMX feature MSRs anyway (see nested_vmx_setup_ctls_msrs()) but in preparation to inverting "unsupported with eVMCS" checks (and for completeness) it's better to sanitize MSR_IA32_VMX_PROCBASED_CTLS/ MSR_IA32_VMX_TRUE_PROCBASED_CTLS too. No functional change intended. Signed-off-by: Vitaly Kuznetsov Message-Id: <20221104144708.435865-2-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit d13da2f4c81602fc22cdf2cb13b15283b260e0d5 Author: Luca Weiss Date: Thu Dec 29 20:15:43 2022 +0100 regulator: dt-bindings: qcom,usb-vbus-regulator: change node name usb-vbus-regulator is a better generic node name than dcdc to change the example to match. Acked-by: Rob Herring Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20221229191542.123367-1-luca@z3ntu.xyz Signed-off-by: Mark Brown commit f02a537357a61e7892587c0f3455f8295cc9075c Author: Naman Jain Date: Fri Nov 25 16:05:33 2022 +0530 soc: qcom: socinfo: Add support for new fields in revision 16 Add support for new fields coming with socinfo structure under v16 to get SKU information, product code and name and type of different parts present in the SoC. Also, add debugfs nodes to read feature and product codes to allow user to get SKU and other SoC details. Support for SoC parts name and type parsing will be added separately. Details of fields added: * feature_code: mapped to qcom internal and external SKU IDs * pcode: product code * npartnamemap_offset: parts name map array offset from socinfo base ptr * nnum_partname_mapping: number of part mappings Signed-off-by: Naman Jain Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221125103533.2960-1-quic_namajain@quicinc.com commit 9e8e9be6c499d3dfa408b7306004c4b981622ff1 Author: Krzysztof Kozlowski Date: Sat Dec 24 16:42:55 2022 +0100 arm64: dts: qcom: use generic node name for CS35L41 speaker Node names should be generic so use consistently speaker-amp for CS35L41 speaker amplifier. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221224154255.43499-5-krzysztof.kozlowski@linaro.org commit 539a9923683c79e6925dd69a2e2534ec197361c7 Author: Krzysztof Kozlowski Date: Sat Dec 24 16:42:54 2022 +0100 arm64: dts: qcom: sm8450: re-order GCC clocks Bindings expect GCC clocks in other order: sm8450-hdk.dtb: clock-controller@100000: clock-names:1: 'sleep_clk' was expected Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221224154255.43499-4-krzysztof.kozlowski@linaro.org commit 42db0f72f7a8c33501a55537ac90557a665a56f8 Author: Krzysztof Kozlowski Date: Sat Dec 24 16:42:53 2022 +0100 arm64: dts: qcom: sm8250: drop unused clock-frequency from va-macro Neither qcom,sm8250-lpass-va-macro bindings nor the driver use "clock-frequency" property. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221224154255.43499-3-krzysztof.kozlowski@linaro.org commit 496b308f0988f3fb610073e125da8ef8065b334f Author: Krzysztof Kozlowski Date: Sat Dec 24 16:42:51 2022 +0100 arm64: dts: qcom: msm8996: align bus node names with DT schema The node names should be generic and the bindings expect "bus" for simple-bus nodes: msm8996-mtp.dtb: agnoc@0: $nodename:0: 'agnoc@0' does not match '^bus(@[0-9a-f]+)?$' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221224154255.43499-1-krzysztof.kozlowski@linaro.org commit f3b770f7a8b439136c71c24dbfc408a0086c6326 Author: Marijn Suijten Date: Sat Dec 17 00:34:08 2022 +0100 arm64: dts: qcom: sm6125-seine: Enable GPI DMA 0, QUP 0 and I2C SEs Enable I2C Serial Engines 1, 2 and 3 which are known to have hardware connected to them, leaving the rest disabled to save on power. For this, only GPI DMA 0 and QUP 0 need to be enabled, as nothing seems to be connected to Serial Engines on GPU DMA 1 / QUP 1. Beyond this downstream only defines a UART console available on Serial Engine 4 which also resides on QUP 0. Signed-off-by: Marijn Suijten Reviewed-by: Martin Botka Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221216233408.1283581-4-marijn.suijten@somainline.org commit 72621d0443eaf4e70adcbcd801301b9dd6eed431 Author: Marijn Suijten Date: Sat Dec 17 00:34:07 2022 +0100 arm64: dts: qcom: sm6125: Add QUPs with SPI and I2C Serial Engines Add Qualcomm Universal Peripheral nodes with SPI and I2C Serial Engines. QUP 0 only has two SPIs at index 0 and 2, QUP 1 has four SPIs with a gap in the middle (ranging from 5-9 with SPI 7 missing). Both QUPs have 5 I2C Serial Engines. [Marijn: Add iommus, reword patch description, reorder all properties, sort based on address, use QCOM_GPI_ constants, drop dma cells from 5 to 3] Signed-off-by: Martin Botka Signed-off-by: Marijn Suijten Reviewed-by: Martin Botka Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221216233408.1283581-3-marijn.suijten@somainline.org commit 075a6aef55919b9ed99cf07fe149aa52f80d9056 Author: Martin Botka Date: Sat Dec 17 00:34:06 2022 +0100 arm64: dts: qcom: sm6125: Add pin configs for QUP SPI/I2C Serial Engines Add pin setup for SPI/I2C Serial Engines that are supported under the Qualcomm Universal Peripheral found on SM6125. [Un-nest pins, remove duplicate pins= properties, follow new node naming conventions, fix qup_14 -> qup14 function typo] Signed-off-by: Martin Botka Signed-off-by: Marijn Suijten Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221216233408.1283581-2-marijn.suijten@somainline.org commit a9f6a13da473bb6c7406d2784d9e3792f6763cba Author: Marijn Suijten Date: Thu Dec 22 20:24:43 2022 +0100 arm64: dts: qcom: sm6125-seine: Clean up gpio-keys (volume down) - Remove autorepeat (leave key repetition to userspace); - Remove unneeded status = "okay" (this is the default); - Remove unneeded linux,input-type (this is the default for gpio-keys); - Allow the interrupt line for this button to be disabled; - Use a full, descriptive node name; - Set proper bias on the GPIO via pinctrl; - Sort properties; - Replace deprecated gpio-key,wakeup property with wakeup-source. Fixes: 82e1783890b7 ("arm64: dts: qcom: sm6125: Add support for Sony Xperia 10II") Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221222192443.119103-1-marijn.suijten@somainline.org commit 581734f754d2cb3bd748687dedb3c4ba298d7d80 Author: Martin Botka Date: Thu Dec 22 20:46:00 2022 +0100 arm64: dts: qcom: sm6125: Add GPI DMA nodes Add nodes for GPI DMA hosts on SM6125. [Marijn: reorder properties, use sdm845 fallback compatible, disable by default, use 3 instead of 5 dma cells] Signed-off-by: Martin Botka Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221222194600.139854-3-marijn.suijten@somainline.org commit ac54563c27528ab9461899de7d99ee4e3858b858 Author: AngeloGioacchino Del Regno Date: Thu Dec 22 20:32:54 2022 +0100 arm64: dts: qcom: sm6125: Add IOMMU context to DWC3 Add an IOMMU context to the USB DWC3 controller, required to get USB functionality upon enablement of apps_smmu. Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Reviewed-by: Martin Botka Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221222193254.126925-5-marijn.suijten@somainline.org commit 60f6c86fb4fd16bd86aa1b16bc51ef4ac0e20d4e Author: Marijn Suijten Date: Thu Dec 22 20:32:53 2022 +0100 arm64: dts: qcom: sm6125: Add apps_smmu with streamID to SDHCI 1/2 nodes When enabling the APPS SMMU the mainline driver reconfigures the SMMU from its bootloader configuration, losing the stream mapping for (among which) the SDHCI hardware and breaking its ADMA feature. This feature can be disabled with: sdhci.debug_quirks=0x40 But it is of course desired to have this feature enabled and working through the SMMU. Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Reviewed-by: Martin Botka Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221222193254.126925-4-marijn.suijten@somainline.org commit 8ddb4bc3d3b52e0a560a18e4d739c83f56efe7c9 Author: Martin Botka Date: Thu Dec 22 20:32:52 2022 +0100 arm64: dts: qcom: sm6125: Configure APPS SMMU Add a node for the APPS SMMU, to which various devices such as USB and storage nodes are connected. [Marijn: add the new, generic, "qcom,smmu-500" compatible, add patch description, reorder # properties] Signed-off-by: Martin Botka Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221222193254.126925-3-marijn.suijten@somainline.org commit 8416262b0ea46d84767141b074748f4d4f37736a Author: Marijn Suijten Date: Fri Dec 16 22:33:43 2022 +0100 arm64: dts: qcom: sm6125: Reorder HSUSB PHY clocks to match bindings Reorder the clocks and corresponding names to match the QUSB2 phy schema, fixing the following CHECK_DTBS errors: arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dtb: phy@1613000: clock-names:0: 'cfg_ahb' was expected From schema: /newdata/aosp-r/kernel/mainline/kernel/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dtb: phy@1613000: clock-names:1: 'ref' was expected From schema: /newdata/aosp-r/kernel/mainline/kernel/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml Fixes: cff4bbaf2a2d ("arm64: dts: qcom: Add support for SM6125") Signed-off-by: Marijn Suijten Reviewed-by: Martin Botka Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221216213343.1140143-1-marijn.suijten@somainline.org commit fa7ff6e9f14a05f304587ba566a4f445a2a74aa6 Author: Marijn Suijten Date: Thu Dec 22 21:36:36 2022 +0100 arm64: dts: qcom: sm6125-seine: Lock eMMC and SD Card IDs via aliases Ensure the eMMC and SD Card always have a predictable slot index by predetermining them via aliases. Signed-off-by: Marijn Suijten Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221222203636.250190-6-marijn.suijten@somainline.org commit d696b1618bc1a416a4ab72a1176cfdf187ca09bf Author: Marijn Suijten Date: Thu Dec 22 21:36:35 2022 +0100 arm64: dts: qcom: sm6125-seine: Configure SD Card slot on SDHCI 2 Sony's seine board features an SD Card slot on SDHCI 2, that is to be powered by l5 and l22. The card detect pin is already biased via updates on the generic sdc2_*_state pinctrl nodes. As usual regulator voltages are decreased to the maximum voted by the downstream driver for safety. SDHCI 2 is the only hardware block feeding off of these. Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221222203636.250190-5-marijn.suijten@somainline.org commit 68aadbe7805901b52b18595dcbe36442ebf26d93 Author: Marijn Suijten Date: Thu Dec 22 21:36:34 2022 +0100 arm64: dts: qcom: sm6125-seine: Provide regulators to SDHCI 1 While SDHCI 1 appears to work out of the box, we cannot rely on the bootloader-enabled regulators nor expect them to remain enabled (e.g. when finally dropping pd_ignore_unused). Provide it the necessary l24 and l11 regulators now that PM6125 regulators have been made available on this board. As usual regulator voltages are decreased to the maximum voted by the downstream driver for safety. No other hardware feeds off of these regulators anyway (except UFS, which isn't used on the seine board in favour of a DV6DMB eMMC card connected to SDHCI 1). Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221222203636.250190-4-marijn.suijten@somainline.org commit 232bb8073b5b3ec043459b34535542ea5ca81694 Author: Marijn Suijten Date: Thu Dec 22 21:36:33 2022 +0100 arm64: dts: qcom: sm6125-seine: Provide regulators to HS USB2 PHY Document the use of l7, l10 and l15 in the High Speed Qualcomm USB2 PHY, in order to keep the regulators voted on when USB is active. Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221222203636.250190-3-marijn.suijten@somainline.org commit 7421a8d2f1394ee9f8b5fd87121f055e56ab4e60 Author: Marijn Suijten Date: Thu Dec 22 21:36:32 2022 +0100 arm64: dts: qcom: sm6125-seine: Configure PM6125 regulators Configure PM6125 regulators based on availability and voltages defined downstream, to allow powering up (and/or keeping powered) other hardware blocks going forward. Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221222203636.250190-2-marijn.suijten@somainline.org commit c045154c30f1cf8d96e3f32269c155b3706a1669 Author: Marijn Suijten Date: Thu Dec 22 22:01:40 2022 +0100 clk: qcom: dispcc-sm6125: Fix compatible string to match bindings According to generic rules the SoC name should be first: arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dtb: clock-controller@5f00000: compatible: 'oneOf' conditional failed, one must be fixed: 'qcom,dispcc-sm6125' does not match '^qcom,(apq|ipq|mdm|msm|qcm|qcs|sa|sc|sdm|sdx|sm)[0-9]+-.*$' And this is already reflected by the bindings submitted prior to the addition of this driver. Any DTS following these rules will end up with a non-probing driver because of this mismatch. Fixes: 6e87c8f07407 ("clk: qcom: Add display clock controller driver for SM6125") Signed-off-by: Marijn Suijten Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221222210140.278077-1-marijn.suijten@somainline.org commit a40f5ae1ea64ab9e981faf47c31817dc4d7923e4 Author: Marijn Suijten Date: Thu Dec 22 22:59:06 2022 +0100 arm64: dts: qcom: sm6350-lena: Flatten gpio-keys pinctrl state Pinctrl states typically collate multiple related pins. In the case of gpio-keys there's no hardware-defined relation at all except all pins representing a key; and especially on Sony's lena board there's only one pin regardless. Flatten it similar to other boards [1]. As a drive-by fix, clean up the label string. [1]: https://lore.kernel.org/linux-arm-msm/11174eb6-0a9d-7df1-6f06-da4010f76453@linaro.org/ Fixes: 2b8bbe985659 ("arm64: dts: qcom: sm6350-lena: Include pm6350 and configure buttons") Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221222215906.324092-1-marijn.suijten@somainline.org commit ff114e399e746e07df56bad1b4aaf540f37d579d Author: Bryan O'Donoghue Date: Fri Dec 23 02:10:25 2022 +0000 arm64: dts: qcom: sm8250: Add compat qcom,sm8250-dsi-ctrl Add silicon specific compatible qcom,sm8250-dsi-ctrl to the mdss-dsi-ctrl block. This allows us to differentiate the specific bindings for sm8250 against the yaml documentation. Reviewed-by: Dmitry Baryshkov Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221223021025.1646636-19-bryan.odonoghue@linaro.org commit a1a685c312f5bcc6fbf35b647d3bc5cfc6f70c7d Author: Bryan O'Donoghue Date: Fri Dec 23 02:10:24 2022 +0000 arm64: dts: qcom: sdm845: Add compat qcom,sdm845-dsi-ctrl Add silicon specific compatible qcom,sdm845-dsi-ctrl to the mdss-dsi-ctrl block. This allows us to differentiate the specific bindings for sdm845 against the yaml documentation. Reviewed-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221223021025.1646636-18-bryan.odonoghue@linaro.org commit 3381020a778c559c95e31af6d868ad059fbd65e8 Author: Bryan O'Donoghue Date: Fri Dec 23 02:10:23 2022 +0000 arm64: dts: qcom: sdm660: Add compat qcom,sdm660-dsi-ctrl Add silicon specific compatible qcom,sdm660-dsi-ctrl to the mdss-dsi-ctrl block. This allows us to differentiate the specific bindings for sdm660 against the yaml documentation. Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221223021025.1646636-17-bryan.odonoghue@linaro.org commit 197d28d46315353cfc91d8519b8b561ab08a02cc Author: Bryan O'Donoghue Date: Fri Dec 23 02:10:22 2022 +0000 arm64: dts: qcom: sdm630: Add compat qcom,sdm660-dsi-ctrl The sdm630 can use the sdm660 mdss-dsi-ctrl compat. Currently it has the same set of binding dependencies as sdm660. Suggested-by: Dmitry Baryshkov Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221223021025.1646636-16-bryan.odonoghue@linaro.org commit 5b5e4ac378e5d2b1f881c8a6ea0ae827201ee07d Author: Bryan O'Donoghue Date: Fri Dec 23 02:10:21 2022 +0000 arm64: dts: qcom: sc7280: Add compat qcom,sc7280-dsi-ctrl Add silicon specific compatible qcom,sc7280-dsi-ctrl to the mdss-dsi-ctrl block. This allows us to differentiate the specific bindings for sc7280 against the yaml documentation. Reviewed-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221223021025.1646636-15-bryan.odonoghue@linaro.org commit a45d0641d110e81826710aa92711e1c2eedecb43 Author: Bryan O'Donoghue Date: Fri Dec 23 02:10:20 2022 +0000 arm64: dts: qcom: sc7180: Add compat qcom,sc7180-dsi-ctrl Add silicon specific compatible qcom,sc7180-dsi-ctrl to the mdss-dsi-ctrl block. This allows us to differentiate the specific bindings for sc7180 against the yaml documentation. Reviewed-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221223021025.1646636-14-bryan.odonoghue@linaro.org commit 5ebe4191286add92e8560915aaeb803578407f12 Author: Bryan O'Donoghue Date: Fri Dec 23 02:10:19 2022 +0000 arm64: dts: qcom: msm8996: Add compat qcom,msm8996-dsi-ctrl Add silicon specific compatible qcom,msm8996-dsi-ctrl to the mdss-dsi-ctrl block. This allows us to differentiate the specific bindings for msm8996 against the yaml documentation. Reviewed-by: Dmitry Baryshkov Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221223021025.1646636-13-bryan.odonoghue@linaro.org commit 634ecbc6b17ac2beea4d64f84df629520306e8cc Author: Bryan O'Donoghue Date: Fri Dec 23 02:10:18 2022 +0000 arm64: dts: qcom: msm8953: Add compat qcom,msm8953-dsi-ctrl Add silicon specific compatible qcom,msm8953-dsi-ctrl to the mdss-dsi-ctrl block. This allows us to differentiate the specific bindings for msm8953 against the yaml documentation. Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221223021025.1646636-12-bryan.odonoghue@linaro.org commit cd8cecc723671016a28f88ab13ee31642cb9e391 Author: Bryan O'Donoghue Date: Fri Dec 23 02:10:17 2022 +0000 arm64: dts: qcom: msm8916: Add compat qcom,msm8916-dsi-ctrl Add silicon specific compatible qcom,msm8916-dsi-ctrl to the mdss-dsi-ctrl block. This allows us to differentiate the specific bindings for msm8916 against the yaml documentation. Reviewed-by: Dmitry Baryshkov Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221223021025.1646636-11-bryan.odonoghue@linaro.org commit e280bcc26337f508d1c7ba79b66cb18bd10470fb Author: Bryan O'Donoghue Date: Fri Dec 23 02:10:16 2022 +0000 ARM: dts: qcom: msm8974: Add compat qcom,msm8974-dsi-ctrl Add silicon specific compatible qcom,msm8974-dsi-ctrl to the mdss-dsi-ctrl block. This allows us to differentiate the specific bindings for msm8974 against the yaml documentation. Reviewed-by: Dmitry Baryshkov Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221223021025.1646636-10-bryan.odonoghue@linaro.org commit 5cea1fa12bc37ae2beebea41ad7da4beb0bc14e2 Author: Bryan O'Donoghue Date: Fri Dec 23 02:10:15 2022 +0000 ARM: dts: qcom: apq8064: add compat qcom,apq8064-dsi-ctrl Append silicon specific compatible qcom,apq8064-dsi-ctrl to the mdss-dsi-ctrl block. This allows us to differentiate the specific bindings for apq8064 against the yaml documentation. Reviewed-by: David Heidelberg Reviewed-by: Dmitry Baryshkov Signed-off-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221223021025.1646636-9-bryan.odonoghue@linaro.org commit 06a0676b5de9221537156957b90b2b69dfceebba Author: Krzysztof Kozlowski Date: Fri Dec 23 17:18:35 2022 +0100 arm64: dts: qcom: sm8350: align MMC node names with DT schema The bindings expect "mmc" for MMC/SDHCI nodes: sm8350-sony-xperia-sagami-pdx214.dtb: sdhci@8804000: $nodename:0: 'sdhci@8804000' does not match '^mmc(@.*)?$' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221223161835.112079-4-krzysztof.kozlowski@linaro.org commit 4cd90875c7208670d5f0d644c6f618f8aa1efc6f Author: Krzysztof Kozlowski Date: Fri Dec 23 17:18:34 2022 +0100 ARM: dts: qcom: sdx65: add specific compatible for USB HS PHY Add SoC-specific compatible to the USB HS PHY to match other devices and bindings. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221223161835.112079-3-krzysztof.kozlowski@linaro.org commit bf07cc87c14ad51ce147a1efa83f5735f6f99916 Author: Krzysztof Kozlowski Date: Fri Dec 23 17:18:33 2022 +0100 ARM: dts: qcom: sdx55: add specific compatible for USB HS PHY Add SoC-specific compatible to the USB HS PHY to match other devices and bindings. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221223161835.112079-2-krzysztof.kozlowski@linaro.org commit 9472edb3e7ea08ada9d19a9cfc1bee7de6edee75 Author: Alex Elder Date: Fri Dec 23 18:21:26 2022 -0600 arm64: dts: qcom: sc7280: only enable IPA for boards with a modem IPA is only needed on a platform if it includes a modem, and not all SC7280 SoC variants do. The file "sc7280-herobrine-lte-sku.dtsi" is used to encapsulate definitions related to Chrome OS SC7280 devices where a modem is present, and that's the proper place for the IPA node to be enabled. Currently IPA is enabled in "sc7280-idp.dtsi", which is included by DTS files for Qualcomm reference platforms (all of which include the modem). That also includes "sc7280-herobrine-lte-sku.dtsi", so enabling IPA there would make it unnecessary for "sc7280-idp.dtsi" to enable it. The only other place IPA is enabled is "sc7280-qcard.dtsi". That file is included only by "sc7280-herobrine.dtsi", which is (eventually) included only by these top-level DTS files: sc7280-herobrine-crd.dts sc7280-herobrine-herobrine-r1.dts sc7280-herobrine-evoker.dts sc7280-herobrine-evoker-lte.dts sc7280-herobrine-villager-r0.dts sc7280-herobrine-villager-r1.dts sc7280-herobrine-villager-r1-lte.dts All of but two of these include "sc7280-herobrine-lte-sku.dtsi", and for those cases, enabling IPA there means there is no need for it to be enabled in "sc7280-qcard.dtsi". The two remaining cases will no longer enable IPA as a result of this change: sc7280-herobrine-evoker.dts sc7280-herobrine-villager-r1.dts Both of these have "lte" counterparts, and are meant to represent board variants that do *not* have a modem. This is exactly the desired configuration. Signed-off-by: Alex Elder Reviewed-by: Sibi Sankar Tested-by: Sibi Sankar Reviewed-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221224002126.1518552-1-elder@linaro.org commit 8ea261588fe98d171fcecf477a9f27aea8a06fd0 Author: Krzysztof Kozlowski Date: Wed Dec 28 12:24:56 2022 +0100 arm64: dts: qcom: sm8350-sony-xperia-sagami: specify which LDO modes are allowed This board uses RPMH, specifies "regulator-allow-set-load" for LDOs, but doesn't specify any modes with "regulator-allowed-modes": sm8350-sony-xperia-sagami-pdx214.dtb: regulators-0: ldo5: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221228112456.31348-2-krzysztof.kozlowski@linaro.org commit 98874a46686b78d2f303de1a898b7b7cc611e30c Author: Konrad Dybcio Date: Thu Dec 29 11:05:10 2022 +0100 arm64: dts: qcom: sm8150: Wire up MDSS Add required nodes for MDSS and hook up provided clocks in DISPCC. This setup is almost identical to 8[23]50. Tested-by: Marijn Suijten # Xperia 5 Reviewed-by: Marijn Suijten Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221229100511.979972-3-konrad.dybcio@linaro.org commit 2ef3bb17c45c5b83204a845bbe4045eed11bc759 Author: Konrad Dybcio Date: Thu Dec 29 11:05:09 2022 +0100 arm64: dts: qcom: sm8150: Add DISPCC node Years after the SoC support has been added, it's high time for it to get dispcc going. Add the node to ensure that. Tested-by: Marijn Suijten # Xperia 5 Reviewed-by: Marijn Suijten Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221229100511.979972-2-konrad.dybcio@linaro.org commit ac1d8a8e2eb5bd67e266e3121bb6b39b7f28a9ec Author: Krzysztof Kozlowski Date: Thu Dec 29 14:27:31 2022 +0100 arm64: dts: qcom: sm8250: add cache size Add full cache description to DTS to avoid: 1. "Early cacheinfo failed" warnings, 2. Cache topology detection which leads to early memory allocations and "BUG: sleeping function called from invalid context" on PREEMPT_RT kernel: smp: Bringing up secondary CPUs ... Detected VIPT I-cache on CPU1 BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:46 in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 0, name: swapper/1 preempt_count: 1, expected: 0 RCU nest depth: 1, expected: 1 3 locks held by swapper/1/0: #0: ffff5e337eee5f18 (&pcp->lock){+.+.}-{3:3}, at: get_page_from_freelist+0x20c/0xffc #1: ffffa9e24a900b18 (rcu_read_lock){....}-{1:3}, at: rt_spin_trylock+0x40/0xe4 #2: ffff5e337efc8918 (&zone->lock){+.+.}-{3:3}, at: rmqueue_bulk+0x54/0x720 irq event stamp: 0 Call trace: __might_resched+0x17c/0x214 rt_spin_lock+0x5c/0x100 rmqueue_bulk+0x54/0x720 get_page_from_freelist+0xcfc/0xffc __alloc_pages+0xec/0x1150 alloc_page_interleave+0x1c/0xd0 alloc_pages+0xec/0x160 new_slab+0x330/0x454 ___slab_alloc+0x5b8/0xba0 __kmem_cache_alloc_node+0xf4/0x20c __kmalloc+0x60/0x100 detect_cache_attributes+0x2a8/0x5a0 update_siblings_masks+0x28/0x300 store_cpu_topology+0x58/0x70 secondary_start_kernel+0xc8/0x154 Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221229132731.1193713-1-krzysztof.kozlowski@linaro.org commit 9435294c6517dc70bb608505b79097a58ea7c6a3 Author: Pierre Gondois Date: Mon Nov 7 16:57:09 2022 +0100 arm64: dts: qcom: Update cache properties The DeviceTree Specification v0.3 specifies that the cache node 'compatible' and 'cache-level' properties are 'required'. Cf. s3.8 Multi-level and Shared Cache Nodes The 'cache-unified' property should be present if one of the properties for unified cache is present ('cache-size', ...). Update the Device Trees accordingly. About msm8953.dtsi: According to the Devicetree Specification v0.3, s3.7.3 'Internal (L1) Cache Properties', cache-unified: If present, specifies the cache has a unified or- ganization. If not present, specifies that the cache has a Harvard architecture with separate caches for instructions and data. Plus, the 'cache-level' property seems to be reserved to higher cache levels (cf s3.8). To describe a l1 data/instruction cache couple, no cache information should be described. Remove the l1 cache nodes. Signed-off-by: Pierre Gondois [bjorn: Moved "qcom" to $subject prefix] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221107155825.1644604-17-pierre.gondois@arm.com commit dcc7cd5c46ca5e7bb8e4910ed8259597439c7246 Author: Konrad Dybcio Date: Thu Dec 29 11:27:12 2022 +0100 arm64: dts: qcom: sm8350-sagami: Rectify GPIO keys With enough pins set properly, the hardware buttons now also work like a charm. Fixes: c2721b0c23d9 ("arm64: dts: qcom: Add support for Xperia 1 III / 5 III") Tested-by: Marijn Suijten # On Xperia 1 III and Xperia 5 III Reviewed-by: Marijn Suijten Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221229102712.983306-1-konrad.dybcio@linaro.org commit bd445a04d8ca4104c6831148134cd637b135d9f1 Author: Matti Lehtimäki Date: Sun Dec 18 23:19:57 2022 +0200 ARM: dts: qcom: apq8026-samsung-matisse-wifi: Enable ADSP Configure the reserved memory for ADSP and enable it. Delete nodes with reference to label. Signed-off-by: Matti Lehtimäki Reviewed-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221218211957.118473-1-matti.lehtimaki@gmail.com commit b07de94d4501c61a3015cb0035227e449c51d87e Merge: 4e1ce304ea192 27c653c06505f Author: Palmer Dabbelt Date: Thu Dec 29 06:59:55 2022 -0800 Merge patch series "Allow calls in alternatives" Heiko Stuebner says: From: Heiko Stuebner This series is split out of my work on optimizing string functions and provides the basics to: - actually allowing calls in alternatives Function calls use auipc + jalr to reach those 32bit relative addresses but when they're compiled the offset will be wrong as alternatives live in a different section. So when the patch gets applied the address will point to the wrong location. So similar to arm64 the target addresses need to be updated. This is probably also helpful for other things needing more complex code in alternatives. For v2 I got into some sort of cleanup spree for the general instruction parsing that already existed. A number of places do their own instruction parsing and I tried consolidating some of them. Noteable, the kvm parts still do, but I had to stop somewhere :-) * b4-shazam-merge: RISC-V: fix auipc-jalr addresses in patched alternatives RISC-V: add helpers for handling immediates in U-type and I-type pairs RISC-V: add rd reg parsing to insn.h header RISC-V: add U-type imm parsing to insn.h header RISC-V: kprobes: use central defined funct3 constants RISC-V: rename parse_asm.h to insn.h RISC-V: Move riscv_insn_is_* macros into a common header RISC-V: add auipc elements to parse_asm header RISC-V: add ebreak instructions to definitions RISC-V: detach funct-values from their offset RISC-V: add prefix to all constants/macros in parse_asm.h RISC-V: fix funct4 definition for c.jalr in parse_asm.h Link: https://lore.kernel.org/r/20221223221332.4127602-1-heiko@sntech.de Signed-off-by: Palmer Dabbelt commit 27c653c06505f084bcb57f7575916d60efb32279 Author: Heiko Stuebner Date: Fri Dec 23 23:13:32 2022 +0100 RISC-V: fix auipc-jalr addresses in patched alternatives Alternatives live in a different section, so addresses used by call functions will point to wrong locations after the patch got applied. Similar to arm64, adjust the location to consider that offset. Reviewed-by: Conor Dooley Reviewed-by: Andrew Jones Reviewed-by: Lad Prabhakar Tested-by: Lad Prabhakar Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20221223221332.4127602-13-heiko@sntech.de Signed-off-by: Palmer Dabbelt commit 47f05757d3d898b4756d6d5c06e77a37337823e9 Author: Heiko Stuebner Date: Fri Dec 23 23:13:31 2022 +0100 RISC-V: add helpers for handling immediates in U-type and I-type pairs Used together U-type and I-type instructions can for example be used to generate bigger jumps (i.e. in auipc+jalr pairs) by splitting the value into an upper immediate (i.e. auipc) and a 12bit immediate (i.e. jalr). Due to both immediates being considered signed this creates some corner cases, so add some helper to prevent this from getting duplicated in different places. Reviewed-by: Conor Dooley Reviewed-by: Andrew Jones Reviewed-by: Lad Prabhakar Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20221223221332.4127602-12-heiko@sntech.de Signed-off-by: Palmer Dabbelt commit 088ec01fce4eaba17ada8b1831be0c172c941657 Author: Heiko Stuebner Date: Fri Dec 23 23:13:30 2022 +0100 RISC-V: add rd reg parsing to insn.h header Add a macro to allow parsing of the rd register from an instruction. Reviewed-by: Conor Dooley Reviewed-by: Andrew Jones Reviewed-by: Lad Prabhakar Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20221223221332.4127602-11-heiko@sntech.de Signed-off-by: Palmer Dabbelt commit 8963d6224009d7ac0523a05ceb9ea5d04ad5d12d Author: Heiko Stuebner Date: Fri Dec 23 23:13:29 2022 +0100 RISC-V: add U-type imm parsing to insn.h header Similar to other existing types, allow extracting the immediate for a U-type instruction. U-type immediates are special in that regard, that the value in the instruction in bits [31:12] already represents the same bits of the immediate, so no shifting is required. U-type immediates are for example used in the auipc instruction, so these constants make it easier to parse such instructions. Reviewed-by: Conor Dooley Reviewed-by: Andrew Jones Reviewed-by: Lad Prabhakar Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20221223221332.4127602-10-heiko@sntech.de Signed-off-by: Palmer Dabbelt commit debe28d0a52e972ab4d735ea2e12c2f88ec19d7c Author: Heiko Stuebner Date: Fri Dec 23 23:13:28 2022 +0100 RISC-V: kprobes: use central defined funct3 constants Don't redefine values that are already available in the central header asm/insn.h . Use the values from there instead. Reviewed-by: Conor Dooley Reviewed-by: Andrew Jones Reviewed-by: Lad Prabhakar Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20221223221332.4127602-9-heiko@sntech.de Signed-off-by: Palmer Dabbelt commit c9c1af3f186a2bdb828792658bb32b518edba692 Author: Heiko Stuebner Date: Fri Dec 23 23:13:27 2022 +0100 RISC-V: rename parse_asm.h to insn.h The current parse_asm header should become a more centralized place for everything concerning parsing and constructing instructions. We already have a header insn-def.h similar to aarch64, so rename parse_asm.h to insn.h (again similar to aarch64) to show that it's meant for more than simple instruction parsing. Reviewed-by: Conor Dooley Reviewed-by: Andrew Jones Reviewed-by: Lad Prabhakar Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20221223221332.4127602-8-heiko@sntech.de Signed-off-by: Palmer Dabbelt commit ec5f908775160d4d635f99cbad9a5ea138894038 Author: Heiko Stuebner Date: Fri Dec 23 23:13:26 2022 +0100 RISC-V: Move riscv_insn_is_* macros into a common header Right now the riscv kernel has (at least) two independent sets of functions to check if an encoded instruction is of a specific type. One in kgdb and one kprobes simulate-insn code. More parts of the kernel will probably need this in the future, so instead of allowing this duplication to go on further, move macros that do the function declaration in a common header, similar to at least aarch64. Reviewed-by: Conor Dooley Reviewed-by: Andrew Jones Reviewed-by: Lad Prabhakar Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20221223221332.4127602-7-heiko@sntech.de Signed-off-by: Palmer Dabbelt commit cde4a69302a4a57374a9daa463c493ff45038c99 Author: Heiko Stuebner Date: Fri Dec 23 23:13:25 2022 +0100 RISC-V: add auipc elements to parse_asm header Instruction parsing should not be done in individual code, but instead supported by central Right now kgdb and kprobes parse instructions and at least kprobes (and the upcoming auipc+jalr alternative fixer-function) need the auipc instruction. Reviewed-by: Conor Dooley Reviewed-by: Andrew Jones Reviewed-by: Lad Prabhakar Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20221223221332.4127602-6-heiko@sntech.de Signed-off-by: Palmer Dabbelt commit 2621cac76f84c39a0e828f644bb04767efe50981 Author: Heiko Stuebner Date: Fri Dec 23 23:13:24 2022 +0100 RISC-V: add ebreak instructions to definitions kprobes need to match ebreak instructions, so add the necessary data to enable us to centralize that functionality. Reviewed-by: Conor Dooley Reviewed-by: Andrew Jones Reviewed-by: Lad Prabhakar Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20221223221332.4127602-5-heiko@sntech.de Signed-off-by: Palmer Dabbelt commit 33e41480b233eb3ae8e3b523062a1916693ac267 Author: Heiko Stuebner Date: Fri Dec 23 23:13:23 2022 +0100 RISC-V: detach funct-values from their offset Rather than defining funct3, funct4, etc values pre-shifted to their target-position in an instruction, define the values themselves and only shift them where needed. This allows using these funct-values in other places as well, for example when decoding functions. At the same time also reduces the use of magic numbers, one would need a spec manual to understand. Reviewed-by: Conor Dooley Reviewed-by: Andrew Jones Reviewed-by: Lad Prabhakar Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20221223221332.4127602-4-heiko@sntech.de Signed-off-by: Palmer Dabbelt commit bf0cc402d7cd4277ece55dd0ace6be43916f713b Author: Heiko Stuebner Date: Fri Dec 23 23:13:22 2022 +0100 RISC-V: add prefix to all constants/macros in parse_asm.h Some of the constants and macros already have suitable RV_, RVG_ or RVC_ prefixes. Extend this to the rest of the file as well, as we want to use these things in a broader scope soon. Reviewed-by: Conor Dooley Reviewed-by: Andrew Jones Reviewed-by: Lad Prabhakar Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20221223221332.4127602-3-heiko@sntech.de Signed-off-by: Palmer Dabbelt commit a3775634f6da23f5511d0282d7e792cf606e5f3b Author: Heiko Stuebner Date: Fri Dec 23 23:13:21 2022 +0100 RISC-V: fix funct4 definition for c.jalr in parse_asm.h The opcode definition for c.jalr is c.jalr c_rs1_n0 1..0=2 15..13=4 12=1 6..2=0 This means funct4 consisting of bit [15:12] is 1001b, so the value is 0x9. Fixes: edde5584c7ab ("riscv: Add SW single-step support for KDB") Reported-by: Andrew Jones Reviewed-by: Andrew Jones Reviewed-by: Lad Prabhakar Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20221223221332.4127602-2-heiko@sntech.de Signed-off-by: Palmer Dabbelt commit 02c9e5b768b26239be7459438275f8fc835e9dc4 Author: Yang Yingliang Date: Thu Dec 29 18:38:37 2022 +0800 spi: spi-altera-platform: switch to use modern name Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221229103837.4192759-4-yangyingliang@huawei.com Signed-off-by: Mark Brown commit ec168190c1cace92cba22ffa2048e79f41ba5a13 Author: Yang Yingliang Date: Thu Dec 29 18:38:36 2022 +0800 spi: spi-altera-dfl: switch to use modern name Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221229103837.4192759-3-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 26c48aea147cbf3dcec1df67d0684457ddf00fea Author: Yang Yingliang Date: Thu Dec 29 18:38:35 2022 +0800 spi: altera: switch to use modern name Change legacy name master/slave to modern name host/target or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221229103837.4192759-2-yangyingliang@huawei.com Signed-off-by: Mark Brown commit c1b9c2f02ed796a6cbbfceacb14f7c5f5c7ac94f Author: Krzysztof Kozlowski Date: Sat Dec 24 16:42:10 2022 +0100 ASoC: dt-bindings: cirrus,cs35l41: cleanup $ref and example Non-functional cleanup: 1. Drop unneeded quotes form $ref, 2. Example: Use generic node name, use define for GPIO flag, adjust indentation to consistent 4-space style. Signed-off-by: Krzysztof Kozlowski Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20221224154210.43356-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 642e4f9bdac8d42d5047312e76bab7ceaf4c131e Author: Krzysztof Kozlowski Date: Sat Dec 24 16:42:09 2022 +0100 ASoC: dt-bindings: cirrus,cs35l41: add interrupts Both DTS (SM8250 and SM8350 based Sony Xperia boards) and Linux driver mention interrupt, so allow it to fix: sm8350-sony-xperia-sagami-pdx215.dtb: cs35l41@41: Unevaluated properties are not allowed ('interrupt-parent', 'interrupts' were unexpected) Signed-off-by: Krzysztof Kozlowski Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20221224154210.43356-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit e6f0d6a30f734e74929510a563e5d1eeb9575fa1 Author: Abel Vesa Date: Sat Dec 3 01:20:54 2022 +0200 interconnect: qcom: Add SM8550 interconnect provider driver Add driver for the Qualcomm interconnect buses found in SM8550 based platforms. The topology consists of several NoCs that are controlled by a remote processor that collects the aggregated bandwidth for each master-slave pairs. Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20221202232054.2666830-3-abel.vesa@linaro.org Signed-off-by: Georgi Djakov commit 66773faf054b9d8c11e126f47e24b1dabdadb4d8 Author: Abel Vesa Date: Sat Dec 3 01:20:53 2022 +0200 dt-bindings: interconnect: Add Qualcomm SM8550 The Qualcomm SM8550 SoC has several bus fabrics that could be controlled and tuned dynamically according to the bandwidth demand. Signed-off-by: Abel Vesa Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221202232054.2666830-2-abel.vesa@linaro.org Signed-off-by: Georgi Djakov commit 30465003ad776a922c32b2dac58db14f120f037e Author: Dave Marchevsky Date: Sat Dec 17 00:24:57 2022 -0800 bpf: rename list_head -> graph_root in field info types Many of the structs recently added to track field info for linked-list head are useful as-is for rbtree root. So let's do a mechanical renaming of list_head-related types and fields: include/linux/bpf.h: struct btf_field_list_head -> struct btf_field_graph_root list_head -> graph_root in struct btf_field union kernel/bpf/btf.c: list_head -> graph_root in struct btf_field_info This is a nonfunctional change, functionality to actually use these fields for rbtree will be added in further patches. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20221217082506.1570898-5-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit 3176c4d6b9beba4a554bebba6b19b56942705a28 Author: Gabriela David Date: Wed Dec 7 19:30:46 2022 +0100 arm64: dts: qcom: sdm632: Add device tree for Motorola G7 Power Add device tree for the Motorola G7 Power (ocean) smartphone. This device is based on Snapdragon 632 (sdm632) SoC which is a variant of MSM8953. Signed-off-by: Gabriela David Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221207-msm8953-6-1-next-dtbs-v3-v3-9-a64b3b0af0eb@z3ntu.xyz commit aa17e707e04a0446de5e40f74aac979582185559 Author: Eugene Lepshy Date: Wed Dec 7 19:30:45 2022 +0100 arm64: dts: qcom: msm8953: Add device tree for Xiaomi Redmi 5 Plus Add device tree for the Xiaomi Redmi 5 Plus (vince) smartphone. This device is based on Snapdragon 625 (msm8953) SoC. Signed-off-by: Eugene Lepshy Co-developed-by: Gianluca Boiano Signed-off-by: Gianluca Boiano Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221207-msm8953-6-1-next-dtbs-v3-v3-8-a64b3b0af0eb@z3ntu.xyz commit cf152c05eb35afc9db3c9480ce17b27a703b2893 Author: Danila Tikhonov Date: Wed Dec 7 19:30:44 2022 +0100 arm64: dts: qcom: msm8953: Add device tree for Xiaomi Mi A1 Add device tree for the Xiaomi Mi A1 (tissot) smartphone. This device is based on Snapdragon 625 (msm8953) SoC. Co-developed-by: Anton Bambura Signed-off-by: Anton Bambura Signed-off-by: Danila Tikhonov Signed-off-by: Vladimir Lypak Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221207-msm8953-6-1-next-dtbs-v3-v3-7-a64b3b0af0eb@z3ntu.xyz commit c144005129b09141b292820d35f0094e54b12d6d Author: Adam Skladowski Date: Wed Dec 7 19:30:43 2022 +0100 arm64: dts: qcom: msm8953: Add device tree for Xiaomi Redmi Note 4X Add device tree for the Xiaomi Redmi Note 4X (mido) smartphone. This device is based on Snapdragon 625 (msm8953) SoC. Signed-off-by: Adam Skladowski Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221207-msm8953-6-1-next-dtbs-v3-v3-6-a64b3b0af0eb@z3ntu.xyz commit 38d779c26395df5f7f66bb5da7af6241180283e1 Author: Alejandro Tafalla Date: Wed Dec 7 19:30:42 2022 +0100 arm64: dts: qcom: msm8953: Add device tree for Xiaomi Mi A2 Lite Add device tree for the Xiaomi Mi A2 Lite (daisy) smartphone. This device is based on Snapdragon 625 (msm8953) SoC. Signed-off-by: Alejandro Tafalla Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221207-msm8953-6-1-next-dtbs-v3-v3-5-a64b3b0af0eb@z3ntu.xyz commit 4ccd0dd6a3d2a98b11664992012af04cb0ce8f6c Author: Sireesh Kodali Date: Wed Dec 7 19:30:41 2022 +0100 arm64: dts: qcom: msm8953: Add device tree for Motorola G5 Plus Add device tree for the Motorola G5 Plus (potter) smartphone. This device is based on Snapdragon 625 (msm8953) SoC. Signed-off-by: Sireesh Kodali Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221207-msm8953-6-1-next-dtbs-v3-v3-4-a64b3b0af0eb@z3ntu.xyz commit eee5a89b4fe5615ba57fd8048102504aaa052065 Author: Julian Braha Date: Wed Dec 7 19:30:40 2022 +0100 arm64: dts: qcom: sdm450: Add device tree for Motorola Moto G6 Add device tree for the Motorola Moto G6 (ali) smartphone. This device is based on Snapdragon 450 (sdm450) SoC which is a variant of MSM8953. Signed-off-by: Julian Braha Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221207-msm8953-6-1-next-dtbs-v3-v3-3-a64b3b0af0eb@z3ntu.xyz commit eca9ee35e895686d179964dc6f94e6c473d2a171 Author: Luca Weiss Date: Wed Dec 7 19:30:39 2022 +0100 arm64: dts: qcom: msm8953: Adjust reserved-memory nodes Adjust node names so they're not just memory@ but actually show what they're used for. Also add labels to most nodes so we can easily reference them from devices. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221207-msm8953-6-1-next-dtbs-v3-v3-2-a64b3b0af0eb@z3ntu.xyz commit ce77819ac850bbc2308fe89788aacd7cca9c080b Author: Luca Weiss Date: Wed Dec 7 19:30:38 2022 +0100 dt-bindings: arm: qcom: document new msm8953-family devices Document the various phones added in upcoming patches. Also allow qcom,msm-id and qcom,board-id for msm8953 and sdm450. Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221207-msm8953-6-1-next-dtbs-v3-v3-1-a64b3b0af0eb@z3ntu.xyz commit 07eccde43b030bf8129fea1a81c00946c9edf1fe Author: Rayyan Ansari Date: Fri Dec 23 19:34:03 2022 +0000 ARM: dts: qcom: pm8226: add IADC node Add a node for the current ADC (IADC) found in PM8226. Signed-off-by: Rayyan Ansari [bjorn: Updated node name and added specific compatible, per request from Luca Weiss] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221223193403.781355-4-rayyan@ansari.sh commit 79ca56c11e9004ba1b012822a68eb4d57826a721 Author: Rayyan Ansari Date: Fri Dec 23 19:34:02 2022 +0000 ARM: dts: qcom: pm8226: add PON device node along with resin sub-node The PON (Power On) device in PM8226 supports both the power key and resin (reset input). The reset input is usually connected to a physical volume up/down button. Signed-off-by: Rayyan Ansari Reviewed-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221223193403.781355-3-rayyan@ansari.sh commit bc6ecf993b10238b4747261f5b495ecd46a72833 Author: Rayyan Ansari Date: Fri Dec 23 19:34:01 2022 +0000 ARM: dts: qcom: pm8226: sort includes alphabetically and nodes by address Sort the includes and nodes for consistency. Signed-off-by: Rayyan Ansari Reviewed-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221223193403.781355-2-rayyan@ansari.sh commit 51a8f99718573b543197871a652b338c454806cd Author: Melody Olvera Date: Fri Dec 16 15:08:52 2022 -0800 pinctrl: qcom: Add QDU1000/QRU1000 pinctrl driver Add pin control driver for the TLMM block found in the QDU1000 and QRU1000 SoC. Signed-off-by: Melody Olvera Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20221216230852.21691-3-quic_molvera@quicinc.com Signed-off-by: Linus Walleij commit 2daa14811e36fccdc4d130db9be4f959275c6165 Author: Melody Olvera Date: Fri Dec 16 15:08:51 2022 -0800 dt-bindings: pinctrl: qcom: Add QDU1000 and QRU1000 pinctrl Add device tree bindings for QDU1000 and QRU1000 TLMM devices. Signed-off-by: Melody Olvera Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221216230852.21691-2-quic_molvera@quicinc.com Signed-off-by: Linus Walleij commit 84f0b1ea2a7e27f4e0885a9ebf71ae98069513ad Author: Biju Das Date: Thu Dec 15 21:31:58 2022 +0000 dt-bindings: pinctrl: renesas: Add RZ/G2L POEG binding Add device tree bindings for the RZ/G2L Port Output Enable for GPT (POEG). Signed-off-by: Biju Das Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221215213206.56666-2-biju.das.jz@bp.renesas.com Signed-off-by: Linus Walleij commit 5d8ae2928f71f0f9c2c3f8f13d00ecec35649ad3 Author: Arnd Bergmann Date: Thu Dec 15 17:42:54 2022 +0100 pinctrl: at91: convert to NOIRQ_SYSTEM_SLEEP_PM_OPS With the old SET_NOIRQ_SYSTEM_SLEEP_PM_OPS, some configs result in a build warning: drivers/pinctrl/pinctrl-at91.c:1668:12: error: 'at91_gpio_resume' defined but not used [-Werror=unused-function] 1668 | static int at91_gpio_resume(struct device *dev) | ^~~~~~~~~~~~~~~~ drivers/pinctrl/pinctrl-at91.c:1650:12: error: 'at91_gpio_suspend' defined but not used [-Werror=unused-function] 1650 | static int at91_gpio_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~ Signed-off-by: Arnd Bergmann Reviewed-by: Ryan Wanner Link: https://lore.kernel.org/r/20221215164301.934805-1-arnd@kernel.org Signed-off-by: Linus Walleij commit a3a7482a0dbce502331caaa9aa8346e72e84b38d Author: Lukas Bulwahn Date: Thu Dec 15 10:21:28 2022 +0100 pinctrl: mxs: avoid defines prefixed with CONFIG Defines prefixed with "CONFIG" should be limited to proper Kconfig options, that are introduced in a Kconfig file. Here, expressions to convert pin configurations to booleans for pull-up, voltage and mA are macro definitions that begin with "CONFIG". To avoid defines prefixed with "CONFIG", rename these defines to begin with "PIN_CONFIG" instead. No functional change. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20221215092128.3954-1-lukas.bulwahn@gmail.com Signed-off-by: Linus Walleij commit f3cd465bbd15960f30668c7b4a2ac18a0708bc39 Author: Uwe Kleine-König Date: Tue Dec 13 19:23:22 2022 +0100 pinctrl: thunderbay: 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 Link: https://lore.kernel.org/r/20221213182322.962345-1-u.kleine-koenig@pengutronix.de Signed-off-by: Linus Walleij commit b7f44e1249cc2831600802bd43474c75f75a9e0c Author: Uwe Kleine-König Date: Tue Dec 13 19:21:25 2022 +0100 pinctrl: da850-pupd: 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 Link: https://lore.kernel.org/r/20221213182125.929303-1-u.kleine-koenig@pengutronix.de Signed-off-by: Linus Walleij commit df72b4a692b60d3e5d99d9ef662b2d03c44bb9c0 Author: Basavaraj Natikar Date: Thu Dec 8 15:07:04 2022 +0530 pinctrl: amd: Add Z-state wake control bits GPIO registers include Bit 27 for WakeCntrlZ used to enable wake in Z state. Hence add Z-state wake control bits to debugfs output to debug and analyze Z-states problems. Signed-off-by: Basavaraj Natikar Suggested-by: Mario Limonciello Tested-by: Guruvendra Punugupati Link: https://lore.kernel.org/r/20221208093704.1151928-1-Basavaraj.Natikar@amd.com Signed-off-by: Linus Walleij commit 07453245620c075779abefa2a9f469fa336e7510 Author: Xin Liu Date: Fri Dec 23 21:36:18 2022 +0800 libbpf: fix errno is overwritten after being closed. In the ensure_good_fd function, if the fcntl function succeeds but the close function fails, ensure_good_fd returns a normal fd and sets errno, which may cause users to misunderstand. The close failure is not a serious problem, and the correct FD has been handed over to the upper-layer application. Let's restore errno here. Signed-off-by: Xin Liu Link: https://lore.kernel.org/r/20221223133618.10323-1-liuxin350@huawei.com Signed-off-by: Alexei Starovoitov commit fcd343a285cb41894a7bd02dbd675042d394758d Author: Smita Koralahalli Date: Tue Dec 6 11:36:07 2022 -0600 x86/mce: Add support for Extended Physical Address MCA changes Newer AMD CPUs support more physical address bits. That is, the MCA_ADDR registers on Scalable MCA systems contain the ErrorAddr in bits [56:0] instead of [55:0]. Hence, the existing LSB field from bits [61:56] in MCA_ADDR must be moved around to accommodate the larger ErrorAddr size. MCA_CONFIG[McaLsbInStatusSupported] indicates this change. If set, the LSB field will be found in MCA_STATUS rather than MCA_ADDR. Each logical CPU has unique MCA bank in hardware and is not shared with other logical CPUs. Additionally, on SMCA systems, each feature bit may be different for each bank within same logical CPU. Check for MCA_CONFIG[McaLsbInStatusSupported] for each MCA bank and for each CPU. Additionally, all MCA banks do not support maximum ErrorAddr bits in MCA_ADDR. Some banks might support fewer bits but the remaining bits are marked as reserved. [ Yazen: Rebased and fixed up formatting. bp: Massage comments. ] Signed-off-by: Smita Koralahalli Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20221206173607.1185907-5-yazen.ghannam@amd.com commit 2117654e806c08c343e3d0567bbedf33eab040c8 Author: Smita Koralahalli Date: Tue Dec 6 11:36:06 2022 -0600 x86/mce: Define a function to extract ErrorAddr from MCA_ADDR Move MCA_ADDR[ErrorAddr] extraction into a separate helper function. This will be further refactored to support extended ErrorAddr bits in MCA_ADDR in newer AMD CPUs. [ bp: Massage. ] Signed-off-by: Smita Koralahalli Signed-off-by: Borislav Petkov Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Yazen Ghannam Link: https://lore.kernel.org/all/20220225193342.215780-3-Smita.KoralahalliChannabasappa@amd.com/ commit 4c881ab73a64cdbf8691e258ef17b740d27040a0 Author: Dzmitry Sankouski Date: Wed Dec 28 14:52:43 2022 +0300 arm64: dts: qcom: Re-enable resin on MSM8998 and SDM845 boards resin node declaration was moved to pm8998.dtsi file (in disabled state). MSM8998 and SDM845 boards defining resin node did not previously have status="okay" and ended up disabled. Re-enable it by using resin node link from pm8998.dtsi with status="okay". Fixes: f86ae6f23a9e ("arm64: dts: qcom: sagit: add initial device tree for sagit") Signed-off-by: Dzmitry Sankouski Reviewed-by: Marijn Suijten Reported-by: Marijn Suijten Link: https://lore.kernel.org/linux-arm-msm/20221222115922.jlachctn4lxopp7a@SoMainline.org/ Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221228115243.201038-1-dsankouski@gmail.com commit dc58c4d160e72cb28445074c54cc5069bda086a5 Author: Youghandhar Chintala Date: Wed Dec 28 15:11:03 2022 +0530 arm64: dts: qcom: sc7280: Add wifi alias for SC7280-idp Currently, depth-charge Chrome OS bootloader code used in the SC7280 SoC accesses the WiFi node using node names (wifi@). Since depth-charge Chrome OS bootloader is a common code that is used in SoCs having different WiFi chipsets, it is better if the depth-charge Chrome OS bootloader code accesses the WiFi node using a WiFi alias. The advantage of this method is that the depth-charge Chrome OS bootloader code need not be changed for every new WiFi chip. Therefore, add wifi alias entry for SC7280-idp device tree. Signed-off-by: Youghandhar Chintala Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221228094104.356-1-quic_youghand@quicinc.com commit 3abf1f5c18a3f5a8da7f858e0aa5926e59575b1b Author: Johan Hovold Date: Wed Dec 28 09:56:14 2022 +0100 arm64: dts: qcom: sc8280xp-x13s: move 'regulator-vph-pwr' node Move the new 'regulator-vph-pwr' node before the wlan regulator node to restore the root-node sort order (alphabetically by node name). While at it, add a couple of newlines to separate the properties for consistency with the other regulator nodes. Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221228085614.15080-1-johan+linaro@kernel.org commit 40103eabe3d3139a69e5235cf3a86c89214ef584 Author: Steev Klimaszewski Date: Sun Dec 25 18:47:27 2022 -0600 arm64: dts: qcom: c630: Fix firmware paths The firmware paths were pointing to qcom/manufacturer whereas other devices have them under qcom/chipset/manufacturer, so fix this up on the c630, so we follow the same standard setup. Signed-off-by: Steev Klimaszewski Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221226004727.204986-1-steev@kali.org commit 4e1ce304ea192a12e41f44f26c7502908593132d Merge: 1b929c02afd37 3af577f9826fd Author: Palmer Dabbelt Date: Wed Dec 28 11:01:31 2022 -0800 Merge tag 'soc2arch-immutable' of git://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into for-next SOC_FOO to ARCH_FOO conversion for RISC-V RISC-V is an outlier in using SOC_FOO rather than ARCH_FOO for vendors/micro-archs. SOC_FOO may make more sense (I personally prefer it), but the rest of the "world" uses ARCH_FOO. That'd be fine, with with an increasing number of existing SoC vendors moving to RISC-V, unifying our symbol names with the expectations of the rest of the world makes sense. Folks did not seem keen on changing the world (and they can't really be blamed for that) so convert RISC-V over to match. Add some ARCH_FOO stubs alongside the existing SOC_FOO ones, which will be removed once all users of SOC_FOO have been converted*, and convert the DT bits of RISC-V kbuild over to the new symbols. * It may be best to wait until after the next LTS to remove the SOC_FOO ones, for the sake of external users. * tag 'soc2arch-immutable' of git://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: RISC-V: stop directly selecting drivers for SOC_CANAAN RISC-V: stop selecting SiFive clock and serial drivers directly RISC-V: stop selecting the PolarFire SoC clock driver RISC-V: kbuild: convert all use of SOC_FOO to ARCH_FOO RISC-V: kconfig.socs: convert usage of SOC_CANAAN to ARCH_CANAAN RISC-V: introduce ARCH_FOO kconfig aliases for SOC_FOO symbols Signed-off-by: Conor Dooley Signed-off-by: Palmer Dabbelt commit 80f5451d9a7c20d8c09f44f4eb1083fd861d7a46 Author: Konrad Dybcio Date: Tue Dec 13 16:26:16 2022 +0100 clk: qcom: Add camera clock controller driver for SM6350 Add support for the camera clock controller found on SM6350. Signed-off-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221213152617.296426-2-konrad.dybcio@linaro.org commit 7afc1f6977d0b0d1b722aaedf6d9796df9a82325 Author: Konrad Dybcio Date: Tue Dec 13 16:26:15 2022 +0100 dt-bindings: clock: add QCOM SM6350 camera clock bindings Add device tree bindings for camera clock controller for Qualcomm Technology Inc's SM6350 SoC. Signed-off-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221213152617.296426-1-konrad.dybcio@linaro.org commit c8d4a609162e0cf179a99e283a8a621e4c140bec Author: Dmitry Baryshkov Date: Sun Dec 4 14:45:08 2022 +0200 ARM: dts: qcom: msm8974: add clocks and clock-names to mmcc device Add clocks and clock-names nodes to the mmcc device to bind clocks using the DT links. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221204124508.1415713-12-dmitry.baryshkov@linaro.org commit cd1dc49ad4cc773d96092dd871703b165dca2a87 Author: Dmitry Baryshkov Date: Sun Dec 4 14:45:07 2022 +0200 ARM: dts: qcom: msm8974: add clocks and clock-names to gcc device Add clocks and clock-names nodes to the gcc device to bind clocks using the DT links. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221204124508.1415713-11-dmitry.baryshkov@linaro.org commit 60446dc63f5d0be7a5e691caa239417ead885cf0 Author: Dmitry Baryshkov Date: Sun Dec 4 14:45:06 2022 +0200 ARM: dts: qcom: msm8974: add second DSI host and PHY Add second DSI host and PHY available on the msm8974 platform. Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221204124508.1415713-10-dmitry.baryshkov@linaro.org commit e3306941368ae58acf5ba74f6d26653e109e7ef2 Author: Dmitry Baryshkov Date: Fri Dec 9 18:48:55 2022 +0200 clk: qcom: smd-rpm: remove usage of platform name Now that all clocks have individual names, remove the names of SoCs from the SMD RPM clock definitions. Replace it with the common clk_smd_rpm_ prefix. Reviewed-by: Alex Elder Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209164855.128798-20-dmitry.baryshkov@linaro.org commit 598261294658873559b6d37ac3e6a91eb48e2c17 Author: Dmitry Baryshkov Date: Fri Dec 9 18:48:54 2022 +0200 clk: qcom: smd-rpm: rename SMD_RPM_BUS clocks Add special macro for the clocks of QCOM_SMD_RPM_BUS_CLK type. Use it to insert the _bus_N part into the clock symbol name. The system (and userspace) name of these clocks remains intact. Reviewed-by: Konrad Dybcio Reviewed-by: Alex Elder Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209164855.128798-19-dmitry.baryshkov@linaro.org commit 2b8ddf6b820080649176c5695422548114b03f91 Author: Dmitry Baryshkov Date: Fri Dec 9 18:48:53 2022 +0200 clk: qcom: smd-rpm: rename the qcm2290 rf_clk3 clocks Rename the qcm2290_rf_clk3 clocks adding 38m4 prefix to distinguish it from the common (19.2 MHz) rf_clk3. The system (and userspace) name of these clocks remains intact. Reviewed-by: Konrad Dybcio Reviewed-by: Alex Elder Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209164855.128798-18-dmitry.baryshkov@linaro.org commit 74419b8869b02e00890a2bba96469533b6d93bf5 Author: Dmitry Baryshkov Date: Fri Dec 9 18:48:52 2022 +0200 clk: qcom: smd-rpm: rename SMD_RPM_BRANCH clock symbols To ease distinguishing between branch and non-branch clocks (e.g. aggre1_noc, aggre2_noc and qdss) add '_branch' to all SMD_RPM_BRANCH* clocks. The system (and userspace) name of these clocks remains intact. Reviewed-by: Konrad Dybcio Reviewed-by: Alex Elder Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209164855.128798-17-dmitry.baryshkov@linaro.org commit e3c88f236e8567f3f47412438a957c22594caed7 Author: Dmitry Baryshkov Date: Fri Dec 9 18:48:51 2022 +0200 clk: qcom: smd-rpm: simplify SMD_RPM/_BRANCH/_QDSS clock definitions Remove the duplication between the names of the normal and active-only clocks by moving common sufixes to the clock definition macros. This simplifies adding new clock definitions and reviewing existing defs. Reviewed-by: Alex Elder Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209164855.128798-16-dmitry.baryshkov@linaro.org commit ff2cd7401d24ab2d2f031cd9d275412cd669f33b Author: Dmitry Baryshkov Date: Fri Dec 9 18:48:50 2022 +0200 clk: qcom: smd-rpm: simplify XO_BUFFER clocks definitions Remove the duplication between the names of the normal and active-only XO_BUFFER and XO_BUFFER_PINCTRL clocks by using preprocessor logic to add _a suffix. Reviewed-by: Alex Elder Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209164855.128798-15-dmitry.baryshkov@linaro.org commit 786f8d18a8d91d98bd03c6ec41213cb52bcfc2cd Author: Dmitry Baryshkov Date: Fri Dec 9 18:48:49 2022 +0200 clk: qcom: smd-rpm: rename some msm8974 active-only clocks Rename msm8974_diff_a_clk, msm8974_div_a_clk1 and msm8974_div_a_clk2 to move the _a suffix to the end of the name. This follows the pattern used by other active-only clocks and thus makes it possible to simplify clock definitions. This changes the userspace-visible names for this clocks. Reviewed-by: Alex Elder Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209164855.128798-14-dmitry.baryshkov@linaro.org commit 57d44ccecc15e27679499f889c51031f9ffe328e Author: Dmitry Baryshkov Date: Fri Dec 9 18:48:48 2022 +0200 clk: qcom: smd-rpm: move clock definitions together To ease review and reuse group all clock definitions together. Reviewed-by: Alex Elder Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209164855.128798-13-dmitry.baryshkov@linaro.org commit 262caca770f579f13bc04b49e296e6060c4ccce5 Author: Dmitry Baryshkov Date: Fri Dec 9 18:48:47 2022 +0200 clk: qcom: smd-rpm: fix alignment of line breaking backslashes The commit 52a436e0b7fe ("clk: qcom: smd-rpm: Switch to parent_data") introduced ragged right alignment for the line breaking backslash. Fix it to make the code look consistently. Reviewed-by: Alex Elder Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209164855.128798-12-dmitry.baryshkov@linaro.org commit 406f0577b04ff99b8dafaa110a961cf00daab418 Author: Dmitry Baryshkov Date: Fri Dec 9 18:48:46 2022 +0200 clk: qcom: smd-rpm: drop the rpm_status_id field The rpm_status_id field is a leftover from the non-SMD clocks. It is of no use for the SMD-RPM clock driver and is always equal to zero. Drop it completely. Reviewed-by: Konrad Dybcio Reviewed-by: Alex Elder Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209164855.128798-11-dmitry.baryshkov@linaro.org commit 3ab58304f59e216949e18b002bd568b0daee9ae1 Author: Dmitry Baryshkov Date: Fri Dec 9 18:48:45 2022 +0200 clk: qcom: smd-rpm: add XO_BUFFER clock for each XO_BUFFER_PINCTRL clock For each XO_BUFFER_PINCTRL there is a corresponding XO_BUFFER clock. Add them automatically to drop the duplication between the clock definitions. Reviewed-by: Alex Elder Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209164855.128798-10-dmitry.baryshkov@linaro.org commit b1c6f902c0e1c355a7b328237df98c4636c6bb20 Author: Dmitry Baryshkov Date: Fri Dec 9 18:48:44 2022 +0200 clk: qcom: smd-rpm: remove duplication between sm6375 and sm6125 clocks Reuse sm6125's MMAXI clocks for sm6375. Reviewed-by: Konrad Dybcio Reviewed-by: Alex Elder Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209164855.128798-9-dmitry.baryshkov@linaro.org commit e5ca1b251dc3e6375ca96e8b135fb685420ef97c Author: Dmitry Baryshkov Date: Fri Dec 9 18:48:43 2022 +0200 clk: qcom: smd-rpm: rename msm8992_ln_bb_* clocks to qcs404_ln_bb_* For each of XO_BUFFER_PINCTRL clocks there is a corresponding XO_BUFFER clock with the similar name (e.g. msm8998_ln_bb_clk3_pin vs msm8998_ln_bb_clk3). For qcs404_ln_bb_clk_pin there is no qcs404_ln_bb_clk, since the msm8992_ln_bb_clk was used instead (even for qcs404 platform). Follow the usual practice and rename msm8992_ln_bb_clk clocks to qcs404_ln_bb_clk (and rename active-only clock in a similar way). This is a preparation step for the next patch, which will merge XO_BUFFER and XO_BUFFER_PINCTRL definitions. Reviewed-by: Konrad Dybcio Reviewed-by: Alex Elder Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209164855.128798-8-dmitry.baryshkov@linaro.org commit cf202f811892d415291e605dc79db54a44f9e222 Author: Dmitry Baryshkov Date: Fri Dec 9 18:48:42 2022 +0200 clk: qcom: smd-rpm: use msm8998_ln_bb_clk2 for qcm2290 SoC The qcm2290's ln_bb_clk2 is identical to the freshly added msm8998's ln_bb_clk2 one. Use the latter and drop the SoC-specific version. Reviewed-by: Alex Elder Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209164855.128798-7-dmitry.baryshkov@linaro.org commit 63793efbe6fa0927758b2600ee439e1774321771 Author: Dmitry Baryshkov Date: Fri Dec 9 18:48:41 2022 +0200 clk: qcom: smd-rpm: add missing ln_bb_clkN clocks Newer platforms (msm8998, sdm660, sm6125) have low noise LN_BB_CLKn clocks. The driver already uses proper clock indices (RPM_SMD_LN_BB_CLKn). Fix clock names used by these platforms. Fixes: a0384ecfe2aa ("clk: qcom: smd-rpm: De-duplicate identical entries") Fixes: edeb2ca74716 ("clk: qcom: smd: Add support for SM6125 rpm clocks") Reviewed-by: Konrad Dybcio Reviewed-by: Alex Elder Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209164855.128798-6-dmitry.baryshkov@linaro.org commit 1bf68a5d6802f4d9a20a9427779f52497f0285c2 Author: Dmitry Baryshkov Date: Fri Dec 9 18:48:40 2022 +0200 clk: qcom: smd-rpm: remove duplication between qcs404 and qcm2290 clocks Reuse qcs404's QPIC and BIMC_GPU clock for qcm2290. Fixes: 78b727d02815 ("clk: qcom: smd-rpm: Add QCM2290 RPM clock support") Reviewed-by: Konrad Dybcio Reviewed-by: Alex Elder Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209164855.128798-5-dmitry.baryshkov@linaro.org commit c941b98781b348bd63fb8f8b5307b10fde2af0c1 Author: Dmitry Baryshkov Date: Fri Dec 9 18:48:39 2022 +0200 clk: qcom: smd-rpm: remove duplication between MMXI and MMAXI defines The commit 644c42295592 ("clk: qcom: smd: Add SM6375 clocks") added a duplicate of the existing define QCOM_SMD_RPM_MMAXI_CLK, drop it now. Fixes: 644c42295592 ("clk: qcom: smd: Add SM6375 clocks") Reviewed-by: Alex Elder Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209164855.128798-4-dmitry.baryshkov@linaro.org commit 76318d779c83dcc9e74de6fc428366c0dae2803a Author: Dmitry Baryshkov Date: Fri Dec 9 18:48:38 2022 +0200 clk: qcom: smd-rpm: enable pin-controlled ln_bb_clk clocks on qcs404 The commit eaeee28db289 ("clk: qcom: smd: Add support for QCS404 rpm clocks") defined the pin-controlled ln_bb_clk clocks, but didn't add them to the qcs404_clks array. Add them to make these clocks usable to platform devices. Fixes: eaeee28db289 ("clk: qcom: smd: Add support for QCS404 rpm clocks") Reviewed-by: Alex Elder Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209164855.128798-3-dmitry.baryshkov@linaro.org commit ba796801d2474a4773a6a0ebb94c53c96a294426 Author: Dmitry Baryshkov Date: Fri Dec 9 18:48:37 2022 +0200 dt-bindings: clocks: qcom: rpmcc: add LN_BB_CLK_PIN clocks Add pin-controlled Low-Noise BB clock definition. Signed-off-by: Dmitry Baryshkov Reviewed-by: Alex Elder Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209164855.128798-2-dmitry.baryshkov@linaro.org commit 40ebfbec52108be22cb68ecb9dcbd4917583a87c Author: Bjorn Andersson Date: Wed Dec 28 11:32:58 2022 -0600 soc: qcom: ramp_controller: Include linux/bitfield.h Building ramp_controller under x86_64 results in the following build error: error: implicit declaration of function 'FIELD_PREP' is invalid in C99 Include linux/bitfield.h to ensure FIELD_PREP() is declared. Signed-off-by: Bjorn Andersson commit 9732dd8d347851cb9c2fdabd35046ba0c470543e Author: Souradeep Chowdhury Date: Tue Dec 27 20:52:47 2022 +0530 MAINTAINERS: Add the entry for DCC(Data Capture and Compare) driver support Add the entries for all the files added as a part of driver support for DCC(Data Capture and Compare). Signed-off-by: Souradeep Chowdhury Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/d94c11b2c219265d150f71ee726637dd0f58c095.1672148732.git.quic_schowdhu@quicinc.com commit 4cbe60cf5ad622f7f45ccc4fa369c9f7a71903b9 Author: Souradeep Chowdhury Date: Tue Dec 27 20:52:46 2022 +0530 soc: qcom: dcc: Add driver support for Data Capture and Compare unit(DCC) The DCC is a DMA Engine designed to capture and store data during system crash or software triggers. The DCC operates based on user inputs via the debugfs interface. The user gives addresses as inputs and these addresses are stored in the dcc sram. In case of a system crash or a manual software trigger by the user through the debugfs interface, the dcc captures and stores the values at these addresses. This patch contains the driver which has all the methods pertaining to the debugfs interface, auxiliary functions to support all the four fundamental operations of dcc namely read, write, read/modify/write and loop. The probe method here instantiates all the resources necessary for dcc to operate mainly the dedicated dcc sram where it stores the values. The DCC driver can be used for debugging purposes without going for a reboot since it can perform software triggers as well based on user inputs. Also add the documentation for debugfs entries which explains the functionalities of each debugfs file that has been created for dcc. The following is the justification of using debugfs interface over the other alternatives like sysfs/ioctls i) As can be seen from the debugfs attribute descriptions, some of the debugfs attribute files here contains multiple arguments which needs to be accepted from the user. This goes against the design style of sysfs. ii) The user input patterns have been made simple and convenient in this case with the use of debugfs interface as user doesn't need to shuffle between different files to execute one instruction as was the case on using other alternatives. Signed-off-by: Souradeep Chowdhury Reviewed-by: Alex Elder [bjorn: Fixed up a few indents and line wraps] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/644b4f66a358492a8a6738454035c3b120092fe7.1672148732.git.quic_schowdhu@quicinc.com commit 91269c425649baad9758dbe269e7069ad7fa05fc Author: Souradeep Chowdhury Date: Tue Dec 27 20:52:51 2022 +0530 arm64: dts: qcom: sdm845: Add Data Capture and Compare(DCC) support node Add the DCC(Data Capture and Compare) device tree node entry along with the address of the register region. Signed-off-by: Souradeep Chowdhury Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/4b4289063e1b3baf98b653274060f35a5c888609.1672148732.git.quic_schowdhu@quicinc.com commit add74cad7c9d1bf59d41b229852f3ebe0be4a84f Author: Souradeep Chowdhury Date: Tue Dec 27 20:52:50 2022 +0530 arm64: dts: qcom: sc7180: Add Data Capture and Compare(DCC) support node Add the DCC(Data Capture and Compare) device tree node entry along with the address of the register region. Signed-off-by: Souradeep Chowdhury Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/08e8dc0f58145915f19d953c487a0df20a1ced1f.1672148732.git.quic_schowdhu@quicinc.com commit 029d6586dc2d1d10e9df3962633e29e145d764ec Author: Souradeep Chowdhury Date: Tue Dec 27 20:52:49 2022 +0530 arm64: dts: qcom: sc7280: Add Data Capture and Compare(DCC) support node Add the DCC(Data Capture and Compare) device tree node entry along with the address of the register region. Signed-off-by: Souradeep Chowdhury Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/88ef6053ee56eb0613040ea1fe33439934810330.1672148732.git.quic_schowdhu@quicinc.com commit d4b94c8244919742417c3a165ef73081de37ef3b Author: Souradeep Chowdhury Date: Tue Dec 27 20:52:48 2022 +0530 arm64: dts: qcom: sm8150: Add Data Capture and Compare(DCC) support node Add the DCC(Data Capture and Compare) device tree node entry along with the addresses for register regions. Signed-off-by: Souradeep Chowdhury Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/4737bcbce591e59b2f29d9141c1a5e41e64cc4f4.1672148732.git.quic_schowdhu@quicinc.com commit bbd9b7e19be9709f5feef23c1994ab4302c454d1 Author: Krzysztof Kozlowski Date: Fri Dec 23 17:22:31 2022 +0100 dt-bindings: iio: adc: maxim,max1363: fix interface typo Correct inteface->interface in description. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221223162231.120216-1-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron commit 610813655932359e50900337f7fd24b684e7a476 Author: Fabio Estevam Date: Thu Dec 15 21:40:15 2022 -0300 dt-bindings: iio: adc: max1238: Fix a typo in the description Fix a typo in the description, where "interface" is spelled incorrectly. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20221216004015.2902966-1-festevam@denx.de Signed-off-by: Jonathan Cameron commit 04104842736fb29d2e1b5c71dd93f87f428506f0 Author: Marijn Suijten Date: Fri Dec 16 20:09:45 2022 +0100 iio: adc: qcom-spmi-adc5: Suppress probe-deferral error message Much like 807efb7102e8 ("thermal: qcom-spmi-adc-tm5: suppress probe-deferral error message") the ADC5 driver also spams a similar probe-deferral error on startup when a channel is not yet available: [ 0.343136] qcom-spmi-adc-tm5 1c40000.spmi:pmic@0:adc-tm@3500: get dt data failed: -517 Suppress it by using dev_err_probe instead, which also takes care of storing the message as reason for deferring. Signed-off-by: Marijn Suijten Reviewed-by: Martin Botka Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221216190945.902754-1-marijn.suijten@somainline.org Signed-off-by: Jonathan Cameron commit 5d1c74b155cb40606dce6f8db2f79537c11fcd71 Author: Colin Ian King Date: Fri Dec 9 23:32:02 2022 +0000 iio: imu: kmx61: Fix spelling mistake "Errow" -> "Error" There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20221209233202.222083-1-colin.i.king@gmail.com Signed-off-by: Jonathan Cameron commit c12f0148f14bcac79c100e1eff9309744eed6684 Author: Andy Shevchenko Date: Wed Dec 7 21:03:48 2022 +0200 iio: light: tsl2563: Keep Makefile sorted by module name The Makefile is sorted by a module name, keep it that way. Signed-off-by: Andy Shevchenko Tested-by: Ferry Toth Link: https://lore.kernel.org/r/20221207190348.9347-11-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 3582a83b1f338d9be7b4461ff2ed8033d2ff9c6d Author: Andy Shevchenko Date: Wed Dec 7 21:03:47 2022 +0200 iio: light: tsl2563: sort header inclusion alphabetically Sort header inclusion alphabetically. Signed-off-by: Andy Shevchenko Tested-by: Ferry Toth Link: https://lore.kernel.org/r/20221207190348.9347-10-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 571b97fd8777234fcd1f94ed36781bed39f1e20d Author: Andy Shevchenko Date: Wed Dec 7 21:03:46 2022 +0200 iio: light: tsl2563: Use dev_get_drvdata() directly in PM callbacks PM callbacks take struct device pointer as a parameter, use dev_get_drvdata() to retrieve it instead of unneeded double loop of referencing via i2c_get_clientdata(to_i2c_client(dev)). Signed-off-by: Andy Shevchenko Tested-by: Ferry Toth Link: https://lore.kernel.org/r/20221207190348.9347-9-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 85a6b728eff68647746629b9332434e237a53100 Author: Andy Shevchenko Date: Wed Dec 7 21:03:45 2022 +0200 iio: light: tsl2563: 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 Tested-by: Ferry Toth Link: https://lore.kernel.org/r/20221207190348.9347-8-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 1f5e408f6a000be980872b8065e547e2dbef6acc Author: Andy Shevchenko Date: Wed Dec 7 21:03:44 2022 +0200 iio: light: tsl2563: Drop legacy platform data code There is no in-kernel user for legacy platform data. Otherwise, a new one can use software nodes instead. Hence, drop legacy platform data code. Signed-off-by: Andy Shevchenko Tested-by: Ferry Toth Link: https://lore.kernel.org/r/20221207190348.9347-7-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 2080c8d34602a6ad86286a04e5b8b40f40505215 Author: Andy Shevchenko Date: Wed Dec 7 21:03:43 2022 +0200 iio: light: tsl2563: Simplify with dev_err_probe Code can be a bit simpler with dev_err_probe(). Signed-off-by: Andy Shevchenko Tested-by: Ferry Toth Link: https://lore.kernel.org/r/20221207190348.9347-6-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit bbabf9199126d7eb950ccc369543c462cc58e1b7 Author: Andy Shevchenko Date: Wed Dec 7 21:03:42 2022 +0200 iio: light: tsl2563: Drop unused defintion(s) The CALIB_FRAC() is defined and might had been used in tsl2563_calib_from_sysfs(). But let's just move a comment from it to the latter function. CLAIB_FRAC_HALF is used in a single place, i.e. in tsl2563_calib_to_sysfs(). So, let's just inline it there. While at it, switch to use DIV_ROUND_CLOSEST(). Signed-off-by: Andy Shevchenko Tested-by: Ferry Toth Link: https://lore.kernel.org/r/20221207190348.9347-5-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit b90619c4efee915c6419373b1ec024878ee7e38c Author: Andy Shevchenko Date: Wed Dec 7 21:03:41 2022 +0200 iio: light: tsl2563: Make use of the macros from bits.h Make use of BIT() and GENMASK() where it makes sense. Signed-off-by: Andy Shevchenko Tested-by: Ferry Toth Link: https://lore.kernel.org/r/20221207190348.9347-4-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit aca68c027322fd7c63c05b308569727a618c47a7 Author: Andy Shevchenko Date: Wed Dec 7 21:03:40 2022 +0200 iio: light: tsl2563: Configure INT in one place Introduce tsl2563_configure_irq() to configure INT in one place. While at it, make use of TSL2563_INT_LEVEL and newly introduced TSL2563_INT_MASK. Signed-off-by: Andy Shevchenko Tested-by: Ferry Toth Link: https://lore.kernel.org/r/20221207190348.9347-3-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 3c183534f2784484182e51c8019c1e9f0638ef8a Author: Andy Shevchenko Date: Wed Dec 7 21:03:39 2022 +0200 iio: light: tsl2563: Use i2c_smbus_write_word_data() in tsl2563_configure() Driver already uses the word accessors when it makes sense, but in the tsl2563_configure(). Switch the latter to use word accessor. Signed-off-by: Andy Shevchenko Tested-by: Ferry Toth Link: https://lore.kernel.org/r/20221207190348.9347-2-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 027641b52fe37b64af61025298ce160c8b9b7a73 Author: Ferry Toth Date: Wed Dec 7 21:03:38 2022 +0200 iio: light: tsl2563: Do not hardcode interrupt trigger type Instead of hardcoding IRQ trigger type to IRQF_TRIGGER_RAISING, let's respect the settings specified in the firmware description. To be compatible with the older firmware descriptions, if trigger type is not set up there, we'll set it to default (raising edge). Fixes: 388be4883952 ("staging:iio: tsl2563 abi fixes and interrupt handling") Fixes: bdab1001738f ("staging:iio:light:tsl2563 remove old style event registration.") Signed-off-by: Ferry Toth Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221207190348.9347-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 22cd9320b11a2eb05e5d490863a4219ca32e8ec9 Author: Uwe Kleine-König Date: Fri Nov 18 23:37:46 2022 +0100 iio: light: max44009: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20221118224540.619276-133-uwe@kleine-koenig.org Signed-off-by: Jonathan Cameron commit caa6693e408eb87169ac18db6073a326829ce7ad Author: Jonathan Cameron Date: Sun Oct 16 17:34:09 2022 +0100 iio: pressure: ms5611: Switch to fully devm_ managed registration. All the remaining calls in probe() have devm_ equivalents so switching to those allows the remove() callbacks to be deleted. No functional change. Signed-off-by: Jonathan Cameron Cc: Tomasz Duszynski Reviewed-by: Matti Vaittinen Link: https://lore.kernel.org/r/20221016163409.320197-15-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 122ef59a2a16e4542705913b905d841704e239e9 Author: Jonathan Cameron Date: Sun Oct 16 17:34:08 2022 +0100 iio: pressure: ms5611: Use devm_regulator_get_enable() This driver only turns the power on at probe and off at remove. The new devm_regulator_get_enable() replaces this boilerplate code. Some additional refactoring to drop now unnecessary unwinding after this change. Signed-off-by: Jonathan Cameron Cc: Tomasz Duszynski Reviewed-by: Matti Vaittinen Link: https://lore.kernel.org/r/20221016163409.320197-14-jic23@kernel.org commit 4da9438d293d30def46b2801fa00e176c59883d2 Author: Jonathan Cameron Date: Sun Oct 16 17:33:57 2022 +0100 iio: accel: bma400: Use devm_regulator_bulk_get_enable() This driver only turns the power on at probe and off via a custom devm_add_action_or_reset() callback. The new devm_regulator_bulk_get_enable() replaces this boilerplate code. Signed-off-by: Jonathan Cameron Cc: Jagath Jog J Reviewed-by: Matti Vaittinen Link: https://lore.kernel.org/r/20221016163409.320197-3-jic23@kernel.org commit f9e51aacc740935bd0201565e040fd7b36f645aa Author: ye xingchen Date: Thu Dec 1 11:56:31 2022 +0800 iio: common: scmi_iio: use sysfs_emit() to instead of scnprintf() Replace the open-code with sysfs_emit() to simplify the code. Signed-off-by: ye xingchen Link: https://lore.kernel.org/r/202212011156314630626@zte.com.cn Signed-off-by: Jonathan Cameron commit 7ae267954af798f51985629dc795fba616af37cd Author: ye xingchen Date: Thu Dec 1 11:42:33 2022 +0800 iio: adc: at91-sama5d2_adc: use sysfs_emit() to instead of scnprintf() Replace the open-code with sysfs_emit() to simplify the code. Signed-off-by: ye xingchen Link: https://lore.kernel.org/r/202212011142333790361@zte.com.cn Signed-off-by: Jonathan Cameron commit 58c2630020c5f820d63e2d03aa2341d19d4c0c5b Author: Fabio Estevam Date: Wed Nov 30 15:26:32 2022 -0300 iio: dac: ad5686: Add support for AD5337 AD5337 belongs to the same family as the AD5338. The difference is that the AD5337 has 8-bit precision instead of 10-bit. Add support for the AD5337 chip in the driver. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20221130182632.3856675-2-festevam@gmail.com Signed-off-by: Jonathan Cameron commit 611370fe482bf611ef61d2343b92742e4b2dc5a3 Author: Fabio Estevam Date: Wed Nov 30 15:26:31 2022 -0300 dt-bindings: iio: dac: ad5686: Add an entry for AD5337 AD5337 belongs to the same family as the AD5338. The difference is that the AD5337 has 8-bit resolution instead of 10-bit. Add a compatible entry for AD5337. Signed-off-by: Fabio Estevam Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221130182632.3856675-1-festevam@gmail.com Signed-off-by: Jonathan Cameron commit 627198942641dae28024ad686066311f1aeedcf2 Author: Leonard Göhrs Date: Mon Nov 28 14:35:03 2022 +0100 iio: adc: add ADC driver for the TI LMP92064 controller The TI LMP92064 is a dual 12 Bit ADC connected via SPI. The two channels are intended for simultaneous measurements of the voltage across- and current through a load to allow accurate instantaneous power measurements. The driver does not yet take advantage of this feature, as buffering is not yet implemented. Signed-off-by: Leonard Göhrs Link: https://lore.kernel.org/r/20221128133503.1355898-2-l.goehrs@pengutronix.de Signed-off-by: Jonathan Cameron commit 51f3e9696c8e784f74a4c1f9fe2e9d5ff9641a8d Author: Leonard Göhrs Date: Mon Nov 28 14:35:02 2022 +0100 dt-bindings: iio: adc: add TI LMP92064 controller Add binding documentation for the TI LMP92064 dual channel SPI ADC. Signed-off-by: Leonard Göhrs Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221128133503.1355898-1-l.goehrs@pengutronix.de Signed-off-by: Jonathan Cameron commit c9d8b868f4a37bf2589b0148f366cc753735ead7 Author: Samuel Holland Date: Fri Nov 25 16:09:03 2022 -0600 dt-bindings: iio: adc: ti,adc081c: Document the binding Linux has a driver for these ADCs at drivers/iio/adc/ti-adc081c.c, but the compatible strings were undocumented. Add a binding for them. The hardware has an alert interrupt output, but existing ti,adc081c users do not provide the 'interrupts' property, so leave it as optional. Signed-off-by: Samuel Holland Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221125220903.8632-1-samuel@sholland.org Signed-off-by: Jonathan Cameron commit 866a1389174bbb71591bb0c927f1d63e7cc469c8 Author: Gerald Loacker Date: Thu Dec 1 08:22:20 2022 +0100 iio: magnetometer: add ti tmag5273 driver Add support for TI TMAG5273 Low-Power Linear 3D Hall-Effect Sensor. Additionally to temperature and magnetic X, Y and Z-axes the angle and magnitude are reported. The sensor is operating in continuous measurement mode and changes to sleep mode if not used for 5 seconds. Datasheet: https://www.ti.com/lit/gpn/tmag5273 Signed-off-by: Gerald Loacker Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221201072220.402585-4-gerald.loacker@wolfvision.net Signed-off-by: Jonathan Cameron commit fbb6d04eab99020c63810225bdbd1fa40f02e6b9 Author: Gerald Loacker Date: Thu Dec 1 08:22:19 2022 +0100 dt-bindings: iio: magnetometer: add ti tmag5273 documentation file Add bindings for TI TMAG5273. Signed-off-by: Gerald Loacker Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221201072220.402585-3-gerald.loacker@wolfvision.net Signed-off-by: Jonathan Cameron commit 08f01cc1d6e240092a6d9bfa21652622657f38f0 Author: Gerald Loacker Date: Thu Dec 1 08:22:18 2022 +0100 iio: add struct declaration for iio types Add struct for iio type arrays such as IIO_AVAIL_LIST which can be used instead of int arrays. Signed-off-by: Gerald Loacker Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20221201072220.402585-2-gerald.loacker@wolfvision.net Signed-off-by: Jonathan Cameron commit 417091dc60ba0a991c0e6aa77c1eeb2cfcf0a3d4 Author: Souradeep Chowdhury Date: Tue Dec 27 20:52:45 2022 +0530 dt-bindings: soc: qcom,dcc: Add the dtschema Add the device tree bindings for Data Capture and Compare(DCC). Signed-off-by: Souradeep Chowdhury Reviewed-by: Rob Herring Reviewed-by: Bjorn Andersson Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/eb758cbdc7bd0973b3ca154b11fb8db54cde805f.1672148732.git.quic_schowdhu@quicinc.com commit c34bef62a0096d1db309db8ffd165a1a6f01f227 Author: Marijn Suijten Date: Tue Dec 13 01:26:26 2022 +0100 arm64: dts: qcom: sm8150: Enable split pagetables for Adreno SMMU Allow the Adreno GPU to access split pagetables specifically on the dedicated Adreno SMMU via the qcom,adreno-smmu compatible. Signed-off-by: Marijn Suijten Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221213002626.260267-2-konrad.dybcio@linaro.org commit 0f48b65f716b4fa806fa864ea7f750113f4bd7c9 Author: Vinod Koul Date: Wed Dec 7 03:28:03 2022 +0200 arm64: dts: qcom: sm8450-hdk: Enable HDMI Display Add the HDMI display nodes and link it to DSI. Signed-off-by: Vinod Koul Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221207012803.114959-6-dmitry.baryshkov@linaro.org commit 0cbe8e1953e083f8435bdb5548c3ba59acfcb97e Author: Vinod Koul Date: Wed Dec 7 03:28:02 2022 +0200 arm64: dts: qcom: sm8450-hdk: Add LT9611uxc HDMI bridge Add the LT9611uxc DSI-HDMI bridge and supplies Signed-off-by: Vinod Koul Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221207012803.114959-5-dmitry.baryshkov@linaro.org commit 928a7b4269634369b152342a37b2809d18774726 Author: Dmitry Baryshkov Date: Wed Dec 7 03:28:01 2022 +0200 arm64: dts: qcom: sm8450-hdk: enable display hardware Enable MDSS/DPU/DSI0 on SM8450-HDK device. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221207012803.114959-4-dmitry.baryshkov@linaro.org commit a6dd1206e45a43d7e6c46435437307b051471b69 Author: Dmitry Baryshkov Date: Wed Dec 7 03:28:00 2022 +0200 arm64: dts: qcom: sm8450: add display hardware devices Add devices tree nodes describing display hardware on SM8450: - Display Clock Controller - MDSS - MDP - two DSI controllers and DSI PHYs This does not provide support for DP controllers present on SM8450. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221207012803.114959-3-dmitry.baryshkov@linaro.org commit a5ac24ba17590866cf1ff8fe44cd2738c003d52f Author: Dmitry Baryshkov Date: Wed Dec 7 03:27:59 2022 +0200 arm64: dts: qcom: sm8450: add RPMH_REGULATOR_LEVEL_LOW_SVS_D1 Add another power saving state used on SM8450. Unfortunately adding it in proper place causes renumbering of all the opp states in sm8450.dtsi Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221207012803.114959-2-dmitry.baryshkov@linaro.org commit cf5865e72236c239317d6c5829ab170419b400a4 Author: Mukesh Ojha Date: Wed Dec 14 19:06:23 2022 +0530 remoteproc: qcom: pas: Fix subdevice add order Currently, the notification like QCOM_SSR_BEFORE_SHUTDOWN is not exactly sent before starting shutdown activity on remote subsystem but it is getting sent after sysmon shutdown request to remote. On getting QCOM_SSR_BEFORE_SHUTDOWN, some client want remote subsystem to be alive to communicate but as sysmon shutdown request is getting sent to remote before QCOM_SSR_BEFORE_SHUTDOWN notification sent to kernel client due to which remote is not in a condition to communicate with kernel clients. Fixing the subdevice ordering will fix this as ssr subdevice will be first one to get triggered in shutdown/stop path. Signed-off-by: Mukesh Ojha Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1671024983-22634-1-git-send-email-quic_mojha@quicinc.com commit 861b67fbdccd62a9319d7350b1924d95f597db09 Author: Richard Acayan Date: Mon Dec 5 17:52:37 2022 -0500 arm64: dts: qcom: sdm670-google-sargo: keep pm660 ldo8 on According to the downstream device tree, the regulator that powers the I/O for eMMC should not be turned off. Keep it always on just in case the eMMC driver fails and doesn't enable it, or unloads and disables it. Fixes: 07c8ded6e373 ("arm64: dts: qcom: add sdm670 and pixel 3a device trees") Link: https://android.googlesource.com/kernel/msm/+/9ed6ddbe955d3b84d1416a1cf77e83904d1e8421/arch/arm64/boot/dts/google/sdm670-bonito-common.dtsi#105 Signed-off-by: Richard Acayan Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221205225237.200564-1-mailingradian@gmail.com commit ec5c05e5ac8bcb4a6bcd92970e15494a85400d34 Author: ye xingchen Date: Fri Nov 25 15:44:36 2022 +0800 hwspinlock: Use device_match_of_node() Replace the open-code with device_match_of_node(). Signed-off-by: ye xingchen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Baolin Wang Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/202211251544369078587@zte.com.cn commit 4a0510a46c4447ad3e807a1e4d6cf195fd604c1d Author: Sireesh Kodali Date: Thu Oct 13 09:57:49 2022 +0530 dt-bindings: remoteproc: qcom: adsp: Add ADSP on MSM8953 Add support for booting the Audio DSP on the MSM8953 platform. This is used by SoCs like SDM450, SDM625, SDM626, APQ8053, etc. Since the configuration is the same on all SoCs, a single compatible string is used. Signed-off-by: Sireesh Kodali Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221013042749.104668-3-sireeshkodali1@gmail.com commit 1cfaa13b82c73977e8ddaca63c791203addc39c1 Author: Sireesh Kodali Date: Thu Oct 13 09:57:48 2022 +0530 remoteproc: qcom: pas: Add MSM8953 ADSP PIL support Add support for the Audio DSP PIL found on the Qualcomm MSM8953 platform. The same configuration is used on all SoCs based on the MSM8953 platform (SDM450, SDA450, SDM625, SDM632, APQ8053). Signed-off-by: Sireesh Kodali Reviewed-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221013042749.104668-2-sireeshkodali1@gmail.com commit f22eedff28aff912bde7f8deabebd121cb64fae3 Author: Srinivasa Rao Mandadapu Date: Wed Sep 28 17:57:53 2022 +0530 remoteproc: qcom: Add support for memory sandbox Update pil driver with SMMU mapping for allowing authorised memory access to ADSP firmware, by carveout reserved adsp memory region from device tree file. Signed-off-by: Srinivasa Rao Mandadapu Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1664368073-13659-8-git-send-email-quic_srivasam@quicinc.com commit 9ece961916631aab81b9d9f8d9c2770d05548662 Author: Srinivasa Rao Mandadapu Date: Wed Sep 28 17:57:52 2022 +0530 remoteproc: qcom: Add efuse evb selection control Add efuse evb selection control and enable it for starting ADSP. Signed-off-by: Srinivasa Rao Mandadapu Reviewed-by: Stephen Boyd Reviewed-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1664368073-13659-7-git-send-email-quic_srivasam@quicinc.com commit c36d6aa67932788ec04820ba65693ccd41b1042f Author: Srinivasa Rao Mandadapu Date: Wed Sep 28 17:57:51 2022 +0530 remoteproc: qcom: Replace hard coded values with macros Replace hard coded values of QDSP6 boot control reg params with appropriate macro names. Signed-off-by: Srinivasa Rao Mandadapu Reviewed-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd Reviewed-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1664368073-13659-6-git-send-email-quic_srivasam@quicinc.com commit 48ab209c6f5f84a5adcd68e150dc0f614c8bfba7 Author: Srinivasa Rao Mandadapu Date: Wed Sep 28 17:57:50 2022 +0530 remoteproc: qcom: Update rproc parse firmware callback Change parse_fw callback in rproc ops from qcom_register_dump_segments to local function such that, it can perform coredump segments registration and it can parse section header in memory sandboxing required platforms. Signed-off-by: Srinivasa Rao Mandadapu Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1664368073-13659-5-git-send-email-quic_srivasam@quicinc.com commit 66cab0c5c3f9dae0213b9d02af03791b75565986 Author: Srinivasa Rao Mandadapu Date: Wed Sep 28 17:57:49 2022 +0530 remoteproc: qcom: Add compatible name for SC7280 ADSP Update adsp pil data and compatible name for loading ADSP binary on SC7280 based platforms. Signed-off-by: Srinivasa Rao Mandadapu Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1664368073-13659-4-git-send-email-quic_srivasam@quicinc.com commit 272dca8d14c46d03c633756d150b1c48c1dcb594 Author: Srinivasa Rao Mandadapu Date: Wed Sep 28 17:57:48 2022 +0530 remoteproc: qcom: Add flag in adsp private data structure Add flag in qcom_adsp private data structure and initialize it to distinguish ADSP modules, which has iommu requirement, for using iommu selectively. Signed-off-by: Srinivasa Rao Mandadapu Reviewed-by: Stephen Boyd Reviewed-by: Sibi Sankar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1664368073-13659-3-git-send-email-quic_srivasam@quicinc.com commit 8490a99586abd480d7139893f78c019790a58979 Author: Srinivasa Rao Mandadapu Date: Wed Sep 28 17:57:47 2022 +0530 dt-bindings: remoteproc: qcom: Add SC7280 ADSP support Add ADSP PIL loading support for SC7280 SoCs. Signed-off-by: Srinivasa Rao Mandadapu Reviewed-by: Rob Herring Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1664368073-13659-2-git-send-email-quic_srivasam@quicinc.com commit 6599e683db1bf22fee74302c47e31b9a42a1c3d2 Merge: d4acfa22b6343 1b929c02afd37 Author: Mauro Carvalho Chehab Date: Wed Dec 28 16:07:44 2022 +0000 Merge tag 'v6.2-rc1' into media_tree Linux 6.2-rc1 * tag 'v6.2-rc1': (14398 commits) Linux 6.2-rc1 treewide: Convert del_timer*() to timer_shutdown*() pstore: Properly assign mem_type property pstore: Make sure CONFIG_PSTORE_PMSG selects CONFIG_RT_MUTEXES cfi: Fix CFI failure with KASAN perf python: Fix splitting CC into compiler and options afs: Stop implementing ->writepage() afs: remove afs_cache_netfs and afs_zap_permits() declarations afs: remove variable nr_servers afs: Fix lost servers_outstanding count ALSA: usb-audio: Add new quirk FIXED_RATE for JBL Quantum810 Wireless ALSA: azt3328: Remove the unused function snd_azf3328_codec_outl() gcov: add support for checksum field test_maple_tree: add test for mas_spanning_rebalance() on insufficient data maple_tree: fix mas_spanning_rebalance() on insufficient data hugetlb: really allocate vma lock for all sharable vmas kmsan: export kmsan_handle_urb kmsan: include linux/vmalloc.h mm/mempolicy: fix memory leak in set_mempolicy_home_node system call mm, mremap: fix mremap() expanding vma with addr inside vma ... commit 3cc889eb83f59b5a6a869a685da11f79ffbb4e4d Author: Gokul krishna Krishnakumar Date: Mon Sep 19 09:00:40 2022 -0700 remoteproc: qcom: q6v5: Avoid setting smem bit in case of crash shutdown Avoid setting smem bit in case of crash shutdown, as remote processor is not able to send the ack back. Signed-off-by: Gokul krishna Krishnakumar [bjorn: Rewrote the comment] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/9e549a54e2a6ede3e413de933fd1725c660993c3.1662995608.git.quic_gokukris@quicinc.com commit c23965b7f7d99bbb2604f1f02aa26fb6d1d5864d Author: Deepak Kumar Singh Date: Mon Sep 19 16:24:00 2022 +0530 rpmsg: ctrl: Add lock to rpmsg_ctrldev_remove Call to rpmsg_ctrldev_ioctl() and rpmsg_ctrldev_remove() must be synchronized. In present code rpmsg_ctrldev_remove() is not protected with lock, therefore new char device creation can succeed through rpmsg_ctrldev_ioctl() call. At the same time call to rpmsg_ctrldev_remove() function for ctrl device removal will free associated rpdev device. As char device creation already succeeded, user space is free to issue open() call which maps to rpmsg_create_ept() in kernel. rpmsg_create_ept() function tries to reference rpdev which has already been freed through rpmsg_ctrldev_remove(). Issue is predominantly seen in aggressive reboot tests where rpmsg_ctrldev_ioctl() and rpmsg_ctrldev_remove() can race with each other. Adding lock in rpmsg_ctrldev_remove() avoids any new char device creation through rpmsg_ctrldev_ioctl() while remove call is already in progress. Signed-off-by: Deepak Kumar Singh Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1663584840-15762-3-git-send-email-quic_deesin@quicinc.com commit 17b88a2050e9d1f89a53562f2adb709a8959e763 Author: Deepak Kumar Singh Date: Mon Sep 19 16:23:59 2022 +0530 rpmsg: char: Add lock to avoid race when rpmsg device is released When remote host goes down glink char device channel is freed and associated rpdev is destroyed through rpmsg_chrdev_eptdev_destroy(), At the same time user space apps can still try to open/poll rpmsg char device which will result in calling rpmsg_create_ept()/rpmsg_poll(). These functions will try to reference rpdev which has already been freed through rpmsg_chrdev_eptdev_destroy(). File operation functions and device removal function must be protected with lock. This patch adds existing ept lock in remove function as well. Signed-off-by: Deepak Kumar Singh Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1663584840-15762-2-git-send-email-quic_deesin@quicinc.com commit b27aa4d87809b3d7ac5b792dd059108283044e3b Author: Gaosheng Cui Date: Sun Sep 11 17:06:37 2022 +0800 remoteproc: qcom: wcnss: remove unused qcom_iris_driver declaration qcom_iris_driver has been removed since commit 1fcef985c8bd ("remoteproc: qcom: wcnss: Fix race with iris probe"), so remove it. Signed-off-by: Gaosheng Cui Reviewed-by: Mukesh Ojha Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220911090637.3208939-1-cuigaosheng1@huawei.com commit d2ff0f84c1156dfd3646a4ca682b38413b409aa0 Author: Wolfram Sang Date: Thu Aug 18 23:01:00 2022 +0200 rpmsg: move from strlcpy with unused retval to strscpy Follow the advice of the below link and prefer 'strscpy' in this subsystem. Conversion is 1:1 because the return value is not used. Generated by a coccinelle script. Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Wolfram Sang Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220818210100.7277-1-wsa+renesas@sang-engineering.com commit 1b0f00d3b1fc25525e1fcd8c5845e362f5688849 Author: Wolfram Sang Date: Thu Aug 18 23:00:59 2022 +0200 remoteproc: move from strlcpy with unused retval to strscpy Follow the advice of the below link and prefer 'strscpy' in this subsystem. Conversion is 1:1 because the return value is not used. Generated by a coccinelle script. Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Wolfram Sang Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220818210059.7253-1-wsa+renesas@sang-engineering.com commit 6d967a5a49e8d08d8e4430aadba8d3c903b794a5 Author: Abel Vesa Date: Mon Jul 18 15:15:14 2022 +0300 remoteproc: qcom: q6v5: Use _clk_get_optional for aggre2_clk Only msm8996 and msm8998 SLPIs need the RPM_SMD_AGGR2_NOC_CLK (as aggre2 clock). None of the other platforms do. Back when the support for the mentioned platforms was added to the q6v5 pass driver, the devm_clk_get_optional was not available, so the has_aggre2_clk was necessary in order to differentiate between plaforms that need this clock and those which do not. Now that devm_clk_get_optional is available, we can drop the has_aggre2_clk. This makes the adsp_data more cleaner and removes the check within adsp_init_clocks. Signed-off-by: Abel Vesa Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220718121514.2451590-1-abel.vesa@linaro.org commit ed153b0793ba8a3b11d909a78ff48b16878bd2f3 Author: Andy Shevchenko Date: Mon Dec 19 14:32:40 2022 +0200 pinctrl: intel: Define maximum pad number in the group Instead of using hard coded magic number here and there, define maximum pad number in the group in newly added INTEL_PINCTRL_MAX_GPP_SIZE. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 203a1c3ecae70076e14a652ca44b7ad9302eecd3 Author: Andy Shevchenko Date: Mon Dec 19 14:32:29 2022 +0200 pinctrl: intel: Use same order of bit fields for PADCFG2 PADCFG0 and PADCFG1 are ordered from MSB to LSB, do the same for PADCFG2 bit fields. No functional changes intended. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 346c8364613a9862323386d75f511785696fbe52 Author: Andy Shevchenko Date: Mon Dec 19 14:32:08 2022 +0200 pinctrl: intel: Add ~4k bias support All versions that have 20k and 5k resistance, i.e. all that the driver supports, may support ~4k when the above mentioned are connected in parallel. Add such a support. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit a63dd601bcc2209658d71394a9160833ba559272 Author: Andy Shevchenko Date: Mon Dec 19 14:32:07 2022 +0200 pinctrl: intel: Add definitions to all possible biases Add definitions to all possible biases, i.e. add ~800 Ohms, ~952 Ohms, ~4 kOhms. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit cd535346d4363dedaf1b4c7ba071768287817ccb Author: Andy Shevchenko Date: Mon Dec 19 14:32:06 2022 +0200 pinctrl: intel: Deduplicate some code in intel_config_set_pull() First part is to assign default argument for all cases, since bias disablement doesn't use it anyway. Second part is to clear all bits in the bias setting and depending on the argument and parameter set them as asked. While at it, add break statement to the default cases. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit cf6a05c8494a8ae7fec8e5f1229b45ca5b4bcd30 Author: Miaoqian Lin Date: Fri Dec 23 11:29:00 2022 +0400 RDMA/hns: Fix refcount leak in hns_roce_mmap rdma_user_mmap_entry_get_pgoff() takes the reference. Add missing rdma_user_mmap_entry_put() to release the reference. Fixes: 0045e0d3f42e ("RDMA/hns: Support direct wqe of userspace") Signed-off-by: Miaoqian Lin Acked-by Haoyue Xu Link: https://lore.kernel.org/r/20221223072900.802728-1-linmq006@gmail.com Signed-off-by: Leon Romanovsky commit ab223bc0edd29d84dbdfaebcc142a108d0ae7d4f Author: Neil Armstrong Date: Wed Nov 16 11:13:27 2022 +0100 dt-bindings: dma: qcom: gpi: add compatible for sm8550 The Qualcomm SM8550 uses GPI DMA for its GENI interface. Add a compatible string for it in the documentation by using the SM6350 as fallback. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221114-narmstrong-sm8550-upstream-gpi-v1-0-33b28a227c5d@linaro.org Signed-off-by: Vinod Koul commit e873d4329ccb891bf3b17f1e0d44396de943e92d Author: Joy Zou Date: Tue Nov 15 17:38:23 2022 +0800 dmaengine: imx-sdma: support hdmi in sdma The hdmi script already supported in sdma firmware. So add support hdmi in sdma driver. The design of hdmi script is different from common script such as sai. There is no need to config buffer descriptor for HDMI. The cyclic capability is achieved by the hdmi script. The slave config is so simple, only config src_addr, dts_addr and direction DMA_TRANS_NONE. Signed-off-by: Joy Zou Reviewed-by: Sascha Hauer Link: https://lore.kernel.org/r/20221115093823.2879128-3-joy.zou@nxp.com Signed-off-by: Vinod Koul commit 7bdbd87d40082a9df56a015a956ed32f909e4009 Author: Joy Zou Date: Tue Nov 15 17:38:22 2022 +0800 dt-bindings: fsl-imx-sdma: Convert imx sdma to DT schema Convert the i.MX SDMA binding to DT schema format using json-schema. The compatibles fsl,imx31-to1-sdma, fsl,imx31-to2-sdma, fsl,imx35-to1-sdma and fsl,imx35-to2-sdma are not used. So need to delete it. The compatibles fsl,imx50-sdma, fsl,imx6sll-sdma and fsl,imx6sl-sdma are added. The original binding don't list all compatible used. In addition, add new peripheral types HDMI Audio. Signed-off-by: Joy Zou Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221115093823.2879128-2-joy.zou@nxp.com Signed-off-by: Vinod Koul commit c04ec04c0d15a51aa33660be175ed978beb8de0c Author: Vitaly Kuznetsov Date: Thu Oct 13 11:58:49 2022 +0200 KVM: selftests: Test Hyper-V invariant TSC control Add a test for the newly introduced Hyper-V invariant TSC control feature: - HV_X64_MSR_TSC_INVARIANT_CONTROL is not available without HV_ACCESS_TSC_INVARIANT CPUID bit set and available with it. - BIT(0) of HV_X64_MSR_TSC_INVARIANT_CONTROL controls the filtering of architectural invariant TSC (CPUID.80000007H:EDX[8]) bit. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Message-Id: <20221013095849.705943-8-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit d8589154363f10ce15bedfc1bd4c6cb2a002d33d Author: Vitaly Kuznetsov Date: Thu Oct 13 11:58:48 2022 +0200 KVM: selftests: Test that values written to Hyper-V MSRs are preserved Enhance 'hyperv_features' selftest by adding a check that KVM preserves values written to PV MSRs. Two MSRs are, however, 'special': - HV_X64_MSR_EOI as it is a 'write-only' MSR, - HV_X64_MSR_RESET as it always reads as '0'. The later doesn't require any special handling right now because the test never writes anything besides '0' to the MSR, leave a TODO node about the fact. Suggested-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Message-Id: <20221013095849.705943-7-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit e03b7b51e9a53a865202735b6e0c83a7ea3fc53b Author: Vitaly Kuznetsov Date: Thu Oct 13 11:58:47 2022 +0200 KVM: selftests: Convert hyperv_features test to using KVM_X86_CPU_FEATURE() hyperv_features test needs to set certain CPUID bits in Hyper-V feature leaves but instead of open coding this, common KVM_X86_CPU_FEATURE() infrastructure can be used. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Message-Id: <20221013095849.705943-6-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 8b0a62fd3843360726541bfee75c599265413a95 Author: Vitaly Kuznetsov Date: Thu Oct 13 11:58:46 2022 +0200 KVM: selftests: Rename 'msr->available' to 'msr->fault_exepected' in hyperv_features test It may not be clear what 'msr->available' means. The test actually checks that accessing the particular MSR doesn't cause #GP, rename the variable accordingly. While on it, use 'true'/'false' instead of '1'/'0' for 'write'/ 'fault_expected' as these are boolean. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Message-Id: <20221013095849.705943-5-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 4e5bf89f2794e99d8d61b2fcb4a8f2d29963a532 Author: Vitaly Kuznetsov Date: Thu Oct 13 11:58:45 2022 +0200 KVM: x86: Hyper-V invariant TSC control Normally, genuine Hyper-V doesn't expose architectural invariant TSC (CPUID.80000007H:EDX[8]) to its guests by default. A special PV MSR (HV_X64_MSR_TSC_INVARIANT_CONTROL, 0x40000118) and corresponding CPUID feature bit (CPUID.0x40000003.EAX[15]) were introduced. When bit 0 of the PV MSR is set, invariant TSC bit starts to show up in CPUID. When the feature is exposed to Hyper-V guests, reenlightenment becomes unneeded. Add the feature to KVM. Keep CPUID output intact when the feature wasn't exposed to L1 and implement the required logic for hiding invariant TSC when the feature was exposed and invariant TSC control MSR wasn't written to. Copy genuine Hyper-V behavior and forbid to disable the feature once it was enabled. For the reference, for linux guests, support for the feature was added in commit dce7cd62754b ("x86/hyperv: Allow guests to enable InvariantTSC"). Signed-off-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Message-Id: <20221013095849.705943-4-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 24652b741cf62e6a149aabf0949dc3a4f16593fd Author: Vitaly Kuznetsov Date: Thu Oct 13 11:58:44 2022 +0200 KVM: x86: Add a KVM-only leaf for CPUID_8000_0007_EDX CPUID_8000_0007_EDX may come handy when X86_FEATURE_CONSTANT_TSC needs to be checked. No functional change intended. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Message-Id: <20221013095849.705943-3-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit dcca9d045c0852584ad092123c7f6e6526a633b1 Author: Geert Uytterhoeven Date: Mon Nov 21 16:23:53 2022 +0100 dmaengine: HISI_DMA should depend on ARCH_HISI The HiSilicon DMA Engine is only present on HiSilicon SoCs. Hence add a dependency on ARCH_HISI, to prevent asking the user about this driver when configuring a kernel without HiSilicon SoC support. Fixes: e9f08b65250d73ab ("dmaengine: hisilicon: Add Kunpeng DMA engine support") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/363a1816d36cd3cf604d88ec90f97c75f604de64.1669044190.git.geert+renesas@glider.be Signed-off-by: Vinod Koul commit ee84146c05ad2316b9a7222d0ec4413e0bf30eeb Author: Miaoqian Lin Date: Tue Dec 20 16:11:39 2022 +0400 RDMA/erdma: Fix refcount leak in erdma_mmap rdma_user_mmap_entry_get() take reference, we should release it when not need anymore, add the missing rdma_user_mmap_entry_put() in the error path to fix it. Fixes: 155055771704 ("RDMA/erdma: Add verbs implementation") Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20221220121139.1540564-1-linmq006@gmail.com Acked-by: Cheng Xu Signed-off-by: Leon Romanovsky commit 9735bde36487da43d3c3fc910df49639f72decbf Author: Fenghua Yu Date: Fri Dec 9 09:21:41 2022 -0800 dmaengine: idxd: Set traffic class values in GRPCFG on DSA 2.0 On DSA/IAX 1.0, TC-A and TC-B in GRPCFG are set as 1 to have best performance and cannot be changed through sysfs knobs unless override option is given. The same values should be set on DSA 2.0 as well. Fixes: ea7c8f598c32 ("dmaengine: idxd: restore traffic class defaults after wq reset") Fixes: ade8a86b512c ("dmaengine: idxd: Set defaults for GRPCFG traffic class") Signed-off-by: Fenghua Yu Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/20221209172141.562648-1-fenghua.yu@intel.com Signed-off-by: Vinod Koul commit 5840c8915a2f2becd760ba3a700ee7832d13c53f Author: Jiapeng Chong Date: Mon Dec 12 11:35:14 2022 +0800 dmaengine: idxd: Remove the unused function set_completion_address() The function set_completion_address is defined in the dma.c file, but not called elsewhere, so remove this unused function. drivers/dma/idxd/dma.c:66:20: warning: unused function 'set_completion_address'. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3416 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Acked-by: Dave Jiang Link: https://lore.kernel.org/r/20221212033514.5831-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Vinod Koul commit 3f58e10615f3bd7da8d0ef2f9c815d8e1a968122 Author: Vignesh Raghavendra Date: Tue Dec 13 22:13:04 2022 +0530 dmaengine: ti: k3-udma: Add support for BCDMA CSI RX BCDMA CSI RX present on AM62Ax SoC is a dedicated DMA for servicing Camera Serial Interface (CSI) IP. Add support for the same. Signed-off-by: Vignesh Raghavendra Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20221213164304.1126945-6-vigneshr@ti.com Signed-off-by: Vinod Koul commit c1475ad338bdc6f2635450e35dd86b9051fa7c68 Author: Vignesh Raghavendra Date: Tue Dec 13 22:13:03 2022 +0530 dmaengine: ti: k3-udma: Add support for DMAs on AM62A SoC AM62A SoC has a BCDMA and PKTDMA as systems DMAs for service various peripherals similar to AM64 SoC. Add support for the same. Signed-off-by: Vignesh Raghavendra Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20221213164304.1126945-5-vigneshr@ti.com Signed-off-by: Vinod Koul commit aac6db7e243a24f7b1a84a6293b68a72e6764893 Author: Jai Luthra Date: Tue Dec 13 22:13:02 2022 +0530 dmaengine: ti: k3-psil-am62a: Add AM62Ax PSIL and PDMA data Add PSIL and PDMA data for AM62Ax SoC. Signed-off-by: Jai Luthra Signed-off-by: Vignesh Raghavendra Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20221213164304.1126945-4-vigneshr@ti.com Signed-off-by: Vinod Koul commit 4c7f3ca1745e18e2da9a83373c26eaf6f51c0505 Author: Vignesh Raghavendra Date: Tue Dec 13 22:13:01 2022 +0530 dmaengine: ti: k3-udma: Fix BCDMA for case w/o BCHAN Reusing loop iterator fails if BCHAN is not present as iterator is uninitialized Signed-off-by: Vignesh Raghavendra Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20221213164304.1126945-3-vigneshr@ti.com Signed-off-by: Vinod Koul commit 58617149210c66c177001edddc7c991c7696c729 Author: Vignesh Raghavendra Date: Tue Dec 13 22:13:00 2022 +0530 dt-bindings: dma: ti: k3-bcdma: Add bindings for BCDMA CSI RX AM62A SoC has a dedicated BCDMA that serves Camera Serial Interface (CSI) IP. Add new compatible for the same. Unlike system BCDMA, this instance only has RX DMA channels and lack TX or block copy channel. Thus make those properties optional. Additionally CSI RX has independent power domain, add the binding for the same. Signed-off-by: Vignesh Raghavendra Reviewed-by: Krzysztof Kozlowski Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20221213164304.1126945-2-vigneshr@ti.com Signed-off-by: Vinod Koul commit cc7aac1d86d565ff62096982d3667661b0f0ad9d Author: Melody Olvera Date: Fri Dec 16 15:15:12 2022 -0800 dt-bindings: dmaengine: qcom: gpi: Add QDU1000/QRU1000 gpi device Add compatible for gpi on QDU1000 and QRU1000 SoCs. Signed-off-by: Melody Olvera Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221216231513.25085-1-quic_molvera@quicinc.com Signed-off-by: Vinod Koul commit 0642b3f47ced9e320cffee6c837bbc7c69be6312 Author: Marek Vasut Date: Mon Dec 19 10:37:13 2022 +0100 dt-bindings: dma: fsl-mxs-dma: Convert MXS DMA to DT schema Convert the MXS DMA binding to DT schema format using json-schema. Drop "interrupt-names" property, since it is broken. The drivers/dma/mxs-dma.c in Linux kernel does not use it, the property contains duplicate array entries in existing DTs, and even malformed entries (gmpi, should have been gpmi). Get rid of that optional property altogether. Update example node names to be standard dma-controller@ , add global interrupt-parent property into example. Signed-off-by: Marek Vasut Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221219093713.328776-1-marex@denx.de Signed-off-by: Vinod Koul commit 93f7d11f101d29095b73d7536f360ac025ca985e Author: Martin Botka Date: Thu Dec 22 20:45:59 2022 +0100 dt-bindings: dma: gpi: Document SM6125 compatible Document compatibility for this GPI DMA controller on SM6125. Signed-off-by: Martin Botka [Marijn: Move compatible to the list with qcom,sdm845-gpi-dma] Signed-off-by: Marijn Suijten Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221222194600.139854-2-marijn.suijten@somainline.org Signed-off-by: Vinod Koul commit 5e4cab734c26ec46fd847bedd31a0df83d853b04 Author: Johan Hovold Date: Tue Dec 27 18:02:02 2022 +0100 arm64: dts: qcom: sc8280xp-x13s: move 'thermal-zones' node Move the 'thermal-zones' node after the regulator nodes to restore the root-node sort order (alphabetically by node name). Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221227170202.21618-1-johan+linaro@kernel.org commit 20e954411c9e59b61eacd1822a0aa0e4676a43f7 Author: Konrad Dybcio Date: Mon Dec 12 12:10:37 2022 +0100 arm64: dts: qcom: sdm845: Fix some whitespace/newlines Remove unnecessary newlines and fix up whitespace near the soundwire controller node. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221212111037.98160-10-konrad.dybcio@linaro.org commit 51f748c62358cf878feb2b9177017b67f3f6c9bc Author: Konrad Dybcio Date: Mon Dec 12 12:10:36 2022 +0100 arm64: dts: qcom: sm8150: Use lowercase hex Use lowercase hex, as that's the preferred and overwhermingly present style. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221212111037.98160-9-konrad.dybcio@linaro.org commit 74f9165935218db8348f24eeb01769b605a47e2d Author: Konrad Dybcio Date: Mon Dec 12 12:10:35 2022 +0100 arm64: dts: qcom: sm8250: Use lowercase hex Use lowercase hex, as that's the preferred and overwhermingly present style. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221212111037.98160-8-konrad.dybcio@linaro.org commit 7b5cb47afda7d602b1335e7a6eef5d6ce82d0c8e Author: Konrad Dybcio Date: Mon Dec 12 12:10:34 2022 +0100 arm64: dts: qcom: sdm845: Use lowercase hex Use lowercase hex, as that's the preferred and overwhermingly present style. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221212111037.98160-7-konrad.dybcio@linaro.org commit 5c9d77725069df48c1c0e682e64143cb6a62b165 Author: Konrad Dybcio Date: Mon Dec 12 12:10:33 2022 +0100 arm64: dts: qcom: sdm660: Use lowercase hex Use lowercase hex, as that's the preferred and overwhermingly present style. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221212111037.98160-6-konrad.dybcio@linaro.org commit 5442632899f40ecfea2c7b4400f93966b04d5b6a Author: Konrad Dybcio Date: Mon Dec 12 12:10:32 2022 +0100 arm64: dts: qcom: sdm630: Use lowercase hex Use lowercase hex, as that's the preferred and overwhermingly present style. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221212111037.98160-5-konrad.dybcio@linaro.org commit d6882340d019607ceabbf2f20f81bc376c4deff5 Author: Konrad Dybcio Date: Mon Dec 12 12:10:31 2022 +0100 arm64: dts: qcom: msm8998: Use lowercase hex Use lowercase hex, as that's the preferred and overwhermingly present style. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221212111037.98160-4-konrad.dybcio@linaro.org commit 21dd43fda18a21ddcc7567bbadc831c179e98c67 Author: Konrad Dybcio Date: Mon Dec 12 12:10:30 2022 +0100 arm64: dts: qcom: msm8996: Use lowercase hex Use lowercase hex, as that's the preferred and overwhermingly present style. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221212111037.98160-3-konrad.dybcio@linaro.org commit 0431dba3733bf52dacf7382e7b0c1b4c0b59e88d Author: Konrad Dybcio Date: Mon Dec 12 12:10:29 2022 +0100 arm64: dts: qcom: ipq6018: Use lowercase hex Use lowercase hex, as that's the preferred and overwhermingly present style. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221212111037.98160-2-konrad.dybcio@linaro.org commit 67fb53745e0b38275fa0b422b6a3c6c1c028c9a2 Author: Konrad Dybcio Date: Sat Dec 10 21:03:53 2022 +0100 arm64: dts: qcom: msm8996: Add additional A2NoC clocks On eMMC devices, the UFS clocks aren't started in the bootloader (or well, at least it should not be, as that would just leak power..), which results in platform reboots when trying to access the unclocked UFS hardware, which unfortunately happens on each and every boot, as interconnect calls sync_state and goes over each and every path. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov #db820c Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221210200353.418391-6-konrad.dybcio@linaro.org commit 632a35e24fefa24f79a97310e8c4642e33919204 Author: Marijn Suijten Date: Sat Dec 10 15:25:25 2022 +0100 arm64: dts: qcom: sm8150-kumano: Configure resin as volume up key The volume-up button on both kumanos (Xperia 1 and Xperia 5) are mapped to resin. Signed-off-by: Marijn Suijten Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221210142525.16974-3-konrad.dybcio@linaro.org commit 6cef82a8a7d9cbfacc94914791fbbe526709aa43 Author: Konrad Dybcio Date: Sat Dec 10 15:25:24 2022 +0100 arm64: dts: qcom: sm8150-kumano: Add NXP PN553 NFC Add a node for NXP PN553 NFC (or PN557, unclear data), using the nxp-nci driver. Signed-off-by: Konrad Dybcio Reviewed-by: Marijn Suijten Tested-by: Marijn Suijten # On Xperia 1 and Xperia 5 Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221210142525.16974-2-konrad.dybcio@linaro.org commit 0ead2d1758714fb724e062f76fdb4868ba8303e6 Author: Konrad Dybcio Date: Sat Dec 10 15:25:23 2022 +0100 arm64: dts: qcom: sm8150-kumano: Add GPIO keys Configure hardware buttons (V-, Camera Shutter/Focus) on Kumano devices. Signed-off-by: Konrad Dybcio Reviewed-by: Marijn Suijten Tested-by: Marijn Suijten # On Xperia 1 and Xperia 5 Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221210142525.16974-1-konrad.dybcio@linaro.org commit 6152ab29a39131328a310b578aae693d3ec74a9d Author: Konrad Dybcio Date: Sat Dec 10 15:10:00 2022 +0100 arm64: dts: qcom: msm8996-tone: Move status last Align the style with other boards. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221210141000.14344-2-konrad.dybcio@linaro.org commit b860ba9e42538f2a490925121071c215c23d1863 Author: Konrad Dybcio Date: Sat Dec 10 15:09:59 2022 +0100 arm64: dts: qcom: msm8996-tone: Enable SDHCI1 With the recent patch that allowed us to reset the SDHCI controller from Linux, things started working properly. Enable SDHCI1, and by extension eMMC. Also, remove the now-useless cmdline SDHCI quirks. Signed-off-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221210141000.14344-1-konrad.dybcio@linaro.org commit e5b8c08245307a82cdf180cd5d385a34ba1cfd9d Author: Krzysztof Kozlowski Date: Sat Dec 10 12:57:04 2022 +0100 arm64: dts: qcom: sm8250: move sound and codec nodes out of soc The sound and codec nodes are not a property of a soc, but rather board as it describes the sound configuration. It also does not have unit address: sm8250-hdk.dtb: soc@0: sound: {} should not be valid under {'type': 'object'} Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221210115704.97614-4-krzysztof.kozlowski@linaro.org commit d0b014a74823cc52dde447d0af61ff14fce5a785 Author: Krzysztof Kozlowski Date: Sat Dec 10 12:57:03 2022 +0100 arm64: dts: qcom: sdm845: move sound node out of soc The sound node is not a property of a soc, but rather board as it describes the sound configuration. It also does not have unit address: sdm845-shift-axolotl.dtb: soc@0: sound: {} should not be valid under {'type': 'object'} Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221210115704.97614-3-krzysztof.kozlowski@linaro.org commit 85966125ecfe75735d8a02f00c83545aaad0ba88 Author: Krzysztof Kozlowski Date: Sat Dec 10 12:57:02 2022 +0100 arm64: dts: qcom: sdm845: move DSI/QUP/QSPI opp tables out of SoC node The SoC node is a simple-bus and its schema expect to have nodes only with unit addresses: sdm850-lenovo-yoga-c630.dtb: soc@0: opp-table-qup: {'compatible': ['operating-points-v2'], 'phandle': [[60]], 'opp-50000000': ... 'required-opps': [[55]]}} should not be valid under {'type': 'object'} Move to top-level OPP tables: - DSI and QUP which are shared between multiple nodes, - QSPI which cannot be placed in its node due to address/size cells. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221210115704.97614-2-krzysztof.kozlowski@linaro.org commit 524dfd2ddbd74ed5b4cbb3e002984cf95878c827 Author: Krzysztof Kozlowski Date: Sat Dec 10 12:57:01 2022 +0100 arm64: dts: qcom: sc7180: move QUP and QSPI opp tables out of SoC node The SoC node is a simple-bus and its schema expect to have nodes only with unit addresses: sc7180-trogdor-lazor-r3.dtb: soc@0: opp-table-qspi: {'compatible': ['operating-points-v2'], 'phandle': [[186]], 'opp-75000000': ... 'required-opps': [[47]]}} should not be valid under {'type': 'object'} Move to top-level OPP tables: - QUP which is shared between multiple nodes, - QSPI which cannot be placed in its node due to address/size cells. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221210115704.97614-1-krzysztof.kozlowski@linaro.org commit 1629063ec9d8a32111a63ce7250a7781376c492a Author: Krzysztof Kozlowski Date: Sat Dec 10 12:33:40 2022 +0100 arm64: dts: qcom: sdm845: drop 0x from unit address By coding style, unit address should not start with 0x. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221210113340.63833-1-krzysztof.kozlowski@linaro.org commit 3b2ff50da499178cc418f4b319e279d1b52958ed Author: Konrad Dybcio Date: Sat Dec 10 11:25:59 2022 +0100 arm64: dts: qcom: sm6350: Fix up the ramoops node Fix up the ramoops node to make it match bindings and style: - remove "removed-dma-pool" - don't pad size to 8 hex digits - change cc-size to ecc-size so that it's used - increase ecc-size from to 16 - remove the zeroed ftrace-size Fixes: 5f82b9cda61e ("arm64: dts: qcom: Add SM6350 device tree") Reported-by: Luca Weiss Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221210102600.589028-1-konrad.dybcio@linaro.org commit ea25d61b448a51446edb1e8cab8a8d38fc719476 Author: Marijn Suijten Date: Fri Dec 9 23:04:49 2022 +0100 arm64: dts: qcom: Use plural _gpios node label for PMIC gpios The gpio node in PMIC dts'es define access to multiple GPIOs. Most Qcom PMICs were already using the plural _gpios label to point to this node, but a few PMICs were left behind including the recently-pulled pm(i)8950. Rename it from *_gpio to *_gpios for pm6125, pm6150(l), pm8005, pm(i)8950, and pm(i)8998. Signed-off-by: Marijn Suijten Acked-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209220450.1793421-1-marijn.suijten@somainline.org commit 04a8bdd135cc05b10b665cedb360c7353312602d Author: Bhanu Prakash Maiya Date: Tue Dec 27 12:32:22 2022 -0700 platform/chrome: cros_ec_uart: Add transport layer This patch does following: 1. Adds a new cros-ec-uart driver. This driver can send EC requests on UART and process response packets received on UART transport. 2. Once probed, this driver will initialize the serdev device based on the underlying information in the ACPI resource. After serdev device properties are set, this driver will register itself cros-ec. 3. High level driver can use this implementation to talk to ChromeOS Embedded Controller device in case it supports UART as transport. 4. When cros-ec driver initiates a request packet, outgoing message is processed in buffer and sent via serdev. Once bytes are sent, driver enables a wait_queue. 5. Since ChromeOS EC device sends response asynchronously, AP's TTY driver accumulates response bytes and calls the registered callback. TTY driver can send multiple callback for bytes ranging from 1 to MAX bytes supported by EC device. 6. Driver waits for EC_MSG_DEADLINE_MS to collect and process received bytes. It wakes wait_queue if expected bytes are received or else wait_queue timeout. Based on the error condition, driver returns data_len or error to cros_ec. Signed-off-by: Bhanu Prakash Maiya Co-developed-by: Mark Hasemeyer Signed-off-by: Mark Hasemeyer Reviewed-by: Prashant Malani Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20221227123212.v13.1.If7926fcbad397bc6990dd725690229bed403948c@changeid commit 3c3d2cb221b8647d1c547b4c44d2d6060cc742a9 Author: Marijn Suijten Date: Fri Dec 9 22:54:37 2022 +0100 arm64: dts: qcom: pmi8950: Correct rev_1250v channel label to mv This was pointed out in review but never followed up on thanks to sidetracked discussions about labels vs node names. Fixes: 0d97fdf380b4 ("arm64: dts: qcom: Add configuration for PMI8950 peripheral") Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Reviewed-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209215437.1783067-1-marijn.suijten@somainline.org commit be8de06dc397c45cb0f3fe04084089c3f06c419f Author: Marijn Suijten Date: Fri Dec 9 20:17:33 2022 +0100 arm64: dts: qcom: sm8150-kumano: Panel framebuffer is 2.5k instead of 4k The framebuffer configuration for kumano griffin, written in kumano dtsi (which is overwritten in bahamut dts for its smaller panel) has to use a 1096x2560 configuration as this is what the panel (and framebuffer area) has been initialized to. Downstream userspace also has access to (and uses) this 2.5k mode by default, and only switches the panel to 4k when requested. Fixes: d0a6ce59ea4e ("arm64: dts: qcom: sm8150: Add support for SONY Xperia 1 / 5 (Kumano platform)") Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209191733.1458031-1-marijn.suijten@somainline.org commit 335fe4b79838a7c722d21c15784f7ed1172a6c81 Author: Douglas Anderson Date: Fri Dec 9 09:12:40 2022 -0800 arm64: dts: qcom: sc7180: Add pazquel360 touschreen The touchscreen was supposed to have been added when pazquel360 first was added upstream but was missed. Add it now. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209091234.v3.4.Id132522bda31fd97684cb076a44a0907cd28097d@changeid commit 23ff866987de2910de4a1060e9b0e112376c0dd0 Author: Douglas Anderson Date: Fri Dec 9 09:12:39 2022 -0800 arm64: dts: qcom: sc7180: Start the trogdor eDP/touchscreen regulator on Now that we've added the `off-on-delay-us` for the touchpanel regulator, we can see that we're actually hitting that delay at bootup. I saw about 200 ms of delay. Let's avoid that delay by starting the regulator on. We'll only do this for eDP devices for the time being. NOTE: we _won't_ do this for homestar. Homestar's panel really likes to be power cycled. It's why the Linux driver for this panel has a pm_runtime_put_sync_suspend() when the panel is being unprepared but the normal panel-edp driver doesn't. It's also why this hardware has a separate power rail for eDP vs. touchscreen, unlike all the other trogdor boards. We won't start homestar's regulator on. While this could mean a slight delay on homestar, it is probably a _correct_ delay. The bootloader might have left the regulator on (it does so in dev and recovery modes), so if we turned the regulator off at probe time and we actually hit the delay then we were probably violating T12 in the panel spec. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209091234.v3.3.I7050a61ba3a48e44b86053f265265b5e3c0cee31@changeid commit f5b4811e8758fed76da4f54f6efa1452bc878595 Author: Douglas Anderson Date: Fri Dec 9 09:12:38 2022 -0800 arm64: dts: qcom: sc7180: Add trogdor eDP/touchscreen regulator off-on-time In general, the timing diagrams for components specify a minimum time for power cycling the component. When we remove power from a device we need to let the device fully discharge and get to a quiescent state before applying power again. If we power a device on too soon then it might not have fully powered off and might be in a weird in-between / invalid state. eDP panels typically have a time that's at least 500 ms here. You can see that in Linux's panel-edp driver nearly every device specifies a "unprepare" time of at least 500 ms. This is a common minimum and the 500 ms is even in the example in the eDP spec. In Linux, the "panel-edp" driver enforces this delay for its own control of the regulator, but the "panel-edp" driver can't do anything about other control of the regulator (for instance, by the touchpanel driver). Let's add 500 ms as a board constraint for the regulator that's used for eDP/touchpanel on trogdor boards. If a given trogdor board stuffs only panels that can use a shorter time or stuff some panels that need a larger time then they can manually adjust this timing. We'll only do this minimum delay for trogdor devices with eDP (ones that use either bridge chip), not for devices with MIPI panels. MIPI panels could have similar constraints but the 500 ms isn't necessarily as standard and there are no known cases where this delay is needed. For most trogdor boards, this doesn't actually seem to affect anything when testing against shipping Linux. However, with pazqel360 it seems that this does make a difference. It seems that the touchscreen on this board _also_ needs some time for the regulator to discharge. That time is much less than 500 ms, so we'll just put the eDP panel 500 ms in there since the board constraint should be the "max" of the components. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209091234.v3.2.I65ac577411b017eff50e7a4fda254e5583ccdc48@changeid commit 9506a3661258d07a60b186f667b391708ddf63ac Author: Douglas Anderson Date: Fri Dec 9 09:12:37 2022 -0800 arm64: dts: qcom: sc7180: Bump up trogdor ts_reset_l drive strength On at least one board (pazquel360) the reset line for the touchscreen was scoped and found to take almost 2 ms to fall when we drove it low. This wasn't great because the Linux driver for the touchscreen (the elants_i2c driver) thinks it can do a 500 us reset pulse. If we bump the drive strength to 8 mA then the reset line went down in ~421 us. NOTE: we could apply this fix just for pazquel360, but: * Probably other trogdor devices have similar timings and it's just that nobody has noticed it before. * There are other trogdor boards using the same elan driver that tries to do 500 us reset pulses. * Bumping the drive strength to 8mA across the board won't hurt. This isn't a high speed signal or anything. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209091234.v3.1.I39c387f1e3176fcf340039ec12d54047de9f8526@changeid commit 1c170714490e4d8c0886019145c9d90dfade14f9 Author: Luca Weiss Date: Fri Dec 9 14:54:08 2022 +0100 arm64: dts: qcom: sm7225-fairphone-fp4: configure flash LED Configure the pm6150l flash node for the dual flash LEDs found on FP4. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209-fp4-pm6150l-flash-v1-3-531521eb2a72@fairphone.com commit e48b2f1fb1749e6ceeca13ac80e6e46b954dce41 Author: Luca Weiss Date: Fri Dec 9 14:54:07 2022 +0100 arm64: dts: qcom: pm6150l: add spmi-flash-led node Add a node describing the flash block found on pm6150l. Signed-off-by: Luca Weiss Acked-by: Pavel Machek Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209-fp4-pm6150l-flash-v1-2-531521eb2a72@fairphone.com commit 53cb681199f4d8454335742f0c84b36ddc7483ed Author: Konrad Dybcio Date: Fri Dec 9 13:40:26 2022 +0100 arm64: dts: qcom: sm6115: Add thermal zones Add thermal zones associated with the on-SoC temperature sensors. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209124026.178764-1-konrad.dybcio@linaro.org commit 85d4e6ea082d3905f3ede470ac337fddc2d47650 Author: Konrad Dybcio Date: Fri Dec 9 13:39:09 2022 +0100 clk: qcom: gcc-sm6115: Use floor_ops for SDCC1/2 core clk Just like in case of other SoCs change SDCC1/SDCC2 ops to floor to avoid overclocking the controller. Fixes: cbe63bfdc54f ("clk: qcom: Add Global Clock controller (GCC) driver for SM6115") Signed-off-by: Konrad Dybcio Reviewed-by: Iskren Chernev Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221209123910.178609-1-konrad.dybcio@linaro.org commit 67e75cfea375b5eca42a8d41b927fa195e723fe6 Author: Konrad Dybcio Date: Thu Dec 8 21:14:01 2022 +0100 arm64: dts: qcom: Add Lenovo Tab P11 (J606F/XiaoXin Pad) dts Add an initial device tree for the Lenovo Tab P11. Currently it enables: - simplefb - SD Card slot via SDHCI2 - gpio-keys & PON keys - UFS - RPM regulators - USB2 This has been validated with a rev (62) device. You can check yours next to the serial no. on the sticker in the lower portion of the back side of your tablet. To get a successful boot run: cat arch/arm64/boot/Image.gz arch/arm64/boot/dts/qcom/\ sm6115p-lenovo-j606f.dtb > .Image.gz-dtb ~/mkbootimg/mkbootimg.py \ --kernel .Image.gz-dtb \ --ramdisk some/initrd.img \ --pagesize 4096 \ --base 0x0 \ --kernel_offset 0x8000 \ --ramdisk_offset 0x1000000 \ --tags_offset 0x100 \ --cmdline 'SOME_CMDLINE' \ --dtb_offset 0x1f00000 \ --header_version 1 \ --os_version 11 \ --os_patch_level 2022-11 \ -o j606f.img fastboot flash boot j606f.img fastboot flash dtbo empty.img fastboot flash recovery empty.img fastboot reboot Where empty.img is 2 zero-bytes. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221208201401.530555-5-konrad.dybcio@linaro.org commit 92ad27fb925943d62deaaa659931ce85ddec99c8 Author: Konrad Dybcio Date: Thu Dec 8 21:14:00 2022 +0100 dt-bindings: arm: qcom: Add SM6115(P) and Lenovo Tab P11 Document SM6115P, an APQ version of SM6115. Document Lenovo Tab P11 (J606F) as a SM6115P device. Add SM6115 to the msm-id list of shame. Signed-off-by: Konrad Dybcio Reviewed-by: Bhupesh Sharma Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221208201401.530555-4-konrad.dybcio@linaro.org commit 0f1619aa22cd78a47522008e9b83524eae6bb922 Author: Konrad Dybcio Date: Thu Dec 8 21:13:59 2022 +0100 arm64: dts: qcom: sm6115: Provide real SMD RPM XO to SDC1/2 Since we have a functioning RPM clock driver, let's make use of it and provide the real XO clock to clients, instead of the fixed-clock stub. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221208201401.530555-3-konrad.dybcio@linaro.org commit ad9514be8ddb9d3a8c262aa415c2f1c1f4cc97f9 Author: Konrad Dybcio Date: Thu Dec 8 21:13:58 2022 +0100 arm64: dts: qcom: sm6115: Provide xo clk to rpmcc rpmcc used to rely on global clock lookup (and still does so for backwards compat reasons) of "xo_board", which was common back when we did not care about things like underscores in node names. Nowadays it expects to be fed a reference to the fixed clock. Satisfy that requirement to make sure rpm clock rates are not all stuck at zero. Fixes: 97e563bf5ba1 ("arm64: dts: qcom: sm6115: Add basic soc dtsi") Reported-by: Adam Skladowski Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221208201401.530555-2-konrad.dybcio@linaro.org commit 01b6041454e8bc4f5feb76e6bcdc83a48cea21f2 Author: Konrad Dybcio Date: Thu Dec 8 21:13:57 2022 +0100 arm64: dts: qcom: sm6115: Fix UFS node In its current form, UFS did not even probe successfully - it failed when trying to set XO (ref_clk) to 300 MHz instead of doing so to the ICE clk. Moreover, the missing reg-names prevented ICE from working or being discovered at all. Fix both of these issues. As a sidenote, the log reveals that this SoC uses UFS ICE v3.1.0. Fixes: 97e563bf5ba1 ("arm64: dts: qcom: sm6115: Add basic soc dtsi") Signed-off-by: Konrad Dybcio Reviewed-by: Iskren Chernev Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221208201401.530555-1-konrad.dybcio@linaro.org commit 582e7c1026fa848a918a1db159bcae7c5fa7f0ce Author: Luca Weiss Date: Wed Dec 7 09:40:45 2022 +0100 arm64: dts: qcom: sm7225-fairphone-fp4: Add pmk8350 PMIC The PMK8350 (which is actually a PMK8003) is used for the RTC and has ADC for thermals. Since the adc_tm compatible used in PMK8350 is not yet supported, skip configuring that and the associated thermal zone for now. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221207084045.270172-1-luca.weiss@fairphone.com commit cb98187a6883c498b0702cedc1f59247e7857bea Author: Richard Acayan Date: Tue Dec 6 18:17:32 2022 -0500 arm64: dts: qcom: sdm670: add missing usb hstx nvmem cell This nvmem cell is present on SDM670 as well as SDM845. Add it in SDM670 so there is proper tuning. Signed-off-by: Richard Acayan Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221206231729.164453-3-mailingradian@gmail.com commit 7bff6f4351bf82c0b9279fc711b730d2d28b8b8c Author: Richard Acayan Date: Tue Dec 6 18:17:30 2022 -0500 arm64: dts: qcom: sdm670: add qfprom node Some hardware quirks and capabilities can be determined by reading the fuse-programmable read-only memory. Add the QFPROM node so consumers know if they need to do anything extra to support the hardware. Signed-off-by: Richard Acayan Reviewed-by: Bjorn Andersson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221206231729.164453-2-mailingradian@gmail.com commit 29dcf3c1a8159acdf56905c377a214381eda5a24 Author: Luca Weiss Date: Mon Nov 28 18:37:44 2022 +0100 arm64: dts: qcom: sdm632-fairphone-fp3: Add NFC Configure the node for the NQ310 chip found on this device, which is compatible with generic nxp-nci-i2c driver. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221128173744.833018-2-luca@z3ntu.xyz commit 4df05b44468cdf5dea7a7aa291eeabd7e639f8ff Author: Krzysztof Kozlowski Date: Sun Nov 27 21:32:38 2022 +0100 arm64: dts: qcom: msm8996-xiaomi-gemini: use preferred enable-gpios for LP5562 LED The preferred name suffix for properties with single and multiple GPIOs is "gpios". Linux GPIO core code supports both. Bindings are going to expect the "gpios" one: qcom/msm8996-xiaomi-gemini.dtb: lp5562@30: 'enable-gpio' does not match any of the regexes: '^led@[0-8]$', '^multi-led@[0-8]$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221127203240.54955-1-krzysztof.kozlowski@linaro.org commit 43069b9cd358aebc692e654de91ee06ff66e26af Author: Konrad Dybcio Date: Thu Nov 24 23:01:47 2022 +0100 arm64: dts: qcom: msm8996-tone: Fix USB taking 6 minutes to wake up The hardware turns out to be pretty sluggish at assuming it can only do USB2 with just a USB2 phy assigned to it - before it needed about 6 minutes to acknowledge that. Limit it to USB-HS explicitly to make USB come up about 720x faster. Fixes: 9da65e441d4d ("arm64: dts: qcom: Add support for SONY Xperia X Performance / XZ / XZs (msm8996, Tone platform)") Signed-off-by: Konrad Dybcio Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221124220147.102611-1-konrad.dybcio@linaro.org commit f29077d8665221ba2802a29ee7bd9fcef66cde81 Author: Srinivas Kandagatla Date: Wed Nov 23 10:43:42 2022 +0000 arm64: dts: qcom: sc8280xp-x13s: Add soundcard support Add support for SoundCard on X13s. This patch adds support for Headset Playback, record and 2 DMICs on the Panel along with the regulators required for powering up the LPASS codecs. Signed-off-by: Srinivas Kandagatla Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221123104342.26140-4-srinivas.kandagatla@linaro.org commit c18773d162a63f65024e80ae355e3fbc923e7255 Author: Srinivas Kandagatla Date: Wed Nov 23 10:43:41 2022 +0000 arm64: dts: qcom: sc8280xp: add SoundWire and LPASS Add LPASS Codecs along with SoundWire controller for TX, RX, WSA and VA macros along with LPASS LPI pinctrl node. Signed-off-by: Srinivas Kandagatla Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221123104342.26140-3-srinivas.kandagatla@linaro.org commit e73defb2deee74f3f4988196bf0c21782dffa415 Author: Srinivas Kandagatla Date: Wed Nov 23 10:43:40 2022 +0000 arm64: dts: qcom: sc8280xp: add gpr node Add GPR node along with APM(Audio Process Manager) and PRM(Proxy resource Manager) audio services. Signed-off-by: Srinivas Kandagatla Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221123104342.26140-2-srinivas.kandagatla@linaro.org commit 7b8847e9d56f5e397b37df63f271f3166a09f3a8 Author: Lin, Meng-Bo Date: Wed Nov 23 03:39:21 2022 +0000 arm64: dts: qcom: msm8916-acer-a1-724: Add touchscreen A1-724 uses a Focaltech FT5446 touchscreen that is connected to blsp_i2c5. Add it to the device tree. Signed-off-by: Lin, Meng-Bo Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221123033844.149115-1-linmengbo0689@protonmail.com commit 85e0a0f8bfa42dc05b7d89798df6fbc2c13147a6 Author: Lin, Meng-Bo Date: Wed Nov 23 03:39:19 2022 +0000 arm64: dts: qcom: msm8916-acer-a1-724: Add accelerometer/magnetometer Iconia Talk S uses a Bosch BMC150 accelerometer/magnetometer combo. The chip provides two separate I2C devices for the accelerometer and magnetometer that are already supported by the bmc150-accel and bmc150-magn driver. Signed-off-by: Lin, Meng-Bo Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221123033830.149061-1-linmengbo0689@protonmail.com commit 0fbf49b3eac98495c1c75ea16019e5613cda109b Author: Lin, Meng-Bo Date: Wed Nov 23 03:39:09 2022 +0000 arm64: dts: qcom: msm8916-acer-a1-724: Add initial device tree Acer Iconia Talk S A1-724 is a tablet using the MSM8916 SoC released in 2014. Note: The original firmware from Acer can only boot 32-bit kernels. To boot arm64 kernels it is necessary to flash 64-bit TZ/HYP firmware with EDL, e.g. taken from the DragonBoard 410c. This works because Acer didn't set up (firmware) secure boot. Add a device tree for with initial support for: - GPIO keys - pm8916-vibrator - SDHCI (internal and external storage) - USB Device Mode - UART - WCNSS (WiFi/BT) - Regulators Signed-off-by: Lin, Meng-Bo Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221123033817.149007-1-linmengbo0689@protonmail.com commit 17c073500e9060281a115e34b00424d486be9450 Author: Lin, Meng-Bo Date: Wed Nov 23 03:38:51 2022 +0000 dt-bindings: qcom: Document msm8916-acer-a1-724 Document the new acer,a1-724 device tree bindings used in its device tree. Signed-off-by: Lin, Meng-Bo Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221123033804.148953-1-linmengbo0689@protonmail.com commit a28146b51a299897090f071ea26071a5ab39d233 Author: Julian Weigt Date: Mon Nov 21 22:30:20 2022 +0100 ARM: dts: qcom: msm8974-castor: Enable charging over USB Set usb-charge-current-limit to higher value so that the device can be charged over USB. Signed-off-by: Julian Weigt Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221121213019.324558-2-luca@z3ntu.xyz commit 73bf63a6300b2fec48b54fe41d1c6d964fb2f33b Author: Luca Weiss Date: Mon Nov 21 22:30:19 2022 +0100 ARM: dts: qcom: msm8974-castor: Fix touchscreen init On some devices a higher delay is needed, otherwise touchscreen probe fails. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221121213019.324558-1-luca@z3ntu.xyz commit 6d933c0ec1718a08b44689da0f79ac1d905db7dd Author: Luca Weiss Date: Mon Nov 21 22:22:26 2022 +0100 ARM: dts: qcom: msm8974-*: re-add remoteproc supplies As part of a recent cleanup commit, the remoteproc supplies for adsp and modem were removed from msm8974.dtsi and now need to be set in the device dts. Do so. Fixes: f300826d27be ("ARM: dts: qcom-msm8974: Sort and clean up nodes") Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221121212226.321514-2-luca@z3ntu.xyz commit a0145c557d94b3bac7c5a4545f90cfe940a226cd Author: Bjorn Andersson Date: Mon Nov 21 22:22:25 2022 +0100 ARM: dts: msm8974: castor: Define pm8841 regulators Define the pm8841 regulators under SMD/RPM, to allow the modem remoteproc to set the voltage during boot of the remote processor. Entries are just copied from the Honami dts. Signed-off-by: Bjorn Andersson Signed-off-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221121212226.321514-1-luca@z3ntu.xyz commit 4633a00682589931e8415c166979d8e5dd174282 Author: Andrii Nakryiko Date: Thu Dec 22 21:49:20 2022 -0800 bpf: fix regs_exact() logic in regsafe() to remap IDs correctly Comparing IDs exactly between two separate states is not just suboptimal, but also incorrect in some cases. So update regs_exact() check to do byte-by-byte memcmp() only up to id/ref_obj_id. For id and ref_obj_id perform proper check_ids() checks, taking into account idmap. This change makes more states equivalent improving insns and states stats across a bunch of selftest BPF programs: File Program Insns (A) Insns (B) Insns (DIFF) States (A) States (B) States (DIFF) ------------------------------------------- -------------------------------- --------- --------- -------------- ---------- ---------- ------------- cgrp_kfunc_success.bpf.linked1.o test_cgrp_get_release 141 137 -4 (-2.84%) 13 13 +0 (+0.00%) cgrp_kfunc_success.bpf.linked1.o test_cgrp_xchg_release 142 139 -3 (-2.11%) 14 13 -1 (-7.14%) connect6_prog.bpf.linked1.o connect_v6_prog 139 102 -37 (-26.62%) 9 6 -3 (-33.33%) ima.bpf.linked1.o bprm_creds_for_exec 68 61 -7 (-10.29%) 6 5 -1 (-16.67%) linked_list.bpf.linked1.o global_list_in_list 569 499 -70 (-12.30%) 60 52 -8 (-13.33%) linked_list.bpf.linked1.o global_list_push_pop 167 150 -17 (-10.18%) 18 16 -2 (-11.11%) linked_list.bpf.linked1.o global_list_push_pop_multiple 881 815 -66 (-7.49%) 74 63 -11 (-14.86%) linked_list.bpf.linked1.o inner_map_list_in_list 579 534 -45 (-7.77%) 61 55 -6 (-9.84%) linked_list.bpf.linked1.o inner_map_list_push_pop 190 181 -9 (-4.74%) 19 18 -1 (-5.26%) linked_list.bpf.linked1.o inner_map_list_push_pop_multiple 916 850 -66 (-7.21%) 75 64 -11 (-14.67%) linked_list.bpf.linked1.o map_list_in_list 588 525 -63 (-10.71%) 62 55 -7 (-11.29%) linked_list.bpf.linked1.o map_list_push_pop 183 174 -9 (-4.92%) 18 17 -1 (-5.56%) linked_list.bpf.linked1.o map_list_push_pop_multiple 909 843 -66 (-7.26%) 75 64 -11 (-14.67%) map_kptr.bpf.linked1.o test_map_kptr 264 256 -8 (-3.03%) 26 26 +0 (+0.00%) map_kptr.bpf.linked1.o test_map_kptr_ref 95 91 -4 (-4.21%) 9 8 -1 (-11.11%) task_kfunc_success.bpf.linked1.o test_task_xchg_release 139 136 -3 (-2.16%) 14 13 -1 (-7.14%) test_bpf_nf.bpf.linked1.o nf_skb_ct_test 815 509 -306 (-37.55%) 57 30 -27 (-47.37%) test_bpf_nf.bpf.linked1.o nf_xdp_ct_test 815 509 -306 (-37.55%) 57 30 -27 (-47.37%) test_cls_redirect.bpf.linked1.o cls_redirect 78925 78390 -535 (-0.68%) 4782 4704 -78 (-1.63%) test_cls_redirect_subprogs.bpf.linked1.o cls_redirect 64901 63897 -1004 (-1.55%) 4612 4470 -142 (-3.08%) test_sk_lookup.bpf.linked1.o access_ctx_sk 181 95 -86 (-47.51%) 19 10 -9 (-47.37%) test_sk_lookup.bpf.linked1.o ctx_narrow_access 447 437 -10 (-2.24%) 38 37 -1 (-2.63%) test_sk_lookup_kern.bpf.linked1.o sk_lookup_success 148 133 -15 (-10.14%) 14 12 -2 (-14.29%) test_tcp_check_syncookie_kern.bpf.linked1.o check_syncookie_clsact 304 300 -4 (-1.32%) 23 22 -1 (-4.35%) test_tcp_check_syncookie_kern.bpf.linked1.o check_syncookie_xdp 304 300 -4 (-1.32%) 23 22 -1 (-4.35%) test_verify_pkcs7_sig.bpf.linked1.o bpf 87 76 -11 (-12.64%) 7 6 -1 (-14.29%) ------------------------------------------- -------------------------------- --------- --------- -------------- ---------- ---------- ------------- Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221223054921.958283-7-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 4a95c85c994801c9ae12d9cb7216da7b484564b3 Author: Andrii Nakryiko Date: Thu Dec 22 21:49:19 2022 -0800 bpf: perform byte-by-byte comparison only when necessary in regsafe() Extract byte-by-byte comparison of bpf_reg_state in regsafe() into a helper function, which makes it more convenient to use it "on demand" only for registers that benefit from such checks, instead of doing it all the time, even if result of such comparison is ignored. Also, remove WARN_ON_ONCE(1)+return false dead code. There is no risk of missing some case as compiler will warn about non-void function not returning value in some branches (and that under assumption that default case is removed in the future). Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221223054921.958283-6-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 910f69996674bfc4a273a335c1fb2ecb45062bf6 Author: Andrii Nakryiko Date: Thu Dec 22 21:49:18 2022 -0800 bpf: reject non-exact register type matches in regsafe() Generalize the (somewhat implicit) rule of regsafe(), which states that if register types in old and current states do not match *exactly*, they can't be safely considered equivalent. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221223054921.958283-5-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 7f4ce97cd5edf723c7f2e32668481b6aa86c9ec6 Author: Andrii Nakryiko Date: Thu Dec 22 21:49:17 2022 -0800 bpf: generalize MAYBE_NULL vs non-MAYBE_NULL rule Make generic check to prevent XXX_OR_NULL and XXX register types to be intermixed. While technically in some situations it could be safe, it's impossible to enforce due to the loss of an ID when converting XXX_OR_NULL to its non-NULL variant. So prevent this in general, not just for PTR_TO_MAP_KEY and PTR_TO_MAP_VALUE. PTR_TO_MAP_KEY_OR_NULL and PTR_TO_MAP_VALUE_OR_NULL checks, which were previously special-cased, are simplified to generic check that takes into account range_within() and tnum_in(). This is correct as BPF verifier doesn't allow arithmetic on XXX_OR_NULL register types, so var_off and ranges should stay zero. But even if in the future this restriction is lifted, it's even more important to enforce that var_off and ranges are compatible, otherwise it's possible to construct case where this can be exploited to bypass verifier's memory range safety checks. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221223054921.958283-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit a73bf9f2d969cbb04d5ca778f2a224060cda1027 Author: Andrii Nakryiko Date: Thu Dec 22 21:49:16 2022 -0800 bpf: reorganize struct bpf_reg_state fields Move id and ref_obj_id fields after scalar data section (var_off and ranges). This is necessary to simplify next patch which will change regsafe()'s logic to be safer, as it makes the contents that has to be an exact match (type-specific parts, off, type, and var_off+ranges) a single sequential block of memory, while id and ref_obj_id should always be remapped and thus can't be memcp()'ed. There are few places that assume that var_off is after id/ref_obj_id to clear out id/ref_obj_id with the single memset(0). These are changed to explicitly zero-out id/ref_obj_id fields. Other places are adjusted to preserve exact byte-by-byte comparison behavior. No functional changes. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221223054921.958283-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit e8f55fcf77794c9867a5edbcb84baf21609465a7 Author: Andrii Nakryiko Date: Thu Dec 22 21:49:15 2022 -0800 bpf: teach refsafe() to take into account ID remapping states_equal() check performs ID mapping between old and new states to establish a 1-to-1 correspondence between IDs, even if their absolute numberic values across two equivalent states differ. This is important both for correctness and to avoid unnecessary work when two states are equivalent. With recent changes we partially fixed this logic by maintaining ID map across all function frames. This patch also makes refsafe() check take into account (and maintain) ID map, making states_equal() behavior more optimal and correct. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20221223054921.958283-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 61ef0e49f9cb350b522e27c55401bfd23d5ea2bb Author: Andy Shevchenko Date: Mon Dec 19 14:32:05 2022 +0200 pinctrl: intel: Add default case to intel_config_set_pull() For the sake of symmetry with intel_config_get_pull(), add a default case to the outer switch. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 7c679f2a2af84edbec0c28171af8c42c6da9af14 Author: Konrad Dybcio Date: Fri Nov 18 16:20:28 2022 +0100 arm64: dts: qcom: sm8350-sagami: Add GPIO line names for PMIC GPIOs 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 PDX213&214 DTSIs to better document the hardware. Diff between 223 and 224: pm8350b < gpio-line-names = "NC", /* GPIO_1 */ > gpio-line-names = "CAM_PWR_A_CS", /* GPIO_1 */ < "NC", > "CAM_PWR_LD_EN", pm8350c < "NC", > "WLC_TXPWR_EN", Which is due to different camera power wiring on 213 and lack of an additional SLG51000 PMIC on 214. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221118152028.59312-3-konrad.dybcio@linaro.org commit 8875b1d71f112b30e4c7e65ed337096bc0cc396b Author: Konrad Dybcio Date: Fri Nov 18 16:20:27 2022 +0100 arm64: dts: qcom: sm8350-sagami: Configure SLG51000 PMIC on PDX215 Remove the mention of this PMIC from the common DTSI, as it's not used on PDX214. Add the required nodes to support it on PDX215. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221118152028.59312-2-konrad.dybcio@linaro.org commit 3ddba3c2268c9539459008291ed816b46aa61e2f Author: Krzysztof Kozlowski Date: Fri Nov 18 12:37:47 2022 +0100 ARM: dts: qcom: sdx55-mtp: add MPSS remoteproc memory-region The MPSS PAS remoteproc bindings require memory-region. The MPSS PAS device node is disabled, but schema still asks for it. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221118113747.56700-1-krzysztof.kozlowski@linaro.org commit 6b42133d2189d9b3770153e84111ede1e1948e0f Author: Neil Armstrong Date: Thu Nov 17 18:04:59 2022 +0100 dt-bindings: soc: qcom: convert non-smd RPM bindings to dt-schema Convert the non-SMD RPM node bindings to dt-schema, the old txt bindings are now removed since all bindings were converted. Signed-off-by: Neil Armstrong Reviewed-by: Rob Herring Acked-by: Lee Jones Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221005-mdm9615-pinctrl-yaml-v5-2-910019fb8b9b@linaro.org commit cc8619e893297ac90e7796751e39c4ea46123e69 Author: Lin, Meng-Bo Date: Thu Nov 17 14:48:19 2022 +0000 arm64: dts: qcom: msm8916-samsung-grandmax: Add properties function and color for keyled keyled is white, and used as touchkey LEDs. Add properties function and color for keyled. Signed-off-by: Lin, Meng-Bo Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221117144717.17886-1-linmengbo0689@protonmail.com commit a723c95fa137f7a1e86dc77a150ef6e2affe977d Author: AngeloGioacchino Del Regno Date: Thu Nov 17 14:29:56 2022 +0100 soc: qcom: Add Qualcomm Ramp Controller driver The Ramp Controller is used to program the sequence ID for pulse swallowing, enable sequence and linking sequence IDs for the CPU cores on some Qualcomm SoCs. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221117132956.169432-3-angelogioacchino.delregno@collabora.com commit 922ef52cea18567bd6a7e083c6acd776b5676bb6 Author: AngeloGioacchino Del Regno Date: Thu Nov 17 14:29:55 2022 +0100 dt-bindings: soc: qcom: Add bindings for Qualcomm Ramp Controller Document the Qualcomm Ramp Controller, found on various legacy Qualcomm SoCs. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221117132956.169432-2-angelogioacchino.delregno@collabora.com commit 4019bd6d8163a4d0d2e9c74e37243ddcf9a79480 Author: Andy Shevchenko Date: Mon Dec 19 14:27:22 2022 +0200 pinctrl: intel: Convert to generic_handle_domain_irq() Replace construct that matches generic_handle_irq(irq_find_mapping()) to a single call to generic_handle_domain_irq(). Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 36e830a5656d6c22110c5dcffb611fc69a57a269 Author: Robert Marko Date: Mon Nov 14 20:47:34 2022 +0100 arm64: dts: qcom: ipq8074: add SoC specific compatible to MDIO Add the newly documented SoC compatible to MDIO in order to be able to validate clocks for it. Signed-off-by: Robert Marko Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221114194734.3287854-5-robimarko@gmail.com commit cd025b1c31432575b7aaa73dce9e5af189795a83 Author: Andy Shevchenko Date: Mon Dec 19 14:26:43 2022 +0200 pinctrl: intel: Always use gpp_num_padown_regs in the main driver For the size-based communities, always use gpp_num_padown_regs, which is now provided explicitly via INTEL_COMMUNITY_SIZE() macro. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit df8467df2e65d4e6d103169d62e079f73c7db144 Author: Andy Shevchenko Date: Mon Dec 19 14:26:42 2022 +0200 pinctrl: sunrisepoint: Replace SPT_COMMUNITY() by INTEL_COMMUNITY_*() Use INTEL_COMMUNITY_*() common macro instead custom SPT_COMMUNITY(). Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit f72a86236a6b84dcea8007115dea486007a482da Author: Andy Shevchenko Date: Mon Dec 19 14:26:41 2022 +0200 pinctrl: tigerlake: Replace TGL_COMMUNITY() by INTEL_COMMUNITY_GPPS() Use INTEL_COMMUNITY_GPPS() common macro instead custom TGL_COMMUNITY(). Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 1c96fa614c18fdb090cd075d81112e5612373698 Author: Andy Shevchenko Date: Mon Dec 19 14:26:40 2022 +0200 pinctrl: meteorlake: Replace MTL_COMMUNITY() by INTEL_COMMUNITY_GPPS() Use INTEL_COMMUNITY_GPPS() common macro instead custom MTL_COMMUNITY(). Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 6a0662636cdd77ee8b90783a94626c6c8a6b8271 Author: Andy Shevchenko Date: Mon Dec 19 14:26:39 2022 +0200 pinctrl: lewisburg: Replace LBG_COMMUNITY() by INTEL_COMMUNITY_SIZE() Use INTEL_COMMUNITY_SIZE() common macro instead custom LBG_COMMUNITY(). Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 4bc3e4313e28316e1d1255cddf584e438d9f6a26 Author: Andy Shevchenko Date: Mon Dec 19 14:26:38 2022 +0200 pinctrl: lakefield: Replace LKF_COMMUNITY() by INTEL_COMMUNITY_GPPS() Use INTEL_COMMUNITY_GPPS() common macro instead custom LKF_COMMUNITY(). Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 6ab57fb3f1f8c6d039f4ba72f404ab5aced1904c Author: Andy Shevchenko Date: Mon Dec 19 14:26:37 2022 +0200 pinctrl: jasperlake: Replace JSL_COMMUNITY() by INTEL_COMMUNITY_GPPS() Use INTEL_COMMUNITY_GPPS() common macro instead custom JSL_COMMUNITY(). Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 3df5f0043de833c45d2645da3d63d9e1b4daac0d Author: Andy Shevchenko Date: Mon Dec 19 14:26:36 2022 +0200 pinctrl: icelake: Replace ICL_COMMUNITY() by INTEL_COMMUNITY_GPPS() Use INTEL_COMMUNITY_GPPS() common macro instead custom ICL_COMMUNITY(). Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit f4cf30886ab1c447231ead686ef7d16080e5ad39 Author: Andy Shevchenko Date: Mon Dec 19 14:26:35 2022 +0200 pinctrl: geminilake: Replace GLK_COMMUNITY() by INTEL_COMMUNITY_SIZE() Use INTEL_COMMUNITY_SIZE() common macro instead custom GLK_COMMUNITY(). Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 902b266edcf61c67ebb71080358c5c7fe2aa31ad Author: Andy Shevchenko Date: Mon Dec 19 14:26:34 2022 +0200 pinctrl: emmitsburg: Replace EBG_COMMUNITY() by INTEL_COMMUNITY_GPPS() Use INTEL_COMMUNITY_GPPS() common macro instead custom EBG_COMMUNITY(). Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit d83bc222202095b12db0a5b43ba880a1ed91a30a Author: Andy Shevchenko Date: Mon Dec 19 14:26:33 2022 +0200 pinctrl: elkhartlake: Replace EHL_COMMUNITY() by INTEL_COMMUNITY_GPPS() Use INTEL_COMMUNITY_GPPS() common macro instead custom EHL_COMMUNITY(). Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 3cbb3c4b98524fc58388e5e9765d40f3720a414a Author: Andy Shevchenko Date: Mon Dec 19 14:26:32 2022 +0200 pinctrl: denverton: Replace DNV_COMMUNITY() by INTEL_COMMUNITY_GPPS() Use INTEL_COMMUNITY_GPPS() common macro instead custom DNV_COMMUNITY(). Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit e83d7ef0298283cd8f50960dd5256b7b09133103 Author: Andy Shevchenko Date: Mon Dec 19 14:26:31 2022 +0200 pinctrl: cedarfork: Replace CDF_COMMUNITY() by INTEL_COMMUNITY_GPPS() Use INTEL_COMMUNITY_GPPS() common macro instead custom CDF_COMMUNITY(). Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 31044d8ec8b7d66d3184c5385b14d101b6723f28 Author: Andy Shevchenko Date: Mon Dec 19 14:26:30 2022 +0200 pinctrl: cannonlake: Replace CNL_COMMUNITY() by INTEL_COMMUNITY_GPPS() Use INTEL_COMMUNITY_GPPS() common macro instead custom CNL_COMMUNITY(). Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 7466214413d11f4b2fd2b0c8616d20cdeba1b3f1 Author: Andy Shevchenko Date: Mon Dec 19 14:26:29 2022 +0200 pinctrl: broxton: Replace BXT_COMMUNITY() by INTEL_COMMUNITY_SIZE() Use INTEL_COMMUNITY_SIZE() common macro instead custom BXT_COMMUNITY(). Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 6b432d13ea1abce513f34b18a4c4c9e5390e1cea Author: Andy Shevchenko Date: Mon Dec 19 14:26:28 2022 +0200 pinctrl: alderlake: Replace ADL_COMMUNITY() by INTEL_COMMUNITY_GPPS() Use INTEL_COMMUNITY_GPPS() common macro instead custom ADL_COMMUNITY(). Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 100b54e47162d07a931236073b31602284670e7d Author: Andy Shevchenko Date: Mon Dec 19 14:26:27 2022 +0200 pinctrl: intel: Introduce INTEL_COMMUNITY_*() to unify community macros Now it becomes visible that we can deduplicate SoC specific *_COMMUNITY() macros across the Intel pin control drivers. For that, introduce a common INTEL_COMMUNITY_GPPS() and INTEL_COMMUNITY_SIZE() macros in the pinctrl-intel.h. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 569d3a7580bcbc463920b0d84ca5caf23e808f90 Author: Krzysztof Kozlowski Date: Thu Nov 24 19:43:33 2022 +0100 dt-bindings: remoteproc: qcom,adsp: correct msm8996-slpi-pil clocks According to DTS and Linux driver, the MSM8996 SLPI PIL takes two clocks - xo and aggre2: qcom/msm8996-oneplus3t.dtb: remoteproc@1c00000: clocks: [[20], [3, 64]] is too long qcom/msm8996-oneplus3t.dtb: remoteproc@1c00000: clock-names: ['xo', 'aggre2'] is too long Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221124184333.133911-16-krzysztof.kozlowski@linaro.org commit 8bb92d6fd0b3788b4270eff547cb42cb64db1bff Author: Krzysztof Kozlowski Date: Thu Nov 24 19:43:32 2022 +0100 dt-bindings: remoteproc: qcom,sc7180-pas: split into separate file Split SC7180 and SC7280remote processor Peripheral Authentication Service bindings into their own file to reduce complexity and make maintenance easier. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221124184333.133911-15-krzysztof.kozlowski@linaro.org commit 255d7a9581ed4506dddf993aad9dc27bff8296d1 Author: Krzysztof Kozlowski Date: Thu Nov 24 19:43:31 2022 +0100 dt-bindings: remoteproc: qcom,qcs404-pas: split into separate file Split QCS404 remote processor Peripheral Authentication Service bindings into their own file to reduce complexity and make maintenance easier. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221124184333.133911-14-krzysztof.kozlowski@linaro.org commit b6f8410eab9270000b8b13b88bc038e9f27c2c45 Author: Krzysztof Kozlowski Date: Thu Nov 24 19:43:30 2022 +0100 dt-bindings: remoteproc: qcom,sdx55-pas: split into separate file Split SDX55 remote processor Peripheral Authentication Service bindings into their own file to reduce complexity and make maintenance easier. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221124184333.133911-13-krzysztof.kozlowski@linaro.org commit 4b4157518f1ab1276cd08dfab0e51b1409c22e40 Author: Krzysztof Kozlowski Date: Thu Nov 24 19:43:29 2022 +0100 dt-bindings: remoteproc: qcom,sc8180x-pas: split into separate file Split SC8180x remote processor Peripheral Authentication Service bindings into their own file to reduce complexity and make maintenance easier. The binding is incomplete due to lack of upstreamed DTS - no example and not all power domains defined. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221124184333.133911-12-krzysztof.kozlowski@linaro.org commit 397c619cad8109f5904466ee76d5a1533d2f1590 Author: Krzysztof Kozlowski Date: Thu Nov 24 19:43:28 2022 +0100 dt-bindings: remoteproc: qcom,sc8280xp-pas: split into separate file Split SC8280XP remote processor Peripheral Authentication Service bindings into their own file to reduce complexity and make maintenance easier. While moving correctly constrain the number of interrupts per specific device. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221124184333.133911-11-krzysztof.kozlowski@linaro.org commit 41729b772c13105ee126ee6fe1bf2cd93c7bd258 Author: Krzysztof Kozlowski Date: Thu Nov 24 19:43:27 2022 +0100 dt-bindings: remoteproc: qcom,sm6350-pas: split into separate file Split SM6350 remote processor Peripheral Authentication Service bindings into their own file to reduce complexity and make maintenance easier. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221124184333.133911-10-krzysztof.kozlowski@linaro.org commit db292776589f1fcbcf2fc6eaebe40a3a2abb4521 Author: Krzysztof Kozlowski Date: Thu Nov 24 19:43:26 2022 +0100 dt-bindings: remoteproc: qcom,sm8150-pas: split into separate file Split SM8150 and SM8250 remote processor Peripheral Authentication Service bindings into their own file to reduce complexity and make maintenance easier. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221124184333.133911-9-krzysztof.kozlowski@linaro.org commit 4e8b39a4d38ebb192ebff977d8a961fd97e7ce5f Author: Krzysztof Kozlowski Date: Thu Nov 24 19:43:25 2022 +0100 dt-bindings: remoteproc: qcom,sm8350-pas: split into separate file Split SM8350 and SM8450 remote processor Peripheral Authentication Service bindings into their own file to reduce complexity and make maintenance easier. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221124184333.133911-8-krzysztof.kozlowski@linaro.org commit ea5a10ae295425c9f52577d91b2e45290291d242 Author: Krzysztof Kozlowski Date: Thu Nov 24 19:43:24 2022 +0100 dt-bindings: remoteproc: qcom,adsp: split common part Split common part of Qualcomm SoC Peripheral Authentication Service bindings into a re-usable schema file. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221124184333.133911-7-krzysztof.kozlowski@linaro.org commit c97c4b480fcba2e6ebfacb3990d8b9092916d986 Author: Krzysztof Kozlowski Date: Thu Nov 24 19:43:23 2022 +0100 dt-bindings: remoteproc: qcom,adsp: drop resets and qcom,halt-regs Some remote processors (e.g. QCS404 CDSP, SC7180 MPSS/MSS) can be brought to life using two different bindings: 1. PIL (Peripheral Image Loader) 2. PAS (Peripheral Authentication Service) They still describe the same hardware - firmware load for remote processor - but use different methods to communicate with that processor. For these SoCs, the qcom,adsp.yaml bindings were describing the PAS method, however for easier customization of board DTS, the bindings combined additional properties from PIL: reset lines, qcom,halt-regs and additional clocks. The devices and Linux kernel drivers, when instantiated as PAS, do not use these properties, so drop them from the bindings. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221124184333.133911-6-krzysztof.kozlowski@linaro.org commit 92476ddf02b5663d00bd1e87cd0701c9e0a0c0f1 Author: Krzysztof Kozlowski Date: Thu Nov 24 19:43:22 2022 +0100 arm64: dts: qcom: sc7280: align MPSS PAS node with bindings The SC7180 MPSS/MSS remote processor can be brought to life using two different bindings: 1. qcom,sc7280-mpss-pas - currently used in DTSI 2. qcom,sc7280-mss-pil Move the properties related to qcom,sc7180-mss-pil (qcom,halt-regs, qcom,ext-regs, qcom,qaccept-regs, resets and additional clocks) to specific board using the PIL, to silence DT schema warnings. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221124184333.133911-5-krzysztof.kozlowski@linaro.org commit 47603d621e68011c70e5d3e5dbbe196c82d104d4 Author: Krzysztof Kozlowski Date: Thu Nov 24 19:43:21 2022 +0100 arm64: dts: qcom: sc7180: align MPSS PAS node with bindings The SC7180 MPSS/MSS remote processor can be brought to life using two different bindings: 1. qcom,sc7180-mpss-pas - currently used in DTSI 2. qcom,sc7180-mss-pil Move the properties related to qcom,sc7180-mss-pil (qcom,halt-regs, qcom,spare-regs, resets, additional clocks and regs) to specific boards using the PIL, to silence DT schema warnings. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221124184333.133911-4-krzysztof.kozlowski@linaro.org commit cd48d99bb729b87c326d6a766b6295d4ea112ef1 Author: Krzysztof Kozlowski Date: Thu Nov 24 19:43:20 2022 +0100 arm64: dts: qcom: qcs404: align CDSP PAS node with bindings The QCS404 CDSP remote processor can be brought to life using two different bindings: 1. qcom,qcs404-cdsp-pas - currently used in DTSI. 2. qcom,qcs404-cdsp-pil. Comment out the properties related to qcom,qcs404-cdsp-pil (qcom,halt-regs, resets and additional clocks), to silence DT schema warnings. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221124184333.133911-3-krzysztof.kozlowski@linaro.org commit 863dd1913b04ee34967ba4b5014ad4583edf7d68 Author: Krzysztof Kozlowski Date: Thu Nov 24 19:43:19 2022 +0100 arm64: dts: qcom: msm8996: drop address/size cells from smd-edge The smd-edge node does not have children with unit addresses: qcom/msm8996-oneplus3.dtb: remoteproc@9300000: smd-edge: '#address-cells', '#size-cells' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221124184333.133911-2-krzysztof.kozlowski@linaro.org commit 3af577f9826fdddefac42b35fc5eb3912c5b7d85 Author: Conor Dooley Date: Wed Oct 5 18:13:49 2022 +0100 RISC-V: stop directly selecting drivers for SOC_CANAAN The serial and clock drivers will be enabled by default if the symbol itself is enabled, so stop directly selecting the drivers in Kconfigs.socs. Signed-off-by: Conor Dooley commit fc43211939bb68741d609cd6e7034f01d5d1734b Author: Conor Dooley Date: Sun Nov 20 21:17:06 2022 +0000 RISC-V: kconfig.socs: convert usage of SOC_CANAAN to ARCH_CANAAN While we cannot yet drop the SOC_ prefixed symbols, we can convert uses of these symbols within Kconfig.socs to the ARCH_ variants. Signed-off-by: Conor Dooley commit 0e6aee5bcc0067d5f8a36cbb2dbd8b2702140481 Author: Conor Dooley Date: Wed Oct 5 18:13:48 2022 +0100 RISC-V: stop selecting SiFive clock and serial drivers directly The SiFive clock and serial drivers will now default to the value of SOC_SIFIVE so there is no need to directly select their symbols anymore. Signed-off-by: Conor Dooley commit 444c3dbdabd468196bd55712863f7e125909008f Author: Conor Dooley Date: Sun Nov 20 20:59:41 2022 +0000 RISC-V: introduce ARCH_FOO kconfig aliases for SOC_FOO symbols To facilitate a transfer from SOC_FOO to ARCH_FOO, over a release cycle, introduce some aliases so that drivers etc that use the SOC_FOO symbols can be converted. Signed-off-by: Conor Dooley --- To me, the most straight-forward conversion looks like so: - this patch is applied in week 2 of the merge window, to avoid any conflicts with the Renesas tree - all users of the SOC_ variants can be converted over a release cycle (or more) & no trees need to merge an immutable branch. - we convert defconfig etc over after all users are converted - doing it over at least one release cycle means that `make oldconfig` will keep people's configs working as they upgrade - any new SoC families added uses ARCH_FOO commit b61032557d20d2d1036bfcf833a3c5b4799183ea Author: Conor Dooley Date: Wed Oct 5 18:13:47 2022 +0100 RISC-V: stop selecting the PolarFire SoC clock driver The driver is now enabled by default if SOC_MICROCHIP_POLARFIRE so there is no longer a need to select it in Kconfig.socs Signed-off-by: Conor Dooley commit 19ba9cf70706629709a3304aa977d1dddcfadf43 Author: Conor Dooley Date: Sun Nov 20 21:34:44 2022 +0000 RISC-V: kbuild: convert all use of SOC_FOO to ARCH_FOO Convert all non user visible use of SOC_FOO symbols to their ARCH_FOO variants. The canaan DTs are an outlier in that they're gated at the directory and the file level. Drop the directory level gating while we are swapping the symbol names over. Signed-off-by: Conor Dooley commit 977e9262c3542e87b513d4dad4c57b2c85e16c8c Author: Dmitry Baryshkov Date: Mon Dec 26 05:10:59 2022 +0200 arm64: dts: qcom: qcs404: register PCIe PHY as a clock provider Add #clock-cells to the pcie_phy node. It provides a PCIe PIPE clock. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221226031059.2563165-4-dmitry.baryshkov@linaro.org commit f961fd2f6717c34a20a6951dcf9782a29e648f6c Author: Dmitry Baryshkov Date: Mon Dec 26 06:21:54 2022 +0200 arm64: dts: qcom: qcs404: add xo clock to rpm clock controller Populate the rpm clock controller node with clocks and clock-names properties. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221226042154.2666748-17-dmitry.baryshkov@linaro.org commit 3494938a7e9e436be5dc989aecc1c800ecf2dba9 Author: Dmitry Baryshkov Date: Mon Dec 26 06:21:53 2022 +0200 arm64: dts: qcom: qcs404: add clocks to the gcc node Populate the gcc node with the clocks and clock-names properties to enable DT-based lookups for the parent clocks. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221226042154.2666748-16-dmitry.baryshkov@linaro.org commit 1eb309964e6384eda56c2d2816c3857c0b7c3ea6 Author: Dmitry Baryshkov Date: Mon Dec 26 06:21:52 2022 +0200 arm64: dts: qcom: qcs404: add power-domains-cells to gcc node As gcc now provides two GDSCs, add #power-domain-cells property to the gcc device node. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221226042154.2666748-15-dmitry.baryshkov@linaro.org commit 41a37d157a613444c97e8f71a5fb2a21116b70d7 Author: Dmitry Baryshkov Date: Mon Dec 26 06:21:51 2022 +0200 arm64: dts: qcom: qcs404: use symbol names for PCIe resets The commit e5bbbff5b7d7 ("clk: gcc-qcs404: Add PCIe resets") added names for PCIe resets, but it did not change the existing qcs404.dtsi to use these names. Do it now and use symbol names to make it easier to check and modify the dtsi in future. Fixes: e5bbbff5b7d7 ("clk: gcc-qcs404: Add PCIe resets") Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221226042154.2666748-14-dmitry.baryshkov@linaro.org commit 230d4d815d5a66ba3add80a4c0d4172915df8aaa Author: Dmitry Baryshkov Date: Mon Dec 26 06:21:50 2022 +0200 clk: qcom: gcc-qcs404: add support for GDSCs Add support for two GDSCs provided by this clock controller. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221226042154.2666748-13-dmitry.baryshkov@linaro.org commit 2ce81afa0c7c2a80c5d84f9e737ea19f679699fd Author: Dmitry Baryshkov Date: Mon Dec 26 06:21:49 2022 +0200 clk: qcom: gcc-qcs404: sort out the cxo clock The GCC driver registers the cxo clock as a thin wrapper around board's xo_board clock. Nowadays we can use the xo_board directly in all the clocks that use it. Use the fw_name "cxo" for this clock. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221226042154.2666748-12-dmitry.baryshkov@linaro.org commit 9847a90c7cf13b4a9f1a0f009d2713d210c66629 Author: Dmitry Baryshkov Date: Mon Dec 26 06:21:48 2022 +0200 clk: qcom: gcc-qcs404: use parent_hws/_data instead of parent_names Convert the clock driver to specify parent data rather than parent names, to actually bind using 'clock-names' specified in the DTS rather than global clock names. Use parent_hws where possible to refer parent clocks directly, skipping the lookup. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221226042154.2666748-11-dmitry.baryshkov@linaro.org commit 75aed8334e8546195b32c0aac8593d83c8eb017c Author: Dmitry Baryshkov Date: Mon Dec 26 06:21:47 2022 +0200 clk: qcom: gcc-qcs404: 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. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221226042154.2666748-10-dmitry.baryshkov@linaro.org commit fa1ea7426188db72a2db9cbc7cb67ba9b704fa8c Author: Dmitry Baryshkov Date: Mon Dec 26 06:21:46 2022 +0200 clk: qcom: gcc-qcs404: get rid of the test clock The test clock isn't in the bindings and apparently it's not used by anyone upstream. Remove it. Suggested-by: Stephen Boyd Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221226042154.2666748-9-dmitry.baryshkov@linaro.org commit a613af2ccb402ab3c31b518d370292ecdd6a5709 Author: Dmitry Baryshkov Date: Mon Dec 26 06:21:45 2022 +0200 clk: qcom: gcc-qcs404: fix the name of the HDMI PLL clock The QCS404 uses 28nm HDMI PHY. The in-kernel driver doesn't provide the PLL (yet), but the out of tree patches used the name "hdmi_pll" for it. Other Qualcomm HDMI PHYs use either the name "hdmi_pll" (8960) or "hdmipll" (8996). Thus change the expected HDMI PLL clock name to "hdmi_pll". Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221226042154.2666748-8-dmitry.baryshkov@linaro.org commit 47d94d30cd3dcc743241b4208b1eec7247610c84 Author: Dmitry Baryshkov Date: Mon Dec 26 06:21:44 2022 +0200 clk: qcom: gcc-qcs404: fix names of the DSI clocks used as parents The QCS404 uses 28nm LPM DSI PHY, which registers dsi0pll and dsi0pllbyte clocks. Fix all DSI PHY clock names used as parents inside the GCC driver. Fixes: 652f1813c113 ("clk: qcom: gcc: Add global clock controller driver for QCS404") Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221226042154.2666748-7-dmitry.baryshkov@linaro.org commit 712c64caf31374de57aa193a9dff57172b2f6f82 Author: Dmitry Baryshkov Date: Mon Dec 26 06:21:43 2022 +0200 clk: qcom: gcc-qcs404: disable gpll[04]_out_aux parents On the QCS404 platform the driver for the Global Clock Controller doens't define gpll0_out_aux and gpll4_out_aux clocks, so it's not possible to use them as parents. Remove entries for these clocks. Note: backporting this patch to earlier kernels would also require a previous patch which switches the gcc driver to use ARRAY_SIZE for parent data arrays. Fixes: 652f1813c113 ("clk: qcom: gcc: Add global clock controller driver for QCS404") Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221226042154.2666748-6-dmitry.baryshkov@linaro.org commit 94238f6bfd6ded2281d5b10782ddfb278b6daace Author: Dmitry Baryshkov Date: Mon Dec 26 06:21:42 2022 +0200 clk: qcom: gcc-qcs404: use ARRAY_SIZE instead of specifying num_parents Use ARRAY_SIZE() instead of manually specifying num_parents. This makes adding/removing entries to/from parent_data/names/hws easy and errorproof. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221226042154.2666748-5-dmitry.baryshkov@linaro.org commit ccd7c9dd9806067c2443cf5634c945c65158d9b2 Author: Dmitry Baryshkov Date: Mon Dec 26 06:21:41 2022 +0200 dt-bindings: clock: qcom: gcc-qcs404: define clocks/clock-names for QCS404 Define clock/clock-names properties of the GCC device node to be used on QCS404 platform. Acked-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221226042154.2666748-4-dmitry.baryshkov@linaro.org commit a89c8a1fc18effcf36995947a80e2fd3de7b7fef Author: Dmitry Baryshkov Date: Mon Dec 26 06:21:40 2022 +0200 dt-bindings: clock: qcom: gcc-qcs404: switch to gcc.yaml Now as the gcc-qcs404 gained support for GDSC and requires using the #power-domain-cells property, switch the qcom,gcc-qcs404.yaml schema to use common gcc.yaml. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221226042154.2666748-3-dmitry.baryshkov@linaro.org commit 031bc3a9f9decd25cc29a27dcdcf893949f4e26a Author: Dmitry Baryshkov Date: Mon Dec 26 06:21:39 2022 +0200 dt-bindings: clock: qcom: gcc-qcs404: add two GDSC entries On QCS404 platform the Global Clock Controller supports two GDSCs: MDSS (display) and OXILI (GPU). Add corresponding indices. Acked-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221226042154.2666748-2-dmitry.baryshkov@linaro.org commit a4421a22bfd966852349e5c38278e9a6eaefb456 Author: Sireesh Kodali Date: Sat Oct 1 08:43:44 2022 +0530 dt-bindings: remoteproc: wcnss-pil: Make supplies optionally required On MSM8974, power domains are not yet supported. The platform uses regulators. This patch marks either the power-domains or *-supply as required (instead of always requiring the power domains). Signed-off-by: Sireesh Kodali Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221001031345.31293-6-sireeshkodali1@gmail.com commit a890eebe42ad2c0cfe44a34a4f9e7d1a735a55d8 Author: Sireesh Kodali Date: Sat Oct 1 08:43:43 2022 +0530 dt-bindings: remoteproc: qcom: wcnss: Add compatible for pronto v3 The pronto v3 remoteproc is similar to pronto v2. It is found on the MSM8953 platform, which is used by SDM450, SDM625, SDM626, APQ8053 and other SoCs. Since the configuration is same on all SoCs, a single compatible is used. Signed-off-by: Sireesh Kodali Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221001031345.31293-5-sireeshkodali1@gmail.com commit 409db7b777c81ef249688cddba882d16dbb064e0 Author: Sireesh Kodali Date: Sat Oct 1 08:43:42 2022 +0530 dt-bindings: remoteproc: qcom: wcnss: Add qcom,pronto compatible This is not a fallback compatible, it must be present in addition to "qcom,pronto-v*". It is also not documented in qcom,wcnss-pil.txt. This is the reason for documenting it in a separate commit. This compatible is used in the wcn36xx driver to determine which register must be accessed. However it isn't immediately clear why the wcn36xx driver relies on this extra compatible string rather than just looking for "qcom,pronto-v*". Signed-off-by: Sireesh Kodali Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221001031345.31293-4-sireeshkodali1@gmail.com commit 9a660c7fd69ae9fff3f941140db25339937f8eee Author: Sireesh Kodali Date: Sat Oct 1 08:43:41 2022 +0530 dt-bindings: remoteproc: qcom: Convert wcnss documentation to YAML This is a direct conversion of the existing txt documentation to YAML. It is in preparation for the addition of pronto-v3 to the docs. This patch doesn't document any of the existing subnodes/properties that are not documented in the existing txt file. That is done in a separate patch. Signed-off-by: Sireesh Kodali Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221001031345.31293-3-sireeshkodali1@gmail.com commit 4c707cf5c7ddd43c6d574281a5591f71ed8d310c Author: Vladimir Lypak Date: Sat Oct 1 08:43:40 2022 +0530 remoteproc: qcom: qcom_wcnss: Add support for pronto-v3 Pronto-v3 is similar to pronto-v2. It requires two power domains, one regulator, and it requires the xo clock. It is used on the MSM8953 platform. Signed-off-by: Vladimir Lypak Signed-off-by: Sireesh Kodali Reviewed-by: Stephan Gerhold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221001031345.31293-2-sireeshkodali1@gmail.com commit 0201f759594b1248635185a92a5e39f47441ad6a Author: Sireesh Kodali Date: Thu Sep 8 20:24:33 2022 +0200 remoteproc: qcom: q6v5-mss: Add modem support on MSM8953 The modem on the MSM8953 platform is similar to the modem on the MSM8996 platform in terms of set up. It differs primarily in that TZ needs to be informed of the modem start address and pas_id. Signed-off-by: Sireesh Kodali Signed-off-by: Stephan Gerhold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220908182433.466908-8-stephan.gerhold@kernkonzept.com commit 43baa1a2215998ecb2ba64bb6d435d07541c7184 Author: Stephan Gerhold Date: Thu Sep 8 20:24:32 2022 +0200 dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8953 Add the compatible for MSS as found on the MSM8953 platform. The situation is similar to the existing bindings for MSM8974: there is an additional "mss" power domain that must be voted for while starting up the remote processor. The difference is that on MSM8974 the power domain is represented as a regulator (firmware expects specific voltage) while on MSM8953 it is represented as power domain (firmware expects performance state instead of voltage). Handle this difference by adding the "mss" power domain as optional third item, and then restrict it (and make it required) only when using the MSM8953 compatible. Co-developed-by: Sireesh Kodali Signed-off-by: Sireesh Kodali Signed-off-by: Stephan Gerhold Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220908182433.466908-7-stephan.gerhold@kernkonzept.com commit ed71c47f0000ec17b4ce167bce0d44dff8e144e1 Author: Stephan Gerhold Date: Thu Sep 8 20:24:31 2022 +0200 remoteproc: qcom: q6v5-mss: Add support for MSM8909 Port the initialization sequence necessary for booting the modem remote processor on the MSM8909 SoC from Qualcomm's msm-3.10 release [1]. The sequence is actually similar to the existing one for MSM8996 and MSM8998 except that there is no separate QDSP6SS_MEM_PWR_CTL register and most of the "memories" are enabled at once instead of sequentially. To reuse the existing code just insert some if statements where needed and add a configuration similar to the one from MSM8916. [1]: https://git.codelinaro.org/clo/la/kernel/msm-3.10/-/commit/56dcedc8dac8abff6b007f76a29430b2d0a44704 Signed-off-by: Stephan Gerhold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220908182433.466908-6-stephan.gerhold@kernkonzept.com commit f8fb0b3d453e8a0a3b94c18001ce8f1e86d95036 Author: Stephan Gerhold Date: Thu Sep 8 20:24:30 2022 +0200 dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8909 Document the "qcom,msm8909-mss-pil" compatible for the modem remote processor on MSM8909. It is used pretty much exactly like the existing one for MSM8916. Signed-off-by: Stephan Gerhold Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220908182433.466908-5-stephan.gerhold@kernkonzept.com commit ac686cbc6f8bb7810058955e3bb5b5635ca9331a Author: Stephan Gerhold Date: Thu Sep 8 20:24:29 2022 +0200 dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8974 The "qcom,msm8974-mss-pil" binding is still similar enough to MSM8916 to be covered by the same DT schema. The only difference is the additional "mss-supply", which can be easily handled using a single if statement. Signed-off-by: Stephan Gerhold Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220908182433.466908-4-stephan.gerhold@kernkonzept.com commit b9880532d0cdf54dc6cc0e028afe47d829873b20 Author: Stephan Gerhold Date: Thu Sep 8 20:24:28 2022 +0200 dt-bindings: remoteproc: qcom,q6v5: Move MSM8916 to schema qcom,q6v5.txt covers multiple SoCs with quite different binding requirements. Converting this into one DT schema would require several if statements, making the DT schema overall harder to read and understand. To avoid this, follow the example of SC7180/SC7280 and split "qcom,msm8916-mss-pil" (and the equivalent deprecated "qcom,q6v5-pil" compatible) into a separate DT schema. The schema is somewhat based on the one for SC7180/SC7280 but adjusted for the old platforms. Compared to the old plain text bindings, add missing documentation for the "bam-dmux" subnode and recommend one particular approach to specify the MBA/MPSS "memory-region" (the other one is marked as deprecated). Signed-off-by: Stephan Gerhold Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220908182433.466908-3-stephan.gerhold@kernkonzept.com commit 1135e93682db5f66909f4785b1bfbd798955b2b1 Author: Krzysztof Kozlowski Date: Fri Dec 23 14:22:13 2022 +0100 dt-bindings: remoteproc: qcom,glink-edge: add GPR node The existing SM8450 DTS (and newer platforms) come with a "gpr" child node, not "apr": sm8450-sony-xperia-nagara-pdx224.dtb: remoteproc@30000000: glink-edge: Unevaluated properties are not allowed ('gpr' was unexpected) From schema: Documentation/devicetree/bindings/remoteproc/qcom,sm8350-pas.yaml Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20221223132213.81273-1-krzysztof.kozlowski@linaro.org commit b5386f2911ce9afc168cc246956974b0c05b4a9d Author: Nathan Lu Date: Tue Dec 6 10:00:41 2022 +0800 dt-bindings: display: mediatek: modify VDOSYS0 display device tree Documentations for MT8188 modify VDOSYS0 display device tree Documentations for MT8188. Signed-off-by: Nathan Lu Reviewed-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20221206020046.11333-2-nathan.lu@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 6c9d1fd52956c3148e847a214bae9102b1811de5 Author: Vincent Tremblay Date: Tue Dec 27 09:10:08 2022 -0500 spidev: Add Silicon Labs SI3210 device compatible Add compatible string for Silicon Labs SI3210 device. Signed-off-by: Vincent Tremblay Link: https://lore.kernel.org/r/20221227141011.111410-2-vincent@vtremblay.dev Signed-off-by: Mark Brown commit f7879d677e76d0c4449fa1839f948d335795f334 Author: Vincent Tremblay Date: Tue Dec 27 09:10:07 2022 -0500 dt-bindings: trivial-devices: Add silabs,si3210 Add Silicon Labs SI3210 to trivial devices. Signed-off-by: Vincent Tremblay Link: https://lore.kernel.org/r/20221227141011.111410-1-vincent@vtremblay.dev Signed-off-by: Mark Brown commit cab30a98352511c0cb3ab6deb5d06b55fe4eb10a Author: Alexey Kodanev Date: Thu Dec 15 15:30:30 2022 +0300 RDMA/cxgb4: remove unnecessary NULL check in __c4iw_poll_cq_one() If 'qhp' is NULL then 'wq' is also NULL: struct t4_wq *wq = qhp ? &qhp->wq : NULL; ... ret = poll_cq(wq, ...); if (ret) goto out; poll_cq(wq, ...) always returns a non-zero status if 'wq' is NULL, either on a t4_next_cqe() error or on a 'wq == NULL' check. Therefore, checking 'qhp' again after poll_cq() is redundant. BTW, there're also 'qhp' dereference cases below poll_cq() without any checks (c4iw_invalidate_mr(qhp->rhp,...)). Detected using the static analysis tool - Svace. Fixes: 4ab39e2f98f2 ("RDMA/cxgb4: Make c4iw_poll_cq_one() easier to analyze") Signed-off-by: Alexey Kodanev Link: https://lore.kernel.org/r/20221215123030.155378-1-aleksei.kodanev@bell-sw.com Signed-off-by: Leon Romanovsky commit 3bb46b2cc3e965e4b8948ce111084ac8d6aff1c4 Merge: 560d97e5f98c4 24c86c8a3bb1b Author: Mark Brown Date: Tue Dec 27 12:56:08 2022 +0000 ASoC: microchip: power saving features and cleanups Merge series from Claudiu Beznea : The following series adds runtime PM and suspend to RAM features for mchp-pdmc driver. Along with it 2 cleanup patches were added: - patch 1/4: use vendor,device.yaml file format for Microchip AT91 ASoC bindings - patch 4/4: use FIELD_PREP() in mchp-spdiftx.c commit 1b8ba6e41f11fc6ad4e561e0de35075256ec207c Author: Miaoqian Lin Date: Fri Dec 16 13:52:25 2022 +0400 RDMA/hfi1: Fix doc for hfi1_free_ctxt Fix the typo of hfi1_create_ctxtdata. Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20221216095225.685353-1-linmq006@gmail.com Signed-off-by: Leon Romanovsky commit c67d90e058550403a3e6f9b05bfcdcfa12b1815c Author: Vincent Tremblay Date: Mon Dec 26 21:35:48 2022 -0500 spidev: Add Silicon Labs EM3581 device compatible Add compatible string for Silicon Labs EM3581 device. Signed-off-by: Vincent Tremblay Link: https://lore.kernel.org/r/20221227023550.569547-2-vincent@vtremblay.dev Signed-off-by: Mark Brown commit 54c467b314b6c2afeb7093d86886103392e3499c Author: Vincent Tremblay Date: Mon Dec 26 21:35:47 2022 -0500 dt-bindings: trivial-devices: Add silabs,em3581 Add Silicon Labs EM3581 Zigbee SoC to trivial-devices. Signed-off-by: Vincent Tremblay Link: https://lore.kernel.org/r/20221227023550.569547-1-vincent@vtremblay.dev Signed-off-by: Mark Brown commit 560d97e5f98c4261583592c85608b13ca0075b9d Merge: ec380a34a44fc 8a33863a0e287 Author: Mark Brown Date: Tue Dec 27 11:55:11 2022 +0000 ASoC: SOF: Extend the IPC ops optionality Merge series from Peter Ujfalusi : This series will extend the IPC ops optionality to cover it up to the existence of the top level ipc pointer itself. There is no functionality change. The reason for the extended optionality is that we have "DSPless" debug/development support coming up (currently it is in SOF's topic/sof-dev stable branch) initially supporting Intel's HDA platforms. As the name suggests, in this mode the DSP is completely ignored by the linux driver stack (no firmware loaded, only using HDA directly). The DSPless mode is aimed to help us to verify our Linux stack on new platforms where the firmware is not yet in the state that we can reliably use it, but the hardware and programming flows can be tested already. There is no plan to make DSPless a production target for SOF Linux stack. While this is preparatory series aimed to unblock the DSPless support, it has been integrated into sof-dev separately and we have lots of new features depending on it (went in between this set and the DSPless support). I still have some minor tasks to complete for the DSPless to make it a bit more versatile, but I don't want to block other, stable features for upstreaming. commit ec380a34a44fcf501dace3072cddc41374f2e289 Merge: 35108d6df2148 603d96c917b2e Author: Mark Brown Date: Tue Dec 27 11:55:04 2022 +0000 ASoC: Drop empty platform remove functions Merge series from Uwe Kleine-König : Hello, this patch series removes all platform remove functions that only return zero below sound/soc. There is no reason to have these, as the only caller is platform core code doing: if (drv->remove) { int ret = drv->remove(dev); ... } (in platform_remove()) and so having no remove function is both equivalent and simpler. commit 35108d6df21484830a003d54c2d53ea88903100f Merge: 966ef755d3b66 29d6523698f68 Author: Mark Brown Date: Tue Dec 27 11:54:56 2022 +0000 Add support for DSP volume controls Merge series from Amadeusz Sławiński : Some devices like DMIC don't expose native controls or need volume limit due to possible HW damage. Add support for volume controls allowing to change volume level in DSP. Maximum volume level is imposed by the topology file which defines given path. commit c89970202a1153b2fc230e89f90c180bd5bcbcef Author: Nicholas Piggin Date: Tue Dec 20 17:07:05 2022 +1000 cputime: remove cputime_to_nsecs fallback The archs that use cputime_to_nsecs() internally provide their own definition and don't need the fallback. cputime_to_usecs() unused except in this fallback, and is not defined anywhere. This removes the final remnant of the cputime_t code from the kernel. Signed-off-by: Nicholas Piggin Signed-off-by: Peter Zijlstra (Intel) Acked-by: Alexander Gordeev Link: https://lore.kernel.org/r/20221220070705.2958959-1-npiggin@gmail.com commit 8589018acc65e5ddfd111f0a7ee85f9afde3a830 Author: Hao Jia Date: Fri Dec 16 14:24:06 2022 +0800 sched/core: Adjusting the order of scanning CPU When select_idle_capacity() starts scanning for an idle CPU, it starts with target CPU that has already been checked in select_idle_sibling(). So we start checking from the next CPU and try the target CPU at the end. Similarly for task_numa_assign(), we have just checked numa_migrate_on of dst_cpu, so start from the next CPU. This also works for steal_cookie_task(), the first scan must fail and start directly from the next one. Signed-off-by: Hao Jia Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Acked-by: Mel Gorman Link: https://lore.kernel.org/r/20221216062406.7812-3-jiahao.os@bytedance.com commit feaed76376fd612b9450ad1251aec20a63ccfe92 Author: Hao Jia Date: Fri Dec 16 14:24:05 2022 +0800 sched/numa: Stop an exhastive search if an idle core is found In update_numa_stats() we try to find an idle cpu on the NUMA node, preferably an idle core. we can stop looking for the next idle core or idle cpu after finding an idle core. But we can't stop the whole loop of scanning the CPU, because we need to calculate approximate NUMA stats at a point in time. For example, the src and dst nr_running is needed by task_numa_find_cpu(). Signed-off-by: Hao Jia Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mel Gorman Link: https://lore.kernel.org/r/20221216062406.7812-2-jiahao.os@bytedance.com commit 904cbab71dda1689d41a240541179f21ff433c40 Author: Matthew Wilcox (Oracle) Date: Mon Dec 12 14:49:46 2022 +0000 sched: Make const-safe With a modified container_of() that preserves constness, the compiler finds some pointers which should have been marked as const. task_of() also needs to become const-preserving for the !FAIR_GROUP_SCHED case so that cfs_rq_of() can take a const argument. No change to generated code. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221212144946.2657785-1-willy@infradead.org commit b344b8f2d88dbf095caf97ac57fd3645843fa70f Author: Mathieu Desnoyers Date: Fri Dec 16 09:53:32 2022 -0500 selftests/rseq: Add mm_numa_cid to test script Add mm_numa_cid tests to the run_param_test.sh test script. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221216145332.205095-1-mathieu.desnoyers@efficios.com commit 14a8644d4f76fb4afdfcc46e9193af867241bd42 Author: Mathieu Desnoyers Date: Tue Nov 22 15:39:23 2022 -0500 tracing/rseq: Add mm_cid field to rseq_update Add the mm_cid field to the rseq_update event, allowing tracers to follow which mm_cid is observed by user-space, and whether negative mm_cid values are visible in case of internal scheduler implementation issues. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221122203932.231377-22-mathieu.desnoyers@efficios.com commit a3798e6ffb37481c47773dd1d785c395c0785af8 Author: Mathieu Desnoyers Date: Tue Nov 22 15:39:22 2022 -0500 selftests/rseq: parametrized test: Report/abort on negative concurrency ID Report and abort when a negative concurrency ID value is observed by the spinlock test. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221122203932.231377-21-mathieu.desnoyers@efficios.com commit ee31fff091fa9c185d10844f9caf38784afe4745 Author: Mathieu Desnoyers Date: Tue Nov 22 15:39:21 2022 -0500 selftests/rseq: Implement parametrized mm_cid test Adapt to the rseq.h API changes introduced by commits "selftests/rseq: : Template memory ordering and percpu access mode". Build a new param_test_mm_cid, param_test_mm_cid_benchmark, and param_test_mm_cid_compare_twice executables to test the new "mm_cid" rseq field. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221122203932.231377-20-mathieu.desnoyers@efficios.com commit cead72062756294dff01314b57b68e3e925ef321 Author: Mathieu Desnoyers Date: Tue Nov 22 15:39:20 2022 -0500 selftests/rseq: Implement basic percpu ops mm_cid test Adapt to the rseq.h API changes introduced by commits "selftests/rseq: : Template memory ordering and percpu access mode". Build a new basic_percpu_ops_mm_cid_test to test the new "mm_cid" rseq field. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221122203932.231377-19-mathieu.desnoyers@efficios.com commit 171586a6ab66fb6be064e399ac2024ab459dfcf9 Author: Mathieu Desnoyers Date: Tue Nov 22 15:39:19 2022 -0500 selftests/rseq: riscv: Template memory ordering and percpu access mode Introduce a rseq-riscv-bits.h template header which is internally included to generate the static inline functions covering: - relaxed and release memory ordering, - per-cpu-id and per-mm-cid per-cpu data access. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221122203932.231377-18-mathieu.desnoyers@efficios.com commit a94af3c58462d23c45879e1bbe86ed5702d5bd86 Author: Mathieu Desnoyers Date: Tue Nov 22 15:39:18 2022 -0500 selftests/rseq: s390: Template memory ordering and percpu access mode Introduce a rseq-s390-bits.h template header which is internally included to generate the static inline functions covering: - relaxed and release memory ordering, - per-cpu-id and per-mm-cid per-cpu data access. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221122203932.231377-17-mathieu.desnoyers@efficios.com commit e61bd94c2bbd6b258fb408092172e37d39b4bf5c Author: Mathieu Desnoyers Date: Tue Nov 22 15:39:17 2022 -0500 selftests/rseq: ppc: Template memory ordering and percpu access mode Introduce a rseq-ppc-bits.h template header which is internally included to generate the static inline functions covering: - relaxed and release memory ordering, - per-cpu-id and per-mm-cid per-cpu data access. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221122203932.231377-16-mathieu.desnoyers@efficios.com commit 431b63285abc46d791874eadee8da12c835ce71d Author: Mathieu Desnoyers Date: Tue Nov 22 15:39:16 2022 -0500 selftests/rseq: mips: Template memory ordering and percpu access mode Introduce a rseq-mips-bits.h template header which is internally included to generate the static inline functions covering: - relaxed and release memory ordering, - per-cpu-id and per-mm-cid per-cpu data access. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221122203932.231377-15-mathieu.desnoyers@efficios.com commit 8d4eeb8bb43262509c3e929e4d086ccaaec627a4 Author: Mathieu Desnoyers Date: Tue Nov 22 15:39:15 2022 -0500 selftests/rseq: arm64: Template memory ordering and percpu access mode Introduce a rseq-arm64-bits.h template header which is internally included to generate the static inline functions covering: - relaxed and release memory ordering, - per-cpu-id and per-mm-cid per-cpu data access. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221122203932.231377-14-mathieu.desnoyers@efficios.com commit 5bf4aba38a7686fd13f9800a42c39d2adef04fb0 Author: Mathieu Desnoyers Date: Tue Nov 22 15:39:14 2022 -0500 selftests/rseq: arm: Template memory ordering and percpu access mode Introduce a rseq-arm-bits.h template header which is internally included to generate the static inline functions covering: - relaxed and release memory ordering, - per-cpu-id and per-mm-cid per-cpu data access. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221122203932.231377-13-mathieu.desnoyers@efficios.com commit ae31573843028ad17b1a807081c542d17fa9a83a Author: Mathieu Desnoyers Date: Tue Nov 22 15:39:13 2022 -0500 selftests/rseq: x86: Template memory ordering and percpu access mode Introduce a rseq-x86-bits.h template header which is internally included to generate the static inline functions covering: - relaxed and release memory ordering, - per-cpu-id and per-mm-cid per-cpu data access. This introduces changes to the rseq.h selftests API which require to update the rseq selftest programs. Similar API/templating changes need to be done for other architectures. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221122203932.231377-12-mathieu.desnoyers@efficios.com commit 18c2355838e76788f61849f4d83513b103d68b95 Author: Mathieu Desnoyers Date: Tue Nov 22 15:39:12 2022 -0500 selftests/rseq: Implement rseq mm_cid field support Add support for the mm_cid field (per-memory-map concurrency ID) of struct rseq to rseq selftests. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221122203932.231377-11-mathieu.desnoyers@efficios.com commit 72cb1d7f2faca4fba81ab8417367d63852cd490c Author: Mathieu Desnoyers Date: Tue Nov 22 15:39:11 2022 -0500 selftests/rseq: Remove RSEQ_SKIP_FASTPATH code This code is not currently build by the test Makefile, adds complexity, and is not overall useful considering that the abort handling loops to retry the fast-path. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221122203932.231377-10-mathieu.desnoyers@efficios.com commit f7b01bb0b57f994a44ea6368536b59062b796381 Author: Mathieu Desnoyers Date: Tue Nov 22 15:39:10 2022 -0500 rseq: Extend struct rseq with per-memory-map concurrency ID If a memory map has fewer threads than there are cores on the system, or is limited to run on few cores concurrently through sched affinity or cgroup cpusets, the concurrency IDs will be values close to 0, thus allowing efficient use of user-space memory for per-cpu data structures. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221122203932.231377-9-mathieu.desnoyers@efficios.com commit af7f588d8f7355bc4298dd1962d7826358fc95f0 Author: Mathieu Desnoyers Date: Tue Nov 22 15:39:09 2022 -0500 sched: Introduce per-memory-map concurrency ID This feature allows the scheduler to expose a per-memory map concurrency ID to user-space. This concurrency ID is within the possible cpus range, and is temporarily (and uniquely) assigned while threads are actively running within a memory map. If a memory map has fewer threads than cores, or is limited to run on few cores concurrently through sched affinity or cgroup cpusets, the concurrency IDs will be values close to 0, thus allowing efficient use of user-space memory for per-cpu data structures. This feature is meant to be exposed by a new rseq thread area field. The primary purpose of this feature is to do the heavy-lifting needed by memory allocators to allow them to use per-cpu data structures efficiently in the following situations: - Single-threaded applications, - Multi-threaded applications on large systems (many cores) with limited cpu affinity mask, - Multi-threaded applications on large systems (many cores) with restricted cgroup cpuset per container. One of the key concern from scheduler maintainers is the overhead associated with additional spin locks or atomic operations in the scheduler fast-path. This is why the following optimization is implemented. On context switch between threads belonging to the same memory map, transfer the mm_cid from prev to next without any atomic ops. This takes care of use-cases involving frequent context switch between threads belonging to the same memory map. Additional optimizations can be done if the spin locks added when context switching between threads belonging to different memory maps end up being a performance bottleneck. Those are left out of this patch though. A performance impact would have to be clearly demonstrated to justify the added complexity. The credit goes to Paul Turner (Google) for the original virtual cpu id idea. This feature is implemented based on the discussions with Paul Turner and Peter Oskolkov (Google), but I took the liberty to implement scheduler fast-path optimizations and my own NUMA-awareness scheme. The rumor has it that Google have been running a rseq vcpu_id extension internally in production for a year. The tcmalloc source code indeed has comments hinting at a vcpu_id prototype extension to the rseq system call [1]. The following benchmarks do not show any significant overhead added to the scheduler context switch by this feature: * perf bench sched messaging (process) Baseline: 86.5±0.3 ms With mm_cid: 86.7±2.6 ms * perf bench sched messaging (threaded) Baseline: 84.3±3.0 ms With mm_cid: 84.7±2.6 ms * hackbench (process) Baseline: 82.9±2.7 ms With mm_cid: 82.9±2.9 ms * hackbench (threaded) Baseline: 85.2±2.6 ms With mm_cid: 84.4±2.9 ms [1] https://github.com/google/tcmalloc/blob/master/tcmalloc/internal/linux_syscall_support.h#L26 Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221122203932.231377-8-mathieu.desnoyers@efficios.com commit 99babd04b25054717d21840298b0b46046b42cd9 Author: Mathieu Desnoyers Date: Tue Nov 22 15:39:08 2022 -0500 selftests/rseq: Implement rseq numa node id field selftest Test the NUMA node id extension rseq field. Compare it against the value returned by the getcpu(2) system call while pinned on a specific core. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221122203932.231377-7-mathieu.desnoyers@efficios.com commit 03f5c0272d1b59343144e199becc911dae52c37e Author: Mathieu Desnoyers Date: Tue Nov 22 15:39:07 2022 -0500 selftests/rseq: Use ELF auxiliary vector for extensible rseq Use the ELF auxiliary vector AT_RSEQ_FEATURE_SIZE to detect the RSEQ features supported by the kernel. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221122203932.231377-6-mathieu.desnoyers@efficios.com commit cbae6bac29a8c5cf2f1cb5c6bce35af00cec164b Author: Mathieu Desnoyers Date: Tue Nov 22 15:39:06 2022 -0500 rseq: Extend struct rseq with numa node id Adding the NUMA node id to struct rseq is a straightforward thing to do, and a good way to figure out if anything in the user-space ecosystem prevents extending struct rseq. This NUMA node id field allows memory allocators such as tcmalloc to take advantage of fast access to the current NUMA node id to perform NUMA-aware memory allocation. It can also be useful for implementing fast-paths for NUMA-aware user-space mutexes. It also allows implementing getcpu(2) purely in user-space. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221122203932.231377-5-mathieu.desnoyers@efficios.com commit ee3e3ac05c2631ce1f12d88c9cc9a092f8fe947a Author: Mathieu Desnoyers Date: Tue Nov 22 15:39:05 2022 -0500 rseq: Introduce extensible rseq ABI Introduce the extensible rseq ABI, where the feature size supported by the kernel and the required alignment are communicated to user-space through ELF auxiliary vectors. This allows user-space to call rseq registration with a rseq_len of either 32 bytes for the original struct rseq size (which includes padding), or larger. If rseq_len is larger than 32 bytes, then it must be large enough to contain the feature size communicated to user-space through ELF auxiliary vectors. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221122203932.231377-4-mathieu.desnoyers@efficios.com commit 317c8194e6aeb8b3b573ad139fc2a0635856498e Author: Mathieu Desnoyers Date: Tue Nov 22 15:39:04 2022 -0500 rseq: Introduce feature size and alignment ELF auxiliary vector entries Export the rseq feature size supported by the kernel as well as the required allocation alignment for the rseq per-thread area to user-space through ELF auxiliary vector entries. This is part of the extensible rseq ABI. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221122203932.231377-3-mathieu.desnoyers@efficios.com commit 4842dadfc66f627083ec46c4e9a426e805c765f3 Author: Mathieu Desnoyers Date: Tue Nov 22 15:39:03 2022 -0500 selftests/rseq: Fix: Fail thread registration when CONFIG_RSEQ=n When linking the selftests against a libc which does not handle rseq registration (before 2.35), rseq thread registration silently succeed even with CONFIG_RSEQ=n because it erroneously thinks that libc is handling rseq registration. This is caused by setting the rseq ownership flag only after the rseq_available() check. It should rather be set before the rseq_available() check. Set the rseq_size to 0 (error value) immediately after the rseq_available() check fails rather than in the thread registration functions. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20221122203932.231377-2-mathieu.desnoyers@efficios.com commit 8ad075c2eb1f6b4b33436144ea1ef2619f3b6398 Author: Josh Don Date: Wed Nov 16 16:54:18 2022 -0800 sched: Async unthrottling for cfs bandwidth CFS bandwidth currently distributes new runtime and unthrottles cfs_rq's inline in an hrtimer callback. Runtime distribution is a per-cpu operation, and unthrottling is a per-cgroup operation, since a tg walk is required. On machines with a large number of cpus and large cgroup hierarchies, this cpus*cgroups work can be too much to do in a single hrtimer callback: since IRQ are disabled, hard lockups may easily occur. Specifically, we've found this scalability issue on configurations with 256 cpus, O(1000) cgroups in the hierarchy being throttled, and high memory bandwidth usage. To fix this, we can instead unthrottle cfs_rq's asynchronously via a CSD. Each cpu is responsible for unthrottling itself, thus sharding the total work more fairly across the system, and avoiding hard lockups. Signed-off-by: Josh Don Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20221117005418.3499691-1-joshdon@google.com commit 9a5322db46332a4ce42369e86f031b5e963d841c Author: Bing Huang Date: Fri Nov 18 11:42:08 2022 +0800 sched/topology: Add __init for init_defrootdomain init_defrootdomain is only used in initialization Signed-off-by: Bing Huang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (Google) Reviewed-by: Randy Dunlap Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/20221118034208.267330-1-huangbing775@126.com commit 03c4c7f88709fac0e20b6a48357c73d6fc50e544 Author: Like Xu Date: Thu Nov 24 23:05:50 2022 -0500 perf/x86/lbr: Simplify the exposure check for the LBR_INFO registers The x86_pmu.lbr_info is 0 unless explicitly initialized, so there's no point checking x86_pmu.intel_cap.lbr_format. Signed-off-by: Like Xu Signed-off-by: Yang Weijiang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/20221125040604.5051-2-weijiang.yang@intel.com commit 916dde51a418c7fa1efc62b3509d5a3f90ea0176 Author: Vitaly Kuznetsov Date: Thu Oct 13 11:58:43 2022 +0200 x86/hyperv: Add HV_EXPOSE_INVARIANT_TSC define Avoid open coding BIT(0) of HV_X64_MSR_TSC_INVARIANT_CONTROL by adding a dedicated define. While there's only one user at this moment, the upcoming KVM implementation of Hyper-V Invariant TSC feature will need to use it as well. Reviewed-by: Michael Kelley Signed-off-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Message-Id: <20221013095849.705943-2-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 94fbbfbbdffdce23d9c37e65da711adbc1bfe642 Author: Sean Christopherson Date: Wed Oct 12 18:16:58 2022 +0000 KVM: x86/mmu: Pivot on "TDP MMU enabled" when handling direct page faults When handling direct page faults, pivot on the TDP MMU being globally enabled instead of checking if the target MMU is a TDP MMU. Now that the TDP MMU is all-or-nothing, if the TDP MMU is enabled, KVM will reach direct_page_fault() if and only if the MMU is a TDP MMU. When TDP is enabled (obviously required for the TDP MMU), only non-nested TDP page faults reach direct_page_fault(), i.e. nonpaging MMUs are impossible, as NPT requires paging to be enabled and EPT faults use ept_page_fault(). Signed-off-by: Sean Christopherson Message-Id: <20221012181702.3663607-8-seanjc@google.com> [Use tdp_mmu_enabled variable. - Paolo] Signed-off-by: Paolo Bonzini commit f2e4535c273af02efe5f58ec201cf7e14a6c895a Author: Sean Christopherson Date: Wed Oct 12 18:16:59 2022 +0000 KVM: x86/mmu: Pivot on "TDP MMU enabled" to check if active MMU is TDP MMU Simplify and optimize the logic for detecting if the current/active MMU is a TDP MMU. If the TDP MMU is globally enabled, then the active MMU is a TDP MMU if it is direct. When TDP is enabled, so called nonpaging MMUs are never used as the only form of shadow paging KVM uses is for nested TDP, and the active MMU can't be direct in that case. Rename the helper and take the vCPU instead of an arbitrary MMU, as nonpaging MMUs can show up in the walk_mmu if L1 is using nested TDP and L2 has paging disabled. Taking the vCPU has the added bonus of cleaning up the callers, all of which check the current MMU but wrap code that consumes the vCPU. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20221012181702.3663607-9-seanjc@google.com> [Use tdp_mmu_enabled variable. - Paolo] Signed-off-by: Paolo Bonzini commit aeb568a1a6041e3d69def54046747bbd989bc4ed Author: Sean Christopherson Date: Wed Oct 12 18:17:00 2022 +0000 KVM: x86/mmu: Replace open coded usage of tdp_mmu_page with is_tdp_mmu_page() Use is_tdp_mmu_page() instead of querying sp->tdp_mmu_page directly so that all users benefit if KVM ever finds a way to optimize the logic. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20221012181702.3663607-10-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 362871d74ff67f23534a5ecb448967b0507d0848 Author: David Matlack Date: Wed Sep 21 10:35:46 2022 -0700 KVM: x86/mmu: Rename __direct_map() to direct_map() Rename __direct_map() to direct_map() since the leading underscores are unnecessary. This also makes the page fault handler names more consistent: kvm_tdp_mmu_page_fault() calls kvm_tdp_mmu_map() and direct_page_fault() calls direct_map(). Opportunistically make some trivial cleanups to comments that had to be modified anyway since they mentioned __direct_map(). Specifically, use "()" when referring to functions, and include kvm_tdp_mmu_map() among the various callers of disallowed_hugepage_adjust(). No functional change intended. Signed-off-by: David Matlack Reviewed-by: Isaku Yamahata Signed-off-by: Paolo Bonzini Message-Id: <20220921173546.2674386-11-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit 1290f90e77186bf8a06a3a35ebf254f5b004676b Author: David Matlack Date: Wed Sep 21 10:35:45 2022 -0700 KVM: x86/mmu: Stop needlessly making MMU pages available for TDP MMU faults Stop calling make_mmu_pages_available() when handling TDP MMU faults. The TDP MMU does not participate in the "available MMU pages" tracking and limiting so calling this function is unnecessary work when handling TDP MMU faults. Signed-off-by: David Matlack Reviewed-by: Isaku Yamahata Signed-off-by: Paolo Bonzini Message-Id: <20220921173546.2674386-10-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit a158127f55b98c02c2f1ef96981db088cad5c2e7 Author: David Matlack Date: Wed Sep 21 10:35:44 2022 -0700 KVM: x86/mmu: Split out TDP MMU page fault handling Split out the page fault handling for the TDP MMU to a separate function. This creates some duplicate code, but makes the TDP MMU fault handler simpler to read by eliminating branches and will enable future cleanups by allowing the TDP MMU and non-TDP MMU fault paths to diverge. Only compile in the TDP MMU fault handler for 64-bit builds since kvm_tdp_mmu_map() does not exist in 32-bit builds. No functional change intended. Signed-off-by: David Matlack Reviewed-by: Isaku Yamahata Signed-off-by: Paolo Bonzini Message-Id: <20220921173546.2674386-9-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit 2d75ce03005dfaf29b52ea885ddd960ba5c1d8c2 Author: David Matlack Date: Wed Sep 21 10:35:43 2022 -0700 KVM: x86/mmu: Initialize fault.{gfn,slot} earlier for direct MMUs Move the initialization of fault.{gfn,slot} earlier in the page fault handling code for fully direct MMUs. This will enable a future commit to split out TDP MMU page fault handling without needing to duplicate the initialization of these 2 fields. Opportunistically take advantage of the fact that fault.gfn is initialized in kvm_tdp_page_fault() rather than recomputing it from fault->addr. No functional change intended. Signed-off-by: David Matlack Reviewed-by: Isaku Yamahata Signed-off-by: Paolo Bonzini Message-Id: <20220921173546.2674386-8-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit f09948ec1ff3063b0722ef15195da3beca2d57c6 Author: David Matlack Date: Wed Sep 21 10:35:42 2022 -0700 KVM: x86/mmu: Handle no-slot faults in kvm_faultin_pfn() Handle faults on GFNs that do not have a backing memslot in kvm_faultin_pfn() and drop handle_abnormal_pfn(). This eliminates duplicate code in the various page fault handlers. Opportunistically tweak the comment about handling gfn > host.MAXPHYADDR to reflect that the effect of returning RET_PF_EMULATE at that point is to avoid creating an MMIO SPTE for such GFNs. No functional change intended. Signed-off-by: David Matlack Signed-off-by: Paolo Bonzini Message-Id: <20220921173546.2674386-7-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit 897e4526e5e002818840e38d72e0585c45533fe8 Author: David Matlack Date: Wed Sep 21 10:35:41 2022 -0700 KVM: x86/mmu: Avoid memslot lookup during KVM_PFN_ERR_HWPOISON handling Pass the kvm_page_fault struct down to kvm_handle_error_pfn() to avoid a memslot lookup when handling KVM_PFN_ERR_HWPOISON. Opportunistically move the gfn_to_hva_memslot() call and @current down into kvm_send_hwpoison_signal() to cut down on line lengths. No functional change intended. Signed-off-by: David Matlack Reviewed-by: Isaku Yamahata Signed-off-by: Paolo Bonzini Message-Id: <20220921173546.2674386-6-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit 7bd9645348ca865408b8c50491d605da1dfa05e3 Author: David Matlack Date: Wed Sep 21 10:35:40 2022 -0700 KVM: x86/mmu: Handle error PFNs in kvm_faultin_pfn() Handle error PFNs in kvm_faultin_pfn() rather than relying on the caller to invoke handle_abnormal_pfn() after kvm_faultin_pfn(). Opportunistically rename kvm_handle_bad_page() to kvm_handle_error_pfn() to make it more consistent with is_error_pfn(). This commit moves KVM closer to being able to drop handle_abnormal_pfn(), which will reduce the amount of duplicate code in the various page fault handlers. No functional change intended. Signed-off-by: David Matlack Signed-off-by: Paolo Bonzini Message-Id: <20220921173546.2674386-5-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit 90c54c19f8021d9d284055dc246d605b559cdc22 Author: David Matlack Date: Wed Sep 21 10:35:39 2022 -0700 KVM: x86/mmu: Grab mmu_invalidate_seq in kvm_faultin_pfn() Grab mmu_invalidate_seq in kvm_faultin_pfn() and stash it in struct kvm_page_fault. The eliminates duplicate code and reduces the amount of parameters needed for is_page_fault_stale(). Preemptively split out __kvm_faultin_pfn() to a separate function for use in subsequent commits. No functional change intended. Signed-off-by: David Matlack Reviewed-by: Isaku Yamahata Signed-off-by: Paolo Bonzini Message-Id: <20220921173546.2674386-4-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit 991c8047b740f192a057d5f22df2f91f087cdb72 Author: David Matlack Date: Wed Sep 21 10:35:38 2022 -0700 KVM: x86/mmu: Move TDP MMU VM init/uninit behind tdp_mmu_enabled Move kvm_mmu_{init,uninit}_tdp_mmu() behind tdp_mmu_enabled. This makes these functions consistent with the rest of the calls into the TDP MMU from mmu.c, and which is now possible since tdp_mmu_enabled is only modified when the x86 vendor module is loaded. i.e. It will never change during the lifetime of a VM. This change also enabled removing the stub definitions for 32-bit KVM, as the compiler will just optimize the calls out like it does for all the other TDP MMU functions. No functional change intended. Signed-off-by: David Matlack Reviewed-by: Isaku Yamahata Signed-off-by: Paolo Bonzini Message-Id: <20220921173546.2674386-3-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit 3af15ff47c4df3af7b36ea8315f43c6b0af49253 Author: David Matlack Date: Wed Sep 21 10:35:37 2022 -0700 KVM: x86/mmu: Change tdp_mmu to a read-only parameter Change tdp_mmu to a read-only parameter and drop the per-vm tdp_mmu_enabled. For 32-bit KVM, make tdp_mmu_enabled a macro that is always false so that the compiler can continue omitting cals to the TDP MMU. The TDP MMU was introduced in 5.10 and has been enabled by default since 5.15. At this point there are no known functionality gaps between the TDP MMU and the shadow MMU, and the TDP MMU uses less memory and scales better with the number of vCPUs. In other words, there is no good reason to disable the TDP MMU on a live system. Purposely do not drop tdp_mmu=N support (i.e. do not force 64-bit KVM to always use the TDP MMU) since tdp_mmu=N is still used to get test coverage of KVM's shadow MMU TDP support, which is used in 32-bit KVM. Signed-off-by: David Matlack Reviewed-by: Kai Huang Signed-off-by: Paolo Bonzini Message-Id: <20220921173546.2674386-2-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit de4af61ee3c4076eab836fc98ae59dbda98bf690 Author: Thomas Huth Date: Tue Oct 4 11:31:31 2022 +0200 KVM: selftests: x86: Use TAP interface in the tsc_msrs_test Let's add some output here so that the user has some feedback about what is being run. Signed-off-by: Thomas Huth Message-Id: <20221004093131.40392-4-thuth@redhat.com> Signed-off-by: Paolo Bonzini commit d324a733a9346081957f9d74b9e0a05e8a7a0da5 Author: Thomas Huth Date: Tue Oct 4 11:31:29 2022 +0200 KVM: selftests: Use TAP interface in the kvm_binary_stats_test The kvm_binary_stats_test test currently does not have any output (unless one of the TEST_ASSERT statement fails), so it's hard to say for a user how far it did proceed already. Thus let's make this a little bit more user-friendly and include some TAP output via the kselftest.h interface. Signed-off-by: Thomas Huth Reviewed-by: Andrew Jones Message-Id: <20221004093131.40392-2-thuth@redhat.com> Signed-off-by: Paolo Bonzini commit 641e6808586d76b477c00de804358982b95c8d50 Author: Lai Jiangshan Date: Mon Dec 12 17:01:06 2022 +0800 kvm: x86/mmu: Warn on linking when sp->unsync_children Since the commit 65855ed8b034 ("KVM: X86: Synchronize the shadow pagetable before link it"), no sp would be linked with sp->unsync_children = 1. So make it WARN if it is the case. Signed-off-by: Lai Jiangshan Message-Id: <20221212090106.378206-1-jiangshanlai@gmail.com> Signed-off-by: Paolo Bonzini commit 1567037614af5f078c2361ca21d9b1a1cd42b8aa Author: Vitaly Kuznetsov Date: Fri Nov 4 15:47:08 2022 +0100 KVM: VMX: Resurrect vmcs_conf sanitization for KVM-on-Hyper-V Commit 9bcb90650e31 ("KVM: VMX: Get rid of eVMCS specific VMX controls sanitization") dropped 'vmcs_conf' sanitization for KVM-on-Hyper-V because there's no known Hyper-V version which would expose a feature unsupported in eVMCS in VMX feature MSRs. This works well for all currently existing Hyper-V version, however, future Hyper-V versions may add features which are supported by KVM and are currently missing in eVMCSv1 definition (e.g. APIC virtualization, PML,...). When this happens, existing KVMs will get broken. With the inverted 'unsupported by eVMCSv1' checks, we can resurrect vmcs_conf sanitization and make KVM future proof. Signed-off-by: Vitaly Kuznetsov Message-Id: <20221104144708.435865-5-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 746b1833919eed3dd92c82466316471dfaba319e Author: Vitaly Kuznetsov Date: Fri Nov 4 15:47:07 2022 +0100 KVM: nVMX: Prepare to sanitize tertiary execution controls with eVMCS In preparation to restoring vmcs_conf sanitization for KVM-on-Hyper-V, (and for completeness) add tertiary VM-execution controls to 'evmcs_supported_ctrls'. No functional change intended as KVM doesn't yet expose MSR_IA32_VMX_PROCBASED_CTLS3 to its guests. Signed-off-by: Vitaly Kuznetsov Message-Id: <20221104144708.435865-4-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 70b31e50fb5f6bb8addac1c4e5004c6af377ab68 Author: Vitaly Kuznetsov Date: Fri Nov 4 15:47:06 2022 +0100 KVM: nVMX: Invert 'unsupported by eVMCSv1' check When a new feature gets implemented in KVM, EVMCS1_UNSUPPORTED_* defines need to be adjusted to avoid the situation when the feature is exposed to the guest but there's no corresponding eVMCS field[s] for it. This is not obvious and fragile. Invert 'unsupported by eVMCSv1' check and make it 'supported by eVMCSv1' instead, this way it's much harder to make a mistake. New features will get added to EVMCS1_SUPPORTED_* defines when the corresponding fields are added to eVMCS definition. No functional change intended. EVMCS1_SUPPORTED_* defines are composed by taking KVM_{REQUIRED,OPTIONAL}_VMX_ defines and filtering out what was previously known as EVMCS1_UNSUPPORTED_*. From all the controls, SECONDARY_EXEC_TSC_SCALING requires special handling as it's actually present in eVMCSv1 definition but is not currently supported for Hyper-V-on-KVM, just for KVM-on-Hyper-V. As evmcs_supported_ctrls will be used for both scenarios, just add it there instead of EVMCS1_SUPPORTED_2NDEXEC. Signed-off-by: Vitaly Kuznetsov Message-Id: <20221104144708.435865-3-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit bbbaf8cd1735770342aad4c6624a147ae321599b Author: Vitaly Kuznetsov Date: Fri Nov 4 15:47:05 2022 +0100 KVM: nVMX: Sanitize primary processor-based VM-execution controls with eVMCS too The only unsupported primary processor-based VM-execution control at the moment is CPU_BASED_ACTIVATE_TERTIARY_CONTROLS and KVM doesn't expose it in nested VMX feature MSRs anyway (see nested_vmx_setup_ctls_msrs()) but in preparation to inverting "unsupported with eVMCS" checks (and for completeness) it's better to sanitize MSR_IA32_VMX_PROCBASED_CTLS/ MSR_IA32_VMX_TRUE_PROCBASED_CTLS too. No functional change intended. Signed-off-by: Vitaly Kuznetsov Message-Id: <20221104144708.435865-2-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit d969103ac89de797fda351aa984f69602b149a72 Author: Phil Edworthy Date: Tue Dec 13 23:01:26 2022 +0000 clk: renesas: r9a09g011: Add SDHI/eMMC clock and reset entries Add SDHI/eMMC clock/reset entries to CPG driver. Signed-off-by: Phil Edworthy Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20221213230129.549968-2-fabrizio.castro.jz@renesas.com Signed-off-by: Geert Uytterhoeven commit 5edf5b51e760af749c4a8e67cde92db4f3680be5 Author: Biju Das Date: Mon Dec 12 17:27:49 2022 +0000 clk: renesas: r9a09g011: Add USB clock and reset entries Add USB clock and reset entries to CPG driver. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20221212172804.1277751-2-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit d459f557ad76f449687e76fcb94f1009551dd669 Author: Biju Das Date: Mon Dec 5 14:59:50 2022 +0000 clk: renesas: r9a09g011: Add TIM clock and reset entries Add Compare-Match Timer (TIM) clock and reset entries to CPG driver. The TIM IP on the RZ/V2M comes with 32 channels, but the ISP has full control of channels 0 to 7, and channels 24 to 31. Therefore Linux is only allowed to use channels 8 to 23. The TIM has shared peripheral clock with other modules, so mark it as critical clock. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20221205145955.391526-2-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit d31137619776f9c173a46a79bc7733a2b106061f Author: Jiri Slaby (SUSE) Date: Mon Dec 12 11:29:36 2022 +0100 thunderbolt: Use correct type in tb_port_is_clx_enabled() prototype tb_port_is_clx_enabled() generates a valid warning with gcc-13: drivers/thunderbolt/switch.c:1286:6: error: conflicting types for 'tb_port_is_clx_enabled' due to enum/integer mismatch; have 'bool(struct tb_port *, unsigned int)' ... drivers/thunderbolt/tb.h:1050:6: note: previous declaration of 'tb_port_is_clx_enabled' with type 'bool(struct tb_port *, enum tb_clx)' ... I.e. the type of the 2nd parameter of tb_port_is_clx_enabled() in the declaration is unsigned int, while the definition spells enum tb_clx. Synchronize them to the former as the parameter is in fact a mask of the enum values. Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Mika Westerberg commit ed8167cbf65c2b6ff6faeb0f96ded4d6d581e1ac Author: Chen Hui Date: Tue Nov 8 22:19:17 2022 +0800 ARM: OMAP2+: Fix memory leak in realtime_counter_init() The "sys_clk" resource is malloced by clk_get(), it is not released when the function return. Fixes: fa6d79d27614 ("ARM: OMAP: Add initialisation for the real-time counter.") Signed-off-by: Chen Hui Message-Id: <20221108141917.46796-1-judy.chenhui@huawei.com> Signed-off-by: Tony Lindgren commit 7c32919a378782c95c72bc028b5c30dfe8c11f82 Author: Liang He Date: Tue Jun 28 19:29:39 2022 +0800 ARM: OMAP2+: omap4-common: Fix refcount leak bug In omap4_sram_init(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Signed-off-by: Liang He Message-Id: <20220628112939.160737-1-windhl@126.com> Signed-off-by: Tony Lindgren commit 5b2ad5acaf5aa8a1ff441665967cf728a46ac967 Author: Rob Herring Date: Mon Dec 5 19:43:43 2022 -0600 dt-bindings: opp: opp-v2-kryo-cpu: Add missing 'cache-unified' property in example The examples' cache nodes are incomplete as 'cache-unified' is a required cache property for unified caches which an L2 cache certainly is. Signed-off-by: Rob Herring Signed-off-by: Viresh Kumar commit e15b0e6d77e9cf9a2763eaeea6045b1303126fdc Author: Xinlei Lee Date: Mon Oct 24 10:04:59 2022 +0800 drm/mediatek: Add mt8186 dpi compatibles and platform data Add the compatible because use edge_cfg_in_mmsys in mt8186. Signed-off-by: Xinlei Lee Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Link: https://patchwork.kernel.org/project/linux-mediatek/patch/1666577099-3859-4-git-send-email-xinlei.lee@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 62fc5cd17172d8bc4a44cd127f7851048cf80231 Author: Xinlei Lee Date: Mon Oct 24 10:04:58 2022 +0800 drm/mediatek: Set dpi format in mmsys Dpi output needs to adjust the output format to dual edge for MT8186. Co-developed-by: Jitao Shi Signed-off-by: Jitao Shi Signed-off-by: Xinlei Lee Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Link: https://patchwork.kernel.org/project/linux-mediatek/patch/1666577099-3859-3-git-send-email-xinlei.lee@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 6635e91648ce0868481fd6dd591d5ac796d8a635 Author: Emil Renner Berthing Date: Tue Dec 20 09:12:45 2022 +0800 soc: sifive: ccache: Add StarFive JH7110 support This adds support for the StarFive JH7110 SoC which also features this SiFive cache controller. Signed-off-by: Emil Renner Berthing Signed-off-by: Hal Feng Signed-off-by: Conor Dooley commit 1caf002efa223f930ba508159535cf82ad4b2811 Author: Emil Renner Berthing Date: Tue Dec 20 09:12:44 2022 +0800 dt-bindings: sifive,ccache0: Support StarFive JH7110 SoC This cache controller is also used on the StarFive JH7110 SoC. Signed-off-by: Emil Renner Berthing Signed-off-by: Hal Feng Acked-by: Rob Herring Signed-off-by: Conor Dooley commit 97b7ed07278436099a38da48ba6556e7cb25f57b Author: Emil Renner Berthing Date: Tue Dec 20 09:12:41 2022 +0800 dt-bindings: riscv: Add StarFive JH7110 SoC and VisionFive 2 board Add device tree bindings for the StarFive JH7110 RISC-V SoC and the VisionFive 2 board equipped with it. VisionFive 2 board has version A and version B, which are different in gmac and phy chip. The version A board has one 1000Mbps and one 100Mbps Ethernet ports while the version B board has two 1000Mbps Ethernet ports. Link: https://doc-en.rvspace.org/Doc_Center/jh7110.html Link: https://doc-en.rvspace.org/Doc_Center/visionfive_2.html Signed-off-by: Emil Renner Berthing Signed-off-by: Hal Feng Acked-by: Krzysztof Kozlowski Signed-off-by: Conor Dooley commit 2bf2f4d9f673013a58109626b87329310537a611 Author: Chukun Pan Date: Fri Dec 9 18:25:24 2022 +0800 arm64: dts: rockchip: Add Radxa CM3I E25 Radxa E25 is a network application carrier board for the Radxa CM3 Industrial (CM3I) SoM, which is based on the Rockchip RK3568 SoC. It has the following features: - MicroSD card socket, on board eMMC flash - 2x 2.5GbE Realtek RTL8125B Ethernet transceiver - 1x USB Type-C port (Power and Serial console) - 1x USB 3.0 OTG port - mini PCIe socket (USB or PCIe) - ngff PCIe socket (USB or SATA) - 1x User LED and 16x RGB LEDs - 26-pin expansion header Signed-off-by: Chukun Pan Link: https://lore.kernel.org/r/20221209102524.129367-3-amadeus@jmu.edu.cn Signed-off-by: Heiko Stuebner commit ae9fbe0b1f9658d445d9e4049e2949b2ab141af1 Author: Chukun Pan Date: Fri Dec 9 18:25:23 2022 +0800 dt-bindings: arm: rockchip: add Radxa CM3I E25 Radxa CM3 Industrial (CM3I) is an System on Module made by Radxa based on the Rockchip RK3568 SoC. The first carrier board supported is the Radxa E25. Add devicetree binding documentation for it. Signed-off-by: Chukun Pan Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221209102524.129367-2-amadeus@jmu.edu.cn Signed-off-by: Heiko Stuebner commit 51a0b607c0db8dd83b3f8b94a42b3434a7bccb71 Author: Johan Jonker Date: Fri Oct 28 16:41:59 2022 +0200 ARM: dts: rockchip: add rk3128-evb Add rk3128 eval board dts Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/56dbd2ab-dc2c-2f7d-0403-1d29dfd3c2e7@gmail.com Signed-off-by: Heiko Stuebner commit a0201bff625964af99c6c495c7bd3da35b4b87fd Author: Johan Jonker Date: Fri Oct 28 16:41:45 2022 +0200 ARM: dts: rockchip: add rk3128 soc dtsi Add basic rk3128 support. Features: Quad-core ARM Cortex-A7MP Core processor Clock & reset unit Power management unit Interrupt controller DMAC 6x 64 bits Timers 4x PWMs 1x 32 bits watchdog Internal memory: Internal BootRom Internal SRAM 8KB External memory: Dynamic Memory Interface (DDR3/DDR3L/LPDDR2) Nand Flash Interface eMMC Interface SD/MMC Interface Connectivity: SDIO interface SPI Controller 3x UART controller 4x I2C controllers 4x groups of GPIO (GPIO0~GPIO3), 32 GPIOs per group USB Host2.0 USB OTG2.0 Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/b7bac0b3-3c91-1026-d435-6b5e9d6492f3@gmail.com Signed-off-by: Heiko Stuebner commit ea02e2113d804800b428c0d738c438a3380fe0fc Author: Johan Jonker Date: Fri Oct 28 16:41:12 2022 +0200 dt-bindings: arm: rockchip: Add Rockchip RK3128 Evaluation board Add Rockchip RK3128 Evaluation board. Signed-off-by: Johan Jonker Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/dca18633-54d4-1264-725c-213d82fdf1c5@gmail.com Signed-off-by: Heiko Stuebner commit 2ec8afbc91faef6825548ae4e0ae3274a1a7b884 Author: Jagan Teki Date: Tue Nov 29 13:24:24 2022 +0530 ARM: dts: rockchip: Add Edgeble Neural Compute Module 2(Neu2) IO board Neural Compute Module 2(Neu2) IO board is an industrial form factor evaluation board from Edgeble AI. General features: - microSD slot - MIPI DSI connector - 2x USB Host - 1x USB OTG - Ethernet - mini PCIe - Onboard PoE - RS485, RS232, CAN - Micro Phone array - Speaker - RTC battery slot - 40-pin expansion Neu2 needs to mount on top of this IO board in order to create complete Edgeble Neural Compute Module 2(Neu2) IO platform. Add support for it. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20221129075424.189655-9-jagan@edgeble.ai Signed-off-by: Heiko Stuebner commit c973953e6a5be0369ff9704f0bbca9502b25c172 Author: Jagan Teki Date: Tue Nov 29 13:24:23 2022 +0530 ARM: dts: rockchip: Add Edgeble RV1126 Neural Compute Module 2(Neu2) Neural Compute Module 2(Neu2) is a 96boards SoM-CB compute module based on Rockchip RV1126 from Edgeble AI. General features: - Rockchip RV1126 - 2/4GB LPDDR4 - 8/16/32GB eMMC - 2x MIPI CSI2 FPC connector - Fn-link 8223A-SR WiFi/BT Industrial grade (-40 °C to +85 °C) version of the same class of module called Neu2k powered with Rockchip RV1126K. Neu2 needs to mount on top of Edgeble IO boards for creating complete platform solutions. Add support for it. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20221129075424.189655-8-jagan@edgeble.ai Signed-off-by: Heiko Stuebner commit 765f8bb2127709505f5d905821c4d1beac6dcb2e Author: Jagan Teki Date: Tue Nov 29 13:24:22 2022 +0530 dt-bindings: arm: rockchip: Add Edgeble Neural Compute Module 2 Neural Compute Module 2(Neu2) is a 96boards SoM-CB compute module based on Rockchip RV1126 from Edgeble AI. Edgeble Neural Compute Module 2(Neu2) IO board is an industrial form factor evaluation board from Edgeble AI. Neu2 needs to mount on top of this IO board in order to create complete Edgeble Neural Compute Module 2(Neu2) IO platform. Add dt-bindings for it. Acked-by: Rob Herring Signed-off-by: Jagan Teki Acked-by: Heiko Stuebner Link: https://lore.kernel.org/r/20221129075424.189655-7-jagan@edgeble.ai Signed-off-by: Heiko Stuebner commit 7fc7215c46766d814e51d2fda58b7aec47318ccc Author: Jagan Teki Date: Tue Nov 29 13:24:21 2022 +0530 dt-bindings: vendor-prefixes: Add Edgeble AI Technologies Pvt. Ltd. Edgeble AI is an Artificial Intelligence company with a focus on deploying Neural Acceleration principles at the Edge. Add vendor prefix for it. Acked-by: Rob Herring Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20221129075424.189655-6-jagan@edgeble.ai Signed-off-by: Heiko Stuebner commit 5496d2793e088af0bd9b3730866ead738f731803 Author: Jagan Teki Date: Tue Nov 29 13:24:20 2022 +0530 ARM: dts: rockchip: Add Rockchip RV1126 SoC RV1126 is a high-performance vision processor SoC for IPC/CVR, especially for AI related application. It is based on quad-core ARM Cortex-A7 32-bit core which integrates NEON and FPU. There is a 32KB I-cache and 32KB D-cache for each core and 512KB unified L2 cache. It has build-in NPU supports INT8/INT16 hybrid operation and computing power is up to 2.0TOPs. This patch add basic core dtsi support. Signed-off-by: Jon Lin Signed-off-by: Sugar Zhang Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20221129075424.189655-5-jagan@edgeble.ai Signed-off-by: Heiko Stuebner commit 0fa22d06d1d8edc64df782a8650533572bd3cfae Author: Jagan Teki Date: Tue Nov 29 13:24:19 2022 +0530 ARM: dts: rockchip: Add Rockchip RV1126 pinctrl Add pinctrl definitions for Rockchip RV1126. From RK3568 on-wards pinctrl configurations are maintained in common conf file rockchip-pinconf.dtsi and it is available in arm64 path (arch/arm64/boot/dts/rockchip/rockchip-pinconf.dtsi). So, include the same conf file to RV1126 pinctrl from arm64 path. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20221129075424.189655-4-jagan@edgeble.ai Signed-off-by: Heiko Stuebner commit d7ffb4c3085936c4f83e2f7a25c35a09a91c5563 Author: Jagan Teki Date: Tue Nov 29 13:24:17 2022 +0530 dt-bindings: arm: rockchip: Add pmu compatible for rv1126 Add PMU compatible string for rockchip rv1126. Acked-by: Krzysztof Kozlowski Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20221129075424.189655-2-jagan@edgeble.ai Signed-off-by: Heiko Stuebner commit 00f2a08cd785d262c760282ec027caa6ea8975d4 Author: Colin Foster Date: Thu Dec 22 10:23:09 2022 -0800 dt-bindings: memory-controllers: ti,gpmc: fix typo in description Fix typo where 'GPMC driver implements an interrupt controller' instead of 'and interrupt controller' Signed-off-by: Colin Foster Link: https://lore.kernel.org/r/20221222182309.575069-1-colin.foster@in-advantage.com Signed-off-by: Rob Herring commit 8e5d0c68f23ab139e472f93ebbcfda9545e9953b Author: Ricardo Ribalda Date: Tue Dec 20 23:20:32 2022 +0100 of: overlay: Fix trivial typo Permitted is spelled with two t. Signed-off-by: Ricardo Ribalda Reviewed-by: Philippe Mathieu-Daudé Link: https://lore.kernel.org/r/20221220-permited-v1-3-52ea9857fa61@chromium.org Signed-off-by: Rob Herring commit ec201955a53be4b57a467f7160724ff06289cead Author: Rob Herring Date: Mon Dec 19 19:32:33 2022 -0600 kbuild: Optionally enable schema checks for %.dtb targets While not documented, schema checks for single dtb targets mostly work already by setting 'CHECK_DTBS=1'. However, the dependencies are not handled and it only works if 'make dt_bindings_check' was run first and generated processed-schema.json. In addition, changing a binding file doesn't cause the schema to be rebuilt and dtb to be revalidated. Making this work turns out to be simple. Whenever CHECK_DTBS is set, make 'dt_binding_check' a 'dtbs_prepare' dependency. I reimplemented here what Masahiro had originally come up with a while back. Suggested-by: Masahiro Yamada Acked-by: Masahiro Yamada Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov Tested-by: Marek Vasut Link: https://lore.kernel.org/r/20221220013233.2890335-1-robh@kernel.org Signed-off-by: Rob Herring commit 9e699b8985e62c93cb1ca84b27197b5c1cdbd596 Author: Kunihiko Hayashi Date: Tue Dec 13 17:24:49 2022 +0900 dt-bindings: soc: socionext: Add UniPhier AHCI glue layer Add DT binding schema for components belonging to the platform-specific AHCI glue layer implemented in UniPhier SoCs. This AHCI glue layer works as a sideband logic for the host controller, including core reset, PHYs, and some signals to the controller. Signed-off-by: Kunihiko Hayashi Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221213082449.2721-18-hayashi.kunihiko@socionext.com Signed-off-by: Rob Herring commit 5993f6bd555e2696bb4d79cf54b976cb58793534 Author: Kunihiko Hayashi Date: Tue Dec 13 17:24:48 2022 +0900 dt-bindings: soc: socionext: Add UniPhier DWC3 USB glue layer Add DT binding schema for components belonging to the platform-specific DWC3 USB glue layer implemented in UniPhier SoCs. This USB glue layer works as a sideband logic for the host controller, including core reset, vbus control, PHYs, and some signals to the controller. Signed-off-by: Kunihiko Hayashi Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221213082449.2721-17-hayashi.kunihiko@socionext.com Signed-off-by: Rob Herring commit 0c00d8d315f09ef8639369a7f12e270b7a86bf79 Author: Kunihiko Hayashi Date: Tue Dec 13 17:24:47 2022 +0900 dt-bindings: soc: socionext: Add UniPhier ADAMV block Add devicetree binding schema for the ADAMV block implemented on Socionext Uniphier SoCs. The ADAMV block is analog signal amplifier that is a part of the external video and audio I/O system. This block is implemented on LD11 and LD20, and this is defined for controlling audio I/O reset only. Signed-off-by: Kunihiko Hayashi Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221213082449.2721-16-hayashi.kunihiko@socionext.com Signed-off-by: Rob Herring commit 6796f54e8143671deb13701d122f6f029def853b Author: Kunihiko Hayashi Date: Tue Dec 13 17:24:46 2022 +0900 dt-bindings: soc: socionext: Add UniPhier SD interface block Add devicetree binding schema for the SD interface block implemented on Socionext Uniphier SoCs. This SD interface block is attached outside SDHC, and has some SD related functions such as clock control, reset control, mode switch, and so on. Signed-off-by: Kunihiko Hayashi Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221213082449.2721-15-hayashi.kunihiko@socionext.com Signed-off-by: Rob Herring commit b3ad9754505ab717915d4e644e78e7d7888f4ef1 Author: Kunihiko Hayashi Date: Tue Dec 13 17:24:45 2022 +0900 dt-bindings: soc: socionext: Add UniPhier media I/O block Add devicetree binding schema for the media I/O block implemented on Socionext Uniphier SoCs. This block is implemented on LD4, sLD8, Pro4, and LD11 SoCs. Media I/O block implemented on Socionext UniPhier SoCs is an integrated component of the stream type peripherals including SD, USB2.0, eMMC, and MIO-DMAC. Media I/O block has a common logic to control the component. Signed-off-by: Kunihiko Hayashi Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221213082449.2721-14-hayashi.kunihiko@socionext.com Signed-off-by: Rob Herring commit 9fb31379f061b7130a244dd0ff58e0f0cf0ca495 Author: Kunihiko Hayashi Date: Tue Dec 13 17:24:44 2022 +0900 dt-bindings: soc: socionext: Add UniPhier peripheral block Add devicetree binding schema for the peripheral block implemented on Socionext Uniphier SoCs. Peripheral block implemented on Socionext UniPhier SoCs is an integrated component of the peripherals including UART, I2C/FI2C, and SCSSI. Peripheral block has some function logics to control the component. Signed-off-by: Kunihiko Hayashi Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221213082449.2721-13-hayashi.kunihiko@socionext.com Signed-off-by: Rob Herring commit ddbbb9766b85d736e5bf5ed607e0862a952691d7 Author: Kunihiko Hayashi Date: Tue Dec 13 17:24:43 2022 +0900 dt-bindings: soc: socionext: Add UniPhier SoC-glue logic debug part Add devicetree binding schema for the SoC-glue logic debug part implemented on Socionext Uniphier SoCs. This SoC-glue logic debug part is a set of miscellaneous function registers handling signals for specific devices outside system components, and also has multiple functions such as efuse, debug unit, several monitors for specific SoC, and so on. Signed-off-by: Kunihiko Hayashi Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221213082449.2721-12-hayashi.kunihiko@socionext.com Signed-off-by: Rob Herring commit 0611adff8b3a9f8e6217a643506451162726de3a Author: Kunihiko Hayashi Date: Tue Dec 13 17:24:42 2022 +0900 dt-bindings: soc: socionext: Add UniPhier SoC-glue logic Add devicetree binding schema for the SoC-glue logic implemented on Socionext Uniphier SoCs. This SoC-glue logic is a set of miscellaneous function registers handling signals for specific devices outside system components, and also has multiple functions such as I/O pinmux, usb-phy, debug, clock-mux for a specific SoC, and so on. Signed-off-by: Kunihiko Hayashi Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221213082449.2721-11-hayashi.kunihiko@socionext.com Signed-off-by: Rob Herring commit 75c7aaa66f5fdabcbaf1e6775c5f85b35b7debaa Author: Kunihiko Hayashi Date: Tue Dec 13 17:24:41 2022 +0900 dt-bindings: soc: socionext: Add UniPhier system controller Add devicetree binding schema for the system controller implemented on Socionext Uniphier SoCs. This system controller has multiple functions such as clock control, reset control, internal watchdog timer, thermal management, and so on. Signed-off-by: Kunihiko Hayashi Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221213082449.2721-10-hayashi.kunihiko@socionext.com Signed-off-by: Rob Herring commit e8c650f62787437f822bffa3c384ab1029d43ea7 Author: Kunihiko Hayashi Date: Tue Dec 13 17:24:40 2022 +0900 dt-bindings: nvmem: Fix node descriptions in uniphier-efuse example Prior to adding dt-bindings for SoC-dependent controllers, rename the parent node to the generic name in the example. And drop a parent node of the nvmem as it is not directly necessary here. Signed-off-by: Kunihiko Hayashi Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221213082449.2721-9-hayashi.kunihiko@socionext.com Signed-off-by: Rob Herring commit 4278eabebc1679709d6b1904ca960dc0b69a6c99 Author: Kunihiko Hayashi Date: Tue Dec 13 17:24:39 2022 +0900 dt-bindings: phy: Fix node descriptions in uniphier-phy example Prior to adding dt-bindings for SoC-dependent controllers, rename the phy nodes and their parent nodes to the generic names in the example. And drop parent nodes of each phy as they are not directly necessary here. Signed-off-by: Kunihiko Hayashi Acked-by: Krzysztof Kozlowski ] Link: https://lore.kernel.org/r/20221213082449.2721-8-hayashi.kunihiko@socionext.com Signed-off-by: Rob Herring commit a1e616a5fccbef72e02b68ef0f43e4e829604faf Author: Kunihiko Hayashi Date: Tue Dec 13 17:24:38 2022 +0900 dt-bindings: thermal: Fix node descriptions in uniphier-thermal example Prior to adding dt-bindings for SoC-dependent controllers, rename the thermal node and its parent node to the generic names in the example. And drop a parent node of the thermal-sensor as it is not directly necessary. Signed-off-by: Kunihiko Hayashi Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221213082449.2721-7-hayashi.kunihiko@socionext.com Signed-off-by: Rob Herring commit 8f31aa56efe6d35d5923218ca9fd5354f2c5e76d Author: Kunihiko Hayashi Date: Tue Dec 13 17:24:37 2022 +0900 dt-bindings: watchdog: Fix node descriptions in uniphier-wdt example Drop a parent node of the watchdog as it is not directly necessary. Signed-off-by: Kunihiko Hayashi Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221213082449.2721-6-hayashi.kunihiko@socionext.com Signed-off-by: Rob Herring commit d3df7f06e2a63780164aa2442ea7b639acc898bd Author: Kunihiko Hayashi Date: Tue Dec 13 17:24:36 2022 +0900 dt-bindings: regulator: Fix node descriptions in uniphier-regulator example Drop a parent node of the regulator as it is not directly necessary. Signed-off-by: Kunihiko Hayashi Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221213082449.2721-5-hayashi.kunihiko@socionext.com Signed-off-by: Rob Herring commit 3fa1306d6a7f9baddc960ef8c5b5edde6dc46e66 Author: Kunihiko Hayashi Date: Tue Dec 13 17:24:35 2022 +0900 dt-bindings: pinctrl: Fix node descriptions in uniphier-pinctrl example Drop parent node of the pinctrl as it is not directly necessary, and add more examples, that is "groups", "function", and a child node to set pin attributes, to express this pinctrl node in detail. Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/20221213082449.2721-4-hayashi.kunihiko@socionext.com Signed-off-by: Rob Herring commit 3b67e62130dfd01f520697cbe4341be145a31ae8 Author: Kunihiko Hayashi Date: Tue Dec 13 17:24:34 2022 +0900 dt-bindings: reset: Fix node descriptions in uniphier-reset example Prior to adding dt-bindings for SoC-dependent controllers, rename the reset nodes to the generic names in the example. And drop redundant examples and a parent node of the reset as it is not directly necessary. Signed-off-by: Kunihiko Hayashi Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221213082449.2721-3-hayashi.kunihiko@socionext.com Signed-off-by: Rob Herring commit e66104096a5630e75d135dc052867d32470c0bbc Author: Kunihiko Hayashi Date: Tue Dec 13 17:24:33 2022 +0900 dt-bindings: clock: Fix node descriptions in uniphier-clock example Prior to adding dt-bindings for SoC-dependent controllers, rename the clock nodes to the generic names in the example. And drop redundant examples and a parent node of the clock as it is not directly necessary. Signed-off-by: Kunihiko Hayashi Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221213082449.2721-2-hayashi.kunihiko@socionext.com Signed-off-by: Rob Herring commit bab550371cb13fe7adc4105a57d0530565740fc6 Author: Deepak R Varma Date: Mon Dec 26 17:10:48 2022 +0530 coccinelle: api/atomic_as_refcounter: include message type in output A common practice is to grep for "WARNING" or "ERROR" text in the report output from a Coccinelle semantic patch script. So, include the text "WARNING: " in the report output generated by the semantic patch for desired filtering of the output. Also improves the readability of the output. Here is an example of the old and new outputs reported: xyz_file.c:131:39-40: atomic_add_unless xyz_file.c:131:39-40: WARNING: atomic_add_unless xyz_file.c:196:6-25: atomic_dec_and_test variation before object free at line 208. xyz_file.c:196:6-25: WARNING: atomic_dec_and_test variation before object free at line 208. Signed-off-by: Deepak R Varma Acked-by: Julia Lawall commit dd5cc8072a3f285cff4f9a3869012557d547fb9d Author: Sriranjani P Date: Wed Dec 14 10:13:41 2022 +0530 dt-bindings: soc: samsung: exynos-sysreg: add dedicated SYSREG compatibles to Exynosautov9 Exynosautov9 has several different SYSREGs, so use dedicated compatibles for them and deprecate usage of generic Exynosautov9 compatible alone. Signed-off-by: Sriranjani P Acked-by: Rob Herring Reviewed-by: Chanho Park Link: https://lore.kernel.org/r/20221214044342.49766-4-sriranjani.p@samsung.com Signed-off-by: Krzysztof Kozlowski commit 0a2af7bdeeb498e68771f9bb744aac79999f5980 Author: Sriranjani P Date: Wed Dec 14 10:13:39 2022 +0530 dt-bindings: soc: samsung: exynos-sysreg: add dedicated SYSREG compatibles to Exynos850 Exynos850 has two different SYSREGs, hence add dedicated compatibles for them and deprecate usage of generic Exynos850 compatible alone. Signed-off-by: Sriranjani P Acked-by: Rob Herring Reviewed-by: Sam Protsenko Link: https://lore.kernel.org/r/20221214044342.49766-2-sriranjani.p@samsung.com Signed-off-by: Krzysztof Kozlowski commit 7e03ca7429b23105b740eb79364dc410f214848b Author: Sriranjani P Date: Tue Nov 29 17:25:30 2022 +0530 dt-bindings: soc: samsung: exynos-sysreg: Add tesla FSD sysreg compatibles Add compatible for Tesla SYSREG controllers found on FSD SoC. Signed-off-by: Sriranjani P Reviewed-by: Ravi Patel Link: https://lore.kernel.org/r/20221129115531.102932-2-sriranjani.p@samsung.com Signed-off-by: Krzysztof Kozlowski commit af7354c7c02249276ceb3011eecddd469246b2bf Author: Krzysztof Kozlowski Date: Sun Nov 27 13:32:59 2022 +0100 dt-bindings: soc: samsung: exynos-sysreg: add clocks for Exynos850 Exynos850 has dedicated clock for accessing SYSREGs. Allow it, even though Linux currently does not enable it and relies on bootloader. Reviewed-by: Rob Herring Reviewed-by: Sam Protsenko Link: https://lore.kernel.org/r/20221127123259.20339-4-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 7b35b6b8aab2fd4249fe2828f108e88e9279eadd Author: Krzysztof Kozlowski Date: Sun Nov 27 13:32:58 2022 +0100 dt-bindings: soc: samsung: exynos-sysreg: add dedicated SYSREG compatibles to Exynos5433 Exynos5433 has several different SYSREGs, so use dedicated compatibles for them and deprecate usage of generic Exynos5433 compatible alone (as it is too generic). Reviewed-by: Sam Protsenko Reviewed-by: Sriranjani P Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221127123259.20339-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit c2e322ae9f06be31ab5db1f29630f81469a37d75 Author: Krzysztof Kozlowski Date: Sun Nov 27 13:32:57 2022 +0100 dt-bindings: soc: samsung: exynos-sysreg: split from syscon Split Samsung Exynos SoC SYSREG bindings to own file to narrow the bindings and do not allow other parts of syscon.yaml. This allows further customization of Samsung SoC bindings. Acked-by: Lee Jones Reviewed-by: Sam Protsenko Reviewed-by: Alim Akhtar Reviewed-by: Sriranjani P Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20221127123259.20339-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 138d72031ec3d60edf6b382cd089a7939f73697c Author: Sriranjani P Date: Wed Dec 14 10:13:42 2022 +0530 arm64: dts: exynos: add dedicated SYSREG compatibles to Exynosautov9 Exynosautov9 has several different SYSREGs, so use dedicated compatibles for them. Signed-off-by: Sriranjani P Reviewed-by: Chanho Park Link: https://lore.kernel.org/r/20221214044342.49766-5-sriranjani.p@samsung.com Signed-off-by: Krzysztof Kozlowski commit 40a1827ea4c91c9c3cdfb8f18c78ba52da55b043 Author: Sriranjani P Date: Wed Dec 14 10:13:40 2022 +0530 arm64: dts: exynos: add dedicated SYSREG compatibles to Exynos850 Exynos850 has two different SYSREGs, so use dedicated compatibles for them. Signed-off-by: Sriranjani P Reviewed-by: Sam Protsenko Link: https://lore.kernel.org/r/20221214044342.49766-3-sriranjani.p@samsung.com Signed-off-by: Krzysztof Kozlowski commit beaf55952d46fb14387d92de280bed7985ea85e5 Author: Sriranjani P Date: Tue Nov 29 17:25:31 2022 +0530 arm64: dts: fsd: add sysreg device node Add SYSREG controller device node, which is available in PERIC, FSYS0, FSYS1 and CAM block of FSD SoC. Signed-off-by: Alim Akhtar Signed-off-by: Pankaj Dubey Signed-off-by: Sriranjani P Reviewed-by: Ravi Patel Link: https://lore.kernel.org/r/20221129115531.102932-3-sriranjani.p@samsung.com Signed-off-by: Krzysztof Kozlowski commit 0d6460bc6f4ced858bf099f198ea5b02ffcff4d7 Author: Krzysztof Kozlowski Date: Sun Dec 4 12:38:39 2022 +0100 arm64: dts: exynos: correct properties of MAX98504 in TM2 Drop unused and unsupported MAX98504 amplifier properties (maxim,rx-path and similar) and add two supplies. Link: https://lore.kernel.org/r/20221204113839.151816-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 82d865b5da8786237b0b700e31b468a20dbd5c4c Author: Krzysztof Kozlowski Date: Sun Dec 4 12:38:38 2022 +0100 arm64: dts: exynos: drop clock-frequency from CPU nodes in TM2 The CPU frequencies are determined by OPP table, so drop the 'clock-frequency' property. It is not parsed by any driver. Link: https://lore.kernel.org/r/20221204113839.151816-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 0f2d502c32d9bf3e26a9a8fc865bae945b15ecf2 Author: Krzysztof Kozlowski Date: Sun Dec 4 12:38:37 2022 +0100 arm64: dts: exynos: drop pwm-names from MAX77843 haptic in TM2 MAX77843 haptic driver does not take 'pwm-names' property: exynos5433-tm2.dtb: pmic@66: motor-driver: 'pwm-names' does not match any of the regexes: 'pinctrl-[0-9]+' Link: https://lore.kernel.org/r/20221204113839.151816-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 254b8f4b219211e1e2fb6c91edd96aa583c78720 Author: Krzysztof Kozlowski Date: Sun Dec 4 11:42:42 2022 +0100 arm64: dts: exynos: use 8-bit for SPI IR LED duty-cycle in TM2 The 'duty-cycle' of SPI IR LED property is u8: exynos/exynos5433-tm2e.dtb: irled@0: duty-cycle:0: [0, 0, 0, 60] is too long Link: https://lore.kernel.org/r/20221204104242.117558-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit c514239c4f3d0e5d0eb2be9adbd1992702647e76 Author: Krzysztof Kozlowski Date: Sun Nov 27 13:32:56 2022 +0100 arm64: dts: exynos: add dedicated SYSREG compatibles to Exynos5433 Exynos5433 has several different SYSREGs, so use dedicated compatibles for them. Reviewed-by: Sam Protsenko Reviewed-by: Alim Akhtar Reviewed-by: Sriranjani P Link: https://lore.kernel.org/r/20221127123259.20339-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 3bcb0c7a4d7e3294d8b14eaaa697c8fc1d32fa79 Author: Vivek Yadav Date: Wed Dec 7 15:36:32 2022 +0530 arm64: dts: fsd: Add MCAN device node Add MCAN device node and enable the same for FSD platform. This also adds the required pin configuration for the same. Signed-off-by: Sriranjani P Signed-off-by: Vivek Yadav Reviewed-by: Pankaj Dubey Link: https://lore.kernel.org/r/20221207100632.96200-3-vivek.2311@samsung.com Signed-off-by: Krzysztof Kozlowski commit 493dedfe297750421971c246a5bca6e1d077212a Author: Pierre Gondois Date: Wed Nov 23 10:24:45 2022 +0100 arm64: dts: fsd: Update cache properties The DeviceTree Specification v0.3 specifies that the cache node 'compatible' and 'cache-level' properties are 'required'. Cf. s3.8 Multi-level and Shared Cache Nodes The 'cache-unified' property should be present if one of the properties for unified cache is present ('cache-size', ...). Update the Device Trees accordingly. Signed-off-by: Pierre Gondois Link: https://lore.kernel.org/r/20221123092449.88097-3-pierre.gondois@arm.com Signed-off-by: Krzysztof Kozlowski commit f3de853008ade23e34d30841c1892cb1d22f4ce5 Author: Pierre Gondois Date: Wed Nov 23 10:24:44 2022 +0100 arm64: dts: exynos: Update cache properties The DeviceTree Specification v0.3 specifies that the cache node 'compatible' and 'cache-level' properties are 'required'. Cf. s3.8 Multi-level and Shared Cache Nodes The 'cache-unified' property should be present if one of the properties for unified cache is present ('cache-size', ...). Update the Device Trees accordingly. Signed-off-by: Pierre Gondois Link: https://lore.kernel.org/r/20221123092449.88097-2-pierre.gondois@arm.com Signed-off-by: Krzysztof Kozlowski commit 499e364cd2508c2115ac251f42bb47c9548cf358 Author: Tam Nguyen Date: Tue Nov 29 18:03:04 2022 +0100 soc: renesas: r8a779g0-sysc: Add missing A3DUL power domain Add the power domain structure for the A3DUL domain (PAP-Subsystem), as described in the R-Car V4H Series Hardware User's Manual Rev. 0.51 and later. Signed-off-by: Tam Nguyen [geert: Manual reference] Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/14bd8a8de16ced703ff824f6a241e89d1ead6b07.1669740926.git.geert+renesas@glider.be commit bc2d02a7c96c0a27257307850f11a6e5f09b3c66 Merge: 1b929c02afd37 0985cd52087d5 Author: Geert Uytterhoeven Date: Mon Dec 26 11:08:32 2022 +0100 Merge tag 'renesas-r8a779g0-dt-binding-defs-tag2' into renesas-drivers-for-v6.3 Renesas R-Car V4H DT Binding Definitions Missing definition for the A3DUL power domain on the Renesas R-Car V4H (R8A779G0) SoC, shared by driver and DT source files. commit 0985cd52087d55cc7a85db1cbc48bf4ad3c3b475 Author: Tam Nguyen Date: Tue Nov 29 18:03:03 2022 +0100 dt-bindings: power: r8a779g0: Add missing A3DUL power domain Add the power domain index for the A3DUL domain, as described in the R-Car V4H Series Hardware User's Manual Rev. 0.51 and later. Signed-off-by: Tam Nguyen [geert: Manual reference] Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/d61cf54b58629a76e007b9505dac7c2beb3b30db.1669740926.git.geert+renesas@glider.be commit ff1dd4a8422beebbc5df98671fcd0ad47c57b7b2 Author: Tomi Valkeinen Date: Thu Dec 1 11:56:27 2022 +0200 clk: renesas: r8a779g0: Add display related clocks Add clocks related to display which are needed to get the DSI output working. Extracted from Renesas BSP tree. Signed-off-by: Tomi Valkeinen Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20221201095631.89448-4-tomi.valkeinen+renesas@ideasonboard.com Signed-off-by: Geert Uytterhoeven commit 121d5713afeaf388bf996e20233142bd289b5f68 Author: Geert Uytterhoeven Date: Tue Nov 29 17:54:58 2022 +0100 clk: renesas: rcar-gen4: Restore PLL enum sort order When CLK_TYPE_GEN4_PLL4 was added to the rcar_gen4_clk_types enum, it was inserted at a random location. Restore sort order of the clock types referring to PLLs. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/dbd61ed19f79e9ae751fbb533d6c946e810e4359.1669740824.git.geert+renesas@glider.be commit cf919770d05a9b7d10b1609d0b66bc5db8e78a3e Author: Geert Uytterhoeven Date: Tue Nov 29 17:53:25 2022 +0100 clk: renesas: r8a779g0: Fix OSC predividers According to the table in Note 5 for the OSC clock in Table 8.1.4e ("Lists of CPG clocks generated from PLL5") of the R-Car V4H Series Hardware User's Manual Rev. 0.54, the predividers for the OSC clock are 16 resp. 32 when using a 16.66 resp. 33.33 MHz external crystal. Fixes: 0ab55cf1834177a2 ("clk: renesas: cpg-mssr: Add support for R-Car V4H") Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/dcd572acc584c237f70d2309e038f25040236a87.1669740722.git.geert+renesas@glider.be commit 868695e43b94c7ea08155fee29d57b414b7ab060 Author: Biju Das Date: Thu Nov 24 19:16:39 2022 +0000 clk: renesas: r9a09g011: Add PWM clock and reset entries Add PWM{8..14} clock and reset entries to CPG driver. The PWM IP on the RZ/V2M comes with 16 channels, but the ISP has full control of channels 0 to 7, and channel 15, therefore Linux is only allowed to use channels 8 to 14. The PWM channel 15 shares apb clock and reset with PWM{8..14}. The reset is deasserted by the bootloader/ISP. Add PWM{8..14} clocks to CPG driver and mark apb clock as critical clock, so that the apb clock will be always on. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20221124191643.3193423-2-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 3e9e6fc9c64f7b9b777c5b2c2e2c9a1326065137 Author: Lad Prabhakar Date: Fri Nov 18 13:57:15 2022 +0000 riscv: dts: renesas: rzfive-smarc-som: Enable WDT Enable WDT node on RZ/Five SMARC SoM. Note, WDT block is enabled in RZ/G2UL SMARC SoM DTSI [0] hence deleting the disabled node from RZ/Five SMARC SoM DTSI enables it here too as we include [0] in RZ/Five SMARC SoM DTSI. [0] arch/arm64/boot/dts/renesas/rzg2ul-smarc-som.dtsi Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20221118135715.14410-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 7d106cb32a498fb40d1362b959638f2b3d413b7f Author: Biju Das Date: Tue Nov 22 18:48:54 2022 +0000 arm64: defconfig: Enable Renesas RZ/G2L MIPI DSI driver Enable MIPI DSI driver support for Renesas RZ/G2L based platforms. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20221122184854.1820126-1-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit b251c0e7ea5ddfab21495c36cd3c3fa90c36f104 Author: Tzung-Bi Shih Date: Mon Dec 5 14:10:42 2022 +0800 platform/chrome: use sysfs_emit_at() instead of scnprintf() Follow the advice in Documentation/filesystems/sysfs.rst: show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20221205061042.1774769-1-tzungbi@kernel.org commit 55398beb0846a9eca38db5250c9e7b3e59d407ca Author: Takahiro Kuwano Date: Mon Dec 26 13:02:00 2022 +0900 mtd: spi-nor: sfdp: Use SFDP_DWORD() macro for optional parameter tables Change 0-based indexing values of parameter tables to 1-based ones by SFDP_DWORD() macro. Suggested-by: Tudor Ambarus Signed-off-by: Takahiro Kuwano Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/48cb008b40fdef4bf7f87e37029efaa2bfefa9ef.1672026365.git.Takahiro.Kuwano@infineon.com commit 86d4cdf88c81778bb4cd5c4bd7f8a6c64e69491f Author: Takahiro Kuwano Date: Mon Dec 26 13:01:59 2022 +0900 mtd: spi-nor: sfdp: Rename BFPT_DWORD() macro to SFDP_DWORD() BFPT_DWORD() converts 1-based indexing to 0-based indexing for C arrays, and is used in BFPT parse. Per JESD216F.02, the conversion is applicable to other parameter tables than BFPT. This patch renames the macro to SFDP_DWORD() so that we can use it for other parameter tables than BFPT. Suggested-by: Tudor Ambarus Signed-off-by: Takahiro Kuwano Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/e42feac840fe3a31187419e91b2d514d9f259d15.1672026365.git.Takahiro.Kuwano@infineon.com commit ad9679f3811899fd1c21dc7bdd715e8e1cfb46b9 Author: Takahiro Kuwano Date: Mon Dec 26 13:01:58 2022 +0900 mtd: spi-nor: sfdp: Fix index value for SCCR dwords Array index for SCCR 22th DOWRD should be 21. Fixes: 981a8d60e01f ("mtd: spi-nor: Parse SFDP SCCR Map") Signed-off-by: Takahiro Kuwano Signed-off-by: Tudor Ambarus Reviewed-by: Michael Walle Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/d8a2a77c2c95cf776e7dcae6392d29fdcf5d6307.1672026365.git.Takahiro.Kuwano@infineon.com commit ba73e369b706a853cdafa60570854fecec9f9fdd Author: Borislav Petkov Date: Mon Dec 19 22:06:56 2022 +0100 x86/microcode/AMD: Handle multiple glued containers properly It can happen that - especially during testing - the microcode blobs of all families are all glued together in the initrd. The current code doesn't check whether the current container matched a microcode patch and continues to the next one, which leads to save_microcode_in_initrd_amd() to look at the next and thus wrong one: microcode: parse_container: ucode: 0xffff88807e9d9082 microcode: verify_patch: buf: 0xffff88807e9d90ce, buf_size: 26428 microcode: verify_patch: proc_id: 0x8082, patch_fam: 0x17, this family: 0x17 microcode: verify_patch: buf: 0xffff88807e9d9d56, buf_size: 23220 microcode: verify_patch: proc_id: 0x8012, patch_fam: 0x17, this family: 0x17 microcode: parse_container: MATCH: eq_id: 0x8012, patch proc_rev_id: 0x8012 <-- matching patch found microcode: verify_patch: buf: 0xffff88807e9da9de, buf_size: 20012 microcode: verify_patch: proc_id: 0x8310, patch_fam: 0x17, this family: 0x17 microcode: verify_patch: buf: 0xffff88807e9db666, buf_size: 16804 microcode: Invalid type field (0x414d44) in container file section header. microcode: Patch section fail <-- checking chokes on the microcode magic value of the next container. microcode: parse_container: saving container 0xffff88807e9d9082 microcode: save_microcode_in_initrd_amd: scanned containers, data: 0xffff88807e9d9082, size: 9700a and now if there's a next (and last container) it'll use that in save_microcode_in_initrd_amd() and not find a proper patch, ofc. Fix that by moving the out: label up, before the desc->mc check which jots down the pointer of the matching patch and is used to signal to the caller that it has found a matching patch in the current container. Signed-off-by: Borislav Petkov Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20221219210656.5140-2-bp@alien8.de commit 61de9b7036f26448a1916291c456f62dd6bf07ea Author: Borislav Petkov Date: Mon Dec 19 22:06:55 2022 +0100 x86/microcode/AMD: Rename a couple of functions - Rename apply_microcode_early_amd() to early_apply_microcode(): simplify the name so that it is clear what it does and when does it do it. - Rename __load_ucode_amd() to find_blobs_in_containers(): the new name actually explains what it does. Document some. No functional changes. Signed-off-by: Borislav Petkov Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20221219210656.5140-1-bp@alien8.de commit 256b734efc7494eb3c45f3ff5abd632ff0afde03 Author: ye xingchen Date: Fri Dec 2 16:56:04 2022 +0800 platform/chrome: use sysfs_emit() instead of scnprintf() Follow the advice in Documentation/filesystems/sysfs.rst: show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: ye xingchen Link: https://lore.kernel.org/r/202212021656040995199@zte.com.cn [tzungbi: fixed the commit message.] Signed-off-by: Tzung-Bi Shih commit e5f0dfa78ac77374a3f0817bf427a22f61494246 Author: Vijaya Krishna Nivarthi Date: Thu Dec 8 19:55:44 2022 +0530 spi: spi-geni-qcom: Add support for SE DMA mode SE DMA mode can be used for larger transfers and FIFO mode for smaller transfers. Signed-off-by: Vijaya Krishna Nivarthi Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/1670509544-15977-1-git-send-email-quic_vnivarth@quicinc.com Signed-off-by: Mark Brown commit cfbe9dfd664c7717ef297e01b7eecccc2b5fde6f Author: Wadim Egorov Date: Wed Dec 14 16:34:09 2022 +0100 regulator: tps65219: Report regulator name if devm_regulator_register fails Make the error message more useful by reporting the actual regulator name if devm_regulator_register() fails. Signed-off-by: Wadim Egorov Link: https://lore.kernel.org/r/20221214153409.1270213-1-w.egorov@phytec.de Signed-off-by: Mark Brown commit 413ec72963fc297f419a3d5f931bb43921969749 Author: Paul Cercueil Date: Wed Dec 14 16:51:52 2022 +0100 regulator: dt-bindings: Convert active-semi PMIC docs to YAML schemas Create YAML bindings for the Active-semi PMICs and remove the old text files. The bindings aren't perfect, for instance I couldn't find good descriptions for the vendor properties in the "charger" node of the ACT8945A because I am not familiar with the hardware and these properties were not documented anywhere. The YAML schemas are a bit different than what is described in the old text files, because these were sometimes wrong or had missing information. This is the case for the ACT8600 documentation, which specified the valid node names for the regulators, while the driver was expecting different names. This led to the current situation where we have two different boards using different names for the regulators: - arch/mips/boot/dts/ingenic/ci20.dts uses the names documented in the text file, - arch/mips/boot/dts/ingenic/gcw0.dts uses the names that the driver expects. In theory, the driver should be fixed to follow the documentation, and accept both naming schemes. In practice though, when the PMIC node was added to the ci20.dts board file, the names were already wrong in regards to what the driver expected, so it never really worked correctly and wasn't tested properly. Furthermore, in that board the consumers of the regulators aren't working for various other reasons (invalid GPIOs, etc.). For that reason, for the ACT8600 bindings I decided to only use the node names that the driver expects (and that gcw0.dts uses), instead of accepting both old and new names. A follow-up patch will update the CI20 board to use the new regulator names. Signed-off-by: Paul Cercueil Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221214155152.14349-1-paul@crapouillou.net Signed-off-by: Mark Brown commit 966ef755d3b66853be4f15c698f5210115c15d23 Author: Vijendar Mukunda Date: Wed Dec 21 22:58:51 2022 +0530 ASoC: amd: ps: move irq handler registration Move irq handler registration prior to platform device creation logic. This will avoid irq handling missing scenario when platform device raise interrrupts during it's probe sequence. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20221221172855.1618766-4-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 9d327a4443bffe8d48acc6a31c0198f251fca08b Author: Vijendar Mukunda Date: Wed Dec 21 22:58:50 2022 +0530 ASoC: amd: ps: update dev index value in irq handler Instead of using hard coded index value for platform device index, retrieve the device index based on platform devices created. In PDM config case, ACP PCI driver retrieves dev index from pdm_dev_index variable. This will avoid overhead when multiple endpoint combinations support is added later. platform device index will vary based on audio endpoint configuration. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20221221172855.1618766-3-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 1d325cdaf7a2747df42b43eed8b3de2e2d6c69bb Author: Vijendar Mukunda Date: Wed Dec 21 22:58:49 2022 +0530 ASoC: amd: ps: refactor platform device creation logic Refactor platform device creation implementation. Based on platform dev count and pdev mask create platform devices. Use common API to fill platform dev information. Use pdev count variable in remove callback for unregistering platform devices. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20221221172855.1618766-2-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 2cdabbde0c24bb76978d57856cba958b85584c32 Author: Vijendar Mukunda Date: Wed Dec 21 22:58:48 2022 +0530 ASoC: amd: ps: implement api to retrieve acp device config Implement API to retrieve acp device config and calculate platform device count and dev mask for platform device node creation. Currently for DMIC configuration, mask and dev count are calculated. Same api will be used to extend support for different ACP device configurations. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20221221172855.1618766-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit c71f5fa07202849dc7b2f00980833b8752484601 Author: Uwe Kleine-König Date: Mon Dec 12 18:47:37 2022 +0100 ASoC: pxa: 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 Link: https://lore.kernel.org/r/20221212174737.3740223-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit d8510532ccf3bc12e2b1c0c285d4b61d4b713e1a Author: Ondrej Jirman Date: Fri Dec 9 10:56:21 2022 +0000 ASoC: rt5640: Allow to describe how LOUT is wired Depending on HW design, som boards may expect mono differential output on LOUT. Describe a property that enables it. Signed-off-by: Ondrej Jirman Signed-off-by: Jarrah Gosbell Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221209105621.39237-2-kernel@undef.tools Signed-off-by: Mark Brown commit 44b54f54b41d36e8a2302a2c18a65268751c9067 Author: Ondrej Jirman Date: Fri Dec 9 10:56:20 2022 +0000 ASoC: rt5640: Allow configuration of LOUT to mono differential mode LOUT output can produce either single-ended stereo signals, or mono differential signal. Some applications are wired to use LOUT in mono differential mode. Allow to configure it via device property. Signed-off-by: Ondrej Jirman Signed-off-by: Jarrah Gosbell Link: https://lore.kernel.org/r/20221209105621.39237-1-kernel@undef.tools Signed-off-by: Mark Brown commit a5c26ee572d94337baf9c944b7b4881a2db62d37 Author: Lukasz Majewski Date: Fri Dec 16 10:46:24 2022 +0100 ASoC: wm8940: Read chip ID when wm8940 codec probing The wm8940 provides the chip ID information via I2C. In this patch this information is read and if not matching expected value, the probe function is aborted. This prevents from using (i.e. inserting) other wm89* modules which use the same I2C bus address. Signed-off-by: Lukasz Majewski Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20221216094624.3849278-3-lukma@denx.de Signed-off-by: Mark Brown commit 294833fc9eb4e9d6c69f8d158cd991d641e59908 Author: Lukasz Majewski Date: Fri Dec 16 10:46:23 2022 +0100 ASoC: wm8940: Rewrite code to set proper clocks This patch enables support for internal wm8940's PLL and proper divider to set proper value for 256x fs clock. This approach is more flexible and replaces hardcoded clock values and makes the codec work with the simple-card driver. Card drivers calling set_pll() and set_clkdiv() directly are unaffected. For the reference - code in this commit is based on: 51b2bb3f2568e6d9d81a001d38b8d70c2ba4af99 ("ASoC: wm8974: configure pll and mclk divider automatically") Signed-off-by: Lukasz Majewski Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20221216094624.3849278-2-lukma@denx.de Signed-off-by: Mark Brown commit 5dc5e76b4c41fc8cdd9ed77653b2ce453974fb30 Author: Lukasz Majewski Date: Fri Dec 16 10:46:22 2022 +0100 ASoC: wm8940: Remove warning when no plat data present The lack of platform data in the contemporary Linux shall not be the reason to display warnings to the kernel logs. Signed-off-by: Lukasz Majewski Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20221216094624.3849278-1-lukma@denx.de Signed-off-by: Mark Brown commit b5ba646142195d63dd1aae69bc15457fca5aeb78 Author: V sujith kumar Reddy Date: Tue Dec 13 12:46:37 2022 +0530 ASoC: SOF: amd: Enable cache for AMD Rembrandt platform Enable DSP cache for ACP memory Signed-off-by: V sujith kumar Reddy Link: https://lore.kernel.org/r/20221213071640.3038853-1-Vsujithkumar.Reddy@amd.com Signed-off-by: Mark Brown commit c89e652e84f636354213aae42490c7f77a0eadde Author: David Rau Date: Wed Dec 14 04:40:58 2022 +0000 ASoC: da7213: Add support for mono, set frame width to 32 when possible This adds the DAI mono mode support and set the frame width to 32 Signed-off-by: Piotr Wojtaszczyk Tested-by: David Rau Signed-off-by: David Rau Link: https://lore.kernel.org/r/20221214044058.6289-1-David.Rau.opensource@dm.renesas.com Signed-off-by: Mark Brown commit 3f58ff6b53c11773b1bd564082fae37d48e0cc40 Author: YC Hung Date: Thu Dec 15 14:10:46 2022 +0800 ASoC: SOF: mediatek: mt8195: remove a redundant comparison of sram DSP SRAM is not used for audio shared buffer between host and DSP so TOTAL_SIZE_SHARED_SRAM_FROM_TAIL is zero. Remove the definition and redundant comparison to fix coverity "unsigned compared against 0". Signed-off-by: YC Hung Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221215061046.16934-1-yc.hung@mediatek.com Signed-off-by: Mark Brown commit 8a0eb06e0c9a613fce989e9d94de3f290b81e356 Author: Seppo Ingalsuo Date: Fri Dec 16 13:53:50 2022 +0200 ASoC: SOF: IPC3 topology: Print the conflicting bytes sizes The error "Conflict in bytes vs. priv size." is too brief. With the printed sizes it's a lot easier to find the size issue in for binary control if such happens. Signed-off-by: Seppo Ingalsuo Reviewed-by: Daniel Baluta Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20221216115350.28260-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit b66cd83547dabc0ba582e2de716c20c810a21124 Author: Jai Luthra Date: Wed Dec 21 20:22:16 2022 +0530 dt-bindings: sound: tlv320aic3x: Convert to dtschema Convert bindings for TI's TLV320AIC3x audio codecs to dtschema. The following properties are still found in some old dts files, but will be ignored by the driver: - adc-settle-ms - port Signed-off-by: Jai Luthra Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221221145216.11400-1-j-luthra@ti.com Signed-off-by: Mark Brown commit b2f7b9320537affe44efbb0a1e0aaff05974ad8b Author: Peter Ujfalusi Date: Fri Dec 16 13:54:35 2022 +0200 ASoC: SOF: core: Print out the value of sof_debug if it is set The sof_debug value is set by the user, developer intentionally. To save time on figuring out what value has been passed to the kernel by the user, developer, print it out if it is not 0. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Daniel Baluta Link: https://lore.kernel.org/r/20221216115435.28427-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 3bc351aa97e5c4b346c7223749d057ce0c372195 Author: Krzysztof Kozlowski Date: Fri Dec 9 18:59:46 2022 +0100 ASoC: dt-bindings: adi,adau7002: Convert to DT schema Convert the Analog Devices ADAU7002 Stereo PDM-to-I2S/TDM Converter bindings to DT schema. During the conversion, add properties already used by DTS (sc7180-trogdor-coachz.dts) and Linux driver: 1. wakeup-delay-ms, 2. sound-dai-cells (via referencing dai-common.yaml). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221209175947.335319-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 51ea51b18904cd1a0fb244ce41dfd903c2ada628 Author: Shuming Fan Date: Fri Dec 23 13:58:46 2022 +0800 ASoC: rt711-sdca: add jack detection mode for JD2 100K This patch adds another jack detection mode for JD2 with an external resistor of 100k. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20221223055846.3285-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 24c86c8a3bb1bd12aa8bc32933df7394b83233dc Author: Claudiu Beznea Date: Tue Dec 13 13:28:51 2022 +0200 ASoC: mchp-spdiftx: use FIELD_PREP() where possible Use FIELD_PREP() in macro definitions. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221213112851.89212-5-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit 404c61c47d84bf1662e9d698e4f0c42898893c59 Author: Claudiu Beznea Date: Tue Dec 13 13:28:50 2022 +0200 ASoC: mchp-pdmc: add support for suspend to RAM Add support for suspend to RAM by re-aranging the lines in switch..case from mchp_pdmc_trigger() and saving/restoring the enabled interrupts. These are necessary as AT91 devices has a special power saving mode (called backup and self-refresh) where most of the SoC parts are powered off and thus we need to reconfigure the PDMC on resume. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221213112851.89212-4-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit e8c8e9de4ee3e9e1231b4f179c3f0e340bc2b1cf Author: Claudiu Beznea Date: Tue Dec 13 13:28:49 2022 +0200 ASoC: mchp-pdmc: use runtime pm for clock power saving Implement clock power saving taking advantage of runtime PM infrastructure. This simplifies the code and allow using the same infrastructure for suspend to RAM functionalities. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20221213112851.89212-3-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit cfec019399f6a90ae7b73b0edff053d10ba1ad25 Author: Claudiu Beznea Date: Tue Dec 13 13:28:48 2022 +0200 ASoC: dt-bindings: microchip: use proper naming syntax Use the following syntax for Microchip ASoC YAML files: vendor,device.yaml Signed-off-by: Claudiu Beznea Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20221213112851.89212-2-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit 29d6523698f68011eda67619faa6358a46952e96 Author: Amadeusz Sławiński Date: Wed Dec 14 19:55:00 2022 +0100 ASoC: Intel: avs: Peakvol module configuration Handle creation of peakvol module in FW. When peakvol module is created it retrieves actual value from kcontrol and sends it to FW as part of configuration data. Co-authored-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20221214185500.3896902-5-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit be2b81b519d7121290cfecc5fdfb4907ecc41c39 Author: Amadeusz Sławiński Date: Wed Dec 14 19:54:59 2022 +0100 ASoC: Intel: avs: Parse control tuples Add callback to handle loading of kcontrol and linking it to active widget. In order to link kcontrol to specific modules add additional field to module data, as well as specify control id in kcontrol data. Co-authored-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20221214185500.3896902-4-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 585b9427edd65ad124e23affb80fca3d15a6375d Author: Amadeusz Sławiński Date: Wed Dec 14 19:54:58 2022 +0100 ASoC: Intel: avs: Add control volume operations To make introduced peakvol module useful from userspace perspective, expose ALSA controls allowing DSP volume modification. These provide even more granular control over volume but are also the only way to modify volume for devices devoid of codec kcontrols e.g.: DMIC. Co-authored-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20221214185500.3896902-3-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 905ea24f0f17d826e6b90ece706bfefde3d7b2e5 Author: Amadeusz Sławiński Date: Wed Dec 14 19:54:57 2022 +0100 ASoC: Intel: avs: Add peakvol runtime-parameter requests Peakvol module allows for setting and obtaining DSP volume as well as modifying shape and duration at which volume actually changes. Add IPC messages to expose those capabilities. Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20221214185500.3896902-2-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 603d96c917b2e8c2146069bf7db1468fd87f800b Author: Uwe Kleine-König Date: Mon Dec 12 21:54:06 2022 +0100 ASoC: SOF: nocodec: 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: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221212205406.3771071-16-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 394296eee2c220283ebc835db61ba4531f865558 Author: Uwe Kleine-König Date: Mon Dec 12 21:54:05 2022 +0100 ASoC: pxa: e800_wm9712: 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 Link: https://lore.kernel.org/r/20221212205406.3771071-15-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 4ed923e8076b8728c1c1cf587b79a83e34de22b0 Author: Uwe Kleine-König Date: Mon Dec 12 21:54:04 2022 +0100 ASoC: pxa: e750_wm9705: 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 Link: https://lore.kernel.org/r/20221212205406.3771071-14-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit f2211ac36ab0b175cca7a244560923fbeeb6c7ae Author: Uwe Kleine-König Date: Mon Dec 12 21:54:03 2022 +0100 ASoC: pxa: e740_wm9705: 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 Link: https://lore.kernel.org/r/20221212205406.3771071-13-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit d09751b3523eb0d6bea345bda99b2f5417feb2ff Author: Uwe Kleine-König Date: Mon Dec 12 21:54:02 2022 +0100 ASoC: wl1273: 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 Link: https://lore.kernel.org/r/20221212205406.3771071-12-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 140212aefce754f230a28751415c71705f7e3ffa Author: Uwe Kleine-König Date: Mon Dec 12 21:54:01 2022 +0100 ASoC: mc13783: 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 Link: https://lore.kernel.org/r/20221212205406.3771071-11-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 61f62f1fcf7e4a3cb347d2d4c9696dd725c922f0 Author: Uwe Kleine-König Date: Mon Dec 12 21:54:00 2022 +0100 ASoC: cq93vc: 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 Link: https://lore.kernel.org/r/20221212205406.3771071-10-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit f9cc66890fb8d695e38486595851701dbfa22487 Author: Uwe Kleine-König Date: Mon Dec 12 21:53:59 2022 +0100 ASoC: bt-sco: 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 Link: https://lore.kernel.org/r/20221212205406.3771071-9-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 06e8ce87356e7751ffea831396f8b3129a805d28 Author: Uwe Kleine-König Date: Mon Dec 12 21:53:58 2022 +0100 ASoC: adau7002: 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 Link: https://lore.kernel.org/r/20221212205406.3771071-8-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 7de12b06eeb2fbe3732e96ae40e38159700f61ec Author: Uwe Kleine-König Date: Mon Dec 12 21:53:57 2022 +0100 ASoC: ac97: 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 Link: https://lore.kernel.org/r/20221212205406.3771071-7-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 9fbfe1d1acf596b5ba9ddbb145c7be6a09b2f1eb Author: Uwe Kleine-König Date: Mon Dec 12 21:53:56 2022 +0100 ASoC: 88pm860x: 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 Link: https://lore.kernel.org/r/20221212205406.3771071-6-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit edf2ceb9a2a279d350fdb57c1930554c8675b2b1 Author: Uwe Kleine-König Date: Mon Dec 12 21:53:55 2022 +0100 ASoC: atmel-pdmic: 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: Claudiu Beznea Link: https://lore.kernel.org/r/20221212205406.3771071-5-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 9d5664fdf6a89e66f806763d76f18337ab3cb18a Author: Uwe Kleine-König Date: Mon Dec 12 21:53:54 2022 +0100 ASoC: atmel-classd: 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: Claudiu Beznea Link: https://lore.kernel.org/r/20221212205406.3771071-4-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 001c6df098834eb5eaa36a2b121bd6a675b38aa9 Author: Uwe Kleine-König Date: Mon Dec 12 21:53:53 2022 +0100 ASoC: amd: 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 Link: https://lore.kernel.org/r/20221212205406.3771071-3-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit e812aa458acf7c47f9f5d8e6c62177317a998263 Author: Uwe Kleine-König Date: Mon Dec 12 21:53:52 2022 +0100 ASoC: pxa: 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 Link: https://lore.kernel.org/r/20221212205406.3771071-2-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 8a33863a0e287b17a5c637f231f31ff631348f8f Author: Peter Ujfalusi Date: Wed Dec 21 12:23:28 2022 +0200 ASoC: SOF: trace: No need to check for op pointer in sof_fw_trace_free() If the sdev->fw_trace_is_supported is true then we must have the fw_tracing ops set, no need to check again. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20221221102328.9635-12-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 8419fd90ee5c9038cb2776fad71fcc9b93f78e11 Author: Peter Ujfalusi Date: Wed Dec 21 12:23:27 2022 +0200 ASoC: SOF: trace: Use sof_ipc_get_ops() in sof_fw_trace_init For the sake of safety use the sof_ipc_get_ops() to fetch the fw_tracing ops to avoid cases when either sdev->ipc or sdev->ipc->ops might be NULL. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20221221102328.9635-11-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 1cf79c3484250d67180525662a247f8fecab3cea Author: Peter Ujfalusi Date: Wed Dec 21 12:23:26 2022 +0200 ASoC: SOF: sof-priv: Mark fw_tracing ops optional in documentation The code treats the fw_tracing as optional feature but the documentation was not reflecting this. Correct it by explicitly stating that the fw_tracing is optional. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20221221102328.9635-10-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 510758ee926a30b09b0692d1d42501847ab8b058 Author: Peter Ujfalusi Date: Wed Dec 21 12:23:25 2022 +0200 ASoC: SOF: pm: Extend the optionality of IPC ops to IPC as well The IPC ops are optional, but they require that the ops struct is to be allocated with all callbacks set to NULL. Update the code to extend the optionality to: sdev->ipc == NULL sdev->ipc->ops == NULL sdev->ipc->ops->[pm/tplg] == NULL (treated optional for pm currently) sdev->ipc->ops->[pm/tplg]->ops == NULL (treated optional currently) Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20221221102328.9635-9-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit dbdbf88bdd4f29b391041ef887f89f7ae0809971 Author: Peter Ujfalusi Date: Wed Dec 21 12:23:24 2022 +0200 ASoC: SOF: topology: Extend the optionality of IPC ops to IPC as well The IPC ops are optional, but they require that the ops struct is to be allocated with all callbacks set to NULL. Update the code to extend the optionality to: sdev->ipc == NULL sdev->ipc->ops == NULL sdev->ipc->ops->[tplg] == NULL sdev->ipc->ops->[tplg]->ops == NULL (treated optional currently) At the same time standardize the naming of the ops pointer to tplg_ops Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20221221102328.9635-8-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit cd6afb060c5a3cfad7582d5e09d43fd16a5202e5 Author: Peter Ujfalusi Date: Wed Dec 21 12:23:23 2022 +0200 ASoC: SOF: sof-audio: Extend the optionality of IPC ops to IPC as well The IPC ops are optional, but they require that the ops struct is to be allocated with all callbacks set to NULL. Update the code to extend the optionality to: sdev->ipc == NULL sdev->ipc->ops == NULL sdev->ipc->ops->[ops_group] == NULL sdev->ipc->ops->[pcmops_group]->ops == NULL (treated optional currently) Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20221221102328.9635-7-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit cfa12c3679b49d8758b94c778afa6a71abf19989 Author: Peter Ujfalusi Date: Wed Dec 21 12:23:22 2022 +0200 ASoC: SOF: control: Extend the optionality of IPC ops to IPC as well The IPC ops are optional, but they require that the ops struct is to be allocated with all callbacks set to NULL. Update the code to extend the optionality to: sdev->ipc == NULL sdev->ipc->ops == NULL sdev->ipc->ops->[tplg] == NULL sdev->ipc->ops->[tplg]->control == NULL sdev->ipc->ops->[tplg]->control->ops == NULL (treated optional currently) Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20221221102328.9635-6-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 148dd6a264900fe12c2b3d96efc40511dba177fc Author: Peter Ujfalusi Date: Wed Dec 21 12:23:21 2022 +0200 ASoC: SOF: pcm: Extend the optionality of IPC ops to IPC as well The IPC ops are optional, but they require that the ops struct is to be allocated with all callbacks set to NULL. Update the code to extend the optionality to: sdev->ipc == NULL sdev->ipc->ops == NULL sdev->ipc->ops->[pcm] == NULL sdev->ipc->ops->[pcm]->ops == NULL (treated optional currently) Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20221221102328.9635-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit caf0f4662e07fcc721d1c85af82aa8a7d57621f3 Author: Peter Ujfalusi Date: Wed Dec 21 12:23:20 2022 +0200 ASoC: SOF: Add helper macro to be used to get an IPC ops In preparation to a case when the DSP is not used. In this case the IPC communication itself has no meaning and we might not even have sdev->ipc allocated at all. The sof_ipc_get_ops() macro can be used to get a named IPC ops struct or return NULL if the sdev->ipc is not allocated. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20221221102328.9635-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 7cbb15593223e1fa56717fd33222c9a804162d70 Author: Peter Ujfalusi Date: Wed Dec 21 12:23:19 2022 +0200 ASoC: SOF: sof-audio: Update documentation for sof_ipc_tplg_ops The core treats all function pointer in sof_ipc_tplg_ops as optional. Update the documentation to reflect this. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20221221102328.9635-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 5315411729b188a8d39252a8c4b9bbdbc3ba6d92 Author: Peter Ujfalusi Date: Wed Dec 21 12:23:18 2022 +0200 ASoC: SOF: sof-audio: Treat tplg_ops->route_setup() as optional Other topology ops have been treated as optional, including the route_free. Handle the route_setup in a conforming way as optional callback. Note: we do not have checks for the callbacks itself which makes them all optional in practice. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20221221102328.9635-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit be3ad78dfed2af3c293e01f3c5f13ee1af3395c3 Author: Stanislav Lisovskiy Date: Tue Dec 20 18:29:26 2022 +0200 drm/i915/mtl: Add support of Tile4 to MTL We have some Tile4 tests now skipping, which were supposed to be working. So lets make them work, by adding display_ver 14 as supported. v2: - Remove "14" for Tile 4 CCS formats, as they seem to be not supported by MTL(Juha-Pekka Heikkila) - For generic Tile 4, the opposite - lets use -1 in order to make sure all the next gens support it by default(Juha-Pekka Heikkila) Signed-off-by: Stanislav Lisovskiy Reviewed-by: Juha-Pekka Heikkila Link: https://patchwork.freedesktop.org/patch/msgid/20221220162926.22805-1-stanislav.lisovskiy@intel.com commit 084aab04cc60e5eab32287d0483c33e12c92da87 Author: Jouni Högander Date: Thu Dec 1 09:23:08 2022 +0200 drm/i915/psr: Add continuous full frame bit together with single Currently we are observing occasionally display flickering or complete freeze. This is narrowed down to be caused by single full frame update (SFF). SFF bit after it's written gets cleared by HW in subsequent vblank i.e. when the update is sent to the panel. SFF bit is required to be written together with partial frame update (PFU) bit. After the SFF bit gets cleared by the HW psr2 man trk ctl register still contains PFU bit. If there is subsequent update for any reason we will end up having selective update/fetch configuration where start line is 0 and end line is 0. Also selective fetch configuration for the planes is not properly performed. This seems to be causing problems with some panels. Using CFF without SFF doesn't work either because it may happen that psr2 man track ctl register is overwritten by next update before vblank triggers sending the update. This is causing problems to psr_invalidate/flush. Using CFF and SFF together solves the problems as SFF is cleared only by HW in subsequent vblank and the update gets sent. Fix the flickering/freeze issue by keeping CFF bit as set when PSR2 is enabled unless there is a properly configured selective update via atomic commit. v2: - Improve commit message and comments - No functional changes This is also workaround for HSD 14014971508 Cc: Ville Syrjälä Cc: José Roberto de Souza Cc: Mika Kahola Reported-by: Lee Shawn C Signed-off-by: Jouni Högander Tested-by: Lee Shawn C Signed-off-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20221201072308.1905679-1-jouni.hogander@intel.com commit 4071d98b296a5bc5fd4b15ec651bd05800ec9510 Author: John Harrison Date: Wed Dec 21 11:30:31 2022 -0800 drm/i915/uc: Fix two issues with over-size firmware files In the case where a firmware file is too large (e.g. someone downloaded a web page ASCII dump from github...), the firmware object is released but the pointer is not zerod. If no other firmware file was found then release would be called again leading to a double kfree. Also, the size check was only being applied to the initial firmware load not any of the subsequent attempts. So move the check into a wrapper that is used for all loads. Fixes: 016241168dc5 ("drm/i915/uc: use different ggtt pin offsets for uc loads") Signed-off-by: John Harrison Reviewed-by: Daniele Ceraolo Spurio Cc: Alan Previn Cc: Rodrigo Vivi Cc: Matt Roper Cc: Jani Nikula Cc: Matthew Auld Cc: "Thomas Hellström" Link: https://patchwork.freedesktop.org/patch/msgid/20221221193031.687266-4-John.C.Harrison@Intel.com commit d830e0dc2e2d4826ebc6a429c2bc098848c9eeda Author: John Harrison Date: Wed Dec 21 11:30:30 2022 -0800 drm/i915/guc: Fix a static analysis warning A static analyser was complaining about not checking for null pointers. However, the location of the complaint can only be reached in the first place if said pointer is non-null. Basically, if we are using a v69 GuC then the descriptor pool is guaranteed to be alocated at start of day or submission will be disabled with an ENOMEM error. And if we are using a later GuC that does not use a descriptor pool then the v69 submission function would not be called. So, not a possible null at that point in the code. Hence adding a GEM_BUG_ON(!ptr) to keep the tool happy. Signed-off-by: John Harrison Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20221221193031.687266-3-John.C.Harrison@Intel.com commit 941aae3263153cea91cb306cc889951486e16634 Author: Maíra Canal Date: Mon Dec 19 09:06:21 2022 -0300 drm/todo: update the debugfs clean up task The structs drm_debugfs_info and drm_debugfs_entry introduced a new debugfs structure to DRM, centered on drm_device instead of drm_minor. Therefore, remove the tasks related to create a new device-centered debugfs structure and add a new task to replace the use of drm_debugfs_create_files() for the use of drm_debugfs_add_file() and drm_debugfs_add_files(). Signed-off-by: Maíra Canal Reviewed-by: Melissa Wen Acked-by: Daniel Vetter Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20221219120621.15086-8-mcanal@igalia.com commit 03d2673bb7579ecb779092d37410c9299e622cb8 Author: Maíra Canal Date: Mon Dec 19 09:06:20 2022 -0300 drm/vkms: use new debugfs device-centered functions Replace the use of drm_debugfs_create_files() with the new drm_debugfs_add_files() function, which centers the debugfs files management on the drm_device instead of drm_minor. Moreover, remove the debugfs_init hook and add the debugfs files directly on vkms_create(), before drm_dev_register(). Signed-off-by: Maíra Canal Reviewed-by: Melissa Wen Acked-by: Daniel Vetter Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20221219120621.15086-7-mcanal@igalia.com commit c0dda238e2640eb8897e8ab7cca25b2f1d11ea08 Author: Maíra Canal Date: Mon Dec 19 09:06:19 2022 -0300 drm/v3d: use new debugfs device-centered functions Replace the use of drm_debugfs_create_files() with the new drm_debugfs_add_files() function, which centers the debugfs files management on the drm_device instead of drm_minor. Signed-off-by: Maíra Canal Reviewed-by: Melissa Wen Acked-by: Daniel Vetter Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20221219120621.15086-6-mcanal@igalia.com commit f2ede40e46e8cc64fcdac36c6942b42b21ef74ec Author: Maíra Canal Date: Mon Dec 19 09:06:18 2022 -0300 drm/vc4: use new debugfs device-centered functions Currently, vc4 has its own debugfs infrastructure that adds the debugfs files on drm_dev_register(). With the introduction of the new debugfs, functions, replace the vc4 debugfs structure with the DRM debugfs device-centered function, drm_debugfs_add_file(). Moreover, remove the explicit error handling of debugfs related functions, considering that the only failure mode is -ENOMEM and also that error handling is not recommended for debugfs functions, as pointed out in [1]. [1] https://lore.kernel.org/all/YWAmZdRwnAt6wh9B@kroah.com/ Signed-off-by: Maíra Canal Reviewed-by: Maxime Ripard Reviewed-by: Melissa Wen Acked-by: Daniel Vetter Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20221219120621.15086-5-mcanal@igalia.com commit dbb23cf57178e1852b53eb544046eb06e3db9b4e Author: Maíra Canal Date: Mon Dec 19 09:06:17 2022 -0300 drm/debugfs: create debugfs late register functions Although the device-centered debugfs functions can track requests for the addition of DRM debugfs files at any time and have them added all at once during drm_dev_register(), they are not able to create debugfs files for modeset components, as they are registered after the primary and the render drm_minor are registered. So, create a drm_debugfs_late_register() function, which is responsible for dealing with the creation of all the debugfs files for modeset components at once. Therefore, the functions drm_debugfs_add_file() and drm_debugfs_add_files() can be used in late_register hooks. Signed-off-by: Maíra Canal Reviewed-by: Melissa Wen Acked-by: Daniel Vetter Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20221219120621.15086-4-mcanal@igalia.com commit 6fd80729f14e3f70d4c07ea91ac44ed5ab8dfe60 Author: Maíra Canal Date: Mon Dec 19 09:06:16 2022 -0300 drm: use new debugfs device-centered functions on DRM core files Replace the use of drm_debugfs_create_files() with the new drm_debugfs_add_files() function in all DRM core files, centering the debugfs files management on the drm_device instead of drm_minor. Signed-off-by: Maíra Canal Reviewed-by: Maxime Ripard Reviewed-by: Melissa Wen Acked-by: Daniel Vetter Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20221219120621.15086-3-mcanal@igalia.com commit 1c9cacbea880513a896aee65a5c58007bcb55653 Author: Maíra Canal Date: Mon Dec 19 09:06:15 2022 -0300 drm/debugfs: create device-centered debugfs functions Introduce the ability to track requests for the addition of DRM debugfs files at any time and have them added all at once during drm_dev_register(). Drivers can add DRM debugfs files to a device-managed list and, during drm_dev_register(), all added files will be created at once. Now, the drivers can use the functions drm_debugfs_add_file() and drm_debugfs_add_files() to create DRM debugfs files instead of using the drm_debugfs_create_files() function. Co-developed-by: Wambui Karuga Signed-off-by: Wambui Karuga Signed-off-by: Maíra Canal Reviewed-by: Maxime Ripard Reviewed-by: Melissa Wen Acked-by: Daniel Vetter Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20221219120621.15086-2-mcanal@igalia.com commit b3a663f0037d20e77bbafd9271a3d9dd0351059d Author: Wenli Looi Date: Tue Dec 6 01:02:25 2022 -0800 wifi: ath9k: remove most hidden macro dependencies on ah Adds an explicit _ah parameter to most macros that previously had a hidden dependency on ah. This makes the code more compliant with the style guide. This change does not appear to affect the final binary. Signed-off-by: Wenli Looi Acked-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/c8369317-cf84-f0e3-fe8-9b6e22e43a6a@ucalgary.ca commit 44bacbdf9066c590423259dbd6d520baac99c1a8 Author: Yang Yingliang Date: Wed Dec 7 23:04:53 2022 +0800 wifi: wl3501_cs: don't call kfree_skb() under spin_lock_irqsave() It is not allowed to call kfree_skb() from hardware interrupt context or with interrupts being disabled. So replace kfree_skb() with dev_kfree_skb_irq() under spin_lock_irqsave(). Compile tested only. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Yang Yingliang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221207150453.114742-1-yangyingliang@huawei.com commit 708a49a64237f19bd404852f297aaadbc9e7fee0 Author: Yang Yingliang Date: Wed Dec 7 23:00:08 2022 +0800 wifi: libertas: cmdresp: don't call kfree_skb() under spin_lock_irqsave() It is not allowed to call kfree_skb() from hardware interrupt context or with interrupts being disabled. So replace kfree_skb() with dev_kfree_skb_irq() under spin_lock_irqsave(). Compile tested only. Fixes: f52b041aed77 ("libertas: Add spinlock to avoid race condition") Signed-off-by: Yang Yingliang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221207150008.111743-5-yangyingliang@huawei.com commit f393df151540bf858effbd29ff572ab94e76a4c4 Author: Yang Yingliang Date: Wed Dec 7 23:00:07 2022 +0800 wifi: libertas: main: don't call kfree_skb() under spin_lock_irqsave() It is not allowed to call kfree_skb() from hardware interrupt context or with interrupts being disabled. So replace kfree_skb() with dev_kfree_skb_irq() under spin_lock_irqsave(). Compile tested only. Fixes: d2e7b3425c47 ("libertas: disable functionality when interface is down") Signed-off-by: Yang Yingliang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221207150008.111743-4-yangyingliang@huawei.com commit 3968e81ba644f10a7d45bae2539560db9edac501 Author: Yang Yingliang Date: Wed Dec 7 23:00:06 2022 +0800 wifi: libertas: if_usb: don't call kfree_skb() under spin_lock_irqsave() It is not allowed to call kfree_skb() from hardware interrupt context or with interrupts being disabled. So replace kfree_skb() with dev_kfree_skb_irq() under spin_lock_irqsave(). Compile tested only. Fixes: a3128feef6d5 ("libertas: use irqsave() in USB's complete callback") Signed-off-by: Yang Yingliang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221207150008.111743-3-yangyingliang@huawei.com commit 9388ce97b98216833c969191ee6df61a7201d797 Author: Yang Yingliang Date: Wed Dec 7 23:00:05 2022 +0800 wifi: libertas_tf: don't call kfree_skb() under spin_lock_irqsave() It is not allowed to call kfree_skb() from hardware interrupt context or with interrupts being disabled. So replace kfree_skb() with dev_kfree_skb_irq() under spin_lock_irqsave(). Compile tested only. Fixes: fc75122fabb5 ("libertas_tf: use irqsave() in USB's complete callback") Signed-off-by: Yang Yingliang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221207150008.111743-2-yangyingliang@huawei.com commit b9f420032f2ba1e634b22ca7b433e5c40ea663af Author: Zhengchao Shao Date: Wed Dec 7 09:31:14 2022 +0800 wifi: brcmfmac: unmap dma buffer in brcmf_msgbuf_alloc_pktid() After the DMA buffer is mapped to a physical address, address is stored in pktids in brcmf_msgbuf_alloc_pktid(). Then, pktids is parsed in brcmf_msgbuf_get_pktid()/brcmf_msgbuf_release_array() to obtain physaddr and later unmap the DMA buffer. But when count is always equal to pktids->array_size, physaddr isn't stored in pktids and the DMA buffer will not be unmapped anyway. Fixes: 9a1bb60250d2 ("brcmfmac: Adding msgbuf protocol.") Signed-off-by: Zhengchao Shao Reviewed-by: Sebastian Andrzej Siewior Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221207013114.1748936-1-shaozhengchao@huawei.com commit 212fde3fe76e962598ce1d47b97cc78afdfc71b3 Author: Zhang Changzhong Date: Thu Nov 17 19:33:01 2022 +0800 wifi: brcmfmac: fix potential memory leak in brcmf_netdev_start_xmit() The brcmf_netdev_start_xmit() returns NETDEV_TX_OK without freeing skb in case of pskb_expand_head() fails, add dev_kfree_skb() to fix it. Compile tested only. Fixes: 270a6c1f65fe ("brcmfmac: rework headroom check in .start_xmit()") Signed-off-by: Zhang Changzhong Reviewed-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1668684782-47422-1-git-send-email-zhangchangzhong@huawei.com commit 0a06cadcc2a0044e4a117cc0e61436fc3a0dad69 Author: Jisoo Jang Date: Tue Nov 15 13:34:58 2022 +0900 wifi: brcmfmac: Fix potential stack-out-of-bounds in brcmf_c_preinit_dcmds() This patch fixes a stack-out-of-bounds read in brcmfmac that occurs when 'buf' that is not null-terminated is passed as an argument of strsep() in brcmf_c_preinit_dcmds(). This buffer is filled with a firmware version string by memcpy() in brcmf_fil_iovar_data_get(). The patch ensures buf is null-terminated. Found by a modified version of syzkaller. [ 47.569679][ T1897] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43236b for chip BCM43236/3 [ 47.582839][ T1897] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available [ 47.601565][ T1897] ================================================================== [ 47.602574][ T1897] BUG: KASAN: stack-out-of-bounds in strsep+0x1b2/0x1f0 [ 47.603447][ T1897] Read of size 1 at addr ffffc90001f6f000 by task kworker/0:2/1897 [ 47.604336][ T1897] [ 47.604621][ T1897] CPU: 0 PID: 1897 Comm: kworker/0:2 Tainted: G O 5.14.0+ #131 [ 47.605617][ T1897] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 [ 47.606907][ T1897] Workqueue: usb_hub_wq hub_event [ 47.607453][ T1897] Call Trace: [ 47.607801][ T1897] dump_stack_lvl+0x8e/0xd1 [ 47.608295][ T1897] print_address_description.constprop.0.cold+0xf/0x334 [ 47.609009][ T1897] ? strsep+0x1b2/0x1f0 [ 47.609434][ T1897] ? strsep+0x1b2/0x1f0 [ 47.609863][ T1897] kasan_report.cold+0x83/0xdf [ 47.610366][ T1897] ? strsep+0x1b2/0x1f0 [ 47.610882][ T1897] strsep+0x1b2/0x1f0 [ 47.611300][ T1897] ? brcmf_fil_iovar_data_get+0x3a/0xf0 [ 47.611883][ T1897] brcmf_c_preinit_dcmds+0x995/0xc40 [ 47.612434][ T1897] ? brcmf_c_set_joinpref_default+0x100/0x100 [ 47.613078][ T1897] ? rcu_read_lock_sched_held+0xa1/0xd0 [ 47.613662][ T1897] ? rcu_read_lock_bh_held+0xb0/0xb0 [ 47.614208][ T1897] ? lock_acquire+0x19d/0x4e0 [ 47.614704][ T1897] ? find_held_lock+0x2d/0x110 [ 47.615236][ T1897] ? brcmf_usb_deq+0x1a7/0x260 [ 47.615741][ T1897] ? brcmf_usb_rx_fill_all+0x5a/0xf0 [ 47.616288][ T1897] brcmf_attach+0x246/0xd40 [ 47.616758][ T1897] ? wiphy_new_nm+0x1703/0x1dd0 [ 47.617280][ T1897] ? kmemdup+0x43/0x50 [ 47.617720][ T1897] brcmf_usb_probe+0x12de/0x1690 [ 47.618244][ T1897] ? brcmf_usbdev_qinit.constprop.0+0x470/0x470 [ 47.618901][ T1897] usb_probe_interface+0x2aa/0x760 [ 47.619429][ T1897] ? usb_probe_device+0x250/0x250 [ 47.619950][ T1897] really_probe+0x205/0xb70 [ 47.620435][ T1897] ? driver_allows_async_probing+0x130/0x130 [ 47.621048][ T1897] __driver_probe_device+0x311/0x4b0 [ 47.621595][ T1897] ? driver_allows_async_probing+0x130/0x130 [ 47.622209][ T1897] driver_probe_device+0x4e/0x150 [ 47.622739][ T1897] __device_attach_driver+0x1cc/0x2a0 [ 47.623287][ T1897] bus_for_each_drv+0x156/0x1d0 [ 47.623796][ T1897] ? bus_rescan_devices+0x30/0x30 [ 47.624309][ T1897] ? lockdep_hardirqs_on_prepare+0x273/0x3e0 [ 47.624907][ T1897] ? trace_hardirqs_on+0x46/0x160 [ 47.625437][ T1897] __device_attach+0x23f/0x3a0 [ 47.625924][ T1897] ? device_bind_driver+0xd0/0xd0 [ 47.626433][ T1897] ? kobject_uevent_env+0x287/0x14b0 [ 47.627057][ T1897] bus_probe_device+0x1da/0x290 [ 47.627557][ T1897] device_add+0xb7b/0x1eb0 [ 47.628027][ T1897] ? wait_for_completion+0x290/0x290 [ 47.628593][ T1897] ? __fw_devlink_link_to_suppliers+0x5a0/0x5a0 [ 47.629249][ T1897] usb_set_configuration+0xf59/0x16f0 [ 47.629829][ T1897] usb_generic_driver_probe+0x82/0xa0 [ 47.630385][ T1897] usb_probe_device+0xbb/0x250 [ 47.630927][ T1897] ? usb_suspend+0x590/0x590 [ 47.631397][ T1897] really_probe+0x205/0xb70 [ 47.631855][ T1897] ? driver_allows_async_probing+0x130/0x130 [ 47.632469][ T1897] __driver_probe_device+0x311/0x4b0 [ 47.633002][ T1897] ? usb_generic_driver_match+0x75/0x90 [ 47.633573][ T1897] ? driver_allows_async_probing+0x130/0x130 [ 47.634170][ T1897] driver_probe_device+0x4e/0x150 [ 47.634703][ T1897] __device_attach_driver+0x1cc/0x2a0 [ 47.635248][ T1897] bus_for_each_drv+0x156/0x1d0 [ 47.635748][ T1897] ? bus_rescan_devices+0x30/0x30 [ 47.636271][ T1897] ? lockdep_hardirqs_on_prepare+0x273/0x3e0 [ 47.636881][ T1897] ? trace_hardirqs_on+0x46/0x160 [ 47.637396][ T1897] __device_attach+0x23f/0x3a0 [ 47.637904][ T1897] ? device_bind_driver+0xd0/0xd0 [ 47.638426][ T1897] ? kobject_uevent_env+0x287/0x14b0 [ 47.638985][ T1897] bus_probe_device+0x1da/0x290 [ 47.639512][ T1897] device_add+0xb7b/0x1eb0 [ 47.639977][ T1897] ? __fw_devlink_link_to_suppliers+0x5a0/0x5a0 [ 47.640612][ T1897] ? kfree+0x14a/0x6b0 [ 47.641055][ T1897] ? __usb_get_extra_descriptor+0x116/0x160 [ 47.641679][ T1897] usb_new_device.cold+0x49c/0x1029 [ 47.642245][ T1897] ? hub_disconnect+0x450/0x450 [ 47.642756][ T1897] ? rwlock_bug.part.0+0x90/0x90 [ 47.643273][ T1897] ? _raw_spin_unlock_irq+0x24/0x30 [ 47.643822][ T1897] ? lockdep_hardirqs_on_prepare+0x273/0x3e0 [ 47.644445][ T1897] hub_event+0x1c98/0x3950 [ 47.644939][ T1897] ? hub_port_debounce+0x2e0/0x2e0 [ 47.645467][ T1897] ? check_irq_usage+0x861/0xf20 [ 47.645975][ T1897] ? drain_workqueue+0x280/0x360 [ 47.646506][ T1897] ? lock_release+0x640/0x640 [ 47.646994][ T1897] ? rcu_read_lock_sched_held+0xa1/0xd0 [ 47.647572][ T1897] ? rcu_read_lock_bh_held+0xb0/0xb0 [ 47.648111][ T1897] ? lockdep_hardirqs_on_prepare+0x273/0x3e0 [ 47.648735][ T1897] process_one_work+0x92b/0x1460 [ 47.649262][ T1897] ? pwq_dec_nr_in_flight+0x330/0x330 [ 47.649816][ T1897] ? rwlock_bug.part.0+0x90/0x90 [ 47.650336][ T1897] worker_thread+0x95/0xe00 [ 47.650830][ T1897] ? __kthread_parkme+0x115/0x1e0 [ 47.651361][ T1897] ? process_one_work+0x1460/0x1460 [ 47.651904][ T1897] kthread+0x3a1/0x480 [ 47.652329][ T1897] ? set_kthread_struct+0x120/0x120 [ 47.652878][ T1897] ret_from_fork+0x1f/0x30 [ 47.653370][ T1897] [ 47.653608][ T1897] [ 47.653848][ T1897] addr ffffc90001f6f000 is located in stack of task kworker/0:2/1897 at offset 512 in frame: [ 47.654891][ T1897] brcmf_c_preinit_dcmds+0x0/0xc40 [ 47.655442][ T1897] [ 47.655690][ T1897] this frame has 4 objects: [ 47.656151][ T1897] [48, 56) 'ptr' [ 47.656159][ T1897] [80, 148) 'revinfo' [ 47.656534][ T1897] [192, 210) 'eventmask' [ 47.656953][ T1897] [256, 512) 'buf' [ 47.657410][ T1897] [ 47.658035][ T1897] Memory state around the buggy address: [ 47.658743][ T1897] ffffc90001f6ef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 47.659577][ T1897] ffffc90001f6ef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 47.660394][ T1897] >ffffc90001f6f000: f3 f3 f3 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00 [ 47.661199][ T1897] ^ [ 47.661625][ T1897] ffffc90001f6f080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 47.662455][ T1897] ffffc90001f6f100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 [ 47.663318][ T1897] ================================================================== [ 47.664147][ T1897] Disabling lock debugging due to kernel taint Reported-by: Dokyung Song Reported-by: Jisoo Jang Reported-by: Minsuk Kang Signed-off-by: Jisoo Jang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221115043458.37562-1-jisoo.jang@yonsei.ac.kr commit 2b88974ecb358990e1c33fabcd0b9e142bab7f21 Author: Wang Yufen Date: Thu Nov 24 19:38:22 2022 +0800 wifi: wilc1000: add missing unregister_netdev() in wilc_netdev_ifc_init() Fault injection test reports this issue: kernel BUG at net/core/dev.c:10731! invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI Call Trace: wilc_netdev_ifc_init+0x19f/0x220 [wilc1000 884bf126e9e98af6a708f266a8dffd53f99e4bf5] wilc_cfg80211_init+0x30c/0x380 [wilc1000 884bf126e9e98af6a708f266a8dffd53f99e4bf5] wilc_bus_probe+0xad/0x2b0 [wilc1000_spi 1520a7539b6589cc6cde2ae826a523a33f8bacff] spi_probe+0xe4/0x140 really_probe+0x17e/0x3f0 __driver_probe_device+0xe3/0x170 driver_probe_device+0x49/0x120 The root case here is alloc_ordered_workqueue() fails, but cfg80211_unregister_netdevice() or unregister_netdev() not be called in error handling path. To fix add unregister_netdev goto lable to add the unregister operation in error handling path. Fixes: 09ed8bfc5215 ("wilc1000: Rename workqueue from "WILC_wq" to "NETDEV-wq"") Signed-off-by: Wang Yufen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1669289902-23639-1-git-send-email-wangyufen@huawei.com commit deb962ec9e1c9a81babd3d37542ad4bd6ac3396e Author: Zhang Changzhong Date: Thu Nov 17 19:36:03 2022 +0800 wifi: wilc1000: fix potential memory leak in wilc_mac_xmit() The wilc_mac_xmit() returns NETDEV_TX_OK without freeing skb, add dev_kfree_skb() to fix it. Compile tested only. Fixes: c5c77ba18ea6 ("staging: wilc1000: Add SDIO/SPI 802.11 driver") Signed-off-by: Zhang Changzhong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1668684964-48622-1-git-send-email-zhangchangzhong@huawei.com commit 9fe21dc626117fb44a8eb393713a86a620128ce3 Author: Zhengchao Shao Date: Fri Dec 9 09:24:22 2022 +0800 wifi: ipw2200: fix memory leak in ipw_wdev_init() In the error path of ipw_wdev_init(), exception value is returned, and the memory applied for in the function is not released. Also the memory is not released in ipw_pci_probe(). As a result, memory leakage occurs. So memory release needs to be added to the error path of ipw_wdev_init(). Fixes: a3caa99e6c68 ("libipw: initiate cfg80211 API conversion (v2)") Signed-off-by: Zhengchao Shao Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221209012422.182669-1-shaozhengchao@huawei.com commit 45fc6d7461f18df2f238caf0cbc5acc4163203d1 Author: Yang Yingliang Date: Thu Dec 8 22:38:26 2022 +0800 wifi: ipw2x00: don't call dev_kfree_skb() under spin_lock_irqsave() It is not allowed to call kfree_skb() or consume_skb() from hardware interrupt context or with hardware interrupts being disabled. It should use dev_kfree_skb_irq() or dev_consume_skb_irq() instead. The difference between them is free reason, dev_kfree_skb_irq() means the SKB is dropped in error and dev_consume_skb_irq() means the SKB is consumed in normal. In this case, dev_kfree_skb() is called to free and drop the SKB when it's reset, so replace it with dev_kfree_skb_irq(). Compile tested only. Fixes: 43f66a6ce8da ("Add ipw2200 wireless driver.") Signed-off-by: Yang Yingliang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221208143826.2385218-1-yangyingliang@huawei.com commit cfca00767febba5f4f5e300fab10e0974491dd4b Author: Ricardo Ribalda Date: Wed Dec 21 20:55:29 2022 +0100 bpf: Remove unused field initialization in bpf's ctl_table Maxlen is used by standard proc_handlers such as proc_dointvec(), but in this case we have our own proc_handler via bpf_stats_handler(). Therefore, remove the initialization. Signed-off-by: Ricardo Ribalda Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20221221-bpf-syscall-v1-0-9550f5f2c3fc@chromium.org commit 5fbf8c24b66d8d63fd6a452fc60e7e11d98ac5f6 Author: Daniel Borkmann Date: Thu Dec 22 15:30:58 2022 +0100 selftests/bpf: Add jit probe_mem corner case tests to s390x denylist BPF CI fails for s390x with the following result: [...] All error logs: libbpf: prog 'test_jit_probe_mem': BPF program load failed: ERROR: strerror_r(524)=22 libbpf: prog 'test_jit_probe_mem': -- BEGIN PROG LOAD LOG -- JIT does not support calling kernel function processed 0 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0 -- END PROG LOAD LOG -- libbpf: prog 'test_jit_probe_mem': failed to load: -524 libbpf: failed to load object 'jit_probe_mem' libbpf: failed to load BPF skeleton 'jit_probe_mem': -524 test_jit_probe_mem:FAIL:jit_probe_mem__open_and_load unexpected error: -524 #89 jit_probe_mem:FAIL [...] Add the test to the deny list. Fixes: 59fe41b5255f ("selftests/bpf: Add verifier test exercising jit PROBE_MEM logic") Signed-off-by: Daniel Borkmann commit a561933c571798868b5fa42198427a7e6df56c09 Author: Jani Nikula Date: Tue Dec 20 16:01:05 2022 +0200 drm/i915/dsi: fix MIPI_BKLT_EN_1 native GPIO index Due to copy-paste fail, MIPI_BKLT_EN_1 would always use PPS index 1, never 0. Fix the sloppiest commit in recent memory. Fixes: f087cfe6fcff ("drm/i915/dsi: add support for ICL+ native MIPI GPIO sequence") Reported-by: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221220140105.313333-1-jani.nikula@intel.com commit 59fe41b5255f7b8a19a3347ec4b03fd830d6f4aa Author: Dave Marchevsky Date: Fri Dec 16 13:43:19 2022 -0800 selftests/bpf: Add verifier test exercising jit PROBE_MEM logic This patch adds a test exercising logic that was fixed / improved in the previous patch in the series, as well as general sanity checking for jit's PROBE_MEM logic which should've been unaffected by the previous patch. The added verifier test does the following: * Acquire a referenced kptr to struct prog_test_ref_kfunc using existing net/bpf/test_run.c kfunc * Helper returns ptr to a specific prog_test_ref_kfunc whose first two fields - both ints - have been prepopulated w/ vals 42 and 108, respectively * kptr_xchg the acquired ptr into an arraymap * Do a direct map_value load of the just-added ptr * Goal of all this setup is to get an unreferenced kptr pointing to struct with ints of known value, which is the result of this step * Using unreferenced kptr obtained in previous step, do loads of prog_test_ref_kfunc.a (offset 0) and .b (offset 4) * Then incr the kptr by 8 and load prog_test_ref_kfunc.a again (this time at offset -8) * Add all the loaded ints together and return Before the PROBE_MEM fixes in previous patch, the loads at offset 0 and 4 would succeed, while the load at offset -8 would incorrectly fail runtime check emitted by the JIT and 0 out dst reg as a result. This confirmed by retval of 150 for this test before previous patch - since second .a read is 0'd out - and a retval of 192 with the fixed logic. The test exercises the two optimizations to fixed logic added in last patch as well: * First load, with insn "r8 = *(u32 *)(r9 + 0)" exercises "insn->off is 0, no need to add / sub from src_reg" optimization * Third load, with insn "r9 = *(u32 *)(r9 - 8)" exercises "src_reg == dst_reg, no need to restore src_reg after load" optimization Signed-off-by: Dave Marchevsky Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20221216214319.3408356-2-davemarchevsky@fb.com commit 90156f4bfa21ada9943b538e27385152407605b1 Author: Dave Marchevsky Date: Fri Dec 16 13:43:18 2022 -0800 bpf, x86: Improve PROBE_MEM runtime load check This patch rewrites the runtime PROBE_MEM check insns emitted by the BPF JIT in order to ensure load safety. The changes in the patch fix two issues with the previous logic and more generally improve size of emitted code. Paragraphs between this one and "FIX 1" below explain the purpose of the runtime check and examine the current implementation. When a load is marked PROBE_MEM - e.g. due to PTR_UNTRUSTED access - the address being loaded from is not necessarily valid. The BPF jit sets up exception handlers for each such load which catch page faults and 0 out the destination register. Arbitrary register-relative loads can escape this exception handling mechanism. Specifically, a load like dst_reg = *(src_reg + off) will not trigger BPF exception handling if (src_reg + off) is outside of kernel address space, resulting in an uncaught page fault. A concrete example of such behavior is a program like: struct result { char space[40]; long a; }; /* if err, returns ERR_PTR(-EINVAL) */ struct result *ptr = get_ptr_maybe_err(); long x = ptr->a; If get_ptr_maybe_err returns ERR_PTR(-EINVAL) and the result isn't checked for err, 'result' will be (u64)-EINVAL, a number close to U64_MAX. The ptr->a load will be > U64_MAX and will wrap over to a small positive u64, which will be in userspace and thus not covered by BPF exception handling mechanism. In order to prevent such loads from occurring, the BPF jit emits some instructions which do runtime checking of (src_reg + off) and skip the actual load if it's out of range. As an example, here are instructions emitted for a %rdi = *(%rdi + 0x10) PROBE_MEM load: 72: movabs $0x800000000010,%r11 --| 7c: cmp %r11,%rdi |- 72 - 7f: Check 1 7f: jb 0x000000000000008d --| 81: mov %rdi,%r11 -----| 84: add $0x0000000000000010,%r11 |- 81-8b: Check 2 8b: jnc 0x0000000000000091 -----| 8d: xor %edi,%edi ---- 0 out dest 8f: jmp 0x0000000000000095 91: mov 0x10(%rdi),%rdi ---- Actual load 95: The JIT considers kernel address space to start at MAX_TASK_SIZE + PAGE_SIZE. Determining whether a load will be outside of kernel address space should be a simple check: (src_reg + off) >= MAX_TASK_SIZE + PAGE_SIZE But because there is only one spare register when the checking logic is emitted, this logic is split into two checks: Check 1: src_reg >= (MAX_TASK_SIZE + PAGE_SIZE - off) Check 2: src_reg + off doesn't wrap over U64_MAX and result in small pos u64 Emitted insns implementing Checks 1 and 2 are annotated in the above example. Check 1 can be done with a single spare register since the source reg by definition is the left-hand-side of the inequality. Since adding 'off' to both sides of Check 1's inequality results in the original inequality we want, it's equivalent to testing that inequality. Except in the case where src_reg + off wraps past U64_MAX, which is why Check 2 needs to actually add src_reg + off if Check 1 passes - again using the single spare reg. FIX 1: The Check 1 inequality listed above is not what current code is doing. Current code is a bit more pessimistic, instead checking: src_reg >= (MAX_TASK_SIZE + PAGE_SIZE + abs(off)) The 0x800000000010 in above example is from this current check. If Check 1 was corrected to use the correct right-hand-side, the value would be 0x7ffffffffff0. This patch changes the checking logic more broadly (FIX 2 below will elaborate), fixing this issue as a side-effect of the rewrite. Regardless, it's important to understand why Check 1 should've been doing MAX_TASK_SIZE + PAGE_SIZE - off before proceeding. FIX 2: Current code relies on a 'jnc' to determine whether src_reg + off addition wrapped over. For negative offsets this logic is incorrect. Consider Check 2 insns emitted when off = -0x10: 81: mov %rdi,%r11 84: add 0xfffffffffffffff0,%r11 8b: jnc 0x0000000000000091 2's complement representation of -0x10 is a large positive u64. Any value of src_reg that passes Check 1 will result in carry flag being set after (src_reg + off) addition. So a load with any negative offset will always fail Check 2 at runtime and never do the actual load. This patch fixes the negative offset issue by rewriting both checks in order to not rely on carry flag. The rewrite takes advantage of the fact that, while we only have one scratch reg to hold arbitrary values, we know the offset at JIT time. This we can use src_reg as a temporary scratch reg to hold src_reg + offset since we can return it to its original value by later subtracting offset. As a result we can directly check the original inequality we care about: (src_reg + off) >= MAX_TASK_SIZE + PAGE_SIZE For a load like %rdi = *(%rsi + -0x10), this results in emitted code: 43: movabs $0x800000000000,%r11 4d: add $0xfffffffffffffff0,%rsi --- src_reg += off 54: cmp %r11,%rsi --- Check original inequality 57: jae 0x000000000000005d 59: xor %edi,%edi 5b: jmp 0x0000000000000061 5d: mov 0x0(%rdi),%rsi --- Actual Load 61: sub $0xfffffffffffffff0,%rsi --- src_reg -= off Note that the actual load is always done with offset 0, since previous insns have already done src_reg += off. Regardless of whether the new check succeeds or fails, insn 61 is always executed, returning src_reg to its original value. Because the goal of these checks is to ensure that loaded-from address will be protected by BPF exception handler, the new check can safely ignore any wrapover from insn 4d. If such wrapped-over address passes insn 54 + 57's cmp-and-jmp it will have such protection so the load can proceed. IMPROVEMENTS: The above improved logic is 8 insns vs original logic's 9, and has 1 fewer jmp. The number of checking insns can be further improved in common scenarios: If src_reg == dst_reg, the actual load insn will clobber src_reg, so there's no original src_reg state for the sub insn immediately following the load to restore, so it can be omitted. In fact, it must be omitted since it would incorrectly subtract from the result of the load if it wasn't. So for src_reg == dst_reg, JIT emits these insns: 3c: movabs $0x800000000000,%r11 46: add $0xfffffffffffffff0,%rdi 4d: cmp %r11,%rdi 50: jae 0x0000000000000056 52: xor %edi,%edi 54: jmp 0x000000000000005a 56: mov 0x0(%rdi),%rdi 5a: The only difference from larger example being the omitted sub, which would've been insn 5a in this example. If offset == 0, we can similarly omit the sub as in previous case, since there's nothing added to subtract. For the same reason we can omit the addition as well, resulting in JIT emitting these insns: 46: movabs $0x800000000000,%r11 4d: cmp %r11,%rdi 50: jae 0x0000000000000056 52: xor %edi,%edi 54: jmp 0x000000000000005a 56: mov 0x0(%rdi),%rdi 5a: Although the above example also has src_reg == dst_reg, the same offset == 0 optimization is valid to apply if src_reg != dst_reg. To summarize the improvements in emitted insn count for the check-and-load: BEFORE: 8 check insns, 3 jmps AFTER (general case): 7 check insns, 2 jmps (12.5% fewer insn, 33% jmp) AFTER (src == dst): 6 check insns, 2 jmps (25% fewer insn) AFTER (offset == 0): 5 check insns, 2 jmps (37.5% fewer insn) (Above counts don't include the 1 load insn, just checking around it) Based on BPF bytecode + JITted x86 insn I saw while experimenting with these improvements, I expect the src_reg == dst_reg case to occur most often, followed by offset == 0, then the general case. Signed-off-by: Dave Marchevsky Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20221216214319.3408356-1-davemarchevsky@fb.com commit c183e6c3ec342624c43269c099050d01eeb67e63 Merge: 9054b41c4e1b5 609d3bc623051 Author: Jakub Kicinski Date: Wed Dec 21 12:15:21 2022 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net No conflicts. Signed-off-by: Jakub Kicinski commit 4ec38eda85b9d07942a1cc7a29bba8aa7c810780 Author: Andrii Nakryiko Date: Wed Dec 21 10:00:49 2022 -0800 libbpf: start v1.2 development cycle Bump current version for new development cycle to v1.2. Signed-off-by: Andrii Nakryiko Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20221221180049.853365-1-andrii@kernel.org Signed-off-by: Martin KaFai Lau commit c6015bf3ff1ffb3caa27eb913797438a0fc634a0 Author: Jun ASAKA Date: Sat Dec 17 11:06:59 2022 +0800 wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu Fixing transmission failure which results in "authentication with ... timed out". This can be fixed by disable the REG_TXPAUSE. Signed-off-by: Jun ASAKA Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221217030659.12577-1-JunASAKA@zzy040330.moe commit 8b9754b28f0f231736667e1751f1fc6f18c80ad4 Author: Bitterblue Smith Date: Sat Dec 17 16:21:59 2022 +0200 wifi: rtl8xxxu: Add rate control code for RTL8188EU Copied from the newer vendor driver, v5.2.2.4. Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/5acc1e5d-62d6-3a6a-0f9e-cbc8b809b1d7@gmail.com commit 3dfb8e844fa30cceb4b810613e2c35f628eb3e70 Author: Jes Sorensen Date: Sat Dec 17 16:18:23 2022 +0200 wifi: rtl8xxxu: Support new chip RTL8188EU This chip is found in cheap USB devices from TP-Link, D-Link, etc. Features: 2.4 GHz, b/g/n mode, 1T1R, 150 Mbps. Chip versions older than "I cut" need software rate control. That will be in the next commit. Until then MCS7 is used for all data frames. The "I cut" chips are not supported. They require different firmware and initialisation tables. Support can be added if someone has the hardware to test it. Co-developed-by: Andrea Merello Signed-off-by: Andrea Merello Co-developed-by: Taehee Yoo Signed-off-by: Taehee Yoo Signed-off-by: Jes Sorensen Co-developed-by: Bitterblue Smith Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/3aad60f6-23f9-81e8-c741-4bd51e99f423@gmail.com commit b75289e89459083e42959bec1b0a7f62c6f99c60 Author: Bitterblue Smith Date: Sat Dec 17 16:15:23 2022 +0200 wifi: rtl8xxxu: Define masks for cck_agc_rpt bits Define the constants CCK_AGC_RPT_LNA_IDX_MASK and CCK_AGC_RPT_VGA_IDX_MASK instead of using the same literals in four places. And get the bits from cck_agc_rpt using u8_get_bits(). It's a cosmetic change only. Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/cfe79922-efdf-2ed0-7404-263915d19d82@gmail.com commit d7a3705c9634aca14f02c826358bd35cfab4c2b9 Author: Bitterblue Smith Date: Sat Dec 17 16:13:47 2022 +0200 wifi: rtl8xxxu: Make rtl8xxxu_load_firmware take const char* And pass const char* to it. Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/361ceac1-cc73-605b-4b63-736bfce80833@gmail.com commit 4f198e720eab187577aabef319bc75d666b441c3 Author: Bitterblue Smith Date: Sat Dec 17 16:12:23 2022 +0200 wifi: rtl8xxxu: Deduplicate the efuse dumping code Every chip family except RTL8723AU has a copy of the efuse dumping code. Remove this and dump the efuse from a single place using a new function rtl8xxxu_dump_efuse(). Also, use print_hex_dump() to print the efuse instead of a loop and dev_info(). It shows the ASCII interpretation of the bytes, which is nice. Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/2aa5200a-ee42-e064-16a1-672bed5708c6@gmail.com commit ba1a6905c71898509fd3e8d1eb790b4e1213126f Author: Chih-Kang Chang Date: Fri Dec 16 13:29:39 2022 +0800 wifi: rtw89: 8852c: rfk: refine AGC tuning flow of DPK for irregular PA Some hardware modules don't have good RF characteristic as regular. It could have RF PA characteristic that current code doesn't handle properly, and it runs into wrong DPK flow that doesn't complete DPK resulting in bad EVM. Signed-off-by: Chih-Kang Chang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221216052939.9991-1-pkshih@realtek.com commit 08c93c0ca74c4223dce8fb68e4bb24f7426e55c8 Author: Po-Hao Huang Date: Wed Dec 14 17:19:52 2022 +0800 wifi: rtw89: refine 6 GHz scanning dwell time Reduce dwell time to improve scan duration in 6 GHz. This is required for scan requests that does not include RNR parsing and does full channel scan. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221214091952.42792-1-pkshih@realtek.com commit a48f4fd05d5ea20c55afb212240972c1bd2c6ad3 Author: Eric Huang Date: Wed Dec 14 17:18:03 2022 +0800 wifi: rtw89: 8852b: update BSS color mapping register BSS color mapping register is different per IC, therefore, move this register to chip_info and update the setting function. Without this patch, wrong BSS color causes behavior abnormal, especially DL-OFDMA. Signed-off-by: Eric Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221214091803.41293-1-pkshih@realtek.com commit e0097ac51e84243f0d0c065cbede1138f5e3aa9f Author: Ching-Te Ku Date: Sat Dec 17 22:17:45 2022 +0800 wifi: rtw89: coex: Change TDMA related logic to version separate In order to make different version of TDMA and coming update in the future can all work well, use BTC format version to replace chip_id, because format could change for specific chip_id. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221217141745.43291-8-pkshih@realtek.com commit 31f12cff9d262468a11dc02af48fd1e538e1223f Author: Ching-Te Ku Date: Sat Dec 17 22:17:44 2022 +0800 wifi: rtw89: coex: refactor _chk_btc_report() to extend more features Change the checking logic to switch case. Make the code more readable. There are more feature including to common code, in order to commit the following version of the features, switch case will make the logic more clearly. This patch did not change logic. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221217141745.43291-7-pkshih@realtek.com commit 0cdfcfce85b6f067f1639550a0aacf2c112a3441 Author: Ching-Te Ku Date: Sat Dec 17 22:17:43 2022 +0800 wifi: rtw89: coex: Add v2 BT AFH report and related variable Wi-Fi firmware update AFH report feature to version 2. If there is BT BLE device connect to DUT, the mechanism will send H2C to request BT BLE channel map, it will 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/20221217141745.43291-6-pkshih@realtek.com commit 52c7c983174cd8e2f92e157ef806be3629d5d73b Author: Ching-Te Ku Date: Sat Dec 17 22:17:42 2022 +0800 wifi: rtw89: coex: Update BTC firmware report bitmap definition The different version use different bit definition to enable firmware report. WiFi firmware will report information from Bluetooth firmware or some Wi-Fi firmware mechanism/status to driver by these bits. To solve the difference, add a function to map bitmap and versions. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221217141745.43291-5-pkshih@realtek.com commit bc20f9235f644846520a68340ea0730d09022e0a Author: Ching-Te Ku Date: Sat Dec 17 22:17:41 2022 +0800 wifi: rtw89: coex: Enable Bluetooth report when show debug info Ask WiFi firmware to send Bluetooth version report when we want to show Bluetooth debug info. If there is no request for debug log, driver will not enable the report. This modification can save some C2H/H2C resources. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221217141745.43291-4-pkshih@realtek.com commit 1fc4a874ff02ba8c07f8abf97c0bef686406f6df Author: Ping-Ke Shih Date: Sat Dec 17 22:17:40 2022 +0800 wifi: rtw89: coex: use new introduction BTC version format Previous patch has added format version derived from firmware version. Use the format version, and remove constant version number from chip_info. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221217141745.43291-3-pkshih@realtek.com commit 6140635a73c00c0b3a8a58d13890dcf27d0af32a Author: Ping-Ke Shih Date: Sat Dec 17 22:17:39 2022 +0800 wifi: rtw89: coex: add BTC format version derived from firmware version Originally, each chip maintains its own format version followed firmware it uses. As new chip is added, firmware changes format of exchange messages to have rich information to handle more conditions. When old chip is going to upgrade firmware, it could use new format and driver needs to maintain compatibility with old firmware. So, add this version array to achieve this goal. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221217141745.43291-2-pkshih@realtek.com commit 33381618d7edf7e939d86861e445da09d72edcd1 Merge: 117dbeda22ec5 d878d3dc126db Author: Kalle Valo Date: Wed Dec 21 20:21:36 2022 +0200 Merge tag 'mt76-for-kvalo-2022-12-09' of https://github.com/nbd168/wireless mt76 patches for 6.2 - fixes - per-PHY LED support commit 65e75eda82d8857ab8732b98ead6997a8afeab4a Author: Ankit Nautiyal Date: Sun Nov 27 10:52:32 2022 +0530 drm/i915/ddi: Add missing wait-for-active for HDMI aligning with bspec updates After enabling DDI_BUF_CTL, wait for DDI_BUF_CTL to be active. Bspec:4232,53339,49191,54145 Signed-off-by: Ankit Nautiyal Signed-off-by: Imre Deak Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20221127052232.3942831-3-ankit.k.nautiyal@intel.com commit 5add4575c298546ed67162c6db5ed8aa4886f803 Author: Ankit Nautiyal Date: Wed Dec 7 20:24:36 2022 +0530 drm/i915/ddi: Align timeout for DDI_BUF_CTL active with Bspec For Gen12+ wait for 1ms for Combo Phy and 3ms for TC Phy for DDI_BUF_CTL to be active for TC phy. (Bspec:49190) v2: Minor refactoring for better readability. v3: Rebased and retained the order of checking platforms. (Imre) Signed-off-by: Ankit Nautiyal Signed-off-by: Imre Deak Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20221207145436.1510625-1-ankit.k.nautiyal@intel.com commit 552d42a356ebf78df9d2f4b73e077d2459966fac Author: Martin KaFai Lau Date: Tue Dec 20 17:30:36 2022 -0800 bpf: Reduce smap->elem_size 'struct bpf_local_storage_elem' has an unused 56 byte padding at the end due to struct's cache-line alignment requirement. This padding space is overlapped by storage value contents, so if we use sizeof() to calculate the total size, we overinflate it by 56 bytes. Use offsetof() instead to calculate more exact memory use. Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221221013036.3427431-1-martin.lau@linux.dev commit 7b43df6c6ec38c9097420902a1c8165c4b25bf70 Merge: 1520e8466d683 e7f0d5cdd023d Author: Andrii Nakryiko Date: Tue Dec 20 16:09:40 2022 -0800 Merge branch 'bpftool: improve error handing for missing .BTF section' Changbin Du says: ==================== Display error message for missing ".BTF" section and clean up empty vmlinux.h file. v3: - fix typo and make error message consistent. (Andrii Nakryiko) - split out perf change. v2: - remove vmlinux specific error info. - use builtin target .DELETE_ON_ERROR: to delete empty vmlinux.h ==================== Signed-off-by: Andrii Nakryiko commit e7f0d5cdd023d8fa53d9ca541b9a55f0eb45618c Author: Changbin Du Date: Sun Dec 18 06:35:09 2022 +0800 bpf: makefiles: Do not generate empty vmlinux.h Remove the empty vmlinux.h if bpftool failed to dump btf info. The empty vmlinux.h can hide real error when reading output of make. This is done by adding .DELETE_ON_ERROR special target in related makefiles. Signed-off-by: Changbin Du Signed-off-by: Andrii Nakryiko Acked-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20221217223509.88254-3-changbin.du@gmail.com commit e6b4e1d759d3bfb7cb84c87cc8f1858da7db8dea Author: Changbin Du Date: Sun Dec 18 06:35:08 2022 +0800 libbpf: Show error info about missing ".BTF" section Show the real problem instead of just saying "No such file or directory". Now will print below info: libbpf: failed to find '.BTF' ELF section in /home/changbin/work/linux/vmlinux Error: failed to load BTF from /home/changbin/work/linux/vmlinux: No such file or directory Signed-off-by: Changbin Du Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221217223509.88254-2-changbin.du@gmail.com commit 1520e8466d683b6c5e1aa53aa65165ebd5da46cf Author: Khem Raj Date: Mon Dec 19 11:15:26 2022 -0800 libbpf: Fix build warning on ref_ctr_off for 32-bit architectures Clang warns on 32-bit ARM on this comparision: libbpf.c:10497:18: error: result of comparison of constant 4294967296 with expression of type 'size_t' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare] if (ref_ctr_off >= (1ULL << PERF_UPROBE_REF_CTR_OFFSET_BITS)) ~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Typecast ref_ctr_off to __u64 in the check conditional, it is false on 32bit anyways. Signed-off-by: Khem Raj Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20221219191526.296264-1-raj.khem@gmail.com commit cafb92d719e8d8d8491b4d493fad331c2bc80f94 Author: Maryam Tahhan Date: Mon Dec 19 09:55:12 2022 +0000 docs: BPF_MAP_TYPE_SOCK[MAP|HASH] Add documentation for BPF_MAP_TYPE_SOCK[MAP|HASH] including kernel versions introduced, usage and examples. Signed-off-by: Maryam Tahhan Signed-off-by: Andrii Nakryiko Reviewed-by: Bagas Sanjaya Acked-by: John Fastabend Acked-by: David Vernet Link: https://lore.kernel.org/bpf/20221219095512.26534-1-mtahhan@redhat.com commit a9763aa0bda186d8d86101e8ee90a37f606d9f64 Merge: bcd5b5912c6ce 1644d755d0b06 Author: Andrew Morton Date: Tue Dec 20 15:02:46 2022 -0800 Merge branch 'master' into mm-nonmm-stable commit 71f6861cbf4537b4d890ab2328492c521adb00ef Merge: ad40920e0080e 1644d755d0b06 Author: Andrew Morton Date: Tue Dec 20 15:02:21 2022 -0800 Merge branch 'master' into mm-stable commit e3bf7e96d0f66c8b21721ac417c4f560978c609a Author: Tim Huang Date: Mon Dec 19 18:32:32 2022 +0800 drm/amdgpu: skip mes self test after s0i3 resume for MES IP v11.0 MES is part of gfxoff and MES suspend and resume are skipped for S0i3. But the mes_self_test call path is still in the amdgpu_device_ip_late_init. it's should also be skipped for s0ix as no hardware re-initialization happened. Besides, mes_self_test will free the BO that triggers a lot of warning messages while in the suspend state. [ 81.656085] WARNING: CPU: 2 PID: 1550 at drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:425 amdgpu_bo_free_kernel+0xfc/0x110 [amdgpu] [ 81.679435] Call Trace: [ 81.679726] [ 81.679981] amdgpu_mes_remove_hw_queue+0x17a/0x230 [amdgpu] [ 81.680857] amdgpu_mes_self_test+0x390/0x430 [amdgpu] [ 81.681665] mes_v11_0_late_init+0x37/0x50 [amdgpu] [ 81.682423] amdgpu_device_ip_late_init+0x53/0x280 [amdgpu] [ 81.683257] amdgpu_device_resume+0xae/0x2a0 [amdgpu] [ 81.684043] amdgpu_pmops_resume+0x37/0x70 [amdgpu] [ 81.684818] pci_pm_resume+0x5c/0xa0 [ 81.685247] ? pci_pm_thaw+0x90/0x90 [ 81.685658] dpm_run_callback+0x4e/0x160 [ 81.686110] device_resume+0xad/0x210 [ 81.686529] async_resume+0x1e/0x40 [ 81.686931] async_run_entry_fn+0x33/0x120 [ 81.687405] process_one_work+0x21d/0x3f0 [ 81.687869] worker_thread+0x4a/0x3c0 [ 81.688293] ? process_one_work+0x3f0/0x3f0 [ 81.688777] kthread+0xff/0x130 [ 81.689157] ? kthread_complete_and_exit+0x20/0x20 [ 81.689707] ret_from_fork+0x22/0x30 [ 81.690118] [ 81.690380] ---[ end trace 0000000000000000 ]--- v2: make the comment clean and use adev->in_s0ix instead of adev->suspend Signed-off-by: Tim Huang Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit ae67558be712237109100fd14f12378adcf24356 Author: Srinivasan Shanmugam Date: Mon Dec 19 17:20:39 2022 +0530 drm/amd/display: fix some coding style issues Fix the following checkpatch checks in amdgpu_dm.c CHECK: Prefer kernel type 'u8' over 'uint8_t' CHECK: Prefer kernel type 'u32' over 'uint32_t' CHECK: Prefer kernel type 'u64' over 'uint64_t' CHECK: Prefer kernel type 's32' over 'int32_t' Signed-off-by: Srinivasan Shanmugam Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 0b93c543418177561121e57017b60cb9bb74414f Author: Evan Quan Date: Fri Dec 16 17:04:24 2022 +0800 drm/amd/pm: correct the fan speed retrieving in PWM for some SMU13 asics For SMU 13.0.0 and 13.0.7, the output from PMFW is in percent. Driver need to convert that into correct PMW(255) based. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 82986fd631fa04bcedaefe11a6b3767601cbe84f Author: hersen wu Date: Tue Nov 15 10:39:55 2022 -0500 drm/amd/display: save restore hdcp state when display is unplugged from mst hub [Why] connector hdcp properties are lost after display is unplgged from mst hub. connector is destroyed with dm_dp_mst_connector_destroy. when display is plugged back, hdcp is not desired and it wouldnt be enabled. [How] save hdcp properties into hdcp_work within amdgpu_dm_atomic_commit_tail. If the same display is plugged back with same display index, its hdcp properties will be retrieved from hdcp_work within dm_dp_mst_get_modes. Acked-by: Aurabindo Pillai Signed-off-by: hersen wu Reviewed-by: Bhawanpreet Lakha Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7f35c54cc2fa09f902caaae32625869b77ee8f8b Author: Evan Quan Date: Thu Dec 15 13:38:46 2022 +0800 drm/amd/pm: bump SMU13.0.0 driver_if header to version 0x34 To fit the latest PMFW and suppress the warning emerged on driver loading. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit b2bfb48a31f1858feeaffa6787e9c8d0432914d4 Author: Evan Quan Date: Tue Dec 13 14:28:08 2022 +0800 drm/amd/pm: add support for WINDOW3D profile mode on SMU13.0.0 Add the support for WINDOW3D profile mode as for other profile modes. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 5620a1889e4ce248b0013123024bd4b20df8b56e Author: Alex Deucher Date: Fri Dec 16 11:42:20 2022 -0500 drm/amdgpu: skip MES for S0ix as well since it's part of GFX It's also part of gfxoff. Cc: stable@vger.kernel.org # 6.0, 6.1 Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit b7665165aebf5ed26109359daeedbe5d80038e8f Author: Alex Deucher Date: Thu Nov 10 09:13:50 2022 -0500 Revert "drm/amdgpu: force exit gfxoff on sdma resume for rmb s0ix" This reverts commit e5d59cfa330523e47cba62a496864acc3948fc27. This is no longer needed since we no longer suspend SDMA during S0ix. Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit 5804463a6518aa8fa763570692e2805930924ac2 Author: Alex Deucher Date: Tue Nov 1 14:27:50 2022 -0400 Revert "drm/amdgpu: disallow gfxoff until GC IP blocks complete s2idle resume" This reverts commit f543d28687480fad06b708bc6e0b0b6ec953b078. This is no longer needed since we no longer touch SDMA 5.x for s0i3. Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit 2a7798ea7390fd78f191c9e9bf68f5581d3b4a02 Author: Alex Deucher Date: Fri Dec 2 10:13:40 2022 -0500 drm/amdgpu: for S0ix, skip SDMA 5.x+ suspend/resume SDMA 5.x is part of the GFX block so it's controlled via GFXOFF. Skip suspend as it should be handled the same as GFX. v2: drop SDMA 4.x. That requires special handling. Reviewed-by: Mario Limonciello Acked-by: Rajneesh Bhardwaj Signed-off-by: Alex Deucher commit 47198eb72114a93c13195a17f4c3118002c57f1a Author: Alex Deucher Date: Thu Nov 10 08:53:43 2022 -0500 drm/amdgpu: don't mess with SDMA clock or powergating in S0ix It's handled by GFXOFF for SDMA 5.x and SMU saves the state on SDMA 4.x. Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit 735c7064682e4bf0b0788f7786f0281158d68725 Author: Alex Deucher Date: Wed Nov 9 16:20:26 2022 -0500 drm/amdgpu/gmc11: don't touch gfxhub registers during S0ix gfxhub registers are part of gfx IP and should not need to be changed. Doing so without disabling gfxoff can hang the gfx IP. v2: add comments explaining why we can skip the interrupt control for S0i3 Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit d5d29009b88f9b0e56e3d8b0bbebc443d41f89ef Author: Alex Deucher Date: Tue Nov 8 15:47:56 2022 -0500 drm/amdgpu/gmc10: don't touch gfxhub registers during S0ix gfxhub registers are part of gfx IP and should not need to be changed. Doing so without disabling gfxoff can hang the gfx IP. v2: add comments explaining why we can skip the interrupt control for S0i3 Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit b93df61dda09ed93e6f2834b4fe6440917f95468 Author: Alex Deucher Date: Tue Nov 8 16:05:04 2022 -0500 drm/amdgpu/gmc9: don't touch gfxhub registers during S0ix gfxhub registers are part of gfx IP and should not need to be changed. Doing so without disabling gfxoff can hang the gfx IP. v2: add comments explaining why we can skip the interrupt control for S0i3 Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit 76a95b833ac75dfc62e8ca0d8acd337a683061f4 Author: Arnd Bergmann Date: Thu Dec 15 17:36:31 2022 +0100 drm/amd/pm: avoid large variable on kernel stack The activity_monitor_external[] array is too big to fit on the kernel stack, resulting in this warning with clang: drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1438:12: error: stack frame size (1040) exceeds limit (1024) in 'smu_v13_0_7_get_power_profile_mode' [-Werror,-Wframe-larger-than] Use dynamic allocation instead. It should also be possible to have single element here instead of the array, but this seems easier. v2: fix up argument to sizeof() (Alex) Fixes: 334682ae8151 ("drm/amd/pm: enable workload type change on smu_v13_0_7") Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit 15504993a86d4aa078c8ac22537b7b295bee1a5f Author: Arnd Bergmann Date: Thu Dec 15 17:45:25 2022 +0100 drm/amd/display: fix duplicate assignments The .set_odm_combine callback pointer was added twice, causing a harmless -Wextra warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn314/dcn314_optc.c:258:36: error: initialized field overwritten [-Werror=override-init] 258 | .set_odm_combine = optc314_set_odm_combine, | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn314/dcn314_optc.c:258:36: note: (near initialization for 'dcn314_tg_funcs.set_odm_combine') Fixes: 5ade1b951dec ("drm/amd/display: Add OTG/ODM functions") Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit 41d82649ca5679ce8e3dd1628515706711cf595b Author: Philip Yang Date: Tue Dec 13 00:50:03 2022 -0500 drm/amdkfd: Fix double release compute pasid If kfd_process_device_init_vm returns failure after vm is converted to compute vm and vm->pasid set to compute pasid, KFD will not take pdd->drm_file reference. As a result, drm close file handler maybe called to release the compute pasid before KFD process destroy worker to release the same pasid and set vm->pasid to zero, this generates below WARNING backtrace and NULL pointer access. Add helper amdgpu_amdkfd_gpuvm_set_vm_pasid and call it at the last step of kfd_process_device_init_vm, to ensure vm pasid is the original pasid if acquiring vm failed or is the compute pasid with pdd->drm_file reference taken to avoid double release same pasid. amdgpu: Failed to create process VM object ida_free called for id=32770 which is not allocated. WARNING: CPU: 57 PID: 72542 at ../lib/idr.c:522 ida_free+0x96/0x140 RIP: 0010:ida_free+0x96/0x140 Call Trace: amdgpu_pasid_free_delayed+0xe1/0x2a0 [amdgpu] amdgpu_driver_postclose_kms+0x2d8/0x340 [amdgpu] drm_file_free.part.13+0x216/0x270 [drm] drm_close_helper.isra.14+0x60/0x70 [drm] drm_release+0x6e/0xf0 [drm] __fput+0xcc/0x280 ____fput+0xe/0x20 task_work_run+0x96/0xc0 do_exit+0x3d0/0xc10 BUG: kernel NULL pointer dereference, address: 0000000000000000 RIP: 0010:ida_free+0x76/0x140 Call Trace: amdgpu_pasid_free_delayed+0xe1/0x2a0 [amdgpu] amdgpu_driver_postclose_kms+0x2d8/0x340 [amdgpu] drm_file_free.part.13+0x216/0x270 [drm] drm_close_helper.isra.14+0x60/0x70 [drm] drm_release+0x6e/0xf0 [drm] __fput+0xcc/0x280 ____fput+0xe/0x20 task_work_run+0x96/0xc0 do_exit+0x3d0/0xc10 Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit cb8dc232cbd2f8ad7c2b30e4c851b3e49c2e3be2 Author: Philip Yang Date: Wed Dec 14 10:15:17 2022 -0500 drm/amdkfd: Fix kfd_process_device_init_vm error handling Should only destroy the ib_mem and let process cleanup worker to free the outstanding BOs. Reset the pointer in pdd->qpd structure, to avoid NULL pointer access in process destroy worker. BUG: kernel NULL pointer dereference, address: 0000000000000010 Call Trace: amdgpu_amdkfd_gpuvm_unmap_gtt_bo_from_kernel+0x46/0xb0 [amdgpu] kfd_process_device_destroy_cwsr_dgpu+0x40/0x70 [amdgpu] kfd_process_destroy_pdds+0x71/0x190 [amdgpu] kfd_process_wq_release+0x2a2/0x3b0 [amdgpu] process_one_work+0x2a1/0x600 worker_thread+0x39/0x3d0 Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit b1def7fadfa544bd2467581ce40b659583eb7e79 Author: Thomas Zimmermann Date: Fri Dec 16 20:30:05 2022 +0100 drm/ast: Init iosys_map pointer as I/O memory for damage handling Ast hardware scans out the primary plane from video memory, which is in I/O-memory space. Hence init the damage handler's iosys_map pointer as I/O memory. Not all platforms support accessing I/O memory as system memory, although it's usually not a problem in ast's x86-based systems. The error report is at [1]. Reported-by: kernel test robot Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Fixes: f2fa5a99ca81 ("drm/ast: Convert ast to SHMEM") Cc: Thomas Zimmermann Cc: Jocelyn Falempe Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Link: https://lore.kernel.org/lkml/202212170111.eInM0unS-lkp@intel.com/T/#u # 1 Link: https://patchwork.freedesktop.org/patch/msgid/20221216193005.30280-1-tzimmermann@suse.de commit 2d60f9f4f26785a00273cb81fe60eff129ebd449 Author: Jingyuan Liang Date: Tue Dec 13 22:53:30 2022 +0000 HID: Add Mapping for System Microphone Mute HUTRR110 added a new usage code for a key that is supposed to mute/unmute microphone system-wide. Map the new usage code(0x01 0xa9) to keycode KEY_MICMUTE. Additionally hid-debug is adjusted to recognize this keycode as well. Signed-off-by: Jingyuan Liang Reviewed-by: Dmitry Torokhov Signed-off-by: Jiri Kosina commit a608dc1c06397dc50ab773498433432fb5938f92 Author: José Expósito Date: Thu Nov 24 18:59:37 2022 +0100 HID: input: map battery system charging HID descriptors with Battery System (0x85) Charging (0x44) usage are ignored and POWER_SUPPLY_STATUS_DISCHARGING is always reported to user space, even when the device is charging. Map this usage and when it is reported set the right charging status. In addition, add KUnit tests to make sure that the charging status is correctly set and reported. They can be run with the usual command: $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/hid Signed-off-by: José Expósito Signed-off-by: Jiri Kosina commit c8aca355bdd56e5dad55897cc419ea5d3e4c0e58 Author: Philipp Jungkamp Date: Fri Nov 25 00:38:41 2022 +0100 IIO: hid-sensor-prox: Use generic usage Use a generic 'hsdev->usage' instead of the HID_USAGE_SENSOR_PROX to allow this driver to drive the Lenvo custom proximity sensor, which is registered under a 'custom' usage and not HID_USAGE_SENSOR_PROX. Add the Lenovo Intelligent Sensing Solution (LISS) human presence sensor to the platform device ids. Signed-off-by: Philipp Jungkamp Reviewed-by: Jonathan Cameron Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit 3a04a1862d9b130fce24553e93db681dc311a29e Author: Philipp Jungkamp Date: Fri Nov 25 00:38:40 2022 +0100 IIO: hid-sensor-als: Use generic usage Use a generic 'hsdev->usage' instead of the HID_USAGE_SENSOR_ALS to allow this driver to drive the Lenovo custom ambient light sensor, which is registered under a 'custom' usage and not HID_USAGE_SENSOR_ALS. Add the Lenovo Intelligent Sensing Solution (LISS) ambient light sensor to the platform device ids. Signed-off-by: Philipp Jungkamp Reviewed-by: Jonathan Cameron Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit 48c79bb0abc0429751c0de6616224f8e4aa891cf Author: Philipp Jungkamp Date: Fri Nov 25 00:38:39 2022 +0100 HID: hid-sensor-custom: Add LISS custom sensors Add the Lenovo Intelligent Sensing Solution (LISS) custom sensors to the known custom sensors. Signed-off-by: Philipp Jungkamp Reviewed-by: Jonathan Cameron Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit 98c062e8245199fa9121141a0bf1035dc45ae90e Author: Philipp Jungkamp Date: Fri Nov 25 00:38:38 2022 +0100 HID: hid-sensor-custom: Allow more custom iio sensors The known LUID table for established/known custom HID sensors was limited to sensors with "INTEL" as manufacturer. But some vendors such as Lenovo also include fairly standard iio sensors (e.g. ambient light) in their custom sensors. Expand the known custom sensors table by a tag used for the platform device name and match sensors based on the LUID as well as optionally on model and manufacturer properties. Signed-off-by: Philipp Jungkamp Reviewed-by: Jonathan Cameron Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit f087cfe6fcff58044f7aa3b284965af47f472fb0 Author: Jani Nikula Date: Mon Dec 19 12:59:55 2022 +0200 drm/i915/dsi: add support for ICL+ native MIPI GPIO sequence Starting from ICL, the default for MIPI GPIO sequences seems to be using native GPIOs i.e. GPIOs available in the GPU. These native GPIOs reuse many pins that quite frankly seem scary to poke based on the VBT sequences. We pretty much have to trust that the board is configured such that the relevant HPD, PP_CONTROL and GPIO bits aren't used for anything else. MIPI sequence v4 also adds a flag to fall back to non-native sequences. v5: - Wrap SHOTPLUG_CTL_DDI modification in spin_lock() in icp_irq_handler() too (Ville) - References instead of Closes issue 6131 because this does not fix everything v4: - Wrap SHOTPLUG_CTL_DDI modification in spin_lock_irq() (Ville) v3: - Fix -Wbitwise-conditional-parentheses (kernel test robot ) v2: - Fix HPD pin output set (impacts GPIOs 0 and 5) - Fix GPIO data output direction set (impacts GPIOs 4 and 9) - Reduce register accesses to single intel_de_rwm() References: https://gitlab.freedesktop.org/drm/intel/-/issues/6131 Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221219105955.4014451-1-jani.nikula@intel.com commit 7ccf9a5386a48b86c1abc0e7cb42f4b8f961af38 Author: Nirmoy Das Date: Mon Dec 19 12:29:33 2022 +0100 drm/i915: Use helper func to find out map type Use i915_coherent_map_type() function to find out map_type of the shmem obj. v2: handle non-llc platform(Matt) Signed-off-by: Nirmoy Das Reviewed-by: Andrzej Hajda Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20221219112933.21417-1-nirmoy.das@intel.com commit 08d34f12fead958d17e32d57d8061c14f9104373 Author: Nirmoy Das Date: Tue Dec 13 13:00:10 2022 +0100 drm/i915/selftests: Remove hardcoded value with a macro Use MI_USE_GGTT instead of hardcoded value. Signed-off-by: Nirmoy Das Reviewed-by: Matthew Auld Reviewed-by: Andrzej Hajda Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20221213120010.5857-1-nirmoy.das@intel.com commit 2306f5d042e479806c3dae3044b3ebbc475118de Author: Deepak R Varma Date: Sun Dec 11 19:25:08 2022 +0530 drm/sprd: 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: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/Y5XhPJ39ipMCcctq@qemulion commit 5f70ba0243a9ec8fa783dfa0454965c8ef543b66 Author: Uwe Kleine-König Date: Mon Dec 19 19:31:47 2022 +0100 drm/drv: Make use of local variable driver in drm_dev_register() There is a local variable that contains dev->driver. Make use of it instead of "open coding" it. Signed-off-by: Uwe Kleine-König Reviewed-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20221219183147.1639399-1-u.kleine-koenig@pengutronix.de commit ac6e45e05857464a1e347c50da9917141f1fbb80 Author: Christian Ehrig Date: Sun Dec 18 06:17:32 2022 +0100 selftests/bpf: Add BPF_F_NO_TUNNEL_KEY test This patch adds a selftest simulating a GRE sender and receiver using tunnel headers without tunnel keys. It validates if packets encapsulated using BPF_F_NO_TUNNEL_KEY are decapsulated by a GRE receiver not configured with tunnel keys. Signed-off-by: Christian Ehrig Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20221218051734.31411-2-cehrig@cloudflare.com commit e26aa600ba6a62fe84659f1df497a381bab6d07e Author: Christian Ehrig Date: Sun Dec 18 06:17:31 2022 +0100 bpf: Add flag BPF_F_NO_TUNNEL_KEY to bpf_skb_set_tunnel_key() This patch allows to remove TUNNEL_KEY from the tunnel flags bitmap when using bpf_skb_set_tunnel_key by providing a BPF_F_NO_TUNNEL_KEY flag. On egress, the resulting tunnel header will not contain a tunnel key if the protocol and implementation supports it. At the moment bpf_tunnel_key wants a user to specify a numeric tunnel key. This will wrap the inner packet into a tunnel header with the key bit and value set accordingly. This is problematic when using a tunnel protocol that supports optional tunnel keys and a receiving tunnel device that is not expecting packets with the key bit set. The receiver won't decapsulate and drop the packet. RFC 2890 and RFC 2784 GRE tunnels are examples where this flag is useful. It allows for generating packets, that can be decapsulated by a GRE tunnel device not operating in collect metadata mode or not expecting the key bit set. Signed-off-by: Christian Ehrig Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20221218051734.31411-1-cehrig@cloudflare.com commit 64f4660f691c61506828faef38ef374811fbbe71 Merge: e2bb9e01d589f 68be98e0f4191 Author: Martin KaFai Lau Date: Mon Dec 19 14:21:05 2022 -0800 Merge branch 'samples/bpf: fix LLVM compilation warning' "Daniel T. Lee" says: ==================== Currently, compiling samples/bpf with LLVM emits several warning. They are only small details, but they do not appear when compiled with GCC. Detailed compilation command and warning logs can be found from bpf CI. ==================== Signed-off-by: Martin KaFai Lau commit 68be98e0f4191abc64c871e3e461f275715eaf67 Author: Daniel T. Lee Date: Sun Dec 18 15:14:53 2022 +0900 samples/bpf: fix uninitialized warning with test_current_task_under_cgroup Currently, compiling samples/bpf with LLVM warns about the uninitialized use of variable with test_current_task_under_cgroup. ./samples/bpf/test_current_task_under_cgroup_user.c:57:6: warning: variable 'cg2' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (setup_cgroup_environment()) ^~~~~~~~~~~~~~~~~~~~~~~~~~ ./samples/bpf/test_current_task_under_cgroup_user.c:106:8: note: uninitialized use occurs here close(cg2); ^~~ ./samples/bpf/test_current_task_under_cgroup_user.c:57:2: note: remove the 'if' if its condition is always false if (setup_cgroup_environment()) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./samples/bpf/test_current_task_under_cgroup_user.c:19:9: note: initialize the variable 'cg2' to silence this warning int cg2, idx = 0, rc = 1; ^ = 0 1 warning generated. This commit resolve this compiler warning by pre-initialize the variable with error for safeguard. Signed-off-by: Daniel T. Lee Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20221218061453.6287-4-danieltimlee@gmail.com Signed-off-by: Martin KaFai Lau commit 71135b77aac75769f6dae81ac4725405f1015d22 Author: Daniel T. Lee Date: Sun Dec 18 15:14:52 2022 +0900 samples/bpf: replace meaningless counter with tracex4 Currently, compiling samples/bpf with LLVM warns about the unused but set variable with tracex4_user. ./samples/bpf/tracex4_user.c:54:14: warning: variable 'i' set but not used [-Wunused-but-set-variable] int map_fd, i, j = 0; ^ 1 warning generated. This commit resolve this compiler warning by replacing the meaningless counter. Signed-off-by: Daniel T. Lee Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20221218061453.6287-3-danieltimlee@gmail.com Signed-off-by: Martin KaFai Lau commit 13aa2a92840dd49a64362ddd1e4d16084a4b9e0f Author: Daniel T. Lee Date: Sun Dec 18 15:14:51 2022 +0900 samples/bpf: remove unused function with test_lru_dist Currently, compiling samples/bpf with LLVM warns about the unused function with test_lru_dist. ./samples/bpf/test_lru_dist.c:45:19: warning: unused function 'list_empty' [-Wunused-function] static inline int list_empty(const struct list_head *head) ^ 1 warning generated. This commit resolve this compiler warning by removing the abandoned function. Signed-off-by: Daniel T. Lee Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20221218061453.6287-2-danieltimlee@gmail.com Signed-off-by: Martin KaFai Lau commit e2bb9e01d589f7fa82573aedd2765ff9b277816a Author: Jiri Olsa Date: Thu Dec 15 22:44:30 2022 +0100 bpf: Remove trace_printk_lock Both bpf_trace_printk and bpf_trace_vprintk helpers use static buffer guarded with trace_printk_lock spin lock. The spin lock contention causes issues with bpf programs attached to contention_begin tracepoint [1][2]. Andrii suggested we could get rid of the contention by using trylock, but we could actually get rid of the spinlock completely by using percpu buffers the same way as for bin_args in bpf_bprintf_prepare function. Adding new return 'buf' argument to struct bpf_bprintf_data and making bpf_bprintf_prepare to return also the buffer for printk helpers. [1] https://lore.kernel.org/bpf/CACkBjsakT_yWxnSWr4r-0TpPvbKm9-OBmVUhJb7hV3hY8fdCkw@mail.gmail.com/ [2] https://lore.kernel.org/bpf/CACkBjsaCsTovQHFfkqJKto6S4Z8d02ud1D7MPESrHa1cVNNTrw@mail.gmail.com/ Reported-by: Hao Sun Suggested-by: Andrii Nakryiko Signed-off-by: Jiri Olsa Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20221215214430.1336195-4-jolsa@kernel.org commit f19a4050455aad847fb93f18dc1fe502eb60f989 Author: Jiri Olsa Date: Thu Dec 15 22:44:29 2022 +0100 bpf: Do cleanup in bpf_bprintf_cleanup only when needed Currently we always cleanup/decrement bpf_bprintf_nest_level variable in bpf_bprintf_cleanup if it's > 0. There's possible scenario where this could cause a problem, when bpf_bprintf_prepare does not get bin_args buffer (because num_args is 0) and following bpf_bprintf_cleanup call decrements bpf_bprintf_nest_level variable, like: in task context: bpf_bprintf_prepare(num_args != 0) increments 'bpf_bprintf_nest_level = 1' -> first irq : bpf_bprintf_prepare(num_args == 0) bpf_bprintf_cleanup decrements 'bpf_bprintf_nest_level = 0' -> second irq: bpf_bprintf_prepare(num_args != 0) bpf_bprintf_nest_level = 1 gets same buffer as task context above Adding check to bpf_bprintf_cleanup and doing the real cleanup only if we got bin_args data in the first place. Signed-off-by: Jiri Olsa Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20221215214430.1336195-3-jolsa@kernel.org commit 78aa1cc9404399a15d2a1205329c6a06236f5378 Author: Jiri Olsa Date: Thu Dec 15 22:44:28 2022 +0100 bpf: Add struct for bin_args arg in bpf_bprintf_prepare Adding struct bpf_bprintf_data to hold bin_args argument for bpf_bprintf_prepare function. We will add another return argument to bpf_bprintf_prepare and pass the struct to bpf_bprintf_cleanup for proper cleanup in following changes. Signed-off-by: Jiri Olsa Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20221215214430.1336195-2-jolsa@kernel.org commit 9054b41c4e1b5725e573c13166cee56bf7034bbd Author: Miaoqian Lin Date: Sun Dec 18 17:09:54 2022 +0400 net: Fix documentation for unregister_netdevice_notifier_net unregister_netdevice_notifier_net() is used for unregister a notifier registered by register_netdevice_notifier_net(). Also s/into/from/. Signed-off-by: Miaoqian Lin Signed-off-by: David S. Miller commit 801fa7a81f6da533cc5442fc40e32c72b76cd42a Author: Matthew Auld Date: Fri Dec 16 11:34:56 2022 +0000 drm/i915: improve the catch-all evict to handle lock contention The catch-all evict can fail due to object lock contention, since it only goes as far as trylocking the object, due to us already holding the vm->mutex. Doing a full object lock here can deadlock, since the vm->mutex is always our inner lock. Add another execbuf pass which drops the vm->mutex and then tries to grab the object will the full lock, before then retrying the eviction. This should be good enough for now to fix the immediate regression with userspace seeing -ENOSPC from execbuf due to contended object locks during GTT eviction. v2 (Mani) - Also revamp the docs for the different passes. Testcase: igt@gem_ppgtt@shrink-vs-evict-* Fixes: 7e00897be8bf ("drm/i915: Add object locking to i915_gem_evict_for_node and i915_gem_evict_something, v2.") References: https://gitlab.freedesktop.org/drm/intel/-/issues/7627 References: https://gitlab.freedesktop.org/drm/intel/-/issues/7570 References: https://bugzilla.mozilla.org/show_bug.cgi?id=1779558 Signed-off-by: Matthew Auld Cc: Maarten Lankhorst Cc: Thomas Hellström Cc: Tvrtko Ursulin Cc: Andrzej Hajda Cc: Mani Milani Cc: # v5.18+ Reviewed-by: Mani Milani Tested-by: Mani Milani Link: https://patchwork.freedesktop.org/patch/msgid/20221216113456.414183-1-matthew.auld@intel.com commit aba5b397cad7d398b385aaf5029f99f41b690466 Author: Borislav Petkov (AMD) Date: Sun Dec 18 13:04:05 2022 +0100 hamradio: baycom_epp: Do not use x86-specific rdtsc() Use get_cycles() which is provided by pretty much every arch. The UML build works too because get_cycles() is a simple "return 0;" because the rdtsc() is optimized away there. Signed-off-by: Borislav Petkov (AMD) Signed-off-by: David S. Miller commit 1d330d4fa8ba5833ff1d9be6e96b72ebc1fa236f Author: Christoph Heiss Date: Sat Dec 17 11:40:24 2022 +0100 net: alx: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Using these macros allows to remove an #ifdef-guard on CONFIG_PM_SLEEP. No functional changes. Signed-off-by: Christoph Heiss Signed-off-by: David S. Miller commit 678e5b2258e871b22fe8c26edac2723feb852a47 Author: Christian König Date: Mon May 9 10:49:44 2022 +0200 drm/qxl: stop using ttm_bo_wait TTM is just wrapping core DMA functionality here, remove the mid-layer. No functional change. Signed-off-by: Christian König Acked-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20221125102137.1801-6-christian.koenig@amd.com commit 5d9306052180ec2b900669ed8c1172fe00f8dd1a Author: Melissa Wen Date: Mon Dec 5 12:55:38 2022 -0100 drm/v3d: replace obj lookup steps with drm_gem_objects_lookup As v3d_lookup_bos() performs the same steps as drm_gem_objects_lookup(), replace the explicit code in v3d to simply use the DRM function. Signed-off-by: Melissa Wen Reviewed-by: Maíra Canal Signed-off-by: Melissa Wen Link: https://patchwork.freedesktop.org/patch/msgid/20221205135538.3545051-3-mwen@igalia.com commit f98c5ec25162fbb019212c64cdd3bfde8af1fac7 Author: Melissa Wen Date: Mon Dec 5 12:55:37 2022 -0100 drm/v3d: cleanup BOs properly when lookup_bos fails When v3d_lookup_bos fails to `allocate validated BO pointers`, job->bo_count was already set to args->bo_count, but job->bo points to NULL. In this scenario, we must verify that job->bo is not NULL before iterating on it to proper clean up a job. Also, drm_gem_object_put already checks that the object passed is not NULL, doing the job->bo[i] checker redundant. Signed-off-by: Melissa Wen Reviewed-by: Maíra Canal Signed-off-by: Melissa Wen Link: https://patchwork.freedesktop.org/patch/msgid/20221205135538.3545051-2-mwen@igalia.com commit bcd5b5912c6ce4f7c9491407a38b5d0acd11459b Merge: 563a5423b7b75 b29e6ece454f7 Author: Andrew Morton Date: Sat Dec 17 20:41:05 2022 -0800 Merge branch 'master' into mm-nonmm-stable commit ad40920e0080e28868b6010a5d433c9cfc8ba7ad Merge: bcfbff2ea3165 b29e6ece454f7 Author: Andrew Morton Date: Sat Dec 17 20:40:50 2022 -0800 Merge branch 'master' into mm-stable commit d0fa30be3178724117bee95be4d7c576b246dd7f Author: Umesh Nerlige Ramappa Date: Mon Dec 12 14:09:02 2022 -0800 drm/i915/mtl: Add OA support by enabling 32 bit OAG formats for MTL Without an entry in oa_init_supported_formats, OA will not be functional in MTL. Enable OA support by enabling 32 bit OAG formats for MTL. Mesa MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20228 Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221212220902.1819159-5-umesh.nerlige.ramappa@intel.com commit d654ae8b9870d3951fd32ff8c60473ee6c1e7d4c Author: Umesh Nerlige Ramappa Date: Mon Dec 12 14:09:01 2022 -0800 drm/i915/mtl: Update OA mux whitelist for MTL 0x20cc (WAIT_FOR_RC6_EXIT on other platforms) is repurposed on MTL. Use a separate mux table to verify oa configs passed by user. Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221212220902.1819159-4-umesh.nerlige.ramappa@intel.com commit a6b443020faca5f56d1d28e9d7ceab0e386e9e7f Author: Umesh Nerlige Ramappa Date: Mon Dec 12 14:09:00 2022 -0800 drm/i915/mtl: Add Wa_14015846243 to fix OA vs CS timestamp mismatch Similar to ACM, OA timestamp that is part of the OA report is shifted when compared to the CS timestamp. Add MTL to the WA. Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221212220902.1819159-3-umesh.nerlige.ramappa@intel.com commit a4b6e74c88cc9c15257d1aaee8024d8eaa9813e7 Author: Umesh Nerlige Ramappa Date: Mon Dec 12 14:08:59 2022 -0800 drm/i915/mtl: Resize noa_wait BO size to save restore GPR regs On MTL, gt->scratch was using stolen lmem. An MI_SRM to stolen lmem caused a hang that was attributed to saving and restoring the GPR registers used for noa_wait. Add an additional page in noa_wait BO to save/restore GPR registers for the noa_wait logic. Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221212220902.1819159-2-umesh.nerlige.ramappa@intel.com commit 563a5423b7b75e1bee8b91caddf3181cca2a74bd Merge: f9eeef5918bbe 77856d911a8c8 Author: Andrew Morton Date: Fri Dec 16 14:45:03 2022 -0800 Merge branch 'master' into mm-nonmm-stable commit bcfbff2ea3165d07775097df710cb4241fcd2567 Merge: 8b777594d2341 77856d911a8c8 Author: Andrew Morton Date: Fri Dec 16 14:44:49 2022 -0800 Merge branch 'master' into mm-stable commit 4b6cb2b67da883bc5095ee6d77f951f1cd7a1c24 Author: Lucas Stach Date: Fri Nov 25 12:25:19 2022 +0100 drm/imx: move IPUv3 driver into separate subdirectory The IPUv3 and DCSS driver are two totally separate DRM drivers. Having one of them live in the drivers/gpu/drm/imx toplevel directory and the other one in the dcss/ subdirectory is confusing. Move the IPUv3 driver into its own subdirectory to make the separation more clear. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel Link: https://lore.kernel.org/r/20221125112519.3849636-1-l.stach@pengutronix.de Signed-off-by: Philipp Zabel Link: https://patchwork.freedesktop.org/patch/msgid/20221125112519.3849636-1-l.stach@pengutronix.de commit 4333472f8d7befe62359fecb1083cd57a6e07bfc Author: Philipp Zabel Date: Tue Nov 8 15:14:20 2022 +0100 drm/imx: ipuv3-plane: Fix overlay plane width ipu_src_rect_width() was introduced to support odd screen resolutions such as 1366x768 by internally rounding up primary plane width to a multiple of 8 and compensating with reduced horizontal blanking. This also caused overlay plane width to be rounded up, which was not intended. Fix overlay plane width by limiting the rounding up to the primary plane. drm_rect_width(&new_state->src) >> 16 is the same value as drm_rect_width(dst) because there is no plane scaling support. Fixes: 94dfec48fca7 ("drm/imx: Add 8 pixel alignment fix") Reviewed-by: Lucas Stach Link: https://lore.kernel.org/r/20221108141420.176696-1-p.zabel@pengutronix.de Signed-off-by: Philipp Zabel Link: https://patchwork.freedesktop.org/patch/msgid/20221108141420.176696-1-p.zabel@pengutronix.de commit 9afdf98cfdfa2ba8ec068cf08c5fcdc1ed8daf3f Author: Liang He Date: Wed Jul 20 23:22:27 2022 +0800 gpu: ipu-v3: common: Add of_node_put() for reference returned by of_graph_get_port_by_id() In ipu_add_client_devices(), we need to call of_node_put() for reference returned by of_graph_get_port_by_id() in fail path. Fixes: 17e052175039 ("gpu: ipu-v3: Do not bail out on missing optional port nodes") Signed-off-by: Liang He Reviewed-by: Philipp Zabel Link: https://lore.kernel.org/r/20220720152227.1288413-1-windhl@126.com Signed-off-by: Philipp Zabel Link: https://patchwork.freedesktop.org/patch/msgid/20220720152227.1288413-1-windhl@126.com commit cfca78971b9233aef0891507a98fba62046d4542 Author: Tomi Valkeinen Date: Fri Sep 16 11:22:05 2022 +0300 drm/omap: dsi: Fix excessive stack usage dsi_dump_dsi_irqs(), a function used for debugfs prints, has a large struct in its frame, which can result in: drivers/gpu/drm/omapdrm/dss/dsi.c:1126:1: warning: the frame size of 1060 bytes is larger than 1024 bytes [-Wframe-larger-than=] As the performance of the function is of no concern, let's allocate the struct with kmalloc instead. Compile-tested only. Signed-off-by: Tomi Valkeinen Reported-by: kernel test robot Reviewed-by: Arnd Bergmann Link: https://patchwork.freedesktop.org/patch/msgid/20220916082206.167427-1-tomi.valkeinen@ideasonboard.com commit 88652d8a2c7c52e209b3385d63dfc82e2d80c848 Author: Yuan Can Date: Fri Oct 14 02:48:10 2022 +0000 drm/omapdrm: Remove unused struct csc_coef_rgb2yuv After commit 64ff18911878, struct csc_coef_rgb2yuv is not used any more and can be removed as well. Fixes: 64ff18911878 ("drm/omap: Enable COLOR_ENCODING and COLOR_RANGE properties for planes") Signed-off-by: Yuan Can Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20221014024810.21675-1-yuancan@huawei.com commit 2df0433b18f2735a49d2c3a968b40fa2881137c0 Author: Randolph Sapp Date: Thu Dec 1 18:18:03 2022 -0600 drm: tidss: Fix pixel format definition There was a long-standing bug from a typo that created 2 ARGB1555 and ABGR1555 pixel format entries. Weston 10 has a sanity check that alerted me to this issue. According to the Supported Pixel Data formats table we have the later entries should have been for Alpha-X instead. Signed-off-by: Randolph Sapp Fixes: 32a1795f57eecc ("drm/tidss: New driver for TI Keystone platform Display SubSystem") Reviewed-by: Aradhya Bhatia Acked-by: Andrew Davis Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20221202001803.1765805-1-rs@ti.com commit 85528a44bca8c43ff1a7d273613ba7a35ad34712 Author: Andrew Davis Date: Mon Aug 22 19:16:34 2022 -0500 drm/tidss: Set max DMA segment size We have no segment size limitations. Set to unlimited. Signed-off-by: Andrew Davis Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20220823001634.11461-1-afd@ti.com commit 50490ce05b7a50b0bd4108fa7d6db3ca2972fa83 Author: Lucas De Marchi Date: Wed Dec 14 11:49:44 2022 -0800 drm/i915: Remove __maybe_unused from mtl_info The attribute __maybe_unused should remain only until the respective info is not in the pciidlist. The info can't be added together with its definition because that would cause the driver to automatically probe for the device, while it's still not ready for that. However once pciidlist contains it, the attribute can be removed. Fixes: 7835303982d1 ("drm/i915/mtl: Add MeteorLake PCI IDs") Signed-off-by: Lucas De Marchi Reviewed-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20221214194944.3670344-1-lucas.demarchi@intel.com commit 9a4cea629a36e836ba384b3adeb5942dacdbabbd Author: Lucas De Marchi Date: Wed Dec 14 16:14:59 2022 -0800 drm/i915: ratelimit errors in display engine irq While debugging page table faults it's useful not to kill the machine with thousands of error mesages. Ratelimit all errors in gen8_de_irq_handler(). Signed-off-by: Lucas De Marchi Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20221215001459.3759580-1-lucas.demarchi@intel.com commit 33f960e23c29d113fe3193e0bdc19ac4f3776f20 Author: Imre Deak Date: Wed Dec 14 20:42:58 2022 +0200 drm/display/dp_mst: Fix payload addition on a disconnected sink If an MST stream is enabled on a disconnected sink, the payload for the stream is not created and the MST manager's payload count/next start VC slot is not updated. Since the payload's start VC slot may still contain a valid value (!= -1) the subsequent disabling of such a stream could cause an incorrect decrease of the payload count/next start VC slot in drm_dp_remove_payload() and hence later payload additions will fail. Fix the above by marking the payload as invalid in the above case, so that it's skipped during payload removal. While at it add a debug print for this case. Cc: Lyude Paul Cc: # v6.1+ Signed-off-by: Imre Deak Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20221214184258.2869417-3-imre.deak@intel.com commit 1241aedb6b5c7a5a8ad73e5eb3a41cfe18a3e00e Author: Imre Deak Date: Wed Dec 14 20:42:57 2022 +0200 drm/display/dp_mst: Fix down message handling after a packet reception error After an error during receiving a packet for a multi-packet DP MST sideband message, the state tracking which packets have been received already is not reset. This prevents the reception of subsequent down messages (due to the pending message not yet completed with an end-of-message-transfer packet). Fix the above by resetting the reception state after a packet error. Cc: Lyude Paul Cc: # v3.17+ Signed-off-by: Imre Deak Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20221214184258.2869417-2-imre.deak@intel.com commit 1d082618bbf3b6755b8cc68c0a8122af2842d593 Author: Imre Deak Date: Wed Dec 14 20:42:56 2022 +0200 drm/display/dp_mst: Fix down/up message handling after sink disconnect If the sink gets disconnected during receiving a multi-packet DP MST AUX down-reply/up-request sideband message, the state keeping track of which packets have been received already is not reset. This results in a failed sanity check for the subsequent message packet received after a sink is reconnected (due to the pending message not yet completed with an end-of-message-transfer packet), indicated by the "sideband msg set header failed" error. Fix the above by resetting the up/down message reception state after a disconnect event. Cc: Lyude Paul Cc: # v3.17+ Signed-off-by: Imre Deak Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20221214184258.2869417-1-imre.deak@intel.com commit 8d784ba93d5f3b52d62fe23c08c3c8ea7b36d622 Author: Paul Cercueil Date: Wed Dec 14 14:01:31 2022 +0100 drm: bridge: it66121: Add support for the IT6610 Add support for the IT6610 HDMI encoder. The hardware is very similar, and therefore the driver did not require too many changes. Some bits are only available on the IT66121, and vice-versa. Also, the IT6610 requires specific polarities on the DE and pixel lines. Signed-off-by: Paul Cercueil Reviewed-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20221214130131.12962-1-paul@crapouillou.net commit 9a9f4a01bdae18c3937477c5f91aee8367683562 Author: Paul Cercueil Date: Wed Dec 14 14:01:22 2022 +0100 drm: bridge: it66121: Move VID/PID to new it66121_chip_info structure This will make it easier later to introduce support for new chips in this driver. Signed-off-by: Paul Cercueil Reviewed-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20221214130122.12911-1-paul@crapouillou.net commit e66856508746ba520dd5f87ac608c9a1ae547a17 Author: Paul Cercueil Date: Wed Dec 14 13:58:19 2022 +0100 drm: bridge: it66121: Set DDC preamble only once before reading EDID The DDC preamble and target address only need to be set once before reading the EDID, even if multiple segments have to be read. Signed-off-by: Paul Cercueil Reviewed-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20221214125821.12489-9-paul@crapouillou.net commit d7f139da0cd193f313dbd6607635cf68e2dc662b Author: Paul Cercueil Date: Wed Dec 14 13:58:18 2022 +0100 drm: bridge: it66121: Don't clear DDC FIFO twice The DDC FIFO was cleared before the loop in it66121_get_edid_block(), and at the beginning of each iteration; which means that it did not have to be cleared before the loop. Signed-off-by: Paul Cercueil Reviewed-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20221214125821.12489-8-paul@crapouillou.net commit 12530ae469c0fb2f1f1c4f4d95fc6aaccd8b3519 Author: Paul Cercueil Date: Wed Dec 14 13:58:17 2022 +0100 drm: bridge: it66121: Don't use DDC error IRQs The DDC error IRQs will fire on the IT6610 every time the FIFO is empty, which is not very helpful. To resolve this, we can simply disable them, and handle DDC errors in it66121_wait_ddc_ready(). Signed-off-by: Paul Cercueil Reviewed-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20221214125821.12489-7-paul@crapouillou.net commit 66bb0a7c612e0cd82ffda8c4fe42f2f404132000 Author: Paul Cercueil Date: Wed Dec 14 13:58:16 2022 +0100 drm: bridge: it66121: Fix wait for DDC ready The function it66121_wait_ddc_ready() would previously read the status register until "true", which means it never actually polled anything and would just read the register once. Now, it will properly wait until the DDC hardware is ready or until it reported an error. The 'busy' variable was also renamed to 'error' since these bits are set on error and not when the DDC hardware is busy. Since the DDC ready function is now working properly, the msleep(20) can be removed. Signed-off-by: Paul Cercueil Reviewed-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20221214125821.12489-6-paul@crapouillou.net commit 6ba98fd6df6536c9d59b2a6576673265864b624d Author: Paul Cercueil Date: Wed Dec 14 13:58:15 2022 +0100 drm: bridge: it66121: Write AVI infoframe with regmap_bulk_write() Since all AVI infoframe registers are contiguous in the address space, the AVI infoframe can be written in one go with regmap_bulk_write(). Signed-off-by: Paul Cercueil Reviewed-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20221214125821.12489-5-paul@crapouillou.net commit 315c9fb770c3f5376518c45db1ac20ac769150dd Author: Paul Cercueil Date: Wed Dec 14 13:58:14 2022 +0100 drm: bridge: it66121: Use regmap_noinc_read() Use regmap_noinc_read() instead of reading the data from the DDC FIFO one byte at a time. Signed-off-by: Paul Cercueil Reviewed-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20221214125821.12489-4-paul@crapouillou.net commit 334c8c1d3f2b0a77ef4f1577b3f5045564921c31 Author: Paul Cercueil Date: Wed Dec 14 13:58:13 2022 +0100 drm: bridge: it66121: Use devm_regulator_bulk_get_enable() Simplify the code of the driver by using devm_regulator_bulk_get_enable(), which will handle powering up the regulators, and disabling them on probe error or module removal. Signed-off-by: Paul Cercueil Reviewed-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20221214125821.12489-3-paul@crapouillou.net commit d595bde8b9891e7ec6bc087c8fe0c758322d25ab Author: Paul Cercueil Date: Wed Dec 14 13:58:12 2022 +0100 dt-bindings: display: bridge: it66121: Add compatible string for IT6610 Add a new ite,it6610 compatible string to the IT66121 binding documentation, since the two chips are very similar. Signed-off-by: Paul Cercueil Reviewed-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20221214125821.12489-2-paul@crapouillou.net commit 0e43662e61f2569500ab83b8188c065603530785 Author: Shen Jiamin Date: Thu Dec 15 12:47:03 2022 +0800 tools/resolve_btfids: Use pkg-config to locate libelf When libelf was not installed in the standard location, it cannot be located by the current building config. Use pkg-config to help locate libelf in such cases. Signed-off-by: Shen Jiamin Signed-off-by: Daniel Borkmann Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20221215044703.400139-1-shen_jiamin@comp.nus.edu.sg commit 4fb877aaa179dcdb1676d55216482febaada457e Author: Andrii Nakryiko Date: Thu Dec 15 10:36:05 2022 -0800 libbpf: Fix btf_dump's packed struct determination Fix bug in btf_dump's logic of determining if a given struct type is packed or not. The notion of "natural alignment" is not needed and is even harmful in this case, so drop it altogether. The biggest difference in btf_is_struct_packed() compared to its original implementation is that we don't really use btf__align_of() to determine overall alignment of a struct type (because it could be 1 for both packed and non-packed struct, depending on specifci field definitions), and just use field's actual alignment to calculate whether any field is requiring packing or struct's size overall necessitates packing. Add two simple test cases that demonstrate the difference this change would make. Fixes: ea2ce1ba99aa ("libbpf: Fix BTF-to-C converter's padding logic") Reported-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Eduard Zingerman Link: https://lore.kernel.org/bpf/20221215183605.4149488-1-andrii@kernel.org commit 44da2032063502d32129350656934668d11087d1 Author: Matt Roper Date: Tue Dec 13 15:41:19 2022 -0800 drm/i915/dg2: Return Wa_22012654132 to just specific steppings Programming of the ENABLE_PREFETCH_INTO_IC bit originally showed up in both the general DG2 tuning guide (applicable to all DG2 variants/steppings) and under Wa_22012654132 (applicable only to specific steppings). It has now been removed from the tuning guide, and the guidance is to only program it in the specific steppings associated with the workaround. Bspec: 68331 Signed-off-by: Matt Roper Reviewed-by: Matt Atwood Link: https://patchwork.freedesktop.org/patch/msgid/20221213234119.2963317-1-matthew.d.roper@intel.com commit e4f665de417d8b923e638da1751c2c94eb68c713 Author: Candice Li Date: Mon Sep 19 14:47:56 2022 +0800 drm/amdgpu: Add poison mode query for df v4_3 Add poison mode query support on df v4_3. Signed-off-by: Candice Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 6c03a3fc912f74fe2ff588b42d30f52bc9001ab8 Author: Candice Li Date: Mon Sep 19 14:44:40 2022 +0800 drm/amdgpu: Add df v4_3 headers Add df v4_3 header files. Signed-off-by: Candice Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit cf5cf3498356810fa211d3598ecb1a884b9db095 Author: Evan Quan Date: Fri Dec 9 10:58:14 2022 +0800 drm/amdgpu: bump minor version number for DEV_INFO and SENSOR IOCTLs update Update AMDGPU_INFO_DEV_INFO IOCTL for minimum engine and memory clock. And update AMDGPU_INFO_SENSOR IOCTL for PEAK_PSTATE engine and memory clock. User applications can better utilize these IOCTLs to get needed informations. Increase the minor version number to indicate that the new flags are available. Proposed mesa patch: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/278 Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 88347fa18bead86949c45229faaa2c66177c62fb Author: Evan Quan Date: Mon Dec 5 10:09:38 2022 +0800 drm/amdgpu: expose the minimum shader/memory clock frequency Otherwise, some UMD tools will treate them as 0 at default while actually they are not. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 5cfd978490d82486fc3286a72009fb3229760555 Author: Evan Quan Date: Mon Dec 5 14:43:00 2022 +0800 drm/amdgpu: expose peak profiling mode shader/memory clocks Expose those informations to UMD who need them as for standard profiling mode. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b1a9557a7d00c758ed9e701fbb3445a13a49506f Author: Evan Quan Date: Mon Dec 5 14:40:59 2022 +0800 drm/amd/pm: fulfill powerplay peak profiling mode shader/memory clock settings Enable peak profiling mode shader/memory clock reporting for powerplay framework. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 975b4b1d90ccf83da252907108f4090fb61b816e Author: Evan Quan Date: Mon Dec 5 12:02:35 2022 +0800 drm/amd/pm: fulfill swsmu peak profiling mode shader/memory clock settings Enable peak profiling mode shader/memory clocks reporting for swsmu framework. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e1dd28fc5bef3b9abce7713fb0bd136ff63488a1 Author: Evan Quan Date: Mon Dec 5 15:34:39 2022 +0800 drm/amd/pm: drop unused SMU v13 API The API is not in use. And it's unlikely to be used in the future either. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 50371be6c7b7c1b40afc1e7f215d60f7f41913c4 Author: Sung Joon Kim Date: Thu Dec 8 13:55:45 2022 -0500 drm/display: Add missing Adaptive Sync DPCD definitions The missing DPCD definitions from DP2.0 spec is as follows: DOWNSPREAD_CTRL (107h): FIXED_VTOTAL_AS_SDP_EN_IN_PR_ACTIVE (bit 6) For sink devices that support Adaptive-Sync operation and Panel Replay DPRX_FEATURE_ENUMERATION_LIST_CONT_1 (2214h): ADAPTIVE_SYNC_SDP_SUPPORTED (bit 0) Bit to check sink device has Adaptive-Sync capability AS_SDP_FIRST_HALF_LINE_OR_3840_PIXEL_CYCLE_WINDOW_NOT_SUPPORTED (bit 1) A sink device that clears this bit will generate VSync pulse leading edge of the HDMI output on the line count at which Adaptive-Sync SDP is received as long as source device transmits Adaptive-Sync SDP either in first line or first 3840 pixel cycles of the line whichever occurs first. VSC_EXT_SDP_FRAMEWORK_VERSION_1_SUPPORTED (bit 4) Bit to check sink device has SDP framework version 1 capability Signed-off-by: Sung Joon Kim Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 09ccde9191951aa979950c54fdd26e5676afa75d Author: Paulo Miguel Almeida Date: Fri Dec 9 21:24:09 2022 +1300 drm/radeon: Replace 1-element arrays with flexible-array members 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 structs _ATOM_DISPLAY_OBJECT_PATH, _ATOM_DISPLAY_OBJECT_PATH_TABLE, _ATOM_OBJECT_TABLE, GOP_VBIOS_CONTENT _ATOM_GPIO_VOLTAGE_OBJECT_V3 and refactor the rest of the code accordingly. It's worth mentioning that doing a build before/after this patch results in no binary output differences. 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/79 Link: https://github.com/KSPP/linux/issues/239 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 [1] Signed-off-by: Paulo Miguel Almeida Signed-off-by: Alex Deucher commit 2dd9032beb699016f8c3076c98a1d457a13abb10 Author: Tao Zhou Date: Tue Dec 6 10:46:09 2022 +0800 drm/amdgpu: define RAS query poison mode function 1. no need to query poison mode on SRIOV guest side, host can handle it. 2. define the function to simplify code. v2: rename amdgpu_ras_poison_mode_query to amdgpu_ras_query_poison_mode. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 3189501e6f024931079936a592d677128826ef14 Author: Tao Zhou Date: Mon Dec 5 16:23:32 2022 +0800 drm/amdgpu: update VCN/JPEG RAS setting Support VCN/JPEG RAS in both bare metal and SRIOV environment. v2: update commit description. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 248c9635b8bd9d0c1649031da531d80e850fbdbe Author: Tao Zhou Date: Thu Dec 8 11:51:47 2022 +0800 drm/amdgpu: skip RAS error injection in SRIOV Injection on guest is not allowed. v2: return directly in SRIOV environment. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 6a822b7acefa80e3b11f3d547f2380f1a4808aba Author: Tao Zhou Date: Mon Sep 26 14:49:10 2022 +0800 drm/amdgpu: add VCN poison consumption handler for SRIOV Inform host and let host handle consumption interrupt. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit e643823d62f2f30badaa72358b927a1de113024e Author: Tao Zhou Date: Thu Dec 8 11:17:56 2022 +0800 drm/amdgpu: add RAS poison consumption handler for SRIOV Send message to PF if VF receives RAS poison consumption interrupt. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit ae844dd79ffc60f419b32a8d6026128f18021650 Author: Tao Zhou Date: Tue Dec 6 17:04:31 2022 +0800 drm/amdgpu: add RAS poison consumption handler for NV SRIOV Send handling request to host. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 8ede944da62958da4f206f121617324ef7a5e313 Author: Tao Zhou Date: Fri Jul 29 16:32:05 2022 +0800 drm/amdgpu: add RAS poison consumption handler for AI SRIOV Send message to host and host will handle it. v2: split the patch into two parts, one is for mxgpu ai and another one is for common poison consumption handler. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 331ea5d1bd64e896e9cf79099e68456275106e79 Author: Alvin Lee Date: Thu Dec 1 18:50:57 2022 -0500 drm/amd/display: Block FPO / SubVP (DRR) on HDMI VRR configs [Description] - Current policy does not support HDMI VRR by default, so we cannot enable FPO / SubVP (DRR) cases Reviewed-by: Nevenko Stupar Reviewed-by: Jun Lei Acked-by: Jasdeep Dhillon Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher commit b54954dbc4d5e69196594ca723ff99a79aeb07da Author: Aric Cyr Date: Sun Dec 4 23:00:32 2022 -0500 drm/amd/display: 3.2.216 This version brings along following fixes: -Fix array index out of bound error -Speed up DML fast vadlaite -Implement multiple secure display -MST HDCP for multiple display -Add DPIA notification -Add support for three new square pattern variant Reviewed-by: Bhawanpreet Lakha Acked-by: Jasdeep Dhillon Signed-off-by: Aric Cyr Signed-off-by: Alex Deucher commit e81b6a4427f3ca37859f5b9fdb6a66683bb84e2e Author: Fangzhi Zuo Date: Tue Nov 22 11:14:06 2022 -0500 drm/amd/display: Demote Error Level When ODM Transition Supported [Why && How] On dcn32, HW supports odm transition in fast update. Hence this error message is considered false positive. Downgrade the error level to avoid catching unnecessary attention. Reviewed-by: Dillon Varone Acked-by: Jasdeep Dhillon Signed-off-by: Fangzhi Zuo Signed-off-by: Alex Deucher commit 345ce3fc9262881343dc6faa4ec132bc21e88756 Author: Wenjing Liu Date: Tue Nov 22 18:06:28 2022 -0500 drm/amd/display: add support for three new square pattern variants from DP2.1 specs [why] DP2.1 specs has brought 3 new variants of sqaure patterns with different pre-shoot and de-emphasis equalization requirements. The commit adds logic to identify these variants and apply corresponding eqaulization requirements into hardware lane settings. Reviewed-by: George Shen Acked-by: Jasdeep Dhillon Signed-off-by: Wenjing Liu Signed-off-by: Alex Deucher commit 752e89a70cca1c644ccc9f69c1abd6c2b95ca9d7 Author: Dillon Varone Date: Tue Nov 29 15:59:20 2022 -0500 drm/amd/display: run subvp validation with supported vlevel [WHY] Subvp portion validation currently assumes that if vlevel provided does not support pstate, then none will, and so subvp is not used. [HOW] After get vlevel, use lowest vlevel that supports pstate if it exists, and use that for subvp validation. Reviewed-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Jasdeep Dhillon Signed-off-by: Dillon Varone Signed-off-by: Alex Deucher commit 46604a08c1adb44e57822304902fd23416d33739 Author: Samson Tam Date: Tue Nov 29 18:12:33 2022 -0500 drm/amd/display: Check for PSR in no memory request case [Why] When we have a PSR display, we will not be requesting data from memory anymore. So we report back true for no memory request case. [How] Check for PSR by checking PSR version in link settings Reviewed-by: Alvin Lee Acked-by: Jasdeep Dhillon Signed-off-by: Samson Tam Signed-off-by: Alex Deucher commit bad3a066a4ee3c5b81827756e118753dc2f9afcf Author: Alvin Lee Date: Fri Dec 2 11:10:48 2022 -0500 drm/amd/display: Clear link res when merging a pipe split [Description] - When merging a pipe that was previously pipe split, we need to also clear the link resources or the next stream/plane that uses the pipe may have an incorrect link resource state Reviewed-by: Wenjing Liu Reviewed-by: Nevenko Stupar Acked-by: Jasdeep Dhillon Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher commit 669018a9929c61cb14ea374ee93df24242a7794d Author: Mustapha Ghaddar Date: Thu Dec 1 13:00:10 2022 -0500 drm/amd/display: Add DPIA NOTIFICATION logic [WHY] Adding the new DPIA NOTIFY packets from DMUB As per the design with Cruise to account for 250ms response delay otherwise [HOW] Added th DPIA NOTIFY logic as per DMUB logic Reviewed-by: Nicholas Kazlauskas Acked-by: Jasdeep Dhillon Signed-off-by: Mustapha Ghaddar Signed-off-by: Alex Deucher commit 3f6752b4de41896c7f1609b1585db2080e8150d8 Author: Roman Li Date: Thu Dec 1 09:49:23 2022 -0500 drm/amd/display: Clear MST topology if it fails to resume [Why] In case of failure to resume MST topology after suspend, an emtpty mst tree prevents further mst hub detection on the same connector. That causes the issue with MST hub hotplug after it's been unplug in suspend. [How] Stop topology manager on the connector after detecting DM_MST failure. Reviewed-by: Wayne Lin Acked-by: Jasdeep Dhillon Signed-off-by: Roman Li Signed-off-by: Alex Deucher commit e85d59885409736ad21cafd27eb73d6f7630cefb Author: Wenjing Liu Date: Thu Nov 24 16:40:53 2022 -0500 drm/amd/display: use encoder type independent hwss instead of accessing enc directly [why] in dc_link_dp there still exist a few places where we call dio encoders without checking current enabled encoder type. The change is to make these places to call hwss equivalent functions so it won't mistakenly program a wrong type encoder. Reviewed-by: George Shen Acked-by: Jasdeep Dhillon Signed-off-by: Wenjing Liu Signed-off-by: Alex Deucher commit ebf13b72020ad45c6e27f784638f247a92786cc0 Author: Leo (Hanghong) Ma Date: Thu Dec 1 13:27:59 2022 -0500 drm/amd/display: Revert Scaler HCBlank issue workaround Workaround no longer needed. Reviewed-by: Chris Park Acked-by: Jasdeep Dhillon Signed-off-by: Leo (Hanghong) Ma Signed-off-by: Alex Deucher commit 7a7175a2cd84b7874bebbf8e59f134557a34161b Author: Roman Li Date: Thu Dec 1 09:06:42 2022 -0500 drm/amd/display: Fix potential null-deref in dm_resume [Why] Fixing smatch error: dm_resume() error: we previously assumed 'aconnector->dc_link' could be null [How] Check if dc_link null at the beginning of the loop, so further checks can be dropped. Reported-by: kernel test robot Reported-by: Dan Carpenter Reviewed-by: Wayne Lin Acked-by: Jasdeep Dhillon Signed-off-by: Roman Li Signed-off-by: Alex Deucher commit 639f6ad6df7f47db48b59956b469a6917a136afb Author: Ian Chen Date: Mon Nov 28 16:17:34 2022 +0800 drm/amd/display: Revert Reduce delay when sink device not able to ACK 00340h write [WHY] It causes regression AMD source will not write DPCD 340. Reviewed-by: Wayne Lin Acked-by: Jasdeep Dhillon Signed-off-by: Ian Chen Signed-off-by: Alex Deucher commit 6e18c9b35e2d5237ed8efa03724ee5de2d16ee74 Author: Alvin Lee Date: Sat Dec 3 14:41:03 2022 -0500 drm/amd/display: Block subvp if center timing is in use [Description] - FW scheduling algorithm doesn't take into account of it's a center timing - This affects where the subvp mclk switch can be scheduled (prevents HUBP vline interrupt from coming in if scheduled incorrectly) - Block subvp center timing cases for now Reviewed-by: Jun Lei Acked-by: Jasdeep Dhillon Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher commit 6b81090d6d4cc0fd818c9ec9dbb6906f921ad396 Author: Dillon Varone Date: Fri Dec 2 22:56:57 2022 -0500 drm/amd/display: Reduce expected sdp bandwidth for dcn321 [Description] Modify soc BB to reduce expected sdp bandwidth and align with measurements to fix underflow issues. Reviewed-by: Jun Lei Acked-by: Jasdeep Dhillon Signed-off-by: Dillon Varone Signed-off-by: Alex Deucher commit d7368ea9708b79c2e8fef95ee5bc8088a4b9c2f2 Author: Dillon Varone Date: Sat Nov 26 02:03:32 2022 -0500 drm/amd/display: Add debug bit to disable unbounded requesting [Description] Add debug bit to disable unbounded requesting. Reviewed-by: Jun Lei Acked-by: Jasdeep Dhillon Signed-off-by: Dillon Varone Signed-off-by: Alex Deucher commit 1b5d0e7e15430aecbf2bb0ac634a44aec971895c Author: Ilya Bakoulin Date: Thu Nov 24 13:58:49 2022 -0500 drm/amd/display: Speed up DML fast_validate path [Why] Iterating over every voltage state when we need to validate thousands of configurations all at once (i.e. display hotplug) can take a significant amount of time. [How] Check just the highest voltage state when fast_validate is true to verify whether the configuration can work at all, then do a proper validation including all voltage states later when fast_validate is false. Reviewed-by: Jun Lei Acked-by: Jasdeep Dhillon Signed-off-by: Ilya Bakoulin Signed-off-by: Alex Deucher commit b8ff7e08bab938d84dc329a7193ebf459088727c Author: Alan Liu Date: Thu Nov 24 20:24:15 2022 +0800 drm/amd/display: Fix when disabling secure_display [Why] Fix problems when we disable secure_display. [How] - Reset secure display context after disabled - A secure_display_context is dedicate to a crtc, so we set the crtc for it when we create the context. Reviewed-by: Wayne Lin Acked-by: Jasdeep Dhillon Signed-off-by: Alan Liu Signed-off-by: Alex Deucher commit 9dc5b360cc9ad3498cc5674a5905742fe722e140 Author: Charlene Liu Date: Tue Nov 29 18:50:11 2022 -0500 Revert "drm/amd/display: correct static_screen_event_mask" This reverts commit c800d9ff8cdec57778ab21f4d933a25f41f44738. [why] revert for now because this change exposed other issue. Signed-off-by: Charlene Liu Signed-off-by: Alex Deucher commit 1b11ff764aefc0aa5199ad5ae4c45e591ca3090a Author: Alan Liu Date: Wed Oct 19 18:15:14 2022 +0800 drm/amd/display: Implement multiple secure display [Why] Current secure display only work with single display, now make it work with multiple displays. [How] Create secure_display_context for each crtc instance to store its own Region of Interest (ROI) information. v2: squash in warning fix (Alex) Reviewed-by: Wayne Lin Acked-by: Jasdeep Dhillon Signed-off-by: Alan Liu Signed-off-by: Alex Deucher commit 380d920b582d0f83852ac6885af868d93c38095b Author: allen chen Date: Thu Nov 3 17:12:43 2022 +0800 drm/bridge: add it6505 driver to read data-lanes and link-frequencies from dt Add driver to read data-lanes and link-frequencies from dt property to restrict output bandwidth. Signed-off-by: allen chen Signed-off-by: Pin-yen Lin Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20221103091243.96036-3-allen.chen@ite.com.tw Link: https://patchwork.freedesktop.org/patch/msgid/20221103091243.96036-2-allen.chen@ite.com.tw Link: https://patchwork.freedesktop.org/patch/msgid/20221103091243.96036-3-allen.chen@ite.com.tw commit bc80959484fce1f3c69114f681ae27c6f1d8601f Author: allen chen Date: Thu Nov 3 17:12:42 2022 +0800 dt-bindings: it6505: add properties to restrict output bandwidth Currently there are no "upstream" users. So, no existing users to break. Add properties to restrict dp output data-lanes and clock. Signed-off-by: Pin-Yen Lin Signed-off-by: allen Chen Reviewed-by: Krzysztof Kozlowski Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20221103091243.96036-2-allen.chen@ite.com.tw commit 11feaef69d0cb81278294299bbfd86f94c2004e3 Author: Pin-yen Lin Date: Tue Nov 15 19:27:20 2022 +0800 drm/bridge: it6505: Add caching for EDID Add caching when EDID is read, and invalidate the cache until the bridge detects HPD low or sink count changes on HPD_IRQ. It takes 1.2s for IT6505 bridge to read a 3-block EDID, and skipping one EDID read would be a notable difference on user experience. Signed-off-by: Pin-yen Lin Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20221115112720.911158-1-treapking@chromium.org commit 2a9df204be0bbb896e087f00b9ee3fc559d5a608 Author: Robert Foss Date: Tue Dec 13 16:03:04 2022 +0100 drm/bridge: lt9611: Fix PLL being unable to lock This fixes PLL being unable to lock, and is derived from an equivalent downstream commit. Available LT9611 documentation does not list this register, neither does LT9611UXC (which is a different chip). This commit has been confirmed to fix HDMI output on DragonBoard 845c. Suggested-by: Amit Pundir Reviewed-by: Amit Pundir Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20221213150304.4189760-1-robert.foss@linaro.org commit 4d5cf7b1680a1e6db327e3c935ef58325cbedb2c Author: Andrzej Hajda Date: Wed Dec 14 08:54:39 2022 +0100 drm/i915: fix TLB invalidation for Gen12.50 video and compute engines In case of Gen12.50 video and compute engines, TLB_INV registers are masked - to modify one bit, corresponding bit in upper half of the register must be enabled, otherwise nothing happens. Fixes: 77fa9efc16a9 ("drm/i915/xehp: Create separate reg definitions for new MCR registers") Signed-off-by: Andrzej Hajda Reviewed-by: Tvrtko Ursulin Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20221214075439.402485-1-andrzej.hajda@intel.com commit 7d7bf35d630751fb27f2041c680a5ddccae9d83c Author: Dave Stevenson Date: Wed Dec 7 11:22:49 2022 +0100 drm/vc4: dsi: Remove entry to ULPS from vc4_dsi post_disable Post_disable was sending the D-PHY sequence to put any device into ULPS suspend mode, and then cutting power to the DSI block. The power-on reset state of the DSI block is for DSI to be in an operational state, not ULPS, so it then never sent the sequence for exiting ULPS. Any attached device that didn't have an external reset therefore remained in ULPS / standby, and didn't function. Use of ULPS isn't well specified in DRM, therefore remove entering it to avoid the above situation. Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20221207-rpi-dsi-bridge-v1-6-8f68ee0b0adb@cerno.tech Signed-off-by: Maxime Ripard commit 78df640394cd0de88b9f84982f90f2079e60a5b7 Author: Dave Stevenson Date: Wed Dec 7 11:22:48 2022 +0100 drm/vc4: dsi: Convert to using a bridge instead of encoder Remove the encoder functions, and create a bridge attached to this dumb encoder which implements the same functionality. As a bridge has state which an encoder doesn't, we need to add the state management functions as well. As there is no bridge atomic_mode_set, move the initialisation code that was in mode_set into _pre_enable. The code to actually enable and disable sending video are split from the general control into _enable and _disable. Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20221207-rpi-dsi-bridge-v1-5-8f68ee0b0adb@cerno.tech Signed-off-by: Maxime Ripard commit 91ef7f4cf49433fe7c27307724dc9914caca9927 Author: Dave Stevenson Date: Wed Dec 7 11:22:47 2022 +0100 drm/vc4: dsi: Convert to use atomic operations The atomic calls are preferred as the non-atomic ones are deprecated. In preparation for conversion to a bridge, switch to the atomic calls. Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20221207-rpi-dsi-bridge-v1-4-8f68ee0b0adb@cerno.tech Signed-off-by: Maxime Ripard commit f79522e438897b34b7bc7d068bc8b355c99d709a Author: Dave Stevenson Date: Wed Dec 7 11:22:46 2022 +0100 drm/vc4: dsi: Remove splitting the bridge chain from the driver Splitting the bridge chain fails for atomic bridges as the framework can't add the relevant state in drm_atomic_add_encoder_bridges. The chain was split because we needed to power up before calling pre_enable, but that is now done in mode_set, and will move into the framework. Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20221207-rpi-dsi-bridge-v1-3-8f68ee0b0adb@cerno.tech Signed-off-by: Maxime Ripard commit c9a396cf6094dd83892c9932582b4b9801254daf Author: Dave Stevenson Date: Wed Dec 7 11:22:45 2022 +0100 drm/vc4: dsi: Move initialisation to encoder_mode_set Breaking the bridge chain does not work for atomic bridges/panels and generally causes issues. We need to initialise the DSI host before the bridge pre_enables are called, so move that to encoder_mode_set in the same way that dw-mipi-dsi does. Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20221207-rpi-dsi-bridge-v1-2-8f68ee0b0adb@cerno.tech Signed-off-by: Maxime Ripard commit 9fc925805d1af8591a3cbbe0331d4d29edc12dc6 Author: Dave Stevenson Date: Wed Dec 7 11:22:44 2022 +0100 drm/vc4: dsi: Rename bridge to out_bridge In preparation for converting the encoder to being a bridge, rename the variable holding the next bridge in the chain to out_bridge, so that our bridge can be called bridge. Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20221207-rpi-dsi-bridge-v1-1-8f68ee0b0adb@cerno.tech Signed-off-by: Maxime Ripard commit 76f34f1377d34b49aa6337e44234ef64eca11263 Author: Maxime Ripard Date: Thu Dec 8 10:47:27 2022 +0100 drm/vc4: Improve the KUnit documentation The command-line can be expressed using a code-block, and we were missing which architectures were available. Suggested-by: Maíra Canal Reviewed-by: Maíra Canal Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20221208094727.2848310-1-maxime@cerno.tech commit b148c8b9b926e257a59c8eb2cd6fa3adfd443254 Author: Andrii Nakryiko Date: Mon Dec 12 13:15:05 2022 -0800 selftests/bpf: Add few corner cases to test padding handling of btf_dump Add few hand-crafted cases and few randomized cases found using script from [0] that tests btf_dump's padding logic. [0] https://lore.kernel.org/bpf/85f83c333f5355c8ac026f835b18d15060725fcb.camel@ericsson.com/ Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20221212211505.558851-7-andrii@kernel.org commit ea2ce1ba99aa6a60c8d8a706e3abadf3de372163 Author: Andrii Nakryiko Date: Mon Dec 12 13:15:04 2022 -0800 libbpf: Fix BTF-to-C converter's padding logic Turns out that btf_dump API doesn't handle a bunch of tricky corner cases, as reported by Per, and further discovered using his testing Python script ([0]). This patch revamps btf_dump's padding logic significantly, making it more correct and also avoiding unnecessary explicit padding, where compiler would pad naturally. This overall topic turned out to be very tricky and subtle, there are lots of subtle corner cases. The comments in the code tries to give some clues, but comments themselves are supposed to be paired with good understanding of C alignment and padding rules. Plus some experimentation to figure out subtle things like whether `long :0;` means that struct is now forced to be long-aligned (no, it's not, turns out). Anyways, Per's script, while not completely correct in some known situations, doesn't show any obvious cases where this logic breaks, so this is a nice improvement over the previous state of this logic. Some selftests had to be adjusted to accommodate better use of natural alignment rules, eliminating some unnecessary padding, or changing it to `type: 0;` alignment markers. Note also that for when we are in between bitfields, we emit explicit bit size, while otherwise we use `: 0`, this feels much more natural in practice. Next patch will add few more test cases, found through randomized Per's script. [0] https://lore.kernel.org/bpf/85f83c333f5355c8ac026f835b18d15060725fcb.camel@ericsson.com/ Reported-by: Per Sundström XP Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20221212211505.558851-6-andrii@kernel.org commit 25a4481b4136af7794e1df2d6c90ed2f354d60ce Author: Andrii Nakryiko Date: Mon Dec 12 13:15:03 2022 -0800 libbpf: Fix btf__align_of() by taking into account field offsets btf__align_of() is supposed to be return alignment requirement of a requested BTF type. For STRUCT/UNION it doesn't always return correct value, because it calculates alignment only based on field types. But for packed structs this is not enough, we need to also check field offsets and struct size. If field offset isn't aligned according to field type's natural alignment, then struct must be packed. Similarly, if struct size is not a multiple of struct's natural alignment, then struct must be packed as well. This patch fixes this issue precisely by additionally checking these conditions. Fixes: 3d208f4ca111 ("libbpf: Expose btf__align_of() API") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20221212211505.558851-5-andrii@kernel.org commit 9d2349740e430b20660457b7c88fa06467457272 Author: Andrii Nakryiko Date: Mon Dec 12 13:15:02 2022 -0800 selftests/bpf: Add non-standardly sized enum tests for btf_dump Add few custom enum definitions testing mode(byte) and mode(word) attributes. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20221212211505.558851-4-andrii@kernel.org commit 21a9a1bcccaa4f0337a24d666fe55944abcb171e Author: Andrii Nakryiko Date: Mon Dec 12 13:15:01 2022 -0800 libbpf: Handle non-standardly sized enums better in BTF-to-C dumper Turns out C allows to force enum to be 1-byte or 8-byte explicitly using mode(byte) or mode(word), respecticely. Linux sources are using this in some cases. This is imporant to handle correctly, as enum size determines corresponding fields in a struct that use that enum type. And if enum size is incorrect, this will lead to invalid struct layout. So add mode(byte) and mode(word) attribute support to btf_dump APIs. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20221212211505.558851-3-andrii@kernel.org commit 872aec4b5f635d94111d48ec3c57fbe078d64e7d Author: Andrii Nakryiko Date: Mon Dec 12 13:15:00 2022 -0800 libbpf: Fix single-line struct definition output in btf_dump btf_dump APIs emit unnecessary tabs when emitting struct/union definition that fits on the single line. Before this patch we'd get: struct blah {}; This patch fixes this and makes sure that we get more natural: struct blah {}; Fixes: 44a726c3f23c ("bpftool: Print newline before '}' for struct with padding only fields") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20221212211505.558851-2-andrii@kernel.org commit c9883ee9d110703ccb3dfe2ca13e0b7a01351077 Author: Xin Liu Date: Sat Dec 10 16:20:45 2022 +0800 libbpf: Optimized return value in libbpf_strerror when errno is libbpf errno This is a small improvement in libbpf_strerror. When libbpf_strerror is used to obtain the system error description, if the length of the buf is insufficient, libbpf_sterror returns ERANGE and sets errno to ERANGE. However, this processing is not performed when the error code customized by libbpf is obtained. Make some minor improvements here, return -ERANGE and set errno to ERANGE when buf is not enough for custom description. Signed-off-by: Xin Liu Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20221210082045.233697-1-liuxin350@huawei.com commit 5eb9a4314053bda7642643f70f49a2b415920812 Author: Pin-yen Lin Date: Wed Nov 9 17:52:27 2022 +0800 drm/bridge: it6505: Guard bridge power in IRQ handler Add a pair of pm_runtime_get_if_in_use and pm_runtime_put_sync in the interrupt handler to make sure the bridge won't be powered off during the interrupt handlings. Also remove the irq_lock mutex because it's not guarding anything now. Fixes: ab28896f1a83 ("drm/bridge: it6505: Improve synchronization between extcon subsystem") Signed-off-by: Pin-yen Lin Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20221109095227.3320919-1-treapking@chromium.org commit 94914b8594a4e471f688f276fe583dbea17209ba Author: Otto Pflüger Date: Thu Dec 1 17:02:45 2022 +0100 dt-bindings: display: panel: mipi-dbi-spi: Add io-supply Add documentation for the new io-supply property, which specifies the regulator for the I/O voltage supply on platforms where the panel panel power and I/O supplies are separate. Signed-off-by: Otto Pflüger Reviewed-by: Rob Herring Reviewed-by: Noralf Trønnes Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20221201160245.2093816-4-otto.pflueger@abscue.de commit 3dd26888ac933421a0ba039bea0a637d1d058b60 Author: Otto Pflüger Date: Thu Dec 1 17:02:44 2022 +0100 drm/tiny: panel-mipi-dbi: Read I/O supply from DT To support platforms with a separate I/O voltage supply, set the new io_regulator property along with the regulator property of the DBI device. Read the I/O supply from a new "io-supply" device tree property. Signed-off-by: Otto Pflüger Reviewed-by: Noralf Trønnes Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20221201160245.2093816-3-otto.pflueger@abscue.de commit 3b1fb8b3a3f8a4e645ef580edaeed35ec3f73c38 Author: Otto Pflüger Date: Thu Dec 1 17:02:43 2022 +0100 drm/mipi-dbi: Support separate I/O regulator The MIPI DBI specification defines separate vdd (panel power) and vddi (I/O voltage) supplies. Displays that require different voltages for the different supplies do exist, so the supplies cannot be combined into one as they are now. Add a new io_regulator property to the mipi_dbi_dev struct which can be set by the panel driver along with the regulator property. Signed-off-by: Otto Pflüger Reviewed-by: Noralf Trønnes Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20221201160245.2093816-2-otto.pflueger@abscue.de commit 117dbeda22ec5ea0918254d03b540ef8b8a64d53 Author: Li Zetao Date: Mon Dec 12 10:58:12 2022 +0800 wifi: rtlwifi: Fix global-out-of-bounds bug in _rtl8812ae_phy_set_txpower_limit() There is a global-out-of-bounds reported by KASAN: BUG: KASAN: global-out-of-bounds in _rtl8812ae_eq_n_byte.part.0+0x3d/0x84 [rtl8821ae] Read of size 1 at addr ffffffffa0773c43 by task NetworkManager/411 CPU: 6 PID: 411 Comm: NetworkManager Tainted: G D 6.1.0-rc8+ #144 e15588508517267d37 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), Call Trace: ... kasan_report+0xbb/0x1c0 _rtl8812ae_eq_n_byte.part.0+0x3d/0x84 [rtl8821ae] rtl8821ae_phy_bb_config.cold+0x346/0x641 [rtl8821ae] rtl8821ae_hw_init+0x1f5e/0x79b0 [rtl8821ae] ... The root cause of the problem is that the comparison order of "prate_section" in _rtl8812ae_phy_set_txpower_limit() is wrong. The _rtl8812ae_eq_n_byte() is used to compare the first n bytes of the two strings from tail to head, which causes the problem. In the _rtl8812ae_phy_set_txpower_limit(), it was originally intended to meet this requirement by carefully designing the comparison order. For example, "pregulation" and "pbandwidth" are compared in order of length from small to large, first is 3 and last is 4. However, the comparison order of "prate_section" dose not obey such order requirement, therefore when "prate_section" is "HT", when comparing from tail to head, it will lead to access out of bounds in _rtl8812ae_eq_n_byte(). As mentioned above, the _rtl8812ae_eq_n_byte() has the same function as strcmp(), so just strcmp() is enough. Fix it by removing _rtl8812ae_eq_n_byte() and use strcmp() barely. Although it can be fixed by adjusting the comparison order of "prate_section", this may cause the value of "rate_section" to not be from 0 to 5. In addition, commit "21e4b0726dc6" not only moved driver from staging to regular tree, but also added setting txpower limit function during the driver config phase, so the problem was introduced by this commit. Fixes: 21e4b0726dc6 ("rtlwifi: rtl8821ae: Move driver from staging to regular tree") Signed-off-by: Li Zetao Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221212025812.1541311-1-lizetao1@huawei.com commit 9c22d603e255ece73e61e3b3f93dae8ab82c17ff Author: Ping-Ke Shih Date: Fri Dec 9 10:09:40 2022 +0800 wifi: rtw89: 8852c: rfk: recover RX DCK failure RX DCK stands for RX DC calibration that affects CCA, so abnormal calibration values resulted from calibration failure can cause TX get stuck. To solve this, redo calibration if result is bad (over thresholds). When retry count is over, do recovery that sets high gain fields of RX DCK results from low gain fields. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221209020940.9573-4-pkshih@realtek.com commit 21b5f159a2ee47d30f418559f6ece0088c80199f Author: Ping-Ke Shih Date: Fri Dec 9 10:09:39 2022 +0800 wifi: rtw89: 8852c: rfk: correct DPK settings Some DPK settings are wrong, and causes bad TX performance occasionally. So, fix them by internal suggestions. Fixes: da4cea16cb13 ("rtw89: 8852c: rfk: add DPK") Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221209020940.9573-3-pkshih@realtek.com commit b2bab7b14098dcf5d405fa8c76b2c3f6ce9184f9 Author: Ping-Ke Shih Date: Fri Dec 9 10:09:38 2022 +0800 wifi: rtw89: 8852c: rfk: correct DACK setting After filling calibration parameters, set BIT(0) to enable the hardware circuit, but original set incorrect bit that affects a little TX performance. Fixes: 76599a8d0b7d ("rtw89: 8852c: rfk: add DACK") Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221209020940.9573-2-pkshih@realtek.com commit 18ddf102d4b8768cd058105168f29f96cd0c6d2d Author: Ping-Ke Shih Date: Fri Dec 9 09:22:15 2022 +0800 wifi: rtw89: fw: adapt to new firmware format of security section Normally, system image should ensure firmware integrity, but we provide an advance feature to ensure this by security section along with firmware. To enable this feature, custom ID is programmed into efuse, and driver will download proper security section to firmware. Since I don't have this kind hardware modules on hand yet, but new format is used by newer firmware. Therefore, I prepare this patch in advance to consider size of security section as a factor of checking rule of firmware size, but don't actually download security section to firmware. This patch is backward compatible, so it will be safe to have this change before adding an new format firmware to linux-firmware repository. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221209012215.7342-1-pkshih@realtek.com commit 25ed1a172298eed1cab329792d8e4d7363a411fc Author: Ping-Ke Shih Date: Fri Dec 9 09:21:10 2022 +0800 wifi: rtw89: consider ER SU as a TX capability ER (Extended Range) SU is to have a larger coverage. We set this as a RA capability, and then firmware can choose ER SU to transmit packets to reception at cell edge. For 8852C, it needs to fill this capability in TXWD, so update rtw89_build_txwd_info0_v1(). Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221209012110.7242-1-pkshih@realtek.com commit 4c2005ac87685907b3719b4f40215b578efd27c4 Author: Yang Yingliang Date: Thu Dec 8 22:35:17 2022 +0800 wifi: rtl8xxxu: don't call dev_kfree_skb() under spin_lock_irqsave() It is not allowed to call kfree_skb() or consume_skb() from hardware interrupt context or with hardware interrupts being disabled. It should use dev_kfree_skb_irq() or dev_consume_skb_irq() instead. The difference between them is free reason, dev_kfree_skb_irq() means the SKB is dropped in error and dev_consume_skb_irq() means the SKB is consumed in normal. In this case, dev_kfree_skb() is called to free and drop the SKB when it's shutdown, so replace it with dev_kfree_skb_irq(). Compile tested only. Fixes: 26f1fad29ad9 ("New driver: rtl8xxxu (mac80211)") Signed-off-by: Yang Yingliang Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221208143517.2383424-1-yangyingliang@huawei.com commit 639c26faf9b15922bc620af341545d6c5d6aab2d Author: Bitterblue Smith Date: Thu Dec 8 21:34:02 2022 +0200 wifi: rtl8xxxu: Fix assignment to bit field priv->cck_agc_report_type Just because priv->cck_agc_report_type is only one bit doesn't mean it works like a bool. The value assigned to it loses all bits except bit 0, so only assign 0 or 1 to it. This affects the RTL8192EU, but rtl8xxxu already can't connect to any networks with this chip, so it probably didn't bother anyone. Fixes: 2ad2a813b803 ("wifi: rtl8xxxu: Fix the CCK RSSI calculation") Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/7bb4858c-5cef-9cae-5e08-7e8444e8ba89@gmail.com commit 9e32b4a709f0f7b7adf5d9939c3bd47c78c4f003 Author: Bitterblue Smith Date: Thu Dec 8 21:32:18 2022 +0200 wifi: rtl8xxxu: Fix assignment to bit field priv->pi_enabled Just because priv->pi_enabled is only one bit doesn't mean it works like a bool. The value assigned to it loses all bits except bit 0, so only assign 0 or 1 to it. This affects the RTL8188FU, but fixing the assignment didn't make a difference for my device. Fixes: c888183b21f3 ("wifi: rtl8xxxu: Support new chip RTL8188FU") Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/4368d585-11ec-d3c7-ec12-7f0afdcedfda@gmail.com commit 16a03958618fb91bb1bc7077cf3211055162cc2f Author: Zhengchao Shao Date: Thu Dec 8 20:14:48 2022 +0800 wifi: libertas: fix memory leak in lbs_init_adapter() When kfifo_alloc() failed in lbs_init_adapter(), cmd buffer is not released. Add free memory to processing error path. Fixes: 7919b89c8276 ("libertas: convert libertas driver to use an event/cmdresp queue") Signed-off-by: Zhengchao Shao Reviewed-by: Jiri Pirko Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221208121448.2845986-1-shaozhengchao@huawei.com commit 0c1528675d7a9787cb516b64d8f6c0f6f8efcb48 Author: Yang Yingliang Date: Wed Dec 7 22:40:13 2022 +0800 wifi: iwlegacy: common: don't call dev_kfree_skb() under spin_lock_irqsave() It is not allowed to call consume_skb() from hardware interrupt context or with interrupts being disabled. So replace dev_kfree_skb() with dev_consume_skb_irq() under spin_lock_irqsave(). Compile tested only. Fixes: 4bc85c1324aa ("Revert "iwlwifi: split the drivers for agn and legacy devices 3945/4965"") Signed-off-by: Yang Yingliang Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221207144013.70210-1-yangyingliang@huawei.com commit 313950c2114e7051c4e3020fd82495fa1fb526a8 Author: Yang Yingliang Date: Wed Dec 7 22:14:11 2022 +0800 wifi: rtlwifi: rtl8723be: don't call kfree_skb() under spin_lock_irqsave() It is not allowed to call kfree_skb() from hardware interrupt context or with interrupts being disabled. All the SKBs have been dequeued from the old queue, so it's safe to enqueue these SKBs to a free queue, then free them after spin_unlock_irqrestore() at once. Compile tested only. Fixes: 5c99f04fec93 ("rtlwifi: rtl8723be: Update driver to match Realtek release of 06/28/14") Signed-off-by: Yang Yingliang Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221207141411.46098-4-yangyingliang@huawei.com commit 2611687fa7ffc84190f92292de0b80468de17220 Author: Yang Yingliang Date: Wed Dec 7 22:14:10 2022 +0800 wifi: rtlwifi: rtl8188ee: don't call kfree_skb() under spin_lock_irqsave() It is not allowed to call kfree_skb() from hardware interrupt context or with interrupts being disabled. All the SKBs have been dequeued from the old queue, so it's safe to enqueue these SKBs to a free queue, then free them after spin_unlock_irqrestore() at once. Compile tested only. Fixes: 7fe3b3abb5da ("rtlwifi: rtl8188ee: rtl8821ae: Fix a queue locking problem") Signed-off-by: Yang Yingliang Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221207141411.46098-3-yangyingliang@huawei.com commit 106031c1f4a850915190d7ec1026696282f9359b Author: Yang Yingliang Date: Wed Dec 7 22:14:09 2022 +0800 wifi: rtlwifi: rtl8821ae: don't call kfree_skb() under spin_lock_irqsave() It is not allowed to call kfree_skb() from hardware interrupt context or with interrupts being disabled. All the SKBs have been dequeued from the old queue, so it's safe to enqueue these SKBs to a free queue, then free them after spin_unlock_irqrestore() at once. Compile tested only. Fixes: 5c99f04fec93 ("rtlwifi: rtl8723be: Update driver to match Realtek release of 06/28/14") Signed-off-by: Yang Yingliang Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221207141411.46098-2-yangyingliang@huawei.com commit 956fb851a6e19da5ab491e19c1bc323bb2c2cf6f Author: Yuan Can Date: Mon Dec 5 06:14:41 2022 +0000 wifi: rsi: Fix memory leak in rsi_coex_attach() The coex_cb needs to be freed when rsi_create_kthread() failed in rsi_coex_attach(). Fixes: 2108df3c4b18 ("rsi: add coex support") Signed-off-by: Yuan Can Reviewed-by: Simon Horman Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221205061441.114632-1-yuancan@huawei.com commit 95df9cc24bee8a09d39c62bcef4319b984814e18 Author: Matthew Auld Date: Mon Dec 12 17:19:58 2022 +0000 drm/i915/ttm: consider CCS for backup objects It seems we can have one or more framebuffers that are still pinned when suspending lmem, in such a case we end up creating a shmem backup object, instead of evicting the object directly, but this will skip copying the CCS aux state, since we don't allocate the extra storage for the CCS pages as part of the ttm_tt construction. Since we can already deal with pinned objects just fine, it doesn't seem too nasty to just extend to support dealing with the CCS aux state, if the object is a pinned framebuffer. This fixes display corruption (like in gnome-shell) seen on DG2 when returning from suspend. Fixes: da0595ae91da ("drm/i915/migrate: Evict and restore the flatccs capable lmem obj") Signed-off-by: Matthew Auld Cc: Ville Syrjälä Cc: Nirmoy Das Cc: Andrzej Hajda Cc: Shuicheng Lin Cc: # v5.19+ Tested-by: Nirmoy Das Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20221212171958.82593-2-matthew.auld@intel.com commit b29d26fbcb862526d5047caec82878be2eb75c0f Author: Matthew Auld Date: Mon Dec 12 17:19:57 2022 +0000 drm/i915/migrate: fix corner case in CCS aux copying In the case of lmem -> lmem transfers, which is currently only possible with small-bar systems, we need to ensure we copy the CCS aux state as-is, rather than nuke it. This should fix some nasty display corruption sometimes seen on DG2 small-bar systems, when also using DG2_RC_CCS_CC for the surface. Fixes: e3afc690188b ("drm/i915/display: consider DG2_RC_CCS_CC when migrating buffers") Signed-off-by: Matthew Auld Cc: Ville Syrjälä Cc: Nirmoy Das Cc: Andrzej Hajda Cc: Shuicheng Lin Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20221212171958.82593-1-matthew.auld@intel.com commit 52f14682ac4d39d9bdae8ff6bae23abf7026ee66 Author: Stanislav Lisovskiy Date: Wed Nov 23 12:07:18 2022 +0200 drm/i915: Bpp/timeslot calculation fixes for DP MST DSC Fix intel_dp_dsc_compute_config, previously timeslots parameter was used in fact not as a timeslots, but more like a ratio timeslots/64, which of course didn't have any effect for SST DSC, but causes now issues for MST DSC. Secondly we need to calculate pipe_bpp using intel_dp_dsc_compute_bpp only for SST DSC case, while for MST case it has been calculated earlier already with intel_dp_dsc_mst_compute_link_config. Third we also were wrongly determining sink min bpp/max bpp, those limites should be intersected with our limits to find common acceptable bpp's, plus on top of that we should align those with VESA bpps and only then calculate required timeslots amount. Some MST hubs started to work only after third change was made. v2: Make kernel test robot happy(claimed there was unitialzed use, while there is none) v3: Rename intel_dp_dsc_nearest_vesa_bpp to intel_dp_dsc_nearest_valid_bpp (Manasi Navare) Reviewed-by: Manasi Navare Signed-off-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20221123100718.29130-1-stanislav.lisovskiy@intel.com commit d797f67d1e2568b152ee1af2334b11c1a48e5594 Author: Stanislav Lisovskiy Date: Wed Nov 23 12:05:51 2022 +0200 drm/i915: Extract VESA DSC bpp alignment to separate function We might to use that function separately from intel_dp_dsc_compute_config for DP DSC over MST case, because allocating bandwidth in that case can be a bit more tricky. So in order to avoid code copy-pasta lets extract this to separate function and reuse it for both SST and MST cases. v2: Removed multiple blank lines v3: Rename intel_dp_dsc_nearest_vesa_bpp to intel_dp_dsc_nearest_valid_bpp to reflect its meaning more properly. (Manasi Navare) Signed-off-by: Stanislav Lisovskiy Reviewed-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20221123100551.29080-1-stanislav.lisovskiy@intel.com commit d51f25eb479aeb61c194089f66261be67ff9237a Author: Stanislav Lisovskiy Date: Tue Nov 1 11:42:20 2022 +0200 drm/i915: Add DSC support to MST path Whenever we are not able to get enough timeslots for required PBN, let's try to allocate those using DSC, just same way as we do for SST. v2: Removed intel_dp_mst_dsc_compute_config and refactored intel_dp_dsc_compute_config to support timeslots as a parameter(Ville Syrjälä) v3: - Rebased - Added a debug to see that we at least try reserving VCPI slots using DSC, because currently its not visible from the logs, thus making debugging more tricky. - Moved timeslots to numerator, where it should be. v4: - Call drm_dp_mst_atomic_check already during link config computation, because we need to know already by this moment if uncompressed amount of VCPI slots needed can fit, otherwise we need to use DSC. (thanks to Vinod Govindapillai for pointing this out) v5: - Put pipe_config->bigjoiner_pipes back to original condition in intel_dp_dsc_compute_config (don't remember when I lost it) v6: - Removed unnecessary drm_dp_mst_atomic_check as it is now always called in a newly introduced intel_dp_mst_find_vcpi_slots_for_bpp function (Vinod Govindapillai) Reviewed-by: Vinod Govindapillai Signed-off-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20221101094222.22091-5-stanislav.lisovskiy@intel.com commit 7971aacf6e2d5ee508f63bc3707766f27c0f3e2b Author: Stanislav Lisovskiy Date: Tue Nov 1 11:42:19 2022 +0200 drm/i915: Extract drm_dp_atomic_find_vcpi_slots cycle to separate function We would be using almost same code to loop through bpps while calling drm_dp_atomic_find_vcpi_slots - lets remove this duplication by introducing a new function intel_dp_mst_find_vcpi_slots_for_bpp v2: Fix pbn_div calculation - shouldn't matter if its DSC or not. v3: FIx rebase conflict, constant_n no longer needed. Reviewed-by: Vinod Govindapillai Signed-off-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20221101094222.22091-4-stanislav.lisovskiy@intel.com commit 9096e36d5ba6a7662b75eb02038dc4cd46ba47b4 Author: Stanislav Lisovskiy Date: Tue Nov 1 11:42:18 2022 +0200 drm/i915: Fix intel_dp_mst_compute_link_config We currently always exit that bpp loop because drm_dp_atomic_find_vcpi_slots doesn't care if we actually can fit those or not. I think that wasn't the initial intention here, especially when we keep trying with lower bpps, we are supposed to keep trying until we actually find some _working_ configuration, which isn't the case here. So added that drm_dp_mst_check here, so that we can make sure that try all the bpps before we fail. Reviewed-by: Vinod Govindapillai Signed-off-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20221101094222.22091-3-stanislav.lisovskiy@intel.com commit 1482ec00be4a3634aeffbcc799791a723df69339 Author: Stanislav Lisovskiy Date: Tue Nov 1 11:42:17 2022 +0200 drm: Add missing DP DSC extended capability definitions. Adding DP DSC register definitions, we might need for further DSC implementation, supporting MST and DP branch pass-through mode. v2: - Fixed checkpatch comment warning v3: - Removed function which is not yet used(Jani Nikula) Reviewed-by: Vinod Govindapillai Acked-by: Maarten Lankhorst Signed-off-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20221101094222.22091-2-stanislav.lisovskiy@intel.com commit 89270d002b7440ec5c6e92f7cac524ab7954a016 Author: Andrzej Hajda Date: Fri Dec 9 13:14:59 2022 +0100 drm/i915: remove struct_member macro Since it is used only to get type of member it can be replaced with typeof_member. Signed-off-by: Andrzej Hajda Reviewed-by: Jani Nikula Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20221209121459.3496148-1-andrzej.hajda@intel.com commit f052febd24f1117de0929c141d9ee63941720cf9 Author: Jani Nikula Date: Thu Dec 8 16:23:47 2022 +0200 drm/i915: add new "soc" sub-directory and move PCH and DRAM code there Add a new sub-directory for things that aren't specifically about the GPU and don't really belong in the i915 driver top level, but also don't belong under any of the existing sub-directories either. Name it "soc", and move the PCH and DRAM code there. Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: Ville Syrjälä Acked-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20221208142347.602726-1-jani.nikula@intel.com commit 58377de46eee1e0066c93f659c91a809432d024c Author: Christian König Date: Thu Nov 24 13:30:18 2022 +0100 drm/i915: stop using ttm_bo_wait TTM is just wrapping core DMA functionality here, remove the mid-layer. No functional change. Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20221125102137.1801-7-christian.koenig@amd.com commit aeb0351e825a2f8eaaabb89f7012ee099fc306a5 Author: Ville Syrjälä Date: Wed Nov 23 17:26:37 2022 +0200 drm/i915: Use ilk_lut_write*() for all ilk+ gamma modes We could use the dsb to load the LUT in any gamma mode, not just when using the multi-segment mode. So replace the direct mmio on all ilk+ paths with the wrapper. There are a few functions (ilk_load_lut_10(), ivb_load_lut_10()) that would never be used on a platform with dsb so we could skip those, but probably better to keep all this 100% consistent to avoid people getting confused and copy pasting the wrong thing when adding a new gamma mode. The gmch stuff I left with direct mmio since those are fairly distinct and shouldn't cause too much confusion. Although I've also pondered about converting everything over to dsb command buffers and just executing it on the CPU when the real hw is not available. But dunno if that would actually be a good idea or not... Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221123152638.20622-13-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar commit 048ed577a327143f5bdb30299bffdafc0a6a34bd Author: Ville Syrjälä Date: Wed Nov 23 17:26:36 2022 +0200 Revert "drm/i915: Disable DSB usage for now" This reverts commit 99510e1afb4863a225207146bd988064c5fd0629. DSB is now getting disabled locally in the color management code so we don't need to apply this big hammer via the device info (not that we have other DSB users at the moment). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221123152638.20622-12-ville.syrjala@linux.intel.com Reviewed-by: Ankit Nautiyal Reviewed-by: Uma Shankar commit 2487ae0bcb53a7d4180c551c02b1f318ea590c84 Author: Ville Syrjälä Date: Wed Nov 23 17:26:35 2022 +0200 drm/i915: Disable DSB usage specifically for LUTs The DSB has problem loading the LUTs at the moment. Some of that is due to the palette anti collision logic, some due to what seem real hw issues. Disable it the whole thing locally in the color management code for now. Note that we currently have this weird situation where on adl+ we load parts of the LUT with DSB and parts with mmio. That is due to the fact that only some parts of the LUT code are using the DSB register write functions (ivb_load_lut_ext*()), while the rest is using pure mmio (bdw_load_lut_10()). So now we'll go back to pure mmio temporarily, until the DSB issues get fixed (at which point we should be going for pure DSB). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221123152638.20622-11-ville.syrjala@linux.intel.com Reviewed-by: Ankit Nautiyal Reviewed-by: Uma Shankar commit b358c3b98813b1557588a11c894b22915251a2ce Author: Ville Syrjälä Date: Wed Nov 23 17:26:34 2022 +0200 drm/i915: Make DSB lower level We could have many different uses for the DSB(s) during a single commit, so the current approach of passing the whole crtc_state to the DSB functions is far too high level. Lower the abstraction a little bit so each DSB user can decide where to stick the command buffer/etc. v2: Document the intel_dsb_prepare() return value (Ankit) Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221123152638.20622-10-ville.syrjala@linux.intel.com Reviewed-by: Ankit Nautiyal Reviewed-by: Uma Shankar commit efb2b57edf20c32b08eee4ce8b436c459fe4caea Author: Ville Syrjälä Date: Wed Nov 23 17:26:33 2022 +0200 drm/i915: Move the DSB setup/cleaup into the color code Since the color management code is the only user of the DSB at the moment move the DSB prepare/cleanup there too. The code has to anyway make decisions on whether to use the DSB or not (and how to use it). Also we'll need a place where we actually generate the DSB command buffer ahead of time rather than the current situation where it gets generated too late during the mmio programming of the hardware. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221123152638.20622-9-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar commit 75b5fef1aa228d14af189bf5e5e960d8e7a7b0e6 Author: Ville Syrjälä Date: Wed Nov 23 17:26:32 2022 +0200 drm/i915: Move the DSB->mmio fallback into the LUT code The use of DSB has to be done differently on a case by case basis. So no way this kind of blind mmio fallback in the guts of the DSB code will work properly. Move it at least one level up into the LUT loading code. Not sure if this is the way we want do the DSB vs. mmio handling in the end, but at least it's a bit closer than what we had before. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221123152638.20622-8-ville.syrjala@linux.intel.com Reviewed-by: Ankit Nautiyal Reviewed-by: Uma Shankar commit 413352f47189955a7a1600336bf757846f642a7b Author: Ville Syrjälä Date: Wed Nov 23 17:26:31 2022 +0200 drm/i915: Document LUT "max" register precision Document the precision of the LUT "max" registers, just so we don't have to dig through the spec so much. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221123152638.20622-7-ville.syrjala@linux.intel.com Reviewed-by: Ankit Nautiyal Reviewed-by: Uma Shankar commit 26886082fbba1c438f88b1efed2f4dfd5612fefc Author: Ville Syrjälä Date: Wed Nov 23 17:26:30 2022 +0200 drm/i915: Standardize auto-increment LUT load procedure Various gamma units on various platforms have some problems loading the LUT index and auto-increment bit at the same time. We have to do this in two steps. The first known case was the glk degamma LUT, but at least ADL has another known case. We're not going to suffer too badly from a couple of extra register writes here, so let's just standardize on this practice for all auto-increment LUT loads/reads. This way we never have to worry about this specific issue again. And for good measure always reset the index back to zero at the end (we already did this in a few places). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221123152638.20622-6-ville.syrjala@linux.intel.com Reviewed-by: Ankit Nautiyal Reviewed-by: Uma Shankar commit bb0409f40ffab331f660a742c59953f5ae7698a0 Author: Ville Syrjälä Date: Wed Nov 23 17:26:29 2022 +0200 drm/i915: Clean up various indexed LUT registers Use REG_BIT() & co. for the LUT index registers, and also use the REG_FIELD_PREP() stuff a bit more consistently when generating the values for said registers. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221123152638.20622-5-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar commit 67eab12b8bcc80ec7b6f27a71bce82f9d706d109 Author: Ville Syrjälä Date: Wed Nov 23 17:26:28 2022 +0200 drm/i915: Define skl+ palette anti-collision bit I've been frobbing the palette anti-collision logic bit while playing around with DSB. Not sure we'll have real use for this but let's define the bit anyways so I don't have to carry it around locally. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221123152638.20622-4-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar commit 1867fcebd7a728d15a5c2352933d5731b0eca7f5 Author: Ville Syrjälä Date: Wed Nov 23 17:26:27 2022 +0200 drm/i915: Clean up GAMMA_MODE defines Use REG_BIT() & co. for GAMMA_MODE bits. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221123152638.20622-3-ville.syrjala@linux.intel.com Reviewed-by: Ankit Nautiyal commit 07e176f2ad357a9371b9e9a80fc1c77016399ddf Author: Ville Syrjälä Date: Wed Nov 23 17:26:26 2022 +0200 drm/i915: Shorten GAMMA_MODE_MODE_12BIT_MULTI_SEGMENTED a bit s/GAMMA_MODE_MODE_12BIT_MULTI_SEGMENTED/GAMMA_MODE_MODE_12BIT_MULTI_SEG/ to make this thing slightly shorter. Also fix up the platform comment while at it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221123152638.20622-2-ville.syrjala@linux.intel.com Reviewed-by: Ankit Nautiyal Reviewed-by: Uma Shankar commit 2357f2b271adf61e47426c7e5a94de1b65a51e42 Author: Jouni Högander Date: Fri Dec 9 14:05:43 2022 -0800 drm/i915/mtl: Initial display workarounds This patch introduces initial workarounds for mtl platform v2: switch IS_MTL_DISPLAY_STEP to use IS_METEORLAKE from testing display ver. (Tvrtko) v3: clerical issues, extend 16015201720 to mtl. (MattR) v4: make sure 16015201720 includes display 13. (MattR) Bspec: 66624 Signed-off-by: Matt Atwood Signed-off-by: Jouni Högander Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20221209220543.502047-1-matthew.s.atwood@intel.com commit 38c8389011e06f16b365799f2cd958536befc2e9 Author: Xin Ji Date: Fri Dec 9 11:04:18 2022 +0800 drm/bridge: anx7625: keep last configure timing Sometimes kernel may resume back quickly after suspend, and DRM not call .mode_set() to re-config display timing before calling .atomic_enable(), bridge driver with this patch to keep last configure timing. Signed-off-by: Xin Ji Acked-by: Hsin-Yi Wang Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20221209030418.713935-1-xji@analogixsemi.com commit 0f6548807fa77e87bbc37964c6b1ed9ba6e1155d Author: Uwe Kleine-König Date: Fri Nov 18 23:36:09 2022 +0100 drm/bridge: ti-sn65dsi83: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221118224540.619276-36-uwe@kleine-koenig.org Signed-off-by: Robert Foss commit d6b522e9bbb0cca1aeae4ef6188800534794836f Author: Uwe Kleine-König Date: Fri Nov 18 23:36:02 2022 +0100 drm/bridge: parade-ps8622: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221118224540.619276-29-uwe@kleine-koenig.org Signed-off-by: Robert Foss commit 1c546894ff82f8b7c070998c03f9b15a3499f326 Author: Uwe Kleine-König Date: Fri Nov 18 23:35:48 2022 +0100 drm/bridge: adv7511: Convert to i2c's .probe_new() .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221118224540.619276-15-uwe@kleine-koenig.org Signed-off-by: Robert Foss commit 799f2abd447663524221a5efe171d5a45ed6df02 Merge: 1d9e6664addff 662233731d66c Author: Robert Foss Date: Mon Dec 12 17:08:42 2022 +0100 Merge branch 'i2c/client_device_id_helper-immutable' of https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into drm-misc-next This branch has been applied to the I2C tree and others, and is a dependency of a large series of changes switching many drivers to use i2c_client_get_device_id. commit 1d9e6664addff479f9ed4aeacd7c667678889f3b Author: Paul Cercueil Date: Tue Nov 29 19:17:16 2022 +0000 drm: exynos: Remove #ifdef guards for PM related functions Use the DEFINE_RUNTIME_DEV_PM_OPS(), SYSTEM_SLEEP_PM_OPS(), RUNTIME_PM_OPS() and pm_ptr() macros to handle the runtime and suspend PM callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil Acked-by: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/20221129191733.137897-10-paul@crapouillou.net commit 196c92263f5525a644e8e6a0c9df5cc2da9e2b16 Author: Paul Cercueil Date: Tue Nov 29 19:19:42 2022 +0000 drm/i915/gt: Remove #ifdef guards for PM related functions Instead of defining two versions of intel_sysfs_rc6_init(), one for each value of CONFIG_PM, add a check on !IS_ENABLED(CONFIG_PM) early in the function. This will allow the compiler to automatically drop the dead code when CONFIG_PM is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20221129191942.138244-13-paul@crapouillou.net commit 49eafb200f1d0415d9302f31855166c731b5297d Author: Paul Cercueil Date: Tue Nov 29 19:19:40 2022 +0000 drm: gm12u320: Remove #ifdef guards for PM related functions Use the pm_ptr() macro to handle the .suspend / .resume / .reset_resume callbacks. This macro allows the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. It also allows to drop the __maybe_unused tags. Signed-off-by: Paul Cercueil Reviewed-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20221129191942.138244-11-paul@crapouillou.net commit 66284ff9dbf59e3f67b2e3235e913ae86e7cb105 Author: Paul Cercueil Date: Tue Nov 29 19:19:38 2022 +0000 drm: vboxvideo: Remove #ifdef guards for PM related functions Use the pm_sleep_ptr() macro to handle the .suspend / .resume callbacks. This macro allows the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil Reviewed-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20221129191942.138244-9-paul@crapouillou.net commit 8d1c4e59ddd888f03c860eca715dad97b7652b7d Author: Paul Cercueil Date: Tue Nov 29 19:19:37 2022 +0000 drm: tilcdc: Remove #ifdef guards for PM related functions Use the DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil Acked-by: Jyri Sarha Link: https://patchwork.freedesktop.org/patch/msgid/20221129191942.138244-8-paul@crapouillou.net commit fcf2323828f215b91585aa328af34a8c3af5c593 Author: Paul Cercueil Date: Tue Nov 29 19:19:35 2022 +0000 drm: shmobile: Remove #ifdef guards for PM related functions Use the DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20221129191942.138244-6-paul@crapouillou.net commit c3ad24aca3f7e602fa35978f5d9651d2e8a5fe88 Author: Paul Cercueil Date: Tue Nov 29 19:19:33 2022 +0000 drm: rcar-du: Remove #ifdef guards for PM related functions Use the DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20221129191942.138244-4-paul@crapouillou.net commit 53d36818ae56bc284eb0b64664c55e018bca561f Author: Paul Cercueil Date: Tue Nov 29 19:19:32 2022 +0000 drm: panfrost: Remove #ifdef guards for PM related functions Use the EXPORT_GPL_RUNTIME_DEV_PM_OPS() and pm_ptr() macros to handle the PM callbacks. These macros allow the PM functions to be automatically dropped by the compiler when CONFIG_PM is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil Reviewed-by: Steven Price Acked-by: Alyssa Rosenzweig Link: https://patchwork.freedesktop.org/patch/msgid/20221129191942.138244-3-paul@crapouillou.net commit 10709aa89005fe428764d2e4334d578f502be345 Author: Paul Cercueil Date: Tue Nov 29 19:17:17 2022 +0000 drm: imx/dcss: Remove #ifdef guards for PM related functions Use the EXPORT_GPL_DEV_PM_OPS() and pm_ptr() macros to handle the PM callbacks. These macros allow the PM functions to be automatically dropped by the compiler when CONFIG_PM is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil Reviewed-by: Laurentiu Palcu Tested-by: Laurentiu Palcu Link: https://patchwork.freedesktop.org/patch/msgid/20221129191733.137897-11-paul@crapouillou.net commit 68c8704de0527020094698f384ae8c5f749bba2f Author: Paul Cercueil Date: Tue Nov 29 19:17:15 2022 +0000 drm: atmel-hlcdc: Remove #ifdef guards for PM related functions Use the DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to handle the .suspend/.resume callbacks. These macros allow the suspend and resume functions to be automatically dropped by the compiler when CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantage of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Signed-off-by: Paul Cercueil Acked-by: Sam Ravnborg Reviewed-by: Claudiu Beznea Link: https://patchwork.freedesktop.org/patch/msgid/20221129191733.137897-9-paul@crapouillou.net commit ddf75a86aba2cfb7ec4497e8692b60c8c8fe0ee7 Author: Jianglei Nie Date: Tue Nov 29 16:15:42 2022 +0800 auxdisplay: hd44780: Fix potential memory leak in hd44780_remove() hd44780_probe() allocates a memory chunk for hd with kzalloc() and makes "lcd->drvdata->hd44780" point to it. When we call hd44780_remove(), we should release all relevant memory and resource. But "lcd->drvdata ->hd44780" is not released, which will lead to a memory leak. We should release the "lcd->drvdata->hd44780" in hd44780_remove() to fix the memory leak bug. Fixes: 718e05ed92ec ("auxdisplay: Introduce hd44780_common.[ch]") Reviewed-by: Andy Shevchenko Reported-by: kernel test robot Signed-off-by: Jianglei Nie Signed-off-by: Miguel Ojeda commit d4acfa22b634347be33d5906744366742fccd151 Author: Paul Kocialkowski Date: Thu Dec 8 15:20:06 2022 +0100 media: sun6i-isp: params: Unregister pending buffer on cleanup The state cleanup helper should unregister the pending buffer from the state after returning it to v4l2, like it is done for other buffers in the wait queue. Before this change, the pending buffer from a previous run might have been returned at the beginning of the next run, causing an error. Signed-off-by: Paul Kocialkowski Fixes: e3185e1d7c14 ("media: staging: media: Add support for the Allwinner A31 ISP") Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 10413ad08d574e676c67fa6447f7ff70082a4cdc Author: Paul Kocialkowski Date: Thu Dec 8 15:20:05 2022 +0100 media: sun6i-isp: params: Fix incorrect indentation Remove a heading whitespace that results in a smatch warning. Signed-off-by: Paul Kocialkowski Fixes: e3185e1d7c14 ("media: staging: media: Add support for the Allwinner A31 ISP") Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 002886582094ece41a0cf0d84b28e08db9a8e24c Author: Paul Kocialkowski Date: Thu Dec 8 15:20:04 2022 +0100 media: sun6i-isp: capture: Fix uninitialized variable use While the stride_chroma variable was previously initialized to zero, it's actually stride_chroma_div4 that is set to hardware registers. Initialize it to zero instead to avoid an uninitialized variable use and get rid of the associated smatch warning. Signed-off-by: Paul Kocialkowski Fixes: e3185e1d7c14 ("media: staging: media: Add support for the Allwinner A31 ISP") Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 618001e8b1c608413361883dac45c65c051ca335 Author: Paul Kocialkowski Date: Thu Dec 8 15:20:03 2022 +0100 media: sun6i-isp: proc: Declare subdev ops as static The static keyword is missing in the v4l2 subdev ops definition for the proc. Signed-off-by: Paul Kocialkowski Fixes: e3185e1d7c14 ("media: staging: media: Add support for the Allwinner A31 ISP") Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 5534ce51056d8774e5c0fe743934d8f07758b2f8 Author: Paul Kocialkowski Date: Thu Dec 8 15:20:02 2022 +0100 media: sun6i-isp: proc: Error out on invalid port to fix warning The enabled variable is only set for a valid port and used later, which triggers an uninitialized use smatch warning. Explicitly error out in that case to fix the warning. Signed-off-by: Paul Kocialkowski Fixes: e3185e1d7c14 ("media: staging: media: Add support for the Allwinner A31 ISP") Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit f7f346862bbc1395763ed5e3eb050db67fc14abf Author: Paul Kocialkowski Date: Thu Dec 8 15:20:01 2022 +0100 media: sun6i-isp: proc: Fix return code handling in stream off path Explicitly set ret to zero on disable path to avoid a related smatch warning. This makes initialization at declaration useless. Signed-off-by: Paul Kocialkowski Fixes: e3185e1d7c14 ("media: staging: media: Add support for the Allwinner A31 ISP") Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 73402fd7ac098495cfb9b38132f3c174b8d8e6f2 Author: Paul Kocialkowski Date: Thu Dec 8 15:20:00 2022 +0100 media: sun8i-a83t-mipi-csi2: Clarify return code handling in stream off path Explicitly set ret to zero instead of assigning it and overwriting it later, which is a bit confusing to understand. Signed-off-by: Paul Kocialkowski Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 1607a95c0d81842ff3db8df9543a9bb5492d480a Author: Paul Kocialkowski Date: Thu Dec 8 15:19:59 2022 +0100 media: sun6i-mipi-csi2: Clarify return code handling in stream off path Explicitly set ret to zero instead of assigning it and overwriting it later, which is a bit confusing to understand. Signed-off-by: Paul Kocialkowski Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 6ceef05440ac7c0dfa2c7aef66050ad1f0e64ecb Author: Paul Kocialkowski Date: Thu Dec 8 15:19:58 2022 +0100 media: sun6i-csi: capture: Remove useless ret initialization There is no particular need to assign ret when declaring it as it will be assigned before there is any chance to return it. Signed-off-by: Paul Kocialkowski Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit f523c655325c3da085527804650708c7ab6730e3 Author: Paul Kocialkowski Date: Thu Dec 8 15:19:56 2022 +0100 media: sun6i-csi: bridge: Error out on invalid port to fix warning The enabled variable is only set for a valid port and used later, which triggers an uninitialized use smatch warning. Explicitly error out in that case to fix the warning. Signed-off-by: Paul Kocialkowski Fixes: 0d2b746b1bef ("media: sun6i-csi: Add bridge v4l2 subdev with port management") Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit e288e178738fff41d90454317d9333d88c263fa1 Author: Matthew Auld Date: Fri Dec 2 12:28:44 2022 +0000 drm/i915/selftests: exercise emit_pte() with nearly full ring Simple regression test to check that we don't trample the rq->reserved_space when returning from emit_pte(), if the ring is nearly full. v2: Make spinner_kill() static v3: Reduce the ring size further, which should mean we need to execute less noops; hopefully this appeases bsw. Also add some debug logging. v4: Fix the min request construction to account for reserved_space + I915_EMIT_PTE_NUM_DWORDS v5: Use a simple on-stack timer to kill the spinner instead of kthread (Chris) References: https://gitlab.freedesktop.org/drm/intel/-/issues/7535 References: https://gitlab.freedesktop.org/drm/intel/-/issues/6889 Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: Andi Shyti Cc: Andrzej Hajda Cc: Nirmoy Das Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20221202122844.428006-3-matthew.auld@intel.com commit f7f0ca5788d399e5e523c59fd119df359498864d Author: Matthew Auld Date: Fri Dec 2 12:28:43 2022 +0000 drm/i915/selftests: use live_subtests for live_migrate Probably a good idea to do an igt_flush_test() at the end of each subtest, just to be sure the previous work has been flushed and doesn't somehow interfere with the current subtest. Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: Andi Shyti Cc: Andrzej Hajda Cc: Nirmoy Das Reviewed-by: Andrzej Hajda Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20221202122844.428006-2-matthew.auld@intel.com commit 35168a6c4ed53db4f786858bac23b1474fd7d0dc Author: Chris Wilson Date: Fri Dec 2 12:28:42 2022 +0000 drm/i915/migrate: Account for the reserved_space If the ring is nearly full when calling into emit_pte(), we might incorrectly trample the reserved_space when constructing the packet to emit the PTEs. This then triggers the GEM_BUG_ON(rq->reserved_space > ring->space) when later submitting the request, since the request itself doesn't have enough space left in the ring to emit things like workarounds, breadcrumbs etc. v2: Fix the whitespace errors Testcase: igt@i915_selftests@live_emit_pte_full_ring Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7535 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6889 Fixes: cf586021642d ("drm/i915/gt: Pipelined page migration") Signed-off-by: Chris Wilson Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Andi Shyti Cc: Nirmoy Das Cc: # v5.15+ Tested-by: Nirmoy Das Reviewed-by: Nirmoy Das Reviewed-by: Andrzej Hajda Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20221202122844.428006-1-matthew.auld@intel.com commit e9d48abbce93e2138e37a695ba5931f3d3c9fdd9 Author: Benjamin Tissoires Date: Tue Dec 6 15:59:36 2022 +0100 kselftests: hid: fix missing headers_install step The Makefile was assuming that headers_install was already done in the top source directory, and was searching for installed uapi headers there. Unfortunately this is not the case and we need to manually call that step. To do so, reorder the declaration of the variables, and reuses top_srcdir provided by lib.mk Reported-by: kernel test robot Link: https://lore.kernel.org/all/202212060216.a6X8Py5H-lkp@intel.com/#t Signed-off-by: Benjamin Tissoires Reviewed-by: Jiri Kosina Link: https://lore.kernel.org/r/20221206145936.922196-6-benjamin.tissoires@redhat.com commit d0b93a0d2b00a719d6c761bab5bbe72f41a81a30 Author: Benjamin Tissoires Date: Tue Dec 6 15:59:35 2022 +0100 selftests: hid: ensures we have the proper requirements in config DYNAMIC_FTRACE_WITH_DIRECT_CALLS is implicit on x86_64 but is still a WIP on aarm64. Ensure we get it selected to not have any surprises. Signed-off-by: Benjamin Tissoires Reviewed-by: Jiri Kosina Link: https://lore.kernel.org/r/20221206145936.922196-5-benjamin.tissoires@redhat.com commit 4e0b1b0731bd355a4dee279a270bdd5b29e68b85 Author: Benjamin Tissoires Date: Tue Dec 6 15:59:34 2022 +0100 HID: bpf: enforce HID_BPF dependencies As mentioned in the link below, having JIT and BPF is not enough to have fentry/fexit/fmod_ret APIs. This resolves the error that happens on a system without tracing enabled when hid-bpf tries to load itself. Link: https://lore.kernel.org/r/CABRcYmKyRchQhabi1Vd9RcMQFCcb=EtWyEbFDFRTc-L-U8WhgA@mail.gmail.com Fixes: f5c27da4e3c8 ("HID: initial BPF implementation") Signed-off-by: Benjamin Tissoires Reviewed-by: Florent Revest Reviewed-by: Jiri Kosina Link: https://lore.kernel.org/r/20221206145936.922196-4-benjamin.tissoires@redhat.com commit 4c0eb35fc103eb71e9b842270f449b79b1cf69b2 Author: Ville Syrjälä Date: Sun Nov 27 17:52:39 2022 +0200 drm/i915: Improve PPS debugs Always include both the encoder and PPS instance information in the debug prints so that we know what piece of hardware we're actually dealing with. v2: Make sure pps is selected before debug prints/etc. in intel_pps_vdd_on_unlocked() on vlv/chv There is no pps on pipe C on chv v3: Allow PPS=INVALID_PIPE for vlv/chv Cc: Animesh Manna Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221127155239.26973-1-ville.syrjala@linux.intel.com Reviewed-by: Animesh Manna commit ed5509d1d45102fd82d2d870616ceb48fcc474aa Author: Ville Syrjälä Date: Fri Nov 25 19:31:55 2022 +0200 drm/i915: Fix whitespace Stray spaces have snuck in where everything else uses tabs. Cc: Animesh Manna Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221125173156.31689-9-ville.syrjala@linux.intel.com Reviewed-by: Animesh Manna commit 1e47e035bb733476128a5281bdd29ac27c91c603 Author: Ville Syrjälä Date: Fri Nov 25 19:31:54 2022 +0200 drm/i915: Print the PPS registers using consistent format Use the consistent format when dumping out the PPS control/status registers. Helps with pattern matching. Cc: Animesh Manna Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221125173156.31689-8-ville.syrjala@linux.intel.com Reviewed-by: Animesh Manna commit ba21bb24810f8b49b83ee3f49b60953445e79f8f Author: Ville Syrjälä Date: Fri Nov 25 19:31:53 2022 +0200 drm/i915: Reject unusable power sequencers On ICP-ADP the pins used by the second PPS can be alternatively muxed to some other function. In that case the second power sequencer is unusable. Unfortunately (on my ADL Thinkpad T14 gen3 at least) the BIOS still likes to enable the VDD on the second PPS (due to the VBT declaring the second bogus eDP panel) even when not correctly muxed, so we need to deal with it somehow. For now let's just initialize the PPS as normal, and then use the normal eDP probe failure VDD off path to turn it off (and release the wakeref the PPS init grabbed). The alternative of just declaring that the platform has a single PPS doesn't really work since it would cause the second eDP probe to also try to use the first PPS and thus clobber the state for the first (real) eDP panel. Cc: Animesh Manna Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221125173156.31689-7-ville.syrjala@linux.intel.com Reviewed-by: Animesh Manna commit d83804f22d8532a8feb49ee5f552b41f3df41008 Author: Ville Syrjälä Date: Fri Nov 25 19:31:52 2022 +0200 drm/i915: Extend dual PPS handlind for ICP+ On the PCH side the second PPS was introduced in ICP. Let's make sure we examine both power sequencer on ICP+ as well. Note that DG1/2 south block only has the single PPS, so need to exclude the fake DG1/2 PCHs. Cc: Animesh Manna Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221125173156.31689-6-ville.syrjala@linux.intel.com Reviewed-by: Animesh Manna commit bf38bba3e7d635ff1b6abc097f50094d100e90e2 Author: Ville Syrjälä Date: Fri Nov 25 19:31:51 2022 +0200 drm/i915: Try to use the correct power sequencer intiially on bxt/glk Currently on bxt/glk we just grab the power sequencer index from the VBT data even though it may not have been parsed yet. That could lead us to using the incorrect power sequencer during the initial panel probe. To avoid that let's try to read out the current state of the power sequencer from the hardware. Unfortunately the power sequencer no longer has anything in its registers to associate it with the port, so the best we can do is just iterate through the power sequencers and pick the first one. This should be sufficient for single panel cases. For the dual panel cases we probably need to go back to parsing the VBT before the panel probe (and hope that panel_type=0xff is never a thing in those cases). To that end the code always prefers the VBT panel sequencer, if available. v2: Restructure a bit for upcoming icp+ dual PPS support Cc: Animesh Manna Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221125173156.31689-5-ville.syrjala@linux.intel.com Reviewed-by: Animesh Manna commit 209074fd5a8217688b9ee5c200d470df3e32dee1 Author: Ville Syrjälä Date: Fri Nov 25 19:31:50 2022 +0200 drm/i915: Generalize the PPS vlv_pipe_check() stuff Restate the vlv_pipe_check() stuff in terms of PPS index (rather than pipe, which it is on VLV/CHV) so that we can reuse this same mechanim on other platforms as well. Cc: Animesh Manna Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221125173156.31689-4-ville.syrjala@linux.intel.com commit 3f9ffce5765d68775163b8b134c4d7f156b48eec Author: Ville Syrjälä Date: Fri Nov 25 19:31:49 2022 +0200 drm/i915: Do panel VBT init early if the VBT declares an explicit panel type Lots of ADL machines out there with bogus VBTs that declare two eDP child devices. In order for those to work we need to figure out which power sequencer to use before we try the EDID read. So let's do the panel VBT init early if we can, falling back to the post-EDID init otherwise. The post-EDID init panel_type=0xff approach of assuming the power sequencer should already be enabled doesn't really work with multiple eDP panels, and currently we just end up using the same power sequencer for both eDP ports, which at least confuses the wakeref tracking, and potentially also causes us to toggle the VDD for the panel when we should not. Cc: Animesh Manna Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221125173156.31689-3-ville.syrjala@linux.intel.com commit f70f8153e3642337b444fbc0c64d546a46bbcd62 Author: Ville Syrjälä Date: Fri Nov 25 19:31:48 2022 +0200 drm/i915: Introduce intel_panel_init_alloc() Introduce a place where we can initialize connector->panel after it's been allocated. We already have a intel_panel_init() so had to get creative with the name and came up with intel_panel_init_alloc(). Cc: Animesh Manna Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221125173156.31689-2-ville.syrjala@linux.intel.com commit f67986b0119c048c6537cdc93da511f7ffdb2338 Author: Alan Previn Date: Thu Dec 8 10:05:42 2022 -0800 drm/i915/pxp: Promote pxp subsystem to top-level of i915 Starting with MTL, there will be two GT-tiles, a render and media tile. PXP as a service for supporting workloads with protected contexts and protected buffers can be subscribed by process workloads on any tile. However, depending on the platform, only one of the tiles is used for control events pertaining to PXP operation (such as creating the arbitration session and session tear-down). PXP as a global feature is accessible via batch buffer instructions on any engine/tile and the coherency across tiles is handled implicitly by the HW. In fact, for the foreseeable future, we are expecting this single-control-tile for the PXP subsystem. In MTL, it's the standalone media tile (not the root tile) because it contains the VDBOX and KCR engine (among the assets PXP relies on for those events). Looking at the current code design, each tile is represented by the intel_gt structure while the intel_pxp structure currently hangs off the intel_gt structure. Keeping the intel_pxp structure within the intel_gt structure makes some internal functionalities more straight forward but adds code complexity to code readability and maintainibility to many external-to-pxp subsystems which may need to pick the correct intel_gt structure. An example of this would be the intel_pxp_is_active or intel_pxp_is_enabled functionality which should be viewed as a global level inquiry, not a per-gt inquiry. That said, this series promotes the intel_pxp structure into the drm_i915_private structure making it a top-level subsystem and the PXP subsystem will select the control gt internally and keep a pointer to it for internal reference. This promotion comes with two noteworthy changes: 1. Exported pxp functions that are called by external subsystems (such as intel_pxp_enabled/active) will have to check implicitly if i915->pxp is valid as that structure will not be allocated for HW that doesn't support PXP. 2. Since GT is now considered a soft-dependency of PXP we are ensuring that GT init happens before PXP init and vice versa for fini. This causes a minor ordering change whereby we previously called intel_pxp_suspend after intel_uc_suspend but now is before i915_gem_suspend_late but the change is required for correct dependency flows. Additionally, this re-order change doesn't have any impact because at that point in either case, the top level entry to i915 won't observe any PXP events (since the GPU was quiesced during suspend_prepare). Also, any PXP event doesn't really matter when we disable the PXP HW (global GT irqs are already off anyway, so even if there was a bug that generated spurious events we wouldn't see it and we would just clean it up on resume which is okay since the default fallback action for PXP would be to keep the sessions off at this suspend stage). Changes from prior revs: v11: - Reformat a comment (Tvrtko). v10: - Change the code flow for intel_pxp_init to make it more cleaner and readible with better comments explaining the difference between full-PXP-feature vs the partial-teelink inits depending on the platform. Additionally, only do the pxp allocation when we are certain the subsystem is needed. (Tvrtko). v9: - Cosmetic cleanups in supported/enabled/active. (Daniele). - Add comments for intel_pxp_init and pxp_get_ctrl_gt that explain the functional flow for when PXP is not supported but the backend-assets are needed for HuC authentication (Daniele and Tvrtko). - Fix two remaining functions that are accessible outside PXP that need to be checking pxp ptrs before using them: intel_pxp_irq_handler and intel_pxp_huc_load_and_auth (Tvrtko and Daniele). - User helper macro in pxp-debugfs (Tvrtko). v8: - Remove pxp_to_gt macro (Daniele). - Fix a bug in pxp_get_ctrl_gt for the case of MTL and we don't support GSC-FW on it. (Daniele). - Leave i915->pxp as NULL if we dont support PXP and in line with that, do additional validity check on i915->pxp for intel_pxp_is_supported/enabled/active (Daniele). - Remove unncessary include header from intel_gt_debugfs.c and check drm_minor i915->drm.primary (Daniele). - Other cosmetics / minor issues / more comments on suspend flow order change (Daniele). v7: - Drop i915_dev_to_pxp and in intel_pxp_init use 'i915->pxp' through out instead of local variable newpxp. (Rodrigo) - In the case intel_pxp_fini is called during driver unload but after i915 loading failed without pxp being allocated, check i915->pxp before referencing it. (Alan) v6: - Remove HAS_PXP macro and replace it with intel_pxp_is_supported because : [1] introduction of 'ctrl_gt' means we correct this for MTL's upcoming series now. [2] Also, this has little impact globally as its only used by PXP-internal callers at the moment. - Change intel_pxp_init/fini to take in i915 as its input to avoid ptr-to-ptr in init/fini calls.(Jani). - Remove the backpointer from pxp->i915 since we can use pxp->ctrl_gt->i915 if we need it. (Rodrigo). v5: - Switch from series to single patch (Rodrigo). - change function name from pxp_get_kcr_owner_gt to pxp_get_ctrl_gt. - Fix CI BAT failure by removing redundant call to intel_pxp_fini from driver-remove. - NOTE: remaining open still persists on using ptr-to-ptr and back-ptr. v4: - Instead of maintaining intel_pxp as an intel_gt structure member and creating a number of convoluted helpers that takes in i915 as input and redirects to the correct intel_gt or takes any intel_gt and internally replaces with the correct intel_gt, promote it to be a top-level i915 structure. v3: - Rename gt level helper functions to "intel_pxp_is_enabled/ supported/ active_on_gt" (Daniele) - Upgrade _gt_supports_pxp to replace what was intel_gtpxp_is supported as the new intel_pxp_is_supported_on_gt to check for PXP feature support vs the tee support for huc authentication. Fix pxp-debugfs-registration to use only the former to decide support. (Daniele) - Couple minor optimizations. v2: - Avoid introduction of new device info or gt variables and use existing checks / macros to differentiate the correct GT->PXP control ownership (Daniele Ceraolo Spurio) - Don't reuse the updated global-checkers for per-GT callers (such as other files within PXP) to avoid unnecessary GT-reparsing, expose a replacement helper like the prior ones. (Daniele). v1: - Add one more patch to the series for the intel_pxp suspend/resume for similar refactoring References: https://patchwork.freedesktop.org/patch/msgid/20221202011407.4068371-1-alan.previn.teres.alexis@intel.com Signed-off-by: Alan Previn Reviewed-by: Daniele Ceraolo Spurio Acked-by: Tvrtko Ursulin Signed-off-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20221208180542.998148-1-alan.previn.teres.alexis@intel.com commit e6d6e9d0b83d49c330f89ee8d3d1728a930c933e Author: Daniele Ceraolo Spurio Date: Thu Dec 8 12:05:21 2022 -0800 drm/i915/mtl: MTL has one GSC CS on the media GT Now that we have the GSC FW support code as a user to the GSC CS, we can add the relevant flag to the engine mask. Note that the engine will still be disabled until we define the GSC FW binary file. Signed-off-by: Daniele Ceraolo Spurio Cc: Matt Roper Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20221208200521.2928378-7-daniele.ceraolospurio@intel.com commit 6b7cbdbe20b33943b86cb8d752ade6841e83fc42 Author: Jonathan Cavitt Date: Thu Dec 8 12:05:20 2022 -0800 drm/i915/gsc: Disable GSC engine and power well if FW is not selected The GSC CS is only used for communicating with the GSC FW, so no need to initialize it if we're not going to use the FW. If we're not using neither the engine nor the microcontoller, then we can also disable the power well. IMPORTANT: lack of GSC FW breaks media C6 due to opposing requirements between CS setup and forcewake idleness. See in-code comment for detail. Signed-off-by: Jonathan Cavitt Signed-off-by: Daniele Ceraolo Spurio Cc: Matt Roper Cc: John C Harrison Cc: Rodrigo Vivi Cc: Vinay Belgaumkar Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20221208200521.2928378-6-daniele.ceraolospurio@intel.com commit 5a44fcd73498c29293ff2b520d6f02e49c68d59f Author: Daniele Ceraolo Spurio Date: Thu Dec 8 12:05:19 2022 -0800 drm/i915/gsc: Do a driver-FLR on unload if GSC was loaded If the GSC was loaded, the only way to stop it during the driver unload flow is to do a driver-FLR. The driver-initiated FLR is not the same as PCI config space FLR in that it doesn't reset the SGUnit and doesn't modify the PCI config space. Thus, it doesn't require a re-enumeration of the PCI BARs. However, the driver-FLR does cause a memory wipe of graphics memory on all discrete GPU platforms or a wipe limited to stolen memory on the integrated GPU platforms. We perform the FLR as the last action before releasing the MMIO bar, so that we don't have to care about the consequences of the reset on the unload flow. v2: rename FLR function, add comment to explain FLR impact (Rodrigo), better explain why GSC needs FLR (Alan) Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Alan Previn Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20221208200521.2928378-5-daniele.ceraolospurio@intel.com commit 15bd4a67e914dbee6b6ba5dfd32a09cbf7419a5b Author: Daniele Ceraolo Spurio Date: Thu Dec 8 12:05:18 2022 -0800 drm/i915/gsc: GSC firmware loading GSC FW is loaded by submitting a dedicated command via the GSC engine. The memory area used for loading the FW is then re-purposed as local memory for the GSC itself, so we use a separate allocation instead of using the one where we keep the firmware stored for reload. The GSC is not reset as part of GT reset, so we only need to load it on first boot and S3/S4 exit. v2: use REG_* for register fields definitions (Rodrigo), move to WQ immediately v3: mark worker function as static Bspec: 63347, 65346 Signed-off-by: Daniele Ceraolo Spurio Cc: Alan Previn Cc: John Harrison Cc: Rodrigo Vivi Reviewed-by: Alan Previn Link: https://patchwork.freedesktop.org/patch/msgid/20221208200521.2928378-4-daniele.ceraolospurio@intel.com commit f0ce5178a38918adfef728f43dd544616b05e3e3 Author: Daniele Ceraolo Spurio Date: Thu Dec 8 12:05:17 2022 -0800 drm/i915/gsc: Skip the version check when fetching the GSC FW The current exectation from the FW side is that the driver will query the GSC FW version after the FW is loaded, similarly to what the mei driver does on DG2. However, we're discussing with the FW team if there is a way to extract the version from the bin file before loading, so we can keep the code the same as for older FWs. Since the GSC FW version is not currently required for functionality and is only needed for debug purposes, we can skip the FW version for now at fetch time and add it later on when we've agreed on the approach. v2: rebased on uc_fw version struct changes. Signed-off-by: Daniele Ceraolo Spurio Cc: Alan Previn Cc: John Harrison Reviewed-by: Rodrigo Vivi #v1 Reviewed-by: Alan Previn Link: https://patchwork.freedesktop.org/patch/msgid/20221208200521.2928378-3-daniele.ceraolospurio@intel.com commit 242c4b91cd35b66c4aed9286b72352f69c3e4050 Author: Daniele Ceraolo Spurio Date: Thu Dec 8 12:05:16 2022 -0800 drm/i915/uc: Introduce GSC FW On MTL the GSC FW needs to be loaded on the media GT by the graphics driver. We're going to treat it like a new uc_fw, so add the initial defs and init/fini functions for it. Similarly to the other FWs, the GSC FW path can be overridden via modparam. The modparam can also be used to disable the GSC FW loading by setting it to an empty string. Note that the new structure has been called intel_gsc_uc to avoid confusion with the existing intel_gsc, which instead represents the heci gsc interfaces. v2: re-order Makefile list to be properly sorted (Jani, Alan), better comment (alan) Signed-off-by: Daniele Ceraolo Spurio Cc: Alan Previn Cc: John Harrison Cc: Jani Nikula Reviewed-by: Alan Previn Link: https://patchwork.freedesktop.org/patch/msgid/20221208200521.2928378-2-daniele.ceraolospurio@intel.com commit d878d3dc126db05b075147456644bd2d2ab1fb5e Author: Lorenzo Bianconi Date: Fri Dec 9 16:07:22 2022 +0100 wifi: mt76: mt7915: get rid of wed rx_buf_ring page_frag_cache Since wed rx_buf_ring page_frag_cache is no longer used in a hot path, remove it and rely on page allocation APIs in mt7915_mmio_wed_init_rx_buf() and mt7915_mmio_wed_release_rx_buf() Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 47180ecf4541146836c5307c1d5526f8ac6a5a6d Author: Sean Wang Date: Fri Dec 9 07:01:57 2022 +0800 wifi: mt76: mt7921: resource leaks at mt7921_check_offload_capability() Fixed coverity issue with resource leaks at variable "fw" going out of scope leaks the storage it points to mt7921_check_offload_capability(). Reported-by: coverity-bot Addresses-Coverity-ID: 1527806 ("Resource leaks") Fixes: 034ae28b56f1 ("wifi: mt76: mt7921: introduce remain_on_channel support") Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 4493acad5b334ed0b45e374135acc6d6aaa9755c Author: Lorenzo Bianconi Date: Thu Dec 8 12:36:10 2022 +0100 wifi: mt76: dma: rely on queue page_frag_cache for wed rx queues Since mt76_dma_rx_fill() acquires mt76_queue spinlock, rely on mt76_queue page_frag_cache in mt76_dma_rx_fill() instead of wed rx_buf_ring page_frag_cache. Get rid of mt76_dma_rx_get_frag_cache since it is no longer used. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 96f134dc19645be4994e89a2f68fa89309becbee Author: Lorenzo Bianconi Date: Thu Dec 8 11:46:40 2022 +0100 wifi: mt76: handle possible mt76_rx_token_consume failures Take into account possible error conditions of mt76_rx_token_consume routine in mt7915_mmio_wed_init_rx_buf() and mt76_dma_add_buf() Fixes: cd372b8c99c5 ("wifi: mt76: add WED RX support to mt76_dma_{add,get}_buf") Fixes: 4f831d18d12d ("wifi: mt76: mt7915: enable WED RX support") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit fe13dad8992be0b26c1be390bcd111acf9892c17 Author: Lorenzo Bianconi Date: Wed Dec 7 22:49:31 2022 +0100 wifi: mt76: dma: do not increment queue head if mt76_dma_add_buf fails Do not increment queue head if mt76_dma_add_buf fails for Wireless Ethernet Dispatcher rx queues. Fixes: cd372b8c99c5 ("wifi: mt76: add WED RX support to mt76_dma_{add,get}_buf") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 12a88d4d307e227b9ada9377ea49ce2b79f165f5 Author: Lorenzo Bianconi Date: Wed Dec 7 17:19:45 2022 +0100 wifi: mt76: mt7615: enable per-phy led support Introduce the capability to support per-phy led blinking. This is needed for devices supporting dbdc. Co-developed-by: Ryder Lee Signed-off-by: Ryder Lee Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 9e81c2c7b9af6a5f160e0a9a7f009c37910402ee Author: Lorenzo Bianconi Date: Wed Dec 7 17:19:44 2022 +0100 wifi: mt76: mt7915: enable per-phy led support Introduce the capability to support per-phy led blinking. This is needed for devices supporting dbdc. Tested-by: Frank Wunderlich Co-developed-by: Ryder Lee Signed-off-by: Ryder Lee Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 3abd46ddf80a4f1bbe22372b9b808f12dfe2602b Author: Lorenzo Bianconi Date: Wed Dec 7 17:19:43 2022 +0100 wifi: mt76: move leds struct in mt76_phy Move leds struct in mt76_phy in order to have leds associated to phy (e.g. in dbdc mode) instead of per device. Tested-by: Frank Wunderlich Co-developed-by: Ryder Lee Signed-off-by: Ryder Lee Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit a00b791026920c3dd2ddcf4fb730ccf6db961627 Author: Lorenzo Bianconi Date: Wed Dec 7 17:19:42 2022 +0100 wifi: mt76: move leds field in leds struct This is a preliminary patch to support per-phy leds. Tested-by: Frank Wunderlich Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 0ffcb2a68b15bd63d5555a923ae7dfe8bfdb14a7 Author: Deren Wu Date: Thu Dec 8 00:03:10 2022 +0800 wifi: mt76: fix coverity uninit_use_in_call in mt76_connac2_reverse_frag0_hdr_trans() The default case for frame_contorl is invalid. We should always assign addr3 of this frame properly. Coverity error message: if (ieee80211_has_a4(hdr.frame_control)) (19) Event uninit_use_in_call: Using uninitialized value "hdr". Field "hdr.addr3" is uninitialized when calling "memcpy". memcpy(skb_push(skb, sizeof(hdr)), &hdr, sizeof(hdr)); else memcpy(skb_push(skb, sizeof(hdr) - 6), &hdr, sizeof(hdr) - 6); Fixes: 0880d40871d1 ("mt76: connac: move mt76_connac2_reverse_frag0_hdr_trans in mt76-connac module") Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau commit edb0406bda4629ef496f52eb11cbea7e92ed301b Author: Ryder Lee Date: Wed Dec 7 15:30:05 2022 +0800 wifi: mt76: mt7915: fix unintended sign extension of mt7915_hw_queue_read() In the expression "map[i].qid << 24" starts as u8, but is promoted to "signed int", then sign-extended to type "unsigned long", which is not intended. Cast to u32 to avoid the sign extension. Fixes: 776ec4e77aa6 ("mt76: mt7915: rework debugfs queue info") Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 063cca0252b46970e7e9ca423d5e930be3179aa1 Author: Ryder Lee Date: Wed Dec 7 15:30:04 2022 +0800 wifi: mt76: mt7996: fix unintended sign extension of mt7996_hw_queue_read() In the expression "map[i].qid << 24" starts as u8, but is promoted to "signed int", then sign-extended to type "unsigned long", which is not intended. Cast to u32 to avoid the sign extension. Reported-by: coverity-bot Addresses-Coverity-ID: 1527813 ("Integer handling issues") 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 7176fe656f1b5cf5aa6d5d306d0710c4e5d7a6b5 Author: Quan Zhou Date: Wed Dec 7 13:03:41 2022 +0800 wifi: mt76: mt7921: add support to update fw capability with MTFG table In ACPI enabled devices, mt7921 should read MTFG table from platform hardware. Apply necessary settings for firmware capabilities through CLC command. Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Quan Zhou Signed-off-by: Felix Fietkau commit 6e1abc51c945663bddebfa1beb9590ff5b250eb7 Author: Lorenzo Bianconi Date: Mon Dec 5 17:59:04 2022 +0100 wifi: mt76: mt76x0: fix oob access in mt76x0_phy_get_target_power After 'commit ba45841ca5eb ("wifi: mt76: mt76x02: simplify struct mt76x02_rate_power")', mt76x02 relies on ht[0-7] rate_power data for vht mcs{0,7}, while it uses vth[0-1] rate_power for vht mcs {8,9}. Fix a possible out-of-bound access in mt76x0_phy_get_target_power routine. Fixes: ba45841ca5eb ("wifi: mt76: mt76x02: simplify struct mt76x02_rate_power") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 54ccb836ffb28eacba51b674cbe94cb5613f8441 Author: Lorenzo Bianconi Date: Sun Dec 4 23:01:37 2022 +0100 wifi: mt76: mt7996: fix endianness warning in mt7996_mcu_sta_he_tlv Fix the following sparse warnings in mt7996_mcu_sta_he_tlv routine: warning: incorrect type in assignment (different base types) expected unsigned char got restricted __le16 [usertype] warning: incorrect type in assignment (different base types) expected unsigned char got restricted __le16 [usertype] Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit ef1ea24cb0ecfd42c1ff266d92613163792aec77 Author: Ryder Lee Date: Sun Dec 4 15:18:15 2022 +0800 wifi: mt76: mt7996: drop always true condition of __mt7996_reg_addr() addr <= MT_CBTOP2_PHY_END(0xffffffff) is always true (<= u32max), so drop it. 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 b0f7b9563358493dfe70d3e4c3ebeffc92d4b494 Author: Ryder Lee Date: Sun Dec 4 15:18:14 2022 +0800 wifi: mt76: mt7915: drop always true condition of __mt7915_reg_addr() smatch warnings: addr <= MT_CBTOP2_PHY_END(0xffffffff) is always true (<= u32max), so drop it. Fixes: cd4c314a65d3 ("mt76: mt7915: refine register definition") Reported-by: kernel test robot Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 7a53eecd5c877c445e10c32a4b4d671cd36c6558 Author: Ryder Lee Date: Sun Dec 4 05:33:19 2022 +0800 wifi: mt76: mt7915: check the correctness of event data The mcu event might not be reliable, so check the correctness of data before handling it. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 783ef7da7a53c7ab98471f47fbabab6cf6f45c8f Author: Ryder Lee Date: Sun Dec 4 05:33:18 2022 +0800 wifi: mt76: mt7996: check return value before accessing free_block_num Check return value of mt7996_mcu_get_eeprom_free_block() first before accessing free_block_num. 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 59b27a7d472f100ac8998e15a63c47a03cced12a Author: Ryder Lee Date: Sun Dec 4 05:33:17 2022 +0800 wifi: mt76: mt7915: check return value before accessing free_block_num Check return value of mt7915_mcu_get_eeprom_free_block() first before accessing free_block_num. Fixes: bbc1d4154ec1 ("mt76: mt7915: add default calibrated data support") Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 3fc36de8212bda168eb859cf83a7f44babdcf806 Author: Ryder Lee Date: Sat Dec 3 15:37:54 2022 +0800 wifi: mt76: mt7915: split mcu chan_mib array up The current flow confuses coverity check that leads to false reporting, so split the offs[] into two pieces according to chipset revision to silence coverity tool. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit aab169ad3a7aa8678aed90d7fdbc243e3d4b32a6 Author: Ryder Lee Date: Sat Dec 3 11:22:25 2022 +0800 wifi: mt76: mt7996: fix integer handling issue of mt7996_rf_regval_set() This code is supposed to set a u32 value, but casting will not work on big endian systems. Reported-by: coverity-bot Addresses-Coverity-ID: 1527816 ("Integer handling issues") 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 f37c6e5c75029443bc72c45acf92b2f2de2945be Author: Ryder Lee Date: Sat Dec 3 11:22:24 2022 +0800 wifi: mt76: mt7996: fix insecure data handling of mt7996_mcu_rx_radar_detected() Coverity message: using tainted "r->band_idx" variable as an index into an array "(*dev).mt76.phys". Reported-by: coverity-bot Addresses-Coverity-ID: 1527812 ("Insecure data handling") 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 5202b983f9894d31110e49c4ec6b57955b5eaa1a Author: Ryder Lee Date: Sat Dec 3 11:22:23 2022 +0800 wifi: mt76: mt7996: fix insecure data handling of mt7996_mcu_ie_countdown() Coverity message: using tainted "hdr->band" variable as an index into an array "(*dev).mt76.phys". Reported-by: coverity-bot Addresses-Coverity-ID: 1527797 ("Insecure data handling") 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 8b25301af01566f4b5a301fc1ad7c5d2b1788d7f Author: Ryder Lee Date: Sat Dec 3 11:22:22 2022 +0800 wifi: mt76: mt7915: fix mt7915_rate_txpower_get() resource leaks Coverity message: variable "buf" going out of scope leaks the storage. Reported-by: coverity-bot Addresses-Coverity-ID: 1527799 ("Resource leaks") Fixes: e3296759f347 ("wifi: mt76: mt7915: enable per bandwidth power limit support") Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit aec4cf2ea0797e28f18f8dbe01943a56d987fe56 Author: Deren Wu Date: Thu Dec 1 23:53:37 2022 +0800 wifi: mt76: mt7921s: fix slab-out-of-bounds access in sdio host SDIO may need addtional 511 bytes to align bus operation. If the tailroom of this skb is not big enough, we would access invalid memory region. For low level operation, increase skb size to keep valid memory access in SDIO host. Error message: [69.951] BUG: KASAN: slab-out-of-bounds in sg_copy_buffer+0xe9/0x1a0 [69.951] Read of size 64 at addr ffff88811c9cf000 by task kworker/u16:7/451 [69.951] CPU: 4 PID: 451 Comm: kworker/u16:7 Tainted: G W OE 6.1.0-rc5 #1 [69.951] Workqueue: kvub300c vub300_cmndwork_thread [vub300] [69.951] Call Trace: [69.951] [69.952] dump_stack_lvl+0x49/0x63 [69.952] print_report+0x171/0x4a8 [69.952] kasan_report+0xb4/0x130 [69.952] kasan_check_range+0x149/0x1e0 [69.952] memcpy+0x24/0x70 [69.952] sg_copy_buffer+0xe9/0x1a0 [69.952] sg_copy_to_buffer+0x12/0x20 [69.952] __command_write_data.isra.0+0x23c/0xbf0 [vub300] [69.952] vub300_cmndwork_thread+0x17f3/0x58b0 [vub300] [69.952] process_one_work+0x7ee/0x1320 [69.952] worker_thread+0x53c/0x1240 [69.952] kthread+0x2b8/0x370 [69.952] ret_from_fork+0x1f/0x30 [69.952] [69.952] Allocated by task 854: [69.952] kasan_save_stack+0x26/0x50 [69.952] kasan_set_track+0x25/0x30 [69.952] kasan_save_alloc_info+0x1b/0x30 [69.952] __kasan_kmalloc+0x87/0xa0 [69.952] __kmalloc_node_track_caller+0x63/0x150 [69.952] kmalloc_reserve+0x31/0xd0 [69.952] __alloc_skb+0xfc/0x2b0 [69.952] __mt76_mcu_msg_alloc+0xbf/0x230 [mt76] [69.952] mt76_mcu_send_and_get_msg+0xab/0x110 [mt76] [69.952] __mt76_mcu_send_firmware.cold+0x94/0x15d [mt76] [69.952] mt76_connac_mcu_send_ram_firmware+0x415/0x54d [mt76_connac_lib] [69.952] mt76_connac2_load_ram.cold+0x118/0x4bc [mt76_connac_lib] [69.952] mt7921_run_firmware.cold+0x2e9/0x405 [mt7921_common] [69.952] mt7921s_mcu_init+0x45/0x80 [mt7921s] [69.953] mt7921_init_work+0xe1/0x2a0 [mt7921_common] [69.953] process_one_work+0x7ee/0x1320 [69.953] worker_thread+0x53c/0x1240 [69.953] kthread+0x2b8/0x370 [69.953] ret_from_fork+0x1f/0x30 [69.953] The buggy address belongs to the object at ffff88811c9ce800 which belongs to the cache kmalloc-2k of size 2048 [69.953] The buggy address is located 0 bytes to the right of 2048-byte region [ffff88811c9ce800, ffff88811c9cf000) [69.953] Memory state around the buggy address: [69.953] ffff88811c9cef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [69.953] ffff88811c9cef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [69.953] >ffff88811c9cf000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [69.953] ^ [69.953] ffff88811c9cf080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [69.953] ffff88811c9cf100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc Fixes: 764dee47e2c1 ("mt76: sdio: move common code in mt76_sdio module") Suggested-by: Lorenzo Bianconi Tested-by: YN Chen Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau commit 18425d7d74c5be88b13b970a21e52e2498abf4ba Author: Wang Yufen Date: Fri Nov 25 17:06:07 2022 +0800 wifi: mt76: mt7915: add missing of_node_put() Add missing of_node_put() after of_reserved_mem_lookup() Fixes: 99ad32a4ca3a ("mt76: mt7915: add support for MT7986") Signed-off-by: Wang Yufen Signed-off-by: Felix Fietkau commit 612e241fb4bcd98d8ff9da7a795abb86b8ccfe38 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:11 2022 +0100 drm/bridge: tfp410: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221118224540.619276-38-uwe@kleine-koenig.org Signed-off-by: Robert Foss commit 9efb93447e91e7368a7462fe5ddaa72115860d92 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:08 2022 +0100 drm/bridge/tc358775: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221118224540.619276-35-uwe@kleine-koenig.org Signed-off-by: Robert Foss commit 637a6a1bec9b68c1c48cbd45d72bf287d1e9f638 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:07 2022 +0100 drm/bridge: tc358768: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221118224540.619276-34-uwe@kleine-koenig.org Signed-off-by: Robert Foss commit 39fffc9d08814665b1b329fe53a76bb7340c6dc3 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:06 2022 +0100 drm/bridge: tc358767: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221118224540.619276-33-uwe@kleine-koenig.org Signed-off-by: Robert Foss commit f5abefd2f88583a925ead6d9b79fd7279d1f4482 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:05 2022 +0100 drm/bridge: sii8620: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221118224540.619276-32-uwe@kleine-koenig.org Signed-off-by: Robert Foss commit 02fb0ab3af7442ebb1456904e8ebc4380a52564c Author: Uwe Kleine-König Date: Fri Nov 18 23:36:04 2022 +0100 drm/bridge: sii9234: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221118224540.619276-31-uwe@kleine-koenig.org Signed-off-by: Robert Foss commit 9ba42531c738ce77fa09ce2beb596ae91e9a9854 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:03 2022 +0100 drm/bridge: sii902x: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221118224540.619276-30-uwe@kleine-koenig.org Signed-off-by: Robert Foss commit 536a94e8e664fc5d83887dfada94c663ea95b802 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:01 2022 +0100 drm/bridge: nxp-ptn3460: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221118224540.619276-28-uwe@kleine-koenig.org Signed-off-by: Robert Foss commit dd14e4f9ca47b54ec344872e13e5e2307982f42a Author: Uwe Kleine-König Date: Fri Nov 18 23:36:00 2022 +0100 drm/bridge: megachips: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221118224540.619276-27-uwe@kleine-koenig.org Signed-off-by: Robert Foss commit cae7555706f71e376df269c9723987bed6d6426c Author: Uwe Kleine-König Date: Fri Nov 18 23:35:59 2022 +0100 drm/bridge: lt9611uxc: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221118224540.619276-26-uwe@kleine-koenig.org Signed-off-by: Robert Foss commit 453d060360a57e332649d925d68d47fda53d60bf Author: Uwe Kleine-König Date: Fri Nov 18 23:35:58 2022 +0100 drm/bridge: lt9611: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221118224540.619276-25-uwe@kleine-koenig.org Signed-off-by: Robert Foss commit 8f93a33ec82e10a091902bc737208fc04a1fb6c2 Author: Uwe Kleine-König Date: Fri Nov 18 23:35:57 2022 +0100 drm/bridge: lt9211: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221118224540.619276-24-uwe@kleine-koenig.org Signed-off-by: Robert Foss commit 26588cbde41905b267dbcf1df884e655d0c55a73 Author: Uwe Kleine-König Date: Fri Nov 18 23:35:56 2022 +0100 drm/bridge: lt8912b: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221118224540.619276-23-uwe@kleine-koenig.org Signed-off-by: Robert Foss commit c4150e139af288da3dd6c39589c6b1519b322506 Author: Uwe Kleine-König Date: Fri Nov 18 23:35:55 2022 +0100 drm/bridge: it66121: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221118224540.619276-22-uwe@kleine-koenig.org Signed-off-by: Robert Foss commit b5b986cd853c321cffd8096786184a85430c80de Author: Uwe Kleine-König Date: Fri Nov 18 23:35:54 2022 +0100 drm/bridge: it6505: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221118224540.619276-21-uwe@kleine-koenig.org Signed-off-by: Robert Foss commit 052a02a6b56f7c6a61e471907b787c47522bf354 Author: Uwe Kleine-König Date: Fri Nov 18 23:35:52 2022 +0100 drm/bridge: icn6211: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221118224540.619276-19-uwe@kleine-koenig.org Signed-off-by: Robert Foss commit 71450f8c824f5571d4af9e6e021b733085c8e690 Author: Uwe Kleine-König Date: Fri Nov 18 23:35:51 2022 +0100 drm/bridge: anx7625: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221118224540.619276-18-uwe@kleine-koenig.org Signed-off-by: Robert Foss commit 7fcf039a18c838a95b884d7832c5a518840ef7fd Author: Uwe Kleine-König Date: Fri Nov 18 23:35:50 2022 +0100 drm/bridge/analogix/anx78xx: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221118224540.619276-17-uwe@kleine-koenig.org Signed-off-by: Robert Foss commit a36f4334b1456cacd5208b7a3677877bccabc43a Author: Uwe Kleine-König Date: Fri Nov 18 23:35:49 2022 +0100 drm/bridge/analogix/anx6345: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221118224540.619276-16-uwe@kleine-koenig.org Signed-off-by: Robert Foss commit af9339788966f42b2b5917bc4bc1fdef9e35dff8 Author: Jani Nikula Date: Thu Dec 8 15:36:38 2022 +0200 drm/i915/display: no need for gt/gen8_ppgtt.h Remove an unnecessary include. Signed-off-by: Jani Nikula Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20221208133638.478024-1-jani.nikula@intel.com commit be4a847652056b067d6dc6fe0fc024a9e2e987ca Author: Khaled Almahallawy Date: Wed Nov 23 14:09:26 2022 -0800 drm/i915/display: Don't disable DDI/Transcoder when setting phy test pattern Bspecs has updated recently to remove the restriction to disable DDI/Transcoder before setting PHY test pattern. This update is to address PHY compliance test failures observed on a port with LTTPR. The issue is that when Transc. is disabled, the main link signals fed to LTTPR will be dropped invalidating link training, which will affect the quality of the phy test pattern when the transcoder is enabled again. v2: Update commit message (Clint) v3: Add missing Signed-off in v2 v4: Update Bspec and commit message for pre-gen12 (Jani) Bspec: 50482, 7555 Fixes: 8cdf72711928 ("drm/i915/dp: Program vswing, pre-emphasis, test-pattern") Cc: Imre Deak Cc: Clint Taylor CC: Jani Nikula Tested-by: Khaled Almahallawy Reviewed-by: Clint Taylor Signed-off-by: Khaled Almahallawy Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20221123220926.170034-1-khaled.almahallawy@intel.com commit 3b0a01a6a5224ed9b3f69f44edaa889b2e2b9779 Author: Stefan Eichenberger Date: Mon Nov 28 12:23:20 2022 +0100 drm/bridge: lt8912b: Add hot plug detection Enable hot plug detection when it is available on the HDMI port. Without this connecting to a different monitor with incompatible timing before the 10 seconds poll period will lead to a broken display output. Fixes: 30e2ae943c26 ("drm/bridge: Introduce LT8912B DSI to HDMI bridge") Signed-off-by: Stefan Eichenberger Signed-off-by: Francesco Dolcini Reviewed-by: Adrien Grassein Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20221128112320.25708-1-francesco@dolcini.it commit 2ac5438ca9226c70ef37e81bd6b6c997017ae081 Author: Ville Syrjälä Date: Fri Dec 2 15:44:12 2022 +0200 drm/i915/vrr: Be more careful with the bits in TRANS_VRR_CTL On mtl (at least) clearing the guardband bits in the same write as the enable bit gets cleared seems to cause an immediate FIFO underrun. Thus is seems that we need to first clear just the enable bit, then wait for the VRR live status to indicate the transcoder has exited VRR mode (this step is documented in Bspec as well), and finally we can clear out the rest of the TRANS_VRR_CTL for good measure. I did this without any RMWs in case we want to toggle VRR on/off via DSB in the future, and as we know DSB can't read registers. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221202134412.21943-5-ville.syrjala@linux.intel.com Reviewed-by: Manasi Navare commit 0504d0acc282fe99cf4bd0cdc5551b352357142f Author: Ville Syrjälä Date: Fri Dec 2 15:44:11 2022 +0200 drm/i915/vrr: Reorder transcoder vs. vrr enable/disable On mtl it looks like disabling VRR after the transcoder has been disabled can cause the pipe/transcoder to get stuck when re-enabled in non-vrr mode. Reversing the order seems to help. Bspec is extremely confused about the VRR enable/disable sequence anyway, and this now more closely matches the non-modeset VRR sequence, whereas the full modeset sequence still claims that the original order is fine. But since we eventually want to toggle VRR without a full modeset anyway this seems like the better order to follow. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221202134412.21943-4-ville.syrjala@linux.intel.com Reviewed-by: Manasi Navare commit 944bda740fc953d37d8a8a5506193c6031ecd2f9 Author: Ville Syrjälä Date: Fri Dec 2 15:44:10 2022 +0200 drm/i915/vrr: Fix guardband/vblank exit length calculation for adl+ We are miscalculating both the guardband value, and the resulting vblank exit length on adl+. This means that our start of vblank (double buffered register latch point) is incorrect, and we also think that it's not where it actually is (hence vblank evasion/etc. may not work properly). Fix up the calculations to match the real hardware behaviour (as reverse engineered by intel_display_poller). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221202134412.21943-3-ville.syrjala@linux.intel.com Reviewed-by: Manasi Navare commit 98f974aa3c43f862826d2c05e3844536d0972ed4 Author: Ville Syrjälä Date: Fri Dec 2 15:44:09 2022 +0200 drm/i915/vrr: Make registers latch in a consitent place on icl/tgl Account for the framestart delay when calculating the "pipeline full" value for icl/tgl vrr. This puts the start of vblank (ie. where the double bufferd registers get latched) to a consistent place regardless of what framestart delay value is used. framestart delay does not change where start of vblank occurs in non-vrr mode and I can't see any reason why we'd want different behaviour in vrr mode. Currently framestart delay is always set to 1, and the hardcoded 4 scanlines in the code means we're currently delaying the start of vblank by three extra lines. And with framestart delay set to 4 we'd have no extra delay. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221202134412.21943-2-ville.syrjala@linux.intel.com Reviewed-by: Manasi Navare commit 950b43f8bd8a4d476d2da6d2a083a89bcd3c90d7 Author: Nagarajan Maran Date: Tue Nov 29 19:55:32 2022 +0530 wifi: ath11k: fix monitor mode bringup crash When the interface is brought up in monitor mode, it leads to NULL pointer dereference crash. This crash happens when the packet type is extracted for a SKB. This extraction which is present in the received msdu delivery path,is not needed for the monitor ring packets since they are all RAW packets. Hence appending the flags with "RX_FLAG_ONLY_MONITOR" to skip that extraction. Observed calltrace: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000064 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=0000000048517000 [0000000000000064] pgd=0000000000000000, p4d=0000000000000000 Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP Modules linked in: ath11k_pci ath11k qmi_helpers CPU: 2 PID: 1781 Comm: napi/-271 Not tainted 6.1.0-rc5-wt-ath-656295-gef907406320c-dirty #6 Hardware name: Qualcomm Technologies, Inc. IPQ8074/AP-HK10-C2 (DT) pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : ath11k_hw_qcn9074_rx_desc_get_decap_type+0x34/0x60 [ath11k] lr : ath11k_hw_qcn9074_rx_desc_get_decap_type+0x5c/0x60 [ath11k] sp : ffff80000ef5bb10 x29: ffff80000ef5bb10 x28: 0000000000000000 x27: ffff000007baafa0 x26: ffff000014a91ed0 x25: 0000000000000000 x24: 0000000000000000 x23: ffff800002b77378 x22: ffff000014a91ec0 x21: ffff000006c8d600 x20: 0000000000000000 x19: ffff800002b77740 x18: 0000000000000006 x17: 736564203634343a x16: 656e694c20657079 x15: 0000000000000143 x14: 00000000ffffffea x13: ffff80000ef5b8b8 x12: ffff80000ef5b8c8 x11: ffff80000a591d30 x10: ffff80000a579d40 x9 : c0000000ffffefff x8 : 0000000000000003 x7 : 0000000000017fe8 x6 : ffff80000a579ce8 x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000 x2 : 3a35ec12ed7f8900 x1 : 0000000000000000 x0 : 0000000000000052 Call trace: ath11k_hw_qcn9074_rx_desc_get_decap_type+0x34/0x60 [ath11k] ath11k_dp_rx_deliver_msdu.isra.42+0xa4/0x3d0 [ath11k] ath11k_dp_rx_mon_deliver.isra.43+0x2f8/0x458 [ath11k] ath11k_dp_rx_process_mon_rings+0x310/0x4c0 [ath11k] ath11k_dp_service_srng+0x234/0x338 [ath11k] ath11k_pcic_ext_grp_napi_poll+0x30/0xb8 [ath11k] __napi_poll+0x5c/0x190 napi_threaded_poll+0xf0/0x118 kthread+0xf4/0x110 ret_from_fork+0x10/0x20 Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Reported-by: Florian Schmidt Link: https://bugzilla.kernel.org/show_bug.cgi?id=216573 Signed-off-by: Nagarajan Maran Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221129142532.23421-1-quic_nmaran@quicinc.com commit d45daa6d1a8da080f1b516c570a8428a7b9225e4 Author: Karthikeyan Kathirvel Date: Tue Dec 6 00:51:25 2022 +0530 wifi: ath11k: Fix scan request param frame size warning Following warning was observed drivers/net/wireless/ath/ath11k/mac.c:2351:1: warning: the frame size of 1184 bytes is larger than 1024 bytes [-Wframe-larger-than=] A local variable is declared with a size larger than 1024 bytes this causing a compilation warning. Change the local variable to heap memory to fix the warning. Tested-on: IPQ8074 AHB WLAN.HK.2.7.0.1-01701-QCAHKSWPL_SILICONZ-1 v2 Signed-off-by: Karthikeyan Kathirvel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221205192125.13533-1-quic_kathirve@quicinc.com commit f099c5c9e2ba08a379bd354a82e05ef839ae29ac Author: Minsuk Kang Date: Mon Dec 5 10:43:08 2022 +0900 wifi: ath9k: Fix use-after-free in ath9k_hif_usb_disconnect() This patch fixes a use-after-free in ath9k that occurs in ath9k_hif_usb_disconnect() when ath9k_destroy_wmi() is trying to access 'drv_priv' that has already been freed by ieee80211_free_hw(), called by ath9k_htc_hw_deinit(). The patch moves ath9k_destroy_wmi() before ieee80211_free_hw(). Note that urbs from the driver should be killed before freeing 'wmi' with ath9k_destroy_wmi() as their callbacks will access 'wmi'. Found by a modified version of syzkaller. ================================================================== BUG: KASAN: use-after-free in ath9k_destroy_wmi+0x38/0x40 Read of size 8 at addr ffff8881069132a0 by task kworker/0:1/7 CPU: 0 PID: 7 Comm: kworker/0:1 Tainted: G O 5.14.0+ #131 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 Workqueue: usb_hub_wq hub_event Call Trace: dump_stack_lvl+0x8e/0xd1 print_address_description.constprop.0.cold+0x93/0x334 ? ath9k_destroy_wmi+0x38/0x40 ? ath9k_destroy_wmi+0x38/0x40 kasan_report.cold+0x83/0xdf ? ath9k_destroy_wmi+0x38/0x40 ath9k_destroy_wmi+0x38/0x40 ath9k_hif_usb_disconnect+0x329/0x3f0 ? ath9k_hif_usb_suspend+0x120/0x120 ? usb_disable_interface+0xfc/0x180 usb_unbind_interface+0x19b/0x7e0 ? usb_autoresume_device+0x50/0x50 device_release_driver_internal+0x44d/0x520 bus_remove_device+0x2e5/0x5a0 device_del+0x5b2/0xe30 ? __device_link_del+0x370/0x370 ? usb_remove_ep_devs+0x43/0x80 ? remove_intf_ep_devs+0x112/0x1a0 usb_disable_device+0x1e3/0x5a0 usb_disconnect+0x267/0x870 hub_event+0x168d/0x3950 ? rcu_read_lock_sched_held+0xa1/0xd0 ? hub_port_debounce+0x2e0/0x2e0 ? check_irq_usage+0x860/0xf20 ? drain_workqueue+0x281/0x360 ? lock_release+0x640/0x640 ? rcu_read_lock_sched_held+0xa1/0xd0 ? rcu_read_lock_bh_held+0xb0/0xb0 ? lockdep_hardirqs_on_prepare+0x273/0x3e0 process_one_work+0x92b/0x1460 ? pwq_dec_nr_in_flight+0x330/0x330 ? rwlock_bug.part.0+0x90/0x90 worker_thread+0x95/0xe00 ? __kthread_parkme+0x115/0x1e0 ? process_one_work+0x1460/0x1460 kthread+0x3a1/0x480 ? set_kthread_struct+0x120/0x120 ret_from_fork+0x1f/0x30 The buggy address belongs to the page: page:ffffea00041a44c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106913 flags: 0x200000000000000(node=0|zone=2) raw: 0200000000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 3, migratetype Unmovable, gfp_mask 0x40dc0(GFP_KERNEL|__GFP_COMP|__GFP_ZERO), pid 7, ts 38347963444, free_ts 41399957635 prep_new_page+0x1aa/0x240 get_page_from_freelist+0x159a/0x27c0 __alloc_pages+0x2da/0x6a0 alloc_pages+0xec/0x1e0 kmalloc_order+0x39/0xf0 kmalloc_order_trace+0x19/0x120 __kmalloc+0x308/0x390 wiphy_new_nm+0x6f5/0x1dd0 ieee80211_alloc_hw_nm+0x36d/0x2230 ath9k_htc_probe_device+0x9d/0x1e10 ath9k_htc_hw_init+0x34/0x50 ath9k_hif_usb_firmware_cb+0x25f/0x4e0 request_firmware_work_func+0x131/0x240 process_one_work+0x92b/0x1460 worker_thread+0x95/0xe00 kthread+0x3a1/0x480 page last free stack trace: free_pcp_prepare+0x3d3/0x7f0 free_unref_page+0x1e/0x3d0 device_release+0xa4/0x240 kobject_put+0x186/0x4c0 put_device+0x20/0x30 ath9k_htc_disconnect_device+0x1cf/0x2c0 ath9k_htc_hw_deinit+0x26/0x30 ath9k_hif_usb_disconnect+0x2d9/0x3f0 usb_unbind_interface+0x19b/0x7e0 device_release_driver_internal+0x44d/0x520 bus_remove_device+0x2e5/0x5a0 device_del+0x5b2/0xe30 usb_disable_device+0x1e3/0x5a0 usb_disconnect+0x267/0x870 hub_event+0x168d/0x3950 process_one_work+0x92b/0x1460 Memory state around the buggy address: ffff888106913180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888106913200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888106913280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888106913300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888106913380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== Reported-by: Dokyung Song Reported-by: Jisoo Jang Reported-by: Minsuk Kang Signed-off-by: Minsuk Kang Acked-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221205014308.1617597-1-linuxlovemin@yonsei.ac.kr commit a467a243554a64b418c14d7531a3b18c03d53bff Author: Ville Syrjälä Date: Thu Dec 8 00:52:19 2022 +0200 drm/i915: Fix VLV/CHV HDMI/DP audio enable Despite what I claimed in commit c3c5dc1d9224 ("drm/i915/audio: Do the vblank waits") the vblank interrupts are in fact not enabled yet when we do the audio enable sequence on VLV/CHV (all other platforms are fine). Reorder the enable sequence on VLV/CHV to match that of the other platforms so that the audio enable happens after the pipe has been enabled. Fixes: c3c5dc1d9224 ("drm/i915/audio: Do the vblank waits") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221207225219.29060-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 8dc6de280f01c0f7b8d40435736f3c975368ad70 Author: Uwe Kleine-König Date: Fri Nov 18 23:35:53 2022 +0100 drm/bridge: chrontel-ch7033: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Signed-off-by: Robert Foss Link: https://lore.kernel.org/all/20221118224540.619276-20-uwe@kleine-koenig.org/ commit 42bbdb81965606a270ec05165bf2b6d074686332 Author: Jani Nikula Date: Wed Dec 7 19:17:28 2022 +0200 drm/i915/tc: switch to intel_de_* register accessors in display code Avoid direct uncore use in display code. Cc: Maarten Lankhorst Signed-off-by: Jani Nikula Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/8c29f4f76c2163da309ead0bf48652024f134f11.1670433372.git.jani.nikula@intel.com commit 5544d5e49bc880e3e6be0fc49a4c4c971bb2b065 Author: Jani Nikula Date: Wed Dec 7 19:17:27 2022 +0200 drm/i915/snps: switch to intel_de_* register accessors in display code Avoid direct uncore use in display code. Cc: Maarten Lankhorst Signed-off-by: Jani Nikula Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/4992661d93f8d5744e19408dc60ae49a5f2d597a.1670433372.git.jani.nikula@intel.com commit 00136429f72164bb6da00eba61ac36b822a30414 Author: Jani Nikula Date: Wed Dec 7 19:17:26 2022 +0200 drm/i915/wm: switch to intel_de_* register accessors in display code Avoid direct uncore use in display code. Cc: Maarten Lankhorst Signed-off-by: Jani Nikula Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/588815fc60752b6470ee4067246698d478309fa1.1670433372.git.jani.nikula@intel.com commit 01f84f742121024b3af290934bda8a4e81932297 Author: Jani Nikula Date: Wed Dec 7 19:17:25 2022 +0200 drm/i915/gmbus: switch to intel_de_* register accessors in display code Avoid direct uncore use in display code. Cc: Maarten Lankhorst Signed-off-by: Jani Nikula Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/05690286d1521ec9c82d680122cca9a90a75b8dd.1670433372.git.jani.nikula@intel.com commit ec2593e3075b13335fc1f862f395c2dd3258176f Author: Jani Nikula Date: Wed Dec 7 19:17:24 2022 +0200 drm/i915/dp-aux: switch to intel_de_* register accessors in display code Avoid direct uncore use in display code. Cc: Maarten Lankhorst Signed-off-by: Jani Nikula Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/262a0cf647b37e27a1c7776d3816e1b4ef959a91.1670433372.git.jani.nikula@intel.com commit 2c035d759f5f26f9aa1caec703d956d0cb446528 Author: Jani Nikula Date: Wed Dec 7 19:17:23 2022 +0200 drm/i915/dmc: switch to intel_de_* register accessors in display code Avoid direct uncore use in display code. Cc: Maarten Lankhorst Signed-off-by: Jani Nikula Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/bc144ab3565b10e71244cd09f72ce7df86f4b5c6.1670433372.git.jani.nikula@intel.com commit a0c51490885f608fad3821fb1010ac78fa77f41d Author: Jani Nikula Date: Wed Dec 7 19:17:22 2022 +0200 drm/i915/power: switch to intel_de_* register accessors in display code Avoid direct uncore use in display code. Cc: Maarten Lankhorst Signed-off-by: Jani Nikula Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/21ea52a7c4fd400c256316143e3a2c9106c554d9.1670433372.git.jani.nikula@intel.com commit f0798d8f723d1d394a0edcd883eb4d2852499fb2 Author: Jani Nikula Date: Wed Dec 7 19:17:21 2022 +0200 drm/i915/crt: switch to intel_de_* register accessors in display code Avoid direct uncore use in display code. Cc: Maarten Lankhorst Signed-off-by: Jani Nikula Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/39c198439be580052d1f78a44c96df7ba8ffd56d.1670433372.git.jani.nikula@intel.com commit 330bdd964da888525c72a5f971afadaa44e4221c Author: Jani Nikula Date: Wed Dec 7 19:17:20 2022 +0200 drm/i915/crt: drop a bunch of unnecessary register variables There's no need to save the register offsets. Drop the variables. Cc: Maarten Lankhorst Signed-off-by: Jani Nikula Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/3493286ecd1ae166e1e15235d31115f766f7c878.1670433372.git.jani.nikula@intel.com commit 4fa9fc424ac97ce5ea1a7bbd49524d26ede2c0be Author: Jani Nikula Date: Wed Dec 7 19:17:19 2022 +0200 drm/i915/de: return the old register value from intel_de_rmw() A similar thing was added in intel_uncore_rmw(). Make it available for display too. Cc: Maarten Lankhorst Signed-off-by: Jani Nikula Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/b82cb29e8ece63e68499307f9e3e83139e590d23.1670433372.git.jani.nikula@intel.com commit 93b3c44d6f760e5df3680d9fa08093675f1cf116 Author: Maarten Lankhorst Date: Wed Dec 7 19:17:18 2022 +0200 drm/i915/de: Add more macros to remove all direct calls to uncore Add more de helpers to be able to avoid direct calls to uncore. v3 by Jani: - drop intel_de_write_samevalue/intel_de_rewrite_fw altogether v2 by Jani: - drop pcode stuff for now - rename intel_de_write_samevalue -> intel_de_rewrite_fw Signed-off-by: Maarten Lankhorst Signed-off-by: Jani Nikula Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/0d051554dfeeb4d8aa3bc9136ed111fa35f647d8.1670433372.git.jani.nikula@intel.com commit c5738c861afc51856e8400e00a0ecd9ffa2633b8 Author: Noralf Trønnes Date: Wed Dec 7 20:51:25 2022 +0100 drm/gud: Fix missing include Add missing vmalloc.h include. Fixes: c17d048609bf ("drm/gud: Use the shadow plane helper") Reported-by: kernel test robot Reviewed-by: Thomas Zimmermann Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20221207-gud-missing-include-v1-0-c5b32c9c59da@tronnes.org commit e373cdbe50b5ce636e4d0893a5a1b761c7a4a452 Author: Dave Stevenson Date: Mon Dec 5 17:33:28 2022 +0000 drm/bridge: Document the expected behaviour of DSI host controllers The exact behaviour of DSI host controllers is not specified, therefore define it. Signed-off-by: Dave Stevenson Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221205173328.1395350-7-dave.stevenson@raspberrypi.com Signed-off-by: Maxime Ripard commit 5ea6b17027810ffbdb5bea7d0a2b1d312dd1021c Author: Dave Stevenson Date: Mon Dec 5 17:33:27 2022 +0000 drm/panel: Add prepare_prev_first flag to drm_panel Mapping to the drm_bridge flag pre_enable_prev_first, add a new flag prepare_prev_first to drm_panel to allow the panel driver to request that the upstream bridge should be pre_enabled before the panel prepare. Signed-off-by: Dave Stevenson Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20221205173328.1395350-6-dave.stevenson@raspberrypi.com Signed-off-by: Maxime Ripard commit 4fb912e5e19075874379cfcf074d90bd51ebf8ea Author: Dave Stevenson Date: Mon Dec 5 17:33:26 2022 +0000 drm/bridge: Introduce pre_enable_prev_first to alter bridge init order DSI sink devices typically want the DSI host powered up and configured before they are powered up. pre_enable is the place this would normally happen, but they are called in reverse order from panel/connector towards the encoder, which is the "wrong" order. Add a new flag pre_enable_prev_first that any bridge can set to swap the order of pre_enable (and post_disable) for that and the immediately previous bridge. Should the immediately previous bridge also set the pre_enable_prev_first flag, the previous bridge to that will be called before either of those which requested pre_enable_prev_first. eg: - Panel - Bridge 1 - Bridge 2 pre_enable_prev_first - Bridge 3 - Bridge 4 pre_enable_prev_first - Bridge 5 pre_enable_prev_first - Bridge 6 - Encoder Would result in pre_enable's being called as Panel, Bridge 1, Bridge 3, Bridge 2, Bridge 6, Bridge 5, Bridge 4, Encoder. Signed-off-by: Dave Stevenson Tested-by: Frieder Schrempf Reviewed-by: Frieder Schrempf Link: https://lore.kernel.org/r/20221205173328.1395350-5-dave.stevenson@raspberrypi.com Signed-off-by: Maxime Ripard commit 4e910d9d13e122a7a1263cd820d164c409d6a766 Author: Sam Ravnborg Date: Mon Dec 5 17:33:25 2022 +0000 drm/bridge: Drop unused drm_bridge_chain functions The drm_bridge_chain_{pre_enable,enable,disable,post_disable} has no users left and we have atomic variants that should be used. Drop them so they do not gain new users. Adjust a few comments to avoid references to the dropped functions. Signed-off-by: Sam Ravnborg Reviewed-by: Maxime Ripard Reviewed-by: Laurent Pinchart Cc: Laurent Pinchart Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Robert Foss Cc: Daniel Vetter Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20221205173328.1395350-4-dave.stevenson@raspberrypi.com Signed-off-by: Maxime Ripard commit 2a4d4888fe9c426297f0f59edb2b99fad2610709 Author: Dave Stevenson Date: Mon Dec 5 17:33:24 2022 +0000 drm/mediatek: dp: Replace usage of drm_bridge_chain_ functions Commit f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver") added usage of the drm_bridge_chain_ functions which are to be deprecated. Replace with the drm_atomic_bridge_chain_ variants using the current state. Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20221205173328.1395350-3-dave.stevenson@raspberrypi.com Signed-off-by: Maxime Ripard commit 102e80d1fa2c2c368986ef4e353aabe7b28cd141 Author: Sam Ravnborg Date: Mon Dec 5 17:33:23 2022 +0000 drm/bridge: ps8640: Use atomic variants of drm_bridge_funcs The atomic variants of enable/disable in drm_bridge_funcs are the preferred operations - introduce these. The ps8640 driver used the non-atomic variants of the drm_bridge_chain_pre_enable/ drm_bridge_chain_post_disable - convert these to the atomic variants. v2: - Init state operations in drm_bridge_funcs (Laurent) Signed-off-by: Sam Ravnborg Reviewed-by: Maxime Ripard Cc: Jitao Shi Cc: Philip Chen Cc: Neil Armstrong Cc: Robert Foss Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Reviewed-by: Laurent Pinchart Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20221205173328.1395350-2-dave.stevenson@raspberrypi.com Signed-off-by: Maxime Ripard commit 5304c8e60100120c25557037edcc85791cb33a9a Author: Maxime Ripard Date: Thu Dec 1 16:11:51 2022 +0100 Documentation: gpu: vc4: Add KUnit Tests Section Now that we have VC4-specific tests in place, let's document them properly. Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-20-4615a663a84a@cerno.tech Signed-off-by: Maxime Ripard commit 76ec18dc5afadb64257578ff91c1067331f2fcaa Author: Maxime Ripard Date: Thu Dec 1 16:11:50 2022 +0100 drm/vc4: tests: Add unit test suite for the PV muxing The HVS to PixelValve muxing code is fairly error prone and has a bunch of arbitrary constraints due to the hardware setup. Let's create a test suite that makes sure that the possible combinations work and the invalid ones don't. Reviewed-by: Javier Martinez Canillas Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-19-4615a663a84a@cerno.tech Signed-off-by: Maxime Ripard commit da43ff045c3fc4c11e4956cf42c59aba7e5ed39e Author: Maxime Ripard Date: Thu Dec 1 16:11:49 2022 +0100 drm/vc4: tests: Fail the current test if we access a register Accessing a register when running under kunit is a bad idea since our device is completely mocked. Fail the current test if we ever access any of our hardware registers. Reviewed-by: Javier Martinez Canillas Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-18-4615a663a84a@cerno.tech Signed-off-by: Maxime Ripard commit f759f5b53f1caf734bdffcb9519d4edd877b017f Author: Maxime Ripard Date: Thu Dec 1 16:11:48 2022 +0100 drm/vc4: tests: Introduce a mocking infrastructure In order to test the current atomic_check hooks we need to have a DRM device that has roughly the same capabilities and layout that the actual hardware. We'll also need a bunch of functions to create arbitrary atomic states. Let's create some helpers to create a device that behaves like the real one, and some helpers to maintain the atomic state we want to check. Reviewed-by: Javier Martinez Canillas Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-17-4615a663a84a@cerno.tech Signed-off-by: Maxime Ripard commit 640dbcc91dec76aeeae782d97f0e8ed3c65b58f6 Author: Maxime Ripard Date: Thu Dec 1 16:11:47 2022 +0100 drm/vc4: hvs: Provide a function to initialize the HVS structure We'll need to initialize the HVS structure without a backing device to create a mock we'll use for testing. Split the structure initialization part into a separate function. Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-16-4615a663a84a@cerno.tech Signed-off-by: Maxime Ripard commit 0656ce1240bc44c03ee31499e8e739b7d61138bb Author: Maxime Ripard Date: Thu Dec 1 16:11:46 2022 +0100 drm/vc4: crtc: Make encoder lookup helper public We'll need a function that looks up an encoder by its vc4_encoder_type. Such a function is already present in the CRTC code, so let's make it public so that we can reuse it in the unit tests. Reviewed-by: Javier Martinez Canillas Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-15-4615a663a84a@cerno.tech Signed-off-by: Maxime Ripard commit ee33ac2727da64f3e05dfa715d3079b265b2d124 Author: Maxime Ripard Date: Thu Dec 1 16:11:45 2022 +0100 drm/vc4: crtc: Introduce a lower-level crtc init helper The current vc4_crtc_init() helper assumes that we will be using hardware planes and calls vc4_plane_init(). While it's a reasonable assumption, we'll want to mock the plane and thus provide our own. Let's create a helper that will take the plane as an argument. Reviewed-by: Javier Martinez Canillas Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-14-4615a663a84a@cerno.tech Signed-off-by: Maxime Ripard commit 3c5cb5ec2e73a649d9416d4051d5cd3e9e3a9e43 Author: Maxime Ripard Date: Thu Dec 1 16:11:44 2022 +0100 drm/vc4: Move HVS state to main header In order to introduce unit tests for the HVS state computation, we'll need access to the vc4_hvs_state struct definition and its associated helpers. Let's move them in our driver header. Reviewed-by: Javier Martinez Canillas Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-13-4615a663a84a@cerno.tech Signed-off-by: Maxime Ripard commit 4adf59449f990fb8054159f6c3b350790dee1fce Author: Maxime Ripard Date: Thu Dec 1 16:11:43 2022 +0100 drm/tests: Add a test for DRM managed actions DRM-managed actions are supposed to be ran whenever the device is released. Let's introduce a basic unit test to make sure it happens. Reviewed-by: Javier Martinez Canillas Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-12-4615a663a84a@cerno.tech Signed-off-by: Maxime Ripard commit d98780310719bf4076d975c2ff65c44c7c0d929e Author: Maxime Ripard Date: Thu Dec 1 16:11:42 2022 +0100 drm/tests: helpers: Allow to pass a custom drm_driver Some tests will need to provide their own drm_driver instead of relying on the dumb one in the helpers, so let's create a helper that allows to do so. Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-11-4615a663a84a@cerno.tech Signed-off-by: Maxime Ripard commit a9143c5852a7a13d60ef685d27f9617f2a52338b Author: Maxime Ripard Date: Thu Dec 1 16:11:41 2022 +0100 drm/tests: helpers: Allow for a custom device struct to be allocated The current helper to allocate a DRM device doesn't allow for any subclassing by drivers, which is going to be troublesome as we work on getting some kunit testing on atomic modesetting code. Let's use a similar pattern to the other allocation helpers by providing the structure size and offset as arguments. Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-10-4615a663a84a@cerno.tech Signed-off-by: Maxime Ripard commit 57a84a97bbda3a4bb38534e9e37634fa9f58c7fc Author: Maxime Ripard Date: Thu Dec 1 16:11:40 2022 +0100 drm/tests: helpers: Make sure the device is bound The device managed resources are freed when the device is detached, so it has to be bound in the first place. Let's create a fake driver that we will bind to our fake device to benefit from the device managed cleanups in our tests. Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-9-4615a663a84a@cerno.tech Signed-off-by: Maxime Ripard commit 0bdc2e28efd9e1b76297cc8f3c54cac3806803ff Author: Maxime Ripard Date: Thu Dec 1 16:11:39 2022 +0100 drm/tests: helpers: Switch to a platform_device The device managed resources are ran if the device has bus, which is not the case of a root_device. Let's use a platform_device instead. Reviewed-by: Javier Martinez Canillas Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-8-4615a663a84a@cerno.tech Signed-off-by: Maxime Ripard commit 9ecd8045bf64f8f277acea4bf35c14b369529f09 Author: Maxime Ripard Date: Thu Dec 1 16:11:38 2022 +0100 drm/tests: helpers: Create the device in another function We'll need in some tests to control when the device needs to be added and removed, so let's split the device creation from the DRM device creation function. Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-7-4615a663a84a@cerno.tech Signed-off-by: Maxime Ripard commit 1d041a469e5de3d9d1b208e12af9265882dcd221 Author: Maxime Ripard Date: Thu Dec 1 16:11:37 2022 +0100 drm/tests: helpers: Remove the name parameter The device name isn't really useful, we can just define it instead of exposing it in the API. Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-6-4615a663a84a@cerno.tech Signed-off-by: Maxime Ripard commit 83ee69a89f32d60669e66dad1c5d841573e5a8ec Author: Maxime Ripard Date: Thu Dec 1 16:11:36 2022 +0100 drm/tests: helpers: Rename the device init helper The name doesn't really fit the conventions for the other helpers in DRM/KMS, so let's rename it to make it obvious that we allocate a new DRM device. Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-5-4615a663a84a@cerno.tech Signed-off-by: Maxime Ripard commit 642ef3fbfe4f304fbb58cb46b198ad284ea66e93 Author: Maxime Ripard Date: Thu Dec 1 16:11:35 2022 +0100 drm/tests: helpers: Switch to EXPORT_SYMBOL_GPL drm_kunit_device_init() among other things will allocate a device and wrap around root_device_register. This function is exported with EXPORT_SYMBOL_GPL, so we can't really change the license. Fixes: a77a3ffa151b ("drm/tests: helpers: Add missing export") Suggested-by: Javier Martinez Canillas Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-4-4615a663a84a@cerno.tech Signed-off-by: Maxime Ripard commit cee6ec3bee55976762bcf1b3bf959575f323cc9e Author: Maxime Ripard Date: Thu Dec 1 16:11:34 2022 +0100 drm/tests: helpers: Document drm_kunit_device_init() Commit 44a3928324e9 ("drm/tests: Add Kunit Helpers") introduced the drm_kunit_device_init() function but didn't document it properly. Add that documentation. Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-3-4615a663a84a@cerno.tech Signed-off-by: Maxime Ripard commit b85be04294ffa49574a0e662e626066320349ef3 Author: Maxime Ripard Date: Thu Dec 1 16:11:33 2022 +0100 drm/tests: Introduce a config option for the KUnit helpers Driver-specific tests will need access to the helpers without pulling every DRM framework test. Let's create an intermediate Kconfig options for the helpers. Suggested-by: Maíra Canal Reviewed-by: Maíra Canal Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-2-4615a663a84a@cerno.tech Signed-off-by: Maxime Ripard commit 0c3627c744068fe95b235c9aa25d2bd56bde7e55 Author: Maxime Ripard Date: Thu Dec 1 16:11:32 2022 +0100 drm/tests: helpers: Move the helper header to include/drm We'll need to use those helpers from drivers too, so let's move it to a more visible location. Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-1-4615a663a84a@cerno.tech Signed-off-by: Maxime Ripard commit 95c713d722017b26e301303713d638e0b95b1f68 Author: Umesh Nerlige Ramappa Date: Wed Nov 23 15:53:42 2022 -0800 drm/i915/perf: Do not parse context image for HSW An earlier commit introduced a mechanism to parse the context image to find the OA context control offset. This resulted in an NPD on haswell when gem_context was passed into i915_perf_open_ioctl params. Haswell does not support logical ring contexts, so ensure that the context image is parsed only for platforms with logical ring contexts and also validate lrc_reg_state. v2: Fix build failure v3: Fix checkpatch error Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7432 Fixes: a5c3a3cbf029 ("drm/i915/perf: Determine gen12 oa ctx offset at runtime") Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221123235342.713068-1-umesh.nerlige.ramappa@intel.com commit 40c3012205b68b53f20d20b9c34b570094d083f4 Author: Jani Nikula Date: Wed Dec 7 11:34:46 2022 +0200 drm/i915/backlight: convert DRM_DEBUG_KMS() to drm_dbg_kms() Fix the final straggler. Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/4769f8377be11536bd19840a2e59ef9f8c0a558c.1670405587.git.jani.nikula@intel.com commit 02c77424bcb35eefbdb6660571d232ff17470080 Author: Jani Nikula Date: Wed Dec 7 11:34:45 2022 +0200 drm/i915/backlight: drop drm_device local variables in favor of i915 Prefer only having struct drm_i915_private *i915 around. Drop the drm_device *dev locals. Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/6a791b06ab84bb8fb719cd46934eb09644e3edc7.1670405587.git.jani.nikula@intel.com commit 7177935c7d30dd50d9d03edc5d587ac0084e0a31 Author: Jani Nikula Date: Wed Dec 7 11:34:44 2022 +0200 drm/i915/backlight: mass rename dev_priv to i915 With the implicit dev_priv usage gone, we can rename dev_priv to i915 throughout. Do some drive-by whitespace cleanups while at it. Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/fc8b260bd8fa338edb312637f18ca7e6550d820d.1670405587.git.jani.nikula@intel.com commit bf3753d1bbcbf99a4aa7ce5b5c92242aa42e2bde Author: Jani Nikula Date: Wed Dec 7 11:34:43 2022 +0200 drm/i915/backlight: drop DISPLAY_MMIO_BASE() use from backlight registers None of the remaining backlight registers that use DISPLAY_MMIO_BASE() are used on VLV/CHV, which are the only platforms that have non-zero base. Just drop the DISPLAY_MMIO_BASE() use, reducing the implicit dev_priv references. Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/75ae3f2945912f908df2444d4f0ab97a23b89897.1670405587.git.jani.nikula@intel.com commit 9e9caa4bebec167b50fc3a0e5c410194aae9ed23 Author: Jani Nikula Date: Wed Dec 7 11:34:42 2022 +0200 drm/i915/backlight: use VLV_DISPLAY_BASE for VLV/CHV backlight registers Since the VLV/CHV backlight registers are only used on VLV/CHV, there's no need to dynamically look up DISPLAY_MMIO_BASE(). We know it's VLV_DISPLAY_BASE. Use it statically, reducing the implicit dev_priv references. Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/eb252083a56ec64b4fdb58d4d30abcf305a3a9c2.1670405587.git.jani.nikula@intel.com commit 25edca7bb18a2a40cc7e54c6f522e9b3c917e2c5 Author: Sriram R Date: Fri Dec 2 23:37:15 2022 +0200 wifi: ath11k: add ipq5018 device support ipq5018 is a ahb 2ghz device, enable the compatible support for ipq5018 in ahb. Tested-on: IPQ5018 hw1.0 AHB WLAN.HK.2.6.0.1-00861-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sriram R Co-developed-by: Karthikeyan Kathirvel Signed-off-by: Karthikeyan Kathirvel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221122132152.17771-9-quic_kathirve@quicinc.com commit 69968f88f1770d61cae0febef805fd00d66cf6a1 Author: Sriram R Date: Fri Dec 2 23:37:15 2022 +0200 wifi: ath11k: add new hw ops for IPQ5018 to get rx dest ring hashmap The Destination ring control register is different for IPQ5018 when compared to IPQ8074/IPQ6018/QCN9074. Hence create a new hw ops to fetch the hash ring map for different device variants. ipq5018 hw ops is similar to qcn9074 except for this change, so reuse all the qcn9074 ops for ipq5018. Tested-on: IPQ5018 hw1.0 AHB WLAN.HK.2.6.0.1-00861-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sriram R Co-developed-by: Karthikeyan Kathirvel Signed-off-by: Karthikeyan Kathirvel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221122132152.17771-8-quic_kathirve@quicinc.com commit ba60f2793d3a37a00da14bb56a26558a902d2831 Author: Sriram R Date: Fri Dec 2 23:37:14 2022 +0200 wifi: ath11k: initialize hw_ops for IPQ5018 The ipq5018_ops is initialized for IPQ5018. This is different from other platforms. Tested-on: IPQ5018 hw1.0 AHB WLAN.HK.2.6.0.1-00861-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sriram R Co-developed-by: Karthikeyan Kathirvel Signed-off-by: Karthikeyan Kathirvel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221122132152.17771-7-quic_kathirve@quicinc.com commit 711b80acbdfb9667a9cf8374e13320a6e624ce73 Author: Sriram R Date: Fri Dec 2 23:37:14 2022 +0200 wifi: ath11k: update hal srng regs for IPQ5018 IPQ5018 hal srng register address & offsets are not similar to IPQ8074/IPQ6018/QCN9074, hence define a new set of srng register group data for IPQ5018. Tested-on: IPQ5018 hw1.0 AHB WLAN.HK.2.6.0.1-00861-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sriram R Co-developed-by: Karthikeyan Kathirvel Signed-off-by: Karthikeyan Kathirvel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221122132152.17771-6-quic_kathirve@quicinc.com commit b42b3678c91f3ca6e0888bf5a15c1e8678fd5f2d Author: Sriram R Date: Fri Dec 2 23:37:14 2022 +0200 wifi: ath11k: remap ce register space for IPQ5018 In IPQ5018 ce register space is moved out of wcss unlike ipq8074 or ipq6018 and the space is not contiguous, hence remap the CE registers to a new space to access them. Register read/write is modified to check if the register to be written falls in the CE register space and corresponding register is written. Also adjust the interrupt register address to ce irq enable/disable. Tested-on: IPQ5018 hw1.0 AHB WLAN.HK.2.6.0.1-00861-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sriram R Co-developed-by: Karthikeyan Kathirvel Signed-off-by: Karthikeyan Kathirvel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221122132152.17771-5-quic_kathirve@quicinc.com commit 26af7aabd2d8225c6b2056234626ba5099610871 Author: Sriram R Date: Fri Dec 2 23:37:14 2022 +0200 wifi: ath11k: update ce configurations for IPQ5018 IPQ5018 is a single pdev device. Update host and target CE configurations accordingly. Tested-on: IPQ5018 hw1.0 AHB WLAN.HK.2.6.0.1-00861-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sriram R Co-developed-by: Karthikeyan Kathirvel Signed-off-by: Karthikeyan Kathirvel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221122132152.17771-4-quic_kathirve@quicinc.com commit 8dfe875aa24aec68baf6702018633c84c2c1feca Author: Sriram R Date: Fri Dec 2 23:37:13 2022 +0200 wifi: ath11k: update hw params for IPQ5018 Add new compatible string for IPQ5018 and add required hw params for IPQ5018. The hw descriptors size and datapath ops are similar to QCN9074, hence reuse the same. Tested-on: IPQ5018 hw1.0 AHB WLAN.HK.2.6.0.1-00861-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sriram R Co-developed-by: Karthikeyan Kathirvel Signed-off-by: Karthikeyan Kathirvel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221122132152.17771-3-quic_kathirve@quicinc.com commit 679d708a10ecbdbdaa9a68d74ba9b93078505e99 Author: Sriram R Date: Fri Dec 2 23:37:13 2022 +0200 dt: bindings: net: ath11k: add IPQ5018 compatible Add IPQ5018 device support for ath11k. Signed-off-by: Sriram R Co-developed-by: Karthikeyan Kathirvel Signed-off-by: Karthikeyan Kathirvel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221122132152.17771-2-quic_kathirve@quicinc.com commit 955f4d7176eb154db587ae162ec2b392dc8d5f27 Author: Miaoqian Lin Date: Wed Dec 7 15:29:09 2022 +0400 drm/i915: Fix documentation for intel_uncore_forcewake_put__locked intel_uncore_forcewake_put__locked() is used to release a reference. Fixes: a6111f7b6604 ("drm/i915: Reduce locking in execlist command submission") Signed-off-by: Miaoqian Lin Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20221207112909.2655251-1-linmq006@gmail.com commit 8ca57e4fc9aa068264ce1267c4ac51c1bca5864d Author: Jani Nikula Date: Mon Dec 5 14:29:18 2022 +0200 drm/i915/fbc: drop uncore locking around i8xx/i965 fbc nuke The locking should not be needed after commits de5bd083d247 ("drm/i915/fbc: Skip nuke when flip is pending") and 7cfd1a18c5f9 ("drm/i915: Remove remaining locks from i9xx plane udpates"). Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221205122918.3092092-1-jani.nikula@intel.com commit a3caf7ea0c3d5872ed0f2c51f5476aee0c47a73a Author: Allen Ballway Date: Wed Nov 30 17:08:22 2022 +0000 drm: panel-orientation-quirks: Add quirk for DynaBook K50 Like the ASUS T100HAN for which there is already a quirk, the DynaBook K50 has a 800x1280 portrait screen mounted in the tablet part of a landscape oriented 2-in-1. Update the quirk to be more generic and apply to this device. Signed-off-by: Allen Ballway Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20221130170811.1.Iee9a494547541dade9eeee9521cc8b811e76a8a0@changeid commit 8a238d7f7eea7592e0764bc3b9e79e7c6354b04c Author: Hans de Goede Date: Sun Nov 27 19:15:39 2022 +0100 drm: panel-orientation-quirks: Add quirk for Lenovo Yoga Tab 3 X90F The Lenovo Yoga Tab 3 X90F has a portrait 1600x2560 LCD used in landscape mode, add a quirk for this. Signed-off-by: Hans de Goede Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221127181539.104223-1-hdegoede@redhat.com commit 86020156c8840f2a47430f028e6ab557d8a9ed27 Author: Benjamin Tissoires Date: Tue Dec 6 15:59:33 2022 +0100 HID: bpf: do not rely on ALLOW_ERROR_INJECTION Now that we have aproper non debug API to declare which function is fmodret, we can rely on it. Link: https://lore.kernel.org/all/20221121104403.1545f9b5@gandalf.local.home/ Suggested-by: Alexei Starovoitov Signed-off-by: Benjamin Tissoires Link: https://lore.kernel.org/r/20221206145936.922196-3-benjamin.tissoires@redhat.com commit 55b56431b01747e336653775a743ea920f98fffb Merge: 2364b5060d780 5b481acab4ce0 Author: Benjamin Tissoires Date: Wed Dec 7 15:40:58 2022 +0100 Merge branch 'for-6.2/bpf' into for-6.2/hid-bpf Merge the above branch that we are sharing with the bpf folks. Signed-off-by: Benjamin Tissoires commit 4050e6f211ea521eb703c921cdb15b905be882b2 Author: Jani Nikula Date: Wed Nov 23 18:49:16 2022 +0200 drm/i915/gt: remove some limited use register access wrappers Remove rmw_set(), rmw_clear(), clear_register(), rmw_set_fw(), and rmw_clear_fw(). They're just one too many levels of abstraction for register access, for very specific purposes. clear_register() seems like a micro-optimization bypassing the write when the register is already clear, but that trick has ceased to work since commit 06b975d58fd6 ("drm/i915: make intel_uncore_rmw() write unconditionally"). Just clear the register in the most obvious way. Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Reviewed-by: Matt Roper Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20221123164916.4128733-1-jani.nikula@intel.com commit 3d0f98fa66bc459d0ba516d1d46a0b22e3005244 Author: Ashutosh Dixit Date: Fri Dec 2 19:14:54 2022 -0800 drm/i915/hwmon: Silence "mailbox access failed" warning in snb_pcode_read hwm_pcode_read_i1 is called during i915 load. This results in the following warning from snb_pcode_read because POWER_SETUP_SUBCOMMAND_READ_I1 is unsupported on DG1/DG2. [drm:snb_pcode_read [i915]] warning: pcode (read from mbox 47c) \ mailbox access failed for snb_pcode_read_p [i915]: -6 The code handles the unsupported command but the warning in dmesg is a red herring which has resulted in a couple of bugs being filed. Therefore silence the warning by avoiding calling snb_pcode_read_p for DG1/DG2. Signed-off-by: Ashutosh Dixit Reviewed-by: Anshuman Gupta Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20221203031454.1280538-1-ashutosh.dixit@intel.com commit 5ad8e63ebba3d5a0730b43180b200e41eeb9409c Author: Noralf Trønnes Date: Wed Nov 30 20:26:54 2022 +0100 drm/gud: Enable synchronous flushing by default gud has a module parameter that controls whether framebuffer flushing happens synchronously during the commit or asynchronously in a worker. GNOME before version 3.38 handled all displays in the same rendering loop. This lead to gud slowing down the refresh rate for a faster monitor. This has now been fixed so lets change the default. The plan is to remove async flushing in the future. The code is now structured in a way that makes it easy to do this. Link: https://blogs.gnome.org/shell-dev/2020/07/02/splitting-up-the-frame-clock/ Suggested-by: Thomas Zimmermann Reviewed-by: Thomas Zimmermann Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20221122-gud-shadow-plane-v2-6-435037990a83@tronnes.org commit c17d048609bf09d4fc78b02964e42eafb66a337e Author: Noralf Trønnes Date: Wed Nov 30 20:26:53 2022 +0100 drm/gud: Use the shadow plane helper Use the shadow plane helper to take care of mapping the framebuffer for CPU access. The synchronous flushing is now done inline without the use of a worker. The async path now uses a shadow buffer to hold framebuffer changes and it doesn't read the framebuffer behind userspace's back anymore. v2: - Use src as variable name for iosys_map (Thomas) - Prepare imported buffer for CPU access in the driver (Thomas) Reviewed-by: Thomas Zimmermann Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20221122-gud-shadow-plane-v2-5-435037990a83@tronnes.org commit 562fd7cc67cb6d1fe8b96e72fbca9a423b5a43be Author: Noralf Trønnes Date: Wed Nov 30 20:26:52 2022 +0100 drm/gud: Prepare buffer for CPU access in gud_flush_work() In preparation for moving to the shadow plane helper prepare the framebuffer for CPU access as early as possible. v2: - Use src as variable name for iosys_map (Thomas) Reviewed-by: Javier Martinez Canillas Reviewed-by: Thomas Zimmermann Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20221122-gud-shadow-plane-v2-4-435037990a83@tronnes.org commit 754a6ca85c220ea7b1c5413085a1eb8b4dff2c2a Author: Noralf Trønnes Date: Wed Nov 30 20:26:51 2022 +0100 drm/gud: Split up gud_flush_work() In preparation for inlining synchronous flushing split out the part of gud_flush_work() that can be shared by the sync and async code paths. Reviewed-by: Javier Martinez Canillas Reviewed-by: Thomas Zimmermann Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20221122-gud-shadow-plane-v2-3-435037990a83@tronnes.org commit f531d198822a4bdf631f080a9638096681f6eb9f Author: Noralf Trønnes Date: Wed Nov 30 20:26:50 2022 +0100 drm/gud: Don't retry a failed framebuffer flush If a framebuffer flush fails the driver will do one retry by requeing the worker. Currently the worker is used even for synchronous flushing, but a later patch will inline it, so this needs to change. Thinking about how to solve this I came to the conclusion that this retry mechanism was a fix for a problem that was only in the mind of the developer (me) and not something that solved a real problem. So let's remove this for now and revisit later should it become necessary. gud_add_damage() has now only one caller so it can be inlined. Reviewed-by: Javier Martinez Canillas Reviewed-by: Thomas Zimmermann Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20221122-gud-shadow-plane-v2-2-435037990a83@tronnes.org commit 951df98024f7272f85df5044eca7374f5b5b24ef Author: Noralf Trønnes Date: Wed Nov 30 20:26:49 2022 +0100 drm/gud: Fix UBSAN warning UBSAN complains about invalid value for bool: [ 101.165172] [drm] Initialized gud 1.0.0 20200422 for 2-3.2:1.0 on minor 1 [ 101.213360] gud 2-3.2:1.0: [drm] fb1: guddrmfb frame buffer device [ 101.213426] usbcore: registered new interface driver gud [ 101.989431] ================================================================================ [ 101.989441] UBSAN: invalid-load in linux/include/linux/iosys-map.h:253:9 [ 101.989447] load of value 121 is not a valid value for type '_Bool' [ 101.989451] CPU: 1 PID: 455 Comm: kworker/1:6 Not tainted 5.18.0-rc5-gud-5.18-rc5 #3 [ 101.989456] Hardware name: Hewlett-Packard HP EliteBook 820 G1/1991, BIOS L71 Ver. 01.44 04/12/2018 [ 101.989459] Workqueue: events_long gud_flush_work [gud] [ 101.989471] Call Trace: [ 101.989474] [ 101.989479] dump_stack_lvl+0x49/0x5f [ 101.989488] dump_stack+0x10/0x12 [ 101.989493] ubsan_epilogue+0x9/0x3b [ 101.989498] __ubsan_handle_load_invalid_value.cold+0x44/0x49 [ 101.989504] dma_buf_vmap.cold+0x38/0x3d [ 101.989511] ? find_busiest_group+0x48/0x300 [ 101.989520] drm_gem_shmem_vmap+0x76/0x1b0 [drm_shmem_helper] [ 101.989528] drm_gem_shmem_object_vmap+0x9/0xb [drm_shmem_helper] [ 101.989535] drm_gem_vmap+0x26/0x60 [drm] [ 101.989594] drm_gem_fb_vmap+0x47/0x150 [drm_kms_helper] [ 101.989630] gud_prep_flush+0xc1/0x710 [gud] [ 101.989639] ? _raw_spin_lock+0x17/0x40 [ 101.989648] gud_flush_work+0x1e0/0x430 [gud] [ 101.989653] ? __switch_to+0x11d/0x470 [ 101.989664] process_one_work+0x21f/0x3f0 [ 101.989673] worker_thread+0x200/0x3e0 [ 101.989679] ? rescuer_thread+0x390/0x390 [ 101.989684] kthread+0xfd/0x130 [ 101.989690] ? kthread_complete_and_exit+0x20/0x20 [ 101.989696] ret_from_fork+0x22/0x30 [ 101.989706] [ 101.989708] ================================================================================ The source of this warning is in iosys_map_clear() called from dma_buf_vmap(). It conditionally sets values based on map->is_iomem. The iosys_map variables are allocated uninitialized on the stack leading to ->is_iomem having all kinds of values and not only 0/1. Fix this by zeroing the iosys_map variables. Fixes: 40e1a70b4aed ("drm: Add GUD USB Display driver") Cc: # v5.18+ Reviewed-by: Javier Martinez Canillas Reviewed-by: Thomas Zimmermann Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20221122-gud-shadow-plane-v2-1-435037990a83@tronnes.org commit 42523924c99e1a033569e5ab42389ffdab15e093 Author: Christian König Date: Mon May 9 13:25:19 2022 +0200 drm/ttm: use ttm_bo_wait_ctx instead of ttm_bo_wait Make sure that we use the correct settings from the context. Signed-off-by: Christian König Reviewed-by: Arunpravin Paneer Selvam Link: https://patchwork.freedesktop.org/patch/msgid/20221125102137.1801-8-christian.koenig@amd.com commit a3185f91d0579b61a0a0dce3df1c67d6e324ebc8 Author: Christian König Date: Mon May 9 21:13:35 2022 +0200 drm/ttm: merge ttm_bo_api.h and ttm_bo_driver.h v2 Merge and cleanup the two headers into a single description of the object API. Also move all the documentation to the implementation and drop unnecessary includes from the header. No functional change. v2: minimal checkpatch.pl cleanup Signed-off-by: Christian König Reviewed-by: Arunpravin Paneer Selvam Link: https://patchwork.freedesktop.org/patch/msgid/20221125102137.1801-4-christian.koenig@amd.com commit 9bff18d13473a9fdf81d5158248472a9d8ecf2bd Author: Christian König Date: Wed Nov 23 10:14:56 2022 +0100 drm/ttm: use per BO cleanup workers Instead of a single worker going over the list of delete BOs in regular intervals use a per BO worker which blocks for the resv object and locking of the BO. This not only simplifies the handling massively, but also results in much better response time when cleaning up buffers. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Reviewed-by: Arunpravin Paneer Selvam Link: https://patchwork.freedesktop.org/patch/msgid/20221125102137.1801-3-christian.koenig@amd.com commit de3a9ab97069488b23427726e86b8628f4fe278e Author: Andi Shyti Date: Thu Dec 1 00:58:05 2022 +0100 Revert "drm/i915: Improve on suspend / resume time with VT-d enabled" This reverts commit 2ef6efa79fecd5e3457b324155d35524d95f2b6b. Checking the presence if the IRST (Intel Rapid Start Technology) through the ACPI to decide whether to rebuild or not the GGTT puts us at the mercy of the boot firmware and we need to unnecessarily rely on third parties. Because now we avoid adding scratch pages to the entire GGTT we don't need this hack anymore. Signed-off-by: Andi Shyti Cc: Thomas Hellström Cc: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20221130235805.221010-6-andi.shyti@linux.intel.com commit eea380ad6b4234d70db544b15bcdcd4e76bc6136 Author: Chris Wilson Date: Thu Dec 1 00:58:04 2022 +0100 drm/i915: Refine VT-d scanout workaround VT-d may cause overfetch of the scanout PTE, both before and after the vma (depending on the scanout orientation). bspec recommends that we provide a tile-row in either directions, and suggests using 168 PTE, warning that the accesses will wrap around the ends of the GGTT. Currently, we fill the entire GGTT with scratch pages when using VT-d to always ensure there are valid entries around every vma, including scanout. However, writing every PTE is slow as on recent devices we perform 8MiB of uncached writes, incurring an extra 100ms during resume. If instead we focus on only putting guard pages around scanout, we can avoid touching the whole GGTT. To avoid having to introduce extra nodes around each scanout vma, we adjust the scanout drm_mm_node to be smaller than the allocated space, and fixup the extra PTE during dma binding. Signed-off-by: Chris Wilson Signed-off-by: Tejas Upadhyay Signed-off-by: Tvrtko Ursulin Signed-off-by: Andi Shyti Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20221130235805.221010-5-andi.shyti@linux.intel.com commit 6110225144d1136db5b026a22efbd76cee197027 Author: Chris Wilson Date: Thu Dec 1 21:39:12 2022 +0100 drm/i915: Introduce guard pages to i915_vma Introduce the concept of padding the i915_vma with guard pages before and after. The major consequence is that all ordinary uses of i915_vma must use i915_vma_offset/i915_vma_size and not i915_vma.node.start/size directly, as the drm_mm_node will include the guard pages that surround our object. The biggest connundrum is how exactly to mix requesting a fixed address with guard pages, particularly through the existing uABI. The user does not know about guard pages, so such must be transparent to the user, and so the execobj.offset must be that of the object itself excluding the guard. So a PIN_OFFSET_FIXED must then be exclusive of the guard pages. The caveat is that some placements will be impossible with guard pages, as wrap arounds need to be avoided, and the vma itself will require a larger node. We must not report EINVAL but ENOSPC as these are unavailable locations within the GTT rather than conflicting user requirements. In the next patch, we start using guard pages for scanout objects. While these are limited to GGTT vma, on a few platforms these vma (or at least an alias of the vma) is shared with userspace, so we may leak the existence of such guards if we are not careful to ensure that the execobj.offset is transparent and excludes the guards. (On such platforms like ivb, without full-ppgtt, userspace has to use relocations so the presence of more untouchable regions within its GTT such be of no further issue.) Signed-off-by: Chris Wilson Signed-off-by: Tejas Upadhyay Signed-off-by: Tvrtko Ursulin Signed-off-by: Andi Shyti Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20221201203912.346110-1-andi.shyti@linux.intel.com commit 8e4ee5e87ce60be439eca8d3a65bd870f6821902 Author: Chris Wilson Date: Thu Dec 1 00:58:02 2022 +0100 drm/i915: Wrap all access to i915_vma.node.start|size We already wrap i915_vma.node.start for use with the GGTT, as there we can perform additional sanity checks that the node belongs to the GGTT and fits within the 32b registers. In the next couple of patches, we will introduce guard pages around the objects _inside_ the drm_mm_node allocation. That is we will offset the vma->pages so that the first page is at drm_mm_node.start + vma->guard (not 0 as is currently the case). All users must then not use i915_vma.node.start directly, but compute the guard offset, thus all users are converted to use a i915_vma_offset() wrapper. The notable exceptions are the selftests that are testing exact behaviour of i915_vma_pin/i915_vma_insert. Signed-off-by: Chris Wilson Signed-off-by: Tejas Upadhyay Co-developed-by: Thomas Hellström Signed-off-by: Thomas Hellström Signed-off-by: Tvrtko Ursulin Signed-off-by: Andi Shyti Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20221130235805.221010-3-andi.shyti@linux.intel.com commit 09f9b4418e417b6452d1bcd7a9544a68fc1e59d5 Author: Andi Shyti Date: Thu Dec 1 00:58:01 2022 +0100 drm/i915: Limit the display memory alignment to 32 bit instead of 64 The coming commit "drm/i915: Introduce guard pages to i915_vma" from Chris, was originally changing display_alignment to u32 from u64. The reason is that the display GGTT is and will be limited o 4GB. Put it in a separate patch and use "max(...)" instead of "max_t(64, ...)" when asigning the value. We can safely use max as we know beforehand that the comparison is between two u32 variables. Signed-off-by: Chris Wilson Signed-off-by: Andi Shyti Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20221130235805.221010-2-andi.shyti@linux.intel.com commit cd3a8a596214e6a338a22104936c40e62bdea2b6 Author: Christian König Date: Fri Nov 18 20:22:21 2022 +0100 drm/ttm: remove ttm_bo_(un)lock_delayed_workqueue Those functions never worked correctly since it is still perfectly possible that a buffer object is released and the background worker restarted even after calling them. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Reviewed-by: Arunpravin Paneer Selvam Link: https://patchwork.freedesktop.org/patch/msgid/20221125102137.1801-2-christian.koenig@amd.com commit f2053d346615f2c6bb4c0663276274b2da3f6871 Author: Daniele Ceraolo Spurio Date: Thu Nov 10 09:58:23 2022 -0800 drm/i915/guc: enable GuC GGTT invalidation from the start Invalidating the GuC TLBs while GuC is not loaded does not have negative consequences, so if we're starting the driver with GuC enabled we can use the GGTT invalidation function from the get-go, instead of switching to it when we initialize the GuC objects. In MTL, this fixes and issue where we try to overwrite the invalidation function twice (once for each GuC), due to the GGTT being shared between the primary and media GTs Signed-off-by: Daniele Ceraolo Spurio Cc: Matt Roper Cc: Radhakrishna Sripada Cc: John Harrison Cc: Aravind Iddamsetty Reviewed-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221110175823.3867135-1-daniele.ceraolospurio@intel.com commit c46c5fb725bedd73cf33511b6a52d82b57eaba2a Author: Matt Roper Date: Thu Dec 1 14:22:10 2022 -0800 drm/i915/gen12: Apply recommended L3 hashing mask The TGL/RKL/DG1/ADL performance tuning guide suggests programming a literal value of 0x2FC0100F for this register. The register's hardware default value is 0x2FC0108F, so this translates to just clearing one bit. Take this opportunity to also clean up the register definition and re-write its existing bits/fields in the preferred notation. Bspec: 31870 Signed-off-by: Matt Roper Reviewed-by: Gustavo Sousa Link: https://patchwork.freedesktop.org/patch/msgid/20221201222210.344152-1-matthew.d.roper@intel.com commit c04712efb3755306ff3ab72a91df94108bff1f30 Author: Matt Roper Date: Fri Dec 2 14:35:28 2022 -0800 drm/i915/mtl: Check full IP version when applying hw steering semaphore When determining whether the platform has a hardware-level steering semaphore (i.e., MTL and beyond), we need to use GRAPHICS_VER_FULL() to compare the full version rather than just the major version number returned by GRAPHICS_VER(). Reported-by: kernel test robot Fixes: 3100240bf846 ("drm/i915/mtl: Add hardware-level lock for steering") Cc: Balasubramani Vivekanandan Signed-off-by: Matt Roper Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20221202223528.714491-1-matthew.d.roper@intel.com commit 3ea44105bd4b6269ea87d10dc3693a71164ee0df Author: Thomas Zimmermann Date: Fri Dec 2 13:56:44 2022 +0100 drm/mipi-dbi: Move drm_dev_{enter, exit}() out from fb_dirty functions Call drm_dev_enter() and drm_dev_exit() in the outer-most callbacks of the modesetting pipeline. If drm_dev_enter() fails, the driver can thus avoid unnecessary work. Signed-off-by: Thomas Zimmermann Reviewed-by: Noralf Trønnes Tested-by: Javier Martinez Canillas Tested-by: Noralf Trønnes # drm/tiny/mi0283qt Link: https://patchwork.freedesktop.org/patch/msgid/20221202125644.7917-9-tzimmermann@suse.de commit 69c63e88ea9dc44382d508a7608495dec5eb69f9 Author: Thomas Zimmermann Date: Fri Dec 2 13:56:43 2022 +0100 drm/mipi-dbi: Use shadow-plane mappings Use the buffer mappings provided by shadow-plane helpers. As the mappings are established while the commit can still fail, errors are now reported correctly to callers. v2: * use shadow-plane state directly (Noralf) Signed-off-by: Thomas Zimmermann Reviewed-by: Noralf Trønnes Tested-by: Javier Martinez Canillas Tested-by: Noralf Trønnes # drm/tiny/mi0283qt Link: https://patchwork.freedesktop.org/patch/msgid/20221202125644.7917-8-tzimmermann@suse.de commit e7caf04d49533fb38d22379be0278a34aad8826f Author: Thomas Zimmermann Date: Fri Dec 2 13:56:42 2022 +0100 drm/mipi-dbi: Support shadow-plane state Implement MIPI DBI planes with struct drm_shadow_plane_state, so that the respective drivers can use the vmap'ed GEM-buffer memory. Implement state helpers, the {begin,end}_fb_access helpers and wire up everything. With this commit, MIPI DBI drivers can access the GEM object's memory that is provided by shadow-plane state. The actual changes to drivers are implemented separately. v2: * use shadow-plane state directly (Noralf) Signed-off-by: Thomas Zimmermann Reviewed-by: Noralf Trønnes Tested-by: Javier Martinez Canillas Tested-by: Noralf Trønnes # drm/tiny/mi0283qt Link: https://patchwork.freedesktop.org/patch/msgid/20221202125644.7917-7-tzimmermann@suse.de commit b5f636e63b807fdeba5d61260e5f6b24f6834f69 Author: Thomas Zimmermann Date: Fri Dec 2 13:56:41 2022 +0100 drm/mipi-dbi: Prepare framebuffer copy operation in pipe-update helpers Move the vmap/vunmap blocks from the inner fb_dirty helpers into the MIPI DBI update helpers. The function calls can result in waiting and/or processing overhead. Reduce the penalties by executing the functions once in the outer-most function of the pipe update. This change also prepares for MIPI DBI for shadow-plane helpers. With shadow-plane helpers, transfer source buffers are mapped into kernel address space automatically. v2: * keep each driver's existing buffer-mapping patter (Noralf) * zero-initialize iosys_map arrays (Noralf) Signed-off-by: Thomas Zimmermann Reviewed-by: Noralf Trønnes Tested-by: Javier Martinez Canillas Tested-by: Noralf Trønnes # drm/tiny/mi0283qt Link: https://patchwork.freedesktop.org/patch/msgid/20221202125644.7917-6-tzimmermann@suse.de commit 63aa5ec6cf2f332ec4ef08a03f4f39895f82b2b9 Author: Thomas Zimmermann Date: Fri Dec 2 13:56:40 2022 +0100 drm/mipi-dbi: Initialize default driver functions with macro Introduce DRM_MIPI_DBI_SIMPLE_DISPLAY_PIPE_FUNCS to initialize MIPI-DBI helpers to default values and convert drivers. The prepare_fb function set by some drivers is called implicitly by simple-kms helpers, so leave it out. Signed-off-by: Thomas Zimmermann Reviewed-by: Noralf Trønnes Tested-by: Javier Martinez Canillas Tested-by: Noralf Trønnes # drm/tiny/mi0283qt Link: https://patchwork.freedesktop.org/patch/msgid/20221202125644.7917-5-tzimmermann@suse.de commit e06c123e1d7c0668d27f1d92d5f778c7a737ddf7 Author: Thomas Zimmermann Date: Fri Dec 2 13:56:39 2022 +0100 drm/st7586: Call MIPI DBI mode_valid helper MIPI DBI drivers validate each mode against their native resolution. Add this test to st7586. Signed-off-by: Thomas Zimmermann Reviewed-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20221202125644.7917-4-tzimmermann@suse.de commit fe2c021b63e1831c740d473d39f8569749a8c2dc Author: Thomas Zimmermann Date: Fri Dec 2 13:56:38 2022 +0100 drm/ili9225: Call MIPI DBI mode_valid helper MIPI DBI drivers validate each mode against their native resolution. Add this test to ili9225. Signed-off-by: Thomas Zimmermann Reviewed-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20221202125644.7917-3-tzimmermann@suse.de commit 00b5497d642bec3ceef85f3abe642d991a75ddf0 Author: Thomas Zimmermann Date: Fri Dec 2 13:56:37 2022 +0100 drm/simple-kms: Remove drm_gem_simple_display_pipe_prepare_fb() The helper drm_gem_simple_display_pipe_prepare_fb() is simple-KMS' default implementation for prepare_fb. Remove the call from drivers that set it explicitly. Then inline the helper into the only caller within simple-kms helpers. No functional changes. Simple-KMS drivers that implement the prepare_fb callback should call drm_gem_plane_helper_prepare_fb() directly. v2: * fix typo in commit message Signed-off-by: Thomas Zimmermann Reviewed-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20221202125644.7917-2-tzimmermann@suse.de commit e44de90453bb2b46a523df78c39eb896bab35dcd Author: Govindaraj Saminathan Date: Tue Nov 29 13:04:02 2022 +0200 wifi: ath11k: Fix race condition with struct htt_ppdu_stats_info A crash happens when running the traffic with multiple clients: Crash Signature : Unable to handle kernel paging request at virtual address ffffffd700970918 During the crash, PC points to "ieee80211_tx_rate_update+0x30/0x68 [mac80211]" LR points to "ath11k_dp_htt_htc_t2h_msg_handler+0x5a8/0x8a0 [ath11k]". Struct ppdu_stats_info is allocated and accessed from event callback via copy engine tasklet, this has a problem when freeing it from ath11k_mac_op_stop(). Use data_lock during entire ath11k_dp_htt_get_ppdu_desc() call to protect struct htt_ppdu_stats_info access and to avoid race condition when accessing it from ath11k_mac_op_stop(). Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: Govindaraj Saminathan Co-developed-by: Karthikeyan Kathirvel Signed-off-by: Karthikeyan Kathirvel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221124071104.22506-1-quic_kathirve@quicinc.com commit 3100240bf846ead1a2dbd6ae62bf48c687b9f5be Author: Matt Roper Date: Mon Nov 28 15:30:13 2022 -0800 drm/i915/mtl: Add hardware-level lock for steering Starting with MTL, the driver needs to not only protect the steering control register from simultaneous software accesses, but also protect against races with hardware/firmware agents. The hardware provides a dedicated locking mechanism to support this via the MTL_STEER_SEMAPHORE register. Reading the register acts as a 'trylock' operation; the read will return 0x1 if the lock is acquired or 0x0 if something else is already holding the lock; once acquired, writing 0x1 to the register will release the lock. We'll continue to grab the software lock as well, just so lockdep can track our locking; assuming the hardware lock is behaving properly, there should never be any contention on the software lock in this case. v2: - Extend hardware semaphore timeout and add a taint for CI if it ever happens (this would imply misbehaving hardware/firmware). (Mika) - Add "MTL_" prefix to new steering semaphore register. (Mika) Cc: Mika Kuoppala Signed-off-by: Matt Roper Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20221128233014.4000136-5-matthew.d.roper@intel.com commit 70b612084586402d39aabf7d76c605914cc3c2b6 Author: Matt Roper Date: Wed Nov 30 07:58:52 2022 -0800 drm/i915/mcr: Hold forcewake and MCR lock over PPAT setup PPAT setup involves a series of multicast writes. This can be optimized slightly be acquiring forcewake and the steering lock just once for the entire sequence. v2: - We should use FW_REG_WRITE instead of FW_REG_READ. (Bala) Suggested-by: Balasubramani Vivekanandan Signed-off-by: Matt Roper Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20221130155852.19601-1-matthew.d.roper@intel.com commit e3995e08a39a41691742b380023a0d480247afb0 Author: Wayne Boyer Date: Wed Nov 30 09:07:23 2022 -0800 drm/i915/pvc: Implement recommended caching policy As per the performance tuning guide, set the HOSTCACHEEN bit to implement the recommended caching policy on PVC. Signed-off-by: Wayne Boyer Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20221130170723.2460014-1-wayne.boyer@intel.com commit 0870d86eac8a9abd89a0be1b719d5dc5bac936f0 Author: Dave Stevenson Date: Thu Dec 1 09:42:52 2022 +0100 drm/vc4: dpi: Fix format mapping for RGB565 The mapping is incorrect for RGB565_1X16 as it should be DPI_FORMAT_18BIT_666_RGB_1 instead of DPI_FORMAT_18BIT_666_RGB_3. Fixes: 08302c35b59d ("drm/vc4: Add DPI driver") Signed-off-by: Dave Stevenson Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221013-rpi-dpi-improvements-v3-7-eb76e26a772d@cerno.tech Signed-off-by: Maxime Ripard commit 0c9a31b8f93b93f6c42848f4cd8e7ad6a04ce9ae Author: Dave Stevenson Date: Thu Dec 1 09:42:51 2022 +0100 drm/vc4: dpi: Change the default DPI format to being 18bpp, not 24. DPI hasn't really been used up until now, so the default has been meaningless. In theory we should be able to pass the desired format for the adjacent bridge chip through, but framework seems to be missing for that. As the main device to use DPI is the VGA666 or Adafruit Kippah, both of which use RGB666, change the default to being RGB666 instead of RGB888. Signed-off-by: Dave Stevenson Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221013-rpi-dpi-improvements-v3-6-eb76e26a772d@cerno.tech Signed-off-by: Maxime Ripard commit 465bf9b769ed6cd886a58abc06bccfcefeb55df4 Author: Joerg Quinten Date: Thu Dec 1 09:42:50 2022 +0100 drm/vc4: dpi: Support BGR666 formats The VC4 DPI output can support multiple BGR666 variants, but they were never added to the driver. Let's add the the support for those formats. Signed-off-by: Joerg Quinten Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221013-rpi-dpi-improvements-v3-5-eb76e26a772d@cerno.tech Signed-off-by: Maxime Ripard commit 11fb69c753cdfaa75f4c2a01861edaaacfe23d90 Author: Chris Morgan Date: Thu Dec 1 09:42:49 2022 +0100 drm/vc4: dpi: Support RGB565 format The RGB565 format with padding over 24 bits (MEDIA_BUS_FMT_RGB565_1X24_CPADHI) is supported by the vc4 DPI controller. This is what the Geekworm MZP280 DPI display uses, so let's add support for it in the DPI controller driver. Reviewed-by: Dave Stevenson Signed-off-by: Chris Morgan Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221013-rpi-dpi-improvements-v3-4-eb76e26a772d@cerno.tech Signed-off-by: Maxime Ripard commit 1113f644c488225212eebd3966360326579e2d3d Author: Joerg Quinten Date: Thu Dec 1 09:42:48 2022 +0100 media: uapi: add MEDIA_BUS_FMT_BGR666_1X24_CPADHI Add the BGR666 format MEDIA_BUS_FMT_BGR666_1X24_CPADHI supported by the RaspberryPi. Signed-off-by: Joerg Quinten Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221013-rpi-dpi-improvements-v3-3-eb76e26a772d@cerno.tech Signed-off-by: Maxime Ripard commit 2468e0195c09706896712a29030132e7f1bd0bcc Author: Joerg Quinten Date: Thu Dec 1 09:42:47 2022 +0100 media: uapi: add MEDIA_BUS_FMT_BGR666_1X18 Add the BGR666 format MEDIA_BUS_FMT_BGR666_1X18 supported by the RaspberryPi. Signed-off-by: Joerg Quinten Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221013-rpi-dpi-improvements-v3-2-eb76e26a772d@cerno.tech Signed-off-by: Maxime Ripard commit a0af74f30bb62143593c6f895ed439059d19675e Author: Chris Morgan Date: Thu Dec 1 09:42:46 2022 +0100 media: uapi: add MEDIA_BUS_FMT_RGB565_1X24_CPADHI Add the MEDIA_BUS_FMT_RGB565_1X24_CPADHI format used by the Geekworm MZP280 panel for the Raspberry Pi. Signed-off-by: Chris Morgan Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20221013-rpi-dpi-improvements-v3-1-eb76e26a772d@cerno.tech Signed-off-by: Maxime Ripard commit e640e7cc53ea237388759c5d45c7b28503f5c133 Author: Maxime Ripard Date: Thu Dec 1 10:07:36 2022 +0100 drm/tests: probe_helper: Fix uninitialized variable The len variable is used while uninitialized. Initialize it. Fixes: 1e4a91db109f ("drm/probe-helper: Provide a TV get_modes helper") Reported-by: kernel test robot Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20221201090736.290935-1-maxime@cerno.tech Signed-off-by: Maxime Ripard commit 0f9aa074c92dd9274b811c1c3fa93736814a4b0d Author: Maxime Ripard Date: Mon Nov 28 09:19:37 2022 +0100 drm/modes: Use strscpy() to copy command-line mode name The mode name in struct drm_cmdline_mode can hold 32 characters at most, which can easily get overrun. Switch to strscpy() to prevent such a thing. Reported-by: coverity-bot Addresses-Coverity-ID: 1527354 ("Security best practices violations") Fixes: a7ab155397dd ("drm/modes: Switch to named mode descriptors") Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20221128081938.742410-2-maxime@cerno.tech Signed-off-by: Maxime Ripard commit b99070c07b78f1d318f8625b31128f405fef0e60 Author: Maxime Ripard Date: Mon Nov 28 09:19:36 2022 +0100 drm/doc: Fix title underline length The underline length for the new Analog TV properties section doesn't match the title length, resulting in a warning. Fixes: 7d63cd8526f1 ("drm/connector: Add TV standard property") Reported-by: kernel test robot Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20221128081938.742410-1-maxime@cerno.tech Signed-off-by: Maxime Ripard commit 429e8706366166494314a46c82a9a9929aedbb8c Author: Matti Vaittinen Date: Wed Nov 30 11:23:00 2022 +0200 drm/meson: dw-hdmi: Use devm_regulator_*get_enable*() Simplify using the devm_regulator_get_enable_optional(). Also drop the now unused struct member 'hdmi_supply'. Signed-off-by: Matti Vaittinen Acked-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/df0096b5aea2a18d1540cde379c5abf589ccd7c4.1669799805.git.mazziesaccount@gmail.com commit ff1eae1201a46f997126297d2d3440baa2d1b9a9 Author: Matti Vaittinen Date: Wed Nov 30 11:22:37 2022 +0200 drm/bridge: sii902x: Use devm_regulator_bulk_get_enable() Simplify using devm_regulator_bulk_get_enable() Signed-off-by: Matti Vaittinen Acked-by: Robert Foss Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/e6153c7beb2076b9ea13082b2024ec3296bc08bc.1669799805.git.mazziesaccount@gmail.com commit 9bbba0667f3779efa9a5c262b2f1b97408a2f563 Author: John Harrison Date: Tue Nov 29 15:20:31 2022 -0800 drm/i915/guc: Use GuC submission API version number The GuC firmware includes an extra version number to specify the submission API level. So use that rather than the main firmware version number for submission related checks. Also, while it is guaranteed that GuC version number components are only 8-bits in size, other firmwares do not have that restriction. So stop making assumptions about them generically fitting in a u16 individually, or in a u32 as a combined 8.8.8. Signed-off-by: John Harrison Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20221129232031.3401386-4-John.C.Harrison@Intel.com commit 92fcd24853dea0aaf6da945dd06107e573840ae8 Author: John Harrison Date: Tue Nov 29 15:20:30 2022 -0800 drm/i915/uc: More refactoring of UC version numbers As a precursor to a coming change (for adding a GuC submission API version), abstract the UC version number into its own private structure separate to the firmware filename. Signed-off-by: John Harrison Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20221129232031.3401386-3-John.C.Harrison@Intel.com commit b02ba9ed7cbe7a2ca5b790297cd9c4d30fb810fe Author: John Harrison Date: Tue Nov 29 15:20:29 2022 -0800 drm/i915/uc: Rationalise delimiters in filename macros The way delimiters (underscores and dots) were added to the UC filenames was different for different types of delimiter. Rationalise them to all be done the same way - implicitly in the concatenation macro rather than explicitly in the file name prefix. Signed-off-by: John Harrison Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20221129232031.3401386-2-John.C.Harrison@Intel.com commit 7d1675dcb5a16c83c60863af3cd26837750cd538 Author: Taylor, Clinton A Date: Tue Nov 29 12:33:43 2022 -0800 drm/i915/hdmi: SPD infoframe update for discrete Replace integrated with discrete for dgfx platforms. v2: commit title reword (Jani) v3: use variable name i915 (Jani) v4: commit message reword (MattR) Cc: Jani Nikula Reviewed-by: Matt Roper Signed-off-by: Taylor, Clinton A Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20221129203343.720860-1-clinton.a.taylor@intel.com commit 4186e2185b4ffc9ce652566d4a4f249484841ff4 Author: Matt Roper Date: Mon Nov 28 15:30:12 2022 -0800 drm/i915/gt: Add dedicated MCR lock We've been overloading uncore->lock to protect access to the MCR steering register. That's not really what uncore->lock is intended for, and it would be better if we didn't need to hold such a high-traffic spinlock for the whole sequence of (apply steering, access MCR register, restore steering). Let's create a dedicated MCR lock to protect the steering control register over this critical section and stop relying on the high-traffic uncore->lock. For now the new lock is a software lock. However some platforms (MTL and beyond) have a hardware-provided locking mechanism that can be used to serialize not only software accesses, but also hardware/firmware accesses as well; support for that hardware level lock will be added in a future patch. v2: - Use irqsave/irqrestore spinlock calls; platforms using execlist submission rather than GuC submission can perform MCR accesses in interrupt context because reset -> errordump happens in a tasklet. Cc: Chris Wilson Cc: Mika Kuoppala Cc: Balasubramani Vivekanandan Signed-off-by: Matt Roper Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20221128233014.4000136-4-matthew.d.roper@intel.com commit 8d9f7d25d50ba55f6b3463d0b8085f62efc39ec4 Author: Matt Roper Date: Mon Nov 28 15:30:11 2022 -0800 drm/i915/gt: Pass gt rather than uncore to lowest-level reads/writes Passing the GT rather than uncore to the lowest level MCR read and write functions will make it easier to introduce dedicated MCR locking in a following patch. Signed-off-by: Matt Roper Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20221128233014.4000136-3-matthew.d.roper@intel.com commit 03b713d029bd17a1ed426590609af79843db95e2 Author: Matt Roper Date: Mon Nov 28 15:30:10 2022 -0800 drm/i915/gt: Correct kerneldoc for intel_gt_mcr_wait_for_reg() The kerneldoc function name was not updated when this function was converted to a non-fw form. Fixes: 192bb40f030a ("drm/i915/gt: Manage uncore->lock while waiting on MCR register") Reported-by: kernel test robot Signed-off-by: Matt Roper Reviewed-by: Balasubramani Vivekanandan Link: https://patchwork.freedesktop.org/patch/msgid/20221128233014.4000136-2-matthew.d.roper@intel.com commit 6ee6692520133a14b0d0f3ddddf8c44783cfee06 Author: Gustavo Sousa Date: Thu Nov 24 13:21:23 2022 -0300 drm/i915/dmc: Update DG2 DMC version to v2.08 Release notes: 1. Fixes for Register noclaims and few restore. Fixes: c4cf059d9c2c ("drm/i915/dmc: Update DG2 DMC firmware to v2.07") Signed-off-by: Gustavo Sousa Reviewed-by: Anusha Srivatsa Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20221124162123.16870-1-gustavo.sousa@intel.com commit 8f5c2f6eda4fc7d078a9a1cfddda46ef686c502b Author: Swati Sharma Date: Thu Nov 10 15:03:12 2022 +0530 drm/i915/dsc: Refactor dsc gen checks Use HAS_DSC(__i915) wrapper containing runtime info of has_dsc member. Platforms supporting dsc has this flag enabled; no need of DISPLAY_VER() check. Also, simplified intel_dsc_source_support() based on above changes. Suggested-by: Jani Nikula Signed-off-by: Swati Sharma Reviewed-by: Jani Nikula Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20221110093312.13932-1-swati2.sharma@intel.com commit 7b4668e4ffd5d9cc5e95df7677e7a3f7d16051e9 Author: Alaa Emad Date: Wed Nov 9 13:39:45 2022 +0200 drm/vkms: change min cursor size to accept smaller values Change min cursor size of vkms driver from 20 to 10, to increase the IGT test coverage of vkms by enabling 32x10 cursor size subtests in kms_cursor_crc Signed-off-by: Alaa Emad Reviewed-by: Melissa Wen Signed-off-by: Melissa Wen Link: https://patchwork.freedesktop.org/patch/msgid/20221109113945.20938-1-aemad@igalia.com commit 2fe2a8f40c21161ffe7653cc234e7934db5b7cc5 Author: Yuan Can Date: Tue Nov 1 06:51:56 2022 +0000 drm/vkms: Fix null-ptr-deref in vkms_release() A null-ptr-deref is triggered when it tries to destroy the workqueue in vkms->output.composer_workq in vkms_release(). KASAN: null-ptr-deref in range [0x0000000000000118-0x000000000000011f] CPU: 5 PID: 17193 Comm: modprobe Not tainted 6.0.0-11331-gd465bff130bf #24 RIP: 0010:destroy_workqueue+0x2f/0x710 ... Call Trace: ? vkms_config_debugfs_init+0x50/0x50 [vkms] __devm_drm_dev_alloc+0x15a/0x1c0 [drm] vkms_init+0x245/0x1000 [vkms] do_one_initcall+0xd0/0x4f0 do_init_module+0x1a4/0x680 load_module+0x6249/0x7110 __do_sys_finit_module+0x140/0x200 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 The reason is that an OOM happened which triggers the destroy of the workqueue, however, the workqueue is alloced in the later process, thus a null-ptr-deref happened. A simple call graph is shown as below: vkms_init() vkms_create() devm_drm_dev_alloc() __devm_drm_dev_alloc() devm_drm_dev_init() devm_add_action_or_reset() devm_add_action() # an error happened devm_drm_dev_init_release() drm_dev_put() kref_put() drm_dev_release() vkms_release() destroy_workqueue() # null-ptr-deref happened vkms_modeset_init() vkms_output_init() vkms_crtc_init() # where the workqueue get allocated Fix this by checking if composer_workq is NULL before passing it to the destroy_workqueue() in vkms_release(). Fixes: 6c234fe37c57 ("drm/vkms: Implement CRC debugfs API") Signed-off-by: Yuan Can Reviewed-by: Melissa Wen Signed-off-by: Melissa Wen Link: https://patchwork.freedesktop.org/patch/msgid/20221101065156.41584-3-yuancan@huawei.com commit 0d0b368b9d104b437e1f4850ae94bdb9a3601e89 Author: Yuan Can Date: Tue Nov 1 06:51:55 2022 +0000 drm/vkms: Fix memory leak in vkms_init() A memory leak was reported after the vkms module install failed. unreferenced object 0xffff88810bc28520 (size 16): comm "modprobe", pid 9662, jiffies 4298009455 (age 42.590s) hex dump (first 16 bytes): 01 01 00 64 81 88 ff ff 00 00 dc 0a 81 88 ff ff ...d............ backtrace: [<00000000e7561ff8>] kmalloc_trace+0x27/0x60 [<000000000b1954a0>] 0xffffffffc45200a9 [<00000000abbf1da0>] do_one_initcall+0xd0/0x4f0 [<000000001505ee87>] do_init_module+0x1a4/0x680 [<00000000958079ad>] load_module+0x6249/0x7110 [<00000000117e4696>] __do_sys_finit_module+0x140/0x200 [<00000000f74b12d2>] do_syscall_64+0x35/0x80 [<000000008fc6fcde>] entry_SYSCALL_64_after_hwframe+0x46/0xb0 The reason is that the vkms_init() returns without checking the return value of vkms_create(), and if the vkms_create() failed, the config allocated at the beginning of vkms_init() is leaked. vkms_init() config = kmalloc(...) # config allocated ... return vkms_create() # vkms_create failed and config is leaked Fix this problem by checking return value of vkms_create() and free the config if error happened. Fixes: 2df7af93fdad ("drm/vkms: Add vkms_config type") Signed-off-by: Yuan Can Reviewed-by: Melissa Wen Signed-off-by: Melissa Wen Link: https://patchwork.freedesktop.org/patch/msgid/20221101065156.41584-2-yuancan@huawei.com commit 8d5d063fd669a0b059b035e74cff570a17953a77 Author: Drew Davenport Date: Thu Nov 17 13:38:48 2022 -0700 drm/panel-samsung-atna33xc20: Extend autosuspend delay Avoid the panel oscillating on and off during boot. In some cases it will be more than 1000ms between powering the panel to read the EDID early during boot, and enabling the panel for display. Extending the autosuspend delay avoids autosuspending during this interval. Signed-off-by: Drew Davenport Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20221117133655.5.I96ce2a565ff893eddcbee70174c991179311a3ae@changeid commit b1d2751c2f238ce448f43c5664496f7f41d7d0b9 Author: Drew Davenport Date: Thu Nov 17 13:38:47 2022 -0700 drm/bridge/parade-ps8640: Extend autosuspend Same change as done for panel-samsung-atna33xc20. Extend the autosuspend delay to avoid oscillating between power status during boot. Signed-off-by: Drew Davenport Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20221117133655.4.If6153da69ec4bc9e83d5f095ef6e6b07283940a5@changeid commit 7e682946db98d476ff19bda73d808de0660da524 Author: Drew Davenport Date: Thu Nov 17 13:38:46 2022 -0700 drm/panel-simple: Use ktime_get_boottime for delays ktime_get_boottime continues while the device is suspended. This change ensures that the resume path will not be delayed if the power off delay has already been met while the device is suspended Signed-off-by: Drew Davenport Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20221117133655.3.Iebd9f79aba0a62015fd2383fe6986c2d6fe12cfd@changeid commit 62e43673ca84a68cc06dcaa9337a06df7f79fef9 Author: Drew Davenport Date: Thu Nov 17 13:38:45 2022 -0700 drm/panel-samsung-atna33xc20: Use ktime_get_boottime for delays ktime_get_boottime continues while the device is suspended. This change ensures that the resume path will not be delayed if the power off delay has already been met while the device is suspended Signed-off-by: Drew Davenport Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20221117133655.2.Iebd9f79aba0a62015fd2383fe6986c2d6fe12cfd@changeid commit fa8e91b12697e05a7971da035ebaa723a34f81ae Author: Drew Davenport Date: Thu Nov 17 13:38:44 2022 -0700 drm/panel-edp: Use ktime_get_boottime for delays ktime_get is based on CLOCK_MONOTONIC which stops on suspend. On suspend, the time that the panel was powerd off is recorded with ktime_get, and on resume this time is compared to the current ktime_get time to determine if the driver should wait for the panel to power down completely before re-enabling it. Because we're using ktime_get, this delay doesn't account for the time that the device is suspended, during which the power down delay may have already elapsed. Change to use ktime_get_boottime throughout, which uses CLOCK_BOOTTIME which does not stop when suspended. This ensures that the resume path will not be delayed if the power off delay has already been met while the device is suspended. Signed-off-by: Drew Davenport Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20221117133655.1.I51639dc112bbbe27259df6bdad56dbabd655d91a@changeid commit de86815b3730b4df1eaa1dc8a213f6040f2ed218 Author: Uwe Kleine-König Date: Fri Nov 18 23:36:10 2022 +0100 drm/bridge: ti-sn65dsi86: Convert to i2c's .probe_new() The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20221118224540.619276-37-uwe@kleine-koenig.org commit 4ecff954c370b82bce45bdca2846c5c5563e8a8a Author: Yuan Can Date: Tue Nov 8 09:12:26 2022 +0000 drm/bridge: megachips: Fix error handling in i2c_register_driver() A problem about insmod megachips-stdpxxxx-ge-b850v3-fw.ko failed is triggered with the following log given: [ 4497.981497] Error: Driver 'stdp4028-ge-b850v3-fw' is already registered, aborting... insmod: ERROR: could not insert module megachips-stdpxxxx-ge-b850v3-fw.ko: Device or resource busy The reason is that stdpxxxx_ge_b850v3_init() returns i2c_add_driver() directly without checking its return value, if i2c_add_driver() failed, it returns without calling i2c_del_driver() on the previous i2c driver, resulting the megachips-stdpxxxx-ge-b850v3-fw can never be installed later. A simple call graph is shown as below: stdpxxxx_ge_b850v3_init() i2c_add_driver(&stdp4028_ge_b850v3_fw_driver) i2c_add_driver(&stdp2690_ge_b850v3_fw_driver) i2c_register_driver() driver_register() bus_add_driver() priv = kzalloc(...) # OOM happened # return without delete stdp4028_ge_b850v3_fw_driver Fix by calling i2c_del_driver() on stdp4028_ge_b850v3_fw_driver when i2c_add_driver() returns error. Fixes: fcfa0ddc18ed ("drm/bridge: Drivers for megachips-stdpxxxx-ge-b850v3-fw (LVDS-DP++)") Signed-off-by: Yuan Can Reviewed-by: Andrzej Hajda Tested-by: Ian Ray Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20221108091226.114524-1-yuancan@huawei.com commit 14347a9c889fbdbae81e500f6c6e313f5d8e5271 Author: Daniele Ceraolo Spurio Date: Wed Nov 23 15:54:17 2022 -0800 drm/i915/huc: always init the delayed load fence The fence is only tracking if the HuC load is in progress or not and doesn't distinguish between already loaded, not supported or disabled, so we can always initialize it to completed, no matter the actual support. We already do that for most platforms, but we skip it on GTs that lack VCS engines (e.g. MTL root GT), so fix that. Note that the cleanup is already unconditional. While at it, move the init/fini to helper functions. Fixes: 02224691cb0f ("drm/i915/huc: fix leak of debug object in huc load fence on driver unload") Signed-off-by: Daniele Ceraolo Spurio Cc: John Harrison Cc: Alan Previn Reviewed-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221123235417.1475709-1-daniele.ceraolospurio@intel.com commit 11ffff9284261235cac7c9a0956943e017fe1a9f Author: Jani Nikula Date: Wed Nov 23 15:09:32 2022 +0200 drm/audio: make drm_audio_component.h self-contained The file uses bool and struct completion, include the relevant headers. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221123130932.3863985-1-jani.nikula@intel.com commit d889913205cf7ebda905b1e62c5867ed4e39f6c2 Author: Kalle Valo Date: Mon Nov 28 17:09:53 2022 +0200 wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices ath12k is a new mac80211 driver for Qualcomm Wi-Fi 7 devices, first supporting QCN9274 and WCN7850 PCI devices. QCN9274 supports both AP and station; WCN7850 supports only station mode. Monitor mode is not (yet) supported. Only PCI bus devices are supported. ath12k is forked from an earlier version of ath11k. It was simpler to have a "clean start" for the new generation and not try to share the code with ath11k. This makes maintenance easier and avoids major changes in ath11k, which would have significantly increased the risk of regressions in existing setups. ath12k uses le32 and cpu_to_le32() macros to handle endian conversions, instead of using the firmware byte swap feature utilized by ath11k. There is only one kernel module, named ath12k.ko. Currently ath12k only supports HE mode (IEEE 802.11ax) or older, but work is ongoing to add EHT mode (IEEE 802.11be) support. The size of the driver is ~41 kLOC and 45 files. To make the review easier, this initial version of ath12k does not support Device Tree, debugfs or any other extra features. Those will be added later, after ath12k is accepted to upstream. The driver is build tested by Intel's kernel test robot with both GCC and Clang. Sparse reports no warnings. The driver is mostly free of checkpatch warnings, albeit few of the warnings are omitted on purpose, list of them here: https://github.com/qca/qca-swiss-army-knife/blob/master/tools/scripts/ath12k/ath12k-check#L52 The driver has had multiple authors who are listed in alphabetical order below. Co-developed-by: Balamurugan Selvarajan Signed-off-by: Balamurugan Selvarajan Co-developed-by: Baochen Qiang Signed-off-by: Baochen Qiang Co-developed-by: Bhagavathi Perumal S Signed-off-by: Bhagavathi Perumal S Co-developed-by: Carl Huang Signed-off-by: Carl Huang Co-developed-by: Jeff Johnson Signed-off-by: Jeff Johnson Co-developed-by: Karthikeyan Periyasamy Signed-off-by: Karthikeyan Periyasamy Co-developed-by: P Praneesh Signed-off-by: P Praneesh Co-developed-by: Pradeep Kumar Chitrapu Signed-off-by: Pradeep Kumar Chitrapu Co-developed-by: Ramya Gnanasekar Signed-off-by: Ramya Gnanasekar Co-developed-by: Sriram R Signed-off-by: Sriram R Co-developed-by: Vasanthakumar Thiagarajan Signed-off-by: Vasanthakumar Thiagarajan Co-developed-by: Wen Gong Signed-off-by: Wen Gong Signed-off-by: Kalle Valo commit 8d58bb7991c45f6b60710cc04c9498c6ea96db90 Author: Mikko Kovanen Date: Sat Nov 26 13:27:13 2022 +0000 drm/i915/dsi: fix VBT send packet port selection for dual link DSI intel_dsi->ports contains bitmask of enabled ports and correspondingly logic for selecting port for VBT packet sending must use port specific bitmask when deciding appropriate port. Fixes: 08c59dde71b7 ("drm/i915/dsi: fix VBT send packet port selection for ICL+") Cc: stable@vger.kernel.org Signed-off-by: Mikko Kovanen Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/DBBPR09MB466592B16885D99ABBF2393A91119@DBBPR09MB4665.eurprd09.prod.outlook.com commit 7674cd0b7d28b952151c3df26bbfa7e07eb2b4ec Author: Xia Fukun Date: Fri Nov 25 14:34:28 2022 +0800 drm/i915/bios: fix a memory leak in generate_lfp_data_ptrs When (size != 0 || ptrs->lvds_ entries != 3), the program tries to free() the ptrs. However, the ptrs is not created by calling kzmalloc(), but is obtained by pointer offset operation. This may lead to memory leaks or undefined behavior. Fix this by replacing the arguments of kfree() with ptrs_block. Fixes: a87d0a847607 ("drm/i915/bios: Generate LFP data table pointers if the VBT lacks them") Signed-off-by: Xia Fukun Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20221125063428.69486-1-xiafukun@huawei.com commit 0f85715804e72cdcf489a89930ec64437e11ca8c Author: Aravind Iddamsetty Date: Tue Nov 22 12:31:26 2022 +0530 drm/i915/mtl: Media GT and Render GT share common GGTT On XE_LPM+ platforms the media engines are carved out into a separate GT but have a common GGTMMADR address range which essentially makes the GGTT address space to be shared between media and render GT. As a result any updates in GGTT shall invalidate TLB of GTs sharing it and similarly any operation on GGTT requiring an action on a GT will have to involve all GTs sharing it. setup_private_pat was being done on a per GGTT based as that doesn't touch any GGTT structures moved it to per GT based. BSPEC: 63834 v2: 1. Add details to commit msg 2. includes fix for failure to add item to ggtt->gt_list, as suggested by Lucas 3. as ggtt_flush() is used only for ggtt drop i915_is_ggtt check within it. 4. setup_private_pat moved out of intel_gt_tiles_init v3: 1. Move out for_each_gt from i915_driver.c (Jani Nikula) v4: drop using RCU primitives on ggtt->gt_list as it is not an RCU list (Matt Roper) Cc: Matt Roper Signed-off-by: Aravind Iddamsetty Reviewed-by: Matt Roper Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20221122070126.4813-1-aravind.iddamsetty@intel.com commit 900a80c5836587d95db32742f66e1f34f7b40fcb Author: Matt Atwood Date: Wed Nov 23 10:36:48 2022 -0800 drm/i915/dg2: Introduce Wa_18019271663 Wa_18019271663 applies to all DG2 steppings and skus. Bspec: 66622 Signed-off-by: Matt Atwood Reviewed-by: Gustavo Sousa Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20221123183648.407058-2-matthew.s.atwood@intel.com commit 468a4e630c7da8cf586f85cc498d6097aed1ab4b Author: Matt Atwood Date: Wed Nov 23 10:36:47 2022 -0800 drm/i915/dg2: Introduce Wa_18018764978 Wa_18018764978 applies to specific steppings of DG2 (G10 C0+, G11 and G12 A0+). Clean up style in function at the same time. Bspec: 66622 Signed-off-by: Matt Atwood Reviewed-by: Gustavo Sousa Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20221123183648.407058-1-matthew.s.atwood@intel.com commit a77a3ffa151b7a9b3f579203ff6b5844803acfd7 Author: Maxime Ripard Date: Mon Nov 28 09:19:38 2022 +0100 drm/tests: helpers: Add missing export drm_kunit_device_init() is a public function meant to be used by other tests, but isn't exported. This leads to modpost errors when the other tests are compiled as module. Reported-by: kernel test robot Reviewed-by: Maíra Canal Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20221128081938.742410-3-maxime@cerno.tech commit 0ae41323a83233610e64e926eefb4d132ecb9028 Author: Shang XiaoJing Date: Thu Nov 24 09:51:13 2022 +0800 drm/vc4: vec: Use pm_runtime_resume_and_get() in vc4_vec_encoder_enable() Commit f0601ef8631c ("drm/vc4: vec: Protect device resources after removal") add fail path for vc4_vec_encoder_enable(), and will put usage_counter only when pm_runtime_get_sync() succeeds. However, pm_runtime_get_sync() will increment usage_counter even it failed. Fix it by replacing it with pm_runtime_resume_and_get() to keep usage counter balanced. Fixes: e4b81f8c74c8 ("drm/vc4: Add support for the VEC (Video Encoder) IP") Signed-off-by: Shang XiaoJing Link: https://lore.kernel.org/r/20221124015113.18540-1-shangxiaojing@huawei.com Signed-off-by: Maxime Ripard commit 9a49bf098752b30e92e59da03db7eca49ace61c7 Author: Maxime Ripard Date: Wed Nov 23 16:26:02 2022 +0100 drm/vc4: crtc: Provide a CRTC name It's fairly hard to figure out the instance of the CRTC affected by an atomic change using the default name. Since we can provide our own to the CRTC initialization functions, let's do so to make the debugging sessions easier. Reviewed-by: Javier Martinez Canillas Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20221123-rpi-kunit-tests-v1-20-051a0bb60a16@cerno.tech commit 3f98076f294fa58e83c87ebfb0af4ccf2454250d Author: Maxime Ripard Date: Wed Nov 23 16:25:59 2022 +0100 drm/vc4: crtc: Pass the device and data in vc4_crtc_init Both users of vc4_crtc_init need the same extra initialization to set the pointer to the platform_device and the CRTC data. Since it's mandatory, let's make them both arguments of vc4_crtc_init(). Reviewed-by: Javier Martinez Canillas Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20221123-rpi-kunit-tests-v1-17-051a0bb60a16@cerno.tech commit 5676105188f8931c838342f2827ed9c3bd8593d7 Author: Maxime Ripard Date: Wed Nov 23 16:25:58 2022 +0100 drm/vc4: txp: Initialise the CRTC before the encoder and connector It makes more sense to register the CRTC before the encoder and connectors, so let's move our call around. Reviewed-by: Javier Martinez Canillas Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20221123-rpi-kunit-tests-v1-16-051a0bb60a16@cerno.tech commit b998eb4fda0087f64bd068af758ae611188c7c9e Author: Maxime Ripard Date: Wed Nov 23 16:25:57 2022 +0100 drm/vc4: Add TXP encoder type The TXP is integrated as a separate CRTC/Encoder/Connector combo, but for some reason doesn't rely on the vc4_encoder type and it's associated type. Let's create a type to make it consistent with the other encoders. Reviewed-by: Javier Martinez Canillas Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20221123-rpi-kunit-tests-v1-15-051a0bb60a16@cerno.tech commit c1bcd9272bf008230eb49f0619dec9373ca49eb8 Author: Maxime Ripard Date: Wed Nov 23 16:25:56 2022 +0100 drm/vc4: txp: Reorder the variable assignments The current order of variable assignments is unneccessarily complex, let's make it simpler. Reviewed-by: Javier Martinez Canillas Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20221123-rpi-kunit-tests-v1-14-051a0bb60a16@cerno.tech commit e3479398bcf4f92c1ee513a277f5d3732a90e9f1 Author: Maxime Ripard Date: Wed Nov 23 16:25:52 2022 +0100 drm/vc4: kms: Sort the CRTCs by output before assigning them On the vc4 devices (and later), the blending is done by a single device called the HVS. The HVS has three FIFO that can operate in parallel, and route their output to 6 CRTCs and 7 encoders on the BCM2711. Each of these CRTCs and encoders have some constraints on which FIFO they can feed from, so we need some code to take all those constraints into account and assign FIFOs to CRTCs. The problem can be simplified by assigning those FIFOs to CRTCs by ascending output index number. We had a comment mentioning it already, but we were never actually enforcing it. It was working still in most situations because the probe order is roughly equivalent, except for the (optional, and fairly rarely used on the Pi4) VEC which was last in the probe order sequence, but one of the earliest device to assign. This resulted in configurations that were rejected by our code but were still valid with a different assignment. We can fix this by making sure we assign CRTCs to FIFOs by ordering them by ascending HVS output index. Fixes: 87ebcd42fb7b ("drm/vc4: crtc: Assign output to channel automatically") Reviewed-by: Javier Martinez Canillas Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20221123-rpi-kunit-tests-v1-10-051a0bb60a16@cerno.tech commit e818ee689986ea82a6e46e4128adbf94268d6d20 Author: Maxime Ripard Date: Wed Nov 23 16:25:55 2022 +0100 drm/vc4: kms: Constify the HVS old/new state helpers The vc4_hvs_get_(old|new)_global_state functions don't modify the drm_atomic_state passed as an argument, so let's make it const. Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v1-13-051a0bb60a16@cerno.tech Reviewed-by: Javier Martinez Canillas Signed-off-by: Maxime Ripard commit 553a241b80f22a20cd1a93f5e13d93bbde3fc7bc Author: Maxime Ripard Date: Wed Nov 23 16:25:53 2022 +0100 drm/vc4: Constify container_of wrappers None of our wrappers around container_of to access our objects from the DRM object pointer actually modify the latter. Let's make them const. Reviewed-by: Javier Martinez Canillas Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20221123-rpi-kunit-tests-v1-11-051a0bb60a16@cerno.tech commit 2081bd8994362785b07b435bdc0c5b53d46b1205 Author: Maxime Ripard Date: Wed Nov 23 16:25:51 2022 +0100 drm/atomic: Constify the old/new state accessors The drm_atomic_get_(old|new)_*_state don't modify the passed drm_atomic_state, so we can make it const. Reviewed-by: Javier Martinez Canillas Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20221123-rpi-kunit-tests-v1-9-051a0bb60a16@cerno.tech commit 7783cc67862f9166c901bfa0f80b717aa8d354dd Author: Geert Uytterhoeven Date: Mon Nov 21 16:59:55 2022 +0100 drm: mxsfb: DRM_MXSFB should depend on ARCH_MXS || ARCH_MXC Freescale/NXP i.MX LCDIF and eLCDIF LCD controllers are only present on Freescale/NXP i.MX SoCs. Hence add a dependency on ARCH_MXS || ARCH_MXC, to prevent asking the user about this driver when configuring a kernel without Freescale/NXP i.MX support. Fixes: 45d59d704080cc0c ("drm: Add new driver for MXSFB controller") Signed-off-by: Geert Uytterhoeven Reviewed-by: Marek Vasut Signed-off-by: Marek Vasut Link: https://patchwork.freedesktop.org/patch/msgid/98e74779ca2bc575d91afff03369e86b080c01ac.1669046358.git.geert+renesas@glider.be commit 10ef5f2992006720318b9886961820155b3750fd Author: Geert Uytterhoeven Date: Mon Nov 21 17:00:48 2022 +0100 drm: mxsfb: DRM_IMX_LCDIF should depend on ARCH_MXC The Freescale/NXP i.MX LCDIFv3 LCD controller is only present on Freescale/NXP i.MX SoCs. Hence add a dependency on ARCH_MXC, to prevent asking the user about this driver when configuring a kernel without Freescale/NXP i.MX support. Fixes: 9db35bb349a0ef32 ("drm: lcdif: Add support for i.MX8MP LCDIF variant") Signed-off-by: Geert Uytterhoeven Reviewed-by: Marek Vasut Signed-off-by: Marek Vasut Link: https://patchwork.freedesktop.org/patch/msgid/6103c1aa65a7888c12d351ae63f29850f29f42b9.1669046403.git.geert+renesas@glider.be commit 559358282e5b43b1b01e7f6afac6e0beb33cb4a2 Author: Thomas Zimmermann Date: Wed Nov 23 12:53:48 2022 +0100 drm/fb-helper: Don't use the preferred depth for the BPP default If no preferred value for bits-per-pixel has been given, fall back to 32. Never use the preferred depth. The color depth is the number of color/alpha bits per pixel, while bpp is the overall number of bits in most cases. Most noteworthy, XRGB8888 has a depth of 24 and a bpp value of 32. Using depth for bpp would make the value 24 as well and format selection in fbdev helpers fails. Unfortunately XRGB8888 is the most common format and the old heuristic therefore fails for most of the drivers (unless they implement the 24-bit RGB888 format). Picking a bpp of 32 will later on result in a default depth of 24 and the format XRGB8888. As XRGB8888 is the default format for most of the current and legacy graphics stack, all drivers must support it. So it is the safe choice. v2: * fix commit-message typo (Javier) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20221123115348.2521-8-tzimmermann@suse.de commit 36aff2eae40a68d510bd64549cd009ab3d81574b Author: Thomas Zimmermann Date: Wed Nov 23 12:53:47 2022 +0100 drm/solomon: Set preferred color depth and bpp to the correct values Set the preferred color depth to 24 bits and the fbdev bpp to 32 bits. This will signal XRGB8888 as default format to clients. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20221123115348.2521-7-tzimmermann@suse.de commit 88f19f8bdc45994009321efa73060d99a3061d3e Author: Thomas Zimmermann Date: Wed Nov 23 12:53:46 2022 +0100 drm/simpledrm: Set preferred depth from format of scanout buffer Set the preferred depth from the format of the scanout buffer. The value cannot be hardcoded, as the scanout buffer is only known at runtime. Also derive the fbdev emulation's bpp value from the scanout format. v2: * fix commit-message typo Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20221123115348.2521-6-tzimmermann@suse.de commit 5580f263210d401a4f7a5601c9ec8dbe27da1fc1 Author: Thomas Zimmermann Date: Wed Nov 23 12:53:45 2022 +0100 drm/ofdrm: Set preferred depth from format of scanout buffer Set the preferred depth from the format of the scanout buffer. The value cannot be hardcoded, as the scanout buffer is only known at runtime. Keeping the existing switch statement just duplicates the driver's existing logic for format detection. Also remove the FIXME comment from the call to drm_fbdev_generic_setup() as the driver now handles color depth and bpp values correctly. v2: * fix commit-message typo Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20221123115348.2521-5-tzimmermann@suse.de commit 749ba65913c083f4acf319738b18fa7c0faeddb3 Author: Thomas Zimmermann Date: Wed Nov 23 12:53:44 2022 +0100 drm/cirrus: Decouple fbdev bpp value from color depth Cirrus has a preferred color depth of 16 bit; also use it as fbdev bpp value. Don't use the color depth directly. It has a different meaning than bpp and both cannot be used interchangeably. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20221123115348.2521-4-tzimmermann@suse.de commit 6f9f15e63de607ffbe621d33e8c8d49481e1e845 Author: Thomas Zimmermann Date: Wed Nov 23 12:53:43 2022 +0100 drm/logicvc: Fix preferred fbdev cpp Logicvc can have different values for the preferred color depth. Set the fbdev bpp value depending on the runtime value. v2: * remove unused color depth of 15 from switch (Javier) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20221123115348.2521-3-tzimmermann@suse.de commit 53225f30fa5db4bafbb3e662725a5b3a8121ba8d Author: Thomas Zimmermann Date: Wed Nov 23 12:53:42 2022 +0100 drm/hisilicon/hibmc: Fix preferred depth and bpp Set the preferred color depth to 24 bits and the fbdev bpp to 32 bits. This will signal XRGB8888 as default format to clients. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20221123115348.2521-2-tzimmermann@suse.de commit f301a29f143760ce8d3d6b6a8436d45d3448cde6 Author: Janusz Krzysztofik Date: Mon Nov 21 15:56:55 2022 +0100 drm/i915: Never return 0 if not all requests retired Users of intel_gt_retire_requests_timeout() expect 0 return value on success. However, we have no protection from passing back 0 potentially returned by a call to dma_fence_wait_timeout() when it succedes right after its timeout has expired. Replace 0 with -ETIME before potentially using the timeout value as return code, so -ETIME is returned if there are still some requests not retired after timeout, 0 otherwise. v3: Use conditional expression, more compact but also better reflecting intention standing behind the change. v2: Move the added lines down so flush_submission() is not affected. Fixes: f33a8a51602c ("drm/i915: Merge wait_for_timelines with retire_request") Signed-off-by: Janusz Krzysztofik Reviewed-by: Andrzej Hajda Cc: stable@vger.kernel.org # v5.5+ Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20221121145655.75141-3-janusz.krzysztofik@linux.intel.com commit f235dbd5b768e238d365fd05d92de5a32abc1c1f Author: Janusz Krzysztofik Date: Mon Nov 21 15:56:54 2022 +0100 drm/i915: Fix negative value passed as remaining time Commit b97060a99b01 ("drm/i915/guc: Update intel_gt_wait_for_idle to work with GuC") extended the API of intel_gt_retire_requests_timeout() with an extra argument 'remaining_timeout', intended for passing back unconsumed portion of requested timeout when 0 (success) is returned. However, when request retirement happens to succeed despite an error returned by a call to dma_fence_wait_timeout(), that error code (a negative value) is passed back instead of remaining time. If we then pass that negative value forward as requested timeout to intel_uc_wait_for_idle(), an explicit BUG will be triggered. If request retirement succeeds but an error code is passed back via remaininig_timeout, we may have no clue on how much of the initial timeout might have been left for spending it on waiting for GuC to become idle. OTOH, since all pending requests have been successfully retired, that error code has been already ignored by intel_gt_retire_requests_timeout(), then we shouldn't fail. Assume no more time has been left on error and pass 0 timeout value to intel_uc_wait_for_idle() to give it a chance to return success if GuC is already idle. v3: Don't fail on any error passed back via remaining_timeout. v2: Fix the issue on the caller side, not the provider. Fixes: b97060a99b01 ("drm/i915/guc: Update intel_gt_wait_for_idle to work with GuC") Signed-off-by: Janusz Krzysztofik Cc: stable@vger.kernel.org # v5.15+ Reviewed-by: Andrzej Hajda Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20221121145655.75141-2-janusz.krzysztofik@linux.intel.com commit 4b03d5e0d3e86ee492d54254927d020dc0fe8acf Author: Frieder Schrempf Date: Tue Nov 22 09:12:18 2022 +0100 drm/bridge: ti-sn65dsi83: Fix delay after reset deassert to match spec The datasheet specifies a delay of 10 milliseconds, but the current driver only waits for 1 ms. Fix this to make sure the initialization sequence meets the spec. Fixes: ceb515ba29ba ("drm/bridge: ti-sn65dsi83: Add TI SN65DSI83 and SN65DSI84 driver") Signed-off-by: Frieder Schrempf Reviewed-by: Alexander Stein Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20221122081219.20143-1-frieder@fris.de commit e95d5445df2ae03d5c9c08b19a1603f57c1e549c Author: Maxime Ripard Date: Thu Nov 17 10:29:02 2022 +0100 drm/sun4i: tv: Convert to the new TV mode property Now that the core can deal fine with analog TV modes, let's convert the sun4i TV driver to leverage those new features. Acked-by: Noralf Trønnes Reviewed-by: Jernej Skrabec Acked-in-principle-or-something-like-that-by: Daniel Vetter Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-19-256dad125326@cerno.tech Signed-off-by: Maxime Ripard commit 2757279304e45d749578df30ae0cd1a42fefe096 Author: Mateusz Kwiatkowski Date: Thu Nov 17 10:29:01 2022 +0100 drm/vc4: vec: Add support for more analog TV standards Add support for the following composite output modes (all of them are somewhat more obscure than the previously defined ones): - NTSC_443 - NTSC-style signal with the chroma subcarrier shifted to 4.43361875 MHz (the PAL subcarrier frequency). Never used for broadcasting, but sometimes used as a hack to play NTSC content in PAL regions (e.g. on VCRs). - PAL_N - PAL with alternative chroma subcarrier frequency, 3.58205625 MHz. Used as a broadcast standard in Argentina, Paraguay and Uruguay to fit 576i50 with colour in 6 MHz channel raster. - PAL60 - 480i60 signal with PAL-style color at normal European PAL frequency. Another non-standard, non-broadcast mode, used in similar contexts as NTSC_443. Some displays support one but not the other. - SECAM - French frequency-modulated analog color standard; also have been broadcast in Eastern Europe and various parts of Africa and Asia. Uses the same 576i50 timings as PAL. Also added some comments explaining color subcarrier frequency registers. Acked-by: Noralf Trønnes Signed-off-by: Mateusz Kwiatkowski Tested-by: Mateusz Kwiatkowski Acked-in-principle-or-something-like-that-by: Daniel Vetter Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-18-256dad125326@cerno.tech Signed-off-by: Maxime Ripard commit 91112a6fc12cb086cf7a3a350df6a415ba4631ef Author: Maxime Ripard Date: Thu Nov 17 10:29:00 2022 +0100 drm/vc4: vec: Convert to the new TV mode property Now that the core can deal fine with analog TV modes, let's convert the vc4 VEC driver to leverage those new features. We've added some backward compatibility to support the old TV mode property and translate it into the new TV norm property. We're also making use of the new analog TV atomic_check helper to make sure we trigger a modeset whenever the TV mode is updated. Acked-by: Noralf Trønnes Tested-by: Mateusz Kwiatkowski Acked-in-principle-or-something-like-that-by: Daniel Vetter Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-17-256dad125326@cerno.tech Signed-off-by: Maxime Ripard commit b5da40af1b89019ffe7ee34f49676514c45411b3 Author: Mateusz Kwiatkowski Date: Thu Nov 17 10:28:59 2022 +0100 drm/vc4: vec: Check for VEC output constraints The VEC can accept pretty much any relatively reasonable mode, but still has a bunch of constraints to meet. Let's create an atomic_check() implementation that will make sure we don't end up accepting a non-functional mode. Acked-by: Noralf Trønnes Signed-off-by: Mateusz Kwiatkowski Tested-by: Mateusz Kwiatkowski Acked-in-principle-or-something-like-that-by: Daniel Vetter Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-16-256dad125326@cerno.tech Signed-off-by: Maxime Ripard commit c104b23147c725dcdf27558c5f37258aa66e38ed Author: Maxime Ripard Date: Thu Nov 17 10:28:58 2022 +0100 drm/vc4: vec: Use TV Reset implementation The analog TV properties created by the drm_mode_create_tv_properties() are not properly initialised at reset. Let's switch our implementation to call drm_atomic_helper_connector_tv_reset(). Reviewed-by: Noralf Trønnes Tested-by: Mateusz Kwiatkowski Acked-in-principle-or-something-like-that-by: Daniel Vetter Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-15-256dad125326@cerno.tech Signed-off-by: Maxime Ripard commit 5a28cefda3a94afc7761abbf4cb6270deeef8105 Author: Maxime Ripard Date: Thu Nov 17 10:28:57 2022 +0100 drm/atomic-helper: Add an analog TV atomic_check implementation The analog TV connector drivers share some atomic_check logic, and the new TV standard property have created some boilerplate that can be shared across drivers too. Let's create an atomic_check helper for those use cases. Reviewed-by: Noralf Trønnes Tested-by: Mateusz Kwiatkowski Acked-in-principle-or-something-like-that-by: Daniel Vetter Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-14-256dad125326@cerno.tech Signed-off-by: Maxime Ripard commit 00e77a697df29cadfbb78d4b14c357b07f3bb221 Author: Maxime Ripard Date: Thu Nov 17 10:28:56 2022 +0100 drm/atomic-helper: Add a TV properties reset helper The drm_tv_create_properties() function will create a bunch of properties, but it's up to each and every driver using that function to properly reset the state of these properties leading to inconsistent behaviours. Let's create a helper that will take care of it. Reviewed-by: Noralf Trønnes Tested-by: Mateusz Kwiatkowski Acked-in-principle-or-something-like-that-by: Daniel Vetter Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-13-256dad125326@cerno.tech Signed-off-by: Maxime Ripard commit 1e4a91db109f623d0e3ef7d8bfae3c88b4d2fa87 Author: Noralf Trønnes Date: Thu Nov 17 10:28:55 2022 +0100 drm/probe-helper: Provide a TV get_modes helper Most of the TV connectors will need a similar get_modes implementation that will, depending on the drivers' capabilities, register the 480i and 576i modes. That implementation will also need to set the preferred flag and order the modes based on the driver and users preferrence. This is especially important to guarantee that a userspace stack such as Xorg can start and pick up the preferred mode while maintaining a working output. Signed-off-by: Noralf Trønnes Tested-by: Mateusz Kwiatkowski Acked-in-principle-or-something-like-that-by: Daniel Vetter Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-12-256dad125326@cerno.tech Signed-off-by: Maxime Ripard commit 0740ac381b2c674eec72e63c78253b3ad07febd2 Author: Maxime Ripard Date: Thu Nov 17 10:28:54 2022 +0100 drm/modes: Introduce more named modes Now that we can easily extend the named modes list, let's add a few more analog TV modes that were used in the wild, and some unit tests to make sure it works as intended. Reviewed-by: Noralf Trønnes Tested-by: Mateusz Kwiatkowski Acked-in-principle-or-something-like-that-by: Daniel Vetter Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-11-256dad125326@cerno.tech Signed-off-by: Maxime Ripard commit 65c7bcf773208ca85192d9c76e9f368269848c50 Author: Maxime Ripard Date: Thu Nov 17 10:28:53 2022 +0100 drm/client: Remove match on mode name Commit 3aeeb13d8996 ("drm/modes: Support modes names on the command line") initially introduced the named modes support by essentially matching the name passed on the command-line to the mode names defined by the drivers. This proved to be difficult to work with, since all drivers had to provide properly named modes. This was also needed because we weren't passing a full blown-mode to the drivers, but were only filling its name. Thanks to the previous patches, we now generate a proper mode, and we thus can use the usual matching algo on timings, and can simply drop the name match. Reviewed-by: Noralf Trønnes Suggested-by: Noralf Trønnes Acked-in-principle-or-something-like-that-by: Daniel Vetter Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-10-256dad125326@cerno.tech Signed-off-by: Maxime Ripard commit fedcaf726f542b1b32611449bdea9cb02bf6bba9 Author: Maxime Ripard Date: Thu Nov 17 10:28:52 2022 +0100 drm/modes: Properly generate a drm_display_mode from a named mode The framework will get the drm_display_mode from the drm_cmdline_mode it got by parsing the video command line argument by calling drm_connector_pick_cmdline_mode(). The heavy lifting will then be done by the drm_mode_create_from_cmdline_mode() function. In the case of the named modes though, there's no real code to make that translation and we rely on the drivers to guess which actual display mode we meant. Let's modify drm_mode_create_from_cmdline_mode() to properly generate the drm_display_mode we mean when passing a named mode. Reviewed-by: Noralf Trønnes Tested-by: Mateusz Kwiatkowski Acked-in-principle-or-something-like-that-by: Daniel Vetter Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-9-256dad125326@cerno.tech Signed-off-by: Maxime Ripard commit e691c9992ae1c731ea67083739823b131c1d88ea Author: Maxime Ripard Date: Thu Nov 17 10:28:51 2022 +0100 drm/modes: Introduce the tv_mode property as a command-line option Our new tv mode option allows to specify the TV mode from a property. However, it can still be useful, for example to avoid any boot time artifact, to set that property directly from the kernel command line. Let's add some code to allow it, and some unit tests to exercise that code. Reviewed-by: Noralf Trønnes Tested-by: Mateusz Kwiatkowski Acked-in-principle-or-something-like-that-by: Daniel Vetter Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-8-256dad125326@cerno.tech Signed-off-by: Maxime Ripard commit d4613e3e50d34bc30ea384b8bf9560e874451640 Author: Maxime Ripard Date: Thu Nov 17 10:28:50 2022 +0100 drm/connector: Add a function to lookup a TV mode by its name As part of the command line parsing rework coming in the next patches, we'll need to lookup drm_connector_tv_mode values by their name, already defined in drm_tv_mode_enum_list. In order to avoid any code duplication, let's do a function that will perform a lookup of a TV mode name and return its value. Reviewed-by: Noralf Trønnes Tested-by: Mateusz Kwiatkowski Acked-in-principle-or-something-like-that-by: Daniel Vetter Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-7-256dad125326@cerno.tech Signed-off-by: Maxime Ripard commit 4fcd238560ee6724d6edcae95820bdf7f2e40ab1 Author: Maxime Ripard Date: Thu Nov 17 10:28:49 2022 +0100 drm/modes: Add a function to generate analog display modes Multiple drivers (meson, vc4, sun4i) define analog TV 525-lines and 625-lines modes in their drivers. Since those modes are fairly standard, and that we'll need to use them in more places in the future, it makes sense to move their definition into the core framework. However, analog display usually have fairly loose timings requirements, the only discrete parameters being the total number of lines and pixel clock frequency. Thus, we created a function that will create a display mode from the standard, the pixel frequency and the active area. Tested-by: Mateusz Kwiatkowski Acked-in-principle-or-something-like-that-by: Daniel Vetter Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-6-256dad125326@cerno.tech Signed-off-by: Maxime Ripard commit 7d63cd8526f1b70d1438b1aa90620cde941162c3 Author: Maxime Ripard Date: Thu Nov 17 10:28:48 2022 +0100 drm/connector: Add TV standard property The TV mode property has been around for a while now to select and get the current TV mode output on an analog TV connector. Despite that property name being generic, its content isn't and has been driver-specific which makes it hard to build any generic behaviour on top of it, both in kernel and user-space. Let's create a new enum tv norm property, that can contain any of the analog TV standards currently supported by kernel drivers. Each driver can then pass in a bitmask of the modes it supports, and the property creation function will filter out the modes not supported. We'll then be able to phase out the older tv mode property. Tested-by: Mateusz Kwiatkowski Acked-in-principle-or-something-like-that-by: Daniel Vetter Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-5-256dad125326@cerno.tech Signed-off-by: Maxime Ripard commit 80ed86d4b6d7cf91f4fd588bd7be2fa382724d2d Author: Maxime Ripard Date: Thu Nov 17 10:28:47 2022 +0100 drm/connector: Rename drm_mode_create_tv_properties drm_mode_create_tv_properties(), among other things, will create the "mode" property that stores the analog TV mode that connector is supposed to output. However, that property is getting deprecated, so let's rename that function to mention it's deprecated. We'll introduce a new variant of that function creating the property superseeding it in a later patch. Reviewed-by: Lyude Paul # nouveau Reviewed-by: Noralf Trønnes Tested-by: Mateusz Kwiatkowski Acked-in-principle-or-something-like-that-by: Daniel Vetter Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-4-256dad125326@cerno.tech Signed-off-by: Maxime Ripard commit aab5aaa760a3305d188612dd4a6ff4cde1b153d8 Author: Maxime Ripard Date: Thu Nov 17 10:28:46 2022 +0100 drm/connector: Only register TV mode property if present The drm_create_tv_properties() will create the TV mode property unconditionally. However, since we'll gradually phase it out, let's register it only if we have a list passed as an argument. This will make the transition easier. Acked-by: Noralf Trønnes Tested-by: Mateusz Kwiatkowski Acked-in-principle-or-something-like-that-by: Daniel Vetter Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-3-256dad125326@cerno.tech Signed-off-by: Maxime Ripard commit 1fd4a5a36f9f10aaad5d9b1b329c2c057d80a0e5 Author: Maxime Ripard Date: Thu Nov 17 10:28:45 2022 +0100 drm/connector: Rename legacy TV property The current tv_mode has driver-specific values that don't allow to easily share code using it, either at the userspace or kernel level. Since we're going to introduce a new, generic, property that fit the same purpose, let's rename this one to legacy_tv_mode to make it obvious we should move away from it. Acked-by: Thomas Zimmermann Reviewed-by: Lyude Paul # nouveau Reviewed-by: Noralf Trønnes Tested-by: Mateusz Kwiatkowski Acked-in-principle-or-something-like-that-by: Daniel Vetter Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-2-256dad125326@cerno.tech Signed-off-by: Maxime Ripard commit e76c4156c74402c3d0ed8ce78c320697a396dc10 Author: Maxime Ripard Date: Thu Nov 17 10:28:44 2022 +0100 drm/tests: client: Mention that we can't use MODULE_ macros That file is included directly, so we can't use any MODULE macro. Let's leave a comment to avoid any future mistake. Reviewed-by: Noralf Trønnes Acked-in-principle-or-something-like-that-by: Daniel Vetter Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-1-256dad125326@cerno.tech Signed-off-by: Maxime Ripard commit b56ffa583350f605446d78cb4163114e4d1ac60c Author: T.J. Mercier Date: Wed Nov 23 19:35:18 2022 +0000 dma-buf: A collection of typo and documentation fixes I've been collecting these typo fixes for a while and it feels like time to send them in. Signed-off-by: T.J. Mercier Reviewed-by: Randy Dunlap Acked-by: Christian König Reviewed-by: Tommaso Merciai Link: https://patchwork.freedesktop.org/patch/msgid/20221123193519.3948105-1-tjmercier@google.com Signed-off-by: Christian König commit 1e5b3968a57d7894d5f86a2ecb58fa057cb6f7b2 Merge: 6fb6c979ca628 d47f9580839eb Author: Thomas Zimmermann Date: Thu Nov 24 09:28:05 2022 +0100 Merge drm/drm-next into drm-misc-next Backmerging to get v6.1-rc6 into drm-misc-next. Signed-off-by: Thomas Zimmermann commit 9b23059b29238204b1769589d665f44bd9b31255 Author: John Harrison Date: Tue Nov 22 15:33:28 2022 -0800 drm/i915/uc: Fix table order verification to check all FW types It was noticed that the table order verification step was only being run once rather than once per firmware type. Fix that. Note that the long term plan is to convert this code to be a mock selftest. It is already only compiled in when selftests are enabled. And the work involved in the conversion was estimated to be non-trivial. So that conversion is currently low on the priority list. Signed-off-by: John Harrison Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20221122233328.854217-1-John.C.Harrison@Intel.com commit 02224691cb0f367acb476911bddfa21e2d596ca5 Author: Daniele Ceraolo Spurio Date: Thu Nov 10 16:56:51 2022 -0800 drm/i915/huc: fix leak of debug object in huc load fence on driver unload The fence is always initialized in huc_init_early, but the cleanup in huc_fini is only being run if HuC is enabled. This causes a leaking of the debug object when HuC is disabled/not supported, which can in turn trigger a warning if we try to register a new debug offset at the same address on driver reload. To fix the issue, make sure to always run the cleanup code. Reported-by: Tvrtko Ursulin Reported-by: Brian Norris Fixes: 27536e03271d ("drm/i915/huc: track delayed HuC load with a fence") Signed-off-by: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Cc: Brian Norris Cc: Alan Previn Cc: John Harrison Tested-by: Brian Norris Reviewed-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221111005651.4160369-1-daniele.ceraolospurio@intel.com commit 6fb6c979ca628583d4d0c59a0f8ff977e581ecc0 Author: Geert Uytterhoeven Date: Wed Nov 23 17:43:10 2022 +0100 drm/fourcc: Add missing big-endian XRGB1555 and RGB565 formats As of commit eae06120f1974e1a ("drm: refuse ADDFB2 ioctl for broken bigendian drivers"), drivers must set the quirk_addfb_prefer_host_byte_order quirk to make the drm_mode_addfb() compat code work correctly on big-endian machines. While that works fine for big-endian XRGB8888 and ARGB8888, which are mapped to the existing little-endian BGRX8888 and BGRA8888 formats, it does not work for big-endian XRGB1555 and RGB565, as the latter are not listed in the format database. Fix this by adding the missing formats. Limit this to big-endian platforms, as there is currently no need to support these formats on little-endian platforms. Fixes: 6960e6da9cec3f66 ("drm: fix drm_mode_addfb() on big endian machines.") Signed-off-by: Geert Uytterhoeven Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/3ee1f8144feb96c28742b22384189f1f83bcfc1a.1669221671.git.geert@linux-m68k.org commit 0964b52296506103fdc93a673f247e0e75114ed7 Author: Randy Dunlap Date: Fri Nov 18 15:51:37 2022 -0800 drm/doc: make drm-uapi igt-tests more readable Correct grammar and make the use of the igt-tests more readable. Signed-off-by: Randy Dunlap Cc: Gabriela Bittencourt Cc: Rodrigo Siqueira Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: dri-devel@lists.freedesktop.org Cc: Jonathan Corbet Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20221118235137.6859-1-rdunlap@infradead.org commit af2c3b557e2e66b91ea76f39d110b6023574ded4 Author: Ville Syrjälä Date: Tue Nov 22 14:08:25 2022 +0200 drm/i915/dvo: Log about what was detected on which DVO port Currently it's not 100% obvious which DVO encoder chip was found on which port. Leave a slightly better trace in log. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221122120825.26338-11-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit df9f0ebe87912bd9d3c82b45fecd6d6fa9874cf8 Author: Ville Syrjälä Date: Tue Nov 22 14:08:24 2022 +0200 drm/i915/dvo: Extract intel_dvo_regs.h Pull the DVO port register definitons into their own header to declutter i915_reg.h a bit. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221122120825.26338-10-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 079c4c0c6c48506bb657e67fdbe14ee9d7d683e2 Author: Ville Syrjälä Date: Tue Nov 22 14:08:23 2022 +0200 drm/i915/dvo: Use intel_de_rmw() for DVO enable/disable Replace the hand rolled RMW with intel_de_rmw() in the DVO port enable/disable functions. Also switch to intel_de_posting_read() for the posting read (though maybe it should be just be nuked...). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221122120825.26338-9-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 7ce5b3a7048cd73cff83ab12d62c6e9d53028b64 Author: Ville Syrjälä Date: Tue Nov 22 14:08:22 2022 +0200 drm/i915/dvo: Use REG_BIT() & co. for DVO registers Polish the DVO port registers with REG_BIT()/etc. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221122120825.26338-8-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 9710a5c14ede96628595d7105faeb0e9b94f1ea8 Author: Ville Syrjälä Date: Tue Nov 22 14:08:21 2022 +0200 drm/i915/dvo: Rename the "active data order" bits We have two sets of bits for DVO "data order" stuff. Rename one set to ACT_DATA_ORDER to make it clear they are separate bitfields. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221122120825.26338-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 5abd7d8d0e47ef9bfe7016489d4acf75ac2eccc4 Author: Ville Syrjälä Date: Tue Nov 22 14:08:20 2022 +0200 drm/i915/dvo: Define a few more DVO register bits Define a few extra interrupt related bits on the DVO register. One of these we included in the DVO_PRESERVE_MASK already. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221122120825.26338-6-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit a8d9a13d24af4555d211680d50af44a79e799c5d Author: Ville Syrjälä Date: Tue Nov 22 14:08:19 2022 +0200 drm/i915/dvo: Parametrize DVO/DVO_SRCDIM registers Get rid of the dvo_reg/dvo_srcdim_reg stuff by parametrizing the DVO port registers. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221122120825.26338-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit bf590368e540f87983769e7b9d4a5275f1edb81d Author: Ville Syrjälä Date: Tue Nov 22 14:08:18 2022 +0200 drm/i915/dvo/sil164: Fix suspend/resume Poke a few more bits into the SiI164 to make it recover after S3. HEN/VEN are the important bits, the rest PLL filter/HPD detection I just did for good measure to match the BIOS programming. Note that the spec recommended SCNT bit in REGC isn't set by the BIOS at least for me, so I left it out. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221122120825.26338-4-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit 49908b743f6ede9157771130ef24bc13389c9f2c Author: Ville Syrjälä Date: Tue Nov 22 14:08:17 2022 +0200 drm/i915/dvo/sil164: Nuke pointless return statements Drop the pointless return statements at the end of void functions. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221122120825.26338-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 6ad0571b58f9ad6c85306e6115353b8034d77ec9 Author: Ville Syrjälä Date: Tue Nov 22 14:08:16 2022 +0200 drm/i915/dvo/ch7xxx: Fix suspend/resume Poke a few more bits into the ch7xxx to make it output a picture after being reset during S3. In particular we need to set the input buffer select (IBS), and enable VGA vsync output on the BCO pin. Selecting VGA hsync on the c/h sync pin doesn't actually seem necessary on my ADD card at least, but the BIOS selects it so why not. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221122120825.26338-2-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit 9f1ecfc5dcb47a7ca37be47b0eaca0f37f1ae93d Author: Dmitry Osipenko Date: Wed Nov 23 03:13:03 2022 +0300 drm/scheduler: Fix lockup in drm_sched_entity_kill() The drm_sched_entity_kill() is invoked twice by drm_sched_entity_destroy() while userspace process is exiting or being killed. First time it's invoked when sched entity is flushed and second time when entity is released. This causes a lockup within wait_for_completion(entity_idle) due to how completion API works. Calling wait_for_completion() more times than complete() was invoked is a error condition that causes lockup because completion internally uses counter for complete/wait calls. The complete_all() must be used instead in such cases. This patch fixes lockup of Panfrost driver that is reproducible by killing any application in a middle of 3d drawing operation. Fixes: 2fdb8a8f07c2 ("drm/scheduler: rework entity flush, kill and fini") Signed-off-by: Dmitry Osipenko Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20221123001303.533968-1-dmitry.osipenko@collabora.com commit 8b7f7a9b10b704ba7d73199ff0f01354e0bad7a5 Author: Jani Nikula Date: Tue Nov 22 16:16:16 2022 +0200 drm/i915/guc: make default_lists const data The default_lists array should be in rodata. Fixes: dce2bd542337 ("drm/i915/guc: Add Gen9 registers for GuC error state capture.") Cc: Alan Previn Cc: Umesh Nerlige Ramappa Cc: Lucas De Marchi Signed-off-by: Jani Nikula Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20221122141616.3469214-1-jani.nikula@intel.com commit d1dd99083d187f64e5f4e507dcebf0d6228b901a Author: Jani Nikula Date: Tue Nov 22 14:09:48 2022 +0200 drm/i915/hti: avoid theoretically possible negative shift If phy is PHY_NONE, the shift to register bits becomes negative. Check and warn about this. Reported-by: coverity-bot References: https://lore.kernel.org/r/202211180848.D39006C@keescook Signed-off-by: Jani Nikula Reviewed-by: Kees Cook Link: https://patchwork.freedesktop.org/patch/msgid/20221122120948.3436180-1-jani.nikula@intel.com commit 739ad2e4e15b585a0eaf98b7bdee62b2dd9588c9 Author: Janis Schoetterl-Glausch Date: Thu Nov 17 11:07:45 2022 +0100 s390/uaccess: limit number of retries for cmpxchg_user_key() cmpxchg_user_key() for byte and short values is implemented via a one word cmpxchg loop. Give up trying to perform the cmpxchg if it fails too often because of contention on the cache line. This ensures that the thread cannot become stuck in the kernel. Signed-off-by: Janis Schoetterl-Glausch Link: https://lore.kernel.org/r/20221117100745.3253896-1-scgl@linux.ibm.com Signed-off-by: Heiko Carstens commit 67630bacae2354c3ae20b10cf25bc7e274882200 Author: Ville Syrjälä Date: Mon Nov 14 17:37:31 2022 +0200 drm/i915: Add 10bit gamma mode for gen2/3 Some gen2/gen3 parts have a 10bit gamma mode, on some pipes. Expose it. The format is different to the later i965+ style in that we store a 10bit value and a 6 bit floating point slope for each entry. Ie. the hardware extrapolates the intermediate steps from the current LUT entry, instead of interpolating between the current and next LUT entries. This also means we don't store the last LUT entry in any register as it is defined by the previous LUT entry's value+slope. The slope has limited precision though (2 bit exponent + 4 bit mantissa), so we'd have to allow for more error in the state checker for the last entry and we have to make sure userspace doesn't pass in something where the slope is simply to steep. In theory we should perhaps check the slope for every interval, but we don't do that for any other interpolated gamma mode and I suspect they may also have some internal limit on the slope. I haven't confirmed that theory though. Anyways, for ease of implementation we shall just ignore the last entry in the state checker. If all the other entries match anyway then that seems like a good indication that the hardware was programmed as expected. v2: Redo the state checker logic a bit Rebase due to other changes v3: Fix C8 readout v4: Use REG_FIELD_PREP() Acked-by: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114153732.11773-20-ville.syrjala@linux.intel.com commit ba51925da4ef763d6a3aa03b15241a85cdb76865 Author: José Roberto de Souza Date: Mon Nov 21 11:24:49 2022 +0200 drm/i915/gsc: Only initialize GSC in tile 0 For multi-tile setups the GSC operational only on the tile 0. Skip GSC auxiliary device creation for all other tiles in GSC device init code. Initialize basic GSC fields and use the same path as HECI1 (HECI_PXP) device disable. Cc: Tomas Winkler Cc: Vitaly Lubart Signed-off-by: José Roberto de Souza Signed-off-by: Alexander Usyskin Acked-by: Tomas Winkler Reviewed-by: Tomas Winkler Link: https://patchwork.freedesktop.org/patch/msgid/20221121092449.328674-1-alexander.usyskin@intel.com commit 07fc6a7b1a03934cd564ce8492bb6e7a49a12751 Author: Ville Syrjälä Date: Mon Nov 14 17:37:30 2022 +0200 drm/i915: Use gamma LUT for RGB limited range compression On hsw+ and glk class hardware we current make a mess of things when we have to both generate limited range output and use the hw gamma LUT. Since we do the range compression using the pipe CSC unit (which is situated before the gamma LUT in the pipe) we are in fact applying the gamma to the limited range data instead of the full range data as the user intended. We can work around this by applying the range compression via the gamma LUT instead of using the pipe CSC for it. Fairly easy to do now that we have the internal post_csc_lut attachment point where we can stick our new cooked LUT. On hsw+ this only needs to be done when using the split gamma mode or when the ctm is enabled since otherwise we can simply reorder the LUT vs. CSC. On glk we need to do this any time a gamma LUT is used since no reordering is possible. We do lose a bit of coverage in intel_color_assert_luts(), but so be it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114153732.11773-19-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar commit 58765e0c49722adf3f8d2dcd572ef29a58b3629a Author: Ville Syrjälä Date: Mon Nov 14 17:37:29 2022 +0200 drm/i915: Use hw degamma LUT for sw gamma on glk with YCbCr output On glk we can no longer reorder the hw LUTS vs. pipe CSC like we could on earlier platforms, and neither do we have a separate output CSC like on icl+. That means if we use the pipe CSC for YCbCr output we are currently applying the gamma LUT after the RGB->YCbCr conversion, which is just wrong. The further we go from a linear curve the more distorted the resulting colors become. To work around this terrible limitation the best we can do is repurpose the hw degamma LUT as a poor man's gamma LUT. Now that we have the internal pre_csc_lut attachment point that is not particularly hard to do. What makes this less than ideal however is the fact that the hw degamma LUT and gamma LUTs have very different capabilities. The gamma LUT can operate in direct color type modes, whereas the degamma LUT can't and just always operates in interpolated mode. Additionally the degamma LUT is just a single 1D LUT, whereas the gamma LUT is made of three separate 1D LUts (one for each channel). So in order to make this semi-sensible we must also verify the user supplied LUT more less matches the hw degamma LUT capabilities. We still end up losing most of the LUT entries though, so the results might be a bit crap. The other option of flat out rejecting the YCbCr+gamma LUT combo seems extremely likely to just cause a black screen for the user. Eg. pretty sure Xorg always applies some kind of gamma LUT, and if the user then plugs in a display that needs YCbCr output we're toast. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114153732.11773-18-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar commit e0b10f88ae33f1a5276f552b9d158ae1623c50e0 Author: Ville Syrjälä Date: Mon Nov 14 17:37:28 2022 +0200 drm/i915: Rework legacy LUT handling Currently crtc_state_is_legacy_gamma() has a very specific set of conditions, not all of which are actually necessary. Also when we detect those conditions check_luts() just skips all the checks. That will no longer work for glk soon when we'll start to use the hw degamma LUT in place of the hw gamma LUT for YCbCr output. So let's rework the logic to only really consider whether the user provided gamma_lut is one that matches the hw legacy LUT capabilities or not. We'll need to reject C8+degamma on ivb+ since the presence of degamma_lut would either mean we have to really use the LUT for degamma as opposed to C8 palette, or we have to enable split gamma mode which also can't work as the C8 palette. Otherwise this will now cause the legacy LUT to go through the regular lut checks as well. As a side effect we also start to allow the use of the legacy LUT with CTM, but that is perfectly fine as far a the hardware is concerned. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114153732.11773-17-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar commit 96ffd0cda60abfbb39246ed2fb0d344b57289904 Author: Ville Syrjälä Date: Mon Nov 14 17:37:27 2022 +0200 drm/i915: Finish the LUT state checker We have full readout now for all platforms (sans the icl+ multi-segment readout hw fail), so hook up the LUT state checker for everyone. We add a new vfunc for this since different platforms need to handle the details a bit differently. The implementation is rather repetitive in places. Probably we want to think of a more declarative approach for the LUT precision/etc. stuff in the future... Note that we're currently missing readout for c8_planes, so we'll have to skip the state check in that case. v2: Fix readout for C8 use cases v3: Skip C8 entirely due to lack of c8_planes readout Add ilk_has_pre_csc_lut() helper and use other such helpers Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114153732.11773-16-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar commit bad2383f05b588e14fdde728299f090b08d3f27a Author: Ville Syrjälä Date: Mon Nov 14 17:37:26 2022 +0200 drm/i915: Make .read_luts() mandatory Every platform now implements .read_luts(). Make it mandatory. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114153732.11773-15-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar commit 298ad1070c315c89977af2cfbce04630853fde21 Author: Ville Syrjälä Date: Mon Nov 14 17:37:25 2022 +0200 drm/i915: Prep for C8 palette readout Add the approproate c8_planes checks to make the LUT code ready for C8 palette readout. Note we currently lack the actual c8_planes readout, so this won't work yet. But no harm in making the code somewhat more ready for the day when we do get c8_planes readout. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114153732.11773-14-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar commit d2559299d339a2dfa4d1f14978e629669cf4b1d7 Author: Ville Syrjälä Date: Mon Nov 14 17:37:24 2022 +0200 drm/i915: Make ilk_read_luts() capable of degamma readout Just like ivb+, ilk/snb can select whether the hw lut acts as gamma or degamma. Make the readout cognizant of that fact. v2: deal with pre_csc_lut v3: use ilk_has_post_csc_lut() helper Reviewed-by: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114153732.11773-13-ville.syrjala@linux.intel.com commit 9f9af566a177689e812557fb1eb08433adcd6951 Author: Ville Syrjälä Date: Mon Nov 14 17:37:23 2022 +0200 drm/i915: Add gamma/degamma readout for ivb/hsw We now have all the code necessary for gamma/degamma readout on ivb/hsw. Plug it all in. As with bdw+ the cooked {pre,post}_csc_lut make this trivial even in split gamma mode. Note that on HSW if IPS is enabled the hardware will hang if you try to access the LUT in split gamma mode. Thus we need to reorder the LUT readout vs. IPS enable steps. v2: deal with {pre,post}_csc_lut split gamma is no longer a problem handle HSW IPS w/a v3: use ilk_has_post_csc_lut() helper Reviewed-by: Uma Shankar #v1 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114153732.11773-12-ville.syrjala@linux.intel.com commit 36eb28b44bc84a3091bad93f70bbe86746167f24 Author: Ville Syrjälä Date: Mon Nov 14 17:37:22 2022 +0200 drm/i915: Add gamma/degamma readout for bdw+ Read out the gamma/degamma LUT on bdw+. Now that the {pre,post}_csc_lut match the hardware LUT size even in split gamma mode this is trivial. v2: deal with {pre,post}_csc_lut split gamma is no longer a problem v3: add ilk_has_post_csc_lut() helper Reviewed-by: Uma Shankar #v1 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114153732.11773-11-ville.syrjala@linux.intel.com commit 5375f433409975c3f967aec88fe3f8ebdce4e436 Author: Ville Syrjälä Date: Mon Nov 14 17:37:21 2022 +0200 drm/i915: Read out CHV CGM degamma Since CHV has the dedicate CGM degamma unit readout is trivial. Just do it. v2: deal with post_csc_lut Reviewed-by: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114153732.11773-10-ville.syrjala@linux.intel.com commit aec31331f84b7294f6b94af755ea44a0ed5bdcba Author: Ville Syrjälä Date: Mon Nov 14 17:37:20 2022 +0200 drm/i915: Add glk+ degamma readout Read out the degamma LUT on glk+. No state cheker as of yet since it requires dealing with the glk csc vs. degamma mess. v2: deal with post_csc_lut v3: add icl_has_{pre,post}_csc_lut(*) helpers Reviewed-by: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114153732.11773-9-ville.syrjala@linux.intel.com commit c9bc8c7fc05e5ce5157c9c0285eba183b6062f9c Author: Ville Syrjälä Date: Mon Nov 14 17:37:19 2022 +0200 drm/i915: s/gamma/post_csc_lut/ Rename a the LUT state check foo_gamma_precision() functions to foo_post_csc_lut_precision() to make it more clear what they really do. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114153732.11773-8-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar commit 397d5c2c38cde286a76fd59a462b0e1cdc6df4ba Author: Ville Syrjälä Date: Mon Nov 14 17:37:18 2022 +0200 drm/i915: Fix adl+ degamma LUT size The degamma LUT is interpolated so we need the 128th (==1.0) entry to represent the full < 1.0 input range. Only the 129th and 130th entries are strictly for the >=1.0 extended range inputs. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221114153732.11773-7-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar commit f1c87a94a1087a26f41007ee83264033007421b5 Author: Ville Syrjälä Date: Fri Nov 18 20:52:01 2022 +0200 drm/i915: Remove non-existent pipes from bigjoiner pipe mask bigjoiner_pipes() doesn't consider that: - RKL only has three pipes - some pipes may be fused off This means that intel_atomic_check_bigjoiner() won't reject all configurations that would need a non-existent pipe. Instead we just keep on rolling witout actually having reserved the slave pipe we need. It's possible that we don't outright explode anywhere due to this since eg. for_each_intel_crtc_in_pipe_mask() will only walk the crtcs we've registered even though the passed in pipe_mask asks for more of them. But clearly the thing won't do what is expected of it when the required pipes are not present. Fix the problem by consulting the device info pipe_mask already in bigjoiner_pipes(). Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221118185201.10469-1-ville.syrjala@linux.intel.com Reviewed-by: Arun R Murthy commit 8853750dbad8f5dbf912a9f13b3fea41965634e1 Author: Vinod Govindapillai Date: Mon Nov 21 17:07:18 2022 +0200 drm/i915: Enable SDP split for DP2.0 Enable the SDP split configuration for DP2.0. v2: Move the register handling out of compute config function (JaniN) v3: Patch styling and register access based on platform support (JaniN) v4: Rebased v5: Use unconditional clear bit in intel_de_rmw (Jani Nikula) Bspec: 67768 Signed-off-by: Vinod Govindapillai Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20221121150718.1117628-1-vinod.govindapillai@intel.com commit 282e86eaa5d5e032541b5e3c0b9d0a55fe000607 Author: Anusha Srivatsa Date: Fri Nov 18 11:00:08 2022 -0800 drm/i915/display: Add missing CDCLK Squash support for MTL MTL supports both squash and crawl. Cc: Clint Taylor Cc: Lucas De Marchi Signed-off-by: Anusha Srivatsa Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20221118190008.824412-1-anusha.srivatsa@intel.com commit 86c0ef7234a7c517b010fd5ecf1e176127bce521 Author: Anusha Srivatsa Date: Thu Nov 17 15:00:02 2022 -0800 drm/i915/display: Add CDCLK Support for MTL As per bSpec MTL has 38.4 MHz Reference clock. Adding the cdclk tables and cdclk_funcs that MTL will use. v2: Revert to using bxt_get_cdclk() BSpec: 65243 Cc: Clint Taylor Signed-off-by: Anusha Srivatsa Reviewed-by: Clint Taylor Link: https://patchwork.freedesktop.org/patch/msgid/20221117230002.792096-3-anusha.srivatsa@intel.com commit 25e0e5ae561003817797c23ae3b85cf510be11c5 Author: Ville Syrjälä Date: Thu Nov 17 15:00:01 2022 -0800 drm/i915/display: Do both crawl and squash when changing cdclk For MTL, changing cdclk from between certain frequencies has both squash and crawl. Use the current cdclk config and the new(desired) cdclk config to construct a mid cdclk config. Set the cdclk twice: - Current cdclk -> mid cdclk - mid cdclk -> desired cdclk Driver should not take some Pcode mailbox communication in the cdclk path for platforms that are Display version 14 and later. v2: Add check in intel_modeset_calc_cdclk() to avoid cdclk change via modeset for platforms that support squash_crawl sequences(Ville) v3: Add checks for: - scenario where only slow clock is used and cdclk is actually 0 (bringing up display). - PLLs are on before looking up the waveform. - Squash and crawl capability checks.(Ville) v4: Rebase - Move checks to be more consistent (Ville) - Add comments (Bala) v5: - Further small changes. Move checks around. - Make if-else better looking (Ville) v6: MTl should not follow PUnit mailbox communication as the rest of gen11+ platforms.(Anusha) Cc: Clint Taylor Cc: Balasubramani Vivekanandan Signed-off-by: Anusha Srivatsa Signed-off-by: Ville Syrjälä Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20221117230002.792096-2-anusha.srivatsa@intel.com commit 9a0a4ec530a7514ccd6061ecdeaf719a03cb34cd Author: Anusha Srivatsa Date: Thu Nov 17 15:00:00 2022 -0800 drm/i915/display: Add missing checks for cdclk crawling cdclk_sanitize() function was written assuming vco was a signed integer. vco gets assigned to -1 (essentially ~0) for the case where PLL might be enabled and vco is not a frequency that will ever get used. In such a scenario the right thing to do is disable the PLL and re-enable it again with a valid frequency. However the vco is declared as a unsigned variable. With the above assumption, driver takes crawl path when not needed. Add explicit check to not crawl in the case of an invalid PLL. v2: Move the check from .h to .c (MattR) - Move check to bxt_set_cdclk() instead of intel_modeset_calc_cdclk() which is directly in the path of the sanitize() function (Ville) v3: remove unwanted parenthesis(Ville) Cc: Ville Syrjälä Cc: Matt Roper Suggested-by: Ville Syrjälä Signed-off-by: Anusha Srivatsa Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221117230002.792096-1-anusha.srivatsa@intel.com commit 2364b5060d780476b7455f38e3a2c7e14cc3406e Author: Colin Ian King Date: Wed Nov 16 09:39:43 2022 +0000 samples/hid: Fix spelling mistake "wihout" -> "without" There is a spelling mistake in a comment and a usage message. Fix them. Signed-off-by: Colin Ian King Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 529d95a6067b74da9d4d5d9ab3009b35c98c5fce Author: Umesh Nerlige Ramappa Date: Thu Nov 10 17:19:13 2022 +0000 drm/i915/selftest: Bump up sample period for busy stats selftest Engine busyness samples around a 10ms period is failing with busyness ranging approx. from 87% to 115% as shown below. The expected range is +/- 5% of the sample period. Fail 10% of the time. rcs0: reported 11716042ns [91%] busyness while spinning [for 12805719ns] When determining busyness of active engine, the GuC based engine busyness implementation relies on a 64 bit timestamp register read. The latency incurred by this register read causes the failure. On DG1, when the test fails, the observed latencies range from 900us - 1.5ms. Optimizing the 2x32 read by acquiring the lock and forcewake prior to all reg reads reduces the rate of failure to around 2%, but does not eliminate it. In order to make the selftest more robust and always account for such latencies, increase the sample period to 100 ms. This eliminates the issue as seen in a 1000 runs. v2: (Ashutosh) - Add error to commit msg - Include gitlab bug - Update commit for inclusion of 2x32 optimized read Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4418 Signed-off-by: Umesh Nerlige Ramappa Acked-by: Tvrtko Ursulin Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221110171913.670286-3-umesh.nerlige.ramappa@intel.com commit e746f84b8e813816951b63485134927ed6763a1b Author: Umesh Nerlige Ramappa Date: Thu Nov 10 17:19:12 2022 +0000 i915/uncore: Acquire fw before loop in intel_uncore_read64_2x32 PMU reads the GT timestamp as a 2x32 mmio read and since upper and lower 32 bit registers are read in a loop, there is a latency involved between getting the GT timestamp and the CPU timestamp. As part of the resolution, refactor intel_uncore_read64_2x32 to acquire forcewake and uncore lock prior to reading upper and lower regs. Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Tvrtko Ursulin Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20221110171913.670286-2-umesh.nerlige.ramappa@intel.com commit 67b5655b2e717b8b681f8acd9cbddd2d687d5d4e Author: Vinay Belgaumkar Date: Sat Nov 19 00:03:54 2022 +0530 drm/i915/mtl: Enable Idle Messaging for GSC CS By defaut idle messaging is disabled for GSC CS so to unblock RC6 entry on media tile idle messaging need to be enabled. v2: - Fix review comments (Vinay) - Set GSC idle hysteresis as per spec (Badal) v3: - Fix review comments (Rodrigo) Bspec: 71496 Cc: Daniele Ceraolo Spurio Signed-off-by: Vinay Belgaumkar Signed-off-by: Badal Nilawar Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20221118183354.1047829-1-badal.nilawar@intel.com commit 7e41b2e9776d85950896d9e117a525a44bb6ce92 Author: Benjamin Tissoires Date: Fri Nov 18 11:54:48 2022 +0100 HID: force HID depending on INPUT In most configurations, INPUT is actually a boolean: either y or disabled, but when it's disabled, you can't do much on your average laptop. But it turns out that there is a possibility to have INPUT as a module: you have to disable VT and TTY (of course), but also enable EXPERT. I'll leave how to disable VT and TTY as an exercise for the bravest. Anyway, if INPUT is m, we can still configure HID as y, which is not correct because hid-input.c depends on the input API, meaning that vmlinuz can not link. So: add depends on INPUT too at the HID level, to ensure that if INPUT=m, HID can only be m or disabled. Fixes: 25621bcc8976 ("HID: Kconfig: split HID support and hid-core compilation") Reported-by: kernel test robot Link: https://lore.kernel.org/r/202211181742.QYJY6Gug-lkp@intel.com Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 6cc90ccd4f6cfed98e2a3a378debc69f28d57473 Author: Benjamin Tissoires Date: Fri Nov 18 09:42:54 2022 +0100 HID: fix BT_HIDP Kconfig dependencies If HID_SUPPORT is not selected, BT_HIDP should not be available, simply because we disallowed the HID bus entirely. Add a new depends and actually revert this file back to where it was 10 years ago before it was changed by commit 1f41a6a99476 ("HID: Fix the generic Kconfig options"). Fixes: 25621bcc8976 ("HID: Kconfig: split HID support and hid-core compilation") Reported-by: kernel test robot Link: https://lore.kernel.org/r/202211181514.fLhaiS7o-lkp@intel.com/ Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 834c23e4f798dcdc8af251b3c428ceef94741991 Author: Shang XiaoJing Date: Fri Nov 18 10:16:51 2022 +0800 drm: Fix potential null-ptr-deref due to drmm_mode_config_init() drmm_mode_config_init() will call drm_mode_create_standard_properties() and won't check the ret value. When drm_mode_create_standard_properties() failed due to alloc, property will be a NULL pointer and may causes the null-ptr-deref. Fix the null-ptr-deref by adding the ret value check. Found null-ptr-deref while testing insert module bochs: general protection fault, probably for non-canonical address 0xdffffc000000000c: 0000 [#1] SMP KASAN PTI KASAN: null-ptr-deref in range [0x0000000000000060-0x0000000000000067] CPU: 3 PID: 249 Comm: modprobe Not tainted 6.1.0-rc1+ #364 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.15.0-0-g2dd4b9b3f840-prebuilt.qemu.org 04/01/2014 RIP: 0010:drm_object_attach_property+0x73/0x3c0 [drm] Call Trace: __drm_connector_init+0xb6c/0x1100 [drm] bochs_pci_probe.cold.11+0x4cb/0x7fe [bochs] pci_device_probe+0x17d/0x340 really_probe+0x1db/0x5d0 __driver_probe_device+0x1e7/0x250 driver_probe_device+0x4a/0x120 __driver_attach+0xcd/0x2c0 bus_for_each_dev+0x11a/0x1b0 bus_add_driver+0x3d7/0x500 driver_register+0x18e/0x320 do_one_initcall+0xc4/0x3e0 do_init_module+0x1b4/0x630 load_module+0x5dca/0x7230 __do_sys_finit_module+0x100/0x170 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7ff65af9f839 Fixes: 6b4959f43a04 ("drm/atomic: atomic plane properties") Signed-off-by: Shang XiaoJing Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20221118021651.2460-1-shangxiaojing@huawei.com commit 7df34a619f59439f38e56d389df02ee7e9e8cc97 Author: ChunyouTang Date: Sat Nov 19 14:41:31 2022 +0800 drm/gem-shmem: When drm_gem_object_init failed, should release object when goto err_free, the object had init, so it should be release when fail. Signed-off-by: ChunyouTang Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20221119064131.364-1-tangchunyou@163.com commit 51098f0eb22e2f54055d75dd25bc84eff07d6d8a Author: Janis Schoetterl-Glausch Date: Wed Nov 16 15:47:11 2022 +0100 s390/cmpxchg: make loop condition for 1,2 byte cases precise The cmpxchg implementation for 1 and 2 bytes consists of a 4 byte cmpxchg loop. Currently, the decision to retry is imprecise, looping if bits outside the target byte(s) change instead of retrying until the target byte(s) differ from the old value. E.g. if an attempt to exchange (prev_left_0 old_bytes prev_right_0) is made and it fails because the word at the address is (prev_left_1 x prev_right_1) where both x != old_bytes and one of the prev_*_1 values differs from the respective prev_*_0 value, the cmpxchg is retried, even if by a semantic equivalent to a normal cmpxchg, the exchange would fail. Instead exit the loop if x != old_bytes and retry otherwise. Signed-off-by: Janis Schoetterl-Glausch Link: https://lore.kernel.org/r/20221116144711.3811011-1-scgl@linux.ibm.com Signed-off-by: Heiko Carstens commit 4148575abe1e14af3cb9fd1a3c9c2a708ec0b1f9 Author: Heiko Carstens Date: Wed Nov 2 15:19:23 2022 +0100 s390/uaccess: add cmpxchg_user_key() Add cmpxchg_user_key() which allows to execute a compare and exchange on a user space address. This allows also to specify a storage key which makes sure that key-controlled protection is considered. This is based on a patch written by Janis Schoetterl-Glausch. Link: https://lore.kernel.org/all/20220930210751.225873-2-scgl@linux.ibm.com Cc: Janis Schoetterl-Glausch Link: https://lore.kernel.org/r/Y2J8axs+bcQ2dO/l@osiris Signed-off-by: Heiko Carstens commit f39a8c4a22ea104c368361b9ae0f550da161db2d Author: Heiko Carstens Date: Wed Nov 2 15:18:45 2022 +0100 s390/extable: add EX_TABLE_UA_LOAD_REGPAIR() macro Add new exception table type which is able to handle register pairs. If an exception is recognized on such an instruction the specified register pair will be zeroed, and the specified error register will be modified so it contains -EFAULT, similar to the existing EX_TABLE_UA_LOAD_REG() macro. Link: https://lore.kernel.org/r/Y2J8RSW2khWLgpPo@osiris Signed-off-by: Heiko Carstens commit e388d66f032166c8e8c4efd9e6c6f43610378903 Author: Heiko Carstens Date: Wed Nov 2 15:18:07 2022 +0100 s390/cmpxchg: remove digits from input constraints Instead of using a digit for input constraints simply initialize the corresponding output operand in C code and use a "+" constraint modifier. Link: https://lore.kernel.org/r/Y2J8H82B6JhJhrp2@osiris Signed-off-by: Heiko Carstens commit ce968f654570dbd9cac7de694681640061559d3b Author: Heiko Carstens Date: Wed Nov 2 15:17:28 2022 +0100 s390/cmpxchg: make variables local to each case label Make variables local to each case label. This limits the scope of variables and allows to use proper types everywhere. Link: https://lore.kernel.org/r/Y2J7+HqgAZwnfxsh@osiris Signed-off-by: Heiko Carstens commit 13f62e84385fa0241fc6a2178da50af02189121b Author: Heiko Carstens Date: Wed Nov 2 15:16:43 2022 +0100 s390/cmpxchg: use symbolic names for inline assembly operands Make cmpxchg() inline assemblies more readable by using symbolic names for operands. Link: https://lore.kernel.org/r/Y2J7yzQYt/bjLQXY@osiris Signed-off-by: Heiko Carstens commit 71feb6f901ecba962177a0a029dc545c91a4b396 Author: Tvrtko Ursulin Date: Fri Nov 18 11:52:49 2022 +0000 drm/i915: Fix workarounds on Gen2-3 In 3653727560d0 ("drm/i915: Simplify internal helper function signature") I broke the old platforms by not noticing engine workaround init does not initialize the list on old platforms. Fix it by always initializing which already does the right thing by mostly not doing anything if there aren't any workarounds on the list. Signed-off-by: Tvrtko Ursulin Fixes: 3653727560d0 ("drm/i915: Simplify internal helper function signature") Reported-by: Ville Syrjälä Cc: Mika Kuoppala Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20221118115249.2683946-1-tvrtko.ursulin@linux.intel.com commit e3ddd2d25533d1cc6f9fea421e4a5f16b60b3434 Author: Thomas Zimmermann Date: Fri Nov 18 14:35:35 2022 +0100 Revert "drm/fb-helper: Perform damage handling in deferred-I/O helper" This reverts commit 5fc586a058babc71c82a038477581b7bfe1c6e2a. Needed to restore the fbdev damage worker. There have been bug reports about locking order [1] and incorrectly takens branches. [2] Restore the damage worker until these problems have been resovled. Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Link: https://intel-gfx-ci.01.org/tree/drm-tip/fi-kbl-8809g.html # 1 Link: https://lore.kernel.org/dri-devel/20221115115819.23088-6-tzimmermann@suse.de/T/#m06eedc0a468940e4cbbd14ca026733b639bc445a # 2 Link: https://patchwork.freedesktop.org/patch/msgid/20221118133535.9739-4-tzimmermann@suse.de commit 8b83e1a455382dc667898a525a93f4eb6716cc41 Author: Thomas Zimmermann Date: Fri Nov 18 14:35:34 2022 +0100 Revert "drm/fb-helper: Schedule deferred-I/O worker after writing to framebuffer" This reverts commit 7f5cc4a3e5e4c5a38e5748defc952e45278f7a70. Needed to restore the fbdev damage worker. There have been bug reports about locking order [1] and incorrectly takens branches. [2] Restore the damage worker until these problems have been resovled. Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Link: https://intel-gfx-ci.01.org/tree/drm-tip/fi-kbl-8809g.html # 1 Link: https://lore.kernel.org/dri-devel/20221115115819.23088-6-tzimmermann@suse.de/T/#m06eedc0a468940e4cbbd14ca026733b639bc445a # 2 Link: https://patchwork.freedesktop.org/patch/msgid/20221118133535.9739-3-tzimmermann@suse.de commit 7aa3d63e1ad56c174536a5aba76d8a54c4c5acb4 Author: Thomas Zimmermann Date: Fri Nov 18 14:35:33 2022 +0100 Revert "drm/fb-helper: Remove damage worker" This reverts commit 27c3e9452d552ea86369a94f23287a9675f2d7a1. Needed to restore the fbdev damage worker. There have been bug reports about locking order [1] and incorrectly takens branches. [2] Restore the damage worker until these problems have been resovled. Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Link: https://intel-gfx-ci.01.org/tree/drm-tip/fi-kbl-8809g.html # 1 Link: https://lore.kernel.org/dri-devel/20221115115819.23088-6-tzimmermann@suse.de/T/#m06eedc0a468940e4cbbd14ca026733b639bc445a # 2 Link: https://patchwork.freedesktop.org/patch/msgid/20221118133535.9739-2-tzimmermann@suse.de commit f322ed0d76ef0c0f2be99780c2a40ac405411cf5 Author: Ville Syrjälä Date: Fri Nov 18 12:55:25 2022 +0200 drm/i915/dvo: Use per device debugs Convert the lonely DRM_DEBUG_KMS() to the per-device variant. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221118105525.27254-10-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit ef228dbfff70ca5823495d78ddb632abe230ce6f Author: Ville Syrjälä Date: Fri Nov 18 12:55:24 2022 +0200 drm/i915/dvo: s/dev_priv/i915/ Follow the modern style and rename most 'dev_priv' variables to 'i915'. intel_dvo_init_dev() is the sole exception since it needs the magic 'dev_priv' variable for the DPLL register macros. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221118105525.27254-9-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 09b350d7b05a62c9a59e201fcad4331ac6ee40c7 Author: Ville Syrjälä Date: Fri Nov 18 12:55:23 2022 +0200 drm/i915/dvo: s/intel_encoder/encoder/ etc. Remove the pointless intel_ namespace from our encoder/connector variables. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221118105525.27254-8-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit d82b9a898d52a30adbedd158222f162489db52ac Author: Ville Syrjälä Date: Fri Nov 18 12:55:22 2022 +0200 drm/i915/dvo: Flatten intel_dvo_init() The loop over intel_dvo_devices[] makes intel_dvo_init() an ugly mess. Pull the i2c device probe out to a separate function so that we can get rid of the loop and flatten the code. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221118105525.27254-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit c584f86c6242dff11d3e8f7b1646e5470a132784 Author: Ville Syrjälä Date: Fri Nov 18 12:55:21 2022 +0200 drm/i915/dvo: Eliminate useless 'port' variable Reorder the drm_encoder_init() vs. encoder->port assignment so that we don't need the extra 'port' variable. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221118105525.27254-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 201ec1bbca03a0c190962626574f8061a84cc9e7 Author: Ville Syrjälä Date: Fri Nov 18 12:55:20 2022 +0200 drm/i915/dvo: Introduce intel_dvo_connector_type() Introduce intel_dvo_connector_type() as a counterpart to intel_dvo_encoder_type(), mainly to declutter intel_dvo_init() a bit. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221118105525.27254-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 6ebf5caf1fae75634b0564152958ecb433cfa952 Author: Ville Syrjälä Date: Fri Nov 18 12:55:19 2022 +0200 drm/i915/dvo: Actually initialize the DVO encoder type We call drm_encoder_init() before determining the correct encoder type, thus we always end up with DRM_MODE_ENCODER_NONE. Determine the correct encoder type earlier. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221118105525.27254-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 3b5130a68df1a513713b027d03125ba11ebc2975 Author: Ville Syrjälä Date: Fri Nov 18 12:55:18 2022 +0200 drm/i915/dvo: Don't leak connector state on DVO init failure If we can't initialize the DVO encoder also free the connector state allocated by intel_connector_alloc(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221118105525.27254-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 4b9cc6efeb0684912d518e9953a1d493b2b89a02 Author: Ville Syrjälä Date: Fri Nov 18 12:55:17 2022 +0200 drm/i915/dvo: Remove unused panel_wants_dither intel_dvo.panel_wants_dither is only set but never used. We can't do dithering on the gmch side anyway since the dithering logic is part of the integrated LVDS port and not available for other output types. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20221118105525.27254-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 192bb40f030a41ca95c5cff8c9340b725bc7ba8b Author: Matt Roper Date: Thu Nov 17 09:33:58 2022 -0800 drm/i915/gt: Manage uncore->lock while waiting on MCR register The GT MCR code currently relies on uncore->lock to avoid race conditions on the steering control register during MCR operations. The *_fw() versions of MCR operations expect the caller to already hold uncore->lock, while the non-fw variants manage the lock internally. However the sole callsite of intel_gt_mcr_wait_for_reg_fw() does not currently obtain the forcewake lock, allowing a potential race condition (and triggering an assertion on lockdep builds). Furthermore, since 'wait for register value' requests may not return immediately, it is undesirable to hold a fundamental lock like uncore->lock for the entire wait and block all other MMIO for the duration; rather the lock is only needed around the MCR read operations and can be released during the delays. Convert intel_gt_mcr_wait_for_reg_fw() to a non-fw variant that will manage uncore->lock internally. This does have the side effect of causing an unnecessary lookup in the forcewake table on each read operation, but since the caller is still holding the relevant forcewake domain, this will ultimately just incremenent the reference count and won't actually cause any additional MMIO traffic. In the future we plan to switch to a dedicated MCR lock to protect the steering critical section rather than using the overloaded and high-traffic uncore->lock; on MTL and beyond the new lock can be implemented on top of the hardware-provided synchonization mechanism for steering. Fixes: 3068bec83eea ("drm/i915/gt: Add intel_gt_mcr_wait_for_reg_fw()") Cc: Lucas De Marchi Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20221117173358.1980230-1-matthew.d.roper@intel.com commit 7ae2e684854cd955eff8daceff84fea33a1c94be Author: Lukasz Wiecaszek Date: Thu Nov 17 18:18:09 2022 +0100 udmabuf: add vmap and vunmap methods to udmabuf_ops The reason behind that patch is associated with videobuf2 subsystem (or more genrally with v4l2 framework) and user created dma buffers (udmabuf). In some circumstances when dealing with V4L2_MEMORY_DMABUF buffers videobuf2 subsystem wants to use dma_buf_vmap() method on the attached dma buffer. As udmabuf does not have .vmap operation implemented, such dma_buf_vmap() natually fails. videobuf2_common: __vb2_queue_alloc: allocated 3 buffers, 1 plane(s) each videobuf2_common: __prepare_dmabuf: buffer for plane 0 changed videobuf2_common: __prepare_dmabuf: failed to map dmabuf for plane 0 videobuf2_common: __buf_prepare: buffer preparation failed: -14 The patch itself seems to be strighforward. It adds implementation of .vmap and .vunmap methods to 'struct dma_buf_ops udmabuf_ops'. .vmap method itself uses vm_map_ram() to map pages linearly into the kernel virtual address space. .vunmap removes mapping created earlier by .vmap. All locking and 'vmapping counting' is done in dma_buf.c so it seems to be redundant/unnecessary in .vmap/.vunmap. Signed-off-by: Lukasz Wiecaszek Reviewed-by: Dmitry Osipenko Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20221117171810.75637-1-lukasz.wiecaszek@gmail.com Signed-off-by: Christian König commit a189b2ee938f6b15ad9f95bdef63f95a3a092418 Author: Thomas Zimmermann Date: Thu Nov 17 12:47:29 2022 +0100 fbdev: Make fb_modesetting_disabled() static inline Make fb_modesetting_disabled() a static-inline function when it is defined in the header file. Avoid the linker error shown below. ld: drivers/video/fbdev/core/fbmon.o: in function `fb_modesetting_disabled': fbmon.c:(.text+0x1e4): multiple definition of `fb_modesetting_disabled'; drivers/video/fbdev/core/fbmem.o:fbmem.c:(.text+0x1bac): first defined here A bug report is at [1]. Reported-by: Stephen Rothwell Reported-by: kernel test robot Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Fixes: 0ba2fa8cbd29 ("fbdev: Add support for the nomodeset kernel parameter") Cc: Javier Martinez Canillas Cc: Daniel Vetter Cc: Helge Deller Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Link: https://lore.kernel.org/dri-devel/20221117183214.2473e745@canb.auug.org.au/T/#u # 1 Link: https://patchwork.freedesktop.org/patch/msgid/20221117114729.7570-1-tzimmermann@suse.de commit 576e619ba4a47329bf55ada2d184e72529793fbd Author: Benjamin Tissoires Date: Wed Nov 16 11:31:10 2022 +0100 HID: bpf: return non NULL data pointer when CONFIG_HID_BPF is not set dispatch_hid_bpf_device_event() is supposed to return either an error, or a valid pointer to memory containing the data. Returning NULL simply makes a segfault when CONFIG_HID_BPF is not set for any processed event. Fixes: 658ee5a64fcfbbf ("HID: bpf: allocate data memory for device_event BPF program") Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit dfae6bec7100ca21a5753a03b09a81174a4e7ba0 Author: Benjamin Tissoires Date: Thu Nov 3 16:57:56 2022 +0100 Documentation: add HID-BPF docs Gives a primer on HID-BPF. Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit a56a256933bb0b593dc36fc8d7bb85ada3655662 Author: Benjamin Tissoires Date: Thu Nov 3 16:57:55 2022 +0100 samples/hid: add Surface Dial example Add a more complete HID-BPF example. Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 6008105b4f4e470da0e9159a3a74ca7ff6e869ba Author: Benjamin Tissoires Date: Thu Nov 3 16:57:54 2022 +0100 samples/hid: add new hid BPF example Everything should be available in the selftest part of the tree, but providing an example without uhid and hidraw will be more easy to follow for users. This example will probably ever only work on the Etekcity Scroll 6E because we need to adapt the various raw values to the actual device. On that device, the X and Y axis will be swapped and inverted, and on any other device, chances are high that the device will not work until Ctrl-C is hit. The Makefiles are taken from samples/bpf to not reinvent the wheel and to force using in-kernel libbpf and bpftool. Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 80e189f2af37d383b4840f3f89896071392cb58f Author: Benjamin Tissoires Date: Thu Nov 3 16:57:53 2022 +0100 selftests/hid: Add a test for BPF_F_INSERT_HEAD Insert 3 programs to check that we are doing the correct thing: '2', '1', '3' are inserted, but '1' is supposed to be executed first. Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit e8445737c0264cf4ddac682c278e0ef5b8a61a3d Author: Benjamin Tissoires Date: Thu Nov 3 16:57:52 2022 +0100 selftests/hid: add report descriptor fixup tests Simple report descriptor override in HID: replace part of the report descriptor from a static definition in the bpf kernel program. Note that this test should be run last because we disconnect/reconnect the device, meaning that it changes the overall uhid device. Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit ad190df11a024c1214fbc8dcaab72c592c79d9b5 Author: Benjamin Tissoires Date: Thu Nov 3 16:57:51 2022 +0100 HID: bpf: allow to change the report descriptor Add a new tracepoint hid_bpf_rdesc_fixup() so we can trigger a report descriptor fixup in the bpf world. Whenever the program gets attached/detached, the device is reconnected meaning that userspace will see it disappearing and reappearing with the new report descriptor. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 4f7153cf461ed0f78d8da8c9fd02d38728a76b90 Author: Benjamin Tissoires Date: Thu Nov 3 16:57:50 2022 +0100 selftests/hid: add tests for bpf_hid_hw_request Add tests for the newly implemented function. We test here only the GET_REPORT part because the other calls are pure HID protocol and won't infer the result of the test of the bpf hook. Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 91a7f802d1852f60139712bdcfa98db547ce0531 Author: Benjamin Tissoires Date: Thu Nov 3 16:57:49 2022 +0100 HID: bpf: introduce hid_hw_request() This function can not be called under IRQ, thus it is only available while in SEC("syscall"). For consistency, this function requires a HID-BPF context to work with, and so we also provide a helper to create one based on the HID unique ID. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Benjamin Tissoires -- changes in v12: - variable dereferenced before check 'ctx' |Reported-by: kernel test robot |Reported-by: Dan Carpenter no changes in v11 no changes in v10 changes in v9: - fixed kfunc declaration aaccording to latest upstream changes no changes in v8 changes in v7: - hid_bpf_allocate_context: remove unused variable - ensures buf is not NULL changes in v6: - rename parameter size into buf__sz to teach the verifier about the actual buffer size used by the call - remove the allocated data in the user created context, it's not used new-ish in v5 Signed-off-by: Jiri Kosina commit 0330f725cc5b01f4149a2a21e474b2090a1dcead Author: Benjamin Tissoires Date: Thu Nov 3 16:57:48 2022 +0100 selftests/hid: add test to change the report size Use a different report with a bigger size and ensures we are doing things properly. Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 658ee5a64fcfbbf758447fa3af425729eaabb0dc Author: Benjamin Tissoires Date: Thu Nov 3 16:57:47 2022 +0100 HID: bpf: allocate data memory for device_event BPF programs We need to also be able to change the size of the report. Reducing it is easy, because we already have the incoming buffer that is big enough, but extending it is harder. Pre-allocate a buffer that is big enough to handle all reports of the device, and use that as the primary buffer for BPF programs. To be able to change the size of the buffer, we change the device_event API and request it to return the size of the buffer. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 0baef37335dd4d5cffd00c9b8bbf2e0b71e4239f Author: Benjamin Tissoires Date: Thu Nov 3 16:57:46 2022 +0100 HID: bpf jmp table: simplify the logic of cleaning up programs Kind of a hack, but works for now: Instead of listening for any close of eBPF program, we now decrement the refcount when we insert it in our internal map of fd progs. This is safe to do because: - we listen to any call of destructor of programs - when a program is being destroyed, we disable it by removing it from any RCU list used by any HID device (so it will never be called) - we then trigger a job to cleanup the prog fd map, but we overwrite the removal of the elements to not do anything on the programs, just remove the allocated space This is better than previously because we can remove the map of known programs and their usage count. We now rely on the refcount of bpf, which has greater chances of being accurate. Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit dbb60c8a26daf388f183f599e1e96de5bb9f96e1 Author: Benjamin Tissoires Date: Thu Nov 3 16:57:45 2022 +0100 selftests: add tests for the HID-bpf initial implementation The tests are pretty basic: - create a virtual uhid device that no userspace will like (to not mess up the running system) - attach a BPF prog to it - open the matching hidraw node - inject one event and check: * that the BPF program can do something on the event stream * can modify the event stream - add another test where we attach/detach BPF programs to see if we get errors Note: the Makefile is extracted from selftests/bpf so we can rebuild the libbpf and bpftool components from the current kernel tree without relying on system installed components. Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit f5c27da4e3c8a2e42fb4f41a0c685debcb9af294 Author: Benjamin Tissoires Date: Thu Nov 3 16:57:44 2022 +0100 HID: initial BPF implementation Declare an entry point that can use fmod_ret BPF programs, and also an API to access and change the incoming data. A simpler implementation would consist in just calling hid_bpf_device_event() for any incoming event and let users deal with the fact that they will be called for any event of any device. The goal of HID-BPF is to partially replace drivers, so this situation can be problematic because we might have programs which will step on each other toes. For that, we add a new API hid_bpf_attach_prog() that can be called from a syscall and we manually deal with a jump table in hid-bpf. Whenever we add a program to the jump table (in other words, when we attach a program to a HID device), we keep the number of time we added this program in the jump table so we can release it whenever there are no other users. HID devices have an RCU protected list of available programs in the jump table, and those programs are called one after the other thanks to bpf_tail_call(). To achieve the detection of users losing their fds on the programs we attached, we add 2 tracing facilities on bpf_prog_release() (for when a fd is closed) and bpf_free_inode() (for when a pinned program gets unpinned). Reviewed-by: Greg Kroah-Hartman Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 25621bcc89762fe1329ae9c9dab75bc70ef1aee0 Author: Benjamin Tissoires Date: Thu Nov 3 16:57:43 2022 +0100 HID: Kconfig: split HID support and hid-core compilation Currently, we step into drivers/hid/ based on the value of CONFIG_HID. However, that value is a tristate, meaning that it can be a module. As per the documentation, if we jump into the subdirectory by following an obj-m, we can not compile anything inside that subdirectory in vmlinux. It is considered as a bug. To make things more friendly to HID-BPF, split HID (the HID core parameter) from HID_SUPPORT (do we want any kind of HID support in the system?), and make this new config a boolean. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina